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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
47,800 | minja::Parser::parseConstant() | monkey531[P]llama/common/minja.hpp | std::shared_ptr<Value> parseConstant() {
auto start = it;
consumeSpaces();
if (it == end) return nullptr;
if (*it == '"' || *it == '\'') {
auto str = parseString();
if (str) return std::make_shared<Value>(*str);
}
static std::regex prim_tok(R"(true\b|True\b|false\b|False\b|None\b)");
auto token = consumeToken(prim_tok);
if (!token.empty()) {
if (token == "true" || token == "True") return std::make_shared<Value>(true);
if (token == "false" || token == "False") return std::make_shared<Value>(false);
if (token == "None") return std::make_shared<Value>(nullptr);
throw std::runtime_error("Unknown constant token: " + token);
}
auto number = parseNumber(it, end);
if (!number.is_null()) return std::make_shared<Value>(number);
it = start;
return nullptr;
} | O2 | cpp | minja::Parser::parseConstant():
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x40, %rsp
movq %rsi, %r14
movq %rdi, %rbx
movq 0x20(%rsi), %r12
pushq $0x1
popq %rsi
movq %r14, %rdi
callq 0x6d23e
movq 0x20(%r14), %rax
cmpq 0x18(%r14), %rax
je 0x71b77
movzbl (%rax), %eax
cmpl $0x27, %eax
je 0x71b4c
cmpl $0x22, %eax
jne 0x71b8a
movq %rsp, %r15
movq %r15, %rdi
movq %r14, %rsi
callq 0x72864
movq (%r15), %rsi
testq %rsi, %rsi
je 0x71b82
movq %rbx, %rdi
callq 0x728ba
movq %rsp, %rdi
callq 0x728d8
jmp 0x71c73
xorps %xmm0, %xmm0
movups %xmm0, (%rbx)
jmp 0x71c73
movq %rsp, %rdi
callq 0x728d8
leaq 0x9b66f(%rip), %rax # 0x10d200
movb (%rax), %al
testb %al, %al
je 0x71ca9
leaq 0x9b63e(%rip), %rdx # 0x10d1e0
movq %rsp, %r15
pushq $0x1
popq %rcx
movq %r15, %rdi
movq %r14, %rsi
callq 0x6c334
cmpq $0x0, 0x8(%r15)
je 0x71bf2
leaq 0x451a9(%rip), %rsi # 0xb6d6a
movq %rsp, %rdi
callq 0x4550a
testb %al, %al
jne 0x71be0
leaq 0x4e1bc(%rip), %rsi # 0xbfd90
movq %rsp, %rdi
callq 0x4550a
testb %al, %al
je 0x71c20
leaq 0x20(%rsp), %rsi
movb $0x1, (%rsi)
movq %rbx, %rdi
callq 0x728f2
jmp 0x71c6b
leaq 0x20(%r14), %r15
leaq 0x18(%r14), %rcx
leaq 0x20(%rsp), %rdi
movq %r14, %rsi
movq %r15, %rdx
callq 0x7292e
cmpb $0x0, 0x20(%rsp)
je 0x71c58
leaq 0x20(%rsp), %rsi
movq %rbx, %rdi
callq 0x72bf7
jmp 0x71c61
leaq 0x47e2c(%rip), %rsi # 0xb9a53
movq %rsp, %rdi
callq 0x4550a
testb %al, %al
jne 0x71c46
leaq 0x4e15b(%rip), %rsi # 0xbfd95
movq %rsp, %rdi
callq 0x4550a
testb %al, %al
je 0x71c83
leaq 0x20(%rsp), %rsi
movb $0x0, (%rsi)
movq %rbx, %rdi
callq 0x728f2
jmp 0x71c6b
movq %r12, (%r15)
xorps %xmm0, %xmm0
movups %xmm0, (%rbx)
leaq 0x20(%rsp), %rdi
callq 0x49008
movq %rsp, %rdi
callq 0x25298
movq %rbx, %rax
addq $0x40, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
leaq 0x4e526(%rip), %rsi # 0xc01b0
movq %rsp, %rdi
callq 0x4550a
testb %al, %al
je 0x71cfe
leaq 0x20(%rsp), %rsi
andq $0x0, (%rsi)
movq %rbx, %rdi
callq 0x72910
jmp 0x71c6b
leaq 0x9b550(%rip), %rdi # 0x10d200
callq 0x25090
testl %eax, %eax
je 0x71b9b
leaq 0x9b51c(%rip), %rdi # 0x10d1e0
leaq 0x4e4c0(%rip), %rsi # 0xc018b
pushq $0x10
popq %rdx
callq 0x52106
leaq -0x1f9ae(%rip), %rdi # 0x5232c
leaq 0x9b4ff(%rip), %rsi # 0x10d1e0
leaq 0x9ac70(%rip), %rdx # 0x10c958
callq 0x247e0
leaq 0x9b50c(%rip), %rdi # 0x10d200
callq 0x245f0
jmp 0x71b9b
pushq $0x10
popq %rdi
callq 0x24470
movq %rax, %r14
leaq 0x4e4a5(%rip), %rsi # 0xc01b5
leaq 0x20(%rsp), %rdi
movq %rsp, %rdx
callq 0x45643
movb $0x1, %bpl
leaq 0x20(%rsp), %rsi
movq %r14, %rdi
callq 0x24e90
xorl %ebp, %ebp
movq 0x9a2ba(%rip), %rsi # 0x10bff0
movq 0x9a21b(%rip), %rdx # 0x10bf58
movq %r14, %rdi
callq 0x24f80
movq %rax, %rbx
leaq 0x9b4b1(%rip), %rdi # 0x10d200
callq 0x245e0
jmp 0x71da4
movq %rax, %rbx
leaq 0x20(%rsp), %rdi
callq 0x25298
testb %bpl, %bpl
jne 0x71d6d
jmp 0x71d8f
movq %rax, %rbx
movq %r14, %rdi
callq 0x246a0
jmp 0x71d8f
jmp 0x71d8c
jmp 0x71d8c
movq %rax, %rbx
leaq 0x20(%rsp), %rdi
callq 0x49008
jmp 0x71d8f
jmp 0x71d8c
movq %rax, %rbx
movq %rsp, %rdi
callq 0x25298
jmp 0x71da4
movq %rax, %rbx
movq %rsp, %rdi
callq 0x728d8
movq %rbx, %rdi
callq 0x25010
| _ZN5minja6Parser13parseConstantEv:
push rbp
push r15
push r14
push r12
push rbx
sub rsp, 40h
mov r14, rsi
mov rbx, rdi
mov r12, [rsi+20h]
push 1
pop rsi
mov rdi, r14
call _ZN5minja6Parser13consumeSpacesENS_13SpaceHandlingE; minja::Parser::consumeSpaces(minja::SpaceHandling)
mov rax, [r14+20h]
cmp rax, [r14+18h]
jz short loc_71B77
movzx eax, byte ptr [rax]
cmp eax, 27h ; '''
jz short loc_71B4C
cmp eax, 22h ; '"'
jnz short loc_71B8A
loc_71B4C:
mov r15, rsp
mov rdi, r15
mov rsi, r14
call _ZN5minja6Parser11parseStringB5cxx11Ev; minja::Parser::parseString(void)
mov rsi, [r15]
test rsi, rsi
jz short loc_71B82
mov rdi, rbx
call _ZSt11make_sharedIN5minja5ValueEJRNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEESt10shared_ptrIT_EDpOT0_; std::make_shared<minja::Value,std::string &>(std::string &)
mov rdi, rsp
call _ZNSt10unique_ptrINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt14default_deleteIS5_EED2Ev; std::unique_ptr<std::string>::~unique_ptr()
jmp loc_71C73
loc_71B77:
xorps xmm0, xmm0
movups xmmword ptr [rbx], xmm0
jmp loc_71C73
loc_71B82:
mov rdi, rsp
call _ZNSt10unique_ptrINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt14default_deleteIS5_EED2Ev; std::unique_ptr<std::string>::~unique_ptr()
loc_71B8A:
lea rax, _ZGVZN5minja6Parser13parseConstantEvE8prim_tokB5cxx11; `guard variable for'minja::Parser::parseConstant(void)::prim_tok
mov al, [rax]
test al, al
jz loc_71CA9
loc_71B9B:
lea rdx, _ZZN5minja6Parser13parseConstantEvE8prim_tokB5cxx11; minja::Parser::parseConstant(void)::prim_tok
mov r15, rsp
push 1
pop rcx
mov rdi, r15
mov rsi, r14
call _ZN5minja6Parser12consumeTokenERKNSt7__cxx1111basic_regexIcNS1_12regex_traitsIcEEEENS_13SpaceHandlingE; minja::Parser::consumeToken(std::basic_regex<char,std::regex_traits<char>> const&,minja::SpaceHandling)
cmp qword ptr [r15+8], 0
jz short loc_71BF2
lea rsi, aTrue; "true"
mov rdi, rsp
call _ZSteqIcSt11char_traitsIcESaIcEEbRKNSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_; std::operator==<char>(std::string const&,char const*)
test al, al
jnz short loc_71BE0
lea rsi, aTrue_0; "True"
mov rdi, rsp
call _ZSteqIcSt11char_traitsIcESaIcEEbRKNSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_; std::operator==<char>(std::string const&,char const*)
test al, al
jz short loc_71C20
loc_71BE0:
lea rsi, [rsp+68h+var_48]
mov byte ptr [rsi], 1
mov rdi, rbx
call _ZSt11make_sharedIN5minja5ValueEJbEESt10shared_ptrIT_EDpOT0_; std::make_shared<minja::Value,bool>(bool &&)
jmp short loc_71C6B
loc_71BF2:
lea r15, [r14+20h]
lea rcx, [r14+18h]
lea rdi, [rsp+68h+var_48]
mov rsi, r14
mov rdx, r15
call _ZN5minja6Parser11parseNumberERN9__gnu_cxx17__normal_iteratorIPKcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEERKSB_; minja::Parser::parseNumber(__gnu_cxx::__normal_iterator<char const*,std::string> &,__gnu_cxx::__normal_iterator<char const*,std::string> const&)
cmp [rsp+68h+var_48], 0
jz short loc_71C58
lea rsi, [rsp+68h+var_48]
mov rdi, rbx
call _ZSt11make_sharedIN5minja5ValueEJRN8nlohmann16json_abi_v3_11_310basic_jsonINS3_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS3_14adl_serializerES6_IhSaIhEEvEEEESt10shared_ptrIT_EDpOT0_; std::make_shared<minja::Value,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> &>(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> &)
jmp short loc_71C61
loc_71C20:
lea rsi, aAdvancedOption+0ABh; "false"
mov rdi, rsp
call _ZSteqIcSt11char_traitsIcESaIcEEbRKNSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_; std::operator==<char>(std::string const&,char const*)
test al, al
jnz short loc_71C46
lea rsi, aFalse; "False"
mov rdi, rsp
call _ZSteqIcSt11char_traitsIcESaIcEEbRKNSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_; std::operator==<char>(std::string const&,char const*)
test al, al
jz short loc_71C83
loc_71C46:
lea rsi, [rsp+68h+var_48]
mov byte ptr [rsi], 0
mov rdi, rbx
call _ZSt11make_sharedIN5minja5ValueEJbEESt10shared_ptrIT_EDpOT0_; std::make_shared<minja::Value,bool>(bool &&)
jmp short loc_71C6B
loc_71C58:
mov [r15], r12
xorps xmm0, xmm0
movups xmmword ptr [rbx], xmm0
loc_71C61:
lea rdi, [rsp+68h+var_48]
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvED2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::~basic_json()
loc_71C6B:
mov rdi, rsp; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
loc_71C73:
mov rax, rbx
add rsp, 40h
pop rbx
pop r12
pop r14
pop r15
pop rbp
retn
loc_71C83:
lea rsi, aNone_0; "None"
mov rdi, rsp
call _ZSteqIcSt11char_traitsIcESaIcEEbRKNSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_; std::operator==<char>(std::string const&,char const*)
test al, al
jz short loc_71CFE
lea rsi, [rsp+68h+var_48]
and qword ptr [rsi], 0
mov rdi, rbx
call _ZSt11make_sharedIN5minja5ValueEJDnEESt10shared_ptrIT_EDpOT0_; std::make_shared<minja::Value,decltype(nullptr)>(decltype(nullptr) &&)
jmp short loc_71C6B
loc_71CA9:
lea rdi, _ZGVZN5minja6Parser13parseConstantEvE8prim_tokB5cxx11; __guard *
call ___cxa_guard_acquire
test eax, eax
jz loc_71B9B
lea rdi, _ZZN5minja6Parser13parseConstantEvE8prim_tokB5cxx11; minja::Parser::parseConstant(void)::prim_tok
lea rsi, aTrueBTrueBFals; "true\\b|True\\b|false\\b|False\\b|None"...
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, _ZZN5minja6Parser13parseConstantEvE8prim_tokB5cxx11; obj
lea rdx, __dso_handle; lpdso_handle
call ___cxa_atexit
lea rdi, _ZGVZN5minja6Parser13parseConstantEvE8prim_tokB5cxx11; __guard *
call ___cxa_guard_release
jmp loc_71B9B
loc_71CFE:
push 10h
pop rdi; thrown_size
call ___cxa_allocate_exception
mov r14, rax
lea rsi, aUnknownConstan; "Unknown constant token: "
lea rdi, [rsp+68h+var_48]
mov rdx, rsp
call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_RKS8_; std::operator+<char>(char const*,std::string const&)
mov bpl, 1
lea rsi, [rsp+68h+var_48]
mov rdi, r14
call __ZNSt13runtime_errorC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; std::runtime_error::runtime_error(std::string const&)
xor ebp, ebp
mov rsi, cs:_ZTISt13runtime_error_ptr; lptinfo
mov rdx, cs:_ZNSt13runtime_errorD1Ev_ptr; void (*)(void *)
mov rdi, r14; void *
call ___cxa_throw
mov rbx, rax
lea rdi, _ZGVZN5minja6Parser13parseConstantEvE8prim_tokB5cxx11; __guard *
call ___cxa_guard_abort
jmp short loc_71DA4
mov rbx, rax
lea rdi, [rsp+68h+var_48]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
test bpl, bpl
jnz short loc_71D6D
jmp short loc_71D8F
mov rbx, rax
loc_71D6D:
mov rdi, r14; void *
call ___cxa_free_exception
jmp short loc_71D8F
jmp short loc_71D8C
jmp short loc_71D8C
mov rbx, rax
lea rdi, [rsp+68h+var_48]
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvED2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::~basic_json()
jmp short loc_71D8F
jmp short $+2
loc_71D8C:
mov rbx, rax
loc_71D8F:
mov rdi, rsp; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
jmp short loc_71DA4
mov rbx, rax
mov rdi, rsp
call _ZNSt10unique_ptrINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt14default_deleteIS5_EED2Ev; std::unique_ptr<std::string>::~unique_ptr()
loc_71DA4:
mov rdi, rbx
call __Unwind_Resume
| minja::Parser * minja::Parser::parseConstant(minja::Parser *this, long long a2)
{
long long v2; // r12
unsigned __int8 *v3; // rax
int v4; // eax
void *exception; // r14
_QWORD v7[4]; // [rsp+0h] [rbp-68h] BYREF
_QWORD v8[9]; // [rsp+20h] [rbp-48h] BYREF
v2 = *(_QWORD *)(a2 + 32);
minja::Parser::consumeSpaces(a2, 1);
v3 = *(unsigned __int8 **)(a2 + 32);
if ( v3 == *(unsigned __int8 **)(a2 + 24) )
{
*(_OWORD *)this = 0LL;
return this;
}
v4 = *v3;
if ( v4 == 39 || v4 == 34 )
{
minja::Parser::parseString[abi:cxx11](v7, a2);
if ( v7[0] )
{
std::make_shared<minja::Value,std::string &>(this);
std::unique_ptr<std::string>::~unique_ptr(v7);
return this;
}
std::unique_ptr<std::string>::~unique_ptr(v7);
}
if ( !(_BYTE)`guard variable for'minja::Parser::parseConstant(void)::prim_tok[abi:cxx11]
&& __cxa_guard_acquire(&`guard variable for'minja::Parser::parseConstant(void)::prim_tok[abi:cxx11]) )
{
std::basic_regex<char,std::regex_traits<char>>::basic_regex(
(long long)&minja::Parser::parseConstant(void)::prim_tok[abi:cxx11],
(long long)"true\\b|True\\b|false\\b|False\\b|None\\b",
0x10u);
__cxa_atexit(
(void (*)(void *))std::basic_regex<char,std::regex_traits<char>>::~basic_regex,
&minja::Parser::parseConstant(void)::prim_tok[abi:cxx11],
&_dso_handle);
__cxa_guard_release(&`guard variable for'minja::Parser::parseConstant(void)::prim_tok[abi:cxx11]);
}
minja::Parser::consumeToken(v7, a2, (long long)&minja::Parser::parseConstant(void)::prim_tok[abi:cxx11], 1u);
if ( v7[1] )
{
if ( std::operator==<char>((long long)v7) || std::operator==<char>((long long)v7) )
{
LOBYTE(v8[0]) = 1;
std::make_shared<minja::Value,bool>(this, v8);
}
else if ( std::operator==<char>((long long)v7) || std::operator==<char>((long long)v7) )
{
LOBYTE(v8[0]) = 0;
std::make_shared<minja::Value,bool>(this, v8);
}
else
{
if ( !std::operator==<char>((long long)v7) )
{
exception = __cxa_allocate_exception(0x10uLL);
std::operator+<char>((long long)v8, (long long)"Unknown constant token: ", (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);
}
v8[0] = 0LL;
std::make_shared<minja::Value,decltype(nullptr)>(this, v8);
}
}
else
{
minja::Parser::parseNumber(v8, a2, a2 + 32, a2 + 24);
if ( LOBYTE(v8[0]) )
{
std::make_shared<minja::Value,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> &>(
this,
v8);
}
else
{
*(_QWORD *)(a2 + 32) = v2;
*(_OWORD *)this = 0LL;
}
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::~basic_json((long long)v8);
}
std::string::~string(v7);
return this;
}
| parseConstant:
PUSH RBP
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
SUB RSP,0x40
MOV R14,RSI
MOV RBX,RDI
MOV R12,qword ptr [RSI + 0x20]
PUSH 0x1
POP RSI
MOV RDI,R14
CALL 0x0016d23e
MOV RAX,qword ptr [R14 + 0x20]
CMP RAX,qword ptr [R14 + 0x18]
JZ 0x00171b77
MOVZX EAX,byte ptr [RAX]
CMP EAX,0x27
JZ 0x00171b4c
CMP EAX,0x22
JNZ 0x00171b8a
LAB_00171b4c:
MOV R15,RSP
MOV RDI,R15
MOV RSI,R14
CALL 0x00172864
MOV RSI,qword ptr [R15]
TEST RSI,RSI
JZ 0x00171b82
LAB_00171b62:
MOV RDI,RBX
CALL 0x001728ba
LAB_00171b6a:
MOV RDI,RSP
CALL 0x001728d8
JMP 0x00171c73
LAB_00171b77:
XORPS XMM0,XMM0
MOVUPS xmmword ptr [RBX],XMM0
JMP 0x00171c73
LAB_00171b82:
MOV RDI,RSP
CALL 0x001728d8
LAB_00171b8a:
LEA RAX,[0x20d200]
MOV AL,byte ptr [RAX]
TEST AL,AL
JZ 0x00171ca9
LAB_00171b9b:
LEA RDX,[0x20d1e0]
MOV R15,RSP
PUSH 0x1
POP RCX
MOV RDI,R15
MOV RSI,R14
CALL 0x0016c334
CMP qword ptr [R15 + 0x8],0x0
JZ 0x00171bf2
LEA RSI,[0x1b6d6a]
MOV RDI,RSP
CALL 0x0014550a
TEST AL,AL
JNZ 0x00171be0
LEA RSI,[0x1bfd90]
MOV RDI,RSP
CALL 0x0014550a
TEST AL,AL
JZ 0x00171c20
LAB_00171be0:
LEA RSI,[RSP + 0x20]
MOV byte ptr [RSI],0x1
LAB_00171be8:
MOV RDI,RBX
CALL 0x001728f2
JMP 0x00171c6b
LAB_00171bf2:
LEA R15,[R14 + 0x20]
LEA RCX,[R14 + 0x18]
LEA RDI,[RSP + 0x20]
MOV RSI,R14
MOV RDX,R15
CALL 0x0017292e
CMP byte ptr [RSP + 0x20],0x0
JZ 0x00171c58
LAB_00171c11:
LEA RSI,[RSP + 0x20]
MOV RDI,RBX
CALL 0x00172bf7
JMP 0x00171c61
LAB_00171c20:
LEA RSI,[0x1b9a53]
MOV RDI,RSP
CALL 0x0014550a
TEST AL,AL
JNZ 0x00171c46
LEA RSI,[0x1bfd95]
MOV RDI,RSP
CALL 0x0014550a
TEST AL,AL
JZ 0x00171c83
LAB_00171c46:
LEA RSI,[RSP + 0x20]
MOV byte ptr [RSI],0x0
LAB_00171c4e:
MOV RDI,RBX
CALL 0x001728f2
JMP 0x00171c6b
LAB_00171c58:
MOV qword ptr [R15],R12
XORPS XMM0,XMM0
MOVUPS xmmword ptr [RBX],XMM0
LAB_00171c61:
LEA RDI,[RSP + 0x20]
CALL 0x00149008
LAB_00171c6b:
MOV RDI,RSP
CALL 0x00125298
LAB_00171c73:
MOV RAX,RBX
ADD RSP,0x40
POP RBX
POP R12
POP R14
POP R15
POP RBP
RET
LAB_00171c83:
LEA RSI,[0x1c01b0]
MOV RDI,RSP
CALL 0x0014550a
TEST AL,AL
JZ 0x00171cfe
LEA RSI,[RSP + 0x20]
AND qword ptr [RSI],0x0
LAB_00171c9f:
MOV RDI,RBX
CALL 0x00172910
JMP 0x00171c6b
LAB_00171ca9:
LEA RDI,[0x20d200]
CALL 0x00125090
TEST EAX,EAX
JZ 0x00171b9b
LAB_00171cbd:
LEA RDI,[0x20d1e0]
LEA RSI,[0x1c018b]
PUSH 0x10
POP RDX
CALL 0x00152106
LAB_00171cd3:
LEA RDI,[0x15232c]
LEA RSI,[0x20d1e0]
LEA RDX,[0x20c958]
CALL 0x001247e0
LEA RDI,[0x20d200]
CALL 0x001245f0
JMP 0x00171b9b
LAB_00171cfe:
PUSH 0x10
POP RDI
CALL 0x00124470
MOV R14,RAX
LAB_00171d09:
LEA RSI,[0x1c01b5]
LEA RDI,[RSP + 0x20]
MOV RDX,RSP
CALL 0x00145643
MOV BPL,0x1
LAB_00171d20:
LEA RSI,[RSP + 0x20]
MOV RDI,R14
CALL 0x00124e90
XOR EBP,EBP
MOV RSI,qword ptr [0x0020bff0]
MOV RDX,qword ptr [0x0020bf58]
MOV RDI,R14
CALL 0x00124f80
|
/* minja::Parser::parseConstant() */
void minja::Parser::parseConstant(void)
{
char cVar1;
int8 uVar2;
bool bVar3;
int iVar4;
runtime_error *this;
__normal_iterator *in_RSI;
string *in_RDI;
long local_68;
long local_60;
ulong local_48 [4];
uVar2 = *(int8 *)(in_RSI + 0x20);
consumeSpaces();
if (*(char **)(in_RSI + 0x20) == *(char **)(in_RSI + 0x18)) {
*(int8 *)in_RDI = 0;
*(int8 *)(in_RDI + 8) = 0;
return;
}
cVar1 = **(char **)(in_RSI + 0x20);
if ((cVar1 == '\'') || (cVar1 == '\"')) {
parseString_abi_cxx11_();
if (local_68 != 0) {
/* try { // try from 00171b62 to 00171b69 has its CatchHandler @ 00171d99 */
std::make_shared<minja::Value,std::__cxx11::string&>(in_RDI);
std::unique_ptr<std::__cxx11::string,std::default_delete<std::__cxx11::string>>::~unique_ptr
((unique_ptr<std::__cxx11::string,std::default_delete<std::__cxx11::string>> *)
&local_68);
return;
}
std::unique_ptr<std::__cxx11::string,std::default_delete<std::__cxx11::string>>::~unique_ptr
((unique_ptr<std::__cxx11::string,std::default_delete<std::__cxx11::string>> *)
&local_68);
}
if ((parseConstant()::prim_tok_abi_cxx11_ == '\0') &&
(iVar4 = __cxa_guard_acquire(&parseConstant()::prim_tok_abi_cxx11_), iVar4 != 0)) {
/* try { // try from 00171cbd to 00171cd2 has its CatchHandler @ 00171d45 */
std::__cxx11::basic_regex<char,std::__cxx11::regex_traits<char>>::basic_regex
((basic_regex<char,std::__cxx11::regex_traits<char>> *)
parseConstant()::prim_tok_abi_cxx11_,"true\\b|True\\b|false\\b|False\\b|None\\b",0x10
);
__cxa_atexit(std::__cxx11::basic_regex<char,std::__cxx11::regex_traits<char>>::~basic_regex,
parseConstant()::prim_tok_abi_cxx11_,&__dso_handle);
__cxa_guard_release(&parseConstant()::prim_tok_abi_cxx11_);
}
consumeToken(&local_68);
if (local_60 == 0) {
/* try { // try from 00171bf2 to 00171c09 has its CatchHandler @ 00171d8a */
parseNumber((__normal_iterator *)local_48,in_RSI);
if (local_48[0]._0_1_ ==
(basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
)0x0) {
*(int8 *)(in_RSI + 0x20) = uVar2;
*(int8 *)in_RDI = 0;
*(int8 *)(in_RDI + 8) = 0;
}
else {
/* try { // try from 00171c11 to 00171c1d has its CatchHandler @ 00171d7b */
std::
make_shared<minja::Value,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>&>
(in_RDI);
}
nlohmann::json_abi_v3_11_3::
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,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_48);
}
else {
bVar3 = std::operator==((string *)&local_68,"true");
if ((bVar3) || (bVar3 = std::operator==((string *)&local_68,"True"), bVar3)) {
local_48[0] = CONCAT71(local_48[0]._1_7_,1);
/* try { // try from 00171be8 to 00171bef has its CatchHandler @ 00171d8c */
std::make_shared<minja::Value,bool>((bool *)in_RDI);
}
else {
bVar3 = std::operator==((string *)&local_68,"false");
if ((bVar3) || (bVar3 = std::operator==((string *)&local_68,"False"), bVar3)) {
local_48[0] = local_48[0] & 0xffffffffffffff00;
/* try { // try from 00171c4e to 00171c55 has its CatchHandler @ 00171d79 */
std::make_shared<minja::Value,bool>((bool *)in_RDI);
}
else {
bVar3 = std::operator==((string *)&local_68,"None");
if (!bVar3) {
this = (runtime_error *)__cxa_allocate_exception(0x10);
/* try { // try from 00171d09 to 00171d1c has its CatchHandler @ 00171d6a */
std::operator+((char *)local_48,(string *)"Unknown constant token: ");
/* try { // try from 00171d20 to 00171d44 has its CatchHandler @ 00171d56 */
std::runtime_error::runtime_error(this,(string *)local_48);
/* WARNING: Subroutine does not return */
__cxa_throw(this,PTR_typeinfo_0020bff0,PTR__runtime_error_0020bf58);
}
local_48[0] = 0;
/* try { // try from 00171c9f to 00171ca6 has its CatchHandler @ 00171d77 */
std::make_shared<minja::Value,decltype(nullptr)>((_func_decltype_nullptr **)in_RDI);
}
}
}
std::__cxx11::string::~string((string *)&local_68);
return;
}
| |
47,801 | aimrt::common::util::UrlEncode[abi:cxx11](std::basic_string_view<char, std::char_traits<char>>, bool) | aimrt_mujoco_sim/_deps/aimrt-src/src/common/net/../util/url_encode.h | inline std::string UrlEncode(std::string_view str, bool up = true) {
std::string ret_str;
ret_str.reserve(str.length() * 3);
for (unsigned char c : str) {
if (std::isalnum(c) || c == '-' || c == '_' || c == '.' || c == '~') {
ret_str += static_cast<char>(c);
} else if (c == ' ') {
ret_str += '+';
} else {
ret_str += '%';
ret_str += static_cast<char>(ToHex(c >> 4, up));
ret_str += static_cast<char>(ToHex(c & 0xF, up));
}
}
return ret_str;
} | O0 | c | aimrt::common::util::UrlEncode[abi:cxx11](std::basic_string_view<char, std::char_traits<char>>, bool):
subq $0x68, %rsp
movq %rdi, 0x10(%rsp)
movb %cl, %al
movq %rdi, %rcx
movq %rcx, 0x8(%rsp)
movq %rdi, 0x60(%rsp)
movq %rsi, 0x50(%rsp)
movq %rdx, 0x58(%rsp)
andb $0x1, %al
movb %al, 0x4f(%rsp)
movb $0x0, 0x4e(%rsp)
callq 0x1c50a0
leaq 0x50(%rsp), %rdi
callq 0x1dbde0
movq 0x10(%rsp), %rdi
leaq (%rax,%rax,2), %rsi
callq 0x1d5440
jmp 0x2542cc
leaq 0x50(%rsp), %rax
movq %rax, 0x30(%rsp)
movq 0x30(%rsp), %rdi
callq 0x1dec90
movq %rax, 0x28(%rsp)
movq 0x30(%rsp), %rdi
callq 0x1d0ba0
movq %rax, 0x20(%rsp)
movq 0x28(%rsp), %rax
cmpq 0x20(%rsp), %rax
je 0x25441c
movq 0x28(%rsp), %rax
movb (%rax), %al
movb %al, 0x1f(%rsp)
movzbl 0x1f(%rsp), %edi
callq 0x1cb7d0
cmpl $0x0, %eax
jne 0x254346
movzbl 0x1f(%rsp), %eax
cmpl $0x2d, %eax
je 0x254346
movzbl 0x1f(%rsp), %eax
cmpl $0x5f, %eax
je 0x254346
movzbl 0x1f(%rsp), %eax
cmpl $0x2e, %eax
je 0x254346
movzbl 0x1f(%rsp), %eax
cmpl $0x7e, %eax
jne 0x254379
movq 0x10(%rsp), %rdi
movsbl 0x1f(%rsp), %esi
callq 0x1c3920
jmp 0x254357
jmp 0x254407
movq 0x10(%rsp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x40(%rsp)
movl %eax, 0x3c(%rsp)
callq 0x1e03b0
jmp 0x25443c
movzbl 0x1f(%rsp), %eax
cmpl $0x20, %eax
jne 0x254396
movq 0x10(%rsp), %rdi
movl $0x2b, %esi
callq 0x1c3920
jmp 0x254394
jmp 0x254405
movq 0x10(%rsp), %rdi
movl $0x25, %esi
callq 0x1c3920
jmp 0x2543a7
movzbl 0x1f(%rsp), %edi
shrl $0x4, %edi
movzbl 0x4f(%rsp), %esi
andl $0x1, %esi
callq 0x292880
movb %al, 0x7(%rsp)
jmp 0x2543c2
movq 0x10(%rsp), %rdi
movb 0x7(%rsp), %al
movsbl %al, %esi
callq 0x1c3920
jmp 0x2543d5
movzbl 0x1f(%rsp), %edi
andl $0xf, %edi
movzbl 0x4f(%rsp), %esi
andl $0x1, %esi
callq 0x292880
movb %al, 0x6(%rsp)
jmp 0x2543f0
movq 0x10(%rsp), %rdi
movb 0x6(%rsp), %al
movsbl %al, %esi
callq 0x1c3920
jmp 0x254403
jmp 0x254405
jmp 0x254407
jmp 0x254409
movq 0x28(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x28(%rsp)
jmp 0x2542f4
movb $0x1, 0x4e(%rsp)
testb $0x1, 0x4e(%rsp)
jne 0x254432
movq 0x10(%rsp), %rdi
callq 0x1e03b0
movq 0x8(%rsp), %rax
addq $0x68, %rsp
retq
movq 0x40(%rsp), %rdi
callq 0x1d0790
nopw %cs:(%rax,%rax)
| _ZN5aimrt6common4util9UrlEncodeB5cxx11ESt17basic_string_viewIcSt11char_traitsIcEEb:
sub rsp, 68h
mov [rsp+68h+var_58], rdi
mov al, cl
mov rcx, rdi
mov [rsp+68h+var_60], rcx
mov [rsp+68h+var_8], rdi
mov [rsp+68h+var_18], rsi
mov [rsp+68h+var_10], rdx
and al, 1
mov [rsp+68h+var_19], al
mov [rsp+68h+var_1A], 0
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2Ev; std::string::basic_string(void)
lea rdi, [rsp+68h+var_18]
call __ZNKSt17basic_string_viewIcSt11char_traitsIcEE6lengthEv; std::string_view::length(void)
mov rdi, [rsp+68h+var_58]
lea rsi, [rax+rax*2]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7reserveEm; std::string::reserve(ulong)
jmp short $+2
loc_2542CC:
lea rax, [rsp+68h+var_18]
mov [rsp+68h+var_38], rax
mov rdi, [rsp+68h+var_38]
call __ZNKSt17basic_string_viewIcSt11char_traitsIcEE5beginEv; std::string_view::begin(void)
mov [rsp+68h+var_40], rax
mov rdi, [rsp+68h+var_38]
call __ZNKSt17basic_string_viewIcSt11char_traitsIcEE3endEv; std::string_view::end(void)
mov [rsp+68h+var_48], rax
loc_2542F4:
mov rax, [rsp+68h+var_40]
cmp rax, [rsp+68h+var_48]
jz loc_25441C
mov rax, [rsp+68h+var_40]
mov al, [rax]
mov [rsp+68h+var_49], al
movzx edi, [rsp+68h+var_49]
call _isalnum
cmp eax, 0
jnz short loc_254346
movzx eax, [rsp+68h+var_49]
cmp eax, 2Dh ; '-'
jz short loc_254346
movzx eax, [rsp+68h+var_49]
cmp eax, 5Fh ; '_'
jz short loc_254346
movzx eax, [rsp+68h+var_49]
cmp eax, 2Eh ; '.'
jz short loc_254346
movzx eax, [rsp+68h+var_49]
cmp eax, 7Eh ; '~'
jnz short loc_254379
loc_254346:
mov rdi, [rsp+68h+var_58]
movsx esi, [rsp+68h+var_49]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEpLEc; std::string::operator+=(char)
jmp short $+2
loc_254357:
jmp loc_254407
mov rdi, [rsp+arg_8]; void *
mov rcx, rax
mov eax, edx
mov [rsp+arg_38], rcx
mov [rsp+arg_34], eax
call j__ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
jmp loc_25443C
loc_254379:
movzx eax, [rsp+68h+var_49]
cmp eax, 20h ; ' '
jnz short loc_254396
mov rdi, [rsp+68h+var_58]
mov esi, 2Bh ; '+'
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEpLEc; std::string::operator+=(char)
jmp short $+2
loc_254394:
jmp short loc_254405
loc_254396:
mov rdi, [rsp+68h+var_58]
mov esi, 25h ; '%'
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEpLEc; std::string::operator+=(char)
jmp short $+2
loc_2543A7:
movzx edi, [rsp+68h+var_49]
shr edi, 4; this
movzx esi, [rsp+68h+var_19]
and esi, 1; unsigned __int8
call _ZN5aimrt6common4util5ToHexEhb; aimrt::common::util::ToHex(uchar,bool)
mov [rsp+68h+var_61], al
jmp short $+2
loc_2543C2:
mov rdi, [rsp+68h+var_58]
mov al, [rsp+68h+var_61]
movsx esi, al
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEpLEc; std::string::operator+=(char)
jmp short $+2
loc_2543D5:
movzx edi, [rsp+68h+var_49]
and edi, 0Fh; this
movzx esi, [rsp+68h+var_19]
and esi, 1; unsigned __int8
call _ZN5aimrt6common4util5ToHexEhb; aimrt::common::util::ToHex(uchar,bool)
mov [rsp+68h+var_62], al
jmp short $+2
loc_2543F0:
mov rdi, [rsp+68h+var_58]
mov al, [rsp+68h+var_62]
movsx esi, al
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEpLEc; std::string::operator+=(char)
jmp short $+2
loc_254403:
jmp short $+2
loc_254405:
jmp short $+2
loc_254407:
jmp short $+2
loc_254409:
mov rax, [rsp+68h+var_40]
add rax, 1
mov [rsp+68h+var_40], rax
jmp loc_2542F4
loc_25441C:
mov [rsp+68h+var_1A], 1
test [rsp+68h+var_1A], 1
jnz short loc_254432
mov rdi, [rsp+68h+var_58]; void *
call j__ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
loc_254432:
mov rax, [rsp+68h+var_60]
add rsp, 68h
retn
loc_25443C:
mov rdi, [rsp+arg_38]
call __Unwind_Resume
| long long aimrt::common::util::UrlEncode[abi:cxx11](long long a1, long long a2, long long a3, char a4)
{
long long v4; // rax
bool v5; // dl
bool v6; // dl
char v8; // [rsp+6h] [rbp-62h]
char v9; // [rsp+7h] [rbp-61h]
unsigned __int8 v10; // [rsp+1Fh] [rbp-49h]
long long v11; // [rsp+20h] [rbp-48h]
unsigned __int8 *v12; // [rsp+28h] [rbp-40h]
char v13; // [rsp+4Fh] [rbp-19h]
_QWORD v14[3]; // [rsp+50h] [rbp-18h] BYREF
v14[2] = a1;
v14[0] = a2;
v14[1] = a3;
v13 = a4 & 1;
std::string::basic_string(a1);
v4 = std::string_view::length(v14);
std::string::reserve(a1, 3 * v4);
v12 = (unsigned __int8 *)std::string_view::begin(v14);
v11 = std::string_view::end(v14);
while ( v12 != (unsigned __int8 *)v11 )
{
v10 = *v12;
if ( (unsigned int)isalnum(*v12) || v10 == 45 || v10 == 95 || v10 == 46 || v10 == 126 )
{
std::string::operator+=(a1, (unsigned int)(char)v10);
}
else if ( v10 == 32 )
{
std::string::operator+=(a1, 43LL);
}
else
{
std::string::operator+=(a1, 37LL);
v9 = aimrt::common::util::ToHex((aimrt::common::util *)(v10 >> 4), v13 & 1, v5);
std::string::operator+=(a1, (unsigned int)v9);
v8 = aimrt::common::util::ToHex((aimrt::common::util *)(v10 & 0xF), v13 & 1, v6);
std::string::operator+=(a1, (unsigned int)v8);
}
++v12;
}
return a1;
}
| |||
47,802 | aimrt::common::util::UrlEncode[abi:cxx11](std::basic_string_view<char, std::char_traits<char>>, bool) | aimrt_mujoco_sim/_deps/aimrt-src/src/common/net/../util/url_encode.h | inline std::string UrlEncode(std::string_view str, bool up = true) {
std::string ret_str;
ret_str.reserve(str.length() * 3);
for (unsigned char c : str) {
if (std::isalnum(c) || c == '-' || c == '_' || c == '.' || c == '~') {
ret_str += static_cast<char>(c);
} else if (c == ' ') {
ret_str += '+';
} else {
ret_str += '%';
ret_str += static_cast<char>(ToHex(c >> 4, up));
ret_str += static_cast<char>(ToHex(c & 0xF, up));
}
}
return ret_str;
} | O3 | c | aimrt::common::util::UrlEncode[abi:cxx11](std::basic_string_view<char, std::char_traits<char>>, bool):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movl %ecx, %r14d
movq %rdx, %r15
movq %rsi, %r12
movq %rdi, %rbx
leaq 0x10(%rdi), %rax
movq %rax, 0x8(%rsp)
movq %rax, (%rdi)
movq $0x0, 0x8(%rdi)
movb $0x0, 0x10(%rdi)
leaq (%rsi,%rsi,2), %rsi
callq 0x92490
testq %r12, %r12
je 0xb4eda
xorb $0x1, %r14b
shlb $0x5, %r14b
addb $0x37, %r14b
movq %r14, 0x10(%rsp)
xorl %ebp, %ebp
movb (%r15,%rbp), %r14b
movzbl %r14b, %r13d
movl %r13d, %edi
callq 0x92810
testl %eax, %eax
je 0xb4e5f
movl %r14d, %eax
movsbl %al, %esi
movq %rbx, %rdi
callq 0x906f0
incq %rbp
cmpq %rbp, %r12
jne 0xb4e33
jmp 0xb4eda
cmpl $0x5e, %r13d
jg 0xb4e78
leal -0x2d(%r13), %eax
cmpl $0x2, %eax
jb 0xb4e47
movb $0x2b, %al
cmpl $0x20, %r13d
je 0xb4e4a
jmp 0xb4e84
cmpl $0x7e, %r13d
je 0xb4e47
cmpl $0x5f, %r13d
je 0xb4e47
movq %rbx, %rdi
movl $0x25, %esi
callq 0x906f0
movl %r14d, %eax
shrb $0x4, %al
movq 0x10(%rsp), %rcx
addl %eax, %ecx
orb $0x30, %al
cmpb $-0x60, %r14b
movzbl %cl, %ecx
movzbl %al, %eax
cmovael %ecx, %eax
movzbl %al, %esi
movq %rbx, %rdi
callq 0x906f0
andb $0xf, %r14b
movq 0x10(%rsp), %rax
addl %r14d, %eax
leal 0x30(%r14), %ecx
cmpb $0xa, %r14b
movzbl %al, %edx
movzbl %cl, %eax
cmovael %edx, %eax
jmp 0xb4e4a
movq %rbx, %rax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0xb4eee
movq %rax, %r14
movq (%rbx), %rdi
cmpq 0x8(%rsp), %rdi
je 0xb4f0b
movq 0x8(%rsp), %rax
movq (%rax), %rsi
incq %rsi
callq 0x927a0
movq %r14, %rdi
callq 0x945e0
nop
| _ZN5aimrt6common4util9UrlEncodeB5cxx11ESt17basic_string_viewIcSt11char_traitsIcEEb:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 18h
mov r14d, ecx
mov r15, rdx
mov r12, rsi
mov rbx, rdi
lea rax, [rdi+10h]
mov [rsp+48h+var_40], rax
mov [rdi], rax
mov qword ptr [rdi+8], 0
mov byte ptr [rdi+10h], 0
lea rsi, [rsi+rsi*2]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7reserveEm; std::string::reserve(ulong)
test r12, r12
jz loc_B4EDA
xor r14b, 1
shl r14b, 5
add r14b, 37h ; '7'
mov [rsp+48h+var_38], r14
xor ebp, ebp
loc_B4E33:
mov r14b, [r15+rbp]
movzx r13d, r14b
mov edi, r13d
call _isalnum
test eax, eax
jz short loc_B4E5F
loc_B4E47:
mov eax, r14d
loc_B4E4A:
movsx esi, al
mov rdi, rbx
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9push_backEc; std::string::push_back(char)
inc rbp
cmp r12, rbp
jnz short loc_B4E33
jmp short loc_B4EDA
loc_B4E5F:
cmp r13d, 5Eh ; '^'
jg short loc_B4E78
lea eax, [r13-2Dh]
cmp eax, 2
jb short loc_B4E47
mov al, 2Bh ; '+'
cmp r13d, 20h ; ' '
jz short loc_B4E4A
jmp short loc_B4E84
loc_B4E78:
cmp r13d, 7Eh ; '~'
jz short loc_B4E47
cmp r13d, 5Fh ; '_'
jz short loc_B4E47
loc_B4E84:
mov rdi, rbx
mov esi, 25h ; '%'
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9push_backEc; std::string::push_back(char)
mov eax, r14d
shr al, 4
mov rcx, [rsp+48h+var_38]
add ecx, eax
or al, 30h
cmp r14b, 0A0h
movzx ecx, cl
movzx eax, al
cmovnb eax, ecx
movzx esi, al
mov rdi, rbx
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9push_backEc; std::string::push_back(char)
and r14b, 0Fh
mov rax, [rsp+48h+var_38]
add eax, r14d
lea ecx, [r14+30h]
cmp r14b, 0Ah
movzx edx, al
movzx eax, cl
cmovnb eax, edx
jmp loc_B4E4A
loc_B4EDA:
mov rax, rbx
add rsp, 18h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
jmp short $+2
loc_B4EEE:
mov r14, rax
mov rdi, [rbx]; void *
cmp rdi, [rsp+arg_0]
jz short loc_B4F0B
mov rax, [rsp+arg_0]
mov rsi, [rax]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_B4F0B:
mov rdi, r14
call __Unwind_Resume
| long long aimrt::common::util::UrlEncode[abi:cxx11](long long a1, long long a2, long long a3, char a4)
{
long long v6; // rbp
unsigned __int8 v7; // r14
char v8; // al
unsigned __int8 v9; // al
unsigned __int8 v10; // r14
char v12; // [rsp+10h] [rbp-38h]
*(_QWORD *)a1 = a1 + 16;
*(_QWORD *)(a1 + 8) = 0LL;
*(_BYTE *)(a1 + 16) = 0;
std::string::reserve(a1, 3 * a2);
if ( a2 )
{
v12 = 32 * (a4 ^ 1) + 55;
v6 = 0LL;
while ( 1 )
{
v7 = *(_BYTE *)(a3 + v6);
if ( (unsigned int)isalnum(v7) )
goto LABEL_4;
if ( v7 > 0x5Eu )
break;
if ( (unsigned int)v7 - 45 < 2 )
goto LABEL_4;
v8 = 43;
if ( v7 != 32 )
goto LABEL_13;
LABEL_5:
std::string::push_back(a1, (unsigned int)v8);
if ( a2 == ++v6 )
return a1;
}
if ( v7 != 126 && v7 != 95 )
{
LABEL_13:
std::string::push_back(a1, 37LL);
v9 = (v7 >> 4) | 0x30;
if ( v7 >= 0xA0u )
v9 = (v7 >> 4) + v12;
std::string::push_back(a1, v9);
v10 = v7 & 0xF;
v8 = v10 + 48;
if ( v10 >= 0xAu )
v8 = v10 + v12;
goto LABEL_5;
}
LABEL_4:
v8 = v7;
goto LABEL_5;
}
return a1;
}
| UrlEncode[abi:cxx11]:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x18
MOV R14D,ECX
MOV R15,RDX
MOV R12,RSI
MOV RBX,RDI
LEA RAX,[RDI + 0x10]
MOV qword ptr [RSP + 0x8],RAX
MOV qword ptr [RDI],RAX
MOV qword ptr [RDI + 0x8],0x0
MOV byte ptr [RDI + 0x10],0x0
LEA RSI,[RSI + RSI*0x2]
LAB_001b4e12:
CALL 0x00192490
TEST R12,R12
JZ 0x001b4eda
XOR R14B,0x1
SHL R14B,0x5
ADD R14B,0x37
MOV qword ptr [RSP + 0x10],R14
XOR EBP,EBP
LAB_001b4e33:
MOV R14B,byte ptr [R15 + RBP*0x1]
MOVZX R13D,R14B
MOV EDI,R13D
CALL 0x00192810
TEST EAX,EAX
JZ 0x001b4e5f
LAB_001b4e47:
MOV EAX,R14D
LAB_001b4e4a:
MOVSX ESI,AL
MOV RDI,RBX
CALL 0x001906f0
INC RBP
CMP R12,RBP
JNZ 0x001b4e33
JMP 0x001b4eda
LAB_001b4e5f:
CMP R13D,0x5e
JG 0x001b4e78
LEA EAX,[R13 + -0x2d]
CMP EAX,0x2
JC 0x001b4e47
MOV AL,0x2b
CMP R13D,0x20
JZ 0x001b4e4a
JMP 0x001b4e84
LAB_001b4e78:
CMP R13D,0x7e
JZ 0x001b4e47
CMP R13D,0x5f
JZ 0x001b4e47
LAB_001b4e84:
MOV RDI,RBX
MOV ESI,0x25
CALL 0x001906f0
MOV EAX,R14D
SHR AL,0x4
MOV RCX,qword ptr [RSP + 0x10]
ADD ECX,EAX
OR AL,0x30
CMP R14B,0xa0
MOVZX ECX,CL
MOVZX EAX,AL
CMOVNC EAX,ECX
MOVZX ESI,AL
MOV RDI,RBX
CALL 0x001906f0
LAB_001b4eb8:
AND R14B,0xf
MOV RAX,qword ptr [RSP + 0x10]
ADD EAX,R14D
LEA ECX,[R14 + 0x30]
CMP R14B,0xa
MOVZX EDX,AL
MOVZX EAX,CL
CMOVNC EAX,EDX
JMP 0x001b4e4a
LAB_001b4eda:
MOV RAX,RBX
ADD RSP,0x18
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
/* aimrt::common::util::UrlEncode[abi:cxx11](std::basic_string_view<char, std::char_traits<char> >,
bool) */
string * aimrt::common::util::UrlEncode_abi_cxx11_
(string *param_1,long param_2,long param_3,byte param_4)
{
byte bVar1;
char cVar2;
byte bVar3;
int iVar4;
long lVar5;
uint uVar6;
char cVar7;
*(string **)param_1 = param_1 + 0x10;
*(int8 *)(param_1 + 8) = 0;
param_1[0x10] = (string)0x0;
/* try { // try from 001b4e12 to 001b4e16 has its CatchHandler @ 001b4eec */
std::__cxx11::string::reserve(param_1,param_2 * 3);
if (param_2 != 0) {
cVar7 = (param_4 ^ 1) * ' ' + '7';
lVar5 = 0;
do {
bVar1 = *(byte *)(param_3 + lVar5);
uVar6 = (uint)bVar1;
iVar4 = isalnum(uVar6);
bVar3 = bVar1;
if (iVar4 == 0) {
if (bVar1 < 0x5f) {
if ((1 < uVar6 - 0x2d) && (bVar3 = 0x2b, uVar6 != 0x20)) {
LAB_001b4e84:
std::__cxx11::string::push_back(param_1,'%');
bVar3 = bVar1 >> 4 | 0x30;
if (0x9f < bVar1) {
bVar3 = cVar7 + (bVar1 >> 4);
}
std::__cxx11::string::push_back(param_1,bVar3);
cVar2 = '0';
if (9 < (bVar1 & 0xf)) {
cVar2 = cVar7;
}
bVar3 = (bVar1 & 0xf) + cVar2;
}
}
else if ((uVar6 != 0x7e) && (uVar6 != 0x5f)) goto LAB_001b4e84;
}
/* try { // try from 001b4e4a to 001b4eb7 has its CatchHandler @ 001b4eee */
std::__cxx11::string::push_back(param_1,bVar3);
lVar5 = lVar5 + 1;
} while (param_2 != lVar5);
}
return param_1;
}
| |
47,803 | Catch::Matchers::SizeIs(unsigned long) | AlayaLite/build_O3/_deps/libcoro-src/test/catch_amalgamated.cpp | HasSizeMatcher SizeIs(std::size_t sz) {
return HasSizeMatcher{ sz };
} | O3 | cpp | Catch::Matchers::SizeIs(unsigned long):
movq %rdi, %rax
leaq 0x18(%rdi), %rcx
movq %rcx, 0x8(%rdi)
movq $0x0, 0x10(%rdi)
movb $0x0, 0x18(%rdi)
leaq 0xc98a9(%rip), %rcx # 0x12e318
addq $0x10, %rcx
movq %rcx, (%rdi)
movq %rsi, 0x28(%rdi)
retq
nop
| _ZN5Catch8Matchers6SizeIsEm:
mov rax, rdi
lea rcx, [rdi+18h]
mov [rdi+8], rcx
mov qword ptr [rdi+10h], 0
mov byte ptr [rdi+18h], 0
lea rcx, _ZTVN5Catch8Matchers14HasSizeMatcherE; `vtable for'Catch::Matchers::HasSizeMatcher
add rcx, 10h
mov [rdi], rcx
mov [rdi+28h], rsi
retn
| Catch::Matchers * Catch::Matchers::SizeIs(Catch::Matchers *this, long long a2)
{
Catch::Matchers *result; // rax
result = this;
*((_QWORD *)this + 1) = (char *)this + 24;
*((_QWORD *)this + 2) = 0LL;
*((_BYTE *)this + 24) = 0;
*(_QWORD *)this = &`vtable for'Catch::Matchers::HasSizeMatcher + 2;
*((_QWORD *)this + 5) = a2;
return result;
}
| SizeIs:
MOV RAX,RDI
LEA RCX,[RDI + 0x18]
MOV qword ptr [RDI + 0x8],RCX
MOV qword ptr [RDI + 0x10],0x0
MOV byte ptr [RDI + 0x18],0x0
LEA RCX,[0x22e318]
ADD RCX,0x10
MOV qword ptr [RDI],RCX
MOV qword ptr [RDI + 0x28],RSI
RET
|
/* Catch::Matchers::SizeIs(unsigned long) */
Matchers * __thiscall Catch::Matchers::SizeIs(Matchers *this,ulong param_1)
{
*(Matchers **)(this + 8) = this + 0x18;
*(int8 *)(this + 0x10) = 0;
this[0x18] = (Matchers)0x0;
*(int ***)this = &PTR__MatcherUntypedBase_0022e328;
*(ulong *)(this + 0x28) = param_1;
return this;
}
| |
47,804 | ggml_vec_dot_tq2_0_q8_K | monkey531[P]llama/ggml/src/ggml-cpu/ggml-cpu-quants.c | void ggml_vec_dot_tq2_0_q8_K(int n, float * restrict s, size_t bs, const void * restrict vx, size_t bx, const void * restrict vy, size_t by, int nrc) {
assert(nrc == 1);
UNUSED(nrc);
UNUSED(bx);
UNUSED(by);
UNUSED(bs);
const block_tq2_0 * restrict x = vx;
const block_q8_K * restrict y = vy;
const int nb = n / QK_K;
#if defined(__ARM_NEON)
float sumf = 0.0f;
const uint8x16_t m3 = vdupq_n_u8(3);
for (int i = 0; i < nb; ++i) {
#if defined(__ARM_FEATURE_DOTPROD)
int32x4_t sumi0 = vdupq_n_s32(0);
int32x4_t sumi1 = vdupq_n_s32(0);
#else
int16x8_t sumi0 = vdupq_n_s16(0);
int16x8_t sumi1 = vdupq_n_s16(0);
#endif
for (size_t j = 0; j < sizeof(x->qs); j += 32) {
uint8x16_t qx0 = vld1q_u8(x[i].qs + j);
uint8x16_t qx1 = vld1q_u8(x[i].qs + j + 16);
uint8x16_t qx2 = vshrq_n_u8(qx0, 2);
uint8x16_t qx3 = vshrq_n_u8(qx1, 2);
uint8x16_t qx4 = vshrq_n_u8(qx0, 4);
uint8x16_t qx5 = vshrq_n_u8(qx1, 4);
uint8x16_t qx6 = vshrq_n_u8(qx0, 6);
uint8x16_t qx7 = vshrq_n_u8(qx1, 6);
int8x16_t sqx0 = vreinterpretq_s8_u8(vandq_u8(qx0, m3));
int8x16_t sqx1 = vreinterpretq_s8_u8(vandq_u8(qx1, m3));
int8x16_t sqx2 = vreinterpretq_s8_u8(vandq_u8(qx2, m3));
int8x16_t sqx3 = vreinterpretq_s8_u8(vandq_u8(qx3, m3));
int8x16_t sqx4 = vreinterpretq_s8_u8(vandq_u8(qx4, m3));
int8x16_t sqx5 = vreinterpretq_s8_u8(vandq_u8(qx5, m3));
int8x16_t sqx6 = vreinterpretq_s8_u8(vandq_u8(qx6, m3));
int8x16_t sqx7 = vreinterpretq_s8_u8(vandq_u8(qx7, m3));
const int8x16_t qy0 = vld1q_s8(y[i].qs + j*4 + 0);
const int8x16_t qy1 = vld1q_s8(y[i].qs + j*4 + 16);
const int8x16_t qy2 = vld1q_s8(y[i].qs + j*4 + 32);
const int8x16_t qy3 = vld1q_s8(y[i].qs + j*4 + 48);
const int8x16_t qy4 = vld1q_s8(y[i].qs + j*4 + 64);
const int8x16_t qy5 = vld1q_s8(y[i].qs + j*4 + 80);
const int8x16_t qy6 = vld1q_s8(y[i].qs + j*4 + 96);
const int8x16_t qy7 = vld1q_s8(y[i].qs + j*4 + 112);
#if defined(__ARM_FEATURE_DOTPROD)
sumi0 = vdotq_s32(sumi0, sqx0, qy0);
sumi1 = vdotq_s32(sumi1, sqx1, qy1);
sumi0 = vdotq_s32(sumi0, sqx2, qy2);
sumi1 = vdotq_s32(sumi1, sqx3, qy3);
sumi0 = vdotq_s32(sumi0, sqx4, qy4);
sumi1 = vdotq_s32(sumi1, sqx5, qy5);
sumi0 = vdotq_s32(sumi0, sqx6, qy6);
sumi1 = vdotq_s32(sumi1, sqx7, qy7);
#else
sumi0 = vmlal_s8(sumi0, vget_low_s8(sqx0), vget_low_s8(qy0));
sumi1 = vmlal_s8(sumi1, vget_high_s8(sqx0), vget_high_s8(qy0));
sumi0 = vmlal_s8(sumi0, vget_low_s8(sqx1), vget_low_s8(qy1));
sumi1 = vmlal_s8(sumi1, vget_high_s8(sqx1), vget_high_s8(qy1));
sumi0 = vmlal_s8(sumi0, vget_low_s8(sqx2), vget_low_s8(qy2));
sumi1 = vmlal_s8(sumi1, vget_high_s8(sqx2), vget_high_s8(qy2));
sumi0 = vmlal_s8(sumi0, vget_low_s8(sqx3), vget_low_s8(qy3));
sumi1 = vmlal_s8(sumi1, vget_high_s8(sqx3), vget_high_s8(qy3));
sumi0 = vmlal_s8(sumi0, vget_low_s8(sqx4), vget_low_s8(qy4));
sumi1 = vmlal_s8(sumi1, vget_high_s8(sqx4), vget_high_s8(qy4));
sumi0 = vmlal_s8(sumi0, vget_low_s8(sqx5), vget_low_s8(qy5));
sumi1 = vmlal_s8(sumi1, vget_high_s8(sqx5), vget_high_s8(qy5));
sumi0 = vmlal_s8(sumi0, vget_low_s8(sqx6), vget_low_s8(qy6));
sumi1 = vmlal_s8(sumi1, vget_high_s8(sqx6), vget_high_s8(qy6));
sumi0 = vmlal_s8(sumi0, vget_low_s8(sqx7), vget_low_s8(qy7));
sumi1 = vmlal_s8(sumi1, vget_high_s8(sqx7), vget_high_s8(qy7));
#endif
}
const int16x8_t ysum0 = vld1q_s16(y[i].bsums);
const int16x8_t ysum1 = vld1q_s16(y[i].bsums + 8);
const float d = GGML_FP16_TO_FP32(x[i].d) * y[i].d;
#if defined(__ARM_FEATURE_DOTPROD)
sumi0 = vaddq_s32(sumi0, sumi1);
sumi0 = vsubq_s32(sumi0, vpaddlq_s16(vaddq_s16(ysum0, ysum1)));
sumf += d * (float) vaddvq_s32(sumi0);
#else
sumi0 = vaddq_s16(sumi0, sumi1);
sumi0 = vsubq_s16(sumi0, vaddq_s16(ysum0, ysum1));
sumf += d * (float) vaddlvq_s16(sumi0);
#endif
}
*s = sumf;
#elif defined(__AVX2__)
__m256 sumf = _mm256_setzero_ps();
for (int i = 0; i < nb; ++i) {
// 16-bit sums, because 256*127 still fits
__m256i sumi0 = _mm256_setzero_si256();
__m256i sumi1 = _mm256_setzero_si256();
for (size_t j = 0; j < sizeof(x->qs); j += 32) {
__m256i qx0 = _mm256_loadu_si256((const __m256i *) (x[i].qs + j));
__m256i qx1 = _mm256_srli_epi16(qx0, 2);
__m256i qx2 = _mm256_srli_epi16(qx0, 4);
__m256i qx3 = _mm256_srli_epi16(qx0, 6);
// 0, 1, 2 (should not be 3)
qx0 = _mm256_and_si256(qx0, _mm256_set1_epi8(3));
qx1 = _mm256_and_si256(qx1, _mm256_set1_epi8(3));
qx2 = _mm256_and_si256(qx2, _mm256_set1_epi8(3));
qx3 = _mm256_and_si256(qx3, _mm256_set1_epi8(3));
const __m256i qy0 = _mm256_loadu_si256((const __m256i *) (y[i].qs + j*4 + 0));
const __m256i qy1 = _mm256_loadu_si256((const __m256i *) (y[i].qs + j*4 + 32));
const __m256i qy2 = _mm256_loadu_si256((const __m256i *) (y[i].qs + j*4 + 64));
const __m256i qy3 = _mm256_loadu_si256((const __m256i *) (y[i].qs + j*4 + 96));
qx0 = _mm256_maddubs_epi16(qx0, qy0);
qx1 = _mm256_maddubs_epi16(qx1, qy1);
qx2 = _mm256_maddubs_epi16(qx2, qy2);
qx3 = _mm256_maddubs_epi16(qx3, qy3);
sumi0 = _mm256_add_epi16(sumi0, _mm256_add_epi16(qx0, qx1));
sumi1 = _mm256_add_epi16(sumi1, _mm256_add_epi16(qx2, qx3));
}
const __m256i ysum = _mm256_loadu_si256((const __m256i *) y[i].bsums);
const __m256 d = _mm256_set1_ps(y[i].d * GGML_FP16_TO_FP32(x[i].d));
sumi0 = _mm256_add_epi16(sumi0, sumi1);
sumi0 = _mm256_sub_epi16(sumi0, ysum);
sumi0 = _mm256_madd_epi16(sumi0, _mm256_set1_epi16(1));
sumf = _mm256_add_ps(_mm256_mul_ps(_mm256_cvtepi32_ps(sumi0), d), sumf);
}
*s = hsum_float_8(sumf);
#else
float sumf = 0.0f;
for (int i = 0; i < nb; ++i) {
int32_t sumi = 0;
for (size_t j = 0; j < sizeof(x->qs); j += 32) {
for (size_t l = 0; l < 4; ++l) {
for (size_t k = 0; k < 32; ++k) {
sumi += y[i].qs[j*4 + l*32 + k] * (((x[i].qs[j + k] >> (l*2)) & 3) - 1);
}
}
}
const float d = y[i].d * GGML_FP16_TO_FP32(x[i].d);
sumf += (float) sumi * d;
}
*s = sumf;
#endif
} | O2 | c | ggml_vec_dot_tq2_0_q8_K:
pushq %r14
pushq %rbx
movl %edi, %eax
movl $0x100, %edi # imm = 0x100
cltd
idivl %edi
movl %eax, %edx
sarl $0x1f, %edx
andnl %eax, %edx, %eax
leaq 0x64(%r9), %rdx
vxorps %xmm0, %xmm0, %xmm0
xorl %edi, %edi
vpbroadcastb 0x1ac2f(%rip), %ymm1 # 0x484f8
movq 0x2b6a0(%rip), %r8 # 0x58f70
vpbroadcastw 0x1ac1d(%rip), %ymm2 # 0x484f6
movl $0x124, %r10d # imm = 0x124
movq %rcx, %r11
cmpq %rax, %rdi
je 0x2d9a0
vpxor %xmm3, %xmm3, %xmm3
xorl %ebx, %ebx
vpxor %xmm4, %xmm4, %xmm4
cmpq $0x40, %rbx
jae 0x2d951
vmovdqu (%r11,%rbx), %ymm5
vpsrlw $0x2, %ymm5, %ymm6
vpsrlw $0x4, %ymm5, %ymm7
vpsrlw $0x6, %ymm5, %ymm8
vpand %ymm1, %ymm5, %ymm5
vpmaddubsw -0x60(%rdx,%rbx,4), %ymm5, %ymm5
vpand %ymm1, %ymm6, %ymm6
vpmaddubsw -0x40(%rdx,%rbx,4), %ymm6, %ymm6
vpand %ymm1, %ymm7, %ymm7
vpmaddubsw -0x20(%rdx,%rbx,4), %ymm7, %ymm7
vpand %ymm1, %ymm8, %ymm8
vpmaddubsw (%rdx,%rbx,4), %ymm8, %ymm8
vpaddw %ymm4, %ymm5, %ymm4
vpaddw %ymm6, %ymm4, %ymm4
vpaddw %ymm3, %ymm7, %ymm3
vpaddw %ymm3, %ymm8, %ymm3
addq $0x20, %rbx
jmp 0x2d8f5
imulq $0x124, %rdi, %rbx # imm = 0x124
vmovss (%r9,%rbx), %xmm5
imulq $0x42, %rdi, %r14
movzwl 0x40(%rcx,%r14), %r14d
vmulss (%r8,%r14,4), %xmm5, %xmm5
vbroadcastss %xmm5, %ymm5
vpaddw %ymm3, %ymm4, %ymm3
vpsubw 0x104(%r9,%rbx), %ymm3, %ymm3
vpmaddwd %ymm2, %ymm3, %ymm3
vcvtdq2ps %ymm3, %ymm3
vmulps %ymm3, %ymm5, %ymm3
vaddps %ymm3, %ymm0, %ymm0
incq %rdi
addq %r10, %rdx
addq $0x42, %r11
jmp 0x2d8e2
vextractf128 $0x1, %ymm0, %xmm1
vaddps %xmm0, %xmm1, %xmm0
vshufpd $0x1, %xmm0, %xmm0, %xmm1 # xmm1 = xmm0[1,0]
vaddps %xmm1, %xmm0, %xmm0
vhaddps %xmm0, %xmm0, %xmm0
vmovss %xmm0, (%rsi)
popq %rbx
popq %r14
vzeroupper
retq
| ggml_vec_dot_tq2_0_q8_K:
push r14
push rbx
mov eax, edi
mov edi, 100h
cdq
idiv edi
mov edx, eax
sar edx, 1Fh
andn eax, edx, eax
lea rdx, [r9+64h]
vxorps xmm0, xmm0, xmm0
xor edi, edi
vpbroadcastb ymm1, cs:byte_484F8
mov r8, cs:ggml_table_f32_f16_ptr
vpbroadcastw ymm2, cs:word_484F6
mov r10d, 124h
mov r11, rcx
loc_2D8E2:
cmp rdi, rax
jz loc_2D9A0
vpxor xmm3, xmm3, xmm3
xor ebx, ebx
vpxor xmm4, xmm4, xmm4
loc_2D8F5:
cmp rbx, 40h ; '@'
jnb short loc_2D951
vmovdqu ymm5, ymmword ptr [r11+rbx]
vpsrlw ymm6, ymm5, 2
vpsrlw ymm7, ymm5, 4
vpsrlw ymm8, ymm5, 6
vpand ymm5, ymm5, ymm1
vpmaddubsw ymm5, ymm5, ymmword ptr [rdx+rbx*4-60h]
vpand ymm6, ymm6, ymm1
vpmaddubsw ymm6, ymm6, ymmword ptr [rdx+rbx*4-40h]
vpand ymm7, ymm7, ymm1
vpmaddubsw ymm7, ymm7, ymmword ptr [rdx+rbx*4-20h]
vpand ymm8, ymm8, ymm1
vpmaddubsw ymm8, ymm8, ymmword ptr [rdx+rbx*4]
vpaddw ymm4, ymm5, ymm4
vpaddw ymm4, ymm4, ymm6
vpaddw ymm3, ymm7, ymm3
vpaddw ymm3, ymm8, ymm3
add rbx, 20h ; ' '
jmp short loc_2D8F5
loc_2D951:
imul rbx, rdi, 124h
vmovss xmm5, dword ptr [r9+rbx]
imul r14, rdi, 42h ; 'B'
movzx r14d, word ptr [rcx+r14+40h]
vmulss xmm5, xmm5, dword ptr [r8+r14*4]
vbroadcastss ymm5, xmm5
vpaddw ymm3, ymm4, ymm3
vpsubw ymm3, ymm3, ymmword ptr [r9+rbx+104h]
vpmaddwd ymm3, ymm3, ymm2
vcvtdq2ps ymm3, ymm3
vmulps ymm3, ymm5, ymm3
vaddps ymm0, ymm0, ymm3
inc rdi
add rdx, r10
add r11, 42h ; 'B'
jmp loc_2D8E2
loc_2D9A0:
vextractf128 xmm1, ymm0, 1
vaddps xmm0, xmm1, xmm0
vshufpd xmm1, xmm0, xmm0, 1
vaddps xmm0, xmm0, xmm1
vhaddps xmm0, xmm0, xmm0
vmovss dword ptr [rsi], xmm0
pop rbx
pop r14
vzeroupper
retn
| long long ggml_vec_dot_tq2_0_q8_K(
int a1,
long long _RSI,
__m128 _XMM0,
double a4,
double a5,
__m128 _XMM3,
__m128 _XMM4,
long long a8,
long long a9,
long long a10,
long long _R9)
{
long long result; // rax
long long v14; // rdx
long long v16; // rdi
result = (a1 / 256) & (unsigned int)~((a1 / 256) >> 31);
v14 = _R9 + 100;
__asm { vxorps xmm0, xmm0, xmm0 }
v16 = 0LL;
__asm
{
vpbroadcastb ymm1, cs:byte_484F8
vpbroadcastw ymm2, cs:word_484F6
}
_R11 = a9;
while ( v16 != result )
{
__asm { vpxor xmm3, xmm3, xmm3 }
_RBX = 0LL;
__asm { vpxor xmm4, xmm4, xmm4 }
while ( _RBX < 0x40 )
{
__asm
{
vmovdqu ymm5, ymmword ptr [r11+rbx]
vpsrlw ymm6, ymm5, 2
vpsrlw ymm7, ymm5, 4
vpsrlw ymm8, ymm5, 6
vpand ymm5, ymm5, ymm1
vpmaddubsw ymm5, ymm5, ymmword ptr [rdx+rbx*4-60h]
vpand ymm6, ymm6, ymm1
vpmaddubsw ymm6, ymm6, ymmword ptr [rdx+rbx*4-40h]
vpand ymm7, ymm7, ymm1
vpmaddubsw ymm7, ymm7, ymmword ptr [rdx+rbx*4-20h]
vpand ymm8, ymm8, ymm1
vpmaddubsw ymm8, ymm8, ymmword ptr [rdx+rbx*4]
vpaddw ymm4, ymm5, ymm4
vpaddw ymm4, ymm4, ymm6
vpaddw ymm3, ymm7, ymm3
vpaddw ymm3, ymm8, ymm3
}
_RBX += 32LL;
}
_RBX = 292 * v16;
__asm
{
vmovss xmm5, dword ptr [r9+rbx]
vmulss xmm5, xmm5, dword ptr [r8+r14*4]
vbroadcastss ymm5, xmm5
vpaddw ymm3, ymm4, ymm3
vpsubw ymm3, ymm3, ymmword ptr [r9+rbx+104h]
vpmaddwd ymm3, ymm3, ymm2
vcvtdq2ps ymm3, ymm3
vmulps ymm3, ymm5, ymm3
vaddps ymm0, ymm0, ymm3
}
++v16;
v14 += 292LL;
_R11 += 66LL;
}
__asm
{
vextractf128 xmm1, ymm0, 1
vaddps xmm0, xmm1, xmm0
vshufpd xmm1, xmm0, xmm0, 1
vaddps xmm0, xmm0, xmm1
vhaddps xmm0, xmm0, xmm0
vmovss dword ptr [rsi], xmm0
vzeroupper
}
return result;
}
| ggml_vec_dot_tq2_0_q8_K:
PUSH R14
PUSH RBX
MOV EAX,EDI
MOV EDI,0x100
CDQ
IDIV EDI
MOV EDX,EAX
SAR EDX,0x1f
ANDN EAX,EDX,EAX
LEA RDX,[R9 + 0x64]
VXORPS XMM0,XMM0,XMM0
XOR EDI,EDI
VPBROADCASTB YMM1,byte ptr [0x001484f8]
MOV R8,qword ptr [0x00158f70]
VPBROADCASTW YMM2,word ptr [0x001484f6]
MOV R10D,0x124
MOV R11,RCX
LAB_0012d8e2:
CMP RDI,RAX
JZ 0x0012d9a0
VPXOR XMM3,XMM3,XMM3
XOR EBX,EBX
VPXOR XMM4,XMM4,XMM4
LAB_0012d8f5:
CMP RBX,0x40
JNC 0x0012d951
VMOVDQU YMM5,ymmword ptr [R11 + RBX*0x1]
VPSRLW YMM6,YMM5,0x2
VPSRLW YMM7,YMM5,0x4
VPSRLW YMM8,YMM5,0x6
VPAND YMM5,YMM5,YMM1
VPMADDUBSW YMM5,YMM5,ymmword ptr [RDX + RBX*0x4 + -0x60]
VPAND YMM6,YMM6,YMM1
VPMADDUBSW YMM6,YMM6,ymmword ptr [RDX + RBX*0x4 + -0x40]
VPAND YMM7,YMM7,YMM1
VPMADDUBSW YMM7,YMM7,ymmword ptr [RDX + RBX*0x4 + -0x20]
VPAND YMM8,YMM8,YMM1
VPMADDUBSW YMM8,YMM8,ymmword ptr [RDX + RBX*0x4]
VPADDW YMM4,YMM5,YMM4
VPADDW YMM4,YMM4,YMM6
VPADDW YMM3,YMM7,YMM3
VPADDW YMM3,YMM8,YMM3
ADD RBX,0x20
JMP 0x0012d8f5
LAB_0012d951:
IMUL RBX,RDI,0x124
VMOVSS XMM5,dword ptr [R9 + RBX*0x1]
IMUL R14,RDI,0x42
MOVZX R14D,word ptr [RCX + R14*0x1 + 0x40]
VMULSS XMM5,XMM5,dword ptr [R8 + R14*0x4]
VBROADCASTSS YMM5,XMM5
VPADDW YMM3,YMM4,YMM3
VPSUBW YMM3,YMM3,ymmword ptr [R9 + RBX*0x1 + 0x104]
VPMADDWD YMM3,YMM3,YMM2
VCVTDQ2PS YMM3,YMM3
VMULPS YMM3,YMM5,YMM3
VADDPS YMM0,YMM0,YMM3
INC RDI
ADD RDX,R10
ADD R11,0x42
JMP 0x0012d8e2
LAB_0012d9a0:
VEXTRACTF128 XMM1,YMM0,0x1
VADDPS XMM0,XMM1,XMM0
VSHUFPD XMM1,XMM0,XMM0,0x1
VADDPS XMM0,XMM0,XMM1
VHADDPS XMM0,XMM0,XMM0
VMOVSS dword ptr [RSI],XMM0
POP RBX
POP R14
VZEROUPPER
RET
|
void ggml_vec_dot_tq2_0_q8_K
(int param_1,int4 *param_2,int8 param_3,long param_4,int8 param_5,
long param_6)
{
int1 auVar1 [32];
float fVar2;
int1 auVar3 [16];
int1 auVar4 [32];
long lVar5;
ulong uVar6;
ulong uVar7;
long lVar8;
float fVar9;
float fVar12;
float fVar13;
float fVar14;
int1 auVar10 [16];
int1 auVar11 [16];
float fVar15;
float fVar16;
float fVar17;
float fVar18;
int1 auVar19 [32];
int1 auVar20 [32];
int1 auVar21 [64];
int1 auVar22 [64];
int1 auVar23 [32];
int1 auVar24 [32];
int1 auVar25 [32];
lVar5 = param_6 + 100;
fVar13 = 0.0;
fVar14 = 0.0;
fVar9 = 0.0;
fVar12 = 0.0;
fVar15 = 0.0;
fVar16 = 0.0;
fVar17 = 0.0;
fVar18 = 0.0;
auVar19[1] = DAT_001484f8;
auVar19[0] = DAT_001484f8;
auVar19[2] = DAT_001484f8;
auVar19[3] = DAT_001484f8;
auVar19[4] = DAT_001484f8;
auVar19[5] = DAT_001484f8;
auVar19[6] = DAT_001484f8;
auVar19[7] = DAT_001484f8;
auVar19[8] = DAT_001484f8;
auVar19[9] = DAT_001484f8;
auVar19[10] = DAT_001484f8;
auVar19[0xb] = DAT_001484f8;
auVar19[0xc] = DAT_001484f8;
auVar19[0xd] = DAT_001484f8;
auVar19[0xe] = DAT_001484f8;
auVar19[0xf] = DAT_001484f8;
auVar19[0x10] = DAT_001484f8;
auVar19[0x11] = DAT_001484f8;
auVar19[0x12] = DAT_001484f8;
auVar19[0x13] = DAT_001484f8;
auVar19[0x14] = DAT_001484f8;
auVar19[0x15] = DAT_001484f8;
auVar19[0x16] = DAT_001484f8;
auVar19[0x17] = DAT_001484f8;
auVar19[0x18] = DAT_001484f8;
auVar19[0x19] = DAT_001484f8;
auVar19[0x1a] = DAT_001484f8;
auVar19[0x1b] = DAT_001484f8;
auVar19[0x1c] = DAT_001484f8;
auVar19[0x1d] = DAT_001484f8;
auVar19[0x1e] = DAT_001484f8;
auVar19[0x1f] = DAT_001484f8;
auVar20._2_2_ = DAT_001484f6;
auVar20._0_2_ = DAT_001484f6;
auVar20._4_2_ = DAT_001484f6;
auVar20._6_2_ = DAT_001484f6;
auVar20._8_2_ = DAT_001484f6;
auVar20._10_2_ = DAT_001484f6;
auVar20._12_2_ = DAT_001484f6;
auVar20._14_2_ = DAT_001484f6;
auVar20._16_2_ = DAT_001484f6;
auVar20._18_2_ = DAT_001484f6;
auVar20._20_2_ = DAT_001484f6;
auVar20._22_2_ = DAT_001484f6;
auVar20._24_2_ = DAT_001484f6;
auVar20._26_2_ = DAT_001484f6;
auVar20._28_2_ = DAT_001484f6;
auVar20._30_2_ = DAT_001484f6;
lVar8 = param_4;
for (uVar7 = 0; uVar7 != (uint)(~(param_1 / 0x100 >> 0x1f) & param_1 / 0x100); uVar7 = uVar7 + 1)
{
auVar21 = ZEXT1664((int1 [16])0x0);
uVar6 = 0;
auVar22 = ZEXT1664((int1 [16])0x0);
while( true ) {
if (0x3f < uVar6) break;
auVar1 = *(int1 (*) [32])(lVar8 + uVar6);
auVar23 = vpsrlw_avx2(auVar1,2);
auVar24 = vpsrlw_avx2(auVar1,4);
auVar25 = vpsrlw_avx2(auVar1,6);
auVar1 = vpand_avx2(auVar1,auVar19);
auVar4 = vpmaddubsw_avx2(auVar1,*(int1 (*) [32])(lVar5 + -0x60 + uVar6 * 4));
auVar1 = vpand_avx2(auVar23,auVar19);
auVar23 = vpmaddubsw_avx2(auVar1,*(int1 (*) [32])(lVar5 + -0x40 + uVar6 * 4));
auVar1 = vpand_avx2(auVar24,auVar19);
auVar24 = vpmaddubsw_avx2(auVar1,*(int1 (*) [32])(lVar5 + -0x20 + uVar6 * 4));
auVar1 = vpand_avx2(auVar25,auVar19);
auVar25 = vpmaddubsw_avx2(auVar1,*(int1 (*) [32])(lVar5 + uVar6 * 4));
auVar1 = vpaddw_avx2(auVar4,auVar22._0_32_);
auVar1 = vpaddw_avx2(auVar1,auVar23);
auVar22 = ZEXT3264(auVar1);
auVar1 = vpaddw_avx2(auVar24,auVar21._0_32_);
auVar1 = vpaddw_avx2(auVar25,auVar1);
auVar21 = ZEXT3264(auVar1);
uVar6 = uVar6 + 0x20;
}
fVar2 = *(float *)(param_6 + uVar7 * 0x124) *
*(float *)(PTR_ggml_table_f32_f16_00158f70 +
(ulong)*(ushort *)(param_4 + 0x40 + uVar7 * 0x42) * 4);
auVar1 = vpaddw_avx2(auVar22._0_32_,auVar21._0_32_);
auVar1 = vpsubw_avx2(auVar1,*(int1 (*) [32])(param_6 + 0x104 + uVar7 * 0x124));
auVar1 = vpmaddwd_avx2(auVar1,auVar20);
auVar1 = vcvtdq2ps_avx(auVar1);
fVar9 = fVar9 + fVar2 * auVar1._0_4_;
fVar12 = fVar12 + fVar2 * auVar1._4_4_;
fVar13 = fVar13 + fVar2 * auVar1._8_4_;
fVar14 = fVar14 + fVar2 * auVar1._12_4_;
fVar15 = fVar15 + fVar2 * auVar1._16_4_;
fVar16 = fVar16 + fVar2 * auVar1._20_4_;
fVar17 = fVar17 + fVar2 * auVar1._24_4_;
fVar18 = fVar18 + auVar1._28_4_;
lVar5 = lVar5 + 0x124;
lVar8 = lVar8 + 0x42;
}
auVar10._0_4_ = fVar15 + fVar9;
auVar10._4_4_ = fVar16 + fVar12;
auVar10._8_4_ = fVar17 + fVar13;
auVar10._12_4_ = fVar18 + fVar14;
auVar3 = vshufpd_avx(auVar10,auVar10,1);
auVar11._0_4_ = auVar10._0_4_ + auVar3._0_4_;
auVar11._4_4_ = auVar10._4_4_ + auVar3._4_4_;
auVar11._8_4_ = auVar10._8_4_ + auVar3._8_4_;
auVar11._12_4_ = auVar10._12_4_ + auVar3._12_4_;
auVar3 = vhaddps_avx(auVar11,auVar11);
*param_2 = auVar3._0_4_;
return;
}
| |
47,805 | ggml_vec_dot_tq2_0_q8_K | monkey531[P]llama/ggml/src/ggml-cpu/ggml-cpu-quants.c | void ggml_vec_dot_tq2_0_q8_K(int n, float * restrict s, size_t bs, const void * restrict vx, size_t bx, const void * restrict vy, size_t by, int nrc) {
assert(nrc == 1);
UNUSED(nrc);
UNUSED(bx);
UNUSED(by);
UNUSED(bs);
const block_tq2_0 * restrict x = vx;
const block_q8_K * restrict y = vy;
const int nb = n / QK_K;
#if defined(__ARM_NEON)
float sumf = 0.0f;
const uint8x16_t m3 = vdupq_n_u8(3);
for (int i = 0; i < nb; ++i) {
#if defined(__ARM_FEATURE_DOTPROD)
int32x4_t sumi0 = vdupq_n_s32(0);
int32x4_t sumi1 = vdupq_n_s32(0);
#else
int16x8_t sumi0 = vdupq_n_s16(0);
int16x8_t sumi1 = vdupq_n_s16(0);
#endif
for (size_t j = 0; j < sizeof(x->qs); j += 32) {
uint8x16_t qx0 = vld1q_u8(x[i].qs + j);
uint8x16_t qx1 = vld1q_u8(x[i].qs + j + 16);
uint8x16_t qx2 = vshrq_n_u8(qx0, 2);
uint8x16_t qx3 = vshrq_n_u8(qx1, 2);
uint8x16_t qx4 = vshrq_n_u8(qx0, 4);
uint8x16_t qx5 = vshrq_n_u8(qx1, 4);
uint8x16_t qx6 = vshrq_n_u8(qx0, 6);
uint8x16_t qx7 = vshrq_n_u8(qx1, 6);
int8x16_t sqx0 = vreinterpretq_s8_u8(vandq_u8(qx0, m3));
int8x16_t sqx1 = vreinterpretq_s8_u8(vandq_u8(qx1, m3));
int8x16_t sqx2 = vreinterpretq_s8_u8(vandq_u8(qx2, m3));
int8x16_t sqx3 = vreinterpretq_s8_u8(vandq_u8(qx3, m3));
int8x16_t sqx4 = vreinterpretq_s8_u8(vandq_u8(qx4, m3));
int8x16_t sqx5 = vreinterpretq_s8_u8(vandq_u8(qx5, m3));
int8x16_t sqx6 = vreinterpretq_s8_u8(vandq_u8(qx6, m3));
int8x16_t sqx7 = vreinterpretq_s8_u8(vandq_u8(qx7, m3));
const int8x16_t qy0 = vld1q_s8(y[i].qs + j*4 + 0);
const int8x16_t qy1 = vld1q_s8(y[i].qs + j*4 + 16);
const int8x16_t qy2 = vld1q_s8(y[i].qs + j*4 + 32);
const int8x16_t qy3 = vld1q_s8(y[i].qs + j*4 + 48);
const int8x16_t qy4 = vld1q_s8(y[i].qs + j*4 + 64);
const int8x16_t qy5 = vld1q_s8(y[i].qs + j*4 + 80);
const int8x16_t qy6 = vld1q_s8(y[i].qs + j*4 + 96);
const int8x16_t qy7 = vld1q_s8(y[i].qs + j*4 + 112);
#if defined(__ARM_FEATURE_DOTPROD)
sumi0 = vdotq_s32(sumi0, sqx0, qy0);
sumi1 = vdotq_s32(sumi1, sqx1, qy1);
sumi0 = vdotq_s32(sumi0, sqx2, qy2);
sumi1 = vdotq_s32(sumi1, sqx3, qy3);
sumi0 = vdotq_s32(sumi0, sqx4, qy4);
sumi1 = vdotq_s32(sumi1, sqx5, qy5);
sumi0 = vdotq_s32(sumi0, sqx6, qy6);
sumi1 = vdotq_s32(sumi1, sqx7, qy7);
#else
sumi0 = vmlal_s8(sumi0, vget_low_s8(sqx0), vget_low_s8(qy0));
sumi1 = vmlal_s8(sumi1, vget_high_s8(sqx0), vget_high_s8(qy0));
sumi0 = vmlal_s8(sumi0, vget_low_s8(sqx1), vget_low_s8(qy1));
sumi1 = vmlal_s8(sumi1, vget_high_s8(sqx1), vget_high_s8(qy1));
sumi0 = vmlal_s8(sumi0, vget_low_s8(sqx2), vget_low_s8(qy2));
sumi1 = vmlal_s8(sumi1, vget_high_s8(sqx2), vget_high_s8(qy2));
sumi0 = vmlal_s8(sumi0, vget_low_s8(sqx3), vget_low_s8(qy3));
sumi1 = vmlal_s8(sumi1, vget_high_s8(sqx3), vget_high_s8(qy3));
sumi0 = vmlal_s8(sumi0, vget_low_s8(sqx4), vget_low_s8(qy4));
sumi1 = vmlal_s8(sumi1, vget_high_s8(sqx4), vget_high_s8(qy4));
sumi0 = vmlal_s8(sumi0, vget_low_s8(sqx5), vget_low_s8(qy5));
sumi1 = vmlal_s8(sumi1, vget_high_s8(sqx5), vget_high_s8(qy5));
sumi0 = vmlal_s8(sumi0, vget_low_s8(sqx6), vget_low_s8(qy6));
sumi1 = vmlal_s8(sumi1, vget_high_s8(sqx6), vget_high_s8(qy6));
sumi0 = vmlal_s8(sumi0, vget_low_s8(sqx7), vget_low_s8(qy7));
sumi1 = vmlal_s8(sumi1, vget_high_s8(sqx7), vget_high_s8(qy7));
#endif
}
const int16x8_t ysum0 = vld1q_s16(y[i].bsums);
const int16x8_t ysum1 = vld1q_s16(y[i].bsums + 8);
const float d = GGML_FP16_TO_FP32(x[i].d) * y[i].d;
#if defined(__ARM_FEATURE_DOTPROD)
sumi0 = vaddq_s32(sumi0, sumi1);
sumi0 = vsubq_s32(sumi0, vpaddlq_s16(vaddq_s16(ysum0, ysum1)));
sumf += d * (float) vaddvq_s32(sumi0);
#else
sumi0 = vaddq_s16(sumi0, sumi1);
sumi0 = vsubq_s16(sumi0, vaddq_s16(ysum0, ysum1));
sumf += d * (float) vaddlvq_s16(sumi0);
#endif
}
*s = sumf;
#elif defined(__AVX2__)
__m256 sumf = _mm256_setzero_ps();
for (int i = 0; i < nb; ++i) {
// 16-bit sums, because 256*127 still fits
__m256i sumi0 = _mm256_setzero_si256();
__m256i sumi1 = _mm256_setzero_si256();
for (size_t j = 0; j < sizeof(x->qs); j += 32) {
__m256i qx0 = _mm256_loadu_si256((const __m256i *) (x[i].qs + j));
__m256i qx1 = _mm256_srli_epi16(qx0, 2);
__m256i qx2 = _mm256_srli_epi16(qx0, 4);
__m256i qx3 = _mm256_srli_epi16(qx0, 6);
// 0, 1, 2 (should not be 3)
qx0 = _mm256_and_si256(qx0, _mm256_set1_epi8(3));
qx1 = _mm256_and_si256(qx1, _mm256_set1_epi8(3));
qx2 = _mm256_and_si256(qx2, _mm256_set1_epi8(3));
qx3 = _mm256_and_si256(qx3, _mm256_set1_epi8(3));
const __m256i qy0 = _mm256_loadu_si256((const __m256i *) (y[i].qs + j*4 + 0));
const __m256i qy1 = _mm256_loadu_si256((const __m256i *) (y[i].qs + j*4 + 32));
const __m256i qy2 = _mm256_loadu_si256((const __m256i *) (y[i].qs + j*4 + 64));
const __m256i qy3 = _mm256_loadu_si256((const __m256i *) (y[i].qs + j*4 + 96));
qx0 = _mm256_maddubs_epi16(qx0, qy0);
qx1 = _mm256_maddubs_epi16(qx1, qy1);
qx2 = _mm256_maddubs_epi16(qx2, qy2);
qx3 = _mm256_maddubs_epi16(qx3, qy3);
sumi0 = _mm256_add_epi16(sumi0, _mm256_add_epi16(qx0, qx1));
sumi1 = _mm256_add_epi16(sumi1, _mm256_add_epi16(qx2, qx3));
}
const __m256i ysum = _mm256_loadu_si256((const __m256i *) y[i].bsums);
const __m256 d = _mm256_set1_ps(y[i].d * GGML_FP16_TO_FP32(x[i].d));
sumi0 = _mm256_add_epi16(sumi0, sumi1);
sumi0 = _mm256_sub_epi16(sumi0, ysum);
sumi0 = _mm256_madd_epi16(sumi0, _mm256_set1_epi16(1));
sumf = _mm256_add_ps(_mm256_mul_ps(_mm256_cvtepi32_ps(sumi0), d), sumf);
}
*s = hsum_float_8(sumf);
#else
float sumf = 0.0f;
for (int i = 0; i < nb; ++i) {
int32_t sumi = 0;
for (size_t j = 0; j < sizeof(x->qs); j += 32) {
for (size_t l = 0; l < 4; ++l) {
for (size_t k = 0; k < 32; ++k) {
sumi += y[i].qs[j*4 + l*32 + k] * (((x[i].qs[j + k] >> (l*2)) & 3) - 1);
}
}
}
const float d = y[i].d * GGML_FP16_TO_FP32(x[i].d);
sumf += (float) sumi * d;
}
*s = sumf;
#endif
} | O3 | c | ggml_vec_dot_tq2_0_q8_K:
vxorps %xmm0, %xmm0, %xmm0
cmpl $0x100, %edi # imm = 0x100
jl 0x31192
pushq %rbp
pushq %r14
pushq %rbx
shrl $0x8, %edi
vxorps %xmm0, %xmm0, %xmm0
xorl %eax, %eax
vpbroadcastb 0x2454e(%rip), %ymm1 # 0x555fe
movq 0x33eb9(%rip), %rdx # 0x64f70
vpbroadcastw 0x24540(%rip), %ymm2 # 0x55600
movq %rax, %r8
shlq $0x6, %r8
leaq (%r8,%rax,2), %r10
leaq (%rcx,%r10), %r11
imulq $0x124, %rax, %r8 # imm = 0x124
leaq (%r9,%r8), %rbx
addq $0x4, %rbx
movb $0x1, %bpl
vpxor %xmm3, %xmm3, %xmm3
vpxor %xmm4, %xmm4, %xmm4
xorl %r14d, %r14d
vmovdqu (%r11,%r14), %ymm5
vpsrlw $0x2, %ymm5, %ymm6
vpsrlw $0x4, %ymm5, %ymm7
vpsrlw $0x6, %ymm5, %ymm8
vpand %ymm1, %ymm5, %ymm5
vpmaddubsw (%rbx,%r14,4), %ymm5, %ymm5
vpaddw %ymm3, %ymm5, %ymm3
vpand %ymm1, %ymm6, %ymm5
vpmaddubsw 0x20(%rbx,%r14,4), %ymm5, %ymm5
vpaddw %ymm5, %ymm3, %ymm3
vpand %ymm1, %ymm7, %ymm5
vpmaddubsw 0x40(%rbx,%r14,4), %ymm5, %ymm5
vpaddw %ymm4, %ymm5, %ymm4
vpand %ymm1, %ymm8, %ymm5
vpmaddubsw 0x60(%rbx,%r14,4), %ymm5, %ymm5
vpaddw %ymm5, %ymm4, %ymm4
movl $0x20, %r14d
testb $0x1, %bpl
movl $0x0, %ebp
jne 0x310ec
vmovss (%r9,%r8), %xmm5
movzwl 0x40(%rcx,%r10), %r10d
vmulss (%rdx,%r10,4), %xmm5, %xmm5
vbroadcastss %xmm5, %ymm5
vpaddw %ymm4, %ymm3, %ymm3
vpsubw 0x104(%r9,%r8), %ymm3, %ymm3
vpmaddwd %ymm2, %ymm3, %ymm3
vcvtdq2ps %ymm3, %ymm3
vmulps %ymm3, %ymm5, %ymm3
vaddps %ymm3, %ymm0, %ymm0
incq %rax
cmpq %rdi, %rax
jne 0x310c0
popq %rbx
popq %r14
popq %rbp
vextractf128 $0x1, %ymm0, %xmm1
vaddps %xmm0, %xmm1, %xmm0
vshufpd $0x1, %xmm0, %xmm0, %xmm1 # xmm1 = xmm0[1,0]
vaddps %xmm1, %xmm0, %xmm0
vhaddps %xmm0, %xmm0, %xmm0
vmovss %xmm0, (%rsi)
vzeroupper
retq
| ggml_vec_dot_tq2_0_q8_K:
vxorps xmm0, xmm0, xmm0
cmp edi, 100h
jl loc_31192
push rbp
push r14
push rbx
shr edi, 8
vxorps xmm0, xmm0, xmm0
xor eax, eax
vpbroadcastb ymm1, cs:byte_555FE
mov rdx, cs:ggml_table_f32_f16_ptr
vpbroadcastw ymm2, cs:word_55600
loc_310C0:
mov r8, rax
shl r8, 6
lea r10, [r8+rax*2]
lea r11, [rcx+r10]
imul r8, rax, 124h
lea rbx, [r9+r8]
add rbx, 4
mov bpl, 1
vpxor xmm3, xmm3, xmm3
vpxor xmm4, xmm4, xmm4
xor r14d, r14d
loc_310EC:
vmovdqu ymm5, ymmword ptr [r11+r14]
vpsrlw ymm6, ymm5, 2
vpsrlw ymm7, ymm5, 4
vpsrlw ymm8, ymm5, 6
vpand ymm5, ymm5, ymm1
vpmaddubsw ymm5, ymm5, ymmword ptr [rbx+r14*4]
vpaddw ymm3, ymm5, ymm3
vpand ymm5, ymm6, ymm1
vpmaddubsw ymm5, ymm5, ymmword ptr [rbx+r14*4+20h]
vpaddw ymm3, ymm3, ymm5
vpand ymm5, ymm7, ymm1
vpmaddubsw ymm5, ymm5, ymmword ptr [rbx+r14*4+40h]
vpaddw ymm4, ymm5, ymm4
vpand ymm5, ymm8, ymm1
vpmaddubsw ymm5, ymm5, ymmword ptr [rbx+r14*4+60h]
vpaddw ymm4, ymm4, ymm5
mov r14d, 20h ; ' '
test bpl, 1
mov ebp, 0
jnz short loc_310EC
vmovss xmm5, dword ptr [r9+r8]
movzx r10d, word ptr [rcx+r10+40h]
vmulss xmm5, xmm5, dword ptr [rdx+r10*4]
vbroadcastss ymm5, xmm5
vpaddw ymm3, ymm3, ymm4
vpsubw ymm3, ymm3, ymmword ptr [r9+r8+104h]
vpmaddwd ymm3, ymm3, ymm2
vcvtdq2ps ymm3, ymm3
vmulps ymm3, ymm5, ymm3
vaddps ymm0, ymm0, ymm3
inc rax
cmp rax, rdi
jnz loc_310C0
pop rbx
pop r14
pop rbp
loc_31192:
vextractf128 xmm1, ymm0, 1
vaddps xmm0, xmm1, xmm0
vshufpd xmm1, xmm0, xmm0, 1
vaddps xmm0, xmm0, xmm1
vhaddps xmm0, xmm0, xmm0
vmovss dword ptr [rsi], xmm0
vzeroupper
retn
| void ggml_vec_dot_tq2_0_q8_K(
int a1,
long long _RSI,
__m128 _XMM0,
double a4,
double a5,
__m128 _XMM3,
__m128 _XMM4,
long long a8,
long long a9,
long long a10,
long long _R9)
{
long long v13; // rdi
long long v15; // rax
char v20; // bp
bool v38; // zf
__asm { vxorps xmm0, xmm0, xmm0 }
if ( a1 >= 256 )
{
v13 = (unsigned int)a1 >> 8;
__asm { vxorps xmm0, xmm0, xmm0 }
v15 = 0LL;
__asm
{
vpbroadcastb ymm1, cs:byte_555FE
vpbroadcastw ymm2, cs:word_55600
}
do
{
_R11 = a9 + 66 * v15;
_R8 = 292 * v15;
v20 = 1;
__asm
{
vpxor xmm3, xmm3, xmm3
vpxor xmm4, xmm4, xmm4
}
_R14 = 0LL;
do
{
__asm
{
vmovdqu ymm5, ymmword ptr [r11+r14]
vpsrlw ymm6, ymm5, 2
vpsrlw ymm7, ymm5, 4
vpsrlw ymm8, ymm5, 6
vpand ymm5, ymm5, ymm1
vpmaddubsw ymm5, ymm5, ymmword ptr [rbx+r14*4]
vpaddw ymm3, ymm5, ymm3
vpand ymm5, ymm6, ymm1
vpmaddubsw ymm5, ymm5, ymmword ptr [rbx+r14*4+20h]
vpaddw ymm3, ymm3, ymm5
vpand ymm5, ymm7, ymm1
vpmaddubsw ymm5, ymm5, ymmword ptr [rbx+r14*4+40h]
vpaddw ymm4, ymm5, ymm4
vpand ymm5, ymm8, ymm1
vpmaddubsw ymm5, ymm5, ymmword ptr [rbx+r14*4+60h]
vpaddw ymm4, ymm4, ymm5
}
_R14 = 32LL;
v38 = (v20 & 1) == 0;
v20 = 0;
}
while ( !v38 );
__asm
{
vmovss xmm5, dword ptr [r9+r8]
vmulss xmm5, xmm5, dword ptr [rdx+r10*4]
vbroadcastss ymm5, xmm5
vpaddw ymm3, ymm3, ymm4
vpsubw ymm3, ymm3, ymmword ptr [r9+r8+104h]
vpmaddwd ymm3, ymm3, ymm2
vcvtdq2ps ymm3, ymm3
vmulps ymm3, ymm5, ymm3
vaddps ymm0, ymm0, ymm3
}
++v15;
}
while ( v15 != v13 );
}
__asm
{
vextractf128 xmm1, ymm0, 1
vaddps xmm0, xmm1, xmm0
vshufpd xmm1, xmm0, xmm0, 1
vaddps xmm0, xmm0, xmm1
vhaddps xmm0, xmm0, xmm0
vmovss dword ptr [rsi], xmm0
vzeroupper
}
}
| ggml_vec_dot_tq2_0_q8_K:
VXORPS XMM0,XMM0,XMM0
CMP EDI,0x100
JL 0x00131192
PUSH RBP
PUSH R14
PUSH RBX
SHR EDI,0x8
VXORPS XMM0,XMM0,XMM0
XOR EAX,EAX
VPBROADCASTB YMM1,byte ptr [0x001555fe]
MOV RDX,qword ptr [0x00164f70]
VPBROADCASTW YMM2,word ptr [0x00155600]
LAB_001310c0:
MOV R8,RAX
SHL R8,0x6
LEA R10,[R8 + RAX*0x2]
LEA R11,[RCX + R10*0x1]
IMUL R8,RAX,0x124
LEA RBX,[R9 + R8*0x1]
ADD RBX,0x4
MOV BPL,0x1
VPXOR XMM3,XMM3,XMM3
VPXOR XMM4,XMM4,XMM4
XOR R14D,R14D
LAB_001310ec:
VMOVDQU YMM5,ymmword ptr [R11 + R14*0x1]
VPSRLW YMM6,YMM5,0x2
VPSRLW YMM7,YMM5,0x4
VPSRLW YMM8,YMM5,0x6
VPAND YMM5,YMM5,YMM1
VPMADDUBSW YMM5,YMM5,ymmword ptr [RBX + R14*0x4]
VPADDW YMM3,YMM5,YMM3
VPAND YMM5,YMM6,YMM1
VPMADDUBSW YMM5,YMM5,ymmword ptr [RBX + R14*0x4 + 0x20]
VPADDW YMM3,YMM3,YMM5
VPAND YMM5,YMM7,YMM1
VPMADDUBSW YMM5,YMM5,ymmword ptr [RBX + R14*0x4 + 0x40]
VPADDW YMM4,YMM5,YMM4
VPAND YMM5,YMM8,YMM1
VPMADDUBSW YMM5,YMM5,ymmword ptr [RBX + R14*0x4 + 0x60]
VPADDW YMM4,YMM4,YMM5
MOV R14D,0x20
TEST BPL,0x1
MOV EBP,0x0
JNZ 0x001310ec
VMOVSS XMM5,dword ptr [R9 + R8*0x1]
MOVZX R10D,word ptr [RCX + R10*0x1 + 0x40]
VMULSS XMM5,XMM5,dword ptr [RDX + R10*0x4]
VBROADCASTSS YMM5,XMM5
VPADDW YMM3,YMM3,YMM4
VPSUBW YMM3,YMM3,ymmword ptr [R9 + R8*0x1 + 0x104]
VPMADDWD YMM3,YMM3,YMM2
VCVTDQ2PS YMM3,YMM3
VMULPS YMM3,YMM5,YMM3
VADDPS YMM0,YMM0,YMM3
INC RAX
CMP RAX,RDI
JNZ 0x001310c0
POP RBX
POP R14
POP RBP
LAB_00131192:
VEXTRACTF128 XMM1,YMM0,0x1
VADDPS XMM0,XMM1,XMM0
VSHUFPD XMM1,XMM0,XMM0,0x1
VADDPS XMM0,XMM0,XMM1
VHADDPS XMM0,XMM0,XMM0
VMOVSS dword ptr [RSI],XMM0
VZEROUPPER
RET
|
void ggml_vec_dot_tq2_0_q8_K
(uint param_1,int4 *param_2,int8 param_3,long param_4,int8 param_5,
long param_6)
{
long lVar1;
int1 auVar2 [32];
float fVar3;
int1 auVar4 [16];
bool bVar5;
ulong uVar6;
bool bVar7;
long lVar8;
long lVar9;
float fVar10;
float fVar13;
float fVar14;
float fVar15;
int1 auVar11 [16];
int1 auVar12 [16];
float fVar16;
float fVar17;
float fVar18;
float fVar19;
int1 auVar20 [32];
int1 auVar21 [32];
int1 auVar22 [64];
int1 auVar23 [64];
int1 auVar24 [32];
int1 auVar25 [32];
int1 auVar26 [32];
fVar14 = 0.0;
fVar15 = 0.0;
fVar10 = 0.0;
fVar13 = 0.0;
fVar16 = 0.0;
fVar17 = 0.0;
fVar18 = 0.0;
fVar19 = 0.0;
if (0xff < (int)param_1) {
fVar14 = 0.0;
fVar10 = 0.0;
fVar13 = 0.0;
fVar15 = 0.0;
fVar16 = 0.0;
fVar17 = 0.0;
fVar18 = 0.0;
fVar19 = 0.0;
uVar6 = 0;
auVar20[1] = DAT_001555fe;
auVar20[0] = DAT_001555fe;
auVar20[2] = DAT_001555fe;
auVar20[3] = DAT_001555fe;
auVar20[4] = DAT_001555fe;
auVar20[5] = DAT_001555fe;
auVar20[6] = DAT_001555fe;
auVar20[7] = DAT_001555fe;
auVar20[8] = DAT_001555fe;
auVar20[9] = DAT_001555fe;
auVar20[10] = DAT_001555fe;
auVar20[0xb] = DAT_001555fe;
auVar20[0xc] = DAT_001555fe;
auVar20[0xd] = DAT_001555fe;
auVar20[0xe] = DAT_001555fe;
auVar20[0xf] = DAT_001555fe;
auVar20[0x10] = DAT_001555fe;
auVar20[0x11] = DAT_001555fe;
auVar20[0x12] = DAT_001555fe;
auVar20[0x13] = DAT_001555fe;
auVar20[0x14] = DAT_001555fe;
auVar20[0x15] = DAT_001555fe;
auVar20[0x16] = DAT_001555fe;
auVar20[0x17] = DAT_001555fe;
auVar20[0x18] = DAT_001555fe;
auVar20[0x19] = DAT_001555fe;
auVar20[0x1a] = DAT_001555fe;
auVar20[0x1b] = DAT_001555fe;
auVar20[0x1c] = DAT_001555fe;
auVar20[0x1d] = DAT_001555fe;
auVar20[0x1e] = DAT_001555fe;
auVar20[0x1f] = DAT_001555fe;
auVar21._2_2_ = DAT_00155600;
auVar21._0_2_ = DAT_00155600;
auVar21._4_2_ = DAT_00155600;
auVar21._6_2_ = DAT_00155600;
auVar21._8_2_ = DAT_00155600;
auVar21._10_2_ = DAT_00155600;
auVar21._12_2_ = DAT_00155600;
auVar21._14_2_ = DAT_00155600;
auVar21._16_2_ = DAT_00155600;
auVar21._18_2_ = DAT_00155600;
auVar21._20_2_ = DAT_00155600;
auVar21._22_2_ = DAT_00155600;
auVar21._24_2_ = DAT_00155600;
auVar21._26_2_ = DAT_00155600;
auVar21._28_2_ = DAT_00155600;
auVar21._30_2_ = DAT_00155600;
do {
lVar8 = uVar6 * 0x124;
lVar1 = param_6 + lVar8;
auVar22 = ZEXT1664((int1 [16])0x0);
auVar23 = ZEXT1664((int1 [16])0x0);
lVar9 = 0;
bVar5 = true;
do {
bVar7 = bVar5;
auVar2 = *(int1 (*) [32])(param_4 + uVar6 * 0x42 + lVar9);
auVar24 = vpsrlw_avx2(auVar2,2);
auVar25 = vpsrlw_avx2(auVar2,4);
auVar26 = vpsrlw_avx2(auVar2,6);
auVar2 = vpand_avx2(auVar2,auVar20);
auVar2 = vpmaddubsw_avx2(auVar2,*(int1 (*) [32])(lVar1 + 4 + lVar9 * 4));
auVar2 = vpaddw_avx2(auVar2,auVar22._0_32_);
auVar24 = vpand_avx2(auVar24,auVar20);
auVar24 = vpmaddubsw_avx2(auVar24,*(int1 (*) [32])(lVar1 + 0x24 + lVar9 * 4));
auVar2 = vpaddw_avx2(auVar2,auVar24);
auVar22 = ZEXT3264(auVar2);
auVar24 = vpand_avx2(auVar25,auVar20);
auVar24 = vpmaddubsw_avx2(auVar24,*(int1 (*) [32])(lVar1 + 0x44 + lVar9 * 4));
auVar24 = vpaddw_avx2(auVar24,auVar23._0_32_);
auVar25 = vpand_avx2(auVar26,auVar20);
auVar25 = vpmaddubsw_avx2(auVar25,*(int1 (*) [32])(lVar1 + 100 + lVar9 * 4));
auVar24 = vpaddw_avx2(auVar24,auVar25);
auVar23 = ZEXT3264(auVar24);
lVar9 = 0x20;
bVar5 = false;
} while (bVar7);
fVar3 = *(float *)(param_6 + lVar8) *
*(float *)(PTR_ggml_table_f32_f16_00164f70 +
(ulong)*(ushort *)(param_4 + 0x40 + uVar6 * 0x42) * 4);
auVar2 = vpaddw_avx2(auVar2,auVar24);
auVar2 = vpsubw_avx2(auVar2,*(int1 (*) [32])(param_6 + 0x104 + lVar8));
auVar2 = vpmaddwd_avx2(auVar2,auVar21);
auVar2 = vcvtdq2ps_avx(auVar2);
fVar10 = fVar10 + fVar3 * auVar2._0_4_;
fVar13 = fVar13 + fVar3 * auVar2._4_4_;
fVar14 = fVar14 + fVar3 * auVar2._8_4_;
fVar15 = fVar15 + fVar3 * auVar2._12_4_;
fVar16 = fVar16 + fVar3 * auVar2._16_4_;
fVar17 = fVar17 + fVar3 * auVar2._20_4_;
fVar18 = fVar18 + fVar3 * auVar2._24_4_;
fVar19 = fVar19 + auVar2._28_4_;
uVar6 = uVar6 + 1;
} while (uVar6 != param_1 >> 8);
}
auVar11._0_4_ = fVar16 + fVar10;
auVar11._4_4_ = fVar17 + fVar13;
auVar11._8_4_ = fVar18 + fVar14;
auVar11._12_4_ = fVar19 + fVar15;
auVar4 = vshufpd_avx(auVar11,auVar11,1);
auVar12._0_4_ = auVar11._0_4_ + auVar4._0_4_;
auVar12._4_4_ = auVar11._4_4_ + auVar4._4_4_;
auVar12._8_4_ = auVar11._8_4_ + auVar4._8_4_;
auVar12._12_4_ = auVar11._12_4_ + auVar4._12_4_;
auVar4 = vhaddps_avx(auVar12,auVar12);
*param_2 = auVar4._0_4_;
return;
}
| |
47,806 | SDL::Surface::Surface(SDL::Vec2i const&, SDL_PixelFormat) | SDL3Lite/source/Shared/Surface.cpp | Surface::Surface(const Vec2i& size, SDL_PixelFormat pixelFormat) :
_size(size)
{
flags = 0;
format = pixelFormat;
w = _size.x;
h = _size.y;
pitch = 3;
_pixels.resize(w * h * pitch);
pixels = &_pixels[0];
refcount = 0;
reserved = NULL;
} | O0 | cpp | SDL::Surface::Surface(SDL::Vec2i const&, SDL_PixelFormat):
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x38(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq %rax, 0x30(%rdi)
addq $0x38, %rdi
movq %rdi, -0x30(%rbp)
callq 0x2cda0
movq -0x38(%rbp), %rcx
movq -0x30(%rbp), %rdi
movl $0x0, (%rcx)
movl -0x14(%rbp), %eax
movl %eax, 0x4(%rcx)
movl 0x30(%rcx), %eax
movl %eax, 0x8(%rcx)
movl 0x34(%rcx), %eax
movl %eax, 0xc(%rcx)
movl $0x3, 0x10(%rcx)
movl 0x8(%rcx), %eax
movl 0xc(%rcx), %edx
imull %edx, %eax
movl 0x10(%rcx), %ecx
imull %ecx, %eax
movslq %eax, %rsi
callq 0x2cdc0
jmp 0x2cca3
movq -0x38(%rbp), %rdi
addq $0x38, %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x2ce50
movq %rax, %rcx
movq -0x38(%rbp), %rax
movq %rcx, 0x18(%rax)
movl $0x0, 0x20(%rax)
movq $0x0, 0x28(%rax)
addq $0x40, %rsp
popq %rbp
retq
movq -0x30(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x20(%rbp)
movl %eax, -0x24(%rbp)
callq 0x2ce70
movq -0x20(%rbp), %rdi
callq 0x1a450
nopw %cs:(%rax,%rax)
| _ZN3SDL7SurfaceC2ERKNS_5Vec2iE15SDL_PixelFormat:
push rbp; Alternative name is 'SDL::Surface::Surface(SDL::Vec2i const&, SDL_PixelFormat)'
mov rbp, rsp
sub rsp, 40h
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov [rbp+var_14], edx
mov rdi, [rbp+var_8]
mov [rbp+var_38], rdi
mov rax, [rbp+var_10]
mov rax, [rax]
mov [rdi+30h], rax
add rdi, 38h ; '8'
mov [rbp+var_30], rdi
call _ZNSt6vectorIhSaIhEEC2Ev; std::vector<uchar>::vector(void)
mov rcx, [rbp+var_38]
mov rdi, [rbp+var_30]
mov dword ptr [rcx], 0
mov eax, [rbp+var_14]
mov [rcx+4], eax
mov eax, [rcx+30h]
mov [rcx+8], eax
mov eax, [rcx+34h]
mov [rcx+0Ch], eax
mov dword ptr [rcx+10h], 3
mov eax, [rcx+8]
mov edx, [rcx+0Ch]
imul eax, edx
mov ecx, [rcx+10h]
imul eax, ecx
movsxd rsi, eax
call _ZNSt6vectorIhSaIhEE6resizeEm; std::vector<uchar>::resize(ulong)
jmp short $+2
loc_2CCA3:
mov rdi, [rbp+var_38]
add rdi, 38h ; '8'
xor eax, eax
mov esi, eax
call _ZNSt6vectorIhSaIhEEixEm; std::vector<uchar>::operator[](ulong)
mov rcx, rax
mov rax, [rbp+var_38]
mov [rax+18h], rcx
mov dword ptr [rax+20h], 0
mov qword ptr [rax+28h], 0
add rsp, 40h
pop rbp
retn
mov rdi, [rbp+var_30]
mov rcx, rax
mov eax, edx
mov [rbp+var_20], rcx
mov [rbp+var_24], eax
call _ZNSt6vectorIhSaIhEED2Ev; std::vector<uchar>::~vector()
mov rdi, [rbp+var_20]
call __Unwind_Resume
| long long SDL::Surface::Surface(long long a1, _QWORD *a2, int a3)
{
long long v3; // rcx
long long result; // rax
*(_QWORD *)(a1 + 48) = *a2;
std::vector<unsigned char>::vector();
*(_DWORD *)a1 = 0;
*(_DWORD *)(a1 + 4) = a3;
*(_DWORD *)(a1 + 8) = *(_DWORD *)(a1 + 48);
*(_DWORD *)(a1 + 12) = *(_DWORD *)(a1 + 52);
*(_DWORD *)(a1 + 16) = 3;
std::vector<unsigned char>::resize(a1 + 56, *(_DWORD *)(a1 + 16) * *(_DWORD *)(a1 + 12) * *(_DWORD *)(a1 + 8));
v3 = std::vector<unsigned char>::operator[](a1 + 56, 0LL);
result = a1;
*(_QWORD *)(a1 + 24) = v3;
*(_DWORD *)(a1 + 32) = 0;
*(_QWORD *)(a1 + 40) = 0LL;
return result;
}
| Surface:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x40
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV dword ptr [RBP + -0x14],EDX
MOV RDI,qword ptr [RBP + -0x8]
MOV qword ptr [RBP + -0x38],RDI
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RDI + 0x30],RAX
ADD RDI,0x38
MOV qword ptr [RBP + -0x30],RDI
CALL 0x0012cda0
MOV RCX,qword ptr [RBP + -0x38]
MOV RDI,qword ptr [RBP + -0x30]
MOV dword ptr [RCX],0x0
MOV EAX,dword ptr [RBP + -0x14]
MOV dword ptr [RCX + 0x4],EAX
MOV EAX,dword ptr [RCX + 0x30]
MOV dword ptr [RCX + 0x8],EAX
MOV EAX,dword ptr [RCX + 0x34]
MOV dword ptr [RCX + 0xc],EAX
MOV dword ptr [RCX + 0x10],0x3
MOV EAX,dword ptr [RCX + 0x8]
MOV EDX,dword ptr [RCX + 0xc]
IMUL EAX,EDX
MOV ECX,dword ptr [RCX + 0x10]
IMUL EAX,ECX
MOVSXD RSI,EAX
LAB_0012cc9c:
CALL 0x0012cdc0
LAB_0012cca1:
JMP 0x0012cca3
LAB_0012cca3:
MOV RDI,qword ptr [RBP + -0x38]
ADD RDI,0x38
XOR EAX,EAX
MOV ESI,EAX
CALL 0x0012ce50
MOV RCX,RAX
MOV RAX,qword ptr [RBP + -0x38]
MOV qword ptr [RAX + 0x18],RCX
MOV dword ptr [RAX + 0x20],0x0
MOV qword ptr [RAX + 0x28],0x0
ADD RSP,0x40
POP RBP
RET
|
/* SDL::Surface::Surface(SDL::Vec2i const&, SDL_PixelFormat) */
void __thiscall SDL::Surface::Surface(Surface *this,int8 *param_1,int4 param_3)
{
int8 uVar1;
*(int8 *)(this + 0x30) = *param_1;
std::vector<unsigned_char,std::allocator<unsigned_char>>::vector
((vector<unsigned_char,std::allocator<unsigned_char>> *)(this + 0x38));
*(int4 *)this = 0;
*(int4 *)(this + 4) = param_3;
*(int4 *)(this + 8) = *(int4 *)(this + 0x30);
*(int4 *)(this + 0xc) = *(int4 *)(this + 0x34);
*(int4 *)(this + 0x10) = 3;
/* try { // try from 0012cc9c to 0012cca0 has its CatchHandler @ 0012ccd4 */
std::vector<unsigned_char,std::allocator<unsigned_char>>::resize
((vector<unsigned_char,std::allocator<unsigned_char>> *)(this + 0x38),
(long)(*(int *)(this + 8) * *(int *)(this + 0xc) * *(int *)(this + 0x10)));
uVar1 = std::vector<unsigned_char,std::allocator<unsigned_char>>::operator[]
((vector<unsigned_char,std::allocator<unsigned_char>> *)(this + 0x38),0);
*(int8 *)(this + 0x18) = uVar1;
*(int4 *)(this + 0x20) = 0;
*(int8 *)(this + 0x28) = 0;
return;
}
| |
47,807 | JS_MarkValue | bluesky950520[P]quickjs/quickjs.c | void JS_MarkValue(JSRuntime *rt, JSValue val, JS_MarkFunc *mark_func)
{
if (JS_VALUE_HAS_REF_COUNT(val)) {
switch(JS_VALUE_GET_TAG(val)) {
case JS_TAG_OBJECT:
case JS_TAG_FUNCTION_BYTECODE:
mark_func(rt, JS_VALUE_GET_PTR(val));
break;
default:
break;
}
}
} | O0 | c | JS_MarkValue:
subq $0x28, %rsp
movq %rsi, 0x18(%rsp)
movq %rdx, 0x20(%rsp)
movq %rdi, 0x10(%rsp)
movq %rcx, 0x8(%rsp)
movq 0x20(%rsp), %rax
cmpl $-0x9, %eax
jb 0x29967
movl 0x20(%rsp), %eax
addl $0x2, %eax
subl $0x1, %eax
ja 0x29963
jmp 0x29950
movq 0x8(%rsp), %rax
movq 0x10(%rsp), %rdi
movq 0x18(%rsp), %rsi
callq *%rax
jmp 0x29965
jmp 0x29965
jmp 0x29967
addq $0x28, %rsp
retq
nopl (%rax)
| JS_MarkValue:
sub rsp, 28h
mov [rsp+28h+var_10], rsi
mov [rsp+28h+var_8], rdx
mov [rsp+28h+var_18], rdi
mov [rsp+28h+var_20], rcx
mov rax, [rsp+28h+var_8]
cmp eax, 0FFFFFFF7h
jb short loc_29967
mov eax, dword ptr [rsp+28h+var_8]
add eax, 2
sub eax, 1
ja short loc_29963
jmp short $+2
loc_29950:
mov rax, [rsp+28h+var_20]
mov rdi, [rsp+28h+var_18]
mov rsi, [rsp+28h+var_10]
call rax
jmp short loc_29965
loc_29963:
jmp short $+2
loc_29965:
jmp short $+2
loc_29967:
add rsp, 28h
retn
| long long JS_MarkValue(long long a1, long long a2, long long a3, long long ( *a4)(long long, long long))
{
long long result; // rax
result = a3;
if ( (unsigned int)a3 >= 0xFFFFFFF7 )
{
result = (unsigned int)(a3 + 1);
if ( (_DWORD)a3 == -2 || (_DWORD)a3 == -1 )
return a4(a1, a2);
}
return result;
}
| JS_MarkValue:
SUB RSP,0x28
MOV qword ptr [RSP + 0x18],RSI
MOV qword ptr [RSP + 0x20],RDX
MOV qword ptr [RSP + 0x10],RDI
MOV qword ptr [RSP + 0x8],RCX
MOV RAX,qword ptr [RSP + 0x20]
CMP EAX,-0x9
JC 0x00129967
MOV EAX,dword ptr [RSP + 0x20]
ADD EAX,0x2
SUB EAX,0x1
JA 0x00129963
JMP 0x00129950
LAB_00129950:
MOV RAX,qword ptr [RSP + 0x8]
MOV RDI,qword ptr [RSP + 0x10]
MOV RSI,qword ptr [RSP + 0x18]
CALL RAX
JMP 0x00129965
LAB_00129963:
JMP 0x00129965
LAB_00129965:
JMP 0x00129967
LAB_00129967:
ADD RSP,0x28
RET
|
void JS_MarkValue(int8 param_1,int8 param_2,uint param_3,code *param_4)
{
if ((0xfffffff6 < param_3) && (0xfffffffd < param_3)) {
(*param_4)(param_1,param_2);
}
return;
}
| |
47,808 | JS_MarkValue | bluesky950520[P]quickjs/quickjs.c | void JS_MarkValue(JSRuntime *rt, JSValue val, JS_MarkFunc *mark_func)
{
if (JS_VALUE_HAS_REF_COUNT(val)) {
switch(JS_VALUE_GET_TAG(val)) {
case JS_TAG_OBJECT:
case JS_TAG_FUNCTION_BYTECODE:
mark_func(rt, JS_VALUE_GET_PTR(val));
break;
default:
break;
}
}
} | O3 | c | JS_MarkValue:
notl %edx
testl $0xfffffffe, %edx # imm = 0xFFFFFFFE
jne 0x20ebf
jmpq *%rcx
retq
| JS_MarkValue:
not edx
test edx, 0FFFFFFFEh
jnz short locret_20EBF
jmp rcx
locret_20EBF:
retn
| long long JS_MarkValue(long long a1, long long a2, int a3, long long (*a4)(void))
{
long long result; // rax
if ( (~a3 & 0xFFFFFFFE) == 0 )
return a4();
return result;
}
| JS_MarkValue:
NOT EDX
TEST EDX,0xfffffffe
JNZ 0x00120ebf
JMP RCX
LAB_00120ebf:
RET
|
void JS_MarkValue(int8 param_1,int8 param_2,uint param_3,code *UNRECOVERED_JUMPTABLE)
{
if ((~param_3 & 0xfffffffe) == 0) {
/* WARNING: Could not recover jumptable at 0x00120ebd. Too many branches */
/* WARNING: Treating indirect jump as call */
(*UNRECOVERED_JUMPTABLE)();
return;
}
return;
}
| |
47,809 | psi_rwlock_trywrlock | eloqsql/mysys/my_thr_init.c | ATTRIBUTE_COLD
int psi_rwlock_trywrlock(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_TRYWRITELOCK, file, line);
int result= rw_trywrlock(&that->m_rwlock);
if (locker)
PSI_RWLOCK_CALL(end_rwlock_wrwait)(locker, result);
return result;
} | O0 | c | psi_rwlock_trywrlock:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
leaq 0x1cab26(%rip), %rax # 0x2c75a0
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 $0x3, %edx
callq *%rax
movq %rax, -0x50(%rbp)
movq -0x8(%rbp), %rdi
callq 0x1001e0
movl %eax, -0x54(%rbp)
cmpq $0x0, -0x50(%rbp)
je 0xfcad3
leaq 0x1caae0(%rip), %rax # 0x2c75a0
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_trywrlock:
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, 3
call rax
mov [rbp+var_50], rax
mov rdi, [rbp+var_8]
call my_rw_trywrlock
mov [rbp+var_54], eax
cmp [rbp+var_50], 0
jz short loc_FCAD3
lea rax, PSI_server
mov rax, [rax]
mov rax, [rax+1B8h]
mov rdi, [rbp+var_50]
mov esi, [rbp+var_54]
call rax
loc_FCAD3:
mov eax, [rbp+var_54]
add rsp, 60h
pop rbp
retn
| long long psi_rwlock_trywrlock(long long a1, long long a2, unsigned int a3)
{
unsigned int v4; // [rsp+Ch] [rbp-54h]
long long v5; // [rsp+10h] [rbp-50h]
_BYTE v6[52]; // [rsp+18h] [rbp-48h] BYREF
unsigned int v7; // [rsp+4Ch] [rbp-14h]
long long v8; // [rsp+50h] [rbp-10h]
long long v9; // [rsp+58h] [rbp-8h]
v9 = a1;
v8 = a2;
v7 = a3;
v5 = ((long long ( *)(_BYTE *, _QWORD, long long, long long, _QWORD))PSI_server[54])(
v6,
*(_QWORD *)(a1 + 144),
3LL,
a2,
a3);
v4 = my_rw_trywrlock(v9);
if ( v5 )
((void ( *)(long long, _QWORD))PSI_server[55])(v5, v4);
return v4;
}
| psi_rwlock_trywrlock:
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,[0x3c75a0]
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,0x3
CALL RAX
MOV qword ptr [RBP + -0x50],RAX
MOV RDI,qword ptr [RBP + -0x8]
CALL 0x002001e0
MOV dword ptr [RBP + -0x54],EAX
CMP qword ptr [RBP + -0x50],0x0
JZ 0x001fcad3
LEA RAX,[0x3c75a0]
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_001fcad3:
MOV EAX,dword ptr [RBP + -0x54]
ADD RSP,0x60
POP RBP
RET
|
int4 psi_rwlock_trywrlock(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),3,param_2,param_3);
uVar1 = my_rw_trywrlock(local_10);
if (lVar2 != 0) {
(**(code **)(PSI_server + 0x1b8))(lVar2,uVar1);
}
return uVar1;
}
| |
47,810 | JS_EvalThis | bluesky950520[P]quickjs/quickjs.c | JSValue JS_EvalThis(JSContext *ctx, JSValue this_obj,
const char *input, size_t input_len,
const char *filename, int eval_flags)
{
JSValue ret;
assert((eval_flags & JS_EVAL_TYPE_MASK) == JS_EVAL_TYPE_GLOBAL ||
(eval_flags & JS_EVAL_TYPE_MASK) == JS_EVAL_TYPE_MODULE);
ret = JS_EvalInternal(ctx, this_obj, input, input_len, filename,
eval_flags, -1);
return ret;
} | O2 | c | JS_EvalThis:
pushq %rax
movl 0x10(%rsp), %eax
pushq $-0x1
pushq %rax
callq 0x299cd
popq %rcx
popq %rsi
popq %rcx
retq
| JS_EvalThis:
push rax
mov eax, [rsp+8+arg_0]
push 0FFFFFFFFFFFFFFFFh
push rax
call JS_EvalInternal
pop rcx
pop rsi
pop rcx
retn
| long long JS_EvalThis(int a1, int a2, int a3, int a4, int a5, int a6, int a7)
{
return JS_EvalInternal(a1, a2, a3, a4, a5, a6, a7, -1);
}
| JS_EvalThis:
PUSH RAX
MOV EAX,dword ptr [RSP + 0x10]
PUSH -0x1
PUSH RAX
CALL 0x001299cd
POP RCX
POP RSI
POP RCX
RET
|
void JS_EvalThis(void)
{
JS_EvalInternal();
return;
}
| |
47,811 | minja::Parser::parseValueExpression()::'lambda'()::operator()() const | llama.cpp/common/minja/minja.hpp | std::shared_ptr<Expression> parseValueExpression() {
auto parseValue = [&]() -> std::shared_ptr<Expression> {
auto location = get_location();
auto constant = parseConstant();
if (constant) return std::make_shared<LiteralExpr>(location, *constant);
static std::regex null_regex(R"(null\b)");
if (!consumeToken(null_regex).empty()) return std::make_shared<LiteralExpr>(location, Value());
auto identifier = parseIdentifier();
if (identifier) return identifier;
auto braced = parseBracedExpressionOrArray();
if (braced) return braced;
auto array = parseArray();
if (array) return array;
auto dictionary = parseDictionary();
if (dictionary) return dictionary;
throw std::runtime_error("Expected value expression");
};
auto value = parseValue();
while (it != end && consumeSpaces() && peekSymbols({ "[", "." })) {
if (!consumeToken("[").empty()) {
std::shared_ptr<Expression> index;
if (!consumeToken(":").empty()) {
auto slice_end = parseExpression();
index = std::make_shared<SliceExpr>(slice_end->location, nullptr, std::move(slice_end));
} else {
auto slice_start = parseExpression();
if (!consumeToken(":").empty()) {
consumeSpaces();
if (peekSymbols({ "]" })) {
index = std::make_shared<SliceExpr>(slice_start->location, std::move(slice_start), nullptr);
} else {
auto slice_end = parseExpression();
index = std::make_shared<SliceExpr>(slice_start->location, std::move(slice_start), std::move(slice_end));
}
} else {
index = std::move(slice_start);
}
}
if (!index) throw std::runtime_error("Empty index in subscript");
if (consumeToken("]").empty()) throw std::runtime_error("Expected closing bracket in subscript");
value = std::make_shared<SubscriptExpr>(value->location, std::move(value), std::move(index));
} else if (!consumeToken(".").empty()) {
auto identifier = parseIdentifier();
if (!identifier) throw std::runtime_error("Expected identifier in subscript");
consumeSpaces();
if (peekSymbols({ "(" })) {
auto callParams = parseCallArgs();
value = std::make_shared<MethodCallExpr>(identifier->location, std::move(value), std::move(identifier), std::move(callParams));
} else {
auto key = std::make_shared<LiteralExpr>(identifier->location, Value(identifier->get_name()));
value = std::make_shared<SubscriptExpr>(identifier->location, std::move(value), std::move(key));
}
}
consumeSpaces();
}
if (peekSymbols({ "(" })) {
auto location = get_location();
auto callParams = parseCallArgs();
value = std::make_shared<CallExpr>(location, std::move(value), std::move(callParams));
}
return value;
} | O3 | cpp | minja::Parser::parseValueExpression()::'lambda'()::operator()() const:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xa0, %rsp
movq %rdi, %r14
movq (%rsi), %r15
movq (%r15), %rax
movq %rax, 0x88(%rsp)
movq 0x8(%r15), %rax
movq %rax, 0x90(%rsp)
testq %rax, %rax
je 0xec079
movq 0x81f2d(%rip), %rcx # 0x16df98
cmpb $0x0, (%rcx)
je 0xec075
incl 0x8(%rax)
jmp 0xec079
lock
incl 0x8(%rax)
leaq 0x90(%rsp), %rbx
movq 0x20(%r15), %rax
subq 0x10(%r15), %rax
movq %rax, 0x8(%rbx)
leaq 0x78(%rsp), %rdi
movq %r15, %rsi
callq 0xecac2
movq 0x78(%rsp), %r8
testq %r8, %r8
je 0xec10f
leaq 0x28(%rsp), %r15
movq $0x0, -0x8(%r15)
leaq 0x20(%rsp), %rsi
movq %rsp, %rdx
leaq 0x88(%rsp), %rcx
movq %r15, %rdi
callq 0xee900
movaps 0x20(%rsp), %xmm0
xorl %eax, %eax
movq %rax, 0x28(%rsp)
movups %xmm0, (%r14)
movq %rax, 0x20(%rsp)
movq %r15, %rdi
callq 0x46496
leaq 0x80(%rsp), %rdi
callq 0x46496
movq %rbx, %rdi
callq 0x46496
movq %r14, %rax
addq $0xa0, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
leaq 0x8358a(%rip), %rax # 0x16f6a0
movb (%rax), %al
testb %al, %al
je 0xec31a
leaq 0x83559(%rip), %rdx # 0x16f680
leaq 0x20(%rsp), %rdi
movq %r15, %rsi
movl $0x1, %ecx
callq 0xe76bc
leaq 0x30(%rsp), %rax
movq -0x10(%rax), %rdi
movq -0x8(%rax), %r12
cmpq %rax, %rdi
je 0xec158
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x21180
testq %r12, %r12
je 0xec23b
leaq 0x60(%rsp), %r15
xorl %r13d, %r13d
movq %r13, 0x8(%r15)
xorps %xmm0, %xmm0
movaps %xmm0, -0x40(%r15)
movaps %xmm0, -0x30(%r15)
movaps %xmm0, -0x20(%r15)
movaps %xmm0, -0x10(%r15)
movb $0x0, (%r15)
movq %r15, %rdi
movl $0x1, %esi
callq 0x9524a
movq %r15, %rdi
movl $0x1, %esi
callq 0x9524a
leaq 0x8(%rsp), %r12
movq %r13, -0x8(%r12)
movq %rsp, %rsi
leaq 0x10(%rsp), %rdx
leaq 0x88(%rsp), %rcx
leaq 0x20(%rsp), %r8
movq %r12, %rdi
callq 0xf3f0c
movaps (%rsp), %xmm0
xorl %eax, %eax
movq %rax, 0x8(%rsp)
movups %xmm0, (%r14)
movq %rax, (%rsp)
movq %r12, %rdi
callq 0x46496
movq %r15, %rdi
xorl %esi, %esi
callq 0x9524a
movq %r15, %rdi
callq 0x3488a
leaq 0x58(%rsp), %rdi
callq 0x46496
leaq 0x48(%rsp), %rdi
callq 0x46496
leaq 0x38(%rsp), %r15
movq %r15, %rdi
callq 0x46496
movq -0x10(%r15), %rdi
testq %rdi, %rdi
je 0xec0e6
movq 0x81d6d(%rip), %rax # 0x16df98
cmpb $0x0, (%rax)
je 0xec26f
movl 0xc(%rdi), %eax
leal -0x1(%rax), %ecx
movl %ecx, 0xc(%rdi)
jmp 0xec279
leaq 0x20(%rsp), %rdi
movq %r15, %rsi
callq 0xe7dce
movq 0x20(%rsp), %rax
testq %rax, %rax
je 0xec28d
movq %rax, (%r14)
movq 0x28(%rsp), %rax
xorl %ecx, %ecx
movq %rcx, 0x28(%rsp)
movq %rax, 0x8(%r14)
movq %rcx, 0x20(%rsp)
jmp 0xec310
movl $0xffffffff, %eax # imm = 0xFFFFFFFF
lock
xaddl %eax, 0xc(%rdi)
cmpl $0x1, %eax
jne 0xec0e6
movq (%rdi), %rax
callq *0x18(%rax)
jmp 0xec0e6
movq %rsp, %rdi
movq %r15, %rsi
callq 0xece1e
movq (%rsp), %rax
testq %rax, %rax
je 0xec2ba
movq %rax, (%r14)
movq 0x8(%rsp), %rax
xorl %ecx, %ecx
movq %rcx, 0x8(%rsp)
movq %rax, 0x8(%r14)
movq %rcx, (%rsp)
jmp 0xec306
leaq 0x10(%rsp), %rdi
movq %r15, %rsi
callq 0xed39a
movq 0x10(%rsp), %rax
testq %rax, %rax
je 0xec2eb
movq %rax, (%r14)
movq 0x18(%rsp), %rax
xorl %ecx, %ecx
movq %rcx, 0x18(%rsp)
movq %rax, 0x8(%r14)
movq %rcx, 0x10(%rsp)
jmp 0xec2fc
movq %r14, %rdi
movq %r15, %rsi
callq 0xed9fa
cmpq $0x0, (%r14)
je 0xec371
leaq 0x18(%rsp), %rdi
callq 0x46496
leaq 0x8(%rsp), %rdi
callq 0x46496
leaq 0x28(%rsp), %rdi
jmp 0xec0e1
leaq 0x8337f(%rip), %rdi # 0x16f6a0
callq 0x215a0
testl %eax, %eax
je 0xec120
leaq 0x8334b(%rip), %rdi # 0x16f680
leaq 0x3f46e(%rip), %rsi # 0x12b7aa
movl $0x10, %edx
callq 0x2d298
leaq -0x6812d(%rip), %rdi # 0x84220
leaq 0x8332c(%rip), %rsi # 0x16f680
leaq 0x8273d(%rip), %rdx # 0x16ea98
callq 0x21f30
leaq 0x83339(%rip), %rdi # 0x16f6a0
callq 0x21990
jmp 0xec120
movl $0x10, %edi
callq 0x21660
movq %rax, %r12
leaq 0x3f42c(%rip), %rsi # 0x12b7b1
movq %rax, %rdi
callq 0x21430
movq 0x81c2c(%rip), %rsi # 0x16dfc0
movq 0x81be5(%rip), %rdx # 0x16df80
movq %r12, %rdi
callq 0x21a80
movq %rax, %r15
leaq 0x832f3(%rip), %rdi # 0x16f6a0
callq 0x216e0
jmp 0xec415
movq %rax, %r15
jmp 0xec3c4
movq %rax, %r15
movq %r12, %rdi
callq 0x21f50
addq $0x8, %r14
movq %r14, %rdi
callq 0x46496
jmp 0xec3d5
movq %rax, %r15
leaq 0x18(%rsp), %rdi
callq 0x46496
jmp 0xec3e4
movq %rax, %r15
leaq 0x8(%rsp), %rdi
callq 0x46496
jmp 0xec3f3
movq %rax, %r15
leaq 0x28(%rsp), %rdi
callq 0x46496
jmp 0xec415
jmp 0xec412
movq %rax, %r15
leaq 0x20(%rsp), %rdi
callq 0xc03a8
jmp 0xec415
jmp 0xec412
movq %rax, %r15
leaq 0x80(%rsp), %rdi
callq 0x46496
jmp 0xec427
movq %rax, %r15
movq %rbx, %rdi
callq 0x46496
movq %r15, %rdi
callq 0x21b20
nop
| _ZZN5minja6Parser20parseValueExpressionEvENKUlvE_clEv:
push r15
push r14
push r13
push r12
push rbx
sub rsp, 0A0h
mov r14, rdi
mov r15, [rsi]
mov rax, [r15]
mov [rsp+0C8h+var_40], rax
mov rax, [r15+8]
mov [rsp+0C8h+var_38], rax
test rax, rax
jz short loc_EC079
mov rcx, cs:_ZTISt19_Sp_make_shared_tag; `typeinfo for'std::_Sp_make_shared_tag
cmp byte ptr [rcx], 0
jz short loc_EC075
inc dword ptr [rax+8]
jmp short loc_EC079
loc_EC075:
lock inc dword ptr [rax+8]
loc_EC079:
lea rbx, [rsp+0C8h+var_38]
mov rax, [r15+20h]
sub rax, [r15+10h]
mov [rbx+8], rax
lea rdi, [rsp+0C8h+var_50]; this
mov rsi, r15
call _ZN5minja6Parser13parseConstantEv; minja::Parser::parseConstant(void)
mov r8, qword ptr [rsp+0C8h+var_50]; int
test r8, r8
jz short loc_EC10F
lea r15, [rsp+0C8h+var_A8+8]
mov qword ptr [r15-8], 0
lea rsi, [rsp+0C8h+var_A8]
mov rdx, rsp
lea rcx, [rsp+0C8h+var_40]
mov rdi, r15
call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EEC2IN5minja11LiteralExprESaIvEJRNS4_8LocationERNS4_5ValueEEEERPT_St20_Sp_alloc_shared_tagIT0_EDpOT1_; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::__shared_count<minja::LiteralExpr,std::allocator<void>,minja::Location &,minja::Value &>(minja::LiteralExpr *&,std::_Sp_alloc_shared_tag<std::allocator<void>>,minja::Location &,minja::Value &)
movaps xmm0, xmmword ptr [rsp+0C8h+var_A8]
xor eax, eax
mov qword ptr [rsp+0C8h+var_A8+8], rax
movups xmmword ptr [r14], xmm0
mov qword ptr [rsp+0C8h+var_A8], rax
mov rdi, r15
loc_EC0E1:
call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count()
loc_EC0E6:
lea rdi, [rsp+0C8h+var_48]
call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count()
mov rdi, rbx
call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count()
mov rax, r14
add rsp, 0A0h
pop rbx
pop r12
pop r13
pop r14
pop r15
retn
loc_EC10F:
lea rax, _ZGVZZN5minja6Parser20parseValueExpressionEvENKUlvE_clEvE10null_regexB5cxx11; `guard variable for'minja::Parser::parseValueExpression(void)::{lambda(void)#1}::operator() const(void)::null_regex
mov al, [rax]
test al, al
jz loc_EC31A
loc_EC120:
lea rdx, _ZZZN5minja6Parser20parseValueExpressionEvENKUlvE_clEvE10null_regexB5cxx11; int
lea rdi, [rsp+0C8h+var_A8]; int
mov rsi, r15; 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 rax, [rsp+0C8h+var_98]
mov rdi, [rax-10h]; void *
mov r12, [rax-8]
cmp rdi, rax
jz short loc_EC158
mov rsi, [rsp+0C8h+var_98]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_EC158:
test r12, r12
jz loc_EC23B
lea r15, [rsp+0C8h+var_68]
xor r13d, r13d
mov [r15+8], r13
xorps xmm0, xmm0
movaps xmmword ptr [r15-40h], xmm0
movaps xmmword ptr [r15-30h], xmm0
movaps xmmword ptr [r15-20h], xmm0
movaps xmmword ptr [r15-10h], xmm0
mov byte ptr [r15], 0
mov rdi, r15
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, r15
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)
lea r12, [rsp+0C8h+var_C0]
mov [r12-8], r13
mov rsi, rsp
lea rdx, [rsp+0C8h+var_B8]
lea rcx, [rsp+0C8h+var_40]
lea r8, [rsp+0C8h+var_A8]
mov rdi, r12
call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EEC2IN5minja11LiteralExprESaIvEJRNS4_8LocationENS4_5ValueEEEERPT_St20_Sp_alloc_shared_tagIT0_EDpOT1_; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::__shared_count<minja::LiteralExpr,std::allocator<void>,minja::Location &,minja::Value>(minja::LiteralExpr *&,std::_Sp_alloc_shared_tag<std::allocator<void>>,minja::Location &,minja::Value &&)
movaps xmm0, xmmword ptr [rsp]
xor eax, eax
mov [rsp+0C8h+var_C0], rax
movups xmmword ptr [r14], xmm0
mov [rsp+0C8h+var_C8], rax
mov rdi, r12
call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count()
mov rdi, r15
xor esi, esi
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool)
mov rdi, r15
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::data::~data()
lea rdi, [rsp+0C8h+var_70]
call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count()
lea rdi, [rsp+0C8h+var_80]
call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count()
lea r15, [rsp+0C8h+var_90]
mov rdi, r15
call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count()
mov rdi, [r15-10h]
test rdi, rdi
jz loc_EC0E6
mov rax, cs:_ZTISt19_Sp_make_shared_tag; `typeinfo for'std::_Sp_make_shared_tag
cmp byte ptr [rax], 0
jz short loc_EC26F
mov eax, [rdi+0Ch]
lea ecx, [rax-1]
mov [rdi+0Ch], ecx
jmp short loc_EC279
loc_EC23B:
lea rdi, [rsp+0C8h+var_A8]; this
mov rsi, r15
call _ZN5minja6Parser15parseIdentifierEv; minja::Parser::parseIdentifier(void)
mov rax, qword ptr [rsp+0C8h+var_A8]
test rax, rax
jz short loc_EC28D
mov [r14], rax
mov rax, qword ptr [rsp+0C8h+var_A8+8]
xor ecx, ecx
mov qword ptr [rsp+0C8h+var_A8+8], rcx
mov [r14+8], rax
mov qword ptr [rsp+0C8h+var_A8], rcx
jmp loc_EC310
loc_EC26F:
mov eax, 0FFFFFFFFh
lock xadd [rdi+0Ch], eax
loc_EC279:
cmp eax, 1
jnz loc_EC0E6
mov rax, [rdi]
call qword ptr [rax+18h]
jmp loc_EC0E6
loc_EC28D:
mov rdi, rsp; this
mov rsi, r15
call _ZN5minja6Parser28parseBracedExpressionOrArrayEv; minja::Parser::parseBracedExpressionOrArray(void)
mov rax, [rsp+0C8h+var_C8]
test rax, rax
jz short loc_EC2BA
mov [r14], rax
mov rax, [rsp+0C8h+var_C0]
xor ecx, ecx
mov [rsp+0C8h+var_C0], rcx
mov [r14+8], rax
mov [rsp+0C8h+var_C8], rcx
jmp short loc_EC306
loc_EC2BA:
lea rdi, [rsp+0C8h+var_B8]; this
mov rsi, r15
call _ZN5minja6Parser10parseArrayEv; minja::Parser::parseArray(void)
mov rax, [rsp+0C8h+var_B8]
test rax, rax
jz short loc_EC2EB
mov [r14], rax
mov rax, [rsp+0C8h+var_B0]
xor ecx, ecx
mov [rsp+0C8h+var_B0], rcx
mov [r14+8], rax
mov [rsp+0C8h+var_B8], rcx
jmp short loc_EC2FC
loc_EC2EB:
mov rdi, r14; this
mov rsi, r15
call _ZN5minja6Parser15parseDictionaryEv; minja::Parser::parseDictionary(void)
cmp qword ptr [r14], 0
jz short loc_EC371
loc_EC2FC:
lea rdi, [rsp+0C8h+var_B0]
call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count()
loc_EC306:
lea rdi, [rsp+0C8h+var_C0]
call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count()
loc_EC310:
lea rdi, [rsp+0C8h+var_A8+8]
jmp loc_EC0E1
loc_EC31A:
lea rdi, _ZGVZZN5minja6Parser20parseValueExpressionEvENKUlvE_clEvE10null_regexB5cxx11; __guard *
call ___cxa_guard_acquire
test eax, eax
jz loc_EC120
lea rdi, _ZZZN5minja6Parser20parseValueExpressionEvENKUlvE_clEvE10null_regexB5cxx11; minja::Parser::parseValueExpression(void)::{lambda(void)#1}::operator() const(void)::null_regex
lea rsi, aNullB; "null\\b"
mov edx, 10h
call _ZNSt7__cxx1111basic_regexIcNS_12regex_traitsIcEEEC2EPKcNSt15regex_constants18syntax_option_typeE; std::basic_regex<char,std::regex_traits<char>>::basic_regex(char const*,std::regex_constants::syntax_option_type)
lea rdi, _ZNSt7__cxx1111basic_regexIcNS_12regex_traitsIcEEED2Ev; lpfunc
lea rsi, _ZZZN5minja6Parser20parseValueExpressionEvENKUlvE_clEvE10null_regexB5cxx11; obj
lea rdx, __dso_handle; lpdso_handle
call ___cxa_atexit
lea rdi, _ZGVZZN5minja6Parser20parseValueExpressionEvENKUlvE_clEvE10null_regexB5cxx11; __guard *
call ___cxa_guard_release
jmp loc_EC120
loc_EC371:
mov edi, 10h; thrown_size
call ___cxa_allocate_exception
mov r12, rax
lea rsi, aExpectedValueE; "Expected value 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, r12; void *
call ___cxa_throw
mov r15, rax
lea rdi, _ZGVZZN5minja6Parser20parseValueExpressionEvENKUlvE_clEvE10null_regexB5cxx11; __guard *
call ___cxa_guard_abort
jmp short loc_EC415
mov r15, rax
jmp short loc_EC3C4
mov r15, rax
mov rdi, r12; void *
call ___cxa_free_exception
loc_EC3C4:
add r14, 8
mov rdi, r14
call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count()
jmp short loc_EC3D5
mov r15, rax
loc_EC3D5:
lea rdi, [rsp+0C8h+var_B0]
call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count()
jmp short loc_EC3E4
mov r15, rax
loc_EC3E4:
lea rdi, [rsp+0C8h+var_C0]
call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count()
jmp short loc_EC3F3
mov r15, rax
loc_EC3F3:
lea rdi, [rsp+0C8h+var_A8+8]
call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count()
jmp short loc_EC415
jmp short loc_EC412
mov r15, rax
lea rdi, [rsp+0C8h+var_A8]; this
call _ZN5minja5ValueD2Ev; minja::Value::~Value()
jmp short loc_EC415
jmp short $+2
loc_EC412:
mov r15, rax
loc_EC415:
lea rdi, [rsp+0C8h+var_48]
call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count()
jmp short loc_EC427
mov r15, rax
loc_EC427:
mov rdi, rbx
call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count()
mov rdi, r15
call __Unwind_Resume
| minja::Parser * minja::Parser::parseValueExpression(void)::{lambda(void)#1}::operator()(
minja::Parser *this,
long long **a2)
{
long long *v3; // r15
volatile signed __int32 *v4; // rax
__int128 v5; // xmm0
long long v7; // r12
__int128 v8; // xmm0
long long v9; // rdi
signed __int32 v10; // eax
long long v11; // rax
long long v12; // rax
volatile signed __int32 *v13; // rax
std::runtime_error *exception; // r12
__int128 v15; // [rsp+0h] [rbp-C8h] BYREF
long long v16; // [rsp+10h] [rbp-B8h] BYREF
volatile signed __int32 *v17; // [rsp+18h] [rbp-B0h] BYREF
int v18[4]; // [rsp+20h] [rbp-A8h] BYREF
__int128 v19; // [rsp+30h] [rbp-98h] BYREF
__int128 v20; // [rsp+40h] [rbp-88h] BYREF
__int128 v21; // [rsp+50h] [rbp-78h] BYREF
char v22[8]; // [rsp+60h] [rbp-68h] BYREF
long long v23; // [rsp+68h] [rbp-60h]
int v24[2]; // [rsp+78h] [rbp-50h] BYREF
volatile signed __int32 *v25; // [rsp+80h] [rbp-48h] BYREF
long long v26; // [rsp+88h] [rbp-40h] BYREF
volatile signed __int32 *v27[7]; // [rsp+90h] [rbp-38h] BYREF
v3 = *a2;
v26 = **a2;
v4 = (volatile signed __int32 *)v3[1];
v27[0] = v4;
if ( v4 )
{
if ( _libc_single_threaded )
++*((_DWORD *)v4 + 2);
else
_InterlockedIncrement(v4 + 2);
}
v27[1] = (volatile signed __int32 *)(v3[4] - v3[2]);
minja::Parser::parseConstant((minja::Parser *)v24);
if ( *(_QWORD *)v24 )
{
*(_QWORD *)v18 = 0LL;
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::__shared_count<minja::LiteralExpr,std::allocator<void>,minja::Location &,minja::Value &>(
&v18[2],
v18,
&v15,
&v26);
v5 = *(_OWORD *)v18;
*(_QWORD *)&v18[2] = 0LL;
*(_OWORD *)this = v5;
*(_QWORD *)v18 = 0LL;
LABEL_7:
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count((volatile signed __int32 **)&v18[2]);
goto LABEL_8;
}
if ( !(_BYTE)`guard variable for'minja::Parser::parseValueExpression(void)::{lambda(void)#1}::operator() const(void)::null_regex[abi:cxx11]
&& __cxa_guard_acquire(&`guard variable for'minja::Parser::parseValueExpression(void)::{lambda(void)#1}::operator() const(void)::null_regex[abi:cxx11]) )
{
std::basic_regex<char,std::regex_traits<char>>::basic_regex(
(long long)&minja::Parser::parseValueExpression(void)::{lambda(void)#1}::operator() const(void)::null_regex[abi:cxx11],
(long long)"null\\b",
0x10u);
__cxa_atexit(
(void (*)(void *))std::basic_regex<char,std::regex_traits<char>>::~basic_regex,
&minja::Parser::parseValueExpression(void)::{lambda(void)#1}::operator() const(void)::null_regex[abi:cxx11],
&_dso_handle);
__cxa_guard_release(&`guard variable for'minja::Parser::parseValueExpression(void)::{lambda(void)#1}::operator() const(void)::null_regex[abi:cxx11]);
}
minja::Parser::consumeToken(
v18,
(long long)v3,
(long long)&minja::Parser::parseValueExpression(void)::{lambda(void)#1}::operator() const(void)::null_regex[abi:cxx11],
1u);
v7 = *(_QWORD *)&v18[2];
if ( *(__int128 **)v18 != &v19 )
operator delete(*(void **)v18, v19 + 1);
if ( !v7 )
{
minja::Parser::parseIdentifier((minja::Parser *)v18, v3);
if ( *(_QWORD *)v18 )
{
*(_QWORD *)this = *(_QWORD *)v18;
v11 = *(_QWORD *)&v18[2];
*(_QWORD *)&v18[2] = 0LL;
*((_QWORD *)this + 1) = v11;
*(_QWORD *)v18 = 0LL;
}
else
{
minja::Parser::parseBracedExpressionOrArray((minja::Parser *)&v15);
if ( (_QWORD)v15 )
{
*(_QWORD *)this = v15;
v12 = *((_QWORD *)&v15 + 1);
*((_QWORD *)&v15 + 1) = 0LL;
*((_QWORD *)this + 1) = v12;
*(_QWORD *)&v15 = 0LL;
}
else
{
minja::Parser::parseArray((minja::Parser *)&v16);
if ( v16 )
{
*(_QWORD *)this = v16;
v13 = v17;
v17 = 0LL;
*((_QWORD *)this + 1) = v13;
v16 = 0LL;
}
else
{
minja::Parser::parseDictionary(this);
if ( !*(_QWORD *)this )
{
exception = (std::runtime_error *)__cxa_allocate_exception(0x10uLL);
std::runtime_error::runtime_error(exception, "Expected value expression");
__cxa_throw(
exception,
(struct type_info *)&`typeinfo for'std::runtime_error,
(void (*)(void *))&std::runtime_error::~runtime_error);
}
}
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v17);
}
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count((volatile signed __int32 **)&v15 + 1);
}
goto LABEL_7;
}
v23 = 0LL;
*(_OWORD *)v18 = 0LL;
v19 = 0LL;
v20 = 0LL;
v21 = 0LL;
v22[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(v22);
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::assert_invariant(v22);
*(_QWORD *)&v15 = 0LL;
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::__shared_count<minja::LiteralExpr,std::allocator<void>,minja::Location &,minja::Value>(
(char *)&v15 + 8,
&v15,
&v16,
&v26,
v18);
v8 = v15;
*((_QWORD *)&v15 + 1) = 0LL;
*(_OWORD *)this = v8;
*(_QWORD *)&v15 = 0LL;
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count((volatile signed __int32 **)&v15 + 1);
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::assert_invariant(v22);
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::data::~data(v22);
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count((volatile signed __int32 **)&v21 + 1);
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count((volatile signed __int32 **)&v20 + 1);
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count((volatile signed __int32 **)&v19 + 1);
v9 = *(_QWORD *)&v18[2];
if ( *(_QWORD *)&v18[2] )
{
if ( _libc_single_threaded )
{
v10 = *(_DWORD *)(*(_QWORD *)&v18[2] + 12LL);
*(_DWORD *)(*(_QWORD *)&v18[2] + 12LL) = v10 - 1;
}
else
{
v10 = _InterlockedExchangeAdd((volatile signed __int32 *)(*(_QWORD *)&v18[2] + 12LL), 0xFFFFFFFF);
}
if ( v10 == 1 )
(*(void ( **)(long long, _QWORD))(*(_QWORD *)v9 + 24LL))(v9, 0LL);
}
LABEL_8:
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v25);
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(v27);
return this;
}
| operator():
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0xa0
MOV R14,RDI
MOV R15,qword ptr [RSI]
MOV RAX,qword ptr [R15]
MOV qword ptr [RSP + 0x88],RAX
MOV RAX,qword ptr [R15 + 0x8]
MOV qword ptr [RSP + 0x90],RAX
TEST RAX,RAX
JZ 0x001ec079
MOV RCX,qword ptr [0x0026df98]
CMP byte ptr [RCX],0x0
JZ 0x001ec075
INC dword ptr [RAX + 0x8]
JMP 0x001ec079
LAB_001ec075:
INC.LOCK dword ptr [RAX + 0x8]
LAB_001ec079:
LEA RBX,[RSP + 0x90]
MOV RAX,qword ptr [R15 + 0x20]
SUB RAX,qword ptr [R15 + 0x10]
MOV qword ptr [RBX + 0x8],RAX
LAB_001ec08d:
LEA RDI,[RSP + 0x78]
MOV RSI,R15
CALL 0x001ecac2
MOV R8,qword ptr [RSP + 0x78]
TEST R8,R8
JZ 0x001ec10f
LEA R15,[RSP + 0x28]
MOV qword ptr [R15 + -0x8],0x0
LAB_001ec0b1:
LEA RSI,[RSP + 0x20]
MOV RDX,RSP
LEA RCX,[RSP + 0x88]
MOV RDI,R15
CALL 0x001ee900
MOVAPS XMM0,xmmword ptr [RSP + 0x20]
XOR EAX,EAX
MOV qword ptr [RSP + 0x28],RAX
MOVUPS xmmword ptr [R14],XMM0
MOV qword ptr [RSP + 0x20],RAX
MOV RDI,R15
LAB_001ec0e1:
CALL 0x00146496
LAB_001ec0e6:
LEA RDI,[RSP + 0x80]
CALL 0x00146496
MOV RDI,RBX
CALL 0x00146496
MOV RAX,R14
ADD RSP,0xa0
POP RBX
POP R12
POP R13
POP R14
POP R15
RET
LAB_001ec10f:
LEA RAX,[0x26f6a0]
MOV AL,byte ptr [RAX]
TEST AL,AL
JZ 0x001ec31a
LAB_001ec120:
LEA RDX,[0x26f680]
LEA RDI,[RSP + 0x20]
MOV RSI,R15
MOV ECX,0x1
CALL 0x001e76bc
LEA RAX,[RSP + 0x30]
MOV RDI,qword ptr [RAX + -0x10]
MOV R12,qword ptr [RAX + -0x8]
CMP RDI,RAX
JZ 0x001ec158
MOV RSI,qword ptr [RSP + 0x30]
INC RSI
CALL 0x00121180
LAB_001ec158:
TEST R12,R12
JZ 0x001ec23b
LEA R15,[RSP + 0x60]
XOR R13D,R13D
MOV qword ptr [R15 + 0x8],R13
XORPS XMM0,XMM0
MOVAPS xmmword ptr [R15 + -0x40],XMM0
MOVAPS xmmword ptr [R15 + -0x30],XMM0
MOVAPS xmmword ptr [R15 + -0x20],XMM0
MOVAPS xmmword ptr [R15 + -0x10],XMM0
MOV byte ptr [R15],0x0
MOV RDI,R15
MOV ESI,0x1
CALL 0x0019524a
MOV RDI,R15
MOV ESI,0x1
CALL 0x0019524a
LEA R12,[RSP + 0x8]
MOV qword ptr [R12 + -0x8],R13
LAB_001ec1ac:
MOV RSI,RSP
LEA RDX,[RSP + 0x10]
LEA RCX,[RSP + 0x88]
LEA R8,[RSP + 0x20]
MOV RDI,R12
CALL 0x001f3f0c
MOVAPS XMM0,xmmword ptr [RSP]
XOR EAX,EAX
MOV qword ptr [RSP + 0x8],RAX
MOVUPS xmmword ptr [R14],XMM0
MOV qword ptr [RSP],RAX
MOV RDI,R12
CALL 0x00146496
MOV RDI,R15
XOR ESI,ESI
CALL 0x0019524a
MOV RDI,R15
CALL 0x0013488a
LEA RDI,[RSP + 0x58]
CALL 0x00146496
LEA RDI,[RSP + 0x48]
CALL 0x00146496
LEA R15,[RSP + 0x38]
MOV RDI,R15
CALL 0x00146496
MOV RDI,qword ptr [R15 + -0x10]
TEST RDI,RDI
JZ 0x001ec0e6
MOV RAX,qword ptr [0x0026df98]
CMP byte ptr [RAX],0x0
JZ 0x001ec26f
MOV EAX,dword ptr [RDI + 0xc]
LEA ECX,[RAX + -0x1]
MOV dword ptr [RDI + 0xc],ECX
JMP 0x001ec279
LAB_001ec23b:
LEA RDI,[RSP + 0x20]
MOV RSI,R15
CALL 0x001e7dce
LAB_001ec248:
MOV RAX,qword ptr [RSP + 0x20]
TEST RAX,RAX
JZ 0x001ec28d
MOV qword ptr [R14],RAX
MOV RAX,qword ptr [RSP + 0x28]
XOR ECX,ECX
MOV qword ptr [RSP + 0x28],RCX
MOV qword ptr [R14 + 0x8],RAX
MOV qword ptr [RSP + 0x20],RCX
JMP 0x001ec310
LAB_001ec26f:
MOV EAX,0xffffffff
XADD.LOCK dword ptr [RDI + 0xc],EAX
LAB_001ec279:
CMP EAX,0x1
JNZ 0x001ec0e6
MOV RAX,qword ptr [RDI]
CALL qword ptr [RAX + 0x18]
JMP 0x001ec0e6
LAB_001ec28d:
MOV RDI,RSP
MOV RSI,R15
CALL 0x001ece1e
MOV RAX,qword ptr [RSP]
TEST RAX,RAX
JZ 0x001ec2ba
MOV qword ptr [R14],RAX
MOV RAX,qword ptr [RSP + 0x8]
XOR ECX,ECX
MOV qword ptr [RSP + 0x8],RCX
MOV qword ptr [R14 + 0x8],RAX
MOV qword ptr [RSP],RCX
JMP 0x001ec306
LAB_001ec2ba:
LEA RDI,[RSP + 0x10]
MOV RSI,R15
CALL 0x001ed39a
MOV RAX,qword ptr [RSP + 0x10]
TEST RAX,RAX
JZ 0x001ec2eb
MOV qword ptr [R14],RAX
MOV RAX,qword ptr [RSP + 0x18]
XOR ECX,ECX
MOV qword ptr [RSP + 0x18],RCX
MOV qword ptr [R14 + 0x8],RAX
MOV qword ptr [RSP + 0x10],RCX
JMP 0x001ec2fc
LAB_001ec2eb:
MOV RDI,R14
MOV RSI,R15
CALL 0x001ed9fa
CMP qword ptr [R14],0x0
JZ 0x001ec371
LAB_001ec2fc:
LEA RDI,[RSP + 0x18]
CALL 0x00146496
LAB_001ec306:
LEA RDI,[RSP + 0x8]
CALL 0x00146496
LAB_001ec310:
LEA RDI,[RSP + 0x28]
JMP 0x001ec0e1
LAB_001ec31a:
LEA RDI,[0x26f6a0]
CALL 0x001215a0
TEST EAX,EAX
JZ 0x001ec120
LAB_001ec32e:
LEA RDI,[0x26f680]
LEA RSI,[0x22b7aa]
MOV EDX,0x10
CALL 0x0012d298
LAB_001ec346:
LEA RDI,[0x184220]
LEA RSI,[0x26f680]
LEA RDX,[0x26ea98]
CALL 0x00121f30
LEA RDI,[0x26f6a0]
CALL 0x00121990
JMP 0x001ec120
LAB_001ec371:
MOV EDI,0x10
CALL 0x00121660
MOV R12,RAX
LAB_001ec37e:
LEA RSI,[0x22b7b1]
MOV RDI,RAX
CALL 0x00121430
LAB_001ec38d:
MOV RSI,qword ptr [0x0026dfc0]
MOV RDX,qword ptr [0x0026df80]
MOV RDI,R12
CALL 0x00121a80
|
/* minja::Parser::parseValueExpression()::{lambda()#1}::TEMPNAMEPLACEHOLDERVALUE() const */
_lambda___1_ * __thiscall
minja::Parser::parseValueExpression()::{lambda()#1}::operator()(_lambda___1_ *this)
{
int *piVar1;
int8 *puVar2;
int8 uVar3;
long *plVar4;
int iVar5;
runtime_error *this_00;
long *in_RSI;
bool bVar6;
long local_c8;
int8 uStack_c0;
long local_b8;
int8 local_b0;
long *local_a8;
long *plStack_a0;
long local_98;
int8 uStack_90;
int8 local_88;
int8 uStack_80;
int8 local_78;
int8 uStack_70;
data local_68 [8];
int8 local_60;
long local_50;
__shared_count<(__gnu_cxx::_Lock_policy)2> local_48 [8];
int8 local_40;
long local_38;
long local_30;
puVar2 = (int8 *)*in_RSI;
local_40 = *puVar2;
local_38 = puVar2[1];
if (local_38 != 0) {
if (*PTR___libc_single_threaded_0026df98 == '\0') {
LOCK();
*(int *)(local_38 + 8) = *(int *)(local_38 + 8) + 1;
UNLOCK();
}
else {
*(int *)(local_38 + 8) = *(int *)(local_38 + 8) + 1;
}
}
local_30 = puVar2[4] - puVar2[2];
/* try { // try from 001ec08d to 001ec099 has its CatchHandler @ 001ec424 */
parseConstant();
if (local_50 == 0) {
if ((operator()()::null_regex_abi_cxx11_ == '\0') &&
(iVar5 = __cxa_guard_acquire(&operator()()::null_regex_abi_cxx11_), iVar5 != 0)) {
/* try { // try from 001ec32e to 001ec345 has its CatchHandler @ 001ec3a3 */
std::__cxx11::basic_regex<char,std::__cxx11::regex_traits<char>>::basic_regex
((basic_regex<char,std::__cxx11::regex_traits<char>> *)
operator()()::null_regex_abi_cxx11_,"null\\b",0x10);
__cxa_atexit(std::__cxx11::basic_regex<char,std::__cxx11::regex_traits<char>>::~basic_regex,
operator()()::null_regex_abi_cxx11_,&__dso_handle);
__cxa_guard_release(&operator()()::null_regex_abi_cxx11_);
}
/* try { // try from 001ec120 to 001ec138 has its CatchHandler @ 001ec410 */
consumeToken(&local_a8,puVar2,operator()()::null_regex_abi_cxx11_);
plVar4 = plStack_a0;
if (local_a8 != &local_98) {
operator_delete(local_a8,local_98 + 1);
}
if (plVar4 != (long *)0x0) {
local_60 = 0;
local_a8 = (long *)0x0;
plStack_a0 = (long *)0x0;
local_98 = 0;
uStack_90 = 0;
local_88 = 0;
uStack_80 = 0;
local_78 = 0;
uStack_70 = 0;
local_68[0] = (data)0x0;
bVar6 = SUB81(local_68,0);
nlohmann::json_abi_v3_11_3::
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::assert_invariant(bVar6);
nlohmann::json_abi_v3_11_3::
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,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(bVar6);
local_c8 = 0;
/* try { // try from 001ec1ac to 001ec1c8 has its CatchHandler @ 001ec401 */
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::
__shared_count<minja::LiteralExpr,std::allocator<void>,minja::Location&,minja::Value>
((__shared_count<(__gnu_cxx::_Lock_policy)2> *)&uStack_c0,&local_c8,&local_b8,
&local_40,&local_a8);
uVar3 = uStack_c0;
uStack_c0 = 0;
*(long *)this = local_c8;
*(int8 *)(this + 8) = uVar3;
local_c8 = 0;
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count
((__shared_count<(__gnu_cxx::_Lock_policy)2> *)&uStack_c0);
nlohmann::json_abi_v3_11_3::
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,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(bVar6);
nlohmann::json_abi_v3_11_3::
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,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_68);
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count
((__shared_count<(__gnu_cxx::_Lock_policy)2> *)&uStack_70);
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count
((__shared_count<(__gnu_cxx::_Lock_policy)2> *)&uStack_80);
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count
((__shared_count<(__gnu_cxx::_Lock_policy)2> *)&uStack_90);
if (plStack_a0 != (long *)0x0) {
if (*PTR___libc_single_threaded_0026df98 == '\0') {
LOCK();
piVar1 = (int *)((long)plStack_a0 + 0xc);
iVar5 = *piVar1;
*piVar1 = *piVar1 + -1;
UNLOCK();
}
else {
iVar5 = *(int *)((long)plStack_a0 + 0xc);
*(int *)((long)plStack_a0 + 0xc) = iVar5 + -1;
}
if (iVar5 == 1) {
(**(code **)(*plStack_a0 + 0x18))();
}
}
goto LAB_001ec0e6;
}
/* try { // try from 001ec23b to 001ec247 has its CatchHandler @ 001ec3ff */
parseIdentifier();
plVar4 = plStack_a0;
if (local_a8 == (long *)0x0) {
/* try { // try from 001ec28d to 001ec297 has its CatchHandler @ 001ec3f0 */
parseBracedExpressionOrArray();
uVar3 = uStack_c0;
if (local_c8 == 0) {
/* try { // try from 001ec2ba to 001ec2c6 has its CatchHandler @ 001ec3e1 */
parseArray();
uVar3 = local_b0;
if (local_b8 == 0) {
/* try { // try from 001ec2eb to 001ec2f5 has its CatchHandler @ 001ec3d2 */
parseDictionary();
if (*(long *)this == 0) {
this_00 = (runtime_error *)__cxa_allocate_exception(0x10);
/* try { // try from 001ec37e to 001ec38c has its CatchHandler @ 001ec3b9 */
std::runtime_error::runtime_error(this_00,"Expected value expression");
/* try { // try from 001ec38d to 001ec3a2 has its CatchHandler @ 001ec3b4 */
/* WARNING: Subroutine does not return */
__cxa_throw(this_00,PTR_typeinfo_0026dfc0,PTR__runtime_error_0026df80);
}
}
else {
*(long *)this = local_b8;
local_b0 = 0;
*(int8 *)(this + 8) = uVar3;
local_b8 = 0;
}
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count
((__shared_count<(__gnu_cxx::_Lock_policy)2> *)&local_b0);
}
else {
*(long *)this = local_c8;
uStack_c0 = 0;
*(int8 *)(this + 8) = uVar3;
local_c8 = 0;
}
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count
((__shared_count<(__gnu_cxx::_Lock_policy)2> *)&uStack_c0);
}
else {
*(long **)this = local_a8;
plStack_a0 = (long *)0x0;
*(long **)(this + 8) = plVar4;
local_a8 = (long *)0x0;
}
}
else {
local_a8 = (long *)0x0;
/* try { // try from 001ec0b1 to 001ec0c8 has its CatchHandler @ 001ec412 */
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::
__shared_count<minja::LiteralExpr,std::allocator<void>,minja::Location&,minja::Value&>
((__shared_count<(__gnu_cxx::_Lock_policy)2> *)&plStack_a0,&local_a8,&local_c8,
&local_40);
plVar4 = plStack_a0;
plStack_a0 = (long *)0x0;
*(long **)this = local_a8;
*(long **)(this + 8) = plVar4;
local_a8 = (long *)0x0;
}
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count
((__shared_count<(__gnu_cxx::_Lock_policy)2> *)&plStack_a0);
LAB_001ec0e6:
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(local_48);
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count
((__shared_count<(__gnu_cxx::_Lock_policy)2> *)&local_38);
return this;
}
| |
47,812 | ggml_opt_dataset_get_batch | Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-opt.cpp | void ggml_opt_dataset_get_batch(ggml_opt_dataset_t dataset, struct ggml_tensor * data_batch, struct ggml_tensor * labels_batch, int64_t ibatch) {
GGML_ASSERT( data_batch && ggml_is_contiguous(data_batch));
GGML_ASSERT(!labels_batch || ggml_is_contiguous(labels_batch));
GGML_ASSERT((labels_batch == nullptr) == (dataset->labels == nullptr));
const size_t nb_data_batch = ggml_nbytes(data_batch);
GGML_ASSERT(nb_data_batch % dataset->nbs_data == 0);
const int64_t shards_per_batch = nb_data_batch / dataset->nbs_data;
if (labels_batch) {
const size_t nb_labels_batch = ggml_nbytes(labels_batch);
GGML_ASSERT(nb_labels_batch == shards_per_batch*dataset->nbs_labels);
}
GGML_ASSERT((ibatch + 1)*shards_per_batch <= int64_t(dataset->permutation.size()));
for (int64_t ishard_batch = 0; ishard_batch < shards_per_batch; ++ishard_batch) {
const int64_t ishard = dataset->permutation[ibatch*shards_per_batch + ishard_batch];
const char * ptr_data = (const char *) dataset->data->data + ishard*dataset->nbs_data;
ggml_backend_tensor_set(data_batch, ptr_data, ishard_batch*dataset->nbs_data, dataset->nbs_data);
if (!labels_batch) {
continue;
}
const char * ptr_labels = (const char *) dataset->labels->data + ishard*dataset->nbs_labels;
ggml_backend_tensor_set(labels_batch, ptr_labels, ishard_batch*dataset->nbs_labels, dataset->nbs_labels);
}
} | O0 | cpp | ggml_opt_dataset_get_batch:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
cmpq $0x0, -0x10(%rbp)
je 0x646ac
movq -0x10(%rbp), %rdi
callq 0x42ff0
testb $0x1, %al
jne 0x646cd
leaq 0x5128d(%rip), %rdi # 0xb5940
movl $0x90, %esi
leaq 0x4cf4a(%rip), %rdx # 0xb1609
leaq 0x51345(%rip), %rcx # 0xb5a0b
movb $0x0, %al
callq 0x48a00
cmpq $0x0, -0x18(%rbp)
je 0x64702
movq -0x18(%rbp), %rdi
callq 0x42ff0
testb $0x1, %al
jne 0x64702
leaq 0x51258(%rip), %rdi # 0xb5940
movl $0x91, %esi
leaq 0x4cf15(%rip), %rdx # 0xb1609
leaq 0x5133d(%rip), %rcx # 0xb5a38
movb $0x0, %al
callq 0x48a00
cmpq $0x0, -0x18(%rbp)
sete %al
andb $0x1, %al
movzbl %al, %eax
movq -0x8(%rbp), %rcx
cmpq $0x0, 0x18(%rcx)
sete %cl
andb $0x1, %cl
movzbl %cl, %ecx
cmpl %ecx, %eax
je 0x64746
leaq 0x51214(%rip), %rdi # 0xb5940
movl $0x92, %esi
leaq 0x4ced1(%rip), %rdx # 0xb1609
leaq 0x5132b(%rip), %rcx # 0xb5a6a
movb $0x0, %al
callq 0x48a00
movq -0x10(%rbp), %rdi
callq 0x42650
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
movq -0x8(%rbp), %rcx
xorl %edx, %edx
divq 0x30(%rcx)
cmpq $0x0, %rdx
je 0x64788
leaq 0x511d2(%rip), %rdi # 0xb5940
movl $0x95, %esi
leaq 0x4ce8f(%rip), %rdx # 0xb1609
leaq 0x51323(%rip), %rcx # 0xb5aa4
movb $0x0, %al
callq 0x48a00
movq -0x28(%rbp), %rax
movq -0x8(%rbp), %rcx
xorl %edx, %edx
divq 0x30(%rcx)
movq %rax, -0x30(%rbp)
cmpq $0x0, -0x18(%rbp)
je 0x647e7
movq -0x18(%rbp), %rdi
callq 0x42650
movq %rax, -0x38(%rbp)
movq -0x38(%rbp), %rax
movq -0x30(%rbp), %rcx
movq -0x8(%rbp), %rdx
imulq 0x38(%rdx), %rcx
cmpq %rcx, %rax
je 0x647e5
leaq 0x51175(%rip), %rdi # 0xb5940
movl $0x9a, %esi
leaq 0x4ce32(%rip), %rdx # 0xb1609
leaq 0x512ed(%rip), %rcx # 0xb5acb
movb $0x0, %al
callq 0x48a00
jmp 0x647e7
movq -0x20(%rbp), %rax
addq $0x1, %rax
imulq -0x30(%rbp), %rax
movq %rax, -0x60(%rbp)
movq -0x8(%rbp), %rdi
addq $0x40, %rdi
callq 0x42610
movq %rax, %rcx
movq -0x60(%rbp), %rax
cmpq %rcx, %rax
jle 0x64832
leaq 0x51128(%rip), %rdi # 0xb5940
movl $0x9d, %esi
leaq 0x4cde5(%rip), %rdx # 0xb1609
leaq 0x512d8(%rip), %rcx # 0xb5b03
movb $0x0, %al
callq 0x48a00
movq $0x0, -0x40(%rbp)
movq -0x40(%rbp), %rax
cmpq -0x30(%rbp), %rax
jge 0x6490d
movq -0x8(%rbp), %rdi
addq $0x40, %rdi
movq -0x20(%rbp), %rsi
imulq -0x30(%rbp), %rsi
addq -0x40(%rbp), %rsi
callq 0x46540
movq (%rax), %rax
movq %rax, -0x48(%rbp)
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rax
movq 0xf8(%rax), %rax
movq -0x48(%rbp), %rcx
movq -0x8(%rbp), %rdx
imulq 0x30(%rdx), %rcx
addq %rcx, %rax
movq %rax, -0x50(%rbp)
movq -0x10(%rbp), %rdi
movq -0x50(%rbp), %rsi
movq -0x40(%rbp), %rdx
movq -0x8(%rbp), %rax
imulq 0x30(%rax), %rdx
movq -0x8(%rbp), %rax
movq 0x30(%rax), %rcx
callq 0x44040
cmpq $0x0, -0x18(%rbp)
jne 0x648b7
jmp 0x648fc
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rax
movq 0xf8(%rax), %rax
movq -0x48(%rbp), %rcx
movq -0x8(%rbp), %rdx
imulq 0x38(%rdx), %rcx
addq %rcx, %rax
movq %rax, -0x58(%rbp)
movq -0x18(%rbp), %rdi
movq -0x58(%rbp), %rsi
movq -0x40(%rbp), %rdx
movq -0x8(%rbp), %rax
imulq 0x38(%rax), %rdx
movq -0x8(%rbp), %rax
movq 0x38(%rax), %rcx
callq 0x44040
movq -0x40(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x40(%rbp)
jmp 0x6483a
addq $0x60, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
| ggml_opt_dataset_get_batch:
push rbp
mov rbp, rsp
sub rsp, 60h
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov [rbp+var_18], rdx
mov [rbp+var_20], rcx
cmp [rbp+var_10], 0
jz short loc_646AC
mov rdi, [rbp+var_10]
call _ggml_is_contiguous
test al, 1
jnz short loc_646CD
loc_646AC:
lea rdi, aWorkspaceLlm4b_3; "/workspace/llm4binary/github/2025_star3"...
mov esi, 90h
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aDataBatchGgmlI; "data_batch && ggml_is_contiguous(data_b"...
mov al, 0
call _ggml_abort
loc_646CD:
cmp [rbp+var_18], 0
jz short loc_64702
mov rdi, [rbp+var_18]
call _ggml_is_contiguous
test al, 1
jnz short loc_64702
lea rdi, aWorkspaceLlm4b_3; "/workspace/llm4binary/github/2025_star3"...
mov esi, 91h
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aLabelsBatchGgm; "!labels_batch || ggml_is_contiguous(lab"...
mov al, 0
call _ggml_abort
loc_64702:
cmp [rbp+var_18], 0
setz al
and al, 1
movzx eax, al
mov rcx, [rbp+var_8]
cmp qword ptr [rcx+18h], 0
setz cl
and cl, 1
movzx ecx, cl
cmp eax, ecx
jz short loc_64746
lea rdi, aWorkspaceLlm4b_3; "/workspace/llm4binary/github/2025_star3"...
mov esi, 92h
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aLabelsBatchNul; "(labels_batch == nullptr) == (dataset->"...
mov al, 0
call _ggml_abort
loc_64746:
mov rdi, [rbp+var_10]
call _ggml_nbytes
mov [rbp+var_28], rax
mov rax, [rbp+var_28]
mov rcx, [rbp+var_8]
xor edx, edx
div qword ptr [rcx+30h]
cmp rdx, 0
jz short loc_64788
lea rdi, aWorkspaceLlm4b_3; "/workspace/llm4binary/github/2025_star3"...
mov esi, 95h
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aNbDataBatchDat; "nb_data_batch % dataset->nbs_data == 0"
mov al, 0
call _ggml_abort
loc_64788:
mov rax, [rbp+var_28]
mov rcx, [rbp+var_8]
xor edx, edx
div qword ptr [rcx+30h]
mov [rbp+var_30], rax
cmp [rbp+var_18], 0
jz short loc_647E7
mov rdi, [rbp+var_18]
call _ggml_nbytes
mov [rbp+var_38], rax
mov rax, [rbp+var_38]
mov rcx, [rbp+var_30]
mov rdx, [rbp+var_8]
imul rcx, [rdx+38h]
cmp rax, rcx
jz short loc_647E5
lea rdi, aWorkspaceLlm4b_3; "/workspace/llm4binary/github/2025_star3"...
mov esi, 9Ah
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aNbLabelsBatchS; "nb_labels_batch == shards_per_batch*dat"...
mov al, 0
call _ggml_abort
loc_647E5:
jmp short $+2
loc_647E7:
mov rax, [rbp+var_20]
add rax, 1
imul rax, [rbp+var_30]
mov [rbp+var_60], rax
mov rdi, [rbp+var_8]
add rdi, 40h ; '@'
call __ZNKSt6vectorIlSaIlEE4sizeEv; std::vector<long>::size(void)
mov rcx, rax
mov rax, [rbp+var_60]
cmp rax, rcx
jle short loc_64832
lea rdi, aWorkspaceLlm4b_3; "/workspace/llm4binary/github/2025_star3"...
mov esi, 9Dh
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aIbatch1ShardsP; "(ibatch + 1)*shards_per_batch <= int64_"...
mov al, 0
call _ggml_abort
loc_64832:
mov [rbp+var_40], 0
loc_6483A:
mov rax, [rbp+var_40]
cmp rax, [rbp+var_30]
jge loc_6490D
mov rdi, [rbp+var_8]
add rdi, 40h ; '@'
mov rsi, [rbp+var_20]
imul rsi, [rbp+var_30]
add rsi, [rbp+var_40]
call __ZNSt6vectorIlSaIlEEixEm; std::vector<long>::operator[](ulong)
mov rax, [rax]
mov [rbp+var_48], rax
mov rax, [rbp+var_8]
mov rax, [rax+10h]
mov rax, [rax+0F8h]
mov rcx, [rbp+var_48]
mov rdx, [rbp+var_8]
imul rcx, [rdx+30h]
add rax, rcx
mov [rbp+var_50], rax
mov rdi, [rbp+var_10]
mov rsi, [rbp+var_50]
mov rdx, [rbp+var_40]
mov rax, [rbp+var_8]
imul rdx, [rax+30h]
mov rax, [rbp+var_8]
mov rcx, [rax+30h]
call _ggml_backend_tensor_set
cmp [rbp+var_18], 0
jnz short loc_648B7
jmp short loc_648FC
loc_648B7:
mov rax, [rbp+var_8]
mov rax, [rax+18h]
mov rax, [rax+0F8h]
mov rcx, [rbp+var_48]
mov rdx, [rbp+var_8]
imul rcx, [rdx+38h]
add rax, rcx
mov [rbp+var_58], rax
mov rdi, [rbp+var_18]
mov rsi, [rbp+var_58]
mov rdx, [rbp+var_40]
mov rax, [rbp+var_8]
imul rdx, [rax+38h]
mov rax, [rbp+var_8]
mov rcx, [rax+38h]
call _ggml_backend_tensor_set
loc_648FC:
mov rax, [rbp+var_40]
add rax, 1
mov [rbp+var_40], rax
jmp loc_6483A
loc_6490D:
add rsp, 60h
pop rbp
retn
| signed long long ggml_opt_dataset_get_batch(_QWORD *a1, unsigned int *a2, unsigned int *a3, long long a4)
{
unsigned long long v4; // rdx
signed long long result; // rax
long long *v6; // rax
long long v7; // [rsp+18h] [rbp-48h]
signed long long i; // [rsp+20h] [rbp-40h]
long long v9; // [rsp+28h] [rbp-38h]
signed long long v10; // [rsp+30h] [rbp-30h]
unsigned long long v11; // [rsp+38h] [rbp-28h]
if ( !a2 || (ggml_is_contiguous((long long)a2) & 1) == 0 )
ggml_abort(
"/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-opt.cpp",
144,
(long long)"GGML_ASSERT(%s) failed",
"data_batch && ggml_is_contiguous(data_batch)");
if ( a3 && (ggml_is_contiguous((long long)a3) & 1) == 0 )
ggml_abort(
"/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-opt.cpp",
145,
(long long)"GGML_ASSERT(%s) failed",
"!labels_batch || ggml_is_contiguous(labels_batch)");
if ( (a3 == 0LL) != (a1[3] == 0LL) )
ggml_abort(
"/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-opt.cpp",
146,
(long long)"GGML_ASSERT(%s) failed",
"(labels_batch == nullptr) == (dataset->labels == nullptr)");
v11 = ggml_nbytes(a2);
if ( v11 % a1[6] )
ggml_abort(
"/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-opt.cpp",
149,
(long long)"GGML_ASSERT(%s) failed",
"nb_data_batch % dataset->nbs_data == 0");
v4 = v11 % a1[6];
v10 = v11 / a1[6];
if ( a3 )
{
v9 = ggml_nbytes(a3);
v4 = (unsigned long long)a1;
if ( v9 != a1[7] * v10 )
ggml_abort(
"/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-opt.cpp",
154,
(long long)"GGML_ASSERT(%s) failed",
"nb_labels_batch == shards_per_batch*dataset->nbs_labels");
}
if ( v10 * (a4 + 1) > std::vector<long>::size(a1 + 8, a2, v4) )
ggml_abort(
"/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-opt.cpp",
157,
(long long)"GGML_ASSERT(%s) failed",
"(ibatch + 1)*shards_per_batch <= int64_t(dataset->permutation.size())");
for ( i = 0LL; ; ++i )
{
result = i;
if ( i >= v10 )
break;
v6 = (long long *)std::vector<long>::operator[](a1 + 8, i + v10 * a4);
v7 = *v6;
ggml_backend_tensor_set(a2, a1[6] * *v6 + *(_QWORD *)(a1[2] + 248LL), a1[6] * i, a1[6]);
if ( a3 )
ggml_backend_tensor_set(a3, a1[7] * v7 + *(_QWORD *)(a1[3] + 248LL), a1[7] * i, a1[7]);
}
return result;
}
| ggml_opt_dataset_get_batch:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x60
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV qword ptr [RBP + -0x18],RDX
MOV qword ptr [RBP + -0x20],RCX
CMP qword ptr [RBP + -0x10],0x0
JZ 0x001646ac
MOV RDI,qword ptr [RBP + -0x10]
CALL 0x00142ff0
TEST AL,0x1
JNZ 0x001646cd
LAB_001646ac:
LEA RDI,[0x1b5940]
MOV ESI,0x90
LEA RDX,[0x1b1609]
LEA RCX,[0x1b5a0b]
MOV AL,0x0
CALL 0x00148a00
LAB_001646cd:
CMP qword ptr [RBP + -0x18],0x0
JZ 0x00164702
MOV RDI,qword ptr [RBP + -0x18]
CALL 0x00142ff0
TEST AL,0x1
JNZ 0x00164702
LEA RDI,[0x1b5940]
MOV ESI,0x91
LEA RDX,[0x1b1609]
LEA RCX,[0x1b5a38]
MOV AL,0x0
CALL 0x00148a00
LAB_00164702:
CMP qword ptr [RBP + -0x18],0x0
SETZ AL
AND AL,0x1
MOVZX EAX,AL
MOV RCX,qword ptr [RBP + -0x8]
CMP qword ptr [RCX + 0x18],0x0
SETZ CL
AND CL,0x1
MOVZX ECX,CL
CMP EAX,ECX
JZ 0x00164746
LEA RDI,[0x1b5940]
MOV ESI,0x92
LEA RDX,[0x1b1609]
LEA RCX,[0x1b5a6a]
MOV AL,0x0
CALL 0x00148a00
LAB_00164746:
MOV RDI,qword ptr [RBP + -0x10]
CALL 0x00142650
MOV qword ptr [RBP + -0x28],RAX
MOV RAX,qword ptr [RBP + -0x28]
MOV RCX,qword ptr [RBP + -0x8]
XOR EDX,EDX
DIV qword ptr [RCX + 0x30]
CMP RDX,0x0
JZ 0x00164788
LEA RDI,[0x1b5940]
MOV ESI,0x95
LEA RDX,[0x1b1609]
LEA RCX,[0x1b5aa4]
MOV AL,0x0
CALL 0x00148a00
LAB_00164788:
MOV RAX,qword ptr [RBP + -0x28]
MOV RCX,qword ptr [RBP + -0x8]
XOR EDX,EDX
DIV qword ptr [RCX + 0x30]
MOV qword ptr [RBP + -0x30],RAX
CMP qword ptr [RBP + -0x18],0x0
JZ 0x001647e7
MOV RDI,qword ptr [RBP + -0x18]
CALL 0x00142650
MOV qword ptr [RBP + -0x38],RAX
MOV RAX,qword ptr [RBP + -0x38]
MOV RCX,qword ptr [RBP + -0x30]
MOV RDX,qword ptr [RBP + -0x8]
IMUL RCX,qword ptr [RDX + 0x38]
CMP RAX,RCX
JZ 0x001647e5
LEA RDI,[0x1b5940]
MOV ESI,0x9a
LEA RDX,[0x1b1609]
LEA RCX,[0x1b5acb]
MOV AL,0x0
CALL 0x00148a00
LAB_001647e5:
JMP 0x001647e7
LAB_001647e7:
MOV RAX,qword ptr [RBP + -0x20]
ADD RAX,0x1
IMUL RAX,qword ptr [RBP + -0x30]
MOV qword ptr [RBP + -0x60],RAX
MOV RDI,qword ptr [RBP + -0x8]
ADD RDI,0x40
CALL 0x00142610
MOV RCX,RAX
MOV RAX,qword ptr [RBP + -0x60]
CMP RAX,RCX
JLE 0x00164832
LEA RDI,[0x1b5940]
MOV ESI,0x9d
LEA RDX,[0x1b1609]
LEA RCX,[0x1b5b03]
MOV AL,0x0
CALL 0x00148a00
LAB_00164832:
MOV qword ptr [RBP + -0x40],0x0
LAB_0016483a:
MOV RAX,qword ptr [RBP + -0x40]
CMP RAX,qword ptr [RBP + -0x30]
JGE 0x0016490d
MOV RDI,qword ptr [RBP + -0x8]
ADD RDI,0x40
MOV RSI,qword ptr [RBP + -0x20]
IMUL RSI,qword ptr [RBP + -0x30]
ADD RSI,qword ptr [RBP + -0x40]
CALL 0x00146540
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x48],RAX
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX + 0x10]
MOV RAX,qword ptr [RAX + 0xf8]
MOV RCX,qword ptr [RBP + -0x48]
MOV RDX,qword ptr [RBP + -0x8]
IMUL RCX,qword ptr [RDX + 0x30]
ADD RAX,RCX
MOV qword ptr [RBP + -0x50],RAX
MOV RDI,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RBP + -0x50]
MOV RDX,qword ptr [RBP + -0x40]
MOV RAX,qword ptr [RBP + -0x8]
IMUL RDX,qword ptr [RAX + 0x30]
MOV RAX,qword ptr [RBP + -0x8]
MOV RCX,qword ptr [RAX + 0x30]
CALL 0x00144040
CMP qword ptr [RBP + -0x18],0x0
JNZ 0x001648b7
JMP 0x001648fc
LAB_001648b7:
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX + 0x18]
MOV RAX,qword ptr [RAX + 0xf8]
MOV RCX,qword ptr [RBP + -0x48]
MOV RDX,qword ptr [RBP + -0x8]
IMUL RCX,qword ptr [RDX + 0x38]
ADD RAX,RCX
MOV qword ptr [RBP + -0x58],RAX
MOV RDI,qword ptr [RBP + -0x18]
MOV RSI,qword ptr [RBP + -0x58]
MOV RDX,qword ptr [RBP + -0x40]
MOV RAX,qword ptr [RBP + -0x8]
IMUL RDX,qword ptr [RAX + 0x38]
MOV RAX,qword ptr [RBP + -0x8]
MOV RCX,qword ptr [RAX + 0x38]
CALL 0x00144040
LAB_001648fc:
MOV RAX,qword ptr [RBP + -0x40]
ADD RAX,0x1
MOV qword ptr [RBP + -0x40],RAX
JMP 0x0016483a
LAB_0016490d:
ADD RSP,0x60
POP RBP
RET
|
void ggml_opt_dataset_get_batch(long param_1,long param_2,long param_3,long param_4)
{
ulong uVar1;
long lVar2;
long *plVar3;
long local_48;
if ((param_2 == 0) || (uVar1 = ggml_is_contiguous(param_2), (uVar1 & 1) == 0)) {
ggml_abort("/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-opt.cpp"
,0x90,"GGML_ASSERT(%s) failed","data_batch && ggml_is_contiguous(data_batch)");
}
if ((param_3 != 0) && (uVar1 = ggml_is_contiguous(param_3), (uVar1 & 1) == 0)) {
ggml_abort("/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-opt.cpp"
,0x91,"GGML_ASSERT(%s) failed","!labels_batch || ggml_is_contiguous(labels_batch)");
}
if ((param_3 == 0) != (*(long *)(param_1 + 0x18) == 0)) {
ggml_abort("/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-opt.cpp"
,0x92,"GGML_ASSERT(%s) failed",
"(labels_batch == nullptr) == (dataset->labels == nullptr)");
}
uVar1 = ggml_nbytes(param_2);
if (uVar1 % *(ulong *)(param_1 + 0x30) != 0) {
ggml_abort("/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-opt.cpp"
,0x95,"GGML_ASSERT(%s) failed","nb_data_batch % dataset->nbs_data == 0");
}
uVar1 = uVar1 / *(ulong *)(param_1 + 0x30);
if ((param_3 != 0) && (lVar2 = ggml_nbytes(param_3), lVar2 != uVar1 * *(long *)(param_1 + 0x38)))
{
ggml_abort("/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-opt.cpp"
,0x9a,"GGML_ASSERT(%s) failed",
"nb_labels_batch == shards_per_batch*dataset->nbs_labels");
}
lVar2 = std::vector<long,std::allocator<long>>::size
((vector<long,std::allocator<long>> *)(param_1 + 0x40));
if (lVar2 < (long)((param_4 + 1) * uVar1)) {
ggml_abort("/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-opt.cpp"
,0x9d,"GGML_ASSERT(%s) failed",
"(ibatch + 1)*shards_per_batch <= int64_t(dataset->permutation.size())");
}
for (local_48 = 0; local_48 < (long)uVar1; local_48 = local_48 + 1) {
plVar3 = (long *)std::vector<long,std::allocator<long>>::operator[]
((vector<long,std::allocator<long>> *)(param_1 + 0x40),
param_4 * uVar1 + local_48);
lVar2 = *plVar3;
ggml_backend_tensor_set
(param_2,*(long *)(*(long *)(param_1 + 0x10) + 0xf8) +
lVar2 * *(long *)(param_1 + 0x30),local_48 * *(long *)(param_1 + 0x30),
*(int8 *)(param_1 + 0x30));
if (param_3 != 0) {
ggml_backend_tensor_set
(param_3,*(long *)(*(long *)(param_1 + 0x18) + 0xf8) +
lVar2 * *(long *)(param_1 + 0x38),local_48 * *(long *)(param_1 + 0x38),
*(int8 *)(param_1 + 0x38));
}
}
return;
}
| |
47,813 | ggml_opt_dataset_get_batch | Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-opt.cpp | void ggml_opt_dataset_get_batch(ggml_opt_dataset_t dataset, struct ggml_tensor * data_batch, struct ggml_tensor * labels_batch, int64_t ibatch) {
GGML_ASSERT( data_batch && ggml_is_contiguous(data_batch));
GGML_ASSERT(!labels_batch || ggml_is_contiguous(labels_batch));
GGML_ASSERT((labels_batch == nullptr) == (dataset->labels == nullptr));
const size_t nb_data_batch = ggml_nbytes(data_batch);
GGML_ASSERT(nb_data_batch % dataset->nbs_data == 0);
const int64_t shards_per_batch = nb_data_batch / dataset->nbs_data;
if (labels_batch) {
const size_t nb_labels_batch = ggml_nbytes(labels_batch);
GGML_ASSERT(nb_labels_batch == shards_per_batch*dataset->nbs_labels);
}
GGML_ASSERT((ibatch + 1)*shards_per_batch <= int64_t(dataset->permutation.size()));
for (int64_t ishard_batch = 0; ishard_batch < shards_per_batch; ++ishard_batch) {
const int64_t ishard = dataset->permutation[ibatch*shards_per_batch + ishard_batch];
const char * ptr_data = (const char *) dataset->data->data + ishard*dataset->nbs_data;
ggml_backend_tensor_set(data_batch, ptr_data, ishard_batch*dataset->nbs_data, dataset->nbs_data);
if (!labels_batch) {
continue;
}
const char * ptr_labels = (const char *) dataset->labels->data + ishard*dataset->nbs_labels;
ggml_backend_tensor_set(labels_batch, ptr_labels, ishard_batch*dataset->nbs_labels, dataset->nbs_labels);
}
} | O1 | cpp | ggml_opt_dataset_get_batch:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rcx, (%rsp)
testq %rsi, %rsi
je 0x2aff9
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %r12
movq %rsi, %rdi
callq 0x17420
testb %al, %al
je 0x2aff9
testq %r14, %r14
je 0x2aedf
movq %r14, %rdi
callq 0x17420
testb %al, %al
je 0x2b06c
testq %r14, %r14
sete %al
cmpq $0x0, 0x18(%r12)
setne %cl
xorb %al, %cl
je 0x2b018
movq %r15, %rdi
callq 0x171c0
xorl %edx, %edx
divq 0x30(%r12)
testq %rdx, %rdx
jne 0x2b034
movq %rax, %r13
testq %r14, %r14
je 0x2af30
movq %r14, %rdi
callq 0x171c0
movq 0x38(%r12), %rcx
imulq %r13, %rcx
cmpq %rcx, %rax
jne 0x2b088
movq (%rsp), %rax
incq %rax
imulq %r13, %rax
movq 0x48(%r12), %rcx
subq 0x40(%r12), %rcx
sarq $0x3, %rcx
cmpq %rcx, %rax
jg 0x2b050
testq %r13, %r13
jle 0x2afe5
movq (%rsp), %rax
imulq %r13, %rax
movq %rax, (%rsp)
xorl %ebx, %ebx
movq (%rsp), %rax
addq %rbx, %rax
movq 0x40(%r12), %rcx
movq 0x48(%r12), %rdx
subq %rcx, %rdx
sarq $0x3, %rdx
cmpq %rax, %rdx
jbe 0x2aff4
movq (%rcx,%rax,8), %rbp
movq 0x10(%r12), %rax
movq 0x30(%r12), %rcx
movq %rcx, %rsi
imulq %rbp, %rsi
addq 0xf8(%rax), %rsi
movq %rcx, %rdx
imulq %rbx, %rdx
movq %r15, %rdi
callq 0x178e0
testq %r14, %r14
je 0x2afdd
movq 0x18(%r12), %rax
movq 0x38(%r12), %rcx
imulq %rcx, %rbp
addq 0xf8(%rax), %rbp
movq %rcx, %rdx
imulq %rbx, %rdx
movq %r14, %rdi
movq %rbp, %rsi
callq 0x178e0
incq %rbx
cmpq %r13, %rbx
jl 0x2af69
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0x195c2
leaq 0x254a8(%rip), %rdi # 0x504a8
leaq 0x215ba(%rip), %rdx # 0x4c5c1
leaq 0x25565(%rip), %rcx # 0x50573
movl $0x90, %esi
jmp 0x2b0a2
leaq 0x25489(%rip), %rdi # 0x504a8
leaq 0x2159b(%rip), %rdx # 0x4c5c1
leaq 0x255a5(%rip), %rcx # 0x505d2
movl $0x92, %esi
jmp 0x2b0a2
leaq 0x2546d(%rip), %rdi # 0x504a8
leaq 0x2157f(%rip), %rdx # 0x4c5c1
leaq 0x255c3(%rip), %rcx # 0x5060c
movl $0x95, %esi
jmp 0x2b0a2
leaq 0x25451(%rip), %rdi # 0x504a8
leaq 0x21563(%rip), %rdx # 0x4c5c1
leaq 0x25606(%rip), %rcx # 0x5066b
movl $0x9d, %esi
jmp 0x2b0a2
leaq 0x25435(%rip), %rdi # 0x504a8
leaq 0x21547(%rip), %rdx # 0x4c5c1
leaq 0x2551f(%rip), %rcx # 0x505a0
movl $0x91, %esi
jmp 0x2b0a2
leaq 0x25419(%rip), %rdi # 0x504a8
leaq 0x2152b(%rip), %rdx # 0x4c5c1
leaq 0x25596(%rip), %rcx # 0x50633
movl $0x9a, %esi
xorl %eax, %eax
callq 0x18ce0
| ggml_opt_dataset_get_batch:
push rbp
push r15
push r14
push r13
push r12
push rbx
push rax
mov [rsp+38h+var_38], rcx
test rsi, rsi
jz loc_2AFF9
mov r14, rdx
mov r15, rsi
mov r12, rdi
mov rdi, rsi
call _ggml_is_contiguous
test al, al
jz loc_2AFF9
test r14, r14
jz short loc_2AEDF
mov rdi, r14
call _ggml_is_contiguous
test al, al
jz loc_2B06C
loc_2AEDF:
test r14, r14
setz al
cmp qword ptr [r12+18h], 0
setnz cl
xor cl, al
jz loc_2B018
mov rdi, r15
call _ggml_nbytes
xor edx, edx
div qword ptr [r12+30h]
test rdx, rdx
jnz loc_2B034
mov r13, rax
test r14, r14
jz short loc_2AF30
mov rdi, r14
call _ggml_nbytes
mov rcx, [r12+38h]
imul rcx, r13
cmp rax, rcx
jnz loc_2B088
loc_2AF30:
mov rax, [rsp+38h+var_38]
inc rax
imul rax, r13
mov rcx, [r12+48h]
sub rcx, [r12+40h]
sar rcx, 3
cmp rax, rcx
jg loc_2B050
test r13, r13
jle loc_2AFE5
mov rax, [rsp+38h+var_38]
imul rax, r13
mov [rsp+38h+var_38], rax
xor ebx, ebx
loc_2AF69:
mov rax, [rsp+38h+var_38]
add rax, rbx
mov rcx, [r12+40h]
mov rdx, [r12+48h]
sub rdx, rcx
sar rdx, 3
cmp rdx, rax
jbe short loc_2AFF4
mov rbp, [rcx+rax*8]
mov rax, [r12+10h]
mov rcx, [r12+30h]
mov rsi, rcx
imul rsi, rbp
add rsi, [rax+0F8h]
mov rdx, rcx
imul rdx, rbx
mov rdi, r15
call _ggml_backend_tensor_set
test r14, r14
jz short loc_2AFDD
mov rax, [r12+18h]
mov rcx, [r12+38h]
imul rbp, rcx
add rbp, [rax+0F8h]
mov rdx, rcx
imul rdx, rbx
mov rdi, r14
mov rsi, rbp
call _ggml_backend_tensor_set
loc_2AFDD:
inc rbx
cmp rbx, r13
jl short loc_2AF69
loc_2AFE5:
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_2AFF4:
call ggml_opt_dataset_get_batch_cold_1
loc_2AFF9:
lea rdi, aWorkspaceLlm4b_3; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aDataBatchGgmlI; "data_batch && ggml_is_contiguous(data_b"...
mov esi, 90h
jmp loc_2B0A2
loc_2B018:
lea rdi, aWorkspaceLlm4b_3; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aLabelsBatchNul; "(labels_batch == nullptr) == (dataset->"...
mov esi, 92h
jmp short loc_2B0A2
loc_2B034:
lea rdi, aWorkspaceLlm4b_3; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aNbDataBatchDat; "nb_data_batch % dataset->nbs_data == 0"
mov esi, 95h
jmp short loc_2B0A2
loc_2B050:
lea rdi, aWorkspaceLlm4b_3; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aIbatch1ShardsP; "(ibatch + 1)*shards_per_batch <= int64_"...
mov esi, 9Dh
jmp short loc_2B0A2
loc_2B06C:
lea rdi, aWorkspaceLlm4b_3; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aLabelsBatchGgm; "!labels_batch || ggml_is_contiguous(lab"...
mov esi, 91h
jmp short loc_2B0A2
loc_2B088:
lea rdi, aWorkspaceLlm4b_3; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aNbLabelsBatchS; "nb_labels_batch == shards_per_batch*dat"...
mov esi, 9Ah
loc_2B0A2:
xor eax, eax
call _ggml_abort
| long long ggml_opt_dataset_get_batch(
_QWORD *a1,
unsigned int *a2,
unsigned int *a3,
long long a4,
int a5,
int a6)
{
unsigned long long v7; // rax
unsigned long long v8; // rtt
long long v9; // r13
long long result; // rax
long long i; // rbx
long long v12; // rcx
long long v13; // rbp
const char *v14; // rcx
int v15; // esi
long long v17; // [rsp+0h] [rbp-38h]
if ( !a2 || !(unsigned __int8)ggml_is_contiguous((long long)a2) )
{
v14 = "data_batch && ggml_is_contiguous(data_batch)";
v15 = 144;
goto LABEL_24;
}
if ( a3 && !(unsigned __int8)ggml_is_contiguous((long long)a3) )
{
v14 = "!labels_batch || ggml_is_contiguous(labels_batch)";
v15 = 145;
goto LABEL_24;
}
if ( (a3 == 0LL) == (a1[3] != 0LL) )
{
v14 = "(labels_batch == nullptr) == (dataset->labels == nullptr)";
v15 = 146;
goto LABEL_24;
}
v8 = ggml_nbytes(a2);
v7 = v8 / a1[6];
if ( v8 % a1[6] )
{
v14 = "nb_data_batch % dataset->nbs_data == 0";
v15 = 149;
goto LABEL_24;
}
v9 = v7;
if ( a3 && ggml_nbytes(a3) != v7 * a1[7] )
{
v14 = "nb_labels_batch == shards_per_batch*dataset->nbs_labels";
v15 = 154;
LABEL_24:
ggml_abort(
(unsigned int)"/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-opt.cpp",
v15,
(unsigned int)"GGML_ASSERT(%s) failed",
(_DWORD)v14,
a5,
a6);
}
result = v9 * (a4 + 1);
if ( result > (long long)(a1[9] - a1[8]) >> 3 )
{
v14 = "(ibatch + 1)*shards_per_batch <= int64_t(dataset->permutation.size())";
v15 = 157;
goto LABEL_24;
}
if ( v9 > 0 )
{
v17 = v9 * a4;
for ( i = 0LL; i < v9; ++i )
{
v12 = a1[8];
if ( (a1[9] - v12) >> 3 <= (unsigned long long)(i + v17) )
ggml_opt_dataset_get_batch_cold_1();
v13 = *(_QWORD *)(v12 + 8 * (i + v17));
result = ggml_backend_tensor_set(a2, *(_QWORD *)(a1[2] + 248LL) + v13 * a1[6], i * a1[6], a1[6]);
if ( a3 )
result = ggml_backend_tensor_set(a3, *(_QWORD *)(a1[3] + 248LL) + a1[7] * v13, i * a1[7], a1[7]);
}
}
return result;
}
| ggml_opt_dataset_get_batch:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
PUSH RAX
MOV qword ptr [RSP],RCX
TEST RSI,RSI
JZ 0x0012aff9
MOV R14,RDX
MOV R15,RSI
MOV R12,RDI
MOV RDI,RSI
CALL 0x00117420
TEST AL,AL
JZ 0x0012aff9
TEST R14,R14
JZ 0x0012aedf
MOV RDI,R14
CALL 0x00117420
TEST AL,AL
JZ 0x0012b06c
LAB_0012aedf:
TEST R14,R14
SETZ AL
CMP qword ptr [R12 + 0x18],0x0
SETNZ CL
XOR CL,AL
JZ 0x0012b018
MOV RDI,R15
CALL 0x001171c0
XOR EDX,EDX
DIV qword ptr [R12 + 0x30]
TEST RDX,RDX
JNZ 0x0012b034
MOV R13,RAX
TEST R14,R14
JZ 0x0012af30
MOV RDI,R14
CALL 0x001171c0
MOV RCX,qword ptr [R12 + 0x38]
IMUL RCX,R13
CMP RAX,RCX
JNZ 0x0012b088
LAB_0012af30:
MOV RAX,qword ptr [RSP]
INC RAX
IMUL RAX,R13
MOV RCX,qword ptr [R12 + 0x48]
SUB RCX,qword ptr [R12 + 0x40]
SAR RCX,0x3
CMP RAX,RCX
JG 0x0012b050
TEST R13,R13
JLE 0x0012afe5
MOV RAX,qword ptr [RSP]
IMUL RAX,R13
MOV qword ptr [RSP],RAX
XOR EBX,EBX
LAB_0012af69:
MOV RAX,qword ptr [RSP]
ADD RAX,RBX
MOV RCX,qword ptr [R12 + 0x40]
MOV RDX,qword ptr [R12 + 0x48]
SUB RDX,RCX
SAR RDX,0x3
CMP RDX,RAX
JBE 0x0012aff4
MOV RBP,qword ptr [RCX + RAX*0x8]
MOV RAX,qword ptr [R12 + 0x10]
MOV RCX,qword ptr [R12 + 0x30]
MOV RSI,RCX
IMUL RSI,RBP
ADD RSI,qword ptr [RAX + 0xf8]
MOV RDX,RCX
IMUL RDX,RBX
MOV RDI,R15
CALL 0x001178e0
TEST R14,R14
JZ 0x0012afdd
MOV RAX,qword ptr [R12 + 0x18]
MOV RCX,qword ptr [R12 + 0x38]
IMUL RBP,RCX
ADD RBP,qword ptr [RAX + 0xf8]
MOV RDX,RCX
IMUL RDX,RBX
MOV RDI,R14
MOV RSI,RBP
CALL 0x001178e0
LAB_0012afdd:
INC RBX
CMP RBX,R13
JL 0x0012af69
LAB_0012afe5:
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_0012aff4:
CALL 0x001195c2
LAB_0012aff9:
LEA RDI,[0x1504a8]
LEA RDX,[0x14c5c1]
LEA RCX,[0x150573]
MOV ESI,0x90
JMP 0x0012b0a2
LAB_0012b018:
LEA RDI,[0x1504a8]
LEA RDX,[0x14c5c1]
LEA RCX,[0x1505d2]
MOV ESI,0x92
JMP 0x0012b0a2
LAB_0012b034:
LEA RDI,[0x1504a8]
LEA RDX,[0x14c5c1]
LEA RCX,[0x15060c]
MOV ESI,0x95
JMP 0x0012b0a2
LAB_0012b050:
LEA RDI,[0x1504a8]
LEA RDX,[0x14c5c1]
LEA RCX,[0x15066b]
MOV ESI,0x9d
JMP 0x0012b0a2
LAB_0012b06c:
LEA RDI,[0x1504a8]
LEA RDX,[0x14c5c1]
LEA RCX,[0x1505a0]
MOV ESI,0x91
JMP 0x0012b0a2
LAB_0012b088:
LEA RDI,[0x1504a8]
LEA RDX,[0x14c5c1]
LEA RCX,[0x150633]
MOV ESI,0x9a
LAB_0012b0a2:
XOR EAX,EAX
CALL 0x00118ce0
|
void ggml_opt_dataset_get_batch(long param_1,long param_2,long param_3,long param_4)
{
char cVar1;
ulong uVar2;
ulong uVar3;
long lVar4;
long lVar5;
char *pcVar6;
int8 uVar7;
if (param_2 != 0) {
cVar1 = ggml_is_contiguous(param_2);
if (cVar1 != '\0') {
if (param_3 != 0) {
cVar1 = ggml_is_contiguous(param_3);
if (cVar1 == '\0') {
pcVar6 = "!labels_batch || ggml_is_contiguous(labels_batch)";
uVar7 = 0x91;
goto LAB_0012b0a2;
}
}
if ((*(long *)(param_1 + 0x18) != 0) == (param_3 == 0)) {
pcVar6 = "(labels_batch == nullptr) == (dataset->labels == nullptr)";
uVar7 = 0x92;
}
else {
uVar2 = ggml_nbytes(param_2);
uVar3 = uVar2 / *(ulong *)(param_1 + 0x30);
if (uVar2 % *(ulong *)(param_1 + 0x30) == 0) {
if (param_3 != 0) {
lVar4 = ggml_nbytes(param_3);
if (lVar4 != *(long *)(param_1 + 0x38) * uVar3) {
pcVar6 = "nb_labels_batch == shards_per_batch*dataset->nbs_labels";
uVar7 = 0x9a;
goto LAB_0012b0a2;
}
}
lVar4 = (param_4 + 1) * uVar3;
lVar5 = *(long *)(param_1 + 0x48) - *(long *)(param_1 + 0x40) >> 3;
if (lVar4 - lVar5 == 0 || lVar4 < lVar5) {
if (0 < (long)uVar3) {
lVar4 = 0;
do {
uVar2 = param_4 * uVar3 + lVar4;
if ((ulong)(*(long *)(param_1 + 0x48) - *(long *)(param_1 + 0x40) >> 3) <= uVar2) {
ggml_opt_dataset_get_batch_cold_1();
goto LAB_0012aff9;
}
lVar5 = *(long *)(*(long *)(param_1 + 0x40) + uVar2 * 8);
ggml_backend_tensor_set
(param_2,*(long *)(param_1 + 0x30) * lVar5 +
*(long *)(*(long *)(param_1 + 0x10) + 0xf8),
*(long *)(param_1 + 0x30) * lVar4);
if (param_3 != 0) {
ggml_backend_tensor_set
(param_3,lVar5 * *(long *)(param_1 + 0x38) +
*(long *)(*(long *)(param_1 + 0x18) + 0xf8),
*(long *)(param_1 + 0x38) * lVar4);
}
lVar4 = lVar4 + 1;
} while (lVar4 < (long)uVar3);
}
return;
}
pcVar6 = "(ibatch + 1)*shards_per_batch <= int64_t(dataset->permutation.size())";
uVar7 = 0x9d;
}
else {
pcVar6 = "nb_data_batch % dataset->nbs_data == 0";
uVar7 = 0x95;
}
}
goto LAB_0012b0a2;
}
}
LAB_0012aff9:
pcVar6 = "data_batch && ggml_is_contiguous(data_batch)";
uVar7 = 0x90;
LAB_0012b0a2:
/* WARNING: Subroutine does not return */
ggml_abort("/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-opt.cpp"
,uVar7,"GGML_ASSERT(%s) failed",pcVar6);
}
| |
47,814 | ggml_opt_dataset_get_batch | Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-opt.cpp | void ggml_opt_dataset_get_batch(ggml_opt_dataset_t dataset, struct ggml_tensor * data_batch, struct ggml_tensor * labels_batch, int64_t ibatch) {
GGML_ASSERT( data_batch && ggml_is_contiguous(data_batch));
GGML_ASSERT(!labels_batch || ggml_is_contiguous(labels_batch));
GGML_ASSERT((labels_batch == nullptr) == (dataset->labels == nullptr));
const size_t nb_data_batch = ggml_nbytes(data_batch);
GGML_ASSERT(nb_data_batch % dataset->nbs_data == 0);
const int64_t shards_per_batch = nb_data_batch / dataset->nbs_data;
if (labels_batch) {
const size_t nb_labels_batch = ggml_nbytes(labels_batch);
GGML_ASSERT(nb_labels_batch == shards_per_batch*dataset->nbs_labels);
}
GGML_ASSERT((ibatch + 1)*shards_per_batch <= int64_t(dataset->permutation.size()));
for (int64_t ishard_batch = 0; ishard_batch < shards_per_batch; ++ishard_batch) {
const int64_t ishard = dataset->permutation[ibatch*shards_per_batch + ishard_batch];
const char * ptr_data = (const char *) dataset->data->data + ishard*dataset->nbs_data;
ggml_backend_tensor_set(data_batch, ptr_data, ishard_batch*dataset->nbs_data, dataset->nbs_data);
if (!labels_batch) {
continue;
}
const char * ptr_labels = (const char *) dataset->labels->data + ishard*dataset->nbs_labels;
ggml_backend_tensor_set(labels_batch, ptr_labels, ishard_batch*dataset->nbs_labels, dataset->nbs_labels);
}
} | O2 | cpp | ggml_opt_dataset_get_batch:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
testq %rsi, %rsi
je 0x2f102
movq %rcx, %rbx
movq %rdx, %r15
movq %rsi, %r14
movq %rdi, %r12
movq %rsi, %rdi
callq 0x1d680
testb %al, %al
je 0x2f102
testq %r15, %r15
je 0x2eff1
movq %r15, %rdi
callq 0x1d680
testb %al, %al
je 0x2f175
testq %r15, %r15
sete %al
cmpq $0x0, 0x18(%r12)
setne %cl
xorb %al, %cl
je 0x2f121
movq %r14, %rdi
callq 0x1d300
xorl %edx, %edx
divq 0x30(%r12)
testq %rdx, %rdx
jne 0x2f13d
movq %rax, %r13
testq %r15, %r15
je 0x2f042
movq %r15, %rdi
callq 0x1d300
movq 0x38(%r12), %rcx
imulq %r13, %rcx
cmpq %rcx, %rax
jne 0x2f191
movq %r15, 0x10(%rsp)
movq %r14, 0x8(%rsp)
leaq 0x1(%rbx), %rax
imulq %r13, %rax
movq 0x48(%r12), %rcx
subq 0x40(%r12), %rcx
sarq $0x3, %rcx
cmpq %rcx, %rax
jg 0x2f159
leaq 0x40(%r12), %rbp
imulq %r13, %rbx
xorl %r15d, %r15d
cmpq %r13, %r15
jge 0x2f0f3
movq %r13, %r14
movq %rbx, %r13
leaq (%r15,%rbx), %rsi
movq %rbp, %rdi
callq 0x1eae0
movq (%rax), %rbx
movq 0x10(%r12), %rax
movq 0x30(%r12), %rcx
movq %rcx, %rsi
imulq %rbx, %rsi
addq 0xf8(%rax), %rsi
movq %rcx, %rdx
imulq %r15, %rdx
movq 0x8(%rsp), %rdi
callq 0x1dcb0
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0x2f0e8
movq 0x18(%r12), %rax
movq 0x38(%r12), %rcx
imulq %rcx, %rbx
addq 0xf8(%rax), %rbx
movq %rcx, %rdx
imulq %r15, %rdx
movq %rbx, %rsi
callq 0x1dcb0
incq %r15
movq %r13, %rbx
movq %r14, %r13
jmp 0x2f077
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x233af(%rip), %rdi # 0x524b8
leaq 0x1f4c5(%rip), %rdx # 0x4e5d5
leaq 0x2346c(%rip), %rcx # 0x52583
movl $0x90, %esi
jmp 0x2f1ab
leaq 0x23390(%rip), %rdi # 0x524b8
leaq 0x1f4a6(%rip), %rdx # 0x4e5d5
leaq 0x234ac(%rip), %rcx # 0x525e2
movl $0x92, %esi
jmp 0x2f1ab
leaq 0x23374(%rip), %rdi # 0x524b8
leaq 0x1f48a(%rip), %rdx # 0x4e5d5
leaq 0x234ca(%rip), %rcx # 0x5261c
movl $0x95, %esi
jmp 0x2f1ab
leaq 0x23358(%rip), %rdi # 0x524b8
leaq 0x1f46e(%rip), %rdx # 0x4e5d5
leaq 0x2350d(%rip), %rcx # 0x5267b
movl $0x9d, %esi
jmp 0x2f1ab
leaq 0x2333c(%rip), %rdi # 0x524b8
leaq 0x1f452(%rip), %rdx # 0x4e5d5
leaq 0x23426(%rip), %rcx # 0x525b0
movl $0x91, %esi
jmp 0x2f1ab
leaq 0x23320(%rip), %rdi # 0x524b8
leaq 0x1f436(%rip), %rdx # 0x4e5d5
leaq 0x2349d(%rip), %rcx # 0x52643
movl $0x9a, %esi
xorl %eax, %eax
callq 0x1f9b0
| ggml_opt_dataset_get_batch:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 18h
test rsi, rsi
jz loc_2F102
mov rbx, rcx
mov r15, rdx
mov r14, rsi
mov r12, rdi
mov rdi, rsi
call _ggml_is_contiguous
test al, al
jz loc_2F102
test r15, r15
jz short loc_2EFF1
mov rdi, r15
call _ggml_is_contiguous
test al, al
jz loc_2F175
loc_2EFF1:
test r15, r15
setz al
cmp qword ptr [r12+18h], 0
setnz cl
xor cl, al
jz loc_2F121
mov rdi, r14
call _ggml_nbytes
xor edx, edx
div qword ptr [r12+30h]
test rdx, rdx
jnz loc_2F13D
mov r13, rax
test r15, r15
jz short loc_2F042
mov rdi, r15
call _ggml_nbytes
mov rcx, [r12+38h]
imul rcx, r13
cmp rax, rcx
jnz loc_2F191
loc_2F042:
mov [rsp+48h+var_38], r15
mov [rsp+48h+var_40], r14
lea rax, [rbx+1]
imul rax, r13
mov rcx, [r12+48h]
sub rcx, [r12+40h]
sar rcx, 3
cmp rax, rcx
jg loc_2F159
lea rbp, [r12+40h]
imul rbx, r13
xor r15d, r15d
loc_2F077:
cmp r15, r13
jge short loc_2F0F3
mov r14, r13
mov r13, rbx
lea rsi, [r15+rbx]
mov rdi, rbp
call __ZNSt6vectorIlSaIlEEixEm; std::vector<long>::operator[](ulong)
mov rbx, [rax]
mov rax, [r12+10h]
mov rcx, [r12+30h]
mov rsi, rcx
imul rsi, rbx
add rsi, [rax+0F8h]
mov rdx, rcx
imul rdx, r15
mov rdi, [rsp+48h+var_40]
call _ggml_backend_tensor_set
mov rdi, [rsp+48h+var_38]
test rdi, rdi
jz short loc_2F0E8
mov rax, [r12+18h]
mov rcx, [r12+38h]
imul rbx, rcx
add rbx, [rax+0F8h]
mov rdx, rcx
imul rdx, r15
mov rsi, rbx
call _ggml_backend_tensor_set
loc_2F0E8:
inc r15
mov rbx, r13
mov r13, r14
jmp short loc_2F077
loc_2F0F3:
add rsp, 18h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_2F102:
lea rdi, aWorkspaceLlm4b_3; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aDataBatchGgmlI; "data_batch && ggml_is_contiguous(data_b"...
mov esi, 90h
jmp loc_2F1AB
loc_2F121:
lea rdi, aWorkspaceLlm4b_3; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aLabelsBatchNul; "(labels_batch == nullptr) == (dataset->"...
mov esi, 92h
jmp short loc_2F1AB
loc_2F13D:
lea rdi, aWorkspaceLlm4b_3; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aNbDataBatchDat; "nb_data_batch % dataset->nbs_data == 0"
mov esi, 95h
jmp short loc_2F1AB
loc_2F159:
lea rdi, aWorkspaceLlm4b_3; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aIbatch1ShardsP; "(ibatch + 1)*shards_per_batch <= int64_"...
mov esi, 9Dh
jmp short loc_2F1AB
loc_2F175:
lea rdi, aWorkspaceLlm4b_3; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aLabelsBatchGgm; "!labels_batch || ggml_is_contiguous(lab"...
mov esi, 91h
jmp short loc_2F1AB
loc_2F191:
lea rdi, aWorkspaceLlm4b_3; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aNbLabelsBatchS; "nb_labels_batch == shards_per_batch*dat"...
mov esi, 9Ah
loc_2F1AB:
xor eax, eax
call _ggml_abort
| long long ggml_opt_dataset_get_batch(
_QWORD *a1,
unsigned int *a2,
unsigned int *a3,
long long a4,
long long a5,
long long a6,
__m128 a7,
__m128 a8,
__m128 a9,
__m128 a10,
__m128 a11,
__m128 a12,
__m128 a13,
__m128 a14)
{
unsigned long long v16; // rax
unsigned long long v17; // rtt
signed long long v18; // r13
long long result; // rax
signed long long v20; // rbx
signed long long i; // r15
signed long long v22; // r14
long long v23; // r13
long long *v24; // rax
long long v25; // rbx
const char *v26; // rcx
int v27; // esi
char v28; // [rsp+0h] [rbp-48h]
unsigned int *v29; // [rsp+10h] [rbp-38h]
if ( !a2 || !(unsigned __int8)ggml_is_contiguous(a2) )
{
v26 = "data_batch && ggml_is_contiguous(data_batch)";
v27 = 144;
goto LABEL_22;
}
if ( a3 && !(unsigned __int8)ggml_is_contiguous(a3) )
{
v26 = "!labels_batch || ggml_is_contiguous(labels_batch)";
v27 = 145;
goto LABEL_22;
}
if ( (a3 == 0LL) == (a1[3] != 0LL) )
{
v26 = "(labels_batch == nullptr) == (dataset->labels == nullptr)";
v27 = 146;
goto LABEL_22;
}
v17 = ggml_nbytes(a2);
v16 = v17 / a1[6];
if ( v17 % a1[6] )
{
v26 = "nb_data_batch % dataset->nbs_data == 0";
v27 = 149;
goto LABEL_22;
}
v18 = v16;
if ( a3 && ggml_nbytes(a3) != v16 * a1[7] )
{
v26 = "nb_labels_batch == shards_per_batch*dataset->nbs_labels";
v27 = 154;
LABEL_22:
ggml_abort(
"/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-opt.cpp",
v27,
(long long)"GGML_ASSERT(%s) failed",
(long long)v26,
a5,
a6,
a7,
a8,
a9,
a10,
a11,
a12,
a13,
a14,
v28);
}
v29 = a3;
result = v18 * (a4 + 1);
if ( result > (long long)(a1[9] - a1[8]) >> 3 )
{
v26 = "(ibatch + 1)*shards_per_batch <= int64_t(dataset->permutation.size())";
v27 = 157;
goto LABEL_22;
}
v20 = v18 * a4;
for ( i = 0LL; i < v18; ++i )
{
v22 = v18;
v23 = v20;
v24 = (long long *)std::vector<long>::operator[](a1 + 8, i + v20);
v25 = *v24;
result = ggml_backend_tensor_set(a2, *(_QWORD *)(a1[2] + 248LL) + *v24 * a1[6], i * a1[6], a1[6]);
if ( v29 )
result = ggml_backend_tensor_set(v29, *(_QWORD *)(a1[3] + 248LL) + a1[7] * v25, i * a1[7], a1[7]);
v20 = v23;
v18 = v22;
}
return result;
}
| ggml_opt_dataset_get_batch:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x18
TEST RSI,RSI
JZ 0x0012f102
MOV RBX,RCX
MOV R15,RDX
MOV R14,RSI
MOV R12,RDI
MOV RDI,RSI
CALL 0x0011d680
TEST AL,AL
JZ 0x0012f102
TEST R15,R15
JZ 0x0012eff1
MOV RDI,R15
CALL 0x0011d680
TEST AL,AL
JZ 0x0012f175
LAB_0012eff1:
TEST R15,R15
SETZ AL
CMP qword ptr [R12 + 0x18],0x0
SETNZ CL
XOR CL,AL
JZ 0x0012f121
MOV RDI,R14
CALL 0x0011d300
XOR EDX,EDX
DIV qword ptr [R12 + 0x30]
TEST RDX,RDX
JNZ 0x0012f13d
MOV R13,RAX
TEST R15,R15
JZ 0x0012f042
MOV RDI,R15
CALL 0x0011d300
MOV RCX,qword ptr [R12 + 0x38]
IMUL RCX,R13
CMP RAX,RCX
JNZ 0x0012f191
LAB_0012f042:
MOV qword ptr [RSP + 0x10],R15
MOV qword ptr [RSP + 0x8],R14
LEA RAX,[RBX + 0x1]
IMUL RAX,R13
MOV RCX,qword ptr [R12 + 0x48]
SUB RCX,qword ptr [R12 + 0x40]
SAR RCX,0x3
CMP RAX,RCX
JG 0x0012f159
LEA RBP,[R12 + 0x40]
IMUL RBX,R13
XOR R15D,R15D
LAB_0012f077:
CMP R15,R13
JGE 0x0012f0f3
MOV R14,R13
MOV R13,RBX
LEA RSI,[R15 + RBX*0x1]
MOV RDI,RBP
CALL 0x0011eae0
MOV RBX,qword ptr [RAX]
MOV RAX,qword ptr [R12 + 0x10]
MOV RCX,qword ptr [R12 + 0x30]
MOV RSI,RCX
IMUL RSI,RBX
ADD RSI,qword ptr [RAX + 0xf8]
MOV RDX,RCX
IMUL RDX,R15
MOV RDI,qword ptr [RSP + 0x8]
CALL 0x0011dcb0
MOV RDI,qword ptr [RSP + 0x10]
TEST RDI,RDI
JZ 0x0012f0e8
MOV RAX,qword ptr [R12 + 0x18]
MOV RCX,qword ptr [R12 + 0x38]
IMUL RBX,RCX
ADD RBX,qword ptr [RAX + 0xf8]
MOV RDX,RCX
IMUL RDX,R15
MOV RSI,RBX
CALL 0x0011dcb0
LAB_0012f0e8:
INC R15
MOV RBX,R13
MOV R13,R14
JMP 0x0012f077
LAB_0012f0f3:
ADD RSP,0x18
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_0012f102:
LEA RDI,[0x1524b8]
LEA RDX,[0x14e5d5]
LEA RCX,[0x152583]
MOV ESI,0x90
JMP 0x0012f1ab
LAB_0012f121:
LEA RDI,[0x1524b8]
LEA RDX,[0x14e5d5]
LEA RCX,[0x1525e2]
MOV ESI,0x92
JMP 0x0012f1ab
LAB_0012f13d:
LEA RDI,[0x1524b8]
LEA RDX,[0x14e5d5]
LEA RCX,[0x15261c]
MOV ESI,0x95
JMP 0x0012f1ab
LAB_0012f159:
LEA RDI,[0x1524b8]
LEA RDX,[0x14e5d5]
LEA RCX,[0x15267b]
MOV ESI,0x9d
JMP 0x0012f1ab
LAB_0012f175:
LEA RDI,[0x1524b8]
LEA RDX,[0x14e5d5]
LEA RCX,[0x1525b0]
MOV ESI,0x91
JMP 0x0012f1ab
LAB_0012f191:
LEA RDI,[0x1524b8]
LEA RDX,[0x14e5d5]
LEA RCX,[0x152643]
MOV ESI,0x9a
LAB_0012f1ab:
XOR EAX,EAX
CALL 0x0011f9b0
|
void ggml_opt_dataset_get_batch(long param_1,long param_2,long param_3,long param_4)
{
char cVar1;
ulong uVar2;
ulong uVar3;
long lVar4;
long *plVar5;
long lVar6;
char *pcVar7;
int8 uVar8;
if (param_2 != 0) {
cVar1 = ggml_is_contiguous(param_2);
if (cVar1 != '\0') {
if (param_3 != 0) {
cVar1 = ggml_is_contiguous(param_3);
if (cVar1 == '\0') {
pcVar7 = "!labels_batch || ggml_is_contiguous(labels_batch)";
uVar8 = 0x91;
goto LAB_0012f1ab;
}
}
if ((*(long *)(param_1 + 0x18) != 0) == (param_3 == 0)) {
pcVar7 = "(labels_batch == nullptr) == (dataset->labels == nullptr)";
uVar8 = 0x92;
}
else {
uVar2 = ggml_nbytes(param_2);
uVar3 = uVar2 / *(ulong *)(param_1 + 0x30);
if (uVar2 % *(ulong *)(param_1 + 0x30) == 0) {
if (param_3 != 0) {
lVar4 = ggml_nbytes(param_3);
if (lVar4 != *(long *)(param_1 + 0x38) * uVar3) {
pcVar7 = "nb_labels_batch == shards_per_batch*dataset->nbs_labels";
uVar8 = 0x9a;
goto LAB_0012f1ab;
}
}
lVar4 = (param_4 + 1) * uVar3;
lVar6 = *(long *)(param_1 + 0x48) - *(long *)(param_1 + 0x40) >> 3;
if (lVar4 - lVar6 == 0 || lVar4 < lVar6) {
for (lVar4 = 0; lVar4 < (long)uVar3; lVar4 = lVar4 + 1) {
plVar5 = (long *)std::vector<long,std::allocator<long>>::operator[]
((vector<long,std::allocator<long>> *)(param_1 + 0x40),
lVar4 + param_4 * uVar3);
lVar6 = *plVar5;
ggml_backend_tensor_set
(param_2,*(long *)(param_1 + 0x30) * lVar6 +
*(long *)(*(long *)(param_1 + 0x10) + 0xf8),
*(long *)(param_1 + 0x30) * lVar4);
if (param_3 != 0) {
ggml_backend_tensor_set
(param_3,lVar6 * *(long *)(param_1 + 0x38) +
*(long *)(*(long *)(param_1 + 0x18) + 0xf8),
*(long *)(param_1 + 0x38) * lVar4);
}
}
return;
}
pcVar7 = "(ibatch + 1)*shards_per_batch <= int64_t(dataset->permutation.size())";
uVar8 = 0x9d;
}
else {
pcVar7 = "nb_data_batch % dataset->nbs_data == 0";
uVar8 = 0x95;
}
}
goto LAB_0012f1ab;
}
}
pcVar7 = "data_batch && ggml_is_contiguous(data_batch)";
uVar8 = 0x90;
LAB_0012f1ab:
/* WARNING: Subroutine does not return */
ggml_abort("/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-opt.cpp"
,uVar8,"GGML_ASSERT(%s) failed",pcVar7);
}
| |
47,815 | ggml_opt_dataset_get_batch | Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-opt.cpp | void ggml_opt_dataset_get_batch(ggml_opt_dataset_t dataset, struct ggml_tensor * data_batch, struct ggml_tensor * labels_batch, int64_t ibatch) {
GGML_ASSERT( data_batch && ggml_is_contiguous(data_batch));
GGML_ASSERT(!labels_batch || ggml_is_contiguous(labels_batch));
GGML_ASSERT((labels_batch == nullptr) == (dataset->labels == nullptr));
const size_t nb_data_batch = ggml_nbytes(data_batch);
GGML_ASSERT(nb_data_batch % dataset->nbs_data == 0);
const int64_t shards_per_batch = nb_data_batch / dataset->nbs_data;
if (labels_batch) {
const size_t nb_labels_batch = ggml_nbytes(labels_batch);
GGML_ASSERT(nb_labels_batch == shards_per_batch*dataset->nbs_labels);
}
GGML_ASSERT((ibatch + 1)*shards_per_batch <= int64_t(dataset->permutation.size()));
for (int64_t ishard_batch = 0; ishard_batch < shards_per_batch; ++ishard_batch) {
const int64_t ishard = dataset->permutation[ibatch*shards_per_batch + ishard_batch];
const char * ptr_data = (const char *) dataset->data->data + ishard*dataset->nbs_data;
ggml_backend_tensor_set(data_batch, ptr_data, ishard_batch*dataset->nbs_data, dataset->nbs_data);
if (!labels_batch) {
continue;
}
const char * ptr_labels = (const char *) dataset->labels->data + ishard*dataset->nbs_labels;
ggml_backend_tensor_set(labels_batch, ptr_labels, ishard_batch*dataset->nbs_labels, dataset->nbs_labels);
}
} | O3 | cpp | ggml_opt_dataset_get_batch:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rcx, (%rsp)
testq %rsi, %rsi
je 0x29a8f
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %r12
movq %rsi, %rdi
callq 0x16420
testb %al, %al
je 0x29a8f
testq %r14, %r14
je 0x29975
movq %r14, %rdi
callq 0x16420
testb %al, %al
je 0x29b02
testq %r14, %r14
sete %al
cmpq $0x0, 0x18(%r12)
setne %cl
xorb %al, %cl
je 0x29aae
movq %r15, %rdi
callq 0x161c0
xorl %edx, %edx
divq 0x30(%r12)
testq %rdx, %rdx
jne 0x29aca
movq %rax, %r13
testq %r14, %r14
je 0x299c6
movq %r14, %rdi
callq 0x161c0
movq 0x38(%r12), %rcx
imulq %r13, %rcx
cmpq %rcx, %rax
jne 0x29b1e
movq (%rsp), %rax
incq %rax
imulq %r13, %rax
movq 0x48(%r12), %rcx
subq 0x40(%r12), %rcx
sarq $0x3, %rcx
cmpq %rcx, %rax
jg 0x29ae6
testq %r13, %r13
jle 0x29a7b
movq (%rsp), %rax
imulq %r13, %rax
movq %rax, (%rsp)
xorl %ebx, %ebx
movq (%rsp), %rax
addq %rbx, %rax
movq 0x40(%r12), %rcx
movq 0x48(%r12), %rdx
subq %rcx, %rdx
sarq $0x3, %rdx
cmpq %rax, %rdx
jbe 0x29a8a
movq (%rcx,%rax,8), %rbp
movq 0x10(%r12), %rax
movq 0x30(%r12), %rcx
movq %rcx, %rsi
imulq %rbp, %rsi
addq 0xf8(%rax), %rsi
movq %rcx, %rdx
imulq %rbx, %rdx
movq %r15, %rdi
callq 0x168e0
testq %r14, %r14
je 0x29a73
movq 0x18(%r12), %rax
movq 0x38(%r12), %rcx
imulq %rcx, %rbp
addq 0xf8(%rax), %rbp
movq %rcx, %rdx
imulq %rbx, %rdx
movq %r14, %rdi
movq %rbp, %rsi
callq 0x168e0
incq %rbx
cmpq %r13, %rbx
jl 0x299ff
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0x185a7
leaq 0x26ae2(%rip), %rdi # 0x50578
leaq 0x22bc8(%rip), %rdx # 0x4c665
leaq 0x26b9f(%rip), %rcx # 0x50643
movl $0x90, %esi
jmp 0x29b38
leaq 0x26ac3(%rip), %rdi # 0x50578
leaq 0x22ba9(%rip), %rdx # 0x4c665
leaq 0x26bdf(%rip), %rcx # 0x506a2
movl $0x92, %esi
jmp 0x29b38
leaq 0x26aa7(%rip), %rdi # 0x50578
leaq 0x22b8d(%rip), %rdx # 0x4c665
leaq 0x26bfd(%rip), %rcx # 0x506dc
movl $0x95, %esi
jmp 0x29b38
leaq 0x26a8b(%rip), %rdi # 0x50578
leaq 0x22b71(%rip), %rdx # 0x4c665
leaq 0x26c40(%rip), %rcx # 0x5073b
movl $0x9d, %esi
jmp 0x29b38
leaq 0x26a6f(%rip), %rdi # 0x50578
leaq 0x22b55(%rip), %rdx # 0x4c665
leaq 0x26b59(%rip), %rcx # 0x50670
movl $0x91, %esi
jmp 0x29b38
leaq 0x26a53(%rip), %rdi # 0x50578
leaq 0x22b39(%rip), %rdx # 0x4c665
leaq 0x26bd0(%rip), %rcx # 0x50703
movl $0x9a, %esi
xorl %eax, %eax
callq 0x17cd0
| ggml_opt_dataset_get_batch:
push rbp
push r15
push r14
push r13
push r12
push rbx
push rax
mov [rsp+38h+var_38], rcx
test rsi, rsi
jz loc_29A8F
mov r14, rdx
mov r15, rsi
mov r12, rdi
mov rdi, rsi
call _ggml_is_contiguous
test al, al
jz loc_29A8F
test r14, r14
jz short loc_29975
mov rdi, r14
call _ggml_is_contiguous
test al, al
jz loc_29B02
loc_29975:
test r14, r14
setz al
cmp qword ptr [r12+18h], 0
setnz cl
xor cl, al
jz loc_29AAE
mov rdi, r15
call _ggml_nbytes
xor edx, edx
div qword ptr [r12+30h]
test rdx, rdx
jnz loc_29ACA
mov r13, rax
test r14, r14
jz short loc_299C6
mov rdi, r14
call _ggml_nbytes
mov rcx, [r12+38h]
imul rcx, r13
cmp rax, rcx
jnz loc_29B1E
loc_299C6:
mov rax, [rsp+38h+var_38]
inc rax
imul rax, r13
mov rcx, [r12+48h]
sub rcx, [r12+40h]
sar rcx, 3
cmp rax, rcx
jg loc_29AE6
test r13, r13
jle loc_29A7B
mov rax, [rsp+38h+var_38]
imul rax, r13
mov [rsp+38h+var_38], rax
xor ebx, ebx
loc_299FF:
mov rax, [rsp+38h+var_38]
add rax, rbx
mov rcx, [r12+40h]
mov rdx, [r12+48h]
sub rdx, rcx
sar rdx, 3
cmp rdx, rax
jbe short loc_29A8A
mov rbp, [rcx+rax*8]
mov rax, [r12+10h]
mov rcx, [r12+30h]
mov rsi, rcx
imul rsi, rbp
add rsi, [rax+0F8h]
mov rdx, rcx
imul rdx, rbx
mov rdi, r15
call _ggml_backend_tensor_set
test r14, r14
jz short loc_29A73
mov rax, [r12+18h]
mov rcx, [r12+38h]
imul rbp, rcx
add rbp, [rax+0F8h]
mov rdx, rcx
imul rdx, rbx
mov rdi, r14
mov rsi, rbp
call _ggml_backend_tensor_set
loc_29A73:
inc rbx
cmp rbx, r13
jl short loc_299FF
loc_29A7B:
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_29A8A:
call ggml_opt_dataset_get_batch_cold_1
loc_29A8F:
lea rdi, aWorkspaceLlm4b_3; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aDataBatchGgmlI; "data_batch && ggml_is_contiguous(data_b"...
mov esi, 90h
jmp loc_29B38
loc_29AAE:
lea rdi, aWorkspaceLlm4b_3; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aLabelsBatchNul; "(labels_batch == nullptr) == (dataset->"...
mov esi, 92h
jmp short loc_29B38
loc_29ACA:
lea rdi, aWorkspaceLlm4b_3; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aNbDataBatchDat; "nb_data_batch % dataset->nbs_data == 0"
mov esi, 95h
jmp short loc_29B38
loc_29AE6:
lea rdi, aWorkspaceLlm4b_3; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aIbatch1ShardsP; "(ibatch + 1)*shards_per_batch <= int64_"...
mov esi, 9Dh
jmp short loc_29B38
loc_29B02:
lea rdi, aWorkspaceLlm4b_3; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aLabelsBatchGgm; "!labels_batch || ggml_is_contiguous(lab"...
mov esi, 91h
jmp short loc_29B38
loc_29B1E:
lea rdi, aWorkspaceLlm4b_3; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aNbLabelsBatchS; "nb_labels_batch == shards_per_batch*dat"...
mov esi, 9Ah
loc_29B38:
xor eax, eax
call _ggml_abort
| long long ggml_opt_dataset_get_batch(
_QWORD *a1,
unsigned int *a2,
unsigned int *a3,
long long a4,
int a5,
int a6)
{
unsigned long long v7; // rax
unsigned long long v8; // rtt
long long v9; // r13
long long result; // rax
long long i; // rbx
long long v12; // rcx
long long v13; // rbp
const char *v14; // rcx
int v15; // esi
long long v17; // [rsp+0h] [rbp-38h]
if ( !a2 || !(unsigned __int8)ggml_is_contiguous((long long)a2) )
{
v14 = "data_batch && ggml_is_contiguous(data_batch)";
v15 = 144;
goto LABEL_24;
}
if ( a3 && !(unsigned __int8)ggml_is_contiguous((long long)a3) )
{
v14 = "!labels_batch || ggml_is_contiguous(labels_batch)";
v15 = 145;
goto LABEL_24;
}
if ( (a3 == 0LL) == (a1[3] != 0LL) )
{
v14 = "(labels_batch == nullptr) == (dataset->labels == nullptr)";
v15 = 146;
goto LABEL_24;
}
v8 = ggml_nbytes(a2);
v7 = v8 / a1[6];
if ( v8 % a1[6] )
{
v14 = "nb_data_batch % dataset->nbs_data == 0";
v15 = 149;
goto LABEL_24;
}
v9 = v7;
if ( a3 && ggml_nbytes(a3) != v7 * a1[7] )
{
v14 = "nb_labels_batch == shards_per_batch*dataset->nbs_labels";
v15 = 154;
LABEL_24:
ggml_abort(
(unsigned int)"/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-opt.cpp",
v15,
(unsigned int)"GGML_ASSERT(%s) failed",
(_DWORD)v14,
a5,
a6);
}
result = v9 * (a4 + 1);
if ( result > (long long)(a1[9] - a1[8]) >> 3 )
{
v14 = "(ibatch + 1)*shards_per_batch <= int64_t(dataset->permutation.size())";
v15 = 157;
goto LABEL_24;
}
if ( v9 > 0 )
{
v17 = v9 * a4;
for ( i = 0LL; i < v9; ++i )
{
v12 = a1[8];
if ( (a1[9] - v12) >> 3 <= (unsigned long long)(i + v17) )
ggml_opt_dataset_get_batch_cold_1();
v13 = *(_QWORD *)(v12 + 8 * (i + v17));
result = ggml_backend_tensor_set(a2, *(_QWORD *)(a1[2] + 248LL) + v13 * a1[6], i * a1[6], a1[6]);
if ( a3 )
result = ggml_backend_tensor_set(a3, *(_QWORD *)(a1[3] + 248LL) + a1[7] * v13, i * a1[7], a1[7]);
}
}
return result;
}
| ggml_opt_dataset_get_batch:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
PUSH RAX
MOV qword ptr [RSP],RCX
TEST RSI,RSI
JZ 0x00129a8f
MOV R14,RDX
MOV R15,RSI
MOV R12,RDI
MOV RDI,RSI
CALL 0x00116420
TEST AL,AL
JZ 0x00129a8f
TEST R14,R14
JZ 0x00129975
MOV RDI,R14
CALL 0x00116420
TEST AL,AL
JZ 0x00129b02
LAB_00129975:
TEST R14,R14
SETZ AL
CMP qword ptr [R12 + 0x18],0x0
SETNZ CL
XOR CL,AL
JZ 0x00129aae
MOV RDI,R15
CALL 0x001161c0
XOR EDX,EDX
DIV qword ptr [R12 + 0x30]
TEST RDX,RDX
JNZ 0x00129aca
MOV R13,RAX
TEST R14,R14
JZ 0x001299c6
MOV RDI,R14
CALL 0x001161c0
MOV RCX,qword ptr [R12 + 0x38]
IMUL RCX,R13
CMP RAX,RCX
JNZ 0x00129b1e
LAB_001299c6:
MOV RAX,qword ptr [RSP]
INC RAX
IMUL RAX,R13
MOV RCX,qword ptr [R12 + 0x48]
SUB RCX,qword ptr [R12 + 0x40]
SAR RCX,0x3
CMP RAX,RCX
JG 0x00129ae6
TEST R13,R13
JLE 0x00129a7b
MOV RAX,qword ptr [RSP]
IMUL RAX,R13
MOV qword ptr [RSP],RAX
XOR EBX,EBX
LAB_001299ff:
MOV RAX,qword ptr [RSP]
ADD RAX,RBX
MOV RCX,qword ptr [R12 + 0x40]
MOV RDX,qword ptr [R12 + 0x48]
SUB RDX,RCX
SAR RDX,0x3
CMP RDX,RAX
JBE 0x00129a8a
MOV RBP,qword ptr [RCX + RAX*0x8]
MOV RAX,qword ptr [R12 + 0x10]
MOV RCX,qword ptr [R12 + 0x30]
MOV RSI,RCX
IMUL RSI,RBP
ADD RSI,qword ptr [RAX + 0xf8]
MOV RDX,RCX
IMUL RDX,RBX
MOV RDI,R15
CALL 0x001168e0
TEST R14,R14
JZ 0x00129a73
MOV RAX,qword ptr [R12 + 0x18]
MOV RCX,qword ptr [R12 + 0x38]
IMUL RBP,RCX
ADD RBP,qword ptr [RAX + 0xf8]
MOV RDX,RCX
IMUL RDX,RBX
MOV RDI,R14
MOV RSI,RBP
CALL 0x001168e0
LAB_00129a73:
INC RBX
CMP RBX,R13
JL 0x001299ff
LAB_00129a7b:
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_00129a8a:
CALL 0x001185a7
LAB_00129a8f:
LEA RDI,[0x150578]
LEA RDX,[0x14c665]
LEA RCX,[0x150643]
MOV ESI,0x90
JMP 0x00129b38
LAB_00129aae:
LEA RDI,[0x150578]
LEA RDX,[0x14c665]
LEA RCX,[0x1506a2]
MOV ESI,0x92
JMP 0x00129b38
LAB_00129aca:
LEA RDI,[0x150578]
LEA RDX,[0x14c665]
LEA RCX,[0x1506dc]
MOV ESI,0x95
JMP 0x00129b38
LAB_00129ae6:
LEA RDI,[0x150578]
LEA RDX,[0x14c665]
LEA RCX,[0x15073b]
MOV ESI,0x9d
JMP 0x00129b38
LAB_00129b02:
LEA RDI,[0x150578]
LEA RDX,[0x14c665]
LEA RCX,[0x150670]
MOV ESI,0x91
JMP 0x00129b38
LAB_00129b1e:
LEA RDI,[0x150578]
LEA RDX,[0x14c665]
LEA RCX,[0x150703]
MOV ESI,0x9a
LAB_00129b38:
XOR EAX,EAX
CALL 0x00117cd0
|
void ggml_opt_dataset_get_batch(long param_1,long param_2,long param_3,long param_4)
{
char cVar1;
ulong uVar2;
ulong uVar3;
long lVar4;
long lVar5;
char *pcVar6;
int8 uVar7;
if (param_2 != 0) {
cVar1 = ggml_is_contiguous(param_2);
if (cVar1 != '\0') {
if (param_3 != 0) {
cVar1 = ggml_is_contiguous(param_3);
if (cVar1 == '\0') {
pcVar6 = "!labels_batch || ggml_is_contiguous(labels_batch)";
uVar7 = 0x91;
goto LAB_00129b38;
}
}
if ((*(long *)(param_1 + 0x18) != 0) == (param_3 == 0)) {
pcVar6 = "(labels_batch == nullptr) == (dataset->labels == nullptr)";
uVar7 = 0x92;
}
else {
uVar2 = ggml_nbytes(param_2);
uVar3 = uVar2 / *(ulong *)(param_1 + 0x30);
if (uVar2 % *(ulong *)(param_1 + 0x30) == 0) {
if (param_3 != 0) {
lVar4 = ggml_nbytes(param_3);
if (lVar4 != *(long *)(param_1 + 0x38) * uVar3) {
pcVar6 = "nb_labels_batch == shards_per_batch*dataset->nbs_labels";
uVar7 = 0x9a;
goto LAB_00129b38;
}
}
lVar4 = (param_4 + 1) * uVar3;
lVar5 = *(long *)(param_1 + 0x48) - *(long *)(param_1 + 0x40) >> 3;
if (lVar4 - lVar5 == 0 || lVar4 < lVar5) {
if (0 < (long)uVar3) {
lVar4 = 0;
do {
uVar2 = param_4 * uVar3 + lVar4;
if ((ulong)(*(long *)(param_1 + 0x48) - *(long *)(param_1 + 0x40) >> 3) <= uVar2) {
ggml_opt_dataset_get_batch_cold_1();
goto LAB_00129a8f;
}
lVar5 = *(long *)(*(long *)(param_1 + 0x40) + uVar2 * 8);
ggml_backend_tensor_set
(param_2,*(long *)(param_1 + 0x30) * lVar5 +
*(long *)(*(long *)(param_1 + 0x10) + 0xf8),
*(long *)(param_1 + 0x30) * lVar4);
if (param_3 != 0) {
ggml_backend_tensor_set
(param_3,lVar5 * *(long *)(param_1 + 0x38) +
*(long *)(*(long *)(param_1 + 0x18) + 0xf8),
*(long *)(param_1 + 0x38) * lVar4);
}
lVar4 = lVar4 + 1;
} while (lVar4 < (long)uVar3);
}
return;
}
pcVar6 = "(ibatch + 1)*shards_per_batch <= int64_t(dataset->permutation.size())";
uVar7 = 0x9d;
}
else {
pcVar6 = "nb_data_batch % dataset->nbs_data == 0";
uVar7 = 0x95;
}
}
goto LAB_00129b38;
}
}
LAB_00129a8f:
pcVar6 = "data_batch && ggml_is_contiguous(data_batch)";
uVar7 = 0x90;
LAB_00129b38:
/* WARNING: Subroutine does not return */
ggml_abort("/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-opt.cpp"
,uVar7,"GGML_ASSERT(%s) failed",pcVar6);
}
| |
47,816 | diagnostic_context_add | eshkol/src/core/diagnostics/diagnostics.c | void diagnostic_context_add(
DiagnosticContext* context,
DiagnosticSeverity severity,
SourceLocation location,
const char* message,
const char* code) {
assert(context != NULL);
assert(message != NULL);
// Check if we need to resize the array
if (context->diagnostics.count >= context->diagnostics.capacity) {
size_t new_capacity = context->diagnostics.capacity == 0 ? 8 : context->diagnostics.capacity * 2;
size_t new_size = new_capacity * sizeof(Diagnostic);
// Allocate new array
Diagnostic* new_items = arena_alloc(context->arena, new_size);
if (!new_items) return; // Failed to allocate
// Copy old items
if (context->diagnostics.items) {
memcpy(new_items, context->diagnostics.items, context->diagnostics.count * sizeof(Diagnostic));
}
// Update array
context->diagnostics.items = new_items;
context->diagnostics.capacity = new_capacity;
}
// Add diagnostic
Diagnostic* diagnostic = &context->diagnostics.items[context->diagnostics.count++];
diagnostic->severity = severity;
diagnostic->location = location;
diagnostic->message = message;
diagnostic->code = code;
// Update error count
if (severity == DIAGNOSTIC_ERROR || severity == DIAGNOSTIC_FATAL) {
context->error_count++;
}
} | O3 | c | diagnostic_context_add:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
testq %rdi, %rdi
je 0x3b89
movq %rdx, %r12
testq %rdx, %rdx
je 0x3ba8
movl %esi, %r14d
movq %rdi, %rbx
movq 0x10(%rdi), %rax
movq 0x18(%rdi), %rdx
cmpq %rdx, %rax
jae 0x3ada
movq 0x8(%rbx), %r13
jmp 0x3b37
movq %rcx, -0x30(%rbp)
leaq (%rdx,%rdx), %rax
testq %rdx, %rdx
movl $0x8, %r15d
cmovneq %rax, %r15
movq %r15, %rax
shlq $0x4, %rax
leaq (%rax,%rax,2), %rsi
movq (%rbx), %rdi
callq 0x32ff
testq %rax, %rax
je 0x3b7a
movq %rax, %r13
movq 0x8(%rbx), %rsi
testq %rsi, %rsi
je 0x3b27
movq 0x10(%rbx), %rax
shlq $0x4, %rax
leaq (%rax,%rax,2), %rdx
movq %r13, %rdi
callq 0x10e0
movq %r13, 0x8(%rbx)
movq %r15, 0x18(%rbx)
movq 0x10(%rbx), %rax
movq -0x30(%rbp), %rcx
leaq 0x10(%rbp), %rsi
leaq 0x1(%rax), %rdx
movq %rdx, 0x10(%rbx)
leaq (%rax,%rax,2), %rax
shlq $0x4, %rax
movl %r14d, (%r13,%rax)
movups (%rsi), %xmm0
movups %xmm0, 0x8(%r13,%rax)
movq 0x10(%rsi), %rdx
movq %rdx, 0x18(%r13,%rax)
movq %r12, 0x20(%r13,%rax)
movq %rcx, 0x28(%r13,%rax)
andl $-0x2, %r14d
cmpl $0x2, %r14d
jne 0x3b7a
incq 0x20(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x7915(%rip), %rdi # 0xb4a5
leaq 0x788d(%rip), %rsi # 0xb424
leaq 0x7917(%rip), %rcx # 0xb4b5
movl $0x44, %edx
callq 0x10b0
leaq 0x7977(%rip), %rdi # 0xb526
leaq 0x786e(%rip), %rsi # 0xb424
leaq 0x78f8(%rip), %rcx # 0xb4b5
movl $0x45, %edx
callq 0x10b0
| diagnostic_context_add:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
push rax
test rdi, rdi
jz loc_3B89
mov r12, rdx
test rdx, rdx
jz loc_3BA8
mov r14d, esi
mov rbx, rdi
mov rax, [rdi+10h]
mov rdx, [rdi+18h]
cmp rax, rdx
jnb short loc_3ADA
mov r13, [rbx+8]
jmp short loc_3B37
loc_3ADA:
mov [rbp+var_30], rcx
lea rax, [rdx+rdx]
test rdx, rdx
mov r15d, 8
cmovnz r15, rax
mov rax, r15
shl rax, 4
lea rsi, [rax+rax*2]
mov rdi, [rbx]
call arena_alloc
test rax, rax
jz short loc_3B7A
mov r13, rax
mov rsi, [rbx+8]
test rsi, rsi
jz short loc_3B27
mov rax, [rbx+10h]
shl rax, 4
lea rdx, [rax+rax*2]
mov rdi, r13
call _memcpy
loc_3B27:
mov [rbx+8], r13
mov [rbx+18h], r15
mov rax, [rbx+10h]
mov rcx, [rbp+var_30]
loc_3B37:
lea rsi, [rbp+arg_0]
lea rdx, [rax+1]
mov [rbx+10h], rdx
lea rax, [rax+rax*2]
shl rax, 4
mov [r13+rax+0], r14d
movups xmm0, xmmword ptr [rsi]
movups xmmword ptr [r13+rax+8], xmm0
mov rdx, [rsi+10h]
mov [r13+rax+18h], rdx
mov [r13+rax+20h], r12
mov [r13+rax+28h], rcx
and r14d, 0FFFFFFFEh
cmp r14d, 2
jnz short loc_3B7A
inc qword ptr [rbx+20h]
loc_3B7A:
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_3B89:
lea rdi, aContextNull; "context != NULL"
lea rsi, aWorkspaceLlm4b_2; "/workspace/llm4binary/github2025/eshkol"...
lea rcx, aVoidDiagnostic; "void diagnostic_context_add(DiagnosticC"...
mov edx, 44h ; 'D'
call ___assert_fail
loc_3BA8:
lea rdi, aMessageNull; "message != NULL"
lea rsi, aWorkspaceLlm4b_2; "/workspace/llm4binary/github2025/eshkol"...
lea rcx, aVoidDiagnostic; "void diagnostic_context_add(DiagnosticC"...
mov edx, 45h ; 'E'
call ___assert_fail
| long long diagnostic_context_add(
long long *a1,
int a2,
long long a3,
long long a4,
long long a5,
long long a6,
__int128 a7,
long long a8)
{
unsigned long long v10; // rax
unsigned long long v11; // rdx
long long v12; // r13
long long v13; // r15
long long result; // rax
long long v15; // rsi
long long v16; // [rsp+0h] [rbp-30h]
if ( !a1 )
__assert_fail(
"context != NULL",
"/workspace/llm4binary/github2025/eshkol/src/core/diagnostics/diagnostics.c",
68LL,
"void diagnostic_context_add(DiagnosticContext *, DiagnosticSeverity, SourceLocation, const char *, const char *)");
if ( !a3 )
__assert_fail(
"message != NULL",
"/workspace/llm4binary/github2025/eshkol/src/core/diagnostics/diagnostics.c",
69LL,
"void diagnostic_context_add(DiagnosticContext *, DiagnosticSeverity, SourceLocation, const char *, const char *)");
v10 = a1[2];
v11 = a1[3];
if ( v10 < v11 )
{
v12 = a1[1];
LABEL_11:
a1[2] = v10 + 1;
result = 48 * v10;
*(_DWORD *)(v12 + result) = a2;
*(_OWORD *)(v12 + result + 8) = a7;
*(_QWORD *)(v12 + result + 24) = a8;
*(_QWORD *)(v12 + result + 32) = a3;
*(_QWORD *)(v12 + result + 40) = a4;
if ( (a2 & 0xFFFFFFFE) == 2 )
++a1[4];
return result;
}
v16 = a4;
v13 = 8LL;
if ( v11 )
v13 = 2 * v11;
result = arena_alloc(*a1, 48 * v13);
if ( result )
{
v12 = result;
v15 = a1[1];
if ( v15 )
memcpy(result, v15, 48 * a1[2]);
a1[1] = v12;
a1[3] = v13;
v10 = a1[2];
a4 = v16;
goto LABEL_11;
}
return result;
}
| diagnostic_context_add:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
PUSH RAX
TEST RDI,RDI
JZ 0x00103b89
MOV R12,RDX
TEST RDX,RDX
JZ 0x00103ba8
MOV R14D,ESI
MOV RBX,RDI
MOV RAX,qword ptr [RDI + 0x10]
MOV RDX,qword ptr [RDI + 0x18]
CMP RAX,RDX
JNC 0x00103ada
MOV R13,qword ptr [RBX + 0x8]
JMP 0x00103b37
LAB_00103ada:
MOV qword ptr [RBP + -0x30],RCX
LEA RAX,[RDX + RDX*0x1]
TEST RDX,RDX
MOV R15D,0x8
CMOVNZ R15,RAX
MOV RAX,R15
SHL RAX,0x4
LEA RSI,[RAX + RAX*0x2]
MOV RDI,qword ptr [RBX]
CALL 0x001032ff
TEST RAX,RAX
JZ 0x00103b7a
MOV R13,RAX
MOV RSI,qword ptr [RBX + 0x8]
TEST RSI,RSI
JZ 0x00103b27
MOV RAX,qword ptr [RBX + 0x10]
SHL RAX,0x4
LEA RDX,[RAX + RAX*0x2]
MOV RDI,R13
CALL 0x001010e0
LAB_00103b27:
MOV qword ptr [RBX + 0x8],R13
MOV qword ptr [RBX + 0x18],R15
MOV RAX,qword ptr [RBX + 0x10]
MOV RCX,qword ptr [RBP + -0x30]
LAB_00103b37:
LEA RSI,[RBP + 0x10]
LEA RDX,[RAX + 0x1]
MOV qword ptr [RBX + 0x10],RDX
LEA RAX,[RAX + RAX*0x2]
SHL RAX,0x4
MOV dword ptr [R13 + RAX*0x1],R14D
MOVUPS XMM0,xmmword ptr [RSI]
MOVUPS xmmword ptr [R13 + RAX*0x1 + 0x8],XMM0
MOV RDX,qword ptr [RSI + 0x10]
MOV qword ptr [R13 + RAX*0x1 + 0x18],RDX
MOV qword ptr [R13 + RAX*0x1 + 0x20],R12
MOV qword ptr [R13 + RAX*0x1 + 0x28],RCX
AND R14D,0xfffffffe
CMP R14D,0x2
JNZ 0x00103b7a
INC qword ptr [RBX + 0x20]
LAB_00103b7a:
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_00103b89:
LEA RDI,[0x10b4a5]
LEA RSI,[0x10b424]
LEA RCX,[0x10b4b5]
MOV EDX,0x44
CALL 0x001010b0
LAB_00103ba8:
LEA RDI,[0x10b526]
LEA RSI,[0x10b424]
LEA RCX,[0x10b4b5]
MOV EDX,0x45
CALL 0x001010b0
|
void diagnostic_context_add
(int8 *param_1,uint param_2,long param_3,int8 param_4,int8 param_5,
int8 param_6,int8 param_7,int8 param_8,int8 param_9)
{
int8 *puVar1;
ulong uVar2;
void *__dest;
ulong uVar3;
long lVar4;
if (param_1 == (int8 *)0x0) {
/* WARNING: Subroutine does not return */
__assert_fail("context != NULL",
"/workspace/llm4binary/github2025/eshkol/src/core/diagnostics/diagnostics.c",0x44,
"void diagnostic_context_add(DiagnosticContext *, DiagnosticSeverity, SourceLocation, const char *, const char *)"
);
}
if (param_3 != 0) {
uVar3 = param_1[2];
uVar2 = param_1[3];
if (uVar3 < uVar2) {
__dest = (void *)param_1[1];
}
else {
lVar4 = 8;
if (uVar2 != 0) {
lVar4 = uVar2 * 2;
}
__dest = (void *)arena_alloc(*param_1,lVar4 * 0x30);
if (__dest == (void *)0x0) {
return;
}
if ((void *)param_1[1] != (void *)0x0) {
memcpy(__dest,(void *)param_1[1],param_1[2] * 0x30);
}
param_1[1] = __dest;
param_1[3] = lVar4;
uVar3 = param_1[2];
}
param_1[2] = uVar3 + 1;
lVar4 = uVar3 * 0x30;
*(uint *)((long)__dest + lVar4) = param_2;
puVar1 = (int8 *)((long)__dest + lVar4 + 8);
*puVar1 = param_7;
puVar1[1] = param_8;
*(int8 *)((long)__dest + lVar4 + 0x18) = param_9;
*(long *)((long)__dest + lVar4 + 0x20) = param_3;
*(int8 *)((long)__dest + lVar4 + 0x28) = param_4;
if ((param_2 & 0xfffffffe) == 2) {
param_1[4] = param_1[4] + 1;
}
return;
}
/* WARNING: Subroutine does not return */
__assert_fail("message != NULL",
"/workspace/llm4binary/github2025/eshkol/src/core/diagnostics/diagnostics.c",0x45,
"void diagnostic_context_add(DiagnosticContext *, DiagnosticSeverity, SourceLocation, const char *, const char *)"
);
}
| |
47,817 | my_hash_sort_simple_nopad | eloqsql/strings/ctype-simple.c | void my_hash_sort_simple_nopad(CHARSET_INFO *cs,
const uchar *key, size_t len,
ulong *nr1, ulong *nr2)
{
register const uchar *sort_order=cs->sort_order;
const uchar *end= key + len;
register ulong m1= *nr1, m2= *nr2;
for (; key < (uchar*) end ; key++)
{
MY_HASH_ADD(m1, m2, (uint) sort_order[(uint) *key]);
}
*nr1= m1;
*nr2= m2;
} | O3 | c | my_hash_sort_simple_nopad:
movq (%rcx), %rax
movq (%r8), %r9
testq %rdx, %rdx
jle 0x3cd14
pushq %rbp
movq %rsp, %rbp
movq 0x58(%rdi), %rdi
addq %rsi, %rdx
movl %eax, %r10d
andl $0x3f, %r10d
addq %r9, %r10
movzbl (%rsi), %r11d
movzbl (%rdi,%r11), %r11d
imulq %r10, %r11
movq %rax, %r10
shlq $0x8, %r10
addq %r11, %r10
xorq %r10, %rax
addq $0x3, %r9
incq %rsi
cmpq %rdx, %rsi
jb 0x3cce3
popq %rbp
movq %rax, (%rcx)
movq %r9, (%r8)
retq
| my_hash_sort_simple_nopad:
mov rax, [rcx]
mov r9, [r8]
test rdx, rdx
jle short loc_3CD14
push rbp
mov rbp, rsp
mov rdi, [rdi+58h]
add rdx, rsi
loc_3CCE3:
mov r10d, eax
and r10d, 3Fh
add r10, r9
movzx r11d, byte ptr [rsi]
movzx r11d, byte ptr [rdi+r11]
imul r11, r10
mov r10, rax
shl r10, 8
add r10, r11
xor rax, r10
add r9, 3
inc rsi
cmp rsi, rdx
jb short loc_3CCE3
pop rbp
loc_3CD14:
mov [rcx], rax
mov [r8], r9
retn
| long long my_hash_sort_simple_nopad(long long a1, unsigned __int8 *a2, long long a3, long long *a4, long long *a5)
{
long long result; // rax
long long v6; // r9
long long v7; // rdi
unsigned __int8 *v8; // rdx
result = *a4;
v6 = *a5;
if ( a3 > 0 )
{
v7 = *(_QWORD *)(a1 + 88);
v8 = &a2[a3];
do
{
result ^= (v6 + (result & 0x3F)) * *(unsigned __int8 *)(v7 + *a2) + (result << 8);
v6 += 3LL;
++a2;
}
while ( a2 < v8 );
}
*a4 = result;
*a5 = v6;
return result;
}
| my_hash_sort_simple_nopad:
MOV RAX,qword ptr [RCX]
MOV R9,qword ptr [R8]
TEST RDX,RDX
JLE 0x0013cd14
PUSH RBP
MOV RBP,RSP
MOV RDI,qword ptr [RDI + 0x58]
ADD RDX,RSI
LAB_0013cce3:
MOV R10D,EAX
AND R10D,0x3f
ADD R10,R9
MOVZX R11D,byte ptr [RSI]
MOVZX R11D,byte ptr [RDI + R11*0x1]
IMUL R11,R10
MOV R10,RAX
SHL R10,0x8
ADD R10,R11
XOR RAX,R10
ADD R9,0x3
INC RSI
CMP RSI,RDX
JC 0x0013cce3
POP RBP
LAB_0013cd14:
MOV qword ptr [RCX],RAX
MOV qword ptr [R8],R9
RET
|
void my_hash_sort_simple_nopad(long param_1,byte *param_2,long param_3,ulong *param_4,long *param_5)
{
ulong uVar1;
byte *pbVar2;
long lVar3;
uVar1 = *param_4;
lVar3 = *param_5;
if (0 < param_3) {
pbVar2 = param_2 + param_3;
do {
uVar1 = uVar1 ^ uVar1 * 0x100 +
(ulong)*(byte *)(*(long *)(param_1 + 0x58) + (ulong)*param_2) *
((ulong)((uint)uVar1 & 0x3f) + lVar3);
lVar3 = lVar3 + 3;
param_2 = param_2 + 1;
} while (param_2 < pbVar2);
}
*param_4 = uVar1;
*param_5 = lVar3;
return;
}
| |
47,818 | ma_set_data_pagecache_callbacks | eloqsql/storage/maria/ma_open.c | void _ma_set_data_pagecache_callbacks(PAGECACHE_FILE *file,
MARIA_SHARE *share)
{
pagecache_file_set_null_hooks(file);
file->callback_data= (uchar*) share;
file->flush_log_callback= &maria_flush_log_for_page_none; /* Do nothing */
file->post_write_hook= maria_page_write_failure;
if (share->temporary)
{
file->post_read_hook= &maria_page_crc_check_none;
file->pre_write_hook= &maria_page_filler_set_none;
}
else
{
file->post_read_hook= &maria_page_crc_check_data;
if (share->options & HA_OPTION_PAGE_CHECKSUM)
file->pre_write_hook= &maria_page_crc_set_normal;
else
file->pre_write_hook= &maria_page_filler_set_normal;
if (share->now_transactional)
file->flush_log_callback= maria_flush_log_for_page;
}
if (MY_TEST(share->base.extra_options & MA_EXTRA_OPTIONS_ENCRYPTED))
{
ma_crypt_set_data_pagecache_callbacks(file, share);
}
} | O0 | c | ma_set_data_pagecache_callbacks:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rdi
callq 0x304e0
movq -0x10(%rbp), %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x40(%rax)
movq -0x8(%rbp), %rax
leaq -0xb240(%rip), %rcx # 0x5da50
movq %rcx, 0x38(%rax)
movq -0x8(%rbp), %rax
leaq -0xb32f(%rip), %rcx # 0x5d970
movq %rcx, 0x30(%rax)
movq -0x10(%rbp), %rax
cmpb $0x0, 0x7d9(%rax)
je 0x68cd0
movq -0x8(%rbp), %rax
leaq -0xb41b(%rip), %rcx # 0x5d8a0
movq %rcx, 0x20(%rax)
movq -0x8(%rbp), %rax
leaq -0xb36a(%rip), %rcx # 0x5d960
movq %rcx, 0x28(%rax)
jmp 0x68d34
movq -0x8(%rbp), %rax
leaq -0xb60b(%rip), %rcx # 0x5d6d0
movq %rcx, 0x20(%rax)
movq -0x10(%rbp), %rax
movq 0x720(%rax), %rax
andq $0x800, %rax # imm = 0x800
cmpq $0x0, %rax
je 0x68d07
movq -0x8(%rbp), %rax
leaq -0xb771(%rip), %rcx # 0x5d590
movq %rcx, 0x28(%rax)
jmp 0x68d16
movq -0x8(%rbp), %rax
leaq -0xb452(%rip), %rcx # 0x5d8c0
movq %rcx, 0x28(%rax)
movq -0x10(%rbp), %rax
cmpb $0x0, 0x7e7(%rax)
je 0x68d32
movq -0x8(%rbp), %rax
leaq -0xb37e(%rip), %rcx # 0x5d9b0
movq %rcx, 0x38(%rax)
jmp 0x68d34
movq -0x10(%rbp), %rax
movl 0x428(%rax), %eax
andl $0x1, %eax
cmpl $0x0, %eax
je 0x68d4e
movb $0x1, %al
testb $0x1, %al
jne 0x68d56
jmp 0x68d63
xorl %eax, %eax
testb $0x1, %al
jne 0x68d56
jmp 0x68d63
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0x5e910
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax)
| _ma_set_data_pagecache_callbacks:
push rbp
mov rbp, rsp
sub rsp, 10h
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov rdi, [rbp+var_8]
call pagecache_file_set_null_hooks
mov rcx, [rbp+var_10]
mov rax, [rbp+var_8]
mov [rax+40h], rcx
mov rax, [rbp+var_8]
lea rcx, maria_flush_log_for_page_none
mov [rax+38h], rcx
mov rax, [rbp+var_8]
lea rcx, maria_page_write_failure
mov [rax+30h], rcx
mov rax, [rbp+var_10]
cmp byte ptr [rax+7D9h], 0
jz short loc_68CD0
mov rax, [rbp+var_8]
lea rcx, maria_page_crc_check_none
mov [rax+20h], rcx
mov rax, [rbp+var_8]
lea rcx, maria_page_filler_set_none
mov [rax+28h], rcx
jmp short loc_68D34
loc_68CD0:
mov rax, [rbp+var_8]
lea rcx, maria_page_crc_check_data
mov [rax+20h], rcx
mov rax, [rbp+var_10]
mov rax, [rax+720h]
and rax, 800h
cmp rax, 0
jz short loc_68D07
mov rax, [rbp+var_8]
lea rcx, maria_page_crc_set_normal
mov [rax+28h], rcx
jmp short loc_68D16
loc_68D07:
mov rax, [rbp+var_8]
lea rcx, maria_page_filler_set_normal
mov [rax+28h], rcx
loc_68D16:
mov rax, [rbp+var_10]
cmp byte ptr [rax+7E7h], 0
jz short loc_68D32
mov rax, [rbp+var_8]
lea rcx, maria_flush_log_for_page
mov [rax+38h], rcx
loc_68D32:
jmp short $+2
loc_68D34:
mov rax, [rbp+var_10]
mov eax, [rax+428h]
and eax, 1
cmp eax, 0
jz short loc_68D4E
mov al, 1
test al, 1
jnz short loc_68D56
jmp short loc_68D63
loc_68D4E:
xor eax, eax
test al, 1
jnz short loc_68D56
jmp short loc_68D63
loc_68D56:
mov rdi, [rbp+var_8]
mov rsi, [rbp+var_10]
call ma_crypt_set_data_pagecache_callbacks
loc_68D63:
add rsp, 10h
pop rbp
retn
| long long ma_set_data_pagecache_callbacks(_QWORD *a1, long long a2)
{
pagecache_file_set_null_hooks(a1);
a1[8] = a2;
a1[7] = maria_flush_log_for_page_none;
a1[6] = maria_page_write_failure;
if ( *(_BYTE *)(a2 + 2009) )
{
a1[4] = maria_page_crc_check_none;
a1[5] = maria_page_filler_set_none;
}
else
{
a1[4] = maria_page_crc_check_data;
if ( (*(_QWORD *)(a2 + 1824) & 0x800LL) != 0 )
a1[5] = maria_page_crc_set_normal;
else
a1[5] = maria_page_filler_set_normal;
if ( *(_BYTE *)(a2 + 2023) )
a1[7] = maria_flush_log_for_page;
}
if ( (*(_DWORD *)(a2 + 1064) & 1) != 0 )
return ma_crypt_set_data_pagecache_callbacks(a1, a2);
else
return 0LL;
}
| _ma_set_data_pagecache_callbacks:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x10
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV RDI,qword ptr [RBP + -0x8]
CALL 0x001304e0
MOV RCX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RAX + 0x40],RCX
MOV RAX,qword ptr [RBP + -0x8]
LEA RCX,[0x15da50]
MOV qword ptr [RAX + 0x38],RCX
MOV RAX,qword ptr [RBP + -0x8]
LEA RCX,[0x15d970]
MOV qword ptr [RAX + 0x30],RCX
MOV RAX,qword ptr [RBP + -0x10]
CMP byte ptr [RAX + 0x7d9],0x0
JZ 0x00168cd0
MOV RAX,qword ptr [RBP + -0x8]
LEA RCX,[0x15d8a0]
MOV qword ptr [RAX + 0x20],RCX
MOV RAX,qword ptr [RBP + -0x8]
LEA RCX,[0x15d960]
MOV qword ptr [RAX + 0x28],RCX
JMP 0x00168d34
LAB_00168cd0:
MOV RAX,qword ptr [RBP + -0x8]
LEA RCX,[0x15d6d0]
MOV qword ptr [RAX + 0x20],RCX
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x720]
AND RAX,0x800
CMP RAX,0x0
JZ 0x00168d07
MOV RAX,qword ptr [RBP + -0x8]
LEA RCX,[0x15d590]
MOV qword ptr [RAX + 0x28],RCX
JMP 0x00168d16
LAB_00168d07:
MOV RAX,qword ptr [RBP + -0x8]
LEA RCX,[0x15d8c0]
MOV qword ptr [RAX + 0x28],RCX
LAB_00168d16:
MOV RAX,qword ptr [RBP + -0x10]
CMP byte ptr [RAX + 0x7e7],0x0
JZ 0x00168d32
MOV RAX,qword ptr [RBP + -0x8]
LEA RCX,[0x15d9b0]
MOV qword ptr [RAX + 0x38],RCX
LAB_00168d32:
JMP 0x00168d34
LAB_00168d34:
MOV RAX,qword ptr [RBP + -0x10]
MOV EAX,dword ptr [RAX + 0x428]
AND EAX,0x1
CMP EAX,0x0
JZ 0x00168d4e
MOV AL,0x1
TEST AL,0x1
JNZ 0x00168d56
JMP 0x00168d63
LAB_00168d4e:
XOR EAX,EAX
TEST AL,0x1
JNZ 0x00168d56
JMP 0x00168d63
LAB_00168d56:
MOV RDI,qword ptr [RBP + -0x8]
MOV RSI,qword ptr [RBP + -0x10]
CALL 0x0015e910
LAB_00168d63:
ADD RSP,0x10
POP RBP
RET
|
/* WARNING: Removing unreachable block (ram,0x00168d4c) */
void _ma_set_data_pagecache_callbacks(long param_1,long param_2)
{
pagecache_file_set_null_hooks(param_1);
*(long *)(param_1 + 0x40) = param_2;
*(code **)(param_1 + 0x38) = maria_flush_log_for_page_none;
*(code **)(param_1 + 0x30) = maria_page_write_failure;
if (*(char *)(param_2 + 0x7d9) == '\0') {
*(code **)(param_1 + 0x20) = maria_page_crc_check_data;
if ((*(ulong *)(param_2 + 0x720) & 0x800) == 0) {
*(code **)(param_1 + 0x28) = maria_page_filler_set_normal;
}
else {
*(code **)(param_1 + 0x28) = maria_page_crc_set_normal;
}
if (*(char *)(param_2 + 0x7e7) != '\0') {
*(code **)(param_1 + 0x38) = maria_flush_log_for_page;
}
}
else {
*(code **)(param_1 + 0x20) = maria_page_crc_check_none;
*(code **)(param_1 + 0x28) = maria_page_filler_set_none;
}
if ((*(uint *)(param_2 + 0x428) & 1) != 0) {
ma_crypt_set_data_pagecache_callbacks(param_1,param_2);
}
return;
}
| |
47,819 | my_coll_parser_scan_reset_before | eloqsql/strings/ctype-uca.c | static int
my_coll_parser_scan_reset_before(MY_COLL_RULE_PARSER *p)
{
MY_COLL_LEXEM *lexem= my_coll_parser_curr(p);
if (!lex_cmp(lexem, C_STRING_WITH_LEN("[before primary]")) ||
!lex_cmp(lexem, C_STRING_WITH_LEN("[before 1]")))
{
p->rule.before_level= 1;
}
else if (!lex_cmp(lexem, C_STRING_WITH_LEN("[before secondary]")) ||
!lex_cmp(lexem, C_STRING_WITH_LEN("[before 2]")))
{
p->rule.before_level= 2;
}
else if (!lex_cmp(lexem, C_STRING_WITH_LEN("[before tertiary]")) ||
!lex_cmp(lexem, C_STRING_WITH_LEN("[before 3]")))
{
p->rule.before_level= 3;
}
else if (!lex_cmp(lexem, C_STRING_WITH_LEN("[before quaternary]")) ||
!lex_cmp(lexem, C_STRING_WITH_LEN("[before 4]")))
{
p->rule.before_level= 4;
}
else
{
p->rule.before_level= 0;
return 0; /* Don't scan thr next character */
}
return my_coll_parser_scan(p);
} | O0 | c | my_coll_parser_scan_reset_before:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rdi
callq 0xad970
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rdi
leaq 0x2dd24(%rip), %rsi # 0xdc1e8
movl $0x10, %edx
callq 0xae0f0
cmpl $0x0, %eax
je 0xae4ed
movq -0x18(%rbp), %rdi
leaq 0x2dd1b(%rip), %rsi # 0xdc1f9
movl $0xa, %edx
callq 0xae0f0
cmpl $0x0, %eax
jne 0xae501
movq -0x10(%rbp), %rax
movq $0x1, 0xe0(%rax)
jmp 0xae5f1
movq -0x18(%rbp), %rdi
leaq 0x2dcf8(%rip), %rsi # 0xdc204
movl $0x12, %edx
callq 0xae0f0
cmpl $0x0, %eax
je 0xae535
movq -0x18(%rbp), %rdi
leaq 0x2dcf1(%rip), %rsi # 0xdc217
movl $0xa, %edx
callq 0xae0f0
cmpl $0x0, %eax
jne 0xae549
movq -0x10(%rbp), %rax
movq $0x2, 0xe0(%rax)
jmp 0xae5ef
movq -0x18(%rbp), %rdi
leaq 0x2dcce(%rip), %rsi # 0xdc222
movl $0x11, %edx
callq 0xae0f0
cmpl $0x0, %eax
je 0xae57d
movq -0x18(%rbp), %rdi
leaq 0x2dcc6(%rip), %rsi # 0xdc234
movl $0xa, %edx
callq 0xae0f0
cmpl $0x0, %eax
jne 0xae58e
movq -0x10(%rbp), %rax
movq $0x3, 0xe0(%rax)
jmp 0xae5ed
movq -0x18(%rbp), %rdi
leaq 0x2dca6(%rip), %rsi # 0xdc23f
movl $0x13, %edx
callq 0xae0f0
cmpl $0x0, %eax
je 0xae5c2
movq -0x18(%rbp), %rdi
leaq 0x2dca0(%rip), %rsi # 0xdc253
movl $0xa, %edx
callq 0xae0f0
cmpl $0x0, %eax
jne 0xae5d3
movq -0x10(%rbp), %rax
movq $0x4, 0xe0(%rax)
jmp 0xae5eb
movq -0x10(%rbp), %rax
movq $0x0, 0xe0(%rax)
movl $0x0, -0x4(%rbp)
jmp 0xae5fd
jmp 0xae5ed
jmp 0xae5ef
jmp 0xae5f1
movq -0x10(%rbp), %rdi
callq 0xae150
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
| my_coll_parser_scan_reset_before:
push rbp
mov rbp, rsp
sub rsp, 20h
mov [rbp+var_10], rdi
mov rdi, [rbp+var_10]
call my_coll_parser_curr
mov [rbp+var_18], rax
mov rdi, [rbp+var_18]
lea rsi, aBeforePrimary; "[before primary]"
mov edx, 10h
call lex_cmp
cmp eax, 0
jz short loc_AE4ED
mov rdi, [rbp+var_18]
lea rsi, aBefore1; "[before 1]"
mov edx, 0Ah
call lex_cmp
cmp eax, 0
jnz short loc_AE501
loc_AE4ED:
mov rax, [rbp+var_10]
mov qword ptr [rax+0E0h], 1
jmp loc_AE5F1
loc_AE501:
mov rdi, [rbp+var_18]
lea rsi, aBeforeSecondar; "[before secondary]"
mov edx, 12h
call lex_cmp
cmp eax, 0
jz short loc_AE535
mov rdi, [rbp+var_18]
lea rsi, aBefore2; "[before 2]"
mov edx, 0Ah
call lex_cmp
cmp eax, 0
jnz short loc_AE549
loc_AE535:
mov rax, [rbp+var_10]
mov qword ptr [rax+0E0h], 2
jmp loc_AE5EF
loc_AE549:
mov rdi, [rbp+var_18]
lea rsi, aBeforeTertiary; "[before tertiary]"
mov edx, 11h
call lex_cmp
cmp eax, 0
jz short loc_AE57D
mov rdi, [rbp+var_18]
lea rsi, aBefore3; "[before 3]"
mov edx, 0Ah
call lex_cmp
cmp eax, 0
jnz short loc_AE58E
loc_AE57D:
mov rax, [rbp+var_10]
mov qword ptr [rax+0E0h], 3
jmp short loc_AE5ED
loc_AE58E:
mov rdi, [rbp+var_18]
lea rsi, aBeforeQuaterna; "[before quaternary]"
mov edx, 13h
call lex_cmp
cmp eax, 0
jz short loc_AE5C2
mov rdi, [rbp+var_18]
lea rsi, aBefore4; "[before 4]"
mov edx, 0Ah
call lex_cmp
cmp eax, 0
jnz short loc_AE5D3
loc_AE5C2:
mov rax, [rbp+var_10]
mov qword ptr [rax+0E0h], 4
jmp short loc_AE5EB
loc_AE5D3:
mov rax, [rbp+var_10]
mov qword ptr [rax+0E0h], 0
mov [rbp+var_4], 0
jmp short loc_AE5FD
loc_AE5EB:
jmp short $+2
loc_AE5ED:
jmp short $+2
loc_AE5EF:
jmp short $+2
loc_AE5F1:
mov rdi, [rbp+var_10]
call my_coll_parser_scan
mov [rbp+var_4], eax
loc_AE5FD:
mov eax, [rbp+var_4]
add rsp, 20h
pop rbp
retn
| long long my_coll_parser_scan_reset_before(long long a1)
{
long long v2; // [rsp+8h] [rbp-18h]
v2 = my_coll_parser_curr(a1);
if ( !(unsigned int)lex_cmp(v2, (long long)"[before primary]", 0x10uLL)
|| !(unsigned int)lex_cmp(v2, (long long)"[before 1]", 0xAuLL) )
{
*(_QWORD *)(a1 + 224) = 1LL;
return (unsigned int)my_coll_parser_scan(a1);
}
if ( !(unsigned int)lex_cmp(v2, (long long)"[before secondary]", 0x12uLL)
|| !(unsigned int)lex_cmp(v2, (long long)"[before 2]", 0xAuLL) )
{
*(_QWORD *)(a1 + 224) = 2LL;
return (unsigned int)my_coll_parser_scan(a1);
}
if ( !(unsigned int)lex_cmp(v2, (long long)"[before tertiary]", 0x11uLL)
|| !(unsigned int)lex_cmp(v2, (long long)"[before 3]", 0xAuLL) )
{
*(_QWORD *)(a1 + 224) = 3LL;
return (unsigned int)my_coll_parser_scan(a1);
}
if ( !(unsigned int)lex_cmp(v2, (long long)"[before quaternary]", 0x13uLL)
|| !(unsigned int)lex_cmp(v2, (long long)"[before 4]", 0xAuLL) )
{
*(_QWORD *)(a1 + 224) = 4LL;
return (unsigned int)my_coll_parser_scan(a1);
}
*(_QWORD *)(a1 + 224) = 0LL;
return 0;
}
| my_coll_parser_scan_reset_before:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x20
MOV qword ptr [RBP + -0x10],RDI
MOV RDI,qword ptr [RBP + -0x10]
CALL 0x001ad970
MOV qword ptr [RBP + -0x18],RAX
MOV RDI,qword ptr [RBP + -0x18]
LEA RSI,[0x1dc1e8]
MOV EDX,0x10
CALL 0x001ae0f0
CMP EAX,0x0
JZ 0x001ae4ed
MOV RDI,qword ptr [RBP + -0x18]
LEA RSI,[0x1dc1f9]
MOV EDX,0xa
CALL 0x001ae0f0
CMP EAX,0x0
JNZ 0x001ae501
LAB_001ae4ed:
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RAX + 0xe0],0x1
JMP 0x001ae5f1
LAB_001ae501:
MOV RDI,qword ptr [RBP + -0x18]
LEA RSI,[0x1dc204]
MOV EDX,0x12
CALL 0x001ae0f0
CMP EAX,0x0
JZ 0x001ae535
MOV RDI,qword ptr [RBP + -0x18]
LEA RSI,[0x1dc217]
MOV EDX,0xa
CALL 0x001ae0f0
CMP EAX,0x0
JNZ 0x001ae549
LAB_001ae535:
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RAX + 0xe0],0x2
JMP 0x001ae5ef
LAB_001ae549:
MOV RDI,qword ptr [RBP + -0x18]
LEA RSI,[0x1dc222]
MOV EDX,0x11
CALL 0x001ae0f0
CMP EAX,0x0
JZ 0x001ae57d
MOV RDI,qword ptr [RBP + -0x18]
LEA RSI,[0x1dc234]
MOV EDX,0xa
CALL 0x001ae0f0
CMP EAX,0x0
JNZ 0x001ae58e
LAB_001ae57d:
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RAX + 0xe0],0x3
JMP 0x001ae5ed
LAB_001ae58e:
MOV RDI,qword ptr [RBP + -0x18]
LEA RSI,[0x1dc23f]
MOV EDX,0x13
CALL 0x001ae0f0
CMP EAX,0x0
JZ 0x001ae5c2
MOV RDI,qword ptr [RBP + -0x18]
LEA RSI,[0x1dc253]
MOV EDX,0xa
CALL 0x001ae0f0
CMP EAX,0x0
JNZ 0x001ae5d3
LAB_001ae5c2:
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RAX + 0xe0],0x4
JMP 0x001ae5eb
LAB_001ae5d3:
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RAX + 0xe0],0x0
MOV dword ptr [RBP + -0x4],0x0
JMP 0x001ae5fd
LAB_001ae5eb:
JMP 0x001ae5ed
LAB_001ae5ed:
JMP 0x001ae5ef
LAB_001ae5ef:
JMP 0x001ae5f1
LAB_001ae5f1:
MOV RDI,qword ptr [RBP + -0x10]
CALL 0x001ae150
MOV dword ptr [RBP + -0x4],EAX
LAB_001ae5fd:
MOV EAX,dword ptr [RBP + -0x4]
ADD RSP,0x20
POP RBP
RET
|
int4 my_coll_parser_scan_reset_before(long param_1)
{
int iVar1;
int4 uVar2;
int8 uVar3;
uVar3 = my_coll_parser_curr(param_1);
iVar1 = lex_cmp(uVar3,"[before primary]",0x10);
if ((iVar1 == 0) || (iVar1 = lex_cmp(uVar3,"[before 1]",10), iVar1 == 0)) {
*(int8 *)(param_1 + 0xe0) = 1;
}
else {
iVar1 = lex_cmp(uVar3,"[before secondary]",0x12);
if ((iVar1 == 0) || (iVar1 = lex_cmp(uVar3,"[before 2]",10), iVar1 == 0)) {
*(int8 *)(param_1 + 0xe0) = 2;
}
else {
iVar1 = lex_cmp(uVar3,"[before tertiary]",0x11);
if ((iVar1 == 0) || (iVar1 = lex_cmp(uVar3,"[before 3]",10), iVar1 == 0)) {
*(int8 *)(param_1 + 0xe0) = 3;
}
else {
iVar1 = lex_cmp(uVar3,"[before quaternary]",0x13);
if ((iVar1 != 0) && (iVar1 = lex_cmp(uVar3,"[before 4]",10), iVar1 != 0)) {
*(int8 *)(param_1 + 0xe0) = 0;
return 0;
}
*(int8 *)(param_1 + 0xe0) = 4;
}
}
}
uVar2 = my_coll_parser_scan(param_1);
return uVar2;
}
| |
47,820 | LoadImageAnim | csit-sgu[P]mit-game-2025_1/Libraries/raylib/src/rtextures.c | Image LoadImageAnim(const char *fileName, int *frames)
{
Image image = { 0 };
int frameCount = 0;
#if defined(SUPPORT_FILEFORMAT_GIF)
if (IsFileExtension(fileName, ".gif"))
{
int dataSize = 0;
unsigned char *fileData = LoadFileData(fileName, &dataSize);
if (fileData != NULL)
{
int comp = 0;
int *delays = NULL;
image.data = stbi_load_gif_from_memory(fileData, dataSize, &delays, &image.width, &image.height, &frameCount, &comp, 4);
image.mipmaps = 1;
image.format = PIXELFORMAT_UNCOMPRESSED_R8G8B8A8;
UnloadFileData(fileData);
RL_FREE(delays); // NOTE: Frames delays are discarded
}
}
#else
if (false) { }
#endif
else
{
image = LoadImage(fileName);
frameCount = 1;
}
*frames = frameCount;
return image;
} | O0 | c | LoadImageAnim:
pushq %rbp
movq %rsp, %rbp
subq $0x70, %rsp
movq %rdi, -0x58(%rbp)
movq %rdi, %rax
movq %rax, -0x50(%rbp)
movq %rsi, -0x8(%rbp)
movq %rdx, -0x10(%rbp)
xorl %esi, %esi
movl $0x18, %edx
callq 0xa2d0
movl $0x0, -0x14(%rbp)
movq -0x8(%rbp), %rdi
leaq 0xba0c7(%rip), %rsi # 0x1b5a70
callq 0xd10c0
testb $0x1, %al
jne 0xfb9b7
jmp 0xfba44
movl $0x0, -0x18(%rbp)
movq -0x8(%rbp), %rdi
leaq -0x18(%rbp), %rsi
callq 0x182f80
movq %rax, -0x20(%rbp)
cmpq $0x0, -0x20(%rbp)
je 0xfba42
movq -0x58(%rbp), %r8
movl $0x0, -0x24(%rbp)
movq $0x0, -0x30(%rbp)
movq -0x20(%rbp), %rdi
movl -0x18(%rbp), %esi
movq %r8, %rcx
addq $0x8, %rcx
addq $0xc, %r8
leaq -0x30(%rbp), %rdx
leaq -0x14(%rbp), %r9
leaq -0x24(%rbp), %rax
movq %rax, (%rsp)
movl $0x4, 0x8(%rsp)
callq 0xf2530
movq %rax, %rcx
movq -0x58(%rbp), %rax
movq %rcx, (%rax)
movl $0x1, 0x10(%rax)
movl $0x7, 0x14(%rax)
movq -0x20(%rbp), %rdi
callq 0x183170
movq -0x30(%rbp), %rdi
callq 0xa640
jmp 0xfba73
movq -0x8(%rbp), %rsi
leaq -0x48(%rbp), %rdi
callq 0xfb350
movq -0x58(%rbp), %rax
movq -0x48(%rbp), %rcx
movq %rcx, (%rax)
movq -0x40(%rbp), %rcx
movq %rcx, 0x8(%rax)
movq -0x38(%rbp), %rcx
movq %rcx, 0x10(%rax)
movl $0x1, -0x14(%rbp)
movq -0x50(%rbp), %rax
movl -0x14(%rbp), %edx
movq -0x10(%rbp), %rcx
movl %edx, (%rcx)
addq $0x70, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
| LoadImageAnim:
push rbp
mov rbp, rsp
sub rsp, 70h
mov [rbp+var_58], rdi
mov rax, rdi
mov [rbp+var_50], rax
mov [rbp+var_8], rsi
mov [rbp+var_10], rdx
xor esi, esi
mov edx, 18h
call _memset
mov [rbp+var_14], 0
mov rdi, [rbp+var_8]
lea rsi, aSScreenrec03iG+10h; ".gif"
call IsFileExtension
test al, 1
jnz short loc_FB9B7
jmp loc_FBA44
loc_FB9B7:
mov [rbp+var_18], 0
mov rdi, [rbp+var_8]
lea rsi, [rbp+var_18]
call LoadFileData
mov [rbp+var_20], rax
cmp [rbp+var_20], 0
jz short loc_FBA42
mov r8, [rbp+var_58]
mov [rbp+var_24], 0
mov [rbp+var_30], 0
mov rdi, [rbp+var_20]
mov esi, [rbp+var_18]
mov rcx, r8
add rcx, 8
add r8, 0Ch
lea rdx, [rbp+var_30]
lea r9, [rbp+var_14]
lea rax, [rbp+var_24]
mov [rsp+70h+var_70], rax
mov [rsp+70h+var_68], 4
call stbi_load_gif_from_memory
mov rcx, rax
mov rax, [rbp+var_58]
mov [rax], rcx
mov dword ptr [rax+10h], 1
mov dword ptr [rax+14h], 7
mov rdi, [rbp+var_20]
call UnloadFileData
mov rdi, [rbp+var_30]
call _free
loc_FBA42:
jmp short loc_FBA73
loc_FBA44:
mov rsi, [rbp+var_8]
lea rdi, [rbp+var_48]
call LoadImage
mov rax, [rbp+var_58]
mov rcx, [rbp+var_48]
mov [rax], rcx
mov rcx, [rbp+var_40]
mov [rax+8], rcx
mov rcx, [rbp+var_38]
mov [rax+10h], rcx
mov [rbp+var_14], 1
loc_FBA73:
mov rax, [rbp+var_50]
mov edx, [rbp+var_14]
mov rcx, [rbp+var_10]
mov [rcx], edx
add rsp, 70h
pop rbp
retn
| long long LoadImageAnim(long long a1, long long a2, _DWORD *a3)
{
long long result; // rax
_QWORD v4[3]; // [rsp+28h] [rbp-48h] BYREF
long long v5; // [rsp+40h] [rbp-30h] BYREF
unsigned int v6; // [rsp+4Ch] [rbp-24h] BYREF
long long v7; // [rsp+50h] [rbp-20h]
int v8; // [rsp+58h] [rbp-18h] BYREF
unsigned int v9; // [rsp+5Ch] [rbp-14h] BYREF
_DWORD *v10; // [rsp+60h] [rbp-10h]
long long v11; // [rsp+68h] [rbp-8h]
v11 = a2;
v10 = a3;
memset(a1, 0LL, 24LL);
v9 = 0;
if ( (IsFileExtension(a2, (long long)".gif") & 1) != 0 )
{
v8 = 0;
v7 = LoadFileData(v11, &v8);
if ( v7 )
{
v6 = 0;
v5 = 0LL;
*(_QWORD *)a1 = stbi_load_gif_from_memory(
v7,
v8,
(long long)&v5,
(unsigned int *)(a1 + 8),
(unsigned int *)(a1 + 12),
&v9,
&v6,
4);
*(_DWORD *)(a1 + 16) = 1;
*(_DWORD *)(a1 + 20) = 7;
UnloadFileData(v7);
free(v5);
}
}
else
{
LoadImage(v4, v11);
*(_QWORD *)a1 = v4[0];
*(_QWORD *)(a1 + 8) = v4[1];
*(_QWORD *)(a1 + 16) = v4[2];
v9 = 1;
}
result = a1;
*v10 = v9;
return result;
}
| LoadImageAnim:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x70
MOV qword ptr [RBP + -0x58],RDI
MOV RAX,RDI
MOV qword ptr [RBP + -0x50],RAX
MOV qword ptr [RBP + -0x8],RSI
MOV qword ptr [RBP + -0x10],RDX
XOR ESI,ESI
MOV EDX,0x18
CALL 0x0010a2d0
MOV dword ptr [RBP + -0x14],0x0
MOV RDI,qword ptr [RBP + -0x8]
LEA RSI,[0x2b5a70]
CALL 0x001d10c0
TEST AL,0x1
JNZ 0x001fb9b7
JMP 0x001fba44
LAB_001fb9b7:
MOV dword ptr [RBP + -0x18],0x0
MOV RDI,qword ptr [RBP + -0x8]
LEA RSI,[RBP + -0x18]
CALL 0x00282f80
MOV qword ptr [RBP + -0x20],RAX
CMP qword ptr [RBP + -0x20],0x0
JZ 0x001fba42
MOV R8,qword ptr [RBP + -0x58]
MOV dword ptr [RBP + -0x24],0x0
MOV qword ptr [RBP + -0x30],0x0
MOV RDI,qword ptr [RBP + -0x20]
MOV ESI,dword ptr [RBP + -0x18]
MOV RCX,R8
ADD RCX,0x8
ADD R8,0xc
LEA RDX,[RBP + -0x30]
LEA R9,[RBP + -0x14]
LEA RAX,[RBP + -0x24]
MOV qword ptr [RSP],RAX
MOV dword ptr [RSP + 0x8],0x4
CALL 0x001f2530
MOV RCX,RAX
MOV RAX,qword ptr [RBP + -0x58]
MOV qword ptr [RAX],RCX
MOV dword ptr [RAX + 0x10],0x1
MOV dword ptr [RAX + 0x14],0x7
MOV RDI,qword ptr [RBP + -0x20]
CALL 0x00283170
MOV RDI,qword ptr [RBP + -0x30]
CALL 0x0010a640
LAB_001fba42:
JMP 0x001fba73
LAB_001fba44:
MOV RSI,qword ptr [RBP + -0x8]
LEA RDI,[RBP + -0x48]
CALL 0x001fb350
MOV RAX,qword ptr [RBP + -0x58]
MOV RCX,qword ptr [RBP + -0x48]
MOV qword ptr [RAX],RCX
MOV RCX,qword ptr [RBP + -0x40]
MOV qword ptr [RAX + 0x8],RCX
MOV RCX,qword ptr [RBP + -0x38]
MOV qword ptr [RAX + 0x10],RCX
MOV dword ptr [RBP + -0x14],0x1
LAB_001fba73:
MOV RAX,qword ptr [RBP + -0x50]
MOV EDX,dword ptr [RBP + -0x14]
MOV RCX,qword ptr [RBP + -0x10]
MOV dword ptr [RCX],EDX
ADD RSP,0x70
POP RBP
RET
|
int8 * LoadImageAnim(int8 *param_1,int8 param_2,int4 *param_3)
{
ulong uVar1;
int8 uVar2;
int8 local_50;
int8 local_48;
int8 local_40;
void *local_38;
int4 local_2c;
long local_28;
int4 local_20;
int4 local_1c;
int4 *local_18;
int8 local_10;
local_18 = param_3;
local_10 = param_2;
memset(param_1,0,0x18);
local_1c = 0;
uVar1 = IsFileExtension(local_10,".gif");
if ((uVar1 & 1) == 0) {
LoadImage(&local_50,local_10);
*param_1 = local_50;
param_1[1] = local_48;
param_1[2] = local_40;
local_1c = 1;
}
else {
local_20 = 0;
local_28 = LoadFileData(local_10,&local_20);
if (local_28 != 0) {
local_2c = 0;
local_38 = (void *)0x0;
uVar2 = stbi_load_gif_from_memory
(local_28,local_20,&local_38,param_1 + 1,(long)param_1 + 0xc,&local_1c,
&local_2c,4);
*param_1 = uVar2;
*(int4 *)(param_1 + 2) = 1;
*(int4 *)((long)param_1 + 0x14) = 7;
UnloadFileData(local_28);
free(local_38);
}
}
*local_18 = local_1c;
return param_1;
}
| |
47,821 | rtree_delete_req | eloqsql/storage/myisam/rt_index.c | static int rtree_delete_req(MI_INFO *info, MI_KEYDEF *keyinfo, uchar *key,
uint key_length, my_off_t page, uint *page_size,
stPageList *ReinsertList, int level)
{
uchar *k;
uchar *last;
ulong i;
uint nod_flag;
uchar *page_buf;
int res;
DBUG_ENTER("rtree_delete_req");
if (!(page_buf = (uchar*)my_alloca((uint)keyinfo->block_length)))
{
my_errno = HA_ERR_OUT_OF_MEM;
DBUG_RETURN(-1); /* purecov: inspected */
}
if (!_mi_fetch_keypage(info, keyinfo, page, DFLT_INIT_HITS, page_buf, 0))
goto err1;
nod_flag = mi_test_if_nod(page_buf);
DBUG_PRINT("rtree", ("page: %lu level: %d nod_flag: %u",
(ulong) page, level, nod_flag));
k = rt_PAGE_FIRST_KEY(page_buf, nod_flag);
last = rt_PAGE_END(page_buf);
for (i = 0; k < last; k = rt_PAGE_NEXT_KEY(k, key_length, nod_flag), ++i)
{
if (nod_flag)
{
/* not leaf */
if (!rtree_key_cmp(keyinfo->seg, key, k, key_length, MBR_WITHIN))
{
switch ((res = rtree_delete_req(info, keyinfo, key, key_length,
_mi_kpos(nod_flag, k), page_size, ReinsertList, level + 1)))
{
case 0: /* deleted */
{
/* test page filling */
if (*page_size + key_length >= rt_PAGE_MIN_SIZE(keyinfo->block_length))
{
/* OK */
/* Calculate a new key value (MBR) for the shrinked block. */
if (rtree_set_key_mbr(info, keyinfo, k, key_length,
_mi_kpos(nod_flag, k)))
goto err1;
if (_mi_write_keypage(info, keyinfo, page,
DFLT_INIT_HITS, page_buf))
goto err1;
}
else
{
/*
Too small: delete key & add it descendant to reinsert list.
Store position and level of the block so that it can be
accessed later for inserting the remaining keys.
*/
DBUG_PRINT("rtree", ("too small. move block to reinsert list"));
if (rtree_fill_reinsert_list(ReinsertList, _mi_kpos(nod_flag, k),
level + 1))
goto err1;
/*
Delete the key that references the block. This makes the
block disappear from the index. Hence we need to insert
its remaining keys later. Note: if the block is a branch
block, we do not only remove this block, but the whole
subtree. So we need to re-insert its keys on the same
level later to reintegrate the subtrees.
*/
rtree_delete_key(info, page_buf, k, key_length, nod_flag);
if (_mi_write_keypage(info, keyinfo, page,
DFLT_INIT_HITS, page_buf))
goto err1;
*page_size = mi_getint(page_buf);
}
goto ok;
}
case 1: /* not found - continue searching */
{
break;
}
case 2: /* vacuous case: last key in the leaf */
{
rtree_delete_key(info, page_buf, k, key_length, nod_flag);
if (_mi_write_keypage(info, keyinfo, page,
DFLT_INIT_HITS, page_buf))
goto err1;
*page_size = mi_getint(page_buf);
res = 0;
goto ok;
}
default: /* error */
case -1:
{
goto err1;
}
}
}
}
else
{
/* leaf */
if (!rtree_key_cmp(keyinfo->seg, key, k, key_length, MBR_EQUAL | MBR_DATA))
{
rtree_delete_key(info, page_buf, k, key_length, nod_flag);
*page_size = mi_getint(page_buf);
if (*page_size == 2)
{
/* last key in the leaf */
res = 2;
if (_mi_dispose(info, keyinfo, page, DFLT_INIT_HITS))
goto err1;
}
else
{
res = 0;
if (_mi_write_keypage(info, keyinfo, page, DFLT_INIT_HITS, page_buf))
goto err1;
}
goto ok;
}
}
}
res = 1;
ok:
my_afree((uchar*)page_buf);
DBUG_RETURN(res);
err1:
my_afree((uchar*)page_buf);
DBUG_RETURN(-1); /* purecov: inspected */
} | O3 | c | rtree_delete_req:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %r9, -0x60(%rbp)
movl %ecx, -0x34(%rbp)
movq %rdx, %r14
movq %fs:0x28, %rax
movq %rax, -0x30(%rbp)
movzwl 0xe(%rsi), %eax
movq %rsp, %r12
addl $0xf, %eax
andl $-0x10, %eax
subq %rax, %r12
movq %r12, %rsp
xorl %ebx, %ebx
movq %rdi, -0x48(%rbp)
movq %rsi, -0x40(%rbp)
movq %r8, -0x50(%rbp)
movq %r8, %rdx
movl $0x3, %ecx
movq %r12, %r8
xorl %r9d, %r9d
callq 0x83828
testq %rax, %rax
je 0x8a75c
movzbl (%r12), %r15d
testb %r15b, %r15b
jns 0x8a477
movq -0x48(%rbp), %rax
movq (%rax), %rax
movl 0x17c(%rax), %ebx
movl %ebx, %r13d
leaq (%r12,%r13), %rbx
addq $0x2, %rbx
movzbl 0x1(%r12), %eax
andl $0x7f, %r15d
shll $0x8, %r15d
orq %rax, %r15
addq %r12, %r15
movl $0x1, %eax
cmpq %r15, %rbx
movq -0x40(%rbp), %rsi
movl -0x34(%rbp), %ecx
jae 0x8a761
movq %r12, -0x58(%rbp)
movl 0x18(%rbp), %edx
incl %edx
movq %rdx, -0x68(%rbp)
movl %ecx, %r12d
movq 0x28(%rsi), %rdi
movq %r14, %rsi
movq %rbx, %rdx
testq %r13, %r13
je 0x8a515
movl $0x800, %r8d # imm = 0x800
callq 0x8afe4
movq %r13, %rcx
testl %eax, %eax
jne 0x8a535
movl %r13d, %edi
movq %rbx, %rsi
callq 0x841a2
movq -0x48(%rbp), %rdi
movq -0x40(%rbp), %rsi
movq %r14, %rdx
movl -0x34(%rbp), %ecx
movq %rax, %r8
movq -0x60(%rbp), %r9
pushq -0x68(%rbp)
pushq 0x10(%rbp)
callq 0x8a3fb
addq $0x10, %rsp
movq %r13, %rcx
cmpl $0x1, %eax
je 0x8a535
jmp 0x8a555
movl $0x6000, %r8d # imm = 0x6000
callq 0x8afe4
testl %eax, %eax
je 0x8a5f8
movq -0x48(%rbp), %rax
movq (%rax), %rax
movl 0x178(%rax), %ecx
addq %r12, %rbx
addq %rcx, %rbx
cmpq %r15, %rbx
movq -0x40(%rbp), %rsi
movl -0x34(%rbp), %ecx
jb 0x8a4bb
movl $0x1, %eax
jmp 0x8a761
cmpl $0x2, %eax
je 0x8a656
testl %eax, %eax
jne 0x8a75c
movq -0x60(%rbp), %rax
movl (%rax), %r15d
addl -0x34(%rbp), %r15d
movq -0x40(%rbp), %r14
movzwl 0xe(%r14), %eax
imull $0xaaab, %eax, %r12d # imm = 0xAAAB
shrl $0x11, %r12d
movl %r13d, %edi
movq %rbx, %rsi
callq 0x841a2
movq %rax, %r8
cmpl %r12d, %r15d
jae 0x8a6c6
movq 0x10(%rbp), %r14
movq (%r14), %rdx
cmpq 0x8(%r14), %rdx
jne 0x8a6ff
movq %r8, -0x70(%rbp)
addq $0xa, %rdx
movq %rdx, 0x8(%r14)
leaq 0xb753f4(%rip), %rax # 0xbff9b4
movl (%rax), %edi
movq 0x10(%r14), %rsi
shlq $0x4, %rdx
movl $0x40, %ecx
callq 0x9fa24
movq %rax, 0x10(%r14)
testq %rax, %rax
movq -0x58(%rbp), %r15
je 0x8a75c
movq (%r14), %rdx
movq -0x50(%rbp), %r12
movl -0x34(%rbp), %ecx
movq -0x70(%rbp), %r8
jmp 0x8a70e
movq -0x48(%rbp), %r15
movq %r15, %rdi
movq -0x58(%rbp), %r14
movq %r14, %rsi
movq %rbx, %rdx
movl -0x34(%rbp), %ecx
xorl %r8d, %r8d
callq 0x8aeef
movzbl 0x1(%r14), %eax
movl (%r14), %ecx
andl $0x7f, %ecx
shll $0x8, %ecx
orl %eax, %ecx
movq -0x60(%rbp), %rax
movl %ecx, (%rax)
movq %r15, %rdi
cmpl $0x2, %ecx
jne 0x8a69f
movq -0x40(%rbp), %rsi
movq -0x50(%rbp), %rdx
movl $0x3, %ecx
callq 0x839a7
testl %eax, %eax
jne 0x8a75c
movl $0x2, %eax
jmp 0x8a761
movq -0x48(%rbp), %r15
movq %r15, %rdi
movq -0x58(%rbp), %r14
movq %r14, %rsi
movq %rbx, %rdx
movl -0x34(%rbp), %ecx
movl %r13d, %r8d
callq 0x8aeef
movq %r15, %rdi
movq -0x40(%rbp), %rsi
movq -0x50(%rbp), %rdx
movl $0x3, %ecx
movq %r14, %r8
callq 0x838d4
testl %eax, %eax
jne 0x8a75c
movzbl 0x1(%r14), %eax
movl (%r14), %ecx
jmp 0x8a787
movq -0x40(%rbp), %rsi
movq -0x50(%rbp), %rdx
movl $0x3, %ecx
movq %r14, %r8
callq 0x838d4
testl %eax, %eax
movl $0x0, %eax
jne 0x8a75c
jmp 0x8a761
movq -0x48(%rbp), %rdi
movq %r14, %rsi
movq %rbx, %rdx
movl -0x34(%rbp), %ecx
callq 0x8af7c
testl %eax, %eax
movq -0x58(%rbp), %r8
jne 0x8a75c
movq -0x48(%rbp), %rdi
movq -0x40(%rbp), %rsi
movq -0x50(%rbp), %rdx
movl $0x3, %ecx
callq 0x838d4
testl %eax, %eax
jne 0x8a75c
jmp 0x8a795
movq 0x10(%r14), %rax
movq -0x58(%rbp), %r15
movq -0x50(%rbp), %r12
movl -0x34(%rbp), %ecx
shlq $0x4, %rdx
movq %r8, 0x8(%rax,%rdx)
movq (%r14), %rax
movq 0x10(%r14), %rdx
shlq $0x4, %rax
movq -0x68(%rbp), %rsi
movl %esi, (%rdx,%rax)
incq (%r14)
movq -0x48(%rbp), %r14
movq %r14, %rdi
movq %r15, %rsi
movq %rbx, %rdx
movl %r13d, %r8d
callq 0x8aeef
movq %r14, %rdi
movq -0x40(%rbp), %rsi
movq %r12, %rdx
movl $0x3, %ecx
movq %r15, %r8
callq 0x838d4
testl %eax, %eax
je 0x8a77f
movl $0xffffffff, %eax # imm = 0xFFFFFFFF
movq %fs:0x28, %rcx
cmpq -0x30(%rbp), %rcx
jne 0x8a799
leaq -0x28(%rbp), %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movzbl 0x1(%r15), %eax
movl (%r15), %ecx
andl $0x7f, %ecx
shll $0x8, %ecx
orl %eax, %ecx
movq -0x60(%rbp), %rax
movl %ecx, (%rax)
xorl %eax, %eax
jmp 0x8a761
callq 0x29270
| rtree_delete_req:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 48h
mov [rbp+var_60], r9
mov [rbp+var_34], ecx
mov r14, rdx
mov rax, fs:28h
mov [rbp+var_30], rax
movzx eax, word ptr [rsi+0Eh]
mov r12, rsp
add eax, 0Fh
and eax, 0FFFFFFF0h
sub r12, rax
mov rsp, r12
xor ebx, ebx
mov [rbp+var_48], rdi
mov [rbp+var_40], rsi
mov [rbp+var_50], r8
mov rdx, r8
mov ecx, 3
mov r8, r12
xor r9d, r9d
call _mi_fetch_keypage
test rax, rax
jz loc_8A75C
movzx r15d, byte ptr [r12]
test r15b, r15b
jns short loc_8A477
mov rax, [rbp+var_48]
mov rax, [rax]
mov ebx, [rax+17Ch]
loc_8A477:
mov r13d, ebx
lea rbx, [r12+r13]
add rbx, 2
movzx eax, byte ptr [r12+1]
and r15d, 7Fh
shl r15d, 8
or r15, rax
add r15, r12
mov eax, 1
cmp rbx, r15
mov rsi, [rbp+var_40]
mov ecx, [rbp+var_34]
jnb loc_8A761
mov [rbp+var_58], r12
mov edx, [rbp+arg_8]
inc edx
mov [rbp+var_68], rdx
mov r12d, ecx
loc_8A4BB:
mov rdi, [rsi+28h]
mov rsi, r14
mov rdx, rbx
test r13, r13
jz short loc_8A515
mov r8d, 800h
call rtree_key_cmp
mov rcx, r13
test eax, eax
jnz short loc_8A535
mov edi, r13d
mov rsi, rbx
call _mi_kpos
mov rdi, [rbp+var_48]
mov rsi, [rbp+var_40]
mov rdx, r14
mov ecx, [rbp+var_34]
mov r8, rax
mov r9, [rbp+var_60]
push [rbp+var_68]
push [rbp+arg_0]
call rtree_delete_req
add rsp, 10h
mov rcx, r13
cmp eax, 1
jz short loc_8A535
jmp short loc_8A555
loc_8A515:
mov r8d, 6000h
call rtree_key_cmp
test eax, eax
jz loc_8A5F8
mov rax, [rbp+var_48]
mov rax, [rax]
mov ecx, [rax+178h]
loc_8A535:
add rbx, r12
add rbx, rcx
cmp rbx, r15
mov rsi, [rbp+var_40]
mov ecx, [rbp+var_34]
jb loc_8A4BB
mov eax, 1
jmp loc_8A761
loc_8A555:
cmp eax, 2
jz loc_8A656
test eax, eax
jnz loc_8A75C
mov rax, [rbp+var_60]
mov r15d, [rax]
add r15d, [rbp+var_34]
mov r14, [rbp+var_40]
movzx eax, word ptr [r14+0Eh]
imul r12d, eax, 0AAABh
shr r12d, 11h
mov edi, r13d
mov rsi, rbx
call _mi_kpos
mov r8, rax
cmp r15d, r12d
jnb loc_8A6C6
mov r14, [rbp+arg_0]
mov rdx, [r14]
cmp rdx, [r14+8]
jnz loc_8A6FF
mov [rbp+var_70], r8
add rdx, 0Ah
mov [r14+8], rdx
lea rax, mi_key_memory_stPageList_pages
mov edi, [rax]
mov rsi, [r14+10h]
shl rdx, 4
mov ecx, 40h ; '@'
call my_realloc
mov [r14+10h], rax
test rax, rax
mov r15, [rbp+var_58]
jz loc_8A75C
mov rdx, [r14]
mov r12, [rbp+var_50]
mov ecx, [rbp+var_34]
mov r8, [rbp+var_70]
jmp loc_8A70E
loc_8A5F8:
mov r15, [rbp+var_48]
mov rdi, r15
mov r14, [rbp+var_58]
mov rsi, r14
mov rdx, rbx
mov ecx, [rbp+var_34]
xor r8d, r8d
call rtree_delete_key
movzx eax, byte ptr [r14+1]
mov ecx, [r14]
and ecx, 7Fh
shl ecx, 8
or ecx, eax
mov rax, [rbp+var_60]
mov [rax], ecx
mov rdi, r15
cmp ecx, 2
jnz short loc_8A69F
mov rsi, [rbp+var_40]
mov rdx, [rbp+var_50]
mov ecx, 3
call _mi_dispose
test eax, eax
jnz loc_8A75C
mov eax, 2
jmp loc_8A761
loc_8A656:
mov r15, [rbp+var_48]
mov rdi, r15
mov r14, [rbp+var_58]
mov rsi, r14
mov rdx, rbx
mov ecx, [rbp+var_34]
mov r8d, r13d
call rtree_delete_key
mov rdi, r15
mov rsi, [rbp+var_40]
mov rdx, [rbp+var_50]
mov ecx, 3
mov r8, r14
call _mi_write_keypage
test eax, eax
jnz loc_8A75C
movzx eax, byte ptr [r14+1]
mov ecx, [r14]
jmp loc_8A787
loc_8A69F:
mov rsi, [rbp+var_40]
mov rdx, [rbp+var_50]
mov ecx, 3
mov r8, r14
call _mi_write_keypage
test eax, eax
mov eax, 0
jnz loc_8A75C
jmp loc_8A761
loc_8A6C6:
mov rdi, [rbp+var_48]
mov rsi, r14
mov rdx, rbx
mov ecx, [rbp+var_34]
call rtree_set_key_mbr
test eax, eax
mov r8, [rbp+var_58]
jnz short loc_8A75C
mov rdi, [rbp+var_48]
mov rsi, [rbp+var_40]
mov rdx, [rbp+var_50]
mov ecx, 3
call _mi_write_keypage
test eax, eax
jnz short loc_8A75C
jmp loc_8A795
loc_8A6FF:
mov rax, [r14+10h]
mov r15, [rbp+var_58]
mov r12, [rbp+var_50]
mov ecx, [rbp+var_34]
loc_8A70E:
shl rdx, 4
mov [rax+rdx+8], r8
mov rax, [r14]
mov rdx, [r14+10h]
shl rax, 4
mov rsi, [rbp+var_68]
mov [rdx+rax], esi
inc qword ptr [r14]
mov r14, [rbp+var_48]
mov rdi, r14
mov rsi, r15
mov rdx, rbx
mov r8d, r13d
call rtree_delete_key
mov rdi, r14
mov rsi, [rbp+var_40]
mov rdx, r12
mov ecx, 3
mov r8, r15
call _mi_write_keypage
test eax, eax
jz short loc_8A77F
loc_8A75C:
mov eax, 0FFFFFFFFh
loc_8A761:
mov rcx, fs:28h
cmp rcx, [rbp+var_30]
jnz short loc_8A799
lea rsp, [rbp-28h]
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_8A77F:
movzx eax, byte ptr [r15+1]
mov ecx, [r15]
loc_8A787:
and ecx, 7Fh
shl ecx, 8
or ecx, eax
mov rax, [rbp+var_60]
mov [rax], ecx
loc_8A795:
xor eax, eax
jmp short loc_8A761
loc_8A799:
call ___stack_chk_fail
| long long rtree_delete_req(
long long *a1,
long long a2,
long long a3,
unsigned int a4,
long long a5,
int *a6,
long long *a7,
int a8)
{
char *v9; // r12
unsigned int v10; // ebx
long long v11; // r13
unsigned long long v12; // rbx
char *v13; // r15
long long result; // rax
long long v15; // rsi
long long v16; // rcx
long long v17; // r12
long long v18; // rdi
int v19; // eax
long long v20; // rcx
int v21; // eax
int v22; // eax
unsigned int v23; // r15d
long long v24; // r14
unsigned int v25; // r12d
unsigned long long v26; // rax
long long v27; // r9
unsigned long long v28; // r8
long long v29; // rdx
long long v30; // rdx
long long v31; // rax
_BYTE *v32; // r15
unsigned long long v33; // r12
long long v34; // rcx
long long *v35; // r15
_BYTE *v36; // r14
int v37; // ecx
long long *v38; // r15
_BYTE *v39; // r14
int v40; // eax
int v41; // ecx
bool v42; // zf
long long *v43; // r14
unsigned long long v44; // [rsp+0h] [rbp-70h] BYREF
long long v45; // [rsp+8h] [rbp-68h]
int *v46; // [rsp+10h] [rbp-60h]
_BYTE *v47; // [rsp+18h] [rbp-58h]
unsigned long long v48; // [rsp+20h] [rbp-50h]
long long *v49; // [rsp+28h] [rbp-48h]
long long v50; // [rsp+30h] [rbp-40h]
unsigned int v51; // [rsp+3Ch] [rbp-34h]
unsigned long long v52; // [rsp+40h] [rbp-30h]
v46 = a6;
v51 = a4;
v52 = __readfsqword(0x28u);
v9 = (char *)&v44 - ((*(unsigned __int16 *)(a2 + 14) + 15) & 0xFFFFFFF0);
v10 = 0;
v49 = a1;
v50 = a2;
v48 = a5;
if ( !mi_fetch_keypage(a1, a2, a5) )
return 0xFFFFFFFFLL;
if ( *v9 < 0 )
v10 = *(_DWORD *)(*v49 + 380);
v11 = v10;
v12 = (unsigned long long)&v9[v10 + 2];
v13 = &v9[(unsigned __int8)v9[1] | (unsigned long long)((unsigned __int8)(*v9 & 0x7F) << 8)];
result = 1LL;
v15 = v50;
v16 = v51;
if ( v12 < (unsigned long long)v13 )
{
v47 = v9;
v45 = (unsigned int)(a8 + 1);
v17 = v51;
while ( 1 )
{
v18 = *(_QWORD *)(v15 + 40);
if ( v11 )
{
v19 = rtree_key_cmp(v18, a3, v12, v16, 2048LL);
v20 = v11;
if ( !v19 )
{
v21 = mi_kpos(v11, v12);
v22 = rtree_delete_req((_DWORD)v49, v50, a3, v51, v21, (_DWORD)v46, (long long)a7, v45);
v20 = v11;
if ( v22 != 1 )
{
if ( v22 != 2 )
{
if ( v22 )
return 0xFFFFFFFFLL;
v23 = v51 + *v46;
v24 = v50;
v25 = *(unsigned __int16 *)(v50 + 14) / 3u;
v26 = mi_kpos(v11, v12);
v28 = v26;
if ( v23 >= v25 )
{
if ( (unsigned int)rtree_set_key_mbr(v49, v24, v12, v51, v26)
|| (unsigned int)mi_write_keypage(v49, v50, v48, 3u, v47) )
{
return 0xFFFFFFFFLL;
}
}
else
{
v29 = *a7;
if ( *a7 == a7[1] )
{
v44 = v26;
v30 = v29 + 10;
a7[1] = v30;
v31 = my_realloc(mi_key_memory_stPageList_pages, a7[2], 16 * v30, 64LL, v26, v27);
a7[2] = v31;
v32 = v47;
if ( !v31 )
return 0xFFFFFFFFLL;
v29 = *a7;
v33 = v48;
v34 = v51;
v28 = v44;
}
else
{
v31 = a7[2];
v32 = v47;
v33 = v48;
v34 = v51;
}
*(_QWORD *)(v31 + 16 * v29 + 8) = v28;
*(_DWORD *)(a7[2] + 16 * (*a7)++) = v45;
v43 = v49;
rtree_delete_key(v49, v32, v12, v34, (unsigned int)v11);
if ( (unsigned int)mi_write_keypage(v43, v50, v33, 3u, v32) )
return 0xFFFFFFFFLL;
v40 = (unsigned __int8)v32[1];
v41 = *(_DWORD *)v32;
LABEL_35:
*v46 = v40 | ((v41 & 0x7F) << 8);
}
return 0LL;
}
v38 = v49;
v39 = v47;
rtree_delete_key(v49, v47, v12, v51, (unsigned int)v11);
if ( (unsigned int)mi_write_keypage(v38, v50, v48, 3u, v39) )
return 0xFFFFFFFFLL;
v40 = (unsigned __int8)v39[1];
v41 = *(_DWORD *)v39;
goto LABEL_35;
}
}
}
else
{
if ( !(unsigned int)rtree_key_cmp(v18, a3, v12, v16, 24576LL) )
{
v35 = v49;
v36 = v47;
rtree_delete_key(v49, v47, v12, v51, 0LL);
v37 = (unsigned __int8)v36[1] | ((*(_DWORD *)v36 & 0x7F) << 8);
*v46 = v37;
if ( v37 == 2 )
{
if ( (unsigned int)mi_dispose(v35, v50, v48, 3u) )
return 0xFFFFFFFFLL;
return 2LL;
}
else
{
v42 = (unsigned int)mi_write_keypage(v35, v50, v48, 3u, v36) == 0;
result = 0LL;
if ( !v42 )
return 0xFFFFFFFFLL;
}
return result;
}
v20 = *(unsigned int *)(*v49 + 376);
}
v12 += v20 + v17;
v15 = v50;
v16 = v51;
if ( v12 >= (unsigned long long)v13 )
return 1LL;
}
}
return result;
}
| rtree_delete_req:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x48
MOV qword ptr [RBP + -0x60],R9
MOV dword ptr [RBP + -0x34],ECX
MOV R14,RDX
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x30],RAX
MOVZX EAX,word ptr [RSI + 0xe]
MOV R12,RSP
ADD EAX,0xf
AND EAX,0xfffffff0
SUB R12,RAX
MOV RSP,R12
XOR EBX,EBX
MOV qword ptr [RBP + -0x48],RDI
MOV qword ptr [RBP + -0x40],RSI
MOV qword ptr [RBP + -0x50],R8
MOV RDX,R8
MOV ECX,0x3
MOV R8,R12
XOR R9D,R9D
CALL 0x00183828
TEST RAX,RAX
JZ 0x0018a75c
MOVZX R15D,byte ptr [R12]
TEST R15B,R15B
JNS 0x0018a477
MOV RAX,qword ptr [RBP + -0x48]
MOV RAX,qword ptr [RAX]
MOV EBX,dword ptr [RAX + 0x17c]
LAB_0018a477:
MOV R13D,EBX
LEA RBX,[R12 + R13*0x1]
ADD RBX,0x2
MOVZX EAX,byte ptr [R12 + 0x1]
AND R15D,0x7f
SHL R15D,0x8
OR R15,RAX
ADD R15,R12
MOV EAX,0x1
CMP RBX,R15
MOV RSI,qword ptr [RBP + -0x40]
MOV ECX,dword ptr [RBP + -0x34]
JNC 0x0018a761
MOV qword ptr [RBP + -0x58],R12
MOV EDX,dword ptr [RBP + 0x18]
INC EDX
MOV qword ptr [RBP + -0x68],RDX
MOV R12D,ECX
LAB_0018a4bb:
MOV RDI,qword ptr [RSI + 0x28]
MOV RSI,R14
MOV RDX,RBX
TEST R13,R13
JZ 0x0018a515
MOV R8D,0x800
CALL 0x0018afe4
MOV RCX,R13
TEST EAX,EAX
JNZ 0x0018a535
MOV EDI,R13D
MOV RSI,RBX
CALL 0x001841a2
MOV RDI,qword ptr [RBP + -0x48]
MOV RSI,qword ptr [RBP + -0x40]
MOV RDX,R14
MOV ECX,dword ptr [RBP + -0x34]
MOV R8,RAX
MOV R9,qword ptr [RBP + -0x60]
PUSH qword ptr [RBP + -0x68]
PUSH qword ptr [RBP + 0x10]
CALL 0x0018a3fb
ADD RSP,0x10
MOV RCX,R13
CMP EAX,0x1
JZ 0x0018a535
JMP 0x0018a555
LAB_0018a515:
MOV R8D,0x6000
CALL 0x0018afe4
TEST EAX,EAX
JZ 0x0018a5f8
MOV RAX,qword ptr [RBP + -0x48]
MOV RAX,qword ptr [RAX]
MOV ECX,dword ptr [RAX + 0x178]
LAB_0018a535:
ADD RBX,R12
ADD RBX,RCX
CMP RBX,R15
MOV RSI,qword ptr [RBP + -0x40]
MOV ECX,dword ptr [RBP + -0x34]
JC 0x0018a4bb
MOV EAX,0x1
JMP 0x0018a761
LAB_0018a555:
CMP EAX,0x2
JZ 0x0018a656
TEST EAX,EAX
JNZ 0x0018a75c
MOV RAX,qword ptr [RBP + -0x60]
MOV R15D,dword ptr [RAX]
ADD R15D,dword ptr [RBP + -0x34]
MOV R14,qword ptr [RBP + -0x40]
MOVZX EAX,word ptr [R14 + 0xe]
IMUL R12D,EAX,0xaaab
SHR R12D,0x11
MOV EDI,R13D
MOV RSI,RBX
CALL 0x001841a2
MOV R8,RAX
CMP R15D,R12D
JNC 0x0018a6c6
MOV R14,qword ptr [RBP + 0x10]
MOV RDX,qword ptr [R14]
CMP RDX,qword ptr [R14 + 0x8]
JNZ 0x0018a6ff
MOV qword ptr [RBP + -0x70],R8
ADD RDX,0xa
MOV qword ptr [R14 + 0x8],RDX
LEA RAX,[0xcff9b4]
MOV EDI,dword ptr [RAX]
MOV RSI,qword ptr [R14 + 0x10]
SHL RDX,0x4
MOV ECX,0x40
CALL 0x0019fa24
MOV qword ptr [R14 + 0x10],RAX
TEST RAX,RAX
MOV R15,qword ptr [RBP + -0x58]
JZ 0x0018a75c
MOV RDX,qword ptr [R14]
MOV R12,qword ptr [RBP + -0x50]
MOV ECX,dword ptr [RBP + -0x34]
MOV R8,qword ptr [RBP + -0x70]
JMP 0x0018a70e
LAB_0018a5f8:
MOV R15,qword ptr [RBP + -0x48]
MOV RDI,R15
MOV R14,qword ptr [RBP + -0x58]
MOV RSI,R14
MOV RDX,RBX
MOV ECX,dword ptr [RBP + -0x34]
XOR R8D,R8D
CALL 0x0018aeef
MOVZX EAX,byte ptr [R14 + 0x1]
MOV ECX,dword ptr [R14]
AND ECX,0x7f
SHL ECX,0x8
OR ECX,EAX
MOV RAX,qword ptr [RBP + -0x60]
MOV dword ptr [RAX],ECX
MOV RDI,R15
CMP ECX,0x2
JNZ 0x0018a69f
MOV RSI,qword ptr [RBP + -0x40]
MOV RDX,qword ptr [RBP + -0x50]
MOV ECX,0x3
CALL 0x001839a7
TEST EAX,EAX
JNZ 0x0018a75c
MOV EAX,0x2
JMP 0x0018a761
LAB_0018a656:
MOV R15,qword ptr [RBP + -0x48]
MOV RDI,R15
MOV R14,qword ptr [RBP + -0x58]
MOV RSI,R14
MOV RDX,RBX
MOV ECX,dword ptr [RBP + -0x34]
MOV R8D,R13D
CALL 0x0018aeef
MOV RDI,R15
MOV RSI,qword ptr [RBP + -0x40]
MOV RDX,qword ptr [RBP + -0x50]
MOV ECX,0x3
MOV R8,R14
CALL 0x001838d4
TEST EAX,EAX
JNZ 0x0018a75c
MOVZX EAX,byte ptr [R14 + 0x1]
MOV ECX,dword ptr [R14]
JMP 0x0018a787
LAB_0018a69f:
MOV RSI,qword ptr [RBP + -0x40]
MOV RDX,qword ptr [RBP + -0x50]
MOV ECX,0x3
MOV R8,R14
CALL 0x001838d4
TEST EAX,EAX
MOV EAX,0x0
JNZ 0x0018a75c
JMP 0x0018a761
LAB_0018a6c6:
MOV RDI,qword ptr [RBP + -0x48]
MOV RSI,R14
MOV RDX,RBX
MOV ECX,dword ptr [RBP + -0x34]
CALL 0x0018af7c
TEST EAX,EAX
MOV R8,qword ptr [RBP + -0x58]
JNZ 0x0018a75c
MOV RDI,qword ptr [RBP + -0x48]
MOV RSI,qword ptr [RBP + -0x40]
MOV RDX,qword ptr [RBP + -0x50]
MOV ECX,0x3
CALL 0x001838d4
TEST EAX,EAX
JNZ 0x0018a75c
JMP 0x0018a795
LAB_0018a6ff:
MOV RAX,qword ptr [R14 + 0x10]
MOV R15,qword ptr [RBP + -0x58]
MOV R12,qword ptr [RBP + -0x50]
MOV ECX,dword ptr [RBP + -0x34]
LAB_0018a70e:
SHL RDX,0x4
MOV qword ptr [RAX + RDX*0x1 + 0x8],R8
MOV RAX,qword ptr [R14]
MOV RDX,qword ptr [R14 + 0x10]
SHL RAX,0x4
MOV RSI,qword ptr [RBP + -0x68]
MOV dword ptr [RDX + RAX*0x1],ESI
INC qword ptr [R14]
MOV R14,qword ptr [RBP + -0x48]
MOV RDI,R14
MOV RSI,R15
MOV RDX,RBX
MOV R8D,R13D
CALL 0x0018aeef
MOV RDI,R14
MOV RSI,qword ptr [RBP + -0x40]
MOV RDX,R12
MOV ECX,0x3
MOV R8,R15
CALL 0x001838d4
TEST EAX,EAX
JZ 0x0018a77f
LAB_0018a75c:
MOV EAX,0xffffffff
LAB_0018a761:
MOV RCX,qword ptr FS:[0x28]
CMP RCX,qword ptr [RBP + -0x30]
JNZ 0x0018a799
LEA RSP,[RBP + -0x28]
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_0018a77f:
MOVZX EAX,byte ptr [R15 + 0x1]
MOV ECX,dword ptr [R15]
LAB_0018a787:
AND ECX,0x7f
SHL ECX,0x8
OR ECX,EAX
MOV RAX,qword ptr [RBP + -0x60]
MOV dword ptr [RAX],ECX
LAB_0018a795:
XOR EAX,EAX
JMP 0x0018a761
LAB_0018a799:
CALL 0x00129270
|
int8
rtree_delete_req(long *param_1,long param_2,int8 param_3,uint param_4,int8 param_5,
uint *param_6,long *param_7,int param_8)
{
byte bVar1;
ushort uVar2;
long lVar3;
int8 uVar4;
long *plVar5;
uint uVar6;
int iVar7;
long lVar8;
int8 uVar9;
long lVar10;
uint uVar11;
ulong uVar12;
byte *pbVar13;
uint *puVar14;
ulong uVar15;
ulong uVar16;
uint uVar17;
byte *pbVar18;
long in_FS_OFFSET;
ulong auStack_90 [3];
int8 local_78;
ulong local_70;
uint *local_68;
uint *local_60;
int8 local_58;
long *local_50;
long local_48;
uint local_3c;
long local_38;
local_38 = *(long *)(in_FS_OFFSET + 0x28);
lVar3 = -(ulong)(*(ushort *)(param_2 + 0xe) + 0xf & 0xfffffff0);
puVar14 = (uint *)((long)&local_78 + lVar3);
uVar11 = 0;
local_68 = param_6;
local_58 = param_5;
local_50 = param_1;
local_48 = param_2;
local_3c = param_4;
*(int8 *)((long)auStack_90 + lVar3 + 0x10) = 0x18a457;
lVar8 = _mi_fetch_keypage(param_1,param_2,param_5,3,puVar14,0);
if (lVar8 == 0) {
LAB_0018a75c:
uVar9 = 0xffffffff;
}
else {
if ((char)(byte)*puVar14 < '\0') {
uVar11 = *(uint *)(*local_50 + 0x17c);
}
uVar16 = (ulong)uVar11;
pbVar13 = (byte *)((long)puVar14 + uVar16 + 2);
pbVar18 = (byte *)(((ulong)(((byte)*puVar14 & 0x7f) << 8) |
(ulong)*(byte *)((long)&local_78 + lVar3 + 1)) + (long)puVar14);
uVar9 = 1;
if (pbVar13 < pbVar18) {
local_70 = (ulong)(param_8 + 1);
uVar15 = (ulong)local_3c;
local_60 = puVar14;
do {
uVar6 = local_3c;
uVar9 = *(int8 *)(local_48 + 0x28);
if (uVar16 == 0) {
*(int8 *)((long)auStack_90 + lVar3 + 0x10) = 0x18a520;
iVar7 = rtree_key_cmp(uVar9,param_3,pbVar13,uVar6,0x6000);
uVar6 = local_3c;
plVar5 = local_50;
puVar14 = local_60;
if (iVar7 == 0) {
*(int8 *)((long)auStack_90 + lVar3 + 0x10) = 0x18a614;
rtree_delete_key(plVar5,puVar14,pbVar13,uVar6,0);
lVar8 = local_48;
uVar9 = local_58;
uVar11 = (*puVar14 & 0x7f) << 8 | (uint)*(byte *)((long)puVar14 + 1);
*local_68 = uVar11;
if (uVar11 != 2) {
*(int8 *)((long)auStack_90 + lVar3 + 0x10) = 0x18a6b4;
iVar7 = _mi_write_keypage(plVar5,lVar8,uVar9,3,puVar14);
uVar9 = 0;
if (iVar7 == 0) goto LAB_0018a761;
goto LAB_0018a75c;
}
*(int8 *)((long)auStack_90 + lVar3 + 0x10) = 0x18a644;
iVar7 = _mi_dispose(plVar5,lVar8,uVar9,3);
if (iVar7 != 0) goto LAB_0018a75c;
uVar9 = 2;
goto LAB_0018a761;
}
uVar12 = (ulong)*(uint *)(*local_50 + 0x178);
}
else {
*(int8 *)((long)auStack_90 + lVar3 + 0x10) = 0x18a4d5;
iVar7 = rtree_key_cmp(uVar9,param_3,pbVar13,uVar6,0x800);
uVar12 = uVar16;
if (iVar7 == 0) {
*(int8 *)((long)auStack_90 + lVar3 + 0x10) = 0x18a4e7;
uVar9 = _mi_kpos(uVar16,pbVar13);
uVar6 = local_3c;
lVar8 = local_48;
plVar5 = local_50;
puVar14 = local_68;
*(ulong *)((long)auStack_90 + lVar3 + 0x10) = local_70;
*(long **)((long)auStack_90 + lVar3 + 8) = param_7;
*(int8 *)((long)auStack_90 + lVar3) = 0x18a507;
iVar7 = rtree_delete_req(plVar5,lVar8,param_3,uVar6,uVar9,puVar14);
uVar6 = local_3c;
lVar8 = local_48;
plVar5 = local_50;
puVar14 = local_60;
if (iVar7 != 1) {
if (iVar7 == 2) {
*(int8 *)((long)auStack_90 + lVar3 + 0x10) = 0x18a672;
rtree_delete_key(plVar5,puVar14,pbVar13,uVar6,uVar11);
lVar8 = local_48;
uVar9 = local_58;
*(int8 *)((long)auStack_90 + lVar3 + 0x10) = 0x18a68a;
iVar7 = _mi_write_keypage(plVar5,lVar8,uVar9,3,puVar14);
if (iVar7 != 0) goto LAB_0018a75c;
bVar1 = *(byte *)((long)puVar14 + 1);
uVar11 = *puVar14;
LAB_0018a787:
*local_68 = (uVar11 & 0x7f) << 8 | (uint)bVar1;
}
else {
if (iVar7 != 0) goto LAB_0018a75c;
uVar17 = *local_68 + local_3c;
uVar2 = *(ushort *)(local_48 + 0xe);
*(int8 *)((long)auStack_90 + lVar3 + 0x10) = 0x18a590;
uVar9 = _mi_kpos(uVar16,pbVar13);
uVar6 = local_3c;
plVar5 = local_50;
if (uVar17 < uVar2 / 3) {
lVar8 = *param_7;
if (lVar8 == param_7[1]) {
param_7[1] = lVar8 + 10;
lVar10 = param_7[2];
local_78 = uVar9;
*(int8 *)((long)auStack_90 + lVar3 + 0x10) = 0x18a5d4;
lVar10 = my_realloc(mi_key_memory_stPageList_pages,lVar10,(lVar8 + 10) * 0x10,
0x40);
param_7[2] = lVar10;
if (lVar10 == 0) goto LAB_0018a75c;
lVar8 = *param_7;
uVar9 = local_78;
}
else {
lVar10 = param_7[2];
}
uVar6 = local_3c;
plVar5 = local_50;
uVar4 = local_58;
puVar14 = local_60;
*(int8 *)(lVar10 + 8 + lVar8 * 0x10) = uVar9;
*(int *)(param_7[2] + *param_7 * 0x10) = (int)local_70;
*param_7 = *param_7 + 1;
*(int8 *)((long)auStack_90 + lVar3 + 0x10) = 0x18a741;
rtree_delete_key(plVar5,puVar14,pbVar13,uVar6,uVar11);
lVar8 = local_48;
*(int8 *)((long)auStack_90 + lVar3 + 0x10) = 0x18a758;
iVar7 = _mi_write_keypage(plVar5,lVar8,uVar4,3,puVar14);
if (iVar7 == 0) {
bVar1 = *(byte *)((long)puVar14 + 1);
uVar11 = *puVar14;
goto LAB_0018a787;
}
goto LAB_0018a75c;
}
*(int8 *)((long)auStack_90 + lVar3 + 0x10) = 0x18a6d8;
iVar7 = rtree_set_key_mbr(plVar5,lVar8,pbVar13,uVar6);
lVar8 = local_48;
plVar5 = local_50;
uVar9 = local_58;
puVar14 = local_60;
if (iVar7 != 0) goto LAB_0018a75c;
*(int8 *)((long)auStack_90 + lVar3 + 0x10) = 0x18a6f6;
iVar7 = _mi_write_keypage(plVar5,lVar8,uVar9,3,puVar14);
if (iVar7 != 0) goto LAB_0018a75c;
}
uVar9 = 0;
goto LAB_0018a761;
}
}
}
pbVar13 = pbVar13 + uVar12 + uVar15;
} while (pbVar13 < pbVar18);
uVar9 = 1;
}
}
LAB_0018a761:
if (*(long *)(in_FS_OFFSET + 0x28) != local_38) {
/* WARNING: Subroutine does not return */
*(code **)((long)auStack_90 + lVar3 + 0x10) = rtree_estimate;
__stack_chk_fail();
}
return uVar9;
}
| |
47,822 | string_repeat(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, unsigned long) | monkey531[P]llama/common/common.cpp | std::string string_repeat(const std::string & str, size_t n) {
if (n == 0) {
return "";
}
std::string result;
result.reserve(str.length() * n);
for (size_t i = 0; i < n; ++i) {
result += str;
}
return result;
} | O0 | cpp | string_repeat(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, unsigned long):
subq $0x58, %rsp
movq %rdi, 0x10(%rsp)
movq %rdi, %rax
movq %rax, 0x18(%rsp)
movq %rdi, 0x50(%rsp)
movq %rsi, 0x48(%rsp)
movq %rdx, 0x40(%rsp)
cmpq $0x0, 0x40(%rsp)
jne 0xeeccb
leaq 0x3f(%rsp), %rdi
movq %rdi, 0x8(%rsp)
callq 0x5b0f0
movq 0x10(%rsp), %rdi
movq 0x8(%rsp), %rdx
leaq 0x11fd33(%rip), %rsi # 0x20e9cb
callq 0x616d0
jmp 0xeec9f
leaq 0x3f(%rsp), %rdi
callq 0x5b560
jmp 0xeed66
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x30(%rsp)
movl %eax, 0x2c(%rsp)
leaq 0x3f(%rsp), %rdi
callq 0x5b560
jmp 0xeed70
movq 0x10(%rsp), %rdi
movb $0x0, 0x2b(%rsp)
callq 0x5a5f0
movq 0x48(%rsp), %rdi
callq 0x5aa10
movq 0x10(%rsp), %rdi
movq %rax, %rsi
movq 0x40(%rsp), %rax
imulq %rax, %rsi
callq 0x5aeb0
jmp 0xeecfc
movq $0x0, 0x20(%rsp)
movq 0x20(%rsp), %rax
cmpq 0x40(%rsp), %rax
jae 0xeed4e
movq 0x10(%rsp), %rdi
movq 0x48(%rsp), %rsi
callq 0x5a160
jmp 0xeed22
jmp 0xeed24
movq 0x20(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x20(%rsp)
jmp 0xeed05
movq 0x10(%rsp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x30(%rsp)
movl %eax, 0x2c(%rsp)
callq 0x5b588
jmp 0xeed70
movb $0x1, 0x2b(%rsp)
testb $0x1, 0x2b(%rsp)
jne 0xeed64
movq 0x10(%rsp), %rdi
callq 0x5b588
jmp 0xeed66
movq 0x18(%rsp), %rax
addq $0x58, %rsp
retq
movq 0x30(%rsp), %rdi
callq 0x5abc0
nopw (%rax,%rax)
| _Z13string_repeatRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEm:
sub rsp, 58h
mov [rsp+58h+var_48], rdi
mov rax, rdi
mov [rsp+58h+var_40], rax
mov [rsp+58h+var_8], rdi
mov [rsp+58h+var_10], rsi
mov [rsp+58h+var_18], rdx
cmp [rsp+58h+var_18], 0
jnz short loc_EECCB
lea rdi, [rsp+58h+var_19]
mov [rsp+58h+var_50], rdi
call __ZNSaIcEC1Ev; std::allocator<char>::allocator(void)
mov rdi, [rsp+58h+var_48]
mov rdx, [rsp+58h+var_50]
lea rsi, aExampleSpecifi+27h; ""
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&)
jmp short $+2
loc_EEC9F:
lea rdi, [rsp+58h+var_19]
call __ZNSaIcED1Ev; std::allocator<char>::~allocator()
jmp loc_EED66
mov rcx, rax
mov eax, edx
mov [rsp+arg_28], rcx
mov [rsp+arg_24], eax
lea rdi, [rsp+arg_37]
call __ZNSaIcED1Ev; std::allocator<char>::~allocator()
jmp loc_EED70
loc_EECCB:
mov rdi, [rsp+58h+var_48]
mov [rsp+58h+var_2D], 0
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC1Ev; std::string::basic_string(void)
mov rdi, [rsp+58h+var_10]
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6lengthEv; std::string::length(void)
mov rdi, [rsp+58h+var_48]
mov rsi, rax
mov rax, [rsp+58h+var_18]
imul rsi, rax
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7reserveEm; std::string::reserve(ulong)
jmp short $+2
loc_EECFC:
mov [rsp+58h+var_38], 0
loc_EED05:
mov rax, [rsp+58h+var_38]
cmp rax, [rsp+58h+var_18]
jnb short loc_EED4E
mov rdi, [rsp+58h+var_48]
mov rsi, [rsp+58h+var_10]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEpLERKS4_; std::string::operator+=(std::string const&)
jmp short $+2
loc_EED22:
jmp short $+2
loc_EED24:
mov rax, [rsp+58h+var_38]
add rax, 1
mov [rsp+58h+var_38], rax
jmp short loc_EED05
mov rdi, [rsp+arg_8]; void *
mov rcx, rax
mov eax, edx
mov [rsp+arg_28], rcx
mov [rsp+arg_24], eax
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
jmp short loc_EED70
loc_EED4E:
mov [rsp+58h+var_2D], 1
test [rsp+58h+var_2D], 1
jnz short loc_EED64
mov rdi, [rsp+58h+var_48]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
loc_EED64:
jmp short $+2
loc_EED66:
mov rax, [rsp+58h+var_40]
add rsp, 58h
retn
loc_EED70:
mov rdi, [rsp+arg_28]
call __Unwind_Resume
| long long string_repeat(long long a1, long long a2, unsigned long long a3)
{
long long v3; // rax
unsigned long long i; // [rsp+20h] [rbp-38h]
char v6; // [rsp+3Fh] [rbp-19h] BYREF
unsigned long long v7; // [rsp+40h] [rbp-18h]
long long v8; // [rsp+48h] [rbp-10h]
long long v9; // [rsp+50h] [rbp-8h]
v9 = a1;
v8 = a2;
v7 = a3;
if ( a3 )
{
std::string::basic_string(a1);
v3 = std::string::length(v8);
std::string::reserve(a1, v7 * v3);
for ( i = 0LL; i < v7; ++i )
std::string::operator+=(a1, v8);
}
else
{
std::allocator<char>::allocator();
std::string::basic_string<std::allocator<char>>(a1, (long long)"", (long long)&v6);
std::allocator<char>::~allocator(&v6);
}
return a1;
}
| string_repeat:
SUB RSP,0x58
MOV qword ptr [RSP + 0x10],RDI
MOV RAX,RDI
MOV qword ptr [RSP + 0x18],RAX
MOV qword ptr [RSP + 0x50],RDI
MOV qword ptr [RSP + 0x48],RSI
MOV qword ptr [RSP + 0x40],RDX
CMP qword ptr [RSP + 0x40],0x0
JNZ 0x001eeccb
LEA RDI,[RSP + 0x3f]
MOV qword ptr [RSP + 0x8],RDI
CALL 0x0015b0f0
MOV RDI,qword ptr [RSP + 0x10]
MOV RDX,qword ptr [RSP + 0x8]
LAB_001eec91:
LEA RSI,[0x30e9cb]
CALL 0x001616d0
JMP 0x001eec9f
LAB_001eec9f:
LEA RDI,[RSP + 0x3f]
CALL 0x0015b560
JMP 0x001eed66
LAB_001eeccb:
MOV RDI,qword ptr [RSP + 0x10]
MOV byte ptr [RSP + 0x2b],0x0
CALL 0x0015a5f0
MOV RDI,qword ptr [RSP + 0x48]
CALL 0x0015aa10
MOV RDI,qword ptr [RSP + 0x10]
MOV RSI,RAX
MOV RAX,qword ptr [RSP + 0x40]
IMUL RSI,RAX
LAB_001eecf5:
CALL 0x0015aeb0
JMP 0x001eecfc
LAB_001eecfc:
MOV qword ptr [RSP + 0x20],0x0
LAB_001eed05:
MOV RAX,qword ptr [RSP + 0x20]
CMP RAX,qword ptr [RSP + 0x40]
JNC 0x001eed4e
MOV RDI,qword ptr [RSP + 0x10]
MOV RSI,qword ptr [RSP + 0x48]
CALL 0x0015a160
LAB_001eed20:
JMP 0x001eed22
LAB_001eed22:
JMP 0x001eed24
LAB_001eed24:
MOV RAX,qword ptr [RSP + 0x20]
ADD RAX,0x1
MOV qword ptr [RSP + 0x20],RAX
JMP 0x001eed05
LAB_001eed4e:
MOV byte ptr [RSP + 0x2b],0x1
TEST byte ptr [RSP + 0x2b],0x1
JNZ 0x001eed64
MOV RDI,qword ptr [RSP + 0x10]
CALL 0x0015b588
LAB_001eed64:
JMP 0x001eed66
LAB_001eed66:
MOV RAX,qword ptr [RSP + 0x18]
ADD RSP,0x58
RET
|
/* WARNING: Removing unreachable block (ram,0x001eed5a) */
/* string_repeat(std::__cxx11::string const&, unsigned long) */
string * string_repeat(string *param_1,ulong param_2)
{
ulong in_RDX;
ulong local_38;
allocator local_19;
ulong local_18;
string *local_10;
string *local_8;
local_10 = (string *)param_2;
local_8 = param_1;
if (in_RDX == 0) {
std::allocator<char>::allocator();
/* try { // try from 001eec91 to 001eec9c has its CatchHandler @ 001eecae */
std::__cxx11::string::string<std::allocator<char>>(param_1,"",&local_19);
std::allocator<char>::~allocator((allocator<char> *)&local_19);
}
else {
local_18 = in_RDX;
std::__cxx11::string::string(param_1);
std::__cxx11::string::length();
/* try { // try from 001eecf5 to 001eed1f has its CatchHandler @ 001eed34 */
std::__cxx11::string::reserve((ulong)param_1);
for (local_38 = 0; local_38 < local_18; local_38 = local_38 + 1) {
std::__cxx11::string::operator+=(param_1,local_10);
}
}
return param_1;
}
| |
47,823 | nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>, nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>>::unget() | monkey531[P]llama/common/json.hpp | void unget()
{
next_unget = true;
--position.chars_read_total;
// in case we "unget" a newline, we have to also decrement the lines_read
if (position.chars_read_current_line == 0)
{
if (position.lines_read > 0)
{
--position.lines_read;
}
}
else
{
--position.chars_read_current_line;
}
if (JSON_HEDLEY_LIKELY(current != char_traits<char_type>::eof()))
{
JSON_ASSERT(!token_string.empty());
token_string.pop_back();
}
} | O1 | cpp | nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>, nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>>::unget():
movb $0x1, 0x18(%rdi)
decq 0x20(%rdi)
movq 0x28(%rdi), %rax
testq %rax, %rax
je 0x45aa9
leaq 0x28(%rdi), %rcx
jmp 0x45ab6
movq 0x30(%rdi), %rax
testq %rax, %rax
je 0x45abc
leaq 0x30(%rdi), %rcx
decq %rax
movq %rax, (%rcx)
cmpl $-0x1, 0x14(%rdi)
je 0x45ad3
movq 0x40(%rdi), %rax
cmpq %rax, 0x38(%rdi)
je 0x45ad4
decq %rax
movq %rax, 0x40(%rdi)
retq
pushq %rax
leaq 0x65b7b(%rip), %rdi # 0xab657
leaq 0x6432e(%rip), %rdx # 0xa9e11
leaq 0x6624d(%rip), %rcx # 0xabd37
movl $0x2240, %esi # imm = 0x2240
xorl %eax, %eax
callq 0x18ad0
| _ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEE5ungetEv:
mov byte ptr [rdi+18h], 1
dec qword ptr [rdi+20h]
mov rax, [rdi+28h]
test rax, rax
jz short loc_45AA9
lea rcx, [rdi+28h]
jmp short loc_45AB6
loc_45AA9:
mov rax, [rdi+30h]
test rax, rax
jz short loc_45ABC
lea rcx, [rdi+30h]
loc_45AB6:
dec rax
mov [rcx], rax
loc_45ABC:
cmp dword ptr [rdi+14h], 0FFFFFFFFh
jz short locret_45AD3
mov rax, [rdi+40h]
cmp [rdi+38h], rax
jz short loc_45AD4
dec rax
mov [rdi+40h], rax
locret_45AD3:
retn
loc_45AD4:
push rax
lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aTokenStringEmp; "!token_string.empty()"
mov esi, 2240h
xor eax, eax
call _ggml_abort
| long long nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::unget(
long long a1)
{
long long result; // rax
_QWORD *v2; // rcx
long long v3; // rax
*(_BYTE *)(a1 + 24) = 1;
--*(_QWORD *)(a1 + 32);
result = *(_QWORD *)(a1 + 40);
if ( result )
{
v2 = (_QWORD *)(a1 + 40);
}
else
{
result = *(_QWORD *)(a1 + 48);
if ( !result )
goto LABEL_6;
v2 = (_QWORD *)(a1 + 48);
}
*v2 = --result;
LABEL_6:
if ( *(_DWORD *)(a1 + 20) != -1 )
{
v3 = *(_QWORD *)(a1 + 64);
if ( *(_QWORD *)(a1 + 56) == v3 )
{
ggml_abort(
"/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp",
8768LL,
"GGML_ASSERT(%s) failed",
"!token_string.empty()");
return nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::reset("/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp");
}
else
{
result = v3 - 1;
*(_QWORD *)(a1 + 64) = result;
}
}
return result;
}
| unget:
MOV byte ptr [RDI + 0x18],0x1
DEC qword ptr [RDI + 0x20]
MOV RAX,qword ptr [RDI + 0x28]
TEST RAX,RAX
JZ 0x00145aa9
LEA RCX,[RDI + 0x28]
JMP 0x00145ab6
LAB_00145aa9:
MOV RAX,qword ptr [RDI + 0x30]
TEST RAX,RAX
JZ 0x00145abc
LEA RCX,[RDI + 0x30]
LAB_00145ab6:
DEC RAX
MOV qword ptr [RCX],RAX
LAB_00145abc:
CMP dword ptr [RDI + 0x14],-0x1
JZ 0x00145ad3
MOV RAX,qword ptr [RDI + 0x40]
CMP qword ptr [RDI + 0x38],RAX
JZ 0x00145ad4
DEC RAX
MOV qword ptr [RDI + 0x40],RAX
LAB_00145ad3:
RET
LAB_00145ad4:
PUSH RAX
LEA RDI,[0x1ab657]
LEA RDX,[0x1a9e11]
LEA RCX,[0x1abd37]
MOV ESI,0x2240
XOR EAX,EAX
CALL 0x00118ad0
|
/* nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,
std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void>,
nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char
const*, std::__cxx11::string > > >::unget() */
void __thiscall
nlohmann::json_abi_v3_11_3::detail::
lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>>
::unget(lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>>
*this)
{
long lVar1;
lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>>
*plVar2;
int8 in_R8;
int8 in_R9;
this[0x18] = (lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>>
)0x1;
*(long *)(this + 0x20) = *(long *)(this + 0x20) + -1;
lVar1 = *(long *)(this + 0x28);
if (lVar1 == 0) {
lVar1 = *(long *)(this + 0x30);
if (lVar1 == 0) goto LAB_00145abc;
plVar2 = this + 0x30;
}
else {
plVar2 = this + 0x28;
}
*(long *)plVar2 = lVar1 + -1;
LAB_00145abc:
if (*(int *)(this + 0x14) != -1) {
lVar1 = *(long *)(this + 0x40);
if (*(long *)(this + 0x38) == lVar1) {
/* WARNING: Subroutine does not return */
ggml_abort("/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp",0x2240,
"GGML_ASSERT(%s) failed","!token_string.empty()",in_R8,in_R9,lVar1);
}
*(long *)(this + 0x40) = lVar1 + -1;
}
return;
}
| |
47,824 | nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>, nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>>::unget() | monkey531[P]llama/common/json.hpp | void unget()
{
next_unget = true;
--position.chars_read_total;
// in case we "unget" a newline, we have to also decrement the lines_read
if (position.chars_read_current_line == 0)
{
if (position.lines_read > 0)
{
--position.lines_read;
}
}
else
{
--position.chars_read_current_line;
}
if (JSON_HEDLEY_LIKELY(current != char_traits<char_type>::eof()))
{
JSON_ASSERT(!token_string.empty());
token_string.pop_back();
}
} | O2 | cpp | nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>, nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>>::unget():
movb $0x1, 0x18(%rdi)
decq 0x20(%rdi)
movq 0x28(%rdi), %rax
testq %rax, %rax
je 0x4292d
leaq 0x28(%rdi), %rcx
jmp 0x4293a
movq 0x30(%rdi), %rax
testq %rax, %rax
je 0x42940
leaq 0x30(%rdi), %rcx
decq %rax
movq %rax, (%rcx)
cmpl $-0x1, 0x14(%rdi)
je 0x42957
movq 0x40(%rdi), %rax
cmpq %rax, 0x38(%rdi)
je 0x42958
decq %rax
movq %rax, 0x40(%rdi)
retq
pushq %rax
leaq 0x4bca7(%rip), %rdi # 0x8e607
leaq 0x4a45a(%rip), %rdx # 0x8cdc1
leaq 0x4c379(%rip), %rcx # 0x8ece7
movl $0x2240, %esi # imm = 0x2240
xorl %eax, %eax
callq 0x20af0
| _ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEE5ungetEv:
mov byte ptr [rdi+18h], 1
dec qword ptr [rdi+20h]
mov rax, [rdi+28h]
test rax, rax
jz short loc_4292D
lea rcx, [rdi+28h]
jmp short loc_4293A
loc_4292D:
mov rax, [rdi+30h]
test rax, rax
jz short loc_42940
lea rcx, [rdi+30h]
loc_4293A:
dec rax
mov [rcx], rax
loc_42940:
cmp dword ptr [rdi+14h], 0FFFFFFFFh
jz short locret_42957
mov rax, [rdi+40h]
cmp [rdi+38h], rax
jz short loc_42958
dec rax
mov [rdi+40h], rax
locret_42957:
retn
loc_42958:
push rax
lea rdi, aWorkspaceLlm4b_1; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aTokenStringEmp; "!token_string.empty()"
mov esi, 2240h
xor eax, eax
call _ggml_abort
| long long nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::unget(
long long a1)
{
long long result; // rax
_QWORD *v2; // rcx
long long v3; // rax
*(_BYTE *)(a1 + 24) = 1;
--*(_QWORD *)(a1 + 32);
result = *(_QWORD *)(a1 + 40);
if ( result )
{
v2 = (_QWORD *)(a1 + 40);
}
else
{
result = *(_QWORD *)(a1 + 48);
if ( !result )
goto LABEL_6;
v2 = (_QWORD *)(a1 + 48);
}
*v2 = --result;
LABEL_6:
if ( *(_DWORD *)(a1 + 20) != -1 )
{
v3 = *(_QWORD *)(a1 + 64);
if ( *(_QWORD *)(a1 + 56) == v3 )
{
ggml_abort(
"/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp",
8768LL,
"GGML_ASSERT(%s) failed",
"!token_string.empty()");
return nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::reset("/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp");
}
else
{
result = v3 - 1;
*(_QWORD *)(a1 + 64) = result;
}
}
return result;
}
| unget:
MOV byte ptr [RDI + 0x18],0x1
DEC qword ptr [RDI + 0x20]
MOV RAX,qword ptr [RDI + 0x28]
TEST RAX,RAX
JZ 0x0014292d
LEA RCX,[RDI + 0x28]
JMP 0x0014293a
LAB_0014292d:
MOV RAX,qword ptr [RDI + 0x30]
TEST RAX,RAX
JZ 0x00142940
LEA RCX,[RDI + 0x30]
LAB_0014293a:
DEC RAX
MOV qword ptr [RCX],RAX
LAB_00142940:
CMP dword ptr [RDI + 0x14],-0x1
JZ 0x00142957
MOV RAX,qword ptr [RDI + 0x40]
CMP qword ptr [RDI + 0x38],RAX
JZ 0x00142958
DEC RAX
MOV qword ptr [RDI + 0x40],RAX
LAB_00142957:
RET
LAB_00142958:
PUSH RAX
LEA RDI,[0x18e607]
LEA RDX,[0x18cdc1]
LEA RCX,[0x18ece7]
MOV ESI,0x2240
XOR EAX,EAX
CALL 0x00120af0
|
/* nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,
std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void>,
nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char
const*, std::__cxx11::string > > >::unget() */
void __thiscall
nlohmann::json_abi_v3_11_3::detail::
lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>>
::unget(lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>>
*this)
{
long lVar1;
lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>>
*plVar2;
int8 in_R8;
int8 in_R9;
this[0x18] = (lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>>
)0x1;
*(long *)(this + 0x20) = *(long *)(this + 0x20) + -1;
lVar1 = *(long *)(this + 0x28);
if (lVar1 == 0) {
lVar1 = *(long *)(this + 0x30);
if (lVar1 == 0) goto LAB_00142940;
plVar2 = this + 0x30;
}
else {
plVar2 = this + 0x28;
}
*(long *)plVar2 = lVar1 + -1;
LAB_00142940:
if (*(int *)(this + 0x14) != -1) {
lVar1 = *(long *)(this + 0x40);
if (*(long *)(this + 0x38) == lVar1) {
/* WARNING: Subroutine does not return */
ggml_abort("/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp",0x2240,
"GGML_ASSERT(%s) failed","!token_string.empty()",in_R8,in_R9,lVar1);
}
*(long *)(this + 0x40) = lVar1 + -1;
}
return;
}
| |
47,825 | ma_get_length | eloqsql/libmariadb/libmariadb/mariadb_stmt.c | static long ma_get_length(MYSQL_STMT *stmt, unsigned int param_nr, unsigned long row_nr)
{
if (!stmt->params[param_nr].length)
return 0;
if (stmt->param_callback)
return (long)*stmt->params[param_nr].length;
if (stmt->row_size)
return *(long *)((char *)stmt->params[param_nr].length + row_nr * stmt->row_size);
else
return stmt->params[param_nr].length[row_nr];
} | O0 | c | ma_get_length:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movq %rdx, -0x20(%rbp)
movq -0x10(%rbp), %rax
movq 0x70(%rax), %rax
movl -0x14(%rbp), %ecx
imulq $0x70, %rcx, %rcx
addq %rcx, %rax
cmpq $0x0, (%rax)
jne 0x27ec4
movq $0x0, -0x8(%rbp)
jmp 0x27f4e
movq -0x10(%rbp), %rax
cmpq $0x0, 0x390(%rax)
je 0x27ef0
movq -0x10(%rbp), %rax
movq 0x70(%rax), %rax
movl -0x14(%rbp), %ecx
imulq $0x70, %rcx, %rcx
addq %rcx, %rax
movq (%rax), %rax
movq (%rax), %rax
movq %rax, -0x8(%rbp)
jmp 0x27f4e
movq -0x10(%rbp), %rax
cmpq $0x0, 0x370(%rax)
je 0x27f2d
movq -0x10(%rbp), %rax
movq 0x70(%rax), %rax
movl -0x14(%rbp), %ecx
imulq $0x70, %rcx, %rcx
addq %rcx, %rax
movq (%rax), %rax
movq -0x20(%rbp), %rcx
movq -0x10(%rbp), %rdx
imulq 0x370(%rdx), %rcx
movq (%rax,%rcx), %rax
movq %rax, -0x8(%rbp)
jmp 0x27f4e
movq -0x10(%rbp), %rax
movq 0x70(%rax), %rax
movl -0x14(%rbp), %ecx
imulq $0x70, %rcx, %rcx
addq %rcx, %rax
movq (%rax), %rax
movq -0x20(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
popq %rbp
retq
nopw %cs:(%rax,%rax)
| ma_get_length:
push rbp
mov rbp, rsp
mov [rbp+var_10], rdi
mov [rbp+var_14], esi
mov [rbp+var_20], rdx
mov rax, [rbp+var_10]
mov rax, [rax+70h]
mov ecx, [rbp+var_14]
imul rcx, 70h ; 'p'
add rax, rcx
cmp qword ptr [rax], 0
jnz short loc_27EC4
mov [rbp+var_8], 0
jmp loc_27F4E
loc_27EC4:
mov rax, [rbp+var_10]
cmp qword ptr [rax+390h], 0
jz short loc_27EF0
mov rax, [rbp+var_10]
mov rax, [rax+70h]
mov ecx, [rbp+var_14]
imul rcx, 70h ; 'p'
add rax, rcx
mov rax, [rax]
mov rax, [rax]
mov [rbp+var_8], rax
jmp short loc_27F4E
loc_27EF0:
mov rax, [rbp+var_10]
cmp qword ptr [rax+370h], 0
jz short loc_27F2D
mov rax, [rbp+var_10]
mov rax, [rax+70h]
mov ecx, [rbp+var_14]
imul rcx, 70h ; 'p'
add rax, rcx
mov rax, [rax]
mov rcx, [rbp+var_20]
mov rdx, [rbp+var_10]
imul rcx, [rdx+370h]
mov rax, [rax+rcx]
mov [rbp+var_8], rax
jmp short loc_27F4E
loc_27F2D:
mov rax, [rbp+var_10]
mov rax, [rax+70h]
mov ecx, [rbp+var_14]
imul rcx, 70h ; 'p'
add rax, rcx
mov rax, [rax]
mov rcx, [rbp+var_20]
mov rax, [rax+rcx*8]
mov [rbp+var_8], rax
loc_27F4E:
mov rax, [rbp+var_8]
pop rbp
retn
| long long ma_get_length(_QWORD *a1, unsigned int a2, long long a3)
{
if ( !*(_QWORD *)(112LL * a2 + a1[14]) )
return 0LL;
if ( a1[114] )
return **(_QWORD **)(112LL * a2 + a1[14]);
if ( a1[110] )
return *(_QWORD *)(*(_QWORD *)(112LL * a2 + a1[14]) + a1[110] * a3);
return *(_QWORD *)(*(_QWORD *)(112LL * a2 + a1[14]) + 8 * a3);
}
| ma_get_length:
PUSH RBP
MOV RBP,RSP
MOV qword ptr [RBP + -0x10],RDI
MOV dword ptr [RBP + -0x14],ESI
MOV qword ptr [RBP + -0x20],RDX
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x70]
MOV ECX,dword ptr [RBP + -0x14]
IMUL RCX,RCX,0x70
ADD RAX,RCX
CMP qword ptr [RAX],0x0
JNZ 0x00127ec4
MOV qword ptr [RBP + -0x8],0x0
JMP 0x00127f4e
LAB_00127ec4:
MOV RAX,qword ptr [RBP + -0x10]
CMP qword ptr [RAX + 0x390],0x0
JZ 0x00127ef0
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x70]
MOV ECX,dword ptr [RBP + -0x14]
IMUL RCX,RCX,0x70
ADD RAX,RCX
MOV RAX,qword ptr [RAX]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x8],RAX
JMP 0x00127f4e
LAB_00127ef0:
MOV RAX,qword ptr [RBP + -0x10]
CMP qword ptr [RAX + 0x370],0x0
JZ 0x00127f2d
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x70]
MOV ECX,dword ptr [RBP + -0x14]
IMUL RCX,RCX,0x70
ADD RAX,RCX
MOV RAX,qword ptr [RAX]
MOV RCX,qword ptr [RBP + -0x20]
MOV RDX,qword ptr [RBP + -0x10]
IMUL RCX,qword ptr [RDX + 0x370]
MOV RAX,qword ptr [RAX + RCX*0x1]
MOV qword ptr [RBP + -0x8],RAX
JMP 0x00127f4e
LAB_00127f2d:
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x70]
MOV ECX,dword ptr [RBP + -0x14]
IMUL RCX,RCX,0x70
ADD RAX,RCX
MOV RAX,qword ptr [RAX]
MOV RCX,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RAX + RCX*0x8]
MOV qword ptr [RBP + -0x8],RAX
LAB_00127f4e:
MOV RAX,qword ptr [RBP + -0x8]
POP RBP
RET
|
int8 ma_get_length(long param_1,uint param_2,long param_3)
{
int8 local_10;
if (*(long *)(*(long *)(param_1 + 0x70) + (ulong)param_2 * 0x70) == 0) {
local_10 = 0;
}
else if (*(long *)(param_1 + 0x390) == 0) {
if (*(long *)(param_1 + 0x370) == 0) {
local_10 = *(int8 *)
(*(long *)(*(long *)(param_1 + 0x70) + (ulong)param_2 * 0x70) + param_3 * 8);
}
else {
local_10 = *(int8 *)
(*(long *)(*(long *)(param_1 + 0x70) + (ulong)param_2 * 0x70) +
param_3 * *(long *)(param_1 + 0x370));
}
}
else {
local_10 = **(int8 **)(*(long *)(param_1 + 0x70) + (ulong)param_2 * 0x70);
}
return local_10;
}
| |
47,826 | OpenSubdiv::v3_6_0::Tmr::LinearSurfaceTableFactory::Create(OpenSubdiv::v3_6_0::Far::TopologyRefiner const&, int, OpenSubdiv::v3_6_0::Tmr::SurfaceTable const*) | NVIDIA-RTX[P]OSD-Lite/opensubdiv/tmr/surfaceTableFactory.cpp | std::unique_ptr<LinearSurfaceTable>
LinearSurfaceTableFactory::Create(TopologyRefiner const& refiner, int fvarChannel, SurfaceTable const* depTable) {
std::unique_ptr<LinearSurfaceTable> surfaceTable = std::make_unique<LinearSurfaceTable>();
Level const& level = refiner.getLevel(0);
int const regFaceSize = Sdc::SchemeTypeTraits::GetRegularFaceSize(refiner.GetSchemeType());
int numFaces = level.getNumFaces();
int numSurfaces = countSurfaces(level, regFaceSize);
surfaceTable->descriptors.resize(numSurfaces);
for (Index faceIndex = 0, surfIndex = 0, firstControlPoint = 0; faceIndex < numFaces; ++faceIndex) {
// face-vertex and face-value arrays have the same layout
int n = level.getNumFaceVertices(faceIndex);
if (level.isFaceHole(faceIndex)) {
surfIndex += setNoLimit(surfaceTable->descriptors, surfIndex, n, regFaceSize);
} else {
if (n == regFaceSize) {
surfaceTable->descriptors[surfIndex].Set(firstControlPoint, n);
++surfIndex;
} else {
for (int i = 0 ; i < n; ++i)
surfaceTable->descriptors[surfIndex + i].Set(firstControlPoint, n, i);
surfIndex += n;
}
surfaceTable->numControlPointsMax = std::max(surfaceTable->numControlPointsMax, n);
}
firstControlPoint += n;
}
// populate the control points array
if (fvarChannel >= 0 && depTable) {
assert(depTable->GetNumSurfaces() == numSurfaces);
// the parametric space of a surface is potentially rotated if it has been matched to
// a rotated version of an existing subdivision plan in the topology map. Bi-linear
// face-varying interpolation does not use subdivision plans and only require the 0-ring
// control points: we can fetch the rotation of the subdivision from the dependent
// vertex-interpolation surface table & apply it directly here. This makes these
// rotations completely transparent (no cost) to the run-time evaluation.
FVarLevel const& fvlevel = level.getFVarLevel(fvarChannel);
surfaceTable->controlPointIndices.resize(fvlevel.getNumFaceValuesTotal());
Index* controlPoints = surfaceTable->controlPointIndices.data();
for (Index faceIndex = 0, surfIndex = 0; faceIndex < numFaces; ++faceIndex) {
ConstIndexArray values = fvlevel.getFaceValues(faceIndex);
SurfaceDescriptor desc = depTable->GetDescriptor(surfIndex);
int n = values.size();
if (int rotation = desc.GetParametricRotation()) {
for (int i = 0; i < n; ++i)
controlPoints[i] = values[(i + rotation) % n];
} else
std::memcpy(controlPoints, values.begin(), n * sizeof(Index));
surfIndex += n == regFaceSize ? 1 : n;
controlPoints += n;
}
} else {
// general case (not face-varying or no dependent vertex surface table) : copy
// the face-varying values from the refiner. Sub-faces from faces of irregular
// size share the same set of control points.
ConstIndexArray controlPoints = fvarChannel == -1 ?
level.getFaceVertices() : level.getFVarLevel(fvarChannel).getFaceValues();
surfaceTable->controlPointIndices.assign(controlPoints.begin(), controlPoints.begin() + controlPoints.size());
}
surfaceTable->controlPointIndices.shrink_to_fit();
return surfaceTable;
} | O2 | cpp | OpenSubdiv::v3_6_0::Tmr::LinearSurfaceTableFactory::Create(OpenSubdiv::v3_6_0::Far::TopologyRefiner const&, int, OpenSubdiv::v3_6_0::Tmr::SurfaceTable const*):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %r8, %rbx
movl %ecx, %r12d
movq %rdx, %r14
movq %rdi, 0x8(%rsp)
callq 0x55080
movq 0x30(%r14), %rax
movq (%rax), %r15
movl (%r14), %edi
callq 0x50f00
movl %eax, %ebp
movl %r12d, 0x1c(%rsp)
movq %rbx, 0x20(%rsp)
movl (%r15), %ebx
movq %r15, %rdi
movl %eax, %esi
callq 0xb7a06
movl %eax, %r14d
movq 0x8(%rsp), %rax
movq (%rax), %rdi
movslq %r14d, %rsi
callq 0x51d80
movl %r14d, 0x18(%rsp)
xorl %r14d, %r14d
testl %ebx, %ebx
cmovlel %r14d, %ebx
movl %ebp, 0x4(%rsp)
orl $0xffff0000, %ebp # imm = 0xFFFF0000
movl %ebp, 0x10(%rsp)
xorl %ebp, %ebp
xorl %r13d, %r13d
movq 0x8(%rsp), %r8
cmpq %rbx, %r14
je 0xb7cb0
movq 0x18(%r15), %rax
movq 0x60(%r15), %rcx
movl (%rax,%r14,8), %r12d
testb $0x1, (%rcx,%r14)
jne 0xb7c48
movq (%r8), %rax
cmpl 0x4(%rsp), %r12d
jne 0xb7c64
movslq %r13d, %rcx
movq (%rax), %rax
movl 0x10(%rsp), %edx
movl %edx, (%rax,%rcx,8)
movl %ebp, 0x4(%rax,%rcx,8)
incl %r13d
jmp 0xb7c95
movq (%r8), %rdi
movl %r13d, %esi
movl %r12d, %edx
movl 0x4(%rsp), %ecx
callq 0x4f0c0
addl %eax, %r13d
movq 0x8(%rsp), %r8
jmp 0xb7ca5
movslq %r13d, %rcx
movzwl %r12w, %edx
testl %r12d, %r12d
movl $0x0, %esi
cmovgl %r12d, %esi
subq $0x1, %rsi
jb 0xb7c92
movq (%rax), %rdi
movl %edx, (%rdi,%rcx,8)
movl %ebp, 0x4(%rdi,%rcx,8)
incq %rcx
addl $0x10000, %edx # imm = 0x10000
jmp 0xb7c77
addl %r12d, %r13d
movq (%r8), %rax
movl 0x30(%rax), %ecx
cmpl %r12d, %ecx
cmovlel %r12d, %ecx
movl %ecx, 0x30(%rax)
addl %r12d, %ebp
incq %r14
jmp 0xb7c0c
movl 0x1c(%rsp), %esi
testl %esi, %esi
setns %al
movq 0x20(%rsp), %rdx
testq %rdx, %rdx
setne %cl
testb %cl, %al
je 0xb7da6
movq 0x8(%rdx), %rax
subq (%rdx), %rax
shrq $0x3, %rax
cmpl %eax, 0x18(%rsp)
jne 0xb7e0d
movl %esi, %eax
movq 0x1c8(%r15), %rcx
movq (%rcx,%rax,8), %rcx
movq (%r8), %rdi
addq $0x18, %rdi
movq 0x20(%rcx), %rax
movq %rcx, 0x10(%rsp)
subq 0x18(%rcx), %rax
shrq $0x2, %rax
movslq %eax, %rsi
movq %r8, %r14
callq 0x514b0
movq (%r14), %rax
movq 0x18(%rax), %r12
xorl %r13d, %r13d
xorl %ebp, %ebp
cmpl %ebx, %r13d
je 0xb7dea
movq 0x10(%rsp), %rdi
movl %r13d, %esi
callq 0x50110
movq %rax, %rsi
movl %edx, %r14d
movslq %ebp, %rax
movq 0x20(%rsp), %rcx
movq (%rcx), %rcx
movb (%rcx,%rax,8), %al
shrb %al
movslq %edx, %r15
andb $0x3, %al
je 0xb7d7b
movzbl %al, %ecx
testl %r15d, %r15d
movl $0x0, %edi
cmovgl %r15d, %edi
xorl %r8d, %r8d
cmpq %r8, %rdi
je 0xb7d8b
leal (%rcx,%r8), %eax
cltd
idivl %r14d
movl (%rsi,%rdx,4), %eax
movl %eax, (%r12,%r8,4)
incq %r8
jmp 0xb7d62
leaq (,%r15,4), %rdx
movq %r12, %rdi
callq 0x51bd0
cmpl 0x4(%rsp), %r14d
pushq $0x1
popq %rax
cmovel %eax, %r14d
addl %r14d, %ebp
leaq (%r12,%r15,4), %r12
incl %r13d
jmp 0xb7d1d
cmpl $-0x1, %esi
je 0xb7dc3
movslq %esi, %rax
movq 0x1c8(%r15), %rcx
movq (%rcx,%rax,8), %r15
leaq 0x18(%r15), %rax
addq $0x20, %r15
jmp 0xb7dcb
leaq 0x30(%r15), %rax
addq $0x38, %r15
movq (%rax), %rsi
movq (%r15), %rax
subq %rsi, %rax
movq (%r8), %rdi
addq $0x18, %rdi
shrq $0x2, %rax
cltq
leaq (%rsi,%rax,4), %rdx
callq 0x4f540
movq 0x8(%rsp), %rbx
movq (%rbx), %rdi
addq $0x18, %rdi
callq 0x535e0
movq %rbx, %rax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x187b7(%rip), %rdi # 0xd05cb
leaq 0x18413(%rip), %rsi # 0xd022e
leaq 0x187d3(%rip), %rcx # 0xd05f5
movl $0x140, %edx # imm = 0x140
callq 0x512a0
jmp 0xb7e36
jmp 0xb7e36
jmp 0xb7e36
jmp 0xb7e36
jmp 0xb7e36
movq %rax, %r14
movq 0x8(%rsp), %rdi
callq 0x510d0
movq %r14, %rdi
callq 0x55300
nop
| _ZN10OpenSubdiv6v3_6_03Tmr25LinearSurfaceTableFactory6CreateERKNS0_3Far15TopologyRefinerEiPKNS1_12SurfaceTableE:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 28h
mov rbx, r8
mov r12d, ecx
mov r14, rdx
mov [rsp+58h+var_50], rdi
call __ZSt11make_uniqueIN10OpenSubdiv6v3_6_03Tmr18LinearSurfaceTableEJEENSt9_MakeUniqIT_E15__single_objectEDpOT0_; std::make_unique<OpenSubdiv::v3_6_0::Tmr::LinearSurfaceTable>()
mov rax, [r14+30h]
mov r15, [rax]
mov edi, [r14]
call __ZN10OpenSubdiv6v3_6_03Sdc16SchemeTypeTraits18GetRegularFaceSizeENS1_10SchemeTypeE; OpenSubdiv::v3_6_0::Sdc::SchemeTypeTraits::GetRegularFaceSize(OpenSubdiv::v3_6_0::Sdc::SchemeType)
mov ebp, eax
mov [rsp+58h+var_3C], r12d
mov [rsp+58h+var_38], rbx
mov ebx, [r15]
mov rdi, r15; this
mov esi, eax; OpenSubdiv::v3_6_0::Vtr::internal::Level *
call _ZN10OpenSubdiv6v3_6_03TmrL13countSurfacesERKNS0_3Vtr8internal5LevelEi; OpenSubdiv::v3_6_0::Tmr::countSurfaces(OpenSubdiv::v3_6_0::Vtr::internal::Level const&,int)
mov r14d, eax
mov rax, [rsp+58h+var_50]
mov rdi, [rax]
movsxd rsi, r14d
call __ZNSt6vectorIN10OpenSubdiv6v3_6_03Tmr23LinearSurfaceDescriptorESaIS3_EE6resizeEm; std::vector<OpenSubdiv::v3_6_0::Tmr::LinearSurfaceDescriptor>::resize(ulong)
mov [rsp+58h+var_40], r14d
xor r14d, r14d
test ebx, ebx
cmovle ebx, r14d
mov [rsp+58h+var_54], ebp
or ebp, 0FFFF0000h
mov dword ptr [rsp+58h+var_48], ebp
xor ebp, ebp
xor r13d, r13d
mov r8, [rsp+58h+var_50]
loc_B7C0C:
cmp r14, rbx
jz loc_B7CB0
mov rax, [r15+18h]
mov rcx, [r15+60h]
mov r12d, [rax+r14*8]
test byte ptr [rcx+r14], 1
jnz short loc_B7C48
mov rax, [r8]
cmp r12d, [rsp+58h+var_54]
jnz short loc_B7C64
movsxd rcx, r13d
mov rax, [rax]
mov edx, dword ptr [rsp+58h+var_48]
mov [rax+rcx*8], edx
mov [rax+rcx*8+4], ebp
inc r13d
jmp short loc_B7C95
loc_B7C48:
mov rdi, [r8]
mov esi, r13d
mov edx, r12d
mov ecx, [rsp+58h+var_54]
call __ZN10OpenSubdiv6v3_6_03Tmr10setNoLimitINS1_23LinearSurfaceDescriptorEEEiRSt6vectorIT_SaIS5_EEiii; OpenSubdiv::v3_6_0::Tmr::setNoLimit<OpenSubdiv::v3_6_0::Tmr::LinearSurfaceDescriptor>(std::vector<OpenSubdiv::v3_6_0::Tmr::LinearSurfaceDescriptor> &,int,int,int)
add r13d, eax
mov r8, [rsp+58h+var_50]
jmp short loc_B7CA5
loc_B7C64:
movsxd rcx, r13d
movzx edx, r12w
test r12d, r12d
mov esi, 0
cmovg esi, r12d
loc_B7C77:
sub rsi, 1
jb short loc_B7C92
mov rdi, [rax]
mov [rdi+rcx*8], edx
mov [rdi+rcx*8+4], ebp
inc rcx
add edx, 10000h
jmp short loc_B7C77
loc_B7C92:
add r13d, r12d
loc_B7C95:
mov rax, [r8]
mov ecx, [rax+30h]
cmp ecx, r12d
cmovle ecx, r12d
mov [rax+30h], ecx
loc_B7CA5:
add ebp, r12d
inc r14
jmp loc_B7C0C
loc_B7CB0:
mov esi, [rsp+58h+var_3C]
test esi, esi
setns al
mov rdx, [rsp+58h+var_38]
test rdx, rdx
setnz cl
test al, cl
jz loc_B7DA6
mov rax, [rdx+8]
sub rax, [rdx]
shr rax, 3
cmp [rsp+58h+var_40], eax
jnz loc_B7E0D
mov eax, esi
mov rcx, [r15+1C8h]
mov rcx, [rcx+rax*8]
mov rdi, [r8]
add rdi, 18h
mov rax, [rcx+20h]
mov [rsp+58h+var_48], rcx
sub rax, [rcx+18h]
shr rax, 2
movsxd rsi, eax
mov r14, r8
call __ZNSt6vectorIiSaIiEE6resizeEm; std::vector<int>::resize(ulong)
mov rax, [r14]
mov r12, [rax+18h]
xor r13d, r13d
xor ebp, ebp
loc_B7D1D:
cmp r13d, ebx
jz loc_B7DEA
mov rdi, [rsp+58h+var_48]; this
mov esi, r13d; int
call __ZNK10OpenSubdiv6v3_6_03Vtr8internal9FVarLevel13getFaceValuesEi; OpenSubdiv::v3_6_0::Vtr::internal::FVarLevel::getFaceValues(int)
mov rsi, rax
mov r14d, edx
movsxd rax, ebp
mov rcx, [rsp+58h+var_38]
mov rcx, [rcx]
mov al, [rcx+rax*8]
shr al, 1
movsxd r15, edx
and al, 3
jz short loc_B7D7B
movzx ecx, al
test r15d, r15d
mov edi, 0
cmovg edi, r15d
xor r8d, r8d
loc_B7D62:
cmp rdi, r8
jz short loc_B7D8B
lea eax, [rcx+r8]
cdq
idiv r14d
mov eax, [rsi+rdx*4]
mov [r12+r8*4], eax
inc r8
jmp short loc_B7D62
loc_B7D7B:
lea rdx, ds:0[r15*4]
mov rdi, r12
call _memcpy
loc_B7D8B:
cmp r14d, [rsp+58h+var_54]
push 1
pop rax
cmovz r14d, eax
add ebp, r14d
lea r12, [r12+r15*4]
inc r13d
jmp loc_B7D1D
loc_B7DA6:
cmp esi, 0FFFFFFFFh
jz short loc_B7DC3
movsxd rax, esi
mov rcx, [r15+1C8h]
mov r15, [rcx+rax*8]
lea rax, [r15+18h]
add r15, 20h ; ' '
jmp short loc_B7DCB
loc_B7DC3:
lea rax, [r15+30h]
add r15, 38h ; '8'
loc_B7DCB:
mov rsi, [rax]
mov rax, [r15]
sub rax, rsi
mov rdi, [r8]
add rdi, 18h
shr rax, 2
cdqe
lea rdx, [rsi+rax*4]
call __ZNSt6vectorIiSaIiEE13_M_assign_auxIPKiEEvT_S5_St20forward_iterator_tag; std::vector<int>::_M_assign_aux<int const*>(int const*,int const*,std::forward_iterator_tag)
loc_B7DEA:
mov rbx, [rsp+58h+var_50]
mov rdi, [rbx]
add rdi, 18h
call __ZNSt6vectorIiSaIiEE16_M_shrink_to_fitEv; std::vector<int>::_M_shrink_to_fit(void)
mov rax, rbx
add rsp, 28h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_B7E0D:
lea rdi, aDeptableGetnum; "depTable->GetNumSurfaces() == numSurfac"...
lea rsi, aWorkspaceLlm4b_50; "/workspace/llm4binary/github/2025_star3"...
lea rcx, aStdUniquePtrLi; "std::unique_ptr<LinearSurfaceTable> Ope"...
mov edx, 140h
call ___assert_fail
jmp short loc_B7E36
jmp short loc_B7E36
jmp short loc_B7E36
jmp short loc_B7E36
jmp short $+2
loc_B7E36:
mov r14, rax
mov rdi, [rsp+58h+var_50]
call __ZNSt10unique_ptrIN10OpenSubdiv6v3_6_03Tmr18LinearSurfaceTableESt14default_deleteIS3_EED2Ev; std::unique_ptr<OpenSubdiv::v3_6_0::Tmr::LinearSurfaceTable>::~unique_ptr()
mov rdi, r14
call __Unwind_Resume
| OpenSubdiv::v3_6_0::Tmr::LinearSurfaceTableFactory * OpenSubdiv::v3_6_0::Tmr::LinearSurfaceTableFactory::Create(
OpenSubdiv::v3_6_0::Tmr::LinearSurfaceTableFactory *this,
const OpenSubdiv::v3_6_0::Far::TopologyRefiner *a2,
long long a3,
const OpenSubdiv::v3_6_0::Tmr::SurfaceTable *a4,
_QWORD *a5)
{
unsigned int v6; // r12d
_QWORD *v8; // r15
const OpenSubdiv::v3_6_0::Vtr::internal::Level *RegularFaceSize; // rbp
long long v10; // rbx
long long v11; // r14
int v12; // ebp
unsigned int v13; // r13d
OpenSubdiv::v3_6_0::Tmr::LinearSurfaceTableFactory *v14; // r8
int v15; // r12d
long long *v16; // rax
long long v17; // rax
long long v18; // rcx
int v19; // edx
long long v20; // rsi
long long v22; // rdi
int v23; // ecx
OpenSubdiv::v3_6_0::Vtr::internal::FVarLevel *v24; // rcx
OpenSubdiv::v3_6_0::Tmr::LinearSurfaceTableFactory *v25; // r14
long long v26; // r12
int v27; // r13d
int v28; // ebp
int v29; // edx
long long FaceValues; // rsi
long long v31; // r8
long long v32; // r9
int v33; // r14d
long long v34; // r15
unsigned __int8 v35; // al
long long v36; // rdi
long long i; // r8
long long v38; // rdx
long long v39; // r15
_QWORD *v40; // rax
_QWORD *v41; // r15
unsigned int v43; // [rsp+4h] [rbp-54h]
unsigned int v45; // [rsp+10h] [rbp-48h]
OpenSubdiv::v3_6_0::Vtr::internal::FVarLevel *v46; // [rsp+10h] [rbp-48h]
int v47; // [rsp+18h] [rbp-40h]
unsigned int v48; // [rsp+1Ch] [rbp-3Ch]
_QWORD *v49; // [rsp+20h] [rbp-38h]
v6 = (unsigned int)a4;
std::make_unique<OpenSubdiv::v3_6_0::Tmr::LinearSurfaceTable>(this, a2);
v8 = **(_QWORD ***)(a3 + 48);
RegularFaceSize = (const OpenSubdiv::v3_6_0::Vtr::internal::Level *)(unsigned int)OpenSubdiv::v3_6_0::Sdc::SchemeTypeTraits::GetRegularFaceSize(*(_DWORD *)a3);
v48 = v6;
v49 = a5;
v10 = *(unsigned int *)v8;
LODWORD(a3) = OpenSubdiv::v3_6_0::Tmr::countSurfaces((OpenSubdiv::v3_6_0::Tmr *)v8, RegularFaceSize);
std::vector<OpenSubdiv::v3_6_0::Tmr::LinearSurfaceDescriptor>::resize(*(_QWORD *)this, (int)a3);
v47 = a3;
v11 = 0LL;
if ( (int)v10 <= 0 )
v10 = 0LL;
v43 = (unsigned int)RegularFaceSize;
v45 = (unsigned int)RegularFaceSize | 0xFFFF0000;
v12 = 0;
v13 = 0;
v14 = this;
while ( v11 != v10 )
{
v15 = *(_DWORD *)(v8[3] + 8 * v11);
if ( (*(_BYTE *)(v8[12] + v11) & 1) != 0 )
{
v13 += OpenSubdiv::v3_6_0::Tmr::setNoLimit<OpenSubdiv::v3_6_0::Tmr::LinearSurfaceDescriptor>(
*(_QWORD *)v14,
v13,
(unsigned int)v15,
v43);
v14 = this;
}
else
{
v16 = *(long long **)v14;
if ( v15 == v43 )
{
v17 = *v16;
*(_DWORD *)(v17 + 8LL * (int)v13) = v45;
*(_DWORD *)(v17 + 8LL * (int)v13++ + 4) = v12;
}
else
{
v18 = (int)v13;
v19 = (unsigned __int16)v15;
v20 = 0LL;
if ( v15 > 0 )
v20 = (unsigned int)v15;
while ( v20-- != 0 )
{
v22 = *v16;
*(_DWORD *)(v22 + 8 * v18) = v19;
*(_DWORD *)(v22 + 8 * v18++ + 4) = v12;
v19 += 0x10000;
}
v13 += v15;
}
v23 = *(_DWORD *)(*(_QWORD *)v14 + 48LL);
if ( v23 <= v15 )
v23 = v15;
*(_DWORD *)(*(_QWORD *)v14 + 48LL) = v23;
}
v12 += v15;
++v11;
}
if ( v49 != 0LL && (v48 & 0x80000000) == 0 )
{
if ( v47 != (unsigned int)((v49[1] - *v49) >> 3) )
__assert_fail(
"depTable->GetNumSurfaces() == numSurfaces",
"/workspace/llm4binary/github/2025_star3/NVIDIA-RTX[P]OSD-Lite/opensubdiv/tmr/surfaceTableFactory.cpp",
320LL,
"std::unique_ptr<LinearSurfaceTable> OpenSubdiv::v3_6_0::Tmr::LinearSurfaceTableFactory::Create(const TopologyRef"
"iner &, int, const SurfaceTable *)");
v24 = *(OpenSubdiv::v3_6_0::Vtr::internal::FVarLevel **)(v8[57] + 8LL * v48);
v46 = v24;
v25 = v14;
std::vector<int>::resize(*(_QWORD *)v14 + 24LL, (int)((*((_QWORD *)v24 + 4) - *((_QWORD *)v24 + 3)) >> 2));
v26 = *(_QWORD *)(*(_QWORD *)v25 + 24LL);
v27 = 0;
v28 = 0;
while ( v27 != (_DWORD)v10 )
{
FaceValues = OpenSubdiv::v3_6_0::Vtr::internal::FVarLevel::getFaceValues(v46, v27);
v33 = v29;
v34 = v29;
if ( ((*(_BYTE *)(*v49 + 8LL * v28) >> 1) & 3) != 0 )
{
v35 = (*(_BYTE *)(*v49 + 8LL * v28) >> 1) & 3;
v36 = 0LL;
if ( v29 > 0 )
v36 = (unsigned int)v29;
for ( i = 0LL; v36 != i; ++i )
{
v38 = (unsigned int)((v35 + (int)i) >> 31);
LODWORD(v38) = (v35 + (int)i) % v33;
*(_DWORD *)(v26 + 4 * i) = *(_DWORD *)(FaceValues + 4 * v38);
}
}
else
{
memcpy(v26, FaceValues, 4LL * v29, *v49, v31, v32);
}
if ( v33 == v43 )
v33 = 1;
v28 += v33;
v26 += 4 * v34;
++v27;
}
}
else
{
if ( v48 == -1 )
{
v40 = v8 + 6;
v41 = v8 + 7;
}
else
{
v39 = *(_QWORD *)(v8[57] + 8LL * (int)v48);
v40 = (_QWORD *)(v39 + 24);
v41 = (_QWORD *)(v39 + 32);
}
std::vector<int>::_M_assign_aux<int const*>(*(_QWORD *)v14 + 24LL, *v40, *v40 + 4LL * (int)((*v41 - *v40) >> 2));
}
std::vector<int>::_M_shrink_to_fit(*(_QWORD *)this + 24LL);
return this;
}
| Create:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x28
MOV RBX,R8
MOV R12D,ECX
MOV R14,RDX
MOV qword ptr [RSP + 0x8],RDI
CALL 0x00155080
MOV RAX,qword ptr [R14 + 0x30]
MOV R15,qword ptr [RAX]
MOV EDI,dword ptr [R14]
LAB_001b7bb5:
CALL 0x00150f00
MOV EBP,EAX
MOV dword ptr [RSP + 0x1c],R12D
MOV qword ptr [RSP + 0x20],RBX
MOV EBX,dword ptr [R15]
LAB_001b7bc9:
MOV RDI,R15
MOV ESI,EAX
CALL 0x001b7a06
MOV R14D,EAX
MOV RAX,qword ptr [RSP + 0x8]
MOV RDI,qword ptr [RAX]
MOVSXD RSI,R14D
CALL 0x00151d80
MOV dword ptr [RSP + 0x18],R14D
XOR R14D,R14D
TEST EBX,EBX
CMOVLE EBX,R14D
MOV dword ptr [RSP + 0x4],EBP
OR EBP,0xffff0000
MOV dword ptr [RSP + 0x10],EBP
XOR EBP,EBP
XOR R13D,R13D
MOV R8,qword ptr [RSP + 0x8]
LAB_001b7c0c:
CMP R14,RBX
JZ 0x001b7cb0
MOV RAX,qword ptr [R15 + 0x18]
MOV RCX,qword ptr [R15 + 0x60]
MOV R12D,dword ptr [RAX + R14*0x8]
TEST byte ptr [RCX + R14*0x1],0x1
JNZ 0x001b7c48
MOV RAX,qword ptr [R8]
CMP R12D,dword ptr [RSP + 0x4]
JNZ 0x001b7c64
MOVSXD RCX,R13D
MOV RAX,qword ptr [RAX]
MOV EDX,dword ptr [RSP + 0x10]
MOV dword ptr [RAX + RCX*0x8],EDX
MOV dword ptr [RAX + RCX*0x8 + 0x4],EBP
INC R13D
JMP 0x001b7c95
LAB_001b7c48:
MOV RDI,qword ptr [R8]
LAB_001b7c4b:
MOV ESI,R13D
MOV EDX,R12D
MOV ECX,dword ptr [RSP + 0x4]
CALL 0x0014f0c0
ADD R13D,EAX
MOV R8,qword ptr [RSP + 0x8]
JMP 0x001b7ca5
LAB_001b7c64:
MOVSXD RCX,R13D
MOVZX EDX,R12W
TEST R12D,R12D
MOV ESI,0x0
CMOVG ESI,R12D
LAB_001b7c77:
SUB RSI,0x1
JC 0x001b7c92
MOV RDI,qword ptr [RAX]
MOV dword ptr [RDI + RCX*0x8],EDX
MOV dword ptr [RDI + RCX*0x8 + 0x4],EBP
INC RCX
ADD EDX,0x10000
JMP 0x001b7c77
LAB_001b7c92:
ADD R13D,R12D
LAB_001b7c95:
MOV RAX,qword ptr [R8]
MOV ECX,dword ptr [RAX + 0x30]
CMP ECX,R12D
CMOVLE ECX,R12D
MOV dword ptr [RAX + 0x30],ECX
LAB_001b7ca5:
ADD EBP,R12D
INC R14
JMP 0x001b7c0c
LAB_001b7cb0:
MOV ESI,dword ptr [RSP + 0x1c]
TEST ESI,ESI
SETNS AL
MOV RDX,qword ptr [RSP + 0x20]
TEST RDX,RDX
SETNZ CL
TEST AL,CL
JZ 0x001b7da6
MOV RAX,qword ptr [RDX + 0x8]
SUB RAX,qword ptr [RDX]
SHR RAX,0x3
CMP dword ptr [RSP + 0x18],EAX
JNZ 0x001b7e0d
MOV EAX,ESI
MOV RCX,qword ptr [R15 + 0x1c8]
MOV RCX,qword ptr [RCX + RAX*0x8]
MOV RDI,qword ptr [R8]
ADD RDI,0x18
MOV RAX,qword ptr [RCX + 0x20]
MOV qword ptr [RSP + 0x10],RCX
SUB RAX,qword ptr [RCX + 0x18]
SHR RAX,0x2
MOVSXD RSI,EAX
LAB_001b7d09:
MOV R14,R8
CALL 0x001514b0
MOV RAX,qword ptr [R14]
MOV R12,qword ptr [RAX + 0x18]
XOR R13D,R13D
XOR EBP,EBP
LAB_001b7d1d:
CMP R13D,EBX
JZ 0x001b7dea
LAB_001b7d26:
MOV RDI,qword ptr [RSP + 0x10]
MOV ESI,R13D
CALL 0x00150110
LAB_001b7d33:
MOV RSI,RAX
MOV R14D,EDX
MOVSXD RAX,EBP
MOV RCX,qword ptr [RSP + 0x20]
MOV RCX,qword ptr [RCX]
MOV AL,byte ptr [RCX + RAX*0x8]
SHR AL,0x1
MOVSXD R15,EDX
AND AL,0x3
JZ 0x001b7d7b
MOVZX ECX,AL
TEST R15D,R15D
MOV EDI,0x0
CMOVG EDI,R15D
XOR R8D,R8D
LAB_001b7d62:
CMP RDI,R8
JZ 0x001b7d8b
LEA EAX,[RCX + R8*0x1]
CDQ
IDIV R14D
MOV EAX,dword ptr [RSI + RDX*0x4]
MOV dword ptr [R12 + R8*0x4],EAX
INC R8
JMP 0x001b7d62
LAB_001b7d7b:
LEA RDX,[R15*0x4]
MOV RDI,R12
CALL 0x00151bd0
LAB_001b7d8b:
CMP R14D,dword ptr [RSP + 0x4]
PUSH 0x1
POP RAX
CMOVZ R14D,EAX
ADD EBP,R14D
LEA R12,[R12 + R15*0x4]
INC R13D
JMP 0x001b7d1d
LAB_001b7da6:
CMP ESI,-0x1
JZ 0x001b7dc3
MOVSXD RAX,ESI
MOV RCX,qword ptr [R15 + 0x1c8]
MOV R15,qword ptr [RCX + RAX*0x8]
LEA RAX,[R15 + 0x18]
ADD R15,0x20
JMP 0x001b7dcb
LAB_001b7dc3:
LEA RAX,[R15 + 0x30]
ADD R15,0x38
LAB_001b7dcb:
MOV RSI,qword ptr [RAX]
MOV RAX,qword ptr [R15]
SUB RAX,RSI
MOV RDI,qword ptr [R8]
ADD RDI,0x18
SHR RAX,0x2
CDQE
LEA RDX,[RSI + RAX*0x4]
LAB_001b7de5:
CALL 0x0014f540
LAB_001b7dea:
MOV RBX,qword ptr [RSP + 0x8]
MOV RDI,qword ptr [RBX]
ADD RDI,0x18
CALL 0x001535e0
MOV RAX,RBX
ADD RSP,0x28
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_001b7e0d:
LEA RDI,[0x1d05cb]
LEA RSI,[0x1d022e]
LEA RCX,[0x1d05f5]
MOV EDX,0x140
CALL 0x001512a0
|
/* OpenSubdiv::v3_6_0::Tmr::LinearSurfaceTableFactory::Create(OpenSubdiv::v3_6_0::Far::TopologyRefiner
const&, int, OpenSubdiv::v3_6_0::Tmr::SurfaceTable const*) */
TopologyRefiner *
OpenSubdiv::v3_6_0::Tmr::LinearSurfaceTableFactory::Create
(TopologyRefiner *param_1,int param_2,SurfaceTable *param_3)
{
long *plVar1;
long lVar2;
FVarLevel *this;
byte bVar3;
uint uVar4;
int iVar5;
int iVar6;
Level *pLVar7;
uint in_ECX;
long lVar8;
uint uVar9;
ulong uVar10;
int iVar11;
ulong uVar12;
long *in_R8;
void *__dest;
int iVar13;
uint uVar14;
ulong uVar15;
Level *pLVar16;
bool bVar17;
int1 auVar18 [12];
uint local_48;
std::make_unique<OpenSubdiv::v3_6_0::Tmr::LinearSurfaceTable>();
pLVar16 = (Level *)**(int8 **)(param_3 + 0x30);
/* try { // try from 001b7bb5 to 001b7bb9 has its CatchHandler @ 001b7e30 */
uVar4 = Sdc::SchemeTypeTraits::GetRegularFaceSize(*(int4 *)param_3);
uVar14 = *(uint *)pLVar16;
/* try { // try from 001b7bc9 to 001b7be5 has its CatchHandler @ 001b7e32 */
iVar5 = countSurfaces(pLVar16,uVar4);
std::
vector<OpenSubdiv::v3_6_0::Tmr::LinearSurfaceDescriptor,std::allocator<OpenSubdiv::v3_6_0::Tmr::LinearSurfaceDescriptor>>
::resize(*(vector<OpenSubdiv::v3_6_0::Tmr::LinearSurfaceDescriptor,std::allocator<OpenSubdiv::v3_6_0::Tmr::LinearSurfaceDescriptor>>
**)param_1,(long)iVar5);
uVar15 = 0;
uVar10 = (ulong)uVar14;
if ((int)uVar14 < 1) {
uVar10 = uVar15;
}
local_48 = uVar4 | 0xffff0000;
iVar11 = 0;
iVar13 = 0;
for (; uVar15 != uVar10; uVar15 = uVar15 + 1) {
uVar14 = *(uint *)(*(long *)(pLVar16 + 0x18) + uVar15 * 8);
if ((*(byte *)(*(long *)(pLVar16 + 0x60) + uVar15) & 1) == 0) {
plVar1 = *(long **)param_1;
if (uVar14 == uVar4) {
lVar8 = *plVar1;
*(uint *)(lVar8 + (long)iVar13 * 8) = local_48;
*(int *)(lVar8 + 4 + (long)iVar13 * 8) = iVar11;
iVar13 = iVar13 + 1;
}
else {
lVar8 = (long)iVar13;
uVar9 = uVar14 & 0xffff;
uVar12 = 0;
if (0 < (int)uVar14) {
uVar12 = (ulong)uVar14;
}
while (bVar17 = uVar12 != 0, uVar12 = uVar12 - 1, bVar17) {
lVar2 = *plVar1;
*(uint *)(lVar2 + lVar8 * 8) = uVar9;
*(int *)(lVar2 + 4 + lVar8 * 8) = iVar11;
lVar8 = lVar8 + 1;
uVar9 = uVar9 + 0x10000;
}
iVar13 = iVar13 + uVar14;
}
uVar9 = *(uint *)(*(long *)param_1 + 0x30);
if ((int)uVar9 <= (int)uVar14) {
uVar9 = uVar14;
}
*(uint *)(*(long *)param_1 + 0x30) = uVar9;
}
else {
/* try { // try from 001b7c4b to 001b7c59 has its CatchHandler @ 001b7e36 */
iVar6 = setNoLimit<OpenSubdiv::v3_6_0::Tmr::LinearSurfaceDescriptor>
(*(vector **)param_1,iVar13,uVar14,uVar4);
iVar13 = iVar13 + iVar6;
}
iVar11 = iVar11 + uVar14;
}
if ((int)in_ECX < 0 || in_R8 == (long *)0x0) {
if (in_ECX == 0xffffffff) {
pLVar7 = pLVar16 + 0x30;
pLVar16 = pLVar16 + 0x38;
}
else {
lVar8 = *(long *)(*(long *)(pLVar16 + 0x1c8) + (long)(int)in_ECX * 8);
pLVar7 = (Level *)(lVar8 + 0x18);
pLVar16 = (Level *)(lVar8 + 0x20);
}
lVar8 = *(long *)pLVar7;
/* try { // try from 001b7de5 to 001b7de9 has its CatchHandler @ 001b7e2e */
std::vector<int,std::allocator<int>>::_M_assign_aux<int_const*>
(*(long *)param_1 + 0x18,lVar8,
lVar8 + (long)(int)((ulong)(*(long *)pLVar16 - lVar8) >> 2) * 4);
}
else {
if (iVar5 != (int)((ulong)(in_R8[1] - *in_R8) >> 3)) {
/* WARNING: Subroutine does not return */
__assert_fail("depTable->GetNumSurfaces() == numSurfaces",
"/workspace/llm4binary/github/2025_star3/NVIDIA-RTX[P]OSD-Lite/opensubdiv/tmr/surfaceTableFactory.cpp"
,0x140,
"std::unique_ptr<LinearSurfaceTable> OpenSubdiv::v3_6_0::Tmr::LinearSurfaceTableFactory::Create(const TopologyRefiner &, int, const SurfaceTable *)"
);
}
this = *(FVarLevel **)(*(long *)(pLVar16 + 0x1c8) + (ulong)in_ECX * 8);
/* try { // try from 001b7d09 to 001b7d10 has its CatchHandler @ 001b7e2c */
std::vector<int,std::allocator<int>>::resize
((vector<int,std::allocator<int>> *)(*(long *)param_1 + 0x18),
(long)(int)((ulong)(*(long *)(this + 0x20) - *(long *)(this + 0x18)) >> 2));
__dest = *(void **)(*(long *)param_1 + 0x18);
iVar5 = 0;
for (iVar11 = 0; iVar11 != (int)uVar10; iVar11 = iVar11 + 1) {
/* try { // try from 001b7d26 to 001b7d32 has its CatchHandler @ 001b7e34 */
auVar18 = Vtr::internal::FVarLevel::getFaceValues(this,iVar11);
uVar14 = auVar18._8_4_;
lVar8 = (long)(int)uVar14;
bVar3 = *(byte *)(*in_R8 + (long)iVar5 * 8) >> 1 & 3;
if (bVar3 == 0) {
memcpy(__dest,auVar18._0_8_,lVar8 * 4);
}
else {
uVar15 = 0;
if (0 < (int)uVar14) {
uVar15 = (ulong)uVar14;
}
for (uVar12 = 0; uVar15 != uVar12; uVar12 = uVar12 + 1) {
*(int4 *)((long)__dest + uVar12 * 4) =
*(int4 *)
((long)auVar18._0_8_ +
((long)(int)((uint)bVar3 + (int)uVar12) % (long)(int)uVar14 & 0xffffffffU) * 4);
}
}
if (uVar14 == uVar4) {
uVar14 = 1;
}
iVar5 = iVar5 + uVar14;
__dest = (void *)((long)__dest + lVar8 * 4);
}
}
std::vector<int,std::allocator<int>>::_M_shrink_to_fit
((vector<int,std::allocator<int>> *)(*(long *)param_1 + 0x18));
return param_1;
}
| |
47,827 | end_key_cache_internal | eloqsql/mysys/mf_keycache.c | static
void end_key_cache_internal(KEY_CACHE *keycache, my_bool cleanup,
my_bool use_op_lock)
{
if (keycache->key_cache_inited)
{
keycache->interface_funcs->end(keycache->keycache_cb, cleanup);
if (cleanup)
{
if (keycache->keycache_cb)
{
my_free(keycache->keycache_cb);
keycache->keycache_cb= 0;
}
/*
We do not destroy op_lock if we are going to reuse the same key cache.
This happens if we are called from repartition_key_cache_internal().
*/
if (use_op_lock)
pthread_mutex_destroy(&keycache->op_lock);
keycache->key_cache_inited= 0;
}
keycache->can_be_used= 0;
}
} | O3 | c | end_key_cache_internal:
cmpb $0x0, 0x48(%rdi)
je 0x9821f
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %edx, %r14d
movq %rdi, %rbx
movq 0x8(%rdi), %rdi
movq 0x10(%rbx), %rax
movsbl %sil, %r15d
movl %r15d, %esi
callq *0x40(%rax)
testb %r15b, %r15b
je 0x98211
movq 0x8(%rbx), %rdi
testq %rdi, %rdi
je 0x981ff
callq 0x9fbaa
movq $0x0, 0x8(%rbx)
testb %r14b, %r14b
je 0x9820d
leaq 0x58(%rbx), %rdi
callq 0x290c0
movb $0x0, 0x48(%rbx)
movb $0x0, 0x49(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
| end_key_cache_internal:
cmp byte ptr [rdi+48h], 0
jz short locret_9821F
push rbp
mov rbp, rsp
push r15
push r14
push rbx
push rax
mov r14d, edx
mov rbx, rdi
mov rdi, [rdi+8]
mov rax, [rbx+10h]
movsx r15d, sil
mov esi, r15d
call qword ptr [rax+40h]
test r15b, r15b
jz short loc_98211
mov rdi, [rbx+8]
test rdi, rdi
jz short loc_981FF
call my_free
mov qword ptr [rbx+8], 0
loc_981FF:
test r14b, r14b
jz short loc_9820D
lea rdi, [rbx+58h]
call _pthread_mutex_destroy
loc_9820D:
mov byte ptr [rbx+48h], 0
loc_98211:
mov byte ptr [rbx+49h], 0
add rsp, 8
pop rbx
pop r14
pop r15
pop rbp
locret_9821F:
retn
| long long end_key_cache_internal(long long a1, char a2, char a3)
{
long long result; // rax
long long v6; // rdi
if ( *(_BYTE *)(a1 + 72) )
{
result = (*(long long ( **)(_QWORD, _QWORD))(*(_QWORD *)(a1 + 16) + 64LL))(
*(_QWORD *)(a1 + 8),
(unsigned int)a2);
if ( a2 )
{
v6 = *(_QWORD *)(a1 + 8);
if ( v6 )
{
result = my_free(v6);
*(_QWORD *)(a1 + 8) = 0LL;
}
if ( a3 )
result = pthread_mutex_destroy(a1 + 88);
*(_BYTE *)(a1 + 72) = 0;
}
*(_BYTE *)(a1 + 73) = 0;
}
return result;
}
| end_key_cache_internal:
CMP byte ptr [RDI + 0x48],0x0
JZ 0x0019821f
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH RBX
PUSH RAX
MOV R14D,EDX
MOV RBX,RDI
MOV RDI,qword ptr [RDI + 0x8]
MOV RAX,qword ptr [RBX + 0x10]
MOVSX R15D,SIL
MOV ESI,R15D
CALL qword ptr [RAX + 0x40]
TEST R15B,R15B
JZ 0x00198211
MOV RDI,qword ptr [RBX + 0x8]
TEST RDI,RDI
JZ 0x001981ff
CALL 0x0019fbaa
MOV qword ptr [RBX + 0x8],0x0
LAB_001981ff:
TEST R14B,R14B
JZ 0x0019820d
LEA RDI,[RBX + 0x58]
CALL 0x001290c0
LAB_0019820d:
MOV byte ptr [RBX + 0x48],0x0
LAB_00198211:
MOV byte ptr [RBX + 0x49],0x0
ADD RSP,0x8
POP RBX
POP R14
POP R15
POP RBP
LAB_0019821f:
RET
|
void end_key_cache_internal(long param_1,char param_2,char param_3)
{
if (*(char *)(param_1 + 0x48) != '\0') {
(**(code **)(*(long *)(param_1 + 0x10) + 0x40))(*(int8 *)(param_1 + 8),(int)param_2);
if (param_2 != '\0') {
if (*(long *)(param_1 + 8) != 0) {
my_free();
*(int8 *)(param_1 + 8) = 0;
}
if (param_3 != '\0') {
pthread_mutex_destroy((pthread_mutex_t *)(param_1 + 0x58));
}
*(int1 *)(param_1 + 0x48) = 0;
}
*(int1 *)(param_1 + 0x49) = 0;
}
return;
}
| |
47,828 | cli::integer::integer(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>) | msxemulator/build_O3/_deps/picotool-src/cli.h | explicit integer(string name) : value_base(std::move(name)) {} | O3 | c | cli::integer::integer(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>):
pushq %r14
pushq %rbx
subq $0x28, %rsp
movq %rdi, %rbx
leaq 0x18(%rsp), %r14
movq %r14, -0x10(%r14)
movq (%rsi), %rax
leaq 0x10(%rsi), %rcx
cmpq %rcx, %rax
je 0x372d6
movq %rax, 0x8(%rsp)
movq (%rcx), %rax
movq %rax, 0x18(%rsp)
jmp 0x372dd
movups (%rcx), %xmm0
movups %xmm0, (%r14)
movq 0x8(%rsi), %rdx
leaq 0x8(%rsp), %rax
movq %rdx, 0x8(%rax)
movq %rcx, (%rsi)
movq $0x0, 0x8(%rsi)
movb $0x0, 0x10(%rsi)
movq %rbx, %rdi
movq %rax, %rsi
callq 0x4cc3e
movq 0x8(%rsp), %rdi
cmpq %r14, %rdi
je 0x3731b
movq 0x18(%rsp), %rsi
incq %rsi
callq 0xf470
leaq 0xa8d8e(%rip), %rax # 0xe00b0
movq %rax, (%rbx)
xorl %eax, %eax
movq %rax, 0xd8(%rbx)
movabsq $0x7fffffffffffffff, %rcx # imm = 0x7FFFFFFFFFFFFFFF
movq %rcx, 0xe0(%rbx)
leaq 0xf8(%rbx), %rcx
movq %rcx, 0xe8(%rbx)
movq %rax, 0xf0(%rbx)
movb $0x0, 0xf8(%rbx)
movq %rax, 0x108(%rbx)
addq $0x28, %rsp
popq %rbx
popq %r14
retq
movq %rax, %rbx
movq 0x8(%rsp), %rdi
cmpq %r14, %rdi
je 0x37384
movq 0x18(%rsp), %rsi
incq %rsi
callq 0xf470
movq %rbx, %rdi
callq 0xf7d0
| _ZN3cli7integerC2ENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE:
push r14
push rbx
sub rsp, 28h
mov rbx, rdi
lea r14, [rsp+38h+var_20]
mov [r14-10h], r14
mov rax, [rsi]
lea rcx, [rsi+10h]
cmp rax, rcx
jz short loc_372D6
mov [rsp+38h+var_30], rax
mov rax, [rcx]
mov [rsp+38h+var_20], rax
jmp short loc_372DD
loc_372D6:
movups xmm0, xmmword ptr [rcx]
movups xmmword ptr [r14], xmm0
loc_372DD:
mov rdx, [rsi+8]
lea rax, [rsp+38h+var_30]
mov [rax+8], rdx
mov [rsi], rcx
mov qword ptr [rsi+8], 0
mov byte ptr [rsi+10h], 0
mov rdi, rbx; int
mov rsi, rax
call _ZN3cli10value_baseINS_7integerEEC2ENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; cli::value_base<cli::integer>::value_base(std::string)
mov rdi, [rsp+38h+var_30]; void *
cmp rdi, r14
jz short loc_3731B
mov rsi, [rsp+38h+var_20]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_3731B:
lea rax, off_E00B0
mov [rbx], rax
xor eax, eax
mov [rbx+0D8h], rax
mov rcx, 7FFFFFFFFFFFFFFFh
mov [rbx+0E0h], rcx
lea rcx, [rbx+0F8h]
mov [rbx+0E8h], rcx
mov [rbx+0F0h], rax
mov byte ptr [rbx+0F8h], 0
mov [rbx+108h], rax
add rsp, 28h
pop rbx
pop r14
retn
mov rbx, rax
mov rdi, [rsp+arg_0]; void *
cmp rdi, r14
jz short loc_37384
mov rsi, [rsp+arg_10]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_37384:
mov rdi, rbx
call __Unwind_Resume
| long long cli::integer::integer(long long a1, long long a2)
{
_OWORD *v2; // rcx
long long result; // rax
void *v4; // [rsp+0h] [rbp-38h]
_OWORD *v5; // [rsp+8h] [rbp-30h]
_OWORD *v6; // [rsp+8h] [rbp-30h]
long long v7; // [rsp+10h] [rbp-28h]
_OWORD v8[2]; // [rsp+18h] [rbp-20h] BYREF
v5 = v8;
v2 = (_OWORD *)(a2 + 16);
if ( *(_QWORD *)a2 == a2 + 16 )
{
v8[0] = *v2;
}
else
{
v5 = *(_OWORD **)a2;
*(_QWORD *)&v8[0] = *(_QWORD *)v2;
}
v7 = *(_QWORD *)(a2 + 8);
*(_QWORD *)a2 = v2;
*(_QWORD *)(a2 + 8) = 0LL;
*(_BYTE *)(a2 + 16) = 0;
cli::value_base<cli::integer>::value_base(a1, v4, (int)v5, v7);
if ( v6 != v8 )
operator delete(v6, *(_QWORD *)&v8[0] + 1LL);
*(_QWORD *)a1 = off_E00B0;
result = 0LL;
*(_QWORD *)(a1 + 216) = 0LL;
*(_QWORD *)(a1 + 224) = 0x7FFFFFFFFFFFFFFFLL;
*(_QWORD *)(a1 + 232) = a1 + 248;
*(_QWORD *)(a1 + 240) = 0LL;
*(_BYTE *)(a1 + 248) = 0;
*(_QWORD *)(a1 + 264) = 0LL;
return result;
}
| integer:
PUSH R14
PUSH RBX
SUB RSP,0x28
MOV RBX,RDI
LEA R14,[RSP + 0x18]
MOV qword ptr [R14 + -0x10],R14
MOV RAX,qword ptr [RSI]
LEA RCX,[RSI + 0x10]
CMP RAX,RCX
JZ 0x001372d6
MOV qword ptr [RSP + 0x8],RAX
MOV RAX,qword ptr [RCX]
MOV qword ptr [RSP + 0x18],RAX
JMP 0x001372dd
LAB_001372d6:
MOVUPS XMM0,xmmword ptr [RCX]
MOVUPS xmmword ptr [R14],XMM0
LAB_001372dd:
MOV RDX,qword ptr [RSI + 0x8]
LEA RAX,[RSP + 0x8]
MOV qword ptr [RAX + 0x8],RDX
MOV qword ptr [RSI],RCX
MOV qword ptr [RSI + 0x8],0x0
MOV byte ptr [RSI + 0x10],0x0
LAB_001372f9:
MOV RDI,RBX
MOV RSI,RAX
CALL 0x0014cc3e
LAB_00137304:
MOV RDI,qword ptr [RSP + 0x8]
CMP RDI,R14
JZ 0x0013731b
MOV RSI,qword ptr [RSP + 0x18]
INC RSI
CALL 0x0010f470
LAB_0013731b:
LEA RAX,[0x1e00b0]
MOV qword ptr [RBX],RAX
XOR EAX,EAX
MOV qword ptr [RBX + 0xd8],RAX
MOV RCX,0x7fffffffffffffff
MOV qword ptr [RBX + 0xe0],RCX
LEA RCX,[RBX + 0xf8]
MOV qword ptr [RBX + 0xe8],RCX
MOV qword ptr [RBX + 0xf0],RAX
MOV byte ptr [RBX + 0xf8],0x0
MOV qword ptr [RBX + 0x108],RAX
ADD RSP,0x28
POP RBX
POP R14
RET
|
/* cli::integer::integer(std::__cxx11::string) */
void __thiscall cli::integer::integer(integer *this,long *param_2)
{
long *plVar1;
long *local_30;
long local_28;
long local_20;
int4 uStack_18;
int4 uStack_14;
plVar1 = param_2 + 2;
if ((long *)*param_2 == plVar1) {
local_20 = *plVar1;
uStack_18 = (int4)param_2[3];
uStack_14 = *(int4 *)((long)param_2 + 0x1c);
local_30 = &local_20;
}
else {
local_20 = *plVar1;
local_30 = (long *)*param_2;
}
local_28 = param_2[1];
*param_2 = (long)plVar1;
param_2[1] = 0;
*(int1 *)(param_2 + 2) = 0;
/* try { // try from 001372f9 to 00137303 has its CatchHandler @ 0013736a */
value_base<cli::integer>::value_base((value_base<cli::integer> *)this,&local_30);
if (local_30 != &local_20) {
operator_delete(local_30,local_20 + 1);
}
*(int ***)this = &PTR__integer_001e00b0;
*(int8 *)(this + 0xd8) = 0;
*(int8 *)(this + 0xe0) = 0x7fffffffffffffff;
*(integer **)(this + 0xe8) = this + 0xf8;
*(int8 *)(this + 0xf0) = 0;
this[0xf8] = (integer)0x0;
*(int8 *)(this + 0x108) = 0;
return;
}
| |
47,829 | cli::group cli::matchable_derived<cli::option>::operator&<cli::value>(cli::matchable_derived<cli::value> const&) | msxemulator/build_O3/_deps/picotool-src/cli.h | group matchable_derived<D>::operator&(const matchable_derived<T> &m) {
int _min = matchable::min();
int _max = matchable::max();
min(1);
max(1);
return group{this->to_ptr(), m.to_ptr()}.set_type(group::sequence).min(_min).max(_max);
} | O3 | c | cli::group cli::matchable_derived<cli::option>::operator&<cli::value>(cli::matchable_derived<cli::value> const&):
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x130, %rsp # imm = 0x130
movq %rdx, %r14
movq %rdi, %rbx
movsd 0x88(%rsi), %xmm0
movaps %xmm0, 0x20(%rsp)
movabsq $0x100000001, %rax # imm = 0x100000001
movq %rax, 0x88(%rsi)
leaq 0x10(%rsp), %rdi
callq 0x511f0
movq %rsp, %rdi
movq %r14, %rsi
callq 0x58108
leaq 0x30(%rsp), %rdi
leaq 0x10(%rsp), %rsi
movq %rsp, %rdx
xorl %eax, %eax
callq 0x51368
leaq 0x30(%rsp), %r14
movl $0x0, 0xd8(%r14)
movaps 0x20(%rsp), %xmm0
movlps %xmm0, 0x88(%r14)
movq %rbx, %rdi
movq %r14, %rsi
callq 0x4e7de
leaq 0x88696(%rip), %r13 # 0xe02e0
movq %r13, (%rbx)
leaq 0xb8(%rbx), %r15
leaq 0xc8(%rbx), %r12
movq %r12, 0xb8(%rbx)
movq 0xe8(%rsp), %rsi
movq 0xf0(%rsp), %rdx
addq %rsi, %rdx
movq %r15, %rdi
callq 0x1d410
movl 0x108(%rsp), %eax
movl %eax, 0xd8(%rbx)
movl $0xe0, %eax
leaq (%rbx,%rax), %rdi
addq %rax, %r14
movq %r14, %rsi
callq 0x4dd34
leaq 0xf8(%rsp), %r15
movb 0x30(%r15), %al
movb %al, 0xf8(%rbx)
movq %r13, -0xc8(%r15)
movq %r14, %rdi
callq 0x507fc
movq -0x10(%r15), %rdi
cmpq %r15, %rdi
je 0x57cd8
movq 0xf8(%rsp), %rsi
incq %rsi
callq 0xf470
leaq 0x30(%rsp), %rdi
callq 0x5872e
movq 0x8(%rsp), %rdi
testq %rdi, %rdi
je 0x57cf1
callq 0x4bd0a
movq 0x18(%rsp), %rdi
testq %rdi, %rdi
je 0x57d00
callq 0x4bd0a
movq %rbx, %rax
addq $0x130, %rsp # imm = 0x130
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
movq %rax, %r14
movq (%r15), %rdi
cmpq %r12, %rdi
je 0x57d30
movq (%r12), %rsi
incq %rsi
callq 0xf470
jmp 0x57d30
movq %rax, %r14
movq %rbx, %rdi
callq 0x5872e
jmp 0x57d3d
movq %rax, %r14
leaq 0x30(%rsp), %rdi
callq 0x37e6e
jmp 0x57d4c
movq %rax, %r14
movq 0x8(%rsp), %rdi
testq %rdi, %rdi
je 0x57d60
callq 0x4bd0a
jmp 0x57d60
movq %rax, %r14
movq 0x18(%rsp), %rdi
testq %rdi, %rdi
je 0x57d6f
callq 0x4bd0a
movq %r14, %rdi
callq 0xf7d0
nop
| _ZN3cli17matchable_derivedINS_6optionEEanINS_3hexEEENS_5groupERKNS0_IT_EE:
push r15
push r14
push r13
push r12
push rbx
sub rsp, 130h
mov r14, rdx
mov rbx, rdi
movsd xmm0, qword ptr [rsi+88h]
movaps [rsp+158h+var_138], xmm0
mov rax, 100000001h
mov [rsi+88h], rax
lea rdi, [rsp+158h+var_148]
call _ZNK3cli17matchable_derivedINS_6optionEE6to_ptrEv; cli::matchable_derived<cli::option>::to_ptr(void)
mov rdi, rsp
mov rsi, r14
call _ZNK3cli17matchable_derivedINS_3hexEE6to_ptrEv; cli::matchable_derived<cli::hex>::to_ptr(void)
lea rdi, [rsp+158h+var_128]
lea rsi, [rsp+158h+var_148]
mov rdx, rsp
xor eax, eax
call _ZN3cli5groupC2ISt10shared_ptrINS_9matchableEEJEEET_S5_z; cli::group::group<std::shared_ptr<cli::matchable>>(std::shared_ptr<cli::matchable>,std::shared_ptr<cli::matchable>,...)
lea r14, [rsp+158h+var_128]
mov dword ptr [r14+0D8h], 0
movaps xmm0, [rsp+158h+var_138]
movlps qword ptr [r14+88h], xmm0
mov rdi, rbx; this
mov rsi, r14; cli::matchable *
call _ZN3cli9matchableC2ERKS0_; cli::matchable::matchable(cli::matchable const&)
lea r13, off_E02E0
mov [rbx], r13
lea r15, [rbx+0B8h]
lea r12, [rbx+0C8h]
mov [rbx+0B8h], r12
mov rsi, [rsp+158h+var_70]
mov rdx, [rsp+158h+var_68]
add rdx, rsi
mov rdi, r15
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPcEEvT_S7_St20forward_iterator_tag; std::string::_M_construct<char *>(char *,char *,std::forward_iterator_tag)
mov eax, [rsp+158h+var_50]
mov [rbx+0D8h], eax
mov eax, 0E0h
lea rdi, [rbx+rax]
add r14, rax
mov rsi, r14
call _ZNSt6vectorISt10shared_ptrIN3cli9matchableEESaIS3_EEC2ERKS5_; std::vector<std::shared_ptr<cli::matchable>>::vector(std::vector<std::shared_ptr<cli::matchable>> const&)
lea r15, [rsp+158h+var_60]
mov al, [r15+30h]
mov [rbx+0F8h], al
mov [r15-0C8h], r13
mov rdi, r14
call _ZNSt6vectorISt10shared_ptrIN3cli9matchableEESaIS3_EED2Ev; std::vector<std::shared_ptr<cli::matchable>>::~vector()
mov rdi, [r15-10h]; void *
cmp rdi, r15
jz short loc_57CD8
mov rsi, [rsp+158h+var_60]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_57CD8:
lea rdi, [rsp+158h+var_128]; this
call _ZN3cli9matchableD2Ev; cli::matchable::~matchable()
mov rdi, [rsp+158h+var_150]
test rdi, rdi
jz short loc_57CF1
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_57CF1:
mov rdi, [rsp+158h+var_140]
test rdi, rdi
jz short loc_57D00
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_57D00:
mov rax, rbx
add rsp, 130h
pop rbx
pop r12
pop r13
pop r14
pop r15
retn
mov r14, rax
mov rdi, [r15]; void *
cmp rdi, r12
jz short loc_57D30
mov rsi, [r12]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_57D30
mov r14, rax
loc_57D30:
mov rdi, rbx; this
call _ZN3cli9matchableD2Ev; cli::matchable::~matchable()
jmp short loc_57D3D
mov r14, rax
loc_57D3D:
lea rdi, [rsp+arg_28]; void *
call _ZN3cli5groupD2Ev; cli::group::~group()
jmp short loc_57D4C
mov r14, rax
loc_57D4C:
mov rdi, [rsp+arg_0]
test rdi, rdi
jz short loc_57D60
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
jmp short loc_57D60
mov r14, rax
loc_57D60:
mov rdi, [rsp+arg_10]
test rdi, rdi
jz short loc_57D6F
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_57D6F:
mov rdi, r14
call __Unwind_Resume
| cli::matchable * cli::matchable_derived<cli::option>::operator&<cli::hex>(
cli::matchable *this,
long long a2,
long long a3)
{
long long v5; // [rsp+0h] [rbp-158h] BYREF
volatile signed __int32 *v6; // [rsp+8h] [rbp-150h]
cli::matchable *v7; // [rsp+10h] [rbp-148h] BYREF
volatile signed __int32 *v8; // [rsp+18h] [rbp-140h]
__m128 v9; // [rsp+20h] [rbp-138h]
_QWORD v10[17]; // [rsp+30h] [rbp-128h] BYREF
double v11; // [rsp+B8h] [rbp-A0h] BYREF
long long *v12; // [rsp+E8h] [rbp-70h]
long long v13; // [rsp+F0h] [rbp-68h]
long long v14; // [rsp+F8h] [rbp-60h] BYREF
int v15; // [rsp+108h] [rbp-50h]
_QWORD v16[3]; // [rsp+110h] [rbp-48h] BYREF
char v17; // [rsp+128h] [rbp-30h]
v9 = (__m128)*(unsigned long long *)(a2 + 136);
*(_QWORD *)(a2 + 136) = 0x100000001LL;
cli::matchable_derived<cli::option>::to_ptr(&v7, a2);
cli::matchable_derived<cli::hex>::to_ptr(&v5, a3);
cli::group::group<std::shared_ptr<cli::matchable>>((long long)v10, &v7, &v5);
v15 = 0;
_mm_storel_ps(&v11, v9);
cli::matchable::matchable(this, (const cli::matchable *)v10);
*(_QWORD *)this = off_E02E0;
*((_QWORD *)this + 23) = (char *)this + 200;
std::string::_M_construct<char *>((long long)this + 184, v12, (long long)v12 + v13);
*((_DWORD *)this + 54) = v15;
std::vector<std::shared_ptr<cli::matchable>>::vector((long long)this + 224, v16);
*((_BYTE *)this + 248) = v17;
v10[0] = off_E02E0;
std::vector<std::shared_ptr<cli::matchable>>::~vector((long long)v16);
if ( v12 != &v14 )
operator delete(v12, v14 + 1);
cli::matchable::~matchable((cli::matchable *)v10);
if ( v6 )
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v6);
if ( v8 )
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v8);
return this;
}
| operator&:
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x130
MOV R14,RDX
MOV RBX,RDI
MOVSD XMM0,qword ptr [RSI + 0x88]
MOVAPS xmmword ptr [RSP + 0x20],XMM0
MOV RAX,0x100000001
MOV qword ptr [RSI + 0x88],RAX
LEA RDI,[RSP + 0x10]
CALL 0x001511f0
LAB_00157bfc:
MOV RDI,RSP
MOV RSI,R14
CALL 0x00158108
LAB_00157c07:
LEA RDI,[RSP + 0x30]
LEA RSI,[RSP + 0x10]
MOV RDX,RSP
XOR EAX,EAX
CALL 0x00151368
LEA R14,[RSP + 0x30]
MOV dword ptr [R14 + 0xd8],0x0
MOVAPS XMM0,xmmword ptr [RSP + 0x20]
MOVLPS qword ptr [R14 + 0x88],XMM0
LAB_00157c38:
MOV RDI,RBX
MOV RSI,R14
CALL 0x0014e7de
LEA R13,[0x1e02e0]
MOV qword ptr [RBX],R13
LEA R15,[RBX + 0xb8]
LEA R12,[RBX + 0xc8]
MOV qword ptr [RBX + 0xb8],R12
MOV RSI,qword ptr [RSP + 0xe8]
MOV RDX,qword ptr [RSP + 0xf0]
ADD RDX,RSI
LAB_00157c75:
MOV RDI,R15
CALL 0x0011d410
MOV EAX,dword ptr [RSP + 0x108]
MOV dword ptr [RBX + 0xd8],EAX
MOV EAX,0xe0
LEA RDI,[RBX + RAX*0x1]
ADD R14,RAX
LAB_00157c96:
MOV RSI,R14
CALL 0x0014dd34
LAB_00157c9e:
LEA R15,[RSP + 0xf8]
MOV AL,byte ptr [R15 + 0x30]
MOV byte ptr [RBX + 0xf8],AL
MOV qword ptr [R15 + -0xc8],R13
MOV RDI,R14
CALL 0x001507fc
MOV RDI,qword ptr [R15 + -0x10]
CMP RDI,R15
JZ 0x00157cd8
MOV RSI,qword ptr [RSP + 0xf8]
INC RSI
CALL 0x0010f470
LAB_00157cd8:
LEA RDI,[RSP + 0x30]
CALL 0x0015872e
MOV RDI,qword ptr [RSP + 0x8]
TEST RDI,RDI
JZ 0x00157cf1
CALL 0x0014bd0a
LAB_00157cf1:
MOV RDI,qword ptr [RSP + 0x18]
TEST RDI,RDI
JZ 0x00157d00
CALL 0x0014bd0a
LAB_00157d00:
MOV RAX,RBX
ADD RSP,0x130
POP RBX
POP R12
POP R13
POP R14
POP R15
RET
|
/* cli::group
cli::matchable_derived<cli::option>::TEMPNAMEPLACEHOLDERVALUE(cli::matchable_derived<cli::hex>
const&) */
matchable_derived<cli::option> * __thiscall
cli::matchable_derived<cli::option>::operator&
(matchable_derived<cli::option> *this,matchable_derived *param_1)
{
int1 auStack_158 [8];
_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *local_150;
int1 local_148 [8];
_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *local_140;
int8 local_138;
int8 uStack_130;
int **local_128 [17];
int8 local_a0;
long *local_70;
long local_68;
long local_60 [2];
int4 local_50;
vector<std::shared_ptr<cli::matchable>,std::allocator<std::shared_ptr<cli::matchable>>>
avStack_48 [24];
matchable_derived<cli::option> local_30;
local_138 = *(int8 *)(param_1 + 0x88);
uStack_130 = 0;
*(int8 *)(param_1 + 0x88) = 0x100000001;
to_ptr();
/* try { // try from 00157bfc to 00157c06 has its CatchHandler @ 00157d5d */
matchable_derived<cli::hex>::to_ptr();
/* try { // try from 00157c07 to 00157c1a has its CatchHandler @ 00157d49 */
group::group<std::shared_ptr<cli::matchable>>((group *)local_128,local_148,auStack_158);
local_50 = 0;
local_a0 = local_138;
/* try { // try from 00157c38 to 00157c42 has its CatchHandler @ 00157d3a */
matchable::matchable((matchable *)this,(matchable *)local_128);
*(int ***)this = &PTR__group_001e02e0;
*(matchable_derived<cli::option> **)(this + 0xb8) = this + 200;
/* try { // try from 00157c75 to 00157c7c has its CatchHandler @ 00157d2d */
std::__cxx11::string::_M_construct<char*>(this + 0xb8,local_70,local_68 + (long)local_70);
*(int4 *)(this + 0xd8) = local_50;
/* try { // try from 00157c96 to 00157c9d has its CatchHandler @ 00157d14 */
std::vector<std::shared_ptr<cli::matchable>,std::allocator<std::shared_ptr<cli::matchable>>>::
vector((vector<std::shared_ptr<cli::matchable>,std::allocator<std::shared_ptr<cli::matchable>>> *)
(this + 0xe0),avStack_48);
this[0xf8] = local_30;
local_128[0] = &PTR__group_001e02e0;
std::vector<std::shared_ptr<cli::matchable>,std::allocator<std::shared_ptr<cli::matchable>>>::
~vector(avStack_48);
if (local_70 != local_60) {
operator_delete(local_70,local_60[0] + 1);
}
matchable::~matchable((matchable *)local_128);
if (local_150 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) {
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(local_150);
}
if (local_140 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) {
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(local_140);
}
return this;
}
| |
47,830 | align_to_8(unsigned long, unsigned long&, unsigned char const*&) | eloqsql/mysys/crc32/crc32c_amd64.cc | static inline void align_to_8(
size_t len,
uint64_t& crc0, // crc so far, updated on return
const unsigned char*& next) { // next data pointer, updated on return
uint32_t crc32bit = static_cast<uint32_t>(crc0);
if (len & 0x04) {
crc32bit = _mm_crc32_u32(crc32bit, *(uint32_t*)next);
next += sizeof(uint32_t);
}
if (len & 0x02) {
crc32bit = _mm_crc32_u16(crc32bit, *(uint16_t*)next);
next += sizeof(uint16_t);
}
if (len & 0x01) {
crc32bit = _mm_crc32_u8(crc32bit, *(next));
next++;
}
crc0 = crc32bit;
} | O0 | cpp | align_to_8(unsigned long, unsigned long&, unsigned char const*&):
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x20(%rbp)
movq %rsi, -0x28(%rbp)
movq %rdx, -0x30(%rbp)
movq -0x28(%rbp), %rax
movq (%rax), %rax
movl %eax, -0x34(%rbp)
movq -0x20(%rbp), %rax
andq $0x4, %rax
cmpq $0x0, %rax
je 0x446a4
movl -0x34(%rbp), %ecx
movq -0x30(%rbp), %rax
movq (%rax), %rax
movl (%rax), %eax
movl %ecx, -0x14(%rbp)
movl %eax, -0x18(%rbp)
movl -0x14(%rbp), %eax
crc32l -0x18(%rbp), %eax
movl %eax, -0x34(%rbp)
movq -0x30(%rbp), %rax
movq (%rax), %rcx
addq $0x4, %rcx
movq %rcx, (%rax)
movq -0x20(%rbp), %rax
andq $0x2, %rax
cmpq $0x0, %rax
je 0x446e1
movl -0x34(%rbp), %ecx
movq -0x30(%rbp), %rax
movq (%rax), %rax
movw (%rax), %ax
movl %ecx, -0xc(%rbp)
movw %ax, -0xe(%rbp)
movl -0xc(%rbp), %eax
crc32w -0xe(%rbp), %eax
movl %eax, -0x34(%rbp)
movq -0x30(%rbp), %rax
movq (%rax), %rcx
addq $0x2, %rcx
movq %rcx, (%rax)
movq -0x20(%rbp), %rax
andq $0x1, %rax
cmpq $0x0, %rax
je 0x4471b
movl -0x34(%rbp), %ecx
movq -0x30(%rbp), %rax
movq (%rax), %rax
movb (%rax), %al
movl %ecx, -0x4(%rbp)
movb %al, -0x5(%rbp)
movl -0x4(%rbp), %eax
crc32b -0x5(%rbp), %eax
movl %eax, -0x34(%rbp)
movq -0x30(%rbp), %rax
movq (%rax), %rcx
addq $0x1, %rcx
movq %rcx, (%rax)
movl -0x34(%rbp), %eax
movl %eax, %ecx
movq -0x28(%rbp), %rax
movq %rcx, (%rax)
popq %rbp
retq
nopl (%rax)
| _ZL10align_to_8mRmRPKh:
push rbp
mov rbp, rsp
mov [rbp+var_20], rdi
mov [rbp+var_28], rsi
mov [rbp+var_30], rdx
mov rax, [rbp+var_28]
mov rax, [rax]
mov [rbp+var_34], eax
mov rax, [rbp+var_20]
and rax, 4
cmp rax, 0
jz short loc_446A4
mov ecx, [rbp+var_34]
mov rax, [rbp+var_30]
mov rax, [rax]
mov eax, [rax]
mov [rbp+var_14], ecx
mov [rbp+var_18], eax
mov eax, [rbp+var_14]
crc32 eax, [rbp+var_18]
mov [rbp+var_34], eax
mov rax, [rbp+var_30]
mov rcx, [rax]
add rcx, 4
mov [rax], rcx
loc_446A4:
mov rax, [rbp+var_20]
and rax, 2
cmp rax, 0
jz short loc_446E1
mov ecx, [rbp+var_34]
mov rax, [rbp+var_30]
mov rax, [rax]
mov ax, [rax]
mov [rbp+var_C], ecx
mov [rbp+var_E], ax
mov eax, [rbp+var_C]
crc32 eax, [rbp+var_E]
mov [rbp+var_34], eax
mov rax, [rbp+var_30]
mov rcx, [rax]
add rcx, 2
mov [rax], rcx
loc_446E1:
mov rax, [rbp+var_20]
and rax, 1
cmp rax, 0
jz short loc_4471B
mov ecx, [rbp+var_34]
mov rax, [rbp+var_30]
mov rax, [rax]
mov al, [rax]
mov [rbp+var_4], ecx
mov [rbp+var_5], al
mov eax, [rbp+var_4]
crc32 eax, [rbp+var_5]
mov [rbp+var_34], eax
mov rax, [rbp+var_30]
mov rcx, [rax]
add rcx, 1
mov [rax], rcx
loc_4471B:
mov eax, [rbp+var_34]
mov ecx, eax
mov rax, [rbp+var_28]
mov [rax], rcx
pop rbp
retn
| unsigned long long * align_to_8(char a1, unsigned long long *a2, unsigned int **a3)
{
unsigned long long *result; // rax
unsigned int v4; // [rsp+0h] [rbp-34h]
v4 = *a2;
if ( (a1 & 4) != 0 )
v4 = _mm_crc32_u32(v4, *(*a3)++);
if ( (a1 & 2) != 0 )
{
v4 = _mm_crc32_u16(v4, *(_WORD *)*a3);
*a3 = (unsigned int *)((char *)*a3 + 2);
}
if ( (a1 & 1) != 0 )
{
v4 = _mm_crc32_u8(v4, *(_BYTE *)*a3);
*a3 = (unsigned int *)((char *)*a3 + 1);
}
result = a2;
*a2 = v4;
return result;
}
| align_to_8:
PUSH RBP
MOV RBP,RSP
MOV qword ptr [RBP + -0x20],RDI
MOV qword ptr [RBP + -0x28],RSI
MOV qword ptr [RBP + -0x30],RDX
MOV RAX,qword ptr [RBP + -0x28]
MOV RAX,qword ptr [RAX]
MOV dword ptr [RBP + -0x34],EAX
MOV RAX,qword ptr [RBP + -0x20]
AND RAX,0x4
CMP RAX,0x0
JZ 0x001446a4
MOV ECX,dword ptr [RBP + -0x34]
MOV RAX,qword ptr [RBP + -0x30]
MOV RAX,qword ptr [RAX]
MOV EAX,dword ptr [RAX]
MOV dword ptr [RBP + -0x14],ECX
MOV dword ptr [RBP + -0x18],EAX
MOV EAX,dword ptr [RBP + -0x14]
CRC32 EAX,dword ptr [RBP + -0x18]
MOV dword ptr [RBP + -0x34],EAX
MOV RAX,qword ptr [RBP + -0x30]
MOV RCX,qword ptr [RAX]
ADD RCX,0x4
MOV qword ptr [RAX],RCX
LAB_001446a4:
MOV RAX,qword ptr [RBP + -0x20]
AND RAX,0x2
CMP RAX,0x0
JZ 0x001446e1
MOV ECX,dword ptr [RBP + -0x34]
MOV RAX,qword ptr [RBP + -0x30]
MOV RAX,qword ptr [RAX]
MOV AX,word ptr [RAX]
MOV dword ptr [RBP + -0xc],ECX
MOV word ptr [RBP + -0xe],AX
MOV EAX,dword ptr [RBP + -0xc]
CRC32 EAX,word ptr [RBP + -0xe]
MOV dword ptr [RBP + -0x34],EAX
MOV RAX,qword ptr [RBP + -0x30]
MOV RCX,qword ptr [RAX]
ADD RCX,0x2
MOV qword ptr [RAX],RCX
LAB_001446e1:
MOV RAX,qword ptr [RBP + -0x20]
AND RAX,0x1
CMP RAX,0x0
JZ 0x0014471b
MOV ECX,dword ptr [RBP + -0x34]
MOV RAX,qword ptr [RBP + -0x30]
MOV RAX,qword ptr [RAX]
MOV AL,byte ptr [RAX]
MOV dword ptr [RBP + -0x4],ECX
MOV byte ptr [RBP + -0x5],AL
MOV EAX,dword ptr [RBP + -0x4]
CRC32 EAX,byte ptr [RBP + -0x5]
MOV dword ptr [RBP + -0x34],EAX
MOV RAX,qword ptr [RBP + -0x30]
MOV RCX,qword ptr [RAX]
ADD RCX,0x1
MOV qword ptr [RAX],RCX
LAB_0014471b:
MOV EAX,dword ptr [RBP + -0x34]
MOV ECX,EAX
MOV RAX,qword ptr [RBP + -0x28]
MOV qword ptr [RAX],RCX
POP RBP
RET
|
/* align_to_8(unsigned long, unsigned long&, unsigned char const*&) */
void align_to_8(ulong param_1,ulong *param_2,uchar **param_3)
{
uint local_3c;
local_3c = (uint)*param_2;
if ((param_1 & 4) != 0) {
local_3c = crc32(local_3c,*(int4 *)*param_3);
*param_3 = *param_3 + 4;
}
if ((param_1 & 2) != 0) {
local_3c = crc32(local_3c,*(int2 *)*param_3);
*param_3 = *param_3 + 2;
}
if ((param_1 & 1) != 0) {
local_3c = crc32(local_3c,**param_3);
*param_3 = *param_3 + 1;
}
*param_2 = (ulong)local_3c;
return;
}
| |
47,831 | my_interval_timer | eloqsql/mysys/my_getsystime.c | ulonglong my_interval_timer()
{
#ifdef HAVE_CLOCK_GETTIME
struct timespec tp;
clock_gettime(CLOCK_MONOTONIC, &tp);
return tp.tv_sec*1000000000ULL+tp.tv_nsec;
#elif defined(HAVE_GETHRTIME)
return gethrtime();
#elif defined(_WIN32)
DBUG_ASSERT(query_performance_frequency);
LARGE_INTEGER t_cnt;
QueryPerformanceCounter(&t_cnt);
return (t_cnt.QuadPart / query_performance_frequency * 1000000000ULL) +
((t_cnt.QuadPart % query_performance_frequency) * 1000000000ULL /
query_performance_frequency);
#else
/* TODO: check for other possibilities for hi-res timestamping */
struct timeval tv;
gettimeofday(&tv,NULL);
return tv.tv_sec*1000000000ULL+tv.tv_usec*1000ULL;
#endif
} | O0 | c | my_interval_timer:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movl $0x1, %edi
leaq -0x10(%rbp), %rsi
callq 0x25330
imulq $0x3b9aca00, -0x10(%rbp), %rax # imm = 0x3B9ACA00
addq -0x8(%rbp), %rax
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax,%rax)
| my_interval_timer:
push rbp
mov rbp, rsp
sub rsp, 10h
mov edi, 1
lea rsi, [rbp+var_10]
call _clock_gettime
imul rax, [rbp+var_10], 3B9ACA00h
add rax, [rbp+var_8]
add rsp, 10h
pop rbp
retn
| long long my_interval_timer()
{
_QWORD v1[2]; // [rsp+0h] [rbp-10h] BYREF
clock_gettime(1LL, v1);
return v1[1] + 1000000000LL * v1[0];
}
| my_interval_timer:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x10
MOV EDI,0x1
LEA RSI,[RBP + -0x10]
CALL 0x00125330
IMUL RAX,qword ptr [RBP + -0x10],0x3b9aca00
ADD RAX,qword ptr [RBP + -0x8]
ADD RSP,0x10
POP RBP
RET
|
long my_interval_timer(void)
{
timespec local_18;
clock_gettime(1,&local_18);
return local_18.tv_sec * 1000000000 + local_18.tv_nsec;
}
| |
47,832 | aimrt::util::SimpleBufferArrayAllocator::Reserve(aimrt_buffer_array_t*, unsigned long) | aimrt_mujoco_sim/_deps/aimrt-src/src/interface/aimrt_core_plugin_interface/../aimrt_module_cpp_interface/util/buffer_array_allocator.h | static bool Reserve(aimrt_buffer_array_t* buffer_array, size_t new_cap) {
aimrt_buffer_t* cur_data = buffer_array->data;
buffer_array->data = new aimrt_buffer_t[new_cap];
buffer_array->capacity = new_cap;
if (cur_data) {
memcpy(buffer_array->data, cur_data, buffer_array->len * sizeof(aimrt_buffer_t));
delete[] cur_data;
}
return true;
} | O3 | c | aimrt::util::SimpleBufferArrayAllocator::Reserve(aimrt_buffer_array_t*, unsigned long):
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %r15
movq %rdi, %r14
movq (%rdi), %rbx
movq %rsi, %rax
shrq $0x3c, %rax
movq %rsi, %rcx
shlq $0x4, %rcx
xorl %edi, %edi
negq %rax
sbbq %rdi, %rdi
orq %rcx, %rdi
callq 0x900d0
movq %rax, (%r14)
movq %r15, 0x10(%r14)
testq %rbx, %rbx
je 0xcb629
movq 0x8(%r14), %rdx
shlq $0x4, %rdx
movq %rax, %rdi
movq %rbx, %rsi
callq 0x91f00
movq %rbx, %rdi
callq 0x930f0
movb $0x1, %al
popq %rbx
popq %r14
popq %r15
retq
nop
| _ZN5aimrt4util26SimpleBufferArrayAllocator7ReserveEP20aimrt_buffer_array_tm:
push r15
push r14
push rbx
mov r15, rsi
mov r14, rdi
mov rbx, [rdi]
mov rax, rsi
shr rax, 3Ch
mov rcx, rsi
shl rcx, 4
xor edi, edi
neg rax
sbb rdi, rdi
or rdi, rcx; unsigned __int64
call __Znam; operator new[](ulong)
mov [r14], rax
mov [r14+10h], r15
test rbx, rbx
jz short loc_CB629
mov rdx, [r14+8]
shl rdx, 4
mov rdi, rax
mov rsi, rbx
call _memcpy
mov rdi, rbx; void *
call __ZdaPv; operator delete[](void *)
loc_CB629:
mov al, 1
pop rbx
pop r14
pop r15
retn
| char aimrt::util::SimpleBufferArrayAllocator::Reserve(long long a1, long long a2)
{
void *v2; // rbx
long long v3; // rax
v2 = *(void **)a1;
v3 = operator new[](16 * a2);
*(_QWORD *)a1 = v3;
*(_QWORD *)(a1 + 16) = a2;
if ( v2 )
{
memcpy(v3);
operator delete[](v2);
}
return 1;
}
| Reserve:
PUSH R15
PUSH R14
PUSH RBX
MOV R15,RSI
MOV R14,RDI
MOV RBX,qword ptr [RDI]
MOV RAX,RSI
SHR RAX,0x3c
MOV RCX,RSI
SHL RCX,0x4
XOR EDI,EDI
NEG RAX
SBB RDI,RDI
OR RDI,RCX
CALL 0x001900d0
MOV qword ptr [R14],RAX
MOV qword ptr [R14 + 0x10],R15
TEST RBX,RBX
JZ 0x001cb629
MOV RDX,qword ptr [R14 + 0x8]
SHL RDX,0x4
MOV RDI,RAX
MOV RSI,RBX
CALL 0x00191f00
MOV RDI,RBX
CALL 0x001930f0
LAB_001cb629:
MOV AL,0x1
POP RBX
POP R14
POP R15
RET
|
/* aimrt::util::SimpleBufferArrayAllocator::Reserve(aimrt_buffer_array_t*, unsigned long) */
int8
aimrt::util::SimpleBufferArrayAllocator::Reserve(aimrt_buffer_array_t *param_1,ulong param_2)
{
void *__src;
void *__dest;
__src = *(void **)param_1;
__dest = operator_new__(-(ulong)(param_2 >> 0x3c != 0) | param_2 << 4);
*(void **)param_1 = __dest;
*(ulong *)(param_1 + 0x10) = param_2;
if (__src != (void *)0x0) {
memcpy(__dest,__src,*(long *)(param_1 + 8) << 4);
operator_delete__(__src);
}
return 1;
}
| |
47,833 | nlohmann::json_abi_v3_11_3::basic_json<std::map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>::cend() const | 11AgReS1SoR11[P]Graph/Common/FiguresStorage/src/json.hpp | const_iterator cend() const noexcept
{
const_iterator result(this);
result.set_end();
return result;
} | O1 | cpp | nlohmann::json_abi_v3_11_3::basic_json<std::map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>::cend() const:
pushq %rbx
movq %rdi, %rbx
movabsq $-0x8000000000000000, %rax # imm = 0x8000000000000000
movq %rsi, (%rdi)
xorps %xmm0, %xmm0
movups %xmm0, 0x8(%rdi)
movq %rax, 0x18(%rdi)
movzbl (%rsi), %ecx
cmpl $0x2, %ecx
je 0x16d7e
cmpl $0x1, %ecx
jne 0x16d88
leaq 0x8(%rbx), %rax
movq $0x0, (%rax)
jmp 0x16d8c
movq $0x0, 0x10(%rbx)
jmp 0x16d8c
movq %rax, 0x18(%rbx)
movq %rbx, %rdi
callq 0x11450
movq %rbx, %rax
popq %rbx
retq
nop
| _ZNK8nlohmann16json_abi_v3_11_310basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4cendEv:
push rbx
mov rbx, rdi
mov rax, 8000000000000000h
mov [rdi], rsi
xorps xmm0, xmm0
movups xmmword ptr [rdi+8], xmm0
mov [rdi+18h], rax
movzx ecx, byte ptr [rsi]
cmp ecx, 2
jz short loc_16D7E
cmp ecx, 1
jnz short loc_16D88
lea rax, [rbx+8]
mov qword ptr [rax], 0
jmp short loc_16D8C
loc_16D7E:
mov qword ptr [rbx+10h], 0
jmp short loc_16D8C
loc_16D88:
mov [rbx+18h], rax
loc_16D8C:
mov rdi, rbx
call __ZN8nlohmann16json_abi_v3_11_36detail9iter_implIKNS0_10basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEE7set_endEv; nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const>::set_end(void)
mov rax, rbx
pop rbx
retn
| long long nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::cend(
long long a1,
unsigned __int8 *a2)
{
int v2; // ecx
*(_QWORD *)a1 = a2;
*(_OWORD *)(a1 + 8) = 0LL;
*(_QWORD *)(a1 + 24) = 0x8000000000000000LL;
v2 = *a2;
if ( v2 == 2 )
{
*(_QWORD *)(a1 + 16) = 0LL;
}
else if ( v2 == 1 )
{
*(_QWORD *)(a1 + 8) = 0LL;
}
else
{
*(_QWORD *)(a1 + 24) = 0x8000000000000000LL;
}
nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> const>::set_end(a1);
return a1;
}
| cend:
PUSH RBX
MOV RBX,RDI
MOV RAX,-0x8000000000000000
MOV qword ptr [RDI],RSI
XORPS XMM0,XMM0
MOVUPS xmmword ptr [RDI + 0x8],XMM0
MOV qword ptr [RDI + 0x18],RAX
MOVZX ECX,byte ptr [RSI]
CMP ECX,0x2
JZ 0x00116d7e
CMP ECX,0x1
JNZ 0x00116d88
LEA RAX,[RBX + 0x8]
MOV qword ptr [RAX],0x0
JMP 0x00116d8c
LAB_00116d7e:
MOV qword ptr [RBX + 0x10],0x0
JMP 0x00116d8c
LAB_00116d88:
MOV qword ptr [RBX + 0x18],RAX
LAB_00116d8c:
MOV RDI,RBX
CALL 0x00111450
MOV RAX,RBX
POP RBX
RET
|
/* nlohmann::json_abi_v3_11_3::basic_json<std::map, std::vector, std::__cxx11::string, bool, long,
unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer,
std::vector<unsigned char, std::allocator<unsigned char> >, void>::cend() const */
void nlohmann::json_abi_v3_11_3::
basic_json<std::map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::cend(void)
{
char *in_RSI;
iter_impl<nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const>
*in_RDI;
*(char **)in_RDI = in_RSI;
*(int8 *)(in_RDI + 8) = 0;
*(int8 *)(in_RDI + 0x10) = 0;
*(int8 *)(in_RDI + 0x18) = 0x8000000000000000;
if (*in_RSI == '\x02') {
*(int8 *)(in_RDI + 0x10) = 0;
}
else if (*in_RSI == '\x01') {
*(int8 *)(in_RDI + 8) = 0;
}
else {
*(int8 *)(in_RDI + 0x18) = 0x8000000000000000;
}
detail::
iter_impl<nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const>
::set_end(in_RDI);
return;
}
| |
47,834 | lunasvg::LengthContext::viewportDimension(lunasvg::LengthDirection) const | dmazzella[P]pylunasvg/lunasvg/source/svgproperty.cpp | float LengthContext::viewportDimension(LengthDirection direction) const
{
auto viewportSize = m_element->currentViewportSize();
switch(direction) {
case LengthDirection::Horizontal:
return viewportSize.w;
case LengthDirection::Vertical:
return viewportSize.h;
default:
return std::sqrt(viewportSize.w * viewportSize.w + viewportSize.h * viewportSize.h) / PLUTOVG_SQRT2;
}
} | O1 | cpp | lunasvg::LengthContext::viewportDimension(lunasvg::LengthDirection) const:
pushq %rbx
movl %esi, %ebx
movq (%rdi), %rdi
callq 0xfc30
cmpl $0x1, %ebx
je 0x1f8da
testl %ebx, %ebx
je 0x1f8ed
movaps %xmm0, %xmm1
mulps %xmm0, %xmm1
shufps $0x55, %xmm1, %xmm1 # xmm1 = xmm1[1,1,1,1]
mulss %xmm0, %xmm0
addss %xmm1, %xmm0
xorps %xmm1, %xmm1
ucomiss %xmm1, %xmm0
jb 0x1f8e0
sqrtss %xmm0, %xmm0
jmp 0x1f8e5
shufps $0x55, %xmm0, %xmm0 # xmm0 = xmm0[1,1,1,1]
jmp 0x1f8ed
callq 0xa5e0
divss 0x23f63(%rip), %xmm0 # 0x43850
popq %rbx
retq
nop
| _ZNK7lunasvg13LengthContext17viewportDimensionENS_15LengthDirectionE:
push rbx
mov ebx, esi
mov rdi, [rdi]; this
call _ZNK7lunasvg10SVGElement19currentViewportSizeEv; lunasvg::SVGElement::currentViewportSize(void)
cmp ebx, 1
jz short loc_1F8DA
test ebx, ebx
jz short loc_1F8ED
movaps xmm1, xmm0
mulps xmm1, xmm0
shufps xmm1, xmm1, 55h ; 'U'
mulss xmm0, xmm0
addss xmm0, xmm1
xorps xmm1, xmm1
ucomiss xmm0, xmm1
jb short loc_1F8E0
sqrtss xmm0, xmm0
jmp short loc_1F8E5
loc_1F8DA:
shufps xmm0, xmm0, 55h ; 'U'
jmp short loc_1F8ED
loc_1F8E0:
call _sqrtf
loc_1F8E5:
divss xmm0, cs:dword_43850
loc_1F8ED:
pop rbx
retn
| float lunasvg::LengthContext::viewportDimension(lunasvg::SVGElement **a1, int a2, __m128 a3)
{
__m128 v3; // xmm0
__m128 v4; // xmm1
float v5; // xmm0_4
float v6; // xmm0_4
v3 = lunasvg::SVGElement::currentViewportSize(*a1, a3);
if ( a2 == 1 )
{
v3.m128_i32[0] = _mm_shuffle_ps(v3, v3, 85).m128_u32[0];
}
else if ( a2 )
{
v4 = _mm_mul_ps(v3, v3);
v5 = (float)(v3.m128_f32[0] * v3.m128_f32[0]) + _mm_shuffle_ps(v4, v4, 85).m128_f32[0];
if ( v5 < 0.0 )
v6 = sqrtf();
else
v6 = fsqrt(v5);
v3.m128_f32[0] = v6 / 1.4142135;
}
return v3.m128_f32[0];
}
| viewportDimension:
PUSH RBX
MOV EBX,ESI
MOV RDI,qword ptr [RDI]
CALL 0x0010fc30
CMP EBX,0x1
JZ 0x0011f8da
TEST EBX,EBX
JZ 0x0011f8ed
MOVAPS XMM1,XMM0
MULPS XMM1,XMM0
SHUFPS XMM1,XMM1,0x55
MULSS XMM0,XMM0
ADDSS XMM0,XMM1
XORPS XMM1,XMM1
UCOMISS XMM0,XMM1
JC 0x0011f8e0
SQRTSS XMM0,XMM0
JMP 0x0011f8e5
LAB_0011f8da:
SHUFPS XMM0,XMM0,0x55
JMP 0x0011f8ed
LAB_0011f8e0:
CALL 0x0010a5e0
LAB_0011f8e5:
DIVSS XMM0,dword ptr [0x00143850]
LAB_0011f8ed:
POP RBX
RET
|
/* lunasvg::LengthContext::viewportDimension(lunasvg::LengthDirection) const */
float __thiscall lunasvg::LengthContext::viewportDimension(LengthContext *this,int param_2)
{
float fVar1;
float fVar2;
float fVar4;
int8 uVar3;
uVar3 = SVGElement::currentViewportSize(*(SVGElement **)this);
fVar4 = (float)((ulong)uVar3 >> 0x20);
fVar1 = (float)uVar3;
fVar2 = fVar4;
if ((param_2 != 1) && (fVar2 = fVar1, param_2 != 0)) {
fVar2 = fVar1 * fVar1 + fVar4 * fVar4;
if (fVar2 < 0.0) {
fVar2 = sqrtf(fVar2);
}
else {
fVar2 = SQRT(fVar2);
}
fVar2 = fVar2 / DAT_00143850;
}
return fVar2;
}
| |
47,835 | lunasvg::LengthContext::viewportDimension(lunasvg::LengthDirection) const | dmazzella[P]pylunasvg/lunasvg/source/svgproperty.cpp | float LengthContext::viewportDimension(LengthDirection direction) const
{
auto viewportSize = m_element->currentViewportSize();
switch(direction) {
case LengthDirection::Horizontal:
return viewportSize.w;
case LengthDirection::Vertical:
return viewportSize.h;
default:
return std::sqrt(viewportSize.w * viewportSize.w + viewportSize.h * viewportSize.h) / PLUTOVG_SQRT2;
}
} | O2 | cpp | lunasvg::LengthContext::viewportDimension(lunasvg::LengthDirection) const:
pushq %rbx
movl %esi, %ebx
movq (%rdi), %rdi
callq 0xef44
cmpl $0x1, %ebx
je 0x1c580
testl %ebx, %ebx
je 0x1c584
movaps %xmm0, %xmm1
mulps %xmm0, %xmm1
shufps $0x55, %xmm1, %xmm1 # xmm1 = xmm1[1,1,1,1]
mulss %xmm0, %xmm0
addss %xmm1, %xmm0
sqrtss %xmm0, %xmm0
divss 0x1ea42(%rip), %xmm0 # 0x3afc0
jmp 0x1c584
shufps $0x55, %xmm0, %xmm0 # xmm0 = xmm0[1,1,1,1]
popq %rbx
retq
| _ZNK7lunasvg13LengthContext17viewportDimensionENS_15LengthDirectionE:
push rbx
mov ebx, esi
mov rdi, [rdi]; this
call _ZNK7lunasvg10SVGElement19currentViewportSizeEv; lunasvg::SVGElement::currentViewportSize(void)
cmp ebx, 1
jz short loc_1C580
test ebx, ebx
jz short loc_1C584
movaps xmm1, xmm0
mulps xmm1, xmm0
shufps xmm1, xmm1, 55h ; 'U'
mulss xmm0, xmm0
addss xmm0, xmm1
sqrtss xmm0, xmm0
divss xmm0, cs:dword_3AFC0
jmp short loc_1C584
loc_1C580:
shufps xmm0, xmm0, 55h ; 'U'
loc_1C584:
pop rbx
retn
| __m128 lunasvg::LengthContext::viewportDimension(lunasvg::SVGElement **a1, int a2)
{
__m128 result; // xmm0
__m128 v3; // xmm1
result = lunasvg::SVGElement::currentViewportSize(*a1);
if ( a2 == 1 )
{
return _mm_shuffle_ps(result, result, 85);
}
else if ( a2 )
{
v3 = _mm_mul_ps(result, result);
result.m128_f32[0] = fsqrt((float)(result.m128_f32[0] * result.m128_f32[0]) + _mm_shuffle_ps(v3, v3, 85).m128_f32[0])
/ 1.4142135;
}
return result;
}
| viewportDimension:
PUSH RBX
MOV EBX,ESI
MOV RDI,qword ptr [RDI]
CALL 0x0010ef44
CMP EBX,0x1
JZ 0x0011c580
TEST EBX,EBX
JZ 0x0011c584
MOVAPS XMM1,XMM0
MULPS XMM1,XMM0
SHUFPS XMM1,XMM1,0x55
MULSS XMM0,XMM0
ADDSS XMM0,XMM1
SQRTSS XMM0,XMM0
DIVSS XMM0,dword ptr [0x0013afc0]
JMP 0x0011c584
LAB_0011c580:
SHUFPS XMM0,XMM0,0x55
LAB_0011c584:
POP RBX
RET
|
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
/* lunasvg::LengthContext::viewportDimension(lunasvg::LengthDirection) const */
int8 __thiscall lunasvg::LengthContext::viewportDimension(LengthContext *this,int param_2)
{
float fVar1;
float fVar2;
float fVar4;
int8 uVar3;
uVar3 = SVGElement::currentViewportSize(*(SVGElement **)this);
fVar4 = (float)((ulong)uVar3 >> 0x20);
fVar1 = (float)uVar3;
fVar2 = fVar4;
if ((param_2 != 1) && (fVar2 = fVar1, param_2 != 0)) {
fVar2 = SQRT(fVar1 * fVar1 + fVar4 * fVar4) / _DAT_0013afc0;
}
return CONCAT44(fVar4,fVar2);
}
| |
47,836 | lunasvg::LengthContext::viewportDimension(lunasvg::LengthDirection) const | dmazzella[P]pylunasvg/lunasvg/source/svgproperty.cpp | float LengthContext::viewportDimension(LengthDirection direction) const
{
auto viewportSize = m_element->currentViewportSize();
switch(direction) {
case LengthDirection::Horizontal:
return viewportSize.w;
case LengthDirection::Vertical:
return viewportSize.h;
default:
return std::sqrt(viewportSize.w * viewportSize.w + viewportSize.h * viewportSize.h) / PLUTOVG_SQRT2;
}
} | O3 | cpp | lunasvg::LengthContext::viewportDimension(lunasvg::LengthDirection) const:
pushq %rbx
movl %esi, %ebx
movq (%rdi), %rdi
callq 0xf9e8
cmpl $0x1, %ebx
je 0x1f778
testl %ebx, %ebx
je 0x1f77c
movaps %xmm0, %xmm1
mulps %xmm0, %xmm1
shufps $0x55, %xmm1, %xmm1 # xmm1 = xmm1[1,1,1,1]
mulss %xmm0, %xmm0
addss %xmm1, %xmm0
sqrtss %xmm0, %xmm0
divss 0x24816(%rip), %xmm0 # 0x43f8c
jmp 0x1f77c
shufps $0x55, %xmm0, %xmm0 # xmm0 = xmm0[1,1,1,1]
popq %rbx
retq
| _ZNK7lunasvg13LengthContext17viewportDimensionENS_15LengthDirectionE:
push rbx
mov ebx, esi
mov rdi, [rdi]; this
call _ZNK7lunasvg10SVGElement19currentViewportSizeEv; lunasvg::SVGElement::currentViewportSize(void)
cmp ebx, 1
jz short loc_1F778
test ebx, ebx
jz short loc_1F77C
movaps xmm1, xmm0
mulps xmm1, xmm0
shufps xmm1, xmm1, 55h ; 'U'
mulss xmm0, xmm0
addss xmm0, xmm1
sqrtss xmm0, xmm0
divss xmm0, cs:dword_43F8C
jmp short loc_1F77C
loc_1F778:
shufps xmm0, xmm0, 55h ; 'U'
loc_1F77C:
pop rbx
retn
| __m128 lunasvg::LengthContext::viewportDimension(lunasvg::SVGElement **a1, int a2)
{
__m128 result; // xmm0
__m128 v3; // xmm1
result = lunasvg::SVGElement::currentViewportSize(*a1);
if ( a2 == 1 )
{
return _mm_shuffle_ps(result, result, 85);
}
else if ( a2 )
{
v3 = _mm_mul_ps(result, result);
result.m128_f32[0] = fsqrt((float)(result.m128_f32[0] * result.m128_f32[0]) + _mm_shuffle_ps(v3, v3, 85).m128_f32[0])
/ 1.4142135;
}
return result;
}
| viewportDimension:
PUSH RBX
MOV EBX,ESI
MOV RDI,qword ptr [RDI]
CALL 0x0010f9e8
CMP EBX,0x1
JZ 0x0011f778
TEST EBX,EBX
JZ 0x0011f77c
MOVAPS XMM1,XMM0
MULPS XMM1,XMM0
SHUFPS XMM1,XMM1,0x55
MULSS XMM0,XMM0
ADDSS XMM0,XMM1
SQRTSS XMM0,XMM0
DIVSS XMM0,dword ptr [0x00143f8c]
JMP 0x0011f77c
LAB_0011f778:
SHUFPS XMM0,XMM0,0x55
LAB_0011f77c:
POP RBX
RET
|
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
/* lunasvg::LengthContext::viewportDimension(lunasvg::LengthDirection) const */
int8 __thiscall lunasvg::LengthContext::viewportDimension(LengthContext *this,int param_2)
{
float fVar1;
float fVar2;
float fVar4;
int8 uVar3;
uVar3 = SVGElement::currentViewportSize(*(SVGElement **)this);
fVar4 = (float)((ulong)uVar3 >> 0x20);
fVar1 = (float)uVar3;
fVar2 = fVar4;
if ((param_2 != 1) && (fVar2 = fVar1, param_2 != 0)) {
fVar2 = SQRT(fVar1 * fVar1 + fVar4 * fVar4) / _DAT_00143f8c;
}
return CONCAT44(fVar4,fVar2);
}
| |
47,837 | js_symbol_get_description | bluesky950520[P]quickjs/quickjs.c | static JSValue js_symbol_get_description(JSContext *ctx, JSValue this_val)
{
JSValue val, ret;
JSAtomStruct *p;
val = js_thisSymbolValue(ctx, this_val);
if (JS_IsException(val))
return val;
p = JS_VALUE_GET_PTR(val);
if (p->len == 0 && p->is_wide_char != 0) {
ret = JS_UNDEFINED;
} else {
ret = JS_AtomToString(ctx, js_get_atom_index(ctx->rt, p));
}
JS_FreeValue(ctx, val);
return ret;
} | O0 | c | js_symbol_get_description:
subq $0x88, %rsp
movq %rsi, 0x68(%rsp)
movq %rdx, 0x70(%rsp)
movq %rdi, 0x60(%rsp)
movq 0x60(%rsp), %rdi
movq 0x68(%rsp), %rsi
movq 0x70(%rsp), %rdx
callq 0xd9da0
movq %rax, 0x28(%rsp)
movq %rdx, 0x30(%rsp)
movq 0x28(%rsp), %rax
movq %rax, 0x50(%rsp)
movq 0x30(%rsp), %rax
movq %rax, 0x58(%rsp)
movq 0x50(%rsp), %rdi
movq 0x58(%rsp), %rsi
callq 0x23cc0
cmpl $0x0, %eax
je 0xd9cb8
movq 0x50(%rsp), %rax
movq %rax, 0x78(%rsp)
movq 0x58(%rsp), %rax
movq %rax, 0x80(%rsp)
jmp 0xd9d86
movq 0x50(%rsp), %rax
movq %rax, 0x38(%rsp)
movq 0x38(%rsp), %rax
movq 0x4(%rax), %rax
andq $0x7fffffff, %rax # imm = 0x7FFFFFFF
cmpl $0x0, %eax
jne 0xd9d16
movq 0x38(%rsp), %rax
movq 0x4(%rax), %rax
shrq $0x1f, %rax
andq $0x1, %rax
movzbl %al, %eax
cmpl $0x0, %eax
je 0xd9d16
movl $0x0, 0x18(%rsp)
movq $0x3, 0x20(%rsp)
movq 0x18(%rsp), %rax
movq %rax, 0x40(%rsp)
movq 0x20(%rsp), %rax
movq %rax, 0x48(%rsp)
jmp 0xd9d5b
movq 0x60(%rsp), %rax
movq %rax, (%rsp)
movq 0x60(%rsp), %rax
movq 0x18(%rax), %rdi
movq 0x38(%rsp), %rsi
callq 0x31320
movq (%rsp), %rdi
movl %eax, %esi
callq 0x29000
movq %rax, 0x8(%rsp)
movq %rdx, 0x10(%rsp)
movq 0x8(%rsp), %rax
movq %rax, 0x40(%rsp)
movq 0x10(%rsp), %rax
movq %rax, 0x48(%rsp)
movq 0x60(%rsp), %rdi
movq 0x50(%rsp), %rsi
movq 0x58(%rsp), %rdx
callq 0x23c90
movq 0x40(%rsp), %rax
movq %rax, 0x78(%rsp)
movq 0x48(%rsp), %rax
movq %rax, 0x80(%rsp)
movq 0x78(%rsp), %rax
movq 0x80(%rsp), %rdx
addq $0x88, %rsp
retq
nopl (%rax,%rax)
| js_symbol_get_description:
sub rsp, 88h
mov [rsp+88h+var_20], rsi
mov [rsp+88h+var_18], rdx
mov [rsp+88h+var_28], rdi
mov rdi, [rsp+88h+var_28]
mov rsi, [rsp+88h+var_20]
mov rdx, [rsp+88h+var_18]
call js_thisSymbolValue
mov [rsp+88h+var_60], rax
mov [rsp+88h+var_58], rdx
mov rax, [rsp+88h+var_60]
mov [rsp+88h+var_38], rax
mov rax, [rsp+88h+var_58]
mov [rsp+88h+var_30], rax
mov rdi, [rsp+88h+var_38]
mov rsi, [rsp+88h+var_30]
call JS_IsException_1
cmp eax, 0
jz short loc_D9CB8
mov rax, [rsp+88h+var_38]
mov [rsp+88h+var_10], rax
mov rax, [rsp+88h+var_30]
mov [rsp+88h+var_8], rax
jmp loc_D9D86
loc_D9CB8:
mov rax, [rsp+88h+var_38]
mov [rsp+88h+var_50], rax
mov rax, [rsp+88h+var_50]
mov rax, [rax+4]
and rax, 7FFFFFFFh
cmp eax, 0
jnz short loc_D9D16
mov rax, [rsp+88h+var_50]
mov rax, [rax+4]
shr rax, 1Fh
and rax, 1
movzx eax, al
cmp eax, 0
jz short loc_D9D16
mov dword ptr [rsp+88h+var_70], 0
mov [rsp+88h+var_68], 3
mov rax, [rsp+88h+var_70]
mov [rsp+88h+var_48], rax
mov rax, [rsp+88h+var_68]
mov [rsp+88h+var_40], rax
jmp short loc_D9D5B
loc_D9D16:
mov rax, [rsp+88h+var_28]
mov [rsp+88h+var_88], rax
mov rax, [rsp+88h+var_28]
mov rdi, [rax+18h]
mov rsi, [rsp+88h+var_50]
call js_get_atom_index
mov rdi, [rsp+88h+var_88]
mov esi, eax
call JS_AtomToString
mov [rsp+88h+var_80], rax
mov [rsp+88h+var_78], rdx
mov rax, [rsp+88h+var_80]
mov [rsp+88h+var_48], rax
mov rax, [rsp+88h+var_78]
mov [rsp+88h+var_40], rax
loc_D9D5B:
mov rdi, [rsp+88h+var_28]
mov rsi, [rsp+88h+var_38]
mov rdx, [rsp+88h+var_30]
call JS_FreeValue
mov rax, [rsp+88h+var_48]
mov [rsp+88h+var_10], rax
mov rax, [rsp+88h+var_40]
mov [rsp+88h+var_8], rax
loc_D9D86:
mov rax, [rsp+88h+var_10]
mov rdx, [rsp+88h+var_8]
add rsp, 88h
retn
| long long js_symbol_get_description(long long a1, long long a2, long long a3)
{
long long v3; // rdx
unsigned int atom_index; // eax
long long v6; // [rsp+18h] [rbp-70h]
long long v7; // [rsp+28h] [rbp-60h]
long long v8; // [rsp+40h] [rbp-48h]
long long v9; // [rsp+58h] [rbp-30h]
v7 = js_thisSymbolValue(a1, a2, a3);
v9 = v3;
if ( JS_IsException_1(v7, v3) )
return v7;
if ( (*(_DWORD *)(v7 + 4) & 0x7FFFFFFF) != 0 || (*(_QWORD *)(v7 + 4) & 0x80000000LL) == 0 )
{
atom_index = js_get_atom_index(*(_QWORD *)(a1 + 24), v7);
v8 = JS_AtomToString(a1, atom_index);
}
else
{
LODWORD(v6) = 0;
v8 = v6;
}
JS_FreeValue(a1, v7, v9);
return v8;
}
| js_symbol_get_description:
SUB RSP,0x88
MOV qword ptr [RSP + 0x68],RSI
MOV qword ptr [RSP + 0x70],RDX
MOV qword ptr [RSP + 0x60],RDI
MOV RDI,qword ptr [RSP + 0x60]
MOV RSI,qword ptr [RSP + 0x68]
MOV RDX,qword ptr [RSP + 0x70]
CALL 0x001d9da0
MOV qword ptr [RSP + 0x28],RAX
MOV qword ptr [RSP + 0x30],RDX
MOV RAX,qword ptr [RSP + 0x28]
MOV qword ptr [RSP + 0x50],RAX
MOV RAX,qword ptr [RSP + 0x30]
MOV qword ptr [RSP + 0x58],RAX
MOV RDI,qword ptr [RSP + 0x50]
MOV RSI,qword ptr [RSP + 0x58]
CALL 0x00123cc0
CMP EAX,0x0
JZ 0x001d9cb8
MOV RAX,qword ptr [RSP + 0x50]
MOV qword ptr [RSP + 0x78],RAX
MOV RAX,qword ptr [RSP + 0x58]
MOV qword ptr [RSP + 0x80],RAX
JMP 0x001d9d86
LAB_001d9cb8:
MOV RAX,qword ptr [RSP + 0x50]
MOV qword ptr [RSP + 0x38],RAX
MOV RAX,qword ptr [RSP + 0x38]
MOV RAX,qword ptr [RAX + 0x4]
AND RAX,0x7fffffff
CMP EAX,0x0
JNZ 0x001d9d16
MOV RAX,qword ptr [RSP + 0x38]
MOV RAX,qword ptr [RAX + 0x4]
SHR RAX,0x1f
AND RAX,0x1
MOVZX EAX,AL
CMP EAX,0x0
JZ 0x001d9d16
MOV dword ptr [RSP + 0x18],0x0
MOV qword ptr [RSP + 0x20],0x3
MOV RAX,qword ptr [RSP + 0x18]
MOV qword ptr [RSP + 0x40],RAX
MOV RAX,qword ptr [RSP + 0x20]
MOV qword ptr [RSP + 0x48],RAX
JMP 0x001d9d5b
LAB_001d9d16:
MOV RAX,qword ptr [RSP + 0x60]
MOV qword ptr [RSP],RAX
MOV RAX,qword ptr [RSP + 0x60]
MOV RDI,qword ptr [RAX + 0x18]
MOV RSI,qword ptr [RSP + 0x38]
CALL 0x00131320
MOV RDI,qword ptr [RSP]
MOV ESI,EAX
CALL 0x00129000
MOV qword ptr [RSP + 0x8],RAX
MOV qword ptr [RSP + 0x10],RDX
MOV RAX,qword ptr [RSP + 0x8]
MOV qword ptr [RSP + 0x40],RAX
MOV RAX,qword ptr [RSP + 0x10]
MOV qword ptr [RSP + 0x48],RAX
LAB_001d9d5b:
MOV RDI,qword ptr [RSP + 0x60]
MOV RSI,qword ptr [RSP + 0x50]
MOV RDX,qword ptr [RSP + 0x58]
CALL 0x00123c90
MOV RAX,qword ptr [RSP + 0x40]
MOV qword ptr [RSP + 0x78],RAX
MOV RAX,qword ptr [RSP + 0x48]
MOV qword ptr [RSP + 0x80],RAX
LAB_001d9d86:
MOV RAX,qword ptr [RSP + 0x78]
MOV RDX,qword ptr [RSP + 0x80]
ADD RSP,0x88
RET
|
int1 [16] js_symbol_get_description(long param_1,int8 param_2,int8 param_3)
{
int iVar1;
int4 uVar2;
int1 auVar5 [16];
uint uStack_6c;
long lVar3;
int8 uVar4;
auVar5 = js_thisSymbolValue(param_1,param_2,param_3);
uVar4 = auVar5._8_8_;
lVar3 = auVar5._0_8_;
iVar1 = JS_IsException(lVar3,uVar4);
if (iVar1 == 0) {
if (((*(ulong *)(lVar3 + 4) & 0x7fffffff) == 0) && ((*(ulong *)(lVar3 + 4) >> 0x1f & 1) != 0)) {
auVar5._8_8_ = 3;
auVar5._0_8_ = (ulong)uStack_6c << 0x20;
}
else {
uVar2 = js_get_atom_index(*(int8 *)(param_1 + 0x18),lVar3);
auVar5 = JS_AtomToString(param_1,uVar2);
}
JS_FreeValue(param_1,lVar3,uVar4);
}
return auVar5;
}
| |
47,838 | js_symbol_get_description | bluesky950520[P]quickjs/quickjs.c | static JSValue js_symbol_get_description(JSContext *ctx, JSValue this_val)
{
JSValue val, ret;
JSAtomStruct *p;
val = js_thisSymbolValue(ctx, this_val);
if (JS_IsException(val))
return val;
p = JS_VALUE_GET_PTR(val);
if (p->len == 0 && p->is_wide_char != 0) {
ret = JS_UNDEFINED;
} else {
ret = JS_AtomToString(ctx, js_get_atom_index(ctx->rt, p));
}
JS_FreeValue(ctx, val);
return ret;
} | O1 | c | js_symbol_get_description:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %r14
callq 0x7e762
movq %rdx, %rbx
movq %rax, (%rsp)
cmpl $0x6, %ebx
jne 0x7e6c5
movq %rax, %r15
jmp 0x7e750
movq (%rsp), %rax
movq 0x4(%rax), %rcx
movl %ecx, %edx
negl %edx
jno 0x7e6e0
movl $0x3, %r12d
xorl %r15d, %r15d
xorl %ecx, %ecx
jmp 0x7e73a
movq %rcx, %rdx
shrq $0x3e, %rdx
cmpl $0x2, %edx
jbe 0x7e6f1
movl 0xc(%rax), %esi
jmp 0x7e71a
movq 0x18(%r14), %rsi
shrq $0x20, %rcx
movl 0x50(%rsi), %edx
decl %edx
andl %ecx, %edx
shll $0x2, %edx
addq 0x60(%rsi), %rdx
movq 0x68(%rsi), %rcx
movl (%rdx), %esi
movq (%rcx,%rsi,8), %rdi
leaq 0xc(%rdi), %rdx
cmpq %rax, %rdi
jne 0x7e70b
movq %r14, %rdi
movl $0x1, %edx
callq 0x2075a
movq %rdx, %r12
movabsq $-0x100000000, %rcx # imm = 0xFFFFFFFF00000000
andq %rax, %rcx
movl %eax, %r15d
orq %rcx, %r15
movq (%rsp), %rsi
movq 0x18(%r14), %rdi
movq %rbx, %rdx
callq 0x1d8c6
movq %r12, %rbx
movq %r15, %rax
movq %rbx, %rdx
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
| js_symbol_get_description:
push r15
push r14
push r12
push rbx
push rax
mov r14, rdi
call js_thisSymbolValue
mov rbx, rdx
mov [rsp+28h+var_28], rax
cmp ebx, 6
jnz short loc_7E6C5
mov r15, rax
jmp loc_7E750
loc_7E6C5:
mov rax, [rsp+28h+var_28]
mov rcx, [rax+4]
mov edx, ecx
neg edx
jno short loc_7E6E0
mov r12d, 3
xor r15d, r15d
xor ecx, ecx
jmp short loc_7E73A
loc_7E6E0:
mov rdx, rcx
shr rdx, 3Eh
cmp edx, 2
jbe short loc_7E6F1
mov esi, [rax+0Ch]
jmp short loc_7E71A
loc_7E6F1:
mov rsi, [r14+18h]
shr rcx, 20h
mov edx, [rsi+50h]
dec edx
and edx, ecx
shl edx, 2
add rdx, [rsi+60h]
mov rcx, [rsi+68h]
loc_7E70B:
mov esi, [rdx]
mov rdi, [rcx+rsi*8]
lea rdx, [rdi+0Ch]
cmp rdi, rax
jnz short loc_7E70B
loc_7E71A:
mov rdi, r14
mov edx, 1
call __JS_AtomToValue
mov r12, rdx
mov rcx, 0FFFFFFFF00000000h
and rcx, rax
mov r15d, eax
loc_7E73A:
or r15, rcx
mov rsi, [rsp+28h+var_28]
mov rdi, [r14+18h]
mov rdx, rbx
call JS_FreeValueRT
mov rbx, r12
loc_7E750:
mov rax, r15
mov rdx, rbx
add rsp, 8
pop rbx
pop r12
pop r14
pop r15
retn
| long long js_symbol_get_description(long long a1)
{
long long v2; // rax
long long v3; // rdx
long long v4; // rbx
unsigned long long v5; // r15
unsigned long long v6; // rcx
long long v7; // r15
unsigned long long v8; // rcx
long long v9; // rsi
long long v10; // rsi
unsigned int *v11; // rdx
long long v12; // rcx
long long v13; // rdi
long long v14; // rax
_DWORD *v16; // [rsp+0h] [rbp-28h]
v2 = js_thisSymbolValue(a1);
v4 = v3;
v16 = (_DWORD *)v2;
if ( (_DWORD)v3 == 6 )
return v2;
v6 = *(_QWORD *)(v2 + 4);
if ( __OFSUB__(-(int)v6, 1) )
{
v7 = 0LL;
v8 = 0LL;
}
else
{
if ( (unsigned int)(v6 >> 62) <= 2 )
{
v10 = *(_QWORD *)(a1 + 24);
v11 = (unsigned int *)(*(_QWORD *)(v10 + 96) + 4 * (HIDWORD(v6) & (unsigned int)(*(_DWORD *)(v10 + 80) - 1)));
v12 = *(_QWORD *)(v10 + 104);
do
{
v9 = *v11;
v13 = *(_QWORD *)(v12 + 8 * v9);
v11 = (unsigned int *)(v13 + 12);
}
while ( v13 != v2 );
}
else
{
LODWORD(v9) = *(_DWORD *)(v2 + 12);
}
v14 = _JS_AtomToValue(a1, v9, 1);
v8 = v14 & 0xFFFFFFFF00000000LL;
v7 = (unsigned int)v14;
}
v5 = v8 | v7;
JS_FreeValueRT(*(_QWORD *)(a1 + 24), v16, v4);
return v5;
}
| js_symbol_get_description:
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
PUSH RAX
MOV R14,RDI
CALL 0x0017e762
MOV RBX,RDX
MOV qword ptr [RSP],RAX
CMP EBX,0x6
JNZ 0x0017e6c5
MOV R15,RAX
JMP 0x0017e750
LAB_0017e6c5:
MOV RAX,qword ptr [RSP]
MOV RCX,qword ptr [RAX + 0x4]
MOV EDX,ECX
NEG EDX
JNO 0x0017e6e0
MOV R12D,0x3
XOR R15D,R15D
XOR ECX,ECX
JMP 0x0017e73a
LAB_0017e6e0:
MOV RDX,RCX
SHR RDX,0x3e
CMP EDX,0x2
JBE 0x0017e6f1
MOV ESI,dword ptr [RAX + 0xc]
JMP 0x0017e71a
LAB_0017e6f1:
MOV RSI,qword ptr [R14 + 0x18]
SHR RCX,0x20
MOV EDX,dword ptr [RSI + 0x50]
DEC EDX
AND EDX,ECX
SHL EDX,0x2
ADD RDX,qword ptr [RSI + 0x60]
MOV RCX,qword ptr [RSI + 0x68]
LAB_0017e70b:
MOV ESI,dword ptr [RDX]
MOV RDI,qword ptr [RCX + RSI*0x8]
LEA RDX,[RDI + 0xc]
CMP RDI,RAX
JNZ 0x0017e70b
LAB_0017e71a:
MOV RDI,R14
MOV EDX,0x1
CALL 0x0012075a
MOV R12,RDX
MOV RCX,-0x100000000
AND RCX,RAX
MOV R15D,EAX
LAB_0017e73a:
OR R15,RCX
MOV RSI,qword ptr [RSP]
MOV RDI,qword ptr [R14 + 0x18]
MOV RDX,RBX
CALL 0x0011d8c6
MOV RBX,R12
LAB_0017e750:
MOV RAX,R15
MOV RDX,RBX
ADD RSP,0x8
POP RBX
POP R12
POP R14
POP R15
RET
|
/* WARNING: Removing unreachable block (ram,0x0017e6d3) */
int1 [16] js_symbol_get_description(long param_1)
{
long lVar1;
long lVar2;
uint uVar3;
long lVar4;
int8 uVar5;
uint *puVar6;
ulong uVar7;
int1 auVar8 [16];
auVar8 = js_thisSymbolValue();
uVar5 = auVar8._8_8_;
lVar4 = auVar8._0_8_;
if (auVar8._8_4_ != 6) {
uVar3 = (uint)((ulong)*(int8 *)(lVar4 + 4) >> 0x20);
if (uVar3 >> 0x1e < 3) {
lVar1 = *(long *)(param_1 + 0x18);
puVar6 = (uint *)((ulong)((*(int *)(lVar1 + 0x50) - 1U & uVar3) << 2) +
*(long *)(lVar1 + 0x60));
do {
uVar7 = (ulong)*puVar6;
lVar2 = *(long *)(*(long *)(lVar1 + 0x68) + uVar7 * 8);
puVar6 = (uint *)(lVar2 + 0xc);
} while (lVar2 != lVar4);
}
else {
uVar7 = (ulong)*(uint *)(lVar4 + 0xc);
}
auVar8 = __JS_AtomToValue(param_1,uVar7,1);
JS_FreeValueRT(*(int8 *)(param_1 + 0x18),lVar4,uVar5);
}
return auVar8;
}
| |
47,839 | testing::internal::ParseFlagValue(char const*, char const*, bool) | seiftnesse[P]memoryallocator/build_O2/_deps/googletest-src/googletest/src/gtest.cc | static const char* ParseFlagValue(const char* str, const char* flag_name,
bool def_optional) {
// str and flag must not be NULL.
if (str == nullptr || flag_name == nullptr) return nullptr;
// The flag must start with "--" followed by GTEST_FLAG_PREFIX_.
const std::string flag_str =
std::string("--") + GTEST_FLAG_PREFIX_ + flag_name;
const size_t flag_len = flag_str.length();
if (strncmp(str, flag_str.c_str(), flag_len) != 0) return nullptr;
// Skips the flag name.
const char* flag_end = str + flag_len;
// When def_optional is true, it's OK to not have a "=value" part.
if (def_optional && (flag_end[0] == '\0')) {
return flag_end;
}
// If def_optional is true and there are more characters after the
// flag name, or if def_optional is false, there must be a '=' after
// the flag name.
if (flag_end[0] != '=') return nullptr;
// Returns the string after "=".
return flag_end + 1;
} | O2 | cpp | testing::internal::ParseFlagValue(char const*, char const*, bool):
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x68, %rsp
testq %rdi, %rdi
sete %al
testq %rsi, %rsi
sete %cl
orb %al, %cl
je 0x24db5
xorl %r15d, %r15d
jmp 0x24e53
movl %edx, %ebx
movq %rsi, %r15
movq %rdi, %r14
leaq 0xefe2(%rip), %rsi # 0x33da6
leaq 0x48(%rsp), %r12
leaq 0x7(%rsp), %rdx
movq %r12, %rdi
callq 0xd602
leaq 0xd7af(%rip), %rdx # 0x3258c
leaq 0x8(%rsp), %rdi
movq %r12, %rsi
callq 0x26336
leaq 0x28(%rsp), %rdi
leaq 0x8(%rsp), %rsi
movq %r15, %rdx
callq 0x26336
leaq 0x8(%rsp), %rdi
callq 0x9af8
leaq 0x48(%rsp), %rdi
callq 0x9af8
movq 0x28(%rsp), %rsi
movq 0x30(%rsp), %r12
movq %r14, %rdi
movq %r12, %rdx
callq 0x9230
testl %eax, %eax
je 0x24e2e
xorl %r15d, %r15d
jmp 0x24e49
leaq (%r14,%r12), %r15
movb (%r14,%r12), %al
testb %bl, %bl
je 0x24e3e
testb %al, %al
je 0x24e49
incq %r15
xorl %ecx, %ecx
cmpb $0x3d, %al
cmovneq %rcx, %r15
leaq 0x28(%rsp), %rdi
callq 0x9af8
movq %r15, %rax
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x9af8
jmp 0x24e74
movq %rax, %rbx
leaq 0x48(%rsp), %rdi
callq 0x9af8
movq %rbx, %rdi
callq 0x99d0
| _ZN7testing8internalL14ParseFlagValueEPKcS2_b:
push r15
push r14
push r12
push rbx
sub rsp, 68h
test rdi, rdi
setz al
test rsi, rsi
setz cl
or cl, al
jz short loc_24DB5
xor r15d, r15d
jmp loc_24E53
loc_24DB5:
mov ebx, edx
mov r15, rsi
mov r14, rdi
lea rsi, aTheValueOfFlag+12h; "--"
lea r12, [rsp+88h+var_40]
lea rdx, [rsp+88h+var_81]
mov rdi, r12
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&)
lea rdx, aGtest; "gtest_"
lea rdi, [rsp+88h+var_80]
mov rsi, r12
call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_PKS5_; std::operator+<char>(std::string&&,char const*)
lea rdi, [rsp+88h+var_60]
lea rsi, [rsp+88h+var_80]
mov rdx, r15
call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_PKS5_; std::operator+<char>(std::string&&,char const*)
lea rdi, [rsp+88h+var_80]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
lea rdi, [rsp+88h+var_40]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
mov rsi, [rsp+88h+var_60]
mov r12, [rsp+88h+var_58]
mov rdi, r14
mov rdx, r12
call _strncmp
test eax, eax
jz short loc_24E2E
xor r15d, r15d
jmp short loc_24E49
loc_24E2E:
lea r15, [r14+r12]
mov al, [r14+r12]
test bl, bl
jz short loc_24E3E
test al, al
jz short loc_24E49
loc_24E3E:
inc r15
xor ecx, ecx
cmp al, 3Dh ; '='
cmovnz r15, rcx
loc_24E49:
lea rdi, [rsp+88h+var_60]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
loc_24E53:
mov rax, r15
add rsp, 68h
pop rbx
pop r12
pop r14
pop r15
retn
mov rbx, rax
lea rdi, [rsp+arg_0]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
jmp short loc_24E74
mov rbx, rax
loc_24E74:
lea rdi, [rsp+arg_40]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
mov rdi, rbx
call __Unwind_Resume
| char * testing::internal::ParseFlagValue(testing::internal *this, const char *a2, const char *a3)
{
char *v3; // r15
char v4; // bl
long long v5; // r12
char v6; // al
_BYTE v8[32]; // [rsp+8h] [rbp-80h] BYREF
long long v9; // [rsp+28h] [rbp-60h] BYREF
long long v10; // [rsp+30h] [rbp-58h]
_QWORD v11[8]; // [rsp+48h] [rbp-40h] BYREF
if ( this == 0LL || a2 == 0LL )
return 0LL;
v4 = (char)a3;
std::string::basic_string<std::allocator<char>>(v11, (long long)"--");
std::operator+<char>(v8, v11, "gtest_");
std::operator+<char>(&v9, v8, a2);
std::string::~string(v8);
std::string::~string(v11);
v5 = v10;
if ( !(unsigned int)strncmp(this, v9, v10) )
{
v3 = (char *)this + v5;
v6 = *((_BYTE *)this + v5);
if ( !v4 || v6 )
{
++v3;
if ( v6 != 61 )
v3 = 0LL;
}
}
else
{
v3 = 0LL;
}
std::string::~string(&v9);
return v3;
}
| ParseFlagValue:
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
SUB RSP,0x68
TEST RDI,RDI
SETZ AL
TEST RSI,RSI
SETZ CL
OR CL,AL
JZ 0x00124db5
XOR R15D,R15D
JMP 0x00124e53
LAB_00124db5:
MOV EBX,EDX
MOV R15,RSI
MOV R14,RDI
LEA RSI,[0x133da6]
LEA R12,[RSP + 0x48]
LEA RDX,[RSP + 0x7]
MOV RDI,R12
CALL 0x0010d602
LAB_00124dd6:
LEA RDX,[0x13258c]
LEA RDI,[RSP + 0x8]
MOV RSI,R12
CALL 0x00126336
LAB_00124dea:
LEA RDI,[RSP + 0x28]
LEA RSI,[RSP + 0x8]
MOV RDX,R15
CALL 0x00126336
LAB_00124dfc:
LEA RDI,[RSP + 0x8]
CALL 0x00109af8
LEA RDI,[RSP + 0x48]
CALL 0x00109af8
MOV RSI,qword ptr [RSP + 0x28]
MOV R12,qword ptr [RSP + 0x30]
MOV RDI,R14
MOV RDX,R12
CALL 0x00109230
TEST EAX,EAX
JZ 0x00124e2e
XOR R15D,R15D
JMP 0x00124e49
LAB_00124e2e:
LEA R15,[R14 + R12*0x1]
MOV AL,byte ptr [R14 + R12*0x1]
TEST BL,BL
JZ 0x00124e3e
TEST AL,AL
JZ 0x00124e49
LAB_00124e3e:
INC R15
XOR ECX,ECX
CMP AL,0x3d
CMOVNZ R15,RCX
LAB_00124e49:
LEA RDI,[RSP + 0x28]
CALL 0x00109af8
LAB_00124e53:
MOV RAX,R15
ADD RSP,0x68
POP RBX
POP R12
POP R14
POP R15
RET
|
/* testing::internal::ParseFlagValue(char const*, char const*, bool) */
char * testing::internal::ParseFlagValue(char *param_1,char *param_2,bool param_3)
{
int iVar1;
char *pcVar2;
allocator local_81;
string local_80 [32];
char *local_60;
size_t local_58;
string local_40 [32];
if (param_2 == (char *)0x0 || param_1 == (char *)0x0) {
pcVar2 = (char *)0x0;
}
else {
std::__cxx11::string::string<std::allocator<char>>(local_40,"--",&local_81);
/* try { // try from 00124dd6 to 00124de9 has its CatchHandler @ 00124e71 */
std::operator+(local_80,(char *)local_40);
/* try { // try from 00124dea to 00124dfb has its CatchHandler @ 00124e62 */
std::operator+((string *)&local_60,(char *)local_80);
std::__cxx11::string::~string(local_80);
std::__cxx11::string::~string(local_40);
iVar1 = strncmp(param_1,local_60,local_58);
if (iVar1 == 0) {
pcVar2 = param_1 + local_58;
if (((!param_3) || (param_1[local_58] != '\0')) &&
(pcVar2 = pcVar2 + 1, param_1[local_58] != '=')) {
pcVar2 = (char *)0x0;
}
}
else {
pcVar2 = (char *)0x0;
}
std::__cxx11::string::~string((string *)&local_60);
}
return pcVar2;
}
| |
47,840 | my_valid_mbcharlen_utf8mb3 | eloqsql/strings/ctype-utf8.c | static inline
int my_valid_mbcharlen_utf8mb3(const uchar *s, const uchar *e)
{
uchar c;
DBUG_ASSERT(s < e);
c= s[0];
if (c < 0x80)
return 1;
if (c < 0xc2)
return MY_CS_ILSEQ;
if (c < 0xe0)
{
if (s+2 > e) /* We need 2 characters */
return MY_CS_TOOSMALL2;
if (!(IS_CONTINUATION_BYTE(s[1])))
return MY_CS_ILSEQ;
return 2;
}
DBUG_ASSERT(c < 0xf0);
if (s+3 > e) /* We need 3 characters */
return MY_CS_TOOSMALL3;
if (!IS_UTF8MB3_STEP2(c, s[1], s[2]))
return MY_CS_ILSEQ;
return 3;
} | O0 | c | my_valid_mbcharlen_utf8mb3:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
jmp 0x9be6e
movq -0x10(%rbp), %rax
movb (%rax), %al
movb %al, -0x19(%rbp)
movzbl -0x19(%rbp), %eax
cmpl $0x80, %eax
jge 0x9be8e
movl $0x1, -0x4(%rbp)
jmp 0x9bf57
movzbl -0x19(%rbp), %eax
cmpl $0xc2, %eax
jge 0x9bea5
movl $0x0, -0x4(%rbp)
jmp 0x9bf57
movzbl -0x19(%rbp), %eax
cmpl $0xe0, %eax
jge 0x9beee
movq -0x10(%rbp), %rax
addq $0x2, %rax
cmpq -0x18(%rbp), %rax
jbe 0x9beca
movl $0xffffff9a, -0x4(%rbp) # imm = 0xFFFFFF9A
jmp 0x9bf57
movq -0x10(%rbp), %rax
movzbl 0x1(%rax), %eax
xorl $0x80, %eax
cmpl $0x40, %eax
jl 0x9bee5
movl $0x0, -0x4(%rbp)
jmp 0x9bf57
movl $0x2, -0x4(%rbp)
jmp 0x9bf57
jmp 0x9bef0
jmp 0x9bef2
movq -0x10(%rbp), %rax
addq $0x3, %rax
cmpq -0x18(%rbp), %rax
jbe 0x9bf09
movl $0xffffff99, -0x4(%rbp) # imm = 0xFFFFFF99
jmp 0x9bf57
movq -0x10(%rbp), %rax
movzbl 0x1(%rax), %eax
xorl $0x80, %eax
cmpl $0x40, %eax
jge 0x9bf47
movq -0x10(%rbp), %rax
movzbl 0x2(%rax), %eax
xorl $0x80, %eax
cmpl $0x40, %eax
jge 0x9bf47
movzbl -0x19(%rbp), %eax
cmpl $0xe1, %eax
jge 0x9bf50
movq -0x10(%rbp), %rax
movzbl 0x1(%rax), %eax
cmpl $0xa0, %eax
jge 0x9bf50
movl $0x0, -0x4(%rbp)
jmp 0x9bf57
movl $0x3, -0x4(%rbp)
movl -0x4(%rbp), %eax
popq %rbp
retq
nopl (%rax)
| my_valid_mbcharlen_utf8mb3:
push rbp
mov rbp, rsp
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
jmp short $+2
loc_9BE6E:
mov rax, [rbp+var_10]
mov al, [rax]
mov [rbp+var_19], al
movzx eax, [rbp+var_19]
cmp eax, 80h
jge short loc_9BE8E
mov [rbp+var_4], 1
jmp loc_9BF57
loc_9BE8E:
movzx eax, [rbp+var_19]
cmp eax, 0C2h
jge short loc_9BEA5
mov [rbp+var_4], 0
jmp loc_9BF57
loc_9BEA5:
movzx eax, [rbp+var_19]
cmp eax, 0E0h
jge short loc_9BEEE
mov rax, [rbp+var_10]
add rax, 2
cmp rax, [rbp+var_18]
jbe short loc_9BECA
mov [rbp+var_4], 0FFFFFF9Ah
jmp loc_9BF57
loc_9BECA:
mov rax, [rbp+var_10]
movzx eax, byte ptr [rax+1]
xor eax, 80h
cmp eax, 40h ; '@'
jl short loc_9BEE5
mov [rbp+var_4], 0
jmp short loc_9BF57
loc_9BEE5:
mov [rbp+var_4], 2
jmp short loc_9BF57
loc_9BEEE:
jmp short $+2
loc_9BEF0:
jmp short $+2
loc_9BEF2:
mov rax, [rbp+var_10]
add rax, 3
cmp rax, [rbp+var_18]
jbe short loc_9BF09
mov [rbp+var_4], 0FFFFFF99h
jmp short loc_9BF57
loc_9BF09:
mov rax, [rbp+var_10]
movzx eax, byte ptr [rax+1]
xor eax, 80h
cmp eax, 40h ; '@'
jge short loc_9BF47
mov rax, [rbp+var_10]
movzx eax, byte ptr [rax+2]
xor eax, 80h
cmp eax, 40h ; '@'
jge short loc_9BF47
movzx eax, [rbp+var_19]
cmp eax, 0E1h
jge short loc_9BF50
mov rax, [rbp+var_10]
movzx eax, byte ptr [rax+1]
cmp eax, 0A0h
jge short loc_9BF50
loc_9BF47:
mov [rbp+var_4], 0
jmp short loc_9BF57
loc_9BF50:
mov [rbp+var_4], 3
loc_9BF57:
mov eax, [rbp+var_4]
pop rbp
retn
| long long my_valid_mbcharlen_utf8mb3(unsigned __int8 *a1, unsigned long long a2)
{
unsigned __int8 v3; // [rsp+1h] [rbp-19h]
v3 = *a1;
if ( *a1 >= 0x80u )
{
if ( v3 >= 0xC2u )
{
if ( v3 >= 0xE0u )
{
if ( (unsigned long long)(a1 + 3) <= a2 )
{
if ( (a1[1] ^ 0x80) < 64 && (a1[2] ^ 0x80) < 64 && (v3 >= 0xE1u || a1[1] >= 0xA0u) )
return 3;
else
return 0;
}
else
{
return (unsigned int)-103;
}
}
else if ( (unsigned long long)(a1 + 2) <= a2 )
{
if ( (a1[1] ^ 0x80) < 64 )
return 2;
else
return 0;
}
else
{
return (unsigned int)-102;
}
}
else
{
return 0;
}
}
else
{
return 1;
}
}
| my_valid_mbcharlen_utf8mb3:
PUSH RBP
MOV RBP,RSP
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x18],RSI
JMP 0x0019be6e
LAB_0019be6e:
MOV RAX,qword ptr [RBP + -0x10]
MOV AL,byte ptr [RAX]
MOV byte ptr [RBP + -0x19],AL
MOVZX EAX,byte ptr [RBP + -0x19]
CMP EAX,0x80
JGE 0x0019be8e
MOV dword ptr [RBP + -0x4],0x1
JMP 0x0019bf57
LAB_0019be8e:
MOVZX EAX,byte ptr [RBP + -0x19]
CMP EAX,0xc2
JGE 0x0019bea5
MOV dword ptr [RBP + -0x4],0x0
JMP 0x0019bf57
LAB_0019bea5:
MOVZX EAX,byte ptr [RBP + -0x19]
CMP EAX,0xe0
JGE 0x0019beee
MOV RAX,qword ptr [RBP + -0x10]
ADD RAX,0x2
CMP RAX,qword ptr [RBP + -0x18]
JBE 0x0019beca
MOV dword ptr [RBP + -0x4],0xffffff9a
JMP 0x0019bf57
LAB_0019beca:
MOV RAX,qword ptr [RBP + -0x10]
MOVZX EAX,byte ptr [RAX + 0x1]
XOR EAX,0x80
CMP EAX,0x40
JL 0x0019bee5
MOV dword ptr [RBP + -0x4],0x0
JMP 0x0019bf57
LAB_0019bee5:
MOV dword ptr [RBP + -0x4],0x2
JMP 0x0019bf57
LAB_0019beee:
JMP 0x0019bef0
LAB_0019bef0:
JMP 0x0019bef2
LAB_0019bef2:
MOV RAX,qword ptr [RBP + -0x10]
ADD RAX,0x3
CMP RAX,qword ptr [RBP + -0x18]
JBE 0x0019bf09
MOV dword ptr [RBP + -0x4],0xffffff99
JMP 0x0019bf57
LAB_0019bf09:
MOV RAX,qword ptr [RBP + -0x10]
MOVZX EAX,byte ptr [RAX + 0x1]
XOR EAX,0x80
CMP EAX,0x40
JGE 0x0019bf47
MOV RAX,qword ptr [RBP + -0x10]
MOVZX EAX,byte ptr [RAX + 0x2]
XOR EAX,0x80
CMP EAX,0x40
JGE 0x0019bf47
MOVZX EAX,byte ptr [RBP + -0x19]
CMP EAX,0xe1
JGE 0x0019bf50
MOV RAX,qword ptr [RBP + -0x10]
MOVZX EAX,byte ptr [RAX + 0x1]
CMP EAX,0xa0
JGE 0x0019bf50
LAB_0019bf47:
MOV dword ptr [RBP + -0x4],0x0
JMP 0x0019bf57
LAB_0019bf50:
MOV dword ptr [RBP + -0x4],0x3
LAB_0019bf57:
MOV EAX,dword ptr [RBP + -0x4]
POP RBP
RET
|
int4 my_valid_mbcharlen_utf8mb3(byte *param_1,byte *param_2)
{
byte bVar1;
int4 local_c;
bVar1 = *param_1;
if (bVar1 < 0x80) {
local_c = 1;
}
else if (bVar1 < 0xc2) {
local_c = 0;
}
else if (bVar1 < 0xe0) {
if (param_2 < param_1 + 2) {
local_c = 0xffffff9a;
}
else if ((param_1[1] ^ 0x80) < 0x40) {
local_c = 2;
}
else {
local_c = 0;
}
}
else if (param_2 < param_1 + 3) {
local_c = 0xffffff99;
}
else if ((((param_1[1] ^ 0x80) < 0x40) && ((param_1[2] ^ 0x80) < 0x40)) &&
((0xe0 < bVar1 || (0x9f < param_1[1])))) {
local_c = 3;
}
else {
local_c = 0;
}
return local_c;
}
| |
47,841 | common_sampler_prev_str[abi:cxx11](common_sampler*, llama_context*, int) | monkey531[P]llama/common/sampling.cpp | std::string common_sampler_prev_str(common_sampler * gsmpl, llama_context * ctx_main, int n) {
n = std::min(n, (int) gsmpl->prev.size());
if (n <= 0) {
return "";
}
std::string result;
result.reserve(8*n); // 8 is the average length of a token [citation needed], TODO: compute this from the vocab
for (int i = n - 1; i >= 0; i--) {
const llama_token id = gsmpl->prev.rat(i);
GGML_ASSERT(id != LLAMA_TOKEN_NULL && "null token in the sampling history - should not happen");
result += common_token_to_piece(ctx_main, id);
}
return result;
} | O2 | cpp | common_sampler_prev_str[abi:cxx11](common_sampler*, llama_context*, int):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movl %ecx, %r12d
movq %rdi, %rbx
movl 0x150(%rsi), %eax
cmpl %ecx, %eax
cmovll %eax, %r12d
testl %r12d, %r12d
jle 0xa3bdb
movq %rdx, %r14
movq %rsi, %r15
leaq 0x10(%rbx), %rax
movq %rax, (%rbx)
andq $0x0, 0x8(%rbx)
movb $0x0, 0x10(%rbx)
leal (,%r12,8), %esi
movq %rbx, %rdi
callq 0x24de0
addq $0x148, %r15 # imm = 0x148
movl %r12d, %r12d
leaq 0x8(%rsp), %r13
pushq $0x1
popq %rbp
testq %r12, %r12
jle 0xa3bef
decq %r12
movq %r15, %rdi
movq %r12, %rsi
callq 0xa45b8
movl (%rax), %edx
cmpl $-0x1, %edx
je 0xa3c01
movq %r13, %rdi
movq %r14, %rsi
movl %ebp, %ecx
callq 0x5ffab
movq %rbx, %rdi
movq %r13, %rsi
callq 0x25200
movq %r13, %rdi
callq 0x25298
jmp 0xa3b9f
leaq 0x1806d(%rip), %rsi # 0xbbc4f
leaq 0x8(%rsp), %rdx
movq %rbx, %rdi
callq 0x30aea
movq %rbx, %rax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x21755(%rip), %rdi # 0xc535d
leaq 0x11ee1(%rip), %rdx # 0xb5af0
leaq 0x21922(%rip), %rcx # 0xc5538
movl $0x1a1, %esi # imm = 0x1A1
xorl %eax, %eax
callq 0x24f20
jmp 0xa3c37
jmp 0xa3c37
jmp 0xa3c37
movq %rax, %r14
leaq 0x8(%rsp), %rdi
callq 0x25298
jmp 0xa3c3a
movq %rax, %r14
movq %rbx, %rdi
callq 0x25298
movq %r14, %rdi
callq 0x25010
| _Z23common_sampler_prev_strB5cxx11P14common_samplerP13llama_contexti:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 28h
mov r12d, ecx
mov rbx, rdi
mov eax, [rsi+150h]
cmp eax, ecx
cmovl r12d, eax
test r12d, r12d
jle short loc_A3BDB
mov r14, rdx
mov r15, rsi
lea rax, [rbx+10h]
mov [rbx], rax
and qword ptr [rbx+8], 0
mov byte ptr [rbx+10h], 0
lea esi, ds:0[r12*8]
mov rdi, rbx
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7reserveEm; std::string::reserve(ulong)
add r15, 148h
mov r12d, r12d
lea r13, [rsp+58h+var_50]
push 1
pop rbp
loc_A3B9F:
test r12, r12
jle short loc_A3BEF
dec r12
mov rdi, r15
mov rsi, r12
call _ZNK11ring_bufferIiE3ratEm; ring_buffer<int>::rat(ulong)
mov edx, [rax]
cmp edx, 0FFFFFFFFh
jz short loc_A3C01
mov rdi, r13; void *
mov rsi, r14
mov ecx, ebp
call _Z21common_token_to_pieceB5cxx11PK13llama_contextib; common_token_to_piece(llama_context const*,int,bool)
mov rdi, rbx
mov rsi, r13
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendERKS4_; std::string::append(std::string const&)
mov rdi, r13; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
jmp short loc_A3B9F
loc_A3BDB:
lea rsi, aErrorWhileHand_0+34h; ""
lea rdx, [rsp+58h+var_50]
mov rdi, rbx
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&)
loc_A3BEF:
mov rax, rbx
add rsp, 28h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_A3C01:
lea rdi, aWorkspaceLlm4b_3; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aIdLlamaTokenNu; "id != LLAMA_TOKEN_NULL && \"null token "...
mov esi, 1A1h
xor eax, eax
call _ggml_abort
jmp short loc_A3C37
jmp short loc_A3C37
jmp short loc_A3C37
mov r14, rax
lea rdi, [rsp+58h+var_50]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
jmp short loc_A3C3A
loc_A3C37:
mov r14, rax
loc_A3C3A:
mov rdi, rbx; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
mov rdi, r14
call __Unwind_Resume
| long long common_sampler_prev_str[abi:cxx11](long long a1, long long a2, long long a3, int a4)
{
long long v4; // r12
long long v7; // r14
_BYTE v8[80]; // [rsp+8h] [rbp-50h] BYREF
LODWORD(v4) = a4;
if ( *(_DWORD *)(a2 + 336) < a4 )
LODWORD(v4) = *(_DWORD *)(a2 + 336);
if ( (int)v4 <= 0 )
{
std::string::basic_string<std::allocator<char>>((_QWORD *)a1, (long long)"");
}
else
{
*(_QWORD *)a1 = a1 + 16;
*(_QWORD *)(a1 + 8) = 0LL;
*(_BYTE *)(a1 + 16) = 0;
std::string::reserve(a1, (unsigned int)(8 * v4));
v4 = (unsigned int)v4;
while ( v4 > 0 )
{
if ( *(_DWORD *)ring_buffer<int>::rat(a2 + 328, --v4) == -1 )
{
v7 = ggml_abort(
"/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/sampling.cpp",
417LL,
"GGML_ASSERT(%s) failed",
"id != LLAMA_TOKEN_NULL && \"null token in the sampling history - should not happen\"");
std::string::~string((void *)a1);
_Unwind_Resume(v7);
}
common_token_to_piece[abi:cxx11](v8, a3);
std::string::append(a1, v8);
std::string::~string(v8);
}
}
return a1;
}
| common_sampler_prev_str[abi:cxx11]:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x28
MOV R12D,ECX
MOV RBX,RDI
MOV EAX,dword ptr [RSI + 0x150]
CMP EAX,ECX
CMOVL R12D,EAX
TEST R12D,R12D
JLE 0x001a3bdb
MOV R14,RDX
MOV R15,RSI
LEA RAX,[RBX + 0x10]
MOV qword ptr [RBX],RAX
AND qword ptr [RBX + 0x8],0x0
MOV byte ptr [RBX + 0x10],0x0
LEA ESI,[R12*0x8]
LAB_001a3b85:
MOV RDI,RBX
CALL 0x00124de0
ADD R15,0x148
MOV R12D,R12D
LEA R13,[RSP + 0x8]
PUSH 0x1
POP RBP
LAB_001a3b9f:
TEST R12,R12
JLE 0x001a3bef
LAB_001a3ba4:
DEC R12
MOV RDI,R15
MOV RSI,R12
CALL 0x001a45b8
MOV EDX,dword ptr [RAX]
CMP EDX,-0x1
JZ 0x001a3c01
LAB_001a3bb9:
MOV RDI,R13
MOV RSI,R14
MOV ECX,EBP
CALL 0x0015ffab
LAB_001a3bc6:
MOV RDI,RBX
MOV RSI,R13
CALL 0x00125200
LAB_001a3bd1:
MOV RDI,R13
CALL 0x00125298
JMP 0x001a3b9f
LAB_001a3bdb:
LEA RSI,[0x1bbc4f]
LEA RDX,[RSP + 0x8]
MOV RDI,RBX
CALL 0x00130aea
LAB_001a3bef:
MOV RAX,RBX
ADD RSP,0x28
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_001a3c01:
LEA RDI,[0x1c535d]
LEA RDX,[0x1b5af0]
LEA RCX,[0x1c5538]
MOV ESI,0x1a1
XOR EAX,EAX
CALL 0x00124f20
|
/* common_sampler_prev_str[abi:cxx11](common_sampler*, llama_context*, int) */
common_sampler *
common_sampler_prev_str_abi_cxx11_(common_sampler *param_1,llama_context *param_2,int param_3)
{
int *piVar1;
uint in_ECX;
ulong uVar2;
llama_context local_50 [32];
if ((int)*(uint *)(param_2 + 0x150) < (int)in_ECX) {
in_ECX = *(uint *)(param_2 + 0x150);
}
if ((int)in_ECX < 1) {
std::__cxx11::string::string<std::allocator<char>>((string *)param_1,"",(allocator *)local_50);
}
else {
*(common_sampler **)param_1 = param_1 + 0x10;
*(int8 *)(param_1 + 8) = 0;
param_1[0x10] = (common_sampler)0x0;
/* try { // try from 001a3b85 to 001a3b8c has its CatchHandler @ 001a3c22 */
std::__cxx11::string::reserve((ulong)param_1);
uVar2 = (ulong)in_ECX;
while (0 < (long)uVar2) {
/* try { // try from 001a3ba4 to 001a3bb1 has its CatchHandler @ 001a3c24 */
uVar2 = uVar2 - 1;
piVar1 = (int *)ring_buffer<int>::rat((ring_buffer<int> *)(param_2 + 0x148),uVar2);
if (*piVar1 == -1) {
/* try { // try from 001a3c01 to 001a3c21 has its CatchHandler @ 001a3c37 */
/* WARNING: Subroutine does not return */
ggml_abort("/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/sampling.cpp",
0x1a1,"GGML_ASSERT(%s) failed",
"id != LLAMA_TOKEN_NULL && \"null token in the sampling history - should not happen\""
);
}
/* try { // try from 001a3bb9 to 001a3bc5 has its CatchHandler @ 001a3c26 */
common_token_to_piece_abi_cxx11_(local_50,param_3,SUB41(*piVar1,0));
/* try { // try from 001a3bc6 to 001a3bd0 has its CatchHandler @ 001a3c28 */
std::__cxx11::string::append((string *)param_1);
std::__cxx11::string::~string((string *)local_50);
}
}
return param_1;
}
| |
47,842 | PFS_buffer_scalable_container<PFS_table_share, 4096, 4096, PFS_buffer_default_array<PFS_table_share>, PFS_buffer_default_allocator<PFS_table_share>>::init(long) | eloqsql/storage/perfschema/pfs_buffer_container.h | int init(long max_size)
{
int i;
m_initialized= true;
m_full= true;
m_max= PFS_PAGE_COUNT * PFS_PAGE_SIZE;
m_max_page_count= PFS_PAGE_COUNT;
m_last_page_size= PFS_PAGE_SIZE;
m_lost= 0;
m_monotonic.m_u32= 0;
m_max_page_index.m_u32= 0;
for (i=0 ; i < PFS_PAGE_COUNT; i++)
{
m_pages[i]= NULL;
}
if (max_size == 0)
{
/* No allocation. */
m_max_page_count= 0;
}
else if (max_size > 0)
{
if (max_size % PFS_PAGE_SIZE == 0)
{
m_max_page_count= max_size / PFS_PAGE_SIZE;
}
else
{
m_max_page_count= max_size / PFS_PAGE_SIZE + 1;
m_last_page_size= max_size % PFS_PAGE_SIZE;
}
/* Bounded allocation. */
m_full= false;
if (m_max_page_count > PFS_PAGE_COUNT)
{
m_max_page_count= PFS_PAGE_COUNT;
m_last_page_size= PFS_PAGE_SIZE;
}
}
else
{
/* max_size = -1 means unbounded allocation */
m_full= false;
}
assert(m_max_page_count <= PFS_PAGE_COUNT);
assert(0 < m_last_page_size);
assert(m_last_page_size <= PFS_PAGE_SIZE);
pthread_mutex_init(& m_critical_section, NULL);
return 0;
} | O0 | c | PFS_buffer_scalable_container<PFS_table_share, 4096, 4096, PFS_buffer_default_array<PFS_table_share>, PFS_buffer_default_allocator<PFS_table_share>>::init(long):
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x20(%rbp)
movb $0x1, 0x8(%rax)
movb $0x1, 0x9(%rax)
movq $0x1000000, 0x10(%rax) # imm = 0x1000000
movq $0x1000, 0x98(%rax) # imm = 0x1000
movq $0x1000, 0xa0(%rax) # imm = 0x1000
movq $0x0, (%rax)
movl $0x0, 0x18(%rax)
movl $0x0, 0x58(%rax)
movl $0x0, -0x14(%rbp)
cmpl $0x1000, -0x14(%rbp) # imm = 0x1000
jge 0x3c5c2
movq -0x20(%rbp), %rax
movslq -0x14(%rbp), %rcx
movq $0x0, 0xa8(%rax,%rcx,8)
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0x3c59a
cmpq $0x0, -0x10(%rbp)
jne 0x3c5dd
movq -0x20(%rbp), %rax
movq $0x0, 0x98(%rax)
jmp 0x3c68e
cmpq $0x0, -0x10(%rbp)
jle 0x3c684
movq -0x10(%rbp), %rax
movl $0x1000, %ecx # imm = 0x1000
cqto
idivq %rcx
cmpq $0x0, %rdx
jne 0x3c61a
movq -0x10(%rbp), %rax
movl $0x1000, %ecx # imm = 0x1000
cqto
idivq %rcx
movq %rax, %rcx
movq -0x20(%rbp), %rax
movq %rcx, 0x98(%rax)
jmp 0x3c653
movq -0x10(%rbp), %rax
movl $0x1000, %ecx # imm = 0x1000
cqto
idivq %rcx
movq %rax, %rcx
movq -0x20(%rbp), %rax
addq $0x1, %rcx
movq %rcx, 0x98(%rax)
movq -0x10(%rbp), %rax
movl $0x1000, %ecx # imm = 0x1000
cqto
idivq %rcx
movq -0x20(%rbp), %rax
movq %rdx, 0xa0(%rax)
movq -0x20(%rbp), %rax
movb $0x0, 0x9(%rax)
cmpq $0x1000, 0x98(%rax) # imm = 0x1000
jbe 0x3c682
movq -0x20(%rbp), %rax
movq $0x1000, 0x98(%rax) # imm = 0x1000
movq $0x1000, 0xa0(%rax) # imm = 0x1000
jmp 0x3c68c
movq -0x20(%rbp), %rax
movb $0x0, 0x9(%rax)
jmp 0x3c68e
movq -0x20(%rbp), %rdi
addq $0x80b0, %rdi # imm = 0x80B0
xorl %eax, %eax
movl %eax, %esi
callq 0x264f0
xorl %eax, %eax
addq $0x20, %rsp
popq %rbp
retq
nopw (%rax,%rax)
| _ZN29PFS_buffer_scalable_containerI15PFS_table_shareLi4096ELi4096E24PFS_buffer_default_arrayIS0_E28PFS_buffer_default_allocatorIS0_EE4initEl:
push rbp
mov rbp, rsp
sub rsp, 20h
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov rax, [rbp+var_8]
mov [rbp+var_20], rax
mov byte ptr [rax+8], 1
mov byte ptr [rax+9], 1
mov qword ptr [rax+10h], 1000000h
mov qword ptr [rax+98h], 1000h
mov qword ptr [rax+0A0h], 1000h
mov qword ptr [rax], 0
mov dword ptr [rax+18h], 0
mov dword ptr [rax+58h], 0
mov [rbp+var_14], 0
loc_3C59A:
cmp [rbp+var_14], 1000h
jge short loc_3C5C2
mov rax, [rbp+var_20]
movsxd rcx, [rbp+var_14]
mov qword ptr [rax+rcx*8+0A8h], 0
mov eax, [rbp+var_14]
add eax, 1
mov [rbp+var_14], eax
jmp short loc_3C59A
loc_3C5C2:
cmp [rbp+var_10], 0
jnz short loc_3C5DD
mov rax, [rbp+var_20]
mov qword ptr [rax+98h], 0
jmp loc_3C68E
loc_3C5DD:
cmp [rbp+var_10], 0
jle loc_3C684
mov rax, [rbp+var_10]
mov ecx, 1000h
cqo
idiv rcx
cmp rdx, 0
jnz short loc_3C61A
mov rax, [rbp+var_10]
mov ecx, 1000h
cqo
idiv rcx
mov rcx, rax
mov rax, [rbp+var_20]
mov [rax+98h], rcx
jmp short loc_3C653
loc_3C61A:
mov rax, [rbp+var_10]
mov ecx, 1000h
cqo
idiv rcx
mov rcx, rax
mov rax, [rbp+var_20]
add rcx, 1
mov [rax+98h], rcx
mov rax, [rbp+var_10]
mov ecx, 1000h
cqo
idiv rcx
mov rax, [rbp+var_20]
mov [rax+0A0h], rdx
loc_3C653:
mov rax, [rbp+var_20]
mov byte ptr [rax+9], 0
cmp qword ptr [rax+98h], 1000h
jbe short loc_3C682
mov rax, [rbp+var_20]
mov qword ptr [rax+98h], 1000h
mov qword ptr [rax+0A0h], 1000h
loc_3C682:
jmp short loc_3C68C
loc_3C684:
mov rax, [rbp+var_20]
mov byte ptr [rax+9], 0
loc_3C68C:
jmp short $+2
loc_3C68E:
mov rdi, [rbp+var_20]
add rdi, 80B0h
xor eax, eax
mov esi, eax
call _pthread_mutex_init
xor eax, eax
add rsp, 20h
pop rbp
retn
| long long PFS_buffer_scalable_container<PFS_table_share,4096,4096,PFS_buffer_default_array<PFS_table_share>,PFS_buffer_default_allocator<PFS_table_share>>::init(
long long a1,
long long a2)
{
int i; // [rsp+Ch] [rbp-14h]
*(_BYTE *)(a1 + 8) = 1;
*(_BYTE *)(a1 + 9) = 1;
*(_QWORD *)(a1 + 16) = 0x1000000LL;
*(_QWORD *)(a1 + 152) = 4096LL;
*(_QWORD *)(a1 + 160) = 4096LL;
*(_QWORD *)a1 = 0LL;
*(_DWORD *)(a1 + 24) = 0;
*(_DWORD *)(a1 + 88) = 0;
for ( i = 0; i < 4096; ++i )
*(_QWORD *)(a1 + 8LL * i + 168) = 0LL;
if ( a2 )
{
if ( a2 <= 0 )
{
*(_BYTE *)(a1 + 9) = 0;
}
else
{
if ( a2 % 4096 )
{
*(_QWORD *)(a1 + 152) = a2 / 4096 + 1;
*(_QWORD *)(a1 + 160) = a2 % 4096;
}
else
{
*(_QWORD *)(a1 + 152) = a2 / 4096;
}
*(_BYTE *)(a1 + 9) = 0;
if ( *(_QWORD *)(a1 + 152) > 0x1000uLL )
{
*(_QWORD *)(a1 + 152) = 4096LL;
*(_QWORD *)(a1 + 160) = 4096LL;
}
}
}
else
{
*(_QWORD *)(a1 + 152) = 0LL;
}
pthread_mutex_init(a1 + 32944, 0LL);
return 0LL;
}
| init:
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
MOV byte ptr [RAX + 0x8],0x1
MOV byte ptr [RAX + 0x9],0x1
MOV qword ptr [RAX + 0x10],0x1000000
MOV qword ptr [RAX + 0x98],0x1000
MOV qword ptr [RAX + 0xa0],0x1000
MOV qword ptr [RAX],0x0
MOV dword ptr [RAX + 0x18],0x0
MOV dword ptr [RAX + 0x58],0x0
MOV dword ptr [RBP + -0x14],0x0
LAB_0013c59a:
CMP dword ptr [RBP + -0x14],0x1000
JGE 0x0013c5c2
MOV RAX,qword ptr [RBP + -0x20]
MOVSXD RCX,dword ptr [RBP + -0x14]
MOV qword ptr [RAX + RCX*0x8 + 0xa8],0x0
MOV EAX,dword ptr [RBP + -0x14]
ADD EAX,0x1
MOV dword ptr [RBP + -0x14],EAX
JMP 0x0013c59a
LAB_0013c5c2:
CMP qword ptr [RBP + -0x10],0x0
JNZ 0x0013c5dd
MOV RAX,qword ptr [RBP + -0x20]
MOV qword ptr [RAX + 0x98],0x0
JMP 0x0013c68e
LAB_0013c5dd:
CMP qword ptr [RBP + -0x10],0x0
JLE 0x0013c684
MOV RAX,qword ptr [RBP + -0x10]
MOV ECX,0x1000
CQO
IDIV RCX
CMP RDX,0x0
JNZ 0x0013c61a
MOV RAX,qword ptr [RBP + -0x10]
MOV ECX,0x1000
CQO
IDIV RCX
MOV RCX,RAX
MOV RAX,qword ptr [RBP + -0x20]
MOV qword ptr [RAX + 0x98],RCX
JMP 0x0013c653
LAB_0013c61a:
MOV RAX,qword ptr [RBP + -0x10]
MOV ECX,0x1000
CQO
IDIV RCX
MOV RCX,RAX
MOV RAX,qword ptr [RBP + -0x20]
ADD RCX,0x1
MOV qword ptr [RAX + 0x98],RCX
MOV RAX,qword ptr [RBP + -0x10]
MOV ECX,0x1000
CQO
IDIV RCX
MOV RAX,qword ptr [RBP + -0x20]
MOV qword ptr [RAX + 0xa0],RDX
LAB_0013c653:
MOV RAX,qword ptr [RBP + -0x20]
MOV byte ptr [RAX + 0x9],0x0
CMP qword ptr [RAX + 0x98],0x1000
JBE 0x0013c682
MOV RAX,qword ptr [RBP + -0x20]
MOV qword ptr [RAX + 0x98],0x1000
MOV qword ptr [RAX + 0xa0],0x1000
LAB_0013c682:
JMP 0x0013c68c
LAB_0013c684:
MOV RAX,qword ptr [RBP + -0x20]
MOV byte ptr [RAX + 0x9],0x0
LAB_0013c68c:
JMP 0x0013c68e
LAB_0013c68e:
MOV RDI,qword ptr [RBP + -0x20]
ADD RDI,0x80b0
XOR EAX,EAX
MOV ESI,EAX
CALL 0x001264f0
XOR EAX,EAX
ADD RSP,0x20
POP RBP
RET
|
/* PFS_buffer_scalable_container<PFS_table_share, 4096, 4096,
PFS_buffer_default_array<PFS_table_share>, PFS_buffer_default_allocator<PFS_table_share>
>::init(long) */
int8 __thiscall
PFS_buffer_scalable_container<PFS_table_share,4096,4096,PFS_buffer_default_array<PFS_table_share>,PFS_buffer_default_allocator<PFS_table_share>>
::init(PFS_buffer_scalable_container<PFS_table_share,4096,4096,PFS_buffer_default_array<PFS_table_share>,PFS_buffer_default_allocator<PFS_table_share>>
*this,long param_1)
{
int local_1c;
this[8] = (PFS_buffer_scalable_container<PFS_table_share,4096,4096,PFS_buffer_default_array<PFS_table_share>,PFS_buffer_default_allocator<PFS_table_share>>
)0x1;
this[9] = (PFS_buffer_scalable_container<PFS_table_share,4096,4096,PFS_buffer_default_array<PFS_table_share>,PFS_buffer_default_allocator<PFS_table_share>>
)0x1;
*(int8 *)(this + 0x10) = 0x1000000;
*(int8 *)(this + 0x98) = 0x1000;
*(int8 *)(this + 0xa0) = 0x1000;
*(int8 *)this = 0;
*(int4 *)(this + 0x18) = 0;
*(int4 *)(this + 0x58) = 0;
for (local_1c = 0; local_1c < 0x1000; local_1c = local_1c + 1) {
*(int8 *)(this + (long)local_1c * 8 + 0xa8) = 0;
}
if (param_1 == 0) {
*(int8 *)(this + 0x98) = 0;
}
else if (param_1 < 1) {
this[9] = (PFS_buffer_scalable_container<PFS_table_share,4096,4096,PFS_buffer_default_array<PFS_table_share>,PFS_buffer_default_allocator<PFS_table_share>>
)0x0;
}
else {
if (param_1 % 0x1000 == 0) {
*(long *)(this + 0x98) = param_1 / 0x1000;
}
else {
*(long *)(this + 0x98) = param_1 / 0x1000 + 1;
*(long *)(this + 0xa0) = param_1 % 0x1000;
}
this[9] = (PFS_buffer_scalable_container<PFS_table_share,4096,4096,PFS_buffer_default_array<PFS_table_share>,PFS_buffer_default_allocator<PFS_table_share>>
)0x0;
if (0x1000 < *(ulong *)(this + 0x98)) {
*(int8 *)(this + 0x98) = 0x1000;
*(int8 *)(this + 0xa0) = 0x1000;
}
}
pthread_mutex_init((pthread_mutex_t *)(this + 0x80b0),(pthread_mutexattr_t *)0x0);
return 0;
}
| |
47,843 | testing::internal::String::FormatHexUInt32[abi:cxx11](unsigned int) | seiftnesse[P]memoryallocator/build_O1/_deps/googletest-src/googletest/src/gtest.cc | std::string String::FormatHexUInt32(uint32_t value) {
std::stringstream ss;
ss << std::hex << std::uppercase << value;
return ss.str();
} | O1 | cpp | testing::internal::String::FormatHexUInt32[abi:cxx11](unsigned int):
pushq %rbp
pushq %rbx
subq $0x188, %rsp # imm = 0x188
movl %esi, %ebp
movq %rdi, %rbx
movq %rsp, %rdi
callq 0x9330
leaq 0x10(%rsp), %rdi
movq (%rdi), %rax
movq -0x18(%rax), %rcx
movl 0x28(%rsp,%rcx), %edx
andl $-0x4b, %edx
orl $0x8, %edx
movl %edx, 0x28(%rsp,%rcx)
movq -0x18(%rax), %rax
orl $0x4000, 0x28(%rsp,%rax) # imm = 0x4000
movl %ebp, %esi
callq 0x9300
leaq 0x18(%rsp), %rsi
movq %rbx, %rdi
callq 0x98e0
movq 0x36bd3(%rip), %rsi # 0x59f88
movq %rsp, %rdi
callq 0x9380
leaq 0x80(%rsp), %rdi
callq 0x9190
movq %rbx, %rax
addq $0x188, %rsp # imm = 0x188
popq %rbx
popq %rbp
retq
movq %rax, %rbx
movq 0x36ba7(%rip), %rsi # 0x59f88
movq %rsp, %rdi
callq 0x9380
leaq 0x80(%rsp), %rdi
callq 0x9190
movq %rbx, %rdi
callq 0x99a0
| _ZN7testing8internal6String15FormatHexUInt32B5cxx11Ej:
push rbp
push rbx
sub rsp, 188h
mov ebp, esi
mov rbx, rdi
mov rdi, rsp
call __ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEEC1Ev; std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::basic_stringstream(void)
lea rdi, [rsp+198h+var_188]
mov rax, [rdi]
mov rcx, [rax-18h]
mov edx, [rsp+rcx+198h+var_170]
and edx, 0FFFFFFB5h
or edx, 8
mov [rsp+rcx+198h+var_170], edx
mov rax, [rax-18h]
or [rsp+rax+198h+var_170], 4000h
mov esi, ebp
call __ZNSo9_M_insertImEERSoT_; std::ostream::_M_insert<ulong>(ulong)
lea rsi, [rsp+198h+var_180]
mov rdi, rbx
call __ZNKSt7__cxx1115basic_stringbufIcSt11char_traitsIcESaIcEE3strEv; std::stringbuf::str(void)
mov rsi, cs:_ZTTNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEEE_ptr
mov rdi, rsp
call __ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEED2Ev; std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::~basic_stringstream()
lea rdi, [rsp+198h+var_118]; this
call __ZNSt8ios_baseD2Ev; std::ios_base::~ios_base()
mov rax, rbx
add rsp, 188h
pop rbx
pop rbp
retn
mov rbx, rax
mov rsi, cs:_ZTTNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEEE_ptr
mov rdi, rsp
call __ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEED2Ev; std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::~basic_stringstream()
lea rdi, [rsp+arg_78]; this
call __ZNSt8ios_baseD2Ev; std::ios_base::~ios_base()
mov rdi, rbx
call __Unwind_Resume
| long long testing::internal::String::FormatHexUInt32[abi:cxx11](long long a1, unsigned int a2)
{
long long v2; // rax
_BYTE v4[16]; // [rsp+0h] [rbp-198h] BYREF
long long v5; // [rsp+10h] [rbp-188h] BYREF
_BYTE v6[104]; // [rsp+18h] [rbp-180h] BYREF
_BYTE v7[280]; // [rsp+80h] [rbp-118h] BYREF
std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::basic_stringstream(v4);
v2 = v5;
*(_DWORD *)&v6[*(_QWORD *)(v5 - 24) + 16] = *(_DWORD *)&v6[*(_QWORD *)(v5 - 24) + 16] & 0xFFFFFFB5 | 8;
*(_DWORD *)&v6[*(_QWORD *)(v2 - 24) + 16] |= 0x4000u;
std::ostream::_M_insert<unsigned long>(&v5, a2);
std::stringbuf::str(a1, v6);
std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::~basic_stringstream(
v4,
&`VTT for'std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>);
std::ios_base::~ios_base((std::ios_base *)v7);
return a1;
}
| FormatHexUInt32[abi:cxx11]:
PUSH RBP
PUSH RBX
SUB RSP,0x188
MOV EBP,ESI
MOV RBX,RDI
MOV RDI,RSP
CALL 0x00109330
LEA RDI,[RSP + 0x10]
MOV RAX,qword ptr [RDI]
MOV RCX,qword ptr [RAX + -0x18]
MOV EDX,dword ptr [RSP + RCX*0x1 + 0x28]
AND EDX,0xffffffb5
OR EDX,0x8
MOV dword ptr [RSP + RCX*0x1 + 0x28],EDX
MOV RAX,qword ptr [RAX + -0x18]
OR dword ptr [RSP + RAX*0x1 + 0x28],0x4000
MOV ESI,EBP
LAB_0012339c:
CALL 0x00109300
LEA RSI,[RSP + 0x18]
MOV RDI,RBX
CALL 0x001098e0
LAB_001233ae:
MOV RSI,qword ptr [0x00159f88]
MOV RDI,RSP
CALL 0x00109380
LEA RDI,[RSP + 0x80]
CALL 0x00109190
MOV RAX,RBX
ADD RSP,0x188
POP RBX
POP RBP
RET
|
/* testing::internal::String::FormatHexUInt32[abi:cxx11](unsigned int) */
int8 testing::internal::String::FormatHexUInt32_abi_cxx11_(uint param_1)
{
uint *puVar1;
int4 in_register_0000003c;
stringstream asStack_198 [16];
long local_188 [3];
uint auStack_170 [22];
ios_base local_118 [264];
std::__cxx11::stringstream::stringstream(asStack_198);
*(uint *)((long)auStack_170 + *(long *)(local_188[0] + -0x18)) =
*(uint *)((long)auStack_170 + *(long *)(local_188[0] + -0x18)) & 0xffffffb5 | 8;
puVar1 = (uint *)((long)auStack_170 + *(long *)(local_188[0] + -0x18));
*puVar1 = *puVar1 | 0x4000;
/* try { // try from 0012339c to 001233ad has its CatchHandler @ 001233d7 */
std::ostream::_M_insert<unsigned_long>((ulong)local_188);
std::__cxx11::stringbuf::str();
std::__cxx11::stringstream::~stringstream(asStack_198);
std::ios_base::~ios_base(local_118);
return CONCAT44(in_register_0000003c,param_1);
}
| |
47,844 | nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>> 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>::erase<nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>, 0>(nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>) | monkey531[P]llama/common/json.hpp | IteratorType erase(IteratorType pos)
{
// make sure iterator fits the current value
if (JSON_HEDLEY_UNLIKELY(this != pos.m_object))
{
JSON_THROW(invalid_iterator::create(202, "iterator does not fit current value", this));
}
IteratorType result = end();
switch (m_data.m_type)
{
case value_t::boolean:
case value_t::number_float:
case value_t::number_integer:
case value_t::number_unsigned:
case value_t::string:
case value_t::binary:
{
if (JSON_HEDLEY_UNLIKELY(!pos.m_it.primitive_iterator.is_begin()))
{
JSON_THROW(invalid_iterator::create(205, "iterator out of range", this));
}
if (is_string())
{
AllocatorType<string_t> alloc;
std::allocator_traits<decltype(alloc)>::destroy(alloc, m_data.m_value.string);
std::allocator_traits<decltype(alloc)>::deallocate(alloc, m_data.m_value.string, 1);
m_data.m_value.string = nullptr;
}
else if (is_binary())
{
AllocatorType<binary_t> alloc;
std::allocator_traits<decltype(alloc)>::destroy(alloc, m_data.m_value.binary);
std::allocator_traits<decltype(alloc)>::deallocate(alloc, m_data.m_value.binary, 1);
m_data.m_value.binary = nullptr;
}
m_data.m_type = value_t::null;
assert_invariant();
break;
}
case value_t::object:
{
result.m_it.object_iterator = m_data.m_value.object->erase(pos.m_it.object_iterator);
break;
}
case value_t::array:
{
result.m_it.array_iterator = m_data.m_value.array->erase(pos.m_it.array_iterator);
break;
}
case value_t::null:
case value_t::discarded:
default:
JSON_THROW(type_error::create(307, detail::concat("cannot use erase() with ", type_name()), this));
}
return result;
} | O1 | cpp | nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>> 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>::erase<nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>, 0>(nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>):
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x30, %rsp
movq %rsi, %r14
cmpq %rsi, (%rdx)
jne 0x5d22a
movq %rdx, %r15
movq %rdi, %rbx
movq %r14, %rsi
callq 0x5cf90
movzbl (%r14), %eax
leal -0x3(%rax), %ecx
cmpl $0x6, %ecx
jae 0x5d19b
cmpq $0x0, 0x18(%r15)
jne 0x5d28d
cmpl $0x8, %eax
je 0x5d1bc
cmpl $0x3, %eax
jne 0x5d1f2
leaq 0x8(%r14), %r12
movq 0x8(%r14), %rax
movq (%rax), %rdi
addq $0x10, %rax
movl $0x20, %r15d
cmpq %rax, %rdi
je 0x5d1de
movq (%rax), %rsi
incq %rsi
jmp 0x5d1d9
cmpl $0x1, %eax
je 0x5d213
cmpl $0x2, %eax
jne 0x5d2ed
movq 0x8(%r14), %rdi
movq 0x10(%r15), %rsi
callq 0x5e89c
movq %rax, 0x10(%rbx)
jmp 0x5d203
leaq 0x8(%r14), %r12
movq 0x8(%r14), %rax
movq (%rax), %rdi
movl $0x28, %r15d
testq %rdi, %rdi
je 0x5d1de
movq 0x10(%rax), %rsi
subq %rdi, %rsi
callq 0x1b8b0
movq (%r12), %rdi
movq %r15, %rsi
callq 0x1b8b0
movq $0x0, (%r12)
movb $0x0, (%r14)
movq %r14, %rdi
movl $0x1, %esi
callq 0x57bfe
movq %rbx, %rax
addq $0x30, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq 0x8(%r14), %rdi
movq 0x8(%r15), %rsi
leaq 0x30(%rsi), %rdx
callq 0x5e454
movq %rax, 0x8(%rbx)
jmp 0x5d203
movl $0x20, %edi
callq 0x1b440
movq %rax, %rbx
leaq 0x18(%rsp), %r15
movq %r15, -0x10(%r15)
leaq 0x93a79(%rip), %rsi # 0xf0cc0
leaq 0x93a95(%rip), %rdx # 0xf0ce3
leaq 0x8(%rsp), %rdi
callq 0x21d38
movb $0x1, %bpl
leaq 0x8(%rsp), %rdx
movq %rbx, %rdi
movl $0xca, %esi
movq %r14, %rcx
callq 0x5df74
xorl %ebp, %ebp
leaq 0xd0c3f(%rip), %rsi # 0x12deb8
leaq -0x2d0a(%rip), %rdx # 0x5a576
movq %rbx, %rdi
callq 0x1bef0
jmp 0x5d34b
movl $0x20, %edi
callq 0x1b440
movq %rax, %rbx
leaq 0x18(%rsp), %r15
movq %r15, -0x10(%r15)
leaq 0x93a3a(%rip), %rsi # 0xf0ce4
leaq 0x93a48(%rip), %rdx # 0xf0cf9
leaq 0x8(%rsp), %rdi
callq 0x21d38
movb $0x1, %bpl
leaq 0x8(%rsp), %rdx
movq %rbx, %rdi
movl $0xcd, %esi
movq %r14, %rcx
callq 0x5df74
xorl %ebp, %ebp
leaq 0xd0bdc(%rip), %rsi # 0x12deb8
leaq -0x2d6d(%rip), %rdx # 0x5a576
movq %rbx, %rdi
callq 0x1bef0
jmp 0x5d34b
movl $0x20, %edi
callq 0x1b440
movq %rax, %rbx
movq %r14, %rdi
callq 0x5e434
leaq 0x28(%rsp), %rdx
movq %rax, (%rdx)
leaq 0x939e9(%rip), %rsi # 0xf0cfa
leaq 0x8(%rsp), %rdi
callq 0x5e3ab
movb $0x1, %bpl
leaq 0x8(%rsp), %rdx
movq %rbx, %rdi
movl $0x133, %esi # imm = 0x133
movq %r14, %rcx
callq 0x5e1dc
xorl %ebp, %ebp
leaq 0xd0bbc(%rip), %rsi # 0x12def8
leaq -0x2dcd(%rip), %rdx # 0x5a576
movq %rbx, %rdi
callq 0x1bef0
movq %rax, %r14
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
jne 0x5d371
jmp 0x5d386
jmp 0x5d380
jmp 0x5d364
jmp 0x5d380
movq %rax, %r14
movq 0x8(%rsp), %rdi
cmpq %r15, %rdi
je 0x5d386
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x1b8b0
jmp 0x5d386
movq %rax, %r14
movb $0x1, %bpl
testb %bpl, %bpl
je 0x5d393
movq %rbx, %rdi
callq 0x1b650
movq %r14, %rdi
callq 0x1bf70
nop
| _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE5eraseINS0_6detail9iter_implISD_EETnNSt9enable_ifIXoosr3std7is_sameIT_SH_EE5valuesr3std7is_sameISJ_NSG_IKSD_EEEE5valueEiE4typeELi0EEESJ_SJ_:
push rbp; int
push r15; int
push r14; char
push r12; int
push rbx; __int64
sub rsp, 30h
mov r14, rsi
cmp [rdx], rsi
jnz loc_5D22A
mov r15, rdx
mov rbx, rdi
mov rsi, r14
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE3endEv; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::end(void)
movzx eax, byte ptr [r14]
lea ecx, [rax-3]
cmp ecx, 6
jnb short loc_5D19B
cmp qword ptr [r15+18h], 0
jnz loc_5D28D
cmp eax, 8
jz short loc_5D1BC
cmp eax, 3
jnz short loc_5D1F2
lea r12, [r14+8]
mov rax, [r14+8]
mov rdi, [rax]
add rax, 10h
mov r15d, 20h ; ' '
cmp rdi, rax
jz short loc_5D1DE
mov rsi, [rax]
inc rsi
jmp short loc_5D1D9
loc_5D19B:
cmp eax, 1
jz short loc_5D213
cmp eax, 2
jnz loc_5D2ED
mov rdi, [r14+8]
mov rsi, [r15+10h]
call _ZNSt6vectorIN8nlohmann16json_abi_v3_11_310basic_jsonINS1_11ordered_mapES_NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES_IhSaIhEEvEESaISD_EE8_M_eraseEN9__gnu_cxx17__normal_iteratorIPSD_SF_EE; 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>>::_M_erase(__gnu_cxx::__normal_iterator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>*,std::vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>>)
mov [rbx+10h], rax
jmp short loc_5D203
loc_5D1BC:
lea r12, [r14+8]
mov rax, [r14+8]
mov rdi, [rax]; void *
mov r15d, 28h ; '('
test rdi, rdi
jz short loc_5D1DE
mov rsi, [rax+10h]
sub rsi, rdi; unsigned __int64
loc_5D1D9:
call __ZdlPvm; operator delete(void *,ulong)
loc_5D1DE:
mov rdi, [r12]; void *
mov rsi, r15; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
mov qword ptr [r12], 0
loc_5D1F2:
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)
loc_5D203:
mov rax, rbx
add rsp, 30h
pop rbx
pop r12
pop r14
pop r15
pop rbp
retn
loc_5D213:
mov rdi, [r14+8]
mov rsi, [r15+8]
lea rdx, [rsi+30h]
call _ZN8nlohmann16json_abi_v3_11_311ordered_mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS0_10basic_jsonIS1_St6vectorS7_blmdSaNS0_14adl_serializerES9_IhSaIhEEvEESt4lessIvESaISt4pairIKS7_SD_EEE5eraseEN9__gnu_cxx17__normal_iteratorIPSI_S9_ISI_SJ_EEESP_; nlohmann::json_abi_v3_11_3::ordered_map<std::string,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>,std::less<void>,std::allocator<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>>>::erase(__gnu_cxx::__normal_iterator<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>*,std::vector<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>>>,__gnu_cxx::__normal_iterator<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>*,std::vector<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>>>)
mov [rbx+8], rax
jmp short loc_5D203
loc_5D22A:
mov edi, 20h ; ' '; thrown_size
call ___cxa_allocate_exception
mov rbx, rax
lea r15, [rsp+58h+var_40]
mov [r15-10h], r15
lea rsi, aIteratorDoesNo; "iterator does not fit current value"
lea rdx, aIteratorDoesNo+23h; ""
lea rdi, [rsp+58h+var_50]
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag; std::string::_M_construct<char const*>(char const*,char const*,std::forward_iterator_tag)
mov bpl, 1
lea rdx, [rsp+58h+var_50]
mov rdi, rbx; this
mov esi, 0CAh; int
mov rcx, r14
call _ZN8nlohmann16json_abi_v3_11_36detail16invalid_iterator6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_
xor ebp, ebp
lea rsi, _ZTIN8nlohmann16json_abi_v3_11_36detail16invalid_iteratorE; lptinfo
lea rdx, _ZN8nlohmann16json_abi_v3_11_36detail9exceptionD2Ev; void (*)(void *)
mov rdi, rbx; void *
call ___cxa_throw
jmp loc_5D34B
loc_5D28D:
mov edi, 20h ; ' '; thrown_size
call ___cxa_allocate_exception
mov rbx, rax
lea r15, [rsp+58h+var_40]
mov [r15-10h], r15
lea rsi, aIteratorOutOfR; "iterator out of range"
lea rdx, aIteratorOutOfR+15h; ""
lea rdi, [rsp+58h+var_50]
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag; std::string::_M_construct<char const*>(char const*,char const*,std::forward_iterator_tag)
mov bpl, 1
lea rdx, [rsp+58h+var_50]
mov rdi, rbx; this
mov esi, 0CDh; int
mov rcx, r14
call _ZN8nlohmann16json_abi_v3_11_36detail16invalid_iterator6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_
xor ebp, ebp
lea rsi, _ZTIN8nlohmann16json_abi_v3_11_36detail16invalid_iteratorE; lptinfo
lea rdx, _ZN8nlohmann16json_abi_v3_11_36detail9exceptionD2Ev; void (*)(void *)
mov rdi, rbx; void *
call ___cxa_throw
jmp short loc_5D34B
loc_5D2ED:
mov edi, 20h ; ' '; thrown_size
call ___cxa_allocate_exception
mov rbx, rax
mov rdi, r14
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE9type_nameEv; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::type_name(void)
lea rdx, [rsp+58h+var_30]
mov [rdx], rax
lea rsi, aCannotUseErase; "cannot use erase() with "
lea rdi, [rsp+58h+var_50]
call _ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJRA25_KcPS9_EEET_DpOT0_; nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[25],char const*>(char const(&)[25],char const* &&)
mov bpl, 1
lea rdx, [rsp+58h+var_50]
mov rdi, rbx; this
mov esi, 133h; int
mov rcx, r14
call _ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_
xor ebp, ebp
lea rsi, _ZTIN8nlohmann16json_abi_v3_11_36detail10type_errorE; lptinfo
lea rdx, _ZN8nlohmann16json_abi_v3_11_36detail9exceptionD2Ev; void (*)(void *)
mov rdi, rbx; void *
call ___cxa_throw
loc_5D34B:
mov r14, rax
lea rax, [rsp+58h+var_40]
mov rdi, [rax-10h]
cmp rdi, rax
jnz short loc_5D371
jmp short loc_5D386
jmp short loc_5D380
jmp short loc_5D364
jmp short loc_5D380
loc_5D364:
mov r14, rax
mov rdi, [rsp+58h+var_50]; void *
cmp rdi, r15
jz short loc_5D386
loc_5D371:
mov rsi, [rsp+58h+var_40]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_5D386
loc_5D380:
mov r14, rax
mov bpl, 1
loc_5D386:
test bpl, bpl
jz short loc_5D393
mov rdi, rbx; void *
call ___cxa_free_exception
loc_5D393:
mov rdi, r14
call __Unwind_Resume
| _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE5eraseINS0_6detail9iter_implISD_EETnNSt9enable_ifIXoosr3std7is_sameIT_SH_EE5valuesr3std7is_sameISJ_NSG_IKSD_EEEE5valueEiE4typeELi0EEESJ_SJ_:
PUSH RBP
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
SUB RSP,0x30
MOV R14,RSI
CMP qword ptr [RDX],RSI
JNZ 0x0015d22a
MOV R15,RDX
MOV RBX,RDI
MOV RSI,R14
CALL 0x0015cf90
MOVZX EAX,byte ptr [R14]
LEA ECX,[RAX + -0x3]
CMP ECX,0x6
JNC 0x0015d19b
CMP qword ptr [R15 + 0x18],0x0
JNZ 0x0015d28d
CMP EAX,0x8
JZ 0x0015d1bc
CMP EAX,0x3
JNZ 0x0015d1f2
LEA R12,[R14 + 0x8]
MOV RAX,qword ptr [R14 + 0x8]
MOV RDI,qword ptr [RAX]
ADD RAX,0x10
MOV R15D,0x20
CMP RDI,RAX
JZ 0x0015d1de
MOV RSI,qword ptr [RAX]
INC RSI
JMP 0x0015d1d9
LAB_0015d19b:
CMP EAX,0x1
JZ 0x0015d213
CMP EAX,0x2
JNZ 0x0015d2ed
MOV RDI,qword ptr [R14 + 0x8]
MOV RSI,qword ptr [R15 + 0x10]
CALL 0x0015e89c
MOV qword ptr [RBX + 0x10],RAX
JMP 0x0015d203
LAB_0015d1bc:
LEA R12,[R14 + 0x8]
MOV RAX,qword ptr [R14 + 0x8]
MOV RDI,qword ptr [RAX]
MOV R15D,0x28
TEST RDI,RDI
JZ 0x0015d1de
MOV RSI,qword ptr [RAX + 0x10]
SUB RSI,RDI
LAB_0015d1d9:
CALL 0x0011b8b0
LAB_0015d1de:
MOV RDI,qword ptr [R12]
MOV RSI,R15
CALL 0x0011b8b0
MOV qword ptr [R12],0x0
LAB_0015d1f2:
MOV byte ptr [R14],0x0
MOV RDI,R14
MOV ESI,0x1
CALL 0x00157bfe
LAB_0015d203:
MOV RAX,RBX
ADD RSP,0x30
POP RBX
POP R12
POP R14
POP R15
POP RBP
RET
LAB_0015d213:
MOV RDI,qword ptr [R14 + 0x8]
MOV RSI,qword ptr [R15 + 0x8]
LEA RDX,[RSI + 0x30]
CALL 0x0015e454
MOV qword ptr [RBX + 0x8],RAX
JMP 0x0015d203
LAB_0015d22a:
MOV EDI,0x20
CALL 0x0011b440
MOV RBX,RAX
LEA R15,[RSP + 0x18]
MOV qword ptr [R15 + -0x10],R15
LAB_0015d240:
LEA RSI,[0x1f0cc0]
LEA RDX,[0x1f0ce3]
LEA RDI,[RSP + 0x8]
CALL 0x00121d38
MOV BPL,0x1
LAB_0015d25b:
LEA RDX,[RSP + 0x8]
MOV RDI,RBX
MOV ESI,0xca
MOV RCX,R14
CALL 0x0015df74
XOR EBP,EBP
LEA RSI,[0x22deb8]
LEA RDX,[0x15a576]
MOV RDI,RBX
CALL 0x0011bef0
LAB_0015d28d:
MOV EDI,0x20
CALL 0x0011b440
MOV RBX,RAX
LEA R15,[RSP + 0x18]
MOV qword ptr [R15 + -0x10],R15
LAB_0015d2a3:
LEA RSI,[0x1f0ce4]
LEA RDX,[0x1f0cf9]
LEA RDI,[RSP + 0x8]
CALL 0x00121d38
MOV BPL,0x1
LAB_0015d2be:
LEA RDX,[RSP + 0x8]
MOV RDI,RBX
MOV ESI,0xcd
MOV RCX,R14
CALL 0x0015df74
XOR EBP,EBP
LEA RSI,[0x22deb8]
LEA RDX,[0x15a576]
MOV RDI,RBX
CALL 0x0011bef0
LAB_0015d2ed:
MOV EDI,0x20
CALL 0x0011b440
MOV RBX,RAX
MOV RDI,R14
CALL 0x0015e434
LEA RDX,[RSP + 0x28]
MOV qword ptr [RDX],RAX
LAB_0015d30a:
LEA RSI,[0x1f0cfa]
LEA RDI,[RSP + 0x8]
CALL 0x0015e3ab
MOV BPL,0x1
LAB_0015d31e:
LEA RDX,[RSP + 0x8]
MOV RDI,RBX
MOV ESI,0x133
MOV RCX,R14
CALL 0x0015e1dc
XOR EBP,EBP
LEA RSI,[0x22def8]
LEA RDX,[0x15a576]
MOV RDI,RBX
CALL 0x0011bef0
|
long _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE5eraseINS0_6detail9iter_implISD_EETnNSt9enable_ifIXoosr3std7is_sameIT_SH_EE5valuesr3std7is_sameISJ_NSG_IKSD_EEEE5valueEiE4typeELi0EEESJ_SJ_
(long param_1,
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
*param_2,long *param_3)
{
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
bVar1;
long *plVar2;
int8 uVar3;
ulong uVar4;
long *plVar5;
ulong uVar6;
int1 *local_50 [2];
int1 local_40 [16];
char *local_30;
if ((basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
*)*param_3 != param_2) {
uVar3 = __cxa_allocate_exception(0x20);
local_50[0] = local_40;
/* try { // try from 0015d240 to 0015d257 has its CatchHandler @ 0015d380 */
std::__cxx11::string::_M_construct<char_const*>
(local_50,"iterator does not fit current value","");
/* try { // try from 0015d25b to 0015d287 has its CatchHandler @ 0015d364 */
_ZN8nlohmann16json_abi_v3_11_36detail16invalid_iterator6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_
(uVar3,0xca,local_50,param_2);
/* WARNING: Subroutine does not return */
__cxa_throw(uVar3,&nlohmann::json_abi_v3_11_3::detail::invalid_iterator::typeinfo,
nlohmann::json_abi_v3_11_3::detail::exception::~exception);
}
nlohmann::json_abi_v3_11_3::
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::end();
bVar1 = *param_2;
if (5 < (byte)bVar1 - 3) {
if (bVar1 == (basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
)0x1) {
uVar3 = 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>>>>
::erase(*(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>>>>
**)(param_2 + 8),param_3[1],param_3[1] + 0x30);
*(int8 *)(param_1 + 8) = uVar3;
return param_1;
}
if (bVar1 == (basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
)0x2) {
uVar3 = 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>>>
::_M_erase(*(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>>>
**)(param_2 + 8),param_3[2]);
*(int8 *)(param_1 + 0x10) = uVar3;
return param_1;
}
uVar3 = __cxa_allocate_exception(0x20);
local_30 = (char *)nlohmann::json_abi_v3_11_3::
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::type_name(param_2);
/* try { // try from 0015d30a to 0015d31a has its CatchHandler @ 0015d35e */
nlohmann::json_abi_v3_11_3::detail::concat<std::__cxx11::string,char_const(&)[25],char_const*>
((detail *)local_50,"cannot use erase() with ",&local_30);
/* try { // try from 0015d31e to 0015d34a has its CatchHandler @ 0015d34b */
_ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_
(uVar3,0x133,local_50,param_2);
/* WARNING: Subroutine does not return */
__cxa_throw(uVar3,&nlohmann::json_abi_v3_11_3::detail::type_error::typeinfo,
nlohmann::json_abi_v3_11_3::detail::exception::~exception);
}
if (param_3[3] != 0) {
uVar3 = __cxa_allocate_exception(0x20);
local_50[0] = local_40;
/* try { // try from 0015d2a3 to 0015d2ba has its CatchHandler @ 0015d362 */
std::__cxx11::string::_M_construct<char_const*>(local_50,"iterator out of range","");
/* try { // try from 0015d2be to 0015d2ea has its CatchHandler @ 0015d360 */
_ZN8nlohmann16json_abi_v3_11_36detail16invalid_iterator6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_
(uVar3,0xcd,local_50,param_2);
/* WARNING: Subroutine does not return */
__cxa_throw(uVar3,&nlohmann::json_abi_v3_11_3::detail::invalid_iterator::typeinfo,
nlohmann::json_abi_v3_11_3::detail::exception::~exception);
}
if (bVar1 == (basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
)0x8) {
plVar5 = (long *)**(long **)(param_2 + 8);
uVar6 = 0x28;
if (plVar5 != (long *)0x0) {
uVar4 = (*(long **)(param_2 + 8))[2] - (long)plVar5;
LAB_0015d1d9:
operator_delete(plVar5,uVar4);
}
}
else {
if (bVar1 != (basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
)0x3) goto LAB_0015d1f2;
plVar5 = (long *)**(long **)(param_2 + 8);
plVar2 = *(long **)(param_2 + 8) + 2;
uVar6 = 0x20;
if (plVar5 != plVar2) {
uVar4 = *plVar2 + 1;
goto LAB_0015d1d9;
}
}
operator_delete(*(void **)(param_2 + 8),uVar6);
*(int8 *)(param_2 + 8) = 0;
LAB_0015d1f2:
*param_2 = (basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
)0x0;
nlohmann::json_abi_v3_11_3::
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::assert_invariant(SUB81(param_2,0));
return param_1;
}
| ||
47,845 | ma_net_flush | eloqsql/libmariadb/libmariadb/ma_net.c | int ma_net_flush(NET *net)
{
int error=0;
/* don't flush if pipelined query is in progress */
if (net->extension->multi_status > COM_MULTI_OFF)
return 0;
if (net->buff != net->write_pos)
{
error=ma_net_real_write(net,(char*) net->buff,
(size_t) (net->write_pos - net->buff));
net->write_pos=net->buff;
}
if (net->compress)
net->pkt_nr= net->compress_pkt_nr;
return(error);
} | O0 | c | ma_net_flush:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movl $0x0, -0x14(%rbp)
movq -0x10(%rbp), %rax
movq 0x2a0(%rax), %rax
cmpl $0x0, (%rax)
jbe 0x6ae7c
movl $0x0, -0x4(%rbp)
jmp 0x6aee6
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movq -0x10(%rbp), %rcx
cmpq 0x18(%rcx), %rax
je 0x6aec5
movq -0x10(%rbp), %rdi
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rsi
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rdx
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
subq %rax, %rdx
callq 0x6aef0
movl %eax, -0x14(%rbp)
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x18(%rax)
movq -0x10(%rbp), %rax
cmpb $0x0, 0x84(%rax)
je 0x6aee0
movq -0x10(%rbp), %rax
movl 0x64(%rax), %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x60(%rax)
movl -0x14(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nop
| ma_net_flush:
push rbp
mov rbp, rsp
sub rsp, 20h
mov [rbp+var_10], rdi
mov [rbp+var_14], 0
mov rax, [rbp+var_10]
mov rax, [rax+2A0h]
cmp dword ptr [rax], 0
jbe short loc_6AE7C
mov [rbp+var_4], 0
jmp short loc_6AEE6
loc_6AE7C:
mov rax, [rbp+var_10]
mov rax, [rax+8]
mov rcx, [rbp+var_10]
cmp rax, [rcx+18h]
jz short loc_6AEC5
mov rdi, [rbp+var_10]
mov rax, [rbp+var_10]
mov rsi, [rax+8]
mov rax, [rbp+var_10]
mov rdx, [rax+18h]
mov rax, [rbp+var_10]
mov rax, [rax+8]
sub rdx, rax
call ma_net_real_write
mov [rbp+var_14], eax
mov rax, [rbp+var_10]
mov rcx, [rax+8]
mov rax, [rbp+var_10]
mov [rax+18h], rcx
loc_6AEC5:
mov rax, [rbp+var_10]
cmp byte ptr [rax+84h], 0
jz short loc_6AEE0
mov rax, [rbp+var_10]
mov ecx, [rax+64h]
mov rax, [rbp+var_10]
mov [rax+60h], ecx
loc_6AEE0:
mov eax, [rbp+var_14]
mov [rbp+var_4], eax
loc_6AEE6:
mov eax, [rbp+var_4]
add rsp, 20h
pop rbp
retn
| long long ma_net_flush(long long a1)
{
unsigned int v2; // [rsp+Ch] [rbp-14h]
v2 = 0;
if ( **(_DWORD **)(a1 + 672) )
{
return 0;
}
else
{
if ( *(_QWORD *)(a1 + 8) != *(_QWORD *)(a1 + 24) )
{
v2 = ma_net_real_write(a1, *(_QWORD *)(a1 + 8), *(_QWORD *)(a1 + 24) - *(_QWORD *)(a1 + 8));
*(_QWORD *)(a1 + 24) = *(_QWORD *)(a1 + 8);
}
if ( *(_BYTE *)(a1 + 132) )
*(_DWORD *)(a1 + 96) = *(_DWORD *)(a1 + 100);
return v2;
}
}
| ma_net_flush:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x20
MOV qword ptr [RBP + -0x10],RDI
MOV dword ptr [RBP + -0x14],0x0
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x2a0]
CMP dword ptr [RAX],0x0
JBE 0x0016ae7c
MOV dword ptr [RBP + -0x4],0x0
JMP 0x0016aee6
LAB_0016ae7c:
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x8]
MOV RCX,qword ptr [RBP + -0x10]
CMP RAX,qword ptr [RCX + 0x18]
JZ 0x0016aec5
MOV RDI,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RAX + 0x8]
MOV RAX,qword ptr [RBP + -0x10]
MOV RDX,qword ptr [RAX + 0x18]
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x8]
SUB RDX,RAX
CALL 0x0016aef0
MOV dword ptr [RBP + -0x14],EAX
MOV RAX,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RAX + 0x8]
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RAX + 0x18],RCX
LAB_0016aec5:
MOV RAX,qword ptr [RBP + -0x10]
CMP byte ptr [RAX + 0x84],0x0
JZ 0x0016aee0
MOV RAX,qword ptr [RBP + -0x10]
MOV ECX,dword ptr [RAX + 0x64]
MOV RAX,qword ptr [RBP + -0x10]
MOV dword ptr [RAX + 0x60],ECX
LAB_0016aee0:
MOV EAX,dword ptr [RBP + -0x14]
MOV dword ptr [RBP + -0x4],EAX
LAB_0016aee6:
MOV EAX,dword ptr [RBP + -0x4]
ADD RSP,0x20
POP RBP
RET
|
int4 ma_net_flush(long param_1)
{
int4 local_1c;
int4 local_c;
local_1c = 0;
if (**(int **)(param_1 + 0x2a0) == 0) {
if (*(long *)(param_1 + 8) != *(long *)(param_1 + 0x18)) {
local_1c = ma_net_real_write(param_1,*(int8 *)(param_1 + 8),
*(long *)(param_1 + 0x18) - *(long *)(param_1 + 8));
*(int8 *)(param_1 + 0x18) = *(int8 *)(param_1 + 8);
}
if (*(char *)(param_1 + 0x84) != '\0') {
*(int4 *)(param_1 + 0x60) = *(int4 *)(param_1 + 100);
}
local_c = local_1c;
}
else {
local_c = 0;
}
return local_c;
}
| |
47,846 | httplib::detail::write_response_line(httplib::Stream&, int) | monkey531[P]llama/examples/server/httplib.h | inline ssize_t write_response_line(Stream &strm, int status) {
std::string s = "HTTP/1.1 ";
s += std::to_string(status);
s += " ";
s += httplib::status_message(status);
s += "\r\n";
return strm.write(s.data(), s.size());
} | O1 | c | httplib::detail::write_response_line(httplib::Stream&, int):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movl %esi, %ebp
movq %rdi, %rbx
leaq 0x18(%rsp), %rax
movq %rax, -0x10(%rax)
leaq 0xea25f(%rip), %rsi # 0x14d1ce
leaq 0xea261(%rip), %rdx # 0x14d1d7
leaq 0x8(%rsp), %rdi
callq 0x4c588
movl %ebp, %r14d
negl %r14d
cmovsl %ebp, %r14d
movl $0x1, %r15d
cmpl $0xa, %r14d
jb 0x62fe0
movl $0x4, %r15d
movl $0xd1b71759, %eax # imm = 0xD1B71759
movl %r14d, %ecx
cmpl $0x63, %ecx
jbe 0x62fd7
cmpl $0x3e7, %ecx # imm = 0x3E7
jbe 0x62fdd
cmpl $0x2710, %ecx # imm = 0x2710
jb 0x62fe0
movl %ecx, %edx
imulq %rax, %rdx
shrq $0x2d, %rdx
addl $0x4, %r15d
cmpl $0x1869f, %ecx # imm = 0x1869F
movl %edx, %ecx
ja 0x62fa4
addl $-0x3, %r15d
jmp 0x62fe0
addl $-0x2, %r15d
jmp 0x62fe0
decl %r15d
movl %ebp, %r12d
shrl $0x1f, %r12d
leal (%r15,%r12), %esi
leaq 0x38(%rsp), %r13
movq %r13, -0x10(%r13)
leaq 0x28(%rsp), %rdi
movl $0x2d, %edx
callq 0x1fc80
movl %r12d, %edi
addq 0x28(%rsp), %rdi
movl %r15d, %esi
movl %r14d, %edx
callq 0x43d16
movq 0x28(%rsp), %rsi
movq 0x30(%rsp), %rdx
leaq 0x8(%rsp), %rdi
callq 0x1f310
movq 0x28(%rsp), %rdi
cmpq %r13, %rdi
je 0x63041
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x1fae0
leaq 0xfb0b5(%rip), %rsi # 0x15e0fd
leaq 0x8(%rsp), %rdi
callq 0x20520
movl %ebp, %edi
callq 0x6c017
leaq 0x8(%rsp), %rdi
movq %rax, %rsi
callq 0x20520
leaq 0xea122(%rip), %rsi # 0x14d18f
leaq 0x8(%rsp), %rdi
callq 0x20520
movq 0x8(%rsp), %rsi
movq 0x10(%rsp), %rdx
movq (%rbx), %rax
movq %rbx, %rdi
callq *0x28(%rax)
movq %rax, %rbx
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0x630a9
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x1fae0
movq %rbx, %rax
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq 0x28(%rsp), %rdi
cmpq %r13, %rdi
je 0x630dc
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x1fae0
jmp 0x630dc
jmp 0x630d9
movq %rax, %rbx
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0x630f8
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x1fae0
movq %rbx, %rdi
callq 0x20380
| _ZN7httplib6detail19write_response_lineERNS_6StreamEi:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 48h
mov ebp, esi
mov rbx, rdi
lea rax, [rsp+78h+var_60]
mov [rax-10h], rax
lea rsi, aHttp11_0; "HTTP/1.1 "
lea rdx, aHttp11_0+9; ""
lea rdi, [rsp+78h+var_70]
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 r14d, ebp
neg r14d
cmovs r14d, ebp
mov r15d, 1
cmp r14d, 0Ah
jb short loc_62FE0
mov r15d, 4
mov eax, 0D1B71759h
mov ecx, r14d
loc_62FA4:
cmp ecx, 63h ; 'c'
jbe short loc_62FD7
cmp ecx, 3E7h
jbe short loc_62FDD
cmp ecx, 2710h
jb short loc_62FE0
mov edx, ecx
imul rdx, rax
shr rdx, 2Dh
add r15d, 4
cmp ecx, 1869Fh
mov ecx, edx
ja short loc_62FA4
add r15d, 0FFFFFFFDh
jmp short loc_62FE0
loc_62FD7:
add r15d, 0FFFFFFFEh
jmp short loc_62FE0
loc_62FDD:
dec r15d
loc_62FE0:
mov r12d, ebp
shr r12d, 1Fh
lea esi, [r15+r12]
lea r13, [rsp+78h+var_40]
mov [r13-10h], r13
lea rdi, [rsp+78h+var_50]
mov edx, 2Dh ; '-'
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructEmc; std::string::_M_construct(ulong,char)
mov edi, r12d
add rdi, [rsp+78h+var_50]
mov esi, r15d
mov edx, r14d
call _ZNSt8__detail18__to_chars_10_implIjEEvPcjT_; std::__detail::__to_chars_10_impl<uint>(char *,uint,uint)
mov rsi, [rsp+78h+var_50]
mov rdx, [rsp+78h+var_48]
lea rdi, [rsp+78h+var_70]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_appendEPKcm; std::string::_M_append(char const*,ulong)
mov rdi, [rsp+78h+var_50]; void *
cmp rdi, r13
jz short loc_63041
mov rsi, [rsp+78h+var_40]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_63041:
lea rsi, aForMessageInMe+144h; int
lea rdi, [rsp+78h+var_70]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendEPKc; std::string::append(char const*)
mov edi, ebp; this
call _ZN7httplib14status_messageEi; httplib::status_message(int)
lea rdi, [rsp+78h+var_70]
mov rsi, rax
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendEPKc; std::string::append(char const*)
lea rsi, a0+1; "\r\n"
lea rdi, [rsp+78h+var_70]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendEPKc; std::string::append(char const*)
mov rsi, [rsp+78h+var_70]
mov rdx, [rsp+78h+var_68]
mov rax, [rbx]
mov rdi, rbx
call qword ptr [rax+28h]
mov rbx, rax
mov rdi, [rsp+78h+var_70]; void *
lea rax, [rsp+78h+var_60]
cmp rdi, rax
jz short loc_630A9
mov rsi, [rsp+78h+var_60]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_630A9:
mov rax, rbx
add rsp, 48h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
mov rbx, rax
mov rdi, [rsp+arg_20]; void *
cmp rdi, r13
jz short loc_630DC
mov rsi, [rsp+arg_30]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_630DC
jmp short $+2
loc_630D9:
mov rbx, rax
loc_630DC:
mov rdi, [rsp+arg_0]; void *
lea rax, [rsp+arg_10]
cmp rdi, rax
jz short loc_630F8
mov rsi, [rsp+arg_10]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_630F8:
mov rdi, rbx
call __Unwind_Resume
| long long httplib::detail::write_response_line(long long a1, unsigned int a2)
{
unsigned int v2; // r14d
int v3; // r15d
unsigned int v4; // ecx
bool v5; // cc
long long v6; // rax
long long v7; // rbx
void *v9[2]; // [rsp+8h] [rbp-70h] BYREF
_QWORD v10[2]; // [rsp+18h] [rbp-60h] BYREF
void *v11; // [rsp+28h] [rbp-50h] BYREF
_QWORD v12[8]; // [rsp+38h] [rbp-40h] BYREF
v9[0] = v10;
std::string::_M_construct<char const*>(v9, "HTTP/1.1 ", (long long)"");
v2 = -a2;
if ( (int)a2 > 0 )
v2 = a2;
v3 = 1;
if ( v2 >= 0xA )
{
v3 = 4;
v4 = v2;
while ( 1 )
{
if ( v4 <= 0x63 )
{
v3 -= 2;
goto LABEL_12;
}
if ( v4 <= 0x3E7 )
break;
if ( v4 < 0x2710 )
goto LABEL_12;
v3 += 4;
v5 = v4 <= 0x1869F;
v4 /= 0x2710u;
if ( v5 )
{
v3 -= 3;
goto LABEL_12;
}
}
--v3;
}
LABEL_12:
v11 = v12;
std::string::_M_construct(&v11, v3 + (a2 >> 31), 45LL);
std::__detail::__to_chars_10_impl<unsigned int>((char *)v11 + (a2 >> 31), v3, v2);
std::string::_M_append(v9, v11);
if ( v11 != v12 )
operator delete(v11, v12[0] + 1LL);
std::string::append(v9, " ");
v6 = httplib::status_message((httplib *)a2, (int)" ");
std::string::append(v9, v6);
std::string::append(v9, "\r\n");
v7 = (*(long long ( **)(long long, void *, void *))(*(_QWORD *)a1 + 40LL))(a1, v9[0], v9[1]);
if ( v9[0] != v10 )
operator delete(v9[0], v10[0] + 1LL);
return v7;
}
| write_response_line:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x48
MOV EBP,ESI
MOV RBX,RDI
LEA RAX,[RSP + 0x18]
MOV qword ptr [RAX + -0x10],RAX
LEA RSI,[0x24d1ce]
LEA RDX,[0x24d1d7]
LEA RDI,[RSP + 0x8]
CALL 0x0014c588
MOV R14D,EBP
NEG R14D
CMOVS R14D,EBP
MOV R15D,0x1
CMP R14D,0xa
JC 0x00162fe0
MOV R15D,0x4
MOV EAX,0xd1b71759
MOV ECX,R14D
LAB_00162fa4:
CMP ECX,0x63
JBE 0x00162fd7
CMP ECX,0x3e7
JBE 0x00162fdd
CMP ECX,0x2710
JC 0x00162fe0
MOV EDX,ECX
IMUL RDX,RAX
SHR RDX,0x2d
ADD R15D,0x4
CMP ECX,0x1869f
MOV ECX,EDX
JA 0x00162fa4
ADD R15D,-0x3
JMP 0x00162fe0
LAB_00162fd7:
ADD R15D,-0x2
JMP 0x00162fe0
LAB_00162fdd:
DEC R15D
LAB_00162fe0:
MOV R12D,EBP
SHR R12D,0x1f
LEA ESI,[R15 + R12*0x1]
LEA R13,[RSP + 0x38]
MOV qword ptr [R13 + -0x10],R13
LAB_00162ff4:
LEA RDI,[RSP + 0x28]
MOV EDX,0x2d
CALL 0x0011fc80
MOV EDI,R12D
ADD RDI,qword ptr [RSP + 0x28]
MOV ESI,R15D
MOV EDX,R14D
CALL 0x00143d16
MOV RSI,qword ptr [RSP + 0x28]
MOV RDX,qword ptr [RSP + 0x30]
LAB_00163020:
LEA RDI,[RSP + 0x8]
CALL 0x0011f310
MOV RDI,qword ptr [RSP + 0x28]
CMP RDI,R13
JZ 0x00163041
MOV RSI,qword ptr [RSP + 0x38]
INC RSI
CALL 0x0011fae0
LAB_00163041:
LEA RSI,[0x25e0fd]
LEA RDI,[RSP + 0x8]
CALL 0x00120520
MOV EDI,EBP
CALL 0x0016c017
LEA RDI,[RSP + 0x8]
MOV RSI,RAX
CALL 0x00120520
LEA RSI,[0x24d18f]
LEA RDI,[RSP + 0x8]
CALL 0x00120520
MOV RSI,qword ptr [RSP + 0x8]
MOV RDX,qword ptr [RSP + 0x10]
MOV RAX,qword ptr [RBX]
MOV RDI,RBX
CALL qword ptr [RAX + 0x28]
LAB_0016308a:
MOV RBX,RAX
MOV RDI,qword ptr [RSP + 0x8]
LEA RAX,[RSP + 0x18]
CMP RDI,RAX
JZ 0x001630a9
MOV RSI,qword ptr [RSP + 0x18]
INC RSI
CALL 0x0011fae0
LAB_001630a9:
MOV RAX,RBX
ADD RSP,0x48
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
/* httplib::detail::write_response_line(httplib::Stream&, int) */
int8 httplib::detail::write_response_line(Stream *param_1,int param_2)
{
uint uVar1;
int8 uVar2;
uint uVar3;
ulong uVar4;
uint uVar5;
uint uVar6;
long *local_70;
int8 local_68;
long local_60 [2];
long *local_50 [2];
long local_40 [2];
local_70 = local_60;
std::__cxx11::string::_M_construct<char_const*>(&local_70,&DAT_0024d1ce,&DAT_0024d1d7);
uVar5 = -param_2;
if (0 < param_2) {
uVar5 = param_2;
}
uVar6 = 1;
if (9 < uVar5) {
uVar4 = (ulong)uVar5;
uVar1 = 4;
do {
uVar6 = uVar1;
uVar3 = (uint)uVar4;
if (uVar3 < 100) {
uVar6 = uVar6 - 2;
goto LAB_00162fe0;
}
if (uVar3 < 1000) {
uVar6 = uVar6 - 1;
goto LAB_00162fe0;
}
if (uVar3 < 10000) goto LAB_00162fe0;
uVar4 = uVar4 / 10000;
uVar1 = uVar6 + 4;
} while (99999 < uVar3);
uVar6 = uVar6 + 1;
}
LAB_00162fe0:
/* try { // try from 00162ff4 to 00163002 has its CatchHandler @ 001630d7 */
local_50[0] = local_40;
std::__cxx11::string::_M_construct((ulong)local_50,(char)uVar6 - (char)(param_2 >> 0x1f));
std::__detail::__to_chars_10_impl<unsigned_int>
((char *)((ulong)((uint)param_2 >> 0x1f) + (long)local_50[0]),uVar6,uVar5);
/* try { // try from 00163020 to 00163029 has its CatchHandler @ 001630bb */
std::__cxx11::string::_M_append((char *)&local_70,(ulong)local_50[0]);
if (local_50[0] != local_40) {
operator_delete(local_50[0],local_40[0] + 1);
}
/* try { // try from 00163041 to 00163089 has its CatchHandler @ 001630d9 */
std::__cxx11::string::append((char *)&local_70);
status_message(param_2);
std::__cxx11::string::append((char *)&local_70);
std::__cxx11::string::append((char *)&local_70);
uVar2 = (**(code **)(*(long *)param_1 + 0x28))(param_1,local_70,local_68);
if (local_70 != local_60) {
operator_delete(local_70,local_60[0] + 1);
}
return uVar2;
}
| |
47,847 | google::protobuf::compiler::csharp::ToCSharpName(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, google::protobuf::FileDescriptor const*) | aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/compiler/csharp/csharp_helpers.cc | std::string ToCSharpName(const std::string& name, const FileDescriptor* file) {
std::string result = GetFileNamespace(file);
if (!result.empty()) {
result += '.';
}
std::string classname;
if (file->package().empty()) {
classname = name;
} else {
// Strip the proto package from full_name since we've replaced it with
// the C# namespace.
classname = name.substr(file->package().size() + 1);
}
result += StringReplace(classname, ".", ".Types.", true);
return "global::" + result;
} | O3 | cpp | google::protobuf::compiler::csharp::ToCSharpName(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, google::protobuf::FileDescriptor const*):
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0xa8, %rsp
movq %rdx, %r15
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x48(%rsp), %r12
movq %r12, %rdi
movq %rdx, %rsi
callq 0x3c2d4
cmpq $0x0, 0x8(%r12)
je 0x3cb67
leaq 0x48(%rsp), %rdi
movl $0x2e, %esi
callq 0x1f420
leaq 0x38(%rsp), %r12
movq %r12, -0x10(%r12)
movq $0x0, -0x8(%r12)
movb $0x0, (%r12)
movq 0x10(%r15), %rax
movq 0x8(%rax), %rdx
testq %rdx, %rdx
je 0x3cbc9
incq %rdx
leaq 0x8(%rsp), %rdi
movq %r14, %rsi
movq $-0x1, %rcx
callq 0x1f510
leaq 0x28(%rsp), %rdi
leaq 0x8(%rsp), %r14
movq %r14, %rsi
callq 0x1f5d0
movq (%r14), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0x3cbd6
callq 0x1f4a0
jmp 0x3cbd6
leaq 0x28(%rsp), %rdi
movq %r14, %rsi
callq 0x1f260
leaq 0x98(%rsp), %r14
movq %r14, -0x10(%r14)
leaq 0x1b3796(%rip), %rsi # 0x1f037f
leaq 0x1b3790(%rip), %rdx # 0x1f0380
leaq 0x88(%rsp), %rdi
callq 0x250b2
leaq 0x78(%rsp), %r15
movq %r15, -0x10(%r15)
leaq 0x1616cd(%rip), %rsi # 0x19e2da
leaq 0x1616cd(%rip), %rdx # 0x19e2e1
leaq 0x68(%rsp), %rdi
callq 0x250b2
leaq 0x8(%rsp), %rdi
leaq 0x28(%rsp), %rsi
leaq 0x88(%rsp), %rdx
leaq 0x68(%rsp), %rcx
movl $0x1, %r8d
callq 0x1096a8
movq 0x8(%rsp), %rsi
movq 0x10(%rsp), %rdx
leaq 0x48(%rsp), %rdi
callq 0x1f150
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x3cc67
callq 0x1f4a0
movq 0x68(%rsp), %rdi
cmpq %r15, %rdi
je 0x3cc76
callq 0x1f4a0
movq 0x88(%rsp), %rdi
cmpq %r14, %rdi
je 0x3cc88
callq 0x1f4a0
leaq 0x161653(%rip), %rsi # 0x19e2e2
leaq 0x48(%rsp), %rdx
movq %rbx, %rdi
callq 0x328fc
movq 0x28(%rsp), %rdi
cmpq %r12, %rdi
je 0x3ccab
callq 0x1f4a0
leaq 0x58(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x3ccbe
callq 0x1f4a0
movq %rbx, %rax
addq $0xa8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
jmp 0x3cd1c
movq %rax, %rbx
jmp 0x3cd2e
movq %rax, %rbx
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x3ccf2
callq 0x1f4a0
jmp 0x3ccf2
movq %rax, %rbx
movq 0x68(%rsp), %rdi
cmpq %r15, %rdi
je 0x3cd06
callq 0x1f4a0
jmp 0x3cd06
movq %rax, %rbx
movq 0x88(%rsp), %rdi
cmpq %r14, %rdi
je 0x3cd1f
callq 0x1f4a0
jmp 0x3cd1f
jmp 0x3cd1c
movq %rax, %rbx
movq 0x28(%rsp), %rdi
cmpq %r12, %rdi
je 0x3cd2e
callq 0x1f4a0
leaq 0x58(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x3cd41
callq 0x1f4a0
movq %rbx, %rdi
callq 0x1f860
| _ZN6google8protobuf8compiler6csharp12ToCSharpNameERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEPKNS0_14FileDescriptorE:
push r15
push r14
push r12
push rbx
sub rsp, 0A8h
mov r15, rdx
mov r14, rsi
mov rbx, rdi
lea r12, [rsp+0C8h+var_80]
mov rdi, r12
mov rsi, rdx
call _ZN6google8protobuf8compiler6csharp16GetFileNamespaceB5cxx11EPKNS0_14FileDescriptorE; google::protobuf::compiler::csharp::GetFileNamespace(google::protobuf::FileDescriptor const*)
cmp qword ptr [r12+8], 0
jz short loc_3CB67
lea rdi, [rsp+0C8h+var_80]
mov esi, 2Eh ; '.'
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9push_backEc; std::string::push_back(char)
loc_3CB67:
lea r12, [rsp+0C8h+var_90]
mov [r12-10h], r12
mov qword ptr [r12-8], 0
mov byte ptr [r12], 0
mov rax, [r15+10h]
mov rdx, [rax+8]
test rdx, rdx
jz short loc_3CBC9
inc rdx
lea rdi, [rsp+0C8h+var_C0]
mov rsi, r14
mov rcx, 0FFFFFFFFFFFFFFFFh
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6substrEmm; std::string::substr(ulong,ulong)
lea rdi, [rsp+0C8h+var_A0]
lea r14, [rsp+0C8h+var_C0]
mov rsi, r14
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEOS4_; std::string::operator=(std::string&&)
mov rdi, [r14]; void *
lea rax, [rsp+0C8h+var_B0]
cmp rdi, rax
jz short loc_3CBD6
call __ZdlPv; operator delete(void *)
jmp short loc_3CBD6
loc_3CBC9:
lea rdi, [rsp+0C8h+var_A0]
mov rsi, r14
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_assignERKS4_; std::string::_M_assign(std::string const&)
loc_3CBD6:
lea r14, [rsp+0C8h+var_30]
mov [r14-10h], r14
lea rsi, aWhichIsNotDefi+77h; "."
lea rdx, aWhichIsNotDefi+78h; ""
lea rdi, [rsp+0C8h+var_40]
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag; std::string::_M_construct<char const*>(char const*,char const*,std::forward_iterator_tag)
lea r15, [rsp+0C8h+var_50]
mov [r15-10h], r15
lea rsi, aTypes; ".Types."
lea rdx, aTypes+7; ""
lea rdi, [rsp+0C8h+var_60]
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag; std::string::_M_construct<char const*>(char const*,char const*,std::forward_iterator_tag)
lea rdi, [rsp+0C8h+var_C0]
lea rsi, [rsp+0C8h+var_A0]
lea rdx, [rsp+0C8h+var_40]
lea rcx, [rsp+0C8h+var_60]
mov r8d, 1
call _ZN6google8protobuf13StringReplaceERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES8_S8_b; google::protobuf::StringReplace(std::string const&,std::string const&,std::string const&,bool)
mov rsi, [rsp+0C8h+var_C0]
mov rdx, [rsp+0C8h+var_B8]
lea rdi, [rsp+0C8h+var_80]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_appendEPKcm; std::string::_M_append(char const*,ulong)
lea rax, [rsp+0C8h+var_B0]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_3CC67
call __ZdlPv; operator delete(void *)
loc_3CC67:
mov rdi, [rsp+0C8h+var_60]; void *
cmp rdi, r15
jz short loc_3CC76
call __ZdlPv; operator delete(void *)
loc_3CC76:
mov rdi, [rsp+0C8h+var_40]; void *
cmp rdi, r14
jz short loc_3CC88
call __ZdlPv; operator delete(void *)
loc_3CC88:
lea rsi, aGlobal; "global::"
lea rdx, [rsp+0C8h+var_80]
mov rdi, rbx
call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_RKS8_; std::operator+<char>(char const*,std::string const&)
mov rdi, [rsp+0C8h+var_A0]; void *
cmp rdi, r12
jz short loc_3CCAB
call __ZdlPv; operator delete(void *)
loc_3CCAB:
lea rax, [rsp+0C8h+var_70]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_3CCBE
call __ZdlPv; operator delete(void *)
loc_3CCBE:
mov rax, rbx
add rsp, 0A8h
pop rbx
pop r12
pop r14
pop r15
retn
jmp short loc_3CD1C
mov rbx, rax
jmp short loc_3CD2E
mov rbx, rax
lea rax, [rsp+arg_10]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_3CCF2
call __ZdlPv; operator delete(void *)
jmp short loc_3CCF2
mov rbx, rax
loc_3CCF2:
mov rdi, [rsp+arg_60]; void *
cmp rdi, r15
jz short loc_3CD06
call __ZdlPv; operator delete(void *)
jmp short loc_3CD06
mov rbx, rax
loc_3CD06:
mov rdi, [rsp+arg_80]; void *
cmp rdi, r14
jz short loc_3CD1F
call __ZdlPv; operator delete(void *)
jmp short loc_3CD1F
jmp short $+2
loc_3CD1C:
mov rbx, rax
loc_3CD1F:
mov rdi, [rsp+arg_20]; void *
cmp rdi, r12
jz short loc_3CD2E
call __ZdlPv; operator delete(void *)
loc_3CD2E:
lea rax, [rsp+arg_50]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_3CD41
call __ZdlPv; operator delete(void *)
loc_3CD41:
mov rdi, rbx
call __Unwind_Resume
| long long google::protobuf::compiler::csharp::ToCSharpName(long long a1, long long a2, long long a3)
{
long long v4; // rdx
void *v6[2]; // [rsp+8h] [rbp-C0h] BYREF
_BYTE v7[16]; // [rsp+18h] [rbp-B0h] BYREF
void *v8[2]; // [rsp+28h] [rbp-A0h] BYREF
_BYTE v9[16]; // [rsp+38h] [rbp-90h] BYREF
void *v10[2]; // [rsp+48h] [rbp-80h] BYREF
char v11; // [rsp+58h] [rbp-70h] BYREF
void *v12[2]; // [rsp+68h] [rbp-60h] BYREF
_BYTE v13[16]; // [rsp+78h] [rbp-50h] BYREF
void *v14[2]; // [rsp+88h] [rbp-40h] BYREF
_BYTE v15[48]; // [rsp+98h] [rbp-30h] BYREF
google::protobuf::compiler::csharp::GetFileNamespace[abi:cxx11](v10, a3);
if ( v10[1] )
std::string::push_back(v10, 46LL);
v8[0] = v9;
v8[1] = 0LL;
v9[0] = 0;
v4 = *(_QWORD *)(*(_QWORD *)(a3 + 16) + 8LL);
if ( v4 )
{
std::string::substr(v6, a2, v4 + 1, -1LL);
std::string::operator=(v8, v6);
if ( v6[0] != v7 )
operator delete(v6[0]);
}
else
{
std::string::_M_assign(v8, a2);
}
v14[0] = v15;
std::string::_M_construct<char const*>((long long)v14, ".", (long long)"");
v12[0] = v13;
std::string::_M_construct<char const*>((long long)v12, ".Types.", (long long)"");
google::protobuf::StringReplace(v6, v8, v14, v12, 1LL);
std::string::_M_append(v10, v6[0], v6[1]);
if ( v6[0] != v7 )
operator delete(v6[0]);
if ( v12[0] != v13 )
operator delete(v12[0]);
if ( v14[0] != v15 )
operator delete(v14[0]);
std::operator+<char>(a1, (long long)"global::", v10);
if ( v8[0] != v9 )
operator delete(v8[0]);
if ( v10[0] != &v11 )
operator delete(v10[0]);
return a1;
}
| ToCSharpName:
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
SUB RSP,0xa8
MOV R15,RDX
MOV R14,RSI
MOV RBX,RDI
LEA R12,[RSP + 0x48]
MOV RDI,R12
MOV RSI,RDX
CALL 0x0013c2d4
CMP qword ptr [R12 + 0x8],0x0
JZ 0x0013cb67
LAB_0013cb58:
LEA RDI,[RSP + 0x48]
MOV ESI,0x2e
CALL 0x0011f420
LAB_0013cb67:
LEA R12,[RSP + 0x38]
MOV qword ptr [R12 + -0x10],R12
MOV qword ptr [R12 + -0x8],0x0
MOV byte ptr [R12],0x0
MOV RAX,qword ptr [R15 + 0x10]
MOV RDX,qword ptr [RAX + 0x8]
TEST RDX,RDX
JZ 0x0013cbc9
INC RDX
LAB_0013cb8f:
LEA RDI,[RSP + 0x8]
MOV RSI,R14
MOV RCX,-0x1
CALL 0x0011f510
LEA RDI,[RSP + 0x28]
LEA R14,[RSP + 0x8]
MOV RSI,R14
CALL 0x0011f5d0
MOV RDI,qword ptr [R14]
LEA RAX,[RSP + 0x18]
CMP RDI,RAX
JZ 0x0013cbd6
CALL 0x0011f4a0
JMP 0x0013cbd6
LAB_0013cbc9:
LEA RDI,[RSP + 0x28]
MOV RSI,R14
CALL 0x0011f260
LAB_0013cbd6:
LEA R14,[RSP + 0x98]
MOV qword ptr [R14 + -0x10],R14
LAB_0013cbe2:
LEA RSI,[0x2f037f]
LEA RDX,[0x2f0380]
LEA RDI,[RSP + 0x88]
CALL 0x001250b2
LEA R15,[RSP + 0x78]
MOV qword ptr [R15 + -0x10],R15
LAB_0013cc06:
LEA RSI,[0x29e2da]
LEA RDX,[0x29e2e1]
LEA RDI,[RSP + 0x68]
CALL 0x001250b2
LAB_0013cc1e:
LEA RDI,[RSP + 0x8]
LEA RSI,[RSP + 0x28]
LEA RDX,[RSP + 0x88]
LEA RCX,[RSP + 0x68]
MOV R8D,0x1
CALL 0x002096a8
MOV RSI,qword ptr [RSP + 0x8]
MOV RDX,qword ptr [RSP + 0x10]
LAB_0013cc4a:
LEA RDI,[RSP + 0x48]
CALL 0x0011f150
LEA RAX,[RSP + 0x18]
MOV RDI,qword ptr [RAX + -0x10]
CMP RDI,RAX
JZ 0x0013cc67
CALL 0x0011f4a0
LAB_0013cc67:
MOV RDI,qword ptr [RSP + 0x68]
CMP RDI,R15
JZ 0x0013cc76
CALL 0x0011f4a0
LAB_0013cc76:
MOV RDI,qword ptr [RSP + 0x88]
CMP RDI,R14
JZ 0x0013cc88
CALL 0x0011f4a0
LAB_0013cc88:
LEA RSI,[0x29e2e2]
LEA RDX,[RSP + 0x48]
MOV RDI,RBX
CALL 0x001328fc
LAB_0013cc9c:
MOV RDI,qword ptr [RSP + 0x28]
CMP RDI,R12
JZ 0x0013ccab
CALL 0x0011f4a0
LAB_0013ccab:
LEA RAX,[RSP + 0x58]
MOV RDI,qword ptr [RAX + -0x10]
CMP RDI,RAX
JZ 0x0013ccbe
CALL 0x0011f4a0
LAB_0013ccbe:
MOV RAX,RBX
ADD RSP,0xa8
POP RBX
POP R12
POP R14
POP R15
RET
|
/* google::protobuf::compiler::csharp::ToCSharpName(std::__cxx11::string const&,
google::protobuf::FileDescriptor const*) */
csharp * __thiscall
google::protobuf::compiler::csharp::ToCSharpName
(csharp *this,string *param_1,FileDescriptor *param_2)
{
int1 *local_c0 [2];
int1 local_b0 [16];
int1 *local_a0;
int8 local_98;
int1 local_90 [16];
int1 *local_80;
long local_78;
int1 local_70 [16];
int1 *local_60 [2];
int1 local_50 [16];
int1 *local_40 [2];
int1 local_30 [16];
GetFileNamespace_abi_cxx11_((csharp *)&local_80,param_2);
if (local_78 != 0) {
/* try { // try from 0013cb58 to 0013cb66 has its CatchHandler @ 0013ccd2 */
std::__cxx11::string::push_back((char)&local_80);
}
local_98 = 0;
local_90[0] = 0;
local_a0 = local_90;
if (*(long *)(*(long *)(param_2 + 0x10) + 8) == 0) {
/* try { // try from 0013cbc9 to 0013cbd5 has its CatchHandler @ 0013cd1c */
std::__cxx11::string::_M_assign((string *)&local_a0);
}
else {
/* try { // try from 0013cb8f to 0013cba2 has its CatchHandler @ 0013ccd0 */
std::__cxx11::string::substr((ulong)local_c0,(ulong)param_1);
std::__cxx11::string::operator=((string *)&local_a0,(string *)local_c0);
if (local_c0[0] != local_b0) {
operator_delete(local_c0[0]);
}
}
/* try { // try from 0013cbe2 to 0013cbfc has its CatchHandler @ 0013cd1a */
local_40[0] = local_30;
std::__cxx11::string::_M_construct<char_const*>(local_40,".","");
/* try { // try from 0013cc06 to 0013cc1d has its CatchHandler @ 0013cd03 */
local_60[0] = local_50;
std::__cxx11::string::_M_construct<char_const*>(local_60,".Types.","");
/* try { // try from 0013cc1e to 0013cc3f has its CatchHandler @ 0013ccef */
StringReplace((protobuf *)local_c0,(string *)&local_a0,(string *)local_40,(string *)local_60,true)
;
/* try { // try from 0013cc4a to 0013cc53 has its CatchHandler @ 0013ccd7 */
std::__cxx11::string::_M_append((char *)&local_80,(ulong)local_c0[0]);
if (local_c0[0] != local_b0) {
operator_delete(local_c0[0]);
}
if (local_60[0] != local_50) {
operator_delete(local_60[0]);
}
if (local_40[0] != local_30) {
operator_delete(local_40[0]);
}
/* try { // try from 0013cc88 to 0013cc9b has its CatchHandler @ 0013cd1c */
std::operator+((char *)this,(string *)"global::");
if (local_a0 != local_90) {
operator_delete(local_a0);
}
if (local_80 != local_70) {
operator_delete(local_80);
}
return this;
}
| |
47,848 | my_strcasecmp_utf8mb4 | eloqsql/strings/ctype-utf8.c | static int
my_strcasecmp_utf8mb4(CHARSET_INFO *cs, const char *s, const char *t)
{
MY_UNICASE_INFO *uni_plane= cs->caseinfo;
while (s[0] && t[0])
{
my_wc_t s_wc,t_wc;
if ((uchar) s[0] < 128)
{
/*
s[0] is between 0 and 127.
It represents a single byte character.
Convert it into weight according to collation.
*/
s_wc= my_unicase_default_page00[(uchar) s[0]].tolower;
s++;
}
else
{
int res= my_mb_wc_utf8mb4_no_range(cs, &s_wc, (const uchar*) s);
/*
In the case of wrong multibyte sequence we will
call strcmp() for byte-to-byte comparison.
*/
if (res <= 0)
return strcmp(s, t);
s+= res;
my_tolower_utf8mb4(uni_plane, &s_wc);
}
/* Do the same for the second string */
if ((uchar) t[0] < 128)
{
/* Convert single byte character into weight */
t_wc= my_unicase_default_page00[(uchar) t[0]].tolower;
t++;
}
else
{
int res= my_mb_wc_utf8mb4_no_range(cs, &t_wc, (const uchar*) t);
if (res <= 0)
return strcmp(s, t);
t+= res;
my_tolower_utf8mb4(uni_plane, &t_wc);
}
/* Now we have two weights, let's compare them */
if ( s_wc != t_wc )
return ((int) s_wc) - ((int) t_wc);
}
return ((int) (uchar) s[0]) - ((int) (uchar) t[0]);
} | O0 | c | my_strcasecmp_utf8mb4:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq -0x10(%rbp), %rax
movq 0x78(%rax), %rax
movq %rax, -0x28(%rbp)
movq -0x18(%rbp), %rax
movsbl (%rax), %ecx
xorl %eax, %eax
cmpl $0x0, %ecx
movb %al, -0x41(%rbp)
je 0x72891
movq -0x20(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x0, %eax
setne %al
movb %al, -0x41(%rbp)
movb -0x41(%rbp), %al
testb $0x1, %al
jne 0x7289d
jmp 0x729c6
movq -0x18(%rbp), %rax
movzbl (%rax), %eax
cmpl $0x80, %eax
jge 0x728d7
movq -0x18(%rbp), %rax
movzbl (%rax), %eax
movl %eax, %ecx
leaq 0x2fa1e5(%rip), %rax # 0x36caa0
imulq $0xc, %rcx, %rcx
addq %rcx, %rax
movl 0x4(%rax), %eax
movq %rax, -0x30(%rbp)
movq -0x18(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x18(%rbp)
jmp 0x72924
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rdx
leaq -0x30(%rbp), %rsi
callq 0x71fd0
movl %eax, -0x3c(%rbp)
cmpl $0x0, -0x3c(%rbp)
jg 0x72906
movq -0x18(%rbp), %rdi
movq -0x20(%rbp), %rsi
callq 0x25450
movl %eax, -0x4(%rbp)
jmp 0x729d9
movl -0x3c(%rbp), %ecx
movq -0x18(%rbp), %rax
movslq %ecx, %rcx
addq %rcx, %rax
movq %rax, -0x18(%rbp)
movq -0x28(%rbp), %rdi
leaq -0x30(%rbp), %rsi
callq 0x723c0
movq -0x20(%rbp), %rax
movzbl (%rax), %eax
cmpl $0x80, %eax
jge 0x7295e
movq -0x20(%rbp), %rax
movzbl (%rax), %eax
movl %eax, %ecx
leaq 0x2fa15e(%rip), %rax # 0x36caa0
imulq $0xc, %rcx, %rcx
addq %rcx, %rax
movl 0x4(%rax), %eax
movq %rax, -0x38(%rbp)
movq -0x20(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x20(%rbp)
jmp 0x729a8
movq -0x10(%rbp), %rdi
movq -0x20(%rbp), %rdx
leaq -0x38(%rbp), %rsi
callq 0x71fd0
movl %eax, -0x40(%rbp)
cmpl $0x0, -0x40(%rbp)
jg 0x7298a
movq -0x18(%rbp), %rdi
movq -0x20(%rbp), %rsi
callq 0x25450
movl %eax, -0x4(%rbp)
jmp 0x729d9
movl -0x40(%rbp), %ecx
movq -0x20(%rbp), %rax
movslq %ecx, %rcx
addq %rcx, %rax
movq %rax, -0x20(%rbp)
movq -0x28(%rbp), %rdi
leaq -0x38(%rbp), %rsi
callq 0x723c0
movq -0x30(%rbp), %rax
cmpq -0x38(%rbp), %rax
je 0x729c1
movq -0x30(%rbp), %rax
movq -0x38(%rbp), %rcx
subl %ecx, %eax
movl %eax, -0x4(%rbp)
jmp 0x729d9
jmp 0x72870
movq -0x18(%rbp), %rax
movzbl (%rax), %eax
movq -0x20(%rbp), %rcx
movzbl (%rcx), %ecx
subl %ecx, %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x50, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
| my_strcasecmp_utf8mb4:
push rbp
mov rbp, rsp
sub rsp, 50h
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov [rbp+var_20], rdx
mov rax, [rbp+var_10]
mov rax, [rax+78h]
mov [rbp+var_28], rax
loc_72870:
mov rax, [rbp+var_18]
movsx ecx, byte ptr [rax]
xor eax, eax
cmp ecx, 0
mov [rbp+var_41], al
jz short loc_72891
mov rax, [rbp+var_20]
movsx eax, byte ptr [rax]
cmp eax, 0
setnz al
mov [rbp+var_41], al
loc_72891:
mov al, [rbp+var_41]
test al, 1
jnz short loc_7289D
jmp loc_729C6
loc_7289D:
mov rax, [rbp+var_18]
movzx eax, byte ptr [rax]
cmp eax, 80h
jge short loc_728D7
mov rax, [rbp+var_18]
movzx eax, byte ptr [rax]
mov ecx, eax
lea rax, my_unicase_default_page00
imul rcx, 0Ch
add rax, rcx
mov eax, [rax+4]
mov [rbp+var_30], rax
mov rax, [rbp+var_18]
add rax, 1
mov [rbp+var_18], rax
jmp short loc_72924
loc_728D7:
mov rdi, [rbp+var_10]
mov rdx, [rbp+var_18]
lea rsi, [rbp+var_30]
call my_mb_wc_utf8mb4_no_range
mov [rbp+var_3C], eax
cmp [rbp+var_3C], 0
jg short loc_72906
mov rdi, [rbp+var_18]
mov rsi, [rbp+var_20]
call _strcmp
mov [rbp+var_4], eax
jmp loc_729D9
loc_72906:
mov ecx, [rbp+var_3C]
mov rax, [rbp+var_18]
movsxd rcx, ecx
add rax, rcx
mov [rbp+var_18], rax
mov rdi, [rbp+var_28]
lea rsi, [rbp+var_30]
call my_tolower_utf8mb4
loc_72924:
mov rax, [rbp+var_20]
movzx eax, byte ptr [rax]
cmp eax, 80h
jge short loc_7295E
mov rax, [rbp+var_20]
movzx eax, byte ptr [rax]
mov ecx, eax
lea rax, my_unicase_default_page00
imul rcx, 0Ch
add rax, rcx
mov eax, [rax+4]
mov [rbp+var_38], rax
mov rax, [rbp+var_20]
add rax, 1
mov [rbp+var_20], rax
jmp short loc_729A8
loc_7295E:
mov rdi, [rbp+var_10]
mov rdx, [rbp+var_20]
lea rsi, [rbp+var_38]
call my_mb_wc_utf8mb4_no_range
mov [rbp+var_40], eax
cmp [rbp+var_40], 0
jg short loc_7298A
mov rdi, [rbp+var_18]
mov rsi, [rbp+var_20]
call _strcmp
mov [rbp+var_4], eax
jmp short loc_729D9
loc_7298A:
mov ecx, [rbp+var_40]
mov rax, [rbp+var_20]
movsxd rcx, ecx
add rax, rcx
mov [rbp+var_20], rax
mov rdi, [rbp+var_28]
lea rsi, [rbp+var_38]
call my_tolower_utf8mb4
loc_729A8:
mov rax, [rbp+var_30]
cmp rax, [rbp+var_38]
jz short loc_729C1
mov rax, [rbp+var_30]
mov rcx, [rbp+var_38]
sub eax, ecx
mov [rbp+var_4], eax
jmp short loc_729D9
loc_729C1:
jmp loc_72870
loc_729C6:
mov rax, [rbp+var_18]
movzx eax, byte ptr [rax]
mov rcx, [rbp+var_20]
movzx ecx, byte ptr [rcx]
sub eax, ecx
mov [rbp+var_4], eax
loc_729D9:
mov eax, [rbp+var_4]
add rsp, 50h
pop rbp
retn
| long long my_strcasecmp_utf8mb4(long long a1, unsigned __int8 *a2, unsigned __int8 *a3)
{
bool v4; // [rsp+Fh] [rbp-41h]
int v5; // [rsp+10h] [rbp-40h]
int v6; // [rsp+14h] [rbp-3Ch]
unsigned long long v7; // [rsp+18h] [rbp-38h] BYREF
unsigned long long v8; // [rsp+20h] [rbp-30h] BYREF
_QWORD *v9; // [rsp+28h] [rbp-28h]
unsigned __int8 *v10; // [rsp+30h] [rbp-20h]
unsigned __int8 *v11; // [rsp+38h] [rbp-18h]
long long v12; // [rsp+40h] [rbp-10h]
v12 = a1;
v11 = a2;
v10 = a3;
v9 = *(_QWORD **)(a1 + 120);
while ( 1 )
{
v4 = 0;
if ( *v11 )
v4 = *v10 != 0;
if ( !v4 )
break;
if ( *v11 >= 0x80u )
{
v6 = my_mb_wc_utf8mb4_no_range(v12, &v8, v11);
if ( v6 <= 0 )
return (unsigned int)strcmp(v11, v10);
v11 += v6;
my_tolower_utf8mb4(v9, &v8);
}
else
{
v8 = my_unicase_default_page00[3 * *v11++ + 1];
}
if ( *v10 >= 0x80u )
{
v5 = my_mb_wc_utf8mb4_no_range(v12, &v7, v10);
if ( v5 <= 0 )
return (unsigned int)strcmp(v11, v10);
v10 += v5;
my_tolower_utf8mb4(v9, &v7);
}
else
{
v7 = my_unicase_default_page00[3 * *v10++ + 1];
}
if ( v8 != v7 )
return (unsigned int)(v8 - v7);
}
return (unsigned int)(*v11 - *v10);
}
| my_strcasecmp_utf8mb4:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x50
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x18],RSI
MOV qword ptr [RBP + -0x20],RDX
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x78]
MOV qword ptr [RBP + -0x28],RAX
LAB_00172870:
MOV RAX,qword ptr [RBP + -0x18]
MOVSX ECX,byte ptr [RAX]
XOR EAX,EAX
CMP ECX,0x0
MOV byte ptr [RBP + -0x41],AL
JZ 0x00172891
MOV RAX,qword ptr [RBP + -0x20]
MOVSX EAX,byte ptr [RAX]
CMP EAX,0x0
SETNZ AL
MOV byte ptr [RBP + -0x41],AL
LAB_00172891:
MOV AL,byte ptr [RBP + -0x41]
TEST AL,0x1
JNZ 0x0017289d
JMP 0x001729c6
LAB_0017289d:
MOV RAX,qword ptr [RBP + -0x18]
MOVZX EAX,byte ptr [RAX]
CMP EAX,0x80
JGE 0x001728d7
MOV RAX,qword ptr [RBP + -0x18]
MOVZX EAX,byte ptr [RAX]
MOV ECX,EAX
LEA RAX,[0x46caa0]
IMUL RCX,RCX,0xc
ADD RAX,RCX
MOV EAX,dword ptr [RAX + 0x4]
MOV qword ptr [RBP + -0x30],RAX
MOV RAX,qword ptr [RBP + -0x18]
ADD RAX,0x1
MOV qword ptr [RBP + -0x18],RAX
JMP 0x00172924
LAB_001728d7:
MOV RDI,qword ptr [RBP + -0x10]
MOV RDX,qword ptr [RBP + -0x18]
LEA RSI,[RBP + -0x30]
CALL 0x00171fd0
MOV dword ptr [RBP + -0x3c],EAX
CMP dword ptr [RBP + -0x3c],0x0
JG 0x00172906
MOV RDI,qword ptr [RBP + -0x18]
MOV RSI,qword ptr [RBP + -0x20]
CALL 0x00125450
MOV dword ptr [RBP + -0x4],EAX
JMP 0x001729d9
LAB_00172906:
MOV ECX,dword ptr [RBP + -0x3c]
MOV RAX,qword ptr [RBP + -0x18]
MOVSXD RCX,ECX
ADD RAX,RCX
MOV qword ptr [RBP + -0x18],RAX
MOV RDI,qword ptr [RBP + -0x28]
LEA RSI,[RBP + -0x30]
CALL 0x001723c0
LAB_00172924:
MOV RAX,qword ptr [RBP + -0x20]
MOVZX EAX,byte ptr [RAX]
CMP EAX,0x80
JGE 0x0017295e
MOV RAX,qword ptr [RBP + -0x20]
MOVZX EAX,byte ptr [RAX]
MOV ECX,EAX
LEA RAX,[0x46caa0]
IMUL RCX,RCX,0xc
ADD RAX,RCX
MOV EAX,dword ptr [RAX + 0x4]
MOV qword ptr [RBP + -0x38],RAX
MOV RAX,qword ptr [RBP + -0x20]
ADD RAX,0x1
MOV qword ptr [RBP + -0x20],RAX
JMP 0x001729a8
LAB_0017295e:
MOV RDI,qword ptr [RBP + -0x10]
MOV RDX,qword ptr [RBP + -0x20]
LEA RSI,[RBP + -0x38]
CALL 0x00171fd0
MOV dword ptr [RBP + -0x40],EAX
CMP dword ptr [RBP + -0x40],0x0
JG 0x0017298a
MOV RDI,qword ptr [RBP + -0x18]
MOV RSI,qword ptr [RBP + -0x20]
CALL 0x00125450
MOV dword ptr [RBP + -0x4],EAX
JMP 0x001729d9
LAB_0017298a:
MOV ECX,dword ptr [RBP + -0x40]
MOV RAX,qword ptr [RBP + -0x20]
MOVSXD RCX,ECX
ADD RAX,RCX
MOV qword ptr [RBP + -0x20],RAX
MOV RDI,qword ptr [RBP + -0x28]
LEA RSI,[RBP + -0x38]
CALL 0x001723c0
LAB_001729a8:
MOV RAX,qword ptr [RBP + -0x30]
CMP RAX,qword ptr [RBP + -0x38]
JZ 0x001729c1
MOV RAX,qword ptr [RBP + -0x30]
MOV RCX,qword ptr [RBP + -0x38]
SUB EAX,ECX
MOV dword ptr [RBP + -0x4],EAX
JMP 0x001729d9
LAB_001729c1:
JMP 0x00172870
LAB_001729c6:
MOV RAX,qword ptr [RBP + -0x18]
MOVZX EAX,byte ptr [RAX]
MOV RCX,qword ptr [RBP + -0x20]
MOVZX ECX,byte ptr [RCX]
SUB EAX,ECX
MOV dword ptr [RBP + -0x4],EAX
LAB_001729d9:
MOV EAX,dword ptr [RBP + -0x4]
ADD RSP,0x50
POP RBP
RET
|
int my_strcasecmp_utf8mb4(long param_1,byte *param_2,byte *param_3)
{
int iVar1;
bool bVar2;
ulong local_40;
ulong local_38;
int8 local_30;
byte *local_28;
byte *local_20;
long local_18;
local_30 = *(int8 *)(param_1 + 0x78);
local_28 = param_3;
local_20 = param_2;
local_18 = param_1;
do {
bVar2 = false;
if (*local_20 != 0) {
bVar2 = *local_28 != 0;
}
if (!bVar2) {
return (uint)*local_20 - (uint)*local_28;
}
if (*local_20 < 0x80) {
local_38 = (ulong)*(uint *)(my_unicase_default_page00 + (ulong)*local_20 * 0xc + 4);
local_20 = local_20 + 1;
}
else {
iVar1 = my_mb_wc_utf8mb4_no_range(local_18,&local_38,local_20);
if (iVar1 < 1) {
iVar1 = strcmp((char *)local_20,(char *)local_28);
return iVar1;
}
local_20 = local_20 + iVar1;
my_tolower_utf8mb4(local_30,&local_38);
}
if (*local_28 < 0x80) {
local_40 = (ulong)*(uint *)(my_unicase_default_page00 + (ulong)*local_28 * 0xc + 4);
local_28 = local_28 + 1;
}
else {
iVar1 = my_mb_wc_utf8mb4_no_range(local_18,&local_40,local_28);
if (iVar1 < 1) {
iVar1 = strcmp((char *)local_20,(char *)local_28);
return iVar1;
}
local_28 = local_28 + iVar1;
my_tolower_utf8mb4(local_30,&local_40);
}
} while (local_38 == local_40);
return (int)local_38 - (int)local_40;
}
| |
47,849 | 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 0x57b35
movq %rsi, %r14
movq 0x78(%rdi), %r15
leaq 0x2f1e20(%rip), %r12 # 0x349880
cmpb $0x0, (%rbx)
je 0x57b2f
testb %al, %al
js 0x57a82
movzbl %al, %eax
leaq (%rax,%rax,2), %rax
movl 0x4(%r12,%rax,4), %r13d
movq %r13, -0x30(%rbp)
incq %r14
jmp 0x57ac9
leaq -0x30(%rbp), %rdi
movq %r14, %rsi
callq 0x575ef
testl %eax, %eax
je 0x57b55
movl %eax, %eax
addq %rax, %r14
movq -0x30(%rbp), %r13
cmpq (%r15), %r13
ja 0x57ac9
movq 0x8(%r15), %rax
movq %r13, %rcx
shrq $0x8, %rcx
movq (%rax,%rcx,8), %rax
testq %rax, %rax
je 0x57ac9
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 0x57ae0
leaq (%rax,%rax,2), %rax
movl 0x4(%r12,%rax,4), %eax
incq %rbx
jmp 0x57b1d
leaq -0x38(%rbp), %rdi
movq %rbx, %rsi
callq 0x575ef
testl %eax, %eax
je 0x57b55
movl %eax, %eax
addq %rax, %rbx
movq -0x38(%rbp), %rax
cmpq (%r15), %rax
ja 0x57b1d
movq 0x8(%r15), %rcx
movq %rax, %rdx
shrq $0x8, %rdx
movq (%rcx,%rdx,8), %rcx
testq %rcx, %rcx
je 0x57b1d
movzbl %al, %eax
leaq (%rax,%rax,2), %rax
movl 0x4(%rcx,%rax,4), %eax
cmpq %rax, %r13
jne 0x57b50
movb (%r14), %al
testb %al, %al
jne 0x57a60
xorl %eax, %eax
movzbl %al, %r13d
jmp 0x57b38
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 0x57b3e
movq %r14, %rdi
movq %rbx, %rsi
callq 0x24490
movl %eax, %r13d
jmp 0x57b3e
| 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_57B35
mov r14, rsi
mov r15, [rdi+78h]
lea r12, my_unicase_default_page00
loc_57A60:
cmp byte ptr [rbx], 0
jz loc_57B2F
test al, al
js short loc_57A82
movzx eax, al
lea rax, [rax+rax*2]
mov r13d, [r12+rax*4+4]
mov [rbp+var_30], r13
inc r14
jmp short loc_57AC9
loc_57A82:
lea rdi, [rbp+var_30]
mov rsi, r14
call my_mb_wc_utf8mb4_no_range
test eax, eax
jz loc_57B55
mov eax, eax
add r14, rax
mov r13, [rbp+var_30]
cmp r13, [r15]
ja short loc_57AC9
mov rax, [r15+8]
mov rcx, r13
shr rcx, 8
mov rax, [rax+rcx*8]
test rax, rax
jz short loc_57AC9
movzx ecx, r13b
lea rcx, [rcx+rcx*2]
mov r13d, [rax+rcx*4+4]
mov [rbp+var_30], r13
loc_57AC9:
movsx rax, byte ptr [rbx]
test rax, rax
js short loc_57AE0
lea rax, [rax+rax*2]
mov eax, [r12+rax*4+4]
inc rbx
jmp short loc_57B1D
loc_57AE0:
lea rdi, [rbp+var_38]
mov rsi, rbx
call my_mb_wc_utf8mb4_no_range
test eax, eax
jz short loc_57B55
mov eax, eax
add rbx, rax
mov rax, [rbp+var_38]
cmp rax, [r15]
ja short loc_57B1D
mov rcx, [r15+8]
mov rdx, rax
shr rdx, 8
mov rcx, [rcx+rdx*8]
test rcx, rcx
jz short loc_57B1D
movzx eax, al
lea rax, [rax+rax*2]
mov eax, [rcx+rax*4+4]
loc_57B1D:
cmp r13, rax
jnz short loc_57B50
mov al, [r14]
test al, al
jnz loc_57A60
xor eax, eax
loc_57B2F:
movzx r13d, al
jmp short loc_57B38
loc_57B35:
xor r13d, r13d
loc_57B38:
movzx eax, byte ptr [rbx]
sub r13d, eax
loc_57B3E:
mov eax, r13d
add rsp, 18h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_57B50:
sub r13d, eax
jmp short loc_57B3E
loc_57B55:
mov rdi, r14
mov rsi, rbx
call _strcmp
mov r13d, eax
jmp short loc_57B3E
| 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 0x00157b35
MOV R14,RSI
MOV R15,qword ptr [RDI + 0x78]
LEA R12,[0x449880]
LAB_00157a60:
CMP byte ptr [RBX],0x0
JZ 0x00157b2f
TEST AL,AL
JS 0x00157a82
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 0x00157ac9
LAB_00157a82:
LEA RDI,[RBP + -0x30]
MOV RSI,R14
CALL 0x001575ef
TEST EAX,EAX
JZ 0x00157b55
MOV EAX,EAX
ADD R14,RAX
MOV R13,qword ptr [RBP + -0x30]
CMP R13,qword ptr [R15]
JA 0x00157ac9
MOV RAX,qword ptr [R15 + 0x8]
MOV RCX,R13
SHR RCX,0x8
MOV RAX,qword ptr [RAX + RCX*0x8]
TEST RAX,RAX
JZ 0x00157ac9
MOVZX ECX,R13B
LEA RCX,[RCX + RCX*0x2]
MOV R13D,dword ptr [RAX + RCX*0x4 + 0x4]
MOV qword ptr [RBP + -0x30],R13
LAB_00157ac9:
MOVSX RAX,byte ptr [RBX]
TEST RAX,RAX
JS 0x00157ae0
LEA RAX,[RAX + RAX*0x2]
MOV EAX,dword ptr [R12 + RAX*0x4 + 0x4]
INC RBX
JMP 0x00157b1d
LAB_00157ae0:
LEA RDI,[RBP + -0x38]
MOV RSI,RBX
CALL 0x001575ef
TEST EAX,EAX
JZ 0x00157b55
MOV EAX,EAX
ADD RBX,RAX
MOV RAX,qword ptr [RBP + -0x38]
CMP RAX,qword ptr [R15]
JA 0x00157b1d
MOV RCX,qword ptr [R15 + 0x8]
MOV RDX,RAX
SHR RDX,0x8
MOV RCX,qword ptr [RCX + RDX*0x8]
TEST RCX,RCX
JZ 0x00157b1d
MOVZX EAX,AL
LEA RAX,[RAX + RAX*0x2]
MOV EAX,dword ptr [RCX + RAX*0x4 + 0x4]
LAB_00157b1d:
CMP R13,RAX
JNZ 0x00157b50
MOV AL,byte ptr [R14]
TEST AL,AL
JNZ 0x00157a60
XOR EAX,EAX
LAB_00157b2f:
MOVZX R13D,AL
JMP 0x00157b38
LAB_00157b35:
XOR R13D,R13D
LAB_00157b38:
MOVZX EAX,byte ptr [RBX]
SUB R13D,EAX
LAB_00157b3e:
MOV EAX,R13D
ADD RSP,0x18
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_00157b50:
SUB R13D,EAX
JMP 0x00157b3e
LAB_00157b55:
MOV RDI,R14
MOV RSI,RBX
CALL 0x00124490
MOV R13D,EAX
JMP 0x00157b3e
|
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_00157b2f;
if ((char)bVar4 < '\0') {
uVar5 = my_mb_wc_utf8mb4_no_range(&local_38,param_2);
if (uVar5 == 0) goto LAB_00157b55;
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_00157b55:
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_00157b2f:
uVar5 = (uint)bVar4;
}
return uVar5 - *param_3;
}
| |
47,850 | void nglog::internal::MakeCheckOpValueString<signed char>(std::ostream*, signed char const&) | ng-log[P]ng-log/src/logging.cc | void MakeCheckOpValueString(std::ostream* os, const signed char& v) {
if (v >= 32 && v <= 126) {
(*os) << "'" << v << "'";
} else {
(*os) << "signed char value " << static_cast<short>(v);
}
} | O3 | cpp | void nglog::internal::MakeCheckOpValueString<signed char>(std::ostream*, signed char const&):
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rsi, %r14
movq %rdi, %rbx
movb (%rsi), %al
addb $-0x7f, %al
cmpb $-0x5f, %al
jae 0xf245
leaq 0x14aa3(%rip), %rsi # 0x23cc6
movl $0x12, %edx
movq %rbx, %rdi
callq 0x75e0
movsbl (%r14), %esi
movq %rbx, %rdi
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
jmp 0x7490
leaq 0x148c2(%rip), %r15 # 0x23b0e
movl $0x1, %edx
movq %rbx, %rdi
movq %r15, %rsi
callq 0x75e0
movb (%r14), %al
leaq 0xf(%rsp), %rsi
movb %al, (%rsi)
movl $0x1, %edx
movq %rbx, %rdi
callq 0x75e0
movl $0x1, %edx
movq %rax, %rdi
movq %r15, %rsi
callq 0x75e0
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
| _ZN5nglog8internal22MakeCheckOpValueStringIaEEvPSoRKT_:
push r15
push r14
push rbx
sub rsp, 10h
mov r14, rsi
mov rbx, rdi
mov al, [rsi]
add al, 81h
cmp al, 0A1h
jnb short loc_F245
lea rsi, aUnsignedCharVa+2; "signed char value "
mov edx, 12h
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)
movsx esi, byte ptr [r14]
mov rdi, rbx
add rsp, 10h
pop rbx
pop r14
pop r15
jmp __ZNSolsEs; std::ostream::operator<<(short)
loc_F245:
lea r15, aDataNumCharsTo+59h; "'"
mov edx, 1
mov rdi, rbx
mov rsi, 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 al, [r14]
lea rsi, [rsp+28h+var_19]
mov [rsi], al
mov edx, 1
mov rdi, rbx
call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long)
mov edx, 1
mov rdi, rax
mov rsi, r15
call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long)
add rsp, 10h
pop rbx
pop r14
pop r15
retn
| long long nglog::internal::MakeCheckOpValueString<signed char>(long long a1, char *a2)
{
long long v3; // rax
_BYTE v4[25]; // [rsp+Fh] [rbp-19h] BYREF
if ( (unsigned __int8)(*a2 - 127) >= 0xA1u )
{
std::__ostream_insert<char,std::char_traits<char>>(a1, "'", 1LL);
v4[0] = *a2;
v3 = std::__ostream_insert<char,std::char_traits<char>>(a1, v4, 1LL);
return std::__ostream_insert<char,std::char_traits<char>>(v3, "'", 1LL);
}
else
{
std::__ostream_insert<char,std::char_traits<char>>(a1, "signed char value ", 18LL);
return std::ostream::operator<<(a1, (unsigned int)*a2);
}
}
| MakeCheckOpValueString<signed_char>:
PUSH R15
PUSH R14
PUSH RBX
SUB RSP,0x10
MOV R14,RSI
MOV RBX,RDI
MOV AL,byte ptr [RSI]
ADD AL,0x81
CMP AL,0xa1
JNC 0x0010f245
LEA RSI,[0x123cc6]
MOV EDX,0x12
MOV RDI,RBX
CALL 0x001075e0
MOVSX ESI,byte ptr [R14]
MOV RDI,RBX
ADD RSP,0x10
POP RBX
POP R14
POP R15
JMP 0x00107490
LAB_0010f245:
LEA R15,[0x123b0e]
MOV EDX,0x1
MOV RDI,RBX
MOV RSI,R15
CALL 0x001075e0
MOV AL,byte ptr [R14]
LEA RSI,[RSP + 0xf]
MOV byte ptr [RSI],AL
MOV EDX,0x1
MOV RDI,RBX
CALL 0x001075e0
MOV EDX,0x1
MOV RDI,RAX
MOV RSI,R15
CALL 0x001075e0
ADD RSP,0x10
POP RBX
POP R14
POP R15
RET
|
/* void nglog::internal::MakeCheckOpValueString<signed char>(std::ostream*, signed char const&) */
void nglog::internal::MakeCheckOpValueString<signed_char>(ostream *param_1,signed *param_2)
{
ostream *poVar1;
signed local_19;
if ((byte)((char)*param_2 + 0x81U) < 0xa1) {
std::__ostream_insert<char,std::char_traits<char>>(param_1,"signed char value ",0x12);
std::ostream::operator<<(param_1,(short)(char)*param_2);
return;
}
std::__ostream_insert<char,std::char_traits<char>>(param_1,"\'",1);
local_19 = *param_2;
poVar1 = std::__ostream_insert<char,std::char_traits<char>>(param_1,(char *)&local_19,1);
std::__ostream_insert<char,std::char_traits<char>>(poVar1,"\'",1);
return;
}
| |
47,851 | my_error | eloqsql/mysys/my_error.c | void my_error(uint nr, myf MyFlags, ...)
{
const char *format;
va_list args;
char ebuff[ERRMSGSIZE];
DBUG_ENTER("my_error");
DBUG_PRINT("my", ("nr: %d MyFlags: %lu errno: %d", nr, MyFlags, errno));
if (!(format = my_get_err_msg(nr)))
(void) my_snprintf(ebuff, sizeof(ebuff), "Unknown error %d", nr);
else
{
va_start(args,MyFlags);
(void) my_vsnprintf_ex(&my_charset_utf8mb3_general_ci, ebuff,
sizeof(ebuff), format, args);
va_end(args);
}
(*error_handler_hook)(nr, ebuff, MyFlags);
DBUG_VOID_RETURN;
} | O0 | c | my_error:
pushq %rbp
movq %rsp, %rbp
subq $0x2f0, %rsp # imm = 0x2F0
testb %al, %al
je 0x78697
movaps %xmm0, -0x2c0(%rbp)
movaps %xmm1, -0x2b0(%rbp)
movaps %xmm2, -0x2a0(%rbp)
movaps %xmm3, -0x290(%rbp)
movaps %xmm4, -0x280(%rbp)
movaps %xmm5, -0x270(%rbp)
movaps %xmm6, -0x260(%rbp)
movaps %xmm7, -0x250(%rbp)
movq %r9, -0x2c8(%rbp)
movq %r8, -0x2d0(%rbp)
movq %rcx, -0x2d8(%rbp)
movq %rdx, -0x2e0(%rbp)
movq %fs:0x28, %rax
movq %rax, -0x8(%rbp)
movl %edi, -0x214(%rbp)
movq %rsi, -0x220(%rbp)
jmp 0x786cf
movl -0x214(%rbp), %edi
callq 0x785a0
movq %rax, -0x228(%rbp)
cmpq $0x0, %rax
jne 0x78709
leaq -0x210(%rbp), %rdi
movl -0x214(%rbp), %ecx
movl $0x200, %esi # imm = 0x200
leaq 0x5818c(%rip), %rdx # 0xd088c
movb $0x0, %al
callq 0xc7b80
jmp 0x7875d
leaq -0x240(%rbp), %rax
leaq -0x2f0(%rbp), %rcx
movq %rcx, 0x10(%rax)
leaq 0x10(%rbp), %rcx
movq %rcx, 0x8(%rax)
movl $0x30, 0x4(%rax)
movl $0x10, (%rax)
leaq -0x210(%rbp), %rsi
movq -0x228(%rbp), %rcx
leaq -0x240(%rbp), %r8
leaq 0x3706b4(%rip), %rdi # 0x3e8e00
movl $0x200, %edx # imm = 0x200
callq 0xc5560
leaq -0x240(%rbp), %rax
leaq 0x1bd05c(%rip), %rax # 0x2357c0
movq (%rax), %rax
movl -0x214(%rbp), %edi
leaq -0x210(%rbp), %rsi
movq -0x220(%rbp), %rdx
callq *%rax
jmp 0x7877f
movq %fs:0x28, %rax
movq -0x8(%rbp), %rcx
cmpq %rcx, %rax
jne 0x7879a
addq $0x2f0, %rsp # imm = 0x2F0
popq %rbp
retq
callq 0x362a0
nop
| my_error:
push rbp
mov rbp, rsp
sub rsp, 2F0h
test al, al
jz short loc_78697
movaps [rbp+var_2C0], xmm0
movaps [rbp+var_2B0], xmm1
movaps [rbp+var_2A0], xmm2
movaps [rbp+var_290], xmm3
movaps [rbp+var_280], xmm4
movaps [rbp+var_270], xmm5
movaps [rbp+var_260], xmm6
movaps [rbp+var_250], xmm7
loc_78697:
mov [rbp+var_2C8], r9
mov [rbp+var_2D0], r8
mov [rbp+var_2D8], rcx
mov [rbp+var_2E0], rdx
mov rax, fs:28h
mov [rbp+var_8], rax
mov [rbp+var_214], edi
mov [rbp+var_220], rsi
jmp short $+2
loc_786CF:
mov edi, [rbp+var_214]
call my_get_err_msg
mov [rbp+var_228], rax
cmp rax, 0
jnz short loc_78709
lea rdi, [rbp+var_210]
mov ecx, [rbp+var_214]
mov esi, 200h
lea rdx, aUnknownErrorD; "Unknown error %d"
mov al, 0
call my_snprintf
jmp short loc_7875D
loc_78709:
lea rax, [rbp+var_240]
lea rcx, [rbp+var_2F0]
mov [rax+10h], rcx
lea rcx, [rbp+arg_0]
mov [rax+8], rcx
mov dword ptr [rax+4], 30h ; '0'
mov dword ptr [rax], 10h
lea rsi, [rbp+var_210]
mov rcx, [rbp+var_228]
lea r8, [rbp+var_240]
lea rdi, my_charset_utf8mb3_general_ci
mov edx, 200h
call my_vsnprintf_ex
lea rax, [rbp+var_240]
loc_7875D:
lea rax, error_handler_hook
mov rax, [rax]
mov edi, [rbp+var_214]
lea rsi, [rbp+var_210]
mov rdx, [rbp+var_220]
call rax
jmp short $+2
loc_7877F:
mov rax, fs:28h
mov rcx, [rbp+var_8]
cmp rax, rcx
jnz short loc_7879A
add rsp, 2F0h
pop rbp
retn
loc_7879A:
call ___stack_chk_fail
| unsigned long long my_error(unsigned int a1, long long a2, ...)
{
int v2; // r8d
int v3; // r9d
va_list va; // [rsp+B0h] [rbp-240h] BYREF
_BYTE *err_msg; // [rsp+C8h] [rbp-228h]
long long v7; // [rsp+D0h] [rbp-220h]
unsigned int v8; // [rsp+DCh] [rbp-214h]
_BYTE v9[520]; // [rsp+E0h] [rbp-210h] BYREF
unsigned long long v10; // [rsp+2E8h] [rbp-8h]
va_start(va, a2);
va_arg(va, _QWORD);
va_arg(va, _QWORD);
va_arg(va, _QWORD);
va_arg(va, _QWORD);
va_end(va);
v10 = __readfsqword(0x28u);
v8 = a1;
v7 = a2;
err_msg = my_get_err_msg(a1);
if ( err_msg )
{
va_start(va, a2);
my_vsnprintf_ex(&my_charset_utf8mb3_general_ci, v9, 512LL, err_msg, va);
}
else
{
my_snprintf((unsigned int)v9, 512, (unsigned int)"Unknown error %d", v8, v2, v3);
}
error_handler_hook();
return __readfsqword(0x28u);
}
| my_error:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x2f0
TEST AL,AL
JZ 0x00178697
MOVAPS xmmword ptr [RBP + -0x2c0],XMM0
MOVAPS xmmword ptr [RBP + -0x2b0],XMM1
MOVAPS xmmword ptr [RBP + -0x2a0],XMM2
MOVAPS xmmword ptr [RBP + -0x290],XMM3
MOVAPS xmmword ptr [RBP + -0x280],XMM4
MOVAPS xmmword ptr [RBP + -0x270],XMM5
MOVAPS xmmword ptr [RBP + -0x260],XMM6
MOVAPS xmmword ptr [RBP + -0x250],XMM7
LAB_00178697:
MOV qword ptr [RBP + -0x2c8],R9
MOV qword ptr [RBP + -0x2d0],R8
MOV qword ptr [RBP + -0x2d8],RCX
MOV qword ptr [RBP + -0x2e0],RDX
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x8],RAX
MOV dword ptr [RBP + -0x214],EDI
MOV qword ptr [RBP + -0x220],RSI
JMP 0x001786cf
LAB_001786cf:
MOV EDI,dword ptr [RBP + -0x214]
CALL 0x001785a0
MOV qword ptr [RBP + -0x228],RAX
CMP RAX,0x0
JNZ 0x00178709
LEA RDI,[RBP + -0x210]
MOV ECX,dword ptr [RBP + -0x214]
MOV ESI,0x200
LEA RDX,[0x1d088c]
MOV AL,0x0
CALL 0x001c7b80
JMP 0x0017875d
LAB_00178709:
LEA RAX,[RBP + -0x240]
LEA RCX,[RBP + -0x2f0]
MOV qword ptr [RAX + 0x10],RCX
LEA RCX,[RBP + 0x10]
MOV qword ptr [RAX + 0x8],RCX
MOV dword ptr [RAX + 0x4],0x30
MOV dword ptr [RAX],0x10
LEA RSI,[RBP + -0x210]
MOV RCX,qword ptr [RBP + -0x228]
LEA R8,[RBP + -0x240]
LEA RDI,[0x4e8e00]
MOV EDX,0x200
CALL 0x001c5560
LEA RAX,[RBP + -0x240]
LAB_0017875d:
LEA RAX,[0x3357c0]
MOV RAX,qword ptr [RAX]
MOV EDI,dword ptr [RBP + -0x214]
LEA RSI,[RBP + -0x210]
MOV RDX,qword ptr [RBP + -0x220]
CALL RAX
JMP 0x0017877f
LAB_0017877f:
MOV RAX,qword ptr FS:[0x28]
MOV RCX,qword ptr [RBP + -0x8]
CMP RAX,RCX
JNZ 0x0017879a
ADD RSP,0x2f0
POP RBP
RET
LAB_0017879a:
CALL 0x001362a0
|
void my_error(int8 param_1,int8 param_2,int8 param_3,int8 param_4,
int8 param_5,int8 param_6,int8 param_7,int8 param_8,
int4 param_9,int8 param_10,int8 param_11,int8 param_12,
int8 param_13,int8 param_14)
{
char in_AL;
long in_FS_OFFSET;
int1 local_2f8 [16];
int8 local_2e8;
int8 local_2e0;
int8 local_2d8;
int8 local_2d0;
int8 local_2c8;
int8 local_2b8;
int8 local_2a8;
int8 local_298;
int8 local_288;
int8 local_278;
int8 local_268;
int8 local_258;
int4 local_248;
int4 local_244;
int1 *local_240;
int1 *local_238;
long local_230;
int8 local_228;
int4 local_21c;
int1 local_218 [520];
long local_10;
if (in_AL != '\0') {
local_2c8 = param_1;
local_2b8 = param_2;
local_2a8 = param_3;
local_298 = param_4;
local_288 = param_5;
local_278 = param_6;
local_268 = param_7;
local_258 = param_8;
}
local_10 = *(long *)(in_FS_OFFSET + 0x28);
local_2e8 = param_11;
local_2e0 = param_12;
local_2d8 = param_13;
local_2d0 = param_14;
local_228 = param_10;
local_21c = param_9;
local_230 = my_get_err_msg(param_9);
if (local_230 == 0) {
my_snprintf(local_218,0x200,"Unknown error %d",local_21c);
}
else {
local_238 = local_2f8;
local_240 = &stack0x00000008;
local_244 = 0x30;
local_248 = 0x10;
my_vsnprintf_ex(my_charset_utf8mb3_general_ci,local_218,0x200,local_230,&local_248);
}
(*(code *)error_handler_hook)(local_21c,local_218,local_228);
if (*(long *)(in_FS_OFFSET + 0x28) == local_10) {
return;
}
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
| |
47,852 | minja::Value::operator-(minja::Value const&) const | monkey531[P]llama/common/minja.hpp | Value operator-(const Value& rhs) const {
if (is_number_integer() && rhs.is_number_integer())
return get<int64_t>() - rhs.get<int64_t>();
else
return get<double>() - rhs.get<double>();
} | O3 | cpp | minja::Value::operator-(minja::Value const&) const:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rdx, %r14
movq %rdi, %rbx
movb 0x40(%rsi), %al
addb $-0x5, %al
cmpb $0x1, %al
ja 0x971c3
movb 0x40(%r14), %al
addb $-0x5, %al
cmpb $0x1, %al
ja 0x971c3
movq %rsi, %rdi
callq 0x86452
movq %rax, %r15
movq %r14, %rdi
callq 0x86452
subq %rax, %r15
leaq 0x40(%rbx), %r14
xorpd %xmm0, %xmm0
movupd %xmm0, (%rbx)
movupd %xmm0, 0x10(%rbx)
movupd %xmm0, 0x20(%rbx)
movupd %xmm0, 0x30(%rbx)
movupd %xmm0, 0x40(%rbx)
movq %r14, %rdi
movq %r15, %rsi
callq 0x607c6
jmp 0x9720f
movq %rsi, %rdi
callq 0x8659c
movsd %xmm0, 0x8(%rsp)
movq %r14, %rdi
callq 0x8659c
movsd 0x8(%rsp), %xmm1
subsd %xmm0, %xmm1
leaq 0x40(%rbx), %r14
xorpd %xmm0, %xmm0
movupd %xmm0, (%rbx)
movupd %xmm0, 0x10(%rbx)
movupd %xmm0, 0x20(%rbx)
movupd %xmm0, 0x30(%rbx)
movupd %xmm0, 0x40(%rbx)
movq %r14, %rdi
movapd %xmm1, %xmm0
callq 0x5fd8e
movq %r14, %rdi
movl $0x1, %esi
callq 0x58aa4
movq %rbx, %rax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
nop
| _ZNK5minja5ValuemiERKS0_:
push r15
push r14
push rbx
sub rsp, 10h
mov r14, rdx
mov rbx, rdi
mov al, [rsi+40h]
add al, 0FBh
cmp al, 1
ja short loc_971C3
mov al, [r14+40h]
add al, 0FBh
cmp al, 1
ja short loc_971C3
mov rdi, rsi
call _ZNK5minja5Value3getIlEET_v; minja::Value::get<long>(void)
mov r15, rax
mov rdi, r14
call _ZNK5minja5Value3getIlEET_v; minja::Value::get<long>(void)
sub r15, rax
lea r14, [rbx+40h]
xorpd xmm0, xmm0
movupd xmmword ptr [rbx], xmm0
movupd xmmword ptr [rbx+10h], xmm0
movupd xmmword ptr [rbx+20h], xmm0
movupd xmmword ptr [rbx+30h], xmm0
movupd xmmword ptr [rbx+40h], xmm0
mov rdi, r14
mov rsi, r15
call _ZN8nlohmann16json_abi_v3_11_36detail20external_constructorILNS1_7value_tE5EE9constructINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES8_IhSaIhEEvEEEEvRT_NSJ_16number_integer_tE; nlohmann::json_abi_v3_11_3::detail::external_constructor<(nlohmann::json_abi_v3_11_3::detail::value_t)5>::construct<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> &,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>::number_integer_t)
jmp short loc_9720F
loc_971C3:
mov rdi, rsi
call _ZNK5minja5Value3getIdEET_v; minja::Value::get<double>(void)
movsd [rsp+28h+var_20], xmm0
mov rdi, r14
call _ZNK5minja5Value3getIdEET_v; minja::Value::get<double>(void)
movsd xmm1, [rsp+28h+var_20]
subsd xmm1, xmm0
lea r14, [rbx+40h]
xorpd xmm0, xmm0
movupd xmmword ptr [rbx], xmm0
movupd xmmword ptr [rbx+10h], xmm0
movupd xmmword ptr [rbx+20h], xmm0
movupd xmmword ptr [rbx+30h], xmm0
movupd xmmword ptr [rbx+40h], xmm0
mov rdi, r14
movapd xmm0, xmm1
call _ZN8nlohmann16json_abi_v3_11_36detail20external_constructorILNS1_7value_tE7EE9constructINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES8_IhSaIhEEvEEEEvRT_NSJ_14number_float_tE; nlohmann::json_abi_v3_11_3::detail::external_constructor<(nlohmann::json_abi_v3_11_3::detail::value_t)7>::construct<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> &,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>::number_float_t)
loc_9720F:
mov rdi, r14
mov esi, 1
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool)
mov rax, rbx
add rsp, 10h
pop rbx
pop r14
pop r15
retn
| long long minja::Value::operator-(long long a1, long long a2, long long a3)
{
long long v4; // r15
long long v5; // rax
char *v6; // r14
double v7; // xmm1_8
double v9; // [rsp+8h] [rbp-20h]
if ( (unsigned __int8)(*(_BYTE *)(a2 + 64) - 5) > 1u || (unsigned __int8)(*(_BYTE *)(a3 + 64) - 5) > 1u )
{
v9 = minja::Value::get<double>(a2);
v7 = v9 - minja::Value::get<double>(a3);
v6 = (char *)(a1 + 64);
*(_OWORD *)a1 = 0LL;
*(_OWORD *)(a1 + 16) = 0LL;
*(_OWORD *)(a1 + 32) = 0LL;
*(_OWORD *)(a1 + 48) = 0LL;
*(_OWORD *)(a1 + 64) = 0LL;
nlohmann::json_abi_v3_11_3::detail::external_constructor<(nlohmann::json_abi_v3_11_3::detail::value_t)7>::construct<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>>(
(unsigned __int8 *)(a1 + 64),
v7);
}
else
{
v4 = minja::Value::get<long>(a2);
v5 = minja::Value::get<long>(a3);
v6 = (char *)(a1 + 64);
*(_OWORD *)a1 = 0LL;
*(_OWORD *)(a1 + 16) = 0LL;
*(_OWORD *)(a1 + 32) = 0LL;
*(_OWORD *)(a1 + 48) = 0LL;
*(_OWORD *)(a1 + 64) = 0LL;
nlohmann::json_abi_v3_11_3::detail::external_constructor<(nlohmann::json_abi_v3_11_3::detail::value_t)5>::construct<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>>(
(unsigned __int8 *)(a1 + 64),
v4 - v5);
}
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::assert_invariant(v6);
return a1;
}
| operator-:
PUSH R15
PUSH R14
PUSH RBX
SUB RSP,0x10
MOV R14,RDX
MOV RBX,RDI
MOV AL,byte ptr [RSI + 0x40]
ADD AL,0xfb
CMP AL,0x1
JA 0x001971c3
MOV AL,byte ptr [R14 + 0x40]
ADD AL,0xfb
CMP AL,0x1
JA 0x001971c3
MOV RDI,RSI
CALL 0x00186452
MOV R15,RAX
MOV RDI,R14
CALL 0x00186452
SUB R15,RAX
LEA R14,[RBX + 0x40]
XORPD XMM0,XMM0
MOVUPD xmmword ptr [RBX],XMM0
MOVUPD xmmword ptr [RBX + 0x10],XMM0
MOVUPD xmmword ptr [RBX + 0x20],XMM0
MOVUPD xmmword ptr [RBX + 0x30],XMM0
MOVUPD xmmword ptr [RBX + 0x40],XMM0
MOV RDI,R14
MOV RSI,R15
CALL 0x001607c6
JMP 0x0019720f
LAB_001971c3:
MOV RDI,RSI
CALL 0x0018659c
MOVSD qword ptr [RSP + 0x8],XMM0
MOV RDI,R14
CALL 0x0018659c
MOVSD XMM1,qword ptr [RSP + 0x8]
SUBSD XMM1,XMM0
LEA R14,[RBX + 0x40]
XORPD XMM0,XMM0
MOVUPD xmmword ptr [RBX],XMM0
MOVUPD xmmword ptr [RBX + 0x10],XMM0
MOVUPD xmmword ptr [RBX + 0x20],XMM0
MOVUPD xmmword ptr [RBX + 0x30],XMM0
MOVUPD xmmword ptr [RBX + 0x40],XMM0
MOV RDI,R14
MOVAPD XMM0,XMM1
CALL 0x0015fd8e
LAB_0019720f:
MOV RDI,R14
MOV ESI,0x1
CALL 0x00158aa4
MOV RAX,RBX
ADD RSP,0x10
POP RBX
POP R14
POP R15
RET
|
/* minja::Value::TEMPNAMEPLACEHOLDERVALUE(minja::Value const&) const */
Value * __thiscall minja::Value::operator-(Value *this,Value *param_1)
{
long lVar1;
long lVar2;
Value *in_RDX;
double dVar3;
double dVar4;
if (((byte)((char)param_1[0x40] - 5U) < 2) && ((byte)((char)in_RDX[0x40] - 5U) < 2)) {
lVar1 = get<long>(param_1);
lVar2 = get<long>(in_RDX);
*(int8 *)this = 0;
*(int8 *)(this + 8) = 0;
*(int8 *)(this + 0x10) = 0;
*(int8 *)(this + 0x18) = 0;
*(int8 *)(this + 0x20) = 0;
*(int8 *)(this + 0x28) = 0;
*(int8 *)(this + 0x30) = 0;
*(int8 *)(this + 0x38) = 0;
*(int8 *)(this + 0x40) = 0;
*(int8 *)(this + 0x48) = 0;
nlohmann::json_abi_v3_11_3::detail::
external_constructor<(nlohmann::json_abi_v3_11_3::detail::value_t)5>::
construct<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>
(this + 0x40,lVar1 - lVar2);
}
else {
dVar3 = get<double>(param_1);
dVar4 = get<double>(in_RDX);
*(int8 *)this = 0;
*(int8 *)(this + 8) = 0;
*(int8 *)(this + 0x10) = 0;
*(int8 *)(this + 0x18) = 0;
*(int8 *)(this + 0x20) = 0;
*(int8 *)(this + 0x28) = 0;
*(int8 *)(this + 0x30) = 0;
*(int8 *)(this + 0x38) = 0;
*(int8 *)(this + 0x40) = 0;
*(int8 *)(this + 0x48) = 0;
nlohmann::json_abi_v3_11_3::detail::
external_constructor<(nlohmann::json_abi_v3_11_3::detail::value_t)7>::
construct<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>
(dVar3 - dVar4,this + 0x40);
}
nlohmann::json_abi_v3_11_3::
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,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((bool)((char)this + '@'));
return this;
}
| |
47,853 | ggml_get_rows | 7CodeWizard[P]stablediffusion/ggml/src/ggml.c | struct ggml_tensor * ggml_get_rows(
struct ggml_context * ctx,
struct ggml_tensor * a,
struct ggml_tensor * b) {
GGML_ASSERT(a->ne[2] == b->ne[1]);
GGML_ASSERT(b->ne[3] == 1);
GGML_ASSERT(b->type == GGML_TYPE_I32);
bool is_node = false;
if (a->grad || b->grad) {
is_node = true;
}
// TODO: implement non F32 return
enum ggml_type type = GGML_TYPE_F32;
if (a->type == GGML_TYPE_I32) {
type = a->type;
}
struct ggml_tensor * result = ggml_new_tensor_4d(ctx, type, a->ne[0], b->ne[0], b->ne[1], b->ne[2]);
result->op = GGML_OP_GET_ROWS;
result->grad = is_node ? ggml_dup_tensor(ctx, result) : NULL;
result->src[0] = a;
result->src[1] = b;
return result;
} | O0 | c | ggml_get_rows:
subq $0x38, %rsp
movq %rdi, 0x30(%rsp)
movq %rsi, 0x28(%rsp)
movq %rdx, 0x20(%rsp)
movq 0x28(%rsp), %rax
movq 0x20(%rax), %rax
movq 0x20(%rsp), %rcx
cmpq 0x18(%rcx), %rax
je 0x12390b
movq 0xb465a(%rip), %rax # 0x1d7f28
movq (%rax), %rdi
callq 0xb8e0
movq 0xb46cb(%rip), %rax # 0x1d7fa8
movq (%rax), %rdi
leaq 0x5c333(%rip), %rsi # 0x17fc1a
leaq 0x65d80(%rip), %rdx # 0x18966e
movl $0x1296, %ecx # imm = 0x1296
leaq 0x66430(%rip), %r8 # 0x189d2a
movb $0x0, %al
callq 0xbae0
callq 0x11a4f0
callq 0xb3a0
jmp 0x12390d
jmp 0x12390f
movq 0x20(%rsp), %rax
cmpq $0x1, 0x28(%rax)
je 0x12395f
movq 0xb4606(%rip), %rax # 0x1d7f28
movq (%rax), %rdi
callq 0xb8e0
movq 0xb4677(%rip), %rax # 0x1d7fa8
movq (%rax), %rdi
leaq 0x5c2df(%rip), %rsi # 0x17fc1a
leaq 0x65d2c(%rip), %rdx # 0x18966e
movl $0x1297, %ecx # imm = 0x1297
leaq 0x663f1(%rip), %r8 # 0x189d3f
movb $0x0, %al
callq 0xbae0
callq 0x11a4f0
callq 0xb3a0
jmp 0x123961
jmp 0x123963
movq 0x20(%rsp), %rax
cmpl $0x12, (%rax)
je 0x1239b1
movq 0xb45b4(%rip), %rax # 0x1d7f28
movq (%rax), %rdi
callq 0xb8e0
movq 0xb4625(%rip), %rax # 0x1d7fa8
movq (%rax), %rdi
leaq 0x5c28d(%rip), %rsi # 0x17fc1a
leaq 0x65cda(%rip), %rdx # 0x18966e
movl $0x1298, %ecx # imm = 0x1298
leaq 0x663d7(%rip), %r8 # 0x189d77
movb $0x0, %al
callq 0xbae0
callq 0x11a4f0
callq 0xb3a0
jmp 0x1239b3
movb $0x0, 0x1f(%rsp)
movq 0x28(%rsp), %rax
cmpq $0x0, 0x98(%rax)
jne 0x1239d6
movq 0x20(%rsp), %rax
cmpq $0x0, 0x98(%rax)
je 0x1239db
movb $0x1, 0x1f(%rsp)
movl $0x0, 0x18(%rsp)
movq 0x28(%rsp), %rax
cmpl $0x12, (%rax)
jne 0x1239f8
movq 0x28(%rsp), %rax
movl (%rax), %eax
movl %eax, 0x18(%rsp)
movq 0x30(%rsp), %rdi
movl 0x18(%rsp), %esi
movq 0x28(%rsp), %rax
movq 0x10(%rax), %rdx
movq 0x20(%rsp), %rax
movq 0x10(%rax), %rcx
movq 0x20(%rsp), %rax
movq 0x18(%rax), %r8
movq 0x20(%rsp), %rax
movq 0x20(%rax), %r9
callq 0x11c960
movq %rax, 0x10(%rsp)
movq 0x10(%rsp), %rax
movl $0x22, 0x50(%rax)
testb $0x1, 0x1f(%rsp)
je 0x123a58
movq 0x30(%rsp), %rdi
movq 0x10(%rsp), %rsi
callq 0x11cfc0
movq %rax, 0x8(%rsp)
jmp 0x123a61
xorl %eax, %eax
movq %rax, 0x8(%rsp)
jmp 0x123a61
movq 0x8(%rsp), %rcx
movq 0x10(%rsp), %rax
movq %rcx, 0x98(%rax)
movq 0x28(%rsp), %rcx
movq 0x10(%rsp), %rax
movq %rcx, 0xa0(%rax)
movq 0x20(%rsp), %rcx
movq 0x10(%rsp), %rax
movq %rcx, 0xa8(%rax)
movq 0x10(%rsp), %rax
addq $0x38, %rsp
retq
nop
| ggml_get_rows:
sub rsp, 38h
mov [rsp+38h+var_8], rdi
mov [rsp+38h+var_10], rsi
mov [rsp+38h+var_18], rdx
mov rax, [rsp+38h+var_10]
mov rax, [rax+20h]
mov rcx, [rsp+38h+var_18]
cmp rax, [rcx+18h]
jz short loc_12390B
mov rax, cs:stdout_ptr
mov rdi, [rax]
call _fflush
mov rax, cs:stderr_ptr
mov rdi, [rax]
lea rsi, aGgmlAssertSDS; "GGML_ASSERT: %s:%d: %s\n"
lea rdx, aWorkspaceLlm4b_7; "/workspace/llm4binary/github/2025_star3"...
mov ecx, 1296h
lea r8, aANe2BNe1; "a->ne[2] == b->ne[1]"
mov al, 0
call _fprintf
call ggml_print_backtrace
call _abort
loc_12390B:
jmp short $+2
loc_12390D:
jmp short $+2
loc_12390F:
mov rax, [rsp+38h+var_18]
cmp qword ptr [rax+28h], 1
jz short loc_12395F
mov rax, cs:stdout_ptr
mov rdi, [rax]
call _fflush
mov rax, cs:stderr_ptr
mov rdi, [rax]
lea rsi, aGgmlAssertSDS; "GGML_ASSERT: %s:%d: %s\n"
lea rdx, aWorkspaceLlm4b_7; "/workspace/llm4binary/github/2025_star3"...
mov ecx, 1297h
lea r8, aBNe31; "b->ne[3] == 1"
mov al, 0
call _fprintf
call ggml_print_backtrace
call _abort
loc_12395F:
jmp short $+2
loc_123961:
jmp short $+2
loc_123963:
mov rax, [rsp+38h+var_18]
cmp dword ptr [rax], 12h
jz short loc_1239B1
mov rax, cs:stdout_ptr
mov rdi, [rax]
call _fflush
mov rax, cs:stderr_ptr
mov rdi, [rax]
lea rsi, aGgmlAssertSDS; "GGML_ASSERT: %s:%d: %s\n"
lea rdx, aWorkspaceLlm4b_7; "/workspace/llm4binary/github/2025_star3"...
mov ecx, 1298h
lea r8, aGgmlIsMatrixAG+2Ah; "b->type == GGML_TYPE_I32"
mov al, 0
call _fprintf
call ggml_print_backtrace
call _abort
loc_1239B1:
jmp short $+2
loc_1239B3:
mov [rsp+38h+var_19], 0
mov rax, [rsp+38h+var_10]
cmp qword ptr [rax+98h], 0
jnz short loc_1239D6
mov rax, [rsp+38h+var_18]
cmp qword ptr [rax+98h], 0
jz short loc_1239DB
loc_1239D6:
mov [rsp+38h+var_19], 1
loc_1239DB:
mov [rsp+38h+var_20], 0
mov rax, [rsp+38h+var_10]
cmp dword ptr [rax], 12h
jnz short loc_1239F8
mov rax, [rsp+38h+var_10]
mov eax, [rax]
mov [rsp+38h+var_20], eax
loc_1239F8:
mov rdi, [rsp+38h+var_8]
mov esi, [rsp+38h+var_20]
mov rax, [rsp+38h+var_10]
mov rdx, [rax+10h]
mov rax, [rsp+38h+var_18]
mov rcx, [rax+10h]
mov rax, [rsp+38h+var_18]
mov r8, [rax+18h]
mov rax, [rsp+38h+var_18]
mov r9, [rax+20h]
call ggml_new_tensor_4d
mov [rsp+38h+var_28], rax
mov rax, [rsp+38h+var_28]
mov dword ptr [rax+50h], 22h ; '"'
test [rsp+38h+var_19], 1
jz short loc_123A58
mov rdi, [rsp+38h+var_8]
mov rsi, [rsp+38h+var_28]
call ggml_dup_tensor
mov [rsp+38h+var_30], rax
jmp short loc_123A61
loc_123A58:
xor eax, eax
mov [rsp+38h+var_30], rax
jmp short $+2
loc_123A61:
mov rcx, [rsp+38h+var_30]
mov rax, [rsp+38h+var_28]
mov [rax+98h], rcx
mov rcx, [rsp+38h+var_10]
mov rax, [rsp+38h+var_28]
mov [rax+0A0h], rcx
mov rcx, [rsp+38h+var_18]
mov rax, [rsp+38h+var_28]
mov [rax+0A8h], rcx
mov rax, [rsp+38h+var_28]
add rsp, 38h
retn
| long long ggml_get_rows(long long a1, long long a2, long long a3)
{
long long v3; // rdi
long long v4; // rdi
long long v5; // rdi
long long v7; // [rsp+8h] [rbp-30h]
long long v8; // [rsp+10h] [rbp-28h]
unsigned int v9; // [rsp+18h] [rbp-20h]
char v10; // [rsp+1Fh] [rbp-19h]
if ( *(_QWORD *)(a2 + 32) != *(_QWORD *)(a3 + 24) )
{
fflush(stdout);
v3 = stderr;
fprintf(
stderr,
"GGML_ASSERT: %s:%d: %s\n",
"/workspace/llm4binary/github/2025_star3/7CodeWizard[P]stablediffusion/ggml/src/ggml.c",
4758,
"a->ne[2] == b->ne[1]");
ggml_print_backtrace();
abort(v3);
}
if ( *(_QWORD *)(a3 + 40) != 1LL )
{
fflush(stdout);
v4 = stderr;
fprintf(
stderr,
"GGML_ASSERT: %s:%d: %s\n",
"/workspace/llm4binary/github/2025_star3/7CodeWizard[P]stablediffusion/ggml/src/ggml.c",
4759,
"b->ne[3] == 1");
ggml_print_backtrace();
abort(v4);
}
if ( *(_DWORD *)a3 != 18 )
{
fflush(stdout);
v5 = stderr;
fprintf(
stderr,
"GGML_ASSERT: %s:%d: %s\n",
"/workspace/llm4binary/github/2025_star3/7CodeWizard[P]stablediffusion/ggml/src/ggml.c",
4760,
"b->type == GGML_TYPE_I32");
ggml_print_backtrace();
abort(v5);
}
v10 = 0;
if ( *(_QWORD *)(a2 + 152) || *(_QWORD *)(a3 + 152) )
v10 = 1;
v9 = 0;
if ( *(_DWORD *)a2 == 18 )
v9 = *(_DWORD *)a2;
v8 = ggml_new_tensor_4d(
a1,
v9,
*(_QWORD *)(a2 + 16),
*(_QWORD *)(a3 + 16),
*(_QWORD *)(a3 + 24),
*(_QWORD *)(a3 + 32));
*(_DWORD *)(v8 + 80) = 34;
if ( (v10 & 1) != 0 )
v7 = ggml_dup_tensor(a1, (unsigned int *)v8);
else
v7 = 0LL;
*(_QWORD *)(v8 + 152) = v7;
*(_QWORD *)(v8 + 160) = a2;
*(_QWORD *)(v8 + 168) = a3;
return v8;
}
| |||
47,854 | ggml_get_rows | 7CodeWizard[P]stablediffusion/ggml/src/ggml.c | struct ggml_tensor * ggml_get_rows(
struct ggml_context * ctx,
struct ggml_tensor * a,
struct ggml_tensor * b) {
GGML_ASSERT(a->ne[2] == b->ne[1]);
GGML_ASSERT(b->ne[3] == 1);
GGML_ASSERT(b->type == GGML_TYPE_I32);
bool is_node = false;
if (a->grad || b->grad) {
is_node = true;
}
// TODO: implement non F32 return
enum ggml_type type = GGML_TYPE_F32;
if (a->type == GGML_TYPE_I32) {
type = a->type;
}
struct ggml_tensor * result = ggml_new_tensor_4d(ctx, type, a->ne[0], b->ne[0], b->ne[1], b->ne[2]);
result->op = GGML_OP_GET_ROWS;
result->grad = is_node ? ggml_dup_tensor(ctx, result) : NULL;
result->src[0] = a;
result->src[1] = b;
return result;
} | O2 | c | ggml_get_rows:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq 0x20(%rsi), %r8
cmpq 0x18(%rdx), %r8
jne 0x6c739
movq %rdx, %rbx
cmpq $0x1, 0x28(%rdx)
jne 0x6c76e
cmpl $0x12, (%rbx)
jne 0x6c7a3
movq %rsi, %r14
movq %rdi, %r15
cmpq $0x0, 0x98(%rsi)
jne 0x6c6cd
cmpq $0x0, 0x98(%rbx)
je 0x6c735
movb $0x1, %bpl
movl (%r14), %esi
xorl %r12d, %r12d
cmpl $0x12, %esi
cmovnel %r12d, %esi
movq 0x10(%r14), %rdx
movq 0x10(%rbx), %rcx
movq 0x20(%rbx), %r9
movq %r15, %rdi
callq 0x68667
movq %rax, %r13
movl $0x22, 0x50(%rax)
testb %bpl, %bpl
je 0x6c70e
movq %r15, %rdi
movq %r13, %rsi
callq 0x68a65
movq %rax, %r12
movq %r12, 0x98(%r13)
movq %r14, 0xa0(%r13)
movq %rbx, 0xa8(%r13)
movq %r13, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
xorl %ebp, %ebp
jmp 0x6c6d0
movq 0x69808(%rip), %rax # 0xd5f48
movq (%rax), %rdi
callq 0xa6f0
movq 0x69859(%rip), %rax # 0xd5fa8
movq (%rax), %rdi
leaq 0x2dac5(%rip), %rsi # 0x9a21e
leaq 0x3511e(%rip), %rdx # 0xa187e
leaq 0x35770(%rip), %r8 # 0xa1ed7
movl $0x1296, %ecx # imm = 0x1296
jmp 0x6c7d6
movq 0x697d3(%rip), %rax # 0xd5f48
movq (%rax), %rdi
callq 0xa6f0
movq 0x69824(%rip), %rax # 0xd5fa8
movq (%rax), %rdi
leaq 0x2da90(%rip), %rsi # 0x9a21e
leaq 0x350e9(%rip), %rdx # 0xa187e
leaq 0x35750(%rip), %r8 # 0xa1eec
movl $0x1297, %ecx # imm = 0x1297
jmp 0x6c7d6
movq 0x6979e(%rip), %rax # 0xd5f48
movq (%rax), %rdi
callq 0xa6f0
movq 0x697ef(%rip), %rax # 0xd5fa8
movq (%rax), %rdi
leaq 0x2da5b(%rip), %rsi # 0x9a21e
leaq 0x350b4(%rip), %rdx # 0xa187e
leaq 0x35753(%rip), %r8 # 0xa1f24
movl $0x1298, %ecx # imm = 0x1298
xorl %eax, %eax
callq 0xa8b0
callq 0x67550
callq 0xa300
| ggml_get_rows:
push rbp
push r15
push r14
push r13
push r12
push rbx
push rax
mov r8, [rsi+20h]
cmp r8, [rdx+18h]
jnz loc_6C739
mov rbx, rdx
cmp qword ptr [rdx+28h], 1
jnz loc_6C76E
cmp dword ptr [rbx], 12h
jnz loc_6C7A3
mov r14, rsi
mov r15, rdi
cmp qword ptr [rsi+98h], 0
jnz short loc_6C6CD
cmp qword ptr [rbx+98h], 0
jz short loc_6C735
loc_6C6CD:
mov bpl, 1
loc_6C6D0:
mov esi, [r14]
xor r12d, r12d
cmp esi, 12h
cmovnz esi, r12d
mov rdx, [r14+10h]
mov rcx, [rbx+10h]
mov r9, [rbx+20h]
mov rdi, r15
call ggml_new_tensor_4d
mov r13, rax
mov dword ptr [rax+50h], 22h ; '"'
test bpl, bpl
jz short loc_6C70E
mov rdi, r15
mov rsi, r13
call ggml_dup_tensor
mov r12, rax
loc_6C70E:
mov [r13+98h], r12
mov [r13+0A0h], r14
mov [r13+0A8h], rbx
mov rax, r13
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_6C735:
xor ebp, ebp
jmp short loc_6C6D0
loc_6C739:
mov rax, cs:stdout_ptr
mov rdi, [rax]
call _fflush
mov rax, cs:stderr_ptr
mov rdi, [rax]
lea rsi, aGgmlAssertSDS; "GGML_ASSERT: %s:%d: %s\n"
lea rdx, aWorkspaceLlm4b_7; "/workspace/llm4binary/github/2025_star3"...
lea r8, aANe2BNe1; "a->ne[2] == b->ne[1]"
mov ecx, 1296h
jmp short loc_6C7D6
loc_6C76E:
mov rax, cs:stdout_ptr
mov rdi, [rax]
call _fflush
mov rax, cs:stderr_ptr
mov rdi, [rax]
lea rsi, aGgmlAssertSDS; "GGML_ASSERT: %s:%d: %s\n"
lea rdx, aWorkspaceLlm4b_7; "/workspace/llm4binary/github/2025_star3"...
lea r8, aBNe31; "b->ne[3] == 1"
mov ecx, 1297h
jmp short loc_6C7D6
loc_6C7A3:
mov rax, cs:stdout_ptr
mov rdi, [rax]
call _fflush
mov rax, cs:stderr_ptr
mov rdi, [rax]
lea rsi, aGgmlAssertSDS; "GGML_ASSERT: %s:%d: %s\n"
lea rdx, aWorkspaceLlm4b_7; "/workspace/llm4binary/github/2025_star3"...
lea r8, aGgmlIsMatrixAG+2Ah; "b->type == GGML_TYPE_I32"
mov ecx, 1298h
loc_6C7D6:
xor eax, eax
call _fprintf
call ggml_print_backtrace
call _abort
| unsigned int * ggml_get_rows(long long a1, long long *a2, long long a3)
{
long long v3; // r8
bool v6; // bp
long long v7; // rsi
long long v8; // r12
unsigned int *v9; // rax
unsigned int *v10; // r13
long long v12; // rdi
v3 = a2[4];
if ( v3 != *(_QWORD *)(a3 + 24) )
{
fflush(stdout);
v12 = stderr;
fprintf(
stderr,
"GGML_ASSERT: %s:%d: %s\n",
"/workspace/llm4binary/github/2025_star3/7CodeWizard[P]stablediffusion/ggml/src/ggml.c",
4758LL,
"a->ne[2] == b->ne[1]");
goto LABEL_16;
}
if ( *(_QWORD *)(a3 + 40) != 1LL )
{
fflush(stdout);
v12 = stderr;
fprintf(
stderr,
"GGML_ASSERT: %s:%d: %s\n",
"/workspace/llm4binary/github/2025_star3/7CodeWizard[P]stablediffusion/ggml/src/ggml.c",
4759LL,
"b->ne[3] == 1");
goto LABEL_16;
}
if ( *(_DWORD *)a3 != 18 )
{
fflush(stdout);
v12 = stderr;
fprintf(
stderr,
"GGML_ASSERT: %s:%d: %s\n",
"/workspace/llm4binary/github/2025_star3/7CodeWizard[P]stablediffusion/ggml/src/ggml.c",
4760LL,
"b->type == GGML_TYPE_I32");
LABEL_16:
ggml_print_backtrace();
abort(v12);
}
v6 = a2[19] || *(_QWORD *)(a3 + 152);
v7 = *(unsigned int *)a2;
v8 = 0LL;
if ( (_DWORD)v7 != 18 )
v7 = 0LL;
v9 = (unsigned int *)ggml_new_tensor_4d(a1, v7, a2[2], *(_QWORD *)(a3 + 16), v3, *(_QWORD *)(a3 + 32));
v10 = v9;
v9[20] = 34;
if ( v6 )
v8 = ggml_dup_tensor(a1, v9);
*((_QWORD *)v10 + 19) = v8;
*((_QWORD *)v10 + 20) = a2;
*((_QWORD *)v10 + 21) = a3;
return v10;
}
| ggml_get_rows:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
PUSH RAX
MOV R8,qword ptr [RSI + 0x20]
CMP R8,qword ptr [RDX + 0x18]
JNZ 0x0016c739
MOV RBX,RDX
CMP qword ptr [RDX + 0x28],0x1
JNZ 0x0016c76e
CMP dword ptr [RBX],0x12
JNZ 0x0016c7a3
MOV R14,RSI
MOV R15,RDI
CMP qword ptr [RSI + 0x98],0x0
JNZ 0x0016c6cd
CMP qword ptr [RBX + 0x98],0x0
JZ 0x0016c735
LAB_0016c6cd:
MOV BPL,0x1
LAB_0016c6d0:
MOV ESI,dword ptr [R14]
XOR R12D,R12D
CMP ESI,0x12
CMOVNZ ESI,R12D
MOV RDX,qword ptr [R14 + 0x10]
MOV RCX,qword ptr [RBX + 0x10]
MOV R9,qword ptr [RBX + 0x20]
MOV RDI,R15
CALL 0x00168667
MOV R13,RAX
MOV dword ptr [RAX + 0x50],0x22
TEST BPL,BPL
JZ 0x0016c70e
MOV RDI,R15
MOV RSI,R13
CALL 0x00168a65
MOV R12,RAX
LAB_0016c70e:
MOV qword ptr [R13 + 0x98],R12
MOV qword ptr [R13 + 0xa0],R14
MOV qword ptr [R13 + 0xa8],RBX
MOV RAX,R13
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_0016c735:
XOR EBP,EBP
JMP 0x0016c6d0
LAB_0016c739:
MOV RAX,qword ptr [0x001d5f48]
MOV RDI,qword ptr [RAX]
CALL 0x0010a6f0
MOV RAX,qword ptr [0x001d5fa8]
MOV RDI,qword ptr [RAX]
LEA RSI,[0x19a21e]
LEA RDX,[0x1a187e]
LEA R8,[0x1a1ed7]
MOV ECX,0x1296
JMP 0x0016c7d6
LAB_0016c76e:
MOV RAX,qword ptr [0x001d5f48]
MOV RDI,qword ptr [RAX]
CALL 0x0010a6f0
MOV RAX,qword ptr [0x001d5fa8]
MOV RDI,qword ptr [RAX]
LEA RSI,[0x19a21e]
LEA RDX,[0x1a187e]
LEA R8,[0x1a1eec]
MOV ECX,0x1297
JMP 0x0016c7d6
LAB_0016c7a3:
MOV RAX,qword ptr [0x001d5f48]
MOV RDI,qword ptr [RAX]
CALL 0x0010a6f0
MOV RAX,qword ptr [0x001d5fa8]
MOV RDI,qword ptr [RAX]
LEA RSI,[0x19a21e]
LEA RDX,[0x1a187e]
LEA R8,[0x1a1f24]
MOV ECX,0x1298
LAB_0016c7d6:
XOR EAX,EAX
CALL 0x0010a8b0
CALL 0x00167550
CALL 0x0010a300
|
long ggml_get_rows(int8 param_1,uint *param_2,int *param_3)
{
bool bVar1;
long lVar2;
ulong uVar3;
int8 uVar4;
ulong uVar5;
FILE *__stream;
char *pcVar6;
if (*(long *)(param_2 + 8) == *(long *)(param_3 + 6)) {
if (*(long *)(param_3 + 10) == 1) {
if (*param_3 == 0x12) {
if ((*(long *)(param_2 + 0x26) == 0) && (*(long *)(param_3 + 0x26) == 0)) {
bVar1 = false;
}
else {
bVar1 = true;
}
uVar3 = 0;
uVar5 = (ulong)*param_2;
if (*param_2 != 0x12) {
uVar5 = uVar3;
}
lVar2 = ggml_new_tensor_4d(param_1,uVar5,*(int8 *)(param_2 + 4),
*(int8 *)(param_3 + 4),*(long *)(param_2 + 8),
*(int8 *)(param_3 + 8));
*(int4 *)(lVar2 + 0x50) = 0x22;
if (bVar1) {
uVar3 = ggml_dup_tensor(param_1,lVar2);
}
*(ulong *)(lVar2 + 0x98) = uVar3;
*(uint **)(lVar2 + 0xa0) = param_2;
*(int **)(lVar2 + 0xa8) = param_3;
return lVar2;
}
fflush(*(FILE **)PTR_stdout_001d5f48);
__stream = *(FILE **)PTR_stderr_001d5fa8;
pcVar6 = "b->type == GGML_TYPE_I32";
uVar4 = 0x1298;
}
else {
fflush(*(FILE **)PTR_stdout_001d5f48);
__stream = *(FILE **)PTR_stderr_001d5fa8;
pcVar6 = "b->ne[3] == 1";
uVar4 = 0x1297;
}
}
else {
fflush(*(FILE **)PTR_stdout_001d5f48);
__stream = *(FILE **)PTR_stderr_001d5fa8;
pcVar6 = "a->ne[2] == b->ne[1]";
uVar4 = 0x1296;
}
fprintf(__stream,"GGML_ASSERT: %s:%d: %s\n",
"/workspace/llm4binary/github/2025_star3/7CodeWizard[P]stablediffusion/ggml/src/ggml.c",
uVar4,pcVar6);
ggml_print_backtrace();
/* WARNING: Subroutine does not return */
abort();
}
| |
47,855 | ggml_get_rows | 7CodeWizard[P]stablediffusion/ggml/src/ggml.c | struct ggml_tensor * ggml_get_rows(
struct ggml_context * ctx,
struct ggml_tensor * a,
struct ggml_tensor * b) {
GGML_ASSERT(a->ne[2] == b->ne[1]);
GGML_ASSERT(b->ne[3] == 1);
GGML_ASSERT(b->type == GGML_TYPE_I32);
bool is_node = false;
if (a->grad || b->grad) {
is_node = true;
}
// TODO: implement non F32 return
enum ggml_type type = GGML_TYPE_F32;
if (a->type == GGML_TYPE_I32) {
type = a->type;
}
struct ggml_tensor * result = ggml_new_tensor_4d(ctx, type, a->ne[0], b->ne[0], b->ne[1], b->ne[2]);
result->op = GGML_OP_GET_ROWS;
result->grad = is_node ? ggml_dup_tensor(ctx, result) : NULL;
result->src[0] = a;
result->src[1] = b;
return result;
} | O3 | c | ggml_get_rows:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq 0x20(%rsi), %rax
cmpq 0x18(%rdx), %rax
jne 0x924d3
movq %rdx, %rbx
cmpq $0x1, 0x28(%rdx)
jne 0x924d8
cmpl $0x12, (%rbx)
jne 0x924dd
movq %rsi, %r14
movq %rdi, %r15
cmpq $0x0, 0x98(%rsi)
jne 0x92434
cmpq $0x0, 0x98(%rbx)
je 0x924cc
movb $0x1, %bpl
movl (%r14), %esi
xorl %r12d, %r12d
cmpl $0x12, %esi
cmovnel %r12d, %esi
movq 0x10(%r14), %rdx
movq 0x10(%rbx), %rdi
movq 0x20(%rbx), %r8
movq %rsp, %rcx
movq %rdx, (%rcx)
movq %rdi, 0x8(%rcx)
movq %rax, 0x10(%rcx)
movq %r8, 0x18(%rcx)
movq %r15, %rdi
movl $0x4, %edx
xorl %r8d, %r8d
xorl %r9d, %r9d
callq 0x8d64f
movq %rax, %r13
movl $0x22, 0x50(%rax)
testb %bpl, %bpl
je 0x924a5
movl (%r13), %esi
movq %r13, %rcx
addq $0x10, %rcx
movq %r15, %rdi
movl $0x4, %edx
xorl %r8d, %r8d
xorl %r9d, %r9d
callq 0x8d64f
movq %rax, %r12
movq %r12, 0x98(%r13)
movq %r14, 0xa0(%r13)
movq %rbx, 0xa8(%r13)
movq %r13, %rax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
xorl %ebp, %ebp
jmp 0x92437
callq 0xdb25
callq 0xdb6a
callq 0xdbaf
| ggml_get_rows:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 28h
mov rax, [rsi+20h]
cmp rax, [rdx+18h]
jnz loc_924D3
mov rbx, rdx
cmp qword ptr [rdx+28h], 1
jnz loc_924D8
cmp dword ptr [rbx], 12h
jnz loc_924DD
mov r14, rsi
mov r15, rdi
cmp qword ptr [rsi+98h], 0
jnz short loc_92434
cmp qword ptr [rbx+98h], 0
jz loc_924CC
loc_92434:
mov bpl, 1
loc_92437:
mov esi, [r14]
xor r12d, r12d
cmp esi, 12h
cmovnz esi, r12d
mov rdx, [r14+10h]
mov rdi, [rbx+10h]
mov r8, [rbx+20h]
mov rcx, rsp
mov [rcx], rdx
mov [rcx+8], rdi
mov [rcx+10h], rax
mov [rcx+18h], r8
mov rdi, r15
mov edx, 4
xor r8d, r8d
xor r9d, r9d
call ggml_new_tensor_impl
mov r13, rax
mov dword ptr [rax+50h], 22h ; '"'
test bpl, bpl
jz short loc_924A5
mov esi, [r13+0]
mov rcx, r13
add rcx, 10h
mov rdi, r15
mov edx, 4
xor r8d, r8d
xor r9d, r9d
call ggml_new_tensor_impl
mov r12, rax
loc_924A5:
mov [r13+98h], r12
mov [r13+0A0h], r14
mov [r13+0A8h], rbx
mov rax, r13
add rsp, 28h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_924CC:
xor ebp, ebp
jmp loc_92437
loc_924D3:
call ggml_get_rows_cold_1
loc_924D8:
call ggml_get_rows_cold_2
loc_924DD:
call ggml_get_rows_cold_3
| _QWORD * ggml_get_rows(long long a1, long long a2, long long a3, __m128 a4, __m128 a5)
{
long long v5; // rax
bool v9; // bp
unsigned int v10; // esi
long long v11; // r12
long long v12; // rdi
long long v13; // r8
long long v14; // rax
_QWORD *v15; // r13
_QWORD v17[11]; // [rsp+0h] [rbp-58h] BYREF
v5 = *(_QWORD *)(a2 + 32);
if ( v5 != *(_QWORD *)(a3 + 24) )
ggml_get_rows_cold_1();
if ( *(_QWORD *)(a3 + 40) != 1LL )
ggml_get_rows_cold_2();
if ( *(_DWORD *)a3 != 18 )
ggml_get_rows_cold_3();
v9 = *(_QWORD *)(a2 + 152) || *(_QWORD *)(a3 + 152);
v10 = *(_DWORD *)a2;
v11 = 0LL;
if ( v10 != 18 )
v10 = 0;
v12 = *(_QWORD *)(a3 + 16);
v13 = *(_QWORD *)(a3 + 32);
v17[0] = *(_QWORD *)(a2 + 16);
v17[1] = v12;
v17[2] = v5;
v17[3] = v13;
v14 = ggml_new_tensor_impl(a1, v10, 4, v17, 0LL, 0LL, a4, a5);
v15 = (_QWORD *)v14;
*(_DWORD *)(v14 + 80) = 34;
if ( v9 )
v11 = ggml_new_tensor_impl(a1, *(_DWORD *)v14, 4, (_QWORD *)(v14 + 16), 0LL, 0LL, a4, a5);
v15[19] = v11;
v15[20] = a2;
v15[21] = a3;
return v15;
}
| |||
47,856 | int minja::Value::get<int>() const | llama.cpp/common/minja/minja.hpp | T get() const {
if (is_primitive()) return primitive_.get<T>();
throw std::runtime_error("get<T> not defined for this value type: " + dump());
} | O3 | cpp | int minja::Value::get<int>() const:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x40, %rsp
movq %rdi, %r14
cmpq $0x0, 0x10(%rdi)
jne 0xc3c17
cmpq $0x0, 0x20(%r14)
jne 0xc3c17
cmpq $0x0, 0x30(%r14)
jne 0xc3c17
addq $0x40, %r14
leaq 0x20(%rsp), %rbx
movl $0x0, (%rbx)
movq %r14, %rdi
movq %rbx, %rsi
callq 0xc3ce5
movl (%rbx), %eax
addq $0x40, %rsp
popq %rbx
popq %r14
popq %rbp
retq
movl $0x10, %edi
callq 0x21700
movq %rax, %rbx
movq %rsp, %rdi
movq %r14, %rsi
movl $0xffffffff, %edx # imm = 0xFFFFFFFF
xorl %ecx, %ecx
callq 0xb9574
leaq 0x5effd(%rip), %rsi # 0x122c3a
leaq 0x20(%rsp), %rdi
movq %rsp, %rdx
callq 0xb2e14
movb $0x1, %bpl
leaq 0x20(%rsp), %rsi
movq %rbx, %rdi
callq 0x214f0
xorl %ebp, %ebp
movq 0xa2355(%rip), %rsi # 0x165fb8
movq 0xa230e(%rip), %rdx # 0x165f78
movq %rbx, %rdi
callq 0x21b50
movq %rax, %r14
leaq 0x30(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xc3c90
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x211a0
leaq 0x10(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xc3cab
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x211a0
testb %bpl, %bpl
jne 0xc3cd5
jmp 0xc3cdd
movq %rax, %r14
leaq 0x10(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xc3cd5
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x211a0
jmp 0xc3cd5
movq %rax, %r14
movq %rbx, %rdi
callq 0x220a0
movq %r14, %rdi
callq 0x21c10
| _ZNK5minja5Value3getIiEET_v:
push rbp
push r14
push rbx
sub rsp, 40h
mov r14, rdi
cmp qword ptr [rdi+10h], 0
jnz short loc_C3C17
cmp qword ptr [r14+20h], 0
jnz short loc_C3C17
cmp qword ptr [r14+30h], 0
jnz short loc_C3C17
add r14, 40h ; '@'
lea rbx, [rsp+58h+var_38]
mov dword ptr [rbx], 0
mov rdi, r14
mov rsi, rbx
call _ZN8nlohmann16json_abi_v3_11_36detail9from_jsonINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEiTnNSt9enable_ifIXaaaaaaaasr3std13is_arithmeticIT0_EE5valuentsr3std7is_sameISH_NT_17number_unsigned_tEEE5valuentsr3std7is_sameISH_NSI_16number_integer_tEEE5valuentsr3std7is_sameISH_NSI_14number_float_tEEE5valuentsr3std7is_sameISH_NSI_9boolean_tEEE5valueEiE4typeELi0EEEvRKSI_RSH_
mov eax, [rbx]
add rsp, 40h
pop rbx
pop r14
pop rbp
retn
loc_C3C17:
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, aGetTNotDefined; "get<T> not defined for this value type:"...
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:_ZNSt13runtime_errorD1Ev_ptr; void (*)(void *)
mov rdi, rbx; void *
call ___cxa_throw
mov r14, rax
lea rax, [rsp+58h+var_28]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_C3C90
mov rsi, [rsp+58h+var_28]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_C3C90:
lea rax, [rsp+58h+var_48]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_C3CAB
mov rsi, [rsp+58h+var_48]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_C3CAB:
test bpl, bpl
jnz short loc_C3CD5
jmp short loc_C3CDD
mov r14, rax
lea rax, [rsp+58h+var_48]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_C3CD5
mov rsi, [rsp+58h+var_48]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_C3CD5
mov r14, rax
loc_C3CD5:
mov rdi, rbx; void *
call ___cxa_free_exception
loc_C3CDD:
mov rdi, r14
call __Unwind_Resume
| long long minja::Value::get<int>(_QWORD *a1)
{
void *exception; // rbx
_BYTE v3[16]; // [rsp+0h] [rbp-58h] BYREF
unsigned int v4[4]; // [rsp+20h] [rbp-38h] BYREF
if ( a1[2] || a1[4] || a1[6] )
{
exception = __cxa_allocate_exception(0x10uLL);
minja::Value::dump[abi:cxx11]((long long)v3, (long long)a1, 0xFFFFFFFF, 0);
std::operator+<char>(v4, (long long)"get<T> not defined for this value type: ", (long long)v3);
std::runtime_error::runtime_error(exception, v4);
__cxa_throw(
exception,
(struct type_info *)&`typeinfo for'std::runtime_error,
(void (*)(void *))&std::runtime_error::~runtime_error);
}
v4[0] = 0;
ZN8nlohmann16json_abi_v3_11_36detail9from_jsonINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEiTnNSt9enable_ifIXaaaaaaaasr3std13is_arithmeticIT0_EE5valuentsr3std7is_sameISH_NT_17number_unsigned_tEEE5valuentsr3std7is_sameISH_NSI_16number_integer_tEEE5valuentsr3std7is_sameISH_NSI_14number_float_tEEE5valuentsr3std7is_sameISH_NSI_9boolean_tEEE5valueEiE4typeELi0EEEvRKSI_RSH_(
a1 + 8,
v4);
return v4[0];
}
| get<int>:
PUSH RBP
PUSH R14
PUSH RBX
SUB RSP,0x40
MOV R14,RDI
CMP qword ptr [RDI + 0x10],0x0
JNZ 0x001c3c17
CMP qword ptr [R14 + 0x20],0x0
JNZ 0x001c3c17
CMP qword ptr [R14 + 0x30],0x0
JNZ 0x001c3c17
ADD R14,0x40
LEA RBX,[RSP + 0x20]
MOV dword ptr [RBX],0x0
MOV RDI,R14
MOV RSI,RBX
CALL 0x001c3ce5
MOV EAX,dword ptr [RBX]
ADD RSP,0x40
POP RBX
POP R14
POP RBP
RET
LAB_001c3c17:
MOV EDI,0x10
CALL 0x00121700
MOV RBX,RAX
LAB_001c3c24:
MOV RDI,RSP
MOV RSI,R14
MOV EDX,0xffffffff
XOR ECX,ECX
CALL 0x001b9574
LAB_001c3c36:
LEA RSI,[0x222c3a]
LEA RDI,[RSP + 0x20]
MOV RDX,RSP
CALL 0x001b2e14
MOV BPL,0x1
LAB_001c3c4d:
LEA RSI,[RSP + 0x20]
MOV RDI,RBX
CALL 0x001214f0
XOR EBP,EBP
MOV RSI,qword ptr [0x00265fb8]
MOV RDX,qword ptr [0x00265f78]
MOV RDI,RBX
CALL 0x00121b50
|
/* int minja::Value::get<int>() const */
int __thiscall minja::Value::get<int>(Value *this)
{
runtime_error *this_00;
int1 auStack_58 [32];
int local_38 [8];
if (((*(long *)(this + 0x10) == 0) && (*(long *)(this + 0x20) == 0)) &&
(*(long *)(this + 0x30) == 0)) {
local_38[0] = 0;
_ZN8nlohmann16json_abi_v3_11_36detail9from_jsonINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEiTnNSt9enable_ifIXaaaaaaaasr3std13is_arithmeticIT0_EE5valuentsr3std7is_sameISH_NT_17number_unsigned_tEEE5valuentsr3std7is_sameISH_NSI_16number_integer_tEEE5valuentsr3std7is_sameISH_NSI_14number_float_tEEE5valuentsr3std7is_sameISH_NSI_9boolean_tEEE5valueEiE4typeELi0EEEvRKSI_RSH_
(this + 0x40,local_38);
return local_38[0];
}
this_00 = (runtime_error *)__cxa_allocate_exception(0x10);
/* try { // try from 001c3c24 to 001c3c35 has its CatchHandler @ 001c3cd2 */
dump_abi_cxx11_((int)auStack_58,SUB81(this,0));
/* try { // try from 001c3c36 to 001c3c49 has its CatchHandler @ 001c3cb2 */
std::operator+((char *)local_38,(string *)"get<T> not defined for this value type: ");
/* try { // try from 001c3c4d to 001c3c71 has its CatchHandler @ 001c3c72 */
std::runtime_error::runtime_error(this_00,(string *)local_38);
/* WARNING: Subroutine does not return */
__cxa_throw(this_00,PTR_typeinfo_00265fb8,PTR__runtime_error_00265f78);
}
| |
47,857 | get_charset | eloqsql/mysys/charset.c | CHARSET_INFO *get_charset(uint cs_number, myf flags)
{
CHARSET_INFO *cs= NULL;
if (cs_number == default_charset_info->number)
return default_charset_info;
my_pthread_once(&charsets_initialized, init_available_charsets);
if (cs_number < array_elements(all_charsets))
{
MY_CHARSET_LOADER loader;
my_charset_loader_init_mysys(&loader);
cs= get_internal_charset(&loader, cs_number, flags);
}
if (!cs && (flags & MY_WME))
{
char index_file[FN_REFLEN + sizeof(MY_CHARSET_INDEX)], cs_string[23];
strmov(get_charsets_dir(index_file),MY_CHARSET_INDEX);
cs_string[0]='#';
int10_to_str(cs_number, cs_string+1, 10);
my_error(EE_UNKNOWN_CHARSET, MYF(ME_BELL), cs_string, index_file);
}
return cs;
} | O3 | c | get_charset:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x238, %rsp # imm = 0x238
movq %fs:0x28, %rax
movq %rax, -0x20(%rbp)
leaq 0x2f8cae(%rip), %rax # 0x390550
movq (%rax), %r15
cmpl %edi, (%r15)
je 0x979a9
movq %rsi, %r14
movl %edi, %ebx
leaq 0xb7c376(%rip), %rdi # 0xc13c30
leaq -0x382(%rip), %rsi # 0x9753f
callq 0x2a210
cmpl $0x7ff, %ebx # imm = 0x7FF
ja 0x9793e
leaq -0x230(%rbp), %rdi
movb $0x0, (%rdi)
leaq -0xb6d(%rip), %rax # 0x96d72
movq %rax, 0x80(%rdi)
leaq -0xb6c(%rip), %rax # 0x96d81
movq %rax, 0x88(%rdi)
leaq -0xb5f(%rip), %rax # 0x96d9c
movq %rax, 0x90(%rdi)
leaq 0xf8bd(%rip), %rax # 0xa71c6
movq %rax, 0x98(%rdi)
leaq 0x2f8c31(%rip), %rax # 0x390548
movq (%rax), %rax
movq %rax, 0xa0(%rdi)
leaq -0xb6e(%rip), %rax # 0x96dba
movq %rax, 0xa8(%rdi)
movl %ebx, %esi
movq %r14, %rdx
callq 0x979ce
movq %rax, %r15
jmp 0x97941
xorl %r15d, %r15d
testq %r15, %r15
setne %al
testb $0x10, %r14b
sete %cl
orb %al, %cl
jne 0x979a9
leaq -0x230(%rbp), %r14
movq %r14, %rdi
callq 0x972ff
movabsq $0x6d782e7865646e49, %rcx # imm = 0x6D782E7865646E49
movq %rcx, (%rax)
movw $0x6c, 0x8(%rax)
leaq -0x24f(%rbp), %rsi
movb $0x23, -0x1(%rsi)
movl %ebx, %edi
movl $0xa, %edx
callq 0xde292
xorl %r15d, %r15d
leaq -0x250(%rbp), %rdx
movl $0x4, %esi
movl $0x16, %edi
movq %r14, %rcx
xorl %eax, %eax
callq 0xa2fcb
movq %fs:0x28, %rax
cmpq -0x20(%rbp), %rax
jne 0x979c9
movq %r15, %rax
addq $0x238, %rsp # imm = 0x238
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
callq 0x2a240
| get_charset:
push rbp
mov rbp, rsp
push r15
push r14
push rbx
sub rsp, 238h
mov rax, fs:28h
mov [rbp+var_20], rax
lea rax, default_charset_info
mov r15, [rax]
cmp [r15], edi
jz loc_979A9
mov r14, rsi
mov ebx, edi
lea rdi, charsets_initialized
lea rsi, init_available_charsets
call _pthread_once
cmp ebx, 7FFh
ja short loc_9793E
lea rdi, [rbp+var_230]
mov byte ptr [rdi], 0
lea rax, my_once_alloc_c
mov [rdi+80h], rax
lea rax, my_malloc_c
mov [rdi+88h], rax
lea rax, my_realloc_c
mov [rdi+90h], rax
lea rax, my_free
mov [rdi+98h], rax
lea rax, my_charset_error_reporter
mov rax, [rax]
mov [rdi+0A0h], rax
lea rax, add_collation
mov [rdi+0A8h], rax
mov esi, ebx
mov rdx, r14
call get_internal_charset
mov r15, rax
jmp short loc_97941
loc_9793E:
xor r15d, r15d
loc_97941:
test r15, r15
setnz al
test r14b, 10h
setz cl
or cl, al
jnz short loc_979A9
lea r14, [rbp+var_230]
mov rdi, r14
call get_charsets_dir
mov rcx, 6D782E7865646E49h
mov [rax], rcx
mov word ptr [rax+8], 6Ch ; 'l'
lea rsi, [rbp+var_24F]
mov byte ptr [rsi-1], 23h ; '#'
mov edi, ebx
mov edx, 0Ah
call int10_to_str
xor r15d, r15d
lea rdx, [rbp+var_250]
mov esi, 4
mov edi, 16h
mov rcx, r14
xor eax, eax
call my_error
loc_979A9:
mov rax, fs:28h
cmp rax, [rbp+var_20]
jnz short loc_979C9
mov rax, r15
add rsp, 238h
pop rbx
pop r14
pop r15
pop rbp
retn
loc_979C9:
call ___stack_chk_fail
| void * get_charset(unsigned int a1, long long a2)
{
void *internal_charset; // r15
int v3; // r8d
int v4; // r9d
char v6; // [rsp+0h] [rbp-250h] BYREF
_BYTE v7[31]; // [rsp+1h] [rbp-24Fh] BYREF
_BYTE v8[128]; // [rsp+20h] [rbp-230h] BYREF
long long ( *v9)(long long); // [rsp+A0h] [rbp-1B0h]
long long ( *v10)(long long); // [rsp+A8h] [rbp-1A8h]
long long ( *v11)(long long, long long); // [rsp+B0h] [rbp-1A0h]
long long ( *v12)(_QWORD); // [rsp+B8h] [rbp-198h]
long long ( *v13)(); // [rsp+C0h] [rbp-190h]
long long ( *v14)(unsigned int *); // [rsp+C8h] [rbp-188h]
unsigned long long v15; // [rsp+230h] [rbp-20h]
v15 = __readfsqword(0x28u);
internal_charset = default_charset_info;
if ( *(_DWORD *)default_charset_info != a1 )
{
pthread_once(&charsets_initialized, init_available_charsets);
if ( a1 > 0x7FF )
{
internal_charset = 0LL;
}
else
{
v8[0] = 0;
v9 = my_once_alloc_c;
v10 = my_malloc_c;
v11 = my_realloc_c;
v12 = my_free;
v13 = my_charset_error_reporter;
v14 = add_collation;
internal_charset = (void *)get_internal_charset(v8, a1, a2);
}
if ( internal_charset == 0LL && (a2 & 0x10) != 0 )
{
strcpy((char *)get_charsets_dir((long long)v8), "Index.xml");
v6 = 35;
int10_to_str(a1, v7, 10LL);
internal_charset = 0LL;
my_error(22, 4, (unsigned int)&v6, (unsigned int)v8, v3, v4);
}
}
return internal_charset;
}
| get_charset:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH RBX
SUB RSP,0x238
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x20],RAX
LEA RAX,[0x490550]
MOV R15,qword ptr [RAX]
CMP dword ptr [R15],EDI
JZ 0x001979a9
MOV R14,RSI
MOV EBX,EDI
LEA RDI,[0xd13c30]
LEA RSI,[0x19753f]
CALL 0x0012a210
CMP EBX,0x7ff
JA 0x0019793e
LEA RDI,[RBP + -0x230]
MOV byte ptr [RDI],0x0
LEA RAX,[0x196d72]
MOV qword ptr [RDI + 0x80],RAX
LEA RAX,[0x196d81]
MOV qword ptr [RDI + 0x88],RAX
LEA RAX,[0x196d9c]
MOV qword ptr [RDI + 0x90],RAX
LEA RAX,[0x1a71c6]
MOV qword ptr [RDI + 0x98],RAX
LEA RAX,[0x490548]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RDI + 0xa0],RAX
LEA RAX,[0x196dba]
MOV qword ptr [RDI + 0xa8],RAX
MOV ESI,EBX
MOV RDX,R14
CALL 0x001979ce
MOV R15,RAX
JMP 0x00197941
LAB_0019793e:
XOR R15D,R15D
LAB_00197941:
TEST R15,R15
SETNZ AL
TEST R14B,0x10
SETZ CL
OR CL,AL
JNZ 0x001979a9
LEA R14,[RBP + -0x230]
MOV RDI,R14
CALL 0x001972ff
MOV RCX,0x6d782e7865646e49
MOV qword ptr [RAX],RCX
MOV word ptr [RAX + 0x8],0x6c
LEA RSI,[RBP + -0x24f]
MOV byte ptr [RSI + -0x1],0x23
MOV EDI,EBX
MOV EDX,0xa
CALL 0x001de292
XOR R15D,R15D
LEA RDX,[RBP + -0x250]
MOV ESI,0x4
MOV EDI,0x16
MOV RCX,R14
XOR EAX,EAX
CALL 0x001a2fcb
LAB_001979a9:
MOV RAX,qword ptr FS:[0x28]
CMP RAX,qword ptr [RBP + -0x20]
JNZ 0x001979c9
MOV RAX,R15
ADD RSP,0x238
POP RBX
POP R14
POP R15
POP RBP
RET
LAB_001979c9:
CALL 0x0012a240
|
int * get_charset(uint param_1,ulong param_2)
{
int *puVar1;
int8 *puVar2;
long in_FS_OFFSET;
int1 local_258;
int1 local_257 [31];
int1 local_238 [128];
code *local_1b8;
code *local_1b0;
code *local_1a8;
code *local_1a0;
int *local_198;
code *local_190;
long local_28;
local_28 = *(long *)(in_FS_OFFSET + 0x28);
puVar1 = default_charset_info;
if (*(uint *)default_charset_info != param_1) {
pthread_once(&charsets_initialized,init_available_charsets);
if (param_1 < 0x800) {
local_238[0] = 0;
local_1b8 = my_once_alloc_c;
local_1b0 = my_malloc_c;
local_1a8 = my_realloc_c;
local_1a0 = my_free;
local_198 = my_charset_error_reporter;
local_190 = add_collation;
puVar1 = (int *)get_internal_charset(local_238,param_1,param_2);
}
else {
puVar1 = (int *)0x0;
}
if ((param_2 & 0x10) != 0 && puVar1 == (int *)0x0) {
puVar2 = (int8 *)get_charsets_dir(local_238);
*puVar2 = 0x6d782e7865646e49;
*(int2 *)(puVar2 + 1) = 0x6c;
local_258 = 0x23;
int10_to_str(param_1,local_257,10);
puVar1 = (int *)0x0;
my_error(0x16,4,&local_258,local_238);
}
}
if (*(long *)(in_FS_OFFSET + 0x28) == local_28) {
return puVar1;
}
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
| |
47,858 | minja::SetTemplateNode::SetTemplateNode(minja::Location const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::shared_ptr<minja::TemplateNode>&&) | monkey531[P]llama/common/minja.hpp | SetTemplateNode(const Location & location, const std::string & name, std::shared_ptr<TemplateNode> && tv)
: TemplateNode(location), name(name), template_value(std::move(tv)) {} | O3 | cpp | minja::SetTemplateNode::SetTemplateNode(minja::Location const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::shared_ptr<minja::TemplateNode>&&):
pushq %r15
pushq %r14
pushq %rbx
movq %rcx, %r14
movq %rdi, %rbx
leaq 0x69800(%rip), %r15 # 0xeb148
addq $0x10, %r15
movq %r15, (%rdi)
movq (%rsi), %rax
movq %rax, 0x8(%rdi)
movq 0x8(%rsi), %rax
movq %rax, 0x10(%rdi)
testq %rax, %rax
je 0x81978
movq 0x6a626(%rip), %rcx # 0xebf90
cmpb $0x0, (%rcx)
je 0x81974
incl 0x8(%rax)
jmp 0x81978
lock
incl 0x8(%rax)
movq 0x10(%rsi), %rax
movq %rax, 0x18(%rbx)
leaq 0x69bc1(%rip), %rax # 0xeb548
addq $0x10, %rax
movq %rax, (%rbx)
leaq 0x20(%rbx), %rdi
leaq 0x30(%rbx), %rax
movq %rax, 0x20(%rbx)
movq (%rdx), %rsi
movq 0x8(%rdx), %rdx
addq %rsi, %rdx
callq 0x27d52
xorl %eax, %eax
movq %rax, 0x48(%rbx)
movups (%r14), %xmm0
movq %rax, 0x8(%r14)
movups %xmm0, 0x40(%rbx)
movq %rax, (%r14)
popq %rbx
popq %r14
popq %r15
retq
movq %rax, %r14
movq %r15, (%rbx)
movq 0x10(%rbx), %rdi
testq %rdi, %rdi
je 0x819d8
callq 0x4200c
movq %r14, %rdi
callq 0x19be0
| _ZN5minja15SetTemplateNodeC2ERKNS_8LocationERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEOSt10shared_ptrINS_12TemplateNodeEE:
push r15
push r14
push rbx
mov r14, rcx
mov rbx, rdi
lea r15, _ZTVN5minja12TemplateNodeE; `vtable for'minja::TemplateNode
add r15, 10h
mov [rdi], r15
mov rax, [rsi]
mov [rdi+8], rax
mov rax, [rsi+8]
mov [rdi+10h], rax
test rax, rax
jz short loc_81978
mov rcx, cs:__libc_single_threaded_ptr
cmp byte ptr [rcx], 0
jz short loc_81974
inc dword ptr [rax+8]
jmp short loc_81978
loc_81974:
lock inc dword ptr [rax+8]
loc_81978:
mov rax, [rsi+10h]
mov [rbx+18h], rax
lea rax, _ZTVN5minja15SetTemplateNodeE; `vtable for'minja::SetTemplateNode
add rax, 10h
mov [rbx], rax
lea rdi, [rbx+20h]
lea rax, [rbx+30h]
mov [rbx+20h], rax
mov rsi, [rdx]
mov rdx, [rdx+8]
add rdx, rsi
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPcEEvT_S7_St20forward_iterator_tag; std::string::_M_construct<char *>(char *,char *,std::forward_iterator_tag)
xor eax, eax
mov [rbx+48h], rax
movups xmm0, xmmword ptr [r14]
mov [r14+8], rax
movups xmmword ptr [rbx+40h], xmm0
mov [r14], rax
pop rbx
pop r14
pop r15
retn
mov r14, rax
mov [rbx], r15
mov rdi, [rbx+10h]
test rdi, rdi
jz short loc_819D8
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_819D8:
mov rdi, r14
call __Unwind_Resume
| long long minja::SetTemplateNode::SetTemplateNode(long long a1, _QWORD *a2, long long a3, __int128 *a4)
{
long long v5; // rax
long long result; // rax
__int128 v7; // xmm0
*(_QWORD *)a1 = &`vtable for'minja::TemplateNode + 2;
*(_QWORD *)(a1 + 8) = *a2;
v5 = a2[1];
*(_QWORD *)(a1 + 16) = v5;
if ( v5 )
{
if ( _libc_single_threaded )
++*(_DWORD *)(v5 + 8);
else
_InterlockedIncrement((volatile signed __int32 *)(v5 + 8));
}
*(_QWORD *)(a1 + 24) = a2[2];
*(_QWORD *)a1 = &`vtable for'minja::SetTemplateNode + 2;
*(_QWORD *)(a1 + 32) = a1 + 48;
std::string::_M_construct<char *>(a1 + 32, *(_BYTE **)a3, *(_QWORD *)a3 + *(_QWORD *)(a3 + 8));
result = 0LL;
*(_QWORD *)(a1 + 72) = 0LL;
v7 = *a4;
*((_QWORD *)a4 + 1) = 0LL;
*(_OWORD *)(a1 + 64) = v7;
*(_QWORD *)a4 = 0LL;
return result;
}
| SetTemplateNode:
PUSH R15
PUSH R14
PUSH RBX
MOV R14,RCX
MOV RBX,RDI
LEA R15,[0x1eb148]
ADD R15,0x10
MOV qword ptr [RDI],R15
MOV RAX,qword ptr [RSI]
MOV qword ptr [RDI + 0x8],RAX
MOV RAX,qword ptr [RSI + 0x8]
MOV qword ptr [RDI + 0x10],RAX
TEST RAX,RAX
JZ 0x00181978
MOV RCX,qword ptr [0x001ebf90]
CMP byte ptr [RCX],0x0
JZ 0x00181974
INC dword ptr [RAX + 0x8]
JMP 0x00181978
LAB_00181974:
INC.LOCK dword ptr [RAX + 0x8]
LAB_00181978:
MOV RAX,qword ptr [RSI + 0x10]
MOV qword ptr [RBX + 0x18],RAX
LEA RAX,[0x1eb548]
ADD RAX,0x10
MOV qword ptr [RBX],RAX
LEA RDI,[RBX + 0x20]
LEA RAX,[RBX + 0x30]
MOV qword ptr [RBX + 0x20],RAX
MOV RSI,qword ptr [RDX]
MOV RDX,qword ptr [RDX + 0x8]
ADD RDX,RSI
LAB_001819a4:
CALL 0x00127d52
LAB_001819a9:
XOR EAX,EAX
MOV qword ptr [RBX + 0x48],RAX
MOVUPS XMM0,xmmword ptr [R14]
MOV qword ptr [R14 + 0x8],RAX
MOVUPS xmmword ptr [RBX + 0x40],XMM0
MOV qword ptr [R14],RAX
POP RBX
POP R14
POP R15
RET
|
/* minja::SetTemplateNode::SetTemplateNode(minja::Location const&, std::__cxx11::string const&,
std::shared_ptr<minja::TemplateNode>&&) */
void __thiscall
minja::SetTemplateNode::SetTemplateNode
(SetTemplateNode *this,Location *param_1,string *param_2,shared_ptr *param_3)
{
long lVar1;
int8 uVar2;
*(int ***)this = &PTR___cxa_pure_virtual_001eb158;
*(int8 *)(this + 8) = *(int8 *)param_1;
lVar1 = *(long *)(param_1 + 8);
*(long *)(this + 0x10) = lVar1;
if (lVar1 != 0) {
if (*PTR___libc_single_threaded_001ebf90 == '\0') {
LOCK();
*(int *)(lVar1 + 8) = *(int *)(lVar1 + 8) + 1;
UNLOCK();
}
else {
*(int *)(lVar1 + 8) = *(int *)(lVar1 + 8) + 1;
}
}
*(int8 *)(this + 0x18) = *(int8 *)(param_1 + 0x10);
*(int ***)this = &PTR_do_render_001eb558;
*(SetTemplateNode **)(this + 0x20) = this + 0x30;
/* try { // try from 001819a4 to 001819a8 has its CatchHandler @ 001819c4 */
std::__cxx11::string::_M_construct<char*>
(this + 0x20,*(long *)param_2,*(long *)(param_2 + 8) + *(long *)param_2);
*(int8 *)(this + 0x48) = 0;
uVar2 = *(int8 *)(param_3 + 8);
*(int8 *)(param_3 + 8) = 0;
*(int8 *)(this + 0x40) = *(int8 *)param_3;
*(int8 *)(this + 0x48) = uVar2;
*(int8 *)param_3 = 0;
return;
}
| |
47,859 | ma_remove_not_visible_states | eloqsql/storage/maria/ma_state.c | MARIA_STATE_HISTORY
*_ma_remove_not_visible_states(MARIA_STATE_HISTORY *org_history,
my_bool all,
my_bool trnman_is_locked)
{
TrID last_trid;
MARIA_STATE_HISTORY *history, **parent, *next;
DBUG_ENTER("_ma_remove_not_visible_states");
if (!org_history)
DBUG_RETURN(0); /* Not versioned table */
last_trid= org_history->trid;
parent= &org_history->next;
for (history= org_history->next; history; history= next)
{
next= history->next;
if (!trnman_exists_active_transactions(history->trid, last_trid,
trnman_is_locked))
{
DBUG_PRINT("info", ("removing history->trid: %lu next: %lu",
(ulong) history->trid, (ulong) last_trid));
my_free(history);
continue;
}
*parent= history;
parent= &history->next;
last_trid= history->trid;
}
*parent= 0;
if (all && parent == &org_history->next)
{
/* There is only one state left. Delete this if it's visible for all */
if (last_trid < trnman_get_min_trid())
{
my_free(org_history);
org_history= 0;
}
}
DBUG_RETURN(org_history);
} | O0 | c | ma_remove_not_visible_states:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movb %dl, %al
movb %sil, %cl
movq %rdi, -0x10(%rbp)
movb %cl, -0x11(%rbp)
movb %al, -0x12(%rbp)
cmpq $0x0, -0x10(%rbp)
jne 0x4963d
jmp 0x49630
movq $0x0, -0x8(%rbp)
jmp 0x49716
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x20(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x30(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x28(%rbp)
cmpq $0x0, -0x28(%rbp)
je 0x496bf
movq -0x28(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x38(%rbp)
movq -0x28(%rbp), %rax
movq 0x8(%rax), %rdi
movq -0x20(%rbp), %rsi
movsbl -0x12(%rbp), %edx
callq 0x79e30
cmpb $0x0, %al
jne 0x49696
jmp 0x49689
jmp 0x4968b
movq -0x28(%rbp), %rdi
callq 0xf3ba0
jmp 0x496b5
movq -0x28(%rbp), %rcx
movq -0x30(%rbp), %rax
movq %rcx, (%rax)
movq -0x28(%rbp), %rax
movq %rax, -0x30(%rbp)
movq -0x28(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x20(%rbp)
movq -0x38(%rbp), %rax
movq %rax, -0x28(%rbp)
jmp 0x4965c
movq -0x30(%rbp), %rax
movq $0x0, (%rax)
movsbl -0x11(%rbp), %eax
cmpl $0x0, %eax
je 0x4970c
movq -0x30(%rbp), %rax
movq -0x10(%rbp), %rcx
cmpq %rcx, %rax
jne 0x4970c
movq -0x20(%rbp), %rax
movq %rax, -0x40(%rbp)
callq 0x79d40
movq %rax, %rcx
movq -0x40(%rbp), %rax
cmpq %rcx, %rax
jae 0x4970a
movq -0x10(%rbp), %rdi
callq 0xf3ba0
movq $0x0, -0x10(%rbp)
jmp 0x4970c
jmp 0x4970e
movq -0x10(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x40, %rsp
popq %rbp
retq
| _ma_remove_not_visible_states:
push rbp
mov rbp, rsp
sub rsp, 40h
mov al, dl
mov cl, sil
mov [rbp+var_10], rdi
mov [rbp+var_11], cl
mov [rbp+var_12], al
cmp [rbp+var_10], 0
jnz short loc_4963D
jmp short $+2
loc_49630:
mov [rbp+var_8], 0
jmp loc_49716
loc_4963D:
mov rax, [rbp+var_10]
mov rax, [rax+8]
mov [rbp+var_20], rax
mov rax, [rbp+var_10]
mov [rbp+var_30], rax
mov rax, [rbp+var_10]
mov rax, [rax]
mov [rbp+var_28], rax
loc_4965C:
cmp [rbp+var_28], 0
jz short loc_496BF
mov rax, [rbp+var_28]
mov rax, [rax]
mov [rbp+var_38], rax
mov rax, [rbp+var_28]
mov rdi, [rax+8]
mov rsi, [rbp+var_20]
movsx edx, [rbp+var_12]
call trnman_exists_active_transactions
cmp al, 0
jnz short loc_49696
jmp short $+2
loc_49689:
jmp short $+2
loc_4968B:
mov rdi, [rbp+var_28]
call my_free
jmp short loc_496B5
loc_49696:
mov rcx, [rbp+var_28]
mov rax, [rbp+var_30]
mov [rax], rcx
mov rax, [rbp+var_28]
mov [rbp+var_30], rax
mov rax, [rbp+var_28]
mov rax, [rax+8]
mov [rbp+var_20], rax
loc_496B5:
mov rax, [rbp+var_38]
mov [rbp+var_28], rax
jmp short loc_4965C
loc_496BF:
mov rax, [rbp+var_30]
mov qword ptr [rax], 0
movsx eax, [rbp+var_11]
cmp eax, 0
jz short loc_4970C
mov rax, [rbp+var_30]
mov rcx, [rbp+var_10]
cmp rax, rcx
jnz short loc_4970C
mov rax, [rbp+var_20]
mov [rbp+var_40], rax
call trnman_get_min_trid
mov rcx, rax
mov rax, [rbp+var_40]
cmp rax, rcx
jnb short loc_4970A
mov rdi, [rbp+var_10]
call my_free
mov [rbp+var_10], 0
loc_4970A:
jmp short $+2
loc_4970C:
jmp short $+2
loc_4970E:
mov rax, [rbp+var_10]
mov [rbp+var_8], rax
loc_49716:
mov rax, [rbp+var_8]
add rsp, 40h
pop rbp
retn
| _QWORD * ma_remove_not_visible_states(_QWORD *a1, char a2, char a3)
{
_QWORD *v4; // [rsp+8h] [rbp-38h]
_QWORD *v5; // [rsp+10h] [rbp-30h]
_QWORD *i; // [rsp+18h] [rbp-28h]
unsigned long long v7; // [rsp+20h] [rbp-20h]
_QWORD *v9; // [rsp+30h] [rbp-10h]
v9 = a1;
if ( !a1 )
return 0LL;
v7 = a1[1];
v5 = a1;
for ( i = (_QWORD *)*a1; i; i = v4 )
{
v4 = (_QWORD *)*i;
if ( (unsigned __int8)trnman_exists_active_transactions(i[1], v7, (unsigned int)a3) )
{
*v5 = i;
v5 = i;
v7 = i[1];
}
else
{
my_free(i);
}
}
*v5 = 0LL;
if ( a2 && v5 == a1 && v7 < trnman_get_min_trid() )
{
my_free(a1);
return 0LL;
}
return v9;
}
| _ma_remove_not_visible_states:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x40
MOV AL,DL
MOV CL,SIL
MOV qword ptr [RBP + -0x10],RDI
MOV byte ptr [RBP + -0x11],CL
MOV byte ptr [RBP + -0x12],AL
CMP qword ptr [RBP + -0x10],0x0
JNZ 0x0014963d
JMP 0x00149630
LAB_00149630:
MOV qword ptr [RBP + -0x8],0x0
JMP 0x00149716
LAB_0014963d:
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x8]
MOV qword ptr [RBP + -0x20],RAX
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RBP + -0x30],RAX
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x28],RAX
LAB_0014965c:
CMP qword ptr [RBP + -0x28],0x0
JZ 0x001496bf
MOV RAX,qword ptr [RBP + -0x28]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x38],RAX
MOV RAX,qword ptr [RBP + -0x28]
MOV RDI,qword ptr [RAX + 0x8]
MOV RSI,qword ptr [RBP + -0x20]
MOVSX EDX,byte ptr [RBP + -0x12]
CALL 0x00179e30
CMP AL,0x0
JNZ 0x00149696
JMP 0x00149689
LAB_00149689:
JMP 0x0014968b
LAB_0014968b:
MOV RDI,qword ptr [RBP + -0x28]
CALL 0x001f3ba0
JMP 0x001496b5
LAB_00149696:
MOV RCX,qword ptr [RBP + -0x28]
MOV RAX,qword ptr [RBP + -0x30]
MOV qword ptr [RAX],RCX
MOV RAX,qword ptr [RBP + -0x28]
MOV qword ptr [RBP + -0x30],RAX
MOV RAX,qword ptr [RBP + -0x28]
MOV RAX,qword ptr [RAX + 0x8]
MOV qword ptr [RBP + -0x20],RAX
LAB_001496b5:
MOV RAX,qword ptr [RBP + -0x38]
MOV qword ptr [RBP + -0x28],RAX
JMP 0x0014965c
LAB_001496bf:
MOV RAX,qword ptr [RBP + -0x30]
MOV qword ptr [RAX],0x0
MOVSX EAX,byte ptr [RBP + -0x11]
CMP EAX,0x0
JZ 0x0014970c
MOV RAX,qword ptr [RBP + -0x30]
MOV RCX,qword ptr [RBP + -0x10]
CMP RAX,RCX
JNZ 0x0014970c
MOV RAX,qword ptr [RBP + -0x20]
MOV qword ptr [RBP + -0x40],RAX
CALL 0x00179d40
MOV RCX,RAX
MOV RAX,qword ptr [RBP + -0x40]
CMP RAX,RCX
JNC 0x0014970a
MOV RDI,qword ptr [RBP + -0x10]
CALL 0x001f3ba0
MOV qword ptr [RBP + -0x10],0x0
LAB_0014970a:
JMP 0x0014970c
LAB_0014970c:
JMP 0x0014970e
LAB_0014970e:
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RBP + -0x8],RAX
LAB_00149716:
MOV RAX,qword ptr [RBP + -0x8]
ADD RSP,0x40
POP RBP
RET
|
int8 * _ma_remove_not_visible_states(int8 *param_1,char param_2,char param_3)
{
int8 *puVar1;
char cVar2;
ulong uVar3;
int8 *local_38;
int8 *local_30;
ulong local_28;
int8 *local_18;
int8 *local_10;
if (param_1 == (int8 *)0x0) {
local_10 = (int8 *)0x0;
}
else {
local_28 = param_1[1];
local_38 = param_1;
local_30 = (int8 *)*param_1;
while (local_30 != (int8 *)0x0) {
puVar1 = (int8 *)*local_30;
cVar2 = trnman_exists_active_transactions(local_30[1],local_28,(int)param_3);
if (cVar2 == '\0') {
my_free(local_30);
local_30 = puVar1;
}
else {
*local_38 = local_30;
local_38 = local_30;
local_28 = local_30[1];
local_30 = puVar1;
}
}
*local_38 = 0;
local_18 = param_1;
if (((param_2 != '\0') && (local_38 == param_1)) &&
(uVar3 = trnman_get_min_trid(), local_28 < uVar3)) {
my_free(param_1);
local_18 = (int8 *)0x0;
}
local_10 = local_18;
}
return local_10;
}
| |
47,860 | minja::IfNode::do_render(std::__cxx11::basic_ostringstream<char, std::char_traits<char>, std::allocator<char>>&, std::shared_ptr<minja::Context> const&) const | monkey531[P]llama/common/minja.hpp | void do_render(std::ostringstream & out, const std::shared_ptr<Context> & context) const override {
for (const auto& branch : cascade) {
auto enter_branch = true;
if (branch.first) {
enter_branch = branch.first->evaluate(context).to_bool();
}
if (enter_branch) {
if (!branch.second) throw std::runtime_error("IfNode.cascade.second is null");
branch.second->render(out, context);
return;
}
}
} | O3 | cpp | minja::IfNode::do_render(std::__cxx11::basic_ostringstream<char, std::char_traits<char>, std::allocator<char>>&, std::shared_ptr<minja::Context> const&) const:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x58, %rsp
movq %rsi, (%rsp)
movq 0x20(%rdi), %r13
movq 0x28(%rdi), %r14
cmpq %r14, %r13
je 0x9a7ba
movq %rdx, %rbx
leaq 0x48(%rsp), %r15
leaq 0x8(%rsp), %r12
movq (%r13), %rsi
testq %rsi, %rsi
je 0x9a7a5
movq %r12, %rdi
movq %rbx, %rdx
callq 0x8670e
movq %r12, %rdi
callq 0x8690c
movl %eax, %ebp
movq %r15, %rdi
xorl %esi, %esi
callq 0x59184
movq %r15, %rdi
callq 0x5e672
movq 0x40(%rsp), %rdi
testq %rdi, %rdi
je 0x9a73d
callq 0x6e096
movq 0x30(%rsp), %rdi
testq %rdi, %rdi
je 0x9a74c
callq 0x6e096
movq 0x20(%rsp), %rdi
testq %rdi, %rdi
je 0x9a75b
callq 0x6e096
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0x9a791
movq 0x9181c(%rip), %rax # 0x12bf88
cmpb $0x0, (%rax)
je 0x9a77c
movl 0xc(%rdi), %eax
leal -0x1(%rax), %ecx
movl %ecx, 0xc(%rdi)
jmp 0x9a786
movl $0xffffffff, %eax # imm = 0xFFFFFFFF
lock
xaddl %eax, 0xc(%rdi)
cmpl $0x1, %eax
jne 0x9a791
movq (%rdi), %rax
callq *0x18(%rax)
testb %bpl, %bpl
jne 0x9a7a5
addq $0x20, %r13
cmpq %r14, %r13
jne 0x9a6fa
jmp 0x9a7ba
movq 0x10(%r13), %rdi
testq %rdi, %rdi
je 0x9a7c9
movq (%rsp), %rsi
movq %rbx, %rdx
callq 0x9a89e
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl $0x10, %edi
callq 0x1a430
movq %rax, %rbx
leaq 0x561d7(%rip), %rsi # 0xf09b4
movq %rax, %rdi
callq 0x1a310
movq 0x91804(%rip), %rsi # 0x12bff0
movq 0x9176d(%rip), %rdx # 0x12bf60
movq %rbx, %rdi
callq 0x1af20
movq %rax, %r14
movq %rbx, %rdi
callq 0x1a670
jmp 0x9a815
movq %rax, %r14
leaq 0x8(%rsp), %rdi
callq 0x86a00
movq %r14, %rdi
callq 0x1afb0
nop
| _ZNK5minja6IfNode9do_renderERNSt7__cxx1119basic_ostringstreamIcSt11char_traitsIcESaIcEEERKSt10shared_ptrINS_7ContextEE:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 58h
mov [rsp+88h+var_88], rsi
mov r13, [rdi+20h]
mov r14, [rdi+28h]
cmp r13, r14
jz loc_9A7BA
mov rbx, rdx
lea r15, [rsp+88h+var_40]
lea r12, [rsp+88h+var_80]
loc_9A6FA:
mov rsi, [r13+0]
test rsi, rsi
jz loc_9A7A5
mov rdi, r12
mov rdx, rbx
call _ZNK5minja10Expression8evaluateERKSt10shared_ptrINS_7ContextEE; minja::Expression::evaluate(std::shared_ptr<minja::Context> const&)
mov rdi, r12; this
call _ZNK5minja5Value7to_boolEv; minja::Value::to_bool(void)
mov ebp, eax
mov rdi, r15
xor esi, esi
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool)
mov rdi, r15
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::data::~data()
mov rdi, [rsp+88h+var_48]
test rdi, rdi
jz short loc_9A73D
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_9A73D:
mov rdi, [rsp+88h+var_58]
test rdi, rdi
jz short loc_9A74C
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_9A74C:
mov rdi, [rsp+88h+var_68]
test rdi, rdi
jz short loc_9A75B
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_9A75B:
mov rdi, [rsp+88h+var_78]
test rdi, rdi
jz short loc_9A791
mov rax, cs:__libc_single_threaded_ptr
cmp byte ptr [rax], 0
jz short loc_9A77C
mov eax, [rdi+0Ch]
lea ecx, [rax-1]
mov [rdi+0Ch], ecx
jmp short loc_9A786
loc_9A77C:
mov eax, 0FFFFFFFFh
lock xadd [rdi+0Ch], eax
loc_9A786:
cmp eax, 1
jnz short loc_9A791
mov rax, [rdi]
call qword ptr [rax+18h]
loc_9A791:
test bpl, bpl
jnz short loc_9A7A5
add r13, 20h ; ' '
cmp r13, r14
jnz loc_9A6FA
jmp short loc_9A7BA
loc_9A7A5:
mov rdi, [r13+10h]
test rdi, rdi
jz short loc_9A7C9
mov rsi, [rsp+88h+var_88]
mov rdx, rbx
call _ZNK5minja12TemplateNode6renderERNSt7__cxx1119basic_ostringstreamIcSt11char_traitsIcESaIcEEERKSt10shared_ptrINS_7ContextEE; minja::TemplateNode::render(std::ostringstream &,std::shared_ptr<minja::Context> const&)
loc_9A7BA:
add rsp, 58h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_9A7C9:
mov edi, 10h; thrown_size
call ___cxa_allocate_exception
mov rbx, rax
lea rsi, aIfnodeCascadeS; "IfNode.cascade.second is null"
mov rdi, rax; this
call __ZNSt13runtime_errorC1EPKc; std::runtime_error::runtime_error(char const*)
mov rsi, cs:_ZTISt13runtime_error_ptr; lptinfo
mov rdx, cs:_ZTISt19_Sp_make_shared_tag; void (*)(void *)
mov rdi, rbx; void *
call ___cxa_throw
mov r14, rax
mov rdi, rbx; void *
call ___cxa_free_exception
jmp short loc_9A815
mov r14, rax
lea rdi, [rsp+88h+var_80]; this
call _ZN5minja5ValueD2Ev; minja::Value::~Value()
loc_9A815:
mov rdi, r14
call __Unwind_Resume
| do_render:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x58
MOV qword ptr [RSP],RSI
MOV R13,qword ptr [RDI + 0x20]
MOV R14,qword ptr [RDI + 0x28]
CMP R13,R14
JZ 0x0019a7ba
MOV RBX,RDX
LEA R15,[RSP + 0x48]
LEA R12,[RSP + 0x8]
LAB_0019a6fa:
MOV RSI,qword ptr [R13]
TEST RSI,RSI
JZ 0x0019a7a5
MOV RDI,R12
MOV RDX,RBX
CALL 0x0018670e
LAB_0019a712:
MOV RDI,R12
CALL 0x0018690c
LAB_0019a71a:
MOV EBP,EAX
MOV RDI,R15
XOR ESI,ESI
CALL 0x00159184
MOV RDI,R15
CALL 0x0015e672
MOV RDI,qword ptr [RSP + 0x40]
TEST RDI,RDI
JZ 0x0019a73d
CALL 0x0016e096
LAB_0019a73d:
MOV RDI,qword ptr [RSP + 0x30]
TEST RDI,RDI
JZ 0x0019a74c
CALL 0x0016e096
LAB_0019a74c:
MOV RDI,qword ptr [RSP + 0x20]
TEST RDI,RDI
JZ 0x0019a75b
CALL 0x0016e096
LAB_0019a75b:
MOV RDI,qword ptr [RSP + 0x10]
TEST RDI,RDI
JZ 0x0019a791
MOV RAX,qword ptr [0x0022bf88]
CMP byte ptr [RAX],0x0
JZ 0x0019a77c
MOV EAX,dword ptr [RDI + 0xc]
LEA ECX,[RAX + -0x1]
MOV dword ptr [RDI + 0xc],ECX
JMP 0x0019a786
LAB_0019a77c:
MOV EAX,0xffffffff
XADD.LOCK dword ptr [RDI + 0xc],EAX
LAB_0019a786:
CMP EAX,0x1
JNZ 0x0019a791
MOV RAX,qword ptr [RDI]
CALL qword ptr [RAX + 0x18]
LAB_0019a791:
TEST BPL,BPL
JNZ 0x0019a7a5
ADD R13,0x20
CMP R13,R14
JNZ 0x0019a6fa
JMP 0x0019a7ba
LAB_0019a7a5:
MOV RDI,qword ptr [R13 + 0x10]
TEST RDI,RDI
JZ 0x0019a7c9
MOV RSI,qword ptr [RSP]
MOV RDX,RBX
CALL 0x0019a89e
LAB_0019a7ba:
ADD RSP,0x58
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_0019a7c9:
MOV EDI,0x10
CALL 0x0011a430
MOV RBX,RAX
LAB_0019a7d6:
LEA RSI,[0x1f09b4]
MOV RDI,RAX
CALL 0x0011a310
LAB_0019a7e5:
MOV RSI,qword ptr [0x0022bff0]
MOV RDX,qword ptr [0x0022bf60]
MOV RDI,RBX
CALL 0x0011af20
|
/* minja::IfNode::do_render(std::__cxx11::ostringstream&, std::shared_ptr<minja::Context> const&)
const */
void minja::IfNode::do_render(ostringstream *param_1,shared_ptr *param_2)
{
int *piVar1;
int8 *puVar2;
char cVar3;
int iVar4;
runtime_error *this;
int8 *puVar5;
Expression local_80 [8];
long *local_78;
_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *local_68;
_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *local_58;
_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *local_48;
data local_40 [16];
puVar5 = *(int8 **)(param_1 + 0x20);
puVar2 = *(int8 **)(param_1 + 0x28);
if (puVar5 != puVar2) {
do {
if ((shared_ptr *)*puVar5 == (shared_ptr *)0x0) {
LAB_0019a7a5:
if ((ostringstream *)puVar5[2] != (ostringstream *)0x0) {
TemplateNode::render((ostringstream *)puVar5[2],param_2);
return;
}
this = (runtime_error *)__cxa_allocate_exception(0x10);
/* try { // try from 0019a7d6 to 0019a7e4 has its CatchHandler @ 0019a7fb */
std::runtime_error::runtime_error(this,"IfNode.cascade.second is null");
/* WARNING: Subroutine does not return */
__cxa_throw(this,PTR_typeinfo_0022bff0,PTR__runtime_error_0022bf60);
}
Expression::evaluate(local_80,(shared_ptr *)*puVar5);
/* try { // try from 0019a712 to 0019a719 has its CatchHandler @ 0019a808 */
cVar3 = Value::to_bool((Value *)local_80);
nlohmann::json_abi_v3_11_3::
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::assert_invariant(SUB81(local_40,0));
nlohmann::json_abi_v3_11_3::
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::data::~data(local_40);
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 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) {
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(local_68);
}
if (local_78 != (long *)0x0) {
if (*PTR___libc_single_threaded_0022bf88 == '\0') {
LOCK();
piVar1 = (int *)((long)local_78 + 0xc);
iVar4 = *piVar1;
*piVar1 = *piVar1 + -1;
UNLOCK();
}
else {
iVar4 = *(int *)((long)local_78 + 0xc);
*(int *)((long)local_78 + 0xc) = iVar4 + -1;
}
if (iVar4 == 1) {
(**(code **)(*local_78 + 0x18))();
}
}
if (cVar3 != '\0') goto LAB_0019a7a5;
puVar5 = puVar5 + 4;
} while (puVar5 != puVar2);
}
return;
}
| ||
47,861 | fill_uchar | eloqsql/strings/ctype.c | static int fill_uchar(uchar *a,uint size,const char *str, size_t len)
{
uint i= 0;
const char *s, *b, *e=str+len;
for (s=str ; s < e ; i++)
{
for ( ; (s < e) && strchr(" \t\r\n",s[0]); s++) ;
b=s;
for ( ; (s < e) && !strchr(" \t\r\n",s[0]); s++) ;
if (s == b || i > size)
break;
a[i]= (uchar) strtoul(b,NULL,16);
}
return 0;
} | O0 | c | fill_uchar:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movl $0x0, -0x24(%rbp)
movq -0x18(%rbp), %rax
addq -0x20(%rbp), %rax
movq %rax, -0x40(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rax
cmpq -0x40(%rbp), %rax
jae 0x771d6
jmp 0x77102
movq -0x30(%rbp), %rcx
xorl %eax, %eax
cmpq -0x40(%rbp), %rcx
movb %al, -0x41(%rbp)
jae 0x7712e
movq -0x30(%rbp), %rax
movsbl (%rax), %esi
leaq 0x102b7(%rip), %rdi # 0x873d6
callq 0x25120
cmpq $0x0, %rax
setne %al
movb %al, -0x41(%rbp)
movb -0x41(%rbp), %al
testb $0x1, %al
jne 0x77137
jmp 0x77147
jmp 0x77139
movq -0x30(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x30(%rbp)
jmp 0x77102
movq -0x30(%rbp), %rax
movq %rax, -0x38(%rbp)
movq -0x30(%rbp), %rcx
xorl %eax, %eax
cmpq -0x40(%rbp), %rcx
movb %al, -0x42(%rbp)
jae 0x7717d
movq -0x30(%rbp), %rax
movsbl (%rax), %esi
leaq 0x1026a(%rip), %rdi # 0x873d6
callq 0x25120
cmpq $0x0, %rax
setne %al
xorb $-0x1, %al
movb %al, -0x42(%rbp)
movb -0x42(%rbp), %al
testb $0x1, %al
jne 0x77186
jmp 0x77196
jmp 0x77188
movq -0x30(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x30(%rbp)
jmp 0x7714f
movq -0x30(%rbp), %rax
cmpq -0x38(%rbp), %rax
je 0x771a8
movl -0x24(%rbp), %eax
cmpl -0xc(%rbp), %eax
jbe 0x771aa
jmp 0x771d6
movq -0x38(%rbp), %rdi
xorl %eax, %eax
movl %eax, %esi
movl $0x10, %edx
callq 0x25450
movb %al, %dl
movq -0x8(%rbp), %rax
movl -0x24(%rbp), %ecx
movb %dl, (%rax,%rcx)
movl -0x24(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x24(%rbp)
jmp 0x770f2
xorl %eax, %eax
addq $0x50, %rsp
popq %rbp
retq
nop
| fill_uchar:
push rbp
mov rbp, rsp
sub rsp, 50h
mov [rbp+var_8], rdi
mov [rbp+var_C], esi
mov [rbp+var_18], rdx
mov [rbp+var_20], rcx
mov [rbp+var_24], 0
mov rax, [rbp+var_18]
add rax, [rbp+var_20]
mov [rbp+var_40], rax
mov rax, [rbp+var_18]
mov [rbp+var_30], rax
loc_770F2:
mov rax, [rbp+var_30]
cmp rax, [rbp+var_40]
jnb loc_771D6
jmp short $+2
loc_77102:
mov rcx, [rbp+var_30]
xor eax, eax
cmp rcx, [rbp+var_40]
mov [rbp+var_41], al
jnb short loc_7712E
mov rax, [rbp+var_30]
movsx esi, byte ptr [rax]
lea rdi, asc_873D6; " \t\r\n"
call _strchr
cmp rax, 0
setnz al
mov [rbp+var_41], al
loc_7712E:
mov al, [rbp+var_41]
test al, 1
jnz short loc_77137
jmp short loc_77147
loc_77137:
jmp short $+2
loc_77139:
mov rax, [rbp+var_30]
add rax, 1
mov [rbp+var_30], rax
jmp short loc_77102
loc_77147:
mov rax, [rbp+var_30]
mov [rbp+var_38], rax
loc_7714F:
mov rcx, [rbp+var_30]
xor eax, eax
cmp rcx, [rbp+var_40]
mov [rbp+var_42], al
jnb short loc_7717D
mov rax, [rbp+var_30]
movsx esi, byte ptr [rax]
lea rdi, asc_873D6; " \t\r\n"
call _strchr
cmp rax, 0
setnz al
xor al, 0FFh
mov [rbp+var_42], al
loc_7717D:
mov al, [rbp+var_42]
test al, 1
jnz short loc_77186
jmp short loc_77196
loc_77186:
jmp short $+2
loc_77188:
mov rax, [rbp+var_30]
add rax, 1
mov [rbp+var_30], rax
jmp short loc_7714F
loc_77196:
mov rax, [rbp+var_30]
cmp rax, [rbp+var_38]
jz short loc_771A8
mov eax, [rbp+var_24]
cmp eax, [rbp+var_C]
jbe short loc_771AA
loc_771A8:
jmp short loc_771D6
loc_771AA:
mov rdi, [rbp+var_38]
xor eax, eax
mov esi, eax
mov edx, 10h
call ___isoc23_strtoul
mov dl, al
mov rax, [rbp+var_8]
mov ecx, [rbp+var_24]
mov [rax+rcx], dl
mov eax, [rbp+var_24]
add eax, 1
mov [rbp+var_24], eax
jmp loc_770F2
loc_771D6:
xor eax, eax
add rsp, 50h
pop rbp
retn
| long long fill_uchar(long long a1, unsigned int a2, char *a3, long long a4)
{
char v5; // [rsp+Eh] [rbp-42h]
bool v6; // [rsp+Fh] [rbp-41h]
unsigned long long v7; // [rsp+10h] [rbp-40h]
char *v8; // [rsp+18h] [rbp-38h]
char *v9; // [rsp+20h] [rbp-30h]
unsigned int v10; // [rsp+2Ch] [rbp-24h]
v10 = 0;
v7 = (unsigned long long)&a3[a4];
v9 = a3;
while ( (unsigned long long)v9 < v7 )
{
while ( 1 )
{
v6 = 0;
if ( (unsigned long long)v9 < v7 )
v6 = strchr(" \t\r\n", (unsigned int)*v9) != 0;
if ( !v6 )
break;
++v9;
}
v8 = v9;
while ( 1 )
{
v5 = 0;
if ( (unsigned long long)v9 < v7 )
v5 = ~(strchr(" \t\r\n", (unsigned int)*v9) != 0);
if ( (v5 & 1) == 0 )
break;
++v9;
}
if ( v9 == v8 || v10 > a2 )
break;
*(_BYTE *)(a1 + v10++) = __isoc23_strtoul(v8, 0LL, 16LL);
}
return 0LL;
}
| fill_uchar:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x50
MOV qword ptr [RBP + -0x8],RDI
MOV dword ptr [RBP + -0xc],ESI
MOV qword ptr [RBP + -0x18],RDX
MOV qword ptr [RBP + -0x20],RCX
MOV dword ptr [RBP + -0x24],0x0
MOV RAX,qword ptr [RBP + -0x18]
ADD RAX,qword ptr [RBP + -0x20]
MOV qword ptr [RBP + -0x40],RAX
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RBP + -0x30],RAX
LAB_001770f2:
MOV RAX,qword ptr [RBP + -0x30]
CMP RAX,qword ptr [RBP + -0x40]
JNC 0x001771d6
JMP 0x00177102
LAB_00177102:
MOV RCX,qword ptr [RBP + -0x30]
XOR EAX,EAX
CMP RCX,qword ptr [RBP + -0x40]
MOV byte ptr [RBP + -0x41],AL
JNC 0x0017712e
MOV RAX,qword ptr [RBP + -0x30]
MOVSX ESI,byte ptr [RAX]
LEA RDI,[0x1873d6]
CALL 0x00125120
CMP RAX,0x0
SETNZ AL
MOV byte ptr [RBP + -0x41],AL
LAB_0017712e:
MOV AL,byte ptr [RBP + -0x41]
TEST AL,0x1
JNZ 0x00177137
JMP 0x00177147
LAB_00177137:
JMP 0x00177139
LAB_00177139:
MOV RAX,qword ptr [RBP + -0x30]
ADD RAX,0x1
MOV qword ptr [RBP + -0x30],RAX
JMP 0x00177102
LAB_00177147:
MOV RAX,qword ptr [RBP + -0x30]
MOV qword ptr [RBP + -0x38],RAX
LAB_0017714f:
MOV RCX,qword ptr [RBP + -0x30]
XOR EAX,EAX
CMP RCX,qword ptr [RBP + -0x40]
MOV byte ptr [RBP + -0x42],AL
JNC 0x0017717d
MOV RAX,qword ptr [RBP + -0x30]
MOVSX ESI,byte ptr [RAX]
LEA RDI,[0x1873d6]
CALL 0x00125120
CMP RAX,0x0
SETNZ AL
XOR AL,0xff
MOV byte ptr [RBP + -0x42],AL
LAB_0017717d:
MOV AL,byte ptr [RBP + -0x42]
TEST AL,0x1
JNZ 0x00177186
JMP 0x00177196
LAB_00177186:
JMP 0x00177188
LAB_00177188:
MOV RAX,qword ptr [RBP + -0x30]
ADD RAX,0x1
MOV qword ptr [RBP + -0x30],RAX
JMP 0x0017714f
LAB_00177196:
MOV RAX,qword ptr [RBP + -0x30]
CMP RAX,qword ptr [RBP + -0x38]
JZ 0x001771a8
MOV EAX,dword ptr [RBP + -0x24]
CMP EAX,dword ptr [RBP + -0xc]
JBE 0x001771aa
LAB_001771a8:
JMP 0x001771d6
LAB_001771aa:
MOV RDI,qword ptr [RBP + -0x38]
XOR EAX,EAX
MOV ESI,EAX
MOV EDX,0x10
CALL 0x00125450
MOV DL,AL
MOV RAX,qword ptr [RBP + -0x8]
MOV ECX,dword ptr [RBP + -0x24]
MOV byte ptr [RAX + RCX*0x1],DL
MOV EAX,dword ptr [RBP + -0x24]
ADD EAX,0x1
MOV dword ptr [RBP + -0x24],EAX
JMP 0x001770f2
LAB_001771d6:
XOR EAX,EAX
ADD RSP,0x50
POP RBP
RET
|
int8 fill_uchar(long param_1,uint param_2,char *param_3,long param_4)
{
char *pcVar1;
int1 uVar2;
char *pcVar3;
char *pcVar4;
bool bVar5;
char *local_38;
uint local_2c;
local_2c = 0;
pcVar3 = param_3 + param_4;
local_38 = param_3;
while( true ) {
if (pcVar3 <= local_38) {
return 0;
}
while( true ) {
pcVar1 = local_38;
bVar5 = false;
if (local_38 < pcVar3) {
pcVar4 = strchr(" \t\r\n",(int)*local_38);
bVar5 = pcVar4 != (char *)0x0;
}
if (!bVar5) break;
local_38 = local_38 + 1;
}
while( true ) {
bVar5 = false;
if (local_38 < pcVar3) {
pcVar4 = strchr(" \t\r\n",(int)*local_38);
bVar5 = pcVar4 == (char *)0x0;
}
if (!bVar5) break;
local_38 = local_38 + 1;
}
if (local_38 == pcVar1) break;
if (param_2 < local_2c) {
return 0;
}
uVar2 = __isoc23_strtoul(pcVar1,0,0x10);
*(int1 *)(param_1 + (ulong)local_2c) = uVar2;
local_2c = local_2c + 1;
}
return 0;
}
| |
47,862 | ma_ck_write_btree | eloqsql/storage/maria/ma_write.c | static my_bool _ma_ck_write_btree(MARIA_HA *info, MARIA_KEY *key)
{
my_bool error;
MARIA_KEYDEF *keyinfo= key->keyinfo;
my_off_t *root= &info->s->state.key_root[keyinfo->key_nr];
DBUG_ENTER("_ma_ck_write_btree");
error= _ma_ck_write_btree_with_log(info, key, root,
keyinfo->write_comp_flag | key->flag);
if (info->ft1_to_ft2)
{
if (!error)
error= _ma_ft_convert_to_ft2(info, key);
delete_dynamic(info->ft1_to_ft2);
my_free(info->ft1_to_ft2);
info->ft1_to_ft2=0;
}
DBUG_RETURN(error);
} | O0 | c | ma_ck_write_btree:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x20(%rbp)
movq -0x8(%rbp), %rax
movq (%rax), %rax
movq 0x118(%rax), %rax
movq -0x20(%rbp), %rcx
movzbl 0xa5(%rcx), %ecx
shlq $0x3, %rcx
addq %rcx, %rax
movq %rax, -0x28(%rbp)
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x28(%rbp), %rdx
movq -0x20(%rbp), %rax
movl 0xb4(%rax), %ecx
movq -0x10(%rbp), %rax
orl 0x18(%rax), %ecx
callq 0x6b940
movb %al, -0x11(%rbp)
movq -0x8(%rbp), %rax
cmpq $0x0, 0x320(%rax)
je 0x677f8
cmpb $0x0, -0x11(%rbp)
jne 0x677c9
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0x784b0
movb %al, -0x11(%rbp)
movq -0x8(%rbp), %rax
movq 0x320(%rax), %rdi
callq 0xdad10
movq -0x8(%rbp), %rax
movq 0x320(%rax), %rdi
callq 0xf3d70
movq -0x8(%rbp), %rax
movq $0x0, 0x320(%rax)
jmp 0x677fa
movb -0x11(%rbp), %al
movb %al, -0x29(%rbp)
movb -0x29(%rbp), %al
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax)
| _ma_ck_write_btree:
push rbp
mov rbp, rsp
sub rsp, 30h
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov rax, [rbp+var_10]
mov rax, [rax+8]
mov [rbp+var_20], rax
mov rax, [rbp+var_8]
mov rax, [rax]
mov rax, [rax+118h]
mov rcx, [rbp+var_20]
movzx ecx, byte ptr [rcx+0A5h]
shl rcx, 3
add rax, rcx
mov [rbp+var_28], rax
mov rdi, [rbp+var_8]
mov rsi, [rbp+var_10]
mov rdx, [rbp+var_28]
mov rax, [rbp+var_20]
mov ecx, [rax+0B4h]
mov rax, [rbp+var_10]
or ecx, [rax+18h]
call _ma_ck_write_btree_with_log
mov [rbp+var_11], al
mov rax, [rbp+var_8]
cmp qword ptr [rax+320h], 0
jz short loc_677F8
cmp [rbp+var_11], 0
jnz short loc_677C9
mov rdi, [rbp+var_8]
mov rsi, [rbp+var_10]
call _ma_ft_convert_to_ft2
mov [rbp+var_11], al
loc_677C9:
mov rax, [rbp+var_8]
mov rdi, [rax+320h]
call delete_dynamic
mov rax, [rbp+var_8]
mov rdi, [rax+320h]
call my_free
mov rax, [rbp+var_8]
mov qword ptr [rax+320h], 0
loc_677F8:
jmp short $+2
loc_677FA:
mov al, [rbp+var_11]
mov [rbp+var_29], al
mov al, [rbp+var_29]
add rsp, 30h
pop rbp
retn
| char ma_ck_write_btree(_QWORD *a1, long long a2)
{
char v3; // [rsp+1Fh] [rbp-11h]
v3 = ma_ck_write_btree_with_log(
a1,
a2,
8LL * *(unsigned __int8 *)(*(_QWORD *)(a2 + 8) + 165LL) + *(_QWORD *)(*a1 + 280LL),
(unsigned int)(*(_DWORD *)(a2 + 24) | *(_DWORD *)(*(_QWORD *)(a2 + 8) + 180LL)));
if ( a1[100] )
{
if ( !v3 )
v3 = ma_ft_convert_to_ft2(a1, a2);
delete_dynamic(a1[100]);
my_free(a1[100]);
a1[100] = 0LL;
}
return v3;
}
| _ma_ck_write_btree:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x30
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x8]
MOV qword ptr [RBP + -0x20],RAX
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX]
MOV RAX,qword ptr [RAX + 0x118]
MOV RCX,qword ptr [RBP + -0x20]
MOVZX ECX,byte ptr [RCX + 0xa5]
SHL RCX,0x3
ADD RAX,RCX
MOV qword ptr [RBP + -0x28],RAX
MOV RDI,qword ptr [RBP + -0x8]
MOV RSI,qword ptr [RBP + -0x10]
MOV RDX,qword ptr [RBP + -0x28]
MOV RAX,qword ptr [RBP + -0x20]
MOV ECX,dword ptr [RAX + 0xb4]
MOV RAX,qword ptr [RBP + -0x10]
OR ECX,dword ptr [RAX + 0x18]
CALL 0x0016b940
MOV byte ptr [RBP + -0x11],AL
MOV RAX,qword ptr [RBP + -0x8]
CMP qword ptr [RAX + 0x320],0x0
JZ 0x001677f8
CMP byte ptr [RBP + -0x11],0x0
JNZ 0x001677c9
MOV RDI,qword ptr [RBP + -0x8]
MOV RSI,qword ptr [RBP + -0x10]
CALL 0x001784b0
MOV byte ptr [RBP + -0x11],AL
LAB_001677c9:
MOV RAX,qword ptr [RBP + -0x8]
MOV RDI,qword ptr [RAX + 0x320]
CALL 0x001dad10
MOV RAX,qword ptr [RBP + -0x8]
MOV RDI,qword ptr [RAX + 0x320]
CALL 0x001f3d70
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RAX + 0x320],0x0
LAB_001677f8:
JMP 0x001677fa
LAB_001677fa:
MOV AL,byte ptr [RBP + -0x11]
MOV byte ptr [RBP + -0x29],AL
MOV AL,byte ptr [RBP + -0x29]
ADD RSP,0x30
POP RBP
RET
|
char _ma_ck_write_btree(long *param_1,long param_2)
{
char local_19;
local_19 = _ma_ck_write_btree_with_log
(param_1,param_2,
*(long *)(*param_1 + 0x118) +
(ulong)*(byte *)(*(long *)(param_2 + 8) + 0xa5) * 8,
*(uint *)(*(long *)(param_2 + 8) + 0xb4) | *(uint *)(param_2 + 0x18));
if (param_1[100] != 0) {
if (local_19 == '\0') {
local_19 = _ma_ft_convert_to_ft2(param_1,param_2);
}
delete_dynamic(param_1[100]);
my_free(param_1[100]);
param_1[100] = 0;
}
return local_19;
}
| |
47,863 | _cpuidex | corpus-core[P]colibri-stateless/build_O0/_deps/blst-src/src/cpuid.c | static void __cpuidex(int info[4], int func, int sub)
{
int eax, ebx, ecx, edx;
__asm__("cpuid" : "=a"(eax), "=b"(ebx), "=c"(ecx), "=d"(edx)
: "a"(func), "c"(sub));
info[0] = eax;
info[1] = ebx;
info[2] = ecx;
info[3] = edx;
} | O0 | c | _cpuidex:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movl %edx, -0x18(%rbp)
movl -0x14(%rbp), %eax
movl -0x18(%rbp), %ecx
cpuid
movl %eax, -0x1c(%rbp)
movl %ebx, -0x20(%rbp)
movl %ecx, -0x24(%rbp)
movl %edx, -0x28(%rbp)
movl -0x1c(%rbp), %ecx
movq -0x10(%rbp), %rax
movl %ecx, (%rax)
movl -0x20(%rbp), %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x4(%rax)
movl -0x24(%rbp), %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x8(%rax)
movl -0x28(%rbp), %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0xc(%rax)
popq %rbx
popq %rbp
retq
nopl (%rax)
| __cpuidex:
push rbp
mov rbp, rsp
push rbx
mov [rbp+var_10], rdi
mov [rbp+var_14], esi
mov [rbp+var_18], edx
mov eax, [rbp+var_14]
mov ecx, [rbp+var_18]
cpuid
mov [rbp+var_1C], eax
mov [rbp+var_20], ebx
mov [rbp+var_24], ecx
mov [rbp+var_28], edx
mov ecx, [rbp+var_1C]
mov rax, [rbp+var_10]
mov [rax], ecx
mov ecx, [rbp+var_20]
mov rax, [rbp+var_10]
mov [rax+4], ecx
mov ecx, [rbp+var_24]
mov rax, [rbp+var_10]
mov [rax+8], ecx
mov ecx, [rbp+var_28]
mov rax, [rbp+var_10]
mov [rax+0Ch], ecx
pop rbx
pop rbp
retn
| _DWORD * _cpuidex(_DWORD *a1, unsigned int a2)
{
_DWORD *result; // rax
_RAX = a2;
__asm { cpuid }
*a1 = _RAX;
a1[1] = _RBX;
a1[2] = _RCX;
result = a1;
a1[3] = _RDX;
return result;
}
| __cpuidex:
PUSH RBP
MOV RBP,RSP
PUSH RBX
MOV qword ptr [RBP + -0x10],RDI
MOV dword ptr [RBP + -0x14],ESI
MOV dword ptr [RBP + -0x18],EDX
MOV EAX,dword ptr [RBP + -0x14]
MOV ECX,dword ptr [RBP + -0x18]
CPUID
MOV dword ptr [RBP + -0x1c],EAX
MOV dword ptr [RBP + -0x20],EBX
MOV dword ptr [RBP + -0x24],ECX
MOV dword ptr [RBP + -0x28],EDX
MOV ECX,dword ptr [RBP + -0x1c]
MOV RAX,qword ptr [RBP + -0x10]
MOV dword ptr [RAX],ECX
MOV ECX,dword ptr [RBP + -0x20]
MOV RAX,qword ptr [RBP + -0x10]
MOV dword ptr [RAX + 0x4],ECX
MOV ECX,dword ptr [RBP + -0x24]
MOV RAX,qword ptr [RBP + -0x10]
MOV dword ptr [RAX + 0x8],ECX
MOV ECX,dword ptr [RBP + -0x28]
MOV RAX,qword ptr [RBP + -0x10]
MOV dword ptr [RAX + 0xc],ECX
POP RBX
POP RBP
RET
|
void __cpuidex(int4 *param_1,int param_2)
{
int4 *puVar1;
int4 uVar2;
int4 uVar3;
int4 uVar4;
if (param_2 == 0) {
puVar1 = (int4 *)cpuid_basic_info(0);
}
else if (param_2 == 1) {
puVar1 = (int4 *)cpuid_Version_info(1);
}
else if (param_2 == 2) {
puVar1 = (int4 *)cpuid_cache_tlb_info(2);
}
else if (param_2 == 3) {
puVar1 = (int4 *)cpuid_serial_info(3);
}
else if (param_2 == 4) {
puVar1 = (int4 *)cpuid_Deterministic_Cache_Parameters_info(4);
}
else if (param_2 == 5) {
puVar1 = (int4 *)cpuid_MONITOR_MWAIT_Features_info(5);
}
else if (param_2 == 6) {
puVar1 = (int4 *)cpuid_Thermal_Power_Management_info(6);
}
else if (param_2 == 7) {
puVar1 = (int4 *)cpuid_Extended_Feature_Enumeration_info(7);
}
else if (param_2 == 9) {
puVar1 = (int4 *)cpuid_Direct_Cache_Access_info(9);
}
else if (param_2 == 10) {
puVar1 = (int4 *)cpuid_Architectural_Performance_Monitoring_info(10);
}
else if (param_2 == 0xb) {
puVar1 = (int4 *)cpuid_Extended_Topology_info(0xb);
}
else if (param_2 == 0xd) {
puVar1 = (int4 *)cpuid_Processor_Extended_States_info(0xd);
}
else if (param_2 == 0xf) {
puVar1 = (int4 *)cpuid_Quality_of_Service_info(0xf);
}
else if (param_2 == -0x7ffffffe) {
puVar1 = (int4 *)cpuid_brand_part1_info(0x80000002);
}
else if (param_2 == -0x7ffffffd) {
puVar1 = (int4 *)cpuid_brand_part2_info(0x80000003);
}
else if (param_2 == -0x7ffffffc) {
puVar1 = (int4 *)cpuid_brand_part3_info(0x80000004);
}
else {
puVar1 = (int4 *)cpuid(param_2);
}
uVar2 = puVar1[1];
uVar3 = puVar1[2];
uVar4 = puVar1[3];
*param_1 = *puVar1;
param_1[1] = uVar2;
param_1[2] = uVar4;
param_1[3] = uVar3;
return;
}
| |
47,864 | GetMainPartOfName(std::__cxx11::basic_string<wchar_t, std::char_traits<wchar_t>, std::allocator<wchar_t>> const&, unsigned int) | SylCore-WoTLK/src/common/Utilities/Util.cpp | std::wstring GetMainPartOfName(std::wstring const& wname, uint32_t declension)
{
// supported only Cyrillic cases
if (wname.empty() || !isCyrillicCharacter(wname[0]) || declension > 5)
{
return wname;
}
// Important: end length must be <= MAX_INTERNAL_PLAYER_NAME-MAX_PLAYER_NAME (3 currently)
static std::wstring const a_End = L"\u0430";
static std::wstring const o_End = L"\u043E";
static std::wstring const ya_End = L"\u044F";
static std::wstring const ie_End = L"\u0435";
static std::wstring const i_End = L"\u0438";
static std::wstring const yeru_End = L"\u044B";
static std::wstring const u_End = L"\u0443";
static std::wstring const yu_End = L"\u044E";
static std::wstring const oj_End = L"\u043E\u0439";
static std::wstring const ie_j_End = L"\u0435\u0439";
static std::wstring const io_j_End = L"\u0451\u0439";
static std::wstring const o_m_End = L"\u043E\u043C";
static std::wstring const io_m_End = L"\u0451\u043C";
static std::wstring const ie_m_End = L"\u0435\u043C";
static std::wstring const soft_End = L"\u044C";
static std::wstring const j_End = L"\u0439";
static std::array<std::array<std::wstring const*, 7>, 6> const dropEnds = {{
{ &a_End, &o_End, &ya_End, &ie_End, &soft_End, &j_End, nullptr },
{ &a_End, &ya_End, &yeru_End, &i_End, nullptr, nullptr, nullptr },
{ &ie_End, &u_End, &yu_End, &i_End, nullptr, nullptr, nullptr },
{ &u_End, &yu_End, &o_End, &ie_End, &soft_End, &ya_End, &a_End },
{ &oj_End, &io_j_End, &ie_j_End, &o_m_End, &io_m_End, &ie_m_End, &yu_End },
{ &ie_End, &i_End, nullptr, nullptr, nullptr, nullptr, nullptr }
}
};
std::size_t const thisLen = wname.length();
std::array<std::wstring const*, 7> const& endings = dropEnds[declension];
for (const std::wstring* endingPtr : endings)
{
if (endingPtr == nullptr)
{
break;
}
std::wstring const& ending = *endingPtr;
std::size_t const endLen = ending.length();
if (endLen > thisLen)
{
continue;
}
if (wname.compare(thisLen - endLen, endLen, ending) == 0)
{
return wname.substr(0, thisLen - endLen);
}
}
return wname;
} | O3 | cpp | GetMainPartOfName(std::__cxx11::basic_string<wchar_t, std::char_traits<wchar_t>, std::allocator<wchar_t>> const&, unsigned int):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
movq (%rsi), %rsi
movq 0x8(%r14), %r12
testq %r12, %r12
je 0xc5b42
movl (%rsi), %ecx
leal -0x410(%rcx), %edi
movb $0x1, %al
cmpl $0x40, %edi
jb 0xc5ae4
cmpl $0x451, %ecx # imm = 0x451
sete %dil
cmpl $0x401, %ecx # imm = 0x401
sete %al
orb %dil, %al
cmpl $0x5, %edx
ja 0xc5b42
testb %al, %al
je 0xc5b42
movl %edx, %eax
imulq $0x38, %rax, %rax
leaq 0xa2826(%rip), %r13 # 0x168320
addq %rax, %r13
xorl %ebp, %ebp
movq (%r13,%rbp), %rcx
testq %rcx, %rcx
je 0xc5b2e
movq 0x8(%rcx), %rdx
movq %r12, %r15
subq %rdx, %r15
jb 0xc5b24
movq %r14, %rdi
movq %r15, %rsi
callq 0xc6672
testl %eax, %eax
je 0xc5b67
addq $0x8, %rbp
cmpq $0x38, %rbp
jne 0xc5aff
leaq 0x10(%rbx), %rax
movq %rax, (%rbx)
movq (%r14), %rsi
movq 0x8(%r14), %rax
leaq (%rsi,%rax,4), %rdx
jmp 0xc5b4d
leaq 0x10(%rbx), %rax
movq %rax, (%rbx)
leaq (%rsi,%r12,4), %rdx
movq %rbx, %rdi
callq 0xc69ca
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rbx, %rdi
movq %r14, %rsi
xorl %edx, %edx
movq %r15, %rcx
callq 0xc66fc
jmp 0xc5b55
| _Z17GetMainPartOfNameRKNSt7__cxx1112basic_stringIwSt11char_traitsIwESaIwEEEj:
push rbp
push r15
push r14
push r13
push r12
push rbx
push rax
mov r14, rsi
mov rbx, rdi
mov rsi, [rsi]
mov r12, [r14+8]
test r12, r12
jz loc_C5B42
mov ecx, [rsi]
lea edi, [rcx-410h]
mov al, 1
cmp edi, 40h ; '@'
jb short loc_C5AE4
cmp ecx, 451h
setz dil
cmp ecx, 401h
setz al
or al, dil
loc_C5AE4:
cmp edx, 5
ja short loc_C5B42
test al, al
jz short loc_C5B42
mov eax, edx
imul rax, 38h ; '8'
lea r13, _ZZ17GetMainPartOfNameRKNSt7__cxx1112basic_stringIwSt11char_traitsIwESaIwEEEjE8dropEndsB5cxx11; GetMainPartOfName(std::wstring const&,uint)::dropEnds
add r13, rax
xor ebp, ebp
loc_C5AFF:
mov rcx, [r13+rbp+0]
test rcx, rcx
jz short loc_C5B2E
mov rdx, [rcx+8]
mov r15, r12
sub r15, rdx
jb short loc_C5B24
mov rdi, r14
mov rsi, r15
call _ZNKSt7__cxx1112basic_stringIwSt11char_traitsIwESaIwEE7compareEmmRKS4_; std::wstring::compare(ulong,ulong,std::wstring const&)
test eax, eax
jz short loc_C5B67
loc_C5B24:
add rbp, 8
cmp rbp, 38h ; '8'
jnz short loc_C5AFF
loc_C5B2E:
lea rax, [rbx+10h]
mov [rbx], rax
mov rsi, [r14]
mov rax, [r14+8]
lea rdx, [rsi+rax*4]
jmp short loc_C5B4D
loc_C5B42:
lea rax, [rbx+10h]
mov [rbx], rax
lea rdx, [rsi+r12*4]
loc_C5B4D:
mov rdi, rbx
call _ZNSt7__cxx1112basic_stringIwSt11char_traitsIwESaIwEE12_M_constructIPwEEvT_S7_St20forward_iterator_tag; std::wstring::_M_construct<wchar_t *>(wchar_t *,wchar_t *,std::forward_iterator_tag)
loc_C5B55:
mov rax, rbx
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_C5B67:
mov rdi, rbx
mov rsi, r14
xor edx, edx
mov rcx, r15
call _ZNKSt7__cxx1112basic_stringIwSt11char_traitsIwESaIwEE6substrEmm; std::wstring::substr(ulong,ulong)
jmp short loc_C5B55
| _QWORD * GetMainPartOfName(_QWORD *a1, long long a2, unsigned int a3)
{
_DWORD *v4; // rsi
unsigned long long v5; // r12
bool v6; // al
_UNKNOWN ***v7; // r13
long long v8; // rbp
_UNKNOWN **v9; // rcx
void *v10; // rdx
unsigned long long v11; // r15
long long v12; // rdx
v4 = *(_DWORD **)a2;
v5 = *(_QWORD *)(a2 + 8);
if ( !v5 )
goto LABEL_12;
v6 = 1;
if ( (unsigned int)(*v4 - 1040) >= 0x40 )
v6 = *v4 == 1105 || *v4 == 1025;
if ( a3 <= 5 && v6 )
{
v7 = &GetMainPartOfName(std::wstring const&,unsigned int)::dropEnds[abi:cxx11][7 * a3];
v8 = 0LL;
while ( 1 )
{
v9 = v7[v8];
if ( !v9 )
{
LABEL_11:
*a1 = a1 + 2;
v4 = *(_DWORD **)a2;
v12 = *(_QWORD *)a2 + 4LL * *(_QWORD *)(a2 + 8);
goto LABEL_13;
}
v10 = v9[1];
v11 = v5 - (_QWORD)v10;
if ( v5 >= (unsigned long long)v10 && !(unsigned int)std::wstring::compare(a2, v5 - (_QWORD)v10) )
break;
if ( ++v8 == 7 )
goto LABEL_11;
}
std::wstring::substr(a1, a2, 0LL, v11);
}
else
{
LABEL_12:
*a1 = a1 + 2;
v12 = (long long)&v4[v5];
LABEL_13:
std::wstring::_M_construct<wchar_t *>(a1, v4, v12);
}
return a1;
}
| GetMainPartOfName:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
PUSH RAX
MOV R14,RSI
MOV RBX,RDI
MOV RSI,qword ptr [RSI]
MOV R12,qword ptr [R14 + 0x8]
TEST R12,R12
JZ 0x001c5b42
MOV ECX,dword ptr [RSI]
LEA EDI,[RCX + -0x410]
MOV AL,0x1
CMP EDI,0x40
JC 0x001c5ae4
CMP ECX,0x451
SETZ DIL
CMP ECX,0x401
SETZ AL
OR AL,DIL
LAB_001c5ae4:
CMP EDX,0x5
JA 0x001c5b42
TEST AL,AL
JZ 0x001c5b42
MOV EAX,EDX
IMUL RAX,RAX,0x38
LEA R13,[0x268320]
ADD R13,RAX
XOR EBP,EBP
LAB_001c5aff:
MOV RCX,qword ptr [R13 + RBP*0x1]
TEST RCX,RCX
JZ 0x001c5b2e
MOV RDX,qword ptr [RCX + 0x8]
MOV R15,R12
SUB R15,RDX
JC 0x001c5b24
MOV RDI,R14
MOV RSI,R15
CALL 0x001c6672
TEST EAX,EAX
JZ 0x001c5b67
LAB_001c5b24:
ADD RBP,0x8
CMP RBP,0x38
JNZ 0x001c5aff
LAB_001c5b2e:
LEA RAX,[RBX + 0x10]
MOV qword ptr [RBX],RAX
MOV RSI,qword ptr [R14]
MOV RAX,qword ptr [R14 + 0x8]
LEA RDX,[RSI + RAX*0x4]
JMP 0x001c5b4d
LAB_001c5b42:
LEA RAX,[RBX + 0x10]
MOV qword ptr [RBX],RAX
LEA RDX,[RSI + R12*0x4]
LAB_001c5b4d:
MOV RDI,RBX
CALL 0x001c69ca
LAB_001c5b55:
MOV RAX,RBX
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_001c5b67:
MOV RDI,RBX
MOV RSI,R14
XOR EDX,EDX
MOV RCX,R15
CALL 0x001c66fc
JMP 0x001c5b55
|
/* GetMainPartOfName(std::__cxx11::wstring const&, unsigned int) */
wstring * GetMainPartOfName(wstring *param_1,uint param_2)
{
ulong uVar1;
wstring *pwVar2;
ulong uVar3;
int iVar4;
uint in_EDX;
int *piVar5;
long lVar6;
int4 in_register_00000034;
wstring *this;
int *piVar7;
this = (wstring *)CONCAT44(in_register_00000034,param_2);
piVar7 = *(int **)this;
uVar1 = *(ulong *)(this + 8);
if (uVar1 != 0) {
iVar4 = *piVar7;
if ((in_EDX < 6) && (iVar4 - 0x410U < 0x40 || (iVar4 == 0x401 || iVar4 == 0x451))) {
lVar6 = 0;
do {
pwVar2 = *(wstring **)
(GetMainPartOfName(std::__cxx11::wstring_const&,unsigned_int)::dropEnds_abi_cxx11_
+ lVar6 + (ulong)in_EDX * 0x38);
if (pwVar2 == (wstring *)0x0) break;
uVar3 = *(ulong *)(pwVar2 + 8);
if ((uVar3 <= uVar1) &&
(iVar4 = std::__cxx11::wstring::compare(this,uVar1 - uVar3,uVar3,pwVar2), iVar4 == 0)) {
std::__cxx11::wstring::substr((ulong)param_1,(ulong)this);
return param_1;
}
lVar6 = lVar6 + 8;
} while (lVar6 != 0x38);
*(wstring **)param_1 = param_1 + 0x10;
piVar7 = *(int **)this;
piVar5 = piVar7 + *(long *)(this + 8);
goto LAB_001c5b4d;
}
}
*(wstring **)param_1 = param_1 + 0x10;
piVar5 = piVar7 + uVar1;
LAB_001c5b4d:
std::__cxx11::wstring::_M_construct<wchar_t*>(param_1,piVar7,piVar5);
return param_1;
}
| |
47,865 | ma_encrypt | eloqsql/storage/maria/ma_crypt.c | static int ma_encrypt(MARIA_SHARE *share, MARIA_CRYPT_DATA *crypt_data,
const uchar *src, uchar *dst, uint size,
uint pageno, LSN lsn,
uint *key_version)
{
int rc;
uint32 dstlen= 0; /* Must be set because of error message */
*key_version = encryption_key_get_latest_version(crypt_data->scheme.key_id);
if (*key_version == ENCRYPTION_KEY_VERSION_INVALID)
{
/*
We use this error for both encryption and decryption, as in normal
cases it should be impossible to get an error here.
*/
my_errno= HA_ERR_DECRYPTION_FAILED;
my_printf_error(HA_ERR_DECRYPTION_FAILED,
"Unknown key id %u for %s. Can't continue!",
MYF(ME_FATAL|ME_ERROR_LOG),
crypt_data->scheme.key_id,
share->open_file_name.str);
return 1;
}
rc= encryption_scheme_encrypt(src, size, dst, &dstlen,
&crypt_data->scheme, *key_version,
crypt_data->space, pageno, lsn);
/* The following can only fail if the encryption key is wrong */
DBUG_ASSERT(!my_assert_on_error || rc == MY_AES_OK);
DBUG_ASSERT(!my_assert_on_error || dstlen == size);
if (! (rc == MY_AES_OK && dstlen == size))
{
my_errno= HA_ERR_DECRYPTION_FAILED;
my_printf_error(HA_ERR_DECRYPTION_FAILED,
"failed to encrypt '%s' rc: %d dstlen: %u size: %u\n",
MYF(ME_FATAL|ME_ERROR_LOG),
share->open_file_name.str, rc, dstlen, size);
return 1;
}
return 0;
} | O3 | c | ma_encrypt:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %r9, -0x40(%rbp)
movl %r8d, %ebx
movq %rcx, %r13
movq %rdx, %r14
movq %rsi, %r12
movq %rdi, %r15
movl $0x0, -0x2c(%rbp)
leaq 0x313417(%rip), %rax # 0x387020
movl 0x50(%rsi), %edi
callq *(%rax)
movq 0x18(%rbp), %rcx
movl %eax, (%rcx)
cmpl $-0x1, %eax
je 0x73c97
movq %r15, -0x38(%rbp)
movl 0x60(%r12), %r10d
subq $0x8, %rsp
leaq -0x2c(%rbp), %rcx
movq %r14, %rdi
movl %ebx, %esi
movq %r13, %rdx
movq %r12, %r8
movl %eax, %r9d
pushq 0x10(%rbp)
pushq -0x40(%rbp)
pushq %r10
callq 0x31255
addq $0x20, %rsp
movl %eax, %r15d
testl %eax, %eax
jne 0x73c57
xorl %eax, %eax
cmpl %ebx, -0x2c(%rbp)
je 0x73ccb
callq 0xa48d6
movl $0xc0, (%rax)
movq -0x38(%rbp), %rax
movq 0x5e0(%rax), %rcx
movl -0x2c(%rbp), %r9d
subq $0x8, %rsp
leaq 0x691bb(%rip), %rsi # 0xdce37
movl $0x1040, %edx # imm = 0x1040
movl $0xc0, %edi
movl %r15d, %r8d
xorl %eax, %eax
pushq %rbx
callq 0xa0fd5
addq $0x10, %rsp
jmp 0x73cc6
callq 0xa48d6
movl $0xc0, (%rax)
movl 0x50(%r12), %ecx
movq 0x5e0(%r15), %r8
leaq 0x69158(%rip), %rsi # 0xdce0d
movl $0x1040, %edx # imm = 0x1040
movl $0xc0, %edi
xorl %eax, %eax
callq 0xa0fd5
movl $0x1, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
| ma_encrypt:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 18h
mov [rbp+var_40], r9
mov ebx, r8d
mov r13, rcx
mov r14, rdx
mov r12, rsi
mov r15, rdi
mov [rbp+var_2C], 0
lea rax, encryption_handler
mov edi, [rsi+50h]
call qword ptr [rax]
mov rcx, [rbp+arg_8]
mov [rcx], eax
cmp eax, 0FFFFFFFFh
jz short loc_73C97
mov [rbp+var_38], r15
mov r10d, [r12+60h]
sub rsp, 8
lea rcx, [rbp+var_2C]
mov rdi, r14
mov esi, ebx
mov rdx, r13
mov r8, r12
mov r9d, eax
push [rbp+arg_0]
push [rbp+var_40]
push r10
call encryption_scheme_encrypt
add rsp, 20h
mov r15d, eax
test eax, eax
jnz short loc_73C57
xor eax, eax
cmp [rbp+var_2C], ebx
jz short loc_73CCB
loc_73C57:
call _my_thread_var
mov dword ptr [rax], 0C0h
mov rax, [rbp+var_38]
mov rcx, [rax+5E0h]
mov r9d, [rbp+var_2C]
sub rsp, 8
lea rsi, aFailedToEncryp; "failed to encrypt '%s' rc: %d dstlen:"...
mov edx, 1040h
mov edi, 0C0h
mov r8d, r15d
xor eax, eax
push rbx
call my_printf_error
add rsp, 10h
jmp short loc_73CC6
loc_73C97:
call _my_thread_var
mov dword ptr [rax], 0C0h
mov ecx, [r12+50h]
mov r8, [r15+5E0h]
lea rsi, aUnknownKeyIdUF; "Unknown key id %u for %s. Can't continu"...
mov edx, 1040h
mov edi, 0C0h
xor eax, eax
call my_printf_error
loc_73CC6:
mov eax, 1
loc_73CCB:
add rsp, 18h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| long long ma_encrypt(
long long a1,
long long a2,
long long a3,
long long a4,
unsigned int a5,
long long a6,
long long a7,
unsigned int *a8)
{
long long v12; // rdi
unsigned int v13; // eax
int v14; // r15d
long long result; // rax
int v16; // r9d
long long v18; // [rsp+8h] [rbp-38h]
_DWORD v19[11]; // [rsp+14h] [rbp-2Ch] BYREF
v19[0] = 0;
v12 = *(unsigned int *)(a2 + 80);
v13 = encryption_handler();
*a8 = v13;
if ( v13 == -1 )
{
*(_DWORD *)my_thread_var(v12) = 192;
my_printf_error(
192,
(unsigned int)"Unknown key id %u for %s. Can't continue!",
4160,
*(_DWORD *)(a2 + 80),
*(_QWORD *)(a1 + 1504),
v16);
return 1LL;
}
v18 = a1;
v14 = encryption_scheme_encrypt(a3, a5, a4, v19, a2, v13, *(unsigned int *)(a2 + 96), a6, a7);
if ( v14 || (result = 0LL, v19[0] != a5) )
{
*(_DWORD *)my_thread_var(a3) = 192;
my_printf_error(
192,
(unsigned int)"failed to encrypt '%s' rc: %d dstlen: %u size: %u\n",
4160,
*(_QWORD *)(v18 + 1504),
v14,
v19[0]);
return 1LL;
}
return result;
}
| ma_encrypt:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x18
MOV qword ptr [RBP + -0x40],R9
MOV EBX,R8D
MOV R13,RCX
MOV R14,RDX
MOV R12,RSI
MOV R15,RDI
MOV dword ptr [RBP + -0x2c],0x0
LEA RAX,[0x487020]
MOV EDI,dword ptr [RSI + 0x50]
CALL qword ptr [RAX]
MOV RCX,qword ptr [RBP + 0x18]
MOV dword ptr [RCX],EAX
CMP EAX,-0x1
JZ 0x00173c97
MOV qword ptr [RBP + -0x38],R15
MOV R10D,dword ptr [R12 + 0x60]
SUB RSP,0x8
LEA RCX,[RBP + -0x2c]
MOV RDI,R14
MOV ESI,EBX
MOV RDX,R13
MOV R8,R12
MOV R9D,EAX
PUSH qword ptr [RBP + 0x10]
PUSH qword ptr [RBP + -0x40]
PUSH R10
CALL 0x00131255
ADD RSP,0x20
MOV R15D,EAX
TEST EAX,EAX
JNZ 0x00173c57
XOR EAX,EAX
CMP dword ptr [RBP + -0x2c],EBX
JZ 0x00173ccb
LAB_00173c57:
CALL 0x001a48d6
MOV dword ptr [RAX],0xc0
MOV RAX,qword ptr [RBP + -0x38]
MOV RCX,qword ptr [RAX + 0x5e0]
MOV R9D,dword ptr [RBP + -0x2c]
SUB RSP,0x8
LEA RSI,[0x1dce37]
MOV EDX,0x1040
MOV EDI,0xc0
MOV R8D,R15D
XOR EAX,EAX
PUSH RBX
CALL 0x001a0fd5
ADD RSP,0x10
JMP 0x00173cc6
LAB_00173c97:
CALL 0x001a48d6
MOV dword ptr [RAX],0xc0
MOV ECX,dword ptr [R12 + 0x50]
MOV R8,qword ptr [R15 + 0x5e0]
LEA RSI,[0x1dce0d]
MOV EDX,0x1040
MOV EDI,0xc0
XOR EAX,EAX
CALL 0x001a0fd5
LAB_00173cc6:
MOV EAX,0x1
LAB_00173ccb:
ADD RSP,0x18
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
int8
ma_encrypt(long param_1,long param_2,int8 param_3,int8 param_4,int param_5,
int8 param_6,int8 param_7,int *param_8)
{
int iVar1;
int4 *puVar2;
int local_34;
local_34 = 0;
iVar1 = (*(code *)encryption_handler)(*(int4 *)(param_2 + 0x50));
*param_8 = iVar1;
if (iVar1 == -1) {
puVar2 = (int4 *)_my_thread_var();
*puVar2 = 0xc0;
my_printf_error(0xc0,"Unknown key id %u for %s. Can\'t continue!",0x1040,
*(int4 *)(param_2 + 0x50),*(int8 *)(param_1 + 0x5e0));
}
else {
iVar1 = encryption_scheme_encrypt
(param_3,param_5,param_4,&local_34,param_2,iVar1,
*(int4 *)(param_2 + 0x60),param_6,param_7);
if ((iVar1 == 0) && (local_34 == param_5)) {
return 0;
}
puVar2 = (int4 *)_my_thread_var();
*puVar2 = 0xc0;
my_printf_error(0xc0,"failed to encrypt \'%s\' rc: %d dstlen: %u size: %u\n",0x1040,
*(int8 *)(param_1 + 0x5e0),iVar1,local_34,param_5);
}
return 1;
}
| |
47,866 | js_map_has | bluesky950520[P]quickjs/quickjs.c | static JSValue js_map_has(JSContext *ctx, JSValue this_val,
int argc, JSValue *argv, int magic)
{
JSMapState *s = JS_GetOpaque2(ctx, this_val, JS_CLASS_MAP + magic);
JSMapRecord *mr;
JSValue key;
if (!s)
return JS_EXCEPTION;
key = map_normalize_key(ctx, argv[0]);
mr = map_find_record(ctx, s, key);
return js_bool(mr != NULL);
} | O0 | c | js_map_has:
subq $0x78, %rsp
movq %rsi, 0x58(%rsp)
movq %rdx, 0x60(%rsp)
movq %rdi, 0x50(%rsp)
movl %ecx, 0x4c(%rsp)
movq %r8, 0x40(%rsp)
movl %r9d, 0x3c(%rsp)
movq 0x50(%rsp), %rdi
movl 0x3c(%rsp), %ecx
addl $0x23, %ecx
movq 0x58(%rsp), %rsi
movq 0x60(%rsp), %rdx
callq 0x370f0
movq %rax, 0x30(%rsp)
cmpq $0x0, 0x30(%rsp)
jne 0x8b46c
movl $0x0, 0x68(%rsp)
movq $0x6, 0x70(%rsp)
jmp 0x8b4db
movq 0x50(%rsp), %rdi
movq 0x40(%rsp), %rax
movq (%rax), %rsi
movq 0x8(%rax), %rdx
callq 0x7c8f0
movq %rax, 0x8(%rsp)
movq %rdx, 0x10(%rsp)
movq 0x8(%rsp), %rax
movq %rax, 0x18(%rsp)
movq 0x10(%rsp), %rax
movq %rax, 0x20(%rsp)
movq 0x50(%rsp), %rdi
movq 0x30(%rsp), %rsi
movq 0x18(%rsp), %rdx
movq 0x20(%rsp), %rcx
callq 0x7c9c0
movq %rax, 0x28(%rsp)
cmpq $0x0, 0x28(%rsp)
setne %al
andb $0x1, %al
movzbl %al, %edi
callq 0x55f90
movq %rax, 0x68(%rsp)
movq %rdx, 0x70(%rsp)
movq 0x68(%rsp), %rax
movq 0x70(%rsp), %rdx
addq $0x78, %rsp
retq
nopw (%rax,%rax)
| js_map_has:
sub rsp, 78h
mov [rsp+78h+var_20], rsi
mov [rsp+78h+var_18], rdx
mov [rsp+78h+var_28], rdi
mov [rsp+78h+var_2C], ecx
mov [rsp+78h+var_38], r8
mov [rsp+78h+var_3C], r9d
mov rdi, [rsp+78h+var_28]
mov ecx, [rsp+78h+var_3C]
add ecx, 23h ; '#'
mov rsi, [rsp+78h+var_20]
mov rdx, [rsp+78h+var_18]
call JS_GetOpaque2
mov [rsp+78h+var_48], rax
cmp [rsp+78h+var_48], 0
jnz short loc_8B46C
mov dword ptr [rsp+78h+var_10], 0
mov [rsp+78h+var_8], 6
jmp short loc_8B4DB
loc_8B46C:
mov rdi, [rsp+78h+var_28]
mov rax, [rsp+78h+var_38]
mov rsi, [rax]
mov rdx, [rax+8]
call map_normalize_key
mov [rsp+78h+var_70], rax
mov [rsp+78h+var_68], rdx
mov rax, [rsp+78h+var_70]
mov [rsp+78h+var_60], rax
mov rax, [rsp+78h+var_68]
mov [rsp+78h+var_58], rax
mov rdi, [rsp+78h+var_28]
mov rsi, [rsp+78h+var_48]
mov rdx, [rsp+78h+var_60]
mov rcx, [rsp+78h+var_58]
call map_find_record
mov [rsp+78h+var_50], rax
cmp [rsp+78h+var_50], 0
setnz al
and al, 1
movzx edi, al
call js_bool
mov [rsp+78h+var_10], rax
mov [rsp+78h+var_8], rdx
loc_8B4DB:
mov rax, [rsp+78h+var_10]
mov rdx, [rsp+78h+var_8]
add rsp, 78h
retn
| long long js_map_has(long long a1, long long a2, int a3, long long a4, long long *a5, int a6)
{
long long v6; // rdx
_DWORD *v8; // [rsp+8h] [rbp-70h]
long long record; // [rsp+28h] [rbp-50h]
long long Opaque2; // [rsp+30h] [rbp-48h]
long long v12; // [rsp+68h] [rbp-10h]
Opaque2 = JS_GetOpaque2(a1, a2, a3, a6 + 35);
if ( Opaque2 )
{
v8 = (_DWORD *)map_normalize_key(a1, *a5, a5[1]);
record = map_find_record(a1, Opaque2, v8, v6);
return js_bool(record != 0);
}
else
{
LODWORD(v12) = 0;
}
return v12;
}
| js_map_has:
SUB RSP,0x78
MOV qword ptr [RSP + 0x58],RSI
MOV qword ptr [RSP + 0x60],RDX
MOV qword ptr [RSP + 0x50],RDI
MOV dword ptr [RSP + 0x4c],ECX
MOV qword ptr [RSP + 0x40],R8
MOV dword ptr [RSP + 0x3c],R9D
MOV RDI,qword ptr [RSP + 0x50]
MOV ECX,dword ptr [RSP + 0x3c]
ADD ECX,0x23
MOV RSI,qword ptr [RSP + 0x58]
MOV RDX,qword ptr [RSP + 0x60]
CALL 0x001370f0
MOV qword ptr [RSP + 0x30],RAX
CMP qword ptr [RSP + 0x30],0x0
JNZ 0x0018b46c
MOV dword ptr [RSP + 0x68],0x0
MOV qword ptr [RSP + 0x70],0x6
JMP 0x0018b4db
LAB_0018b46c:
MOV RDI,qword ptr [RSP + 0x50]
MOV RAX,qword ptr [RSP + 0x40]
MOV RSI,qword ptr [RAX]
MOV RDX,qword ptr [RAX + 0x8]
CALL 0x0017c8f0
MOV qword ptr [RSP + 0x8],RAX
MOV qword ptr [RSP + 0x10],RDX
MOV RAX,qword ptr [RSP + 0x8]
MOV qword ptr [RSP + 0x18],RAX
MOV RAX,qword ptr [RSP + 0x10]
MOV qword ptr [RSP + 0x20],RAX
MOV RDI,qword ptr [RSP + 0x50]
MOV RSI,qword ptr [RSP + 0x30]
MOV RDX,qword ptr [RSP + 0x18]
MOV RCX,qword ptr [RSP + 0x20]
CALL 0x0017c9c0
MOV qword ptr [RSP + 0x28],RAX
CMP qword ptr [RSP + 0x28],0x0
SETNZ AL
AND AL,0x1
MOVZX EDI,AL
CALL 0x00155f90
MOV qword ptr [RSP + 0x68],RAX
MOV qword ptr [RSP + 0x70],RDX
LAB_0018b4db:
MOV RAX,qword ptr [RSP + 0x68]
MOV RDX,qword ptr [RSP + 0x70]
ADD RSP,0x78
RET
|
int1 [16]
js_map_has(int8 param_1,int8 param_2,int8 param_3,int8 param_4,
int8 *param_5,int param_6)
{
long lVar1;
int1 auVar2 [16];
int4 local_10;
int4 uStack_c;
int8 local_8;
lVar1 = JS_GetOpaque2(param_1,param_2,param_3,param_6 + 0x23);
if (lVar1 == 0) {
local_10 = 0;
local_8 = 6;
}
else {
auVar2 = map_normalize_key(param_1,*param_5,param_5[1]);
lVar1 = map_find_record(param_1,lVar1,auVar2._0_8_,auVar2._8_8_);
auVar2 = js_bool(lVar1 != 0);
local_8 = auVar2._8_8_;
local_10 = auVar2._0_4_;
uStack_c = auVar2._4_4_;
}
auVar2._4_4_ = uStack_c;
auVar2._0_4_ = local_10;
auVar2._8_8_ = local_8;
return auVar2;
}
| |
47,867 | js_map_has | bluesky950520[P]quickjs/quickjs.c | static JSValue js_map_has(JSContext *ctx, JSValue this_val,
int argc, JSValue *argv, int magic)
{
JSMapState *s = JS_GetOpaque2(ctx, this_val, JS_CLASS_MAP + magic);
JSMapRecord *mr;
JSValue key;
if (!s)
return JS_EXCEPTION;
key = map_normalize_key(ctx, argv[0]);
mr = map_find_record(ctx, s, key);
return js_bool(mr != NULL);
} | O1 | c | js_map_has:
pushq %r14
pushq %rbx
pushq %rax
movq %r8, %r14
movq %rdi, %rbx
leal 0x23(%r9), %ecx
callq 0x269a1
testq %rax, %rax
je 0x4f009
movq (%r14), %rdx
movq 0x8(%r14), %rcx
movl %ecx, %esi
xorq $0x7, %rsi
movq %rdx, %rdi
btrq $0x3f, %rdi
xorl %r8d, %r8d
orq %rsi, %rdi
cmoveq %r8, %rdx
cmoveq %r8, %rcx
movq %rbx, %rdi
movq %rax, %rsi
callq 0x46879
movq %rax, %rcx
xorl %eax, %eax
testq %rcx, %rcx
setne %al
movl $0x1, %edx
jmp 0x4f010
movl $0x6, %edx
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
| js_map_has:
push r14
push rbx
push rax
mov r14, r8
mov rbx, rdi
lea ecx, [r9+23h]
call JS_GetOpaque2
test rax, rax
jz short loc_4F009
mov rdx, [r14]
mov rcx, [r14+8]
mov esi, ecx
xor rsi, 7
mov rdi, rdx
btr rdi, 3Fh ; '?'
xor r8d, r8d
or rdi, rsi
cmovz rdx, r8
cmovz rcx, r8
mov rdi, rbx
mov rsi, rax
call map_find_record
mov rcx, rax
xor eax, eax
test rcx, rcx
setnz al
mov edx, 1
jmp short loc_4F010
loc_4F009:
mov edx, 6
xor eax, eax
loc_4F010:
add rsp, 8
pop rbx
pop r14
retn
| _BOOL8 js_map_has(long long a1, long long a2, int a3, double a4, __m128d a5, long long a6, long long a7, int a8)
{
long long Opaque2; // rax
_DWORD *v10; // rdx
long long v11; // rcx
Opaque2 = JS_GetOpaque2(a1, a2, a3, a8 + 35);
if ( !Opaque2 )
return 0LL;
v10 = *(_DWORD **)a7;
v11 = *(_QWORD *)(a7 + 8);
if ( !((unsigned int)v11 ^ 7LL | *(_QWORD *)a7 & 0x7FFFFFFFFFFFFFFFLL) )
{
v10 = 0LL;
v11 = 0LL;
}
return map_find_record(a1, Opaque2, v10, v11, a4, a5) != 0;
}
| js_map_has:
PUSH R14
PUSH RBX
PUSH RAX
MOV R14,R8
MOV RBX,RDI
LEA ECX,[R9 + 0x23]
CALL 0x001269a1
TEST RAX,RAX
JZ 0x0014f009
MOV RDX,qword ptr [R14]
MOV RCX,qword ptr [R14 + 0x8]
MOV ESI,ECX
XOR RSI,0x7
MOV RDI,RDX
BTR RDI,0x3f
XOR R8D,R8D
OR RDI,RSI
CMOVZ RDX,R8
CMOVZ RCX,R8
MOV RDI,RBX
MOV RSI,RAX
CALL 0x00146879
MOV RCX,RAX
XOR EAX,EAX
TEST RCX,RCX
SETNZ AL
MOV EDX,0x1
JMP 0x0014f010
LAB_0014f009:
MOV EDX,0x6
XOR EAX,EAX
LAB_0014f010:
ADD RSP,0x8
POP RBX
POP R14
RET
|
bool js_map_has(int8 param_1)
{
ulong uVar1;
long lVar2;
ulong uVar3;
ulong *in_R8;
bool bVar4;
lVar2 = JS_GetOpaque2();
if (lVar2 == 0) {
bVar4 = false;
}
else {
uVar3 = in_R8[1];
uVar1 = *in_R8;
if ((*in_R8 & 0x7fffffffffffffff) == 0 && (in_R8[1] & 0xffffffff) == 7) {
uVar3 = 0;
uVar1 = 0;
}
lVar2 = map_find_record(param_1,lVar2,uVar1,uVar3);
bVar4 = lVar2 != 0;
}
return bVar4;
}
| |
47,868 | my_well_formed_char_length_8bit | eloqsql/strings/ctype-simple.c | size_t
my_well_formed_char_length_8bit(CHARSET_INFO *cs __attribute__((unused)),
const char *start, const char *end,
size_t nchars, MY_STRCOPY_STATUS *status)
{
size_t nbytes= (size_t) (end - start);
size_t res= MY_MIN(nbytes, nchars);
status->m_well_formed_error_pos= NULL;
status->m_source_end_pos= start + res;
return res;
} | O0 | c | my_well_formed_char_length_8bit:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq %r8, -0x28(%rbp)
movq -0x18(%rbp), %rax
movq -0x10(%rbp), %rcx
subq %rcx, %rax
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rax
cmpq -0x20(%rbp), %rax
jae 0x43afb
movq -0x30(%rbp), %rax
movq %rax, -0x40(%rbp)
jmp 0x43b03
movq -0x20(%rbp), %rax
movq %rax, -0x40(%rbp)
movq -0x40(%rbp), %rax
movq %rax, -0x38(%rbp)
movq -0x28(%rbp), %rax
movq $0x0, 0x8(%rax)
movq -0x10(%rbp), %rcx
addq -0x38(%rbp), %rcx
movq -0x28(%rbp), %rax
movq %rcx, (%rax)
movq -0x38(%rbp), %rax
popq %rbp
retq
nopl (%rax)
| my_well_formed_char_length_8bit:
push rbp
mov rbp, rsp
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 rax, [rbp+var_18]
mov rcx, [rbp+var_10]
sub rax, rcx
mov [rbp+var_30], rax
mov rax, [rbp+var_30]
cmp rax, [rbp+var_20]
jnb short loc_43AFB
mov rax, [rbp+var_30]
mov [rbp+var_40], rax
jmp short loc_43B03
loc_43AFB:
mov rax, [rbp+var_20]
mov [rbp+var_40], rax
loc_43B03:
mov rax, [rbp+var_40]
mov [rbp+var_38], rax
mov rax, [rbp+var_28]
mov qword ptr [rax+8], 0
mov rcx, [rbp+var_10]
add rcx, [rbp+var_38]
mov rax, [rbp+var_28]
mov [rax], rcx
mov rax, [rbp+var_38]
pop rbp
retn
| unsigned long long my_well_formed_char_length_8bit(
long long a1,
long long a2,
long long a3,
unsigned long long a4,
_QWORD *a5)
{
unsigned long long v6; // [rsp+0h] [rbp-40h]
if ( a3 - a2 >= a4 )
v6 = a4;
else
v6 = a3 - a2;
a5[1] = 0LL;
*a5 = v6 + a2;
return v6;
}
| my_well_formed_char_length_8bit:
PUSH RBP
MOV RBP,RSP
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 RAX,qword ptr [RBP + -0x18]
MOV RCX,qword ptr [RBP + -0x10]
SUB RAX,RCX
MOV qword ptr [RBP + -0x30],RAX
MOV RAX,qword ptr [RBP + -0x30]
CMP RAX,qword ptr [RBP + -0x20]
JNC 0x00143afb
MOV RAX,qword ptr [RBP + -0x30]
MOV qword ptr [RBP + -0x40],RAX
JMP 0x00143b03
LAB_00143afb:
MOV RAX,qword ptr [RBP + -0x20]
MOV qword ptr [RBP + -0x40],RAX
LAB_00143b03:
MOV RAX,qword ptr [RBP + -0x40]
MOV qword ptr [RBP + -0x38],RAX
MOV RAX,qword ptr [RBP + -0x28]
MOV qword ptr [RAX + 0x8],0x0
MOV RCX,qword ptr [RBP + -0x10]
ADD RCX,qword ptr [RBP + -0x38]
MOV RAX,qword ptr [RBP + -0x28]
MOV qword ptr [RAX],RCX
MOV RAX,qword ptr [RBP + -0x38]
POP RBP
RET
|
ulong my_well_formed_char_length_8bit
(int8 param_1,long param_2,long param_3,ulong param_4,long *param_5)
{
ulong local_48;
local_48 = param_4;
if ((ulong)(param_3 - param_2) < param_4) {
local_48 = param_3 - param_2;
}
param_5[1] = 0;
*param_5 = param_2 + local_48;
return local_48;
}
| |
47,869 | my_snprintf_mb2 | eloqsql/strings/ctype-ucs2.c | static size_t
my_snprintf_mb2(CHARSET_INFO *cs __attribute__((unused)),
char* to, size_t n, const char* fmt, ...)
{
size_t ret;
va_list args;
va_start(args,fmt);
ret= my_vsnprintf_mb2(to, n, fmt, args);
va_end(args);
return ret;
} | O0 | c | my_snprintf_mb2:
pushq %rbp
movq %rsp, %rbp
subq $0xf0, %rsp
testb %al, %al
je 0x61aeb
movaps %xmm0, -0xc0(%rbp)
movaps %xmm1, -0xb0(%rbp)
movaps %xmm2, -0xa0(%rbp)
movaps %xmm3, -0x90(%rbp)
movaps %xmm4, -0x80(%rbp)
movaps %xmm5, -0x70(%rbp)
movaps %xmm6, -0x60(%rbp)
movaps %xmm7, -0x50(%rbp)
movq %r9, -0xc8(%rbp)
movq %r8, -0xd0(%rbp)
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
leaq -0xf0(%rbp), %rax
movq %rax, -0x30(%rbp)
leaq 0x10(%rbp), %rax
movq %rax, -0x38(%rbp)
movl $0x30, -0x3c(%rbp)
movl $0x20, -0x40(%rbp)
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x20(%rbp), %rdx
leaq -0x40(%rbp), %rcx
callq 0x64f60
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
addq $0xf0, %rsp
popq %rbp
retq
| my_snprintf_mb2:
push rbp
mov rbp, rsp
sub rsp, 0F0h
test al, al
jz short loc_61AEB
movaps [rbp+var_C0], xmm0
movaps [rbp+var_B0], xmm1
movaps [rbp+var_A0], xmm2
movaps [rbp+var_90], xmm3
movaps [rbp+var_80], xmm4
movaps [rbp+var_70], xmm5
movaps [rbp+var_60], xmm6
movaps [rbp+var_50], xmm7
loc_61AEB:
mov [rbp+var_C8], r9
mov [rbp+var_D0], r8
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov [rbp+var_18], rdx
mov [rbp+var_20], rcx
lea rax, [rbp+var_F0]
mov [rbp+var_30], rax
lea rax, [rbp+arg_0]
mov [rbp+var_38], rax
mov [rbp+var_3C], 30h ; '0'
mov [rbp+var_40], 20h ; ' '
mov rdi, [rbp+var_10]
mov rsi, [rbp+var_18]
mov rdx, [rbp+var_20]
lea rcx, [rbp+var_40]
call my_vsnprintf_mb2
mov [rbp+var_28], rax
mov rax, [rbp+var_28]
add rsp, 0F0h
pop rbp
retn
| long long my_snprintf_mb2(
long long a1,
long long a2,
long long a3,
long long a4,
long long a5,
long long a6,
__m128 a7,
__m128 a8,
__m128 a9,
__m128 a10,
__m128 a11,
__m128 a12,
__m128 a13,
__m128 a14,
char a15)
{
char v16; // [rsp+0h] [rbp-F0h] BYREF
long long v17; // [rsp+20h] [rbp-D0h]
long long v18; // [rsp+28h] [rbp-C8h]
__m128 v19; // [rsp+30h] [rbp-C0h]
__m128 v20; // [rsp+40h] [rbp-B0h]
__m128 v21; // [rsp+50h] [rbp-A0h]
__m128 v22; // [rsp+60h] [rbp-90h]
__m128 v23; // [rsp+70h] [rbp-80h]
__m128 v24; // [rsp+80h] [rbp-70h]
__m128 v25; // [rsp+90h] [rbp-60h]
__m128 v26; // [rsp+A0h] [rbp-50h]
_DWORD v27[2]; // [rsp+B0h] [rbp-40h] BYREF
char *v28; // [rsp+B8h] [rbp-38h]
char *v29; // [rsp+C0h] [rbp-30h]
long long v30; // [rsp+D0h] [rbp-20h]
long long v31; // [rsp+D8h] [rbp-18h]
long long v32; // [rsp+E0h] [rbp-10h]
long long v33; // [rsp+E8h] [rbp-8h]
v19 = a7;
v20 = a8;
v21 = a9;
v22 = a10;
v23 = a11;
v24 = a12;
v25 = a13;
v26 = a14;
v18 = a6;
v17 = a5;
v33 = a1;
v32 = a2;
v31 = a3;
v30 = a4;
v29 = &v16;
v28 = &a15;
v27[1] = 48;
v27[0] = 32;
return my_vsnprintf_mb2(a2, a3, a4, v27);
}
| my_snprintf_mb2:
PUSH RBP
MOV RBP,RSP
SUB RSP,0xf0
TEST AL,AL
JZ 0x00161aeb
MOVAPS xmmword ptr [RBP + -0xc0],XMM0
MOVAPS xmmword ptr [RBP + -0xb0],XMM1
MOVAPS xmmword ptr [RBP + -0xa0],XMM2
MOVAPS xmmword ptr [RBP + -0x90],XMM3
MOVAPS xmmword ptr [RBP + -0x80],XMM4
MOVAPS xmmword ptr [RBP + -0x70],XMM5
MOVAPS xmmword ptr [RBP + -0x60],XMM6
MOVAPS xmmword ptr [RBP + -0x50],XMM7
LAB_00161aeb:
MOV qword ptr [RBP + -0xc8],R9
MOV qword ptr [RBP + -0xd0],R8
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV qword ptr [RBP + -0x18],RDX
MOV qword ptr [RBP + -0x20],RCX
LEA RAX,[RBP + -0xf0]
MOV qword ptr [RBP + -0x30],RAX
LEA RAX,[RBP + 0x10]
MOV qword ptr [RBP + -0x38],RAX
MOV dword ptr [RBP + -0x3c],0x30
MOV dword ptr [RBP + -0x40],0x20
MOV RDI,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RBP + -0x18]
MOV RDX,qword ptr [RBP + -0x20]
LEA RCX,[RBP + -0x40]
CALL 0x00164f60
MOV qword ptr [RBP + -0x28],RAX
MOV RAX,qword ptr [RBP + -0x28]
ADD RSP,0xf0
POP RBP
RET
|
int8
my_snprintf_mb2(int8 param_1,int8 param_2,int8 param_3,int8 param_4,
int8 param_5,int8 param_6,int8 param_7,int8 param_8,
int8 param_9,int8 param_10,int8 param_11,int8 param_12,
int8 param_13,int8 param_14)
{
char in_AL;
int8 uVar1;
int1 local_f8 [32];
int8 local_d8;
int8 local_d0;
int8 local_c8;
int8 local_b8;
int8 local_a8;
int8 local_98;
int8 local_88;
int8 local_78;
int8 local_68;
int8 local_58;
int4 local_48;
int4 local_44;
int1 *local_40;
int1 *local_38;
int8 local_28;
int8 local_20;
int8 local_18;
int8 local_10;
if (in_AL != '\0') {
local_c8 = param_1;
local_b8 = param_2;
local_a8 = param_3;
local_98 = param_4;
local_88 = param_5;
local_78 = param_6;
local_68 = param_7;
local_58 = param_8;
}
local_38 = local_f8;
local_40 = &stack0x00000008;
local_44 = 0x30;
local_48 = 0x20;
local_d8 = param_13;
local_d0 = param_14;
local_28 = param_12;
local_20 = param_11;
local_18 = param_10;
local_10 = param_9;
uVar1 = my_vsnprintf_mb2(param_10,param_11,param_12,&local_48);
return uVar1;
}
| |
47,870 | ma_read_rnd_mempack_record | eloqsql/storage/maria/ma_packrec.c | static int _ma_read_rnd_mempack_record(MARIA_HA *info,
uchar *buf,
register MARIA_RECORD_POS filepos,
my_bool skip_deleted_blocks
__attribute__((unused)))
{
MARIA_BLOCK_INFO block_info;
MARIA_SHARE *share= info->s;
uchar *pos,*start;
DBUG_ENTER("_ma_read_rnd_mempack_record");
if (filepos >= share->state.state.data_file_length)
{
my_errno=HA_ERR_END_OF_FILE;
goto err;
}
if (!(pos= (uchar*) _ma_mempack_get_block_info(info, &info->bit_buff,
&block_info,
&info->rec_buff,
&info->rec_buff_size,
(uchar*)
(start= share->file_map +
filepos))))
goto err;
#ifndef DBUG_OFF
if (block_info.rec_len > info->s->max_pack_length)
{
_ma_set_fatal_error(info, HA_ERR_WRONG_IN_RECORD);
goto err;
}
#endif
info->packed_length=block_info.rec_len;
info->cur_row.lastpos= filepos;
info->cur_row.nextpos= filepos+(uint) (pos-start)+block_info.rec_len;
info->update|= HA_STATE_AKTIV | HA_STATE_KEY_CHANGED;
DBUG_RETURN (_ma_pack_rec_unpack(info, &info->bit_buff, buf,
pos, block_info.rec_len));
err:
DBUG_RETURN(my_errno);
} | O0 | c | ma_read_rnd_mempack_record:
pushq %rbp
movq %rsp, %rbp
subq $0xb0, %rsp
movb %cl, %al
movq %fs:0x28, %rcx
movq %rcx, -0x8(%rbp)
movq %rdi, -0x70(%rbp)
movq %rsi, -0x78(%rbp)
movq %rdx, -0x80(%rbp)
movb %al, -0x81(%rbp)
movq -0x70(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x90(%rbp)
movq -0x80(%rbp), %rax
movq -0x90(%rbp), %rcx
cmpq 0x40(%rcx), %rax
jb 0x38b4b
callq 0xf60c0
movl $0x89, (%rax)
jmp 0x38c29
movq -0x70(%rbp), %rdi
movq -0x70(%rbp), %rsi
addq $0x290, %rsi # imm = 0x290
movq -0x70(%rbp), %rcx
addq $0x3a0, %rcx # imm = 0x3A0
movq -0x70(%rbp), %r8
addq $0x460, %r8 # imm = 0x460
movq -0x90(%rbp), %rax
movq 0x5f0(%rax), %r9
addq -0x80(%rbp), %r9
movq %r9, -0xa0(%rbp)
leaq -0x60(%rbp), %rdx
callq 0x3b280
movq %rax, -0x98(%rbp)
cmpq $0x0, %rax
jne 0x38ba4
jmp 0x38c29
movq -0x48(%rbp), %rcx
movq -0x70(%rbp), %rax
movq %rcx, 0x450(%rax)
movq -0x80(%rbp), %rcx
movq -0x70(%rbp), %rax
movq %rcx, 0x98(%rax)
movq -0x80(%rbp), %rcx
movq -0x98(%rbp), %rax
movq -0xa0(%rbp), %rdx
subq %rdx, %rax
movl %eax, %eax
addq %rax, %rcx
addq -0x48(%rbp), %rcx
movq -0x70(%rbp), %rax
movq %rcx, 0xa0(%rax)
movq -0x70(%rbp), %rax
movl 0x624(%rax), %ecx
orl $0x82, %ecx
movl %ecx, 0x624(%rax)
movq -0x70(%rbp), %rdi
movq -0x70(%rbp), %rsi
addq $0x290, %rsi # imm = 0x290
movq -0x78(%rbp), %rdx
movq -0x98(%rbp), %rcx
movq -0x48(%rbp), %r8
callq 0x382d0
movl %eax, -0x64(%rbp)
jmp 0x38c35
jmp 0x38c2b
callq 0xf60c0
movl (%rax), %eax
movl %eax, -0x64(%rbp)
movl -0x64(%rbp), %eax
movl %eax, -0xa4(%rbp)
movq %fs:0x28, %rax
movq -0x8(%rbp), %rcx
cmpq %rcx, %rax
jne 0x38c5f
movl -0xa4(%rbp), %eax
addq $0xb0, %rsp
popq %rbp
retq
callq 0x2a270
nopw %cs:(%rax,%rax)
| _ma_read_rnd_mempack_record:
push rbp
mov rbp, rsp
sub rsp, 0B0h
mov al, cl
mov rcx, fs:28h
mov [rbp+var_8], rcx
mov [rbp+var_70], rdi
mov [rbp+var_78], rsi
mov [rbp+var_80], rdx
mov [rbp+var_81], al
mov rax, [rbp+var_70]
mov rax, [rax]
mov [rbp+var_90], rax
mov rax, [rbp+var_80]
mov rcx, [rbp+var_90]
cmp rax, [rcx+40h]
jb short loc_38B4B
call _my_thread_var
mov dword ptr [rax], 89h
jmp loc_38C29
loc_38B4B:
mov rdi, [rbp+var_70]
mov rsi, [rbp+var_70]
add rsi, 290h
mov rcx, [rbp+var_70]
add rcx, 3A0h
mov r8, [rbp+var_70]
add r8, 460h
mov rax, [rbp+var_90]
mov r9, [rax+5F0h]
add r9, [rbp+var_80]
mov [rbp+var_A0], r9
lea rdx, [rbp+var_60]
call _ma_mempack_get_block_info
mov [rbp+var_98], rax
cmp rax, 0
jnz short loc_38BA4
jmp loc_38C29
loc_38BA4:
mov rcx, [rbp+var_48]
mov rax, [rbp+var_70]
mov [rax+450h], rcx
mov rcx, [rbp+var_80]
mov rax, [rbp+var_70]
mov [rax+98h], rcx
mov rcx, [rbp+var_80]
mov rax, [rbp+var_98]
mov rdx, [rbp+var_A0]
sub rax, rdx
mov eax, eax
add rcx, rax
add rcx, [rbp+var_48]
mov rax, [rbp+var_70]
mov [rax+0A0h], rcx
mov rax, [rbp+var_70]
mov ecx, [rax+624h]
or ecx, 82h
mov [rax+624h], ecx
mov rdi, [rbp+var_70]
mov rsi, [rbp+var_70]
add rsi, 290h
mov rdx, [rbp+var_78]
mov rcx, [rbp+var_98]
mov r8, [rbp+var_48]
call _ma_pack_rec_unpack
mov [rbp+var_64], eax
jmp short loc_38C35
loc_38C29:
jmp short $+2
loc_38C2B:
call _my_thread_var
mov eax, [rax]
mov [rbp+var_64], eax
loc_38C35:
mov eax, [rbp+var_64]
mov [rbp+var_A4], eax
mov rax, fs:28h
mov rcx, [rbp+var_8]
cmp rax, rcx
jnz short loc_38C5F
mov eax, [rbp+var_A4]
add rsp, 0B0h
pop rbp
retn
loc_38C5F:
call ___stack_chk_fail
| long long ma_read_rnd_mempack_record(_DWORD *a1, long long a2, unsigned long long a3)
{
unsigned long long v4; // [rsp+10h] [rbp-A0h]
long long block_info; // [rsp+18h] [rbp-98h]
_BYTE v8[24]; // [rsp+50h] [rbp-60h] BYREF
long long v9; // [rsp+68h] [rbp-48h]
unsigned long long v10; // [rsp+A8h] [rbp-8h]
v10 = __readfsqword(0x28u);
if ( a3 >= *(_QWORD *)(*(_QWORD *)a1 + 64LL) )
{
*(_DWORD *)my_thread_var() = 137;
return *(unsigned int *)my_thread_var();
}
v4 = a3 + *(_QWORD *)(*(_QWORD *)a1 + 1520LL);
block_info = ma_mempack_get_block_info(a1, a1 + 164, v8, a1 + 232, a1 + 280, v4);
if ( !block_info )
return *(unsigned int *)my_thread_var();
*((_QWORD *)a1 + 138) = v9;
*((_QWORD *)a1 + 19) = a3;
*((_QWORD *)a1 + 20) = v9 + (unsigned int)(block_info - v4) + a3;
a1[393] |= 0x82u;
return (unsigned int)ma_pack_rec_unpack(a1, (long long)(a1 + 164), a2, block_info, v9);
}
| _ma_read_rnd_mempack_record:
PUSH RBP
MOV RBP,RSP
SUB RSP,0xb0
MOV AL,CL
MOV RCX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x8],RCX
MOV qword ptr [RBP + -0x70],RDI
MOV qword ptr [RBP + -0x78],RSI
MOV qword ptr [RBP + -0x80],RDX
MOV byte ptr [RBP + -0x81],AL
MOV RAX,qword ptr [RBP + -0x70]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x90],RAX
MOV RAX,qword ptr [RBP + -0x80]
MOV RCX,qword ptr [RBP + -0x90]
CMP RAX,qword ptr [RCX + 0x40]
JC 0x00138b4b
CALL 0x001f60c0
MOV dword ptr [RAX],0x89
JMP 0x00138c29
LAB_00138b4b:
MOV RDI,qword ptr [RBP + -0x70]
MOV RSI,qword ptr [RBP + -0x70]
ADD RSI,0x290
MOV RCX,qword ptr [RBP + -0x70]
ADD RCX,0x3a0
MOV R8,qword ptr [RBP + -0x70]
ADD R8,0x460
MOV RAX,qword ptr [RBP + -0x90]
MOV R9,qword ptr [RAX + 0x5f0]
ADD R9,qword ptr [RBP + -0x80]
MOV qword ptr [RBP + -0xa0],R9
LEA RDX,[RBP + -0x60]
CALL 0x0013b280
MOV qword ptr [RBP + -0x98],RAX
CMP RAX,0x0
JNZ 0x00138ba4
JMP 0x00138c29
LAB_00138ba4:
MOV RCX,qword ptr [RBP + -0x48]
MOV RAX,qword ptr [RBP + -0x70]
MOV qword ptr [RAX + 0x450],RCX
MOV RCX,qword ptr [RBP + -0x80]
MOV RAX,qword ptr [RBP + -0x70]
MOV qword ptr [RAX + 0x98],RCX
MOV RCX,qword ptr [RBP + -0x80]
MOV RAX,qword ptr [RBP + -0x98]
MOV RDX,qword ptr [RBP + -0xa0]
SUB RAX,RDX
MOV EAX,EAX
ADD RCX,RAX
ADD RCX,qword ptr [RBP + -0x48]
MOV RAX,qword ptr [RBP + -0x70]
MOV qword ptr [RAX + 0xa0],RCX
MOV RAX,qword ptr [RBP + -0x70]
MOV ECX,dword ptr [RAX + 0x624]
OR ECX,0x82
MOV dword ptr [RAX + 0x624],ECX
MOV RDI,qword ptr [RBP + -0x70]
MOV RSI,qword ptr [RBP + -0x70]
ADD RSI,0x290
MOV RDX,qword ptr [RBP + -0x78]
MOV RCX,qword ptr [RBP + -0x98]
MOV R8,qword ptr [RBP + -0x48]
CALL 0x001382d0
MOV dword ptr [RBP + -0x64],EAX
JMP 0x00138c35
LAB_00138c29:
JMP 0x00138c2b
LAB_00138c2b:
CALL 0x001f60c0
MOV EAX,dword ptr [RAX]
MOV dword ptr [RBP + -0x64],EAX
LAB_00138c35:
MOV EAX,dword ptr [RBP + -0x64]
MOV dword ptr [RBP + -0xa4],EAX
MOV RAX,qword ptr FS:[0x28]
MOV RCX,qword ptr [RBP + -0x8]
CMP RAX,RCX
JNZ 0x00138c5f
MOV EAX,dword ptr [RBP + -0xa4]
ADD RSP,0xb0
POP RBP
RET
LAB_00138c5f:
CALL 0x0012a270
|
int4 _ma_read_rnd_mempack_record(long *param_1,int8 param_2,ulong param_3)
{
int8 uVar1;
int4 *puVar2;
long lVar3;
long in_FS_OFFSET;
int4 local_6c;
int1 local_68 [24];
long local_50;
long local_10;
local_10 = *(long *)(in_FS_OFFSET + 0x28);
if (param_3 < *(ulong *)(*param_1 + 0x40)) {
uVar1 = *(int8 *)(*param_1 + 0x5f0);
lVar3 = _ma_mempack_get_block_info
(param_1,param_1 + 0x52,local_68,param_1 + 0x74,param_1 + 0x8c);
if (lVar3 != 0) {
param_1[0x8a] = local_50;
param_1[0x13] = param_3;
param_1[0x14] = param_3 + (uint)((int)lVar3 - ((int)uVar1 + (int)param_3)) + local_50;
*(uint *)((long)param_1 + 0x624) = *(uint *)((long)param_1 + 0x624) | 0x82;
local_6c = _ma_pack_rec_unpack(param_1,param_1 + 0x52,param_2,lVar3,local_50);
goto LAB_00138c35;
}
}
else {
puVar2 = (int4 *)_my_thread_var();
*puVar2 = 0x89;
}
puVar2 = (int4 *)_my_thread_var();
local_6c = *puVar2;
LAB_00138c35:
if (*(long *)(in_FS_OFFSET + 0x28) != local_10) {
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
return local_6c;
}
| |
47,871 | atoi_octal | eloqsql/mysys/my_init.c | static ulong atoi_octal(const char *str)
{
long int tmp;
while (*str && my_isspace(&my_charset_latin1, *str))
str++;
str2int(str,
(*str == '0' ? 8 : 10), /* Octalt or decimalt */
0, INT_MAX, &tmp);
return (ulong) tmp;
} | O3 | c | atoi_octal:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movb (%rdi), %al
movl $0xa, %esi
testb %al, %al
je 0x26a5a
leaq 0x2efd3e(%rip), %rcx # 0x316770
movq 0x40(%rcx), %rcx
movzbl %al, %edx
testb $0x8, 0x1(%rcx,%rdx)
je 0x26a4c
movb 0x1(%rdi), %al
incq %rdi
testb %al, %al
jne 0x26a36
jmp 0x26a5a
xorl %ecx, %ecx
cmpb $0x30, %al
setne %cl
leal 0x8(,%rcx,2), %esi
leaq -0x10(%rbp), %rbx
movl $0x7fffffff, %ecx # imm = 0x7FFFFFFF
xorl %edx, %edx
movq %rbx, %r8
callq 0x5b448
movq (%rbx), %rax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
| atoi_octal:
push rbp
mov rbp, rsp
push rbx
push rax
mov al, [rdi]
mov esi, 0Ah
test al, al
jz short loc_26A5A
lea rcx, my_charset_latin1
mov rcx, [rcx+40h]
loc_26A36:
movzx edx, al
test byte ptr [rcx+rdx+1], 8
jz short loc_26A4C
mov al, [rdi+1]
inc rdi
test al, al
jnz short loc_26A36
jmp short loc_26A5A
loc_26A4C:
xor ecx, ecx
cmp al, 30h ; '0'
setnz cl
lea esi, ds:8[rcx*2]
loc_26A5A:
lea rbx, [rbp+var_10]
mov ecx, 7FFFFFFFh
xor edx, edx
mov r8, rbx
call str2int
mov rax, [rbx]
add rsp, 8
pop rbx
pop rbp
retn
| void __spoils<rdx,rcx,r8,r9,r10,r11,xmm4,xmm5> atoi_octal(unsigned __int8 *a1)
{
unsigned __int8 v1; // al
long long v2; // rsi
_BYTE v3[16]; // [rsp+0h] [rbp-10h] BYREF
v1 = *a1;
v2 = 10LL;
if ( *a1 )
{
while ( (*(_BYTE *)(*((_QWORD *)&my_charset_latin1 + 8) + v1 + 1LL) & 8) != 0 )
{
v1 = *++a1;
if ( !v1 )
goto LABEL_6;
}
v2 = 2 * (unsigned int)(v1 != 48) + 8;
}
LABEL_6:
str2int(a1, v2, 0LL, 0x7FFFFFFFLL, v3);
}
| atoi_octal:
PUSH RBP
MOV RBP,RSP
PUSH RBX
PUSH RAX
MOV AL,byte ptr [RDI]
MOV ESI,0xa
TEST AL,AL
JZ 0x00126a5a
LEA RCX,[0x416770]
MOV RCX,qword ptr [RCX + 0x40]
LAB_00126a36:
MOVZX EDX,AL
TEST byte ptr [RCX + RDX*0x1 + 0x1],0x8
JZ 0x00126a4c
MOV AL,byte ptr [RDI + 0x1]
INC RDI
TEST AL,AL
JNZ 0x00126a36
JMP 0x00126a5a
LAB_00126a4c:
XOR ECX,ECX
CMP AL,0x30
SETNZ CL
LEA ESI,[0x8 + RCX*0x2]
LAB_00126a5a:
LEA RBX,[RBP + -0x10]
MOV ECX,0x7fffffff
XOR EDX,EDX
MOV R8,RBX
CALL 0x0015b448
MOV RAX,qword ptr [RBX]
ADD RSP,0x8
POP RBX
POP RBP
RET
|
int8 atoi_octal(byte *param_1)
{
byte bVar1;
int8 in_RAX;
char cVar2;
int8 local_18;
bVar1 = *param_1;
cVar2 = '\n';
do {
if (bVar1 == 0) {
LAB_00126a5a:
local_18 = in_RAX;
str2int(param_1,cVar2,0,0x7fffffff,&local_18);
return local_18;
}
if ((PTR_ctype_latin1_004167b0[(ulong)bVar1 + 1] & 8) == 0) {
cVar2 = (bVar1 != 0x30) * '\x02' + '\b';
goto LAB_00126a5a;
}
bVar1 = param_1[1];
param_1 = param_1 + 1;
} while( true );
}
| |
47,872 | string_process_escapes(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&) | monkey531[P]llama/common/common.cpp | void string_process_escapes(std::string & input) {
std::size_t input_len = input.length();
std::size_t output_idx = 0;
for (std::size_t input_idx = 0; input_idx < input_len; ++input_idx) {
if (input[input_idx] == '\\' && input_idx + 1 < input_len) {
switch (input[++input_idx]) {
case 'n': input[output_idx++] = '\n'; break;
case 'r': input[output_idx++] = '\r'; break;
case 't': input[output_idx++] = '\t'; break;
case '\'': input[output_idx++] = '\''; break;
case '\"': input[output_idx++] = '\"'; break;
case '\\': input[output_idx++] = '\\'; break;
case 'x':
// Handle \x12, etc
if (input_idx + 2 < input_len) {
const char x[3] = { input[input_idx + 1], input[input_idx + 2], 0 };
char *err_p = nullptr;
const long val = std::strtol(x, &err_p, 16);
if (err_p == x + 2) {
input_idx += 2;
input[output_idx++] = char(val);
break;
}
}
// fall through
default: input[output_idx++] = '\\';
input[output_idx++] = input[input_idx]; break;
}
} else {
input[output_idx++] = input[input_idx];
}
}
input.resize(output_idx);
} | O1 | cpp | string_process_escapes(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rbx
movq 0x8(%rdi), %r13
testq %r13, %r13
je 0x72bb8
leaq 0xf(%rsp), %rbp
xorl %r14d, %r14d
leaq 0xd(%rsp), %rdi
leaq 0x10(%rsp), %rsi
xorl %eax, %eax
movq (%rbx), %rcx
movb (%rcx,%rax), %dl
cmpb $0x5c, %dl
jne 0x72ae1
leaq 0x1(%rax), %r15
cmpq %r13, %r15
jae 0x72ae1
movzbl (%rcx,%r15), %edx
cmpl $0x6d, %edx
jle 0x72aed
cmpl $0x73, %edx
jg 0x72b07
cmpl $0x6e, %edx
je 0x72b58
cmpl $0x72, %edx
jne 0x72b8f
movb $0xd, (%rcx,%r14)
jmp 0x72b6b
movb %dl, (%rcx,%r14)
incq %r14
jmp 0x72baa
cmpl $0x22, %edx
je 0x72b51
cmpl $0x27, %edx
je 0x72b66
cmpl $0x5c, %edx
jne 0x72b8f
movb $0x5c, (%rcx,%r14)
jmp 0x72b6b
cmpl $0x74, %edx
je 0x72b5f
cmpl $0x78, %edx
jne 0x72b8f
leaq 0x3(%rax), %r12
cmpq %r13, %r12
jae 0x72b8f
movb 0x2(%rcx,%rax), %dl
movb %dl, 0xd(%rsp)
movb 0x3(%rcx,%rax), %al
movb %al, 0xe(%rsp)
movb $0x0, 0xf(%rsp)
movq $0x0, 0x10(%rsp)
movl $0x10, %edx
callq 0x1bc30
movq 0x10(%rsp), %rcx
cmpq %rbp, %rcx
je 0x72b70
movq %r15, %r12
jmp 0x72b7d
movb $0x22, (%rcx,%r14)
jmp 0x72b6b
movb $0xa, (%rcx,%r14)
jmp 0x72b6b
movb $0x9, (%rcx,%r14)
jmp 0x72b6b
movb $0x27, (%rcx,%r14)
incq %r14
jmp 0x72ba7
movq (%rbx), %rdx
movb %al, (%rdx,%r14)
incq %r14
movq %r12, %r15
movq %r12, %rax
cmpq %rbp, %rcx
leaq 0xd(%rsp), %rdi
leaq 0x10(%rsp), %rsi
je 0x72baa
movq (%rbx), %rax
movb $0x5c, (%rax,%r14)
movq (%rbx), %rax
movb (%rax,%r15), %cl
movb %cl, 0x1(%rax,%r14)
addq $0x2, %r14
movq %r15, %rax
incq %rax
cmpq %r13, %rax
jb 0x72aa2
jmp 0x72bbb
xorl %r14d, %r14d
movq %rbx, %rdi
movq %r14, %rsi
xorl %edx, %edx
callq 0x1b250
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| _Z22string_process_escapesRNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 18h
mov rbx, rdi
mov r13, [rdi+8]
test r13, r13
jz loc_72BB8
lea rbp, [rsp+48h+var_39]
xor r14d, r14d
lea rdi, [rsp+48h+var_3B]
lea rsi, [rsp+48h+var_38]
xor eax, eax
loc_72AA2:
mov rcx, [rbx]
mov dl, [rcx+rax]
cmp dl, 5Ch ; '\'
jnz short loc_72AE1
lea r15, [rax+1]
cmp r15, r13
jnb short loc_72AE1
movzx edx, byte ptr [rcx+r15]
cmp edx, 6Dh ; 'm'
jle short loc_72AED
cmp edx, 73h ; 's'
jg short loc_72B07
cmp edx, 6Eh ; 'n'
jz loc_72B58
cmp edx, 72h ; 'r'
jnz loc_72B8F
mov byte ptr [rcx+r14], 0Dh
jmp loc_72B6B
loc_72AE1:
mov [rcx+r14], dl
inc r14
jmp loc_72BAA
loc_72AED:
cmp edx, 22h ; '"'
jz short loc_72B51
cmp edx, 27h ; '''
jz short loc_72B66
cmp edx, 5Ch ; '\'
jnz loc_72B8F
mov byte ptr [rcx+r14], 5Ch ; '\'
jmp short loc_72B6B
loc_72B07:
cmp edx, 74h ; 't'
jz short loc_72B5F
cmp edx, 78h ; 'x'
jnz short loc_72B8F
lea r12, [rax+3]
cmp r12, r13
jnb short loc_72B8F
mov dl, [rcx+rax+2]
mov [rsp+48h+var_3B], dl
mov al, [rcx+rax+3]
mov [rsp+48h+var_3A], al
mov [rsp+48h+var_39], 0
mov [rsp+48h+var_38], 0
mov edx, 10h
call _strtol
mov rcx, [rsp+48h+var_38]
cmp rcx, rbp
jz short loc_72B70
mov r12, r15
jmp short loc_72B7D
loc_72B51:
mov byte ptr [rcx+r14], 22h ; '"'
jmp short loc_72B6B
loc_72B58:
mov byte ptr [rcx+r14], 0Ah
jmp short loc_72B6B
loc_72B5F:
mov byte ptr [rcx+r14], 9
jmp short loc_72B6B
loc_72B66:
mov byte ptr [rcx+r14], 27h ; '''
loc_72B6B:
inc r14
jmp short loc_72BA7
loc_72B70:
mov rdx, [rbx]
mov [rdx+r14], al
inc r14
mov r15, r12
loc_72B7D:
mov rax, r12
cmp rcx, rbp
lea rdi, [rsp+48h+var_3B]
lea rsi, [rsp+48h+var_38]
jz short loc_72BAA
loc_72B8F:
mov rax, [rbx]
mov byte ptr [rax+r14], 5Ch ; '\'
mov rax, [rbx]
mov cl, [rax+r15]
mov [rax+r14+1], cl
add r14, 2
loc_72BA7:
mov rax, r15
loc_72BAA:
inc rax
cmp rax, r13
jb loc_72AA2
jmp short loc_72BBB
loc_72BB8:
xor r14d, r14d
loc_72BBB:
mov rdi, rbx
mov rsi, r14
xor edx, edx
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6resizeEmc; std::string::resize(ulong,char)
add rsp, 18h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| long long string_process_escapes(long long *a1)
{
unsigned long long v1; // r13
long long v2; // r14
long long v3; // rax
long long v4; // rcx
char v5; // dl
long long v6; // r15
unsigned int v7; // edx
long long v8; // r12
char v9; // al
char *v10; // rcx
_BYTE v12[2]; // [rsp+Dh] [rbp-3Bh] BYREF
char v13; // [rsp+Fh] [rbp-39h] BYREF
char *v14; // [rsp+10h] [rbp-38h] BYREF
v1 = a1[1];
if ( v1 )
{
v2 = 0LL;
v3 = 0LL;
while ( 1 )
{
v4 = *a1;
v5 = *(_BYTE *)(*a1 + v3);
if ( v5 == 92 )
{
v6 = v3 + 1;
if ( v3 + 1 < v1 )
break;
}
*(_BYTE *)(v4 + v2++) = v5;
LABEL_29:
if ( ++v3 >= v1 )
return std::string::resize(a1, v2, 0LL);
}
v7 = *(unsigned __int8 *)(v4 + v6);
if ( v7 <= 0x6D )
{
switch ( v7 )
{
case '"':
*(_BYTE *)(v4 + v2) = 34;
goto LABEL_24;
case '\'':
*(_BYTE *)(v4 + v2) = 39;
goto LABEL_24;
case '\\':
*(_BYTE *)(v4 + v2) = 92;
goto LABEL_24;
}
}
else if ( *(unsigned __int8 *)(v4 + v6) > 0x73u )
{
if ( v7 == 116 )
{
*(_BYTE *)(v4 + v2) = 9;
goto LABEL_24;
}
if ( v7 == 120 )
{
v8 = v3 + 3;
if ( v3 + 3 < v1 )
{
v12[0] = *(_BYTE *)(v4 + v3 + 2);
v12[1] = *(_BYTE *)(v4 + v3 + 3);
v13 = 0;
v14 = 0LL;
v9 = strtol(v12, &v14, 16LL);
v10 = v14;
if ( v14 == &v13 )
{
*(_BYTE *)(*a1 + v2++) = v9;
v6 = v8;
}
else
{
v8 = v6;
}
v3 = v8;
if ( v10 == &v13 )
goto LABEL_29;
}
}
}
else
{
if ( v7 == 110 )
{
*(_BYTE *)(v4 + v2) = 10;
goto LABEL_24;
}
if ( v7 == 114 )
{
*(_BYTE *)(v4 + v2) = 13;
LABEL_24:
++v2;
LABEL_28:
v3 = v6;
goto LABEL_29;
}
}
*(_BYTE *)(*a1 + v2) = 92;
*(_BYTE *)(*a1 + v2 + 1) = *(_BYTE *)(*a1 + v6);
v2 += 2LL;
goto LABEL_28;
}
v2 = 0LL;
return std::string::resize(a1, v2, 0LL);
}
| string_process_escapes:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x18
MOV RBX,RDI
MOV R13,qword ptr [RDI + 0x8]
TEST R13,R13
JZ 0x00172bb8
LEA RBP,[RSP + 0xf]
XOR R14D,R14D
LEA RDI,[RSP + 0xd]
LEA RSI,[RSP + 0x10]
XOR EAX,EAX
LAB_00172aa2:
MOV RCX,qword ptr [RBX]
MOV DL,byte ptr [RCX + RAX*0x1]
CMP DL,0x5c
JNZ 0x00172ae1
LEA R15,[RAX + 0x1]
CMP R15,R13
JNC 0x00172ae1
MOVZX EDX,byte ptr [RCX + R15*0x1]
CMP EDX,0x6d
JLE 0x00172aed
CMP EDX,0x73
JG 0x00172b07
CMP EDX,0x6e
JZ 0x00172b58
CMP EDX,0x72
JNZ 0x00172b8f
MOV byte ptr [RCX + R14*0x1],0xd
JMP 0x00172b6b
LAB_00172ae1:
MOV byte ptr [RCX + R14*0x1],DL
INC R14
JMP 0x00172baa
LAB_00172aed:
CMP EDX,0x22
JZ 0x00172b51
CMP EDX,0x27
JZ 0x00172b66
CMP EDX,0x5c
JNZ 0x00172b8f
MOV byte ptr [RCX + R14*0x1],0x5c
JMP 0x00172b6b
LAB_00172b07:
CMP EDX,0x74
JZ 0x00172b5f
CMP EDX,0x78
JNZ 0x00172b8f
LEA R12,[RAX + 0x3]
CMP R12,R13
JNC 0x00172b8f
MOV DL,byte ptr [RCX + RAX*0x1 + 0x2]
MOV byte ptr [RSP + 0xd],DL
MOV AL,byte ptr [RCX + RAX*0x1 + 0x3]
MOV byte ptr [RSP + 0xe],AL
MOV byte ptr [RSP + 0xf],0x0
MOV qword ptr [RSP + 0x10],0x0
MOV EDX,0x10
CALL 0x0011bc30
MOV RCX,qword ptr [RSP + 0x10]
CMP RCX,RBP
JZ 0x00172b70
MOV R12,R15
JMP 0x00172b7d
LAB_00172b51:
MOV byte ptr [RCX + R14*0x1],0x22
JMP 0x00172b6b
LAB_00172b58:
MOV byte ptr [RCX + R14*0x1],0xa
JMP 0x00172b6b
LAB_00172b5f:
MOV byte ptr [RCX + R14*0x1],0x9
JMP 0x00172b6b
LAB_00172b66:
MOV byte ptr [RCX + R14*0x1],0x27
LAB_00172b6b:
INC R14
JMP 0x00172ba7
LAB_00172b70:
MOV RDX,qword ptr [RBX]
MOV byte ptr [RDX + R14*0x1],AL
INC R14
MOV R15,R12
LAB_00172b7d:
MOV RAX,R12
CMP RCX,RBP
LEA RDI,[RSP + 0xd]
LEA RSI,[RSP + 0x10]
JZ 0x00172baa
LAB_00172b8f:
MOV RAX,qword ptr [RBX]
MOV byte ptr [RAX + R14*0x1],0x5c
MOV RAX,qword ptr [RBX]
MOV CL,byte ptr [RAX + R15*0x1]
MOV byte ptr [RAX + R14*0x1 + 0x1],CL
ADD R14,0x2
LAB_00172ba7:
MOV RAX,R15
LAB_00172baa:
INC RAX
CMP RAX,R13
JC 0x00172aa2
JMP 0x00172bbb
LAB_00172bb8:
XOR R14D,R14D
LAB_00172bbb:
MOV RDI,RBX
MOV RSI,R14
XOR EDX,EDX
CALL 0x0011b250
ADD RSP,0x18
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
/* string_process_escapes(std::__cxx11::string&) */
void string_process_escapes(string *param_1)
{
byte bVar1;
ulong uVar2;
long lVar3;
ulong uVar4;
long lVar6;
char local_3b;
int1 local_3a;
char local_39;
char *local_38;
ulong uVar5;
uVar2 = *(ulong *)(param_1 + 8);
if (uVar2 == 0) {
lVar6 = 0;
}
else {
lVar6 = 0;
uVar4 = 0;
do {
lVar3 = *(long *)param_1;
if ((*(char *)(lVar3 + uVar4) == '\\') && (uVar5 = uVar4 + 1, uVar5 < uVar2)) {
bVar1 = *(byte *)(lVar3 + uVar5);
if (bVar1 < 0x6e) {
if (bVar1 == 0x22) {
*(int1 *)(lVar3 + lVar6) = 0x22;
}
else if (bVar1 == 0x27) {
*(int1 *)(lVar3 + lVar6) = 0x27;
}
else {
if (bVar1 != 0x5c) goto LAB_00172b8f;
*(int1 *)(lVar3 + lVar6) = 0x5c;
}
}
else if (bVar1 < 0x74) {
if (bVar1 == 0x6e) {
*(int1 *)(lVar3 + lVar6) = 10;
}
else {
if (bVar1 != 0x72) goto LAB_00172b8f;
*(int1 *)(lVar3 + lVar6) = 0xd;
}
}
else {
if (bVar1 != 0x74) {
if ((bVar1 == 0x78) && (uVar4 + 3 < uVar2)) {
local_3b = *(char *)(lVar3 + 2 + uVar4);
local_3a = *(int1 *)(lVar3 + 3 + uVar4);
local_39 = '\0';
local_38 = (char *)0x0;
lVar3 = strtol(&local_3b,&local_38,0x10);
if (local_38 == &local_39) {
*(char *)(*(long *)param_1 + lVar6) = (char)lVar3;
lVar6 = lVar6 + 1;
uVar5 = uVar4 + 3;
goto LAB_00172baa;
}
}
LAB_00172b8f:
*(int1 *)(*(long *)param_1 + lVar6) = 0x5c;
*(int1 *)(*(long *)param_1 + 1 + lVar6) =
*(int1 *)(*(long *)param_1 + uVar5);
lVar6 = lVar6 + 2;
goto LAB_00172baa;
}
*(int1 *)(lVar3 + lVar6) = 9;
}
lVar6 = lVar6 + 1;
}
else {
*(char *)(lVar3 + lVar6) = *(char *)(lVar3 + uVar4);
lVar6 = lVar6 + 1;
uVar5 = uVar4;
}
LAB_00172baa:
uVar4 = uVar5 + 1;
} while (uVar4 < uVar2);
}
std::__cxx11::string::resize((ulong)param_1,(char)lVar6);
return;
}
| |
47,873 | madb_get_os_character_set | eloqsql/libmariadb/libmariadb/ma_charset.c | const char *madb_get_os_character_set()
{
unsigned int i= 0;
char *p= NULL;
#ifdef _WIN32
char codepage[FN_REFLEN];
snprintf(codepage, FN_REFLEN, "%u", GetConsoleCP() ? GetConsoleCP() : GetACP());
p= codepage;
#elif defined(HAVE_NL_LANGINFO) && defined(HAVE_SETLOCALE)
if (setlocale(LC_CTYPE, ""))
p= nl_langinfo(CODESET);
#endif
if (!p)
return MADB_DEFAULT_CHARSET_NAME;
while (MADB_OS_CHARSET[i].identifier)
{
if (MADB_OS_CHARSET[i].supported > MADB_CS_UNSUPPORTED &&
strcasecmp(MADB_OS_CHARSET[i].identifier, p) == 0)
return MADB_OS_CHARSET[i].charset;
i++;
}
return MADB_DEFAULT_CHARSET_NAME;
} | O3 | c | madb_get_os_character_set:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
leaq 0x4f2b(%rip), %rsi # 0x37673
xorl %edi, %edi
callq 0x133d0
leaq 0x7233(%rip), %rbx # 0x39989
testq %rax, %rax
je 0x327bb
movl $0xe, %edi
callq 0x13440
movq %rax, %r14
testq %rax, %rax
sete %al
leaq 0x1a9db(%rip), %r15 # 0x4d150
movq (%r15), %rdi
testq %rdi, %rdi
sete %cl
orb %al, %cl
jne 0x327bb
movl $0x1, %r12d
movq %r15, %r13
cmpb $0x0, 0x20(%r13)
je 0x3279e
movq %r14, %rsi
callq 0x134d0
testl %eax, %eax
je 0x327b7
movl %r12d, %eax
leaq (%rax,%rax,4), %rax
leaq (%r15,%rax,8), %r13
movq (%r13), %rdi
incl %r12d
testq %rdi, %rdi
jne 0x3278b
jmp 0x327bb
movq 0x10(%r13), %rbx
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| madb_get_os_character_set:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
push rax
lea rsi, aExecuteTestWit+29h; ""
xor edi, edi
call _setlocale
lea rbx, aLatin1; "latin1"
test rax, rax
jz short loc_327BB
mov edi, 0Eh
call _nl_langinfo
mov r14, rax
test rax, rax
setz al
lea r15, MADB_OS_CHARSET
mov rdi, [r15]
test rdi, rdi
setz cl
or cl, al
jnz short loc_327BB
mov r12d, 1
mov r13, r15
loc_3278B:
cmp byte ptr [r13+20h], 0
jz short loc_3279E
mov rsi, r14
call _strcasecmp
test eax, eax
jz short loc_327B7
loc_3279E:
mov eax, r12d
lea rax, [rax+rax*4]
lea r13, [r15+rax*8]
mov rdi, [r13+0]
inc r12d
test rdi, rdi
jnz short loc_3278B
jmp short loc_327BB
loc_327B7:
mov rbx, [r13+10h]
loc_327BB:
mov rax, rbx
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| const char *madb_get_os_character_set()
{
const char *v0; // rbx
long long v1; // r14
void *v2; // rdi
unsigned int v3; // r12d
_UNKNOWN **v4; // r13
v0 = "latin1";
if ( setlocale(0LL, "") )
{
v1 = nl_langinfo(14LL);
v2 = MADB_OS_CHARSET;
if ( v1 != 0 && MADB_OS_CHARSET != 0LL )
{
v3 = 1;
v4 = &MADB_OS_CHARSET;
while ( !*((_BYTE *)v4 + 32) || (unsigned int)strcasecmp(v2, v1) )
{
v4 = &MADB_OS_CHARSET + 5 * v3;
v2 = *v4;
++v3;
if ( !*v4 )
return v0;
}
return (const char *)v4[2];
}
}
return v0;
}
| madb_get_os_character_set:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
PUSH RAX
LEA RSI,[0x137673]
XOR EDI,EDI
CALL 0x001133d0
LEA RBX,[0x139989]
TEST RAX,RAX
JZ 0x001327bb
MOV EDI,0xe
CALL 0x00113440
MOV R14,RAX
TEST RAX,RAX
SETZ AL
LEA R15,[0x14d150]
MOV RDI,qword ptr [R15]
TEST RDI,RDI
SETZ CL
OR CL,AL
JNZ 0x001327bb
MOV R12D,0x1
MOV R13,R15
LAB_0013278b:
CMP byte ptr [R13 + 0x20],0x0
JZ 0x0013279e
MOV RSI,R14
CALL 0x001134d0
TEST EAX,EAX
JZ 0x001327b7
LAB_0013279e:
MOV EAX,R12D
LEA RAX,[RAX + RAX*0x4]
LEA R13,[R15 + RAX*0x8]
MOV RDI,qword ptr [R13]
INC R12D
TEST RDI,RDI
JNZ 0x0013278b
JMP 0x001327bb
LAB_001327b7:
MOV RBX,qword ptr [R13 + 0x10]
LAB_001327bb:
MOV RAX,RBX
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
char * madb_get_os_character_set(void)
{
int iVar1;
char *pcVar2;
char *__s1;
ulong uVar3;
int **ppuVar4;
pcVar2 = setlocale(0,"");
if ((pcVar2 != (char *)0x0) &&
(pcVar2 = nl_langinfo(0xe), MADB_OS_CHARSET != (int *)0x0 && pcVar2 != (char *)0x0)) {
uVar3 = 1;
ppuVar4 = &MADB_OS_CHARSET;
__s1 = MADB_OS_CHARSET;
do {
if ((*(char *)(ppuVar4 + 4) != '\0') && (iVar1 = strcasecmp(__s1,pcVar2), iVar1 == 0)) {
return ppuVar4[2];
}
ppuVar4 = &MADB_OS_CHARSET + uVar3 * 5;
__s1 = *ppuVar4;
uVar3 = (ulong)((int)uVar3 + 1);
} while (__s1 != (char *)0x0);
}
return "latin1";
}
| |
47,874 | SchemaConverter::resolve_refs(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::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&) | monkey531[P]llama/common/json-schema-to-grammar.cpp | void resolve_refs(json & schema, const std::string & url) {
/*
* Resolves all $ref fields in the given schema, fetching any remote schemas,
* replacing each $ref with absolute reference URL and populates _refs with the
* respective referenced (sub)schema dictionaries.
*/
std::function<void(json &)> visit_refs = [&](json & n) {
if (n.is_array()) {
for (auto & x : n) {
visit_refs(x);
}
} else if (n.is_object()) {
if (n.contains("$ref")) {
std::string ref = n["$ref"];
if (_refs.find(ref) == _refs.end()) {
json target;
if (ref.find("https://") == 0) {
std::string base_url = ref.substr(0, ref.find('#'));
auto it = _refs.find(base_url);
if (it != _refs.end()) {
target = it->second;
} else {
// Fetch the referenced schema and resolve its refs
auto referenced = _fetch_json(ref);
resolve_refs(referenced, base_url);
_refs[base_url] = referenced;
}
if (ref.find('#') == std::string::npos || ref.substr(ref.find('#') + 1).empty()) {
return;
}
} else if (ref.find("#/") == 0) {
target = schema;
n["$ref"] = url + ref;
ref = url + ref;
} else {
_errors.push_back("Unsupported ref: " + ref);
return;
}
std::string pointer = ref.substr(ref.find('#') + 1);
std::vector<std::string> tokens = string_split(pointer, "/");
for (size_t i = 1; i < tokens.size(); ++i) {
std::string sel = tokens[i];
if (target.is_null() || !target.contains(sel)) {
_errors.push_back("Error resolving ref " + ref + ": " + sel + " not in " + target.dump());
return;
}
target = target[sel];
}
_refs[ref] = target;
}
} else {
for (auto & kv : n.items()) {
visit_refs(kv.value());
}
}
}
};
visit_refs(schema);
} | O2 | cpp | SchemaConverter::resolve_refs(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::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&):
pushq %r14
pushq %rbx
subq $0x48, %rsp
movq %rsi, %rbx
leaq 0x8(%rsp), %r14
leaq 0x28(%rsp), %rsi
movq %r14, (%rsi)
movq %rdi, 0x8(%rsi)
movq %rbx, 0x10(%rsi)
movq %rdx, 0x18(%rsi)
movq %r14, %rdi
callq 0xb1a44
movq %r14, %rdi
movq %rbx, %rsi
callq 0xaa3c4
leaq 0x8(%rsp), %rdi
callq 0x45e20
addq $0x48, %rsp
popq %rbx
popq %r14
retq
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x45e20
movq %rbx, %rdi
callq 0x27660
nop
| _ZN15SchemaConverter12resolve_refsERN8nlohmann16json_abi_v3_11_310basic_jsonINS1_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES4_IhSaIhEEvEERKSA_:
push r14
push rbx
sub rsp, 48h
mov rbx, rsi
lea r14, [rsp+58h+var_50]
lea rsi, [rsp+58h+var_30]
mov [rsi], r14
mov [rsi+8], rdi
mov [rsi+10h], rbx
mov [rsi+18h], rdx
mov rdi, r14
call _ZNSt8functionIFvRN8nlohmann16json_abi_v3_11_310basic_jsonINS1_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES4_IhSaIhEEvEEEEC2IZN15SchemaConverter12resolve_refsESF_RKSA_EUlSF_E_vEEOT_; std::function<void ()(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> &)>::function<SchemaConverter::resolve_refs(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> &,std::string const&)::{lambda(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> &)#1},void>(SchemaConverter::resolve_refs(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> &,std::string const&)::{lambda(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> &)#1} &&)
mov rdi, r14
mov rsi, rbx
call _ZNKSt8functionIFvRN8nlohmann16json_abi_v3_11_310basic_jsonINS1_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES4_IhSaIhEEvEEEEclESF_; std::function<void ()(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> &)>::operator()(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> &)
lea rdi, [rsp+58h+var_50]; this
call _ZNSt14_Function_baseD2Ev; std::_Function_base::~_Function_base()
add rsp, 48h
pop rbx
pop r14
retn
mov rbx, rax
lea rdi, [rsp+arg_0]; this
call _ZNSt14_Function_baseD2Ev; std::_Function_base::~_Function_base()
mov rdi, rbx
call __Unwind_Resume
| void SchemaConverter::resolve_refs(long long a1, long long a2, long long a3)
{
_BYTE v3[32]; // [rsp+8h] [rbp-50h] BYREF
_BYTE *v4; // [rsp+28h] [rbp-30h]
long long v5; // [rsp+30h] [rbp-28h]
long long v6; // [rsp+38h] [rbp-20h]
long long v7; // [rsp+40h] [rbp-18h]
v4 = v3;
v5 = a1;
v6 = a2;
v7 = a3;
std::function<void ()(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> &)>::function<SchemaConverter::resolve_refs(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> &,std::string const&)::{lambda(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> &)#1},void>(v3);
std::function<void ()(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> &)>::operator()((long long)v3);
std::_Function_base::~_Function_base((std::_Function_base *)v3);
}
| resolve_refs:
PUSH R14
PUSH RBX
SUB RSP,0x48
MOV RBX,RSI
LEA R14,[RSP + 0x8]
LEA RSI,[RSP + 0x28]
MOV qword ptr [RSI],R14
MOV qword ptr [RSI + 0x8],RDI
MOV qword ptr [RSI + 0x10],RBX
MOV qword ptr [RSI + 0x18],RDX
MOV RDI,R14
CALL 0x001b1a44
LAB_001b1a11:
MOV RDI,R14
MOV RSI,RBX
CALL 0x001aa3c4
LAB_001b1a1c:
LEA RDI,[RSP + 0x8]
CALL 0x00145e20
ADD RSP,0x48
POP RBX
POP R14
RET
|
/* SchemaConverter::resolve_refs(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,
std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void>&, std::__cxx11::string const&) */
void __thiscall
SchemaConverter::resolve_refs(SchemaConverter *this,basic_json *param_1,string *param_2)
{
_lambda_nlohmann__json_abi_v3_11_3__basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>_>,void>___1_
local_50 [32];
_lambda_nlohmann__json_abi_v3_11_3__basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>_>,void>___1_
*local_30;
SchemaConverter *local_28;
basic_json *local_20;
string *local_18;
local_30 = local_50;
local_28 = this;
local_20 = param_1;
local_18 = param_2;
std::
function<void(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>&)>
::
function<SchemaConverter::resolve_refs(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>&,std::__cxx11::string_const&)::_lambda(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>&)_1_,void>
(local_50);
/* try { // try from 001b1a11 to 001b1a1b has its CatchHandler @ 001b1a2e */
std::
function<void(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>&)>
::operator()((function<void(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>&)>
*)local_50,param_1);
std::_Function_base::~_Function_base((_Function_base *)local_50);
return;
}
| |
47,875 | inline_mysql_file_close | eloqsql/include/mysql/psi/mysql_file.h | static inline int
inline_mysql_file_close(
#ifdef HAVE_PSI_FILE_INTERFACE
const char *src_file, uint src_line,
#endif
File file, myf flags)
{
int result;
#ifdef HAVE_PSI_FILE_INTERFACE
struct PSI_file_locker *locker;
PSI_file_locker_state state;
locker= PSI_FILE_CALL(get_thread_file_descriptor_locker)(&state, file, PSI_FILE_CLOSE);
if (psi_likely(locker != NULL))
{
PSI_FILE_CALL(start_file_close_wait)(locker, src_file, src_line);
result= my_close(file, flags);
PSI_FILE_CALL(end_file_close_wait)(locker, result);
return result;
}
#endif
result= my_close(file, flags);
return result;
} | O0 | c | inline_mysql_file_close:
pushq %rbp
movq %rsp, %rbp
subq $0x80, %rsp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movl %edx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
leaq 0x1a4360(%rip), %rax # 0x1d08d0
movq (%rax), %rax
movq 0x158(%rax), %rax
movl -0x18(%rbp), %esi
leaq -0x78(%rbp), %rdi
movl $0x4, %edx
callq *%rax
movq %rax, -0x30(%rbp)
cmpq $0x0, -0x30(%rbp)
setne %al
andb $0x1, %al
movzbl %al, %eax
cmpl $0x0, %eax
setne %al
andb $0x1, %al
movzbl %al, %eax
cltq
cmpq $0x0, %rax
je 0x2c5fb
leaq 0x1a431d(%rip), %rax # 0x1d08d0
movq (%rax), %rax
movq 0x220(%rax), %rax
movq -0x30(%rbp), %rdi
movq -0x10(%rbp), %rsi
movl -0x14(%rbp), %edx
callq *%rax
movl -0x18(%rbp), %edi
movq -0x20(%rbp), %rsi
callq 0x308e0
movl %eax, -0x24(%rbp)
leaq 0x1a42f0(%rip), %rax # 0x1d08d0
movq (%rax), %rax
movq 0x228(%rax), %rax
movq -0x30(%rbp), %rdi
movl -0x24(%rbp), %esi
callq *%rax
movl -0x24(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0x2c610
movl -0x18(%rbp), %edi
movq -0x20(%rbp), %rsi
callq 0x308e0
movl %eax, -0x24(%rbp)
movl -0x24(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x80, %rsp
popq %rbp
retq
nopl (%rax)
| inline_mysql_file_close:
push rbp
mov rbp, rsp
sub rsp, 80h
mov [rbp+var_10], rdi
mov [rbp+var_14], esi
mov [rbp+var_18], edx
mov [rbp+var_20], rcx
lea rax, PSI_server
mov rax, [rax]
mov rax, [rax+158h]
mov esi, [rbp+var_18]
lea rdi, [rbp+var_78]
mov edx, 4
call rax
mov [rbp+var_30], rax
cmp [rbp+var_30], 0
setnz al
and al, 1
movzx eax, al
cmp eax, 0
setnz al
and al, 1
movzx eax, al
cdqe
cmp rax, 0
jz short loc_2C5FB
lea rax, PSI_server
mov rax, [rax]
mov rax, [rax+220h]
mov rdi, [rbp+var_30]
mov rsi, [rbp+var_10]
mov edx, [rbp+var_14]
call rax
mov edi, [rbp+var_18]
mov rsi, [rbp+var_20]
call my_close
mov [rbp+var_24], eax
lea rax, PSI_server
mov rax, [rax]
mov rax, [rax+228h]
mov rdi, [rbp+var_30]
mov esi, [rbp+var_24]
call rax
mov eax, [rbp+var_24]
mov [rbp+var_4], eax
jmp short loc_2C610
loc_2C5FB:
mov edi, [rbp+var_18]
mov rsi, [rbp+var_20]
call my_close
mov [rbp+var_24], eax
mov eax, [rbp+var_24]
mov [rbp+var_4], eax
loc_2C610:
mov eax, [rbp+var_4]
add rsp, 80h
pop rbp
retn
| long long inline_mysql_file_close(long long a1, unsigned int a2, unsigned int a3, long long a4)
{
_BYTE v5[72]; // [rsp+8h] [rbp-78h] BYREF
long long v6; // [rsp+50h] [rbp-30h]
unsigned int v7; // [rsp+5Ch] [rbp-24h]
long long v8; // [rsp+60h] [rbp-20h]
unsigned int v9; // [rsp+68h] [rbp-18h]
unsigned int v10; // [rsp+6Ch] [rbp-14h]
long long v11; // [rsp+70h] [rbp-10h]
v11 = a1;
v10 = a2;
v9 = a3;
v8 = a4;
v6 = (*((long long ( **)(_BYTE *, _QWORD, long long))PSI_server[0] + 43))(v5, a3, 4LL);
if ( v6 )
{
(*((void ( **)(long long, long long, _QWORD))PSI_server[0] + 68))(v6, v11, v10);
v7 = my_close(v9, v8);
(*((void ( **)(long long, _QWORD))PSI_server[0] + 69))(v6, v7);
}
else
{
return (unsigned int)my_close(v9, v8);
}
return v7;
}
| inline_mysql_file_close:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x80
MOV qword ptr [RBP + -0x10],RDI
MOV dword ptr [RBP + -0x14],ESI
MOV dword ptr [RBP + -0x18],EDX
MOV qword ptr [RBP + -0x20],RCX
LEA RAX,[0x2d08d0]
MOV RAX,qword ptr [RAX]
MOV RAX,qword ptr [RAX + 0x158]
MOV ESI,dword ptr [RBP + -0x18]
LEA RDI,[RBP + -0x78]
MOV EDX,0x4
CALL RAX
MOV qword ptr [RBP + -0x30],RAX
CMP qword ptr [RBP + -0x30],0x0
SETNZ AL
AND AL,0x1
MOVZX EAX,AL
CMP EAX,0x0
SETNZ AL
AND AL,0x1
MOVZX EAX,AL
CDQE
CMP RAX,0x0
JZ 0x0012c5fb
LEA RAX,[0x2d08d0]
MOV RAX,qword ptr [RAX]
MOV RAX,qword ptr [RAX + 0x220]
MOV RDI,qword ptr [RBP + -0x30]
MOV RSI,qword ptr [RBP + -0x10]
MOV EDX,dword ptr [RBP + -0x14]
CALL RAX
MOV EDI,dword ptr [RBP + -0x18]
MOV RSI,qword ptr [RBP + -0x20]
CALL 0x001308e0
MOV dword ptr [RBP + -0x24],EAX
LEA RAX,[0x2d08d0]
MOV RAX,qword ptr [RAX]
MOV RAX,qword ptr [RAX + 0x228]
MOV RDI,qword ptr [RBP + -0x30]
MOV ESI,dword ptr [RBP + -0x24]
CALL RAX
MOV EAX,dword ptr [RBP + -0x24]
MOV dword ptr [RBP + -0x4],EAX
JMP 0x0012c610
LAB_0012c5fb:
MOV EDI,dword ptr [RBP + -0x18]
MOV RSI,qword ptr [RBP + -0x20]
CALL 0x001308e0
MOV dword ptr [RBP + -0x24],EAX
MOV EAX,dword ptr [RBP + -0x24]
MOV dword ptr [RBP + -0x4],EAX
LAB_0012c610:
MOV EAX,dword ptr [RBP + -0x4]
ADD RSP,0x80
POP RBP
RET
|
int4
inline_mysql_file_close(int8 param_1,int4 param_2,int4 param_3,int8 param_4)
{
int1 local_80 [72];
long local_38;
int4 local_2c;
int8 local_28;
int4 local_20;
int4 local_1c;
int8 local_18;
int4 local_c;
local_28 = param_4;
local_20 = param_3;
local_1c = param_2;
local_18 = param_1;
local_38 = (**(code **)(PSI_server + 0x158))(local_80,param_3,4);
if (local_38 == 0) {
local_c = my_close(local_20,local_28);
}
else {
(**(code **)(PSI_server + 0x220))(local_38,local_18,local_1c);
local_2c = my_close(local_20,local_28);
(**(code **)(PSI_server + 0x228))(local_38,local_2c);
local_c = local_2c;
}
return local_c;
}
| |
47,876 | init_state_maps | eloqsql/mysys/charset.c | static my_bool init_state_maps(struct charset_info_st *cs)
{
uint i;
uchar *state_map;
uchar *ident_map;
if (!(cs->state_map= state_map= (uchar*) my_once_alloc(256*2, MYF(MY_WME))))
return 1;
cs->ident_map= ident_map= state_map + 256;
/* Fill state_map with states to get a faster parser */
for (i=0; i < 256 ; i++)
{
if (my_isalpha(cs,i))
state_map[i]=(uchar) MY_LEX_IDENT;
else if (my_isdigit(cs,i))
state_map[i]=(uchar) MY_LEX_NUMBER_IDENT;
else if (is_multi_byte_ident(cs, i))
state_map[i]=(uchar) MY_LEX_IDENT;
else if (my_isspace(cs,i))
state_map[i]=(uchar) MY_LEX_SKIP;
else
state_map[i]=(uchar) MY_LEX_CHAR;
}
state_map[(uchar)'_']=state_map[(uchar)'$']=(uchar) MY_LEX_IDENT;
state_map[(uchar)'\'']=(uchar) MY_LEX_STRING;
state_map[(uchar)'.']=(uchar) MY_LEX_REAL_OR_POINT;
state_map[(uchar)'>']=state_map[(uchar)'=']=state_map[(uchar)'!']= (uchar) MY_LEX_CMP_OP;
state_map[(uchar)'<']= (uchar) MY_LEX_LONG_CMP_OP;
state_map[(uchar)'&']=state_map[(uchar)'|']=(uchar) MY_LEX_BOOL;
state_map[(uchar)'#']=(uchar) MY_LEX_COMMENT;
state_map[(uchar)';']=(uchar) MY_LEX_SEMICOLON;
state_map[(uchar)':']=(uchar) MY_LEX_SET_VAR;
state_map[0]=(uchar) MY_LEX_EOL;
state_map[(uchar)'\\']= (uchar) MY_LEX_ESCAPE;
state_map[(uchar)'/']= (uchar) MY_LEX_LONG_COMMENT;
state_map[(uchar)'*']= (uchar) MY_LEX_END_LONG_COMMENT;
state_map[(uchar)'@']= (uchar) MY_LEX_USER_END;
state_map[(uchar) '`']= (uchar) MY_LEX_USER_VARIABLE_DELIMITER;
state_map[(uchar)'"']= (uchar) MY_LEX_STRING_OR_DELIMITER;
state_map[(uchar)'-']= (uchar) MY_LEX_MINUS_OR_COMMENT;
state_map[(uchar)',']= (uchar) MY_LEX_COMMA;
state_map[(uchar)'?']= (uchar) MY_LEX_PLACEHOLDER;
/*
Create a second map to make it faster to find identifiers
*/
for (i=0; i < 256 ; i++)
{
ident_map[i]= (uchar) (state_map[i] == MY_LEX_IDENT ||
state_map[i] == MY_LEX_NUMBER_IDENT);
}
/* Special handling of hex and binary strings */
state_map[(uchar)'x']= state_map[(uchar)'X']= (uchar) MY_LEX_IDENT_OR_HEX;
state_map[(uchar)'b']= state_map[(uchar)'B']= (uchar) MY_LEX_IDENT_OR_BIN;
state_map[(uchar)'n']= state_map[(uchar)'N']= (uchar) MY_LEX_IDENT_OR_NCHAR;
return 0;
} | O0 | c | init_state_maps:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movl $0x200, %edi # imm = 0x200
movl $0x10, %esi
callq 0x27090
movq %rax, -0x20(%rbp)
movq -0x10(%rbp), %rcx
movq %rax, 0x80(%rcx)
cmpq $0x0, %rax
jne 0x2b559
movb $0x1, -0x1(%rbp)
jmp 0x2b786
movq -0x20(%rbp), %rcx
addq $0x100, %rcx # imm = 0x100
movq %rcx, -0x28(%rbp)
movq -0x10(%rbp), %rax
movq %rcx, 0x88(%rax)
movl $0x0, -0x14(%rbp)
cmpl $0x100, -0x14(%rbp) # imm = 0x100
jae 0x2b643
movq -0x10(%rbp), %rax
movq 0x40(%rax), %rax
movl -0x14(%rbp), %ecx
movzbl %cl, %ecx
movzbl 0x1(%rax,%rcx), %eax
andl $0x3, %eax
cmpl $0x0, %eax
je 0x2b5b2
movq -0x20(%rbp), %rax
movl -0x14(%rbp), %ecx
movb $0x2, (%rax,%rcx)
jmp 0x2b633
movq -0x10(%rbp), %rax
movq 0x40(%rax), %rax
movl -0x14(%rbp), %ecx
movzbl %cl, %ecx
movzbl 0x1(%rax,%rcx), %eax
andl $0x4, %eax
cmpl $0x0, %eax
je 0x2b5da
movq -0x20(%rbp), %rax
movl -0x14(%rbp), %ecx
movb $0xe, (%rax,%rcx)
jmp 0x2b631
movq -0x10(%rbp), %rdi
movl -0x14(%rbp), %eax
movzbl %al, %esi
callq 0x2b860
cmpb $0x0, %al
je 0x2b5fa
movq -0x20(%rbp), %rax
movl -0x14(%rbp), %ecx
movb $0x2, (%rax,%rcx)
jmp 0x2b62f
movq -0x10(%rbp), %rax
movq 0x40(%rax), %rax
movl -0x14(%rbp), %ecx
movzbl %cl, %ecx
movzbl 0x1(%rax,%rcx), %eax
andl $0x8, %eax
cmpl $0x0, %eax
je 0x2b622
movq -0x20(%rbp), %rax
movl -0x14(%rbp), %ecx
movb $0x1a, (%rax,%rcx)
jmp 0x2b62d
movq -0x20(%rbp), %rax
movl -0x14(%rbp), %ecx
movb $0x1, (%rax,%rcx)
jmp 0x2b62f
jmp 0x2b631
jmp 0x2b633
jmp 0x2b635
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0x2b57a
movq -0x20(%rbp), %rax
movb $0x2, 0x24(%rax)
movq -0x20(%rbp), %rax
movb $0x2, 0x5f(%rax)
movq -0x20(%rbp), %rax
movb $0xa, 0x27(%rax)
movq -0x20(%rbp), %rax
movb $0x10, 0x2e(%rax)
movq -0x20(%rbp), %rax
movb $0x8, 0x21(%rax)
movq -0x20(%rbp), %rax
movb $0x8, 0x3d(%rax)
movq -0x20(%rbp), %rax
movb $0x8, 0x3e(%rax)
movq -0x20(%rbp), %rax
movb $0x9, 0x3c(%rax)
movq -0x20(%rbp), %rax
movb $0x11, 0x7c(%rax)
movq -0x20(%rbp), %rax
movb $0x11, 0x26(%rax)
movq -0x20(%rbp), %rax
movb $0xb, 0x23(%rax)
movq -0x20(%rbp), %rax
movb $0x16, 0x3b(%rax)
movq -0x20(%rbp), %rax
movb $0x17, 0x3a(%rax)
movq -0x20(%rbp), %rax
movb $0x12, (%rax)
movq -0x20(%rbp), %rax
movb $0x13, 0x5c(%rax)
movq -0x20(%rbp), %rax
movb $0x14, 0x2f(%rax)
movq -0x20(%rbp), %rax
movb $0x15, 0x2a(%rax)
movq -0x20(%rbp), %rax
movb $0x18, 0x40(%rax)
movq -0x20(%rbp), %rax
movb $0x1b, 0x60(%rax)
movq -0x20(%rbp), %rax
movb $0x21, 0x22(%rax)
movq -0x20(%rbp), %rax
movb $0x22, 0x2d(%rax)
movq -0x20(%rbp), %rax
movb $0x24, 0x2c(%rax)
movq -0x20(%rbp), %rax
movb $0x23, 0x3f(%rax)
movl $0x0, -0x14(%rbp)
cmpl $0x100, -0x14(%rbp) # imm = 0x100
jae 0x2b752
movq -0x20(%rbp), %rax
movl -0x14(%rbp), %ecx
movzbl (%rax,%rcx), %ecx
movb $0x1, %al
cmpl $0x2, %ecx
movb %al, -0x29(%rbp)
je 0x2b733
movq -0x20(%rbp), %rax
movl -0x14(%rbp), %ecx
movzbl (%rax,%rcx), %eax
cmpl $0xe, %eax
sete %al
movb %al, -0x29(%rbp)
movb -0x29(%rbp), %al
andb $0x1, %al
movzbl %al, %eax
movb %al, %dl
movq -0x28(%rbp), %rax
movl -0x14(%rbp), %ecx
movb %dl, (%rax,%rcx)
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0x2b701
movq -0x20(%rbp), %rax
movb $0x1e, 0x58(%rax)
movq -0x20(%rbp), %rax
movb $0x1e, 0x78(%rax)
movq -0x20(%rbp), %rax
movb $0x1f, 0x42(%rax)
movq -0x20(%rbp), %rax
movb $0x1f, 0x62(%rax)
movq -0x20(%rbp), %rax
movb $0x20, 0x4e(%rax)
movq -0x20(%rbp), %rax
movb $0x20, 0x6e(%rax)
movb $0x0, -0x1(%rbp)
movb -0x1(%rbp), %al
addq $0x30, %rsp
popq %rbp
retq
nop
| init_state_maps:
push rbp
mov rbp, rsp
sub rsp, 30h
mov [rbp+var_10], rdi
mov edi, 200h
mov esi, 10h
call my_once_alloc
mov [rbp+var_20], rax
mov rcx, [rbp+var_10]
mov [rcx+80h], rax
cmp rax, 0
jnz short loc_2B559
mov [rbp+var_1], 1
jmp loc_2B786
loc_2B559:
mov rcx, [rbp+var_20]
add rcx, 100h
mov [rbp+var_28], rcx
mov rax, [rbp+var_10]
mov [rax+88h], rcx
mov [rbp+var_14], 0
loc_2B57A:
cmp [rbp+var_14], 100h
jnb loc_2B643
mov rax, [rbp+var_10]
mov rax, [rax+40h]
mov ecx, [rbp+var_14]
movzx ecx, cl
movzx eax, byte ptr [rax+rcx+1]
and eax, 3
cmp eax, 0
jz short loc_2B5B2
mov rax, [rbp+var_20]
mov ecx, [rbp+var_14]
mov byte ptr [rax+rcx], 2
jmp loc_2B633
loc_2B5B2:
mov rax, [rbp+var_10]
mov rax, [rax+40h]
mov ecx, [rbp+var_14]
movzx ecx, cl
movzx eax, byte ptr [rax+rcx+1]
and eax, 4
cmp eax, 0
jz short loc_2B5DA
mov rax, [rbp+var_20]
mov ecx, [rbp+var_14]
mov byte ptr [rax+rcx], 0Eh
jmp short loc_2B631
loc_2B5DA:
mov rdi, [rbp+var_10]
mov eax, [rbp+var_14]
movzx esi, al
call is_multi_byte_ident
cmp al, 0
jz short loc_2B5FA
mov rax, [rbp+var_20]
mov ecx, [rbp+var_14]
mov byte ptr [rax+rcx], 2
jmp short loc_2B62F
loc_2B5FA:
mov rax, [rbp+var_10]
mov rax, [rax+40h]
mov ecx, [rbp+var_14]
movzx ecx, cl
movzx eax, byte ptr [rax+rcx+1]
and eax, 8
cmp eax, 0
jz short loc_2B622
mov rax, [rbp+var_20]
mov ecx, [rbp+var_14]
mov byte ptr [rax+rcx], 1Ah
jmp short loc_2B62D
loc_2B622:
mov rax, [rbp+var_20]
mov ecx, [rbp+var_14]
mov byte ptr [rax+rcx], 1
loc_2B62D:
jmp short $+2
loc_2B62F:
jmp short $+2
loc_2B631:
jmp short $+2
loc_2B633:
jmp short $+2
loc_2B635:
mov eax, [rbp+var_14]
add eax, 1
mov [rbp+var_14], eax
jmp loc_2B57A
loc_2B643:
mov rax, [rbp+var_20]
mov byte ptr [rax+24h], 2
mov rax, [rbp+var_20]
mov byte ptr [rax+5Fh], 2
mov rax, [rbp+var_20]
mov byte ptr [rax+27h], 0Ah
mov rax, [rbp+var_20]
mov byte ptr [rax+2Eh], 10h
mov rax, [rbp+var_20]
mov byte ptr [rax+21h], 8
mov rax, [rbp+var_20]
mov byte ptr [rax+3Dh], 8
mov rax, [rbp+var_20]
mov byte ptr [rax+3Eh], 8
mov rax, [rbp+var_20]
mov byte ptr [rax+3Ch], 9
mov rax, [rbp+var_20]
mov byte ptr [rax+7Ch], 11h
mov rax, [rbp+var_20]
mov byte ptr [rax+26h], 11h
mov rax, [rbp+var_20]
mov byte ptr [rax+23h], 0Bh
mov rax, [rbp+var_20]
mov byte ptr [rax+3Bh], 16h
mov rax, [rbp+var_20]
mov byte ptr [rax+3Ah], 17h
mov rax, [rbp+var_20]
mov byte ptr [rax], 12h
mov rax, [rbp+var_20]
mov byte ptr [rax+5Ch], 13h
mov rax, [rbp+var_20]
mov byte ptr [rax+2Fh], 14h
mov rax, [rbp+var_20]
mov byte ptr [rax+2Ah], 15h
mov rax, [rbp+var_20]
mov byte ptr [rax+40h], 18h
mov rax, [rbp+var_20]
mov byte ptr [rax+60h], 1Bh
mov rax, [rbp+var_20]
mov byte ptr [rax+22h], 21h ; '!'
mov rax, [rbp+var_20]
mov byte ptr [rax+2Dh], 22h ; '"'
mov rax, [rbp+var_20]
mov byte ptr [rax+2Ch], 24h ; '$'
mov rax, [rbp+var_20]
mov byte ptr [rax+3Fh], 23h ; '#'
mov [rbp+var_14], 0
loc_2B701:
cmp [rbp+var_14], 100h
jnb short loc_2B752
mov rax, [rbp+var_20]
mov ecx, [rbp+var_14]
movzx ecx, byte ptr [rax+rcx]
mov al, 1
cmp ecx, 2
mov [rbp+var_29], al
jz short loc_2B733
mov rax, [rbp+var_20]
mov ecx, [rbp+var_14]
movzx eax, byte ptr [rax+rcx]
cmp eax, 0Eh
setz al
mov [rbp+var_29], al
loc_2B733:
mov al, [rbp+var_29]
and al, 1
movzx eax, al
mov dl, al
mov rax, [rbp+var_28]
mov ecx, [rbp+var_14]
mov [rax+rcx], dl
mov eax, [rbp+var_14]
add eax, 1
mov [rbp+var_14], eax
jmp short loc_2B701
loc_2B752:
mov rax, [rbp+var_20]
mov byte ptr [rax+58h], 1Eh
mov rax, [rbp+var_20]
mov byte ptr [rax+78h], 1Eh
mov rax, [rbp+var_20]
mov byte ptr [rax+42h], 1Fh
mov rax, [rbp+var_20]
mov byte ptr [rax+62h], 1Fh
mov rax, [rbp+var_20]
mov byte ptr [rax+4Eh], 20h ; ' '
mov rax, [rbp+var_20]
mov byte ptr [rax+6Eh], 20h ; ' '
mov [rbp+var_1], 0
loc_2B786:
mov al, [rbp+var_1]
add rsp, 30h
pop rbp
retn
| char init_state_maps(_QWORD *a1)
{
bool v2; // [rsp+7h] [rbp-29h]
char *v3; // [rsp+10h] [rbp-20h]
unsigned int i; // [rsp+1Ch] [rbp-14h]
unsigned int j; // [rsp+1Ch] [rbp-14h]
v3 = my_once_alloc(512LL, 16);
a1[16] = v3;
if ( !v3 )
return 1;
a1[17] = v3 + 256;
for ( i = 0; i < 0x100; ++i )
{
if ( (*(_BYTE *)(a1[8] + (unsigned __int8)i + 1LL) & 3) != 0 )
{
v3[i] = 2;
}
else if ( (*(_BYTE *)(a1[8] + (unsigned __int8)i + 1LL) & 4) != 0 )
{
v3[i] = 14;
}
else if ( (unsigned __int8)is_multi_byte_ident(a1, (unsigned __int8)i) )
{
v3[i] = 2;
}
else if ( (*(_BYTE *)(a1[8] + (unsigned __int8)i + 1LL) & 8) != 0 )
{
v3[i] = 26;
}
else
{
v3[i] = 1;
}
}
v3[36] = 2;
v3[95] = 2;
v3[39] = 10;
v3[46] = 16;
v3[33] = 8;
v3[61] = 8;
v3[62] = 8;
v3[60] = 9;
v3[124] = 17;
v3[38] = 17;
v3[35] = 11;
v3[59] = 22;
v3[58] = 23;
*v3 = 18;
v3[92] = 19;
v3[47] = 20;
v3[42] = 21;
v3[64] = 24;
v3[96] = 27;
v3[34] = 33;
v3[45] = 34;
v3[44] = 36;
v3[63] = 35;
for ( j = 0; j < 0x100; ++j )
{
v2 = 1;
if ( v3[j] != 2 )
v2 = v3[j] == 14;
v3[j + 256] = v2;
}
v3[88] = 30;
v3[120] = 30;
v3[66] = 31;
v3[98] = 31;
v3[78] = 32;
v3[110] = 32;
return 0;
}
| init_state_maps:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x30
MOV qword ptr [RBP + -0x10],RDI
MOV EDI,0x200
MOV ESI,0x10
CALL 0x00127090
MOV qword ptr [RBP + -0x20],RAX
MOV RCX,qword ptr [RBP + -0x10]
MOV qword ptr [RCX + 0x80],RAX
CMP RAX,0x0
JNZ 0x0012b559
MOV byte ptr [RBP + -0x1],0x1
JMP 0x0012b786
LAB_0012b559:
MOV RCX,qword ptr [RBP + -0x20]
ADD RCX,0x100
MOV qword ptr [RBP + -0x28],RCX
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RAX + 0x88],RCX
MOV dword ptr [RBP + -0x14],0x0
LAB_0012b57a:
CMP dword ptr [RBP + -0x14],0x100
JNC 0x0012b643
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x40]
MOV ECX,dword ptr [RBP + -0x14]
MOVZX ECX,CL
MOVZX EAX,byte ptr [RAX + RCX*0x1 + 0x1]
AND EAX,0x3
CMP EAX,0x0
JZ 0x0012b5b2
MOV RAX,qword ptr [RBP + -0x20]
MOV ECX,dword ptr [RBP + -0x14]
MOV byte ptr [RAX + RCX*0x1],0x2
JMP 0x0012b633
LAB_0012b5b2:
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x40]
MOV ECX,dword ptr [RBP + -0x14]
MOVZX ECX,CL
MOVZX EAX,byte ptr [RAX + RCX*0x1 + 0x1]
AND EAX,0x4
CMP EAX,0x0
JZ 0x0012b5da
MOV RAX,qword ptr [RBP + -0x20]
MOV ECX,dword ptr [RBP + -0x14]
MOV byte ptr [RAX + RCX*0x1],0xe
JMP 0x0012b631
LAB_0012b5da:
MOV RDI,qword ptr [RBP + -0x10]
MOV EAX,dword ptr [RBP + -0x14]
MOVZX ESI,AL
CALL 0x0012b860
CMP AL,0x0
JZ 0x0012b5fa
MOV RAX,qword ptr [RBP + -0x20]
MOV ECX,dword ptr [RBP + -0x14]
MOV byte ptr [RAX + RCX*0x1],0x2
JMP 0x0012b62f
LAB_0012b5fa:
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x40]
MOV ECX,dword ptr [RBP + -0x14]
MOVZX ECX,CL
MOVZX EAX,byte ptr [RAX + RCX*0x1 + 0x1]
AND EAX,0x8
CMP EAX,0x0
JZ 0x0012b622
MOV RAX,qword ptr [RBP + -0x20]
MOV ECX,dword ptr [RBP + -0x14]
MOV byte ptr [RAX + RCX*0x1],0x1a
JMP 0x0012b62d
LAB_0012b622:
MOV RAX,qword ptr [RBP + -0x20]
MOV ECX,dword ptr [RBP + -0x14]
MOV byte ptr [RAX + RCX*0x1],0x1
LAB_0012b62d:
JMP 0x0012b62f
LAB_0012b62f:
JMP 0x0012b631
LAB_0012b631:
JMP 0x0012b633
LAB_0012b633:
JMP 0x0012b635
LAB_0012b635:
MOV EAX,dword ptr [RBP + -0x14]
ADD EAX,0x1
MOV dword ptr [RBP + -0x14],EAX
JMP 0x0012b57a
LAB_0012b643:
MOV RAX,qword ptr [RBP + -0x20]
MOV byte ptr [RAX + 0x24],0x2
MOV RAX,qword ptr [RBP + -0x20]
MOV byte ptr [RAX + 0x5f],0x2
MOV RAX,qword ptr [RBP + -0x20]
MOV byte ptr [RAX + 0x27],0xa
MOV RAX,qword ptr [RBP + -0x20]
MOV byte ptr [RAX + 0x2e],0x10
MOV RAX,qword ptr [RBP + -0x20]
MOV byte ptr [RAX + 0x21],0x8
MOV RAX,qword ptr [RBP + -0x20]
MOV byte ptr [RAX + 0x3d],0x8
MOV RAX,qword ptr [RBP + -0x20]
MOV byte ptr [RAX + 0x3e],0x8
MOV RAX,qword ptr [RBP + -0x20]
MOV byte ptr [RAX + 0x3c],0x9
MOV RAX,qword ptr [RBP + -0x20]
MOV byte ptr [RAX + 0x7c],0x11
MOV RAX,qword ptr [RBP + -0x20]
MOV byte ptr [RAX + 0x26],0x11
MOV RAX,qword ptr [RBP + -0x20]
MOV byte ptr [RAX + 0x23],0xb
MOV RAX,qword ptr [RBP + -0x20]
MOV byte ptr [RAX + 0x3b],0x16
MOV RAX,qword ptr [RBP + -0x20]
MOV byte ptr [RAX + 0x3a],0x17
MOV RAX,qword ptr [RBP + -0x20]
MOV byte ptr [RAX],0x12
MOV RAX,qword ptr [RBP + -0x20]
MOV byte ptr [RAX + 0x5c],0x13
MOV RAX,qword ptr [RBP + -0x20]
MOV byte ptr [RAX + 0x2f],0x14
MOV RAX,qword ptr [RBP + -0x20]
MOV byte ptr [RAX + 0x2a],0x15
MOV RAX,qword ptr [RBP + -0x20]
MOV byte ptr [RAX + 0x40],0x18
MOV RAX,qword ptr [RBP + -0x20]
MOV byte ptr [RAX + 0x60],0x1b
MOV RAX,qword ptr [RBP + -0x20]
MOV byte ptr [RAX + 0x22],0x21
MOV RAX,qword ptr [RBP + -0x20]
MOV byte ptr [RAX + 0x2d],0x22
MOV RAX,qword ptr [RBP + -0x20]
MOV byte ptr [RAX + 0x2c],0x24
MOV RAX,qword ptr [RBP + -0x20]
MOV byte ptr [RAX + 0x3f],0x23
MOV dword ptr [RBP + -0x14],0x0
LAB_0012b701:
CMP dword ptr [RBP + -0x14],0x100
JNC 0x0012b752
MOV RAX,qword ptr [RBP + -0x20]
MOV ECX,dword ptr [RBP + -0x14]
MOVZX ECX,byte ptr [RAX + RCX*0x1]
MOV AL,0x1
CMP ECX,0x2
MOV byte ptr [RBP + -0x29],AL
JZ 0x0012b733
MOV RAX,qword ptr [RBP + -0x20]
MOV ECX,dword ptr [RBP + -0x14]
MOVZX EAX,byte ptr [RAX + RCX*0x1]
CMP EAX,0xe
SETZ AL
MOV byte ptr [RBP + -0x29],AL
LAB_0012b733:
MOV AL,byte ptr [RBP + -0x29]
AND AL,0x1
MOVZX EAX,AL
MOV DL,AL
MOV RAX,qword ptr [RBP + -0x28]
MOV ECX,dword ptr [RBP + -0x14]
MOV byte ptr [RAX + RCX*0x1],DL
MOV EAX,dword ptr [RBP + -0x14]
ADD EAX,0x1
MOV dword ptr [RBP + -0x14],EAX
JMP 0x0012b701
LAB_0012b752:
MOV RAX,qword ptr [RBP + -0x20]
MOV byte ptr [RAX + 0x58],0x1e
MOV RAX,qword ptr [RBP + -0x20]
MOV byte ptr [RAX + 0x78],0x1e
MOV RAX,qword ptr [RBP + -0x20]
MOV byte ptr [RAX + 0x42],0x1f
MOV RAX,qword ptr [RBP + -0x20]
MOV byte ptr [RAX + 0x62],0x1f
MOV RAX,qword ptr [RBP + -0x20]
MOV byte ptr [RAX + 0x4e],0x20
MOV RAX,qword ptr [RBP + -0x20]
MOV byte ptr [RAX + 0x6e],0x20
MOV byte ptr [RBP + -0x1],0x0
LAB_0012b786:
MOV AL,byte ptr [RBP + -0x1]
ADD RSP,0x30
POP RBP
RET
|
int1 init_state_maps(long param_1)
{
char cVar1;
int1 *puVar2;
bool local_31;
uint local_1c;
int1 local_9;
puVar2 = (int1 *)my_once_alloc(0x200,0x10);
*(int1 **)(param_1 + 0x80) = puVar2;
if (puVar2 == (int1 *)0x0) {
local_9 = 1;
}
else {
*(int1 **)(param_1 + 0x88) = puVar2 + 0x100;
for (local_1c = 0; local_1c < 0x100; local_1c = local_1c + 1) {
if ((*(byte *)(*(long *)(param_1 + 0x40) + 1 + (ulong)(local_1c & 0xff)) & 3) == 0) {
if ((*(byte *)(*(long *)(param_1 + 0x40) + 1 + (ulong)(local_1c & 0xff)) & 4) == 0) {
cVar1 = is_multi_byte_ident(param_1,local_1c & 0xff);
if (cVar1 == '\0') {
if ((*(byte *)(*(long *)(param_1 + 0x40) + 1 + (ulong)(local_1c & 0xff)) & 8) == 0) {
puVar2[local_1c] = 1;
}
else {
puVar2[local_1c] = 0x1a;
}
}
else {
puVar2[local_1c] = 2;
}
}
else {
puVar2[local_1c] = 0xe;
}
}
else {
puVar2[local_1c] = 2;
}
}
puVar2[0x24] = 2;
puVar2[0x5f] = 2;
puVar2[0x27] = 10;
puVar2[0x2e] = 0x10;
puVar2[0x21] = 8;
puVar2[0x3d] = 8;
puVar2[0x3e] = 8;
puVar2[0x3c] = 9;
puVar2[0x7c] = 0x11;
puVar2[0x26] = 0x11;
puVar2[0x23] = 0xb;
puVar2[0x3b] = 0x16;
puVar2[0x3a] = 0x17;
*puVar2 = 0x12;
puVar2[0x5c] = 0x13;
puVar2[0x2f] = 0x14;
puVar2[0x2a] = 0x15;
puVar2[0x40] = 0x18;
puVar2[0x60] = 0x1b;
puVar2[0x22] = 0x21;
puVar2[0x2d] = 0x22;
puVar2[0x2c] = 0x24;
puVar2[0x3f] = 0x23;
for (local_1c = 0; local_1c < 0x100; local_1c = local_1c + 1) {
local_31 = true;
if (puVar2[local_1c] != '\x02') {
local_31 = puVar2[local_1c] == '\x0e';
}
(puVar2 + 0x100)[local_1c] = local_31;
}
puVar2[0x58] = 0x1e;
puVar2[0x78] = 0x1e;
puVar2[0x42] = 0x1f;
puVar2[0x62] = 0x1f;
puVar2[0x4e] = 0x20;
puVar2[0x6e] = 0x20;
local_9 = 0;
}
return local_9;
}
| |
47,877 | int OpenSubdiv::v3_6_0::Far::internal::EvalBasisBezierTri<float>(float, float, float*, float*, float*, float*, float*, float*) | NVIDIA-RTX[P]OSD-Lite/opensubdiv/far/patchBasis.cpp | int
EvalBasisBezierTri(REAL s, REAL t,
REAL wP[15], REAL wDs[15], REAL wDt[15],
REAL wDss[15], REAL wDst[15], REAL wDtt[15]) {
if (wP) {
evalBezierTriDerivWeights<REAL>(s, t, 0, 0, wP);
}
if (wDs && wDt) {
evalBezierTriDerivWeights(s, t, 1, 0, wDs);
evalBezierTriDerivWeights(s, t, 0, 1, wDt);
if (wDss && wDst && wDtt) {
evalBezierTriDerivWeights(s, t, 2, 0, wDss);
evalBezierTriDerivWeights(s, t, 1, 1, wDst);
evalBezierTriDerivWeights(s, t, 0, 2, wDtt);
}
}
return 15;
} | O1 | cpp | int OpenSubdiv::v3_6_0::Far::internal::EvalBasisBezierTri<float>(float, float, float*, float*, float*, float*, float*, float*):
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %r9, %rbx
movq %r8, %r14
movq %rcx, %r15
movq %rdx, %r12
movq %rsi, %r13
testq %rdi, %rdi
movss %xmm1, 0xc(%rsp)
movss %xmm0, 0x8(%rsp)
je 0x65003
movq %rdi, %rdx
movss 0x8(%rsp), %xmm0
movss 0xc(%rsp), %xmm1
xorl %edi, %edi
xorl %esi, %esi
callq 0x5cbf2
testq %r13, %r13
sete %al
testq %r12, %r12
sete %cl
orb %al, %cl
jne 0x650b9
movss 0x8(%rsp), %xmm0
movss 0xc(%rsp), %xmm1
movl $0x1, %edi
xorl %esi, %esi
movq %r13, %rdx
callq 0x5cbf2
movss 0x8(%rsp), %xmm0
movss 0xc(%rsp), %xmm1
xorl %edi, %edi
movl $0x1, %esi
movq %r12, %rdx
callq 0x5cbf2
movss 0x8(%rsp), %xmm0
movss 0xc(%rsp), %xmm1
testq %r15, %r15
sete %al
testq %r14, %r14
sete %cl
orb %al, %cl
testq %rbx, %rbx
sete %al
orb %cl, %al
jne 0x650b9
movl $0x2, %edi
xorl %esi, %esi
movq %r15, %rdx
callq 0x5cbf2
movss 0x8(%rsp), %xmm0
movss 0xc(%rsp), %xmm1
movl $0x1, %edi
movl $0x1, %esi
movq %r14, %rdx
callq 0x5cbf2
movss 0x8(%rsp), %xmm0
movss 0xc(%rsp), %xmm1
xorl %edi, %edi
movl $0x2, %esi
movq %rbx, %rdx
callq 0x5cbf2
movl $0xf, %eax
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
| _ZN10OpenSubdiv6v3_6_03Far8internal18EvalBasisBezierTriIfEEiT_S4_PS4_S5_S5_S5_S5_S5_:
push r15
push r14
push r13
push r12
push rbx
sub rsp, 10h
mov rbx, r9
mov r14, r8
mov r15, rcx
mov r12, rdx
mov r13, rsi
test rdi, rdi
movss [rsp+38h+var_2C], xmm1
movss [rsp+38h+var_30], xmm0
jz short loc_65003
mov rdx, rdi
movss xmm0, [rsp+38h+var_30]
movss xmm1, [rsp+38h+var_2C]
xor edi, edi
xor esi, esi
call _ZN10OpenSubdiv6v3_6_03Far8internal12_GLOBAL__N_125evalBezierTriDerivWeightsIfEEvT_S5_iiPS5_; OpenSubdiv::v3_6_0::Far::internal::`anonymous namespace'::evalBezierTriDerivWeights<float>(float,float,int,int,float*)
loc_65003:
test r13, r13
setz al
test r12, r12
setz cl
or cl, al
jnz loc_650B9
movss xmm0, [rsp+38h+var_30]
movss xmm1, [rsp+38h+var_2C]
mov edi, 1
xor esi, esi
mov rdx, r13
call _ZN10OpenSubdiv6v3_6_03Far8internal12_GLOBAL__N_125evalBezierTriDerivWeightsIfEEvT_S5_iiPS5_; OpenSubdiv::v3_6_0::Far::internal::`anonymous namespace'::evalBezierTriDerivWeights<float>(float,float,int,int,float*)
movss xmm0, [rsp+38h+var_30]
movss xmm1, [rsp+38h+var_2C]
xor edi, edi
mov esi, 1
mov rdx, r12
call _ZN10OpenSubdiv6v3_6_03Far8internal12_GLOBAL__N_125evalBezierTriDerivWeightsIfEEvT_S5_iiPS5_; OpenSubdiv::v3_6_0::Far::internal::`anonymous namespace'::evalBezierTriDerivWeights<float>(float,float,int,int,float*)
movss xmm0, [rsp+38h+var_30]
movss xmm1, [rsp+38h+var_2C]
test r15, r15
setz al
test r14, r14
setz cl
or cl, al
test rbx, rbx
setz al
or al, cl
jnz short loc_650B9
mov edi, 2
xor esi, esi
mov rdx, r15
call _ZN10OpenSubdiv6v3_6_03Far8internal12_GLOBAL__N_125evalBezierTriDerivWeightsIfEEvT_S5_iiPS5_; OpenSubdiv::v3_6_0::Far::internal::`anonymous namespace'::evalBezierTriDerivWeights<float>(float,float,int,int,float*)
movss xmm0, [rsp+38h+var_30]
movss xmm1, [rsp+38h+var_2C]
mov edi, 1
mov esi, 1
mov rdx, r14
call _ZN10OpenSubdiv6v3_6_03Far8internal12_GLOBAL__N_125evalBezierTriDerivWeightsIfEEvT_S5_iiPS5_; OpenSubdiv::v3_6_0::Far::internal::`anonymous namespace'::evalBezierTriDerivWeights<float>(float,float,int,int,float*)
movss xmm0, [rsp+38h+var_30]
movss xmm1, [rsp+38h+var_2C]
xor edi, edi
mov esi, 2
mov rdx, rbx
call _ZN10OpenSubdiv6v3_6_03Far8internal12_GLOBAL__N_125evalBezierTriDerivWeightsIfEEvT_S5_iiPS5_; OpenSubdiv::v3_6_0::Far::internal::`anonymous namespace'::evalBezierTriDerivWeights<float>(float,float,int,int,float*)
loc_650B9:
mov eax, 0Fh
add rsp, 10h
pop rbx
pop r12
pop r13
pop r14
pop r15
retn
| long long OpenSubdiv::v3_6_0::Far::internal::EvalBasisBezierTri<float>(
long long a1,
long long a2,
long long a3,
long long a4,
long long a5,
long long a6,
float a7,
float a8)
{
if ( a1 )
OpenSubdiv::v3_6_0::Far::internal::`anonymous namespace'::evalBezierTriDerivWeights<float>(0, 0, a1, a7, a8);
if ( a2 != 0 && a3 != 0 )
{
OpenSubdiv::v3_6_0::Far::internal::`anonymous namespace'::evalBezierTriDerivWeights<float>(1, 0, a2, a7, a8);
OpenSubdiv::v3_6_0::Far::internal::`anonymous namespace'::evalBezierTriDerivWeights<float>(0, 1, a3, a7, a8);
if ( a4 != 0 && a5 != 0 && a6 != 0 )
{
OpenSubdiv::v3_6_0::Far::internal::`anonymous namespace'::evalBezierTriDerivWeights<float>(2, 0, a4, a7, a8);
OpenSubdiv::v3_6_0::Far::internal::`anonymous namespace'::evalBezierTriDerivWeights<float>(1, 1, a5, a7, a8);
OpenSubdiv::v3_6_0::Far::internal::`anonymous namespace'::evalBezierTriDerivWeights<float>(0, 2, a6, a7, a8);
}
}
return 15LL;
}
| EvalBasisBezierTri<float>:
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x10
MOV RBX,R9
MOV R14,R8
MOV R15,RCX
MOV R12,RDX
MOV R13,RSI
TEST RDI,RDI
MOVSS dword ptr [RSP + 0xc],XMM1
MOVSS dword ptr [RSP + 0x8],XMM0
JZ 0x00165003
MOV RDX,RDI
MOVSS XMM0,dword ptr [RSP + 0x8]
MOVSS XMM1,dword ptr [RSP + 0xc]
XOR EDI,EDI
XOR ESI,ESI
CALL 0x0015cbf2
LAB_00165003:
TEST R13,R13
SETZ AL
TEST R12,R12
SETZ CL
OR CL,AL
JNZ 0x001650b9
MOVSS XMM0,dword ptr [RSP + 0x8]
MOVSS XMM1,dword ptr [RSP + 0xc]
MOV EDI,0x1
XOR ESI,ESI
MOV RDX,R13
CALL 0x0015cbf2
MOVSS XMM0,dword ptr [RSP + 0x8]
MOVSS XMM1,dword ptr [RSP + 0xc]
XOR EDI,EDI
MOV ESI,0x1
MOV RDX,R12
CALL 0x0015cbf2
MOVSS XMM0,dword ptr [RSP + 0x8]
MOVSS XMM1,dword ptr [RSP + 0xc]
TEST R15,R15
SETZ AL
TEST R14,R14
SETZ CL
OR CL,AL
TEST RBX,RBX
SETZ AL
OR AL,CL
JNZ 0x001650b9
MOV EDI,0x2
XOR ESI,ESI
MOV RDX,R15
CALL 0x0015cbf2
MOVSS XMM0,dword ptr [RSP + 0x8]
MOVSS XMM1,dword ptr [RSP + 0xc]
MOV EDI,0x1
MOV ESI,0x1
MOV RDX,R14
CALL 0x0015cbf2
MOVSS XMM0,dword ptr [RSP + 0x8]
MOVSS XMM1,dword ptr [RSP + 0xc]
XOR EDI,EDI
MOV ESI,0x2
MOV RDX,RBX
CALL 0x0015cbf2
LAB_001650b9:
MOV EAX,0xf
ADD RSP,0x10
POP RBX
POP R12
POP R13
POP R14
POP R15
RET
|
/* int OpenSubdiv::v3_6_0::Far::internal::EvalBasisBezierTri<float>(float, float, float*, float*,
float*, float*, float*, float*) */
int OpenSubdiv::v3_6_0::Far::internal::EvalBasisBezierTri<float>
(float param_1,float param_2,float *param_3,float *param_4,float *param_5,
float *param_6,float *param_7,float *param_8)
{
if (param_3 != (float *)0x0) {
(anonymous_namespace)::evalBezierTriDerivWeights<float>(param_1,param_2,0,0,param_3);
}
if (param_5 != (float *)0x0 && param_4 != (float *)0x0) {
(anonymous_namespace)::evalBezierTriDerivWeights<float>(param_1,param_2,1,0,param_4);
(anonymous_namespace)::evalBezierTriDerivWeights<float>(param_1,param_2,0,1,param_5);
if (param_8 != (float *)0x0 && (param_7 != (float *)0x0 && param_6 != (float *)0x0)) {
(anonymous_namespace)::evalBezierTriDerivWeights<float>(param_1,param_2,2,0,param_6);
(anonymous_namespace)::evalBezierTriDerivWeights<float>(param_1,param_2,1,1,param_7);
(anonymous_namespace)::evalBezierTriDerivWeights<float>(param_1,param_2,0,2,param_8);
}
}
return 0xf;
}
| |
47,878 | int OpenSubdiv::v3_6_0::Far::internal::EvalBasisBezierTri<float>(float, float, float*, float*, float*, float*, float*, float*) | NVIDIA-RTX[P]OSD-Lite/opensubdiv/far/patchBasis.cpp | int
EvalBasisBezierTri(REAL s, REAL t,
REAL wP[15], REAL wDs[15], REAL wDt[15],
REAL wDss[15], REAL wDst[15], REAL wDtt[15]) {
if (wP) {
evalBezierTriDerivWeights<REAL>(s, t, 0, 0, wP);
}
if (wDs && wDt) {
evalBezierTriDerivWeights(s, t, 1, 0, wDs);
evalBezierTriDerivWeights(s, t, 0, 1, wDt);
if (wDss && wDst && wDtt) {
evalBezierTriDerivWeights(s, t, 2, 0, wDss);
evalBezierTriDerivWeights(s, t, 1, 1, wDst);
evalBezierTriDerivWeights(s, t, 0, 2, wDtt);
}
}
return 15;
} | O2 | cpp | int OpenSubdiv::v3_6_0::Far::internal::EvalBasisBezierTri<float>(float, float, float*, float*, float*, float*, float*, float*):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %r9, %rbx
movq %r8, %r14
movq %rcx, %r15
movq %rdx, %r12
movq %rsi, %r13
testq %rdi, %rdi
movss %xmm1, 0x4(%rsp)
movss %xmm0, (%rsp)
je 0x78118
movq %rdi, %rdx
movss (%rsp), %xmm0
movss 0x4(%rsp), %xmm1
xorl %edi, %edi
xorl %esi, %esi
callq 0x71a79
testq %r13, %r13
sete %al
testq %r12, %r12
sete %cl
orb %al, %cl
jne 0x781be
pushq $0x1
popq %rbp
movss (%rsp), %xmm0
movss 0x4(%rsp), %xmm1
movl %ebp, %edi
xorl %esi, %esi
movq %r13, %rdx
callq 0x71a79
movss (%rsp), %xmm0
movss 0x4(%rsp), %xmm1
xorl %edi, %edi
movl %ebp, %esi
movq %r12, %rdx
callq 0x71a79
movss (%rsp), %xmm0
movss 0x4(%rsp), %xmm1
testq %r15, %r15
sete %al
testq %r14, %r14
sete %cl
orb %al, %cl
testq %rbx, %rbx
sete %al
orb %cl, %al
jne 0x781be
pushq $0x2
popq %rbp
movl %ebp, %edi
xorl %esi, %esi
movq %r15, %rdx
callq 0x71a79
pushq $0x1
popq %rdi
movss (%rsp), %xmm0
movss 0x4(%rsp), %xmm1
movl %edi, %esi
movq %r14, %rdx
callq 0x71a79
movss (%rsp), %xmm0
movss 0x4(%rsp), %xmm1
xorl %edi, %edi
movl %ebp, %esi
movq %rbx, %rdx
callq 0x71a79
pushq $0xf
popq %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| _ZN10OpenSubdiv6v3_6_03Far8internal18EvalBasisBezierTriIfEEiT_S4_PS4_S5_S5_S5_S5_S5_:
push rbp
push r15
push r14
push r13
push r12
push rbx
push rax
mov rbx, r9
mov r14, r8
mov r15, rcx
mov r12, rdx
mov r13, rsi
test rdi, rdi
movss [rsp+38h+var_34], xmm1
movss [rsp+38h+var_38], xmm0
jz short loc_78118
mov rdx, rdi
movss xmm0, [rsp+38h+var_38]
movss xmm1, [rsp+38h+var_34]
xor edi, edi
xor esi, esi
call _ZN10OpenSubdiv6v3_6_03Far8internal12_GLOBAL__N_125evalBezierTriDerivWeightsIfEEvT_S5_iiPS5_; OpenSubdiv::v3_6_0::Far::internal::`anonymous namespace'::evalBezierTriDerivWeights<float>(float,float,int,int,float*)
loc_78118:
test r13, r13
setz al
test r12, r12
setz cl
or cl, al
jnz loc_781BE
push 1
pop rbp
movss xmm0, [rsp+38h+var_38]
movss xmm1, [rsp+38h+var_34]
mov edi, ebp
xor esi, esi
mov rdx, r13
call _ZN10OpenSubdiv6v3_6_03Far8internal12_GLOBAL__N_125evalBezierTriDerivWeightsIfEEvT_S5_iiPS5_; OpenSubdiv::v3_6_0::Far::internal::`anonymous namespace'::evalBezierTriDerivWeights<float>(float,float,int,int,float*)
movss xmm0, [rsp+38h+var_38]
movss xmm1, [rsp+38h+var_34]
xor edi, edi
mov esi, ebp
mov rdx, r12
call _ZN10OpenSubdiv6v3_6_03Far8internal12_GLOBAL__N_125evalBezierTriDerivWeightsIfEEvT_S5_iiPS5_; OpenSubdiv::v3_6_0::Far::internal::`anonymous namespace'::evalBezierTriDerivWeights<float>(float,float,int,int,float*)
movss xmm0, [rsp+38h+var_38]
movss xmm1, [rsp+38h+var_34]
test r15, r15
setz al
test r14, r14
setz cl
or cl, al
test rbx, rbx
setz al
or al, cl
jnz short loc_781BE
push 2
pop rbp
mov edi, ebp
xor esi, esi
mov rdx, r15
call _ZN10OpenSubdiv6v3_6_03Far8internal12_GLOBAL__N_125evalBezierTriDerivWeightsIfEEvT_S5_iiPS5_; OpenSubdiv::v3_6_0::Far::internal::`anonymous namespace'::evalBezierTriDerivWeights<float>(float,float,int,int,float*)
push 1
pop rdi
movss xmm0, [rsp+38h+var_38]
movss xmm1, [rsp+38h+var_34]
mov esi, edi
mov rdx, r14
call _ZN10OpenSubdiv6v3_6_03Far8internal12_GLOBAL__N_125evalBezierTriDerivWeightsIfEEvT_S5_iiPS5_; OpenSubdiv::v3_6_0::Far::internal::`anonymous namespace'::evalBezierTriDerivWeights<float>(float,float,int,int,float*)
movss xmm0, [rsp+38h+var_38]
movss xmm1, [rsp+38h+var_34]
xor edi, edi
mov esi, ebp
mov rdx, rbx
call _ZN10OpenSubdiv6v3_6_03Far8internal12_GLOBAL__N_125evalBezierTriDerivWeightsIfEEvT_S5_iiPS5_; OpenSubdiv::v3_6_0::Far::internal::`anonymous namespace'::evalBezierTriDerivWeights<float>(float,float,int,int,float*)
loc_781BE:
push 0Fh
pop rax
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| long long OpenSubdiv::v3_6_0::Far::internal::EvalBasisBezierTri<float>(
long long a1,
long long a2,
long long a3,
long long a4,
long long a5,
long long a6,
float a7,
float a8)
{
if ( a1 )
OpenSubdiv::v3_6_0::Far::internal::`anonymous namespace'::evalBezierTriDerivWeights<float>(
0,
0,
a1,
(__m128)LODWORD(a7),
(__m128)LODWORD(a8));
if ( a2 != 0 && a3 != 0 )
{
OpenSubdiv::v3_6_0::Far::internal::`anonymous namespace'::evalBezierTriDerivWeights<float>(
1,
0,
a2,
(__m128)LODWORD(a7),
(__m128)LODWORD(a8));
OpenSubdiv::v3_6_0::Far::internal::`anonymous namespace'::evalBezierTriDerivWeights<float>(
0,
1,
a3,
(__m128)LODWORD(a7),
(__m128)LODWORD(a8));
if ( a4 != 0 && a5 != 0 && a6 != 0 )
{
OpenSubdiv::v3_6_0::Far::internal::`anonymous namespace'::evalBezierTriDerivWeights<float>(
2,
0,
a4,
(__m128)LODWORD(a7),
(__m128)LODWORD(a8));
OpenSubdiv::v3_6_0::Far::internal::`anonymous namespace'::evalBezierTriDerivWeights<float>(
1,
1,
a5,
(__m128)LODWORD(a7),
(__m128)LODWORD(a8));
OpenSubdiv::v3_6_0::Far::internal::`anonymous namespace'::evalBezierTriDerivWeights<float>(
0,
2,
a6,
(__m128)LODWORD(a7),
(__m128)LODWORD(a8));
}
}
return 15LL;
}
| EvalBasisBezierTri<float>:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
PUSH RAX
MOV RBX,R9
MOV R14,R8
MOV R15,RCX
MOV R12,RDX
MOV R13,RSI
TEST RDI,RDI
MOVSS dword ptr [RSP + 0x4],XMM1
MOVSS dword ptr [RSP],XMM0
JZ 0x00178118
MOV RDX,RDI
MOVSS XMM0,dword ptr [RSP]
MOVSS XMM1,dword ptr [RSP + 0x4]
XOR EDI,EDI
XOR ESI,ESI
CALL 0x00171a79
LAB_00178118:
TEST R13,R13
SETZ AL
TEST R12,R12
SETZ CL
OR CL,AL
JNZ 0x001781be
PUSH 0x1
POP RBP
MOVSS XMM0,dword ptr [RSP]
MOVSS XMM1,dword ptr [RSP + 0x4]
MOV EDI,EBP
XOR ESI,ESI
MOV RDX,R13
CALL 0x00171a79
MOVSS XMM0,dword ptr [RSP]
MOVSS XMM1,dword ptr [RSP + 0x4]
XOR EDI,EDI
MOV ESI,EBP
MOV RDX,R12
CALL 0x00171a79
MOVSS XMM0,dword ptr [RSP]
MOVSS XMM1,dword ptr [RSP + 0x4]
TEST R15,R15
SETZ AL
TEST R14,R14
SETZ CL
OR CL,AL
TEST RBX,RBX
SETZ AL
OR AL,CL
JNZ 0x001781be
PUSH 0x2
POP RBP
MOV EDI,EBP
XOR ESI,ESI
MOV RDX,R15
CALL 0x00171a79
PUSH 0x1
POP RDI
MOVSS XMM0,dword ptr [RSP]
MOVSS XMM1,dword ptr [RSP + 0x4]
MOV ESI,EDI
MOV RDX,R14
CALL 0x00171a79
MOVSS XMM0,dword ptr [RSP]
MOVSS XMM1,dword ptr [RSP + 0x4]
XOR EDI,EDI
MOV ESI,EBP
MOV RDX,RBX
CALL 0x00171a79
LAB_001781be:
PUSH 0xf
POP RAX
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
/* int OpenSubdiv::v3_6_0::Far::internal::EvalBasisBezierTri<float>(float, float, float*, float*,
float*, float*, float*, float*) */
int OpenSubdiv::v3_6_0::Far::internal::EvalBasisBezierTri<float>
(float param_1,float param_2,float *param_3,float *param_4,float *param_5,
float *param_6,float *param_7,float *param_8)
{
if (param_3 != (float *)0x0) {
(anonymous_namespace)::evalBezierTriDerivWeights<float>(param_1,param_2,0,0,param_3);
}
if (param_5 != (float *)0x0 && param_4 != (float *)0x0) {
(anonymous_namespace)::evalBezierTriDerivWeights<float>(param_1,param_2,1,0,param_4);
(anonymous_namespace)::evalBezierTriDerivWeights<float>(param_1,param_2,0,1,param_5);
if (param_8 != (float *)0x0 && (param_7 != (float *)0x0 && param_6 != (float *)0x0)) {
(anonymous_namespace)::evalBezierTriDerivWeights<float>(param_1,param_2,2,0,param_6);
(anonymous_namespace)::evalBezierTriDerivWeights<float>(param_1,param_2,1,1,param_7);
(anonymous_namespace)::evalBezierTriDerivWeights<float>(param_1,param_2,0,2,param_8);
}
}
return 0xf;
}
| |
47,879 | int OpenSubdiv::v3_6_0::Far::internal::EvalBasisBezierTri<float>(float, float, float*, float*, float*, float*, float*, float*) | NVIDIA-RTX[P]OSD-Lite/opensubdiv/far/patchBasis.cpp | int
EvalBasisBezierTri(REAL s, REAL t,
REAL wP[15], REAL wDs[15], REAL wDt[15],
REAL wDss[15], REAL wDst[15], REAL wDtt[15]) {
if (wP) {
evalBezierTriDerivWeights<REAL>(s, t, 0, 0, wP);
}
if (wDs && wDt) {
evalBezierTriDerivWeights(s, t, 1, 0, wDs);
evalBezierTriDerivWeights(s, t, 0, 1, wDt);
if (wDss && wDst && wDtt) {
evalBezierTriDerivWeights(s, t, 2, 0, wDss);
evalBezierTriDerivWeights(s, t, 1, 1, wDst);
evalBezierTriDerivWeights(s, t, 0, 2, wDtt);
}
}
return 15;
} | O3 | cpp | int OpenSubdiv::v3_6_0::Far::internal::EvalBasisBezierTri<float>(float, float, float*, float*, float*, float*, float*, float*):
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %r9, %rbx
movq %r8, %r14
movq %rcx, %r15
movq %rdx, %r12
movq %rsi, %r13
testq %rdi, %rdi
movsd %xmm1, 0x8(%rsp)
movsd %xmm0, (%rsp)
je 0x6685c
movq %rdi, %rdx
movsd (%rsp), %xmm0
movsd 0x8(%rsp), %xmm1
xorl %edi, %edi
xorl %esi, %esi
callq 0x5faf2
testq %r13, %r13
sete %al
testq %r12, %r12
sete %cl
orb %al, %cl
jne 0x6690d
movsd (%rsp), %xmm0
movsd 0x8(%rsp), %xmm1
movl $0x1, %edi
xorl %esi, %esi
movq %r13, %rdx
callq 0x5faf2
movsd (%rsp), %xmm0
movsd 0x8(%rsp), %xmm1
xorl %edi, %edi
movl $0x1, %esi
movq %r12, %rdx
callq 0x5faf2
movsd (%rsp), %xmm0
movsd 0x8(%rsp), %xmm1
testq %r15, %r15
sete %al
testq %r14, %r14
sete %cl
orb %al, %cl
testq %rbx, %rbx
sete %al
orb %cl, %al
jne 0x6690d
movl $0x2, %edi
xorl %esi, %esi
movq %r15, %rdx
callq 0x5faf2
movsd (%rsp), %xmm0
movsd 0x8(%rsp), %xmm1
movl $0x1, %edi
movl $0x1, %esi
movq %r14, %rdx
callq 0x5faf2
movsd (%rsp), %xmm0
movsd 0x8(%rsp), %xmm1
xorl %edi, %edi
movl $0x2, %esi
movq %rbx, %rdx
callq 0x5faf2
movl $0xf, %eax
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
| _ZN10OpenSubdiv6v3_6_03Far8internal18EvalBasisBezierTriIdEEiT_S4_PS4_S5_S5_S5_S5_S5_:
push r15
push r14
push r13
push r12
push rbx
sub rsp, 10h
mov rbx, r9
mov r14, r8
mov r15, rcx
mov r12, rdx
mov r13, rsi
test rdi, rdi
movsd [rsp+38h+var_30], xmm1
movsd [rsp+38h+var_38], xmm0
jz short loc_6685C
mov rdx, rdi
movsd xmm0, [rsp+38h+var_38]
movsd xmm1, [rsp+38h+var_30]
xor edi, edi
xor esi, esi
call _ZN10OpenSubdiv6v3_6_03Far8internal12_GLOBAL__N_125evalBezierTriDerivWeightsIdEEvT_S5_iiPS5_; OpenSubdiv::v3_6_0::Far::internal::`anonymous namespace'::evalBezierTriDerivWeights<double>(double,double,int,int,double*)
loc_6685C:
test r13, r13
setz al
test r12, r12
setz cl
or cl, al
jnz loc_6690D
movsd xmm0, [rsp+38h+var_38]
movsd xmm1, [rsp+38h+var_30]
mov edi, 1
xor esi, esi
mov rdx, r13
call _ZN10OpenSubdiv6v3_6_03Far8internal12_GLOBAL__N_125evalBezierTriDerivWeightsIdEEvT_S5_iiPS5_; OpenSubdiv::v3_6_0::Far::internal::`anonymous namespace'::evalBezierTriDerivWeights<double>(double,double,int,int,double*)
movsd xmm0, [rsp+38h+var_38]
movsd xmm1, [rsp+38h+var_30]
xor edi, edi
mov esi, 1
mov rdx, r12
call _ZN10OpenSubdiv6v3_6_03Far8internal12_GLOBAL__N_125evalBezierTriDerivWeightsIdEEvT_S5_iiPS5_; OpenSubdiv::v3_6_0::Far::internal::`anonymous namespace'::evalBezierTriDerivWeights<double>(double,double,int,int,double*)
movsd xmm0, [rsp+38h+var_38]
movsd xmm1, [rsp+38h+var_30]
test r15, r15
setz al
test r14, r14
setz cl
or cl, al
test rbx, rbx
setz al
or al, cl
jnz short loc_6690D
mov edi, 2
xor esi, esi
mov rdx, r15
call _ZN10OpenSubdiv6v3_6_03Far8internal12_GLOBAL__N_125evalBezierTriDerivWeightsIdEEvT_S5_iiPS5_; OpenSubdiv::v3_6_0::Far::internal::`anonymous namespace'::evalBezierTriDerivWeights<double>(double,double,int,int,double*)
movsd xmm0, [rsp+38h+var_38]
movsd xmm1, [rsp+38h+var_30]
mov edi, 1
mov esi, 1
mov rdx, r14
call _ZN10OpenSubdiv6v3_6_03Far8internal12_GLOBAL__N_125evalBezierTriDerivWeightsIdEEvT_S5_iiPS5_; OpenSubdiv::v3_6_0::Far::internal::`anonymous namespace'::evalBezierTriDerivWeights<double>(double,double,int,int,double*)
movsd xmm0, [rsp+38h+var_38]
movsd xmm1, [rsp+38h+var_30]
xor edi, edi
mov esi, 2
mov rdx, rbx
call _ZN10OpenSubdiv6v3_6_03Far8internal12_GLOBAL__N_125evalBezierTriDerivWeightsIdEEvT_S5_iiPS5_; OpenSubdiv::v3_6_0::Far::internal::`anonymous namespace'::evalBezierTriDerivWeights<double>(double,double,int,int,double*)
loc_6690D:
mov eax, 0Fh
add rsp, 10h
pop rbx
pop r12
pop r13
pop r14
pop r15
retn
| long long OpenSubdiv::v3_6_0::Far::internal::EvalBasisBezierTri<double>(
long long a1,
long long a2,
long long a3,
long long a4,
long long a5,
long long a6,
double a7,
double a8,
double a9,
double a10,
double a11,
double a12,
__m128d a13)
{
double v17; // xmm4_8
double v18; // xmm5_8
double v19; // xmm4_8
double v20; // xmm5_8
double v21; // xmm4_8
double v22; // xmm5_8
double v23; // xmm4_8
double v24; // xmm5_8
if ( a1 )
OpenSubdiv::v3_6_0::Far::internal::`anonymous namespace'::evalBezierTriDerivWeights<double>(
0,
0,
a1,
(__m128d)*(unsigned long long *)&a7,
(__m128d)*(unsigned long long *)&a8,
a9,
a10,
a11,
a12,
a13);
if ( a2 != 0 && a3 != 0 )
{
OpenSubdiv::v3_6_0::Far::internal::`anonymous namespace'::evalBezierTriDerivWeights<double>(
1,
0,
a2,
(__m128d)*(unsigned long long *)&a7,
(__m128d)*(unsigned long long *)&a8,
a9,
a10,
a11,
a12,
a13);
OpenSubdiv::v3_6_0::Far::internal::`anonymous namespace'::evalBezierTriDerivWeights<double>(
0,
1,
a3,
(__m128d)*(unsigned long long *)&a7,
(__m128d)*(unsigned long long *)&a8,
a9,
a10,
v17,
v18,
a13);
if ( a4 != 0 && a5 != 0 && a6 != 0 )
{
OpenSubdiv::v3_6_0::Far::internal::`anonymous namespace'::evalBezierTriDerivWeights<double>(
2,
0,
a4,
(__m128d)*(unsigned long long *)&a7,
(__m128d)*(unsigned long long *)&a8,
a9,
a10,
v19,
v20,
a13);
OpenSubdiv::v3_6_0::Far::internal::`anonymous namespace'::evalBezierTriDerivWeights<double>(
1,
1,
a5,
(__m128d)*(unsigned long long *)&a7,
(__m128d)*(unsigned long long *)&a8,
a9,
a10,
v21,
v22,
a13);
OpenSubdiv::v3_6_0::Far::internal::`anonymous namespace'::evalBezierTriDerivWeights<double>(
0,
2,
a6,
(__m128d)*(unsigned long long *)&a7,
(__m128d)*(unsigned long long *)&a8,
a9,
a10,
v23,
v24,
a13);
}
}
return 15LL;
}
| EvalBasisBezierTri<double>:
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x10
MOV RBX,R9
MOV R14,R8
MOV R15,RCX
MOV R12,RDX
MOV R13,RSI
TEST RDI,RDI
MOVSD qword ptr [RSP + 0x8],XMM1
MOVSD qword ptr [RSP],XMM0
JZ 0x0016685c
MOV RDX,RDI
MOVSD XMM0,qword ptr [RSP]
MOVSD XMM1,qword ptr [RSP + 0x8]
XOR EDI,EDI
XOR ESI,ESI
CALL 0x0015faf2
LAB_0016685c:
TEST R13,R13
SETZ AL
TEST R12,R12
SETZ CL
OR CL,AL
JNZ 0x0016690d
MOVSD XMM0,qword ptr [RSP]
MOVSD XMM1,qword ptr [RSP + 0x8]
MOV EDI,0x1
XOR ESI,ESI
MOV RDX,R13
CALL 0x0015faf2
MOVSD XMM0,qword ptr [RSP]
MOVSD XMM1,qword ptr [RSP + 0x8]
XOR EDI,EDI
MOV ESI,0x1
MOV RDX,R12
CALL 0x0015faf2
MOVSD XMM0,qword ptr [RSP]
MOVSD XMM1,qword ptr [RSP + 0x8]
TEST R15,R15
SETZ AL
TEST R14,R14
SETZ CL
OR CL,AL
TEST RBX,RBX
SETZ AL
OR AL,CL
JNZ 0x0016690d
MOV EDI,0x2
XOR ESI,ESI
MOV RDX,R15
CALL 0x0015faf2
MOVSD XMM0,qword ptr [RSP]
MOVSD XMM1,qword ptr [RSP + 0x8]
MOV EDI,0x1
MOV ESI,0x1
MOV RDX,R14
CALL 0x0015faf2
MOVSD XMM0,qword ptr [RSP]
MOVSD XMM1,qword ptr [RSP + 0x8]
XOR EDI,EDI
MOV ESI,0x2
MOV RDX,RBX
CALL 0x0015faf2
LAB_0016690d:
MOV EAX,0xf
ADD RSP,0x10
POP RBX
POP R12
POP R13
POP R14
POP R15
RET
|
/* int OpenSubdiv::v3_6_0::Far::internal::EvalBasisBezierTri<double>(double, double, double*,
double*, double*, double*, double*, double*) */
int OpenSubdiv::v3_6_0::Far::internal::EvalBasisBezierTri<double>
(double param_1,double param_2,double *param_3,double *param_4,double *param_5,
double *param_6,double *param_7,double *param_8)
{
if (param_3 != (double *)0x0) {
(anonymous_namespace)::evalBezierTriDerivWeights<double>(param_1,param_2,0,0,param_3);
}
if (param_5 != (double *)0x0 && param_4 != (double *)0x0) {
(anonymous_namespace)::evalBezierTriDerivWeights<double>(param_1,param_2,1,0,param_4);
(anonymous_namespace)::evalBezierTriDerivWeights<double>(param_1,param_2,0,1,param_5);
if (param_8 != (double *)0x0 && (param_7 != (double *)0x0 && param_6 != (double *)0x0)) {
(anonymous_namespace)::evalBezierTriDerivWeights<double>(param_1,param_2,2,0,param_6);
(anonymous_namespace)::evalBezierTriDerivWeights<double>(param_1,param_2,1,1,param_7);
(anonymous_namespace)::evalBezierTriDerivWeights<double>(param_1,param_2,0,2,param_8);
}
}
return 0xf;
}
| |
47,880 | nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>::basic_json(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::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>>, bool, nlohmann::json_abi_v3_11_3::detail::value_t)::'lambda'(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::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>> const&)::operator()(nlohmann::json_abi_v3_11_3::detail::json_ref<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>> const&) const | monkey531[P]llama/common/json.hpp | value_type const& operator*() const
{
return value_ref ? *value_ref : owned_value;
} | O2 | cpp | nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>::basic_json(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::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>>, bool, nlohmann::json_abi_v3_11_3::detail::value_t)::'lambda'(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::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>> const&)::operator()(nlohmann::json_abi_v3_11_3::detail::json_ref<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>> const&) const:
pushq %rbx
movq 0x10(%rsi), %rdi
testq %rdi, %rdi
cmoveq %rsi, %rdi
cmpb $0x2, (%rdi)
jne 0x781ff
movq %rsi, %rbx
callq 0x41e52
cmpq $0x2, %rax
jne 0x781ff
movq 0x10(%rbx), %rdi
testq %rdi, %rdi
cmoveq %rbx, %rdi
xorl %esi, %esi
callq 0x78204
cmpb $0x3, (%rax)
sete %al
jmp 0x78201
xorl %eax, %eax
popq %rbx
retq
nop
| _ZZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEC1ESt16initializer_listINS0_6detail8json_refISD_EEEbNSF_7value_tEENKUlRKSH_E_clESL_:
push rbx
mov rdi, [rsi+10h]
test rdi, rdi
cmovz rdi, rsi
cmp byte ptr [rdi], 2
jnz short loc_781FF
mov rbx, rsi
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4sizeEv; 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>::size(void)
cmp rax, 2
jnz short loc_781FF
mov rdi, [rbx+10h]
test rdi, rdi
cmovz rdi, rbx
xor esi, esi
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEixEm; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::operator[](ulong)
cmp byte ptr [rax], 3
setz al
jmp short loc_78201
loc_781FF:
xor eax, eax
loc_78201:
pop rbx
retn
| bool 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(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,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>>,bool,nlohmann::json_abi_v3_11_3::detail::value_t)::{lambda(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,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>> const&)#1}::operator()(
long long a1,
long long a2)
{
unsigned __int8 *v2; // rdi
long long v3; // rdi
v2 = *(unsigned __int8 **)(a2 + 16);
if ( !v2 )
v2 = (unsigned __int8 *)a2;
if ( *v2 != 2
|| nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::size(v2) != 2 )
{
return 0;
}
v3 = *(_QWORD *)(a2 + 16);
if ( !v3 )
v3 = a2;
return *(_BYTE *)nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::operator[](
v3,
0LL) == 3;
}
| operator():
PUSH RBX
MOV RDI,qword ptr [RSI + 0x10]
TEST RDI,RDI
CMOVZ RDI,RSI
CMP byte ptr [RDI],0x2
JNZ 0x001781ff
MOV RBX,RSI
CALL 0x00141e52
CMP RAX,0x2
JNZ 0x001781ff
MOV RDI,qword ptr [RBX + 0x10]
TEST RDI,RDI
CMOVZ RDI,RBX
XOR ESI,ESI
CALL 0x00178204
CMP byte ptr [RAX],0x3
SETZ AL
JMP 0x00178201
LAB_001781ff:
XOR EAX,EAX
LAB_00178201:
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>::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::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void> > >, bool,
nlohmann::json_abi_v3_11_3::detail::value_t)::{lambda(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::__cxx11::string, 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&)#1}::TEMPNAMEPLACEHOLDERVALUE(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::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void> > const&) const */
bool __thiscall
nlohmann::json_abi_v3_11_3::
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::
basic_json(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::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>,bool,nlohmann::json_abi_v3_11_3::detail::value_t)
::
{lambda(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::__cxx11::string,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&)#1}
::operator()(_lambda_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::__cxx11::string,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___1_
*this,json_ref *param_1)
{
long lVar1;
char *pcVar2;
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
*pbVar3;
pbVar3 = *(basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
**)(param_1 + 0x10);
if (*(basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
**)(param_1 + 0x10) ==
(basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
*)0x0) {
pbVar3 = (basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
*)param_1;
}
if ((*pbVar3 ==
(basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
)0x2) && (lVar1 = size(pbVar3), lVar1 == 2)) {
pbVar3 = *(basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
**)(param_1 + 0x10);
if (*(basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
**)(param_1 + 0x10) ==
(basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
*)0x0) {
pbVar3 = (basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
*)param_1;
}
pcVar2 = (char *)basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,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[](pbVar3,0);
return *pcVar2 == '\x03';
}
return false;
}
| |
47,881 | tree_record_pos | eloqsql/mysys/tree.c | ha_rows tree_record_pos(TREE *tree, const void *key,
enum ha_rkey_function flag, void *custom_arg)
{
int cmp;
TREE_ELEMENT *element= tree->root;
double left= 1;
double right= tree->elements_in_tree;
while (element != &null_element)
{
if ((cmp= (*tree->compare)(custom_arg, ELEMENT_KEY(tree, element),
key)) == 0)
{
switch (flag) {
case HA_READ_KEY_EXACT:
case HA_READ_BEFORE_KEY:
cmp= 1;
break;
case HA_READ_AFTER_KEY:
cmp= -1;
break;
default:
return HA_POS_ERROR;
}
}
if (cmp < 0) /* element < key */
{
element= element->right;
left= (left + right) / 2;
}
else
{
element= element->left;
right= (left + right) / 2;
}
}
switch (flag) {
case HA_READ_KEY_EXACT:
case HA_READ_BEFORE_KEY:
return (ha_rows) right;
case HA_READ_AFTER_KEY:
return (ha_rows) left;
default:
return HA_POS_ERROR;
}
} | O3 | c | tree_record_pos:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movl %edx, %ebx
movl 0x20c(%rdi), %eax
cvtsi2sd %rax, %xmm0
movapd %xmm0, -0x50(%rbp)
movq (%rdi), %r13
leaq 0x2e0a2c(%rip), %rax # 0x385bc0
cmpq %rax, %r13
je 0xa5251
movq %rcx, %r14
movq %rdi, %r15
movq %rsi, %r12
movsd 0x3be0a(%rip), %xmm0 # 0xe0fb8
movapd %xmm0, -0x40(%rbp)
movl 0x208(%r15), %esi
testq %rsi, %rsi
je 0xa51c4
addq %r13, %rsi
jmp 0xa51c8
movq 0x18(%r13), %rsi
movq %r14, %rdi
movq %r12, %rdx
callq *0x228(%r15)
testl %eax, %eax
je 0xa5211
movapd -0x40(%rbp), %xmm0
addsd -0x50(%rbp), %xmm0
mulsd 0x3be35(%rip), %xmm0 # 0xe1020
testl %eax, %eax
js 0xa51f6
movapd %xmm0, -0x50(%rbp)
jmp 0xa51fb
movapd %xmm0, -0x40(%rbp)
shrl $0x1f, %eax
movq (%r13,%rax,8), %r13
leaq 0x2e09b6(%rip), %rax # 0x385bc0
cmpq %rax, %r13
jne 0xa51b3
jmp 0xa522b
movl $0x1, %eax
testl %ebx, %ebx
je 0xa51d9
cmpl $0x4, %ebx
je 0xa51d9
cmpl $0x3, %ebx
jne 0xa529e
movl $0xffffffff, %eax # imm = 0xFFFFFFFF
jmp 0xa51d9
movapd -0x40(%rbp), %xmm0
cvttsd2si %xmm0, %rcx
movq %rcx, %rdx
sarq $0x3f, %rdx
subsd 0x3bd64(%rip), %xmm0 # 0xe0fa8
cvttsd2si %xmm0, %rax
andq %rdx, %rax
orq %rcx, %rax
jmp 0xa5256
movl $0x1, %eax
cmpl $0x4, %ebx
je 0xa526b
cmpl $0x3, %ebx
je 0xa528f
movq $-0x1, %rax
testl %ebx, %ebx
jne 0xa528f
movapd -0x50(%rbp), %xmm0
cvttsd2si %xmm0, %rcx
movq %rcx, %rdx
sarq $0x3f, %rdx
subsd 0x3bd24(%rip), %xmm0 # 0xe0fa8
cvttsd2si %xmm0, %rax
andq %rdx, %rax
orq %rcx, %rax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq $-0x1, %rax
jmp 0xa528f
| tree_record_pos:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 28h
mov ebx, edx
mov eax, [rdi+20Ch]
cvtsi2sd xmm0, rax
movapd [rbp+var_50], xmm0
mov r13, [rdi]
lea rax, null_element
cmp r13, rax
jz loc_A5251
mov r14, rcx
mov r15, rdi
mov r12, rsi
movsd xmm0, cs:qword_E0FB8
movapd [rbp+var_40], xmm0
loc_A51B3:
mov esi, [r15+208h]
test rsi, rsi
jz short loc_A51C4
add rsi, r13
jmp short loc_A51C8
loc_A51C4:
mov rsi, [r13+18h]
loc_A51C8:
mov rdi, r14
mov rdx, r12
call qword ptr [r15+228h]
test eax, eax
jz short loc_A5211
loc_A51D9:
movapd xmm0, [rbp+var_40]
addsd xmm0, qword ptr [rbp+var_50]
mulsd xmm0, cs:qword_E1020
test eax, eax
js short loc_A51F6
movapd [rbp+var_50], xmm0
jmp short loc_A51FB
loc_A51F6:
movapd [rbp+var_40], xmm0
loc_A51FB:
shr eax, 1Fh
mov r13, [r13+rax*8+0]
lea rax, null_element
cmp r13, rax
jnz short loc_A51B3
jmp short loc_A522B
loc_A5211:
mov eax, 1
test ebx, ebx
jz short loc_A51D9
cmp ebx, 4
jz short loc_A51D9
cmp ebx, 3
jnz short loc_A529E
mov eax, 0FFFFFFFFh
jmp short loc_A51D9
loc_A522B:
movapd xmm0, [rbp+var_40]
cvttsd2si rcx, xmm0
mov rdx, rcx
sar rdx, 3Fh
subsd xmm0, cs:qword_E0FA8
cvttsd2si rax, xmm0
and rax, rdx
or rax, rcx
jmp short loc_A5256
loc_A5251:
mov eax, 1
loc_A5256:
cmp ebx, 4
jz short loc_A526B
cmp ebx, 3
jz short loc_A528F
mov rax, 0FFFFFFFFFFFFFFFFh
test ebx, ebx
jnz short loc_A528F
loc_A526B:
movapd xmm0, [rbp+var_50]
cvttsd2si rcx, xmm0
mov rdx, rcx
sar rdx, 3Fh
subsd xmm0, cs:qword_E0FA8
cvttsd2si rax, xmm0
and rax, rdx
or rax, rcx
loc_A528F:
add rsp, 28h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_A529E:
mov rax, 0FFFFFFFFFFFFFFFFh
jmp short loc_A528F
| long long tree_record_pos(long long a1, long long a2, int a3, long long a4)
{
_QWORD *v5; // r13
char *v8; // rsi
int v9; // eax
__int128 v10; // xmm0
long long result; // rax
double v12; // [rsp+0h] [rbp-50h]
__int128 v13; // [rsp+10h] [rbp-40h]
v12 = (double)*(int *)(a1 + 524);
v5 = *(_QWORD **)a1;
if ( *(_UNKNOWN **)a1 != &null_element )
{
v13 = 0x3FF0000000000000uLL;
while ( 1 )
{
if ( *(_DWORD *)(a1 + 520) )
v8 = (char *)v5 + *(unsigned int *)(a1 + 520);
else
v8 = (char *)v5[3];
v9 = (*(long long ( **)(long long, char *, long long))(a1 + 552))(a4, v8, a2);
if ( !v9 )
{
v9 = 1;
if ( a3 )
{
if ( a3 != 4 )
{
if ( a3 != 3 )
return -1LL;
v9 = -1;
}
}
}
*((_QWORD *)&v10 + 1) = *((_QWORD *)&v13 + 1);
if ( v9 < 0 )
{
*(double *)&v10 = (*(double *)&v13 + v12) * 0.5;
v13 = v10;
}
else
{
v12 = (*(double *)&v13 + v12) * 0.5;
}
v5 = (_QWORD *)v5[(unsigned int)v9 >> 31];
if ( v5 == (_QWORD *)&null_element )
{
result = (unsigned int)(int)*(double *)&v13;
goto LABEL_17;
}
}
}
result = 1LL;
LABEL_17:
if ( a3 == 4 )
return (unsigned int)(int)v12;
if ( a3 != 3 )
{
result = -1LL;
if ( !a3 )
return (unsigned int)(int)v12;
}
return result;
}
| tree_record_pos:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x28
MOV EBX,EDX
MOV EAX,dword ptr [RDI + 0x20c]
CVTSI2SD XMM0,RAX
MOVAPD xmmword ptr [RBP + -0x50],XMM0
MOV R13,qword ptr [RDI]
LEA RAX,[0x485bc0]
CMP R13,RAX
JZ 0x001a5251
MOV R14,RCX
MOV R15,RDI
MOV R12,RSI
MOVSD XMM0,qword ptr [0x001e0fb8]
MOVAPD xmmword ptr [RBP + -0x40],XMM0
LAB_001a51b3:
MOV ESI,dword ptr [R15 + 0x208]
TEST RSI,RSI
JZ 0x001a51c4
ADD RSI,R13
JMP 0x001a51c8
LAB_001a51c4:
MOV RSI,qword ptr [R13 + 0x18]
LAB_001a51c8:
MOV RDI,R14
MOV RDX,R12
CALL qword ptr [R15 + 0x228]
TEST EAX,EAX
JZ 0x001a5211
LAB_001a51d9:
MOVAPD XMM0,xmmword ptr [RBP + -0x40]
ADDSD XMM0,qword ptr [RBP + -0x50]
MULSD XMM0,qword ptr [0x001e1020]
TEST EAX,EAX
JS 0x001a51f6
MOVAPD xmmword ptr [RBP + -0x50],XMM0
JMP 0x001a51fb
LAB_001a51f6:
MOVAPD xmmword ptr [RBP + -0x40],XMM0
LAB_001a51fb:
SHR EAX,0x1f
MOV R13,qword ptr [R13 + RAX*0x8]
LEA RAX,[0x485bc0]
CMP R13,RAX
JNZ 0x001a51b3
JMP 0x001a522b
LAB_001a5211:
MOV EAX,0x1
TEST EBX,EBX
JZ 0x001a51d9
CMP EBX,0x4
JZ 0x001a51d9
CMP EBX,0x3
JNZ 0x001a529e
MOV EAX,0xffffffff
JMP 0x001a51d9
LAB_001a522b:
MOVAPD XMM0,xmmword ptr [RBP + -0x40]
CVTTSD2SI RCX,XMM0
MOV RDX,RCX
SAR RDX,0x3f
SUBSD XMM0,qword ptr [0x001e0fa8]
CVTTSD2SI RAX,XMM0
AND RAX,RDX
OR RAX,RCX
JMP 0x001a5256
LAB_001a5251:
MOV EAX,0x1
LAB_001a5256:
CMP EBX,0x4
JZ 0x001a526b
CMP EBX,0x3
JZ 0x001a528f
MOV RAX,-0x1
TEST EBX,EBX
JNZ 0x001a528f
LAB_001a526b:
MOVAPD XMM0,xmmword ptr [RBP + -0x50]
CVTTSD2SI RCX,XMM0
MOV RDX,RCX
SAR RDX,0x3f
SUBSD XMM0,qword ptr [0x001e0fa8]
CVTTSD2SI RAX,XMM0
AND RAX,RDX
OR RAX,RCX
LAB_001a528f:
ADD RSP,0x28
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_001a529e:
MOV RAX,-0x1
JMP 0x001a528f
|
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
ulong tree_record_pos(long *param_1,int8 param_2,int param_3,int8 param_4)
{
uint uVar1;
ulong uVar2;
int1 *puVar3;
int1 *puVar4;
double dVar5;
double local_58;
double local_48;
local_58 = (double)*(uint *)((long)param_1 + 0x20c);
puVar4 = (int1 *)*param_1;
if (puVar4 == null_element) {
uVar2 = 1;
}
else {
local_48 = DAT_001e0fb8;
do {
if ((ulong)*(uint *)(param_1 + 0x41) == 0) {
puVar3 = *(int1 **)(puVar4 + 0x18);
}
else {
puVar3 = puVar4 + *(uint *)(param_1 + 0x41);
}
uVar1 = (*(code *)param_1[0x45])(param_4,puVar3,param_2);
if (((uVar1 == 0) && (uVar1 = 1, param_3 != 0)) && (param_3 != 4)) {
if (param_3 != 3) {
return 0xffffffffffffffff;
}
uVar1 = 0xffffffff;
}
dVar5 = (local_48 + local_58) * DAT_001e1020;
if (-1 < (int)uVar1) {
local_58 = dVar5;
dVar5 = local_48;
}
local_48 = dVar5;
puVar4 = *(int1 **)(puVar4 + (ulong)(uVar1 >> 0x1f) * 8);
} while (puVar4 != null_element);
uVar2 = (long)(local_48 - _DAT_001e0fa8) & (long)local_48 >> 0x3f | (long)local_48;
}
if ((param_3 == 4) || ((param_3 != 3 && (uVar2 = 0xffffffffffffffff, param_3 == 0)))) {
uVar2 = (long)(local_58 - _DAT_001e0fa8) & (long)local_58 >> 0x3f | (long)local_58;
}
return uVar2;
}
| |
47,882 | js_execute_sync_module | bluesky950520[P]quickjs/quickjs.c | static int js_execute_sync_module(JSContext *ctx, JSModuleDef *m,
JSValue *pvalue)
{
if (m->init_func) {
/* C module init : no asynchronous execution */
if (m->init_func(ctx, m) < 0)
goto fail;
} else {
JSValue promise;
JSPromiseStateEnum state;
promise = js_async_function_call(ctx, m->func_obj, JS_UNDEFINED, 0, NULL, 0);
if (JS_IsException(promise))
goto fail;
state = JS_PromiseState(ctx, promise);
if (state == JS_PROMISE_FULFILLED) {
JS_FreeValue(ctx, promise);
} else if (state == JS_PROMISE_REJECTED) {
*pvalue = JS_PromiseResult(ctx, promise);
JS_FreeValue(ctx, promise);
return -1;
} else {
JS_FreeValue(ctx, promise);
JS_ThrowTypeError(ctx, "promise is pending");
fail:
*pvalue = JS_GetException(ctx);
return -1;
}
}
*pvalue = JS_UNDEFINED;
return 0;
} | O2 | c | js_execute_sync_module:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdx, %rbx
movq %rdi, %r14
movq 0x78(%rsi), %rax
testq %rax, %rax
je 0x4057d
movq %r14, %rdi
callq *%rax
testl %eax, %eax
js 0x40610
andl $0x0, (%rbx)
movq $0x3, 0x8(%rbx)
xorl %eax, %eax
jmp 0x40633
movq 0x68(%rsi), %rax
movq 0x70(%rsi), %rdx
andq $0x0, (%rsp)
pushq $0x3
popq %r8
movq %r14, %rdi
movq %rax, %rsi
xorl %ecx, %ecx
xorl %r9d, %r9d
callq 0x3384c
movq %rdx, %r15
cmpl $0x6, %r15d
je 0x40610
movq %rax, %r12
movq %rax, %rsi
movq %r15, %rdx
callq 0x334c8
cmpl $0x2, %eax
je 0x405cf
cmpl $0x1, %eax
jne 0x405f1
movq %r14, %rdi
movq %r12, %rsi
movq %r15, %rdx
callq 0x1bbce
jmp 0x4056b
movq %r12, %rsi
movq %r15, %rdx
callq 0x334e3
movq %rax, (%rbx)
movq %rdx, 0x8(%rbx)
movq %r14, %rdi
movq %r12, %rsi
movq %r15, %rdx
callq 0x1bbce
jmp 0x40630
movq %r14, %rdi
movq %r12, %rsi
movq %r15, %rdx
callq 0x1bbce
leaq 0x453ca(%rip), %rsi # 0x859d0
movq %r14, %rdi
xorl %eax, %eax
callq 0x201fd
movq 0x18(%r14), %rax
movups 0xf0(%rax), %xmm0
andl $0x0, 0xf0(%rax)
movq $0x4, 0xf8(%rax)
movups %xmm0, (%rbx)
pushq $-0x1
popq %rax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
| js_execute_sync_module:
push r15
push r14
push r12
push rbx
sub rsp, 18h
mov rbx, rdx
mov r14, rdi
mov rax, [rsi+78h]
test rax, rax
jz short loc_4057D
mov rdi, r14
call rax
test eax, eax
js loc_40610
loc_4056B:
and dword ptr [rbx], 0
mov qword ptr [rbx+8], 3
xor eax, eax
jmp loc_40633
loc_4057D:
mov rax, [rsi+68h]
mov rdx, [rsi+70h]
and [rsp+38h+var_38], 0
push 3
pop r8
mov rdi, r14
mov rsi, rax
xor ecx, ecx
xor r9d, r9d
call js_async_function_call
mov r15, rdx
cmp r15d, 6
jz short loc_40610
mov r12, rax
mov rsi, rax
mov rdx, r15
call JS_PromiseState
cmp eax, 2
jz short loc_405CF
cmp eax, 1
jnz short loc_405F1
mov rdi, r14
mov rsi, r12
mov rdx, r15
call JS_FreeValue
jmp short loc_4056B
loc_405CF:
mov rsi, r12
mov rdx, r15
call JS_PromiseResult
mov [rbx], rax
mov [rbx+8], rdx
mov rdi, r14
mov rsi, r12
mov rdx, r15
call JS_FreeValue
jmp short loc_40630
loc_405F1:
mov rdi, r14
mov rsi, r12
mov rdx, r15
call JS_FreeValue
lea rsi, aPromiseIsPendi; "promise is pending"
mov rdi, r14
xor eax, eax
call JS_ThrowTypeError
loc_40610:
mov rax, [r14+18h]
movups xmm0, xmmword ptr [rax+0F0h]
and dword ptr [rax+0F0h], 0
mov qword ptr [rax+0F8h], 4
movups xmmword ptr [rbx], xmm0
loc_40630:
push 0FFFFFFFFFFFFFFFFh
pop rax
loc_40633:
add rsp, 18h
pop rbx
pop r12
pop r14
pop r15
retn
| long long js_execute_sync_module(
long long a1,
_QWORD *a2,
long long a3,
__m128 a4,
__m128 a5,
__m128 a6,
__m128 a7,
double a8,
double a9,
__m128 a10,
__m128 a11)
{
int ( *v12)(long long); // rax
unsigned long long v14; // rax
long long v15; // rdx
long long v16; // r15
long long v17; // r12
int v18; // eax
long long v19; // rdx
long long v20; // rdx
long long v21; // rcx
long long v22; // r8
long long v23; // r9
__m128 v24; // xmm4
__m128 v25; // xmm5
long long v26; // rax
__int128 v27; // xmm0
char v28; // [rsp+0h] [rbp-38h]
v12 = (int ( *)(long long))a2[15];
if ( v12 )
{
if ( v12(a1) >= 0 )
{
LABEL_3:
*(_DWORD *)a3 = 0;
*(_QWORD *)(a3 + 8) = 3LL;
return 0LL;
}
goto LABEL_10;
}
v14 = js_async_function_call(a1, a2[13], a2[14], 0, 3, 0, 0LL);
v16 = v15;
if ( (_DWORD)v15 == 6 )
{
LABEL_10:
v26 = *(_QWORD *)(a1 + 24);
v27 = *(_OWORD *)(v26 + 240);
*(_DWORD *)(v26 + 240) = 0;
*(_QWORD *)(v26 + 248) = 4LL;
*(_OWORD *)a3 = v27;
return -1LL;
}
v17 = v14;
v18 = JS_PromiseState(a1, v14, v15);
if ( v18 != 2 )
{
if ( v18 == 1 )
{
JS_FreeValue(a1, v17, v16);
goto LABEL_3;
}
JS_FreeValue(a1, v17, v16);
JS_ThrowTypeError(a1, (long long)"promise is pending", v20, v21, v22, v23, a4, a5, a6, a7, v24, v25, a10, a11, v28);
goto LABEL_10;
}
*(_QWORD *)a3 = JS_PromiseResult(a1, v17, v16);
*(_QWORD *)(a3 + 8) = v19;
JS_FreeValue(a1, v17, v16);
return -1LL;
}
| js_execute_sync_module:
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
SUB RSP,0x18
MOV RBX,RDX
MOV R14,RDI
MOV RAX,qword ptr [RSI + 0x78]
TEST RAX,RAX
JZ 0x0014057d
MOV RDI,R14
CALL RAX
TEST EAX,EAX
JS 0x00140610
LAB_0014056b:
AND dword ptr [RBX],0x0
MOV qword ptr [RBX + 0x8],0x3
XOR EAX,EAX
JMP 0x00140633
LAB_0014057d:
MOV RAX,qword ptr [RSI + 0x68]
MOV RDX,qword ptr [RSI + 0x70]
AND qword ptr [RSP],0x0
PUSH 0x3
POP R8
MOV RDI,R14
MOV RSI,RAX
XOR ECX,ECX
XOR R9D,R9D
CALL 0x0013384c
MOV R15,RDX
CMP R15D,0x6
JZ 0x00140610
MOV R12,RAX
MOV RSI,RAX
MOV RDX,R15
CALL 0x001334c8
CMP EAX,0x2
JZ 0x001405cf
CMP EAX,0x1
JNZ 0x001405f1
MOV RDI,R14
MOV RSI,R12
MOV RDX,R15
CALL 0x0011bbce
JMP 0x0014056b
LAB_001405cf:
MOV RSI,R12
MOV RDX,R15
CALL 0x001334e3
MOV qword ptr [RBX],RAX
MOV qword ptr [RBX + 0x8],RDX
MOV RDI,R14
MOV RSI,R12
MOV RDX,R15
CALL 0x0011bbce
JMP 0x00140630
LAB_001405f1:
MOV RDI,R14
MOV RSI,R12
MOV RDX,R15
CALL 0x0011bbce
LEA RSI,[0x1859d0]
MOV RDI,R14
XOR EAX,EAX
CALL 0x001201fd
LAB_00140610:
MOV RAX,qword ptr [R14 + 0x18]
MOVUPS XMM0,xmmword ptr [RAX + 0xf0]
AND dword ptr [RAX + 0xf0],0x0
MOV qword ptr [RAX + 0xf8],0x4
MOVUPS xmmword ptr [RBX],XMM0
LAB_00140630:
PUSH -0x1
POP RAX
LAB_00140633:
ADD RSP,0x18
POP RBX
POP R12
POP R14
POP R15
RET
|
int8 js_execute_sync_module(long param_1,long param_2,int1 (*param_3) [16])
{
long lVar1;
int iVar2;
int8 uVar3;
int8 uVar4;
int1 auVar5 [16];
if (*(code **)(param_2 + 0x78) == (code *)0x0) {
auVar5 = js_async_function_call
(param_1,*(int8 *)(param_2 + 0x68),*(int8 *)(param_2 + 0x70),0,3,
0,0);
uVar4 = auVar5._8_8_;
uVar3 = auVar5._0_8_;
if (auVar5._8_4_ != 6) {
iVar2 = JS_PromiseState();
if (iVar2 == 2) {
auVar5 = JS_PromiseResult();
*param_3 = auVar5;
JS_FreeValue(param_1,uVar3,uVar4);
return 0xffffffffffffffff;
}
if (iVar2 == 1) {
JS_FreeValue(param_1,uVar3,uVar4);
goto LAB_0014056b;
}
JS_FreeValue(param_1,uVar3,uVar4);
JS_ThrowTypeError(param_1,"promise is pending");
}
}
else {
iVar2 = (**(code **)(param_2 + 0x78))(param_1);
if (-1 < iVar2) {
LAB_0014056b:
*(int4 *)*param_3 = 0;
*(int8 *)(*param_3 + 8) = 3;
return 0;
}
}
lVar1 = *(long *)(param_1 + 0x18);
uVar3 = *(int8 *)(lVar1 + 0xf0);
uVar4 = *(int8 *)(lVar1 + 0xf8);
*(int4 *)(lVar1 + 0xf0) = 0;
*(int8 *)(lVar1 + 0xf8) = 4;
*(int8 *)*param_3 = uVar3;
*(int8 *)(*param_3 + 8) = uVar4;
return 0xffffffffffffffff;
}
| |
47,883 | minja::LoopControlException::LoopControlException(minja::LoopControlType) | monkey531[P]llama/common/minja.hpp | LoopControlException(LoopControlType control_type)
: std::runtime_error((control_type == LoopControlType::Continue ? "continue" : "break") + std::string(" outside of a loop")),
control_type(control_type) {} | O3 | cpp | minja::LoopControlException::LoopControlException(minja::LoopControlType):
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x48, %rsp
movl %esi, %ebx
movq %rdi, %r14
leaq 0x38(%rsp), %r12
movq %r12, -0x10(%r12)
leaq 0x51f4a(%rip), %rsi # 0x11631f
leaq 0x51f55(%rip), %rdx # 0x116331
leaq 0x28(%rsp), %r15
movq %r15, %rdi
callq 0x25e6a
xorl %eax, %eax
cmpl $0x1, %ebx
sete %al
leaq 0x50bf3(%rip), %rdx # 0x114feb
leaq 0x50be6(%rip), %rcx # 0x114fe5
cmoveq %rdx, %rcx
leaq (%rax,%rax,2), %r8
addq $0x5, %r8
movq %r15, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x1ddf0
leaq 0x18(%rsp), %r15
movq %r15, -0x10(%r15)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0xc443e
movq %rdx, 0x8(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x18(%rsp)
jmp 0xc4445
movups (%rcx), %xmm0
movups %xmm0, (%r15)
movq 0x8(%rax), %rdx
leaq 0x8(%rsp), %rsi
movq %rdx, 0x8(%rsi)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movq %r14, %rdi
callq 0x1df40
movq 0x8(%rsp), %rdi
cmpq %r15, %rdi
je 0xc4480
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x1dc50
movq 0x28(%rsp), %rdi
cmpq %r12, %rdi
je 0xc4497
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x1dc50
leaq 0x90b5a(%rip), %rax # 0x154ff8
addq $0x10, %rax
movq %rax, (%r14)
movl %ebx, 0x10(%r14)
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq %rax, %rbx
movq 0x8(%rsp), %rdi
cmpq %r15, %rdi
je 0xc44d4
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x1dc50
jmp 0xc44d4
movq %rax, %rbx
movq 0x28(%rsp), %rdi
cmpq %r12, %rdi
je 0xc44eb
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x1dc50
movq %rbx, %rdi
callq 0x1e660
nop
| _ZN5minja20LoopControlExceptionC2ENS_15LoopControlTypeE:
push r15
push r14
push r12
push rbx
sub rsp, 48h
mov ebx, esi
mov r14, rdi
lea r12, [rsp+68h+var_30]
mov [r12-10h], r12
lea rsi, aOutsideOfALoop; " outside of a loop"
lea rdx, aOutsideOfALoop+12h; ""
lea r15, [rsp+68h+var_40]
mov rdi, r15
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)
xor eax, eax
cmp ebx, 1
setz al
lea rdx, aContinue; "continue"
lea rcx, aBreak; "break"
cmovz rcx, rdx
lea r8, [rax+rax*2]
add r8, 5
mov rdi, r15
xor esi, esi
xor edx, edx
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7replaceEmmPKcm; std::string::replace(ulong,ulong,char const*,ulong)
lea r15, [rsp+68h+var_50]
mov [r15-10h], r15
mov rdx, [rax]
mov rcx, rax
add rcx, 10h
cmp rdx, rcx
jz short loc_C443E
mov [rsp+68h+var_60], rdx
mov rdx, [rcx]
mov [rsp+68h+var_50], rdx
jmp short loc_C4445
loc_C443E:
movups xmm0, xmmword ptr [rcx]
movups xmmword ptr [r15], xmm0
loc_C4445:
mov rdx, [rax+8]
lea rsi, [rsp+68h+var_60]
mov [rsi+8], rdx
mov [rax], rcx
mov qword ptr [rax+8], 0
mov byte ptr [rax+10h], 0
mov rdi, r14
call __ZNSt13runtime_errorC2ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; std::runtime_error::runtime_error(std::string const&)
mov rdi, [rsp+68h+var_60]; void *
cmp rdi, r15
jz short loc_C4480
mov rsi, [rsp+68h+var_50]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_C4480:
mov rdi, [rsp+68h+var_40]; void *
cmp rdi, r12
jz short loc_C4497
mov rsi, [rsp+68h+var_30]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_C4497:
lea rax, _ZTVN5minja20LoopControlExceptionE; `vtable for'minja::LoopControlException
add rax, 10h
mov [r14], rax
mov [r14+10h], ebx
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_C44D4
mov rsi, [rsp+arg_10]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_C44D4
mov rbx, rax
loc_C44D4:
mov rdi, [rsp+arg_20]; void *
cmp rdi, r12
jz short loc_C44EB
mov rsi, [rsp+arg_30]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_C44EB:
mov rdi, rbx
call __Unwind_Resume
| long long * minja::LoopControlException::LoopControlException(long long a1, int a2)
{
const char *v2; // rcx
long long v3; // rax
__int128 *v4; // rcx
long long *result; // rax
void *v6[2]; // [rsp+8h] [rbp-60h] BYREF
__int128 v7; // [rsp+18h] [rbp-50h] BYREF
void *v8[2]; // [rsp+28h] [rbp-40h] BYREF
_QWORD v9[6]; // [rsp+38h] [rbp-30h] BYREF
v8[0] = v9;
std::string::_M_construct<char const*>((long long)v8, " outside of a loop", (long long)"");
v2 = "break";
if ( a2 == 1 )
v2 = "continue";
v3 = std::string::replace(v8, 0LL, 0LL, v2, 3LL * (a2 == 1) + 5);
v6[0] = &v7;
v4 = (__int128 *)(v3 + 16);
if ( *(_QWORD *)v3 == v3 + 16 )
{
v7 = *v4;
}
else
{
v6[0] = *(void **)v3;
*(_QWORD *)&v7 = *(_QWORD *)v4;
}
v6[1] = *(void **)(v3 + 8);
*(_QWORD *)v3 = v4;
*(_QWORD *)(v3 + 8) = 0LL;
*(_BYTE *)(v3 + 16) = 0;
std::runtime_error::runtime_error(a1, v6);
if ( v6[0] != &v7 )
operator delete(v6[0], v7 + 1);
if ( v8[0] != v9 )
operator delete(v8[0], v9[0] + 1LL);
result = &`vtable for'minja::LoopControlException + 2;
*(_QWORD *)a1 = &`vtable for'minja::LoopControlException + 2;
*(_DWORD *)(a1 + 16) = a2;
return result;
}
| LoopControlException:
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
SUB RSP,0x48
MOV EBX,ESI
MOV R14,RDI
LEA R12,[RSP + 0x38]
MOV qword ptr [R12 + -0x10],R12
LEA RSI,[0x21631f]
LEA RDX,[0x216331]
LEA R15,[RSP + 0x28]
MOV RDI,R15
CALL 0x00125e6a
XOR EAX,EAX
CMP EBX,0x1
SETZ AL
LEA RDX,[0x214feb]
LEA RCX,[0x214fe5]
CMOVZ RCX,RDX
LEA R8,[RAX + RAX*0x2]
ADD R8,0x5
LAB_001c440b:
MOV RDI,R15
XOR ESI,ESI
XOR EDX,EDX
CALL 0x0011ddf0
LEA R15,[RSP + 0x18]
MOV qword ptr [R15 + -0x10],R15
MOV RDX,qword ptr [RAX]
MOV RCX,RAX
ADD RCX,0x10
CMP RDX,RCX
JZ 0x001c443e
MOV qword ptr [RSP + 0x8],RDX
MOV RDX,qword ptr [RCX]
MOV qword ptr [RSP + 0x18],RDX
JMP 0x001c4445
LAB_001c443e:
MOVUPS XMM0,xmmword ptr [RCX]
MOVUPS xmmword ptr [R15],XMM0
LAB_001c4445:
MOV RDX,qword ptr [RAX + 0x8]
LEA RSI,[RSP + 0x8]
MOV qword ptr [RSI + 0x8],RDX
MOV qword ptr [RAX],RCX
MOV qword ptr [RAX + 0x8],0x0
MOV byte ptr [RAX + 0x10],0x0
LAB_001c4461:
MOV RDI,R14
CALL 0x0011df40
LAB_001c4469:
MOV RDI,qword ptr [RSP + 0x8]
CMP RDI,R15
JZ 0x001c4480
MOV RSI,qword ptr [RSP + 0x18]
INC RSI
CALL 0x0011dc50
LAB_001c4480:
MOV RDI,qword ptr [RSP + 0x28]
CMP RDI,R12
JZ 0x001c4497
MOV RSI,qword ptr [RSP + 0x38]
INC RSI
CALL 0x0011dc50
LAB_001c4497:
LEA RAX,[0x254ff8]
ADD RAX,0x10
MOV qword ptr [R14],RAX
MOV dword ptr [R14 + 0x10],EBX
ADD RSP,0x48
POP RBX
POP R12
POP R14
POP R15
RET
|
/* minja::LoopControlException::LoopControlException(minja::LoopControlType) */
void __thiscall
minja::LoopControlException::LoopControlException(LoopControlException *this,int param_2)
{
long *plVar1;
char *pcVar2;
long *plVar3;
long *local_60;
long local_58;
long local_50;
long lStack_48;
long *local_40 [2];
long local_30 [2];
local_40[0] = local_30;
std::__cxx11::string::_M_construct<char_const*>(local_40," outside of a loop","");
pcVar2 = "break";
if (param_2 == 1) {
pcVar2 = "continue";
}
/* try { // try from 001c440b to 001c4416 has its CatchHandler @ 001c44d1 */
plVar1 = (long *)std::__cxx11::string::replace((ulong)local_40,0,(char *)0x0,(ulong)pcVar2);
plVar3 = plVar1 + 2;
if ((long *)*plVar1 == plVar3) {
local_50 = *plVar3;
lStack_48 = plVar1[3];
local_60 = &local_50;
}
else {
local_50 = *plVar3;
local_60 = (long *)*plVar1;
}
local_58 = plVar1[1];
*plVar1 = (long)plVar3;
plVar1[1] = 0;
*(int1 *)(plVar1 + 2) = 0;
/* try { // try from 001c4461 to 001c4468 has its CatchHandler @ 001c44b5 */
std::runtime_error::runtime_error((runtime_error *)this,(string *)&local_60);
if (local_60 != &local_50) {
operator_delete(local_60,local_50 + 1);
}
if (local_40[0] != local_30) {
operator_delete(local_40[0],local_30[0] + 1);
}
*(int ***)this = &PTR__runtime_error_00255008;
*(int *)(this + 0x10) = param_2;
return;
}
| |
47,884 | diag | eloqsql/libmariadb/unittest/mytap/tap.c | void
diag(char const *fmt, ...)
{
va_list ap;
va_start(ap, fmt);
fprintf(tapout, "# ");
vfprintf(tapout, fmt, ap);
emit_endl();
va_end(ap);
} | O0 | c | diag:
pushq %rbp
movq %rsp, %rbp
subq $0xe0, %rsp
testb %al, %al
je 0x19af5
movaps %xmm0, -0xa0(%rbp)
movaps %xmm1, -0x90(%rbp)
movaps %xmm2, -0x80(%rbp)
movaps %xmm3, -0x70(%rbp)
movaps %xmm4, -0x60(%rbp)
movaps %xmm5, -0x50(%rbp)
movaps %xmm6, -0x40(%rbp)
movaps %xmm7, -0x30(%rbp)
movq %r9, -0xa8(%rbp)
movq %r8, -0xb0(%rbp)
movq %rcx, -0xb8(%rbp)
movq %rdx, -0xc0(%rbp)
movq %rsi, -0xc8(%rbp)
movq %rdi, -0x8(%rbp)
leaq -0xd0(%rbp), %rax
movq %rax, -0x10(%rbp)
leaq 0x10(%rbp), %rax
movq %rax, -0x18(%rbp)
movl $0x30, -0x1c(%rbp)
movl $0x8, -0x20(%rbp)
movq 0x4947c(%rip), %rax # 0x62fc0
movq %rax, -0xd8(%rbp)
movq (%rax), %rdi
leaq 0x36aa0(%rip), %rsi # 0x505f5
xorl %eax, %eax
callq 0x13650
movq -0xd8(%rbp), %rax
movq (%rax), %rdi
movq -0x8(%rbp), %rsi
leaq -0x20(%rbp), %rdx
callq 0x135d0
callq 0x1a1e0
addq $0xe0, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
| diag:
push rbp
mov rbp, rsp
sub rsp, 0E0h
test al, al
jz short loc_19AF5
movaps [rbp+var_A0], xmm0
movaps [rbp+var_90], xmm1
movaps [rbp+var_80], xmm2
movaps [rbp+var_70], xmm3
movaps [rbp+var_60], xmm4
movaps [rbp+var_50], xmm5
movaps [rbp+var_40], xmm6
movaps [rbp+var_30], xmm7
loc_19AF5:
mov [rbp+var_A8], r9
mov [rbp+var_B0], r8
mov [rbp+var_B8], rcx
mov [rbp+var_C0], rdx
mov [rbp+var_C8], rsi
mov [rbp+var_8], rdi
lea rax, [rbp+var_D0]
mov [rbp+var_10], rax
lea rax, [rbp+arg_0]
mov [rbp+var_18], rax
mov [rbp+var_1C], 30h ; '0'
mov [rbp+var_20], 8
mov rax, cs:stdout_ptr
mov [rbp+var_D8], rax
mov rdi, [rax]
lea rsi, asc_505F5; "# "
xor eax, eax
call _fprintf
mov rax, [rbp+var_D8]
mov rdi, [rax]
mov rsi, [rbp+var_8]
lea rdx, [rbp+var_20]
call _vfprintf
call emit_endl
add rsp, 0E0h
pop rbp
retn
| long long diag(
long long a1,
long long a2,
long long a3,
long long a4,
long long a5,
long long a6,
__m128 a7,
__m128 a8,
__m128 a9,
__m128 a10,
__m128 a11,
__m128 a12,
__m128 a13,
__m128 a14,
char a15)
{
char v16; // [rsp+10h] [rbp-D0h] BYREF
long long v17; // [rsp+18h] [rbp-C8h]
long long v18; // [rsp+20h] [rbp-C0h]
long long v19; // [rsp+28h] [rbp-B8h]
long long v20; // [rsp+30h] [rbp-B0h]
long long v21; // [rsp+38h] [rbp-A8h]
__m128 v22; // [rsp+40h] [rbp-A0h]
__m128 v23; // [rsp+50h] [rbp-90h]
__m128 v24; // [rsp+60h] [rbp-80h]
__m128 v25; // [rsp+70h] [rbp-70h]
__m128 v26; // [rsp+80h] [rbp-60h]
__m128 v27; // [rsp+90h] [rbp-50h]
__m128 v28; // [rsp+A0h] [rbp-40h]
__m128 v29; // [rsp+B0h] [rbp-30h]
_DWORD v30[2]; // [rsp+C0h] [rbp-20h] BYREF
char *v31; // [rsp+C8h] [rbp-18h]
char *v32; // [rsp+D0h] [rbp-10h]
long long v33; // [rsp+D8h] [rbp-8h]
v22 = a7;
v23 = a8;
v24 = a9;
v25 = a10;
v26 = a11;
v27 = a12;
v28 = a13;
v29 = a14;
v21 = a6;
v20 = a5;
v19 = a4;
v18 = a3;
v17 = a2;
v33 = a1;
v32 = &v16;
v31 = &a15;
v30[1] = 48;
v30[0] = 8;
fprintf(stdout, "# ");
vfprintf(stdout, v33, v30);
return emit_endl();
}
| diag:
PUSH RBP
MOV RBP,RSP
SUB RSP,0xe0
TEST AL,AL
JZ 0x00119af5
MOVAPS xmmword ptr [RBP + -0xa0],XMM0
MOVAPS xmmword ptr [RBP + -0x90],XMM1
MOVAPS xmmword ptr [RBP + -0x80],XMM2
MOVAPS xmmword ptr [RBP + -0x70],XMM3
MOVAPS xmmword ptr [RBP + -0x60],XMM4
MOVAPS xmmword ptr [RBP + -0x50],XMM5
MOVAPS xmmword ptr [RBP + -0x40],XMM6
MOVAPS xmmword ptr [RBP + -0x30],XMM7
LAB_00119af5:
MOV qword ptr [RBP + -0xa8],R9
MOV qword ptr [RBP + -0xb0],R8
MOV qword ptr [RBP + -0xb8],RCX
MOV qword ptr [RBP + -0xc0],RDX
MOV qword ptr [RBP + -0xc8],RSI
MOV qword ptr [RBP + -0x8],RDI
LEA RAX,[RBP + -0xd0]
MOV qword ptr [RBP + -0x10],RAX
LEA RAX,[RBP + 0x10]
MOV qword ptr [RBP + -0x18],RAX
MOV dword ptr [RBP + -0x1c],0x30
MOV dword ptr [RBP + -0x20],0x8
MOV RAX,qword ptr [0x00162fc0]
MOV qword ptr [RBP + -0xd8],RAX
MOV RDI,qword ptr [RAX]
LEA RSI,[0x1505f5]
XOR EAX,EAX
CALL 0x00113650
MOV RAX,qword ptr [RBP + -0xd8]
MOV RDI,qword ptr [RAX]
MOV RSI,qword ptr [RBP + -0x8]
LEA RDX,[RBP + -0x20]
CALL 0x001135d0
CALL 0x0011a1e0
ADD RSP,0xe0
POP RBP
RET
|
void diag(int8 param_1,int8 param_2,int8 param_3,int8 param_4,
int8 param_5,int8 param_6,int8 param_7,int8 param_8,char *param_9,
int8 param_10,int8 param_11,int8 param_12,int8 param_13,
int8 param_14)
{
int *puVar1;
char in_AL;
int1 local_d8 [8];
int8 local_d0;
int8 local_c8;
int8 local_c0;
int8 local_b8;
int8 local_b0;
int8 local_a8;
int8 local_98;
int8 local_88;
int8 local_78;
int8 local_68;
int8 local_58;
int8 local_48;
int8 local_38;
int4 local_28;
int4 local_24;
int1 *local_20;
int1 *local_18;
char *local_10;
puVar1 = PTR_stdout_00162fc0;
if (in_AL != '\0') {
local_a8 = param_1;
local_98 = param_2;
local_88 = param_3;
local_78 = param_4;
local_68 = param_5;
local_58 = param_6;
local_48 = param_7;
local_38 = param_8;
}
local_18 = local_d8;
local_20 = &stack0x00000008;
local_24 = 0x30;
local_28 = 8;
local_d0 = param_10;
local_c8 = param_11;
local_c0 = param_12;
local_b8 = param_13;
local_b0 = param_14;
local_10 = param_9;
fprintf(*(FILE **)PTR_stdout_00162fc0,"# ");
vfprintf(*(FILE **)puVar1,local_10,&local_28);
emit_endl();
return;
}
| |
47,885 | my_close | eloqsql/mysys/my_open.c | int my_close(File fd, myf MyFlags)
{
int err;
char *name= NULL;
DBUG_ENTER("my_close");
DBUG_PRINT("my",("fd: %d MyFlags: %lu",fd, MyFlags));
if (!(MyFlags & (MY_WME | MY_FAE)))
MyFlags|= my_global_flags;
if ((uint) fd < my_file_limit && my_file_info[fd].type != UNOPEN)
{
name= my_file_info[fd].name;
my_file_info[fd].name= NULL;
my_file_info[fd].type= UNOPEN;
}
#ifndef _WIN32
err= close(fd);
#else
err= my_win_close(fd);
#endif
if (err)
{
DBUG_PRINT("error",("Got error %d on close",err));
my_errno=errno;
if (MyFlags & (MY_FAE | MY_WME))
my_error(EE_BADCLOSE, MYF(ME_BELL | (MyFlags & (ME_NOTE | ME_ERROR_LOG))),
name,errno);
}
if (name)
{
my_free(name);
}
my_atomic_add32_explicit(&my_file_opened, -1, MY_MEMORY_ORDER_RELAXED);
DBUG_RETURN(err);
} | O3 | c | my_close:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r12
xorl %ebx, %ebx
movl $0x0, %r14d
testb $0x18, %r12b
jne 0x2cec2
leaq 0x33c279(%rip), %rax # 0x369138
movq (%rax), %r14
leaq 0x2c5487(%rip), %rax # 0x2f2350
cmpl %edi, (%rax)
jbe 0x2cf01
leaq 0x2c5484(%rip), %rax # 0x2f2358
movq (%rax), %rdx
movslq %edi, %rcx
shlq $0x4, %rcx
cmpl $0x0, 0x8(%rdx,%rcx)
je 0x2ceff
addq %rcx, %rdx
movq (%rdx), %rbx
movq $0x0, (%rdx)
movq (%rax), %rax
movl $0x0, 0x8(%rax,%rcx)
jmp 0x2cf01
xorl %ebx, %ebx
callq 0x245c0
movl %eax, %r15d
testl %eax, %eax
je 0x2cf4a
orq %r12, %r14
callq 0x24060
movq %rax, %r12
movl (%rax), %r13d
callq 0x268a6
movl %r13d, (%rax)
testb $0x18, %r14b
je 0x2cf4a
andl $0x440, %r14d # imm = 0x440
orq $0x4, %r14
movl (%r12), %ecx
movl $0x4, %edi
movq %r14, %rsi
movq %rbx, %rdx
xorl %eax, %eax
callq 0x2bf8b
testq %rbx, %rbx
je 0x2cf57
movq %rbx, %rdi
callq 0x2cbc2
leaq 0x33c1e6(%rip), %rax # 0x369144
lock
decl (%rax)
movl %r15d, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
| my_close:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
push rax
mov r12, rsi
xor ebx, ebx
mov r14d, 0
test r12b, 18h
jnz short loc_2CEC2
lea rax, my_global_flags
mov r14, [rax]
loc_2CEC2:
lea rax, my_file_limit
cmp [rax], edi
jbe short loc_2CF01
lea rax, my_file_info
mov rdx, [rax]
movsxd rcx, edi
shl rcx, 4
cmp dword ptr [rdx+rcx+8], 0
jz short loc_2CEFF
add rdx, rcx
mov rbx, [rdx]
mov qword ptr [rdx], 0
mov rax, [rax]
mov dword ptr [rax+rcx+8], 0
jmp short loc_2CF01
loc_2CEFF:
xor ebx, ebx
loc_2CF01:
call _close
mov r15d, eax
test eax, eax
jz short loc_2CF4A
or r14, r12
call ___errno_location
mov r12, rax
mov r13d, [rax]
call _my_thread_var
mov [rax], r13d
test r14b, 18h
jz short loc_2CF4A
and r14d, 440h
or r14, 4
mov ecx, [r12]
mov edi, 4
mov rsi, r14
mov rdx, rbx
xor eax, eax
call my_error
loc_2CF4A:
test rbx, rbx
jz short loc_2CF57
mov rdi, rbx
call my_free
loc_2CF57:
lea rax, my_file_opened
lock dec dword ptr [rax]
mov eax, r15d
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| long long my_close(long long a1, __int16 a2)
{
long long v2; // rbx
__int16 v3; // r14
long long v4; // rcx
unsigned int v5; // r15d
__int16 v6; // r14
unsigned int *v7; // r12
unsigned int v8; // r13d
v2 = 0LL;
v3 = 0;
if ( (a2 & 0x18) == 0 )
v3 = my_global_flags;
if ( my_file_limit > (unsigned int)a1 )
{
v4 = 16LL * (int)a1;
if ( *(_DWORD *)((char *)my_file_info + v4 + 8) )
{
v2 = *(_QWORD *)((char *)my_file_info + v4);
*(_QWORD *)((char *)my_file_info + v4) = 0LL;
*(_DWORD *)((char *)my_file_info + v4 + 8) = 0;
}
else
{
v2 = 0LL;
}
}
v5 = close(a1);
if ( v5 )
{
v6 = a2 | v3;
v7 = (unsigned int *)__errno_location(a1);
v8 = *v7;
*(_DWORD *)my_thread_var() = v8;
if ( (v6 & 0x18) != 0 )
my_error(4u, v6 & 0x440 | 4, v2, *v7);
}
if ( v2 )
my_free(v2);
_InterlockedDecrement(my_file_opened);
return v5;
}
| my_close:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
PUSH RAX
MOV R12,RSI
XOR EBX,EBX
MOV R14D,0x0
TEST R12B,0x18
JNZ 0x0012cec2
LEA RAX,[0x469138]
MOV R14,qword ptr [RAX]
LAB_0012cec2:
LEA RAX,[0x3f2350]
CMP dword ptr [RAX],EDI
JBE 0x0012cf01
LEA RAX,[0x3f2358]
MOV RDX,qword ptr [RAX]
MOVSXD RCX,EDI
SHL RCX,0x4
CMP dword ptr [RDX + RCX*0x1 + 0x8],0x0
JZ 0x0012ceff
ADD RDX,RCX
MOV RBX,qword ptr [RDX]
MOV qword ptr [RDX],0x0
MOV RAX,qword ptr [RAX]
MOV dword ptr [RAX + RCX*0x1 + 0x8],0x0
JMP 0x0012cf01
LAB_0012ceff:
XOR EBX,EBX
LAB_0012cf01:
CALL 0x001245c0
MOV R15D,EAX
TEST EAX,EAX
JZ 0x0012cf4a
OR R14,R12
CALL 0x00124060
MOV R12,RAX
MOV R13D,dword ptr [RAX]
CALL 0x001268a6
MOV dword ptr [RAX],R13D
TEST R14B,0x18
JZ 0x0012cf4a
AND R14D,0x440
OR R14,0x4
MOV ECX,dword ptr [R12]
MOV EDI,0x4
MOV RSI,R14
MOV RDX,RBX
XOR EAX,EAX
CALL 0x0012bf8b
LAB_0012cf4a:
TEST RBX,RBX
JZ 0x0012cf57
MOV RDI,RBX
CALL 0x0012cbc2
LAB_0012cf57:
LEA RAX,[0x469144]
DEC.LOCK dword ptr [RAX]
MOV EAX,R15D
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
int my_close(uint param_1,ulong param_2)
{
int iVar1;
int iVar2;
int *piVar3;
int *piVar4;
long lVar5;
long lVar6;
ulong uVar7;
lVar6 = 0;
uVar7 = 0;
if ((param_2 & 0x18) == 0) {
uVar7 = my_global_flags;
}
if (param_1 < my_file_limit) {
lVar5 = (long)(int)param_1 * 0x10;
if (*(int *)(my_file_info + lVar5 + 8) == 0) {
lVar6 = 0;
}
else {
lVar6 = *(long *)(my_file_info + lVar5);
*(long *)(my_file_info + lVar5) = 0;
*(int4 *)(my_file_info + lVar5 + 8) = 0;
}
}
iVar2 = close(param_1);
if (iVar2 != 0) {
piVar3 = __errno_location();
iVar1 = *piVar3;
piVar4 = (int *)_my_thread_var();
*piVar4 = iVar1;
if (((uVar7 | param_2) & 0x18) != 0) {
my_error(4,(uint)(uVar7 | param_2) & 0x440 | 4,lVar6,*piVar3);
}
}
if (lVar6 != 0) {
my_free(lVar6);
}
LOCK();
my_file_opened = my_file_opened + -1;
UNLOCK();
return iVar2;
}
| |
47,886 | testing::internal::GetThreadCount() | AlayaLite/build_O0/_deps/googletest-src/googletest/src/gtest-port.cc | size_t GetThreadCount() {
const std::string filename =
(Message() << "/proc/" << getpid() << "/stat").GetString();
return ReadProcFileField<size_t>(filename, 19);
} | O0 | cpp | testing::internal::GetThreadCount():
subq $0x68, %rsp
leaq 0x40(%rsp), %rdi
movq %rdi, 0x20(%rsp)
callq 0x101550
movq 0x20(%rsp), %rdi
leaq 0x60a89(%rip), %rsi # 0x155048
callq 0x124c30
movq %rax, 0x28(%rsp)
jmp 0xf45cb
callq 0x15b80
movq 0x28(%rsp), %rdi
movl %eax, 0x30(%rsp)
leaq 0x30(%rsp), %rsi
callq 0x124c70
movq %rax, 0x18(%rsp)
jmp 0xf45ea
movq 0x18(%rsp), %rdi
leaq 0x60a59(%rip), %rsi # 0x15504f
callq 0x124cb0
movq %rax, 0x10(%rsp)
jmp 0xf4602
movq 0x10(%rsp), %rsi
leaq 0x48(%rsp), %rdi
callq 0xf3560
jmp 0xf4613
leaq 0x40(%rsp), %rdi
callq 0x1e140
leaq 0x48(%rsp), %rdi
movl $0x13, %esi
callq 0xf9380
movq %rax, 0x8(%rsp)
jmp 0xf4633
leaq 0x48(%rsp), %rdi
callq 0x1c160
movq 0x8(%rsp), %rax
addq $0x68, %rsp
retq
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x38(%rsp)
movl %eax, 0x34(%rsp)
leaq 0x40(%rsp), %rdi
callq 0x1e140
jmp 0xf4679
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x38(%rsp)
movl %eax, 0x34(%rsp)
leaq 0x48(%rsp), %rdi
callq 0x1c160
movq 0x38(%rsp), %rdi
callq 0x15dd0
nopw %cs:(%rax,%rax)
| _ZN7testing8internal14GetThreadCountEv:
sub rsp, 68h
lea rdi, [rsp+68h+var_28]; this
mov [rsp+68h+var_48], rdi
call _ZN7testing7MessageC2Ev; testing::Message::Message(void)
mov rdi, [rsp+68h+var_48]
lea rsi, aProc; "/proc/"
call _ZN7testing7MessagelsIA7_cEERS0_RKT_; testing::Message::operator<<<char [7]>(char [7] const&)
mov [rsp+68h+var_40], rax
jmp short $+2
loc_F45CB:
call _getpid
mov rdi, [rsp+68h+var_40]
mov [rsp+68h+var_38], eax
lea rsi, [rsp+68h+var_38]
call _ZN7testing7MessagelsIiEERS0_RKT_; testing::Message::operator<<<int>(int const&)
mov [rsp+68h+var_50], rax
jmp short $+2
loc_F45EA:
mov rdi, [rsp+68h+var_50]
lea rsi, aStat_0; "/stat"
call _ZN7testing7MessagelsIA6_cEERS0_RKT_; testing::Message::operator<<<char [6]>(char [6] const&)
mov qword ptr [rsp+68h+var_58], rax
jmp short $+2
loc_F4602:
mov rsi, qword ptr [rsp+68h+var_58]; int
lea rdi, [rsp+68h+var_20]; int
call _ZNK7testing7Message9GetStringB5cxx11Ev; testing::Message::GetString(void)
jmp short $+2
loc_F4613:
lea rdi, [rsp+68h+var_28]; this
call _ZN7testing7MessageD2Ev; testing::Message::~Message()
lea rdi, [rsp+68h+var_20]
mov esi, 13h
call _ZN7testing8internal12_GLOBAL__N_117ReadProcFileFieldImEET_RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEi; testing::internal::`anonymous namespace'::ReadProcFileField<ulong>(std::string const&,int)
mov [rsp+68h+var_60], rax
jmp short $+2
loc_F4633:
lea rdi, [rsp+68h+var_20]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
mov rax, [rsp+68h+var_60]
add rsp, 68h
retn
mov rcx, rax
mov eax, edx
mov [rsp+arg_30], rcx
mov [rsp+arg_2C], eax
lea rdi, [rsp+arg_38]; this
call _ZN7testing7MessageD2Ev; testing::Message::~Message()
jmp short loc_F4679
mov rcx, rax
mov eax, edx
mov [rsp+arg_30], rcx
mov [rsp+arg_2C], eax
lea rdi, [rsp+arg_40]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
loc_F4679:
mov rdi, [rsp+arg_30]
call __Unwind_Resume
| long long testing::internal::GetThreadCount(testing::internal *this)
{
long long ProcFile; // [rsp+8h] [rbp-60h]
int v3; // [rsp+10h] [rbp-58h]
long long v4; // [rsp+18h] [rbp-50h]
long long v5; // [rsp+28h] [rbp-40h]
_DWORD v6[4]; // [rsp+30h] [rbp-38h] BYREF
_BYTE v7[8]; // [rsp+40h] [rbp-28h] BYREF
int v8[8]; // [rsp+48h] [rbp-20h] BYREF
testing::Message::Message((testing::Message *)v7);
v5 = testing::Message::operator<<<char [7]>(v7, "/proc/");
v6[0] = getpid(v7);
v4 = testing::Message::operator<<<int>(v5, v6);
v3 = testing::Message::operator<<<char [6]>(v4, "/stat");
testing::Message::GetString[abi:cxx11]((int)v8, v3);
testing::Message::~Message((testing::Message *)v7);
ProcFile = testing::internal::`anonymous namespace'::ReadProcFileField<unsigned long>(v8, 19LL);
std::string::~string(v8);
return ProcFile;
}
| GetThreadCount:
SUB RSP,0x68
LEA RDI,[RSP + 0x40]
MOV qword ptr [RSP + 0x20],RDI
CALL 0x00201550
MOV RDI,qword ptr [RSP + 0x20]
LAB_001f45b8:
LEA RSI,[0x255048]
CALL 0x00224c30
MOV qword ptr [RSP + 0x28],RAX
JMP 0x001f45cb
LAB_001f45cb:
CALL 0x00115b80
MOV RDI,qword ptr [RSP + 0x28]
MOV dword ptr [RSP + 0x30],EAX
LEA RSI,[RSP + 0x30]
CALL 0x00224c70
MOV qword ptr [RSP + 0x18],RAX
JMP 0x001f45ea
LAB_001f45ea:
MOV RDI,qword ptr [RSP + 0x18]
LEA RSI,[0x25504f]
CALL 0x00224cb0
MOV qword ptr [RSP + 0x10],RAX
JMP 0x001f4602
LAB_001f4602:
MOV RSI,qword ptr [RSP + 0x10]
LEA RDI,[RSP + 0x48]
CALL 0x001f3560
JMP 0x001f4613
LAB_001f4613:
LEA RDI,[RSP + 0x40]
CALL 0x0011e140
LAB_001f461d:
LEA RDI,[RSP + 0x48]
MOV ESI,0x13
CALL 0x001f9380
LAB_001f462c:
MOV qword ptr [RSP + 0x8],RAX
JMP 0x001f4633
LAB_001f4633:
LEA RDI,[RSP + 0x48]
CALL 0x0011c160
MOV RAX,qword ptr [RSP + 0x8]
ADD RSP,0x68
RET
|
/* testing::internal::GetThreadCount() */
ulong testing::internal::GetThreadCount(void)
{
Message *pMVar1;
ulong uVar2;
__pid_t local_38 [4];
Message local_28 [8];
string local_20 [32];
Message::Message(local_28);
/* try { // try from 001f45b8 to 001f4610 has its CatchHandler @ 001f4647 */
pMVar1 = Message::operator<<(local_28,"/proc/");
local_38[0] = getpid();
pMVar1 = Message::operator<<(pMVar1,local_38);
Message::operator<<(pMVar1,"/stat");
Message::GetString_abi_cxx11_();
Message::~Message(local_28);
/* try { // try from 001f461d to 001f462b has its CatchHandler @ 001f4661 */
uVar2 = (anonymous_namespace)::ReadProcFileField<unsigned_long>(local_20,0x13);
std::__cxx11::string::~string(local_20);
return uVar2;
}
| |
47,887 | lzr_redis_handle_reponse | xtate/src/probe-modules/lzr-probes/lzr-redis.c | static unsigned lzr_redis_handle_reponse(unsigned th_idx, ProbeTarget *target,
const unsigned char *px,
unsigned sizeof_px, OutItem *item) {
if (sizeof_px == 7 && safe_memmem(px, sizeof_px, "PONG", strlen("PONG"))) {
item->level = OUT_SUCCESS;
safe_strcpy(item->classification, OUT_CLS_SIZE, "redis");
safe_strcpy(item->reason, OUT_RSN_SIZE, "matched");
return 0;
}
if (safe_memmem(px, sizeof_px, "Redis", strlen("Redis"))) {
item->level = OUT_SUCCESS;
safe_strcpy(item->classification, OUT_CLS_SIZE, "redis");
safe_strcpy(item->reason, OUT_RSN_SIZE, "matched");
return 0;
}
if (safe_memmem(px, sizeof_px, "-ERR unknown", strlen("-ERR unknown"))) {
item->level = OUT_SUCCESS;
safe_strcpy(item->classification, OUT_CLS_SIZE, "redis");
safe_strcpy(item->reason, OUT_RSN_SIZE, "matched");
return 0;
}
item->level = OUT_FAILURE;
safe_strcpy(item->classification, OUT_CLS_SIZE, "not redis");
safe_strcpy(item->reason, OUT_RSN_SIZE, "not matched");
return 0;
} | O3 | c | lzr_redis_handle_reponse:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %r8, %rbx
movl %ecx, %ebp
movq %rdx, %r15
cmpl $0x7, %ecx
jne 0x2cbd1
leaq 0x3c34c(%rip), %rdx # 0x68ed2
movq %r15, %rdi
movl $0x7, %esi
movl $0x4, %ecx
callq 0x51551
testq %rax, %rax
je 0x2cbd1
movl $0x2, 0x8(%rbx)
leaq 0x50(%rbx), %rdi
leaq 0x3c33f(%rip), %rdx # 0x68eee
movl $0x1e, %esi
callq 0x51195
addq $0x6e, %rbx
leaq 0x3d59c(%rip), %rdx # 0x6a160
movl $0x1e, %esi
movq %rbx, %rdi
jmp 0x2cc52
leaq 0x3c2ff(%rip), %rdx # 0x68ed7
movq %r15, %rdi
movl %ebp, %esi
movl $0x5, %ecx
callq 0x51551
leaq 0x6e(%rbx), %r14
testq %rax, %rax
je 0x2cc0c
movl $0x2, 0x8(%rbx)
addq $0x50, %rbx
leaq 0x3c2ec(%rip), %rdx # 0x68eee
movl $0x1e, %esi
movq %rbx, %rdi
jmp 0x2cc3e
leaq 0x3c2ca(%rip), %rdx # 0x68edd
movq %r15, %rdi
movl %ebp, %esi
movl $0xc, %ecx
callq 0x51551
leaq 0x50(%rbx), %rdi
testq %rax, %rax
je 0x2cc64
movl $0x2, 0x8(%rbx)
leaq 0x3c2b5(%rip), %rdx # 0x68eee
movl $0x1e, %esi
callq 0x51195
leaq 0x3d516(%rip), %rdx # 0x6a160
movl $0x1e, %esi
movq %r14, %rdi
callq 0x51195
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movl $0x1, 0x8(%rbx)
leaq 0x3c278(%rip), %rdx # 0x68eea
movl $0x1e, %esi
callq 0x51195
leaq 0x3d487(%rip), %rdx # 0x6a10a
jmp 0x2cc4a
nopl (%rax)
| lzr_redis_handle_reponse:
push rbp
push r15
push r14
push rbx
push rax
mov rbx, r8
mov ebp, ecx
mov r15, rdx
cmp ecx, 7
jnz short loc_2CBD1
lea rdx, aPong; "PONG"
mov rdi, r15
mov esi, 7
mov ecx, 4
call safe_memmem
test rax, rax
jz short loc_2CBD1
mov dword ptr [rbx+8], 2
lea rdi, [rbx+50h]
lea rdx, aNotRedis+4; "redis"
mov esi, 1Eh
call safe_strcpy
add rbx, 6Eh ; 'n'
lea rdx, aProtocolMatche_0+9; "matched"
mov esi, 1Eh
mov rdi, rbx
jmp loc_2CC52
loc_2CBD1:
lea rdx, aRedis_0; "Redis"
mov rdi, r15
mov esi, ebp
mov ecx, 5
call safe_memmem
lea r14, [rbx+6Eh]
test rax, rax
jz short loc_2CC0C
mov dword ptr [rbx+8], 2
add rbx, 50h ; 'P'
lea rdx, aNotRedis+4; "redis"
mov esi, 1Eh
mov rdi, rbx
jmp short loc_2CC3E
loc_2CC0C:
lea rdx, aErrUnknown; "-ERR unknown"
mov rdi, r15
mov esi, ebp
mov ecx, 0Ch
call safe_memmem
lea rdi, [rbx+50h]
test rax, rax
jz short loc_2CC64
mov dword ptr [rbx+8], 2
lea rdx, aNotRedis+4; "redis"
mov esi, 1Eh
loc_2CC3E:
call safe_strcpy
lea rdx, aProtocolMatche_0+9; "matched"
loc_2CC4A:
mov esi, 1Eh
mov rdi, r14
loc_2CC52:
call safe_strcpy
xor eax, eax
add rsp, 8
pop rbx
pop r14
pop r15
pop rbp
retn
loc_2CC64:
mov dword ptr [rbx+8], 1
lea rdx, aNotRedis; "not redis"
mov esi, 1Eh
call safe_strcpy
lea rdx, aProtocolNotMat+9; "not matched"
jmp short loc_2CC4A
| long long lzr_redis_handle_reponse(long long a1, long long a2, long long a3, unsigned int a4, long long a5)
{
long long v8; // rdi
long long v9; // rdi
if ( a4 != 7 || !safe_memmem(a3, 7LL, "PONG", 4LL) )
{
if ( safe_memmem(a3, a4, "Redis", 5LL) )
{
*(_DWORD *)(a5 + 8) = 2;
v9 = a5 + 80;
}
else
{
v9 = a5 + 80;
if ( !safe_memmem(a3, a4, "-ERR unknown", 12LL) )
{
*(_DWORD *)(a5 + 8) = 1;
safe_strcpy(v9, 30LL);
goto LABEL_9;
}
*(_DWORD *)(a5 + 8) = 2;
}
safe_strcpy(v9, 30LL);
LABEL_9:
v8 = a5 + 110;
goto LABEL_10;
}
*(_DWORD *)(a5 + 8) = 2;
safe_strcpy(a5 + 80, 30LL);
v8 = a5 + 110;
LABEL_10:
safe_strcpy(v8, 30LL);
return 0LL;
}
| lzr_redis_handle_reponse:
PUSH RBP
PUSH R15
PUSH R14
PUSH RBX
PUSH RAX
MOV RBX,R8
MOV EBP,ECX
MOV R15,RDX
CMP ECX,0x7
JNZ 0x0012cbd1
LEA RDX,[0x168ed2]
MOV RDI,R15
MOV ESI,0x7
MOV ECX,0x4
CALL 0x00151551
TEST RAX,RAX
JZ 0x0012cbd1
MOV dword ptr [RBX + 0x8],0x2
LEA RDI,[RBX + 0x50]
LEA RDX,[0x168eee]
MOV ESI,0x1e
CALL 0x00151195
ADD RBX,0x6e
LEA RDX,[0x16a160]
MOV ESI,0x1e
MOV RDI,RBX
JMP 0x0012cc52
LAB_0012cbd1:
LEA RDX,[0x168ed7]
MOV RDI,R15
MOV ESI,EBP
MOV ECX,0x5
CALL 0x00151551
LEA R14,[RBX + 0x6e]
TEST RAX,RAX
JZ 0x0012cc0c
MOV dword ptr [RBX + 0x8],0x2
ADD RBX,0x50
LEA RDX,[0x168eee]
MOV ESI,0x1e
MOV RDI,RBX
JMP 0x0012cc3e
LAB_0012cc0c:
LEA RDX,[0x168edd]
MOV RDI,R15
MOV ESI,EBP
MOV ECX,0xc
CALL 0x00151551
LEA RDI,[RBX + 0x50]
TEST RAX,RAX
JZ 0x0012cc64
MOV dword ptr [RBX + 0x8],0x2
LEA RDX,[0x168eee]
MOV ESI,0x1e
LAB_0012cc3e:
CALL 0x00151195
LEA RDX,[0x16a160]
LAB_0012cc4a:
MOV ESI,0x1e
MOV RDI,R14
LAB_0012cc52:
CALL 0x00151195
XOR EAX,EAX
ADD RSP,0x8
POP RBX
POP R14
POP R15
POP RBP
RET
LAB_0012cc64:
MOV dword ptr [RBX + 0x8],0x1
LEA RDX,[0x168eea]
MOV ESI,0x1e
CALL 0x00151195
LEA RDX,[0x16a10a]
JMP 0x0012cc4a
|
int8
lzr_redis_handle_reponse
(int8 param_1,int8 param_2,int8 param_3,int param_4,long param_5)
{
long lVar1;
char *pcVar2;
if ((param_4 == 7) && (lVar1 = safe_memmem(param_3,7,&DAT_00168ed2,4), lVar1 != 0)) {
*(int4 *)(param_5 + 8) = 2;
safe_strcpy(param_5 + 0x50,0x1e,"redis");
pcVar2 = "matched";
}
else {
lVar1 = safe_memmem(param_3,param_4,"Redis",5);
if (lVar1 == 0) {
lVar1 = safe_memmem(param_3,param_4,"-ERR unknown",0xc);
if (lVar1 == 0) {
*(int4 *)(param_5 + 8) = 1;
safe_strcpy(param_5 + 0x50,0x1e,"not redis");
pcVar2 = "not matched";
goto LAB_0012cc52;
}
*(int4 *)(param_5 + 8) = 2;
}
else {
*(int4 *)(param_5 + 8) = 2;
}
safe_strcpy(param_5 + 0x50,0x1e,"redis");
pcVar2 = "matched";
}
LAB_0012cc52:
safe_strcpy(param_5 + 0x6e,0x1e,pcVar2);
return 0;
}
| |
47,888 | nglog::LogDestination::~LogDestination() | ng-log[P]ng-log/src/logging.cc | void LogDestination::SetLoggerImpl(base::Logger* logger) {
if (logger_ == logger) {
// Prevent releasing currently held sink on reset
return;
}
if (logger_ && logger_ != &fileobject_) {
// Delete user-specified logger set via SetLogger().
delete logger_;
}
logger_ = logger;
} | O1 | cpp | nglog::LogDestination::~LogDestination():
pushq %rbx
movq %rdi, %rbx
movq 0xc8(%rdi), %rdi
cmpq %rbx, %rdi
je 0x19f9a
testq %rdi, %rdi
je 0x19f93
movq (%rdi), %rax
callq *0x8(%rax)
movq %rbx, 0xc8(%rbx)
movq %rbx, %rdi
popq %rbx
jmp 0x19fa0
| _ZN5nglog14LogDestinationD2Ev:
push rbx; Alternative name is 'nglog::LogDestination::~LogDestination()'
mov rbx, rdi
mov rdi, [rdi+0C8h]
cmp rdi, rbx
jz short loc_19F9A
test rdi, rdi
jz short loc_19F93
mov rax, [rdi]
call qword ptr [rax+8]
loc_19F93:
mov [rbx+0C8h], rbx
loc_19F9A:
mov rdi, rbx; this
pop rbx
jmp short $+2; nglog::`anonymous namespace'::LogFileObject::~LogFileObject()
| void nglog::LogDestination::~LogDestination(nglog::LogDestination *this)
{
nglog::LogDestination *v2; // rdi
v2 = (nglog::LogDestination *)*((_QWORD *)this + 25);
if ( v2 != this )
{
if ( v2 )
(*(void ( **)(nglog::LogDestination *))(*(_QWORD *)v2 + 8LL))(v2);
*((_QWORD *)this + 25) = this;
}
nglog::`anonymous namespace'::LogFileObject::~LogFileObject(this);
}
| ~LogDestination:
PUSH RBX
MOV RBX,RDI
MOV RDI,qword ptr [RDI + 0xc8]
CMP RDI,RBX
JZ 0x00119f9a
TEST RDI,RDI
JZ 0x00119f93
MOV RAX,qword ptr [RDI]
CALL qword ptr [RAX + 0x8]
LAB_00119f93:
MOV qword ptr [RBX + 0xc8],RBX
LAB_00119f9a:
MOV RDI,RBX
POP RBX
JMP 0x00119fa0
|
/* nglog::LogDestination::~LogDestination() */
void __thiscall nglog::LogDestination::~LogDestination(LogDestination *this)
{
LogDestination *pLVar1;
pLVar1 = *(LogDestination **)(this + 200);
if (pLVar1 != this) {
if (pLVar1 != (LogDestination *)0x0) {
(**(code **)(*(long *)pLVar1 + 8))();
}
*(LogDestination **)(this + 200) = this;
}
(anonymous_namespace)::LogFileObject::~LogFileObject((LogFileObject *)this);
return;
}
| |
47,889 | nglog::LogDestination::~LogDestination() | ng-log[P]ng-log/src/logging.cc | void LogDestination::SetLoggerImpl(base::Logger* logger) {
if (logger_ == logger) {
// Prevent releasing currently held sink on reset
return;
}
if (logger_ && logger_ != &fileobject_) {
// Delete user-specified logger set via SetLogger().
delete logger_;
}
logger_ = logger;
} | O3 | cpp | nglog::LogDestination::~LogDestination():
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %r14
movq 0xc8(%rdi), %rdi
cmpq %rsi, %rdi
je 0x1919d
movq %rsi, %rbx
testq %rdi, %rdi
sete %al
cmpq %r14, %rdi
sete %cl
orb %al, %cl
jne 0x19196
movq (%rdi), %rax
callq *0x8(%rax)
movq %rbx, 0xc8(%r14)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
nop
| _ZN5nglog14LogDestination13SetLoggerImplEPNS_4base6LoggerE:
push r14
push rbx
push rax
mov r14, rdi
mov rdi, [rdi+0C8h]
cmp rdi, rsi
jz short loc_1919D
mov rbx, rsi
test rdi, rdi
setz al
cmp rdi, r14
setz cl
or cl, al
jnz short loc_19196
mov rax, [rdi]
call qword ptr [rax+8]
loc_19196:
mov [r14+0C8h], rbx
loc_1919D:
add rsp, 8
pop rbx
pop r14
retn
| char nglog::LogDestination::SetLoggerImpl(nglog::LogDestination *this, nglog::base::Logger *a2)
{
nglog::base::Logger *v3; // rdi
char result; // al
v3 = (nglog::base::Logger *)*((_QWORD *)this + 25);
if ( v3 != a2 )
{
result = v3 == 0LL;
if ( v3 != 0LL && v3 != this )
result = (*(long long ( **)(nglog::base::Logger *))(*(_QWORD *)v3 + 8LL))(v3);
*((_QWORD *)this + 25) = a2;
}
return result;
}
| SetLoggerImpl:
PUSH R14
PUSH RBX
PUSH RAX
MOV R14,RDI
MOV RDI,qword ptr [RDI + 0xc8]
CMP RDI,RSI
JZ 0x0011919d
MOV RBX,RSI
TEST RDI,RDI
SETZ AL
CMP RDI,R14
SETZ CL
OR CL,AL
JNZ 0x00119196
MOV RAX,qword ptr [RDI]
CALL qword ptr [RAX + 0x8]
LAB_00119196:
MOV qword ptr [R14 + 0xc8],RBX
LAB_0011919d:
ADD RSP,0x8
POP RBX
POP R14
RET
|
/* nglog::LogDestination::SetLoggerImpl(nglog::base::Logger*) */
void __thiscall nglog::LogDestination::SetLoggerImpl(LogDestination *this,Logger *param_1)
{
Logger *pLVar1;
pLVar1 = *(Logger **)(this + 200);
if (pLVar1 != param_1) {
if (pLVar1 != (Logger *)this && pLVar1 != (Logger *)0x0) {
(**(code **)(*(long *)pLVar1 + 8))();
}
*(Logger **)(this + 200) = param_1;
}
return;
}
| |
47,890 | psi_mutex_lock | eloqsql/mysys/my_thr_init.c | ATTRIBUTE_COLD int psi_mutex_lock(mysql_mutex_t *that,
const char *file, uint line)
{
PSI_mutex_locker_state state;
PSI_mutex_locker *locker= PSI_MUTEX_CALL(start_mutex_wait)
(&state, that->m_psi, PSI_MUTEX_LOCK, file, line);
# ifdef SAFE_MUTEX
int result= safe_mutex_lock(&that->m_mutex, FALSE, file, line);
# else
int result= pthread_mutex_lock(&that->m_mutex);
# endif
if (locker)
PSI_MUTEX_CALL(end_mutex_wait)(locker, result);
return result;
} | O0 | c | psi_mutex_lock:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
leaq 0x1b9886(%rip), %rax # 0x215330
movq (%rax), %rax
movq 0x190(%rax), %rax
movq -0x8(%rbp), %rcx
movq 0x40(%rcx), %rsi
movq -0x10(%rbp), %rcx
movl -0x14(%rbp), %r8d
leaq -0x48(%rbp), %rdi
xorl %edx, %edx
callq *%rax
movq %rax, -0x50(%rbp)
movq -0x8(%rbp), %rdi
callq 0x264b0
movl %eax, -0x54(%rbp)
cmpq $0x0, -0x50(%rbp)
je 0x5bafd
leaq 0x1b9846(%rip), %rax # 0x215330
movq (%rax), %rax
movq 0x198(%rax), %rax
movq -0x50(%rbp), %rdi
movl -0x54(%rbp), %esi
callq *%rax
movl -0x54(%rbp), %eax
addq $0x60, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
| psi_mutex_lock:
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+190h]
mov rcx, [rbp+var_8]
mov rsi, [rcx+40h]
mov rcx, [rbp+var_10]
mov r8d, [rbp+var_14]
lea rdi, [rbp+var_48]
xor edx, edx
call rax
mov [rbp+var_50], rax
mov rdi, [rbp+var_8]
call _pthread_mutex_lock
mov [rbp+var_54], eax
cmp [rbp+var_50], 0
jz short loc_5BAFD
lea rax, PSI_server
mov rax, [rax]
mov rax, [rax+198h]
mov rdi, [rbp+var_50]
mov esi, [rbp+var_54]
call rax
loc_5BAFD:
mov eax, [rbp+var_54]
add rsp, 60h
pop rbp
retn
| long long psi_mutex_lock(long long a1, long long a2, unsigned int a3)
{
unsigned int v4; // [rsp+Ch] [rbp-54h]
long long v5; // [rsp+10h] [rbp-50h]
_BYTE v6[52]; // [rsp+18h] [rbp-48h] BYREF
unsigned int v7; // [rsp+4Ch] [rbp-14h]
long long v8; // [rsp+50h] [rbp-10h]
long long v9; // [rsp+58h] [rbp-8h]
v9 = a1;
v8 = a2;
v7 = a3;
v5 = ((long long ( *)(_BYTE *, _QWORD, _QWORD, long long, _QWORD))PSI_server[50])(
v6,
*(_QWORD *)(a1 + 64),
0LL,
a2,
a3);
v4 = pthread_mutex_lock(v9);
if ( v5 )
((void ( *)(long long, _QWORD))PSI_server[51])(v5, v4);
return v4;
}
| psi_mutex_lock:
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,[0x315330]
MOV RAX,qword ptr [RAX]
MOV RAX,qword ptr [RAX + 0x190]
MOV RCX,qword ptr [RBP + -0x8]
MOV RSI,qword ptr [RCX + 0x40]
MOV RCX,qword ptr [RBP + -0x10]
MOV R8D,dword ptr [RBP + -0x14]
LEA RDI,[RBP + -0x48]
XOR EDX,EDX
CALL RAX
MOV qword ptr [RBP + -0x50],RAX
MOV RDI,qword ptr [RBP + -0x8]
CALL 0x001264b0
MOV dword ptr [RBP + -0x54],EAX
CMP qword ptr [RBP + -0x50],0x0
JZ 0x0015bafd
LEA RAX,[0x315330]
MOV RAX,qword ptr [RAX]
MOV RAX,qword ptr [RAX + 0x198]
MOV RDI,qword ptr [RBP + -0x50]
MOV ESI,dword ptr [RBP + -0x54]
CALL RAX
LAB_0015bafd:
MOV EAX,dword ptr [RBP + -0x54]
ADD RSP,0x60
POP RBP
RET
|
int psi_mutex_lock(pthread_mutex_t *param_1,int8 param_2,int4 param_3)
{
int iVar1;
long lVar2;
int1 local_50 [52];
int4 local_1c;
int8 local_18;
pthread_mutex_t *local_10;
local_1c = param_3;
local_18 = param_2;
local_10 = param_1;
lVar2 = (**(code **)(PSI_server + 400))
(local_50,*(int8 *)((long)param_1 + 0x40),0,param_2,param_3);
iVar1 = pthread_mutex_lock(local_10);
if (lVar2 != 0) {
(**(code **)(PSI_server + 0x198))(lVar2,iVar1);
}
return iVar1;
}
| |
47,891 | my_strnncollsp_padspace_bin | eloqsql/strings/ctype-bin.c | int my_strnncollsp_padspace_bin(const uchar *str, size_t length)
{
for ( ; length ; str++, length--)
{
if (*str < ' ')
return -1;
else if (*str > ' ')
return 1;
}
return 0;
} | O3 | c | my_strnncollsp_padspace_bin:
pushq %rbp
movq %rsp, %rbp
testq %rsi, %rsi
je 0xac440
xorl %eax, %eax
cmpb $0x20, (%rdi,%rax)
jb 0xac444
jne 0xac44b
incq %rax
cmpq %rax, %rsi
jne 0xac430
xorl %eax, %eax
jmp 0xac450
movl $0xffffffff, %eax # imm = 0xFFFFFFFF
jmp 0xac450
movl $0x1, %eax
popq %rbp
retq
| my_strnncollsp_padspace_bin:
push rbp
mov rbp, rsp
test rsi, rsi
jz short loc_AC440
xor eax, eax
loc_AC430:
cmp byte ptr [rdi+rax], 20h ; ' '
jb short loc_AC444
jnz short loc_AC44B
inc rax
cmp rsi, rax
jnz short loc_AC430
loc_AC440:
xor eax, eax
jmp short loc_AC450
loc_AC444:
mov eax, 0FFFFFFFFh
jmp short loc_AC450
loc_AC44B:
mov eax, 1
loc_AC450:
pop rbp
retn
| long long my_strnncollsp_padspace_bin(long long a1, long long a2)
{
long long v2; // rax
if ( !a2 )
return 0LL;
v2 = 0LL;
while ( 1 )
{
if ( *(_BYTE *)(a1 + v2) < 0x20u )
return 0xFFFFFFFFLL;
if ( *(_BYTE *)(a1 + v2) != 32 )
break;
if ( a2 == ++v2 )
return 0LL;
}
return 1LL;
}
| my_strnncollsp_padspace_bin:
PUSH RBP
MOV RBP,RSP
TEST RSI,RSI
JZ 0x001ac440
XOR EAX,EAX
LAB_001ac430:
CMP byte ptr [RDI + RAX*0x1],0x20
JC 0x001ac444
JNZ 0x001ac44b
INC RAX
CMP RSI,RAX
JNZ 0x001ac430
LAB_001ac440:
XOR EAX,EAX
JMP 0x001ac450
LAB_001ac444:
MOV EAX,0xffffffff
JMP 0x001ac450
LAB_001ac44b:
MOV EAX,0x1
LAB_001ac450:
POP RBP
RET
|
int8 my_strnncollsp_padspace_bin(long param_1,long param_2)
{
long lVar1;
if (param_2 != 0) {
lVar1 = 0;
do {
if (*(byte *)(param_1 + lVar1) < 0x20) {
return 0xffffffff;
}
if (*(byte *)(param_1 + lVar1) != 0x20) {
return 1;
}
lVar1 = lVar1 + 1;
} while (param_2 != lVar1);
}
return 0;
}
| |
47,892 | gguf_set_val_bool | ngxson[P]ggml-easy/ggml/src/gguf.cpp | void gguf_set_val_bool(struct gguf_context * ctx, const char * key, bool val) {
gguf_check_reserved_keys(key, val);
gguf_remove_key(ctx, key);
ctx->kv.emplace_back(key, val);
} | O1 | cpp | gguf_set_val_bool:
pushq %r14
pushq %rbx
subq $0x38, %rsp
movq %rdi, %rbx
movq %rsi, 0x10(%rsp)
movb %dl, 0xe(%rsp)
leaq 0x18(%rsp), %r14
leaq 0xf(%rsp), %rdx
movq %r14, %rdi
callq 0x17d00
leaq 0x1b4fe(%rip), %rsi # 0x59e92
movq %r14, %rdi
callq 0x163e0
testl %eax, %eax
je 0x3e9e7
leaq 0x28(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x3e9bb
movq 0x28(%rsp), %rsi
incq %rsi
callq 0x17080
leaq 0x10(%rsp), %r14
movq (%r14), %rsi
movq %rbx, %rdi
callq 0x17660
addq $0x8, %rbx
leaq 0xe(%rsp), %rdx
movq %rbx, %rdi
movq %r14, %rsi
callq 0x160c0
addq $0x38, %rsp
popq %rbx
popq %r14
retq
leaq 0x1b437(%rip), %rdi # 0x59e25
leaq 0x1bc91(%rip), %rdx # 0x5a686
movl $0x3a8, %esi # imm = 0x3A8
xorl %eax, %eax
callq 0x17c70
movq %rax, %rbx
leaq 0x28(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x3ea1f
movq 0x28(%rsp), %rsi
incq %rsi
callq 0x17080
movq %rbx, %rdi
callq 0x17e30
| gguf_set_val_bool:
push r14
push rbx
sub rsp, 38h
mov rbx, rdi
mov [rsp+48h+var_38], rsi
mov [rsp+48h+var_3A], dl
lea r14, [rsp+48h+var_30]
lea rdx, [rsp+48h+var_39]
mov rdi, r14
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&)
lea rsi, aGeneralAlignme; "general.alignment"
mov rdi, r14
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7compareEPKc; std::string::compare(char const*)
test eax, eax
jz short loc_3E9E7
lea rax, [rsp+48h+var_20]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_3E9BB
mov rsi, [rsp+48h+var_20]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_3E9BB:
lea r14, [rsp+48h+var_38]
mov rsi, [r14]
mov rdi, rbx
call _gguf_remove_key
add rbx, 8
lea rdx, [rsp+48h+var_3A]
mov rdi, rbx
mov rsi, r14
call __ZNSt6vectorI7gguf_kvSaIS0_EE12emplace_backIJRPKcRbEEERS0_DpOT_; std::vector<gguf_kv>::emplace_back<char const*&,bool &>(char const*&,bool &)
add rsp, 38h
pop rbx
pop r14
retn
loc_3E9E7:
lea rdi, aWorkspaceLlm4b_5; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGeneralAlignme_0; "general.alignment must be type u32"
mov esi, 3A8h
xor eax, eax
call _ggml_abort
mov rbx, rax
lea rax, [rsp+48h+var_20]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_3EA1F
mov rsi, [rsp+48h+var_20]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_3EA1F:
mov rdi, rbx
call __Unwind_Resume
| long long gguf_set_val_bool(long long a1, long long a2, char a3)
{
int v3; // ecx
int v4; // r8d
int v5; // r9d
char v7; // [rsp+Eh] [rbp-3Ah] BYREF
char v8; // [rsp+Fh] [rbp-39h] BYREF
long long v9; // [rsp+10h] [rbp-38h] BYREF
void *v10[2]; // [rsp+18h] [rbp-30h] BYREF
long long v11; // [rsp+28h] [rbp-20h] BYREF
v9 = a2;
v7 = a3;
std::string::basic_string<std::allocator<char>>(v10, a2, &v8);
if ( !(unsigned int)std::string::compare(v10, "general.alignment") )
ggml_abort(
(unsigned int)"/workspace/llm4binary/github/2025_star3/ngxson[P]ggml-easy/ggml/src/gguf.cpp",
936,
(unsigned int)"general.alignment must be type u32",
v3,
v4,
v5);
if ( v10[0] != &v11 )
operator delete(v10[0], v11 + 1);
gguf_remove_key(a1, v9);
return std::vector<gguf_kv>::emplace_back<char const*&,bool &>(a1 + 8, &v9, &v7);
}
| gguf_set_val_bool:
PUSH R14
PUSH RBX
SUB RSP,0x38
MOV RBX,RDI
MOV qword ptr [RSP + 0x10],RSI
MOV byte ptr [RSP + 0xe],DL
LEA R14,[RSP + 0x18]
LEA RDX,[RSP + 0xf]
MOV RDI,R14
CALL 0x00117d00
LEA RSI,[0x159e92]
MOV RDI,R14
CALL 0x001163e0
TEST EAX,EAX
JZ 0x0013e9e7
LEA RAX,[RSP + 0x28]
MOV RDI,qword ptr [RAX + -0x10]
CMP RDI,RAX
JZ 0x0013e9bb
MOV RSI,qword ptr [RSP + 0x28]
INC RSI
CALL 0x00117080
LAB_0013e9bb:
LEA R14,[RSP + 0x10]
MOV RSI,qword ptr [R14]
MOV RDI,RBX
CALL 0x00117660
ADD RBX,0x8
LEA RDX,[RSP + 0xe]
MOV RDI,RBX
MOV RSI,R14
CALL 0x001160c0
ADD RSP,0x38
POP RBX
POP R14
RET
LAB_0013e9e7:
LEA RDI,[0x159e25]
LEA RDX,[0x15a686]
MOV ESI,0x3a8
XOR EAX,EAX
CALL 0x00117c70
|
void gguf_set_val_bool(long param_1,char *param_2,int1 param_3)
{
int iVar1;
bool local_3a;
allocator local_39;
char *local_38;
long *local_30 [2];
long local_20 [2];
local_3a = (bool)param_3;
local_38 = param_2;
std::__cxx11::string::string<std::allocator<char>>((string *)local_30,param_2,&local_39);
iVar1 = std::__cxx11::string::compare((char *)local_30);
if (iVar1 != 0) {
if (local_30[0] != local_20) {
operator_delete(local_30[0],local_20[0] + 1);
}
gguf_remove_key(param_1,local_38);
std::vector<gguf_kv,std::allocator<gguf_kv>>::emplace_back<char_const*&,bool&>
((vector<gguf_kv,std::allocator<gguf_kv>> *)(param_1 + 8),&local_38,&local_3a);
return;
}
/* try { // try from 0013e9e7 to 0013ea00 has its CatchHandler @ 0013ea01 */
/* WARNING: Subroutine does not return */
ggml_abort("/workspace/llm4binary/github/2025_star3/ngxson[P]ggml-easy/ggml/src/gguf.cpp",0x3a8,
"general.alignment must be type u32");
}
| |
47,893 | init_simple_key_cache | eloqsql/mysys/mf_keycache.c | static
int init_simple_key_cache(SIMPLE_KEY_CACHE_CB *keycache,
uint key_cache_block_size,
size_t use_mem, uint division_limit,
uint age_threshold, uint changed_blocks_hash_size)
{
size_t blocks, hash_links;
size_t length;
int error;
DBUG_ENTER("init_simple_key_cache");
DBUG_ASSERT(key_cache_block_size >= 512);
KEYCACHE_DEBUG_OPEN;
if (keycache->key_cache_inited && keycache->disk_blocks > 0)
{
DBUG_PRINT("warning",("key cache already in use"));
DBUG_RETURN(0);
}
keycache->blocks_used= keycache->blocks_unused= 0;
keycache->global_blocks_changed= 0;
keycache->global_cache_w_requests= keycache->global_cache_r_requests= 0;
keycache->global_cache_read= keycache->global_cache_write= 0;
keycache->disk_blocks= -1;
if (! keycache->key_cache_inited)
{
keycache->key_cache_inited= 1;
keycache->hash_factor= 1;
/*
Initialize these variables once only.
Their value must survive re-initialization during resizing.
*/
keycache->in_resize= 0;
keycache->resize_in_flush= 0;
keycache->cnt_for_resize_op= 0;
keycache->waiting_for_resize_cnt.last_thread= NULL;
keycache->in_init= 0;
mysql_mutex_init(key_KEY_CACHE_cache_lock,
&keycache->cache_lock, MY_MUTEX_INIT_FAST);
keycache->resize_queue.last_thread= NULL;
}
keycache->key_cache_mem_size= use_mem;
keycache->key_cache_block_size= key_cache_block_size;
DBUG_PRINT("info", ("key_cache_block_size: %u",
key_cache_block_size));
blocks= use_mem / (sizeof(BLOCK_LINK) + 2 * sizeof(HASH_LINK) +
sizeof(HASH_LINK*) * 5/4 + key_cache_block_size);
/* Changed blocks hash needs to be a power of 2 */
changed_blocks_hash_size= my_round_up_to_next_power(MY_MAX(changed_blocks_hash_size,
MIN_CHANGED_BLOCKS_HASH_SIZE));
/* It doesn't make sense to have too few blocks (less than 8) */
if (blocks >= 8)
{
for ( ; ; )
{
/* Set my_hash_entries to the next bigger 2 power */
if ((keycache->hash_entries= next_power((uint)blocks)) < blocks * 5/4)
keycache->hash_entries<<= 1;
hash_links= 2 * blocks;
#if defined(MAX_THREADS)
if (hash_links < MAX_THREADS + blocks - 1)
hash_links= MAX_THREADS + blocks - 1;
#endif
while ((length= (ALIGN_SIZE(blocks * sizeof(BLOCK_LINK)) +
ALIGN_SIZE(hash_links * sizeof(HASH_LINK)) +
ALIGN_SIZE(sizeof(HASH_LINK*) *
keycache->hash_entries) +
sizeof(BLOCK_LINK*)* ((size_t)changed_blocks_hash_size*2))) +
(blocks * keycache->key_cache_block_size) > use_mem && blocks > 8)
blocks--;
keycache->allocated_mem_size= blocks * keycache->key_cache_block_size;
if ((keycache->block_mem= my_large_malloc(&keycache->allocated_mem_size,
MYF(0))))
{
/*
Allocate memory for blocks, hash_links and hash entries;
For each block 2 hash links are allocated
*/
if (my_multi_malloc_large(key_memory_KEY_CACHE, MYF(MY_ZEROFILL),
&keycache->block_root,
(ulonglong) (blocks * sizeof(BLOCK_LINK)),
&keycache->hash_root,
(ulonglong) (sizeof(HASH_LINK*) *
keycache->hash_entries),
&keycache->hash_link_root,
(ulonglong) (hash_links * sizeof(HASH_LINK)),
&keycache->changed_blocks,
(ulonglong) (sizeof(BLOCK_LINK*) *
changed_blocks_hash_size),
&keycache->file_blocks,
(ulonglong) (sizeof(BLOCK_LINK*) *
changed_blocks_hash_size),
NullS))
break;
my_large_free(keycache->block_mem, keycache->allocated_mem_size);
keycache->block_mem= 0;
}
if (blocks < 8)
{
my_errno= ENOMEM;
my_error(EE_OUTOFMEMORY, MYF(ME_FATAL),
blocks * keycache->key_cache_block_size);
goto err;
}
blocks= blocks / 4*3;
}
keycache->blocks_unused= blocks;
keycache->disk_blocks= (int) blocks;
keycache->hash_links= (int)hash_links;
keycache->hash_links_used= 0;
keycache->free_hash_list= NULL;
keycache->blocks_used= keycache->blocks_changed= 0;
keycache->global_blocks_changed= 0;
keycache->blocks_available=0; /* For debugging */
/* The LRU chain is empty after initialization */
keycache->used_last= NULL;
keycache->used_ins= NULL;
keycache->free_block_list= NULL;
keycache->keycache_time= 0;
keycache->warm_blocks= 0;
keycache->min_warm_blocks= (division_limit ?
blocks * division_limit / 100 + 1 :
blocks);
keycache->age_threshold= (age_threshold ?
blocks * age_threshold / 100 :
blocks);
keycache->changed_blocks_hash_size= changed_blocks_hash_size;
keycache->can_be_used= 1;
keycache->waiting_for_hash_link.last_thread= NULL;
keycache->waiting_for_block.last_thread= NULL;
DBUG_PRINT("exit",
("disk_blocks: %d block_root: %p hash_entries: %d\
hash_root: %p hash_links: %d hash_link_root: %p",
keycache->disk_blocks, keycache->block_root,
keycache->hash_entries, keycache->hash_root,
keycache->hash_links, keycache->hash_link_root));
}
else
{
/* key_buffer_size is specified too small. Disable the cache. */
keycache->can_be_used= 0;
}
keycache->blocks= keycache->disk_blocks > 0 ? keycache->disk_blocks : 0;
DBUG_RETURN((int) keycache->disk_blocks);
err:
error= my_errno;
keycache->disk_blocks= 0;
keycache->blocks= 0;
if (keycache->block_mem)
{
my_large_free((uchar*) keycache->block_mem, keycache->allocated_mem_size);
keycache->block_mem= NULL;
}
if (keycache->block_root)
{
my_free(keycache->block_root);
keycache->block_root= NULL;
}
my_errno= error;
keycache->can_be_used= 0;
DBUG_RETURN(0);
} | O3 | c | init_simple_key_cache:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x78, %rsp
movl %r9d, %ebx
movq %rdx, %r9
movl %esi, %r13d
movq %rdi, %r10
movb (%rdi), %al
testb %al, %al
je 0x98c9a
xorl %r14d, %r14d
cmpl $0x0, 0x48(%r10)
jg 0x99106
xorps %xmm0, %xmm0
movups %xmm0, 0x50(%r10)
movups %xmm0, 0x138(%r10)
movups %xmm0, 0x148(%r10)
movq $0x0, 0x158(%r10)
movl $0xffffffff, 0x48(%r10) # imm = 0xFFFFFFFF
testb %al, %al
movq %r10, -0x30(%rbp)
movq %r9, -0x50(%rbp)
jne 0x98d6d
movw $0x1, (%r10)
movl $0x1, 0x164(%r10)
xorl %r15d, %r15d
movb %r15b, 0x2(%r10)
movq %r15, 0x70(%r10)
movq %r15, 0x110(%r10)
movb %r15b, 0x168(%r10)
leaq 0xb6f016(%rip), %rax # 0xc07d1c
movl (%rax), %edi
leaq 0xc0(%r10), %r14
leaq 0x2ed2fa(%rip), %rax # 0x386010
movq (%rax), %rax
movq %r14, %rsi
movl %ecx, -0x34(%rbp)
movl %r8d, %r12d
callq *0x40(%rax)
movq -0x30(%rbp), %rcx
movq %rax, 0x100(%rcx)
movq -0x30(%rbp), %rax
movq %r14, 0xf8(%rax)
movq -0x30(%rbp), %rax
xorps %xmm0, %xmm0
movups %xmm0, 0xe8(%rax)
leaq 0xb6fce0(%rip), %rsi # 0xc08a30
movq %r14, %rdi
callq 0x29340
movl %r12d, %r8d
movq -0x50(%rbp), %r9
movl -0x34(%rbp), %ecx
movq -0x30(%rbp), %r10
movq %r15, 0x108(%r10)
movq %r9, 0x8(%r10)
movl %r13d, 0x18(%r10)
movl %r13d, %esi
addq $0xda, %rsi
movq %r9, %rax
xorl %edx, %edx
divq %rsi
movq %rax, %rdi
cmpl $0x81, %ebx
movl $0x80, %eax
cmovael %ebx, %eax
cmpq $0x8, %rdi
jb 0x98fae
decl %eax
movl %eax, %edx
shrl %edx
orl %eax, %edx
movl %edx, %eax
shrl $0x2, %eax
orl %edx, %eax
movl %eax, %edx
shrl $0x4, %edx
orl %eax, %edx
movl %edx, %eax
shrl $0x8, %eax
orl %edx, %eax
movl %eax, %edx
shrl $0x10, %edx
orl %eax, %edx
incl %edx
movl %edx, -0x38(%rbp)
movl %edx, %edx
movq %rdx, %rax
shlq $0x4, %rax
movq %rax, -0x98(%rbp)
leaq 0x10(%r10), %rax
movq %rax, -0x90(%rbp)
leaq 0xa0(%r10), %rax
movq %rax, -0x48(%rbp)
leaq 0x80(%r10), %rax
movq %rax, -0x70(%rbp)
leaq 0x88(%r10), %rax
movq %rax, -0x68(%rbp)
leaq 0x128(%r10), %rax
movq %rax, -0x60(%rbp)
shlq $0x3, %rdx
movq %rdx, -0x78(%rbp)
leaq 0x130(%r10), %rax
movq %rax, -0x58(%rbp)
movl %r8d, -0x3c(%rbp)
movl %r8d, %r11d
movl %ecx, -0x34(%rbp)
movl %ecx, %r12d
movq %r10, %r8
movq %r11, -0x80(%rbp)
leal -0x1(%rdi), %eax
movl %eax, %ecx
shrl %ecx
orl %eax, %ecx
movl %ecx, %eax
shrl $0x2, %eax
orl %ecx, %eax
movl %eax, %ecx
shrl $0x4, %ecx
orl %eax, %ecx
movl %ecx, %eax
shrl $0x8, %eax
orl %ecx, %eax
movl %eax, %ecx
shrl $0x10, %ecx
orl %eax, %ecx
leal 0x2(,%rcx,2), %edx
movq %rdi, %rax
shrq $0x2, %rax
addq %rdi, %rax
cmpq %rdx, %rax
seta %cl
shll %cl, %edx
movl %edx, 0x38(%r8)
movq %rdi, %rax
shlq $0x5, %rax
leaq (%rax,%rax,2), %rax
movq %rax, -0xa0(%rbp)
movl %r13d, %eax
leaq 0x1(%rdi), %r14
movq %r11, %r13
imulq %r14, %r13
movq %r12, %rbx
imulq %r14, %rbx
movq %r14, %rcx
imulq %rax, %rcx
leaq 0xd0(%rax), %rsi
imulq %rdi, %rsi
addq -0x98(%rbp), %rsi
leaq (%rsi,%rdx,8), %rsi
movq $-0x70, %rdx
subq %rax, %rdx
movq %rdi, -0x88(%rbp)
imulq $0x70, %rdi, %r15
addq $0x70, %r15
decq %r14
subq %r11, %r13
subq %r12, %rbx
subq %rax, %rcx
addq $-0x70, %r15
cmpq $0x9, %r14
jb 0x98efa
leaq (%rsi,%rdx), %rdi
cmpq %r9, %rsi
movq %rdi, %rsi
ja 0x98ed8
movq %rcx, 0x10(%r8)
movq -0x90(%rbp), %rdi
xorl %esi, %esi
callq 0xa7ad4
movq -0x30(%rbp), %r8
movq %rax, 0xa8(%r8)
testq %rax, %rax
je 0x98f8f
leaq 0xb6f795(%rip), %rax # 0xc086b8
movl (%rax), %edi
movl 0x38(%r8), %r9d
shlq $0x3, %r9
subq $0x8, %rsp
movl $0x20, %esi
movq -0x48(%rbp), %rdx
movq %r15, %rcx
movq %r8, %r15
movq -0x70(%rbp), %r8
xorl %eax, %eax
pushq $0x0
movq -0x78(%rbp), %r10
pushq %r10
pushq -0x58(%rbp)
pushq %r10
pushq -0x60(%rbp)
pushq -0xa0(%rbp)
pushq -0x68(%rbp)
callq 0x9c9ed
addq $0x40, %rsp
testq %rax, %rax
jne 0x99052
movq 0x10(%r15), %rsi
movq 0xa8(%r15), %rdi
callq 0xa7f83
movq $0x0, 0xa8(%r15)
movq %r15, %r8
cmpq $0x7, %r14
jbe 0x98fbc
shrq $0x2, %r14
leaq (%r14,%r14,2), %rdi
movl 0x18(%r8), %r13d
movq -0x50(%rbp), %r9
movq -0x80(%rbp), %r11
jmp 0x98e39
movb $0x0, 0x3(%r10)
movl 0x48(%r10), %r14d
jmp 0x990f6
callq 0xa1b22
movl $0xc, (%rax)
movq -0x30(%rbp), %rax
movl 0x18(%rax), %eax
imulq %rax, %r14
xorl %r15d, %r15d
movl $0x1000, %esi # imm = 0x1000
movl $0x5, %edi
movq %r14, %rdx
xorl %eax, %eax
callq 0x9e1d7
callq 0xa1b22
movq -0x30(%rbp), %rcx
movl (%rax), %ebx
movl %r15d, 0x48(%rcx)
movl %r15d, 0x160(%rcx)
movq 0xa8(%rcx), %rdi
testq %rdi, %rdi
je 0x99023
movq 0x10(%rcx), %rsi
callq 0xa7f83
movq -0x30(%rbp), %rax
movq $0x0, 0xa8(%rax)
movq -0x48(%rbp), %r14
movq (%r14), %rdi
testq %rdi, %rdi
je 0x9903b
callq 0x9ffde
movq $0x0, (%r14)
callq 0xa1b22
movl %ebx, (%rax)
movq -0x30(%rbp), %rax
movb $0x0, 0x3(%rax)
xorl %r14d, %r14d
jmp 0x99106
movq %r14, 0x58(%r15)
movl %r14d, 0x48(%r15)
movq -0x88(%rbp), %rax
addl %eax, %eax
movl %eax, 0x40(%r15)
movl $0x0, 0x44(%r15)
xorl %eax, %eax
movq %rax, 0x50(%r15)
movq %rax, 0x138(%r15)
movq %rax, 0x78(%r15)
movq %rax, 0x30(%r15)
xorps %xmm0, %xmm0
movups %xmm0, 0x60(%r15)
movups %xmm0, 0x90(%r15)
movups %xmm0, 0xb0(%r15)
movabsq $0x28f5c28f5c28f5c3, %rcx # imm = 0x28F5C28F5C28F5C3
movq %r14, %rdx
cmpl $0x0, -0x34(%rbp)
movq %r15, %r10
je 0x990c3
shrq $0x2, %rbx
movq %rbx, %rax
mulq %rcx
shrq $0x2, %rdx
incq %rdx
movq %rdx, 0x20(%r10)
movq %r14, %rdx
cmpl $0x0, -0x3c(%rbp)
je 0x990de
shrq $0x2, %r13
movq %r13, %rax
mulq %rcx
shrq $0x2, %rdx
movq %rdx, 0x28(%r10)
movl -0x38(%rbp), %eax
movl %eax, 0x3c(%r10)
movb $0x1, 0x3(%r10)
movups %xmm0, 0x118(%r10)
xorl %eax, %eax
testl %r14d, %r14d
cmovgl %r14d, %eax
movl %eax, 0x160(%r10)
movl %r14d, %eax
addq $0x78, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| init_simple_key_cache:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 78h
mov ebx, r9d
mov r9, rdx
mov r13d, esi
mov r10, rdi
mov al, [rdi]
test al, al
jz short loc_98C9A
xor r14d, r14d
cmp dword ptr [r10+48h], 0
jg loc_99106
loc_98C9A:
xorps xmm0, xmm0
movups xmmword ptr [r10+50h], xmm0
movups xmmword ptr [r10+138h], xmm0
movups xmmword ptr [r10+148h], xmm0
mov qword ptr [r10+158h], 0
mov dword ptr [r10+48h], 0FFFFFFFFh
test al, al
mov [rbp+var_30], r10
mov [rbp+var_50], r9
jnz loc_98D6D
mov word ptr [r10], 1
mov dword ptr [r10+164h], 1
xor r15d, r15d
mov [r10+2], r15b
mov [r10+70h], r15
mov [r10+110h], r15
mov [r10+168h], r15b
lea rax, key_KEY_CACHE_cache_lock
mov edi, [rax]
lea r14, [r10+0C0h]
lea rax, PSI_server
mov rax, [rax]
mov rsi, r14
mov [rbp+var_34], ecx
mov r12d, r8d
call qword ptr [rax+40h]
mov rcx, [rbp+var_30]
mov [rcx+100h], rax
mov rax, [rbp+var_30]
mov [rax+0F8h], r14
mov rax, [rbp+var_30]
xorps xmm0, xmm0
movups xmmword ptr [rax+0E8h], xmm0
lea rsi, my_fast_mutexattr
mov rdi, r14
call _pthread_mutex_init
mov r8d, r12d
mov r9, [rbp+var_50]
mov ecx, [rbp+var_34]
mov r10, [rbp+var_30]
mov [r10+108h], r15
loc_98D6D:
mov [r10+8], r9
mov [r10+18h], r13d
mov esi, r13d
add rsi, 0DAh
mov rax, r9
xor edx, edx
div rsi
mov rdi, rax
cmp ebx, 81h
mov eax, 80h
cmovnb eax, ebx
cmp rdi, 8
jb loc_98FAE
dec eax
mov edx, eax
shr edx, 1
or edx, eax
mov eax, edx
shr eax, 2
or eax, edx
mov edx, eax
shr edx, 4
or edx, eax
mov eax, edx
shr eax, 8
or eax, edx
mov edx, eax
shr edx, 10h
or edx, eax
inc edx
mov [rbp+var_38], edx
mov edx, edx
mov rax, rdx
shl rax, 4
mov [rbp+var_98], rax
lea rax, [r10+10h]
mov [rbp+var_90], rax
lea rax, [r10+0A0h]
mov [rbp+var_48], rax
lea rax, [r10+80h]
mov [rbp+var_70], rax
lea rax, [r10+88h]
mov [rbp+var_68], rax
lea rax, [r10+128h]
mov [rbp+var_60], rax
shl rdx, 3
mov [rbp+var_78], rdx
lea rax, [r10+130h]
mov [rbp+var_58], rax
mov [rbp+var_3C], r8d
mov r11d, r8d
mov [rbp+var_34], ecx
mov r12d, ecx
mov r8, r10
mov [rbp+var_80], r11
loc_98E39:
lea eax, [rdi-1]
mov ecx, eax
shr ecx, 1
or ecx, eax
mov eax, ecx
shr eax, 2
or eax, ecx
mov ecx, eax
shr ecx, 4
or ecx, eax
mov eax, ecx
shr eax, 8
or eax, ecx
mov ecx, eax
shr ecx, 10h
or ecx, eax
lea edx, ds:2[rcx*2]
mov rax, rdi
shr rax, 2
add rax, rdi
cmp rax, rdx
setnbe cl
shl edx, cl
mov [r8+38h], edx
mov rax, rdi
shl rax, 5
lea rax, [rax+rax*2]
mov [rbp+var_A0], rax
mov eax, r13d
lea r14, [rdi+1]
mov r13, r11
imul r13, r14
mov rbx, r12
imul rbx, r14
mov rcx, r14
imul rcx, rax
lea rsi, [rax+0D0h]
imul rsi, rdi
add rsi, [rbp+var_98]
lea rsi, [rsi+rdx*8]
mov rdx, 0FFFFFFFFFFFFFF90h
sub rdx, rax
mov [rbp+var_88], rdi
imul r15, rdi, 70h ; 'p'
add r15, 70h ; 'p'
loc_98ED8:
dec r14
sub r13, r11
sub rbx, r12
sub rcx, rax
add r15, 0FFFFFFFFFFFFFF90h
cmp r14, 9
jb short loc_98EFA
lea rdi, [rsi+rdx]
cmp rsi, r9
mov rsi, rdi
ja short loc_98ED8
loc_98EFA:
mov [r8+10h], rcx
mov rdi, [rbp+var_90]
xor esi, esi
call my_large_malloc
mov r8, [rbp+var_30]
mov [r8+0A8h], rax
test rax, rax
jz short loc_98F8F
lea rax, key_memory_KEY_CACHE
mov edi, [rax]
mov r9d, [r8+38h]
shl r9, 3
sub rsp, 8
mov esi, 20h ; ' '
mov rdx, [rbp+var_48]
mov rcx, r15
mov r15, r8
mov r8, [rbp+var_70]
xor eax, eax
push 0
mov r10, [rbp+var_78]
push r10
push [rbp+var_58]
push r10
push [rbp+var_60]
push [rbp+var_A0]
push [rbp+var_68]
call my_multi_malloc_large
add rsp, 40h
test rax, rax
jnz loc_99052
mov rsi, [r15+10h]
mov rdi, [r15+0A8h]
call my_large_free
mov qword ptr [r15+0A8h], 0
mov r8, r15
loc_98F8F:
cmp r14, 7
jbe short loc_98FBC
shr r14, 2
lea rdi, [r14+r14*2]
mov r13d, [r8+18h]
mov r9, [rbp+var_50]
mov r11, [rbp+var_80]
jmp loc_98E39
loc_98FAE:
mov byte ptr [r10+3], 0
mov r14d, [r10+48h]
jmp loc_990F6
loc_98FBC:
call _my_thread_var
mov dword ptr [rax], 0Ch
mov rax, [rbp+var_30]
mov eax, [rax+18h]
imul r14, rax
xor r15d, r15d
mov esi, 1000h
mov edi, 5
mov rdx, r14
xor eax, eax
call my_error
call _my_thread_var
mov rcx, [rbp+var_30]
mov ebx, [rax]
mov [rcx+48h], r15d
mov [rcx+160h], r15d
mov rdi, [rcx+0A8h]
test rdi, rdi
jz short loc_99023
mov rsi, [rcx+10h]
call my_large_free
mov rax, [rbp+var_30]
mov qword ptr [rax+0A8h], 0
loc_99023:
mov r14, [rbp+var_48]
mov rdi, [r14]
test rdi, rdi
jz short loc_9903B
call my_free
mov qword ptr [r14], 0
loc_9903B:
call _my_thread_var
mov [rax], ebx
mov rax, [rbp+var_30]
mov byte ptr [rax+3], 0
xor r14d, r14d
jmp loc_99106
loc_99052:
mov [r15+58h], r14
mov [r15+48h], r14d
mov rax, [rbp+var_88]
add eax, eax
mov [r15+40h], eax
mov dword ptr [r15+44h], 0
xor eax, eax
mov [r15+50h], rax
mov [r15+138h], rax
mov [r15+78h], rax
mov [r15+30h], rax
xorps xmm0, xmm0
movups xmmword ptr [r15+60h], xmm0
movups xmmword ptr [r15+90h], xmm0
movups xmmword ptr [r15+0B0h], xmm0
mov rcx, 28F5C28F5C28F5C3h
mov rdx, r14
cmp [rbp+var_34], 0
mov r10, r15
jz short loc_990C3
shr rbx, 2
mov rax, rbx
mul rcx
shr rdx, 2
inc rdx
loc_990C3:
mov [r10+20h], rdx
mov rdx, r14
cmp [rbp+var_3C], 0
jz short loc_990DE
shr r13, 2
mov rax, r13
mul rcx
shr rdx, 2
loc_990DE:
mov [r10+28h], rdx
mov eax, [rbp+var_38]
mov [r10+3Ch], eax
mov byte ptr [r10+3], 1
movups xmmword ptr [r10+118h], xmm0
loc_990F6:
xor eax, eax
test r14d, r14d
cmovg eax, r14d
mov [r10+160h], eax
loc_99106:
mov eax, r14d
add rsp, 78h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| long long init_simple_key_cache(
char *a1,
unsigned int a2,
unsigned long long a3,
long long a4,
long long a5,
unsigned int a6)
{
unsigned long long v7; // r9
unsigned int v8; // r13d
char *v9; // r10
char v10; // al
unsigned long long v11; // r14
int v12; // r12d
unsigned long long v13; // rdi
int v14; // eax
unsigned int v15; // eax
unsigned int v16; // eax
long long v17; // r11
long long v18; // r12
char *v19; // r8
unsigned long long v20; // rdx
long long v21; // rdx
long long v22; // rax
unsigned long long v23; // r13
unsigned long long v24; // rbx
long long v25; // rcx
unsigned long long v26; // rsi
long long v27; // rdx
int v28; // r15d
bool v29; // cc
char *v30; // rdi
const char *v31; // rsi
long long v32; // rax
const char *v33; // rsi
int v34; // ecx
int v35; // r8d
int v36; // r9d
int v37; // ebx
long long v38; // rdi
long long v39; // rdi
unsigned long long v40; // rdx
unsigned long long v41; // rdx
int v42; // eax
long long v44; // [rsp+0h] [rbp-A0h]
char *v45; // [rsp+10h] [rbp-90h]
int v46; // [rsp+18h] [rbp-88h]
long long i; // [rsp+20h] [rbp-80h]
int v48; // [rsp+30h] [rbp-70h]
long long v49; // [rsp+38h] [rbp-68h]
long long v50; // [rsp+40h] [rbp-60h]
long long v51; // [rsp+48h] [rbp-58h]
long long *v53; // [rsp+58h] [rbp-48h]
int v54; // [rsp+64h] [rbp-3Ch]
unsigned int v55; // [rsp+68h] [rbp-38h]
int v56; // [rsp+6Ch] [rbp-34h]
int v57; // [rsp+6Ch] [rbp-34h]
v7 = a3;
v8 = a2;
v9 = a1;
v10 = *a1;
if ( *a1 )
{
LODWORD(v11) = 0;
if ( *((int *)a1 + 18) > 0 )
return (unsigned int)v11;
}
*((_OWORD *)a1 + 5) = 0LL;
*(_OWORD *)(a1 + 312) = 0LL;
*(_OWORD *)(a1 + 328) = 0LL;
*((_QWORD *)a1 + 43) = 0LL;
*((_DWORD *)a1 + 18) = -1;
if ( !v10 )
{
*(_WORD *)a1 = 1;
*((_DWORD *)a1 + 89) = 1;
a1[2] = 0;
*((_QWORD *)a1 + 14) = 0LL;
*((_QWORD *)a1 + 34) = 0LL;
a1[360] = 0;
v56 = a4;
v12 = a5;
*((_QWORD *)a1 + 32) = ((long long ( *)(_QWORD, char *, unsigned long long, long long, long long, unsigned long long))PSI_server[8])(
key_KEY_CACHE_cache_lock,
a1 + 192,
a3,
a4,
a5,
a3);
*((_QWORD *)a1 + 31) = a1 + 192;
*(_OWORD *)(a1 + 232) = 0LL;
pthread_mutex_init(a1 + 192, &my_fast_mutexattr);
LODWORD(a5) = v12;
v7 = a3;
LODWORD(a4) = v56;
v9 = a1;
*((_QWORD *)a1 + 33) = 0LL;
}
*((_QWORD *)v9 + 1) = v7;
*((_DWORD *)v9 + 6) = a2;
v13 = v7 / ((unsigned long long)a2 + 218);
v14 = 128;
if ( a6 >= 0x81 )
v14 = a6;
if ( v13 < 8 )
{
v9[3] = 0;
LODWORD(v11) = *((_DWORD *)v9 + 18);
goto LABEL_28;
}
v15 = (v14 - 1) | ((unsigned int)(v14 - 1) >> 1) | (((v14 - 1) | ((unsigned int)(v14 - 1) >> 1)) >> 2);
v16 = v15 | (v15 >> 4) | ((v15 | (v15 >> 4)) >> 8);
v55 = (v16 | HIWORD(v16)) + 1;
v45 = v9 + 16;
v53 = (long long *)(v9 + 160);
v48 = (_DWORD)v9 + 128;
v49 = (long long)(v9 + 136);
v50 = (long long)(v9 + 296);
v51 = (long long)(v9 + 304);
v54 = a5;
v17 = (unsigned int)a5;
v57 = a4;
v18 = (unsigned int)a4;
v19 = v9;
for ( i = v17; ; v17 = i )
{
v20 = 2
* (((_DWORD)v13 - 1) | ((unsigned int)(v13 - 1) >> 1) | ((((_DWORD)v13 - 1) | ((unsigned int)(v13 - 1) >> 1)) >> 2) | ((((_DWORD)v13 - 1) | ((unsigned int)(v13 - 1) >> 1) | ((((_DWORD)v13 - 1) | ((unsigned int)(v13 - 1) >> 1)) >> 2)) >> 4) | ((((_DWORD)v13 - 1) | ((unsigned int)(v13 - 1) >> 1) | ((((_DWORD)v13 - 1) | ((unsigned int)(v13 - 1) >> 1)) >> 2) | ((((_DWORD)v13 - 1) | ((unsigned int)(v13 - 1) >> 1) | ((((_DWORD)v13 - 1) | ((unsigned int)(v13 - 1) >> 1)) >> 2)) >> 4)) >> 8) | ((((_DWORD)v13 - 1) | ((unsigned int)(v13 - 1) >> 1) | ((((_DWORD)v13 - 1) | ((unsigned int)(v13 - 1) >> 1)) >> 2) | ((((_DWORD)v13 - 1) | ((unsigned int)(v13 - 1) >> 1) | ((((_DWORD)v13 - 1) | ((unsigned int)(v13 - 1) >> 1)) >> 2)) >> 4) | ((((_DWORD)v13 - 1) | ((unsigned int)(v13 - 1) >> 1) | ((((_DWORD)v13 - 1) | ((unsigned int)(v13 - 1) >> 1)) >> 2) | ((((_DWORD)v13 - 1) | ((unsigned int)(v13 - 1) >> 1) | ((((_DWORD)v13 - 1) | ((unsigned int)(v13 - 1) >> 1)) >> 2)) >> 4)) >> 8)) >> 16))
+ 2;
v21 = (unsigned int)((_DWORD)v20 << (v13 + (v13 >> 2) > v20));
*((_DWORD *)v19 + 14) = v21;
v44 = 96 * v13;
v22 = v8;
v11 = v13 + 1;
v23 = (v13 + 1) * v17;
v24 = (v13 + 1) * v18;
v25 = v22 * (v13 + 1);
v26 = 16LL * v55 + v13 * (v22 + 208) + 8 * v21;
v27 = -112 - v22;
v46 = v13;
v28 = 112 * v13 + 112;
do
{
--v11;
v23 -= v17;
v24 -= v18;
v25 -= v22;
v28 -= 112;
if ( v11 < 9 )
break;
v29 = v26 <= v7;
v26 += v27;
}
while ( !v29 );
*((_QWORD *)v19 + 2) = v25;
v30 = v45;
v31 = 0LL;
v32 = my_large_malloc(v45, 0LL, v27);
v19 = a1;
*((_QWORD *)a1 + 21) = v32;
if ( v32 )
break;
LABEL_15:
if ( v11 <= 7 )
{
*(_DWORD *)my_thread_var(v30, v31) = 12;
v33 = (_BYTE *)&stru_1000;
my_error(5, 4096, *((_DWORD *)a1 + 6) * v11, v34, v35, v36);
v37 = *(_DWORD *)my_thread_var(5LL, (const char *)&stru_1000);
*((_DWORD *)a1 + 18) = 0;
*((_DWORD *)a1 + 88) = 0;
v38 = *((_QWORD *)a1 + 21);
if ( v38 )
{
v33 = (const char *)*((_QWORD *)a1 + 2);
my_large_free(v38, v33);
*((_QWORD *)a1 + 21) = 0LL;
}
v39 = *v53;
if ( *v53 )
{
my_free(v39);
*v53 = 0LL;
}
*(_DWORD *)my_thread_var(v39, v33) = v37;
a1[3] = 0;
LODWORD(v11) = 0;
return (unsigned int)v11;
}
v13 = 3 * (v11 >> 2);
v8 = *((_DWORD *)v19 + 6);
v7 = a3;
}
if ( !my_multi_malloc_large(
key_memory_KEY_CACHE,
32,
(_DWORD)v53,
v28,
v48,
8 * *((_DWORD *)a1 + 14),
v49,
v44,
v50,
8LL * v55,
v51,
8LL * v55,
0LL) )
{
v31 = (const char *)*((_QWORD *)a1 + 2);
v30 = (char *)*((_QWORD *)a1 + 21);
my_large_free(v30, v31);
*((_QWORD *)a1 + 21) = 0LL;
v19 = a1;
goto LABEL_15;
}
*((_QWORD *)a1 + 11) = v11;
*((_DWORD *)a1 + 18) = v11;
*((_DWORD *)a1 + 16) = 2 * v46;
*((_DWORD *)a1 + 17) = 0;
*((_QWORD *)a1 + 10) = 0LL;
*((_QWORD *)a1 + 39) = 0LL;
*((_QWORD *)a1 + 15) = 0LL;
*((_QWORD *)a1 + 6) = 0LL;
*((_OWORD *)a1 + 6) = 0LL;
*((_OWORD *)a1 + 9) = 0LL;
*((_OWORD *)a1 + 11) = 0LL;
v40 = v11;
v9 = a1;
if ( v57 )
v40 = v24 / 0x64 + 1;
*((_QWORD *)a1 + 4) = v40;
v41 = v11;
if ( v54 )
v41 = v23 / 0x64;
*((_QWORD *)a1 + 5) = v41;
*((_DWORD *)a1 + 15) = v55;
a1[3] = 1;
*(_OWORD *)(a1 + 280) = 0LL;
LABEL_28:
v42 = 0;
if ( (int)v11 > 0 )
v42 = v11;
*((_DWORD *)v9 + 88) = v42;
return (unsigned int)v11;
}
| init_simple_key_cache:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x78
MOV EBX,R9D
MOV R9,RDX
MOV R13D,ESI
MOV R10,RDI
MOV AL,byte ptr [RDI]
TEST AL,AL
JZ 0x00198c9a
XOR R14D,R14D
CMP dword ptr [R10 + 0x48],0x0
JG 0x00199106
LAB_00198c9a:
XORPS XMM0,XMM0
MOVUPS xmmword ptr [R10 + 0x50],XMM0
MOVUPS xmmword ptr [R10 + 0x138],XMM0
MOVUPS xmmword ptr [R10 + 0x148],XMM0
MOV qword ptr [R10 + 0x158],0x0
MOV dword ptr [R10 + 0x48],0xffffffff
TEST AL,AL
MOV qword ptr [RBP + -0x30],R10
MOV qword ptr [RBP + -0x50],R9
JNZ 0x00198d6d
MOV word ptr [R10],0x1
MOV dword ptr [R10 + 0x164],0x1
XOR R15D,R15D
MOV byte ptr [R10 + 0x2],R15B
MOV qword ptr [R10 + 0x70],R15
MOV qword ptr [R10 + 0x110],R15
MOV byte ptr [R10 + 0x168],R15B
LEA RAX,[0xd07d1c]
MOV EDI,dword ptr [RAX]
LEA R14,[R10 + 0xc0]
LEA RAX,[0x486010]
MOV RAX,qword ptr [RAX]
MOV RSI,R14
MOV dword ptr [RBP + -0x34],ECX
MOV R12D,R8D
CALL qword ptr [RAX + 0x40]
MOV RCX,qword ptr [RBP + -0x30]
MOV qword ptr [RCX + 0x100],RAX
MOV RAX,qword ptr [RBP + -0x30]
MOV qword ptr [RAX + 0xf8],R14
MOV RAX,qword ptr [RBP + -0x30]
XORPS XMM0,XMM0
MOVUPS xmmword ptr [RAX + 0xe8],XMM0
LEA RSI,[0xd08a30]
MOV RDI,R14
CALL 0x00129340
MOV R8D,R12D
MOV R9,qword ptr [RBP + -0x50]
MOV ECX,dword ptr [RBP + -0x34]
MOV R10,qword ptr [RBP + -0x30]
MOV qword ptr [R10 + 0x108],R15
LAB_00198d6d:
MOV qword ptr [R10 + 0x8],R9
MOV dword ptr [R10 + 0x18],R13D
MOV ESI,R13D
ADD RSI,0xda
MOV RAX,R9
XOR EDX,EDX
DIV RSI
MOV RDI,RAX
CMP EBX,0x81
MOV EAX,0x80
CMOVNC EAX,EBX
CMP RDI,0x8
JC 0x00198fae
DEC EAX
MOV EDX,EAX
SHR EDX,0x1
OR EDX,EAX
MOV EAX,EDX
SHR EAX,0x2
OR EAX,EDX
MOV EDX,EAX
SHR EDX,0x4
OR EDX,EAX
MOV EAX,EDX
SHR EAX,0x8
OR EAX,EDX
MOV EDX,EAX
SHR EDX,0x10
OR EDX,EAX
INC EDX
MOV dword ptr [RBP + -0x38],EDX
MOV EDX,EDX
MOV RAX,RDX
SHL RAX,0x4
MOV qword ptr [RBP + -0x98],RAX
LEA RAX,[R10 + 0x10]
MOV qword ptr [RBP + -0x90],RAX
LEA RAX,[R10 + 0xa0]
MOV qword ptr [RBP + -0x48],RAX
LEA RAX,[R10 + 0x80]
MOV qword ptr [RBP + -0x70],RAX
LEA RAX,[R10 + 0x88]
MOV qword ptr [RBP + -0x68],RAX
LEA RAX,[R10 + 0x128]
MOV qword ptr [RBP + -0x60],RAX
SHL RDX,0x3
MOV qword ptr [RBP + -0x78],RDX
LEA RAX,[R10 + 0x130]
MOV qword ptr [RBP + -0x58],RAX
MOV dword ptr [RBP + -0x3c],R8D
MOV R11D,R8D
MOV dword ptr [RBP + -0x34],ECX
MOV R12D,ECX
MOV R8,R10
MOV qword ptr [RBP + -0x80],R11
LAB_00198e39:
LEA EAX,[RDI + -0x1]
MOV ECX,EAX
SHR ECX,0x1
OR ECX,EAX
MOV EAX,ECX
SHR EAX,0x2
OR EAX,ECX
MOV ECX,EAX
SHR ECX,0x4
OR ECX,EAX
MOV EAX,ECX
SHR EAX,0x8
OR EAX,ECX
MOV ECX,EAX
SHR ECX,0x10
OR ECX,EAX
LEA EDX,[0x2 + RCX*0x2]
MOV RAX,RDI
SHR RAX,0x2
ADD RAX,RDI
CMP RAX,RDX
SETA CL
SHL EDX,CL
MOV dword ptr [R8 + 0x38],EDX
MOV RAX,RDI
SHL RAX,0x5
LEA RAX,[RAX + RAX*0x2]
MOV qword ptr [RBP + -0xa0],RAX
MOV EAX,R13D
LEA R14,[RDI + 0x1]
MOV R13,R11
IMUL R13,R14
MOV RBX,R12
IMUL RBX,R14
MOV RCX,R14
IMUL RCX,RAX
LEA RSI,[RAX + 0xd0]
IMUL RSI,RDI
ADD RSI,qword ptr [RBP + -0x98]
LEA RSI,[RSI + RDX*0x8]
MOV RDX,-0x70
SUB RDX,RAX
MOV qword ptr [RBP + -0x88],RDI
IMUL R15,RDI,0x70
ADD R15,0x70
LAB_00198ed8:
DEC R14
SUB R13,R11
SUB RBX,R12
SUB RCX,RAX
ADD R15,-0x70
CMP R14,0x9
JC 0x00198efa
LEA RDI,[RSI + RDX*0x1]
CMP RSI,R9
MOV RSI,RDI
JA 0x00198ed8
LAB_00198efa:
MOV qword ptr [R8 + 0x10],RCX
MOV RDI,qword ptr [RBP + -0x90]
XOR ESI,ESI
CALL 0x001a7ad4
MOV R8,qword ptr [RBP + -0x30]
MOV qword ptr [R8 + 0xa8],RAX
TEST RAX,RAX
JZ 0x00198f8f
LEA RAX,[0xd086b8]
MOV EDI,dword ptr [RAX]
MOV R9D,dword ptr [R8 + 0x38]
SHL R9,0x3
SUB RSP,0x8
MOV ESI,0x20
MOV RDX,qword ptr [RBP + -0x48]
MOV RCX,R15
MOV R15,R8
MOV R8,qword ptr [RBP + -0x70]
XOR EAX,EAX
PUSH 0x0
MOV R10,qword ptr [RBP + -0x78]
PUSH R10
PUSH qword ptr [RBP + -0x58]
PUSH R10
PUSH qword ptr [RBP + -0x60]
PUSH qword ptr [RBP + -0xa0]
PUSH qword ptr [RBP + -0x68]
CALL 0x0019c9ed
ADD RSP,0x40
TEST RAX,RAX
JNZ 0x00199052
MOV RSI,qword ptr [R15 + 0x10]
MOV RDI,qword ptr [R15 + 0xa8]
CALL 0x001a7f83
MOV qword ptr [R15 + 0xa8],0x0
MOV R8,R15
LAB_00198f8f:
CMP R14,0x7
JBE 0x00198fbc
SHR R14,0x2
LEA RDI,[R14 + R14*0x2]
MOV R13D,dword ptr [R8 + 0x18]
MOV R9,qword ptr [RBP + -0x50]
MOV R11,qword ptr [RBP + -0x80]
JMP 0x00198e39
LAB_00198fae:
MOV byte ptr [R10 + 0x3],0x0
MOV R14D,dword ptr [R10 + 0x48]
JMP 0x001990f6
LAB_00198fbc:
CALL 0x001a1b22
MOV dword ptr [RAX],0xc
MOV RAX,qword ptr [RBP + -0x30]
MOV EAX,dword ptr [RAX + 0x18]
IMUL R14,RAX
XOR R15D,R15D
MOV ESI,0x1000
MOV EDI,0x5
MOV RDX,R14
XOR EAX,EAX
CALL 0x0019e1d7
CALL 0x001a1b22
MOV RCX,qword ptr [RBP + -0x30]
MOV EBX,dword ptr [RAX]
MOV dword ptr [RCX + 0x48],R15D
MOV dword ptr [RCX + 0x160],R15D
MOV RDI,qword ptr [RCX + 0xa8]
TEST RDI,RDI
JZ 0x00199023
MOV RSI,qword ptr [RCX + 0x10]
CALL 0x001a7f83
MOV RAX,qword ptr [RBP + -0x30]
MOV qword ptr [RAX + 0xa8],0x0
LAB_00199023:
MOV R14,qword ptr [RBP + -0x48]
MOV RDI,qword ptr [R14]
TEST RDI,RDI
JZ 0x0019903b
CALL 0x0019ffde
MOV qword ptr [R14],0x0
LAB_0019903b:
CALL 0x001a1b22
MOV dword ptr [RAX],EBX
MOV RAX,qword ptr [RBP + -0x30]
MOV byte ptr [RAX + 0x3],0x0
XOR R14D,R14D
JMP 0x00199106
LAB_00199052:
MOV qword ptr [R15 + 0x58],R14
MOV dword ptr [R15 + 0x48],R14D
MOV RAX,qword ptr [RBP + -0x88]
ADD EAX,EAX
MOV dword ptr [R15 + 0x40],EAX
MOV dword ptr [R15 + 0x44],0x0
XOR EAX,EAX
MOV qword ptr [R15 + 0x50],RAX
MOV qword ptr [R15 + 0x138],RAX
MOV qword ptr [R15 + 0x78],RAX
MOV qword ptr [R15 + 0x30],RAX
XORPS XMM0,XMM0
MOVUPS xmmword ptr [R15 + 0x60],XMM0
MOVUPS xmmword ptr [R15 + 0x90],XMM0
MOVUPS xmmword ptr [R15 + 0xb0],XMM0
MOV RCX,0x28f5c28f5c28f5c3
MOV RDX,R14
CMP dword ptr [RBP + -0x34],0x0
MOV R10,R15
JZ 0x001990c3
SHR RBX,0x2
MOV RAX,RBX
MUL RCX
SHR RDX,0x2
INC RDX
LAB_001990c3:
MOV qword ptr [R10 + 0x20],RDX
MOV RDX,R14
CMP dword ptr [RBP + -0x3c],0x0
JZ 0x001990de
SHR R13,0x2
MOV RAX,R13
MUL RCX
SHR RDX,0x2
LAB_001990de:
MOV qword ptr [R10 + 0x28],RDX
MOV EAX,dword ptr [RBP + -0x38]
MOV dword ptr [R10 + 0x3c],EAX
MOV byte ptr [R10 + 0x3],0x1
MOVUPS xmmword ptr [R10 + 0x118],XMM0
LAB_001990f6:
XOR EAX,EAX
TEST R14D,R14D
CMOVG EAX,R14D
MOV dword ptr [R10 + 0x160],EAX
LAB_00199106:
MOV EAX,R14D
ADD RSP,0x78
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
ulong init_simple_key_cache
(char *param_1,uint param_2,ulong param_3,uint param_4,uint param_5,uint param_6)
{
pthread_mutex_t *__mutex;
long *plVar1;
int4 uVar2;
bool bVar3;
uint uVar4;
int iVar5;
int8 uVar6;
ulong uVar7;
int4 *puVar8;
long lVar9;
uint uVar10;
long lVar11;
ulong uVar12;
ulong uVar13;
ulong uVar14;
ulong uVar15;
ulong uVar16;
long lVar17;
uVar12 = (ulong)param_2;
if ((*param_1 == '\0') || (uVar16 = 0, *(int *)(param_1 + 0x48) < 1)) {
param_1[0x50] = '\0';
param_1[0x51] = '\0';
param_1[0x52] = '\0';
param_1[0x53] = '\0';
param_1[0x54] = '\0';
param_1[0x55] = '\0';
param_1[0x56] = '\0';
param_1[0x57] = '\0';
param_1[0x58] = '\0';
param_1[0x59] = '\0';
param_1[0x5a] = '\0';
param_1[0x5b] = '\0';
param_1[0x5c] = '\0';
param_1[0x5d] = '\0';
param_1[0x5e] = '\0';
param_1[0x5f] = '\0';
param_1[0x138] = '\0';
param_1[0x139] = '\0';
param_1[0x13a] = '\0';
param_1[0x13b] = '\0';
param_1[0x13c] = '\0';
param_1[0x13d] = '\0';
param_1[0x13e] = '\0';
param_1[0x13f] = '\0';
param_1[0x140] = '\0';
param_1[0x141] = '\0';
param_1[0x142] = '\0';
param_1[0x143] = '\0';
param_1[0x144] = '\0';
param_1[0x145] = '\0';
param_1[0x146] = '\0';
param_1[0x147] = '\0';
param_1[0x148] = '\0';
param_1[0x149] = '\0';
param_1[0x14a] = '\0';
param_1[0x14b] = '\0';
param_1[0x14c] = '\0';
param_1[0x14d] = '\0';
param_1[0x14e] = '\0';
param_1[0x14f] = '\0';
param_1[0x150] = '\0';
param_1[0x151] = '\0';
param_1[0x152] = '\0';
param_1[0x153] = '\0';
param_1[0x154] = '\0';
param_1[0x155] = '\0';
param_1[0x156] = '\0';
param_1[0x157] = '\0';
param_1[0x158] = '\0';
param_1[0x159] = '\0';
param_1[0x15a] = '\0';
param_1[0x15b] = '\0';
param_1[0x15c] = '\0';
param_1[0x15d] = '\0';
param_1[0x15e] = '\0';
param_1[0x15f] = '\0';
param_1[0x48] = -1;
param_1[0x49] = -1;
param_1[0x4a] = -1;
param_1[0x4b] = -1;
if (*param_1 == '\0') {
param_1[0] = '\x01';
param_1[1] = '\0';
param_1[0x164] = '\x01';
param_1[0x165] = '\0';
param_1[0x166] = '\0';
param_1[0x167] = '\0';
param_1[2] = '\0';
param_1[0x70] = '\0';
param_1[0x71] = '\0';
param_1[0x72] = '\0';
param_1[0x73] = '\0';
param_1[0x74] = '\0';
param_1[0x75] = '\0';
param_1[0x76] = '\0';
param_1[0x77] = '\0';
param_1[0x110] = '\0';
param_1[0x111] = '\0';
param_1[0x112] = '\0';
param_1[0x113] = '\0';
param_1[0x114] = '\0';
param_1[0x115] = '\0';
param_1[0x116] = '\0';
param_1[0x117] = '\0';
param_1[0x168] = '\0';
__mutex = (pthread_mutex_t *)(param_1 + 0xc0);
uVar6 = (**(code **)(PSI_server + 0x40))(key_KEY_CACHE_cache_lock,__mutex);
*(int8 *)(param_1 + 0x100) = uVar6;
*(pthread_mutex_t **)(param_1 + 0xf8) = __mutex;
param_1[0xe8] = '\0';
param_1[0xe9] = '\0';
param_1[0xea] = '\0';
param_1[0xeb] = '\0';
param_1[0xec] = '\0';
param_1[0xed] = '\0';
param_1[0xee] = '\0';
param_1[0xef] = '\0';
param_1[0xf0] = '\0';
param_1[0xf1] = '\0';
param_1[0xf2] = '\0';
param_1[0xf3] = '\0';
param_1[0xf4] = '\0';
param_1[0xf5] = '\0';
param_1[0xf6] = '\0';
param_1[0xf7] = '\0';
pthread_mutex_init(__mutex,(pthread_mutexattr_t *)&my_fast_mutexattr);
param_1[0x108] = '\0';
param_1[0x109] = '\0';
param_1[0x10a] = '\0';
param_1[0x10b] = '\0';
param_1[0x10c] = '\0';
param_1[0x10d] = '\0';
param_1[0x10e] = '\0';
param_1[0x10f] = '\0';
}
*(ulong *)(param_1 + 8) = param_3;
*(uint *)(param_1 + 0x18) = param_2;
uVar7 = param_3 / ((ulong)param_2 + 0xda);
uVar10 = 0x80;
if (0x80 < param_6) {
uVar10 = param_6;
}
if (7 < uVar7) {
uVar10 = uVar10 - 1 >> 1 | uVar10 - 1;
uVar10 = uVar10 >> 2 | uVar10;
uVar10 = uVar10 >> 4 | uVar10;
uVar10 = uVar10 >> 8 | uVar10;
uVar10 = (uVar10 >> 0x10 | uVar10) + 1;
plVar1 = (long *)(param_1 + 0xa0);
lVar11 = (ulong)uVar10 << 3;
do {
uVar4 = (int)uVar7 - 1;
uVar4 = uVar4 >> 1 | uVar4;
uVar4 = uVar4 >> 2 | uVar4;
uVar4 = uVar4 >> 4 | uVar4;
uVar4 = uVar4 >> 8 | uVar4;
uVar4 = (uVar4 >> 0x10 | uVar4) * 2 + 2;
uVar4 = uVar4 << ((ulong)uVar4 < (uVar7 >> 2) + uVar7);
*(uint *)(param_1 + 0x38) = uVar4;
uVar16 = uVar7 + 1;
uVar15 = param_5 * uVar16;
uVar13 = param_4 * uVar16;
lVar9 = uVar16 * uVar12;
lVar17 = uVar7 * 0x70 + 0x70;
uVar14 = (uVar12 + 0xd0) * uVar7 + (ulong)uVar10 * 0x10 + (ulong)uVar4 * 8;
do {
uVar16 = uVar16 - 1;
uVar15 = uVar15 - param_5;
uVar13 = uVar13 - param_4;
lVar9 = lVar9 - uVar12;
lVar17 = lVar17 + -0x70;
if (uVar16 < 9) break;
bVar3 = param_3 < uVar14;
uVar14 = uVar14 + (-0x70 - uVar12);
} while (bVar3);
*(long *)(param_1 + 0x10) = lVar9;
lVar9 = my_large_malloc(param_1 + 0x10,0);
*(long *)(param_1 + 0xa8) = lVar9;
if (lVar9 != 0) {
lVar9 = my_multi_malloc_large
(key_memory_KEY_CACHE,0x20,plVar1,lVar17,param_1 + 0x80,
(ulong)*(uint *)(param_1 + 0x38) << 3,param_1 + 0x88,uVar7 * 0x60,
param_1 + 0x128,lVar11,param_1 + 0x130,lVar11,0);
if (lVar9 != 0) {
*(ulong *)(param_1 + 0x58) = uVar16;
*(int *)(param_1 + 0x48) = (int)uVar16;
*(int *)(param_1 + 0x40) = (int)uVar7 * 2;
param_1[0x44] = '\0';
param_1[0x45] = '\0';
param_1[0x46] = '\0';
param_1[0x47] = '\0';
param_1[0x50] = '\0';
param_1[0x51] = '\0';
param_1[0x52] = '\0';
param_1[0x53] = '\0';
param_1[0x54] = '\0';
param_1[0x55] = '\0';
param_1[0x56] = '\0';
param_1[0x57] = '\0';
param_1[0x138] = '\0';
param_1[0x139] = '\0';
param_1[0x13a] = '\0';
param_1[0x13b] = '\0';
param_1[0x13c] = '\0';
param_1[0x13d] = '\0';
param_1[0x13e] = '\0';
param_1[0x13f] = '\0';
param_1[0x78] = '\0';
param_1[0x79] = '\0';
param_1[0x7a] = '\0';
param_1[0x7b] = '\0';
param_1[0x7c] = '\0';
param_1[0x7d] = '\0';
param_1[0x7e] = '\0';
param_1[0x7f] = '\0';
param_1[0x30] = '\0';
param_1[0x31] = '\0';
param_1[0x32] = '\0';
param_1[0x33] = '\0';
param_1[0x34] = '\0';
param_1[0x35] = '\0';
param_1[0x36] = '\0';
param_1[0x37] = '\0';
param_1[0x60] = '\0';
param_1[0x61] = '\0';
param_1[0x62] = '\0';
param_1[99] = '\0';
param_1[100] = '\0';
param_1[0x65] = '\0';
param_1[0x66] = '\0';
param_1[0x67] = '\0';
param_1[0x68] = '\0';
param_1[0x69] = '\0';
param_1[0x6a] = '\0';
param_1[0x6b] = '\0';
param_1[0x6c] = '\0';
param_1[0x6d] = '\0';
param_1[0x6e] = '\0';
param_1[0x6f] = '\0';
param_1[0x90] = '\0';
param_1[0x91] = '\0';
param_1[0x92] = '\0';
param_1[0x93] = '\0';
param_1[0x94] = '\0';
param_1[0x95] = '\0';
param_1[0x96] = '\0';
param_1[0x97] = '\0';
param_1[0x98] = '\0';
param_1[0x99] = '\0';
param_1[0x9a] = '\0';
param_1[0x9b] = '\0';
param_1[0x9c] = '\0';
param_1[0x9d] = '\0';
param_1[0x9e] = '\0';
param_1[0x9f] = '\0';
param_1[0xb0] = '\0';
param_1[0xb1] = '\0';
param_1[0xb2] = '\0';
param_1[0xb3] = '\0';
param_1[0xb4] = '\0';
param_1[0xb5] = '\0';
param_1[0xb6] = '\0';
param_1[0xb7] = '\0';
param_1[0xb8] = '\0';
param_1[0xb9] = '\0';
param_1[0xba] = '\0';
param_1[0xbb] = '\0';
param_1[0xbc] = '\0';
param_1[0xbd] = '\0';
param_1[0xbe] = '\0';
param_1[0xbf] = '\0';
uVar12 = uVar16;
if (param_4 != 0) {
uVar12 = uVar13 / 100 + 1;
}
*(ulong *)(param_1 + 0x20) = uVar12;
uVar12 = uVar16;
if (param_5 != 0) {
uVar12 = uVar15 / 100;
}
*(ulong *)(param_1 + 0x28) = uVar12;
*(uint *)(param_1 + 0x3c) = uVar10;
param_1[3] = '\x01';
param_1[0x118] = '\0';
param_1[0x119] = '\0';
param_1[0x11a] = '\0';
param_1[0x11b] = '\0';
param_1[0x11c] = '\0';
param_1[0x11d] = '\0';
param_1[0x11e] = '\0';
param_1[0x11f] = '\0';
param_1[0x120] = '\0';
param_1[0x121] = '\0';
param_1[0x122] = '\0';
param_1[0x123] = '\0';
param_1[0x124] = '\0';
param_1[0x125] = '\0';
param_1[0x126] = '\0';
param_1[0x127] = '\0';
goto LAB_001990f6;
}
my_large_free(*(int8 *)(param_1 + 0xa8),*(int8 *)(param_1 + 0x10));
param_1[0xa8] = '\0';
param_1[0xa9] = '\0';
param_1[0xaa] = '\0';
param_1[0xab] = '\0';
param_1[0xac] = '\0';
param_1[0xad] = '\0';
param_1[0xae] = '\0';
param_1[0xaf] = '\0';
}
if (uVar16 < 8) goto LAB_00198fbc;
uVar7 = (uVar16 >> 2) * 3;
uVar12 = (ulong)*(uint *)(param_1 + 0x18);
} while( true );
}
param_1[3] = '\0';
uVar16 = (ulong)*(uint *)(param_1 + 0x48);
LAB_001990f6:
iVar5 = 0;
if (0 < (int)uVar16) {
iVar5 = (int)uVar16;
}
*(int *)(param_1 + 0x160) = iVar5;
}
LAB_00199106:
return uVar16 & 0xffffffff;
LAB_00198fbc:
puVar8 = (int4 *)_my_thread_var();
*puVar8 = 0xc;
my_error(5,0x1000,uVar16 * *(uint *)(param_1 + 0x18));
puVar8 = (int4 *)_my_thread_var();
uVar2 = *puVar8;
param_1[0x48] = '\0';
param_1[0x49] = '\0';
param_1[0x4a] = '\0';
param_1[0x4b] = '\0';
param_1[0x160] = '\0';
param_1[0x161] = '\0';
param_1[0x162] = '\0';
param_1[0x163] = '\0';
if (*(long *)(param_1 + 0xa8) != 0) {
my_large_free(*(long *)(param_1 + 0xa8),*(int8 *)(param_1 + 0x10));
param_1[0xa8] = '\0';
param_1[0xa9] = '\0';
param_1[0xaa] = '\0';
param_1[0xab] = '\0';
param_1[0xac] = '\0';
param_1[0xad] = '\0';
param_1[0xae] = '\0';
param_1[0xaf] = '\0';
}
if (*plVar1 != 0) {
my_free();
*plVar1 = 0;
}
puVar8 = (int4 *)_my_thread_var();
*puVar8 = uVar2;
param_1[3] = '\0';
uVar16 = 0;
goto LAB_00199106;
}
| |
47,894 | string_strip(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&) | monkey531[P]llama/common/common.cpp | std::string string_strip(const std::string & str) {
size_t start = 0;
size_t end = str.size();
while (start < end && std::isspace(str[start])) {
start++;
}
while (end > start && std::isspace(str[end - 1])) {
end--;
}
return str.substr(start, end - start);
} | O0 | cpp | string_strip(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&):
subq $0x38, %rsp
movq %rdi, 0x8(%rsp)
movq %rdi, %rax
movq %rax, 0x10(%rsp)
movq %rdi, 0x30(%rsp)
movq %rsi, 0x28(%rsp)
movq $0x0, 0x20(%rsp)
movq 0x28(%rsp), %rdi
callq 0x5a520
movq %rax, 0x18(%rsp)
movq 0x20(%rsp), %rcx
xorl %eax, %eax
cmpq 0x18(%rsp), %rcx
movb %al, 0x7(%rsp)
jae 0xeca66
movq 0x28(%rsp), %rdi
movq 0x20(%rsp), %rsi
callq 0x5b340
movsbl (%rax), %edi
callq 0x5ad40
cmpl $0x0, %eax
setne %al
movb %al, 0x7(%rsp)
movb 0x7(%rsp), %al
testb $0x1, %al
jne 0xeca70
jmp 0xeca80
movq 0x20(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x20(%rsp)
jmp 0xeca33
jmp 0xeca82
movq 0x18(%rsp), %rcx
xorl %eax, %eax
cmpq 0x20(%rsp), %rcx
movb %al, 0x6(%rsp)
jbe 0xecab9
movq 0x28(%rsp), %rdi
movq 0x18(%rsp), %rsi
subq $0x1, %rsi
callq 0x5b340
movsbl (%rax), %edi
callq 0x5ad40
cmpl $0x0, %eax
setne %al
movb %al, 0x6(%rsp)
movb 0x6(%rsp), %al
testb $0x1, %al
jne 0xecac3
jmp 0xecad3
movq 0x18(%rsp), %rax
addq $-0x1, %rax
movq %rax, 0x18(%rsp)
jmp 0xeca82
movq 0x8(%rsp), %rdi
movq 0x28(%rsp), %rsi
movq 0x20(%rsp), %rdx
movq 0x18(%rsp), %rcx
subq 0x20(%rsp), %rcx
callq 0x5b130
movq 0x10(%rsp), %rax
addq $0x38, %rsp
retq
nopl (%rax,%rax)
| _Z12string_stripRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE:
sub rsp, 38h
mov [rsp+38h+var_30], rdi
mov rax, rdi
mov [rsp+38h+var_28], rax
mov [rsp+38h+var_8], rdi
mov [rsp+38h+var_10], rsi
mov [rsp+38h+var_18], 0
mov rdi, [rsp+38h+var_10]
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE4sizeEv; std::string::size(void)
mov [rsp+38h+var_20], rax
loc_ECA33:
mov rcx, [rsp+38h+var_18]
xor eax, eax
cmp rcx, [rsp+38h+var_20]
mov [rsp+38h+var_31], al
jnb short loc_ECA66
mov rdi, [rsp+38h+var_10]
mov rsi, [rsp+38h+var_18]
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm; std::string::operator[](ulong)
movsx edi, byte ptr [rax]
call _isspace
cmp eax, 0
setnz al
mov [rsp+38h+var_31], al
loc_ECA66:
mov al, [rsp+38h+var_31]
test al, 1
jnz short loc_ECA70
jmp short loc_ECA80
loc_ECA70:
mov rax, [rsp+38h+var_18]
add rax, 1
mov [rsp+38h+var_18], rax
jmp short loc_ECA33
loc_ECA80:
jmp short $+2
loc_ECA82:
mov rcx, [rsp+38h+var_20]
xor eax, eax
cmp rcx, [rsp+38h+var_18]
mov [rsp+38h+var_32], al
jbe short loc_ECAB9
mov rdi, [rsp+38h+var_10]
mov rsi, [rsp+38h+var_20]
sub rsi, 1
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm; std::string::operator[](ulong)
movsx edi, byte ptr [rax]
call _isspace
cmp eax, 0
setnz al
mov [rsp+38h+var_32], al
loc_ECAB9:
mov al, [rsp+38h+var_32]
test al, 1
jnz short loc_ECAC3
jmp short loc_ECAD3
loc_ECAC3:
mov rax, [rsp+38h+var_20]
add rax, 0FFFFFFFFFFFFFFFFh
mov [rsp+38h+var_20], rax
jmp short loc_ECA82
loc_ECAD3:
mov rdi, [rsp+38h+var_30]
mov rsi, [rsp+38h+var_10]
mov rdx, [rsp+38h+var_18]
mov rcx, [rsp+38h+var_20]
sub rcx, [rsp+38h+var_18]
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6substrEmm; std::string::substr(ulong,ulong)
mov rax, [rsp+38h+var_28]
add rsp, 38h
retn
| long long string_strip(long long a1, long long a2)
{
char *v2; // rax
char *v3; // rax
bool v5; // [rsp+6h] [rbp-32h]
bool v6; // [rsp+7h] [rbp-31h]
unsigned long long v7; // [rsp+18h] [rbp-20h]
unsigned long long v8; // [rsp+20h] [rbp-18h]
v8 = 0LL;
v7 = std::string::size(a2);
while ( 1 )
{
v6 = 0;
if ( v8 < v7 )
{
v2 = (char *)std::string::operator[](a2, v8);
v6 = (unsigned int)isspace((unsigned int)*v2) != 0;
}
if ( !v6 )
break;
++v8;
}
while ( 1 )
{
v5 = 0;
if ( v7 > v8 )
{
v3 = (char *)std::string::operator[](a2, v7 - 1);
v5 = (unsigned int)isspace((unsigned int)*v3) != 0;
}
if ( !v5 )
break;
--v7;
}
std::string::substr(a1, a2, v8, v7 - v8);
return a1;
}
| string_strip:
SUB RSP,0x38
MOV qword ptr [RSP + 0x8],RDI
MOV RAX,RDI
MOV qword ptr [RSP + 0x10],RAX
MOV qword ptr [RSP + 0x30],RDI
MOV qword ptr [RSP + 0x28],RSI
MOV qword ptr [RSP + 0x20],0x0
MOV RDI,qword ptr [RSP + 0x28]
CALL 0x0015a520
MOV qword ptr [RSP + 0x18],RAX
LAB_001eca33:
MOV RCX,qword ptr [RSP + 0x20]
XOR EAX,EAX
CMP RCX,qword ptr [RSP + 0x18]
MOV byte ptr [RSP + 0x7],AL
JNC 0x001eca66
MOV RDI,qword ptr [RSP + 0x28]
MOV RSI,qword ptr [RSP + 0x20]
CALL 0x0015b340
MOVSX EDI,byte ptr [RAX]
CALL 0x0015ad40
CMP EAX,0x0
SETNZ AL
MOV byte ptr [RSP + 0x7],AL
LAB_001eca66:
MOV AL,byte ptr [RSP + 0x7]
TEST AL,0x1
JNZ 0x001eca70
JMP 0x001eca80
LAB_001eca70:
MOV RAX,qword ptr [RSP + 0x20]
ADD RAX,0x1
MOV qword ptr [RSP + 0x20],RAX
JMP 0x001eca33
LAB_001eca80:
JMP 0x001eca82
LAB_001eca82:
MOV RCX,qword ptr [RSP + 0x18]
XOR EAX,EAX
CMP RCX,qword ptr [RSP + 0x20]
MOV byte ptr [RSP + 0x6],AL
JBE 0x001ecab9
MOV RDI,qword ptr [RSP + 0x28]
MOV RSI,qword ptr [RSP + 0x18]
SUB RSI,0x1
CALL 0x0015b340
MOVSX EDI,byte ptr [RAX]
CALL 0x0015ad40
CMP EAX,0x0
SETNZ AL
MOV byte ptr [RSP + 0x6],AL
LAB_001ecab9:
MOV AL,byte ptr [RSP + 0x6]
TEST AL,0x1
JNZ 0x001ecac3
JMP 0x001ecad3
LAB_001ecac3:
MOV RAX,qword ptr [RSP + 0x18]
ADD RAX,-0x1
MOV qword ptr [RSP + 0x18],RAX
JMP 0x001eca82
LAB_001ecad3:
MOV RDI,qword ptr [RSP + 0x8]
MOV RSI,qword ptr [RSP + 0x28]
MOV RDX,qword ptr [RSP + 0x20]
MOV RCX,qword ptr [RSP + 0x18]
SUB RCX,qword ptr [RSP + 0x20]
CALL 0x0015b130
MOV RAX,qword ptr [RSP + 0x10]
ADD RSP,0x38
RET
|
/* string_strip(std::__cxx11::string const&) */
string * string_strip(string *param_1)
{
int iVar1;
char *pcVar2;
ulong in_RSI;
bool bVar3;
int8 local_20;
int8 local_18;
local_18 = 0;
local_20 = std::__cxx11::string::size();
while( true ) {
bVar3 = false;
if (local_18 < local_20) {
pcVar2 = (char *)std::__cxx11::string::operator[](in_RSI);
iVar1 = isspace((int)*pcVar2);
bVar3 = iVar1 != 0;
}
if (!bVar3) break;
local_18 = local_18 + 1;
}
while( true ) {
bVar3 = false;
if (local_18 < local_20) {
pcVar2 = (char *)std::__cxx11::string::operator[](in_RSI);
iVar1 = isspace((int)*pcVar2);
bVar3 = iVar1 != 0;
}
if (!bVar3) break;
local_20 = local_20 - 1;
}
std::__cxx11::string::substr((ulong)param_1,in_RSI);
return param_1;
}
| |
47,895 | ma_write_blob_record | eloqsql/storage/maria/ma_dynrec.c | my_bool _ma_write_blob_record(MARIA_HA *info, const uchar *record)
{
uchar *rec_buff;
int error;
ulong reclength,reclength2,extra;
my_bool buff_alloced;
extra= (ALIGN_SIZE(MARIA_MAX_DYN_BLOCK_HEADER)+MARIA_SPLIT_LENGTH+
MARIA_DYN_DELETE_BLOCK_HEADER+1);
reclength= (info->s->base.pack_reclength +
_ma_calc_total_blob_length(info,record)+ extra);
alloc_on_stack(*info->stack_end_ptr, rec_buff, buff_alloced, reclength);
if (!rec_buff)
{
my_errno= HA_ERR_OUT_OF_MEM; /* purecov: inspected */
return(1);
}
reclength2= _ma_rec_pack(info,
rec_buff+ALIGN_SIZE(MARIA_MAX_DYN_BLOCK_HEADER),
record);
if (!reclength2)
{
error= 1;
goto err;
}
DBUG_PRINT("info",("reclength: %lu reclength2: %lu",
reclength, reclength2));
DBUG_ASSERT(reclength2 <= reclength);
error= write_dynamic_record(info,
rec_buff+ALIGN_SIZE(MARIA_MAX_DYN_BLOCK_HEADER),
reclength2);
err:
stack_alloc_free(rec_buff, buff_alloced);
return(error != 0);
} | O0 | c | ma_write_blob_record:
pushq %rbp
movq %rsp, %rbp
subq $0x70, %rsp
movq %fs:0x28, %rax
movq %rax, -0x8(%rbp)
movq %rdi, -0x18(%rbp)
movq %rsi, -0x20(%rbp)
movq $0x5d, -0x48(%rbp)
movq -0x18(%rbp), %rax
movq (%rax), %rax
movq 0x3a0(%rax), %rax
movq %rax, -0x68(%rbp)
movq -0x18(%rbp), %rdi
movq -0x20(%rbp), %rsi
callq 0x3dee0
movq %rax, %rcx
movq -0x68(%rbp), %rax
addq %rcx, %rax
addq -0x48(%rbp), %rax
movq %rax, -0x38(%rbp)
movq -0x38(%rbp), %rax
movq %rax, -0x58(%rbp)
movq -0x18(%rbp), %rax
movq 0x78(%rax), %rax
movq (%rax), %rax
leaq -0x58(%rbp), %rcx
subq %rcx, %rax
movq %rax, -0x60(%rbp)
movq -0x60(%rbp), %rax
cmpq -0x58(%rbp), %rax
jbe 0x3de1c
movq -0x60(%rbp), %rcx
subq -0x58(%rbp), %rcx
movl $0x10000, %eax # imm = 0x10000
cmpq %rcx, %rax
jb 0x3ddfd
movq -0x60(%rbp), %rcx
subq -0x58(%rbp), %rcx
movl $0x8000, %eax # imm = 0x8000
cmpq %rcx, %rax
jae 0x3de1c
movl $0x1000, %eax # imm = 0x1000
cmpq -0x58(%rbp), %rax
ja 0x3de1c
movb $0x0, -0x49(%rbp)
movq -0x38(%rbp), %rcx
addq $0xf, %rcx
andq $-0x10, %rcx
movq %rsp, %rax
subq %rcx, %rax
movq %rax, %rsp
movq %rax, -0x28(%rbp)
jmp 0x3de34
movb $0x1, -0x49(%rbp)
movq -0x38(%rbp), %rsi
xorl %edi, %edi
movl $0x10010, %edx # imm = 0x10010
callq 0xf4be0
movq %rax, -0x28(%rbp)
jmp 0x3de36
cmpq $0x0, -0x28(%rbp)
jne 0x3de4e
callq 0xf7440
movl $0x80, (%rax)
movb $0x1, -0x9(%rbp)
jmp 0x3deb8
movq -0x18(%rbp), %rdi
movq -0x28(%rbp), %rsi
addq $0x18, %rsi
movq -0x20(%rbp), %rdx
callq 0x3ce20
movl %eax, %eax
movq %rax, -0x40(%rbp)
cmpq $0x0, -0x40(%rbp)
jne 0x3de79
movl $0x1, -0x2c(%rbp)
jmp 0x3de9c
jmp 0x3de7b
jmp 0x3de7d
jmp 0x3de7f
jmp 0x3de81
movq -0x18(%rbp), %rdi
movq -0x28(%rbp), %rsi
addq $0x18, %rsi
movq -0x40(%rbp), %rdx
callq 0x3d410
movsbl %al, %eax
movl %eax, -0x2c(%rbp)
movq -0x28(%rbp), %rdi
movsbl -0x49(%rbp), %esi
callq 0x3df80
cmpl $0x0, -0x2c(%rbp)
setne %al
andb $0x1, %al
movzbl %al, %eax
movb %al, -0x9(%rbp)
movb -0x9(%rbp), %al
movb %al, -0x69(%rbp)
movq %fs:0x28, %rax
movq -0x8(%rbp), %rcx
cmpq %rcx, %rax
jne 0x3ded8
movb -0x69(%rbp), %al
movq %rbp, %rsp
popq %rbp
retq
callq 0x2a270
nopl (%rax)
| _ma_write_blob_record:
push rbp
mov rbp, rsp
sub rsp, 70h
mov rax, fs:28h
mov [rbp+var_8], rax
mov [rbp+var_18], rdi
mov [rbp+var_20], rsi
mov [rbp+var_48], 5Dh ; ']'
mov rax, [rbp+var_18]
mov rax, [rax]
mov rax, [rax+3A0h]
mov [rbp+var_68], rax
mov rdi, [rbp+var_18]
mov rsi, [rbp+var_20]
call _ma_calc_total_blob_length
mov rcx, rax
mov rax, [rbp+var_68]
add rax, rcx
add rax, [rbp+var_48]
mov [rbp+var_38], rax
mov rax, [rbp+var_38]
mov [rbp+var_58], rax
mov rax, [rbp+var_18]
mov rax, [rax+78h]
mov rax, [rax]
lea rcx, [rbp+var_58]
sub rax, rcx
mov [rbp+var_60], rax
mov rax, [rbp+var_60]
cmp rax, [rbp+var_58]
jbe short loc_3DE1C
mov rcx, [rbp+var_60]
sub rcx, [rbp+var_58]
mov eax, 10000h
cmp rax, rcx
jb short loc_3DDFD
mov rcx, [rbp+var_60]
sub rcx, [rbp+var_58]
mov eax, 8000h
cmp rax, rcx
jnb short loc_3DE1C
mov eax, 1000h
cmp rax, [rbp+var_58]
ja short loc_3DE1C
loc_3DDFD:
mov [rbp+var_49], 0
mov rcx, [rbp+var_38]
add rcx, 0Fh
and rcx, 0FFFFFFFFFFFFFFF0h
mov rax, rsp
sub rax, rcx
mov rsp, rax
mov [rbp+var_28], rax
jmp short loc_3DE34
loc_3DE1C:
mov [rbp+var_49], 1
mov rsi, [rbp+var_38]
xor edi, edi
mov edx, offset stru_10010
call my_malloc
mov [rbp+var_28], rax
loc_3DE34:
jmp short $+2
loc_3DE36:
cmp [rbp+var_28], 0
jnz short loc_3DE4E
call _my_thread_var
mov dword ptr [rax], 80h
mov [rbp+var_9], 1
jmp short loc_3DEB8
loc_3DE4E:
mov rdi, [rbp+var_18]
mov rsi, [rbp+var_28]
add rsi, 18h
mov rdx, [rbp+var_20]
call _ma_rec_pack
mov eax, eax
mov [rbp+var_40], rax
cmp [rbp+var_40], 0
jnz short loc_3DE79
mov [rbp+var_2C], 1
jmp short loc_3DE9C
loc_3DE79:
jmp short $+2
loc_3DE7B:
jmp short $+2
loc_3DE7D:
jmp short $+2
loc_3DE7F:
jmp short $+2
loc_3DE81:
mov rdi, [rbp+var_18]
mov rsi, [rbp+var_28]
add rsi, 18h
mov rdx, [rbp+var_40]
call write_dynamic_record
movsx eax, al
mov [rbp+var_2C], eax
loc_3DE9C:
mov rdi, [rbp+var_28]
movsx esi, [rbp+var_49]
call stack_alloc_free
cmp [rbp+var_2C], 0
setnz al
and al, 1
movzx eax, al
mov [rbp+var_9], al
loc_3DEB8:
mov al, [rbp+var_9]
mov [rbp+var_69], al
mov rax, fs:28h
mov rcx, [rbp+var_8]
cmp rax, rcx
jnz short loc_3DED8
mov al, [rbp+var_69]
mov rsp, rbp
pop rbp
retn
loc_3DED8:
call ___stack_chk_fail
| bool ma_write_blob_record(long long a1, _BYTE *a2)
{
unsigned int v2; // eax
long long v4; // [rsp+0h] [rbp-70h] BYREF
long long v5; // [rsp+8h] [rbp-68h]
unsigned long long v6; // [rsp+10h] [rbp-60h]
unsigned long long v7; // [rsp+18h] [rbp-58h] BYREF
char v8; // [rsp+27h] [rbp-49h]
long long v9; // [rsp+28h] [rbp-48h]
long long v10; // [rsp+30h] [rbp-40h]
unsigned long long v11; // [rsp+38h] [rbp-38h]
int v12; // [rsp+44h] [rbp-2Ch]
char *v13; // [rsp+48h] [rbp-28h]
_BYTE *v14; // [rsp+50h] [rbp-20h]
_QWORD *v15; // [rsp+58h] [rbp-18h]
unsigned long long v17; // [rsp+68h] [rbp-8h]
v17 = __readfsqword(0x28u);
v15 = (_QWORD *)a1;
v14 = a2;
v9 = 93LL;
v5 = *(_QWORD *)(*(_QWORD *)a1 + 928LL);
v11 = ma_calc_total_blob_length(a1, a2) + v5 + 93;
v7 = v11;
v6 = **(_QWORD **)(a1 + 120) - (_QWORD)&v7;
if ( v6 <= v11 || v6 - v7 <= 0x10000 && (v6 - v7 <= 0x8000 || v7 < 0x1000) )
{
v8 = 1;
v13 = (char *)my_malloc(0LL, v11, &stru_10010);
}
else
{
v8 = 0;
v13 = (char *)&v4 - ((v11 + 15) & 0xFFFFFFFFFFFFFFF0LL);
}
if ( v13 )
{
v2 = ma_rec_pack(v15, v13 + 24, v14);
v10 = v2;
if ( v2 )
v12 = write_dynamic_record(v15, (long long)(v13 + 24), v10);
else
v12 = 1;
stack_alloc_free(v13, (unsigned int)v8);
return v12 != 0;
}
else
{
*(_DWORD *)my_thread_var() = 128;
return 1;
}
}
| _ma_write_blob_record:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x70
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x8],RAX
MOV qword ptr [RBP + -0x18],RDI
MOV qword ptr [RBP + -0x20],RSI
MOV qword ptr [RBP + -0x48],0x5d
MOV RAX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RAX]
MOV RAX,qword ptr [RAX + 0x3a0]
MOV qword ptr [RBP + -0x68],RAX
MOV RDI,qword ptr [RBP + -0x18]
MOV RSI,qword ptr [RBP + -0x20]
CALL 0x0013dee0
MOV RCX,RAX
MOV RAX,qword ptr [RBP + -0x68]
ADD RAX,RCX
ADD RAX,qword ptr [RBP + -0x48]
MOV qword ptr [RBP + -0x38],RAX
MOV RAX,qword ptr [RBP + -0x38]
MOV qword ptr [RBP + -0x58],RAX
MOV RAX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RAX + 0x78]
MOV RAX,qword ptr [RAX]
LEA RCX,[RBP + -0x58]
SUB RAX,RCX
MOV qword ptr [RBP + -0x60],RAX
MOV RAX,qword ptr [RBP + -0x60]
CMP RAX,qword ptr [RBP + -0x58]
JBE 0x0013de1c
MOV RCX,qword ptr [RBP + -0x60]
SUB RCX,qword ptr [RBP + -0x58]
MOV EAX,0x10000
CMP RAX,RCX
JC 0x0013ddfd
MOV RCX,qword ptr [RBP + -0x60]
SUB RCX,qword ptr [RBP + -0x58]
MOV EAX,0x8000
CMP RAX,RCX
JNC 0x0013de1c
MOV EAX,0x1000
CMP RAX,qword ptr [RBP + -0x58]
JA 0x0013de1c
LAB_0013ddfd:
MOV byte ptr [RBP + -0x49],0x0
MOV RCX,qword ptr [RBP + -0x38]
ADD RCX,0xf
AND RCX,-0x10
MOV RAX,RSP
SUB RAX,RCX
MOV RSP,RAX
MOV qword ptr [RBP + -0x28],RAX
JMP 0x0013de34
LAB_0013de1c:
MOV byte ptr [RBP + -0x49],0x1
MOV RSI,qword ptr [RBP + -0x38]
XOR EDI,EDI
MOV EDX,0x10010
CALL 0x001f4be0
MOV qword ptr [RBP + -0x28],RAX
LAB_0013de34:
JMP 0x0013de36
LAB_0013de36:
CMP qword ptr [RBP + -0x28],0x0
JNZ 0x0013de4e
CALL 0x001f7440
MOV dword ptr [RAX],0x80
MOV byte ptr [RBP + -0x9],0x1
JMP 0x0013deb8
LAB_0013de4e:
MOV RDI,qword ptr [RBP + -0x18]
MOV RSI,qword ptr [RBP + -0x28]
ADD RSI,0x18
MOV RDX,qword ptr [RBP + -0x20]
CALL 0x0013ce20
MOV EAX,EAX
MOV qword ptr [RBP + -0x40],RAX
CMP qword ptr [RBP + -0x40],0x0
JNZ 0x0013de79
MOV dword ptr [RBP + -0x2c],0x1
JMP 0x0013de9c
LAB_0013de79:
JMP 0x0013de7b
LAB_0013de7b:
JMP 0x0013de7d
LAB_0013de7d:
JMP 0x0013de7f
LAB_0013de7f:
JMP 0x0013de81
LAB_0013de81:
MOV RDI,qword ptr [RBP + -0x18]
MOV RSI,qword ptr [RBP + -0x28]
ADD RSI,0x18
MOV RDX,qword ptr [RBP + -0x40]
CALL 0x0013d410
MOVSX EAX,AL
MOV dword ptr [RBP + -0x2c],EAX
LAB_0013de9c:
MOV RDI,qword ptr [RBP + -0x28]
MOVSX ESI,byte ptr [RBP + -0x49]
CALL 0x0013df80
CMP dword ptr [RBP + -0x2c],0x0
SETNZ AL
AND AL,0x1
MOVZX EAX,AL
MOV byte ptr [RBP + -0x9],AL
LAB_0013deb8:
MOV AL,byte ptr [RBP + -0x9]
MOV byte ptr [RBP + -0x69],AL
MOV RAX,qword ptr FS:[0x28]
MOV RCX,qword ptr [RBP + -0x8]
CMP RAX,RCX
JNZ 0x0013ded8
MOV AL,byte ptr [RBP + -0x69]
MOV RSP,RBP
POP RBP
RET
LAB_0013ded8:
CALL 0x0012a270
|
int8 _ma_write_blob_record(long *param_1,int8 param_2)
{
int8 uVar1;
long *plVar2;
char cVar3;
uint uVar4;
long lVar5;
int4 *puVar6;
ulong uVar7;
int1 *puVar8;
int iVar9;
int1 *puVar10;
long in_FS_OFFSET;
int1 auStack_78 [7];
bool local_71;
long local_70;
ulong local_68;
ulong local_60;
char local_51;
long local_50;
ulong local_48;
ulong local_40;
int local_34;
int1 *local_30;
int8 local_28;
long *local_20;
bool local_11;
long local_10;
puVar8 = auStack_78;
local_10 = *(long *)(in_FS_OFFSET + 0x28);
local_50 = 0x5d;
local_70 = *(long *)(*param_1 + 0x3a0);
local_28 = param_2;
local_20 = param_1;
lVar5 = _ma_calc_total_blob_length(param_1,param_2);
local_60 = local_70 + lVar5 + local_50;
local_68 = *(long *)local_20[0xf] - (long)&local_60;
local_40 = local_60;
if ((local_60 < local_68) &&
((0x10000 < local_68 - local_60 || ((0x8000 < local_68 - local_60 && (0xfff < local_60)))))) {
local_51 = '\0';
puVar8 = auStack_78 + -(local_60 + 0xf & 0xfffffffffffffff0);
local_30 = puVar8;
}
else {
local_51 = '\x01';
local_30 = (int1 *)my_malloc(0,local_60,0x10010);
}
plVar2 = local_20;
uVar1 = local_28;
if (local_30 == (int1 *)0x0) {
*(int8 *)(puVar8 + -8) = 0x13de42;
puVar6 = (int4 *)_my_thread_var();
*puVar6 = 0x80;
local_11 = true;
}
else {
puVar10 = local_30 + 0x18;
*(int8 *)(puVar8 + -8) = 0x13de63;
uVar4 = _ma_rec_pack(plVar2,puVar10,uVar1);
plVar2 = local_20;
uVar7 = (ulong)uVar4;
local_48 = uVar7;
if (uVar7 == 0) {
local_34 = 1;
}
else {
puVar10 = local_30 + 0x18;
*(int8 *)(puVar8 + -8) = 0x13de96;
cVar3 = write_dynamic_record(plVar2,puVar10,uVar7);
local_34 = (int)cVar3;
}
puVar10 = local_30;
iVar9 = (int)local_51;
*(int8 *)(puVar8 + -8) = 0x13dea9;
stack_alloc_free(puVar10,iVar9);
local_11 = local_34 != 0;
}
local_71 = local_11;
if (*(long *)(in_FS_OFFSET + 0x28) == local_10) {
return CONCAT71((int7)((ulong)*(long *)(in_FS_OFFSET + 0x28) >> 8),local_11);
}
/* WARNING: Subroutine does not return */
*(int8 *)(puVar8 + -8) = 0x13dedd;
__stack_chk_fail();
}
| |
47,896 | my_strxfrm_pad_nweights_unicode | eloqsql/strings/ctype-utf8.c | size_t
my_strxfrm_pad_nweights_unicode(uchar *str, uchar *strend, size_t nweights)
{
uchar *str0;
DBUG_ASSERT(str && str <= strend);
for (str0= str; str < strend && nweights; nweights--)
{
*str++= 0x00;
if (str < strend)
*str++= 0x20;
}
return str - str0;
} | O3 | c | my_strxfrm_pad_nweights_unicode:
cmpq %rsi, %rdi
setae %al
testq %rdx, %rdx
sete %cl
orb %al, %cl
movq %rdi, %rax
jne 0xeb2a9
pushq %rbp
movq %rsp, %rbp
decq %rdx
movq %rdi, %rcx
leaq 0x1(%rcx), %rax
movb $0x0, (%rcx)
cmpq %rsi, %rax
jae 0xeb293
movb $0x20, 0x1(%rcx)
addq $0x2, %rcx
movq %rcx, %rax
addq $-0x1, %rdx
setb %r8b
cmpq %rsi, %rax
jae 0xeb2a8
movq %rax, %rcx
testb %r8b, %r8b
jne 0xeb27c
popq %rbp
subq %rdi, %rax
retq
| my_strxfrm_pad_nweights_unicode:
cmp rdi, rsi
setnb al
test rdx, rdx
setz cl
or cl, al
mov rax, rdi
jnz short loc_EB2A9
push rbp
mov rbp, rsp
dec rdx
mov rcx, rdi
loc_EB27C:
lea rax, [rcx+1]
mov byte ptr [rcx], 0
cmp rax, rsi
jnb short loc_EB293
mov byte ptr [rcx+1], 20h ; ' '
add rcx, 2
mov rax, rcx
loc_EB293:
add rdx, 0FFFFFFFFFFFFFFFFh
setb r8b
cmp rax, rsi
jnb short loc_EB2A8
mov rcx, rax
test r8b, r8b
jnz short loc_EB27C
loc_EB2A8:
pop rbp
loc_EB2A9:
sub rax, rdi
retn
| long long my_strxfrm_pad_nweights_unicode(_BYTE *a1, unsigned long long a2, long long a3)
{
_BYTE *v3; // rax
long long v4; // rdx
_BYTE *v5; // rcx
bool v6; // cf
v3 = a1;
if ( (unsigned long long)a1 < a2 && a3 != 0 )
{
v4 = a3 - 1;
v5 = a1;
do
{
v3 = v5 + 1;
*v5 = 0;
if ( (unsigned long long)(v5 + 1) < a2 )
{
v5[1] = 32;
v3 = v5 + 2;
}
v6 = v4-- != 0;
if ( (unsigned long long)v3 >= a2 )
break;
v5 = v3;
}
while ( v6 );
}
return v3 - a1;
}
| my_strxfrm_pad_nweights_unicode:
CMP RDI,RSI
SETNC AL
TEST RDX,RDX
SETZ CL
OR CL,AL
MOV RAX,RDI
JNZ 0x001eb2a9
PUSH RBP
MOV RBP,RSP
DEC RDX
MOV RCX,RDI
LAB_001eb27c:
LEA RAX,[RCX + 0x1]
MOV byte ptr [RCX],0x0
CMP RAX,RSI
JNC 0x001eb293
MOV byte ptr [RCX + 0x1],0x20
ADD RCX,0x2
MOV RAX,RCX
LAB_001eb293:
ADD RDX,-0x1
SETC R8B
CMP RAX,RSI
JNC 0x001eb2a8
MOV RCX,RAX
TEST R8B,R8B
JNZ 0x001eb27c
LAB_001eb2a8:
POP RBP
LAB_001eb2a9:
SUB RAX,RDI
RET
|
long my_strxfrm_pad_nweights_unicode(int1 *param_1,int1 *param_2,long param_3)
{
int1 *puVar1;
int1 *puVar2;
bool bVar3;
puVar2 = param_1;
if (param_3 != 0 && param_1 < param_2) {
param_3 = param_3 + -1;
puVar1 = param_1;
do {
puVar2 = puVar1 + 1;
*puVar1 = 0;
if (puVar2 < param_2) {
puVar1[1] = 0x20;
puVar2 = puVar1 + 2;
}
bVar3 = param_3 != 0;
param_3 = param_3 + -1;
} while ((puVar2 < param_2) && (puVar1 = puVar2, bVar3));
}
return (long)puVar2 - (long)param_1;
}
| |
47,897 | PFS_buffer_scalable_container<PFS_user, 128, 128, PFS_user_array, PFS_user_allocator>::apply(PFS_buffer_processor<PFS_user>&) | eloqsql/storage/perfschema/pfs_buffer_container.h | void apply(processor_type & proc)
{
uint i;
array_type *page;
value_type *pfs;
value_type *pfs_last;
for (i=0 ; i < PFS_PAGE_COUNT; i++)
{
page= m_pages[i];
if (page != NULL)
{
pfs= page->get_first();
pfs_last= page->get_last();
while (pfs < pfs_last)
{
if (pfs->m_lock.is_populated())
{
proc(pfs);
}
pfs++;
}
}
}
} | O3 | c | PFS_buffer_scalable_container<PFS_user, 128, 128, PFS_user_array, PFS_user_allocator>::apply(PFS_buffer_processor<PFS_user>&):
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
xorl %r12d, %r12d
movq 0xa8(%r14,%r12,8), %rax
testq %rax, %rax
je 0x3b188
movq 0x50(%rax), %rcx
testq %rcx, %rcx
jle 0x3b188
movq 0x48(%rax), %r15
imulq $0x9c0, %rcx, %r13 # imm = 0x9C0
addq %r15, %r13
movl 0x7e0(%r15), %eax
andl $0x3, %eax
cmpl $0x2, %eax
jne 0x3b17c
movq (%rbx), %rax
movq %rbx, %rdi
movq %r15, %rsi
callq *0x10(%rax)
addq $0x9c0, %r15 # imm = 0x9C0
cmpq %r13, %r15
jb 0x3b161
incq %r12
cmpq $0x80, %r12
jne 0x3b13d
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
| _ZN29PFS_buffer_scalable_containerI8PFS_userLi128ELi128E14PFS_user_array18PFS_user_allocatorE5applyER20PFS_buffer_processorIS0_E:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
push rax
mov rbx, rsi
mov r14, rdi
xor r12d, r12d
loc_3B13D:
mov rax, [r14+r12*8+0A8h]
test rax, rax
jz short loc_3B188
mov rcx, [rax+50h]
test rcx, rcx
jle short loc_3B188
mov r15, [rax+48h]
imul r13, rcx, 9C0h
add r13, r15
loc_3B161:
mov eax, [r15+7E0h]
and eax, 3
cmp eax, 2
jnz short loc_3B17C
mov rax, [rbx]
mov rdi, rbx
mov rsi, r15
call qword ptr [rax+10h]
loc_3B17C:
add r15, 9C0h
cmp r15, r13
jb short loc_3B161
loc_3B188:
inc r12
cmp r12, 80h
jnz short loc_3B13D
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| long long PFS_buffer_scalable_container<PFS_user,128,128,PFS_user_array,PFS_user_allocator>::apply(
long long a1,
long long a2)
{
long long i; // r12
long long result; // rax
long long v4; // rcx
unsigned long long v5; // r15
unsigned long long v6; // r13
for ( i = 0LL; i != 128; ++i )
{
result = *(_QWORD *)(a1 + 8 * i + 168);
if ( result )
{
v4 = *(_QWORD *)(result + 80);
if ( v4 > 0 )
{
v5 = *(_QWORD *)(result + 72);
v6 = v5 + 2496 * v4;
do
{
result = *(_DWORD *)(v5 + 2016) & 3;
if ( (_DWORD)result == 2 )
result = (*(long long ( **)(long long, unsigned long long))(*(_QWORD *)a2 + 16LL))(a2, v5);
v5 += 2496LL;
}
while ( v5 < v6 );
}
}
}
return result;
}
| apply:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
PUSH RAX
MOV RBX,RSI
MOV R14,RDI
XOR R12D,R12D
LAB_0013b13d:
MOV RAX,qword ptr [R14 + R12*0x8 + 0xa8]
TEST RAX,RAX
JZ 0x0013b188
MOV RCX,qword ptr [RAX + 0x50]
TEST RCX,RCX
JLE 0x0013b188
MOV R15,qword ptr [RAX + 0x48]
IMUL R13,RCX,0x9c0
ADD R13,R15
LAB_0013b161:
MOV EAX,dword ptr [R15 + 0x7e0]
AND EAX,0x3
CMP EAX,0x2
JNZ 0x0013b17c
MOV RAX,qword ptr [RBX]
MOV RDI,RBX
MOV RSI,R15
CALL qword ptr [RAX + 0x10]
LAB_0013b17c:
ADD R15,0x9c0
CMP R15,R13
JC 0x0013b161
LAB_0013b188:
INC R12
CMP R12,0x80
JNZ 0x0013b13d
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
/* PFS_buffer_scalable_container<PFS_user, 128, 128, PFS_user_array,
PFS_user_allocator>::apply(PFS_buffer_processor<PFS_user>&) */
void __thiscall
PFS_buffer_scalable_container<PFS_user,128,128,PFS_user_array,PFS_user_allocator>::apply
(PFS_buffer_scalable_container<PFS_user,128,128,PFS_user_array,PFS_user_allocator> *this,
PFS_buffer_processor *param_1)
{
long lVar1;
long lVar2;
ulong uVar3;
ulong uVar4;
lVar2 = 0;
do {
lVar1 = *(long *)(this + lVar2 * 8 + 0xa8);
if ((lVar1 != 0) && (0 < *(long *)(lVar1 + 0x50))) {
uVar4 = *(ulong *)(lVar1 + 0x48);
uVar3 = *(long *)(lVar1 + 0x50) * 0x9c0 + uVar4;
do {
if ((*(uint *)(uVar4 + 0x7e0) & 3) == 2) {
(**(code **)(*(long *)param_1 + 0x10))(param_1,uVar4);
}
uVar4 = uVar4 + 0x9c0;
} while (uVar4 < uVar3);
}
lVar2 = lVar2 + 1;
} while (lVar2 != 0x80);
return;
}
| |
47,898 | translog_write_variable_record_1group_header | eloqsql/storage/maria/ma_loghandler.c | static void
translog_write_variable_record_1group_header(struct st_translog_parts *parts,
enum translog_record_type type,
SHORT_TRANSACTION_ID short_trid,
uint16 header_length,
uchar *chunk0_header)
{
LEX_CUSTRING *part;
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= header_length);
part->str= chunk0_header;
/* puts chunk type */
*chunk0_header= (uchar) (type | TRANSLOG_CHUNK_LSN);
int2store(chunk0_header + 1, short_trid);
/* puts record length */
translog_write_variable_record_1group_code_len(chunk0_header + 3,
parts->record_length,
header_length);
/* puts 0 as chunk length which indicate 1 group record */
int2store(chunk0_header + header_length - 2, 0);
} | O0 | c | translog_write_variable_record_1group_header:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movw %cx, %ax
movw %dx, %cx
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movw %cx, -0xe(%rbp)
movw %ax, -0x10(%rbp)
movq %r8, -0x18(%rbp)
jmp 0x56843
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rax
movq -0x8(%rbp), %rdx
movl 0x8(%rdx), %ecx
addl $-0x1, %ecx
movl %ecx, 0x8(%rdx)
movl %ecx, %ecx
shlq $0x4, %rcx
addq %rcx, %rax
movq %rax, -0x20(%rbp)
movzwl -0x10(%rbp), %eax
movq -0x20(%rbp), %rcx
movq %rax, 0x8(%rcx)
movl %eax, %ecx
movq -0x8(%rbp), %rax
addl 0x4(%rax), %ecx
movl %ecx, 0x4(%rax)
movq -0x18(%rbp), %rcx
movq -0x20(%rbp), %rax
movq %rcx, (%rax)
movl -0xc(%rbp), %eax
orl $0x0, %eax
movb %al, %cl
movq -0x18(%rbp), %rax
movb %cl, (%rax)
movq -0x18(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x28(%rbp)
movw -0xe(%rbp), %cx
movq -0x28(%rbp), %rax
movw %cx, (%rax)
movq -0x18(%rbp), %rdi
addq $0x3, %rdi
movq -0x8(%rbp), %rax
movl (%rax), %esi
movzwl -0x10(%rbp), %edx
callq 0x56c40
movq -0x18(%rbp), %rax
movzwl -0x10(%rbp), %ecx
movslq %ecx, %rcx
addq %rcx, %rax
addq $-0x2, %rax
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rax
movw $0x0, (%rax)
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax)
| translog_write_variable_record_1group_header:
push rbp
mov rbp, rsp
sub rsp, 30h
mov ax, cx
mov cx, dx
mov [rbp+var_8], rdi
mov [rbp+var_C], esi
mov [rbp+var_E], cx
mov [rbp+var_10], ax
mov [rbp+var_18], r8
jmp short $+2
loc_56843:
mov rax, [rbp+var_8]
mov rax, [rax+10h]
mov rdx, [rbp+var_8]
mov ecx, [rdx+8]
add ecx, 0FFFFFFFFh
mov [rdx+8], ecx
mov ecx, ecx
shl rcx, 4
add rax, rcx
mov [rbp+var_20], rax
movzx eax, [rbp+var_10]
mov rcx, [rbp+var_20]
mov [rcx+8], rax
mov ecx, eax
mov rax, [rbp+var_8]
add ecx, [rax+4]
mov [rax+4], ecx
mov rcx, [rbp+var_18]
mov rax, [rbp+var_20]
mov [rax], rcx
mov eax, [rbp+var_C]
or eax, 0
mov cl, al
mov rax, [rbp+var_18]
mov [rax], cl
mov rax, [rbp+var_18]
add rax, 1
mov [rbp+var_28], rax
mov cx, [rbp+var_E]
mov rax, [rbp+var_28]
mov [rax], cx
mov rdi, [rbp+var_18]
add rdi, 3
mov rax, [rbp+var_8]
mov esi, [rax]
movzx edx, [rbp+var_10]
call translog_write_variable_record_1group_code_len
mov rax, [rbp+var_18]
movzx ecx, [rbp+var_10]
movsxd rcx, ecx
add rax, rcx
add rax, 0FFFFFFFFFFFFFFFEh
mov [rbp+var_30], rax
mov rax, [rbp+var_30]
mov word ptr [rax], 0
add rsp, 30h
pop rbp
retn
| _WORD * translog_write_variable_record_1group_header(
unsigned int *a1,
char a2,
__int16 a3,
unsigned __int16 a4,
long long a5)
{
long long v5; // rax
unsigned int v6; // ecx
_WORD *result; // rax
_QWORD *v8; // [rsp+10h] [rbp-20h]
v5 = *((_QWORD *)a1 + 2);
v6 = a1[2] - 1;
a1[2] = v6;
v8 = (_QWORD *)(16LL * v6 + v5);
v8[1] = a4;
a1[1] += a4;
*v8 = a5;
*(_BYTE *)a5 = a2;
*(_WORD *)(a5 + 1) = a3;
translog_write_variable_record_1group_code_len(a5 + 3, *a1, a4);
result = (_WORD *)(a4 + a5 - 2);
*result = 0;
return result;
}
| translog_write_variable_record_1group_header:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x30
MOV AX,CX
MOV CX,DX
MOV qword ptr [RBP + -0x8],RDI
MOV dword ptr [RBP + -0xc],ESI
MOV word ptr [RBP + -0xe],CX
MOV word ptr [RBP + -0x10],AX
MOV qword ptr [RBP + -0x18],R8
JMP 0x00156843
LAB_00156843:
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX + 0x10]
MOV RDX,qword ptr [RBP + -0x8]
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 + -0x20],RAX
MOVZX EAX,word ptr [RBP + -0x10]
MOV RCX,qword ptr [RBP + -0x20]
MOV qword ptr [RCX + 0x8],RAX
MOV ECX,EAX
MOV RAX,qword ptr [RBP + -0x8]
ADD ECX,dword ptr [RAX + 0x4]
MOV dword ptr [RAX + 0x4],ECX
MOV RCX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RBP + -0x20]
MOV qword ptr [RAX],RCX
MOV EAX,dword ptr [RBP + -0xc]
OR EAX,0x0
MOV CL,AL
MOV RAX,qword ptr [RBP + -0x18]
MOV byte ptr [RAX],CL
MOV RAX,qword ptr [RBP + -0x18]
ADD RAX,0x1
MOV qword ptr [RBP + -0x28],RAX
MOV CX,word ptr [RBP + -0xe]
MOV RAX,qword ptr [RBP + -0x28]
MOV word ptr [RAX],CX
MOV RDI,qword ptr [RBP + -0x18]
ADD RDI,0x3
MOV RAX,qword ptr [RBP + -0x8]
MOV ESI,dword ptr [RAX]
MOVZX EDX,word ptr [RBP + -0x10]
CALL 0x00156c40
MOV RAX,qword ptr [RBP + -0x18]
MOVZX ECX,word ptr [RBP + -0x10]
MOVSXD RCX,ECX
ADD RAX,RCX
ADD RAX,-0x2
MOV qword ptr [RBP + -0x30],RAX
MOV RAX,qword ptr [RBP + -0x30]
MOV word ptr [RAX],0x0
ADD RSP,0x30
POP RBP
RET
|
void translog_write_variable_record_1group_header
(int4 *param_1,int1 param_2,int2 param_3,ushort param_4,
int1 *param_5)
{
int iVar1;
int8 *puVar2;
iVar1 = param_1[2];
param_1[2] = iVar1 - 1U;
puVar2 = (int8 *)(*(long *)(param_1 + 4) + (ulong)(iVar1 - 1U) * 0x10);
puVar2[1] = (ulong)param_4;
param_1[1] = (uint)param_4 + param_1[1];
*puVar2 = param_5;
*param_5 = param_2;
*(int2 *)(param_5 + 1) = param_3;
translog_write_variable_record_1group_code_len(param_5 + 3,*param_1,param_4);
*(int2 *)(param_5 + (long)(int)(uint)param_4 + -2) = 0;
return;
}
| |
47,899 | js_for_of_start | bluesky950520[P]quickjs/quickjs.c | static __exception int js_for_of_start(JSContext *ctx, JSValue *sp,
BOOL is_async)
{
JSValue op1, obj, method;
op1 = sp[-1];
obj = JS_GetIterator(ctx, op1, is_async);
if (JS_IsException(obj))
return -1;
JS_FreeValue(ctx, op1);
sp[-1] = obj;
method = JS_GetProperty(ctx, obj, JS_ATOM_next);
if (JS_IsException(method))
return -1;
sp[0] = method;
return 0;
} | O0 | c | js_for_of_start:
subq $0x78, %rsp
movq %rdi, 0x68(%rsp)
movq %rsi, 0x60(%rsp)
movl %edx, 0x5c(%rsp)
movq 0x60(%rsp), %rax
movq -0x10(%rax), %rcx
movq %rcx, 0x48(%rsp)
movq -0x8(%rax), %rax
movq %rax, 0x50(%rsp)
movq 0x68(%rsp), %rdi
movl 0x5c(%rsp), %ecx
movq 0x48(%rsp), %rsi
movq 0x50(%rsp), %rdx
callq 0x6e7b0
movq %rax, 0x18(%rsp)
movq %rdx, 0x20(%rsp)
movq 0x18(%rsp), %rax
movq %rax, 0x38(%rsp)
movq 0x20(%rsp), %rax
movq %rax, 0x40(%rsp)
movq 0x38(%rsp), %rdi
movq 0x40(%rsp), %rsi
callq 0x23cc0
cmpl $0x0, %eax
je 0x67ba0
movl $0xffffffff, 0x74(%rsp) # imm = 0xFFFFFFFF
jmp 0x67c3e
movq 0x68(%rsp), %rdi
movq 0x48(%rsp), %rsi
movq 0x50(%rsp), %rdx
callq 0x23c90
movq 0x60(%rsp), %rax
movq 0x38(%rsp), %rcx
movq %rcx, -0x10(%rax)
movq 0x40(%rsp), %rcx
movq %rcx, -0x8(%rax)
movq 0x68(%rsp), %rdi
movq 0x38(%rsp), %rsi
movq 0x40(%rsp), %rdx
movl $0x6b, %ecx
callq 0x29d80
movq %rax, 0x8(%rsp)
movq %rdx, 0x10(%rsp)
movq 0x8(%rsp), %rax
movq %rax, 0x28(%rsp)
movq 0x10(%rsp), %rax
movq %rax, 0x30(%rsp)
movq 0x28(%rsp), %rdi
movq 0x30(%rsp), %rsi
callq 0x23cc0
cmpl $0x0, %eax
je 0x67c20
movl $0xffffffff, 0x74(%rsp) # imm = 0xFFFFFFFF
jmp 0x67c3e
movq 0x60(%rsp), %rax
movq 0x28(%rsp), %rcx
movq %rcx, (%rax)
movq 0x30(%rsp), %rcx
movq %rcx, 0x8(%rax)
movl $0x0, 0x74(%rsp)
movl 0x74(%rsp), %eax
addq $0x78, %rsp
retq
nopw (%rax,%rax)
| js_for_of_start:
sub rsp, 78h
mov [rsp+78h+var_10], rdi
mov [rsp+78h+var_18], rsi
mov [rsp+78h+var_1C], edx
mov rax, [rsp+78h+var_18]
mov rcx, [rax-10h]
mov [rsp+78h+var_30], rcx
mov rax, [rax-8]
mov [rsp+78h+var_28], rax
mov rdi, [rsp+78h+var_10]
mov ecx, [rsp+78h+var_1C]
mov rsi, [rsp+78h+var_30]
mov rdx, [rsp+78h+var_28]
call JS_GetIterator
mov [rsp+78h+var_60], rax
mov [rsp+78h+var_58], rdx
mov rax, [rsp+78h+var_60]
mov [rsp+78h+var_40], rax
mov rax, [rsp+78h+var_58]
mov [rsp+78h+var_38], rax
mov rdi, [rsp+78h+var_40]
mov rsi, [rsp+78h+var_38]
call JS_IsException_1
cmp eax, 0
jz short loc_67BA0
mov [rsp+78h+var_4], 0FFFFFFFFh
jmp loc_67C3E
loc_67BA0:
mov rdi, [rsp+78h+var_10]
mov rsi, [rsp+78h+var_30]
mov rdx, [rsp+78h+var_28]
call JS_FreeValue
mov rax, [rsp+78h+var_18]
mov rcx, [rsp+78h+var_40]
mov [rax-10h], rcx
mov rcx, [rsp+78h+var_38]
mov [rax-8], rcx
mov rdi, [rsp+78h+var_10]
mov rsi, [rsp+78h+var_40]
mov rdx, [rsp+78h+var_38]
mov ecx, 6Bh ; 'k'
call JS_GetProperty
mov [rsp+78h+var_70], rax
mov [rsp+78h+var_68], rdx
mov rax, [rsp+78h+var_70]
mov [rsp+78h+var_50], rax
mov rax, [rsp+78h+var_68]
mov [rsp+78h+var_48], rax
mov rdi, [rsp+78h+var_50]
mov rsi, [rsp+78h+var_48]
call JS_IsException_1
cmp eax, 0
jz short loc_67C20
mov [rsp+78h+var_4], 0FFFFFFFFh
jmp short loc_67C3E
loc_67C20:
mov rax, [rsp+78h+var_18]
mov rcx, [rsp+78h+var_50]
mov [rax], rcx
mov rcx, [rsp+78h+var_48]
mov [rax+8], rcx
mov [rsp+78h+var_4], 0
loc_67C3E:
mov eax, [rsp+78h+var_4]
add rsp, 78h
retn
| long long js_for_of_start(long long a1, long long *a2, unsigned int a3)
{
long long v3; // rdx
long long v4; // rdx
long long Property; // [rsp+8h] [rbp-70h]
long long Iterator; // [rsp+18h] [rbp-60h]
long long v8; // [rsp+30h] [rbp-48h]
long long v9; // [rsp+40h] [rbp-38h]
long long v10; // [rsp+48h] [rbp-30h]
long long v11; // [rsp+50h] [rbp-28h]
v10 = *(a2 - 2);
v11 = *(a2 - 1);
Iterator = JS_GetIterator(a1, v10, v11, a3);
v9 = v3;
if ( JS_IsException_1(Iterator, v3) )
{
return (unsigned int)-1;
}
else
{
JS_FreeValue(a1, v10, v11);
*(a2 - 2) = Iterator;
*(a2 - 1) = v9;
Property = JS_GetProperty(a1, Iterator, v9, 107);
v8 = v4;
if ( JS_IsException_1(Property, v4) )
{
return (unsigned int)-1;
}
else
{
*a2 = Property;
a2[1] = v8;
return 0;
}
}
}
| js_for_of_start:
SUB RSP,0x78
MOV qword ptr [RSP + 0x68],RDI
MOV qword ptr [RSP + 0x60],RSI
MOV dword ptr [RSP + 0x5c],EDX
MOV RAX,qword ptr [RSP + 0x60]
MOV RCX,qword ptr [RAX + -0x10]
MOV qword ptr [RSP + 0x48],RCX
MOV RAX,qword ptr [RAX + -0x8]
MOV qword ptr [RSP + 0x50],RAX
MOV RDI,qword ptr [RSP + 0x68]
MOV ECX,dword ptr [RSP + 0x5c]
MOV RSI,qword ptr [RSP + 0x48]
MOV RDX,qword ptr [RSP + 0x50]
CALL 0x0016e7b0
MOV qword ptr [RSP + 0x18],RAX
MOV qword ptr [RSP + 0x20],RDX
MOV RAX,qword ptr [RSP + 0x18]
MOV qword ptr [RSP + 0x38],RAX
MOV RAX,qword ptr [RSP + 0x20]
MOV qword ptr [RSP + 0x40],RAX
MOV RDI,qword ptr [RSP + 0x38]
MOV RSI,qword ptr [RSP + 0x40]
CALL 0x00123cc0
CMP EAX,0x0
JZ 0x00167ba0
MOV dword ptr [RSP + 0x74],0xffffffff
JMP 0x00167c3e
LAB_00167ba0:
MOV RDI,qword ptr [RSP + 0x68]
MOV RSI,qword ptr [RSP + 0x48]
MOV RDX,qword ptr [RSP + 0x50]
CALL 0x00123c90
MOV RAX,qword ptr [RSP + 0x60]
MOV RCX,qword ptr [RSP + 0x38]
MOV qword ptr [RAX + -0x10],RCX
MOV RCX,qword ptr [RSP + 0x40]
MOV qword ptr [RAX + -0x8],RCX
MOV RDI,qword ptr [RSP + 0x68]
MOV RSI,qword ptr [RSP + 0x38]
MOV RDX,qword ptr [RSP + 0x40]
MOV ECX,0x6b
CALL 0x00129d80
MOV qword ptr [RSP + 0x8],RAX
MOV qword ptr [RSP + 0x10],RDX
MOV RAX,qword ptr [RSP + 0x8]
MOV qword ptr [RSP + 0x28],RAX
MOV RAX,qword ptr [RSP + 0x10]
MOV qword ptr [RSP + 0x30],RAX
MOV RDI,qword ptr [RSP + 0x28]
MOV RSI,qword ptr [RSP + 0x30]
CALL 0x00123cc0
CMP EAX,0x0
JZ 0x00167c20
MOV dword ptr [RSP + 0x74],0xffffffff
JMP 0x00167c3e
LAB_00167c20:
MOV RAX,qword ptr [RSP + 0x60]
MOV RCX,qword ptr [RSP + 0x28]
MOV qword ptr [RAX],RCX
MOV RCX,qword ptr [RSP + 0x30]
MOV qword ptr [RAX + 0x8],RCX
MOV dword ptr [RSP + 0x74],0x0
LAB_00167c3e:
MOV EAX,dword ptr [RSP + 0x74]
ADD RSP,0x78
RET
|
int4 js_for_of_start(int8 param_1,int1 (*param_2) [16],int4 param_3)
{
int8 uVar1;
int8 uVar2;
int iVar3;
int1 auVar4 [16];
int4 local_4;
uVar1 = *(int8 *)param_2[-1];
uVar2 = *(int8 *)(param_2[-1] + 8);
auVar4 = JS_GetIterator(param_1,uVar1,uVar2,param_3);
iVar3 = JS_IsException(auVar4._0_8_,auVar4._8_8_);
if (iVar3 == 0) {
JS_FreeValue(param_1,uVar1,uVar2);
param_2[-1] = auVar4;
auVar4 = JS_GetProperty(param_1,auVar4._0_8_,auVar4._8_8_,0x6b);
iVar3 = JS_IsException(auVar4._0_8_,auVar4._8_8_);
if (iVar3 == 0) {
*param_2 = auVar4;
local_4 = 0;
}
else {
local_4 = 0xffffffff;
}
}
else {
local_4 = 0xffffffff;
}
return local_4;
}
|
Subsets and Splits
C++ Functions With Standard Library Dependencies
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++ Standard Library Function Analysis
Filters C++ code examples that use standard library containers and types, providing useful insights into common programming patterns and data structures in the dataset.
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.