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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
51,800 | bool llama_model_loader::get_key<int>(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, int&, bool) | monkey531[P]llama/src/llama-model-loader.cpp | bool llama_model_loader::get_key(const std::string & key, T & result, bool required) {
auto it = kv_overrides.find(key);
const struct llama_model_kv_override * override =
it != kv_overrides.end() ? &it->second : nullptr;
const bool found = GGUFMeta::GKV<T>::set(meta.get(), key, result, override);
if (required && !found) {
throw std::runtime_error(format("key not found in model: %s", key.c_str()));
}
return found;
} | O3 | cpp | bool llama_model_loader::get_key<int>(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, int&, bool):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movl %ecx, %ebx
movq %rdx, %r15
movq %rsi, %r14
movq %rdi, %r12
addq $0x90, %rdi
callq 0x6c130
leaq 0x28(%rax), %r13
testq %rax, %rax
cmoveq %rax, %r13
movq 0xc8(%r12), %r12
movq (%r14), %rsi
movq %r12, %rdi
callq 0x69b10
movq %r12, %rdi
movl %eax, %esi
movq %r15, %rdx
movq %r13, %rcx
callq 0x660f0
xorb $0x1, %bl
orb %al, %bl
je 0xb295d
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl $0x10, %edi
callq 0x65cb0
movq %rax, %rbx
movq (%r14), %rdx
leaq 0x6523f(%rip), %rsi # 0x117bb3
leaq 0x8(%rsp), %rdi
xorl %eax, %eax
callq 0x6b940
movb $0x1, %bpl
leaq 0x8(%rsp), %rsi
movq %rbx, %rdi
callq 0x6aa30
xorl %ebp, %ebp
movq 0xaa657(%rip), %rsi # 0x15cff0
movq 0xaa350(%rip), %rdx # 0x15ccf0
movq %rbx, %rdi
callq 0x6b270
movq %rax, %r14
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xb29c6
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x681a0
testb %bpl, %bpl
jne 0xb29d0
jmp 0xb29d8
movq %rax, %r14
movq %rbx, %rdi
callq 0x66d40
movq %r14, %rdi
callq 0x6b5d0
| _ZN18llama_model_loader7get_keyItEEbRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERT_b:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 28h
mov ebx, ecx
mov r15, rdx
mov r14, rsi
mov r12, rdi
add rdi, 90h
call __ZNSt10_HashtableINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_23llama_model_kv_overrideESaIS9_ENSt8__detail10_Select1stESt8equal_toIS5_ESt4hashIS5_ENSB_18_Mod_range_hashingENSB_20_Default_ranged_hashENSB_20_Prime_rehash_policyENSB_17_Hashtable_traitsILb1ELb0ELb1EEEE4findERS7_; std::_Hashtable<std::string,std::pair<std::string const,llama_model_kv_override>,std::allocator<std::pair<std::string const,llama_model_kv_override>>,std::__detail::_Select1st,std::equal_to<std::string>,std::hash<std::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,false,true>>::find(std::string const&)
lea r13, [rax+28h]
test rax, rax
cmovz r13, rax
mov r12, [r12+0C8h]
mov rsi, [r14]
mov rdi, r12
call _gguf_find_key
mov rdi, r12
mov esi, eax
mov rdx, r15
mov rcx, r13
call __ZN8GGUFMeta3GKVItE3setEPK12gguf_contextiRtPK23llama_model_kv_override; GGUFMeta::GKV<ushort>::set(gguf_context const*,int,ushort &,llama_model_kv_override const*)
xor bl, 1
or bl, al
jz short loc_B295D
add rsp, 28h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_B295D:
mov edi, 10h; thrown_size
call ___cxa_allocate_exception
mov rbx, rax
mov rdx, [r14]
lea rsi, aArrayKeyNotFou+6; "key not found in model: %s"
lea rdi, [rsp+58h+var_50]
xor eax, eax
call __Z6formatB5cxx11PKcz; format(char const*,...)
mov bpl, 1
lea rsi, [rsp+58h+var_50]
mov rdi, rbx
call __ZNSt13runtime_errorC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; std::runtime_error::runtime_error(std::string const&)
xor ebp, ebp
mov rsi, cs:lptinfo; lptinfo
mov rdx, cs:_ZNSt13runtime_errorD1Ev_ptr; void (*)(void *)
mov rdi, rbx; void *
call ___cxa_throw
mov r14, rax
lea rax, [rsp+58h+var_40]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_B29C6
mov rsi, [rsp+58h+var_40]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_B29C6:
test bpl, bpl
jnz short loc_B29D0
jmp short loc_B29D8
mov r14, rax
loc_B29D0:
mov rdi, rbx; void *
call ___cxa_free_exception
loc_B29D8:
mov rdi, r14
call __Unwind_Resume
| long long llama_model_loader::get_key<unsigned short>(long long a1, _QWORD *a2, long long a3, unsigned __int8 a4)
{
long long v6; // rax
long long v7; // r13
long long v8; // r12
unsigned int key; // eax
long long result; // rax
void *exception; // rbx
int v12; // ecx
int v13; // r8d
int v14; // r9d
_BYTE v15[16]; // [rsp+8h] [rbp-50h] BYREF
v6 = std::_Hashtable<std::string,std::pair<std::string const,llama_model_kv_override>,std::allocator<std::pair<std::string const,llama_model_kv_override>>,std::__detail::_Select1st,std::equal_to<std::string>,std::hash<std::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,false,true>>::find(a1 + 144);
v7 = v6 + 40;
if ( !v6 )
v7 = 0LL;
v8 = *(_QWORD *)(a1 + 200);
key = gguf_find_key(v8, *a2);
result = GGUFMeta::GKV<unsigned short>::set(v8, key, a3, v7);
if ( !((unsigned __int8)result | a4 ^ 1) )
{
exception = __cxa_allocate_exception(0x10uLL);
format[abi:cxx11]((unsigned int)v15, (unsigned int)"key not found in model: %s", *a2, v12, v13, v14);
std::runtime_error::runtime_error(exception, v15);
__cxa_throw(
exception,
(struct type_info *)&`typeinfo for'std::runtime_error,
(void (*)(void *))&std::runtime_error::~runtime_error);
}
return result;
}
| get_key<unsigned_short>:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x28
MOV EBX,ECX
MOV R15,RDX
MOV R14,RSI
MOV R12,RDI
ADD RDI,0x90
CALL 0x0016c130
LEA R13,[RAX + 0x28]
TEST RAX,RAX
CMOVZ R13,RAX
MOV R12,qword ptr [R12 + 0xc8]
MOV RSI,qword ptr [R14]
MOV RDI,R12
CALL 0x00169b10
MOV RDI,R12
MOV ESI,EAX
MOV RDX,R15
MOV RCX,R13
CALL 0x001660f0
XOR BL,0x1
OR BL,AL
JZ 0x001b295d
ADD RSP,0x28
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_001b295d:
MOV EDI,0x10
CALL 0x00165cb0
MOV RBX,RAX
MOV RDX,qword ptr [R14]
LAB_001b296d:
LEA RSI,[0x217bb3]
LEA RDI,[RSP + 0x8]
XOR EAX,EAX
CALL 0x0016b940
MOV BPL,0x1
LAB_001b2983:
LEA RSI,[RSP + 0x8]
MOV RDI,RBX
CALL 0x0016aa30
XOR EBP,EBP
MOV RSI,qword ptr [0x0025cff0]
MOV RDX,qword ptr [0x0025ccf0]
MOV RDI,RBX
CALL 0x0016b270
|
/* bool llama_model_loader::get_key<unsigned short>(std::__cxx11::string const&, unsigned short&,
bool) */
bool __thiscall
llama_model_loader::get_key<unsigned_short>
(llama_model_loader *this,string *param_1,ushort *param_2,bool param_3)
{
gguf_context *pgVar1;
char cVar2;
int iVar3;
long lVar4;
runtime_error *this_00;
llama_model_kv_override *plVar5;
string local_50 [32];
lVar4 = std::
_Hashtable<std::__cxx11::string,std::pair<std::__cxx11::string_const,llama_model_kv_override>,std::allocator<std::pair<std::__cxx11::string_const,llama_model_kv_override>>,std::__detail::_Select1st,std::equal_to<std::__cxx11::string>,std::hash<std::__cxx11::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,false,true>>
::find((_Hashtable<std::__cxx11::string,std::pair<std::__cxx11::string_const,llama_model_kv_override>,std::allocator<std::pair<std::__cxx11::string_const,llama_model_kv_override>>,std::__detail::_Select1st,std::equal_to<std::__cxx11::string>,std::hash<std::__cxx11::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,false,true>>
*)(this + 0x90),param_1);
plVar5 = (llama_model_kv_override *)(lVar4 + 0x28);
if (lVar4 == 0) {
plVar5 = (llama_model_kv_override *)0x0;
}
pgVar1 = *(gguf_context **)(this + 200);
iVar3 = gguf_find_key(pgVar1,*(int8 *)param_1);
cVar2 = GGUFMeta::GKV<unsigned_short>::set(pgVar1,iVar3,param_2,plVar5);
if (!param_3 || cVar2 != '\0') {
return (bool)cVar2;
}
this_00 = (runtime_error *)__cxa_allocate_exception(0x10);
/* try { // try from 001b296d to 001b297f has its CatchHandler @ 001b29cd */
format_abi_cxx11_((char *)local_50,"key not found in model: %s",*(int8 *)param_1);
/* try { // try from 001b2983 to 001b29a7 has its CatchHandler @ 001b29a8 */
std::runtime_error::runtime_error(this_00,local_50);
/* WARNING: Subroutine does not return */
__cxa_throw(this_00,PTR_typeinfo_0025cff0,PTR__runtime_error_0025ccf0);
}
| |
51,801 | minja::Parser::consumeTokenGroups(std::__cxx11::basic_regex<char, std::__cxx11::regex_traits<char>> const&, minja::SpaceHandling) | llama.cpp/common/minja/minja.hpp | std::vector<std::string> consumeTokenGroups(const std::regex & regex, SpaceHandling space_handling = SpaceHandling::Strip) {
auto start = it;
consumeSpaces(space_handling);
std::smatch match;
if (std::regex_search(it, end, match, regex) && match.position() == 0) {
it += match[0].length();
std::vector<std::string> ret;
for (size_t i = 0, n = match.size(); i < n; ++i) {
ret.push_back(match[i].str());
}
return ret;
}
it = start;
return {};
} | O3 | cpp | minja::Parser::consumeTokenGroups(std::__cxx11::basic_regex<char, std::__cxx11::regex_traits<char>> const&, minja::SpaceHandling):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x58, %rsp
movq %rdx, %r15
movq %rsi, %r14
movq %rdi, %rbx
movq 0x20(%rsi), %r12
movq %rsi, %rdi
movl %ecx, %esi
callq 0xe85be
xorps %xmm0, %xmm0
leaq 0x10(%rsp), %rdx
movaps %xmm0, 0x10(%rdx)
movaps %xmm0, (%rdx)
movq 0x18(%r14), %rsi
movq 0x20(%r14), %rdi
movl $0x0, (%rsp)
movq %r15, %rcx
xorl %r8d, %r8d
xorl %r9d, %r9d
callq 0x381c2
testb %al, %al
je 0xe7353
movq 0x28(%rsp), %rdx
movq 0x10(%rsp), %rax
movq 0x18(%rsp), %rcx
movq %rcx, %r15
subq %rax, %r15
je 0xe733a
movq (%rax), %rdi
cmpq $0x48, %r15
jne 0xe734b
cmpq %rdx, %rdi
jne 0xe7353
jmp 0xe7341
cmpq %rdx, -0x48(%rax,%r15)
jne 0xe7353
leaq (%rax,%r15), %rsi
addq $-0x48, %rsi
jmp 0xe738e
movq %rax, %rsi
cmpq %rdx, %rdi
je 0xe738e
movq %r12, 0x20(%r14)
xorps %xmm0, %xmm0
movups %xmm0, (%rbx)
movq $0x0, 0x10(%rbx)
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0xe737c
movq 0x20(%rsp), %rsi
subq %rdi, %rsi
callq 0x21180
movq %rbx, %rax
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x8(%rsi), %rdi
subq %rdx, %rdi
xorl %edx, %edx
cmpb $0x0, 0x10(%rsi)
cmovneq %rdi, %rdx
addq %rdx, 0x20(%r14)
xorps %xmm0, %xmm0
movups %xmm0, (%rbx)
movq $0x0, 0x10(%rbx)
cmpq %rcx, %rax
je 0xe7365
sarq $0x3, %r15
movabsq $-0x5555555555555555, %rax # imm = 0xAAAAAAAAAAAAAAAB
imulq %rax, %r15
addq $-0x3, %r15
je 0xe7365
leaq 0x48(%rsp), %r13
xorl %ebp, %ebp
leaq 0x38(%rsp), %r14
xorl %r12d, %r12d
movq 0x10(%rsp), %rsi
movq 0x18(%rsp), %rax
subq %rsi, %rax
je 0xe740f
movq %rax, %rcx
sarq $0x3, %rcx
movabsq $-0x5555555555555555, %rdx # imm = 0xAAAAAAAAAAAAAAAB
imulq %rdx, %rcx
addq $-0x3, %rcx
cmpq %r12, %rcx
jbe 0xe740f
addq %rbp, %rsi
jmp 0xe7416
addq %rax, %rsi
addq $-0x48, %rsi
movq %r14, %rdi
callq 0x3a604
movq %rbx, %rdi
movq %r14, %rsi
callq 0x842a0
movq 0x38(%rsp), %rdi
cmpq %r13, %rdi
je 0xe7440
movq 0x48(%rsp), %rsi
incq %rsi
callq 0x21180
incq %r12
addq $0x18, %rbp
cmpq %r12, %r15
jne 0xe73dd
jmp 0xe7365
movq %rax, %r14
jmp 0xe747d
movq %rax, %r14
jmp 0xe7475
movq %rax, %r14
movq 0x38(%rsp), %rdi
cmpq %r13, %rdi
je 0xe7475
movq 0x48(%rsp), %rsi
incq %rsi
callq 0x21180
movq %rbx, %rdi
callq 0x2c368
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0xe7494
movq 0x20(%rsp), %rsi
subq %rdi, %rsi
callq 0x21180
movq %r14, %rdi
callq 0x21b20
| _ZN5minja6Parser18consumeTokenGroupsERKNSt7__cxx1111basic_regexIcNS1_12regex_traitsIcEEEENS_13SpaceHandlingE:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 58h
mov r15, rdx
mov r14, rsi
mov rbx, rdi
mov r12, [rsi+20h]
mov rdi, rsi
mov esi, ecx
call _ZN5minja6Parser13consumeSpacesENS_13SpaceHandlingE; minja::Parser::consumeSpaces(minja::SpaceHandling)
xorps xmm0, xmm0
lea rdx, [rsp+88h+var_78]
movaps xmmword ptr [rdx+10h], xmm0
movaps xmmword ptr [rdx], xmm0
mov rsi, [r14+18h]
mov rdi, [r14+20h]
mov [rsp+88h+var_88], 0
mov rcx, r15
xor r8d, r8d
xor r9d, r9d
call _ZNSt8__detail17__regex_algo_implIN9__gnu_cxx17__normal_iteratorIPKcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEESaINS5_9sub_matchISB_EEEcNS5_12regex_traitsIcEEEEbT_SH_RNS5_13match_resultsISH_T0_EERKNS5_11basic_regexIT1_T2_EENSt15regex_constants15match_flag_typeENS_20_RegexExecutorPolicyEb; std::__detail::__regex_algo_impl<__gnu_cxx::__normal_iterator<char const*,std::string>,std::allocator<std::sub_match<__gnu_cxx::__normal_iterator<char const*,std::string>>>,char,std::regex_traits<char>>(__gnu_cxx::__normal_iterator<char const*,std::string>,__gnu_cxx::__normal_iterator<char const*,std::string>,std::match_results<__gnu_cxx::__normal_iterator<char const*,std::string>> &,std::basic_regex<char,std::regex_traits<char>> const&,std::regex_constants::match_flag_type,std::__detail::_RegexExecutorPolicy,bool)
test al, al
jz short loc_E7353
mov rdx, [rsp+88h+var_60]
mov rax, [rsp+88h+var_78]
mov rcx, [rsp+88h+var_70]
mov r15, rcx
sub r15, rax
jz short loc_E733A
mov rdi, [rax]
cmp r15, 48h ; 'H'
jnz short loc_E734B
cmp rdi, rdx
jnz short loc_E7353
jmp short loc_E7341
loc_E733A:
cmp [rax+r15-48h], rdx
jnz short loc_E7353
loc_E7341:
lea rsi, [rax+r15]
add rsi, 0FFFFFFFFFFFFFFB8h
jmp short loc_E738E
loc_E734B:
mov rsi, rax
cmp rdi, rdx
jz short loc_E738E
loc_E7353:
mov [r14+20h], r12
xorps xmm0, xmm0
movups xmmword ptr [rbx], xmm0
mov qword ptr [rbx+10h], 0
loc_E7365:
mov rdi, [rsp+88h+var_78]; void *
test rdi, rdi
jz short loc_E737C
mov rsi, [rsp+88h+var_68]
sub rsi, rdi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_E737C:
mov rax, rbx
add rsp, 58h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_E738E:
mov rdi, [rsi+8]
sub rdi, rdx
xor edx, edx
cmp byte ptr [rsi+10h], 0
cmovnz rdx, rdi
add [r14+20h], rdx
xorps xmm0, xmm0
movups xmmword ptr [rbx], xmm0
mov qword ptr [rbx+10h], 0
cmp rax, rcx
jz short loc_E7365
sar r15, 3
mov rax, 0AAAAAAAAAAAAAAABh
imul r15, rax
add r15, 0FFFFFFFFFFFFFFFDh
jz short loc_E7365
lea r13, [rsp+88h+var_40]
xor ebp, ebp
lea r14, [rsp+88h+var_50]
xor r12d, r12d
loc_E73DD:
mov rsi, [rsp+88h+var_78]
mov rax, [rsp+88h+var_70]
sub rax, rsi
jz short loc_E740F
mov rcx, rax
sar rcx, 3
mov rdx, 0AAAAAAAAAAAAAAABh
imul rcx, rdx
add rcx, 0FFFFFFFFFFFFFFFDh
cmp rcx, r12
jbe short loc_E740F
add rsi, rbp
jmp short loc_E7416
loc_E740F:
add rsi, rax
add rsi, 0FFFFFFFFFFFFFFB8h
loc_E7416:
mov rdi, r14
call _ZNKSt7__cxx119sub_matchIN9__gnu_cxx17__normal_iteratorIPKcNS_12basic_stringIcSt11char_traitsIcESaIcEEEEEE3strEv; std::sub_match<__gnu_cxx::__normal_iterator<char const*,std::string>>::str(void)
mov rdi, rbx
mov rsi, r14
call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE12emplace_backIJS5_EEERS5_DpOT_; std::vector<std::string>::emplace_back<std::string>(std::string &&)
mov rdi, [rsp+88h+var_50]; void *
cmp rdi, r13
jz short loc_E7440
mov rsi, [rsp+88h+var_40]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_E7440:
inc r12
add rbp, 18h
cmp r15, r12
jnz short loc_E73DD
jmp loc_E7365
mov r14, rax
jmp short loc_E747D
mov r14, rax
jmp short loc_E7475
mov r14, rax
mov rdi, [rsp+arg_30]; void *
cmp rdi, r13
jz short loc_E7475
mov rsi, [rsp+arg_40]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_E7475:
mov rdi, rbx; void *
call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED2Ev; std::vector<std::string>::~vector()
loc_E747D:
mov rdi, [rsp+arg_8]; void *
test rdi, rdi
jz short loc_E7494
mov rsi, [rsp+arg_18]
sub rsi, rdi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_E7494:
mov rdi, r14
call __Unwind_Resume
| long long minja::Parser::consumeTokenGroups(long long a1, long long a2, long long a3, unsigned int a4)
{
long long v7; // r12
__int128 v8; // kr00_16
long long v9; // r15
long long v10; // rdi
long long v11; // rsi
long long v13; // rdx
unsigned long long v14; // r15
long long v15; // rbp
unsigned long long i; // r12
long long *v17; // rsi
__int128 v18; // [rsp+10h] [rbp-78h] BYREF
__int128 v19; // [rsp+20h] [rbp-68h]
void *v20[2]; // [rsp+38h] [rbp-50h] BYREF
long long v21; // [rsp+48h] [rbp-40h] BYREF
v7 = *(_QWORD *)(a2 + 32);
minja::Parser::consumeSpaces(a2, a4);
v19 = 0LL;
v18 = 0LL;
if ( !std::__detail::__regex_algo_impl<__gnu_cxx::__normal_iterator<char const*,std::string>,std::allocator<std::sub_match<__gnu_cxx::__normal_iterator<char const*,std::string>>>,char,std::regex_traits<char>>(
*(long long **)(a2 + 32),
*(_QWORD *)(a2 + 24),
(char **)&v18,
a3,
0,
0,
0) )
goto LABEL_9;
v8 = v18;
v9 = *((_QWORD *)&v18 + 1) - v18;
if ( *((_QWORD *)&v18 + 1) != (_QWORD)v18 )
{
v10 = *(_QWORD *)v18;
if ( v9 == 72 )
{
if ( v10 == *((_QWORD *)&v19 + 1) )
goto LABEL_7;
}
else
{
v11 = v18;
if ( v10 == *((_QWORD *)&v19 + 1) )
goto LABEL_13;
}
LABEL_9:
*(_QWORD *)(a2 + 32) = v7;
*(_OWORD *)a1 = 0LL;
*(_QWORD *)(a1 + 16) = 0LL;
goto LABEL_10;
}
if ( *(_QWORD *)(*((_QWORD *)&v18 + 1) - 72LL) != *((_QWORD *)&v19 + 1) )
goto LABEL_9;
LABEL_7:
v11 = *((_QWORD *)&v18 + 1) - 72LL;
LABEL_13:
v13 = 0LL;
if ( *(_BYTE *)(v11 + 16) )
v13 = *(_QWORD *)(v11 + 8) - *((_QWORD *)&v19 + 1);
*(_QWORD *)(a2 + 32) += v13;
*(_OWORD *)a1 = 0LL;
*(_QWORD *)(a1 + 16) = 0LL;
if ( (_QWORD)v8 != *((_QWORD *)&v8 + 1) )
{
v14 = 0xAAAAAAAAAAAAAAABLL * (v9 >> 3) - 3;
if ( v14 )
{
v15 = 0LL;
for ( i = 0LL; i != v14; ++i )
{
if ( *((_QWORD *)&v18 + 1) == (_QWORD)v18
|| 0xAAAAAAAAAAAAAAABLL * ((long long)(*((_QWORD *)&v18 + 1) - v18) >> 3) - 3 <= i )
{
v17 = (long long *)(*((_QWORD *)&v18 + 1) - 72LL);
}
else
{
v17 = (long long *)(v15 + v18);
}
std::sub_match<__gnu_cxx::__normal_iterator<char const*,std::string>>::str((long long)v20, v17);
std::vector<std::string>::emplace_back<std::string>(a1, v20);
if ( v20[0] != &v21 )
operator delete(v20[0], v21 + 1);
v15 += 24LL;
}
}
}
LABEL_10:
if ( (_QWORD)v18 )
operator delete((void *)v18, v19 - v18);
return a1;
}
| consumeTokenGroups:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x58
MOV R15,RDX
MOV R14,RSI
MOV RBX,RDI
MOV R12,qword ptr [RSI + 0x20]
MOV RDI,RSI
MOV ESI,ECX
CALL 0x001e85be
XORPS XMM0,XMM0
LEA RDX,[RSP + 0x10]
MOVAPS xmmword ptr [RDX + 0x10],XMM0
MOVAPS xmmword ptr [RDX],XMM0
MOV RSI,qword ptr [R14 + 0x18]
MOV RDI,qword ptr [R14 + 0x20]
LAB_001e72fa:
MOV dword ptr [RSP],0x0
MOV RCX,R15
XOR R8D,R8D
XOR R9D,R9D
CALL 0x001381c2
TEST AL,AL
JZ 0x001e7353
MOV RDX,qword ptr [RSP + 0x28]
MOV RAX,qword ptr [RSP + 0x10]
MOV RCX,qword ptr [RSP + 0x18]
MOV R15,RCX
SUB R15,RAX
JZ 0x001e733a
MOV RDI,qword ptr [RAX]
CMP R15,0x48
JNZ 0x001e734b
CMP RDI,RDX
JNZ 0x001e7353
JMP 0x001e7341
LAB_001e733a:
CMP qword ptr [RAX + R15*0x1 + -0x48],RDX
JNZ 0x001e7353
LAB_001e7341:
LEA RSI,[RAX + R15*0x1]
ADD RSI,-0x48
JMP 0x001e738e
LAB_001e734b:
MOV RSI,RAX
CMP RDI,RDX
JZ 0x001e738e
LAB_001e7353:
MOV qword ptr [R14 + 0x20],R12
XORPS XMM0,XMM0
MOVUPS xmmword ptr [RBX],XMM0
MOV qword ptr [RBX + 0x10],0x0
LAB_001e7365:
MOV RDI,qword ptr [RSP + 0x10]
TEST RDI,RDI
JZ 0x001e737c
MOV RSI,qword ptr [RSP + 0x20]
SUB RSI,RDI
CALL 0x00121180
LAB_001e737c:
MOV RAX,RBX
ADD RSP,0x58
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_001e738e:
MOV RDI,qword ptr [RSI + 0x8]
SUB RDI,RDX
XOR EDX,EDX
CMP byte ptr [RSI + 0x10],0x0
CMOVNZ RDX,RDI
ADD qword ptr [R14 + 0x20],RDX
XORPS XMM0,XMM0
MOVUPS xmmword ptr [RBX],XMM0
MOV qword ptr [RBX + 0x10],0x0
CMP RAX,RCX
JZ 0x001e7365
SAR R15,0x3
MOV RAX,-0x5555555555555555
IMUL R15,RAX
ADD R15,-0x3
JZ 0x001e7365
LEA R13,[RSP + 0x48]
XOR EBP,EBP
LEA R14,[RSP + 0x38]
XOR R12D,R12D
LAB_001e73dd:
MOV RSI,qword ptr [RSP + 0x10]
MOV RAX,qword ptr [RSP + 0x18]
SUB RAX,RSI
JZ 0x001e740f
MOV RCX,RAX
SAR RCX,0x3
MOV RDX,-0x5555555555555555
IMUL RCX,RDX
ADD RCX,-0x3
CMP RCX,R12
JBE 0x001e740f
ADD RSI,RBP
JMP 0x001e7416
LAB_001e740f:
ADD RSI,RAX
ADD RSI,-0x48
LAB_001e7416:
MOV RDI,R14
CALL 0x0013a604
LAB_001e741e:
MOV RDI,RBX
MOV RSI,R14
CALL 0x001842a0
LAB_001e7429:
MOV RDI,qword ptr [RSP + 0x38]
CMP RDI,R13
JZ 0x001e7440
MOV RSI,qword ptr [RSP + 0x48]
INC RSI
CALL 0x00121180
LAB_001e7440:
INC R12
ADD RBP,0x18
CMP R15,R12
JNZ 0x001e73dd
JMP 0x001e7365
|
/* minja::Parser::consumeTokenGroups(std::__cxx11::basic_regex<char,
std::__cxx11::regex_traits<char> > const&, minja::SpaceHandling) */
vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *
minja::Parser::consumeTokenGroups
(vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *param_1,
Parser *param_2,int8 param_3,int4 param_4)
{
int8 uVar1;
bool bVar2;
long *plVar3;
long lVar4;
long lVar5;
long *local_78;
long *plStack_70;
long local_68;
long lStack_60;
long *local_50 [2];
long local_40 [2];
uVar1 = *(int8 *)(param_2 + 0x20);
consumeSpaces(param_2,param_4);
local_68 = 0;
lStack_60 = 0;
local_78 = (long *)0x0;
plStack_70 = (long *)0x0;
/* try { // try from 001e72fa to 001e730e has its CatchHandler @ 001e7451 */
bVar2 = std::__detail::
__regex_algo_impl<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>,std::allocator<std::__cxx11::sub_match<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>>,char,std::__cxx11::regex_traits<char>>
(*(int8 *)(param_2 + 0x20),*(int8 *)(param_2 + 0x18),&local_78,
param_3,0,0,0);
if (bVar2) {
lVar5 = (long)plStack_70 - (long)local_78;
if (lVar5 == 0) {
lVar4 = local_78[-9];
joined_r0x001e733f:
if (lVar4 != lStack_60) goto LAB_001e7353;
plVar3 = (long *)((long)local_78 + lVar5 + -0x48);
}
else {
lVar4 = *local_78;
if (lVar5 == 0x48) goto joined_r0x001e733f;
plVar3 = local_78;
if (lVar4 != lStack_60) goto LAB_001e7353;
}
lVar4 = 0;
if ((char)plVar3[2] != '\0') {
lVar4 = plVar3[1] - lStack_60;
}
*(long *)(param_2 + 0x20) = *(long *)(param_2 + 0x20) + lVar4;
*(int8 *)param_1 = 0;
*(int8 *)(param_1 + 8) = 0;
*(int8 *)(param_1 + 0x10) = 0;
if ((local_78 != plStack_70) && (lVar5 = (lVar5 >> 3) * -0x5555555555555555, lVar5 != 3)) {
lVar4 = 0;
do {
/* try { // try from 001e7416 to 001e741d has its CatchHandler @ 001e7456 */
std::__cxx11::sub_match<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>::str
();
/* try { // try from 001e741e to 001e7428 has its CatchHandler @ 001e745b */
std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::
emplace_back<std::__cxx11::string>(param_1,(string *)local_50);
if (local_50[0] != local_40) {
operator_delete(local_50[0],local_40[0] + 1);
}
lVar4 = lVar4 + 1;
} while (lVar5 + -3 != lVar4);
}
}
else {
LAB_001e7353:
*(int8 *)(param_2 + 0x20) = uVar1;
*(int8 *)param_1 = 0;
*(int8 *)(param_1 + 8) = 0;
*(int8 *)(param_1 + 0x10) = 0;
}
if (local_78 != (long *)0x0) {
operator_delete(local_78,local_68 - (long)local_78);
}
return param_1;
}
| |
51,802 | 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 0x84f68
testq %rax, %rax
je 0x8be9c
movzbl (%r12), %r15d
testb %r15b, %r15b
jns 0x8bbb7
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 0x8bea1
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 0x8bc55
movl $0x800, %r8d # imm = 0x800
callq 0x8c724
movq %r13, %rcx
testl %eax, %eax
jne 0x8bc75
movl %r13d, %edi
movq %rbx, %rsi
callq 0x858e2
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 0x8bb3b
addq $0x10, %rsp
movq %r13, %rcx
cmpl $0x1, %eax
je 0x8bc75
jmp 0x8bc95
movl $0x6000, %r8d # imm = 0x6000
callq 0x8c724
testl %eax, %eax
je 0x8bd38
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 0x8bbfb
movl $0x1, %eax
jmp 0x8bea1
cmpl $0x2, %eax
je 0x8bd96
testl %eax, %eax
jne 0x8be9c
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 0x858e2
movq %rax, %r8
cmpl %r12d, %r15d
jae 0x8be06
movq 0x10(%rbp), %r14
movq (%r14), %rdx
cmpq 0x8(%r14), %rdx
jne 0x8be3f
movq %r8, -0x70(%rbp)
addq $0xa, %rdx
movq %rdx, 0x8(%r14)
leaq 0xb757f4(%rip), %rax # 0xc014f4
movl (%rax), %edi
movq 0x10(%r14), %rsi
shlq $0x4, %rdx
movl $0x40, %ecx
callq 0xa1308
movq %rax, 0x10(%r14)
testq %rax, %rax
movq -0x58(%rbp), %r15
je 0x8be9c
movq (%r14), %rdx
movq -0x50(%rbp), %r12
movl -0x34(%rbp), %ecx
movq -0x70(%rbp), %r8
jmp 0x8be4e
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 0x8c62f
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 0x8bddf
movq -0x40(%rbp), %rsi
movq -0x50(%rbp), %rdx
movl $0x3, %ecx
callq 0x850e7
testl %eax, %eax
jne 0x8be9c
movl $0x2, %eax
jmp 0x8bea1
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 0x8c62f
movq %r15, %rdi
movq -0x40(%rbp), %rsi
movq -0x50(%rbp), %rdx
movl $0x3, %ecx
movq %r14, %r8
callq 0x85014
testl %eax, %eax
jne 0x8be9c
movzbl 0x1(%r14), %eax
movl (%r14), %ecx
jmp 0x8bec7
movq -0x40(%rbp), %rsi
movq -0x50(%rbp), %rdx
movl $0x3, %ecx
movq %r14, %r8
callq 0x85014
testl %eax, %eax
movl $0x0, %eax
jne 0x8be9c
jmp 0x8bea1
movq -0x48(%rbp), %rdi
movq %r14, %rsi
movq %rbx, %rdx
movl -0x34(%rbp), %ecx
callq 0x8c6bc
testl %eax, %eax
movq -0x58(%rbp), %r8
jne 0x8be9c
movq -0x48(%rbp), %rdi
movq -0x40(%rbp), %rsi
movq -0x50(%rbp), %rdx
movl $0x3, %ecx
callq 0x85014
testl %eax, %eax
jne 0x8be9c
jmp 0x8bed5
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 0x8c62f
movq %r14, %rdi
movq -0x40(%rbp), %rsi
movq %r12, %rdx
movl $0x3, %ecx
movq %r15, %r8
callq 0x85014
testl %eax, %eax
je 0x8bebf
movl $0xffffffff, %eax # imm = 0xFFFFFFFF
movq %fs:0x28, %rcx
cmpq -0x30(%rbp), %rcx
jne 0x8bed9
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 0x8bea1
callq 0x29250
| 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_8BE9C
movzx r15d, byte ptr [r12]
test r15b, r15b
jns short loc_8BBB7
mov rax, [rbp+var_48]
mov rax, [rax]
mov ebx, [rax+17Ch]
loc_8BBB7:
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_8BEA1
mov [rbp+var_58], r12
mov edx, [rbp+arg_8]
inc edx
mov [rbp+var_68], rdx
mov r12d, ecx
loc_8BBFB:
mov rdi, [rsi+28h]
mov rsi, r14
mov rdx, rbx
test r13, r13
jz short loc_8BC55
mov r8d, 800h
call rtree_key_cmp
mov rcx, r13
test eax, eax
jnz short loc_8BC75
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_8BC75
jmp short loc_8BC95
loc_8BC55:
mov r8d, 6000h
call rtree_key_cmp
test eax, eax
jz loc_8BD38
mov rax, [rbp+var_48]
mov rax, [rax]
mov ecx, [rax+178h]
loc_8BC75:
add rbx, r12
add rbx, rcx
cmp rbx, r15
mov rsi, [rbp+var_40]
mov ecx, [rbp+var_34]
jb loc_8BBFB
mov eax, 1
jmp loc_8BEA1
loc_8BC95:
cmp eax, 2
jz loc_8BD96
test eax, eax
jnz loc_8BE9C
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_8BE06
mov r14, [rbp+arg_0]
mov rdx, [r14]
cmp rdx, [r14+8]
jnz loc_8BE3F
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_8BE9C
mov rdx, [r14]
mov r12, [rbp+var_50]
mov ecx, [rbp+var_34]
mov r8, [rbp+var_70]
jmp loc_8BE4E
loc_8BD38:
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_8BDDF
mov rsi, [rbp+var_40]
mov rdx, [rbp+var_50]
mov ecx, 3
call _mi_dispose
test eax, eax
jnz loc_8BE9C
mov eax, 2
jmp loc_8BEA1
loc_8BD96:
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_8BE9C
movzx eax, byte ptr [r14+1]
mov ecx, [r14]
jmp loc_8BEC7
loc_8BDDF:
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_8BE9C
jmp loc_8BEA1
loc_8BE06:
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_8BE9C
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_8BE9C
jmp loc_8BED5
loc_8BE3F:
mov rax, [r14+10h]
mov r15, [rbp+var_58]
mov r12, [rbp+var_50]
mov ecx, [rbp+var_34]
loc_8BE4E:
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_8BEBF
loc_8BE9C:
mov eax, 0FFFFFFFFh
loc_8BEA1:
mov rcx, fs:28h
cmp rcx, [rbp+var_30]
jnz short loc_8BED9
lea rsp, [rbp-28h]
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_8BEBF:
movzx eax, byte ptr [r15+1]
mov ecx, [r15]
loc_8BEC7:
and ecx, 7Fh
shl ecx, 8
or ecx, eax
mov rax, [rbp+var_60]
mov [rax], ecx
loc_8BED5:
xor eax, eax
jmp short loc_8BEA1
loc_8BED9:
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 0x00184f68
TEST RAX,RAX
JZ 0x0018be9c
MOVZX R15D,byte ptr [R12]
TEST R15B,R15B
JNS 0x0018bbb7
MOV RAX,qword ptr [RBP + -0x48]
MOV RAX,qword ptr [RAX]
MOV EBX,dword ptr [RAX + 0x17c]
LAB_0018bbb7:
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 0x0018bea1
MOV qword ptr [RBP + -0x58],R12
MOV EDX,dword ptr [RBP + 0x18]
INC EDX
MOV qword ptr [RBP + -0x68],RDX
MOV R12D,ECX
LAB_0018bbfb:
MOV RDI,qword ptr [RSI + 0x28]
MOV RSI,R14
MOV RDX,RBX
TEST R13,R13
JZ 0x0018bc55
MOV R8D,0x800
CALL 0x0018c724
MOV RCX,R13
TEST EAX,EAX
JNZ 0x0018bc75
MOV EDI,R13D
MOV RSI,RBX
CALL 0x001858e2
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 0x0018bb3b
ADD RSP,0x10
MOV RCX,R13
CMP EAX,0x1
JZ 0x0018bc75
JMP 0x0018bc95
LAB_0018bc55:
MOV R8D,0x6000
CALL 0x0018c724
TEST EAX,EAX
JZ 0x0018bd38
MOV RAX,qword ptr [RBP + -0x48]
MOV RAX,qword ptr [RAX]
MOV ECX,dword ptr [RAX + 0x178]
LAB_0018bc75:
ADD RBX,R12
ADD RBX,RCX
CMP RBX,R15
MOV RSI,qword ptr [RBP + -0x40]
MOV ECX,dword ptr [RBP + -0x34]
JC 0x0018bbfb
MOV EAX,0x1
JMP 0x0018bea1
LAB_0018bc95:
CMP EAX,0x2
JZ 0x0018bd96
TEST EAX,EAX
JNZ 0x0018be9c
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 0x001858e2
MOV R8,RAX
CMP R15D,R12D
JNC 0x0018be06
MOV R14,qword ptr [RBP + 0x10]
MOV RDX,qword ptr [R14]
CMP RDX,qword ptr [R14 + 0x8]
JNZ 0x0018be3f
MOV qword ptr [RBP + -0x70],R8
ADD RDX,0xa
MOV qword ptr [R14 + 0x8],RDX
LEA RAX,[0xd014f4]
MOV EDI,dword ptr [RAX]
MOV RSI,qword ptr [R14 + 0x10]
SHL RDX,0x4
MOV ECX,0x40
CALL 0x001a1308
MOV qword ptr [R14 + 0x10],RAX
TEST RAX,RAX
MOV R15,qword ptr [RBP + -0x58]
JZ 0x0018be9c
MOV RDX,qword ptr [R14]
MOV R12,qword ptr [RBP + -0x50]
MOV ECX,dword ptr [RBP + -0x34]
MOV R8,qword ptr [RBP + -0x70]
JMP 0x0018be4e
LAB_0018bd38:
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 0x0018c62f
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 0x0018bddf
MOV RSI,qword ptr [RBP + -0x40]
MOV RDX,qword ptr [RBP + -0x50]
MOV ECX,0x3
CALL 0x001850e7
TEST EAX,EAX
JNZ 0x0018be9c
MOV EAX,0x2
JMP 0x0018bea1
LAB_0018bd96:
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 0x0018c62f
MOV RDI,R15
MOV RSI,qword ptr [RBP + -0x40]
MOV RDX,qword ptr [RBP + -0x50]
MOV ECX,0x3
MOV R8,R14
CALL 0x00185014
TEST EAX,EAX
JNZ 0x0018be9c
MOVZX EAX,byte ptr [R14 + 0x1]
MOV ECX,dword ptr [R14]
JMP 0x0018bec7
LAB_0018bddf:
MOV RSI,qword ptr [RBP + -0x40]
MOV RDX,qword ptr [RBP + -0x50]
MOV ECX,0x3
MOV R8,R14
CALL 0x00185014
TEST EAX,EAX
MOV EAX,0x0
JNZ 0x0018be9c
JMP 0x0018bea1
LAB_0018be06:
MOV RDI,qword ptr [RBP + -0x48]
MOV RSI,R14
MOV RDX,RBX
MOV ECX,dword ptr [RBP + -0x34]
CALL 0x0018c6bc
TEST EAX,EAX
MOV R8,qword ptr [RBP + -0x58]
JNZ 0x0018be9c
MOV RDI,qword ptr [RBP + -0x48]
MOV RSI,qword ptr [RBP + -0x40]
MOV RDX,qword ptr [RBP + -0x50]
MOV ECX,0x3
CALL 0x00185014
TEST EAX,EAX
JNZ 0x0018be9c
JMP 0x0018bed5
LAB_0018be3f:
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_0018be4e:
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 0x0018c62f
MOV RDI,R14
MOV RSI,qword ptr [RBP + -0x40]
MOV RDX,R12
MOV ECX,0x3
MOV R8,R15
CALL 0x00185014
TEST EAX,EAX
JZ 0x0018bebf
LAB_0018be9c:
MOV EAX,0xffffffff
LAB_0018bea1:
MOV RCX,qword ptr FS:[0x28]
CMP RCX,qword ptr [RBP + -0x30]
JNZ 0x0018bed9
LEA RSP,[RBP + -0x28]
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_0018bebf:
MOVZX EAX,byte ptr [R15 + 0x1]
MOV ECX,dword ptr [R15]
LAB_0018bec7:
AND ECX,0x7f
SHL ECX,0x8
OR ECX,EAX
MOV RAX,qword ptr [RBP + -0x60]
MOV dword ptr [RAX],ECX
LAB_0018bed5:
XOR EAX,EAX
JMP 0x0018bea1
LAB_0018bed9:
CALL 0x00129250
|
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) = 0x18bb97;
lVar8 = _mi_fetch_keypage(param_1,param_2,param_5,3,puVar14,0);
if (lVar8 == 0) {
LAB_0018be9c:
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) = 0x18bc60;
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) = 0x18bd54;
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) = 0x18bdf4;
iVar7 = _mi_write_keypage(plVar5,lVar8,uVar9,3,puVar14);
uVar9 = 0;
if (iVar7 == 0) goto LAB_0018bea1;
goto LAB_0018be9c;
}
*(int8 *)((long)auStack_90 + lVar3 + 0x10) = 0x18bd84;
iVar7 = _mi_dispose(plVar5,lVar8,uVar9,3);
if (iVar7 != 0) goto LAB_0018be9c;
uVar9 = 2;
goto LAB_0018bea1;
}
uVar12 = (ulong)*(uint *)(*local_50 + 0x178);
}
else {
*(int8 *)((long)auStack_90 + lVar3 + 0x10) = 0x18bc15;
iVar7 = rtree_key_cmp(uVar9,param_3,pbVar13,uVar6,0x800);
uVar12 = uVar16;
if (iVar7 == 0) {
*(int8 *)((long)auStack_90 + lVar3 + 0x10) = 0x18bc27;
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) = 0x18bc47;
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) = 0x18bdb2;
rtree_delete_key(plVar5,puVar14,pbVar13,uVar6,uVar11);
lVar8 = local_48;
uVar9 = local_58;
*(int8 *)((long)auStack_90 + lVar3 + 0x10) = 0x18bdca;
iVar7 = _mi_write_keypage(plVar5,lVar8,uVar9,3,puVar14);
if (iVar7 != 0) goto LAB_0018be9c;
bVar1 = *(byte *)((long)puVar14 + 1);
uVar11 = *puVar14;
LAB_0018bec7:
*local_68 = (uVar11 & 0x7f) << 8 | (uint)bVar1;
}
else {
if (iVar7 != 0) goto LAB_0018be9c;
uVar17 = *local_68 + local_3c;
uVar2 = *(ushort *)(local_48 + 0xe);
*(int8 *)((long)auStack_90 + lVar3 + 0x10) = 0x18bcd0;
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) = 0x18bd14;
lVar10 = my_realloc(mi_key_memory_stPageList_pages,lVar10,(lVar8 + 10) * 0x10,
0x40);
param_7[2] = lVar10;
if (lVar10 == 0) goto LAB_0018be9c;
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) = 0x18be81;
rtree_delete_key(plVar5,puVar14,pbVar13,uVar6,uVar11);
lVar8 = local_48;
*(int8 *)((long)auStack_90 + lVar3 + 0x10) = 0x18be98;
iVar7 = _mi_write_keypage(plVar5,lVar8,uVar4,3,puVar14);
if (iVar7 == 0) {
bVar1 = *(byte *)((long)puVar14 + 1);
uVar11 = *puVar14;
goto LAB_0018bec7;
}
goto LAB_0018be9c;
}
*(int8 *)((long)auStack_90 + lVar3 + 0x10) = 0x18be18;
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_0018be9c;
*(int8 *)((long)auStack_90 + lVar3 + 0x10) = 0x18be36;
iVar7 = _mi_write_keypage(plVar5,lVar8,uVar9,3,puVar14);
if (iVar7 != 0) goto LAB_0018be9c;
}
uVar9 = 0;
goto LAB_0018bea1;
}
}
}
pbVar13 = pbVar13 + uVar12 + uVar15;
} while (pbVar13 < pbVar18);
uVar9 = 1;
}
}
LAB_0018bea1:
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;
}
| |
51,803 | my_wc_mb_gb2312 | eloqsql/strings/ctype-gb2312.c | static int
my_wc_mb_gb2312(CHARSET_INFO *cs __attribute__((unused)),
my_wc_t wc, uchar *s, uchar *e)
{
int code;
if (s >= e)
return MY_CS_TOOSMALL;
if ((uint) wc < 0x80)
{
s[0]= (uchar) wc;
return 1;
}
if (!(code=func_uni_gb2312_onechar(wc)))
return MY_CS_ILUNI;
if (s+2>e)
return MY_CS_TOOSMALL2;
code|=0x8080;
s[0]=code>>8;
s[1]=code&0xFF;
return 2;
} | O0 | c | my_wc_mb_gb2312:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
movq -0x20(%rbp), %rax
cmpq -0x28(%rbp), %rax
jb 0x3ad1e
movl $0xffffff9b, -0x4(%rbp) # imm = 0xFFFFFF9B
jmp 0x3ada2
movq -0x18(%rbp), %rax
cmpl $0x80, %eax
jae 0x3ad3e
movq -0x18(%rbp), %rax
movb %al, %cl
movq -0x20(%rbp), %rax
movb %cl, (%rax)
movl $0x1, -0x4(%rbp)
jmp 0x3ada2
movq -0x18(%rbp), %rax
movl %eax, %edi
callq 0x3b090
movl %eax, -0x2c(%rbp)
cmpl $0x0, %eax
jne 0x3ad5a
movl $0x0, -0x4(%rbp)
jmp 0x3ada2
movq -0x20(%rbp), %rax
addq $0x2, %rax
cmpq -0x28(%rbp), %rax
jbe 0x3ad71
movl $0xffffff9a, -0x4(%rbp) # imm = 0xFFFFFF9A
jmp 0x3ada2
movl -0x2c(%rbp), %eax
orl $0x8080, %eax # imm = 0x8080
movl %eax, -0x2c(%rbp)
movl -0x2c(%rbp), %eax
sarl $0x8, %eax
movb %al, %cl
movq -0x20(%rbp), %rax
movb %cl, (%rax)
movl -0x2c(%rbp), %eax
andl $0xff, %eax
movb %al, %cl
movq -0x20(%rbp), %rax
movb %cl, 0x1(%rax)
movl $0x2, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax,%rax)
| my_wc_mb_gb2312:
push rbp
mov rbp, rsp
sub rsp, 30h
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov [rbp+var_20], rdx
mov [rbp+var_28], rcx
mov rax, [rbp+var_20]
cmp rax, [rbp+var_28]
jb short loc_3AD1E
mov [rbp+var_4], 0FFFFFF9Bh
jmp loc_3ADA2
loc_3AD1E:
mov rax, [rbp+var_18]
cmp eax, 80h
jnb short loc_3AD3E
mov rax, [rbp+var_18]
mov cl, al
mov rax, [rbp+var_20]
mov [rax], cl
mov [rbp+var_4], 1
jmp short loc_3ADA2
loc_3AD3E:
mov rax, [rbp+var_18]
mov edi, eax
call func_uni_gb2312_onechar
mov [rbp+var_2C], eax
cmp eax, 0
jnz short loc_3AD5A
mov [rbp+var_4], 0
jmp short loc_3ADA2
loc_3AD5A:
mov rax, [rbp+var_20]
add rax, 2
cmp rax, [rbp+var_28]
jbe short loc_3AD71
mov [rbp+var_4], 0FFFFFF9Ah
jmp short loc_3ADA2
loc_3AD71:
mov eax, [rbp+var_2C]
or eax, 8080h
mov [rbp+var_2C], eax
mov eax, [rbp+var_2C]
sar eax, 8
mov cl, al
mov rax, [rbp+var_20]
mov [rax], cl
mov eax, [rbp+var_2C]
and eax, 0FFh
mov cl, al
mov rax, [rbp+var_20]
mov [rax+1], cl
mov [rbp+var_4], 2
loc_3ADA2:
mov eax, [rbp+var_4]
add rsp, 30h
pop rbp
retn
| long long my_wc_mb_gb2312(long long a1, unsigned int a2, _BYTE *a3, unsigned long long a4)
{
int v5; // [rsp+4h] [rbp-2Ch]
__int16 v6; // [rsp+4h] [rbp-2Ch]
if ( (unsigned long long)a3 < a4 )
{
if ( a2 >= 0x80 )
{
v5 = func_uni_gb2312_onechar(a2);
if ( v5 )
{
if ( (unsigned long long)(a3 + 2) <= a4 )
{
v6 = v5 | 0x8080;
*a3 = HIBYTE(v6);
a3[1] = v6;
return 2;
}
else
{
return (unsigned int)-102;
}
}
else
{
return 0;
}
}
else
{
*a3 = a2;
return 1;
}
}
else
{
return (unsigned int)-101;
}
}
| my_wc_mb_gb2312:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x30
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x18],RSI
MOV qword ptr [RBP + -0x20],RDX
MOV qword ptr [RBP + -0x28],RCX
MOV RAX,qword ptr [RBP + -0x20]
CMP RAX,qword ptr [RBP + -0x28]
JC 0x0013ad1e
MOV dword ptr [RBP + -0x4],0xffffff9b
JMP 0x0013ada2
LAB_0013ad1e:
MOV RAX,qword ptr [RBP + -0x18]
CMP EAX,0x80
JNC 0x0013ad3e
MOV RAX,qword ptr [RBP + -0x18]
MOV CL,AL
MOV RAX,qword ptr [RBP + -0x20]
MOV byte ptr [RAX],CL
MOV dword ptr [RBP + -0x4],0x1
JMP 0x0013ada2
LAB_0013ad3e:
MOV RAX,qword ptr [RBP + -0x18]
MOV EDI,EAX
CALL 0x0013b090
MOV dword ptr [RBP + -0x2c],EAX
CMP EAX,0x0
JNZ 0x0013ad5a
MOV dword ptr [RBP + -0x4],0x0
JMP 0x0013ada2
LAB_0013ad5a:
MOV RAX,qword ptr [RBP + -0x20]
ADD RAX,0x2
CMP RAX,qword ptr [RBP + -0x28]
JBE 0x0013ad71
MOV dword ptr [RBP + -0x4],0xffffff9a
JMP 0x0013ada2
LAB_0013ad71:
MOV EAX,dword ptr [RBP + -0x2c]
OR EAX,0x8080
MOV dword ptr [RBP + -0x2c],EAX
MOV EAX,dword ptr [RBP + -0x2c]
SAR EAX,0x8
MOV CL,AL
MOV RAX,qword ptr [RBP + -0x20]
MOV byte ptr [RAX],CL
MOV EAX,dword ptr [RBP + -0x2c]
AND EAX,0xff
MOV CL,AL
MOV RAX,qword ptr [RBP + -0x20]
MOV byte ptr [RAX + 0x1],CL
MOV dword ptr [RBP + -0x4],0x2
LAB_0013ada2:
MOV EAX,dword ptr [RBP + -0x4]
ADD RSP,0x30
POP RBP
RET
|
int4 my_wc_mb_gb2312(int8 param_1,uint param_2,int1 *param_3,int1 *param_4)
{
uint uVar1;
int4 local_c;
if (param_3 < param_4) {
if (param_2 < 0x80) {
*param_3 = (char)param_2;
local_c = 1;
}
else {
uVar1 = func_uni_gb2312_onechar(param_2);
if (uVar1 == 0) {
local_c = 0;
}
else if (param_4 < param_3 + 2) {
local_c = 0xffffff9a;
}
else {
*param_3 = (char)((uVar1 | 0x8080) >> 8);
param_3[1] = (char)(uVar1 | 0x8080);
local_c = 2;
}
}
}
else {
local_c = 0xffffff9b;
}
return local_c;
}
| |
51,804 | ma_SHA1Encode | eloqsql/libmariadb/libmariadb/ma_sha1.c | static void ma_SHA1Encode(unsigned char *output, uint32 *input, unsigned int len)
{
unsigned int i, j;
for (i = 0, j = 0; j < len; i++, j += 4) {
output[j] = (unsigned char) ((input[i] >> 24) & 0xff);
output[j + 1] = (unsigned char) ((input[i] >> 16) & 0xff);
output[j + 2] = (unsigned char) ((input[i] >> 8) & 0xff);
output[j + 3] = (unsigned char) (input[i] & 0xff);
}
} | O0 | c | ma_SHA1Encode:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movl $0x0, -0x18(%rbp)
movl $0x0, -0x1c(%rbp)
movl -0x1c(%rbp), %eax
cmpl -0x14(%rbp), %eax
jae 0x52464
movq -0x10(%rbp), %rax
movl -0x18(%rbp), %ecx
movl (%rax,%rcx,4), %eax
shrl $0x18, %eax
andl $0xff, %eax
movb %al, %dl
movq -0x8(%rbp), %rax
movl -0x1c(%rbp), %ecx
movb %dl, (%rax,%rcx)
movq -0x10(%rbp), %rax
movl -0x18(%rbp), %ecx
movl (%rax,%rcx,4), %eax
shrl $0x10, %eax
andl $0xff, %eax
movb %al, %dl
movq -0x8(%rbp), %rax
movl -0x1c(%rbp), %ecx
addl $0x1, %ecx
movl %ecx, %ecx
movb %dl, (%rax,%rcx)
movq -0x10(%rbp), %rax
movl -0x18(%rbp), %ecx
movl (%rax,%rcx,4), %eax
shrl $0x8, %eax
andl $0xff, %eax
movb %al, %dl
movq -0x8(%rbp), %rax
movl -0x1c(%rbp), %ecx
addl $0x2, %ecx
movl %ecx, %ecx
movb %dl, (%rax,%rcx)
movq -0x10(%rbp), %rax
movl -0x18(%rbp), %ecx
movl (%rax,%rcx,4), %eax
andl $0xff, %eax
movb %al, %dl
movq -0x8(%rbp), %rax
movl -0x1c(%rbp), %ecx
addl $0x3, %ecx
movl %ecx, %ecx
movb %dl, (%rax,%rcx)
movl -0x18(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x18(%rbp)
movl -0x1c(%rbp), %eax
addl $0x4, %eax
movl %eax, -0x1c(%rbp)
jmp 0x523bd
popq %rbp
retq
nopw %cs:(%rax,%rax)
| ma_SHA1Encode:
push rbp
mov rbp, rsp
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov [rbp+var_14], edx
mov [rbp+var_18], 0
mov [rbp+var_1C], 0
loc_523BD:
mov eax, [rbp+var_1C]
cmp eax, [rbp+var_14]
jnb loc_52464
mov rax, [rbp+var_10]
mov ecx, [rbp+var_18]
mov eax, [rax+rcx*4]
shr eax, 18h
and eax, 0FFh
mov dl, al
mov rax, [rbp+var_8]
mov ecx, [rbp+var_1C]
mov [rax+rcx], dl
mov rax, [rbp+var_10]
mov ecx, [rbp+var_18]
mov eax, [rax+rcx*4]
shr eax, 10h
and eax, 0FFh
mov dl, al
mov rax, [rbp+var_8]
mov ecx, [rbp+var_1C]
add ecx, 1
mov ecx, ecx
mov [rax+rcx], dl
mov rax, [rbp+var_10]
mov ecx, [rbp+var_18]
mov eax, [rax+rcx*4]
shr eax, 8
and eax, 0FFh
mov dl, al
mov rax, [rbp+var_8]
mov ecx, [rbp+var_1C]
add ecx, 2
mov ecx, ecx
mov [rax+rcx], dl
mov rax, [rbp+var_10]
mov ecx, [rbp+var_18]
mov eax, [rax+rcx*4]
and eax, 0FFh
mov dl, al
mov rax, [rbp+var_8]
mov ecx, [rbp+var_1C]
add ecx, 3
mov ecx, ecx
mov [rax+rcx], dl
mov eax, [rbp+var_18]
add eax, 1
mov [rbp+var_18], eax
mov eax, [rbp+var_1C]
add eax, 4
mov [rbp+var_1C], eax
jmp loc_523BD
loc_52464:
pop rbp
retn
| long long ma_SHA1Encode(long long a1, long long a2, unsigned int a3)
{
long long result; // rax
unsigned int i; // [rsp+0h] [rbp-1Ch]
unsigned int v5; // [rsp+4h] [rbp-18h]
v5 = 0;
for ( i = 0; ; i += 4 )
{
result = i;
if ( i >= a3 )
break;
*(_BYTE *)(a1 + i) = HIBYTE(*(_DWORD *)(a2 + 4LL * v5));
*(_BYTE *)(a1 + i + 1) = BYTE2(*(_DWORD *)(a2 + 4LL * v5));
*(_BYTE *)(a1 + i + 2) = BYTE1(*(_DWORD *)(a2 + 4LL * v5));
*(_BYTE *)(a1 + i + 3) = *(_DWORD *)(a2 + 4LL * v5++);
}
return result;
}
| ma_SHA1Encode:
PUSH RBP
MOV RBP,RSP
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV dword ptr [RBP + -0x14],EDX
MOV dword ptr [RBP + -0x18],0x0
MOV dword ptr [RBP + -0x1c],0x0
LAB_001523bd:
MOV EAX,dword ptr [RBP + -0x1c]
CMP EAX,dword ptr [RBP + -0x14]
JNC 0x00152464
MOV RAX,qword ptr [RBP + -0x10]
MOV ECX,dword ptr [RBP + -0x18]
MOV EAX,dword ptr [RAX + RCX*0x4]
SHR EAX,0x18
AND EAX,0xff
MOV DL,AL
MOV RAX,qword ptr [RBP + -0x8]
MOV ECX,dword ptr [RBP + -0x1c]
MOV byte ptr [RAX + RCX*0x1],DL
MOV RAX,qword ptr [RBP + -0x10]
MOV ECX,dword ptr [RBP + -0x18]
MOV EAX,dword ptr [RAX + RCX*0x4]
SHR EAX,0x10
AND EAX,0xff
MOV DL,AL
MOV RAX,qword ptr [RBP + -0x8]
MOV ECX,dword ptr [RBP + -0x1c]
ADD ECX,0x1
MOV ECX,ECX
MOV byte ptr [RAX + RCX*0x1],DL
MOV RAX,qword ptr [RBP + -0x10]
MOV ECX,dword ptr [RBP + -0x18]
MOV EAX,dword ptr [RAX + RCX*0x4]
SHR EAX,0x8
AND EAX,0xff
MOV DL,AL
MOV RAX,qword ptr [RBP + -0x8]
MOV ECX,dword ptr [RBP + -0x1c]
ADD ECX,0x2
MOV ECX,ECX
MOV byte ptr [RAX + RCX*0x1],DL
MOV RAX,qword ptr [RBP + -0x10]
MOV ECX,dword ptr [RBP + -0x18]
MOV EAX,dword ptr [RAX + RCX*0x4]
AND EAX,0xff
MOV DL,AL
MOV RAX,qword ptr [RBP + -0x8]
MOV ECX,dword ptr [RBP + -0x1c]
ADD ECX,0x3
MOV ECX,ECX
MOV byte ptr [RAX + RCX*0x1],DL
MOV EAX,dword ptr [RBP + -0x18]
ADD EAX,0x1
MOV dword ptr [RBP + -0x18],EAX
MOV EAX,dword ptr [RBP + -0x1c]
ADD EAX,0x4
MOV dword ptr [RBP + -0x1c],EAX
JMP 0x001523bd
LAB_00152464:
POP RBP
RET
|
void ma_SHA1Encode(long param_1,long param_2,uint param_3)
{
int4 local_24;
int4 local_20;
local_20 = 0;
for (local_24 = 0; local_24 < param_3; local_24 = local_24 + 4) {
*(char *)(param_1 + (ulong)local_24) =
(char)((uint)*(int4 *)(param_2 + (ulong)local_20 * 4) >> 0x18);
*(char *)(param_1 + (ulong)(local_24 + 1)) =
(char)((uint)*(int4 *)(param_2 + (ulong)local_20 * 4) >> 0x10);
*(char *)(param_1 + (ulong)(local_24 + 2)) =
(char)((uint)*(int4 *)(param_2 + (ulong)local_20 * 4) >> 8);
*(char *)(param_1 + (ulong)(local_24 + 3)) =
(char)*(int4 *)(param_2 + (ulong)local_20 * 4);
local_20 = local_20 + 1;
}
return;
}
| |
51,805 | create_eth_tx_proof | corpus-core[P]colibri-stateless/src/chains/eth/proofer/proof_transaction.c | static c4_status_t create_eth_tx_proof(proofer_ctx_t* ctx, uint32_t tx_index, beacon_block_t* block_data, bytes32_t body_root, bytes_t tx_proof) {
ssz_builder_t eth_tx_proof = ssz_builder_for_type(ETH_SSZ_VERIFY_TRANSACTION_PROOF);
// build the proof
ssz_add_bytes(ð_tx_proof, "transaction", ssz_at(ssz_get(&block_data->execution, "transactions"), tx_index).bytes);
ssz_add_uint32(ð_tx_proof, tx_index);
ssz_add_bytes(ð_tx_proof, "blockNumber", ssz_get(&block_data->execution, "blockNumber").bytes);
ssz_add_bytes(ð_tx_proof, "blockHash", ssz_get(&block_data->execution, "blockHash").bytes);
ssz_add_uint64(ð_tx_proof, ssz_get_uint64(&block_data->execution, "baseFeePerGas"));
ssz_add_bytes(ð_tx_proof, "proof", tx_proof);
ssz_add_builders(ð_tx_proof, "header", c4_proof_add_header(block_data->header, body_root));
ssz_add_bytes(ð_tx_proof, "sync_committee_bits", ssz_get(&block_data->sync_aggregate, "syncCommitteeBits").bytes);
ssz_add_bytes(ð_tx_proof, "sync_committee_signature", ssz_get(&block_data->sync_aggregate, "syncCommitteeSignature").bytes);
ctx->proof = eth_create_proof_request(
ctx->chain_id,
NULL_SSZ_BUILDER,
eth_tx_proof,
NULL_SSZ_BUILDER);
return C4_SUCCESS;
} | O0 | c | create_eth_tx_proof:
pushq %rbp
movq %rsp, %rbp
subq $0x2c0, %rsp # imm = 0x2C0
movl %r8d, -0x10(%rbp)
movq %r9, -0x8(%rbp)
movq %rdi, -0x18(%rbp)
movl %esi, -0x1c(%rbp)
movq %rdx, -0x28(%rbp)
movq %rcx, -0x30(%rbp)
leaq -0x68(%rbp), %rdi
xorl %esi, %esi
movl $0x38, %edx
callq 0x5110
movl $0x7, %edi
callq 0x166f0
movq %rax, -0x68(%rbp)
movq -0x28(%rbp), %rsi
addq $0x20, %rsi
leaq -0x90(%rbp), %rdi
leaq 0x4a805(%rip), %rdx # 0x526fb
callq 0x1c760
movl -0x1c(%rbp), %esi
leaq -0xa8(%rbp), %rdi
leaq -0x90(%rbp), %rax
movq (%rax), %rcx
movq %rcx, (%rsp)
movq 0x8(%rax), %rcx
movq %rcx, 0x8(%rsp)
movq 0x10(%rax), %rax
movq %rax, 0x10(%rsp)
callq 0x1b0d0
movq -0xa8(%rbp), %rax
movq %rax, -0x78(%rbp)
movq -0xa0(%rbp), %rax
movq %rax, -0x70(%rbp)
movl -0x78(%rbp), %edx
movq -0x70(%rbp), %rcx
leaq -0x68(%rbp), %rdi
leaq 0x4a7b6(%rip), %rsi # 0x52708
callq 0x1e730
movl -0x1c(%rbp), %esi
leaq -0x68(%rbp), %rdi
callq 0x1e3f0
movq -0x28(%rbp), %rsi
addq $0x20, %rsi
leaq -0xd0(%rbp), %rdi
leaq 0x4a6ec(%rip), %rdx # 0x52665
callq 0x1c760
movq -0xd0(%rbp), %rax
movq %rax, -0xb8(%rbp)
movq -0xc8(%rbp), %rax
movq %rax, -0xb0(%rbp)
movl -0xb8(%rbp), %edx
movq -0xb0(%rbp), %rcx
leaq -0x68(%rbp), %rdi
leaq 0x4a6b3(%rip), %rsi # 0x52665
callq 0x1e730
movq -0x28(%rbp), %rsi
addq $0x20, %rsi
leaq -0xf8(%rbp), %rdi
leaq 0x4a716(%rip), %rdx # 0x526e3
callq 0x1c760
movq -0xf8(%rbp), %rax
movq %rax, -0xe0(%rbp)
movq -0xf0(%rbp), %rax
movq %rax, -0xd8(%rbp)
movl -0xe0(%rbp), %edx
movq -0xd8(%rbp), %rcx
leaq -0x68(%rbp), %rdi
leaq 0x4a6dd(%rip), %rsi # 0x526e3
callq 0x1e730
movq -0x28(%rbp), %rdi
addq $0x20, %rdi
leaq 0x4a6d3(%rip), %rsi # 0x526ed
callq 0x8260
movq %rax, %rsi
leaq -0x68(%rbp), %rdi
callq 0x1ea30
movl -0x10(%rbp), %edx
movq -0x8(%rbp), %rcx
leaq -0x68(%rbp), %rdi
leaq 0x4c3fb(%rip), %rsi # 0x54438
callq 0x1e730
movq -0x28(%rbp), %rax
addq $0x8, %rax
movq -0x30(%rbp), %rsi
leaq -0x130(%rbp), %rdi
movq (%rax), %rcx
movq %rcx, (%rsp)
movq 0x8(%rax), %rcx
movq %rcx, 0x8(%rsp)
movq 0x10(%rax), %rax
movq %rax, 0x10(%rsp)
callq 0xb330
movq -0x100(%rbp), %rcx
movq %rsp, %rax
movq %rcx, 0x30(%rax)
movups -0x130(%rbp), %xmm0
movups -0x120(%rbp), %xmm1
movups -0x110(%rbp), %xmm2
movups %xmm2, 0x20(%rax)
movups %xmm1, 0x10(%rax)
movups %xmm0, (%rax)
leaq 0x4bd31(%rip), %rsi # 0x53dd9
leaq -0x68(%rbp), %rdi
callq 0x1e460
movq -0x28(%rbp), %rsi
addq $0x50, %rsi
leaq -0x158(%rbp), %rdi
leaq 0x4a661(%rip), %rdx # 0x52728
callq 0x1c760
movq -0x158(%rbp), %rax
movq %rax, -0x140(%rbp)
movq -0x150(%rbp), %rax
movq %rax, -0x138(%rbp)
movl -0x140(%rbp), %edx
movq -0x138(%rbp), %rcx
leaq -0x68(%rbp), %rdi
leaq 0x4a614(%rip), %rsi # 0x52714
callq 0x1e730
movq -0x28(%rbp), %rsi
addq $0x50, %rsi
leaq -0x180(%rbp), %rdi
leaq 0x4a638(%rip), %rdx # 0x52753
callq 0x1c760
movq -0x180(%rbp), %rax
movq %rax, -0x168(%rbp)
movq -0x178(%rbp), %rax
movq %rax, -0x160(%rbp)
movl -0x168(%rbp), %edx
movq -0x160(%rbp), %rcx
leaq -0x68(%rbp), %rdi
leaq 0x4a5e6(%rip), %rsi # 0x5273a
callq 0x1e730
movq -0x18(%rbp), %rax
movq %rax, -0x208(%rbp)
movq -0x18(%rbp), %rax
movl 0x30(%rax), %eax
movl %eax, -0x20c(%rbp)
leaq -0x1c8(%rbp), %rdi
xorl %esi, %esi
movl $0x38, %edx
callq 0x5110
leaq -0x200(%rbp), %rdi
xorl %esi, %esi
movl $0x38, %edx
callq 0x5110
movl -0x20c(%rbp), %edi
movq -0x1d0(%rbp), %rcx
movq %rsp, %rax
movq %rcx, 0xa0(%rax)
movups -0x200(%rbp), %xmm0
movups -0x1f0(%rbp), %xmm1
movups -0x1e0(%rbp), %xmm2
movups %xmm2, 0x90(%rax)
movups %xmm1, 0x80(%rax)
movups %xmm0, 0x70(%rax)
movq -0x38(%rbp), %rcx
movq %rcx, 0x68(%rax)
movups -0x68(%rbp), %xmm0
movups -0x58(%rbp), %xmm1
movups -0x48(%rbp), %xmm2
movups %xmm2, 0x58(%rax)
movups %xmm1, 0x48(%rax)
movups %xmm0, 0x38(%rax)
movq -0x198(%rbp), %rcx
movq %rcx, 0x30(%rax)
movups -0x1c8(%rbp), %xmm0
movups -0x1b8(%rbp), %xmm1
movups -0x1a8(%rbp), %xmm2
movups %xmm2, 0x20(%rax)
movups %xmm1, 0x10(%rax)
movups %xmm0, (%rax)
callq 0xe3e0
movl %eax, %ecx
movq -0x208(%rbp), %rax
movl %ecx, -0x190(%rbp)
movq %rdx, -0x188(%rbp)
movq -0x190(%rbp), %rcx
movq %rcx, 0x20(%rax)
movq -0x188(%rbp), %rcx
movq %rcx, 0x28(%rax)
xorl %eax, %eax
addq $0x2c0, %rsp # imm = 0x2C0
popq %rbp
retq
nopl (%rax)
| create_eth_tx_proof:
push rbp
mov rbp, rsp
sub rsp, 2C0h
mov [rbp+var_10], r8d
mov [rbp+var_8], r9
mov [rbp+var_18], rdi
mov [rbp+var_1C], esi
mov [rbp+var_28], rdx
mov [rbp+var_30], rcx
lea rdi, [rbp+var_68]
xor esi, esi
mov edx, 38h ; '8'
call _memset
mov edi, 7
call eth_ssz_verification_type
mov qword ptr [rbp+var_68], rax
mov rsi, [rbp+var_28]
add rsi, 20h ; ' '
lea rdi, [rbp+var_90]
lea rdx, aTransactions; "transactions"
call ssz_get
mov esi, [rbp+var_1C]
lea rdi, [rbp+var_A8]
lea rax, [rbp+var_90]
mov rcx, [rax]
mov [rsp+2C0h+var_2C0], rcx
mov rcx, [rax+8]
mov [rsp+2C0h+var_2B8], rcx
mov rax, [rax+10h]
mov [rsp+2C0h+var_2B0], rax
call ssz_at
mov rax, [rbp+var_A8]
mov [rbp+var_78], rax
mov rax, [rbp+var_A0]
mov [rbp+var_70], rax
mov edx, dword ptr [rbp+var_78]
mov rcx, [rbp+var_70]
lea rdi, [rbp+var_68]
lea rsi, aTransaction; "transaction"
call ssz_add_bytes
mov esi, [rbp+var_1C]
lea rdi, [rbp+var_68]
call ssz_add_uint32
mov rsi, [rbp+var_28]
add rsi, 20h ; ' '
lea rdi, [rbp+var_D0]
lea rdx, aBlocknumber; "blockNumber"
call ssz_get
mov rax, [rbp+var_D0]
mov [rbp+var_B8], rax
mov rax, [rbp+var_C8]
mov [rbp+var_B0], rax
mov edx, dword ptr [rbp+var_B8]
mov rcx, [rbp+var_B0]
lea rdi, [rbp+var_68]
lea rsi, aBlocknumber; "blockNumber"
call ssz_add_bytes
mov rsi, [rbp+var_28]
add rsi, 20h ; ' '
lea rdi, [rbp+var_F8]
lea rdx, aBlockhash; "blockHash"
call ssz_get
mov rax, [rbp+var_F8]
mov [rbp+var_E0], rax
mov rax, [rbp+var_F0]
mov [rbp+var_D8], rax
mov edx, dword ptr [rbp+var_E0]
mov rcx, [rbp+var_D8]
lea rdi, [rbp+var_68]
lea rsi, aBlockhash; "blockHash"
call ssz_add_bytes
mov rdi, [rbp+var_28]
add rdi, 20h ; ' '
lea rsi, aBasefeepergas; "baseFeePerGas"
call ssz_get_uint64_0
mov rsi, rax
lea rdi, [rbp+var_68]
call ssz_add_uint64
mov edx, [rbp+var_10]
mov rcx, [rbp+var_8]
lea rdi, [rbp+var_68]
lea rsi, aMerkleProof+7; "proof"
call ssz_add_bytes
mov rax, [rbp+var_28]
add rax, 8
mov rsi, [rbp+var_30]
lea rdi, [rbp+var_130]
mov rcx, [rax]
mov [rsp+2C0h+var_2C0], rcx
mov rcx, [rax+8]
mov [rsp+2C0h+var_2B8], rcx
mov rax, [rax+10h]
mov [rsp+2C0h+var_2B0], rax
call c4_proof_add_header
mov rcx, [rbp+var_100]
mov rax, rsp
mov [rax+30h], rcx
movups xmm0, [rbp+var_130]
movups xmm1, [rbp+var_120]
movups xmm2, [rbp+var_110]
movups xmmword ptr [rax+20h], xmm2
movups xmmword ptr [rax+10h], xmm1
movups xmmword ptr [rax], xmm0
lea rsi, aInvalidRespons+15h; "header"
lea rdi, [rbp+var_68]
call ssz_add_builders
mov rsi, [rbp+var_28]
add rsi, 50h ; 'P'
lea rdi, [rbp+var_158]
lea rdx, aSynccommitteeb; "syncCommitteeBits"
call ssz_get
mov rax, [rbp+var_158]
mov [rbp+var_140], rax
mov rax, [rbp+var_150]
mov [rbp+var_138], rax
mov edx, dword ptr [rbp+var_140]
mov rcx, [rbp+var_138]
lea rdi, [rbp+var_68]
lea rsi, aSyncCommitteeB; "sync_committee_bits"
call ssz_add_bytes
mov rsi, [rbp+var_28]
add rsi, 50h ; 'P'
lea rdi, [rbp+var_180]
lea rdx, aSynccommittees; "syncCommitteeSignature"
call ssz_get
mov rax, [rbp+var_180]
mov [rbp+var_168], rax
mov rax, [rbp+var_178]
mov [rbp+var_160], rax
mov edx, dword ptr [rbp+var_168]
mov rcx, [rbp+var_160]
lea rdi, [rbp+var_68]
lea rsi, aSyncCommitteeS; "sync_committee_signature"
call ssz_add_bytes
mov rax, [rbp+var_18]
mov [rbp+var_208], rax
mov rax, [rbp+var_18]
mov eax, [rax+30h]
mov [rbp+var_20C], eax
lea rdi, [rbp+var_1C8]
xor esi, esi
mov edx, 38h ; '8'
call _memset
lea rdi, [rbp+var_200]
xor esi, esi
mov edx, 38h ; '8'
call _memset
mov edi, [rbp+var_20C]
mov rcx, [rbp+var_1D0]
mov rax, rsp
mov [rax+0A0h], rcx
movups xmm0, [rbp+var_200]
movups xmm1, [rbp+var_1F0]
movups xmm2, [rbp+var_1E0]
movups xmmword ptr [rax+90h], xmm2
movups xmmword ptr [rax+80h], xmm1
movups xmmword ptr [rax+70h], xmm0
mov rcx, [rbp+var_38]
mov [rax+68h], rcx
movups xmm0, [rbp+var_68]
movups xmm1, [rbp+var_58]
movups xmm2, [rbp+var_48]
movups xmmword ptr [rax+58h], xmm2
movups xmmword ptr [rax+48h], xmm1
movups xmmword ptr [rax+38h], xmm0
mov rcx, [rbp+var_198]
mov [rax+30h], rcx
movups xmm0, [rbp+var_1C8]
movups xmm1, [rbp+var_1B8]
movups xmm2, [rbp+var_1A8]
movups xmmword ptr [rax+20h], xmm2
movups xmmword ptr [rax+10h], xmm1
movups xmmword ptr [rax], xmm0
call eth_create_proof_request
mov ecx, eax
mov rax, [rbp+var_208]
mov dword ptr [rbp+var_190], ecx
mov [rbp+var_188], rdx
mov rcx, [rbp+var_190]
mov [rax+20h], rcx
mov rcx, [rbp+var_188]
mov [rax+28h], rcx
xor eax, eax
add rsp, 2C0h
pop rbp
retn
| long long create_eth_tx_proof(
long long a1,
unsigned int a2,
long long a3,
long long a4,
unsigned int a5,
long long a6)
{
int v6; // edx
int v7; // r8d
int v8; // r9d
long long uint64_0; // rax
int v10; // edx
int v11; // r8d
int v12; // r9d
int v13; // edx
int v14; // r8d
int v15; // r9d
int v16; // edx
int v17; // r8d
int v18; // r9d
long long v19; // rdx
int v21; // [rsp+B4h] [rbp-20Ch]
long long v22; // [rsp+B8h] [rbp-208h]
_OWORD v23[3]; // [rsp+C0h] [rbp-200h] BYREF
long long v24; // [rsp+F0h] [rbp-1D0h]
char v25; // [rsp+F8h] [rbp-1C8h] BYREF
int v26; // [rsp+100h] [rbp-1C0h]
int v27; // [rsp+108h] [rbp-1B8h]
int v28; // [rsp+110h] [rbp-1B0h]
int v29; // [rsp+118h] [rbp-1A8h]
int v30; // [rsp+120h] [rbp-1A0h]
long long v31; // [rsp+128h] [rbp-198h]
long long v32; // [rsp+130h] [rbp-190h]
long long v33; // [rsp+138h] [rbp-188h]
long long v34; // [rsp+140h] [rbp-180h] BYREF
long long v35; // [rsp+148h] [rbp-178h]
long long v36; // [rsp+158h] [rbp-168h]
long long v37; // [rsp+160h] [rbp-160h]
long long v38; // [rsp+168h] [rbp-158h] BYREF
long long v39; // [rsp+170h] [rbp-150h]
long long v40; // [rsp+180h] [rbp-140h]
long long v41; // [rsp+188h] [rbp-138h]
_OWORD v42[3]; // [rsp+190h] [rbp-130h] BYREF
long long v43; // [rsp+1C0h] [rbp-100h]
long long v44; // [rsp+1C8h] [rbp-F8h] BYREF
long long v45; // [rsp+1D0h] [rbp-F0h]
long long v46; // [rsp+1E0h] [rbp-E0h]
long long v47; // [rsp+1E8h] [rbp-D8h]
long long v48; // [rsp+1F0h] [rbp-D0h] BYREF
long long v49; // [rsp+1F8h] [rbp-C8h]
long long v50; // [rsp+208h] [rbp-B8h]
long long v51; // [rsp+210h] [rbp-B0h]
long long v52; // [rsp+218h] [rbp-A8h] BYREF
long long v53; // [rsp+220h] [rbp-A0h]
long long v54; // [rsp+230h] [rbp-90h] BYREF
long long v55; // [rsp+238h] [rbp-88h]
long long v56; // [rsp+240h] [rbp-80h]
long long v57; // [rsp+248h] [rbp-78h]
long long v58; // [rsp+250h] [rbp-70h]
long long v59; // [rsp+258h] [rbp-68h] BYREF
int v60; // [rsp+260h] [rbp-60h]
int v61; // [rsp+268h] [rbp-58h]
int v62; // [rsp+270h] [rbp-50h]
int v63; // [rsp+278h] [rbp-48h]
int v64; // [rsp+280h] [rbp-40h]
long long v65; // [rsp+288h] [rbp-38h]
long long v66; // [rsp+290h] [rbp-30h]
long long v67; // [rsp+298h] [rbp-28h]
unsigned int v68; // [rsp+2A4h] [rbp-1Ch]
long long v69; // [rsp+2A8h] [rbp-18h]
unsigned int v70; // [rsp+2B0h] [rbp-10h]
long long v71; // [rsp+2B8h] [rbp-8h]
v70 = a5;
v71 = a6;
v69 = a1;
v68 = a2;
v67 = a3;
v66 = a4;
memset(&v59, 0LL, 56LL);
v59 = eth_ssz_verification_type(7LL);
ssz_get(&v54, v67 + 32, "transactions");
ssz_at((unsigned int)&v52, v68, v6, v55, v7, v8, v54, v55, v56);
v57 = v52;
v58 = v53;
ssz_add_bytes(&v59, "transaction", (unsigned int)v52, v53);
ssz_add_uint32(&v59, v68);
ssz_get(&v48, v67 + 32, "blockNumber");
v50 = v48;
v51 = v49;
ssz_add_bytes(&v59, "blockNumber", (unsigned int)v48, v49);
ssz_get(&v44, v67 + 32, "blockHash");
v46 = v44;
v47 = v45;
ssz_add_bytes(&v59, "blockHash", (unsigned int)v44, v45);
uint64_0 = ssz_get_uint64_0(v67 + 32, "baseFeePerGas");
ssz_add_uint64(&v59, uint64_0);
ssz_add_bytes(&v59, "proof", v70, v71);
c4_proof_add_header((unsigned int)v42, v66, v10, *(_QWORD *)(v67 + 16), v11, v12, *(_QWORD *)(v67 + 8));
ssz_add_builders((unsigned int)&v59, (unsigned int)"header", v13, v43, v14, v15, v42[0], v42[1], v42[2], v43);
ssz_get(&v38, v67 + 80, "syncCommitteeBits");
v40 = v38;
v41 = v39;
ssz_add_bytes(&v59, "sync_committee_bits", (unsigned int)v38, v39);
ssz_get(&v34, v67 + 80, "syncCommitteeSignature");
v36 = v34;
v37 = v35;
ssz_add_bytes(&v59, "sync_committee_signature", (unsigned int)v34, v35);
v22 = v69;
v21 = *(_DWORD *)(v69 + 48);
memset(&v25, 0LL, 56LL);
memset(v23, 0LL, 56LL);
LODWORD(v32) = eth_create_proof_request(
v21,
0,
v16,
v31,
v17,
v18,
v25,
v26,
v27,
v28,
v29,
v30,
v31,
v59,
v60,
v61,
v62,
v63,
v64,
v65,
v23[0],
v23[1],
v23[2],
v24);
v33 = v19;
*(_QWORD *)(v22 + 32) = v32;
*(_QWORD *)(v22 + 40) = v33;
return 0LL;
}
| create_eth_tx_proof:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x2c0
MOV dword ptr [RBP + -0x10],R8D
MOV qword ptr [RBP + -0x8],R9
MOV qword ptr [RBP + -0x18],RDI
MOV dword ptr [RBP + -0x1c],ESI
MOV qword ptr [RBP + -0x28],RDX
MOV qword ptr [RBP + -0x30],RCX
LEA RDI,[RBP + -0x68]
XOR ESI,ESI
MOV EDX,0x38
CALL 0x00105110
MOV EDI,0x7
CALL 0x001166f0
MOV qword ptr [RBP + -0x68],RAX
MOV RSI,qword ptr [RBP + -0x28]
ADD RSI,0x20
LEA RDI,[RBP + -0x90]
LEA RDX,[0x1526fb]
CALL 0x0011c760
MOV ESI,dword ptr [RBP + -0x1c]
LEA RDI,[RBP + -0xa8]
LEA RAX,[RBP + -0x90]
MOV RCX,qword ptr [RAX]
MOV qword ptr [RSP],RCX
MOV RCX,qword ptr [RAX + 0x8]
MOV qword ptr [RSP + 0x8],RCX
MOV RAX,qword ptr [RAX + 0x10]
MOV qword ptr [RSP + 0x10],RAX
CALL 0x0011b0d0
MOV RAX,qword ptr [RBP + -0xa8]
MOV qword ptr [RBP + -0x78],RAX
MOV RAX,qword ptr [RBP + -0xa0]
MOV qword ptr [RBP + -0x70],RAX
MOV EDX,dword ptr [RBP + -0x78]
MOV RCX,qword ptr [RBP + -0x70]
LEA RDI,[RBP + -0x68]
LEA RSI,[0x152708]
CALL 0x0011e730
MOV ESI,dword ptr [RBP + -0x1c]
LEA RDI,[RBP + -0x68]
CALL 0x0011e3f0
MOV RSI,qword ptr [RBP + -0x28]
ADD RSI,0x20
LEA RDI,[RBP + -0xd0]
LEA RDX,[0x152665]
CALL 0x0011c760
MOV RAX,qword ptr [RBP + -0xd0]
MOV qword ptr [RBP + -0xb8],RAX
MOV RAX,qword ptr [RBP + -0xc8]
MOV qword ptr [RBP + -0xb0],RAX
MOV EDX,dword ptr [RBP + -0xb8]
MOV RCX,qword ptr [RBP + -0xb0]
LEA RDI,[RBP + -0x68]
LEA RSI,[0x152665]
CALL 0x0011e730
MOV RSI,qword ptr [RBP + -0x28]
ADD RSI,0x20
LEA RDI,[RBP + -0xf8]
LEA RDX,[0x1526e3]
CALL 0x0011c760
MOV RAX,qword ptr [RBP + -0xf8]
MOV qword ptr [RBP + -0xe0],RAX
MOV RAX,qword ptr [RBP + -0xf0]
MOV qword ptr [RBP + -0xd8],RAX
MOV EDX,dword ptr [RBP + -0xe0]
MOV RCX,qword ptr [RBP + -0xd8]
LEA RDI,[RBP + -0x68]
LEA RSI,[0x1526e3]
CALL 0x0011e730
MOV RDI,qword ptr [RBP + -0x28]
ADD RDI,0x20
LEA RSI,[0x1526ed]
CALL 0x00108260
MOV RSI,RAX
LEA RDI,[RBP + -0x68]
CALL 0x0011ea30
MOV EDX,dword ptr [RBP + -0x10]
MOV RCX,qword ptr [RBP + -0x8]
LEA RDI,[RBP + -0x68]
LEA RSI,[0x154438]
CALL 0x0011e730
MOV RAX,qword ptr [RBP + -0x28]
ADD RAX,0x8
MOV RSI,qword ptr [RBP + -0x30]
LEA RDI,[RBP + -0x130]
MOV RCX,qword ptr [RAX]
MOV qword ptr [RSP],RCX
MOV RCX,qword ptr [RAX + 0x8]
MOV qword ptr [RSP + 0x8],RCX
MOV RAX,qword ptr [RAX + 0x10]
MOV qword ptr [RSP + 0x10],RAX
CALL 0x0010b330
MOV RCX,qword ptr [RBP + -0x100]
MOV RAX,RSP
MOV qword ptr [RAX + 0x30],RCX
MOVUPS XMM0,xmmword ptr [RBP + -0x130]
MOVUPS XMM1,xmmword ptr [RBP + -0x120]
MOVUPS XMM2,xmmword ptr [RBP + -0x110]
MOVUPS xmmword ptr [RAX + 0x20],XMM2
MOVUPS xmmword ptr [RAX + 0x10],XMM1
MOVUPS xmmword ptr [RAX],XMM0
LEA RSI,[0x153dd9]
LEA RDI,[RBP + -0x68]
CALL 0x0011e460
MOV RSI,qword ptr [RBP + -0x28]
ADD RSI,0x50
LEA RDI,[RBP + -0x158]
LEA RDX,[0x152728]
CALL 0x0011c760
MOV RAX,qword ptr [RBP + -0x158]
MOV qword ptr [RBP + -0x140],RAX
MOV RAX,qword ptr [RBP + -0x150]
MOV qword ptr [RBP + -0x138],RAX
MOV EDX,dword ptr [RBP + -0x140]
MOV RCX,qword ptr [RBP + -0x138]
LEA RDI,[RBP + -0x68]
LEA RSI,[0x152714]
CALL 0x0011e730
MOV RSI,qword ptr [RBP + -0x28]
ADD RSI,0x50
LEA RDI,[RBP + -0x180]
LEA RDX,[0x152753]
CALL 0x0011c760
MOV RAX,qword ptr [RBP + -0x180]
MOV qword ptr [RBP + -0x168],RAX
MOV RAX,qword ptr [RBP + -0x178]
MOV qword ptr [RBP + -0x160],RAX
MOV EDX,dword ptr [RBP + -0x168]
MOV RCX,qword ptr [RBP + -0x160]
LEA RDI,[RBP + -0x68]
LEA RSI,[0x15273a]
CALL 0x0011e730
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RBP + -0x208],RAX
MOV RAX,qword ptr [RBP + -0x18]
MOV EAX,dword ptr [RAX + 0x30]
MOV dword ptr [RBP + -0x20c],EAX
LEA RDI,[RBP + -0x1c8]
XOR ESI,ESI
MOV EDX,0x38
CALL 0x00105110
LEA RDI,[RBP + -0x200]
XOR ESI,ESI
MOV EDX,0x38
CALL 0x00105110
MOV EDI,dword ptr [RBP + -0x20c]
MOV RCX,qword ptr [RBP + -0x1d0]
MOV RAX,RSP
MOV qword ptr [RAX + 0xa0],RCX
MOVUPS XMM0,xmmword ptr [RBP + -0x200]
MOVUPS XMM1,xmmword ptr [RBP + -0x1f0]
MOVUPS XMM2,xmmword ptr [RBP + -0x1e0]
MOVUPS xmmword ptr [RAX + 0x90],XMM2
MOVUPS xmmword ptr [RAX + 0x80],XMM1
MOVUPS xmmword ptr [RAX + 0x70],XMM0
MOV RCX,qword ptr [RBP + -0x38]
MOV qword ptr [RAX + 0x68],RCX
MOVUPS XMM0,xmmword ptr [RBP + -0x68]
MOVUPS XMM1,xmmword ptr [RBP + -0x58]
MOVUPS XMM2,xmmword ptr [RBP + -0x48]
MOVUPS xmmword ptr [RAX + 0x58],XMM2
MOVUPS xmmword ptr [RAX + 0x48],XMM1
MOVUPS xmmword ptr [RAX + 0x38],XMM0
MOV RCX,qword ptr [RBP + -0x198]
MOV qword ptr [RAX + 0x30],RCX
MOVUPS XMM0,xmmword ptr [RBP + -0x1c8]
MOVUPS XMM1,xmmword ptr [RBP + -0x1b8]
MOVUPS XMM2,xmmword ptr [RBP + -0x1a8]
MOVUPS xmmword ptr [RAX + 0x20],XMM2
MOVUPS xmmword ptr [RAX + 0x10],XMM1
MOVUPS xmmword ptr [RAX],XMM0
CALL 0x0010e3e0
MOV ECX,EAX
MOV RAX,qword ptr [RBP + -0x208]
MOV dword ptr [RBP + -0x190],ECX
MOV qword ptr [RBP + -0x188],RDX
MOV RCX,qword ptr [RBP + -0x190]
MOV qword ptr [RAX + 0x20],RCX
MOV RCX,qword ptr [RBP + -0x188]
MOV qword ptr [RAX + 0x28],RCX
XOR EAX,EAX
ADD RSP,0x2c0
POP RBP
RET
|
int8
create_eth_tx_proof(long param_1,int4 param_2,long param_3,int8 param_4,
int4 param_5,int8 param_6)
{
long lVar1;
int4 uVar2;
int8 uVar3;
int8 extraout_RDX;
int1 local_208 [56];
int1 local_1d0 [60];
int4 uStack_194;
ulong local_188;
int8 local_180;
ulong local_170;
int8 local_168;
ulong local_160;
int8 local_158;
ulong local_148;
int8 local_140;
int1 local_138 [56];
ulong local_100;
int8 local_f8;
ulong local_e8;
int8 local_e0;
ulong local_d8;
int8 local_d0;
ulong local_c0;
int8 local_b8;
ulong local_b0;
int8 local_a8;
int1 local_98 [24];
ulong local_80;
int8 local_78;
int8 local_70 [7];
int8 local_38;
long local_30;
int4 local_24;
long local_20;
int4 local_18;
int8 local_10;
local_38 = param_4;
local_30 = param_3;
local_24 = param_2;
local_20 = param_1;
local_18 = param_5;
local_10 = param_6;
memset(local_70,0,0x38);
local_70[0] = eth_ssz_verification_type(7);
ssz_get(local_98,local_30 + 0x20,"transactions");
ssz_at(&local_b0,local_24);
local_80 = local_b0;
local_78 = local_a8;
ssz_add_bytes(local_70,"transaction",local_b0 & 0xffffffff,local_a8);
ssz_add_uint32(local_70,local_24);
ssz_get(&local_d8,local_30 + 0x20,"blockNumber");
local_c0 = local_d8;
local_b8 = local_d0;
ssz_add_bytes(local_70,"blockNumber",local_d8 & 0xffffffff,local_d0);
ssz_get(&local_100,local_30 + 0x20,"blockHash");
local_e8 = local_100;
local_e0 = local_f8;
ssz_add_bytes(local_70,"blockHash",local_100 & 0xffffffff,local_f8);
uVar3 = ssz_get_uint64(local_30 + 0x20,"baseFeePerGas");
ssz_add_uint64(local_70,uVar3);
ssz_add_bytes(local_70,"proof",local_18,local_10);
c4_proof_add_header(local_138,local_38);
ssz_add_builders(local_70,"header");
ssz_get(&local_160,local_30 + 0x50,"syncCommitteeBits");
local_148 = local_160;
local_140 = local_158;
ssz_add_bytes(local_70,"sync_committee_bits",local_160 & 0xffffffff,local_158);
ssz_get(&local_188,local_30 + 0x50,"syncCommitteeSignature");
local_170 = local_188;
local_168 = local_180;
ssz_add_bytes(local_70,"sync_committee_signature",local_188 & 0xffffffff,local_180);
lVar1 = local_20;
uVar2 = *(int4 *)(local_20 + 0x30);
memset(local_1d0,0,0x38);
memset(local_208,0,0x38);
uVar2 = eth_create_proof_request(uVar2);
*(ulong *)(lVar1 + 0x20) = CONCAT44(uStack_194,uVar2);
*(int8 *)(lVar1 + 0x28) = extraout_RDX;
return 0;
}
| |
51,806 | minja::VariableExpr::do_evaluate(std::shared_ptr<minja::Context> const&) const | monkey531[P]llama/common/minja.hpp | Value do_evaluate(const std::shared_ptr<Context> & context) const override {
if (!context->contains(name)) {
return Value();
}
return context->at(name);
} | O2 | cpp | minja::VariableExpr::do_evaluate(std::shared_ptr<minja::Context> const&) const:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x58, %rsp
movq %rdx, %r15
movq %rsi, %r14
movq %rdi, %rbx
movq (%rdx), %r12
addq $0x20, %r14
leaq 0x8(%rsp), %r13
movq %r13, %rdi
movq %r14, %rsi
callq 0x6916e
movq (%r12), %rax
movq %r12, %rdi
movq %r13, %rsi
callq *0x20(%rax)
movl %eax, %ebp
leaq 0x8(%rsp), %rdi
callq 0x66190
testb %bpl, %bpl
je 0x74ecc
movq (%r15), %r15
leaq 0x8(%rsp), %r12
movq %r12, %rdi
movq %r14, %rsi
callq 0x6916e
movq (%r15), %rax
movq %r15, %rdi
movq %r12, %rsi
callq *0x18(%rax)
movq %rbx, %rdi
movq %rax, %rsi
callq 0x6bb66
leaq 0x8(%rsp), %rdi
callq 0x66190
jmp 0x74ed4
movq %rbx, %rdi
callq 0x694cc
movq %rbx, %rax
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x74ee8
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x66190
movq %rbx, %rdi
callq 0x240e0
nop
| _ZNK5minja12VariableExpr11do_evaluateERKSt10shared_ptrINS_7ContextEE:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 58h
mov r15, rdx
mov r14, rsi
mov rbx, rdi
mov r12, [rdx]
add r14, 20h ; ' '
lea r13, [rsp+88h+var_80]
mov rdi, r13
mov rsi, r14
call _ZN5minja5ValueC2ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; minja::Value::Value(std::string const&)
mov rax, [r12]
mov rdi, r12
mov rsi, r13
call qword ptr [rax+20h]
mov ebp, eax
lea rdi, [rsp+88h+var_80]; this
call _ZN5minja5ValueD2Ev; minja::Value::~Value()
test bpl, bpl
jz short loc_74ECC
mov r15, [r15]
lea r12, [rsp+88h+var_80]
mov rdi, r12
mov rsi, r14
call _ZN5minja5ValueC2ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; minja::Value::Value(std::string const&)
mov rax, [r15]
mov rdi, r15
mov rsi, r12
call qword ptr [rax+18h]
mov rdi, rbx; this
mov rsi, rax; minja::Value *
call _ZN5minja5ValueC2ERKS0_; minja::Value::Value(minja::Value const&)
lea rdi, [rsp+88h+var_80]; this
call _ZN5minja5ValueD2Ev; minja::Value::~Value()
jmp short loc_74ED4
loc_74ECC:
mov rdi, rbx; this
call _ZN5minja5ValueC2Ev; minja::Value::Value(void)
loc_74ED4:
mov rax, rbx
add rsp, 58h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
jmp short $+2
loc_74EE8:
mov rbx, rax
lea rdi, [rsp+arg_0]; this
call _ZN5minja5ValueD2Ev; minja::Value::~Value()
mov rdi, rbx
call __Unwind_Resume
| minja::Value * minja::VariableExpr::do_evaluate(minja::Value *this, long long a2, long long *a3)
{
long long v4; // r12
char v5; // bp
long long v6; // r15
const minja::Value *v7; // rax
_BYTE v9[128]; // [rsp+8h] [rbp-80h] BYREF
v4 = *a3;
minja::Value::Value((long long)v9, a2 + 32);
v5 = (*(long long ( **)(long long, _BYTE *))(*(_QWORD *)v4 + 32LL))(v4, v9);
minja::Value::~Value((minja::Value *)v9);
if ( v5 )
{
v6 = *a3;
minja::Value::Value((long long)v9, a2 + 32);
v7 = (const minja::Value *)(*(long long ( **)(long long, _BYTE *))(*(_QWORD *)v6 + 24LL))(v6, v9);
minja::Value::Value(this, v7);
minja::Value::~Value((minja::Value *)v9);
}
else
{
minja::Value::Value(this);
}
return this;
}
| do_evaluate:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x58
MOV R15,RDX
MOV R14,RSI
MOV RBX,RDI
MOV R12,qword ptr [RDX]
ADD R14,0x20
LEA R13,[RSP + 0x8]
MOV RDI,R13
MOV RSI,R14
CALL 0x0016916e
MOV RAX,qword ptr [R12]
LAB_00174e7c:
MOV RDI,R12
MOV RSI,R13
CALL qword ptr [RAX + 0x20]
LAB_00174e85:
MOV EBP,EAX
LEA RDI,[RSP + 0x8]
CALL 0x00166190
TEST BPL,BPL
JZ 0x00174ecc
MOV R15,qword ptr [R15]
LEA R12,[RSP + 0x8]
MOV RDI,R12
MOV RSI,R14
CALL 0x0016916e
MOV RAX,qword ptr [R15]
LAB_00174eac:
MOV RDI,R15
MOV RSI,R12
CALL qword ptr [RAX + 0x18]
MOV RDI,RBX
MOV RSI,RAX
CALL 0x0016bb66
LAB_00174ec0:
LEA RDI,[RSP + 0x8]
CALL 0x00166190
JMP 0x00174ed4
LAB_00174ecc:
MOV RDI,RBX
CALL 0x001694cc
LAB_00174ed4:
MOV RAX,RBX
ADD RSP,0x58
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
/* minja::VariableExpr::do_evaluate(std::shared_ptr<minja::Context> const&) const */
shared_ptr * minja::VariableExpr::do_evaluate(shared_ptr *param_1)
{
long *plVar1;
char cVar2;
Value *pVVar3;
int8 *in_RDX;
long in_RSI;
Value local_80 [80];
plVar1 = (long *)*in_RDX;
Value::Value(local_80,(string *)(in_RSI + 0x20));
/* try { // try from 00174e7c to 00174e84 has its CatchHandler @ 00174ee8 */
cVar2 = (**(code **)(*plVar1 + 0x20))(plVar1,local_80);
Value::~Value(local_80);
if (cVar2 == '\0') {
Value::Value((Value *)param_1);
}
else {
plVar1 = (long *)*in_RDX;
Value::Value(local_80,(string *)(in_RSI + 0x20));
/* try { // try from 00174eac to 00174ebf has its CatchHandler @ 00174ee6 */
pVVar3 = (Value *)(**(code **)(*plVar1 + 0x18))(plVar1,local_80);
Value::Value((Value *)param_1,pVVar3);
Value::~Value(local_80);
}
return param_1;
}
| |
51,807 | pagecache_delete | eloqsql/storage/maria/ma_pagecache.c | my_bool pagecache_delete(PAGECACHE *pagecache,
PAGECACHE_FILE *file,
pgcache_page_no_t pageno,
enum pagecache_page_lock lock,
my_bool flush)
{
my_bool error= 0;
enum pagecache_page_pin pin= lock_to_pin_one_phase[lock];
DBUG_ENTER("pagecache_delete");
DBUG_PRINT("enter", ("fd: %u page: %lu %s %s",
(uint) file->file, (ulong) pageno,
page_cache_page_lock_str[lock],
page_cache_page_pin_str[pin]));
DBUG_ASSERT(lock == PAGECACHE_LOCK_WRITE ||
lock == PAGECACHE_LOCK_LEFT_WRITELOCKED);
DBUG_ASSERT(pin == PAGECACHE_PIN ||
pin == PAGECACHE_PIN_LEFT_PINNED);
restart:
DBUG_ASSERT(pageno < ((1ULL) << 40));
if (pagecache->can_be_used)
{
/* Key cache is used */
reg1 PAGECACHE_BLOCK_LINK *block;
PAGECACHE_HASH_LINK **unused_start, *page_link;
pagecache_pthread_mutex_lock(&pagecache->cache_lock);
if (!pagecache->can_be_used)
goto end;
inc_counter_for_resize_op(pagecache);
page_link= get_present_hash_link(pagecache, file, pageno, &unused_start);
if (!page_link)
{
DBUG_PRINT("info", ("There is no such page in the cache"));
dec_counter_for_resize_op(pagecache);
pagecache_pthread_mutex_unlock(&pagecache->cache_lock);
DBUG_RETURN(0);
}
block= page_link->block;
if (block->status & (PCBLOCK_REASSIGNED | PCBLOCK_IN_SWITCH))
{
DBUG_PRINT("info", ("Block %p already is %s",
block,
((block->status & PCBLOCK_REASSIGNED) ?
"reassigned" : "in switch")));
PCBLOCK_INFO(block);
page_link->requests--;
dec_counter_for_resize_op(pagecache);
goto end;
}
/* See NOTE for pagecache_unlock about registering requests. */
if (pin == PAGECACHE_PIN)
reg_requests(pagecache, block, 1);
if (make_lock_and_pin(pagecache, block, lock, pin, FALSE))
{
/*
We failed to writelock the block, cache is unlocked, and last write
lock is released, we will try to get the block again.
*/
if (pin == PAGECACHE_PIN)
unreg_request(pagecache, block, 1);
dec_counter_for_resize_op(pagecache);
pagecache_pthread_mutex_unlock(&pagecache->cache_lock);
dec_counter_for_resize_op(pagecache);
DBUG_PRINT("info", ("restarting..."));
goto restart;
}
/* we can't delete with opened direct link for write */
DBUG_ASSERT((block->status & PCBLOCK_DIRECT_W) == 0);
error= pagecache_delete_internal(pagecache, block, page_link, flush);
end:
pagecache_pthread_mutex_unlock(&pagecache->cache_lock);
}
DBUG_RETURN(error);
} | O0 | c | pagecache_delete:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movb %r8b, %al
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movl %ecx, -0x24(%rbp)
movb %al, -0x25(%rbp)
movb $0x0, -0x26(%rbp)
movl -0x24(%rbp), %eax
movl %eax, %ecx
leaq 0x28e423(%rip), %rax # 0x2bd150
movl (%rax,%rcx,4), %eax
movl %eax, -0x2c(%rbp)
jmp 0x2ed35
jmp 0x2ed37
jmp 0x2ed39
jmp 0x2ed3b
jmp 0x2ed3d
jmp 0x2ed3f
jmp 0x2ed41
jmp 0x2ed43
movq -0x10(%rbp), %rax
cmpb $0x0, 0x1aa(%rax)
je 0x2eeaf
movq -0x10(%rbp), %rdi
addq $0xc8, %rdi
leaq 0x1226c4(%rip), %rsi # 0x15142a
movl $0x107a, %edx # imm = 0x107A
callq 0x2c4d0
movq -0x10(%rbp), %rax
cmpb $0x0, 0x1aa(%rax)
jne 0x2ed82
jmp 0x2ee9f
movq -0x10(%rbp), %rdi
callq 0x2c880
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x20(%rbp), %rdx
leaq -0x40(%rbp), %rcx
callq 0x2eec0
movq %rax, -0x48(%rbp)
cmpq $0x0, -0x48(%rbp)
jne 0x2edd1
jmp 0x2edad
jmp 0x2edaf
movq -0x10(%rbp), %rdi
callq 0x2d5b0
movq -0x10(%rbp), %rdi
addq $0xc8, %rdi
callq 0x2c540
movb $0x0, -0x1(%rbp)
jmp 0x2eeb7
movq -0x48(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x38(%rbp)
movq -0x38(%rbp), %rax
movzwl 0x74(%rax), %eax
andl $0xc, %eax
cmpl $0x0, %eax
je 0x2ee10
jmp 0x2edef
jmp 0x2edf1
jmp 0x2edf3
jmp 0x2edf5
movq -0x48(%rbp), %rax
movl 0x68(%rax), %ecx
addl $-0x1, %ecx
movl %ecx, 0x68(%rax)
movq -0x10(%rbp), %rdi
callq 0x2d5b0
jmp 0x2ee9f
cmpl $0x2, -0x2c(%rbp)
jne 0x2ee28
movq -0x10(%rbp), %rdi
movq -0x38(%rbp), %rsi
movl $0x1, %edx
callq 0x2efa0
movq -0x10(%rbp), %rdi
movq -0x38(%rbp), %rsi
movl -0x24(%rbp), %edx
movl -0x2c(%rbp), %ecx
xorl %r8d, %r8d
callq 0x2d290
cmpb $0x0, %al
je 0x2ee83
cmpl $0x2, -0x2c(%rbp)
jne 0x2ee5a
movq -0x10(%rbp), %rdi
movq -0x38(%rbp), %rsi
movl $0x1, %edx
callq 0x2d430
movq -0x10(%rbp), %rdi
callq 0x2d5b0
movq -0x10(%rbp), %rdi
addq $0xc8, %rdi
callq 0x2c540
movq -0x10(%rbp), %rdi
callq 0x2d5b0
jmp 0x2ee7e
jmp 0x2ed3f
jmp 0x2ee85
jmp 0x2ee87
movq -0x10(%rbp), %rdi
movq -0x38(%rbp), %rsi
movq -0x48(%rbp), %rdx
movsbl -0x25(%rbp), %ecx
callq 0x2ea40
movb %al, -0x26(%rbp)
movq -0x10(%rbp), %rdi
addq $0xc8, %rdi
callq 0x2c540
jmp 0x2eeb1
movb -0x26(%rbp), %al
movb %al, -0x1(%rbp)
movb -0x1(%rbp), %al
addq $0x50, %rsp
popq %rbp
retq
| pagecache_delete:
push rbp
mov rbp, rsp
sub rsp, 50h
mov al, r8b
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov [rbp+var_20], rdx
mov [rbp+var_24], ecx
mov [rbp+var_25], al
mov [rbp+var_26], 0
mov eax, [rbp+var_24]
mov ecx, eax
lea rax, lock_to_pin_one_phase
mov eax, [rax+rcx*4]
mov [rbp+var_2C], eax
jmp short $+2
loc_2ED35:
jmp short $+2
loc_2ED37:
jmp short $+2
loc_2ED39:
jmp short $+2
loc_2ED3B:
jmp short $+2
loc_2ED3D:
jmp short $+2
loc_2ED3F:
jmp short $+2
loc_2ED41:
jmp short $+2
loc_2ED43:
mov rax, [rbp+var_10]
cmp byte ptr [rax+1AAh], 0
jz loc_2EEAF
mov rdi, [rbp+var_10]
add rdi, 0C8h
lea rsi, aWorkspaceLlm4b; "/workspace/llm4binary/github2025/eloqsq"...
mov edx, 107Ah
call inline_mysql_mutex_lock
mov rax, [rbp+var_10]
cmp byte ptr [rax+1AAh], 0
jnz short loc_2ED82
jmp loc_2EE9F
loc_2ED82:
mov rdi, [rbp+var_10]
call inc_counter_for_resize_op
mov rdi, [rbp+var_10]
mov rsi, [rbp+var_18]
mov rdx, [rbp+var_20]
lea rcx, [rbp+var_40]
call get_present_hash_link
mov [rbp+var_48], rax
cmp [rbp+var_48], 0
jnz short loc_2EDD1
jmp short $+2
loc_2EDAD:
jmp short $+2
loc_2EDAF:
mov rdi, [rbp+var_10]
call dec_counter_for_resize_op
mov rdi, [rbp+var_10]
add rdi, 0C8h
call inline_mysql_mutex_unlock
mov [rbp+var_1], 0
jmp loc_2EEB7
loc_2EDD1:
mov rax, [rbp+var_48]
mov rax, [rax+10h]
mov [rbp+var_38], rax
mov rax, [rbp+var_38]
movzx eax, word ptr [rax+74h]
and eax, 0Ch
cmp eax, 0
jz short loc_2EE10
jmp short $+2
loc_2EDEF:
jmp short $+2
loc_2EDF1:
jmp short $+2
loc_2EDF3:
jmp short $+2
loc_2EDF5:
mov rax, [rbp+var_48]
mov ecx, [rax+68h]
add ecx, 0FFFFFFFFh
mov [rax+68h], ecx
mov rdi, [rbp+var_10]
call dec_counter_for_resize_op
jmp loc_2EE9F
loc_2EE10:
cmp [rbp+var_2C], 2
jnz short loc_2EE28
mov rdi, [rbp+var_10]
mov rsi, [rbp+var_38]
mov edx, 1
call reg_requests
loc_2EE28:
mov rdi, [rbp+var_10]
mov rsi, [rbp+var_38]
mov edx, [rbp+var_24]
mov ecx, [rbp+var_2C]
xor r8d, r8d
call make_lock_and_pin
cmp al, 0
jz short loc_2EE83
cmp [rbp+var_2C], 2
jnz short loc_2EE5A
mov rdi, [rbp+var_10]
mov rsi, [rbp+var_38]
mov edx, 1
call unreg_request
loc_2EE5A:
mov rdi, [rbp+var_10]
call dec_counter_for_resize_op
mov rdi, [rbp+var_10]
add rdi, 0C8h
call inline_mysql_mutex_unlock
mov rdi, [rbp+var_10]
call dec_counter_for_resize_op
jmp short $+2
loc_2EE7E:
jmp loc_2ED3F
loc_2EE83:
jmp short $+2
loc_2EE85:
jmp short $+2
loc_2EE87:
mov rdi, [rbp+var_10]
mov rsi, [rbp+var_38]
mov rdx, [rbp+var_48]
movsx ecx, [rbp+var_25]
call pagecache_delete_internal
mov [rbp+var_26], al
loc_2EE9F:
mov rdi, [rbp+var_10]
add rdi, 0C8h
call inline_mysql_mutex_unlock
loc_2EEAF:
jmp short $+2
loc_2EEB1:
mov al, [rbp+var_26]
mov [rbp+var_1], al
loc_2EEB7:
mov al, [rbp+var_1]
add rsp, 50h
pop rbp
retn
| char pagecache_delete(_QWORD *a1, long long a2, long long a3, unsigned int a4, bool a5)
{
long long present_hash_link; // [rsp+8h] [rbp-48h]
_BYTE v7[8]; // [rsp+10h] [rbp-40h] BYREF
long long v8; // [rsp+18h] [rbp-38h]
int v9; // [rsp+24h] [rbp-2Ch]
char v10; // [rsp+2Ah] [rbp-26h]
bool v11; // [rsp+2Bh] [rbp-25h]
unsigned int v12; // [rsp+2Ch] [rbp-24h]
long long v13; // [rsp+30h] [rbp-20h]
long long v14; // [rsp+38h] [rbp-18h]
_QWORD *v15; // [rsp+40h] [rbp-10h]
v15 = a1;
v14 = a2;
v13 = a3;
v12 = a4;
v11 = a5;
v10 = 0;
v9 = lock_to_pin_one_phase[a4];
while ( *((_BYTE *)v15 + 426) )
{
inline_mysql_mutex_lock(
(long long)(v15 + 25),
(long long)"/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_pagecache.c",
0x107Au);
if ( !*((_BYTE *)v15 + 426) )
goto LABEL_15;
inc_counter_for_resize_op((long long)v15);
present_hash_link = get_present_hash_link(v15, v14, v13, v7);
if ( !present_hash_link )
{
dec_counter_for_resize_op((long long)v15);
inline_mysql_mutex_unlock((long long)(v15 + 25));
return 0;
}
v8 = *(_QWORD *)(present_hash_link + 16);
if ( (*(_WORD *)(v8 + 116) & 0xC) != 0 )
{
--*(_DWORD *)(present_hash_link + 104);
dec_counter_for_resize_op((long long)v15);
LABEL_15:
inline_mysql_mutex_unlock((long long)(v15 + 25));
return v10;
}
if ( v9 == 2 )
reg_requests(v15, v8, 1LL);
if ( !make_lock_and_pin((long long)v15, v8, v12, v9, 0) )
{
v10 = pagecache_delete_internal(v15, v8, present_hash_link, v11);
goto LABEL_15;
}
if ( v9 == 2 )
unreg_request(v15, v8, 1);
dec_counter_for_resize_op((long long)v15);
inline_mysql_mutex_unlock((long long)(v15 + 25));
dec_counter_for_resize_op((long long)v15);
}
return v10;
}
| pagecache_delete:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x50
MOV AL,R8B
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x18],RSI
MOV qword ptr [RBP + -0x20],RDX
MOV dword ptr [RBP + -0x24],ECX
MOV byte ptr [RBP + -0x25],AL
MOV byte ptr [RBP + -0x26],0x0
MOV EAX,dword ptr [RBP + -0x24]
MOV ECX,EAX
LEA RAX,[0x3bd150]
MOV EAX,dword ptr [RAX + RCX*0x4]
MOV dword ptr [RBP + -0x2c],EAX
JMP 0x0012ed35
LAB_0012ed35:
JMP 0x0012ed37
LAB_0012ed37:
JMP 0x0012ed39
LAB_0012ed39:
JMP 0x0012ed3b
LAB_0012ed3b:
JMP 0x0012ed3d
LAB_0012ed3d:
JMP 0x0012ed3f
LAB_0012ed3f:
JMP 0x0012ed41
LAB_0012ed41:
JMP 0x0012ed43
LAB_0012ed43:
MOV RAX,qword ptr [RBP + -0x10]
CMP byte ptr [RAX + 0x1aa],0x0
JZ 0x0012eeaf
MOV RDI,qword ptr [RBP + -0x10]
ADD RDI,0xc8
LEA RSI,[0x25142a]
MOV EDX,0x107a
CALL 0x0012c4d0
MOV RAX,qword ptr [RBP + -0x10]
CMP byte ptr [RAX + 0x1aa],0x0
JNZ 0x0012ed82
JMP 0x0012ee9f
LAB_0012ed82:
MOV RDI,qword ptr [RBP + -0x10]
CALL 0x0012c880
MOV RDI,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RBP + -0x18]
MOV RDX,qword ptr [RBP + -0x20]
LEA RCX,[RBP + -0x40]
CALL 0x0012eec0
MOV qword ptr [RBP + -0x48],RAX
CMP qword ptr [RBP + -0x48],0x0
JNZ 0x0012edd1
JMP 0x0012edad
LAB_0012edad:
JMP 0x0012edaf
LAB_0012edaf:
MOV RDI,qword ptr [RBP + -0x10]
CALL 0x0012d5b0
MOV RDI,qword ptr [RBP + -0x10]
ADD RDI,0xc8
CALL 0x0012c540
MOV byte ptr [RBP + -0x1],0x0
JMP 0x0012eeb7
LAB_0012edd1:
MOV RAX,qword ptr [RBP + -0x48]
MOV RAX,qword ptr [RAX + 0x10]
MOV qword ptr [RBP + -0x38],RAX
MOV RAX,qword ptr [RBP + -0x38]
MOVZX EAX,word ptr [RAX + 0x74]
AND EAX,0xc
CMP EAX,0x0
JZ 0x0012ee10
JMP 0x0012edef
LAB_0012edef:
JMP 0x0012edf1
LAB_0012edf1:
JMP 0x0012edf3
LAB_0012edf3:
JMP 0x0012edf5
LAB_0012edf5:
MOV RAX,qword ptr [RBP + -0x48]
MOV ECX,dword ptr [RAX + 0x68]
ADD ECX,-0x1
MOV dword ptr [RAX + 0x68],ECX
MOV RDI,qword ptr [RBP + -0x10]
CALL 0x0012d5b0
JMP 0x0012ee9f
LAB_0012ee10:
CMP dword ptr [RBP + -0x2c],0x2
JNZ 0x0012ee28
MOV RDI,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RBP + -0x38]
MOV EDX,0x1
CALL 0x0012efa0
LAB_0012ee28:
MOV RDI,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RBP + -0x38]
MOV EDX,dword ptr [RBP + -0x24]
MOV ECX,dword ptr [RBP + -0x2c]
XOR R8D,R8D
CALL 0x0012d290
CMP AL,0x0
JZ 0x0012ee83
CMP dword ptr [RBP + -0x2c],0x2
JNZ 0x0012ee5a
MOV RDI,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RBP + -0x38]
MOV EDX,0x1
CALL 0x0012d430
LAB_0012ee5a:
MOV RDI,qword ptr [RBP + -0x10]
CALL 0x0012d5b0
MOV RDI,qword ptr [RBP + -0x10]
ADD RDI,0xc8
CALL 0x0012c540
MOV RDI,qword ptr [RBP + -0x10]
CALL 0x0012d5b0
JMP 0x0012ee7e
LAB_0012ee7e:
JMP 0x0012ed3f
LAB_0012ee83:
JMP 0x0012ee85
LAB_0012ee85:
JMP 0x0012ee87
LAB_0012ee87:
MOV RDI,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RBP + -0x38]
MOV RDX,qword ptr [RBP + -0x48]
MOVSX ECX,byte ptr [RBP + -0x25]
CALL 0x0012ea40
MOV byte ptr [RBP + -0x26],AL
LAB_0012ee9f:
MOV RDI,qword ptr [RBP + -0x10]
ADD RDI,0xc8
CALL 0x0012c540
LAB_0012eeaf:
JMP 0x0012eeb1
LAB_0012eeb1:
MOV AL,byte ptr [RBP + -0x26]
MOV byte ptr [RBP + -0x1],AL
LAB_0012eeb7:
MOV AL,byte ptr [RBP + -0x1]
ADD RSP,0x50
POP RBP
RET
|
int8
pagecache_delete(long param_1,int8 param_2,int8 param_3,uint param_4,char param_5)
{
char cVar1;
long lVar2;
int7 extraout_var;
int7 uVar3;
int1 local_48 [8];
long local_40;
int local_34;
int1 local_2e;
char local_2d;
uint local_2c;
int8 local_28;
int8 local_20;
long local_18;
int1 local_9;
local_2e = 0;
local_34 = *(int *)(lock_to_pin_one_phase + (ulong)param_4 * 4);
local_2d = param_5;
local_2c = param_4;
local_28 = param_3;
local_20 = param_2;
local_18 = param_1;
do {
if (*(char *)(local_18 + 0x1aa) == '\0') {
LAB_0012eeaf:
uVar3 = (int7)((ulong)local_18 >> 8);
local_9 = local_2e;
LAB_0012eeb7:
return CONCAT71(uVar3,local_9);
}
inline_mysql_mutex_lock
(local_18 + 200,
"/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_pagecache.c",0x107a);
if (*(char *)(local_18 + 0x1aa) == '\0') goto LAB_0012ee9f;
inc_counter_for_resize_op(local_18);
lVar2 = get_present_hash_link(local_18,local_20,local_28,local_48);
if (lVar2 == 0) {
dec_counter_for_resize_op(local_18);
inline_mysql_mutex_unlock(local_18 + 200);
local_9 = 0;
uVar3 = extraout_var;
goto LAB_0012eeb7;
}
local_40 = *(long *)(lVar2 + 0x10);
if ((*(ushort *)(local_40 + 0x74) & 0xc) != 0) {
*(int *)(lVar2 + 0x68) = *(int *)(lVar2 + 0x68) + -1;
dec_counter_for_resize_op(local_18);
LAB_0012ee9f:
local_18 = inline_mysql_mutex_unlock(local_18 + 200);
goto LAB_0012eeaf;
}
if (local_34 == 2) {
reg_requests(local_18,local_40,1);
}
cVar1 = make_lock_and_pin(local_18,local_40,local_2c,local_34,0);
if (cVar1 == '\0') {
local_2e = pagecache_delete_internal(local_18,local_40,lVar2,(int)local_2d);
goto LAB_0012ee9f;
}
if (local_34 == 2) {
unreg_request(local_18,local_40,1);
}
dec_counter_for_resize_op(local_18);
inline_mysql_mutex_unlock(local_18 + 200);
dec_counter_for_resize_op(local_18);
} while( true );
}
| |
51,808 | pow5mult | eloqsql/strings/dtoa.c | static Bigint *pow5mult(Bigint *b, int k, Stack_alloc *alloc)
{
Bigint *b1, *p5, *p51=NULL;
int i;
static int p05[3]= { 5, 25, 125 };
my_bool overflow= FALSE;
if ((i= k & 3))
b= multadd(b, p05[i-1], 0, alloc);
if (!(k>>= 2))
return b;
p5= p5_a;
for (;;)
{
if (k & 1)
{
b1= mult(b, p5, alloc);
Bfree(b, alloc);
b= b1;
}
if (!(k>>= 1))
break;
/* Calculate next power of 5 */
if (overflow)
{
p51= mult(p5, p5, alloc);
Bfree(p5, alloc);
p5= p51;
}
else if (p5 < p5_a + P5A_MAX)
++p5;
else if (p5 == p5_a + P5A_MAX)
{
p5= mult(p5, p5, alloc);
overflow= TRUE;
}
}
if (p51)
Bfree(p51, alloc);
return b;
} | O3 | c | pow5mult:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rdx, %rbx
movl %esi, %r15d
movq %rdi, %r13
movl %esi, %eax
andl $0x3, %eax
je 0x7b1f9
decl %eax
leaq 0x282da2(%rip), %rcx # 0x2fdf88
movl (%rcx,%rax,4), %esi
movq %r13, %rdi
xorl %edx, %edx
movq %rbx, %rcx
callq 0x7b646
movq %rax, %r13
cmpl $0x4, %r15d
jb 0x7b2e1
movq %rbx, -0x38(%rbp)
shrl $0x2, %r15d
movb $0x1, %cl
leaq 0x317efc(%rip), %rbx # 0x393110
movq $0x0, -0x40(%rbp)
leaq 0x317f7d(%rip), %r12 # 0x3931a0
movl %ecx, %r14d
cmpq %r12, %rbx
setb %cl
movl %ecx, -0x2c(%rbp)
testb $0x1, %r15b
je 0x7b264
movq %r13, %rdi
movq %rbx, %rsi
movq %r13, %r12
movq -0x38(%rbp), %r13
movq %r13, %rdx
callq 0x7b2f3
movq %rax, -0x48(%rbp)
movq %r12, %rdi
leaq 0x317f48(%rip), %r12 # 0x3931a0
movq %r13, %rsi
callq 0x7b415
movq -0x48(%rbp), %r13
cmpl $0x2, %r15d
jb 0x7b2cf
shrl %r15d
testb $0x1, %r14b
je 0x7b294
cmpq %r12, %rbx
jb 0x7b2c3
movb $0x1, %r14b
jne 0x7b22f
movq %r12, %rdi
movq %r12, %rsi
movq -0x38(%rbp), %rdx
callq 0x7b2f3
movq %rax, %rbx
movl -0x2c(%rbp), %ecx
jmp 0x7b223
movq %rbx, %rdi
movq %rbx, %r14
movq %rbx, %rsi
movq -0x38(%rbp), %rbx
movq %rbx, %rdx
callq 0x7b2f3
movq %rax, -0x40(%rbp)
movq %r14, %rdi
movq %rbx, %rsi
callq 0x7b415
xorl %ecx, %ecx
movq -0x40(%rbp), %rbx
jmp 0x7b223
addq $0x18, %rbx
movl -0x2c(%rbp), %ecx
jmp 0x7b223
movq -0x40(%rbp), %rdi
testq %rdi, %rdi
je 0x7b2e1
movq -0x38(%rbp), %rsi
callq 0x7b415
movq %r13, %rax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| pow5mult:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 28h
mov rbx, rdx
mov r15d, esi
mov r13, rdi
mov eax, esi
and eax, 3
jz short loc_7B1F9
dec eax
lea rcx, pow5mult_p05
mov esi, [rcx+rax*4]
mov rdi, r13
xor edx, edx
mov rcx, rbx
call multadd
mov r13, rax
loc_7B1F9:
cmp r15d, 4
jb loc_7B2E1
mov [rbp+var_38], rbx
shr r15d, 2
mov cl, 1
lea rbx, p5_a
mov [rbp+var_40], 0
lea r12, off_3931A0
loc_7B223:
mov r14d, ecx
cmp rbx, r12
setb cl
mov [rbp+var_2C], ecx
loc_7B22F:
test r15b, 1
jz short loc_7B264
mov rdi, r13
mov rsi, rbx
mov r12, r13
mov r13, [rbp+var_38]
mov rdx, r13
call mult
mov [rbp+var_48], rax
mov rdi, r12
lea r12, off_3931A0
mov rsi, r13
call Bfree
mov r13, [rbp+var_48]
loc_7B264:
cmp r15d, 2
jb short loc_7B2CF
shr r15d, 1
test r14b, 1
jz short loc_7B294
cmp rbx, r12
jb short loc_7B2C3
mov r14b, 1
jnz short loc_7B22F
mov rdi, r12
mov rsi, r12
mov rdx, [rbp+var_38]
call mult
mov rbx, rax
mov ecx, [rbp+var_2C]
jmp short loc_7B223
loc_7B294:
mov rdi, rbx
mov r14, rbx
mov rsi, rbx
mov rbx, [rbp+var_38]
mov rdx, rbx
call mult
mov [rbp+var_40], rax
mov rdi, r14
mov rsi, rbx
call Bfree
xor ecx, ecx
mov rbx, [rbp+var_40]
jmp loc_7B223
loc_7B2C3:
add rbx, 18h
mov ecx, [rbp+var_2C]
jmp loc_7B223
loc_7B2CF:
mov rdi, [rbp+var_40]
test rdi, rdi
jz short loc_7B2E1
mov rsi, [rbp+var_38]
call Bfree
loc_7B2E1:
mov rax, r13
add rsp, 28h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| long long pow5mult(long long a1, unsigned int a2, long long a3, int a4)
{
long long v5; // r13
unsigned int v6; // r15d
_UNKNOWN **v7; // rbx
char v8; // r14
long long v10; // [rsp+8h] [rbp-48h]
long long v11; // [rsp+10h] [rbp-40h]
long long v12; // [rsp+18h] [rbp-38h]
int v13; // [rsp+24h] [rbp-2Ch]
v5 = a1;
if ( (a2 & 3) != 0 )
v5 = multadd(a1, pow5mult_p05[(a2 & 3) - 1], 0LL, a3);
if ( a2 >= 4 )
{
v12 = a3;
v6 = a2 >> 2;
LOBYTE(a4) = 1;
v7 = &p5_a;
v11 = 0LL;
LABEL_5:
v8 = a4;
LOBYTE(a4) = v7 < &off_3931A0;
v13 = a4;
while ( 1 )
{
if ( (v6 & 1) != 0 )
{
v10 = mult(v5, v7, v12);
Bfree(v5, v12);
v5 = v10;
}
if ( v6 < 2 )
break;
v6 >>= 1;
if ( (v8 & 1) == 0 )
{
v11 = mult(v7, v7, v12);
Bfree(v7, v12);
a4 = 0;
v7 = (_UNKNOWN **)v11;
goto LABEL_5;
}
if ( v7 < &off_3931A0 )
{
v7 += 3;
a4 = v13;
goto LABEL_5;
}
v8 = 1;
if ( v7 == &off_3931A0 )
{
v7 = (_UNKNOWN **)mult(&off_3931A0, &off_3931A0, v12);
a4 = v13;
goto LABEL_5;
}
}
if ( v11 )
Bfree(v11, v12);
}
return v5;
}
| pow5mult:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x28
MOV RBX,RDX
MOV R15D,ESI
MOV R13,RDI
MOV EAX,ESI
AND EAX,0x3
JZ 0x0017b1f9
DEC EAX
LEA RCX,[0x3fdf88]
MOV ESI,dword ptr [RCX + RAX*0x4]
MOV RDI,R13
XOR EDX,EDX
MOV RCX,RBX
CALL 0x0017b646
MOV R13,RAX
LAB_0017b1f9:
CMP R15D,0x4
JC 0x0017b2e1
MOV qword ptr [RBP + -0x38],RBX
SHR R15D,0x2
MOV CL,0x1
LEA RBX,[0x493110]
MOV qword ptr [RBP + -0x40],0x0
LEA R12,[0x4931a0]
LAB_0017b223:
MOV R14D,ECX
CMP RBX,R12
SETC CL
MOV dword ptr [RBP + -0x2c],ECX
LAB_0017b22f:
TEST R15B,0x1
JZ 0x0017b264
MOV RDI,R13
MOV RSI,RBX
MOV R12,R13
MOV R13,qword ptr [RBP + -0x38]
MOV RDX,R13
CALL 0x0017b2f3
MOV qword ptr [RBP + -0x48],RAX
MOV RDI,R12
LEA R12,[0x4931a0]
MOV RSI,R13
CALL 0x0017b415
MOV R13,qword ptr [RBP + -0x48]
LAB_0017b264:
CMP R15D,0x2
JC 0x0017b2cf
SHR R15D,0x1
TEST R14B,0x1
JZ 0x0017b294
CMP RBX,R12
JC 0x0017b2c3
MOV R14B,0x1
JNZ 0x0017b22f
MOV RDI,R12
MOV RSI,R12
MOV RDX,qword ptr [RBP + -0x38]
CALL 0x0017b2f3
MOV RBX,RAX
MOV ECX,dword ptr [RBP + -0x2c]
JMP 0x0017b223
LAB_0017b294:
MOV RDI,RBX
MOV R14,RBX
MOV RSI,RBX
MOV RBX,qword ptr [RBP + -0x38]
MOV RDX,RBX
CALL 0x0017b2f3
MOV qword ptr [RBP + -0x40],RAX
MOV RDI,R14
MOV RSI,RBX
CALL 0x0017b415
XOR ECX,ECX
MOV RBX,qword ptr [RBP + -0x40]
JMP 0x0017b223
LAB_0017b2c3:
ADD RBX,0x18
MOV ECX,dword ptr [RBP + -0x2c]
JMP 0x0017b223
LAB_0017b2cf:
MOV RDI,qword ptr [RBP + -0x40]
TEST RDI,RDI
JZ 0x0017b2e1
MOV RSI,qword ptr [RBP + -0x38]
CALL 0x0017b415
LAB_0017b2e1:
MOV RAX,R13
ADD RSP,0x28
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
int8 pow5mult(int8 param_1,uint param_2,int8 param_3)
{
int1 *puVar1;
int8 uVar2;
bool bVar3;
bool bVar4;
int1 *local_48;
if ((param_2 & 3) != 0) {
param_1 = multadd(param_1,*(int4 *)(pow5mult_p05 + (ulong)((param_2 & 3) - 1) * 4),0,
param_3);
}
if (param_2 < 4) {
return param_1;
}
param_2 = param_2 >> 2;
local_48 = (int1 *)0x0;
puVar1 = p5_a;
bVar3 = true;
LAB_0017b223:
do {
bVar4 = puVar1 < (int1 *)0x4931a0;
uVar2 = param_1;
do {
param_1 = uVar2;
if ((param_2 & 1) != 0) {
param_1 = mult(uVar2,puVar1,param_3);
Bfree(uVar2,param_3);
}
if (param_2 < 2) {
if (local_48 == (int1 *)0x0) {
return param_1;
}
Bfree(local_48,param_3);
return param_1;
}
param_2 = param_2 >> 1;
if (!bVar3) {
local_48 = (int1 *)mult(puVar1,puVar1,param_3);
Bfree(puVar1,param_3);
bVar3 = false;
puVar1 = local_48;
goto LAB_0017b223;
}
if (puVar1 < (int1 *)0x4931a0) {
puVar1 = puVar1 + 0x18;
bVar3 = bVar4;
goto LAB_0017b223;
}
bVar3 = true;
uVar2 = param_1;
} while (puVar1 != (int1 *)0x4931a0);
puVar1 = (int1 *)mult(0x4931a0,0x4931a0,param_3);
bVar3 = bVar4;
} while( true );
}
| |
51,809 | get_internal_charset | eloqsql/mysys/charset.c | static CHARSET_INFO *
get_internal_charset(MY_CHARSET_LOADER *loader, uint cs_number, myf flags)
{
char buf[FN_REFLEN];
struct charset_info_st *cs;
DBUG_ASSERT(cs_number < array_elements(all_charsets));
if ((cs= (struct charset_info_st*) all_charsets[cs_number]))
{
if (cs->state & MY_CS_READY) /* if CS is already initialized */
{
my_collation_statistics_inc_use_count(cs_number);
return cs;
}
/*
To make things thread safe we are not allowing other threads to interfere
while we may changing the cs_info_table
*/
mysql_mutex_lock(&THR_LOCK_charset);
if (!(cs->state & (MY_CS_COMPILED|MY_CS_LOADED))) /* if CS is not in memory */
{
MY_CHARSET_LOADER loader;
strxmov(get_charsets_dir(buf), cs->cs_name.str, ".xml", NullS);
my_charset_loader_init_mysys(&loader);
my_read_charset_file(&loader, buf, flags);
}
if (cs->state & MY_CS_AVAILABLE)
{
if (!(cs->state & MY_CS_READY))
{
if (!simple_8bit_charset_data_is_full(cs))
{
CHARSET_INFO *refcs= find_charset_data_inheritance_source(cs);
if (refcs)
inherit_charset_data(cs, refcs);
}
if (!simple_8bit_collation_data_is_full(cs))
{
CHARSET_INFO *refcl= find_collation_data_inheritance_source(cs, flags);
if (refcl)
inherit_collation_data(cs, refcl);
}
if (my_ci_init_charset(cs, loader) ||
my_ci_init_collation(cs, loader))
{
cs= NULL;
}
else
cs->state|= MY_CS_READY;
}
my_collation_statistics_inc_use_count(cs_number);
}
else
cs= NULL;
mysql_mutex_unlock(&THR_LOCK_charset);
}
return cs;
} | O0 | c | get_internal_charset:
pushq %rbp
movq %rsp, %rbp
subq $0x300, %rsp # imm = 0x300
movq %fs:0x28, %rax
movq %rax, -0x8(%rbp)
movq %rdi, -0x2d0(%rbp)
movl %esi, -0x2d4(%rbp)
movq %rdx, -0x2e0(%rbp)
jmp 0x3405e
movl -0x2d4(%rbp), %eax
movl %eax, %ecx
leaq 0x359b33(%rip), %rax # 0x38dba0
movq (%rax,%rcx,8), %rax
movq %rax, -0x2e8(%rbp)
cmpq $0x0, %rax
je 0x34267
movq -0x2e8(%rbp), %rax
movl 0xc(%rax), %eax
andl $0x100, %eax # imm = 0x100
cmpl $0x0, %eax
je 0x340b4
movl -0x2d4(%rbp), %edi
callq 0x359c0
movq -0x2e8(%rbp), %rax
movq %rax, -0x2c8(%rbp)
jmp 0x34275
leaq 0x3594bd(%rip), %rdi # 0x38d578
leaq 0x4c311(%rip), %rsi # 0x803d3
movl $0x36b, %edx # imm = 0x36B
callq 0x359f0
movq -0x2e8(%rbp), %rax
movl 0xc(%rax), %eax
andl $0x9, %eax
cmpl $0x0, %eax
jne 0x34130
leaq -0x210(%rbp), %rdi
callq 0x336a0
movq %rax, %rdi
movq -0x2e8(%rbp), %rax
movq 0x10(%rax), %rsi
leaq 0x4c2b7(%rip), %rdx # 0x803b6
xorl %eax, %eax
movl %eax, %ecx
movb $0x0, %al
callq 0x7d2c0
leaq -0x2c0(%rbp), %rdi
callq 0x33000
leaq -0x210(%rbp), %rsi
movq -0x2e0(%rbp), %rdx
leaq -0x2c0(%rbp), %rdi
callq 0x35540
movq -0x2e8(%rbp), %rax
movl 0xc(%rax), %eax
andl $0x200, %eax # imm = 0x200
cmpl $0x0, %eax
je 0x34250
movq -0x2e8(%rbp), %rax
movl 0xc(%rax), %eax
andl $0x100, %eax # imm = 0x100
cmpl $0x0, %eax
jne 0x34243
movq -0x2e8(%rbp), %rdi
callq 0x35460
cmpb $0x0, %al
jne 0x341a2
movq -0x2e8(%rbp), %rdi
callq 0x35a60
movq %rax, -0x2f0(%rbp)
cmpq $0x0, -0x2f0(%rbp)
je 0x341a0
movq -0x2e8(%rbp), %rdi
movq -0x2f0(%rbp), %rsi
callq 0x35aa0
jmp 0x341a2
movq -0x2e8(%rbp), %rdi
callq 0x354c0
cmpb $0x0, %al
jne 0x341eb
movq -0x2e8(%rbp), %rdi
movq -0x2e0(%rbp), %rsi
callq 0x35b20
movq %rax, -0x2f8(%rbp)
cmpq $0x0, -0x2f8(%rbp)
je 0x341e9
movq -0x2e8(%rbp), %rdi
movq -0x2f8(%rbp), %rsi
callq 0x35c30
jmp 0x341eb
movq -0x2e8(%rbp), %rdi
movq -0x2d0(%rbp), %rsi
callq 0x35c70
movsbl %al, %eax
cmpl $0x0, %eax
jne 0x34221
movq -0x2e8(%rbp), %rdi
movq -0x2d0(%rbp), %rsi
callq 0x35cc0
movsbl %al, %eax
cmpl $0x0, %eax
je 0x3422e
movq $0x0, -0x2e8(%rbp)
jmp 0x34241
movq -0x2e8(%rbp), %rax
movl 0xc(%rax), %ecx
orl $0x100, %ecx # imm = 0x100
movl %ecx, 0xc(%rax)
jmp 0x34243
movl -0x2d4(%rbp), %edi
callq 0x359c0
jmp 0x3425b
movq $0x0, -0x2e8(%rbp)
leaq 0x359316(%rip), %rdi # 0x38d578
callq 0x35d10
movq -0x2e8(%rbp), %rax
movq %rax, -0x2c8(%rbp)
movq -0x2c8(%rbp), %rax
movq %rax, -0x300(%rbp)
movq %fs:0x28, %rax
movq -0x8(%rbp), %rcx
cmpq %rcx, %rax
jne 0x342a5
movq -0x300(%rbp), %rax
addq $0x300, %rsp # imm = 0x300
popq %rbp
retq
callq 0x24300
nopw (%rax,%rax)
| get_internal_charset:
push rbp
mov rbp, rsp
sub rsp, 300h
mov rax, fs:28h
mov [rbp+var_8], rax
mov [rbp+var_2D0], rdi
mov [rbp+var_2D4], esi
mov [rbp+var_2E0], rdx
jmp short $+2
loc_3405E:
mov eax, [rbp+var_2D4]
mov ecx, eax
lea rax, all_charsets
mov rax, [rax+rcx*8]
mov [rbp+var_2E8], rax
cmp rax, 0
jz loc_34267
mov rax, [rbp+var_2E8]
mov eax, [rax+0Ch]
and eax, 100h
cmp eax, 0
jz short loc_340B4
mov edi, [rbp+var_2D4]
call my_collation_statistics_inc_use_count
mov rax, [rbp+var_2E8]
mov [rbp+var_2C8], rax
jmp loc_34275
loc_340B4:
lea rdi, THR_LOCK_charset
lea rsi, aWorkspaceLlm4b_1; "/workspace/llm4binary/github2025/eloqsq"...
mov edx, 36Bh
call inline_mysql_mutex_lock_0
mov rax, [rbp+var_2E8]
mov eax, [rax+0Ch]
and eax, 9
cmp eax, 0
jnz short loc_34130
lea rdi, [rbp+var_210]
call get_charsets_dir
mov rdi, rax
mov rax, [rbp+var_2E8]
mov rsi, [rax+10h]
lea rdx, aIndexXml+5; ".xml"
xor eax, eax
mov ecx, eax
mov al, 0
call strxmov
lea rdi, [rbp+var_2C0]
call my_charset_loader_init_mysys
lea rsi, [rbp+var_210]
mov rdx, [rbp+var_2E0]
lea rdi, [rbp+var_2C0]
call my_read_charset_file
loc_34130:
mov rax, [rbp+var_2E8]
mov eax, [rax+0Ch]
and eax, 200h
cmp eax, 0
jz loc_34250
mov rax, [rbp+var_2E8]
mov eax, [rax+0Ch]
and eax, 100h
cmp eax, 0
jnz loc_34243
mov rdi, [rbp+var_2E8]
call simple_8bit_charset_data_is_full
cmp al, 0
jnz short loc_341A2
mov rdi, [rbp+var_2E8]
call find_charset_data_inheritance_source
mov [rbp+var_2F0], rax
cmp [rbp+var_2F0], 0
jz short loc_341A0
mov rdi, [rbp+var_2E8]
mov rsi, [rbp+var_2F0]
call inherit_charset_data
loc_341A0:
jmp short $+2
loc_341A2:
mov rdi, [rbp+var_2E8]
call simple_8bit_collation_data_is_full
cmp al, 0
jnz short loc_341EB
mov rdi, [rbp+var_2E8]
mov rsi, [rbp+var_2E0]
call find_collation_data_inheritance_source
mov [rbp+var_2F8], rax
cmp [rbp+var_2F8], 0
jz short loc_341E9
mov rdi, [rbp+var_2E8]
mov rsi, [rbp+var_2F8]
call inherit_collation_data
loc_341E9:
jmp short $+2
loc_341EB:
mov rdi, [rbp+var_2E8]
mov rsi, [rbp+var_2D0]
call my_ci_init_charset
movsx eax, al
cmp eax, 0
jnz short loc_34221
mov rdi, [rbp+var_2E8]
mov rsi, [rbp+var_2D0]
call my_ci_init_collation
movsx eax, al
cmp eax, 0
jz short loc_3422E
loc_34221:
mov [rbp+var_2E8], 0
jmp short loc_34241
loc_3422E:
mov rax, [rbp+var_2E8]
mov ecx, [rax+0Ch]
or ecx, 100h
mov [rax+0Ch], ecx
loc_34241:
jmp short $+2
loc_34243:
mov edi, [rbp+var_2D4]
call my_collation_statistics_inc_use_count
jmp short loc_3425B
loc_34250:
mov [rbp+var_2E8], 0
loc_3425B:
lea rdi, THR_LOCK_charset
call inline_mysql_mutex_unlock_0
loc_34267:
mov rax, [rbp+var_2E8]
mov [rbp+var_2C8], rax
loc_34275:
mov rax, [rbp+var_2C8]
mov [rbp+var_300], rax
mov rax, fs:28h
mov rcx, [rbp+var_8]
cmp rax, rcx
jnz short loc_342A5
mov rax, [rbp+var_300]
add rsp, 300h
pop rbp
retn
loc_342A5:
call ___stack_chk_fail
| long long get_internal_charset(long long a1, unsigned int a2, long long a3)
{
unsigned int charsets_dir; // eax
int v4; // r8d
int v5; // r9d
long long collation_data_inheritance_source; // [rsp+8h] [rbp-2F8h]
long long charset_data_inheritance_source; // [rsp+10h] [rbp-2F0h]
long long v9; // [rsp+18h] [rbp-2E8h]
_BYTE v12[176]; // [rsp+40h] [rbp-2C0h] BYREF
_BYTE v13[520]; // [rsp+F0h] [rbp-210h] BYREF
unsigned long long v14; // [rsp+2F8h] [rbp-8h]
v14 = __readfsqword(0x28u);
v9 = all_charsets[a2];
if ( !v9 )
return v9;
if ( (*(_DWORD *)(v9 + 12) & 0x100) == 0 )
{
inline_mysql_mutex_lock_0(&THR_LOCK_charset, "/workspace/llm4binary/github2025/eloqsql/mysys/charset.c", 875LL);
if ( (*(_DWORD *)(v9 + 12) & 9) == 0 )
{
charsets_dir = (unsigned int)get_charsets_dir(v13);
strxmov(charsets_dir, *(_QWORD *)(v9 + 16), (unsigned int)".xml", 0, v4, v5);
my_charset_loader_init_mysys((long long)v12);
my_read_charset_file(v12, v13, a3);
}
if ( (*(_DWORD *)(v9 + 12) & 0x200) != 0 )
{
if ( (*(_DWORD *)(v9 + 12) & 0x100) == 0 )
{
if ( !(unsigned __int8)simple_8bit_charset_data_is_full(v9) )
{
charset_data_inheritance_source = find_charset_data_inheritance_source(v9);
if ( charset_data_inheritance_source )
inherit_charset_data(v9, charset_data_inheritance_source);
}
if ( !(unsigned __int8)simple_8bit_collation_data_is_full(v9) )
{
collation_data_inheritance_source = find_collation_data_inheritance_source(v9, a3);
if ( collation_data_inheritance_source )
inherit_collation_data(v9, collation_data_inheritance_source);
}
if ( (unsigned __int8)my_ci_init_charset(v9, a1) || (unsigned __int8)my_ci_init_collation(v9, a1) )
v9 = 0LL;
else
*(_DWORD *)(v9 + 12) |= 0x100u;
}
my_collation_statistics_inc_use_count(a2);
}
else
{
v9 = 0LL;
}
inline_mysql_mutex_unlock_0(&THR_LOCK_charset);
return v9;
}
my_collation_statistics_inc_use_count(a2);
return v9;
}
| get_internal_charset:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x300
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x8],RAX
MOV qword ptr [RBP + -0x2d0],RDI
MOV dword ptr [RBP + -0x2d4],ESI
MOV qword ptr [RBP + -0x2e0],RDX
JMP 0x0013405e
LAB_0013405e:
MOV EAX,dword ptr [RBP + -0x2d4]
MOV ECX,EAX
LEA RAX,[0x48dba0]
MOV RAX,qword ptr [RAX + RCX*0x8]
MOV qword ptr [RBP + -0x2e8],RAX
CMP RAX,0x0
JZ 0x00134267
MOV RAX,qword ptr [RBP + -0x2e8]
MOV EAX,dword ptr [RAX + 0xc]
AND EAX,0x100
CMP EAX,0x0
JZ 0x001340b4
MOV EDI,dword ptr [RBP + -0x2d4]
CALL 0x001359c0
MOV RAX,qword ptr [RBP + -0x2e8]
MOV qword ptr [RBP + -0x2c8],RAX
JMP 0x00134275
LAB_001340b4:
LEA RDI,[0x48d578]
LEA RSI,[0x1803d3]
MOV EDX,0x36b
CALL 0x001359f0
MOV RAX,qword ptr [RBP + -0x2e8]
MOV EAX,dword ptr [RAX + 0xc]
AND EAX,0x9
CMP EAX,0x0
JNZ 0x00134130
LEA RDI,[RBP + -0x210]
CALL 0x001336a0
MOV RDI,RAX
MOV RAX,qword ptr [RBP + -0x2e8]
MOV RSI,qword ptr [RAX + 0x10]
LEA RDX,[0x1803b6]
XOR EAX,EAX
MOV ECX,EAX
MOV AL,0x0
CALL 0x0017d2c0
LEA RDI,[RBP + -0x2c0]
CALL 0x00133000
LEA RSI,[RBP + -0x210]
MOV RDX,qword ptr [RBP + -0x2e0]
LEA RDI,[RBP + -0x2c0]
CALL 0x00135540
LAB_00134130:
MOV RAX,qword ptr [RBP + -0x2e8]
MOV EAX,dword ptr [RAX + 0xc]
AND EAX,0x200
CMP EAX,0x0
JZ 0x00134250
MOV RAX,qword ptr [RBP + -0x2e8]
MOV EAX,dword ptr [RAX + 0xc]
AND EAX,0x100
CMP EAX,0x0
JNZ 0x00134243
MOV RDI,qword ptr [RBP + -0x2e8]
CALL 0x00135460
CMP AL,0x0
JNZ 0x001341a2
MOV RDI,qword ptr [RBP + -0x2e8]
CALL 0x00135a60
MOV qword ptr [RBP + -0x2f0],RAX
CMP qword ptr [RBP + -0x2f0],0x0
JZ 0x001341a0
MOV RDI,qword ptr [RBP + -0x2e8]
MOV RSI,qword ptr [RBP + -0x2f0]
CALL 0x00135aa0
LAB_001341a0:
JMP 0x001341a2
LAB_001341a2:
MOV RDI,qword ptr [RBP + -0x2e8]
CALL 0x001354c0
CMP AL,0x0
JNZ 0x001341eb
MOV RDI,qword ptr [RBP + -0x2e8]
MOV RSI,qword ptr [RBP + -0x2e0]
CALL 0x00135b20
MOV qword ptr [RBP + -0x2f8],RAX
CMP qword ptr [RBP + -0x2f8],0x0
JZ 0x001341e9
MOV RDI,qword ptr [RBP + -0x2e8]
MOV RSI,qword ptr [RBP + -0x2f8]
CALL 0x00135c30
LAB_001341e9:
JMP 0x001341eb
LAB_001341eb:
MOV RDI,qword ptr [RBP + -0x2e8]
MOV RSI,qword ptr [RBP + -0x2d0]
CALL 0x00135c70
MOVSX EAX,AL
CMP EAX,0x0
JNZ 0x00134221
MOV RDI,qword ptr [RBP + -0x2e8]
MOV RSI,qword ptr [RBP + -0x2d0]
CALL 0x00135cc0
MOVSX EAX,AL
CMP EAX,0x0
JZ 0x0013422e
LAB_00134221:
MOV qword ptr [RBP + -0x2e8],0x0
JMP 0x00134241
LAB_0013422e:
MOV RAX,qword ptr [RBP + -0x2e8]
MOV ECX,dword ptr [RAX + 0xc]
OR ECX,0x100
MOV dword ptr [RAX + 0xc],ECX
LAB_00134241:
JMP 0x00134243
LAB_00134243:
MOV EDI,dword ptr [RBP + -0x2d4]
CALL 0x001359c0
JMP 0x0013425b
LAB_00134250:
MOV qword ptr [RBP + -0x2e8],0x0
LAB_0013425b:
LEA RDI,[0x48d578]
CALL 0x00135d10
LAB_00134267:
MOV RAX,qword ptr [RBP + -0x2e8]
MOV qword ptr [RBP + -0x2c8],RAX
LAB_00134275:
MOV RAX,qword ptr [RBP + -0x2c8]
MOV qword ptr [RBP + -0x300],RAX
MOV RAX,qword ptr FS:[0x28]
MOV RCX,qword ptr [RBP + -0x8]
CMP RAX,RCX
JNZ 0x001342a5
MOV RAX,qword ptr [RBP + -0x300]
ADD RSP,0x300
POP RBP
RET
LAB_001342a5:
CALL 0x00124300
|
long get_internal_charset(int8 param_1,uint param_2,int8 param_3)
{
char cVar1;
int8 uVar2;
long lVar3;
long in_FS_OFFSET;
long local_2f0;
int1 local_2c8 [176];
int1 local_218 [520];
long local_10;
local_10 = *(long *)(in_FS_OFFSET + 0x28);
local_2f0 = (&all_charsets)[param_2];
if (local_2f0 != 0) {
if ((*(uint *)(local_2f0 + 0xc) & 0x100) == 0) {
inline_mysql_mutex_lock
(THR_LOCK_charset,"/workspace/llm4binary/github2025/eloqsql/mysys/charset.c",0x36b);
if ((*(uint *)(local_2f0 + 0xc) & 9) == 0) {
uVar2 = get_charsets_dir(local_218);
strxmov(uVar2,*(int8 *)(local_2f0 + 0x10),".xml",0);
my_charset_loader_init_mysys(local_2c8);
my_read_charset_file(local_2c8,local_218,param_3);
}
if ((*(uint *)(local_2f0 + 0xc) & 0x200) == 0) {
local_2f0 = 0;
}
else {
if ((*(uint *)(local_2f0 + 0xc) & 0x100) == 0) {
cVar1 = simple_8bit_charset_data_is_full(local_2f0);
if ((cVar1 == '\0') &&
(lVar3 = find_charset_data_inheritance_source(local_2f0), lVar3 != 0)) {
inherit_charset_data(local_2f0,lVar3);
}
cVar1 = simple_8bit_collation_data_is_full(local_2f0);
if ((cVar1 == '\0') &&
(lVar3 = find_collation_data_inheritance_source(local_2f0,param_3), lVar3 != 0)) {
inherit_collation_data(local_2f0,lVar3);
}
cVar1 = my_ci_init_charset(local_2f0,param_1);
if ((cVar1 == '\0') && (cVar1 = my_ci_init_collation(local_2f0,param_1), cVar1 == '\0')) {
*(uint *)(local_2f0 + 0xc) = *(uint *)(local_2f0 + 0xc) | 0x100;
}
else {
local_2f0 = 0;
}
}
my_collation_statistics_inc_use_count(param_2);
}
inline_mysql_mutex_unlock(THR_LOCK_charset);
}
else {
my_collation_statistics_inc_use_count(param_2);
}
}
if (*(long *)(in_FS_OFFSET + 0x28) != local_10) {
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
return local_2f0;
}
| |
51,810 | stbi_is_hdr_from_memory | monkey531[P]llama/examples/llava/../../common/stb_image.h | STBIDEF int stbi_is_hdr_from_memory(stbi_uc const *buffer, int len)
{
#ifndef STBI_NO_HDR
stbi__context s;
stbi__start_mem(&s,buffer,len);
return stbi__hdr_test(&s);
#else
STBI_NOTUSED(buffer);
STBI_NOTUSED(len);
return 0;
#endif
} | O3 | c | stbi_is_hdr_from_memory:
subq $0xe8, %rsp
leaq 0x8(%rsp), %rax
movq $0x0, 0x10(%rax)
xorl %ecx, %ecx
movl %ecx, 0x30(%rax)
movl %ecx, 0xb8(%rax)
movq %rdi, 0xd0(%rax)
movq %rdi, 0xc0(%rax)
movslq %esi, %rcx
addq %rdi, %rcx
movq %rcx, 0xd8(%rax)
movq %rcx, 0xc8(%rax)
movq %rax, %rdi
callq 0x2994b
addq $0xe8, %rsp
retq
| stbi_is_hdr_from_memory:
sub rsp, 0E8h
lea rax, [rsp+0E8h+var_E0]
mov qword ptr [rax+10h], 0
xor ecx, ecx
mov [rax+30h], ecx
mov [rax+0B8h], ecx
mov [rax+0D0h], rdi
mov [rax+0C0h], rdi
movsxd rcx, esi
add rcx, rdi
mov [rax+0D8h], rcx
mov [rax+0C8h], rcx
mov rdi, rax
call _ZL14stbi__hdr_testP13stbi__context; stbi__hdr_test(stbi__context *)
add rsp, 0E8h
retn
| long long stbi_is_hdr_from_memory(long long a1, int a2)
{
_BYTE v3[16]; // [rsp+8h] [rbp-E0h] BYREF
long long v4; // [rsp+18h] [rbp-D0h]
int v5; // [rsp+38h] [rbp-B0h]
int v6; // [rsp+C0h] [rbp-28h]
long long v7; // [rsp+C8h] [rbp-20h]
long long v8; // [rsp+D0h] [rbp-18h]
long long v9; // [rsp+D8h] [rbp-10h]
long long v10; // [rsp+E0h] [rbp-8h]
v4 = 0LL;
v5 = 0;
v6 = 0;
v9 = a1;
v7 = a1;
v10 = a1 + a2;
v8 = v10;
return stbi__hdr_test(v3);
}
| stbi_is_hdr_from_memory:
SUB RSP,0xe8
LEA RAX,[RSP + 0x8]
MOV qword ptr [RAX + 0x10],0x0
XOR ECX,ECX
MOV dword ptr [RAX + 0x30],ECX
MOV dword ptr [RAX + 0xb8],ECX
MOV qword ptr [RAX + 0xd0],RDI
MOV qword ptr [RAX + 0xc0],RDI
MOVSXD RCX,ESI
ADD RCX,RDI
MOV qword ptr [RAX + 0xd8],RCX
MOV qword ptr [RAX + 0xc8],RCX
MOV RDI,RAX
CALL 0x0012994b
ADD RSP,0xe8
RET
|
void stbi_is_hdr_from_memory(long param_1,int param_2)
{
stbi__context local_e0 [16];
int8 local_d0;
int4 local_b0;
int4 local_28;
long local_20;
long local_18;
long local_10;
long local_8;
local_d0 = 0;
local_b0 = 0;
local_28 = 0;
local_18 = param_2 + param_1;
local_20 = param_1;
local_10 = param_1;
local_8 = local_18;
stbi__hdr_test(local_e0);
return;
}
| |
51,811 | psi_mutex_trylock | eloqsql/mysys/my_thr_init.c | ATTRIBUTE_COLD int psi_mutex_trylock(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_TRYLOCK, file, line);
# ifdef SAFE_MUTEX
int result= safe_mutex_lock(&that->m_mutex, TRUE, file, line);
# else
int result= pthread_mutex_trylock(&that->m_mutex);
# endif
if (locker)
PSI_MUTEX_CALL(end_mutex_wait)(locker, result);
return result;
} | O0 | c | psi_mutex_trylock:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
leaq 0x1a6bbe(%rip), %rax # 0x1cda28
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
movl $0x1, %edx
callq *%rax
movq %rax, -0x50(%rbp)
movq -0x8(%rbp), %rdi
callq 0x240a0
movl %eax, -0x54(%rbp)
cmpq $0x0, -0x50(%rbp)
je 0x26ec0
leaq 0x1a6b7b(%rip), %rax # 0x1cda28
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
nopl (%rax)
| psi_mutex_trylock:
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]
mov edx, 1
call rax
mov [rbp+var_50], rax
mov rdi, [rbp+var_8]
call _pthread_mutex_trylock
mov [rbp+var_54], eax
cmp [rbp+var_50], 0
jz short loc_26EC0
lea rax, PSI_server
mov rax, [rax]
mov rax, [rax+198h]
mov rdi, [rbp+var_50]
mov esi, [rbp+var_54]
call rax
loc_26EC0:
mov eax, [rbp+var_54]
add rsp, 60h
pop rbp
retn
| long long psi_mutex_trylock(long long a1, long long a2, unsigned int a3)
{
unsigned int v4; // [rsp+Ch] [rbp-54h]
long long v5; // [rsp+10h] [rbp-50h]
_BYTE v6[52]; // [rsp+18h] [rbp-48h] BYREF
unsigned int v7; // [rsp+4Ch] [rbp-14h]
long long v8; // [rsp+50h] [rbp-10h]
long long v9; // [rsp+58h] [rbp-8h]
v9 = a1;
v8 = a2;
v7 = a3;
v5 = (*((long long ( **)(_BYTE *, _QWORD, long long, long long, _QWORD))PSI_server[0] + 50))(
v6,
*(_QWORD *)(a1 + 64),
1LL,
a2,
a3);
v4 = pthread_mutex_trylock(v9);
if ( v5 )
(*((void ( **)(long long, _QWORD))PSI_server[0] + 51))(v5, v4);
return v4;
}
| psi_mutex_trylock:
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,[0x2cda28]
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]
MOV EDX,0x1
CALL RAX
MOV qword ptr [RBP + -0x50],RAX
MOV RDI,qword ptr [RBP + -0x8]
CALL 0x001240a0
MOV dword ptr [RBP + -0x54],EAX
CMP qword ptr [RBP + -0x50],0x0
JZ 0x00126ec0
LEA RAX,[0x2cda28]
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_00126ec0:
MOV EAX,dword ptr [RBP + -0x54]
ADD RSP,0x60
POP RBP
RET
|
int psi_mutex_trylock(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),1,param_2,param_3);
iVar1 = pthread_mutex_trylock(local_10);
if (lVar2 != 0) {
(**(code **)(PSI_server + 0x198))(lVar2,iVar1);
}
return iVar1;
}
| |
51,812 | HeapGetFragmentation | seiftnesse[P]memoryallocator/src/custom_alloc_stats.c | float HeapGetFragmentation() {
if (!heap_initialized) {
HEAP_LOG("Heap not initialized, fragmentation=0\n");
return 0.0f;
}
// Count number of free segments and total free memory
int free_segments = 0;
size_t free_memory = 0;
segment_t *s = segments;
while (s) {
if (s->is_free) {
free_segments++;
free_memory += s->size * BLOCK_SIZE;
}
s = s->next;
}
// If no free memory, fragmentation is 0
if (free_memory == 0) {
HEAP_LOG("No free memory, fragmentation=0\n");
return 0.0f;
}
// Calculate average free segment size
float avg_segment_size = (float) free_memory / free_segments;
// Calculate fragmentation as 1 - (avg segment size / total free memory)
// This gives a value between 0 (no fragmentation) and close to 1 (high fragmentation)
float frag = 1.0f - (avg_segment_size / free_memory);
HEAP_LOG("Fragmentation calculation: free_segments=%d, free_memory=%zu, result=%.4f\n",
free_segments, free_memory, frag);
return frag;
} | O1 | c | HeapGetFragmentation:
leaq 0x3f5e(%rip), %rax # 0x8130
cmpl $0x0, (%rax)
je 0x420e
leaq 0x3f42(%rip), %rax # 0x8120
movq (%rax), %rcx
xorps %xmm0, %xmm0
xorl %edx, %edx
xorl %eax, %eax
testq %rcx, %rcx
je 0x4212
cmpl $0x0, (%rcx)
je 0x41ff
incl %edx
movslq 0x4(%rcx), %rsi
shlq $0xc, %rsi
addq %rsi, %rax
movq 0x8(%rcx), %rcx
testq %rcx, %rcx
jne 0x41ed
cvtsi2ss %edx, %xmm1
jmp 0x4215
xorps %xmm0, %xmm0
retq
xorps %xmm1, %xmm1
testq %rax, %rax
je 0x4255
js 0x4226
xorps %xmm0, %xmm0
cvtsi2ss %rax, %xmm0
jmp 0x423e
movq %rax, %rcx
shrq %rcx
andl $0x1, %eax
orq %rcx, %rax
xorps %xmm0, %xmm0
cvtsi2ss %rax, %xmm0
addss %xmm0, %xmm0
movaps %xmm0, %xmm2
divss %xmm1, %xmm2
divss %xmm0, %xmm2
movss 0x1267(%rip), %xmm0 # 0x54b8
subss %xmm2, %xmm0
retq
nop
| HeapGetFragmentation:
lea rax, heap_initialized
cmp dword ptr [rax], 0
jz short loc_420E
lea rax, segments
mov rcx, [rax]
xorps xmm0, xmm0
xor edx, edx
xor eax, eax
test rcx, rcx
jz short loc_4212
loc_41ED:
cmp dword ptr [rcx], 0
jz short loc_41FF
inc edx
movsxd rsi, dword ptr [rcx+4]
shl rsi, 0Ch
add rax, rsi
loc_41FF:
mov rcx, [rcx+8]
test rcx, rcx
jnz short loc_41ED
cvtsi2ss xmm1, edx
jmp short loc_4215
loc_420E:
xorps xmm0, xmm0
retn
loc_4212:
xorps xmm1, xmm1
loc_4215:
test rax, rax
jz short locret_4255
js short loc_4226
xorps xmm0, xmm0
cvtsi2ss xmm0, rax
jmp short loc_423E
loc_4226:
mov rcx, rax
shr rcx, 1
and eax, 1
or rax, rcx
xorps xmm0, xmm0
cvtsi2ss xmm0, rax
addss xmm0, xmm0
loc_423E:
movaps xmm2, xmm0
divss xmm2, xmm1
divss xmm2, xmm0
movss xmm0, cs:dword_54B8
subss xmm0, xmm2
locret_4255:
retn
| float HeapGetFragmentation()
{
long long v0; // rcx
float result; // xmm0_4
int v2; // edx
long long v3; // rax
float v4; // xmm1_4
float v5; // xmm0_4
if ( !heap_initialized )
return 0.0;
v0 = segments;
result = 0.0;
v2 = 0;
v3 = 0LL;
if ( segments )
{
do
{
if ( *(_DWORD *)v0 )
{
++v2;
v3 += (long long)*(int *)(v0 + 4) << 12;
}
v0 = *(_QWORD *)(v0 + 8);
}
while ( v0 );
v4 = (float)v2;
}
else
{
v4 = 0.0;
}
if ( v3 )
{
if ( v3 < 0 )
v5 = (float)(int)(((unsigned long long)v3 >> 1) | v3 & 1) + (float)(int)(((unsigned long long)v3 >> 1) | v3 & 1);
else
v5 = (float)(int)v3;
return 1.0 - (float)((float)(v5 / v4) / v5);
}
return result;
}
| HeapGetFragmentation:
LEA RAX,[0x108130]
CMP dword ptr [RAX],0x0
JZ 0x0010420e
LEA RAX,[0x108120]
MOV RCX,qword ptr [RAX]
XORPS XMM0,XMM0
XOR EDX,EDX
XOR EAX,EAX
TEST RCX,RCX
JZ 0x00104212
LAB_001041ed:
CMP dword ptr [RCX],0x0
JZ 0x001041ff
INC EDX
MOVSXD RSI,dword ptr [RCX + 0x4]
SHL RSI,0xc
ADD RAX,RSI
LAB_001041ff:
MOV RCX,qword ptr [RCX + 0x8]
TEST RCX,RCX
JNZ 0x001041ed
CVTSI2SS XMM1,EDX
JMP 0x00104215
LAB_0010420e:
XORPS XMM0,XMM0
RET
LAB_00104212:
XORPS XMM1,XMM1
LAB_00104215:
TEST RAX,RAX
JZ 0x00104255
JS 0x00104226
XORPS XMM0,XMM0
CVTSI2SS XMM0,RAX
JMP 0x0010423e
LAB_00104226:
MOV RCX,RAX
SHR RCX,0x1
AND EAX,0x1
OR RAX,RCX
XORPS XMM0,XMM0
CVTSI2SS XMM0,RAX
ADDSS XMM0,XMM0
LAB_0010423e:
MOVAPS XMM2,XMM0
DIVSS XMM2,XMM1
DIVSS XMM2,XMM0
MOVSS XMM0,dword ptr [0x001054b8]
SUBSS XMM0,XMM2
LAB_00104255:
RET
|
float HeapGetFragmentation(void)
{
ulong uVar1;
int *piVar2;
int iVar3;
float fVar4;
float fVar5;
if (heap_initialized != 0) {
fVar4 = 0.0;
iVar3 = 0;
uVar1 = 0;
piVar2 = segments;
if (segments == (int *)0x0) {
fVar5 = 0.0;
}
else {
do {
if (*piVar2 != 0) {
iVar3 = iVar3 + 1;
uVar1 = uVar1 + (long)piVar2[1] * 0x1000;
}
piVar2 = *(int **)(piVar2 + 2);
} while (piVar2 != (int *)0x0);
fVar5 = (float)iVar3;
}
if (uVar1 != 0) {
fVar4 = DAT_001054b8 - ((float)uVar1 / fVar5) / (float)uVar1;
}
return fVar4;
}
return 0.0;
}
| |
51,813 | google::protobuf::FieldDescriptorProto::mutable_unknown_fields() | aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/descriptor.pb.h | inline ::PROTOBUF_NAMESPACE_ID::UnknownFieldSet* mutable_unknown_fields() {
return _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
} | O0 | c | google::protobuf::FieldDescriptorProto::mutable_unknown_fields():
subq $0x38, %rsp
movq %rdi, 0x10(%rsp)
movq 0x10(%rsp), %rax
addq $0x8, %rax
movq %rax, 0x18(%rsp)
movq 0x18(%rsp), %rax
movq %rax, 0x8(%rsp)
movq %rax, 0x28(%rsp)
movq 0x28(%rsp), %rax
movq %rax, 0x30(%rsp)
movq 0x30(%rsp), %rax
movq (%rax), %rax
andq $0x1, %rax
cmpq $0x0, %rax
je 0xd7397
movq 0x8(%rsp), %rdi
callq 0x9cd40
addq $0x8, %rax
movq %rax, 0x20(%rsp)
jmp 0xd73a6
movq 0x8(%rsp), %rdi
callq 0xdf250
movq %rax, 0x20(%rsp)
movq 0x20(%rsp), %rax
addq $0x38, %rsp
retq
| _ZN6google8protobuf20FieldDescriptorProto22mutable_unknown_fieldsEv:
sub rsp, 38h
mov [rsp+38h+var_28], rdi; void *
mov rax, [rsp+38h+var_28]
add rax, 8
mov qword ptr [rsp+38h+var_20], rax; int
mov rax, qword ptr [rsp+38h+var_20]
mov qword ptr [rsp+38h+var_30], rax; int
mov qword ptr [rsp+38h+var_10], rax; int
mov rax, qword ptr [rsp+38h+var_10]
mov qword ptr [rsp+38h+var_8], rax; int
mov rax, qword ptr [rsp+38h+var_8]
mov rax, [rax]
and rax, 1
cmp rax, 0
jz short loc_D7397
mov rdi, qword ptr [rsp+38h+var_30]
call _ZNK6google8protobuf8internal16InternalMetadata8PtrValueINS2_9ContainerINS0_15UnknownFieldSetEEEEEPT_v; google::protobuf::internal::InternalMetadata::PtrValue<google::protobuf::internal::InternalMetadata::Container<google::protobuf::UnknownFieldSet>>(void)
add rax, 8
mov [rsp+38h+var_18], rax
jmp short loc_D73A6
loc_D7397:
mov rdi, qword ptr [rsp+38h+var_30]; int
call _ZN6google8protobuf8internal16InternalMetadata27mutable_unknown_fields_slowINS0_15UnknownFieldSetEEEPT_v; google::protobuf::internal::InternalMetadata::mutable_unknown_fields_slow<google::protobuf::UnknownFieldSet>(void)
mov [rsp+38h+var_18], rax
loc_D73A6:
mov rax, [rsp+38h+var_18]
add rsp, 38h
retn
| mutable_unknown_fields:
SUB RSP,0x38
MOV qword ptr [RSP + 0x10],RDI
MOV RAX,qword ptr [RSP + 0x10]
ADD RAX,0x8
MOV qword ptr [RSP + 0x18],RAX
MOV RAX,qword ptr [RSP + 0x18]
MOV qword ptr [RSP + 0x8],RAX
MOV qword ptr [RSP + 0x28],RAX
MOV RAX,qword ptr [RSP + 0x28]
MOV qword ptr [RSP + 0x30],RAX
MOV RAX,qword ptr [RSP + 0x30]
MOV RAX,qword ptr [RAX]
AND RAX,0x1
CMP RAX,0x0
JZ 0x001d7397
MOV RDI,qword ptr [RSP + 0x8]
CALL 0x0019cd40
ADD RAX,0x8
MOV qword ptr [RSP + 0x20],RAX
JMP 0x001d73a6
LAB_001d7397:
MOV RDI,qword ptr [RSP + 0x8]
CALL 0x001df250
MOV qword ptr [RSP + 0x20],RAX
LAB_001d73a6:
MOV RAX,qword ptr [RSP + 0x20]
ADD RSP,0x38
RET
|
/* google::protobuf::FieldDescriptorProto::mutable_unknown_fields() */
Container * __thiscall
google::protobuf::FieldDescriptorProto::mutable_unknown_fields(FieldDescriptorProto *this)
{
InternalMetadata *this_00;
Container *local_18;
this_00 = (InternalMetadata *)(this + 8);
if ((*(ulong *)this_00 & 1) == 0) {
local_18 = (Container *)
internal::InternalMetadata::
mutable_unknown_fields_slow<google::protobuf::UnknownFieldSet>(this_00);
}
else {
local_18 = internal::InternalMetadata::
PtrValue<google::protobuf::internal::InternalMetadata::Container<google::protobuf::UnknownFieldSet>>
(this_00);
local_18 = local_18 + 8;
}
return local_18;
}
| ||
51,814 | get_timer_pico_value(enum_timer_name) | eloqsql/storage/perfschema/pfs_timer.cc | ulonglong get_timer_pico_value(enum_timer_name timer_name)
{
ulonglong result;
switch (timer_name)
{
case TIMER_NAME_CYCLE:
result= (my_timer_cycles() - cycle_v0) * cycle_to_pico;
break;
case TIMER_NAME_NANOSEC:
result= (my_timer_nanoseconds() - nanosec_v0) * nanosec_to_pico;
break;
case TIMER_NAME_MICROSEC:
result= (my_timer_microseconds() - microsec_v0) * microsec_to_pico;
break;
case TIMER_NAME_MILLISEC:
result= (my_timer_milliseconds() - millisec_v0) * millisec_to_pico;
break;
case TIMER_NAME_TICK:
result= (my_timer_ticks() - tick_v0) * tick_to_pico;
break;
default:
result= 0;
assert(false);
}
return result;
} | O3 | cpp | get_timer_pico_value(enum_timer_name):
pushq %rbp
movq %rsp, %rbp
decl %edi
cmpl $0x4, %edi
ja 0x3a8ed
leaq 0x466a8(%rip), %rax # 0x80f14
movslq (%rax,%rdi,4), %rcx
addq %rax, %rcx
jmpq *%rcx
rdtsc
movq %rax, %rcx
movq %rdx, %rax
shlq $0x20, %rax
orq %rcx, %rax
subq 0x395865(%rip), %rax # 0x3d00f0
imulq 0x395885(%rip), %rax # 0x3d0118
jmp 0x3a8ef
callq 0x475a5
subq 0x39586f(%rip), %rax # 0x3d0110
imulq 0x39588f(%rip), %rax # 0x3d0138
jmp 0x3a8ef
callq 0x47529
subq 0x395849(%rip), %rax # 0x3d0100
imulq 0x395869(%rip), %rax # 0x3d0128
jmp 0x3a8ef
callq 0x47565
subq 0x39583b(%rip), %rax # 0x3d0108
imulq 0x39585b(%rip), %rax # 0x3d0130
jmp 0x3a8ef
callq 0x47500
subq 0x395815(%rip), %rax # 0x3d00f8
imulq 0x395835(%rip), %rax # 0x3d0120
jmp 0x3a8ef
xorl %eax, %eax
popq %rbp
retq
nop
| _Z20get_timer_pico_value15enum_timer_name:
push rbp
mov rbp, rsp
dec edi; switch 5 cases
cmp edi, 4
ja def_3A873; jumptable 000000000003A873 default case
lea rax, jpt_3A873
movsxd rcx, ds:(jpt_3A873 - 80F14h)[rax+rdi*4]
add rcx, rax
jmp rcx; switch jump
loc_3A875:
rdtsc; jumptable 000000000003A873 case 1
mov rcx, rax
mov rax, rdx
shl rax, 20h
or rax, rcx
sub rax, cs:_ZL8cycle_v0; cycle_v0
imul rax, cs:_ZL13cycle_to_pico; cycle_to_pico
jmp short loc_3A8EF
loc_3A895:
call my_timer_ticks; jumptable 000000000003A873 case 5
sub rax, cs:_ZL7tick_v0; tick_v0
imul rax, cs:_ZL12tick_to_pico; tick_to_pico
jmp short loc_3A8EF
loc_3A8AB:
call my_timer_microseconds; jumptable 000000000003A873 case 3
sub rax, cs:_ZL11microsec_v0; microsec_v0
imul rax, cs:_ZL16microsec_to_pico; microsec_to_pico
jmp short loc_3A8EF
loc_3A8C1:
call my_timer_milliseconds; jumptable 000000000003A873 case 4
sub rax, cs:_ZL11millisec_v0; millisec_v0
imul rax, cs:_ZL16millisec_to_pico; millisec_to_pico
jmp short loc_3A8EF
loc_3A8D7:
call my_timer_nanoseconds; jumptable 000000000003A873 case 2
sub rax, cs:_ZL10nanosec_v0; nanosec_v0
imul rax, cs:_ZL15nanosec_to_pico; nanosec_to_pico
jmp short loc_3A8EF
def_3A873:
xor eax, eax; jumptable 000000000003A873 default case
loc_3A8EF:
pop rbp
retn
| long long get_timer_pico_value(int a1)
{
unsigned long long v1; // rax
long long result; // rax
switch ( a1 )
{
case 1:
v1 = __rdtsc();
result = cycle_to_pico * (((unsigned int)v1 | ((unsigned long long)HIDWORD(v1) << 32)) - cycle_v0);
break;
case 2:
result = nanosec_to_pico * (my_timer_nanoseconds() - nanosec_v0);
break;
case 3:
result = microsec_to_pico * (my_timer_microseconds() - microsec_v0);
break;
case 4:
result = millisec_to_pico * (my_timer_milliseconds() - millisec_v0);
break;
case 5:
result = tick_to_pico * (my_timer_ticks() - tick_v0);
break;
default:
result = 0LL;
break;
}
return result;
}
| get_timer_pico_value:
PUSH RBP
MOV RBP,RSP
DEC EDI
CMP EDI,0x4
JA 0x0013a8ed
LEA RAX,[0x180f14]
MOVSXD RCX,dword ptr [RAX + RDI*0x4]
ADD RCX,RAX
switchD:
JMP RCX
caseD_1:
RDTSC
MOV RCX,RAX
MOV RAX,RDX
SHL RAX,0x20
OR RAX,RCX
SUB RAX,qword ptr [0x004d00f0]
IMUL RAX,qword ptr [0x004d0118]
JMP 0x0013a8ef
caseD_5:
CALL 0x001475a5
SUB RAX,qword ptr [0x004d0110]
IMUL RAX,qword ptr [0x004d0138]
JMP 0x0013a8ef
caseD_3:
CALL 0x00147529
SUB RAX,qword ptr [0x004d0100]
IMUL RAX,qword ptr [0x004d0128]
JMP 0x0013a8ef
caseD_4:
CALL 0x00147565
SUB RAX,qword ptr [0x004d0108]
IMUL RAX,qword ptr [0x004d0130]
JMP 0x0013a8ef
caseD_2:
CALL 0x00147500
SUB RAX,qword ptr [0x004d00f8]
IMUL RAX,qword ptr [0x004d0120]
JMP 0x0013a8ef
default:
XOR EAX,EAX
LAB_0013a8ef:
POP RBP
RET
|
/* get_timer_pico_value(enum_timer_name) */
long get_timer_pico_value(int4 param_1)
{
long lVar1;
switch(param_1) {
case 1:
lVar1 = rdtsc();
lVar1 = (lVar1 - cycle_v0) * cycle_to_pico;
break;
case 2:
lVar1 = my_timer_nanoseconds();
lVar1 = (lVar1 - nanosec_v0) * nanosec_to_pico;
break;
case 3:
lVar1 = my_timer_microseconds();
lVar1 = (lVar1 - microsec_v0) * microsec_to_pico;
break;
case 4:
lVar1 = my_timer_milliseconds();
lVar1 = (lVar1 - millisec_v0) * millisec_to_pico;
break;
case 5:
lVar1 = my_timer_ticks();
lVar1 = (lVar1 - tick_v0) * tick_to_pico;
break;
default:
lVar1 = 0;
}
return lVar1;
}
| |
51,815 | mysql_stmt_close_start_internal | eloqsql/libmariadb/libmariadb/mariadb_async.c | static void
mysql_stmt_close_start_internal(void *d)
{
MK_ASYNC_INTERNAL_BODY(
mysql_stmt_close,
(parms->stmt),
parms->stmt->mysql,
my_bool,
r_my_bool)
} | O0 | c | mysql_stmt_close_start_internal:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq 0x38(%rax), %rax
movq 0x480(%rax), %rax
movq 0x28(%rax), %rax
movq %rax, -0x20(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rdi
callq 0x29520
movb %al, -0x11(%rbp)
movb -0x11(%rbp), %cl
movq -0x20(%rbp), %rax
movb %cl, 0x8(%rax)
movq -0x20(%rbp), %rax
movl $0x0, (%rax)
addq $0x20, %rsp
popq %rbp
retq
nopw (%rax,%rax)
| mysql_stmt_close_start_internal:
push rbp
mov rbp, rsp
sub rsp, 20h
mov [rbp+var_8], rdi
mov rax, [rbp+var_8]
mov [rbp+var_10], rax
mov rax, [rbp+var_10]
mov rax, [rax]
mov rax, [rax+38h]
mov rax, [rax+480h]
mov rax, [rax+28h]
mov [rbp+var_20], rax
mov rax, [rbp+var_10]
mov rdi, [rax]
call mysql_stmt_close
mov [rbp+var_11], al
mov cl, [rbp+var_11]
mov rax, [rbp+var_20]
mov [rax+8], cl
mov rax, [rbp+var_20]
mov dword ptr [rax], 0
add rsp, 20h
pop rbp
retn
| long long mysql_stmt_close_start_internal(long long *a1)
{
long long result; // rax
long long v2; // [rsp+0h] [rbp-20h]
v2 = *(_QWORD *)(*(_QWORD *)(*(_QWORD *)(*a1 + 56) + 1152LL) + 40LL);
*(_BYTE *)(v2 + 8) = mysql_stmt_close(*a1);
result = v2;
*(_DWORD *)v2 = 0;
return result;
}
| mysql_stmt_close_start_internal:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x20
MOV qword ptr [RBP + -0x8],RDI
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RBP + -0x10],RAX
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX]
MOV RAX,qword ptr [RAX + 0x38]
MOV RAX,qword ptr [RAX + 0x480]
MOV RAX,qword ptr [RAX + 0x28]
MOV qword ptr [RBP + -0x20],RAX
MOV RAX,qword ptr [RBP + -0x10]
MOV RDI,qword ptr [RAX]
CALL 0x00129520
MOV byte ptr [RBP + -0x11],AL
MOV CL,byte ptr [RBP + -0x11]
MOV RAX,qword ptr [RBP + -0x20]
MOV byte ptr [RAX + 0x8],CL
MOV RAX,qword ptr [RBP + -0x20]
MOV dword ptr [RAX],0x0
ADD RSP,0x20
POP RBP
RET
|
void mysql_stmt_close_start_internal(long *param_1)
{
int4 *puVar1;
int1 uVar2;
puVar1 = *(int4 **)(*(long *)(*(long *)(*param_1 + 0x38) + 0x480) + 0x28);
uVar2 = mysql_stmt_close(*param_1);
*(int1 *)(puVar1 + 2) = uVar2;
*puVar1 = 0;
return;
}
| |
51,816 | minja::ForNode::ForNode(minja::Location const&, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>&&, std::shared_ptr<minja::Expression>&&, std::shared_ptr<minja::Expression>&&, std::shared_ptr<minja::TemplateNode>&&, bool, std::shared_ptr<minja::TemplateNode>&&) | monkey531[P]llama/common/minja.hpp | ForNode(const Location & location, std::vector<std::string> && var_names, std::shared_ptr<Expression> && iterable,
std::shared_ptr<Expression> && condition, std::shared_ptr<TemplateNode> && body, bool recursive, std::shared_ptr<TemplateNode> && else_body)
: TemplateNode(location), var_names(var_names), iterable(std::move(iterable)), condition(std::move(condition)), body(std::move(body)), recursive(recursive), else_body(std::move(else_body)) {} | O2 | cpp | minja::ForNode::ForNode(minja::Location const&, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>&&, std::shared_ptr<minja::Expression>&&, std::shared_ptr<minja::Expression>&&, std::shared_ptr<minja::TemplateNode>&&, bool, std::shared_ptr<minja::TemplateNode>&&):
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %r9, %r14
movq %r8, %r15
movq %rcx, %r12
movq %rdx, %r13
movq %rdi, %rbx
callq 0x730f8
leaq 0x8990e(%rip), %rax # 0xfd090
addq $0x10, %rax
movq %rax, (%rbx)
leaq 0x20(%rbx), %rdi
movq %r13, %rsi
callq 0x39c8c
andq $0x0, 0x40(%rbx)
movups (%r12), %xmm0
andq $0x0, 0x8(%r12)
movups %xmm0, 0x38(%rbx)
andq $0x0, (%r12)
movq 0x38(%rsp), %rax
andq $0x0, 0x50(%rbx)
movups (%r15), %xmm0
andq $0x0, 0x8(%r15)
movups %xmm0, 0x48(%rbx)
andq $0x0, (%r15)
movb 0x30(%rsp), %cl
andq $0x0, 0x60(%rbx)
movups (%r14), %xmm0
andq $0x0, 0x8(%r14)
movups %xmm0, 0x58(%rbx)
andq $0x0, (%r14)
movb %cl, 0x68(%rbx)
andq $0x0, 0x78(%rbx)
movups (%rax), %xmm0
andq $0x0, 0x8(%rax)
movups %xmm0, 0x70(%rbx)
andq $0x0, (%rax)
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
movq %rax, %r14
movq %rbx, %rdi
callq 0x77d72
movq %r14, %rdi
callq 0x23fb0
| _ZN5minja7ForNodeC2ERKNS_8LocationEOSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaISA_EEOSt10shared_ptrINS_10ExpressionEESH_OSE_INS_12TemplateNodeEEbSK_:
push r15
push r14
push r13
push r12
push rbx
mov r14, r9
mov r15, r8
mov r12, rcx
mov r13, rdx
mov rbx, rdi
call _ZN5minja12TemplateNodeC2ERKNS_8LocationE; minja::TemplateNode::TemplateNode(minja::Location const&)
lea rax, _ZTVN5minja7ForNodeE; `vtable for'minja::ForNode
add rax, 10h
mov [rbx], rax
lea rdi, [rbx+20h]
mov rsi, r13
call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EEC2ERKS7_; std::vector<std::string>::vector(std::vector<std::string> const&)
and qword ptr [rbx+40h], 0
movups xmm0, xmmword ptr [r12]
and qword ptr [r12+8], 0
movups xmmword ptr [rbx+38h], xmm0
and qword ptr [r12], 0
mov rax, [rsp+28h+arg_8]
and qword ptr [rbx+50h], 0
movups xmm0, xmmword ptr [r15]
and qword ptr [r15+8], 0
movups xmmword ptr [rbx+48h], xmm0
and qword ptr [r15], 0
mov cl, [rsp+28h+arg_0]
and qword ptr [rbx+60h], 0
movups xmm0, xmmword ptr [r14]
and qword ptr [r14+8], 0
movups xmmword ptr [rbx+58h], xmm0
and qword ptr [r14], 0
mov [rbx+68h], cl
and qword ptr [rbx+78h], 0
movups xmm0, xmmword ptr [rax]
and qword ptr [rax+8], 0
movups xmmword ptr [rbx+70h], xmm0
and qword ptr [rax], 0
pop rbx
pop r12
pop r13
pop r14
pop r15
retn
mov r14, rax
mov rdi, rbx; this
call _ZN5minja12TemplateNodeD2Ev; minja::TemplateNode::~TemplateNode()
mov rdi, r14
call __Unwind_Resume
| long long minja::ForNode::ForNode(
long long a1,
_QWORD *a2,
_QWORD *a3,
__int128 *a4,
__int128 *a5,
__int128 *a6,
char a7,
__int128 *a8)
{
__int128 v12; // xmm0
long long result; // rax
__int128 v14; // xmm0
__int128 v15; // xmm0
__int128 v16; // xmm0
minja::TemplateNode::TemplateNode((_QWORD *)a1, a2);
*(_QWORD *)a1 = &`vtable for'minja::ForNode + 2;
std::vector<std::string>::vector((_QWORD *)(a1 + 32), a3);
*(_QWORD *)(a1 + 64) = 0LL;
v12 = *a4;
*((_QWORD *)a4 + 1) = 0LL;
*(_OWORD *)(a1 + 56) = v12;
*(_QWORD *)a4 = 0LL;
result = (long long)a8;
*(_QWORD *)(a1 + 80) = 0LL;
v14 = *a5;
*((_QWORD *)a5 + 1) = 0LL;
*(_OWORD *)(a1 + 72) = v14;
*(_QWORD *)a5 = 0LL;
*(_QWORD *)(a1 + 96) = 0LL;
v15 = *a6;
*((_QWORD *)a6 + 1) = 0LL;
*(_OWORD *)(a1 + 88) = v15;
*(_QWORD *)a6 = 0LL;
*(_BYTE *)(a1 + 104) = a7;
*(_QWORD *)(a1 + 120) = 0LL;
v16 = *a8;
*((_QWORD *)a8 + 1) = 0LL;
*(_OWORD *)(a1 + 112) = v16;
*(_QWORD *)a8 = 0LL;
return result;
}
| ForNode:
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
MOV R14,R9
MOV R15,R8
MOV R12,RCX
MOV R13,RDX
MOV RBX,RDI
CALL 0x001730f8
LEA RAX,[0x1fd090]
ADD RAX,0x10
MOV qword ptr [RBX],RAX
LEA RDI,[RBX + 0x20]
LAB_0017378d:
MOV RSI,R13
CALL 0x00139c8c
LAB_00173795:
AND qword ptr [RBX + 0x40],0x0
MOVUPS XMM0,xmmword ptr [R12]
AND qword ptr [R12 + 0x8],0x0
MOVUPS xmmword ptr [RBX + 0x38],XMM0
AND qword ptr [R12],0x0
MOV RAX,qword ptr [RSP + 0x38]
AND qword ptr [RBX + 0x50],0x0
MOVUPS XMM0,xmmword ptr [R15]
AND qword ptr [R15 + 0x8],0x0
MOVUPS xmmword ptr [RBX + 0x48],XMM0
AND qword ptr [R15],0x0
MOV CL,byte ptr [RSP + 0x30]
AND qword ptr [RBX + 0x60],0x0
MOVUPS XMM0,xmmword ptr [R14]
AND qword ptr [R14 + 0x8],0x0
MOVUPS xmmword ptr [RBX + 0x58],XMM0
AND qword ptr [R14],0x0
MOV byte ptr [RBX + 0x68],CL
AND qword ptr [RBX + 0x78],0x0
MOVUPS XMM0,xmmword ptr [RAX]
AND qword ptr [RAX + 0x8],0x0
MOVUPS xmmword ptr [RBX + 0x70],XMM0
AND qword ptr [RAX],0x0
POP RBX
POP R12
POP R13
POP R14
POP R15
RET
|
/* minja::ForNode::ForNode(minja::Location const&, std::vector<std::__cxx11::string,
std::allocator<std::__cxx11::string > >&&, std::shared_ptr<minja::Expression>&&,
std::shared_ptr<minja::Expression>&&, std::shared_ptr<minja::TemplateNode>&&, bool,
std::shared_ptr<minja::TemplateNode>&&) */
void __thiscall
minja::ForNode::ForNode
(ForNode *this,Location *param_1,vector *param_2,shared_ptr *param_3,shared_ptr *param_4,
shared_ptr *param_5,bool param_6,shared_ptr *param_7)
{
int8 uVar1;
TemplateNode::TemplateNode((TemplateNode *)this,param_1);
*(int ***)this = &PTR_do_render_001fd0a0;
/* try { // try from 0017378d to 00173794 has its CatchHandler @ 00173805 */
std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::vector
((vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *)(this + 0x20),
param_2);
*(int8 *)(this + 0x40) = 0;
uVar1 = *(int8 *)(param_3 + 8);
*(int8 *)(param_3 + 8) = 0;
*(int8 *)(this + 0x38) = *(int8 *)param_3;
*(int8 *)(this + 0x40) = uVar1;
*(int8 *)param_3 = 0;
*(int8 *)(this + 0x50) = 0;
uVar1 = *(int8 *)(param_4 + 8);
*(int8 *)(param_4 + 8) = 0;
*(int8 *)(this + 0x48) = *(int8 *)param_4;
*(int8 *)(this + 0x50) = uVar1;
*(int8 *)param_4 = 0;
*(int8 *)(this + 0x60) = 0;
uVar1 = *(int8 *)(param_5 + 8);
*(int8 *)(param_5 + 8) = 0;
*(int8 *)(this + 0x58) = *(int8 *)param_5;
*(int8 *)(this + 0x60) = uVar1;
*(int8 *)param_5 = 0;
this[0x68] = (ForNode)param_6;
*(int8 *)(this + 0x78) = 0;
uVar1 = *(int8 *)(param_7 + 8);
*(int8 *)(param_7 + 8) = 0;
*(int8 *)(this + 0x70) = *(int8 *)param_7;
*(int8 *)(this + 0x78) = uVar1;
*(int8 *)param_7 = 0;
return;
}
| |
51,817 | google::protobuf::Descriptor::FindFieldByNumber(int) const | aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/descriptor.cc | const FieldDescriptor* Descriptor::FindFieldByNumber(int key) const {
const FieldDescriptor* result = file()->tables_->FindFieldByNumber(this, key);
if (result == nullptr || result->is_extension()) {
return nullptr;
} else {
return result;
}
} | O3 | cpp | google::protobuf::Descriptor::FindFieldByNumber(int) const:
subq $0x38, %rsp
testl %esi, %esi
jle 0xc0f62
movzwl 0x2(%rdi), %eax
cmpl %esi, %eax
jb 0xc0f62
movq 0x28(%rdi), %rax
movl %esi, %ecx
leaq (%rcx,%rcx,8), %rcx
leaq (%rax,%rcx,8), %rcx
addq $-0x48, %rcx
jmp 0xc0fad
movq 0x10(%rdi), %rax
movq 0x80(%rax), %rax
xorps %xmm0, %xmm0
leaq 0x10(%rsp), %rcx
movups %xmm0, 0x8(%rcx)
movq %rdi, 0x18(%rcx)
movl %esi, 0x20(%rcx)
addq $0x50, %rax
leaq 0x8(%rsp), %rsi
movq %rcx, (%rsi)
movb $0xb, (%rcx)
movq %rax, %rdi
callq 0xdd4e4
testq %rax, %rax
je 0xc0fab
movq 0x8(%rax), %rax
xorl %ecx, %ecx
cmpb $0x2, (%rax)
cmoveq %rax, %rcx
jmp 0xc0fad
xorl %ecx, %ecx
xorl %eax, %eax
testq %rcx, %rcx
je 0xc0fbc
testb $0x8, 0x1(%rcx)
cmoveq %rcx, %rax
addq $0x38, %rsp
retq
nop
| _ZNK6google8protobuf10Descriptor17FindFieldByNumberEi:
sub rsp, 38h
test esi, esi
jle short loc_C0F62
movzx eax, word ptr [rdi+2]
cmp eax, esi
jb short loc_C0F62
mov rax, [rdi+28h]
mov ecx, esi
lea rcx, [rcx+rcx*8]
lea rcx, [rax+rcx*8]
add rcx, 0FFFFFFFFFFFFFFB8h
jmp short loc_C0FAD
loc_C0F62:
mov rax, [rdi+10h]
mov rax, [rax+80h]
xorps xmm0, xmm0
lea rcx, [rsp+38h+var_28]
movups xmmword ptr [rcx+8], xmm0
mov [rcx+18h], rdi
mov [rcx+20h], esi
add rax, 50h ; 'P'
lea rsi, [rsp+38h+var_30]
mov [rsi], rcx
mov byte ptr [rcx], 0Bh
mov rdi, rax
call _ZNKSt13unordered_setIN6google8protobuf6SymbolENS1_12_GLOBAL__N_118FieldsByNumberHashENS3_16FieldsByNumberEqESaIS2_EE4findERKS2_; std::unordered_set<google::protobuf::Symbol,google::protobuf::`anonymous namespace'::FieldsByNumberHash,google::protobuf::`anonymous namespace'::FieldsByNumberEq,std::allocator<google::protobuf::Symbol>>::find(google::protobuf::Symbol const&)
test rax, rax
jz short loc_C0FAB
mov rax, [rax+8]
xor ecx, ecx
cmp byte ptr [rax], 2
cmovz rcx, rax
jmp short loc_C0FAD
loc_C0FAB:
xor ecx, ecx
loc_C0FAD:
xor eax, eax
test rcx, rcx
jz short loc_C0FBC
test byte ptr [rcx+1], 8
cmovz rax, rcx
loc_C0FBC:
add rsp, 38h
retn
| long long google::protobuf::Descriptor::FindFieldByNumber(
google::protobuf::Descriptor *this,
int a2,
long long a3)
{
long long v3; // rcx
long long v4; // rax
long long v5; // rax
_BYTE *v6; // rax
long long result; // rax
char *v8; // [rsp+8h] [rbp-30h] BYREF
char v9[8]; // [rsp+10h] [rbp-28h] BYREF
__int128 v10; // [rsp+18h] [rbp-20h]
google::protobuf::Descriptor *v11; // [rsp+28h] [rbp-10h]
int v12; // [rsp+30h] [rbp-8h]
if ( a2 <= 0 || *((unsigned __int16 *)this + 1) < (unsigned int)a2 )
{
v4 = *(_QWORD *)(*((_QWORD *)this + 2) + 128LL);
v10 = 0LL;
v11 = this;
v12 = a2;
v8 = v9;
v9[0] = 11;
v5 = std::unordered_set<google::protobuf::Symbol,google::protobuf::`anonymous namespace'::FieldsByNumberHash,google::protobuf::`anonymous namespace'::FieldsByNumberEq,std::allocator<google::protobuf::Symbol>>::find(
v4 + 80,
&v8,
a3,
v9);
if ( v5 )
{
v6 = *(_BYTE **)(v5 + 8);
v3 = 0LL;
if ( *v6 == 2 )
v3 = (long long)v6;
}
else
{
v3 = 0LL;
}
}
else
{
v3 = *((_QWORD *)this + 5) + 72LL * (unsigned int)a2 - 72;
}
result = 0LL;
if ( v3 )
{
if ( (*(_BYTE *)(v3 + 1) & 8) == 0 )
return v3;
}
return result;
}
| FindFieldByNumber:
SUB RSP,0x38
TEST ESI,ESI
JLE 0x001c0f62
MOVZX EAX,word ptr [RDI + 0x2]
CMP EAX,ESI
JC 0x001c0f62
MOV RAX,qword ptr [RDI + 0x28]
MOV ECX,ESI
LEA RCX,[RCX + RCX*0x8]
LEA RCX,[RAX + RCX*0x8]
ADD RCX,-0x48
JMP 0x001c0fad
LAB_001c0f62:
MOV RAX,qword ptr [RDI + 0x10]
MOV RAX,qword ptr [RAX + 0x80]
XORPS XMM0,XMM0
LEA RCX,[RSP + 0x10]
MOVUPS xmmword ptr [RCX + 0x8],XMM0
MOV qword ptr [RCX + 0x18],RDI
MOV dword ptr [RCX + 0x20],ESI
ADD RAX,0x50
LEA RSI,[RSP + 0x8]
MOV qword ptr [RSI],RCX
MOV byte ptr [RCX],0xb
MOV RDI,RAX
CALL 0x001dd4e4
TEST RAX,RAX
JZ 0x001c0fab
MOV RAX,qword ptr [RAX + 0x8]
XOR ECX,ECX
CMP byte ptr [RAX],0x2
CMOVZ RCX,RAX
JMP 0x001c0fad
LAB_001c0fab:
XOR ECX,ECX
LAB_001c0fad:
XOR EAX,EAX
TEST RCX,RCX
JZ 0x001c0fbc
TEST byte ptr [RCX + 0x1],0x8
CMOVZ RAX,RCX
LAB_001c0fbc:
ADD RSP,0x38
RET
|
/* google::protobuf::Descriptor::FindFieldByNumber(int) const */
char * __thiscall google::protobuf::Descriptor::FindFieldByNumber(Descriptor *this,int param_1)
{
long lVar1;
char *pcVar2;
char *pcVar3;
int1 *local_30;
int1 local_28 [8];
int8 local_20;
int8 uStack_18;
Descriptor *local_10;
int local_8;
if ((param_1 < 1) || ((uint)*(ushort *)(this + 2) < (uint)param_1)) {
local_30 = local_28;
local_20 = 0;
uStack_18 = 0;
local_28[0] = 0xb;
local_10 = this;
local_8 = param_1;
lVar1 = std::
unordered_set<google::protobuf::Symbol,google::protobuf::(anonymous_namespace)::FieldsByNumberHash,google::protobuf::(anonymous_namespace)::FieldsByNumberEq,std::allocator<google::protobuf::Symbol>>
::find((unordered_set<google::protobuf::Symbol,google::protobuf::(anonymous_namespace)::FieldsByNumberHash,google::protobuf::(anonymous_namespace)::FieldsByNumberEq,std::allocator<google::protobuf::Symbol>>
*)(*(long *)(*(long *)(this + 0x10) + 0x80) + 0x50),(Symbol *)&local_30);
if (lVar1 == 0) {
pcVar3 = (char *)0x0;
}
else {
pcVar3 = (char *)0x0;
if (**(char **)(lVar1 + 8) == '\x02') {
pcVar3 = *(char **)(lVar1 + 8);
}
}
}
else {
pcVar3 = (char *)(*(long *)(this + 0x28) + (ulong)(uint)param_1 * 0x48 + -0x48);
}
pcVar2 = (char *)0x0;
if ((pcVar3 != (char *)0x0) && ((pcVar3[1] & 8U) == 0)) {
pcVar2 = pcVar3;
}
return pcVar2;
}
| |
51,818 | blst_scalar_from_hexascii | corpus-core[P]colibri-stateless/build_O1/_deps/blst-src/src/exports.c | void blst_scalar_from_hexascii(pow256 ret, const char *hex)
{ bytes_from_hexascii(ret, sizeof(pow256), hex); } | O1 | c | blst_scalar_from_hexascii:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
cmpb $0x30, (%rsi)
jne 0x25e75
movzbl 0x1(%rbx), %eax
orl $0x20, %eax
cmpl $0x78, %eax
jne 0x25e75
addq $0x2, %rbx
xorl %r15d, %r15d
movsbl (%rbx,%r15), %edi
callq 0x2ab00
cmpb $0xf, %al
ja 0x25e95
incq %r15
cmpq $0x40, %r15
jne 0x25e78
movl $0x40, %r15d
xorps %xmm0, %xmm0
movups %xmm0, 0x10(%r14)
movups %xmm0, (%r14)
testq %r15, %r15
je 0x25edb
decq %r15
xorl %r12d, %r12d
shll $0x4, %r12d
movsbl (%rbx), %edi
callq 0x2ab00
movzbl %al, %eax
movzbl %r12b, %r12d
orl %eax, %r12d
testb $0x1, %r15b
jne 0x25ed2
movq %r15, %rax
shrq %rax
movb %r12b, (%r14,%rax)
incq %rbx
addq $-0x1, %r15
jb 0x25eac
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
| blst_scalar_from_hexascii:
push rbp
mov rbp, rsp
push r15
push r14
push r12
push rbx
mov rbx, rsi
mov r14, rdi
cmp byte ptr [rsi], 30h ; '0'
jnz short loc_25E75
movzx eax, byte ptr [rbx+1]
or eax, 20h
cmp eax, 78h ; 'x'
jnz short loc_25E75
add rbx, 2
loc_25E75:
xor r15d, r15d
loc_25E78:
movsx edi, byte ptr [rbx+r15]
call nibble_from_hex
cmp al, 0Fh
ja short loc_25E95
inc r15
cmp r15, 40h ; '@'
jnz short loc_25E78
mov r15d, 40h ; '@'
loc_25E95:
xorps xmm0, xmm0
movups xmmword ptr [r14+10h], xmm0
movups xmmword ptr [r14], xmm0
test r15, r15
jz short loc_25EDB
dec r15
xor r12d, r12d
loc_25EAC:
shl r12d, 4
movsx edi, byte ptr [rbx]
call nibble_from_hex
movzx eax, al
movzx r12d, r12b
or r12d, eax
test r15b, 1
jnz short loc_25ED2
mov rax, r15
shr rax, 1
mov [r14+rax], r12b
loc_25ED2:
inc rbx
add r15, 0FFFFFFFFFFFFFFFFh
jb short loc_25EAC
loc_25EDB:
pop rbx
pop r12
pop r14
pop r15
pop rbp
retn
| long long blst_scalar_from_hexascii(_OWORD *a1, char *a2)
{
char *v2; // rbx
long long v3; // r15
long long result; // rax
unsigned long long v5; // r15
char v6; // r12
v2 = a2;
if ( *a2 == 48 && ((unsigned __int8)a2[1] | 0x20) == 0x78 )
v2 = a2 + 2;
v3 = 0LL;
while ( 1 )
{
result = nibble_from_hex((unsigned int)v2[v3]);
if ( (unsigned __int8)result > 0xFu )
break;
if ( ++v3 == 64 )
{
v3 = 64LL;
break;
}
}
a1[1] = 0LL;
*a1 = 0LL;
if ( v3 )
{
v5 = v3 - 1;
v6 = 0;
do
{
result = (unsigned __int8)nibble_from_hex((unsigned int)*v2);
v6 = result | (16 * v6);
if ( (v5 & 1) == 0 )
{
result = v5 >> 1;
*((_BYTE *)a1 + (v5 >> 1)) = v6;
}
++v2;
}
while ( v5-- != 0 );
}
return result;
}
| blst_scalar_from_hexascii:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
MOV RBX,RSI
MOV R14,RDI
CMP byte ptr [RSI],0x30
JNZ 0x00125e75
MOVZX EAX,byte ptr [RBX + 0x1]
OR EAX,0x20
CMP EAX,0x78
JNZ 0x00125e75
ADD RBX,0x2
LAB_00125e75:
XOR R15D,R15D
LAB_00125e78:
MOVSX EDI,byte ptr [RBX + R15*0x1]
CALL 0x0012ab00
CMP AL,0xf
JA 0x00125e95
INC R15
CMP R15,0x40
JNZ 0x00125e78
MOV R15D,0x40
LAB_00125e95:
XORPS XMM0,XMM0
MOVUPS xmmword ptr [R14 + 0x10],XMM0
MOVUPS xmmword ptr [R14],XMM0
TEST R15,R15
JZ 0x00125edb
DEC R15
XOR R12D,R12D
LAB_00125eac:
SHL R12D,0x4
MOVSX EDI,byte ptr [RBX]
CALL 0x0012ab00
MOVZX EAX,AL
MOVZX R12D,R12B
OR R12D,EAX
TEST R15B,0x1
JNZ 0x00125ed2
MOV RAX,R15
SHR RAX,0x1
MOV byte ptr [R14 + RAX*0x1],R12B
LAB_00125ed2:
INC RBX
ADD R15,-0x1
JC 0x00125eac
LAB_00125edb:
POP RBX
POP R12
POP R14
POP R15
POP RBP
RET
|
void blst_scalar_from_hexascii(int8 *param_1,char *param_2)
{
byte bVar1;
uint uVar2;
ulong uVar3;
if ((*param_2 == '0') && ((byte)(param_2[1] | 0x20U) == 0x78)) {
param_2 = param_2 + 2;
}
uVar3 = 0;
do {
bVar1 = nibble_from_hex((int)param_2[uVar3]);
if (0xf < bVar1) goto LAB_00125e95;
uVar3 = uVar3 + 1;
} while (uVar3 != 0x40);
uVar3 = 0x40;
LAB_00125e95:
param_1[2] = 0;
param_1[3] = 0;
*param_1 = 0;
param_1[1] = 0;
if (uVar3 != 0) {
uVar2 = 0;
do {
uVar3 = uVar3 - 1;
bVar1 = nibble_from_hex((int)*param_2);
uVar2 = (uVar2 & 0xf) << 4 | (uint)bVar1;
if ((uVar3 & 1) == 0) {
*(char *)((long)param_1 + (uVar3 >> 1)) = (char)uVar2;
}
param_2 = param_2 + 1;
} while (uVar3 != 0);
}
return;
}
| |
51,819 | get_defaults_options | eloqsql/mysys/my_default.c | int get_defaults_options(char **argv)
{
static char file_buffer[FN_REFLEN];
static char extra_file_buffer[FN_REFLEN];
char **orig_argv= argv;
argv++; /* Skip program name */
my_defaults_file= my_defaults_group_suffix= my_defaults_extra_file= 0;
my_no_defaults= my_print_defaults= FALSE;
if (*argv && !strcmp(*argv, "--no-defaults"))
{
my_no_defaults= 1;
argv++;
}
else
for(; *argv; argv++)
{
if (!my_defaults_file && is_prefix(*argv, "--defaults-file="))
my_defaults_file= *argv + sizeof("--defaults-file=")-1;
else
if (!my_defaults_extra_file && is_prefix(*argv, "--defaults-extra-file="))
my_defaults_extra_file= *argv + sizeof("--defaults-extra-file=")-1;
else
if (!my_defaults_group_suffix && is_prefix(*argv, "--defaults-group-suffix="))
my_defaults_group_suffix= *argv + sizeof("--defaults-group-suffix=")-1;
else
break;
}
if (*argv && !strcmp(*argv, "--print-defaults"))
{
my_print_defaults= 1;
my_defaults_mark_files= FALSE;
argv++;
}
if (! my_defaults_group_suffix)
my_defaults_group_suffix= getenv("MYSQL_GROUP_SUFFIX");
if (my_defaults_extra_file && my_defaults_extra_file != extra_file_buffer)
{
my_realpath(extra_file_buffer, my_defaults_extra_file, MYF(0));
my_defaults_extra_file= extra_file_buffer;
}
if (my_defaults_file && my_defaults_file != file_buffer)
{
my_realpath(file_buffer, my_defaults_file, MYF(0));
my_defaults_file= file_buffer;
}
return (int)(argv - orig_argv);
} | O0 | c | get_defaults_options:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x10(%rbp)
movq -0x8(%rbp), %rax
addq $0x8, %rax
movq %rax, -0x8(%rbp)
leaq 0x3a8331(%rip), %rax # 0x44f878
movq $0x0, (%rax)
leaq 0x3a831b(%rip), %rax # 0x44f870
movq $0x0, (%rax)
leaq 0x3a8305(%rip), %rax # 0x44f868
movq $0x0, (%rax)
leaq 0x3a82f1(%rip), %rax # 0x44f862
movb $0x0, (%rax)
leaq 0x3a82e6(%rip), %rax # 0x44f861
movb $0x0, (%rax)
movq -0x8(%rbp), %rax
cmpq $0x0, (%rax)
je 0xa75bb
movq -0x8(%rbp), %rax
movq (%rax), %rdi
leaq 0x70816(%rip), %rsi # 0x117dac
callq 0x3b990
cmpl $0x0, %eax
jne 0xa75bb
leaq 0x3a82ba(%rip), %rax # 0x44f861
movb $0x1, (%rax)
movq -0x8(%rbp), %rax
addq $0x8, %rax
movq %rax, -0x8(%rbp)
jmp 0xa76a9
jmp 0xa75bd
movq -0x8(%rbp), %rax
cmpq $0x0, (%rax)
je 0xa76a7
leaq 0x3a8296(%rip), %rax # 0x44f868
cmpq $0x0, (%rax)
jne 0xa760e
movq -0x8(%rbp), %rax
movq (%rax), %rdi
leaq 0x707d4(%rip), %rsi # 0x117dba
callq 0x109330
cmpl $0x0, %eax
je 0xa760e
movq -0x8(%rbp), %rax
movq (%rax), %rcx
addq $0x11, %rcx
addq $-0x1, %rcx
leaq 0x3a8262(%rip), %rax # 0x44f868
movq %rcx, (%rax)
jmp 0xa7694
leaq 0x3a8263(%rip), %rax # 0x44f878
cmpq $0x0, (%rax)
jne 0xa764e
movq -0x8(%rbp), %rax
movq (%rax), %rdi
leaq 0x707a2(%rip), %rsi # 0x117dcb
callq 0x109330
cmpl $0x0, %eax
je 0xa764e
movq -0x8(%rbp), %rax
movq (%rax), %rcx
addq $0x17, %rcx
addq $-0x1, %rcx
leaq 0x3a822f(%rip), %rax # 0x44f878
movq %rcx, (%rax)
jmp 0xa7692
leaq 0x3a821b(%rip), %rax # 0x44f870
cmpq $0x0, (%rax)
jne 0xa768e
movq -0x8(%rbp), %rax
movq (%rax), %rdi
leaq 0x70779(%rip), %rsi # 0x117de2
callq 0x109330
cmpl $0x0, %eax
je 0xa768e
movq -0x8(%rbp), %rax
movq (%rax), %rcx
addq $0x19, %rcx
addq $-0x1, %rcx
leaq 0x3a81e7(%rip), %rax # 0x44f870
movq %rcx, (%rax)
jmp 0xa7690
jmp 0xa76a7
jmp 0xa7692
jmp 0xa7694
jmp 0xa7696
movq -0x8(%rbp), %rax
addq $0x8, %rax
movq %rax, -0x8(%rbp)
jmp 0xa75bd
jmp 0xa76a9
movq -0x8(%rbp), %rax
cmpq $0x0, (%rax)
je 0xa76eb
movq -0x8(%rbp), %rax
movq (%rax), %rdi
leaq 0x7073a(%rip), %rsi # 0x117dfb
callq 0x3b990
cmpl $0x0, %eax
jne 0xa76eb
leaq 0x3a8190(%rip), %rax # 0x44f862
movb $0x1, (%rax)
leaq 0x3a8184(%rip), %rax # 0x44f860
movb $0x0, (%rax)
movq -0x8(%rbp), %rax
addq $0x8, %rax
movq %rax, -0x8(%rbp)
leaq 0x3a817e(%rip), %rax # 0x44f870
cmpq $0x0, (%rax)
jne 0xa7711
leaq 0x7070d(%rip), %rdi # 0x117e0c
callq 0x3b8a0
movq %rax, %rcx
leaq 0x3a8162(%rip), %rax # 0x44f870
movq %rcx, (%rax)
leaq 0x3a8160(%rip), %rax # 0x44f878
cmpq $0x0, (%rax)
je 0xa775c
leaq 0x3a835b(%rip), %rcx # 0x44fa80
leaq 0x3a814c(%rip), %rax # 0x44f878
cmpq %rcx, (%rax)
je 0xa775c
leaq 0x3a8140(%rip), %rax # 0x44f878
movq (%rax), %rsi
leaq 0x3a833e(%rip), %rdi # 0x44fa80
xorl %eax, %eax
movl %eax, %edx
callq 0xbc030
leaq 0x3a8126(%rip), %rax # 0x44f878
leaq 0x3a8327(%rip), %rcx # 0x44fa80
movq %rcx, (%rax)
leaq 0x3a8105(%rip), %rax # 0x44f868
cmpq $0x0, (%rax)
je 0xa77a7
leaq 0x3a8110(%rip), %rcx # 0x44f880
leaq 0x3a80f1(%rip), %rax # 0x44f868
cmpq %rcx, (%rax)
je 0xa77a7
leaq 0x3a80e5(%rip), %rax # 0x44f868
movq (%rax), %rsi
leaq 0x3a80f3(%rip), %rdi # 0x44f880
xorl %eax, %eax
movl %eax, %edx
callq 0xbc030
leaq 0x3a80cb(%rip), %rax # 0x44f868
leaq 0x3a80dc(%rip), %rcx # 0x44f880
movq %rcx, (%rax)
movq -0x8(%rbp), %rax
movq -0x10(%rbp), %rcx
subq %rcx, %rax
sarq $0x3, %rax
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax)
| get_defaults_options:
push rbp
mov rbp, rsp
sub rsp, 10h
mov [rbp+var_8], rdi
mov rax, [rbp+var_8]
mov [rbp+var_10], rax
mov rax, [rbp+var_8]
add rax, 8
mov [rbp+var_8], rax
lea rax, my_defaults_extra_file
mov qword ptr [rax], 0
lea rax, my_defaults_group_suffix
mov qword ptr [rax], 0
lea rax, my_defaults_file
mov qword ptr [rax], 0
lea rax, my_print_defaults
mov byte ptr [rax], 0
lea rax, my_no_defaults
mov byte ptr [rax], 0
mov rax, [rbp+var_8]
cmp qword ptr [rax], 0
jz short loc_A75BB
mov rax, [rbp+var_8]
mov rdi, [rax]
lea rsi, aNoDefaults; "--no-defaults"
call _strcmp
cmp eax, 0
jnz short loc_A75BB
lea rax, my_no_defaults
mov byte ptr [rax], 1
mov rax, [rbp+var_8]
add rax, 8
mov [rbp+var_8], rax
jmp loc_A76A9
loc_A75BB:
jmp short $+2
loc_A75BD:
mov rax, [rbp+var_8]
cmp qword ptr [rax], 0
jz loc_A76A7
lea rax, my_defaults_file
cmp qword ptr [rax], 0
jnz short loc_A760E
mov rax, [rbp+var_8]
mov rdi, [rax]
lea rsi, aDefaultsFile; "--defaults-file="
call is_prefix
cmp eax, 0
jz short loc_A760E
mov rax, [rbp+var_8]
mov rcx, [rax]
add rcx, 11h
add rcx, 0FFFFFFFFFFFFFFFFh
lea rax, my_defaults_file
mov [rax], rcx
jmp loc_A7694
loc_A760E:
lea rax, my_defaults_extra_file
cmp qword ptr [rax], 0
jnz short loc_A764E
mov rax, [rbp+var_8]
mov rdi, [rax]
lea rsi, aDefaultsExtraF; "--defaults-extra-file="
call is_prefix
cmp eax, 0
jz short loc_A764E
mov rax, [rbp+var_8]
mov rcx, [rax]
add rcx, 17h
add rcx, 0FFFFFFFFFFFFFFFFh
lea rax, my_defaults_extra_file
mov [rax], rcx
jmp short loc_A7692
loc_A764E:
lea rax, my_defaults_group_suffix
cmp qword ptr [rax], 0
jnz short loc_A768E
mov rax, [rbp+var_8]
mov rdi, [rax]
lea rsi, aDefaultsGroupS; "--defaults-group-suffix="
call is_prefix
cmp eax, 0
jz short loc_A768E
mov rax, [rbp+var_8]
mov rcx, [rax]
add rcx, 19h
add rcx, 0FFFFFFFFFFFFFFFFh
lea rax, my_defaults_group_suffix
mov [rax], rcx
jmp short loc_A7690
loc_A768E:
jmp short loc_A76A7
loc_A7690:
jmp short $+2
loc_A7692:
jmp short $+2
loc_A7694:
jmp short $+2
loc_A7696:
mov rax, [rbp+var_8]
add rax, 8
mov [rbp+var_8], rax
jmp loc_A75BD
loc_A76A7:
jmp short $+2
loc_A76A9:
mov rax, [rbp+var_8]
cmp qword ptr [rax], 0
jz short loc_A76EB
mov rax, [rbp+var_8]
mov rdi, [rax]
lea rsi, aPrintDefaults; "--print-defaults"
call _strcmp
cmp eax, 0
jnz short loc_A76EB
lea rax, my_print_defaults
mov byte ptr [rax], 1
lea rax, my_defaults_mark_files
mov byte ptr [rax], 0
mov rax, [rbp+var_8]
add rax, 8
mov [rbp+var_8], rax
loc_A76EB:
lea rax, my_defaults_group_suffix
cmp qword ptr [rax], 0
jnz short loc_A7711
lea rdi, aMysqlGroupSuff; "MYSQL_GROUP_SUFFIX"
call _getenv
mov rcx, rax
lea rax, my_defaults_group_suffix
mov [rax], rcx
loc_A7711:
lea rax, my_defaults_extra_file
cmp qword ptr [rax], 0
jz short loc_A775C
lea rcx, get_defaults_options_extra_file_buffer
lea rax, my_defaults_extra_file
cmp [rax], rcx
jz short loc_A775C
lea rax, my_defaults_extra_file
mov rsi, [rax]
lea rdi, get_defaults_options_extra_file_buffer
xor eax, eax
mov edx, eax
call my_realpath
lea rax, my_defaults_extra_file
lea rcx, get_defaults_options_extra_file_buffer
mov [rax], rcx
loc_A775C:
lea rax, my_defaults_file
cmp qword ptr [rax], 0
jz short loc_A77A7
lea rcx, get_defaults_options_file_buffer
lea rax, my_defaults_file
cmp [rax], rcx
jz short loc_A77A7
lea rax, my_defaults_file
mov rsi, [rax]
lea rdi, get_defaults_options_file_buffer
xor eax, eax
mov edx, eax
call my_realpath
lea rax, my_defaults_file
lea rcx, get_defaults_options_file_buffer
mov [rax], rcx
loc_A77A7:
mov rax, [rbp+var_8]
mov rcx, [rbp+var_10]
sub rax, rcx
sar rax, 3
add rsp, 10h
pop rbp
retn
| long long get_defaults_options(long long a1)
{
_QWORD *v2; // [rsp+8h] [rbp-8h]
v2 = (_QWORD *)(a1 + 8);
my_defaults_extra_file = 0LL;
my_defaults_group_suffix = 0LL;
my_defaults_file = 0LL;
my_print_defaults = 0;
my_no_defaults = 0;
if ( *(_QWORD *)(a1 + 8) && !(unsigned int)strcmp(*v2, "--no-defaults") )
{
my_no_defaults = 1;
v2 = (_QWORD *)(a1 + 16);
}
else
{
while ( *v2 )
{
if ( my_defaults_file || !(unsigned int)is_prefix(*v2, "--defaults-file=") )
{
if ( my_defaults_extra_file || !(unsigned int)is_prefix(*v2, "--defaults-extra-file=") )
{
if ( my_defaults_group_suffix || !(unsigned int)is_prefix(*v2, "--defaults-group-suffix=") )
break;
my_defaults_group_suffix = *v2 + 24LL;
}
else
{
my_defaults_extra_file = *v2 + 22LL;
}
}
else
{
my_defaults_file = *v2 + 16LL;
}
++v2;
}
}
if ( *v2 && !(unsigned int)strcmp(*v2, "--print-defaults") )
{
my_print_defaults = 1;
my_defaults_mark_files = 0;
++v2;
}
if ( !my_defaults_group_suffix )
my_defaults_group_suffix = getenv("MYSQL_GROUP_SUFFIX");
if ( my_defaults_extra_file && (_UNKNOWN *)my_defaults_extra_file != &get_defaults_options_extra_file_buffer )
{
my_realpath(&get_defaults_options_extra_file_buffer, my_defaults_extra_file, 0LL);
my_defaults_extra_file = &get_defaults_options_extra_file_buffer;
}
if ( my_defaults_file && (_UNKNOWN *)my_defaults_file != &get_defaults_options_file_buffer )
{
my_realpath(&get_defaults_options_file_buffer, my_defaults_file, 0LL);
my_defaults_file = &get_defaults_options_file_buffer;
}
return ((long long)v2 - a1) >> 3;
}
| get_defaults_options:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x10
MOV qword ptr [RBP + -0x8],RDI
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RBP + -0x10],RAX
MOV RAX,qword ptr [RBP + -0x8]
ADD RAX,0x8
MOV qword ptr [RBP + -0x8],RAX
LEA RAX,[0x54f878]
MOV qword ptr [RAX],0x0
LEA RAX,[0x54f870]
MOV qword ptr [RAX],0x0
LEA RAX,[0x54f868]
MOV qword ptr [RAX],0x0
LEA RAX,[0x54f862]
MOV byte ptr [RAX],0x0
LEA RAX,[0x54f861]
MOV byte ptr [RAX],0x0
MOV RAX,qword ptr [RBP + -0x8]
CMP qword ptr [RAX],0x0
JZ 0x001a75bb
MOV RAX,qword ptr [RBP + -0x8]
MOV RDI,qword ptr [RAX]
LEA RSI,[0x217dac]
CALL 0x0013b990
CMP EAX,0x0
JNZ 0x001a75bb
LEA RAX,[0x54f861]
MOV byte ptr [RAX],0x1
MOV RAX,qword ptr [RBP + -0x8]
ADD RAX,0x8
MOV qword ptr [RBP + -0x8],RAX
JMP 0x001a76a9
LAB_001a75bb:
JMP 0x001a75bd
LAB_001a75bd:
MOV RAX,qword ptr [RBP + -0x8]
CMP qword ptr [RAX],0x0
JZ 0x001a76a7
LEA RAX,[0x54f868]
CMP qword ptr [RAX],0x0
JNZ 0x001a760e
MOV RAX,qword ptr [RBP + -0x8]
MOV RDI,qword ptr [RAX]
LEA RSI,[0x217dba]
CALL 0x00209330
CMP EAX,0x0
JZ 0x001a760e
MOV RAX,qword ptr [RBP + -0x8]
MOV RCX,qword ptr [RAX]
ADD RCX,0x11
ADD RCX,-0x1
LEA RAX,[0x54f868]
MOV qword ptr [RAX],RCX
JMP 0x001a7694
LAB_001a760e:
LEA RAX,[0x54f878]
CMP qword ptr [RAX],0x0
JNZ 0x001a764e
MOV RAX,qword ptr [RBP + -0x8]
MOV RDI,qword ptr [RAX]
LEA RSI,[0x217dcb]
CALL 0x00209330
CMP EAX,0x0
JZ 0x001a764e
MOV RAX,qword ptr [RBP + -0x8]
MOV RCX,qword ptr [RAX]
ADD RCX,0x17
ADD RCX,-0x1
LEA RAX,[0x54f878]
MOV qword ptr [RAX],RCX
JMP 0x001a7692
LAB_001a764e:
LEA RAX,[0x54f870]
CMP qword ptr [RAX],0x0
JNZ 0x001a768e
MOV RAX,qword ptr [RBP + -0x8]
MOV RDI,qword ptr [RAX]
LEA RSI,[0x217de2]
CALL 0x00209330
CMP EAX,0x0
JZ 0x001a768e
MOV RAX,qword ptr [RBP + -0x8]
MOV RCX,qword ptr [RAX]
ADD RCX,0x19
ADD RCX,-0x1
LEA RAX,[0x54f870]
MOV qword ptr [RAX],RCX
JMP 0x001a7690
LAB_001a768e:
JMP 0x001a76a7
LAB_001a7690:
JMP 0x001a7692
LAB_001a7692:
JMP 0x001a7694
LAB_001a7694:
JMP 0x001a7696
LAB_001a7696:
MOV RAX,qword ptr [RBP + -0x8]
ADD RAX,0x8
MOV qword ptr [RBP + -0x8],RAX
JMP 0x001a75bd
LAB_001a76a7:
JMP 0x001a76a9
LAB_001a76a9:
MOV RAX,qword ptr [RBP + -0x8]
CMP qword ptr [RAX],0x0
JZ 0x001a76eb
MOV RAX,qword ptr [RBP + -0x8]
MOV RDI,qword ptr [RAX]
LEA RSI,[0x217dfb]
CALL 0x0013b990
CMP EAX,0x0
JNZ 0x001a76eb
LEA RAX,[0x54f862]
MOV byte ptr [RAX],0x1
LEA RAX,[0x54f860]
MOV byte ptr [RAX],0x0
MOV RAX,qword ptr [RBP + -0x8]
ADD RAX,0x8
MOV qword ptr [RBP + -0x8],RAX
LAB_001a76eb:
LEA RAX,[0x54f870]
CMP qword ptr [RAX],0x0
JNZ 0x001a7711
LEA RDI,[0x217e0c]
CALL 0x0013b8a0
MOV RCX,RAX
LEA RAX,[0x54f870]
MOV qword ptr [RAX],RCX
LAB_001a7711:
LEA RAX,[0x54f878]
CMP qword ptr [RAX],0x0
JZ 0x001a775c
LEA RCX,[0x54fa80]
LEA RAX,[0x54f878]
CMP qword ptr [RAX],RCX
JZ 0x001a775c
LEA RAX,[0x54f878]
MOV RSI,qword ptr [RAX]
LEA RDI,[0x54fa80]
XOR EAX,EAX
MOV EDX,EAX
CALL 0x001bc030
LEA RAX,[0x54f878]
LEA RCX,[0x54fa80]
MOV qword ptr [RAX],RCX
LAB_001a775c:
LEA RAX,[0x54f868]
CMP qword ptr [RAX],0x0
JZ 0x001a77a7
LEA RCX,[0x54f880]
LEA RAX,[0x54f868]
CMP qword ptr [RAX],RCX
JZ 0x001a77a7
LEA RAX,[0x54f868]
MOV RSI,qword ptr [RAX]
LEA RDI,[0x54f880]
XOR EAX,EAX
MOV EDX,EAX
CALL 0x001bc030
LEA RAX,[0x54f868]
LEA RCX,[0x54f880]
MOV qword ptr [RAX],RCX
LAB_001a77a7:
MOV RAX,qword ptr [RBP + -0x8]
MOV RCX,qword ptr [RBP + -0x10]
SUB RAX,RCX
SAR RAX,0x3
ADD RSP,0x10
POP RBP
RET
|
long get_defaults_options(long param_1)
{
int iVar1;
long *local_10;
local_10 = (long *)(param_1 + 8);
my_defaults_extra_file = (int1 *)0x0;
my_defaults_group_suffix = (char *)0x0;
my_defaults_file = (int1 *)0x0;
my_print_defaults = 0;
my_no_defaults = 0;
if ((*local_10 == 0) || (iVar1 = strcmp((char *)*local_10,"--no-defaults"), iVar1 != 0)) {
for (; *local_10 != 0; local_10 = local_10 + 1) {
if ((my_defaults_file == (int1 *)0x0) &&
(iVar1 = is_prefix(*local_10,"--defaults-file="), iVar1 != 0)) {
my_defaults_file = (int1 *)(*local_10 + 0x10);
}
else if ((my_defaults_extra_file == (int1 *)0x0) &&
(iVar1 = is_prefix(*local_10,"--defaults-extra-file="), iVar1 != 0)) {
my_defaults_extra_file = (int1 *)(*local_10 + 0x16);
}
else {
if ((my_defaults_group_suffix != (char *)0x0) ||
(iVar1 = is_prefix(*local_10,"--defaults-group-suffix="), iVar1 == 0)) break;
my_defaults_group_suffix = (char *)(*local_10 + 0x18);
}
}
}
else {
my_no_defaults = 1;
local_10 = (long *)(param_1 + 0x10);
}
if ((*local_10 != 0) && (iVar1 = strcmp((char *)*local_10,"--print-defaults"), iVar1 == 0)) {
my_print_defaults = 1;
my_defaults_mark_files = 0;
local_10 = local_10 + 1;
}
if (my_defaults_group_suffix == (char *)0x0) {
my_defaults_group_suffix = getenv("MYSQL_GROUP_SUFFIX");
}
if ((my_defaults_extra_file != (int1 *)0x0) &&
(my_defaults_extra_file != get_defaults_options_extra_file_buffer)) {
my_realpath(get_defaults_options_extra_file_buffer,my_defaults_extra_file,0);
my_defaults_extra_file = get_defaults_options_extra_file_buffer;
}
if ((my_defaults_file != (int1 *)0x0) &&
(my_defaults_file != get_defaults_options_file_buffer)) {
my_realpath(get_defaults_options_file_buffer,my_defaults_file,0);
my_defaults_file = get_defaults_options_file_buffer;
}
return (long)local_10 - param_1 >> 3;
}
| |
51,820 | list_builtin_chat_templates[abi:cxx11]() | monkey531[P]llama/common/arg.cpp | static std::string list_builtin_chat_templates() {
std::vector<const char *> supported_tmpl;
int32_t res = llama_chat_builtin_templates(nullptr, 0);
supported_tmpl.resize(res);
res = llama_chat_builtin_templates(supported_tmpl.data(), supported_tmpl.size());
std::ostringstream msg;
for (auto & tmpl : supported_tmpl) {
msg << tmpl << (&tmpl == &supported_tmpl.back() ? "" : ", ");
}
return msg.str();
} | O0 | cpp | list_builtin_chat_templates[abi:cxx11]():
subq $0x218, %rsp # imm = 0x218
movq %rdi, 0x30(%rsp)
movq %rdi, %rax
movq %rax, 0x38(%rsp)
movq %rdi, 0x210(%rsp)
leaq 0x1f8(%rsp), %rdi
callq 0x10b460
xorl %eax, %eax
movl %eax, %esi
movq %rsi, %rdi
callq 0x5edb0
movl %eax, 0x44(%rsp)
jmp 0xa392b
movl 0x44(%rsp), %eax
movl %eax, 0x1f4(%rsp)
movslq 0x1f4(%rsp), %rsi
leaq 0x1f8(%rsp), %rdi
callq 0x10b470
jmp 0xa394d
leaq 0x1f8(%rsp), %rdi
movq %rdi, 0x18(%rsp)
callq 0x10b510
movq 0x18(%rsp), %rdi
movq %rax, 0x20(%rsp)
callq 0xaca90
movq 0x20(%rsp), %rdi
movq %rax, %rsi
callq 0x5edb0
movl %eax, 0x2c(%rsp)
jmp 0xa3981
movl 0x2c(%rsp), %eax
movl %eax, 0x1f4(%rsp)
leaq 0x68(%rsp), %rdi
callq 0x5f160
jmp 0xa3998
leaq 0x1f8(%rsp), %rax
movq %rax, 0x60(%rsp)
movq 0x60(%rsp), %rdi
callq 0xac9b0
movq %rax, 0x58(%rsp)
movq 0x60(%rsp), %rdi
callq 0xac9e0
movq %rax, 0x50(%rsp)
leaq 0x58(%rsp), %rdi
leaq 0x50(%rsp), %rsi
callq 0xaca10
testb $0x1, %al
jne 0xa39db
jmp 0xa3a8a
leaq 0x58(%rsp), %rdi
callq 0xaca50
movq %rax, 0x48(%rsp)
movq 0x48(%rsp), %rax
movq (%rax), %rsi
leaq 0x68(%rsp), %rdi
callq 0x5eaa0
movq %rax, 0x10(%rsp)
jmp 0xa3a03
movq 0x48(%rsp), %rax
movq %rax, 0x8(%rsp)
leaq 0x1f8(%rsp), %rdi
callq 0xacab0
movq 0x10(%rsp), %rdi
movq %rax, %rcx
movq 0x8(%rsp), %rax
subq %rcx, %rax
leaq 0x1899a1(%rip), %rax # 0x22d3d2
leaq 0x18d72a(%rip), %rsi # 0x231162
cmoveq %rax, %rsi
callq 0x5eaa0
jmp 0xa3a43
jmp 0xa3a45
leaq 0x58(%rsp), %rdi
callq 0xacaf0
jmp 0xa39c3
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x1e8(%rsp)
movl %eax, 0x1e4(%rsp)
jmp 0xa3abf
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x1e8(%rsp)
movl %eax, 0x1e4(%rsp)
leaq 0x68(%rsp), %rdi
callq 0x5f060
jmp 0xa3abf
movq 0x30(%rsp), %rdi
leaq 0x68(%rsp), %rsi
callq 0x5f4e0
jmp 0xa3a9b
leaq 0x68(%rsp), %rdi
callq 0x5f060
leaq 0x1f8(%rsp), %rdi
callq 0xbd880
movq 0x38(%rsp), %rax
addq $0x218, %rsp # imm = 0x218
retq
leaq 0x1f8(%rsp), %rdi
callq 0xbd880
movq 0x1e8(%rsp), %rdi
callq 0x5ec30
nopl (%rax)
| _ZL27list_builtin_chat_templatesB5cxx11v:
sub rsp, 218h
mov [rsp+218h+var_1E8], rdi
mov rax, rdi
mov [rsp+218h+var_1E0], rax
mov [rsp+218h+var_8], rdi
lea rdi, [rsp+218h+var_20]
call _ZNSt6vectorIPKcSaIS1_EEC2Ev; std::vector<char const*>::vector(void)
xor eax, eax
mov esi, eax
mov rdi, rsi
call _llama_chat_builtin_templates
mov [rsp+218h+var_1D4], eax
jmp short $+2
loc_A392B:
mov eax, [rsp+218h+var_1D4]
mov [rsp+218h+var_24], eax
movsxd rsi, [rsp+218h+var_24]
lea rdi, [rsp+218h+var_20]
call _ZNSt6vectorIPKcSaIS1_EE6resizeEm; std::vector<char const*>::resize(ulong)
jmp short $+2
loc_A394D:
lea rdi, [rsp+218h+var_20]
mov [rsp+218h+var_200], rdi
call _ZNSt6vectorIPKcSaIS1_EE4dataEv; std::vector<char const*>::data(void)
mov rdi, [rsp+218h+var_200]
mov [rsp+218h+var_1F8], rax
call _ZNKSt6vectorIPKcSaIS1_EE4sizeEv; std::vector<char const*>::size(void)
mov rdi, [rsp+218h+var_1F8]
mov rsi, rax
call _llama_chat_builtin_templates
mov [rsp+218h+var_1EC], eax
jmp short $+2
loc_A3981:
mov eax, [rsp+218h+var_1EC]
mov [rsp+218h+var_24], eax
lea rdi, [rsp+218h+var_1B0]
call __ZNSt7__cxx1119basic_ostringstreamIcSt11char_traitsIcESaIcEEC1Ev; std::ostringstream::basic_ostringstream(void)
jmp short $+2
loc_A3998:
lea rax, [rsp+218h+var_20]
mov [rsp+218h+var_1B8], rax
mov rdi, [rsp+218h+var_1B8]
call _ZNSt6vectorIPKcSaIS1_EE5beginEv; std::vector<char const*>::begin(void)
mov [rsp+218h+var_1C0], rax
mov rdi, [rsp+218h+var_1B8]
call _ZNSt6vectorIPKcSaIS1_EE3endEv; std::vector<char const*>::end(void)
mov [rsp+218h+var_1C8], rax
loc_A39C3:
lea rdi, [rsp+218h+var_1C0]
lea rsi, [rsp+218h+var_1C8]
call _ZN9__gnu_cxxneIPPKcSt6vectorIS2_SaIS2_EEEEbRKNS_17__normal_iteratorIT_T0_EESC_; __gnu_cxx::operator!=<char const**,std::vector<char const*>>(__gnu_cxx::__normal_iterator<char const**,std::vector<char const*>> const&,__gnu_cxx::__normal_iterator<char const**,std::vector<char const*>> const&)
test al, 1
jnz short loc_A39DB
jmp loc_A3A8A
loc_A39DB:
lea rdi, [rsp+218h+var_1C0]
call _ZNK9__gnu_cxx17__normal_iteratorIPPKcSt6vectorIS2_SaIS2_EEEdeEv; __gnu_cxx::__normal_iterator<char const**,std::vector<char const*>>::operator*(void)
mov [rsp+218h+var_1D0], rax
mov rax, [rsp+218h+var_1D0]
mov rsi, [rax]
lea rdi, [rsp+218h+var_1B0]
call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*)
mov [rsp+218h+var_208], rax
jmp short $+2
loc_A3A03:
mov rax, [rsp+218h+var_1D0]
mov [rsp+218h+var_210], rax
lea rdi, [rsp+218h+var_20]
call _ZNSt6vectorIPKcSaIS1_EE4backEv; std::vector<char const*>::back(void)
mov rdi, [rsp+218h+var_208]
mov rcx, rax
mov rax, [rsp+218h+var_210]
sub rax, rcx
lea rax, aExampleSpecifi+27h; ""
lea rsi, aZuD+6; ", "
cmovz rsi, rax
call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*)
jmp short $+2
loc_A3A43:
jmp short $+2
loc_A3A45:
lea rdi, [rsp+218h+var_1C0]
call _ZN9__gnu_cxx17__normal_iteratorIPPKcSt6vectorIS2_SaIS2_EEEppEv; __gnu_cxx::__normal_iterator<char const**,std::vector<char const*>>::operator++(void)
jmp loc_A39C3
mov rcx, rax
mov eax, edx
mov [rsp+arg_1E0], rcx
mov [rsp+arg_1DC], eax
jmp short loc_A3ABF
mov rcx, rax
mov eax, edx
mov [rsp+arg_1E0], rcx
mov [rsp+arg_1DC], eax
lea rdi, [rsp+arg_60]
call __ZNSt7__cxx1119basic_ostringstreamIcSt11char_traitsIcESaIcEED1Ev; std::ostringstream::~ostringstream()
jmp short loc_A3ABF
loc_A3A8A:
mov rdi, [rsp+218h+var_1E8]
lea rsi, [rsp+218h+var_1B0]
call __ZNKSt7__cxx1119basic_ostringstreamIcSt11char_traitsIcESaIcEE3strEv; std::ostringstream::str(void)
jmp short $+2
loc_A3A9B:
lea rdi, [rsp+218h+var_1B0]
call __ZNSt7__cxx1119basic_ostringstreamIcSt11char_traitsIcESaIcEED1Ev; std::ostringstream::~ostringstream()
lea rdi, [rsp+218h+var_20]; void *
call _ZNSt6vectorIPKcSaIS1_EED2Ev; std::vector<char const*>::~vector()
mov rax, [rsp+218h+var_1E0]
add rsp, 218h
retn
loc_A3ABF:
lea rdi, [rsp+arg_1F0]; void *
call _ZNSt6vectorIPKcSaIS1_EED2Ev; std::vector<char const*>::~vector()
mov rdi, [rsp+arg_1E0]
call __Unwind_Resume
| long long list_builtin_chat_templates[abi:cxx11](long long a1)
{
long long v1; // rdi
char *v2; // rsi
long long v4; // [rsp+20h] [rbp-1F8h]
int v7; // [rsp+44h] [rbp-1D4h]
_QWORD *v8; // [rsp+48h] [rbp-1D0h]
long long v9; // [rsp+50h] [rbp-1C8h] BYREF
_QWORD v10[2]; // [rsp+58h] [rbp-1C0h] BYREF
_BYTE v11[396]; // [rsp+68h] [rbp-1B0h] BYREF
int v12; // [rsp+1F4h] [rbp-24h]
_BYTE v13[24]; // [rsp+1F8h] [rbp-20h] BYREF
long long v14; // [rsp+210h] [rbp-8h]
v14 = a1;
std::vector<char const*>::vector(v13);
v7 = llama_chat_builtin_templates(0LL);
std::vector<char const*>::resize(v13, v7);
v4 = std::vector<char const*>::data();
std::vector<char const*>::size(v13);
v12 = llama_chat_builtin_templates(v4);
std::ostringstream::basic_ostringstream(v11);
v10[1] = v13;
v10[0] = std::vector<char const*>::begin(v13);
v9 = std::vector<char const*>::end(v13);
while ( (__gnu_cxx::operator!=<char const**,std::vector<char const*>>(v10, &v9) & 1) != 0 )
{
v8 = (_QWORD *)__gnu_cxx::__normal_iterator<char const**,std::vector<char const*>>::operator*(v10);
v1 = std::operator<<<std::char_traits<char>>(v11, *v8);
v2 = ", ";
if ( v8 == (_QWORD *)std::vector<char const*>::back(v13) )
v2 = "";
std::operator<<<std::char_traits<char>>(v1, v2);
__gnu_cxx::__normal_iterator<char const**,std::vector<char const*>>::operator++(v10);
}
std::ostringstream::str(a1, v11);
std::ostringstream::~ostringstream(v11);
std::vector<char const*>::~vector(v13);
return a1;
}
| list_builtin_chat_templates[abi:cxx11]:
SUB RSP,0x218
MOV qword ptr [RSP + 0x30],RDI
MOV RAX,RDI
MOV qword ptr [RSP + 0x38],RAX
MOV qword ptr [RSP + 0x210],RDI
LEA RDI,[RSP + 0x1f8]
CALL 0x0020b460
LAB_001a3919:
XOR EAX,EAX
MOV ESI,EAX
MOV RDI,RSI
CALL 0x0015edb0
MOV dword ptr [RSP + 0x44],EAX
JMP 0x001a392b
LAB_001a392b:
MOV EAX,dword ptr [RSP + 0x44]
MOV dword ptr [RSP + 0x1f4],EAX
MOVSXD RSI,dword ptr [RSP + 0x1f4]
LEA RDI,[RSP + 0x1f8]
CALL 0x0020b470
JMP 0x001a394d
LAB_001a394d:
LEA RDI,[RSP + 0x1f8]
MOV qword ptr [RSP + 0x18],RDI
CALL 0x0020b510
MOV RDI,qword ptr [RSP + 0x18]
MOV qword ptr [RSP + 0x20],RAX
CALL 0x001aca90
MOV RDI,qword ptr [RSP + 0x20]
MOV RSI,RAX
CALL 0x0015edb0
MOV dword ptr [RSP + 0x2c],EAX
JMP 0x001a3981
LAB_001a3981:
MOV EAX,dword ptr [RSP + 0x2c]
MOV dword ptr [RSP + 0x1f4],EAX
LEA RDI,[RSP + 0x68]
CALL 0x0015f160
JMP 0x001a3998
LAB_001a3998:
LEA RAX,[RSP + 0x1f8]
MOV qword ptr [RSP + 0x60],RAX
MOV RDI,qword ptr [RSP + 0x60]
CALL 0x001ac9b0
MOV qword ptr [RSP + 0x58],RAX
MOV RDI,qword ptr [RSP + 0x60]
CALL 0x001ac9e0
MOV qword ptr [RSP + 0x50],RAX
LAB_001a39c3:
LEA RDI,[RSP + 0x58]
LEA RSI,[RSP + 0x50]
CALL 0x001aca10
TEST AL,0x1
JNZ 0x001a39db
JMP 0x001a3a8a
LAB_001a39db:
LEA RDI,[RSP + 0x58]
CALL 0x001aca50
MOV qword ptr [RSP + 0x48],RAX
MOV RAX,qword ptr [RSP + 0x48]
MOV RSI,qword ptr [RAX]
LAB_001a39f2:
LEA RDI,[RSP + 0x68]
CALL 0x0015eaa0
MOV qword ptr [RSP + 0x10],RAX
JMP 0x001a3a03
LAB_001a3a03:
MOV RAX,qword ptr [RSP + 0x48]
MOV qword ptr [RSP + 0x8],RAX
LEA RDI,[RSP + 0x1f8]
CALL 0x001acab0
MOV RDI,qword ptr [RSP + 0x10]
MOV RCX,RAX
MOV RAX,qword ptr [RSP + 0x8]
SUB RAX,RCX
LEA RAX,[0x32d3d2]
LEA RSI,[0x331162]
CMOVZ RSI,RAX
CALL 0x0015eaa0
JMP 0x001a3a43
LAB_001a3a43:
JMP 0x001a3a45
LAB_001a3a45:
LEA RDI,[RSP + 0x58]
CALL 0x001acaf0
JMP 0x001a39c3
LAB_001a3a8a:
MOV RDI,qword ptr [RSP + 0x30]
LEA RSI,[RSP + 0x68]
CALL 0x0015f4e0
LAB_001a3a99:
JMP 0x001a3a9b
LAB_001a3a9b:
LEA RDI,[RSP + 0x68]
CALL 0x0015f060
LEA RDI,[RSP + 0x1f8]
CALL 0x001bd880
MOV RAX,qword ptr [RSP + 0x38]
ADD RSP,0x218
RET
|
/* WARNING: Unknown calling convention -- yet parameter storage is locked */
/* list_builtin_chat_templates[abi:cxx11]() */
int8 list_builtin_chat_templates_abi_cxx11_(void)
{
bool bVar1;
int8 uVar2;
int8 uVar3;
int8 *puVar4;
ostream *poVar5;
int8 *puVar6;
char *pcVar7;
int8 in_RDI;
int8 local_1c8;
int8 local_1c0;
vector<char_const*,std::allocator<char_const*>> *local_1b8;
ostringstream local_1b0 [396];
int local_24;
vector<char_const*,std::allocator<char_const*>> local_20 [32];
std::vector<char_const*,std::allocator<char_const*>>::vector(local_20);
/* try { // try from 001a3919 to 001a3995 has its CatchHandler @ 001a3a54 */
local_24 = llama_chat_builtin_templates(0);
std::vector<char_const*,std::allocator<char_const*>>::resize(local_20,(long)local_24);
uVar2 = std::vector<char_const*,std::allocator<char_const*>>::data(local_20);
uVar3 = std::vector<char_const*,std::allocator<char_const*>>::size(local_20);
local_24 = llama_chat_builtin_templates(uVar2,uVar3);
std::__cxx11::ostringstream::ostringstream(local_1b0);
local_1b8 = local_20;
local_1c0 = std::vector<char_const*,std::allocator<char_const*>>::begin(local_1b8);
local_1c8 = std::vector<char_const*,std::allocator<char_const*>>::end(local_1b8);
while( true ) {
bVar1 = __gnu_cxx::operator!=((__normal_iterator *)&local_1c0,(__normal_iterator *)&local_1c8);
if (!bVar1) break;
puVar4 = (int8 *)
__gnu_cxx::
__normal_iterator<char_const**,std::vector<char_const*,std::allocator<char_const*>>>::
operator*((__normal_iterator<char_const**,std::vector<char_const*,std::allocator<char_const*>>>
*)&local_1c0);
/* try { // try from 001a39f2 to 001a3a98 has its CatchHandler @ 001a3a6a */
poVar5 = std::operator<<((ostream *)local_1b0,(char *)*puVar4);
puVar6 = (int8 *)std::vector<char_const*,std::allocator<char_const*>>::back(local_20);
pcVar7 = ", ";
if (puVar4 == puVar6) {
pcVar7 = "";
}
std::operator<<(poVar5,pcVar7);
__gnu_cxx::__normal_iterator<char_const**,std::vector<char_const*,std::allocator<char_const*>>>
::operator++((__normal_iterator<char_const**,std::vector<char_const*,std::allocator<char_const*>>>
*)&local_1c0);
}
std::__cxx11::ostringstream::str();
std::__cxx11::ostringstream::~ostringstream(local_1b0);
std::vector<char_const*,std::allocator<char_const*>>::~vector(local_20);
return in_RDI;
}
| |
51,821 | list_builtin_chat_templates[abi:cxx11]() | monkey531[P]llama/common/arg.cpp | static std::string list_builtin_chat_templates() {
std::vector<const char *> supported_tmpl;
int32_t res = llama_chat_builtin_templates(nullptr, 0);
supported_tmpl.resize(res);
res = llama_chat_builtin_templates(supported_tmpl.data(), supported_tmpl.size());
std::ostringstream msg;
for (auto & tmpl : supported_tmpl) {
msg << tmpl << (&tmpl == &supported_tmpl.back() ? "" : ", ");
}
return msg.str();
} | O2 | cpp | list_builtin_chat_templates[abi:cxx11]():
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x198, %rsp # imm = 0x198
movq %rdi, %rbx
xorps %xmm0, %xmm0
movaps %xmm0, (%rsp)
andq $0x0, 0x10(%rsp)
xorl %edi, %edi
xorl %esi, %esi
callq 0x24200
movslq %eax, %rsi
movq %rsp, %rdi
callq 0x5e928
movq (%rsp), %rdi
movq 0x8(%rsp), %rsi
subq %rdi, %rsi
sarq $0x3, %rsi
callq 0x24200
leaq 0x20(%rsp), %rdi
callq 0x24be0
movq (%rsp), %r15
movq 0x8(%rsp), %r12
leaq 0x20(%rsp), %r14
leaq 0x7a82e(%rip), %r13 # 0xbbc4f
leaq 0x7e32f(%rip), %rbp # 0xbf757
cmpq %r12, %r15
je 0x41459
movq (%r15), %rsi
movq %r14, %rdi
callq 0x248c0
movq 0x8(%rsp), %rcx
addq $-0x8, %rcx
cmpq %rcx, %r15
movq %rbp, %rsi
cmoveq %r13, %rsi
movq %rax, %rdi
callq 0x248c0
addq $0x8, %r15
jmp 0x41428
leaq 0x28(%rsp), %rsi
movq %rbx, %rdi
callq 0x24e10
leaq 0x20(%rsp), %rdi
callq 0x241f0
movq %rsp, %rdi
callq 0x48888
movq %rbx, %rax
addq $0x198, %rsp # imm = 0x198
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x41496
jmp 0x41491
movq %rax, %rbx
jmp 0x414a3
movq %rax, %rbx
leaq 0x20(%rsp), %rdi
callq 0x241f0
movq %rsp, %rdi
callq 0x48888
movq %rbx, %rdi
callq 0x25010
nop
| _ZL27list_builtin_chat_templatesB5cxx11v:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 198h
mov rbx, rdi
xorps xmm0, xmm0
movaps [rsp+1C8h+var_1C8], xmm0
and [rsp+1C8h+var_1B8], 0
xor edi, edi
xor esi, esi
call _llama_chat_builtin_templates
movsxd rsi, eax
mov rdi, rsp
call _ZNSt6vectorIPKcSaIS1_EE6resizeEm; std::vector<char const*>::resize(ulong)
mov rdi, qword ptr [rsp+1C8h+var_1C8]
mov rsi, qword ptr [rsp+1C8h+var_1C8+8]
sub rsi, rdi
sar rsi, 3
call _llama_chat_builtin_templates
lea rdi, [rsp+1C8h+var_1A8]
call __ZNSt7__cxx1119basic_ostringstreamIcSt11char_traitsIcESaIcEEC1Ev; std::ostringstream::basic_ostringstream(void)
mov r15, qword ptr [rsp+1C8h+var_1C8]
mov r12, qword ptr [rsp+1C8h+var_1C8+8]
lea r14, [rsp+1C8h+var_1A8]
lea r13, aErrorWhileHand_0+34h; ""
lea rbp, aZuD+6; ", "
loc_41428:
cmp r15, r12
jz short loc_41459
mov rsi, [r15]
mov rdi, r14
call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*)
mov rcx, qword ptr [rsp+1C8h+var_1C8+8]
add rcx, 0FFFFFFFFFFFFFFF8h
cmp r15, rcx
mov rsi, rbp
cmovz rsi, r13
mov rdi, rax
call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*)
add r15, 8
jmp short loc_41428
loc_41459:
lea rsi, [rsp+1C8h+var_1A0]
mov rdi, rbx
call __ZNKSt7__cxx1115basic_stringbufIcSt11char_traitsIcESaIcEE3strEv; std::stringbuf::str(void)
lea rdi, [rsp+1C8h+var_1A8]
call __ZNSt7__cxx1119basic_ostringstreamIcSt11char_traitsIcESaIcEED1Ev; std::ostringstream::~ostringstream()
mov rdi, rsp
call _ZNSt12_Vector_baseIPKcSaIS1_EED2Ev; std::_Vector_base<char const*>::~_Vector_base()
mov rax, rbx
add rsp, 198h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
jmp short loc_41496
jmp short $+2
loc_41491:
mov rbx, rax
jmp short loc_414A3
loc_41496:
mov rbx, rax
lea rdi, [rsp+arg_18]
call __ZNSt7__cxx1119basic_ostringstreamIcSt11char_traitsIcESaIcEED1Ev; std::ostringstream::~ostringstream()
loc_414A3:
mov rdi, rsp
call _ZNSt12_Vector_baseIPKcSaIS1_EED2Ev; std::_Vector_base<char const*>::~_Vector_base()
mov rdi, rbx
call __Unwind_Resume
| long long list_builtin_chat_templates[abi:cxx11](long long a1)
{
int v1; // eax
_QWORD *v2; // r12
_QWORD *i; // r15
long long v4; // rax
char *v5; // rsi
__int128 v7; // [rsp+0h] [rbp-1C8h] BYREF
long long v8; // [rsp+10h] [rbp-1B8h]
_BYTE v9[8]; // [rsp+20h] [rbp-1A8h] BYREF
_BYTE v10[416]; // [rsp+28h] [rbp-1A0h] BYREF
v7 = 0LL;
v8 = 0LL;
v1 = llama_chat_builtin_templates(0LL, 0LL);
std::vector<char const*>::resize(&v7, v1);
llama_chat_builtin_templates(v7, (long long)(*((_QWORD *)&v7 + 1) - v7) >> 3);
std::ostringstream::basic_ostringstream(v9);
v2 = (_QWORD *)*((_QWORD *)&v7 + 1);
for ( i = (_QWORD *)v7; i != v2; ++i )
{
v4 = std::operator<<<std::char_traits<char>>(v9, *i);
v5 = ", ";
if ( i == (_QWORD *)(*((_QWORD *)&v7 + 1) - 8LL) )
v5 = "";
std::operator<<<std::char_traits<char>>(v4, v5);
}
std::stringbuf::str(a1, v10);
std::ostringstream::~ostringstream(v9);
std::_Vector_base<char const*>::~_Vector_base(&v7);
return a1;
}
| list_builtin_chat_templates[abi:cxx11]:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x198
MOV RBX,RDI
XORPS XMM0,XMM0
MOVAPS xmmword ptr [RSP],XMM0
AND qword ptr [RSP + 0x10],0x0
LAB_001413d9:
XOR EDI,EDI
XOR ESI,ESI
CALL 0x00124200
MOVSXD RSI,EAX
MOV RDI,RSP
CALL 0x0015e928
MOV RDI,qword ptr [RSP]
MOV RSI,qword ptr [RSP + 0x8]
SUB RSI,RDI
SAR RSI,0x3
CALL 0x00124200
LAB_00141402:
LEA RDI,[RSP + 0x20]
CALL 0x00124be0
MOV R15,qword ptr [RSP]
MOV R12,qword ptr [RSP + 0x8]
LEA R14,[RSP + 0x20]
LEA R13,[0x1bbc4f]
LEA RBP,[0x1bf757]
LAB_00141428:
CMP R15,R12
JZ 0x00141459
MOV RSI,qword ptr [R15]
LAB_00141430:
MOV RDI,R14
CALL 0x001248c0
MOV RCX,qword ptr [RSP + 0x8]
ADD RCX,-0x8
CMP R15,RCX
MOV RSI,RBP
CMOVZ RSI,R13
MOV RDI,RAX
CALL 0x001248c0
ADD R15,0x8
JMP 0x00141428
LAB_00141459:
LEA RSI,[RSP + 0x28]
LAB_0014145e:
MOV RDI,RBX
CALL 0x00124e10
LAB_00141466:
LEA RDI,[RSP + 0x20]
CALL 0x001241f0
MOV RDI,RSP
CALL 0x00148888
MOV RAX,RBX
ADD RSP,0x198
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
/* WARNING: Unknown calling convention -- yet parameter storage is locked */
/* list_builtin_chat_templates[abi:cxx11]() */
void list_builtin_chat_templates_abi_cxx11_(void)
{
int8 *puVar1;
int iVar2;
ostream *poVar3;
char *pcVar4;
int8 *puVar5;
int8 *local_1c8;
int8 *puStack_1c0;
int8 local_1b8;
ostringstream local_1a8 [376];
local_1c8 = (int8 *)0x0;
puStack_1c0 = (int8 *)0x0;
local_1b8 = 0;
/* try { // try from 001413d9 to 00141401 has its CatchHandler @ 00141491 */
iVar2 = llama_chat_builtin_templates(0,0);
std::vector<char_const*,std::allocator<char_const*>>::resize
((vector<char_const*,std::allocator<char_const*>> *)&local_1c8,(long)iVar2);
llama_chat_builtin_templates(local_1c8,(long)puStack_1c0 - (long)local_1c8 >> 3);
/* try { // try from 00141402 to 0014140b has its CatchHandler @ 0014148f */
std::__cxx11::ostringstream::ostringstream(local_1a8);
puVar1 = puStack_1c0;
for (puVar5 = local_1c8; puVar5 != puVar1; puVar5 = puVar5 + 1) {
/* try { // try from 00141430 to 00141452 has its CatchHandler @ 00141496 */
poVar3 = std::operator<<((ostream *)local_1a8,(char *)*puVar5);
pcVar4 = ", ";
if (puVar5 == puStack_1c0 + -1) {
pcVar4 = "";
}
std::operator<<(poVar3,pcVar4);
}
/* try { // try from 0014145e to 00141465 has its CatchHandler @ 0014148d */
std::__cxx11::stringbuf::str();
std::__cxx11::ostringstream::~ostringstream(local_1a8);
std::_Vector_base<char_const*,std::allocator<char_const*>>::~_Vector_base
((_Vector_base<char_const*,std::allocator<char_const*>> *)&local_1c8);
return;
}
| |
51,822 | list_builtin_chat_templates[abi:cxx11]() | monkey531[P]llama/common/arg.cpp | static std::string list_builtin_chat_templates() {
std::vector<const char *> supported_tmpl;
int32_t res = llama_chat_builtin_templates(nullptr, 0);
supported_tmpl.resize(res);
res = llama_chat_builtin_templates(supported_tmpl.data(), supported_tmpl.size());
std::ostringstream msg;
for (auto & tmpl : supported_tmpl) {
msg << tmpl << (&tmpl == &supported_tmpl.back() ? "" : ", ");
}
return msg.str();
} | O3 | cpp | list_builtin_chat_templates[abi:cxx11]():
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x198, %rsp # imm = 0x198
movq %rdi, %rbx
xorps %xmm0, %xmm0
movaps %xmm0, (%rsp)
movq $0x0, 0x10(%rsp)
xorl %edi, %edi
xorl %esi, %esi
callq 0x1b1e0
movslq %eax, %rsi
movq %rsp, %rdi
callq 0x7ebcc
movq (%rsp), %rdi
movq 0x8(%rsp), %rsi
subq %rdi, %rsi
sarq $0x3, %rsi
callq 0x1b1e0
movq %rbx, 0x18(%rsp)
leaq 0x20(%rsp), %rdi
callq 0x1bbd0
movq (%rsp), %r12
movq 0x8(%rsp), %r13
cmpq %r13, %r12
je 0x5c518
leaq 0x9d7f8(%rip), %rbp # 0xf9c9c
leaq 0xa12fc(%rip), %rbx # 0xfd7a7
leaq 0x20(%rsp), %r14
movq (%r12), %r15
testq %r15, %r15
je 0x5c4d1
movq %r15, %rdi
callq 0x1b3f0
movq %r14, %rdi
movq %r15, %rsi
movq %rax, %rdx
callq 0x1ba10
jmp 0x5c4ed
movq 0x20(%rsp), %rax
movq -0x18(%rax), %rax
leaq (%rsp,%rax), %rdi
addq $0x20, %rdi
movl 0x20(%rdi), %esi
orl $0x1, %esi
callq 0x1bf60
movq 0x8(%rsp), %rax
addq $-0x8, %rax
xorl %edx, %edx
cmpq %rax, %r12
setne %dl
movq %rbx, %rsi
cmoveq %rbp, %rsi
addl %edx, %edx
movq %r14, %rdi
callq 0x1ba10
addq $0x8, %r12
cmpq %r13, %r12
jne 0x5c4b0
leaq 0x28(%rsp), %rsi
movq 0x18(%rsp), %rdi
callq 0x1be10
movq 0xdea42(%rip), %rsi # 0x13af70
leaq 0x20(%rsp), %rdi
callq 0x1b4b0
leaq 0x90(%rsp), %rdi
callq 0x1b2c0
movq (%rsp), %rdi
testq %rdi, %rdi
je 0x5c55b
movq 0x10(%rsp), %rsi
subq %rdi, %rsi
callq 0x1b8f0
addq $0x198, %rsp # imm = 0x198
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x5c576
jmp 0x5c571
movq %rax, %rbx
jmp 0x5c597
movq %rax, %rbx
movq 0xde9f0(%rip), %rsi # 0x13af70
leaq 0x20(%rsp), %rdi
callq 0x1b4b0
leaq 0x90(%rsp), %rdi
callq 0x1b2c0
movq (%rsp), %rdi
testq %rdi, %rdi
je 0x5c5ad
movq 0x10(%rsp), %rsi
subq %rdi, %rsi
callq 0x1b8f0
movq %rbx, %rdi
callq 0x1c020
| _ZL27list_builtin_chat_templatesB5cxx11v:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 198h
mov rbx, rdi
xorps xmm0, xmm0
movaps xmmword ptr [rsp+1C8h+var_1C8], xmm0
mov [rsp+1C8h+var_1B8], 0
xor edi, edi
xor esi, esi
call _llama_chat_builtin_templates
movsxd rsi, eax
mov rdi, rsp
call _ZNSt6vectorIPKcSaIS1_EE6resizeEm; std::vector<char const*>::resize(ulong)
mov rdi, [rsp+1C8h+var_1C8]
mov rsi, [rsp+1C8h+var_1C8+8]
sub rsi, rdi
sar rsi, 3
call _llama_chat_builtin_templates
mov [rsp+1C8h+var_1B0], rbx
lea rdi, [rsp+1C8h+var_1A8]
call __ZNSt7__cxx1119basic_ostringstreamIcSt11char_traitsIcESaIcEEC1Ev; std::ostringstream::basic_ostringstream(void)
mov r12, [rsp+1C8h+var_1C8]
mov r13, [rsp+1C8h+var_1C8+8]
cmp r12, r13
jz short loc_5C518
lea rbp, aErrorWhileHand_0+34h; ""
lea rbx, aZuD+6; ", "
lea r14, [rsp+1C8h+var_1A8]
loc_5C4B0:
mov r15, [r12]
test r15, r15
jz short loc_5C4D1
mov rdi, r15
call _strlen
mov rdi, r14
mov rsi, r15
mov rdx, rax
call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long)
jmp short loc_5C4ED
loc_5C4D1:
mov rax, [rsp+1C8h+var_1A8]
mov rax, [rax-18h]
lea rdi, [rsp+rax+1C8h+var_1C8]
add rdi, 20h ; ' '
mov esi, [rdi+20h]
or esi, 1
call __ZNSt9basic_iosIcSt11char_traitsIcEE5clearESt12_Ios_Iostate; std::ios::clear(std::_Ios_Iostate)
loc_5C4ED:
mov rax, [rsp+1C8h+var_1C8+8]
add rax, 0FFFFFFFFFFFFFFF8h
xor edx, edx
cmp r12, rax
setnz dl
mov rsi, rbx
cmovz rsi, rbp
add edx, edx
mov rdi, r14
call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long)
add r12, 8
cmp r12, r13
jnz short loc_5C4B0
loc_5C518:
lea rsi, [rsp+1C8h+var_1A0]
mov rdi, [rsp+1C8h+var_1B0]
call __ZNKSt7__cxx1115basic_stringbufIcSt11char_traitsIcESaIcEE3strEv; std::stringbuf::str(void)
mov rsi, cs:_ZTTNSt7__cxx1119basic_ostringstreamIcSt11char_traitsIcESaIcEEE_ptr
lea rdi, [rsp+1C8h+var_1A8]
call __ZNSt7__cxx1119basic_ostringstreamIcSt11char_traitsIcESaIcEED2Ev; std::ostringstream::~ostringstream()
lea rdi, [rsp+1C8h+var_138]; this
call __ZNSt8ios_baseD2Ev; std::ios_base::~ios_base()
mov rdi, [rsp+1C8h+var_1C8]; void *
test rdi, rdi
jz short loc_5C55B
mov rsi, [rsp+1C8h+var_1B8]
sub rsi, rdi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_5C55B:
add rsp, 198h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
jmp short loc_5C576
jmp short $+2
loc_5C571:
mov rbx, rax
jmp short loc_5C597
loc_5C576:
mov rbx, rax
mov rsi, cs:_ZTTNSt7__cxx1119basic_ostringstreamIcSt11char_traitsIcESaIcEEE_ptr
lea rdi, [rsp+arg_18]
call __ZNSt7__cxx1119basic_ostringstreamIcSt11char_traitsIcESaIcEED2Ev; std::ostringstream::~ostringstream()
lea rdi, [rsp+arg_88]; this
call __ZNSt8ios_baseD2Ev; std::ios_base::~ios_base()
loc_5C597:
mov rdi, [rsp+0]; void *
test rdi, rdi
jz short loc_5C5AD
mov rsi, [rsp+arg_8]
sub rsi, rdi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_5C5AD:
mov rdi, rbx
call __Unwind_Resume
| void list_builtin_chat_templates[abi:cxx11](long long a1)
{
int v1; // eax
_QWORD *v2; // r12
_QWORD *i; // r13
long long v4; // r15
long long v5; // rax
char *v6; // rsi
void *v7[2]; // [rsp+0h] [rbp-1C8h] BYREF
long long v8; // [rsp+10h] [rbp-1B8h]
long long v9; // [rsp+18h] [rbp-1B0h]
long long v10; // [rsp+20h] [rbp-1A8h] BYREF
_BYTE v11[104]; // [rsp+28h] [rbp-1A0h] BYREF
_BYTE v12[312]; // [rsp+90h] [rbp-138h] BYREF
*(_OWORD *)v7 = 0LL;
v8 = 0LL;
v1 = llama_chat_builtin_templates(0LL, 0LL);
std::vector<char const*>::resize(v7, v1);
llama_chat_builtin_templates(v7[0], ((char *)v7[1] - (char *)v7[0]) >> 3);
v9 = a1;
std::ostringstream::basic_ostringstream(&v10);
v2 = v7[0];
for ( i = v7[1]; v2 != i; ++v2 )
{
v4 = *v2;
if ( *v2 )
{
v5 = strlen(*v2);
std::__ostream_insert<char,std::char_traits<char>>(&v10, v4, v5);
}
else
{
std::ios::clear(&v11[*(_QWORD *)(v10 - 24) - 8], *(_DWORD *)&v11[*(_QWORD *)(v10 - 24) + 24] | 1u);
}
v6 = ", ";
if ( v2 == (_QWORD *)((char *)v7[1] - 8) )
v6 = "";
std::__ostream_insert<char,std::char_traits<char>>(
&v10,
v6,
2 * (unsigned int)(v2 != (_QWORD *)((char *)v7[1] - 8)));
}
std::stringbuf::str(v9, v11);
std::ostringstream::~ostringstream(&v10, &`VTT for'std::ostringstream);
std::ios_base::~ios_base((std::ios_base *)v12);
if ( v7[0] )
operator delete(v7[0], v8 - (unsigned long long)v7[0]);
}
| list_builtin_chat_templates[abi:cxx11]:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x198
MOV RBX,RDI
XORPS XMM0,XMM0
MOVAPS xmmword ptr [RSP],XMM0
MOV qword ptr [RSP + 0x10],0x0
LAB_0015c457:
XOR EDI,EDI
XOR ESI,ESI
CALL 0x0011b1e0
MOVSXD RSI,EAX
MOV RDI,RSP
CALL 0x0017ebcc
MOV RDI,qword ptr [RSP]
MOV RSI,qword ptr [RSP + 0x8]
SUB RSI,RDI
SAR RSI,0x3
CALL 0x0011b1e0
LAB_0015c480:
MOV qword ptr [RSP + 0x18],RBX
LEA RDI,[RSP + 0x20]
CALL 0x0011bbd0
MOV R12,qword ptr [RSP]
MOV R13,qword ptr [RSP + 0x8]
CMP R12,R13
JZ 0x0015c518
LEA RBP,[0x1f9c9c]
LEA RBX,[0x1fd7a7]
LEA R14,[RSP + 0x20]
LAB_0015c4b0:
MOV R15,qword ptr [R12]
TEST R15,R15
JZ 0x0015c4d1
MOV RDI,R15
CALL 0x0011b3f0
LAB_0015c4c1:
MOV RDI,R14
MOV RSI,R15
MOV RDX,RAX
CALL 0x0011ba10
JMP 0x0015c4ed
LAB_0015c4d1:
MOV RAX,qword ptr [RSP + 0x20]
MOV RAX,qword ptr [RAX + -0x18]
LEA RDI,[RSP + RAX*0x1]
ADD RDI,0x20
MOV ESI,dword ptr [RDI + 0x20]
OR ESI,0x1
CALL 0x0011bf60
LAB_0015c4ed:
MOV RAX,qword ptr [RSP + 0x8]
ADD RAX,-0x8
XOR EDX,EDX
CMP R12,RAX
SETNZ DL
MOV RSI,RBX
CMOVZ RSI,RBP
ADD EDX,EDX
MOV RDI,R14
CALL 0x0011ba10
ADD R12,0x8
CMP R12,R13
JNZ 0x0015c4b0
LAB_0015c518:
LEA RSI,[RSP + 0x28]
LAB_0015c51d:
MOV RDI,qword ptr [RSP + 0x18]
CALL 0x0011be10
LAB_0015c527:
MOV RSI,qword ptr [0x0023af70]
LEA RDI,[RSP + 0x20]
CALL 0x0011b4b0
LEA RDI,[RSP + 0x90]
CALL 0x0011b2c0
MOV RDI,qword ptr [RSP]
TEST RDI,RDI
JZ 0x0015c55b
MOV RSI,qword ptr [RSP + 0x10]
SUB RSI,RDI
CALL 0x0011b8f0
LAB_0015c55b:
ADD RSP,0x198
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
/* WARNING: Unknown calling convention -- yet parameter storage is locked */
/* list_builtin_chat_templates[abi:cxx11]() */
void list_builtin_chat_templates_abi_cxx11_(void)
{
int8 *puVar1;
int iVar2;
size_t sVar3;
char *pcVar4;
int8 *puVar5;
int8 *local_1c8;
int8 *puStack_1c0;
long local_1b8;
long local_1a8 [4];
uint auStack_188 [20];
ios_base local_138 [264];
local_1c8 = (int8 *)0x0;
puStack_1c0 = (int8 *)0x0;
local_1b8 = 0;
/* try { // try from 0015c457 to 0015c47f has its CatchHandler @ 0015c571 */
iVar2 = llama_chat_builtin_templates(0,0);
std::vector<char_const*,std::allocator<char_const*>>::resize
((vector<char_const*,std::allocator<char_const*>> *)&local_1c8,(long)iVar2);
llama_chat_builtin_templates(local_1c8,(long)puStack_1c0 - (long)local_1c8 >> 3);
/* try { // try from 0015c480 to 0015c48e has its CatchHandler @ 0015c56f */
std::__cxx11::ostringstream::ostringstream((ostringstream *)local_1a8);
puVar1 = puStack_1c0;
if (local_1c8 != puStack_1c0) {
puVar5 = local_1c8;
do {
pcVar4 = (char *)*puVar5;
if (pcVar4 == (char *)0x0) {
std::ios::clear((long)local_1a8 + *(long *)(local_1a8[0] + -0x18),
*(uint *)((long)auStack_188 + *(long *)(local_1a8[0] + -0x18)) | 1);
}
else {
sVar3 = strlen(pcVar4);
/* try { // try from 0015c4c1 to 0015c50e has its CatchHandler @ 0015c576 */
std::__ostream_insert<char,std::char_traits<char>>((ostream *)local_1a8,pcVar4,sVar3);
}
pcVar4 = ", ";
if (puVar5 == puStack_1c0 + -1) {
pcVar4 = "";
}
std::__ostream_insert<char,std::char_traits<char>>
((ostream *)local_1a8,pcVar4,(ulong)((uint)(puVar5 != puStack_1c0 + -1) * 2));
puVar5 = puVar5 + 1;
} while (puVar5 != puVar1);
}
/* try { // try from 0015c51d to 0015c526 has its CatchHandler @ 0015c56d */
std::__cxx11::stringbuf::str();
std::__cxx11::ostringstream::~ostringstream((ostringstream *)local_1a8);
std::ios_base::~ios_base(local_138);
if (local_1c8 != (int8 *)0x0) {
operator_delete(local_1c8,local_1b8 - (long)local_1c8);
}
return;
}
| |
51,823 | mi_cmp_dynamic_record | eloqsql/storage/myisam/mi_dynrec.c | int _mi_cmp_dynamic_record(register MI_INFO *info, register const uchar *record)
{
uint flag,reclength,b_type;
my_off_t filepos;
uchar *buffer;
MI_BLOCK_INFO block_info;
DBUG_ENTER("_mi_cmp_dynamic_record");
if (info->opt_flag & WRITE_CACHE_USED)
{
info->update&= ~(HA_STATE_WRITE_AT_END | HA_STATE_EXTEND_BLOCK);
if (flush_io_cache(&info->rec_cache))
DBUG_RETURN(-1);
}
info->rec_cache.seek_not_done=1;
/* If nobody have touched the database we don't have to test rec */
buffer=info->rec_buff;
if ((info->opt_flag & READ_CHECK_USED))
{ /* If check isn't disabled */
if (info->s->base.blobs)
{
if (!(buffer=(uchar*) my_alloca(info->s->base.pack_reclength+
_mi_calc_total_blob_length(info,record))))
DBUG_RETURN(-1);
}
reclength=_mi_rec_pack(info,buffer,record);
record= buffer;
filepos=info->lastpos;
flag=block_info.second_read=0;
block_info.next_filepos=filepos;
while (reclength > 0)
{
if ((b_type=_mi_get_block_info(&block_info,info->dfile,
block_info.next_filepos))
& (BLOCK_DELETED | BLOCK_ERROR | BLOCK_SYNC_ERROR |
BLOCK_FATAL_ERROR))
{
if (b_type & (BLOCK_SYNC_ERROR | BLOCK_DELETED))
my_errno=HA_ERR_RECORD_CHANGED;
goto err;
}
if (flag == 0) /* First block */
{
flag=1;
if (reclength != block_info.rec_len)
{
my_errno=HA_ERR_RECORD_CHANGED;
goto err;
}
} else if (reclength < block_info.data_len)
{
my_errno=HA_ERR_WRONG_IN_RECORD;
goto err;
}
reclength-=block_info.data_len;
if (_mi_cmp_buffer(info->dfile,record,block_info.filepos,
block_info.data_len))
{
my_errno=HA_ERR_RECORD_CHANGED;
goto err;
}
flag=1;
record+=block_info.data_len;
}
}
my_errno=0;
err:
if (buffer != info->rec_buff)
my_afree((uchar*) buffer);
DBUG_RETURN(my_errno);
} | O3 | c | mi_cmp_dynamic_record:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x20e8, %rsp # imm = 0x20E8
movq %rsi, %r14
movq %rdi, %r12
movq %fs:0x28, %rax
movq %rax, -0x30(%rbp)
movl 0x1c8(%rdi), %eax
testb $0x10, %al
je 0x423fc
andb $-0xa, 0x1d1(%r12)
leaq 0x220(%r12), %rdi
movl $0x1, %esi
callq 0x62631
movl %eax, %ecx
movl $0xffffffff, %eax # imm = 0xFFFFFFFF
testl %ecx, %ecx
jne 0x4277a
movl 0x1c8(%r12), %eax
movl $0x1, 0x300(%r12)
movq 0x120(%r12), %rbx
xorl %r15d, %r15d
testb $0x4, %al
je 0x42759
movq (%r12), %rax
cmpl $0x0, 0x188(%rax)
je 0x42455
movq 0x148(%rax), %rbx
movq %r12, %rdi
movq %r14, %rsi
callq 0x408f8
addq %rax, %rbx
xorl %edi, %edi
movq %rbx, %rsi
xorl %edx, %edx
callq 0x7015d
movq %rax, %rbx
testq %rax, %rax
je 0x4279b
movq %r12, %rdi
movq %rbx, %rsi
movq %r14, %rdx
callq 0x3ffbe
movl %eax, %r14d
movq 0x170(%r12), %rax
movl $0x0, -0x2038(%rbp)
movq %rax, -0x2048(%rbp)
testl %r14d, %r14d
je 0x42759
movb $0x1, %r15b
leaq -0x2088(%rbp), %rdi
movq %rbx, %r13
movq %r12, -0x2098(%rbp)
movq %rbx, -0x2090(%rbp)
movl 0x1c0(%r12), %esi
movq -0x2048(%rbp), %rdx
callq 0x412df
cmpl $0x4, %eax
jae 0x427a2
movl %r14d, %eax
testb $0x1, %r15b
je 0x424df
cmpq %rax, -0x2070(%rbp)
jne 0x427b6
movq -0x2068(%rbp), %rdx
jmp 0x424ef
movq -0x2068(%rbp), %rdx
cmpq %rax, %rdx
ja 0x427ae
movl %r14d, -0x209c(%rbp)
movl 0x1c0(%r12), %ebx
movq -0x2050(%rbp), %r14
cmpl $0x2001, %edx # imm = 0x2001
movq %r13, -0x20b8(%rbp)
movq %rdx, -0x20b0(%rbp)
jb 0x42637
movl %r14d, %ecx
andl $0xfff, %ecx # imm = 0xFFF
movl $0x2000, %eax # imm = 0x2000
subl %ecx, %eax
movq %r13, %r15
movl %edx, %r13d
movq %r15, -0x20c0(%rbp)
movl %eax, %r12d
leaq 0x30cfa2(%rip), %rax # 0x34f4e8
movq (%rax), %rax
leaq -0x2108(%rbp), %rdi
movl %ebx, %esi
movl $0x6, %edx
callq *0x158(%rax)
testq %rax, %rax
jne 0x425c6
movl $0x4, %r8d
movl %ebx, %edi
leaq -0x2030(%rbp), %rsi
movq %r12, %rdx
movq %r14, %rcx
callq 0x709a0
movq %rax, %r15
testq %r15, %r15
movq -0x20c0(%rbp), %r15
jne 0x42745
movq %r15, %rdi
leaq -0x2030(%rbp), %rsi
movq %r12, %rdx
callq 0x293f0
testl %eax, %eax
jne 0x42745
addq %r12, %r14
addq %r12, %r15
subl %r12d, %r13d
movl $0x2000, %eax # imm = 0x2000
cmpl $0x2000, %r13d # imm = 0x2000
ja 0x42535
jmp 0x4263d
movq %rax, %rcx
leaq 0x30cf18(%rip), %rax # 0x34f4e8
movq (%rax), %rax
movq %rcx, -0x20a8(%rbp)
movq %rcx, %rdi
movq %r12, %rsi
leaq 0x6a21a(%rip), %rdx # 0xac801
movl $0x67e, %ecx # imm = 0x67E
callq *0x210(%rax)
movl $0x4, %r8d
movl %ebx, %edi
leaq -0x2030(%rbp), %rsi
movq %r12, %rdx
movq %r14, %rcx
callq 0x709a0
movq %rax, %r15
testq %rax, %rax
movl $0x0, %esi
cmoveq %r12, %rsi
leaq 0x30cec6(%rip), %rax # 0x34f4e8
movq (%rax), %rax
movq -0x20a8(%rbp), %rdi
callq *0x218(%rax)
jmp 0x4257f
movq %r13, %r15
movl %edx, %r13d
movl %r13d, %r13d
leaq 0x30cea1(%rip), %rax # 0x34f4e8
movq (%rax), %rax
leaq -0x2108(%rbp), %rdi
movl %ebx, %esi
movl $0x6, %edx
callq *0x158(%rax)
testq %rax, %rax
jne 0x426df
movl $0x4, %r8d
movl %ebx, %edi
leaq -0x2030(%rbp), %rsi
movq %r13, %rdx
movq %r14, %rcx
callq 0x709a0
movq %rax, %rbx
testq %rbx, %rbx
jne 0x42745
movq %r15, %rdi
leaq -0x2030(%rbp), %rsi
movq %r13, %rdx
callq 0x293f0
testl %eax, %eax
jne 0x42745
movq -0x20b8(%rbp), %r13
addq -0x2068(%rbp), %r13
xorl %r15d, %r15d
movl -0x209c(%rbp), %r14d
subl -0x20b0(%rbp), %r14d
movq -0x2098(%rbp), %r12
movq -0x2090(%rbp), %rbx
leaq -0x2088(%rbp), %rdi
jne 0x424a3
jmp 0x42759
movq %rax, %r12
leaq 0x30cdff(%rip), %rax # 0x34f4e8
movq (%rax), %rax
movq %r12, %rdi
movq %r13, %rsi
leaq 0x6a108(%rip), %rdx # 0xac801
movl $0x686, %ecx # imm = 0x686
callq *0x210(%rax)
movl $0x4, %r8d
movl %ebx, %edi
leaq -0x2030(%rbp), %rsi
movq %r13, %rdx
movq %r14, %rcx
callq 0x709a0
movq %rax, %rbx
testq %rax, %rax
movl $0x0, %esi
cmoveq %r13, %rsi
leaq 0x30cdb4(%rip), %rax # 0x34f4e8
movq (%rax), %rax
movq %r12, %rdi
callq *0x218(%rax)
jmp 0x42680
movl $0x7b, %r15d
movq -0x2098(%rbp), %r12
movq -0x2090(%rbp), %rbx
callq 0x721fe
movl %r15d, (%rax)
cmpq 0x120(%r12), %rbx
je 0x42773
movq %rbx, %rdi
callq 0x7038a
callq 0x721fe
movl (%rax), %eax
movq %fs:0x28, %rcx
cmpq -0x30(%rbp), %rcx
jne 0x427be
addq $0x20e8, %rsp # imm = 0x20E8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl $0xffffffff, %eax # imm = 0xFFFFFFFF
jmp 0x4277a
movl $0x7b, %r15d
testb $0x14, %al
jne 0x42759
jmp 0x42761
movl $0x7f, %r15d
jmp 0x42759
movl $0x7b, %r15d
jmp 0x42759
callq 0x29470
| _mi_cmp_dynamic_record:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 20E8h
mov r14, rsi
mov r12, rdi
mov rax, fs:28h
mov [rbp+var_30], rax
mov eax, [rdi+1C8h]
test al, 10h
jz short loc_423FC
and byte ptr [r12+1D1h], 0F6h
lea rdi, [r12+220h]
mov esi, 1
call my_b_flush_io_cache
mov ecx, eax
mov eax, 0FFFFFFFFh
test ecx, ecx
jnz loc_4277A
mov eax, [r12+1C8h]
loc_423FC:
mov dword ptr [r12+300h], 1
mov rbx, [r12+120h]
xor r15d, r15d
test al, 4
jz loc_42759
mov rax, [r12]
cmp dword ptr [rax+188h], 0
jz short loc_42455
mov rbx, [rax+148h]
mov rdi, r12
mov rsi, r14
call _mi_calc_total_blob_length
add rbx, rax
xor edi, edi
mov rsi, rbx
xor edx, edx
call my_malloc
mov rbx, rax
test rax, rax
jz loc_4279B
loc_42455:
mov rdi, r12
mov rsi, rbx
mov rdx, r14
call _mi_rec_pack
mov r14d, eax
mov rax, [r12+170h]
mov [rbp+var_2038], 0
mov [rbp+var_2048], rax
test r14d, r14d
jz loc_42759
mov r15b, 1
lea rdi, [rbp+var_2088]
mov r13, rbx
mov [rbp+var_2098], r12
mov [rbp+var_2090], rbx
loc_424A3:
mov esi, [r12+1C0h]
mov rdx, [rbp+var_2048]
call _mi_get_block_info
cmp eax, 4
jnb loc_427A2
mov eax, r14d
test r15b, 1
jz short loc_424DF
cmp [rbp+var_2070], rax
jnz loc_427B6
mov rdx, [rbp+var_2068]
jmp short loc_424EF
loc_424DF:
mov rdx, [rbp+var_2068]
cmp rdx, rax
ja loc_427AE
loc_424EF:
mov [rbp+var_209C], r14d
mov ebx, [r12+1C0h]
mov r14, [rbp+var_2050]
cmp edx, 2001h
mov [rbp+var_20B8], r13
mov [rbp+var_20B0], rdx
jb loc_42637
mov ecx, r14d
and ecx, 0FFFh
mov eax, 2000h
sub eax, ecx
mov r15, r13
mov r13d, edx
loc_42535:
mov [rbp+var_20C0], r15
mov r12d, eax
lea rax, PSI_server
mov rax, [rax]
lea rdi, [rbp+var_2108]
mov esi, ebx
mov edx, 6
call qword ptr [rax+158h]
test rax, rax
jnz short loc_425C6
mov r8d, 4
mov edi, ebx
lea rsi, [rbp+var_2030]
mov rdx, r12
mov rcx, r14
call my_pread
mov r15, rax
loc_4257F:
test r15, r15
mov r15, [rbp+var_20C0]
jnz loc_42745
mov rdi, r15
lea rsi, [rbp+var_2030]
mov rdx, r12
call _bcmp
test eax, eax
jnz loc_42745
add r14, r12
add r15, r12
sub r13d, r12d
mov eax, 2000h
cmp r13d, 2000h
ja loc_42535
jmp short loc_4263D
loc_425C6:
mov rcx, rax
lea rax, PSI_server
mov rax, [rax]
mov [rbp+var_20A8], rcx
mov rdi, rcx
mov rsi, r12
lea rdx, aWorkspaceLlm4b_3; "/workspace/llm4binary/github2025/eloqsq"...
mov ecx, 67Eh
call qword ptr [rax+210h]
mov r8d, 4
mov edi, ebx
lea rsi, [rbp+var_2030]
mov rdx, r12
mov rcx, r14
call my_pread
mov r15, rax
test rax, rax
mov esi, 0
cmovz rsi, r12
lea rax, PSI_server
mov rax, [rax]
mov rdi, [rbp+var_20A8]
call qword ptr [rax+218h]
jmp loc_4257F
loc_42637:
mov r15, r13
mov r13d, edx
loc_4263D:
mov r13d, r13d
lea rax, PSI_server
mov rax, [rax]
lea rdi, [rbp+var_2108]
mov esi, ebx
mov edx, 6
call qword ptr [rax+158h]
test rax, rax
jnz short loc_426DF
mov r8d, 4
mov edi, ebx
lea rsi, [rbp+var_2030]
mov rdx, r13
mov rcx, r14
call my_pread
mov rbx, rax
loc_42680:
test rbx, rbx
jnz loc_42745
mov rdi, r15
lea rsi, [rbp+var_2030]
mov rdx, r13
call _bcmp
test eax, eax
jnz loc_42745
mov r13, [rbp+var_20B8]
add r13, [rbp+var_2068]
xor r15d, r15d
mov r14d, [rbp+var_209C]
sub r14d, dword ptr [rbp+var_20B0]
mov r12, [rbp+var_2098]
mov rbx, [rbp+var_2090]
lea rdi, [rbp+var_2088]
jnz loc_424A3
jmp short loc_42759
loc_426DF:
mov r12, rax
lea rax, PSI_server
mov rax, [rax]
mov rdi, r12
mov rsi, r13
lea rdx, aWorkspaceLlm4b_3; "/workspace/llm4binary/github2025/eloqsq"...
mov ecx, 686h
call qword ptr [rax+210h]
mov r8d, 4
mov edi, ebx
lea rsi, [rbp+var_2030]
mov rdx, r13
mov rcx, r14
call my_pread
mov rbx, rax
test rax, rax
mov esi, 0
cmovz rsi, r13
lea rax, PSI_server
mov rax, [rax]
mov rdi, r12
call qword ptr [rax+218h]
jmp loc_42680
loc_42745:
mov r15d, 7Bh ; '{'
mov r12, [rbp+var_2098]
mov rbx, [rbp+var_2090]
loc_42759:
call _my_thread_var
mov [rax], r15d
loc_42761:
cmp rbx, [r12+120h]
jz short loc_42773
mov rdi, rbx
call my_free
loc_42773:
call _my_thread_var
mov eax, [rax]
loc_4277A:
mov rcx, fs:28h
cmp rcx, [rbp+var_30]
jnz short loc_427BE
add rsp, 20E8h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_4279B:
mov eax, 0FFFFFFFFh
jmp short loc_4277A
loc_427A2:
mov r15d, 7Bh ; '{'
test al, 14h
jnz short loc_42759
jmp short loc_42761
loc_427AE:
mov r15d, 7Fh
jmp short loc_42759
loc_427B6:
mov r15d, 7Bh ; '{'
jmp short loc_42759
loc_427BE:
call ___stack_chk_fail
| long long mi_cmp_dynamic_record(unsigned long long a1, char *a2)
{
char *v2; // r14
long long v3; // r12
int v4; // eax
int v5; // ecx
long long result; // rax
char *v7; // rbx
int v8; // r15d
long long v9; // rbx
long long v10; // rax
unsigned int v11; // r14d
long long v12; // rax
char *v13; // r13
unsigned int block_info; // eax
unsigned long long v15; // rdx
unsigned int v16; // ebx
long long v17; // r14
unsigned int v18; // eax
char *v19; // r15
unsigned int v20; // r13d
char *v21; // r12
long long v22; // rax
long long v23; // r15
bool v24; // zf
char *v25; // r15
long long v26; // rax
long long v27; // rbx
_BYTE *v28; // r12
_BYTE v29[72]; // [rsp+8h] [rbp-2108h] BYREF
char *v30; // [rsp+50h] [rbp-20C0h]
char *v31; // [rsp+58h] [rbp-20B8h]
unsigned long long v32; // [rsp+60h] [rbp-20B0h]
_BYTE *v33; // [rsp+68h] [rbp-20A8h]
unsigned int v34; // [rsp+74h] [rbp-209Ch]
long long v35; // [rsp+78h] [rbp-2098h]
char *v36; // [rsp+80h] [rbp-2090h]
_BYTE v37[24]; // [rsp+88h] [rbp-2088h] BYREF
long long v38; // [rsp+A0h] [rbp-2070h]
unsigned long long v39; // [rsp+A8h] [rbp-2068h]
long long v40; // [rsp+C0h] [rbp-2050h]
long long v41; // [rsp+C8h] [rbp-2048h]
int v42; // [rsp+D8h] [rbp-2038h]
_BYTE v43[8192]; // [rsp+E0h] [rbp-2030h] BYREF
unsigned long long v44; // [rsp+20E0h] [rbp-30h]
v2 = a2;
v3 = a1;
v44 = __readfsqword(0x28u);
v4 = *(_DWORD *)(a1 + 456);
if ( (v4 & 0x10) != 0 )
{
*(_BYTE *)(a1 + 465) &= 0xF6u;
a1 += 544LL;
a2 = (_BYTE *)(&dword_0 + 1);
v5 = my_b_flush_io_cache(a1, 1LL);
result = 0xFFFFFFFFLL;
if ( v5 )
return result;
v4 = *(_DWORD *)(v3 + 456);
}
*(_DWORD *)(v3 + 768) = 1;
v7 = *(char **)(v3 + 288);
v8 = 0;
if ( (v4 & 4) == 0 )
goto LABEL_36;
if ( *(_DWORD *)(*(_QWORD *)v3 + 392LL) )
{
v9 = *(_QWORD *)(*(_QWORD *)v3 + 328LL);
v10 = mi_calc_total_blob_length((_QWORD *)v3, (long long)v2);
v7 = (char *)my_malloc(0LL, v10 + v9);
if ( !v7 )
return 0xFFFFFFFFLL;
}
a1 = v3;
a2 = v7;
v11 = mi_rec_pack(v3, v7, v2);
v12 = *(_QWORD *)(v3 + 368);
v42 = 0;
v41 = v12;
if ( v11 )
{
LOBYTE(v8) = 1;
a1 = (unsigned long long)v37;
v13 = v7;
v35 = v3;
v36 = v7;
while ( 1 )
{
a2 = (char *)*(unsigned int *)(v3 + 448);
block_info = mi_get_block_info((long long)v37, a2, v41);
if ( block_info >= 4 )
break;
if ( (v8 & 1) != 0 )
{
if ( v38 != v11 )
{
v8 = 123;
goto LABEL_36;
}
v15 = v39;
}
else
{
v15 = v39;
if ( v39 > v11 )
{
v8 = 127;
goto LABEL_36;
}
}
v34 = v11;
v16 = *(_DWORD *)(v3 + 448);
v17 = v40;
v31 = v13;
v32 = v15;
if ( (unsigned int)v15 >= 0x2001 )
{
v18 = 0x2000 - (v40 & 0xFFF);
v19 = v13;
v20 = v15;
while ( 1 )
{
v30 = v19;
v21 = (char *)v18;
v22 = (*((long long ( **)(_BYTE *, _QWORD, long long))PSI_server + 43))(v29, v16, 6LL);
if ( v22 )
{
v33 = (_BYTE *)v22;
(*((void ( **)(long long, char *, const char *, long long))PSI_server + 66))(
v22,
v21,
"/workspace/llm4binary/github2025/eloqsql/storage/myisam/mi_dynrec.c",
1662LL);
v23 = my_pread(v16, v43, v21, v17, 4LL);
a2 = 0LL;
if ( !v23 )
a2 = v21;
a1 = (unsigned long long)v33;
(*((void ( **)(_BYTE *, char *))PSI_server + 67))(v33, a2);
}
else
{
a1 = v16;
a2 = v43;
v23 = my_pread(v16, v43, v21, v17, 4LL);
}
v24 = v23 == 0;
v25 = v30;
if ( !v24 )
break;
a1 = (unsigned long long)v30;
a2 = v43;
if ( (unsigned int)bcmp(v30, v43, v21) )
break;
v17 += (long long)v21;
v19 = &v25[(_QWORD)v21];
v20 -= (unsigned int)v21;
v18 = 0x2000;
if ( v20 <= 0x2000 )
goto LABEL_26;
}
LABEL_35:
v8 = 123;
v3 = v35;
v7 = v36;
goto LABEL_36;
}
v19 = v13;
v20 = v15;
LABEL_26:
v26 = (*((long long ( **)(_BYTE *, _QWORD, long long))PSI_server + 43))(v29, v16, 6LL);
if ( v26 )
{
v28 = (_BYTE *)v26;
(*((void ( **)(long long, _QWORD, const char *, long long))PSI_server + 66))(
v26,
v20,
"/workspace/llm4binary/github2025/eloqsql/storage/myisam/mi_dynrec.c",
1670LL);
v27 = my_pread(v16, v43, v20, v17, 4LL);
a2 = 0LL;
if ( !v27 )
a2 = (char *)v20;
a1 = (unsigned long long)v28;
(*((void ( **)(_BYTE *, char *))PSI_server + 67))(v28, a2);
}
else
{
a1 = v16;
a2 = v43;
v27 = my_pread(v16, v43, v20, v17, 4LL);
}
if ( v27 )
goto LABEL_35;
a1 = (unsigned long long)v19;
a2 = v43;
if ( (unsigned int)bcmp(v19, v43, v20) )
goto LABEL_35;
v13 = &v31[v39];
v8 = 0;
v11 = v34 - v32;
v3 = v35;
v7 = v36;
a1 = (unsigned long long)v37;
if ( v34 == (_DWORD)v32 )
goto LABEL_36;
}
v8 = 123;
if ( (block_info & 0x14) != 0 )
goto LABEL_36;
}
else
{
LABEL_36:
*(_DWORD *)my_thread_var(a1, a2) = v8;
}
if ( v7 != *(char **)(v3 + 288) )
{
a1 = (unsigned long long)v7;
my_free(v7);
}
return *(unsigned int *)my_thread_var(a1, a2);
}
| _mi_cmp_dynamic_record:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x20e8
MOV R14,RSI
MOV R12,RDI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x30],RAX
MOV EAX,dword ptr [RDI + 0x1c8]
TEST AL,0x10
JZ 0x001423fc
AND byte ptr [R12 + 0x1d1],0xf6
LEA RDI,[R12 + 0x220]
MOV ESI,0x1
CALL 0x00162631
MOV ECX,EAX
MOV EAX,0xffffffff
TEST ECX,ECX
JNZ 0x0014277a
MOV EAX,dword ptr [R12 + 0x1c8]
LAB_001423fc:
MOV dword ptr [R12 + 0x300],0x1
MOV RBX,qword ptr [R12 + 0x120]
XOR R15D,R15D
TEST AL,0x4
JZ 0x00142759
MOV RAX,qword ptr [R12]
CMP dword ptr [RAX + 0x188],0x0
JZ 0x00142455
MOV RBX,qword ptr [RAX + 0x148]
MOV RDI,R12
MOV RSI,R14
CALL 0x001408f8
ADD RBX,RAX
XOR EDI,EDI
MOV RSI,RBX
XOR EDX,EDX
CALL 0x0017015d
MOV RBX,RAX
TEST RAX,RAX
JZ 0x0014279b
LAB_00142455:
MOV RDI,R12
MOV RSI,RBX
MOV RDX,R14
CALL 0x0013ffbe
MOV R14D,EAX
MOV RAX,qword ptr [R12 + 0x170]
MOV dword ptr [RBP + -0x2038],0x0
MOV qword ptr [RBP + -0x2048],RAX
TEST R14D,R14D
JZ 0x00142759
MOV R15B,0x1
LEA RDI,[RBP + -0x2088]
MOV R13,RBX
MOV qword ptr [RBP + -0x2098],R12
MOV qword ptr [RBP + -0x2090],RBX
LAB_001424a3:
MOV ESI,dword ptr [R12 + 0x1c0]
MOV RDX,qword ptr [RBP + -0x2048]
CALL 0x001412df
CMP EAX,0x4
JNC 0x001427a2
MOV EAX,R14D
TEST R15B,0x1
JZ 0x001424df
CMP qword ptr [RBP + -0x2070],RAX
JNZ 0x001427b6
MOV RDX,qword ptr [RBP + -0x2068]
JMP 0x001424ef
LAB_001424df:
MOV RDX,qword ptr [RBP + -0x2068]
CMP RDX,RAX
JA 0x001427ae
LAB_001424ef:
MOV dword ptr [RBP + -0x209c],R14D
MOV EBX,dword ptr [R12 + 0x1c0]
MOV R14,qword ptr [RBP + -0x2050]
CMP EDX,0x2001
MOV qword ptr [RBP + -0x20b8],R13
MOV qword ptr [RBP + -0x20b0],RDX
JC 0x00142637
MOV ECX,R14D
AND ECX,0xfff
MOV EAX,0x2000
SUB EAX,ECX
MOV R15,R13
MOV R13D,EDX
LAB_00142535:
MOV qword ptr [RBP + -0x20c0],R15
MOV R12D,EAX
LEA RAX,[0x44f4e8]
MOV RAX,qword ptr [RAX]
LEA RDI,[RBP + -0x2108]
MOV ESI,EBX
MOV EDX,0x6
CALL qword ptr [RAX + 0x158]
TEST RAX,RAX
JNZ 0x001425c6
MOV R8D,0x4
MOV EDI,EBX
LEA RSI,[RBP + -0x2030]
MOV RDX,R12
MOV RCX,R14
CALL 0x001709a0
MOV R15,RAX
LAB_0014257f:
TEST R15,R15
MOV R15,qword ptr [RBP + -0x20c0]
JNZ 0x00142745
MOV RDI,R15
LEA RSI,[RBP + -0x2030]
MOV RDX,R12
CALL 0x001293f0
TEST EAX,EAX
JNZ 0x00142745
ADD R14,R12
ADD R15,R12
SUB R13D,R12D
MOV EAX,0x2000
CMP R13D,0x2000
JA 0x00142535
JMP 0x0014263d
LAB_001425c6:
MOV RCX,RAX
LEA RAX,[0x44f4e8]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x20a8],RCX
MOV RDI,RCX
MOV RSI,R12
LEA RDX,[0x1ac801]
MOV ECX,0x67e
CALL qword ptr [RAX + 0x210]
MOV R8D,0x4
MOV EDI,EBX
LEA RSI,[RBP + -0x2030]
MOV RDX,R12
MOV RCX,R14
CALL 0x001709a0
MOV R15,RAX
TEST RAX,RAX
MOV ESI,0x0
CMOVZ RSI,R12
LEA RAX,[0x44f4e8]
MOV RAX,qword ptr [RAX]
MOV RDI,qword ptr [RBP + -0x20a8]
CALL qword ptr [RAX + 0x218]
JMP 0x0014257f
LAB_00142637:
MOV R15,R13
MOV R13D,EDX
LAB_0014263d:
MOV R13D,R13D
LEA RAX,[0x44f4e8]
MOV RAX,qword ptr [RAX]
LEA RDI,[RBP + -0x2108]
MOV ESI,EBX
MOV EDX,0x6
CALL qword ptr [RAX + 0x158]
TEST RAX,RAX
JNZ 0x001426df
MOV R8D,0x4
MOV EDI,EBX
LEA RSI,[RBP + -0x2030]
MOV RDX,R13
MOV RCX,R14
CALL 0x001709a0
MOV RBX,RAX
LAB_00142680:
TEST RBX,RBX
JNZ 0x00142745
MOV RDI,R15
LEA RSI,[RBP + -0x2030]
MOV RDX,R13
CALL 0x001293f0
TEST EAX,EAX
JNZ 0x00142745
MOV R13,qword ptr [RBP + -0x20b8]
ADD R13,qword ptr [RBP + -0x2068]
XOR R15D,R15D
MOV R14D,dword ptr [RBP + -0x209c]
SUB R14D,dword ptr [RBP + -0x20b0]
MOV R12,qword ptr [RBP + -0x2098]
MOV RBX,qword ptr [RBP + -0x2090]
LEA RDI,[RBP + -0x2088]
JNZ 0x001424a3
JMP 0x00142759
LAB_001426df:
MOV R12,RAX
LEA RAX,[0x44f4e8]
MOV RAX,qword ptr [RAX]
MOV RDI,R12
MOV RSI,R13
LEA RDX,[0x1ac801]
MOV ECX,0x686
CALL qword ptr [RAX + 0x210]
MOV R8D,0x4
MOV EDI,EBX
LEA RSI,[RBP + -0x2030]
MOV RDX,R13
MOV RCX,R14
CALL 0x001709a0
MOV RBX,RAX
TEST RAX,RAX
MOV ESI,0x0
CMOVZ RSI,R13
LEA RAX,[0x44f4e8]
MOV RAX,qword ptr [RAX]
MOV RDI,R12
CALL qword ptr [RAX + 0x218]
JMP 0x00142680
LAB_00142745:
MOV R15D,0x7b
MOV R12,qword ptr [RBP + -0x2098]
MOV RBX,qword ptr [RBP + -0x2090]
LAB_00142759:
CALL 0x001721fe
MOV dword ptr [RAX],R15D
LAB_00142761:
CMP RBX,qword ptr [R12 + 0x120]
JZ 0x00142773
MOV RDI,RBX
CALL 0x0017038a
LAB_00142773:
CALL 0x001721fe
MOV EAX,dword ptr [RAX]
LAB_0014277a:
MOV RCX,qword ptr FS:[0x28]
CMP RCX,qword ptr [RBP + -0x30]
JNZ 0x001427be
ADD RSP,0x20e8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_0014279b:
MOV EAX,0xffffffff
JMP 0x0014277a
LAB_001427a2:
MOV R15D,0x7b
TEST AL,0x14
JNZ 0x00142759
JMP 0x00142761
LAB_001427ae:
MOV R15D,0x7f
JMP 0x00142759
LAB_001427b6:
MOV R15D,0x7b
JMP 0x00142759
LAB_001427be:
CALL 0x00129470
|
int4 _mi_cmp_dynamic_record(long *param_1,int8 param_2)
{
int iVar1;
uint uVar2;
uint uVar3;
long lVar4;
void *pvVar5;
int4 *puVar6;
void *pvVar7;
ulong uVar8;
ulong uVar9;
ulong uVar10;
long lVar11;
bool bVar12;
int4 uVar13;
long in_FS_OFFSET;
int1 local_2110 [72];
void *local_20c8;
void *local_20c0;
ulong local_20b8;
long local_20b0;
uint local_20a4;
long *local_20a0;
void *local_2098;
int1 local_2090 [24];
ulong local_2078;
ulong local_2070;
long local_2058;
long local_2050;
int4 local_2040;
int1 local_2038 [8192];
long local_38;
local_38 = *(long *)(in_FS_OFFSET + 0x28);
uVar2 = *(uint *)(param_1 + 0x39);
if ((uVar2 & 0x10) != 0) {
*(byte *)((long)param_1 + 0x1d1) = *(byte *)((long)param_1 + 0x1d1) & 0xf6;
iVar1 = my_b_flush_io_cache(param_1 + 0x44,1);
uVar13 = 0xffffffff;
if (iVar1 != 0) goto LAB_0014277a;
uVar2 = *(uint *)(param_1 + 0x39);
}
*(int4 *)(param_1 + 0x60) = 1;
pvVar5 = (void *)param_1[0x24];
uVar13 = 0;
pvVar7 = pvVar5;
if ((uVar2 & 4) != 0) {
if (*(int *)(*param_1 + 0x188) != 0) {
lVar11 = *(long *)(*param_1 + 0x148);
lVar4 = _mi_calc_total_blob_length(param_1,param_2);
pvVar5 = (void *)my_malloc(0,lVar11 + lVar4,0);
if (pvVar5 == (void *)0x0) {
uVar13 = 0xffffffff;
goto LAB_0014277a;
}
}
uVar2 = _mi_rec_pack(param_1,pvVar5,param_2);
local_2050 = param_1[0x2e];
local_2040 = 0;
pvVar7 = pvVar5;
if (uVar2 != 0) {
bVar12 = true;
local_20a0 = param_1;
local_2098 = pvVar5;
do {
pvVar7 = local_2098;
param_1 = local_20a0;
uVar3 = _mi_get_block_info(local_2090,(int)local_20a0[0x38],local_2050);
if (3 < uVar3) {
uVar13 = 0x7b;
if ((uVar3 & 0x14) == 0) goto LAB_00142761;
break;
}
if (bVar12) {
if (local_2078 != uVar2) {
uVar13 = 0x7b;
break;
}
}
else if (uVar2 < local_2070) {
uVar13 = 0x7f;
break;
}
uVar13 = (int4)param_1[0x38];
uVar3 = (uint)local_2070;
local_20b8 = local_2070;
lVar11 = local_2058;
local_20c0 = pvVar5;
local_20a4 = uVar2;
if (0x2000 < uVar3) {
uVar2 = 0x2000 - ((uint)local_2058 & 0xfff);
uVar10 = local_2070 & 0xffffffff;
do {
uVar9 = (ulong)uVar2;
local_20c8 = pvVar5;
lVar4 = (**(code **)(PSI_server + 0x158))(local_2110,uVar13,6);
if (lVar4 == 0) {
lVar4 = my_pread(uVar13,local_2038,uVar9,lVar11,4);
}
else {
local_20b0 = lVar4;
(**(code **)(PSI_server + 0x210))
(lVar4,uVar9,
"/workspace/llm4binary/github2025/eloqsql/storage/myisam/mi_dynrec.c",0x67e
);
lVar4 = my_pread(uVar13,local_2038,uVar9,lVar11,4);
uVar8 = 0;
if (lVar4 == 0) {
uVar8 = uVar9;
}
(**(code **)(PSI_server + 0x218))(local_20b0,uVar8);
}
pvVar5 = local_20c8;
if ((lVar4 != 0) || (iVar1 = bcmp(local_20c8,local_2038,uVar9), iVar1 != 0))
goto LAB_00142745;
lVar11 = lVar11 + uVar9;
pvVar5 = (void *)((long)pvVar5 + uVar9);
uVar3 = (int)uVar10 - uVar2;
uVar10 = (ulong)uVar3;
uVar2 = 0x2000;
} while (0x2000 < uVar3);
}
uVar10 = (ulong)uVar3;
lVar4 = (**(code **)(PSI_server + 0x158))(local_2110,uVar13,6);
if (lVar4 == 0) {
lVar11 = my_pread(uVar13,local_2038,uVar10,lVar11,4);
}
else {
(**(code **)(PSI_server + 0x210))
(lVar4,uVar10,
"/workspace/llm4binary/github2025/eloqsql/storage/myisam/mi_dynrec.c",0x686);
lVar11 = my_pread(uVar13,local_2038,uVar10,lVar11,4);
uVar9 = 0;
if (lVar11 == 0) {
uVar9 = uVar10;
}
(**(code **)(PSI_server + 0x218))(lVar4,uVar9);
}
if ((lVar11 != 0) || (iVar1 = bcmp(pvVar5,local_2038,uVar10), iVar1 != 0)) {
LAB_00142745:
uVar13 = 0x7b;
pvVar7 = local_2098;
param_1 = local_20a0;
break;
}
pvVar5 = (void *)((long)local_20c0 + local_2070);
bVar12 = false;
uVar13 = 0;
uVar2 = local_20a4 - (int)local_20b8;
pvVar7 = local_2098;
param_1 = local_20a0;
} while (uVar2 != 0);
}
}
puVar6 = (int4 *)_my_thread_var();
*puVar6 = uVar13;
LAB_00142761:
if (pvVar7 != (void *)param_1[0x24]) {
my_free(pvVar7);
}
puVar6 = (int4 *)_my_thread_var();
uVar13 = *puVar6;
LAB_0014277a:
if (*(long *)(in_FS_OFFSET + 0x28) != local_38) {
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
return uVar13;
}
| |
51,824 | wt_thd_release | eloqsql/mysys/waiting_threads.c | void wt_thd_release(WT_THD *thd, const WT_RESOURCE_ID *resid)
{
uint i;
DBUG_ENTER("wt_thd_release");
for (i= 0; i < thd->my_resources.elements; i++)
{
WT_RESOURCE *rc= *dynamic_element(&thd->my_resources, i, WT_RESOURCE**);
if (!resid || (resid->type->compare(&rc->id, resid) == 0))
{
uint j;
rc_wrlock(rc);
/*
nobody's trying to free the resource now,
as its owners[] array is not empty (at least thd must be there)
*/
DBUG_ASSERT(rc->state == ACTIVE);
for (j= 0; j < rc->owners.elements; j++)
if (*dynamic_element(&rc->owners, j, WT_THD**) == thd)
break;
DBUG_ASSERT(j < rc->owners.elements);
delete_dynamic_element(&rc->owners, j);
if (rc->owners.elements == 0)
{
mysql_cond_broadcast(&rc->cond);
#ifndef DBUG_OFF
if (rc->cond_mutex)
mysql_mutex_assert_owner(rc->cond_mutex);
#endif
}
unlock_lock_and_free_resource(thd, rc);
if (resid)
{
delete_dynamic_element(&thd->my_resources, i);
DBUG_VOID_RETURN;
}
}
}
if (!resid)
reset_dynamic(&thd->my_resources);
DBUG_VOID_RETURN;
} | O3 | c | wt_thd_release:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
cmpl $0x0, 0x8(%rdi)
je 0xc7231
xorl %r15d, %r15d
leaq 0x2e7892(%rip), %r13 # 0x3aea18
movq (%rbx), %rax
movq (%rax,%r15,8), %r12
testq %r14, %r14
je 0xc71a2
movq 0x8(%r14), %rax
movq %r12, %rdi
movq %r14, %rsi
callq *(%rax)
testb %al, %al
jne 0xc7214
leaq 0x18(%r12), %rdi
callq 0xc3e11
leaq 0xe0(%r12), %rdi
movl 0xe8(%r12), %eax
testq %rax, %rax
je 0xc71d8
movq (%rdi), %rcx
xorl %esi, %esi
cmpq %rbx, (%rcx,%rsi,8)
je 0xc71da
incq %rsi
cmpq %rsi, %rax
jne 0xc71c6
movl %eax, %esi
jmp 0xc71da
xorl %esi, %esi
callq 0xac90d
cmpl $0x0, 0xe8(%r12)
jne 0xc7204
movq 0xd8(%r12), %rdi
testq %rdi, %rdi
jne 0xc7225
leaq 0xa8(%r12), %rdi
callq 0x2a7a0
movq %rbx, %rdi
movq %r12, %rsi
callq 0xc7265
testq %r14, %r14
jne 0xc724c
incq %r15
movl 0x8(%rbx), %eax
cmpq %rax, %r15
jb 0xc7186
jmp 0xc7231
movq (%r13), %rax
callq *0x178(%rax)
jmp 0xc71f7
testq %r14, %r14
jne 0xc723d
movl $0x0, 0x8(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rbx, %rdi
movl %r15d, %esi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0xac90d
| wt_thd_release:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
push rax
mov r14, rsi
mov rbx, rdi
cmp dword ptr [rdi+8], 0
jz loc_C7231
xor r15d, r15d
lea r13, PSI_server
loc_C7186:
mov rax, [rbx]
mov r12, [rax+r15*8]
test r14, r14
jz short loc_C71A2
mov rax, [r14+8]
mov rdi, r12
mov rsi, r14
call qword ptr [rax]
test al, al
jnz short loc_C7214
loc_C71A2:
lea rdi, [r12+18h]
call my_rw_wrlock
lea rdi, [r12+0E0h]
mov eax, [r12+0E8h]
test rax, rax
jz short loc_C71D8
mov rcx, [rdi]
xor esi, esi
loc_C71C6:
cmp [rcx+rsi*8], rbx
jz short loc_C71DA
inc rsi
cmp rax, rsi
jnz short loc_C71C6
mov esi, eax
jmp short loc_C71DA
loc_C71D8:
xor esi, esi
loc_C71DA:
call delete_dynamic_element
cmp dword ptr [r12+0E8h], 0
jnz short loc_C7204
mov rdi, [r12+0D8h]
test rdi, rdi
jnz short loc_C7225
loc_C71F7:
lea rdi, [r12+0A8h]
call _pthread_cond_broadcast
loc_C7204:
mov rdi, rbx
mov rsi, r12
call unlock_lock_and_free_resource
test r14, r14
jnz short loc_C724C
loc_C7214:
inc r15
mov eax, [rbx+8]
cmp r15, rax
jb loc_C7186
jmp short loc_C7231
loc_C7225:
mov rax, [r13+0]
call qword ptr [rax+178h]
jmp short loc_C71F7
loc_C7231:
test r14, r14
jnz short loc_C723D
mov dword ptr [rbx+8], 0
loc_C723D:
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_C724C:
mov rdi, rbx
mov esi, r15d
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
jmp delete_dynamic_element
| unsigned long long wt_thd_release(long long a1, long long a2)
{
unsigned long long v4; // r15
long long v5; // r12
_QWORD *v6; // rdi
long long v7; // rsi
long long v8; // rdi
unsigned long long result; // rax
if ( *(_DWORD *)(a1 + 8) )
{
v4 = 0LL;
while ( 1 )
{
v5 = *(_QWORD *)(*(_QWORD *)a1 + 8 * v4);
if ( !a2
|| !(**(unsigned __int8 ( ***)(_QWORD, long long))(a2 + 8))(*(_QWORD *)(*(_QWORD *)a1 + 8 * v4), a2) )
{
my_rw_wrlock(v5 + 24);
v6 = (_QWORD *)(v5 + 224);
if ( *(_DWORD *)(v5 + 232) )
{
v7 = 0LL;
while ( *(_QWORD *)(*v6 + 8 * v7) != a1 )
{
if ( *(_DWORD *)(v5 + 232) == ++v7 )
{
LODWORD(v7) = *(_DWORD *)(v5 + 232);
break;
}
}
}
else
{
LODWORD(v7) = 0;
}
delete_dynamic_element((long long)v6, v7);
if ( !*(_DWORD *)(v5 + 232) )
{
v8 = *(_QWORD *)(v5 + 216);
if ( v8 )
((void ( *)(long long))PSI_server[47])(v8);
pthread_cond_broadcast(v5 + 168);
}
unlock_lock_and_free_resource(a1);
if ( a2 )
return delete_dynamic_element(a1, v4);
}
++v4;
result = *(unsigned int *)(a1 + 8);
if ( v4 >= result )
goto LABEL_17;
}
}
else
{
LABEL_17:
if ( !a2 )
*(_DWORD *)(a1 + 8) = 0;
}
return result;
}
| wt_thd_release:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
PUSH RAX
MOV R14,RSI
MOV RBX,RDI
CMP dword ptr [RDI + 0x8],0x0
JZ 0x001c7231
XOR R15D,R15D
LEA R13,[0x4aea18]
LAB_001c7186:
MOV RAX,qword ptr [RBX]
MOV R12,qword ptr [RAX + R15*0x8]
TEST R14,R14
JZ 0x001c71a2
MOV RAX,qword ptr [R14 + 0x8]
MOV RDI,R12
MOV RSI,R14
CALL qword ptr [RAX]
TEST AL,AL
JNZ 0x001c7214
LAB_001c71a2:
LEA RDI,[R12 + 0x18]
CALL 0x001c3e11
LEA RDI,[R12 + 0xe0]
MOV EAX,dword ptr [R12 + 0xe8]
TEST RAX,RAX
JZ 0x001c71d8
MOV RCX,qword ptr [RDI]
XOR ESI,ESI
LAB_001c71c6:
CMP qword ptr [RCX + RSI*0x8],RBX
JZ 0x001c71da
INC RSI
CMP RAX,RSI
JNZ 0x001c71c6
MOV ESI,EAX
JMP 0x001c71da
LAB_001c71d8:
XOR ESI,ESI
LAB_001c71da:
CALL 0x001ac90d
CMP dword ptr [R12 + 0xe8],0x0
JNZ 0x001c7204
MOV RDI,qword ptr [R12 + 0xd8]
TEST RDI,RDI
JNZ 0x001c7225
LAB_001c71f7:
LEA RDI,[R12 + 0xa8]
CALL 0x0012a7a0
LAB_001c7204:
MOV RDI,RBX
MOV RSI,R12
CALL 0x001c7265
TEST R14,R14
JNZ 0x001c724c
LAB_001c7214:
INC R15
MOV EAX,dword ptr [RBX + 0x8]
CMP R15,RAX
JC 0x001c7186
JMP 0x001c7231
LAB_001c7225:
MOV RAX,qword ptr [R13]
CALL qword ptr [RAX + 0x178]
JMP 0x001c71f7
LAB_001c7231:
TEST R14,R14
JNZ 0x001c723d
MOV dword ptr [RBX + 0x8],0x0
LAB_001c723d:
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_001c724c:
MOV RDI,RBX
MOV ESI,R15D
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
JMP 0x001ac90d
|
void wt_thd_release(long *param_1,long param_2)
{
uint uVar1;
long lVar2;
char cVar3;
ulong uVar4;
ulong uVar5;
if ((int)param_1[1] != 0) {
uVar5 = 0;
do {
lVar2 = *(long *)(*param_1 + uVar5 * 8);
if ((param_2 == 0) ||
(cVar3 = (*(code *)**(int8 **)(param_2 + 8))(lVar2), cVar3 == '\0')) {
my_rw_wrlock(lVar2 + 0x18);
uVar1 = *(uint *)(lVar2 + 0xe8);
if ((ulong)uVar1 == 0) {
uVar4 = 0;
}
else {
uVar4 = 0;
do {
if (*(long **)(*(long *)(lVar2 + 0xe0) + uVar4 * 8) == param_1) goto LAB_001c71da;
uVar4 = uVar4 + 1;
} while (uVar1 != uVar4);
uVar4 = (ulong)uVar1;
}
LAB_001c71da:
delete_dynamic_element((long *)(lVar2 + 0xe0),uVar4);
if (*(int *)(lVar2 + 0xe8) == 0) {
if (*(long *)(lVar2 + 0xd8) != 0) {
(**(code **)(PSI_server + 0x178))();
}
pthread_cond_broadcast((pthread_cond_t *)(lVar2 + 0xa8));
}
unlock_lock_and_free_resource(param_1);
if (param_2 != 0) {
delete_dynamic_element(param_1,uVar5 & 0xffffffff);
return;
}
}
uVar5 = uVar5 + 1;
} while (uVar5 < *(uint *)(param_1 + 1));
}
if (param_2 == 0) {
*(int4 *)(param_1 + 1) = 0;
}
return;
}
| |
51,825 | translog_get_total_chunk_length | eloqsql/storage/maria/ma_loghandler.c | static uint16 translog_get_total_chunk_length(uchar *page, uint16 offset)
{
DBUG_ENTER("translog_get_total_chunk_length");
switch (page[offset] & TRANSLOG_CHUNK_TYPE) {
case TRANSLOG_CHUNK_LSN:
{
/* 0 chunk referred as LSN (head or tail) */
translog_size_t rec_len;
uchar *start= page + offset;
uchar *ptr= start + 1 + 2; /* chunk type and short trid */
uint16 chunk_len, header_len, page_rest;
DBUG_PRINT("info", ("TRANSLOG_CHUNK_LSN"));
rec_len= translog_variable_record_1group_decode_len(&ptr);
chunk_len= uint2korr(ptr);
header_len= (uint16) (ptr -start) + 2;
DBUG_PRINT("info", ("rec len: %lu chunk len: %u header len: %u",
(ulong) rec_len, (uint) chunk_len, (uint) header_len));
if (chunk_len)
{
DBUG_PRINT("info", ("chunk len: %u + %u = %u",
(uint) header_len, (uint) chunk_len,
(uint) (chunk_len + header_len)));
DBUG_RETURN(chunk_len + header_len);
}
page_rest= TRANSLOG_PAGE_SIZE - offset;
DBUG_PRINT("info", ("page_rest %u", (uint) page_rest));
if (rec_len + header_len < page_rest)
DBUG_RETURN(rec_len + header_len);
DBUG_RETURN(page_rest);
}
case TRANSLOG_CHUNK_FIXED:
{
uchar *ptr;
uint type= page[offset] & TRANSLOG_REC_TYPE;
uint length;
int i;
/* 1 (pseudo)fixed record (also LSN) */
DBUG_PRINT("info", ("TRANSLOG_CHUNK_FIXED"));
DBUG_ASSERT(log_record_type_descriptor[type].rclass ==
LOGRECTYPE_FIXEDLENGTH ||
log_record_type_descriptor[type].rclass ==
LOGRECTYPE_PSEUDOFIXEDLENGTH);
if (log_record_type_descriptor[type].rclass == LOGRECTYPE_FIXEDLENGTH)
{
DBUG_PRINT("info",
("Fixed length: %u",
(uint) (log_record_type_descriptor[type].fixed_length + 3)));
DBUG_RETURN(log_record_type_descriptor[type].fixed_length + 3);
}
ptr= page + offset + 3; /* first compressed LSN */
length= log_record_type_descriptor[type].fixed_length + 3;
for (i= 0; i < log_record_type_descriptor[type].compressed_LSN; i++)
{
/* first 2 bits is length - 2 */
uint len= (((uint8) (*ptr)) >> 6) + 2;
if (ptr[0] == 0 && ((uint8) ptr[1]) == 1)
len+= LSN_STORE_SIZE; /* case of full LSN storing */
ptr+= len;
/* subtract saved bytes */
length-= (LSN_STORE_SIZE - len);
}
DBUG_PRINT("info", ("Pseudo-fixed length: %u", length));
DBUG_RETURN(length);
}
case TRANSLOG_CHUNK_NOHDR:
/* 2 no header chunk (till page end) */
DBUG_PRINT("info", ("TRANSLOG_CHUNK_NOHDR length: %u",
(uint) (TRANSLOG_PAGE_SIZE - offset)));
DBUG_RETURN(TRANSLOG_PAGE_SIZE - offset);
case TRANSLOG_CHUNK_LNGTH: /* 3 chunk with chunk length */
DBUG_PRINT("info", ("TRANSLOG_CHUNK_LNGTH"));
DBUG_ASSERT(TRANSLOG_PAGE_SIZE - offset >= 3);
DBUG_PRINT("info", ("length: %u", uint2korr(page + offset + 1) + 3));
DBUG_RETURN(uint2korr(page + offset + 1) + 3);
default:
DBUG_ASSERT(0);
DBUG_RETURN(0);
}
} | O3 | c | translog_get_total_chunk_length:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %esi, %ebx
movl %esi, %eax
leaq (%rdi,%rax), %r15
movzbl (%rdi,%rax), %eax
movl %eax, %ecx
shrl $0x6, %ecx
leaq 0xb221e(%rip), %rdx # 0xe8fb8
movslq (%rdx,%rcx,4), %rcx
addq %rdx, %rcx
jmpq *%rcx
leaq 0x3(%r15), %rax
leaq -0x20(%rbp), %r14
movq %rax, (%r14)
movq %r14, %rdi
callq 0x3b524
movl %eax, %ecx
movq (%r14), %rax
movzwl (%rax), %edx
subl %r15d, %eax
addl $0x2, %eax
testw %dx, %dx
je 0x36e44
addl %edx, %eax
jmp 0x36df9
movl $0x2000, %eax # imm = 0x2000
subl %ebx, %eax
jmp 0x36df9
movzwl 0x1(%r15), %eax
jmp 0x36df6
andl $0x3f, %eax
leaq (%rax,%rax,8), %rcx
leaq 0x3cf195(%rip), %rdx # 0x405f80
cmpl $0x3, (%rdx,%rcx,8)
movzwl 0x4(%rdx,%rcx,8), %eax
jne 0x36e04
addl $0x3, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
leaq (%rdx,%rcx,8), %rcx
addl $0x3, %eax
movswl 0x20(%rcx), %ecx
testl %ecx, %ecx
jle 0x36df9
addq $0x3, %r15
movzbl (%r15), %esi
movl %esi, %edx
shrl $0x6, %edx
addl $0x2, %edx
testl %esi, %esi
jne 0x36e34
cmpb $0x1, 0x1(%r15)
leal 0x7(%rdx), %esi
cmovnel %edx, %esi
movl %esi, %edx
movl %edx, %esi
addq %rsi, %r15
addl %edx, %eax
addl $-0x7, %eax
decl %ecx
jne 0x36e17
jmp 0x36df9
movl $0x2000, %edx # imm = 0x2000
subl %ebx, %edx
movzwl %ax, %eax
addl %eax, %ecx
movzwl %dx, %eax
cmpl %eax, %ecx
cmovael %edx, %ecx
movl %ecx, %eax
jmp 0x36df9
| translog_get_total_chunk_length:
push rbp
mov rbp, rsp
push r15
push r14
push rbx
push rax
mov ebx, esi
mov eax, esi
lea r15, [rdi+rax]
movzx eax, byte ptr [rdi+rax]
mov ecx, eax
shr ecx, 6
lea rdx, jpt_36DA1
movsxd rcx, ds:(jpt_36DA1 - 0E8FB8h)[rdx+rcx*4]; switch 4 cases
add rcx, rdx
jmp rcx; switch jump
loc_36DA3:
lea rax, [r15+3]; jumptable 0000000000036DA1 case 0
lea r14, [rbp+var_20]
mov [r14], rax
mov rdi, r14
call translog_variable_record_1group_decode_len
mov ecx, eax
mov rax, [r14]
movzx edx, word ptr [rax]
sub eax, r15d
add eax, 2
test dx, dx
jz short loc_36E44
add eax, edx
jmp short loc_36DF9
loc_36DCD:
mov eax, 2000h; jumptable 0000000000036DA1 case 2
sub eax, ebx
jmp short loc_36DF9
loc_36DD6:
movzx eax, word ptr [r15+1]; jumptable 0000000000036DA1 case 3
jmp short loc_36DF6
loc_36DDD:
and eax, 3Fh; jumptable 0000000000036DA1 case 1
lea rcx, [rax+rax*8]
lea rdx, log_record_type_descriptor
cmp dword ptr [rdx+rcx*8], 3
movzx eax, word ptr [rdx+rcx*8+4]
jnz short loc_36E04
loc_36DF6:
add eax, 3
loc_36DF9:
add rsp, 8
pop rbx
pop r14
pop r15
pop rbp
retn
loc_36E04:
lea rcx, [rdx+rcx*8]
add eax, 3
movsx ecx, word ptr [rcx+20h]
test ecx, ecx
jle short loc_36DF9
add r15, 3
loc_36E17:
movzx esi, byte ptr [r15]
mov edx, esi
shr edx, 6
add edx, 2
test esi, esi
jnz short loc_36E34
cmp byte ptr [r15+1], 1
lea esi, [rdx+7]
cmovnz esi, edx
mov edx, esi
loc_36E34:
mov esi, edx
add r15, rsi
add eax, edx
add eax, 0FFFFFFF9h
dec ecx
jnz short loc_36E17
jmp short loc_36DF9
loc_36E44:
mov edx, 2000h
sub edx, ebx
movzx eax, ax
add ecx, eax
movzx eax, dx
cmp ecx, eax
cmovnb ecx, edx
mov eax, ecx
jmp short loc_36DF9
| long long translog_get_total_chunk_length(long long a1, unsigned int a2)
{
unsigned __int16 *v2; // rax
unsigned __int8 *v3; // r15
int v4; // ecx
int v5; // edx
int v6; // eax
long long result; // rax
int v8; // eax
int v9; // ecx
unsigned __int8 *v10; // r15
unsigned int v11; // edx
int v12; // esi
unsigned int v13; // ecx
unsigned __int16 *v14; // [rsp+0h] [rbp-20h] BYREF
v14 = v2;
v3 = (unsigned __int8 *)(a1 + a2);
switch ( *v3 >> 6 )
{
case 0:
v14 = (unsigned __int16 *)(v3 + 3);
v4 = translog_variable_record_1group_decode_len(&v14);
v5 = *v14;
v6 = (_DWORD)v14 - (_DWORD)v3 + 2;
if ( (_WORD)v5 )
{
result = (unsigned int)(v5 + v6);
}
else
{
v13 = (unsigned __int16)v6 + v4;
if ( v13 >= (unsigned __int16)(0x2000 - a2) )
v13 = 0x2000 - a2;
result = v13;
}
break;
case 1:
v8 = *((unsigned __int16 *)&log_record_type_descriptor + 36 * (*v3 & 0x3F) + 2);
if ( *((_DWORD *)&log_record_type_descriptor + 18 * (*v3 & 0x3F)) == 3 )
goto LABEL_7;
result = (unsigned int)(v8 + 3);
v9 = *((__int16 *)&log_record_type_descriptor + 36 * (*v3 & 0x3F) + 16);
if ( v9 > 0 )
{
v10 = v3 + 3;
do
{
v11 = (*v10 >> 6) + 2;
if ( !*v10 )
{
v12 = (*v10 >> 6) + 9;
if ( v10[1] != 1 )
v12 = (*v10 >> 6) + 2;
v11 = v12;
}
v10 += v11;
result = v11 + (unsigned int)result - 7;
--v9;
}
while ( v9 );
}
break;
case 2:
result = 0x2000 - a2;
break;
case 3:
v8 = *(unsigned __int16 *)(v3 + 1);
LABEL_7:
result = (unsigned int)(v8 + 3);
break;
}
return result;
}
| translog_get_total_chunk_length:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH RBX
PUSH RAX
MOV EBX,ESI
MOV EAX,ESI
LEA R15,[RDI + RAX*0x1]
MOVZX EAX,byte ptr [RDI + RAX*0x1]
MOV ECX,EAX
SHR ECX,0x6
LEA RDX,[0x1e8fb8]
MOVSXD RCX,dword ptr [RDX + RCX*0x4]
ADD RCX,RDX
JMP RCX
|
void translog_get_total_chunk_length(long param_1,uint param_2)
{
/* WARNING: Could not recover jumptable at 0x00136da1. Too many branches */
/* WARNING: Treating indirect jump as call */
(*(code *)(&DAT_001e8fb8 +
*(int *)(&DAT_001e8fb8 + (ulong)(*(byte *)(param_1 + (ulong)param_2) >> 6) * 4)))();
return;
}
| |
51,826 | check_skipped_lsn | eloqsql/storage/maria/ma_loghandler.c | void check_skipped_lsn(MARIA_HA *info, LSN lsn, my_bool index_file,
pgcache_page_no_t page)
{
if (lsn <= log_descriptor.horizon)
{
DBUG_PRINT("info", ("Page is up to date, skipping redo"));
}
else
{
/* Give error, but don't flood the log */
if (skipped_lsn_err_count++ < MAX_LSN_ERRORS &&
! info->s->redo_error_given++)
{
eprint(tracef, "Table %s has wrong LSN: " LSN_FMT " on page: %llu",
(index_file ? info->s->data_file_name.str :
info->s->index_file_name.str),
LSN_IN_PARTS(lsn), (ulonglong) page);
recovery_found_crashed_tables++;
}
}
} | O0 | c | check_skipped_lsn:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movb %dl, %al
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movb %al, -0x11(%rbp)
movq %rcx, -0x20(%rbp)
movq -0x10(%rbp), %rax
cmpq 0xc46044(%rip), %rax # 0xc7b8b8
jg 0x3587f
jmp 0x35878
jmp 0x3587a
jmp 0x3594b
leaq 0xc4643a(%rip), %rax # 0xc7bcc0
movl (%rax), %eax
movl %eax, %edx
addl $0x1, %edx
leaq 0xc4642c(%rip), %rcx # 0xc7bcc0
movl %edx, (%rcx)
cmpl $0xa, %eax
jae 0x35949
movq -0x8(%rbp), %rax
movq (%rax), %rcx
movb 0x7eb(%rcx), %al
movb %al, %dl
addb $0x1, %dl
movb %dl, 0x7eb(%rcx)
cmpb $0x0, %al
jne 0x35949
leaq 0xc463ea(%rip), %rax # 0xc7bcb0
movq (%rax), %rax
movq %rax, -0x28(%rbp)
movsbl -0x11(%rbp), %eax
cmpl $0x0, %eax
je 0x358ea
movq -0x8(%rbp), %rax
movq (%rax), %rax
movq 0x5c0(%rax), %rax
movq %rax, -0x30(%rbp)
jmp 0x358fc
movq -0x8(%rbp), %rax
movq (%rax), %rax
movq 0x5d0(%rax), %rax
movq %rax, -0x30(%rbp)
movq -0x28(%rbp), %rdi
movq -0x30(%rbp), %rdx
movq -0x10(%rbp), %rax
sarq $0x20, %rax
movl %eax, %ecx
movabsq $0xffffffff, %rax # imm = 0xFFFFFFFF
andq -0x10(%rbp), %rax
movl %eax, %r8d
movq -0x20(%rbp), %r9
leaq 0x11d586(%rip), %rsi # 0x152eb0
movb $0x0, %al
callq 0x43140
leaq 0xc46380(%rip), %rax # 0xc7bcb8
movq (%rax), %rcx
addq $0x1, %rcx
leaq 0xc46372(%rip), %rax # 0xc7bcb8
movq %rcx, (%rax)
jmp 0x3594b
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
| check_skipped_lsn:
push rbp
mov rbp, rsp
sub rsp, 30h
mov al, dl
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov [rbp+var_11], al
mov [rbp+var_20], rcx
mov rax, [rbp+var_10]
cmp rax, cs:qword_C7B8B8
jg short loc_3587F
jmp short $+2
loc_35878:
jmp short $+2
loc_3587A:
jmp loc_3594B
loc_3587F:
lea rax, skipped_lsn_err_count
mov eax, [rax]
mov edx, eax
add edx, 1
lea rcx, skipped_lsn_err_count
mov [rcx], edx
cmp eax, 0Ah
jnb loc_35949
mov rax, [rbp+var_8]
mov rcx, [rax]
mov al, [rcx+7EBh]
mov dl, al
add dl, 1
mov [rcx+7EBh], dl
cmp al, 0
jnz loc_35949
lea rax, tracef
mov rax, [rax]
mov [rbp+var_28], rax
movsx eax, [rbp+var_11]
cmp eax, 0
jz short loc_358EA
mov rax, [rbp+var_8]
mov rax, [rax]
mov rax, [rax+5C0h]
mov [rbp+var_30], rax
jmp short loc_358FC
loc_358EA:
mov rax, [rbp+var_8]
mov rax, [rax]
mov rax, [rax+5D0h]
mov [rbp+var_30], rax
loc_358FC:
mov rdi, [rbp+var_28]
mov rdx, [rbp+var_30]
mov rax, [rbp+var_10]
sar rax, 20h
mov ecx, eax
mov rax, 0FFFFFFFFh
and rax, [rbp+var_10]
mov r8d, eax
mov r9, [rbp+var_20]
lea rsi, aTableSHasWrong; "Table %s has wrong LSN: (%u,0x%x) on pa"...
mov al, 0
call eprint
lea rax, recovery_found_crashed_tables
mov rcx, [rax]
add rcx, 1
lea rax, recovery_found_crashed_tables
mov [rax], rcx
loc_35949:
jmp short $+2
loc_3594B:
add rsp, 30h
pop rbp
retn
| char check_skipped_lsn(long long a1, long long a2, char a3, int a4)
{
_QWORD *v4; // rax
LOBYTE(v4) = a2;
if ( a2 > qword_C7B8B8 )
{
LODWORD(v4) = skipped_lsn_err_count++;
if ( (unsigned int)v4 < 0xA )
{
LOBYTE(v4) = *(_BYTE *)(*(_QWORD *)a1 + 2027LL);
*(_BYTE *)(*(_QWORD *)a1 + 2027LL) = (_BYTE)v4 + 1;
if ( !(_BYTE)v4 )
{
if ( a3 )
eprint(
tracef,
(unsigned int)"Table %s has wrong LSN: (%u,0x%x) on page: %llu",
*(_QWORD *)(*(_QWORD *)a1 + 1472LL),
HIDWORD(a2),
a2,
a4,
*(_QWORD *)(*(_QWORD *)a1 + 1472LL));
else
eprint(
tracef,
(unsigned int)"Table %s has wrong LSN: (%u,0x%x) on page: %llu",
*(_QWORD *)(*(_QWORD *)a1 + 1488LL),
HIDWORD(a2),
a2,
a4,
*(_QWORD *)(*(_QWORD *)a1 + 1488LL));
v4 = &recovery_found_crashed_tables;
++recovery_found_crashed_tables;
}
}
}
return (char)v4;
}
| check_skipped_lsn:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x30
MOV AL,DL
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV byte ptr [RBP + -0x11],AL
MOV qword ptr [RBP + -0x20],RCX
MOV RAX,qword ptr [RBP + -0x10]
CMP RAX,qword ptr [0x00d7b8b8]
JG 0x0013587f
JMP 0x00135878
LAB_00135878:
JMP 0x0013587a
LAB_0013587a:
JMP 0x0013594b
LAB_0013587f:
LEA RAX,[0xd7bcc0]
MOV EAX,dword ptr [RAX]
MOV EDX,EAX
ADD EDX,0x1
LEA RCX,[0xd7bcc0]
MOV dword ptr [RCX],EDX
CMP EAX,0xa
JNC 0x00135949
MOV RAX,qword ptr [RBP + -0x8]
MOV RCX,qword ptr [RAX]
MOV AL,byte ptr [RCX + 0x7eb]
MOV DL,AL
ADD DL,0x1
MOV byte ptr [RCX + 0x7eb],DL
CMP AL,0x0
JNZ 0x00135949
LEA RAX,[0xd7bcb0]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x28],RAX
MOVSX EAX,byte ptr [RBP + -0x11]
CMP EAX,0x0
JZ 0x001358ea
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX]
MOV RAX,qword ptr [RAX + 0x5c0]
MOV qword ptr [RBP + -0x30],RAX
JMP 0x001358fc
LAB_001358ea:
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX]
MOV RAX,qword ptr [RAX + 0x5d0]
MOV qword ptr [RBP + -0x30],RAX
LAB_001358fc:
MOV RDI,qword ptr [RBP + -0x28]
MOV RDX,qword ptr [RBP + -0x30]
MOV RAX,qword ptr [RBP + -0x10]
SAR RAX,0x20
MOV ECX,EAX
MOV RAX,0xffffffff
AND RAX,qword ptr [RBP + -0x10]
MOV R8D,EAX
MOV R9,qword ptr [RBP + -0x20]
LEA RSI,[0x252eb0]
MOV AL,0x0
CALL 0x00143140
LEA RAX,[0xd7bcb8]
MOV RCX,qword ptr [RAX]
ADD RCX,0x1
LEA RAX,[0xd7bcb8]
MOV qword ptr [RAX],RCX
LAB_00135949:
JMP 0x0013594b
LAB_0013594b:
ADD RSP,0x30
POP RBP
RET
|
void check_skipped_lsn(long *param_1,ulong param_2,char param_3,int8 param_4)
{
char cVar1;
uint uVar2;
bool bVar3;
int8 local_38;
if (((DAT_00d7b8b8 < (long)param_2) &&
(uVar2 = skipped_lsn_err_count + 1, bVar3 = skipped_lsn_err_count < 10,
skipped_lsn_err_count = uVar2, bVar3)) &&
(cVar1 = *(char *)(*param_1 + 0x7eb), *(char *)(*param_1 + 0x7eb) = cVar1 + '\x01',
cVar1 == '\0')) {
if (param_3 == '\0') {
local_38 = *(int8 *)(*param_1 + 0x5d0);
}
else {
local_38 = *(int8 *)(*param_1 + 0x5c0);
}
eprint(tracef,"Table %s has wrong LSN: (%u,0x%x) on page: %llu",local_38,
(long)param_2 >> 0x20 & 0xffffffff,param_2 & 0xffffffff,param_4);
recovery_found_crashed_tables = recovery_found_crashed_tables + 1;
}
return;
}
| |
51,827 | void nlohmann::json_abi_v3_11_3::detail::from_json<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> const&, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>::boolean_t&) | monkey531[P]llama/common/json.hpp | inline void from_json(const BasicJsonType& j, typename BasicJsonType::boolean_t& b)
{
if (JSON_HEDLEY_UNLIKELY(!j.is_boolean()))
{
JSON_THROW(type_error::create(302, concat("type must be boolean, but is ", j.type_name()), &j));
}
b = *j.template get_ptr<const typename BasicJsonType::boolean_t*>();
} | O1 | cpp | void nlohmann::json_abi_v3_11_3::detail::from_json<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> const&, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>::boolean_t&):
pushq %rbp
pushq %r14
pushq %rbx
subq $0x30, %rsp
movq %rdi, %r14
cmpb $0x4, (%rdi)
jne 0x89204
movb 0x8(%r14), %al
movb %al, (%rsi)
addq $0x30, %rsp
popq %rbx
popq %r14
popq %rbp
retq
movl $0x20, %edi
callq 0x1b430
movq %rax, %rbx
movq %r14, %rdi
callq 0x60036
leaq 0x8(%rsp), %rdx
movq %rax, (%rdx)
leaq 0x69967(%rip), %rsi # 0xf2b8f
leaq 0x10(%rsp), %rdi
callq 0x8929d
movb $0x1, %bpl
leaq 0x10(%rsp), %rdx
movq %rbx, %rdi
movl $0x12e, %esi # imm = 0x12E
movq %r14, %rcx
callq 0x883c0
xorl %ebp, %ebp
leaq 0xa3cc5(%rip), %rsi # 0x12cf18
leaq -0x2d0e2(%rip), %rdx # 0x5c178
movq %rbx, %rdi
callq 0x1bf20
movq %rax, %r14
leaq 0x20(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x89288
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x1b8e0
jmp 0x89288
movq %rax, %r14
movb $0x1, %bpl
testb %bpl, %bpl
je 0x89295
movq %rbx, %rdi
callq 0x1b670
movq %r14, %rdi
callq 0x1bfb0
| _ZN8nlohmann16json_abi_v3_11_36detail9from_jsonINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEEEvRKT_RNSG_9boolean_tE:
push rbp; char
push r14; int
push rbx; __int64
sub rsp, 30h
mov r14, rdi
cmp byte ptr [rdi], 4
jnz short loc_89204
mov al, [r14+8]
mov [rsi], al
add rsp, 30h
pop rbx
pop r14
pop rbp
retn
loc_89204:
mov edi, 20h ; ' '; thrown_size
call ___cxa_allocate_exception
mov rbx, rax
mov rdi, r14
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE9type_nameEv; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::type_name(void)
lea rdx, [rsp+48h+var_40]
mov [rdx], rax
lea rsi, aTypeMustBeBool; "type must be boolean, but is "
lea rdi, [rsp+48h+var_38]
call _ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJRA30_KcPS9_EEET_DpOT0_; nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[30],char const*>(char const(&)[30],char const* &&)
mov bpl, 1
lea rdx, [rsp+48h+var_38]
mov rdi, rbx; this
mov esi, 12Eh; int
mov rcx, r14
call _ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_
xor ebp, ebp
lea rsi, _ZTIN8nlohmann16json_abi_v3_11_36detail10type_errorE; lptinfo
lea rdx, _ZN8nlohmann16json_abi_v3_11_36detail9exceptionD2Ev; void (*)(void *)
mov rdi, rbx; void *
call ___cxa_throw
mov r14, rax
lea rax, [rsp+48h+var_28]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_89288
mov rsi, [rsp+48h+var_28]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_89288
mov r14, rax
mov bpl, 1
loc_89288:
test bpl, bpl
jz short loc_89295
mov rdi, rbx; void *
call ___cxa_free_exception
loc_89295:
mov rdi, r14
call __Unwind_Resume
| unsigned __int8 nlohmann::json_abi_v3_11_3::detail::from_json<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,
unsigned __int8 *a2)
{
unsigned __int8 result; // al
nlohmann::json_abi_v3_11_3::detail::exception *exception; // rbx
_QWORD v4[2]; // [rsp+10h] [rbp-38h] BYREF
if ( *a1 != 4 )
{
exception = (nlohmann::json_abi_v3_11_3::detail::exception *)__cxa_allocate_exception(0x20uLL);
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::type_name(a1);
nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[30],char const*>(
v4,
"type must be boolean, but is ");
ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_(
exception,
302,
v4);
__cxa_throw(
exception,
(struct type_info *)&`typeinfo for'nlohmann::json_abi_v3_11_3::detail::type_error,
(void (*)(void *))nlohmann::json_abi_v3_11_3::detail::exception::~exception);
}
result = a1[8];
*a2 = result;
return result;
}
| from_json<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>:
PUSH RBP
PUSH R14
PUSH RBX
SUB RSP,0x30
MOV R14,RDI
CMP byte ptr [RDI],0x4
JNZ 0x00189204
MOV AL,byte ptr [R14 + 0x8]
MOV byte ptr [RSI],AL
ADD RSP,0x30
POP RBX
POP R14
POP RBP
RET
LAB_00189204:
MOV EDI,0x20
CALL 0x0011b430
MOV RBX,RAX
MOV RDI,R14
CALL 0x00160036
LEA RDX,[RSP + 0x8]
MOV qword ptr [RDX],RAX
LAB_00189221:
LEA RSI,[0x1f2b8f]
LEA RDI,[RSP + 0x10]
CALL 0x0018929d
MOV BPL,0x1
LAB_00189235:
LEA RDX,[RSP + 0x10]
MOV RDI,RBX
MOV ESI,0x12e
MOV RCX,R14
CALL 0x001883c0
XOR EBP,EBP
LEA RSI,[0x22cf18]
LEA RDX,[0x15c178]
MOV RDI,RBX
CALL 0x0011bf20
|
/* void
nlohmann::json_abi_v3_11_3::detail::from_json<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,
std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void> >(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,
std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void> 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>::boolean_t&) */
void nlohmann::json_abi_v3_11_3::detail::
from_json<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,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 *param_1,boolean_t *param_2)
{
int8 uVar1;
char *local_40;
detail local_38 [32];
if (*param_1 == (basic_json)0x4) {
*param_2 = param_1[8];
return;
}
uVar1 = __cxa_allocate_exception(0x20);
local_40 = (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>
::type_name((basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,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);
/* try { // try from 00189221 to 00189231 has its CatchHandler @ 00189282 */
concat<std::__cxx11::string,char_const(&)[30],char_const*>
(local_38,"type must be boolean, but is ",&local_40);
/* try { // try from 00189235 to 00189261 has its CatchHandler @ 00189262 */
_ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_
(uVar1,0x12e,local_38,param_1);
/* WARNING: Subroutine does not return */
__cxa_throw(uVar1,&type_error::typeinfo,exception::~exception);
}
| |
51,828 | void nlohmann::json_abi_v3_11_3::detail::from_json<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> const&, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>::boolean_t&) | monkey531[P]llama/common/json.hpp | inline void from_json(const BasicJsonType& j, typename BasicJsonType::boolean_t& b)
{
if (JSON_HEDLEY_UNLIKELY(!j.is_boolean()))
{
JSON_THROW(type_error::create(302, concat("type must be boolean, but is ", j.type_name()), &j));
}
b = *j.template get_ptr<const typename BasicJsonType::boolean_t*>();
} | O3 | cpp | void nlohmann::json_abi_v3_11_3::detail::from_json<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> const&, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>::boolean_t&):
pushq %rbp
pushq %r14
pushq %rbx
subq $0x30, %rsp
movq %rdi, %r14
cmpb $0x4, (%rdi)
jne 0x87d34
movb 0x8(%r14), %al
movb %al, (%rsi)
addq $0x30, %rsp
popq %rbx
popq %r14
popq %rbp
retq
movl $0x20, %edi
callq 0x1a430
movq %rax, %rbx
movq %r14, %rdi
callq 0x5f6cc
leaq 0x8(%rsp), %rdx
movq %rax, (%rdx)
leaq 0x67e27(%rip), %rsi # 0xefb7f
leaq 0x10(%rsp), %rdi
callq 0x87dca
movb $0x1, %bpl
leaq 0x10(%rsp), %rdx
movq %rbx, %rdi
movl $0x12e, %esi # imm = 0x12E
movq %r14, %rcx
callq 0x86e88
xorl %ebp, %ebp
leaq 0xa21d5(%rip), %rsi # 0x129f58
leaq -0x2c488(%rip), %rdx # 0x5b902
movq %rbx, %rdi
callq 0x1af20
movq %rax, %r14
leaq 0x20(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x87db0
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x1a8e0
testb %bpl, %bpl
jne 0x87dba
jmp 0x87dc2
movq %rax, %r14
movq %rbx, %rdi
callq 0x1a670
movq %r14, %rdi
callq 0x1afb0
| _ZN8nlohmann16json_abi_v3_11_36detail9from_jsonINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEEEvRKT_RNSG_9boolean_tE:
push rbp; char
push r14; int
push rbx; __int64
sub rsp, 30h
mov r14, rdi
cmp byte ptr [rdi], 4
jnz short loc_87D34
mov al, [r14+8]
mov [rsi], al
add rsp, 30h
pop rbx
pop r14
pop rbp
retn
loc_87D34:
mov edi, 20h ; ' '; thrown_size
call ___cxa_allocate_exception
mov rbx, rax
mov rdi, r14
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE9type_nameEv; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::type_name(void)
lea rdx, [rsp+48h+var_40]
mov [rdx], rax
lea rsi, aTypeMustBeBool; "type must be boolean, but is "
lea rdi, [rsp+48h+var_38]
call _ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJRA30_KcPS9_EEET_DpOT0_; nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[30],char const*>(char const(&)[30],char const* &&)
mov bpl, 1
lea rdx, [rsp+48h+var_38]
mov rdi, rbx; this
mov esi, 12Eh; int
mov rcx, r14
call _ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_
xor ebp, ebp
lea rsi, _ZTIN8nlohmann16json_abi_v3_11_36detail10type_errorE; lptinfo
lea rdx, _ZN8nlohmann16json_abi_v3_11_36detail9exceptionD2Ev; void (*)(void *)
mov rdi, rbx; void *
call ___cxa_throw
mov r14, rax
lea rax, [rsp+48h+var_28]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_87DB0
mov rsi, [rsp+48h+var_28]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_87DB0:
test bpl, bpl
jnz short loc_87DBA
jmp short loc_87DC2
mov r14, rax
loc_87DBA:
mov rdi, rbx; void *
call ___cxa_free_exception
loc_87DC2:
mov rdi, r14
call __Unwind_Resume
| unsigned __int8 nlohmann::json_abi_v3_11_3::detail::from_json<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,
unsigned __int8 *a2)
{
unsigned __int8 result; // al
nlohmann::json_abi_v3_11_3::detail::exception *exception; // rbx
_QWORD v4[2]; // [rsp+10h] [rbp-38h] BYREF
if ( *a1 != 4 )
{
exception = (nlohmann::json_abi_v3_11_3::detail::exception *)__cxa_allocate_exception(0x20uLL);
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::type_name(a1);
nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[30],char const*>(
v4,
"type must be boolean, but is ");
ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_(
exception,
302,
v4);
__cxa_throw(
exception,
(struct type_info *)&`typeinfo for'nlohmann::json_abi_v3_11_3::detail::type_error,
(void (*)(void *))nlohmann::json_abi_v3_11_3::detail::exception::~exception);
}
result = a1[8];
*a2 = result;
return result;
}
| from_json<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>:
PUSH RBP
PUSH R14
PUSH RBX
SUB RSP,0x30
MOV R14,RDI
CMP byte ptr [RDI],0x4
JNZ 0x00187d34
MOV AL,byte ptr [R14 + 0x8]
MOV byte ptr [RSI],AL
ADD RSP,0x30
POP RBX
POP R14
POP RBP
RET
LAB_00187d34:
MOV EDI,0x20
CALL 0x0011a430
MOV RBX,RAX
MOV RDI,R14
CALL 0x0015f6cc
LEA RDX,[RSP + 0x8]
MOV qword ptr [RDX],RAX
LAB_00187d51:
LEA RSI,[0x1efb7f]
LEA RDI,[RSP + 0x10]
CALL 0x00187dca
MOV BPL,0x1
LAB_00187d65:
LEA RDX,[RSP + 0x10]
MOV RDI,RBX
MOV ESI,0x12e
MOV RCX,R14
CALL 0x00186e88
XOR EBP,EBP
LEA RSI,[0x229f58]
LEA RDX,[0x15b902]
MOV RDI,RBX
CALL 0x0011af20
|
/* void
nlohmann::json_abi_v3_11_3::detail::from_json<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,
std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void> >(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,
std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void> 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>::boolean_t&) */
void nlohmann::json_abi_v3_11_3::detail::
from_json<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,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 *param_1,boolean_t *param_2)
{
int8 uVar1;
char *local_40;
detail local_38 [32];
if (*param_1 == (basic_json)0x4) {
*param_2 = param_1[8];
return;
}
uVar1 = __cxa_allocate_exception(0x20);
local_40 = (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>
::type_name((basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,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);
/* try { // try from 00187d51 to 00187d61 has its CatchHandler @ 00187db7 */
concat<std::__cxx11::string,char_const(&)[30],char_const*>
(local_38,"type must be boolean, but is ",&local_40);
/* try { // try from 00187d65 to 00187d91 has its CatchHandler @ 00187d92 */
_ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_
(uVar1,0x12e,local_38,param_1);
/* WARNING: Subroutine does not return */
__cxa_throw(uVar1,&type_error::typeinfo,exception::~exception);
}
| |
51,829 | set_dynamic | eloqsql/mysys/array.c | my_bool set_dynamic(DYNAMIC_ARRAY *array, const void *element, uint idx)
{
if (idx >= array->elements)
{
if (idx >= array->max_element && allocate_dynamic(array, idx))
return TRUE;
bzero((uchar*) (array->buffer+array->elements*array->size_of_element),
(idx - array->elements)*array->size_of_element);
array->elements=idx+1;
}
memcpy(array->buffer+(idx * array->size_of_element),element,
(size_t) array->size_of_element);
return FALSE;
} | O3 | c | set_dynamic:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %edx, %r14d
movq %rsi, %rbx
movq %rdi, %r15
movl 0x8(%rdi), %eax
cmpl %edx, %eax
ja 0x44ada
cmpl %r14d, 0xc(%r15)
ja 0x44ab7
movq %r15, %rdi
movl %r14d, %esi
callq 0x44afd
movl %eax, %ecx
movb $0x1, %al
testb %cl, %cl
jne 0x44af2
movl 0x8(%r15), %eax
movl 0x14(%r15), %ecx
movl %r14d, %edx
subl %eax, %edx
imull %ecx, %edx
movl %ecx, %edi
imull %eax, %edi
addq (%r15), %rdi
xorl %esi, %esi
callq 0x261c0
leal 0x1(%r14), %eax
movl %eax, 0x8(%r15)
movl 0x14(%r15), %edx
imull %edx, %r14d
addq (%r15), %r14
movq %r14, %rdi
movq %rbx, %rsi
callq 0x26290
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
| set_dynamic:
push rbp
mov rbp, rsp
push r15
push r14
push rbx
push rax
mov r14d, edx
mov rbx, rsi
mov r15, rdi
mov eax, [rdi+8]
cmp eax, edx
ja short loc_44ADA
cmp [r15+0Ch], r14d
ja short loc_44AB7
mov rdi, r15
mov esi, r14d
call allocate_dynamic
mov ecx, eax
mov al, 1
test cl, cl
jnz short loc_44AF2
mov eax, [r15+8]
loc_44AB7:
mov ecx, [r15+14h]
mov edx, r14d
sub edx, eax
imul edx, ecx
mov edi, ecx
imul edi, eax
add rdi, [r15]
xor esi, esi
call _memset
lea eax, [r14+1]
mov [r15+8], eax
loc_44ADA:
mov edx, [r15+14h]
imul r14d, edx
add r14, [r15]
mov rdi, r14
mov rsi, rbx
call _memcpy
xor eax, eax
loc_44AF2:
add rsp, 8
pop rbx
pop r14
pop r15
pop rbp
retn
| char set_dynamic(long long a1, long long a2, unsigned int a3)
{
unsigned int v4; // eax
char dynamic; // cl
char result; // al
v4 = *(_DWORD *)(a1 + 8);
if ( v4 <= a3 )
{
if ( *(_DWORD *)(a1 + 12) <= a3 )
{
dynamic = allocate_dynamic(a1, a3);
result = 1;
if ( dynamic )
return result;
v4 = *(_DWORD *)(a1 + 8);
}
memset(*(_QWORD *)a1 + v4 * *(_DWORD *)(a1 + 20), 0LL, *(_DWORD *)(a1 + 20) * (a3 - v4));
*(_DWORD *)(a1 + 8) = a3 + 1;
}
memcpy(*(_QWORD *)a1 + *(_DWORD *)(a1 + 20) * a3, a2, *(unsigned int *)(a1 + 20));
return 0;
}
| set_dynamic:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH RBX
PUSH RAX
MOV R14D,EDX
MOV RBX,RSI
MOV R15,RDI
MOV EAX,dword ptr [RDI + 0x8]
CMP EAX,EDX
JA 0x00144ada
CMP dword ptr [R15 + 0xc],R14D
JA 0x00144ab7
MOV RDI,R15
MOV ESI,R14D
CALL 0x00144afd
MOV ECX,EAX
MOV AL,0x1
TEST CL,CL
JNZ 0x00144af2
MOV EAX,dword ptr [R15 + 0x8]
LAB_00144ab7:
MOV ECX,dword ptr [R15 + 0x14]
MOV EDX,R14D
SUB EDX,EAX
IMUL EDX,ECX
MOV EDI,ECX
IMUL EDI,EAX
ADD RDI,qword ptr [R15]
XOR ESI,ESI
CALL 0x001261c0
LEA EAX,[R14 + 0x1]
MOV dword ptr [R15 + 0x8],EAX
LAB_00144ada:
MOV EDX,dword ptr [R15 + 0x14]
IMUL R14D,EDX
ADD R14,qword ptr [R15]
MOV RDI,R14
MOV RSI,RBX
CALL 0x00126290
XOR EAX,EAX
LAB_00144af2:
ADD RSP,0x8
POP RBX
POP R14
POP R15
POP RBP
RET
|
int8 set_dynamic(long *param_1,void *param_2,uint param_3)
{
char cVar1;
uint uVar2;
uVar2 = *(uint *)(param_1 + 1);
if (uVar2 <= param_3) {
if (*(uint *)((long)param_1 + 0xc) <= param_3) {
cVar1 = allocate_dynamic(param_1);
if (cVar1 != '\0') {
return 1;
}
uVar2 = *(uint *)(param_1 + 1);
}
memset((void *)((ulong)(*(int *)((long)param_1 + 0x14) * uVar2) + *param_1),0,
(ulong)((param_3 - uVar2) * *(int *)((long)param_1 + 0x14)));
*(uint *)(param_1 + 1) = param_3 + 1;
}
memcpy((void *)((ulong)(param_3 * *(uint *)((long)param_1 + 0x14)) + *param_1),param_2,
(ulong)*(uint *)((long)param_1 + 0x14));
return 0;
}
| |
51,830 | list_reverse | eloqsql/mysys/list.c | LIST *list_reverse(LIST *root)
{
LIST *last;
last=root;
while (root)
{
last=root;
root=root->next;
last->next=last->prev;
last->prev=root;
}
return last;
} | O3 | c | list_reverse:
testq %rdi, %rdi
je 0x94fea
pushq %rbp
movq %rsp, %rbp
movq %rdi, %rax
movq (%rdi), %rcx
movq 0x8(%rdi), %rdi
movq %rcx, 0x8(%rax)
movq %rdi, (%rax)
testq %rdi, %rdi
jne 0x94fd2
popq %rbp
retq
xorl %eax, %eax
retq
| list_reverse:
test rdi, rdi
jz short loc_94FEA
push rbp
mov rbp, rsp
loc_94FD2:
mov rax, rdi
mov rcx, [rdi]
mov rdi, [rdi+8]
mov [rax+8], rcx
mov [rax], rdi
test rdi, rdi
jnz short loc_94FD2
pop rbp
retn
loc_94FEA:
xor eax, eax
retn
| _QWORD * list_reverse(_QWORD *a1)
{
_QWORD *result; // rax
long long v2; // rcx
if ( !a1 )
return 0LL;
do
{
result = a1;
v2 = *a1;
a1 = (_QWORD *)a1[1];
result[1] = v2;
*result = a1;
}
while ( a1 );
return result;
}
| list_reverse:
TEST RDI,RDI
JZ 0x00194fea
PUSH RBP
MOV RBP,RSP
LAB_00194fd2:
MOV RAX,RDI
MOV RCX,qword ptr [RDI]
MOV RDI,qword ptr [RDI + 0x8]
MOV qword ptr [RAX + 0x8],RCX
MOV qword ptr [RAX],RDI
TEST RDI,RDI
JNZ 0x00194fd2
POP RBP
RET
LAB_00194fea:
XOR EAX,EAX
RET
|
int8 * list_reverse(int8 *param_1)
{
int8 *puVar1;
int8 *puVar2;
if (param_1 == (int8 *)0x0) {
return (int8 *)0x0;
}
do {
puVar2 = param_1;
puVar1 = (int8 *)param_1[1];
param_1[1] = *param_1;
*param_1 = puVar1;
param_1 = puVar1;
} while (puVar1 != (int8 *)0x0);
return puVar2;
}
| |
51,831 | ma_bitmap_flush_all | eloqsql/storage/maria/ma_bitmap.c | my_bool _ma_bitmap_flush_all(MARIA_SHARE *share)
{
my_bool res= 0;
uint send_signal= 0;
MARIA_FILE_BITMAP *bitmap= &share->bitmap;
DBUG_ENTER("_ma_bitmap_flush_all");
#ifdef EXTRA_DEBUG_BITMAP
{
char buff[160];
uint len= my_sprintf(buff,
(buff, "bitmap_flush: fd: %d id: %u "
"changed: %d changed_not_flushed: %d "
"flush_all_requested: %d",
share->bitmap.file.file,
share->id,
bitmap->changed,
bitmap->changed_not_flushed,
bitmap->flush_all_requested));
(void) translog_log_debug_info(0, LOGREC_DEBUG_INFO_QUERY,
(uchar*) buff, len);
}
#endif
mysql_mutex_lock(&bitmap->bitmap_lock);
if (!bitmap->changed && !bitmap->changed_not_flushed)
{
mysql_mutex_unlock(&bitmap->bitmap_lock);
DBUG_RETURN(0);
}
_ma_bitmap_mark_file_changed(share, 0);
/*
The following should be true as it was tested above. We have to test
this again as _ma_bitmap_mark_file_changed() did temporarly release
the bitmap mutex.
*/
if (bitmap->changed || bitmap->changed_not_flushed)
{
bitmap->flush_all_requested++;
bitmap->waiting_for_non_flushable++;
#if !WRONG_BITMAP_FLUSH
while (bitmap->non_flushable > 0)
{
DBUG_PRINT("info", ("waiting for bitmap to be flushable"));
mysql_cond_wait(&bitmap->bitmap_cond, &bitmap->bitmap_lock);
}
#endif
bitmap->waiting_for_non_flushable--;
#ifdef EXTRA_DEBUG_BITMAP
{
char tmp[MAX_BITMAP_INFO_LENGTH];
size_t len;
len= _ma_get_bitmap_description(bitmap, bitmap->map, bitmap->page, tmp);
(void) translog_log_debug_info(0, LOGREC_DEBUG_INFO_QUERY,
(uchar*) tmp, len);
}
#endif
DBUG_ASSERT(bitmap->flush_all_requested == 1);
/*
Bitmap is in a flushable state: its contents in memory are reflected by
log records (complete REDO-UNDO groups) and all bitmap pages are
unpinned. We keep the mutex to preserve this situation, and flush to the
file.
*/
if (bitmap->changed)
{
bitmap->changed= FALSE;
res= write_changed_bitmap(share, bitmap);
}
/*
We do NOT use FLUSH_KEEP_LAZY because we must be sure that bitmap
pages have been flushed. That's a condition of correctness of
Recovery: data pages may have been all flushed, if we write the
checkpoint record Recovery will start from after their REDOs. If
bitmap page was not flushed, as the REDOs about it will be skipped, it
will wrongly not be recovered. If bitmap pages had a rec_lsn it would
be different.
There should be no pinned pages as bitmap->non_flushable==0.
*/
if (flush_pagecache_blocks_with_filter(share->pagecache,
&bitmap->file, FLUSH_KEEP,
filter_flush_bitmap_pages,
&bitmap->pages_covered) &
PCFLUSH_PINNED_AND_ERROR)
res= TRUE;
bitmap->changed_not_flushed= FALSE;
bitmap->flush_all_requested--;
/*
Some well-behaved threads may be waiting for flush_all_requested to
become false, wake them up.
*/
DBUG_PRINT("info", ("bitmap flusher waking up others"));
send_signal= (bitmap->waiting_for_flush_all_requested |
bitmap->waiting_for_non_flushable);
}
mysql_mutex_unlock(&bitmap->bitmap_lock);
if (send_signal)
mysql_cond_broadcast(&bitmap->bitmap_cond);
DBUG_RETURN(res);
} | O3 | c | ma_bitmap_flush_all:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x40, %rsp
movq %rdi, %rbx
leaq 0xa98(%rdi), %r14
cmpq $0x0, 0xad8(%rdi)
jne 0x40e3a
movq %r14, %rdi
callq 0x29220
movb 0xa30(%rbx), %al
testb %al, %al
jne 0x40c81
cmpb $0x0, 0xa31(%rbx)
je 0x40e07
cmpb $0x0, 0x7df(%rbx)
jne 0x40c97
testb $0x1, 0x170(%rbx)
jne 0x40e7a
testb %al, %al
jne 0x40ca8
cmpb $0x0, 0xa31(%rbx)
je 0x40e32
incl 0xa40(%rbx)
movl 0xa4c(%rbx), %ecx
leal 0x1(%rcx), %edx
movl %edx, 0xa4c(%rbx)
cmpl $0x0, 0xa48(%rbx)
je 0x40d17
leaq 0xae0(%rbx), %r15
leaq 0x99e22(%rip), %r12 # 0xdaaf6
cmpq $0x0, 0xb10(%rbx)
jne 0x40cf4
movq %r15, %rdi
movq %r14, %rsi
callq 0x29430
cmpl $0x0, 0xa48(%rbx)
jne 0x40cd4
jmp 0x40d09
movq %r15, %rdi
movq %r14, %rsi
movq %r12, %rdx
movl $0x204, %ecx # imm = 0x204
callq 0x2eea0
jmp 0x40ce9
movl 0xa4c(%rbx), %ecx
movb 0xa30(%rbx), %al
decl %ecx
movl %ecx, 0xa4c(%rbx)
xorl %r15d, %r15d
testb %al, %al
je 0x40d81
movw $0x100, 0xa30(%rbx) # imm = 0x100
movq 0x600(%rbx), %rdi
leaq 0xa50(%rbx), %rsi
movq 0xa20(%rbx), %rdx
movq 0xa18(%rbx), %r8
movl 0x80(%rdi), %eax
movl %eax, 0x30(%rsp)
movl %r15d, 0x28(%rsp)
xorps %xmm0, %xmm0
movups %xmm0, 0x18(%rsp)
movl %r15d, 0x10(%rsp)
movl %r15d, (%rsp)
movl $0x1, 0x8(%rsp)
xorl %ecx, %ecx
movl $0x1, %r9d
callq 0x349ca
movl %eax, %r15d
movq 0x600(%rbx), %rdi
leaq 0xa50(%rbx), %rsi
leaq 0xb48(%rbx), %r8
leaq 0x158(%rip), %rcx # 0x40ef5
xorl %edx, %edx
callq 0x350c0
testb $0x3, %al
movzbl %r15b, %eax
movl $0x1, %r15d
cmovel %eax, %r15d
movb $0x0, 0xa31(%rbx)
decl 0xa40(%rbx)
movl 0xa4c(%rbx), %eax
orl 0xa44(%rbx), %eax
sete %r12b
movq 0xad8(%rbx), %rdi
testq %rdi, %rdi
jne 0x40e53
movq %r14, %rdi
callq 0x291e0
testb %r12b, %r12b
jne 0x40e22
movq 0xb10(%rbx), %rdi
addq $0xae0, %rbx # imm = 0xAE0
testq %rdi, %rdi
jne 0x40e68
movq %rbx, %rdi
callq 0x296f0
jmp 0x40e22
movq 0xad8(%rbx), %rdi
testq %rdi, %rdi
jne 0x40eae
movq %r14, %rdi
callq 0x291e0
xorl %r15d, %r15d
movl %r15d, %eax
addq $0x40, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movb $0x1, %r12b
xorl %r15d, %r15d
jmp 0x40dd1
leaq 0x99cb5(%rip), %rsi # 0xdaaf6
movq %r14, %rdi
movl $0x1ee, %edx # imm = 0x1EE
callq 0x2eb8f
jmp 0x40c6a
leaq 0x347266(%rip), %rax # 0x3880c0
movq (%rax), %rax
callq *0x160(%rax)
jmp 0x40ddd
leaq 0x347251(%rip), %rax # 0x3880c0
movq (%rax), %rax
callq *0x178(%rax)
jmp 0x40dfd
movq 0xad8(%rbx), %rdi
testq %rdi, %rdi
jne 0x40ec3
movq %r14, %rdi
callq 0x291e0
movq %rbx, %rdi
callq 0x38e27
movq %r14, %rdi
movl $0x184, %esi # imm = 0x184
callq 0x40c1b
movb 0xa30(%rbx), %al
jmp 0x40c97
leaq 0x34720b(%rip), %rax # 0x3880c0
movq (%rax), %rax
callq *0x160(%rax)
jmp 0x40e17
leaq 0x3471f6(%rip), %rax # 0x3880c0
movq (%rax), %rax
callq *0x160(%rax)
jmp 0x40e86
| _ma_bitmap_flush_all:
push rbp
mov rbp, rsp
push r15
push r14
push r12
push rbx
sub rsp, 40h
mov rbx, rdi
lea r14, [rdi+0A98h]
cmp qword ptr [rdi+0AD8h], 0
jnz loc_40E3A
mov rdi, r14
call _pthread_mutex_lock
loc_40C6A:
mov al, [rbx+0A30h]
test al, al
jnz short loc_40C81
cmp byte ptr [rbx+0A31h], 0
jz loc_40E07
loc_40C81:
cmp byte ptr [rbx+7DFh], 0
jnz short loc_40C97
test byte ptr [rbx+170h], 1
jnz loc_40E7A
loc_40C97:
test al, al
jnz short loc_40CA8
cmp byte ptr [rbx+0A31h], 0
jz loc_40E32
loc_40CA8:
inc dword ptr [rbx+0A40h]
mov ecx, [rbx+0A4Ch]
lea edx, [rcx+1]
mov [rbx+0A4Ch], edx
cmp dword ptr [rbx+0A48h], 0
jz short loc_40D17
lea r15, [rbx+0AE0h]
lea r12, aWorkspaceLlm4b_2; "/workspace/llm4binary/github2025/eloqsq"...
loc_40CD4:
cmp qword ptr [rbx+0B10h], 0
jnz short loc_40CF4
mov rdi, r15
mov rsi, r14
call _pthread_cond_wait
loc_40CE9:
cmp dword ptr [rbx+0A48h], 0
jnz short loc_40CD4
jmp short loc_40D09
loc_40CF4:
mov rdi, r15
mov rsi, r14
mov rdx, r12
mov ecx, 204h
call psi_cond_wait
jmp short loc_40CE9
loc_40D09:
mov ecx, [rbx+0A4Ch]
mov al, [rbx+0A30h]
dec ecx
loc_40D17:
mov [rbx+0A4Ch], ecx
xor r15d, r15d
test al, al
jz short loc_40D81
mov word ptr [rbx+0A30h], 100h
mov rdi, [rbx+600h]
lea rsi, [rbx+0A50h]
mov rdx, [rbx+0A20h]
mov r8, [rbx+0A18h]
mov eax, [rdi+80h]
mov [rsp+60h+var_30], eax
mov [rsp+60h+var_38], r15d
xorps xmm0, xmm0
movups [rsp+60h+var_48], xmm0
mov [rsp+60h+var_50], r15d
mov [rsp+60h+var_60], r15d
mov [rsp+60h+var_58], 1
xor ecx, ecx
mov r9d, 1
call pagecache_write_part
mov r15d, eax
loc_40D81:
mov rdi, [rbx+600h]
lea rsi, [rbx+0A50h]
lea r8, [rbx+0B48h]
lea rcx, filter_flush_bitmap_pages
xor edx, edx
call flush_pagecache_blocks_with_filter
test al, 3
movzx eax, r15b
mov r15d, 1
cmovz r15d, eax
mov byte ptr [rbx+0A31h], 0
dec dword ptr [rbx+0A40h]
mov eax, [rbx+0A4Ch]
or eax, [rbx+0A44h]
setz r12b
loc_40DD1:
mov rdi, [rbx+0AD8h]
test rdi, rdi
jnz short loc_40E53
loc_40DDD:
mov rdi, r14
call _pthread_mutex_unlock
test r12b, r12b
jnz short loc_40E22
mov rdi, [rbx+0B10h]
add rbx, 0AE0h
test rdi, rdi
jnz short loc_40E68
loc_40DFD:
mov rdi, rbx
call _pthread_cond_broadcast
jmp short loc_40E22
loc_40E07:
mov rdi, [rbx+0AD8h]
test rdi, rdi
jnz loc_40EAE
loc_40E17:
mov rdi, r14
call _pthread_mutex_unlock
xor r15d, r15d
loc_40E22:
mov eax, r15d
add rsp, 40h
pop rbx
pop r12
pop r14
pop r15
pop rbp
retn
loc_40E32:
mov r12b, 1
xor r15d, r15d
jmp short loc_40DD1
loc_40E3A:
lea rsi, aWorkspaceLlm4b_2; "/workspace/llm4binary/github2025/eloqsq"...
mov rdi, r14
mov edx, 1EEh
call psi_mutex_lock
jmp loc_40C6A
loc_40E53:
lea rax, PSI_server
mov rax, [rax]
call qword ptr [rax+160h]
jmp loc_40DDD
loc_40E68:
lea rax, PSI_server
mov rax, [rax]
call qword ptr [rax+178h]
jmp short loc_40DFD
loc_40E7A:
mov rdi, [rbx+0AD8h]
test rdi, rdi
jnz short loc_40EC3
loc_40E86:
mov rdi, r14
call _pthread_mutex_unlock
mov rdi, rbx
call _ma_mark_file_changed_now
mov rdi, r14
mov esi, 184h
call inline_mysql_mutex_lock_0
mov al, [rbx+0A30h]
jmp loc_40C97
loc_40EAE:
lea rax, PSI_server
mov rax, [rax]
call qword ptr [rax+160h]
jmp loc_40E17
loc_40EC3:
lea rax, PSI_server
mov rax, [rax]
call qword ptr [rax+160h]
jmp short loc_40E86
| long long ma_bitmap_flush_all(long long a1)
{
long long v1; // r14
char v2; // al
int v3; // ecx
unsigned __int8 v4; // r15
bool v5; // zf
unsigned int v6; // eax
unsigned int v7; // r15d
bool v8; // r12
v1 = a1 + 2712;
if ( *(_QWORD *)(a1 + 2776) )
psi_mutex_lock(a1 + 2712, (long long)"/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_bitmap.c", 0x1EEu);
else
pthread_mutex_lock(a1 + 2712);
v2 = *(_BYTE *)(a1 + 2608);
if ( v2 || *(_BYTE *)(a1 + 2609) )
{
if ( !*(_BYTE *)(a1 + 2015) && (*(_BYTE *)(a1 + 368) & 1) != 0 )
{
if ( *(_QWORD *)(a1 + 2776) )
PSI_server[44]();
pthread_mutex_unlock(v1);
ma_mark_file_changed_now(a1);
inline_mysql_mutex_lock_0(v1, 0x184u);
v2 = *(_BYTE *)(a1 + 2608);
}
if ( v2 || *(_BYTE *)(a1 + 2609) )
{
++*(_DWORD *)(a1 + 2624);
v3 = *(_DWORD *)(a1 + 2636);
*(_DWORD *)(a1 + 2636) = v3 + 1;
if ( *(_DWORD *)(a1 + 2632) )
{
do
{
if ( *(_QWORD *)(a1 + 2832) )
psi_cond_wait(
a1 + 2784,
v1,
(long long)"/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_bitmap.c",
0x204u);
else
pthread_cond_wait(a1 + 2784, v1);
}
while ( *(_DWORD *)(a1 + 2632) );
v2 = *(_BYTE *)(a1 + 2608);
v3 = *(_DWORD *)(a1 + 2636) - 1;
}
*(_DWORD *)(a1 + 2636) = v3;
v4 = 0;
if ( v2 )
{
*(_WORD *)(a1 + 2608) = 256;
v4 = pagecache_write_part(
*(__m128i **)(a1 + 1536),
(char *)(a1 + 2640),
*(_QWORD *)(a1 + 2592),
0,
*(char **)(a1 + 2584),
1,
0,
1u,
0,
0LL,
0LL,
0,
*(_DWORD *)(*(_QWORD *)(a1 + 1536) + 128LL));
}
v5 = (flush_pagecache_blocks_with_filter(
*(_QWORD *)(a1 + 1536),
a1 + 2640,
0,
(long long ( *)(long long, long long, _QWORD, long long))filter_flush_bitmap_pages,
a1 + 2888) & 3) == 0;
v6 = v4;
v7 = 1;
if ( v5 )
v7 = v6;
*(_BYTE *)(a1 + 2609) = 0;
--*(_DWORD *)(a1 + 2624);
v8 = (*(_DWORD *)(a1 + 2628) | *(_DWORD *)(a1 + 2636)) == 0;
}
else
{
v8 = 1;
v7 = 0;
}
if ( *(_QWORD *)(a1 + 2776) )
PSI_server[44]();
pthread_mutex_unlock(v1);
if ( !v8 )
{
if ( *(_QWORD *)(a1 + 2832) )
PSI_server[47]();
pthread_cond_broadcast(a1 + 2784);
}
}
else
{
if ( *(_QWORD *)(a1 + 2776) )
PSI_server[44]();
pthread_mutex_unlock(v1);
return 0;
}
return v7;
}
| _ma_bitmap_flush_all:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
SUB RSP,0x40
MOV RBX,RDI
LEA R14,[RDI + 0xa98]
CMP qword ptr [RDI + 0xad8],0x0
JNZ 0x00140e3a
MOV RDI,R14
CALL 0x00129220
LAB_00140c6a:
MOV AL,byte ptr [RBX + 0xa30]
TEST AL,AL
JNZ 0x00140c81
CMP byte ptr [RBX + 0xa31],0x0
JZ 0x00140e07
LAB_00140c81:
CMP byte ptr [RBX + 0x7df],0x0
JNZ 0x00140c97
TEST byte ptr [RBX + 0x170],0x1
JNZ 0x00140e7a
LAB_00140c97:
TEST AL,AL
JNZ 0x00140ca8
CMP byte ptr [RBX + 0xa31],0x0
JZ 0x00140e32
LAB_00140ca8:
INC dword ptr [RBX + 0xa40]
MOV ECX,dword ptr [RBX + 0xa4c]
LEA EDX,[RCX + 0x1]
MOV dword ptr [RBX + 0xa4c],EDX
CMP dword ptr [RBX + 0xa48],0x0
JZ 0x00140d17
LEA R15,[RBX + 0xae0]
LEA R12,[0x1daaf6]
LAB_00140cd4:
CMP qword ptr [RBX + 0xb10],0x0
JNZ 0x00140cf4
MOV RDI,R15
MOV RSI,R14
CALL 0x00129430
LAB_00140ce9:
CMP dword ptr [RBX + 0xa48],0x0
JNZ 0x00140cd4
JMP 0x00140d09
LAB_00140cf4:
MOV RDI,R15
MOV RSI,R14
MOV RDX,R12
MOV ECX,0x204
CALL 0x0012eea0
JMP 0x00140ce9
LAB_00140d09:
MOV ECX,dword ptr [RBX + 0xa4c]
MOV AL,byte ptr [RBX + 0xa30]
DEC ECX
LAB_00140d17:
MOV dword ptr [RBX + 0xa4c],ECX
XOR R15D,R15D
TEST AL,AL
JZ 0x00140d81
MOV word ptr [RBX + 0xa30],0x100
MOV RDI,qword ptr [RBX + 0x600]
LEA RSI,[RBX + 0xa50]
MOV RDX,qword ptr [RBX + 0xa20]
MOV R8,qword ptr [RBX + 0xa18]
MOV EAX,dword ptr [RDI + 0x80]
MOV dword ptr [RSP + 0x30],EAX
MOV dword ptr [RSP + 0x28],R15D
XORPS XMM0,XMM0
MOVUPS xmmword ptr [RSP + 0x18],XMM0
MOV dword ptr [RSP + 0x10],R15D
MOV dword ptr [RSP],R15D
MOV dword ptr [RSP + 0x8],0x1
XOR ECX,ECX
MOV R9D,0x1
CALL 0x001349ca
MOV R15D,EAX
LAB_00140d81:
MOV RDI,qword ptr [RBX + 0x600]
LEA RSI,[RBX + 0xa50]
LEA R8,[RBX + 0xb48]
LEA RCX,[0x140ef5]
XOR EDX,EDX
CALL 0x001350c0
TEST AL,0x3
MOVZX EAX,R15B
MOV R15D,0x1
CMOVZ R15D,EAX
MOV byte ptr [RBX + 0xa31],0x0
DEC dword ptr [RBX + 0xa40]
MOV EAX,dword ptr [RBX + 0xa4c]
OR EAX,dword ptr [RBX + 0xa44]
SETZ R12B
LAB_00140dd1:
MOV RDI,qword ptr [RBX + 0xad8]
TEST RDI,RDI
JNZ 0x00140e53
LAB_00140ddd:
MOV RDI,R14
CALL 0x001291e0
TEST R12B,R12B
JNZ 0x00140e22
MOV RDI,qword ptr [RBX + 0xb10]
ADD RBX,0xae0
TEST RDI,RDI
JNZ 0x00140e68
LAB_00140dfd:
MOV RDI,RBX
CALL 0x001296f0
JMP 0x00140e22
LAB_00140e07:
MOV RDI,qword ptr [RBX + 0xad8]
TEST RDI,RDI
JNZ 0x00140eae
LAB_00140e17:
MOV RDI,R14
CALL 0x001291e0
XOR R15D,R15D
LAB_00140e22:
MOV EAX,R15D
ADD RSP,0x40
POP RBX
POP R12
POP R14
POP R15
POP RBP
RET
LAB_00140e32:
MOV R12B,0x1
XOR R15D,R15D
JMP 0x00140dd1
LAB_00140e3a:
LEA RSI,[0x1daaf6]
MOV RDI,R14
MOV EDX,0x1ee
CALL 0x0012eb8f
JMP 0x00140c6a
LAB_00140e53:
LEA RAX,[0x4880c0]
MOV RAX,qword ptr [RAX]
CALL qword ptr [RAX + 0x160]
JMP 0x00140ddd
LAB_00140e68:
LEA RAX,[0x4880c0]
MOV RAX,qword ptr [RAX]
CALL qword ptr [RAX + 0x178]
JMP 0x00140dfd
LAB_00140e7a:
MOV RDI,qword ptr [RBX + 0xad8]
TEST RDI,RDI
JNZ 0x00140ec3
LAB_00140e86:
MOV RDI,R14
CALL 0x001291e0
MOV RDI,RBX
CALL 0x00138e27
MOV RDI,R14
MOV ESI,0x184
CALL 0x00140c1b
MOV AL,byte ptr [RBX + 0xa30]
JMP 0x00140c97
LAB_00140eae:
LEA RAX,[0x4880c0]
MOV RAX,qword ptr [RAX]
CALL qword ptr [RAX + 0x160]
JMP 0x00140e17
LAB_00140ec3:
LEA RAX,[0x4880c0]
MOV RAX,qword ptr [RAX]
CALL qword ptr [RAX + 0x160]
JMP 0x00140e86
|
int1 _ma_bitmap_flush_all(long param_1)
{
pthread_mutex_t *__mutex;
char cVar1;
int1 uVar2;
ulong uVar3;
int iVar4;
int1 uVar5;
bool bVar6;
__mutex = (pthread_mutex_t *)(param_1 + 0xa98);
if (*(long *)(param_1 + 0xad8) == 0) {
pthread_mutex_lock(__mutex);
}
else {
psi_mutex_lock(__mutex,"/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_bitmap.c",
0x1ee);
}
cVar1 = *(char *)(param_1 + 0xa30);
if ((cVar1 == '\0') && (*(char *)(param_1 + 0xa31) == '\0')) {
if (*(long *)(param_1 + 0xad8) != 0) {
(**(code **)(PSI_server + 0x160))();
}
pthread_mutex_unlock(__mutex);
uVar5 = 0;
}
else {
if ((*(char *)(param_1 + 0x7df) == '\0') && ((*(byte *)(param_1 + 0x170) & 1) != 0)) {
if (*(long *)(param_1 + 0xad8) != 0) {
(**(code **)(PSI_server + 0x160))();
}
pthread_mutex_unlock(__mutex);
_ma_mark_file_changed_now(param_1);
inline_mysql_mutex_lock(__mutex,0x184);
cVar1 = *(char *)(param_1 + 0xa30);
}
if ((cVar1 == '\0') && (*(char *)(param_1 + 0xa31) == '\0')) {
bVar6 = true;
uVar5 = 0;
}
else {
*(int *)(param_1 + 0xa40) = *(int *)(param_1 + 0xa40) + 1;
iVar4 = *(int *)(param_1 + 0xa4c);
*(int *)(param_1 + 0xa4c) = iVar4 + 1;
if (*(int *)(param_1 + 0xa48) != 0) {
do {
if (*(long *)(param_1 + 0xb10) == 0) {
pthread_cond_wait((pthread_cond_t *)(param_1 + 0xae0),__mutex);
}
else {
psi_cond_wait((pthread_cond_t *)(param_1 + 0xae0),__mutex,
"/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_bitmap.c",0x204
);
}
} while (*(int *)(param_1 + 0xa48) != 0);
cVar1 = *(char *)(param_1 + 0xa30);
iVar4 = *(int *)(param_1 + 0xa4c) + -1;
}
*(int *)(param_1 + 0xa4c) = iVar4;
uVar2 = 0;
if (cVar1 != '\0') {
*(int2 *)(param_1 + 0xa30) = 0x100;
uVar2 = pagecache_write_part
(*(long *)(param_1 + 0x600),param_1 + 0xa50,
*(int8 *)(param_1 + 0xa20),0,*(int8 *)(param_1 + 0xa18),1,0,1
,0,0,0,0,*(int4 *)(*(long *)(param_1 + 0x600) + 0x80));
}
uVar3 = flush_pagecache_blocks_with_filter
(*(int8 *)(param_1 + 0x600),param_1 + 0xa50,0,
filter_flush_bitmap_pages,param_1 + 0xb48);
uVar5 = 1;
if ((uVar3 & 3) == 0) {
uVar5 = uVar2;
}
*(int1 *)(param_1 + 0xa31) = 0;
*(int *)(param_1 + 0xa40) = *(int *)(param_1 + 0xa40) + -1;
bVar6 = *(int *)(param_1 + 0xa4c) == 0 && *(int *)(param_1 + 0xa44) == 0;
}
if (*(long *)(param_1 + 0xad8) != 0) {
(**(code **)(PSI_server + 0x160))();
}
pthread_mutex_unlock(__mutex);
if (!bVar6) {
if (*(long *)(param_1 + 0xb10) != 0) {
(**(code **)(PSI_server + 0x178))();
}
pthread_cond_broadcast((pthread_cond_t *)(param_1 + 0xae0));
}
}
return uVar5;
}
| |
51,832 | llama_decode_text(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&) | monkey531[P]llama/src/llama-vocab.cpp | static std::string llama_decode_text(const std::string & text) {
std::string decoded_text;
const auto cpts = unicode_cpts_from_utf8(text);
for (const auto cpt : cpts) {
const auto utf8 = unicode_cpt_to_utf8(cpt);
try {
decoded_text += unicode_utf8_to_byte(utf8);
} catch (const std::out_of_range & /*e*/) {
decoded_text += "[UNK_BYTE_0x";
for (const auto c : utf8) {
decoded_text += format("%02x", (uint8_t) c);
}
decoded_text += text + "]";
}
}
return decoded_text;
} | O1 | cpp | llama_decode_text(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x78, %rsp
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x10(%rdi), %rax
movq %rax, 0x28(%rsp)
movq %rax, (%rdi)
movq $0x0, 0x8(%rdi)
movb $0x0, 0x10(%rdi)
leaq 0x30(%rsp), %rdi
callq 0x6c3f0
movq 0x30(%rsp), %r12
movq 0x38(%rsp), %r13
cmpq %r13, %r12
je 0xec1cb
leaq 0x68(%rsp), %rbp
leaq 0x58(%rsp), %r15
movl (%r12), %esi
movq %r15, %rdi
callq 0x6b7c0
movq %r15, %rdi
callq 0x666c0
movsbl %al, %esi
movq %rbx, %rdi
callq 0x686d0
movq 0x58(%rsp), %rdi
cmpq %rbp, %rdi
je 0xec0d5
movq 0x68(%rsp), %rsi
incq %rsi
callq 0x69220
addq $0x4, %r12
cmpq %r13, %r12
jne 0xec09f
jmp 0xec1cb
movq %rax, (%rsp)
cmpl $0x1, %edx
jne 0xec22b
movq (%rsp), %rdi
callq 0x667b0
movq %rbx, %rdi
leaq 0x33661(%rip), %rsi # 0x11f764
callq 0x6cf70
movq 0x60(%rsp), %rax
movq %rax, 0x50(%rsp)
testq %rax, %rax
je 0xec17f
movq 0x58(%rsp), %rax
movq %rax, 0x48(%rsp)
xorl %ecx, %ecx
movq 0x48(%rsp), %rax
movq %rcx, (%rsp)
movzbl (%rax,%rcx), %edx
leaq 0x8(%rsp), %rdi
leaq 0x33635(%rip), %rsi # 0x11f771
xorl %eax, %eax
callq 0x6c9c0
movq 0x8(%rsp), %rsi
movq 0x10(%rsp), %rdx
movq %rbx, %rdi
callq 0x65fa0
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0xec171
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x69220
movq (%rsp), %rcx
incq %rcx
cmpq %rcx, 0x50(%rsp)
jne 0xec123
leaq 0x8(%rsp), %rdi
movq %r14, %rsi
leaq 0x336a5(%rip), %rdx # 0x11f833
callq 0x6a350
movq 0x8(%rsp), %rsi
movq 0x10(%rsp), %rdx
movq %rbx, %rdi
callq 0x65fa0
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0xec1c1
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x69220
callq 0x6bbb0
jmp 0xec0be
movq 0x30(%rsp), %rdi
testq %rdi, %rdi
je 0xec1e2
movq 0x40(%rsp), %rsi
subq %rdi, %rsi
callq 0x69220
movq %rbx, %rax
addq $0x78, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, (%rsp)
jmp 0xec22b
jmp 0xec1fe
jmp 0xec222
movq %rax, (%rsp)
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0xec226
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x69220
jmp 0xec226
jmp 0xec222
movq %rax, (%rsp)
callq 0x6bbb0
movq 0x58(%rsp), %rdi
cmpq %rbp, %rdi
je 0xec256
movq 0x68(%rsp), %rsi
incq %rsi
callq 0x69220
jmp 0xec256
movq %rax, %rdi
callq 0x77cc1
movq %rax, (%rsp)
jmp 0xec26d
movq %rax, (%rsp)
movq 0x30(%rsp), %rdi
testq %rdi, %rdi
je 0xec26d
movq 0x40(%rsp), %rsi
subq %rdi, %rsi
callq 0x69220
movq (%rbx), %rdi
cmpq 0x28(%rsp), %rdi
je 0xec287
movq 0x28(%rsp), %rax
movq (%rax), %rsi
incq %rsi
callq 0x69220
movq (%rsp), %rdi
callq 0x6c640
| _ZL17llama_decode_textRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 78h
mov r14, rsi
mov rbx, rdi
lea rax, [rdi+10h]
mov [rsp+0A8h+var_80], rax
mov [rdi], rax
mov qword ptr [rdi+8], 0
mov byte ptr [rdi+10h], 0
lea rdi, [rsp+0A8h+var_78]
call __Z22unicode_cpts_from_utf8RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; unicode_cpts_from_utf8(std::string const&)
mov r12, [rsp+0A8h+var_78]
mov r13, [rsp+0A8h+var_70]
cmp r12, r13
jz loc_EC1CB
lea rbp, [rsp+0A8h+var_40]
lea r15, [rsp+0A8h+var_50]
loc_EC09F:
mov esi, [r12]
mov rdi, r15
call __Z19unicode_cpt_to_utf8B5cxx11j; unicode_cpt_to_utf8(uint)
mov rdi, r15
call __Z20unicode_utf8_to_byteRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; unicode_utf8_to_byte(std::string const&)
movsx esi, al
mov rdi, rbx
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9push_backEc; std::string::push_back(char)
loc_EC0BE:
mov rdi, [rsp+0A8h+var_50]; void *
cmp rdi, rbp
jz short loc_EC0D5
mov rsi, [rsp+0A8h+var_40]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_EC0D5:
add r12, 4
cmp r12, r13
jnz short loc_EC09F
jmp loc_EC1CB
mov [rsp+0A8h+var_A8], rax
cmp edx, 1
jnz loc_EC22B
mov rdi, [rsp+0A8h+var_A8]; void *
call ___cxa_begin_catch
mov rdi, rbx
lea rsi, aUnkByte0x; "[UNK_BYTE_0x"
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendEPKc; std::string::append(char const*)
mov rax, [rsp+0A8h+var_48]
mov [rsp+0A8h+var_58], rax
test rax, rax
jz short loc_EC17F
mov rax, [rsp+0A8h+var_50]
mov [rsp+0A8h+var_60], rax
xor ecx, ecx
loc_EC123:
mov rax, [rsp+0A8h+var_60]
mov [rsp+0A8h+var_A8], rcx
movzx edx, byte ptr [rax+rcx]
lea rdi, [rsp+0A8h+var_A0]
lea rsi, a02x; "%02x"
xor eax, eax
call __Z6formatB5cxx11PKcz; format(char const*,...)
mov rsi, [rsp+0A8h+var_A0]
mov rdx, [rsp+0A8h+var_98]
mov rdi, rbx
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_appendEPKcm; std::string::_M_append(char const*,ulong)
mov rdi, [rsp+0A8h+var_A0]; void *
lea rax, [rsp+0A8h+var_90]
cmp rdi, rax
jz short loc_EC171
mov rsi, [rsp+0A8h+var_90]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_EC171:
mov rcx, [rsp+0A8h+var_A8]
inc rcx
cmp [rsp+0A8h+var_58], rcx
jnz short loc_EC123
loc_EC17F:
lea rdi, [rsp+0A8h+var_A0]
mov rsi, r14
lea rdx, asc_11F830+3; "]"
call __ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EERKS8_PKS5_; std::operator+<char>(std::string const&,char const*)
mov rsi, [rsp+0A8h+var_A0]
mov rdx, [rsp+0A8h+var_98]
mov rdi, rbx
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_appendEPKcm; std::string::_M_append(char const*,ulong)
mov rdi, [rsp+0A8h+var_A0]; void *
lea rax, [rsp+0A8h+var_90]
cmp rdi, rax
jz short loc_EC1C1
mov rsi, [rsp+0A8h+var_90]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_EC1C1:
call ___cxa_end_catch
jmp loc_EC0BE
loc_EC1CB:
mov rdi, [rsp+0A8h+var_78]; void *
test rdi, rdi
jz short loc_EC1E2
mov rsi, [rsp+0A8h+var_68]
sub rsi, rdi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_EC1E2:
mov rax, rbx
add rsp, 78h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
mov [rsp+0A8h+var_A8], rax
jmp short loc_EC22B
jmp short loc_EC1FE
jmp short loc_EC222
loc_EC1FE:
mov [rsp+0A8h+var_A8], rax
mov rdi, [rsp+0A8h+var_A0]; void *
lea rax, [rsp+0A8h+var_90]
cmp rdi, rax
jz short loc_EC226
mov rsi, [rsp+0A8h+var_90]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_EC226
jmp short $+2
loc_EC222:
mov [rsp+0A8h+var_A8], rax
loc_EC226:
call ___cxa_end_catch
loc_EC22B:
mov rdi, [rsp+0A8h+var_50]; void *
cmp rdi, rbp
jz short loc_EC256
mov rsi, [rsp+0A8h+var_40]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_EC256
mov rdi, rax
call __clang_call_terminate
mov [rsp+0A8h+var_A8], rax
jmp short loc_EC26D
mov [rsp+0A8h+var_A8], rax
loc_EC256:
mov rdi, [rsp+0A8h+var_78]; void *
test rdi, rdi
jz short loc_EC26D
mov rsi, [rsp+0A8h+var_68]
sub rsi, rdi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_EC26D:
mov rdi, [rbx]; void *
cmp rdi, [rsp+0A8h+var_80]
jz short loc_EC287
mov rax, [rsp+0A8h+var_80]
mov rsi, [rax]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_EC287:
mov rdi, [rsp+0A8h+var_A8]
call __Unwind_Resume
| long long llama_decode_text(long long a1)
{
unsigned int *v1; // r12
unsigned int *v2; // r13
char v3; // al
void *v5; // [rsp+30h] [rbp-78h] BYREF
unsigned int *v6; // [rsp+38h] [rbp-70h]
long long v7; // [rsp+40h] [rbp-68h]
void *v8; // [rsp+58h] [rbp-50h] BYREF
long long v9; // [rsp+68h] [rbp-40h] BYREF
*(_QWORD *)a1 = a1 + 16;
*(_QWORD *)(a1 + 8) = 0LL;
*(_BYTE *)(a1 + 16) = 0;
unicode_cpts_from_utf8(&v5);
v1 = (unsigned int *)v5;
v2 = v6;
if ( v5 != v6 )
{
do
{
unicode_cpt_to_utf8[abi:cxx11](&v8, *v1);
v3 = unicode_utf8_to_byte(&v8);
std::string::push_back(a1, (unsigned int)v3);
if ( v8 != &v9 )
operator delete(v8, v9 + 1);
++v1;
}
while ( v1 != v2 );
}
if ( v5 )
operator delete(v5, v7 - (_QWORD)v5);
return a1;
}
| llama_decode_text:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x78
MOV R14,RSI
MOV RBX,RDI
LEA RAX,[RDI + 0x10]
MOV qword ptr [RSP + 0x28],RAX
MOV qword ptr [RDI],RAX
MOV qword ptr [RDI + 0x8],0x0
MOV byte ptr [RDI + 0x10],0x0
LAB_001ec078:
LEA RDI,[RSP + 0x30]
CALL 0x0016c3f0
MOV R12,qword ptr [RSP + 0x30]
MOV R13,qword ptr [RSP + 0x38]
CMP R12,R13
JZ 0x001ec1cb
LEA RBP,[RSP + 0x68]
LEA R15,[RSP + 0x58]
LAB_001ec09f:
MOV ESI,dword ptr [R12]
LAB_001ec0a3:
MOV RDI,R15
CALL 0x0016b7c0
LAB_001ec0ab:
MOV RDI,R15
CALL 0x001666c0
MOVSX ESI,AL
MOV RDI,RBX
CALL 0x001686d0
LAB_001ec0be:
MOV RDI,qword ptr [RSP + 0x58]
CMP RDI,RBP
JZ 0x001ec0d5
MOV RSI,qword ptr [RSP + 0x68]
INC RSI
CALL 0x00169220
LAB_001ec0d5:
ADD R12,0x4
CMP R12,R13
JNZ 0x001ec09f
JMP 0x001ec1cb
LAB_001ec1cb:
MOV RDI,qword ptr [RSP + 0x30]
TEST RDI,RDI
JZ 0x001ec1e2
MOV RSI,qword ptr [RSP + 0x40]
SUB RSI,RDI
CALL 0x00169220
LAB_001ec1e2:
MOV RAX,RBX
ADD RSP,0x78
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
/* llama_decode_text(std::__cxx11::string const&) */
string * llama_decode_text(string *param_1)
{
void *pvVar1;
void *local_78;
void *local_70;
long local_68;
long *local_50 [2];
long local_40 [2];
*(string **)param_1 = param_1 + 0x10;
*(int8 *)(param_1 + 8) = 0;
param_1[0x10] = (string)0x0;
/* try { // try from 001ec078 to 001ec081 has its CatchHandler @ 001ec24c */
unicode_cpts_from_utf8((string *)&local_78);
if (local_78 != local_70) {
pvVar1 = local_78;
do {
/* try { // try from 001ec0a3 to 001ec0aa has its CatchHandler @ 001ec252 */
unicode_cpt_to_utf8_abi_cxx11_((uint)(string *)local_50);
/* try { // try from 001ec0ab to 001ec0bd has its CatchHandler @ 001ec0e3 */
unicode_utf8_to_byte((string *)local_50);
std::__cxx11::string::push_back((char)param_1);
if (local_50[0] != local_40) {
operator_delete(local_50[0],local_40[0] + 1);
}
pvVar1 = (void *)((long)pvVar1 + 4);
} while (pvVar1 != local_70);
}
if (local_78 != (void *)0x0) {
operator_delete(local_78,local_68 - (long)local_78);
}
return param_1;
}
| |
51,833 | google::protobuf::compiler::java::FixedSize(google::protobuf::FieldDescriptor::Type) | aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/compiler/java/helpers.cc | int FixedSize(FieldDescriptor::Type type) {
switch (type) {
case FieldDescriptor::TYPE_INT32:
return -1;
case FieldDescriptor::TYPE_INT64:
return -1;
case FieldDescriptor::TYPE_UINT32:
return -1;
case FieldDescriptor::TYPE_UINT64:
return -1;
case FieldDescriptor::TYPE_SINT32:
return -1;
case FieldDescriptor::TYPE_SINT64:
return -1;
case FieldDescriptor::TYPE_FIXED32:
return WireFormatLite::kFixed32Size;
case FieldDescriptor::TYPE_FIXED64:
return WireFormatLite::kFixed64Size;
case FieldDescriptor::TYPE_SFIXED32:
return WireFormatLite::kSFixed32Size;
case FieldDescriptor::TYPE_SFIXED64:
return WireFormatLite::kSFixed64Size;
case FieldDescriptor::TYPE_FLOAT:
return WireFormatLite::kFloatSize;
case FieldDescriptor::TYPE_DOUBLE:
return WireFormatLite::kDoubleSize;
case FieldDescriptor::TYPE_BOOL:
return WireFormatLite::kBoolSize;
case FieldDescriptor::TYPE_ENUM:
return -1;
case FieldDescriptor::TYPE_STRING:
return -1;
case FieldDescriptor::TYPE_BYTES:
return -1;
case FieldDescriptor::TYPE_GROUP:
return -1;
case FieldDescriptor::TYPE_MESSAGE:
return -1;
// No default because we want the compiler to complain if any new
// types are added.
}
GOOGLE_LOG(FATAL) << "Can't get here.";
return -1;
} | O0 | cpp | google::protobuf::compiler::java::FixedSize(google::protobuf::FieldDescriptor::Type):
subq $0x68, %rsp
movl %edi, 0x60(%rsp)
movl 0x60(%rsp), %eax
decl %eax
movl %eax, %ecx
movq %rcx, 0x10(%rsp)
subl $0x11, %eax
ja 0x772b7
movq 0x10(%rsp), %rax
leaq 0x33884e(%rip), %rcx # 0x3afa18
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movl $0xffffffff, 0x64(%rsp) # imm = 0xFFFFFFFF
jmp 0x7732c
movl $0xffffffff, 0x64(%rsp) # imm = 0xFFFFFFFF
jmp 0x7732c
movl $0xffffffff, 0x64(%rsp) # imm = 0xFFFFFFFF
jmp 0x7732c
movl $0xffffffff, 0x64(%rsp) # imm = 0xFFFFFFFF
jmp 0x7732c
movl $0xffffffff, 0x64(%rsp) # imm = 0xFFFFFFFF
jmp 0x7732c
movl $0xffffffff, 0x64(%rsp) # imm = 0xFFFFFFFF
jmp 0x7732c
movl $0x4, 0x64(%rsp)
jmp 0x7732c
movl $0x8, 0x64(%rsp)
jmp 0x7732c
movl $0x4, 0x64(%rsp)
jmp 0x7732c
movl $0x8, 0x64(%rsp)
jmp 0x7732c
movl $0x4, 0x64(%rsp)
jmp 0x7732c
movl $0x8, 0x64(%rsp)
jmp 0x7732c
movl $0x1, 0x64(%rsp)
jmp 0x7732c
movl $0xffffffff, 0x64(%rsp) # imm = 0xFFFFFFFF
jmp 0x7732c
movl $0xffffffff, 0x64(%rsp) # imm = 0xFFFFFFFF
jmp 0x7732c
movl $0xffffffff, 0x64(%rsp) # imm = 0xFFFFFFFF
jmp 0x7732c
movl $0xffffffff, 0x64(%rsp) # imm = 0xFFFFFFFF
jmp 0x7732c
movl $0xffffffff, 0x64(%rsp) # imm = 0xFFFFFFFF
jmp 0x7732c
leaq 0x338a03(%rip), %rdx # 0x3afcc1
leaq 0x28(%rsp), %rdi
movq %rdi, (%rsp)
movl $0x3, %esi
movl $0x387, %ecx # imm = 0x387
callq 0x219560
movq (%rsp), %rdi
leaq 0x3343fd(%rip), %rsi # 0x3ab6de
callq 0x218e20
movq %rax, 0x8(%rsp)
jmp 0x772ed
movq 0x8(%rsp), %rsi
leaq 0x1b(%rsp), %rdi
callq 0x218fd0
jmp 0x772fe
leaq 0x28(%rsp), %rdi
callq 0x2195a0
movl $0xffffffff, 0x64(%rsp) # imm = 0xFFFFFFFF
jmp 0x7732c
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x20(%rsp)
movl %eax, 0x1c(%rsp)
leaq 0x28(%rsp), %rdi
callq 0x2195a0
jmp 0x77335
movl 0x64(%rsp), %eax
addq $0x68, %rsp
retq
movq 0x20(%rsp), %rdi
callq 0x21700
nop
| _ZN6google8protobuf8compiler4java9FixedSizeENS0_15FieldDescriptor4TypeE:
sub rsp, 68h
mov [rsp+68h+var_8], edi
mov eax, [rsp+68h+var_8]
dec eax; switch 18 cases
mov ecx, eax
mov [rsp+68h+var_58], rcx
sub eax, 11h
ja def_771D1; jumptable 00000000000771D1 default case
mov rax, [rsp+68h+var_58]
lea rcx, jpt_771D1
movsxd rax, ds:(jpt_771D1 - 3AFA18h)[rcx+rax*4]
add rax, rcx
jmp rax; switch jump
loc_771D3:
mov [rsp+68h+var_4], 0FFFFFFFFh; jumptable 00000000000771D1 case 5
jmp loc_7732C
loc_771E0:
mov [rsp+68h+var_4], 0FFFFFFFFh; jumptable 00000000000771D1 case 3
jmp loc_7732C
loc_771ED:
mov [rsp+68h+var_4], 0FFFFFFFFh; jumptable 00000000000771D1 case 13
jmp loc_7732C
loc_771FA:
mov [rsp+68h+var_4], 0FFFFFFFFh; jumptable 00000000000771D1 case 4
jmp loc_7732C
loc_77207:
mov [rsp+68h+var_4], 0FFFFFFFFh; jumptable 00000000000771D1 case 17
jmp loc_7732C
loc_77214:
mov [rsp+68h+var_4], 0FFFFFFFFh; jumptable 00000000000771D1 case 18
jmp loc_7732C
loc_77221:
mov [rsp+68h+var_4], 4; jumptable 00000000000771D1 case 7
jmp loc_7732C
loc_7722E:
mov [rsp+68h+var_4], 8; jumptable 00000000000771D1 case 6
jmp loc_7732C
loc_7723B:
mov [rsp+68h+var_4], 4; jumptable 00000000000771D1 case 15
jmp loc_7732C
loc_77248:
mov [rsp+68h+var_4], 8; jumptable 00000000000771D1 case 16
jmp loc_7732C
loc_77255:
mov [rsp+68h+var_4], 4; jumptable 00000000000771D1 case 2
jmp loc_7732C
loc_77262:
mov [rsp+68h+var_4], 8; jumptable 00000000000771D1 case 1
jmp loc_7732C
loc_7726F:
mov [rsp+68h+var_4], 1; jumptable 00000000000771D1 case 8
jmp loc_7732C
loc_7727C:
mov [rsp+68h+var_4], 0FFFFFFFFh; jumptable 00000000000771D1 case 14
jmp loc_7732C
loc_77289:
mov [rsp+68h+var_4], 0FFFFFFFFh; jumptable 00000000000771D1 case 9
jmp loc_7732C
loc_77296:
mov [rsp+68h+var_4], 0FFFFFFFFh; jumptable 00000000000771D1 case 12
jmp loc_7732C
loc_772A3:
mov [rsp+68h+var_4], 0FFFFFFFFh; jumptable 00000000000771D1 case 10
jmp short loc_7732C
loc_772AD:
mov [rsp+68h+var_4], 0FFFFFFFFh; jumptable 00000000000771D1 case 11
jmp short loc_7732C
def_771D1:
lea rdx, aWorkspaceLlm4b_8; jumptable 00000000000771D1 default case
lea rdi, [rsp+68h+var_40]
mov [rsp+68h+var_68], rdi
mov esi, 3
mov ecx, 387h
call _ZN6google8protobuf8internal10LogMessageC2ENS0_8LogLevelEPKci; google::protobuf::internal::LogMessage::LogMessage(google::protobuf::LogLevel,char const*,int)
mov rdi, [rsp+68h+var_68]
lea rsi, aCanTGetHere; "Can't get here."
call _ZN6google8protobuf8internal10LogMessagelsEPKc; google::protobuf::internal::LogMessage::operator<<(char const*)
mov [rsp+68h+var_60], rax
jmp short $+2
loc_772ED:
mov rsi, [rsp+68h+var_60]
lea rdi, [rsp+68h+var_4D]
call _ZN6google8protobuf8internal11LogFinisheraSERNS1_10LogMessageE; google::protobuf::internal::LogFinisher::operator=(google::protobuf::internal::LogMessage &)
jmp short $+2
loc_772FE:
lea rdi, [rsp+68h+var_40]; this
call _ZN6google8protobuf8internal10LogMessageD2Ev; google::protobuf::internal::LogMessage::~LogMessage()
mov [rsp+68h+var_4], 0FFFFFFFFh
jmp short loc_7732C
mov rcx, rax
mov eax, edx
mov [rsp+arg_18], rcx
mov [rsp+arg_14], eax
lea rdi, [rsp+arg_20]; this
call _ZN6google8protobuf8internal10LogMessageD2Ev; google::protobuf::internal::LogMessage::~LogMessage()
jmp short loc_77335
loc_7732C:
mov eax, [rsp+68h+var_4]
add rsp, 68h
retn
loc_77335:
mov rdi, [rsp+arg_18]
call __Unwind_Resume
| long long google::protobuf::compiler::java::FixedSize(int a1)
{
long long v2; // [rsp+8h] [rbp-60h]
_BYTE v3[13]; // [rsp+1Bh] [rbp-4Dh] BYREF
_BYTE v4[56]; // [rsp+28h] [rbp-40h] BYREF
int v5; // [rsp+60h] [rbp-8h]
unsigned int v6; // [rsp+64h] [rbp-4h]
v5 = a1;
switch ( a1 )
{
case 1:
v6 = 8;
break;
case 2:
v6 = 4;
break;
case 3:
v6 = -1;
break;
case 4:
v6 = -1;
break;
case 5:
v6 = -1;
break;
case 6:
v6 = 8;
break;
case 7:
v6 = 4;
break;
case 8:
v6 = 1;
break;
case 9:
v6 = -1;
break;
case 10:
v6 = -1;
break;
case 11:
v6 = -1;
break;
case 12:
v6 = -1;
break;
case 13:
v6 = -1;
break;
case 14:
v6 = -1;
break;
case 15:
v6 = 4;
break;
case 16:
v6 = 8;
break;
case 17:
v6 = -1;
break;
case 18:
v6 = -1;
break;
default:
google::protobuf::internal::LogMessage::LogMessage(
v4,
3LL,
"/workspace/llm4binary/github2025/aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/compiler/java/helpers.cc",
903LL);
v2 = google::protobuf::internal::LogMessage::operator<<(v4, "Can't get here.");
google::protobuf::internal::LogFinisher::operator=(v3, v2);
google::protobuf::internal::LogMessage::~LogMessage((google::protobuf::internal::LogMessage *)v4);
v6 = -1;
break;
}
return v6;
}
| FixedSize:
SUB RSP,0x68
MOV dword ptr [RSP + 0x60],EDI
MOV EAX,dword ptr [RSP + 0x60]
DEC EAX
MOV ECX,EAX
MOV qword ptr [RSP + 0x10],RCX
SUB EAX,0x11
JA 0x001772b7
MOV RAX,qword ptr [RSP + 0x10]
LEA RCX,[0x4afa18]
MOVSXD RAX,dword ptr [RCX + RAX*0x4]
ADD RAX,RCX
switchD:
JMP RAX
caseD_5:
MOV dword ptr [RSP + 0x64],0xffffffff
JMP 0x0017732c
caseD_3:
MOV dword ptr [RSP + 0x64],0xffffffff
JMP 0x0017732c
caseD_d:
MOV dword ptr [RSP + 0x64],0xffffffff
JMP 0x0017732c
caseD_4:
MOV dword ptr [RSP + 0x64],0xffffffff
JMP 0x0017732c
caseD_11:
MOV dword ptr [RSP + 0x64],0xffffffff
JMP 0x0017732c
caseD_12:
MOV dword ptr [RSP + 0x64],0xffffffff
JMP 0x0017732c
caseD_7:
MOV dword ptr [RSP + 0x64],0x4
JMP 0x0017732c
caseD_6:
MOV dword ptr [RSP + 0x64],0x8
JMP 0x0017732c
caseD_f:
MOV dword ptr [RSP + 0x64],0x4
JMP 0x0017732c
caseD_10:
MOV dword ptr [RSP + 0x64],0x8
JMP 0x0017732c
caseD_2:
MOV dword ptr [RSP + 0x64],0x4
JMP 0x0017732c
caseD_1:
MOV dword ptr [RSP + 0x64],0x8
JMP 0x0017732c
caseD_8:
MOV dword ptr [RSP + 0x64],0x1
JMP 0x0017732c
caseD_e:
MOV dword ptr [RSP + 0x64],0xffffffff
JMP 0x0017732c
caseD_9:
MOV dword ptr [RSP + 0x64],0xffffffff
JMP 0x0017732c
caseD_c:
MOV dword ptr [RSP + 0x64],0xffffffff
JMP 0x0017732c
caseD_a:
MOV dword ptr [RSP + 0x64],0xffffffff
JMP 0x0017732c
caseD_b:
MOV dword ptr [RSP + 0x64],0xffffffff
JMP 0x0017732c
default:
LEA RDX,[0x4afcc1]
LEA RDI,[RSP + 0x28]
MOV qword ptr [RSP],RDI
MOV ESI,0x3
MOV ECX,0x387
CALL 0x00319560
MOV RDI,qword ptr [RSP]
LAB_001772da:
LEA RSI,[0x4ab6de]
CALL 0x00318e20
MOV qword ptr [RSP + 0x8],RAX
JMP 0x001772ed
LAB_001772ed:
MOV RSI,qword ptr [RSP + 0x8]
LEA RDI,[RSP + 0x1b]
CALL 0x00318fd0
LAB_001772fc:
JMP 0x001772fe
LAB_001772fe:
LEA RDI,[RSP + 0x28]
CALL 0x003195a0
MOV dword ptr [RSP + 0x64],0xffffffff
JMP 0x0017732c
LAB_0017732c:
MOV EAX,dword ptr [RSP + 0x64]
ADD RSP,0x68
RET
|
/* google::protobuf::compiler::java::FixedSize(google::protobuf::FieldDescriptor::Type) */
int4 google::protobuf::compiler::java::FixedSize(int4 param_1)
{
LogMessage *pLVar1;
LogFinisher local_4d [13];
LogMessage local_40 [56];
int4 local_8;
int4 local_4;
switch(param_1) {
case 1:
local_4 = 8;
break;
case 2:
local_4 = 4;
break;
case 3:
local_4 = 0xffffffff;
break;
case 4:
local_4 = 0xffffffff;
break;
case 5:
local_4 = 0xffffffff;
break;
case 6:
local_4 = 8;
break;
case 7:
local_4 = 4;
break;
case 8:
local_4 = 1;
break;
case 9:
local_4 = 0xffffffff;
break;
case 10:
local_4 = 0xffffffff;
break;
case 0xb:
local_4 = 0xffffffff;
break;
case 0xc:
local_4 = 0xffffffff;
break;
case 0xd:
local_4 = 0xffffffff;
break;
case 0xe:
local_4 = 0xffffffff;
break;
case 0xf:
local_4 = 4;
break;
case 0x10:
local_4 = 8;
break;
case 0x11:
local_4 = 0xffffffff;
break;
case 0x12:
local_4 = 0xffffffff;
break;
default:
local_8 = param_1;
internal::LogMessage::LogMessage
(local_40,3,
"/workspace/llm4binary/github2025/aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/compiler/java/helpers.cc"
,0x387);
/* try { // try from 001772da to 001772fb has its CatchHandler @ 00177312 */
pLVar1 = (LogMessage *)internal::LogMessage::operator<<(local_40,"Can\'t get here.");
internal::LogFinisher::operator=(local_4d,pLVar1);
internal::LogMessage::~LogMessage(local_40);
local_4 = 0xffffffff;
}
return local_4;
}
| |
51,834 | ggml_backend_cpu_reg | ngxson[P]ggml-easy/ggml/src/ggml-cpu/ggml-cpu.cpp | ggml_backend_reg_t ggml_backend_cpu_reg(void) {
// init CPU feature detection
ggml_cpu_init();
static struct ggml_backend_reg ggml_backend_cpu_reg = {
/* .api_version = */ GGML_BACKEND_API_VERSION,
/* .iface = */ ggml_backend_cpu_reg_i,
/* .context = */ NULL,
};
return &ggml_backend_cpu_reg;
} | O2 | cpp | ggml_backend_cpu_reg:
pushq %rax
callq 0xbcd0
leaq 0x47051(%rip), %rax # 0x57a00
popq %rcx
retq
| ggml_backend_cpu_reg:
push rax
call _ggml_cpu_init
lea rax, _ZZ20ggml_backend_cpu_regE20ggml_backend_cpu_reg; ggml_backend_cpu_reg::ggml_backend_cpu_reg
pop rcx
retn
| void * ggml_backend_cpu_reg(long long a1)
{
ggml_cpu_init(a1);
return &ggml_backend_cpu_reg::ggml_backend_cpu_reg;
}
| ggml_backend_cpu_reg:
PUSH RAX
CALL 0x0010bcd0
LEA RAX,[0x157a00]
POP RCX
RET
|
int1 * ggml_backend_cpu_reg(void)
{
ggml_cpu_init();
return ggml_backend_cpu_reg::ggml_backend_cpu_reg;
}
| |
51,835 | SDL_CreateRendererImplementation(SDL::Result&, SDL_Window*, char const*) | SDL3Lite/source/SDL3/SDL_Renderer.cpp | SDL_Renderer* SDL_CreateRendererImplementation(SDL::Result& result, SDL_Window* window, const char* name)
{
assert(window);
SDL_Renderer* renderer = NULL;
if (window->GetFlags() == SDL_WINDOW_OPENGL)
{
renderer = new SDL::OpenGL1Render(result, window);
}
else
{
renderer = new SDL::SoftwareRender(window);
}
return renderer;
} | O0 | cpp | SDL_CreateRendererImplementation(SDL::Result&, SDL_Window*, char const*):
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
cmpq $0x0, -0x10(%rbp)
je 0x2cf0d
jmp 0x2cf2c
leaq 0xe104(%rip), %rdi # 0x3b018
leaq 0xe1db(%rip), %rsi # 0x3b0f6
movl $0x25, %edx
leaq 0xe216(%rip), %rcx # 0x3b13d
callq 0x21600
movq $0x0, -0x20(%rbp)
movq -0x10(%rbp), %rdi
movq (%rdi), %rax
callq *0x48(%rax)
cmpq $0x2, %rax
jne 0x2cf8d
movl $0xa0, %edi
callq 0x21a10
movq %rax, %rdi
movq %rdi, %rax
movq %rax, -0x38(%rbp)
movq -0x8(%rbp), %rsi
movq -0x10(%rbp), %rdx
callq 0x21e30
jmp 0x2cf67
movq -0x38(%rbp), %rax
movq %rax, -0x20(%rbp)
jmp 0x2cfd2
movq -0x38(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x28(%rbp)
movl %eax, -0x2c(%rbp)
movl $0xa0, %esi
callq 0x21a50
jmp 0x2cfdc
movl $0x18, %edi
callq 0x21a10
movq %rax, %rdi
movq %rdi, %rax
movq %rax, -0x40(%rbp)
movq -0x10(%rbp), %rsi
callq 0x210e0
jmp 0x2cfac
movq -0x40(%rbp), %rax
movq %rax, -0x20(%rbp)
jmp 0x2cfd2
movq -0x40(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x28(%rbp)
movl %eax, -0x2c(%rbp)
movl $0x18, %esi
callq 0x21a50
jmp 0x2cfdc
movq -0x20(%rbp), %rax
addq $0x40, %rsp
popq %rbp
retq
movq -0x28(%rbp), %rdi
callq 0x22300
nopw %cs:(%rax,%rax)
| _Z32SDL_CreateRendererImplementationRN3SDL6ResultEP10SDL_WindowPKc:
push rbp
mov rbp, rsp
sub rsp, 40h
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov [rbp+var_18], rdx
cmp [rbp+var_10], 0
jz short loc_2CF0D
jmp short loc_2CF2C
loc_2CF0D:
lea rdi, aWindow; "window"
lea rsi, aWorkspaceLlm4b_3; "/workspace/llm4binary/github2025/SDL3Li"...
mov edx, 25h ; '%'
lea rcx, aSdlRendererSdl; "SDL_Renderer *SDL_CreateRendererImpleme"...
call ___assert_fail
loc_2CF2C:
mov [rbp+var_20], 0
mov rdi, [rbp+var_10]
mov rax, [rdi]
call qword ptr [rax+48h]
cmp rax, 2
jnz short loc_2CF8D
mov edi, 0A0h; unsigned __int64
call __Znwm; operator new(ulong)
mov rdi, rax; this
mov rax, rdi
mov [rbp+var_38], rax
mov rsi, [rbp+var_8]; SDL::Result *
mov rdx, [rbp+var_10]; SDL_Window *
call __ZN3SDL13OpenGL1RenderC2ERNS_6ResultEP10SDL_Window; SDL::OpenGL1Render::OpenGL1Render(SDL::Result &,SDL_Window *)
jmp short $+2
loc_2CF67:
mov rax, [rbp+var_38]
mov [rbp+var_20], rax
jmp short loc_2CFD2
mov rdi, [rbp+var_38]; void *
mov rcx, rax
mov eax, edx
mov [rbp+var_28], rcx
mov [rbp+var_2C], eax
mov esi, 0A0h; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_2CFDC
loc_2CF8D:
mov edi, 18h; unsigned __int64
call __Znwm; operator new(ulong)
mov rdi, rax; this
mov rax, rdi
mov [rbp+var_40], rax
mov rsi, [rbp+var_10]; SDL_Window *
call __ZN3SDL14SoftwareRenderC2EP10SDL_Window; SDL::SoftwareRender::SoftwareRender(SDL_Window *)
jmp short $+2
loc_2CFAC:
mov rax, [rbp+var_40]
mov [rbp+var_20], rax
jmp short loc_2CFD2
mov rdi, [rbp+var_40]; void *
mov rcx, rax
mov eax, edx
mov [rbp+var_28], rcx
mov [rbp+var_2C], eax
mov esi, 18h; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_2CFDC
loc_2CFD2:
mov rax, [rbp+var_20]
add rsp, 40h
pop rbp
retn
loc_2CFDC:
mov rdi, [rbp+var_28]
call __Unwind_Resume
| SDL::OpenGL1Render * SDL_CreateRendererImplementation(SDL::Result *a1, SDL_Window *a2, const char *a3)
{
SDL::SoftwareRender *v4; // [rsp+0h] [rbp-40h]
SDL::OpenGL1Render *v5; // [rsp+8h] [rbp-38h]
if ( !a2 )
__assert_fail(
"window",
"/workspace/llm4binary/github2025/SDL3Lite/source/SDL3/SDL_Renderer.cpp",
37LL,
"SDL_Renderer *SDL_CreateRendererImplementation(SDL::Result &, SDL_Window *, const char *)");
if ( (*(long long ( **)(SDL_Window *))(*(_QWORD *)a2 + 72LL))(a2) == 2 )
{
v5 = (SDL::OpenGL1Render *)operator new(0xA0uLL);
SDL::OpenGL1Render::OpenGL1Render(v5, a1, a2);
return v5;
}
else
{
v4 = (SDL::SoftwareRender *)operator new(0x18uLL);
SDL::SoftwareRender::SoftwareRender(v4, a2);
return v4;
}
}
| SDL_CreateRendererImplementation:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x40
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV qword ptr [RBP + -0x18],RDX
CMP qword ptr [RBP + -0x10],0x0
JZ 0x0012cf0d
JMP 0x0012cf2c
LAB_0012cf0d:
LEA RDI,[0x13b018]
LEA RSI,[0x13b0f6]
MOV EDX,0x25
LEA RCX,[0x13b13d]
CALL 0x00121600
LAB_0012cf2c:
MOV qword ptr [RBP + -0x20],0x0
MOV RDI,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RDI]
CALL qword ptr [RAX + 0x48]
CMP RAX,0x2
JNZ 0x0012cf8d
MOV EDI,0xa0
CALL 0x00121a10
MOV RDI,RAX
MOV RAX,RDI
MOV qword ptr [RBP + -0x38],RAX
MOV RSI,qword ptr [RBP + -0x8]
MOV RDX,qword ptr [RBP + -0x10]
LAB_0012cf60:
CALL 0x00121e30
LAB_0012cf65:
JMP 0x0012cf67
LAB_0012cf67:
MOV RAX,qword ptr [RBP + -0x38]
MOV qword ptr [RBP + -0x20],RAX
JMP 0x0012cfd2
LAB_0012cf8d:
MOV EDI,0x18
CALL 0x00121a10
MOV RDI,RAX
MOV RAX,RDI
MOV qword ptr [RBP + -0x40],RAX
MOV RSI,qword ptr [RBP + -0x10]
LAB_0012cfa5:
CALL 0x001210e0
LAB_0012cfaa:
JMP 0x0012cfac
LAB_0012cfac:
MOV RAX,qword ptr [RBP + -0x40]
MOV qword ptr [RBP + -0x20],RAX
JMP 0x0012cfd2
LAB_0012cfd2:
MOV RAX,qword ptr [RBP + -0x20]
ADD RSP,0x40
POP RBP
RET
|
/* SDL_CreateRendererImplementation(SDL::Result&, SDL_Window*, char const*) */
OpenGL1Render * SDL_CreateRendererImplementation(Result *param_1,SDL_Window *param_2,char *param_3)
{
long lVar1;
OpenGL1Render *local_28;
if (param_2 != (SDL_Window *)0x0) {
lVar1 = (**(code **)(*(long *)param_2 + 0x48))();
if (lVar1 == 2) {
local_28 = (OpenGL1Render *)operator_new(0xa0);
/* try { // try from 0012cf60 to 0012cf64 has its CatchHandler @ 0012cf71 */
SDL::OpenGL1Render::OpenGL1Render(local_28,param_1,param_2);
}
else {
local_28 = (OpenGL1Render *)operator_new(0x18);
/* try { // try from 0012cfa5 to 0012cfa9 has its CatchHandler @ 0012cfb6 */
SDL::SoftwareRender::SoftwareRender((SoftwareRender *)local_28,param_2);
}
return local_28;
}
/* WARNING: Subroutine does not return */
__assert_fail("window","/workspace/llm4binary/github2025/SDL3Lite/source/SDL3/SDL_Renderer.cpp",
0x25,
"SDL_Renderer *SDL_CreateRendererImplementation(SDL::Result &, SDL_Window *, const char *)"
);
}
| |
51,836 | Column_definition::set_type(Column_definition const&) | eloqsql/sql/field.h | void set_type(const Column_definition &other)
{
set_handler(other.type_handler());
length= other.length;
char_length= other.char_length;
decimals= other.decimals;
flags= other.flags;
pack_length= other.pack_length;
unireg_check= other.unireg_check;
interval= other.interval;
charset= other.charset;
srid= other.srid;
pack_flag= other.pack_flag;
} | O0 | c | Column_definition::set_type(Column_definition const&):
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x18(%rbp)
movq -0x10(%rbp), %rdi
callq 0x4b3700
movq -0x18(%rbp), %rdi
movq %rax, %rsi
callq 0x4eeca0
movq -0x18(%rbp), %rax
movq -0x10(%rbp), %rcx
movq 0x8(%rcx), %rcx
movq %rcx, 0x8(%rax)
movq -0x10(%rbp), %rcx
movl 0x64(%rcx), %ecx
movl %ecx, 0x64(%rax)
movq -0x10(%rbp), %rcx
movw 0x28(%rcx), %cx
movw %cx, 0x28(%rax)
movq -0x10(%rbp), %rcx
movl 0x68(%rcx), %ecx
movl %ecx, 0x68(%rax)
movq -0x10(%rbp), %rcx
movl 0x6c(%rcx), %ecx
movl %ecx, 0x6c(%rax)
movq -0x10(%rbp), %rcx
movb 0x2a(%rcx), %cl
movb %cl, 0x2a(%rax)
movq -0x10(%rbp), %rcx
movq 0x10(%rcx), %rcx
movq %rcx, 0x10(%rax)
movq -0x10(%rbp), %rcx
movq 0x18(%rcx), %rcx
movq %rcx, 0x18(%rax)
movq -0x10(%rbp), %rcx
movl 0x20(%rcx), %ecx
movl %ecx, 0x20(%rax)
movq -0x10(%rbp), %rcx
movl 0x24(%rcx), %ecx
movl %ecx, 0x24(%rax)
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
nopl (%rax)
| _ZN17Column_definition8set_typeERKS_:
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_18], rax
mov rdi, [rbp+var_10]; this
call _ZNK30Type_handler_hybrid_field_type12type_handlerEv; Type_handler_hybrid_field_type::type_handler(void)
mov rdi, [rbp+var_18]; this
mov rsi, rax; Type_handler *
call _ZN30Type_handler_hybrid_field_type11set_handlerEPK12Type_handler; Type_handler_hybrid_field_type::set_handler(Type_handler const*)
mov rax, [rbp+var_18]
mov rcx, [rbp+var_10]
mov rcx, [rcx+8]
mov [rax+8], rcx
mov rcx, [rbp+var_10]
mov ecx, [rcx+64h]
mov [rax+64h], ecx
mov rcx, [rbp+var_10]
mov cx, [rcx+28h]
mov [rax+28h], cx
mov rcx, [rbp+var_10]
mov ecx, [rcx+68h]
mov [rax+68h], ecx
mov rcx, [rbp+var_10]
mov ecx, [rcx+6Ch]
mov [rax+6Ch], ecx
mov rcx, [rbp+var_10]
mov cl, [rcx+2Ah]
mov [rax+2Ah], cl
mov rcx, [rbp+var_10]
mov rcx, [rcx+10h]
mov [rax+10h], rcx
mov rcx, [rbp+var_10]
mov rcx, [rcx+18h]
mov [rax+18h], rcx
mov rcx, [rbp+var_10]
mov ecx, [rcx+20h]
mov [rax+20h], ecx
mov rcx, [rbp+var_10]
mov ecx, [rcx+24h]
mov [rax+24h], ecx
add rsp, 20h
pop rbp
retn
| Column_definition * Column_definition::set_type(Column_definition *this, const Column_definition *a2)
{
const Type_handler *v2; // rax
Column_definition *result; // rax
v2 = (const Type_handler *)Type_handler_hybrid_field_type::type_handler(a2);
Type_handler_hybrid_field_type::set_handler(this, v2);
result = this;
*((_QWORD *)this + 1) = *((_QWORD *)a2 + 1);
*((_DWORD *)this + 25) = *((_DWORD *)a2 + 25);
*((_WORD *)this + 20) = *((_WORD *)a2 + 20);
*((_DWORD *)this + 26) = *((_DWORD *)a2 + 26);
*((_DWORD *)this + 27) = *((_DWORD *)a2 + 27);
*((_BYTE *)this + 42) = *((_BYTE *)a2 + 42);
*((_QWORD *)this + 2) = *((_QWORD *)a2 + 2);
*((_QWORD *)this + 3) = *((_QWORD *)a2 + 3);
*((_DWORD *)this + 8) = *((_DWORD *)a2 + 8);
*((_DWORD *)this + 9) = *((_DWORD *)a2 + 9);
return result;
}
| operator():
PUSH RBP
MOV RBP,RSP
SUB RSP,0x20
MOV qword ptr [RBP + -0x8],RSI
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x18],RDX
LEA RDI,[RBP + -0x8]
CALL 0x005a7250
MOV RAX,qword ptr [RAX]
MOV RCX,qword ptr [RBP + -0x18]
CMP RAX,qword ptr [RCX]
SETC AL
AND AL,0x1
ADD RSP,0x20
POP RBP
RET
|
/* bool
__gnu_cxx::__ops::_Iter_less_val::TEMPNAMEPLACEHOLDERVALUE(__gnu_cxx::__normal_iterator<unsigned
long long*, std::vector<unsigned long long, std::allocator<unsigned long long> > >, unsigned long
long&) const */
bool __thiscall
__gnu_cxx::__ops::_Iter_less_val::operator()(int8 param_1,int8 param_2,ulong *param_3)
{
ulong *puVar1;
int8 local_10;
local_10 = param_2;
puVar1 = (ulong *)__normal_iterator<unsigned_long_long*,std::vector<unsigned_long_long,std::allocator<unsigned_long_long>>>
::operator*((__normal_iterator<unsigned_long_long*,std::vector<unsigned_long_long,std::allocator<unsigned_long_long>>>
*)&local_10);
return *puVar1 < *param_3;
}
| |
51,837 | nlohmann::json_abi_v3_11_3::detail::out_of_range nlohmann::json_abi_v3_11_3::detail::out_of_range::create<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*, 0>(int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const*) | monkey531[P]llama/common/json.hpp | static out_of_range create(int id_, const std::string& what_arg, BasicJsonContext context)
{
const std::string w = concat(exception::name("out_of_range", id_), exception::diagnostics(context), what_arg);
return {id_, w.c_str()};
} | O2 | cpp | nlohmann::json_abi_v3_11_3::detail::out_of_range nlohmann::json_abi_v3_11_3::detail::out_of_range::create<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*, 0>(int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const*):
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x88, %rsp
movq %rcx, %r15
movq %rdx, %r14
movl %esi, %ebp
movq %rdi, %rbx
leaq 0x3428d(%rip), %rsi # 0xb6cec
leaq 0x28(%rsp), %rdi
leaq 0x7(%rsp), %rdx
callq 0x2a75e
leaq 0x48(%rsp), %rdi
leaq 0x28(%rsp), %rsi
movl %ebp, %edx
callq 0x4e28c
leaq 0x8(%rsp), %rdi
movq %r15, %rsi
callq 0x52454
leaq 0x68(%rsp), %rdi
leaq 0x48(%rsp), %rsi
leaq 0x8(%rsp), %rdx
movq %r14, %rcx
callq 0x4e223
leaq 0x8(%rsp), %rdi
callq 0x25258
leaq 0x48(%rsp), %rdi
callq 0x25258
leaq 0x28(%rsp), %rdi
callq 0x25258
movq 0x68(%rsp), %rdx
movq %rbx, %rdi
movl %ebp, %esi
callq 0x52476
leaq 0x68(%rsp), %rdi
callq 0x25258
movq %rbx, %rax
addq $0x88, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq 0x68(%rsp), %rdi
jmp 0x82b1b
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x25258
jmp 0x82b07
movq %rax, %rbx
leaq 0x48(%rsp), %rdi
callq 0x25258
jmp 0x82b16
movq %rax, %rbx
leaq 0x28(%rsp), %rdi
callq 0x25258
jmp 0x82b25
movq %rax, %rbx
movq %rbx, %rdi
callq 0x24fe0
nop
| _ZN8nlohmann16json_abi_v3_11_36detail12out_of_range6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_:
push rbp
push r15
push r14
push rbx
sub rsp, 88h
mov r15, rcx
mov r14, rdx
mov ebp, esi
mov rbx, rdi
lea rsi, aOutOfRange; "out_of_range"
lea rdi, [rsp+0A8h+var_80]
lea rdx, [rsp+0A8h+var_A1]
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&)
lea rdi, [rsp+0A8h+var_60]
lea rsi, [rsp+0A8h+var_80]
mov edx, ebp
call _ZN8nlohmann16json_abi_v3_11_36detail9exception4nameERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEi; nlohmann::json_abi_v3_11_3::detail::exception::name(std::string const&,int)
lea rdi, [rsp+0A8h+var_A0]
mov rsi, r15
call _ZN8nlohmann16json_abi_v3_11_36detail9exception11diagnosticsINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEEEESC_PKT_; nlohmann::json_abi_v3_11_3::detail::exception::diagnostics<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> const*)
lea rdi, [rsp+0A8h+var_40]
lea rsi, [rsp+0A8h+var_60]
lea rdx, [rsp+0A8h+var_A0]
mov rcx, r14
call _ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJS8_S8_RKS8_EEET_DpOT0_; nlohmann::json_abi_v3_11_3::detail::concat<std::string,std::string,std::string,std::string const&>(std::string,std::string,std::string const&)
lea rdi, [rsp+0A8h+var_A0]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
lea rdi, [rsp+0A8h+var_60]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
lea rdi, [rsp+0A8h+var_80]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
mov rdx, [rsp+0A8h+var_40]; char *
mov rdi, rbx; this
mov esi, ebp; int
call _ZN8nlohmann16json_abi_v3_11_36detail12out_of_rangeC2EiPKc; nlohmann::json_abi_v3_11_3::detail::out_of_range::out_of_range(int,char const*)
lea rdi, [rsp+0A8h+var_40]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
mov rax, rbx
add rsp, 88h
pop rbx
pop r14
pop r15
pop rbp
retn
mov rbx, rax
lea rdi, [rsp+arg_60]
jmp short loc_82B1B
mov rbx, rax
lea rdi, [rsp+arg_0]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
jmp short loc_82B07
mov rbx, rax
loc_82B07:
lea rdi, [rsp+arg_40]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
jmp short loc_82B16
mov rbx, rax
loc_82B16:
lea rdi, [rsp+arg_20]; void *
loc_82B1B:
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
jmp short loc_82B25
mov rbx, rax
loc_82B25:
mov rdi, rbx
call __Unwind_Resume
| nlohmann::json_abi_v3_11_3::detail::out_of_range * ZN8nlohmann16json_abi_v3_11_36detail12out_of_range6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_(
nlohmann::json_abi_v3_11_3::detail::out_of_range *this,
int a2,
long long a3)
{
_QWORD v5[4]; // [rsp+8h] [rbp-A0h] BYREF
_QWORD v6[4]; // [rsp+28h] [rbp-80h] BYREF
_BYTE v7[32]; // [rsp+48h] [rbp-60h] BYREF
char *v8[8]; // [rsp+68h] [rbp-40h] BYREF
std::string::basic_string<std::allocator<char>>(v6, (long long)"out_of_range");
nlohmann::json_abi_v3_11_3::detail::exception::name((long long)v7, (long long)v6, a2);
nlohmann::json_abi_v3_11_3::detail::exception::diagnostics<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>>(v5);
nlohmann::json_abi_v3_11_3::detail::concat<std::string,std::string,std::string,std::string const&>(
(long long)v8,
(long long)v7,
(long long)v5,
a3);
std::string::~string(v5);
std::string::~string(v7);
std::string::~string(v6);
nlohmann::json_abi_v3_11_3::detail::out_of_range::out_of_range(this, a2, v8[0]);
std::string::~string(v8);
return this;
}
| _ZN8nlohmann16json_abi_v3_11_36detail12out_of_range6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_:
PUSH RBP
PUSH R15
PUSH R14
PUSH RBX
SUB RSP,0x88
MOV R15,RCX
MOV R14,RDX
MOV EBP,ESI
MOV RBX,RDI
LAB_00182a58:
LEA RSI,[0x1b6cec]
LEA RDI,[RSP + 0x28]
LEA RDX,[RSP + 0x7]
CALL 0x0012a75e
LAB_00182a6e:
LEA RDI,[RSP + 0x48]
LEA RSI,[RSP + 0x28]
MOV EDX,EBP
CALL 0x0014e28c
LAB_00182a7f:
LEA RDI,[RSP + 0x8]
MOV RSI,R15
CALL 0x00152454
LAB_00182a8c:
LEA RDI,[RSP + 0x68]
LEA RSI,[RSP + 0x48]
LEA RDX,[RSP + 0x8]
MOV RCX,R14
CALL 0x0014e223
LEA RDI,[RSP + 0x8]
CALL 0x00125258
LEA RDI,[RSP + 0x48]
CALL 0x00125258
LEA RDI,[RSP + 0x28]
CALL 0x00125258
MOV RDX,qword ptr [RSP + 0x68]
LAB_00182ac6:
MOV RDI,RBX
MOV ESI,EBP
CALL 0x00152476
LAB_00182ad0:
LEA RDI,[RSP + 0x68]
CALL 0x00125258
MOV RAX,RBX
ADD RSP,0x88
POP RBX
POP R14
POP R15
POP RBP
RET
|
out_of_range *
_ZN8nlohmann16json_abi_v3_11_36detail12out_of_range6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_
(out_of_range *param_1,int param_2,string *param_3)
{
allocator local_a1;
string local_a0 [32];
string local_80 [32];
exception local_60 [32];
char *local_40 [4];
/* try { // try from 00182a58 to 00182a6d has its CatchHandler @ 00182b22 */
std::__cxx11::string::string<std::allocator<char>>(local_80,"out_of_range",&local_a1);
/* try { // try from 00182a6e to 00182a7e has its CatchHandler @ 00182b13 */
nlohmann::json_abi_v3_11_3::detail::exception::name(local_60,local_80,param_2);
/* try { // try from 00182a7f to 00182a8b has its CatchHandler @ 00182b04 */
nlohmann::json_abi_v3_11_3::detail::exception::
diagnostics<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,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_a0);
/* try { // try from 00182a8c to 00182aa2 has its CatchHandler @ 00182af5 */
nlohmann::json_abi_v3_11_3::detail::
concat<std::__cxx11::string,std::__cxx11::string,std::__cxx11::string,std::__cxx11::string_const&>
((detail *)local_40,(string *)local_60,local_a0,param_3);
std::__cxx11::string::~string(local_a0);
std::__cxx11::string::~string((string *)local_60);
std::__cxx11::string::~string(local_80);
/* try { // try from 00182ac6 to 00182acf has its CatchHandler @ 00182aeb */
nlohmann::json_abi_v3_11_3::detail::out_of_range::out_of_range(param_1,param_2,local_40[0]);
std::__cxx11::string::~string((string *)local_40);
return param_1;
}
| |
51,838 | pre_ecrecover | corpus-core[P]colibri-stateless/src/chains/eth/precompiles/precompiles_basic.c | static pre_result_t pre_ecrecover(bytes_t input, buffer_t* output, uint64_t* gas_used) {
if (input.len != 128) return PRE_INVALID_INPUT;
bytes_t hash = bytes_slice(input, 0, 32);
uint8_t v = input.data[63];
uint8_t sig[65] = {0};
uint8_t pubkey[64] = {0};
memcpy(sig, input.data + 64, 64); // copy r s
sig[64] = v > 28 ? (v % 2 ? 27 : 28) : v;
if (!secp256k1_recover(hash.data, bytes(sig, 65), pubkey)) return PRE_INVALID_INPUT;
keccak(bytes(pubkey, 64), sig);
memset(sig, 0, 12);
output->data.len = 0;
buffer_append(output, bytes(sig, 32));
*gas_used = 3000;
return PRE_SUCCESS;
} | O2 | c | pre_ecrecover:
cmpl $0x80, %edi
jne 0x49c02
pushq %r15
pushq %r14
pushq %rbx
subq $0x90, %rsp
movq %rcx, %rbx
movq %rdx, %r14
movzbl 0x3f(%rsi), %eax
xorps %xmm0, %xmm0
movq %rsp, %rcx
movaps %xmm0, 0x30(%rcx)
movaps %xmm0, 0x20(%rcx)
movaps %xmm0, 0x10(%rcx)
movaps %xmm0, (%rcx)
movups 0x40(%rsi), %xmm0
movups 0x50(%rsi), %xmm1
movups 0x60(%rsi), %xmm2
movups 0x70(%rsi), %xmm3
leaq 0x40(%rsp), %rdx
movaps %xmm0, (%rdx)
movaps %xmm1, 0x10(%rdx)
movaps %xmm2, 0x20(%rdx)
movaps %xmm3, 0x30(%rdx)
movl %eax, %edi
andb $0x1, %dil
movb $0x1c, %r8b
subb %dil, %r8b
cmpb $0x1d, %al
movzbl %r8b, %edi
cmovbl %eax, %edi
movb %dil, 0x40(%rdx)
pushq $0x41
popq %rax
movq %rsi, %rdi
movl %eax, %esi
callq 0x4df85
testb %al, %al
je 0x49c06
pushq $0x40
popq %rdi
movq %rsp, %rsi
leaq 0x40(%rsp), %r15
movq %r15, %rdx
callq 0x4dcd0
andl $0x0, 0x8(%r15)
andq $0x0, (%r15)
andl $0x0, (%r14)
pushq $0x20
popq %rsi
movq %r14, %rdi
movq %r15, %rdx
callq 0x4a173
movq $0xbb8, (%rbx) # imm = 0xBB8
xorl %eax, %eax
jmp 0x49c09
pushq $0x3
popq %rax
retq
pushq $0x3
popq %rax
addq $0x90, %rsp
popq %rbx
popq %r14
popq %r15
retq
| pre_ecrecover:
cmp edi, 80h
jnz loc_49C02
push r15
push r14
push rbx
sub rsp, 90h
mov rbx, rcx
mov r14, rdx
movzx eax, byte ptr [rsi+3Fh]
xorps xmm0, xmm0
mov rcx, rsp
movaps xmmword ptr [rcx+30h], xmm0
movaps xmmword ptr [rcx+20h], xmm0
movaps xmmword ptr [rcx+10h], xmm0
movaps xmmword ptr [rcx], xmm0
movups xmm0, xmmword ptr [rsi+40h]
movups xmm1, xmmword ptr [rsi+50h]
movups xmm2, xmmword ptr [rsi+60h]
movups xmm3, xmmword ptr [rsi+70h]
lea rdx, [rsp+0A8h+var_68]
movaps xmmword ptr [rdx], xmm0
movaps xmmword ptr [rdx+10h], xmm1
movaps xmmword ptr [rdx+20h], xmm2
movaps xmmword ptr [rdx+30h], xmm3
mov edi, eax
and dil, 1
mov r8b, 1Ch
sub r8b, dil
cmp al, 1Dh
movzx edi, r8b
cmovb edi, eax
mov [rdx+40h], dil
push 41h ; 'A'
pop rax
mov rdi, rsi
mov esi, eax
call secp256k1_recover
test al, al
jz short loc_49C06
push 40h ; '@'
pop rdi
mov rsi, rsp
lea r15, [rsp+0A8h+var_68]
mov rdx, r15
call keccak
and dword ptr [r15+8], 0
and qword ptr [r15], 0
and dword ptr [r14], 0
push 20h ; ' '
pop rsi
mov rdi, r14
mov rdx, r15
call buffer_append
mov qword ptr [rbx], 0BB8h
xor eax, eax
jmp short loc_49C09
loc_49C02:
push 3
pop rax
retn
loc_49C06:
push 3
pop rax
loc_49C09:
add rsp, 90h
pop rbx
pop r14
pop r15
retn
| long long pre_ecrecover(int a1, long long a2, _DWORD *a3, _QWORD *a4)
{
unsigned __int8 v6; // al
__int128 v7; // xmm1
__int128 v8; // xmm2
__int128 v9; // xmm3
unsigned __int8 v10; // di
_BYTE v12[64]; // [rsp-40h] [rbp-A8h] BYREF
_OWORD v13[4]; // [rsp+0h] [rbp-68h] BYREF
unsigned __int8 v14; // [rsp+40h] [rbp-28h]
if ( a1 != 128 )
return 3LL;
v6 = *(_BYTE *)(a2 + 63);
memset(v12, 0, sizeof(v12));
v7 = *(_OWORD *)(a2 + 80);
v8 = *(_OWORD *)(a2 + 96);
v9 = *(_OWORD *)(a2 + 112);
v13[0] = *(_OWORD *)(a2 + 64);
v13[1] = v7;
v13[2] = v8;
v13[3] = v9;
v10 = 28 - (v6 & 1);
if ( v6 < 0x1Du )
v10 = v6;
v14 = v10;
if ( !(unsigned __int8)secp256k1_recover(a2, 65LL, v13, v12) )
return 3LL;
keccak(64LL, v12, v13);
DWORD2(v13[0]) = 0;
*(_QWORD *)&v13[0] = 0LL;
*a3 = 0;
buffer_append(a3, 32LL, v13);
*a4 = 3000LL;
return 0LL;
}
| pre_ecrecover:
CMP EDI,0x80
JNZ 0x00149c02
PUSH R15
PUSH R14
PUSH RBX
SUB RSP,0x90
MOV RBX,RCX
MOV R14,RDX
MOVZX EAX,byte ptr [RSI + 0x3f]
XORPS XMM0,XMM0
MOV RCX,RSP
MOVAPS xmmword ptr [RCX + 0x30],XMM0
MOVAPS xmmword ptr [RCX + 0x20],XMM0
MOVAPS xmmword ptr [RCX + 0x10],XMM0
MOVAPS xmmword ptr [RCX],XMM0
MOVUPS XMM0,xmmword ptr [RSI + 0x40]
MOVUPS XMM1,xmmword ptr [RSI + 0x50]
MOVUPS XMM2,xmmword ptr [RSI + 0x60]
MOVUPS XMM3,xmmword ptr [RSI + 0x70]
LEA RDX,[RSP + 0x40]
MOVAPS xmmword ptr [RDX],XMM0
MOVAPS xmmword ptr [RDX + 0x10],XMM1
MOVAPS xmmword ptr [RDX + 0x20],XMM2
MOVAPS xmmword ptr [RDX + 0x30],XMM3
MOV EDI,EAX
AND DIL,0x1
MOV R8B,0x1c
SUB R8B,DIL
CMP AL,0x1d
MOVZX EDI,R8B
CMOVC EDI,EAX
MOV byte ptr [RDX + 0x40],DIL
PUSH 0x41
POP RAX
MOV RDI,RSI
MOV ESI,EAX
CALL 0x0014df85
TEST AL,AL
JZ 0x00149c06
PUSH 0x40
POP RDI
MOV RSI,RSP
LEA R15,[RSP + 0x40]
MOV RDX,R15
CALL 0x0014dcd0
AND dword ptr [R15 + 0x8],0x0
AND qword ptr [R15],0x0
AND dword ptr [R14],0x0
PUSH 0x20
POP RSI
MOV RDI,R14
MOV RDX,R15
CALL 0x0014a173
MOV qword ptr [RBX],0xbb8
XOR EAX,EAX
JMP 0x00149c09
LAB_00149c02:
PUSH 0x3
POP RAX
RET
LAB_00149c06:
PUSH 0x3
POP RAX
LAB_00149c09:
ADD RSP,0x90
POP RBX
POP R14
POP R15
RET
|
int8 pre_ecrecover(int param_1,long param_2,int4 *param_3,int8 *param_4)
{
byte bVar1;
char cVar2;
int8 uVar3;
int8 local_a8;
int8 uStack_a0;
int8 local_98;
int8 uStack_90;
int8 local_88;
int8 uStack_80;
int8 local_78;
int8 uStack_70;
int8 local_68;
int4 uStack_60;
int4 uStack_5c;
int4 local_58;
int4 uStack_54;
int4 uStack_50;
int4 uStack_4c;
int4 local_48;
int4 uStack_44;
int4 uStack_40;
int4 uStack_3c;
int4 local_38;
int4 uStack_34;
int4 uStack_30;
int4 uStack_2c;
byte local_28;
if (param_1 == 0x80) {
bVar1 = *(byte *)(param_2 + 0x3f);
local_78 = 0;
uStack_70 = 0;
local_88 = 0;
uStack_80 = 0;
local_98 = 0;
uStack_90 = 0;
local_a8 = 0;
uStack_a0 = 0;
local_68 = *(int8 *)(param_2 + 0x40);
uStack_60 = *(int4 *)(param_2 + 0x48);
uStack_5c = *(int4 *)(param_2 + 0x4c);
local_58 = *(int4 *)(param_2 + 0x50);
uStack_54 = *(int4 *)(param_2 + 0x54);
uStack_50 = *(int4 *)(param_2 + 0x58);
uStack_4c = *(int4 *)(param_2 + 0x5c);
local_48 = *(int4 *)(param_2 + 0x60);
uStack_44 = *(int4 *)(param_2 + 100);
uStack_40 = *(int4 *)(param_2 + 0x68);
uStack_3c = *(int4 *)(param_2 + 0x6c);
local_38 = *(int4 *)(param_2 + 0x70);
uStack_34 = *(int4 *)(param_2 + 0x74);
uStack_30 = *(int4 *)(param_2 + 0x78);
uStack_2c = *(int4 *)(param_2 + 0x7c);
local_28 = 0x1c - (bVar1 & 1);
if (bVar1 < 0x1d) {
local_28 = bVar1;
}
cVar2 = secp256k1_recover(param_2,0x41);
if (cVar2 == '\0') {
uVar3 = 3;
}
else {
keccak(0x40,&local_a8,&local_68);
uStack_60 = 0;
local_68 = 0;
*param_3 = 0;
buffer_append(param_3,0x20,&local_68);
*param_4 = 3000;
uVar3 = 0;
}
return uVar3;
}
return 3;
}
| |
51,839 | 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 0x97499
movb 0x40(%r14), %al
addb $-0x5, %al
cmpb $0x1, %al
ja 0x97499
movq %rsi, %rdi
callq 0x86452
movq %rax, %r15
movq %r14, %rdi
callq 0x86452
movq %rax, %rcx
movq %r15, %rax
cqto
idivq %rcx
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 %rax, %rsi
callq 0x607c6
jmp 0x974e5
movq %rsi, %rdi
callq 0x8659c
movsd %xmm0, 0x8(%rsp)
movq %r14, %rdi
callq 0x8659c
movsd 0x8(%rsp), %xmm1
divsd %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
| _ZNK5minja5ValuedvERKS0_:
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_97499
mov al, [r14+40h]
add al, 0FBh
cmp al, 1
ja short loc_97499
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)
mov rcx, rax
mov rax, r15
cqo
idiv rcx
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, rax
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_974E5
loc_97499:
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]
divsd 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_974E5:
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 0x00197499
MOV AL,byte ptr [R14 + 0x40]
ADD AL,0xfb
CMP AL,0x1
JA 0x00197499
MOV RDI,RSI
CALL 0x00186452
MOV R15,RAX
MOV RDI,R14
CALL 0x00186452
MOV RCX,RAX
MOV RAX,R15
CQO
IDIV RCX
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,RAX
CALL 0x001607c6
JMP 0x001974e5
LAB_00197499:
MOV RDI,RSI
CALL 0x0018659c
MOVSD qword ptr [RSP + 0x8],XMM0
MOV RDI,R14
CALL 0x0018659c
MOVSD XMM1,qword ptr [RSP + 0x8]
DIVSD 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_001974e5:
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,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;
}
| |
51,840 | common_arg::common_arg(std::initializer_list<char const*> const&, char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, void (*)(common_params&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)) | monkey531[P]llama/common/arg.h | common_arg(
const std::initializer_list<const char *> & args,
const char * value_hint,
const std::string & help,
void (*handler)(common_params & params, const std::string &)
) : args(args), value_hint(value_hint), help(help), handler_string(handler) {} | O2 | c | common_arg::common_arg(std::initializer_list<char const*> const&, char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, void (*)(common_params&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %r8, %r14
movq %rcx, %r15
movq %rdx, %r12
movq %rsi, %rbp
movq %rdi, %rbx
leaq 0x4(%rsp), %rsi
andl $0x0, (%rsi)
pushq $0x1
popq %rdx
leaq 0x3(%rsp), %rcx
leaq 0x2(%rsp), %r8
callq 0x48506
leaq 0x38(%rbx), %rax
xorps %xmm0, %xmm0
movups %xmm0, 0x30(%rbx)
andq $0x0, 0x40(%rbx)
movq %rax, 0x48(%rbx)
movq %rax, 0x50(%rbx)
andq $0x0, 0x58(%rbx)
leaq 0x60(%rbx), %r13
movq (%rbp), %rsi
movq 0x8(%rbp), %rdx
leaq 0x1(%rsp), %rcx
movq %r13, %rdi
callq 0x4854c
movq %r12, 0x78(%rbx)
leaq 0x90(%rbx), %rdi
xorps %xmm0, %xmm0
movups %xmm0, 0x80(%rbx)
movq %r15, %rsi
callq 0x24c50
movb $0x0, 0xb0(%rbx)
andq $0x0, 0xb8(%rbx)
movq %r14, 0xc0(%rbx)
xorps %xmm0, %xmm0
movups %xmm0, 0xc8(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r14
movq %r13, %rdi
callq 0x48888
jmp 0x4548a
movq %rax, %r14
leaq 0x30(%rbx), %rdi
callq 0x485d0
movq %rbx, %rdi
callq 0x485d0
movq %r14, %rdi
callq 0x25010
| _ZN10common_argC2ERKSt16initializer_listIPKcES2_RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEPFvR13common_paramsSD_E:
push rbp
push r15
push r14
push r13
push r12
push rbx
push rax
mov r14, r8
mov r15, rcx
mov r12, rdx
mov rbp, rsi
mov rbx, rdi
lea rsi, [rsp+38h+var_34]
and dword ptr [rsi], 0
push 1
pop rdx
lea rcx, [rsp+38h+var_35]
lea r8, [rsp+38h+var_36]
call _ZNSt3setI13llama_exampleSt4lessIS0_ESaIS0_EEC2ESt16initializer_listIS0_ERKS2_RKS3_; std::set<llama_example>::set(std::initializer_list<llama_example>,std::less<llama_example> const&,std::allocator<llama_example> const&)
lea rax, [rbx+38h]
xorps xmm0, xmm0
movups xmmword ptr [rbx+30h], xmm0
and qword ptr [rbx+40h], 0
mov [rbx+48h], rax
mov [rbx+50h], rax
and qword ptr [rbx+58h], 0
lea r13, [rbx+60h]
mov rsi, [rbp+0]
mov rdx, [rbp+8]
lea rcx, [rsp+38h+var_37]
mov rdi, r13
call _ZNSt6vectorIPKcSaIS1_EEC2ESt16initializer_listIS1_ERKS2_; std::vector<char const*>::vector(std::initializer_list<char const*>,std::allocator<char const*> const&)
mov [rbx+78h], r12
lea rdi, [rbx+90h]
xorps xmm0, xmm0
movups xmmword ptr [rbx+80h], xmm0
mov rsi, r15
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2ERKS4_; std::string::basic_string(std::string const&)
mov byte ptr [rbx+0B0h], 0
and qword ptr [rbx+0B8h], 0
mov [rbx+0C0h], r14
xorps xmm0, xmm0
movups xmmword ptr [rbx+0C8h], xmm0
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
mov r14, rax
mov rdi, r13
call _ZNSt12_Vector_baseIPKcSaIS1_EED2Ev; std::_Vector_base<char const*>::~_Vector_base()
jmp short loc_4548A
mov r14, rax
loc_4548A:
lea rdi, [rbx+30h]
call _ZNSt8_Rb_treeI13llama_exampleS0_St9_IdentityIS0_ESt4lessIS0_ESaIS0_EED2Ev; std::_Rb_tree<llama_example,llama_example,std::_Identity<llama_example>,std::less<llama_example>,std::allocator<llama_example>>::~_Rb_tree()
mov rdi, rbx
call _ZNSt8_Rb_treeI13llama_exampleS0_St9_IdentityIS0_ESt4lessIS0_ESaIS0_EED2Ev; std::_Rb_tree<llama_example,llama_example,std::_Identity<llama_example>,std::less<llama_example>,std::allocator<llama_example>>::~_Rb_tree()
mov rdi, r14
call __Unwind_Resume
| long long common_arg::common_arg(long long a1, _QWORD *a2, long long a3, long long a4, long long a5)
{
int v5; // eax
long long result; // rax
int v10; // [rsp+0h] [rbp-38h] BYREF
_DWORD v11[13]; // [rsp+4h] [rbp-34h] BYREF
v10 = v5;
v11[0] = 0;
std::set<llama_example>::set(a1, v11, 1LL, (char *)&v10 + 3, (char *)&v10 + 2);
*(_OWORD *)(a1 + 48) = 0LL;
*(_QWORD *)(a1 + 64) = 0LL;
*(_QWORD *)(a1 + 72) = a1 + 56;
*(_QWORD *)(a1 + 80) = a1 + 56;
*(_QWORD *)(a1 + 88) = 0LL;
std::vector<char const*>::vector(a1 + 96, *a2, a2[1], (char *)&v10 + 1);
*(_QWORD *)(a1 + 120) = a3;
*(_OWORD *)(a1 + 128) = 0LL;
result = std::string::basic_string(a1 + 144, a4);
*(_BYTE *)(a1 + 176) = 0;
*(_QWORD *)(a1 + 184) = 0LL;
*(_QWORD *)(a1 + 192) = a5;
*(_OWORD *)(a1 + 200) = 0LL;
return result;
}
| common_arg:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
PUSH RAX
MOV R14,R8
MOV R15,RCX
MOV R12,RDX
MOV RBP,RSI
MOV RBX,RDI
LEA RSI,[RSP + 0x4]
AND dword ptr [RSI],0x0
PUSH 0x1
POP RDX
LEA RCX,[RSP + 0x3]
LEA R8,[RSP + 0x2]
CALL 0x00148506
LEA RAX,[RBX + 0x38]
XORPS XMM0,XMM0
MOVUPS xmmword ptr [RBX + 0x30],XMM0
AND qword ptr [RBX + 0x40],0x0
MOV qword ptr [RBX + 0x48],RAX
MOV qword ptr [RBX + 0x50],RAX
AND qword ptr [RBX + 0x58],0x0
LEA R13,[RBX + 0x60]
MOV RSI,qword ptr [RBP]
MOV RDX,qword ptr [RBP + 0x8]
LAB_00145421:
LEA RCX,[RSP + 0x1]
MOV RDI,R13
CALL 0x0014854c
MOV qword ptr [RBX + 0x78],R12
LEA RDI,[RBX + 0x90]
XORPS XMM0,XMM0
MOVUPS xmmword ptr [RBX + 0x80],XMM0
LAB_00145443:
MOV RSI,R15
CALL 0x00124c50
LAB_0014544b:
MOV byte ptr [RBX + 0xb0],0x0
AND qword ptr [RBX + 0xb8],0x0
MOV qword ptr [RBX + 0xc0],R14
XORPS XMM0,XMM0
MOVUPS xmmword ptr [RBX + 0xc8],XMM0
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
/* common_arg::common_arg(std::initializer_list<char const*> const&, char const*,
std::__cxx11::string const&, void (*)(common_params&, std::__cxx11::string const&)) */
void __thiscall
common_arg::common_arg
(common_arg *this,initializer_list *param_1,char *param_2,string *param_3,
_func_void_common_params_ptr_string_ptr *param_4)
{
int4 in_EAX;
int8 in_R9;
std::set<llama_example,std::less<llama_example>,std::allocator<llama_example>>::set
(this,&stack0xffffffffffffffcc,1,&stack0xffffffffffffffcb,&stack0xffffffffffffffca,in_R9
,in_EAX);
*(int8 *)(this + 0x30) = 0;
*(int8 *)(this + 0x38) = 0;
*(int8 *)(this + 0x40) = 0;
*(common_arg **)(this + 0x48) = this + 0x38;
*(common_arg **)(this + 0x50) = this + 0x38;
*(int8 *)(this + 0x58) = 0;
/* try { // try from 00145421 to 0014542d has its CatchHandler @ 00145487 */
std::vector<char_const*,std::allocator<char_const*>>::vector
((vector<char_const*,std::allocator<char_const*>> *)(this + 0x60),*(int8 *)param_1
,*(int8 *)(param_1 + 8),&stack0xffffffffffffffc9);
*(char **)(this + 0x78) = param_2;
*(int8 *)(this + 0x80) = 0;
*(int8 *)(this + 0x88) = 0;
/* try { // try from 00145443 to 0014544a has its CatchHandler @ 0014547a */
std::__cxx11::string::string((string *)(this + 0x90),param_3);
this[0xb0] = (common_arg)0x0;
*(int8 *)(this + 0xb8) = 0;
*(_func_void_common_params_ptr_string_ptr **)(this + 0xc0) = param_4;
*(int8 *)(this + 200) = 0;
*(int8 *)(this + 0xd0) = 0;
return;
}
| |
51,841 | read_user_name | eloqsql/libmariadb/libmariadb/mariadb_lib.c | void read_user_name(char *name)
{
if (geteuid() == 0)
strcpy(name,"root"); /* allow use of surun */
else
{
#ifdef HAVE_GETPWUID
struct passwd *skr;
const char *str;
if ((skr=getpwuid(geteuid())) != NULL)
{
str=skr->pw_name;
} else if ((str=getlogin()) == NULL)
{
if (!(str=getenv("USER")) && !(str=getenv("LOGNAME")) &&
!(str=getenv("LOGIN")))
str="UNKNOWN_USER";
}
ma_strmake(name,str,USERNAME_LENGTH);
#elif defined(HAVE_CUSERID)
(void) cuserid(name);
#else
ma_strmake(name,"UNKNOWN_USER", USERNAME_LENGTH);
#endif
}
return;
} | O0 | c | read_user_name:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
callq 0x36260
cmpl $0x0, %eax
jne 0x3aedb
movq -0x8(%rbp), %rdi
leaq 0x8fd89(%rip), %rsi # 0xcac5a
callq 0x363f0
jmp 0x3af70
callq 0x36260
movl %eax, %edi
callq 0x361e0
movq %rax, -0x10(%rbp)
cmpq $0x0, %rax
je 0x3aefe
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x18(%rbp)
jmp 0x3af5e
callq 0x36590
movq %rax, -0x18(%rbp)
cmpq $0x0, %rax
jne 0x3af5c
leaq 0x8fd61(%rip), %rdi # 0xcac75
callq 0x36760
movq %rax, -0x18(%rbp)
cmpq $0x0, %rax
jne 0x3af5a
leaq 0x8fd35(%rip), %rdi # 0xcac5f
callq 0x36760
movq %rax, -0x18(%rbp)
cmpq $0x0, %rax
jne 0x3af5a
leaq 0x8fd27(%rip), %rdi # 0xcac67
callq 0x36760
movq %rax, -0x18(%rbp)
cmpq $0x0, %rax
jne 0x3af5a
leaq 0x8fd17(%rip), %rax # 0xcac6d
movq %rax, -0x18(%rbp)
jmp 0x3af5c
jmp 0x3af5e
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rsi
movl $0x200, %edx # imm = 0x200
callq 0x55d30
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
| read_user_name:
push rbp
mov rbp, rsp
sub rsp, 20h
mov [rbp+var_8], rdi
call _geteuid
cmp eax, 0
jnz short loc_3AEDB
mov rdi, [rbp+var_8]
lea rsi, aRoot; "root"
call _strcpy
jmp loc_3AF70
loc_3AEDB:
call _geteuid
mov edi, eax
call _getpwuid
mov [rbp+var_10], rax
cmp rax, 0
jz short loc_3AEFE
mov rax, [rbp+var_10]
mov rax, [rax]
mov [rbp+var_18], rax
jmp short loc_3AF5E
loc_3AEFE:
call _getlogin
mov [rbp+var_18], rax
cmp rax, 0
jnz short loc_3AF5C
lea rdi, aUnknownUser+8; "USER"
call _getenv
mov [rbp+var_18], rax
cmp rax, 0
jnz short loc_3AF5A
lea rdi, aLogname; "LOGNAME"
call _getenv
mov [rbp+var_18], rax
cmp rax, 0
jnz short loc_3AF5A
lea rdi, aLogin; "LOGIN"
call _getenv
mov [rbp+var_18], rax
cmp rax, 0
jnz short loc_3AF5A
lea rax, aUnknownUser; "UNKNOWN_USER"
mov [rbp+var_18], rax
loc_3AF5A:
jmp short $+2
loc_3AF5C:
jmp short $+2
loc_3AF5E:
mov rdi, [rbp+var_8]
mov rsi, [rbp+var_18]
mov edx, 200h
call ma_strmake
loc_3AF70:
add rsp, 20h
pop rbp
retn
| long long read_user_name(long long a1)
{
unsigned int v2; // eax
const char *v3; // [rsp+8h] [rbp-18h]
_QWORD *v4; // [rsp+10h] [rbp-10h]
if ( !(unsigned int)geteuid() )
return strcpy(a1, "root");
v2 = geteuid();
v4 = (_QWORD *)getpwuid(v2);
if ( v4 )
return ma_strmake(a1, *v4, 512LL);
v3 = (const char *)getlogin();
if ( !v3 )
{
v3 = (const char *)getenv("USER");
if ( !v3 )
{
v3 = (const char *)getenv("LOGNAME");
if ( !v3 )
{
v3 = (const char *)getenv("LOGIN");
if ( !v3 )
v3 = "UNKNOWN_USER";
}
}
}
return ma_strmake(a1, v3, 512LL);
}
| read_user_name:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x20
MOV qword ptr [RBP + -0x8],RDI
CALL 0x00136260
CMP EAX,0x0
JNZ 0x0013aedb
MOV RDI,qword ptr [RBP + -0x8]
LEA RSI,[0x1cac5a]
CALL 0x001363f0
JMP 0x0013af70
LAB_0013aedb:
CALL 0x00136260
MOV EDI,EAX
CALL 0x001361e0
MOV qword ptr [RBP + -0x10],RAX
CMP RAX,0x0
JZ 0x0013aefe
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x18],RAX
JMP 0x0013af5e
LAB_0013aefe:
CALL 0x00136590
MOV qword ptr [RBP + -0x18],RAX
CMP RAX,0x0
JNZ 0x0013af5c
LEA RDI,[0x1cac75]
CALL 0x00136760
MOV qword ptr [RBP + -0x18],RAX
CMP RAX,0x0
JNZ 0x0013af5a
LEA RDI,[0x1cac5f]
CALL 0x00136760
MOV qword ptr [RBP + -0x18],RAX
CMP RAX,0x0
JNZ 0x0013af5a
LEA RDI,[0x1cac67]
CALL 0x00136760
MOV qword ptr [RBP + -0x18],RAX
CMP RAX,0x0
JNZ 0x0013af5a
LEA RAX,[0x1cac6d]
MOV qword ptr [RBP + -0x18],RAX
LAB_0013af5a:
JMP 0x0013af5c
LAB_0013af5c:
JMP 0x0013af5e
LAB_0013af5e:
MOV RDI,qword ptr [RBP + -0x8]
MOV RSI,qword ptr [RBP + -0x18]
MOV EDX,0x200
CALL 0x00155d30
LAB_0013af70:
ADD RSP,0x20
POP RBP
RET
|
void read_user_name(char *param_1)
{
__uid_t _Var1;
passwd *ppVar2;
char *local_20;
_Var1 = geteuid();
if (_Var1 == 0) {
strcpy(param_1,"root");
}
else {
_Var1 = geteuid();
ppVar2 = getpwuid(_Var1);
if (ppVar2 == (passwd *)0x0) {
local_20 = getlogin();
if ((((local_20 == (char *)0x0) && (local_20 = getenv("USER"), local_20 == (char *)0x0)) &&
(local_20 = getenv("LOGNAME"), local_20 == (char *)0x0)) &&
(local_20 = getenv("LOGIN"), local_20 == (char *)0x0)) {
local_20 = "UNKNOWN_USER";
}
}
else {
local_20 = ppVar2->pw_name;
}
ma_strmake(param_1,local_20,0x200);
}
return;
}
| |
51,842 | 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 0x5c61e
leaq 0x356b8d(%rip), %rax # 0x3b31a8
movq (%rax), %r14
leaq 0x2d76bb(%rip), %rax # 0x333ce0
cmpl %edi, (%rax)
jbe 0x5c65d
leaq 0x2d76b8(%rip), %rax # 0x333ce8
movq (%rax), %rdx
movslq %edi, %rcx
shlq $0x4, %rcx
cmpl $0x0, 0x8(%rdx,%rcx)
je 0x5c65b
addq %rcx, %rdx
movq (%rdx), %rbx
movq $0x0, (%rdx)
movq (%rax), %rax
movl $0x0, 0x8(%rax,%rcx)
jmp 0x5c65d
xorl %ebx, %ebx
callq 0x287e0
movl %eax, %r15d
testl %eax, %eax
je 0x5c6a6
orq %r12, %r14
callq 0x28050
movq %rax, %r12
movl (%rax), %r13d
callq 0x5db4e
movl %r13d, (%rax)
testb $0x18, %r14b
je 0x5c6a6
andl $0x440, %r14d # imm = 0x440
orq $0x4, %r14
movl (%r12), %ecx
movl $0x4, %edi
movq %r14, %rsi
movq %rbx, %rdx
xorl %eax, %eax
callq 0x57f83
testq %rbx, %rbx
je 0x5c6b3
movq %rbx, %rdi
callq 0x5c0ba
leaq 0x356afa(%rip), %rax # 0x3b31b4
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_5C61E
lea rax, my_global_flags
mov r14, [rax]
loc_5C61E:
lea rax, my_file_limit
cmp [rax], edi
jbe short loc_5C65D
lea rax, my_file_info
mov rdx, [rax]
movsxd rcx, edi
shl rcx, 4
cmp dword ptr [rdx+rcx+8], 0
jz short loc_5C65B
add rdx, rcx
mov rbx, [rdx]
mov qword ptr [rdx], 0
mov rax, [rax]
mov dword ptr [rax+rcx+8], 0
jmp short loc_5C65D
loc_5C65B:
xor ebx, ebx
loc_5C65D:
call _close
mov r15d, eax
test eax, eax
jz short loc_5C6A6
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_5C6A6
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_5C6A6:
test rbx, rbx
jz short loc_5C6B3
mov rdi, rbx
call my_free
loc_5C6B3:
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(a1) = v8;
if ( (v6 & 0x18) != 0 )
my_error(4u, v6 & 0x440 | 4LL, 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 0x0015c61e
LEA RAX,[0x4b31a8]
MOV R14,qword ptr [RAX]
LAB_0015c61e:
LEA RAX,[0x433ce0]
CMP dword ptr [RAX],EDI
JBE 0x0015c65d
LEA RAX,[0x433ce8]
MOV RDX,qword ptr [RAX]
MOVSXD RCX,EDI
SHL RCX,0x4
CMP dword ptr [RDX + RCX*0x1 + 0x8],0x0
JZ 0x0015c65b
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 0x0015c65d
LAB_0015c65b:
XOR EBX,EBX
LAB_0015c65d:
CALL 0x001287e0
MOV R15D,EAX
TEST EAX,EAX
JZ 0x0015c6a6
OR R14,R12
CALL 0x00128050
MOV R12,RAX
MOV R13D,dword ptr [RAX]
CALL 0x0015db4e
MOV dword ptr [RAX],R13D
TEST R14B,0x18
JZ 0x0015c6a6
AND R14D,0x440
OR R14,0x4
MOV ECX,dword ptr [R12]
MOV EDI,0x4
MOV RSI,R14
MOV RDX,RBX
XOR EAX,EAX
CALL 0x00157f83
LAB_0015c6a6:
TEST RBX,RBX
JZ 0x0015c6b3
MOV RDI,RBX
CALL 0x0015c0ba
LAB_0015c6b3:
LEA RAX,[0x4b31b4]
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;
}
| |
51,843 | 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>::insert_iterator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const&>(nlohmann::json_abi_v3_11_3::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> const>, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const&) | monkey531[P]llama/common/json.hpp | iterator insert_iterator(const_iterator pos, Args&& ... args)
{
iterator result(this);
JSON_ASSERT(m_data.m_value.array != nullptr);
auto insert_pos = std::distance(m_data.m_value.array->begin(), pos.m_it.array_iterator);
m_data.m_value.array->insert(pos.m_it.array_iterator, std::forward<Args>(args)...);
result.m_it.array_iterator = m_data.m_value.array->begin() + insert_pos;
// This could have been written as:
// result.m_it.array_iterator = m_data.m_value.array->insert(pos.m_it.array_iterator, cnt, val);
// but the return value of insert is missing in GCC 4.8, so it is written this way instead.
set_parents();
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>::insert_iterator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const&>(nlohmann::json_abi_v3_11_3::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> const>, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const&):
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %r14
movq %rdi, %rbx
movabsq $-0x8000000000000000, %rax # imm = 0x8000000000000000
movq %rsi, (%rdi)
xorps %xmm0, %xmm0
movups %xmm0, 0x8(%rdi)
movq %rax, 0x18(%rdi)
movzbl (%rsi), %esi
cmpl $0x2, %esi
je 0x6fad1
cmpl $0x1, %esi
jne 0x6fadb
leaq 0x8(%rbx), %rax
movq $0x0, (%rax)
jmp 0x6fadf
movq $0x0, 0x10(%rbx)
jmp 0x6fadf
movq %rax, 0x18(%rbx)
movq 0x8(%r14), %rdi
testq %rdi, %rdi
je 0x6fb0e
movq 0x10(%rdx), %rsi
movq %rsi, %r15
subq (%rdi), %r15
movq %rcx, %rdx
callq 0x6fbb8
movq 0x8(%r14), %rax
addq (%rax), %r15
movq %r15, 0x10(%rbx)
movq %rbx, %rax
popq %rbx
popq %r14
popq %r15
retq
leaq 0x3d302(%rip), %rdi # 0xace17
leaq 0x3a770(%rip), %rdx # 0xaa28c
leaq 0x3d3a6(%rip), %rcx # 0xacec9
movl $0x582c, %esi # imm = 0x582C
xorl %eax, %eax
callq 0x18ad0
| _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE15insert_iteratorIJRKSD_EEENS0_6detail9iter_implISD_EENSI_ISF_EEDpOT_:
push r15
push r14
push rbx
mov r14, rsi
mov rbx, rdi
mov rax, 8000000000000000h
mov [rdi], rsi
xorps xmm0, xmm0
movups xmmword ptr [rdi+8], xmm0
mov [rdi+18h], rax
movzx esi, byte ptr [rsi]
cmp esi, 2
jz short loc_6FAD1
cmp esi, 1
jnz short loc_6FADB
lea rax, [rbx+8]
mov qword ptr [rax], 0
jmp short loc_6FADF
loc_6FAD1:
mov qword ptr [rbx+10h], 0
jmp short loc_6FADF
loc_6FADB:
mov [rbx+18h], rax
loc_6FADF:
mov rdi, [r14+8]
test rdi, rdi
jz short loc_6FB0E
mov rsi, [rdx+10h]
mov r15, rsi
sub r15, [rdi]
mov rdx, rcx
call _ZNSt6vectorIN8nlohmann16json_abi_v3_11_310basic_jsonINS1_11ordered_mapES_NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES_IhSaIhEEvEESaISD_EE6insertEN9__gnu_cxx17__normal_iteratorIPKSD_SF_EERSI_; 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>>::insert(__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> const*,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>>>,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const&)
mov rax, [r14+8]
add r15, [rax]
mov [rbx+10h], r15
mov rax, rbx
pop rbx
pop r14
pop r15
retn
loc_6FB0E:
lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aMDataMTypeValu_0+23h; "m_data.m_value.array != nullptr"
mov esi, 582Ch
xor eax, eax
call _ggml_abort
| long long nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::insert_iterator<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&>(
long long a1,
unsigned __int8 *a2,
long long a3,
long long a4)
{
int v6; // esi
_QWORD *v7; // rdi
long long v8; // r15
*(_QWORD *)a1 = a2;
*(_OWORD *)(a1 + 8) = 0LL;
*(_QWORD *)(a1 + 24) = 0x8000000000000000LL;
v6 = *a2;
if ( v6 == 2 )
{
*(_QWORD *)(a1 + 16) = 0LL;
}
else if ( v6 == 1 )
{
*(_QWORD *)(a1 + 8) = 0LL;
}
else
{
*(_QWORD *)(a1 + 24) = 0x8000000000000000LL;
}
v7 = (_QWORD *)*((_QWORD *)a2 + 1);
if ( v7 )
{
v8 = *(_QWORD *)(a3 + 16) - *v7;
std::vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>::insert(
v7,
*(_QWORD *)(a3 + 16),
a4);
*(_QWORD *)(a1 + 16) = **((_QWORD **)a2 + 1) + v8;
return a1;
}
else
{
ggml_abort(
"/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp",
22572LL,
"GGML_ASSERT(%s) failed",
"m_data.m_value.array != nullptr");
return nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[26],char const*>(
"/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp",
22572LL);
}
}
| insert_iterator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,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&>:
PUSH R15
PUSH R14
PUSH RBX
MOV R14,RSI
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 ESI,byte ptr [RSI]
CMP ESI,0x2
JZ 0x0016fad1
CMP ESI,0x1
JNZ 0x0016fadb
LEA RAX,[RBX + 0x8]
MOV qword ptr [RAX],0x0
JMP 0x0016fadf
LAB_0016fad1:
MOV qword ptr [RBX + 0x10],0x0
JMP 0x0016fadf
LAB_0016fadb:
MOV qword ptr [RBX + 0x18],RAX
LAB_0016fadf:
MOV RDI,qword ptr [R14 + 0x8]
TEST RDI,RDI
JZ 0x0016fb0e
MOV RSI,qword ptr [RDX + 0x10]
MOV R15,RSI
SUB R15,qword ptr [RDI]
MOV RDX,RCX
CALL 0x0016fbb8
MOV RAX,qword ptr [R14 + 0x8]
ADD R15,qword ptr [RAX]
MOV qword ptr [RBX + 0x10],R15
MOV RAX,RBX
POP RBX
POP R14
POP R15
RET
LAB_0016fb0e:
LEA RDI,[0x1ace17]
LEA RDX,[0x1aa28c]
LEA RCX,[0x1acec9]
MOV ESI,0x582c
XOR EAX,EAX
CALL 0x00118ad0
|
/* 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::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void> > nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,
std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >,
void>::insert_iterator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,
std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void>
const&>(nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,
std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void> const>,
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector,
std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void> const&) */
int8 *
nlohmann::json_abi_v3_11_3::
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::
insert_iterator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,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&>
(int8 *param_1,char *param_2,long param_3,int8 param_4)
{
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>>>
*pvVar1;
long lVar2;
long lVar3;
*param_1 = param_2;
param_1[1] = 0;
param_1[2] = 0;
param_1[3] = 0x8000000000000000;
if (*param_2 == '\x02') {
param_1[2] = 0;
}
else if (*param_2 == '\x01') {
param_1[1] = 0;
}
else {
param_1[3] = 0x8000000000000000;
}
pvVar1 = *(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);
if (pvVar1 != (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>>>
*)0x0) {
lVar2 = *(long *)(param_3 + 0x10);
lVar3 = *(long *)pvVar1;
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>>>
::insert(pvVar1,lVar2,param_4);
param_1[2] = (lVar2 - lVar3) + **(long **)(param_2 + 8);
return param_1;
}
/* WARNING: Subroutine does not return */
ggml_abort("/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp",0x582c,
"GGML_ASSERT(%s) failed","m_data.m_value.array != nullptr");
}
| |
51,844 | string_view::operator[](unsigned long) const | monkey531[P]llama/common/json-schema-to-grammar.cpp | char operator[](size_t pos) const {
auto index = _start + pos;
if (index >= _end) {
throw std::out_of_range("string_view index out of range");
}
return _str[_start + pos];
} | O0 | cpp | string_view::operator[](unsigned long) const:
subq $0x38, %rsp
movq %rdi, 0x30(%rsp)
movq %rsi, 0x28(%rsp)
movq 0x30(%rsp), %rcx
movq %rcx, 0x8(%rsp)
movq 0x8(%rcx), %rax
addq 0x28(%rsp), %rax
movq %rax, 0x20(%rsp)
movq 0x20(%rsp), %rax
cmpq 0x10(%rcx), %rax
jb 0x1bfe93
movl $0x10, %edi
callq 0x50540
movq %rax, %rdi
movq %rdi, %rax
movq %rax, (%rsp)
leaq 0x1f00e(%rip), %rsi # 0x1dee6a
callq 0x50360
jmp 0x1bfe63
movq (%rsp), %rdi
movq 0x940c2(%rip), %rsi # 0x253f30
movq 0x9410b(%rip), %rdx # 0x253f80
callq 0x508f0
movq (%rsp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x18(%rsp)
movl %eax, 0x14(%rsp)
callq 0x50c40
jmp 0x1bfeb0
movq 0x8(%rsp), %rax
movq (%rax), %rdi
movq 0x8(%rax), %rsi
addq 0x28(%rsp), %rsi
callq 0x50f30
movb (%rax), %al
addq $0x38, %rsp
retq
movq 0x18(%rsp), %rdi
callq 0x50940
nopw (%rax,%rax)
| _ZNK11string_viewixEm:
sub rsp, 38h
mov [rsp+38h+var_8], rdi
mov [rsp+38h+var_10], rsi
mov rcx, [rsp+38h+var_8]
mov [rsp+38h+var_30], rcx
mov rax, [rcx+8]
add rax, [rsp+38h+var_10]
mov [rsp+38h+var_18], rax
mov rax, [rsp+38h+var_18]
cmp rax, [rcx+10h]
jb short loc_1BFE93
mov edi, 10h; thrown_size
call ___cxa_allocate_exception
mov rdi, rax; this
mov rax, rdi
mov [rsp+38h+var_38], rax
lea rsi, aStringViewInde; "string_view index out of range"
call __ZNSt12out_of_rangeC1EPKc; std::out_of_range::out_of_range(char const*)
jmp short $+2
loc_1BFE63:
mov rdi, [rsp+38h+var_38]; void *
mov rsi, cs:_ZTISt12out_of_range_ptr; lptinfo
mov rdx, cs:_ZNSt12out_of_rangeD1Ev_ptr; void (*)(void *)
call ___cxa_throw
mov rdi, [rsp+38h+var_38]; void *
mov rcx, rax
mov eax, edx
mov [rsp+38h+var_20], rcx
mov [rsp+38h+var_24], eax
call ___cxa_free_exception
jmp short loc_1BFEB0
loc_1BFE93:
mov rax, [rsp+38h+var_30]
mov rdi, [rax]
mov rsi, [rax+8]
add rsi, [rsp+38h+var_10]
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm; std::string::operator[](ulong)
mov al, [rax]
add rsp, 38h
retn
loc_1BFEB0:
mov rdi, [rsp+38h+var_20]
call __Unwind_Resume
| char string_view::operator[](_QWORD *a1, long long a2)
{
std::out_of_range *exception; // [rsp+0h] [rbp-38h]
if ( (unsigned long long)(a2 + a1[1]) >= a1[2] )
{
exception = (std::out_of_range *)__cxa_allocate_exception(0x10uLL);
std::out_of_range::out_of_range(exception, "string_view index out of range");
__cxa_throw(
exception,
(struct type_info *)&`typeinfo for'std::out_of_range,
(void (*)(void *))&std::out_of_range::~out_of_range);
}
return *(_BYTE *)std::string::operator[](*a1, a2 + a1[1]);
}
| |||
51,845 | string_view::operator[](unsigned long) const | monkey531[P]llama/common/json-schema-to-grammar.cpp | char operator[](size_t pos) const {
auto index = _start + pos;
if (index >= _end) {
throw std::out_of_range("string_view index out of range");
}
return _str[_start + pos];
} | O3 | cpp | string_view::operator[](unsigned long) const:
pushq %r14
pushq %rbx
pushq %rax
addq 0x8(%rdi), %rsi
cmpq 0x10(%rdi), %rsi
jae 0xabeff
movq (%rdi), %rax
movq (%rax), %rax
movb (%rax,%rsi), %al
addq $0x8, %rsp
popq %rbx
popq %r14
retq
movl $0x10, %edi
callq 0x18360
movq %rax, %rbx
leaq 0x17e96(%rip), %rsi # 0xc3da9
movq %rax, %rdi
callq 0x180f0
movq 0x4409e(%rip), %rsi # 0xeffc0
movq 0x44087(%rip), %rdx # 0xeffb0
movq %rbx, %rdi
callq 0x18b30
movq %rax, %r14
movq %rbx, %rdi
callq 0x18500
movq %r14, %rdi
callq 0x18b90
| _ZNK11string_viewixEm:
push r14
push rbx
push rax
add rsi, [rdi+8]
cmp rsi, [rdi+10h]
jnb short loc_ABEFF
mov rax, [rdi]
mov rax, [rax]
mov al, [rax+rsi]
add rsp, 8
pop rbx
pop r14
retn
loc_ABEFF:
mov edi, 10h; thrown_size
call ___cxa_allocate_exception
mov rbx, rax
lea rsi, aStringViewInde; "string_view index out of range"
mov rdi, rax; this
call __ZNSt12out_of_rangeC1EPKc; std::out_of_range::out_of_range(char const*)
mov rsi, cs:_ZTISt12out_of_range_ptr; lptinfo
mov rdx, cs:_ZNSt12out_of_rangeD1Ev_ptr; void (*)(void *)
mov rdi, rbx; void *
call ___cxa_throw
mov r14, rax
mov rdi, rbx; void *
call ___cxa_free_exception
mov rdi, r14
call __Unwind_Resume
| char string_view::operator[](long long a1, long long a2)
{
unsigned long long v2; // rsi
std::out_of_range *exception; // rbx
v2 = *(_QWORD *)(a1 + 8) + a2;
if ( v2 >= *(_QWORD *)(a1 + 16) )
{
exception = (std::out_of_range *)__cxa_allocate_exception(0x10uLL);
std::out_of_range::out_of_range(exception, "string_view index out of range");
__cxa_throw(
exception,
(struct type_info *)&`typeinfo for'std::out_of_range,
(void (*)(void *))&std::out_of_range::~out_of_range);
}
return *(_BYTE *)(**(_QWORD **)a1 + v2);
}
| operator[]:
PUSH R14
PUSH RBX
PUSH RAX
ADD RSI,qword ptr [RDI + 0x8]
CMP RSI,qword ptr [RDI + 0x10]
JNC 0x001abeff
MOV RAX,qword ptr [RDI]
MOV RAX,qword ptr [RAX]
MOV AL,byte ptr [RAX + RSI*0x1]
ADD RSP,0x8
POP RBX
POP R14
RET
LAB_001abeff:
MOV EDI,0x10
CALL 0x00118360
MOV RBX,RAX
LAB_001abf0c:
LEA RSI,[0x1c3da9]
MOV RDI,RAX
CALL 0x001180f0
LAB_001abf1b:
MOV RSI,qword ptr [0x001effc0]
MOV RDX,qword ptr [0x001effb0]
MOV RDI,RBX
CALL 0x00118b30
|
/* string_view::operator[](unsigned long) const */
int8 __thiscall string_view::operator[](string_view *this,ulong param_1)
{
out_of_range *this_00;
if (param_1 + *(long *)(this + 8) < *(ulong *)(this + 0x10)) {
return CONCAT71((int7)((ulong)**(long **)this >> 8),
*(int1 *)(**(long **)this + param_1 + *(long *)(this + 8)));
}
this_00 = (out_of_range *)__cxa_allocate_exception(0x10);
/* try { // try from 001abf0c to 001abf1a has its CatchHandler @ 001abf31 */
std::out_of_range::out_of_range(this_00,"string_view index out of range");
/* WARNING: Subroutine does not return */
__cxa_throw(this_00,PTR_typeinfo_001effc0,PTR__out_of_range_001effb0);
}
| |
51,846 | sha256_init_h | corpus-core[P]colibri-stateless/build_O0/_deps/blst-src/src/sha256.h | static void sha256_init_h(unsigned int h[8])
{
h[0] = 0x6a09e667U;
h[1] = 0xbb67ae85U;
h[2] = 0x3c6ef372U;
h[3] = 0xa54ff53aU;
h[4] = 0x510e527fU;
h[5] = 0x9b05688cU;
h[6] = 0x1f83d9abU;
h[7] = 0x5be0cd19U;
} | O0 | c | sha256_init_h:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movl $0x6a09e667, (%rax) # imm = 0x6A09E667
movq -0x8(%rbp), %rax
movl $0xbb67ae85, 0x4(%rax) # imm = 0xBB67AE85
movq -0x8(%rbp), %rax
movl $0x3c6ef372, 0x8(%rax) # imm = 0x3C6EF372
movq -0x8(%rbp), %rax
movl $0xa54ff53a, 0xc(%rax) # imm = 0xA54FF53A
movq -0x8(%rbp), %rax
movl $0x510e527f, 0x10(%rax) # imm = 0x510E527F
movq -0x8(%rbp), %rax
movl $0x9b05688c, 0x14(%rax) # imm = 0x9B05688C
movq -0x8(%rbp), %rax
movl $0x1f83d9ab, 0x18(%rax) # imm = 0x1F83D9AB
movq -0x8(%rbp), %rax
movl $0x5be0cd19, 0x1c(%rax) # imm = 0x5BE0CD19
popq %rbp
retq
nopw %cs:(%rax,%rax)
nopl (%rax,%rax)
| sha256_init_h:
push rbp
mov rbp, rsp
mov [rbp+var_8], rdi
mov rax, [rbp+var_8]
mov dword ptr [rax], 6A09E667h
mov rax, [rbp+var_8]
mov dword ptr [rax+4], 0BB67AE85h
mov rax, [rbp+var_8]
mov dword ptr [rax+8], 3C6EF372h
mov rax, [rbp+var_8]
mov dword ptr [rax+0Ch], 0A54FF53Ah
mov rax, [rbp+var_8]
mov dword ptr [rax+10h], 510E527Fh
mov rax, [rbp+var_8]
mov dword ptr [rax+14h], 9B05688Ch
mov rax, [rbp+var_8]
mov dword ptr [rax+18h], 1F83D9ABh
mov rax, [rbp+var_8]
mov dword ptr [rax+1Ch], 5BE0CD19h
pop rbp
retn
| _DWORD * sha256_init_h(_DWORD *a1)
{
_DWORD *result; // rax
*a1 = 1779033703;
a1[1] = -1150833019;
a1[2] = 1013904242;
a1[3] = -1521486534;
a1[4] = 1359893119;
a1[5] = -1694144372;
a1[6] = 528734635;
result = a1;
a1[7] = 1541459225;
return result;
}
| sha256_init_h:
PUSH RBP
MOV RBP,RSP
MOV qword ptr [RBP + -0x8],RDI
MOV RAX,qword ptr [RBP + -0x8]
MOV dword ptr [RAX],0x6a09e667
MOV RAX,qword ptr [RBP + -0x8]
MOV dword ptr [RAX + 0x4],0xbb67ae85
MOV RAX,qword ptr [RBP + -0x8]
MOV dword ptr [RAX + 0x8],0x3c6ef372
MOV RAX,qword ptr [RBP + -0x8]
MOV dword ptr [RAX + 0xc],0xa54ff53a
MOV RAX,qword ptr [RBP + -0x8]
MOV dword ptr [RAX + 0x10],0x510e527f
MOV RAX,qword ptr [RBP + -0x8]
MOV dword ptr [RAX + 0x14],0x9b05688c
MOV RAX,qword ptr [RBP + -0x8]
MOV dword ptr [RAX + 0x18],0x1f83d9ab
MOV RAX,qword ptr [RBP + -0x8]
MOV dword ptr [RAX + 0x1c],0x5be0cd19
POP RBP
RET
|
void sha256_init_h(int4 *param_1)
{
*param_1 = 0x6a09e667;
param_1[1] = 0xbb67ae85;
param_1[2] = 0x3c6ef372;
param_1[3] = 0xa54ff53a;
param_1[4] = 0x510e527f;
param_1[5] = 0x9b05688c;
param_1[6] = 0x1f83d9ab;
param_1[7] = 0x5be0cd19;
return;
}
| |
51,847 | ma_pvio_tls_compare_fp | eloqsql/libmariadb/libmariadb/ma_tls.c | static my_bool ma_pvio_tls_compare_fp(const char *cert_fp,
unsigned int cert_fp_len,
const char *fp, unsigned int fp_len)
{
char *p= (char *)fp,
*c;
/* check length */
if (cert_fp_len != 20)
return 1;
/* We support two formats:
2 digits hex numbers, separated by colons (length=59)
20 * 2 digits hex numbers without separators (length = 40)
*/
if (fp_len != (strchr(fp, ':') ? 59 : 40))
return 1;
for(c= (char *)cert_fp; c < cert_fp + cert_fp_len; c++)
{
signed char d1, d2;
if (*p == ':')
p++;
if (p - fp > (int)fp_len -1)
return 1;
if ((d1 = ma_hex2int(*p)) == - 1 ||
(d2 = ma_hex2int(*(p+1))) == -1 ||
(char)(d1 * 16 + d2) != *c)
return 1;
p+= 2;
}
return 0;
} | O0 | c | ma_pvio_tls_compare_fp:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movq %rdx, -0x20(%rbp)
movl %ecx, -0x24(%rbp)
movq -0x20(%rbp), %rax
movq %rax, -0x30(%rbp)
cmpl $0x14, -0x14(%rbp)
je 0x5632d
movb $0x1, -0x1(%rbp)
jmp 0x5642c
movl -0x24(%rbp), %eax
movl %eax, -0x40(%rbp)
movq -0x20(%rbp), %rdi
movl $0x3a, %esi
callq 0x38500
movq %rax, %rsi
movl -0x40(%rbp), %eax
movl $0x28, %ecx
movl $0x3b, %edx
cmpq $0x0, %rsi
cmovnel %edx, %ecx
cmpl %ecx, %eax
je 0x56365
movb $0x1, -0x1(%rbp)
jmp 0x5642c
movq -0x10(%rbp), %rax
movq %rax, -0x38(%rbp)
movq -0x38(%rbp), %rax
movq -0x10(%rbp), %rcx
movl -0x14(%rbp), %edx
addq %rdx, %rcx
cmpq %rcx, %rax
jae 0x56428
movq -0x30(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x3a, %eax
jne 0x5639c
movq -0x30(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rax
movq -0x20(%rbp), %rcx
subq %rcx, %rax
movl -0x24(%rbp), %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
cmpq %rcx, %rax
jle 0x563bb
movb $0x1, -0x1(%rbp)
jmp 0x5642c
movq -0x30(%rbp), %rax
movsbl (%rax), %edi
callq 0x56460
movb %al, -0x39(%rbp)
movsbl %al, %eax
cmpl $-0x1, %eax
je 0x56405
movq -0x30(%rbp), %rax
movsbl 0x1(%rax), %edi
callq 0x56460
movb %al, -0x3a(%rbp)
movsbl %al, %eax
cmpl $-0x1, %eax
je 0x56405
movsbl -0x39(%rbp), %eax
shll $0x4, %eax
movsbl -0x3a(%rbp), %ecx
addl %ecx, %eax
movsbl %al, %eax
movq -0x38(%rbp), %rcx
movsbl (%rcx), %ecx
cmpl %ecx, %eax
je 0x5640b
movb $0x1, -0x1(%rbp)
jmp 0x5642c
movq -0x30(%rbp), %rax
addq $0x2, %rax
movq %rax, -0x30(%rbp)
movq -0x38(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x38(%rbp)
jmp 0x5636d
movb $0x0, -0x1(%rbp)
movb -0x1(%rbp), %al
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
| ma_pvio_tls_compare_fp:
push rbp
mov rbp, rsp
sub rsp, 40h
mov [rbp+var_10], rdi
mov [rbp+var_14], esi
mov [rbp+var_20], rdx
mov [rbp+var_24], ecx
mov rax, [rbp+var_20]
mov [rbp+var_30], rax
cmp [rbp+var_14], 14h
jz short loc_5632D
mov [rbp+var_1], 1
jmp loc_5642C
loc_5632D:
mov eax, [rbp+var_24]
mov [rbp+var_40], eax
mov rdi, [rbp+var_20]
mov esi, 3Ah ; ':'
call _strchr
mov rsi, rax
mov eax, [rbp+var_40]
mov ecx, 28h ; '('
mov edx, 3Bh ; ';'
cmp rsi, 0
cmovnz ecx, edx
cmp eax, ecx
jz short loc_56365
mov [rbp+var_1], 1
jmp loc_5642C
loc_56365:
mov rax, [rbp+var_10]
mov [rbp+var_38], rax
loc_5636D:
mov rax, [rbp+var_38]
mov rcx, [rbp+var_10]
mov edx, [rbp+var_14]
add rcx, rdx
cmp rax, rcx
jnb loc_56428
mov rax, [rbp+var_30]
movsx eax, byte ptr [rax]
cmp eax, 3Ah ; ':'
jnz short loc_5639C
mov rax, [rbp+var_30]
add rax, 1
mov [rbp+var_30], rax
loc_5639C:
mov rax, [rbp+var_30]
mov rcx, [rbp+var_20]
sub rax, rcx
mov ecx, [rbp+var_24]
sub ecx, 1
movsxd rcx, ecx
cmp rax, rcx
jle short loc_563BB
mov [rbp+var_1], 1
jmp short loc_5642C
loc_563BB:
mov rax, [rbp+var_30]
movsx edi, byte ptr [rax]
call ma_hex2int
mov [rbp+var_39], al
movsx eax, al
cmp eax, 0FFFFFFFFh
jz short loc_56405
mov rax, [rbp+var_30]
movsx edi, byte ptr [rax+1]
call ma_hex2int
mov [rbp+var_3A], al
movsx eax, al
cmp eax, 0FFFFFFFFh
jz short loc_56405
movsx eax, [rbp+var_39]
shl eax, 4
movsx ecx, [rbp+var_3A]
add eax, ecx
movsx eax, al
mov rcx, [rbp+var_38]
movsx ecx, byte ptr [rcx]
cmp eax, ecx
jz short loc_5640B
loc_56405:
mov [rbp+var_1], 1
jmp short loc_5642C
loc_5640B:
mov rax, [rbp+var_30]
add rax, 2
mov [rbp+var_30], rax
mov rax, [rbp+var_38]
add rax, 1
mov [rbp+var_38], rax
jmp loc_5636D
loc_56428:
mov [rbp+var_1], 0
loc_5642C:
mov al, [rbp+var_1]
add rsp, 40h
pop rbp
retn
| char ma_pvio_tls_compare_fp(char *a1, int a2, char *a3, int a4)
{
long long v4; // rsi
int v5; // ecx
char v7; // [rsp+6h] [rbp-3Ah]
char v8; // [rsp+7h] [rbp-39h]
char *i; // [rsp+8h] [rbp-38h]
char *v10; // [rsp+10h] [rbp-30h]
v10 = a3;
if ( a2 != 20 )
return 1;
v4 = strchr(a3, 58LL);
v5 = 40;
if ( v4 )
v5 = 59;
if ( a4 != v5 )
return 1;
for ( i = a1; i < a1 + 20; ++i )
{
if ( *v10 == 58 )
++v10;
if ( v10 - a3 > a4 - 1 )
return 1;
v8 = ma_hex2int((unsigned int)*v10);
if ( v8 == -1 )
return 1;
v7 = ma_hex2int((unsigned int)v10[1]);
if ( v7 == -1 || (char)(v7 + 16 * v8) != *i )
return 1;
v10 += 2;
}
return 0;
}
| ma_pvio_tls_compare_fp:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x40
MOV qword ptr [RBP + -0x10],RDI
MOV dword ptr [RBP + -0x14],ESI
MOV qword ptr [RBP + -0x20],RDX
MOV dword ptr [RBP + -0x24],ECX
MOV RAX,qword ptr [RBP + -0x20]
MOV qword ptr [RBP + -0x30],RAX
CMP dword ptr [RBP + -0x14],0x14
JZ 0x0015632d
MOV byte ptr [RBP + -0x1],0x1
JMP 0x0015642c
LAB_0015632d:
MOV EAX,dword ptr [RBP + -0x24]
MOV dword ptr [RBP + -0x40],EAX
MOV RDI,qword ptr [RBP + -0x20]
MOV ESI,0x3a
CALL 0x00138500
MOV RSI,RAX
MOV EAX,dword ptr [RBP + -0x40]
MOV ECX,0x28
MOV EDX,0x3b
CMP RSI,0x0
CMOVNZ ECX,EDX
CMP EAX,ECX
JZ 0x00156365
MOV byte ptr [RBP + -0x1],0x1
JMP 0x0015642c
LAB_00156365:
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RBP + -0x38],RAX
LAB_0015636d:
MOV RAX,qword ptr [RBP + -0x38]
MOV RCX,qword ptr [RBP + -0x10]
MOV EDX,dword ptr [RBP + -0x14]
ADD RCX,RDX
CMP RAX,RCX
JNC 0x00156428
MOV RAX,qword ptr [RBP + -0x30]
MOVSX EAX,byte ptr [RAX]
CMP EAX,0x3a
JNZ 0x0015639c
MOV RAX,qword ptr [RBP + -0x30]
ADD RAX,0x1
MOV qword ptr [RBP + -0x30],RAX
LAB_0015639c:
MOV RAX,qword ptr [RBP + -0x30]
MOV RCX,qword ptr [RBP + -0x20]
SUB RAX,RCX
MOV ECX,dword ptr [RBP + -0x24]
SUB ECX,0x1
MOVSXD RCX,ECX
CMP RAX,RCX
JLE 0x001563bb
MOV byte ptr [RBP + -0x1],0x1
JMP 0x0015642c
LAB_001563bb:
MOV RAX,qword ptr [RBP + -0x30]
MOVSX EDI,byte ptr [RAX]
CALL 0x00156460
MOV byte ptr [RBP + -0x39],AL
MOVSX EAX,AL
CMP EAX,-0x1
JZ 0x00156405
MOV RAX,qword ptr [RBP + -0x30]
MOVSX EDI,byte ptr [RAX + 0x1]
CALL 0x00156460
MOV byte ptr [RBP + -0x3a],AL
MOVSX EAX,AL
CMP EAX,-0x1
JZ 0x00156405
MOVSX EAX,byte ptr [RBP + -0x39]
SHL EAX,0x4
MOVSX ECX,byte ptr [RBP + -0x3a]
ADD EAX,ECX
MOVSX EAX,AL
MOV RCX,qword ptr [RBP + -0x38]
MOVSX ECX,byte ptr [RCX]
CMP EAX,ECX
JZ 0x0015640b
LAB_00156405:
MOV byte ptr [RBP + -0x1],0x1
JMP 0x0015642c
LAB_0015640b:
MOV RAX,qword ptr [RBP + -0x30]
ADD RAX,0x2
MOV qword ptr [RBP + -0x30],RAX
MOV RAX,qword ptr [RBP + -0x38]
ADD RAX,0x1
MOV qword ptr [RBP + -0x38],RAX
JMP 0x0015636d
LAB_00156428:
MOV byte ptr [RBP + -0x1],0x0
LAB_0015642c:
MOV AL,byte ptr [RBP + -0x1]
ADD RSP,0x40
POP RBP
RET
|
int1 ma_pvio_tls_compare_fp(char *param_1,int param_2,char *param_3,int param_4)
{
char cVar1;
char cVar2;
char *pcVar3;
int iVar4;
char *local_40;
char *local_38;
int1 local_9;
if (param_2 == 0x14) {
pcVar3 = strchr(param_3,0x3a);
iVar4 = 0x28;
if (pcVar3 != (char *)0x0) {
iVar4 = 0x3b;
}
local_40 = param_1;
local_38 = param_3;
if (param_4 == iVar4) {
for (; local_40 < param_1 + 0x14; local_40 = local_40 + 1) {
if (*local_38 == ':') {
local_38 = local_38 + 1;
}
if ((long)(param_4 + -1) < (long)local_38 - (long)param_3) {
return 1;
}
cVar1 = ma_hex2int((int)*local_38);
if (((cVar1 == -1) || (cVar2 = ma_hex2int((int)local_38[1]), cVar2 == -1)) ||
((char)((char)((int)cVar1 << 4) + cVar2) != *local_40)) {
return 1;
}
local_38 = local_38 + 2;
}
local_9 = 0;
}
else {
local_9 = 1;
}
}
else {
local_9 = 1;
}
return local_9;
}
| |
51,848 | blst_p1_serialize | corpus-core[P]colibri-stateless/build_O1/_deps/blst-src/src/e1.c | void blst_p1_serialize(unsigned char out[96], const POINTonE1 *in)
{ POINTonE1_Serialize(out, in); } | O1 | c | blst_p1_serialize:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x60(%rsi), %rdi
movl $0x30, %esi
callq 0x30680
testq %rax, %rax
je 0x1976d
xorps %xmm0, %xmm0
movups %xmm0, (%rbx)
movups %xmm0, 0x50(%rbx)
movups %xmm0, 0x40(%rbx)
movups %xmm0, 0x30(%rbx)
movups %xmm0, 0x20(%rbx)
movups %xmm0, 0x10(%rbx)
movb $0x40, (%rbx)
popq %rbx
popq %r14
popq %rbp
retq
movq %rbx, %rdi
movq %r14, %rsi
popq %rbx
popq %r14
popq %rbp
jmp 0x1af00
| blst_p1_serialize:
push rbp
mov rbp, rsp
push r14
push rbx
mov r14, rsi
mov rbx, rdi
lea rdi, [rsi+60h]
mov esi, 30h ; '0'
call vec_is_zero_16x
test rax, rax
jz short loc_1976D
xorps xmm0, xmm0
movups xmmword ptr [rbx], xmm0
movups xmmword ptr [rbx+50h], xmm0
movups xmmword ptr [rbx+40h], xmm0
movups xmmword ptr [rbx+30h], xmm0
movups xmmword ptr [rbx+20h], xmm0
movups xmmword ptr [rbx+10h], xmm0
mov byte ptr [rbx], 40h ; '@'
pop rbx
pop r14
pop rbp
retn
loc_1976D:
mov rdi, rbx
mov rsi, r14
pop rbx
pop r14
pop rbp
jmp POINTonE1_Serialize_BE
| long long blst_p1_serialize(_OWORD *a1, long long a2)
{
long long result; // rax
result = vec_is_zero_16x(a2 + 96, 48LL);
if ( !result )
return POINTonE1_Serialize_BE(a1, a2);
*a1 = 0LL;
a1[5] = 0LL;
a1[4] = 0LL;
a1[3] = 0LL;
a1[2] = 0LL;
a1[1] = 0LL;
*(_BYTE *)a1 = 64;
return result;
}
| blst_p1_serialize:
PUSH RBP
MOV RBP,RSP
PUSH R14
PUSH RBX
MOV R14,RSI
MOV RBX,RDI
LEA RDI,[RSI + 0x60]
MOV ESI,0x30
CALL 0x00130680
TEST RAX,RAX
JZ 0x0011976d
XORPS XMM0,XMM0
MOVUPS xmmword ptr [RBX],XMM0
MOVUPS xmmword ptr [RBX + 0x50],XMM0
MOVUPS xmmword ptr [RBX + 0x40],XMM0
MOVUPS xmmword ptr [RBX + 0x30],XMM0
MOVUPS xmmword ptr [RBX + 0x20],XMM0
MOVUPS xmmword ptr [RBX + 0x10],XMM0
MOV byte ptr [RBX],0x40
POP RBX
POP R14
POP RBP
RET
LAB_0011976d:
MOV RDI,RBX
MOV RSI,R14
POP RBX
POP R14
POP RBP
JMP 0x0011af00
|
void blst_p1_serialize(int8 *param_1,long param_2)
{
long lVar1;
lVar1 = vec_is_zero_16x(param_2 + 0x60,0x30);
if (lVar1 != 0) {
*param_1 = 0;
param_1[1] = 0;
param_1[10] = 0;
param_1[0xb] = 0;
param_1[8] = 0;
param_1[9] = 0;
param_1[6] = 0;
param_1[7] = 0;
param_1[4] = 0;
param_1[5] = 0;
param_1[2] = 0;
param_1[3] = 0;
*(int1 *)param_1 = 0x40;
return;
}
POINTonE1_Serialize_BE(param_1,param_2);
return;
}
| |
51,849 | gguf_set_val_str | ngxson[P]ggml-easy/ggml/src/gguf.cpp | void gguf_set_val_str(struct gguf_context * ctx, const char * key, const char * val) {
gguf_check_reserved_keys(key, val);
gguf_remove_key(ctx, key);
ctx->kv.emplace_back(key, std::string(val));
} | O3 | cpp | gguf_set_val_str:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %rbx
movq %rsi, 0x30(%rsp)
leaq 0x10(%rsp), %rdi
leaq 0xf(%rsp), %rdx
callq 0x17cf0
leaq 0x1b6c1(%rip), %rsi # 0x59e52
leaq 0x10(%rsp), %rdi
callq 0x163e0
testl %eax, %eax
je 0x3e811
leaq 0x20(%rsp), %r12
movq -0x10(%r12), %rdi
cmpq %r12, %rdi
je 0x3e7bb
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x17070
movq %rbx, %rdi
movq %r15, %rsi
callq 0x17650
leaq 0x10(%rsp), %rdi
leaq 0xf(%rsp), %rdx
movq %r14, %rsi
callq 0x17cf0
addq $0x8, %rbx
leaq 0x30(%rsp), %rsi
leaq 0x10(%rsp), %rdx
movq %rbx, %rdi
callq 0x17c70
movq 0x10(%rsp), %rdi
cmpq %r12, %rdi
je 0x3e805
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x17070
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
leaq 0x1b5cd(%rip), %rdi # 0x59de5
leaq 0x1be27(%rip), %rdx # 0x5a646
movl $0x3a8, %esi # imm = 0x3A8
xorl %eax, %eax
callq 0x17c60
movq %rax, %rbx
movq 0x10(%rsp), %rdi
cmpq %r12, %rdi
jne 0x3e84d
jmp 0x3e85f
jmp 0x3e85c
movq %rax, %rbx
leaq 0x20(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x3e85f
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x17070
jmp 0x3e85f
movq %rax, %rbx
movq %rbx, %rdi
callq 0x17e20
| gguf_set_val_str:
push r15
push r14
push r12
push rbx
sub rsp, 38h
mov r14, rdx
mov r15, rsi
mov rbx, rdi
mov [rsp+58h+var_28], rsi
lea rdi, [rsp+58h+var_48]
lea rdx, [rsp+58h+var_49]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&)
lea rsi, aGeneralAlignme; "general.alignment"
lea rdi, [rsp+58h+var_48]
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7compareEPKc; std::string::compare(char const*)
test eax, eax
jz short loc_3E811
lea r12, [rsp+58h+var_38]
mov rdi, [r12-10h]; void *
cmp rdi, r12
jz short loc_3E7BB
mov rsi, [rsp+58h+var_38]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_3E7BB:
mov rdi, rbx
mov rsi, r15
call _gguf_remove_key
lea rdi, [rsp+58h+var_48]
lea rdx, [rsp+58h+var_49]
mov rsi, r14
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&)
add rbx, 8
lea rsi, [rsp+58h+var_28]
lea rdx, [rsp+58h+var_48]
mov rdi, rbx
call __ZNSt6vectorI7gguf_kvSaIS0_EE12emplace_backIJRPKcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEEERS0_DpOT_; std::vector<gguf_kv>::emplace_back<char const*&,std::string>(char const*&,std::string &&)
mov rdi, [rsp+58h+var_48]; void *
cmp rdi, r12
jz short loc_3E805
mov rsi, [rsp+58h+var_38]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_3E805:
add rsp, 38h
pop rbx
pop r12
pop r14
pop r15
retn
loc_3E811:
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
mov rdi, [rsp+58h+var_48]
cmp rdi, r12
jnz short loc_3E84D
jmp short loc_3E85F
jmp short loc_3E85C
mov rbx, rax
lea rax, [rsp+58h+var_38]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_3E85F
loc_3E84D:
mov rsi, [rsp+58h+var_38]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_3E85F
loc_3E85C:
mov rbx, rax
loc_3E85F:
mov rdi, rbx
call __Unwind_Resume
| void gguf_set_val_str(long long a1, long long a2, long long a3)
{
int v4; // ecx
int v5; // r8d
int v6; // r9d
char v7; // [rsp+Fh] [rbp-49h] BYREF
void *v8[2]; // [rsp+10h] [rbp-48h] BYREF
_QWORD v9[2]; // [rsp+20h] [rbp-38h] BYREF
long long v10[5]; // [rsp+30h] [rbp-28h] BYREF
v10[0] = a2;
std::string::basic_string<std::allocator<char>>(v8, a2, &v7);
if ( !(unsigned int)std::string::compare(v8, "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",
v4,
v5,
v6);
if ( v8[0] != v9 )
operator delete(v8[0], v9[0] + 1LL);
gguf_remove_key(a1, a2);
std::string::basic_string<std::allocator<char>>(v8, a3, &v7);
std::vector<gguf_kv>::emplace_back<char const*&,std::string>(a1 + 8, v10, v8);
if ( v8[0] != v9 )
operator delete(v8[0], v9[0] + 1LL);
}
| gguf_set_val_str:
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
SUB RSP,0x38
MOV R14,RDX
MOV R15,RSI
MOV RBX,RDI
MOV qword ptr [RSP + 0x30],RSI
LAB_0013e77b:
LEA RDI,[RSP + 0x10]
LEA RDX,[RSP + 0xf]
CALL 0x00117cf0
LAB_0013e78a:
LEA RSI,[0x159e52]
LEA RDI,[RSP + 0x10]
CALL 0x001163e0
TEST EAX,EAX
JZ 0x0013e811
LEA R12,[RSP + 0x20]
MOV RDI,qword ptr [R12 + -0x10]
CMP RDI,R12
JZ 0x0013e7bb
MOV RSI,qword ptr [RSP + 0x20]
INC RSI
CALL 0x00117070
LAB_0013e7bb:
MOV RDI,RBX
MOV RSI,R15
CALL 0x00117650
LAB_0013e7c6:
LEA RDI,[RSP + 0x10]
LEA RDX,[RSP + 0xf]
MOV RSI,R14
CALL 0x00117cf0
ADD RBX,0x8
LAB_0013e7dc:
LEA RSI,[RSP + 0x30]
LEA RDX,[RSP + 0x10]
MOV RDI,RBX
CALL 0x00117c70
MOV RDI,qword ptr [RSP + 0x10]
CMP RDI,R12
JZ 0x0013e805
MOV RSI,qword ptr [RSP + 0x20]
INC RSI
CALL 0x00117070
LAB_0013e805:
ADD RSP,0x38
POP RBX
POP R12
POP R14
POP R15
RET
LAB_0013e811:
LEA RDI,[0x159de5]
LEA RDX,[0x15a646]
MOV ESI,0x3a8
XOR EAX,EAX
CALL 0x00117c60
|
void gguf_set_val_str(long param_1,char *param_2,char *param_3)
{
int iVar1;
allocator local_49;
long *local_48 [2];
long local_38 [2];
char *local_28;
/* try { // try from 0013e77b to 0013e789 has its CatchHandler @ 0013e85c */
local_28 = param_2;
std::__cxx11::string::string<std::allocator<char>>((string *)local_48,param_2,&local_49);
iVar1 = std::__cxx11::string::compare((char *)local_48);
if (iVar1 != 0) {
if (local_48[0] != local_38) {
operator_delete(local_48[0],local_38[0] + 1);
}
gguf_remove_key(param_1,param_2);
/* try { // try from 0013e7c6 to 0013e7d7 has its CatchHandler @ 0013e83a */
std::__cxx11::string::string<std::allocator<char>>((string *)local_48,param_3,&local_49);
/* try { // try from 0013e7dc to 0013e7ed has its CatchHandler @ 0013e82b */
std::vector<gguf_kv,std::allocator<gguf_kv>>::emplace_back<char_const*&,std::__cxx11::string>
((vector<gguf_kv,std::allocator<gguf_kv>> *)(param_1 + 8),&local_28,(string *)local_48
);
if (local_48[0] != local_38) {
operator_delete(local_48[0],local_38[0] + 1);
}
return;
}
/* try { // try from 0013e811 to 0013e82a has its CatchHandler @ 0013e83c */
/* 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");
}
| |
51,850 | hotbar::layout() | untodesu[P]voxelius/game/client/hotbar.cc | void hotbar::layout(void)
{
auto &style = ImGui::GetStyle();
auto item_size = ITEM_SIZE * globals::gui_scale;
auto hotbar_width = HOTBAR_SIZE * item_size;
auto hotbar_padding = HOTBAR_PADDING * globals::gui_scale;
auto viewport = ImGui::GetMainViewport();
auto draw_list = ImGui::GetForegroundDrawList();
// Draw the hotbar background image
auto background_start = ImVec2(0.5f * viewport->Size.x - 0.5f * hotbar_width, viewport->Size.y - item_size - hotbar_padding);
auto background_end = ImVec2(background_start.x + hotbar_width, background_start.y + item_size);
draw_list->AddImage(hotbar_background->handle, background_start, background_end);
// Draw the hotbar selector image
auto selector_padding_a = SELECTOR_PADDING * globals::gui_scale;
auto selector_padding_b = SELECTOR_PADDING * globals::gui_scale * 2.0f;
auto selector_start = ImVec2(background_start.x + hotbar::active_slot * item_size - selector_padding_a, background_start.y - selector_padding_a);
auto selector_end = ImVec2(selector_start.x + item_size + selector_padding_b, selector_start.y + item_size + selector_padding_b);
draw_list->AddImage(hotbar_selector->handle, selector_start, selector_end);
// Figure out item texture padding values
auto item_padding_a = ITEM_PADDING * globals::gui_scale;
auto item_padding_b = ITEM_PADDING * globals::gui_scale * 2.0f;
// Draw individual item textures in the hotbar
for(std::size_t i = 0; i < HOTBAR_SIZE; ++i) {
const auto info = item_registry::find(hotbar::slots[i]);
if((info == nullptr) || (info->cached_texture == nullptr)) {
// There's either no item in the slot
// or the item doesn't have a texture
continue;
}
const auto item_start = ImVec2(background_start.x + i * item_size + item_padding_a, background_start.y + item_padding_a);
const auto item_end = ImVec2(item_start.x + item_size - item_padding_b, item_start.y + item_size - item_padding_b);
draw_list->AddImage(info->cached_texture->handle, item_start, item_end);
}
} | O0 | cpp | hotbar::layout():
pushq %rbp
movq %rsp, %rbp
subq $0x140, %rsp # imm = 0x140
callq 0x225090
movq %rax, -0x8(%rbp)
leaq 0x4444e5(%rip), %rax # 0x50e270
movq %rax, -0xb0(%rbp)
movl (%rax), %ecx
cvtsi2ss %rcx, %xmm0
movss 0x2a7acf(%rip), %xmm1 # 0x371870
mulss %xmm1, %xmm0
movss %xmm0, -0xc(%rbp)
movss -0xc(%rbp), %xmm0
movss 0x2a7abd(%rip), %xmm1 # 0x371874
mulss %xmm1, %xmm0
movss %xmm0, -0x10(%rbp)
movl (%rax), %eax
cvtsi2ss %rax, %xmm0
addss %xmm0, %xmm0
movss %xmm0, -0x14(%rbp)
callq 0x235ff0
movq %rax, -0x20(%rbp)
callq 0x22bd60
movq %rax, -0x28(%rbp)
movq -0x20(%rbp), %rax
movss -0x10(%rbp), %xmm2
movss 0x2a4545(%rip), %xmm3 # 0x36e338
mulss %xmm3, %xmm2
movss 0x10(%rax), %xmm0
movss 0x14(%rax), %xmm1
mulss %xmm3, %xmm0
subss %xmm2, %xmm0
movss -0xc(%rbp), %xmm2
subss %xmm2, %xmm1
movss -0x14(%rbp), %xmm2
subss %xmm2, %xmm1
leaq -0x30(%rbp), %rdi
movq %rdi, -0x108(%rbp)
callq 0x311e0
movss -0x10(%rbp), %xmm2
movss -0x30(%rbp), %xmm0
movss -0x2c(%rbp), %xmm1
addss %xmm2, %xmm0
movss -0xc(%rbp), %xmm2
addss %xmm2, %xmm1
leaq -0x38(%rbp), %rdi
movq %rdi, -0x100(%rbp)
callq 0x311e0
movq -0x28(%rbp), %rax
movq %rax, -0x118(%rbp)
leaq 0x44453f(%rip), %rdi # 0x50e3a8
callq 0x311c0
movq (%rax), %rax
movq %rax, -0x110(%rbp)
leaq -0x40(%rbp), %rdi
movq %rdi, -0xf8(%rbp)
xorps %xmm1, %xmm1
movss %xmm1, -0xe8(%rbp)
movaps %xmm1, %xmm0
callq 0x311e0
leaq -0x48(%rbp), %rdi
movq %rdi, -0xf0(%rbp)
movss 0x2a019b(%rip), %xmm1 # 0x36a044
movss %xmm1, -0xe4(%rbp)
movaps %xmm1, %xmm0
callq 0x311e0
movq -0x118(%rbp), %rdi
movq -0x110(%rbp), %rsi
movq -0x108(%rbp), %rdx
movq -0x100(%rbp), %rcx
movq -0xf8(%rbp), %r8
movq -0xf0(%rbp), %r9
movq %rsp, %rax
movl $0xffffffff, (%rax) # imm = 0xFFFFFFFF
callq 0x1cbf50
movq -0xb0(%rbp), %rax
movl (%rax), %ecx
cvtsi2ss %rcx, %xmm0
movss %xmm0, -0x4c(%rbp)
movl (%rax), %eax
cvtsi2ss %rax, %xmm0
addss %xmm0, %xmm0
movss %xmm0, -0x50(%rbp)
movl 0x44437a(%rip), %eax # 0x50e294
cvtsi2ss %rax, %xmm0
movss -0xc(%rbp), %xmm1
mulss %xmm1, %xmm0
movss -0x30(%rbp), %xmm2
movss -0x2c(%rbp), %xmm1
addss %xmm2, %xmm0
movss -0x4c(%rbp), %xmm2
subss %xmm2, %xmm0
subss %xmm2, %xmm1
leaq -0x58(%rbp), %rdi
movq %rdi, -0xd0(%rbp)
callq 0x311e0
movss -0xc(%rbp), %xmm3
movss -0x58(%rbp), %xmm0
movss -0x54(%rbp), %xmm1
addss %xmm3, %xmm0
movss -0x50(%rbp), %xmm2
addss %xmm2, %xmm0
addss %xmm3, %xmm1
addss %xmm2, %xmm1
leaq -0x60(%rbp), %rdi
movq %rdi, -0xc8(%rbp)
callq 0x311e0
movq -0x28(%rbp), %rax
movq %rax, -0xe0(%rbp)
leaq 0x44441f(%rip), %rdi # 0x50e3b8
callq 0x311c0
movss -0xe8(%rbp), %xmm1
movq (%rax), %rax
movq %rax, -0xd8(%rbp)
leaq -0x68(%rbp), %rdi
movq %rdi, -0xc0(%rbp)
movaps %xmm1, %xmm0
callq 0x311e0
movss -0xe4(%rbp), %xmm1
leaq -0x70(%rbp), %rdi
movq %rdi, -0xb8(%rbp)
movaps %xmm1, %xmm0
callq 0x311e0
movq -0xe0(%rbp), %rdi
movq -0xd8(%rbp), %rsi
movq -0xd0(%rbp), %rdx
movq -0xc8(%rbp), %rcx
movq -0xc0(%rbp), %r8
movq -0xb8(%rbp), %r9
movq %rsp, %rax
movl $0xffffffff, (%rax) # imm = 0xFFFFFFFF
callq 0x1cbf50
movq -0xb0(%rbp), %rax
movl (%rax), %ecx
cvtsi2ss %rcx, %xmm0
addss %xmm0, %xmm0
movss %xmm0, -0x74(%rbp)
movl (%rax), %eax
cvtsi2ss %rax, %xmm1
movss 0x2a0810(%rip), %xmm0 # 0x36a84c
mulss %xmm1, %xmm0
movss 0x2a0804(%rip), %xmm1 # 0x36a84c
mulss %xmm1, %xmm0
movss %xmm0, -0x78(%rbp)
movq $0x0, -0x80(%rbp)
cmpq $0x9, -0x80(%rbp)
jae 0xca1f6
movq -0x80(%rbp), %rcx
leaq 0x444231(%rip), %rax # 0x50e2a0
movl (%rax,%rcx,4), %edi
callq 0x15ac20
movq %rax, -0x88(%rbp)
cmpq $0x0, -0x88(%rbp)
je 0xca0a2
movq -0x88(%rbp), %rdi
addq $0x48, %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x31140
testb $0x1, %al
jne 0xca0a2
jmp 0xca0a7
jmp 0xca1e5
movss -0x30(%rbp), %xmm0
movss %xmm0, -0x124(%rbp)
movq -0x80(%rbp), %rax
movq %rax, %rdx
shrq %rdx
movl %eax, %ecx
andl $0x1, %ecx
orq %rdx, %rcx
cvtsi2ss %rcx, %xmm0
addss %xmm0, %xmm0
cvtsi2ss %rax, %xmm1
movss %xmm1, -0x120(%rbp)
testq %rax, %rax
movss %xmm0, -0x11c(%rbp)
js 0xca0f9
movss -0x120(%rbp), %xmm0
movss %xmm0, -0x11c(%rbp)
movss -0x124(%rbp), %xmm1
movss -0x11c(%rbp), %xmm0
movss -0xc(%rbp), %xmm2
mulss %xmm2, %xmm0
addss %xmm1, %xmm0
addss -0x74(%rbp), %xmm0
movss -0x2c(%rbp), %xmm1
addss -0x74(%rbp), %xmm1
leaq -0x90(%rbp), %rdi
callq 0x311e0
movss -0x90(%rbp), %xmm0
addss -0xc(%rbp), %xmm0
subss -0x78(%rbp), %xmm0
movss -0x8c(%rbp), %xmm1
addss -0xc(%rbp), %xmm1
subss -0x78(%rbp), %xmm1
leaq -0x98(%rbp), %rdi
callq 0x311e0
movq -0x28(%rbp), %rax
movq %rax, -0x138(%rbp)
movq -0x88(%rbp), %rdi
addq $0x48, %rdi
callq 0x311c0
movq (%rax), %rax
movq %rax, -0x130(%rbp)
leaq -0xa0(%rbp), %rdi
xorps %xmm1, %xmm1
movaps %xmm1, %xmm0
callq 0x311e0
leaq -0xa8(%rbp), %rdi
movss 0x29fe9d(%rip), %xmm1 # 0x36a044
movaps %xmm1, %xmm0
callq 0x311e0
movq -0x138(%rbp), %rdi
movq -0x130(%rbp), %rsi
leaq -0x90(%rbp), %rdx
leaq -0x98(%rbp), %rcx
leaq -0xa0(%rbp), %r8
leaq -0xa8(%rbp), %r9
movl $0xffffffff, (%rsp) # imm = 0xFFFFFFFF
callq 0x1cbf50
movq -0x80(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x80(%rbp)
jmp 0xca059
addq $0x140, %rsp # imm = 0x140
popq %rbp
retq
nop
| _ZN6hotbar6layoutEv:
push rbp
mov rbp, rsp
sub rsp, 140h
call _ZN5ImGui8GetStyleEv; ImGui::GetStyle(void)
mov [rbp+var_8], rax
lea rax, _ZN7globals9gui_scaleE; globals::gui_scale
mov [rbp+var_B0], rax
mov ecx, [rax]
cvtsi2ss xmm0, rcx
movss xmm1, cs:flt_371870
mulss xmm0, xmm1
movss [rbp+var_C], xmm0
movss xmm0, [rbp+var_C]
movss xmm1, cs:dword_371874
mulss xmm0, xmm1
movss [rbp+var_10], xmm0
mov eax, [rax]
cvtsi2ss xmm0, rax
addss xmm0, xmm0
movss [rbp+var_14], xmm0
call _ZN5ImGui15GetMainViewportEv; ImGui::GetMainViewport(void)
mov [rbp+var_20], rax
call _ZN5ImGui21GetForegroundDrawListEv; ImGui::GetForegroundDrawList(void)
mov [rbp+var_28], rax
mov rax, [rbp+var_20]
movss xmm2, [rbp+var_10]
movss xmm3, cs:flt_36E338
mulss xmm2, xmm3
movss xmm0, dword ptr [rax+10h]
movss xmm1, dword ptr [rax+14h]
mulss xmm0, xmm3
subss xmm0, xmm2; float
movss xmm2, [rbp+var_C]
subss xmm1, xmm2
movss xmm2, [rbp+var_14]
subss xmm1, xmm2; float
lea rdi, [rbp+var_30]; this
mov [rbp+var_108], rdi
call _ZN6ImVec2C2Eff; ImVec2::ImVec2(float,float)
movss xmm2, [rbp+var_10]
movss xmm0, [rbp+var_30]
movss xmm1, [rbp+var_2C]
addss xmm0, xmm2; float
movss xmm2, [rbp+var_C]
addss xmm1, xmm2; float
lea rdi, [rbp+var_38]; this
mov [rbp+var_100], rdi
call _ZN6ImVec2C2Eff; ImVec2::ImVec2(float,float)
mov rax, [rbp+var_28]
mov [rbp+var_118], rax
lea rdi, _ZL17hotbar_background; hotbar_background
call _ZNKSt19__shared_ptr_accessIK10TextureGUILN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv; std::__shared_ptr_access<TextureGUI const,(__gnu_cxx::_Lock_policy)2,false,false>::operator->(void)
mov rax, [rax]
mov [rbp+var_110], rax
lea rdi, [rbp+var_40]; this
mov [rbp+var_F8], rdi
xorps xmm1, xmm1; float
movss [rbp+var_E8], xmm1
movaps xmm0, xmm1; float
call _ZN6ImVec2C2Eff; ImVec2::ImVec2(float,float)
lea rdi, [rbp+var_48]; this
mov [rbp+var_F0], rdi
movss xmm1, cs:flt_36A044; float
movss [rbp+var_E4], xmm1
movaps xmm0, xmm1; float
call _ZN6ImVec2C2Eff; ImVec2::ImVec2(float,float)
mov rdi, [rbp+var_118]; this
mov rsi, [rbp+var_110]; unsigned __int64
mov rdx, [rbp+var_108]; ImVec2 *
mov rcx, [rbp+var_100]; ImVec2 *
mov r8, [rbp+var_F8]; ImVec2 *
mov r9, [rbp+var_F0]; ImVec2 *
mov rax, rsp
mov dword ptr [rax], 0FFFFFFFFh
call _ZN10ImDrawList8AddImageEyRK6ImVec2S2_S2_S2_j; ImDrawList::AddImage(ulong long,ImVec2 const&,ImVec2 const&,ImVec2 const&,ImVec2 const&,uint)
mov rax, [rbp+var_B0]
mov ecx, [rax]
cvtsi2ss xmm0, rcx
movss [rbp+var_4C], xmm0
mov eax, [rax]
cvtsi2ss xmm0, rax
addss xmm0, xmm0
movss [rbp+var_50], xmm0
mov eax, cs:_ZN6hotbar11active_slotE; hotbar::active_slot
cvtsi2ss xmm0, rax
movss xmm1, [rbp+var_C]
mulss xmm0, xmm1
movss xmm2, [rbp+var_30]
movss xmm1, [rbp+var_2C]
addss xmm0, xmm2
movss xmm2, [rbp+var_4C]
subss xmm0, xmm2; float
subss xmm1, xmm2; float
lea rdi, [rbp+var_58]; this
mov [rbp+var_D0], rdi
call _ZN6ImVec2C2Eff; ImVec2::ImVec2(float,float)
movss xmm3, [rbp+var_C]
movss xmm0, [rbp+var_58]
movss xmm1, [rbp+var_54]
addss xmm0, xmm3
movss xmm2, [rbp+var_50]
addss xmm0, xmm2; float
addss xmm1, xmm3
addss xmm1, xmm2; float
lea rdi, [rbp+var_60]; this
mov [rbp+var_C8], rdi
call _ZN6ImVec2C2Eff; ImVec2::ImVec2(float,float)
mov rax, [rbp+var_28]
mov [rbp+var_E0], rax
lea rdi, _ZL15hotbar_selector; hotbar_selector
call _ZNKSt19__shared_ptr_accessIK10TextureGUILN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv; std::__shared_ptr_access<TextureGUI const,(__gnu_cxx::_Lock_policy)2,false,false>::operator->(void)
movss xmm1, [rbp+var_E8]; float
mov rax, [rax]
mov qword ptr [rbp+var_D8], rax
lea rdi, [rbp+var_68]; this
mov [rbp+var_C0], rdi
movaps xmm0, xmm1; float
call _ZN6ImVec2C2Eff; ImVec2::ImVec2(float,float)
movss xmm1, [rbp+var_E4]; float
lea rdi, [rbp+var_70]; this
mov [rbp+var_B8], rdi
movaps xmm0, xmm1; float
call _ZN6ImVec2C2Eff; ImVec2::ImVec2(float,float)
mov rdi, [rbp+var_E0]; this
mov rsi, qword ptr [rbp+var_D8]; unsigned int
mov rdx, [rbp+var_D0]; ImVec2 *
mov rcx, [rbp+var_C8]; ImVec2 *
mov r8, [rbp+var_C0]; ImVec2 *
mov r9, [rbp+var_B8]; ImVec2 *
mov rax, rsp
mov dword ptr [rax], 0FFFFFFFFh
call _ZN10ImDrawList8AddImageEyRK6ImVec2S2_S2_S2_j; ImDrawList::AddImage(ulong long,ImVec2 const&,ImVec2 const&,ImVec2 const&,ImVec2 const&,uint)
mov rax, [rbp+var_B0]
mov ecx, [rax]
cvtsi2ss xmm0, rcx
addss xmm0, xmm0
movss [rbp+var_74], xmm0
mov eax, [rax]
cvtsi2ss xmm1, rax
movss xmm0, cs:flt_36A84C
mulss xmm0, xmm1
movss xmm1, cs:flt_36A84C
mulss xmm0, xmm1
movss [rbp+var_78], xmm0
mov [rbp+var_80], 0
loc_CA059:
cmp [rbp+var_80], 9
jnb loc_CA1F6
mov rcx, [rbp+var_80]
lea rax, _ZN6hotbar5slotsE; hotbar::slots
mov edi, [rax+rcx*4]; this
call _ZN13item_registry4findEj; item_registry::find(uint)
mov [rbp+var_88], rax
cmp [rbp+var_88], 0
jz short loc_CA0A2
mov rdi, [rbp+var_88]
add rdi, 48h ; 'H'
xor eax, eax
mov esi, eax
call _ZSteqIK10TextureGUIEbRKSt10shared_ptrIT_EDn; std::operator==<TextureGUI const>(std::shared_ptr<TextureGUI const> const&,decltype(nullptr))
test al, 1
jnz short loc_CA0A2
jmp short loc_CA0A7
loc_CA0A2:
jmp loc_CA1E5
loc_CA0A7:
movss xmm0, [rbp+var_30]
movss [rbp+var_124], xmm0
mov rax, [rbp+var_80]
mov rdx, rax
shr rdx, 1
mov ecx, eax
and ecx, 1
or rcx, rdx
cvtsi2ss xmm0, rcx
addss xmm0, xmm0
cvtsi2ss xmm1, rax
movss [rbp+var_120], xmm1
test rax, rax
movss [rbp+var_11C], xmm0
js short loc_CA0F9
movss xmm0, [rbp+var_120]
movss [rbp+var_11C], xmm0
loc_CA0F9:
movss xmm1, [rbp+var_124]
movss xmm0, [rbp+var_11C]
movss xmm2, [rbp+var_C]
mulss xmm0, xmm2
addss xmm0, xmm1
addss xmm0, [rbp+var_74]; float
movss xmm1, [rbp+var_2C]
addss xmm1, [rbp+var_74]; float
lea rdi, [rbp+var_90]; this
call _ZN6ImVec2C2Eff; ImVec2::ImVec2(float,float)
movss xmm0, [rbp+var_90]
addss xmm0, [rbp+var_C]
subss xmm0, [rbp+var_78]; float
movss xmm1, [rbp+var_8C]
addss xmm1, [rbp+var_C]
subss xmm1, [rbp+var_78]; float
lea rdi, [rbp+var_98]; this
call _ZN6ImVec2C2Eff; ImVec2::ImVec2(float,float)
mov rax, [rbp+var_28]
mov [rbp+var_138], rax
mov rdi, [rbp+var_88]
add rdi, 48h ; 'H'
call _ZNKSt19__shared_ptr_accessIK10TextureGUILN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv; std::__shared_ptr_access<TextureGUI const,(__gnu_cxx::_Lock_policy)2,false,false>::operator->(void)
mov rax, [rax]
mov [rbp+var_130], rax
lea rdi, [rbp+var_A0]; this
xorps xmm1, xmm1; float
movaps xmm0, xmm1; float
call _ZN6ImVec2C2Eff; ImVec2::ImVec2(float,float)
lea rdi, [rbp+var_A8]; this
movss xmm1, cs:flt_36A044; float
movaps xmm0, xmm1; float
call _ZN6ImVec2C2Eff; ImVec2::ImVec2(float,float)
mov rdi, [rbp+var_138]; this
mov rsi, [rbp+var_130]; unsigned __int64
lea rdx, [rbp+var_90]; ImVec2 *
lea rcx, [rbp+var_98]; ImVec2 *
lea r8, [rbp+var_A0]; ImVec2 *
lea r9, [rbp+var_A8]; ImVec2 *
mov [rsp+140h+var_140], 0FFFFFFFFh; unsigned int
call _ZN10ImDrawList8AddImageEyRK6ImVec2S2_S2_S2_j; ImDrawList::AddImage(ulong long,ImVec2 const&,ImVec2 const&,ImVec2 const&,ImVec2 const&,uint)
loc_CA1E5:
mov rax, [rbp+var_80]
add rax, 1
mov [rbp+var_80], rax
jmp loc_CA059
loc_CA1F6:
add rsp, 140h
pop rbp
retn
| unsigned long long hotbar::layout(hotbar *this)
{
unsigned int v1; // esi
unsigned long long result; // rax
ImDrawList *v3; // [rsp+8h] [rbp-138h]
unsigned long long v4; // [rsp+10h] [rbp-130h]
float v5; // [rsp+24h] [rbp-11Ch]
ImDrawList *v6; // [rsp+28h] [rbp-118h]
unsigned long long v7; // [rsp+30h] [rbp-110h]
ImDrawList *v8; // [rsp+60h] [rbp-E0h]
unsigned long long v9; // [rsp+68h] [rbp-D8h]
_BYTE v10[8]; // [rsp+98h] [rbp-A8h] BYREF
_BYTE v11[8]; // [rsp+A0h] [rbp-A0h] BYREF
_BYTE v12[8]; // [rsp+A8h] [rbp-98h] BYREF
float v13[2]; // [rsp+B0h] [rbp-90h] BYREF
long long v14; // [rsp+B8h] [rbp-88h]
unsigned long long i; // [rsp+C0h] [rbp-80h]
float v16; // [rsp+C8h] [rbp-78h]
float v17; // [rsp+CCh] [rbp-74h]
_BYTE v18[8]; // [rsp+D0h] [rbp-70h] BYREF
_BYTE v19[8]; // [rsp+D8h] [rbp-68h] BYREF
_BYTE v20[8]; // [rsp+E0h] [rbp-60h] BYREF
float v21[2]; // [rsp+E8h] [rbp-58h] BYREF
float v22; // [rsp+F0h] [rbp-50h]
float v23; // [rsp+F4h] [rbp-4Ch]
_BYTE v24[8]; // [rsp+F8h] [rbp-48h] BYREF
_BYTE v25[8]; // [rsp+100h] [rbp-40h] BYREF
_BYTE v26[8]; // [rsp+108h] [rbp-38h] BYREF
float v27; // [rsp+110h] [rbp-30h] BYREF
float v28; // [rsp+114h] [rbp-2Ch]
long long ForegroundDrawList; // [rsp+118h] [rbp-28h]
long long MainViewport; // [rsp+120h] [rbp-20h]
float v31; // [rsp+12Ch] [rbp-14h]
float v32; // [rsp+130h] [rbp-10h]
float v33; // [rsp+134h] [rbp-Ch]
long long Style; // [rsp+138h] [rbp-8h]
Style = ImGui::GetStyle(this);
v33 = (float)(int)globals::gui_scale * 20.0;
v32 = v33 * 9.0;
v31 = (float)(int)globals::gui_scale + (float)(int)globals::gui_scale;
MainViewport = ImGui::GetMainViewport(this);
ForegroundDrawList = ImGui::GetForegroundDrawList(this);
ImVec2::ImVec2(
(ImVec2 *)&v27,
(float)(*(float *)(MainViewport + 16) * 0.5) - (float)((float)(v33 * 9.0) * 0.5),
(float)(*(float *)(MainViewport + 20) - v33) - v31);
ImVec2::ImVec2((ImVec2 *)v26, v27 + v32, v28 + v33);
v6 = (ImDrawList *)ForegroundDrawList;
v7 = *(_QWORD *)std::__shared_ptr_access<TextureGUI const,(__gnu_cxx::_Lock_policy)2,false,false>::operator->((long long)&hotbar_background);
ImVec2::ImVec2((ImVec2 *)v25, 0.0, 0.0);
ImVec2::ImVec2((ImVec2 *)v24, 1.0, 1.0);
ImDrawList::AddImage(
v6,
v7,
(const ImVec2 *)&v27,
(const ImVec2 *)v26,
(const ImVec2 *)v25,
(const ImVec2 *)v24,
0xFFFFFFFF);
v23 = (float)(int)globals::gui_scale;
v22 = (float)(int)globals::gui_scale + (float)(int)globals::gui_scale;
ImVec2::ImVec2((ImVec2 *)v21, (float)((float)((float)hotbar::active_slot * v33) + v27) - v23, v28 - v23);
ImVec2::ImVec2((ImVec2 *)v20, (float)(v21[0] + v33) + v22, (float)(v21[1] + v33) + v22);
v8 = (ImDrawList *)ForegroundDrawList;
v9 = *(_QWORD *)std::__shared_ptr_access<TextureGUI const,(__gnu_cxx::_Lock_policy)2,false,false>::operator->((long long)&hotbar_selector);
ImVec2::ImVec2((ImVec2 *)v19, 0.0, 0.0);
ImVec2::ImVec2((ImVec2 *)v18, 1.0, 1.0);
v1 = v9;
ImDrawList::AddImage(
v8,
v9,
(const ImVec2 *)v21,
(const ImVec2 *)v20,
(const ImVec2 *)v19,
(const ImVec2 *)v18,
0xFFFFFFFF);
v17 = (float)(int)globals::gui_scale + (float)(int)globals::gui_scale;
result = globals::gui_scale;
v16 = (float)(2.0 * (float)(int)globals::gui_scale) * 2.0;
for ( i = 0LL; i < 9; ++i )
{
v14 = item_registry::find((item_registry *)(unsigned int)hotbar::slots[i], v1);
if ( v14 )
{
v1 = 0;
if ( !std::operator==<TextureGUI const>(v14 + 72) )
{
v5 = (float)(int)((i >> 1) | i & 1) + (float)(int)((i >> 1) | i & 1);
if ( (i & 0x8000000000000000LL) == 0LL )
v5 = (float)(int)i;
ImVec2::ImVec2((ImVec2 *)v13, (float)((float)(v5 * v33) + v27) + v17, v28 + v17);
ImVec2::ImVec2((ImVec2 *)v12, (float)(v13[0] + v33) - v16, (float)(v13[1] + v33) - v16);
v3 = (ImDrawList *)ForegroundDrawList;
v4 = *(_QWORD *)std::__shared_ptr_access<TextureGUI const,(__gnu_cxx::_Lock_policy)2,false,false>::operator->(v14 + 72);
ImVec2::ImVec2((ImVec2 *)v11, 0.0, 0.0);
ImVec2::ImVec2((ImVec2 *)v10, 1.0, 1.0);
v1 = v4;
ImDrawList::AddImage(
v3,
v4,
(const ImVec2 *)v13,
(const ImVec2 *)v12,
(const ImVec2 *)v11,
(const ImVec2 *)v10,
0xFFFFFFFF);
}
}
result = i + 1;
}
return result;
}
| layout:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x140
CALL 0x00325090
MOV qword ptr [RBP + -0x8],RAX
LEA RAX,[0x60e270]
MOV qword ptr [RBP + -0xb0],RAX
MOV ECX,dword ptr [RAX]
CVTSI2SS XMM0,RCX
MOVSS XMM1,dword ptr [0x00471870]
MULSS XMM0,XMM1
MOVSS dword ptr [RBP + -0xc],XMM0
MOVSS XMM0,dword ptr [RBP + -0xc]
MOVSS XMM1,dword ptr [0x00471874]
MULSS XMM0,XMM1
MOVSS dword ptr [RBP + -0x10],XMM0
MOV EAX,dword ptr [RAX]
CVTSI2SS XMM0,RAX
ADDSS XMM0,XMM0
MOVSS dword ptr [RBP + -0x14],XMM0
CALL 0x00335ff0
MOV qword ptr [RBP + -0x20],RAX
CALL 0x0032bd60
MOV qword ptr [RBP + -0x28],RAX
MOV RAX,qword ptr [RBP + -0x20]
MOVSS XMM2,dword ptr [RBP + -0x10]
MOVSS XMM3,dword ptr [0x0046e338]
MULSS XMM2,XMM3
MOVSS XMM0,dword ptr [RAX + 0x10]
MOVSS XMM1,dword ptr [RAX + 0x14]
MULSS XMM0,XMM3
SUBSS XMM0,XMM2
MOVSS XMM2,dword ptr [RBP + -0xc]
SUBSS XMM1,XMM2
MOVSS XMM2,dword ptr [RBP + -0x14]
SUBSS XMM1,XMM2
LEA RDI,[RBP + -0x30]
MOV qword ptr [RBP + -0x108],RDI
CALL 0x001311e0
MOVSS XMM2,dword ptr [RBP + -0x10]
MOVSS XMM0,dword ptr [RBP + -0x30]
MOVSS XMM1,dword ptr [RBP + -0x2c]
ADDSS XMM0,XMM2
MOVSS XMM2,dword ptr [RBP + -0xc]
ADDSS XMM1,XMM2
LEA RDI,[RBP + -0x38]
MOV qword ptr [RBP + -0x100],RDI
CALL 0x001311e0
MOV RAX,qword ptr [RBP + -0x28]
MOV qword ptr [RBP + -0x118],RAX
LEA RDI,[0x60e3a8]
CALL 0x001311c0
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x110],RAX
LEA RDI,[RBP + -0x40]
MOV qword ptr [RBP + -0xf8],RDI
XORPS XMM1,XMM1
MOVSS dword ptr [RBP + -0xe8],XMM1
MOVAPS XMM0,XMM1
CALL 0x001311e0
LEA RDI,[RBP + -0x48]
MOV qword ptr [RBP + -0xf0],RDI
MOVSS XMM1,dword ptr [0x0046a044]
MOVSS dword ptr [RBP + -0xe4],XMM1
MOVAPS XMM0,XMM1
CALL 0x001311e0
MOV RDI,qword ptr [RBP + -0x118]
MOV RSI,qword ptr [RBP + -0x110]
MOV RDX,qword ptr [RBP + -0x108]
MOV RCX,qword ptr [RBP + -0x100]
MOV R8,qword ptr [RBP + -0xf8]
MOV R9,qword ptr [RBP + -0xf0]
MOV RAX,RSP
MOV dword ptr [RAX],0xffffffff
CALL 0x002cbf50
MOV RAX,qword ptr [RBP + -0xb0]
MOV ECX,dword ptr [RAX]
CVTSI2SS XMM0,RCX
MOVSS dword ptr [RBP + -0x4c],XMM0
MOV EAX,dword ptr [RAX]
CVTSI2SS XMM0,RAX
ADDSS XMM0,XMM0
MOVSS dword ptr [RBP + -0x50],XMM0
MOV EAX,dword ptr [0x0060e294]
CVTSI2SS XMM0,RAX
MOVSS XMM1,dword ptr [RBP + -0xc]
MULSS XMM0,XMM1
MOVSS XMM2,dword ptr [RBP + -0x30]
MOVSS XMM1,dword ptr [RBP + -0x2c]
ADDSS XMM0,XMM2
MOVSS XMM2,dword ptr [RBP + -0x4c]
SUBSS XMM0,XMM2
SUBSS XMM1,XMM2
LEA RDI,[RBP + -0x58]
MOV qword ptr [RBP + -0xd0],RDI
CALL 0x001311e0
MOVSS XMM3,dword ptr [RBP + -0xc]
MOVSS XMM0,dword ptr [RBP + -0x58]
MOVSS XMM1,dword ptr [RBP + -0x54]
ADDSS XMM0,XMM3
MOVSS XMM2,dword ptr [RBP + -0x50]
ADDSS XMM0,XMM2
ADDSS XMM1,XMM3
ADDSS XMM1,XMM2
LEA RDI,[RBP + -0x60]
MOV qword ptr [RBP + -0xc8],RDI
CALL 0x001311e0
MOV RAX,qword ptr [RBP + -0x28]
MOV qword ptr [RBP + -0xe0],RAX
LEA RDI,[0x60e3b8]
CALL 0x001311c0
MOVSS XMM1,dword ptr [RBP + -0xe8]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0xd8],RAX
LEA RDI,[RBP + -0x68]
MOV qword ptr [RBP + -0xc0],RDI
MOVAPS XMM0,XMM1
CALL 0x001311e0
MOVSS XMM1,dword ptr [RBP + -0xe4]
LEA RDI,[RBP + -0x70]
MOV qword ptr [RBP + -0xb8],RDI
MOVAPS XMM0,XMM1
CALL 0x001311e0
MOV RDI,qword ptr [RBP + -0xe0]
MOV RSI,qword ptr [RBP + -0xd8]
MOV RDX,qword ptr [RBP + -0xd0]
MOV RCX,qword ptr [RBP + -0xc8]
MOV R8,qword ptr [RBP + -0xc0]
MOV R9,qword ptr [RBP + -0xb8]
MOV RAX,RSP
MOV dword ptr [RAX],0xffffffff
CALL 0x002cbf50
MOV RAX,qword ptr [RBP + -0xb0]
MOV ECX,dword ptr [RAX]
CVTSI2SS XMM0,RCX
ADDSS XMM0,XMM0
MOVSS dword ptr [RBP + -0x74],XMM0
MOV EAX,dword ptr [RAX]
CVTSI2SS XMM1,RAX
MOVSS XMM0,dword ptr [0x0046a84c]
MULSS XMM0,XMM1
MOVSS XMM1,dword ptr [0x0046a84c]
MULSS XMM0,XMM1
MOVSS dword ptr [RBP + -0x78],XMM0
MOV qword ptr [RBP + -0x80],0x0
LAB_001ca059:
CMP qword ptr [RBP + -0x80],0x9
JNC 0x001ca1f6
MOV RCX,qword ptr [RBP + -0x80]
LEA RAX,[0x60e2a0]
MOV EDI,dword ptr [RAX + RCX*0x4]
CALL 0x0025ac20
MOV qword ptr [RBP + -0x88],RAX
CMP qword ptr [RBP + -0x88],0x0
JZ 0x001ca0a2
MOV RDI,qword ptr [RBP + -0x88]
ADD RDI,0x48
XOR EAX,EAX
MOV ESI,EAX
CALL 0x00131140
TEST AL,0x1
JNZ 0x001ca0a2
JMP 0x001ca0a7
LAB_001ca0a2:
JMP 0x001ca1e5
LAB_001ca0a7:
MOVSS XMM0,dword ptr [RBP + -0x30]
MOVSS dword ptr [RBP + -0x124],XMM0
MOV RAX,qword ptr [RBP + -0x80]
MOV RDX,RAX
SHR RDX,0x1
MOV ECX,EAX
AND ECX,0x1
OR RCX,RDX
CVTSI2SS XMM0,RCX
ADDSS XMM0,XMM0
CVTSI2SS XMM1,RAX
MOVSS dword ptr [RBP + -0x120],XMM1
TEST RAX,RAX
MOVSS dword ptr [RBP + -0x11c],XMM0
JS 0x001ca0f9
MOVSS XMM0,dword ptr [RBP + -0x120]
MOVSS dword ptr [RBP + -0x11c],XMM0
LAB_001ca0f9:
MOVSS XMM1,dword ptr [RBP + -0x124]
MOVSS XMM0,dword ptr [RBP + -0x11c]
MOVSS XMM2,dword ptr [RBP + -0xc]
MULSS XMM0,XMM2
ADDSS XMM0,XMM1
ADDSS XMM0,dword ptr [RBP + -0x74]
MOVSS XMM1,dword ptr [RBP + -0x2c]
ADDSS XMM1,dword ptr [RBP + -0x74]
LEA RDI,[RBP + -0x90]
CALL 0x001311e0
MOVSS XMM0,dword ptr [RBP + -0x90]
ADDSS XMM0,dword ptr [RBP + -0xc]
SUBSS XMM0,dword ptr [RBP + -0x78]
MOVSS XMM1,dword ptr [RBP + -0x8c]
ADDSS XMM1,dword ptr [RBP + -0xc]
SUBSS XMM1,dword ptr [RBP + -0x78]
LEA RDI,[RBP + -0x98]
CALL 0x001311e0
MOV RAX,qword ptr [RBP + -0x28]
MOV qword ptr [RBP + -0x138],RAX
MOV RDI,qword ptr [RBP + -0x88]
ADD RDI,0x48
CALL 0x001311c0
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x130],RAX
LEA RDI,[RBP + -0xa0]
XORPS XMM1,XMM1
MOVAPS XMM0,XMM1
CALL 0x001311e0
LEA RDI,[RBP + -0xa8]
MOVSS XMM1,dword ptr [0x0046a044]
MOVAPS XMM0,XMM1
CALL 0x001311e0
MOV RDI,qword ptr [RBP + -0x138]
MOV RSI,qword ptr [RBP + -0x130]
LEA RDX,[RBP + -0x90]
LEA RCX,[RBP + -0x98]
LEA R8,[RBP + -0xa0]
LEA R9,[RBP + -0xa8]
MOV dword ptr [RSP],0xffffffff
CALL 0x002cbf50
LAB_001ca1e5:
MOV RAX,qword ptr [RBP + -0x80]
ADD RAX,0x1
MOV qword ptr [RBP + -0x80],RAX
JMP 0x001ca059
LAB_001ca1f6:
ADD RSP,0x140
POP RBP
RET
|
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
/* hotbar::layout() */
void hotbar::layout(void)
{
ulonglong uVar1;
float fVar2;
ImDrawList *pIVar3;
bool bVar4;
ulonglong *puVar5;
float local_124;
ImVec2 local_b0 [8];
ImVec2 local_a8 [8];
ImVec2 local_a0 [8];
float local_98;
float local_94;
long local_90;
ulong local_88;
float local_80;
float local_7c;
ImVec2 local_78 [8];
ImVec2 local_70 [8];
ImVec2 local_68 [8];
float local_60;
float local_5c;
float local_58;
float local_54;
ImVec2 local_50 [8];
ImVec2 local_48 [8];
ImVec2 local_40 [8];
float local_38;
float local_34;
ImDrawList *local_30;
long local_28;
float local_1c;
float local_18;
float local_14;
int8 local_10;
local_10 = ImGui::GetStyle();
local_14 = (float)globals::gui_scale * DAT_00471870;
local_18 = local_14 * DAT_00471874;
local_1c = (float)globals::gui_scale + (float)globals::gui_scale;
local_28 = ImGui::GetMainViewport();
local_30 = (ImDrawList *)ImGui::GetForegroundDrawList();
ImVec2::ImVec2((ImVec2 *)&local_38,
*(float *)(local_28 + 0x10) * _DAT_0046e338 - local_18 * _DAT_0046e338,
(*(float *)(local_28 + 0x14) - local_14) - local_1c);
ImVec2::ImVec2(local_40,local_38 + local_18,local_34 + local_14);
pIVar3 = local_30;
puVar5 = (ulonglong *)
std::__shared_ptr_access<TextureGUI_const,(__gnu_cxx::_Lock_policy)2,false,false>::
operator->((__shared_ptr_access<TextureGUI_const,(__gnu_cxx::_Lock_policy)2,false,false>
*)hotbar_background);
uVar1 = *puVar5;
ImVec2::ImVec2(local_48,0.0,0.0);
fVar2 = DAT_0046a044;
ImVec2::ImVec2(local_50,DAT_0046a044,DAT_0046a044);
ImDrawList::AddImage(pIVar3,uVar1,(ImVec2 *)&local_38,local_40,local_48,local_50,0xffffffff);
local_54 = (float)globals::gui_scale;
local_58 = (float)globals::gui_scale + (float)globals::gui_scale;
ImVec2::ImVec2((ImVec2 *)&local_60,((float)active_slot * local_14 + local_38) - local_54,
local_34 - local_54);
ImVec2::ImVec2(local_68,local_60 + local_14 + local_58,local_5c + local_14 + local_58);
pIVar3 = local_30;
puVar5 = (ulonglong *)
std::__shared_ptr_access<TextureGUI_const,(__gnu_cxx::_Lock_policy)2,false,false>::
operator->((__shared_ptr_access<TextureGUI_const,(__gnu_cxx::_Lock_policy)2,false,false>
*)hotbar_selector);
uVar1 = *puVar5;
ImVec2::ImVec2(local_70,0.0,0.0);
ImVec2::ImVec2(local_78,fVar2,fVar2);
ImDrawList::AddImage(pIVar3,uVar1,(ImVec2 *)&local_60,local_68,local_70,local_78,0xffffffff);
local_7c = (float)globals::gui_scale + (float)globals::gui_scale;
local_80 = DAT_0046a84c * (float)globals::gui_scale * DAT_0046a84c;
for (local_88 = 0; local_88 < 9; local_88 = local_88 + 1) {
local_90 = item_registry::find((&slots)[local_88]);
if ((local_90 != 0) &&
(bVar4 = std::operator==((shared_ptr *)(local_90 + 0x48),(_func_decltype_nullptr *)0x0),
!bVar4)) {
local_124 = (float)local_88;
ImVec2::ImVec2((ImVec2 *)&local_98,local_124 * local_14 + local_38 + local_7c,
local_34 + local_7c);
ImVec2::ImVec2(local_a0,(local_98 + local_14) - local_80,(local_94 + local_14) - local_80);
pIVar3 = local_30;
puVar5 = (ulonglong *)
std::__shared_ptr_access<TextureGUI_const,(__gnu_cxx::_Lock_policy)2,false,false>::
operator->((__shared_ptr_access<TextureGUI_const,(__gnu_cxx::_Lock_policy)2,false,false>
*)(local_90 + 0x48));
uVar1 = *puVar5;
ImVec2::ImVec2(local_a8,0.0,0.0);
ImVec2::ImVec2(local_b0,DAT_0046a044,DAT_0046a044);
ImDrawList::AddImage(pIVar3,uVar1,(ImVec2 *)&local_98,local_a0,local_a8,local_b0,0xffffffff);
}
}
return;
}
| |
51,851 | hotbar::layout() | untodesu[P]voxelius/game/client/hotbar.cc | void hotbar::layout(void)
{
auto &style = ImGui::GetStyle();
auto item_size = ITEM_SIZE * globals::gui_scale;
auto hotbar_width = HOTBAR_SIZE * item_size;
auto hotbar_padding = HOTBAR_PADDING * globals::gui_scale;
auto viewport = ImGui::GetMainViewport();
auto draw_list = ImGui::GetForegroundDrawList();
// Draw the hotbar background image
auto background_start = ImVec2(0.5f * viewport->Size.x - 0.5f * hotbar_width, viewport->Size.y - item_size - hotbar_padding);
auto background_end = ImVec2(background_start.x + hotbar_width, background_start.y + item_size);
draw_list->AddImage(hotbar_background->handle, background_start, background_end);
// Draw the hotbar selector image
auto selector_padding_a = SELECTOR_PADDING * globals::gui_scale;
auto selector_padding_b = SELECTOR_PADDING * globals::gui_scale * 2.0f;
auto selector_start = ImVec2(background_start.x + hotbar::active_slot * item_size - selector_padding_a, background_start.y - selector_padding_a);
auto selector_end = ImVec2(selector_start.x + item_size + selector_padding_b, selector_start.y + item_size + selector_padding_b);
draw_list->AddImage(hotbar_selector->handle, selector_start, selector_end);
// Figure out item texture padding values
auto item_padding_a = ITEM_PADDING * globals::gui_scale;
auto item_padding_b = ITEM_PADDING * globals::gui_scale * 2.0f;
// Draw individual item textures in the hotbar
for(std::size_t i = 0; i < HOTBAR_SIZE; ++i) {
const auto info = item_registry::find(hotbar::slots[i]);
if((info == nullptr) || (info->cached_texture == nullptr)) {
// There's either no item in the slot
// or the item doesn't have a texture
continue;
}
const auto item_start = ImVec2(background_start.x + i * item_size + item_padding_a, background_start.y + item_padding_a);
const auto item_end = ImVec2(item_start.x + item_size - item_padding_b, item_start.y + item_size - item_padding_b);
draw_list->AddImage(info->cached_texture->handle, item_start, item_end);
}
} | O3 | cpp | hotbar::layout():
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x98, %rsp
callq 0xf4cab
leaq 0x208d64(%rip), %rax # 0x25a040
movl (%rax), %eax
cvtsi2ss %rax, %xmm0
movaps %xmm0, 0x20(%rsp)
callq 0x10507c
movq %rax, %r14
callq 0xf9d47
movq %rax, %rbx
movss 0x10(%r14), %xmm0
movaps 0x20(%rsp), %xmm4
shufps $0x0, %xmm4, %xmm4 # xmm4 = xmm4[0,0,0,0]
mulps 0x146942(%rip), %xmm4 # 0x197c50
movss 0x14(%r14), %xmm1
movss 0x146944(%rip), %xmm2 # 0x197c60
mulss %xmm4, %xmm2
movss 0x14693c(%rip), %xmm3 # 0x197c64
mulss %xmm2, %xmm3
mulss 0x1404f4(%rip), %xmm0 # 0x191828
addss %xmm3, %xmm0
subss %xmm4, %xmm1
movaps %xmm4, %xmm3
movaps %xmm4, 0x20(%rsp)
shufps $0x55, %xmm4, %xmm3 # xmm3 = xmm3[1,1],xmm4[1,1]
subss %xmm3, %xmm1
leaq 0x18(%rsp), %r15
movss %xmm0, (%r15)
movss %xmm1, 0x4(%r15)
unpcklps %xmm4, %xmm2 # xmm2 = xmm2[0],xmm4[0],xmm2[1],xmm4[1]
unpcklps %xmm1, %xmm0 # xmm0 = xmm0[0],xmm1[0],xmm0[1],xmm1[1]
addps %xmm2, %xmm0
leaq 0x90(%rsp), %rcx
movlps %xmm0, (%rcx)
movq 0x208e09(%rip), %rax # 0x25a180
movq (%rax), %rsi
xorl %ebp, %ebp
leaq 0x58(%rsp), %r12
movq %rbp, (%r12)
movsd 0x140453(%rip), %xmm0 # 0x1917e0
leaq 0x50(%rsp), %r14
movsd %xmm0, (%r14)
movl $0xffffffff, %r13d # imm = 0xFFFFFFFF
movl %r13d, (%rsp)
movq %rbx, %rdi
movq %r15, %rdx
movq %r12, %r8
movq %r14, %r9
callq 0xbe938
leaq 0x208c87(%rip), %rax # 0x25a040
movl (%rax), %eax
xorps %xmm0, %xmm0
cvtsi2ss %rax, %xmm0
movaps %xmm0, %xmm1
movl 0x208c98(%rip), %eax # 0x25a064
xorps %xmm2, %xmm2
cvtsi2ss %rax, %xmm2
addss %xmm0, %xmm1
movaps 0x20(%rsp), %xmm4
mulss %xmm4, %xmm2
addss (%r15), %xmm2
movss 0x4(%r15), %xmm3
unpcklps %xmm3, %xmm2 # xmm2 = xmm2[0],xmm3[0],xmm2[1],xmm3[1]
shufps $0x0, %xmm0, %xmm0 # xmm0 = xmm0[0,0,0,0]
subps %xmm0, %xmm2
movss %xmm2, (%r12)
movaps %xmm2, %xmm0
shufps $0x55, %xmm2, %xmm0 # xmm0 = xmm0[1,1],xmm2[1,1]
movss %xmm0, 0x4(%r12)
movaps %xmm4, %xmm0
shufps $0x0, %xmm4, %xmm0 # xmm0 = xmm0[0,0],xmm4[0,0]
movaps %xmm0, 0x80(%rsp)
addps %xmm0, %xmm2
unpcklps %xmm1, %xmm1 # xmm1 = xmm1[0,0,1,1]
addps %xmm2, %xmm1
movlps %xmm1, (%r14)
movq 0x208d63(%rip), %rax # 0x25a190
movq (%rax), %rsi
leaq 0x10(%rsp), %r8
movq %rbp, (%r8)
leaq 0x48(%rsp), %r15
movsd 0x14039b(%rip), %xmm0 # 0x1917e0
movsd %xmm0, (%r15)
movl %r13d, (%rsp)
leaq 0x58(%rsp), %rdx
leaq 0x50(%rsp), %rcx
movq %rbx, %rdi
movq %r15, %r9
callq 0xbe938
leaq 0x208bd6(%rip), %rax # 0x25a040
movl (%rax), %eax
xorps %xmm0, %xmm0
cvtsi2ss %rax, %xmm0
addss %xmm0, %xmm0
movaps %xmm0, %xmm1
addss %xmm0, %xmm1
shufps $0x0, %xmm0, %xmm0 # xmm0 = xmm0[0,0,0,0]
movaps %xmm0, 0x70(%rsp)
shufps $0x0, %xmm1, %xmm1 # xmm1 = xmm1[0,0,0,0]
movaps %xmm1, 0x60(%rsp)
leaq 0x208bd8(%rip), %r14 # 0x25a070
leaq 0x40(%rsp), %r12
leaq 0x38(%rsp), %r13
movl (%r14), %edi
callq 0x7b0ad
testq %rax, %rax
je 0x5153a
movq 0x48(%rax), %rax
testq %rax, %rax
je 0x5153a
xorps %xmm0, %xmm0
cvtsi2ss %rbp, %xmm0
mulss 0x20(%rsp), %xmm0
addss 0x18(%rsp), %xmm0
movss 0x1c(%rsp), %xmm1
unpcklps %xmm1, %xmm0 # xmm0 = xmm0[0],xmm1[0],xmm0[1],xmm1[1]
addps 0x70(%rsp), %xmm0
movss %xmm0, 0x10(%rsp)
movaps 0x80(%rsp), %xmm1
addps %xmm0, %xmm1
shufps $0x55, %xmm0, %xmm0 # xmm0 = xmm0[1,1,1,1]
movss %xmm0, 0x14(%rsp)
subps 0x60(%rsp), %xmm1
movlps %xmm1, 0x48(%rsp)
movq (%rax), %rsi
movq $0x0, 0x40(%rsp)
movsd 0x1402c9(%rip), %xmm0 # 0x1917e0
movsd %xmm0, 0x38(%rsp)
movl $0xffffffff, (%rsp) # imm = 0xFFFFFFFF
movq %rbx, %rdi
leaq 0x10(%rsp), %rdx
movq %r15, %rcx
movq %r12, %r8
movq %r13, %r9
callq 0xbe938
incq %rbp
addq $0x4, %r14
cmpq $0x9, %rbp
jne 0x514a2
addq $0x98, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| _ZN6hotbar6layoutEv:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 98h
call _ZN5ImGui8GetStyleEv; ImGui::GetStyle(void)
lea rax, _ZN7globals9gui_scaleE; globals::gui_scale
mov eax, [rax]
cvtsi2ss xmm0, rax
movaps [rsp+0C8h+var_A8], xmm0
call _ZN5ImGui15GetMainViewportEv; ImGui::GetMainViewport(void)
mov r14, rax
call _ZN5ImGui21GetForegroundDrawListEv; ImGui::GetForegroundDrawList(void)
mov rbx, rax
movss xmm0, dword ptr [r14+10h]
movaps xmm4, [rsp+0C8h+var_A8]
shufps xmm4, xmm4, 0
mulps xmm4, cs:xmmword_197C50
movss xmm1, dword ptr [r14+14h]
movss xmm2, cs:dword_197C60
mulss xmm2, xmm4
movss xmm3, cs:dword_197C64
mulss xmm3, xmm2
mulss xmm0, cs:flt_191828
addss xmm0, xmm3
subss xmm1, xmm4
movaps xmm3, xmm4
movaps [rsp+0C8h+var_A8], xmm4
shufps xmm3, xmm4, 55h ; 'U'
subss xmm1, xmm3
lea r15, [rsp+0C8h+var_B0]
movss dword ptr [r15], xmm0
movss dword ptr [r15+4], xmm1
unpcklps xmm2, xmm4
unpcklps xmm0, xmm1
addps xmm0, xmm2
lea rcx, [rsp+0C8h+var_38]
movlps qword ptr [rcx], xmm0
mov rax, qword ptr cs:_ZL17hotbar_background; hotbar_background
mov rsi, [rax]
xor ebp, ebp
lea r12, [rsp+0C8h+var_70]
mov [r12], rbp
movsd xmm0, qword ptr cs:xmmword_1917E0
lea r14, [rsp+0C8h+var_78]
movsd qword ptr [r14], xmm0
mov r13d, 0FFFFFFFFh
mov [rsp+0C8h+var_C8], r13d; int
mov rdi, rbx; this
mov rdx, r15
mov r8, r12
mov r9, r14
call _ZN10ImDrawList8AddImageEyRK6ImVec2S2_S2_S2_j; ImDrawList::AddImage(ulong long,ImVec2 const&,ImVec2 const&,ImVec2 const&,ImVec2 const&,uint)
lea rax, _ZN7globals9gui_scaleE; globals::gui_scale
mov eax, [rax]
xorps xmm0, xmm0
cvtsi2ss xmm0, rax
movaps xmm1, xmm0
mov eax, cs:_ZN6hotbar11active_slotE; hotbar::active_slot
xorps xmm2, xmm2
cvtsi2ss xmm2, rax
addss xmm1, xmm0
movaps xmm4, [rsp+0C8h+var_A8]
mulss xmm2, xmm4
addss xmm2, dword ptr [r15]
movss xmm3, dword ptr [r15+4]
unpcklps xmm2, xmm3
shufps xmm0, xmm0, 0
subps xmm2, xmm0
movss dword ptr [r12], xmm2
movaps xmm0, xmm2
shufps xmm0, xmm2, 55h ; 'U'
movss dword ptr [r12+4], xmm0
movaps xmm0, xmm4
shufps xmm0, xmm4, 0
movaps [rsp+0C8h+var_48], xmm0
addps xmm2, xmm0
unpcklps xmm1, xmm1
addps xmm1, xmm2
movlps qword ptr [r14], xmm1
mov rax, qword ptr cs:_ZL15hotbar_selector; hotbar_selector
mov rsi, [rax]; unsigned int
lea r8, [rsp+0C8h+var_B8]
mov [r8], rbp
lea r15, [rsp+0C8h+var_80]
movsd xmm0, qword ptr cs:xmmword_1917E0
movsd qword ptr [r15], xmm0
mov [rsp+0C8h+var_C8], r13d; int
lea rdx, [rsp+0C8h+var_70]
lea rcx, [rsp+0C8h+var_78]
mov rdi, rbx; this
mov r9, r15
call _ZN10ImDrawList8AddImageEyRK6ImVec2S2_S2_S2_j; ImDrawList::AddImage(ulong long,ImVec2 const&,ImVec2 const&,ImVec2 const&,ImVec2 const&,uint)
lea rax, _ZN7globals9gui_scaleE; globals::gui_scale
mov eax, [rax]
xorps xmm0, xmm0
cvtsi2ss xmm0, rax
addss xmm0, xmm0
movaps xmm1, xmm0
addss xmm1, xmm0
shufps xmm0, xmm0, 0
movaps [rsp+0C8h+var_58], xmm0
shufps xmm1, xmm1, 0
movaps [rsp+0C8h+var_68], xmm1
lea r14, _ZN6hotbar5slotsE; hotbar::slots
lea r12, [rsp+0C8h+var_88]
lea r13, [rsp+0C8h+var_90]
loc_514A2:
mov edi, [r14]; this
call _ZN13item_registry4findEj; item_registry::find(uint)
test rax, rax
jz loc_5153A
mov rax, [rax+48h]
test rax, rax
jz short loc_5153A
xorps xmm0, xmm0
cvtsi2ss xmm0, rbp
mulss xmm0, dword ptr [rsp+0C8h+var_A8]
addss xmm0, [rsp+0C8h+var_B0]
movss xmm1, [rsp+0C8h+var_AC]
unpcklps xmm0, xmm1
addps xmm0, [rsp+0C8h+var_58]
movss [rsp+0C8h+var_B8], xmm0
movaps xmm1, [rsp+0C8h+var_48]
addps xmm1, xmm0
shufps xmm0, xmm0, 55h ; 'U'
movss [rsp+0C8h+var_B4], xmm0
subps xmm1, [rsp+0C8h+var_68]
movlps [rsp+0C8h+var_80], xmm1
mov rsi, [rax]
mov [rsp+0C8h+var_88], 0
movsd xmm0, qword ptr cs:xmmword_1917E0
movsd [rsp+0C8h+var_90], xmm0
mov [rsp+0C8h+var_C8], 0FFFFFFFFh; int
mov rdi, rbx; this
lea rdx, [rsp+0C8h+var_B8]
mov rcx, r15
mov r8, r12
mov r9, r13
call _ZN10ImDrawList8AddImageEyRK6ImVec2S2_S2_S2_j; ImDrawList::AddImage(ulong long,ImVec2 const&,ImVec2 const&,ImVec2 const&,ImVec2 const&,uint)
loc_5153A:
inc rbp
add r14, 4
cmp rbp, 9
jnz loc_514A2
add rsp, 98h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| long long * hotbar::layout(hotbar *this, __m128 a2)
{
long long MainViewport; // r14
ImDrawList *ForegroundDrawList; // rbx
__m128 v4; // xmm0
__m128 v5; // xmm4
__m128 v6; // xmm1
__m128 v7; // xmm2
long long v8; // rbp
__m128 v9; // xmm0
__m128 v10; // xmm1
__m128 v11; // xmm2
__m128 v12; // xmm2
long long v13; // rsi
__m128 v14; // xmm0
__m128 v15; // xmm1
unsigned int *v16; // r14
long long *result; // rax
__m128 v18; // xmm0
float v19; // [rsp+18h] [rbp-B0h]
unsigned __int32 v20; // [rsp+1Ch] [rbp-ACh]
__m128 v21; // [rsp+20h] [rbp-A8h]
__m128 v22; // [rsp+20h] [rbp-A8h]
long long v23; // [rsp+48h] [rbp-80h] BYREF
double v24; // [rsp+50h] [rbp-78h] BYREF
__int32 v25; // [rsp+58h] [rbp-70h]
unsigned __int32 v26; // [rsp+5Ch] [rbp-6Ch]
__m128 v27; // [rsp+60h] [rbp-68h]
__m128 v28; // [rsp+70h] [rbp-58h]
__m128 v29; // [rsp+80h] [rbp-48h]
double v30[7]; // [rsp+90h] [rbp-38h] BYREF
ImGui::GetStyle(this);
a2.m128_f32[0] = (float)globals::gui_scale;
v21 = a2;
MainViewport = ImGui::GetMainViewport(this);
ForegroundDrawList = (ImDrawList *)ImGui::GetForegroundDrawList(this);
v4 = (__m128)*(unsigned int *)(MainViewport + 16);
v5 = _mm_mul_ps(_mm_shuffle_ps(v21, v21, 0), (__m128)xmmword_197C50);
v6 = (__m128)*(unsigned int *)(MainViewport + 20);
v7 = (__m128)0x41100000u;
v7.m128_f32[0] = 9.0 * v5.m128_f32[0];
v4.m128_f32[0] = (float)(v4.m128_f32[0] * 0.5) + (float)(-0.5 * (float)(9.0 * v5.m128_f32[0]));
v22 = v5;
v6.m128_f32[0] = (float)(v6.m128_f32[0] - v5.m128_f32[0]) - _mm_shuffle_ps(v5, v5, 85).m128_f32[0];
v19 = v4.m128_f32[0];
v20 = v6.m128_i32[0];
_mm_storel_ps(v30, _mm_add_ps(_mm_unpacklo_ps(v4, v6), _mm_unpacklo_ps(v7, v5)));
v8 = 0LL;
v24 = 0.007812501848093234;
ImDrawList::AddImage(ForegroundDrawList, -1);
v9 = 0LL;
v9.m128_f32[0] = (float)globals::gui_scale;
v10 = v9;
v11 = 0LL;
v10.m128_f32[0] = v9.m128_f32[0] + v9.m128_f32[0];
v11.m128_f32[0] = (float)((float)hotbar::active_slot * v22.m128_f32[0]) + v19;
v12 = _mm_sub_ps(_mm_unpacklo_ps(v11, (__m128)v20), _mm_shuffle_ps(v9, v9, 0));
v25 = v12.m128_i32[0];
v26 = _mm_shuffle_ps(v12, v12, 85).m128_u32[0];
v29 = _mm_shuffle_ps(v22, v22, 0);
_mm_storel_ps(&v24, _mm_add_ps(_mm_unpacklo_ps(v10, v10), _mm_add_ps(v12, v29)));
v13 = *(_QWORD *)hotbar_selector;
v23 = 0x3F8000003F800000LL;
ImDrawList::AddImage(ForegroundDrawList, -1);
v14 = 0LL;
v14.m128_f32[0] = (float)globals::gui_scale + (float)globals::gui_scale;
v15 = v14;
v15.m128_f32[0] = v14.m128_f32[0] + v14.m128_f32[0];
v28 = _mm_shuffle_ps(v14, v14, 0);
v27 = _mm_shuffle_ps(v15, v15, 0);
v16 = hotbar::slots;
do
{
result = (long long *)item_registry::find((item_registry *)*v16, v13);
if ( result )
{
result = (long long *)result[9];
if ( result )
{
v18 = 0LL;
v18.m128_f32[0] = (float)((float)(int)v8 * v22.m128_f32[0]) + v19;
_mm_storel_ps(
(double *)&v23,
_mm_sub_ps(_mm_add_ps(v29, _mm_add_ps(_mm_unpacklo_ps(v18, (__m128)v20), v28)), v27));
v13 = *result;
result = (long long *)ImDrawList::AddImage(ForegroundDrawList, -1);
}
}
++v8;
++v16;
}
while ( v8 != 9 );
return result;
}
| layout:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x98
CALL 0x001f4cab
LEA RAX,[0x35a040]
MOV EAX,dword ptr [RAX]
CVTSI2SS XMM0,RAX
MOVAPS xmmword ptr [RSP + 0x20],XMM0
CALL 0x0020507c
MOV R14,RAX
CALL 0x001f9d47
MOV RBX,RAX
MOVSS XMM0,dword ptr [R14 + 0x10]
MOVAPS XMM4,xmmword ptr [RSP + 0x20]
SHUFPS XMM4,XMM4,0x0
MULPS XMM4,xmmword ptr [0x00297c50]
MOVSS XMM1,dword ptr [R14 + 0x14]
MOVSS XMM2,dword ptr [0x00297c60]
MULSS XMM2,XMM4
MOVSS XMM3,dword ptr [0x00297c64]
MULSS XMM3,XMM2
MULSS XMM0,dword ptr [0x00291828]
ADDSS XMM0,XMM3
SUBSS XMM1,XMM4
MOVAPS XMM3,XMM4
MOVAPS xmmword ptr [RSP + 0x20],XMM4
SHUFPS XMM3,XMM4,0x55
SUBSS XMM1,XMM3
LEA R15,[RSP + 0x18]
MOVSS dword ptr [R15],XMM0
MOVSS dword ptr [R15 + 0x4],XMM1
UNPCKLPS XMM2,XMM4
UNPCKLPS XMM0,XMM1
ADDPS XMM0,XMM2
LEA RCX,[RSP + 0x90]
MOVLPS qword ptr [RCX],XMM0
MOV RAX,qword ptr [0x0035a180]
MOV RSI,qword ptr [RAX]
XOR EBP,EBP
LEA R12,[RSP + 0x58]
MOV qword ptr [R12],RBP
MOVSD XMM0,qword ptr [0x002917e0]
LEA R14,[RSP + 0x50]
MOVSD qword ptr [R14],XMM0
MOV R13D,0xffffffff
MOV dword ptr [RSP],R13D
MOV RDI,RBX
MOV RDX,R15
MOV R8,R12
MOV R9,R14
CALL 0x001be938
LEA RAX,[0x35a040]
MOV EAX,dword ptr [RAX]
XORPS XMM0,XMM0
CVTSI2SS XMM0,RAX
MOVAPS XMM1,XMM0
MOV EAX,dword ptr [0x0035a064]
XORPS XMM2,XMM2
CVTSI2SS XMM2,RAX
ADDSS XMM1,XMM0
MOVAPS XMM4,xmmword ptr [RSP + 0x20]
MULSS XMM2,XMM4
ADDSS XMM2,dword ptr [R15]
MOVSS XMM3,dword ptr [R15 + 0x4]
UNPCKLPS XMM2,XMM3
SHUFPS XMM0,XMM0,0x0
SUBPS XMM2,XMM0
MOVSS dword ptr [R12],XMM2
MOVAPS XMM0,XMM2
SHUFPS XMM0,XMM2,0x55
MOVSS dword ptr [R12 + 0x4],XMM0
MOVAPS XMM0,XMM4
SHUFPS XMM0,XMM4,0x0
MOVAPS xmmword ptr [RSP + 0x80],XMM0
ADDPS XMM2,XMM0
UNPCKLPS XMM1,XMM1
ADDPS XMM1,XMM2
MOVLPS qword ptr [R14],XMM1
MOV RAX,qword ptr [0x0035a190]
MOV RSI,qword ptr [RAX]
LEA R8,[RSP + 0x10]
MOV qword ptr [R8],RBP
LEA R15,[RSP + 0x48]
MOVSD XMM0,qword ptr [0x002917e0]
MOVSD qword ptr [R15],XMM0
MOV dword ptr [RSP],R13D
LEA RDX,[RSP + 0x58]
LEA RCX,[RSP + 0x50]
MOV RDI,RBX
MOV R9,R15
CALL 0x001be938
LEA RAX,[0x35a040]
MOV EAX,dword ptr [RAX]
XORPS XMM0,XMM0
CVTSI2SS XMM0,RAX
ADDSS XMM0,XMM0
MOVAPS XMM1,XMM0
ADDSS XMM1,XMM0
SHUFPS XMM0,XMM0,0x0
MOVAPS xmmword ptr [RSP + 0x70],XMM0
SHUFPS XMM1,XMM1,0x0
MOVAPS xmmword ptr [RSP + 0x60],XMM1
LEA R14,[0x35a070]
LEA R12,[RSP + 0x40]
LEA R13,[RSP + 0x38]
LAB_001514a2:
MOV EDI,dword ptr [R14]
CALL 0x0017b0ad
TEST RAX,RAX
JZ 0x0015153a
MOV RAX,qword ptr [RAX + 0x48]
TEST RAX,RAX
JZ 0x0015153a
XORPS XMM0,XMM0
CVTSI2SS XMM0,RBP
MULSS XMM0,dword ptr [RSP + 0x20]
ADDSS XMM0,dword ptr [RSP + 0x18]
MOVSS XMM1,dword ptr [RSP + 0x1c]
UNPCKLPS XMM0,XMM1
ADDPS XMM0,xmmword ptr [RSP + 0x70]
MOVSS dword ptr [RSP + 0x10],XMM0
MOVAPS XMM1,xmmword ptr [RSP + 0x80]
ADDPS XMM1,XMM0
SHUFPS XMM0,XMM0,0x55
MOVSS dword ptr [RSP + 0x14],XMM0
SUBPS XMM1,xmmword ptr [RSP + 0x60]
MOVLPS qword ptr [RSP + 0x48],XMM1
MOV RSI,qword ptr [RAX]
MOV qword ptr [RSP + 0x40],0x0
MOVSD XMM0,qword ptr [0x002917e0]
MOVSD qword ptr [RSP + 0x38],XMM0
MOV dword ptr [RSP],0xffffffff
MOV RDI,RBX
LEA RDX,[RSP + 0x10]
MOV RCX,R15
MOV R8,R12
MOV R9,R13
CALL 0x001be938
LAB_0015153a:
INC RBP
ADD R14,0x4
CMP RBP,0x9
JNZ 0x001514a2
ADD RSP,0x98
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
/* hotbar::layout() */
void hotbar::layout(void)
{
long lVar1;
ImDrawList *this;
long lVar2;
uint *puVar3;
int4 extraout_XMM0_Db;
float fVar4;
float local_b8 [2];
float local_b0;
float local_ac;
float local_a8;
float fStack_a4;
float fStack_a0;
float fStack_9c;
int8 local_90;
int8 local_88;
int8 local_80;
int8 local_78;
float local_70 [3];
float fStack_64;
float fStack_60;
float fStack_5c;
float local_58;
float fStack_54;
float fStack_50;
float fStack_4c;
float local_48;
float fStack_44;
float fStack_40;
float fStack_3c;
int8 local_38;
ImGui::GetStyle();
local_a8 = (float)globals::gui_scale;
fStack_a4 = (float)extraout_XMM0_Db;
lVar1 = ImGui::GetMainViewport();
this = (ImDrawList *)ImGui::GetForegroundDrawList();
fVar4 = local_a8 * _DAT_00297c50;
fStack_a4 = local_a8 * _UNK_00297c54;
fStack_a0 = local_a8 * _UNK_00297c58;
fStack_9c = local_a8 * _UNK_00297c5c;
local_b0 = *(float *)(lVar1 + 0x10) * DAT_00291828 + DAT_00297c64 * DAT_00297c60 * fVar4;
local_ac = (*(float *)(lVar1 + 0x14) - fVar4) - fStack_a4;
local_38 = CONCAT44(local_ac + fVar4,local_b0 + DAT_00297c60 * fVar4);
lVar1 = 0;
local_70[0] = 0.0;
local_70[1] = 0.0;
local_78 = DAT_002917e0;
local_a8 = fVar4;
ImDrawList::AddImage
(this,*hotbar_background,(ImVec2 *)&local_b0,(ImVec2 *)&local_38,(ImVec2 *)local_70,
(ImVec2 *)&local_78,0xffffffff);
fVar4 = (float)globals::gui_scale;
local_70[0] = ((float)active_slot * local_a8 + local_b0) - fVar4;
local_70[1] = local_ac - fVar4;
local_48 = local_a8;
fStack_44 = local_a8;
fStack_40 = local_a8;
fStack_3c = local_a8;
local_78 = CONCAT44(fVar4 + fVar4 + (local_ac - fVar4) + local_a8,
fVar4 + fVar4 + local_70[0] + local_a8);
local_b8[0] = 0.0;
local_b8[1] = 0.0;
local_80 = DAT_002917e0;
ImDrawList::AddImage
(this,*hotbar_selector,(ImVec2 *)local_70,(ImVec2 *)&local_78,(ImVec2 *)local_b8,
(ImVec2 *)&local_80,0xffffffff);
local_58 = (float)globals::gui_scale + (float)globals::gui_scale;
local_70[2] = local_58 + local_58;
puVar3 = &slots;
fStack_64 = local_70[2];
fStack_60 = local_70[2];
fStack_5c = local_70[2];
fStack_54 = local_58;
fStack_50 = local_58;
fStack_4c = local_58;
do {
lVar2 = item_registry::find(*puVar3);
if ((lVar2 != 0) && (*(ulonglong **)(lVar2 + 0x48) != (ulonglong *)0x0)) {
local_b8[0] = (float)lVar1 * local_a8 + local_b0 + local_58;
local_b8[1] = local_ac + fStack_54;
local_80 = CONCAT44((fStack_44 + local_ac + fStack_54) - fStack_64,
(local_48 + local_b8[0]) - local_70[2]);
local_88 = 0;
local_90 = DAT_002917e0;
ImDrawList::AddImage
(this,**(ulonglong **)(lVar2 + 0x48),(ImVec2 *)local_b8,(ImVec2 *)&local_80,
(ImVec2 *)&local_88,(ImVec2 *)&local_90,0xffffffff);
}
lVar1 = lVar1 + 1;
puVar3 = puVar3 + 1;
} while (lVar1 != 9);
return;
}
| |
51,852 | exec_REDO_LOGREC_CLR_END | eloqsql/storage/maria/ma_recovery.c | prototype_redo_exec_hook(CLR_END)
{
MARIA_HA *info= get_MARIA_HA_from_UNDO_record(rec);
MARIA_SHARE *share;
LSN previous_undo_lsn;
enum translog_record_type undone_record_type;
const LOG_DESC *log_desc;
my_bool row_entry= 0;
uchar *logpos;
DBUG_ENTER("exec_REDO_LOGREC_CLR_END");
previous_undo_lsn= lsn_korr(rec->header);
undone_record_type=
clr_type_korr(rec->header + LSN_STORE_SIZE + FILEID_STORE_SIZE);
log_desc= &log_record_type_descriptor[undone_record_type];
set_undo_lsn_for_active_trans(rec->short_trid, previous_undo_lsn);
if (info == NULL)
DBUG_RETURN(0);
share= info->s;
tprint(tracef, " CLR_END was about %s, undo_lsn " LSN_FMT "\n",
log_desc->name, LSN_IN_PARTS(previous_undo_lsn));
enlarge_buffer(rec);
if (log_record_buffer.str == NULL ||
translog_read_record(rec->lsn, 0, rec->record_length,
log_record_buffer.str, NULL) !=
rec->record_length)
{
eprint(tracef, "Failed to read record");
return 1;
}
logpos= (log_record_buffer.str + LSN_STORE_SIZE + FILEID_STORE_SIZE +
CLR_TYPE_STORE_SIZE);
if (cmp_translog_addr(rec->lsn, share->state.is_of_horizon) >= 0)
{
tprint(tracef, " state older than record\n");
switch (undone_record_type) {
case LOGREC_UNDO_ROW_DELETE:
row_entry= 1;
share->state.state.records++;
break;
case LOGREC_UNDO_ROW_INSERT:
share->state.state.records--;
share->state.changed|= STATE_NOT_OPTIMIZED_ROWS;
row_entry= 1;
break;
case LOGREC_UNDO_ROW_UPDATE:
row_entry= 1;
break;
case LOGREC_UNDO_KEY_INSERT:
case LOGREC_UNDO_KEY_DELETE:
break;
case LOGREC_UNDO_KEY_INSERT_WITH_ROOT:
case LOGREC_UNDO_KEY_DELETE_WITH_ROOT:
{
uint key_nr;
my_off_t page;
key_nr= key_nr_korr(logpos);
page= page_korr(logpos + KEY_NR_STORE_SIZE);
share->state.key_root[key_nr]= (page == IMPOSSIBLE_PAGE_NO ?
HA_OFFSET_ERROR :
page * share->block_size);
break;
}
case LOGREC_UNDO_BULK_INSERT:
break;
default:
DBUG_ASSERT(0);
}
if (row_entry && share->calc_checksum)
share->state.state.checksum+= ha_checksum_korr(logpos);
share->state.changed|= (STATE_CHANGED | STATE_NOT_ANALYZED |
STATE_NOT_ZEROFILLED | STATE_NOT_MOVABLE);
}
if (row_entry)
tprint(tracef, " row count: %lu\n", (ulong)share->state.state.records);
_ma_unpin_all_pages(info, rec->lsn);
DBUG_RETURN(0);
} | O3 | c | exec_REDO_LOGREC_CLR_END:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
callq 0xaa32c7
movq %rax, %r14
movzwl 0x18(%rbx), %eax
shlq $0x20, %rax
movzbl 0x1a(%rbx), %ecx
shlq $0x30, %rcx
orq %rax, %rcx
movl 0x1b(%rbx), %r8d
movzbl 0x21(%rbx), %r12d
movzwl 0x10(%rbx), %eax
movq 0x1336704(%rip), %rdx # 0x1dd80a0
movl %eax, %edi
shll $0x5, %edi
cmpq $0x0, 0x18(%rdx,%rdi)
je 0xaa19c9
leaq (%rcx,%r8), %rsi
addq %rdx, %rdi
movq %rsi, 0x8(%rdi)
shll $0x5, %eax
cmpq $0x0, 0x10(%rdx,%rax)
jne 0xaa19c9
addq %rdx, %rax
addq $0x10, %rax
movq %rsi, (%rax)
testq %r14, %r14
je 0xaa1b62
movq (%r14), %r15
leaq 0x1336824(%rip), %r13 # 0x1dd8200
movq (%r13), %rdi
leaq (%r12,%r12,8), %rax
leaq 0xb34425(%rip), %rdx # 0x15d5e10
movq 0x28(%rdx,%rax,8), %rdx
shrq $0x20, %rcx
leaq 0x329273(%rip), %rsi # 0xdcac6e
xorl %eax, %eax
callq 0xaa373c
movl 0x14(%rbx), %edx
cmpq %rdx, 0x13366dc(%rip) # 0x1dd80e8
jae 0xaa1a34
movq %rdx, 0x13366d3(%rip) # 0x1dd80e8
movq 0x13366c4(%rip), %rsi # 0x1dd80e0
movl $0x50, %ecx
xorl %edi, %edi
callq 0xcf672c
movq %rax, %rcx
movq %rax, 0x13366ae(%rip) # 0x1dd80e0
jmp 0xaa1a3b
movq 0x13366a5(%rip), %rcx # 0x1dd80e0
testq %rcx, %rcx
je 0xaa1af6
movq (%rbx), %rdi
movl 0x14(%rbx), %edx
xorl %esi, %esi
xorl %r8d, %r8d
callq 0xa93382
cmpl 0x14(%rbx), %eax
jne 0xaa1af6
movq (%rbx), %rax
cmpq 0x180(%r15), %rax
jl 0xaa1b57
movq 0x133666c(%rip), %rax # 0x1dd80e0
movq %rax, -0x30(%rbp)
movq (%r13), %rdi
leaq 0x32912f(%rip), %rsi # 0xdcabb2
xorl %eax, %eax
callq 0xaa373c
addl $-0x12, %r12d
cmpl $0x6, %r12d
ja 0xaa1ae9
leaq 0x4be405(%rip), %rax # 0xf5fea0
movslq (%rax,%r12,4), %rcx
addq %rax, %rcx
jmpq *%rcx
movq -0x30(%rbp), %rcx
movzbl 0xa(%rcx), %eax
movl 0xb(%rcx), %edx
movzbl 0xf(%rcx), %ecx
shlq $0x20, %rcx
orq %rdx, %rcx
movq $-0x1, %rdx
movabsq $0xffffffffff, %rsi # imm = 0xFFFFFFFFFF
cmpq %rsi, %rcx
je 0xaa1ade
movl 0x7bc(%r15), %edx
imulq %rdx, %rcx
movq %rcx, %rdx
movq 0x118(%r15), %rcx
movq %rdx, (%rcx,%rax,8)
orl $0x189, 0x170(%r15) # imm = 0x189
jmp 0xaa1b57
movq (%r13), %rdi
leaq 0x32851b(%rip), %rsi # 0xdca01c
xorl %eax, %eax
callq 0xaa37c4
movl $0x1, %eax
jmp 0xaa1b64
incq 0x18(%r15)
jmp 0xaa1b21
decq 0x18(%r15)
orb $0x40, 0x170(%r15)
cmpq $0x0, 0x6a8(%r15)
je 0xaa1b36
movq -0x30(%rbp), %rax
movl 0xa(%rax), %eax
addl %eax, 0x48(%r15)
orl $0x189, 0x170(%r15) # imm = 0x189
movq (%r13), %rdi
movq 0x18(%r15), %rdx
leaq 0x32903b(%rip), %rsi # 0xdcab8b
xorl %eax, %eax
callq 0xaa373c
movq (%rbx), %rsi
movq %r14, %rdi
callq 0xaaec5c
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| exec_REDO_LOGREC_CLR_END:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
push rax
mov rbx, rdi
call get_MARIA_HA_from_UNDO_record
mov r14, rax
movzx eax, word ptr [rbx+18h]
shl rax, 20h
movzx ecx, byte ptr [rbx+1Ah]
shl rcx, 30h
or rcx, rax
mov r8d, [rbx+1Bh]
movzx r12d, byte ptr [rbx+21h]
movzx eax, word ptr [rbx+10h]
mov rdx, cs:all_active_trans
mov edi, eax
shl edi, 5
cmp qword ptr [rdx+rdi+18h], 0
jz short loc_AA19C9
lea rsi, [rcx+r8]
add rdi, rdx
mov [rdi+8], rsi
shl eax, 5
cmp qword ptr [rdx+rax+10h], 0
jnz short loc_AA19C9
add rax, rdx
add rax, 10h
mov [rax], rsi
loc_AA19C9:
test r14, r14
jz loc_AA1B62
mov r15, [r14]
lea r13, tracef
mov rdi, [r13+0]
lea rax, [r12+r12*8]
lea rdx, log_record_type_descriptor
mov rdx, [rdx+rax*8+28h]
shr rcx, 20h
lea rsi, aClrEndWasAbout; " CLR_END was about %s, undo_lsn (%u,0"...
xor eax, eax
call tprint
mov edx, [rbx+14h]
cmp cs:log_record_buffer_1, rdx
jnb short loc_AA1A34
mov cs:log_record_buffer_1, rdx
mov rsi, cs:log_record_buffer_0
mov ecx, 50h ; 'P'
xor edi, edi
call my_realloc
mov rcx, rax
mov cs:log_record_buffer_0, rax
jmp short loc_AA1A3B
loc_AA1A34:
mov rcx, cs:log_record_buffer_0
loc_AA1A3B:
test rcx, rcx
jz loc_AA1AF6
mov rdi, [rbx]
mov edx, [rbx+14h]
xor esi, esi
xor r8d, r8d
call translog_read_record
cmp eax, [rbx+14h]
jnz loc_AA1AF6
mov rax, [rbx]
cmp rax, [r15+180h]
jl loc_AA1B57
mov rax, cs:log_record_buffer_0
mov [rbp+var_30], rax
mov rdi, [r13+0]
lea rsi, aStateOlderThan; " state older than record\n"
xor eax, eax
call tprint
add r12d, 0FFFFFFEEh; switch 7 cases
cmp r12d, 6
ja short def_AA1AA2; jumptable 0000000000AA1AA2 default case, cases 21,23
lea rax, jpt_AA1AA2
movsxd rcx, ds:(jpt_AA1AA2 - 0F5FEA0h)[rax+r12*4]
add rcx, rax
jmp rcx; switch jump
loc_AA1AA4:
mov rcx, [rbp+var_30]; jumptable 0000000000AA1AA2 cases 22,24
movzx eax, byte ptr [rcx+0Ah]
mov edx, [rcx+0Bh]
movzx ecx, byte ptr [rcx+0Fh]
shl rcx, 20h
or rcx, rdx
mov rdx, 0FFFFFFFFFFFFFFFFh
mov rsi, 0FFFFFFFFFFh
cmp rcx, rsi
jz short loc_AA1ADE
mov edx, [r15+7BCh]
imul rcx, rdx
mov rdx, rcx
loc_AA1ADE:
mov rcx, [r15+118h]
mov [rcx+rax*8], rdx
def_AA1AA2:
or dword ptr [r15+170h], 189h; jumptable 0000000000AA1AA2 default case, cases 21,23
jmp short loc_AA1B57
loc_AA1AF6:
mov rdi, [r13+0]
lea rsi, aFailedToReadRe; "Failed to read record"
xor eax, eax
call eprint
mov eax, 1
jmp short loc_AA1B64
loc_AA1B0F:
inc qword ptr [r15+18h]; jumptable 0000000000AA1AA2 case 19
jmp short loc_AA1B21; jumptable 0000000000AA1AA2 case 20
loc_AA1B15:
dec qword ptr [r15+18h]; jumptable 0000000000AA1AA2 case 18
or byte ptr [r15+170h], 40h
loc_AA1B21:
cmp qword ptr [r15+6A8h], 0; jumptable 0000000000AA1AA2 case 20
jz short loc_AA1B36
mov rax, [rbp+var_30]
mov eax, [rax+0Ah]
add [r15+48h], eax
loc_AA1B36:
or dword ptr [r15+170h], 189h
mov rdi, [r13+0]
mov rdx, [r15+18h]
lea rsi, aRowCountLu; " row count: %lu\n"
xor eax, eax
call tprint
loc_AA1B57:
mov rsi, [rbx]
mov rdi, r14
call _ma_unpin_all_pages
loc_AA1B62:
xor eax, eax
loc_AA1B64:
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| long long exec_REDO_LOGREC_CLR_END(_QWORD *a1)
{
int v2; // r9d
long long *MARIA_HA_from_UNDO_record; // r14
unsigned long long v4; // rcx
long long v5; // r8
long long v6; // r12
int v7; // eax
long long v8; // rdx
long long v9; // rdi
long long v10; // rax
long long v11; // r15
int v12; // r8d
int v13; // r9d
unsigned long long v14; // rdx
long long v15; // rcx
int v16; // ecx
int v17; // r8d
int v18; // r9d
unsigned long long v19; // rcx
long long v20; // rdx
long long v22; // [rsp+0h] [rbp-30h]
MARIA_HA_from_UNDO_record = (long long *)get_MARIA_HA_from_UNDO_record(a1);
v4 = ((unsigned long long)*((unsigned __int16 *)a1 + 12) << 32) | ((unsigned long long)*((unsigned __int8 *)a1 + 26) << 48);
v5 = *(unsigned int *)((char *)a1 + 27);
v6 = *((unsigned __int8 *)a1 + 33);
v7 = *((unsigned __int16 *)a1 + 8);
v8 = all_active_trans;
v9 = (unsigned int)(32 * v7);
if ( *(_QWORD *)(all_active_trans + v9 + 24) )
{
*(_QWORD *)(all_active_trans + v9 + 8) = v4 + v5;
v10 = (unsigned int)(32 * v7);
if ( !*(_QWORD *)(v8 + v10 + 16) )
*(_QWORD *)(v8 + v10 + 16) = v4 + v5;
}
if ( MARIA_HA_from_UNDO_record )
{
v11 = *MARIA_HA_from_UNDO_record;
tprint(
tracef,
(unsigned int)" CLR_END was about %s, undo_lsn (%u,0x%x)\n",
log_record_type_descriptor[9 * v6 + 5],
HIDWORD(v4),
v5,
v2);
v14 = *((unsigned int *)a1 + 5);
if ( log_record_buffer_1 >= v14 )
{
v15 = log_record_buffer_0;
}
else
{
log_record_buffer_1 = *((unsigned int *)a1 + 5);
v15 = my_realloc(0LL, log_record_buffer_0, v14, 80LL);
log_record_buffer_0 = v15;
}
if ( !v15 || (unsigned int)translog_read_record(*a1, 0, *((unsigned int *)a1 + 5), v15, 0LL) != *((_DWORD *)a1 + 5) )
{
eprint(tracef, (unsigned int)"Failed to read record", v14, v15, v12, v13);
return 1LL;
}
if ( *a1 >= *(_QWORD *)(v11 + 384) )
{
v22 = log_record_buffer_0;
tprint(tracef, (unsigned int)" state older than record\n", v14, v15, v12, v13);
switch ( (int)v6 )
{
case 18:
--*(_QWORD *)(v11 + 24);
*(_BYTE *)(v11 + 368) |= 0x40u;
goto LABEL_19;
case 19:
++*(_QWORD *)(v11 + 24);
goto LABEL_19;
case 20:
LABEL_19:
if ( *(_QWORD *)(v11 + 1704) )
*(_DWORD *)(v11 + 72) += *(_DWORD *)(v22 + 10);
*(_DWORD *)(v11 + 368) |= 0x189u;
tprint(tracef, (unsigned int)" row count: %lu\n", *(_QWORD *)(v11 + 24), v16, v17, v18);
break;
case 22:
case 24:
v19 = *(unsigned int *)(v22 + 11) | ((unsigned long long)*(unsigned __int8 *)(v22 + 15) << 32);
v20 = -1LL;
if ( v19 != 0xFFFFFFFFFFLL )
v20 = *(unsigned int *)(v11 + 1980) * v19;
*(_QWORD *)(*(_QWORD *)(v11 + 280) + 8LL * *(unsigned __int8 *)(v22 + 10)) = v20;
goto LABEL_15;
default:
LABEL_15:
*(_DWORD *)(v11 + 368) |= 0x189u;
break;
}
}
ma_unpin_all_pages(MARIA_HA_from_UNDO_record, *a1);
}
return 0LL;
}
| is_null:
PUSH RBP
MOV RBP,RSP
MOV RDI,qword ptr [RDI + 0x68]
MOV RAX,qword ptr [RDI]
POP RBP
JMP qword ptr [RAX + 0x280]
|
/* Item_name_const::is_null() */
void __thiscall Item_name_const::is_null(Item_name_const *this)
{
/* WARNING: Could not recover jumptable at 0x00aa1968. Too many branches */
/* WARNING: Treating indirect jump as call */
(**(code **)(**(long **)(this + 0x68) + 0x280))();
return;
}
| |
51,853 | console::set_display(console::display_t) | monkey531[P]llama/common/console.cpp | void set_display(display_t display) {
if (advanced_display && current_display != display) {
fflush(stdout);
switch(display) {
case reset:
fprintf(out, ANSI_COLOR_RESET);
break;
case prompt:
fprintf(out, ANSI_COLOR_YELLOW);
break;
case user_input:
fprintf(out, ANSI_BOLD ANSI_COLOR_GREEN);
break;
case error:
fprintf(out, ANSI_BOLD ANSI_COLOR_RED);
}
current_display = display;
fflush(out);
}
} | O2 | cpp | console::set_display(console::display_t):
pushq %rbx
cmpb $0x1, 0x753ec(%rip) # 0x103351
jne 0x8dfa9
movl %edi, %ebx
cmpl %edi, 0x75431(%rip) # 0x1033a0
je 0x8dfa9
movq 0x73f90(%rip), %rax # 0x101f08
movq (%rax), %rdi
callq 0x23ae0
cmpl $0x3, %ebx
ja 0x8dfe6
movl %ebx, %eax
leaq 0x2de6e(%rip), %rcx # 0xbbdfc
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq 0x753fa(%rip), %rcx # 0x103398
leaq 0x2de73(%rip), %rdi # 0xbbe18
pushq $0x4
jmp 0x8dfdd
popq %rbx
retq
movq 0x753e6(%rip), %rcx # 0x103398
leaq 0x2de6a(%rip), %rdi # 0xbbe23
jmp 0x8dfc9
movq 0x753d6(%rip), %rcx # 0x103398
leaq 0x2de64(%rip), %rdi # 0xbbe2d
pushq $0x9
jmp 0x8dfdd
movq 0x753c4(%rip), %rcx # 0x103398
leaq 0x2de42(%rip), %rdi # 0xbbe1d
pushq $0x5
popq %rsi
pushq $0x1
popq %rdx
callq 0x242a0
movl %ebx, 0x753b4(%rip) # 0x1033a0
movq 0x753a5(%rip), %rdi # 0x103398
popq %rbx
jmp 0x23ae0
| _ZN7console11set_displayENS_9display_tE:
push rbx
cmp cs:_ZN7consoleL16advanced_displayE, 1; console::advanced_display
jnz short loc_8DFA9
mov ebx, edi
cmp cs:_ZN7consoleL15current_displayE, edi; console::current_display
jz short loc_8DFA9
mov rax, cs:stdout_ptr
mov rdi, [rax]
call _fflush
cmp ebx, 3; switch 4 cases
ja short def_8DF95; jumptable 000000000008DF95 default case
mov eax, ebx
lea rcx, jpt_8DF95
movsxd rax, ds:(jpt_8DF95 - 0BBDFCh)[rcx+rax*4]
add rax, rcx
jmp rax; switch jump
loc_8DF97:
mov rcx, cs:_ZN7consoleL3outE; jumptable 000000000008DF95 case 0
lea rdi, a0m; "\x1B[0m"
push 4
jmp short loc_8DFDD
loc_8DFA9:
pop rbx
retn
loc_8DFAB:
mov rcx, cs:_ZN7consoleL3outE; jumptable 000000000008DF95 case 2
lea rdi, a1m32m; "\x1B[1m\x1B[32m"
jmp short loc_8DFC9
loc_8DFBB:
mov rcx, cs:_ZN7consoleL3outE; jumptable 000000000008DF95 case 3
lea rdi, a1m31m; "\x1B[1m\x1B[31m"
loc_8DFC9:
push 9
jmp short loc_8DFDD
loc_8DFCD:
mov rcx, cs:_ZN7consoleL3outE; jumptable 000000000008DF95 case 1
lea rdi, a33m; "\x1B[33m"
push 5
loc_8DFDD:
pop rsi
push 1
pop rdx
call _fwrite
def_8DF95:
mov cs:_ZN7consoleL15current_displayE, ebx; jumptable 000000000008DF95 default case
mov rdi, cs:_ZN7consoleL3outE; console::out
pop rbx
jmp _fflush
| long long console::set_display(int a1)
{
long long v2; // rcx
const char *v3; // rdi
long long result; // rax
long long v5; // [rsp-8h] [rbp-10h]
if ( console::advanced_display == 1 && console::current_display != a1 )
{
fflush(stdout);
switch ( a1 )
{
case 0:
v2 = console::out;
v3 = "\x1B[0m";
v5 = 4LL;
goto LABEL_10;
case 1:
v2 = console::out;
v3 = "\x1B[33m";
v5 = 5LL;
goto LABEL_10;
case 2:
v2 = console::out;
v3 = "\x1B[1m\x1B[32m";
goto LABEL_8;
case 3:
v2 = console::out;
v3 = "\x1B[1m\x1B[31m";
LABEL_8:
v5 = 9LL;
LABEL_10:
fwrite(v3, v5, 1LL, v2);
break;
default:
break;
}
console::current_display = a1;
return fflush(console::out);
}
return result;
}
| set_display:
PUSH RBX
CMP byte ptr [0x00203351],0x1
JNZ 0x0018dfa9
MOV EBX,EDI
CMP dword ptr [0x002033a0],EDI
JZ 0x0018dfa9
MOV RAX,qword ptr [0x00201f08]
MOV RDI,qword ptr [RAX]
CALL 0x00123ae0
CMP EBX,0x3
JA 0x0018dfe6
MOV EAX,EBX
LEA RCX,[0x1bbdfc]
MOVSXD RAX,dword ptr [RCX + RAX*0x4]
ADD RAX,RCX
switchD:
JMP RAX
caseD_0:
MOV RCX,qword ptr [0x00203398]
LEA RDI,[0x1bbe18]
PUSH 0x4
JMP 0x0018dfdd
LAB_0018dfa9:
POP RBX
RET
caseD_2:
MOV RCX,qword ptr [0x00203398]
LEA RDI,[0x1bbe23]
JMP 0x0018dfc9
caseD_3:
MOV RCX,qword ptr [0x00203398]
LEA RDI,[0x1bbe2d]
LAB_0018dfc9:
PUSH 0x9
JMP 0x0018dfdd
caseD_1:
MOV RCX,qword ptr [0x00203398]
LEA RDI,[0x1bbe1d]
PUSH 0x5
LAB_0018dfdd:
POP RSI
PUSH 0x1
POP RDX
CALL 0x001242a0
default:
MOV dword ptr [0x002033a0],EBX
MOV RDI,qword ptr [0x00203398]
POP RBX
JMP 0x00123ae0
|
/* console::set_display(console::display_t) */
void console::set_display(int param_1)
{
int *__ptr;
size_t sStack_10;
if ((advanced_display != '\x01') || (current_display == param_1)) {
return;
}
fflush(*(FILE **)PTR_stdout_00201f08);
switch(param_1) {
case 0:
__ptr = &DAT_001bbe18;
sStack_10 = 4;
break;
case 1:
__ptr = &DAT_001bbe1d;
sStack_10 = 5;
break;
case 2:
__ptr = &DAT_001bbe23;
goto LAB_0018dfc9;
case 3:
__ptr = &DAT_001bbe2d;
LAB_0018dfc9:
sStack_10 = 9;
break;
default:
goto switchD_0018df95_default;
}
fwrite(__ptr,sStack_10,1,out);
switchD_0018df95_default:
current_display = param_1;
fflush(out);
return;
}
| |
51,854 | parseParameters(int, char**) | EnderturtleOrz[P]CSC3050-2025-Spring-Project-3/src/MainCPU.cpp | bool parseParameters(int argc, char **argv) {
// Read Parameters
for (int i = 1; i < argc; ++i) {
if (argv[i][0] == '-') {
switch (argv[i][1]) {
case 'v':
verbose = 1;
break;
case 's':
isSingleStep = 1;
break;
case 'd':
dumpHistory = 1;
break;
case 'b':
if (i + 1 < argc) {
std::string str = argv[i + 1];
i++;
if (str == "AT") {
strategy = BranchPredictor::Strategy::AT;
} else if (str == "NT") {
strategy = BranchPredictor::Strategy::NT;
} else if (str == "BTFNT") {
strategy = BranchPredictor::Strategy::BTFNT;
} else if (str == "BPB") {
strategy = BranchPredictor::Strategy::BPB;
} else {
return false;
}
} else {
return false;
}
break;
default:
return false;
}
} else {
if (elfFile == nullptr) {
elfFile = argv[i];
} else {
return false;
}
}
}
if (elfFile == nullptr) {
return false;
}
return true;
} | O1 | cpp | parseParameters(int, char**):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
cmpl $0x2, %edi
setge %r15b
jl 0xbcc4
movq %rsi, %rbx
movl %edi, %ebp
movl $0x1, %r13d
leaq 0x8(%rsp), %r14
leaq 0x94d0(%rip), %r12 # 0x1505b
movslq %r13d, %rax
movq (%rbx,%rax,8), %rax
cmpb $0x2d, (%rax)
jne 0xbbba
movzbl 0x1(%rax), %eax
cmpl $0x72, %eax
jg 0xbbd4
cmpl $0x62, %eax
je 0xbbf2
cmpl $0x64, %eax
jne 0xbcba
movb $0x1, 0x10915(%rip) # 0x1c4ca
jmp 0xbc94
cmpq $0x0, 0x108fe(%rip) # 0x1c4c0
jne 0xbcba
movq %rax, 0x108f1(%rip) # 0x1c4c0
jmp 0xbc94
cmpl $0x73, %eax
je 0xbc61
cmpl $0x76, %eax
jne 0xbcba
movb $0x1, 0x108db(%rip) # 0x1c4c8
jmp 0xbc94
incl %r13d
cmpl %ebp, %r13d
jge 0xbcba
movslq %r13d, %rax
movq (%rbx,%rax,8), %rsi
movq %r14, %rdi
leaq 0x7(%rsp), %rdx
callq 0xb0c0
movq %r14, %rdi
movq %r12, %rsi
callq 0xb080
testl %eax, %eax
je 0xbc6a
movq %r14, %rdi
leaq 0x9436(%rip), %rsi # 0x15061
callq 0xb080
testl %eax, %eax
je 0xbc6e
movq %r14, %rdi
leaq 0x9420(%rip), %rsi # 0x1505e
callq 0xb080
testl %eax, %eax
je 0xbc75
movq %r14, %rdi
leaq 0x9638(%rip), %rsi # 0x15289
callq 0xb080
movl $0x3, %ecx
testl %eax, %eax
je 0xbc7a
jmp 0xbca6
movb $0x1, 0x10861(%rip) # 0x1c4c9
jmp 0xbc94
xorl %ecx, %ecx
jmp 0xbc7a
movl $0x1, %ecx
jmp 0xbc7a
movl $0x2, %ecx
movl %ecx, 0x10568(%rip) # 0x1c1e8
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0xbc94
callq 0xb1a0
incl %r13d
cmpl %ebp, %r13d
setl %r15b
jl 0xbb8b
jmp 0xbcc4
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0xbcba
callq 0xb1a0
testb $0x1, %r15b
je 0xbcc4
xorl %eax, %eax
jmp 0xbccf
cmpq $0x0, 0x107f4(%rip) # 0x1c4c0
setne %al
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| _Z15parseParametersiPPc:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 28h
cmp edi, 2
setnl r15b
jl loc_BCC4
mov rbx, rsi
mov ebp, edi
mov r13d, 1
lea r14, [rsp+58h+var_50]
lea r12, aAt; "AT"
loc_BB8B:
movsxd rax, r13d
mov rax, [rbx+rax*8]
cmp byte ptr [rax], 2Dh ; '-'
jnz short loc_BBBA
movzx eax, byte ptr [rax+1]
cmp eax, 72h ; 'r'
jg short loc_BBD4
cmp eax, 62h ; 'b'
jz short loc_BBF2
cmp eax, 64h ; 'd'
jnz loc_BCBA
mov cs:dumpHistory, 1
jmp loc_BC94
loc_BBBA:
cmp cs:elfFile, 0
jnz loc_BCBA
mov cs:elfFile, rax
jmp loc_BC94
loc_BBD4:
cmp eax, 73h ; 's'
jz loc_BC61
cmp eax, 76h ; 'v'
jnz loc_BCBA
mov cs:verbose, 1
jmp loc_BC94
loc_BBF2:
inc r13d
cmp r13d, ebp
jge loc_BCBA
movsxd rax, r13d
mov rsi, [rbx+rax*8]
mov rdi, r14
lea rdx, [rsp+58h+var_51]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2EPKcRKS3_; std::string::basic_string(char const*,std::allocator<char> const&)
mov rdi, r14
mov rsi, r12
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7compareEPKc; std::string::compare(char const*)
test eax, eax
jz short loc_BC6A
mov rdi, r14
lea rsi, aBtfnt+3; "NT"
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7compareEPKc; std::string::compare(char const*)
test eax, eax
jz short loc_BC6E
mov rdi, r14
lea rsi, aBtfnt; "BTFNT"
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7compareEPKc; std::string::compare(char const*)
test eax, eax
jz short loc_BC75
mov rdi, r14
lea rsi, aBParamBranchPe+46h; "BPB"
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7compareEPKc; std::string::compare(char const*)
mov ecx, 3
test eax, eax
jz short loc_BC7A
jmp short loc_BCA6
loc_BC61:
mov cs:isSingleStep, 1
jmp short loc_BC94
loc_BC6A:
xor ecx, ecx
jmp short loc_BC7A
loc_BC6E:
mov ecx, 1
jmp short loc_BC7A
loc_BC75:
mov ecx, 2
loc_BC7A:
mov cs:strategy, ecx
mov rdi, [rsp+58h+var_50]; void *
lea rax, [rsp+58h+var_40]
cmp rdi, rax
jz short loc_BC94
call __ZdlPv; operator delete(void *)
loc_BC94:
inc r13d
cmp r13d, ebp
setl r15b
jl loc_BB8B
jmp short loc_BCC4
loc_BCA6:
mov rdi, [rsp+58h+var_50]; void *
lea rax, [rsp+58h+var_40]
cmp rdi, rax
jz short loc_BCBA
call __ZdlPv; operator delete(void *)
loc_BCBA:
test r15b, 1
jz short loc_BCC4
xor eax, eax
jmp short loc_BCCF
loc_BCC4:
cmp cs:elfFile, 0
setnz al
loc_BCCF:
add rsp, 28h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| bool parseParameters(int a1, char **a2)
{
bool v2; // r15
int v3; // r13d
char *v4; // rax
int v5; // eax
int v6; // eax
int v7; // ecx
char v9; // [rsp+7h] [rbp-51h] BYREF
void *v10[2]; // [rsp+8h] [rbp-50h] BYREF
_BYTE v11[64]; // [rsp+18h] [rbp-40h] BYREF
v2 = a1 >= 2;
if ( a1 < 2 )
return elfFile != 0;
v3 = 1;
while ( 1 )
{
v4 = a2[v3];
if ( *v4 != 45 )
{
if ( elfFile )
goto LABEL_29;
elfFile = (long long)a2[v3];
goto LABEL_25;
}
v5 = (unsigned __int8)v4[1];
if ( v5 <= 114 )
break;
if ( v5 == 115 )
{
isSingleStep = 1;
}
else
{
if ( v5 != 118 )
goto LABEL_29;
verbose = 1;
}
LABEL_25:
v2 = ++v3 < a1;
if ( v3 >= a1 )
return elfFile != 0;
}
if ( v5 != 98 )
{
if ( v5 != 100 )
goto LABEL_29;
dumpHistory = 1;
goto LABEL_25;
}
if ( ++v3 >= a1 )
goto LABEL_29;
std::string::basic_string(v10, a2[v3], &v9);
if ( !(unsigned int)std::string::compare(v10, "AT") )
{
v7 = 0;
goto LABEL_23;
}
if ( !(unsigned int)std::string::compare(v10, "NT") )
{
v7 = 1;
goto LABEL_23;
}
if ( !(unsigned int)std::string::compare(v10, "BTFNT") )
{
v7 = 2;
LABEL_23:
strategy = v7;
if ( v10[0] != v11 )
operator delete(v10[0]);
goto LABEL_25;
}
v6 = std::string::compare(v10, "BPB");
v7 = 3;
if ( !v6 )
goto LABEL_23;
if ( v10[0] != v11 )
operator delete(v10[0]);
LABEL_29:
if ( v2 )
return 0;
return elfFile != 0;
}
| parseParameters:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x28
CMP EDI,0x2
SETGE R15B
JL 0x0010bcc4
MOV RBX,RSI
MOV EBP,EDI
MOV R13D,0x1
LEA R14,[RSP + 0x8]
LEA R12,[0x11505b]
LAB_0010bb8b:
MOVSXD RAX,R13D
MOV RAX,qword ptr [RBX + RAX*0x8]
CMP byte ptr [RAX],0x2d
JNZ 0x0010bbba
MOVZX EAX,byte ptr [RAX + 0x1]
CMP EAX,0x72
JG 0x0010bbd4
CMP EAX,0x62
JZ 0x0010bbf2
CMP EAX,0x64
JNZ 0x0010bcba
MOV byte ptr [0x0011c4ca],0x1
JMP 0x0010bc94
LAB_0010bbba:
CMP qword ptr [0x0011c4c0],0x0
JNZ 0x0010bcba
MOV qword ptr [0x0011c4c0],RAX
JMP 0x0010bc94
LAB_0010bbd4:
CMP EAX,0x73
JZ 0x0010bc61
CMP EAX,0x76
JNZ 0x0010bcba
MOV byte ptr [0x0011c4c8],0x1
JMP 0x0010bc94
LAB_0010bbf2:
INC R13D
CMP R13D,EBP
JGE 0x0010bcba
MOVSXD RAX,R13D
MOV RSI,qword ptr [RBX + RAX*0x8]
MOV RDI,R14
LEA RDX,[RSP + 0x7]
CALL 0x0010b0c0
MOV RDI,R14
MOV RSI,R12
CALL 0x0010b080
TEST EAX,EAX
JZ 0x0010bc6a
MOV RDI,R14
LEA RSI,[0x115061]
CALL 0x0010b080
TEST EAX,EAX
JZ 0x0010bc6e
MOV RDI,R14
LEA RSI,[0x11505e]
CALL 0x0010b080
TEST EAX,EAX
JZ 0x0010bc75
MOV RDI,R14
LEA RSI,[0x115289]
CALL 0x0010b080
MOV ECX,0x3
TEST EAX,EAX
JZ 0x0010bc7a
JMP 0x0010bca6
LAB_0010bc61:
MOV byte ptr [0x0011c4c9],0x1
JMP 0x0010bc94
LAB_0010bc6a:
XOR ECX,ECX
JMP 0x0010bc7a
LAB_0010bc6e:
MOV ECX,0x1
JMP 0x0010bc7a
LAB_0010bc75:
MOV ECX,0x2
LAB_0010bc7a:
MOV dword ptr [0x0011c1e8],ECX
MOV RDI,qword ptr [RSP + 0x8]
LEA RAX,[RSP + 0x18]
CMP RDI,RAX
JZ 0x0010bc94
CALL 0x0010b1a0
LAB_0010bc94:
INC R13D
CMP R13D,EBP
SETL R15B
JL 0x0010bb8b
JMP 0x0010bcc4
LAB_0010bca6:
MOV RDI,qword ptr [RSP + 0x8]
LEA RAX,[RSP + 0x18]
CMP RDI,RAX
JZ 0x0010bcba
CALL 0x0010b1a0
LAB_0010bcba:
TEST R15B,0x1
JZ 0x0010bcc4
XOR EAX,EAX
JMP 0x0010bccf
LAB_0010bcc4:
CMP qword ptr [0x0011c4c0],0x0
SETNZ AL
LAB_0010bccf:
ADD RSP,0x28
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
/* parseParameters(int, char**) */
bool parseParameters(int param_1,char **param_2)
{
byte bVar1;
char *pcVar2;
bool bVar3;
int4 uVar4;
int iVar5;
int iVar6;
allocator local_51;
int1 *local_50 [2];
int1 local_40 [16];
bVar3 = 1 < param_1;
if (1 < param_1) {
iVar6 = 1;
do {
pcVar2 = param_2[iVar6];
if (*pcVar2 == '-') {
bVar1 = pcVar2[1];
pcVar2 = elfFile;
if (bVar1 < 0x73) {
if (bVar1 == 0x62) {
iVar6 = iVar6 + 1;
if (param_1 <= iVar6) goto LAB_0010bcba;
std::__cxx11::string::string((string *)local_50,param_2[iVar6],&local_51);
iVar5 = std::__cxx11::string::compare((char *)local_50);
if (iVar5 == 0) {
uVar4 = 0;
}
else {
iVar5 = std::__cxx11::string::compare((char *)local_50);
if (iVar5 == 0) {
uVar4 = 1;
}
else {
iVar5 = std::__cxx11::string::compare((char *)local_50);
if (iVar5 == 0) {
uVar4 = 2;
}
else {
iVar5 = std::__cxx11::string::compare((char *)local_50);
uVar4 = 3;
if (iVar5 != 0) {
if (local_50[0] != local_40) {
operator_delete(local_50[0]);
}
goto LAB_0010bcba;
}
}
}
}
strategy = uVar4;
pcVar2 = elfFile;
if (local_50[0] != local_40) {
operator_delete(local_50[0]);
pcVar2 = elfFile;
}
}
else {
if (bVar1 != 100) {
LAB_0010bcba:
if (bVar3) {
return false;
}
break;
}
dumpHistory = 1;
}
}
else if (bVar1 == 0x73) {
isSingleStep = 1;
}
else {
if (bVar1 != 0x76) goto LAB_0010bcba;
verbose = 1;
}
}
else if (elfFile != (char *)0x0) goto LAB_0010bcba;
elfFile = pcVar2;
iVar6 = iVar6 + 1;
bVar3 = iVar6 < param_1;
} while (iVar6 < param_1);
}
return elfFile != (char *)0x0;
}
| |
51,855 | parseParameters(int, char**) | EnderturtleOrz[P]CSC3050-2025-Spring-Project-3/src/MainCPU.cpp | bool parseParameters(int argc, char **argv) {
// Read Parameters
for (int i = 1; i < argc; ++i) {
if (argv[i][0] == '-') {
switch (argv[i][1]) {
case 'v':
verbose = 1;
break;
case 's':
isSingleStep = 1;
break;
case 'd':
dumpHistory = 1;
break;
case 'b':
if (i + 1 < argc) {
std::string str = argv[i + 1];
i++;
if (str == "AT") {
strategy = BranchPredictor::Strategy::AT;
} else if (str == "NT") {
strategy = BranchPredictor::Strategy::NT;
} else if (str == "BTFNT") {
strategy = BranchPredictor::Strategy::BTFNT;
} else if (str == "BPB") {
strategy = BranchPredictor::Strategy::BPB;
} else {
return false;
}
} else {
return false;
}
break;
default:
return false;
}
} else {
if (elfFile == nullptr) {
elfFile = argv[i];
} else {
return false;
}
}
}
if (elfFile == nullptr) {
return false;
}
return true;
} | O3 | cpp | parseParameters(int, char**):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
cmpl $0x2, %edi
jl 0xbca3
movq %rsi, %rbx
movl %edi, %ebp
movl $0x1, %r15d
leaq 0x8(%rsp), %r14
leaq 0x94d3(%rip), %r12 # 0x1505b
movslq %r15d, %rax
movq (%rbx,%rax,8), %rax
cmpb $0x2d, (%rax)
jne 0xbbba
movzbl 0x1(%rax), %eax
xorl %r13d, %r13d
cmpl $0x72, %eax
jg 0xbbd4
cmpl $0x62, %eax
je 0xbbf2
cmpl $0x64, %eax
jne 0xbcaf
movb $0x1, 0x10915(%rip) # 0x1c4ca
jmp 0xbc97
cmpq $0x0, 0x108fe(%rip) # 0x1c4c0
jne 0xbcd5
movq %rax, 0x108f1(%rip) # 0x1c4c0
jmp 0xbc97
cmpl $0x73, %eax
je 0xbc65
cmpl $0x76, %eax
jne 0xbcaf
movb $0x1, 0x108db(%rip) # 0x1c4c8
jmp 0xbc97
incl %r15d
xorl %r13d, %r13d
cmpl %ebp, %r15d
jge 0xbcaf
movslq %r15d, %rax
movq (%rbx,%rax,8), %rsi
movq %r14, %rdi
leaq 0x7(%rsp), %rdx
callq 0xb0c0
movq %r14, %rdi
movq %r12, %rsi
callq 0xb080
testl %eax, %eax
je 0xbc7c
movq %r14, %rdi
leaq 0x9433(%rip), %rsi # 0x15061
callq 0xb080
testl %eax, %eax
je 0xbc6e
movq %r14, %rdi
leaq 0x941d(%rip), %rsi # 0x1505e
callq 0xb080
testl %eax, %eax
je 0xbc76
movq %r14, %rdi
leaq 0x9635(%rip), %rsi # 0x15289
callq 0xb080
movl $0x3, %r13d
testl %eax, %eax
je 0xbc7c
jmp 0xbcc1
movb $0x1, 0x1085d(%rip) # 0x1c4c9
jmp 0xbc97
movl $0x1, %r13d
jmp 0xbc7c
movl $0x2, %r13d
movl %r13d, 0x10565(%rip) # 0x1c1e8
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0xbc97
callq 0xb1a0
incl %r15d
cmpl %ebp, %r15d
jl 0xbb88
cmpq $0x0, 0x10815(%rip) # 0x1c4c0
setne %r13b
movl %r13d, %eax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0xbcd5
callq 0xb1a0
xorl %r13d, %r13d
jmp 0xbcaf
| _Z15parseParametersiPPc:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 28h
cmp edi, 2
jl loc_BCA3
mov rbx, rsi
mov ebp, edi
mov r15d, 1
lea r14, [rsp+58h+var_50]
lea r12, aAt; "AT"
loc_BB88:
movsxd rax, r15d
mov rax, [rbx+rax*8]
cmp byte ptr [rax], 2Dh ; '-'
jnz short loc_BBBA
movzx eax, byte ptr [rax+1]
xor r13d, r13d
cmp eax, 72h ; 'r'
jg short loc_BBD4
cmp eax, 62h ; 'b'
jz short loc_BBF2
cmp eax, 64h ; 'd'
jnz loc_BCAF
mov cs:dumpHistory, 1
jmp loc_BC97
loc_BBBA:
cmp cs:elfFile, 0
jnz loc_BCD5
mov cs:elfFile, rax
jmp loc_BC97
loc_BBD4:
cmp eax, 73h ; 's'
jz loc_BC65
cmp eax, 76h ; 'v'
jnz loc_BCAF
mov cs:verbose, 1
jmp loc_BC97
loc_BBF2:
inc r15d
xor r13d, r13d
cmp r15d, ebp
jge loc_BCAF
movsxd rax, r15d
mov rsi, [rbx+rax*8]
mov rdi, r14
lea rdx, [rsp+58h+var_51]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2EPKcRKS3_; std::string::basic_string(char const*,std::allocator<char> const&)
mov rdi, r14
mov rsi, r12
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7compareEPKc; std::string::compare(char const*)
test eax, eax
jz short loc_BC7C
mov rdi, r14
lea rsi, aBtfnt+3; "NT"
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7compareEPKc; std::string::compare(char const*)
test eax, eax
jz short loc_BC6E
mov rdi, r14
lea rsi, aBtfnt; "BTFNT"
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7compareEPKc; std::string::compare(char const*)
test eax, eax
jz short loc_BC76
mov rdi, r14
lea rsi, aBParamBranchPe+46h; "BPB"
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7compareEPKc; std::string::compare(char const*)
mov r13d, 3
test eax, eax
jz short loc_BC7C
jmp short loc_BCC1
loc_BC65:
mov cs:isSingleStep, 1
jmp short loc_BC97
loc_BC6E:
mov r13d, 1
jmp short loc_BC7C
loc_BC76:
mov r13d, 2
loc_BC7C:
mov cs:strategy, r13d
mov rdi, [rsp+58h+var_50]; void *
lea rax, [rsp+58h+var_40]
cmp rdi, rax
jz short loc_BC97
call __ZdlPv; operator delete(void *)
loc_BC97:
inc r15d
cmp r15d, ebp
jl loc_BB88
loc_BCA3:
cmp cs:elfFile, 0
setnz r13b
loc_BCAF:
mov eax, r13d
add rsp, 28h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_BCC1:
mov rdi, [rsp+58h+var_50]; void *
lea rax, [rsp+58h+var_40]
cmp rdi, rax
jz short loc_BCD5
call __ZdlPv; operator delete(void *)
loc_BCD5:
xor r13d, r13d
jmp short loc_BCAF
| long long parseParameters(int a1, char **a2)
{
unsigned int v2; // r13d
int v3; // r15d
char *v4; // rax
int v5; // eax
char v7; // [rsp+7h] [rbp-51h] BYREF
void *v8[2]; // [rsp+8h] [rbp-50h] BYREF
_BYTE v9[64]; // [rsp+18h] [rbp-40h] BYREF
if ( a1 < 2 )
{
LABEL_25:
LOBYTE(v2) = elfFile != 0;
return v2;
}
v3 = 1;
while ( 1 )
{
v4 = a2[v3];
if ( *v4 == 45 )
break;
if ( elfFile )
return 0;
elfFile = (long long)a2[v3];
LABEL_24:
if ( ++v3 >= a1 )
goto LABEL_25;
}
v5 = (unsigned __int8)v4[1];
v2 = 0;
if ( v5 > 114 )
{
if ( v5 == 115 )
{
isSingleStep = 1;
}
else
{
if ( v5 != 118 )
return v2;
verbose = 1;
}
goto LABEL_24;
}
if ( v5 != 98 )
{
if ( v5 != 100 )
return v2;
dumpHistory = 1;
goto LABEL_24;
}
++v3;
v2 = 0;
if ( v3 >= a1 )
return v2;
std::string::basic_string(v8, a2[v3], &v7);
if ( !(unsigned int)std::string::compare(v8, "AT") )
{
LABEL_22:
strategy = v2;
if ( v8[0] != v9 )
operator delete(v8[0]);
goto LABEL_24;
}
if ( !(unsigned int)std::string::compare(v8, "NT") )
{
v2 = 1;
goto LABEL_22;
}
if ( !(unsigned int)std::string::compare(v8, "BTFNT") )
{
v2 = 2;
goto LABEL_22;
}
v2 = 3;
if ( !(unsigned int)std::string::compare(v8, "BPB") )
goto LABEL_22;
if ( v8[0] != v9 )
operator delete(v8[0]);
return 0;
}
| parseParameters:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x28
CMP EDI,0x2
JL 0x0010bca3
MOV RBX,RSI
MOV EBP,EDI
MOV R15D,0x1
LEA R14,[RSP + 0x8]
LEA R12,[0x11505b]
LAB_0010bb88:
MOVSXD RAX,R15D
MOV RAX,qword ptr [RBX + RAX*0x8]
CMP byte ptr [RAX],0x2d
JNZ 0x0010bbba
MOVZX EAX,byte ptr [RAX + 0x1]
XOR R13D,R13D
CMP EAX,0x72
JG 0x0010bbd4
CMP EAX,0x62
JZ 0x0010bbf2
CMP EAX,0x64
JNZ 0x0010bcaf
MOV byte ptr [0x0011c4ca],0x1
JMP 0x0010bc97
LAB_0010bbba:
CMP qword ptr [0x0011c4c0],0x0
JNZ 0x0010bcd5
MOV qword ptr [0x0011c4c0],RAX
JMP 0x0010bc97
LAB_0010bbd4:
CMP EAX,0x73
JZ 0x0010bc65
CMP EAX,0x76
JNZ 0x0010bcaf
MOV byte ptr [0x0011c4c8],0x1
JMP 0x0010bc97
LAB_0010bbf2:
INC R15D
XOR R13D,R13D
CMP R15D,EBP
JGE 0x0010bcaf
MOVSXD RAX,R15D
MOV RSI,qword ptr [RBX + RAX*0x8]
MOV RDI,R14
LEA RDX,[RSP + 0x7]
CALL 0x0010b0c0
MOV RDI,R14
MOV RSI,R12
CALL 0x0010b080
TEST EAX,EAX
JZ 0x0010bc7c
MOV RDI,R14
LEA RSI,[0x115061]
CALL 0x0010b080
TEST EAX,EAX
JZ 0x0010bc6e
MOV RDI,R14
LEA RSI,[0x11505e]
CALL 0x0010b080
TEST EAX,EAX
JZ 0x0010bc76
MOV RDI,R14
LEA RSI,[0x115289]
CALL 0x0010b080
MOV R13D,0x3
TEST EAX,EAX
JZ 0x0010bc7c
JMP 0x0010bcc1
LAB_0010bc65:
MOV byte ptr [0x0011c4c9],0x1
JMP 0x0010bc97
LAB_0010bc6e:
MOV R13D,0x1
JMP 0x0010bc7c
LAB_0010bc76:
MOV R13D,0x2
LAB_0010bc7c:
MOV dword ptr [0x0011c1e8],R13D
MOV RDI,qword ptr [RSP + 0x8]
LEA RAX,[RSP + 0x18]
CMP RDI,RAX
JZ 0x0010bc97
CALL 0x0010b1a0
LAB_0010bc97:
INC R15D
CMP R15D,EBP
JL 0x0010bb88
LAB_0010bca3:
CMP qword ptr [0x0011c4c0],0x0
SETNZ R13B
LAB_0010bcaf:
MOV EAX,R13D
ADD RSP,0x28
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_0010bcc1:
MOV RDI,qword ptr [RSP + 0x8]
LEA RAX,[RSP + 0x18]
CMP RDI,RAX
JZ 0x0010bcd5
CALL 0x0010b1a0
LAB_0010bcd5:
XOR R13D,R13D
JMP 0x0010bcaf
|
/* parseParameters(int, char**) */
ulong parseParameters(int param_1,char **param_2)
{
byte bVar1;
char *pcVar2;
int iVar3;
ulong unaff_R13;
ulong uVar4;
int iVar5;
allocator local_51;
int1 *local_50 [2];
int1 local_40 [16];
if (1 < param_1) {
iVar5 = 1;
do {
pcVar2 = param_2[iVar5];
if (*pcVar2 == '-') {
bVar1 = pcVar2[1];
unaff_R13 = 0;
uVar4 = 0;
pcVar2 = elfFile;
if (bVar1 < 0x73) {
if (bVar1 == 0x62) {
iVar5 = iVar5 + 1;
unaff_R13 = 0;
uVar4 = unaff_R13;
if (param_1 <= iVar5) goto LAB_0010bcaf;
std::__cxx11::string::string((string *)local_50,param_2[iVar5],&local_51);
iVar3 = std::__cxx11::string::compare((char *)local_50);
if (iVar3 != 0) {
iVar3 = std::__cxx11::string::compare((char *)local_50);
if (iVar3 == 0) {
unaff_R13 = 1;
}
else {
iVar3 = std::__cxx11::string::compare((char *)local_50);
if (iVar3 == 0) {
unaff_R13 = 2;
}
else {
iVar3 = std::__cxx11::string::compare((char *)local_50);
unaff_R13 = 3;
if (iVar3 != 0) {
if (local_50[0] != local_40) {
operator_delete(local_50[0]);
}
goto LAB_0010bcd5;
}
}
}
}
strategy = (int4)unaff_R13;
pcVar2 = elfFile;
if (local_50[0] != local_40) {
operator_delete(local_50[0]);
pcVar2 = elfFile;
}
}
else {
uVar4 = unaff_R13;
if (bVar1 != 100) goto LAB_0010bcaf;
dumpHistory = 1;
}
}
else if (bVar1 == 0x73) {
isSingleStep = 1;
}
else {
if (bVar1 != 0x76) goto LAB_0010bcaf;
verbose = 1;
}
}
else if (elfFile != (char *)0x0) {
LAB_0010bcd5:
uVar4 = 0;
goto LAB_0010bcaf;
}
elfFile = pcVar2;
iVar5 = iVar5 + 1;
} while (iVar5 < param_1);
}
uVar4 = CONCAT71((int7)(unaff_R13 >> 8),elfFile != (char *)0x0);
LAB_0010bcaf:
return uVar4 & 0xffffffff;
}
| |
51,856 | testing::internal::OsStackTraceGetter::UponLeavingGTest() | giladroyz[P]FindPeaks/build_O1/_deps/googletest-src/googletest/src/gtest.cc | GTEST_LOCK_EXCLUDED_(mutex_) {
#ifdef GTEST_HAS_ABSL
void* caller_frame = nullptr;
if (absl::GetStackTrace(&caller_frame, 1, 3) <= 0) {
caller_frame = nullptr;
}
MutexLock lock(&mutex_);
caller_frame_ = caller_frame;
#endif // GTEST_HAS_ABSL
} | O1 | cpp | testing::internal::OsStackTraceGetter::UponLeavingGTest():
retq
nop
| _ZN7testing8internal18OsStackTraceGetter16UponLeavingGTestEv:
retn
| void testing::internal::OsStackTraceGetter::UponLeavingGTest(testing::internal::OsStackTraceGetter *this)
{
;
}
| UponLeavingGTest:
RET
|
/* testing::internal::OsStackTraceGetter::UponLeavingGTest() */
void testing::internal::OsStackTraceGetter::UponLeavingGTest(void)
{
return;
}
| |
51,857 | is_reserved_name(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&) | monkey531[P]llama/common/json-schema-to-grammar.cpp | static bool is_reserved_name(const std::string & name) {
static std::unordered_set<std::string> RESERVED_NAMES;
if (RESERVED_NAMES.empty()) {
RESERVED_NAMES.insert("root");
for (const auto &p : PRIMITIVE_RULES) RESERVED_NAMES.insert(p.first);
for (const auto &p : STRING_FORMAT_RULES) RESERVED_NAMES.insert(p.first);
}
return RESERVED_NAMES.find(name) != RESERVED_NAMES.end();
} | O0 | cpp | is_reserved_name(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&):
subq $0xd8, %rsp
movq %rdi, 0xd0(%rsp)
cmpb $0x0, 0x19f5ea(%rip) # 0x24af30
jne 0xab98b
leaq 0x19f5e1(%rip), %rdi # 0x24af30
callq 0x524f0
cmpl $0x0, %eax
je 0xab98b
leaq 0x19f598(%rip), %rdi # 0x24aef8
callq 0xb0d60
leaq 0x54f4(%rip), %rdi # 0xb0e60
leaq 0x19f585(%rip), %rsi # 0x24aef8
leaq 0x19ef2e(%rip), %rdx # 0x24a8a8
callq 0x52c70
leaq 0x19f5aa(%rip), %rdi # 0x24af30
callq 0x52870
leaq 0x19f566(%rip), %rdi # 0x24aef8
callq 0xbf890
testb $0x1, %al
jne 0xab9a0
jmp 0xabb5c
leaq 0xaf(%rsp), %rdi
movq %rdi, 0x10(%rsp)
callq 0x52dc0
movq 0x10(%rsp), %rdx
leaq 0x11e228(%rip), %rsi # 0x1c9be6
leaq 0xb0(%rsp), %rdi
callq 0x60730
jmp 0xab9cd
leaq 0x19f524(%rip), %rdi # 0x24aef8
leaq 0xb0(%rsp), %rsi
callq 0xbc4e0
movb %dl, 0x7(%rsp)
movq %rax, 0x8(%rsp)
jmp 0xab9ec
movb 0x7(%rsp), %al
movq 0x8(%rsp), %rcx
movq %rcx, 0x88(%rsp)
movb %al, 0x90(%rsp)
leaq 0xb0(%rsp), %rdi
callq 0x53140
leaq 0xaf(%rsp), %rdi
callq 0x53120
leaq 0x19f35b(%rip), %rax # 0x24ad80
movq %rax, 0x80(%rsp)
leaq 0x19f34c(%rip), %rdi # 0x24ad80
callq 0xbf8b0
movq %rax, 0x78(%rsp)
leaq 0x19f33b(%rip), %rdi # 0x24ad80
callq 0xbeb50
movq %rax, 0x70(%rsp)
leaq 0x78(%rsp), %rdi
leaq 0x70(%rsp), %rsi
callq 0xbeb00
testb $0x1, %al
jne 0xaba64
jmp 0xabae2
leaq 0x78(%rsp), %rdi
callq 0xbf8e0
movq %rax, 0x68(%rsp)
movq 0x68(%rsp), %rsi
leaq 0x19f479(%rip), %rdi # 0x24aef8
callq 0xbf900
movq %rax, 0x58(%rsp)
movb %dl, 0x60(%rsp)
leaq 0x78(%rsp), %rdi
callq 0xbf950
jmp 0xaba4f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xa0(%rsp)
movl %eax, 0x9c(%rsp)
jmp 0xabad0
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xa0(%rsp)
movl %eax, 0x9c(%rsp)
leaq 0xb0(%rsp), %rdi
callq 0x53140
leaq 0xaf(%rsp), %rdi
callq 0x53120
jmp 0xabb9f
leaq 0x19f2cf(%rip), %rax # 0x24adb8
movq %rax, 0x50(%rsp)
leaq 0x19f2c3(%rip), %rdi # 0x24adb8
callq 0xbf8b0
movq %rax, 0x48(%rsp)
leaq 0x19f2b2(%rip), %rdi # 0x24adb8
callq 0xbeb50
movq %rax, 0x40(%rsp)
leaq 0x48(%rsp), %rdi
leaq 0x40(%rsp), %rsi
callq 0xbeb00
testb $0x1, %al
jne 0xabb25
jmp 0xabb5a
leaq 0x48(%rsp), %rdi
callq 0xbf8e0
movq %rax, 0x38(%rsp)
movq 0x38(%rsp), %rsi
leaq 0x19f3b8(%rip), %rdi # 0x24aef8
callq 0xbf900
movq %rax, 0x28(%rsp)
movb %dl, 0x30(%rsp)
leaq 0x48(%rsp), %rdi
callq 0xbf950
jmp 0xabb10
jmp 0xabb5c
movq 0xd0(%rsp), %rsi
leaq 0x19f38d(%rip), %rdi # 0x24aef8
callq 0xbf9a0
movq %rax, 0x20(%rsp)
leaq 0x19f37c(%rip), %rdi # 0x24aef8
callq 0xbf9d0
movq %rax, 0x18(%rsp)
leaq 0x20(%rsp), %rdi
leaq 0x18(%rsp), %rsi
callq 0xbf980
andb $0x1, %al
addq $0xd8, %rsp
retq
movq 0xa0(%rsp), %rdi
callq 0x52990
nopl (%rax)
| _ZL16is_reserved_nameRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE:
sub rsp, 0D8h
mov [rsp+0D8h+var_8], rdi
cmp cs:_ZGVZL16is_reserved_nameRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEE14RESERVED_NAMESB5cxx11, 0; `guard variable for'is_reserved_name(std::string const&)::RESERVED_NAMES
jnz short loc_AB98B
lea rdi, _ZGVZL16is_reserved_nameRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEE14RESERVED_NAMESB5cxx11; __guard *
call ___cxa_guard_acquire
cmp eax, 0
jz short loc_AB98B
lea rdi, _ZZL16is_reserved_nameRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEE14RESERVED_NAMESB5cxx11; is_reserved_name(std::string const&)::RESERVED_NAMES
call _ZNSt13unordered_setINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4hashIS5_ESt8equal_toIS5_ESaIS5_EEC2Ev; std::unordered_set<std::string>::unordered_set(void)
lea rdi, _ZNSt13unordered_setINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4hashIS5_ESt8equal_toIS5_ESaIS5_EED2Ev; lpfunc
lea rsi, _ZZL16is_reserved_nameRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEE14RESERVED_NAMESB5cxx11; obj
lea rdx, __dso_handle; lpdso_handle
call ___cxa_atexit
lea rdi, _ZGVZL16is_reserved_nameRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEE14RESERVED_NAMESB5cxx11; __guard *
call ___cxa_guard_release
loc_AB98B:
lea rdi, _ZZL16is_reserved_nameRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEE14RESERVED_NAMESB5cxx11; is_reserved_name(std::string const&)::RESERVED_NAMES
call _ZNKSt13unordered_setINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4hashIS5_ESt8equal_toIS5_ESaIS5_EE5emptyEv; std::unordered_set<std::string>::empty(void)
test al, 1
jnz short loc_AB9A0
jmp loc_ABB5C
loc_AB9A0:
lea rdi, [rsp+0D8h+var_29]
mov [rsp+0D8h+var_C8], rdi
call __ZNSaIcEC1Ev; std::allocator<char>::allocator(void)
mov rdx, [rsp+0D8h+var_C8]
lea rsi, aRoot; "root"
lea rdi, [rsp+0D8h+var_28]
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&)
jmp short $+2
loc_AB9CD:
lea rdi, _ZZL16is_reserved_nameRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEE14RESERVED_NAMESB5cxx11; is_reserved_name(std::string const&)::RESERVED_NAMES
lea rsi, [rsp+0D8h+var_28]
call _ZNSt13unordered_setINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4hashIS5_ESt8equal_toIS5_ESaIS5_EE6insertEOS5_; std::unordered_set<std::string>::insert(std::string&&)
mov [rsp+0D8h+var_D1], dl
mov [rsp+0D8h+var_D0], rax
jmp short $+2
loc_AB9EC:
mov al, [rsp+0D8h+var_D1]
mov rcx, [rsp+0D8h+var_D0]
mov [rsp+0D8h+var_50], rcx
mov [rsp+0D8h+var_48], al
lea rdi, [rsp+0D8h+var_28]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
lea rdi, [rsp+0D8h+var_29]
call __ZNSaIcED1Ev; std::allocator<char>::~allocator()
lea rax, _Z15PRIMITIVE_RULESB5cxx11; PRIMITIVE_RULES
mov [rsp+0D8h+var_58], rax
lea rdi, _Z15PRIMITIVE_RULESB5cxx11; PRIMITIVE_RULES
call _ZNSt13unordered_mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE11BuiltinRuleSt4hashIS5_ESt8equal_toIS5_ESaISt4pairIKS5_S6_EEE5beginEv; std::unordered_map<std::string,BuiltinRule>::begin(void)
mov [rsp+0D8h+var_60], rax
lea rdi, _Z15PRIMITIVE_RULESB5cxx11; PRIMITIVE_RULES
call _ZNSt13unordered_mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE11BuiltinRuleSt4hashIS5_ESt8equal_toIS5_ESaISt4pairIKS5_S6_EEE3endEv; std::unordered_map<std::string,BuiltinRule>::end(void)
mov [rsp+0D8h+var_68], rax
loc_ABA4F:
lea rdi, [rsp+0D8h+var_60]
lea rsi, [rsp+0D8h+var_68]
call _ZNSt8__detailneERKNS_19_Node_iterator_baseISt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE11BuiltinRuleELb1EEESD_; std::__detail::operator!=(std::__detail::_Node_iterator_base<std::pair<std::string const,BuiltinRule>,true> const&,std::__detail::_Node_iterator_base<std::pair<std::string const,BuiltinRule>,true> const&)
test al, 1
jnz short loc_ABA64
jmp short loc_ABAE2
loc_ABA64:
lea rdi, [rsp+0D8h+var_60]
call _ZNKSt8__detail14_Node_iteratorISt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE11BuiltinRuleELb0ELb1EEdeEv; std::__detail::_Node_iterator<std::pair<std::string const,BuiltinRule>,false,true>::operator*(void)
mov [rsp+0D8h+var_70], rax
mov rsi, [rsp+0D8h+var_70]
lea rdi, _ZZL16is_reserved_nameRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEE14RESERVED_NAMESB5cxx11; is_reserved_name(std::string const&)::RESERVED_NAMES
call _ZNSt13unordered_setINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4hashIS5_ESt8equal_toIS5_ESaIS5_EE6insertERKS5_; std::unordered_set<std::string>::insert(std::string const&)
mov [rsp+0D8h+var_80], rax
mov [rsp+0D8h+var_78], dl
lea rdi, [rsp+0D8h+var_60]
call _ZNSt8__detail14_Node_iteratorISt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE11BuiltinRuleELb0ELb1EEppEv; std::__detail::_Node_iterator<std::pair<std::string const,BuiltinRule>,false,true>::operator++(void)
jmp short loc_ABA4F
mov rcx, rax
mov eax, edx
mov [rsp+arg_98], rcx
mov [rsp+arg_94], eax
jmp short loc_ABAD0
mov rcx, rax
mov eax, edx
mov [rsp+arg_98], rcx
mov [rsp+arg_94], eax
lea rdi, [rsp+arg_A8]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
loc_ABAD0:
lea rdi, [rsp+arg_A7]
call __ZNSaIcED1Ev; std::allocator<char>::~allocator()
jmp loc_ABB9F
loc_ABAE2:
lea rax, _Z19STRING_FORMAT_RULESB5cxx11; STRING_FORMAT_RULES
mov [rsp+0D8h+var_88], rax
lea rdi, _Z19STRING_FORMAT_RULESB5cxx11; STRING_FORMAT_RULES
call _ZNSt13unordered_mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE11BuiltinRuleSt4hashIS5_ESt8equal_toIS5_ESaISt4pairIKS5_S6_EEE5beginEv; std::unordered_map<std::string,BuiltinRule>::begin(void)
mov [rsp+0D8h+var_90], rax
lea rdi, _Z19STRING_FORMAT_RULESB5cxx11; STRING_FORMAT_RULES
call _ZNSt13unordered_mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE11BuiltinRuleSt4hashIS5_ESt8equal_toIS5_ESaISt4pairIKS5_S6_EEE3endEv; std::unordered_map<std::string,BuiltinRule>::end(void)
mov [rsp+0D8h+var_98], rax
loc_ABB10:
lea rdi, [rsp+0D8h+var_90]
lea rsi, [rsp+0D8h+var_98]
call _ZNSt8__detailneERKNS_19_Node_iterator_baseISt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE11BuiltinRuleELb1EEESD_; std::__detail::operator!=(std::__detail::_Node_iterator_base<std::pair<std::string const,BuiltinRule>,true> const&,std::__detail::_Node_iterator_base<std::pair<std::string const,BuiltinRule>,true> const&)
test al, 1
jnz short loc_ABB25
jmp short loc_ABB5A
loc_ABB25:
lea rdi, [rsp+0D8h+var_90]
call _ZNKSt8__detail14_Node_iteratorISt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE11BuiltinRuleELb0ELb1EEdeEv; std::__detail::_Node_iterator<std::pair<std::string const,BuiltinRule>,false,true>::operator*(void)
mov [rsp+0D8h+var_A0], rax
mov rsi, [rsp+0D8h+var_A0]
lea rdi, _ZZL16is_reserved_nameRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEE14RESERVED_NAMESB5cxx11; is_reserved_name(std::string const&)::RESERVED_NAMES
call _ZNSt13unordered_setINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4hashIS5_ESt8equal_toIS5_ESaIS5_EE6insertERKS5_; std::unordered_set<std::string>::insert(std::string const&)
mov [rsp+0D8h+var_B0], rax
mov [rsp+0D8h+var_A8], dl
lea rdi, [rsp+0D8h+var_90]
call _ZNSt8__detail14_Node_iteratorISt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE11BuiltinRuleELb0ELb1EEppEv; std::__detail::_Node_iterator<std::pair<std::string const,BuiltinRule>,false,true>::operator++(void)
jmp short loc_ABB10
loc_ABB5A:
jmp short $+2
loc_ABB5C:
mov rsi, [rsp+0D8h+var_8]
lea rdi, _ZZL16is_reserved_nameRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEE14RESERVED_NAMESB5cxx11; is_reserved_name(std::string const&)::RESERVED_NAMES
call _ZNSt13unordered_setINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4hashIS5_ESt8equal_toIS5_ESaIS5_EE4findERKS5_; std::unordered_set<std::string>::find(std::string const&)
mov [rsp+0D8h+var_B8], rax
lea rdi, _ZZL16is_reserved_nameRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEE14RESERVED_NAMESB5cxx11; is_reserved_name(std::string const&)::RESERVED_NAMES
call _ZNSt13unordered_setINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4hashIS5_ESt8equal_toIS5_ESaIS5_EE3endEv; std::unordered_set<std::string>::end(void)
mov [rsp+0D8h+var_C0], rax
lea rdi, [rsp+0D8h+var_B8]
lea rsi, [rsp+0D8h+var_C0]
call _ZNSt8__detailneERKNS_19_Node_iterator_baseINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEELb1EEES9_; std::__detail::operator!=(std::__detail::_Node_iterator_base<std::string,true> const&,std::__detail::_Node_iterator_base<std::string,true> const&)
and al, 1
add rsp, 0D8h
retn
loc_ABB9F:
mov rdi, [rsp+arg_98]
call __Unwind_Resume
| char is_reserved_name(long long a1)
{
char v1; // dl
char v2; // dl
char v3; // dl
long long v5; // [rsp+18h] [rbp-C0h] BYREF
_QWORD v6[2]; // [rsp+20h] [rbp-B8h] BYREF
char v7; // [rsp+30h] [rbp-A8h]
long long v8; // [rsp+38h] [rbp-A0h]
long long v9; // [rsp+40h] [rbp-98h] BYREF
_QWORD v10[3]; // [rsp+48h] [rbp-90h] BYREF
char v11; // [rsp+60h] [rbp-78h]
long long v12; // [rsp+68h] [rbp-70h]
long long v13; // [rsp+70h] [rbp-68h] BYREF
_QWORD v14[3]; // [rsp+78h] [rbp-60h] BYREF
char v15; // [rsp+90h] [rbp-48h]
char v16; // [rsp+AFh] [rbp-29h] BYREF
_BYTE v17[32]; // [rsp+B0h] [rbp-28h] BYREF
long long v18; // [rsp+D0h] [rbp-8h]
v18 = a1;
if ( !(_BYTE)`guard variable for'is_reserved_name(std::string const&)::RESERVED_NAMES[abi:cxx11]
&& __cxa_guard_acquire(&`guard variable for'is_reserved_name(std::string const&)::RESERVED_NAMES[abi:cxx11]) )
{
std::unordered_set<std::string>::unordered_set(&is_reserved_name(std::string const&)::RESERVED_NAMES[abi:cxx11]);
__cxa_atexit(
std::unordered_set<std::string>::~unordered_set,
&is_reserved_name(std::string const&)::RESERVED_NAMES[abi:cxx11],
&_dso_handle);
__cxa_guard_release(&`guard variable for'is_reserved_name(std::string const&)::RESERVED_NAMES[abi:cxx11]);
}
if ( (std::unordered_set<std::string>::empty(&is_reserved_name(std::string const&)::RESERVED_NAMES[abi:cxx11]) & 1) != 0 )
{
std::allocator<char>::allocator();
std::string::basic_string<std::allocator<char>>((long long)v17, (long long)"root", (long long)&v16);
v14[2] = std::unordered_set<std::string>::insert(
&is_reserved_name(std::string const&)::RESERVED_NAMES[abi:cxx11],
v17);
v15 = v1;
std::string::~string(v17);
std::allocator<char>::~allocator(&v16);
v14[1] = &PRIMITIVE_RULES[abi:cxx11];
v14[0] = std::unordered_map<std::string,BuiltinRule>::begin(&PRIMITIVE_RULES[abi:cxx11]);
v13 = std::unordered_map<std::string,BuiltinRule>::end(&PRIMITIVE_RULES[abi:cxx11]);
while ( (std::__detail::operator!=(v14, &v13) & 1) != 0 )
{
v12 = std::__detail::_Node_iterator<std::pair<std::string const,BuiltinRule>,false,true>::operator*(v14);
v10[2] = std::unordered_set<std::string>::insert(
&is_reserved_name(std::string const&)::RESERVED_NAMES[abi:cxx11],
v12);
v11 = v2;
std::__detail::_Node_iterator<std::pair<std::string const,BuiltinRule>,false,true>::operator++(v14);
}
v10[1] = &STRING_FORMAT_RULES[abi:cxx11];
v10[0] = std::unordered_map<std::string,BuiltinRule>::begin(&STRING_FORMAT_RULES[abi:cxx11]);
v9 = std::unordered_map<std::string,BuiltinRule>::end(&STRING_FORMAT_RULES[abi:cxx11]);
while ( (std::__detail::operator!=(v10, &v9) & 1) != 0 )
{
v8 = std::__detail::_Node_iterator<std::pair<std::string const,BuiltinRule>,false,true>::operator*(v10);
v6[1] = std::unordered_set<std::string>::insert(
&is_reserved_name(std::string const&)::RESERVED_NAMES[abi:cxx11],
v8);
v7 = v3;
std::__detail::_Node_iterator<std::pair<std::string const,BuiltinRule>,false,true>::operator++(v10);
}
}
v6[0] = std::unordered_set<std::string>::find(&is_reserved_name(std::string const&)::RESERVED_NAMES[abi:cxx11], v18);
v5 = std::unordered_set<std::string>::end(&is_reserved_name(std::string const&)::RESERVED_NAMES[abi:cxx11]);
return std::__detail::operator!=(v6, &v5) & 1;
}
| is_reserved_name:
SUB RSP,0xd8
MOV qword ptr [RSP + 0xd0],RDI
CMP byte ptr [0x0034af30],0x0
JNZ 0x001ab98b
LEA RDI,[0x34af30]
CALL 0x001524f0
CMP EAX,0x0
JZ 0x001ab98b
LEA RDI,[0x34aef8]
CALL 0x001b0d60
LEA RDI,[0x1b0e60]
LEA RSI,[0x34aef8]
LEA RDX,[0x34a8a8]
CALL 0x00152c70
LEA RDI,[0x34af30]
CALL 0x00152870
LAB_001ab98b:
LEA RDI,[0x34aef8]
CALL 0x001bf890
TEST AL,0x1
JNZ 0x001ab9a0
JMP 0x001abb5c
LAB_001ab9a0:
LEA RDI,[RSP + 0xaf]
MOV qword ptr [RSP + 0x10],RDI
CALL 0x00152dc0
MOV RDX,qword ptr [RSP + 0x10]
LAB_001ab9b7:
LEA RSI,[0x2c9be6]
LEA RDI,[RSP + 0xb0]
CALL 0x00160730
JMP 0x001ab9cd
LAB_001ab9cd:
LEA RDI,[0x34aef8]
LEA RSI,[RSP + 0xb0]
CALL 0x001bc4e0
LAB_001ab9e1:
MOV byte ptr [RSP + 0x7],DL
MOV qword ptr [RSP + 0x8],RAX
JMP 0x001ab9ec
LAB_001ab9ec:
MOV AL,byte ptr [RSP + 0x7]
MOV RCX,qword ptr [RSP + 0x8]
MOV qword ptr [RSP + 0x88],RCX
MOV byte ptr [RSP + 0x90],AL
LEA RDI,[RSP + 0xb0]
CALL 0x00153140
LEA RDI,[RSP + 0xaf]
CALL 0x00153120
LEA RAX,[0x34ad80]
MOV qword ptr [RSP + 0x80],RAX
LEA RDI,[0x34ad80]
CALL 0x001bf8b0
MOV qword ptr [RSP + 0x78],RAX
LEA RDI,[0x34ad80]
CALL 0x001beb50
MOV qword ptr [RSP + 0x70],RAX
LAB_001aba4f:
LEA RDI,[RSP + 0x78]
LEA RSI,[RSP + 0x70]
CALL 0x001beb00
TEST AL,0x1
JNZ 0x001aba64
JMP 0x001abae2
LAB_001aba64:
LEA RDI,[RSP + 0x78]
CALL 0x001bf8e0
MOV qword ptr [RSP + 0x68],RAX
MOV RSI,qword ptr [RSP + 0x68]
LEA RDI,[0x34aef8]
CALL 0x001bf900
MOV qword ptr [RSP + 0x58],RAX
MOV byte ptr [RSP + 0x60],DL
LEA RDI,[RSP + 0x78]
CALL 0x001bf950
JMP 0x001aba4f
LAB_001abae2:
LEA RAX,[0x34adb8]
MOV qword ptr [RSP + 0x50],RAX
LEA RDI,[0x34adb8]
CALL 0x001bf8b0
MOV qword ptr [RSP + 0x48],RAX
LEA RDI,[0x34adb8]
CALL 0x001beb50
MOV qword ptr [RSP + 0x40],RAX
LAB_001abb10:
LEA RDI,[RSP + 0x48]
LEA RSI,[RSP + 0x40]
CALL 0x001beb00
TEST AL,0x1
JNZ 0x001abb25
JMP 0x001abb5a
LAB_001abb25:
LEA RDI,[RSP + 0x48]
CALL 0x001bf8e0
MOV qword ptr [RSP + 0x38],RAX
MOV RSI,qword ptr [RSP + 0x38]
LEA RDI,[0x34aef8]
CALL 0x001bf900
MOV qword ptr [RSP + 0x28],RAX
MOV byte ptr [RSP + 0x30],DL
LEA RDI,[RSP + 0x48]
CALL 0x001bf950
JMP 0x001abb10
LAB_001abb5a:
JMP 0x001abb5c
LAB_001abb5c:
MOV RSI,qword ptr [RSP + 0xd0]
LEA RDI,[0x34aef8]
CALL 0x001bf9a0
MOV qword ptr [RSP + 0x20],RAX
LEA RDI,[0x34aef8]
CALL 0x001bf9d0
MOV qword ptr [RSP + 0x18],RAX
LEA RDI,[RSP + 0x20]
LEA RSI,[RSP + 0x18]
CALL 0x001bf980
AND AL,0x1
ADD RSP,0xd8
RET
|
/* is_reserved_name(std::__cxx11::string const&) */
ulong is_reserved_name(string *param_1)
{
int iVar1;
ulong uVar2;
int1 extraout_DL;
int1 extraout_DL_00;
int1 extraout_DL_01;
int8 local_c0;
int8 local_b8;
int8 local_b0;
int1 local_a8;
string *local_a0;
int8 local_98;
int8 local_90;
int1 *local_88;
int8 local_80;
int1 local_78;
string *local_70;
int8 local_68;
int8 local_60;
int1 *local_58;
int8 local_50;
int1 local_48;
allocator local_29;
string local_28 [32];
string *local_8;
local_8 = param_1;
if ((is_reserved_name(std::__cxx11::string_const&)::RESERVED_NAMES_abi_cxx11_ == '\0') &&
(iVar1 = __cxa_guard_acquire(&is_reserved_name(std::__cxx11::string_const&)::
RESERVED_NAMES_abi_cxx11_), iVar1 != 0)) {
std::
unordered_set<std::__cxx11::string,std::hash<std::__cxx11::string>,std::equal_to<std::__cxx11::string>,std::allocator<std::__cxx11::string>>
::unordered_set((unordered_set<std::__cxx11::string,std::hash<std::__cxx11::string>,std::equal_to<std::__cxx11::string>,std::allocator<std::__cxx11::string>>
*)is_reserved_name(std::__cxx11::string_const&)::RESERVED_NAMES_abi_cxx11_);
__cxa_atexit(std::
unordered_set<std::__cxx11::string,std::hash<std::__cxx11::string>,std::equal_to<std::__cxx11::string>,std::allocator<std::__cxx11::string>>
::~unordered_set,
is_reserved_name(std::__cxx11::string_const&)::RESERVED_NAMES_abi_cxx11_,
&__dso_handle);
__cxa_guard_release(&is_reserved_name(std::__cxx11::string_const&)::RESERVED_NAMES_abi_cxx11_);
}
uVar2 = std::
unordered_set<std::__cxx11::string,std::hash<std::__cxx11::string>,std::equal_to<std::__cxx11::string>,std::allocator<std::__cxx11::string>>
::empty((unordered_set<std::__cxx11::string,std::hash<std::__cxx11::string>,std::equal_to<std::__cxx11::string>,std::allocator<std::__cxx11::string>>
*)is_reserved_name(std::__cxx11::string_const&)::RESERVED_NAMES_abi_cxx11_);
if ((uVar2 & 1) != 0) {
std::allocator<char>::allocator();
/* try { // try from 001ab9b7 to 001ab9ca has its CatchHandler @ 001aba99 */
std::__cxx11::string::string<std::allocator<char>>(local_28,"root",&local_29);
/* try { // try from 001ab9cd to 001ab9e0 has its CatchHandler @ 001abaaf */
local_50 = std::
unordered_set<std::__cxx11::string,std::hash<std::__cxx11::string>,std::equal_to<std::__cxx11::string>,std::allocator<std::__cxx11::string>>
::insert((unordered_set<std::__cxx11::string,std::hash<std::__cxx11::string>,std::equal_to<std::__cxx11::string>,std::allocator<std::__cxx11::string>>
*)is_reserved_name(std::__cxx11::string_const&)::RESERVED_NAMES_abi_cxx11_,
local_28);
local_48 = extraout_DL;
std::__cxx11::string::~string(local_28);
std::allocator<char>::~allocator((allocator<char> *)&local_29);
local_58 = PRIMITIVE_RULES_abi_cxx11_;
local_60 = std::
unordered_map<std::__cxx11::string,BuiltinRule,std::hash<std::__cxx11::string>,std::equal_to<std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string_const,BuiltinRule>>>
::begin((unordered_map<std::__cxx11::string,BuiltinRule,std::hash<std::__cxx11::string>,std::equal_to<std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string_const,BuiltinRule>>>
*)PRIMITIVE_RULES_abi_cxx11_);
local_68 = std::
unordered_map<std::__cxx11::string,BuiltinRule,std::hash<std::__cxx11::string>,std::equal_to<std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string_const,BuiltinRule>>>
::end();
while (uVar2 = std::__detail::operator!=
((_Node_iterator_base *)&local_60,(_Node_iterator_base *)&local_68),
(uVar2 & 1) != 0) {
local_70 = (string *)
std::__detail::
_Node_iterator<std::pair<std::__cxx11::string_const,BuiltinRule>,false,true>::
operator*((_Node_iterator<std::pair<std::__cxx11::string_const,BuiltinRule>,false,true>
*)&local_60);
local_80 = std::
unordered_set<std::__cxx11::string,std::hash<std::__cxx11::string>,std::equal_to<std::__cxx11::string>,std::allocator<std::__cxx11::string>>
::insert((unordered_set<std::__cxx11::string,std::hash<std::__cxx11::string>,std::equal_to<std::__cxx11::string>,std::allocator<std::__cxx11::string>>
*)is_reserved_name(std::__cxx11::string_const&)::
RESERVED_NAMES_abi_cxx11_,local_70);
local_78 = extraout_DL_00;
std::__detail::_Node_iterator<std::pair<std::__cxx11::string_const,BuiltinRule>,false,true>::
operator++((_Node_iterator<std::pair<std::__cxx11::string_const,BuiltinRule>,false,true> *)
&local_60);
}
local_88 = STRING_FORMAT_RULES_abi_cxx11_;
local_90 = std::
unordered_map<std::__cxx11::string,BuiltinRule,std::hash<std::__cxx11::string>,std::equal_to<std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string_const,BuiltinRule>>>
::begin((unordered_map<std::__cxx11::string,BuiltinRule,std::hash<std::__cxx11::string>,std::equal_to<std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string_const,BuiltinRule>>>
*)STRING_FORMAT_RULES_abi_cxx11_);
local_98 = std::
unordered_map<std::__cxx11::string,BuiltinRule,std::hash<std::__cxx11::string>,std::equal_to<std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string_const,BuiltinRule>>>
::end();
while (uVar2 = std::__detail::operator!=
((_Node_iterator_base *)&local_90,(_Node_iterator_base *)&local_98),
(uVar2 & 1) != 0) {
local_a0 = (string *)
std::__detail::
_Node_iterator<std::pair<std::__cxx11::string_const,BuiltinRule>,false,true>::
operator*((_Node_iterator<std::pair<std::__cxx11::string_const,BuiltinRule>,false,true>
*)&local_90);
local_b0 = std::
unordered_set<std::__cxx11::string,std::hash<std::__cxx11::string>,std::equal_to<std::__cxx11::string>,std::allocator<std::__cxx11::string>>
::insert((unordered_set<std::__cxx11::string,std::hash<std::__cxx11::string>,std::equal_to<std::__cxx11::string>,std::allocator<std::__cxx11::string>>
*)is_reserved_name(std::__cxx11::string_const&)::
RESERVED_NAMES_abi_cxx11_,local_a0);
local_a8 = extraout_DL_01;
std::__detail::_Node_iterator<std::pair<std::__cxx11::string_const,BuiltinRule>,false,true>::
operator++((_Node_iterator<std::pair<std::__cxx11::string_const,BuiltinRule>,false,true> *)
&local_90);
}
}
local_b8 = std::
unordered_set<std::__cxx11::string,std::hash<std::__cxx11::string>,std::equal_to<std::__cxx11::string>,std::allocator<std::__cxx11::string>>
::find((unordered_set<std::__cxx11::string,std::hash<std::__cxx11::string>,std::equal_to<std::__cxx11::string>,std::allocator<std::__cxx11::string>>
*)is_reserved_name(std::__cxx11::string_const&)::RESERVED_NAMES_abi_cxx11_,
local_8);
local_c0 = std::
unordered_set<std::__cxx11::string,std::hash<std::__cxx11::string>,std::equal_to<std::__cxx11::string>,std::allocator<std::__cxx11::string>>
::end();
uVar2 = std::__detail::operator!=
((_Node_iterator_base *)&local_b8,(_Node_iterator_base *)&local_c0);
return uVar2 & 0xffffffffffffff01;
}
| |
51,858 | ttt::game::FieldBitmap::operator=(ttt::game::FieldBitmap&&) | vsennov[P]tictactoe-course/src/core/state.cpp | FieldBitmap &FieldBitmap::operator=(FieldBitmap &&other) {
if (this == &other)
return *this;
m_cols = other.m_cols;
m_rows = other.m_rows;
delete[] m_bitmap;
m_bitmap = other.m_bitmap;
other.m_cols = other.m_rows = 0;
other.m_bitmap = 0;
return *this;
} | O0 | cpp | ttt::game::FieldBitmap::operator=(ttt::game::FieldBitmap&&):
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x20(%rbp)
cmpq -0x18(%rbp), %rax
jne 0x3e98
movq -0x20(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x3ef9
movq -0x20(%rbp), %rax
movq -0x18(%rbp), %rcx
movl 0xc(%rcx), %ecx
movl %ecx, 0xc(%rax)
movq -0x18(%rbp), %rcx
movl 0x8(%rcx), %ecx
movl %ecx, 0x8(%rax)
movq (%rax), %rax
movq %rax, -0x28(%rbp)
cmpq $0x0, %rax
je 0x3ec6
movq -0x28(%rbp), %rdi
callq 0x2110
movq -0x20(%rbp), %rax
movq -0x18(%rbp), %rcx
movq (%rcx), %rcx
movq %rcx, (%rax)
movq -0x18(%rbp), %rcx
movl $0x0, 0x8(%rcx)
movq -0x18(%rbp), %rcx
movl $0x0, 0xc(%rcx)
movq -0x18(%rbp), %rcx
movq $0x0, (%rcx)
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
| _ZN3ttt4game11FieldBitmapaSEOS1_:
push rbp
mov rbp, rsp
sub rsp, 30h
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov rax, [rbp+var_10]
mov [rbp+var_20], rax
cmp rax, [rbp+var_18]
jnz short loc_3E98
mov rax, [rbp+var_20]
mov [rbp+var_8], rax
jmp short loc_3EF9
loc_3E98:
mov rax, [rbp+var_20]
mov rcx, [rbp+var_18]
mov ecx, [rcx+0Ch]
mov [rax+0Ch], ecx
mov rcx, [rbp+var_18]
mov ecx, [rcx+8]
mov [rax+8], ecx
mov rax, [rax]
mov [rbp+var_28], rax
cmp rax, 0
jz short loc_3EC6
mov rdi, [rbp+var_28]; void *
call __ZdaPv; operator delete[](void *)
loc_3EC6:
mov rax, [rbp+var_20]
mov rcx, [rbp+var_18]
mov rcx, [rcx]
mov [rax], rcx
mov rcx, [rbp+var_18]
mov dword ptr [rcx+8], 0
mov rcx, [rbp+var_18]
mov dword ptr [rcx+0Ch], 0
mov rcx, [rbp+var_18]
mov qword ptr [rcx], 0
mov [rbp+var_8], rax
loc_3EF9:
mov rax, [rbp+var_8]
add rsp, 30h
pop rbp
retn
| long long ttt::game::FieldBitmap::operator=(long long a1, long long a2)
{
if ( a1 == a2 )
return a1;
*(_DWORD *)(a1 + 12) = *(_DWORD *)(a2 + 12);
*(_DWORD *)(a1 + 8) = *(_DWORD *)(a2 + 8);
if ( *(_QWORD *)a1 )
operator delete[](*(void **)a1);
*(_QWORD *)a1 = *(_QWORD *)a2;
*(_DWORD *)(a2 + 8) = 0;
*(_DWORD *)(a2 + 12) = 0;
*(_QWORD *)a2 = 0LL;
return a1;
}
| operator=:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x30
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x18],RSI
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RBP + -0x20],RAX
CMP RAX,qword ptr [RBP + -0x18]
JNZ 0x00103e98
MOV RAX,qword ptr [RBP + -0x20]
MOV qword ptr [RBP + -0x8],RAX
JMP 0x00103ef9
LAB_00103e98:
MOV RAX,qword ptr [RBP + -0x20]
MOV RCX,qword ptr [RBP + -0x18]
MOV ECX,dword ptr [RCX + 0xc]
MOV dword ptr [RAX + 0xc],ECX
MOV RCX,qword ptr [RBP + -0x18]
MOV ECX,dword ptr [RCX + 0x8]
MOV dword ptr [RAX + 0x8],ECX
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x28],RAX
CMP RAX,0x0
JZ 0x00103ec6
MOV RDI,qword ptr [RBP + -0x28]
CALL 0x00102110
LAB_00103ec6:
MOV RAX,qword ptr [RBP + -0x20]
MOV RCX,qword ptr [RBP + -0x18]
MOV RCX,qword ptr [RCX]
MOV qword ptr [RAX],RCX
MOV RCX,qword ptr [RBP + -0x18]
MOV dword ptr [RCX + 0x8],0x0
MOV RCX,qword ptr [RBP + -0x18]
MOV dword ptr [RCX + 0xc],0x0
MOV RCX,qword ptr [RBP + -0x18]
MOV qword ptr [RCX],0x0
MOV qword ptr [RBP + -0x8],RAX
LAB_00103ef9:
MOV RAX,qword ptr [RBP + -0x8]
ADD RSP,0x30
POP RBP
RET
|
/* ttt::game::FieldBitmap::TEMPNAMEPLACEHOLDERVALUE(ttt::game::FieldBitmap&&) */
FieldBitmap * __thiscall ttt::game::FieldBitmap::operator=(FieldBitmap *this,FieldBitmap *param_1)
{
if (this != param_1) {
*(int4 *)(this + 0xc) = *(int4 *)(param_1 + 0xc);
*(int4 *)(this + 8) = *(int4 *)(param_1 + 8);
if (*(void **)this != (void *)0x0) {
operator_delete__(*(void **)this);
}
*(int8 *)this = *(int8 *)param_1;
*(int4 *)(param_1 + 8) = 0;
*(int4 *)(param_1 + 0xc) = 0;
*(int8 *)param_1 = 0;
}
return this;
}
| |
51,859 | ttt::game::FieldBitmap::operator=(ttt::game::FieldBitmap&&) | vsennov[P]tictactoe-course/src/core/state.cpp | FieldBitmap &FieldBitmap::operator=(FieldBitmap &&other) {
if (this == &other)
return *this;
m_cols = other.m_cols;
m_rows = other.m_rows;
delete[] m_bitmap;
m_bitmap = other.m_bitmap;
other.m_cols = other.m_rows = 0;
other.m_bitmap = 0;
return *this;
} | O3 | cpp | ttt::game::FieldBitmap::operator=(ttt::game::FieldBitmap&&):
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
cmpq %rsi, %rdi
je 0x333f
movq %rsi, %r14
movq 0x8(%rsi), %rax
movq %rax, 0x8(%rbx)
movq (%rbx), %rdi
testq %rdi, %rdi
je 0x3332
callq 0x2110
movq (%r14), %rax
movq %rax, (%rbx)
xorps %xmm0, %xmm0
movups %xmm0, (%r14)
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
| _ZN3ttt4game11FieldBitmapaSEOS1_:
push r14
push rbx
push rax
mov rbx, rdi
cmp rdi, rsi
jz short loc_333F
mov r14, rsi
mov rax, [rsi+8]
mov [rbx+8], rax
mov rdi, [rbx]; void *
test rdi, rdi
jz short loc_3332
call __ZdaPv; operator delete[](void *)
loc_3332:
mov rax, [r14]
mov [rbx], rax
xorps xmm0, xmm0
movups xmmword ptr [r14], xmm0
loc_333F:
mov rax, rbx
add rsp, 8
pop rbx
pop r14
retn
| void ** ttt::game::FieldBitmap::operator=(void **a1, void **a2)
{
void *v3; // rdi
if ( a1 != a2 )
{
a1[1] = a2[1];
v3 = *a1;
if ( *a1 )
operator delete[](v3);
*a1 = *a2;
*(_OWORD *)a2 = 0LL;
}
return a1;
}
| operator=:
PUSH R14
PUSH RBX
PUSH RAX
MOV RBX,RDI
CMP RDI,RSI
JZ 0x0010333f
MOV R14,RSI
MOV RAX,qword ptr [RSI + 0x8]
MOV qword ptr [RBX + 0x8],RAX
MOV RDI,qword ptr [RBX]
TEST RDI,RDI
JZ 0x00103332
CALL 0x00102110
LAB_00103332:
MOV RAX,qword ptr [R14]
MOV qword ptr [RBX],RAX
XORPS XMM0,XMM0
MOVUPS xmmword ptr [R14],XMM0
LAB_0010333f:
MOV RAX,RBX
ADD RSP,0x8
POP RBX
POP R14
RET
|
/* ttt::game::FieldBitmap::TEMPNAMEPLACEHOLDERVALUE(ttt::game::FieldBitmap&&) */
FieldBitmap * __thiscall ttt::game::FieldBitmap::operator=(FieldBitmap *this,FieldBitmap *param_1)
{
if (this != param_1) {
*(int8 *)(this + 8) = *(int8 *)(param_1 + 8);
if (*(void **)this != (void *)0x0) {
operator_delete__(*(void **)this);
}
*(int8 *)this = *(int8 *)param_1;
*(int8 *)param_1 = 0;
*(int8 *)(param_1 + 8) = 0;
}
return this;
}
| |
51,860 | ggml_graph_reset | 7CodeWizard[P]stablediffusion/ggml/src/ggml.c | void ggml_graph_reset(struct ggml_cgraph * cgraph) {
GGML_ASSERT(cgraph->grads != NULL);
for (int i = 0; i < cgraph->n_nodes; i++) {
struct ggml_tensor * grad = cgraph->grads[i];
if (grad) {
ggml_set_zero(grad);
}
}
} | O2 | c | ggml_graph_reset:
pushq %r14
pushq %rbx
pushq %rax
cmpq $0x0, 0x18(%rdi)
je 0x71dd2
movq %rdi, %rbx
xorl %r14d, %r14d
movslq 0x4(%rbx), %rax
cmpq %rax, %r14
jge 0x71dca
movq 0x18(%rbx), %rax
movq (%rax,%r14,8), %rdi
testq %rdi, %rdi
je 0x71dc5
callq 0x68a75
incq %r14
jmp 0x71daa
addq $0x8, %rsp
popq %rbx
popq %r14
retq
movq 0x6416f(%rip), %rax # 0xd5f48
movq (%rax), %rdi
callq 0xa6f0
movq 0x641c0(%rip), %rax # 0xd5fa8
movq (%rax), %rdi
leaq 0x2842c(%rip), %rsi # 0x9a21e
leaq 0x2fa85(%rip), %rdx # 0xa187e
leaq 0x304f2(%rip), %r8 # 0xa22f2
movl $0x3ec3, %ecx # imm = 0x3EC3
xorl %eax, %eax
callq 0xa8b0
callq 0x67550
callq 0xa300
| ggml_graph_reset:
push r14
push rbx
push rax
cmp qword ptr [rdi+18h], 0
jz short loc_71DD2
mov rbx, rdi
xor r14d, r14d
loc_71DAA:
movsxd rax, dword ptr [rbx+4]
cmp r14, rax
jge short loc_71DCA
mov rax, [rbx+18h]
mov rdi, [rax+r14*8]
test rdi, rdi
jz short loc_71DC5
call ggml_set_zero
loc_71DC5:
inc r14
jmp short loc_71DAA
loc_71DCA:
add rsp, 8
pop rbx
pop r14
retn
loc_71DD2:
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, aCgraphGradsNul; "cgraph->grads != NULL"
mov ecx, 3EC3h
xor eax, eax
call _fprintf
call ggml_print_backtrace
call _abort
| long long ggml_graph_reset(long long a1)
{
long long i; // r14
long long result; // rax
long long v4; // rdi
long long v5; // rdi
if ( !*(_QWORD *)(a1 + 24) )
{
fflush(stdout);
v5 = stderr;
fprintf(
stderr,
"GGML_ASSERT: %s:%d: %s\n",
"/workspace/llm4binary/github/2025_star3/7CodeWizard[P]stablediffusion/ggml/src/ggml.c",
16067,
"cgraph->grads != NULL");
ggml_print_backtrace();
abort(v5);
}
for ( i = 0LL; ; ++i )
{
result = *(int *)(a1 + 4);
if ( i >= result )
break;
v4 = *(_QWORD *)(*(_QWORD *)(a1 + 24) + 8 * i);
if ( v4 )
ggml_set_zero(v4);
}
return result;
}
| ggml_graph_reset:
PUSH R14
PUSH RBX
PUSH RAX
CMP qword ptr [RDI + 0x18],0x0
JZ 0x00171dd2
MOV RBX,RDI
XOR R14D,R14D
LAB_00171daa:
MOVSXD RAX,dword ptr [RBX + 0x4]
CMP R14,RAX
JGE 0x00171dca
MOV RAX,qword ptr [RBX + 0x18]
MOV RDI,qword ptr [RAX + R14*0x8]
TEST RDI,RDI
JZ 0x00171dc5
CALL 0x00168a75
LAB_00171dc5:
INC R14
JMP 0x00171daa
LAB_00171dca:
ADD RSP,0x8
POP RBX
POP R14
RET
LAB_00171dd2:
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,[0x1a22f2]
MOV ECX,0x3ec3
XOR EAX,EAX
CALL 0x0010a8b0
CALL 0x00167550
CALL 0x0010a300
|
void ggml_graph_reset(long param_1)
{
long lVar1;
if (*(long *)(param_1 + 0x18) != 0) {
for (lVar1 = 0; lVar1 < *(int *)(param_1 + 4); lVar1 = lVar1 + 1) {
if (*(long *)(*(long *)(param_1 + 0x18) + lVar1 * 8) != 0) {
ggml_set_zero();
}
}
return;
}
fflush(*(FILE **)PTR_stdout_001d5f48);
fprintf(*(FILE **)PTR_stderr_001d5fa8,"GGML_ASSERT: %s:%d: %s\n",
"/workspace/llm4binary/github/2025_star3/7CodeWizard[P]stablediffusion/ggml/src/ggml.c",
0x3ec3,"cgraph->grads != NULL");
ggml_print_backtrace();
/* WARNING: Subroutine does not return */
abort();
}
| |
51,861 | ggml_graph_reset | 7CodeWizard[P]stablediffusion/ggml/src/ggml.c | void ggml_graph_reset(struct ggml_cgraph * cgraph) {
GGML_ASSERT(cgraph->grads != NULL);
for (int i = 0; i < cgraph->n_nodes; i++) {
struct ggml_tensor * grad = cgraph->grads[i];
if (grad) {
ggml_set_zero(grad);
}
}
} | O3 | c | ggml_graph_reset:
pushq %r15
pushq %r14
pushq %rbx
cmpq $0x0, 0x18(%rdi)
je 0x96986
movq %rdi, %rbx
movl 0x4(%rdi), %eax
testl %eax, %eax
jle 0x96980
xorl %r15d, %r15d
movq 0x18(%rbx), %rcx
movq (%rcx,%r15,8), %rdi
testq %rdi, %rdi
je 0x96975
movq 0x118(%rdi), %r14
callq 0x8cdf7
movq %r14, %rdi
xorl %esi, %esi
movq %rax, %rdx
callq 0xa2f0
movl 0x4(%rbx), %eax
incq %r15
movslq %eax, %rcx
cmpq %rcx, %r15
jl 0x9694c
popq %rbx
popq %r14
popq %r15
retq
callq 0xfeb9
| ggml_graph_reset:
push r15
push r14
push rbx
cmp qword ptr [rdi+18h], 0
jz short loc_96986
mov rbx, rdi
mov eax, [rdi+4]
test eax, eax
jle short loc_96980
xor r15d, r15d
loc_9694C:
mov rcx, [rbx+18h]
mov rdi, [rcx+r15*8]
test rdi, rdi
jz short loc_96975
mov r14, [rdi+118h]
call ggml_nbytes
mov rdi, r14
xor esi, esi
mov rdx, rax
call _memset
mov eax, [rbx+4]
loc_96975:
inc r15
movsxd rcx, eax
cmp r15, rcx
jl short loc_9694C
loc_96980:
pop rbx
pop r14
pop r15
retn
loc_96986:
call ggml_graph_reset_cold_1
| long long ggml_graph_reset(long long a1, double a2, __m128 a3)
{
long long result; // rax
long long v5; // r15
long long v6; // rdi
long long v7; // r14
long long v8; // rax
if ( !*(_QWORD *)(a1 + 24) )
ggml_graph_reset_cold_1();
result = *(unsigned int *)(a1 + 4);
if ( (int)result > 0 )
{
v5 = 0LL;
do
{
v6 = *(_QWORD *)(*(_QWORD *)(a1 + 24) + 8 * v5);
if ( v6 )
{
v7 = *(_QWORD *)(v6 + 280);
v8 = ggml_nbytes((unsigned int *)v6, a2, a3);
a2 = memset(v7, 0LL, v8);
result = *(unsigned int *)(a1 + 4);
}
++v5;
}
while ( v5 < (int)result );
}
return result;
}
| |||
51,862 | ConfigNumber<int>::ConfigNumber(int) | untodesu[P]voxelius/core/config.hh | inline ConfigNumber<T>::ConfigNumber(T default_value)
{
m_value = default_value;
m_min_value = std::numeric_limits<T>::min();
m_max_value = std::numeric_limits<T>::max();
m_string = std::to_string(default_value);
} | O2 | cpp | ConfigNumber<int>::ConfigNumber(int):
pushq %r14
pushq %rbx
subq $0x28, %rsp
leaq 0xe91fe(%rip), %rax # 0x106878
movq %rax, (%rdi)
leaq 0x18(%rdi), %rbx
leaq 0x28(%rdi), %rax
movq %rax, 0x18(%rdi)
andq $0x0, 0x20(%rdi)
movb $0x0, 0x28(%rdi)
movl %esi, 0x8(%rdi)
movabsq $0x7fffffff80000000, %rax # imm = 0x7FFFFFFF80000000
movq %rax, 0xc(%rdi)
leaq 0x8(%rsp), %rdi
callq 0x1ac3d
leaq 0x8(%rsp), %r14
movq %rbx, %rdi
movq %r14, %rsi
callq 0x178b0
movq %r14, %rdi
callq 0x17ec8
addq $0x28, %rsp
popq %rbx
popq %r14
retq
movq %rax, %r14
movq %rbx, %rdi
callq 0x17ec8
movq %r14, %rdi
callq 0x17cd0
| _ZN12ConfigNumberIiEC2Ei:
push r14
push rbx
sub rsp, 28h
lea rax, off_106878
mov [rdi], rax
lea rbx, [rdi+18h]
lea rax, [rdi+28h]
mov [rdi+18h], rax
and qword ptr [rdi+20h], 0
mov byte ptr [rdi+28h], 0
mov [rdi+8], esi
mov rax, 7FFFFFFF80000000h
mov [rdi+0Ch], rax
lea rdi, [rsp+38h+var_30]; this
call _ZNSt7__cxx119to_stringEi; std::to_string(int)
lea r14, [rsp+38h+var_30]
mov rdi, rbx
mov rsi, r14
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEOS4_; std::string::operator=(std::string&&)
mov rdi, r14; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
add rsp, 28h
pop rbx
pop r14
retn
mov r14, rax
mov rdi, rbx; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
mov rdi, r14
call __Unwind_Resume
| void ConfigNumber<int>::ConfigNumber(long long a1, int a2)
{
_BYTE v2[48]; // [rsp+8h] [rbp-30h] BYREF
*(_QWORD *)a1 = &off_106878;
*(_QWORD *)(a1 + 24) = a1 + 40;
*(_QWORD *)(a1 + 32) = 0LL;
*(_BYTE *)(a1 + 40) = 0;
*(_DWORD *)(a1 + 8) = a2;
*(_QWORD *)(a1 + 12) = 0x7FFFFFFF80000000LL;
std::to_string((std::__cxx11 *)v2, a2);
std::string::operator=(a1 + 24, v2);
std::string::~string(v2);
}
| ConfigNumber:
PUSH R14
PUSH RBX
SUB RSP,0x28
LEA RAX,[0x206878]
MOV qword ptr [RDI],RAX
LEA RBX,[RDI + 0x18]
LEA RAX,[RDI + 0x28]
MOV qword ptr [RDI + 0x18],RAX
AND qword ptr [RDI + 0x20],0x0
MOV byte ptr [RDI + 0x28],0x0
MOV dword ptr [RDI + 0x8],ESI
MOV RAX,0x7fffffff80000000
MOV qword ptr [RDI + 0xc],RAX
LAB_0011d6a3:
LEA RDI,[RSP + 0x8]
CALL 0x0011ac3d
LAB_0011d6ad:
LEA R14,[RSP + 0x8]
MOV RDI,RBX
MOV RSI,R14
CALL 0x001178b0
MOV RDI,R14
CALL 0x00117ec8
ADD RSP,0x28
POP RBX
POP R14
RET
|
/* ConfigNumber<int>::ConfigNumber(int) */
void __thiscall ConfigNumber<int>::ConfigNumber(ConfigNumber<int> *this,int param_1)
{
__cxx11 local_30 [32];
*(int ***)this = &PTR__ConfigNumber_00206878;
*(ConfigNumber<int> **)(this + 0x18) = this + 0x28;
*(int8 *)(this + 0x20) = 0;
this[0x28] = (ConfigNumber<int>)0x0;
*(int *)(this + 8) = param_1;
*(int8 *)(this + 0xc) = 0x7fffffff80000000;
/* try { // try from 0011d6a3 to 0011d6ac has its CatchHandler @ 0011d6cd */
std::__cxx11::to_string(local_30,param_1);
std::__cxx11::string::operator=((string *)(this + 0x18),(string *)local_30);
std::__cxx11::string::~string((string *)local_30);
return;
}
| |
51,863 | estimate_hints(PFS_global_param*) | eloqsql/storage/perfschema/pfs_autosize.cc | PFS_sizing_data *estimate_hints(PFS_global_param *param)
{
if ((param->m_hints.m_max_connections <= MAX_CONNECTIONS_DEFAULT) &&
(param->m_hints.m_table_definition_cache <= TABLE_DEF_CACHE_DEFAULT) &&
(param->m_hints.m_table_open_cache <= TABLE_OPEN_CACHE_DEFAULT))
{
/* The my.cnf used is either unchanged, or lower than factory defaults. */
return & small_data;
}
if ((param->m_hints.m_max_connections <= MAX_CONNECTIONS_DEFAULT * 2) &&
(param->m_hints.m_table_definition_cache <= TABLE_DEF_CACHE_DEFAULT * 2) &&
(param->m_hints.m_table_open_cache <= TABLE_OPEN_CACHE_DEFAULT * 2))
{
/* Some defaults have been increased, to "moderate" values. */
return & medium_data;
}
/* Looks like a server in production. */
return & large_data;
} | O0 | cpp | estimate_hints(PFS_global_param*):
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rax
cmpq $0x97, 0x170(%rax)
jg 0x54368
movq -0x10(%rbp), %rax
cmpq $0x190, 0x160(%rax) # imm = 0x190
jg 0x54368
movq -0x10(%rbp), %rax
cmpq $0x7d0, 0x168(%rax) # imm = 0x7D0
jg 0x54368
leaq 0x1c25ae(%rip), %rax # 0x216910
movq %rax, -0x8(%rbp)
jmp 0x543b3
movq -0x10(%rbp), %rax
cmpq $0x12e, 0x170(%rax) # imm = 0x12E
jg 0x543a8
movq -0x10(%rbp), %rax
cmpq $0x320, 0x160(%rax) # imm = 0x320
jg 0x543a8
movq -0x10(%rbp), %rax
cmpq $0xfa0, 0x168(%rax) # imm = 0xFA0
jg 0x543a8
leaq 0x1c25be(%rip), %rax # 0x216960
movq %rax, -0x8(%rbp)
jmp 0x543b3
leaq 0x1c2601(%rip), %rax # 0x2169b0
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
popq %rbp
retq
nopl (%rax)
| _Z14estimate_hintsP16PFS_global_param:
push rbp
mov rbp, rsp
mov [rbp+var_10], rdi
mov rax, [rbp+var_10]
cmp qword ptr [rax+170h], 97h
jg short loc_54368
mov rax, [rbp+var_10]
cmp qword ptr [rax+160h], 190h
jg short loc_54368
mov rax, [rbp+var_10]
cmp qword ptr [rax+168h], 7D0h
jg short loc_54368
lea rax, small_data
mov [rbp+var_8], rax
jmp short loc_543B3
loc_54368:
mov rax, [rbp+var_10]
cmp qword ptr [rax+170h], 12Eh
jg short loc_543A8
mov rax, [rbp+var_10]
cmp qword ptr [rax+160h], 320h
jg short loc_543A8
mov rax, [rbp+var_10]
cmp qword ptr [rax+168h], 0FA0h
jg short loc_543A8
lea rax, medium_data
mov [rbp+var_8], rax
jmp short loc_543B3
loc_543A8:
lea rax, large_data
mov [rbp+var_8], rax
loc_543B3:
mov rax, [rbp+var_8]
pop rbp
retn
| void * estimate_hints(long long *a1)
{
if ( a1[46] <= 151 && a1[44] <= 400 && a1[45] <= 2000 )
return &small_data;
if ( a1[46] > 302 || a1[44] > 800 || a1[45] > 4000 )
return &large_data;
return &medium_data;
}
| estimate_hints:
PUSH RBP
MOV RBP,RSP
MOV qword ptr [RBP + -0x10],RDI
MOV RAX,qword ptr [RBP + -0x10]
CMP qword ptr [RAX + 0x170],0x97
JG 0x00154368
MOV RAX,qword ptr [RBP + -0x10]
CMP qword ptr [RAX + 0x160],0x190
JG 0x00154368
MOV RAX,qword ptr [RBP + -0x10]
CMP qword ptr [RAX + 0x168],0x7d0
JG 0x00154368
LEA RAX,[0x316910]
MOV qword ptr [RBP + -0x8],RAX
JMP 0x001543b3
LAB_00154368:
MOV RAX,qword ptr [RBP + -0x10]
CMP qword ptr [RAX + 0x170],0x12e
JG 0x001543a8
MOV RAX,qword ptr [RBP + -0x10]
CMP qword ptr [RAX + 0x160],0x320
JG 0x001543a8
MOV RAX,qword ptr [RBP + -0x10]
CMP qword ptr [RAX + 0x168],0xfa0
JG 0x001543a8
LEA RAX,[0x316960]
MOV qword ptr [RBP + -0x8],RAX
JMP 0x001543b3
LAB_001543a8:
LEA RAX,[0x3169b0]
MOV qword ptr [RBP + -0x8],RAX
LAB_001543b3:
MOV RAX,qword ptr [RBP + -0x8]
POP RBP
RET
|
/* estimate_hints(PFS_global_param*) */
int1 * estimate_hints(PFS_global_param *param_1)
{
int1 *local_10;
if (((*(long *)(param_1 + 0x170) < 0x98) && (*(long *)(param_1 + 0x160) < 0x191)) &&
(*(long *)(param_1 + 0x168) < 0x7d1)) {
local_10 = small_data;
}
else if (((*(long *)(param_1 + 0x170) < 0x12f) && (*(long *)(param_1 + 0x160) < 0x321)) &&
(*(long *)(param_1 + 0x168) < 0xfa1)) {
local_10 = medium_data;
}
else {
local_10 = large_data;
}
return local_10;
}
| |
51,864 | thr_lock_init | eloqsql/mysys/thr_lock.c | void thr_lock_init(THR_LOCK *lock)
{
DBUG_ENTER("thr_lock_init");
bzero((char*) lock,sizeof(*lock));
mysql_mutex_init(key_THR_LOCK_mutex, &lock->mutex, MY_MUTEX_INIT_FAST);
lock->read.last= &lock->read.data;
lock->read_wait.last= &lock->read_wait.data;
lock->write_wait.last= &lock->write_wait.data;
lock->write.last= &lock->write.data;
mysql_mutex_lock(&THR_LOCK_lock); /* Add to locks in use */
lock->list.data=(void*) lock;
thr_lock_thread_list=list_add(thr_lock_thread_list,&lock->list);
mysql_mutex_unlock(&THR_LOCK_lock);
DBUG_VOID_RETURN;
} | O3 | c | thr_lock_init:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdi, %rbx
movl $0xf8, %edx
xorl %esi, %esi
callq 0x292b0
leaq 0xb648ad(%rip), %rax # 0xc066ec
movl (%rax), %edi
leaq 0x18(%rbx), %r14
leaq 0x2e31c4(%rip), %r15 # 0x385010
movq (%r15), %rax
movq %r14, %rsi
callq *0x40(%rax)
movq %rax, 0x58(%rbx)
movq %r14, 0x50(%rbx)
xorps %xmm0, %xmm0
movups %xmm0, 0x40(%rbx)
leaq 0xb65575(%rip), %rsi # 0xc073e0
movq %r14, %rdi
callq 0x29330
leaq 0x70(%rbx), %rax
movq %rax, 0x78(%rbx)
leaq 0x60(%rbx), %rax
movq %rax, 0x68(%rbx)
leaq 0x80(%rbx), %rax
movq %rax, 0x88(%rbx)
leaq 0x90(%rbx), %rax
movq %rax, 0x98(%rbx)
leaq 0xb65282(%rip), %r14 # 0xc07128
cmpq $0x0, 0x40(%r14)
jne 0xa1ef1
leaq 0xb65274(%rip), %rdi # 0xc07128
callq 0x29210
movq %rbx, 0x10(%rbx)
leaq 0xb65514(%rip), %r12 # 0xc073d8
movq (%r12), %rdi
movq %rbx, %rsi
callq 0x940b4
movq %rax, (%r12)
movq 0x40(%r14), %rdi
testq %rdi, %rdi
jne 0xa1ef8
leaq 0xb65244(%rip), %rdi # 0xc07128
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x291e0
callq 0x2f1ae
jmp 0xa1eb9
movq (%r15), %rax
callq *0x160(%rax)
jmp 0xa1edd
| thr_lock_init:
push rbp
mov rbp, rsp
push r15
push r14
push r12
push rbx
mov rbx, rdi
mov edx, 0F8h
xor esi, esi
call _memset
lea rax, key_THR_LOCK_mutex
mov edi, [rax]
lea r14, [rbx+18h]
lea r15, PSI_server
mov rax, [r15]
mov rsi, r14
call qword ptr [rax+40h]
mov [rbx+58h], rax
mov [rbx+50h], r14
xorps xmm0, xmm0
movups xmmword ptr [rbx+40h], xmm0
lea rsi, my_fast_mutexattr
mov rdi, r14
call _pthread_mutex_init
lea rax, [rbx+70h]
mov [rbx+78h], rax
lea rax, [rbx+60h]
mov [rbx+68h], rax
lea rax, [rbx+80h]
mov [rbx+88h], rax
lea rax, [rbx+90h]
mov [rbx+98h], rax
lea r14, THR_LOCK_lock
cmp qword ptr [r14+40h], 0
jnz short loc_A1EF1
lea rdi, THR_LOCK_lock
call _pthread_mutex_lock
loc_A1EB9:
mov [rbx+10h], rbx
lea r12, thr_lock_thread_list
mov rdi, [r12]
mov rsi, rbx
call list_add
mov [r12], rax
mov rdi, [r14+40h]
test rdi, rdi
jnz short loc_A1EF8
loc_A1EDD:
lea rdi, THR_LOCK_lock
pop rbx
pop r12
pop r14
pop r15
pop rbp
jmp _pthread_mutex_unlock
loc_A1EF1:
call thr_lock_init_cold_1
jmp short loc_A1EB9
loc_A1EF8:
mov rax, [r15]
call qword ptr [rax+160h]
jmp short loc_A1EDD
| long long thr_lock_init(long long a1)
{
memset(a1, 0LL, 248LL);
*(_QWORD *)(a1 + 88) = ((long long ( *)(_QWORD, long long))PSI_server[8])(key_THR_LOCK_mutex, a1 + 24);
*(_QWORD *)(a1 + 80) = a1 + 24;
*(_OWORD *)(a1 + 64) = 0LL;
pthread_mutex_init(a1 + 24, &my_fast_mutexattr);
*(_QWORD *)(a1 + 120) = a1 + 112;
*(_QWORD *)(a1 + 104) = a1 + 96;
*(_QWORD *)(a1 + 136) = a1 + 128;
*(_QWORD *)(a1 + 152) = a1 + 144;
if ( THR_LOCK_lock[8] )
thr_lock_init_cold_1();
else
pthread_mutex_lock(THR_LOCK_lock);
*(_QWORD *)(a1 + 16) = a1;
thr_lock_thread_list = list_add(thr_lock_thread_list, (_QWORD *)a1);
if ( THR_LOCK_lock[8] )
PSI_server[44]();
return pthread_mutex_unlock(THR_LOCK_lock);
}
| thr_lock_init:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
MOV RBX,RDI
MOV EDX,0xf8
XOR ESI,ESI
CALL 0x001292b0
LEA RAX,[0xd066ec]
MOV EDI,dword ptr [RAX]
LEA R14,[RBX + 0x18]
LEA R15,[0x485010]
MOV RAX,qword ptr [R15]
MOV RSI,R14
CALL qword ptr [RAX + 0x40]
MOV qword ptr [RBX + 0x58],RAX
MOV qword ptr [RBX + 0x50],R14
XORPS XMM0,XMM0
MOVUPS xmmword ptr [RBX + 0x40],XMM0
LEA RSI,[0xd073e0]
MOV RDI,R14
CALL 0x00129330
LEA RAX,[RBX + 0x70]
MOV qword ptr [RBX + 0x78],RAX
LEA RAX,[RBX + 0x60]
MOV qword ptr [RBX + 0x68],RAX
LEA RAX,[RBX + 0x80]
MOV qword ptr [RBX + 0x88],RAX
LEA RAX,[RBX + 0x90]
MOV qword ptr [RBX + 0x98],RAX
LEA R14,[0xd07128]
CMP qword ptr [R14 + 0x40],0x0
JNZ 0x001a1ef1
LEA RDI,[0xd07128]
CALL 0x00129210
LAB_001a1eb9:
MOV qword ptr [RBX + 0x10],RBX
LEA R12,[0xd073d8]
MOV RDI,qword ptr [R12]
MOV RSI,RBX
CALL 0x001940b4
MOV qword ptr [R12],RAX
MOV RDI,qword ptr [R14 + 0x40]
TEST RDI,RDI
JNZ 0x001a1ef8
LAB_001a1edd:
LEA RDI,[0xd07128]
POP RBX
POP R12
POP R14
POP R15
POP RBP
JMP 0x001291e0
LAB_001a1ef1:
CALL 0x0012f1ae
JMP 0x001a1eb9
LAB_001a1ef8:
MOV RAX,qword ptr [R15]
CALL qword ptr [RAX + 0x160]
JMP 0x001a1edd
|
void thr_lock_init(void *param_1)
{
pthread_mutex_t *__mutex;
int8 uVar1;
memset(param_1,0,0xf8);
__mutex = (pthread_mutex_t *)((long)param_1 + 0x18);
uVar1 = (**(code **)(PSI_server + 0x40))(key_THR_LOCK_mutex,__mutex);
*(int8 *)((long)param_1 + 0x58) = uVar1;
*(pthread_mutex_t **)((long)param_1 + 0x50) = __mutex;
*(int8 *)((long)param_1 + 0x40) = 0;
*(int8 *)((long)param_1 + 0x48) = 0;
pthread_mutex_init(__mutex,(pthread_mutexattr_t *)&my_fast_mutexattr);
*(long *)((long)param_1 + 0x78) = (long)param_1 + 0x70;
*(long *)((long)param_1 + 0x68) = (long)param_1 + 0x60;
*(long *)((long)param_1 + 0x88) = (long)param_1 + 0x80;
*(long *)((long)param_1 + 0x98) = (long)param_1 + 0x90;
if (THR_LOCK_lock._64_8_ == 0) {
pthread_mutex_lock((pthread_mutex_t *)THR_LOCK_lock);
}
else {
thr_lock_init_cold_1();
}
*(void **)((long)param_1 + 0x10) = param_1;
thr_lock_thread_list = list_add(thr_lock_thread_list,param_1);
if (THR_LOCK_lock._64_8_ != 0) {
(**(code **)(PSI_server + 0x160))();
}
pthread_mutex_unlock((pthread_mutex_t *)THR_LOCK_lock);
return;
}
| |
51,865 | make_lock_and_pin | eloqsql/storage/maria/ma_pagecache.c | static my_bool make_lock_and_pin(PAGECACHE *pagecache,
PAGECACHE_BLOCK_LINK *block,
enum pagecache_page_lock lock,
enum pagecache_page_pin pin,
my_bool any)
{
DBUG_ENTER("make_lock_and_pin");
DBUG_PRINT("enter", ("block: %p (%u) lock: %s pin: %s any %d",
block, PCBLOCK_NUMBER(pagecache, block),
page_cache_page_lock_str[lock],
page_cache_page_pin_str[pin], (int)any));
PCBLOCK_INFO(block);
DBUG_ASSERT(block);
DBUG_ASSERT(!any ||
((lock == PAGECACHE_LOCK_LEFT_UNLOCKED) &&
(pin == PAGECACHE_UNPIN)));
DBUG_ASSERT(block->hash_link->block == block);
switch (lock) {
case PAGECACHE_LOCK_WRITE: /* free -> write */
/* Writelock and pin the buffer */
if (get_wrlock(pagecache, block))
{
/* Couldn't lock because block changed status => need retry */
goto retry;
}
/* The cache is locked so nothing afraid of */
add_pin(block);
info_add_lock(block, 1);
break;
case PAGECACHE_LOCK_WRITE_TO_READ: /* write -> read */
case PAGECACHE_LOCK_WRITE_UNLOCK: /* write -> free */
/* Removes write lock and puts read lock */
release_wrlock(block, lock == PAGECACHE_LOCK_WRITE_TO_READ);
/* fall through */
case PAGECACHE_LOCK_READ_UNLOCK: /* read -> free */
if (lock == PAGECACHE_LOCK_READ_UNLOCK)
release_rdlock(block);
/* fall through */
case PAGECACHE_LOCK_LEFT_READLOCKED: /* read -> read */
if (pin == PAGECACHE_UNPIN)
{
remove_pin(block, FALSE);
}
if (lock == PAGECACHE_LOCK_WRITE_TO_READ)
{
info_change_lock(block, 0);
}
else if (lock == PAGECACHE_LOCK_WRITE_UNLOCK ||
lock == PAGECACHE_LOCK_READ_UNLOCK)
{
info_remove_lock(block);
}
break;
case PAGECACHE_LOCK_READ: /* free -> read */
if (get_rdlock(pagecache, block))
{
/* Couldn't lock because block changed status => need retry */
goto retry;
}
if (pin == PAGECACHE_PIN)
{
/* The cache is locked so nothing afraid off */
add_pin(block);
}
info_add_lock(block, 0);
break;
case PAGECACHE_LOCK_LEFT_UNLOCKED: /* free -> free */
if (pin == PAGECACHE_UNPIN)
{
remove_pin(block, any);
}
/* fall through */
case PAGECACHE_LOCK_LEFT_WRITELOCKED: /* write -> write */
break; /* do nothing */
default:
DBUG_ASSERT(0); /* Never should happened */
}
PCBLOCK_INFO(block);
DBUG_RETURN(0);
retry:
DBUG_PRINT("INFO", ("Retry block %p", block));
PCBLOCK_INFO(block);
DBUG_ASSERT(block->hash_link->requests > 0);
block->hash_link->requests--;
DBUG_RETURN(1);
} | O3 | c | make_lock_and_pin:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
xorl %eax, %eax
cmpl $0x7, %edx
ja 0x3abc4
movl %ecx, %r14d
movq %rsi, %rbx
movq %rdi, %r15
movl %edx, %ecx
leaq 0xa60f2(%rip), %rdx # 0xe0b80
movslq (%rdx,%rcx,4), %rcx
addq %rdx, %rcx
jmpq *%rcx
movl %r14d, -0x30(%rbp)
movq 0x20(%rbx), %rax
movl 0x28(%rax), %r12d
movq 0x60(%rax), %r13
callq 0x29580
movq %rax, %r14
cmpl $0x0, 0x68(%rbx)
je 0x3abb1
movq 0x38(%rbx), %rdi
movq %r14, %rsi
callq 0x29970
testl %eax, %eax
jne 0x3abb6
movq %r15, %rdi
movq %rbx, %rsi
movl %r12d, %edx
movq %r13, %rcx
xorl %r8d, %r8d
callq 0x3da9c
testb %al, %al
je 0x3aaaf
jmp 0x3ab76
incl 0x70(%rbx)
movl 0x68(%rbx), %eax
cmpl $0x1, %eax
jne 0x3ab1c
movl 0x70(%rbx), %eax
movl %eax, 0x6c(%rbx)
xorl %eax, %eax
movl %eax, 0x70(%rbx)
movl %eax, 0x68(%rbx)
cmpq $0x0, 0x58(%rbx)
je 0x3aba6
leaq 0x58(%rbx), %rdi
callq 0xa6753
jmp 0x3aba6
decl %eax
movl %eax, 0x68(%rbx)
jmp 0x3aba6
movq 0x20(%rbx), %rax
movl 0x28(%rax), %r14d
movq 0x60(%rax), %r13
callq 0x29580
movq %rax, -0x30(%rbp)
movl 0x68(%rbx), %r12d
testl %r12d, %r12d
je 0x3ab55
movq 0x38(%rbx), %rdi
movq -0x30(%rbp), %rsi
callq 0x29970
testl %eax, %eax
je 0x3ab5b
cmpl $0x0, 0x6c(%rbx)
je 0x3ab8c
movq %r15, %rdi
movq %rbx, %rsi
movl %r14d, %edx
movq %r13, %rcx
movl $0x1, %r8d
callq 0x3da9c
testb %al, %al
je 0x3ab3b
movq 0x20(%rbx), %rax
decl 0x68(%rax)
movb $0x1, %al
jmp 0x3abc4
cmpl $0x0, 0x68(%rbx)
je 0x3ab9d
decl 0x70(%rbx)
jmp 0x3aba6
incl %r12d
movl %r12d, 0x68(%rbx)
movq -0x30(%rbp), %rax
movq %rax, 0x38(%rbx)
jmp 0x3abbf
decl 0x6c(%rbx)
je 0x3ab03
cmpl $0x3, %r14d
jne 0x3abc2
decl 0x64(%rbx)
jmp 0x3abc2
incl 0x6c(%rbx)
jmp 0x3abb9
incl 0x70(%rbx)
cmpl $0x2, -0x30(%rbp)
jne 0x3abc2
incl 0x64(%rbx)
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| make_lock_and_pin:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
push rax
xor eax, eax
cmp edx, 7; switch 8 cases
ja def_3AA95; jumptable 000000000003AA95 default case, case 2
mov r14d, ecx
mov rbx, rsi
mov r15, rdi
mov ecx, edx
lea rdx, jpt_3AA95
movsxd rcx, ds:(jpt_3AA95 - 0E0B80h)[rdx+rcx*4]
add rcx, rdx
jmp rcx; switch jump
loc_3AA97:
mov dword ptr [rbp+var_30], r14d; jumptable 000000000003AA95 case 3
mov rax, [rbx+20h]
mov r12d, [rax+28h]
mov r13, [rax+60h]
call _pthread_self
mov r14, rax
loc_3AAAF:
cmp dword ptr [rbx+68h], 0
jz loc_3ABB1
mov rdi, [rbx+38h]
mov rsi, r14
call _pthread_equal
test eax, eax
jnz loc_3ABB6
mov rdi, r15
mov rsi, rbx
mov edx, r12d
mov rcx, r13
xor r8d, r8d
call pagecache_wait_lock
test al, al
jz short loc_3AAAF
jmp loc_3AB76
loc_3AAEA:
inc dword ptr [rbx+70h]; jumptable 000000000003AA95 case 7
loc_3AAED:
mov eax, [rbx+68h]; jumptable 000000000003AA95 case 6
cmp eax, 1
jnz short loc_3AB1C
mov eax, [rbx+70h]
mov [rbx+6Ch], eax
xor eax, eax
mov [rbx+70h], eax
mov [rbx+68h], eax
loc_3AB03:
cmp qword ptr [rbx+58h], 0
jz loc_3ABA6; jumptable 000000000003AA95 cases 0,1
lea rdi, [rbx+58h]
call wqueue_release_one_locktype_from_queue
jmp loc_3ABA6; jumptable 000000000003AA95 cases 0,1
loc_3AB1C:
dec eax
mov [rbx+68h], eax
jmp loc_3ABA6; jumptable 000000000003AA95 cases 0,1
loc_3AB26:
mov rax, [rbx+20h]; jumptable 000000000003AA95 case 4
mov r14d, [rax+28h]
mov r13, [rax+60h]
call _pthread_self
mov [rbp+var_30], rax
loc_3AB3B:
mov r12d, [rbx+68h]
test r12d, r12d
jz short loc_3AB55
mov rdi, [rbx+38h]
mov rsi, [rbp+var_30]
call _pthread_equal
test eax, eax
jz short loc_3AB5B
loc_3AB55:
cmp dword ptr [rbx+6Ch], 0
jz short loc_3AB8C
loc_3AB5B:
mov rdi, r15
mov rsi, rbx
mov edx, r14d
mov rcx, r13
mov r8d, 1
call pagecache_wait_lock
test al, al
jz short loc_3AB3B
loc_3AB76:
mov rax, [rbx+20h]
dec dword ptr [rax+68h]
mov al, 1
jmp short def_3AA95; jumptable 000000000003AA95 default case, case 2
loc_3AB81:
cmp dword ptr [rbx+68h], 0; jumptable 000000000003AA95 case 5
jz short loc_3AB9D
dec dword ptr [rbx+70h]
jmp short loc_3ABA6; jumptable 000000000003AA95 cases 0,1
loc_3AB8C:
inc r12d
mov [rbx+68h], r12d
mov rax, [rbp+var_30]
mov [rbx+38h], rax
jmp short loc_3ABBF
loc_3AB9D:
dec dword ptr [rbx+6Ch]
jz loc_3AB03
loc_3ABA6:
cmp r14d, 3; jumptable 000000000003AA95 cases 0,1
jnz short loc_3ABC2
dec dword ptr [rbx+64h]
jmp short loc_3ABC2
loc_3ABB1:
inc dword ptr [rbx+6Ch]
jmp short loc_3ABB9
loc_3ABB6:
inc dword ptr [rbx+70h]
loc_3ABB9:
cmp dword ptr [rbp+var_30], 2
jnz short loc_3ABC2
loc_3ABBF:
inc dword ptr [rbx+64h]
loc_3ABC2:
xor eax, eax
def_3AA95:
add rsp, 8; jumptable 000000000003AA95 default case, case 2
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| char make_lock_and_pin(long long a1, long long a2, int a3, int a4)
{
char result; // al
long long v6; // rax
unsigned int v7; // r12d
long long v8; // r13
long long v9; // r14
int v10; // eax
long long v11; // rax
unsigned int v12; // r14d
long long v13; // r13
int v14; // r12d
long long v17; // [rsp+0h] [rbp-30h]
result = 0;
switch ( a3 )
{
case 0:
case 1:
goto LABEL_23;
case 3:
v6 = *(_QWORD *)(a2 + 32);
v7 = *(_DWORD *)(v6 + 40);
v8 = *(_QWORD *)(v6 + 96);
v9 = pthread_self(a1);
while ( 2 )
{
if ( *(_DWORD *)(a2 + 104) )
{
if ( !(unsigned int)pthread_equal(*(_QWORD *)(a2 + 56), v9) )
{
if ( (unsigned __int8)pagecache_wait_lock(a1, a2, v7, v8, 0LL) )
goto LABEL_18;
continue;
}
++*(_DWORD *)(a2 + 112);
}
else
{
++*(_DWORD *)(a2 + 108);
}
break;
}
if ( a4 == 2 )
goto LABEL_28;
return 0;
case 4:
v11 = *(_QWORD *)(a2 + 32);
v12 = *(_DWORD *)(v11 + 40);
v13 = *(_QWORD *)(v11 + 96);
v17 = pthread_self(a1);
break;
case 5:
if ( *(_DWORD *)(a2 + 104) )
{
--*(_DWORD *)(a2 + 112);
goto LABEL_23;
}
if ( (*(_DWORD *)(a2 + 108))-- != 1 )
goto LABEL_23;
goto LABEL_10;
case 6:
goto LABEL_8;
case 7:
++*(_DWORD *)(a2 + 112);
LABEL_8:
v10 = *(_DWORD *)(a2 + 104);
if ( v10 == 1 )
{
*(_DWORD *)(a2 + 108) = *(_DWORD *)(a2 + 112);
*(_DWORD *)(a2 + 112) = 0;
*(_DWORD *)(a2 + 104) = 0;
LABEL_10:
if ( *(_QWORD *)(a2 + 88) )
wqueue_release_one_locktype_from_queue(a2 + 88);
}
else
{
*(_DWORD *)(a2 + 104) = v10 - 1;
}
LABEL_23:
if ( a4 == 3 )
--*(_DWORD *)(a2 + 100);
return 0;
default:
return result;
}
while ( 1 )
{
v14 = *(_DWORD *)(a2 + 104);
if ( (!v14 || (unsigned int)pthread_equal(*(_QWORD *)(a2 + 56), v17)) && !*(_DWORD *)(a2 + 108) )
break;
if ( (unsigned __int8)pagecache_wait_lock(a1, a2, v12, v13, 1LL) )
{
LABEL_18:
--*(_DWORD *)(*(_QWORD *)(a2 + 32) + 104LL);
return 1;
}
}
*(_DWORD *)(a2 + 104) = v14 + 1;
*(_QWORD *)(a2 + 56) = v17;
LABEL_28:
++*(_DWORD *)(a2 + 100);
return 0;
}
| make_lock_and_pin:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
PUSH RAX
XOR EAX,EAX
CMP EDX,0x7
JA 0x0013abc4
MOV R14D,ECX
MOV RBX,RSI
MOV R15,RDI
MOV ECX,EDX
LEA RDX,[0x1e0b80]
MOVSXD RCX,dword ptr [RDX + RCX*0x4]
ADD RCX,RDX
switchD:
JMP RCX
caseD_3:
MOV dword ptr [RBP + -0x30],R14D
MOV RAX,qword ptr [RBX + 0x20]
MOV R12D,dword ptr [RAX + 0x28]
MOV R13,qword ptr [RAX + 0x60]
CALL 0x00129580
MOV R14,RAX
LAB_0013aaaf:
CMP dword ptr [RBX + 0x68],0x0
JZ 0x0013abb1
MOV RDI,qword ptr [RBX + 0x38]
MOV RSI,R14
CALL 0x00129970
TEST EAX,EAX
JNZ 0x0013abb6
MOV RDI,R15
MOV RSI,RBX
MOV EDX,R12D
MOV RCX,R13
XOR R8D,R8D
CALL 0x0013da9c
TEST AL,AL
JZ 0x0013aaaf
JMP 0x0013ab76
caseD_7:
INC dword ptr [RBX + 0x70]
caseD_6:
MOV EAX,dword ptr [RBX + 0x68]
CMP EAX,0x1
JNZ 0x0013ab1c
MOV EAX,dword ptr [RBX + 0x70]
MOV dword ptr [RBX + 0x6c],EAX
XOR EAX,EAX
MOV dword ptr [RBX + 0x70],EAX
MOV dword ptr [RBX + 0x68],EAX
LAB_0013ab03:
CMP qword ptr [RBX + 0x58],0x0
JZ 0x0013aba6
LEA RDI,[RBX + 0x58]
CALL 0x001a6753
JMP 0x0013aba6
LAB_0013ab1c:
DEC EAX
MOV dword ptr [RBX + 0x68],EAX
JMP 0x0013aba6
caseD_4:
MOV RAX,qword ptr [RBX + 0x20]
MOV R14D,dword ptr [RAX + 0x28]
MOV R13,qword ptr [RAX + 0x60]
CALL 0x00129580
MOV qword ptr [RBP + -0x30],RAX
LAB_0013ab3b:
MOV R12D,dword ptr [RBX + 0x68]
TEST R12D,R12D
JZ 0x0013ab55
MOV RDI,qword ptr [RBX + 0x38]
MOV RSI,qword ptr [RBP + -0x30]
CALL 0x00129970
TEST EAX,EAX
JZ 0x0013ab5b
LAB_0013ab55:
CMP dword ptr [RBX + 0x6c],0x0
JZ 0x0013ab8c
LAB_0013ab5b:
MOV RDI,R15
MOV RSI,RBX
MOV EDX,R14D
MOV RCX,R13
MOV R8D,0x1
CALL 0x0013da9c
TEST AL,AL
JZ 0x0013ab3b
LAB_0013ab76:
MOV RAX,qword ptr [RBX + 0x20]
DEC dword ptr [RAX + 0x68]
MOV AL,0x1
JMP 0x0013abc4
caseD_5:
CMP dword ptr [RBX + 0x68],0x0
JZ 0x0013ab9d
DEC dword ptr [RBX + 0x70]
JMP 0x0013aba6
LAB_0013ab8c:
INC R12D
MOV dword ptr [RBX + 0x68],R12D
MOV RAX,qword ptr [RBP + -0x30]
MOV qword ptr [RBX + 0x38],RAX
JMP 0x0013abbf
LAB_0013ab9d:
DEC dword ptr [RBX + 0x6c]
JZ 0x0013ab03
caseD_0:
CMP R14D,0x3
JNZ 0x0013abc2
DEC dword ptr [RBX + 0x64]
JMP 0x0013abc2
LAB_0013abb1:
INC dword ptr [RBX + 0x6c]
JMP 0x0013abb9
LAB_0013abb6:
INC dword ptr [RBX + 0x70]
LAB_0013abb9:
CMP dword ptr [RBP + -0x30],0x2
JNZ 0x0013abc2
LAB_0013abbf:
INC dword ptr [RBX + 0x64]
LAB_0013abc2:
XOR EAX,EAX
caseD_2:
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
int8 make_lock_and_pin(int8 param_1,long param_2,int4 param_3,int param_4)
{
int *piVar1;
int4 uVar2;
long lVar3;
char cVar4;
int iVar5;
int iVar6;
pthread_t pVar7;
int8 uVar8;
uVar8 = 0;
switch(param_3) {
case 0:
case 1:
goto switchD_0013aa95_caseD_0;
default:
goto switchD_0013aa95_caseD_2;
case 3:
uVar2 = *(int4 *)(*(long *)(param_2 + 0x20) + 0x28);
uVar8 = *(int8 *)(*(long *)(param_2 + 0x20) + 0x60);
pVar7 = pthread_self();
do {
if (*(int *)(param_2 + 0x68) == 0) {
*(int *)(param_2 + 0x6c) = *(int *)(param_2 + 0x6c) + 1;
LAB_0013abb9:
if (param_4 != 2) {
return 0;
}
LAB_0013abbf:
*(int *)(param_2 + 100) = *(int *)(param_2 + 100) + 1;
return 0;
}
iVar5 = pthread_equal(*(pthread_t *)(param_2 + 0x38),pVar7);
if (iVar5 != 0) {
*(int *)(param_2 + 0x70) = *(int *)(param_2 + 0x70) + 1;
goto LAB_0013abb9;
}
cVar4 = pagecache_wait_lock(param_1,param_2,uVar2,uVar8,0);
} while (cVar4 == '\0');
break;
case 4:
uVar2 = *(int4 *)(*(long *)(param_2 + 0x20) + 0x28);
uVar8 = *(int8 *)(*(long *)(param_2 + 0x20) + 0x60);
pVar7 = pthread_self();
do {
iVar5 = *(int *)(param_2 + 0x68);
if (((iVar5 == 0) || (iVar6 = pthread_equal(*(pthread_t *)(param_2 + 0x38),pVar7), iVar6 != 0)
) && (*(int *)(param_2 + 0x6c) == 0)) {
*(int *)(param_2 + 0x68) = iVar5 + 1;
*(pthread_t *)(param_2 + 0x38) = pVar7;
goto LAB_0013abbf;
}
cVar4 = pagecache_wait_lock(param_1,param_2,uVar2,uVar8,1);
} while (cVar4 == '\0');
break;
case 5:
if (*(int *)(param_2 + 0x68) != 0) {
*(int *)(param_2 + 0x70) = *(int *)(param_2 + 0x70) + -1;
goto switchD_0013aa95_caseD_0;
}
piVar1 = (int *)(param_2 + 0x6c);
*piVar1 = *piVar1 + -1;
if (*piVar1 != 0) goto switchD_0013aa95_caseD_0;
goto LAB_0013ab03;
case 7:
*(int *)(param_2 + 0x70) = *(int *)(param_2 + 0x70) + 1;
case 6:
if (*(int *)(param_2 + 0x68) == 1) {
*(int4 *)(param_2 + 0x6c) = *(int4 *)(param_2 + 0x70);
*(int4 *)(param_2 + 0x70) = 0;
*(int4 *)(param_2 + 0x68) = 0;
LAB_0013ab03:
if (*(long *)(param_2 + 0x58) != 0) {
wqueue_release_one_locktype_from_queue(param_2 + 0x58);
}
}
else {
*(int *)(param_2 + 0x68) = *(int *)(param_2 + 0x68) + -1;
}
switchD_0013aa95_caseD_0:
if (param_4 == 3) {
*(int *)(param_2 + 100) = *(int *)(param_2 + 100) + -1;
}
return 0;
}
lVar3 = *(long *)(param_2 + 0x20);
piVar1 = (int *)(lVar3 + 0x68);
*piVar1 = *piVar1 + -1;
uVar8 = CONCAT71((int7)((ulong)lVar3 >> 8),1);
switchD_0013aa95_caseD_2:
return uVar8;
}
| |
51,866 | my_wc_mb_bin | eloqsql/strings/ctype-bin.c | int my_wc_mb_bin(CHARSET_INFO *cs __attribute__((unused)),
my_wc_t wc, uchar *s, uchar *e)
{
if (s >= e)
return MY_CS_TOOSMALL;
if (wc < 256)
{
s[0]= (char) wc;
return 1;
}
return MY_CS_ILUNI;
} | O0 | c | my_wc_mb_bin:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
movq -0x20(%rbp), %rax
cmpq -0x28(%rbp), %rax
jb 0x6c0b7
movl $0xffffff9b, -0x4(%rbp) # imm = 0xFFFFFF9B
jmp 0x6c0dd
cmpq $0x100, -0x18(%rbp) # imm = 0x100
jae 0x6c0d6
movq -0x18(%rbp), %rax
movb %al, %cl
movq -0x20(%rbp), %rax
movb %cl, (%rax)
movl $0x1, -0x4(%rbp)
jmp 0x6c0dd
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
popq %rbp
retq
nopw %cs:(%rax,%rax)
| my_wc_mb_bin:
push rbp
mov rbp, rsp
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov [rbp+var_20], rdx
mov [rbp+var_28], rcx
mov rax, [rbp+var_20]
cmp rax, [rbp+var_28]
jb short loc_6C0B7
mov [rbp+var_4], 0FFFFFF9Bh
jmp short loc_6C0DD
loc_6C0B7:
cmp [rbp+var_18], 100h
jnb short loc_6C0D6
mov rax, [rbp+var_18]
mov cl, al
mov rax, [rbp+var_20]
mov [rax], cl
mov [rbp+var_4], 1
jmp short loc_6C0DD
loc_6C0D6:
mov [rbp+var_4], 0
loc_6C0DD:
mov eax, [rbp+var_4]
pop rbp
retn
| long long my_wc_mb_bin(long long a1, unsigned long long a2, _BYTE *a3, unsigned long long a4)
{
if ( (unsigned long long)a3 < a4 )
{
if ( a2 >= 0x100 )
{
return 0;
}
else
{
*a3 = a2;
return 1;
}
}
else
{
return (unsigned int)-101;
}
}
| my_wc_mb_bin:
PUSH RBP
MOV RBP,RSP
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x18],RSI
MOV qword ptr [RBP + -0x20],RDX
MOV qword ptr [RBP + -0x28],RCX
MOV RAX,qword ptr [RBP + -0x20]
CMP RAX,qword ptr [RBP + -0x28]
JC 0x0016c0b7
MOV dword ptr [RBP + -0x4],0xffffff9b
JMP 0x0016c0dd
LAB_0016c0b7:
CMP qword ptr [RBP + -0x18],0x100
JNC 0x0016c0d6
MOV RAX,qword ptr [RBP + -0x18]
MOV CL,AL
MOV RAX,qword ptr [RBP + -0x20]
MOV byte ptr [RAX],CL
MOV dword ptr [RBP + -0x4],0x1
JMP 0x0016c0dd
LAB_0016c0d6:
MOV dword ptr [RBP + -0x4],0x0
LAB_0016c0dd:
MOV EAX,dword ptr [RBP + -0x4]
POP RBP
RET
|
int4 my_wc_mb_bin(int8 param_1,ulong param_2,int1 *param_3,int1 *param_4)
{
int4 local_c;
if (param_3 < param_4) {
if (param_2 < 0x100) {
*param_3 = (char)param_2;
local_c = 1;
}
else {
local_c = 0;
}
}
else {
local_c = 0xffffff9b;
}
return local_c;
}
| |
51,867 | gray_record_cell | dmazzella[P]pylunasvg/lunasvg/plutovg/source/plutovg-ft-raster.c | static void
gray_record_cell( RAS_ARG )
{
if ( ras.area | ras.cover )
{
PCell cell = gray_find_cell( RAS_VAR );
cell->area += ras.area;
cell->cover += ras.cover;
}
} | O1 | c | gray_record_cell:
pushq %rax
movq 0x40(%rdi), %rax
movslq 0x48(%rdi), %rcx
movq %rax, %rdx
orq %rcx, %rdx
je 0x1c1ec
movq 0x30(%rdi), %rdx
movq (%rdi), %rsi
movq 0x8(%rdi), %r8
cmpq %rdx, %rsi
cmovlq %rsi, %rdx
movq 0x11c0(%rdi), %rsi
leaq (%rsi,%r8,8), %rsi
movq (%rsi), %r8
testq %r8, %r8
je 0x1c1ac
movslq (%r8), %r9
cmpq %r9, %rdx
jl 0x1c1ac
movq %r8, %rsi
cmpq %r9, %rdx
je 0x1c1e5
movq 0x10(%rsi), %r8
testq %r8, %r8
je 0x1c1a8
movslq (%r8), %r9
cmpq %r9, %rdx
jge 0x1c18f
addq $0x10, %rsi
movq 0x60(%rdi), %r9
cmpq 0x58(%rdi), %r9
jge 0x1c1ee
movq 0x50(%rdi), %r10
leaq 0x1(%r9), %r11
movq %r11, 0x60(%rdi)
leaq (%r9,%r9,2), %rdi
leaq (%r10,%rdi,8), %rdi
movl %edx, (%rdi)
movq $0x0, 0x8(%rdi)
movl $0x0, 0x4(%rdi)
movq %r8, 0x10(%rdi)
movq %rdi, (%rsi)
movq %rdi, %rsi
addq %rax, 0x8(%rsi)
addl %ecx, 0x4(%rsi)
popq %rax
retq
addq $0x10e8, %rdi # imm = 0x10E8
movl $0x1, %esi
callq 0x3220
| gray_record_cell:
push rax
mov rax, [rdi+40h]
movsxd rcx, dword ptr [rdi+48h]
mov rdx, rax
or rdx, rcx
jz loc_1C1EC
mov rdx, [rdi+30h]
mov rsi, [rdi]
mov r8, [rdi+8]
cmp rsi, rdx
cmovl rdx, rsi
mov rsi, [rdi+11C0h]
lea rsi, [rsi+r8*8]
mov r8, [rsi]
test r8, r8
jz short loc_1C1AC
movsxd r9, dword ptr [r8]
cmp rdx, r9
jl short loc_1C1AC
loc_1C18F:
mov rsi, r8
cmp rdx, r9
jz short loc_1C1E5
mov r8, [rsi+10h]
test r8, r8
jz short loc_1C1A8
movsxd r9, dword ptr [r8]
cmp rdx, r9
jge short loc_1C18F
loc_1C1A8:
add rsi, 10h
loc_1C1AC:
mov r9, [rdi+60h]
cmp r9, [rdi+58h]
jge short loc_1C1EE
mov r10, [rdi+50h]
lea r11, [r9+1]
mov [rdi+60h], r11
lea rdi, [r9+r9*2]
lea rdi, [r10+rdi*8]
mov [rdi], edx
mov qword ptr [rdi+8], 0
mov dword ptr [rdi+4], 0
mov [rdi+10h], r8
mov [rsi], rdi
mov rsi, rdi
loc_1C1E5:
add [rsi+8], rax
add [rsi+4], ecx
loc_1C1EC:
pop rax
retn
loc_1C1EE:
add rdi, 10E8h
mov esi, 1
call _longjmp
| void __spoils<rdx,rcx,r8,r9,r10,r11,xmm4,xmm5> gray_record_cell(long long *a1)
{
long long v1; // rax
long long v2; // rcx
long long v3; // rdx
int **v4; // rsi
int *v5; // r8
long long v6; // r9
int *v7; // rsi
long long v8; // r9
long long v9; // r10
int *v10; // rdi
v1 = a1[8];
v2 = *((int *)a1 + 18);
if ( v2 | v1 )
{
v3 = a1[6];
if ( *a1 < v3 )
v3 = *a1;
v4 = (int **)(a1[568] + 8 * a1[1]);
v5 = *v4;
if ( *v4 && (v6 = *v5, v3 >= v6) )
{
while ( 1 )
{
v7 = v5;
if ( v3 == v6 )
break;
v5 = (int *)*((_QWORD *)v5 + 2);
if ( v5 )
{
v6 = *v5;
if ( v3 >= v6 )
continue;
}
v4 = (int **)(v7 + 4);
goto LABEL_10;
}
}
else
{
LABEL_10:
v8 = a1[12];
if ( v8 >= a1[11] )
longjmp(a1 + 541, 1LL, v3);
v9 = a1[10];
a1[12] = v8 + 1;
v10 = (int *)(v9 + 24 * v8);
*v10 = v3;
*((_QWORD *)v10 + 1) = 0LL;
v10[1] = 0;
*((_QWORD *)v10 + 2) = v5;
*v4 = v10;
v7 = v10;
}
*((_QWORD *)v7 + 1) += v1;
v7[1] += v2;
}
}
| gray_record_cell:
PUSH RAX
MOV RAX,qword ptr [RDI + 0x40]
MOVSXD RCX,dword ptr [RDI + 0x48]
MOV RDX,RAX
OR RDX,RCX
JZ 0x0011c1ec
MOV RDX,qword ptr [RDI + 0x30]
MOV RSI,qword ptr [RDI]
MOV R8,qword ptr [RDI + 0x8]
CMP RSI,RDX
CMOVL RDX,RSI
MOV RSI,qword ptr [RDI + 0x11c0]
LEA RSI,[RSI + R8*0x8]
MOV R8,qword ptr [RSI]
TEST R8,R8
JZ 0x0011c1ac
MOVSXD R9,dword ptr [R8]
CMP RDX,R9
JL 0x0011c1ac
LAB_0011c18f:
MOV RSI,R8
CMP RDX,R9
JZ 0x0011c1e5
MOV R8,qword ptr [RSI + 0x10]
TEST R8,R8
JZ 0x0011c1a8
MOVSXD R9,dword ptr [R8]
CMP RDX,R9
JGE 0x0011c18f
LAB_0011c1a8:
ADD RSI,0x10
LAB_0011c1ac:
MOV R9,qword ptr [RDI + 0x60]
CMP R9,qword ptr [RDI + 0x58]
JGE 0x0011c1ee
MOV R10,qword ptr [RDI + 0x50]
LEA R11,[R9 + 0x1]
MOV qword ptr [RDI + 0x60],R11
LEA RDI,[R9 + R9*0x2]
LEA RDI,[R10 + RDI*0x8]
MOV dword ptr [RDI],EDX
MOV qword ptr [RDI + 0x8],0x0
MOV dword ptr [RDI + 0x4],0x0
MOV qword ptr [RDI + 0x10],R8
MOV qword ptr [RSI],RDI
MOV RSI,RDI
LAB_0011c1e5:
ADD qword ptr [RSI + 0x8],RAX
ADD dword ptr [RSI + 0x4],ECX
LAB_0011c1ec:
POP RAX
RET
LAB_0011c1ee:
ADD RDI,0x10e8
MOV ESI,0x1
CALL 0x00103220
|
int8 gray_record_cell(long *param_1)
{
long lVar1;
long lVar2;
int8 in_RAX;
long lVar3;
long *plVar4;
int *piVar5;
int *piVar6;
long lVar7;
lVar1 = param_1[8];
lVar2 = param_1[9];
if (lVar1 != 0 || (int)lVar2 != 0) {
lVar3 = param_1[6];
if (*param_1 < param_1[6]) {
lVar3 = *param_1;
}
plVar4 = (long *)(param_1[0x238] + param_1[1] * 8);
piVar6 = (int *)*plVar4;
if ((piVar6 != (int *)0x0) && (lVar7 = (long)*piVar6, lVar7 <= lVar3)) {
do {
piVar5 = piVar6;
if (lVar3 == lVar7) goto LAB_0011c1e5;
piVar6 = *(int **)(piVar5 + 4);
} while ((piVar6 != (int *)0x0) && (lVar7 = (long)*piVar6, lVar7 <= lVar3));
plVar4 = (long *)(piVar5 + 4);
}
lVar7 = param_1[0xc];
if (param_1[0xb] <= lVar7) {
/* WARNING: Subroutine does not return */
longjmp((__jmp_buf_tag *)(param_1 + 0x21d),1);
}
param_1[0xc] = lVar7 + 1;
piVar5 = (int *)(param_1[10] + lVar7 * 0x18);
*piVar5 = (int)lVar3;
piVar5[2] = 0;
piVar5[3] = 0;
piVar5[1] = 0;
*(int **)(piVar5 + 4) = piVar6;
*plVar4 = (long)piVar5;
LAB_0011c1e5:
*(long *)(piVar5 + 2) = *(long *)(piVar5 + 2) + lVar1;
piVar5[1] = piVar5[1] + (int)lVar2;
}
return in_RAX;
}
| |
51,868 | strnstr | navaro[P]qoraal-tictactoe/build_O3/_deps/qoraal_http-src/src/httpparse.c | char *
strnstr(const char * s, const char *find, size_t slen)
{
char c, sc;
size_t len;
if ((c = *find++) != '\0') {
len = strlen(find);
do {
do {
if ((sc = *s++) == '\0' || slen-- < 1)
return (NULL);
} while (sc != c);
if (len > slen)
return (NULL);
} while (strncmp(s, find, len) != 0);
s--;
}
return ((char *)s);
} | O3 | c | strnstr:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %r15
movb (%rsi), %r14b
testb %r14b, %r14b
je 0x1e51e
movq %rdx, %rbx
incq %rsi
movq %rsi, -0x30(%rbp)
movq %rsi, %rdi
callq 0x61a0
movq %rax, %r12
decq %rbx
movb (%r15), %cl
testb %cl, %cl
je 0x1e523
movl $0x0, %eax
cmpq $-0x1, %rbx
je 0x1e525
leaq 0x1(%r15), %r13
cmpb %r14b, %cl
jne 0x1e516
cmpq %rbx, %r12
ja 0x1e523
movq %r13, %rdi
movq -0x30(%rbp), %rsi
movq %r12, %rdx
callq 0x60a0
movl %eax, %ecx
movq %r15, %rax
testl %ecx, %ecx
je 0x1e525
decq %rbx
movq %r13, %r15
jmp 0x1e4de
movq %r15, %rax
jmp 0x1e525
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| strnstr:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
push rax
mov r15, rdi
mov r14b, [rsi]
test r14b, r14b
jz short loc_1E51E
mov rbx, rdx
inc rsi
mov [rbp+var_30], rsi
mov rdi, rsi
call _strlen
mov r12, rax
dec rbx
loc_1E4DE:
mov cl, [r15]
test cl, cl
jz short loc_1E523
mov eax, 0
cmp rbx, 0FFFFFFFFFFFFFFFFh
jz short loc_1E525
lea r13, [r15+1]
cmp cl, r14b
jnz short loc_1E516
cmp r12, rbx
ja short loc_1E523
mov rdi, r13
mov rsi, [rbp+var_30]
mov rdx, r12
call _strncmp
mov ecx, eax
mov rax, r15
test ecx, ecx
jz short loc_1E525
loc_1E516:
dec rbx
mov r15, r13
jmp short loc_1E4DE
loc_1E51E:
mov rax, r15
jmp short loc_1E525
loc_1E523:
xor eax, eax
loc_1E525:
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| _BYTE * strnstr(_BYTE *a1, char *a2, long long a3)
{
_BYTE *v3; // r15
char v4; // r14
unsigned long long v6; // r12
unsigned long long v7; // rbx
_BYTE *result; // rax
int v9; // ecx
v3 = a1;
v4 = *a2;
if ( !*a2 )
return a1;
v6 = strlen(a2 + 1);
v7 = a3 - 1;
while ( *v3 )
{
result = 0LL;
if ( v7 == -1LL )
return result;
if ( *v3 == v4 )
{
if ( v6 > v7 )
return 0LL;
v9 = strncmp(v3 + 1, a2 + 1, v6);
result = v3;
if ( !v9 )
return result;
}
--v7;
++v3;
}
return 0LL;
}
| strnstr:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
PUSH RAX
MOV R15,RDI
MOV R14B,byte ptr [RSI]
TEST R14B,R14B
JZ 0x0011e51e
MOV RBX,RDX
INC RSI
MOV qword ptr [RBP + -0x30],RSI
MOV RDI,RSI
CALL 0x001061a0
MOV R12,RAX
DEC RBX
LAB_0011e4de:
MOV CL,byte ptr [R15]
TEST CL,CL
JZ 0x0011e523
MOV EAX,0x0
CMP RBX,-0x1
JZ 0x0011e525
LEA R13,[R15 + 0x1]
CMP CL,R14B
JNZ 0x0011e516
CMP R12,RBX
JA 0x0011e523
MOV RDI,R13
MOV RSI,qword ptr [RBP + -0x30]
MOV RDX,R12
CALL 0x001060a0
MOV ECX,EAX
MOV RAX,R15
TEST ECX,ECX
JZ 0x0011e525
LAB_0011e516:
DEC RBX
MOV R15,R13
JMP 0x0011e4de
LAB_0011e51e:
MOV RAX,R15
JMP 0x0011e525
LAB_0011e523:
XOR EAX,EAX
LAB_0011e525:
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
char * strnstr(char *param_1,char *param_2,long param_3)
{
char cVar1;
int iVar2;
size_t __n;
ulong uVar3;
cVar1 = *param_2;
if (cVar1 != '\0') {
__n = strlen(param_2 + 1);
uVar3 = param_3 - 1;
while (*param_1 != '\0') {
if (uVar3 == 0xffffffffffffffff) {
return (char *)0x0;
}
if (*param_1 == cVar1) {
if (uVar3 < __n) break;
iVar2 = strncmp(param_1 + 1,param_2 + 1,__n);
if (iVar2 == 0) {
return param_1;
}
}
uVar3 = uVar3 - 1;
param_1 = param_1 + 1;
}
param_1 = (char *)0x0;
}
return param_1;
}
| |
51,869 | get_argument | eloqsql/mysys/my_default.c | static char *get_argument(const char *keyword, size_t kwlen,
char *ptr, char *name, uint line)
{
char *end;
/* Skip over "include / includedir keyword" and following whitespace */
for (ptr+= kwlen - 1;
my_isspace(&my_charset_latin1, ptr[0]);
ptr++)
{}
/*
Trim trailing whitespace from directory name
The -1 below is for the newline added by fgets()
Note that my_isspace() is true for \r and \n
*/
for (end= ptr + strlen(ptr) - 1;
my_isspace(&my_charset_latin1, *(end - 1));
end--)
{}
end[0]= 0; /* Cut off end space */
/* Print error msg if there is nothing after !include* directive */
if (end <= ptr)
{
fprintf(stderr,
"error: Wrong '!%s' directive in config file: %s at line %d\n",
keyword, name, line);
return 0;
}
return ptr;
} | O0 | c | get_argument:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
movl %r8d, -0x2c(%rbp)
movq -0x18(%rbp), %rax
subq $0x1, %rax
addq -0x20(%rbp), %rax
movq %rax, -0x20(%rbp)
leaq 0x28dc1d(%rip), %rax # 0x36d4b0
movq 0x40(%rax), %rax
movq -0x20(%rbp), %rcx
movzbl (%rcx), %ecx
movzbl 0x1(%rax,%rcx), %eax
andl $0x8, %eax
cmpl $0x0, %eax
je 0xdf8bb
jmp 0xdf8ad
movq -0x20(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x20(%rbp)
jmp 0xdf88c
movq -0x20(%rbp), %rax
movq %rax, -0x40(%rbp)
movq -0x20(%rbp), %rdi
callq 0x2a330
movq %rax, %rcx
movq -0x40(%rbp), %rax
addq %rcx, %rax
addq $-0x1, %rax
movq %rax, -0x38(%rbp)
leaq 0x28dbcb(%rip), %rax # 0x36d4b0
movq 0x40(%rax), %rax
movq -0x38(%rbp), %rcx
movzbl -0x1(%rcx), %ecx
movzbl 0x1(%rax,%rcx), %eax
andl $0x8, %eax
cmpl $0x0, %eax
je 0xdf90e
jmp 0xdf900
movq -0x38(%rbp), %rax
addq $-0x1, %rax
movq %rax, -0x38(%rbp)
jmp 0xdf8de
movq -0x38(%rbp), %rax
movb $0x0, (%rax)
movq -0x38(%rbp), %rax
cmpq -0x20(%rbp), %rax
ja 0xdf94d
movq 0x1e46ba(%rip), %rax # 0x2c3fe0
movq (%rax), %rdi
movq -0x10(%rbp), %rdx
movq -0x28(%rbp), %rcx
movl -0x2c(%rbp), %r8d
leaq 0x7ac04(%rip), %rsi # 0x15a540
movb $0x0, %al
callq 0x2a180
movq $0x0, -0x8(%rbp)
jmp 0xdf955
movq -0x20(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x40, %rsp
popq %rbp
retq
nop
| get_argument:
push rbp
mov rbp, rsp
sub rsp, 40h
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov [rbp+var_20], rdx
mov [rbp+var_28], rcx
mov [rbp+var_2C], r8d
mov rax, [rbp+var_18]
sub rax, 1
add rax, [rbp+var_20]
mov [rbp+var_20], rax
loc_DF88C:
lea rax, my_charset_latin1
mov rax, [rax+40h]
mov rcx, [rbp+var_20]
movzx ecx, byte ptr [rcx]
movzx eax, byte ptr [rax+rcx+1]
and eax, 8
cmp eax, 0
jz short loc_DF8BB
jmp short $+2
loc_DF8AD:
mov rax, [rbp+var_20]
add rax, 1
mov [rbp+var_20], rax
jmp short loc_DF88C
loc_DF8BB:
mov rax, [rbp+var_20]
mov [rbp+var_40], rax
mov rdi, [rbp+var_20]
call _strlen
mov rcx, rax
mov rax, [rbp+var_40]
add rax, rcx
add rax, 0FFFFFFFFFFFFFFFFh
mov [rbp+var_38], rax
loc_DF8DE:
lea rax, my_charset_latin1
mov rax, [rax+40h]
mov rcx, [rbp+var_38]
movzx ecx, byte ptr [rcx-1]
movzx eax, byte ptr [rax+rcx+1]
and eax, 8
cmp eax, 0
jz short loc_DF90E
jmp short $+2
loc_DF900:
mov rax, [rbp+var_38]
add rax, 0FFFFFFFFFFFFFFFFh
mov [rbp+var_38], rax
jmp short loc_DF8DE
loc_DF90E:
mov rax, [rbp+var_38]
mov byte ptr [rax], 0
mov rax, [rbp+var_38]
cmp rax, [rbp+var_20]
ja short loc_DF94D
mov rax, cs:stderr_ptr
mov rdi, [rax]
mov rdx, [rbp+var_10]
mov rcx, [rbp+var_28]
mov r8d, [rbp+var_2C]
lea rsi, aErrorWrongSDir; "error: Wrong '!%s' directive in config "...
mov al, 0
call _fprintf
mov [rbp+var_8], 0
jmp short loc_DF955
loc_DF94D:
mov rax, [rbp+var_20]
mov [rbp+var_8], rax
loc_DF955:
mov rax, [rbp+var_8]
add rsp, 40h
pop rbp
retn
| unsigned __int8 * get_argument(const char *a1, long long a2, long long a3, const char *a4, int a5)
{
unsigned __int8 *j; // [rsp+8h] [rbp-38h]
unsigned __int8 *i; // [rsp+20h] [rbp-20h]
for ( i = (unsigned __int8 *)(a3 + a2 - 1); (*(_BYTE *)(*((_QWORD *)&my_charset_latin1 + 8) + *i + 1LL) & 8) != 0; ++i )
;
for ( j = &i[strlen(i) - 1]; (*(_BYTE *)(*((_QWORD *)&my_charset_latin1 + 8) + *(j - 1) + 1LL) & 8) != 0; --j )
;
*j = 0;
if ( j > i )
return i;
fprintf(stderr, "error: Wrong '!%s' directive in config file: %s at line %d\n", a1, a4, a5);
return 0LL;
}
| get_argument:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x40
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x18],RSI
MOV qword ptr [RBP + -0x20],RDX
MOV qword ptr [RBP + -0x28],RCX
MOV dword ptr [RBP + -0x2c],R8D
MOV RAX,qword ptr [RBP + -0x18]
SUB RAX,0x1
ADD RAX,qword ptr [RBP + -0x20]
MOV qword ptr [RBP + -0x20],RAX
LAB_001df88c:
LEA RAX,[0x46d4b0]
MOV RAX,qword ptr [RAX + 0x40]
MOV RCX,qword ptr [RBP + -0x20]
MOVZX ECX,byte ptr [RCX]
MOVZX EAX,byte ptr [RAX + RCX*0x1 + 0x1]
AND EAX,0x8
CMP EAX,0x0
JZ 0x001df8bb
JMP 0x001df8ad
LAB_001df8ad:
MOV RAX,qword ptr [RBP + -0x20]
ADD RAX,0x1
MOV qword ptr [RBP + -0x20],RAX
JMP 0x001df88c
LAB_001df8bb:
MOV RAX,qword ptr [RBP + -0x20]
MOV qword ptr [RBP + -0x40],RAX
MOV RDI,qword ptr [RBP + -0x20]
CALL 0x0012a330
MOV RCX,RAX
MOV RAX,qword ptr [RBP + -0x40]
ADD RAX,RCX
ADD RAX,-0x1
MOV qword ptr [RBP + -0x38],RAX
LAB_001df8de:
LEA RAX,[0x46d4b0]
MOV RAX,qword ptr [RAX + 0x40]
MOV RCX,qword ptr [RBP + -0x38]
MOVZX ECX,byte ptr [RCX + -0x1]
MOVZX EAX,byte ptr [RAX + RCX*0x1 + 0x1]
AND EAX,0x8
CMP EAX,0x0
JZ 0x001df90e
JMP 0x001df900
LAB_001df900:
MOV RAX,qword ptr [RBP + -0x38]
ADD RAX,-0x1
MOV qword ptr [RBP + -0x38],RAX
JMP 0x001df8de
LAB_001df90e:
MOV RAX,qword ptr [RBP + -0x38]
MOV byte ptr [RAX],0x0
MOV RAX,qword ptr [RBP + -0x38]
CMP RAX,qword ptr [RBP + -0x20]
JA 0x001df94d
MOV RAX,qword ptr [0x003c3fe0]
MOV RDI,qword ptr [RAX]
MOV RDX,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RBP + -0x28]
MOV R8D,dword ptr [RBP + -0x2c]
LEA RSI,[0x25a540]
MOV AL,0x0
CALL 0x0012a180
MOV qword ptr [RBP + -0x8],0x0
JMP 0x001df955
LAB_001df94d:
MOV RAX,qword ptr [RBP + -0x20]
MOV qword ptr [RBP + -0x8],RAX
LAB_001df955:
MOV RAX,qword ptr [RBP + -0x8]
ADD RSP,0x40
POP RBP
RET
|
byte * get_argument(int8 param_1,long param_2,long param_3,int8 param_4,uint param_5)
{
byte *pbVar1;
byte *pbVar2;
size_t sVar3;
byte *local_40;
byte *local_28;
byte *local_10;
local_28 = (byte *)(param_2 + -1 + param_3);
while ((PTR_ctype_latin1_0046d4f0[(ulong)*local_28 + 1] & 8) != 0) {
local_28 = local_28 + 1;
}
sVar3 = strlen((char *)local_28);
pbVar2 = local_28 + sVar3;
do {
local_40 = pbVar2 + -1;
pbVar1 = pbVar2 + -2;
pbVar2 = local_40;
} while ((PTR_ctype_latin1_0046d4f0[(ulong)*pbVar1 + 1] & 8) != 0);
*local_40 = 0;
if (local_28 < local_40) {
local_10 = local_28;
}
else {
fprintf(*(FILE **)PTR_stderr_003c3fe0,
"error: Wrong \'!%s\' directive in config file: %s at line %d\n",param_1,param_4,
(ulong)param_5);
local_10 = (byte *)0x0;
}
return local_10;
}
| |
51,870 | translog_fill_overhead_table | eloqsql/storage/maria/ma_loghandler.c | void translog_fill_overhead_table()
{
uint i;
for (i= 0; i < TRANSLOG_FLAGS_NUM; i++)
{
page_overhead[i]= 7;
if (i & TRANSLOG_PAGE_CRC)
page_overhead[i]+= CRC_SIZE;
if (i & TRANSLOG_SECTOR_PROTECTION)
page_overhead[i]+= TRANSLOG_PAGE_SIZE /
DISK_DRIVE_SECTOR_SIZE;
}
} | O3 | c | translog_fill_overhead_table:
pushq %rbp
movq %rsp, %rbp
movaps 0x97cc5(%rip), %xmm0 # 0xe0a60
movaps %xmm0, 0xbb690e(%rip) # 0xbff6b0
movaps %xmm0, 0xbb6917(%rip) # 0xbff6c0
popq %rbp
retq
| translog_fill_overhead_table:
push rbp
mov rbp, rsp
movaps xmm0, cs:xmmword_E0A60
movaps cs:page_overhead, xmm0
movaps cs:xmmword_BFF6C0, xmm0
pop rbp
retn
| void translog_fill_overhead_table()
{
page_overhead = xmmword_E0A60;
xmmword_BFF6C0 = xmmword_E0A60;
}
| translog_fill_overhead_table:
PUSH RBP
MOV RBP,RSP
MOVAPS XMM0,xmmword ptr [0x001e0a60]
MOVAPS xmmword ptr [0x00cff6b0],XMM0
MOVAPS xmmword ptr [0x00cff6c0],XMM0
POP RBP
RET
|
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
void translog_fill_overhead_table(void)
{
page_overhead._0_8_ = _DAT_001e0a60;
page_overhead._8_8_ = _UNK_001e0a68;
page_overhead._16_8_ = _DAT_001e0a60;
page_overhead._24_8_ = _UNK_001e0a68;
return;
}
| |
51,871 | FrozenCLIPEmbedderWithCustomWords::build_graph(ggml_allocr*, std::vector<int, std::allocator<int>>, bool) | 7CodeWizard[P]stablediffusion/clip.hpp | struct ggml_cgraph* build_graph(struct ggml_allocr* allocr, std::vector<int> tokens, bool return_pooled = false) {
// since we are using ggml-alloc, this buffer only needs enough space to hold the ggml_tensor and ggml_cgraph structs, but not the tensor data
static size_t buf_size = ggml_tensor_overhead() * GGML_DEFAULT_GRAPH_SIZE + ggml_graph_overhead();
static std::vector<uint8_t> buf(buf_size);
struct ggml_init_params params = {
/*.mem_size =*/buf_size,
/*.mem_buffer =*/buf.data(),
/*.no_alloc =*/true, // the tensors will be allocated later by ggml_allocr_alloc_graph()
};
struct ggml_context* ctx0 = ggml_init(params);
struct ggml_cgraph* gf = ggml_new_graph(ctx0);
struct ggml_tensor* input_ids = ggml_new_tensor_1d(ctx0, GGML_TYPE_I32, tokens.size());
ggml_allocr_alloc(allocr, input_ids);
if (!ggml_allocr_is_measure(allocr)) {
ggml_backend_tensor_set(input_ids, tokens.data(), 0, tokens.size() * ggml_element_size(input_ids));
}
struct ggml_tensor* input_ids2 = NULL;
size_t max_token_idx = 0;
if (version == VERSION_XL) {
input_ids2 = ggml_new_tensor_1d(ctx0, GGML_TYPE_I32, tokens.size());
ggml_allocr_alloc(allocr, input_ids2);
auto it = std::find(tokens.begin(), tokens.end(), EOS_TOKEN_ID);
if (it != tokens.end()) {
std::fill(std::next(it), tokens.end(), 0);
}
max_token_idx = std::min<size_t>(std::distance(tokens.begin(), it), tokens.size() - 1);
// for (int i = 0; i < tokens.size(); i++) {
// printf("%d ", tokens[i]);
// }
// printf("\n");
if (!ggml_allocr_is_measure(allocr)) {
ggml_backend_tensor_set(input_ids2, tokens.data(), 0, tokens.size() * ggml_element_size(input_ids2));
}
}
struct ggml_tensor* hidden_states = forward(ctx0, input_ids, input_ids2, max_token_idx, return_pooled);
ggml_build_forward_expand(gf, hidden_states);
ggml_free(ctx0);
return gf;
} | O0 | cpp | FrozenCLIPEmbedderWithCustomWords::build_graph(ggml_allocr*, std::vector<int, std::allocator<int>>, bool):
subq $0x188, %rsp # imm = 0x188
movq %rdx, 0x88(%rsp)
movb %cl, %al
movq %rdi, 0x180(%rsp)
movq %rsi, 0x178(%rsp)
movq %rdx, 0x170(%rsp)
andb $0x1, %al
movb %al, 0x16f(%rsp)
movq 0x180(%rsp), %rax
movq %rax, 0x90(%rsp)
cmpb $0x0, 0x1d83cf(%rip) # 0x259c78
jne 0x81908
leaq 0x1d83c6(%rip), %rdi # 0x259c78
callq 0xbda0
cmpl $0x0, %eax
je 0x81908
callq 0x11b480
movq %rax, 0x80(%rsp)
jmp 0x818cb
movq 0x80(%rsp), %rax
shlq $0xb, %rax
movq %rax, 0x70(%rsp)
callq 0x12d820
movq %rax, 0x78(%rsp)
jmp 0x818e8
movq 0x78(%rsp), %rcx
movq 0x70(%rsp), %rax
addq %rcx, %rax
movq %rax, 0x1d8374(%rip) # 0x259c70
leaq 0x1d8375(%rip), %rdi # 0x259c78
callq 0xb480
cmpb $0x0, 0x1d8389(%rip) # 0x259c98
jne 0x8198b
leaq 0x1d8380(%rip), %rdi # 0x259c98
callq 0xbda0
cmpl $0x0, %eax
je 0x8198b
movq 0x1d8347(%rip), %rax # 0x259c70
movq %rax, 0x60(%rsp)
leaq 0x15b(%rsp), %rdi
movq %rdi, 0x68(%rsp)
callq 0x66f40
movq 0x60(%rsp), %rsi
movq 0x68(%rsp), %rdx
leaq 0x1d832f(%rip), %rdi # 0x259c80
callq 0x66f50
jmp 0x81958
leaq 0x15b(%rsp), %rdi
callq 0x66fd0
leaq -0x1a98c(%rip), %rdi # 0x66fe0
leaq 0x1d830d(%rip), %rsi # 0x259c80
leaq 0x156e0e(%rip), %rdx # 0x1d8788
callq 0xb670
leaq 0x1d8312(%rip), %rdi # 0x259c98
callq 0xb480
movq 0x1d82de(%rip), %rax # 0x259c70
movq %rax, 0x140(%rsp)
leaq 0x1d82df(%rip), %rdi # 0x259c80
callq 0x67040
movq %rax, 0x148(%rsp)
movb $0x1, 0x150(%rsp)
movq 0x140(%rsp), %rax
movq %rax, 0x120(%rsp)
movq 0x148(%rsp), %rax
movq %rax, 0x128(%rsp)
movq 0x150(%rsp), %rax
movq %rax, 0x130(%rsp)
leaq 0x120(%rsp), %rax
movq (%rax), %rcx
movq %rcx, (%rsp)
movq 0x8(%rax), %rcx
movq %rcx, 0x8(%rsp)
movq 0x10(%rax), %rax
movq %rax, 0x10(%rsp)
callq 0x11b680
movq %rax, 0x138(%rsp)
movq 0x138(%rsp), %rdi
callq 0x12dcf0
movq 0x88(%rsp), %rdi
movq %rax, 0x118(%rsp)
movq 0x138(%rsp), %rax
movq %rax, 0x58(%rsp)
callq 0x457b0
movq 0x58(%rsp), %rdi
movq %rax, %rdx
movl $0x12, %esi
callq 0x11c880
movq %rax, 0x110(%rsp)
movq 0x178(%rsp), %rdi
movq 0x110(%rsp), %rsi
callq 0x165aa0
movq 0x178(%rsp), %rdi
callq 0x165a60
testb $0x1, %al
jne 0x81b3a
movq 0x88(%rsp), %rdi
movq 0x110(%rsp), %rax
movq %rax, 0x48(%rsp)
callq 0x5da00
movq 0x88(%rsp), %rdi
movq %rax, 0x50(%rsp)
callq 0x457b0
movq %rax, 0x40(%rsp)
movq 0x110(%rsp), %rdi
callq 0x11b1f0
movq 0x40(%rsp), %rcx
movq 0x48(%rsp), %rdi
movq 0x50(%rsp), %rsi
imulq %rax, %rcx
xorl %eax, %eax
movl %eax, %edx
callq 0x166e30
jmp 0x81b3a
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x160(%rsp)
movl %eax, 0x15c(%rsp)
leaq 0x1d817a(%rip), %rdi # 0x259c78
callq 0xb470
jmp 0x81dee
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x160(%rsp)
movl %eax, 0x15c(%rsp)
leaq 0x15b(%rsp), %rdi
callq 0x66fd0
leaq 0x1d8168(%rip), %rdi # 0x259c98
callq 0xb470
jmp 0x81dee
movq 0x90(%rsp), %rax
movq $0x0, 0x108(%rsp)
movq $0x0, 0x100(%rsp)
cmpl $0x2, 0x68(%rax)
jne 0x81d7a
movq 0x88(%rsp), %rdi
movq 0x138(%rsp), %rax
movq %rax, 0x38(%rsp)
callq 0x457b0
movq 0x38(%rsp), %rdi
movq %rax, %rdx
movl $0x12, %esi
callq 0x11c880
movq %rax, 0x108(%rsp)
movq 0x178(%rsp), %rdi
movq 0x108(%rsp), %rsi
callq 0x165aa0
movq 0x88(%rsp), %rdi
callq 0x37ec0
movq 0x88(%rsp), %rdi
movq %rax, 0xf0(%rsp)
callq 0x37ef0
movq %rax, 0xe8(%rsp)
movq 0xf0(%rsp), %rdi
movq 0xe8(%rsp), %rsi
leaq 0xffcee(%rip), %rdx # 0x1818dc
callq 0x457f0
movq 0x88(%rsp), %rdi
movq %rax, 0xf8(%rsp)
callq 0x37ef0
movq %rax, 0xe0(%rsp)
leaq 0xf8(%rsp), %rdi
leaq 0xe0(%rsp), %rsi
callq 0x37f20
testb $0x1, %al
jne 0x81c2b
jmp 0x81c92
movq 0xf8(%rsp), %rax
movq %rax, 0xd0(%rsp)
movq 0xd0(%rsp), %rdi
movl $0x1, %esi
callq 0x81ec0
movq 0x88(%rsp), %rdi
movq %rax, 0xd8(%rsp)
callq 0x37ef0
movq %rax, 0xc8(%rsp)
movl $0x0, 0xc4(%rsp)
movq 0xd8(%rsp), %rdi
movq 0xc8(%rsp), %rsi
leaq 0xc4(%rsp), %rdx
callq 0x81e80
movq 0x88(%rsp), %rdi
callq 0x37ec0
movq %rax, 0xb0(%rsp)
movq 0xf8(%rsp), %rax
movq %rax, 0xa8(%rsp)
movq 0xb0(%rsp), %rdi
movq 0xa8(%rsp), %rsi
callq 0x7e3e0
movq 0x88(%rsp), %rdi
movq %rax, 0xb8(%rsp)
callq 0x457b0
subq $0x1, %rax
movq %rax, 0xa0(%rsp)
leaq 0xb8(%rsp), %rdi
leaq 0xa0(%rsp), %rsi
callq 0x42b80
movq (%rax), %rax
movq %rax, 0x100(%rsp)
movq 0x178(%rsp), %rdi
callq 0x165a60
testb $0x1, %al
jne 0x81d78
movq 0x88(%rsp), %rdi
movq 0x108(%rsp), %rax
movq %rax, 0x28(%rsp)
callq 0x5da00
movq 0x88(%rsp), %rdi
movq %rax, 0x30(%rsp)
callq 0x457b0
movq %rax, 0x20(%rsp)
movq 0x108(%rsp), %rdi
callq 0x11b1f0
movq 0x20(%rsp), %rcx
movq 0x28(%rsp), %rdi
movq 0x30(%rsp), %rsi
imulq %rax, %rcx
xorl %eax, %eax
movl %eax, %edx
callq 0x166e30
jmp 0x81d7a
movq 0x90(%rsp), %rdi
movq 0x138(%rsp), %rsi
movq 0x110(%rsp), %rdx
movq 0x108(%rsp), %rcx
movq 0x100(%rsp), %r8
movb 0x16f(%rsp), %al
andb $0x1, %al
movzbl %al, %r9d
callq 0x81ef0
movq %rax, 0x98(%rsp)
movq 0x118(%rsp), %rdi
movq 0x98(%rsp), %rsi
callq 0x12a100
movq 0x138(%rsp), %rdi
callq 0x11bfa0
movq 0x118(%rsp), %rax
addq $0x188, %rsp # imm = 0x188
retq
movq 0x160(%rsp), %rdi
callq 0xbd30
nopl (%rax,%rax)
| _ZN33FrozenCLIPEmbedderWithCustomWords11build_graphEP11ggml_allocrSt6vectorIiSaIiEEb:
sub rsp, 188h
mov [rsp+188h+var_100], rdx
mov al, cl
mov [rsp+188h+var_8], rdi
mov [rsp+188h+var_10], rsi
mov [rsp+188h+var_18], rdx
and al, 1
mov [rsp+188h+var_19], al
mov rax, [rsp+188h+var_8]
mov [rsp+188h+var_F8], rax
cmp cs:_ZGVZN33FrozenCLIPEmbedderWithCustomWords11build_graphEP11ggml_allocrSt6vectorIiSaIiEEbE8buf_size, 0; `guard variable for'FrozenCLIPEmbedderWithCustomWords::build_graph(ggml_allocr *,std::vector<int>,bool)::buf_size
jnz short loc_81908
lea rdi, _ZGVZN33FrozenCLIPEmbedderWithCustomWords11build_graphEP11ggml_allocrSt6vectorIiSaIiEEbE8buf_size; __guard *
call ___cxa_guard_acquire
cmp eax, 0
jz short loc_81908
call ggml_tensor_overhead
mov [rsp+188h+var_108], rax
jmp short $+2
loc_818CB:
mov rax, [rsp+188h+var_108]
shl rax, 0Bh
mov [rsp+188h+var_118], rax
call ggml_graph_overhead
mov [rsp+188h+var_110], rax
jmp short $+2
loc_818E8:
mov rcx, [rsp+188h+var_110]
mov rax, [rsp+188h+var_118]
add rax, rcx
mov cs:_ZZN33FrozenCLIPEmbedderWithCustomWords11build_graphEP11ggml_allocrSt6vectorIiSaIiEEbE8buf_size, rax; FrozenCLIPEmbedderWithCustomWords::build_graph(ggml_allocr *,std::vector<int>,bool)::buf_size
lea rdi, _ZGVZN33FrozenCLIPEmbedderWithCustomWords11build_graphEP11ggml_allocrSt6vectorIiSaIiEEbE8buf_size; __guard *
call ___cxa_guard_release
loc_81908:
cmp cs:_ZGVZN33FrozenCLIPEmbedderWithCustomWords11build_graphEP11ggml_allocrSt6vectorIiSaIiEEbE3buf, 0; `guard variable for'FrozenCLIPEmbedderWithCustomWords::build_graph(ggml_allocr *,std::vector<int>,bool)::buf
jnz short loc_8198B
lea rdi, _ZGVZN33FrozenCLIPEmbedderWithCustomWords11build_graphEP11ggml_allocrSt6vectorIiSaIiEEbE3buf; __guard *
call ___cxa_guard_acquire
cmp eax, 0
jz short loc_8198B
mov rax, cs:_ZZN33FrozenCLIPEmbedderWithCustomWords11build_graphEP11ggml_allocrSt6vectorIiSaIiEEbE8buf_size; FrozenCLIPEmbedderWithCustomWords::build_graph(ggml_allocr *,std::vector<int>,bool)::buf_size
mov [rsp+188h+var_128], rax
lea rdi, [rsp+188h+var_2D]
mov [rsp+188h+var_120], rdi
call _ZNSaIhEC2Ev; std::allocator<uchar>::allocator(void)
mov rsi, [rsp+188h+var_128]
mov rdx, [rsp+188h+var_120]
lea rdi, _ZZN33FrozenCLIPEmbedderWithCustomWords11build_graphEP11ggml_allocrSt6vectorIiSaIiEEbE3buf; FrozenCLIPEmbedderWithCustomWords::build_graph(ggml_allocr *,std::vector<int>,bool)::buf
call _ZNSt6vectorIhSaIhEEC2EmRKS0_; std::vector<uchar>::vector(ulong,std::allocator<uchar> const&)
jmp short $+2
loc_81958:
lea rdi, [rsp+188h+var_2D]
call _ZNSaIhED2Ev; std::allocator<uchar>::~allocator()
lea rdi, _ZNSt6vectorIhSaIhEED2Ev; lpfunc
lea rsi, _ZZN33FrozenCLIPEmbedderWithCustomWords11build_graphEP11ggml_allocrSt6vectorIiSaIiEEbE3buf; obj
lea rdx, __dso_handle; lpdso_handle
call ___cxa_atexit
lea rdi, _ZGVZN33FrozenCLIPEmbedderWithCustomWords11build_graphEP11ggml_allocrSt6vectorIiSaIiEEbE3buf; __guard *
call ___cxa_guard_release
loc_8198B:
mov rax, cs:_ZZN33FrozenCLIPEmbedderWithCustomWords11build_graphEP11ggml_allocrSt6vectorIiSaIiEEbE8buf_size; FrozenCLIPEmbedderWithCustomWords::build_graph(ggml_allocr *,std::vector<int>,bool)::buf_size
mov [rsp+188h+var_48], rax
lea rdi, _ZZN33FrozenCLIPEmbedderWithCustomWords11build_graphEP11ggml_allocrSt6vectorIiSaIiEEbE3buf; FrozenCLIPEmbedderWithCustomWords::build_graph(ggml_allocr *,std::vector<int>,bool)::buf
call _ZNSt6vectorIhSaIhEE4dataEv; std::vector<uchar>::data(void)
mov [rsp+188h+var_40], rax
mov byte ptr [rsp+188h+var_38], 1
mov rax, [rsp+188h+var_48]
mov [rsp+188h+var_68], rax
mov rax, [rsp+188h+var_40]
mov [rsp+188h+var_60], rax
mov rax, [rsp+188h+var_38]
mov [rsp+188h+var_58], rax
lea rax, [rsp+188h+var_68]
mov rcx, [rax]
mov [rsp+188h+var_188], rcx
mov rcx, [rax+8]
mov [rsp+188h+var_180], rcx
mov rax, [rax+10h]
mov [rsp+188h+var_178], rax
call ggml_init
mov [rsp+188h+var_50], rax
mov rdi, [rsp+188h+var_50]
call ggml_new_graph
mov rdi, [rsp+188h+var_100]
mov [rsp+188h+var_70], rax
mov rax, [rsp+188h+var_50]
mov [rsp+188h+var_130], rax
call _ZNKSt6vectorIiSaIiEE4sizeEv; std::vector<int>::size(void)
mov rdi, [rsp+188h+var_130]
mov rdx, rax
mov esi, 12h
call ggml_new_tensor_1d
mov [rsp+188h+var_78], rax
mov rdi, [rsp+188h+var_10]
mov rsi, [rsp+188h+var_78]
call ggml_allocr_alloc
mov rdi, [rsp+188h+var_10]
call ggml_allocr_is_measure
test al, 1
jnz loc_81B3A
mov rdi, [rsp+188h+var_100]
mov rax, [rsp+188h+var_78]
mov [rsp+188h+var_140], rax
call _ZNSt6vectorIiSaIiEE4dataEv; std::vector<int>::data(void)
mov rdi, [rsp+188h+var_100]
mov [rsp+188h+var_138], rax
call _ZNKSt6vectorIiSaIiEE4sizeEv; std::vector<int>::size(void)
mov [rsp+188h+var_148], rax
mov rdi, [rsp+188h+var_78]
call ggml_element_size
mov rcx, [rsp+188h+var_148]
mov rdi, [rsp+188h+var_140]
mov rsi, [rsp+188h+var_138]
imul rcx, rax
xor eax, eax
mov edx, eax
call ggml_backend_tensor_set
jmp short loc_81B3A
mov rcx, rax
mov eax, edx
mov [rsp+arg_158], rcx
mov [rsp+arg_154], eax
lea rdi, _ZGVZN33FrozenCLIPEmbedderWithCustomWords11build_graphEP11ggml_allocrSt6vectorIiSaIiEEbE8buf_size; __guard *
call ___cxa_guard_abort
jmp loc_81DEE
mov rcx, rax
mov eax, edx
mov [rsp+arg_158], rcx
mov [rsp+arg_154], eax
lea rdi, [rsp+arg_153]
call _ZNSaIhED2Ev; std::allocator<uchar>::~allocator()
lea rdi, _ZGVZN33FrozenCLIPEmbedderWithCustomWords11build_graphEP11ggml_allocrSt6vectorIiSaIiEEbE3buf; __guard *
call ___cxa_guard_abort
jmp loc_81DEE
loc_81B3A:
mov rax, [rsp+188h+var_F8]
mov [rsp+188h+var_80], 0
mov [rsp+188h+var_88], 0
cmp dword ptr [rax+68h], 2
jnz loc_81D7A
mov rdi, [rsp+188h+var_100]
mov rax, [rsp+188h+var_50]
mov [rsp+188h+var_150], rax
call _ZNKSt6vectorIiSaIiEE4sizeEv; std::vector<int>::size(void)
mov rdi, [rsp+188h+var_150]
mov rdx, rax
mov esi, 12h
call ggml_new_tensor_1d
mov [rsp+188h+var_80], rax
mov rdi, [rsp+188h+var_10]
mov rsi, [rsp+188h+var_80]
call ggml_allocr_alloc
mov rdi, [rsp+188h+var_100]
call _ZNSt6vectorIiSaIiEE5beginEv; std::vector<int>::begin(void)
mov rdi, [rsp+188h+var_100]
mov [rsp+188h+var_98], rax
call _ZNSt6vectorIiSaIiEE3endEv; std::vector<int>::end(void)
mov [rsp+188h+var_A0], rax
mov rdi, [rsp+188h+var_98]
mov rsi, [rsp+188h+var_A0]
lea rdx, _ZL12EOS_TOKEN_ID; EOS_TOKEN_ID
call _ZSt4findIN9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEEiET_S7_S7_RKT0_; std::find<__gnu_cxx::__normal_iterator<int *,std::vector<int>>,int>(__gnu_cxx::__normal_iterator<int *,std::vector<int>>,__gnu_cxx::__normal_iterator<int *,std::vector<int>>,int const&)
mov rdi, [rsp+188h+var_100]
mov [rsp+188h+var_90], rax
call _ZNSt6vectorIiSaIiEE3endEv; std::vector<int>::end(void)
mov [rsp+188h+var_A8], rax
lea rdi, [rsp+188h+var_90]
lea rsi, [rsp+188h+var_A8]
call _ZN9__gnu_cxxneIPiSt6vectorIiSaIiEEEEbRKNS_17__normal_iteratorIT_T0_EESA_; __gnu_cxx::operator!=<int *,std::vector<int>>(__gnu_cxx::__normal_iterator<int *,std::vector<int>> const&,__gnu_cxx::__normal_iterator<int *,std::vector<int>> const&)
test al, 1
jnz short loc_81C2B
jmp short loc_81C92
loc_81C2B:
mov rax, [rsp+188h+var_90]
mov [rsp+188h+var_B8], rax
mov rdi, [rsp+188h+var_B8]
mov esi, 1
call _ZSt4nextIN9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEEET_S7_NSt15iterator_traitsIS7_E15difference_typeE; std::next<__gnu_cxx::__normal_iterator<int *,std::vector<int>>>(__gnu_cxx::__normal_iterator<int *,std::vector<int>>,std::iterator_traits<__gnu_cxx::__normal_iterator<int *,std::vector<int>>>::difference_type)
mov rdi, [rsp+188h+var_100]
mov [rsp+188h+var_B0], rax
call _ZNSt6vectorIiSaIiEE3endEv; std::vector<int>::end(void)
mov [rsp+188h+var_C0], rax
mov [rsp+188h+var_C4], 0
mov rdi, [rsp+188h+var_B0]
mov rsi, [rsp+188h+var_C0]
lea rdx, [rsp+188h+var_C4]
call _ZSt4fillIN9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEEiEvT_S7_RKT0_; std::fill<__gnu_cxx::__normal_iterator<int *,std::vector<int>>,int>(__gnu_cxx::__normal_iterator<int *,std::vector<int>>,__gnu_cxx::__normal_iterator<int *,std::vector<int>>,int const&)
loc_81C92:
mov rdi, [rsp+188h+var_100]
call _ZNSt6vectorIiSaIiEE5beginEv; std::vector<int>::begin(void)
mov [rsp+188h+var_D8], rax
mov rax, [rsp+188h+var_90]
mov [rsp+188h+var_E0], rax
mov rdi, [rsp+188h+var_D8]
mov rsi, [rsp+188h+var_E0]
call _ZSt8distanceIN9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEEENSt15iterator_traitsIT_E15difference_typeES8_S8_; std::distance<__gnu_cxx::__normal_iterator<int *,std::vector<int>>>(__gnu_cxx::__normal_iterator<int *,std::vector<int>>,__gnu_cxx::__normal_iterator<int *,std::vector<int>>)
mov rdi, [rsp+188h+var_100]
mov [rsp+188h+var_D0], rax
call _ZNKSt6vectorIiSaIiEE4sizeEv; std::vector<int>::size(void)
sub rax, 1
mov [rsp+188h+var_E8], rax
lea rdi, [rsp+188h+var_D0]
lea rsi, [rsp+188h+var_E8]
call _ZSt3minImERKT_S2_S2_; std::min<ulong>(ulong const&,ulong const&)
mov rax, [rax]
mov [rsp+188h+var_88], rax
mov rdi, [rsp+188h+var_10]
call ggml_allocr_is_measure
test al, 1
jnz short loc_81D78
mov rdi, [rsp+188h+var_100]
mov rax, [rsp+188h+var_80]
mov [rsp+188h+var_160], rax
call _ZNSt6vectorIiSaIiEE4dataEv; std::vector<int>::data(void)
mov rdi, [rsp+188h+var_100]
mov [rsp+188h+var_158], rax
call _ZNKSt6vectorIiSaIiEE4sizeEv; std::vector<int>::size(void)
mov [rsp+188h+var_168], rax
mov rdi, [rsp+188h+var_80]
call ggml_element_size
mov rcx, [rsp+188h+var_168]
mov rdi, [rsp+188h+var_160]
mov rsi, [rsp+188h+var_158]
imul rcx, rax
xor eax, eax
mov edx, eax
call ggml_backend_tensor_set
loc_81D78:
jmp short $+2
loc_81D7A:
mov rdi, [rsp+188h+var_F8]
mov rsi, [rsp+188h+var_50]
mov rdx, [rsp+188h+var_78]
mov rcx, [rsp+188h+var_80]
mov r8, [rsp+188h+var_88]
mov al, [rsp+188h+var_19]
and al, 1
movzx r9d, al
call _ZN33FrozenCLIPEmbedderWithCustomWords7forwardEP12ggml_contextP11ggml_tensorS3_mb; FrozenCLIPEmbedderWithCustomWords::forward(ggml_context *,ggml_tensor *,ggml_tensor *,ulong,bool)
mov [rsp+188h+var_F0], rax
mov rdi, [rsp+188h+var_70]
mov rsi, [rsp+188h+var_F0]
call ggml_build_forward_expand
mov rdi, [rsp+188h+var_50]
call ggml_free
mov rax, [rsp+188h+var_70]
add rsp, 188h
retn
loc_81DEE:
mov rdi, [rsp+arg_158]
call __Unwind_Resume
| long long FrozenCLIPEmbedderWithCustomWords::build_graph(
long long a1,
_QWORD *a2,
_QWORD *a3,
char a4,
double a5)
{
int v5; // edx
int v6; // r8d
int v7; // r9d
long long v8; // rax
long long v9; // rax
long long v10; // rax
long long v11; // rax
long long v13; // [rsp+20h] [rbp-168h]
long long v14; // [rsp+28h] [rbp-160h]
long long v15; // [rsp+30h] [rbp-158h]
long long v16; // [rsp+40h] [rbp-148h]
long long v17; // [rsp+50h] [rbp-138h]
long long v18; // [rsp+60h] [rbp-128h]
long long v19; // [rsp+70h] [rbp-118h]
long long v21; // [rsp+98h] [rbp-F0h]
_QWORD v22[2]; // [rsp+A0h] [rbp-E8h] BYREF
long long v23; // [rsp+B0h] [rbp-D8h]
long long v24; // [rsp+B8h] [rbp-D0h] BYREF
int v25; // [rsp+C4h] [rbp-C4h] BYREF
long long v26; // [rsp+C8h] [rbp-C0h]
long long v27; // [rsp+D0h] [rbp-B8h]
long long v28; // [rsp+D8h] [rbp-B0h]
long long v29; // [rsp+E0h] [rbp-A8h] BYREF
long long v30; // [rsp+E8h] [rbp-A0h]
long long v31; // [rsp+F0h] [rbp-98h]
long long v32; // [rsp+F8h] [rbp-90h] BYREF
long long v33; // [rsp+100h] [rbp-88h]
long long v34; // [rsp+108h] [rbp-80h]
long long v35; // [rsp+110h] [rbp-78h]
long long v36; // [rsp+118h] [rbp-70h]
long long v37; // [rsp+120h] [rbp-68h]
long long v38; // [rsp+128h] [rbp-60h]
long long v39; // [rsp+130h] [rbp-58h]
long long v40; // [rsp+138h] [rbp-50h]
long long v41; // [rsp+140h] [rbp-48h]
long long v42; // [rsp+148h] [rbp-40h]
long long v43; // [rsp+150h] [rbp-38h]
_BYTE v44[20]; // [rsp+15Bh] [rbp-2Dh] BYREF
char v45; // [rsp+16Fh] [rbp-19h]
_QWORD *v46; // [rsp+170h] [rbp-18h]
void *v47; // [rsp+178h] [rbp-10h]
long long v48; // [rsp+180h] [rbp-8h]
v48 = a1;
v47 = a2;
v46 = a3;
v45 = a4 & 1;
if ( !(_BYTE)`guard variable for'FrozenCLIPEmbedderWithCustomWords::build_graph(ggml_allocr *,std::vector<int>,bool)::buf_size
&& __cxa_guard_acquire(&`guard variable for'FrozenCLIPEmbedderWithCustomWords::build_graph(ggml_allocr *,std::vector<int>,bool)::buf_size) )
{
v19 = ggml_tensor_overhead(a5) << 11;
FrozenCLIPEmbedderWithCustomWords::build_graph(ggml_allocr *,std::vector<int>,bool)::buf_size = ggml_graph_overhead() + v19;
__cxa_guard_release(&`guard variable for'FrozenCLIPEmbedderWithCustomWords::build_graph(ggml_allocr *,std::vector<int>,bool)::buf_size);
}
if ( !(_BYTE)`guard variable for'FrozenCLIPEmbedderWithCustomWords::build_graph(ggml_allocr *,std::vector<int>,bool)::buf
&& __cxa_guard_acquire(&`guard variable for'FrozenCLIPEmbedderWithCustomWords::build_graph(ggml_allocr *,std::vector<int>,bool)::buf) )
{
v18 = FrozenCLIPEmbedderWithCustomWords::build_graph(ggml_allocr *,std::vector<int>,bool)::buf_size;
std::allocator<unsigned char>::allocator((long long)v44);
std::vector<unsigned char>::vector(
(long long)FrozenCLIPEmbedderWithCustomWords::build_graph(ggml_allocr *,std::vector<int>,bool)::buf,
v18,
(long long)v44);
std::allocator<unsigned char>::~allocator((long long)v44);
a2 = FrozenCLIPEmbedderWithCustomWords::build_graph(ggml_allocr *,std::vector<int>,bool)::buf;
__cxa_atexit(
(void (*)(void *))std::vector<unsigned char>::~vector,
FrozenCLIPEmbedderWithCustomWords::build_graph(ggml_allocr *,std::vector<int>,bool)::buf,
&_dso_handle);
__cxa_guard_release(&`guard variable for'FrozenCLIPEmbedderWithCustomWords::build_graph(ggml_allocr *,std::vector<int>,bool)::buf);
}
v41 = FrozenCLIPEmbedderWithCustomWords::build_graph(ggml_allocr *,std::vector<int>,bool)::buf_size;
v42 = std::vector<unsigned char>::data(FrozenCLIPEmbedderWithCustomWords::build_graph(ggml_allocr *,std::vector<int>,bool)::buf);
LOBYTE(v43) = 1;
v37 = v41;
v38 = v42;
v39 = v43;
v40 = ggml_init(
(unsigned int)FrozenCLIPEmbedderWithCustomWords::build_graph(ggml_allocr *,std::vector<int>,bool)::buf,
(_DWORD)a2,
v5,
v42,
v6,
v7,
v41,
v42,
v43);
v36 = ggml_new_graph(v40);
v8 = std::vector<int>::size(a3);
v35 = ggml_new_tensor_1d(v40, 18LL, v8);
ggml_allocr_alloc(v47, v35);
if ( (ggml_allocr_is_measure(v47) & 1) == 0 )
{
v17 = std::vector<int>::data(a3);
v16 = std::vector<int>::size(a3);
v9 = ggml_element_size(v35);
ggml_backend_tensor_set(v35, v17, 0LL, v9 * v16);
}
v34 = 0LL;
v33 = 0LL;
if ( *(_DWORD *)(a1 + 104) == 2 )
{
v10 = std::vector<int>::size(a3);
v34 = ggml_new_tensor_1d(v40, 18LL, v10);
ggml_allocr_alloc(v47, v34);
v31 = std::vector<int>::begin((long long)a3);
v30 = std::vector<int>::end((long long)a3);
v32 = std::find<__gnu_cxx::__normal_iterator<int *,std::vector<int>>,int>(v31, v30, (long long)&EOS_TOKEN_ID);
v29 = std::vector<int>::end((long long)a3);
if ( __gnu_cxx::operator!=<int *,std::vector<int>>((long long)&v32, (long long)&v29) )
{
v27 = v32;
v28 = std::next<__gnu_cxx::__normal_iterator<int *,std::vector<int>>>(v32, 1LL);
v26 = std::vector<int>::end((long long)a3);
v25 = 0;
std::fill<__gnu_cxx::__normal_iterator<int *,std::vector<int>>,int>(v28, v26, &v25);
}
v23 = std::vector<int>::begin((long long)a3);
v22[1] = v32;
v24 = std::distance<__gnu_cxx::__normal_iterator<int *,std::vector<int>>>(v23, v32);
v22[0] = std::vector<int>::size(a3) - 1;
v33 = *std::min<unsigned long>(&v24, v22);
if ( (ggml_allocr_is_measure(v47) & 1) == 0 )
{
v14 = v34;
v15 = std::vector<int>::data(a3);
v13 = std::vector<int>::size(a3);
v11 = ggml_element_size(v34);
ggml_backend_tensor_set(v14, v15, 0LL, v11 * v13);
}
}
v21 = FrozenCLIPEmbedderWithCustomWords::forward(a1, v40, v35, v34, v33, v45 & 1);
ggml_build_forward_expand(v36, v21);
ggml_free(v40);
return v36;
}
| build_graph:
SUB RSP,0x188
MOV qword ptr [RSP + 0x88],RDX
MOV AL,CL
MOV qword ptr [RSP + 0x180],RDI
MOV qword ptr [RSP + 0x178],RSI
MOV qword ptr [RSP + 0x170],RDX
AND AL,0x1
MOV byte ptr [RSP + 0x16f],AL
MOV RAX,qword ptr [RSP + 0x180]
MOV qword ptr [RSP + 0x90],RAX
CMP byte ptr [0x00359c78],0x0
JNZ 0x00181908
LEA RDI,[0x359c78]
CALL 0x0010bda0
CMP EAX,0x0
JZ 0x00181908
LAB_001818bc:
CALL 0x0021b480
MOV qword ptr [RSP + 0x80],RAX
JMP 0x001818cb
LAB_001818cb:
MOV RAX,qword ptr [RSP + 0x80]
SHL RAX,0xb
MOV qword ptr [RSP + 0x70],RAX
CALL 0x0022d820
MOV qword ptr [RSP + 0x78],RAX
JMP 0x001818e8
LAB_001818e8:
MOV RCX,qword ptr [RSP + 0x78]
MOV RAX,qword ptr [RSP + 0x70]
ADD RAX,RCX
MOV qword ptr [0x00359c70],RAX
LEA RDI,[0x359c78]
CALL 0x0010b480
LAB_00181908:
CMP byte ptr [0x00359c98],0x0
JNZ 0x0018198b
LEA RDI,[0x359c98]
CALL 0x0010bda0
CMP EAX,0x0
JZ 0x0018198b
MOV RAX,qword ptr [0x00359c70]
MOV qword ptr [RSP + 0x60],RAX
LEA RDI,[RSP + 0x15b]
MOV qword ptr [RSP + 0x68],RDI
CALL 0x00166f40
MOV RSI,qword ptr [RSP + 0x60]
MOV RDX,qword ptr [RSP + 0x68]
LAB_0018194a:
LEA RDI,[0x359c80]
CALL 0x00166f50
LAB_00181956:
JMP 0x00181958
LAB_00181958:
LEA RDI,[RSP + 0x15b]
CALL 0x00166fd0
LEA RDI,[0x166fe0]
LEA RSI,[0x359c80]
LEA RDX,[0x2d8788]
CALL 0x0010b670
LEA RDI,[0x359c98]
CALL 0x0010b480
LAB_0018198b:
MOV RAX,qword ptr [0x00359c70]
MOV qword ptr [RSP + 0x140],RAX
LEA RDI,[0x359c80]
CALL 0x00167040
MOV qword ptr [RSP + 0x148],RAX
MOV byte ptr [RSP + 0x150],0x1
MOV RAX,qword ptr [RSP + 0x140]
MOV qword ptr [RSP + 0x120],RAX
MOV RAX,qword ptr [RSP + 0x148]
MOV qword ptr [RSP + 0x128],RAX
MOV RAX,qword ptr [RSP + 0x150]
MOV qword ptr [RSP + 0x130],RAX
LEA RAX,[RSP + 0x120]
MOV RCX,qword ptr [RAX]
MOV qword ptr [RSP],RCX
MOV RCX,qword ptr [RAX + 0x8]
MOV qword ptr [RSP + 0x8],RCX
MOV RAX,qword ptr [RAX + 0x10]
MOV qword ptr [RSP + 0x10],RAX
CALL 0x0021b680
MOV qword ptr [RSP + 0x138],RAX
MOV RDI,qword ptr [RSP + 0x138]
CALL 0x0022dcf0
MOV RDI,qword ptr [RSP + 0x88]
MOV qword ptr [RSP + 0x118],RAX
MOV RAX,qword ptr [RSP + 0x138]
MOV qword ptr [RSP + 0x58],RAX
CALL 0x001457b0
MOV RDI,qword ptr [RSP + 0x58]
MOV RDX,RAX
MOV ESI,0x12
CALL 0x0021c880
MOV qword ptr [RSP + 0x110],RAX
MOV RDI,qword ptr [RSP + 0x178]
MOV RSI,qword ptr [RSP + 0x110]
CALL 0x00265aa0
MOV RDI,qword ptr [RSP + 0x178]
CALL 0x00265a60
TEST AL,0x1
JNZ 0x00181b3a
MOV RDI,qword ptr [RSP + 0x88]
MOV RAX,qword ptr [RSP + 0x110]
MOV qword ptr [RSP + 0x48],RAX
CALL 0x0015da00
MOV RDI,qword ptr [RSP + 0x88]
MOV qword ptr [RSP + 0x50],RAX
CALL 0x001457b0
MOV qword ptr [RSP + 0x40],RAX
MOV RDI,qword ptr [RSP + 0x110]
CALL 0x0021b1f0
MOV RCX,qword ptr [RSP + 0x40]
MOV RDI,qword ptr [RSP + 0x48]
MOV RSI,qword ptr [RSP + 0x50]
IMUL RCX,RAX
XOR EAX,EAX
MOV EDX,EAX
CALL 0x00266e30
JMP 0x00181b3a
LAB_00181b3a:
MOV RAX,qword ptr [RSP + 0x90]
MOV qword ptr [RSP + 0x108],0x0
MOV qword ptr [RSP + 0x100],0x0
CMP dword ptr [RAX + 0x68],0x2
JNZ 0x00181d7a
MOV RDI,qword ptr [RSP + 0x88]
MOV RAX,qword ptr [RSP + 0x138]
MOV qword ptr [RSP + 0x38],RAX
CALL 0x001457b0
MOV RDI,qword ptr [RSP + 0x38]
MOV RDX,RAX
MOV ESI,0x12
CALL 0x0021c880
MOV qword ptr [RSP + 0x108],RAX
MOV RDI,qword ptr [RSP + 0x178]
MOV RSI,qword ptr [RSP + 0x108]
CALL 0x00265aa0
MOV RDI,qword ptr [RSP + 0x88]
CALL 0x00137ec0
MOV RDI,qword ptr [RSP + 0x88]
MOV qword ptr [RSP + 0xf0],RAX
CALL 0x00137ef0
MOV qword ptr [RSP + 0xe8],RAX
MOV RDI,qword ptr [RSP + 0xf0]
MOV RSI,qword ptr [RSP + 0xe8]
LEA RDX,[0x2818dc]
CALL 0x001457f0
MOV RDI,qword ptr [RSP + 0x88]
MOV qword ptr [RSP + 0xf8],RAX
CALL 0x00137ef0
MOV qword ptr [RSP + 0xe0],RAX
LEA RDI,[RSP + 0xf8]
LEA RSI,[RSP + 0xe0]
CALL 0x00137f20
TEST AL,0x1
JNZ 0x00181c2b
JMP 0x00181c92
LAB_00181c2b:
MOV RAX,qword ptr [RSP + 0xf8]
MOV qword ptr [RSP + 0xd0],RAX
MOV RDI,qword ptr [RSP + 0xd0]
MOV ESI,0x1
CALL 0x00181ec0
MOV RDI,qword ptr [RSP + 0x88]
MOV qword ptr [RSP + 0xd8],RAX
CALL 0x00137ef0
MOV qword ptr [RSP + 0xc8],RAX
MOV dword ptr [RSP + 0xc4],0x0
MOV RDI,qword ptr [RSP + 0xd8]
MOV RSI,qword ptr [RSP + 0xc8]
LEA RDX,[RSP + 0xc4]
CALL 0x00181e80
LAB_00181c92:
MOV RDI,qword ptr [RSP + 0x88]
CALL 0x00137ec0
MOV qword ptr [RSP + 0xb0],RAX
MOV RAX,qword ptr [RSP + 0xf8]
MOV qword ptr [RSP + 0xa8],RAX
MOV RDI,qword ptr [RSP + 0xb0]
MOV RSI,qword ptr [RSP + 0xa8]
CALL 0x0017e3e0
MOV RDI,qword ptr [RSP + 0x88]
MOV qword ptr [RSP + 0xb8],RAX
CALL 0x001457b0
SUB RAX,0x1
MOV qword ptr [RSP + 0xa0],RAX
LEA RDI,[RSP + 0xb8]
LEA RSI,[RSP + 0xa0]
CALL 0x00142b80
MOV RAX,qword ptr [RAX]
MOV qword ptr [RSP + 0x100],RAX
MOV RDI,qword ptr [RSP + 0x178]
CALL 0x00265a60
TEST AL,0x1
JNZ 0x00181d78
MOV RDI,qword ptr [RSP + 0x88]
MOV RAX,qword ptr [RSP + 0x108]
MOV qword ptr [RSP + 0x28],RAX
CALL 0x0015da00
MOV RDI,qword ptr [RSP + 0x88]
MOV qword ptr [RSP + 0x30],RAX
CALL 0x001457b0
MOV qword ptr [RSP + 0x20],RAX
MOV RDI,qword ptr [RSP + 0x108]
CALL 0x0021b1f0
MOV RCX,qword ptr [RSP + 0x20]
MOV RDI,qword ptr [RSP + 0x28]
MOV RSI,qword ptr [RSP + 0x30]
IMUL RCX,RAX
XOR EAX,EAX
MOV EDX,EAX
CALL 0x00266e30
LAB_00181d78:
JMP 0x00181d7a
LAB_00181d7a:
MOV RDI,qword ptr [RSP + 0x90]
MOV RSI,qword ptr [RSP + 0x138]
MOV RDX,qword ptr [RSP + 0x110]
MOV RCX,qword ptr [RSP + 0x108]
MOV R8,qword ptr [RSP + 0x100]
MOV AL,byte ptr [RSP + 0x16f]
AND AL,0x1
MOVZX R9D,AL
CALL 0x00181ef0
MOV qword ptr [RSP + 0x98],RAX
MOV RDI,qword ptr [RSP + 0x118]
MOV RSI,qword ptr [RSP + 0x98]
CALL 0x0022a100
MOV RDI,qword ptr [RSP + 0x138]
CALL 0x0021bfa0
MOV RAX,qword ptr [RSP + 0x118]
ADD RSP,0x188
RET
|
/* FrozenCLIPEmbedderWithCustomWords::build_graph(ggml_allocr*, std::vector<int, std::allocator<int>
>, bool) */
int8 __thiscall
FrozenCLIPEmbedderWithCustomWords::build_graph
(FrozenCLIPEmbedderWithCustomWords *this,int8 param_1,
vector<int,std::allocator<int>> *param_3,byte param_4)
{
ggml_tensor *pgVar1;
ggml_context *pgVar2;
bool bVar3;
int iVar4;
long lVar5;
long lVar6;
int8 uVar7;
ulong uVar8;
ulong *puVar9;
ulong local_e8;
int8 local_e0;
int8 local_d8;
ulong local_d0;
int4 local_c4;
int8 local_c0;
int8 local_b8;
int8 local_b0;
int8 local_a8;
int8 local_a0;
int8 local_98;
int8 local_90;
ulong local_88;
ggml_tensor *local_80;
ggml_tensor *local_78;
int8 local_70;
ulong local_68;
int8 local_60;
int8 local_58;
ggml_context *local_50;
ulong local_48;
int8 local_40;
int1 local_38;
int7 uStack_37;
allocator<unsigned_char> local_2d [20];
byte local_19;
vector<int,std::allocator<int>> *local_18;
int8 local_10;
FrozenCLIPEmbedderWithCustomWords *local_8;
local_19 = param_4 & 1;
local_18 = param_3;
local_10 = param_1;
local_8 = this;
if ((build_graph(ggml_allocr*,std::vector<int,std::allocator<int>>,bool)::buf_size == '\0') &&
(iVar4 = __cxa_guard_acquire(&build_graph(ggml_allocr*,std::vector<int,std::allocator<int>>,bool)
::buf_size), iVar4 != 0)) {
/* try { // try from 001818bc to 001818e0 has its CatchHandler @ 00181ae3 */
lVar5 = ggml_tensor_overhead();
lVar6 = ggml_graph_overhead();
build_graph(ggml_allocr*,std::vector<int,std::allocator<int>>,bool)::buf_size =
lVar5 * 0x800 + lVar6;
__cxa_guard_release(&build_graph(ggml_allocr*,std::vector<int,std::allocator<int>>,bool)::
buf_size);
}
if ((build_graph(ggml_allocr*,std::vector<int,std::allocator<int>>,bool)::buf == '\0') &&
(iVar4 = __cxa_guard_acquire(&build_graph(ggml_allocr*,std::vector<int,std::allocator<int>>,bool)
::buf),
uVar8 = build_graph(ggml_allocr*,std::vector<int,std::allocator<int>>,bool)::buf_size,
iVar4 != 0)) {
std::allocator<unsigned_char>::allocator(local_2d);
/* try { // try from 0018194a to 00181955 has its CatchHandler @ 00181b08 */
std::vector<unsigned_char,std::allocator<unsigned_char>>::vector
((vector<unsigned_char,std::allocator<unsigned_char>> *)
build_graph(ggml_allocr*,std::vector<int,std::allocator<int>>,bool)::buf,uVar8,
(allocator *)local_2d);
std::allocator<unsigned_char>::~allocator(local_2d);
__cxa_atexit(std::vector<unsigned_char,std::allocator<unsigned_char>>::~vector,
build_graph(ggml_allocr*,std::vector<int,std::allocator<int>>,bool)::buf,
&__dso_handle);
__cxa_guard_release(&build_graph(ggml_allocr*,std::vector<int,std::allocator<int>>,bool)::buf);
}
local_48 = build_graph(ggml_allocr*,std::vector<int,std::allocator<int>>,bool)::buf_size;
local_60 = std::vector<unsigned_char,std::allocator<unsigned_char>>::data
((vector<unsigned_char,std::allocator<unsigned_char>> *)
build_graph(ggml_allocr*,std::vector<int,std::allocator<int>>,bool)::buf);
local_38 = 1;
local_68 = local_48;
local_58 = CONCAT71(uStack_37,1);
local_40 = local_60;
local_50 = (ggml_context *)ggml_init();
local_70 = ggml_new_graph(local_50);
pgVar2 = local_50;
uVar7 = std::vector<int,std::allocator<int>>::size(param_3);
local_78 = (ggml_tensor *)ggml_new_tensor_1d(pgVar2,0x12,uVar7);
ggml_allocr_alloc(local_10,local_78);
uVar8 = ggml_allocr_is_measure(local_10);
pgVar1 = local_78;
if ((uVar8 & 1) == 0) {
uVar7 = std::vector<int,std::allocator<int>>::data(param_3);
lVar5 = std::vector<int,std::allocator<int>>::size(param_3);
lVar6 = ggml_element_size(local_78);
ggml_backend_tensor_set(pgVar1,uVar7,0,lVar5 * lVar6);
}
pgVar2 = local_50;
local_80 = (ggml_tensor *)0x0;
local_88 = 0;
if (*(int *)(this + 0x68) == 2) {
uVar7 = std::vector<int,std::allocator<int>>::size(param_3);
local_80 = (ggml_tensor *)ggml_new_tensor_1d(pgVar2,0x12,uVar7);
ggml_allocr_alloc(local_10,local_80);
local_98 = std::vector<int,std::allocator<int>>::begin(param_3);
local_a0 = std::vector<int,std::allocator<int>>::end(param_3);
local_90 = std::
find<__gnu_cxx::__normal_iterator<int*,std::vector<int,std::allocator<int>>>,int>
(local_98,local_a0,&EOS_TOKEN_ID);
local_a8 = std::vector<int,std::allocator<int>>::end(param_3);
bVar3 = __gnu_cxx::operator!=((__normal_iterator *)&local_90,(__normal_iterator *)&local_a8);
if (bVar3) {
local_b8 = local_90;
local_b0 = std::next<__gnu_cxx::__normal_iterator<int*,std::vector<int,std::allocator<int>>>>
(local_90,1);
local_c0 = std::vector<int,std::allocator<int>>::end(param_3);
local_c4 = 0;
std::fill<__gnu_cxx::__normal_iterator<int*,std::vector<int,std::allocator<int>>>,int>
(local_b0,local_c0,&local_c4);
}
local_d8 = std::vector<int,std::allocator<int>>::begin(param_3);
local_e0 = local_90;
local_d0 = std::
distance<__gnu_cxx::__normal_iterator<int*,std::vector<int,std::allocator<int>>>>
(local_d8,local_90);
lVar5 = std::vector<int,std::allocator<int>>::size(param_3);
local_e8 = lVar5 - 1;
puVar9 = std::min<unsigned_long>(&local_d0,&local_e8);
local_88 = *puVar9;
uVar8 = ggml_allocr_is_measure(local_10);
pgVar1 = local_80;
if ((uVar8 & 1) == 0) {
uVar7 = std::vector<int,std::allocator<int>>::data(param_3);
lVar5 = std::vector<int,std::allocator<int>>::size(param_3);
lVar6 = ggml_element_size(local_80);
ggml_backend_tensor_set(pgVar1,uVar7,0,lVar5 * lVar6);
}
}
uVar7 = forward(this,local_50,local_78,local_80,local_88,(bool)(local_19 & 1));
ggml_build_forward_expand(local_70,uVar7);
ggml_free(local_50);
return local_70;
}
| |
51,872 | FrozenCLIPEmbedderWithCustomWords::build_graph(ggml_allocr*, std::vector<int, std::allocator<int>>, bool) | 7CodeWizard[P]stablediffusion/clip.hpp | struct ggml_cgraph* build_graph(struct ggml_allocr* allocr, std::vector<int> tokens, bool return_pooled = false) {
// since we are using ggml-alloc, this buffer only needs enough space to hold the ggml_tensor and ggml_cgraph structs, but not the tensor data
static size_t buf_size = ggml_tensor_overhead() * GGML_DEFAULT_GRAPH_SIZE + ggml_graph_overhead();
static std::vector<uint8_t> buf(buf_size);
struct ggml_init_params params = {
/*.mem_size =*/buf_size,
/*.mem_buffer =*/buf.data(),
/*.no_alloc =*/true, // the tensors will be allocated later by ggml_allocr_alloc_graph()
};
struct ggml_context* ctx0 = ggml_init(params);
struct ggml_cgraph* gf = ggml_new_graph(ctx0);
struct ggml_tensor* input_ids = ggml_new_tensor_1d(ctx0, GGML_TYPE_I32, tokens.size());
ggml_allocr_alloc(allocr, input_ids);
if (!ggml_allocr_is_measure(allocr)) {
ggml_backend_tensor_set(input_ids, tokens.data(), 0, tokens.size() * ggml_element_size(input_ids));
}
struct ggml_tensor* input_ids2 = NULL;
size_t max_token_idx = 0;
if (version == VERSION_XL) {
input_ids2 = ggml_new_tensor_1d(ctx0, GGML_TYPE_I32, tokens.size());
ggml_allocr_alloc(allocr, input_ids2);
auto it = std::find(tokens.begin(), tokens.end(), EOS_TOKEN_ID);
if (it != tokens.end()) {
std::fill(std::next(it), tokens.end(), 0);
}
max_token_idx = std::min<size_t>(std::distance(tokens.begin(), it), tokens.size() - 1);
// for (int i = 0; i < tokens.size(); i++) {
// printf("%d ", tokens[i]);
// }
// printf("\n");
if (!ggml_allocr_is_measure(allocr)) {
ggml_backend_tensor_set(input_ids2, tokens.data(), 0, tokens.size() * ggml_element_size(input_ids2));
}
}
struct ggml_tensor* hidden_states = forward(ctx0, input_ids, input_ids2, max_token_idx, return_pooled);
ggml_build_forward_expand(gf, hidden_states);
ggml_free(ctx0);
return gf;
} | O1 | cpp | FrozenCLIPEmbedderWithCustomWords::build_graph(ggml_allocr*, std::vector<int, std::allocator<int>>, bool):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x58, %rsp
movl %ecx, 0x2c(%rsp)
movq %rdx, %r15
movq %rsi, %r14
movq %rdi, %r12
movb 0x125515(%rip), %al # 0x177f48
testb %al, %al
movq %rdi, 0x20(%rsp)
je 0x52c19
movb 0x125522(%rip), %al # 0x177f68
testb %al, %al
je 0x52c67
movq 0x1254eb(%rip), %rax # 0x177f40
movq 0x1254f4(%rip), %rcx # 0x177f50
movq %rax, 0x40(%rsp)
movq %rcx, 0x48(%rsp)
movb $0x1, 0x50(%rsp)
movq 0x50(%rsp), %rax
movq %rax, 0x10(%rsp)
movups 0x40(%rsp), %xmm0
movups %xmm0, (%rsp)
callq 0x8e3d1
movq %rax, %r13
movq %rax, %rdi
callq 0x978d3
movq %rax, 0x38(%rsp)
movq 0x8(%r15), %rdx
subq (%r15), %rdx
sarq $0x2, %rdx
movq %r13, %rdi
movl $0x12, %esi
callq 0x8ec3c
movq %rax, %rbx
movq %r14, %rdi
movq %rax, %rsi
callq 0xb37b1
movq %r14, 0x30(%rsp)
movq %r14, %rdi
callq 0xb379f
testb %al, %al
jne 0x52af9
movq (%r15), %r14
movq 0x8(%r15), %r12
subq %r14, %r12
sarq $0x2, %r12
movq %rbx, %rdi
callq 0x8e257
imulq %rax, %r12
movq %rbx, %rdi
movq %r14, %rsi
xorl %edx, %edx
movq %r12, %rcx
movq 0x20(%rsp), %r12
callq 0xb3fb5
xorl %ebp, %ebp
cmpl $0x2, 0x68(%r12)
movl $0x0, %r14d
jne 0x52bd5
movq 0x8(%r15), %rdx
subq (%r15), %rdx
sarq $0x2, %rdx
movq %r13, %rdi
movl $0x12, %esi
callq 0x8ec3c
movq %rax, %r14
movq 0x30(%rsp), %rdi
movq %rax, %rsi
callq 0xb37b1
movq (%r15), %rdi
movq 0x8(%r15), %rsi
leaq 0x6d469(%rip), %rdx # 0xbffac
callq 0x39d1d
movq %rax, %r12
movq 0x8(%r15), %rbp
cmpq %rbp, %rax
sete %al
leaq 0x4(%r12), %rdi
cmpq %rbp, %rdi
sete %cl
orb %al, %cl
jne 0x52b7d
movq %rbp, %rdx
subq %r12, %rdx
addq $-0x8, %rdx
andq $-0x4, %rdx
addq $0x4, %rdx
xorl %esi, %esi
callq 0xa300
movq (%r15), %rax
subq %rax, %r12
sarq $0x2, %r12
subq %rax, %rbp
sarq $0x2, %rbp
decq %rbp
cmpq %r12, %rbp
cmovaeq %r12, %rbp
movq 0x30(%rsp), %rdi
callq 0xb379f
testb %al, %al
jne 0x52bd0
movq (%r15), %r12
movq 0x8(%r15), %r15
subq %r12, %r15
sarq $0x2, %r15
movq %r14, %rdi
callq 0x8e257
imulq %rax, %r15
movq %r14, %rdi
movq %r12, %rsi
xorl %edx, %edx
movq %r15, %rcx
callq 0xb3fb5
movq 0x20(%rsp), %r12
movzbl 0x2c(%rsp), %r9d
movq %r12, %rdi
movq %r13, %rsi
movq %rbx, %rdx
movq %r14, %rcx
movq %rbp, %r8
callq 0x52d66
movq 0x38(%rsp), %rbx
movq %rbx, %rdi
movq %rax, %rsi
callq 0x9675b
movq %r13, %rdi
callq 0x8e752
movq %rbx, %rax
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x125328(%rip), %rbx # 0x177f48
movq %rbx, %rdi
callq 0xab30
testl %eax, %eax
je 0x52a40
movq %r14, %r13
callq 0x8e322
movq %rax, %r14
callq 0x976df
shlq $0xb, %r14
addq %r14, %rax
movq %rax, 0x1252f2(%rip) # 0x177f40
leaq 0x1252f3(%rip), %rdi # 0x177f48
callq 0xa380
movq 0x20(%rsp), %r12
movq %r13, %r14
jmp 0x52a40
leaq 0x1252fa(%rip), %rbx # 0x177f68
movq %rbx, %rdi
callq 0xab30
testl %eax, %eax
je 0x52a4e
movq 0x1252bb(%rip), %rsi # 0x177f40
leaq 0x1252c4(%rip), %rdi # 0x177f50
leaq 0x1f(%rsp), %rdx
callq 0x47ea6
leaq -0xad97(%rip), %rdi # 0x47f06
leaq 0x1252ac(%rip), %rsi # 0x177f50
leaq 0xa498d(%rip), %rdx # 0xf7638
callq 0xa510
leaq 0x1252b1(%rip), %rdi # 0x177f68
callq 0xa380
movq 0x20(%rsp), %r12
jmp 0x52a4e
jmp 0x52cc8
movq %rax, %r14
movq %rbx, %rdi
callq 0xa370
movq %r14, %rdi
callq 0xaae0
nop
| _ZN33FrozenCLIPEmbedderWithCustomWords11build_graphEP11ggml_allocrSt6vectorIiSaIiEEb:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 58h
mov [rsp+88h+var_5C], ecx
mov r15, rdx
mov r14, rsi
mov r12, rdi
mov al, cs:_ZGVZN33FrozenCLIPEmbedderWithCustomWords11build_graphEP11ggml_allocrSt6vectorIiSaIiEEbE8buf_size; `guard variable for'FrozenCLIPEmbedderWithCustomWords::build_graph(ggml_allocr *,std::vector<int>,bool)::buf_size
test al, al
mov [rsp+88h+var_68], rdi
jz loc_52C19
loc_52A40:
mov al, cs:_ZGVZN33FrozenCLIPEmbedderWithCustomWords11build_graphEP11ggml_allocrSt6vectorIiSaIiEEbE3buf; `guard variable for'FrozenCLIPEmbedderWithCustomWords::build_graph(ggml_allocr *,std::vector<int>,bool)::buf
test al, al
jz loc_52C67
loc_52A4E:
mov rax, cs:_ZZN33FrozenCLIPEmbedderWithCustomWords11build_graphEP11ggml_allocrSt6vectorIiSaIiEEbE8buf_size; FrozenCLIPEmbedderWithCustomWords::build_graph(ggml_allocr *,std::vector<int>,bool)::buf_size
mov rcx, cs:_ZZN33FrozenCLIPEmbedderWithCustomWords11build_graphEP11ggml_allocrSt6vectorIiSaIiEEbE3buf; FrozenCLIPEmbedderWithCustomWords::build_graph(ggml_allocr *,std::vector<int>,bool)::buf
mov qword ptr [rsp+88h+var_48], rax
mov qword ptr [rsp+88h+var_48+8], rcx
mov byte ptr [rsp+88h+var_38], 1
mov rax, [rsp+88h+var_38]
mov [rsp+88h+var_78], rax
movups xmm0, [rsp+88h+var_48]
movups [rsp+88h+var_88], xmm0
call ggml_init
mov r13, rax
mov rdi, rax
call ggml_new_graph
mov [rsp+88h+var_50], rax
mov rdx, [r15+8]
sub rdx, [r15]
sar rdx, 2
mov rdi, r13
mov esi, 12h
call ggml_new_tensor_1d
mov rbx, rax
mov rdi, r14
mov rsi, rax
call ggml_allocr_alloc
mov [rsp+88h+var_58], r14
mov rdi, r14
call ggml_allocr_is_measure
test al, al
jnz short loc_52AF9
mov r14, [r15]
mov r12, [r15+8]
sub r12, r14
sar r12, 2
mov rdi, rbx
call ggml_element_size
imul r12, rax
mov rdi, rbx
mov rsi, r14
xor edx, edx
mov rcx, r12
mov r12, [rsp+88h+var_68]
call ggml_backend_tensor_set
loc_52AF9:
xor ebp, ebp
cmp dword ptr [r12+68h], 2
mov r14d, 0
jnz loc_52BD5
mov rdx, [r15+8]
sub rdx, [r15]
sar rdx, 2
mov rdi, r13
mov esi, 12h
call ggml_new_tensor_1d
mov r14, rax
mov rdi, [rsp+88h+var_58]
mov rsi, rax
call ggml_allocr_alloc
mov rdi, [r15]
mov rsi, [r15+8]
lea rdx, _ZL12EOS_TOKEN_ID; EOS_TOKEN_ID
call _ZSt9__find_ifIN9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEENS0_5__ops16_Iter_equals_valIKiEEET_SB_SB_T0_St26random_access_iterator_tag; std::__find_if<__gnu_cxx::__normal_iterator<int *,std::vector<int>>,__gnu_cxx::__ops::_Iter_equals_val<int const>>(__gnu_cxx::__normal_iterator<int *,std::vector<int>>,__gnu_cxx::__normal_iterator<int *,std::vector<int>>,__gnu_cxx::__ops::_Iter_equals_val<int const>,std::random_access_iterator_tag)
mov r12, rax
mov rbp, [r15+8]
cmp rax, rbp
setz al
lea rdi, [r12+4]
cmp rdi, rbp
setz cl
or cl, al
jnz short loc_52B7D
mov rdx, rbp
sub rdx, r12
add rdx, 0FFFFFFFFFFFFFFF8h
and rdx, 0FFFFFFFFFFFFFFFCh
add rdx, 4
xor esi, esi
call _memset
loc_52B7D:
mov rax, [r15]
sub r12, rax
sar r12, 2
sub rbp, rax
sar rbp, 2
dec rbp
cmp rbp, r12
cmovnb rbp, r12
mov rdi, [rsp+88h+var_58]
call ggml_allocr_is_measure
test al, al
jnz short loc_52BD0
mov r12, [r15]
mov r15, [r15+8]
sub r15, r12
sar r15, 2
mov rdi, r14
call ggml_element_size
imul r15, rax
mov rdi, r14
mov rsi, r12
xor edx, edx
mov rcx, r15
call ggml_backend_tensor_set
loc_52BD0:
mov r12, [rsp+88h+var_68]
loc_52BD5:
movzx r9d, byte ptr [rsp+88h+var_5C]
mov rdi, r12
mov rsi, r13
mov rdx, rbx
mov rcx, r14
mov r8, rbp
call _ZN33FrozenCLIPEmbedderWithCustomWords7forwardEP12ggml_contextP11ggml_tensorS3_mb; FrozenCLIPEmbedderWithCustomWords::forward(ggml_context *,ggml_tensor *,ggml_tensor *,ulong,bool)
mov rbx, [rsp+88h+var_50]
mov rdi, rbx
mov rsi, rax
call ggml_build_forward_expand
mov rdi, r13
call ggml_free
mov rax, rbx
add rsp, 58h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_52C19:
lea rbx, _ZGVZN33FrozenCLIPEmbedderWithCustomWords11build_graphEP11ggml_allocrSt6vectorIiSaIiEEbE8buf_size; `guard variable for'FrozenCLIPEmbedderWithCustomWords::build_graph(ggml_allocr *,std::vector<int>,bool)::buf_size
mov rdi, rbx; __guard *
call ___cxa_guard_acquire
test eax, eax
jz loc_52A40
mov r13, r14
call ggml_tensor_overhead
mov r14, rax
call ggml_graph_overhead
shl r14, 0Bh
add rax, r14
mov cs:_ZZN33FrozenCLIPEmbedderWithCustomWords11build_graphEP11ggml_allocrSt6vectorIiSaIiEEbE8buf_size, rax; FrozenCLIPEmbedderWithCustomWords::build_graph(ggml_allocr *,std::vector<int>,bool)::buf_size
lea rdi, _ZGVZN33FrozenCLIPEmbedderWithCustomWords11build_graphEP11ggml_allocrSt6vectorIiSaIiEEbE8buf_size; __guard *
call ___cxa_guard_release
mov r12, [rsp+88h+var_68]
mov r14, r13
jmp loc_52A40
loc_52C67:
lea rbx, _ZGVZN33FrozenCLIPEmbedderWithCustomWords11build_graphEP11ggml_allocrSt6vectorIiSaIiEEbE3buf; `guard variable for'FrozenCLIPEmbedderWithCustomWords::build_graph(ggml_allocr *,std::vector<int>,bool)::buf
mov rdi, rbx; __guard *
call ___cxa_guard_acquire
test eax, eax
jz loc_52A4E
mov rsi, cs:_ZZN33FrozenCLIPEmbedderWithCustomWords11build_graphEP11ggml_allocrSt6vectorIiSaIiEEbE8buf_size; FrozenCLIPEmbedderWithCustomWords::build_graph(ggml_allocr *,std::vector<int>,bool)::buf_size
lea rdi, _ZZN33FrozenCLIPEmbedderWithCustomWords11build_graphEP11ggml_allocrSt6vectorIiSaIiEEbE3buf; FrozenCLIPEmbedderWithCustomWords::build_graph(ggml_allocr *,std::vector<int>,bool)::buf
lea rdx, [rsp+88h+var_69]
call _ZNSt6vectorIhSaIhEEC2EmRKS0_; std::vector<uchar>::vector(ulong,std::allocator<uchar> const&)
lea rdi, _ZNSt6vectorIhSaIhEED2Ev; lpfunc
lea rsi, _ZZN33FrozenCLIPEmbedderWithCustomWords11build_graphEP11ggml_allocrSt6vectorIiSaIiEEbE3buf; obj
lea rdx, __dso_handle; lpdso_handle
call ___cxa_atexit
lea rdi, _ZGVZN33FrozenCLIPEmbedderWithCustomWords11build_graphEP11ggml_allocrSt6vectorIiSaIiEEbE3buf; __guard *
call ___cxa_guard_release
mov r12, [rsp+88h+var_68]
jmp loc_52A4E
jmp short $+2
loc_52CC8:
mov r14, rax
mov rdi, rbx; __guard *
call ___cxa_guard_abort
mov rdi, r14
call __Unwind_Resume
| long long FrozenCLIPEmbedderWithCustomWords::build_graph(
__guard *a1,
long long *a2,
long long *a3,
unsigned __int8 a4,
int a5,
int a6,
double a7)
{
long long *v8; // r14
__guard *v9; // r12
long long v10; // r13
long long v11; // rbx
_DWORD *v12; // r14
long long v13; // r12
long long v14; // rcx
unsigned long long v15; // rbp
long long v16; // r14
char *v17; // r12
char *v18; // rbp
unsigned long long v19; // r12
_DWORD *v20; // r12
long long v21; // r15
long long v22; // rax
long long v23; // rax
long long v25; // r14
__guard *v26; // [rsp+20h] [rbp-68h]
long long *v28; // [rsp+30h] [rbp-58h]
long long v29; // [rsp+38h] [rbp-50h]
v8 = a2;
v9 = a1;
v26 = a1;
if ( !(_BYTE)`guard variable for'FrozenCLIPEmbedderWithCustomWords::build_graph(ggml_allocr *,std::vector<int>,bool)::buf_size )
{
a1 = &`guard variable for'FrozenCLIPEmbedderWithCustomWords::build_graph(ggml_allocr *,std::vector<int>,bool)::buf_size;
if ( __cxa_guard_acquire(&`guard variable for'FrozenCLIPEmbedderWithCustomWords::build_graph(ggml_allocr *,std::vector<int>,bool)::buf_size) )
{
v25 = ggml_tensor_overhead(a7);
FrozenCLIPEmbedderWithCustomWords::build_graph(ggml_allocr *,std::vector<int>,bool)::buf_size = (v25 << 11) + ggml_graph_overhead();
a1 = &`guard variable for'FrozenCLIPEmbedderWithCustomWords::build_graph(ggml_allocr *,std::vector<int>,bool)::buf_size;
__cxa_guard_release(&`guard variable for'FrozenCLIPEmbedderWithCustomWords::build_graph(ggml_allocr *,std::vector<int>,bool)::buf_size);
v9 = v26;
v8 = a2;
}
}
if ( !(_BYTE)`guard variable for'FrozenCLIPEmbedderWithCustomWords::build_graph(ggml_allocr *,std::vector<int>,bool)::buf )
{
a1 = &`guard variable for'FrozenCLIPEmbedderWithCustomWords::build_graph(ggml_allocr *,std::vector<int>,bool)::buf;
if ( __cxa_guard_acquire(&`guard variable for'FrozenCLIPEmbedderWithCustomWords::build_graph(ggml_allocr *,std::vector<int>,bool)::buf) )
{
std::vector<unsigned char>::vector(
(long long)&FrozenCLIPEmbedderWithCustomWords::build_graph(ggml_allocr *,std::vector<int>,bool)::buf,
FrozenCLIPEmbedderWithCustomWords::build_graph(ggml_allocr *,std::vector<int>,bool)::buf_size);
a2 = &FrozenCLIPEmbedderWithCustomWords::build_graph(ggml_allocr *,std::vector<int>,bool)::buf;
__cxa_atexit(
(void (*)(void *))std::vector<unsigned char>::~vector,
&FrozenCLIPEmbedderWithCustomWords::build_graph(ggml_allocr *,std::vector<int>,bool)::buf,
&_dso_handle);
a1 = &`guard variable for'FrozenCLIPEmbedderWithCustomWords::build_graph(ggml_allocr *,std::vector<int>,bool)::buf;
__cxa_guard_release(&`guard variable for'FrozenCLIPEmbedderWithCustomWords::build_graph(ggml_allocr *,std::vector<int>,bool)::buf);
v9 = v26;
}
}
v10 = ggml_init(
(_DWORD)a1,
(_DWORD)a2,
(_DWORD)a3,
FrozenCLIPEmbedderWithCustomWords::build_graph(ggml_allocr *,std::vector<int>,bool)::buf,
a5,
a6,
FrozenCLIPEmbedderWithCustomWords::build_graph(ggml_allocr *,std::vector<int>,bool)::buf_size,
FrozenCLIPEmbedderWithCustomWords::build_graph(ggml_allocr *,std::vector<int>,bool)::buf,
1);
v29 = ggml_new_graph(v10);
v11 = ggml_new_tensor_1d(v10, 18LL, (a3[1] - *a3) >> 2);
ggml_allocr_alloc(v8, v11);
v28 = v8;
if ( !(unsigned __int8)ggml_allocr_is_measure(v8) )
{
v12 = (_DWORD *)*a3;
v13 = (a3[1] - *a3) >> 2;
v14 = ggml_element_size(v11) * v13;
v9 = v26;
ggml_backend_tensor_set(v11, v12, 0LL, v14);
}
v15 = 0LL;
v16 = 0LL;
if ( *((_DWORD *)v9 + 26) == 2 )
{
v16 = ggml_new_tensor_1d(v10, 18LL, (a3[1] - *a3) >> 2);
ggml_allocr_alloc(v28, v16);
v17 = (char *)std::__find_if<__gnu_cxx::__normal_iterator<int *,std::vector<int>>,__gnu_cxx::__ops::_Iter_equals_val<int const>>(
(_DWORD *)*a3,
a3[1],
&EOS_TOKEN_ID);
v18 = (char *)a3[1];
if ( v17 != v18 && v17 + 4 != v18 )
memset(v17 + 4, 0LL, ((v18 - v17 - 8) & 0xFFFFFFFFFFFFFFFCLL) + 4);
v19 = (long long)&v17[-*a3] >> 2;
v15 = ((long long)&v18[-*a3] >> 2) - 1;
if ( v15 >= v19 )
v15 = v19;
if ( !(unsigned __int8)ggml_allocr_is_measure(v28) )
{
v20 = (_DWORD *)*a3;
v21 = (a3[1] - *a3) >> 2;
v22 = ggml_element_size(v16);
ggml_backend_tensor_set(v16, v20, 0LL, v22 * v21);
}
v9 = v26;
}
v23 = FrozenCLIPEmbedderWithCustomWords::forward(v9, v10, v11, v16, v15, a4);
ggml_build_forward_expand(v29, v23);
ggml_free(v10);
return v29;
}
| |||
51,873 | FrozenCLIPEmbedderWithCustomWords::build_graph(ggml_allocr*, std::vector<int, std::allocator<int>>, bool) | 7CodeWizard[P]stablediffusion/clip.hpp | struct ggml_cgraph* build_graph(struct ggml_allocr* allocr, std::vector<int> tokens, bool return_pooled = false) {
// since we are using ggml-alloc, this buffer only needs enough space to hold the ggml_tensor and ggml_cgraph structs, but not the tensor data
static size_t buf_size = ggml_tensor_overhead() * GGML_DEFAULT_GRAPH_SIZE + ggml_graph_overhead();
static std::vector<uint8_t> buf(buf_size);
struct ggml_init_params params = {
/*.mem_size =*/buf_size,
/*.mem_buffer =*/buf.data(),
/*.no_alloc =*/true, // the tensors will be allocated later by ggml_allocr_alloc_graph()
};
struct ggml_context* ctx0 = ggml_init(params);
struct ggml_cgraph* gf = ggml_new_graph(ctx0);
struct ggml_tensor* input_ids = ggml_new_tensor_1d(ctx0, GGML_TYPE_I32, tokens.size());
ggml_allocr_alloc(allocr, input_ids);
if (!ggml_allocr_is_measure(allocr)) {
ggml_backend_tensor_set(input_ids, tokens.data(), 0, tokens.size() * ggml_element_size(input_ids));
}
struct ggml_tensor* input_ids2 = NULL;
size_t max_token_idx = 0;
if (version == VERSION_XL) {
input_ids2 = ggml_new_tensor_1d(ctx0, GGML_TYPE_I32, tokens.size());
ggml_allocr_alloc(allocr, input_ids2);
auto it = std::find(tokens.begin(), tokens.end(), EOS_TOKEN_ID);
if (it != tokens.end()) {
std::fill(std::next(it), tokens.end(), 0);
}
max_token_idx = std::min<size_t>(std::distance(tokens.begin(), it), tokens.size() - 1);
// for (int i = 0; i < tokens.size(); i++) {
// printf("%d ", tokens[i]);
// }
// printf("\n");
if (!ggml_allocr_is_measure(allocr)) {
ggml_backend_tensor_set(input_ids2, tokens.data(), 0, tokens.size() * ggml_element_size(input_ids2));
}
}
struct ggml_tensor* hidden_states = forward(ctx0, input_ids, input_ids2, max_token_idx, return_pooled);
ggml_build_forward_expand(gf, hidden_states);
ggml_free(ctx0);
return gf;
} | O2 | cpp | FrozenCLIPEmbedderWithCustomWords::build_graph(ggml_allocr*, std::vector<int, std::allocator<int>>, bool):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x58, %rsp
movl %ecx, 0x34(%rsp)
movq %rdx, %r15
movq %rsi, %r12
movq %rdi, 0x28(%rsp)
movb 0x121b6d(%rip), %al # 0x156f58
testb %al, %al
je 0x355a0
movb 0x121b7f(%rip), %al # 0x156f78
testb %al, %al
je 0x355e0
movq 0x121b48(%rip), %rax # 0x156f50
movq 0x121b51(%rip), %rcx # 0x156f60
movq %rax, 0x40(%rsp)
movq %rcx, 0x48(%rsp)
movb $0x1, 0x50(%rsp)
movq 0x50(%rsp), %rax
movq %rax, 0x10(%rsp)
movups 0x40(%rsp), %xmm0
movups %xmm0, (%rsp)
callq 0x67e56
movq %rax, %r13
movq %rax, %rdi
callq 0x71d08
movq %rax, 0x38(%rsp)
movq 0x8(%r15), %rdx
subq (%r15), %rdx
sarq $0x2, %rdx
pushq $0x12
popq %rsi
movq %r13, %rdi
callq 0x68616
movq %rax, %rbx
movq %r12, %rdi
movq %rax, %rsi
callq 0x8f58c
movq %r12, %rdi
callq 0x8f57a
testb %al, %al
jne 0x354a0
movq (%r15), %r14
movq 0x8(%r15), %rbp
subq %r14, %rbp
sarq $0x2, %rbp
movq %rbx, %rdi
callq 0x67cc0
imulq %rax, %rbp
movq %rbx, %rdi
movq %r14, %rsi
xorl %edx, %edx
movq %rbp, %rcx
callq 0x8fec1
xorl %ebp, %ebp
movq 0x28(%rsp), %rdi
cmpl $0x2, 0x68(%rdi)
movl $0x0, %r14d
jne 0x3555f
movq 0x8(%r15), %rdx
subq (%r15), %rdx
sarq $0x2, %rdx
pushq $0x12
popq %rsi
movq %r13, %rdi
callq 0x68616
movq %rax, %r14
movq %r12, %rdi
movq %rax, %rsi
callq 0x8f58c
movq (%r15), %rdi
movq 0x8(%r15), %rsi
leaq 0x669f3(%rip), %rdx # 0x9bedc
callq 0x232cb
movq 0x8(%r15), %rbp
cmpq %rbp, %rax
je 0x35509
leaq 0x4(%rax), %rcx
cmpq %rbp, %rcx
je 0x35509
andl $0x0, (%rcx)
addq $0x4, %rcx
jmp 0x354fb
movq (%r15), %rcx
subq %rcx, %rax
sarq $0x2, %rax
subq %rcx, %rbp
sarq $0x2, %rbp
decq %rbp
cmpq %rax, %rbp
cmovaeq %rax, %rbp
movq %r12, %rdi
callq 0x8f57a
testb %al, %al
jne 0x3555a
movq (%r15), %r12
movq 0x8(%r15), %r15
subq %r12, %r15
sarq $0x2, %r15
movq %r14, %rdi
callq 0x67cc0
imulq %rax, %r15
movq %r14, %rdi
movq %r12, %rsi
xorl %edx, %edx
movq %r15, %rcx
callq 0x8fec1
movq 0x28(%rsp), %rdi
movzbl 0x34(%rsp), %r9d
movq %r13, %rsi
movq %rbx, %rdx
movq %r14, %rcx
movq %rbp, %r8
callq 0x356ac
movq 0x38(%rsp), %rbx
movq %rbx, %rdi
movq %rax, %rsi
callq 0x70258
movq %r13, %rdi
callq 0x6823b
movq %rbx, %rax
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x1219b1(%rip), %rdi # 0x156f58
callq 0xab10
testl %eax, %eax
je 0x353f3
callq 0x67da7
movq %rax, %rbx
callq 0x71b28
shlq $0xb, %rbx
addq %rbx, %rax
movq %rax, 0x121981(%rip) # 0x156f50
leaq 0x121982(%rip), %rdi # 0x156f58
callq 0xa380
jmp 0x353f3
leaq 0x121991(%rip), %rdi # 0x156f78
callq 0xab10
testl %eax, %eax
je 0x35401
movq 0x121955(%rip), %rsi # 0x156f50
leaq 0x12195e(%rip), %rdi # 0x156f60
leaq 0x27(%rsp), %rdx
callq 0x2d8a4
leaq -0x7d1d(%rip), %rdi # 0x2d8f6
leaq 0x121946(%rip), %rsi # 0x156f60
leaq 0xa1017(%rip), %rdx # 0xd6638
callq 0xa510
leaq 0x12194b(%rip), %rdi # 0x156f78
callq 0xa380
jmp 0x35401
movq %rax, %rbx
leaq 0x121937(%rip), %rdi # 0x156f78
jmp 0x3564d
movq %rax, %rbx
leaq 0x12190b(%rip), %rdi # 0x156f58
callq 0xa370
movq %rbx, %rdi
callq 0xaab0
| _ZN33FrozenCLIPEmbedderWithCustomWords11build_graphEP11ggml_allocrSt6vectorIiSaIiEEb:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 58h
mov [rsp+88h+var_54], ecx
mov r15, rdx
mov r12, rsi
mov [rsp+88h+var_60], rdi
mov al, cs:_ZGVZN33FrozenCLIPEmbedderWithCustomWords11build_graphEP11ggml_allocrSt6vectorIiSaIiEEbE8buf_size; `guard variable for'FrozenCLIPEmbedderWithCustomWords::build_graph(ggml_allocr *,std::vector<int>,bool)::buf_size
test al, al
jz loc_355A0
loc_353F3:
mov al, cs:_ZGVZN33FrozenCLIPEmbedderWithCustomWords11build_graphEP11ggml_allocrSt6vectorIiSaIiEEbE3buf; `guard variable for'FrozenCLIPEmbedderWithCustomWords::build_graph(ggml_allocr *,std::vector<int>,bool)::buf
test al, al
jz loc_355E0
loc_35401:
mov rax, cs:_ZZN33FrozenCLIPEmbedderWithCustomWords11build_graphEP11ggml_allocrSt6vectorIiSaIiEEbE8buf_size; FrozenCLIPEmbedderWithCustomWords::build_graph(ggml_allocr *,std::vector<int>,bool)::buf_size
mov rcx, cs:_ZZN33FrozenCLIPEmbedderWithCustomWords11build_graphEP11ggml_allocrSt6vectorIiSaIiEEbE3buf; FrozenCLIPEmbedderWithCustomWords::build_graph(ggml_allocr *,std::vector<int>,bool)::buf
mov qword ptr [rsp+88h+var_48], rax
mov qword ptr [rsp+88h+var_48+8], rcx
mov byte ptr [rsp+88h+var_38], 1
mov rax, [rsp+88h+var_38]
mov [rsp+88h+var_78], rax
movups xmm0, [rsp+88h+var_48]
movups [rsp+88h+var_88], xmm0
call ggml_init
mov r13, rax
mov rdi, rax
call ggml_new_graph
mov [rsp+88h+var_50], rax
mov rdx, [r15+8]
sub rdx, [r15]
sar rdx, 2
push 12h
pop rsi
mov rdi, r13
call ggml_new_tensor_1d
mov rbx, rax
mov rdi, r12
mov rsi, rax
call ggml_allocr_alloc
mov rdi, r12
call ggml_allocr_is_measure
test al, al
jnz short loc_354A0
mov r14, [r15]
mov rbp, [r15+8]
sub rbp, r14
sar rbp, 2
mov rdi, rbx
call ggml_element_size
imul rbp, rax
mov rdi, rbx
mov rsi, r14
xor edx, edx
mov rcx, rbp
call ggml_backend_tensor_set
loc_354A0:
xor ebp, ebp
mov rdi, [rsp+88h+var_60]
cmp dword ptr [rdi+68h], 2
mov r14d, 0
jnz loc_3555F
mov rdx, [r15+8]
sub rdx, [r15]
sar rdx, 2
push 12h
pop rsi
mov rdi, r13
call ggml_new_tensor_1d
mov r14, rax
mov rdi, r12
mov rsi, rax
call ggml_allocr_alloc
mov rdi, [r15]
mov rsi, [r15+8]
lea rdx, _ZL12EOS_TOKEN_ID; EOS_TOKEN_ID
call _ZSt9__find_ifIN9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEENS0_5__ops16_Iter_equals_valIKiEEET_SB_SB_T0_St26random_access_iterator_tag; std::__find_if<__gnu_cxx::__normal_iterator<int *,std::vector<int>>,__gnu_cxx::__ops::_Iter_equals_val<int const>>(__gnu_cxx::__normal_iterator<int *,std::vector<int>>,__gnu_cxx::__normal_iterator<int *,std::vector<int>>,__gnu_cxx::__ops::_Iter_equals_val<int const>,std::random_access_iterator_tag)
mov rbp, [r15+8]
cmp rax, rbp
jz short loc_35509
lea rcx, [rax+4]
loc_354FB:
cmp rcx, rbp
jz short loc_35509
and dword ptr [rcx], 0
add rcx, 4
jmp short loc_354FB
loc_35509:
mov rcx, [r15]
sub rax, rcx
sar rax, 2
sub rbp, rcx
sar rbp, 2
dec rbp
cmp rbp, rax
cmovnb rbp, rax
mov rdi, r12
call ggml_allocr_is_measure
test al, al
jnz short loc_3555A
mov r12, [r15]
mov r15, [r15+8]
sub r15, r12
sar r15, 2
mov rdi, r14
call ggml_element_size
imul r15, rax
mov rdi, r14
mov rsi, r12
xor edx, edx
mov rcx, r15
call ggml_backend_tensor_set
loc_3555A:
mov rdi, [rsp+88h+var_60]
loc_3555F:
movzx r9d, byte ptr [rsp+88h+var_54]
mov rsi, r13
mov rdx, rbx
mov rcx, r14
mov r8, rbp
call _ZN33FrozenCLIPEmbedderWithCustomWords7forwardEP12ggml_contextP11ggml_tensorS3_mb; FrozenCLIPEmbedderWithCustomWords::forward(ggml_context *,ggml_tensor *,ggml_tensor *,ulong,bool)
mov rbx, [rsp+88h+var_50]
mov rdi, rbx
mov rsi, rax
call ggml_build_forward_expand
mov rdi, r13
call ggml_free
mov rax, rbx
add rsp, 58h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_355A0:
lea rdi, _ZGVZN33FrozenCLIPEmbedderWithCustomWords11build_graphEP11ggml_allocrSt6vectorIiSaIiEEbE8buf_size; __guard *
call ___cxa_guard_acquire
test eax, eax
jz loc_353F3
call ggml_tensor_overhead
mov rbx, rax
call ggml_graph_overhead
shl rbx, 0Bh
add rax, rbx
mov cs:_ZZN33FrozenCLIPEmbedderWithCustomWords11build_graphEP11ggml_allocrSt6vectorIiSaIiEEbE8buf_size, rax; FrozenCLIPEmbedderWithCustomWords::build_graph(ggml_allocr *,std::vector<int>,bool)::buf_size
lea rdi, _ZGVZN33FrozenCLIPEmbedderWithCustomWords11build_graphEP11ggml_allocrSt6vectorIiSaIiEEbE8buf_size; __guard *
call ___cxa_guard_release
jmp loc_353F3
loc_355E0:
lea rdi, _ZGVZN33FrozenCLIPEmbedderWithCustomWords11build_graphEP11ggml_allocrSt6vectorIiSaIiEEbE3buf; __guard *
call ___cxa_guard_acquire
test eax, eax
jz loc_35401
mov rsi, cs:_ZZN33FrozenCLIPEmbedderWithCustomWords11build_graphEP11ggml_allocrSt6vectorIiSaIiEEbE8buf_size; FrozenCLIPEmbedderWithCustomWords::build_graph(ggml_allocr *,std::vector<int>,bool)::buf_size
lea rdi, _ZZN33FrozenCLIPEmbedderWithCustomWords11build_graphEP11ggml_allocrSt6vectorIiSaIiEEbE3buf; FrozenCLIPEmbedderWithCustomWords::build_graph(ggml_allocr *,std::vector<int>,bool)::buf
lea rdx, [rsp+88h+var_61]
call _ZNSt6vectorIhSaIhEEC2EmRKS0_; std::vector<uchar>::vector(ulong,std::allocator<uchar> const&)
lea rdi, _ZNSt6vectorIhSaIhEED2Ev; lpfunc
lea rsi, _ZZN33FrozenCLIPEmbedderWithCustomWords11build_graphEP11ggml_allocrSt6vectorIiSaIiEEbE3buf; obj
lea rdx, __dso_handle; lpdso_handle
call ___cxa_atexit
lea rdi, _ZGVZN33FrozenCLIPEmbedderWithCustomWords11build_graphEP11ggml_allocrSt6vectorIiSaIiEEbE3buf; __guard *
call ___cxa_guard_release
jmp loc_35401
mov rbx, rax
lea rdi, _ZGVZN33FrozenCLIPEmbedderWithCustomWords11build_graphEP11ggml_allocrSt6vectorIiSaIiEEbE3buf; `guard variable for'FrozenCLIPEmbedderWithCustomWords::build_graph(ggml_allocr *,std::vector<int>,bool)::buf
jmp short loc_3564D
mov rbx, rax
lea rdi, _ZGVZN33FrozenCLIPEmbedderWithCustomWords11build_graphEP11ggml_allocrSt6vectorIiSaIiEEbE8buf_size; __guard *
loc_3564D:
call ___cxa_guard_abort
mov rdi, rbx
call __Unwind_Resume
| long long FrozenCLIPEmbedderWithCustomWords::build_graph(
__guard *a1,
long long *a2,
char **a3,
int a4,
int a5,
int a6,
double a7)
{
long long *v8; // r12
double v9; // xmm0_8
long long v10; // r13
long long v11; // rbx
char *v12; // r14
long long v13; // rbp
long long v14; // rax
unsigned long long v15; // rbp
__guard *v16; // rdi
long long v17; // r14
char *v18; // rax
char *v19; // rbp
char *i; // rcx
unsigned long long v21; // rax
char *v22; // r12
long long v23; // r15
long long v24; // rax
long long v25; // rax
long long v26; // rbx
long long v28; // rbx
char v29; // [rsp+27h] [rbp-61h] BYREF
__guard *v30; // [rsp+28h] [rbp-60h]
int v31; // [rsp+34h] [rbp-54h]
long long v32; // [rsp+38h] [rbp-50h]
long long v33; // [rsp+40h] [rbp-48h]
long long v34; // [rsp+48h] [rbp-40h]
long long v35; // [rsp+50h] [rbp-38h]
v31 = a4;
v8 = a2;
v30 = a1;
if ( !(_BYTE)`guard variable for'FrozenCLIPEmbedderWithCustomWords::build_graph(ggml_allocr *,std::vector<int>,bool)::buf_size )
{
a1 = &`guard variable for'FrozenCLIPEmbedderWithCustomWords::build_graph(ggml_allocr *,std::vector<int>,bool)::buf_size;
if ( __cxa_guard_acquire(&`guard variable for'FrozenCLIPEmbedderWithCustomWords::build_graph(ggml_allocr *,std::vector<int>,bool)::buf_size) )
{
v28 = ggml_tensor_overhead(a7);
FrozenCLIPEmbedderWithCustomWords::build_graph(ggml_allocr *,std::vector<int>,bool)::buf_size = (v28 << 11) + ggml_graph_overhead();
a1 = &`guard variable for'FrozenCLIPEmbedderWithCustomWords::build_graph(ggml_allocr *,std::vector<int>,bool)::buf_size;
__cxa_guard_release(&`guard variable for'FrozenCLIPEmbedderWithCustomWords::build_graph(ggml_allocr *,std::vector<int>,bool)::buf_size);
}
}
if ( !(_BYTE)`guard variable for'FrozenCLIPEmbedderWithCustomWords::build_graph(ggml_allocr *,std::vector<int>,bool)::buf )
{
a1 = &`guard variable for'FrozenCLIPEmbedderWithCustomWords::build_graph(ggml_allocr *,std::vector<int>,bool)::buf;
if ( __cxa_guard_acquire(&`guard variable for'FrozenCLIPEmbedderWithCustomWords::build_graph(ggml_allocr *,std::vector<int>,bool)::buf) )
{
std::vector<unsigned char>::vector(
(long long)&FrozenCLIPEmbedderWithCustomWords::build_graph(ggml_allocr *,std::vector<int>,bool)::buf,
FrozenCLIPEmbedderWithCustomWords::build_graph(ggml_allocr *,std::vector<int>,bool)::buf_size,
(long long)&v29);
a2 = &FrozenCLIPEmbedderWithCustomWords::build_graph(ggml_allocr *,std::vector<int>,bool)::buf;
__cxa_atexit(
std::vector<unsigned char>::~vector,
&FrozenCLIPEmbedderWithCustomWords::build_graph(ggml_allocr *,std::vector<int>,bool)::buf,
&_dso_handle);
a1 = &`guard variable for'FrozenCLIPEmbedderWithCustomWords::build_graph(ggml_allocr *,std::vector<int>,bool)::buf;
__cxa_guard_release(&`guard variable for'FrozenCLIPEmbedderWithCustomWords::build_graph(ggml_allocr *,std::vector<int>,bool)::buf);
}
}
v33 = FrozenCLIPEmbedderWithCustomWords::build_graph(ggml_allocr *,std::vector<int>,bool)::buf_size;
v34 = FrozenCLIPEmbedderWithCustomWords::build_graph(ggml_allocr *,std::vector<int>,bool)::buf;
LOBYTE(v35) = 1;
v9 = *(double *)&FrozenCLIPEmbedderWithCustomWords::build_graph(ggml_allocr *,std::vector<int>,bool)::buf_size;
v10 = ggml_init(
(_DWORD)a1,
(_DWORD)a2,
(_DWORD)a3,
FrozenCLIPEmbedderWithCustomWords::build_graph(ggml_allocr *,std::vector<int>,bool)::buf,
a5,
a6,
FrozenCLIPEmbedderWithCustomWords::build_graph(ggml_allocr *,std::vector<int>,bool)::buf_size,
FrozenCLIPEmbedderWithCustomWords::build_graph(ggml_allocr *,std::vector<int>,bool)::buf,
v35);
v32 = ggml_new_graph(v10);
v11 = ggml_new_tensor_1d(v10, 18LL, (a3[1] - *a3) >> 2);
ggml_allocr_alloc(v8, v11);
if ( !(unsigned __int8)ggml_allocr_is_measure(v8) )
{
v12 = *a3;
v13 = (a3[1] - *a3) >> 2;
v14 = ggml_element_size(v11);
ggml_backend_tensor_set(v11, v12, 0LL, v14 * v13);
}
v15 = 0LL;
v16 = v30;
v17 = 0LL;
if ( *((_DWORD *)v30 + 26) == 2 )
{
v17 = ggml_new_tensor_1d(v10, 18LL, (a3[1] - *a3) >> 2);
ggml_allocr_alloc(v8, v17);
v18 = std::__find_if<__gnu_cxx::__normal_iterator<int *,std::vector<int>>,__gnu_cxx::__ops::_Iter_equals_val<int const>>(
*a3,
a3[1],
(int *)&EOS_TOKEN_ID);
v19 = a3[1];
if ( v18 != v19 )
{
for ( i = v18 + 4; i != v19; i += 4 )
*(_DWORD *)i = 0;
}
v21 = (v18 - *a3) >> 2;
v15 = ((v19 - *a3) >> 2) - 1;
if ( v15 >= v21 )
v15 = v21;
if ( !(unsigned __int8)ggml_allocr_is_measure(v8) )
{
v22 = *a3;
v23 = (a3[1] - *a3) >> 2;
v24 = ggml_element_size(v17);
ggml_backend_tensor_set(v17, v22, 0LL, v24 * v23);
}
v16 = v30;
}
v25 = FrozenCLIPEmbedderWithCustomWords::forward(v16, v10, v11, v17, v15, (unsigned __int8)v31);
v26 = v32;
ggml_build_forward_expand(v32, v25);
ggml_free(v10, v9);
return v26;
}
| build_graph:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x58
MOV dword ptr [RSP + 0x34],ECX
MOV R15,RDX
MOV R12,RSI
MOV qword ptr [RSP + 0x28],RDI
MOV AL,byte ptr [0x00256f58]
TEST AL,AL
JZ 0x001355a0
LAB_001353f3:
MOV AL,byte ptr [0x00256f78]
TEST AL,AL
JZ 0x001355e0
LAB_00135401:
MOV RAX,qword ptr [0x00256f50]
MOV RCX,qword ptr [0x00256f60]
MOV qword ptr [RSP + 0x40],RAX
MOV qword ptr [RSP + 0x48],RCX
MOV byte ptr [RSP + 0x50],0x1
MOV RAX,qword ptr [RSP + 0x50]
MOV qword ptr [RSP + 0x10],RAX
MOVUPS XMM0,xmmword ptr [RSP + 0x40]
MOVUPS xmmword ptr [RSP],XMM0
CALL 0x00167e56
MOV R13,RAX
MOV RDI,RAX
CALL 0x00171d08
MOV qword ptr [RSP + 0x38],RAX
MOV RDX,qword ptr [R15 + 0x8]
SUB RDX,qword ptr [R15]
SAR RDX,0x2
PUSH 0x12
POP RSI
MOV RDI,R13
CALL 0x00168616
MOV RBX,RAX
MOV RDI,R12
MOV RSI,RAX
CALL 0x0018f58c
MOV RDI,R12
CALL 0x0018f57a
TEST AL,AL
JNZ 0x001354a0
MOV R14,qword ptr [R15]
MOV RBP,qword ptr [R15 + 0x8]
SUB RBP,R14
SAR RBP,0x2
MOV RDI,RBX
CALL 0x00167cc0
IMUL RBP,RAX
MOV RDI,RBX
MOV RSI,R14
XOR EDX,EDX
MOV RCX,RBP
CALL 0x0018fec1
LAB_001354a0:
XOR EBP,EBP
MOV RDI,qword ptr [RSP + 0x28]
CMP dword ptr [RDI + 0x68],0x2
MOV R14D,0x0
JNZ 0x0013555f
MOV RDX,qword ptr [R15 + 0x8]
SUB RDX,qword ptr [R15]
SAR RDX,0x2
PUSH 0x12
POP RSI
MOV RDI,R13
CALL 0x00168616
MOV R14,RAX
MOV RDI,R12
MOV RSI,RAX
CALL 0x0018f58c
MOV RDI,qword ptr [R15]
MOV RSI,qword ptr [R15 + 0x8]
LEA RDX,[0x19bedc]
CALL 0x001232cb
MOV RBP,qword ptr [R15 + 0x8]
CMP RAX,RBP
JZ 0x00135509
LEA RCX,[RAX + 0x4]
LAB_001354fb:
CMP RCX,RBP
JZ 0x00135509
AND dword ptr [RCX],0x0
ADD RCX,0x4
JMP 0x001354fb
LAB_00135509:
MOV RCX,qword ptr [R15]
SUB RAX,RCX
SAR RAX,0x2
SUB RBP,RCX
SAR RBP,0x2
DEC RBP
CMP RBP,RAX
CMOVNC RBP,RAX
MOV RDI,R12
CALL 0x0018f57a
TEST AL,AL
JNZ 0x0013555a
MOV R12,qword ptr [R15]
MOV R15,qword ptr [R15 + 0x8]
SUB R15,R12
SAR R15,0x2
MOV RDI,R14
CALL 0x00167cc0
IMUL R15,RAX
MOV RDI,R14
MOV RSI,R12
XOR EDX,EDX
MOV RCX,R15
CALL 0x0018fec1
LAB_0013555a:
MOV RDI,qword ptr [RSP + 0x28]
LAB_0013555f:
MOVZX R9D,byte ptr [RSP + 0x34]
MOV RSI,R13
MOV RDX,RBX
MOV RCX,R14
MOV R8,RBP
CALL 0x001356ac
MOV RBX,qword ptr [RSP + 0x38]
MOV RDI,RBX
MOV RSI,RAX
CALL 0x00170258
MOV RDI,R13
CALL 0x0016823b
MOV RAX,RBX
ADD RSP,0x58
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_001355a0:
LEA RDI,[0x256f58]
CALL 0x0010ab10
TEST EAX,EAX
JZ 0x001353f3
LAB_001355b4:
CALL 0x00167da7
MOV RBX,RAX
CALL 0x00171b28
SHL RBX,0xb
ADD RAX,RBX
MOV qword ptr [0x00256f50],RAX
LEA RDI,[0x256f58]
CALL 0x0010a380
JMP 0x001353f3
LAB_001355e0:
LEA RDI,[0x256f78]
CALL 0x0010ab10
TEST EAX,EAX
JZ 0x00135401
MOV RSI,qword ptr [0x00256f50]
LAB_001355fb:
LEA RDI,[0x256f60]
LEA RDX,[RSP + 0x27]
CALL 0x0012d8a4
LAB_0013560c:
LEA RDI,[0x12d8f6]
LEA RSI,[0x256f60]
LEA RDX,[0x1d6638]
CALL 0x0010a510
LEA RDI,[0x256f78]
CALL 0x0010a380
JMP 0x00135401
|
/* FrozenCLIPEmbedderWithCustomWords::build_graph(ggml_allocr*, std::vector<int, std::allocator<int>
>, bool) */
int8 __thiscall
FrozenCLIPEmbedderWithCustomWords::build_graph
(FrozenCLIPEmbedderWithCustomWords *this,int8 param_1,long *param_3,
int4 param_4)
{
int4 *puVar1;
int8 uVar2;
char cVar3;
int iVar4;
ggml_context *pgVar5;
ggml_tensor *pgVar6;
long lVar7;
int4 *puVar8;
ulong uVar9;
int8 uVar10;
long lVar11;
long lVar12;
int4 *puVar13;
ulong uVar14;
ggml_tensor *pgVar15;
allocator local_61;
FrozenCLIPEmbedderWithCustomWords *local_60;
int4 local_54;
int8 local_50;
ulong local_48;
int8 uStack_40;
int1 local_38;
local_60 = this;
local_54 = param_4;
if ((build_graph(ggml_allocr*,std::vector<int,std::allocator<int>>,bool)::buf_size == '\0') &&
(iVar4 = __cxa_guard_acquire(&build_graph(ggml_allocr*,std::vector<int,std::allocator<int>>,bool)
::buf_size), iVar4 != 0)) {
/* try { // try from 001355b4 to 001355c0 has its CatchHandler @ 00135643 */
lVar11 = ggml_tensor_overhead();
lVar12 = ggml_graph_overhead();
build_graph(ggml_allocr*,std::vector<int,std::allocator<int>>,bool)::buf_size =
lVar12 + lVar11 * 0x800;
__cxa_guard_release(&build_graph(ggml_allocr*,std::vector<int,std::allocator<int>>,bool)::
buf_size);
}
if ((build_graph(ggml_allocr*,std::vector<int,std::allocator<int>>,bool)::buf == '\0') &&
(iVar4 = __cxa_guard_acquire(&build_graph(ggml_allocr*,std::vector<int,std::allocator<int>>,bool)
::buf), iVar4 != 0)) {
/* try { // try from 001355fb to 0013560b has its CatchHandler @ 00135637 */
std::vector<unsigned_char,std::allocator<unsigned_char>>::vector
((vector<unsigned_char,std::allocator<unsigned_char>> *)
&build_graph(ggml_allocr*,std::vector<int,std::allocator<int>>,bool)::buf,
build_graph(ggml_allocr*,std::vector<int,std::allocator<int>>,bool)::buf_size,
&local_61);
__cxa_atexit(std::vector<unsigned_char,std::allocator<unsigned_char>>::~vector,
&build_graph(ggml_allocr*,std::vector<int,std::allocator<int>>,bool)::buf,
&__dso_handle);
__cxa_guard_release(&build_graph(ggml_allocr*,std::vector<int,std::allocator<int>>,bool)::buf);
}
local_48 = build_graph(ggml_allocr*,std::vector<int,std::allocator<int>>,bool)::buf_size;
uStack_40 = build_graph(ggml_allocr*,std::vector<int,std::allocator<int>>,bool)::buf;
local_38 = 1;
pgVar5 = (ggml_context *)ggml_init();
local_50 = ggml_new_graph(pgVar5);
pgVar6 = (ggml_tensor *)ggml_new_tensor_1d(pgVar5,0x12,param_3[1] - *param_3 >> 2);
ggml_allocr_alloc(param_1,pgVar6);
cVar3 = ggml_allocr_is_measure(param_1);
if (cVar3 == '\0') {
lVar11 = *param_3;
lVar12 = param_3[1];
lVar7 = ggml_element_size(pgVar6);
ggml_backend_tensor_set(pgVar6,lVar11,0,(lVar12 - lVar11 >> 2) * lVar7);
}
uVar14 = 0;
pgVar15 = (ggml_tensor *)0x0;
if (*(int *)(local_60 + 0x68) == 2) {
pgVar15 = (ggml_tensor *)ggml_new_tensor_1d(pgVar5,0x12,param_3[1] - *param_3 >> 2);
ggml_allocr_alloc(param_1,pgVar15);
puVar8 = (int4 *)
std::
__find_if<__gnu_cxx::__normal_iterator<int*,std::vector<int,std::allocator<int>>>,__gnu_cxx::__ops::_Iter_equals_val<int_const>>
(*param_3,param_3[1],&EOS_TOKEN_ID);
puVar1 = (int4 *)param_3[1];
puVar13 = puVar8;
if (puVar8 != puVar1) {
while (puVar13 = puVar13 + 1, puVar13 != puVar1) {
*puVar13 = 0;
}
}
uVar9 = (long)puVar8 - *param_3 >> 2;
uVar14 = ((long)puVar1 - *param_3 >> 2) - 1;
if (uVar9 <= uVar14) {
uVar14 = uVar9;
}
cVar3 = ggml_allocr_is_measure(param_1);
if (cVar3 == '\0') {
lVar11 = *param_3;
lVar12 = param_3[1];
lVar7 = ggml_element_size(pgVar15);
ggml_backend_tensor_set(pgVar15,lVar11,0,(lVar12 - lVar11 >> 2) * lVar7);
}
}
uVar10 = forward(local_60,pgVar5,pgVar6,pgVar15,uVar14,local_54._0_1_);
uVar2 = local_50;
ggml_build_forward_expand(local_50,uVar10);
ggml_free(pgVar5);
return uVar2;
}
| |
51,874 | FrozenCLIPEmbedderWithCustomWords::build_graph(ggml_allocr*, std::vector<int, std::allocator<int>>, bool) | 7CodeWizard[P]stablediffusion/clip.hpp | struct ggml_cgraph* build_graph(struct ggml_allocr* allocr, std::vector<int> tokens, bool return_pooled = false) {
// since we are using ggml-alloc, this buffer only needs enough space to hold the ggml_tensor and ggml_cgraph structs, but not the tensor data
static size_t buf_size = ggml_tensor_overhead() * GGML_DEFAULT_GRAPH_SIZE + ggml_graph_overhead();
static std::vector<uint8_t> buf(buf_size);
struct ggml_init_params params = {
/*.mem_size =*/buf_size,
/*.mem_buffer =*/buf.data(),
/*.no_alloc =*/true, // the tensors will be allocated later by ggml_allocr_alloc_graph()
};
struct ggml_context* ctx0 = ggml_init(params);
struct ggml_cgraph* gf = ggml_new_graph(ctx0);
struct ggml_tensor* input_ids = ggml_new_tensor_1d(ctx0, GGML_TYPE_I32, tokens.size());
ggml_allocr_alloc(allocr, input_ids);
if (!ggml_allocr_is_measure(allocr)) {
ggml_backend_tensor_set(input_ids, tokens.data(), 0, tokens.size() * ggml_element_size(input_ids));
}
struct ggml_tensor* input_ids2 = NULL;
size_t max_token_idx = 0;
if (version == VERSION_XL) {
input_ids2 = ggml_new_tensor_1d(ctx0, GGML_TYPE_I32, tokens.size());
ggml_allocr_alloc(allocr, input_ids2);
auto it = std::find(tokens.begin(), tokens.end(), EOS_TOKEN_ID);
if (it != tokens.end()) {
std::fill(std::next(it), tokens.end(), 0);
}
max_token_idx = std::min<size_t>(std::distance(tokens.begin(), it), tokens.size() - 1);
// for (int i = 0; i < tokens.size(); i++) {
// printf("%d ", tokens[i]);
// }
// printf("\n");
if (!ggml_allocr_is_measure(allocr)) {
ggml_backend_tensor_set(input_ids2, tokens.data(), 0, tokens.size() * ggml_element_size(input_ids2));
}
}
struct ggml_tensor* hidden_states = forward(ctx0, input_ids, input_ids2, max_token_idx, return_pooled);
ggml_build_forward_expand(gf, hidden_states);
ggml_free(ctx0);
return gf;
} | O3 | cpp | FrozenCLIPEmbedderWithCustomWords::build_graph(ggml_allocr*, std::vector<int, std::allocator<int>>, bool):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x58, %rsp
movl %ecx, 0x2c(%rsp)
movq %rdx, %r15
movq %rsi, %r14
movq %rdi, %r12
movb 0x123fa3(%rip), %al # 0x175f48
testb %al, %al
movq %rdi, 0x20(%rsp)
je 0x5218b
movb 0x123fb0(%rip), %al # 0x175f68
testb %al, %al
je 0x521d0
movq 0x123f79(%rip), %rax # 0x175f40
movq 0x123f82(%rip), %rcx # 0x175f50
movq %rax, 0x40(%rsp)
movq %rcx, 0x48(%rsp)
movb $0x1, 0x50(%rsp)
movq 0x50(%rsp), %rax
movq %rax, 0x10(%rsp)
movups 0x40(%rsp), %xmm0
movups %xmm0, (%rsp)
callq 0x8d140
movq %rax, %r13
movq %rax, %rdi
callq 0x968a0
movq %rax, 0x38(%rsp)
movq 0x8(%r15), %rdx
subq (%r15), %rdx
sarq $0x2, %rdx
movq %r13, %rdi
movl $0x12, %esi
callq 0x8d9b7
movq %rax, %rbx
movq %r14, %rdi
movq %rax, %rsi
callq 0xb240d
movq %r14, 0x30(%rsp)
movq %r14, %rdi
callq 0xb23fb
testb %al, %al
jne 0x5206b
movq (%r15), %r14
movq 0x8(%r15), %r12
subq %r14, %r12
sarq $0x2, %r12
movq %rbx, %rdi
callq 0x8cfe8
imulq %rax, %r12
movq %rbx, %rdi
movq %r14, %rsi
xorl %edx, %edx
movq %r12, %rcx
movq 0x20(%rsp), %r12
callq 0xb2b9d
xorl %ebp, %ebp
cmpl $0x2, 0x68(%r12)
movl $0x0, %r14d
jne 0x52147
movq 0x8(%r15), %rdx
subq (%r15), %rdx
sarq $0x2, %rdx
movq %r13, %rdi
movl $0x12, %esi
callq 0x8d9b7
movq %rax, %r14
movq 0x30(%rsp), %rdi
movq %rax, %rsi
callq 0xb240d
movq (%r15), %rdi
movq 0x8(%r15), %rsi
leaq 0x6cf07(%rip), %rdx # 0xbefbc
callq 0x391b5
movq %rax, %r12
movq 0x8(%r15), %rbp
cmpq %rbp, %rax
sete %al
leaq 0x4(%r12), %rdi
cmpq %rbp, %rdi
sete %cl
orb %al, %cl
jne 0x520ef
movq %rbp, %rdx
subq %r12, %rdx
addq $-0x8, %rdx
andq $-0x4, %rdx
addq $0x4, %rdx
xorl %esi, %esi
callq 0xa2f0
movq (%r15), %rax
subq %rax, %r12
sarq $0x2, %r12
subq %rax, %rbp
sarq $0x2, %rbp
decq %rbp
cmpq %r12, %rbp
cmovaeq %r12, %rbp
movq 0x30(%rsp), %rdi
callq 0xb23fb
testb %al, %al
jne 0x52142
movq (%r15), %r12
movq 0x8(%r15), %r15
subq %r12, %r15
sarq $0x2, %r15
movq %r14, %rdi
callq 0x8cfe8
imulq %rax, %r15
movq %r14, %rdi
movq %r12, %rsi
xorl %edx, %edx
movq %r15, %rcx
callq 0xb2b9d
movq 0x20(%rsp), %r12
movzbl 0x2c(%rsp), %r9d
movq %r12, %rdi
movq %r13, %rsi
movq %rbx, %rdx
movq %r14, %rcx
movq %rbp, %r8
callq 0x522dc
movq 0x38(%rsp), %rbx
movq %rbx, %rdi
movq %rax, %rsi
callq 0x965bc
movq %r13, %rdi
callq 0x8d4cf
movq %rbx, %rax
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x123db6(%rip), %rdi # 0x175f48
callq 0xab20
testl %eax, %eax
je 0x51fb2
callq 0x8d091
movq %rax, %rbx
callq 0x966b8
shlq $0xb, %rbx
addq %rbx, %rax
movq %rax, 0x123d86(%rip) # 0x175f40
leaq 0x123d87(%rip), %rdi # 0x175f48
callq 0xa370
movq 0x20(%rsp), %r12
jmp 0x51fb2
leaq 0x123d91(%rip), %rdi # 0x175f68
callq 0xab20
testl %eax, %eax
je 0x51fc0
movq 0x123d55(%rip), %rsi # 0x175f40
leaq 0x123d5e(%rip), %rdi # 0x175f50
leaq 0x1f(%rsp), %rdx
callq 0x47410
leaq -0xad93(%rip), %rdi # 0x47470
leaq 0x123d46(%rip), %rsi # 0x175f50
leaq 0xa3427(%rip), %rdx # 0xf5638
callq 0xa500
leaq 0x123d4b(%rip), %rdi # 0x175f68
callq 0xa370
movq 0x20(%rsp), %r12
jmp 0x51fc0
movq %rax, %rbx
leaq 0x123d32(%rip), %rdi # 0x175f68
jmp 0x52242
movq %rax, %rbx
leaq 0x123d06(%rip), %rdi # 0x175f48
callq 0xa360
movq %rbx, %rdi
callq 0xaad0
nop
| _ZN33FrozenCLIPEmbedderWithCustomWords11build_graphEP11ggml_allocrSt6vectorIiSaIiEEb:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 58h
mov [rsp+88h+var_5C], ecx
mov r15, rdx
mov r14, rsi
mov r12, rdi
mov al, cs:_ZGVZN33FrozenCLIPEmbedderWithCustomWords11build_graphEP11ggml_allocrSt6vectorIiSaIiEEbE8buf_size; `guard variable for'FrozenCLIPEmbedderWithCustomWords::build_graph(ggml_allocr *,std::vector<int>,bool)::buf_size
test al, al
mov [rsp+88h+var_68], rdi
jz loc_5218B
loc_51FB2:
mov al, cs:_ZGVZN33FrozenCLIPEmbedderWithCustomWords11build_graphEP11ggml_allocrSt6vectorIiSaIiEEbE3buf; `guard variable for'FrozenCLIPEmbedderWithCustomWords::build_graph(ggml_allocr *,std::vector<int>,bool)::buf
test al, al
jz loc_521D0
loc_51FC0:
mov rax, cs:_ZZN33FrozenCLIPEmbedderWithCustomWords11build_graphEP11ggml_allocrSt6vectorIiSaIiEEbE8buf_size; FrozenCLIPEmbedderWithCustomWords::build_graph(ggml_allocr *,std::vector<int>,bool)::buf_size
mov rcx, cs:_ZZN33FrozenCLIPEmbedderWithCustomWords11build_graphEP11ggml_allocrSt6vectorIiSaIiEEbE3buf; FrozenCLIPEmbedderWithCustomWords::build_graph(ggml_allocr *,std::vector<int>,bool)::buf
mov qword ptr [rsp+88h+var_48], rax
mov qword ptr [rsp+88h+var_48+8], rcx
mov byte ptr [rsp+88h+var_38], 1
mov rax, [rsp+88h+var_38]
mov [rsp+88h+var_78], rax
movups xmm0, [rsp+88h+var_48]
movups [rsp+88h+var_88], xmm0
call ggml_init
mov r13, rax
mov rdi, rax
call ggml_new_graph
mov [rsp+88h+var_50], rax
mov rdx, [r15+8]
sub rdx, [r15]
sar rdx, 2
mov rdi, r13
mov esi, 12h
call ggml_new_tensor_1d
mov rbx, rax
mov rdi, r14
mov rsi, rax
call ggml_allocr_alloc
mov [rsp+88h+var_58], r14
mov rdi, r14
call ggml_allocr_is_measure
test al, al
jnz short loc_5206B
mov r14, [r15]
mov r12, [r15+8]
sub r12, r14
sar r12, 2
mov rdi, rbx
call ggml_element_size
imul r12, rax
mov rdi, rbx
mov rsi, r14
xor edx, edx
mov rcx, r12
mov r12, [rsp+88h+var_68]
call ggml_backend_tensor_set
loc_5206B:
xor ebp, ebp
cmp dword ptr [r12+68h], 2
mov r14d, 0
jnz loc_52147
mov rdx, [r15+8]
sub rdx, [r15]
sar rdx, 2
mov rdi, r13
mov esi, 12h
call ggml_new_tensor_1d
mov r14, rax
mov rdi, [rsp+88h+var_58]
mov rsi, rax
call ggml_allocr_alloc
mov rdi, [r15]
mov rsi, [r15+8]
lea rdx, _ZL12EOS_TOKEN_ID; EOS_TOKEN_ID
call _ZSt9__find_ifIN9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEENS0_5__ops16_Iter_equals_valIKiEEET_SB_SB_T0_St26random_access_iterator_tag; std::__find_if<__gnu_cxx::__normal_iterator<int *,std::vector<int>>,__gnu_cxx::__ops::_Iter_equals_val<int const>>(__gnu_cxx::__normal_iterator<int *,std::vector<int>>,__gnu_cxx::__normal_iterator<int *,std::vector<int>>,__gnu_cxx::__ops::_Iter_equals_val<int const>,std::random_access_iterator_tag)
mov r12, rax
mov rbp, [r15+8]
cmp rax, rbp
setz al
lea rdi, [r12+4]
cmp rdi, rbp
setz cl
or cl, al
jnz short loc_520EF
mov rdx, rbp
sub rdx, r12
add rdx, 0FFFFFFFFFFFFFFF8h
and rdx, 0FFFFFFFFFFFFFFFCh
add rdx, 4
xor esi, esi
call _memset
loc_520EF:
mov rax, [r15]
sub r12, rax
sar r12, 2
sub rbp, rax
sar rbp, 2
dec rbp
cmp rbp, r12
cmovnb rbp, r12
mov rdi, [rsp+88h+var_58]
call ggml_allocr_is_measure
test al, al
jnz short loc_52142
mov r12, [r15]
mov r15, [r15+8]
sub r15, r12
sar r15, 2
mov rdi, r14
call ggml_element_size
imul r15, rax
mov rdi, r14
mov rsi, r12
xor edx, edx
mov rcx, r15
call ggml_backend_tensor_set
loc_52142:
mov r12, [rsp+88h+var_68]
loc_52147:
movzx r9d, byte ptr [rsp+88h+var_5C]
mov rdi, r12
mov rsi, r13
mov rdx, rbx
mov rcx, r14
mov r8, rbp
call _ZN33FrozenCLIPEmbedderWithCustomWords7forwardEP12ggml_contextP11ggml_tensorS3_mb; FrozenCLIPEmbedderWithCustomWords::forward(ggml_context *,ggml_tensor *,ggml_tensor *,ulong,bool)
mov rbx, [rsp+88h+var_50]
mov rdi, rbx
mov rsi, rax
call ggml_build_forward_expand
mov rdi, r13
call ggml_free
mov rax, rbx
add rsp, 58h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_5218B:
lea rdi, _ZGVZN33FrozenCLIPEmbedderWithCustomWords11build_graphEP11ggml_allocrSt6vectorIiSaIiEEbE8buf_size; __guard *
call ___cxa_guard_acquire
test eax, eax
jz loc_51FB2
call ggml_tensor_overhead
mov rbx, rax
call ggml_graph_overhead
shl rbx, 0Bh
add rax, rbx
mov cs:_ZZN33FrozenCLIPEmbedderWithCustomWords11build_graphEP11ggml_allocrSt6vectorIiSaIiEEbE8buf_size, rax; FrozenCLIPEmbedderWithCustomWords::build_graph(ggml_allocr *,std::vector<int>,bool)::buf_size
lea rdi, _ZGVZN33FrozenCLIPEmbedderWithCustomWords11build_graphEP11ggml_allocrSt6vectorIiSaIiEEbE8buf_size; __guard *
call ___cxa_guard_release
mov r12, [rsp+88h+var_68]
jmp loc_51FB2
loc_521D0:
lea rdi, _ZGVZN33FrozenCLIPEmbedderWithCustomWords11build_graphEP11ggml_allocrSt6vectorIiSaIiEEbE3buf; __guard *
call ___cxa_guard_acquire
test eax, eax
jz loc_51FC0
mov rsi, cs:_ZZN33FrozenCLIPEmbedderWithCustomWords11build_graphEP11ggml_allocrSt6vectorIiSaIiEEbE8buf_size; FrozenCLIPEmbedderWithCustomWords::build_graph(ggml_allocr *,std::vector<int>,bool)::buf_size
lea rdi, _ZZN33FrozenCLIPEmbedderWithCustomWords11build_graphEP11ggml_allocrSt6vectorIiSaIiEEbE3buf; FrozenCLIPEmbedderWithCustomWords::build_graph(ggml_allocr *,std::vector<int>,bool)::buf
lea rdx, [rsp+88h+var_69]
call _ZNSt6vectorIhSaIhEEC2EmRKS0_; std::vector<uchar>::vector(ulong,std::allocator<uchar> const&)
lea rdi, _ZNSt6vectorIhSaIhEED2Ev; lpfunc
lea rsi, _ZZN33FrozenCLIPEmbedderWithCustomWords11build_graphEP11ggml_allocrSt6vectorIiSaIiEEbE3buf; obj
lea rdx, __dso_handle; lpdso_handle
call ___cxa_atexit
lea rdi, _ZGVZN33FrozenCLIPEmbedderWithCustomWords11build_graphEP11ggml_allocrSt6vectorIiSaIiEEbE3buf; __guard *
call ___cxa_guard_release
mov r12, [rsp+88h+var_68]
jmp loc_51FC0
mov rbx, rax
lea rdi, _ZGVZN33FrozenCLIPEmbedderWithCustomWords11build_graphEP11ggml_allocrSt6vectorIiSaIiEEbE3buf; `guard variable for'FrozenCLIPEmbedderWithCustomWords::build_graph(ggml_allocr *,std::vector<int>,bool)::buf
jmp short loc_52242
mov rbx, rax
lea rdi, _ZGVZN33FrozenCLIPEmbedderWithCustomWords11build_graphEP11ggml_allocrSt6vectorIiSaIiEEbE8buf_size; __guard *
loc_52242:
call ___cxa_guard_abort
mov rdi, rbx
call __Unwind_Resume
| long long FrozenCLIPEmbedderWithCustomWords::build_graph(
__guard *a1,
long long *a2,
long long *a3,
unsigned __int8 a4,
int a5,
int a6,
double a7)
{
long long *v8; // r14
__guard *v9; // r12
long long v10; // r13
long long v11; // rbx
_DWORD *v12; // r14
long long v13; // r12
long long v14; // rcx
unsigned long long v15; // rbp
long long v16; // r14
char *v17; // r12
char *v18; // rbp
unsigned long long v19; // r12
_DWORD *v20; // r12
long long v21; // r15
long long v22; // rax
long long v23; // rax
long long v25; // rbx
__guard *v26; // [rsp+20h] [rbp-68h]
long long *v28; // [rsp+30h] [rbp-58h]
long long v29; // [rsp+38h] [rbp-50h]
double v30; // [rsp+40h] [rbp-48h]
v8 = a2;
v9 = a1;
v26 = a1;
if ( !(_BYTE)`guard variable for'FrozenCLIPEmbedderWithCustomWords::build_graph(ggml_allocr *,std::vector<int>,bool)::buf_size )
{
a1 = &`guard variable for'FrozenCLIPEmbedderWithCustomWords::build_graph(ggml_allocr *,std::vector<int>,bool)::buf_size;
if ( __cxa_guard_acquire(&`guard variable for'FrozenCLIPEmbedderWithCustomWords::build_graph(ggml_allocr *,std::vector<int>,bool)::buf_size) )
{
v25 = ggml_tensor_overhead(a7);
FrozenCLIPEmbedderWithCustomWords::build_graph(ggml_allocr *,std::vector<int>,bool)::buf_size = (v25 << 11) + ggml_graph_overhead();
a1 = &`guard variable for'FrozenCLIPEmbedderWithCustomWords::build_graph(ggml_allocr *,std::vector<int>,bool)::buf_size;
__cxa_guard_release(&`guard variable for'FrozenCLIPEmbedderWithCustomWords::build_graph(ggml_allocr *,std::vector<int>,bool)::buf_size);
v9 = v26;
}
}
if ( !(_BYTE)`guard variable for'FrozenCLIPEmbedderWithCustomWords::build_graph(ggml_allocr *,std::vector<int>,bool)::buf )
{
a1 = &`guard variable for'FrozenCLIPEmbedderWithCustomWords::build_graph(ggml_allocr *,std::vector<int>,bool)::buf;
if ( __cxa_guard_acquire(&`guard variable for'FrozenCLIPEmbedderWithCustomWords::build_graph(ggml_allocr *,std::vector<int>,bool)::buf) )
{
std::vector<unsigned char>::vector(
(long long)&FrozenCLIPEmbedderWithCustomWords::build_graph(ggml_allocr *,std::vector<int>,bool)::buf,
FrozenCLIPEmbedderWithCustomWords::build_graph(ggml_allocr *,std::vector<int>,bool)::buf_size);
a2 = &FrozenCLIPEmbedderWithCustomWords::build_graph(ggml_allocr *,std::vector<int>,bool)::buf;
__cxa_atexit(
(void (*)(void *))std::vector<unsigned char>::~vector,
&FrozenCLIPEmbedderWithCustomWords::build_graph(ggml_allocr *,std::vector<int>,bool)::buf,
&_dso_handle);
a1 = &`guard variable for'FrozenCLIPEmbedderWithCustomWords::build_graph(ggml_allocr *,std::vector<int>,bool)::buf;
__cxa_guard_release(&`guard variable for'FrozenCLIPEmbedderWithCustomWords::build_graph(ggml_allocr *,std::vector<int>,bool)::buf);
v9 = v26;
}
}
v30 = *(double *)&FrozenCLIPEmbedderWithCustomWords::build_graph(ggml_allocr *,std::vector<int>,bool)::buf_size;
v10 = ggml_init(
(_DWORD)a1,
(_DWORD)a2,
(_DWORD)a3,
FrozenCLIPEmbedderWithCustomWords::build_graph(ggml_allocr *,std::vector<int>,bool)::buf,
a5,
a6,
FrozenCLIPEmbedderWithCustomWords::build_graph(ggml_allocr *,std::vector<int>,bool)::buf_size,
FrozenCLIPEmbedderWithCustomWords::build_graph(ggml_allocr *,std::vector<int>,bool)::buf,
1);
v29 = ggml_new_graph(v10);
v11 = ggml_new_tensor_1d(v10, 18LL, (a3[1] - *a3) >> 2);
ggml_allocr_alloc(v8, v11);
v28 = v8;
if ( !(unsigned __int8)ggml_allocr_is_measure(v8) )
{
v12 = (_DWORD *)*a3;
v13 = (a3[1] - *a3) >> 2;
v14 = ggml_element_size(v11) * v13;
v9 = v26;
ggml_backend_tensor_set(v11, v12, 0LL, v14);
}
v15 = 0LL;
v16 = 0LL;
if ( *((_DWORD *)v9 + 26) == 2 )
{
v16 = ggml_new_tensor_1d(v10, 18LL, (a3[1] - *a3) >> 2);
ggml_allocr_alloc(v28, v16);
v17 = (char *)std::__find_if<__gnu_cxx::__normal_iterator<int *,std::vector<int>>,__gnu_cxx::__ops::_Iter_equals_val<int const>>(
(_DWORD *)*a3,
a3[1],
&EOS_TOKEN_ID);
v18 = (char *)a3[1];
if ( v17 != v18 && v17 + 4 != v18 )
memset(v17 + 4, 0LL, ((v18 - v17 - 8) & 0xFFFFFFFFFFFFFFFCLL) + 4);
v19 = (long long)&v17[-*a3] >> 2;
v15 = ((long long)&v18[-*a3] >> 2) - 1;
if ( v15 >= v19 )
v15 = v19;
if ( !(unsigned __int8)ggml_allocr_is_measure(v28) )
{
v20 = (_DWORD *)*a3;
v21 = (a3[1] - *a3) >> 2;
v22 = ggml_element_size(v16);
ggml_backend_tensor_set(v16, v20, 0LL, v22 * v21);
}
v9 = v26;
}
v23 = FrozenCLIPEmbedderWithCustomWords::forward(v9, v10, v11, v16, v15, a4);
ggml_build_forward_expand(v29, v23);
ggml_free(v10, v30);
return v29;
}
| |||
51,875 | unicode_case1 | bluesky950520[P]quickjs/libunicode.c | static int unicode_case1(CharRange *cr, int case_mask)
{
#define MR(x) (1 << RUN_TYPE_ ## x)
const uint32_t tab_run_mask[3] = {
MR(U) | MR(UF) | MR(UL) | MR(LSU) | MR(U2L_399_EXT2) | MR(UF_D20) |
MR(UF_D1_EXT) | MR(U_EXT) | MR(UF_EXT2) | MR(UF_EXT3),
MR(L) | MR(LF) | MR(UL) | MR(LSU) | MR(U2L_399_EXT2) | MR(LF_EXT) | MR(LF_EXT2),
MR(UF) | MR(LF) | MR(UL) | MR(LSU) | MR(U2L_399_EXT2) | MR(LF_EXT) | MR(LF_EXT2) | MR(UF_D20) | MR(UF_D1_EXT) | MR(LF_EXT) | MR(UF_EXT2) | MR(UF_EXT3),
};
#undef MR
uint32_t mask, v, code, type, len, i, idx;
if (case_mask == 0)
return 0;
mask = 0;
for(i = 0; i < 3; i++) {
if ((case_mask >> i) & 1)
mask |= tab_run_mask[i];
}
for(idx = 0; idx < countof(case_conv_table1); idx++) {
v = case_conv_table1[idx];
type = (v >> (32 - 17 - 7 - 4)) & 0xf;
code = v >> (32 - 17);
len = (v >> (32 - 17 - 7)) & 0x7f;
if ((mask >> type) & 1) {
// printf("%d: type=%d %04x %04x\n", idx, type, code, code + len - 1);
switch(type) {
case RUN_TYPE_UL:
if ((case_mask & CASE_U) && (case_mask & (CASE_L | CASE_F)))
goto def_case;
code += ((case_mask & CASE_U) != 0);
for(i = 0; i < len; i += 2) {
if (cr_add_interval(cr, code + i, code + i + 1))
return -1;
}
break;
case RUN_TYPE_LSU:
if ((case_mask & CASE_U) && (case_mask & (CASE_L | CASE_F)))
goto def_case;
if (!(case_mask & CASE_U)) {
if (cr_add_interval(cr, code, code + 1))
return -1;
}
if (cr_add_interval(cr, code + 1, code + 2))
return -1;
if (case_mask & CASE_U) {
if (cr_add_interval(cr, code + 2, code + 3))
return -1;
}
break;
default:
def_case:
if (cr_add_interval(cr, code, code + len))
return -1;
break;
}
}
}
return 0;
} | O2 | c | unicode_case1:
testl %esi, %esi
je 0x80577
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
xorl %eax, %eax
leaq 0x1191c(%rip), %rcx # 0x91d7c
xorl %r13d, %r13d
cmpq $0x3, %rax
je 0x8047a
btl %eax, %esi
jae 0x80471
orl (%rcx), %r13d
incq %rax
addq $0x4, %rcx
jmp 0x80463
movl %esi, %eax
andl $0x1, %eax
movl %eax, 0x4(%rsp)
sete %al
testb $0x6, %sil
sete %cl
orb %al, %cl
movb %cl, 0x3(%rsp)
xorl %r14d, %r14d
cmpq $0x17a, %r14 # imm = 0x17A
je 0x8057a
leaq 0xa2a6(%rip), %rax # 0x8a750
movl (%rax,%r14,4), %ebp
movl %ebp, %eax
shrl $0x4, %eax
andl $0xf, %eax
btl %eax, %r13d
jae 0x8056a
movl %ebp, %r15d
shrl $0xf, %r15d
shrl $0x8, %ebp
andl $0x7f, %ebp
cmpl $0x5, %eax
je 0x80508
cmpl $0x4, %eax
jne 0x80556
cmpb $0x0, 0x3(%rsp)
je 0x80556
addl 0x4(%rsp), %r15d
xorl %r12d, %r12d
cmpl %ebp, %r12d
jae 0x8056a
leal 0x1(%r15), %edx
movq %rbx, %rdi
movl %r15d, %esi
callq 0x80099
addl $0x2, %r12d
addl $0x2, %r15d
testl %eax, %eax
je 0x804e6
jmp 0x80572
cmpb $0x0, 0x3(%rsp)
je 0x80556
leal 0x1(%r15), %ebp
cmpl $0x0, 0x4(%rsp)
jne 0x8052b
movq %rbx, %rdi
movl %r15d, %esi
movl %ebp, %edx
callq 0x80099
testl %eax, %eax
jne 0x80572
leal 0x2(%r15), %r12d
movq %rbx, %rdi
movl %ebp, %esi
movl %r12d, %edx
callq 0x80099
testl %eax, %eax
jne 0x80572
cmpl $0x0, 0x4(%rsp)
je 0x8056a
addl $0x3, %r15d
movq %rbx, %rdi
movl %r12d, %esi
movl %r15d, %edx
jmp 0x80561
addl %r15d, %ebp
movq %rbx, %rdi
movl %r15d, %esi
movl %ebp, %edx
callq 0x80099
testl %eax, %eax
jne 0x80572
incq %r14
jmp 0x80496
pushq $-0x1
popq %rax
jmp 0x8057c
xorl %eax, %eax
retq
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| unicode_case1:
test esi, esi
jz loc_80577
push rbp
push r15
push r14
push r13
push r12
push rbx
push rax
mov rbx, rdi
xor eax, eax
lea rcx, unk_91D7C
xor r13d, r13d
loc_80463:
cmp rax, 3
jz short loc_8047A
bt esi, eax
jnb short loc_80471
or r13d, [rcx]
loc_80471:
inc rax
add rcx, 4
jmp short loc_80463
loc_8047A:
mov eax, esi
and eax, 1
mov [rsp+38h+var_34], eax
setz al
test sil, 6
setz cl
or cl, al
mov [rsp+38h+var_35], cl
xor r14d, r14d
loc_80496:
cmp r14, 17Ah
jz loc_8057A
lea rax, case_conv_table1
mov ebp, [rax+r14*4]
mov eax, ebp
shr eax, 4
and eax, 0Fh
bt r13d, eax
jnb loc_8056A
mov r15d, ebp
shr r15d, 0Fh
shr ebp, 8
and ebp, 7Fh
cmp eax, 5
jz short loc_80508
cmp eax, 4
jnz short loc_80556
cmp [rsp+38h+var_35], 0
jz short loc_80556
add r15d, [rsp+38h+var_34]
xor r12d, r12d
loc_804E6:
cmp r12d, ebp
jnb short loc_8056A
lea edx, [r15+1]
mov rdi, rbx
mov esi, r15d
call cr_add_interval
add r12d, 2
add r15d, 2
test eax, eax
jz short loc_804E6
jmp short loc_80572
loc_80508:
cmp [rsp+38h+var_35], 0
jz short loc_80556
lea ebp, [r15+1]
cmp [rsp+38h+var_34], 0
jnz short loc_8052B
mov rdi, rbx
mov esi, r15d
mov edx, ebp
call cr_add_interval
test eax, eax
jnz short loc_80572
loc_8052B:
lea r12d, [r15+2]
mov rdi, rbx
mov esi, ebp
mov edx, r12d
call cr_add_interval
test eax, eax
jnz short loc_80572
cmp [rsp+38h+var_34], 0
jz short loc_8056A
add r15d, 3
mov rdi, rbx
mov esi, r12d
mov edx, r15d
jmp short loc_80561
loc_80556:
add ebp, r15d
mov rdi, rbx
mov esi, r15d
mov edx, ebp
loc_80561:
call cr_add_interval
test eax, eax
jnz short loc_80572
loc_8056A:
inc r14
jmp loc_80496
loc_80572:
push 0FFFFFFFFFFFFFFFFh
pop rax
jmp short loc_8057C
loc_80577:
xor eax, eax
retn
loc_8057A:
xor eax, eax
loc_8057C:
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| long long unicode_case1(int *a1, int a2)
{
long long v3; // rax
_DWORD *v4; // rcx
int v5; // r13d
long long i; // r14
unsigned int v7; // ebp
unsigned int v8; // eax
int v9; // r15d
unsigned int v10; // ebp
int v11; // r15d
unsigned int j; // r12d
int v13; // eax
int v14; // ebp
int *v15; // rdi
int v16; // esi
int v17; // edx
bool v19; // [rsp+1h] [rbp-35h]
int v20; // [rsp+2h] [rbp-34h]
if ( !a2 )
return 0LL;
v3 = 0LL;
v4 = &unk_91D7C;
v5 = 0;
while ( v3 != 3 )
{
if ( _bittest(&a2, v3) )
v5 |= *v4;
++v3;
++v4;
}
v20 = a2 & 1;
v19 = v20 == 0 || (a2 & 6) == 0;
for ( i = 0LL; i != 378; ++i )
{
v7 = case_conv_table1[i];
v8 = (unsigned __int8)v7 >> 4;
if ( !_bittest(&v5, v8) )
continue;
v9 = v7 >> 15;
v10 = (v7 >> 8) & 0x7F;
if ( v8 != 5 )
{
if ( v8 == 4 && v19 )
{
v11 = v20 + v9;
for ( j = 0; j < v10; j += 2 )
{
v13 = cr_add_interval(a1, v11, v11 + 1);
v11 += 2;
if ( v13 )
return -1LL;
}
continue;
}
LABEL_23:
v15 = a1;
v16 = v9;
v17 = v9 + v10;
LABEL_24:
if ( (unsigned int)cr_add_interval(v15, v16, v17) )
return -1LL;
continue;
}
if ( !v19 )
goto LABEL_23;
v14 = v9 + 1;
if ( !v20 && (unsigned int)cr_add_interval(a1, v9, v14) || (unsigned int)cr_add_interval(a1, v14, v9 + 2) )
return -1LL;
if ( v20 )
{
v15 = a1;
v16 = v9 + 2;
v17 = v9 + 3;
goto LABEL_24;
}
}
return 0LL;
}
| unicode_case1:
TEST ESI,ESI
JZ 0x00180577
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
PUSH RAX
MOV RBX,RDI
XOR EAX,EAX
LEA RCX,[0x191d7c]
XOR R13D,R13D
LAB_00180463:
CMP RAX,0x3
JZ 0x0018047a
BT ESI,EAX
JNC 0x00180471
OR R13D,dword ptr [RCX]
LAB_00180471:
INC RAX
ADD RCX,0x4
JMP 0x00180463
LAB_0018047a:
MOV EAX,ESI
AND EAX,0x1
MOV dword ptr [RSP + 0x4],EAX
SETZ AL
TEST SIL,0x6
SETZ CL
OR CL,AL
MOV byte ptr [RSP + 0x3],CL
XOR R14D,R14D
LAB_00180496:
CMP R14,0x17a
JZ 0x0018057a
LEA RAX,[0x18a750]
MOV EBP,dword ptr [RAX + R14*0x4]
MOV EAX,EBP
SHR EAX,0x4
AND EAX,0xf
BT R13D,EAX
JNC 0x0018056a
MOV R15D,EBP
SHR R15D,0xf
SHR EBP,0x8
AND EBP,0x7f
CMP EAX,0x5
JZ 0x00180508
CMP EAX,0x4
JNZ 0x00180556
CMP byte ptr [RSP + 0x3],0x0
JZ 0x00180556
ADD R15D,dword ptr [RSP + 0x4]
XOR R12D,R12D
LAB_001804e6:
CMP R12D,EBP
JNC 0x0018056a
LEA EDX,[R15 + 0x1]
MOV RDI,RBX
MOV ESI,R15D
CALL 0x00180099
ADD R12D,0x2
ADD R15D,0x2
TEST EAX,EAX
JZ 0x001804e6
JMP 0x00180572
LAB_00180508:
CMP byte ptr [RSP + 0x3],0x0
JZ 0x00180556
LEA EBP,[R15 + 0x1]
CMP dword ptr [RSP + 0x4],0x0
JNZ 0x0018052b
MOV RDI,RBX
MOV ESI,R15D
MOV EDX,EBP
CALL 0x00180099
TEST EAX,EAX
JNZ 0x00180572
LAB_0018052b:
LEA R12D,[R15 + 0x2]
MOV RDI,RBX
MOV ESI,EBP
MOV EDX,R12D
CALL 0x00180099
TEST EAX,EAX
JNZ 0x00180572
CMP dword ptr [RSP + 0x4],0x0
JZ 0x0018056a
ADD R15D,0x3
MOV RDI,RBX
MOV ESI,R12D
MOV EDX,R15D
JMP 0x00180561
LAB_00180556:
ADD EBP,R15D
MOV RDI,RBX
MOV ESI,R15D
MOV EDX,EBP
LAB_00180561:
CALL 0x00180099
TEST EAX,EAX
JNZ 0x00180572
LAB_0018056a:
INC R14
JMP 0x00180496
LAB_00180572:
PUSH -0x1
POP RAX
JMP 0x0018057c
LAB_00180577:
XOR EAX,EAX
RET
LAB_0018057a:
XOR EAX,EAX
LAB_0018057c:
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
int8 unicode_case1(int8 param_1,uint param_2)
{
uint uVar1;
int iVar2;
long lVar3;
uint *puVar4;
uint uVar5;
uint uVar6;
uint uVar7;
int iVar8;
bool bVar9;
bool bVar10;
uint local_34;
if (param_2 == 0) {
return 0;
}
puVar4 = &DAT_00191d7c;
uVar6 = 0;
for (lVar3 = 0; lVar3 != 3; lVar3 = lVar3 + 1) {
if ((param_2 >> ((uint)lVar3 & 0x1f) & 1) != 0) {
uVar6 = uVar6 | *puVar4;
}
puVar4 = puVar4 + 1;
}
bVar9 = (param_2 & 1) != 0;
local_34 = param_2 & 1;
bVar10 = (param_2 & 6) != 0;
lVar3 = 0;
do {
if (lVar3 == 0x17a) {
return 0;
}
uVar5 = (&case_conv_table1)[lVar3];
uVar1 = uVar5 >> 4 & 0xf;
if ((uVar6 >> uVar1 & 1) != 0) {
uVar7 = uVar5 >> 0xf;
uVar5 = uVar5 >> 8 & 0x7f;
if (uVar1 == 5) {
if (bVar10 && bVar9) goto LAB_00180556;
if ((local_34 == 0) && (iVar8 = cr_add_interval(param_1,uVar7,uVar7 + 1), iVar8 != 0)) {
return 0xffffffffffffffff;
}
uVar5 = uVar7 + 2;
iVar8 = cr_add_interval(param_1,uVar7 + 1,uVar5);
if (iVar8 != 0) {
return 0xffffffffffffffff;
}
if (local_34 == 0) goto LAB_0018056a;
iVar8 = uVar7 + 3;
}
else {
if ((uVar1 == 4) && (!bVar10 || !bVar9)) {
iVar8 = uVar7 + local_34;
uVar1 = 0;
while (uVar1 < uVar5) {
iVar2 = cr_add_interval(param_1,iVar8,iVar8 + 1);
uVar1 = uVar1 + 2;
iVar8 = iVar8 + 2;
if (iVar2 != 0) {
return 0xffffffffffffffff;
}
}
goto LAB_0018056a;
}
LAB_00180556:
iVar8 = uVar5 + uVar7;
uVar5 = uVar7;
}
iVar8 = cr_add_interval(param_1,uVar5,iVar8);
if (iVar8 != 0) {
return 0xffffffffffffffff;
}
}
LAB_0018056a:
lVar3 = lVar3 + 1;
} while( true );
}
| |
51,876 | unicode_case1 | bluesky950520[P]quickjs/libunicode.c | static int unicode_case1(CharRange *cr, int case_mask)
{
#define MR(x) (1 << RUN_TYPE_ ## x)
const uint32_t tab_run_mask[3] = {
MR(U) | MR(UF) | MR(UL) | MR(LSU) | MR(U2L_399_EXT2) | MR(UF_D20) |
MR(UF_D1_EXT) | MR(U_EXT) | MR(UF_EXT2) | MR(UF_EXT3),
MR(L) | MR(LF) | MR(UL) | MR(LSU) | MR(U2L_399_EXT2) | MR(LF_EXT) | MR(LF_EXT2),
MR(UF) | MR(LF) | MR(UL) | MR(LSU) | MR(U2L_399_EXT2) | MR(LF_EXT) | MR(LF_EXT2) | MR(UF_D20) | MR(UF_D1_EXT) | MR(LF_EXT) | MR(UF_EXT2) | MR(UF_EXT3),
};
#undef MR
uint32_t mask, v, code, type, len, i, idx;
if (case_mask == 0)
return 0;
mask = 0;
for(i = 0; i < 3; i++) {
if ((case_mask >> i) & 1)
mask |= tab_run_mask[i];
}
for(idx = 0; idx < countof(case_conv_table1); idx++) {
v = case_conv_table1[idx];
type = (v >> (32 - 17 - 7 - 4)) & 0xf;
code = v >> (32 - 17);
len = (v >> (32 - 17 - 7)) & 0x7f;
if ((mask >> type) & 1) {
// printf("%d: type=%d %04x %04x\n", idx, type, code, code + len - 1);
switch(type) {
case RUN_TYPE_UL:
if ((case_mask & CASE_U) && (case_mask & (CASE_L | CASE_F)))
goto def_case;
code += ((case_mask & CASE_U) != 0);
for(i = 0; i < len; i += 2) {
if (cr_add_interval(cr, code + i, code + i + 1))
return -1;
}
break;
case RUN_TYPE_LSU:
if ((case_mask & CASE_U) && (case_mask & (CASE_L | CASE_F)))
goto def_case;
if (!(case_mask & CASE_U)) {
if (cr_add_interval(cr, code, code + 1))
return -1;
}
if (cr_add_interval(cr, code + 1, code + 2))
return -1;
if (case_mask & CASE_U) {
if (cr_add_interval(cr, code + 2, code + 3))
return -1;
}
break;
default:
def_case:
if (cr_add_interval(cr, code, code + len))
return -1;
break;
}
}
}
return 0;
} | O3 | c | unicode_case1:
testl %esi, %esi
je 0x9c44b
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
xorl %eax, %eax
leaq 0x11bab(%rip), %rcx # 0xade1c
xorl %ebp, %ebp
btl %eax, %esi
jae 0x9c27a
orl (%rcx), %ebp
incq %rax
addq $0x4, %rcx
cmpq $0x3, %rax
jne 0x9c273
movl %esi, %eax
andl $0x1, %eax
movl %eax, 0x4(%rsp)
sete %al
testb $0x6, %sil
sete %cl
orb %al, %cl
movb %cl, 0x3(%rsp)
xorl %r12d, %r12d
leaq 0xa546(%rip), %rax # 0xa67f0
movl (%rax,%r12,4), %r13d
movl %r13d, %eax
shrl $0x4, %eax
andl $0xf, %eax
btl %eax, %ebp
jae 0x9c437
movl %r13d, %r14d
shrl $0xf, %r14d
shrl $0x8, %r13d
andl $0x7f, %r13d
cmpl $0x5, %eax
je 0x9c346
cmpl $0x4, %eax
jne 0x9c3ee
cmpb $0x0, 0x3(%rsp)
je 0x9c3ee
testl %r13d, %r13d
je 0x9c437
addl 0x4(%rsp), %r14d
xorl %r15d, %r15d
movl (%rbx), %eax
leal 0x2(%rax), %esi
cmpl 0x4(%rbx), %esi
jle 0x9c315
movq %rbx, %rdi
callq 0x9af6f
testl %eax, %eax
jne 0x9c44e
movl (%rbx), %eax
leal (%r14,%r15), %ecx
leal (%r14,%r15), %edx
incl %edx
movq 0x8(%rbx), %rsi
leal 0x1(%rax), %edi
movl %edi, (%rbx)
cltq
movl %ecx, (%rsi,%rax,4)
movslq (%rbx), %rax
leal 0x1(%rax), %ecx
movl %ecx, (%rbx)
movl %edx, (%rsi,%rax,4)
addl $0x2, %r15d
cmpl %r13d, %r15d
jb 0x9c2f9
jmp 0x9c437
cmpb $0x0, 0x3(%rsp)
je 0x9c3ee
leal 0x1(%r14), %r13d
cmpl $0x0, 0x4(%rsp)
jne 0x9c393
movl (%rbx), %eax
leal 0x2(%rax), %esi
cmpl 0x4(%rbx), %esi
jle 0x9c378
movq %rbx, %rdi
callq 0x9af6f
testl %eax, %eax
jne 0x9c44e
movl (%rbx), %eax
movq 0x8(%rbx), %rcx
leal 0x1(%rax), %edx
movl %edx, (%rbx)
cltq
movl %r14d, (%rcx,%rax,4)
movslq (%rbx), %rax
leal 0x1(%rax), %edx
movl %edx, (%rbx)
movl %r13d, (%rcx,%rax,4)
movl (%rbx), %ecx
leal 0x2(%rcx), %esi
cmpl 0x4(%rbx), %esi
jle 0x9c3af
movq %rbx, %rdi
callq 0x9af6f
testl %eax, %eax
jne 0x9c44e
movl (%rbx), %ecx
leal 0x2(%r14), %r15d
movq 0x8(%rbx), %rax
leal 0x1(%rcx), %edx
movl %edx, (%rbx)
movslq %ecx, %rcx
movl %r13d, (%rax,%rcx,4)
movslq (%rbx), %rcx
leal 0x1(%rcx), %edx
movl %edx, (%rbx)
movl %r15d, (%rax,%rcx,4)
cmpl $0x0, 0x4(%rsp)
je 0x9c437
addl $0x3, %r14d
movl (%rbx), %ecx
leal 0x2(%rcx), %esi
cmpl 0x4(%rbx), %esi
jle 0x9c41f
movq %rbx, %rdi
callq 0x9af6f
jmp 0x9c409
addl %r14d, %r13d
movl (%rbx), %ecx
leal 0x2(%rcx), %esi
cmpl 0x4(%rbx), %esi
jle 0x9c415
movq %rbx, %rdi
callq 0x9af6f
movl %r14d, %r15d
movl %r13d, %r14d
testl %eax, %eax
jne 0x9c44e
movl %r14d, %r13d
movl (%rbx), %ecx
movl %r15d, %r14d
movq 0x8(%rbx), %rax
movl %r14d, %r15d
movl %r13d, %r14d
leal 0x1(%rcx), %edx
movl %edx, (%rbx)
movslq %ecx, %rcx
movl %r15d, (%rax,%rcx,4)
movslq (%rbx), %rcx
leal 0x1(%rcx), %edx
movl %edx, (%rbx)
movl %r14d, (%rax,%rcx,4)
incq %r12
cmpq $0x17a, %r12 # imm = 0x17A
jne 0x9c2a3
xorl %eax, %eax
jmp 0x9c453
xorl %eax, %eax
retq
movl $0xffffffff, %eax # imm = 0xFFFFFFFF
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| unicode_case1:
test esi, esi
jz loc_9C44B
push rbp
push r15
push r14
push r13
push r12
push rbx
push rax
mov rbx, rdi
xor eax, eax
lea rcx, unk_ADE1C
xor ebp, ebp
loc_9C273:
bt esi, eax
jnb short loc_9C27A
or ebp, [rcx]
loc_9C27A:
inc rax
add rcx, 4
cmp rax, 3
jnz short loc_9C273
mov eax, esi
and eax, 1
mov [rsp+38h+var_34], eax
setz al
test sil, 6
setz cl
or cl, al
mov [rsp+38h+var_35], cl
xor r12d, r12d
loc_9C2A3:
lea rax, case_conv_table1
mov r13d, [rax+r12*4]
mov eax, r13d
shr eax, 4
and eax, 0Fh
bt ebp, eax
jnb loc_9C437
mov r14d, r13d
shr r14d, 0Fh
shr r13d, 8
and r13d, 7Fh
cmp eax, 5
jz short loc_9C346
cmp eax, 4
jnz loc_9C3EE
cmp [rsp+38h+var_35], 0
jz loc_9C3EE
test r13d, r13d
jz loc_9C437
add r14d, [rsp+38h+var_34]
xor r15d, r15d
loc_9C2F9:
mov eax, [rbx]
lea esi, [rax+2]
cmp esi, [rbx+4]
jle short loc_9C315
mov rdi, rbx
call cr_realloc
test eax, eax
jnz loc_9C44E
mov eax, [rbx]
loc_9C315:
lea ecx, [r14+r15]
lea edx, [r14+r15]
inc edx
mov rsi, [rbx+8]
lea edi, [rax+1]
mov [rbx], edi
cdqe
mov [rsi+rax*4], ecx
movsxd rax, dword ptr [rbx]
lea ecx, [rax+1]
mov [rbx], ecx
mov [rsi+rax*4], edx
add r15d, 2
cmp r15d, r13d
jb short loc_9C2F9
jmp loc_9C437
loc_9C346:
cmp [rsp+38h+var_35], 0
jz loc_9C3EE
lea r13d, [r14+1]
cmp [rsp+38h+var_34], 0
jnz short loc_9C393
mov eax, [rbx]
lea esi, [rax+2]
cmp esi, [rbx+4]
jle short loc_9C378
mov rdi, rbx
call cr_realloc
test eax, eax
jnz loc_9C44E
mov eax, [rbx]
loc_9C378:
mov rcx, [rbx+8]
lea edx, [rax+1]
mov [rbx], edx
cdqe
mov [rcx+rax*4], r14d
movsxd rax, dword ptr [rbx]
lea edx, [rax+1]
mov [rbx], edx
mov [rcx+rax*4], r13d
loc_9C393:
mov ecx, [rbx]
lea esi, [rcx+2]
cmp esi, [rbx+4]
jle short loc_9C3AF
mov rdi, rbx
call cr_realloc
test eax, eax
jnz loc_9C44E
mov ecx, [rbx]
loc_9C3AF:
lea r15d, [r14+2]
mov rax, [rbx+8]
lea edx, [rcx+1]
mov [rbx], edx
movsxd rcx, ecx
mov [rax+rcx*4], r13d
movsxd rcx, dword ptr [rbx]
lea edx, [rcx+1]
mov [rbx], edx
mov [rax+rcx*4], r15d
cmp [rsp+38h+var_34], 0
jz short loc_9C437
add r14d, 3
mov ecx, [rbx]
lea esi, [rcx+2]
cmp esi, [rbx+4]
jle short loc_9C41F
mov rdi, rbx
call cr_realloc
jmp short loc_9C409
loc_9C3EE:
add r13d, r14d
mov ecx, [rbx]
lea esi, [rcx+2]
cmp esi, [rbx+4]
jle short loc_9C415
mov rdi, rbx
call cr_realloc
mov r15d, r14d
mov r14d, r13d
loc_9C409:
test eax, eax
jnz short loc_9C44E
mov r13d, r14d
mov ecx, [rbx]
mov r14d, r15d
loc_9C415:
mov rax, [rbx+8]
mov r15d, r14d
mov r14d, r13d
loc_9C41F:
lea edx, [rcx+1]
mov [rbx], edx
movsxd rcx, ecx
mov [rax+rcx*4], r15d
movsxd rcx, dword ptr [rbx]
lea edx, [rcx+1]
mov [rbx], edx
mov [rax+rcx*4], r14d
loc_9C437:
inc r12
cmp r12, 17Ah
jnz loc_9C2A3
xor eax, eax
jmp short loc_9C453
loc_9C44B:
xor eax, eax
retn
loc_9C44E:
mov eax, 0FFFFFFFFh
loc_9C453:
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| long long unicode_case1(int *a1, int a2)
{
long long v2; // rax
_DWORD *v3; // rcx
int v4; // ebp
long long v5; // r12
unsigned int v6; // r13d
unsigned int v7; // eax
unsigned int v8; // r14d
unsigned int v9; // r13d
unsigned int v10; // r14d
unsigned int i; // r15d
int v12; // eax
int v13; // esi
long long v14; // rsi
long long v15; // rax
unsigned int v16; // r13d
int v17; // eax
int v18; // esi
long long v19; // rcx
long long v20; // rax
int v21; // ecx
int v22; // esi
unsigned int v23; // r15d
long long v24; // rax
long long v25; // rcx
unsigned int v26; // r14d
int v27; // ecx
int v28; // esi
int v29; // eax
unsigned int v30; // r13d
int v31; // esi
long long v32; // rcx
bool v34; // [rsp+1h] [rbp-35h]
int v35; // [rsp+2h] [rbp-34h]
if ( !a2 )
return 0LL;
v2 = 0LL;
v3 = &unk_ADE1C;
v4 = 0;
do
{
if ( _bittest(&a2, v2) )
v4 |= *v3;
++v2;
++v3;
}
while ( v2 != 3 );
v35 = a2 & 1;
v34 = v35 == 0 || (a2 & 6) == 0;
v5 = 0LL;
while ( 1 )
{
v6 = case_conv_table1[v5];
v7 = (unsigned __int8)v6 >> 4;
if ( !_bittest(&v4, v7) )
goto LABEL_36;
v8 = v6 >> 15;
v9 = (v6 >> 8) & 0x7F;
if ( v7 != 5 )
break;
if ( !v34 )
goto LABEL_30;
v16 = v8 + 1;
if ( !v35 )
{
v17 = *a1;
v18 = *a1 + 2;
if ( v18 > a1[1] )
{
if ( (unsigned int)cr_realloc((long long)a1, v18) )
return 0xFFFFFFFFLL;
v17 = *a1;
}
v19 = *((_QWORD *)a1 + 1);
*a1 = v17 + 1;
*(_DWORD *)(v19 + 4LL * v17) = v8;
v20 = *a1;
*a1 = v20 + 1;
*(_DWORD *)(v19 + 4 * v20) = v16;
}
v21 = *a1;
v22 = *a1 + 2;
if ( v22 > a1[1] )
{
if ( (unsigned int)cr_realloc((long long)a1, v22) )
return 0xFFFFFFFFLL;
v21 = *a1;
}
v23 = v8 + 2;
v24 = *((_QWORD *)a1 + 1);
*a1 = v21 + 1;
*(_DWORD *)(v24 + 4LL * v21) = v16;
v25 = *a1;
*a1 = v25 + 1;
*(_DWORD *)(v24 + 4 * v25) = v8 + 2;
if ( v35 )
{
v26 = v8 + 3;
v27 = *a1;
v28 = *a1 + 2;
if ( v28 > a1[1] )
{
v29 = cr_realloc((long long)a1, v28);
goto LABEL_32;
}
LABEL_35:
*a1 = v27 + 1;
*(_DWORD *)(v24 + 4LL * v27) = v23;
v32 = *a1;
*a1 = v32 + 1;
*(_DWORD *)(v24 + 4 * v32) = v26;
}
LABEL_36:
if ( ++v5 == 378 )
return 0LL;
}
if ( v7 == 4 && v34 )
{
if ( v9 )
{
v10 = v35 + v8;
for ( i = 0; i < v9; i += 2 )
{
v12 = *a1;
v13 = *a1 + 2;
if ( v13 > a1[1] )
{
if ( (unsigned int)cr_realloc((long long)a1, v13) )
return 0xFFFFFFFFLL;
v12 = *a1;
}
v14 = *((_QWORD *)a1 + 1);
*a1 = v12 + 1;
*(_DWORD *)(v14 + 4LL * v12) = v10 + i;
v15 = *a1;
*a1 = v15 + 1;
*(_DWORD *)(v14 + 4 * v15) = v10 + i + 1;
}
}
goto LABEL_36;
}
LABEL_30:
v30 = v8 + v9;
v27 = *a1;
v31 = *a1 + 2;
if ( v31 <= a1[1] )
goto LABEL_34;
v29 = cr_realloc((long long)a1, v31);
v23 = v8;
v26 = v30;
LABEL_32:
if ( !v29 )
{
v30 = v26;
v27 = *a1;
v8 = v23;
LABEL_34:
v24 = *((_QWORD *)a1 + 1);
v23 = v8;
v26 = v30;
goto LABEL_35;
}
return 0xFFFFFFFFLL;
}
| unicode_case1:
TEST ESI,ESI
JZ 0x0019c44b
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
PUSH RAX
MOV RBX,RDI
XOR EAX,EAX
LEA RCX,[0x1ade1c]
XOR EBP,EBP
LAB_0019c273:
BT ESI,EAX
JNC 0x0019c27a
OR EBP,dword ptr [RCX]
LAB_0019c27a:
INC RAX
ADD RCX,0x4
CMP RAX,0x3
JNZ 0x0019c273
MOV EAX,ESI
AND EAX,0x1
MOV dword ptr [RSP + 0x4],EAX
SETZ AL
TEST SIL,0x6
SETZ CL
OR CL,AL
MOV byte ptr [RSP + 0x3],CL
XOR R12D,R12D
LAB_0019c2a3:
LEA RAX,[0x1a67f0]
MOV R13D,dword ptr [RAX + R12*0x4]
MOV EAX,R13D
SHR EAX,0x4
AND EAX,0xf
BT EBP,EAX
JNC 0x0019c437
MOV R14D,R13D
SHR R14D,0xf
SHR R13D,0x8
AND R13D,0x7f
CMP EAX,0x5
JZ 0x0019c346
CMP EAX,0x4
JNZ 0x0019c3ee
CMP byte ptr [RSP + 0x3],0x0
JZ 0x0019c3ee
TEST R13D,R13D
JZ 0x0019c437
ADD R14D,dword ptr [RSP + 0x4]
XOR R15D,R15D
LAB_0019c2f9:
MOV EAX,dword ptr [RBX]
LEA ESI,[RAX + 0x2]
CMP ESI,dword ptr [RBX + 0x4]
JLE 0x0019c315
MOV RDI,RBX
CALL 0x0019af6f
TEST EAX,EAX
JNZ 0x0019c44e
MOV EAX,dword ptr [RBX]
LAB_0019c315:
LEA ECX,[R14 + R15*0x1]
LEA EDX,[R14 + R15*0x1]
INC EDX
MOV RSI,qword ptr [RBX + 0x8]
LEA EDI,[RAX + 0x1]
MOV dword ptr [RBX],EDI
CDQE
MOV dword ptr [RSI + RAX*0x4],ECX
MOVSXD RAX,dword ptr [RBX]
LEA ECX,[RAX + 0x1]
MOV dword ptr [RBX],ECX
MOV dword ptr [RSI + RAX*0x4],EDX
ADD R15D,0x2
CMP R15D,R13D
JC 0x0019c2f9
JMP 0x0019c437
LAB_0019c346:
CMP byte ptr [RSP + 0x3],0x0
JZ 0x0019c3ee
LEA R13D,[R14 + 0x1]
CMP dword ptr [RSP + 0x4],0x0
JNZ 0x0019c393
MOV EAX,dword ptr [RBX]
LEA ESI,[RAX + 0x2]
CMP ESI,dword ptr [RBX + 0x4]
JLE 0x0019c378
MOV RDI,RBX
CALL 0x0019af6f
TEST EAX,EAX
JNZ 0x0019c44e
MOV EAX,dword ptr [RBX]
LAB_0019c378:
MOV RCX,qword ptr [RBX + 0x8]
LEA EDX,[RAX + 0x1]
MOV dword ptr [RBX],EDX
CDQE
MOV dword ptr [RCX + RAX*0x4],R14D
MOVSXD RAX,dword ptr [RBX]
LEA EDX,[RAX + 0x1]
MOV dword ptr [RBX],EDX
MOV dword ptr [RCX + RAX*0x4],R13D
LAB_0019c393:
MOV ECX,dword ptr [RBX]
LEA ESI,[RCX + 0x2]
CMP ESI,dword ptr [RBX + 0x4]
JLE 0x0019c3af
MOV RDI,RBX
CALL 0x0019af6f
TEST EAX,EAX
JNZ 0x0019c44e
MOV ECX,dword ptr [RBX]
LAB_0019c3af:
LEA R15D,[R14 + 0x2]
MOV RAX,qword ptr [RBX + 0x8]
LEA EDX,[RCX + 0x1]
MOV dword ptr [RBX],EDX
MOVSXD RCX,ECX
MOV dword ptr [RAX + RCX*0x4],R13D
MOVSXD RCX,dword ptr [RBX]
LEA EDX,[RCX + 0x1]
MOV dword ptr [RBX],EDX
MOV dword ptr [RAX + RCX*0x4],R15D
CMP dword ptr [RSP + 0x4],0x0
JZ 0x0019c437
ADD R14D,0x3
MOV ECX,dword ptr [RBX]
LEA ESI,[RCX + 0x2]
CMP ESI,dword ptr [RBX + 0x4]
JLE 0x0019c41f
MOV RDI,RBX
CALL 0x0019af6f
JMP 0x0019c409
LAB_0019c3ee:
ADD R13D,R14D
MOV ECX,dword ptr [RBX]
LEA ESI,[RCX + 0x2]
CMP ESI,dword ptr [RBX + 0x4]
JLE 0x0019c415
MOV RDI,RBX
CALL 0x0019af6f
MOV R15D,R14D
MOV R14D,R13D
LAB_0019c409:
TEST EAX,EAX
JNZ 0x0019c44e
MOV R13D,R14D
MOV ECX,dword ptr [RBX]
MOV R14D,R15D
LAB_0019c415:
MOV RAX,qword ptr [RBX + 0x8]
MOV R15D,R14D
MOV R14D,R13D
LAB_0019c41f:
LEA EDX,[RCX + 0x1]
MOV dword ptr [RBX],EDX
MOVSXD RCX,ECX
MOV dword ptr [RAX + RCX*0x4],R15D
MOVSXD RCX,dword ptr [RBX]
LEA EDX,[RCX + 0x1]
MOV dword ptr [RBX],EDX
MOV dword ptr [RAX + RCX*0x4],R14D
LAB_0019c437:
INC R12
CMP R12,0x17a
JNZ 0x0019c2a3
XOR EAX,EAX
JMP 0x0019c453
LAB_0019c44b:
XOR EAX,EAX
RET
LAB_0019c44e:
MOV EAX,0xffffffff
LAB_0019c453:
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
int8 unicode_case1(int *param_1,uint param_2)
{
uint uVar1;
int iVar2;
long lVar3;
long lVar4;
uint *puVar5;
uint uVar6;
uint uVar7;
int iVar8;
uint uVar9;
bool bVar10;
bool bVar11;
uint local_34;
if (param_2 == 0) {
return 0;
}
lVar3 = 0;
puVar5 = &DAT_001ade1c;
uVar6 = 0;
do {
if ((param_2 >> ((uint)lVar3 & 0x1f) & 1) != 0) {
uVar6 = uVar6 | *puVar5;
}
lVar3 = lVar3 + 1;
puVar5 = puVar5 + 1;
} while (lVar3 != 3);
bVar10 = (param_2 & 1) == 0;
local_34 = param_2 & 1;
bVar11 = (param_2 & 6) == 0;
lVar3 = 0;
do {
uVar7 = (&case_conv_table1)[lVar3];
uVar1 = uVar7 >> 4 & 0xf;
if ((uVar6 >> uVar1 & 1) != 0) {
uVar9 = uVar7 >> 0xf;
uVar7 = uVar7 >> 8 & 0x7f;
if (uVar1 == 5) {
if (!bVar11 && !bVar10) goto LAB_0019c3ee;
if (local_34 == 0) {
iVar2 = *param_1;
if (param_1[1] < iVar2 + 2) {
iVar2 = cr_realloc(param_1);
if (iVar2 != 0) {
return 0xffffffff;
}
iVar2 = *param_1;
}
lVar4 = *(long *)(param_1 + 2);
*param_1 = iVar2 + 1;
*(uint *)(lVar4 + (long)iVar2 * 4) = uVar9;
iVar2 = *param_1;
*param_1 = iVar2 + 1;
*(uint *)(lVar4 + (long)iVar2 * 4) = uVar9 + 1;
}
iVar2 = *param_1;
if (param_1[1] < iVar2 + 2) {
iVar2 = cr_realloc(param_1);
if (iVar2 != 0) {
return 0xffffffff;
}
iVar2 = *param_1;
}
uVar7 = uVar9 + 2;
lVar4 = *(long *)(param_1 + 2);
*param_1 = iVar2 + 1;
*(uint *)(lVar4 + (long)iVar2 * 4) = uVar9 + 1;
iVar2 = *param_1;
*param_1 = iVar2 + 1;
*(uint *)(lVar4 + (long)iVar2 * 4) = uVar7;
if (local_34 == 0) goto LAB_0019c437;
iVar8 = uVar9 + 3;
iVar2 = *param_1;
if (param_1[1] < iVar2 + 2) {
iVar2 = cr_realloc(param_1);
uVar9 = uVar7;
goto LAB_0019c409;
}
}
else {
if ((uVar1 == 4) && (bVar11 || bVar10)) {
if (uVar7 != 0) {
uVar1 = 0;
do {
iVar2 = *param_1;
if (param_1[1] < iVar2 + 2) {
iVar2 = cr_realloc(param_1);
if (iVar2 != 0) {
return 0xffffffff;
}
iVar2 = *param_1;
}
lVar4 = *(long *)(param_1 + 2);
*param_1 = iVar2 + 1;
*(uint *)(lVar4 + (long)iVar2 * 4) = uVar9 + local_34 + uVar1;
iVar2 = *param_1;
*param_1 = iVar2 + 1;
*(uint *)(lVar4 + (long)iVar2 * 4) = uVar9 + local_34 + uVar1 + 1;
uVar1 = uVar1 + 2;
} while (uVar1 < uVar7);
}
goto LAB_0019c437;
}
LAB_0019c3ee:
iVar8 = uVar7 + uVar9;
iVar2 = *param_1;
if (param_1[1] < iVar2 + 2) {
iVar2 = cr_realloc(param_1);
LAB_0019c409:
if (iVar2 != 0) {
return 0xffffffff;
}
iVar2 = *param_1;
}
lVar4 = *(long *)(param_1 + 2);
uVar7 = uVar9;
}
*param_1 = iVar2 + 1;
*(uint *)(lVar4 + (long)iVar2 * 4) = uVar7;
iVar2 = *param_1;
*param_1 = iVar2 + 1;
*(int *)(lVar4 + (long)iVar2 * 4) = iVar8;
}
LAB_0019c437:
lVar3 = lVar3 + 1;
if (lVar3 == 0x17a) {
return 0;
}
} while( true );
}
| |
51,877 | LefDefParser::lefiAntennaModel::setAntennaPWL(LefDefParser::lefiAntennaEnum, LefDefParser::lefiAntennaPWL*) | Efficient-TDP/thirdparty/Limbo/limbo/thirdparty/lefdef/5.8/lef/lef/lefiLayer.cpp | void
lefiAntennaModel::setAntennaPWL(lefiAntennaEnum antennaType,
lefiAntennaPWL *pwl)
{
switch (antennaType) {
case lefiAntennaDAR:
if (antennaDiffAreaRatioPWL_) {
antennaDiffAreaRatioPWL_->Destroy();
lefFree(antennaDiffAreaRatioPWL_);
}
antennaDiffAreaRatioPWL_ = pwl;
break;
case lefiAntennaCDAR:
if (antennaCumDiffAreaRatioPWL_) {
antennaCumDiffAreaRatioPWL_->Destroy();
lefFree(antennaCumDiffAreaRatioPWL_);
}
antennaCumDiffAreaRatioPWL_ = pwl;
break;
case lefiAntennaDSAR:
if (antennaDiffSideAreaRatioPWL_) {
antennaDiffSideAreaRatioPWL_->Destroy();
lefFree(antennaDiffSideAreaRatioPWL_);
}
antennaDiffSideAreaRatioPWL_ = pwl;
break;
case lefiAntennaCDSAR:
if (antennaCumDiffSideAreaRatioPWL_) {
antennaCumDiffSideAreaRatioPWL_->Destroy();
lefFree(antennaCumDiffSideAreaRatioPWL_);
}
antennaCumDiffSideAreaRatioPWL_ = pwl;
break;
case lefiAntennaADR:
if (antennaAreaDiffReducePWL_) {
antennaAreaDiffReducePWL_->Destroy();
lefFree(antennaAreaDiffReducePWL_);
}
antennaAreaDiffReducePWL_ = pwl;
break;
default:
pwl->Destroy();
lefFree(pwl);
break;
}
} | O3 | cpp | LefDefParser::lefiAntennaModel::setAntennaPWL(LefDefParser::lefiAntennaEnum, LefDefParser::lefiAntennaPWL*):
pushq %r14
pushq %rbx
pushq %rax
movq %rdx, %rbx
decl %esi
cmpl $0xa, %esi
ja 0x234c7
movq %rdi, %r14
leaq 0x47722(%rip), %rax # 0x6abc0
movslq (%rax,%rsi,4), %rcx
addq %rax, %rcx
jmpq *%rcx
movq 0x68(%r14), %rdi
testq %rdi, %rdi
je 0x234be
callq 0x2253e
movq 0x68(%r14), %rdi
callq 0x322d0
movq %rbx, 0x68(%r14)
jmp 0x23574
movq %rbx, %rdi
callq 0x2253e
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x322d0
movq 0xa0(%r14), %rdi
testq %rdi, %rdi
je 0x234fb
callq 0x2253e
movq 0xa0(%r14), %rdi
callq 0x322d0
movq %rbx, 0xa0(%r14)
jmp 0x23574
movq 0x80(%r14), %rdi
testq %rdi, %rdi
je 0x23521
callq 0x2253e
movq 0x80(%r14), %rdi
callq 0x322d0
movq %rbx, 0x80(%r14)
jmp 0x23574
movq 0xb8(%r14), %rdi
testq %rdi, %rdi
je 0x23547
callq 0x2253e
movq 0xb8(%r14), %rdi
callq 0x322d0
movq %rbx, 0xb8(%r14)
jmp 0x23574
movq 0xd8(%r14), %rdi
testq %rdi, %rdi
je 0x2356d
callq 0x2253e
movq 0xd8(%r14), %rdi
callq 0x322d0
movq %rbx, 0xd8(%r14)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
| _ZN12LefDefParser16lefiAntennaModel13setAntennaPWLENS_15lefiAntennaEnumEPNS_14lefiAntennaPWLE:
push r14
push rbx
push rax
mov rbx, rdx
dec esi; switch 11 cases
cmp esi, 0Ah
ja short def_234A5; jumptable 00000000000234A5 default case, cases 2,4,5,7,9,10
mov r14, rdi
lea rax, jpt_234A5
movsxd rcx, ds:(jpt_234A5 - 6ABC0h)[rax+rsi*4]
add rcx, rax
jmp rcx; switch jump
loc_234A7:
mov rdi, [r14+68h]; jumptable 00000000000234A5 case 1
test rdi, rdi
jz short loc_234BE
call _ZN12LefDefParser14lefiAntennaPWL7DestroyEv; LefDefParser::lefiAntennaPWL::Destroy(void)
mov rdi, [r14+68h]; this
call _ZN12LefDefParser7lefFreeEPv; LefDefParser::lefFree(void *)
loc_234BE:
mov [r14+68h], rbx
jmp loc_23574
def_234A5:
mov rdi, rbx; jumptable 00000000000234A5 default case, cases 2,4,5,7,9,10
call _ZN12LefDefParser14lefiAntennaPWL7DestroyEv; LefDefParser::lefiAntennaPWL::Destroy(void)
mov rdi, rbx; this
add rsp, 8
pop rbx
pop r14
jmp _ZN12LefDefParser7lefFreeEPv; LefDefParser::lefFree(void *)
loc_234DE:
mov rdi, [r14+0A0h]; jumptable 00000000000234A5 case 6
test rdi, rdi
jz short loc_234FB
call _ZN12LefDefParser14lefiAntennaPWL7DestroyEv; LefDefParser::lefiAntennaPWL::Destroy(void)
mov rdi, [r14+0A0h]; this
call _ZN12LefDefParser7lefFreeEPv; LefDefParser::lefFree(void *)
loc_234FB:
mov [r14+0A0h], rbx
jmp short loc_23574
loc_23504:
mov rdi, [r14+80h]; jumptable 00000000000234A5 case 3
test rdi, rdi
jz short loc_23521
call _ZN12LefDefParser14lefiAntennaPWL7DestroyEv; LefDefParser::lefiAntennaPWL::Destroy(void)
mov rdi, [r14+80h]; this
call _ZN12LefDefParser7lefFreeEPv; LefDefParser::lefFree(void *)
loc_23521:
mov [r14+80h], rbx
jmp short loc_23574
loc_2352A:
mov rdi, [r14+0B8h]; jumptable 00000000000234A5 case 8
test rdi, rdi
jz short loc_23547
call _ZN12LefDefParser14lefiAntennaPWL7DestroyEv; LefDefParser::lefiAntennaPWL::Destroy(void)
mov rdi, [r14+0B8h]; this
call _ZN12LefDefParser7lefFreeEPv; LefDefParser::lefFree(void *)
loc_23547:
mov [r14+0B8h], rbx
jmp short loc_23574
loc_23550:
mov rdi, [r14+0D8h]; jumptable 00000000000234A5 case 11
test rdi, rdi
jz short loc_2356D
call _ZN12LefDefParser14lefiAntennaPWL7DestroyEv; LefDefParser::lefiAntennaPWL::Destroy(void)
mov rdi, [r14+0D8h]; this
call _ZN12LefDefParser7lefFreeEPv; LefDefParser::lefFree(void *)
loc_2356D:
mov [r14+0D8h], rbx
loc_23574:
add rsp, 8
pop rbx
pop r14
retn
| long long LefDefParser::lefiAntennaModel::setAntennaPWL(
LefDefParser **a1,
int a2,
LefDefParser::lefiAntennaPWL *a3)
{
unsigned long long v4; // rsi
LefDefParser::lefiAntennaPWL *v6; // rdi
long long result; // rax
LefDefParser::lefiAntennaPWL *v8; // rdi
LefDefParser::lefiAntennaPWL *v9; // rdi
LefDefParser::lefiAntennaPWL *v10; // rdi
LefDefParser::lefiAntennaPWL *v11; // rdi
v4 = (unsigned int)(a2 - 1);
switch ( (int)v4 )
{
case 0:
v6 = a1[13];
if ( v6 )
{
LefDefParser::lefiAntennaPWL::Destroy(v6, (void *)v4);
result = LefDefParser::lefFree(a1[13], (void *)v4);
}
a1[13] = a3;
break;
case 2:
v9 = a1[16];
if ( v9 )
{
LefDefParser::lefiAntennaPWL::Destroy(v9, (void *)v4);
result = LefDefParser::lefFree(a1[16], (void *)v4);
}
a1[16] = a3;
break;
case 5:
v8 = a1[20];
if ( v8 )
{
LefDefParser::lefiAntennaPWL::Destroy(v8, (void *)v4);
result = LefDefParser::lefFree(a1[20], (void *)v4);
}
a1[20] = a3;
break;
case 7:
v10 = a1[23];
if ( v10 )
{
LefDefParser::lefiAntennaPWL::Destroy(v10, (void *)v4);
result = LefDefParser::lefFree(a1[23], (void *)v4);
}
a1[23] = a3;
break;
case 10:
v11 = a1[27];
if ( v11 )
{
LefDefParser::lefiAntennaPWL::Destroy(v11, (void *)v4);
result = LefDefParser::lefFree(a1[27], (void *)v4);
}
a1[27] = a3;
break;
default:
LefDefParser::lefiAntennaPWL::Destroy(a3, (void *)v4);
result = LefDefParser::lefFree(a3, (void *)v4);
break;
}
return result;
}
| setAntennaPWL:
PUSH R14
PUSH RBX
PUSH RAX
MOV RBX,RDX
DEC ESI
CMP ESI,0xa
JA 0x001234c7
MOV R14,RDI
LEA RAX,[0x16abc0]
MOVSXD RCX,dword ptr [RAX + RSI*0x4]
ADD RCX,RAX
switchD:
JMP RCX
caseD_1:
MOV RDI,qword ptr [R14 + 0x68]
TEST RDI,RDI
JZ 0x001234be
CALL 0x0012253e
MOV RDI,qword ptr [R14 + 0x68]
CALL 0x001322d0
LAB_001234be:
MOV qword ptr [R14 + 0x68],RBX
JMP 0x00123574
caseD_2:
MOV RDI,RBX
CALL 0x0012253e
MOV RDI,RBX
ADD RSP,0x8
POP RBX
POP R14
JMP 0x001322d0
caseD_6:
MOV RDI,qword ptr [R14 + 0xa0]
TEST RDI,RDI
JZ 0x001234fb
CALL 0x0012253e
MOV RDI,qword ptr [R14 + 0xa0]
CALL 0x001322d0
LAB_001234fb:
MOV qword ptr [R14 + 0xa0],RBX
JMP 0x00123574
caseD_3:
MOV RDI,qword ptr [R14 + 0x80]
TEST RDI,RDI
JZ 0x00123521
CALL 0x0012253e
MOV RDI,qword ptr [R14 + 0x80]
CALL 0x001322d0
LAB_00123521:
MOV qword ptr [R14 + 0x80],RBX
JMP 0x00123574
caseD_8:
MOV RDI,qword ptr [R14 + 0xb8]
TEST RDI,RDI
JZ 0x00123547
CALL 0x0012253e
MOV RDI,qword ptr [R14 + 0xb8]
CALL 0x001322d0
LAB_00123547:
MOV qword ptr [R14 + 0xb8],RBX
JMP 0x00123574
caseD_b:
MOV RDI,qword ptr [R14 + 0xd8]
TEST RDI,RDI
JZ 0x0012356d
CALL 0x0012253e
MOV RDI,qword ptr [R14 + 0xd8]
CALL 0x001322d0
LAB_0012356d:
MOV qword ptr [R14 + 0xd8],RBX
LAB_00123574:
ADD RSP,0x8
POP RBX
POP R14
RET
|
/* LefDefParser::lefiAntennaModel::setAntennaPWL(LefDefParser::lefiAntennaEnum,
LefDefParser::lefiAntennaPWL*) */
void __thiscall
LefDefParser::lefiAntennaModel::setAntennaPWL
(lefiAntennaModel *this,int4 param_2,lefiAntennaPWL *param_3)
{
switch(param_2) {
case 1:
if (*(lefiAntennaPWL **)(this + 0x68) != (lefiAntennaPWL *)0x0) {
lefiAntennaPWL::Destroy(*(lefiAntennaPWL **)(this + 0x68));
lefFree(*(void **)(this + 0x68));
}
*(lefiAntennaPWL **)(this + 0x68) = param_3;
break;
default:
lefiAntennaPWL::Destroy(param_3);
lefFree(param_3);
return;
case 3:
if (*(lefiAntennaPWL **)(this + 0x80) != (lefiAntennaPWL *)0x0) {
lefiAntennaPWL::Destroy(*(lefiAntennaPWL **)(this + 0x80));
lefFree(*(void **)(this + 0x80));
}
*(lefiAntennaPWL **)(this + 0x80) = param_3;
break;
case 6:
if (*(lefiAntennaPWL **)(this + 0xa0) != (lefiAntennaPWL *)0x0) {
lefiAntennaPWL::Destroy(*(lefiAntennaPWL **)(this + 0xa0));
lefFree(*(void **)(this + 0xa0));
}
*(lefiAntennaPWL **)(this + 0xa0) = param_3;
break;
case 8:
if (*(lefiAntennaPWL **)(this + 0xb8) != (lefiAntennaPWL *)0x0) {
lefiAntennaPWL::Destroy(*(lefiAntennaPWL **)(this + 0xb8));
lefFree(*(void **)(this + 0xb8));
}
*(lefiAntennaPWL **)(this + 0xb8) = param_3;
break;
case 0xb:
if (*(lefiAntennaPWL **)(this + 0xd8) != (lefiAntennaPWL *)0x0) {
lefiAntennaPWL::Destroy(*(lefiAntennaPWL **)(this + 0xd8));
lefFree(*(void **)(this + 0xd8));
}
*(lefiAntennaPWL **)(this + 0xd8) = param_3;
}
return;
}
| |
51,878 | google::protobuf::io::EpsCopyOutputStream::WriteRawFallback(void const*, int, unsigned char*) | aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/io/coded_stream.cc | uint8_t* EpsCopyOutputStream::WriteRawFallback(const void* data, int size,
uint8_t* ptr) {
int s = GetSize(ptr);
while (s < size) {
std::memcpy(ptr, data, s);
size -= s;
data = static_cast<const uint8_t*>(data) + s;
ptr = EnsureSpaceFallback(ptr + s);
s = GetSize(ptr);
}
std::memcpy(ptr, data, size);
return ptr + size;
} | O0 | cpp | google::protobuf::io::EpsCopyOutputStream::WriteRawFallback(void const*, int, unsigned char*):
subq $0x38, %rsp
movq %rdi, 0x30(%rsp)
movq %rsi, 0x28(%rsp)
movl %edx, 0x24(%rsp)
movq %rcx, 0x18(%rsp)
movq 0x30(%rsp), %rdi
movq %rdi, 0x8(%rsp)
movq 0x18(%rsp), %rsi
callq 0x227a0
movl %eax, 0x14(%rsp)
movl 0x14(%rsp), %eax
cmpl 0x24(%rsp), %eax
jge 0x2123e
movq 0x18(%rsp), %rdi
movq 0x28(%rsp), %rsi
movslq 0x14(%rsp), %rdx
callq 0x13390
movq 0x8(%rsp), %rdi
movl 0x14(%rsp), %ecx
movl 0x24(%rsp), %eax
subl %ecx, %eax
movl %eax, 0x24(%rsp)
movq 0x28(%rsp), %rax
movslq 0x14(%rsp), %rcx
addq %rcx, %rax
movq %rax, 0x28(%rsp)
movq 0x18(%rsp), %rsi
movslq 0x14(%rsp), %rax
addq %rax, %rsi
callq 0x20ea0
movq 0x8(%rsp), %rdi
movq %rax, 0x18(%rsp)
movq 0x18(%rsp), %rsi
callq 0x227a0
movl %eax, 0x14(%rsp)
jmp 0x211cf
movq 0x18(%rsp), %rdi
movq 0x28(%rsp), %rsi
movslq 0x24(%rsp), %rdx
callq 0x13390
movq 0x18(%rsp), %rax
movslq 0x24(%rsp), %rcx
addq %rcx, %rax
addq $0x38, %rsp
retq
nopw %cs:(%rax,%rax)
| _ZN6google8protobuf2io19EpsCopyOutputStream16WriteRawFallbackEPKviPh:
sub rsp, 38h
mov [rsp+38h+var_8], rdi
mov [rsp+38h+var_10], rsi
mov [rsp+38h+var_14], edx
mov [rsp+38h+var_20], rcx
mov rdi, [rsp+38h+var_8]; this
mov [rsp+38h+var_30], rdi
mov rsi, [rsp+38h+var_20]; unsigned __int8 *
call _ZNK6google8protobuf2io19EpsCopyOutputStream7GetSizeEPh; google::protobuf::io::EpsCopyOutputStream::GetSize(uchar *)
mov [rsp+38h+var_24], eax
loc_211CF:
mov eax, [rsp+38h+var_24]
cmp eax, [rsp+38h+var_14]
jge short loc_2123E
mov rdi, [rsp+38h+var_20]
mov rsi, [rsp+38h+var_10]
movsxd rdx, [rsp+38h+var_24]
call _memcpy
mov rdi, [rsp+38h+var_30]; this
mov ecx, [rsp+38h+var_24]
mov eax, [rsp+38h+var_14]
sub eax, ecx
mov [rsp+38h+var_14], eax
mov rax, [rsp+38h+var_10]
movsxd rcx, [rsp+38h+var_24]
add rax, rcx
mov [rsp+38h+var_10], rax
mov rsi, [rsp+38h+var_20]
movsxd rax, [rsp+38h+var_24]
add rsi, rax; unsigned __int8 *
call _ZN6google8protobuf2io19EpsCopyOutputStream19EnsureSpaceFallbackEPh; google::protobuf::io::EpsCopyOutputStream::EnsureSpaceFallback(uchar *)
mov rdi, [rsp+38h+var_30]; this
mov [rsp+38h+var_20], rax
mov rsi, [rsp+38h+var_20]; unsigned __int8 *
call _ZNK6google8protobuf2io19EpsCopyOutputStream7GetSizeEPh; google::protobuf::io::EpsCopyOutputStream::GetSize(uchar *)
mov [rsp+38h+var_24], eax
jmp short loc_211CF
loc_2123E:
mov rdi, [rsp+38h+var_20]
mov rsi, [rsp+38h+var_10]
movsxd rdx, [rsp+38h+var_14]
call _memcpy
mov rax, [rsp+38h+var_20]
movsxd rcx, [rsp+38h+var_14]
add rax, rcx
add rsp, 38h
retn
| unsigned __int8 * google::protobuf::io::EpsCopyOutputStream::WriteRawFallback(
google::protobuf::io::EpsCopyOutputStream *this,
char *a2,
int a3,
unsigned __int8 *a4)
{
int i; // [rsp+14h] [rbp-24h]
unsigned __int8 *v6; // [rsp+18h] [rbp-20h]
v6 = a4;
for ( i = google::protobuf::io::EpsCopyOutputStream::GetSize(this, a4);
i < a3;
i = google::protobuf::io::EpsCopyOutputStream::GetSize(this, v6) )
{
memcpy(v6, a2, i);
a3 -= i;
a2 += i;
v6 = (unsigned __int8 *)google::protobuf::io::EpsCopyOutputStream::EnsureSpaceFallback(this, &v6[i]);
}
memcpy(v6, a2, a3);
return &v6[a3];
}
| WriteRawFallback:
SUB RSP,0x38
MOV qword ptr [RSP + 0x30],RDI
MOV qword ptr [RSP + 0x28],RSI
MOV dword ptr [RSP + 0x24],EDX
MOV qword ptr [RSP + 0x18],RCX
MOV RDI,qword ptr [RSP + 0x30]
MOV qword ptr [RSP + 0x8],RDI
MOV RSI,qword ptr [RSP + 0x18]
CALL 0x001227a0
MOV dword ptr [RSP + 0x14],EAX
LAB_001211cf:
MOV EAX,dword ptr [RSP + 0x14]
CMP EAX,dword ptr [RSP + 0x24]
JGE 0x0012123e
MOV RDI,qword ptr [RSP + 0x18]
MOV RSI,qword ptr [RSP + 0x28]
MOVSXD RDX,dword ptr [RSP + 0x14]
CALL 0x00113390
MOV RDI,qword ptr [RSP + 0x8]
MOV ECX,dword ptr [RSP + 0x14]
MOV EAX,dword ptr [RSP + 0x24]
SUB EAX,ECX
MOV dword ptr [RSP + 0x24],EAX
MOV RAX,qword ptr [RSP + 0x28]
MOVSXD RCX,dword ptr [RSP + 0x14]
ADD RAX,RCX
MOV qword ptr [RSP + 0x28],RAX
MOV RSI,qword ptr [RSP + 0x18]
MOVSXD RAX,dword ptr [RSP + 0x14]
ADD RSI,RAX
CALL 0x00120ea0
MOV RDI,qword ptr [RSP + 0x8]
MOV qword ptr [RSP + 0x18],RAX
MOV RSI,qword ptr [RSP + 0x18]
CALL 0x001227a0
MOV dword ptr [RSP + 0x14],EAX
JMP 0x001211cf
LAB_0012123e:
MOV RDI,qword ptr [RSP + 0x18]
MOV RSI,qword ptr [RSP + 0x28]
MOVSXD RDX,dword ptr [RSP + 0x24]
CALL 0x00113390
MOV RAX,qword ptr [RSP + 0x18]
MOVSXD RCX,dword ptr [RSP + 0x24]
ADD RAX,RCX
ADD RSP,0x38
RET
|
/* google::protobuf::io::EpsCopyOutputStream::WriteRawFallback(void const*, int, unsigned char*) */
uchar * __thiscall
google::protobuf::io::EpsCopyOutputStream::WriteRawFallback
(EpsCopyOutputStream *this,void *param_1,int param_2,uchar *param_3)
{
int local_24;
uchar *local_20;
int local_14;
void *local_10;
local_24 = GetSize(this,param_3);
local_20 = param_3;
local_14 = param_2;
local_10 = param_1;
while (local_24 < local_14) {
memcpy(local_20,local_10,(long)local_24);
local_14 = local_14 - local_24;
local_10 = (void *)((long)local_10 + (long)local_24);
local_20 = (uchar *)EnsureSpaceFallback(this,local_20 + local_24);
local_24 = GetSize(this,local_20);
}
memcpy(local_20,local_10,(long)local_14);
return local_20 + local_14;
}
| |
51,879 | google::protobuf::DescriptorPool::FindExtensionByNumber(google::protobuf::Descriptor const*, int) const | aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/descriptor.cc | const FieldDescriptor* DescriptorPool::FindExtensionByNumber(
const Descriptor* extendee, int number) const {
if (extendee->extension_range_count() == 0) return nullptr;
// A faster path to reduce lock contention in finding extensions, assuming
// most extensions will be cache hit.
if (mutex_ != nullptr) {
ReaderMutexLock lock(mutex_);
const FieldDescriptor* result = tables_->FindExtension(extendee, number);
if (result != nullptr) {
return result;
}
}
MutexLockMaybe lock(mutex_);
if (fallback_database_ != nullptr) {
tables_->known_bad_symbols_.clear();
tables_->known_bad_files_.clear();
}
const FieldDescriptor* result = tables_->FindExtension(extendee, number);
if (result != nullptr) {
return result;
}
if (underlay_ != nullptr) {
result = underlay_->FindExtensionByNumber(extendee, number);
if (result != nullptr) return result;
}
if (TryFindExtensionInFallbackDatabase(extendee, number)) {
result = tables_->FindExtension(extendee, number);
if (result != nullptr) {
return result;
}
}
return nullptr;
} | O0 | cpp | google::protobuf::DescriptorPool::FindExtensionByNumber(google::protobuf::Descriptor const*, int) const:
subq $0x88, %rsp
movq %rdi, 0x78(%rsp)
movq %rsi, 0x70(%rsp)
movl %edx, 0x6c(%rsp)
movq 0x78(%rsp), %rax
movq %rax, 0x30(%rsp)
movq 0x70(%rsp), %rdi
callq 0x2825f0
cmpl $0x0, %eax
jne 0x2437ff
movq $0x0, 0x80(%rsp)
jmp 0x243a5a
movq 0x30(%rsp), %rax
cmpq $0x0, (%rax)
je 0x2438af
movq 0x30(%rsp), %rax
movq (%rax), %rsi
leaq 0x60(%rsp), %rdi
callq 0x176fb0
movq 0x30(%rsp), %rdi
addq $0x20, %rdi
callq 0x2812c0
movq %rax, %rdi
movq 0x70(%rsp), %rsi
movl 0x6c(%rsp), %edx
callq 0x282600
movq %rax, 0x28(%rsp)
jmp 0x243846
movq 0x28(%rsp), %rax
movq %rax, 0x58(%rsp)
cmpq $0x0, 0x58(%rsp)
je 0x24388c
movq 0x58(%rsp), %rax
movq %rax, 0x80(%rsp)
movl $0x1, 0x48(%rsp)
jmp 0x243894
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x50(%rsp)
movl %eax, 0x4c(%rsp)
leaq 0x60(%rsp), %rdi
callq 0x177050
jmp 0x243a6a
movl $0x0, 0x48(%rsp)
leaq 0x60(%rsp), %rdi
callq 0x177050
movl 0x48(%rsp), %eax
testl %eax, %eax
je 0x2438ad
jmp 0x2438a8
jmp 0x243a5a
jmp 0x2438af
movq 0x30(%rsp), %rax
movq (%rax), %rsi
leaq 0x40(%rsp), %rdi
callq 0x281270
movq 0x30(%rsp), %rax
cmpq $0x0, 0x8(%rax)
je 0x243901
movq 0x30(%rsp), %rdi
addq $0x20, %rdi
callq 0x2812c0
movq %rax, %rdi
addq $0x50, %rdi
callq 0x8f380
movq 0x30(%rsp), %rdi
addq $0x20, %rdi
callq 0x2812c0
movq %rax, %rdi
addq $0x18, %rdi
callq 0x8f380
movq 0x30(%rsp), %rdi
addq $0x20, %rdi
callq 0x2812c0
movq %rax, %rdi
movq 0x70(%rsp), %rsi
movl 0x6c(%rsp), %edx
callq 0x282600
movq %rax, 0x20(%rsp)
jmp 0x243927
movq 0x20(%rsp), %rax
movq %rax, 0x38(%rsp)
cmpq $0x0, 0x38(%rsp)
je 0x243970
movq 0x38(%rsp), %rax
movq %rax, 0x80(%rsp)
movl $0x1, 0x48(%rsp)
jmp 0x243a50
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x50(%rsp)
movl %eax, 0x4c(%rsp)
leaq 0x40(%rsp), %rdi
callq 0x2812d0
jmp 0x243a6a
movq 0x30(%rsp), %rax
cmpq $0x0, 0x18(%rax)
je 0x2439c8
movq 0x30(%rsp), %rax
movq 0x18(%rax), %rdi
movq 0x70(%rsp), %rsi
movl 0x6c(%rsp), %edx
callq 0x2437c0
movq %rax, 0x18(%rsp)
jmp 0x24399a
movq 0x18(%rsp), %rax
movq %rax, 0x38(%rsp)
cmpq $0x0, 0x38(%rsp)
je 0x2439c6
movq 0x38(%rsp), %rax
movq %rax, 0x80(%rsp)
movl $0x1, 0x48(%rsp)
jmp 0x243a50
jmp 0x2439c8
movq 0x30(%rsp), %rdi
movq 0x70(%rsp), %rsi
movl 0x6c(%rsp), %edx
callq 0x243a80
movb %al, 0x17(%rsp)
jmp 0x2439e1
movb 0x17(%rsp), %al
testb $0x1, %al
jne 0x2439eb
jmp 0x243a3c
movq 0x30(%rsp), %rdi
addq $0x20, %rdi
callq 0x2812c0
movq %rax, %rdi
movq 0x70(%rsp), %rsi
movl 0x6c(%rsp), %edx
callq 0x282600
movq %rax, 0x8(%rsp)
jmp 0x243a11
movq 0x8(%rsp), %rax
movq %rax, 0x38(%rsp)
cmpq $0x0, 0x38(%rsp)
je 0x243a3a
movq 0x38(%rsp), %rax
movq %rax, 0x80(%rsp)
movl $0x1, 0x48(%rsp)
jmp 0x243a50
jmp 0x243a3c
movq $0x0, 0x80(%rsp)
movl $0x1, 0x48(%rsp)
leaq 0x40(%rsp), %rdi
callq 0x2812d0
movq 0x80(%rsp), %rax
addq $0x88, %rsp
retq
movq 0x50(%rsp), %rdi
callq 0x90db0
nopw %cs:(%rax,%rax)
| _ZNK6google8protobuf14DescriptorPool21FindExtensionByNumberEPKNS0_10DescriptorEi:
sub rsp, 88h
mov [rsp+88h+var_10], rdi
mov [rsp+88h+var_18], rsi
mov [rsp+88h+var_1C], edx
mov rax, [rsp+88h+var_10]
mov [rsp+88h+var_58], rax
mov rdi, [rsp+88h+var_18]; this
call _ZNK6google8protobuf10Descriptor21extension_range_countEv; google::protobuf::Descriptor::extension_range_count(void)
cmp eax, 0
jnz short loc_2437FF
mov [rsp+88h+var_8], 0
jmp loc_243A5A
loc_2437FF:
mov rax, [rsp+88h+var_58]
cmp qword ptr [rax], 0
jz loc_2438AF
mov rax, [rsp+88h+var_58]
mov rsi, [rax]; google::protobuf::internal::WrappedMutex *
lea rdi, [rsp+88h+var_28]; this
call _ZN6google8protobuf8internal9MutexLockC2EPNS1_12WrappedMutexE; google::protobuf::internal::MutexLock::MutexLock(google::protobuf::internal::WrappedMutex *)
mov rdi, [rsp+88h+var_58]
add rdi, 20h ; ' '
call _ZNKSt10unique_ptrIN6google8protobuf14DescriptorPool6TablesESt14default_deleteIS3_EEptEv; std::unique_ptr<google::protobuf::DescriptorPool::Tables>::operator->(void)
mov rdi, rax; this
mov rsi, [rsp+88h+var_18]; google::protobuf::Descriptor *
mov edx, [rsp+88h+var_1C]; int
call _ZNK6google8protobuf14DescriptorPool6Tables13FindExtensionEPKNS0_10DescriptorEi; google::protobuf::DescriptorPool::Tables::FindExtension(google::protobuf::Descriptor const*,int)
mov [rsp+88h+var_60], rax
jmp short $+2
loc_243846:
mov rax, [rsp+88h+var_60]
mov [rsp+88h+var_30], rax
cmp [rsp+88h+var_30], 0
jz short loc_24388C
mov rax, [rsp+88h+var_30]
mov [rsp+88h+var_8], rax
mov [rsp+88h+var_40], 1
jmp short loc_243894
mov rcx, rax
mov eax, edx
mov [rsp+arg_48], rcx
mov [rsp+arg_44], eax
lea rdi, [rsp+arg_58]; this
call _ZN6google8protobuf8internal9MutexLockD2Ev; google::protobuf::internal::MutexLock::~MutexLock()
jmp loc_243A6A
loc_24388C:
mov [rsp+88h+var_40], 0
loc_243894:
lea rdi, [rsp+88h+var_28]; this
call _ZN6google8protobuf8internal9MutexLockD2Ev; google::protobuf::internal::MutexLock::~MutexLock()
mov eax, [rsp+88h+var_40]
test eax, eax
jz short loc_2438AD
jmp short $+2
loc_2438A8:
jmp loc_243A5A
loc_2438AD:
jmp short $+2
loc_2438AF:
mov rax, [rsp+88h+var_58]
mov rsi, [rax]; google::protobuf::internal::WrappedMutex *
lea rdi, [rsp+88h+var_48]; this
call _ZN6google8protobuf8internal14MutexLockMaybeC2EPNS1_12WrappedMutexE; google::protobuf::internal::MutexLockMaybe::MutexLockMaybe(google::protobuf::internal::WrappedMutex *)
mov rax, [rsp+88h+var_58]
cmp qword ptr [rax+8], 0
jz short loc_243901
mov rdi, [rsp+88h+var_58]
add rdi, 20h ; ' '
call _ZNKSt10unique_ptrIN6google8protobuf14DescriptorPool6TablesESt14default_deleteIS3_EEptEv; std::unique_ptr<google::protobuf::DescriptorPool::Tables>::operator->(void)
mov rdi, rax
add rdi, 50h ; 'P'
call __ZNSt13unordered_setINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4hashIS5_ESt8equal_toIS5_ESaIS5_EE5clearEv; std::unordered_set<std::string>::clear(void)
mov rdi, [rsp+88h+var_58]
add rdi, 20h ; ' '
call _ZNKSt10unique_ptrIN6google8protobuf14DescriptorPool6TablesESt14default_deleteIS3_EEptEv; std::unique_ptr<google::protobuf::DescriptorPool::Tables>::operator->(void)
mov rdi, rax
add rdi, 18h
call __ZNSt13unordered_setINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4hashIS5_ESt8equal_toIS5_ESaIS5_EE5clearEv; std::unordered_set<std::string>::clear(void)
loc_243901:
mov rdi, [rsp+88h+var_58]
add rdi, 20h ; ' '
call _ZNKSt10unique_ptrIN6google8protobuf14DescriptorPool6TablesESt14default_deleteIS3_EEptEv; std::unique_ptr<google::protobuf::DescriptorPool::Tables>::operator->(void)
mov rdi, rax; this
mov rsi, [rsp+88h+var_18]; google::protobuf::Descriptor *
mov edx, [rsp+88h+var_1C]; int
call _ZNK6google8protobuf14DescriptorPool6Tables13FindExtensionEPKNS0_10DescriptorEi; google::protobuf::DescriptorPool::Tables::FindExtension(google::protobuf::Descriptor const*,int)
mov [rsp+88h+var_68], rax
jmp short $+2
loc_243927:
mov rax, [rsp+88h+var_68]
mov [rsp+88h+var_50], rax
cmp [rsp+88h+var_50], 0
jz short loc_243970
mov rax, [rsp+88h+var_50]
mov [rsp+88h+var_8], rax
mov [rsp+88h+var_40], 1
jmp loc_243A50
mov rcx, rax
mov eax, edx
mov [rsp+arg_48], rcx
mov [rsp+arg_44], eax
lea rdi, [rsp+arg_38]; this
call _ZN6google8protobuf8internal14MutexLockMaybeD2Ev; google::protobuf::internal::MutexLockMaybe::~MutexLockMaybe()
jmp loc_243A6A
loc_243970:
mov rax, [rsp+88h+var_58]
cmp qword ptr [rax+18h], 0
jz short loc_2439C8
mov rax, [rsp+88h+var_58]
mov rdi, [rax+18h]; this
mov rsi, [rsp+88h+var_18]; google::protobuf::Descriptor *
mov edx, [rsp+88h+var_1C]; int
call _ZNK6google8protobuf14DescriptorPool21FindExtensionByNumberEPKNS0_10DescriptorEi; google::protobuf::DescriptorPool::FindExtensionByNumber(google::protobuf::Descriptor const*,int)
mov [rsp+88h+var_70], rax
jmp short $+2
loc_24399A:
mov rax, [rsp+88h+var_70]
mov [rsp+88h+var_50], rax
cmp [rsp+88h+var_50], 0
jz short loc_2439C6
mov rax, [rsp+88h+var_50]
mov [rsp+88h+var_8], rax
mov [rsp+88h+var_40], 1
jmp loc_243A50
loc_2439C6:
jmp short $+2
loc_2439C8:
mov rdi, [rsp+88h+var_58]; this
mov rsi, [rsp+88h+var_18]; google::protobuf::Descriptor *
mov edx, [rsp+88h+var_1C]; int
call _ZNK6google8protobuf14DescriptorPool34TryFindExtensionInFallbackDatabaseEPKNS0_10DescriptorEi; google::protobuf::DescriptorPool::TryFindExtensionInFallbackDatabase(google::protobuf::Descriptor const*,int)
mov [rsp+88h+var_71], al
jmp short $+2
loc_2439E1:
mov al, [rsp+88h+var_71]
test al, 1
jnz short loc_2439EB
jmp short loc_243A3C
loc_2439EB:
mov rdi, [rsp+88h+var_58]
add rdi, 20h ; ' '
call _ZNKSt10unique_ptrIN6google8protobuf14DescriptorPool6TablesESt14default_deleteIS3_EEptEv; std::unique_ptr<google::protobuf::DescriptorPool::Tables>::operator->(void)
mov rdi, rax; this
mov rsi, [rsp+88h+var_18]; google::protobuf::Descriptor *
mov edx, [rsp+88h+var_1C]; int
call _ZNK6google8protobuf14DescriptorPool6Tables13FindExtensionEPKNS0_10DescriptorEi; google::protobuf::DescriptorPool::Tables::FindExtension(google::protobuf::Descriptor const*,int)
mov [rsp+88h+var_80], rax
jmp short $+2
loc_243A11:
mov rax, [rsp+88h+var_80]
mov [rsp+88h+var_50], rax
cmp [rsp+88h+var_50], 0
jz short loc_243A3A
mov rax, [rsp+88h+var_50]
mov [rsp+88h+var_8], rax
mov [rsp+88h+var_40], 1
jmp short loc_243A50
loc_243A3A:
jmp short $+2
loc_243A3C:
mov [rsp+88h+var_8], 0
mov [rsp+88h+var_40], 1
loc_243A50:
lea rdi, [rsp+88h+var_48]; this
call _ZN6google8protobuf8internal14MutexLockMaybeD2Ev; google::protobuf::internal::MutexLockMaybe::~MutexLockMaybe()
loc_243A5A:
mov rax, [rsp+88h+var_8]
add rsp, 88h
retn
loc_243A6A:
mov rdi, [rsp+arg_48]
call __Unwind_Resume
| long long google::protobuf::DescriptorPool::FindExtensionByNumber(
google::protobuf::internal::WrappedMutex **this,
const google::protobuf::Descriptor *a2,
int a3)
{
google::protobuf::DescriptorPool::Tables *v3; // rax
long long v4; // rax
long long v5; // rax
google::protobuf::DescriptorPool::Tables *v6; // rax
google::protobuf::DescriptorPool::Tables *v7; // rax
long long Extension; // [rsp+38h] [rbp-50h]
long long ExtensionByNumber; // [rsp+38h] [rbp-50h]
long long v11; // [rsp+38h] [rbp-50h]
_BYTE v12[8]; // [rsp+40h] [rbp-48h] BYREF
int v13; // [rsp+48h] [rbp-40h]
long long v14; // [rsp+58h] [rbp-30h]
google::protobuf::internal::WrappedMutex *v15; // [rsp+60h] [rbp-28h] BYREF
int v16; // [rsp+6Ch] [rbp-1Ch]
google::protobuf::Descriptor *v17; // [rsp+70h] [rbp-18h]
google::protobuf::internal::WrappedMutex **v18; // [rsp+78h] [rbp-10h]
long long v19; // [rsp+80h] [rbp-8h]
v18 = this;
v17 = a2;
v16 = a3;
if ( !(unsigned int)google::protobuf::Descriptor::extension_range_count(a2) )
return 0LL;
if ( !*this
|| ((google::protobuf::internal::MutexLock::MutexLock(&v15, *this),
v3 = (google::protobuf::DescriptorPool::Tables *)std::unique_ptr<google::protobuf::DescriptorPool::Tables>::operator->(this + 4),
(v14 = google::protobuf::DescriptorPool::Tables::FindExtension(v3, v17, v16)) == 0)
? (v13 = 0)
: (v19 = v14, v13 = 1),
google::protobuf::internal::MutexLock::~MutexLock(&v15),
!v13) )
{
google::protobuf::internal::MutexLockMaybe::MutexLockMaybe((google::protobuf::internal::MutexLockMaybe *)v12, *this);
if ( this[1] )
{
v4 = std::unique_ptr<google::protobuf::DescriptorPool::Tables>::operator->(this + 4);
std::unordered_set<std::string>::clear(v4 + 80);
v5 = std::unique_ptr<google::protobuf::DescriptorPool::Tables>::operator->(this + 4);
std::unordered_set<std::string>::clear(v5 + 24);
}
v6 = (google::protobuf::DescriptorPool::Tables *)std::unique_ptr<google::protobuf::DescriptorPool::Tables>::operator->(this + 4);
Extension = google::protobuf::DescriptorPool::Tables::FindExtension(v6, v17, v16);
if ( Extension )
{
v19 = Extension;
v13 = 1;
}
else if ( this[3]
&& (ExtensionByNumber = google::protobuf::DescriptorPool::FindExtensionByNumber(this[3], v17, v16)) != 0 )
{
v19 = ExtensionByNumber;
v13 = 1;
}
else if ( (google::protobuf::DescriptorPool::TryFindExtensionInFallbackDatabase(
(google::protobuf::DescriptorPool *)this,
v17,
v16) & 1) != 0
&& (v7 = (google::protobuf::DescriptorPool::Tables *)std::unique_ptr<google::protobuf::DescriptorPool::Tables>::operator->(this + 4),
(v11 = google::protobuf::DescriptorPool::Tables::FindExtension(v7, v17, v16)) != 0) )
{
v19 = v11;
v13 = 1;
}
else
{
v19 = 0LL;
v13 = 1;
}
google::protobuf::internal::MutexLockMaybe::~MutexLockMaybe((google::protobuf::internal::MutexLockMaybe *)v12);
}
return v19;
}
| |||
51,880 | google::protobuf::DescriptorPool::FindExtensionByNumber(google::protobuf::Descriptor const*, int) const | aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/descriptor.cc | const FieldDescriptor* DescriptorPool::FindExtensionByNumber(
const Descriptor* extendee, int number) const {
if (extendee->extension_range_count() == 0) return nullptr;
// A faster path to reduce lock contention in finding extensions, assuming
// most extensions will be cache hit.
if (mutex_ != nullptr) {
ReaderMutexLock lock(mutex_);
const FieldDescriptor* result = tables_->FindExtension(extendee, number);
if (result != nullptr) {
return result;
}
}
MutexLockMaybe lock(mutex_);
if (fallback_database_ != nullptr) {
tables_->known_bad_symbols_.clear();
tables_->known_bad_files_.clear();
}
const FieldDescriptor* result = tables_->FindExtension(extendee, number);
if (result != nullptr) {
return result;
}
if (underlay_ != nullptr) {
result = underlay_->FindExtensionByNumber(extendee, number);
if (result != nullptr) return result;
}
if (TryFindExtensionInFallbackDatabase(extendee, number)) {
result = tables_->FindExtension(extendee, number);
if (result != nullptr) {
return result;
}
}
return nullptr;
} | O3 | cpp | google::protobuf::DescriptorPool::FindExtensionByNumber(google::protobuf::Descriptor const*, int) const:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x20, %rsp
cmpl $0x0, 0x78(%rsi)
je 0xc09ae
movl %edx, %ebx
movq %rsi, %r14
movq %rdi, %r15
movq (%rdi), %r13
testq %r13, %r13
je 0xc09be
movq %r13, %rdi
callq 0x2db90
testl %eax, %eax
jne 0xc0a9c
movq 0x20(%r15), %r12
leaq 0x198(%r12), %rdi
leaq 0x10(%rsp), %rsi
movq %r14, (%rsi)
movl %ebx, 0x8(%rsi)
callq 0xe206a
addq $0x1a0, %r12 # imm = 0x1A0
cmpq %r12, %rax
je 0xc09b6
movq 0x30(%rax), %r12
movq %r13, %rdi
callq 0x2cd50
testq %r12, %r12
jne 0xc0a8b
jmp 0xc09be
xorl %r12d, %r12d
jmp 0xc0a8b
movq %r13, %rdi
callq 0x2cd50
movq (%r15), %rsi
leaq 0x8(%rsp), %rdi
callq 0xe01b4
cmpq $0x0, 0x8(%r15)
je 0xc09ec
movq 0x20(%r15), %rdi
addq $0x50, %rdi
callq 0x2cad0
movq 0x20(%r15), %rdi
addq $0x18, %rdi
callq 0x2cad0
movq 0x20(%r15), %r12
leaq 0x198(%r12), %rdi
leaq 0x10(%rsp), %rsi
movq %r14, (%rsi)
movl %ebx, 0x8(%rsi)
callq 0xe206a
addq $0x1a0, %r12 # imm = 0x1A0
cmpq %r12, %rax
je 0xc0a1d
movq 0x30(%rax), %r12
testq %r12, %r12
jne 0xc0a7c
movq 0x18(%r15), %rdi
testq %rdi, %rdi
je 0xc0a38
movq %r14, %rsi
movl %ebx, %edx
callq 0xc093c
movq %rax, %r12
testq %rax, %rax
jne 0xc0a7c
movq %r15, %rdi
movq %r14, %rsi
movl %ebx, %edx
callq 0xc0ac6
testb %al, %al
je 0xc0a79
movq 0x20(%r15), %r15
leaq 0x198(%r15), %rdi
leaq 0x10(%rsp), %rsi
movq %r14, (%rsi)
movl %ebx, 0x8(%rsi)
callq 0xe206a
addq $0x1a0, %r15 # imm = 0x1A0
cmpq %r15, %rax
je 0xc0a79
movq 0x30(%rax), %r12
testq %r12, %r12
jne 0xc0a7c
xorl %r12d, %r12d
movq 0x8(%rsp), %rdi
testq %rdi, %rdi
je 0xc0a8b
callq 0x2cd50
movq %r12, %rax
addq $0x20, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
movl %eax, %edi
callq 0x2cb90
movq %rax, %rbx
movq %r13, %rdi
jmp 0xc0ab8
movq %rax, %rbx
movq 0x8(%rsp), %rdi
testq %rdi, %rdi
je 0xc0abd
callq 0x2cd50
movq %rbx, %rdi
callq 0x2e220
nop
| _ZNK6google8protobuf14DescriptorPool21FindExtensionByNumberEPKNS0_10DescriptorEi:
push r15
push r14
push r13
push r12
push rbx
sub rsp, 20h
cmp dword ptr [rsi+78h], 0
jz short loc_C09AE
mov ebx, edx
mov r14, rsi
mov r15, rdi
mov r13, [rdi]
test r13, r13
jz short loc_C09BE
mov rdi, r13
call _pthread_mutex_lock
test eax, eax
jnz loc_C0A9C
mov r12, [r15+20h]
lea rdi, [r12+198h]
lea rsi, [rsp+48h+var_38]
mov [rsi], r14
mov [rsi+8], ebx
call _ZNKSt8_Rb_treeISt4pairIPKN6google8protobuf10DescriptorEiES0_IKS6_PKNS2_15FieldDescriptorEESt10_Select1stISB_ESt4lessIS6_ESaISB_EE4findERS7_; std::_Rb_tree<std::pair<google::protobuf::Descriptor const*,int>,std::pair<std::pair<google::protobuf::Descriptor const*,int> const,google::protobuf::FieldDescriptor const*>,std::_Select1st<std::pair<std::pair<google::protobuf::Descriptor const*,int> const,google::protobuf::FieldDescriptor const*>>,std::less<std::pair<google::protobuf::Descriptor const*,int>>,std::allocator<std::pair<std::pair<google::protobuf::Descriptor const*,int> const,google::protobuf::FieldDescriptor const*>>>::find(std::pair<google::protobuf::Descriptor const*,int> const&)
add r12, 1A0h
cmp rax, r12
jz short loc_C09B6
mov r12, [rax+30h]
mov rdi, r13
call _pthread_mutex_unlock
test r12, r12
jnz loc_C0A8B
jmp short loc_C09BE
loc_C09AE:
xor r12d, r12d
jmp loc_C0A8B
loc_C09B6:
mov rdi, r13
call _pthread_mutex_unlock
loc_C09BE:
mov rsi, [r15]
lea rdi, [rsp+48h+var_40]
call _ZN6google8protobuf8internal14MutexLockMaybeC2EPNS1_12WrappedMutexE; google::protobuf::internal::MutexLockMaybe::MutexLockMaybe(google::protobuf::internal::WrappedMutex *)
cmp qword ptr [r15+8], 0
jz short loc_C09EC
mov rdi, [r15+20h]
add rdi, 50h ; 'P'
call __ZNSt10_HashtableINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES5_SaIS5_ENSt8__detail9_IdentityESt8equal_toIS5_ESt4hashIS5_ENS7_18_Mod_range_hashingENS7_20_Default_ranged_hashENS7_20_Prime_rehash_policyENS7_17_Hashtable_traitsILb1ELb1ELb1EEEE5clearEv; std::_Hashtable<std::string,std::string,std::allocator<std::string>,std::__detail::_Identity,std::equal_to<std::string>,std::hash<std::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,true,true>>::clear(void)
mov rdi, [r15+20h]
add rdi, 18h
call __ZNSt10_HashtableINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES5_SaIS5_ENSt8__detail9_IdentityESt8equal_toIS5_ESt4hashIS5_ENS7_18_Mod_range_hashingENS7_20_Default_ranged_hashENS7_20_Prime_rehash_policyENS7_17_Hashtable_traitsILb1ELb1ELb1EEEE5clearEv; std::_Hashtable<std::string,std::string,std::allocator<std::string>,std::__detail::_Identity,std::equal_to<std::string>,std::hash<std::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,true,true>>::clear(void)
loc_C09EC:
mov r12, [r15+20h]
lea rdi, [r12+198h]
lea rsi, [rsp+48h+var_38]
mov [rsi], r14
mov [rsi+8], ebx
call _ZNKSt8_Rb_treeISt4pairIPKN6google8protobuf10DescriptorEiES0_IKS6_PKNS2_15FieldDescriptorEESt10_Select1stISB_ESt4lessIS6_ESaISB_EE4findERS7_; std::_Rb_tree<std::pair<google::protobuf::Descriptor const*,int>,std::pair<std::pair<google::protobuf::Descriptor const*,int> const,google::protobuf::FieldDescriptor const*>,std::_Select1st<std::pair<std::pair<google::protobuf::Descriptor const*,int> const,google::protobuf::FieldDescriptor const*>>,std::less<std::pair<google::protobuf::Descriptor const*,int>>,std::allocator<std::pair<std::pair<google::protobuf::Descriptor const*,int> const,google::protobuf::FieldDescriptor const*>>>::find(std::pair<google::protobuf::Descriptor const*,int> const&)
add r12, 1A0h
cmp rax, r12
jz short loc_C0A1D
mov r12, [rax+30h]
test r12, r12
jnz short loc_C0A7C
loc_C0A1D:
mov rdi, [r15+18h]; this
test rdi, rdi
jz short loc_C0A38
mov rsi, r14; google::protobuf::Descriptor *
mov edx, ebx; int
call _ZNK6google8protobuf14DescriptorPool21FindExtensionByNumberEPKNS0_10DescriptorEi; google::protobuf::DescriptorPool::FindExtensionByNumber(google::protobuf::Descriptor const*,int)
mov r12, rax
test rax, rax
jnz short loc_C0A7C
loc_C0A38:
mov rdi, r15; this
mov rsi, r14; google::protobuf::Descriptor *
mov edx, ebx; int
call _ZNK6google8protobuf14DescriptorPool34TryFindExtensionInFallbackDatabaseEPKNS0_10DescriptorEi; google::protobuf::DescriptorPool::TryFindExtensionInFallbackDatabase(google::protobuf::Descriptor const*,int)
test al, al
jz short loc_C0A79
mov r15, [r15+20h]
lea rdi, [r15+198h]
lea rsi, [rsp+48h+var_38]
mov [rsi], r14
mov [rsi+8], ebx
call _ZNKSt8_Rb_treeISt4pairIPKN6google8protobuf10DescriptorEiES0_IKS6_PKNS2_15FieldDescriptorEESt10_Select1stISB_ESt4lessIS6_ESaISB_EE4findERS7_; std::_Rb_tree<std::pair<google::protobuf::Descriptor const*,int>,std::pair<std::pair<google::protobuf::Descriptor const*,int> const,google::protobuf::FieldDescriptor const*>,std::_Select1st<std::pair<std::pair<google::protobuf::Descriptor const*,int> const,google::protobuf::FieldDescriptor const*>>,std::less<std::pair<google::protobuf::Descriptor const*,int>>,std::allocator<std::pair<std::pair<google::protobuf::Descriptor const*,int> const,google::protobuf::FieldDescriptor const*>>>::find(std::pair<google::protobuf::Descriptor const*,int> const&)
add r15, 1A0h
cmp rax, r15
jz short loc_C0A79
mov r12, [rax+30h]
test r12, r12
jnz short loc_C0A7C
loc_C0A79:
xor r12d, r12d
loc_C0A7C:
mov rdi, [rsp+48h+var_40]
test rdi, rdi
jz short loc_C0A8B
call _pthread_mutex_unlock
loc_C0A8B:
mov rax, r12
add rsp, 20h
pop rbx
pop r12
pop r13
pop r14
pop r15
retn
loc_C0A9C:
mov edi, eax; int
call __ZSt20__throw_system_errori; std::__throw_system_error(int)
mov rbx, rax
mov rdi, r13
jmp short loc_C0AB8
mov rbx, rax
mov rdi, [rsp+48h+var_40]
test rdi, rdi
jz short loc_C0ABD
loc_C0AB8:
call _pthread_mutex_unlock
loc_C0ABD:
mov rdi, rbx
call __Unwind_Resume
| long long google::protobuf::DescriptorPool::FindExtensionByNumber(
google::protobuf::DescriptorPool *this,
const google::protobuf::Descriptor *a2,
int a3)
{
long long v5; // r13
int v6; // eax
long long v7; // r12
long long v8; // rax
long long ExtensionByNumber; // r12
long long v10; // r12
long long v11; // rax
google::protobuf::DescriptorPool *v12; // rdi
long long v13; // r15
long long v14; // rax
long long v16; // [rsp+8h] [rbp-40h] BYREF
const google::protobuf::Descriptor *v17; // [rsp+10h] [rbp-38h]
int v18; // [rsp+18h] [rbp-30h]
if ( !*((_DWORD *)a2 + 30) )
return 0LL;
v5 = *(_QWORD *)this;
if ( *(_QWORD *)this )
{
v6 = pthread_mutex_lock(*(_QWORD *)this);
if ( v6 )
std::__throw_system_error(v6);
v7 = *((_QWORD *)this + 4);
v17 = a2;
v18 = a3;
v8 = std::_Rb_tree<std::pair<google::protobuf::Descriptor const*,int>,std::pair<std::pair<google::protobuf::Descriptor const*,int> const,google::protobuf::FieldDescriptor const*>,std::_Select1st<std::pair<std::pair<google::protobuf::Descriptor const*,int> const,google::protobuf::FieldDescriptor const*>>,std::less<std::pair<google::protobuf::Descriptor const*,int>>,std::allocator<std::pair<std::pair<google::protobuf::Descriptor const*,int> const,google::protobuf::FieldDescriptor const*>>>::find(v7 + 408);
if ( v8 == v7 + 416 )
{
pthread_mutex_unlock(v5);
}
else
{
ExtensionByNumber = *(_QWORD *)(v8 + 48);
pthread_mutex_unlock(v5);
if ( ExtensionByNumber )
return ExtensionByNumber;
}
}
google::protobuf::internal::MutexLockMaybe::MutexLockMaybe(&v16, *(_QWORD *)this);
if ( *((_QWORD *)this + 1) )
{
std::_Hashtable<std::string,std::string,std::allocator<std::string>,std::__detail::_Identity,std::equal_to<std::string>,std::hash<std::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,true,true>>::clear(*((_QWORD *)this + 4) + 80LL);
std::_Hashtable<std::string,std::string,std::allocator<std::string>,std::__detail::_Identity,std::equal_to<std::string>,std::hash<std::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,true,true>>::clear(*((_QWORD *)this + 4) + 24LL);
}
v10 = *((_QWORD *)this + 4);
v17 = a2;
v18 = a3;
v11 = std::_Rb_tree<std::pair<google::protobuf::Descriptor const*,int>,std::pair<std::pair<google::protobuf::Descriptor const*,int> const,google::protobuf::FieldDescriptor const*>,std::_Select1st<std::pair<std::pair<google::protobuf::Descriptor const*,int> const,google::protobuf::FieldDescriptor const*>>,std::less<std::pair<google::protobuf::Descriptor const*,int>>,std::allocator<std::pair<std::pair<google::protobuf::Descriptor const*,int> const,google::protobuf::FieldDescriptor const*>>>::find(v10 + 408);
if ( v11 == v10 + 416 || (ExtensionByNumber = *(_QWORD *)(v11 + 48)) == 0 )
{
v12 = (google::protobuf::DescriptorPool *)*((_QWORD *)this + 3);
if ( !v12 || (ExtensionByNumber = google::protobuf::DescriptorPool::FindExtensionByNumber(v12, a2, a3)) == 0 )
{
if ( !(unsigned __int8)google::protobuf::DescriptorPool::TryFindExtensionInFallbackDatabase(this, a2, a3)
|| (v13 = *((_QWORD *)this + 4),
v17 = a2,
v18 = a3,
v14 = std::_Rb_tree<std::pair<google::protobuf::Descriptor const*,int>,std::pair<std::pair<google::protobuf::Descriptor const*,int> const,google::protobuf::FieldDescriptor const*>,std::_Select1st<std::pair<std::pair<google::protobuf::Descriptor const*,int> const,google::protobuf::FieldDescriptor const*>>,std::less<std::pair<google::protobuf::Descriptor const*,int>>,std::allocator<std::pair<std::pair<google::protobuf::Descriptor const*,int> const,google::protobuf::FieldDescriptor const*>>>::find(v13 + 408),
v14 == v13 + 416)
|| (ExtensionByNumber = *(_QWORD *)(v14 + 48)) == 0 )
{
ExtensionByNumber = 0LL;
}
}
}
if ( v16 )
pthread_mutex_unlock(v16);
return ExtensionByNumber;
}
| FindExtensionByNumber:
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x20
CMP dword ptr [RSI + 0x78],0x0
JZ 0x001c09ae
MOV EBX,EDX
MOV R14,RSI
MOV R15,RDI
MOV R13,qword ptr [RDI]
TEST R13,R13
JZ 0x001c09be
MOV RDI,R13
CALL 0x0012db90
TEST EAX,EAX
JNZ 0x001c0a9c
MOV R12,qword ptr [R15 + 0x20]
LEA RDI,[R12 + 0x198]
LEA RSI,[RSP + 0x10]
MOV qword ptr [RSI],R14
MOV dword ptr [RSI + 0x8],EBX
LAB_001c0986:
CALL 0x001e206a
LAB_001c098b:
ADD R12,0x1a0
CMP RAX,R12
JZ 0x001c09b6
MOV R12,qword ptr [RAX + 0x30]
MOV RDI,R13
CALL 0x0012cd50
TEST R12,R12
JNZ 0x001c0a8b
JMP 0x001c09be
LAB_001c09ae:
XOR R12D,R12D
JMP 0x001c0a8b
LAB_001c09b6:
MOV RDI,R13
CALL 0x0012cd50
LAB_001c09be:
MOV RSI,qword ptr [R15]
LEA RDI,[RSP + 0x8]
CALL 0x001e01b4
CMP qword ptr [R15 + 0x8],0x0
JZ 0x001c09ec
MOV RDI,qword ptr [R15 + 0x20]
ADD RDI,0x50
CALL 0x0012cad0
MOV RDI,qword ptr [R15 + 0x20]
ADD RDI,0x18
CALL 0x0012cad0
LAB_001c09ec:
MOV R12,qword ptr [R15 + 0x20]
LEA RDI,[R12 + 0x198]
LEA RSI,[RSP + 0x10]
MOV qword ptr [RSI],R14
MOV dword ptr [RSI + 0x8],EBX
LAB_001c0a03:
CALL 0x001e206a
ADD R12,0x1a0
CMP RAX,R12
JZ 0x001c0a1d
MOV R12,qword ptr [RAX + 0x30]
TEST R12,R12
JNZ 0x001c0a7c
LAB_001c0a1d:
MOV RDI,qword ptr [R15 + 0x18]
TEST RDI,RDI
JZ 0x001c0a38
MOV RSI,R14
MOV EDX,EBX
CALL 0x001c093c
MOV R12,RAX
TEST RAX,RAX
JNZ 0x001c0a7c
LAB_001c0a38:
MOV RDI,R15
MOV RSI,R14
MOV EDX,EBX
CALL 0x001c0ac6
TEST AL,AL
JZ 0x001c0a79
MOV R15,qword ptr [R15 + 0x20]
LEA RDI,[R15 + 0x198]
LEA RSI,[RSP + 0x10]
MOV qword ptr [RSI],R14
MOV dword ptr [RSI + 0x8],EBX
CALL 0x001e206a
LAB_001c0a64:
ADD R15,0x1a0
CMP RAX,R15
JZ 0x001c0a79
MOV R12,qword ptr [RAX + 0x30]
TEST R12,R12
JNZ 0x001c0a7c
LAB_001c0a79:
XOR R12D,R12D
LAB_001c0a7c:
MOV RDI,qword ptr [RSP + 0x8]
TEST RDI,RDI
JZ 0x001c0a8b
CALL 0x0012cd50
LAB_001c0a8b:
MOV RAX,R12
ADD RSP,0x20
POP RBX
POP R12
POP R13
POP R14
POP R15
RET
LAB_001c0a9c:
MOV EDI,EAX
CALL 0x0012cb90
|
/* google::protobuf::DescriptorPool::FindExtensionByNumber(google::protobuf::Descriptor const*, int)
const */
long __thiscall
google::protobuf::DescriptorPool::FindExtensionByNumber
(DescriptorPool *this,Descriptor *param_1,int param_2)
{
pthread_mutex_t *__mutex;
char cVar1;
int iVar2;
long lVar3;
long lVar4;
pthread_mutex_t *local_40;
Descriptor *local_38;
int local_30;
if (*(int *)(param_1 + 0x78) == 0) {
lVar4 = 0;
}
else {
__mutex = *(pthread_mutex_t **)this;
if (__mutex != (pthread_mutex_t *)0x0) {
iVar2 = pthread_mutex_lock(__mutex);
if (iVar2 != 0) {
/* WARNING: Subroutine does not return */
std::__throw_system_error(iVar2);
}
lVar4 = *(long *)(this + 0x20);
local_38 = param_1;
local_30 = param_2;
/* try { // try from 001c0986 to 001c098a has its CatchHandler @ 001c0aa3 */
lVar3 = std::
_Rb_tree<std::pair<google::protobuf::Descriptor_const*,int>,std::pair<std::pair<google::protobuf::Descriptor_const*,int>const,google::protobuf::FieldDescriptor_const*>,std::_Select1st<std::pair<std::pair<google::protobuf::Descriptor_const*,int>const,google::protobuf::FieldDescriptor_const*>>,std::less<std::pair<google::protobuf::Descriptor_const*,int>>,std::allocator<std::pair<std::pair<google::protobuf::Descriptor_const*,int>const,google::protobuf::FieldDescriptor_const*>>>
::find((_Rb_tree<std::pair<google::protobuf::Descriptor_const*,int>,std::pair<std::pair<google::protobuf::Descriptor_const*,int>const,google::protobuf::FieldDescriptor_const*>,std::_Select1st<std::pair<std::pair<google::protobuf::Descriptor_const*,int>const,google::protobuf::FieldDescriptor_const*>>,std::less<std::pair<google::protobuf::Descriptor_const*,int>>,std::allocator<std::pair<std::pair<google::protobuf::Descriptor_const*,int>const,google::protobuf::FieldDescriptor_const*>>>
*)(lVar4 + 0x198),(pair *)&local_38);
if (lVar3 == lVar4 + 0x1a0) {
pthread_mutex_unlock(__mutex);
}
else {
lVar4 = *(long *)(lVar3 + 0x30);
pthread_mutex_unlock(__mutex);
if (lVar4 != 0) {
return lVar4;
}
}
}
internal::MutexLockMaybe::MutexLockMaybe((MutexLockMaybe *)&local_40,*(WrappedMutex **)this);
if (*(long *)(this + 8) != 0) {
std::
_Hashtable<std::__cxx11::string,std::__cxx11::string,std::allocator<std::__cxx11::string>,std::__detail::_Identity,std::equal_to<std::__cxx11::string>,std::hash<std::__cxx11::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,true,true>>
::clear((_Hashtable<std::__cxx11::string,std::__cxx11::string,std::allocator<std::__cxx11::string>,std::__detail::_Identity,std::equal_to<std::__cxx11::string>,std::hash<std::__cxx11::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,true,true>>
*)(*(long *)(this + 0x20) + 0x50));
std::
_Hashtable<std::__cxx11::string,std::__cxx11::string,std::allocator<std::__cxx11::string>,std::__detail::_Identity,std::equal_to<std::__cxx11::string>,std::hash<std::__cxx11::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,true,true>>
::clear((_Hashtable<std::__cxx11::string,std::__cxx11::string,std::allocator<std::__cxx11::string>,std::__detail::_Identity,std::equal_to<std::__cxx11::string>,std::hash<std::__cxx11::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,true,true>>
*)(*(long *)(this + 0x20) + 0x18));
}
lVar4 = *(long *)(this + 0x20);
local_38 = param_1;
local_30 = param_2;
/* try { // try from 001c0a03 to 001c0a63 has its CatchHandler @ 001c0aab */
lVar3 = std::
_Rb_tree<std::pair<google::protobuf::Descriptor_const*,int>,std::pair<std::pair<google::protobuf::Descriptor_const*,int>const,google::protobuf::FieldDescriptor_const*>,std::_Select1st<std::pair<std::pair<google::protobuf::Descriptor_const*,int>const,google::protobuf::FieldDescriptor_const*>>,std::less<std::pair<google::protobuf::Descriptor_const*,int>>,std::allocator<std::pair<std::pair<google::protobuf::Descriptor_const*,int>const,google::protobuf::FieldDescriptor_const*>>>
::find((_Rb_tree<std::pair<google::protobuf::Descriptor_const*,int>,std::pair<std::pair<google::protobuf::Descriptor_const*,int>const,google::protobuf::FieldDescriptor_const*>,std::_Select1st<std::pair<std::pair<google::protobuf::Descriptor_const*,int>const,google::protobuf::FieldDescriptor_const*>>,std::less<std::pair<google::protobuf::Descriptor_const*,int>>,std::allocator<std::pair<std::pair<google::protobuf::Descriptor_const*,int>const,google::protobuf::FieldDescriptor_const*>>>
*)(lVar4 + 0x198),(pair *)&local_38);
if ((((lVar3 == lVar4 + 0x1a0) || (lVar4 = *(long *)(lVar3 + 0x30), lVar4 == 0)) &&
((*(DescriptorPool **)(this + 0x18) == (DescriptorPool *)0x0 ||
(lVar4 = FindExtensionByNumber(*(DescriptorPool **)(this + 0x18),param_1,param_2),
lVar4 == 0)))) &&
(((cVar1 = TryFindExtensionInFallbackDatabase(this,param_1,param_2), cVar1 == '\0' ||
(lVar4 = *(long *)(this + 0x20), local_38 = param_1, local_30 = param_2,
lVar3 = std::
_Rb_tree<std::pair<google::protobuf::Descriptor_const*,int>,std::pair<std::pair<google::protobuf::Descriptor_const*,int>const,google::protobuf::FieldDescriptor_const*>,std::_Select1st<std::pair<std::pair<google::protobuf::Descriptor_const*,int>const,google::protobuf::FieldDescriptor_const*>>,std::less<std::pair<google::protobuf::Descriptor_const*,int>>,std::allocator<std::pair<std::pair<google::protobuf::Descriptor_const*,int>const,google::protobuf::FieldDescriptor_const*>>>
::find((_Rb_tree<std::pair<google::protobuf::Descriptor_const*,int>,std::pair<std::pair<google::protobuf::Descriptor_const*,int>const,google::protobuf::FieldDescriptor_const*>,std::_Select1st<std::pair<std::pair<google::protobuf::Descriptor_const*,int>const,google::protobuf::FieldDescriptor_const*>>,std::less<std::pair<google::protobuf::Descriptor_const*,int>>,std::allocator<std::pair<std::pair<google::protobuf::Descriptor_const*,int>const,google::protobuf::FieldDescriptor_const*>>>
*)(lVar4 + 0x198),(pair *)&local_38), lVar3 == lVar4 + 0x1a0)) ||
(lVar4 = *(long *)(lVar3 + 0x30), lVar4 == 0)))) {
lVar4 = 0;
}
if (local_40 != (pthread_mutex_t *)0x0) {
pthread_mutex_unlock(local_40);
}
}
return lVar4;
}
| |
51,881 | void google::protobuf::compiler::cpp::ForEachField<google::protobuf::compiler::cpp::FileGenerator::GetCrossFileReferencesForFile(google::protobuf::FileDescriptor const*, google::protobuf::compiler::cpp::FileGenerator::CrossFileReferences*)::$_0>(google::protobuf::Descriptor const*, google::protobuf::compiler::cpp::FileGenerator::GetCrossFileReferencesForFile(google::protobuf::FileDescriptor const*, google::protobuf::compiler::cpp::FileGenerator::CrossFileReferences*)::$_0&&) | aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/compiler/cpp/helpers.h | void ForEachField(const Descriptor* d, T&& func) {
for (int i = 0; i < d->nested_type_count(); i++) {
ForEachField(d->nested_type(i), std::forward<T&&>(func));
}
for (int i = 0; i < d->extension_count(); i++) {
func(d->extension(i));
}
for (int i = 0; i < d->field_count(); i++) {
func(d->field(i));
}
} | O0 | c | void google::protobuf::compiler::cpp::ForEachField<google::protobuf::compiler::cpp::FileGenerator::GetCrossFileReferencesForFile(google::protobuf::FileDescriptor const*, google::protobuf::compiler::cpp::FileGenerator::CrossFileReferences*)::$_0>(google::protobuf::Descriptor const*, google::protobuf::compiler::cpp::FileGenerator::GetCrossFileReferencesForFile(google::protobuf::FileDescriptor const*, google::protobuf::compiler::cpp::FileGenerator::CrossFileReferences*)::$_0&&):
subq $0x48, %rsp
movq %rdi, 0x40(%rsp)
movq %rsi, 0x38(%rsp)
movl $0x0, 0x34(%rsp)
movl 0x34(%rsp), %eax
movl %eax, 0x28(%rsp)
movq 0x40(%rsp), %rdi
callq 0x3cb40
movl %eax, %ecx
movl 0x28(%rsp), %eax
cmpl %ecx, %eax
jge 0xde68a
movq 0x40(%rsp), %rdi
movl 0x34(%rsp), %esi
callq 0x3cb50
movq %rax, %rdi
movq 0x38(%rsp), %rsi
callq 0xde630
movl 0x34(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x34(%rsp)
jmp 0xde646
movl $0x0, 0x30(%rsp)
movl 0x30(%rsp), %eax
movl %eax, 0x24(%rsp)
movq 0x40(%rsp), %rdi
callq 0x59060
movl %eax, %ecx
movl 0x24(%rsp), %eax
cmpl %ecx, %eax
jge 0xde6e0
movq 0x38(%rsp), %rax
movq %rax, 0x18(%rsp)
movq 0x40(%rsp), %rdi
movl 0x30(%rsp), %esi
callq 0x590a0
movq 0x18(%rsp), %rdi
movq %rax, %rsi
callq 0xde740
movl 0x30(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x30(%rsp)
jmp 0xde692
movl $0x0, 0x2c(%rsp)
movl 0x2c(%rsp), %eax
movl %eax, 0x14(%rsp)
movq 0x40(%rsp), %rdi
callq 0x3ca80
movl %eax, %ecx
movl 0x14(%rsp), %eax
cmpl %ecx, %eax
jge 0xde736
movq 0x38(%rsp), %rax
movq %rax, 0x8(%rsp)
movq 0x40(%rsp), %rdi
movl 0x2c(%rsp), %esi
callq 0x3ca90
movq 0x8(%rsp), %rdi
movq %rax, %rsi
callq 0xde740
movl 0x2c(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x2c(%rsp)
jmp 0xde6e8
addq $0x48, %rsp
retq
nopl (%rax,%rax)
| _ZN6google8protobuf8compiler3cpp12ForEachFieldIZNS2_13FileGenerator29GetCrossFileReferencesForFileEPKNS0_14FileDescriptorEPNS4_19CrossFileReferencesEE3$_0EEvPKNS0_10DescriptorEOT_:
sub rsp, 48h
mov [rsp+48h+var_8], rdi
mov [rsp+48h+var_10], rsi
mov [rsp+48h+var_14], 0
loc_DE646:
mov eax, [rsp+48h+var_14]
mov [rsp+48h+var_20], eax
mov rdi, [rsp+48h+var_8]; this
call _ZNK6google8protobuf10Descriptor17nested_type_countEv; google::protobuf::Descriptor::nested_type_count(void)
mov ecx, eax
mov eax, [rsp+48h+var_20]
cmp eax, ecx
jge short loc_DE68A
mov rdi, [rsp+48h+var_8]; this
mov esi, [rsp+48h+var_14]; int
call _ZNK6google8protobuf10Descriptor11nested_typeEi; google::protobuf::Descriptor::nested_type(int)
mov rdi, rax
mov rsi, [rsp+48h+var_10]
call _ZN6google8protobuf8compiler3cpp12ForEachFieldIZNS2_13FileGenerator29GetCrossFileReferencesForFileEPKNS0_14FileDescriptorEPNS4_19CrossFileReferencesEE3$_0EEvPKNS0_10DescriptorEOT_; google::protobuf::compiler::cpp::ForEachField<google::protobuf::compiler::cpp::FileGenerator::GetCrossFileReferencesForFile(google::protobuf::FileDescriptor const*,google::protobuf::compiler::cpp::FileGenerator::CrossFileReferences *)::$_0>(google::protobuf::Descriptor const*,google::protobuf::compiler::cpp::FileGenerator::GetCrossFileReferencesForFile(google::protobuf::FileDescriptor const*,google::protobuf::compiler::cpp::FileGenerator::CrossFileReferences *)::$_0 &&)
mov eax, [rsp+48h+var_14]
add eax, 1
mov [rsp+48h+var_14], eax
jmp short loc_DE646
loc_DE68A:
mov [rsp+48h+var_18], 0
loc_DE692:
mov eax, [rsp+48h+var_18]
mov [rsp+48h+var_24], eax
mov rdi, [rsp+48h+var_8]; this
call _ZNK6google8protobuf10Descriptor15extension_countEv; google::protobuf::Descriptor::extension_count(void)
mov ecx, eax
mov eax, [rsp+48h+var_24]
cmp eax, ecx
jge short loc_DE6E0
mov rax, [rsp+48h+var_10]
mov [rsp+48h+var_30], rax
mov rdi, [rsp+48h+var_8]; this
mov esi, [rsp+48h+var_18]; int
call _ZNK6google8protobuf10Descriptor9extensionEi; google::protobuf::Descriptor::extension(int)
mov rdi, [rsp+48h+var_30]
mov rsi, rax
call _ZZN6google8protobuf8compiler3cpp13FileGenerator29GetCrossFileReferencesForFileEPKNS0_14FileDescriptorEPNS3_19CrossFileReferencesEENK3$_0clEPKNS0_15FieldDescriptorE; google::protobuf::compiler::cpp::FileGenerator::GetCrossFileReferencesForFile(google::protobuf::FileDescriptor const*,google::protobuf::compiler::cpp::FileGenerator::CrossFileReferences *)::$_0::operator()(google::protobuf::FieldDescriptor const*)
mov eax, [rsp+48h+var_18]
add eax, 1
mov [rsp+48h+var_18], eax
jmp short loc_DE692
loc_DE6E0:
mov [rsp+48h+var_1C], 0
loc_DE6E8:
mov eax, [rsp+48h+var_1C]
mov [rsp+48h+var_34], eax
mov rdi, [rsp+48h+var_8]; this
call _ZNK6google8protobuf10Descriptor11field_countEv; google::protobuf::Descriptor::field_count(void)
mov ecx, eax
mov eax, [rsp+48h+var_34]
cmp eax, ecx
jge short loc_DE736
mov rax, [rsp+48h+var_10]
mov [rsp+48h+var_40], rax
mov rdi, [rsp+48h+var_8]; this
mov esi, [rsp+48h+var_1C]; int
call _ZNK6google8protobuf10Descriptor5fieldEi; google::protobuf::Descriptor::field(int)
mov rdi, [rsp+48h+var_40]
mov rsi, rax
call _ZZN6google8protobuf8compiler3cpp13FileGenerator29GetCrossFileReferencesForFileEPKNS0_14FileDescriptorEPNS3_19CrossFileReferencesEENK3$_0clEPKNS0_15FieldDescriptorE; google::protobuf::compiler::cpp::FileGenerator::GetCrossFileReferencesForFile(google::protobuf::FileDescriptor const*,google::protobuf::compiler::cpp::FileGenerator::CrossFileReferences *)::$_0::operator()(google::protobuf::FieldDescriptor const*)
mov eax, [rsp+48h+var_1C]
add eax, 1
mov [rsp+48h+var_1C], eax
jmp short loc_DE6E8
loc_DE736:
add rsp, 48h
retn
| long long google::protobuf::compiler::cpp::ForEachField<google::protobuf::compiler::cpp::FileGenerator::GetCrossFileReferencesForFile(google::protobuf::FileDescriptor const*,google::protobuf::compiler::cpp::FileGenerator::CrossFileReferences *)::$_0>(
google::protobuf::Descriptor *a1,
long long a2)
{
long long v2; // rax
long long v3; // rax
int v4; // ecx
long long result; // rax
long long v6; // rax
int k; // [rsp+2Ch] [rbp-1Ch]
int j; // [rsp+30h] [rbp-18h]
int i; // [rsp+34h] [rbp-14h]
for ( i = 0; i < (int)google::protobuf::Descriptor::nested_type_count(a1); ++i )
{
v2 = google::protobuf::Descriptor::nested_type(a1, i);
google::protobuf::compiler::cpp::ForEachField<google::protobuf::compiler::cpp::FileGenerator::GetCrossFileReferencesForFile(google::protobuf::FileDescriptor const*,google::protobuf::compiler::cpp::FileGenerator::CrossFileReferences *)::$_0>(
v2,
a2);
}
for ( j = 0; j < (int)google::protobuf::Descriptor::extension_count(a1); ++j )
{
v3 = google::protobuf::Descriptor::extension(a1, j);
google::protobuf::compiler::cpp::FileGenerator::GetCrossFileReferencesForFile(google::protobuf::FileDescriptor const*,google::protobuf::compiler::cpp::FileGenerator::CrossFileReferences *)::$_0::operator()(
a2,
v3);
}
for ( k = 0; ; ++k )
{
v4 = google::protobuf::Descriptor::field_count(a1);
result = (unsigned int)k;
if ( k >= v4 )
break;
v6 = google::protobuf::Descriptor::field(a1, k);
google::protobuf::compiler::cpp::FileGenerator::GetCrossFileReferencesForFile(google::protobuf::FileDescriptor const*,google::protobuf::compiler::cpp::FileGenerator::CrossFileReferences *)::$_0::operator()(
a2,
v6);
}
return result;
}
| ForEachField<google::protobuf::compiler::cpp::FileGenerator::GetCrossFileReferencesForFile(google::protobuf::FileDescriptor_const*,google::protobuf::compiler::cpp::FileGenerator::CrossFileReferences*)::$_0>:
SUB RSP,0x48
MOV qword ptr [RSP + 0x40],RDI
MOV qword ptr [RSP + 0x38],RSI
MOV dword ptr [RSP + 0x34],0x0
LAB_001de646:
MOV EAX,dword ptr [RSP + 0x34]
MOV dword ptr [RSP + 0x28],EAX
MOV RDI,qword ptr [RSP + 0x40]
CALL 0x0013cb40
MOV ECX,EAX
MOV EAX,dword ptr [RSP + 0x28]
CMP EAX,ECX
JGE 0x001de68a
MOV RDI,qword ptr [RSP + 0x40]
MOV ESI,dword ptr [RSP + 0x34]
CALL 0x0013cb50
MOV RDI,RAX
MOV RSI,qword ptr [RSP + 0x38]
CALL 0x001de630
MOV EAX,dword ptr [RSP + 0x34]
ADD EAX,0x1
MOV dword ptr [RSP + 0x34],EAX
JMP 0x001de646
LAB_001de68a:
MOV dword ptr [RSP + 0x30],0x0
LAB_001de692:
MOV EAX,dword ptr [RSP + 0x30]
MOV dword ptr [RSP + 0x24],EAX
MOV RDI,qword ptr [RSP + 0x40]
CALL 0x00159060
MOV ECX,EAX
MOV EAX,dword ptr [RSP + 0x24]
CMP EAX,ECX
JGE 0x001de6e0
MOV RAX,qword ptr [RSP + 0x38]
MOV qword ptr [RSP + 0x18],RAX
MOV RDI,qword ptr [RSP + 0x40]
MOV ESI,dword ptr [RSP + 0x30]
CALL 0x001590a0
MOV RDI,qword ptr [RSP + 0x18]
MOV RSI,RAX
CALL 0x001de740
MOV EAX,dword ptr [RSP + 0x30]
ADD EAX,0x1
MOV dword ptr [RSP + 0x30],EAX
JMP 0x001de692
LAB_001de6e0:
MOV dword ptr [RSP + 0x2c],0x0
LAB_001de6e8:
MOV EAX,dword ptr [RSP + 0x2c]
MOV dword ptr [RSP + 0x14],EAX
MOV RDI,qword ptr [RSP + 0x40]
CALL 0x0013ca80
MOV ECX,EAX
MOV EAX,dword ptr [RSP + 0x14]
CMP EAX,ECX
JGE 0x001de736
MOV RAX,qword ptr [RSP + 0x38]
MOV qword ptr [RSP + 0x8],RAX
MOV RDI,qword ptr [RSP + 0x40]
MOV ESI,dword ptr [RSP + 0x2c]
CALL 0x0013ca90
MOV RDI,qword ptr [RSP + 0x8]
MOV RSI,RAX
CALL 0x001de740
MOV EAX,dword ptr [RSP + 0x2c]
ADD EAX,0x1
MOV dword ptr [RSP + 0x2c],EAX
JMP 0x001de6e8
LAB_001de736:
ADD RSP,0x48
RET
|
/* void
google::protobuf::compiler::cpp::ForEachField<google::protobuf::compiler::cpp::FileGenerator::GetCrossFileReferencesForFile(google::protobuf::FileDescriptor
const*,
google::protobuf::compiler::cpp::FileGenerator::CrossFileReferences*)::$_0>(google::protobuf::Descriptor
const*,
google::protobuf::compiler::cpp::FileGenerator::GetCrossFileReferencesForFile(google::protobuf::FileDescriptor
const*, google::protobuf::compiler::cpp::FileGenerator::CrossFileReferences*)::$_0&&) */
void google::protobuf::compiler::cpp::
ForEachField<google::protobuf::compiler::cpp::FileGenerator::GetCrossFileReferencesForFile(google::protobuf::FileDescriptor_const*,google::protobuf::compiler::cpp::FileGenerator::CrossFileReferences*)::__0>
(Descriptor *param_1,__0 *param_2)
{
int iVar1;
Descriptor *pDVar2;
FieldDescriptor *pFVar3;
int4 local_1c;
int4 local_18;
int4 local_14;
local_14 = 0;
while( true ) {
iVar1 = Descriptor::nested_type_count(param_1);
if (iVar1 <= local_14) break;
pDVar2 = (Descriptor *)Descriptor::nested_type(param_1,local_14);
ForEachField<google::protobuf::compiler::cpp::FileGenerator::GetCrossFileReferencesForFile(google::protobuf::FileDescriptor_const*,google::protobuf::compiler::cpp::FileGenerator::CrossFileReferences*)::__0>
(pDVar2,param_2);
local_14 = local_14 + 1;
}
local_18 = 0;
while( true ) {
iVar1 = Descriptor::extension_count(param_1);
if (iVar1 <= local_18) break;
pFVar3 = (FieldDescriptor *)Descriptor::extension(param_1,local_18);
FileGenerator::
GetCrossFileReferencesForFile(google::protobuf::FileDescriptor_const*,google::protobuf::compiler::cpp::FileGenerator::CrossFileReferences*)
::$_0::operator()(param_2,pFVar3);
local_18 = local_18 + 1;
}
local_1c = 0;
while( true ) {
iVar1 = Descriptor::field_count(param_1);
if (iVar1 <= local_1c) break;
pFVar3 = (FieldDescriptor *)Descriptor::field(param_1,local_1c);
FileGenerator::
GetCrossFileReferencesForFile(google::protobuf::FileDescriptor_const*,google::protobuf::compiler::cpp::FileGenerator::CrossFileReferences*)
::$_0::operator()(param_2,pFVar3);
local_1c = local_1c + 1;
}
return;
}
| |
51,882 | google::protobuf::PlanAllocationSize(google::protobuf::FileDescriptorProto const&, google::protobuf::internal::FlatAllocator&) | aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/descriptor.cc | static void PlanAllocationSize(const FileDescriptorProto& proto,
internal::FlatAllocator& alloc) {
alloc.PlanArray<FileDescriptor>(1);
alloc.PlanArray<FileDescriptorTables>(1);
alloc.PlanArray<std::string>(2); // name + package
if (proto.has_options()) alloc.PlanArray<FileOptions>(1);
if (proto.has_source_code_info()) alloc.PlanArray<SourceCodeInfo>(1);
PlanAllocationSize(proto.service(), alloc);
PlanAllocationSize(proto.message_type(), alloc);
PlanAllocationSize(proto.enum_type(), alloc);
PlanAllocationSize(proto.extension(), alloc);
alloc.PlanArray<int>(proto.weak_dependency_size());
alloc.PlanArray<int>(proto.public_dependency_size());
alloc.PlanArray<const FileDescriptor*>(proto.dependency_size());
} | O0 | cpp | google::protobuf::PlanAllocationSize(google::protobuf::FileDescriptorProto const&, google::protobuf::internal::FlatAllocator&):
subq $0x28, %rsp
movq %rdi, 0x20(%rsp)
movq %rsi, 0x18(%rsp)
movq 0x18(%rsp), %rdi
movl $0x1, %esi
callq 0x447d0
movq 0x18(%rsp), %rdi
movl $0x1, %esi
callq 0x64e80
movq 0x18(%rsp), %rdi
movl $0x2, %esi
callq 0x448d0
movq 0x20(%rsp), %rdi
callq 0x78130
testb $0x1, %al
jne 0x47c9b
jmp 0x47caa
movq 0x18(%rsp), %rdi
movl $0x1, %esi
callq 0x64f70
movq 0x20(%rsp), %rdi
callq 0x77cf0
testb $0x1, %al
jne 0x47cba
jmp 0x47cc9
movq 0x18(%rsp), %rdi
movl $0x1, %esi
callq 0x65060
movq 0x20(%rsp), %rdi
callq 0x83ef0
movq %rax, %rdi
movq 0x18(%rsp), %rsi
callq 0x65150
movq 0x20(%rsp), %rdi
callq 0x83f10
movq %rax, %rdi
movq 0x18(%rsp), %rsi
callq 0x65240
movq 0x20(%rsp), %rdi
callq 0x83f30
movq %rax, %rdi
movq 0x18(%rsp), %rsi
callq 0x65400
movq 0x20(%rsp), %rdi
callq 0x83f50
movq %rax, %rdi
movq 0x18(%rsp), %rsi
callq 0x65550
movq 0x18(%rsp), %rax
movq %rax, (%rsp)
movq 0x20(%rsp), %rdi
callq 0x77e10
movq (%rsp), %rdi
movl %eax, %esi
callq 0x656b0
movq 0x18(%rsp), %rax
movq %rax, 0x8(%rsp)
movq 0x20(%rsp), %rdi
callq 0x78010
movq 0x8(%rsp), %rdi
movl %eax, %esi
callq 0x656b0
movq 0x18(%rsp), %rax
movq %rax, 0x10(%rsp)
movq 0x20(%rsp), %rdi
callq 0x77cc0
movq 0x10(%rsp), %rdi
movl %eax, %esi
callq 0x657b0
addq $0x28, %rsp
retq
nopl (%rax,%rax)
| _ZN6google8protobufL18PlanAllocationSizeERKNS0_19FileDescriptorProtoERNS0_8internal13FlatAllocatorE:
sub rsp, 28h
mov [rsp+28h+var_8], rdi
mov [rsp+28h+var_10], rsi
mov rdi, [rsp+28h+var_10]
mov esi, 1
call _ZN6google8protobuf12_GLOBAL__N_117FlatAllocatorImplIJcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS0_14SourceCodeInfoENS0_20FileDescriptorTablesENS0_14MessageOptionsENS0_12FieldOptionsENS0_11EnumOptionsENS0_16EnumValueOptionsENS0_21ExtensionRangeOptionsENS0_12OneofOptionsENS0_14ServiceOptionsENS0_13MethodOptionsENS0_11FileOptionsEEE9PlanArrayINS0_14FileDescriptorEEEvi; google::protobuf::`anonymous namespace'::FlatAllocatorImpl<char,std::string,google::protobuf::SourceCodeInfo,google::protobuf::FileDescriptorTables,google::protobuf::MessageOptions,google::protobuf::FieldOptions,google::protobuf::EnumOptions,google::protobuf::EnumValueOptions,google::protobuf::ExtensionRangeOptions,google::protobuf::OneofOptions,google::protobuf::ServiceOptions,google::protobuf::MethodOptions,google::protobuf::FileOptions>::PlanArray<google::protobuf::FileDescriptor>(int)
mov rdi, [rsp+28h+var_10]
mov esi, 1
call _ZN6google8protobuf12_GLOBAL__N_117FlatAllocatorImplIJcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS0_14SourceCodeInfoENS0_20FileDescriptorTablesENS0_14MessageOptionsENS0_12FieldOptionsENS0_11EnumOptionsENS0_16EnumValueOptionsENS0_21ExtensionRangeOptionsENS0_12OneofOptionsENS0_14ServiceOptionsENS0_13MethodOptionsENS0_11FileOptionsEEE9PlanArrayISA_EEvi; google::protobuf::`anonymous namespace'::FlatAllocatorImpl<char,std::string,google::protobuf::SourceCodeInfo,google::protobuf::FileDescriptorTables,google::protobuf::MessageOptions,google::protobuf::FieldOptions,google::protobuf::EnumOptions,google::protobuf::EnumValueOptions,google::protobuf::ExtensionRangeOptions,google::protobuf::OneofOptions,google::protobuf::ServiceOptions,google::protobuf::MethodOptions,google::protobuf::FileOptions>::PlanArray<google::protobuf::FileDescriptorTables>(int)
mov rdi, [rsp+28h+var_10]
mov esi, 2
call _ZN6google8protobuf12_GLOBAL__N_117FlatAllocatorImplIJcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS0_14SourceCodeInfoENS0_20FileDescriptorTablesENS0_14MessageOptionsENS0_12FieldOptionsENS0_11EnumOptionsENS0_16EnumValueOptionsENS0_21ExtensionRangeOptionsENS0_12OneofOptionsENS0_14ServiceOptionsENS0_13MethodOptionsENS0_11FileOptionsEEE9PlanArrayIS8_EEvi; google::protobuf::`anonymous namespace'::FlatAllocatorImpl<char,std::string,google::protobuf::SourceCodeInfo,google::protobuf::FileDescriptorTables,google::protobuf::MessageOptions,google::protobuf::FieldOptions,google::protobuf::EnumOptions,google::protobuf::EnumValueOptions,google::protobuf::ExtensionRangeOptions,google::protobuf::OneofOptions,google::protobuf::ServiceOptions,google::protobuf::MethodOptions,google::protobuf::FileOptions>::PlanArray<std::string>(int)
mov rdi, [rsp+28h+var_8]; this
call _ZNK6google8protobuf19FileDescriptorProto11has_optionsEv; google::protobuf::FileDescriptorProto::has_options(void)
test al, 1
jnz short loc_47C9B
jmp short loc_47CAA
loc_47C9B:
mov rdi, [rsp+28h+var_10]
mov esi, 1
call _ZN6google8protobuf12_GLOBAL__N_117FlatAllocatorImplIJcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS0_14SourceCodeInfoENS0_20FileDescriptorTablesENS0_14MessageOptionsENS0_12FieldOptionsENS0_11EnumOptionsENS0_16EnumValueOptionsENS0_21ExtensionRangeOptionsENS0_12OneofOptionsENS0_14ServiceOptionsENS0_13MethodOptionsENS0_11FileOptionsEEE9PlanArrayISJ_EEvi; google::protobuf::`anonymous namespace'::FlatAllocatorImpl<char,std::string,google::protobuf::SourceCodeInfo,google::protobuf::FileDescriptorTables,google::protobuf::MessageOptions,google::protobuf::FieldOptions,google::protobuf::EnumOptions,google::protobuf::EnumValueOptions,google::protobuf::ExtensionRangeOptions,google::protobuf::OneofOptions,google::protobuf::ServiceOptions,google::protobuf::MethodOptions,google::protobuf::FileOptions>::PlanArray<google::protobuf::FileOptions>(int)
loc_47CAA:
mov rdi, [rsp+28h+var_8]; this
call _ZNK6google8protobuf19FileDescriptorProto20has_source_code_infoEv; google::protobuf::FileDescriptorProto::has_source_code_info(void)
test al, 1
jnz short loc_47CBA
jmp short loc_47CC9
loc_47CBA:
mov rdi, [rsp+28h+var_10]
mov esi, 1
call _ZN6google8protobuf12_GLOBAL__N_117FlatAllocatorImplIJcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS0_14SourceCodeInfoENS0_20FileDescriptorTablesENS0_14MessageOptionsENS0_12FieldOptionsENS0_11EnumOptionsENS0_16EnumValueOptionsENS0_21ExtensionRangeOptionsENS0_12OneofOptionsENS0_14ServiceOptionsENS0_13MethodOptionsENS0_11FileOptionsEEE9PlanArrayIS9_EEvi; google::protobuf::`anonymous namespace'::FlatAllocatorImpl<char,std::string,google::protobuf::SourceCodeInfo,google::protobuf::FileDescriptorTables,google::protobuf::MessageOptions,google::protobuf::FieldOptions,google::protobuf::EnumOptions,google::protobuf::EnumValueOptions,google::protobuf::ExtensionRangeOptions,google::protobuf::OneofOptions,google::protobuf::ServiceOptions,google::protobuf::MethodOptions,google::protobuf::FileOptions>::PlanArray<google::protobuf::SourceCodeInfo>(int)
loc_47CC9:
mov rdi, [rsp+28h+var_8]; this
call _ZNK6google8protobuf19FileDescriptorProto7serviceEv; google::protobuf::FileDescriptorProto::service(void)
mov rdi, rax
mov rsi, [rsp+28h+var_10]
call _ZN6google8protobufL18PlanAllocationSizeERKNS0_16RepeatedPtrFieldINS0_22ServiceDescriptorProtoEEERNS0_8internal13FlatAllocatorE; google::protobuf::PlanAllocationSize(google::protobuf::RepeatedPtrField<google::protobuf::ServiceDescriptorProto> const&,google::protobuf::internal::FlatAllocator &)
mov rdi, [rsp+28h+var_8]; this
call _ZNK6google8protobuf19FileDescriptorProto12message_typeEv; google::protobuf::FileDescriptorProto::message_type(void)
mov rdi, rax
mov rsi, [rsp+28h+var_10]
call _ZN6google8protobufL18PlanAllocationSizeERKNS0_16RepeatedPtrFieldINS0_15DescriptorProtoEEERNS0_8internal13FlatAllocatorE; google::protobuf::PlanAllocationSize(google::protobuf::RepeatedPtrField<google::protobuf::DescriptorProto> const&,google::protobuf::internal::FlatAllocator &)
mov rdi, [rsp+28h+var_8]; this
call _ZNK6google8protobuf19FileDescriptorProto9enum_typeEv; google::protobuf::FileDescriptorProto::enum_type(void)
mov rdi, rax
mov rsi, [rsp+28h+var_10]
call _ZN6google8protobufL18PlanAllocationSizeERKNS0_16RepeatedPtrFieldINS0_19EnumDescriptorProtoEEERNS0_8internal13FlatAllocatorE; google::protobuf::PlanAllocationSize(google::protobuf::RepeatedPtrField<google::protobuf::EnumDescriptorProto> const&,google::protobuf::internal::FlatAllocator &)
mov rdi, [rsp+28h+var_8]; this
call _ZNK6google8protobuf19FileDescriptorProto9extensionEv; google::protobuf::FileDescriptorProto::extension(void)
mov rdi, rax
mov rsi, [rsp+28h+var_10]
call _ZN6google8protobufL18PlanAllocationSizeERKNS0_16RepeatedPtrFieldINS0_20FieldDescriptorProtoEEERNS0_8internal13FlatAllocatorE; google::protobuf::PlanAllocationSize(google::protobuf::RepeatedPtrField<google::protobuf::FieldDescriptorProto> const&,google::protobuf::internal::FlatAllocator &)
mov rax, [rsp+28h+var_10]
mov [rsp+28h+var_28], rax
mov rdi, [rsp+28h+var_8]; this
call _ZNK6google8protobuf19FileDescriptorProto20weak_dependency_sizeEv; google::protobuf::FileDescriptorProto::weak_dependency_size(void)
mov rdi, [rsp+28h+var_28]
mov esi, eax
call _ZN6google8protobuf12_GLOBAL__N_117FlatAllocatorImplIJcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS0_14SourceCodeInfoENS0_20FileDescriptorTablesENS0_14MessageOptionsENS0_12FieldOptionsENS0_11EnumOptionsENS0_16EnumValueOptionsENS0_21ExtensionRangeOptionsENS0_12OneofOptionsENS0_14ServiceOptionsENS0_13MethodOptionsENS0_11FileOptionsEEE9PlanArrayIiEEvi; google::protobuf::`anonymous namespace'::FlatAllocatorImpl<char,std::string,google::protobuf::SourceCodeInfo,google::protobuf::FileDescriptorTables,google::protobuf::MessageOptions,google::protobuf::FieldOptions,google::protobuf::EnumOptions,google::protobuf::EnumValueOptions,google::protobuf::ExtensionRangeOptions,google::protobuf::OneofOptions,google::protobuf::ServiceOptions,google::protobuf::MethodOptions,google::protobuf::FileOptions>::PlanArray<int>(int)
mov rax, [rsp+28h+var_10]
mov [rsp+28h+var_20], rax
mov rdi, [rsp+28h+var_8]; this
call _ZNK6google8protobuf19FileDescriptorProto22public_dependency_sizeEv; google::protobuf::FileDescriptorProto::public_dependency_size(void)
mov rdi, [rsp+28h+var_20]
mov esi, eax
call _ZN6google8protobuf12_GLOBAL__N_117FlatAllocatorImplIJcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS0_14SourceCodeInfoENS0_20FileDescriptorTablesENS0_14MessageOptionsENS0_12FieldOptionsENS0_11EnumOptionsENS0_16EnumValueOptionsENS0_21ExtensionRangeOptionsENS0_12OneofOptionsENS0_14ServiceOptionsENS0_13MethodOptionsENS0_11FileOptionsEEE9PlanArrayIiEEvi; google::protobuf::`anonymous namespace'::FlatAllocatorImpl<char,std::string,google::protobuf::SourceCodeInfo,google::protobuf::FileDescriptorTables,google::protobuf::MessageOptions,google::protobuf::FieldOptions,google::protobuf::EnumOptions,google::protobuf::EnumValueOptions,google::protobuf::ExtensionRangeOptions,google::protobuf::OneofOptions,google::protobuf::ServiceOptions,google::protobuf::MethodOptions,google::protobuf::FileOptions>::PlanArray<int>(int)
mov rax, [rsp+28h+var_10]
mov [rsp+28h+var_18], rax
mov rdi, [rsp+28h+var_8]; this
call _ZNK6google8protobuf19FileDescriptorProto15dependency_sizeEv; google::protobuf::FileDescriptorProto::dependency_size(void)
mov rdi, [rsp+28h+var_18]
mov esi, eax
call _ZN6google8protobuf12_GLOBAL__N_117FlatAllocatorImplIJcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS0_14SourceCodeInfoENS0_20FileDescriptorTablesENS0_14MessageOptionsENS0_12FieldOptionsENS0_11EnumOptionsENS0_16EnumValueOptionsENS0_21ExtensionRangeOptionsENS0_12OneofOptionsENS0_14ServiceOptionsENS0_13MethodOptionsENS0_11FileOptionsEEE9PlanArrayIPKNS0_14FileDescriptorEEEvi; google::protobuf::`anonymous namespace'::FlatAllocatorImpl<char,std::string,google::protobuf::SourceCodeInfo,google::protobuf::FileDescriptorTables,google::protobuf::MessageOptions,google::protobuf::FieldOptions,google::protobuf::EnumOptions,google::protobuf::EnumValueOptions,google::protobuf::ExtensionRangeOptions,google::protobuf::OneofOptions,google::protobuf::ServiceOptions,google::protobuf::MethodOptions,google::protobuf::FileOptions>::PlanArray<google::protobuf::FileDescriptor const*>(int)
add rsp, 28h
retn
| PlanAllocationSize:
SUB RSP,0x28
MOV qword ptr [RSP + 0x20],RDI
MOV qword ptr [RSP + 0x18],RSI
MOV RDI,qword ptr [RSP + 0x18]
MOV ESI,0x1
CALL 0x001447d0
MOV RDI,qword ptr [RSP + 0x18]
MOV ESI,0x1
CALL 0x00164e80
MOV RDI,qword ptr [RSP + 0x18]
MOV ESI,0x2
CALL 0x001448d0
MOV RDI,qword ptr [RSP + 0x20]
CALL 0x00178130
TEST AL,0x1
JNZ 0x00147c9b
JMP 0x00147caa
LAB_00147c9b:
MOV RDI,qword ptr [RSP + 0x18]
MOV ESI,0x1
CALL 0x00164f70
LAB_00147caa:
MOV RDI,qword ptr [RSP + 0x20]
CALL 0x00177cf0
TEST AL,0x1
JNZ 0x00147cba
JMP 0x00147cc9
LAB_00147cba:
MOV RDI,qword ptr [RSP + 0x18]
MOV ESI,0x1
CALL 0x00165060
LAB_00147cc9:
MOV RDI,qword ptr [RSP + 0x20]
CALL 0x00183ef0
MOV RDI,RAX
MOV RSI,qword ptr [RSP + 0x18]
CALL 0x00165150
MOV RDI,qword ptr [RSP + 0x20]
CALL 0x00183f10
MOV RDI,RAX
MOV RSI,qword ptr [RSP + 0x18]
CALL 0x00165240
MOV RDI,qword ptr [RSP + 0x20]
CALL 0x00183f30
MOV RDI,RAX
MOV RSI,qword ptr [RSP + 0x18]
CALL 0x00165400
MOV RDI,qword ptr [RSP + 0x20]
CALL 0x00183f50
MOV RDI,RAX
MOV RSI,qword ptr [RSP + 0x18]
CALL 0x00165550
MOV RAX,qword ptr [RSP + 0x18]
MOV qword ptr [RSP],RAX
MOV RDI,qword ptr [RSP + 0x20]
CALL 0x00177e10
MOV RDI,qword ptr [RSP]
MOV ESI,EAX
CALL 0x001656b0
MOV RAX,qword ptr [RSP + 0x18]
MOV qword ptr [RSP + 0x8],RAX
MOV RDI,qword ptr [RSP + 0x20]
CALL 0x00178010
MOV RDI,qword ptr [RSP + 0x8]
MOV ESI,EAX
CALL 0x001656b0
MOV RAX,qword ptr [RSP + 0x18]
MOV qword ptr [RSP + 0x10],RAX
MOV RDI,qword ptr [RSP + 0x20]
CALL 0x00177cc0
MOV RDI,qword ptr [RSP + 0x10]
MOV ESI,EAX
CALL 0x001657b0
ADD RSP,0x28
RET
|
/* google::protobuf::PlanAllocationSize(google::protobuf::FileDescriptorProto const&,
google::protobuf::internal::FlatAllocator&) */
void google::protobuf::PlanAllocationSize(FileDescriptorProto *param_1,FlatAllocator *param_2)
{
int iVar1;
ulong uVar2;
RepeatedPtrField *pRVar3;
(anonymous_namespace)::
FlatAllocatorImpl<char,std::__cxx11::string,google::protobuf::SourceCodeInfo,google::protobuf::FileDescriptorTables,google::protobuf::MessageOptions,google::protobuf::FieldOptions,google::protobuf::EnumOptions,google::protobuf::EnumValueOptions,google::protobuf::ExtensionRangeOptions,google::protobuf::OneofOptions,google::protobuf::ServiceOptions,google::protobuf::MethodOptions,google::protobuf::FileOptions>
::PlanArray<google::protobuf::FileDescriptor>
((FlatAllocatorImpl<char,std::__cxx11::string,google::protobuf::SourceCodeInfo,google::protobuf::FileDescriptorTables,google::protobuf::MessageOptions,google::protobuf::FieldOptions,google::protobuf::EnumOptions,google::protobuf::EnumValueOptions,google::protobuf::ExtensionRangeOptions,google::protobuf::OneofOptions,google::protobuf::ServiceOptions,google::protobuf::MethodOptions,google::protobuf::FileOptions>
*)param_2,1);
(anonymous_namespace)::
FlatAllocatorImpl<char,std::__cxx11::string,google::protobuf::SourceCodeInfo,google::protobuf::FileDescriptorTables,google::protobuf::MessageOptions,google::protobuf::FieldOptions,google::protobuf::EnumOptions,google::protobuf::EnumValueOptions,google::protobuf::ExtensionRangeOptions,google::protobuf::OneofOptions,google::protobuf::ServiceOptions,google::protobuf::MethodOptions,google::protobuf::FileOptions>
::PlanArray<google::protobuf::FileDescriptorTables>
((FlatAllocatorImpl<char,std::__cxx11::string,google::protobuf::SourceCodeInfo,google::protobuf::FileDescriptorTables,google::protobuf::MessageOptions,google::protobuf::FieldOptions,google::protobuf::EnumOptions,google::protobuf::EnumValueOptions,google::protobuf::ExtensionRangeOptions,google::protobuf::OneofOptions,google::protobuf::ServiceOptions,google::protobuf::MethodOptions,google::protobuf::FileOptions>
*)param_2,1);
(anonymous_namespace)::
FlatAllocatorImpl<char,std::__cxx11::string,google::protobuf::SourceCodeInfo,google::protobuf::FileDescriptorTables,google::protobuf::MessageOptions,google::protobuf::FieldOptions,google::protobuf::EnumOptions,google::protobuf::EnumValueOptions,google::protobuf::ExtensionRangeOptions,google::protobuf::OneofOptions,google::protobuf::ServiceOptions,google::protobuf::MethodOptions,google::protobuf::FileOptions>
::PlanArray<std::__cxx11::string>
((FlatAllocatorImpl<char,std::__cxx11::string,google::protobuf::SourceCodeInfo,google::protobuf::FileDescriptorTables,google::protobuf::MessageOptions,google::protobuf::FieldOptions,google::protobuf::EnumOptions,google::protobuf::EnumValueOptions,google::protobuf::ExtensionRangeOptions,google::protobuf::OneofOptions,google::protobuf::ServiceOptions,google::protobuf::MethodOptions,google::protobuf::FileOptions>
*)param_2,2);
uVar2 = FileDescriptorProto::has_options(param_1);
if ((uVar2 & 1) != 0) {
(anonymous_namespace)::
FlatAllocatorImpl<char,std::__cxx11::string,google::protobuf::SourceCodeInfo,google::protobuf::FileDescriptorTables,google::protobuf::MessageOptions,google::protobuf::FieldOptions,google::protobuf::EnumOptions,google::protobuf::EnumValueOptions,google::protobuf::ExtensionRangeOptions,google::protobuf::OneofOptions,google::protobuf::ServiceOptions,google::protobuf::MethodOptions,google::protobuf::FileOptions>
::PlanArray<google::protobuf::FileOptions>
((FlatAllocatorImpl<char,std::__cxx11::string,google::protobuf::SourceCodeInfo,google::protobuf::FileDescriptorTables,google::protobuf::MessageOptions,google::protobuf::FieldOptions,google::protobuf::EnumOptions,google::protobuf::EnumValueOptions,google::protobuf::ExtensionRangeOptions,google::protobuf::OneofOptions,google::protobuf::ServiceOptions,google::protobuf::MethodOptions,google::protobuf::FileOptions>
*)param_2,1);
}
uVar2 = FileDescriptorProto::has_source_code_info(param_1);
if ((uVar2 & 1) != 0) {
(anonymous_namespace)::
FlatAllocatorImpl<char,std::__cxx11::string,google::protobuf::SourceCodeInfo,google::protobuf::FileDescriptorTables,google::protobuf::MessageOptions,google::protobuf::FieldOptions,google::protobuf::EnumOptions,google::protobuf::EnumValueOptions,google::protobuf::ExtensionRangeOptions,google::protobuf::OneofOptions,google::protobuf::ServiceOptions,google::protobuf::MethodOptions,google::protobuf::FileOptions>
::PlanArray<google::protobuf::SourceCodeInfo>
((FlatAllocatorImpl<char,std::__cxx11::string,google::protobuf::SourceCodeInfo,google::protobuf::FileDescriptorTables,google::protobuf::MessageOptions,google::protobuf::FieldOptions,google::protobuf::EnumOptions,google::protobuf::EnumValueOptions,google::protobuf::ExtensionRangeOptions,google::protobuf::OneofOptions,google::protobuf::ServiceOptions,google::protobuf::MethodOptions,google::protobuf::FileOptions>
*)param_2,1);
}
pRVar3 = (RepeatedPtrField *)FileDescriptorProto::service(param_1);
PlanAllocationSize(pRVar3,param_2);
pRVar3 = (RepeatedPtrField *)FileDescriptorProto::message_type(param_1);
PlanAllocationSize(pRVar3,param_2);
pRVar3 = (RepeatedPtrField *)FileDescriptorProto::enum_type(param_1);
PlanAllocationSize(pRVar3,param_2);
pRVar3 = (RepeatedPtrField *)FileDescriptorProto::extension(param_1);
PlanAllocationSize(pRVar3,param_2);
iVar1 = FileDescriptorProto::weak_dependency_size(param_1);
(anonymous_namespace)::
FlatAllocatorImpl<char,std::__cxx11::string,google::protobuf::SourceCodeInfo,google::protobuf::FileDescriptorTables,google::protobuf::MessageOptions,google::protobuf::FieldOptions,google::protobuf::EnumOptions,google::protobuf::EnumValueOptions,google::protobuf::ExtensionRangeOptions,google::protobuf::OneofOptions,google::protobuf::ServiceOptions,google::protobuf::MethodOptions,google::protobuf::FileOptions>
::PlanArray<int>((FlatAllocatorImpl<char,std::__cxx11::string,google::protobuf::SourceCodeInfo,google::protobuf::FileDescriptorTables,google::protobuf::MessageOptions,google::protobuf::FieldOptions,google::protobuf::EnumOptions,google::protobuf::EnumValueOptions,google::protobuf::ExtensionRangeOptions,google::protobuf::OneofOptions,google::protobuf::ServiceOptions,google::protobuf::MethodOptions,google::protobuf::FileOptions>
*)param_2,iVar1);
iVar1 = FileDescriptorProto::public_dependency_size(param_1);
(anonymous_namespace)::
FlatAllocatorImpl<char,std::__cxx11::string,google::protobuf::SourceCodeInfo,google::protobuf::FileDescriptorTables,google::protobuf::MessageOptions,google::protobuf::FieldOptions,google::protobuf::EnumOptions,google::protobuf::EnumValueOptions,google::protobuf::ExtensionRangeOptions,google::protobuf::OneofOptions,google::protobuf::ServiceOptions,google::protobuf::MethodOptions,google::protobuf::FileOptions>
::PlanArray<int>((FlatAllocatorImpl<char,std::__cxx11::string,google::protobuf::SourceCodeInfo,google::protobuf::FileDescriptorTables,google::protobuf::MessageOptions,google::protobuf::FieldOptions,google::protobuf::EnumOptions,google::protobuf::EnumValueOptions,google::protobuf::ExtensionRangeOptions,google::protobuf::OneofOptions,google::protobuf::ServiceOptions,google::protobuf::MethodOptions,google::protobuf::FileOptions>
*)param_2,iVar1);
iVar1 = FileDescriptorProto::dependency_size(param_1);
(anonymous_namespace)::
FlatAllocatorImpl<char,std::__cxx11::string,google::protobuf::SourceCodeInfo,google::protobuf::FileDescriptorTables,google::protobuf::MessageOptions,google::protobuf::FieldOptions,google::protobuf::EnumOptions,google::protobuf::EnumValueOptions,google::protobuf::ExtensionRangeOptions,google::protobuf::OneofOptions,google::protobuf::ServiceOptions,google::protobuf::MethodOptions,google::protobuf::FileOptions>
::PlanArray<google::protobuf::FileDescriptor_const*>
((FlatAllocatorImpl<char,std::__cxx11::string,google::protobuf::SourceCodeInfo,google::protobuf::FileDescriptorTables,google::protobuf::MessageOptions,google::protobuf::FieldOptions,google::protobuf::EnumOptions,google::protobuf::EnumValueOptions,google::protobuf::ExtensionRangeOptions,google::protobuf::OneofOptions,google::protobuf::ServiceOptions,google::protobuf::MethodOptions,google::protobuf::FileOptions>
*)param_2,iVar1);
return;
}
| ||
51,883 | google::protobuf::DescriptorBuilder::BuildReservedRange(google::protobuf::DescriptorProto_ReservedRange const&, google::protobuf::Descriptor const*, google::protobuf::Descriptor::ReservedRange*, google::protobuf::internal::FlatAllocator&) | aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/descriptor.cc | void DescriptorBuilder::BuildReservedRange(
const DescriptorProto::ReservedRange& proto, const Descriptor* parent,
Descriptor::ReservedRange* result, internal::FlatAllocator&) {
result->start = proto.start();
result->end = proto.end();
if (result->start <= 0) {
message_hints_[parent].RequestHintOnFieldNumbers(
proto, DescriptorPool::ErrorCollector::NUMBER, result->start,
result->end);
AddError(parent->full_name(), proto, DescriptorPool::ErrorCollector::NUMBER,
"Reserved numbers must be positive integers.");
}
} | O0 | cpp | google::protobuf::DescriptorBuilder::BuildReservedRange(google::protobuf::DescriptorProto_ReservedRange const&, google::protobuf::Descriptor const*, google::protobuf::Descriptor::ReservedRange*, google::protobuf::internal::FlatAllocator&):
subq $0x38, %rsp
movq %rdi, 0x30(%rsp)
movq %rsi, 0x28(%rsp)
movq %rdx, 0x20(%rsp)
movq %rcx, 0x18(%rsp)
movq %r8, 0x10(%rsp)
movq 0x30(%rsp), %rax
movq %rax, 0x8(%rsp)
movq 0x28(%rsp), %rdi
callq 0x785a0
movl %eax, %ecx
movq 0x18(%rsp), %rax
movl %ecx, (%rax)
movq 0x28(%rsp), %rdi
callq 0x78590
movl %eax, %ecx
movq 0x18(%rsp), %rax
movl %ecx, 0x4(%rax)
movq 0x18(%rsp), %rax
cmpl $0x0, (%rax)
jg 0x526e8
movq 0x8(%rsp), %rdi
addq $0x98, %rdi
leaq 0x20(%rsp), %rsi
callq 0x78630
movq %rax, %rdi
movq 0x28(%rsp), %rsi
movq 0x18(%rsp), %rax
movl (%rax), %ecx
movq 0x18(%rsp), %rax
movl 0x4(%rax), %r8d
movl $0x1, %edx
callq 0x78660
movq 0x20(%rsp), %rdi
callq 0x163d0
movq 0x8(%rsp), %rdi
movq %rax, %rsi
movq 0x28(%rsp), %rdx
movl $0x1, %ecx
leaq 0x19be3e(%rip), %r8 # 0x1ee521
callq 0x42950
addq $0x38, %rsp
retq
nopl (%rax)
| _ZN6google8protobuf17DescriptorBuilder18BuildReservedRangeERKNS0_29DescriptorProto_ReservedRangeEPKNS0_10DescriptorEPNS5_13ReservedRangeERNS0_8internal13FlatAllocatorE:
sub rsp, 38h
mov [rsp+38h+var_8], rdi
mov [rsp+38h+var_10], rsi
mov [rsp+38h+var_18], rdx
mov [rsp+38h+var_20], rcx
mov [rsp+38h+var_28], r8
mov rax, [rsp+38h+var_8]
mov [rsp+38h+var_30], rax
mov rdi, [rsp+38h+var_10]; this
call _ZNK6google8protobuf29DescriptorProto_ReservedRange5startEv; google::protobuf::DescriptorProto_ReservedRange::start(void)
mov ecx, eax
mov rax, [rsp+38h+var_20]
mov [rax], ecx
mov rdi, [rsp+38h+var_10]; this
call _ZNK6google8protobuf29DescriptorProto_ReservedRange3endEv; google::protobuf::DescriptorProto_ReservedRange::end(void)
mov ecx, eax
mov rax, [rsp+38h+var_20]
mov [rax+4], ecx
mov rax, [rsp+38h+var_20]
cmp dword ptr [rax], 0
jg short loc_526E8
mov rdi, [rsp+38h+var_30]
add rdi, 98h
lea rsi, [rsp+38h+var_18]
call _ZNSt13unordered_mapIPKN6google8protobuf10DescriptorENS1_17DescriptorBuilder12MessageHintsESt4hashIS4_ESt8equal_toIS4_ESaISt4pairIKS4_S6_EEEixERSC_; std::unordered_map<google::protobuf::Descriptor const*,google::protobuf::DescriptorBuilder::MessageHints>::operator[](google::protobuf::Descriptor const* const&)
mov rdi, rax
mov rsi, [rsp+38h+var_10]
mov rax, [rsp+38h+var_20]
mov ecx, [rax]
mov rax, [rsp+38h+var_20]
mov r8d, [rax+4]
mov edx, 1
call _ZN6google8protobuf17DescriptorBuilder12MessageHints25RequestHintOnFieldNumbersERKNS0_7MessageENS0_14DescriptorPool14ErrorCollector13ErrorLocationEii; google::protobuf::DescriptorBuilder::MessageHints::RequestHintOnFieldNumbers(google::protobuf::Message const&,google::protobuf::DescriptorPool::ErrorCollector::ErrorLocation,int,int)
mov rdi, [rsp+38h+var_18]
call _ZNK6google8protobuf10Descriptor9full_nameB5cxx11Ev; google::protobuf::Descriptor::full_name(void)
mov rdi, [rsp+38h+var_30]
mov rsi, rax
mov rdx, [rsp+38h+var_10]
mov ecx, 1
lea r8, aReservedNumber; "Reserved numbers must be positive integ"...
call _ZN6google8protobuf17DescriptorBuilder8AddErrorERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKNS0_7MessageENS0_14DescriptorPool14ErrorCollector13ErrorLocationEPKc; google::protobuf::DescriptorBuilder::AddError(std::string const&,google::protobuf::Message const&,google::protobuf::DescriptorPool::ErrorCollector::ErrorLocation,char const*)
loc_526E8:
add rsp, 38h
retn
| long long google::protobuf::DescriptorBuilder::BuildReservedRange(
long long a1,
google::protobuf::DescriptorProto_ReservedRange *a2,
long long a3,
int *a4)
{
long long result; // rax
long long v5; // rax
long long v6; // rax
long long v8; // [rsp+20h] [rbp-18h] BYREF
google::protobuf::DescriptorProto_ReservedRange *v9; // [rsp+28h] [rbp-10h]
long long v10; // [rsp+30h] [rbp-8h]
v10 = a1;
v9 = a2;
v8 = a3;
*a4 = google::protobuf::DescriptorProto_ReservedRange::start(a2);
a4[1] = google::protobuf::DescriptorProto_ReservedRange::end(v9);
result = (long long)a4;
if ( *a4 <= 0 )
{
v5 = std::unordered_map<google::protobuf::Descriptor const*,google::protobuf::DescriptorBuilder::MessageHints>::operator[](
a1 + 152,
&v8);
google::protobuf::DescriptorBuilder::MessageHints::RequestHintOnFieldNumbers(v5, v9, 1LL, (unsigned int)*a4);
v6 = google::protobuf::Descriptor::full_name[abi:cxx11](v8);
return google::protobuf::DescriptorBuilder::AddError(
a1,
v6,
(long long)v9,
1u,
(long long)"Reserved numbers must be positive integers.");
}
return result;
}
| BuildReservedRange:
SUB RSP,0x38
MOV qword ptr [RSP + 0x30],RDI
MOV qword ptr [RSP + 0x28],RSI
MOV qword ptr [RSP + 0x20],RDX
MOV qword ptr [RSP + 0x18],RCX
MOV qword ptr [RSP + 0x10],R8
MOV RAX,qword ptr [RSP + 0x30]
MOV qword ptr [RSP + 0x8],RAX
MOV RDI,qword ptr [RSP + 0x28]
CALL 0x001785a0
MOV ECX,EAX
MOV RAX,qword ptr [RSP + 0x18]
MOV dword ptr [RAX],ECX
MOV RDI,qword ptr [RSP + 0x28]
CALL 0x00178590
MOV ECX,EAX
MOV RAX,qword ptr [RSP + 0x18]
MOV dword ptr [RAX + 0x4],ECX
MOV RAX,qword ptr [RSP + 0x18]
CMP dword ptr [RAX],0x0
JG 0x001526e8
MOV RDI,qword ptr [RSP + 0x8]
ADD RDI,0x98
LEA RSI,[RSP + 0x20]
CALL 0x00178630
MOV RDI,RAX
MOV RSI,qword ptr [RSP + 0x28]
MOV RAX,qword ptr [RSP + 0x18]
MOV ECX,dword ptr [RAX]
MOV RAX,qword ptr [RSP + 0x18]
MOV R8D,dword ptr [RAX + 0x4]
MOV EDX,0x1
CALL 0x00178660
MOV RDI,qword ptr [RSP + 0x20]
CALL 0x001163d0
MOV RDI,qword ptr [RSP + 0x8]
MOV RSI,RAX
MOV RDX,qword ptr [RSP + 0x28]
MOV ECX,0x1
LEA R8,[0x2ee521]
CALL 0x00142950
LAB_001526e8:
ADD RSP,0x38
RET
|
/* google::protobuf::DescriptorBuilder::BuildReservedRange(google::protobuf::DescriptorProto_ReservedRange
const&, google::protobuf::Descriptor const*, google::protobuf::Descriptor::ReservedRange*,
google::protobuf::internal::FlatAllocator&) */
void google::protobuf::DescriptorBuilder::BuildReservedRange
(DescriptorProto_ReservedRange *param_1,Descriptor *param_2,ReservedRange *param_3,
FlatAllocator *param_4)
{
int4 uVar1;
MessageHints *pMVar2;
int8 uVar3;
ReservedRange *local_18;
DescriptorProto_ReservedRange *local_10;
DescriptorProto_ReservedRange *local_8;
local_18 = param_3;
local_10 = (DescriptorProto_ReservedRange *)param_2;
local_8 = param_1;
uVar1 = DescriptorProto_ReservedRange::start((DescriptorProto_ReservedRange *)param_2);
*(int4 *)param_4 = uVar1;
uVar1 = DescriptorProto_ReservedRange::end(local_10);
*(int4 *)(param_4 + 4) = uVar1;
if (*(int *)param_4 < 1) {
pMVar2 = (MessageHints *)
std::
unordered_map<google::protobuf::Descriptor_const*,google::protobuf::DescriptorBuilder::MessageHints,std::hash<google::protobuf::Descriptor_const*>,std::equal_to<google::protobuf::Descriptor_const*>,std::allocator<std::pair<google::protobuf::Descriptor_const*const,google::protobuf::DescriptorBuilder::MessageHints>>>
::operator[]((unordered_map<google::protobuf::Descriptor_const*,google::protobuf::DescriptorBuilder::MessageHints,std::hash<google::protobuf::Descriptor_const*>,std::equal_to<google::protobuf::Descriptor_const*>,std::allocator<std::pair<google::protobuf::Descriptor_const*const,google::protobuf::DescriptorBuilder::MessageHints>>>
*)(param_1 + 0x98),(Descriptor **)&local_18);
MessageHints::RequestHintOnFieldNumbers
(pMVar2,local_10,1,*(int4 *)param_4,*(int4 *)(param_4 + 4));
uVar3 = Descriptor::full_name_abi_cxx11_((Descriptor *)local_18);
AddError((DescriptorBuilder *)param_1,uVar3,local_10,1,
"Reserved numbers must be positive integers.");
}
return;
}
| |
51,884 | my_once_alloc | eloqsql/mysys/my_once.c | void* my_once_alloc(size_t Size, myf MyFlags)
{
size_t get_size, max_left;
uchar* point;
reg1 USED_MEM *next;
reg2 USED_MEM **prev;
Size= ALIGN_SIZE(Size);
prev= &my_once_root_block;
max_left=0;
for (next=my_once_root_block ; next && next->left < Size ; next= next->next)
{
if (next->left > max_left)
max_left=next->left;
prev= &next->next;
}
if (! next)
{ /* Time to alloc new block */
get_size= Size+ALIGN_SIZE(sizeof(USED_MEM));
if (max_left*4 < my_once_extra && get_size < my_once_extra)
get_size=my_once_extra; /* Normal alloc */
if ((next = (USED_MEM*) malloc(get_size)) == 0)
{
my_errno=errno;
if (MyFlags & (MY_FAE+MY_WME))
my_error(EE_OUTOFMEMORY, MYF(ME_BELL+ME_FATAL), get_size);
return((uchar*) 0);
}
DBUG_PRINT("test",("my_once_malloc %lu byte malloced", (ulong) get_size));
next->next= 0;
next->size= get_size;
next->left= get_size-ALIGN_SIZE(sizeof(USED_MEM));
*prev=next;
}
point= (uchar*) ((char*) next+ (next->size-next->left));
next->left-= Size;
if (MyFlags & MY_ZEROFILL)
bzero(point, Size);
return((void*) point);
} | O3 | c | my_once_alloc:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
addq $0x7, %r14
andq $-0x8, %r14
leaq 0x342099(%rip), %r13 # 0x36dff0
movq (%r13), %rcx
xorl %eax, %eax
testq %rcx, %rcx
je 0x2bf82
movq %rcx, %r13
movq 0x8(%rcx), %rcx
cmpq %r14, %rcx
jae 0x2bfcb
cmpq %rax, %rcx
cmovaq %rcx, %rax
movq (%r13), %rcx
testq %rcx, %rcx
jne 0x2bf62
shlq $0x2, %rax
leaq 0x18(%r14), %rcx
leaq 0x2ca733(%rip), %rdx # 0x2f66c0
movl (%rdx), %edx
cmpq %rdx, %rcx
movq %rdx, %r15
cmovaq %rcx, %r15
cmpq %rdx, %rax
cmovaeq %rcx, %r15
movq %r15, %rdi
callq 0x24440
testq %rax, %rax
je 0x2bffc
movq $0x0, (%rax)
movq %r15, 0x10(%rax)
addq $-0x18, %r15
movq %r15, 0x8(%rax)
movq %rax, (%r13)
movq 0x8(%rax), %rcx
movq %rax, %r13
movq 0x10(%r13), %r12
subq %rcx, %r12
addq %r13, %r12
subq %r14, %rcx
movq %rcx, 0x8(%r13)
testb $0x20, %bl
je 0x2c028
movq %r12, %rdi
xorl %esi, %esi
movq %r14, %rdx
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x24190
callq 0x24050
movl (%rax), %r14d
callq 0x2cb22
movl %r14d, (%rax)
xorl %r12d, %r12d
testb $0x18, %bl
je 0x2c028
movl $0x1004, %esi # imm = 0x1004
movl $0x5, %edi
movq %r15, %rdx
xorl %eax, %eax
callq 0x314c3
movq %r12, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| my_once_alloc:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
push rax
mov rbx, rsi
mov r14, rdi
add r14, 7
and r14, 0FFFFFFFFFFFFFFF8h
lea r13, my_once_root_block
mov rcx, [r13+0]
xor eax, eax
test rcx, rcx
jz short loc_2BF82
loc_2BF62:
mov r13, rcx
mov rcx, [rcx+8]
cmp rcx, r14
jnb short loc_2BFCB
cmp rcx, rax
cmova rax, rcx
mov rcx, [r13+0]
test rcx, rcx
jnz short loc_2BF62
shl rax, 2
loc_2BF82:
lea rcx, [r14+18h]
lea rdx, my_once_extra
mov edx, [rdx]
cmp rcx, rdx
mov r15, rdx
cmova r15, rcx
cmp rax, rdx
cmovnb r15, rcx
mov rdi, r15
call _malloc
test rax, rax
jz short loc_2BFFC
mov qword ptr [rax], 0
mov [rax+10h], r15
add r15, 0FFFFFFFFFFFFFFE8h
mov [rax+8], r15
mov [r13+0], rax
mov rcx, [rax+8]
mov r13, rax
loc_2BFCB:
mov r12, [r13+10h]
sub r12, rcx
add r12, r13
sub rcx, r14
mov [r13+8], rcx
test bl, 20h
jz short loc_2C028
mov rdi, r12
xor esi, esi
mov rdx, r14
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
jmp _memset
loc_2BFFC:
call ___errno_location
mov r14d, [rax]
call _my_thread_var
mov [rax], r14d
xor r12d, r12d
test bl, 18h
jz short loc_2C028
mov esi, 1004h
mov edi, 5
mov rdx, r15
xor eax, eax
call my_error
loc_2C028:
mov rax, r12
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| long long my_once_alloc(long long a1, char a2)
{
unsigned long long v2; // r14
_QWORD *v3; // r13
_QWORD *v4; // rcx
unsigned long long v5; // rax
unsigned long long v6; // rcx
unsigned long long v7; // r15
_QWORD *v8; // rax
char *v9; // r12
int v11; // r14d
int v12; // ecx
int v13; // r8d
int v14; // r9d
v2 = (a1 + 7) & 0xFFFFFFFFFFFFFFF8LL;
v3 = &my_once_root_block;
v4 = (_QWORD *)my_once_root_block;
v5 = 0LL;
if ( my_once_root_block )
{
while ( 1 )
{
v3 = v4;
v6 = v4[1];
if ( v6 >= v2 )
break;
if ( v6 > v5 )
v5 = v6;
v4 = (_QWORD *)*v3;
if ( !*v3 )
{
v5 *= 4LL;
goto LABEL_7;
}
}
}
else
{
LABEL_7:
v7 = my_once_extra;
if ( v2 + 24 > my_once_extra )
v7 = v2 + 24;
if ( v5 >= my_once_extra )
v7 = v2 + 24;
v8 = (_QWORD *)malloc(v7);
if ( !v8 )
{
v11 = *(_DWORD *)__errno_location(v7);
*(_DWORD *)my_thread_var(v7) = v11;
v9 = 0LL;
if ( (a2 & 0x18) != 0 )
my_error(5, 4100, v7, v12, v13, v14);
return (long long)v9;
}
*v8 = 0LL;
v8[2] = v7;
v8[1] = v7 - 24;
*v3 = v8;
v6 = v8[1];
v3 = v8;
}
v9 = (char *)v3 + v3[2] - v6;
v3[1] = v6 - v2;
if ( (a2 & 0x20) != 0 )
return memset(v9, 0LL, v2);
return (long long)v9;
}
| my_once_alloc:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
PUSH RAX
MOV RBX,RSI
MOV R14,RDI
ADD R14,0x7
AND R14,-0x8
LEA R13,[0x46dff0]
MOV RCX,qword ptr [R13]
XOR EAX,EAX
TEST RCX,RCX
JZ 0x0012bf82
LAB_0012bf62:
MOV R13,RCX
MOV RCX,qword ptr [RCX + 0x8]
CMP RCX,R14
JNC 0x0012bfcb
CMP RCX,RAX
CMOVA RAX,RCX
MOV RCX,qword ptr [R13]
TEST RCX,RCX
JNZ 0x0012bf62
SHL RAX,0x2
LAB_0012bf82:
LEA RCX,[R14 + 0x18]
LEA RDX,[0x3f66c0]
MOV EDX,dword ptr [RDX]
CMP RCX,RDX
MOV R15,RDX
CMOVA R15,RCX
CMP RAX,RDX
CMOVNC R15,RCX
MOV RDI,R15
CALL 0x00124440
TEST RAX,RAX
JZ 0x0012bffc
MOV qword ptr [RAX],0x0
MOV qword ptr [RAX + 0x10],R15
ADD R15,-0x18
MOV qword ptr [RAX + 0x8],R15
MOV qword ptr [R13],RAX
MOV RCX,qword ptr [RAX + 0x8]
MOV R13,RAX
LAB_0012bfcb:
MOV R12,qword ptr [R13 + 0x10]
SUB R12,RCX
ADD R12,R13
SUB RCX,R14
MOV qword ptr [R13 + 0x8],RCX
TEST BL,0x20
JZ 0x0012c028
MOV RDI,R12
XOR ESI,ESI
MOV RDX,R14
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
JMP 0x00124190
LAB_0012bffc:
CALL 0x00124050
MOV R14D,dword ptr [RAX]
CALL 0x0012cb22
MOV dword ptr [RAX],R14D
XOR R12D,R12D
TEST BL,0x18
JZ 0x0012c028
MOV ESI,0x1004
MOV EDI,0x5
MOV RDX,R15
XOR EAX,EAX
CALL 0x001314c3
LAB_0012c028:
MOV RAX,R12
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
void * my_once_alloc(long param_1,ulong param_2)
{
int iVar1;
int8 *puVar2;
ulong uVar3;
int8 *puVar4;
int *piVar5;
ulong uVar6;
ulong uVar7;
void *pvVar8;
int8 *puVar9;
ulong __n;
ulong __size;
__n = param_1 + 7U & 0xfffffffffffffff8;
uVar3 = 0;
puVar2 = my_once_root_block;
puVar9 = &my_once_root_block;
if (my_once_root_block != (int8 *)0x0) {
do {
puVar4 = puVar2;
uVar6 = puVar4[1];
if (__n <= uVar6) goto LAB_0012bfcb;
if (uVar3 < uVar6) {
uVar3 = uVar6;
}
puVar2 = (int8 *)*puVar4;
} while ((int8 *)*puVar4 != (int8 *)0x0);
uVar3 = uVar3 << 2;
puVar9 = puVar4;
}
uVar6 = __n + 0x18;
uVar7 = (ulong)my_once_extra;
__size = uVar7;
if (uVar7 < uVar6) {
__size = uVar6;
}
if (uVar7 <= uVar3) {
__size = uVar6;
}
puVar4 = (int8 *)malloc(__size);
if (puVar4 == (int8 *)0x0) {
piVar5 = __errno_location();
iVar1 = *piVar5;
piVar5 = (int *)_my_thread_var();
*piVar5 = iVar1;
pvVar8 = (void *)0x0;
if ((param_2 & 0x18) != 0) {
my_error(5,0x1004,__size);
}
}
else {
*puVar4 = 0;
puVar4[2] = __size;
puVar4[1] = __size - 0x18;
*puVar9 = puVar4;
uVar6 = puVar4[1];
LAB_0012bfcb:
pvVar8 = (void *)((puVar4[2] - uVar6) + (long)puVar4);
puVar4[1] = uVar6 - __n;
if ((param_2 & 0x20) != 0) {
pvVar8 = memset(pvVar8,0,__n);
return pvVar8;
}
}
return pvVar8;
}
| |
51,885 | ftb_parse_query_internal | eloqsql/storage/myisam/ft_boolean_search.c | static int ftb_parse_query_internal(MYSQL_FTPARSER_PARAM *param,
const char *query, int len)
{
MY_FTB_PARAM *ftb_param= param->mysql_ftparam;
MYSQL_FTPARSER_BOOLEAN_INFO info;
CHARSET_INFO *cs= ftb_param->ftb->charset;
const uchar **start= (const uchar**) &query;
uchar *end= (uchar*) query + len;
FT_WORD w;
info.prev= ' ';
info.quot= 0;
while (ft_get_word(cs, start, end, &w, &info))
param->mysql_add_word(param, (char*) w.pos, (int)w.len, &info);
return(0);
} | O3 | c | ftb_parse_query_internal:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %rdi, %rbx
leaq -0x30(%rbp), %rax
movq %rsi, (%rax)
movq 0x18(%rdi), %rcx
movq (%rcx), %rcx
movq 0x10(%rcx), %r14
movslq %edx, %r15
addq %rsi, %r15
leaq -0x60(%rbp), %r8
movb $0x20, 0xe(%r8)
movq $0x0, 0x10(%r8)
leaq -0x48(%rbp), %rcx
movq %r14, %rdi
movq %rax, %rsi
movq %r15, %rdx
callq 0x7321d
testb %al, %al
je 0x72114
leaq -0x60(%rbp), %r12
leaq -0x48(%rbp), %r13
movq -0x48(%rbp), %rsi
movl -0x38(%rbp), %edx
movq %rbx, %rdi
movq %r12, %rcx
callq *0x8(%rbx)
movq %r14, %rdi
leaq -0x30(%rbp), %rsi
movq %r15, %rdx
movq %r13, %rcx
movq %r12, %r8
callq 0x7321d
testb %al, %al
jne 0x720eb
xorl %eax, %eax
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| ftb_parse_query_internal:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 38h
mov rbx, rdi
lea rax, [rbp+var_30]
mov [rax], rsi
mov rcx, [rdi+18h]
mov rcx, [rcx]
mov r14, [rcx+10h]
movsxd r15, edx
add r15, rsi
lea r8, [rbp+var_60]
mov byte ptr [r8+0Eh], 20h ; ' '
mov qword ptr [r8+10h], 0
lea rcx, [rbp+var_48]
mov rdi, r14
mov rsi, rax
mov rdx, r15
call ft_get_word
test al, al
jz short loc_72114
lea r12, [rbp+var_60]
lea r13, [rbp+var_48]
loc_720EB:
mov rsi, [rbp+var_48]
mov edx, [rbp+var_38]
mov rdi, rbx
mov rcx, r12
call qword ptr [rbx+8]
mov rdi, r14
lea rsi, [rbp+var_30]
mov rdx, r15
mov rcx, r13
mov r8, r12
call ft_get_word
test al, al
jnz short loc_720EB
loc_72114:
xor eax, eax
add rsp, 38h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| long long ftb_parse_query_internal(long long a1, long long a2, int a3)
{
long long v3; // r14
long long v4; // r15
_BYTE v6[16]; // [rsp+0h] [rbp-60h] BYREF
long long v7; // [rsp+10h] [rbp-50h]
_QWORD v8[2]; // [rsp+18h] [rbp-48h] BYREF
unsigned int v9; // [rsp+28h] [rbp-38h]
_QWORD v10[6]; // [rsp+30h] [rbp-30h] BYREF
v10[0] = a2;
v3 = *(_QWORD *)(**(_QWORD **)(a1 + 24) + 16LL);
v4 = a2 + a3;
v6[14] = 32;
v7 = 0LL;
while ( (unsigned __int8)ft_get_word(v3, v10, v4, v8) )
(*(void ( **)(long long, _QWORD, _QWORD, _BYTE *))(a1 + 8))(a1, v8[0], v9, v6);
return 0LL;
}
| ftb_parse_query_internal:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x38
MOV RBX,RDI
LEA RAX,[RBP + -0x30]
MOV qword ptr [RAX],RSI
MOV RCX,qword ptr [RDI + 0x18]
MOV RCX,qword ptr [RCX]
MOV R14,qword ptr [RCX + 0x10]
MOVSXD R15,EDX
ADD R15,RSI
LEA R8,[RBP + -0x60]
MOV byte ptr [R8 + 0xe],0x20
MOV qword ptr [R8 + 0x10],0x0
LEA RCX,[RBP + -0x48]
MOV RDI,R14
MOV RSI,RAX
MOV RDX,R15
CALL 0x0017321d
TEST AL,AL
JZ 0x00172114
LEA R12,[RBP + -0x60]
LEA R13,[RBP + -0x48]
LAB_001720eb:
MOV RSI,qword ptr [RBP + -0x48]
MOV EDX,dword ptr [RBP + -0x38]
MOV RDI,RBX
MOV RCX,R12
CALL qword ptr [RBX + 0x8]
MOV RDI,R14
LEA RSI,[RBP + -0x30]
MOV RDX,R15
MOV RCX,R13
MOV R8,R12
CALL 0x0017321d
TEST AL,AL
JNZ 0x001720eb
LAB_00172114:
XOR EAX,EAX
ADD RSP,0x38
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
int8 ftb_parse_query_internal(long param_1,long param_2,int param_3)
{
int8 uVar1;
char cVar2;
int1 local_68 [14];
int1 local_5a;
int8 local_58;
int8 local_50 [2];
int4 local_40;
long local_38;
uVar1 = *(int8 *)(**(long **)(param_1 + 0x18) + 0x10);
local_5a = 0x20;
local_58 = 0;
local_38 = param_2;
cVar2 = ft_get_word(uVar1,&local_38,param_3 + param_2,local_50);
if (cVar2 != '\0') {
do {
(**(code **)(param_1 + 8))(param_1,local_50[0],local_40,local_68);
cVar2 = ft_get_word(uVar1,&local_38,param_3 + param_2,local_50,local_68);
} while (cVar2 != '\0');
}
return 0;
}
| |
51,886 | pcmp | eloqsql/strings/ctype-simple.c | static int pcmp(const void * f, const void * s)
{
const uni_idx *F= (const uni_idx*) f;
const uni_idx *S= (const uni_idx*) s;
int res;
if (!(res=((S->nchars)-(F->nchars))))
res=((F->uidx.from)-(S->uidx.to));
return res;
} | O3 | c | pcmp:
pushq %rbp
movq %rsp, %rbp
movl (%rsi), %eax
subl (%rdi), %eax
jne 0x3db29
movzwl 0x8(%rdi), %eax
movzwl 0xa(%rsi), %ecx
subl %ecx, %eax
popq %rbp
retq
nop
| pcmp:
push rbp
mov rbp, rsp
mov eax, [rsi]
sub eax, [rdi]
jnz short loc_3DB29
movzx eax, word ptr [rdi+8]
movzx ecx, word ptr [rsi+0Ah]
sub eax, ecx
loc_3DB29:
pop rbp
retn
| long long pcmp(long long a1, long long a2)
{
long long result; // rax
result = (unsigned int)(*(_DWORD *)a2 - *(_DWORD *)a1);
if ( *(_DWORD *)a2 == *(_DWORD *)a1 )
return *(unsigned __int16 *)(a1 + 8) - (unsigned int)*(unsigned __int16 *)(a2 + 10);
return result;
}
| pcmp:
PUSH RBP
MOV RBP,RSP
MOV EAX,dword ptr [RSI]
SUB EAX,dword ptr [RDI]
JNZ 0x0013db29
MOVZX EAX,word ptr [RDI + 0x8]
MOVZX ECX,word ptr [RSI + 0xa]
SUB EAX,ECX
LAB_0013db29:
POP RBP
RET
|
int pcmp(int *param_1,int *param_2)
{
int iVar1;
iVar1 = *param_2 - *param_1;
if (iVar1 == 0) {
iVar1 = (uint)*(ushort *)(param_1 + 2) - (uint)*(ushort *)((long)param_2 + 10);
}
return iVar1;
}
| |
51,887 | list_walk | eloqsql/libmariadb/libmariadb/ma_list.c | int list_walk(LIST *list, list_walk_action action, gptr argument)
{
int error=0;
while (list)
{
if ((error = (*action)(list->data,argument)))
return error;
list= list_rest(list);
}
return 0;
} | O3 | c | list_walk:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
xorl %ebx, %ebx
testq %rdi, %rdi
je 0x4be1e
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %r12
movq 0x10(%r12), %rdi
movq %r14, %rsi
callq *%r15
testl %eax, %eax
jne 0x4be1c
movq 0x8(%r12), %r12
testq %r12, %r12
jne 0x4be01
jmp 0x4be1e
movl %eax, %ebx
movl %ebx, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
nopl (%rax)
| list_walk:
push rbp
mov rbp, rsp
push r15
push r14
push r12
push rbx
xor ebx, ebx
test rdi, rdi
jz short loc_4BE1E
mov r14, rdx
mov r15, rsi
mov r12, rdi
loc_4BE01:
mov rdi, [r12+10h]
mov rsi, r14
call r15
test eax, eax
jnz short loc_4BE1C
mov r12, [r12+8]
test r12, r12
jnz short loc_4BE01
jmp short loc_4BE1E
loc_4BE1C:
mov ebx, eax
loc_4BE1E:
mov eax, ebx
pop rbx
pop r12
pop r14
pop r15
pop rbp
retn
| long long list_walk(long long a1, long long ( *a2)(_QWORD, long long), long long a3)
{
unsigned int v3; // ebx
long long v5; // r12
unsigned int v6; // eax
v3 = 0;
if ( a1 )
{
v5 = a1;
while ( 1 )
{
v6 = a2(*(_QWORD *)(v5 + 16), a3);
if ( v6 )
break;
v5 = *(_QWORD *)(v5 + 8);
if ( !v5 )
return v3;
}
return v6;
}
return v3;
}
| list_walk:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
XOR EBX,EBX
TEST RDI,RDI
JZ 0x0014be1e
MOV R14,RDX
MOV R15,RSI
MOV R12,RDI
LAB_0014be01:
MOV RDI,qword ptr [R12 + 0x10]
MOV RSI,R14
CALL R15
TEST EAX,EAX
JNZ 0x0014be1c
MOV R12,qword ptr [R12 + 0x8]
TEST R12,R12
JNZ 0x0014be01
JMP 0x0014be1e
LAB_0014be1c:
MOV EBX,EAX
LAB_0014be1e:
MOV EAX,EBX
POP RBX
POP R12
POP R14
POP R15
POP RBP
RET
|
int list_walk(long param_1,code *param_2,int8 param_3)
{
int iVar1;
if (param_1 != 0) {
do {
iVar1 = (*param_2)(*(int8 *)(param_1 + 0x10),param_3);
if (iVar1 != 0) {
return iVar1;
}
param_1 = *(long *)(param_1 + 8);
} while (param_1 != 0);
}
return 0;
}
| |
51,888 | pvio_socket_internal_connect | eloqsql/libmariadb/plugins/pvio/pvio_socket.c | static int pvio_socket_internal_connect(MARIADB_PVIO *pvio,
const struct sockaddr *name,
size_t namelen)
{
int rc= 0;
struct st_pvio_socket *csock= NULL;
int timeout;
#ifndef _WIN32
unsigned int wait_conn= 1;
time_t start_t= time(NULL);
#endif
if (!pvio || !pvio->data)
return 1;
csock= (struct st_pvio_socket *)pvio->data;
timeout= pvio->timeout[PVIO_CONNECT_TIMEOUT];
/* set non blocking */
pvio_socket_blocking(pvio, 0, 0);
#ifndef _WIN32
do {
rc= connect(csock->socket, (struct sockaddr*) name, (int)namelen);
if (time(NULL) - start_t > (time_t)timeout/1000)
break;
usleep(wait_conn);
wait_conn= wait_conn >= 1000000 ? 1000000 : wait_conn * 2;
} while (rc == -1 && (errno == EINTR || errno == EAGAIN));
/* in case a timeout values was set we need to check error values
EINPROGRESS */
if (timeout != 0 && rc == -1 && errno == EINPROGRESS)
{
rc= pvio_socket_wait_io_or_timeout(pvio, FALSE, timeout);
if (rc < 1)
return -1;
{
int error;
socklen_t error_len= sizeof(error);
if ((rc = getsockopt(csock->socket, SOL_SOCKET, SO_ERROR,
(char *)&error, &error_len)) < 0)
return errno;
else if (error)
return error;
}
}
#ifdef __APPLE__
if (csock->socket)
{
int val= 1;
setsockopt(csock->socket, SOL_SOCKET, SO_NOSIGPIPE, (void *)&val, sizeof(int));
}
#endif
#else
rc= connect(csock->socket, (struct sockaddr*) name, (int)namelen);
if (rc == SOCKET_ERROR)
{
if (WSAGetLastError() == WSAEWOULDBLOCK)
{
if (pvio_socket_wait_io_or_timeout(pvio, FALSE, timeout) < 0)
return -1;
rc= 0;
}
}
#endif
return rc;
} | O0 | c | pvio_socket_internal_connect:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movl $0x0, -0x24(%rbp)
movq $0x0, -0x30(%rbp)
movl $0x1, -0x38(%rbp)
xorl %eax, %eax
movl %eax, %edi
callq 0x12390
movq %rax, -0x40(%rbp)
cmpq $0x0, -0x10(%rbp)
je 0x3fac8
movq -0x10(%rbp), %rax
cmpq $0x0, (%rax)
jne 0x3fad4
movl $0x1, -0x4(%rbp)
jmp 0x3fc28
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x30(%rbp)
movq -0x10(%rbp), %rax
movl 0x24(%rax), %eax
movl %eax, -0x34(%rbp)
movq -0x10(%rbp), %rdi
xorl %esi, %esi
xorl %eax, %eax
movl %eax, %edx
callq 0x3e640
movq -0x30(%rbp), %rax
movl (%rax), %edi
movq -0x18(%rbp), %rsi
movq -0x20(%rbp), %rax
movl %eax, %edx
callq 0x12350
movl %eax, -0x24(%rbp)
xorl %eax, %eax
movl %eax, %edi
callq 0x12390
subq -0x40(%rbp), %rax
movq %rax, -0x50(%rbp)
movslq -0x34(%rbp), %rax
movl $0x3e8, %ecx # imm = 0x3E8
cqto
idivq %rcx
movq %rax, %rcx
movq -0x50(%rbp), %rax
cmpq %rcx, %rax
jle 0x3fb3d
jmp 0x3fba2
movl -0x38(%rbp), %edi
callq 0x125f0
cmpl $0xf4240, -0x38(%rbp) # imm = 0xF4240
jb 0x3fb58
movl $0xf4240, %eax # imm = 0xF4240
movl %eax, -0x54(%rbp)
jmp 0x3fb60
movl -0x38(%rbp), %eax
shll %eax
movl %eax, -0x54(%rbp)
movl -0x54(%rbp), %eax
movl %eax, -0x38(%rbp)
xorl %eax, %eax
cmpl $-0x1, -0x24(%rbp)
movb %al, -0x55(%rbp)
jne 0x3fb97
callq 0x12040
movq %rax, %rcx
movb $0x1, %al
cmpl $0x4, (%rcx)
movb %al, -0x56(%rbp)
je 0x3fb91
callq 0x12040
cmpl $0xb, (%rax)
sete %al
movb %al, -0x56(%rbp)
movb -0x56(%rbp), %al
movb %al, -0x55(%rbp)
movb -0x55(%rbp), %al
testb $0x1, %al
jne 0x3faf8
cmpl $0x0, -0x34(%rbp)
je 0x3fc22
cmpl $-0x1, -0x24(%rbp)
jne 0x3fc22
callq 0x12040
cmpl $0x73, (%rax)
jne 0x3fc22
movq -0x10(%rbp), %rdi
movl -0x34(%rbp), %edx
xorl %esi, %esi
callq 0x3e4f0
movl %eax, -0x24(%rbp)
cmpl $0x1, -0x24(%rbp)
jge 0x3fbd8
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x3fc28
movl $0x4, -0x48(%rbp)
movq -0x30(%rbp), %rax
movl (%rax), %edi
movl $0x1, %esi
movl $0x4, %edx
leaq -0x44(%rbp), %rcx
leaq -0x48(%rbp), %r8
callq 0x122e0
movl %eax, -0x24(%rbp)
cmpl $0x0, %eax
jge 0x3fc10
callq 0x12040
movl (%rax), %eax
movl %eax, -0x4(%rbp)
jmp 0x3fc28
cmpl $0x0, -0x44(%rbp)
je 0x3fc1e
movl -0x44(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0x3fc28
jmp 0x3fc20
jmp 0x3fc22
movl -0x24(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x60, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
nopl (%rax,%rax)
| pvio_socket_internal_connect:
push rbp
mov rbp, rsp
sub rsp, 60h
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov [rbp+var_20], rdx
mov [rbp+var_24], 0
mov [rbp+var_30], 0
mov [rbp+var_38], 1
xor eax, eax
mov edi, eax
call _time
mov [rbp+var_40], rax
cmp [rbp+var_10], 0
jz short loc_3FAC8
mov rax, [rbp+var_10]
cmp qword ptr [rax], 0
jnz short loc_3FAD4
loc_3FAC8:
mov [rbp+var_4], 1
jmp loc_3FC28
loc_3FAD4:
mov rax, [rbp+var_10]
mov rax, [rax]
mov [rbp+var_30], rax
mov rax, [rbp+var_10]
mov eax, [rax+24h]
mov [rbp+var_34], eax
mov rdi, [rbp+var_10]
xor esi, esi
xor eax, eax
mov edx, eax
call pvio_socket_blocking
loc_3FAF8:
mov rax, [rbp+var_30]
mov edi, [rax]
mov rsi, [rbp+var_18]
mov rax, [rbp+var_20]
mov edx, eax
call _connect
mov [rbp+var_24], eax
xor eax, eax
mov edi, eax
call _time
sub rax, [rbp+var_40]
mov [rbp+var_50], rax
movsxd rax, [rbp+var_34]
mov ecx, 3E8h
cqo
idiv rcx
mov rcx, rax
mov rax, [rbp+var_50]
cmp rax, rcx
jle short loc_3FB3D
jmp short loc_3FBA2
loc_3FB3D:
mov edi, [rbp+var_38]
call _usleep
cmp [rbp+var_38], 0F4240h
jb short loc_3FB58
mov eax, 0F4240h
mov [rbp+var_54], eax
jmp short loc_3FB60
loc_3FB58:
mov eax, [rbp+var_38]
shl eax, 1
mov [rbp+var_54], eax
loc_3FB60:
mov eax, [rbp+var_54]
mov [rbp+var_38], eax
xor eax, eax
cmp [rbp+var_24], 0FFFFFFFFh
mov [rbp+var_55], al
jnz short loc_3FB97
call ___errno_location
mov rcx, rax
mov al, 1
cmp dword ptr [rcx], 4
mov [rbp+var_56], al
jz short loc_3FB91
call ___errno_location
cmp dword ptr [rax], 0Bh
setz al
mov [rbp+var_56], al
loc_3FB91:
mov al, [rbp+var_56]
mov [rbp+var_55], al
loc_3FB97:
mov al, [rbp+var_55]
test al, 1
jnz loc_3FAF8
loc_3FBA2:
cmp [rbp+var_34], 0
jz short loc_3FC22
cmp [rbp+var_24], 0FFFFFFFFh
jnz short loc_3FC22
call ___errno_location
cmp dword ptr [rax], 73h ; 's'
jnz short loc_3FC22
mov rdi, [rbp+var_10]
mov edx, [rbp+var_34]
xor esi, esi
call pvio_socket_wait_io_or_timeout
mov [rbp+var_24], eax
cmp [rbp+var_24], 1
jge short loc_3FBD8
mov [rbp+var_4], 0FFFFFFFFh
jmp short loc_3FC28
loc_3FBD8:
mov [rbp+var_48], 4
mov rax, [rbp+var_30]
mov edi, [rax]
mov esi, 1
mov edx, 4
lea rcx, [rbp+var_44]
lea r8, [rbp+var_48]
call _getsockopt
mov [rbp+var_24], eax
cmp eax, 0
jge short loc_3FC10
call ___errno_location
mov eax, [rax]
mov [rbp+var_4], eax
jmp short loc_3FC28
loc_3FC10:
cmp [rbp+var_44], 0
jz short loc_3FC1E
mov eax, [rbp+var_44]
mov [rbp+var_4], eax
jmp short loc_3FC28
loc_3FC1E:
jmp short $+2
loc_3FC20:
jmp short $+2
loc_3FC22:
mov eax, [rbp+var_24]
mov [rbp+var_4], eax
loc_3FC28:
mov eax, [rbp+var_4]
add rsp, 60h
pop rbp
retn
| long long pvio_socket_internal_connect(int **a1, long long a2, long long a3)
{
long long v3; // rdi
long long v4; // rdi
bool v6; // [rsp+Ah] [rbp-56h]
bool v7; // [rsp+Bh] [rbp-55h]
int v8; // [rsp+Ch] [rbp-54h]
int v9; // [rsp+18h] [rbp-48h] BYREF
unsigned int v10; // [rsp+1Ch] [rbp-44h] BYREF
long long v11; // [rsp+20h] [rbp-40h]
unsigned int v12; // [rsp+28h] [rbp-38h]
signed int v13; // [rsp+2Ch] [rbp-34h]
unsigned int *v14; // [rsp+30h] [rbp-30h]
int v15; // [rsp+3Ch] [rbp-24h]
long long v16; // [rsp+40h] [rbp-20h]
long long v17; // [rsp+48h] [rbp-18h]
int **v18; // [rsp+50h] [rbp-10h]
v18 = a1;
v17 = a2;
v16 = a3;
v15 = 0;
v14 = 0LL;
v12 = 1;
v11 = time(0LL);
if ( a1 && *v18 )
{
v14 = (unsigned int *)*v18;
v13 = *((_DWORD *)v18 + 9);
pvio_socket_blocking((unsigned int **)v18, 0, 0LL);
do
{
v15 = connect(*v14, v17, (unsigned int)v16);
v3 = 0LL;
if ( time(0LL) - v11 > v13 / 1000LL )
break;
v3 = v12;
usleep(v12);
if ( v12 < 0xF4240 )
v8 = 2 * v12;
else
v8 = 1000000;
v12 = v8;
v7 = 0;
if ( v15 == -1 )
{
v6 = 1;
if ( *(_DWORD *)__errno_location(v3) != 4 )
v6 = *(_DWORD *)__errno_location(v3) == 11;
v7 = v6;
}
}
while ( v7 );
if ( v13 && v15 == -1 && *(_DWORD *)__errno_location(v3) == 115 )
{
v15 = pvio_socket_wait_io_or_timeout(v18, 0, v13);
if ( v15 < 1 )
return (unsigned int)-1;
v9 = 4;
v4 = *v14;
v15 = getsockopt(v4, 1LL, 4LL, &v10, &v9);
if ( v15 < 0 )
return *(unsigned int *)__errno_location(v4);
if ( v10 )
return v10;
}
return (unsigned int)v15;
}
return 1;
}
| pvio_socket_internal_connect:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x60
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x18],RSI
MOV qword ptr [RBP + -0x20],RDX
MOV dword ptr [RBP + -0x24],0x0
MOV qword ptr [RBP + -0x30],0x0
MOV dword ptr [RBP + -0x38],0x1
XOR EAX,EAX
MOV EDI,EAX
CALL 0x00112390
MOV qword ptr [RBP + -0x40],RAX
CMP qword ptr [RBP + -0x10],0x0
JZ 0x0013fac8
MOV RAX,qword ptr [RBP + -0x10]
CMP qword ptr [RAX],0x0
JNZ 0x0013fad4
LAB_0013fac8:
MOV dword ptr [RBP + -0x4],0x1
JMP 0x0013fc28
LAB_0013fad4:
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x30],RAX
MOV RAX,qword ptr [RBP + -0x10]
MOV EAX,dword ptr [RAX + 0x24]
MOV dword ptr [RBP + -0x34],EAX
MOV RDI,qword ptr [RBP + -0x10]
XOR ESI,ESI
XOR EAX,EAX
MOV EDX,EAX
CALL 0x0013e640
LAB_0013faf8:
MOV RAX,qword ptr [RBP + -0x30]
MOV EDI,dword ptr [RAX]
MOV RSI,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RBP + -0x20]
MOV EDX,EAX
CALL 0x00112350
MOV dword ptr [RBP + -0x24],EAX
XOR EAX,EAX
MOV EDI,EAX
CALL 0x00112390
SUB RAX,qword ptr [RBP + -0x40]
MOV qword ptr [RBP + -0x50],RAX
MOVSXD RAX,dword ptr [RBP + -0x34]
MOV ECX,0x3e8
CQO
IDIV RCX
MOV RCX,RAX
MOV RAX,qword ptr [RBP + -0x50]
CMP RAX,RCX
JLE 0x0013fb3d
JMP 0x0013fba2
LAB_0013fb3d:
MOV EDI,dword ptr [RBP + -0x38]
CALL 0x001125f0
CMP dword ptr [RBP + -0x38],0xf4240
JC 0x0013fb58
MOV EAX,0xf4240
MOV dword ptr [RBP + -0x54],EAX
JMP 0x0013fb60
LAB_0013fb58:
MOV EAX,dword ptr [RBP + -0x38]
SHL EAX,0x1
MOV dword ptr [RBP + -0x54],EAX
LAB_0013fb60:
MOV EAX,dword ptr [RBP + -0x54]
MOV dword ptr [RBP + -0x38],EAX
XOR EAX,EAX
CMP dword ptr [RBP + -0x24],-0x1
MOV byte ptr [RBP + -0x55],AL
JNZ 0x0013fb97
CALL 0x00112040
MOV RCX,RAX
MOV AL,0x1
CMP dword ptr [RCX],0x4
MOV byte ptr [RBP + -0x56],AL
JZ 0x0013fb91
CALL 0x00112040
CMP dword ptr [RAX],0xb
SETZ AL
MOV byte ptr [RBP + -0x56],AL
LAB_0013fb91:
MOV AL,byte ptr [RBP + -0x56]
MOV byte ptr [RBP + -0x55],AL
LAB_0013fb97:
MOV AL,byte ptr [RBP + -0x55]
TEST AL,0x1
JNZ 0x0013faf8
LAB_0013fba2:
CMP dword ptr [RBP + -0x34],0x0
JZ 0x0013fc22
CMP dword ptr [RBP + -0x24],-0x1
JNZ 0x0013fc22
CALL 0x00112040
CMP dword ptr [RAX],0x73
JNZ 0x0013fc22
MOV RDI,qword ptr [RBP + -0x10]
MOV EDX,dword ptr [RBP + -0x34]
XOR ESI,ESI
CALL 0x0013e4f0
MOV dword ptr [RBP + -0x24],EAX
CMP dword ptr [RBP + -0x24],0x1
JGE 0x0013fbd8
MOV dword ptr [RBP + -0x4],0xffffffff
JMP 0x0013fc28
LAB_0013fbd8:
MOV dword ptr [RBP + -0x48],0x4
MOV RAX,qword ptr [RBP + -0x30]
MOV EDI,dword ptr [RAX]
MOV ESI,0x1
MOV EDX,0x4
LEA RCX,[RBP + -0x44]
LEA R8,[RBP + -0x48]
CALL 0x001122e0
MOV dword ptr [RBP + -0x24],EAX
CMP EAX,0x0
JGE 0x0013fc10
CALL 0x00112040
MOV EAX,dword ptr [RAX]
MOV dword ptr [RBP + -0x4],EAX
JMP 0x0013fc28
LAB_0013fc10:
CMP dword ptr [RBP + -0x44],0x0
JZ 0x0013fc1e
MOV EAX,dword ptr [RBP + -0x44]
MOV dword ptr [RBP + -0x4],EAX
JMP 0x0013fc28
LAB_0013fc1e:
JMP 0x0013fc20
LAB_0013fc20:
JMP 0x0013fc22
LAB_0013fc22:
MOV EAX,dword ptr [RBP + -0x24]
MOV dword ptr [RBP + -0x4],EAX
LAB_0013fc28:
MOV EAX,dword ptr [RBP + -0x4]
ADD RSP,0x60
POP RBP
RET
|
int pvio_socket_internal_connect(long *param_1,sockaddr *param_2,int8 param_3)
{
time_t tVar1;
int *piVar2;
bool bVar3;
__useconds_t local_5c;
socklen_t local_50;
int local_4c;
time_t local_48;
__useconds_t local_40;
int local_3c;
int *local_38;
int local_2c;
int8 local_28;
sockaddr *local_20;
long *local_18;
local_2c = 0;
local_38 = (int *)0x0;
local_40 = 1;
local_28 = param_3;
local_20 = param_2;
local_18 = param_1;
local_48 = time((time_t *)0x0);
if ((local_18 == (long *)0x0) || (*local_18 == 0)) {
return 1;
}
local_38 = (int *)*local_18;
local_3c = *(int *)((long)local_18 + 0x24);
pvio_socket_blocking(local_18,0,0);
do {
local_2c = connect(*local_38,local_20,(socklen_t)local_28);
tVar1 = time((time_t *)0x0);
if ((long)local_3c / 1000 < tVar1 - local_48) break;
usleep(local_40);
if (local_40 < 1000000) {
local_5c = local_40 << 1;
}
else {
local_5c = 1000000;
}
local_40 = local_5c;
bVar3 = false;
if (local_2c == -1) {
piVar2 = __errno_location();
bVar3 = true;
if (*piVar2 != 4) {
piVar2 = __errno_location();
bVar3 = *piVar2 == 0xb;
}
}
} while (bVar3);
if (((local_3c != 0) && (local_2c == -1)) && (piVar2 = __errno_location(), *piVar2 == 0x73)) {
local_2c = pvio_socket_wait_io_or_timeout(local_18,0,local_3c);
if (local_2c < 1) {
return -1;
}
local_50 = 4;
local_2c = getsockopt(*local_38,1,4,&local_4c,&local_50);
if (local_2c < 0) {
piVar2 = __errno_location();
return *piVar2;
}
if (local_4c != 0) {
return local_4c;
}
}
return local_2c;
}
| |
51,889 | ftxui::hcenter(std::shared_ptr<ftxui::Node>) | Andrewchistyakov[P]flashcards_lyc/build_O1/_deps/ftxui-src/src/ftxui/dom/composite_decorator.cpp | Element hcenter(Element child) {
return hbox(filler(), std::move(child), filler());
} | O1 | cpp | ftxui::hcenter(std::shared_ptr<ftxui::Node>):
pushq %r14
pushq %rbx
subq $0x38, %rsp
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x28(%rsp), %rdi
callq 0x237ac
movq (%r14), %rax
movq %rax, 0x8(%rsp)
xorl %eax, %eax
movq %rax, 0x10(%rsp)
movq 0x8(%r14), %rcx
movq %rax, 0x8(%r14)
movq %rcx, 0x10(%rsp)
movq %rax, (%r14)
leaq 0x18(%rsp), %rdi
callq 0x237ac
leaq 0x28(%rsp), %rsi
leaq 0x8(%rsp), %rdx
leaq 0x18(%rsp), %rcx
movq %rbx, %rdi
callq 0x23480
movq 0x20(%rsp), %rdi
testq %rdi, %rdi
je 0x23222
callq 0x14c7c
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0x23231
callq 0x14c7c
movq 0x30(%rsp), %rdi
testq %rdi, %rdi
je 0x23240
callq 0x14c7c
movq %rbx, %rax
addq $0x38, %rsp
popq %rbx
popq %r14
retq
movq %rax, %rbx
movq 0x20(%rsp), %rdi
testq %rdi, %rdi
je 0x23262
callq 0x14c7c
jmp 0x23262
movq %rax, %rbx
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0x23271
callq 0x14c7c
movq 0x30(%rsp), %rdi
testq %rdi, %rdi
je 0x23280
callq 0x14c7c
movq %rbx, %rdi
callq 0xb780
| _ZN5ftxui7hcenterESt10shared_ptrINS_4NodeEE:
push r14
push rbx
sub rsp, 38h
mov r14, rsi
mov rbx, rdi
lea rdi, [rsp+48h+var_20]; this
call _ZN5ftxui6fillerEv; ftxui::filler(void)
mov rax, [r14]
mov [rsp+48h+var_40], rax
xor eax, eax
mov [rsp+48h+var_38], rax
mov rcx, [r14+8]
mov [r14+8], rax
mov [rsp+48h+var_38], rcx
mov [r14], rax
lea rdi, [rsp+48h+var_30]; this
call _ZN5ftxui6fillerEv; ftxui::filler(void)
lea rsi, [rsp+48h+var_20]
lea rdx, [rsp+48h+var_40]
lea rcx, [rsp+48h+var_30]
mov rdi, rbx
call _ZN5ftxui4hboxIJSt10shared_ptrINS_4NodeEES3_S3_EEES3_DpT_; ftxui::hbox<std::shared_ptr<ftxui::Node>,std::shared_ptr<ftxui::Node>,std::shared_ptr<ftxui::Node>>(std::shared_ptr<ftxui::Node>,std::shared_ptr<ftxui::Node>,std::shared_ptr<ftxui::Node>)
mov rdi, [rsp+48h+var_28]
test rdi, rdi
jz short loc_23222
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_23222:
mov rdi, [rsp+48h+var_38]
test rdi, rdi
jz short loc_23231
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_23231:
mov rdi, [rsp+48h+var_18]
test rdi, rdi
jz short loc_23240
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_23240:
mov rax, rbx
add rsp, 38h
pop rbx
pop r14
retn
mov rbx, rax
mov rdi, [rsp+arg_18]
test rdi, rdi
jz short loc_23262
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_23262
mov rbx, rax
loc_23262:
mov rdi, [rsp+arg_8]
test rdi, rdi
jz short loc_23271
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_23271:
mov rdi, [rsp+arg_28]
test rdi, rdi
jz short loc_23280
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_23280:
mov rdi, rbx
call __Unwind_Resume
| long long ftxui::hcenter(long long a1, long long *a2)
{
volatile signed __int32 *v2; // rcx
int v3; // r8d
int v4; // r9d
long long v6; // [rsp+8h] [rbp-40h] BYREF
volatile signed __int32 *v7; // [rsp+10h] [rbp-38h]
_BYTE v8[8]; // [rsp+18h] [rbp-30h] BYREF
volatile signed __int32 *v9; // [rsp+20h] [rbp-28h]
_BYTE v10[8]; // [rsp+28h] [rbp-20h] BYREF
volatile signed __int32 *v11; // [rsp+30h] [rbp-18h]
ftxui::filler((ftxui *)v10);
v6 = *a2;
v7 = 0LL;
v2 = (volatile signed __int32 *)a2[1];
a2[1] = 0LL;
v7 = v2;
*a2 = 0LL;
ftxui::filler((ftxui *)v8);
ftxui::hbox<std::shared_ptr<ftxui::Node>,std::shared_ptr<ftxui::Node>,std::shared_ptr<ftxui::Node>>(
a1,
(unsigned int)v10,
(unsigned int)&v6,
(unsigned int)v8,
v3,
v4);
if ( v9 )
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v9);
if ( v7 )
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v7);
if ( v11 )
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v11);
return a1;
}
| hcenter:
PUSH R14
PUSH RBX
SUB RSP,0x38
MOV R14,RSI
MOV RBX,RDI
LEA RDI,[RSP + 0x28]
CALL 0x001237ac
MOV RAX,qword ptr [R14]
MOV qword ptr [RSP + 0x8],RAX
XOR EAX,EAX
MOV qword ptr [RSP + 0x10],RAX
MOV RCX,qword ptr [R14 + 0x8]
MOV qword ptr [R14 + 0x8],RAX
MOV qword ptr [RSP + 0x10],RCX
MOV qword ptr [R14],RAX
LAB_001231f2:
LEA RDI,[RSP + 0x18]
CALL 0x001237ac
LAB_001231fc:
LEA RSI,[RSP + 0x28]
LEA RDX,[RSP + 0x8]
LEA RCX,[RSP + 0x18]
MOV RDI,RBX
CALL 0x00123480
LAB_00123213:
MOV RDI,qword ptr [RSP + 0x20]
TEST RDI,RDI
JZ 0x00123222
CALL 0x00114c7c
LAB_00123222:
MOV RDI,qword ptr [RSP + 0x10]
TEST RDI,RDI
JZ 0x00123231
CALL 0x00114c7c
LAB_00123231:
MOV RDI,qword ptr [RSP + 0x30]
TEST RDI,RDI
JZ 0x00123240
CALL 0x00114c7c
LAB_00123240:
MOV RAX,RBX
ADD RSP,0x38
POP RBX
POP R14
RET
|
/* ftxui::hcenter(std::shared_ptr<ftxui::Node>) */
ftxui * __thiscall ftxui::hcenter(ftxui *this,int8 *param_2)
{
int8 local_40;
_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *local_38;
ftxui local_30 [8];
_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *local_28;
ftxui local_20 [8];
_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *local_18;
filler(local_20);
local_40 = *param_2;
local_38 = (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)param_2[1];
param_2[1] = 0;
*param_2 = 0;
/* try { // try from 001231f2 to 001231fb has its CatchHandler @ 0012325f */
filler(local_30);
/* try { // try from 001231fc to 00123212 has its CatchHandler @ 0012324b */
hbox<std::shared_ptr<ftxui::Node>,std::shared_ptr<ftxui::Node>,std::shared_ptr<ftxui::Node>>
(this,local_20,&local_40,local_30);
if (local_28 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) {
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(local_28);
}
if (local_38 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) {
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(local_38);
}
if (local_18 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) {
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(local_18);
}
return this;
}
| |
51,890 | js_typed_array_create | bluesky950520[P]quickjs/quickjs.c | static JSValue js_typed_array_create(JSContext *ctx, JSValue ctor,
int argc, JSValue *argv)
{
JSValue ret;
int new_len;
int64_t len;
ret = JS_CallConstructor(ctx, ctor, argc, argv);
if (JS_IsException(ret))
return ret;
/* validate the typed array */
new_len = js_typed_array_get_length_unsafe(ctx, ret);
if (new_len < 0)
goto fail;
if (argc == 1) {
/* ensure that it is large enough */
if (JS_ToLengthFree(ctx, &len, js_dup(argv[0])))
goto fail;
if (new_len < len) {
JS_ThrowTypeError(ctx, "TypedArray length is too small");
fail:
JS_FreeValue(ctx, ret);
return JS_EXCEPTION;
}
}
return ret;
} | O1 | c | js_typed_array_create:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %r8, %r12
movl %ecx, %r13d
movq %rdi, %r15
movq %rsi, %rcx
movq %rdx, %r8
movl %r13d, %r9d
pushq $0x2
pushq %r12
callq 0x2fa61
addq $0x10, %rsp
movq %rax, %r14
movq %rdx, %rbx
cmpl $0x6, %ebx
je 0x781aa
movq %r15, %rdi
movq %r14, %rsi
movq %rbx, %rdx
callq 0x77f2d
testl %eax, %eax
js 0x7818f
cmpl $0x1, %r13d
jne 0x781aa
movl %eax, %ebp
movq (%r12), %r13
movq 0x8(%r12), %r12
movq %r13, 0x8(%rsp)
cmpl $-0x9, %r12d
jb 0x78131
movq 0x8(%rsp), %rax
incl (%rax)
subq $0x8, %rsp
leaq 0x10(%rsp), %rsi
movabsq $0x1fffffffffffff, %r9 # imm = 0x1FFFFFFFFFFFFF
movq %r15, %rdi
movq %r13, %rdx
movq %r12, %rcx
xorl %r8d, %r8d
pushq $0x0
callq 0x27858
addq $0x10, %rsp
movl %eax, 0x14(%rsp)
movq 0x18(%r15), %rdi
movq %r13, %rsi
movq %r12, %rdx
callq 0x1d8c6
cmpl $0x0, 0x14(%rsp)
jne 0x7818f
movl %ebp, %eax
cmpq %rax, 0x8(%rsp)
jle 0x781aa
leaq 0x29c18(%rip), %rsi # 0xa1d9d
movq %r15, %rdi
xorl %eax, %eax
callq 0x22567
movq 0x18(%r15), %rdi
movq %r14, %rsi
movq %rbx, %rdx
callq 0x1d8c6
movl $0x6, %ebx
xorl %r14d, %r14d
xorl %ecx, %ecx
jmp 0x781ba
movabsq $-0x100000000, %rax # imm = 0xFFFFFFFF00000000
movq %r14, %rcx
andq %rax, %rcx
movl %r14d, %eax
orq %rcx, %rax
movq %rbx, %rdx
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| js_typed_array_create:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 18h
mov r12, r8
mov r13d, ecx
mov r15, rdi
mov rcx, rsi
mov r8, rdx
mov r9d, r13d
push 2
push r12
call JS_CallConstructorInternal
add rsp, 10h
mov r14, rax
mov rbx, rdx
cmp ebx, 6
jz loc_781AA
mov rdi, r15
mov rsi, r14
mov rdx, rbx
call js_typed_array_get_length_unsafe
test eax, eax
js loc_7818F
cmp r13d, 1
jnz loc_781AA
mov ebp, eax
mov r13, [r12]
mov r12, [r12+8]
mov [rsp+48h+var_40], r13
cmp r12d, 0FFFFFFF7h
jb short loc_78131
mov rax, [rsp+48h+var_40]
inc dword ptr [rax]
loc_78131:
sub rsp, 8
lea rsi, [rsp+50h+var_40]
mov r9, 1FFFFFFFFFFFFFh
mov rdi, r15
mov rdx, r13
mov rcx, r12
xor r8d, r8d
push 0
call JS_ToInt64Clamp
add rsp, 10h
mov [rsp+48h+var_34], eax
mov rdi, [r15+18h]
mov rsi, r13
mov rdx, r12
call JS_FreeValueRT
cmp [rsp+48h+var_34], 0
jnz short loc_7818F
mov eax, ebp
cmp [rsp+48h+var_40], rax
jle short loc_781AA
lea rsi, aTypedarrayLeng; "TypedArray length is too small"
mov rdi, r15
xor eax, eax
call JS_ThrowTypeError
loc_7818F:
mov rdi, [r15+18h]
mov rsi, r14
mov rdx, rbx
call JS_FreeValueRT
mov ebx, 6
xor r14d, r14d
xor ecx, ecx
jmp short loc_781BA
loc_781AA:
mov rax, 0FFFFFFFF00000000h
mov rcx, r14
and rcx, rax
loc_781BA:
mov eax, r14d
or rax, rcx
mov rdx, rbx
add rsp, 18h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| unsigned long long js_typed_array_create(
long long a1,
unsigned long long a2,
long long a3,
unsigned int a4,
_QWORD *a5,
__m128 a6,
__m128 a7,
__m128 a8,
__m128 a9,
__m128 a10,
__m128 a11,
__m128 a12,
__m128 a13)
{
unsigned long long v15; // rax
long long v16; // rdx
long long v17; // rcx
long long v18; // r8
long long v19; // r9
__m128 v20; // xmm4
__m128 v21; // xmm5
unsigned long long v22; // r14
long long v23; // rbx
int length_unsafe; // eax
unsigned int v25; // ebp
_DWORD *v26; // r13
long long v27; // r12
long long v28; // rdx
long long v29; // rcx
long long v30; // r8
long long v31; // r9
__m128 v32; // xmm4
__m128 v33; // xmm5
unsigned long long v34; // rcx
char v36; // [rsp+0h] [rbp-48h]
_DWORD *v37; // [rsp+8h] [rbp-40h] BYREF
int v38; // [rsp+14h] [rbp-34h]
v15 = JS_CallConstructorInternal(a1, a2, a3, a2, a3, a4, a6, a7, a8, a9, a10, a11, a12, a13, (long long)a5, 2);
v22 = v15;
v23 = v16;
if ( (_DWORD)v16 == 6 )
goto LABEL_10;
length_unsafe = js_typed_array_get_length_unsafe(a1, v15, v16, v17, v18, v19, a6, a7, a8, a9, v20, v21, a12, a13);
if ( length_unsafe >= 0 )
{
if ( a4 == 1 )
{
v25 = length_unsafe;
v26 = (_DWORD *)*a5;
v27 = a5[1];
v37 = v26;
if ( (unsigned int)v27 >= 0xFFFFFFF7 )
++*v37;
v38 = JS_ToInt64Clamp(a1, (unsigned long long *)&v37, v26, v27, 0LL, 0x1FFFFFFFFFFFFFLL, 0LL);
JS_FreeValueRT(*(_QWORD *)(a1 + 24), v26, v27);
if ( v38 )
goto LABEL_9;
if ( (long long)v37 > v25 )
{
JS_ThrowTypeError(
a1,
(long long)"TypedArray length is too small",
v28,
v29,
v30,
v31,
a6,
a7,
a8,
a9,
v32,
v33,
a12,
a13,
v36);
goto LABEL_9;
}
}
LABEL_10:
v34 = v22 & 0xFFFFFFFF00000000LL;
return v34 | (unsigned int)v22;
}
LABEL_9:
JS_FreeValueRT(*(_QWORD *)(a1 + 24), (_DWORD *)v22, v23);
LODWORD(v22) = 0;
v34 = 0LL;
return v34 | (unsigned int)v22;
}
| js_typed_array_create:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x18
MOV R12,R8
MOV R13D,ECX
MOV R15,RDI
MOV RCX,RSI
MOV R8,RDX
MOV R9D,R13D
PUSH 0x2
PUSH R12
CALL 0x0012fa61
ADD RSP,0x10
MOV R14,RAX
MOV RBX,RDX
CMP EBX,0x6
JZ 0x001781aa
MOV RDI,R15
MOV RSI,R14
MOV RDX,RBX
CALL 0x00177f2d
TEST EAX,EAX
JS 0x0017818f
CMP R13D,0x1
JNZ 0x001781aa
MOV EBP,EAX
MOV R13,qword ptr [R12]
MOV R12,qword ptr [R12 + 0x8]
MOV qword ptr [RSP + 0x8],R13
CMP R12D,-0x9
JC 0x00178131
MOV RAX,qword ptr [RSP + 0x8]
INC dword ptr [RAX]
LAB_00178131:
SUB RSP,0x8
LEA RSI,[RSP + 0x10]
MOV R9,0x1fffffffffffff
MOV RDI,R15
MOV RDX,R13
MOV RCX,R12
XOR R8D,R8D
PUSH 0x0
CALL 0x00127858
ADD RSP,0x10
MOV dword ptr [RSP + 0x14],EAX
MOV RDI,qword ptr [R15 + 0x18]
MOV RSI,R13
MOV RDX,R12
CALL 0x0011d8c6
CMP dword ptr [RSP + 0x14],0x0
JNZ 0x0017818f
MOV EAX,EBP
CMP qword ptr [RSP + 0x8],RAX
JLE 0x001781aa
LEA RSI,[0x1a1d9d]
MOV RDI,R15
XOR EAX,EAX
CALL 0x00122567
LAB_0017818f:
MOV RDI,qword ptr [R15 + 0x18]
MOV RSI,R14
MOV RDX,RBX
CALL 0x0011d8c6
MOV EBX,0x6
XOR R14D,R14D
XOR ECX,ECX
JMP 0x001781ba
LAB_001781aa:
MOV RAX,-0x100000000
MOV RCX,R14
AND RCX,RAX
LAB_001781ba:
MOV EAX,R14D
OR RAX,RCX
MOV RDX,RBX
ADD RSP,0x18
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
int1 [16]
js_typed_array_create
(long param_1,int8 param_2,int8 param_3,int param_4,int8 *param_5)
{
int *piVar1;
int8 uVar2;
uint uVar3;
ulong uVar4;
int1 auVar5 [16];
int1 auVar6 [16];
int *local_40;
int local_34;
auVar5 = JS_CallConstructorInternal();
uVar4 = auVar5._0_8_;
if (auVar5._8_4_ == 6) {
LAB_001781aa:
uVar4 = uVar4 & 0xffffffff00000000;
}
else {
uVar3 = js_typed_array_get_length_unsafe(param_1,uVar4,auVar5._8_8_);
if (-1 < (int)uVar3) {
if (param_4 != 1) goto LAB_001781aa;
piVar1 = (int *)*param_5;
uVar2 = param_5[1];
if (0xfffffff6 < (uint)uVar2) {
*piVar1 = *piVar1 + 1;
}
local_40 = piVar1;
local_34 = JS_ToInt64Clamp(param_1,&local_40,piVar1,uVar2,0,0x1fffffffffffff,0);
JS_FreeValueRT(*(int8 *)(param_1 + 0x18),piVar1,uVar2);
if (local_34 == 0) {
if ((long)local_40 <= (long)(ulong)uVar3) goto LAB_001781aa;
JS_ThrowTypeError(param_1,"TypedArray length is too small");
}
}
JS_FreeValueRT(*(int8 *)(param_1 + 0x18),uVar4,auVar5._8_8_);
auVar5 = ZEXT816(6) << 0x40;
uVar4 = 0;
}
auVar6._0_8_ = auVar5._0_8_ & 0xffffffff | uVar4;
auVar6._8_8_ = auVar5._8_8_;
return auVar6;
}
| |
51,891 | js_typed_array_create | bluesky950520[P]quickjs/quickjs.c | static JSValue js_typed_array_create(JSContext *ctx, JSValue ctor,
int argc, JSValue *argv)
{
JSValue ret;
int new_len;
int64_t len;
ret = JS_CallConstructor(ctx, ctor, argc, argv);
if (JS_IsException(ret))
return ret;
/* validate the typed array */
new_len = js_typed_array_get_length_unsafe(ctx, ret);
if (new_len < 0)
goto fail;
if (argc == 1) {
/* ensure that it is large enough */
if (JS_ToLengthFree(ctx, &len, js_dup(argv[0])))
goto fail;
if (new_len < len) {
JS_ThrowTypeError(ctx, "TypedArray length is too small");
fail:
JS_FreeValue(ctx, ret);
return JS_EXCEPTION;
}
}
return ret;
} | O2 | c | js_typed_array_create:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %r8, %r12
movl %ecx, %ebp
movq %rdi, %r15
callq 0x283f2
movq %rax, %r14
movq %rdx, %rbx
cmpl $0x6, %ebx
je 0x6500a
movq %r15, %rdi
movq %r14, %rsi
movq %rbx, %rdx
callq 0x64e60
testl %eax, %eax
js 0x64ff2
cmpl $0x1, %ebp
jne 0x6500a
movl %eax, %r13d
movq (%r12), %rdx
movq 0x8(%r12), %rcx
cmpl $-0x9, %ecx
jb 0x64fc9
incl (%rdx)
movq %rsp, %rsi
movq %r15, %rdi
callq 0x3daf8
testl %eax, %eax
jne 0x64ff2
movl %r13d, %eax
cmpq %rax, (%rsp)
jle 0x6500a
leaq 0x23cef(%rip), %rsi # 0x88cd7
movq %r15, %rdi
xorl %eax, %eax
callq 0x1c64d
movq %r15, %rdi
movq %r14, %rsi
movq %rbx, %rdx
callq 0x1801e
pushq $0x6
popq %rbx
xorl %r14d, %r14d
xorl %ecx, %ecx
jmp 0x6501a
movabsq $-0x100000000, %rax # imm = 0xFFFFFFFF00000000
movq %r14, %rcx
andq %rax, %rcx
movl %r14d, %eax
orq %rcx, %rax
movq %rbx, %rdx
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| js_typed_array_create:
push rbp
push r15
push r14
push r13
push r12
push rbx
push rax
mov r12, r8
mov ebp, ecx
mov r15, rdi
call JS_CallConstructor
mov r14, rax
mov rbx, rdx
cmp ebx, 6
jz short loc_6500A
mov rdi, r15
mov rsi, r14
mov rdx, rbx
call js_typed_array_get_length_unsafe
test eax, eax
js short loc_64FF2
cmp ebp, 1
jnz short loc_6500A
mov r13d, eax
mov rdx, [r12]
mov rcx, [r12+8]
cmp ecx, 0FFFFFFF7h
jb short loc_64FC9
inc dword ptr [rdx]
loc_64FC9:
mov rsi, rsp
mov rdi, r15
call JS_ToLengthFree
test eax, eax
jnz short loc_64FF2
mov eax, r13d
cmp [rsp+38h+var_38], rax
jle short loc_6500A
lea rsi, aTypedarrayLeng; "TypedArray length is too small"
mov rdi, r15
xor eax, eax
call JS_ThrowTypeError
loc_64FF2:
mov rdi, r15
mov rsi, r14
mov rdx, rbx
call JS_FreeValue
push 6
pop rbx
xor r14d, r14d
xor ecx, ecx
jmp short loc_6501A
loc_6500A:
mov rax, 0FFFFFFFF00000000h
mov rcx, r14
and rcx, rax
loc_6501A:
mov eax, r14d
or rax, rcx
mov rdx, rbx
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| unsigned long long js_typed_array_create(
long long a1,
unsigned long long a2,
unsigned long long a3,
unsigned int a4,
_QWORD *a5,
__m128 a6,
__m128 a7,
__m128 a8,
__m128 a9,
double a10,
double a11,
__m128 a12,
__m128 a13)
{
long long v13; // rax
unsigned long long v16; // rax
long long v17; // rdx
long long v18; // rcx
long long v19; // r8
long long v20; // r9
__m128 v21; // xmm4
__m128 v22; // xmm5
long long v23; // r14
long long v24; // rbx
int length_unsafe; // eax
unsigned int v26; // r13d
_DWORD *v27; // rdx
long long v28; // rcx
long long v29; // rdx
long long v30; // rcx
long long v31; // r8
long long v32; // r9
__m128 v33; // xmm4
__m128 v34; // xmm5
unsigned long long v35; // rcx
unsigned long long v37[7]; // [rsp+0h] [rbp-38h] BYREF
v37[0] = v13;
v16 = JS_CallConstructor(a1, a2, a3, a4, (long long)a5, a6, a7, a8, a9, a10, a11, a12, a13);
v23 = v16;
v24 = v17;
if ( (_DWORD)v17 == 6 )
goto LABEL_10;
length_unsafe = js_typed_array_get_length_unsafe(a1, v16, v17, v18, v19, v20, a6, a7, a8, a9, v21, v22, a12, a13);
if ( length_unsafe >= 0 )
{
if ( a4 == 1 )
{
v26 = length_unsafe;
v27 = (_DWORD *)*a5;
v28 = a5[1];
if ( (unsigned int)v28 >= 0xFFFFFFF7 )
++*v27;
if ( (unsigned int)JS_ToLengthFree(a1, v37, v27, v28) )
goto LABEL_9;
if ( (long long)v37[0] > v26 )
{
JS_ThrowTypeError(
a1,
(long long)"TypedArray length is too small",
v29,
v30,
v31,
v32,
a6,
a7,
a8,
a9,
v33,
v34,
a12,
a13,
v37[0]);
goto LABEL_9;
}
}
LABEL_10:
v35 = v23 & 0xFFFFFFFF00000000LL;
return v35 | (unsigned int)v23;
}
LABEL_9:
JS_FreeValue(a1, v23, v24);
LODWORD(v23) = 0;
v35 = 0LL;
return v35 | (unsigned int)v23;
}
| js_typed_array_create:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
PUSH RAX
MOV R12,R8
MOV EBP,ECX
MOV R15,RDI
CALL 0x001283f2
MOV R14,RAX
MOV RBX,RDX
CMP EBX,0x6
JZ 0x0016500a
MOV RDI,R15
MOV RSI,R14
MOV RDX,RBX
CALL 0x00164e60
TEST EAX,EAX
JS 0x00164ff2
CMP EBP,0x1
JNZ 0x0016500a
MOV R13D,EAX
MOV RDX,qword ptr [R12]
MOV RCX,qword ptr [R12 + 0x8]
CMP ECX,-0x9
JC 0x00164fc9
INC dword ptr [RDX]
LAB_00164fc9:
MOV RSI,RSP
MOV RDI,R15
CALL 0x0013daf8
TEST EAX,EAX
JNZ 0x00164ff2
MOV EAX,R13D
CMP qword ptr [RSP],RAX
JLE 0x0016500a
LEA RSI,[0x188cd7]
MOV RDI,R15
XOR EAX,EAX
CALL 0x0011c64d
LAB_00164ff2:
MOV RDI,R15
MOV RSI,R14
MOV RDX,RBX
CALL 0x0011801e
PUSH 0x6
POP RBX
XOR R14D,R14D
XOR ECX,ECX
JMP 0x0016501a
LAB_0016500a:
MOV RAX,-0x100000000
MOV RCX,R14
AND RCX,RAX
LAB_0016501a:
MOV EAX,R14D
OR RAX,RCX
MOV RDX,RBX
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
int1 [16]
js_typed_array_create
(int8 param_1,int8 param_2,int8 param_3,int param_4,int8 *param_5)
{
uint uVar1;
int iVar2;
long in_RAX;
ulong uVar3;
int1 auVar4 [16];
int1 auVar5 [16];
long local_38;
local_38 = in_RAX;
auVar4 = JS_CallConstructor();
uVar3 = auVar4._0_8_;
if (auVar4._8_4_ == 6) {
LAB_0016500a:
uVar3 = uVar3 & 0xffffffff00000000;
}
else {
uVar1 = js_typed_array_get_length_unsafe(param_1,uVar3,auVar4._8_8_);
if (-1 < (int)uVar1) {
if (param_4 != 1) goto LAB_0016500a;
if (0xfffffff6 < (uint)param_5[1]) {
*(int *)*param_5 = *(int *)*param_5 + 1;
}
iVar2 = JS_ToLengthFree(param_1,&local_38);
if (iVar2 == 0) {
if (local_38 <= (long)(ulong)uVar1) goto LAB_0016500a;
JS_ThrowTypeError(param_1,"TypedArray length is too small");
}
}
JS_FreeValue(param_1,uVar3,auVar4._8_8_);
auVar4 = ZEXT816(6) << 0x40;
uVar3 = 0;
}
auVar5._0_8_ = auVar4._0_8_ & 0xffffffff | uVar3;
auVar5._8_8_ = auVar4._8_8_;
return auVar5;
}
| |
51,892 | my_message_stderr | eloqsql/mysys/my_mess.c | void my_message_stderr(uint error __attribute__((unused)),
const char *str, myf MyFlags)
{
DBUG_ENTER("my_message_stderr");
DBUG_PRINT("enter",("message: %s",str));
(void) fflush(stdout);
if (MyFlags & (ME_NOTE | ME_ERROR_LOG_ONLY))
DBUG_VOID_RETURN;
if (MyFlags & ME_BELL)
(void) fputc('\007', stderr);
if (my_progname)
{
(void)fputs(my_progname,stderr); (void)fputs(": ",stderr);
}
(void)fputs(str,stderr);
(void)fputc('\n',stderr);
(void)fflush(stderr);
DBUG_VOID_RETURN;
} | O3 | c | my_message_stderr:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rdx, %r14
movq %rsi, %rbx
movq 0x2c8cec(%rip), %rax # 0x2eefb0
movq (%rax), %rdi
callq 0x243c0
testl $0x480, %r14d # imm = 0x480
je 0x262da
popq %rbx
popq %r14
popq %rbp
retq
testb $0x4, %r14b
je 0x262f4
movq 0x2c8cf1(%rip), %rax # 0x2eefd8
movq (%rax), %rsi
movl $0x7, %edi
callq 0x24430
leaq 0x33f9c5(%rip), %rax # 0x365cc0
movq (%rax), %rdi
testq %rdi, %rdi
je 0x26308
callq 0x24660
movq 0x2c8cc9(%rip), %r14 # 0x2eefd8
movq (%r14), %rsi
movq %rbx, %rdi
callq 0x24390
movq (%r14), %rsi
movl $0xa, %edi
callq 0x24430
movq (%r14), %rdi
popq %rbx
popq %r14
popq %rbp
jmp 0x243c0
nop
| my_message_stderr:
push rbp
mov rbp, rsp
push r14
push rbx
mov r14, rdx
mov rbx, rsi
mov rax, cs:stdout_ptr
mov rdi, [rax]
call _fflush
test r14d, 480h
jz short loc_262DA
pop rbx
pop r14
pop rbp
retn
loc_262DA:
test r14b, 4
jz short loc_262F4
mov rax, cs:stderr_ptr
mov rsi, [rax]
mov edi, 7
call _fputc
loc_262F4:
lea rax, my_progname
mov rdi, [rax]
test rdi, rdi
jz short loc_26308
call my_message_stderr_cold_1
loc_26308:
mov r14, cs:stderr_ptr
mov rsi, [r14]
mov rdi, rbx
call _fputs
mov rsi, [r14]
mov edi, 0Ah
call _fputc
mov rdi, [r14]
pop rbx
pop r14
pop rbp
jmp _fflush
| long long my_message_stderr(long long a1, long long a2, __int16 a3)
{
long long result; // rax
result = fflush(stdout);
if ( (a3 & 0x480) == 0 )
{
if ( (a3 & 4) != 0 )
fputc(7LL, stderr);
if ( my_progname )
my_message_stderr_cold_1(my_progname);
fputs(a2, stderr);
fputc(10LL, stderr);
return fflush(stderr);
}
return result;
}
| my_message_stderr:
PUSH RBP
MOV RBP,RSP
PUSH R14
PUSH RBX
MOV R14,RDX
MOV RBX,RSI
MOV RAX,qword ptr [0x003eefb0]
MOV RDI,qword ptr [RAX]
CALL 0x001243c0
TEST R14D,0x480
JZ 0x001262da
POP RBX
POP R14
POP RBP
RET
LAB_001262da:
TEST R14B,0x4
JZ 0x001262f4
MOV RAX,qword ptr [0x003eefd8]
MOV RSI,qword ptr [RAX]
MOV EDI,0x7
CALL 0x00124430
LAB_001262f4:
LEA RAX,[0x465cc0]
MOV RDI,qword ptr [RAX]
TEST RDI,RDI
JZ 0x00126308
CALL 0x00124660
LAB_00126308:
MOV R14,qword ptr [0x003eefd8]
MOV RSI,qword ptr [R14]
MOV RDI,RBX
CALL 0x00124390
MOV RSI,qword ptr [R14]
MOV EDI,0xa
CALL 0x00124430
MOV RDI,qword ptr [R14]
POP RBX
POP R14
POP RBP
JMP 0x001243c0
|
void my_message_stderr(int8 param_1,char *param_2,ulong param_3)
{
int *puVar1;
fflush(*(FILE **)PTR_stdout_003eefb0);
if ((param_3 & 0x480) != 0) {
return;
}
if ((param_3 & 4) != 0) {
fputc(7,*(FILE **)PTR_stderr_003eefd8);
}
if (my_progname != 0) {
my_message_stderr_cold_1();
}
puVar1 = PTR_stderr_003eefd8;
fputs(param_2,*(FILE **)PTR_stderr_003eefd8);
fputc(10,*(FILE **)puVar1);
fflush(*(FILE **)puVar1);
return;
}
| |
51,893 | fmt::v10::detail::fwrite_fully(void const*, unsigned long, _IO_FILE*) | AlayaLite/build_O0/_deps/spdlog-src/include/spdlog/fmt/bundled/format-inl.h | inline void fwrite_fully(const void* ptr, size_t count, FILE* stream) {
size_t written = std::fwrite(ptr, 1, count, stream);
if (written < count)
FMT_THROW(system_error(errno, FMT_STRING("cannot write to file")));
} | O0 | c | fmt::v10::detail::fwrite_fully(void const*, unsigned long, _IO_FILE*):
subq $0x58, %rsp
movq %rdi, 0x50(%rsp)
movq %rsi, 0x48(%rsp)
movq %rdx, 0x40(%rsp)
movq 0x50(%rsp), %rdi
movq 0x48(%rsp), %rdx
movq 0x40(%rsp), %rcx
movl $0x1, %esi
callq 0x14dd0
movq %rax, 0x38(%rsp)
movq 0x38(%rsp), %rax
cmpq 0x48(%rsp), %rax
jae 0x89725
movl $0x20, %edi
callq 0x14300
movq %rax, 0x10(%rsp)
movq %rax, 0x8(%rsp)
callq 0x14050
movq 0x10(%rsp), %rdi
movl (%rax), %esi
leaq 0x86926(%rip), %rax # 0x10fffa
movq %rax, 0x28(%rsp)
movq $0x14, 0x30(%rsp)
movq 0x28(%rsp), %rdx
movq 0x30(%rsp), %rcx
callq 0x8cc90
jmp 0x896f3
movq 0x8(%rsp), %rdi
movq 0xee821(%rip), %rsi # 0x177f20
movq 0xee862(%rip), %rdx # 0x177f68
callq 0x14c30
movq 0x8(%rsp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x20(%rsp)
movl %eax, 0x1c(%rsp)
callq 0x144b0
jmp 0x8972a
addq $0x58, %rsp
retq
movq 0x20(%rsp), %rdi
callq 0x14c80
nopw %cs:(%rax,%rax)
nop
| _ZN3fmt3v106detail12fwrite_fullyEPKvmP8_IO_FILE:
sub rsp, 58h
mov [rsp+58h+var_8], rdi
mov [rsp+58h+var_10], rsi
mov [rsp+58h+var_18], rdx
mov rdi, [rsp+58h+var_8]
mov rdx, [rsp+58h+var_10]
mov rcx, [rsp+58h+var_18]
mov esi, 1
call _fwrite
mov [rsp+58h+var_20], rax
mov rax, [rsp+58h+var_20]
cmp rax, [rsp+58h+var_10]
jnb short loc_89725
mov edi, 20h ; ' '; thrown_size
call ___cxa_allocate_exception
mov [rsp+58h+var_48], rax
mov [rsp+58h+var_50], rax
call ___errno_location
mov rdi, [rsp+58h+var_48]
mov esi, [rax]
lea rax, aCannotWriteToF; "cannot write to file"
mov [rsp+58h+var_30], rax
mov [rsp+58h+var_28], 14h
mov rdx, [rsp+58h+var_30]
mov rcx, [rsp+58h+var_28]
call _ZN3fmt3v1012system_errorIJEEESt12system_erroriNS0_19basic_format_stringIcJDpNS0_13type_identityIT_E4typeEEEEDpOS5_
jmp short $+2
loc_896F3:
mov rdi, [rsp+58h+var_50]; void *
mov rsi, cs:_ZTISt12system_error_ptr; lptinfo
mov rdx, cs:_ZNSt12system_errorD1Ev_ptr; void (*)(void *)
call ___cxa_throw
mov rdi, [rsp+58h+var_50]; void *
mov rcx, rax
mov eax, edx
mov [rsp+58h+var_38], rcx
mov [rsp+58h+var_3C], eax
call ___cxa_free_exception
jmp short loc_8972A
loc_89725:
add rsp, 58h
retn
loc_8972A:
mov rdi, [rsp+58h+var_38]
call __Unwind_Resume
| unsigned long long fmt::v10::detail::fwrite_fully(long long a1, unsigned long long a2, long long a3)
{
unsigned long long result; // rax
unsigned int *v4; // rax
void *exception; // [rsp+8h] [rbp-50h]
result = fwrite(a1, 1LL, a2, a3);
if ( result < a2 )
{
exception = __cxa_allocate_exception(0x20uLL);
v4 = (unsigned int *)__errno_location();
fmt::v10::system_error<>(exception, *v4, "cannot write to file", 20LL);
__cxa_throw(
exception,
(struct type_info *)&`typeinfo for'std::system_error,
(void (*)(void *))&std::system_error::~system_error);
}
return result;
}
| fwrite_fully:
SUB RSP,0x58
MOV qword ptr [RSP + 0x50],RDI
MOV qword ptr [RSP + 0x48],RSI
MOV qword ptr [RSP + 0x40],RDX
MOV RDI,qword ptr [RSP + 0x50]
MOV RDX,qword ptr [RSP + 0x48]
MOV RCX,qword ptr [RSP + 0x40]
MOV ESI,0x1
CALL 0x00114dd0
MOV qword ptr [RSP + 0x38],RAX
MOV RAX,qword ptr [RSP + 0x38]
CMP RAX,qword ptr [RSP + 0x48]
JNC 0x00189725
MOV EDI,0x20
CALL 0x00114300
MOV qword ptr [RSP + 0x10],RAX
MOV qword ptr [RSP + 0x8],RAX
CALL 0x00114050
MOV RDI,qword ptr [RSP + 0x10]
MOV ESI,dword ptr [RAX]
LEA RAX,[0x20fffa]
MOV qword ptr [RSP + 0x28],RAX
MOV qword ptr [RSP + 0x30],0x14
MOV RDX,qword ptr [RSP + 0x28]
MOV RCX,qword ptr [RSP + 0x30]
LAB_001896ec:
CALL 0x0018cc90
LAB_001896f1:
JMP 0x001896f3
LAB_001896f3:
MOV RDI,qword ptr [RSP + 0x8]
MOV RSI,qword ptr [0x00277f20]
MOV RDX,qword ptr [0x00277f68]
CALL 0x00114c30
LAB_00189725:
ADD RSP,0x58
RET
|
/* fmt::v10::detail::fwrite_fully(void const*, unsigned long, _IO_FILE*) */
void fmt::v10::detail::fwrite_fully(void *param_1,ulong param_2,_IO_FILE *param_3)
{
size_t sVar1;
int8 uVar2;
int *piVar3;
sVar1 = fwrite(param_1,1,param_2,param_3);
if (sVar1 < param_2) {
uVar2 = __cxa_allocate_exception(0x20);
piVar3 = __errno_location();
/* try { // try from 001896ec to 001896f0 has its CatchHandler @ 0018970b */
system_error<>(uVar2,*piVar3,"cannot write to file",0x14);
/* WARNING: Subroutine does not return */
__cxa_throw(uVar2,PTR_typeinfo_00277f20,PTR__system_error_00277f68);
}
return;
}
| |
51,894 | my_connect_async | eloqsql/libmariadb/libmariadb/mariadb_async.c | int
my_connect_async(MARIADB_PVIO *pvio,
const struct sockaddr *name, uint namelen, int vio_timeout)
{
int res;
size_socket s_err_size;
struct mysql_async_context *b= pvio->mysql->options.extension->async_context;
my_socket sock;
ma_pvio_get_handle(pvio, &sock);
/* Make the socket non-blocking. */
ma_pvio_blocking(pvio, 0, 0);
b->events_to_wait_for= 0;
/*
Start to connect asynchronously.
If this will block, we suspend the call and return control to the
application context. The application will then resume us when the socket
polls ready for write, indicating that the connection attempt completed.
*/
res= connect(sock, name, namelen);
if (res != 0)
{
#ifdef _WIN32
int wsa_err= WSAGetLastError();
if (wsa_err != WSAEWOULDBLOCK)
return res;
b->events_to_wait_for|= MYSQL_WAIT_EXCEPT;
#else
int err= errno;
if (err != EINPROGRESS && err != EALREADY && err != EAGAIN)
return res;
#endif
b->events_to_wait_for|= MYSQL_WAIT_WRITE;
if (vio_timeout >= 0)
{
b->timeout_value= vio_timeout;
b->events_to_wait_for|= MYSQL_WAIT_TIMEOUT;
}
else
b->timeout_value= 0;
if (b->suspend_resume_hook)
(*b->suspend_resume_hook)(TRUE, b->suspend_resume_hook_user_data);
my_context_yield(&b->async_context);
if (b->suspend_resume_hook)
(*b->suspend_resume_hook)(FALSE, b->suspend_resume_hook_user_data);
if (b->events_occurred & MYSQL_WAIT_TIMEOUT)
return -1;
s_err_size= sizeof(res);
if (getsockopt(sock, SOL_SOCKET, SO_ERROR, (char*) &res, &s_err_size) != 0)
return -1;
if (res)
{
errno= res;
return -1;
}
}
return res;
} | O3 | c | my_connect_async:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movl %ecx, -0x30(%rbp)
movl %edx, %ebx
movq %rsi, %r12
movq %rdi, %r13
movq 0x40(%rdi), %rax
movq 0x480(%rax), %rax
movq 0x28(%rax), %r14
leaq -0x34(%rbp), %r15
movq %r15, %rsi
callq 0x227eb
movq %r13, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x22518
movl $0x0, (%r14)
movl (%r15), %edi
xorl %r15d, %r15d
movq %r12, %rsi
movl %ebx, %edx
callq 0x133a0
movl %eax, -0x2c(%rbp)
testl %eax, %eax
je 0x2dc45
movl %eax, %r12d
callq 0x13060
movq %rax, %rbx
movl (%rax), %eax
leal -0x72(%rax), %ecx
cmpl $0x2, %ecx
jb 0x2dbb8
movl %r12d, %r15d
cmpl $0xb, %eax
jne 0x2dc45
xorl %eax, %eax
xorl %ecx, %ecx
movl -0x30(%rbp), %edx
testl %edx, %edx
setns %cl
cmovnsl %edx, %eax
shll $0x3, %ecx
orl (%r14), %ecx
orl $0x2, %ecx
movl %ecx, (%r14)
movl %eax, 0x10(%r14)
movq 0x20(%r14), %rax
testq %rax, %rax
je 0x2dbeb
movq 0x28(%r14), %rsi
movl $0x1, %edi
callq *%rax
leaq 0x38(%r14), %rdi
callq 0x32a99
movq 0x20(%r14), %rax
testq %rax, %rax
je 0x2dc05
movq 0x28(%r14), %rsi
xorl %edi, %edi
callq *%rax
movl $0xffffffff, %r15d # imm = 0xFFFFFFFF
testb $0x8, 0x4(%r14)
jne 0x2dc45
leaq -0x38(%rbp), %r8
movl $0x4, (%r8)
movl -0x34(%rbp), %edi
leaq -0x2c(%rbp), %rcx
movl $0x1, %esi
movl $0x4, %edx
callq 0x13320
testl %eax, %eax
jne 0x2dc45
movl -0x2c(%rbp), %eax
testl %eax, %eax
je 0x2dc42
movl %eax, (%rbx)
jmp 0x2dc45
xorl %r15d, %r15d
movl %r15d, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| my_connect_async:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 18h
mov [rbp+var_30], ecx
mov ebx, edx
mov r12, rsi
mov r13, rdi
mov rax, [rdi+40h]
mov rax, [rax+480h]
mov r14, [rax+28h]
lea r15, [rbp+var_34]
mov rsi, r15
call ma_pvio_get_handle
mov rdi, r13
xor esi, esi
xor edx, edx
call ma_pvio_blocking
mov dword ptr [r14], 0
mov edi, [r15]
xor r15d, r15d
mov rsi, r12
mov edx, ebx
call _connect
mov [rbp+var_2C], eax
test eax, eax
jz loc_2DC45
mov r12d, eax
call ___errno_location
mov rbx, rax
mov eax, [rax]
lea ecx, [rax-72h]
cmp ecx, 2
jb short loc_2DBB8
mov r15d, r12d
cmp eax, 0Bh
jnz loc_2DC45
loc_2DBB8:
xor eax, eax
xor ecx, ecx
mov edx, [rbp+var_30]
test edx, edx
setns cl
cmovns eax, edx
shl ecx, 3
or ecx, [r14]
or ecx, 2
mov [r14], ecx
mov [r14+10h], eax
mov rax, [r14+20h]
test rax, rax
jz short loc_2DBEB
mov rsi, [r14+28h]
mov edi, 1
call rax
loc_2DBEB:
lea rdi, [r14+38h]
call my_context_yield
mov rax, [r14+20h]
test rax, rax
jz short loc_2DC05
mov rsi, [r14+28h]
xor edi, edi
call rax
loc_2DC05:
mov r15d, 0FFFFFFFFh
test byte ptr [r14+4], 8
jnz short loc_2DC45
lea r8, [rbp+var_38]
mov dword ptr [r8], 4
mov edi, [rbp+var_34]
lea rcx, [rbp+var_2C]
mov esi, 1
mov edx, 4
call _getsockopt
test eax, eax
jnz short loc_2DC45
mov eax, [rbp+var_2C]
test eax, eax
jz short loc_2DC42
mov [rbx], eax
jmp short loc_2DC45
loc_2DC42:
xor r15d, r15d
loc_2DC45:
mov eax, r15d
add rsp, 18h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| long long my_connect_async(long long a1, long long a2, unsigned int a3, int a4)
{
long long v5; // r14
unsigned int v6; // r15d
unsigned int v7; // eax
unsigned int v8; // r12d
unsigned int *v9; // rbx
int v10; // eax
void ( *v11)(long long, _QWORD); // rax
void ( *v12)(_QWORD, _QWORD); // rax
int v14; // [rsp+8h] [rbp-38h] BYREF
unsigned int v15; // [rsp+Ch] [rbp-34h]
int v16; // [rsp+10h] [rbp-30h]
unsigned int v17[11]; // [rsp+14h] [rbp-2Ch] BYREF
v16 = a4;
v5 = *(_QWORD *)(*(_QWORD *)(*(_QWORD *)(a1 + 64) + 1152LL) + 40LL);
ma_pvio_get_handle(a1);
ma_pvio_blocking(a1, 0);
*(_DWORD *)v5 = 0;
v6 = 0;
v7 = connect(v15, a2, a3);
v17[0] = v7;
if ( v7 )
{
v8 = v7;
v9 = (unsigned int *)__errno_location(v15);
if ( *v9 - 114 < 2 || (v6 = v8, *v9 == 11) )
{
v10 = 0;
if ( v16 >= 0 )
v10 = v16;
*(_DWORD *)v5 |= (8 * (v16 >= 0)) | 2;
*(_DWORD *)(v5 + 16) = v10;
v11 = *(void ( **)(long long, _QWORD))(v5 + 32);
if ( v11 )
v11(1LL, *(_QWORD *)(v5 + 40));
my_context_yield(v5 + 56);
v12 = *(void ( **)(_QWORD, _QWORD))(v5 + 32);
if ( v12 )
v12(0LL, *(_QWORD *)(v5 + 40));
v6 = -1;
if ( (*(_BYTE *)(v5 + 4) & 8) == 0 )
{
v14 = 4;
if ( !(unsigned int)getsockopt(v15, 1LL, 4LL, v17, &v14) )
{
if ( v17[0] )
*v9 = v17[0];
else
return 0;
}
}
}
}
return v6;
}
| my_connect_async:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x18
MOV dword ptr [RBP + -0x30],ECX
MOV EBX,EDX
MOV R12,RSI
MOV R13,RDI
MOV RAX,qword ptr [RDI + 0x40]
MOV RAX,qword ptr [RAX + 0x480]
MOV R14,qword ptr [RAX + 0x28]
LEA R15,[RBP + -0x34]
MOV RSI,R15
CALL 0x001227eb
MOV RDI,R13
XOR ESI,ESI
XOR EDX,EDX
CALL 0x00122518
MOV dword ptr [R14],0x0
MOV EDI,dword ptr [R15]
XOR R15D,R15D
MOV RSI,R12
MOV EDX,EBX
CALL 0x001133a0
MOV dword ptr [RBP + -0x2c],EAX
TEST EAX,EAX
JZ 0x0012dc45
MOV R12D,EAX
CALL 0x00113060
MOV RBX,RAX
MOV EAX,dword ptr [RAX]
LEA ECX,[RAX + -0x72]
CMP ECX,0x2
JC 0x0012dbb8
MOV R15D,R12D
CMP EAX,0xb
JNZ 0x0012dc45
LAB_0012dbb8:
XOR EAX,EAX
XOR ECX,ECX
MOV EDX,dword ptr [RBP + -0x30]
TEST EDX,EDX
SETNS CL
CMOVNS EAX,EDX
SHL ECX,0x3
OR ECX,dword ptr [R14]
OR ECX,0x2
MOV dword ptr [R14],ECX
MOV dword ptr [R14 + 0x10],EAX
MOV RAX,qword ptr [R14 + 0x20]
TEST RAX,RAX
JZ 0x0012dbeb
MOV RSI,qword ptr [R14 + 0x28]
MOV EDI,0x1
CALL RAX
LAB_0012dbeb:
LEA RDI,[R14 + 0x38]
CALL 0x00132a99
MOV RAX,qword ptr [R14 + 0x20]
TEST RAX,RAX
JZ 0x0012dc05
MOV RSI,qword ptr [R14 + 0x28]
XOR EDI,EDI
CALL RAX
LAB_0012dc05:
MOV R15D,0xffffffff
TEST byte ptr [R14 + 0x4],0x8
JNZ 0x0012dc45
LEA R8,[RBP + -0x38]
MOV dword ptr [R8],0x4
MOV EDI,dword ptr [RBP + -0x34]
LEA RCX,[RBP + -0x2c]
MOV ESI,0x1
MOV EDX,0x4
CALL 0x00113320
TEST EAX,EAX
JNZ 0x0012dc45
MOV EAX,dword ptr [RBP + -0x2c]
TEST EAX,EAX
JZ 0x0012dc42
MOV dword ptr [RBX],EAX
JMP 0x0012dc45
LAB_0012dc42:
XOR R15D,R15D
LAB_0012dc45:
MOV EAX,R15D
ADD RSP,0x18
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
int my_connect_async(long param_1,sockaddr *param_2,socklen_t param_3,uint param_4)
{
uint *puVar1;
int iVar2;
uint uVar3;
int *piVar4;
int iVar5;
socklen_t local_40;
int local_3c;
uint local_38;
int local_34;
puVar1 = *(uint **)(*(long *)(*(long *)(param_1 + 0x40) + 0x480) + 0x28);
local_38 = param_4;
ma_pvio_get_handle(param_1,&local_3c);
ma_pvio_blocking(param_1,0,0);
*puVar1 = 0;
iVar2 = connect(local_3c,param_2,param_3);
iVar5 = 0;
if (iVar2 != 0) {
local_34 = iVar2;
piVar4 = __errno_location();
if ((*piVar4 - 0x72U < 2) || (iVar5 = iVar2, *piVar4 == 0xb)) {
uVar3 = 0;
if (-1 < (int)local_38) {
uVar3 = local_38;
}
*puVar1 = (uint)(-1 < (int)local_38) << 3 | *puVar1 | 2;
puVar1[4] = uVar3;
if (*(code **)(puVar1 + 8) != (code *)0x0) {
(**(code **)(puVar1 + 8))(1,*(int8 *)(puVar1 + 10));
}
my_context_yield(puVar1 + 0xe);
if (*(code **)(puVar1 + 8) != (code *)0x0) {
(**(code **)(puVar1 + 8))(0,*(int8 *)(puVar1 + 10));
}
iVar5 = -1;
if ((puVar1[1] & 8) == 0) {
local_40 = 4;
iVar2 = getsockopt(local_3c,1,4,&local_34,&local_40);
if (iVar2 == 0) {
if (local_34 == 0) {
iVar5 = 0;
}
else {
*piVar4 = local_34;
}
}
}
}
}
return iVar5;
}
| |
51,895 | project::run_lua_script(char const*) | untodesu[P]riteg/riteg/project.cc | void project::run_lua_script(const char *filename)
{
assert(s_lua_state != nullptr);
assert(filename != nullptr);
if(luaL_dofile(s_lua_state, filename) != LUA_OK) {
riteg_fatal << "Lua error: " << lua_tostring(s_lua_state, -1) << std::endl;
std::terminate();
}
} | O2 | cpp | project::run_lua_script(char const*):
pushq %r14
pushq %rbx
subq $0x78, %rsp
movq %rdi, %rsi
movq 0x8956d(%rip), %rdi # 0x9b600
testq %rdi, %rdi
je 0x121be
testq %rsi, %rsi
je 0x121dd
xorl %edx, %edx
callq 0x2a1d7
testl %eax, %eax
jne 0x120d5
movq 0x89549(%rip), %rdi # 0x9b600
pushq $-0x1
popq %rdx
xorl %esi, %esi
xorl %ecx, %ecx
xorl %r8d, %r8d
xorl %r9d, %r9d
callq 0x288fe
testl %eax, %eax
jne 0x120d5
addq $0x78, %rsp
popq %rbx
popq %r14
retq
movq 0x87f14(%rip), %rdi # 0x99ff0
leaq 0x4304a(%rip), %rsi # 0x5512d
callq 0xb840
movq %rax, %rbx
leaq 0x435ee(%rip), %rsi # 0x556e0
leaq 0x50(%rsp), %r14
pushq $0x2
popq %rdx
movq %r14, %rdi
callq 0xc800
leaq 0x28(%rsp), %rdi
movq %r14, %rsi
callq 0xc86c
leaq 0x8(%rsp), %rdi
leaq 0x28(%rsp), %rsi
callq 0xc8de
leaq 0x8(%rsp), %rsi
movq %rbx, %rdi
callq 0xb740
leaq 0x6a289(%rip), %rsi # 0x7c3bb
movq %rax, %rdi
callq 0xb840
movq %rax, %rdi
movl $0xdf, %esi
callq 0xbe70
leaq 0x42fe1(%rip), %rsi # 0x5512f
movq %rax, %rdi
callq 0xb840
leaq 0x42fd6(%rip), %rsi # 0x55133
movq %rax, %rdi
callq 0xb840
leaq 0x436b7(%rip), %rsi # 0x55823
movq %rax, %rdi
callq 0xb840
movq %rax, %rbx
movq 0x89482(%rip), %rdi # 0x9b600
pushq $-0x1
popq %rsi
xorl %edx, %edx
callq 0x27cb4
movq %rbx, %rdi
movq %rax, %rsi
callq 0xb840
movq %rax, %rdi
callq 0xb3c0
leaq 0x8(%rsp), %rdi
callq 0xb380
leaq 0x28(%rsp), %rdi
callq 0xc8fa
leaq 0x50(%rsp), %rdi
callq 0xc8fa
callq 0xb1d0
leaq 0x43504(%rip), %rdi # 0x556c9
leaq 0x43514(%rip), %rsi # 0x556e0
leaq 0x43611(%rip), %rcx # 0x557e4
movl $0xda, %edx
callq 0xb510
leaq 0x4362b(%rip), %rdi # 0x5580f
leaq 0x434f5(%rip), %rsi # 0x556e0
leaq 0x435f2(%rip), %rcx # 0x557e4
movl $0xdc, %edx
callq 0xb510
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0xb380
jmp 0x1220e
movq %rax, %rbx
leaq 0x28(%rsp), %rdi
callq 0xc8fa
jmp 0x1221d
movq %rax, %rbx
leaq 0x50(%rsp), %rdi
callq 0xc8fa
movq %rbx, %rdi
callq 0xbec0
| _ZN7project14run_lua_scriptEPKc:
push r14
push rbx
sub rsp, 78h
mov rsi, rdi
mov rdi, cs:_ZL11s_lua_state; s_lua_state
test rdi, rdi
jz loc_121BE
test rsi, rsi
jz loc_121DD
xor edx, edx
call luaL_loadfilex
test eax, eax
jnz short loc_120D5
mov rdi, cs:_ZL11s_lua_state; s_lua_state
push 0FFFFFFFFFFFFFFFFh
pop rdx
xor esi, esi
xor ecx, ecx
xor r8d, r8d
xor r9d, r9d
call lua_pcallk
test eax, eax
jnz short loc_120D5
add rsp, 78h
pop rbx
pop r14
retn
loc_120D5:
mov rdi, cs:_ZSt4cerr_ptr
lea rsi, asc_5512D; "["
call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*)
mov rbx, rax
lea rsi, aWorkspaceLlm4b_6; "/workspace/llm4binary/github/2025_star3"...
lea r14, [rsp+88h+var_38]
push 2
pop rdx
mov rdi, r14; this
call _ZNSt10filesystem7__cxx114pathC2IA74_cS1_EERKT_NS1_6formatE; std::filesystem::__cxx11::path::path<char [74],std::filesystem::__cxx11::path>(char [74] const&,std::filesystem::__cxx11::path::format)
lea rdi, [rsp+88h+var_60]; this
mov rsi, r14
call _ZNKSt10filesystem7__cxx114path8filenameEv; std::filesystem::__cxx11::path::filename(void)
lea rdi, [rsp+88h+var_80]; this
lea rsi, [rsp+88h+var_60]
call _ZNKSt10filesystem7__cxx114path6stringEv; std::filesystem::__cxx11::path::string(void)
lea rsi, [rsp+88h+var_80]
mov rdi, rbx
call __ZStlsIcSt11char_traitsIcESaIcEERSt13basic_ostreamIT_T0_ES7_RKNSt7__cxx1112basic_stringIS4_S5_T1_EE; std::operator<<<char>(std::ostream &,std::string const&)
lea rsi, asc_7C3BA+1; ":"
mov rdi, rax
call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*)
mov rdi, rax
mov esi, 0DFh
call __ZNSolsEi; std::ostream::operator<<(int)
lea rsi, asc_5512F; "]: "
mov rdi, rax
call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*)
lea rsi, a13191mfatal0m; "\x1B[1;31;91mfatal:\x1B[0m "
mov rdi, rax
call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*)
lea rsi, aLuaError; "Lua error: "
mov rdi, rax
call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*)
mov rbx, rax
mov rdi, cs:_ZL11s_lua_state; s_lua_state
push 0FFFFFFFFFFFFFFFFh
pop rsi
xor edx, edx
call lua_tolstring
mov rdi, rbx
mov rsi, rax
call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*)
mov rdi, rax
call __ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_; std::endl<char,std::char_traits<char>>(std::ostream &)
lea rdi, [rsp+88h+var_80]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
lea rdi, [rsp+88h+var_60]; this
call _ZNSt10filesystem7__cxx114pathD2Ev; std::filesystem::__cxx11::path::~path()
lea rdi, [rsp+88h+var_38]; this
call _ZNSt10filesystem7__cxx114pathD2Ev; std::filesystem::__cxx11::path::~path()
call __ZSt9terminatev; std::terminate(void)
loc_121BE:
lea rdi, aSLuaStateNullp; "s_lua_state != nullptr"
lea rsi, aWorkspaceLlm4b_6; "/workspace/llm4binary/github/2025_star3"...
lea rcx, aVoidProjectRun; "void project::run_lua_script(const char"...
mov edx, 0DAh
call ___assert_fail
loc_121DD:
lea rdi, aFilenameNullpt; "filename != nullptr"
lea rsi, aWorkspaceLlm4b_6; "/workspace/llm4binary/github/2025_star3"...
lea rcx, aVoidProjectRun; "void project::run_lua_script(const char"...
mov edx, 0DCh
call ___assert_fail
mov rbx, rax
lea rdi, [rsp+88h+var_80]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
jmp short loc_1220E
mov rbx, rax
loc_1220E:
lea rdi, [rsp+88h+var_60]; this
call _ZNSt10filesystem7__cxx114pathD2Ev; std::filesystem::__cxx11::path::~path()
jmp short loc_1221D
mov rbx, rax
loc_1221D:
lea rdi, [rsp+88h+var_38]; this
call _ZNSt10filesystem7__cxx114pathD2Ev; std::filesystem::__cxx11::path::~path()
mov rdi, rbx
call __Unwind_Resume
| long long project::run_lua_script(project *this, const char *a2)
{
long long v2; // rdx
long long result; // rax
long long v4; // rbx
long long v5; // rax
long long v6; // rdx
long long v7; // rax
long long v8; // rax
long long v9; // rdx
long long v10; // rax
long long v11; // rdx
long long v12; // rax
long long v13; // rdx
long long v14; // rbx
long long v15; // rax
long long v16; // rdx
long long v17; // rax
_BYTE v18[32]; // [rsp+8h] [rbp-80h] BYREF
_BYTE v19[40]; // [rsp+28h] [rbp-60h] BYREF
_QWORD v20[7]; // [rsp+50h] [rbp-38h] BYREF
if ( !s_lua_state )
__assert_fail(
"s_lua_state != nullptr",
"/workspace/llm4binary/github/2025_star3/untodesu[P]riteg/riteg/project.cc",
218LL,
"void project::run_lua_script(const char *)");
if ( !this )
__assert_fail(
"filename != nullptr",
"/workspace/llm4binary/github/2025_star3/untodesu[P]riteg/riteg/project.cc",
220LL,
"void project::run_lua_script(const char *)");
if ( (unsigned int)luaL_loadfilex(s_lua_state, this, 0LL)
|| (result = lua_pcallk(s_lua_state, 0LL, -1LL, 0LL, 0LL, 0LL), (_DWORD)result) )
{
v4 = std::operator<<<std::char_traits<char>>(&std::cerr, "[", v2);
std::filesystem::__cxx11::path::path<char [74],std::filesystem::__cxx11::path>(
(std::filesystem::__cxx11::path *)v20,
(long long)"/workspace/llm4binary/github/2025_star3/untodesu[P]riteg/riteg/project.cc");
std::filesystem::__cxx11::path::filename((std::filesystem::__cxx11::path *)v19, v20);
std::filesystem::__cxx11::path::string((std::filesystem::__cxx11::path *)v18, (long long)v19);
v5 = std::operator<<<char>(v4, v18);
v7 = std::operator<<<std::char_traits<char>>(v5, ":", v6);
v8 = std::ostream::operator<<(v7, 223LL);
v10 = std::operator<<<std::char_traits<char>>(v8, "]: ", v9);
v12 = std::operator<<<std::char_traits<char>>(v10, "\x1B[1;31;91mfatal:\x1B[0m ", v11);
v14 = std::operator<<<std::char_traits<char>>(v12, "Lua error: ", v13);
v15 = lua_tolstring(s_lua_state, -1LL, 0LL);
v17 = std::operator<<<std::char_traits<char>>(v14, v15, v16);
std::endl<char,std::char_traits<char>>(v17);
std::string::~string(v18);
std::filesystem::__cxx11::path::~path((std::filesystem::__cxx11::path *)v19);
std::filesystem::__cxx11::path::~path((std::filesystem::__cxx11::path *)v20);
std::terminate();
}
return result;
}
| run_lua_script:
PUSH R14
PUSH RBX
SUB RSP,0x78
MOV RSI,RDI
MOV RDI,qword ptr [0x0019b600]
TEST RDI,RDI
JZ 0x001121be
TEST RSI,RSI
JZ 0x001121dd
XOR EDX,EDX
CALL 0x0012a1d7
TEST EAX,EAX
JNZ 0x001120d5
MOV RDI,qword ptr [0x0019b600]
PUSH -0x1
POP RDX
XOR ESI,ESI
XOR ECX,ECX
XOR R8D,R8D
XOR R9D,R9D
CALL 0x001288fe
TEST EAX,EAX
JNZ 0x001120d5
ADD RSP,0x78
POP RBX
POP R14
RET
LAB_001120d5:
MOV RDI,qword ptr [0x00199ff0]
LEA RSI,[0x15512d]
CALL 0x0010b840
MOV RBX,RAX
LEA RSI,[0x1556e0]
LEA R14,[RSP + 0x50]
PUSH 0x2
POP RDX
MOV RDI,R14
CALL 0x0010c800
LAB_00112102:
LEA RDI,[RSP + 0x28]
MOV RSI,R14
CALL 0x0010c86c
LAB_0011210f:
LEA RDI,[RSP + 0x8]
LEA RSI,[RSP + 0x28]
CALL 0x0010c8de
LAB_0011211e:
LEA RSI,[RSP + 0x8]
MOV RDI,RBX
CALL 0x0010b740
LEA RSI,[0x17c3bb]
MOV RDI,RAX
CALL 0x0010b840
MOV RDI,RAX
MOV ESI,0xdf
CALL 0x0010be70
LEA RSI,[0x15512f]
MOV RDI,RAX
CALL 0x0010b840
LEA RSI,[0x155133]
MOV RDI,RAX
CALL 0x0010b840
LEA RSI,[0x155823]
MOV RDI,RAX
CALL 0x0010b840
MOV RBX,RAX
MOV RDI,qword ptr [0x0019b600]
PUSH -0x1
POP RSI
XOR EDX,EDX
CALL 0x00127cb4
MOV RDI,RBX
MOV RSI,RAX
CALL 0x0010b840
MOV RDI,RAX
CALL 0x0010b3c0
LAB_0011219b:
LEA RDI,[RSP + 0x8]
CALL 0x0010b380
LEA RDI,[RSP + 0x28]
CALL 0x0010c8fa
LEA RDI,[RSP + 0x50]
CALL 0x0010c8fa
CALL 0x0010b1d0
LAB_001121be:
LEA RDI,[0x1556c9]
LEA RSI,[0x1556e0]
LEA RCX,[0x1557e4]
MOV EDX,0xda
CALL 0x0010b510
LAB_001121dd:
LEA RDI,[0x15580f]
LEA RSI,[0x1556e0]
LEA RCX,[0x1557e4]
MOV EDX,0xdc
CALL 0x0010b510
|
/* project::run_lua_script(char const*) */
void project::run_lua_script(char *param_1)
{
int iVar1;
ostream *poVar2;
char *pcVar3;
string local_80 [32];
path local_60 [40];
path local_38 [40];
if (s_lua_state == 0) {
/* WARNING: Subroutine does not return */
__assert_fail("s_lua_state != nullptr",
"/workspace/llm4binary/github/2025_star3/untodesu[P]riteg/riteg/project.cc",0xda,
"void project::run_lua_script(const char *)");
}
if (param_1 != (char *)0x0) {
iVar1 = luaL_loadfilex(s_lua_state,param_1,0);
if (iVar1 == 0) {
iVar1 = lua_pcallk(s_lua_state,0,0xffffffffffffffff,0,0,0);
if (iVar1 == 0) {
return;
}
}
poVar2 = std::operator<<((ostream *)PTR_cerr_00199ff0,"[");
std::filesystem::__cxx11::path::path<char[74],std::filesystem::__cxx11::path>
(local_38,"/workspace/llm4binary/github/2025_star3/untodesu[P]riteg/riteg/project.cc",
2);
/* try { // try from 00112102 to 0011210e has its CatchHandler @ 0011221a */
std::filesystem::__cxx11::path::filename();
/* try { // try from 0011210f to 0011211d has its CatchHandler @ 0011220b */
std::filesystem::__cxx11::path::string();
/* try { // try from 0011211e to 0011219a has its CatchHandler @ 001121fc */
poVar2 = std::operator<<(poVar2,local_80);
poVar2 = std::operator<<(poVar2,":");
poVar2 = (ostream *)std::ostream::operator<<(poVar2,0xdf);
poVar2 = std::operator<<(poVar2,"]: ");
poVar2 = std::operator<<(poVar2,"\x1b[1;31;91mfatal:\x1b[0m ");
poVar2 = std::operator<<(poVar2,"Lua error: ");
pcVar3 = (char *)lua_tolstring(s_lua_state,0xffffffffffffffff,0);
poVar2 = std::operator<<(poVar2,pcVar3);
std::endl<char,std::char_traits<char>>(poVar2);
std::__cxx11::string::~string(local_80);
std::filesystem::__cxx11::path::~path(local_60);
std::filesystem::__cxx11::path::~path(local_38);
/* WARNING: Subroutine does not return */
std::terminate();
}
/* WARNING: Subroutine does not return */
__assert_fail("filename != nullptr",
"/workspace/llm4binary/github/2025_star3/untodesu[P]riteg/riteg/project.cc",0xdc,
"void project::run_lua_script(const char *)");
}
| |
51,896 | ma_print_error | eloqsql/storage/maria/ma_info.c | void _ma_print_error(MARIA_HA *info, int error, my_bool write_to_log)
{
DBUG_ENTER("_ma_print_error");
DBUG_PRINT("error", ("error: %d log: %d", error, write_to_log));
if (!info->error_count++ || !maria_in_ha_maria || write_to_log)
{
MARIA_SHARE *share= info->s;
_ma_report_error(error,
(share->index_file_name.length ?
&share->index_file_name :
&share->unique_file_name),
MYF(write_to_log ? ME_ERROR_LOG : 0));
}
DBUG_VOID_RETURN;
} | O3 | c | ma_print_error:
pushq %rbp
movq %rsp, %rbp
movl 0x628(%rdi), %eax
leal 0x1(%rax), %ecx
movl %ecx, 0x628(%rdi)
testb %dl, %dl
jne 0x42b67
testl %eax, %eax
je 0x42b67
leaq 0x3c2cec(%rip), %rax # 0x40584c
cmpb $0x0, (%rax)
je 0x42b67
popq %rbp
retq
xorl %eax, %eax
testb %dl, %dl
setne %al
movq (%rdi), %rcx
xorl %edx, %edx
cmpq $0x0, 0x5d8(%rcx)
setne %dl
shll $0x5, %edx
addq %rdx, %rcx
addq $0x5b0, %rcx # imm = 0x5B0
shll $0x6, %eax
movl %esi, %edi
movq %rcx, %rsi
movq %rax, %rdx
popq %rbp
jmp 0x42ae0
| _ma_print_error:
push rbp
mov rbp, rsp
mov eax, [rdi+628h]
lea ecx, [rax+1]
mov [rdi+628h], ecx
test dl, dl
jnz short loc_42B67
test eax, eax
jz short loc_42B67
lea rax, maria_in_ha_maria
cmp byte ptr [rax], 0
jz short loc_42B67
pop rbp
retn
loc_42B67:
xor eax, eax
test dl, dl
setnz al
mov rcx, [rdi]
xor edx, edx
cmp qword ptr [rcx+5D8h], 0
setnz dl
shl edx, 5
add rcx, rdx
add rcx, 5B0h
shl eax, 6
mov edi, esi
mov rsi, rcx
mov rdx, rax
pop rbp
jmp _ma_report_error
| void * ma_print_error(_DWORD *a1, int a2, char a3, long long a4, long long a5, int a6)
{
int v6; // eax
void *result; // rax
_QWORD *v8; // rcx
v6 = a1[394];
a1[394] = v6 + 1;
if ( a3 || !v6 || (result = &maria_in_ha_maria, !maria_in_ha_maria) )
{
v8 = (_QWORD *)(32 * (unsigned int)(*(_QWORD *)(*(_QWORD *)a1 + 1496LL) != 0LL) + *(_QWORD *)a1 + 1456LL);
return (void *)ma_report_error(a2, v8, (unsigned __int8)(a3 != 0) << 6, (long long)v8, a5, a6);
}
return result;
}
| _ma_print_error:
PUSH RBP
MOV RBP,RSP
MOV EAX,dword ptr [RDI + 0x628]
LEA ECX,[RAX + 0x1]
MOV dword ptr [RDI + 0x628],ECX
TEST DL,DL
JNZ 0x00142b67
TEST EAX,EAX
JZ 0x00142b67
LEA RAX,[0x50584c]
CMP byte ptr [RAX],0x0
JZ 0x00142b67
POP RBP
RET
LAB_00142b67:
XOR EAX,EAX
TEST DL,DL
SETNZ AL
MOV RCX,qword ptr [RDI]
XOR EDX,EDX
CMP qword ptr [RCX + 0x5d8],0x0
SETNZ DL
SHL EDX,0x5
ADD RCX,RDX
ADD RCX,0x5b0
SHL EAX,0x6
MOV EDI,ESI
MOV RSI,RCX
MOV RDX,RAX
POP RBP
JMP 0x00142ae0
|
void _ma_print_error(long *param_1,int4 param_2,char param_3)
{
long lVar1;
lVar1 = param_1[0xc5];
*(int *)(param_1 + 0xc5) = (int)lVar1 + 1;
if (((param_3 == '\0') && ((int)lVar1 != 0)) && (maria_in_ha_maria != '\0')) {
return;
}
_ma_report_error(param_2,*param_1 + (ulong)(*(long *)(*param_1 + 0x5d8) != 0) * 0x20 + 0x5b0,
(ulong)(param_3 != '\0') << 6);
return;
}
| |
51,897 | get_collation_name_alias | eloqsql/mysys/charset.c | static const char*
get_collation_name_alias(const char *name, char *buf, size_t bufsize, myf flags)
{
if (!strncasecmp(name, "utf8_", 5))
{
my_snprintf(buf, bufsize, "utf8mb%c_%s",
flags & MY_UTF8_IS_UTF8MB3 ? '3' : '4', name + 5);
return buf;
}
return NULL;
} | O0 | c | get_collation_name_alias:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
movq -0x10(%rbp), %rdi
leaq 0x50099(%rip), %rsi # 0x859ac
movl $0x5, %edx
callq 0x24380
cmpl $0x0, %eax
jne 0x35966
movq -0x18(%rbp), %rdi
movq -0x20(%rbp), %rsi
movq -0x28(%rbp), %rdx
andq $0x400, %rdx # imm = 0x400
movl $0x34, %ecx
movl $0x33, %eax
cmpq $0x0, %rdx
cmovnel %eax, %ecx
movq -0x10(%rbp), %r8
addq $0x5, %r8
leaq 0x5005d(%rip), %rdx # 0x859b2
movb $0x0, %al
callq 0x82020
movq -0x18(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x3596e
movq $0x0, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax,%rax)
| get_collation_name_alias:
push rbp
mov rbp, rsp
sub rsp, 30h
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov [rbp+var_20], rdx
mov [rbp+var_28], rcx
mov rdi, [rbp+var_10]
lea rsi, aUtf8_0; "utf8_"
mov edx, 5
call _strncasecmp
cmp eax, 0
jnz short loc_35966
mov rdi, [rbp+var_18]
mov rsi, [rbp+var_20]
mov rdx, [rbp+var_28]
and rdx, 400h
mov ecx, 34h ; '4'
mov eax, 33h ; '3'
cmp rdx, 0
cmovnz ecx, eax
mov r8, [rbp+var_10]
add r8, 5
lea rdx, aUtf8mbCS; "utf8mb%c_%s"
mov al, 0
call my_snprintf
mov rax, [rbp+var_18]
mov [rbp+var_8], rax
jmp short loc_3596E
loc_35966:
mov [rbp+var_8], 0
loc_3596E:
mov rax, [rbp+var_8]
add rsp, 30h
pop rbp
retn
| long long get_collation_name_alias(long long a1, long long a2, int a3, __int16 a4)
{
int v4; // r9d
int v5; // ecx
if ( (unsigned int)strncasecmp(a1, "utf8_", 5LL) )
return 0LL;
v5 = 52;
if ( (a4 & 0x400) != 0 )
v5 = 51;
my_snprintf(a2, a3, (unsigned int)"utf8mb%c_%s", v5, a1 + 5, v4);
return a2;
}
| get_collation_name_alias:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x30
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x18],RSI
MOV qword ptr [RBP + -0x20],RDX
MOV qword ptr [RBP + -0x28],RCX
MOV RDI,qword ptr [RBP + -0x10]
LEA RSI,[0x1859ac]
MOV EDX,0x5
CALL 0x00124380
CMP EAX,0x0
JNZ 0x00135966
MOV RDI,qword ptr [RBP + -0x18]
MOV RSI,qword ptr [RBP + -0x20]
MOV RDX,qword ptr [RBP + -0x28]
AND RDX,0x400
MOV ECX,0x34
MOV EAX,0x33
CMP RDX,0x0
CMOVNZ ECX,EAX
MOV R8,qword ptr [RBP + -0x10]
ADD R8,0x5
LEA RDX,[0x1859b2]
MOV AL,0x0
CALL 0x00182020
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RBP + -0x8],RAX
JMP 0x0013596e
LAB_00135966:
MOV qword ptr [RBP + -0x8],0x0
LAB_0013596e:
MOV RAX,qword ptr [RBP + -0x8]
ADD RSP,0x30
POP RBP
RET
|
int8
get_collation_name_alias(char *param_1,int8 param_2,int8 param_3,ulong param_4)
{
int iVar1;
int8 uVar2;
int8 local_10;
iVar1 = strncasecmp(param_1,"utf8_",5);
if (iVar1 == 0) {
uVar2 = 0x34;
if ((param_4 & 0x400) != 0) {
uVar2 = 0x33;
}
my_snprintf(param_2,param_3,"utf8mb%c_%s",uVar2,param_1 + 5);
local_10 = param_2;
}
else {
local_10 = 0;
}
return local_10;
}
| |
51,898 | add_cfg_dir | eloqsql/libmariadb/libmariadb/ma_default.c | static int add_cfg_dir(char **cfg_dirs, const char *directory)
{
int i;
for (i = 0; i < MAX_CONFIG_DIRS && cfg_dirs[i]; i++)
if (!strcmp(cfg_dirs[i], directory)) /* already present */
return 0;
if (i < MAX_CONFIG_DIRS) {
cfg_dirs[i]= strdup(directory);
return 0;
}
return 1;
} | O0 | c | add_cfg_dir:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movl $0x0, -0x1c(%rbp)
xorl %eax, %eax
cmpl $0x6, -0x1c(%rbp)
movb %al, -0x1d(%rbp)
jge 0x78c15
movq -0x10(%rbp), %rax
movslq -0x1c(%rbp), %rcx
cmpq $0x0, (%rax,%rcx,8)
setne %al
movb %al, -0x1d(%rbp)
movb -0x1d(%rbp), %al
testb $0x1, %al
jne 0x78c1e
jmp 0x78c4e
movq -0x10(%rbp), %rax
movslq -0x1c(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
movq -0x18(%rbp), %rsi
callq 0x38880
cmpl $0x0, %eax
jne 0x78c41
movl $0x0, -0x4(%rbp)
jmp 0x78c7c
jmp 0x78c43
movl -0x1c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1c(%rbp)
jmp 0x78bf7
cmpl $0x6, -0x1c(%rbp)
jge 0x78c75
movq -0x18(%rbp), %rdi
callq 0x38030
movq %rax, %rdx
movq -0x10(%rbp), %rax
movslq -0x1c(%rbp), %rcx
movq %rdx, (%rax,%rcx,8)
movl $0x0, -0x4(%rbp)
jmp 0x78c7c
movl $0x1, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
| add_cfg_dir:
push rbp
mov rbp, rsp
sub rsp, 20h
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov [rbp+var_1C], 0
loc_78BF7:
xor eax, eax
cmp [rbp+var_1C], 6
mov [rbp+var_1D], al
jge short loc_78C15
mov rax, [rbp+var_10]
movsxd rcx, [rbp+var_1C]
cmp qword ptr [rax+rcx*8], 0
setnz al
mov [rbp+var_1D], al
loc_78C15:
mov al, [rbp+var_1D]
test al, 1
jnz short loc_78C1E
jmp short loc_78C4E
loc_78C1E:
mov rax, [rbp+var_10]
movsxd rcx, [rbp+var_1C]
mov rdi, [rax+rcx*8]
mov rsi, [rbp+var_18]
call _strcmp
cmp eax, 0
jnz short loc_78C41
mov [rbp+var_4], 0
jmp short loc_78C7C
loc_78C41:
jmp short $+2
loc_78C43:
mov eax, [rbp+var_1C]
add eax, 1
mov [rbp+var_1C], eax
jmp short loc_78BF7
loc_78C4E:
cmp [rbp+var_1C], 6
jge short loc_78C75
mov rdi, [rbp+var_18]
call _strdup
mov rdx, rax
mov rax, [rbp+var_10]
movsxd rcx, [rbp+var_1C]
mov [rax+rcx*8], rdx
mov [rbp+var_4], 0
jmp short loc_78C7C
loc_78C75:
mov [rbp+var_4], 1
loc_78C7C:
mov eax, [rbp+var_4]
add rsp, 20h
pop rbp
retn
| long long add_cfg_dir(long long a1, long long a2)
{
bool v3; // [rsp+3h] [rbp-1Dh]
int i; // [rsp+4h] [rbp-1Ch]
for ( i = 0; ; ++i )
{
v3 = 0;
if ( i < 6 )
v3 = *(_QWORD *)(a1 + 8LL * i) != 0LL;
if ( !v3 )
break;
if ( !(unsigned int)strcmp(*(_QWORD *)(a1 + 8LL * i), a2) )
return 0;
}
if ( i >= 6 )
{
return 1;
}
else
{
*(_QWORD *)(a1 + 8LL * i) = strdup(a2);
return 0;
}
}
| add_cfg_dir:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x20
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x18],RSI
MOV dword ptr [RBP + -0x1c],0x0
LAB_00178bf7:
XOR EAX,EAX
CMP dword ptr [RBP + -0x1c],0x6
MOV byte ptr [RBP + -0x1d],AL
JGE 0x00178c15
MOV RAX,qword ptr [RBP + -0x10]
MOVSXD RCX,dword ptr [RBP + -0x1c]
CMP qword ptr [RAX + RCX*0x8],0x0
SETNZ AL
MOV byte ptr [RBP + -0x1d],AL
LAB_00178c15:
MOV AL,byte ptr [RBP + -0x1d]
TEST AL,0x1
JNZ 0x00178c1e
JMP 0x00178c4e
LAB_00178c1e:
MOV RAX,qword ptr [RBP + -0x10]
MOVSXD RCX,dword ptr [RBP + -0x1c]
MOV RDI,qword ptr [RAX + RCX*0x8]
MOV RSI,qword ptr [RBP + -0x18]
CALL 0x00138880
CMP EAX,0x0
JNZ 0x00178c41
MOV dword ptr [RBP + -0x4],0x0
JMP 0x00178c7c
LAB_00178c41:
JMP 0x00178c43
LAB_00178c43:
MOV EAX,dword ptr [RBP + -0x1c]
ADD EAX,0x1
MOV dword ptr [RBP + -0x1c],EAX
JMP 0x00178bf7
LAB_00178c4e:
CMP dword ptr [RBP + -0x1c],0x6
JGE 0x00178c75
MOV RDI,qword ptr [RBP + -0x18]
CALL 0x00138030
MOV RDX,RAX
MOV RAX,qword ptr [RBP + -0x10]
MOVSXD RCX,dword ptr [RBP + -0x1c]
MOV qword ptr [RAX + RCX*0x8],RDX
MOV dword ptr [RBP + -0x4],0x0
JMP 0x00178c7c
LAB_00178c75:
MOV dword ptr [RBP + -0x4],0x1
LAB_00178c7c:
MOV EAX,dword ptr [RBP + -0x4]
ADD RSP,0x20
POP RBP
RET
|
int4 add_cfg_dir(long param_1,char *param_2)
{
int iVar1;
char *pcVar2;
bool bVar3;
int local_24;
local_24 = 0;
while( true ) {
bVar3 = false;
if (local_24 < 6) {
bVar3 = *(long *)(param_1 + (long)local_24 * 8) != 0;
}
if (!bVar3) break;
iVar1 = strcmp(*(char **)(param_1 + (long)local_24 * 8),param_2);
if (iVar1 == 0) {
return 0;
}
local_24 = local_24 + 1;
}
if (local_24 < 6) {
pcVar2 = strdup(param_2);
*(char **)(param_1 + (long)local_24 * 8) = pcVar2;
return 0;
}
return 1;
}
| |
51,899 | test_bug10214 | eloqsql/tests/mysql_client_test.c | static void test_bug10214()
{
int len;
char out[8];
myheader("test_bug10214");
DIE_UNLESS(!(mysql->server_status & SERVER_STATUS_NO_BACKSLASH_ESCAPES));
len= mysql_real_escape_string(mysql, out, "a'b\\c", 5);
DIE_UNLESS(memcmp(out, "a\\'b\\\\c", len) == 0);
mysql_query(mysql, "set sql_mode='NO_BACKSLASH_ESCAPES'");
DIE_UNLESS(mysql->server_status & SERVER_STATUS_NO_BACKSLASH_ESCAPES);
len= mysql_real_escape_string(mysql, out, "a'b\\c", 5);
DIE_UNLESS(memcmp(out, "a''b\\c", len) == 0);
mysql_query(mysql, "set sql_mode=''");
} | O0 | c | test_bug10214:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %fs:0x28, %rax
movq %rax, -0x8(%rbp)
jmp 0x78467
movsbl 0x3f2063(%rip), %eax # 0x46a4d1
cmpl $0x2, %eax
jge 0x784ef
movq 0x236b5e(%rip), %rax # 0x2aefd8
movq (%rax), %rdi
leaq 0xb5ea0(%rip), %rsi # 0x12e324
movb $0x0, %al
callq 0x3a1c0
movq 0x236b46(%rip), %rax # 0x2aefd8
movq (%rax), %rdi
movl 0x3f2281(%rip), %edx # 0x46a71c
movl %edx, %eax
addl $0x1, %eax
movl %eax, 0x3f2276(%rip) # 0x46a71c
movl 0x3f226c(%rip), %ecx # 0x46a718
movl 0x3f2049(%rip), %r8d # 0x46a4fc
leaq 0xb7172(%rip), %rsi # 0x12f62c
leaq 0xb6afb(%rip), %r9 # 0x12efbc
movb $0x0, %al
callq 0x3a1c0
movq 0x236b09(%rip), %rax # 0x2aefd8
movq (%rax), %rdi
leaq 0xb5e83(%rip), %rsi # 0x12e35c
movb $0x0, %al
callq 0x3a1c0
movq 0x236af1(%rip), %rax # 0x2aefd8
movq (%rax), %rdi
callq 0x3a4a0
movq 0x3f1fe2(%rip), %rax # 0x46a4d8
movl 0x380(%rax), %eax
andl $0x200, %eax # imm = 0x200
cmpl $0x0, %eax
jne 0x78508
jmp 0x78520
leaq 0xb56fd(%rip), %rdi # 0x12dc0c
movl $0x37ec, %esi # imm = 0x37EC
leaq 0xc598c(%rip), %rdx # 0x13dea7
callq 0x3c010
movq 0x3f1fb1(%rip), %rdi # 0x46a4d8
leaq -0x10(%rbp), %rsi
leaq 0xc59b2(%rip), %rdx # 0x13dee4
movl $0x5, %ecx
callq 0xaa350
movl %eax, -0x14(%rbp)
leaq -0x10(%rbp), %rdi
movslq -0x14(%rbp), %rdx
leaq 0xc599c(%rip), %rsi # 0x13deea
callq 0x3ab20
cmpl $0x0, %eax
jne 0x7855a
jmp 0x78572
leaq 0xb56ab(%rip), %rdi # 0x12dc0c
movl $0x37ef, %esi # imm = 0x37EF
leaq 0xc5985(%rip), %rdx # 0x13def2
callq 0x3c010
movq 0x3f1f5f(%rip), %rdi # 0x46a4d8
leaq 0xc5996(%rip), %rsi # 0x13df16
callq 0x3b3d0
movq 0x3f1f4c(%rip), %rax # 0x46a4d8
movl 0x380(%rax), %eax
andl $0x200, %eax # imm = 0x200
cmpl $0x0, %eax
je 0x7859e
jmp 0x785b6
leaq 0xb5667(%rip), %rdi # 0x12dc0c
movl $0x37f2, %esi # imm = 0x37F2
leaq 0xc5989(%rip), %rdx # 0x13df3a
callq 0x3c010
movq 0x3f1f1b(%rip), %rdi # 0x46a4d8
leaq -0x10(%rbp), %rsi
leaq 0xc591c(%rip), %rdx # 0x13dee4
movl $0x5, %ecx
callq 0xaa350
movl %eax, -0x14(%rbp)
leaq -0x10(%rbp), %rdi
movslq -0x14(%rbp), %rdx
leaq 0xc5990(%rip), %rsi # 0x13df74
callq 0x3ab20
cmpl $0x0, %eax
jne 0x785f0
jmp 0x78608
leaq 0xb5615(%rip), %rdi # 0x12dc0c
movl $0x37f5, %esi # imm = 0x37F5
leaq 0xc5978(%rip), %rdx # 0x13df7b
callq 0x3c010
movq 0x3f1ec9(%rip), %rdi # 0x46a4d8
leaq 0xc2b46(%rip), %rsi # 0x13b15c
callq 0x3b3d0
movq %fs:0x28, %rax
movq -0x8(%rbp), %rcx
cmpq %rcx, %rax
jne 0x78633
addq $0x20, %rsp
popq %rbp
retq
callq 0x3a2a0
nopl (%rax,%rax)
| test_bug10214:
push rbp
mov rbp, rsp
sub rsp, 20h
mov rax, fs:28h
mov [rbp+var_8], rax
jmp short $+2
loc_78467:
movsx eax, cs:opt_silent
cmp eax, 2
jge short loc_784EF
mov rax, cs:stdout_ptr
mov rdi, [rax]
lea rsi, asc_12E324; "\n\n###################################"...
mov al, 0
call _fprintf
mov rax, cs:stdout_ptr
mov rdi, [rax]
mov edx, cs:test_count
mov eax, edx
add eax, 1
mov cs:test_count, eax
mov ecx, cs:iter_count
mov r8d, cs:opt_count
lea rsi, aUOfUUS; "%u of (%u/%u): %s"
lea r9, aTestBug10214; "test_bug10214"
mov al, 0
call _fprintf
mov rax, cs:stdout_ptr
mov rdi, [rax]
lea rsi, asc_12E35C; " \n###################################"...
mov al, 0
call _fprintf
mov rax, cs:stdout_ptr
mov rdi, [rax]
call _fflush
loc_784EF:
mov rax, cs:mysql
mov eax, [rax+380h]
and eax, 200h
cmp eax, 0
jnz short loc_78508
jmp short loc_78520
loc_78508:
lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/eloqsq"...
mov esi, 37ECh
lea rdx, aMysqlServerSta; "!(mysql->server_status & SERVER_STATUS_"...
call die
loc_78520:
mov rdi, cs:mysql
lea rsi, [rbp+var_10]
lea rdx, aABC; "a'b\\c"
mov ecx, 5
call mysql_real_escape_string
mov [rbp+var_14], eax
lea rdi, [rbp+var_10]
movsxd rdx, [rbp+var_14]
lea rsi, aABC_0; "a\\'b\\\\c"
call _memcmp
cmp eax, 0
jnz short loc_7855A
jmp short loc_78572
loc_7855A:
lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/eloqsq"...
mov esi, 37EFh
lea rdx, aMemcmpOutABCLe; "memcmp(out, \"a\\\\'b\\\\\\\\c\", len) "...
call die
loc_78572:
mov rdi, cs:mysql
lea rsi, aSetSqlModeNoBa; "set sql_mode='NO_BACKSLASH_ESCAPES'"
call wrap_mysql_query
mov rax, cs:mysql
mov eax, [rax+380h]
and eax, 200h
cmp eax, 0
jz short loc_7859E
jmp short loc_785B6
loc_7859E:
lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/eloqsq"...
mov esi, 37F2h
lea rdx, aMysqlServerSta_0; "mysql->server_status & SERVER_STATUS_NO"...
call die
loc_785B6:
mov rdi, cs:mysql
lea rsi, [rbp+var_10]
lea rdx, aABC; "a'b\\c"
mov ecx, 5
call mysql_real_escape_string
mov [rbp+var_14], eax
lea rdi, [rbp+var_10]
movsxd rdx, [rbp+var_14]
lea rsi, aABC_1; "a''b\\c"
call _memcmp
cmp eax, 0
jnz short loc_785F0
jmp short loc_78608
loc_785F0:
lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/eloqsq"...
mov esi, 37F5h
lea rdx, aMemcmpOutABCLe_0; "memcmp(out, \"a''b\\\\c\", len) == 0"
call die
loc_78608:
mov rdi, cs:mysql
lea rsi, aSetSqlMode_1; "set sql_mode=''"
call wrap_mysql_query
mov rax, fs:28h
mov rcx, [rbp+var_8]
cmp rax, rcx
jnz short loc_78633
add rsp, 20h
pop rbp
retn
loc_78633:
call ___stack_chk_fail
| unsigned long long test_bug10214()
{
int v0; // edx
int v2; // [rsp+Ch] [rbp-14h]
int v3; // [rsp+Ch] [rbp-14h]
_BYTE v4[8]; // [rsp+10h] [rbp-10h] BYREF
unsigned long long v5; // [rsp+18h] [rbp-8h]
v5 = __readfsqword(0x28u);
if ( opt_silent < 2 )
{
fprintf(stdout, "\n\n#####################################\n");
v0 = test_count++;
fprintf(stdout, "%u of (%u/%u): %s", v0, iter_count, opt_count, "test_bug10214");
fprintf(stdout, " \n#####################################\n");
fflush(stdout);
}
if ( (*(_DWORD *)(mysql + 896) & 0x200) != 0 )
die(
"/workspace/llm4binary/github2025/eloqsql/tests/mysql_client_test.c",
14316,
"!(mysql->server_status & SERVER_STATUS_NO_BACKSLASH_ESCAPES)");
v2 = mysql_real_escape_string(mysql, v4, "a'b\\c", 5LL);
if ( (unsigned int)memcmp(v4, "a\\'b\\\\c", v2) )
die(
"/workspace/llm4binary/github2025/eloqsql/tests/mysql_client_test.c",
14319,
"memcmp(out, \"a\\\\'b\\\\\\\\c\", len) == 0");
wrap_mysql_query(mysql, (long long)"set sql_mode='NO_BACKSLASH_ESCAPES'");
if ( (*(_DWORD *)(mysql + 896) & 0x200) == 0 )
die(
"/workspace/llm4binary/github2025/eloqsql/tests/mysql_client_test.c",
14322,
"mysql->server_status & SERVER_STATUS_NO_BACKSLASH_ESCAPES");
v3 = mysql_real_escape_string(mysql, v4, "a'b\\c", 5LL);
if ( (unsigned int)memcmp(v4, "a''b\\c", v3) )
die(
"/workspace/llm4binary/github2025/eloqsql/tests/mysql_client_test.c",
14325,
"memcmp(out, \"a''b\\\\c\", len) == 0");
wrap_mysql_query(mysql, (long long)"set sql_mode=''");
return __readfsqword(0x28u);
}
| test_bug10214:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x20
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x8],RAX
JMP 0x00178467
LAB_00178467:
MOVSX EAX,byte ptr [0x0056a4d1]
CMP EAX,0x2
JGE 0x001784ef
MOV RAX,qword ptr [0x003aefd8]
MOV RDI,qword ptr [RAX]
LEA RSI,[0x22e324]
MOV AL,0x0
CALL 0x0013a1c0
MOV RAX,qword ptr [0x003aefd8]
MOV RDI,qword ptr [RAX]
MOV EDX,dword ptr [0x0056a71c]
MOV EAX,EDX
ADD EAX,0x1
MOV dword ptr [0x0056a71c],EAX
MOV ECX,dword ptr [0x0056a718]
MOV R8D,dword ptr [0x0056a4fc]
LEA RSI,[0x22f62c]
LEA R9,[0x22efbc]
MOV AL,0x0
CALL 0x0013a1c0
MOV RAX,qword ptr [0x003aefd8]
MOV RDI,qword ptr [RAX]
LEA RSI,[0x22e35c]
MOV AL,0x0
CALL 0x0013a1c0
MOV RAX,qword ptr [0x003aefd8]
MOV RDI,qword ptr [RAX]
CALL 0x0013a4a0
LAB_001784ef:
MOV RAX,qword ptr [0x0056a4d8]
MOV EAX,dword ptr [RAX + 0x380]
AND EAX,0x200
CMP EAX,0x0
JNZ 0x00178508
JMP 0x00178520
LAB_00178508:
LEA RDI,[0x22dc0c]
MOV ESI,0x37ec
LEA RDX,[0x23dea7]
CALL 0x0013c010
LAB_00178520:
MOV RDI,qword ptr [0x0056a4d8]
LEA RSI,[RBP + -0x10]
LEA RDX,[0x23dee4]
MOV ECX,0x5
CALL 0x001aa350
MOV dword ptr [RBP + -0x14],EAX
LEA RDI,[RBP + -0x10]
MOVSXD RDX,dword ptr [RBP + -0x14]
LEA RSI,[0x23deea]
CALL 0x0013ab20
CMP EAX,0x0
JNZ 0x0017855a
JMP 0x00178572
LAB_0017855a:
LEA RDI,[0x22dc0c]
MOV ESI,0x37ef
LEA RDX,[0x23def2]
CALL 0x0013c010
LAB_00178572:
MOV RDI,qword ptr [0x0056a4d8]
LEA RSI,[0x23df16]
CALL 0x0013b3d0
MOV RAX,qword ptr [0x0056a4d8]
MOV EAX,dword ptr [RAX + 0x380]
AND EAX,0x200
CMP EAX,0x0
JZ 0x0017859e
JMP 0x001785b6
LAB_0017859e:
LEA RDI,[0x22dc0c]
MOV ESI,0x37f2
LEA RDX,[0x23df3a]
CALL 0x0013c010
LAB_001785b6:
MOV RDI,qword ptr [0x0056a4d8]
LEA RSI,[RBP + -0x10]
LEA RDX,[0x23dee4]
MOV ECX,0x5
CALL 0x001aa350
MOV dword ptr [RBP + -0x14],EAX
LEA RDI,[RBP + -0x10]
MOVSXD RDX,dword ptr [RBP + -0x14]
LEA RSI,[0x23df74]
CALL 0x0013ab20
CMP EAX,0x0
JNZ 0x001785f0
JMP 0x00178608
LAB_001785f0:
LEA RDI,[0x22dc0c]
MOV ESI,0x37f5
LEA RDX,[0x23df7b]
CALL 0x0013c010
LAB_00178608:
MOV RDI,qword ptr [0x0056a4d8]
LEA RSI,[0x23b15c]
CALL 0x0013b3d0
MOV RAX,qword ptr FS:[0x28]
MOV RCX,qword ptr [RBP + -0x8]
CMP RAX,RCX
JNZ 0x00178633
ADD RSP,0x20
POP RBP
RET
LAB_00178633:
CALL 0x0013a2a0
|
void test_bug10214(void)
{
int iVar1;
ulong uVar2;
long in_FS_OFFSET;
int1 local_18 [8];
long local_10;
local_10 = *(long *)(in_FS_OFFSET + 0x28);
if (opt_silent < '\x02') {
fprintf(*(FILE **)PTR_stdout_003aefd8,"\n\n#####################################\n");
uVar2 = (ulong)test_count;
test_count = test_count + 1;
fprintf(*(FILE **)PTR_stdout_003aefd8,"%u of (%u/%u): %s",uVar2,(ulong)iter_count,
(ulong)opt_count,"test_bug10214");
fprintf(*(FILE **)PTR_stdout_003aefd8," \n#####################################\n");
fflush(*(FILE **)PTR_stdout_003aefd8);
}
if ((*(uint *)(mysql + 0x380) & 0x200) != 0) {
die("/workspace/llm4binary/github2025/eloqsql/tests/mysql_client_test.c",0x37ec,
"!(mysql->server_status & SERVER_STATUS_NO_BACKSLASH_ESCAPES)");
}
iVar1 = mysql_real_escape_string(mysql,local_18,"a\'b\\c",5);
iVar1 = memcmp(local_18,"a\\\'b\\\\c",(long)iVar1);
if (iVar1 != 0) {
die("/workspace/llm4binary/github2025/eloqsql/tests/mysql_client_test.c",0x37ef,
"memcmp(out, \"a\\\\\'b\\\\\\\\c\", len) == 0");
}
wrap_mysql_query(mysql,"set sql_mode=\'NO_BACKSLASH_ESCAPES\'");
if ((*(uint *)(mysql + 0x380) & 0x200) == 0) {
die("/workspace/llm4binary/github2025/eloqsql/tests/mysql_client_test.c",0x37f2,
"mysql->server_status & SERVER_STATUS_NO_BACKSLASH_ESCAPES");
}
iVar1 = mysql_real_escape_string(mysql,local_18,"a\'b\\c",5);
iVar1 = memcmp(local_18,"a\'\'b\\c",(long)iVar1);
if (iVar1 != 0) {
die("/workspace/llm4binary/github2025/eloqsql/tests/mysql_client_test.c",0x37f5,
"memcmp(out, \"a\'\'b\\\\c\", len) == 0");
}
wrap_mysql_query(mysql,"set sql_mode=\'\'");
if (*(long *)(in_FS_OFFSET + 0x28) != local_10) {
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
return;
}
|
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.