index
int64 0
66.5k
| func_name
stringlengths 2
5.36k
| func_dep
stringlengths 16
2.19k
| func
stringlengths 8
55.3k
| test
stringlengths 0
7.07k
| opt
stringclasses 4
values | language
stringclasses 2
values | asm
stringlengths 0
45.4k
| ida_asm
stringlengths 0
44.7k
| ida_pseudo
stringlengths 0
44.3k
| ghidra_asm
stringlengths 0
49.1k
| ghidra_pseudo
stringlengths 0
64.7k
|
|---|---|---|---|---|---|---|---|---|---|---|---|
57,200
|
testing::internal::edit_distance::(anonymous namespace)::Hunk::FlushEdits()
|
giladroyz[P]FindPeaks/build_O3/_deps/googletest-src/googletest/src/gtest.cc
|
void FlushEdits() {
hunk_.splice(hunk_.end(), hunk_removes_);
hunk_.splice(hunk_.end(), hunk_adds_);
}
|
O3
|
cpp
|
testing::internal::edit_distance::(anonymous namespace)::Hunk::FlushEdits():
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0x28(%rdi), %r14
leaq 0x58(%rdi), %rdx
movq 0x58(%rdi), %rsi
cmpq %rdx, %rsi
je 0x3023e
movq %r14, %rdi
callq 0x8240
movq 0x68(%rbx), %rax
addq %rax, 0x38(%rbx)
movq $0x0, 0x68(%rbx)
leaq 0x40(%rbx), %rdx
movq 0x40(%rbx), %rsi
cmpq %rdx, %rsi
je 0x30263
movq %r14, %rdi
callq 0x8240
movq 0x50(%rbx), %rax
addq %rax, 0x38(%rbx)
movq $0x0, 0x50(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
|
_ZN7testing8internal13edit_distance12_GLOBAL__N_14Hunk10FlushEditsEv:
push r14
push rbx
push rax
mov rbx, rdi
lea r14, [rdi+28h]
lea rdx, [rdi+58h]
mov rsi, [rdi+58h]
cmp rsi, rdx
jz short loc_3023E
mov rdi, r14
call __ZNSt8__detail15_List_node_base11_M_transferEPS0_S1_; std::__detail::_List_node_base::_M_transfer(std::__detail::_List_node_base*,std::__detail::_List_node_base*)
mov rax, [rbx+68h]
add [rbx+38h], rax
mov qword ptr [rbx+68h], 0
loc_3023E:
lea rdx, [rbx+40h]
mov rsi, [rbx+40h]
cmp rsi, rdx
jz short loc_30263
mov rdi, r14
call __ZNSt8__detail15_List_node_base11_M_transferEPS0_S1_; std::__detail::_List_node_base::_M_transfer(std::__detail::_List_node_base*,std::__detail::_List_node_base*)
mov rax, [rbx+50h]
add [rbx+38h], rax
mov qword ptr [rbx+50h], 0
loc_30263:
add rsp, 8
pop rbx
pop r14
retn
|
long long testing::internal::edit_distance::`anonymous namespace'::Hunk::FlushEdits(
testing::internal::edit_distance::_anonymous_namespace_::Hunk *this)
{
long long result; // rax
if ( *((testing::internal::edit_distance::_anonymous_namespace_::Hunk **)this + 11) != (testing::internal::edit_distance::_anonymous_namespace_::Hunk *)((char *)this + 88) )
{
std::__detail::_List_node_base::_M_transfer((char *)this + 40);
result = *((_QWORD *)this + 13);
*((_QWORD *)this + 7) += result;
*((_QWORD *)this + 13) = 0LL;
}
if ( *((testing::internal::edit_distance::_anonymous_namespace_::Hunk **)this + 8) != (testing::internal::edit_distance::_anonymous_namespace_::Hunk *)((char *)this + 64) )
{
std::__detail::_List_node_base::_M_transfer((char *)this + 40);
result = *((_QWORD *)this + 10);
*((_QWORD *)this + 7) += result;
*((_QWORD *)this + 10) = 0LL;
}
return result;
}
|
FlushEdits:
PUSH R14
PUSH RBX
PUSH RAX
MOV RBX,RDI
LEA R14,[RDI + 0x28]
LEA RDX,[RDI + 0x58]
MOV RSI,qword ptr [RDI + 0x58]
CMP RSI,RDX
JZ 0x0013023e
MOV RDI,R14
CALL 0x00108240
MOV RAX,qword ptr [RBX + 0x68]
ADD qword ptr [RBX + 0x38],RAX
MOV qword ptr [RBX + 0x68],0x0
LAB_0013023e:
LEA RDX,[RBX + 0x40]
MOV RSI,qword ptr [RBX + 0x40]
CMP RSI,RDX
JZ 0x00130263
MOV RDI,R14
CALL 0x00108240
MOV RAX,qword ptr [RBX + 0x50]
ADD qword ptr [RBX + 0x38],RAX
MOV qword ptr [RBX + 0x50],0x0
LAB_00130263:
ADD RSP,0x8
POP RBX
POP R14
RET
|
/* testing::internal::edit_distance::(anonymous namespace)::Hunk::FlushEdits() */
void __thiscall
testing::internal::edit_distance::(anonymous_namespace)::Hunk::FlushEdits(Hunk *this)
{
if (*(_List_node_base **)(this + 0x58) != (_List_node_base *)(this + 0x58)) {
std::__detail::_List_node_base::_M_transfer
((_List_node_base *)(this + 0x28),*(_List_node_base **)(this + 0x58));
*(long *)(this + 0x38) = *(long *)(this + 0x38) + *(long *)(this + 0x68);
*(int8 *)(this + 0x68) = 0;
}
if (*(_List_node_base **)(this + 0x40) != (_List_node_base *)(this + 0x40)) {
std::__detail::_List_node_base::_M_transfer
((_List_node_base *)(this + 0x28),*(_List_node_base **)(this + 0x40));
*(long *)(this + 0x38) = *(long *)(this + 0x38) + *(long *)(this + 0x50);
*(int8 *)(this + 0x50) = 0;
}
return;
}
|
|
57,201
|
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>>::operator->() const
|
llama.cpp/common/json.hpp
|
pointer operator->() const
{
JSON_ASSERT(m_object != nullptr);
switch (m_object->m_data.m_type)
{
case value_t::object:
{
JSON_ASSERT(m_it.object_iterator != m_object->m_data.m_value.object->end());
return &(m_it.object_iterator->second);
}
case value_t::array:
{
JSON_ASSERT(m_it.array_iterator != m_object->m_data.m_value.array->end());
return &*m_it.array_iterator;
}
case value_t::null:
case value_t::string:
case value_t::boolean:
case value_t::number_integer:
case value_t::number_unsigned:
case value_t::number_float:
case value_t::binary:
case value_t::discarded:
default:
{
if (JSON_HEDLEY_LIKELY(m_it.primitive_iterator.is_begin()))
{
return m_object;
}
JSON_THROW(invalid_iterator::create(214, "cannot get value", m_object));
}
}
}
|
O3
|
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>>::operator->() const:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x28, %rsp
movq (%rdi), %rax
testq %rax, %rax
je 0x96e29
movq %rdi, %r14
movzbl (%rax), %ecx
cmpl $0x2, %ecx
je 0x96d8c
cmpl $0x1, %ecx
jne 0x96db9
movq 0x8(%rax), %rcx
movq 0x8(%r14), %rax
cmpq 0x8(%rcx), %rax
je 0x96e45
addq $0x20, %rax
jmp 0x96dc0
movq 0x8(%rax), %rcx
movq 0x10(%r14), %rax
cmpq 0x8(%rcx), %rax
jne 0x96dc0
leaq 0x90b78(%rip), %rdi # 0x127919
leaq 0x88db0(%rip), %rdx # 0x11fb58
leaq 0x91bda(%rip), %rcx # 0x128989
movl $0x3397, %esi # imm = 0x3397
jmp 0x96e5f
cmpq $0x0, 0x18(%r14)
jne 0x96dcb
addq $0x28, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movl $0x20, %edi
callq 0x21690
movq %rax, %rbx
leaq 0x18(%rsp), %r15
movq %r15, -0x10(%r15)
leaq 0x91bde(%rip), %rsi # 0x1289c6
leaq 0x91be7(%rip), %rdx # 0x1289d6
leaq 0x8(%rsp), %rdi
callq 0x33c38
movq (%r14), %rcx
movb $0x1, %bpl
leaq 0x8(%rsp), %rdx
movq %rbx, %rdi
movl $0xd6, %esi
callq 0x97cf8
xorl %ebp, %ebp
leaq 0xd91e6(%rip), %rsi # 0x170000
leaq -0x12df1(%rip), %rdx # 0x84030
movq %rbx, %rdi
callq 0x21ad0
leaq 0x90ae9(%rip), %rdi # 0x127919
leaq 0x88d21(%rip), %rdx # 0x11fb58
leaq 0x96dd2(%rip), %rcx # 0x12dc10
movl $0x338b, %esi # imm = 0x338B
jmp 0x96e5f
leaq 0x90acd(%rip), %rdi # 0x127919
leaq 0x88d05(%rip), %rdx # 0x11fb58
leaq 0x91af0(%rip), %rcx # 0x12894a
movl $0x3391, %esi # imm = 0x3391
xorl %eax, %eax
callq 0x21ef0
movq %rax, %r14
movq 0x8(%rsp), %rdi
cmpq %r15, %rdi
je 0x96e80
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x21180
testb %bpl, %bpl
jne 0x96e8a
jmp 0x96e92
movq %rax, %r14
movq %rbx, %rdi
callq 0x21f80
movq %r14, %rdi
callq 0x21b70
|
_ZNK8nlohmann16json_abi_v3_11_36detail9iter_implINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEEptEv:
push rbp; void *
push r15; int
push r14; __int64
push rbx; int
sub rsp, 28h
mov rax, [rdi]
test rax, rax
jz loc_96E29
mov r14, rdi
movzx ecx, byte ptr [rax]
cmp ecx, 2
jz short loc_96D8C
cmp ecx, 1
jnz short loc_96DB9
mov rcx, [rax+8]
mov rax, [r14+8]
cmp rax, [rcx+8]
jz loc_96E45
add rax, 20h ; ' '
jmp short loc_96DC0
loc_96D8C:
mov rcx, [rax+8]
mov rax, [r14+10h]
cmp rax, [rcx+8]
jnz short loc_96DC0
lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/llama."...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aMItArrayIterat; "m_it.array_iterator != m_object->m_data"...
mov esi, 3397h
jmp loc_96E5F
loc_96DB9:
cmp qword ptr [r14+18h], 0
jnz short loc_96DCB
loc_96DC0:
add rsp, 28h
pop rbx
pop r14
pop r15
pop rbp
retn
loc_96DCB:
mov edi, 20h ; ' '; thrown_size
call ___cxa_allocate_exception
mov rbx, rax
lea r15, [rsp+48h+var_30]
mov [r15-10h], r15
lea rsi, aCannotGetValue; "cannot get value"
lea rdx, aCannotGetValue+10h; ""
lea rdi, [rsp+48h+var_40]
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag; std::string::_M_construct<char const*>(char const*,char const*,std::forward_iterator_tag)
mov rcx, [r14]
mov bpl, 1
lea rdx, [rsp+48h+var_40]
mov rdi, rbx; this
mov esi, 0D6h; int
call _ZN8nlohmann16json_abi_v3_11_36detail16invalid_iterator6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_
xor ebp, ebp
lea rsi, _ZTIN8nlohmann16json_abi_v3_11_36detail16invalid_iteratorE; lptinfo
lea rdx, _ZN8nlohmann16json_abi_v3_11_36detail9exceptionD2Ev; void (*)(void *)
mov rdi, rbx; void *
call ___cxa_throw
loc_96E29:
lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/llama."...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aAnchorMObjectN+7; "m_object != nullptr"
mov esi, 338Bh
jmp short loc_96E5F
loc_96E45:
lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/llama."...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aMItObjectItera; "m_it.object_iterator != m_object->m_dat"...
mov esi, 3391h
loc_96E5F:
xor eax, eax
call _ggml_abort
mov r14, rax
mov rdi, [rsp+48h+var_40]; void *
cmp rdi, r15
jz short loc_96E80
mov rsi, [rsp+48h+var_30]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_96E80:
test bpl, bpl
jnz short loc_96E8A
jmp short loc_96E92
mov r14, rax
loc_96E8A:
mov rdi, rbx; void *
call ___cxa_free_exception
loc_96E92:
mov rdi, r14
call __Unwind_Resume
|
operator->:
PUSH RBP
PUSH R15
PUSH R14
PUSH RBX
SUB RSP,0x28
MOV RAX,qword ptr [RDI]
TEST RAX,RAX
JZ 0x00196e29
MOV R14,RDI
MOVZX ECX,byte ptr [RAX]
CMP ECX,0x2
JZ 0x00196d8c
CMP ECX,0x1
JNZ 0x00196db9
MOV RCX,qword ptr [RAX + 0x8]
MOV RAX,qword ptr [R14 + 0x8]
CMP RAX,qword ptr [RCX + 0x8]
JZ 0x00196e45
ADD RAX,0x20
JMP 0x00196dc0
LAB_00196d8c:
MOV RCX,qword ptr [RAX + 0x8]
MOV RAX,qword ptr [R14 + 0x10]
CMP RAX,qword ptr [RCX + 0x8]
JNZ 0x00196dc0
LEA RDI,[0x227919]
LEA RDX,[0x21fb58]
LEA RCX,[0x228989]
MOV ESI,0x3397
JMP 0x00196e5f
LAB_00196db9:
CMP qword ptr [R14 + 0x18],0x0
JNZ 0x00196dcb
LAB_00196dc0:
ADD RSP,0x28
POP RBX
POP R14
POP R15
POP RBP
RET
LAB_00196dcb:
MOV EDI,0x20
CALL 0x00121690
MOV RBX,RAX
LEA R15,[RSP + 0x18]
MOV qword ptr [R15 + -0x10],R15
LAB_00196de1:
LEA RSI,[0x2289c6]
LEA RDX,[0x2289d6]
LEA RDI,[RSP + 0x8]
CALL 0x00133c38
MOV RCX,qword ptr [R14]
MOV BPL,0x1
LAB_00196dff:
LEA RDX,[RSP + 0x8]
MOV RDI,RBX
MOV ESI,0xd6
CALL 0x00197cf8
XOR EBP,EBP
LEA RSI,[0x270000]
LEA RDX,[0x184030]
MOV RDI,RBX
CALL 0x00121ad0
LAB_00196e29:
LEA RDI,[0x227919]
LEA RDX,[0x21fb58]
LEA RCX,[0x22dc10]
MOV ESI,0x338b
JMP 0x00196e5f
LAB_00196e45:
LEA RDI,[0x227919]
LEA RDX,[0x21fb58]
LEA RCX,[0x22894a]
MOV ESI,0x3391
LAB_00196e5f:
XOR EAX,EAX
CALL 0x00121ef0
|
/* 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> >::TEMPNAMEPLACEHOLDERVALUE() const */
char * __thiscall
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>>
::operator->(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>>
*this)
{
long *plVar1;
char *pcVar2;
int8 uVar3;
int1 *local_40 [2];
int1 local_30 [16];
pcVar2 = *(char **)this;
if (pcVar2 == (char *)0x0) {
pcVar2 = "m_object != nullptr";
uVar3 = 0x338b;
LAB_00196e5f:
/* WARNING: Subroutine does not return */
ggml_abort("/workspace/llm4binary/github2025/llama.cpp/common/json.hpp",uVar3,
"GGML_ASSERT(%s) failed",pcVar2);
}
if (*pcVar2 == '\x02') {
plVar1 = (long *)(pcVar2 + 8);
pcVar2 = *(char **)(this + 0x10);
if (pcVar2 == *(char **)(*plVar1 + 8)) {
pcVar2 = "m_it.array_iterator != m_object->m_data.m_value.array->end()";
uVar3 = 0x3397;
goto LAB_00196e5f;
}
}
else if (*pcVar2 == '\x01') {
if (*(long *)(this + 8) == *(long *)(*(long *)(pcVar2 + 8) + 8)) {
pcVar2 = "m_it.object_iterator != m_object->m_data.m_value.object->end()";
uVar3 = 0x3391;
goto LAB_00196e5f;
}
pcVar2 = (char *)(*(long *)(this + 8) + 0x20);
}
else if (*(long *)(this + 0x18) != 0) {
uVar3 = __cxa_allocate_exception(0x20);
local_40[0] = local_30;
/* try { // try from 00196de1 to 00196df8 has its CatchHandler @ 00196e87 */
std::__cxx11::string::_M_construct<char_const*>(local_40,"cannot get value","");
/* try { // try from 00196dff to 00196e28 has its CatchHandler @ 00196e66 */
_ZN8nlohmann16json_abi_v3_11_36detail16invalid_iterator6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_
(uVar3,0xd6,local_40,*(int8 *)this);
/* WARNING: Subroutine does not return */
__cxa_throw(uVar3,&invalid_iterator::typeinfo,exception::~exception);
}
return pcVar2;
}
|
||
57,202
|
Shell::vectorToCharArray(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>>>> const&)
|
isaiah76[P]linux-shell/src/Shell.cpp
|
char** Shell::vectorToCharArray(const std::vector<std::string>& tokens){
char** args = new char*[tokens.size() + 1];
for (size_t i = 0; i < tokens.size(); i++){
args[i] = new char[tokens[i].length() + 1];
strcpy(args[i], tokens[i].c_str());
}
args[tokens.size()] = nullptr;
return args;
}
|
O0
|
cpp
|
Shell::vectorToCharArray(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>>>> const&):
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rdi
callq 0x4610
addq $0x1, %rax
movl $0x8, %ecx
mulq %rcx
movq %rax, %rdi
seto %cl
movq $-0x1, %rax
testb $0x1, %cl
cmovneq %rax, %rdi
callq 0x3030
movq %rax, -0x18(%rbp)
movq $0x0, -0x20(%rbp)
movq -0x20(%rbp), %rax
movq %rax, -0x28(%rbp)
movq -0x10(%rbp), %rdi
callq 0x4610
movq %rax, %rcx
movq -0x28(%rbp), %rax
cmpq %rcx, %rax
jae 0x3df9
movq -0x10(%rbp), %rdi
movq -0x20(%rbp), %rsi
callq 0x4630
movq %rax, %rdi
callq 0x3480
movq %rax, %rdi
addq $0x1, %rdi
callq 0x3030
movq %rax, %rdx
movq -0x18(%rbp), %rax
movq -0x20(%rbp), %rcx
movq %rdx, (%rax,%rcx,8)
movq -0x18(%rbp), %rax
movq -0x20(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq %rax, -0x30(%rbp)
movq -0x10(%rbp), %rdi
movq -0x20(%rbp), %rsi
callq 0x4630
movq %rax, %rdi
callq 0x3140
movq -0x30(%rbp), %rdi
movq %rax, %rsi
callq 0x32a0
movq -0x20(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x20(%rbp)
jmp 0x3d6a
movq -0x18(%rbp), %rax
movq %rax, -0x38(%rbp)
movq -0x10(%rbp), %rdi
callq 0x4610
movq %rax, %rcx
movq -0x38(%rbp), %rax
movq $0x0, (%rax,%rcx,8)
movq -0x18(%rbp), %rax
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
|
_ZN5Shell17vectorToCharArrayERKSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS6_EE:
push rbp
mov rbp, rsp
sub rsp, 40h
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov rdi, [rbp+var_10]
call _ZNKSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE4sizeEv; std::vector<std::string>::size(void)
add rax, 1
mov ecx, 8
mul rcx
mov rdi, rax
seto cl
mov rax, 0FFFFFFFFFFFFFFFFh
test cl, 1
cmovnz rdi, rax; unsigned __int64
call __Znam; operator new[](ulong)
mov [rbp+var_18], rax
mov [rbp+var_20], 0
loc_3D6A:
mov rax, [rbp+var_20]
mov [rbp+var_28], rax
mov rdi, [rbp+var_10]
call _ZNKSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE4sizeEv; std::vector<std::string>::size(void)
mov rcx, rax
mov rax, [rbp+var_28]
cmp rax, rcx
jnb short loc_3DF9
mov rdi, [rbp+var_10]
mov rsi, [rbp+var_20]
call _ZNKSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EEixEm; std::vector<std::string>::operator[](ulong)
mov rdi, rax
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6lengthEv; std::string::length(void)
mov rdi, rax
add rdi, 1; unsigned __int64
call __Znam; operator new[](ulong)
mov rdx, rax
mov rax, [rbp+var_18]
mov rcx, [rbp+var_20]
mov [rax+rcx*8], rdx
mov rax, [rbp+var_18]
mov rcx, [rbp+var_20]
mov rax, [rax+rcx*8]
mov [rbp+var_30], rax
mov rdi, [rbp+var_10]
mov rsi, [rbp+var_20]
call _ZNKSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EEixEm; std::vector<std::string>::operator[](ulong)
mov rdi, rax
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5c_strEv; std::string::c_str(void)
mov rdi, [rbp+var_30]
mov rsi, rax
call _strcpy
mov rax, [rbp+var_20]
add rax, 1
mov [rbp+var_20], rax
jmp loc_3D6A
loc_3DF9:
mov rax, [rbp+var_18]
mov [rbp+var_38], rax
mov rdi, [rbp+var_10]
call _ZNKSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE4sizeEv; std::vector<std::string>::size(void)
mov rcx, rax
mov rax, [rbp+var_38]
mov qword ptr [rax+rcx*8], 0
mov rax, [rbp+var_18]
add rsp, 40h
pop rbp
retn
|
long long Shell::vectorToCharArray(long long a1, long long a2)
{
unsigned long long v2; // rdi
long long v3; // rax
long long v4; // rax
long long v5; // rax
long long v6; // rax
long long v8; // [rsp+10h] [rbp-30h]
unsigned long long i; // [rsp+20h] [rbp-20h]
long long v10; // [rsp+28h] [rbp-18h]
v2 = saturated_mul(8uLL, std::vector<std::string>::size(a2) + 1);
v10 = operator new[](v2);
for ( i = 0LL; i < std::vector<std::string>::size(a2); ++i )
{
v3 = std::vector<std::string>::operator[](a2, i);
v4 = std::string::length(v3);
*(_QWORD *)(v10 + 8 * i) = operator new[](v4 + 1);
v8 = *(_QWORD *)(v10 + 8 * i);
v5 = std::vector<std::string>::operator[](a2, i);
v6 = std::string::c_str(v5);
strcpy(v8, v6);
}
*(_QWORD *)(v10 + 8 * std::vector<std::string>::size(a2)) = 0LL;
return v10;
}
|
vectorToCharArray:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x40
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV RDI,qword ptr [RBP + -0x10]
CALL 0x00104610
ADD RAX,0x1
MOV ECX,0x8
MUL RCX
MOV RDI,RAX
SETO CL
MOV RAX,-0x1
TEST CL,0x1
CMOVNZ RDI,RAX
CALL 0x00103030
MOV qword ptr [RBP + -0x18],RAX
MOV qword ptr [RBP + -0x20],0x0
LAB_00103d6a:
MOV RAX,qword ptr [RBP + -0x20]
MOV qword ptr [RBP + -0x28],RAX
MOV RDI,qword ptr [RBP + -0x10]
CALL 0x00104610
MOV RCX,RAX
MOV RAX,qword ptr [RBP + -0x28]
CMP RAX,RCX
JNC 0x00103df9
MOV RDI,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RBP + -0x20]
CALL 0x00104630
MOV RDI,RAX
CALL 0x00103480
MOV RDI,RAX
ADD RDI,0x1
CALL 0x00103030
MOV RDX,RAX
MOV RAX,qword ptr [RBP + -0x18]
MOV RCX,qword ptr [RBP + -0x20]
MOV qword ptr [RAX + RCX*0x8],RDX
MOV RAX,qword ptr [RBP + -0x18]
MOV RCX,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RAX + RCX*0x8]
MOV qword ptr [RBP + -0x30],RAX
MOV RDI,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RBP + -0x20]
CALL 0x00104630
MOV RDI,RAX
CALL 0x00103140
MOV RDI,qword ptr [RBP + -0x30]
MOV RSI,RAX
CALL 0x001032a0
MOV RAX,qword ptr [RBP + -0x20]
ADD RAX,0x1
MOV qword ptr [RBP + -0x20],RAX
JMP 0x00103d6a
LAB_00103df9:
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RBP + -0x38],RAX
MOV RDI,qword ptr [RBP + -0x10]
CALL 0x00104610
MOV RCX,RAX
MOV RAX,qword ptr [RBP + -0x38]
MOV qword ptr [RAX + RCX*0x8],0x0
MOV RAX,qword ptr [RBP + -0x18]
ADD RSP,0x40
POP RBP
RET
|
/* Shell::vectorToCharArray(std::vector<std::__cxx11::string, std::allocator<std::__cxx11::string >
> const&) */
void * __thiscall Shell::vectorToCharArray(Shell *this,vector *param_1)
{
char *__dest;
int1 auVar1 [16];
long lVar2;
ulong uVar3;
void *pvVar4;
void *pvVar5;
char *__src;
int8 local_28;
lVar2 = std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::size
((vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *)param_1);
auVar1._8_8_ = 0;
auVar1._0_8_ = lVar2 + 1;
uVar3 = SUB168(auVar1 * ZEXT816(8),0);
if (SUB168(auVar1 * ZEXT816(8),8) != 0) {
uVar3 = 0xffffffffffffffff;
}
pvVar4 = operator_new__(uVar3);
local_28 = 0;
while( true ) {
uVar3 = std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::size
((vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *)param_1)
;
if (uVar3 <= local_28) break;
std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::operator[]
((vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *)param_1,local_28
);
lVar2 = std::__cxx11::string::length();
pvVar5 = operator_new__(lVar2 + 1);
*(void **)((long)pvVar4 + local_28 * 8) = pvVar5;
__dest = *(char **)((long)pvVar4 + local_28 * 8);
std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::operator[]
((vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *)param_1,local_28
);
__src = (char *)std::__cxx11::string::c_str();
strcpy(__dest,__src);
local_28 = local_28 + 1;
}
lVar2 = std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::size
((vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *)param_1);
*(int8 *)((long)pvVar4 + lVar2 * 8) = 0;
return pvVar4;
}
|
|
57,203
|
calc_hashnr
|
eloqsql/libmariadb/libmariadb/ma_hashtbl.c
|
static uint calc_hashnr(const uchar *key,uint length)
{
register uint nr=1, nr2=4;
while (length--)
{
nr^= (((nr & 63)+nr2)*((uint) (uchar) *key++))+ (nr << 8);
nr2+=3;
}
return((uint) nr);
}
|
O0
|
c
|
calc_hashnr:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movl $0x1, -0x10(%rbp)
movl $0x4, -0x14(%rbp)
movl -0xc(%rbp), %eax
movl %eax, %ecx
addl $-0x1, %ecx
movl %ecx, -0xc(%rbp)
cmpl $0x0, %eax
je 0x1d120
movl -0x10(%rbp), %eax
andl $0x3f, %eax
addl -0x14(%rbp), %eax
movq -0x8(%rbp), %rcx
movq %rcx, %rdx
addq $0x1, %rdx
movq %rdx, -0x8(%rbp)
movzbl (%rcx), %ecx
imull %ecx, %eax
movl -0x10(%rbp), %ecx
shll $0x8, %ecx
addl %ecx, %eax
xorl -0x10(%rbp), %eax
movl %eax, -0x10(%rbp)
movl -0x14(%rbp), %eax
addl $0x3, %eax
movl %eax, -0x14(%rbp)
jmp 0x1d0d9
movl -0x10(%rbp), %eax
popq %rbp
retq
nopw %cs:(%rax,%rax)
|
calc_hashnr:
push rbp
mov rbp, rsp
mov [rbp+var_8], rdi
mov [rbp+var_C], esi
mov [rbp+var_10], 1
mov [rbp+var_14], 4
loc_1D0D9:
mov eax, [rbp+var_C]
mov ecx, eax
add ecx, 0FFFFFFFFh
mov [rbp+var_C], ecx
cmp eax, 0
jz short loc_1D120
mov eax, [rbp+var_10]
and eax, 3Fh
add eax, [rbp+var_14]
mov rcx, [rbp+var_8]
mov rdx, rcx
add rdx, 1
mov [rbp+var_8], rdx
movzx ecx, byte ptr [rcx]
imul eax, ecx
mov ecx, [rbp+var_10]
shl ecx, 8
add eax, ecx
xor eax, [rbp+var_10]
mov [rbp+var_10], eax
mov eax, [rbp+var_14]
add eax, 3
mov [rbp+var_14], eax
jmp short loc_1D0D9
loc_1D120:
mov eax, [rbp+var_10]
pop rbp
retn
|
long long calc_hashnr(unsigned __int8 *a1, int a2)
{
unsigned __int8 *v3; // rcx
int i; // [rsp+0h] [rbp-14h]
unsigned int v6; // [rsp+4h] [rbp-10h]
v6 = 1;
for ( i = 4; a2--; i += 3 )
{
v3 = a1++;
v6 ^= (v6 << 8) + *v3 * (i + (v6 & 0x3F));
}
return v6;
}
|
calc_hashnr:
PUSH RBP
MOV RBP,RSP
MOV qword ptr [RBP + -0x8],RDI
MOV dword ptr [RBP + -0xc],ESI
MOV dword ptr [RBP + -0x10],0x1
MOV dword ptr [RBP + -0x14],0x4
LAB_0011d0d9:
MOV EAX,dword ptr [RBP + -0xc]
MOV ECX,EAX
ADD ECX,-0x1
MOV dword ptr [RBP + -0xc],ECX
CMP EAX,0x0
JZ 0x0011d120
MOV EAX,dword ptr [RBP + -0x10]
AND EAX,0x3f
ADD EAX,dword ptr [RBP + -0x14]
MOV RCX,qword ptr [RBP + -0x8]
MOV RDX,RCX
ADD RDX,0x1
MOV qword ptr [RBP + -0x8],RDX
MOVZX ECX,byte ptr [RCX]
IMUL EAX,ECX
MOV ECX,dword ptr [RBP + -0x10]
SHL ECX,0x8
ADD EAX,ECX
XOR EAX,dword ptr [RBP + -0x10]
MOV dword ptr [RBP + -0x10],EAX
MOV EAX,dword ptr [RBP + -0x14]
ADD EAX,0x3
MOV dword ptr [RBP + -0x14],EAX
JMP 0x0011d0d9
LAB_0011d120:
MOV EAX,dword ptr [RBP + -0x10]
POP RBP
RET
|
uint calc_hashnr(byte *param_1,int param_2)
{
int local_1c;
uint local_18;
int local_14;
byte *local_10;
local_18 = 1;
local_1c = 4;
local_14 = param_2;
local_10 = param_1;
while (local_14 != 0) {
local_18 = ((local_18 & 0x3f) + local_1c) * (uint)*local_10 + local_18 * 0x100 ^ local_18;
local_1c = local_1c + 3;
local_14 = local_14 + -1;
local_10 = local_10 + 1;
}
return local_18;
}
|
|
57,204
|
my_rw_tryrdlock
|
eloqsql/mysys/thr_rwlock.c
|
int my_rw_tryrdlock(my_rw_lock_t *rwp)
{
int res;
pthread_mutex_lock(&rwp->lock);
if ((rwp->state < 0 ) || rwp->waiters)
res= EBUSY; /* Can't get lock */
else
{
res=0;
rwp->state++;
}
pthread_mutex_unlock(&rwp->lock);
return(res);
}
|
O3
|
c
|
my_rw_tryrdlock:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
callq 0x24510
movl 0x88(%rbx), %eax
movl $0x10, %r14d
testl %eax, %eax
js 0x31fd5
cmpl $0x0, 0x8c(%rbx)
jne 0x31fd5
incl %eax
movl %eax, 0x88(%rbx)
xorl %r14d, %r14d
movq %rbx, %rdi
callq 0x24260
movl %r14d, %eax
popq %rbx
popq %r14
popq %rbp
retq
|
my_rw_tryrdlock:
push rbp
mov rbp, rsp
push r14
push rbx
mov rbx, rdi
call _pthread_mutex_lock
mov eax, [rbx+88h]
mov r14d, 10h
test eax, eax
js short loc_31FD5
cmp dword ptr [rbx+8Ch], 0
jnz short loc_31FD5
inc eax
mov [rbx+88h], eax
xor r14d, r14d
loc_31FD5:
mov rdi, rbx
call _pthread_mutex_unlock
mov eax, r14d
pop rbx
pop r14
pop rbp
retn
|
long long my_rw_tryrdlock(long long a1)
{
int v1; // eax
unsigned int v2; // r14d
pthread_mutex_lock(a1);
v1 = *(_DWORD *)(a1 + 136);
v2 = 16;
if ( v1 >= 0 && !*(_DWORD *)(a1 + 140) )
{
*(_DWORD *)(a1 + 136) = v1 + 1;
v2 = 0;
}
pthread_mutex_unlock(a1);
return v2;
}
|
my_rw_tryrdlock:
PUSH RBP
MOV RBP,RSP
PUSH R14
PUSH RBX
MOV RBX,RDI
CALL 0x00124510
MOV EAX,dword ptr [RBX + 0x88]
MOV R14D,0x10
TEST EAX,EAX
JS 0x00131fd5
CMP dword ptr [RBX + 0x8c],0x0
JNZ 0x00131fd5
INC EAX
MOV dword ptr [RBX + 0x88],EAX
XOR R14D,R14D
LAB_00131fd5:
MOV RDI,RBX
CALL 0x00124260
MOV EAX,R14D
POP RBX
POP R14
POP RBP
RET
|
int8 my_rw_tryrdlock(pthread_mutex_t *param_1)
{
int8 uVar1;
pthread_mutex_lock(param_1);
uVar1 = 0x10;
if ((-1 < *(int *)((long)param_1 + 0x88)) && (*(int *)((long)param_1 + 0x8c) == 0)) {
*(int *)((long)param_1 + 0x88) = *(int *)((long)param_1 + 0x88) + 1;
uVar1 = 0;
}
pthread_mutex_unlock(param_1);
return uVar1;
}
|
|
57,205
|
lf_hash_destroy
|
eloqsql/mysys/lf_hash.cc
|
void lf_hash_destroy(LF_HASH *hash)
{
LF_SLIST *el, **head= (LF_SLIST **)lf_dynarray_value(&hash->array, 0);
if (head)
{
el= *head;
while (el)
{
intptr next= el->link;
if (el->hashnr & 1)
lf_alloc_direct_free(&hash->alloc, el); /* normal node */
else
my_free(el); /* dummy node */
el= (LF_SLIST *)next;
}
}
lf_alloc_destroy(&hash->alloc);
lf_dynarray_destroy(&hash->array);
}
|
O0
|
cpp
|
lf_hash_destroy:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rdi
xorl %esi, %esi
callq 0x5e7d0
movq %rax, -0x18(%rbp)
cmpq $0x0, -0x18(%rbp)
je 0x5ec3f
movq -0x18(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x10(%rbp)
cmpq $0x0, -0x10(%rbp)
je 0x5ec3d
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x20(%rbp)
movq -0x10(%rbp), %rax
movl 0x18(%rax), %eax
andl $0x1, %eax
cmpl $0x0, %eax
je 0x5ec2a
jmp 0x5ec00
movq -0x8(%rbp), %rax
cmpq $0x0, 0x88(%rax)
je 0x5ec1f
movq -0x8(%rbp), %rax
movq 0x88(%rax), %rax
movq -0x10(%rbp), %rdi
callq *%rax
movq -0x10(%rbp), %rdi
callq 0x5b4b0
jmp 0x5ec33
movq -0x10(%rbp), %rdi
callq 0x5b4b0
movq -0x20(%rbp), %rax
movq %rax, -0x10(%rbp)
jmp 0x5ebdd
jmp 0x5ec3f
movq -0x8(%rbp), %rdi
addq $0x28, %rdi
callq 0x5dff0
movq -0x8(%rbp), %rdi
callq 0x5e410
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax,%rax)
|
lf_hash_destroy:
push rbp
mov rbp, rsp
sub rsp, 20h
mov [rbp+var_8], rdi
mov rdi, [rbp+var_8]
xor esi, esi
call lf_dynarray_value
mov [rbp+var_18], rax
cmp [rbp+var_18], 0
jz short loc_5EC3F
mov rax, [rbp+var_18]
mov rax, [rax]
mov [rbp+var_10], rax
loc_5EBDD:
cmp [rbp+var_10], 0
jz short loc_5EC3D
mov rax, [rbp+var_10]
mov rax, [rax]
mov [rbp+var_20], rax
mov rax, [rbp+var_10]
mov eax, [rax+18h]
and eax, 1
cmp eax, 0
jz short loc_5EC2A
jmp short $+2
loc_5EC00:
mov rax, [rbp+var_8]
cmp qword ptr [rax+88h], 0
jz short loc_5EC1F
mov rax, [rbp+var_8]
mov rax, [rax+88h]
mov rdi, [rbp+var_10]
call rax
loc_5EC1F:
mov rdi, [rbp+var_10]
call my_free
jmp short loc_5EC33
loc_5EC2A:
mov rdi, [rbp+var_10]
call my_free
loc_5EC33:
mov rax, [rbp+var_20]
mov [rbp+var_10], rax
jmp short loc_5EBDD
loc_5EC3D:
jmp short $+2
loc_5EC3F:
mov rdi, [rbp+var_8]
add rdi, 28h ; '('
call lf_alloc_destroy
mov rdi, [rbp+var_8]
call lf_dynarray_destroy
add rsp, 20h
pop rbp
retn
|
long long lf_hash_destroy(long long a1)
{
long long v2; // [rsp+0h] [rbp-20h]
long long *v3; // [rsp+8h] [rbp-18h]
long long i; // [rsp+10h] [rbp-10h]
v3 = (long long *)lf_dynarray_value(a1, 0);
if ( v3 )
{
for ( i = *v3; i; i = v2 )
{
v2 = *(_QWORD *)i;
if ( (*(_DWORD *)(i + 24) & 1) != 0 )
{
if ( *(_QWORD *)(a1 + 136) )
(*(void ( **)(long long))(a1 + 136))(i);
}
my_free(i);
}
}
lf_alloc_destroy(a1 + 40);
return lf_dynarray_destroy(a1);
}
|
lf_hash_destroy:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x20
MOV qword ptr [RBP + -0x8],RDI
MOV RDI,qword ptr [RBP + -0x8]
XOR ESI,ESI
CALL 0x0015e7d0
MOV qword ptr [RBP + -0x18],RAX
CMP qword ptr [RBP + -0x18],0x0
JZ 0x0015ec3f
MOV RAX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x10],RAX
LAB_0015ebdd:
CMP qword ptr [RBP + -0x10],0x0
JZ 0x0015ec3d
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x20],RAX
MOV RAX,qword ptr [RBP + -0x10]
MOV EAX,dword ptr [RAX + 0x18]
AND EAX,0x1
CMP EAX,0x0
JZ 0x0015ec2a
JMP 0x0015ec00
LAB_0015ec00:
MOV RAX,qword ptr [RBP + -0x8]
CMP qword ptr [RAX + 0x88],0x0
JZ 0x0015ec1f
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX + 0x88]
MOV RDI,qword ptr [RBP + -0x10]
CALL RAX
LAB_0015ec1f:
MOV RDI,qword ptr [RBP + -0x10]
CALL 0x0015b4b0
JMP 0x0015ec33
LAB_0015ec2a:
MOV RDI,qword ptr [RBP + -0x10]
CALL 0x0015b4b0
LAB_0015ec33:
MOV RAX,qword ptr [RBP + -0x20]
MOV qword ptr [RBP + -0x10],RAX
JMP 0x0015ebdd
LAB_0015ec3d:
JMP 0x0015ec3f
LAB_0015ec3f:
MOV RDI,qword ptr [RBP + -0x8]
ADD RDI,0x28
CALL 0x0015dff0
MOV RDI,qword ptr [RBP + -0x8]
CALL 0x0015e410
ADD RSP,0x20
POP RBP
RET
|
void lf_hash_destroy(long param_1)
{
int8 *puVar1;
int8 *local_18;
puVar1 = (int8 *)lf_dynarray_value(param_1,0);
if (puVar1 != (int8 *)0x0) {
local_18 = (int8 *)*puVar1;
while (local_18 != (int8 *)0x0) {
puVar1 = (int8 *)*local_18;
if ((*(uint *)(local_18 + 3) & 1) == 0) {
my_free(local_18);
local_18 = puVar1;
}
else {
if (*(long *)(param_1 + 0x88) != 0) {
(**(code **)(param_1 + 0x88))(local_18);
}
my_free(local_18);
local_18 = puVar1;
}
}
}
lf_alloc_destroy(param_1 + 0x28);
lf_dynarray_destroy(param_1);
return;
}
|
|
57,206
|
(anonymous namespace)::msgpack23_FloatTypePacking_Test::~msgpack23_FloatTypePacking_Test()
|
msgpack23/tests/type_packing_tests.cpp
|
TEST(msgpack23, FloatTypePacking) {
for (auto i = -5; i < 5; ++i) {
float expected = 5.0f + static_cast<float>(i) * 23456.78f / 3.14f;
msgpack23::Packer packer{};
auto data = packer(expected);
msgpack23::Unpacker unpacker{data};
float actual{};
unpacker(actual);
EXPECT_EQ(expected, actual);
}
for (auto i = -5; i < 5; ++i) {
float expected = static_cast<float>(i) * std::pow(0.1f, std::abs(i));
msgpack23::Packer packer{};
auto data = packer(expected);
msgpack23::Unpacker unpacker{data};
float actual{};
unpacker(actual);
EXPECT_EQ(expected, actual);
}
}
|
O0
|
cpp
|
(anonymous namespace)::msgpack23_FloatTypePacking_Test::~msgpack23_FloatTypePacking_Test():
pushq %rbp
movq %rsp, %rbp
subq $0x170, %rsp # imm = 0x170
movq %rdi, -0x8(%rbp)
movl $0xfffffffb, -0xc(%rbp) # imm = 0xFFFFFFFB
cmpl $0x5, -0xc(%rbp)
jge 0x74205
cvtsi2ssl -0xc(%rbp), %xmm0
movss 0x5dd93(%rip), %xmm1 # 0xd1d90
mulss %xmm1, %xmm0
movss 0x5dd8b(%rip), %xmm1 # 0xd1d94
divss %xmm1, %xmm0
movss 0x5dd83(%rip), %xmm1 # 0xd1d98
addss %xmm1, %xmm0
movss %xmm0, -0x10(%rbp)
xorps %xmm0, %xmm0
movaps %xmm0, -0x20(%rbp)
movaps %xmm0, -0x30(%rbp)
leaq -0x30(%rbp), %rdi
movq %rdi, -0x140(%rbp)
callq 0x25b20
movq -0x140(%rbp), %rsi
leaq -0x48(%rbp), %rdi
leaq -0x10(%rbp), %rdx
callq 0x411c0
jmp 0x7404f
leaq -0x80(%rbp), %rdi
leaq -0x48(%rbp), %rsi
callq 0x25ba0
movq -0x80(%rbp), %rsi
movq -0x78(%rbp), %rdx
leaq -0x70(%rbp), %rdi
callq 0x25c00
jmp 0x7406f
movl $0x0, -0x84(%rbp)
leaq -0x70(%rbp), %rdi
leaq -0x84(%rbp), %rsi
callq 0x410c0
jmp 0x7408b
leaq 0x5a04f(%rip), %rsi # 0xce0e1
leaq 0x5a041(%rip), %rdx # 0xce0da
leaq -0x98(%rbp), %rdi
leaq -0x10(%rbp), %rcx
leaq -0x84(%rbp), %r8
callq 0x68690
jmp 0x740b2
leaq -0x98(%rbp), %rdi
callq 0x25cb0
movb %al, -0x141(%rbp)
jmp 0x740c6
movb -0x141(%rbp), %al
testb $0x1, %al
jne 0x740d2
jmp 0x7410a
jmp 0x741b6
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x50(%rbp)
movl %eax, -0x54(%rbp)
jmp 0x741f7
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x50(%rbp)
movl %eax, -0x54(%rbp)
jmp 0x741ee
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x50(%rbp)
movl %eax, -0x54(%rbp)
jmp 0x741e2
leaq -0xa0(%rbp), %rdi
callq 0xa24e0
jmp 0x74118
leaq -0x98(%rbp), %rdi
callq 0x25cd0
movq %rax, -0x150(%rbp)
jmp 0x7412d
movq -0x150(%rbp), %r8
leaq 0x5dcde(%rip), %rdx # 0xd1e19
leaq -0xa8(%rbp), %rdi
movl $0x1, %esi
movl $0x15, %ecx
callq 0x9dfc0
jmp 0x74153
leaq -0xa8(%rbp), %rdi
leaq -0xa0(%rbp), %rsi
callq 0xbf100
jmp 0x74168
leaq -0xa8(%rbp), %rdi
callq 0x9e050
leaq -0xa0(%rbp), %rdi
callq 0x25cf0
jmp 0x741b6
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x50(%rbp)
movl %eax, -0x54(%rbp)
jmp 0x741a8
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x50(%rbp)
movl %eax, -0x54(%rbp)
leaq -0xa8(%rbp), %rdi
callq 0x9e050
leaq -0xa0(%rbp), %rdi
callq 0x25cf0
jmp 0x741e2
leaq -0x98(%rbp), %rdi
callq 0x25d10
leaq -0x48(%rbp), %rdi
callq 0x25d90
leaq -0x30(%rbp), %rdi
callq 0x25df0
movl -0xc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xc(%rbp)
jmp 0x73fe6
leaq -0x98(%rbp), %rdi
callq 0x25d10
leaq -0x48(%rbp), %rdi
callq 0x25d90
leaq -0x30(%rbp), %rdi
callq 0x25df0
jmp 0x74484
movl $0xfffffffb, -0xac(%rbp) # imm = 0xFFFFFFFB
cmpl $0x5, -0xac(%rbp)
jge 0x7447b
movl -0xac(%rbp), %edi
cvtsi2ss %edi, %xmm0
cvtss2sd %xmm0, %xmm0
movsd %xmm0, -0x160(%rbp)
movl %edi, %eax
negl %eax
cmovnsl %eax, %edi
movss 0x5db4b(%rip), %xmm0 # 0xd1d8c
callq 0x792b0
movaps %xmm0, %xmm1
movsd -0x160(%rbp), %xmm0
mulsd %xmm1, %xmm0
cvtsd2ss %xmm0, %xmm0
movss %xmm0, -0xb0(%rbp)
xorps %xmm0, %xmm0
movaps %xmm0, -0xc0(%rbp)
movaps %xmm0, -0xd0(%rbp)
leaq -0xd0(%rbp), %rdi
movq %rdi, -0x158(%rbp)
callq 0x25b20
movq -0x158(%rbp), %rsi
leaq -0xe8(%rbp), %rdi
leaq -0xb0(%rbp), %rdx
callq 0x411c0
jmp 0x742a1
leaq -0x110(%rbp), %rdi
leaq -0xe8(%rbp), %rsi
callq 0x25ba0
movq -0x110(%rbp), %rsi
movq -0x108(%rbp), %rdx
leaq -0x100(%rbp), %rdi
callq 0x25c00
jmp 0x742d0
movl $0x0, -0x114(%rbp)
leaq -0x100(%rbp), %rdi
leaq -0x114(%rbp), %rsi
callq 0x410c0
jmp 0x742ef
leaq 0x59deb(%rip), %rsi # 0xce0e1
leaq 0x59ddd(%rip), %rdx # 0xce0da
leaq -0x128(%rbp), %rdi
leaq -0xb0(%rbp), %rcx
leaq -0x114(%rbp), %r8
callq 0x68690
jmp 0x74319
leaq -0x128(%rbp), %rdi
callq 0x25cb0
movb %al, -0x161(%rbp)
jmp 0x7432d
movb -0x161(%rbp), %al
testb $0x1, %al
jne 0x74339
jmp 0x74371
jmp 0x7441d
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x50(%rbp)
movl %eax, -0x54(%rbp)
jmp 0x7446d
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x50(%rbp)
movl %eax, -0x54(%rbp)
jmp 0x74461
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x50(%rbp)
movl %eax, -0x54(%rbp)
jmp 0x74455
leaq -0x130(%rbp), %rdi
callq 0xa24e0
jmp 0x7437f
leaq -0x128(%rbp), %rdi
callq 0x25cd0
movq %rax, -0x170(%rbp)
jmp 0x74394
movq -0x170(%rbp), %r8
leaq 0x5da77(%rip), %rdx # 0xd1e19
leaq -0x138(%rbp), %rdi
movl $0x1, %esi
movl $0x1f, %ecx
callq 0x9dfc0
jmp 0x743ba
leaq -0x138(%rbp), %rdi
leaq -0x130(%rbp), %rsi
callq 0xbf100
jmp 0x743cf
leaq -0x138(%rbp), %rdi
callq 0x9e050
leaq -0x130(%rbp), %rdi
callq 0x25cf0
jmp 0x7441d
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x50(%rbp)
movl %eax, -0x54(%rbp)
jmp 0x7440f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x50(%rbp)
movl %eax, -0x54(%rbp)
leaq -0x138(%rbp), %rdi
callq 0x9e050
leaq -0x130(%rbp), %rdi
callq 0x25cf0
jmp 0x74455
leaq -0x128(%rbp), %rdi
callq 0x25d10
leaq -0xe8(%rbp), %rdi
callq 0x25d90
leaq -0xd0(%rbp), %rdi
callq 0x25df0
movl -0xac(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xac(%rbp)
jmp 0x7420f
leaq -0x128(%rbp), %rdi
callq 0x25d10
leaq -0xe8(%rbp), %rdi
callq 0x25d90
leaq -0xd0(%rbp), %rdi
callq 0x25df0
jmp 0x74484
addq $0x170, %rsp # imm = 0x170
popq %rbp
retq
movq -0x50(%rbp), %rdi
callq 0x16af0
nopl (%rax)
|
_ZN12_GLOBAL__N_131msgpack23_FloatTypePacking_Test8TestBodyEv:
push rbp
mov rbp, rsp
sub rsp, 170h
mov [rbp+var_8], rdi
mov [rbp+var_C], 0FFFFFFFBh
loc_73FE6:
cmp [rbp+var_C], 5
jge loc_74205
cvtsi2ss xmm0, [rbp+var_C]
movss xmm1, cs:dword_D1D90
mulss xmm0, xmm1
movss xmm1, cs:dword_D1D94
divss xmm0, xmm1
movss xmm1, cs:dword_D1D98
addss xmm0, xmm1
movss [rbp+var_10], xmm0
xorps xmm0, xmm0
movaps [rbp+var_20], xmm0
movaps [rbp+var_30], xmm0
lea rdi, [rbp+var_30]
mov [rbp+var_140], rdi
call _ZN9msgpack236PackerILb0EEC2Ev; msgpack23::Packer<false>::Packer(void)
mov rsi, [rbp+var_140]
lea rdi, [rbp+var_48]
lea rdx, [rbp+var_10]
call _ZN9msgpack236PackerILb0EEclIJfEEESt6vectorISt4byteSaIS4_EEDpRKT_; msgpack23::Packer<false>::operator()<float>(float const&)
jmp short $+2
loc_7404F:
lea rdi, [rbp+var_80]
lea rsi, [rbp+var_48]
call _ZNSt4spanIKSt4byteLm18446744073709551615EEC2IRSt6vectorIS0_SaIS0_EEQaaaaaaaaaaaantsr8__detail13__is_std_spanINSt12remove_cvrefITL0__E4typeEEE5valuentsr8__detail14__is_std_arrayISB_EE5valuent10is_array_vISB_Esr6rangesE16contiguous_rangeIS9_Esr6rangesE11sized_rangeIS9_Eoosr6rangesE14borrowed_rangeIS9_E10is_const_vIT_Esr19__is_compatible_refIDTdeclsr3stdE7declvalIRDTclsr6ranges13__cust_accessE7__beginclsr3stdE7declvalIRS9_EEEEEEEEE5valueEEOSC_
mov rsi, [rbp+var_80]
mov rdx, [rbp+var_78]
lea rdi, [rbp+var_70]
call _ZN9msgpack238UnpackerC2ESt4spanIKSt4byteLm18446744073709551615EE; msgpack23::Unpacker::Unpacker(std::span<std::byte const,18446744073709551615ul>)
jmp short $+2
loc_7406F:
mov [rbp+var_84], 0
lea rdi, [rbp+var_70]
lea rsi, [rbp+var_84]
call _ZN9msgpack238UnpackerclIJfEEEvDpRT_; msgpack23::Unpacker::operator()<float>(float &)
jmp short $+2
loc_7408B:
lea rsi, aExpected; "expected"
lea rdx, aActual; "actual"
lea rdi, [rbp+var_98]
lea rcx, [rbp+var_10]
lea r8, [rbp+var_84]
call _ZN7testing8internal8EqHelper7CompareIffTnPNSt9enable_ifIXoontsr3std11is_integralIT_EE5valuentsr3std10is_pointerIT0_EE5valueEvE4typeELPv0EEENS_15AssertionResultEPKcSC_RKS4_RKS5_
jmp short $+2
loc_740B2:
lea rdi, [rbp+var_98]
call _ZNK7testing15AssertionResultcvbEv; testing::AssertionResult::operator bool(void)
mov [rbp+var_141], al
jmp short $+2
loc_740C6:
mov al, [rbp+var_141]
test al, 1
jnz short loc_740D2
jmp short loc_7410A
loc_740D2:
jmp loc_741B6
mov rcx, rax
mov eax, edx
mov [rbp+var_50], rcx
mov [rbp+var_54], eax
jmp loc_741F7
mov rcx, rax
mov eax, edx
mov [rbp+var_50], rcx
mov [rbp+var_54], eax
jmp loc_741EE
mov rcx, rax
mov eax, edx
mov [rbp+var_50], rcx
mov [rbp+var_54], eax
jmp loc_741E2
loc_7410A:
lea rdi, [rbp+var_A0]; this
call _ZN7testing7MessageC2Ev; testing::Message::Message(void)
jmp short $+2
loc_74118:
lea rdi, [rbp+var_98]; this
call _ZNK7testing15AssertionResult15failure_messageEv; testing::AssertionResult::failure_message(void)
mov [rbp+var_150], rax
jmp short $+2
loc_7412D:
mov r8, [rbp+var_150]
lea rdx, aWorkspaceLlm4b_10; "/workspace/llm4binary/github2025/msgpac"...
lea rdi, [rbp+var_A8]
mov esi, 1
mov ecx, 15h
call _ZN7testing8internal12AssertHelperC2ENS_14TestPartResult4TypeEPKciS5_; testing::internal::AssertHelper::AssertHelper(testing::TestPartResult::Type,char const*,int,char const*)
jmp short $+2
loc_74153:
lea rdi, [rbp+var_A8]
lea rsi, [rbp+var_A0]
call _ZNK7testing8internal12AssertHelperaSERKNS_7MessageE; testing::internal::AssertHelper::operator=(testing::Message const&)
jmp short $+2
loc_74168:
lea rdi, [rbp+var_A8]; this
call _ZN7testing8internal12AssertHelperD2Ev; testing::internal::AssertHelper::~AssertHelper()
lea rdi, [rbp+var_A0]; this
call _ZN7testing7MessageD2Ev; testing::Message::~Message()
jmp short loc_741B6
mov rcx, rax
mov eax, edx
mov [rbp+var_50], rcx
mov [rbp+var_54], eax
jmp short loc_741A8
mov rcx, rax
mov eax, edx
mov [rbp+var_50], rcx
mov [rbp+var_54], eax
lea rdi, [rbp+var_A8]; this
call _ZN7testing8internal12AssertHelperD2Ev; testing::internal::AssertHelper::~AssertHelper()
loc_741A8:
lea rdi, [rbp+var_A0]; this
call _ZN7testing7MessageD2Ev; testing::Message::~Message()
jmp short loc_741E2
loc_741B6:
lea rdi, [rbp+var_98]; this
call _ZN7testing15AssertionResultD2Ev; testing::AssertionResult::~AssertionResult()
lea rdi, [rbp+var_48]
call _ZNSt6vectorISt4byteSaIS0_EED2Ev; std::vector<std::byte>::~vector()
lea rdi, [rbp+var_30]
call _ZN9msgpack236PackerILb0EED2Ev; msgpack23::Packer<false>::~Packer()
mov eax, [rbp+var_C]
add eax, 1
mov [rbp+var_C], eax
jmp loc_73FE6
loc_741E2:
lea rdi, [rbp+var_98]; this
call _ZN7testing15AssertionResultD2Ev; testing::AssertionResult::~AssertionResult()
loc_741EE:
lea rdi, [rbp+var_48]
call _ZNSt6vectorISt4byteSaIS0_EED2Ev; std::vector<std::byte>::~vector()
loc_741F7:
lea rdi, [rbp+var_30]
call _ZN9msgpack236PackerILb0EED2Ev; msgpack23::Packer<false>::~Packer()
jmp loc_74484
loc_74205:
mov [rbp+var_AC], 0FFFFFFFBh
loc_7420F:
cmp [rbp+var_AC], 5
jge loc_7447B
mov edi, [rbp+var_AC]
cvtsi2ss xmm0, edi
cvtss2sd xmm0, xmm0
movsd [rbp+var_160], xmm0
mov eax, edi
neg eax
cmovns edi, eax
movss xmm0, cs:dword_D1D8C
call _ZSt3powIfiEN9__gnu_cxx11__promote_2IT_T0_NS0_9__promoteIS2_Xsr3std12__is_integerIS2_EE7__valueEE6__typeENS4_IS3_Xsr3std12__is_integerIS3_EE7__valueEE6__typeEE6__typeES2_S3_
movaps xmm1, xmm0
movsd xmm0, [rbp+var_160]
mulsd xmm0, xmm1
cvtsd2ss xmm0, xmm0
movss [rbp+var_B0], xmm0
xorps xmm0, xmm0
movaps [rbp+var_C0], xmm0
movaps [rbp+var_D0], xmm0
lea rdi, [rbp+var_D0]
mov [rbp+var_158], rdi
call _ZN9msgpack236PackerILb0EEC2Ev; msgpack23::Packer<false>::Packer(void)
mov rsi, [rbp+var_158]
lea rdi, [rbp+var_E8]
lea rdx, [rbp+var_B0]
call _ZN9msgpack236PackerILb0EEclIJfEEESt6vectorISt4byteSaIS4_EEDpRKT_; msgpack23::Packer<false>::operator()<float>(float const&)
jmp short $+2
loc_742A1:
lea rdi, [rbp+var_110]
lea rsi, [rbp+var_E8]
call _ZNSt4spanIKSt4byteLm18446744073709551615EEC2IRSt6vectorIS0_SaIS0_EEQaaaaaaaaaaaantsr8__detail13__is_std_spanINSt12remove_cvrefITL0__E4typeEEE5valuentsr8__detail14__is_std_arrayISB_EE5valuent10is_array_vISB_Esr6rangesE16contiguous_rangeIS9_Esr6rangesE11sized_rangeIS9_Eoosr6rangesE14borrowed_rangeIS9_E10is_const_vIT_Esr19__is_compatible_refIDTdeclsr3stdE7declvalIRDTclsr6ranges13__cust_accessE7__beginclsr3stdE7declvalIRS9_EEEEEEEEE5valueEEOSC_
mov rsi, [rbp+var_110]
mov rdx, [rbp+var_108]
lea rdi, [rbp+var_100]
call _ZN9msgpack238UnpackerC2ESt4spanIKSt4byteLm18446744073709551615EE; msgpack23::Unpacker::Unpacker(std::span<std::byte const,18446744073709551615ul>)
jmp short $+2
loc_742D0:
mov [rbp+var_114], 0
lea rdi, [rbp+var_100]
lea rsi, [rbp+var_114]
call _ZN9msgpack238UnpackerclIJfEEEvDpRT_; msgpack23::Unpacker::operator()<float>(float &)
jmp short $+2
loc_742EF:
lea rsi, aExpected; "expected"
lea rdx, aActual; "actual"
lea rdi, [rbp+var_128]
lea rcx, [rbp+var_B0]
lea r8, [rbp+var_114]
call _ZN7testing8internal8EqHelper7CompareIffTnPNSt9enable_ifIXoontsr3std11is_integralIT_EE5valuentsr3std10is_pointerIT0_EE5valueEvE4typeELPv0EEENS_15AssertionResultEPKcSC_RKS4_RKS5_
jmp short $+2
loc_74319:
lea rdi, [rbp+var_128]
call _ZNK7testing15AssertionResultcvbEv; testing::AssertionResult::operator bool(void)
mov [rbp+var_161], al
jmp short $+2
loc_7432D:
mov al, [rbp+var_161]
test al, 1
jnz short loc_74339
jmp short loc_74371
loc_74339:
jmp loc_7441D
mov rcx, rax
mov eax, edx
mov [rbp+var_50], rcx
mov [rbp+var_54], eax
jmp loc_7446D
mov rcx, rax
mov eax, edx
mov [rbp+var_50], rcx
mov [rbp+var_54], eax
jmp loc_74461
mov rcx, rax
mov eax, edx
mov [rbp+var_50], rcx
mov [rbp+var_54], eax
jmp loc_74455
loc_74371:
lea rdi, [rbp+var_130]; this
call _ZN7testing7MessageC2Ev; testing::Message::Message(void)
jmp short $+2
loc_7437F:
lea rdi, [rbp+var_128]; this
call _ZNK7testing15AssertionResult15failure_messageEv; testing::AssertionResult::failure_message(void)
mov [rbp+var_170], rax
jmp short $+2
loc_74394:
mov r8, [rbp+var_170]
lea rdx, aWorkspaceLlm4b_10; "/workspace/llm4binary/github2025/msgpac"...
lea rdi, [rbp+var_138]
mov esi, 1
mov ecx, 1Fh
call _ZN7testing8internal12AssertHelperC2ENS_14TestPartResult4TypeEPKciS5_; testing::internal::AssertHelper::AssertHelper(testing::TestPartResult::Type,char const*,int,char const*)
jmp short $+2
loc_743BA:
lea rdi, [rbp+var_138]
lea rsi, [rbp+var_130]
call _ZNK7testing8internal12AssertHelperaSERKNS_7MessageE; testing::internal::AssertHelper::operator=(testing::Message const&)
jmp short $+2
loc_743CF:
lea rdi, [rbp+var_138]; this
call _ZN7testing8internal12AssertHelperD2Ev; testing::internal::AssertHelper::~AssertHelper()
lea rdi, [rbp+var_130]; this
call _ZN7testing7MessageD2Ev; testing::Message::~Message()
jmp short loc_7441D
mov rcx, rax
mov eax, edx
mov [rbp+var_50], rcx
mov [rbp+var_54], eax
jmp short loc_7440F
mov rcx, rax
mov eax, edx
mov [rbp+var_50], rcx
mov [rbp+var_54], eax
lea rdi, [rbp+var_138]; this
call _ZN7testing8internal12AssertHelperD2Ev; testing::internal::AssertHelper::~AssertHelper()
loc_7440F:
lea rdi, [rbp+var_130]; this
call _ZN7testing7MessageD2Ev; testing::Message::~Message()
jmp short loc_74455
loc_7441D:
lea rdi, [rbp+var_128]; this
call _ZN7testing15AssertionResultD2Ev; testing::AssertionResult::~AssertionResult()
lea rdi, [rbp+var_E8]
call _ZNSt6vectorISt4byteSaIS0_EED2Ev; std::vector<std::byte>::~vector()
lea rdi, [rbp+var_D0]
call _ZN9msgpack236PackerILb0EED2Ev; msgpack23::Packer<false>::~Packer()
mov eax, [rbp+var_AC]
add eax, 1
mov [rbp+var_AC], eax
jmp loc_7420F
loc_74455:
lea rdi, [rbp+var_128]; this
call _ZN7testing15AssertionResultD2Ev; testing::AssertionResult::~AssertionResult()
loc_74461:
lea rdi, [rbp+var_E8]
call _ZNSt6vectorISt4byteSaIS0_EED2Ev; std::vector<std::byte>::~vector()
loc_7446D:
lea rdi, [rbp+var_D0]
call _ZN9msgpack236PackerILb0EED2Ev; msgpack23::Packer<false>::~Packer()
jmp short loc_74484
loc_7447B:
add rsp, 170h
pop rbp
retn
loc_74484:
mov rdi, [rbp+var_50]
call __Unwind_Resume
|
void `anonymous namespace'::msgpack23_FloatTypePacking_Test::TestBody(
_anonymous_namespace_::msgpack23_FloatTypePacking_Test *this)
{
long long v1; // rdi
float v2; // xmm0_4
long long v3; // [rsp+0h] [rbp-170h]
double v4; // [rsp+10h] [rbp-160h]
long long v5; // [rsp+20h] [rbp-150h]
_BYTE v6[8]; // [rsp+38h] [rbp-138h] BYREF
_BYTE v7[8]; // [rsp+40h] [rbp-130h] BYREF
_BYTE v8[20]; // [rsp+48h] [rbp-128h] BYREF
int v9; // [rsp+5Ch] [rbp-114h] BYREF
long long v10[2]; // [rsp+60h] [rbp-110h] BYREF
_QWORD v11[3]; // [rsp+70h] [rbp-100h] BYREF
long long v12[3]; // [rsp+88h] [rbp-E8h] BYREF
_OWORD v13[2]; // [rsp+A0h] [rbp-D0h] BYREF
float v14; // [rsp+C0h] [rbp-B0h] BYREF
int j; // [rsp+C4h] [rbp-ACh]
_BYTE v16[8]; // [rsp+C8h] [rbp-A8h] BYREF
_BYTE v17[8]; // [rsp+D0h] [rbp-A0h] BYREF
_BYTE v18[20]; // [rsp+D8h] [rbp-98h] BYREF
int v19; // [rsp+ECh] [rbp-84h] BYREF
long long v20[2]; // [rsp+F0h] [rbp-80h] BYREF
_QWORD v21[3]; // [rsp+100h] [rbp-70h] BYREF
long long v22[3]; // [rsp+128h] [rbp-48h] BYREF
_OWORD v23[2]; // [rsp+140h] [rbp-30h] BYREF
float v24; // [rsp+160h] [rbp-10h] BYREF
int i; // [rsp+164h] [rbp-Ch]
_anonymous_namespace_::msgpack23_FloatTypePacking_Test *v26; // [rsp+168h] [rbp-8h]
v26 = this;
for ( i = -5; i < 5; ++i )
{
v24 = (float)((float)((float)i * 23456.779) / 3.1400001) + 5.0;
memset(v23, 0, sizeof(v23));
msgpack23::Packer<false>::Packer((long long)v23);
msgpack23::Packer<false>::operator()<float>(v22, (long long)v23, (long long)&v24);
ZNSt4spanIKSt4byteLm18446744073709551615EEC2IRSt6vectorIS0_SaIS0_EEQaaaaaaaaaaaantsr8__detail13__is_std_spanINSt12remove_cvrefITL0__E4typeEEE5valuentsr8__detail14__is_std_arrayISB_EE5valuent10is_array_vISB_Esr6rangesE16contiguous_rangeIS9_Esr6rangesE11sized_rangeIS9_Eoosr6rangesE14borrowed_rangeIS9_E10is_const_vIT_Esr19__is_compatible_refIDTdeclsr3stdE7declvalIRDTclsr6ranges13__cust_accessE7__beginclsr3stdE7declvalIRS9_EEEEEEEEE5valueEEOSC_(
(long long)v20,
(long long)v22);
msgpack23::Unpacker::Unpacker(v21, v20[0], v20[1]);
v19 = 0;
msgpack23::Unpacker::operator()<float>((msgpack23::Unpacker *)v21, (float *)&v19);
ZN7testing8internal8EqHelper7CompareIffTnPNSt9enable_ifIXoontsr3std11is_integralIT_EE5valuentsr3std10is_pointerIT0_EE5valueEvE4typeELPv0EEENS_15AssertionResultEPKcSC_RKS4_RKS5_(
(long long)v18,
(long long)"expected",
(long long)"actual",
(long long)&v24,
(long long)&v19);
if ( (testing::AssertionResult::operator bool(v18) & 1) == 0 )
{
testing::Message::Message((testing::Message *)v17);
v5 = testing::AssertionResult::failure_message((testing::AssertionResult *)v18);
testing::internal::AssertHelper::AssertHelper(
v16,
1LL,
"/workspace/llm4binary/github2025/msgpack23/tests/type_packing_tests.cpp",
21LL,
v5);
testing::internal::AssertHelper::operator=(v16, v17);
testing::internal::AssertHelper::~AssertHelper((testing::internal::AssertHelper *)v16);
testing::Message::~Message((testing::Message *)v17);
}
testing::AssertionResult::~AssertionResult((testing::AssertionResult *)v18);
std::vector<std::byte>::~vector(v22);
msgpack23::Packer<false>::~Packer((long long *)v23);
}
for ( j = -5; j < 5; ++j )
{
v1 = (unsigned int)j;
if ( j <= 0 )
v1 = (unsigned int)-j;
v4 = (float)j;
v2 = v4 * std::pow<float,int>(v1, 0.1);
v14 = v2;
memset(v13, 0, sizeof(v13));
msgpack23::Packer<false>::Packer((long long)v13);
msgpack23::Packer<false>::operator()<float>(v12, (long long)v13, (long long)&v14);
ZNSt4spanIKSt4byteLm18446744073709551615EEC2IRSt6vectorIS0_SaIS0_EEQaaaaaaaaaaaantsr8__detail13__is_std_spanINSt12remove_cvrefITL0__E4typeEEE5valuentsr8__detail14__is_std_arrayISB_EE5valuent10is_array_vISB_Esr6rangesE16contiguous_rangeIS9_Esr6rangesE11sized_rangeIS9_Eoosr6rangesE14borrowed_rangeIS9_E10is_const_vIT_Esr19__is_compatible_refIDTdeclsr3stdE7declvalIRDTclsr6ranges13__cust_accessE7__beginclsr3stdE7declvalIRS9_EEEEEEEEE5valueEEOSC_(
(long long)v10,
(long long)v12);
msgpack23::Unpacker::Unpacker(v11, v10[0], v10[1]);
v9 = 0;
msgpack23::Unpacker::operator()<float>((msgpack23::Unpacker *)v11, (float *)&v9);
ZN7testing8internal8EqHelper7CompareIffTnPNSt9enable_ifIXoontsr3std11is_integralIT_EE5valuentsr3std10is_pointerIT0_EE5valueEvE4typeELPv0EEENS_15AssertionResultEPKcSC_RKS4_RKS5_(
(long long)v8,
(long long)"expected",
(long long)"actual",
(long long)&v14,
(long long)&v9);
if ( (testing::AssertionResult::operator bool(v8) & 1) == 0 )
{
testing::Message::Message((testing::Message *)v7);
v3 = testing::AssertionResult::failure_message((testing::AssertionResult *)v8);
testing::internal::AssertHelper::AssertHelper(
v6,
1LL,
"/workspace/llm4binary/github2025/msgpack23/tests/type_packing_tests.cpp",
31LL,
v3);
testing::internal::AssertHelper::operator=(v6, v7);
testing::internal::AssertHelper::~AssertHelper((testing::internal::AssertHelper *)v6);
testing::Message::~Message((testing::Message *)v7);
}
testing::AssertionResult::~AssertionResult((testing::AssertionResult *)v8);
std::vector<std::byte>::~vector(v12);
msgpack23::Packer<false>::~Packer((long long *)v13);
}
}
|
TestBody:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x170
MOV qword ptr [RBP + -0x8],RDI
MOV dword ptr [RBP + -0xc],0xfffffffb
LAB_00173fe6:
CMP dword ptr [RBP + -0xc],0x5
JGE 0x00174205
CVTSI2SS XMM0,dword ptr [RBP + -0xc]
MOVSS XMM1,dword ptr [0x001d1d90]
MULSS XMM0,XMM1
MOVSS XMM1,dword ptr [0x001d1d94]
DIVSS XMM0,XMM1
MOVSS XMM1,dword ptr [0x001d1d98]
ADDSS XMM0,XMM1
MOVSS dword ptr [RBP + -0x10],XMM0
XORPS XMM0,XMM0
MOVAPS xmmword ptr [RBP + -0x20],XMM0
MOVAPS xmmword ptr [RBP + -0x30],XMM0
LEA RDI,[RBP + -0x30]
MOV qword ptr [RBP + -0x140],RDI
CALL 0x00125b20
MOV RSI,qword ptr [RBP + -0x140]
LAB_00174040:
LEA RDI,[RBP + -0x48]
LEA RDX,[RBP + -0x10]
CALL 0x001411c0
JMP 0x0017404f
LAB_0017404f:
LEA RDI,[RBP + -0x80]
LEA RSI,[RBP + -0x48]
CALL 0x00125ba0
MOV RSI,qword ptr [RBP + -0x80]
MOV RDX,qword ptr [RBP + -0x78]
LAB_00174064:
LEA RDI,[RBP + -0x70]
CALL 0x00125c00
JMP 0x0017406f
LAB_0017406f:
MOV dword ptr [RBP + -0x84],0x0
LEA RDI,[RBP + -0x70]
LEA RSI,[RBP + -0x84]
CALL 0x001410c0
JMP 0x0017408b
LAB_0017408b:
LEA RSI,[0x1ce0e1]
LEA RDX,[0x1ce0da]
LEA RDI,[RBP + -0x98]
LEA RCX,[RBP + -0x10]
LEA R8,[RBP + -0x84]
CALL 0x00168690
JMP 0x001740b2
LAB_001740b2:
LEA RDI,[RBP + -0x98]
CALL 0x00125cb0
MOV byte ptr [RBP + -0x141],AL
JMP 0x001740c6
LAB_001740c6:
MOV AL,byte ptr [RBP + -0x141]
TEST AL,0x1
JNZ 0x001740d2
JMP 0x0017410a
LAB_001740d2:
JMP 0x001741b6
LAB_0017410a:
LEA RDI,[RBP + -0xa0]
CALL 0x001a24e0
JMP 0x00174118
LAB_00174118:
LEA RDI,[RBP + -0x98]
CALL 0x00125cd0
MOV qword ptr [RBP + -0x150],RAX
JMP 0x0017412d
LAB_0017412d:
MOV R8,qword ptr [RBP + -0x150]
LEA RDX,[0x1d1e19]
LEA RDI,[RBP + -0xa8]
MOV ESI,0x1
MOV ECX,0x15
CALL 0x0019dfc0
JMP 0x00174153
LAB_00174153:
LEA RDI,[RBP + -0xa8]
LEA RSI,[RBP + -0xa0]
CALL 0x001bf100
JMP 0x00174168
LAB_00174168:
LEA RDI,[RBP + -0xa8]
CALL 0x0019e050
LEA RDI,[RBP + -0xa0]
CALL 0x00125cf0
JMP 0x001741b6
LAB_001741b6:
LEA RDI,[RBP + -0x98]
CALL 0x00125d10
LEA RDI,[RBP + -0x48]
CALL 0x00125d90
LEA RDI,[RBP + -0x30]
CALL 0x00125df0
MOV EAX,dword ptr [RBP + -0xc]
ADD EAX,0x1
MOV dword ptr [RBP + -0xc],EAX
JMP 0x00173fe6
LAB_00174205:
MOV dword ptr [RBP + -0xac],0xfffffffb
LAB_0017420f:
CMP dword ptr [RBP + -0xac],0x5
JGE 0x0017447b
MOV EDI,dword ptr [RBP + -0xac]
CVTSI2SS XMM0,EDI
CVTSS2SD XMM0,XMM0
MOVSD qword ptr [RBP + -0x160],XMM0
MOV EAX,EDI
NEG EAX
CMOVNS EDI,EAX
MOVSS XMM0,dword ptr [0x001d1d8c]
CALL 0x001792b0
MOVAPS XMM1,XMM0
MOVSD XMM0,qword ptr [RBP + -0x160]
MULSD XMM0,XMM1
CVTSD2SS XMM0,XMM0
MOVSS dword ptr [RBP + -0xb0],XMM0
XORPS XMM0,XMM0
MOVAPS xmmword ptr [RBP + -0xc0],XMM0
MOVAPS xmmword ptr [RBP + -0xd0],XMM0
LEA RDI,[RBP + -0xd0]
MOV qword ptr [RBP + -0x158],RDI
CALL 0x00125b20
MOV RSI,qword ptr [RBP + -0x158]
LAB_0017428c:
LEA RDI,[RBP + -0xe8]
LEA RDX,[RBP + -0xb0]
CALL 0x001411c0
JMP 0x001742a1
LAB_001742a1:
LEA RDI,[RBP + -0x110]
LEA RSI,[RBP + -0xe8]
CALL 0x00125ba0
MOV RSI,qword ptr [RBP + -0x110]
MOV RDX,qword ptr [RBP + -0x108]
LAB_001742c2:
LEA RDI,[RBP + -0x100]
CALL 0x00125c00
JMP 0x001742d0
LAB_001742d0:
MOV dword ptr [RBP + -0x114],0x0
LEA RDI,[RBP + -0x100]
LEA RSI,[RBP + -0x114]
CALL 0x001410c0
JMP 0x001742ef
LAB_001742ef:
LEA RSI,[0x1ce0e1]
LEA RDX,[0x1ce0da]
LEA RDI,[RBP + -0x128]
LEA RCX,[RBP + -0xb0]
LEA R8,[RBP + -0x114]
CALL 0x00168690
JMP 0x00174319
LAB_00174319:
LEA RDI,[RBP + -0x128]
CALL 0x00125cb0
MOV byte ptr [RBP + -0x161],AL
JMP 0x0017432d
LAB_0017432d:
MOV AL,byte ptr [RBP + -0x161]
TEST AL,0x1
JNZ 0x00174339
JMP 0x00174371
LAB_00174339:
JMP 0x0017441d
LAB_00174371:
LEA RDI,[RBP + -0x130]
CALL 0x001a24e0
JMP 0x0017437f
LAB_0017437f:
LEA RDI,[RBP + -0x128]
CALL 0x00125cd0
MOV qword ptr [RBP + -0x170],RAX
JMP 0x00174394
LAB_00174394:
MOV R8,qword ptr [RBP + -0x170]
LEA RDX,[0x1d1e19]
LEA RDI,[RBP + -0x138]
MOV ESI,0x1
MOV ECX,0x1f
CALL 0x0019dfc0
JMP 0x001743ba
LAB_001743ba:
LEA RDI,[RBP + -0x138]
LEA RSI,[RBP + -0x130]
CALL 0x001bf100
LAB_001743cd:
JMP 0x001743cf
LAB_001743cf:
LEA RDI,[RBP + -0x138]
CALL 0x0019e050
LEA RDI,[RBP + -0x130]
CALL 0x00125cf0
JMP 0x0017441d
LAB_0017441d:
LEA RDI,[RBP + -0x128]
CALL 0x00125d10
LEA RDI,[RBP + -0xe8]
CALL 0x00125d90
LEA RDI,[RBP + -0xd0]
CALL 0x00125df0
MOV EAX,dword ptr [RBP + -0xac]
ADD EAX,0x1
MOV dword ptr [RBP + -0xac],EAX
JMP 0x0017420f
LAB_0017447b:
ADD RSP,0x170
POP RBP
RET
|
/* (anonymous namespace)::msgpack23_FloatTypePacking_Test::TestBody() */
void __thiscall
(anonymous_namespace)::msgpack23_FloatTypePacking_Test::TestBody
(msgpack23_FloatTypePacking_Test *this)
{
double dVar1;
double dVar2;
int iVar3;
bool bVar4;
int8 uVar5;
AssertHelper local_140 [8];
Message local_138 [8];
AssertionResult local_130 [20];
float local_11c;
int8 local_118;
int8 local_110;
Unpacker local_108 [24];
Packer<false> local_f0 [24];
int8 local_d8;
int8 uStack_d0;
int8 local_c8;
int8 uStack_c0;
float local_b8;
int local_b4;
AssertHelper local_b0 [8];
Message local_a8 [8];
AssertionResult local_a0 [20];
float local_8c;
int8 local_88;
int8 local_80;
Unpacker local_78 [40];
Packer<false> local_50 [24];
int8 local_38;
int8 uStack_30;
int8 local_28;
int8 uStack_20;
float local_18;
int local_14;
msgpack23_FloatTypePacking_Test *local_10;
local_10 = this;
for (local_14 = -5; local_14 < 5; local_14 = local_14 + 1) {
local_18 = ((float)local_14 * DAT_001d1d90) / DAT_001d1d94 + DAT_001d1d98;
local_28 = 0;
uStack_20 = 0;
local_38 = 0;
uStack_30 = 0;
msgpack23::Packer<false>::Packer((Packer<false> *)&local_38);
/* try { // try from 00174040 to 0017404c has its CatchHandler @ 001740d7 */
msgpack23::Packer<false>::operator()(local_50,(float *)&local_38);
_ZNSt4spanIKSt4byteLm18446744073709551615EEC2IRSt6vectorIS0_SaIS0_EEQaaaaaaaaaaaantsr8__detail13__is_std_spanINSt12remove_cvrefITL0__E4typeEEE5valuentsr8__detail14__is_std_arrayISB_EE5valuent10is_array_vISB_Esr6rangesE16contiguous_rangeIS9_Esr6rangesE11sized_rangeIS9_Eoosr6rangesE14borrowed_rangeIS9_E10is_const_vIT_Esr19__is_compatible_refIDTdeclsr3stdE7declvalIRDTclsr6ranges13__cust_accessE7__beginclsr3stdE7declvalIRS9_EEEEEEEEE5valueEEOSC_
(&local_88,local_50);
/* try { // try from 00174064 to 001740af has its CatchHandler @ 001740e8 */
msgpack23::Unpacker::Unpacker(local_78,local_88,local_80);
local_8c = 0.0;
msgpack23::Unpacker::operator()(local_78,&local_8c);
_ZN7testing8internal8EqHelper7CompareIffTnPNSt9enable_ifIXoontsr3std11is_integralIT_EE5valuentsr3std10is_pointerIT0_EE5valueEvE4typeELPv0EEENS_15AssertionResultEPKcSC_RKS4_RKS5_
(local_a0,"expected","actual",&local_18,&local_8c);
/* try { // try from 001740b2 to 00174115 has its CatchHandler @ 001740f9 */
bVar4 = testing::AssertionResult::operator_cast_to_bool(local_a0);
if (!bVar4) {
testing::Message::Message(local_a8);
/* try { // try from 00174118 to 00174150 has its CatchHandler @ 00174182 */
uVar5 = testing::AssertionResult::failure_message(local_a0);
testing::internal::AssertHelper::AssertHelper
(local_b0,1,
"/workspace/llm4binary/github2025/msgpack23/tests/type_packing_tests.cpp",0x15,
uVar5);
/* try { // try from 00174153 to 00174165 has its CatchHandler @ 00174190 */
testing::internal::AssertHelper::operator=(local_b0,local_a8);
testing::internal::AssertHelper::~AssertHelper(local_b0);
testing::Message::~Message(local_a8);
}
testing::AssertionResult::~AssertionResult(local_a0);
std::vector<std::byte,std::allocator<std::byte>>::~vector
((vector<std::byte,std::allocator<std::byte>> *)local_50);
msgpack23::Packer<false>::~Packer((Packer<false> *)&local_38);
}
for (local_b4 = -5; local_b4 < 5; local_b4 = local_b4 + 1) {
dVar1 = (double)local_b4;
iVar3 = local_b4;
if (local_b4 < 1) {
iVar3 = -local_b4;
}
dVar2 = (double)std::pow<float,int>(DAT_001d1d8c,iVar3);
local_b8 = (float)(dVar1 * dVar2);
local_c8 = 0;
uStack_c0 = 0;
local_d8 = 0;
uStack_d0 = 0;
msgpack23::Packer<false>::Packer((Packer<false> *)&local_d8);
/* try { // try from 0017428c to 0017429e has its CatchHandler @ 0017433e */
msgpack23::Packer<false>::operator()(local_f0,(float *)&local_d8);
_ZNSt4spanIKSt4byteLm18446744073709551615EEC2IRSt6vectorIS0_SaIS0_EEQaaaaaaaaaaaantsr8__detail13__is_std_spanINSt12remove_cvrefITL0__E4typeEEE5valuentsr8__detail14__is_std_arrayISB_EE5valuent10is_array_vISB_Esr6rangesE16contiguous_rangeIS9_Esr6rangesE11sized_rangeIS9_Eoosr6rangesE14borrowed_rangeIS9_E10is_const_vIT_Esr19__is_compatible_refIDTdeclsr3stdE7declvalIRDTclsr6ranges13__cust_accessE7__beginclsr3stdE7declvalIRS9_EEEEEEEEE5valueEEOSC_
(&local_118,local_f0);
/* try { // try from 001742c2 to 00174316 has its CatchHandler @ 0017434f */
msgpack23::Unpacker::Unpacker(local_108,local_118,local_110);
local_11c = 0.0;
msgpack23::Unpacker::operator()(local_108,&local_11c);
_ZN7testing8internal8EqHelper7CompareIffTnPNSt9enable_ifIXoontsr3std11is_integralIT_EE5valuentsr3std10is_pointerIT0_EE5valueEvE4typeELPv0EEENS_15AssertionResultEPKcSC_RKS4_RKS5_
(local_130,"expected","actual",&local_b8,&local_11c);
/* try { // try from 00174319 to 0017437c has its CatchHandler @ 00174360 */
bVar4 = testing::AssertionResult::operator_cast_to_bool(local_130);
if (!bVar4) {
testing::Message::Message(local_138);
/* try { // try from 0017437f to 001743b7 has its CatchHandler @ 001743e9 */
uVar5 = testing::AssertionResult::failure_message(local_130);
testing::internal::AssertHelper::AssertHelper
(local_140,1,
"/workspace/llm4binary/github2025/msgpack23/tests/type_packing_tests.cpp",0x1f,
uVar5);
/* try { // try from 001743ba to 001743cc has its CatchHandler @ 001743f7 */
testing::internal::AssertHelper::operator=(local_140,local_138);
testing::internal::AssertHelper::~AssertHelper(local_140);
testing::Message::~Message(local_138);
}
testing::AssertionResult::~AssertionResult(local_130);
std::vector<std::byte,std::allocator<std::byte>>::~vector
((vector<std::byte,std::allocator<std::byte>> *)local_f0);
msgpack23::Packer<false>::~Packer((Packer<false> *)&local_d8);
}
return;
}
|
|
57,207
|
js_load_module_rejected
|
bluesky950520[P]quickjs/quickjs.c
|
static JSValue js_load_module_rejected(JSContext *ctx, JSValueConst this_val,
int argc, JSValueConst *argv, int magic, JSValue *func_data)
{
JSValueConst *resolving_funcs = (JSValueConst *)func_data;
JSValueConst error;
JSValue ret;
/* XXX: check if the test is necessary */
if (argc >= 1)
error = argv[0];
else
error = JS_UNDEFINED;
ret = JS_Call(ctx, resolving_funcs[1], JS_UNDEFINED,
1, &error);
JS_FreeValue(ctx, ret);
return JS_UNDEFINED;
}
|
O1
|
c
|
js_load_module_rejected:
pushq %rbx
subq $0x40, %rsp
movq %rdi, %rbx
movq 0x50(%rsp), %rax
testl %ecx, %ecx
jle 0x43f06
movups (%r8), %xmm0
movaps %xmm0, 0x20(%rsp)
jmp 0x43f17
movl $0x0, 0x20(%rsp)
movq $0x3, 0x28(%rsp)
movq 0x10(%rax), %rsi
movq 0x18(%rax), %rdx
movl $0x0, 0x30(%rsp)
movq $0x3, 0x38(%rsp)
movups 0x30(%rsp), %xmm0
movups %xmm0, (%rsp)
leaq 0x20(%rsp), %rax
movq %rax, 0x10(%rsp)
movl $0x2, 0x18(%rsp)
movl $0x3, %r8d
movq %rbx, %rdi
xorl %ecx, %ecx
movl $0x1, %r9d
callq 0x284ca
movq 0x18(%rbx), %rdi
movq %rax, %rsi
callq 0x1d8c6
movl $0x3, %edx
xorl %eax, %eax
addq $0x40, %rsp
popq %rbx
retq
|
js_load_module_rejected:
push rbx
sub rsp, 40h
mov rbx, rdi
mov rax, [rsp+48h+arg_0]
test ecx, ecx
jle short loc_43F06
movups xmm0, xmmword ptr [r8]
movaps [rsp+48h+var_28], xmm0
jmp short loc_43F17
loc_43F06:
mov dword ptr [rsp+48h+var_28], 0
mov qword ptr [rsp+48h+var_28+8], 3
loc_43F17:
mov rsi, [rax+10h]
mov rdx, [rax+18h]
mov dword ptr [rsp+48h+var_18], 0
mov qword ptr [rsp+48h+var_18+8], 3
movups xmm0, [rsp+48h+var_18]
movups [rsp+48h+var_48], xmm0
lea rax, [rsp+48h+var_28]
mov [rsp+48h+var_38], rax
mov [rsp+48h+var_30], 2
mov r8d, 3
mov rdi, rbx
xor ecx, ecx
mov r9d, 1
call JS_CallInternal
mov rdi, [rbx+18h]
mov rsi, rax
call JS_FreeValueRT
mov edx, 3
xor eax, eax
add rsp, 40h
pop rbx
retn
|
long long js_load_module_rejected(
long long a1,
double a2,
__m128 a3,
__m128 a4,
__m128 a5,
__m128 a6,
__m128 a7,
__m128 a8,
__m128 a9,
long long a10,
long long a11,
int a12,
__int128 *a13,
long long a14,
long long a15)
{
long long v15; // rsi
long long v16; // rdx
_DWORD *v17; // rax
long long v18; // rdx
__int128 v20; // [rsp+20h] [rbp-28h] BYREF
__m128 v21; // [rsp+30h] [rbp-18h]
if ( a12 <= 0 )
{
LODWORD(v20) = 0;
*((_QWORD *)&v20 + 1) = 3LL;
}
else
{
v20 = *a13;
}
v15 = *(_QWORD *)(a15 + 16);
v16 = *(_QWORD *)(a15 + 24);
v21.m128_i32[0] = 0;
v21.m128_u64[1] = 3LL;
v17 = (_DWORD *)JS_CallInternal(a1, v15, v16, 0LL, 3LL, 1LL, v21, a3, a4, a5, a6, a7, a8, a9, 0, 3, (long long)&v20, 2u);
JS_FreeValueRT(*(_QWORD *)(a1 + 24), v17, v18);
return 0LL;
}
| |||
57,208
|
js_load_module_rejected
|
bluesky950520[P]quickjs/quickjs.c
|
static JSValue js_load_module_rejected(JSContext *ctx, JSValueConst this_val,
int argc, JSValueConst *argv, int magic, JSValue *func_data)
{
JSValueConst *resolving_funcs = (JSValueConst *)func_data;
JSValueConst error;
JSValue ret;
/* XXX: check if the test is necessary */
if (argc >= 1)
error = argv[0];
else
error = JS_UNDEFINED;
ret = JS_Call(ctx, resolving_funcs[1], JS_UNDEFINED,
1, &error);
JS_FreeValue(ctx, ret);
return JS_UNDEFINED;
}
|
O2
|
c
|
js_load_module_rejected:
pushq %r14
pushq %rbx
subq $0x28, %rsp
movq %rdi, %rbx
movq 0x40(%rsp), %rax
testl %ecx, %ecx
jle 0x3b947
movups (%r8), %xmm0
movaps %xmm0, 0x10(%rsp)
jmp 0x3b955
andl $0x0, 0x10(%rsp)
movq $0x3, 0x18(%rsp)
movq 0x10(%rax), %rsi
movq 0x18(%rax), %rdx
leaq 0x10(%rsp), %rax
movq %rax, (%rsp)
pushq $0x3
popq %r14
pushq $0x1
popq %r9
movq %rbx, %rdi
xorl %ecx, %ecx
movq %r14, %r8
callq 0x21eb6
movq %rbx, %rdi
movq %rax, %rsi
callq 0x1801e
xorl %eax, %eax
movq %r14, %rdx
addq $0x28, %rsp
popq %rbx
popq %r14
retq
|
js_load_module_rejected:
push r14
push rbx
sub rsp, 28h
mov rbx, rdi
mov rax, [rsp+38h+arg_0]
test ecx, ecx
jle short loc_3B947
movups xmm0, xmmword ptr [r8]
movaps [rsp+38h+var_28], xmm0
jmp short loc_3B955
loc_3B947:
and dword ptr [rsp+38h+var_28], 0
mov qword ptr [rsp+38h+var_28+8], 3
loc_3B955:
mov rsi, [rax+10h]
mov rdx, [rax+18h]
lea rax, [rsp+38h+var_28]
mov [rsp+38h+var_38], rax
push 3
pop r14
push 1
pop r9
mov rdi, rbx
xor ecx, ecx
mov r8, r14
call JS_Call
mov rdi, rbx
mov rsi, rax
call JS_FreeValue
xor eax, eax
mov rdx, r14
add rsp, 28h
pop rbx
pop r14
retn
|
long long js_load_module_rejected(
long long a1,
long long a2,
long long a3,
int a4,
__int128 *a5,
long long a6,
long long a7)
{
long long v7; // rax
long long v8; // rdx
__int128 v10; // [rsp+10h] [rbp-28h] BYREF
if ( a4 <= 0 )
{
LODWORD(v10) = 0;
*((_QWORD *)&v10 + 1) = 3LL;
}
else
{
v10 = *a5;
}
v7 = JS_Call(a1, *(_QWORD *)(a7 + 16), *(_QWORD *)(a7 + 24), 0, 3, 1, (long long)&v10);
JS_FreeValue(a1, v7, v8);
return 0LL;
}
|
js_load_module_rejected:
PUSH R14
PUSH RBX
SUB RSP,0x28
MOV RBX,RDI
MOV RAX,qword ptr [RSP + 0x40]
TEST ECX,ECX
JLE 0x0013b947
MOVUPS XMM0,xmmword ptr [R8]
MOVAPS xmmword ptr [RSP + 0x10],XMM0
JMP 0x0013b955
LAB_0013b947:
AND dword ptr [RSP + 0x10],0x0
MOV qword ptr [RSP + 0x18],0x3
LAB_0013b955:
MOV RSI,qword ptr [RAX + 0x10]
MOV RDX,qword ptr [RAX + 0x18]
LEA RAX,[RSP + 0x10]
MOV qword ptr [RSP],RAX
PUSH 0x3
POP R14
PUSH 0x1
POP R9
MOV RDI,RBX
XOR ECX,ECX
MOV R8,R14
CALL 0x00121eb6
MOV RDI,RBX
MOV RSI,RAX
CALL 0x0011801e
XOR EAX,EAX
MOV RDX,R14
ADD RSP,0x28
POP RBX
POP R14
RET
|
int1 [16]
js_load_module_rejected
(int8 param_1,int8 param_2,int8 param_3,int param_4,int4 *param_5,
int8 param_6,long param_7)
{
int8 uVar1;
int4 local_28;
int4 uStack_24;
int8 uStack_20;
if (param_4 < 1) {
local_28 = 0;
uStack_20 = 3;
}
else {
local_28 = *param_5;
uStack_24 = param_5[1];
uStack_20 = *(int8 *)(param_5 + 2);
}
uVar1 = JS_Call(param_1,*(int8 *)(param_7 + 0x10),*(int8 *)(param_7 + 0x18),0,3,1,
&local_28);
JS_FreeValue(param_1,uVar1);
return ZEXT816(3) << 0x40;
}
|
|
57,209
|
ggml_are_same_stride
|
Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml.c
|
bool ggml_are_same_stride(const struct ggml_tensor * t0, const struct ggml_tensor * t1) {
static_assert(GGML_MAX_DIMS == 4, "GGML_MAX_DIMS is not 4 - update this function");
return
(t0->nb[0] == t1->nb[0]) &&
(t0->nb[1] == t1->nb[1]) &&
(t0->nb[2] == t1->nb[2]) &&
(t0->nb[3] == t1->nb[3]);
}
|
O2
|
c
|
ggml_are_same_stride:
movq 0x30(%rdi), %rax
cmpq 0x30(%rsi), %rax
jne 0x20eef
movq 0x38(%rdi), %rax
cmpq 0x38(%rsi), %rax
jne 0x20eef
movq 0x40(%rdi), %rax
cmpq 0x40(%rsi), %rax
jne 0x20eef
movq 0x48(%rdi), %rax
cmpq 0x48(%rsi), %rax
sete %al
retq
xorl %eax, %eax
retq
|
ggml_are_same_stride:
mov rax, [rdi+30h]
cmp rax, [rsi+30h]
jnz short loc_20EEF
mov rax, [rdi+38h]
cmp rax, [rsi+38h]
jnz short loc_20EEF
mov rax, [rdi+40h]
cmp rax, [rsi+40h]
jnz short loc_20EEF
mov rax, [rdi+48h]
cmp rax, [rsi+48h]
setz al
retn
loc_20EEF:
xor eax, eax
retn
|
bool ggml_are_same_stride(_QWORD *a1, _QWORD *a2)
{
return a1[6] == a2[6] && a1[7] == a2[7] && a1[8] == a2[8] && a1[9] == a2[9];
}
|
ggml_are_same_stride:
MOV RAX,qword ptr [RDI + 0x30]
CMP RAX,qword ptr [RSI + 0x30]
JNZ 0x00120eef
MOV RAX,qword ptr [RDI + 0x38]
CMP RAX,qword ptr [RSI + 0x38]
JNZ 0x00120eef
MOV RAX,qword ptr [RDI + 0x40]
CMP RAX,qword ptr [RSI + 0x40]
JNZ 0x00120eef
MOV RAX,qword ptr [RDI + 0x48]
CMP RAX,qword ptr [RSI + 0x48]
SETZ AL
RET
LAB_00120eef:
XOR EAX,EAX
RET
|
int8 ggml_are_same_stride(long param_1,long param_2)
{
if (((*(long *)(param_1 + 0x30) == *(long *)(param_2 + 0x30)) &&
(*(long *)(param_1 + 0x38) == *(long *)(param_2 + 0x38))) &&
(*(long *)(param_1 + 0x40) == *(long *)(param_2 + 0x40))) {
return CONCAT71((int7)((ulong)*(long *)(param_1 + 0x48) >> 8),
*(long *)(param_1 + 0x48) == *(long *)(param_2 + 0x48));
}
return 0;
}
|
|
57,210
|
ggml_are_same_stride
|
Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml.c
|
bool ggml_are_same_stride(const struct ggml_tensor * t0, const struct ggml_tensor * t1) {
static_assert(GGML_MAX_DIMS == 4, "GGML_MAX_DIMS is not 4 - update this function");
return
(t0->nb[0] == t1->nb[0]) &&
(t0->nb[1] == t1->nb[1]) &&
(t0->nb[2] == t1->nb[2]) &&
(t0->nb[3] == t1->nb[3]);
}
|
O3
|
c
|
ggml_are_same_stride:
movq 0x30(%rdi), %rax
cmpq 0x30(%rsi), %rax
jne 0x1a1d1
movq 0x38(%rdi), %rax
cmpq 0x38(%rsi), %rax
jne 0x1a1d1
movq 0x40(%rdi), %rax
cmpq 0x40(%rsi), %rax
jne 0x1a1d1
movq 0x48(%rdi), %rax
cmpq 0x48(%rsi), %rax
sete %al
retq
xorl %eax, %eax
retq
|
ggml_are_same_stride:
mov rax, [rdi+30h]
cmp rax, [rsi+30h]
jnz short loc_1A1D1
mov rax, [rdi+38h]
cmp rax, [rsi+38h]
jnz short loc_1A1D1
mov rax, [rdi+40h]
cmp rax, [rsi+40h]
jnz short loc_1A1D1
mov rax, [rdi+48h]
cmp rax, [rsi+48h]
setz al
retn
loc_1A1D1:
xor eax, eax
retn
|
bool ggml_are_same_stride(_QWORD *a1, _QWORD *a2)
{
return a1[6] == a2[6] && a1[7] == a2[7] && a1[8] == a2[8] && a1[9] == a2[9];
}
|
ggml_are_same_stride:
MOV RAX,qword ptr [RDI + 0x30]
CMP RAX,qword ptr [RSI + 0x30]
JNZ 0x0011a1d1
MOV RAX,qword ptr [RDI + 0x38]
CMP RAX,qword ptr [RSI + 0x38]
JNZ 0x0011a1d1
MOV RAX,qword ptr [RDI + 0x40]
CMP RAX,qword ptr [RSI + 0x40]
JNZ 0x0011a1d1
MOV RAX,qword ptr [RDI + 0x48]
CMP RAX,qword ptr [RSI + 0x48]
SETZ AL
RET
LAB_0011a1d1:
XOR EAX,EAX
RET
|
int8 ggml_are_same_stride(long param_1,long param_2)
{
if (((*(long *)(param_1 + 0x30) == *(long *)(param_2 + 0x30)) &&
(*(long *)(param_1 + 0x38) == *(long *)(param_2 + 0x38))) &&
(*(long *)(param_1 + 0x40) == *(long *)(param_2 + 0x40))) {
return CONCAT71((int7)((ulong)*(long *)(param_1 + 0x48) >> 8),
*(long *)(param_1 + 0x48) == *(long *)(param_2 + 0x48));
}
return 0;
}
|
|
57,211
|
std::unique_ptr<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::default_delete<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>> nglog::internal::MakeCheckOpString<int, int>(int const&, int const&, char const*)
|
ng-log[P]ng-log/src/ng-log/logging.h
|
std::unique_ptr<std::string> MakeCheckOpString(const T1& v1, const T2& v2,
const char* exprtext) {
CheckOpMessageBuilder comb(exprtext);
MakeCheckOpValueString(comb.ForVar1(), v1);
MakeCheckOpValueString(comb.ForVar2(), v2);
return comb.NewString();
}
|
O0
|
c
|
std::unique_ptr<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::default_delete<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>> nglog::internal::MakeCheckOpString<int, int>(int const&, int const&, char const*):
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movq %rdi, -0x58(%rbp)
movq %rdi, %rax
movq %rax, -0x50(%rbp)
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq -0x20(%rbp), %rsi
leaq -0x28(%rbp), %rdi
movq %rdi, -0x48(%rbp)
callq 0x150d0
movq -0x48(%rbp), %rdi
callq 0xe270
movq %rax, -0x40(%rbp)
jmp 0xe0e3
movq -0x40(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0xe240
jmp 0xe0f2
leaq -0x28(%rbp), %rdi
callq 0x15190
movq %rax, -0x60(%rbp)
jmp 0xe101
movq -0x60(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0xe240
jmp 0xe110
movq -0x58(%rbp), %rdi
leaq -0x28(%rbp), %rsi
callq 0x151c0
jmp 0xe11f
leaq -0x28(%rbp), %rdi
callq 0x15160
movq -0x50(%rbp), %rax
addq $0x60, %rsp
popq %rbp
retq
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x30(%rbp)
movl %eax, -0x34(%rbp)
leaq -0x28(%rbp), %rdi
callq 0x15160
movq -0x30(%rbp), %rdi
callq 0x9cc0
|
_ZN5nglog8internal17MakeCheckOpStringIiiEESt10unique_ptrINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt14default_deleteIS8_EERKT_RKT0_PKc:
push rbp
mov rbp, rsp
sub rsp, 60h
mov [rbp+var_58], rdi
mov rax, rdi
mov [rbp+var_50], rax
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov [rbp+var_18], rdx
mov [rbp+var_20], rcx
mov rsi, [rbp+var_20]; char *
lea rdi, [rbp+var_28]; this
mov [rbp+var_48], rdi
call _ZN5nglog8internal21CheckOpMessageBuilderC2EPKc; nglog::internal::CheckOpMessageBuilder::CheckOpMessageBuilder(char const*)
mov rdi, [rbp+var_48]; this
call _ZN5nglog8internal21CheckOpMessageBuilder7ForVar1Ev; nglog::internal::CheckOpMessageBuilder::ForVar1(void)
mov [rbp+var_40], rax
jmp short $+2
loc_E0E3:
mov rdi, [rbp+var_40]
mov rsi, [rbp+var_10]
call _ZN5nglog8internal22MakeCheckOpValueStringIiEEvPSoRKT_; nglog::internal::MakeCheckOpValueString<int>(std::ostream *,int const&)
jmp short $+2
loc_E0F2:
lea rdi, [rbp+var_28]; this
call _ZN5nglog8internal21CheckOpMessageBuilder7ForVar2Ev; nglog::internal::CheckOpMessageBuilder::ForVar2(void)
mov [rbp+var_60], rax
jmp short $+2
loc_E101:
mov rdi, [rbp+var_60]
mov rsi, [rbp+var_18]
call _ZN5nglog8internal22MakeCheckOpValueStringIiEEvPSoRKT_; nglog::internal::MakeCheckOpValueString<int>(std::ostream *,int const&)
jmp short $+2
loc_E110:
mov rdi, [rbp+var_58]
lea rsi, [rbp+var_28]
call _ZN5nglog8internal21CheckOpMessageBuilder9NewStringB5cxx11Ev; nglog::internal::CheckOpMessageBuilder::NewString(void)
jmp short $+2
loc_E11F:
lea rdi, [rbp+var_28]; this
call _ZN5nglog8internal21CheckOpMessageBuilderD2Ev; nglog::internal::CheckOpMessageBuilder::~CheckOpMessageBuilder()
mov rax, [rbp+var_50]
add rsp, 60h
pop rbp
retn
mov rcx, rax
mov eax, edx
mov [rbp+var_30], rcx
mov [rbp+var_34], eax
lea rdi, [rbp+var_28]; this
call _ZN5nglog8internal21CheckOpMessageBuilderD2Ev; nglog::internal::CheckOpMessageBuilder::~CheckOpMessageBuilder()
mov rdi, [rbp+var_30]
call __Unwind_Resume
|
long long nglog::internal::MakeCheckOpString<int,int>(long long a1, long long a2, long long a3, char *a4)
{
long long v5; // [rsp+0h] [rbp-60h]
long long v6; // [rsp+20h] [rbp-40h]
_BYTE v7[8]; // [rsp+38h] [rbp-28h] BYREF
char *v8; // [rsp+40h] [rbp-20h]
long long v9; // [rsp+48h] [rbp-18h]
long long v10; // [rsp+50h] [rbp-10h]
long long v11; // [rsp+58h] [rbp-8h]
v11 = a1;
v10 = a2;
v9 = a3;
v8 = a4;
nglog::internal::CheckOpMessageBuilder::CheckOpMessageBuilder((nglog::internal::CheckOpMessageBuilder *)v7, a4);
v6 = nglog::internal::CheckOpMessageBuilder::ForVar1((nglog::internal::CheckOpMessageBuilder *)v7);
nglog::internal::MakeCheckOpValueString<int>(v6, v10);
v5 = nglog::internal::CheckOpMessageBuilder::ForVar2((nglog::internal::CheckOpMessageBuilder *)v7);
nglog::internal::MakeCheckOpValueString<int>(v5, v9);
nglog::internal::CheckOpMessageBuilder::NewString[abi:cxx11](a1, v7);
nglog::internal::CheckOpMessageBuilder::~CheckOpMessageBuilder((nglog::internal::CheckOpMessageBuilder *)v7);
return a1;
}
|
MakeCheckOpString<int,int>:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x60
MOV qword ptr [RBP + -0x58],RDI
MOV RAX,RDI
MOV qword ptr [RBP + -0x50],RAX
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV qword ptr [RBP + -0x18],RDX
MOV qword ptr [RBP + -0x20],RCX
MOV RSI,qword ptr [RBP + -0x20]
LEA RDI,[RBP + -0x28]
MOV qword ptr [RBP + -0x48],RDI
CALL 0x001150d0
MOV RDI,qword ptr [RBP + -0x48]
LAB_0010e0d8:
CALL 0x0010e270
MOV qword ptr [RBP + -0x40],RAX
JMP 0x0010e0e3
LAB_0010e0e3:
MOV RDI,qword ptr [RBP + -0x40]
MOV RSI,qword ptr [RBP + -0x10]
CALL 0x0010e240
JMP 0x0010e0f2
LAB_0010e0f2:
LEA RDI,[RBP + -0x28]
CALL 0x00115190
MOV qword ptr [RBP + -0x60],RAX
JMP 0x0010e101
LAB_0010e101:
MOV RDI,qword ptr [RBP + -0x60]
MOV RSI,qword ptr [RBP + -0x18]
CALL 0x0010e240
JMP 0x0010e110
LAB_0010e110:
MOV RDI,qword ptr [RBP + -0x58]
LEA RSI,[RBP + -0x28]
CALL 0x001151c0
LAB_0010e11d:
JMP 0x0010e11f
LAB_0010e11f:
LEA RDI,[RBP + -0x28]
CALL 0x00115160
MOV RAX,qword ptr [RBP + -0x50]
ADD RSP,0x60
POP RBP
RET
|
/* std::unique_ptr<std::__cxx11::string, std::default_delete<std::__cxx11::string > >
nglog::internal::MakeCheckOpString<int, int>(int const&, int const&, char const*) */
internal * __thiscall
nglog::internal::MakeCheckOpString<int,int>(internal *this,int *param_1,int *param_2,char *param_3)
{
ostream *poVar1;
CheckOpMessageBuilder local_30 [8];
char *local_28;
int *local_20;
int *local_18;
internal *local_10;
local_28 = param_3;
local_20 = param_2;
local_18 = param_1;
local_10 = this;
CheckOpMessageBuilder::CheckOpMessageBuilder(local_30,param_3);
/* try { // try from 0010e0d8 to 0010e11c has its CatchHandler @ 0010e132 */
poVar1 = (ostream *)CheckOpMessageBuilder::ForVar1(local_30);
MakeCheckOpValueString<int>(poVar1,local_18);
poVar1 = (ostream *)CheckOpMessageBuilder::ForVar2(local_30);
MakeCheckOpValueString<int>(poVar1,local_20);
CheckOpMessageBuilder::NewString_abi_cxx11_();
CheckOpMessageBuilder::~CheckOpMessageBuilder(local_30);
return this;
}
|
|
57,212
|
base64::encode[abi:cxx11](char const*, unsigned long, base64::alphabet)
|
monkey531[P]llama/common/base64.hpp
|
static std::string encode(const char* buffer, std::size_t size, alphabet alphabet = alphabet::standard)
{
std::string result;
result.reserve(required_encode_size(size) + 1);
encode(buffer, buffer + size, std::back_inserter(result), alphabet);
return result;
}
|
O3
|
cpp
|
base64::encode[abi:cxx11](char const*, unsigned long, base64::alphabet):
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl %ecx, %ebp
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %rbx
leaq 0x10(%rdi), %r12
movq %r12, (%rdi)
movq $0x0, 0x8(%rdi)
movb $0x0, 0x10(%rdi)
movabsq $-0x5555555555555555, %rcx # imm = 0xAAAAAAAAAAAAAAAB
movq %rdx, %rax
mulq %rcx
shrq %rdx
movabsq $0x5555555555555555, %rcx # imm = 0x5555555555555555
xorl %esi, %esi
cmpq %rcx, %rax
seta %sil
addq %rdx, %rsi
leaq 0x1(,%rsi,4), %rsi
callq 0x200d0
addq %r15, %r14
movq %r15, %rdi
movq %r14, %rsi
movq %rbx, %rdx
movl %ebp, %ecx
callq 0x8bf80
movq %rbx, %rax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r14
movq (%rbx), %rdi
cmpq %r12, %rdi
je 0x8b982
movq (%r12), %rsi
incq %rsi
callq 0x1fae0
movq %r14, %rdi
callq 0x20380
|
_ZN6base646encodeB5cxx11EPKcmNS_8alphabetE:
push rbp
push r15
push r14
push r12
push rbx
mov ebp, ecx
mov r14, rdx
mov r15, rsi
mov rbx, rdi
lea r12, [rdi+10h]
mov [rdi], r12
mov qword ptr [rdi+8], 0
mov byte ptr [rdi+10h], 0
mov rcx, 0AAAAAAAAAAAAAAABh
mov rax, rdx
mul rcx
shr rdx, 1
mov rcx, 5555555555555555h
xor esi, esi
cmp rax, rcx
setnbe sil
add rsi, rdx
lea rsi, ds:1[rsi*4]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7reserveEm; std::string::reserve(ulong)
add r14, r15
mov rdi, r15
mov rsi, r14
mov rdx, rbx
mov ecx, ebp
call _ZN6base646encodeIPKcSt20back_insert_iteratorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEEET0_T_SC_SB_NS_8alphabetE; base64::encode<char const*,std::back_insert_iterator<std::string>>(char const*,char const*,std::back_insert_iterator<std::string>,base64::alphabet)
mov rax, rbx
pop rbx
pop r12
pop r14
pop r15
pop rbp
retn
mov r14, rax
mov rdi, [rbx]; void *
cmp rdi, r12
jz short loc_8B982
mov rsi, [r12]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_8B982:
mov rdi, r14
call __Unwind_Resume
|
long long base64::encode[abi:cxx11](long long a1, long long a2, unsigned long long a3, unsigned int a4)
{
*(_QWORD *)a1 = a1 + 16;
*(_QWORD *)(a1 + 8) = 0LL;
*(_BYTE *)(a1 + 16) = 0;
std::string::reserve(a1, 4 * (a3 / 3 + (0xAAAAAAAAAAAAAAABLL * a3 > 0x5555555555555555LL)) + 1);
base64::encode<char const*,std::back_insert_iterator<std::string>>(a2, a2 + a3, a1, a4);
return a1;
}
|
encode[abi:cxx11]:
PUSH RBP
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
MOV EBP,ECX
MOV R14,RDX
MOV R15,RSI
MOV RBX,RDI
LEA R12,[RDI + 0x10]
MOV qword ptr [RDI],R12
MOV qword ptr [RDI + 0x8],0x0
MOV byte ptr [RDI + 0x10],0x0
MOV RCX,-0x5555555555555555
MOV RAX,RDX
MUL RCX
SHR RDX,0x1
MOV RCX,0x5555555555555555
XOR ESI,ESI
CMP RAX,RCX
SETA SIL
ADD RSI,RDX
LEA RSI,[0x1 + RSI*0x4]
LAB_0018b947:
CALL 0x001200d0
ADD R14,R15
MOV RDI,R15
MOV RSI,R14
MOV RDX,RBX
MOV ECX,EBP
CALL 0x0018bf80
LAB_0018b95f:
MOV RAX,RBX
POP RBX
POP R12
POP R14
POP R15
POP RBP
RET
|
/* base64::encode[abi:cxx11](char const*, unsigned long, base64::alphabet) */
base64 * __thiscall
base64::encode_abi_cxx11_(base64 *this,long param_1,long param_2,int4 param_4)
{
*(base64 **)this = this + 0x10;
*(int8 *)(this + 8) = 0;
this[0x10] = (base64)0x0;
/* try { // try from 0018b947 to 0018b95e has its CatchHandler @ 0018b96b */
std::__cxx11::string::reserve((ulong)this);
encode<char_const*,std::back_insert_iterator<std::__cxx11::string>>
(param_1,param_2 + param_1,this,param_4);
return this;
}
|
|
57,213
|
mysql_stmt_prepare
|
eloqsql/libmariadb/libmariadb/mariadb_stmt.c
|
int STDCALL mysql_stmt_prepare(MYSQL_STMT *stmt, const char *query, unsigned long length)
{
MYSQL *mysql= stmt->mysql;
int rc= 1;
my_bool is_multi= 0;
if (!stmt->mysql)
{
SET_CLIENT_STMT_ERROR(stmt, CR_SERVER_LOST, SQLSTATE_UNKNOWN, 0);
return(1);
}
if (length == (unsigned long) -1)
length= (unsigned long)strlen(query);
/* clear flags */
CLEAR_CLIENT_STMT_ERROR(stmt);
CLEAR_CLIENT_ERROR(stmt->mysql);
stmt->upsert_status.affected_rows= mysql->affected_rows= (unsigned long long) ~0;
/* check if we have to clear results */
if (stmt->state > MYSQL_STMT_INITTED)
{
char stmt_id[STMT_ID_LENGTH];
is_multi= (mysql->net.extension->multi_status > COM_MULTI_OFF);
/* We need to semi-close the prepared statement:
reset stmt and free all buffers and close the statement
on server side. Statement handle will get a new stmt_id */
if (!is_multi)
ma_multi_command(mysql, COM_MULTI_ENABLED);
if (mysql_stmt_internal_reset(stmt, 1))
goto fail;
ma_free_root(&stmt->mem_root, MYF(MY_KEEP_PREALLOC));
ma_free_root(&((MADB_STMT_EXTENSION *)stmt->extension)->fields_ma_alloc_root, MYF(0));
stmt->param_count= 0;
stmt->field_count= 0;
stmt->fields= NULL;
stmt->params= NULL;
int4store(stmt_id, stmt->stmt_id);
if (mysql->methods->db_command(mysql, COM_STMT_CLOSE, stmt_id,
sizeof(stmt_id), 1, stmt))
goto fail;
}
if (mysql->methods->db_command(mysql, COM_STMT_PREPARE, query, length, 1, stmt))
goto fail;
if (!is_multi && mysql->net.extension->multi_status == COM_MULTI_ENABLED)
if (ma_multi_command(mysql, COM_MULTI_END))
goto fail;
if (mysql->net.extension->multi_status > COM_MULTI_OFF ||
mysql->options.extension->skip_read_response)
return 0;
if (mysql->methods->db_read_prepare_response &&
mysql->methods->db_read_prepare_response(stmt))
goto fail;
return(0);
fail:
stmt->state= MYSQL_STMT_INITTED;
UPDATE_STMT_ERROR(stmt);
return(rc);
}
|
O3
|
c
|
mysql_stmt_prepare:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rbx
movq %fs:0x28, %rax
movq %rax, -0x30(%rbp)
movq 0x38(%rdi), %r14
testq %r14, %r14
je 0x7e714
movq %rdx, %r12
movq %rsi, %r15
cmpq $-0x1, %rdx
jne 0x7e60d
movq %r15, %rdi
callq 0x5f480
movq %rax, %r12
xorl %eax, %eax
movl %eax, 0x108(%rbx)
movl $0x30303030, %ecx # imm = 0x30303030
movl %ecx, 0x30d(%rbx)
movw $0x30, %dx
movw %dx, 0x311(%rbx)
movb %al, 0x10c(%rbx)
movl %eax, 0x90(%r14)
movq 0x38(%rbx), %rsi
movw %dx, 0x29b(%rsi)
movl %ecx, 0x297(%rsi)
movq 0x38(%rbx), %rcx
movb %al, 0x97(%rcx)
movq 0x38(%rbx), %rax
movq 0x2a0(%rax), %rax
testq %rax, %rax
je 0x7e66a
movl $0x0, 0x4(%rax)
movq $-0x1, %rax
movq %rax, 0x338(%r14)
movq %rax, 0xf8(%rbx)
cmpl $0x0, 0x50(%rbx)
je 0x7e759
movq 0x2a0(%r14), %rax
cmpl $0x0, (%rax)
sete %r13b
jne 0x7e6a6
movq %r14, %rdi
movl $0x2, %esi
callq 0x73675
movq %rbx, %rdi
movl $0x1, %esi
callq 0x7d31c
testb %al, %al
jne 0x7e785
movq %rbx, %rdi
movl $0x1, %esi
callq 0x7b487
movq 0x340(%rbx), %rdi
xorl %esi, %esi
callq 0x7b487
movq $0x0, 0x70(%rbx)
xorps %xmm0, %xmm0
movups %xmm0, 0x58(%rbx)
movl 0x40(%rbx), %eax
leaq -0x34(%rbp), %rdx
movl %eax, (%rdx)
movq 0x4d0(%r14), %rax
movl $0x4, %ecx
movq %r14, %rdi
movl $0x19, %esi
movl $0x1, %r8d
movq %rbx, %r9
callq *0x10(%rax)
testl %eax, %eax
jne 0x7e785
jmp 0x7e75c
movl $0x7dd, 0x108(%rbx) # imm = 0x7DD
leaq 0x30d(%rbx), %rdi
leaq 0x3667f4(%rip), %rax # 0x3e4f20
movq (%rax), %rsi
movl $0x5, %edx
callq 0x5f180
movb $0x0, 0x312(%rbx)
leaq 0x10c(%rbx), %rdi
leaq 0x3667e2(%rip), %rax # 0x3e4f30
movq 0x68(%rax), %rsi
movl $0x200, %edx # imm = 0x200
jmp 0x7e7d3
movb $0x1, %r13b
movq 0x4d0(%r14), %rax
movq %r14, %rdi
movl $0x16, %esi
movq %r15, %rdx
movq %r12, %rcx
movl $0x1, %r8d
movq %rbx, %r9
callq *0x10(%rax)
testl %eax, %eax
je 0x7e806
leaq 0x30d(%rbx), %rdi
leaq 0x10c(%rbx), %r14
movl $0x0, 0x50(%rbx)
movq 0x38(%rbx), %rsi
movl 0x90(%rsi), %eax
movl %eax, 0x108(%rbx)
addq $0x297, %rsi # imm = 0x297
movl $0x5, %edx
callq 0x5f180
movb $0x0, 0x312(%rbx)
movl $0x97, %esi
addq 0x38(%rbx), %rsi
movl $0x200, %edx # imm = 0x200
movq %r14, %rdi
callq 0x5f180
movb $0x0, 0x30b(%rbx)
movl $0x1, %r15d
movq %fs:0x28, %rax
cmpq -0x30(%rbp), %rax
jne 0x7e86d
movl %r15d, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
testb %r13b, %r13b
je 0x7e82c
movq 0x2a0(%r14), %rax
cmpl $0x2, (%rax)
jne 0x7e82c
movq %r14, %rdi
movl $0x4, %esi
callq 0x73675
testl %eax, %eax
jne 0x7e785
movq 0x2a0(%r14), %rax
xorl %r15d, %r15d
cmpl $0x0, (%rax)
jne 0x7e7e5
movq 0x480(%r14), %rax
cmpb $0x0, 0x148(%rax)
jne 0x7e7e5
movq 0x4d0(%r14), %rax
movq 0x40(%rax), %rax
testq %rax, %rax
je 0x7e7e5
movq %rbx, %rdi
callq *%rax
testb %al, %al
jne 0x7e785
jmp 0x7e7e5
callq 0x5f320
|
mysql_stmt_prepare:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 18h
mov rbx, rdi
mov rax, fs:28h
mov [rbp+var_30], rax
mov r14, [rdi+38h]
test r14, r14
jz loc_7E714
mov r12, rdx
mov r15, rsi
cmp rdx, 0FFFFFFFFFFFFFFFFh
jnz short loc_7E60D
mov rdi, r15
call _strlen
mov r12, rax
loc_7E60D:
xor eax, eax
mov [rbx+108h], eax
mov ecx, 30303030h
mov [rbx+30Dh], ecx
mov dx, 30h ; '0'
mov [rbx+311h], dx
mov [rbx+10Ch], al
mov [r14+90h], eax
mov rsi, [rbx+38h]
mov [rsi+29Bh], dx
mov [rsi+297h], ecx
mov rcx, [rbx+38h]
mov [rcx+97h], al
mov rax, [rbx+38h]
mov rax, [rax+2A0h]
test rax, rax
jz short loc_7E66A
mov dword ptr [rax+4], 0
loc_7E66A:
mov rax, 0FFFFFFFFFFFFFFFFh
mov [r14+338h], rax
mov [rbx+0F8h], rax
cmp dword ptr [rbx+50h], 0
jz loc_7E759
mov rax, [r14+2A0h]
cmp dword ptr [rax], 0
setz r13b
jnz short loc_7E6A6
mov rdi, r14
mov esi, 2
call ma_multi_command
loc_7E6A6:
mov rdi, rbx
mov esi, 1
call mysql_stmt_internal_reset
test al, al
jnz loc_7E785
mov rdi, rbx
mov esi, 1
call ma_free_root
mov rdi, [rbx+340h]
xor esi, esi
call ma_free_root
mov qword ptr [rbx+70h], 0
xorps xmm0, xmm0
movups xmmword ptr [rbx+58h], xmm0
mov eax, [rbx+40h]
lea rdx, [rbp+var_34]
mov [rdx], eax
mov rax, [r14+4D0h]
mov ecx, 4
mov rdi, r14
mov esi, 19h
mov r8d, 1
mov r9, rbx
call qword ptr [rax+10h]
test eax, eax
jnz short loc_7E785
jmp short loc_7E75C
loc_7E714:
mov dword ptr [rbx+108h], 7DDh
lea rdi, [rbx+30Dh]
lea rax, SQLSTATE_UNKNOWN
mov rsi, [rax]
mov edx, 5
call _strncpy
mov byte ptr [rbx+312h], 0
lea rdi, [rbx+10Ch]
lea rax, client_errors
mov rsi, [rax+68h]
mov edx, 200h
jmp short loc_7E7D3
loc_7E759:
mov r13b, 1
loc_7E75C:
mov rax, [r14+4D0h]
mov rdi, r14
mov esi, 16h
mov rdx, r15
mov rcx, r12
mov r8d, 1
mov r9, rbx
call qword ptr [rax+10h]
test eax, eax
jz loc_7E806
loc_7E785:
lea rdi, [rbx+30Dh]
lea r14, [rbx+10Ch]
mov dword ptr [rbx+50h], 0
mov rsi, [rbx+38h]
mov eax, [rsi+90h]
mov [rbx+108h], eax
add rsi, 297h
mov edx, 5
call _strncpy
mov byte ptr [rbx+312h], 0
mov esi, 97h
add rsi, [rbx+38h]
mov edx, 200h
mov rdi, r14
loc_7E7D3:
call _strncpy
mov byte ptr [rbx+30Bh], 0
mov r15d, 1
loc_7E7E5:
mov rax, fs:28h
cmp rax, [rbp+var_30]
jnz short loc_7E86D
mov eax, r15d
add rsp, 18h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_7E806:
test r13b, r13b
jz short loc_7E82C
mov rax, [r14+2A0h]
cmp dword ptr [rax], 2
jnz short loc_7E82C
mov rdi, r14
mov esi, 4
call ma_multi_command
test eax, eax
jnz loc_7E785
loc_7E82C:
mov rax, [r14+2A0h]
xor r15d, r15d
cmp dword ptr [rax], 0
jnz short loc_7E7E5
mov rax, [r14+480h]
cmp byte ptr [rax+148h], 0
jnz short loc_7E7E5
mov rax, [r14+4D0h]
mov rax, [rax+40h]
test rax, rax
jz short loc_7E7E5
mov rdi, rbx
call rax
test al, al
jnz loc_7E785
jmp loc_7E7E5
loc_7E86D:
call ___stack_chk_fail
|
long long mysql_stmt_prepare(long long a1, long long a2, long long a3)
{
long long v4; // r14
long long v5; // r12
long long v6; // rax
_DWORD *v7; // rax
bool v8; // r13
long long v9; // rdi
char *v10; // rsi
long long v11; // rsi
unsigned int v12; // r15d
unsigned __int8 ( *v14)(long long); // rax
int v15; // [rsp+Ch] [rbp-34h] BYREF
unsigned long long v16; // [rsp+10h] [rbp-30h]
v16 = __readfsqword(0x28u);
v4 = *(_QWORD *)(a1 + 56);
if ( !v4 )
{
*(_DWORD *)(a1 + 264) = 2013;
strncpy(a1 + 781, SQLSTATE_UNKNOWN, 5LL);
*(_BYTE *)(a1 + 786) = 0;
v9 = a1 + 268;
v10 = client_errors[13];
LABEL_16:
strncpy(v9, v10, 512LL);
*(_BYTE *)(a1 + 779) = 0;
return 1;
}
v5 = a3;
if ( a3 == -1 )
v5 = strlen(a2);
*(_DWORD *)(a1 + 264) = 0;
strcpy((char *)(a1 + 781), "00000");
*(_BYTE *)(a1 + 268) = 0;
*(_DWORD *)(v4 + 144) = 0;
strcpy((char *)(*(_QWORD *)(a1 + 56) + 663LL), "00000");
*(_BYTE *)(*(_QWORD *)(a1 + 56) + 151LL) = 0;
v6 = *(_QWORD *)(*(_QWORD *)(a1 + 56) + 672LL);
if ( v6 )
*(_DWORD *)(v6 + 4) = 0;
*(_QWORD *)(v4 + 824) = -1LL;
*(_QWORD *)(a1 + 248) = -1LL;
if ( *(_DWORD *)(a1 + 80) )
{
v7 = *(_DWORD **)(v4 + 672);
v8 = *v7 == 0;
if ( !*v7 )
ma_multi_command(v4, 2);
if ( (unsigned __int8)mysql_stmt_internal_reset(a1, 1) )
goto LABEL_15;
ma_free_root(a1, 1);
ma_free_root(*(_QWORD *)(a1 + 832), 0);
*(_QWORD *)(a1 + 112) = 0LL;
*(_OWORD *)(a1 + 88) = 0LL;
v15 = *(_DWORD *)(a1 + 64);
if ( (*(unsigned int ( **)(long long, long long, int *, long long, long long, long long))(*(_QWORD *)(v4 + 1232)
+ 16LL))(
v4,
25LL,
&v15,
4LL,
1LL,
a1) )
{
goto LABEL_15;
}
}
else
{
v8 = 1;
}
if ( (*(unsigned int ( **)(long long, long long, long long, long long, long long, long long))(*(_QWORD *)(v4 + 1232)
+ 16LL))(
v4,
22LL,
a2,
v5,
1LL,
a1)
|| v8 && **(_DWORD **)(v4 + 672) == 2 && (unsigned int)ma_multi_command(v4, 4)
|| (v12 = 0, !**(_DWORD **)(v4 + 672))
&& !*(_BYTE *)(*(_QWORD *)(v4 + 1152) + 328LL)
&& (v14 = *(unsigned __int8 ( **)(long long))(*(_QWORD *)(v4 + 1232) + 64LL)) != 0LL
&& v14(a1) )
{
LABEL_15:
*(_DWORD *)(a1 + 80) = 0;
v11 = *(_QWORD *)(a1 + 56);
*(_DWORD *)(a1 + 264) = *(_DWORD *)(v11 + 144);
strncpy(a1 + 781, v11 + 663, 5LL);
*(_BYTE *)(a1 + 786) = 0;
v10 = (char *)(*(_QWORD *)(a1 + 56) + 151LL);
v9 = a1 + 268;
goto LABEL_16;
}
return v12;
}
|
mysql_stmt_prepare:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x18
MOV RBX,RDI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x30],RAX
MOV R14,qword ptr [RDI + 0x38]
TEST R14,R14
JZ 0x0017e714
MOV R12,RDX
MOV R15,RSI
CMP RDX,-0x1
JNZ 0x0017e60d
MOV RDI,R15
CALL 0x0015f480
MOV R12,RAX
LAB_0017e60d:
XOR EAX,EAX
MOV dword ptr [RBX + 0x108],EAX
MOV ECX,0x30303030
MOV dword ptr [RBX + 0x30d],ECX
MOV DX,0x30
MOV word ptr [RBX + 0x311],DX
MOV byte ptr [RBX + 0x10c],AL
MOV dword ptr [R14 + 0x90],EAX
MOV RSI,qword ptr [RBX + 0x38]
MOV word ptr [RSI + 0x29b],DX
MOV dword ptr [RSI + 0x297],ECX
MOV RCX,qword ptr [RBX + 0x38]
MOV byte ptr [RCX + 0x97],AL
MOV RAX,qword ptr [RBX + 0x38]
MOV RAX,qword ptr [RAX + 0x2a0]
TEST RAX,RAX
JZ 0x0017e66a
MOV dword ptr [RAX + 0x4],0x0
LAB_0017e66a:
MOV RAX,-0x1
MOV qword ptr [R14 + 0x338],RAX
MOV qword ptr [RBX + 0xf8],RAX
CMP dword ptr [RBX + 0x50],0x0
JZ 0x0017e759
MOV RAX,qword ptr [R14 + 0x2a0]
CMP dword ptr [RAX],0x0
SETZ R13B
JNZ 0x0017e6a6
MOV RDI,R14
MOV ESI,0x2
CALL 0x00173675
LAB_0017e6a6:
MOV RDI,RBX
MOV ESI,0x1
CALL 0x0017d31c
TEST AL,AL
JNZ 0x0017e785
MOV RDI,RBX
MOV ESI,0x1
CALL 0x0017b487
MOV RDI,qword ptr [RBX + 0x340]
XOR ESI,ESI
CALL 0x0017b487
MOV qword ptr [RBX + 0x70],0x0
XORPS XMM0,XMM0
MOVUPS xmmword ptr [RBX + 0x58],XMM0
MOV EAX,dword ptr [RBX + 0x40]
LEA RDX,[RBP + -0x34]
MOV dword ptr [RDX],EAX
MOV RAX,qword ptr [R14 + 0x4d0]
MOV ECX,0x4
MOV RDI,R14
MOV ESI,0x19
MOV R8D,0x1
MOV R9,RBX
CALL qword ptr [RAX + 0x10]
TEST EAX,EAX
JNZ 0x0017e785
JMP 0x0017e75c
LAB_0017e714:
MOV dword ptr [RBX + 0x108],0x7dd
LEA RDI,[RBX + 0x30d]
LEA RAX,[0x4e4f20]
MOV RSI,qword ptr [RAX]
MOV EDX,0x5
CALL 0x0015f180
MOV byte ptr [RBX + 0x312],0x0
LEA RDI,[RBX + 0x10c]
LEA RAX,[0x4e4f30]
MOV RSI,qword ptr [RAX + 0x68]
MOV EDX,0x200
JMP 0x0017e7d3
LAB_0017e759:
MOV R13B,0x1
LAB_0017e75c:
MOV RAX,qword ptr [R14 + 0x4d0]
MOV RDI,R14
MOV ESI,0x16
MOV RDX,R15
MOV RCX,R12
MOV R8D,0x1
MOV R9,RBX
CALL qword ptr [RAX + 0x10]
TEST EAX,EAX
JZ 0x0017e806
LAB_0017e785:
LEA RDI,[RBX + 0x30d]
LEA R14,[RBX + 0x10c]
MOV dword ptr [RBX + 0x50],0x0
MOV RSI,qword ptr [RBX + 0x38]
MOV EAX,dword ptr [RSI + 0x90]
MOV dword ptr [RBX + 0x108],EAX
ADD RSI,0x297
MOV EDX,0x5
CALL 0x0015f180
MOV byte ptr [RBX + 0x312],0x0
MOV ESI,0x97
ADD RSI,qword ptr [RBX + 0x38]
MOV EDX,0x200
MOV RDI,R14
LAB_0017e7d3:
CALL 0x0015f180
MOV byte ptr [RBX + 0x30b],0x0
MOV R15D,0x1
LAB_0017e7e5:
MOV RAX,qword ptr FS:[0x28]
CMP RAX,qword ptr [RBP + -0x30]
JNZ 0x0017e86d
MOV EAX,R15D
ADD RSP,0x18
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_0017e806:
TEST R13B,R13B
JZ 0x0017e82c
MOV RAX,qword ptr [R14 + 0x2a0]
CMP dword ptr [RAX],0x2
JNZ 0x0017e82c
MOV RDI,R14
MOV ESI,0x4
CALL 0x00173675
TEST EAX,EAX
JNZ 0x0017e785
LAB_0017e82c:
MOV RAX,qword ptr [R14 + 0x2a0]
XOR R15D,R15D
CMP dword ptr [RAX],0x0
JNZ 0x0017e7e5
MOV RAX,qword ptr [R14 + 0x480]
CMP byte ptr [RAX + 0x148],0x0
JNZ 0x0017e7e5
MOV RAX,qword ptr [R14 + 0x4d0]
MOV RAX,qword ptr [RAX + 0x40]
TEST RAX,RAX
JZ 0x0017e7e5
MOV RDI,RBX
CALL RAX
TEST AL,AL
JNZ 0x0017e785
JMP 0x0017e7e5
LAB_0017e86d:
CALL 0x0015f320
|
int8 mysql_stmt_prepare(long param_1,char *param_2,size_t param_3)
{
long lVar1;
long lVar2;
code *pcVar3;
char cVar4;
int iVar5;
char *__src;
int8 uVar6;
long in_FS_OFFSET;
bool bVar7;
int4 local_3c;
long local_38;
local_38 = *(long *)(in_FS_OFFSET + 0x28);
lVar1 = *(long *)(param_1 + 0x38);
if (lVar1 == 0) {
*(int4 *)(param_1 + 0x108) = 0x7dd;
strncpy((char *)(param_1 + 0x30d),SQLSTATE_UNKNOWN,5);
*(int1 *)(param_1 + 0x312) = 0;
__src = PTR_s_Lost_connection_to_server_during_004e4f98;
}
else {
if (param_3 == 0xffffffffffffffff) {
param_3 = strlen(param_2);
}
*(int4 *)(param_1 + 0x108) = 0;
*(int4 *)(param_1 + 0x30d) = 0x30303030;
*(int2 *)(param_1 + 0x311) = 0x30;
*(int1 *)(param_1 + 0x10c) = 0;
*(int4 *)(lVar1 + 0x90) = 0;
lVar2 = *(long *)(param_1 + 0x38);
*(int2 *)(lVar2 + 0x29b) = 0x30;
*(int4 *)(lVar2 + 0x297) = 0x30303030;
*(int1 *)(*(long *)(param_1 + 0x38) + 0x97) = 0;
lVar2 = *(long *)(*(long *)(param_1 + 0x38) + 0x2a0);
if (lVar2 != 0) {
*(int4 *)(lVar2 + 4) = 0;
}
*(int8 *)(lVar1 + 0x338) = 0xffffffffffffffff;
*(int8 *)(param_1 + 0xf8) = 0xffffffffffffffff;
if (*(int *)(param_1 + 0x50) == 0) {
bVar7 = true;
LAB_0017e75c:
iVar5 = (**(code **)(*(long *)(lVar1 + 0x4d0) + 0x10))(lVar1,0x16,param_2,param_3,1,param_1);
if ((iVar5 == 0) &&
(((!bVar7 || (**(int **)(lVar1 + 0x2a0) != 2)) ||
(iVar5 = ma_multi_command(lVar1,4), iVar5 == 0)))) {
uVar6 = 0;
if ((((**(int **)(lVar1 + 0x2a0) != 0) ||
(*(char *)(*(long *)(lVar1 + 0x480) + 0x148) != '\0')) ||
(pcVar3 = *(code **)(*(long *)(lVar1 + 0x4d0) + 0x40), pcVar3 == (code *)0x0)) ||
(cVar4 = (*pcVar3)(param_1), uVar6 = 0, cVar4 == '\0')) goto LAB_0017e7e5;
}
}
else {
bVar7 = **(int **)(lVar1 + 0x2a0) == 0;
if (bVar7) {
ma_multi_command(lVar1,2);
}
cVar4 = mysql_stmt_internal_reset(param_1,1);
if (cVar4 == '\0') {
ma_free_root(param_1,1);
ma_free_root(*(int8 *)(param_1 + 0x340),0);
*(int8 *)(param_1 + 0x70) = 0;
*(int8 *)(param_1 + 0x58) = 0;
*(int8 *)(param_1 + 0x60) = 0;
local_3c = *(int4 *)(param_1 + 0x40);
iVar5 = (**(code **)(*(long *)(lVar1 + 0x4d0) + 0x10))(lVar1,0x19,&local_3c,4,1,param_1);
if (iVar5 == 0) goto LAB_0017e75c;
}
}
*(int4 *)(param_1 + 0x50) = 0;
*(int4 *)(param_1 + 0x108) = *(int4 *)(*(long *)(param_1 + 0x38) + 0x90);
strncpy((char *)(param_1 + 0x30d),(char *)(*(long *)(param_1 + 0x38) + 0x297),5);
*(int1 *)(param_1 + 0x312) = 0;
__src = (char *)(*(long *)(param_1 + 0x38) + 0x97);
}
strncpy((char *)(param_1 + 0x10c),__src,0x200);
*(int1 *)(param_1 + 0x30b) = 0;
uVar6 = 1;
LAB_0017e7e5:
if (*(long *)(in_FS_OFFSET + 0x28) != local_38) {
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
return uVar6;
}
|
|
57,214
|
my_rw_init
|
eloqsql/mysys/thr_rwlock.c
|
int my_rw_init(my_rw_lock_t *rwp)
{
pthread_condattr_t cond_attr;
pthread_mutex_init( &rwp->lock, MY_MUTEX_INIT_FAST);
pthread_condattr_init( &cond_attr );
pthread_cond_init( &rwp->readers, &cond_attr );
pthread_cond_init( &rwp->writers, &cond_attr );
pthread_condattr_destroy(&cond_attr);
rwp->state = 0;
rwp->waiters = 0;
#ifdef SAFE_MUTEX
rwp->write_thread = 0;
#endif
return(0);
}
|
O0
|
c
|
my_rw_init:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rdi
leaq 0x4002d9(%rip), %rsi # 0x4c67f0
callq 0x60450
leaq -0xc(%rbp), %rdi
callq 0x609d0
movq -0x8(%rbp), %rdi
addq $0x28, %rdi
leaq -0xc(%rbp), %rsi
callq 0x604a0
movq -0x8(%rbp), %rdi
addq $0x58, %rdi
leaq -0xc(%rbp), %rsi
callq 0x604a0
leaq -0xc(%rbp), %rdi
callq 0x609c0
movq -0x8(%rbp), %rax
movl $0x0, 0x88(%rax)
movq -0x8(%rbp), %rax
movl $0x0, 0x8c(%rax)
xorl %eax, %eax
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
|
my_rw_init:
push rbp
mov rbp, rsp
sub rsp, 10h
mov [rbp+var_8], rdi
mov rdi, [rbp+var_8]
lea rsi, my_fast_mutexattr
call _pthread_mutex_init
lea rdi, [rbp+var_C]
call _pthread_condattr_init
mov rdi, [rbp+var_8]
add rdi, 28h ; '('
lea rsi, [rbp+var_C]
call _pthread_cond_init
mov rdi, [rbp+var_8]
add rdi, 58h ; 'X'
lea rsi, [rbp+var_C]
call _pthread_cond_init
lea rdi, [rbp+var_C]
call _pthread_condattr_destroy
mov rax, [rbp+var_8]
mov dword ptr [rax+88h], 0
mov rax, [rbp+var_8]
mov dword ptr [rax+8Ch], 0
xor eax, eax
add rsp, 10h
pop rbp
retn
|
long long my_rw_init(long long a1)
{
_BYTE v2[4]; // [rsp+4h] [rbp-Ch] BYREF
long long v3; // [rsp+8h] [rbp-8h]
v3 = a1;
pthread_mutex_init(a1, &my_fast_mutexattr);
pthread_condattr_init(v2);
pthread_cond_init(v3 + 40, v2);
pthread_cond_init(v3 + 88, v2);
pthread_condattr_destroy(v2);
*(_DWORD *)(v3 + 136) = 0;
*(_DWORD *)(v3 + 140) = 0;
return 0LL;
}
|
my_rw_init:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x10
MOV qword ptr [RBP + -0x8],RDI
MOV RDI,qword ptr [RBP + -0x8]
LEA RSI,[0x5c67f0]
CALL 0x00160450
LEA RDI,[RBP + -0xc]
CALL 0x001609d0
MOV RDI,qword ptr [RBP + -0x8]
ADD RDI,0x28
LEA RSI,[RBP + -0xc]
CALL 0x001604a0
MOV RDI,qword ptr [RBP + -0x8]
ADD RDI,0x58
LEA RSI,[RBP + -0xc]
CALL 0x001604a0
LEA RDI,[RBP + -0xc]
CALL 0x001609c0
MOV RAX,qword ptr [RBP + -0x8]
MOV dword ptr [RAX + 0x88],0x0
MOV RAX,qword ptr [RBP + -0x8]
MOV dword ptr [RAX + 0x8c],0x0
XOR EAX,EAX
ADD RSP,0x10
POP RBP
RET
|
int8 my_rw_init(pthread_mutex_t *param_1)
{
pthread_condattr_t local_14;
pthread_mutex_t *local_10;
local_10 = param_1;
pthread_mutex_init(param_1,(pthread_mutexattr_t *)&my_fast_mutexattr);
pthread_condattr_init(&local_14);
pthread_cond_init((pthread_cond_t *)(local_10 + 1),&local_14);
pthread_cond_init((pthread_cond_t *)((long)local_10 + 0x58),&local_14);
pthread_condattr_destroy(&local_14);
*(int4 *)((long)local_10 + 0x88) = 0;
*(int4 *)((long)local_10 + 0x8c) = 0;
return 0;
}
|
|
57,215
|
store_param
|
eloqsql/libmariadb/libmariadb/mariadb_stmt.c
|
int store_param(MYSQL_STMT *stmt, int column, unsigned char **p, unsigned long row_nr)
{
void *buf= ma_get_buffer_offset(stmt, stmt->params[column].buffer_type,
stmt->params[column].buffer, row_nr);
signed char indicator= ma_get_indicator(stmt, column, row_nr);
switch (stmt->params[column].buffer_type) {
case MYSQL_TYPE_TINY:
int1store(*p, (*(uchar *)buf));
(*p) += 1;
break;
case MYSQL_TYPE_SHORT:
case MYSQL_TYPE_YEAR:
int2store(*p, (*(short *)buf));
(*p) += 2;
break;
case MYSQL_TYPE_FLOAT:
float4store(*p, (*(float *)buf));
(*p) += 4;
break;
case MYSQL_TYPE_DOUBLE:
float8store(*p, (*(double *)buf));
(*p) += 8;
break;
case MYSQL_TYPE_LONGLONG:
int8store(*p, (*(ulonglong *)buf));
(*p) += 8;
break;
case MYSQL_TYPE_LONG:
case MYSQL_TYPE_INT24:
int4store(*p, (*(int32 *)buf));
(*p)+= 4;
break;
case MYSQL_TYPE_TIME:
{
/* binary encoding:
Offset Length Field
0 1 Length
1 1 negative
2-5 4 day
6 1 hour
7 1 minute
8 1 second;
9-13 4 second_part
*/
MYSQL_TIME *t= (MYSQL_TIME *)ma_get_buffer_offset(stmt, stmt->params[column].buffer_type,
stmt->params[column].buffer, row_nr);
char t_buffer[MAX_TIME_STR_LEN];
uint len= 0;
t_buffer[1]= t->neg ? 1 : 0;
int4store(t_buffer + 2, t->day);
t_buffer[6]= (uchar) t->hour;
t_buffer[7]= (uchar) t->minute;
t_buffer[8]= (uchar) t->second;
if (t->second_part)
{
int4store(t_buffer + 9, t->second_part);
len= 12;
}
else if (t->day || t->hour || t->minute || t->second)
len= 8;
t_buffer[0]= len++;
memcpy(*p, t_buffer, len);
(*p)+= len;
break;
}
case MYSQL_TYPE_DATE:
case MYSQL_TYPE_TIMESTAMP:
case MYSQL_TYPE_DATETIME:
{
/* binary format for date, timestamp and datetime
Offset Length Field
0 1 Length
1-2 2 Year
3 1 Month
4 1 Day
5 1 Hour
6 1 minute
7 1 second
8-11 4 secondpart
*/
MYSQL_TIME *t= (MYSQL_TIME *)ma_get_buffer_offset(stmt, stmt->params[column].buffer_type,
stmt->params[column].buffer, row_nr);
char t_buffer[MAX_DATETIME_STR_LEN];
uint len= 0;
int2store(t_buffer + 1, t->year);
t_buffer[3]= (char) t->month;
t_buffer[4]= (char) t->day;
t_buffer[5]= (char) t->hour;
t_buffer[6]= (char) t->minute;
t_buffer[7]= (char) t->second;
if (t->second_part)
{
int4store(t_buffer + 8, t->second_part);
len= 11;
}
else if (t->hour || t->minute || t->second)
len= 7;
else if (t->year || t->month || t->day)
len= 4;
else
len=0;
t_buffer[0]= len++;
memcpy(*p, t_buffer, len);
(*p)+= len;
break;
}
case MYSQL_TYPE_TINY_BLOB:
case MYSQL_TYPE_MEDIUM_BLOB:
case MYSQL_TYPE_LONG_BLOB:
case MYSQL_TYPE_BLOB:
case MYSQL_TYPE_VARCHAR:
case MYSQL_TYPE_VAR_STRING:
case MYSQL_TYPE_STRING:
case MYSQL_TYPE_JSON:
case MYSQL_TYPE_DECIMAL:
case MYSQL_TYPE_NEWDECIMAL:
{
ulong len;
/* to is after p. The latter hasn't been moved */
uchar *to;
if (indicator == STMT_INDICATOR_NTS)
len= -1;
else
len= ma_get_length(stmt, column, row_nr);
if (len == (ulong)-1)
len= (ulong)strlen((char *)buf);
to = mysql_net_store_length(*p, len);
if (len)
memcpy(to, buf, len);
(*p) = to + len;
break;
}
default:
/* unsupported parameter type */
SET_CLIENT_STMT_ERROR(stmt, CR_UNSUPPORTED_PARAM_TYPE, SQLSTATE_UNKNOWN, 0);
return 1;
}
return 0;
}
|
O3
|
c
|
store_param:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rdx, %r10
movl %esi, %r13d
movq %rdi, %r12
movq %fs:0x28, %rax
movq %rax, -0x30(%rbp)
movq 0x70(%rdi), %r14
movslq %esi, %rax
imulq $0x70, %rax, %rax
movl 0x60(%r14,%rax), %edi
movq 0x10(%r14,%rax), %rax
movq 0x390(%r12), %rbx
movq %rax, %r15
testq %rbx, %rbx
jne 0x1f830
cmpl $0x0, 0x368(%r12)
movq %rax, %r15
je 0x1f830
movq 0x370(%r12), %r15
testq %r15, %r15
jne 0x1f829
leaq (%rdi,%rdi,2), %rdx
leaq 0x2b845(%rip), %rsi # 0x4b060
movslq 0x8(%rsi,%rdx,8), %r15
testq %r15, %r15
jle 0x1fb28
imulq %rcx, %r15
addq %rax, %r15
cmpl $0xf, %edi
ja 0x1f8ca
leaq 0x19898(%rip), %rdx # 0x390d8
movslq (%rdx,%rdi,4), %rsi
addq %rdx, %rsi
jmpq *%rsi
testq %rbx, %rbx
jne 0x1f886
cmpl $0x0, 0x368(%r12)
je 0x1f886
movq 0x370(%r12), %rdx
testq %rdx, %rdx
jne 0x1f87f
leaq (%rdi,%rdi,2), %rsi
leaq 0x2b7ef(%rip), %rdx # 0x4b060
movslq 0x8(%rdx,%rsi,8), %rdx
testq %rdx, %rdx
jle 0x1fbcf
imulq %rcx, %rdx
addq %rdx, %rax
movl (%rax), %ecx
movw %cx, -0x3c(%rbp)
movl 0x4(%rax), %esi
movb %sil, -0x3a(%rbp)
movl 0x8(%rax), %edx
movb %dl, -0x39(%rbp)
movl 0xc(%rax), %edi
movb %dil, -0x38(%rbp)
movl 0x10(%rax), %r8d
movb %r8b, -0x37(%rbp)
movl 0x14(%rax), %r9d
movb %r9b, -0x36(%rbp)
movq 0x18(%rax), %rax
testq %rax, %rax
je 0x1f9fc
movl %eax, -0x35(%rbp)
movl $0xb, %eax
jmp 0x1fa1c
leal -0xf5(%rdi), %eax
cmpl $0x9, %eax
ja 0x1f998
movl $0x3f3, %edx # imm = 0x3F3
btl %eax, %edx
jae 0x1f998
movq %r10, -0x48(%rbp)
movq %r12, %rdi
movl %r13d, %esi
movq %rcx, -0x50(%rbp)
movq %rcx, %rdx
callq 0x1fbe6
cmpb $-0x1, %al
je 0x1fb42
movl %r13d, %eax
imulq $0x70, %rax, %rax
movq (%r14,%rax), %rax
testq %rax, %rax
je 0x1f93c
testq %rbx, %rbx
jne 0x1fb39
movq 0x370(%r12), %rcx
testq %rcx, %rcx
je 0x1fb31
imulq -0x50(%rbp), %rcx
addq %rcx, %rax
jmp 0x1fb39
movq -0x48(%rbp), %rax
movq (%rax), %rdi
xorl %r14d, %r14d
xorl %esi, %esi
callq 0x1f70b
movq %rax, %r12
jmp 0x1fb77
movzwl (%r15), %eax
movq (%r10), %rcx
movb %al, (%rcx)
movq (%r10), %rcx
movb %ah, 0x1(%rcx)
addq $0x2, (%r10)
jmp 0x1fbaf
movb (%r15), %al
movq (%r10), %rcx
movb %al, (%rcx)
movb 0x1(%r15), %al
movq (%r10), %rcx
movb %al, 0x1(%rcx)
movb 0x2(%r15), %al
movq (%r10), %rcx
movb %al, 0x2(%rcx)
movb 0x3(%r15), %al
movq (%r10), %rcx
movb %al, 0x3(%rcx)
jmp 0x1fb1f
movl $0x7f4, 0x108(%r12) # imm = 0x7F4
leaq 0x30d(%r12), %rdi
leaq 0x2b16d(%rip), %rax # 0x4ab20
movq (%rax), %rsi
movl $0x5, %edx
callq 0x13220
xorl %ebx, %ebx
movb %bl, 0x312(%r12)
leaq 0x10c(%r12), %rdi
leaq 0x2b157(%rip), %rax # 0x4ab30
movq 0x120(%rax), %rsi
movl $0x200, %edx # imm = 0x200
callq 0x13220
movb %bl, 0x30b(%r12)
movl $0x1, %eax
jmp 0x1fbb1
orl %r8d, %edi
movl $0x7, %eax
orl %r9d, %edi
jne 0x1fa1c
movl $0x4, %eax
orl %esi, %ecx
jne 0x1fa1c
xorl %eax, %eax
testl %edx, %edx
setne %al
shll $0x2, %eax
movl %eax, %r14d
incq %r14
jmp 0x1fb98
testq %rbx, %rbx
jne 0x1fa62
cmpl $0x0, 0x368(%r12)
je 0x1fa62
movq 0x370(%r12), %rdx
testq %rdx, %rdx
jne 0x1fa5b
leaq 0x2b615(%rip), %rdx # 0x4b060
movslq 0x110(%rdx), %rdx
testq %rdx, %rdx
jle 0x1fbd8
imulq %rcx, %rdx
addq %rdx, %rax
cmpb $0x0, 0x20(%rax)
setne -0x3c(%rbp)
movl 0x8(%rax), %ecx
movl %ecx, -0x3b(%rbp)
movl 0xc(%rax), %edx
movb %dl, -0x37(%rbp)
movl 0x10(%rax), %esi
movb %sil, -0x36(%rbp)
movl 0x14(%rax), %edi
movb %dil, -0x35(%rbp)
movq 0x18(%rax), %rax
testq %rax, %rax
je 0x1fb83
movl %eax, -0x34(%rbp)
movl $0xc, %eax
jmp 0x1fb91
movq (%r10), %rax
movq (%r15), %rcx
movq %rcx, (%rax)
jmp 0x1fb0e
movb (%r15), %al
movq (%r10), %rcx
movb %al, (%rcx)
incq (%r10)
jmp 0x1fbaf
movq (%r15), %rax
movq %rax, %rcx
shrq $0x20, %rcx
movq (%r10), %rdx
movb %al, (%rdx)
movq (%r10), %rdx
movb %ah, 0x1(%rdx)
movl %eax, %edx
shrl $0x10, %edx
movq (%r10), %rsi
movb %dl, 0x2(%rsi)
movl %eax, %edx
shrl $0x18, %edx
movq (%r10), %rsi
movb %dl, 0x3(%rsi)
movq (%r10), %rdx
movb %cl, 0x4(%rdx)
movq %rax, %rcx
shrq $0x28, %rcx
movq (%r10), %rdx
movb %cl, 0x5(%rdx)
movq %rax, %rcx
shrq $0x30, %rcx
movq (%r10), %rdx
movb %cl, 0x6(%rdx)
shrq $0x38, %rax
movq (%r10), %rcx
movb %al, 0x7(%rcx)
addq $0x8, (%r10)
jmp 0x1fbaf
movq (%r10), %rax
movl (%r15), %ecx
movl %ecx, (%rax)
addq $0x4, (%r10)
jmp 0x1fbaf
movq (%rax,%rcx,8), %r15
jmp 0x1f830
movq -0x50(%rbp), %rcx
leaq (%rax,%rcx,8), %rax
movq (%rax), %r14
cmpq $-0x1, %r14
jne 0x1fb4d
movq %r15, %rdi
callq 0x131c0
movq %rax, %r14
movq -0x48(%rbp), %rax
movq (%rax), %rdi
movq %r14, %rsi
callq 0x1f70b
movq %rax, %r12
testq %r14, %r14
je 0x1fb74
movq %r12, %rdi
movq %r15, %rsi
movq %r14, %rdx
callq 0x13390
jmp 0x1fb77
xorl %r14d, %r14d
addq %r14, %r12
movq -0x48(%rbp), %rax
movq %r12, (%rax)
jmp 0x1fbaf
orl %edx, %ecx
orl %esi, %ecx
xorl %eax, %eax
orl %edi, %ecx
setne %al
shll $0x3, %eax
movl %eax, %r14d
orl $0x1, %r14d
leaq -0x3d(%rbp), %rsi
movb %al, (%rsi)
movq (%r10), %rdi
movq %r14, %rdx
movq %r10, %rbx
callq 0x13390
addq %r14, (%rbx)
xorl %eax, %eax
movq %fs:0x28, %rcx
cmpq -0x30(%rbp), %rcx
jne 0x1fbe1
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq (%rax,%rcx,8), %rax
jmp 0x1f886
movq (%rax,%rcx,8), %rax
jmp 0x1fa62
callq 0x13500
|
store_param:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 28h
mov r10, rdx
mov r13d, esi
mov r12, rdi
mov rax, fs:28h
mov [rbp+var_30], rax
mov r14, [rdi+70h]
movsxd rax, esi
imul rax, 70h ; 'p'
mov edi, [r14+rax+60h]
mov rax, [r14+rax+10h]
mov rbx, [r12+390h]
mov r15, rax
test rbx, rbx
jnz short loc_1F830
cmp dword ptr [r12+368h], 0
mov r15, rax
jz short loc_1F830
mov r15, [r12+370h]
test r15, r15
jnz short loc_1F829
lea rdx, [rdi+rdi*2]
lea rsi, mysql_ps_fetch_functions
movsxd r15, dword ptr [rsi+rdx*8+8]
test r15, r15
jle loc_1FB28
loc_1F829:
imul r15, rcx
add r15, rax
loc_1F830:
cmp edi, 0Fh; switch 16 cases
ja def_1F847; jumptable 000000000001F847 default case
lea rdx, jpt_1F847
movsxd rsi, ds:(jpt_1F847 - 390D8h)[rdx+rdi*4]
add rsi, rdx
jmp rsi; switch jump
loc_1F849:
test rbx, rbx; jumptable 000000000001F847 cases 7,10,12
jnz short loc_1F886
cmp dword ptr [r12+368h], 0
jz short loc_1F886
mov rdx, [r12+370h]
test rdx, rdx
jnz short loc_1F87F
lea rsi, [rdi+rdi*2]
lea rdx, mysql_ps_fetch_functions
movsxd rdx, dword ptr [rdx+rsi*8+8]
test rdx, rdx
jle loc_1FBCF
loc_1F87F:
imul rdx, rcx
add rax, rdx
loc_1F886:
mov ecx, [rax]
mov word ptr [rbp+var_3C], cx
mov esi, [rax+4]
mov byte ptr [rbp+var_3C+2], sil
mov edx, [rax+8]
mov byte ptr [rbp+var_3C+3], dl
mov edi, [rax+0Ch]
mov [rbp+var_38], dil
mov r8d, [rax+10h]
mov [rbp+var_37], r8b
mov r9d, [rax+14h]
mov [rbp+var_36], r9b
mov rax, [rax+18h]
test rax, rax
jz loc_1F9FC
mov [rbp+var_35], eax
mov eax, 0Bh
jmp loc_1FA1C
def_1F847:
lea eax, [rdi-0F5h]; jumptable 000000000001F847 default case
cmp eax, 9
ja loc_1F998; jumptable 000000000001F847 cases 6,14
mov edx, 3F3h
bt edx, eax
jnb loc_1F998; jumptable 000000000001F847 cases 6,14
loc_1F8E7:
mov [rbp+var_48], r10; jumptable 000000000001F847 cases 0,15
mov rdi, r12
mov esi, r13d
mov [rbp+var_50], rcx
mov rdx, rcx
call ma_get_indicator
cmp al, 0FFh
jz loc_1FB42
mov eax, r13d
imul rax, 70h ; 'p'
mov rax, [r14+rax]
test rax, rax
jz short loc_1F93C
test rbx, rbx
jnz loc_1FB39
mov rcx, [r12+370h]
test rcx, rcx
jz loc_1FB31
imul rcx, [rbp+var_50]
add rax, rcx
jmp loc_1FB39
loc_1F93C:
mov rax, [rbp+var_48]
mov rdi, [rax]
xor r14d, r14d
xor esi, esi
call mysql_net_store_length
mov r12, rax
jmp loc_1FB77
loc_1F955:
movzx eax, word ptr [r15]; jumptable 000000000001F847 cases 2,13
mov rcx, [r10]
mov [rcx], al
mov rcx, [r10]
mov [rcx+1], ah
add qword ptr [r10], 2
jmp loc_1FBAF
loc_1F96D:
mov al, [r15]; jumptable 000000000001F847 cases 3,9
mov rcx, [r10]
mov [rcx], al
mov al, [r15+1]
mov rcx, [r10]
mov [rcx+1], al
mov al, [r15+2]
mov rcx, [r10]
mov [rcx+2], al
mov al, [r15+3]
mov rcx, [r10]
mov [rcx+3], al
jmp loc_1FB1F
loc_1F998:
mov dword ptr [r12+108h], 7F4h; jumptable 000000000001F847 cases 6,14
lea rdi, [r12+30Dh]
lea rax, SQLSTATE_UNKNOWN
mov rsi, [rax]
mov edx, 5
call _strncpy
xor ebx, ebx
mov [r12+312h], bl
lea rdi, [r12+10Ch]
lea rax, client_errors
mov rsi, [rax+120h]
mov edx, 200h
call _strncpy
mov [r12+30Bh], bl
mov eax, 1
jmp loc_1FBB1
loc_1F9FC:
or edi, r8d
mov eax, 7
or edi, r9d
jnz short loc_1FA1C
mov eax, 4
or ecx, esi
jnz short loc_1FA1C
xor eax, eax
test edx, edx
setnz al
shl eax, 2
loc_1FA1C:
mov r14d, eax
inc r14
jmp loc_1FB98
loc_1FA27:
test rbx, rbx; jumptable 000000000001F847 case 11
jnz short loc_1FA62
cmp dword ptr [r12+368h], 0
jz short loc_1FA62
mov rdx, [r12+370h]
test rdx, rdx
jnz short loc_1FA5B
lea rdx, mysql_ps_fetch_functions
movsxd rdx, dword ptr [rdx+110h]
test rdx, rdx
jle loc_1FBD8
loc_1FA5B:
imul rdx, rcx
add rax, rdx
loc_1FA62:
cmp byte ptr [rax+20h], 0
setnz byte ptr [rbp+var_3C]
mov ecx, [rax+8]
mov [rbp+var_3C+1], ecx
mov edx, [rax+0Ch]
mov [rbp+var_37], dl
mov esi, [rax+10h]
mov [rbp+var_36], sil
mov edi, [rax+14h]
mov byte ptr [rbp+var_35], dil
mov rax, [rax+18h]
test rax, rax
jz loc_1FB83
mov [rbp+var_35+1], eax
mov eax, 0Ch
jmp loc_1FB91
loc_1FA9E:
mov rax, [r10]; jumptable 000000000001F847 case 5
mov rcx, [r15]
mov [rax], rcx
jmp short loc_1FB0E
loc_1FAA9:
mov al, [r15]; jumptable 000000000001F847 case 1
mov rcx, [r10]
mov [rcx], al
inc qword ptr [r10]
jmp loc_1FBAF
loc_1FAB9:
mov rax, [r15]; jumptable 000000000001F847 case 8
mov rcx, rax
shr rcx, 20h
mov rdx, [r10]
mov [rdx], al
mov rdx, [r10]
mov [rdx+1], ah
mov edx, eax
shr edx, 10h
mov rsi, [r10]
mov [rsi+2], dl
mov edx, eax
shr edx, 18h
mov rsi, [r10]
mov [rsi+3], dl
mov rdx, [r10]
mov [rdx+4], cl
mov rcx, rax
shr rcx, 28h
mov rdx, [r10]
mov [rdx+5], cl
mov rcx, rax
shr rcx, 30h
mov rdx, [r10]
mov [rdx+6], cl
shr rax, 38h
mov rcx, [r10]
mov [rcx+7], al
loc_1FB0E:
add qword ptr [r10], 8
jmp loc_1FBAF
loc_1FB17:
mov rax, [r10]; jumptable 000000000001F847 case 4
mov ecx, [r15]
mov [rax], ecx
loc_1FB1F:
add qword ptr [r10], 4
jmp loc_1FBAF
loc_1FB28:
mov r15, [rax+rcx*8]
jmp loc_1F830
loc_1FB31:
mov rcx, [rbp+var_50]
lea rax, [rax+rcx*8]
loc_1FB39:
mov r14, [rax]
cmp r14, 0FFFFFFFFFFFFFFFFh
jnz short loc_1FB4D
loc_1FB42:
mov rdi, r15
call _strlen
mov r14, rax
loc_1FB4D:
mov rax, [rbp+var_48]
mov rdi, [rax]
mov rsi, r14
call mysql_net_store_length
mov r12, rax
test r14, r14
jz short loc_1FB74
mov rdi, r12
mov rsi, r15
mov rdx, r14
call _memcpy
jmp short loc_1FB77
loc_1FB74:
xor r14d, r14d
loc_1FB77:
add r12, r14
mov rax, [rbp+var_48]
mov [rax], r12
jmp short loc_1FBAF
loc_1FB83:
or ecx, edx
or ecx, esi
xor eax, eax
or ecx, edi
setnz al
shl eax, 3
loc_1FB91:
mov r14d, eax
or r14d, 1
loc_1FB98:
lea rsi, [rbp+var_3D]
mov [rsi], al
mov rdi, [r10]
mov rdx, r14
mov rbx, r10
call _memcpy
add [rbx], r14
loc_1FBAF:
xor eax, eax
loc_1FBB1:
mov rcx, fs:28h
cmp rcx, [rbp+var_30]
jnz short loc_1FBE1
add rsp, 28h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_1FBCF:
mov rax, [rax+rcx*8]
jmp loc_1F886
loc_1FBD8:
mov rax, [rax+rcx*8]
jmp loc_1FA62
loc_1FBE1:
call ___stack_chk_fail
|
long long store_param(long long a1, unsigned int a2, _QWORD *a3, long long a4)
{
long long v6; // r14
long long v7; // rax
long long v8; // rdi
int *v9; // rax
long long v10; // rbx
_BYTE *v11; // r15
long long v12; // r15
long long v13; // rdx
int v14; // ecx
int v15; // esi
int v16; // edx
int v17; // edi
int v18; // r8d
int v19; // r9d
long long v20; // rax
unsigned int v21; // eax
int v22; // edx
unsigned long long *v23; // rax
long long v24; // rcx
unsigned long long v25; // r14
long long v26; // r12
long long v28; // r14
long long v29; // rdx
int v30; // ecx
int v31; // edx
int v32; // esi
int v33; // edi
long long v34; // rax
long long v35; // rax
long long v36; // rcx
long long v37; // rax
_QWORD *v38; // rbx
long long *v40; // [rsp+8h] [rbp-48h]
char v41; // [rsp+13h] [rbp-3Dh] BYREF
_BYTE v42[5]; // [rsp+14h] [rbp-3Ch]
char v43; // [rsp+19h] [rbp-37h]
char v44; // [rsp+1Ah] [rbp-36h]
_BYTE v45[5]; // [rsp+1Bh] [rbp-35h]
unsigned long long v46; // [rsp+20h] [rbp-30h]
v46 = __readfsqword(0x28u);
v6 = *(_QWORD *)(a1 + 112);
v7 = 112LL * (int)a2;
v8 = *(unsigned int *)(v6 + v7 + 96);
v9 = *(int **)(v6 + v7 + 16);
v10 = *(_QWORD *)(a1 + 912);
v11 = v9;
if ( !v10 )
{
v11 = v9;
if ( *(_DWORD *)(a1 + 872) )
{
v12 = *(_QWORD *)(a1 + 880);
if ( v12 || (v12 = mysql_ps_fetch_functions[6 * v8 + 2], v12 > 0) )
v11 = (char *)v9 + a4 * v12;
else
v11 = *(_BYTE **)&v9[2 * a4];
}
}
switch ( (int)v8 )
{
case 0:
case 15:
goto LABEL_16;
case 1:
*(_BYTE *)(*a3)++ = *v11;
return 0LL;
case 2:
case 13:
*(_WORD *)*a3 = *(_WORD *)v11;
*a3 += 2LL;
return 0LL;
case 3:
case 9:
*(_BYTE *)*a3 = *v11;
*(_BYTE *)(*a3 + 1LL) = v11[1];
*(_BYTE *)(*a3 + 2LL) = v11[2];
*(_BYTE *)(*a3 + 3LL) = v11[3];
goto LABEL_41;
case 4:
*(_DWORD *)*a3 = *(_DWORD *)v11;
LABEL_41:
*a3 += 4LL;
return 0LL;
case 5:
*(_QWORD *)*a3 = *(_QWORD *)v11;
goto LABEL_39;
case 6:
case 14:
goto LABEL_24;
case 7:
case 10:
case 12:
if ( !v10 && *(_DWORD *)(a1 + 872) )
{
v13 = *(_QWORD *)(a1 + 880);
if ( v13 || (v13 = mysql_ps_fetch_functions[6 * v8 + 2], v13 > 0) )
v9 = (int *)((char *)v9 + a4 * v13);
else
v9 = *(int **)&v9[2 * a4];
}
v14 = *v9;
*(_WORD *)v42 = *v9;
v15 = v9[1];
v42[2] = v15;
v16 = v9[2];
v42[3] = v16;
v17 = v9[3];
v42[4] = v17;
v18 = v9[4];
v43 = v18;
v19 = v9[5];
v44 = v19;
v20 = *((_QWORD *)v9 + 3);
if ( v20 )
{
*(_DWORD *)v45 = v20;
v21 = 11;
}
else
{
v21 = 7;
if ( !(v19 | v18 | v17) )
{
v21 = 4;
if ( !(v15 | v14) )
v21 = 4 * (v16 != 0);
}
}
v28 = v21 + 1LL;
goto LABEL_52;
case 8:
v35 = *(_QWORD *)v11;
v36 = HIDWORD(*(_QWORD *)v11);
*(_WORD *)*a3 = *(_QWORD *)v11;
*(_BYTE *)(*a3 + 2LL) = BYTE2(v35);
*(_BYTE *)(*a3 + 3LL) = BYTE3(v35);
*(_BYTE *)(*a3 + 4LL) = v36;
*(_BYTE *)(*a3 + 5LL) = BYTE5(v35);
*(_BYTE *)(*a3 + 6LL) = BYTE6(v35);
*(_BYTE *)(*a3 + 7LL) = HIBYTE(v35);
LABEL_39:
*a3 += 8LL;
return 0LL;
case 11:
if ( !v10 && *(_DWORD *)(a1 + 872) )
{
v29 = *(_QWORD *)(a1 + 880);
if ( v29 || (v29 = mysql_ps_fetch_functions[68], v29 > 0) )
v9 = (int *)((char *)v9 + a4 * v29);
else
v9 = *(int **)&v9[2 * a4];
}
v42[0] = *((_BYTE *)v9 + 32) != 0;
v30 = v9[2];
*(_DWORD *)&v42[1] = v30;
v31 = v9[3];
v43 = v31;
v32 = v9[4];
v44 = v32;
v33 = v9[5];
v45[0] = v33;
v34 = *((_QWORD *)v9 + 3);
if ( v34 )
{
*(_DWORD *)&v45[1] = v34;
v21 = 12;
}
else
{
v21 = 8 * ((v33 | v32 | v31 | v30) != 0);
}
v28 = v21 | 1;
LABEL_52:
v41 = v21;
v38 = a3;
memcpy(*a3, &v41, v28);
*v38 += v28;
return 0LL;
default:
if ( (unsigned int)(v8 - 245) > 9 || (v22 = 1011, !_bittest(&v22, v8 - 245)) )
{
LABEL_24:
*(_DWORD *)(a1 + 264) = 2036;
strncpy(a1 + 781, SQLSTATE_UNKNOWN, 5LL);
*(_BYTE *)(a1 + 786) = 0;
strncpy(a1 + 268, client_errors[36], 512LL);
*(_BYTE *)(a1 + 779) = 0;
return 1LL;
}
LABEL_16:
v40 = a3;
if ( (unsigned __int8)ma_get_indicator(a1, a2, a4) == 0xFF )
goto LABEL_45;
v23 = *(unsigned long long **)(v6 + 112LL * a2);
if ( v23 )
{
if ( !v10 )
{
v24 = *(_QWORD *)(a1 + 880);
if ( v24 )
v23 = (unsigned long long *)((char *)v23 + a4 * v24);
else
v23 += a4;
}
v25 = *v23;
if ( *v23 == -1LL )
LABEL_45:
v25 = strlen(v11);
v37 = mysql_net_store_length(*v40, v25);
v26 = v37;
if ( v25 )
memcpy(v37, v11, v25);
else
v25 = 0LL;
}
else
{
v25 = 0LL;
v26 = mysql_net_store_length(*v40, 0LL);
}
*v40 = v25 + v26;
return 0LL;
}
}
|
store_param:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x28
MOV R10,RDX
MOV R13D,ESI
MOV R12,RDI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x30],RAX
MOV R14,qword ptr [RDI + 0x70]
MOVSXD RAX,ESI
IMUL RAX,RAX,0x70
MOV EDI,dword ptr [R14 + RAX*0x1 + 0x60]
MOV RAX,qword ptr [R14 + RAX*0x1 + 0x10]
MOV RBX,qword ptr [R12 + 0x390]
MOV R15,RAX
TEST RBX,RBX
JNZ 0x0011f830
CMP dword ptr [R12 + 0x368],0x0
MOV R15,RAX
JZ 0x0011f830
MOV R15,qword ptr [R12 + 0x370]
TEST R15,R15
JNZ 0x0011f829
LEA RDX,[RDI + RDI*0x2]
LEA RSI,[0x14b060]
MOVSXD R15,dword ptr [RSI + RDX*0x8 + 0x8]
TEST R15,R15
JLE 0x0011fb28
LAB_0011f829:
IMUL R15,RCX
ADD R15,RAX
LAB_0011f830:
CMP EDI,0xf
JA 0x0011f8ca
LEA RDX,[0x1390d8]
MOVSXD RSI,dword ptr [RDX + RDI*0x4]
ADD RSI,RDX
switchD:
JMP RSI
caseD_7:
TEST RBX,RBX
JNZ 0x0011f886
CMP dword ptr [R12 + 0x368],0x0
JZ 0x0011f886
MOV RDX,qword ptr [R12 + 0x370]
TEST RDX,RDX
JNZ 0x0011f87f
LEA RSI,[RDI + RDI*0x2]
LEA RDX,[0x14b060]
MOVSXD RDX,dword ptr [RDX + RSI*0x8 + 0x8]
TEST RDX,RDX
JLE 0x0011fbcf
LAB_0011f87f:
IMUL RDX,RCX
ADD RAX,RDX
LAB_0011f886:
MOV ECX,dword ptr [RAX]
MOV word ptr [RBP + -0x3c],CX
MOV ESI,dword ptr [RAX + 0x4]
MOV byte ptr [RBP + -0x3a],SIL
MOV EDX,dword ptr [RAX + 0x8]
MOV byte ptr [RBP + -0x39],DL
MOV EDI,dword ptr [RAX + 0xc]
MOV byte ptr [RBP + -0x38],DIL
MOV R8D,dword ptr [RAX + 0x10]
MOV byte ptr [RBP + -0x37],R8B
MOV R9D,dword ptr [RAX + 0x14]
MOV byte ptr [RBP + -0x36],R9B
MOV RAX,qword ptr [RAX + 0x18]
TEST RAX,RAX
JZ 0x0011f9fc
MOV dword ptr [RBP + -0x35],EAX
MOV EAX,0xb
JMP 0x0011fa1c
default:
LEA EAX,[RDI + -0xf5]
CMP EAX,0x9
JA 0x0011f998
MOV EDX,0x3f3
BT EDX,EAX
JNC 0x0011f998
caseD_0:
MOV qword ptr [RBP + -0x48],R10
MOV RDI,R12
MOV ESI,R13D
MOV qword ptr [RBP + -0x50],RCX
MOV RDX,RCX
CALL 0x0011fbe6
CMP AL,0xff
JZ 0x0011fb42
MOV EAX,R13D
IMUL RAX,RAX,0x70
MOV RAX,qword ptr [R14 + RAX*0x1]
TEST RAX,RAX
JZ 0x0011f93c
TEST RBX,RBX
JNZ 0x0011fb39
MOV RCX,qword ptr [R12 + 0x370]
TEST RCX,RCX
JZ 0x0011fb31
IMUL RCX,qword ptr [RBP + -0x50]
ADD RAX,RCX
JMP 0x0011fb39
LAB_0011f93c:
MOV RAX,qword ptr [RBP + -0x48]
MOV RDI,qword ptr [RAX]
XOR R14D,R14D
XOR ESI,ESI
CALL 0x0011f70b
MOV R12,RAX
JMP 0x0011fb77
caseD_2:
MOVZX EAX,word ptr [R15]
MOV RCX,qword ptr [R10]
MOV byte ptr [RCX],AL
MOV RCX,qword ptr [R10]
MOV byte ptr [RCX + 0x1],AH
ADD qword ptr [R10],0x2
JMP 0x0011fbaf
caseD_3:
MOV AL,byte ptr [R15]
MOV RCX,qword ptr [R10]
MOV byte ptr [RCX],AL
MOV AL,byte ptr [R15 + 0x1]
MOV RCX,qword ptr [R10]
MOV byte ptr [RCX + 0x1],AL
MOV AL,byte ptr [R15 + 0x2]
MOV RCX,qword ptr [R10]
MOV byte ptr [RCX + 0x2],AL
MOV AL,byte ptr [R15 + 0x3]
MOV RCX,qword ptr [R10]
MOV byte ptr [RCX + 0x3],AL
JMP 0x0011fb1f
caseD_6:
MOV dword ptr [R12 + 0x108],0x7f4
LEA RDI,[R12 + 0x30d]
LEA RAX,[0x14ab20]
MOV RSI,qword ptr [RAX]
MOV EDX,0x5
CALL 0x00113220
XOR EBX,EBX
MOV byte ptr [R12 + 0x312],BL
LEA RDI,[R12 + 0x10c]
LEA RAX,[0x14ab30]
MOV RSI,qword ptr [RAX + 0x120]
MOV EDX,0x200
CALL 0x00113220
MOV byte ptr [R12 + 0x30b],BL
MOV EAX,0x1
JMP 0x0011fbb1
LAB_0011f9fc:
OR EDI,R8D
MOV EAX,0x7
OR EDI,R9D
JNZ 0x0011fa1c
MOV EAX,0x4
OR ECX,ESI
JNZ 0x0011fa1c
XOR EAX,EAX
TEST EDX,EDX
SETNZ AL
SHL EAX,0x2
LAB_0011fa1c:
MOV R14D,EAX
INC R14
JMP 0x0011fb98
caseD_b:
TEST RBX,RBX
JNZ 0x0011fa62
CMP dword ptr [R12 + 0x368],0x0
JZ 0x0011fa62
MOV RDX,qword ptr [R12 + 0x370]
TEST RDX,RDX
JNZ 0x0011fa5b
LEA RDX,[0x14b060]
MOVSXD RDX,dword ptr [RDX + 0x110]
TEST RDX,RDX
JLE 0x0011fbd8
LAB_0011fa5b:
IMUL RDX,RCX
ADD RAX,RDX
LAB_0011fa62:
CMP byte ptr [RAX + 0x20],0x0
SETNZ byte ptr [RBP + -0x3c]
MOV ECX,dword ptr [RAX + 0x8]
MOV dword ptr [RBP + -0x3b],ECX
MOV EDX,dword ptr [RAX + 0xc]
MOV byte ptr [RBP + -0x37],DL
MOV ESI,dword ptr [RAX + 0x10]
MOV byte ptr [RBP + -0x36],SIL
MOV EDI,dword ptr [RAX + 0x14]
MOV byte ptr [RBP + -0x35],DIL
MOV RAX,qword ptr [RAX + 0x18]
TEST RAX,RAX
JZ 0x0011fb83
MOV dword ptr [RBP + -0x34],EAX
MOV EAX,0xc
JMP 0x0011fb91
caseD_5:
MOV RAX,qword ptr [R10]
MOV RCX,qword ptr [R15]
MOV qword ptr [RAX],RCX
JMP 0x0011fb0e
caseD_1:
MOV AL,byte ptr [R15]
MOV RCX,qword ptr [R10]
MOV byte ptr [RCX],AL
INC qword ptr [R10]
JMP 0x0011fbaf
caseD_8:
MOV RAX,qword ptr [R15]
MOV RCX,RAX
SHR RCX,0x20
MOV RDX,qword ptr [R10]
MOV byte ptr [RDX],AL
MOV RDX,qword ptr [R10]
MOV byte ptr [RDX + 0x1],AH
MOV EDX,EAX
SHR EDX,0x10
MOV RSI,qword ptr [R10]
MOV byte ptr [RSI + 0x2],DL
MOV EDX,EAX
SHR EDX,0x18
MOV RSI,qword ptr [R10]
MOV byte ptr [RSI + 0x3],DL
MOV RDX,qword ptr [R10]
MOV byte ptr [RDX + 0x4],CL
MOV RCX,RAX
SHR RCX,0x28
MOV RDX,qword ptr [R10]
MOV byte ptr [RDX + 0x5],CL
MOV RCX,RAX
SHR RCX,0x30
MOV RDX,qword ptr [R10]
MOV byte ptr [RDX + 0x6],CL
SHR RAX,0x38
MOV RCX,qword ptr [R10]
MOV byte ptr [RCX + 0x7],AL
LAB_0011fb0e:
ADD qword ptr [R10],0x8
JMP 0x0011fbaf
caseD_4:
MOV RAX,qword ptr [R10]
MOV ECX,dword ptr [R15]
MOV dword ptr [RAX],ECX
LAB_0011fb1f:
ADD qword ptr [R10],0x4
JMP 0x0011fbaf
LAB_0011fb28:
MOV R15,qword ptr [RAX + RCX*0x8]
JMP 0x0011f830
LAB_0011fb31:
MOV RCX,qword ptr [RBP + -0x50]
LEA RAX,[RAX + RCX*0x8]
LAB_0011fb39:
MOV R14,qword ptr [RAX]
CMP R14,-0x1
JNZ 0x0011fb4d
LAB_0011fb42:
MOV RDI,R15
CALL 0x001131c0
MOV R14,RAX
LAB_0011fb4d:
MOV RAX,qword ptr [RBP + -0x48]
MOV RDI,qword ptr [RAX]
MOV RSI,R14
CALL 0x0011f70b
MOV R12,RAX
TEST R14,R14
JZ 0x0011fb74
MOV RDI,R12
MOV RSI,R15
MOV RDX,R14
CALL 0x00113390
JMP 0x0011fb77
LAB_0011fb74:
XOR R14D,R14D
LAB_0011fb77:
ADD R12,R14
MOV RAX,qword ptr [RBP + -0x48]
MOV qword ptr [RAX],R12
JMP 0x0011fbaf
LAB_0011fb83:
OR ECX,EDX
OR ECX,ESI
XOR EAX,EAX
OR ECX,EDI
SETNZ AL
SHL EAX,0x3
LAB_0011fb91:
MOV R14D,EAX
OR R14D,0x1
LAB_0011fb98:
LEA RSI,[RBP + -0x3d]
MOV byte ptr [RSI],AL
MOV RDI,qword ptr [R10]
MOV RDX,R14
MOV RBX,R10
CALL 0x00113390
ADD qword ptr [RBX],R14
LAB_0011fbaf:
XOR EAX,EAX
LAB_0011fbb1:
MOV RCX,qword ptr FS:[0x28]
CMP RCX,qword ptr [RBP + -0x30]
JNZ 0x0011fbe1
ADD RSP,0x28
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_0011fbcf:
MOV RAX,qword ptr [RAX + RCX*0x8]
JMP 0x0011f886
LAB_0011fbd8:
MOV RAX,qword ptr [RAX + RCX*0x8]
JMP 0x0011fa62
LAB_0011fbe1:
CALL 0x00113500
|
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
int8 store_param(long param_1,uint param_2,long *param_3,long param_4)
{
long lVar1;
int iVar2;
char cVar3;
uint uVar4;
int *piVar5;
size_t *psVar6;
int8 uVar7;
size_t sVar8;
void *__dest;
long lVar9;
ulong uVar10;
long lVar11;
int *__s;
long in_FS_OFFSET;
int1 local_45;
int1 local_44;
int1 uStack_43;
int1 uStack_42;
int1 uStack_41;
int1 uStack_40;
int1 local_3f;
int1 local_3e;
int4 local_3d;
int1 uStack_39;
long local_38;
local_38 = *(long *)(in_FS_OFFSET + 0x28);
lVar9 = *(long *)(param_1 + 0x70);
uVar4 = *(uint *)(lVar9 + 0x60 + (long)(int)param_2 * 0x70);
uVar10 = (ulong)uVar4;
piVar5 = *(int **)(lVar9 + 0x10 + (long)(int)param_2 * 0x70);
lVar1 = *(long *)(param_1 + 0x390);
__s = piVar5;
if ((lVar1 == 0) && (*(int *)(param_1 + 0x368) != 0)) {
lVar11 = *(long *)(param_1 + 0x370);
if ((lVar11 == 0) && (lVar11 = (long)(int)(&DAT_0014b068)[uVar10 * 6], lVar11 < 1)) {
__s = *(int **)(piVar5 + param_4 * 2);
}
else {
__s = (int *)(lVar11 * param_4 + (long)piVar5);
}
}
switch(uVar10) {
case 0:
case 0xf:
goto switchD_0011f847_caseD_0;
case 1:
*(char *)*param_3 = (char)*__s;
*param_3 = *param_3 + 1;
break;
case 2:
case 0xd:
iVar2 = *__s;
*(char *)*param_3 = (char)(short)iVar2;
*(char *)(*param_3 + 1) = (char)((ushort)(short)iVar2 >> 8);
*param_3 = *param_3 + 2;
break;
case 3:
case 9:
*(char *)*param_3 = (char)*__s;
*(int1 *)(*param_3 + 1) = *(int1 *)((long)__s + 1);
*(int1 *)(*param_3 + 2) = *(int1 *)((long)__s + 2);
*(int1 *)(*param_3 + 3) = *(int1 *)((long)__s + 3);
goto LAB_0011fb1f;
case 4:
*(int *)*param_3 = *__s;
LAB_0011fb1f:
*param_3 = *param_3 + 4;
break;
case 5:
*(int8 *)*param_3 = *(int8 *)__s;
goto LAB_0011fb0e;
case 6:
case 0xe:
switchD_0011f847_caseD_6:
*(int4 *)(param_1 + 0x108) = 0x7f4;
strncpy((char *)(param_1 + 0x30d),SQLSTATE_UNKNOWN,5);
*(int1 *)(param_1 + 0x312) = 0;
strncpy((char *)(param_1 + 0x10c),PTR_s_Buffer_type_is_not_supported_0014ac50,0x200);
*(int1 *)(param_1 + 0x30b) = 0;
uVar7 = 1;
goto LAB_0011fbb1;
case 7:
case 10:
case 0xc:
if ((lVar1 == 0) && (*(int *)(param_1 + 0x368) != 0)) {
lVar9 = *(long *)(param_1 + 0x370);
if ((lVar9 == 0) && (lVar9 = (long)(int)(&DAT_0014b068)[uVar10 * 6], lVar9 < 1)) {
piVar5 = *(int **)(piVar5 + param_4 * 2);
}
else {
piVar5 = (int *)((long)piVar5 + lVar9 * param_4);
}
}
iVar2 = *piVar5;
local_44 = (int1)iVar2;
uStack_43 = (int1)((uint)iVar2 >> 8);
uStack_42 = (int1)piVar5[1];
uStack_41 = (int1)piVar5[2];
uStack_40 = (int1)piVar5[3];
local_3f = (int1)piVar5[4];
local_3e = (int1)piVar5[5];
if (*(long *)(piVar5 + 6) == 0) {
uVar4 = 7;
if (((piVar5[3] == 0 && piVar5[4] == 0) && piVar5[5] == 0) &&
(uVar4 = 4, iVar2 == 0 && piVar5[1] == 0)) {
uVar4 = (uint)(piVar5[2] != 0) << 2;
}
}
else {
local_3d = (int4)*(long *)(piVar5 + 6);
uVar4 = 0xb;
}
sVar8 = (ulong)uVar4 + 1;
goto LAB_0011fb98;
case 8:
uVar7 = *(int8 *)__s;
*(char *)*param_3 = (char)uVar7;
*(char *)(*param_3 + 1) = (char)((ulong)uVar7 >> 8);
*(char *)(*param_3 + 2) = (char)((ulong)uVar7 >> 0x10);
*(char *)(*param_3 + 3) = (char)((ulong)uVar7 >> 0x18);
*(char *)(*param_3 + 4) = (char)((ulong)uVar7 >> 0x20);
*(char *)(*param_3 + 5) = (char)((ulong)uVar7 >> 0x28);
*(char *)(*param_3 + 6) = (char)((ulong)uVar7 >> 0x30);
*(char *)(*param_3 + 7) = (char)((ulong)uVar7 >> 0x38);
LAB_0011fb0e:
*param_3 = *param_3 + 8;
break;
case 0xb:
if ((lVar1 == 0) && (*(int *)(param_1 + 0x368) != 0)) {
lVar9 = *(long *)(param_1 + 0x370);
if ((lVar9 == 0) && (lVar9 = (long)_DAT_0014b170, lVar9 < 1)) {
piVar5 = *(int **)(piVar5 + param_4 * 2);
}
else {
piVar5 = (int *)((long)piVar5 + lVar9 * param_4);
}
}
local_44 = (char)piVar5[8] != '\0';
iVar2 = piVar5[2];
uStack_43 = (int1)iVar2;
uStack_42 = (int1)((uint)iVar2 >> 8);
uStack_41 = (int1)((uint)iVar2 >> 0x10);
uStack_40 = (int1)((uint)iVar2 >> 0x18);
local_3f = (int1)piVar5[3];
local_3e = (int1)piVar5[4];
lVar9 = *(long *)(piVar5 + 6);
if (lVar9 == 0) {
uVar4 = (uint)(((iVar2 != 0 || piVar5[3] != 0) || piVar5[4] != 0) || piVar5[5] != 0) << 3;
}
else {
local_3d._1_3_ = (int3)lVar9;
uStack_39 = (int1)((ulong)lVar9 >> 0x18);
uVar4 = 0xc;
}
local_3d = CONCAT31(local_3d._1_3_,(char)piVar5[5]);
sVar8 = (size_t)(uVar4 | 1);
LAB_0011fb98:
local_45 = (int1)uVar4;
memcpy((void *)*param_3,&local_45,sVar8);
*param_3 = *param_3 + sVar8;
break;
default:
uVar4 = uVar4 - 0xf5;
if ((9 < uVar4) || ((0x3f3U >> (uVar4 & 0x1f) & 1) == 0)) goto switchD_0011f847_caseD_6;
switchD_0011f847_caseD_0:
cVar3 = ma_get_indicator(param_1,param_2,param_4);
if (cVar3 == -1) {
LAB_0011fb42:
sVar8 = strlen((char *)__s);
LAB_0011fb4d:
__dest = (void *)mysql_net_store_length(*param_3,sVar8);
if (sVar8 == 0) {
sVar8 = 0;
}
else {
memcpy(__dest,__s,sVar8);
}
}
else {
psVar6 = *(size_t **)(lVar9 + (ulong)param_2 * 0x70);
if (psVar6 != (size_t *)0x0) {
if (lVar1 == 0) {
if (*(long *)(param_1 + 0x370) == 0) {
psVar6 = psVar6 + param_4;
}
else {
psVar6 = (size_t *)((long)psVar6 + *(long *)(param_1 + 0x370) * param_4);
}
}
sVar8 = *psVar6;
if (sVar8 == 0xffffffffffffffff) goto LAB_0011fb42;
goto LAB_0011fb4d;
}
sVar8 = 0;
__dest = (void *)mysql_net_store_length(*param_3,0);
}
*param_3 = (long)__dest + sVar8;
}
uVar7 = 0;
LAB_0011fbb1:
if (*(long *)(in_FS_OFFSET + 0x28) != local_38) {
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
return uVar7;
}
|
|
57,216
|
Game::isMouseInRect(glm::vec<2, float, (glm::qualifier)0> const&, glm::vec<2, float, (glm::qualifier)0> const&)
|
GhostEscape/src/core/game.cpp
|
bool Game::isMouseInRect(const glm::vec2 &top_left, const glm::vec2 &botton_right)
{
if (mouse_position_.x >= top_left.x && mouse_position_.x <= botton_right.x && mouse_position_.y >= top_left.y && mouse_position_.y <= botton_right.y){
return true;
}
return false;
}
|
O0
|
cpp
|
Game::isMouseInRect(glm::vec<2, float, (glm::qualifier)0> const&, glm::vec<2, float, (glm::qualifier)0> const&):
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x28(%rbp)
movss 0x10(%rax), %xmm0
movq -0x18(%rbp), %rax
ucomiss (%rax), %xmm0
jb 0x75dc
movq -0x28(%rbp), %rax
movss 0x10(%rax), %xmm1
movq -0x20(%rbp), %rax
movss (%rax), %xmm0
ucomiss %xmm1, %xmm0
jb 0x75dc
movq -0x28(%rbp), %rax
movss 0x14(%rax), %xmm0
movq -0x18(%rbp), %rax
ucomiss 0x4(%rax), %xmm0
jb 0x75dc
movq -0x28(%rbp), %rax
movss 0x14(%rax), %xmm1
movq -0x20(%rbp), %rax
movss 0x4(%rax), %xmm0
ucomiss %xmm1, %xmm0
jb 0x75dc
movb $0x1, -0x1(%rbp)
jmp 0x75e0
movb $0x0, -0x1(%rbp)
movb -0x1(%rbp), %al
andb $0x1, %al
popq %rbp
retq
nopw (%rax,%rax)
|
_ZN4Game13isMouseInRectERKN3glm3vecILi2EfLNS0_9qualifierE0EEES5_:
push rbp
mov rbp, rsp
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov [rbp+var_20], rdx
mov rax, [rbp+var_10]
mov [rbp+var_28], rax
movss xmm0, dword ptr [rax+10h]
mov rax, [rbp+var_18]
ucomiss xmm0, dword ptr [rax]
jb short loc_75DC
mov rax, [rbp+var_28]
movss xmm1, dword ptr [rax+10h]
mov rax, [rbp+var_20]
movss xmm0, dword ptr [rax]
ucomiss xmm0, xmm1
jb short loc_75DC
mov rax, [rbp+var_28]
movss xmm0, dword ptr [rax+14h]
mov rax, [rbp+var_18]
ucomiss xmm0, dword ptr [rax+4]
jb short loc_75DC
mov rax, [rbp+var_28]
movss xmm1, dword ptr [rax+14h]
mov rax, [rbp+var_20]
movss xmm0, dword ptr [rax+4]
ucomiss xmm0, xmm1
jb short loc_75DC
mov [rbp+var_1], 1
jmp short loc_75E0
loc_75DC:
mov [rbp+var_1], 0
loc_75E0:
mov al, [rbp+var_1]
and al, 1
pop rbp
retn
|
bool Game::isMouseInRect(long long a1, float *a2, float *a3)
{
return *(float *)(a1 + 16) >= *a2
&& *a3 >= *(float *)(a1 + 16)
&& *(float *)(a1 + 20) >= a2[1]
&& a3[1] >= *(float *)(a1 + 20);
}
|
isMouseInRect:
PUSH RBP
MOV RBP,RSP
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x18],RSI
MOV qword ptr [RBP + -0x20],RDX
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RBP + -0x28],RAX
MOVSS XMM0,dword ptr [RAX + 0x10]
MOV RAX,qword ptr [RBP + -0x18]
UCOMISS XMM0,dword ptr [RAX]
JC 0x001075dc
MOV RAX,qword ptr [RBP + -0x28]
MOVSS XMM1,dword ptr [RAX + 0x10]
MOV RAX,qword ptr [RBP + -0x20]
MOVSS XMM0,dword ptr [RAX]
UCOMISS XMM0,XMM1
JC 0x001075dc
MOV RAX,qword ptr [RBP + -0x28]
MOVSS XMM0,dword ptr [RAX + 0x14]
MOV RAX,qword ptr [RBP + -0x18]
UCOMISS XMM0,dword ptr [RAX + 0x4]
JC 0x001075dc
MOV RAX,qword ptr [RBP + -0x28]
MOVSS XMM1,dword ptr [RAX + 0x14]
MOV RAX,qword ptr [RBP + -0x20]
MOVSS XMM0,dword ptr [RAX + 0x4]
UCOMISS XMM0,XMM1
JC 0x001075dc
MOV byte ptr [RBP + -0x1],0x1
JMP 0x001075e0
LAB_001075dc:
MOV byte ptr [RBP + -0x1],0x0
LAB_001075e0:
MOV AL,byte ptr [RBP + -0x1]
AND AL,0x1
POP RBP
RET
|
/* Game::isMouseInRect(glm::vec<2, float, (glm::qualifier)0> const&, glm::vec<2, float,
(glm::qualifier)0> const&) */
int1 __thiscall Game::isMouseInRect(Game *this,vec *param_1,vec *param_2)
{
int1 local_9;
if ((((*(float *)(this + 0x10) < *(float *)param_1) ||
(*(float *)param_2 < *(float *)(this + 0x10))) ||
(*(float *)(this + 0x14) < *(float *)(param_1 + 4))) ||
(*(float *)(param_2 + 4) < *(float *)(this + 0x14))) {
local_9 = 0;
}
else {
local_9 = 1;
}
return local_9;
}
|
|
57,217
|
bf_acos
|
bluesky950520[P]quickjs/libbf.c
|
int bf_acos(bf_t *r, const bf_t *a, limb_t prec, bf_flags_t flags)
{
bf_context_t *s = r->ctx;
bf_t T_s, *T = &T_s;
int res;
if (a->len == 0) {
if (a->expn == BF_EXP_NAN) {
bf_set_nan(r);
return 0;
} else if (a->expn == BF_EXP_INF) {
bf_set_nan(r);
return BF_ST_INVALID_OP;
} else {
bf_const_pi(r, prec, flags);
bf_mul_2exp(r, -1, BF_PREC_INF, BF_RNDZ);
return BF_ST_INEXACT;
}
}
bf_init(s, T);
bf_set_ui(T, 1);
res = bf_cmpu(a, T);
bf_delete(T);
if (res > 0) {
bf_set_nan(r);
return BF_ST_INVALID_OP;
} else if (res == 0 && a->sign == 0) {
bf_set_zero(r, 0);
return 0;
}
return bf_ziv_rounding(r, a, prec, flags, bf_asin_internal, (void *)TRUE);
}
|
O1
|
c
|
bf_acos:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movl %ecx, %r9d
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %rbx
movq (%rdi), %rcx
cmpq $0x0, 0x18(%rsi)
je 0x8cb1c
movl %r9d, 0xc(%rsp)
movabsq $0x7fffffffffffffff, %rax # imm = 0x7FFFFFFFFFFFFFFF
leaq 0x10(%rsp), %r13
movq %rcx, (%r13)
movl $0x0, 0x8(%r13)
leaq 0x1(%rax), %rbp
movq %rbp, 0x10(%r13)
xorps %xmm0, %xmm0
movups %xmm0, 0x18(%r13)
movl $0x1, %esi
movq %r13, %rdi
callq 0x83ea7
movq %r15, %rdi
movq %r13, %rsi
callq 0x84816
movl %eax, %r12d
movq (%r13), %rax
testq %rax, %rax
je 0x8caf8
movq 0x30(%rsp), %rsi
testq %rsi, %rsi
je 0x8caf8
movq (%rax), %rdi
xorl %edx, %edx
callq *0x8(%rax)
testl %r12d, %r12d
jle 0x8cb6a
cmpq $0x0, 0x18(%rbx)
je 0x8cbc3
movq (%rbx), %rax
movq 0x20(%rbx), %rsi
movq (%rax), %rdi
xorl %edx, %edx
callq *0x8(%rax)
jmp 0x8cbb7
movq 0x10(%r15), %rax
movabsq $0x7ffffffffffffffe, %rdx # imm = 0x7FFFFFFFFFFFFFFE
cmpq %rdx, %rax
je 0x8cba4
movabsq $0x7fffffffffffffff, %r15 # imm = 0x7FFFFFFFFFFFFFFF
cmpq %r15, %rax
jne 0x8cbdf
cmpq $0x0, 0x18(%rbx)
je 0x8cb61
movq 0x20(%rbx), %rsi
movq (%rcx), %rdi
xorl %edx, %edx
callq *0x8(%rcx)
movq %rax, 0x20(%rbx)
movq $0x0, 0x18(%rbx)
movq %r15, 0x10(%rbx)
jmp 0x8cc4f
jne 0x8cb77
cmpl $0x0, 0x8(%r15)
je 0x8cc29
leaq -0x210(%rip), %r8 # 0x8c96e
movl $0x1, %r9d
movq %rbx, %rdi
movq %r15, %rsi
movq %r14, %rdx
movl 0xc(%rsp), %ecx
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x8a0d8
cmpq $0x0, 0x18(%rbx)
je 0x8cbc3
movq 0x20(%rbx), %rsi
movq (%rcx), %rdi
xorl %edx, %edx
callq *0x8(%rcx)
movq %rax, 0x20(%rbx)
movq $0x0, 0x18(%rbx)
movabsq $0x7fffffffffffffff, %rax # imm = 0x7FFFFFFFFFFFFFFF
movq %rax, 0x10(%rbx)
movl $0x0, 0x8(%rbx)
movl $0x1, %ebp
jmp 0x8cc58
addq $0x40, %rcx
leaq 0x476b(%rip), %r8 # 0x91355
movq %rbx, %rdi
movq %r14, %rsi
movl %r9d, %edx
xorl %r9d, %r9d
callq 0x89a2c
movq 0x18(%rbx), %rcx
movl $0x10, %ebp
testq %rcx, %rcx
je 0x8cc58
decq 0x10(%rbx)
movabsq $0x3fffffffffffffff, %rsi # imm = 0x3FFFFFFFFFFFFFFF
movq %rbx, %rdi
movl $0x1, %edx
xorl %r8d, %r8d
callq 0x84212
jmp 0x8cc58
cmpq $0x0, 0x18(%rbx)
je 0x8cc4b
movq (%rbx), %rax
movq 0x20(%rbx), %rsi
movq (%rax), %rdi
xorl %edx, %edx
callq *0x8(%rax)
movq %rax, 0x20(%rbx)
movq $0x0, 0x18(%rbx)
movq %rbp, 0x10(%rbx)
movl $0x0, 0x8(%rbx)
xorl %ebp, %ebp
movl %ebp, %eax
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
|
bf_acos:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 38h
mov r9d, ecx
mov r14, rdx
mov r15, rsi
mov rbx, rdi
mov rcx, [rdi]
cmp qword ptr [rsi+18h], 0
jz loc_8CB1C
mov [rsp+68h+var_5C], r9d
mov rax, 7FFFFFFFFFFFFFFFh
lea r13, [rsp+68h+var_58]
mov [r13+0], rcx
mov dword ptr [r13+8], 0
lea rbp, [rax+1]
mov [r13+10h], rbp
xorps xmm0, xmm0
movups xmmword ptr [r13+18h], xmm0
mov esi, 1
mov rdi, r13
call bf_set_ui
mov rdi, r15
mov rsi, r13
call bf_cmpu
mov r12d, eax
mov rax, [r13+0]
test rax, rax
jz short loc_8CAF8
mov rsi, [rsp+68h+var_38]
test rsi, rsi
jz short loc_8CAF8
mov rdi, [rax]
xor edx, edx
call qword ptr [rax+8]
loc_8CAF8:
test r12d, r12d
jle short loc_8CB6A
cmp qword ptr [rbx+18h], 0
jz loc_8CBC3
mov rax, [rbx]
mov rsi, [rbx+20h]
mov rdi, [rax]
xor edx, edx
call qword ptr [rax+8]
jmp loc_8CBB7
loc_8CB1C:
mov rax, [r15+10h]
mov rdx, 7FFFFFFFFFFFFFFEh
cmp rax, rdx
jz short loc_8CBA4
mov r15, 7FFFFFFFFFFFFFFFh
cmp rax, r15
jnz loc_8CBDF
cmp qword ptr [rbx+18h], 0
jz short loc_8CB61
mov rsi, [rbx+20h]
mov rdi, [rcx]
xor edx, edx
call qword ptr [rcx+8]
mov [rbx+20h], rax
mov qword ptr [rbx+18h], 0
loc_8CB61:
mov [rbx+10h], r15
jmp loc_8CC4F
loc_8CB6A:
jnz short loc_8CB77
cmp dword ptr [r15+8], 0
jz loc_8CC29
loc_8CB77:
lea r8, bf_asin_internal
mov r9d, 1
mov rdi, rbx
mov rsi, r15
mov rdx, r14
mov ecx, [rsp+68h+var_5C]
add rsp, 38h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
jmp bf_ziv_rounding
loc_8CBA4:
cmp qword ptr [rbx+18h], 0
jz short loc_8CBC3
mov rsi, [rbx+20h]
mov rdi, [rcx]
xor edx, edx
call qword ptr [rcx+8]
loc_8CBB7:
mov [rbx+20h], rax
mov qword ptr [rbx+18h], 0
loc_8CBC3:
mov rax, 7FFFFFFFFFFFFFFFh
mov [rbx+10h], rax
mov dword ptr [rbx+8], 0
mov ebp, 1
jmp short loc_8CC58
loc_8CBDF:
add rcx, 40h ; '@'
lea r8, bf_const_pi_internal
mov rdi, rbx
mov rsi, r14
mov edx, r9d
xor r9d, r9d
call bf_const_get
mov rcx, [rbx+18h]
mov ebp, 10h
test rcx, rcx
jz short loc_8CC58
dec qword ptr [rbx+10h]
mov rsi, 3FFFFFFFFFFFFFFFh
mov rdi, rbx
mov edx, 1
xor r8d, r8d
call __bf_round
jmp short loc_8CC58
loc_8CC29:
cmp qword ptr [rbx+18h], 0
jz short loc_8CC4B
mov rax, [rbx]
mov rsi, [rbx+20h]
mov rdi, [rax]
xor edx, edx
call qword ptr [rax+8]
mov [rbx+20h], rax
mov qword ptr [rbx+18h], 0
loc_8CC4B:
mov [rbx+10h], rbp
loc_8CC4F:
mov dword ptr [rbx+8], 0
xor ebp, ebp
loc_8CC58:
mov eax, ebp
add rsp, 38h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
|
long long bf_acos(_QWORD **a1, long long a2, long long a3, unsigned int a4, long long a5)
{
long long v5; // r9
_QWORD *v7; // rcx
int v8; // r12d
long long v9; // rax
long long v10; // rax
unsigned int v12; // ebp
unsigned long long v13; // rcx
unsigned int v14; // [rsp+Ch] [rbp-5Ch]
_QWORD *v15; // [rsp+10h] [rbp-58h] BYREF
int v16; // [rsp+18h] [rbp-50h]
unsigned long long v17; // [rsp+20h] [rbp-48h]
__int128 v18; // [rsp+28h] [rbp-40h]
v5 = a4;
v7 = *a1;
if ( *(_QWORD *)(a2 + 24) )
{
v14 = v5;
v15 = *a1;
v16 = 0;
v17 = 0x8000000000000000LL;
v18 = 0LL;
bf_set_ui(&v15, 1uLL);
v8 = bf_cmpu((_QWORD *)a2, &v15);
if ( v15 && *((_QWORD *)&v18 + 1) )
((void ( *)(_QWORD, _QWORD, _QWORD))v15[1])(*v15, *((_QWORD *)&v18 + 1), 0LL);
if ( v8 > 0 )
{
if ( a1[3] )
{
v9 = ((long long ( *)(_QWORD, _QWORD *, _QWORD))(*a1)[1])(**a1, a1[4], 0LL);
LABEL_18:
a1[4] = (_QWORD *)v9;
a1[3] = 0LL;
goto LABEL_19;
}
goto LABEL_19;
}
if ( v8 || *(_DWORD *)(a2 + 8) )
return bf_ziv_rounding(
a1,
a2,
a3,
v14,
(void ( *)(_QWORD *, long long, long long, long long))bf_asin_internal,
1LL);
if ( a1[3] )
{
a1[4] = (_QWORD *)((long long ( *)(_QWORD, _QWORD *, _QWORD))(*a1)[1])(**a1, a1[4], 0LL);
a1[3] = 0LL;
}
a1[2] = (_QWORD *)0x8000000000000000LL;
LABEL_25:
*((_DWORD *)a1 + 2) = 0;
return 0;
}
v10 = *(_QWORD *)(a2 + 16);
if ( v10 != 0x7FFFFFFFFFFFFFFELL )
{
if ( v10 != 0x7FFFFFFFFFFFFFFFLL )
{
bf_const_get(
(long long)a1,
a3,
v5,
(long long)(v7 + 8),
(void ( *)(long long, unsigned long long))bf_const_pi_internal,
0);
v13 = (unsigned long long)a1[3];
v12 = 16;
if ( v13 )
{
a1[2] = (_QWORD *)((char *)a1[2] - 1);
_bf_round((long long)a1, 0x3FFFFFFFFFFFFFFFLL, 1LL, v13, 0);
}
return v12;
}
if ( a1[3] )
{
a1[4] = (_QWORD *)((long long ( *)(_QWORD, _QWORD *, _QWORD, _QWORD *, long long, long long))v7[1])(
*v7,
a1[4],
0LL,
v7,
a5,
v5);
a1[3] = 0LL;
}
a1[2] = (_QWORD *)0x7FFFFFFFFFFFFFFFLL;
goto LABEL_25;
}
if ( a1[3] )
{
v9 = ((long long ( *)(_QWORD, _QWORD *, _QWORD, _QWORD *, long long, long long))v7[1])(
*v7,
a1[4],
0LL,
v7,
a5,
v5);
goto LABEL_18;
}
LABEL_19:
a1[2] = (_QWORD *)0x7FFFFFFFFFFFFFFFLL;
*((_DWORD *)a1 + 2) = 0;
return 1;
}
|
bf_acos:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x38
MOV R9D,ECX
MOV R14,RDX
MOV R15,RSI
MOV RBX,RDI
MOV RCX,qword ptr [RDI]
CMP qword ptr [RSI + 0x18],0x0
JZ 0x0018cb1c
MOV dword ptr [RSP + 0xc],R9D
MOV RAX,0x7fffffffffffffff
LEA R13,[RSP + 0x10]
MOV qword ptr [R13],RCX
MOV dword ptr [R13 + 0x8],0x0
LEA RBP,[RAX + 0x1]
MOV qword ptr [R13 + 0x10],RBP
XORPS XMM0,XMM0
MOVUPS xmmword ptr [R13 + 0x18],XMM0
MOV ESI,0x1
MOV RDI,R13
CALL 0x00183ea7
MOV RDI,R15
MOV RSI,R13
CALL 0x00184816
MOV R12D,EAX
MOV RAX,qword ptr [R13]
TEST RAX,RAX
JZ 0x0018caf8
MOV RSI,qword ptr [RSP + 0x30]
TEST RSI,RSI
JZ 0x0018caf8
MOV RDI,qword ptr [RAX]
XOR EDX,EDX
CALL qword ptr [RAX + 0x8]
LAB_0018caf8:
TEST R12D,R12D
JLE 0x0018cb6a
CMP qword ptr [RBX + 0x18],0x0
JZ 0x0018cbc3
MOV RAX,qword ptr [RBX]
MOV RSI,qword ptr [RBX + 0x20]
MOV RDI,qword ptr [RAX]
XOR EDX,EDX
CALL qword ptr [RAX + 0x8]
JMP 0x0018cbb7
LAB_0018cb1c:
MOV RAX,qword ptr [R15 + 0x10]
MOV RDX,0x7ffffffffffffffe
CMP RAX,RDX
JZ 0x0018cba4
MOV R15,0x7fffffffffffffff
CMP RAX,R15
JNZ 0x0018cbdf
CMP qword ptr [RBX + 0x18],0x0
JZ 0x0018cb61
MOV RSI,qword ptr [RBX + 0x20]
MOV RDI,qword ptr [RCX]
XOR EDX,EDX
CALL qword ptr [RCX + 0x8]
MOV qword ptr [RBX + 0x20],RAX
MOV qword ptr [RBX + 0x18],0x0
LAB_0018cb61:
MOV qword ptr [RBX + 0x10],R15
JMP 0x0018cc4f
LAB_0018cb6a:
JNZ 0x0018cb77
CMP dword ptr [R15 + 0x8],0x0
JZ 0x0018cc29
LAB_0018cb77:
LEA R8,[0x18c96e]
MOV R9D,0x1
MOV RDI,RBX
MOV RSI,R15
MOV RDX,R14
MOV ECX,dword ptr [RSP + 0xc]
ADD RSP,0x38
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
JMP 0x0018a0d8
LAB_0018cba4:
CMP qword ptr [RBX + 0x18],0x0
JZ 0x0018cbc3
MOV RSI,qword ptr [RBX + 0x20]
MOV RDI,qword ptr [RCX]
XOR EDX,EDX
CALL qword ptr [RCX + 0x8]
LAB_0018cbb7:
MOV qword ptr [RBX + 0x20],RAX
MOV qword ptr [RBX + 0x18],0x0
LAB_0018cbc3:
MOV RAX,0x7fffffffffffffff
MOV qword ptr [RBX + 0x10],RAX
MOV dword ptr [RBX + 0x8],0x0
MOV EBP,0x1
JMP 0x0018cc58
LAB_0018cbdf:
ADD RCX,0x40
LEA R8,[0x191355]
MOV RDI,RBX
MOV RSI,R14
MOV EDX,R9D
XOR R9D,R9D
CALL 0x00189a2c
MOV RCX,qword ptr [RBX + 0x18]
MOV EBP,0x10
TEST RCX,RCX
JZ 0x0018cc58
DEC qword ptr [RBX + 0x10]
MOV RSI,0x3fffffffffffffff
MOV RDI,RBX
MOV EDX,0x1
XOR R8D,R8D
CALL 0x00184212
JMP 0x0018cc58
LAB_0018cc29:
CMP qword ptr [RBX + 0x18],0x0
JZ 0x0018cc4b
MOV RAX,qword ptr [RBX]
MOV RSI,qword ptr [RBX + 0x20]
MOV RDI,qword ptr [RAX]
XOR EDX,EDX
CALL qword ptr [RAX + 0x8]
MOV qword ptr [RBX + 0x20],RAX
MOV qword ptr [RBX + 0x18],0x0
LAB_0018cc4b:
MOV qword ptr [RBX + 0x10],RBP
LAB_0018cc4f:
MOV dword ptr [RBX + 0x8],0x0
XOR EBP,EBP
LAB_0018cc58:
MOV EAX,EBP
ADD RSP,0x38
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
int8 bf_acos(long *param_1,long param_2,int8 param_3,int4 param_4)
{
int iVar1;
long lVar2;
int8 uVar3;
int8 *local_58;
int4 local_50;
int8 local_48;
int8 local_40;
long lStack_38;
local_58 = (int8 *)*param_1;
if (*(long *)(param_2 + 0x18) == 0) {
if (*(long *)(param_2 + 0x10) != 0x7ffffffffffffffe) {
if (*(long *)(param_2 + 0x10) != 0x7fffffffffffffff) {
bf_const_get(param_1,param_3,param_4,local_58 + 8,bf_const_pi_internal,0);
if (param_1[3] == 0) {
return 0x10;
}
param_1[2] = param_1[2] + -1;
__bf_round(param_1,0x3fffffffffffffff,1,param_1[3],0);
return 0x10;
}
if (param_1[3] != 0) {
lVar2 = (*(code *)local_58[1])(*local_58,param_1[4],0);
param_1[4] = lVar2;
param_1[3] = 0;
}
param_1[2] = 0x7fffffffffffffff;
goto LAB_0018cc4f;
}
if (param_1[3] == 0) goto LAB_0018cbc3;
lVar2 = (*(code *)local_58[1])(*local_58,param_1[4],0);
}
else {
local_50 = 0;
local_48 = 0x8000000000000000;
local_40 = 0;
lStack_38 = 0;
bf_set_ui(&local_58,1);
iVar1 = bf_cmpu(param_2,&local_58);
if ((local_58 != (int8 *)0x0) && (lStack_38 != 0)) {
(*(code *)local_58[1])(*local_58,lStack_38,0);
}
if (iVar1 < 1) {
if ((iVar1 != 0) || (*(int *)(param_2 + 8) != 0)) {
uVar3 = bf_ziv_rounding(param_1,param_2,param_3,param_4,bf_asin_internal,1);
return uVar3;
}
if (param_1[3] != 0) {
lVar2 = (*(code *)((int8 *)*param_1)[1])(*(int8 *)*param_1,param_1[4],0);
param_1[4] = lVar2;
param_1[3] = 0;
}
param_1[2] = -0x8000000000000000;
LAB_0018cc4f:
*(int4 *)(param_1 + 1) = 0;
return 0;
}
if (param_1[3] == 0) goto LAB_0018cbc3;
lVar2 = (*(code *)((int8 *)*param_1)[1])(*(int8 *)*param_1,param_1[4],0);
}
param_1[4] = lVar2;
param_1[3] = 0;
LAB_0018cbc3:
param_1[2] = 0x7fffffffffffffff;
*(int4 *)(param_1 + 1) = 0;
return 1;
}
|
|
57,218
|
bf_acos
|
bluesky950520[P]quickjs/libbf.c
|
int bf_acos(bf_t *r, const bf_t *a, limb_t prec, bf_flags_t flags)
{
bf_context_t *s = r->ctx;
bf_t T_s, *T = &T_s;
int res;
if (a->len == 0) {
if (a->expn == BF_EXP_NAN) {
bf_set_nan(r);
return 0;
} else if (a->expn == BF_EXP_INF) {
bf_set_nan(r);
return BF_ST_INVALID_OP;
} else {
bf_const_pi(r, prec, flags);
bf_mul_2exp(r, -1, BF_PREC_INF, BF_RNDZ);
return BF_ST_INEXACT;
}
}
bf_init(s, T);
bf_set_ui(T, 1);
res = bf_cmpu(a, T);
bf_delete(T);
if (res > 0) {
bf_set_nan(r);
return BF_ST_INVALID_OP;
} else if (res == 0 && a->sign == 0) {
bf_set_zero(r, 0);
return 0;
}
return bf_ziv_rounding(r, a, prec, flags, bf_asin_internal, (void *)TRUE);
}
|
O3
|
c
|
bf_acos:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movl %ecx, %r9d
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %rbx
movq (%rdi), %rcx
cmpq $0x0, 0x18(%rsi)
je 0x8f54a
movl %r9d, 0xc(%rsp)
movabsq $0x7fffffffffffffff, %rax # imm = 0x7FFFFFFFFFFFFFFF
leaq 0x10(%rsp), %r13
movq %rcx, (%r13)
movl $0x0, 0x8(%r13)
leaq 0x1(%rax), %rbp
movq %rbp, 0x10(%r13)
xorps %xmm0, %xmm0
movups %xmm0, 0x18(%r13)
movl $0x1, %esi
movq %r13, %rdi
callq 0x868c8
movq %r15, %rdi
movq %r13, %rsi
callq 0x87224
movl %eax, %r12d
movq (%r13), %rax
testq %rax, %rax
je 0x8f526
movq 0x30(%rsp), %rsi
testq %rsi, %rsi
je 0x8f526
movq (%rax), %rdi
xorl %edx, %edx
callq *0x8(%rax)
testl %r12d, %r12d
jle 0x8f598
cmpq $0x0, 0x18(%rbx)
je 0x8f5f1
movq (%rbx), %rax
movq 0x20(%rbx), %rsi
movq (%rax), %rdi
xorl %edx, %edx
callq *0x8(%rax)
jmp 0x8f5e5
movq 0x10(%r15), %rax
movabsq $0x7ffffffffffffffe, %rdx # imm = 0x7FFFFFFFFFFFFFFE
cmpq %rdx, %rax
je 0x8f5d2
movabsq $0x7fffffffffffffff, %r15 # imm = 0x7FFFFFFFFFFFFFFF
cmpq %r15, %rax
jne 0x8f60d
cmpq $0x0, 0x18(%rbx)
je 0x8f58f
movq 0x20(%rbx), %rsi
movq (%rcx), %rdi
xorl %edx, %edx
callq *0x8(%rcx)
movq %rax, 0x20(%rbx)
movq $0x0, 0x18(%rbx)
movq %r15, 0x10(%rbx)
jmp 0x8f67d
jne 0x8f5a5
cmpl $0x0, 0x8(%r15)
je 0x8f657
leaq -0x210(%rip), %r8 # 0x8f39c
movl $0x1, %r9d
movq %rbx, %rdi
movq %r15, %rsi
movq %r14, %rdx
movl 0xc(%rsp), %ecx
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x8cb45
cmpq $0x0, 0x18(%rbx)
je 0x8f5f1
movq 0x20(%rbx), %rsi
movq (%rcx), %rdi
xorl %edx, %edx
callq *0x8(%rcx)
movq %rax, 0x20(%rbx)
movq $0x0, 0x18(%rbx)
movabsq $0x7fffffffffffffff, %rax # imm = 0x7FFFFFFFFFFFFFFF
movq %rax, 0x10(%rbx)
movl $0x0, 0x8(%rbx)
movl $0x1, %ebp
jmp 0x8f686
addq $0x40, %rcx
leaq 0x4781(%rip), %r8 # 0x93d99
movq %rbx, %rdi
movq %r14, %rsi
movl %r9d, %edx
xorl %r9d, %r9d
callq 0x8c49c
movq 0x18(%rbx), %rcx
movl $0x10, %ebp
testq %rcx, %rcx
je 0x8f686
decq 0x10(%rbx)
movabsq $0x3fffffffffffffff, %rsi # imm = 0x3FFFFFFFFFFFFFFF
movq %rbx, %rdi
movl $0x1, %edx
xorl %r8d, %r8d
callq 0x86c43
jmp 0x8f686
cmpq $0x0, 0x18(%rbx)
je 0x8f679
movq (%rbx), %rax
movq 0x20(%rbx), %rsi
movq (%rax), %rdi
xorl %edx, %edx
callq *0x8(%rax)
movq %rax, 0x20(%rbx)
movq $0x0, 0x18(%rbx)
movq %rbp, 0x10(%rbx)
movl $0x0, 0x8(%rbx)
xorl %ebp, %ebp
movl %ebp, %eax
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
|
bf_acos:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 38h
mov r9d, ecx
mov r14, rdx
mov r15, rsi
mov rbx, rdi
mov rcx, [rdi]
cmp qword ptr [rsi+18h], 0
jz loc_8F54A
mov [rsp+68h+var_5C], r9d
mov rax, 7FFFFFFFFFFFFFFFh
lea r13, [rsp+68h+var_58]
mov [r13+0], rcx
mov dword ptr [r13+8], 0
lea rbp, [rax+1]
mov [r13+10h], rbp
xorps xmm0, xmm0
movups xmmword ptr [r13+18h], xmm0
mov esi, 1
mov rdi, r13
call bf_set_ui
mov rdi, r15
mov rsi, r13
call bf_cmpu
mov r12d, eax
mov rax, [r13+0]
test rax, rax
jz short loc_8F526
mov rsi, [rsp+68h+var_38]
test rsi, rsi
jz short loc_8F526
mov rdi, [rax]
xor edx, edx
call qword ptr [rax+8]
loc_8F526:
test r12d, r12d
jle short loc_8F598
cmp qword ptr [rbx+18h], 0
jz loc_8F5F1
mov rax, [rbx]
mov rsi, [rbx+20h]
mov rdi, [rax]
xor edx, edx
call qword ptr [rax+8]
jmp loc_8F5E5
loc_8F54A:
mov rax, [r15+10h]
mov rdx, 7FFFFFFFFFFFFFFEh
cmp rax, rdx
jz short loc_8F5D2
mov r15, 7FFFFFFFFFFFFFFFh
cmp rax, r15
jnz loc_8F60D
cmp qword ptr [rbx+18h], 0
jz short loc_8F58F
mov rsi, [rbx+20h]
mov rdi, [rcx]
xor edx, edx
call qword ptr [rcx+8]
mov [rbx+20h], rax
mov qword ptr [rbx+18h], 0
loc_8F58F:
mov [rbx+10h], r15
jmp loc_8F67D
loc_8F598:
jnz short loc_8F5A5
cmp dword ptr [r15+8], 0
jz loc_8F657
loc_8F5A5:
lea r8, bf_asin_internal
mov r9d, 1
mov rdi, rbx
mov rsi, r15
mov rdx, r14
mov ecx, [rsp+68h+var_5C]
add rsp, 38h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
jmp bf_ziv_rounding
loc_8F5D2:
cmp qword ptr [rbx+18h], 0
jz short loc_8F5F1
mov rsi, [rbx+20h]
mov rdi, [rcx]
xor edx, edx
call qword ptr [rcx+8]
loc_8F5E5:
mov [rbx+20h], rax
mov qword ptr [rbx+18h], 0
loc_8F5F1:
mov rax, 7FFFFFFFFFFFFFFFh
mov [rbx+10h], rax
mov dword ptr [rbx+8], 0
mov ebp, 1
jmp short loc_8F686
loc_8F60D:
add rcx, 40h ; '@'
lea r8, bf_const_pi_internal
mov rdi, rbx
mov rsi, r14
mov edx, r9d
xor r9d, r9d
call bf_const_get
mov rcx, [rbx+18h]
mov ebp, 10h
test rcx, rcx
jz short loc_8F686
dec qword ptr [rbx+10h]
mov rsi, 3FFFFFFFFFFFFFFFh
mov rdi, rbx
mov edx, 1
xor r8d, r8d
call __bf_round
jmp short loc_8F686
loc_8F657:
cmp qword ptr [rbx+18h], 0
jz short loc_8F679
mov rax, [rbx]
mov rsi, [rbx+20h]
mov rdi, [rax]
xor edx, edx
call qword ptr [rax+8]
mov [rbx+20h], rax
mov qword ptr [rbx+18h], 0
loc_8F679:
mov [rbx+10h], rbp
loc_8F67D:
mov dword ptr [rbx+8], 0
xor ebp, ebp
loc_8F686:
mov eax, ebp
add rsp, 38h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
|
long long bf_acos(_QWORD **a1, long long a2, long long a3, unsigned int a4, long long a5)
{
long long v5; // r9
_QWORD *v7; // rcx
int v8; // r12d
long long v9; // rax
long long v10; // rax
unsigned int v12; // ebp
unsigned long long v13; // rcx
unsigned int v14; // [rsp+Ch] [rbp-5Ch]
_QWORD *v15; // [rsp+10h] [rbp-58h] BYREF
int v16; // [rsp+18h] [rbp-50h]
unsigned long long v17; // [rsp+20h] [rbp-48h]
__int128 v18; // [rsp+28h] [rbp-40h]
v5 = a4;
v7 = *a1;
if ( *(_QWORD *)(a2 + 24) )
{
v14 = v5;
v15 = *a1;
v16 = 0;
v17 = 0x8000000000000000LL;
v18 = 0LL;
bf_set_ui(&v15, 1uLL);
v8 = bf_cmpu((_QWORD *)a2, &v15);
if ( v15 && *((_QWORD *)&v18 + 1) )
((void ( *)(_QWORD, _QWORD, _QWORD))v15[1])(*v15, *((_QWORD *)&v18 + 1), 0LL);
if ( v8 > 0 )
{
if ( a1[3] )
{
v9 = ((long long ( *)(_QWORD, _QWORD *, _QWORD))(*a1)[1])(**a1, a1[4], 0LL);
LABEL_18:
a1[4] = (_QWORD *)v9;
a1[3] = 0LL;
goto LABEL_19;
}
goto LABEL_19;
}
if ( v8 || *(_DWORD *)(a2 + 8) )
return bf_ziv_rounding(
a1,
a2,
a3,
v14,
(void ( *)(_QWORD *, long long, long long, long long))bf_asin_internal,
1LL);
if ( a1[3] )
{
a1[4] = (_QWORD *)((long long ( *)(_QWORD, _QWORD *, _QWORD))(*a1)[1])(**a1, a1[4], 0LL);
a1[3] = 0LL;
}
a1[2] = (_QWORD *)0x8000000000000000LL;
LABEL_25:
*((_DWORD *)a1 + 2) = 0;
return 0;
}
v10 = *(_QWORD *)(a2 + 16);
if ( v10 != 0x7FFFFFFFFFFFFFFELL )
{
if ( v10 != 0x7FFFFFFFFFFFFFFFLL )
{
bf_const_get(
(long long)a1,
a3,
v5,
(long long)(v7 + 8),
(void ( *)(long long, unsigned long long))bf_const_pi_internal,
0);
v13 = (unsigned long long)a1[3];
v12 = 16;
if ( v13 )
{
a1[2] = (_QWORD *)((char *)a1[2] - 1);
_bf_round(a1, 0x3FFFFFFFFFFFFFFFLL, 1u, v13, 0);
}
return v12;
}
if ( a1[3] )
{
a1[4] = (_QWORD *)((long long ( *)(_QWORD, _QWORD *, _QWORD, _QWORD *, long long, long long))v7[1])(
*v7,
a1[4],
0LL,
v7,
a5,
v5);
a1[3] = 0LL;
}
a1[2] = (_QWORD *)0x7FFFFFFFFFFFFFFFLL;
goto LABEL_25;
}
if ( a1[3] )
{
v9 = ((long long ( *)(_QWORD, _QWORD *, _QWORD, _QWORD *, long long, long long))v7[1])(
*v7,
a1[4],
0LL,
v7,
a5,
v5);
goto LABEL_18;
}
LABEL_19:
a1[2] = (_QWORD *)0x7FFFFFFFFFFFFFFFLL;
*((_DWORD *)a1 + 2) = 0;
return 1;
}
|
bf_acos:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x38
MOV R9D,ECX
MOV R14,RDX
MOV R15,RSI
MOV RBX,RDI
MOV RCX,qword ptr [RDI]
CMP qword ptr [RSI + 0x18],0x0
JZ 0x0018f54a
MOV dword ptr [RSP + 0xc],R9D
MOV RAX,0x7fffffffffffffff
LEA R13,[RSP + 0x10]
MOV qword ptr [R13],RCX
MOV dword ptr [R13 + 0x8],0x0
LEA RBP,[RAX + 0x1]
MOV qword ptr [R13 + 0x10],RBP
XORPS XMM0,XMM0
MOVUPS xmmword ptr [R13 + 0x18],XMM0
MOV ESI,0x1
MOV RDI,R13
CALL 0x001868c8
MOV RDI,R15
MOV RSI,R13
CALL 0x00187224
MOV R12D,EAX
MOV RAX,qword ptr [R13]
TEST RAX,RAX
JZ 0x0018f526
MOV RSI,qword ptr [RSP + 0x30]
TEST RSI,RSI
JZ 0x0018f526
MOV RDI,qword ptr [RAX]
XOR EDX,EDX
CALL qword ptr [RAX + 0x8]
LAB_0018f526:
TEST R12D,R12D
JLE 0x0018f598
CMP qword ptr [RBX + 0x18],0x0
JZ 0x0018f5f1
MOV RAX,qword ptr [RBX]
MOV RSI,qword ptr [RBX + 0x20]
MOV RDI,qword ptr [RAX]
XOR EDX,EDX
CALL qword ptr [RAX + 0x8]
JMP 0x0018f5e5
LAB_0018f54a:
MOV RAX,qword ptr [R15 + 0x10]
MOV RDX,0x7ffffffffffffffe
CMP RAX,RDX
JZ 0x0018f5d2
MOV R15,0x7fffffffffffffff
CMP RAX,R15
JNZ 0x0018f60d
CMP qword ptr [RBX + 0x18],0x0
JZ 0x0018f58f
MOV RSI,qword ptr [RBX + 0x20]
MOV RDI,qword ptr [RCX]
XOR EDX,EDX
CALL qword ptr [RCX + 0x8]
MOV qword ptr [RBX + 0x20],RAX
MOV qword ptr [RBX + 0x18],0x0
LAB_0018f58f:
MOV qword ptr [RBX + 0x10],R15
JMP 0x0018f67d
LAB_0018f598:
JNZ 0x0018f5a5
CMP dword ptr [R15 + 0x8],0x0
JZ 0x0018f657
LAB_0018f5a5:
LEA R8,[0x18f39c]
MOV R9D,0x1
MOV RDI,RBX
MOV RSI,R15
MOV RDX,R14
MOV ECX,dword ptr [RSP + 0xc]
ADD RSP,0x38
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
JMP 0x0018cb45
LAB_0018f5d2:
CMP qword ptr [RBX + 0x18],0x0
JZ 0x0018f5f1
MOV RSI,qword ptr [RBX + 0x20]
MOV RDI,qword ptr [RCX]
XOR EDX,EDX
CALL qword ptr [RCX + 0x8]
LAB_0018f5e5:
MOV qword ptr [RBX + 0x20],RAX
MOV qword ptr [RBX + 0x18],0x0
LAB_0018f5f1:
MOV RAX,0x7fffffffffffffff
MOV qword ptr [RBX + 0x10],RAX
MOV dword ptr [RBX + 0x8],0x0
MOV EBP,0x1
JMP 0x0018f686
LAB_0018f60d:
ADD RCX,0x40
LEA R8,[0x193d99]
MOV RDI,RBX
MOV RSI,R14
MOV EDX,R9D
XOR R9D,R9D
CALL 0x0018c49c
MOV RCX,qword ptr [RBX + 0x18]
MOV EBP,0x10
TEST RCX,RCX
JZ 0x0018f686
DEC qword ptr [RBX + 0x10]
MOV RSI,0x3fffffffffffffff
MOV RDI,RBX
MOV EDX,0x1
XOR R8D,R8D
CALL 0x00186c43
JMP 0x0018f686
LAB_0018f657:
CMP qword ptr [RBX + 0x18],0x0
JZ 0x0018f679
MOV RAX,qword ptr [RBX]
MOV RSI,qword ptr [RBX + 0x20]
MOV RDI,qword ptr [RAX]
XOR EDX,EDX
CALL qword ptr [RAX + 0x8]
MOV qword ptr [RBX + 0x20],RAX
MOV qword ptr [RBX + 0x18],0x0
LAB_0018f679:
MOV qword ptr [RBX + 0x10],RBP
LAB_0018f67d:
MOV dword ptr [RBX + 0x8],0x0
XOR EBP,EBP
LAB_0018f686:
MOV EAX,EBP
ADD RSP,0x38
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
int8 bf_acos(long *param_1,long param_2,int8 param_3,int4 param_4)
{
int iVar1;
long lVar2;
int8 uVar3;
int8 *local_58;
int4 local_50;
int8 local_48;
int8 local_40;
long lStack_38;
local_58 = (int8 *)*param_1;
if (*(long *)(param_2 + 0x18) == 0) {
if (*(long *)(param_2 + 0x10) != 0x7ffffffffffffffe) {
if (*(long *)(param_2 + 0x10) != 0x7fffffffffffffff) {
bf_const_get(param_1,param_3,param_4,local_58 + 8,bf_const_pi_internal,0);
if (param_1[3] == 0) {
return 0x10;
}
param_1[2] = param_1[2] + -1;
__bf_round(param_1,0x3fffffffffffffff,1,param_1[3],0);
return 0x10;
}
if (param_1[3] != 0) {
lVar2 = (*(code *)local_58[1])(*local_58,param_1[4],0);
param_1[4] = lVar2;
param_1[3] = 0;
}
param_1[2] = 0x7fffffffffffffff;
goto LAB_0018f67d;
}
if (param_1[3] == 0) goto LAB_0018f5f1;
lVar2 = (*(code *)local_58[1])(*local_58,param_1[4],0);
}
else {
local_50 = 0;
local_48 = 0x8000000000000000;
local_40 = 0;
lStack_38 = 0;
bf_set_ui(&local_58,1);
iVar1 = bf_cmpu(param_2,&local_58);
if ((local_58 != (int8 *)0x0) && (lStack_38 != 0)) {
(*(code *)local_58[1])(*local_58,lStack_38,0);
}
if (iVar1 < 1) {
if ((iVar1 != 0) || (*(int *)(param_2 + 8) != 0)) {
uVar3 = bf_ziv_rounding(param_1,param_2,param_3,param_4,bf_asin_internal,1);
return uVar3;
}
if (param_1[3] != 0) {
lVar2 = (*(code *)((int8 *)*param_1)[1])(*(int8 *)*param_1,param_1[4],0);
param_1[4] = lVar2;
param_1[3] = 0;
}
param_1[2] = -0x8000000000000000;
LAB_0018f67d:
*(int4 *)(param_1 + 1) = 0;
return 0;
}
if (param_1[3] == 0) goto LAB_0018f5f1;
lVar2 = (*(code *)((int8 *)*param_1)[1])(*(int8 *)*param_1,param_1[4],0);
}
param_1[4] = lVar2;
param_1[3] = 0;
LAB_0018f5f1:
param_1[2] = 0x7fffffffffffffff;
*(int4 *)(param_1 + 1) = 0;
return 1;
}
|
|
57,219
|
google::protobuf::internal::ExtensionSet::NumExtensions() const
|
aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/extension_set.cc
|
int ExtensionSet::NumExtensions() const {
int result = 0;
ForEach([&result](int /* number */, const Extension& ext) {
if (!ext.is_cleared) {
++result;
}
});
return result;
}
|
O0
|
cpp
|
google::protobuf::internal::ExtensionSet::NumExtensions() const:
subq $0x28, %rsp
movq %rdi, 0x20(%rsp)
movq 0x20(%rsp), %rdi
movl $0x0, 0x1c(%rsp)
leaq 0x1c(%rsp), %rax
movq %rax, 0x10(%rsp)
movq 0x10(%rsp), %rsi
callq 0x214cb0
movq %rax, 0x8(%rsp)
movl 0x1c(%rsp), %eax
addq $0x28, %rsp
retq
nopl (%rax,%rax)
|
_ZNK6google8protobuf8internal12ExtensionSet13NumExtensionsEv:
sub rsp, 28h
mov [rsp+28h+var_8], rdi
mov rdi, [rsp+28h+var_8]
mov [rsp+28h+var_C], 0
lea rax, [rsp+28h+var_C]
mov [rsp+28h+var_18], rax
mov rsi, [rsp+28h+var_18]
call _ZNK6google8protobuf8internal12ExtensionSet7ForEachIZNKS2_13NumExtensionsEvE3$_0EET_S5_; google::protobuf::internal::ExtensionSet::ForEach<google::protobuf::internal::ExtensionSet::NumExtensions(void)::$_0>(google::protobuf::internal::ExtensionSet::NumExtensions(void)::$_0)
mov [rsp+28h+var_20], rax
mov eax, [rsp+28h+var_C]
add rsp, 28h
retn
|
long long google::protobuf::internal::ExtensionSet::NumExtensions(
google::protobuf::internal::ExtensionSet *this)
{
unsigned int v2; // [rsp+1Ch] [rbp-Ch] BYREF
google::protobuf::internal::ExtensionSet *v3; // [rsp+20h] [rbp-8h]
v3 = this;
v2 = 0;
google::protobuf::internal::ExtensionSet::ForEach<google::protobuf::internal::ExtensionSet::NumExtensions(void)::$_0>(
this,
&v2);
return v2;
}
| |||
57,220
|
google::protobuf::internal::ExtensionSet::NumExtensions() const
|
aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/extension_set.cc
|
int ExtensionSet::NumExtensions() const {
int result = 0;
ForEach([&result](int /* number */, const Extension& ext) {
if (!ext.is_cleared) {
++result;
}
});
return result;
}
|
O3
|
cpp
|
google::protobuf::internal::ExtensionSet::NumExtensions() const:
pushq %r14
pushq %rbx
pushq %rax
movswq 0xa(%rdi), %rax
movq 0x10(%rdi), %r14
testq %rax, %rax
js 0xb326d
testw %ax, %ax
je 0xb3296
shlq $0x5, %rax
xorl %ecx, %ecx
xorl %ebx, %ebx
movzbl 0x12(%r14,%rcx), %edx
notl %edx
andl $0x1, %edx
addl %edx, %ebx
addq $0x20, %rcx
cmpq %rcx, %rax
jne 0xb3255
jmp 0xb3298
movq 0x18(%r14), %rax
addq $0x8, %r14
cmpq %r14, %rax
je 0xb3296
xorl %ebx, %ebx
movzbl 0x32(%rax), %ecx
notl %ecx
andl $0x1, %ecx
addl %ecx, %ebx
movq %rax, %rdi
callq 0x2cc10
cmpq %r14, %rax
jne 0xb327c
jmp 0xb3298
xorl %ebx, %ebx
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
|
_ZNK6google8protobuf8internal12ExtensionSet13NumExtensionsEv:
push r14
push rbx
push rax
movsx rax, word ptr [rdi+0Ah]
mov r14, [rdi+10h]
test rax, rax
js short loc_B326D
test ax, ax
jz short loc_B3296
shl rax, 5
xor ecx, ecx
xor ebx, ebx
loc_B3255:
movzx edx, byte ptr [r14+rcx+12h]
not edx
and edx, 1
add ebx, edx
add rcx, 20h ; ' '
cmp rax, rcx
jnz short loc_B3255
jmp short loc_B3298
loc_B326D:
mov rax, [r14+18h]
add r14, 8
cmp rax, r14
jz short loc_B3296
xor ebx, ebx
loc_B327C:
movzx ecx, byte ptr [rax+32h]
not ecx
and ecx, 1
add ebx, ecx
mov rdi, rax
call __ZSt18_Rb_tree_incrementPSt18_Rb_tree_node_base; std::_Rb_tree_increment(std::_Rb_tree_node_base *)
cmp rax, r14
jnz short loc_B327C
jmp short loc_B3298
loc_B3296:
xor ebx, ebx
loc_B3298:
mov eax, ebx
add rsp, 8
pop rbx
pop r14
retn
|
long long google::protobuf::internal::ExtensionSet::NumExtensions(
google::protobuf::internal::ExtensionSet *this)
{
long long v1; // rax
long long v2; // r14
long long v3; // rax
long long v4; // rcx
unsigned int v5; // ebx
long long v6; // rax
long long v7; // r14
v1 = *((__int16 *)this + 5);
v2 = *((_QWORD *)this + 2);
if ( v1 >= 0 )
{
if ( (_WORD)v1 )
{
v3 = 32 * v1;
v4 = 0LL;
v5 = 0;
do
{
v5 += (*(_BYTE *)(v2 + v4 + 18) & 1) == 0;
v4 += 32LL;
}
while ( v3 != v4 );
return v5;
}
return 0;
}
v6 = *(_QWORD *)(v2 + 24);
v7 = v2 + 8;
if ( v6 == v7 )
return 0;
v5 = 0;
do
{
v5 += (*(_BYTE *)(v6 + 50) & 1) == 0;
v6 = std::_Rb_tree_increment(v6);
}
while ( v6 != v7 );
return v5;
}
|
NumExtensions:
PUSH R14
PUSH RBX
PUSH RAX
MOVSX RAX,word ptr [RDI + 0xa]
MOV R14,qword ptr [RDI + 0x10]
TEST RAX,RAX
JS 0x001b326d
TEST AX,AX
JZ 0x001b3296
SHL RAX,0x5
XOR ECX,ECX
XOR EBX,EBX
LAB_001b3255:
MOVZX EDX,byte ptr [R14 + RCX*0x1 + 0x12]
NOT EDX
AND EDX,0x1
ADD EBX,EDX
ADD RCX,0x20
CMP RAX,RCX
JNZ 0x001b3255
JMP 0x001b3298
LAB_001b326d:
MOV RAX,qword ptr [R14 + 0x18]
ADD R14,0x8
CMP RAX,R14
JZ 0x001b3296
XOR EBX,EBX
LAB_001b327c:
MOVZX ECX,byte ptr [RAX + 0x32]
NOT ECX
AND ECX,0x1
ADD EBX,ECX
MOV RDI,RAX
CALL 0x0012cc10
CMP RAX,R14
JNZ 0x001b327c
JMP 0x001b3298
LAB_001b3296:
XOR EBX,EBX
LAB_001b3298:
MOV EAX,EBX
ADD RSP,0x8
POP RBX
POP R14
RET
|
/* google::protobuf::internal::ExtensionSet::NumExtensions() const */
int __thiscall google::protobuf::internal::ExtensionSet::NumExtensions(ExtensionSet *this)
{
short sVar1;
long lVar2;
_Rb_tree_node_base *p_Var3;
long lVar4;
int iVar5;
sVar1 = *(short *)(this + 10);
lVar2 = *(long *)(this + 0x10);
if ((long)sVar1 < 0) {
p_Var3 = *(_Rb_tree_node_base **)(lVar2 + 0x18);
if (p_Var3 != (_Rb_tree_node_base *)(lVar2 + 8)) {
iVar5 = 0;
do {
iVar5 = iVar5 + (~(uint)(byte)p_Var3[0x32] & 1);
p_Var3 = (_Rb_tree_node_base *)std::_Rb_tree_increment(p_Var3);
} while (p_Var3 != (_Rb_tree_node_base *)(lVar2 + 8));
return iVar5;
}
}
else if (sVar1 != 0) {
lVar4 = 0;
iVar5 = 0;
do {
iVar5 = iVar5 + (~(uint)*(byte *)(lVar2 + 0x12 + lVar4) & 1);
lVar4 = lVar4 + 0x20;
} while ((long)sVar1 * 0x20 != lVar4);
return iVar5;
}
return 0;
}
|
|
57,221
|
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>, int, 0>(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&, int&)
|
monkey531[P]llama/common/./json.hpp
|
inline void from_json(const BasicJsonType& j, ArithmeticType& val)
{
switch (static_cast<value_t>(j))
{
case value_t::number_unsigned:
{
val = static_cast<ArithmeticType>(*j.template get_ptr<const typename BasicJsonType::number_unsigned_t*>());
break;
}
case value_t::number_integer:
{
val = static_cast<ArithmeticType>(*j.template get_ptr<const typename BasicJsonType::number_integer_t*>());
break;
}
case value_t::number_float:
{
val = static_cast<ArithmeticType>(*j.template get_ptr<const typename BasicJsonType::number_float_t*>());
break;
}
case value_t::boolean:
{
val = static_cast<ArithmeticType>(*j.template get_ptr<const typename BasicJsonType::boolean_t*>());
break;
}
case value_t::null:
case value_t::object:
case value_t::array:
case value_t::string:
case value_t::binary:
case value_t::discarded:
default:
JSON_THROW(type_error::create(302, concat("type must be number, but is ", j.type_name()), &j));
}
}
|
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>, int, 0>(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&, int&):
pushq %rbp
pushq %r14
pushq %rbx
subq $0x30, %rsp
movq %rdi, %r14
movzbl (%rdi), %eax
addl $-0x4, %eax
cmpl $0x3, %eax
ja 0x3e6f0
leaq 0x73fff(%rip), %rcx # 0xb26c8
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movl 0x8(%r14), %eax
jmp 0x3e6e5
movzbl 0x8(%r14), %eax
jmp 0x3e6e5
cvttsd2si 0x8(%r14), %eax
movl %eax, (%rsi)
addq $0x30, %rsp
popq %rbx
popq %r14
popq %rbp
retq
movl $0x20, %edi
callq 0x193b0
movq %rax, %rbx
movq %r14, %rdi
callq 0x29b56
leaq 0x8(%rsp), %rdx
movq %rax, (%rdx)
leaq 0x75f92(%rip), %rsi # 0xb46a6
leaq 0x10(%rsp), %rdi
callq 0x260c3
movb $0x1, %bpl
leaq 0x10(%rsp), %rdx
movq %rbx, %rdi
movl $0x12e, %esi # imm = 0x12E
movq %r14, %rcx
callq 0x29902
xorl %ebp, %ebp
leaq 0xaa761(%rip), %rsi # 0xe8ea0
leaq -0x1a7e2(%rip), %rdx # 0x23f64
movq %rbx, %rdi
callq 0x19d90
movq %rax, %r14
leaq 0x20(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x3e774
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x197a0
jmp 0x3e774
movq %rax, %r14
movb $0x1, %bpl
testb %bpl, %bpl
je 0x3e781
movq %rbx, %rdi
callq 0x19560
movq %r14, %rdi
callq 0x19e00
nop
|
_ZN8nlohmann16json_abi_v3_11_36detail9from_jsonINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEiTnNSt9enable_ifIXaaaaaaaasr3std13is_arithmeticIT0_EE5valuentsr3std7is_sameISH_NT_17number_unsigned_tEEE5valuentsr3std7is_sameISH_NSI_16number_integer_tEEE5valuentsr3std7is_sameISH_NSI_14number_float_tEEE5valuentsr3std7is_sameISH_NSI_9boolean_tEEE5valueEiE4typeELi0EEEvRKSI_RSH_:
push rbp; char
push r14; int
push rbx; __int64
sub rsp, 30h
mov r14, rdi
movzx eax, byte ptr [rdi]
add eax, 0FFFFFFFCh; switch 4 cases
cmp eax, 3
ja short def_3E6D0; jumptable 000000000003E6D0 default case
lea rcx, jpt_3E6D0
movsxd rax, ds:(jpt_3E6D0 - 0B26C8h)[rcx+rax*4]
add rax, rcx
jmp rax; switch jump
loc_3E6D2:
mov eax, [r14+8]; jumptable 000000000003E6D0 cases 5,6
jmp short loc_3E6E5
loc_3E6D8:
movzx eax, byte ptr [r14+8]; jumptable 000000000003E6D0 case 4
jmp short loc_3E6E5
loc_3E6DF:
cvttsd2si eax, qword ptr [r14+8]; jumptable 000000000003E6D0 case 7
loc_3E6E5:
mov [rsi], eax
add rsp, 30h
pop rbx
pop r14
pop rbp
retn
def_3E6D0:
mov edi, 20h ; ' '; jumptable 000000000003E6D0 default case
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, aTypeMustBeNumb; "type must be number, but is "
lea rdi, [rsp+48h+var_38]
call _ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJRA29_KcPS9_EEET_DpOT0_; nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[29],char const*>(char const(&)[29],char const* &&)
mov bpl, 1
lea rdx, [rsp+48h+var_38]
mov rdi, rbx; this
mov esi, 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_3E774
mov rsi, [rsp+48h+var_28]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_3E774
mov r14, rax
mov bpl, 1
loc_3E774:
test bpl, bpl
jz short loc_3E781
mov rdi, rbx; void *
call ___cxa_free_exception
loc_3E781:
mov rdi, r14
call __Unwind_Resume
|
long long ZN8nlohmann16json_abi_v3_11_36detail9from_jsonINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEiTnNSt9enable_ifIXaaaaaaaasr3std13is_arithmeticIT0_EE5valuentsr3std7is_sameISH_NT_17number_unsigned_tEEE5valuentsr3std7is_sameISH_NSI_16number_integer_tEEE5valuentsr3std7is_sameISH_NSI_14number_float_tEEE5valuentsr3std7is_sameISH_NSI_9boolean_tEEE5valueEiE4typeELi0EEEvRKSI_RSH_(
unsigned __int8 *a1,
_DWORD *a2)
{
long long result; // rax
nlohmann::json_abi_v3_11_3::detail::exception *exception; // rbx
const char *v4; // [rsp+8h] [rbp-40h] BYREF
_QWORD v5[2]; // [rsp+10h] [rbp-38h] BYREF
switch ( *a1 )
{
case 4u:
result = a1[8];
break;
case 5u:
case 6u:
result = *((unsigned int *)a1 + 2);
break;
case 7u:
result = (unsigned int)(int)*((double *)a1 + 1);
break;
default:
exception = (nlohmann::json_abi_v3_11_3::detail::exception *)__cxa_allocate_exception(0x20uLL);
v4 = nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::type_name(a1);
nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[29],char const*>(
(long long)v5,
(long long)"type must be number, but is ",
&v4);
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,
v5);
__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);
}
*a2 = result;
return result;
}
|
_ZN8nlohmann16json_abi_v3_11_36detail9from_jsonINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEiTnNSt9enable_ifIXaaaaaaaasr3std13is_arithmeticIT0_EE5valuentsr3std7is_sameISH_NT_17number_unsigned_tEEE5valuentsr3std7is_sameISH_NSI_16number_integer_tEEE5valuentsr3std7is_sameISH_NSI_14number_float_tEEE5valuentsr3std7is_sameISH_NSI_9boolean_tEEE5valueEiE4typeELi0EEEvRKSI_RSH_:
PUSH RBP
PUSH R14
PUSH RBX
SUB RSP,0x30
MOV R14,RDI
MOVZX EAX,byte ptr [RDI]
ADD EAX,-0x4
CMP EAX,0x3
JA 0x0013e6f0
LEA RCX,[0x1b26c8]
MOVSXD RAX,dword ptr [RCX + RAX*0x4]
ADD RAX,RCX
switchD:
JMP RAX
caseD_5:
MOV EAX,dword ptr [R14 + 0x8]
JMP 0x0013e6e5
caseD_4:
MOVZX EAX,byte ptr [R14 + 0x8]
JMP 0x0013e6e5
caseD_7:
CVTTSD2SI EAX,qword ptr [R14 + 0x8]
LAB_0013e6e5:
MOV dword ptr [RSI],EAX
ADD RSP,0x30
POP RBX
POP R14
POP RBP
RET
default:
MOV EDI,0x20
CALL 0x001193b0
MOV RBX,RAX
MOV RDI,R14
CALL 0x00129b56
LEA RDX,[RSP + 0x8]
MOV qword ptr [RDX],RAX
LAB_0013e70d:
LEA RSI,[0x1b46a6]
LEA RDI,[RSP + 0x10]
CALL 0x001260c3
MOV BPL,0x1
LAB_0013e721:
LEA RDX,[RSP + 0x10]
MOV RDI,RBX
MOV ESI,0x12e
MOV RCX,R14
CALL 0x00129902
XOR EBP,EBP
LEA RSI,[0x1e8ea0]
LEA RDX,[0x123f64]
MOV RDI,RBX
CALL 0x00119d90
|
void _ZN8nlohmann16json_abi_v3_11_36detail9from_jsonINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEiTnNSt9enable_ifIXaaaaaaaasr3std13is_arithmeticIT0_EE5valuentsr3std7is_sameISH_NT_17number_unsigned_tEEE5valuentsr3std7is_sameISH_NSI_16number_integer_tEEE5valuentsr3std7is_sameISH_NSI_14number_float_tEEE5valuentsr3std7is_sameISH_NSI_9boolean_tEEE5valueEiE4typeELi0EEEvRKSI_RSH_
(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,uint *param_2)
{
uint uVar1;
int8 uVar2;
char *local_40;
detail local_38 [32];
switch(*param_1) {
case (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>
)0x4:
uVar1 = (uint)(byte)param_1[8];
break;
case (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>
)0x5:
case (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>
)0x6:
uVar1 = *(uint *)(param_1 + 8);
break;
case (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>
)0x7:
uVar1 = (uint)*(double *)(param_1 + 8);
break;
default:
uVar2 = __cxa_allocate_exception(0x20);
local_40 = (char *)nlohmann::json_abi_v3_11_3::
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::type_name(param_1);
/* try { // try from 0013e70d to 0013e71d has its CatchHandler @ 0013e76e */
nlohmann::json_abi_v3_11_3::detail::concat<std::__cxx11::string,char_const(&)[29],char_const*>
(local_38,"type must be number, but is ",&local_40);
/* try { // try from 0013e721 to 0013e74d has its CatchHandler @ 0013e74e */
_ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_
(uVar2,0x12e,local_38,param_1);
/* WARNING: Subroutine does not return */
__cxa_throw(uVar2,&nlohmann::json_abi_v3_11_3::detail::type_error::typeinfo,
nlohmann::json_abi_v3_11_3::detail::exception::~exception);
}
*param_2 = uVar1;
return;
}
|
|
57,222
|
ggml_cpy_impl
|
7CodeWizard[P]stablediffusion/ggml/src/ggml.c
|
static struct ggml_tensor * ggml_cpy_impl(
struct ggml_context * ctx,
struct ggml_tensor * a,
struct ggml_tensor * b,
bool inplace) {
GGML_ASSERT(ggml_nelements(a) == ggml_nelements(b));
bool is_node = false;
if (!inplace && (a->grad || b->grad)) {
is_node = true;
}
// make a view of the destination
struct ggml_tensor * result = ggml_view_tensor(ctx, b);
if (strlen(b->name) > 0) {
ggml_format_name(result, "%s (copy of %s)", b->name, a->name);
} else {
ggml_format_name(result, "%s (copy)", a->name);
}
result->op = GGML_OP_CPY;
result->grad = is_node ? ggml_dup_tensor(ctx, result) : NULL;
result->src[0] = a;
result->src[1] = b;
return result;
}
|
O1
|
c
|
ggml_cpy_impl:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq 0x18(%rsi), %rax
imulq 0x10(%rsi), %rax
imulq 0x20(%rsi), %rax
movq %rdx, %r14
imulq 0x28(%rsi), %rax
movq 0x18(%rdx), %rdx
imulq 0x10(%r14), %rdx
imulq 0x20(%r14), %rdx
imulq 0x28(%r14), %rdx
cmpq %rdx, %rax
jne 0x92b0d
movq %rsi, %rbx
movq %rdi, %r15
testb %cl, %cl
je 0x92a57
xorl %ebp, %ebp
jmp 0x92a6e
cmpq $0x0, 0x98(%rbx)
jne 0x92a6b
cmpq $0x0, 0x98(%r14)
je 0x92a53
movb $0x1, %bpl
movq %r15, %rdi
movq %r14, %rsi
callq 0x90b1a
movq %rax, %r12
movl $0x120, %edx # imm = 0x120
leaq (%rbx,%rdx), %rcx
cmpb $0x0, 0x120(%r14)
je 0x92aa5
addq %r14, %rdx
leaq 0x34d1b(%rip), %rsi # 0xc77b4
movq %r12, %rdi
xorl %eax, %eax
callq 0x90a74
jmp 0x92ab9
leaq 0x34d18(%rip), %rsi # 0xc77c4
movq %r12, %rdi
movq %rcx, %rdx
xorl %eax, %eax
callq 0x90a74
movl $0x1c, 0x50(%r12)
testb %bpl, %bpl
je 0x92ae7
movl (%r12), %esi
movq %r12, %rcx
addq $0x10, %rcx
movq %r15, %rdi
movl $0x4, %edx
xorl %r8d, %r8d
xorl %r9d, %r9d
callq 0x8e8b7
jmp 0x92ae9
xorl %eax, %eax
movq %rax, 0x98(%r12)
movq %rbx, 0xa0(%r12)
movq %r14, 0xa8(%r12)
movq %r12, %rax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
callq 0xd616
|
ggml_cpy_impl:
push rbp
push r15
push r14
push r12
push rbx
mov rax, [rsi+18h]
imul rax, [rsi+10h]
imul rax, [rsi+20h]
mov r14, rdx
imul rax, [rsi+28h]
mov rdx, [rdx+18h]
imul rdx, [r14+10h]
imul rdx, [r14+20h]
imul rdx, [r14+28h]
cmp rax, rdx
jnz loc_92B0D
mov rbx, rsi
mov r15, rdi
test cl, cl
jz short loc_92A57
loc_92A53:
xor ebp, ebp
jmp short loc_92A6E
loc_92A57:
cmp qword ptr [rbx+98h], 0
jnz short loc_92A6B
cmp qword ptr [r14+98h], 0
jz short loc_92A53
loc_92A6B:
mov bpl, 1
loc_92A6E:
mov rdi, r15
mov rsi, r14
call ggml_view_tensor
mov r12, rax
mov edx, 120h
lea rcx, [rbx+rdx]
cmp byte ptr [r14+120h], 0
jz short loc_92AA5
add rdx, r14
lea rsi, aSCopyOfS; "%s (copy of %s)"
mov rdi, r12
xor eax, eax
call ggml_format_name
jmp short loc_92AB9
loc_92AA5:
lea rsi, aSCopy; "%s (copy)"
mov rdi, r12
mov rdx, rcx
xor eax, eax
call ggml_format_name
loc_92AB9:
mov dword ptr [r12+50h], 1Ch
test bpl, bpl
jz short loc_92AE7
mov esi, [r12]
mov rcx, r12
add rcx, 10h
mov rdi, r15
mov edx, 4
xor r8d, r8d
xor r9d, r9d
call ggml_new_tensor_impl
jmp short loc_92AE9
loc_92AE7:
xor eax, eax
loc_92AE9:
mov [r12+98h], rax
mov [r12+0A0h], rbx
mov [r12+0A8h], r14
mov rax, r12
pop rbx
pop r12
pop r14
pop r15
pop rbp
retn
loc_92B0D:
call ggml_cpy_impl_cold_1
|
long long ggml_cpy_impl(
long long a1,
_QWORD *a2,
long long a3,
char a4,
__m128 a5,
__m128 a6,
__m128 a7,
__m128 a8,
double a9,
double a10,
__m128 a11,
__m128 a12)
{
bool v13; // bp
long long v14; // rax
long long v15; // r8
long long v16; // r9
__m128 v17; // xmm4
__m128 v18; // xmm5
long long v19; // r12
long long v20; // rcx
long long v21; // rax
char v23; // [rsp+0h] [rbp-28h]
if ( a2[5] * a2[4] * a2[2] * a2[3] != *(_QWORD *)(a3 + 40)
* *(_QWORD *)(a3 + 32)
* *(_QWORD *)(a3 + 16)
* *(_QWORD *)(a3 + 24) )
ggml_cpy_impl_cold_1();
v13 = !a4 && (a2[19] || *(_QWORD *)(a3 + 152));
v14 = ggml_view_tensor(a1, a3, a5, a6, a7, a8, a9, a10, a11, a12);
v19 = v14;
v20 = (long long)(a2 + 36);
if ( *(_BYTE *)(a3 + 288) )
ggml_format_name(v14, (long long)"%s (copy of %s)", a3 + 288, v20, v15, v16, a5, a6, a7, a8, v17, v18, a11, a12, v23);
else
ggml_format_name(
v14,
(long long)"%s (copy)",
(long long)(a2 + 36),
v20,
v15,
v16,
a5,
a6,
a7,
a8,
v17,
v18,
a11,
a12,
v23);
*(_DWORD *)(v19 + 80) = 28;
if ( v13 )
v21 = ggml_new_tensor_impl(a1, *(_DWORD *)v19, 4, (_QWORD *)(v19 + 16), 0LL, 0LL, a5, a6);
else
v21 = 0LL;
*(_QWORD *)(v19 + 152) = v21;
*(_QWORD *)(v19 + 160) = a2;
*(_QWORD *)(v19 + 168) = a3;
return v19;
}
| |||
57,223
|
ggml_cpy_impl
|
7CodeWizard[P]stablediffusion/ggml/src/ggml.c
|
static struct ggml_tensor * ggml_cpy_impl(
struct ggml_context * ctx,
struct ggml_tensor * a,
struct ggml_tensor * b,
bool inplace) {
GGML_ASSERT(ggml_nelements(a) == ggml_nelements(b));
bool is_node = false;
if (!inplace && (a->grad || b->grad)) {
is_node = true;
}
// make a view of the destination
struct ggml_tensor * result = ggml_view_tensor(ctx, b);
if (strlen(b->name) > 0) {
ggml_format_name(result, "%s (copy of %s)", b->name, a->name);
} else {
ggml_format_name(result, "%s (copy)", a->name);
}
result->op = GGML_OP_CPY;
result->grad = is_node ? ggml_dup_tensor(ctx, result) : NULL;
result->src[0] = a;
result->src[1] = b;
return result;
}
|
O2
|
c
|
ggml_cpy_impl:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq 0x18(%rsi), %rax
imulq 0x10(%rsi), %rax
imulq 0x20(%rsi), %rax
movq %rdx, %r14
imulq 0x28(%rsi), %rax
movq 0x18(%rdx), %rdx
imulq 0x10(%r14), %rdx
imulq 0x20(%r14), %rdx
imulq 0x28(%r14), %rdx
cmpq %rdx, %rax
jne 0x6b8a2
movq %rsi, %rbx
movq %rdi, %r15
testb %cl, %cl
je 0x6b7ff
xorl %ebp, %ebp
jmp 0x6b816
cmpq $0x0, 0x98(%rbx)
jne 0x6b813
cmpq $0x0, 0x98(%r14)
je 0x6b7fb
movb $0x1, %bpl
movq %r15, %rdi
movq %r14, %rsi
callq 0x69922
movq %rax, %r12
movl $0x120, %edx # imm = 0x120
leaq (%rbx,%rdx), %rcx
cmpb $0x0, 0x120(%r14)
je 0x6b84d
addq %r14, %rdx
leaq 0x37d42(%rip), %rsi # 0xa3583
movq %r12, %rdi
xorl %eax, %eax
callq 0x6987c
jmp 0x6b861
leaq 0x37d3f(%rip), %rsi # 0xa3593
movq %r12, %rdi
movq %rcx, %rdx
xorl %eax, %eax
callq 0x6987c
movl $0x1c, 0x50(%r12)
testb %bpl, %bpl
je 0x6b87c
movq %r15, %rdi
movq %r12, %rsi
callq 0x68a65
jmp 0x6b87e
xorl %eax, %eax
movq %rax, 0x98(%r12)
movq %rbx, 0xa0(%r12)
movq %r14, 0xa8(%r12)
movq %r12, %rax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq 0x6a69f(%rip), %rax # 0xd5f48
movq (%rax), %rdi
callq 0xa6f0
movq 0x6a6f0(%rip), %rax # 0xd5fa8
movq (%rax), %rdi
leaq 0x2e95c(%rip), %rsi # 0x9a21e
leaq 0x35fb5(%rip), %rdx # 0xa187e
leaq 0x2f6e5(%rip), %r8 # 0x9afb5
movl $0x10d0, %ecx # imm = 0x10D0
xorl %eax, %eax
callq 0xa8b0
callq 0x67550
callq 0xa300
|
ggml_cpy_impl:
push rbp
push r15
push r14
push r12
push rbx
mov rax, [rsi+18h]
imul rax, [rsi+10h]
imul rax, [rsi+20h]
mov r14, rdx
imul rax, [rsi+28h]
mov rdx, [rdx+18h]
imul rdx, [r14+10h]
imul rdx, [r14+20h]
imul rdx, [r14+28h]
cmp rax, rdx
jnz loc_6B8A2
mov rbx, rsi
mov r15, rdi
test cl, cl
jz short loc_6B7FF
loc_6B7FB:
xor ebp, ebp
jmp short loc_6B816
loc_6B7FF:
cmp qword ptr [rbx+98h], 0
jnz short loc_6B813
cmp qword ptr [r14+98h], 0
jz short loc_6B7FB
loc_6B813:
mov bpl, 1
loc_6B816:
mov rdi, r15
mov rsi, r14
call ggml_view_tensor
mov r12, rax
mov edx, 120h
lea rcx, [rbx+rdx]
cmp byte ptr [r14+120h], 0
jz short loc_6B84D
add rdx, r14
lea rsi, aSCopyOfS; "%s (copy of %s)"
mov rdi, r12
xor eax, eax
call ggml_format_name
jmp short loc_6B861
loc_6B84D:
lea rsi, aSCopy; "%s (copy)"
mov rdi, r12
mov rdx, rcx
xor eax, eax
call ggml_format_name
loc_6B861:
mov dword ptr [r12+50h], 1Ch
test bpl, bpl
jz short loc_6B87C
mov rdi, r15
mov rsi, r12
call ggml_dup_tensor
jmp short loc_6B87E
loc_6B87C:
xor eax, eax
loc_6B87E:
mov [r12+98h], rax
mov [r12+0A0h], rbx
mov [r12+0A8h], r14
mov rax, r12
pop rbx
pop r12
pop r14
pop r15
pop rbp
retn
loc_6B8A2:
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, aGgmlNelementsA; "ggml_nelements(a) == ggml_nelements(b)"
mov ecx, 10D0h
xor eax, eax
call _fprintf
call ggml_print_backtrace
call _abort
|
long long ggml_cpy_impl(
long long a1,
_QWORD *a2,
long long a3,
char a4,
__m128 a5,
__m128 a6,
__m128 a7,
__m128 a8,
double a9,
double a10,
__m128 a11,
__m128 a12)
{
bool v13; // bp
long long v14; // rax
long long v15; // r8
long long v16; // r9
__m128 v17; // xmm4
__m128 v18; // xmm5
long long v19; // r12
long long v20; // rcx
long long v21; // rax
long long v23; // rdi
char v24; // [rsp+0h] [rbp-28h]
if ( a2[5] * a2[4] * a2[2] * a2[3] != *(_QWORD *)(a3 + 40)
* *(_QWORD *)(a3 + 32)
* *(_QWORD *)(a3 + 16)
* *(_QWORD *)(a3 + 24) )
{
fflush(stdout);
v23 = stderr;
fprintf(
stderr,
"GGML_ASSERT: %s:%d: %s\n",
"/workspace/llm4binary/github/2025_star3/7CodeWizard[P]stablediffusion/ggml/src/ggml.c",
4304,
"ggml_nelements(a) == ggml_nelements(b)");
ggml_print_backtrace();
abort(v23);
}
v13 = !a4 && (a2[19] || *(_QWORD *)(a3 + 152));
v14 = ggml_view_tensor(a1, a3, a5, a6, a7, a8, a9, a10, a11, a12);
v19 = v14;
v20 = (long long)(a2 + 36);
if ( *(_BYTE *)(a3 + 288) )
ggml_format_name(v14, (long long)"%s (copy of %s)", a3 + 288, v20, v15, v16, a5, a6, a7, a8, v17, v18, a11, a12, v24);
else
ggml_format_name(
v14,
(long long)"%s (copy)",
(long long)(a2 + 36),
v20,
v15,
v16,
a5,
a6,
a7,
a8,
v17,
v18,
a11,
a12,
v24);
*(_DWORD *)(v19 + 80) = 28;
if ( v13 )
v21 = ggml_dup_tensor(a1, (unsigned int *)v19);
else
v21 = 0LL;
*(_QWORD *)(v19 + 152) = v21;
*(_QWORD *)(v19 + 160) = a2;
*(_QWORD *)(v19 + 168) = a3;
return v19;
}
|
ggml_cpy_impl:
PUSH RBP
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
MOV RAX,qword ptr [RSI + 0x18]
IMUL RAX,qword ptr [RSI + 0x10]
IMUL RAX,qword ptr [RSI + 0x20]
MOV R14,RDX
IMUL RAX,qword ptr [RSI + 0x28]
MOV RDX,qword ptr [RDX + 0x18]
IMUL RDX,qword ptr [R14 + 0x10]
IMUL RDX,qword ptr [R14 + 0x20]
IMUL RDX,qword ptr [R14 + 0x28]
CMP RAX,RDX
JNZ 0x0016b8a2
MOV RBX,RSI
MOV R15,RDI
TEST CL,CL
JZ 0x0016b7ff
LAB_0016b7fb:
XOR EBP,EBP
JMP 0x0016b816
LAB_0016b7ff:
CMP qword ptr [RBX + 0x98],0x0
JNZ 0x0016b813
CMP qword ptr [R14 + 0x98],0x0
JZ 0x0016b7fb
LAB_0016b813:
MOV BPL,0x1
LAB_0016b816:
MOV RDI,R15
MOV RSI,R14
CALL 0x00169922
MOV R12,RAX
MOV EDX,0x120
LEA RCX,[RBX + RDX*0x1]
CMP byte ptr [R14 + 0x120],0x0
JZ 0x0016b84d
ADD RDX,R14
LEA RSI,[0x1a3583]
MOV RDI,R12
XOR EAX,EAX
CALL 0x0016987c
JMP 0x0016b861
LAB_0016b84d:
LEA RSI,[0x1a3593]
MOV RDI,R12
MOV RDX,RCX
XOR EAX,EAX
CALL 0x0016987c
LAB_0016b861:
MOV dword ptr [R12 + 0x50],0x1c
TEST BPL,BPL
JZ 0x0016b87c
MOV RDI,R15
MOV RSI,R12
CALL 0x00168a65
JMP 0x0016b87e
LAB_0016b87c:
XOR EAX,EAX
LAB_0016b87e:
MOV qword ptr [R12 + 0x98],RAX
MOV qword ptr [R12 + 0xa0],RBX
MOV qword ptr [R12 + 0xa8],R14
MOV RAX,R12
POP RBX
POP R12
POP R14
POP R15
POP RBP
RET
LAB_0016b8a2:
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,[0x19afb5]
MOV ECX,0x10d0
XOR EAX,EAX
CALL 0x0010a8b0
CALL 0x00167550
CALL 0x0010a300
|
long ggml_cpy_impl(int8 param_1,long param_2,long param_3,char param_4)
{
bool bVar1;
long lVar2;
int8 uVar3;
if (*(long *)(param_2 + 0x18) * *(long *)(param_2 + 0x10) * *(long *)(param_2 + 0x20) *
*(long *)(param_2 + 0x28) -
*(long *)(param_3 + 0x18) * *(long *)(param_3 + 0x10) * *(long *)(param_3 + 0x20) *
*(long *)(param_3 + 0x28) == 0) {
if ((param_4 == '\0') && ((*(long *)(param_2 + 0x98) != 0 || (*(long *)(param_3 + 0x98) != 0))))
{
bVar1 = true;
}
else {
bVar1 = false;
}
lVar2 = ggml_view_tensor(param_1,param_3);
if (*(char *)(param_3 + 0x120) == '\0') {
ggml_format_name(lVar2,"%s (copy)",param_2 + 0x120);
}
else {
ggml_format_name(lVar2,"%s (copy of %s)",param_3 + 0x120);
}
*(int4 *)(lVar2 + 0x50) = 0x1c;
if (bVar1) {
uVar3 = ggml_dup_tensor(param_1,lVar2);
}
else {
uVar3 = 0;
}
*(int8 *)(lVar2 + 0x98) = uVar3;
*(long *)(lVar2 + 0xa0) = param_2;
*(long *)(lVar2 + 0xa8) = param_3;
return lVar2;
}
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",
0x10d0,"ggml_nelements(a) == ggml_nelements(b)");
ggml_print_backtrace();
/* WARNING: Subroutine does not return */
abort();
}
|
|
57,224
|
cleanup_instrument_config()
|
eloqsql/storage/perfschema/pfs_server.cc
|
void cleanup_instrument_config()
{
if (pfs_instr_config_array != NULL)
{
PFS_instr_config **it= pfs_instr_config_array->front();
for ( ; it != pfs_instr_config_array->end(); it++)
my_free(*it);
}
delete pfs_instr_config_array;
pfs_instr_config_array= NULL;
}
|
O0
|
cpp
|
cleanup_instrument_config():
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
leaq 0x3b9419(%rip), %rax # 0x40bf78
cmpq $0x0, (%rax)
je 0x52bb7
leaq 0x3b940c(%rip), %rax # 0x40bf78
movq (%rax), %rdi
callq 0x51880
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x10(%rbp)
leaq 0x3b93f1(%rip), %rax # 0x40bf78
movq (%rax), %rdi
callq 0x518a0
movq %rax, %rcx
movq -0x10(%rbp), %rax
cmpq %rcx, %rax
je 0x52bb5
movq -0x8(%rbp), %rax
movq (%rax), %rdi
callq 0x5a250
movq -0x8(%rbp), %rax
addq $0x8, %rax
movq %rax, -0x8(%rbp)
jmp 0x52b78
jmp 0x52bb7
leaq 0x3b93ba(%rip), %rax # 0x40bf78
movq (%rax), %rax
movq %rax, -0x18(%rbp)
cmpq $0x0, %rax
je 0x52be2
movq -0x18(%rbp), %rdi
callq 0x52f80
movq -0x18(%rbp), %rdi
movl $0x28, %esi
callq 0x26320
leaq 0x3b938f(%rip), %rax # 0x40bf78
movq $0x0, (%rax)
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
|
_Z25cleanup_instrument_configv:
push rbp
mov rbp, rsp
sub rsp, 20h
lea rax, pfs_instr_config_array
cmp qword ptr [rax], 0
jz short loc_52BB7
lea rax, pfs_instr_config_array
mov rdi, [rax]
call _ZN13Dynamic_arrayIP16PFS_instr_configE5frontEv; Dynamic_array<PFS_instr_config *>::front(void)
mov [rbp+var_8], rax
loc_52B78:
mov rax, [rbp+var_8]
mov [rbp+var_10], rax
lea rax, pfs_instr_config_array
mov rdi, [rax]
call _ZNK13Dynamic_arrayIP16PFS_instr_configE3endEv; Dynamic_array<PFS_instr_config *>::end(void)
mov rcx, rax
mov rax, [rbp+var_10]
cmp rax, rcx
jz short loc_52BB5
mov rax, [rbp+var_8]
mov rdi, [rax]
call my_free
mov rax, [rbp+var_8]
add rax, 8
mov [rbp+var_8], rax
jmp short loc_52B78
loc_52BB5:
jmp short $+2
loc_52BB7:
lea rax, pfs_instr_config_array
mov rax, [rax]
mov [rbp+var_18], rax
cmp rax, 0
jz short loc_52BE2
mov rdi, [rbp+var_18]
call _ZN13Dynamic_arrayIP16PFS_instr_configED2Ev; Dynamic_array<PFS_instr_config *>::~Dynamic_array()
mov rdi, [rbp+var_18]; void *
mov esi, 28h ; '('; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_52BE2:
lea rax, pfs_instr_config_array
mov qword ptr [rax], 0
add rsp, 20h
pop rbp
retn
|
long long *cleanup_instrument_config(void)
{
long long *result; // rax
void *v1; // [rsp+8h] [rbp-18h]
_QWORD *i; // [rsp+18h] [rbp-8h]
if ( pfs_instr_config_array )
{
for ( i = (_QWORD *)Dynamic_array<PFS_instr_config *>::front(pfs_instr_config_array);
i != (_QWORD *)Dynamic_array<PFS_instr_config *>::end(pfs_instr_config_array);
++i )
{
my_free(*i);
}
}
v1 = (void *)pfs_instr_config_array;
if ( pfs_instr_config_array )
{
Dynamic_array<PFS_instr_config *>::~Dynamic_array(pfs_instr_config_array);
operator delete(v1, 0x28uLL);
}
result = &pfs_instr_config_array;
pfs_instr_config_array = 0LL;
return result;
}
|
cleanup_instrument_config:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x20
LEA RAX,[0x50bf78]
CMP qword ptr [RAX],0x0
JZ 0x00152bb7
LEA RAX,[0x50bf78]
MOV RDI,qword ptr [RAX]
CALL 0x00151880
MOV qword ptr [RBP + -0x8],RAX
LAB_00152b78:
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RBP + -0x10],RAX
LEA RAX,[0x50bf78]
MOV RDI,qword ptr [RAX]
CALL 0x001518a0
MOV RCX,RAX
MOV RAX,qword ptr [RBP + -0x10]
CMP RAX,RCX
JZ 0x00152bb5
MOV RAX,qword ptr [RBP + -0x8]
MOV RDI,qword ptr [RAX]
CALL 0x0015a250
MOV RAX,qword ptr [RBP + -0x8]
ADD RAX,0x8
MOV qword ptr [RBP + -0x8],RAX
JMP 0x00152b78
LAB_00152bb5:
JMP 0x00152bb7
LAB_00152bb7:
LEA RAX,[0x50bf78]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x18],RAX
CMP RAX,0x0
JZ 0x00152be2
MOV RDI,qword ptr [RBP + -0x18]
CALL 0x00152f80
MOV RDI,qword ptr [RBP + -0x18]
MOV ESI,0x28
CALL 0x00126320
LAB_00152be2:
LEA RAX,[0x50bf78]
MOV qword ptr [RAX],0x0
ADD RSP,0x20
POP RBP
RET
|
/* WARNING: Unknown calling convention -- yet parameter storage is locked */
/* cleanup_instrument_config() */
void cleanup_instrument_config(void)
{
Dynamic_array<PFS_instr_config*> *pDVar1;
int8 *puVar2;
int8 *local_10;
if (pfs_instr_config_array != (Dynamic_array<PFS_instr_config*> *)0x0) {
for (local_10 = (int8 *)Dynamic_array<PFS_instr_config*>::front(pfs_instr_config_array);
puVar2 = (int8 *)Dynamic_array<PFS_instr_config*>::end(pfs_instr_config_array),
local_10 != puVar2; local_10 = local_10 + 1) {
my_free(*local_10);
}
}
pDVar1 = pfs_instr_config_array;
if (pfs_instr_config_array != (Dynamic_array<PFS_instr_config*> *)0x0) {
Dynamic_array<PFS_instr_config*>::~Dynamic_array(pfs_instr_config_array);
operator_delete(pDVar1,0x28);
}
pfs_instr_config_array = (Dynamic_array<PFS_instr_config*> *)0x0;
return;
}
|
|
57,225
|
JS_GetOwnPropertyNames
|
bluesky950520[P]quickjs/quickjs.c
|
int JS_GetOwnPropertyNames(JSContext *ctx, JSPropertyEnum **ptab,
uint32_t *plen, JSValue obj, int flags)
{
if (JS_VALUE_GET_TAG(obj) != JS_TAG_OBJECT) {
JS_ThrowTypeErrorNotAnObject(ctx);
return -1;
}
return JS_GetOwnPropertyNamesInternal(ctx, ptab, plen,
JS_VALUE_GET_OBJ(obj), flags);
}
|
O0
|
c
|
JS_GetOwnPropertyNames:
subq $0x48, %rsp
movq %rcx, 0x30(%rsp)
movq %r8, 0x38(%rsp)
movq %rdi, 0x28(%rsp)
movq %rsi, 0x20(%rsp)
movq %rdx, 0x18(%rsp)
movl %r9d, 0x14(%rsp)
movq 0x38(%rsp), %rax
cmpl $-0x1, %eax
je 0x2f569
movq 0x28(%rsp), %rdi
callq 0x2f5a0
movq %rax, (%rsp)
movq %rdx, 0x8(%rsp)
movl $0xffffffff, 0x44(%rsp) # imm = 0xFFFFFFFF
jmp 0x2f58b
movq 0x28(%rsp), %rdi
movq 0x20(%rsp), %rsi
movq 0x18(%rsp), %rdx
movq 0x30(%rsp), %rcx
movl 0x14(%rsp), %r8d
callq 0x2f5e0
movl %eax, 0x44(%rsp)
movl 0x44(%rsp), %eax
addq $0x48, %rsp
retq
nopw %cs:(%rax,%rax)
|
JS_GetOwnPropertyNames:
sub rsp, 48h
mov [rsp+48h+var_18], rcx
mov [rsp+48h+var_10], r8
mov [rsp+48h+var_20], rdi
mov [rsp+48h+var_28], rsi
mov [rsp+48h+var_30], rdx
mov [rsp+48h+var_34], r9d
mov rax, [rsp+48h+var_10]
cmp eax, 0FFFFFFFFh
jz short loc_2F569
mov rdi, [rsp+48h+var_20]
call JS_ThrowTypeErrorNotAnObject
mov [rsp+48h+var_48], rax
mov [rsp+48h+var_40], rdx
mov [rsp+48h+var_4], 0FFFFFFFFh
jmp short loc_2F58B
loc_2F569:
mov rdi, [rsp+48h+var_20]
mov rsi, [rsp+48h+var_28]
mov rdx, [rsp+48h+var_30]
mov rcx, [rsp+48h+var_18]
mov r8d, [rsp+48h+var_34]
call JS_GetOwnPropertyNamesInternal
mov [rsp+48h+var_4], eax
loc_2F58B:
mov eax, [rsp+48h+var_4]
add rsp, 48h
retn
|
long long JS_GetOwnPropertyNames(long long a1, long long a2, long long a3, long long a4, int a5, unsigned int a6)
{
if ( a5 == -1 )
{
return (unsigned int)JS_GetOwnPropertyNamesInternal(a1, a2, a3, a4, a6);
}
else
{
JS_ThrowTypeErrorNotAnObject(a1);
return (unsigned int)-1;
}
}
|
JS_GetOwnPropertyNames:
SUB RSP,0x48
MOV qword ptr [RSP + 0x30],RCX
MOV qword ptr [RSP + 0x38],R8
MOV qword ptr [RSP + 0x28],RDI
MOV qword ptr [RSP + 0x20],RSI
MOV qword ptr [RSP + 0x18],RDX
MOV dword ptr [RSP + 0x14],R9D
MOV RAX,qword ptr [RSP + 0x38]
CMP EAX,-0x1
JZ 0x0012f569
MOV RDI,qword ptr [RSP + 0x28]
CALL 0x0012f5a0
MOV qword ptr [RSP],RAX
MOV qword ptr [RSP + 0x8],RDX
MOV dword ptr [RSP + 0x44],0xffffffff
JMP 0x0012f58b
LAB_0012f569:
MOV RDI,qword ptr [RSP + 0x28]
MOV RSI,qword ptr [RSP + 0x20]
MOV RDX,qword ptr [RSP + 0x18]
MOV RCX,qword ptr [RSP + 0x30]
MOV R8D,dword ptr [RSP + 0x14]
CALL 0x0012f5e0
MOV dword ptr [RSP + 0x44],EAX
LAB_0012f58b:
MOV EAX,dword ptr [RSP + 0x44]
ADD RSP,0x48
RET
|
int4
JS_GetOwnPropertyNames
(int8 param_1,int8 param_2,int8 param_3,int8 param_4,int param_5,
int4 param_6)
{
int4 local_4;
if (param_5 == -1) {
local_4 = JS_GetOwnPropertyNamesInternal(param_1,param_2,param_3,param_4,param_6);
}
else {
JS_ThrowTypeErrorNotAnObject(param_1);
local_4 = 0xffffffff;
}
return local_4;
}
|
|
57,226
|
minja::Value::insert(unsigned long, minja::Value const&)
|
monkey531[P]llama/common/minja.hpp
|
void insert(size_t index, const Value& v) {
if (!array_)
throw std::runtime_error("Value is not an array: " + dump());
array_->insert(array_->begin() + index, v);
}
|
O3
|
cpp
|
minja::Value::insert(unsigned long, minja::Value const&):
pushq %rbp
pushq %r14
pushq %rbx
subq $0x40, %rsp
movq %rdi, %r14
movq 0x10(%rdi), %rdi
testq %rdi, %rdi
je 0x9369e
leaq (%rsi,%rsi,4), %rsi
shlq $0x4, %rsi
addq (%rdi), %rsi
addq $0x40, %rsp
popq %rbx
popq %r14
popq %rbp
jmp 0x94dd6
movl $0x10, %edi
callq 0x1a450
movq %rax, %rbx
movq %rsp, %rdi
movq %r14, %rsi
movl $0xffffffff, %edx # imm = 0xFFFFFFFF
xorl %ecx, %ecx
callq 0x86c10
leaq 0x5cca7(%rip), %rsi # 0xf036b
leaq 0x20(%rsp), %rdi
movq %rsp, %rdx
callq 0x793a5
movb $0x1, %bpl
leaq 0x20(%rsp), %rsi
movq %rbx, %rdi
callq 0x1ae20
xorl %ebp, %ebp
movq 0x98906(%rip), %rsi # 0x12bff0
movq 0x9886f(%rip), %rdx # 0x12bf60
movq %rbx, %rdi
callq 0x1af10
movq %rax, %r14
leaq 0x30(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x93717
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x1a8e0
leaq 0x10(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x93732
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x1a8e0
testb %bpl, %bpl
jne 0x9375c
jmp 0x93764
movq %rax, %r14
leaq 0x10(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x9375c
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x1a8e0
jmp 0x9375c
movq %rax, %r14
movq %rbx, %rdi
callq 0x1a690
movq %r14, %rdi
callq 0x1af90
|
_ZN5minja5Value6insertEmRKS0_:
push rbp
push r14
push rbx
sub rsp, 40h
mov r14, rdi
mov rdi, [rdi+10h]
test rdi, rdi
jz short loc_9369E
lea rsi, [rsi+rsi*4]
shl rsi, 4
add rsi, [rdi]
add rsp, 40h
pop rbx
pop r14
pop rbp
jmp _ZNSt6vectorIN5minja5ValueESaIS1_EE6insertEN9__gnu_cxx17__normal_iteratorIPKS1_S3_EERS6_; std::vector<minja::Value>::insert(__gnu_cxx::__normal_iterator<minja::Value const*,std::vector<minja::Value>>,minja::Value const&)
loc_9369E:
mov edi, 10h; thrown_size
call ___cxa_allocate_exception
mov rbx, rax
mov rdi, rsp
mov rsi, r14
mov edx, 0FFFFFFFFh
xor ecx, ecx
call _ZNK5minja5Value4dumpB5cxx11Eib; minja::Value::dump(int,bool)
lea rsi, aValueIsNotAnAr; "Value is not an array: "
lea rdi, [rsp+58h+var_38]
mov rdx, rsp
call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_OS8_; std::operator+<char>(char const*,std::string&&)
mov bpl, 1
lea rsi, [rsp+58h+var_38]
mov rdi, rbx
call __ZNSt13runtime_errorC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; std::runtime_error::runtime_error(std::string const&)
xor ebp, ebp
mov rsi, cs:_ZTISt13runtime_error_ptr; lptinfo
mov rdx, cs:_ZTISt19_Sp_make_shared_tag; void (*)(void *)
mov rdi, rbx; void *
call ___cxa_throw
mov r14, rax
lea rax, [rsp+58h+var_28]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_93717
mov rsi, [rsp+58h+var_28]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_93717:
lea rax, [rsp+58h+var_48]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_93732
mov rsi, [rsp+58h+var_48]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_93732:
test bpl, bpl
jnz short loc_9375C
jmp short loc_93764
mov r14, rax
lea rax, [rsp+58h+var_48]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_9375C
mov rsi, [rsp+58h+var_48]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_9375C
mov r14, rax
loc_9375C:
mov rdi, rbx; void *
call ___cxa_free_exception
loc_93764:
mov rdi, r14
call __Unwind_Resume
|
long long minja::Value::insert(minja::Value *this, long long a2, const minja::Value *a3)
{
_QWORD *v4; // rdi
void *exception; // rbx
_BYTE v7[16]; // [rsp+0h] [rbp-58h] BYREF
_BYTE v8[16]; // [rsp+20h] [rbp-38h] BYREF
v4 = (_QWORD *)*((_QWORD *)this + 2);
if ( !v4 )
{
exception = __cxa_allocate_exception(0x10uLL);
minja::Value::dump[abi:cxx11]((long long)v7, (long long)this, 0xFFFFFFFF, 0);
std::operator+<char>((long long)v8, (long long)"Value is not an array: ", (long long)v7);
std::runtime_error::runtime_error(exception, v8);
__cxa_throw(
exception,
(struct type_info *)&`typeinfo for'std::runtime_error,
(void (*)(void *))&std::runtime_error::~runtime_error);
}
return std::vector<minja::Value>::insert(v4, *v4 + 80 * a2, a3);
}
|
insert:
PUSH RBP
PUSH R14
PUSH RBX
SUB RSP,0x40
MOV R14,RDI
MOV RDI,qword ptr [RDI + 0x10]
TEST RDI,RDI
JZ 0x0019369e
LEA RSI,[RSI + RSI*0x4]
SHL RSI,0x4
ADD RSI,qword ptr [RDI]
ADD RSP,0x40
POP RBX
POP R14
POP RBP
JMP 0x00194dd6
LAB_0019369e:
MOV EDI,0x10
CALL 0x0011a450
MOV RBX,RAX
LAB_001936ab:
MOV RDI,RSP
MOV RSI,R14
MOV EDX,0xffffffff
XOR ECX,ECX
CALL 0x00186c10
LAB_001936bd:
LEA RSI,[0x1f036b]
LEA RDI,[RSP + 0x20]
MOV RDX,RSP
CALL 0x001793a5
MOV BPL,0x1
LAB_001936d4:
LEA RSI,[RSP + 0x20]
MOV RDI,RBX
CALL 0x0011ae20
XOR EBP,EBP
MOV RSI,qword ptr [0x0022bff0]
MOV RDX,qword ptr [0x0022bf60]
MOV RDI,RBX
CALL 0x0011af10
|
/* minja::Value::insert(unsigned long, minja::Value const&) */
void minja::Value::insert(ulong param_1,Value *param_2)
{
vector<minja::Value,std::allocator<minja::Value>> *pvVar1;
runtime_error *this;
int1 auStack_58 [32];
string local_38 [32];
pvVar1 = *(vector<minja::Value,std::allocator<minja::Value>> **)(param_1 + 0x10);
if (pvVar1 != (vector<minja::Value,std::allocator<minja::Value>> *)0x0) {
std::vector<minja::Value,std::allocator<minja::Value>>::insert
(pvVar1,(long)param_2 * 0x50 + *(long *)pvVar1);
return;
}
this = (runtime_error *)__cxa_allocate_exception(0x10);
/* try { // try from 001936ab to 001936bc has its CatchHandler @ 00193759 */
dump_abi_cxx11_((int)auStack_58,SUB81(param_1,0));
/* try { // try from 001936bd to 001936d0 has its CatchHandler @ 00193739 */
std::operator+((char *)local_38,(string *)"Value is not an array: ");
/* try { // try from 001936d4 to 001936f8 has its CatchHandler @ 001936f9 */
std::runtime_error::runtime_error(this,local_38);
/* WARNING: Subroutine does not return */
__cxa_throw(this,PTR_typeinfo_0022bff0,PTR__runtime_error_0022bf60);
}
|
|
57,227
|
ma_tls_start
|
eloqsql/libmariadb/libmariadb/secure/openssl.c
|
int ma_tls_start(char *errmsg __attribute__((unused)), size_t errmsg_len __attribute__((unused)))
{
int rc= 1;
char *p;
if (ma_tls_initialized)
return 0;
/* lock mutex to prevent multiple initialization */
pthread_mutex_init(&LOCK_openssl_config, NULL);
pthread_mutex_lock(&LOCK_openssl_config);
#ifdef HAVE_OPENSSL_1_1_API
if (!OPENSSL_init_ssl(OPENSSL_INIT_LOAD_CONFIG, NULL))
goto end;
#else
if (ssl_thread_init())
{
strncpy(errmsg, "Not enough memory", errmsg_len);
goto end;
}
SSL_library_init();
#if SSLEAY_VERSION_NUMBER >= 0x00907000L
OPENSSL_config(NULL);
#endif
#endif
#ifndef HAVE_OPENSSL_1_1_API
/* load errors */
SSL_load_error_strings();
/* digests and ciphers */
OpenSSL_add_all_algorithms();
#endif
disable_sigpipe();
#ifdef OPENSSL_USE_BIOMETHOD
memcpy(&ma_BIO_method, BIO_s_socket(), sizeof(BIO_METHOD));
ma_BIO_method.bread= ma_bio_read;
ma_BIO_method.bwrite= ma_bio_write;
#endif
snprintf(tls_library_version, TLS_VERSION_LENGTH - 1, "%s",
#if defined(LIBRESSL_VERSION_NUMBER) || !defined(HAVE_OPENSSL_1_1_API)
SSLeay_version(SSLEAY_VERSION));
#else
OpenSSL_version(OPENSSL_VERSION));
#endif
/* remove date from version */
if ((p= strstr(tls_library_version, " ")))
*p= 0;
rc= 0;
ma_tls_initialized= TRUE;
end:
pthread_mutex_unlock(&LOCK_openssl_config);
return rc;
}
|
O0
|
c
|
ma_tls_start:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movl $0x1, -0x1c(%rbp)
leaq 0x3b48f2(%rip), %rax # 0x445e60
cmpb $0x0, (%rax)
je 0x9157f
movl $0x0, -0x4(%rbp)
jmp 0x9161b
leaq 0x3b61ba(%rip), %rdi # 0x447740
xorl %eax, %eax
movl %eax, %esi
callq 0x3b490
leaq 0x3b61aa(%rip), %rdi # 0x447740
callq 0x3b300
movl $0x40, %edi
xorl %eax, %eax
movl %eax, %esi
callq 0x3b120
cmpl $0x0, %eax
jne 0x915b0
jmp 0x91609
xorl %edi, %edi
callq 0x3bbd0
movq %rax, %rcx
leaq 0x3b61af(%rip), %rdi # 0x447770
movl $0x3f, %esi
leaq 0x889d4(%rip), %rdx # 0x119fa1
movb $0x0, %al
callq 0x3b590
leaq 0x3b6195(%rip), %rdi # 0x447770
leaq 0x80daa(%rip), %rsi # 0x11238c
callq 0x3b540
movq %rax, -0x28(%rbp)
cmpq $0x0, %rax
je 0x915f8
movq -0x28(%rbp), %rax
movb $0x0, (%rax)
movl $0x0, -0x1c(%rbp)
leaq 0x3b485a(%rip), %rax # 0x445e60
movb $0x1, (%rax)
leaq 0x3b6130(%rip), %rdi # 0x447740
callq 0x3b2d0
movl -0x1c(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
|
ma_tls_start:
push rbp
mov rbp, rsp
sub rsp, 30h
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov [rbp+var_1C], 1
lea rax, ma_tls_initialized
cmp byte ptr [rax], 0
jz short loc_9157F
mov [rbp+var_4], 0
jmp loc_9161B
loc_9157F:
lea rdi, LOCK_openssl_config
xor eax, eax
mov esi, eax
call _pthread_mutex_init
lea rdi, LOCK_openssl_config
call _pthread_mutex_lock
mov edi, 40h ; '@'
xor eax, eax
mov esi, eax
call _OPENSSL_init_ssl
cmp eax, 0
jnz short loc_915B0
jmp short loc_91609
loc_915B0:
xor edi, edi
call _OpenSSL_version
mov rcx, rax
lea rdi, tls_library_version
mov esi, 3Fh ; '?'
lea rdx, aAtLineDPosDS+13h; "%s"
mov al, 0
call _snprintf
lea rdi, tls_library_version
lea rsi, asc_112382+0Ah; " "
call _strstr
mov [rbp+var_28], rax
cmp rax, 0
jz short loc_915F8
mov rax, [rbp+var_28]
mov byte ptr [rax], 0
loc_915F8:
mov [rbp+var_1C], 0
lea rax, ma_tls_initialized
mov byte ptr [rax], 1
loc_91609:
lea rdi, LOCK_openssl_config
call _pthread_mutex_unlock
mov eax, [rbp+var_1C]
mov [rbp+var_4], eax
loc_9161B:
mov eax, [rbp+var_4]
add rsp, 30h
pop rbp
retn
|
long long ma_tls_start()
{
const char *v0; // rax
_BYTE *v2; // [rsp+8h] [rbp-28h]
unsigned int v3; // [rsp+14h] [rbp-1Ch]
v3 = 1;
if ( ma_tls_initialized )
{
return 0;
}
else
{
pthread_mutex_init(&LOCK_openssl_config, 0LL);
pthread_mutex_lock(&LOCK_openssl_config);
if ( (unsigned int)OPENSSL_init_ssl(64LL, 0LL) )
{
v0 = (const char *)OpenSSL_version(0LL);
snprintf(&tls_library_version, 63LL, "%s", v0);
v2 = (_BYTE *)strstr(&tls_library_version, " ");
if ( v2 )
*v2 = 0;
v3 = 0;
ma_tls_initialized = 1;
}
pthread_mutex_unlock(&LOCK_openssl_config);
return v3;
}
}
|
ma_tls_start:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x30
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x18],RSI
MOV dword ptr [RBP + -0x1c],0x1
LEA RAX,[0x545e60]
CMP byte ptr [RAX],0x0
JZ 0x0019157f
MOV dword ptr [RBP + -0x4],0x0
JMP 0x0019161b
LAB_0019157f:
LEA RDI,[0x547740]
XOR EAX,EAX
MOV ESI,EAX
CALL 0x0013b490
LEA RDI,[0x547740]
CALL 0x0013b300
MOV EDI,0x40
XOR EAX,EAX
MOV ESI,EAX
CALL 0x0013b120
CMP EAX,0x0
JNZ 0x001915b0
JMP 0x00191609
LAB_001915b0:
XOR EDI,EDI
CALL 0x0013bbd0
MOV RCX,RAX
LEA RDI,[0x547770]
MOV ESI,0x3f
LEA RDX,[0x219fa1]
MOV AL,0x0
CALL 0x0013b590
LEA RDI,[0x547770]
LEA RSI,[0x21238c]
CALL 0x0013b540
MOV qword ptr [RBP + -0x28],RAX
CMP RAX,0x0
JZ 0x001915f8
MOV RAX,qword ptr [RBP + -0x28]
MOV byte ptr [RAX],0x0
LAB_001915f8:
MOV dword ptr [RBP + -0x1c],0x0
LEA RAX,[0x545e60]
MOV byte ptr [RAX],0x1
LAB_00191609:
LEA RDI,[0x547740]
CALL 0x0013b2d0
MOV EAX,dword ptr [RBP + -0x1c]
MOV dword ptr [RBP + -0x4],EAX
LAB_0019161b:
MOV EAX,dword ptr [RBP + -0x4]
ADD RSP,0x30
POP RBP
RET
|
int4 ma_tls_start(void)
{
int iVar1;
int8 uVar2;
char *pcVar3;
int4 local_24;
int4 local_c;
local_24 = 1;
if (ma_tls_initialized == '\0') {
pthread_mutex_init((pthread_mutex_t *)LOCK_openssl_config,(pthread_mutexattr_t *)0x0);
pthread_mutex_lock((pthread_mutex_t *)LOCK_openssl_config);
iVar1 = OPENSSL_init_ssl(0x40,0);
if (iVar1 != 0) {
uVar2 = OpenSSL_version(0);
snprintf(tls_library_version,0x3f,"%s",uVar2);
pcVar3 = strstr(tls_library_version,&DAT_0021238c);
if (pcVar3 != (char *)0x0) {
*pcVar3 = '\0';
}
local_24 = 0;
ma_tls_initialized = '\x01';
}
pthread_mutex_unlock((pthread_mutex_t *)LOCK_openssl_config);
local_c = local_24;
}
else {
local_c = 0;
}
return local_c;
}
|
|
57,228
|
ggml_get_first_tensor
|
ngxson[P]ggml-easy/ggml/src/ggml.c
|
struct ggml_tensor * ggml_get_first_tensor(const struct ggml_context * ctx) {
struct ggml_object * obj = ctx->objects_begin;
char * const mem_buffer = ctx->mem_buffer;
while (obj != NULL) {
if (obj->type == GGML_OBJECT_TYPE_TENSOR) {
return (struct ggml_tensor *)(mem_buffer + obj->offs);
}
obj = obj->next;
}
return NULL;
}
|
O0
|
c
|
ggml_get_first_tensor:
movq %rdi, -0x10(%rsp)
movq -0x10(%rsp), %rax
movq 0x18(%rax), %rax
movq %rax, -0x18(%rsp)
movq -0x10(%rsp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x20(%rsp)
cmpq $0x0, -0x18(%rsp)
je 0x49dc8
movq -0x18(%rsp), %rax
cmpl $0x0, 0x18(%rax)
jne 0x49db8
movq -0x20(%rsp), %rax
movq -0x18(%rsp), %rcx
addq (%rcx), %rax
movq %rax, -0x8(%rsp)
jmp 0x49dd1
movq -0x18(%rsp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x18(%rsp)
jmp 0x49d91
movq $0x0, -0x8(%rsp)
movq -0x8(%rsp), %rax
retq
nopw (%rax,%rax)
|
ggml_get_first_tensor:
mov [rsp+var_10], rdi
mov rax, [rsp+var_10]
mov rax, [rax+18h]
mov [rsp+var_18], rax
mov rax, [rsp+var_10]
mov rax, [rax+8]
mov [rsp+var_20], rax
loc_49D91:
cmp [rsp+var_18], 0
jz short loc_49DC8
mov rax, [rsp+var_18]
cmp dword ptr [rax+18h], 0
jnz short loc_49DB8
mov rax, [rsp+var_20]
mov rcx, [rsp+var_18]
add rax, [rcx]
mov [rsp+var_8], rax
jmp short loc_49DD1
loc_49DB8:
mov rax, [rsp+var_18]
mov rax, [rax+10h]
mov [rsp+var_18], rax
jmp short loc_49D91
loc_49DC8:
mov [rsp+var_8], 0
loc_49DD1:
mov rax, [rsp+var_8]
retn
|
long long ggml_get_first_tensor(long long a1)
{
long long i; // [rsp+8h] [rbp-18h]
for ( i = *(_QWORD *)(a1 + 24); i; i = *(_QWORD *)(i + 16) )
{
if ( !*(_DWORD *)(i + 24) )
return *(_QWORD *)i + *(_QWORD *)(a1 + 8);
}
return 0LL;
}
|
ggml_get_first_tensor:
MOV qword ptr [RSP + -0x10],RDI
MOV RAX,qword ptr [RSP + -0x10]
MOV RAX,qword ptr [RAX + 0x18]
MOV qword ptr [RSP + -0x18],RAX
MOV RAX,qword ptr [RSP + -0x10]
MOV RAX,qword ptr [RAX + 0x8]
MOV qword ptr [RSP + -0x20],RAX
LAB_00149d91:
CMP qword ptr [RSP + -0x18],0x0
JZ 0x00149dc8
MOV RAX,qword ptr [RSP + -0x18]
CMP dword ptr [RAX + 0x18],0x0
JNZ 0x00149db8
MOV RAX,qword ptr [RSP + -0x20]
MOV RCX,qword ptr [RSP + -0x18]
ADD RAX,qword ptr [RCX]
MOV qword ptr [RSP + -0x8],RAX
JMP 0x00149dd1
LAB_00149db8:
MOV RAX,qword ptr [RSP + -0x18]
MOV RAX,qword ptr [RAX + 0x10]
MOV qword ptr [RSP + -0x18],RAX
JMP 0x00149d91
LAB_00149dc8:
MOV qword ptr [RSP + -0x8],0x0
LAB_00149dd1:
MOV RAX,qword ptr [RSP + -0x8]
RET
|
long ggml_get_first_tensor(long param_1)
{
long *local_18;
local_18 = *(long **)(param_1 + 0x18);
while( true ) {
if (local_18 == (long *)0x0) {
return 0;
}
if ((int)local_18[3] == 0) break;
local_18 = (long *)local_18[2];
}
return *(long *)(param_1 + 8) + *local_18;
}
|
|
57,229
|
stbi__get16le(stbi__context*)
|
monkey531[P]llama/examples/llava/../../common/stb_image.h
|
static int stbi__get16le(stbi__context *s)
{
int z = stbi__get8(s);
return z + (stbi__get8(s) << 8);
}
|
O1
|
c
|
stbi__get16le(stbi__context*):
pushq %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0xc0(%rdi), %rax
cmpq 0xc8(%rdi), %rax
jb 0x3f036
cmpl $0x0, 0x30(%rbx)
je 0x3f083
movq %rbx, %rdi
callq 0x3c9f9
movq 0xc0(%rbx), %rax
leaq 0x1(%rax), %rcx
movq %rcx, 0xc0(%rbx)
movzbl (%rax), %ebp
movq 0xc0(%rbx), %rax
cmpq 0xc8(%rbx), %rax
jb 0x3f069
cmpl $0x0, 0x30(%rbx)
je 0x3f087
movq %rbx, %rdi
callq 0x3c9f9
movq 0xc0(%rbx), %rax
leaq 0x1(%rax), %rcx
movq %rcx, 0xc0(%rbx)
movzbl (%rax), %eax
shll $0x8, %eax
orl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
xorl %ebp, %ebp
jmp 0x3f044
xorl %eax, %eax
jmp 0x3f07a
|
_ZL13stbi__get16leP13stbi__context:
push rbp
push rbx
push rax
mov rbx, rdi
mov rax, [rdi+0C0h]
cmp rax, [rdi+0C8h]
jb short loc_3F036
cmp dword ptr [rbx+30h], 0
jz short loc_3F083
mov rdi, rbx
call _ZL19stbi__refill_bufferP13stbi__context; stbi__refill_buffer(stbi__context *)
mov rax, [rbx+0C0h]
loc_3F036:
lea rcx, [rax+1]
mov [rbx+0C0h], rcx
movzx ebp, byte ptr [rax]
loc_3F044:
mov rax, [rbx+0C0h]
cmp rax, [rbx+0C8h]
jb short loc_3F069
cmp dword ptr [rbx+30h], 0
jz short loc_3F087
mov rdi, rbx
call _ZL19stbi__refill_bufferP13stbi__context; stbi__refill_buffer(stbi__context *)
mov rax, [rbx+0C0h]
loc_3F069:
lea rcx, [rax+1]
mov [rbx+0C0h], rcx
movzx eax, byte ptr [rax]
shl eax, 8
loc_3F07A:
or eax, ebp
add rsp, 8
pop rbx
pop rbp
retn
loc_3F083:
xor ebp, ebp
jmp short loc_3F044
loc_3F087:
xor eax, eax
jmp short loc_3F07A
|
long long stbi__get16le(long long a1)
{
unsigned __int8 *v1; // rax
int v2; // ebp
unsigned __int8 *v3; // rax
int v4; // eax
v1 = *(unsigned __int8 **)(a1 + 192);
if ( (unsigned long long)v1 < *(_QWORD *)(a1 + 200) )
goto LABEL_4;
if ( *(_DWORD *)(a1 + 48) )
{
stbi__refill_buffer(a1);
v1 = *(unsigned __int8 **)(a1 + 192);
LABEL_4:
*(_QWORD *)(a1 + 192) = v1 + 1;
v2 = *v1;
goto LABEL_5;
}
v2 = 0;
LABEL_5:
v3 = *(unsigned __int8 **)(a1 + 192);
if ( (unsigned long long)v3 >= *(_QWORD *)(a1 + 200) )
{
if ( !*(_DWORD *)(a1 + 48) )
{
v4 = 0;
return v2 | (unsigned int)v4;
}
stbi__refill_buffer(a1);
v3 = *(unsigned __int8 **)(a1 + 192);
}
*(_QWORD *)(a1 + 192) = v3 + 1;
v4 = *v3 << 8;
return v2 | (unsigned int)v4;
}
|
stbi__get16le:
PUSH RBP
PUSH RBX
PUSH RAX
MOV RBX,RDI
MOV RAX,qword ptr [RDI + 0xc0]
CMP RAX,qword ptr [RDI + 0xc8]
JC 0x0013f036
CMP dword ptr [RBX + 0x30],0x0
JZ 0x0013f083
MOV RDI,RBX
CALL 0x0013c9f9
MOV RAX,qword ptr [RBX + 0xc0]
LAB_0013f036:
LEA RCX,[RAX + 0x1]
MOV qword ptr [RBX + 0xc0],RCX
MOVZX EBP,byte ptr [RAX]
LAB_0013f044:
MOV RAX,qword ptr [RBX + 0xc0]
CMP RAX,qword ptr [RBX + 0xc8]
JC 0x0013f069
CMP dword ptr [RBX + 0x30],0x0
JZ 0x0013f087
MOV RDI,RBX
CALL 0x0013c9f9
MOV RAX,qword ptr [RBX + 0xc0]
LAB_0013f069:
LEA RCX,[RAX + 0x1]
MOV qword ptr [RBX + 0xc0],RCX
MOVZX EAX,byte ptr [RAX]
SHL EAX,0x8
LAB_0013f07a:
OR EAX,EBP
ADD RSP,0x8
POP RBX
POP RBP
RET
LAB_0013f083:
XOR EBP,EBP
JMP 0x0013f044
LAB_0013f087:
XOR EAX,EAX
JMP 0x0013f07a
|
/* stbi__get16le(stbi__context*) */
uint stbi__get16le(stbi__context *param_1)
{
uint uVar1;
byte *pbVar2;
uint uVar3;
pbVar2 = *(byte **)(param_1 + 0xc0);
if (pbVar2 < *(byte **)(param_1 + 200)) {
LAB_0013f036:
*(byte **)(param_1 + 0xc0) = pbVar2 + 1;
uVar3 = (uint)*pbVar2;
}
else {
if (*(int *)(param_1 + 0x30) != 0) {
stbi__refill_buffer(param_1);
pbVar2 = *(byte **)(param_1 + 0xc0);
goto LAB_0013f036;
}
uVar3 = 0;
}
pbVar2 = *(byte **)(param_1 + 0xc0);
if (*(byte **)(param_1 + 200) <= pbVar2) {
if (*(int *)(param_1 + 0x30) == 0) {
uVar1 = 0;
goto LAB_0013f07a;
}
stbi__refill_buffer(param_1);
pbVar2 = *(byte **)(param_1 + 0xc0);
}
*(byte **)(param_1 + 0xc0) = pbVar2 + 1;
uVar1 = (uint)*pbVar2 << 8;
LAB_0013f07a:
return uVar1 | uVar3;
}
|
|
57,230
|
my_mb_wc_utf8mb4_quick
|
eloqsql/strings/ctype-utf8.h
|
static inline int
my_mb_wc_utf8mb4_quick(my_wc_t *pwc, const uchar *s, const uchar *e)
{
uchar c;
if (s >= e)
return MY_CS_TOOSMALL;
c= s[0];
if (c < 0x80)
{
*pwc= c;
return 1;
}
else if (c < 0xc2)
return MY_CS_ILSEQ;
else if (c < 0xe0)
{
if (s + 2 > e) /* We need 2 characters */
return MY_CS_TOOSMALL2;
if (!(IS_CONTINUATION_BYTE(s[1])))
return MY_CS_ILSEQ;
*pwc= UTF8MB2_CODE(c, s[1]);
return 2;
}
else if (c < 0xf0)
{
if (s + 3 > e) /* We need 3 characters */
return MY_CS_TOOSMALL3;
if (!IS_UTF8MB3_STEP2(c, s[1], s[2]))
return MY_CS_ILSEQ;
*pwc= UTF8MB3_CODE(c, s[1], s[2]);
return 3;
}
else if (c < 0xf5)
{
if (s + 4 > e) /* We need 4 characters */
return MY_CS_TOOSMALL4;
if (!IS_UTF8MB4_STEP2(c, s[1], s[2], s[3]))
return MY_CS_ILSEQ;
*pwc= UTF8MB4_CODE(c, s[1], s[2], s[3]);
return 4;
}
return MY_CS_ILSEQ;
}
|
O0
|
c
|
my_mb_wc_utf8mb4_quick:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq -0x18(%rbp), %rax
cmpq -0x20(%rbp), %rax
jb 0x1416b6
movl $0xffffff9b, -0x4(%rbp) # imm = 0xFFFFFF9B
jmp 0x141933
movq -0x18(%rbp), %rax
movb (%rax), %al
movb %al, -0x21(%rbp)
movzbl -0x21(%rbp), %eax
cmpl $0x80, %eax
jge 0x1416e3
movzbl -0x21(%rbp), %eax
movl %eax, %ecx
movq -0x10(%rbp), %rax
movq %rcx, (%rax)
movl $0x1, -0x4(%rbp)
jmp 0x141933
movzbl -0x21(%rbp), %eax
cmpl $0xc2, %eax
jge 0x1416fa
movl $0x0, -0x4(%rbp)
jmp 0x141933
movzbl -0x21(%rbp), %eax
cmpl $0xe0, %eax
jge 0x141770
movq -0x18(%rbp), %rax
addq $0x2, %rax
cmpq -0x20(%rbp), %rax
jbe 0x14171f
movl $0xffffff9a, -0x4(%rbp) # imm = 0xFFFFFF9A
jmp 0x141933
movq -0x18(%rbp), %rax
movzbl 0x1(%rax), %eax
xorl $0x80, %eax
cmpl $0x40, %eax
jl 0x14173d
movl $0x0, -0x4(%rbp)
jmp 0x141933
movzbl -0x21(%rbp), %eax
andl $0x1f, %eax
movslq %eax, %rcx
shlq $0x6, %rcx
movq -0x18(%rbp), %rax
movzbl 0x1(%rax), %eax
xorl $0x80, %eax
cltq
orq %rax, %rcx
movq -0x10(%rbp), %rax
movq %rcx, (%rax)
movl $0x2, -0x4(%rbp)
jmp 0x141933
movzbl -0x21(%rbp), %eax
cmpl $0xf0, %eax
jge 0x14182c
movq -0x18(%rbp), %rax
addq $0x3, %rax
cmpq -0x20(%rbp), %rax
jbe 0x141799
movl $0xffffff99, -0x4(%rbp) # imm = 0xFFFFFF99
jmp 0x141933
movq -0x18(%rbp), %rax
movzbl 0x1(%rax), %eax
xorl $0x80, %eax
cmpl $0x40, %eax
jge 0x1417d7
movq -0x18(%rbp), %rax
movzbl 0x2(%rax), %eax
xorl $0x80, %eax
cmpl $0x40, %eax
jge 0x1417d7
movzbl -0x21(%rbp), %eax
cmpl $0xe1, %eax
jge 0x1417e3
movq -0x18(%rbp), %rax
movzbl 0x1(%rax), %eax
cmpl $0xa0, %eax
jge 0x1417e3
movl $0x0, -0x4(%rbp)
jmp 0x141933
movzbl -0x21(%rbp), %eax
andl $0xf, %eax
movslq %eax, %rcx
shlq $0xc, %rcx
movq -0x18(%rbp), %rax
movzbl 0x1(%rax), %eax
xorl $0x80, %eax
cltq
shlq $0x6, %rax
orq %rax, %rcx
movq -0x18(%rbp), %rax
movzbl 0x2(%rax), %eax
xorl $0x80, %eax
cltq
orq %rax, %rcx
movq -0x10(%rbp), %rax
movq %rcx, (%rax)
movl $0x3, -0x4(%rbp)
jmp 0x141933
movzbl -0x21(%rbp), %eax
cmpl $0xf5, %eax
jge 0x141924
movq -0x18(%rbp), %rax
addq $0x4, %rax
cmpq -0x20(%rbp), %rax
jbe 0x141855
movl $0xffffff98, -0x4(%rbp) # imm = 0xFFFFFF98
jmp 0x141933
movq -0x18(%rbp), %rax
movzbl 0x1(%rax), %eax
xorl $0x80, %eax
cmpl $0x40, %eax
jge 0x1418bf
movq -0x18(%rbp), %rax
movzbl 0x2(%rax), %eax
xorl $0x80, %eax
cmpl $0x40, %eax
jge 0x1418bf
movq -0x18(%rbp), %rax
movzbl 0x3(%rax), %eax
xorl $0x80, %eax
cmpl $0x40, %eax
jge 0x1418bf
movzbl -0x21(%rbp), %eax
cmpl $0xf1, %eax
jge 0x1418a5
movq -0x18(%rbp), %rax
movzbl 0x1(%rax), %eax
cmpl $0x90, %eax
jl 0x1418bf
movzbl -0x21(%rbp), %eax
cmpl $0xf3, %eax
jle 0x1418c8
movq -0x18(%rbp), %rax
movzbl 0x1(%rax), %eax
cmpl $0x8f, %eax
jle 0x1418c8
movl $0x0, -0x4(%rbp)
jmp 0x141933
movzbl -0x21(%rbp), %eax
andl $0x7, %eax
movslq %eax, %rcx
shlq $0x12, %rcx
movq -0x18(%rbp), %rax
movzbl 0x1(%rax), %eax
xorl $0x80, %eax
cltq
shlq $0xc, %rax
orq %rax, %rcx
movq -0x18(%rbp), %rax
movzbl 0x2(%rax), %eax
xorl $0x80, %eax
cltq
shlq $0x6, %rax
orq %rax, %rcx
movq -0x18(%rbp), %rax
movzbl 0x3(%rax), %eax
xorl $0x80, %eax
cltq
orq %rax, %rcx
movq -0x10(%rbp), %rax
movq %rcx, (%rax)
movl $0x4, -0x4(%rbp)
jmp 0x141933
jmp 0x141926
jmp 0x141928
jmp 0x14192a
jmp 0x14192c
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
popq %rbp
retq
nopl (%rax,%rax)
|
my_mb_wc_utf8mb4_quick_0:
push rbp
mov rbp, rsp
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov [rbp+var_20], rdx
mov rax, [rbp+var_18]
cmp rax, [rbp+var_20]
jb short loc_1416B6
mov [rbp+var_4], 0FFFFFF9Bh
jmp loc_141933
loc_1416B6:
mov rax, [rbp+var_18]
mov al, [rax]
mov [rbp+var_21], al
movzx eax, [rbp+var_21]
cmp eax, 80h
jge short loc_1416E3
movzx eax, [rbp+var_21]
mov ecx, eax
mov rax, [rbp+var_10]
mov [rax], rcx
mov [rbp+var_4], 1
jmp loc_141933
loc_1416E3:
movzx eax, [rbp+var_21]
cmp eax, 0C2h
jge short loc_1416FA
mov [rbp+var_4], 0
jmp loc_141933
loc_1416FA:
movzx eax, [rbp+var_21]
cmp eax, 0E0h
jge short loc_141770
mov rax, [rbp+var_18]
add rax, 2
cmp rax, [rbp+var_20]
jbe short loc_14171F
mov [rbp+var_4], 0FFFFFF9Ah
jmp loc_141933
loc_14171F:
mov rax, [rbp+var_18]
movzx eax, byte ptr [rax+1]
xor eax, 80h
cmp eax, 40h ; '@'
jl short loc_14173D
mov [rbp+var_4], 0
jmp loc_141933
loc_14173D:
movzx eax, [rbp+var_21]
and eax, 1Fh
movsxd rcx, eax
shl rcx, 6
mov rax, [rbp+var_18]
movzx eax, byte ptr [rax+1]
xor eax, 80h
cdqe
or rcx, rax
mov rax, [rbp+var_10]
mov [rax], rcx
mov [rbp+var_4], 2
jmp loc_141933
loc_141770:
movzx eax, [rbp+var_21]
cmp eax, 0F0h
jge loc_14182C
mov rax, [rbp+var_18]
add rax, 3
cmp rax, [rbp+var_20]
jbe short loc_141799
mov [rbp+var_4], 0FFFFFF99h
jmp loc_141933
loc_141799:
mov rax, [rbp+var_18]
movzx eax, byte ptr [rax+1]
xor eax, 80h
cmp eax, 40h ; '@'
jge short loc_1417D7
mov rax, [rbp+var_18]
movzx eax, byte ptr [rax+2]
xor eax, 80h
cmp eax, 40h ; '@'
jge short loc_1417D7
movzx eax, [rbp+var_21]
cmp eax, 0E1h
jge short loc_1417E3
mov rax, [rbp+var_18]
movzx eax, byte ptr [rax+1]
cmp eax, 0A0h
jge short loc_1417E3
loc_1417D7:
mov [rbp+var_4], 0
jmp loc_141933
loc_1417E3:
movzx eax, [rbp+var_21]
and eax, 0Fh
movsxd rcx, eax
shl rcx, 0Ch
mov rax, [rbp+var_18]
movzx eax, byte ptr [rax+1]
xor eax, 80h
cdqe
shl rax, 6
or rcx, rax
mov rax, [rbp+var_18]
movzx eax, byte ptr [rax+2]
xor eax, 80h
cdqe
or rcx, rax
mov rax, [rbp+var_10]
mov [rax], rcx
mov [rbp+var_4], 3
jmp loc_141933
loc_14182C:
movzx eax, [rbp+var_21]
cmp eax, 0F5h
jge loc_141924
mov rax, [rbp+var_18]
add rax, 4
cmp rax, [rbp+var_20]
jbe short loc_141855
mov [rbp+var_4], 0FFFFFF98h
jmp loc_141933
loc_141855:
mov rax, [rbp+var_18]
movzx eax, byte ptr [rax+1]
xor eax, 80h
cmp eax, 40h ; '@'
jge short loc_1418BF
mov rax, [rbp+var_18]
movzx eax, byte ptr [rax+2]
xor eax, 80h
cmp eax, 40h ; '@'
jge short loc_1418BF
mov rax, [rbp+var_18]
movzx eax, byte ptr [rax+3]
xor eax, 80h
cmp eax, 40h ; '@'
jge short loc_1418BF
movzx eax, [rbp+var_21]
cmp eax, 0F1h
jge short loc_1418A5
mov rax, [rbp+var_18]
movzx eax, byte ptr [rax+1]
cmp eax, 90h
jl short loc_1418BF
loc_1418A5:
movzx eax, [rbp+var_21]
cmp eax, 0F3h
jle short loc_1418C8
mov rax, [rbp+var_18]
movzx eax, byte ptr [rax+1]
cmp eax, 8Fh
jle short loc_1418C8
loc_1418BF:
mov [rbp+var_4], 0
jmp short loc_141933
loc_1418C8:
movzx eax, [rbp+var_21]
and eax, 7
movsxd rcx, eax
shl rcx, 12h
mov rax, [rbp+var_18]
movzx eax, byte ptr [rax+1]
xor eax, 80h
cdqe
shl rax, 0Ch
or rcx, rax
mov rax, [rbp+var_18]
movzx eax, byte ptr [rax+2]
xor eax, 80h
cdqe
shl rax, 6
or rcx, rax
mov rax, [rbp+var_18]
movzx eax, byte ptr [rax+3]
xor eax, 80h
cdqe
or rcx, rax
mov rax, [rbp+var_10]
mov [rax], rcx
mov [rbp+var_4], 4
jmp short loc_141933
loc_141924:
jmp short $+2
loc_141926:
jmp short $+2
loc_141928:
jmp short $+2
loc_14192A:
jmp short $+2
loc_14192C:
mov [rbp+var_4], 0
loc_141933:
mov eax, [rbp+var_4]
pop rbp
retn
|
long long my_mb_wc_utf8mb4_quick_0(unsigned long long *a1, unsigned __int8 *a2, unsigned long long a3)
{
unsigned __int8 v4; // [rsp+1h] [rbp-21h]
if ( (unsigned long long)a2 < a3 )
{
v4 = *a2;
if ( *a2 >= 0x80u )
{
if ( v4 >= 0xC2u )
{
if ( v4 >= 0xE0u )
{
if ( v4 >= 0xF0u )
{
if ( v4 >= 0xF5u )
{
return 0;
}
else if ( (unsigned long long)(a2 + 4) <= a3 )
{
if ( (a2[1] ^ 0x80) < 64
&& (a2[2] ^ 0x80) < 64
&& (a2[3] ^ 0x80) < 64
&& (v4 >= 0xF1u || a2[1] >= 0x90u)
&& (v4 <= 0xF3u || a2[1] <= 0x8Fu) )
{
*a1 = a2[3] ^ 0x80u | ((long long)(a2[2] ^ 0x80u) << 6) | ((long long)(a2[1] ^ 0x80u) << 12) | ((unsigned long long)(v4 & 7) << 18);
return 4;
}
else
{
return 0;
}
}
else
{
return (unsigned int)-104;
}
}
else if ( (unsigned long long)(a2 + 3) <= a3 )
{
if ( (a2[1] ^ 0x80) < 64 && (a2[2] ^ 0x80) < 64 && (v4 >= 0xE1u || a2[1] >= 0xA0u) )
{
*a1 = a2[2] ^ 0x80u | ((long long)(a2[1] ^ 0x80u) << 6) | ((unsigned long long)(v4 & 0xF) << 12);
return 3;
}
else
{
return 0;
}
}
else
{
return (unsigned int)-103;
}
}
else if ( (unsigned long long)(a2 + 2) <= a3 )
{
if ( (a2[1] ^ 0x80) < 64 )
{
*a1 = a2[1] ^ 0x80u | ((unsigned long long)(v4 & 0x1F) << 6);
return 2;
}
else
{
return 0;
}
}
else
{
return (unsigned int)-102;
}
}
else
{
return 0;
}
}
else
{
*a1 = v4;
return 1;
}
}
else
{
return (unsigned int)-101;
}
}
| |||
57,231
|
my_mb_wc_utf8mb4_quick
|
eloqsql/strings/ctype-utf8.h
|
static inline int
my_mb_wc_utf8mb4_quick(my_wc_t *pwc, const uchar *s, const uchar *e)
{
uchar c;
if (s >= e)
return MY_CS_TOOSMALL;
c= s[0];
if (c < 0x80)
{
*pwc= c;
return 1;
}
else if (c < 0xc2)
return MY_CS_ILSEQ;
else if (c < 0xe0)
{
if (s + 2 > e) /* We need 2 characters */
return MY_CS_TOOSMALL2;
if (!(IS_CONTINUATION_BYTE(s[1])))
return MY_CS_ILSEQ;
*pwc= UTF8MB2_CODE(c, s[1]);
return 2;
}
else if (c < 0xf0)
{
if (s + 3 > e) /* We need 3 characters */
return MY_CS_TOOSMALL3;
if (!IS_UTF8MB3_STEP2(c, s[1], s[2]))
return MY_CS_ILSEQ;
*pwc= UTF8MB3_CODE(c, s[1], s[2]);
return 3;
}
else if (c < 0xf5)
{
if (s + 4 > e) /* We need 4 characters */
return MY_CS_TOOSMALL4;
if (!IS_UTF8MB4_STEP2(c, s[1], s[2], s[3]))
return MY_CS_ILSEQ;
*pwc= UTF8MB4_CODE(c, s[1], s[2], s[3]);
return 4;
}
return MY_CS_ILSEQ;
}
|
O3
|
c
|
my_mb_wc_utf8mb4_quick:
pushq %rbp
movq %rsp, %rbp
movl $0xffffff9b, %eax # imm = 0xFFFFFF9B
cmpq %rdx, %rsi
jae 0xd0770
movzbl (%rsi), %ecx
testb %cl, %cl
js 0xd0769
movl $0x1, %eax
movq %rcx, (%rdi)
jmp 0xd0770
cmpb $-0x3e, %cl
jae 0xd0772
xorl %eax, %eax
popq %rbp
retq
cmpb $-0x21, %cl
ja 0xd07a8
leaq 0x2(%rsi), %r8
movl $0xffffff9a, %eax # imm = 0xFFFFFF9A
cmpq %rdx, %r8
ja 0xd0770
movzbl 0x1(%rsi), %edx
xorl $0x80, %edx
movl $0x0, %eax
cmpb $0x3f, %dl
ja 0xd0770
andl $0x1f, %ecx
shll $0x6, %ecx
orl %edx, %ecx
movl $0x2, %eax
jmp 0xd0764
cmpb $-0x11, %cl
ja 0xd080a
leaq 0x3(%rsi), %r8
movl $0xffffff99, %eax # imm = 0xFFFFFF99
cmpq %rdx, %r8
ja 0xd0770
movzbl 0x1(%rsi), %edx
cmpb $-0x41, %dl
jg 0xd076e
movzbl 0x2(%rsi), %esi
cmpb $-0x41, %sil
jg 0xd076e
cmpl $0xe0, %ecx
sete %r8b
cmpb $-0x60, %dl
setb %r9b
movl $0x0, %eax
testb %r9b, %r8b
jne 0xd0770
shll $0xc, %ecx
movzwl %cx, %eax
andl $0x3f, %edx
shll $0x6, %edx
orl %eax, %edx
andl $0x3f, %esi
orq %rdx, %rsi
movl $0x3, %eax
movq %rsi, %rcx
jmp 0xd0764
cmpb $-0xc, %cl
ja 0xd076e
leaq 0x4(%rsi), %r8
movl $0xffffff98, %eax # imm = 0xFFFFFF98
cmpq %rdx, %r8
ja 0xd0770
movzbl 0x1(%rsi), %r8d
cmpb $-0x41, %r8b
jg 0xd076e
movzbl 0x2(%rsi), %edx
cmpb $-0x41, %dl
jg 0xd076e
movzbl 0x3(%rsi), %esi
cmpb $-0x41, %sil
jg 0xd076e
cmpl $0xf0, %ecx
sete %al
cmpb $-0x70, %r8b
setb %r9b
testb %r9b, %al
jne 0xd076e
cmpl $0xf4, %ecx
sete %r9b
cmpb $-0x70, %r8b
setae %r10b
movl $0x0, %eax
testb %r10b, %r9b
jne 0xd0770
andl $0x7, %ecx
shll $0x12, %ecx
andl $0x3f, %r8d
shll $0xc, %r8d
orl %ecx, %r8d
andl $0x3f, %edx
shll $0x6, %edx
orl %r8d, %edx
andl $0x3f, %esi
orq %rdx, %rsi
movl $0x4, %eax
jmp 0xd0802
|
my_mb_wc_utf8mb4_quick_0:
push rbp
mov rbp, rsp
mov eax, 0FFFFFF9Bh
cmp rsi, rdx
jnb short loc_D0770
movzx ecx, byte ptr [rsi]
test cl, cl
js short loc_D0769
mov eax, 1
loc_D0764:
mov [rdi], rcx
jmp short loc_D0770
loc_D0769:
cmp cl, 0C2h
jnb short loc_D0772
loc_D076E:
xor eax, eax
loc_D0770:
pop rbp
retn
loc_D0772:
cmp cl, 0DFh
ja short loc_D07A8
lea r8, [rsi+2]
mov eax, 0FFFFFF9Ah
cmp r8, rdx
ja short loc_D0770
movzx edx, byte ptr [rsi+1]
xor edx, 80h
mov eax, 0
cmp dl, 3Fh ; '?'
ja short loc_D0770
and ecx, 1Fh
shl ecx, 6
or ecx, edx
mov eax, 2
jmp short loc_D0764
loc_D07A8:
cmp cl, 0EFh
ja short loc_D080A
lea r8, [rsi+3]
mov eax, 0FFFFFF99h
cmp r8, rdx
ja short loc_D0770
movzx edx, byte ptr [rsi+1]
cmp dl, 0BFh
jg short loc_D076E
movzx esi, byte ptr [rsi+2]
cmp sil, 0BFh
jg short loc_D076E
cmp ecx, 0E0h
setz r8b
cmp dl, 0A0h
setb r9b
mov eax, 0
test r8b, r9b
jnz short loc_D0770
shl ecx, 0Ch
movzx eax, cx
and edx, 3Fh
shl edx, 6
or edx, eax
and esi, 3Fh
or rsi, rdx
mov eax, 3
loc_D0802:
mov rcx, rsi
jmp loc_D0764
loc_D080A:
cmp cl, 0F4h
ja loc_D076E
lea r8, [rsi+4]
mov eax, 0FFFFFF98h
cmp r8, rdx
ja loc_D0770
movzx r8d, byte ptr [rsi+1]
cmp r8b, 0BFh
jg loc_D076E
movzx edx, byte ptr [rsi+2]
cmp dl, 0BFh
jg loc_D076E
movzx esi, byte ptr [rsi+3]
cmp sil, 0BFh
jg loc_D076E
cmp ecx, 0F0h
setz al
cmp r8b, 90h
setb r9b
test al, r9b
jnz loc_D076E
cmp ecx, 0F4h
setz r9b
cmp r8b, 90h
setnb r10b
mov eax, 0
test r9b, r10b
jnz loc_D0770
and ecx, 7
shl ecx, 12h
and r8d, 3Fh
shl r8d, 0Ch
or r8d, ecx
and edx, 3Fh
shl edx, 6
or edx, r8d
and esi, 3Fh
or rsi, rdx
mov eax, 4
jmp loc_D0802
|
long long my_mb_wc_utf8mb4_quick_0(unsigned long long *a1, unsigned __int8 *a2, unsigned long long a3)
{
long long result; // rax
unsigned long long v4; // rcx
char v5; // dl
char v6; // si
unsigned long long v7; // rsi
char v8; // r8
char v9; // dl
char v10; // si
result = 4294967195LL;
if ( (unsigned long long)a2 >= a3 )
return result;
v4 = *a2;
if ( (v4 & 0x80u) == 0LL )
{
result = 1LL;
LABEL_4:
*a1 = v4;
return result;
}
if ( (unsigned __int8)v4 < 0xC2u )
return 0LL;
if ( (unsigned __int8)v4 > 0xDFu )
{
if ( (unsigned __int8)v4 > 0xEFu )
{
if ( (unsigned __int8)v4 <= 0xF4u )
{
result = 4294967192LL;
if ( (unsigned long long)(a2 + 4) > a3 )
return result;
v8 = a2[1];
if ( v8 <= -65 )
{
v9 = a2[2];
if ( v9 <= -65 )
{
v10 = a2[3];
if ( v10 <= -65 && ((unsigned __int8)v8 >= 0x90u || (_DWORD)v4 != 240) )
{
result = 0LL;
if ( (unsigned __int8)v8 >= 0x90u && (_DWORD)v4 == 244 )
return result;
v7 = ((v4 & 7) << 18) | ((unsigned __int8)(v8 & 0x3F) << 12) | ((unsigned __int8)(v9 & 0x3F) << 6) | v10 & 0x3F;
result = 4LL;
LABEL_18:
v4 = v7;
goto LABEL_4;
}
}
}
}
}
else
{
result = 4294967193LL;
if ( (unsigned long long)(a2 + 3) > a3 )
return result;
v5 = a2[1];
if ( v5 <= -65 )
{
v6 = a2[2];
if ( v6 <= -65 )
{
result = 0LL;
if ( (unsigned __int8)v5 < 0xA0u && (_DWORD)v4 == 224 )
return result;
v7 = (unsigned __int16)((_WORD)v4 << 12) | ((unsigned __int8)(v5 & 0x3F) << 6) | (unsigned long long)(v6 & 0x3F);
result = 3LL;
goto LABEL_18;
}
}
}
return 0LL;
}
result = 4294967194LL;
if ( (unsigned long long)(a2 + 2) <= a3 )
{
result = 0LL;
if ( (a2[1] ^ 0x80u) <= 0x3F )
{
v4 = a2[1] ^ 0x80 | ((unsigned __int8)(v4 & 0x1F) << 6);
result = 2LL;
goto LABEL_4;
}
}
return result;
}
|
my_mb_wc_utf8mb4_quick:
PUSH RBP
MOV RBP,RSP
MOV EAX,0xffffff9b
CMP RSI,RDX
JNC 0x001d0770
MOVZX ECX,byte ptr [RSI]
TEST CL,CL
JS 0x001d0769
MOV EAX,0x1
LAB_001d0764:
MOV qword ptr [RDI],RCX
JMP 0x001d0770
LAB_001d0769:
CMP CL,0xc2
JNC 0x001d0772
LAB_001d076e:
XOR EAX,EAX
LAB_001d0770:
POP RBP
RET
LAB_001d0772:
CMP CL,0xdf
JA 0x001d07a8
LEA R8,[RSI + 0x2]
MOV EAX,0xffffff9a
CMP R8,RDX
JA 0x001d0770
MOVZX EDX,byte ptr [RSI + 0x1]
XOR EDX,0x80
MOV EAX,0x0
CMP DL,0x3f
JA 0x001d0770
AND ECX,0x1f
SHL ECX,0x6
OR ECX,EDX
MOV EAX,0x2
JMP 0x001d0764
LAB_001d07a8:
CMP CL,0xef
JA 0x001d080a
LEA R8,[RSI + 0x3]
MOV EAX,0xffffff99
CMP R8,RDX
JA 0x001d0770
MOVZX EDX,byte ptr [RSI + 0x1]
CMP DL,0xbf
JG 0x001d076e
MOVZX ESI,byte ptr [RSI + 0x2]
CMP SIL,0xbf
JG 0x001d076e
CMP ECX,0xe0
SETZ R8B
CMP DL,0xa0
SETC R9B
MOV EAX,0x0
TEST R8B,R9B
JNZ 0x001d0770
SHL ECX,0xc
MOVZX EAX,CX
AND EDX,0x3f
SHL EDX,0x6
OR EDX,EAX
AND ESI,0x3f
OR RSI,RDX
MOV EAX,0x3
LAB_001d0802:
MOV RCX,RSI
JMP 0x001d0764
LAB_001d080a:
CMP CL,0xf4
JA 0x001d076e
LEA R8,[RSI + 0x4]
MOV EAX,0xffffff98
CMP R8,RDX
JA 0x001d0770
MOVZX R8D,byte ptr [RSI + 0x1]
CMP R8B,0xbf
JG 0x001d076e
MOVZX EDX,byte ptr [RSI + 0x2]
CMP DL,0xbf
JG 0x001d076e
MOVZX ESI,byte ptr [RSI + 0x3]
CMP SIL,0xbf
JG 0x001d076e
CMP ECX,0xf0
SETZ AL
CMP R8B,0x90
SETC R9B
TEST AL,R9B
JNZ 0x001d076e
CMP ECX,0xf4
SETZ R9B
CMP R8B,0x90
SETNC R10B
MOV EAX,0x0
TEST R9B,R10B
JNZ 0x001d0770
AND ECX,0x7
SHL ECX,0x12
AND R8D,0x3f
SHL R8D,0xc
OR R8D,ECX
AND EDX,0x3f
SHL EDX,0x6
OR EDX,R8D
AND ESI,0x3f
OR RSI,RDX
MOV EAX,0x4
JMP 0x001d0802
|
int8 my_mb_wc_utf8mb4_quick(ulong *param_1,byte *param_2,byte *param_3)
{
byte bVar1;
byte bVar2;
int8 uVar3;
uint uVar4;
ulong uVar5;
if (param_3 <= param_2) {
return 0xffffff9b;
}
bVar1 = *param_2;
uVar5 = (ulong)bVar1;
if ((char)bVar1 < '\0') {
if (0xc1 < bVar1) {
uVar4 = (uint)bVar1;
if (bVar1 < 0xe0) {
if (param_3 < param_2 + 2) {
return 0xffffff9a;
}
if (0x3f < (byte)(param_2[1] ^ 0x80)) {
return 0;
}
uVar5 = (ulong)((uVar4 & 0x1f) << 6 | param_2[1] ^ 0x80);
uVar3 = 2;
goto LAB_001d0764;
}
if (bVar1 < 0xf0) {
if (param_3 < param_2 + 3) {
return 0xffffff99;
}
bVar2 = param_2[1];
if (((char)bVar2 < -0x40) && ((char)param_2[2] < -0x40)) {
if (uVar4 == 0xe0 && bVar2 < 0xa0) {
return 0;
}
uVar4 = param_2[2] & 0x3f | (bVar2 & 0x3f) << 6 | (bVar1 & 0xf) << 0xc;
uVar3 = 3;
LAB_001d0802:
uVar5 = (ulong)uVar4;
goto LAB_001d0764;
}
}
else if (bVar1 < 0xf5) {
if (param_3 < param_2 + 4) {
return 0xffffff98;
}
bVar1 = param_2[1];
if (((((char)bVar1 < -0x40) && ((char)param_2[2] < -0x40)) && ((char)param_2[3] < -0x40)) &&
(uVar4 != 0xf0 || 0x8f < bVar1)) {
if (uVar4 == 0xf4 && 0x8f < bVar1) {
return 0;
}
uVar4 = param_2[3] & 0x3f |
(param_2[2] & 0x3f) << 6 | (bVar1 & 0x3f) << 0xc | (uVar4 & 7) << 0x12;
uVar3 = 4;
goto LAB_001d0802;
}
}
}
uVar3 = 0;
}
else {
uVar3 = 1;
LAB_001d0764:
*param_1 = uVar5;
}
return uVar3;
}
|
|
57,232
|
nlohmann::json_abi_v3_11_3::detail::dtoa_impl::append_exponent(char*, int)
|
monkey531[P]llama/common/json.hpp
|
inline char* append_exponent(char* buf, int e)
{
JSON_ASSERT(e > -1000);
JSON_ASSERT(e < 1000);
if (e < 0)
{
e = -e;
*buf++ = '-';
}
else
{
*buf++ = '+';
}
auto k = static_cast<std::uint32_t>(e);
if (k < 10)
{
// Always print at least two digits in the exponent.
// This is for compatibility with printf("%g").
*buf++ = '0';
*buf++ = static_cast<char>('0' + k);
}
else if (k < 100)
{
*buf++ = static_cast<char>('0' + k / 10);
k %= 10;
*buf++ = static_cast<char>('0' + k);
}
else
{
*buf++ = static_cast<char>('0' + k / 100);
k %= 100;
*buf++ = static_cast<char>('0' + k / 10);
k %= 10;
*buf++ = static_cast<char>('0' + k);
}
return buf;
}
|
O2
|
cpp
|
nlohmann::json_abi_v3_11_3::detail::dtoa_impl::append_exponent(char*, int):
pushq %rax
cmpl $0xfffffc18, %esi # imm = 0xFFFFFC18
jle 0x88838
cmpl $0x3e8, %esi # imm = 0x3E8
jge 0x88854
movl %esi, %ecx
shrl $0x1f, %ecx
addb %cl, %cl
addb $0x2b, %cl
movl %esi, %eax
negl %eax
cmovsl %esi, %eax
movb %cl, (%rdi)
cmpl $0x9, %eax
ja 0x887e6
leaq 0x2(%rdi), %rdx
movb $0x30, 0x1(%rdi)
jmp 0x88801
cmpl $0x63, %eax
ja 0x88805
movzbl %al, %eax
movb $0xa, %cl
divb %cl
movl %eax, %ecx
movzbl %ah, %eax
orb $0x30, %cl
leaq 0x2(%rdi), %rdx
movb %cl, 0x1(%rdi)
pushq $0x3
jmp 0x8882b
movw $0x64, %cx
xorl %edx, %edx
divw %cx
addb $0x30, %al
movb %al, 0x1(%rdi)
movzbl %dl, %eax
movb $0xa, %cl
divb %cl
movl %eax, %ecx
movzbl %ah, %eax
orb $0x30, %cl
leaq 0x3(%rdi), %rdx
movb %cl, 0x2(%rdi)
pushq $0x4
popq %rcx
orb $0x30, %al
addq %rcx, %rdi
movb %al, (%rdx)
movq %rdi, %rax
popq %rcx
retq
leaq 0x293a7(%rip), %rdi # 0xb1be6
leaq 0x238fa(%rip), %rdx # 0xac140
leaq 0x2ed5a(%rip), %rcx # 0xb75a7
movl $0x45ae, %esi # imm = 0x45AE
jmp 0x8886e
leaq 0x2938b(%rip), %rdi # 0xb1be6
leaq 0x238de(%rip), %rdx # 0xac140
leaq 0x2ed48(%rip), %rcx # 0xb75b1
movl $0x45af, %esi # imm = 0x45AF
xorl %eax, %eax
callq 0x24e90
nop
|
_ZN8nlohmann16json_abi_v3_11_36detail9dtoa_impl15append_exponentEPci:
push rax
cmp esi, 0FFFFFC18h
jle loc_88838
cmp esi, 3E8h
jge loc_88854
mov ecx, esi
shr ecx, 1Fh
add cl, cl
add cl, 2Bh ; '+'
mov eax, esi
neg eax
cmovs eax, esi
mov [rdi], cl
cmp eax, 9
ja short loc_887E6
lea rdx, [rdi+2]
mov byte ptr [rdi+1], 30h ; '0'
jmp short loc_88801
loc_887E6:
cmp eax, 63h ; 'c'
ja short loc_88805
movzx eax, al
mov cl, 0Ah
div cl
mov ecx, eax
movzx eax, ah
or cl, 30h
lea rdx, [rdi+2]
mov [rdi+1], cl
loc_88801:
push 3
jmp short loc_8882B
loc_88805:
mov cx, 64h ; 'd'
xor edx, edx
div cx
add al, 30h ; '0'
mov [rdi+1], al
movzx eax, dl
mov cl, 0Ah
div cl
mov ecx, eax
movzx eax, ah
or cl, 30h
lea rdx, [rdi+3]
mov [rdi+2], cl
push 4
loc_8882B:
pop rcx
or al, 30h
add rdi, rcx
mov [rdx], al
mov rax, rdi
pop rcx
retn
loc_88838:
lea rdi, aWorkspaceLlm4b_1; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aE1000; "e > -1000"
mov esi, 45AEh
jmp short loc_8886E
loc_88854:
lea rdi, aWorkspaceLlm4b_1; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aE1000_0; "e < 1000"
mov esi, 45AFh
loc_8886E:
xor eax, eax
call _ggml_abort
nop
|
long long nlohmann::json_abi_v3_11_3::detail::dtoa_impl::append_exponent(
nlohmann::json_abi_v3_11_3::detail::dtoa_impl *this,
char *a2)
{
unsigned int v2; // eax
_BYTE *v3; // rdx
char v4; // cl
char v5; // cl
long long v7; // [rsp-10h] [rbp-10h]
if ( (int)a2 <= -1000 )
{
ggml_abort(
"/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp",
17838LL,
"GGML_ASSERT(%s) failed",
"e > -1000");
}
else
{
if ( (int)a2 < 1000 )
{
v2 = -(int)a2;
if ( (int)a2 > 0 )
v2 = (unsigned int)a2;
*(_BYTE *)this = 2 * ((int)a2 < 0) + 43;
if ( v2 > 9 )
{
if ( v2 > 0x63 )
{
*((_BYTE *)this + 1) = (unsigned __int16)v2 / 0x64u + 48;
v5 = (unsigned __int16)v2 % 0x64u / 0xA;
LOBYTE(v2) = (unsigned __int16)v2 % 0x64u % 0xA;
v3 = (char *)this + 3;
*((_BYTE *)this + 2) = v5 | 0x30;
v7 = 4LL;
goto LABEL_11;
}
v4 = (unsigned __int8)v2 / 0xAu;
LOBYTE(v2) = (unsigned __int8)v2 % 0xAu;
v3 = (char *)this + 2;
*((_BYTE *)this + 1) = v4 | 0x30;
}
else
{
v3 = (char *)this + 2;
*((_BYTE *)this + 1) = 48;
}
v7 = 3LL;
LABEL_11:
*v3 = v2 | 0x30;
return (long long)this + v7;
}
ggml_abort(
"/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp",
17839LL,
"GGML_ASSERT(%s) failed",
"e < 1000");
}
return nlohmann::json_abi_v3_11_3::detail::external_constructor<(nlohmann::json_abi_v3_11_3::detail::value_t)3>::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>>("/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp");
}
|
append_exponent:
PUSH RAX
CMP ESI,0xfffffc18
JLE 0x00188838
CMP ESI,0x3e8
JGE 0x00188854
MOV ECX,ESI
SHR ECX,0x1f
ADD CL,CL
ADD CL,0x2b
MOV EAX,ESI
NEG EAX
CMOVS EAX,ESI
MOV byte ptr [RDI],CL
CMP EAX,0x9
JA 0x001887e6
LEA RDX,[RDI + 0x2]
MOV byte ptr [RDI + 0x1],0x30
JMP 0x00188801
LAB_001887e6:
CMP EAX,0x63
JA 0x00188805
MOVZX EAX,AL
MOV CL,0xa
DIV CL
MOV ECX,EAX
MOVZX EAX,AH
OR CL,0x30
LEA RDX,[RDI + 0x2]
MOV byte ptr [RDI + 0x1],CL
LAB_00188801:
PUSH 0x3
JMP 0x0018882b
LAB_00188805:
MOV CX,0x64
XOR EDX,EDX
DIV CX
ADD AL,0x30
MOV byte ptr [RDI + 0x1],AL
MOVZX EAX,DL
MOV CL,0xa
DIV CL
MOV ECX,EAX
MOVZX EAX,AH
OR CL,0x30
LEA RDX,[RDI + 0x3]
MOV byte ptr [RDI + 0x2],CL
PUSH 0x4
LAB_0018882b:
POP RCX
OR AL,0x30
ADD RDI,RCX
MOV byte ptr [RDX],AL
MOV RAX,RDI
POP RCX
RET
LAB_00188838:
LEA RDI,[0x1b1be6]
LEA RDX,[0x1ac140]
LEA RCX,[0x1b75a7]
MOV ESI,0x45ae
JMP 0x0018886e
LAB_00188854:
LEA RDI,[0x1b1be6]
LEA RDX,[0x1ac140]
LEA RCX,[0x1b75b1]
MOV ESI,0x45af
LAB_0018886e:
XOR EAX,EAX
CALL 0x00124e90
|
/* nlohmann::json_abi_v3_11_3::detail::dtoa_impl::append_exponent(char*, int) */
char * nlohmann::json_abi_v3_11_3::detail::dtoa_impl::append_exponent(char *param_1,int param_2)
{
byte bVar2;
uint uVar1;
char *pcVar3;
ushort uVar4;
byte *pbVar5;
int8 uVar6;
long lStack_10;
if (param_2 < -999) {
pcVar3 = "e > -1000";
uVar6 = 0x45ae;
LAB_0018886e:
/* WARNING: Subroutine does not return */
ggml_abort("/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp",uVar6,
"GGML_ASSERT(%s) failed",pcVar3);
}
if (999 < param_2) {
pcVar3 = "e < 1000";
uVar6 = 0x45af;
goto LAB_0018886e;
}
uVar1 = -param_2;
if (0 < param_2) {
uVar1 = param_2;
}
*param_1 = (char)(param_2 >> 0x1f) * -2 + '+';
if (uVar1 < 10) {
param_1[1] = '0';
}
else {
if (99 < uVar1) {
uVar4 = (ushort)((uVar1 & 0xffff) % 100);
param_1[1] = (char)((uVar1 & 0xffff) / 100) + '0';
bVar2 = (byte)(uVar4 % 10);
pbVar5 = (byte *)(param_1 + 3);
param_1[2] = (byte)(uVar4 / 10) | 0x30;
lStack_10 = 4;
goto LAB_0018882b;
}
uVar4 = (ushort)uVar1 & 0xff;
uVar1 = (uint)(byte)(uVar4 % 10);
param_1[1] = (byte)(uVar4 / 10) | 0x30;
}
pbVar5 = (byte *)(param_1 + 2);
bVar2 = (byte)uVar1;
lStack_10 = 3;
LAB_0018882b:
*pbVar5 = bVar2 | 0x30;
return param_1 + lStack_10;
}
|
|
57,233
|
strmake_root
|
eloqsql/mysys/my_alloc.c
|
char *strmake_root(MEM_ROOT *root, const char *str, size_t len)
{
char *pos;
if ((pos=alloc_root(root,len+1)))
{
if (len)
memcpy(pos,str,len);
pos[len]=0;
}
return pos;
}
|
O3
|
c
|
strmake_root:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdx, %rbx
movq %rsi, %r14
leaq 0x1(%rdx), %rsi
callq 0x31847
movq %rax, %r15
testq %rax, %rax
je 0x31c42
testq %rbx, %rbx
je 0x31c3d
movq %r15, %rdi
movq %r14, %rsi
movq %rbx, %rdx
callq 0x242a0
movb $0x0, (%r15,%rbx)
movq %r15, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
|
strmake_root:
push rbp
mov rbp, rsp
push r15
push r14
push rbx
push rax
mov rbx, rdx
mov r14, rsi
lea rsi, [rdx+1]
call alloc_root
mov r15, rax
test rax, rax
jz short loc_31C42
test rbx, rbx
jz short loc_31C3D
mov rdi, r15
mov rsi, r14
mov rdx, rbx
call _memcpy
loc_31C3D:
mov byte ptr [r15+rbx], 0
loc_31C42:
mov rax, r15
add rsp, 8
pop rbx
pop r14
pop r15
pop rbp
retn
|
char * strmake_root(long long a1, long long a2, long long a3)
{
char *v4; // rax
char *v5; // r15
v4 = alloc_root(a1, a3 + 1);
v5 = v4;
if ( v4 )
{
if ( a3 )
memcpy(v4, a2, a3);
v5[a3] = 0;
}
return v5;
}
|
strmake_root:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH RBX
PUSH RAX
MOV RBX,RDX
MOV R14,RSI
LEA RSI,[RDX + 0x1]
CALL 0x00131847
MOV R15,RAX
TEST RAX,RAX
JZ 0x00131c42
TEST RBX,RBX
JZ 0x00131c3d
MOV RDI,R15
MOV RSI,R14
MOV RDX,RBX
CALL 0x001242a0
LAB_00131c3d:
MOV byte ptr [R15 + RBX*0x1],0x0
LAB_00131c42:
MOV RAX,R15
ADD RSP,0x8
POP RBX
POP R14
POP R15
POP RBP
RET
|
void * strmake_root(int8 param_1,void *param_2,size_t param_3)
{
void *__dest;
__dest = (void *)alloc_root(param_1,param_3 + 1);
if (__dest != (void *)0x0) {
if (param_3 != 0) {
memcpy(__dest,param_2,param_3);
}
*(int1 *)((long)__dest + param_3) = 0;
}
return __dest;
}
|
|
57,234
|
llama_sampler_penalties_accept(llama_sampler*, int)
|
monkey531[P]llama/src/llama-sampling.cpp
|
static void llama_sampler_penalties_accept(struct llama_sampler * smpl, llama_token token) {
auto * ctx = (llama_sampler_penalties *) smpl->ctx;
if (ctx->penalty_last_n == 0) {
return;
}
ctx->token_count[token]++;
// if the ring buffer is full, remove the oldest token
if (ctx->prev.size() >= (size_t) ctx->penalty_last_n) {
const auto old = ctx->prev.front();
ctx->token_count[old]--;
if (ctx->token_count[old] == 0) {
ctx->token_count.erase(old);
}
}
ctx->prev.push_back(token);
#if 0
// sanity check
std::unordered_map<llama_token, int> tmp;
for (int i = 0; i < std::min<int>(ctx->penalty_last_n, ctx->prev.size()); ++i) {
tmp[ctx->prev.rat(i)]++;
}
assert(ctx->token_count == tmp);
#endif
}
|
O3
|
cpp
|
llama_sampler_penalties_accept(llama_sampler*, int):
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movl %esi, 0x8(%rsp)
movq 0x8(%rdi), %r15
cmpl $0x0, (%r15)
je 0xdfa4e
leaq 0x48(%r15), %rbx
leaq 0x8(%rsp), %rsi
movq %rbx, %rdi
callq 0x65f70
incl (%rax)
leaq 0x10(%r15), %r14
movslq (%r15), %rax
cmpq %rax, 0x18(%r15)
jb 0xdfa41
movq %r14, %rdi
callq 0x6a4e0
movl (%rax), %eax
leaq 0xc(%rsp), %r15
movl %eax, (%r15)
movq %rbx, %rdi
movq %r15, %rsi
callq 0x65f70
decl (%rax)
movq %rbx, %rdi
movq %r15, %rsi
callq 0x65f70
cmpl $0x0, (%rax)
jne 0xdfa41
leaq 0xc(%rsp), %rsi
movq %rbx, %rdi
callq 0x64fa0
leaq 0x8(%rsp), %rsi
movq %r14, %rdi
callq 0x66610
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
|
_ZL30llama_sampler_penalties_acceptP13llama_sampleri:
push r15
push r14
push rbx
sub rsp, 10h
mov [rsp+28h+var_20], esi
mov r15, [rdi+8]
cmp dword ptr [r15], 0
jz short loc_DFA4E
lea rbx, [r15+48h]
lea rsi, [rsp+28h+var_20]
mov rdi, rbx
call __ZNSt8__detail9_Map_baseIiSt4pairIKiiESaIS3_ENS_10_Select1stESt8equal_toIiESt4hashIiENS_18_Mod_range_hashingENS_20_Default_ranged_hashENS_20_Prime_rehash_policyENS_17_Hashtable_traitsILb0ELb0ELb1EEELb1EEixERS2_; std::__detail::_Map_base<int,std::pair<int const,int>,std::allocator<std::pair<int const,int>>,std::__detail::_Select1st,std::equal_to<int>,std::hash<int>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<false,false,true>,true>::operator[](int const&)
inc dword ptr [rax]
lea r14, [r15+10h]
movsxd rax, dword ptr [r15]
cmp [r15+18h], rax
jb short loc_DFA41
mov rdi, r14
call __ZN11ring_bufferIiE5frontEv; ring_buffer<int>::front(void)
mov eax, [rax]
lea r15, [rsp+28h+var_1C]
mov [r15], eax
mov rdi, rbx
mov rsi, r15
call __ZNSt8__detail9_Map_baseIiSt4pairIKiiESaIS3_ENS_10_Select1stESt8equal_toIiESt4hashIiENS_18_Mod_range_hashingENS_20_Default_ranged_hashENS_20_Prime_rehash_policyENS_17_Hashtable_traitsILb0ELb0ELb1EEELb1EEixERS2_; std::__detail::_Map_base<int,std::pair<int const,int>,std::allocator<std::pair<int const,int>>,std::__detail::_Select1st,std::equal_to<int>,std::hash<int>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<false,false,true>,true>::operator[](int const&)
dec dword ptr [rax]
mov rdi, rbx
mov rsi, r15
call __ZNSt8__detail9_Map_baseIiSt4pairIKiiESaIS3_ENS_10_Select1stESt8equal_toIiESt4hashIiENS_18_Mod_range_hashingENS_20_Default_ranged_hashENS_20_Prime_rehash_policyENS_17_Hashtable_traitsILb0ELb0ELb1EEELb1EEixERS2_; std::__detail::_Map_base<int,std::pair<int const,int>,std::allocator<std::pair<int const,int>>,std::__detail::_Select1st,std::equal_to<int>,std::hash<int>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<false,false,true>,true>::operator[](int const&)
cmp dword ptr [rax], 0
jnz short loc_DFA41
lea rsi, [rsp+28h+var_1C]
mov rdi, rbx
call __ZNSt10_HashtableIiSt4pairIKiiESaIS2_ENSt8__detail10_Select1stESt8equal_toIiESt4hashIiENS4_18_Mod_range_hashingENS4_20_Default_ranged_hashENS4_20_Prime_rehash_policyENS4_17_Hashtable_traitsILb0ELb0ELb1EEEE8_M_eraseESt17integral_constantIbLb1EERS1_; std::_Hashtable<int,std::pair<int const,int>,std::allocator<std::pair<int const,int>>,std::__detail::_Select1st,std::equal_to<int>,std::hash<int>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<false,false,true>>::_M_erase(std::integral_constant<bool,true>,int const&)
loc_DFA41:
lea rsi, [rsp+28h+var_20]
mov rdi, r14
call __ZN11ring_bufferIiE9push_backERKi; ring_buffer<int>::push_back(int const&)
loc_DFA4E:
add rsp, 10h
pop rbx
pop r14
pop r15
retn
|
void llama_sampler_penalties_accept(long long a1, int a2)
{
int *v2; // r15
int *v3; // rbx
_DWORD *v4; // rax
_DWORD *v5; // rax
int v6; // [rsp+8h] [rbp-20h] BYREF
_DWORD v7[7]; // [rsp+Ch] [rbp-1Ch] BYREF
v6 = a2;
v2 = *(int **)(a1 + 8);
if ( *v2 )
{
v3 = v2 + 18;
v4 = (_DWORD *)std::__detail::_Map_base<int,std::pair<int const,int>,std::allocator<std::pair<int const,int>>,std::__detail::_Select1st,std::equal_to<int>,std::hash<int>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<false,false,true>,true>::operator[](
v2 + 18,
&v6);
++*v4;
if ( *((_QWORD *)v2 + 3) >= (unsigned long long)*v2 )
{
v7[0] = *(_DWORD *)ring_buffer<int>::front(v2 + 4);
v5 = (_DWORD *)std::__detail::_Map_base<int,std::pair<int const,int>,std::allocator<std::pair<int const,int>>,std::__detail::_Select1st,std::equal_to<int>,std::hash<int>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<false,false,true>,true>::operator[](
v3,
v7);
--*v5;
if ( !*(_DWORD *)std::__detail::_Map_base<int,std::pair<int const,int>,std::allocator<std::pair<int const,int>>,std::__detail::_Select1st,std::equal_to<int>,std::hash<int>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<false,false,true>,true>::operator[](
v3,
v7) )
std::_Hashtable<int,std::pair<int const,int>,std::allocator<std::pair<int const,int>>,std::__detail::_Select1st,std::equal_to<int>,std::hash<int>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<false,false,true>>::_M_erase(
v3,
v7);
}
ring_buffer<int>::push_back(v2 + 4, &v6);
}
}
|
llama_sampler_penalties_accept:
PUSH R15
PUSH R14
PUSH RBX
SUB RSP,0x10
MOV dword ptr [RSP + 0x8],ESI
MOV R15,qword ptr [RDI + 0x8]
CMP dword ptr [R15],0x0
JZ 0x001dfa4e
LEA RBX,[R15 + 0x48]
LEA RSI,[RSP + 0x8]
MOV RDI,RBX
CALL 0x00165f70
INC dword ptr [RAX]
LEA R14,[R15 + 0x10]
MOVSXD RAX,dword ptr [R15]
CMP qword ptr [R15 + 0x18],RAX
JC 0x001dfa41
MOV RDI,R14
CALL 0x0016a4e0
MOV EAX,dword ptr [RAX]
LEA R15,[RSP + 0xc]
MOV dword ptr [R15],EAX
MOV RDI,RBX
MOV RSI,R15
CALL 0x00165f70
DEC dword ptr [RAX]
MOV RDI,RBX
MOV RSI,R15
CALL 0x00165f70
CMP dword ptr [RAX],0x0
JNZ 0x001dfa41
LEA RSI,[RSP + 0xc]
MOV RDI,RBX
CALL 0x00164fa0
LAB_001dfa41:
LEA RSI,[RSP + 0x8]
MOV RDI,R14
CALL 0x00166610
LAB_001dfa4e:
ADD RSP,0x10
POP RBX
POP R14
POP R15
RET
|
/* llama_sampler_penalties_accept(llama_sampler*, int) */
void llama_sampler_penalties_accept(llama_sampler *param_1,int param_2)
{
_Map_base<int,std::pair<int_const,int>,std::allocator<std::pair<int_const,int>>,std::__detail::_Select1st,std::equal_to<int>,std::hash<int>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<false,false,true>,true>
*this;
int *piVar1;
int *piVar2;
int local_20;
int local_1c;
piVar1 = *(int **)(param_1 + 8);
if (*piVar1 != 0) {
this = (_Map_base<int,std::pair<int_const,int>,std::allocator<std::pair<int_const,int>>,std::__detail::_Select1st,std::equal_to<int>,std::hash<int>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<false,false,true>,true>
*)(piVar1 + 0x12);
local_20 = param_2;
piVar2 = (int *)std::__detail::
_Map_base<int,std::pair<int_const,int>,std::allocator<std::pair<int_const,int>>,std::__detail::_Select1st,std::equal_to<int>,std::hash<int>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<false,false,true>,true>
::operator[](this,&local_20);
*piVar2 = *piVar2 + 1;
if ((ulong)(long)*piVar1 <= *(ulong *)(piVar1 + 6)) {
piVar2 = (int *)ring_buffer<int>::front((ring_buffer<int> *)(piVar1 + 4));
local_1c = *piVar2;
piVar2 = (int *)std::__detail::
_Map_base<int,std::pair<int_const,int>,std::allocator<std::pair<int_const,int>>,std::__detail::_Select1st,std::equal_to<int>,std::hash<int>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<false,false,true>,true>
::operator[](this,&local_1c);
*piVar2 = *piVar2 + -1;
piVar2 = (int *)std::__detail::
_Map_base<int,std::pair<int_const,int>,std::allocator<std::pair<int_const,int>>,std::__detail::_Select1st,std::equal_to<int>,std::hash<int>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<false,false,true>,true>
::operator[](this,&local_1c);
if (*piVar2 == 0) {
std::
_Hashtable<int,std::pair<int_const,int>,std::allocator<std::pair<int_const,int>>,std::__detail::_Select1st,std::equal_to<int>,std::hash<int>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<false,false,true>>
::_M_erase(this,&local_1c);
}
}
ring_buffer<int>::push_back((ring_buffer<int> *)(piVar1 + 4),&local_20);
}
return;
}
|
|
57,235
|
my_xml_attr_ensure_space
|
eloqsql/strings/xml.c
|
static int my_xml_attr_ensure_space(MY_XML_PARSER *st, size_t len)
{
size_t ofs= st->attr.end - st->attr.start;
len++; // Add terminating zero.
if (ofs + len > st->attr.buffer_size)
{
st->attr.buffer_size= (SIZE_T_MAX - len) / 2 > st->attr.buffer_size ?
st->attr.buffer_size * 2 + len : SIZE_T_MAX;
if (!st->attr.buffer)
{
st->attr.buffer= (char *) my_malloc(PSI_INSTRUMENT_ME, st->attr.buffer_size, MYF(0));
if (st->attr.buffer)
memcpy(st->attr.buffer, st->attr.static_buffer, ofs + 1 /*term. zero */);
}
else
st->attr.buffer= (char *) my_realloc(PSI_INSTRUMENT_ME, st->attr.buffer,
st->attr.buffer_size, MYF(0));
st->attr.start= st->attr.buffer;
st->attr.end= st->attr.start + ofs;
return st->attr.buffer ? MY_XML_OK : MY_XML_ERROR;
}
return MY_XML_OK;
}
|
O0
|
c
|
my_xml_attr_ensure_space:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq 0x120(%rax), %rax
movq -0x10(%rbp), %rcx
movq 0x118(%rcx), %rcx
subq %rcx, %rax
movq %rax, -0x20(%rbp)
movq -0x18(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x18(%rbp)
movq -0x20(%rbp), %rax
addq -0x18(%rbp), %rax
movq -0x10(%rbp), %rcx
cmpq 0x110(%rcx), %rax
jbe 0xcc1d3
movq $-0x1, %rax
subq -0x18(%rbp), %rax
shrq %rax
movq -0x10(%rbp), %rcx
cmpq 0x110(%rcx), %rax
jbe 0xcc0d5
movq -0x10(%rbp), %rax
movq 0x110(%rax), %rax
shlq %rax
addq -0x18(%rbp), %rax
movq %rax, -0x28(%rbp)
jmp 0xcc0e2
movq $-0x1, %rax
movq %rax, -0x28(%rbp)
jmp 0xcc0e2
movq -0x28(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x110(%rax)
movq -0x10(%rbp), %rax
cmpq $0x0, 0x108(%rax)
jne 0xcc156
movq -0x10(%rbp), %rax
movq 0x110(%rax), %rsi
xorl %edi, %edi
xorl %eax, %eax
movl %eax, %edx
callq 0x7fad0
movq %rax, %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x108(%rax)
movq -0x10(%rbp), %rax
cmpq $0x0, 0x108(%rax)
je 0xcc154
movq -0x10(%rbp), %rax
movq 0x108(%rax), %rdi
movq -0x10(%rbp), %rsi
addq $0x88, %rsi
movq -0x20(%rbp), %rdx
addq $0x1, %rdx
callq 0x370c0
jmp 0xcc185
movq -0x10(%rbp), %rax
movq 0x108(%rax), %rsi
movq -0x10(%rbp), %rax
movq 0x110(%rax), %rdx
xorl %edi, %edi
xorl %eax, %eax
movl %eax, %ecx
callq 0x7fca0
movq %rax, %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x108(%rax)
movq -0x10(%rbp), %rax
movq 0x108(%rax), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x118(%rax)
movq -0x10(%rbp), %rax
movq 0x118(%rax), %rcx
addq -0x20(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x120(%rax)
movq -0x10(%rbp), %rax
movq 0x108(%rax), %rdx
movl $0x1, %eax
xorl %ecx, %ecx
cmpq $0x0, %rdx
cmovnel %ecx, %eax
movl %eax, -0x4(%rbp)
jmp 0xcc1da
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
nopl (%rax)
|
my_xml_attr_ensure_space:
push rbp
mov rbp, rsp
sub rsp, 30h
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov rax, [rbp+var_10]
mov rax, [rax+120h]
mov rcx, [rbp+var_10]
mov rcx, [rcx+118h]
sub rax, rcx
mov [rbp+var_20], rax
mov rax, [rbp+var_18]
add rax, 1
mov [rbp+var_18], rax
mov rax, [rbp+var_20]
add rax, [rbp+var_18]
mov rcx, [rbp+var_10]
cmp rax, [rcx+110h]
jbe loc_CC1D3
mov rax, 0FFFFFFFFFFFFFFFFh
sub rax, [rbp+var_18]
shr rax, 1
mov rcx, [rbp+var_10]
cmp rax, [rcx+110h]
jbe short loc_CC0D5
mov rax, [rbp+var_10]
mov rax, [rax+110h]
shl rax, 1
add rax, [rbp+var_18]
mov [rbp+var_28], rax
jmp short loc_CC0E2
loc_CC0D5:
mov rax, 0FFFFFFFFFFFFFFFFh
mov [rbp+var_28], rax
jmp short $+2
loc_CC0E2:
mov rcx, [rbp+var_28]
mov rax, [rbp+var_10]
mov [rax+110h], rcx
mov rax, [rbp+var_10]
cmp qword ptr [rax+108h], 0
jnz short loc_CC156
mov rax, [rbp+var_10]
mov rsi, [rax+110h]
xor edi, edi
xor eax, eax
mov edx, eax
call my_malloc
mov rcx, rax
mov rax, [rbp+var_10]
mov [rax+108h], rcx
mov rax, [rbp+var_10]
cmp qword ptr [rax+108h], 0
jz short loc_CC154
mov rax, [rbp+var_10]
mov rdi, [rax+108h]
mov rsi, [rbp+var_10]
add rsi, 88h
mov rdx, [rbp+var_20]
add rdx, 1
call _memcpy
loc_CC154:
jmp short loc_CC185
loc_CC156:
mov rax, [rbp+var_10]
mov rsi, [rax+108h]
mov rax, [rbp+var_10]
mov rdx, [rax+110h]
xor edi, edi
xor eax, eax
mov ecx, eax
call my_realloc
mov rcx, rax
mov rax, [rbp+var_10]
mov [rax+108h], rcx
loc_CC185:
mov rax, [rbp+var_10]
mov rcx, [rax+108h]
mov rax, [rbp+var_10]
mov [rax+118h], rcx
mov rax, [rbp+var_10]
mov rcx, [rax+118h]
add rcx, [rbp+var_20]
mov rax, [rbp+var_10]
mov [rax+120h], rcx
mov rax, [rbp+var_10]
mov rdx, [rax+108h]
mov eax, 1
xor ecx, ecx
cmp rdx, 0
cmovnz eax, ecx
mov [rbp+var_4], eax
jmp short loc_CC1DA
loc_CC1D3:
mov [rbp+var_4], 0
loc_CC1DA:
mov eax, [rbp+var_4]
add rsp, 30h
pop rbp
retn
|
_BOOL8 my_xml_attr_ensure_space(_QWORD *a1, long long a2)
{
long long v3; // [rsp+8h] [rbp-28h]
long long v4; // [rsp+10h] [rbp-20h]
long long v5; // [rsp+18h] [rbp-18h]
v4 = a1[36] - a1[35];
v5 = a2 + 1;
if ( (unsigned long long)(a2 + 1 + v4) <= a1[34] )
{
return 0;
}
else
{
if ( (unsigned long long)(-1 - v5) >> 1 <= a1[34] )
v3 = -1LL;
else
v3 = v5 + 2LL * a1[34];
a1[34] = v3;
if ( a1[33] )
{
a1[33] = my_realloc(0, a1[33], a1[34], 0);
}
else
{
a1[33] = my_malloc(0, a1[34], 0);
if ( a1[33] )
memcpy(a1[33], a1 + 17, v4 + 1);
}
a1[35] = a1[33];
a1[36] = v4 + a1[35];
return a1[33] == 0LL;
}
}
|
my_xml_attr_ensure_space:
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 RAX,qword ptr [RAX + 0x120]
MOV RCX,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RCX + 0x118]
SUB RAX,RCX
MOV qword ptr [RBP + -0x20],RAX
MOV RAX,qword ptr [RBP + -0x18]
ADD RAX,0x1
MOV qword ptr [RBP + -0x18],RAX
MOV RAX,qword ptr [RBP + -0x20]
ADD RAX,qword ptr [RBP + -0x18]
MOV RCX,qword ptr [RBP + -0x10]
CMP RAX,qword ptr [RCX + 0x110]
JBE 0x001cc1d3
MOV RAX,-0x1
SUB RAX,qword ptr [RBP + -0x18]
SHR RAX,0x1
MOV RCX,qword ptr [RBP + -0x10]
CMP RAX,qword ptr [RCX + 0x110]
JBE 0x001cc0d5
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x110]
SHL RAX,0x1
ADD RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RBP + -0x28],RAX
JMP 0x001cc0e2
LAB_001cc0d5:
MOV RAX,-0x1
MOV qword ptr [RBP + -0x28],RAX
JMP 0x001cc0e2
LAB_001cc0e2:
MOV RCX,qword ptr [RBP + -0x28]
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RAX + 0x110],RCX
MOV RAX,qword ptr [RBP + -0x10]
CMP qword ptr [RAX + 0x108],0x0
JNZ 0x001cc156
MOV RAX,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RAX + 0x110]
XOR EDI,EDI
XOR EAX,EAX
MOV EDX,EAX
CALL 0x0017fad0
MOV RCX,RAX
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RAX + 0x108],RCX
MOV RAX,qword ptr [RBP + -0x10]
CMP qword ptr [RAX + 0x108],0x0
JZ 0x001cc154
MOV RAX,qword ptr [RBP + -0x10]
MOV RDI,qword ptr [RAX + 0x108]
MOV RSI,qword ptr [RBP + -0x10]
ADD RSI,0x88
MOV RDX,qword ptr [RBP + -0x20]
ADD RDX,0x1
CALL 0x001370c0
LAB_001cc154:
JMP 0x001cc185
LAB_001cc156:
MOV RAX,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RAX + 0x108]
MOV RAX,qword ptr [RBP + -0x10]
MOV RDX,qword ptr [RAX + 0x110]
XOR EDI,EDI
XOR EAX,EAX
MOV ECX,EAX
CALL 0x0017fca0
MOV RCX,RAX
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RAX + 0x108],RCX
LAB_001cc185:
MOV RAX,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RAX + 0x108]
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RAX + 0x118],RCX
MOV RAX,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RAX + 0x118]
ADD RCX,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RAX + 0x120],RCX
MOV RAX,qword ptr [RBP + -0x10]
MOV RDX,qword ptr [RAX + 0x108]
MOV EAX,0x1
XOR ECX,ECX
CMP RDX,0x0
CMOVNZ EAX,ECX
MOV dword ptr [RBP + -0x4],EAX
JMP 0x001cc1da
LAB_001cc1d3:
MOV dword ptr [RBP + -0x4],0x0
LAB_001cc1da:
MOV EAX,dword ptr [RBP + -0x4]
ADD RSP,0x30
POP RBP
RET
|
bool my_xml_attr_ensure_space(long param_1,long param_2)
{
long lVar1;
int8 uVar2;
bool bVar3;
long local_30;
lVar1 = *(long *)(param_1 + 0x120) - *(long *)(param_1 + 0x118);
param_2 = param_2 + 1;
if (*(ulong *)(param_1 + 0x110) < (ulong)(lVar1 + param_2)) {
if (*(ulong *)(param_1 + 0x110) < -param_2 - 1U >> 1) {
local_30 = *(long *)(param_1 + 0x110) * 2 + param_2;
}
else {
local_30 = -1;
}
*(long *)(param_1 + 0x110) = local_30;
if (*(long *)(param_1 + 0x108) == 0) {
uVar2 = my_malloc(0,*(int8 *)(param_1 + 0x110),0);
*(int8 *)(param_1 + 0x108) = uVar2;
if (*(long *)(param_1 + 0x108) != 0) {
memcpy(*(void **)(param_1 + 0x108),(void *)(param_1 + 0x88),lVar1 + 1);
}
}
else {
uVar2 = my_realloc(0,*(int8 *)(param_1 + 0x108),*(int8 *)(param_1 + 0x110),0);
*(int8 *)(param_1 + 0x108) = uVar2;
}
*(int8 *)(param_1 + 0x118) = *(int8 *)(param_1 + 0x108);
*(long *)(param_1 + 0x120) = *(long *)(param_1 + 0x118) + lVar1;
bVar3 = *(long *)(param_1 + 0x108) == 0;
}
else {
bVar3 = false;
}
return bVar3;
}
|
|
57,236
|
writeMemBits
|
serhmarch[P]ModbusBridge/modbus/src/Modbus.cpp
|
StatusCode writeMemBits(uint32_t offset, uint32_t count, const void *values, void *memBuff, uint32_t memBitCount, uint32_t *outCount)
{
if (static_cast<uint32_t>(offset + count) > memBitCount)
{
if (outCount && (offset < memBitCount))
count = memBitCount - offset;
else
return Status_BadIllegalDataAddress;
}
uint16_t byteOffset = offset/MB_BYTE_SZ_BITES;
uint16_t bytes = count/MB_BYTE_SZ_BITES;
uint16_t shift = offset%MB_BYTE_SZ_BITES;
uint8_t *mem = reinterpret_cast<uint8_t*>(memBuff);
if (shift)
{
for (uint16_t i = 0; i < bytes; i++)
{
uint16_t mask = static_cast<uint16_t>(0x00FF) << shift;
uint16_t v = static_cast<uint16_t>(reinterpret_cast<const uint8_t*>(values)[i]) << shift;
*reinterpret_cast<uint16_t*>(&mem[byteOffset+i]) &= ~mask; // zero undermask values
*reinterpret_cast<uint16_t*>(&mem[byteOffset+i]) |= v; // set bit values
}
if (uint16_t resid = count%MB_BYTE_SZ_BITES)
{
if ((shift+resid) > MB_BYTE_SZ_BITES)
{
int16_t m = static_cast<int16_t>(0x8000); // using signed mask for right shift filled by '1'-bit
m = m>>(resid-1);
uint16_t mask = *reinterpret_cast<uint16_t*>(&m);
mask = mask >> (MB_REGE_SZ_BITES-resid-shift);
uint16_t v = (static_cast<uint16_t>(reinterpret_cast<const uint8_t*>(values)[bytes]) << shift) & mask;
*reinterpret_cast<uint16_t*>(&mem[byteOffset+bytes]) &= ~mask; // zero undermask values
*reinterpret_cast<uint16_t*>(&mem[byteOffset+bytes]) |= v;
}
else
{
int8_t m = static_cast<int8_t>(0x80); // using signed mask for right shift filled by '1'-bit
m = m>>(resid-1);
uint8_t mask = *reinterpret_cast<uint8_t*>(&m);
mask = mask >> (MB_BYTE_SZ_BITES-resid-shift);
uint8_t v = (reinterpret_cast<const uint8_t*>(values)[bytes] << shift) & mask;
mem[byteOffset+bytes] &= ~mask; // zero undermask values
mem[byteOffset+bytes] |= v;
}
}
}
else
{
memcpy(&mem[byteOffset], values, static_cast<size_t>(bytes));
if (uint16_t resid = count%MB_BYTE_SZ_BITES)
{
int8_t mask = static_cast<int8_t>(0x80);
mask = mask>>(7-resid);
mem[byteOffset+bytes] &= mask;
mask = ~mask;
mem[byteOffset+bytes] |= (reinterpret_cast<const uint8_t*>(values)[bytes] & mask);
}
}
if (outCount)
*outCount = count;
return Status_Good;
}
|
O0
|
cpp
|
writeMemBits:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movl %edi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movl %r8d, -0x24(%rbp)
movq %r9, -0x30(%rbp)
movl -0x8(%rbp), %eax
addl -0xc(%rbp), %eax
cmpl -0x24(%rbp), %eax
jbe 0xa1e1
cmpq $0x0, -0x30(%rbp)
je 0xa1d3
movl -0x8(%rbp), %eax
cmpl -0x24(%rbp), %eax
jae 0xa1d3
movl -0x24(%rbp), %eax
subl -0x8(%rbp), %eax
movl %eax, -0xc(%rbp)
jmp 0xa1df
movl $0x1000002, -0x4(%rbp) # imm = 0x1000002
jmp 0xa4aa
jmp 0xa1e1
movl -0x8(%rbp), %eax
shrl $0x3, %eax
movw %ax, -0x32(%rbp)
movl -0xc(%rbp), %eax
shrl $0x3, %eax
movw %ax, -0x34(%rbp)
movl -0x8(%rbp), %eax
andl $0x7, %eax
movw %ax, -0x36(%rbp)
movq -0x20(%rbp), %rax
movq %rax, -0x40(%rbp)
cmpw $0x0, -0x36(%rbp)
je 0xa3fa
movw $0x0, -0x42(%rbp)
movzwl -0x42(%rbp), %eax
movzwl -0x34(%rbp), %ecx
cmpl %ecx, %eax
jge 0xa29e
movzwl -0x36(%rbp), %ecx
movl $0xff, %eax
shll %cl, %eax
movw %ax, -0x44(%rbp)
movq -0x18(%rbp), %rax
movzwl -0x42(%rbp), %ecx
movzbl (%rax,%rcx), %eax
movzwl %ax, %eax
movzwl -0x36(%rbp), %ecx
shll %cl, %eax
movw %ax, -0x46(%rbp)
movzwl -0x44(%rbp), %esi
xorl $-0x1, %esi
movq -0x40(%rbp), %rax
movzwl -0x32(%rbp), %ecx
movzwl -0x42(%rbp), %edx
addl %edx, %ecx
movslq %ecx, %rcx
movzwl (%rax,%rcx), %edx
andl %esi, %edx
movw %dx, (%rax,%rcx)
movzwl -0x46(%rbp), %esi
movq -0x40(%rbp), %rax
movzwl -0x32(%rbp), %ecx
movzwl -0x42(%rbp), %edx
addl %edx, %ecx
movslq %ecx, %rcx
movzwl (%rax,%rcx), %edx
orl %esi, %edx
movw %dx, (%rax,%rcx)
movw -0x42(%rbp), %ax
addw $0x1, %ax
movw %ax, -0x42(%rbp)
jmp 0xa218
movl -0xc(%rbp), %eax
andl $0x7, %eax
movw %ax, -0x48(%rbp)
cmpw $0x0, -0x48(%rbp)
je 0xa3f5
movzwl -0x36(%rbp), %eax
movzwl -0x48(%rbp), %ecx
addl %ecx, %eax
cmpl $0x8, %eax
jle 0xa365
movw $0x8000, -0x4a(%rbp) # imm = 0x8000
movswl -0x4a(%rbp), %eax
movzwl -0x48(%rbp), %ecx
subl $0x1, %ecx
sarl %cl, %eax
movw %ax, -0x4a(%rbp)
movw -0x4a(%rbp), %ax
movw %ax, -0x4c(%rbp)
movzwl -0x4c(%rbp), %eax
movzwl -0x48(%rbp), %edx
movl $0x10, %ecx
subl %edx, %ecx
movzwl -0x36(%rbp), %edx
subl %edx, %ecx
sarl %cl, %eax
movw %ax, -0x4c(%rbp)
movq -0x18(%rbp), %rax
movzwl -0x34(%rbp), %ecx
movzbl (%rax,%rcx), %eax
movzwl %ax, %eax
movzwl -0x36(%rbp), %ecx
shll %cl, %eax
movzwl -0x4c(%rbp), %ecx
andl %ecx, %eax
movw %ax, -0x4e(%rbp)
movzwl -0x4c(%rbp), %esi
xorl $-0x1, %esi
movq -0x40(%rbp), %rax
movzwl -0x32(%rbp), %ecx
movzwl -0x34(%rbp), %edx
addl %edx, %ecx
movslq %ecx, %rcx
movzwl (%rax,%rcx), %edx
andl %esi, %edx
movw %dx, (%rax,%rcx)
movzwl -0x4e(%rbp), %esi
movq -0x40(%rbp), %rax
movzwl -0x32(%rbp), %ecx
movzwl -0x34(%rbp), %edx
addl %edx, %ecx
movslq %ecx, %rcx
movzwl (%rax,%rcx), %edx
orl %esi, %edx
movw %dx, (%rax,%rcx)
jmp 0xa3f3
movb $-0x80, -0x4f(%rbp)
movsbl -0x4f(%rbp), %eax
movzwl -0x48(%rbp), %ecx
subl $0x1, %ecx
sarl %cl, %eax
movb %al, -0x4f(%rbp)
movb -0x4f(%rbp), %al
movb %al, -0x50(%rbp)
movzbl -0x50(%rbp), %eax
movzwl -0x48(%rbp), %edx
movl $0x8, %ecx
subl %edx, %ecx
movzwl -0x36(%rbp), %edx
subl %edx, %ecx
sarl %cl, %eax
movb %al, -0x50(%rbp)
movq -0x18(%rbp), %rax
movzwl -0x34(%rbp), %ecx
movzbl (%rax,%rcx), %eax
movzwl -0x36(%rbp), %ecx
shll %cl, %eax
movzbl -0x50(%rbp), %ecx
andl %ecx, %eax
movb %al, -0x51(%rbp)
movzbl -0x50(%rbp), %esi
xorl $-0x1, %esi
movq -0x40(%rbp), %rax
movzwl -0x32(%rbp), %ecx
movzwl -0x34(%rbp), %edx
addl %edx, %ecx
movslq %ecx, %rcx
movzbl (%rax,%rcx), %edx
andl %esi, %edx
movb %dl, (%rax,%rcx)
movzbl -0x51(%rbp), %esi
movq -0x40(%rbp), %rax
movzwl -0x32(%rbp), %ecx
movzwl -0x34(%rbp), %edx
addl %edx, %ecx
movslq %ecx, %rcx
movzbl (%rax,%rcx), %edx
orl %esi, %edx
movb %dl, (%rax,%rcx)
jmp 0xa3f5
jmp 0xa493
movq -0x40(%rbp), %rdi
movzwl -0x32(%rbp), %eax
addq %rax, %rdi
movq -0x18(%rbp), %rsi
movzwl -0x34(%rbp), %eax
movl %eax, %edx
callq 0x6390
movl -0xc(%rbp), %eax
andl $0x7, %eax
movw %ax, -0x54(%rbp)
cmpw $0x0, -0x54(%rbp)
je 0xa491
movb $-0x80, -0x55(%rbp)
movsbl -0x55(%rbp), %eax
movzwl -0x54(%rbp), %edx
movl $0x7, %ecx
subl %edx, %ecx
sarl %cl, %eax
movb %al, -0x55(%rbp)
movsbl -0x55(%rbp), %esi
movq -0x40(%rbp), %rax
movzwl -0x32(%rbp), %ecx
movzwl -0x34(%rbp), %edx
addl %edx, %ecx
movslq %ecx, %rcx
movzbl (%rax,%rcx), %edx
andl %esi, %edx
movb %dl, (%rax,%rcx)
movsbl -0x55(%rbp), %eax
xorl $-0x1, %eax
movb %al, -0x55(%rbp)
movq -0x18(%rbp), %rax
movzwl -0x34(%rbp), %ecx
movzbl (%rax,%rcx), %esi
movsbl -0x55(%rbp), %eax
andl %eax, %esi
movq -0x40(%rbp), %rax
movzwl -0x32(%rbp), %ecx
movzwl -0x34(%rbp), %edx
addl %edx, %ecx
movslq %ecx, %rcx
movzbl (%rax,%rcx), %edx
orl %esi, %edx
movb %dl, (%rax,%rcx)
jmp 0xa493
cmpq $0x0, -0x30(%rbp)
je 0xa4a3
movl -0xc(%rbp), %ecx
movq -0x30(%rbp), %rax
movl %ecx, (%rax)
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x60, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
|
writeMemBits:
push rbp
mov rbp, rsp
sub rsp, 60h
mov [rbp+var_8], edi
mov [rbp+var_C], esi
mov [rbp+var_18], rdx
mov [rbp+var_20], rcx
mov [rbp+var_24], r8d
mov [rbp+var_30], r9
mov eax, [rbp+var_8]
add eax, [rbp+var_C]
cmp eax, [rbp+var_24]
jbe short loc_A1E1
cmp [rbp+var_30], 0
jz short loc_A1D3
mov eax, [rbp+var_8]
cmp eax, [rbp+var_24]
jnb short loc_A1D3
mov eax, [rbp+var_24]
sub eax, [rbp+var_8]
mov [rbp+var_C], eax
jmp short loc_A1DF
loc_A1D3:
mov [rbp+var_4], 1000002h
jmp loc_A4AA
loc_A1DF:
jmp short $+2
loc_A1E1:
mov eax, [rbp+var_8]
shr eax, 3
mov [rbp+var_32], ax
mov eax, [rbp+var_C]
shr eax, 3
mov [rbp+var_34], ax
mov eax, [rbp+var_8]
and eax, 7
mov [rbp+var_36], ax
mov rax, [rbp+var_20]
mov [rbp+var_40], rax
cmp [rbp+var_36], 0
jz loc_A3FA
mov [rbp+var_42], 0
loc_A218:
movzx eax, [rbp+var_42]
movzx ecx, [rbp+var_34]
cmp eax, ecx
jge short loc_A29E
movzx ecx, [rbp+var_36]
mov eax, 0FFh
shl eax, cl
mov [rbp+var_44], ax
mov rax, [rbp+var_18]
movzx ecx, [rbp+var_42]
movzx eax, byte ptr [rax+rcx]
movzx eax, ax
movzx ecx, [rbp+var_36]
shl eax, cl
mov [rbp+var_46], ax
movzx esi, [rbp+var_44]
xor esi, 0FFFFFFFFh
mov rax, [rbp+var_40]
movzx ecx, [rbp+var_32]
movzx edx, [rbp+var_42]
add ecx, edx
movsxd rcx, ecx
movzx edx, word ptr [rax+rcx]
and edx, esi
mov [rax+rcx], dx
movzx esi, [rbp+var_46]
mov rax, [rbp+var_40]
movzx ecx, [rbp+var_32]
movzx edx, [rbp+var_42]
add ecx, edx
movsxd rcx, ecx
movzx edx, word ptr [rax+rcx]
or edx, esi
mov [rax+rcx], dx
mov ax, [rbp+var_42]
add ax, 1
mov [rbp+var_42], ax
jmp loc_A218
loc_A29E:
mov eax, [rbp+var_C]
and eax, 7
mov [rbp+var_48], ax
cmp [rbp+var_48], 0
jz loc_A3F5
movzx eax, [rbp+var_36]
movzx ecx, [rbp+var_48]
add eax, ecx
cmp eax, 8
jle loc_A365
mov [rbp+var_4A], 8000h
movsx eax, [rbp+var_4A]
movzx ecx, [rbp+var_48]
sub ecx, 1
sar eax, cl
mov [rbp+var_4A], ax
mov ax, [rbp+var_4A]
mov [rbp+var_4C], ax
movzx eax, [rbp+var_4C]
movzx edx, [rbp+var_48]
mov ecx, 10h
sub ecx, edx
movzx edx, [rbp+var_36]
sub ecx, edx
sar eax, cl
mov [rbp+var_4C], ax
mov rax, [rbp+var_18]
movzx ecx, [rbp+var_34]
movzx eax, byte ptr [rax+rcx]
movzx eax, ax
movzx ecx, [rbp+var_36]
shl eax, cl
movzx ecx, [rbp+var_4C]
and eax, ecx
mov [rbp+var_4E], ax
movzx esi, [rbp+var_4C]
xor esi, 0FFFFFFFFh
mov rax, [rbp+var_40]
movzx ecx, [rbp+var_32]
movzx edx, [rbp+var_34]
add ecx, edx
movsxd rcx, ecx
movzx edx, word ptr [rax+rcx]
and edx, esi
mov [rax+rcx], dx
movzx esi, [rbp+var_4E]
mov rax, [rbp+var_40]
movzx ecx, [rbp+var_32]
movzx edx, [rbp+var_34]
add ecx, edx
movsxd rcx, ecx
movzx edx, word ptr [rax+rcx]
or edx, esi
mov [rax+rcx], dx
jmp loc_A3F3
loc_A365:
mov [rbp+var_4F], 80h
movsx eax, [rbp+var_4F]
movzx ecx, [rbp+var_48]
sub ecx, 1
sar eax, cl
mov [rbp+var_4F], al
mov al, [rbp+var_4F]
mov [rbp+var_50], al
movzx eax, [rbp+var_50]
movzx edx, [rbp+var_48]
mov ecx, 8
sub ecx, edx
movzx edx, [rbp+var_36]
sub ecx, edx
sar eax, cl
mov [rbp+var_50], al
mov rax, [rbp+var_18]
movzx ecx, [rbp+var_34]
movzx eax, byte ptr [rax+rcx]
movzx ecx, [rbp+var_36]
shl eax, cl
movzx ecx, [rbp+var_50]
and eax, ecx
mov [rbp+var_51], al
movzx esi, [rbp+var_50]
xor esi, 0FFFFFFFFh
mov rax, [rbp+var_40]
movzx ecx, [rbp+var_32]
movzx edx, [rbp+var_34]
add ecx, edx
movsxd rcx, ecx
movzx edx, byte ptr [rax+rcx]
and edx, esi
mov [rax+rcx], dl
movzx esi, [rbp+var_51]
mov rax, [rbp+var_40]
movzx ecx, [rbp+var_32]
movzx edx, [rbp+var_34]
add ecx, edx
movsxd rcx, ecx
movzx edx, byte ptr [rax+rcx]
or edx, esi
mov [rax+rcx], dl
loc_A3F3:
jmp short $+2
loc_A3F5:
jmp loc_A493
loc_A3FA:
mov rdi, [rbp+var_40]
movzx eax, [rbp+var_32]
add rdi, rax
mov rsi, [rbp+var_18]
movzx eax, [rbp+var_34]
mov edx, eax
call _memcpy
mov eax, [rbp+var_C]
and eax, 7
mov [rbp+var_54], ax
cmp [rbp+var_54], 0
jz short loc_A491
mov [rbp+var_55], 80h
movsx eax, [rbp+var_55]
movzx edx, [rbp+var_54]
mov ecx, 7
sub ecx, edx
sar eax, cl
mov [rbp+var_55], al
movsx esi, [rbp+var_55]
mov rax, [rbp+var_40]
movzx ecx, [rbp+var_32]
movzx edx, [rbp+var_34]
add ecx, edx
movsxd rcx, ecx
movzx edx, byte ptr [rax+rcx]
and edx, esi
mov [rax+rcx], dl
movsx eax, [rbp+var_55]
xor eax, 0FFFFFFFFh
mov [rbp+var_55], al
mov rax, [rbp+var_18]
movzx ecx, [rbp+var_34]
movzx esi, byte ptr [rax+rcx]
movsx eax, [rbp+var_55]
and esi, eax
mov rax, [rbp+var_40]
movzx ecx, [rbp+var_32]
movzx edx, [rbp+var_34]
add ecx, edx
movsxd rcx, ecx
movzx edx, byte ptr [rax+rcx]
or edx, esi
mov [rax+rcx], dl
loc_A491:
jmp short $+2
loc_A493:
cmp [rbp+var_30], 0
jz short loc_A4A3
mov ecx, [rbp+var_C]
mov rax, [rbp+var_30]
mov [rax], ecx
loc_A4A3:
mov [rbp+var_4], 0
loc_A4AA:
mov eax, [rbp+var_4]
add rsp, 60h
pop rbp
retn
|
long long writeMemBits(
unsigned int a1,
unsigned int a2,
long long a3,
long long a4,
unsigned int a5,
unsigned int *a6)
{
char v7; // [rsp+Ch] [rbp-54h]
char v8; // [rsp+Fh] [rbp-51h]
char v9; // [rsp+10h] [rbp-50h]
__int16 v10; // [rsp+12h] [rbp-4Eh]
__int16 v11; // [rsp+14h] [rbp-4Ch]
char v12; // [rsp+18h] [rbp-48h]
__int16 v13; // [rsp+1Ah] [rbp-46h]
unsigned __int16 i; // [rsp+1Eh] [rbp-42h]
char v15; // [rsp+2Ah] [rbp-36h]
unsigned __int16 v16; // [rsp+2Ch] [rbp-34h]
unsigned __int16 v17; // [rsp+2Eh] [rbp-32h]
unsigned int v21; // [rsp+54h] [rbp-Ch]
v21 = a2;
if ( a2 + a1 > a5 )
{
if ( !a6 || a1 >= a5 )
return 16777218;
v21 = a5 - a1;
}
v17 = a1 >> 3;
v16 = v21 >> 3;
v15 = a1 & 7;
if ( (a1 & 7) != 0 )
{
for ( i = 0; i < (int)v16; ++i )
{
v13 = *(unsigned __int8 *)(a3 + i) << v15;
*(_WORD *)(a4 + i + v17) &= ~(unsigned __int16)(255 << v15);
*(_WORD *)(a4 + i + v17) |= v13;
}
v12 = v21 & 7;
if ( (v21 & 7) != 0 )
{
if ( (int)((v21 & 7) + (a1 & 7)) <= 8 )
{
v9 = (int)(unsigned __int8)(-128 >> (v12 - 1)) >> (8 - v12 - v15);
v8 = v9 & (*(unsigned __int8 *)(a3 + v16) << v15);
*(_BYTE *)(a4 + v16 + v17) &= ~v9;
*(_BYTE *)(a4 + v16 + v17) |= v8;
}
else
{
v11 = (int)(unsigned __int16)(-32768 >> (v12 - 1)) >> (16 - v12 - v15);
v10 = v11 & (*(unsigned __int8 *)(a3 + v16) << v15);
*(_WORD *)(a4 + v16 + v17) &= ~v11;
*(_WORD *)(a4 + v16 + v17) |= v10;
}
}
}
else
{
memcpy(v17 + a4, a3, v16);
v7 = v21 & 7;
if ( (v21 & 7) != 0 )
{
*(_BYTE *)(a4 + v16 + v17) &= -128 >> (7 - v7);
*(_BYTE *)(a4 + v16 + v17) |= (unsigned __int8)~(unsigned __int8)(-128 >> (7 - v7)) & *(_BYTE *)(a3 + v16);
}
}
if ( a6 )
*a6 = v21;
return 0;
}
|
writeMemBits:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x60
MOV dword ptr [RBP + -0x8],EDI
MOV dword ptr [RBP + -0xc],ESI
MOV qword ptr [RBP + -0x18],RDX
MOV qword ptr [RBP + -0x20],RCX
MOV dword ptr [RBP + -0x24],R8D
MOV qword ptr [RBP + -0x30],R9
MOV EAX,dword ptr [RBP + -0x8]
ADD EAX,dword ptr [RBP + -0xc]
CMP EAX,dword ptr [RBP + -0x24]
JBE 0x0010a1e1
CMP qword ptr [RBP + -0x30],0x0
JZ 0x0010a1d3
MOV EAX,dword ptr [RBP + -0x8]
CMP EAX,dword ptr [RBP + -0x24]
JNC 0x0010a1d3
MOV EAX,dword ptr [RBP + -0x24]
SUB EAX,dword ptr [RBP + -0x8]
MOV dword ptr [RBP + -0xc],EAX
JMP 0x0010a1df
LAB_0010a1d3:
MOV dword ptr [RBP + -0x4],0x1000002
JMP 0x0010a4aa
LAB_0010a1df:
JMP 0x0010a1e1
LAB_0010a1e1:
MOV EAX,dword ptr [RBP + -0x8]
SHR EAX,0x3
MOV word ptr [RBP + -0x32],AX
MOV EAX,dword ptr [RBP + -0xc]
SHR EAX,0x3
MOV word ptr [RBP + -0x34],AX
MOV EAX,dword ptr [RBP + -0x8]
AND EAX,0x7
MOV word ptr [RBP + -0x36],AX
MOV RAX,qword ptr [RBP + -0x20]
MOV qword ptr [RBP + -0x40],RAX
CMP word ptr [RBP + -0x36],0x0
JZ 0x0010a3fa
MOV word ptr [RBP + -0x42],0x0
LAB_0010a218:
MOVZX EAX,word ptr [RBP + -0x42]
MOVZX ECX,word ptr [RBP + -0x34]
CMP EAX,ECX
JGE 0x0010a29e
MOVZX ECX,word ptr [RBP + -0x36]
MOV EAX,0xff
SHL EAX,CL
MOV word ptr [RBP + -0x44],AX
MOV RAX,qword ptr [RBP + -0x18]
MOVZX ECX,word ptr [RBP + -0x42]
MOVZX EAX,byte ptr [RAX + RCX*0x1]
MOVZX EAX,AX
MOVZX ECX,word ptr [RBP + -0x36]
SHL EAX,CL
MOV word ptr [RBP + -0x46],AX
MOVZX ESI,word ptr [RBP + -0x44]
XOR ESI,0xffffffff
MOV RAX,qword ptr [RBP + -0x40]
MOVZX ECX,word ptr [RBP + -0x32]
MOVZX EDX,word ptr [RBP + -0x42]
ADD ECX,EDX
MOVSXD RCX,ECX
MOVZX EDX,word ptr [RAX + RCX*0x1]
AND EDX,ESI
MOV word ptr [RAX + RCX*0x1],DX
MOVZX ESI,word ptr [RBP + -0x46]
MOV RAX,qword ptr [RBP + -0x40]
MOVZX ECX,word ptr [RBP + -0x32]
MOVZX EDX,word ptr [RBP + -0x42]
ADD ECX,EDX
MOVSXD RCX,ECX
MOVZX EDX,word ptr [RAX + RCX*0x1]
OR EDX,ESI
MOV word ptr [RAX + RCX*0x1],DX
MOV AX,word ptr [RBP + -0x42]
ADD AX,0x1
MOV word ptr [RBP + -0x42],AX
JMP 0x0010a218
LAB_0010a29e:
MOV EAX,dword ptr [RBP + -0xc]
AND EAX,0x7
MOV word ptr [RBP + -0x48],AX
CMP word ptr [RBP + -0x48],0x0
JZ 0x0010a3f5
MOVZX EAX,word ptr [RBP + -0x36]
MOVZX ECX,word ptr [RBP + -0x48]
ADD EAX,ECX
CMP EAX,0x8
JLE 0x0010a365
MOV word ptr [RBP + -0x4a],0x8000
MOVSX EAX,word ptr [RBP + -0x4a]
MOVZX ECX,word ptr [RBP + -0x48]
SUB ECX,0x1
SAR EAX,CL
MOV word ptr [RBP + -0x4a],AX
MOV AX,word ptr [RBP + -0x4a]
MOV word ptr [RBP + -0x4c],AX
MOVZX EAX,word ptr [RBP + -0x4c]
MOVZX EDX,word ptr [RBP + -0x48]
MOV ECX,0x10
SUB ECX,EDX
MOVZX EDX,word ptr [RBP + -0x36]
SUB ECX,EDX
SAR EAX,CL
MOV word ptr [RBP + -0x4c],AX
MOV RAX,qword ptr [RBP + -0x18]
MOVZX ECX,word ptr [RBP + -0x34]
MOVZX EAX,byte ptr [RAX + RCX*0x1]
MOVZX EAX,AX
MOVZX ECX,word ptr [RBP + -0x36]
SHL EAX,CL
MOVZX ECX,word ptr [RBP + -0x4c]
AND EAX,ECX
MOV word ptr [RBP + -0x4e],AX
MOVZX ESI,word ptr [RBP + -0x4c]
XOR ESI,0xffffffff
MOV RAX,qword ptr [RBP + -0x40]
MOVZX ECX,word ptr [RBP + -0x32]
MOVZX EDX,word ptr [RBP + -0x34]
ADD ECX,EDX
MOVSXD RCX,ECX
MOVZX EDX,word ptr [RAX + RCX*0x1]
AND EDX,ESI
MOV word ptr [RAX + RCX*0x1],DX
MOVZX ESI,word ptr [RBP + -0x4e]
MOV RAX,qword ptr [RBP + -0x40]
MOVZX ECX,word ptr [RBP + -0x32]
MOVZX EDX,word ptr [RBP + -0x34]
ADD ECX,EDX
MOVSXD RCX,ECX
MOVZX EDX,word ptr [RAX + RCX*0x1]
OR EDX,ESI
MOV word ptr [RAX + RCX*0x1],DX
JMP 0x0010a3f3
LAB_0010a365:
MOV byte ptr [RBP + -0x4f],0x80
MOVSX EAX,byte ptr [RBP + -0x4f]
MOVZX ECX,word ptr [RBP + -0x48]
SUB ECX,0x1
SAR EAX,CL
MOV byte ptr [RBP + -0x4f],AL
MOV AL,byte ptr [RBP + -0x4f]
MOV byte ptr [RBP + -0x50],AL
MOVZX EAX,byte ptr [RBP + -0x50]
MOVZX EDX,word ptr [RBP + -0x48]
MOV ECX,0x8
SUB ECX,EDX
MOVZX EDX,word ptr [RBP + -0x36]
SUB ECX,EDX
SAR EAX,CL
MOV byte ptr [RBP + -0x50],AL
MOV RAX,qword ptr [RBP + -0x18]
MOVZX ECX,word ptr [RBP + -0x34]
MOVZX EAX,byte ptr [RAX + RCX*0x1]
MOVZX ECX,word ptr [RBP + -0x36]
SHL EAX,CL
MOVZX ECX,byte ptr [RBP + -0x50]
AND EAX,ECX
MOV byte ptr [RBP + -0x51],AL
MOVZX ESI,byte ptr [RBP + -0x50]
XOR ESI,0xffffffff
MOV RAX,qword ptr [RBP + -0x40]
MOVZX ECX,word ptr [RBP + -0x32]
MOVZX EDX,word ptr [RBP + -0x34]
ADD ECX,EDX
MOVSXD RCX,ECX
MOVZX EDX,byte ptr [RAX + RCX*0x1]
AND EDX,ESI
MOV byte ptr [RAX + RCX*0x1],DL
MOVZX ESI,byte ptr [RBP + -0x51]
MOV RAX,qword ptr [RBP + -0x40]
MOVZX ECX,word ptr [RBP + -0x32]
MOVZX EDX,word ptr [RBP + -0x34]
ADD ECX,EDX
MOVSXD RCX,ECX
MOVZX EDX,byte ptr [RAX + RCX*0x1]
OR EDX,ESI
MOV byte ptr [RAX + RCX*0x1],DL
LAB_0010a3f3:
JMP 0x0010a3f5
LAB_0010a3f5:
JMP 0x0010a493
LAB_0010a3fa:
MOV RDI,qword ptr [RBP + -0x40]
MOVZX EAX,word ptr [RBP + -0x32]
ADD RDI,RAX
MOV RSI,qword ptr [RBP + -0x18]
MOVZX EAX,word ptr [RBP + -0x34]
MOV EDX,EAX
CALL 0x00106390
MOV EAX,dword ptr [RBP + -0xc]
AND EAX,0x7
MOV word ptr [RBP + -0x54],AX
CMP word ptr [RBP + -0x54],0x0
JZ 0x0010a491
MOV byte ptr [RBP + -0x55],0x80
MOVSX EAX,byte ptr [RBP + -0x55]
MOVZX EDX,word ptr [RBP + -0x54]
MOV ECX,0x7
SUB ECX,EDX
SAR EAX,CL
MOV byte ptr [RBP + -0x55],AL
MOVSX ESI,byte ptr [RBP + -0x55]
MOV RAX,qword ptr [RBP + -0x40]
MOVZX ECX,word ptr [RBP + -0x32]
MOVZX EDX,word ptr [RBP + -0x34]
ADD ECX,EDX
MOVSXD RCX,ECX
MOVZX EDX,byte ptr [RAX + RCX*0x1]
AND EDX,ESI
MOV byte ptr [RAX + RCX*0x1],DL
MOVSX EAX,byte ptr [RBP + -0x55]
XOR EAX,0xffffffff
MOV byte ptr [RBP + -0x55],AL
MOV RAX,qword ptr [RBP + -0x18]
MOVZX ECX,word ptr [RBP + -0x34]
MOVZX ESI,byte ptr [RAX + RCX*0x1]
MOVSX EAX,byte ptr [RBP + -0x55]
AND ESI,EAX
MOV RAX,qword ptr [RBP + -0x40]
MOVZX ECX,word ptr [RBP + -0x32]
MOVZX EDX,word ptr [RBP + -0x34]
ADD ECX,EDX
MOVSXD RCX,ECX
MOVZX EDX,byte ptr [RAX + RCX*0x1]
OR EDX,ESI
MOV byte ptr [RAX + RCX*0x1],DL
LAB_0010a491:
JMP 0x0010a493
LAB_0010a493:
CMP qword ptr [RBP + -0x30],0x0
JZ 0x0010a4a3
MOV ECX,dword ptr [RBP + -0xc]
MOV RAX,qword ptr [RBP + -0x30]
MOV dword ptr [RAX],ECX
LAB_0010a4a3:
MOV dword ptr [RBP + -0x4],0x0
LAB_0010a4aa:
MOV EAX,dword ptr [RBP + -0x4]
ADD RSP,0x60
POP RBP
RET
|
int4
writeMemBits(uint param_1,uint param_2,void *param_3,long param_4,uint param_5,uint *param_6)
{
char cVar1;
byte bVar2;
ushort uVar3;
ushort uVar4;
ushort uVar5;
uint uVar6;
uint uVar7;
sbyte sVar8;
long lVar9;
ushort local_4a;
uint local_14;
local_14 = param_2;
if (param_5 < param_1 + param_2) {
if ((param_6 == (uint *)0x0) || (param_5 <= param_1)) {
return 0x1000002;
}
local_14 = param_5 - param_1;
}
uVar6 = param_1 >> 3;
uVar7 = local_14 >> 3;
uVar3 = (ushort)uVar7;
uVar4 = (ushort)param_1 & 7;
if ((param_1 & 7) == 0) {
memcpy((void *)(param_4 + (ulong)(ushort)uVar6),param_3,(ulong)uVar3);
if ((local_14 & 7) != 0) {
bVar2 = (byte)(-0x80 >> (7 - ((byte)local_14 & 7) & 0x1f));
lVar9 = (long)(int)((uVar6 & 0xffff) + (uVar7 & 0xffff));
*(byte *)(param_4 + lVar9) = *(byte *)(param_4 + lVar9) & bVar2;
lVar9 = (long)(int)((uVar6 & 0xffff) + (uVar7 & 0xffff));
*(byte *)(param_4 + lVar9) =
*(byte *)(param_4 + lVar9) | *(byte *)((long)param_3 + (ulong)uVar3) & (bVar2 ^ 0xff);
}
}
else {
for (local_4a = 0; sVar8 = (sbyte)uVar4, local_4a < uVar3; local_4a = local_4a + 1) {
bVar2 = *(byte *)((long)param_3 + (ulong)local_4a);
lVar9 = (long)(int)((uVar6 & 0xffff) + (uint)local_4a);
*(ushort *)(param_4 + lVar9) =
*(ushort *)(param_4 + lVar9) & ((ushort)(0xff << sVar8) ^ 0xffff);
lVar9 = (long)(int)((uVar6 & 0xffff) + (uint)local_4a);
*(ushort *)(param_4 + lVar9) = *(ushort *)(param_4 + lVar9) | (ushort)bVar2 << sVar8;
}
uVar5 = (ushort)local_14 & 7;
if ((local_14 & 7) != 0) {
cVar1 = (char)uVar5;
if ((ushort)(uVar4 + uVar5) < 9) {
bVar2 = (byte)((int)(-0x80 >> (cVar1 - 1U & 0x1f) & 0xffU) >>
(('\b' - cVar1) - sVar8 & 0x1fU));
cVar1 = *(char *)((long)param_3 + (ulong)uVar3);
lVar9 = (long)(int)((uVar6 & 0xffff) + (uVar7 & 0xffff));
*(byte *)(param_4 + lVar9) = *(byte *)(param_4 + lVar9) & (bVar2 ^ 0xff);
lVar9 = (long)(int)((uVar6 & 0xffff) + (uVar7 & 0xffff));
*(byte *)(param_4 + lVar9) = *(byte *)(param_4 + lVar9) | cVar1 << sVar8 & bVar2;
}
else {
uVar4 = (ushort)((int)(-0x8000 >> (cVar1 - 1U & 0x1f) & 0xffffU) >>
(('\x10' - cVar1) - sVar8 & 0x1fU));
bVar2 = *(byte *)((long)param_3 + (ulong)uVar3);
lVar9 = (long)(int)((uVar6 & 0xffff) + (uVar7 & 0xffff));
*(ushort *)(param_4 + lVar9) = *(ushort *)(param_4 + lVar9) & (uVar4 ^ 0xffff);
lVar9 = (long)(int)((uVar6 & 0xffff) + (uVar7 & 0xffff));
*(ushort *)(param_4 + lVar9) = *(ushort *)(param_4 + lVar9) | (ushort)bVar2 << sVar8 & uVar4
;
}
}
}
if (param_6 != (uint *)0x0) {
*param_6 = local_14;
}
return 0;
}
|
|
57,237
|
ma_update_static_record
|
eloqsql/storage/maria/ma_statrec.c
|
my_bool _ma_update_static_record(MARIA_HA *info, MARIA_RECORD_POS pos,
const uchar *oldrec __attribute__ ((unused)),
const uchar *record)
{
info->rec_cache.seek_not_done=1; /* We have done a seek */
return (info->s->file_write(info,
record, info->s->base.reclength,
pos,
MYF(MY_NABP)) != 0);
}
|
O3
|
c
|
ma_update_static_record:
pushq %rbp
movq %rsp, %rbp
movq %rsi, %rax
movl $0x1, 0x598(%rdi)
movq (%rdi), %r9
movq 0x398(%r9), %rdx
movl $0x4, %r8d
movq %rcx, %rsi
movq %rax, %rcx
callq *0x6e8(%r9)
testq %rax, %rax
setne %al
popq %rbp
retq
|
_ma_update_static_record:
push rbp
mov rbp, rsp
mov rax, rsi
mov dword ptr [rdi+598h], 1
mov r9, [rdi]
mov rdx, [r9+398h]
mov r8d, 4
mov rsi, rcx
mov rcx, rax
call qword ptr [r9+6E8h]
test rax, rax
setnz al
pop rbp
retn
|
bool ma_update_static_record(_DWORD *a1, long long a2, long long a3, long long a4)
{
a1[358] = 1;
return (*(long long ( **)(_DWORD *, long long, _QWORD, long long, long long))(*(_QWORD *)a1 + 1768LL))(
a1,
a4,
*(_QWORD *)(*(_QWORD *)a1 + 920LL),
a2,
4LL) != 0;
}
|
_ma_update_static_record:
PUSH RBP
MOV RBP,RSP
MOV RAX,RSI
MOV dword ptr [RDI + 0x598],0x1
MOV R9,qword ptr [RDI]
MOV RDX,qword ptr [R9 + 0x398]
MOV R8D,0x4
MOV RSI,RCX
MOV RCX,RAX
CALL qword ptr [R9 + 0x6e8]
TEST RAX,RAX
SETNZ AL
POP RBP
RET
|
bool _ma_update_static_record
(long *param_1,int8 param_2,int8 param_3,int8 param_4)
{
long lVar1;
*(int4 *)(param_1 + 0xb3) = 1;
lVar1 = (**(code **)(*param_1 + 0x6e8))
(param_1,param_4,*(int8 *)(*param_1 + 0x398),param_2,4);
return lVar1 != 0;
}
|
|
57,238
|
minja::Value::pop(minja::Value const&)
|
monkey531[P]llama/common/minja.hpp
|
Value pop(const Value& index) {
if (is_array()) {
if (array_->empty())
throw std::runtime_error("pop from empty list");
if (index.is_null()) {
auto ret = array_->back();
array_->pop_back();
return ret;
} else if (!index.is_number_integer()) {
throw std::runtime_error("pop index must be an integer: " + index.dump());
} else {
auto i = index.get<int>();
if (i < 0 || i >= static_cast<int>(array_->size()))
throw std::runtime_error("pop index out of range: " + index.dump());
auto it = array_->begin() + (i < 0 ? array_->size() + i : i);
auto ret = *it;
array_->erase(it);
return ret;
}
} else if (is_object()) {
if (!index.is_hashable())
throw std::runtime_error("Unashable type: " + index.dump());
auto it = object_->find(index.primitive_);
if (it == object_->end())
throw std::runtime_error("Key not found: " + index.dump());
auto ret = it->second;
object_->erase(it);
return ret;
} else {
throw std::runtime_error("Value is not an array or object: " + dump());
}
}
|
O1
|
cpp
|
minja::Value::pop(minja::Value const&):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %rdx, %rbx
movq %rsi, %r15
movq %rdi, %r13
movq 0x10(%rsi), %rax
testq %rax, %rax
je 0x94b0d
movq 0x8(%rax), %rsi
cmpq %rsi, (%rax)
je 0x94c18
cmpq $0x0, 0x20(%rbx)
movb 0x40(%rbx), %al
jne 0x94b72
cmpq $0x0, 0x10(%rbx)
jne 0x94b72
testb %al, %al
jne 0x94b72
cmpq $0x0, 0x30(%rbx)
jne 0x94b72
addq $-0x50, %rsi
movq %r13, %rdi
callq 0x8f77a
movq 0x10(%r15), %rdi
movq 0x8(%rdi), %rsi
addq $-0x50, %rsi
movq %rsi, 0x8(%rdi)
callq 0x8dc52
jmp 0x94c06
movq 0x20(%r15), %r14
testq %r14, %r14
je 0x94caa
movq %r13, 0x40(%rsp)
cmpq $0x0, 0x10(%rbx)
jne 0x94d0a
cmpq $0x0, 0x20(%rbx)
jne 0x94d0a
cmpq $0x0, 0x30(%rbx)
jne 0x94d0a
movq (%r14), %r13
movq 0x8(%r14), %r12
cmpq %r12, %r13
je 0x94bd5
leaq 0x40(%rbx), %rbp
movq %r13, %rdi
movq %rbp, %rsi
callq 0x8f09f
testb %al, %al
jne 0x94bd2
addq $0x60, %r13
movq 0x8(%r14), %r12
cmpq %r12, %r13
jne 0x94b54
jmp 0x94bd5
addb $-0x5, %al
cmpb $0x2, %al
jae 0x94dc7
movq %rbx, %rdi
callq 0x926c6
testl %eax, %eax
js 0x94c4a
movq 0x10(%r15), %rcx
movq (%rcx), %r12
movq 0x8(%rcx), %rcx
subq %r12, %rcx
shrq $0x4, %rcx
imull $0xcccccccd, %ecx, %ecx # imm = 0xCCCCCCCD
cmpl %ecx, %eax
jge 0x94c4a
movl %eax, %eax
leaq (%rax,%rax,4), %rax
shlq $0x4, %rax
addq %rax, %r12
movq %r13, %rdi
movq %r12, %rsi
callq 0x8f77a
movq 0x10(%r15), %rdi
movq %r12, %rsi
callq 0x960e8
jmp 0x94c06
movq %r13, %r12
movq 0x20(%r15), %rax
cmpq 0x8(%rax), %r12
je 0x94d6a
leaq 0x10(%r12), %rsi
movq 0x40(%rsp), %r13
movq %r13, %rdi
callq 0x8f77a
movq 0x20(%r15), %rdi
leaq 0x60(%r12), %rdx
movq %r12, %rsi
callq 0x96160
movq %r13, %rax
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl $0x10, %edi
callq 0x1b430
movq %rax, %r14
leaq 0x5e9f6(%rip), %rsi # 0xf3622
movq %rax, %rdi
callq 0x1b310
movq 0x9a3b5(%rip), %rsi # 0x12eff0
movq 0x9a31e(%rip), %rdx # 0x12ef60
movq %r14, %rdi
callq 0x1bf20
movl $0x10, %edi
callq 0x1b430
movq %rax, %r14
movq %rsp, %rdi
movq %rbx, %rsi
movl $0xffffffff, %edx # imm = 0xFFFFFFFF
xorl %ecx, %ecx
callq 0x88256
leaq 0x5e9e5(%rip), %rsi # 0xf3655
leaq 0x20(%rsp), %rdi
movq %rsp, %rdx
callq 0x7a07b
movb $0x1, %bpl
leaq 0x20(%rsp), %rsi
movq %r14, %rdi
callq 0x1be30
xorl %ebp, %ebp
movq 0x9a35a(%rip), %rsi # 0x12eff0
movq 0x9a2c3(%rip), %rdx # 0x12ef60
movq %r14, %rdi
callq 0x1bf20
jmp 0x94e22
movl $0x10, %edi
callq 0x1b430
movq %rax, %r14
movq %rsp, %rdi
movq %r15, %rsi
movl $0xffffffff, %edx # imm = 0xFFFFFFFF
xorl %ecx, %ecx
callq 0x88256
leaq 0x5e64a(%rip), %rsi # 0xf331a
leaq 0x20(%rsp), %rdi
movq %rsp, %rdx
callq 0x7a07b
movb $0x1, %bpl
leaq 0x20(%rsp), %rsi
movq %r14, %rdi
callq 0x1be30
xorl %ebp, %ebp
movq 0x9a2fa(%rip), %rsi # 0x12eff0
movq 0x9a263(%rip), %rdx # 0x12ef60
movq %r14, %rdi
callq 0x1bf20
jmp 0x94e22
movl $0x10, %edi
callq 0x1b430
movq %rax, %r14
movq %rsp, %rdi
movq %rbx, %rsi
movl $0xffffffff, %edx # imm = 0xFFFFFFFF
xorl %ecx, %ecx
callq 0x88256
leaq 0x5e49e(%rip), %rsi # 0xf31ce
leaq 0x20(%rsp), %rdi
movq %rsp, %rdx
callq 0x7a07b
movb $0x1, %bpl
leaq 0x20(%rsp), %rsi
movq %r14, %rdi
callq 0x1be30
xorl %ebp, %ebp
movq 0x9a29a(%rip), %rsi # 0x12eff0
movq 0x9a203(%rip), %rdx # 0x12ef60
movq %r14, %rdi
callq 0x1bf20
jmp 0x94e22
movl $0x10, %edi
callq 0x1b430
movq %rax, %r14
movq %rsp, %rdi
movq %rbx, %rsi
movl $0xffffffff, %edx # imm = 0xFFFFFFFF
xorl %ecx, %ecx
callq 0x88256
leaq 0x5e8de(%rip), %rsi # 0xf366e
leaq 0x20(%rsp), %rdi
movq %rsp, %rdx
callq 0x7a07b
movb $0x1, %bpl
leaq 0x20(%rsp), %rsi
movq %r14, %rdi
callq 0x1be30
xorl %ebp, %ebp
movq 0x9a23a(%rip), %rsi # 0x12eff0
movq 0x9a1a3(%rip), %rdx # 0x12ef60
movq %r14, %rdi
callq 0x1bf20
jmp 0x94e22
movl $0x10, %edi
callq 0x1b430
movq %rax, %r14
movq %rsp, %rdi
movq %rbx, %rsi
movl $0xffffffff, %edx # imm = 0xFFFFFFFF
xorl %ecx, %ecx
callq 0x88256
leaq 0x5e849(%rip), %rsi # 0xf3636
leaq 0x20(%rsp), %rdi
movq %rsp, %rdx
callq 0x7a07b
movb $0x1, %bpl
leaq 0x20(%rsp), %rsi
movq %r14, %rdi
callq 0x1be30
xorl %ebp, %ebp
movq 0x9a1dd(%rip), %rsi # 0x12eff0
movq 0x9a146(%rip), %rdx # 0x12ef60
movq %r14, %rdi
callq 0x1bf20
jmp 0x94e32
jmp 0x94e52
jmp 0x94e32
jmp 0x94e52
jmp 0x94e32
jmp 0x94e52
jmp 0x94e32
jmp 0x94e52
movq %rax, %rbx
leaq 0x30(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x94e58
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x1b8e0
jmp 0x94e58
movq %rax, %rbx
movb $0x1, %bpl
leaq 0x10(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x94e85
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x1b8e0
jmp 0x94e85
jmp 0x94e7f
jmp 0x94e7f
jmp 0x94e7f
jmp 0x94e7f
jmp 0x94e99
movq %rax, %rbx
movb $0x1, %bpl
testb %bpl, %bpl
jne 0x94e8f
jmp 0x94ea4
movq %rax, %rbx
movq %r14, %rdi
callq 0x1b670
jmp 0x94ea4
movq %rax, %rbx
movq %r13, %rdi
callq 0x87f62
movq %rbx, %rdi
callq 0x1bfb0
|
_ZN5minja5Value3popERKS0_:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 48h
mov rbx, rdx
mov r15, rsi
mov r13, rdi
mov rax, [rsi+10h]
test rax, rax
jz short loc_94B0D
mov rsi, [rax+8]
cmp [rax], rsi
jz loc_94C18
cmp qword ptr [rbx+20h], 0
mov al, [rbx+40h]
jnz loc_94B72
cmp qword ptr [rbx+10h], 0
jnz loc_94B72
test al, al
jnz loc_94B72
cmp qword ptr [rbx+30h], 0
jnz loc_94B72
add rsi, 0FFFFFFFFFFFFFFB0h; minja::Value *
mov rdi, r13; this
call _ZN5minja5ValueC2ERKS0_; minja::Value::Value(minja::Value const&)
mov rdi, [r15+10h]
mov rsi, [rdi+8]
add rsi, 0FFFFFFFFFFFFFFB0h
mov [rdi+8], rsi
call _ZN9__gnu_cxx13new_allocatorIN5minja5ValueEE7destroyIS2_EEvPT_; __gnu_cxx::new_allocator<minja::Value>::destroy<minja::Value>(minja::Value *)
jmp loc_94C06
loc_94B0D:
mov r14, [r15+20h]
test r14, r14
jz loc_94CAA
mov [rsp+78h+var_38], r13
cmp qword ptr [rbx+10h], 0
jnz loc_94D0A
cmp qword ptr [rbx+20h], 0
jnz loc_94D0A
cmp qword ptr [rbx+30h], 0
jnz loc_94D0A
mov r13, [r14]
mov r12, [r14+8]
cmp r13, r12
jz loc_94BD5
lea rbp, [rbx+40h]
loc_94B54:
mov rdi, r13
mov rsi, rbp
call _ZN8nlohmann16json_abi_v3_11_3eqERKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEESF_; nlohmann::json_abi_v3_11_3::operator==(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const&,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const&)
test al, al
jnz short loc_94BD2
add r13, 60h ; '`'
mov r12, [r14+8]
cmp r13, r12
jnz short loc_94B54
jmp short loc_94BD5
loc_94B72:
add al, 0FBh
cmp al, 2
jnb loc_94DC7
mov rdi, rbx
call _ZNK5minja5Value3getIiEET_v; minja::Value::get<int>(void)
test eax, eax
js loc_94C4A
mov rcx, [r15+10h]
mov r12, [rcx]
mov rcx, [rcx+8]
sub rcx, r12
shr rcx, 4
imul ecx, 0CCCCCCCDh
cmp eax, ecx
jge loc_94C4A
mov eax, eax
lea rax, [rax+rax*4]
shl rax, 4
add r12, rax
mov rdi, r13; this
mov rsi, r12; minja::Value *
call _ZN5minja5ValueC2ERKS0_; minja::Value::Value(minja::Value const&)
mov rdi, [r15+10h]
mov rsi, r12
call _ZNSt6vectorIN5minja5ValueESaIS1_EE8_M_eraseEN9__gnu_cxx17__normal_iteratorIPS1_S3_EE; std::vector<minja::Value>::_M_erase(__gnu_cxx::__normal_iterator<minja::Value*,std::vector<minja::Value>>)
jmp short loc_94C06
loc_94BD2:
mov r12, r13
loc_94BD5:
mov rax, [r15+20h]
cmp r12, [rax+8]
jz loc_94D6A
lea rsi, [r12+10h]; minja::Value *
mov r13, [rsp+78h+var_38]
mov rdi, r13; this
call _ZN5minja5ValueC2ERKS0_; minja::Value::Value(minja::Value const&)
mov rdi, [r15+20h]
lea rdx, [r12+60h]
mov rsi, r12
call _ZN8nlohmann16json_abi_v3_11_311ordered_mapINS0_10basic_jsonIS1_St6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEEN5minja5ValueESt4lessISD_ESaISt4pairIKSD_SF_EEE5eraseEN9__gnu_cxx17__normal_iteratorIPSK_S3_ISK_SL_EEESR_; nlohmann::json_abi_v3_11_3::ordered_map<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>,minja::Value,std::less<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>,std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const,minja::Value>>>::erase(__gnu_cxx::__normal_iterator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const,minja::Value>*,std::vector<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const,minja::Value>>>,__gnu_cxx::__normal_iterator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const,minja::Value>*,std::vector<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const,minja::Value>>>)
loc_94C06:
mov rax, r13
add rsp, 48h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_94C18:
mov edi, 10h; thrown_size
call ___cxa_allocate_exception
mov r14, rax
lea rsi, aPopFromEmptyLi; "pop from empty list"
mov rdi, rax; this
call __ZNSt13runtime_errorC1EPKc; std::runtime_error::runtime_error(char const*)
mov rsi, cs:_ZTISt13runtime_error_ptr; lptinfo
mov rdx, cs:_ZTISt19_Sp_make_shared_tag; void (*)(void *)
mov rdi, r14; void *
call ___cxa_throw
loc_94C4A:
mov edi, 10h; thrown_size
call ___cxa_allocate_exception
mov r14, rax
mov rdi, rsp
mov rsi, rbx
mov edx, 0FFFFFFFFh
xor ecx, ecx
call _ZNK5minja5Value4dumpB5cxx11Eib; minja::Value::dump(int,bool)
lea rsi, aPopIndexOutOfR; "pop index out of range: "
lea rdi, [rsp+78h+var_58]
mov rdx, rsp
call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_OS8_; std::operator+<char>(char const*,std::string&&)
mov bpl, 1
lea rsi, [rsp+78h+var_58]
mov rdi, r14
call __ZNSt13runtime_errorC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; std::runtime_error::runtime_error(std::string const&)
xor ebp, ebp
mov rsi, cs:_ZTISt13runtime_error_ptr; lptinfo
mov rdx, cs:_ZTISt19_Sp_make_shared_tag; void (*)(void *)
mov rdi, r14; void *
call ___cxa_throw
jmp loc_94E22
loc_94CAA:
mov edi, 10h; thrown_size
call ___cxa_allocate_exception
mov r14, rax
mov rdi, rsp
mov rsi, r15
mov edx, 0FFFFFFFFh
xor ecx, ecx
call _ZNK5minja5Value4dumpB5cxx11Eib; minja::Value::dump(int,bool)
lea rsi, aValueIsNotAnAr_0; "Value is not an array or object: "
lea rdi, [rsp+78h+var_58]
mov rdx, rsp
call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_OS8_; std::operator+<char>(char const*,std::string&&)
mov bpl, 1
lea rsi, [rsp+78h+var_58]
mov rdi, r14
call __ZNSt13runtime_errorC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; std::runtime_error::runtime_error(std::string const&)
xor ebp, ebp
mov rsi, cs:_ZTISt13runtime_error_ptr; lptinfo
mov rdx, cs:_ZTISt19_Sp_make_shared_tag; void (*)(void *)
mov rdi, r14; void *
call ___cxa_throw
jmp loc_94E22
loc_94D0A:
mov edi, 10h; thrown_size
call ___cxa_allocate_exception
mov r14, rax
mov rdi, rsp
mov rsi, rbx
mov edx, 0FFFFFFFFh
xor ecx, ecx
call _ZNK5minja5Value4dumpB5cxx11Eib; minja::Value::dump(int,bool)
lea rsi, aUnashableType; "Unashable type: "
lea rdi, [rsp+78h+var_58]
mov rdx, rsp
call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_OS8_; std::operator+<char>(char const*,std::string&&)
mov bpl, 1
lea rsi, [rsp+78h+var_58]
mov rdi, r14
call __ZNSt13runtime_errorC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; std::runtime_error::runtime_error(std::string const&)
xor ebp, ebp
mov rsi, cs:_ZTISt13runtime_error_ptr; lptinfo
mov rdx, cs:_ZTISt19_Sp_make_shared_tag; void (*)(void *)
mov rdi, r14; void *
call ___cxa_throw
jmp loc_94E22
loc_94D6A:
mov edi, 10h; thrown_size
call ___cxa_allocate_exception
mov r14, rax
mov rdi, rsp
mov rsi, rbx
mov edx, 0FFFFFFFFh
xor ecx, ecx
call _ZNK5minja5Value4dumpB5cxx11Eib; minja::Value::dump(int,bool)
lea rsi, aKeyNotFound_0; "Key not found: "
lea rdi, [rsp+78h+var_58]
mov rdx, rsp
call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_OS8_; std::operator+<char>(char const*,std::string&&)
mov bpl, 1
lea rsi, [rsp+78h+var_58]
mov rdi, r14
call __ZNSt13runtime_errorC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; std::runtime_error::runtime_error(std::string const&)
xor ebp, ebp
mov rsi, cs:_ZTISt13runtime_error_ptr; lptinfo
mov rdx, cs:_ZTISt19_Sp_make_shared_tag; void (*)(void *)
mov rdi, r14; void *
call ___cxa_throw
jmp short loc_94E22
loc_94DC7:
mov edi, 10h; thrown_size
call ___cxa_allocate_exception
mov r14, rax
mov rdi, rsp
mov rsi, rbx
mov edx, 0FFFFFFFFh
xor ecx, ecx
call _ZNK5minja5Value4dumpB5cxx11Eib; minja::Value::dump(int,bool)
lea rsi, aPopIndexMustBe; "pop index must be an integer: "
lea rdi, [rsp+78h+var_58]
mov rdx, rsp
call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_OS8_; std::operator+<char>(char const*,std::string&&)
mov bpl, 1
lea rsi, [rsp+78h+var_58]
mov rdi, r14
call __ZNSt13runtime_errorC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; std::runtime_error::runtime_error(std::string const&)
xor ebp, ebp
mov rsi, cs:_ZTISt13runtime_error_ptr; lptinfo
mov rdx, cs:_ZTISt19_Sp_make_shared_tag; void (*)(void *)
mov rdi, r14; void *
call ___cxa_throw
loc_94E22:
jmp short loc_94E32
jmp short loc_94E52
jmp short loc_94E32
jmp short loc_94E52
jmp short loc_94E32
jmp short loc_94E52
jmp short loc_94E32
jmp short loc_94E52
loc_94E32:
mov rbx, rax
lea rax, [rsp+78h+var_48]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_94E58
mov rsi, [rsp+78h+var_48]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_94E58
loc_94E52:
mov rbx, rax
mov bpl, 1
loc_94E58:
lea rax, [rsp+78h+var_68]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_94E85
mov rsi, [rsp+78h+var_68]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_94E85
jmp short loc_94E7F
jmp short loc_94E7F
jmp short loc_94E7F
jmp short loc_94E7F
jmp short loc_94E99
loc_94E7F:
mov rbx, rax
mov bpl, 1
loc_94E85:
test bpl, bpl
jnz short loc_94E8F
jmp short loc_94EA4
mov rbx, rax
loc_94E8F:
mov rdi, r14; void *
call ___cxa_free_exception
jmp short loc_94EA4
loc_94E99:
mov rbx, rax
mov rdi, r13; this
call _ZN5minja5ValueD2Ev; minja::Value::~Value()
loc_94EA4:
mov rdi, rbx
call __Unwind_Resume
|
minja::Value * minja::Value::pop(minja::Value *this, const minja::Value *a2, long long a3, __m128d a4)
{
minja::Value *v6; // r13
_QWORD *v7; // rax
long long v8; // rsi
char v9; // al
long long v10; // rdi
long long v11; // rsi
unsigned __int8 **v12; // r14
unsigned __int8 *v13; // r13
unsigned __int8 *v14; // r12
int v15; // eax
_QWORD *v16; // rcx
const minja::Value *v17; // r12
std::runtime_error *exception; // r14
void *v20; // r14
void *v21; // r14
void *v22; // r14
void *v23; // r14
void *v24; // r14
_BYTE v25[16]; // [rsp+0h] [rbp-78h] BYREF
_BYTE v26[16]; // [rsp+20h] [rbp-58h] BYREF
minja::Value *v27; // [rsp+40h] [rbp-38h]
v6 = this;
v7 = (_QWORD *)*((_QWORD *)a2 + 2);
if ( v7 )
{
v8 = v7[1];
if ( *v7 == v8 )
{
exception = (std::runtime_error *)__cxa_allocate_exception(0x10uLL);
std::runtime_error::runtime_error(exception, "pop from empty list");
__cxa_throw(
exception,
(struct type_info *)&`typeinfo for'std::runtime_error,
(void (*)(void *))&std::runtime_error::~runtime_error);
}
v9 = *(_BYTE *)(a3 + 64);
if ( *(_QWORD *)(a3 + 32) || *(_QWORD *)(a3 + 16) || v9 || *(_QWORD *)(a3 + 48) )
{
if ( (unsigned __int8)(v9 - 5) >= 2u )
{
v24 = __cxa_allocate_exception(0x10uLL);
minja::Value::dump[abi:cxx11]((long long)v25, a3, 0xFFFFFFFF, 0);
std::operator+<char>((long long)v26, (long long)"pop index must be an integer: ", (long long)v25);
std::runtime_error::runtime_error(v24, v26);
__cxa_throw(
v24,
(struct type_info *)&`typeinfo for'std::runtime_error,
(void (*)(void *))&std::runtime_error::~runtime_error);
}
v15 = minja::Value::get<int>((_QWORD *)a3);
if ( v15 < 0 || (v16 = (_QWORD *)*((_QWORD *)a2 + 2), v15 >= (int)(-858993459 * ((v16[1] - *v16) >> 4))) )
{
v20 = __cxa_allocate_exception(0x10uLL);
minja::Value::dump[abi:cxx11]((long long)v25, a3, 0xFFFFFFFF, 0);
std::operator+<char>((long long)v26, (long long)"pop index out of range: ", (long long)v25);
std::runtime_error::runtime_error(v20, v26);
__cxa_throw(
v20,
(struct type_info *)&`typeinfo for'std::runtime_error,
(void (*)(void *))&std::runtime_error::~runtime_error);
}
v17 = (const minja::Value *)(80LL * (unsigned int)v15 + *v16);
minja::Value::Value(this, v17);
std::vector<minja::Value>::_M_erase(*((_QWORD *)a2 + 2), v17);
}
else
{
minja::Value::Value(this, (const minja::Value *)(v8 - 80));
v10 = *((_QWORD *)a2 + 2);
v11 = *(_QWORD *)(v10 + 8) - 80LL;
*(_QWORD *)(v10 + 8) = v11;
__gnu_cxx::new_allocator<minja::Value>::destroy<minja::Value>(v10, v11);
}
}
else
{
v12 = (unsigned __int8 **)*((_QWORD *)a2 + 4);
if ( !v12 )
{
v21 = __cxa_allocate_exception(0x10uLL);
minja::Value::dump[abi:cxx11]((long long)v25, (long long)a2, 0xFFFFFFFF, 0);
std::operator+<char>((long long)v26, (long long)"Value is not an array or object: ", (long long)v25);
std::runtime_error::runtime_error(v21, v26);
__cxa_throw(
v21,
(struct type_info *)&`typeinfo for'std::runtime_error,
(void (*)(void *))&std::runtime_error::~runtime_error);
}
v27 = this;
if ( *(_QWORD *)(a3 + 16) || *(_QWORD *)(a3 + 32) || *(_QWORD *)(a3 + 48) )
{
v22 = __cxa_allocate_exception(0x10uLL);
minja::Value::dump[abi:cxx11]((long long)v25, a3, 0xFFFFFFFF, 0);
std::operator+<char>((long long)v26, (long long)"Unashable type: ", (long long)v25);
std::runtime_error::runtime_error(v22, v26);
__cxa_throw(
v22,
(struct type_info *)&`typeinfo for'std::runtime_error,
(void (*)(void *))&std::runtime_error::~runtime_error);
}
v13 = *v12;
v14 = v12[1];
if ( *v12 != v14 )
{
while ( !(unsigned __int8)nlohmann::json_abi_v3_11_3::operator==(v13, (unsigned __int8 *)(a3 + 64), a4) )
{
v13 += 96;
v14 = v12[1];
if ( v13 == v14 )
goto LABEL_21;
}
v14 = v13;
}
LABEL_21:
if ( v14 == *(unsigned __int8 **)(*((_QWORD *)a2 + 4) + 8LL) )
{
v23 = __cxa_allocate_exception(0x10uLL);
minja::Value::dump[abi:cxx11]((long long)v25, a3, 0xFFFFFFFF, 0);
std::operator+<char>((long long)v26, (long long)"Key not found: ", (long long)v25);
std::runtime_error::runtime_error(v23, v26);
__cxa_throw(
v23,
(struct type_info *)&`typeinfo for'std::runtime_error,
(void (*)(void *))&std::runtime_error::~runtime_error);
}
v6 = v27;
minja::Value::Value(v27, (const minja::Value *)(v14 + 16));
nlohmann::json_abi_v3_11_3::ordered_map<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,minja::Value,std::less<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>,std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> const,minja::Value>>>::erase(
*((_QWORD *)a2 + 4),
v14,
v14 + 96);
}
return v6;
}
|
pop:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x48
MOV RBX,RDX
MOV R15,RSI
MOV R13,RDI
MOV RAX,qword ptr [RSI + 0x10]
TEST RAX,RAX
JZ 0x00194b0d
MOV RSI,qword ptr [RAX + 0x8]
CMP qword ptr [RAX],RSI
JZ 0x00194c18
CMP qword ptr [RBX + 0x20],0x0
MOV AL,byte ptr [RBX + 0x40]
JNZ 0x00194b72
CMP qword ptr [RBX + 0x10],0x0
JNZ 0x00194b72
TEST AL,AL
JNZ 0x00194b72
CMP qword ptr [RBX + 0x30],0x0
JNZ 0x00194b72
ADD RSI,-0x50
MOV RDI,R13
CALL 0x0018f77a
MOV RDI,qword ptr [R15 + 0x10]
MOV RSI,qword ptr [RDI + 0x8]
ADD RSI,-0x50
MOV qword ptr [RDI + 0x8],RSI
CALL 0x0018dc52
JMP 0x00194c06
LAB_00194b0d:
MOV R14,qword ptr [R15 + 0x20]
TEST R14,R14
JZ 0x00194caa
MOV qword ptr [RSP + 0x40],R13
CMP qword ptr [RBX + 0x10],0x0
JNZ 0x00194d0a
CMP qword ptr [RBX + 0x20],0x0
JNZ 0x00194d0a
CMP qword ptr [RBX + 0x30],0x0
JNZ 0x00194d0a
MOV R13,qword ptr [R14]
MOV R12,qword ptr [R14 + 0x8]
CMP R13,R12
JZ 0x00194bd5
LEA RBP,[RBX + 0x40]
LAB_00194b54:
MOV RDI,R13
MOV RSI,RBP
CALL 0x0018f09f
TEST AL,AL
JNZ 0x00194bd2
ADD R13,0x60
MOV R12,qword ptr [R14 + 0x8]
CMP R13,R12
JNZ 0x00194b54
JMP 0x00194bd5
LAB_00194b72:
ADD AL,0xfb
CMP AL,0x2
JNC 0x00194dc7
MOV RDI,RBX
CALL 0x001926c6
TEST EAX,EAX
JS 0x00194c4a
MOV RCX,qword ptr [R15 + 0x10]
MOV R12,qword ptr [RCX]
MOV RCX,qword ptr [RCX + 0x8]
SUB RCX,R12
SHR RCX,0x4
IMUL ECX,ECX,-0x33333333
CMP EAX,ECX
JGE 0x00194c4a
MOV EAX,EAX
LEA RAX,[RAX + RAX*0x4]
SHL RAX,0x4
ADD R12,RAX
MOV RDI,R13
MOV RSI,R12
CALL 0x0018f77a
MOV RDI,qword ptr [R15 + 0x10]
LAB_00194bc8:
MOV RSI,R12
CALL 0x001960e8
LAB_00194bd0:
JMP 0x00194c06
LAB_00194bd2:
MOV R12,R13
LAB_00194bd5:
MOV RAX,qword ptr [R15 + 0x20]
CMP R12,qword ptr [RAX + 0x8]
JZ 0x00194d6a
LEA RSI,[R12 + 0x10]
MOV R13,qword ptr [RSP + 0x40]
MOV RDI,R13
CALL 0x0018f77a
MOV RDI,qword ptr [R15 + 0x20]
LEA RDX,[R12 + 0x60]
LAB_00194bfe:
MOV RSI,R12
CALL 0x00196160
LAB_00194c06:
MOV RAX,R13
ADD RSP,0x48
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_00194c18:
MOV EDI,0x10
CALL 0x0011b430
MOV R14,RAX
LAB_00194c25:
LEA RSI,[0x1f3622]
MOV RDI,RAX
CALL 0x0011b310
LAB_00194c34:
MOV RSI,qword ptr [0x0022eff0]
MOV RDX,qword ptr [0x0022ef60]
MOV RDI,R14
CALL 0x0011bf20
LAB_00194c4a:
MOV EDI,0x10
CALL 0x0011b430
MOV R14,RAX
LAB_00194c57:
MOV RDI,RSP
MOV RSI,RBX
MOV EDX,0xffffffff
XOR ECX,ECX
CALL 0x00188256
LAB_00194c69:
LEA RSI,[0x1f3655]
LEA RDI,[RSP + 0x20]
MOV RDX,RSP
CALL 0x0017a07b
MOV BPL,0x1
LAB_00194c80:
LEA RSI,[RSP + 0x20]
MOV RDI,R14
CALL 0x0011be30
XOR EBP,EBP
MOV RSI,qword ptr [0x0022eff0]
MOV RDX,qword ptr [0x0022ef60]
MOV RDI,R14
CALL 0x0011bf20
LAB_00194caa:
MOV EDI,0x10
CALL 0x0011b430
MOV R14,RAX
LAB_00194cb7:
MOV RDI,RSP
MOV RSI,R15
MOV EDX,0xffffffff
XOR ECX,ECX
CALL 0x00188256
LAB_00194cc9:
LEA RSI,[0x1f331a]
LEA RDI,[RSP + 0x20]
MOV RDX,RSP
CALL 0x0017a07b
MOV BPL,0x1
LAB_00194ce0:
LEA RSI,[RSP + 0x20]
MOV RDI,R14
CALL 0x0011be30
XOR EBP,EBP
MOV RSI,qword ptr [0x0022eff0]
MOV RDX,qword ptr [0x0022ef60]
MOV RDI,R14
CALL 0x0011bf20
LAB_00194d0a:
MOV EDI,0x10
CALL 0x0011b430
MOV R14,RAX
LAB_00194d17:
MOV RDI,RSP
MOV RSI,RBX
MOV EDX,0xffffffff
XOR ECX,ECX
CALL 0x00188256
LAB_00194d29:
LEA RSI,[0x1f31ce]
LEA RDI,[RSP + 0x20]
MOV RDX,RSP
CALL 0x0017a07b
MOV BPL,0x1
LAB_00194d40:
LEA RSI,[RSP + 0x20]
MOV RDI,R14
CALL 0x0011be30
XOR EBP,EBP
MOV RSI,qword ptr [0x0022eff0]
MOV RDX,qword ptr [0x0022ef60]
MOV RDI,R14
CALL 0x0011bf20
LAB_00194d6a:
MOV EDI,0x10
CALL 0x0011b430
MOV R14,RAX
LAB_00194d77:
MOV RDI,RSP
MOV RSI,RBX
MOV EDX,0xffffffff
XOR ECX,ECX
CALL 0x00188256
LAB_00194d89:
LEA RSI,[0x1f366e]
LEA RDI,[RSP + 0x20]
MOV RDX,RSP
CALL 0x0017a07b
MOV BPL,0x1
LAB_00194da0:
LEA RSI,[RSP + 0x20]
MOV RDI,R14
CALL 0x0011be30
XOR EBP,EBP
MOV RSI,qword ptr [0x0022eff0]
MOV RDX,qword ptr [0x0022ef60]
MOV RDI,R14
CALL 0x0011bf20
LAB_00194dc7:
MOV EDI,0x10
CALL 0x0011b430
MOV R14,RAX
LAB_00194dd4:
MOV RDI,RSP
MOV RSI,RBX
MOV EDX,0xffffffff
XOR ECX,ECX
CALL 0x00188256
LAB_00194de6:
LEA RSI,[0x1f3636]
LEA RDI,[RSP + 0x20]
MOV RDX,RSP
CALL 0x0017a07b
MOV BPL,0x1
LAB_00194dfd:
LEA RSI,[RSP + 0x20]
MOV RDI,R14
CALL 0x0011be30
XOR EBP,EBP
MOV RSI,qword ptr [0x0022eff0]
MOV RDX,qword ptr [0x0022ef60]
MOV RDI,R14
CALL 0x0011bf20
|
/* minja::Value::pop(minja::Value const&) */
Value * minja::Value::pop(Value *param_1)
{
long *plVar1;
new_allocator<minja::Value> *this;
long lVar2;
char cVar3;
uint uVar4;
runtime_error *prVar5;
int iVar6;
Value *in_RDX;
bool bVar7;
long in_RSI;
int iVar8;
Value *pVVar9;
basic_json *pbVar10;
basic_json *pbVar11;
int1 auStack_78 [32];
string local_58 [32];
Value *local_38;
plVar1 = *(long **)(in_RSI + 0x10);
bVar7 = SUB81(in_RDX,0);
iVar8 = (int)auStack_78;
if (plVar1 == (long *)0x0) {
plVar1 = *(long **)(in_RSI + 0x20);
if (plVar1 == (long *)0x0) {
prVar5 = (runtime_error *)__cxa_allocate_exception(0x10);
/* try { // try from 00194cb7 to 00194cc8 has its CatchHandler @ 00194e7b */
dump_abi_cxx11_(iVar8,SUB81(in_RSI,0));
/* try { // try from 00194cc9 to 00194cdc has its CatchHandler @ 00194e30 */
std::operator+((char *)local_58,(string *)"Value is not an array or object: ");
/* try { // try from 00194ce0 to 00194d04 has its CatchHandler @ 00194e2e */
std::runtime_error::runtime_error(prVar5,local_58);
/* WARNING: Subroutine does not return */
__cxa_throw(prVar5,PTR_typeinfo_0022eff0,PTR__runtime_error_0022ef60);
}
local_38 = param_1;
if (((*(long *)(in_RDX + 0x10) != 0) || (*(long *)(in_RDX + 0x20) != 0)) ||
(*(long *)(in_RDX + 0x30) != 0)) {
prVar5 = (runtime_error *)__cxa_allocate_exception(0x10);
/* try { // try from 00194d17 to 00194d28 has its CatchHandler @ 00194e79 */
dump_abi_cxx11_(iVar8,bVar7);
/* try { // try from 00194d29 to 00194d3c has its CatchHandler @ 00194e2c */
std::operator+((char *)local_58,(string *)"Unashable type: ");
/* try { // try from 00194d40 to 00194d64 has its CatchHandler @ 00194e2a */
std::runtime_error::runtime_error(prVar5,local_58);
/* WARNING: Subroutine does not return */
__cxa_throw(prVar5,PTR_typeinfo_0022eff0,PTR__runtime_error_0022ef60);
}
pbVar10 = (basic_json *)plVar1[1];
if ((basic_json *)*plVar1 != pbVar10) {
pbVar11 = (basic_json *)*plVar1;
do {
pbVar10 = pbVar11;
cVar3 = nlohmann::json_abi_v3_11_3::operator==(pbVar10,(basic_json *)(in_RDX + 0x40));
if (cVar3 != '\0') break;
pbVar11 = pbVar10 + 0x60;
pbVar10 = (basic_json *)plVar1[1];
} while (pbVar11 != pbVar10);
}
param_1 = local_38;
if (pbVar10 == *(basic_json **)(*(long *)(in_RSI + 0x20) + 8)) {
prVar5 = (runtime_error *)__cxa_allocate_exception(0x10);
/* try { // try from 00194d77 to 00194d88 has its CatchHandler @ 00194e77 */
dump_abi_cxx11_(iVar8,bVar7);
/* try { // try from 00194d89 to 00194d9c has its CatchHandler @ 00194e28 */
std::operator+((char *)local_58,(string *)"Key not found: ");
/* try { // try from 00194da0 to 00194dc4 has its CatchHandler @ 00194e26 */
std::runtime_error::runtime_error(prVar5,local_58);
/* WARNING: Subroutine does not return */
__cxa_throw(prVar5,PTR_typeinfo_0022eff0,PTR__runtime_error_0022ef60);
}
Value(local_38,(Value *)(pbVar10 + 0x10));
/* try { // try from 00194bfe to 00194c05 has its CatchHandler @ 00194e99 */
nlohmann::json_abi_v3_11_3::
ordered_map<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,minja::Value,std::less<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>,std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const,minja::Value>>>
::erase(*(ordered_map<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,minja::Value,std::less<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>,std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const,minja::Value>>>
**)(in_RSI + 0x20),pbVar10,pbVar10 + 0x60);
}
else {
if (*plVar1 == plVar1[1]) {
prVar5 = (runtime_error *)__cxa_allocate_exception(0x10);
/* try { // try from 00194c25 to 00194c33 has its CatchHandler @ 00194e8c */
std::runtime_error::runtime_error(prVar5,"pop from empty list");
/* WARNING: Subroutine does not return */
__cxa_throw(prVar5,PTR_typeinfo_0022eff0,PTR__runtime_error_0022ef60);
}
if (((*(long *)(in_RDX + 0x20) == 0) && (*(long *)(in_RDX + 0x10) == 0)) &&
((in_RDX[0x40] == (Value)0x0 && (*(long *)(in_RDX + 0x30) == 0)))) {
Value(param_1,(Value *)(plVar1[1] + -0x50));
this = *(new_allocator<minja::Value> **)(in_RSI + 0x10);
lVar2 = *(long *)(this + 8);
*(Value **)(this + 8) = (Value *)(lVar2 + -0x50);
__gnu_cxx::new_allocator<minja::Value>::destroy<minja::Value>(this,(Value *)(lVar2 + -0x50));
}
else {
if (1 < (byte)((char)in_RDX[0x40] - 5U)) {
prVar5 = (runtime_error *)__cxa_allocate_exception(0x10);
/* try { // try from 00194dd4 to 00194de5 has its CatchHandler @ 00194e75 */
dump_abi_cxx11_(iVar8,bVar7);
/* try { // try from 00194de6 to 00194df9 has its CatchHandler @ 00194e24 */
std::operator+((char *)local_58,(string *)"pop index must be an integer: ");
/* try { // try from 00194dfd to 00194e21 has its CatchHandler @ 00194e22 */
std::runtime_error::runtime_error(prVar5,local_58);
/* WARNING: Subroutine does not return */
__cxa_throw(prVar5,PTR_typeinfo_0022eff0,PTR__runtime_error_0022ef60);
}
uVar4 = get<int>(in_RDX);
if (((int)uVar4 < 0) ||
(lVar2 = **(long **)(in_RSI + 0x10),
iVar6 = (int)((ulong)((*(long **)(in_RSI + 0x10))[1] - lVar2) >> 4),
SBORROW4(uVar4,iVar6 * -0x33333333) == (int)(uVar4 + iVar6 * 0x33333333) < 0)) {
prVar5 = (runtime_error *)__cxa_allocate_exception(0x10);
/* try { // try from 00194c57 to 00194c68 has its CatchHandler @ 00194e7f */
dump_abi_cxx11_(iVar8,bVar7);
/* try { // try from 00194c69 to 00194c7c has its CatchHandler @ 00194e52 */
std::operator+((char *)local_58,(string *)"pop index out of range: ");
/* try { // try from 00194c80 to 00194ca4 has its CatchHandler @ 00194e32 */
std::runtime_error::runtime_error(prVar5,local_58);
/* WARNING: Subroutine does not return */
__cxa_throw(prVar5,PTR_typeinfo_0022eff0,PTR__runtime_error_0022ef60);
}
pVVar9 = (Value *)(lVar2 + (ulong)uVar4 * 0x50);
Value(param_1,pVVar9);
/* try { // try from 00194bc8 to 00194bcf has its CatchHandler @ 00194e7d */
std::vector<minja::Value,std::allocator<minja::Value>>::_M_erase
(*(vector<minja::Value,std::allocator<minja::Value>> **)(in_RSI + 0x10),pVVar9);
}
}
return param_1;
}
|
|
57,239
|
cmdline::contains(char const*)
|
untodesu[P]riteg/riteg/cmdline.cc
|
bool cmdline::contains(const char *option)
{
assert(option != nullptr);
for(int i = 0; i < s_argc; ++i) {
if(s_argv[i][0] != '-')
continue;
if(std::strcmp(&s_argv[i][1], option))
continue;
return true;
}
return false;
}
|
O1
|
cpp
|
cmdline::contains(char const*):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
testq %rdi, %rdi
je 0xe0d6
movslq 0x9653a(%rip), %r14 # 0xa45ac
testq %r14, %r14
setg %bpl
jle 0xe0c1
movq %rdi, %rbx
movq 0x9652b(%rip), %r15 # 0xa45b0
movq %r14, %r12
negq %r12
movl $0x1, %r13d
movq -0x8(%r15,%r13,8), %rdi
cmpb $0x2d, (%rdi)
jne 0xe0aa
incq %rdi
movq %rbx, %rsi
callq 0xcb50
testl %eax, %eax
je 0xe0c1
cmpq %r14, %r13
setb %bpl
leaq (%r12,%r13), %rax
incq %rax
incq %r13
cmpq $0x1, %rax
jne 0xe091
andb $0x1, %bpl
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x540c3(%rip), %rdi # 0x621a0
leaq 0x53fde(%rip), %rsi # 0x620c2
leaq 0x540c7(%rip), %rcx # 0x621b2
movl $0x2f, %edx
callq 0xc540
|
_ZN7cmdline8containsEPKc:
push rbp
push r15
push r14
push r13
push r12
push rbx
push rax
test rdi, rdi
jz short loc_E0D6
movsxd r14, cs:_ZL6s_argc; s_argc
test r14, r14
setnle bpl
jle short loc_E0C1
mov rbx, rdi
mov r15, cs:_ZL6s_argv; s_argv
mov r12, r14
neg r12
mov r13d, 1
loc_E091:
mov rdi, [r15+r13*8-8]
cmp byte ptr [rdi], 2Dh ; '-'
jnz short loc_E0AA
inc rdi
mov rsi, rbx
call _strcmp
test eax, eax
jz short loc_E0C1
loc_E0AA:
cmp r13, r14
setb bpl
lea rax, [r12+r13]
inc rax
inc r13
cmp rax, 1
jnz short loc_E091
loc_E0C1:
and bpl, 1
mov eax, ebp
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_E0D6:
lea rdi, aOptionNullptr; "option != nullptr"
lea rsi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"...
lea rcx, aBoolCmdlineCon; "bool cmdline::contains(const char *)"
mov edx, 2Fh ; '/'
call ___assert_fail
|
long long cmdline::contains(cmdline *this, const char *a2)
{
unsigned int v2; // ebp
unsigned long long v3; // r14
long long v5; // r15
unsigned long long v6; // r13
_BYTE *v7; // rdi
long long v8; // rax
if ( !this )
__assert_fail(
"option != nullptr",
"/workspace/llm4binary/github/2025_star3/untodesu[P]riteg/riteg/cmdline.cc",
47LL,
"bool cmdline::contains(const char *)");
v3 = s_argc;
LOBYTE(v2) = s_argc > 0;
if ( s_argc > 0 )
{
v5 = s_argv;
v6 = 1LL;
do
{
v7 = *(_BYTE **)(v5 + 8 * v6 - 8);
if ( *v7 == 45 && !(unsigned int)strcmp(v7 + 1, this) )
break;
LOBYTE(v2) = v6 < v3;
v8 = v6 - v3 + 1;
++v6;
}
while ( v8 != 1 );
}
LOBYTE(v2) = v2 & 1;
return v2;
}
|
contains:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
PUSH RAX
TEST RDI,RDI
JZ 0x0010e0d6
MOVSXD R14,dword ptr [0x001a45ac]
TEST R14,R14
SETG BPL
JLE 0x0010e0c1
MOV RBX,RDI
MOV R15,qword ptr [0x001a45b0]
MOV R12,R14
NEG R12
MOV R13D,0x1
LAB_0010e091:
MOV RDI,qword ptr [R15 + R13*0x8 + -0x8]
CMP byte ptr [RDI],0x2d
JNZ 0x0010e0aa
INC RDI
MOV RSI,RBX
CALL 0x0010cb50
TEST EAX,EAX
JZ 0x0010e0c1
LAB_0010e0aa:
CMP R13,R14
SETC BPL
LEA RAX,[R12 + R13*0x1]
INC RAX
INC R13
CMP RAX,0x1
JNZ 0x0010e091
LAB_0010e0c1:
AND BPL,0x1
MOV EAX,EBP
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_0010e0d6:
LEA RDI,[0x1621a0]
LEA RSI,[0x1620c2]
LEA RCX,[0x1621b2]
MOV EDX,0x2f
CALL 0x0010c540
|
/* cmdline::contains(char const*) */
ulong cmdline::contains(char *param_1)
{
char *pcVar1;
long lVar2;
int iVar3;
int8 unaff_RBP;
ulong uVar4;
ulong uVar5;
bool bVar6;
bool bVar7;
lVar2 = s_argv;
if (param_1 == (char *)0x0) {
/* WARNING: Subroutine does not return */
__assert_fail("option != nullptr",
"/workspace/llm4binary/github/2025_star3/untodesu[P]riteg/riteg/cmdline.cc",0x2f,
"bool cmdline::contains(const char *)");
}
uVar5 = (ulong)s_argc;
bVar6 = 0 < (long)uVar5;
if (0 < (long)uVar5) {
uVar4 = 1;
do {
pcVar1 = *(char **)(lVar2 + -8 + uVar4 * 8);
if (*pcVar1 == '-') {
iVar3 = strcmp(pcVar1 + 1,param_1);
if (iVar3 == 0) break;
}
bVar6 = uVar4 < uVar5;
bVar7 = uVar4 != uVar5;
uVar4 = uVar4 + 1;
} while (bVar7);
}
return CONCAT71((int7)((ulong)unaff_RBP >> 8),bVar6) & 0xffffffff;
}
|
|
57,240
|
GoodASM::loadFile(QString)
|
goodasm/goodasm.cpp
|
void GoodASM::loadFile(QString file){
QByteArray bytes;
QFile input(file);
if(file=="-")
input.open(stdin, QIODevice::ReadOnly);
else
input.open(QFile::ReadOnly);
bytes=input.readAll();
if(bytes.length()==0)
exit(1);
pushFilename(file);
load(QString(bytes));
popFilename();
}
|
O3
|
cpp
|
GoodASM::loadFile(QString):
pushq %rbp
movq %rsp, %rbp
subq $0xf0, %rsp
movq %rsi, -0xb8(%rbp)
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0xc0(%rbp)
leaq -0x28(%rbp), %rdi
callq 0x175c0
movq -0xb8(%rbp), %rsi
leaq -0x38(%rbp), %rdi
callq 0x7750
jmp 0x16760
movq -0xb8(%rbp), %rdi
leaq 0xfa8e4(%rip), %rsi # 0x111052
callq 0xeb20
movb %al, -0xc1(%rbp)
jmp 0x1677b
movb -0xc1(%rbp), %al
testb $0x1, %al
jne 0x16787
jmp 0x167ed
movq 0x13586a(%rip), %rax # 0x14bff8
movq (%rax), %rax
movq %rax, -0xd0(%rbp)
leaq -0x48(%rbp), %rdi
movl $0x1, %esi
callq 0xeb80
leaq -0x4c(%rbp), %rdi
xorl %esi, %esi
callq 0xeba0
movq -0xd0(%rbp), %rsi
movl -0x48(%rbp), %edx
movl -0x4c(%rbp), %ecx
leaq -0x38(%rbp), %rdi
callq 0x72a0
jmp 0x167c9
jmp 0x1680b
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
jmp 0x16949
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
jmp 0x16940
leaq -0x50(%rbp), %rdi
movl $0x1, %esi
callq 0xeb80
movl -0x50(%rbp), %esi
leaq -0x38(%rbp), %rdi
callq 0x72c0
jmp 0x16809
jmp 0x1680b
leaq -0x68(%rbp), %rdi
leaq -0x38(%rbp), %rsi
callq 0x71c0
jmp 0x1681a
leaq -0x28(%rbp), %rdi
movq %rdi, -0xe0(%rbp)
leaq -0x68(%rbp), %rsi
movq %rsi, -0xe8(%rbp)
callq 0x18680
movq -0xe8(%rbp), %rdi
callq 0xebc0
movq -0xe0(%rbp), %rdi
callq 0xf5b0
movq %rax, -0xd8(%rbp)
jmp 0x16856
movq -0xd8(%rbp), %rax
cmpq $0x0, %rax
jne 0x1686d
movl $0x1, %edi
callq 0x75f0
movq -0xb8(%rbp), %rsi
leaq -0x80(%rbp), %rdi
movq %rdi, -0xf0(%rbp)
callq 0xe8f0
movq -0xc0(%rbp), %rdi
movq -0xf0(%rbp), %rsi
callq 0x16960
jmp 0x16899
leaq -0x80(%rbp), %rdi
callq 0xe770
leaq -0x98(%rbp), %rdi
leaq -0x28(%rbp), %rsi
callq 0x18760
jmp 0x168b4
movq -0xc0(%rbp), %rdi
leaq -0x98(%rbp), %rsi
callq 0x15d30
jmp 0x168c9
leaq -0x98(%rbp), %rdi
callq 0xe770
movq -0xc0(%rbp), %rsi
leaq -0xb0(%rbp), %rdi
callq 0x169d0
jmp 0x168ea
leaq -0xb0(%rbp), %rdi
callq 0xe770
leaq -0x38(%rbp), %rdi
callq 0x7770
leaq -0x28(%rbp), %rdi
callq 0xebc0
addq $0xf0, %rsp
popq %rbp
retq
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
leaq -0x80(%rbp), %rdi
callq 0xe770
jmp 0x16940
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
leaq -0x98(%rbp), %rdi
callq 0xe770
leaq -0x38(%rbp), %rdi
callq 0x7770
leaq -0x28(%rbp), %rdi
callq 0xebc0
movq -0x40(%rbp), %rdi
callq 0x7210
nopl (%rax,%rax)
|
_ZN7GoodASM8loadFileE7QString:
push rbp
mov rbp, rsp
sub rsp, 0F0h
mov [rbp+var_B8], rsi
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov rax, [rbp+var_8]
mov [rbp+var_C0], rax
lea rdi, [rbp+var_28]; this
call _ZN10QByteArrayC2Ev; QByteArray::QByteArray(void)
mov rsi, [rbp+var_B8]; QString *
lea rdi, [rbp+var_38]; this
call __ZN5QFileC1ERK7QString; QFile::QFile(QString const&)
jmp short $+2
loc_16760:
mov rdi, [rbp+var_B8]
lea rsi, asc_111050+2; "-"
call _ZNK7QStringeqEPKc; QString::operator==(char const*)
mov [rbp+var_C1], al
jmp short $+2
loc_1677B:
mov al, [rbp+var_C1]
test al, 1
jnz short loc_16787
jmp short loc_167ED
loc_16787:
mov rax, cs:stdin_ptr
mov rax, [rax]
mov [rbp+var_D0], rax
lea rdi, [rbp+var_48]
mov esi, 1
call _ZN6QFlagsIN13QIODeviceBase12OpenModeFlagEEC2ES1_; QFlags<QIODeviceBase::OpenModeFlag>::QFlags(QIODeviceBase::OpenModeFlag)
lea rdi, [rbp+var_4C]
xor esi, esi
call _ZN6QFlagsIN11QFileDevice14FileHandleFlagEEC2ES1_; QFlags<QFileDevice::FileHandleFlag>::QFlags(QFileDevice::FileHandleFlag)
mov rsi, [rbp+var_D0]
mov edx, [rbp+var_48]
mov ecx, [rbp+var_4C]
lea rdi, [rbp+var_38]
call __ZN5QFile4openEP8_IO_FILE6QFlagsIN13QIODeviceBase12OpenModeFlagEES2_IN11QFileDevice14FileHandleFlagEE; QFile::open(_IO_FILE *,QFlags<QIODeviceBase::OpenModeFlag>,QFlags<QFileDevice::FileHandleFlag>)
jmp short $+2
loc_167C9:
jmp short loc_1680B
mov rcx, rax
mov eax, edx
mov [rbp+var_40], rcx
mov [rbp+var_44], eax
jmp loc_16949
mov rcx, rax
mov eax, edx
mov [rbp+var_40], rcx
mov [rbp+var_44], eax
jmp loc_16940
loc_167ED:
lea rdi, [rbp+var_50]
mov esi, 1
call _ZN6QFlagsIN13QIODeviceBase12OpenModeFlagEEC2ES1_; QFlags<QIODeviceBase::OpenModeFlag>::QFlags(QIODeviceBase::OpenModeFlag)
mov esi, [rbp+var_50]
lea rdi, [rbp+var_38]
call __ZN5QFile4openE6QFlagsIN13QIODeviceBase12OpenModeFlagEE; QFile::open(QFlags<QIODeviceBase::OpenModeFlag>)
jmp short $+2
loc_16809:
jmp short $+2
loc_1680B:
lea rdi, [rbp+var_68]; this
lea rsi, [rbp+var_38]
call __ZN9QIODevice7readAllEv; QIODevice::readAll(void)
jmp short $+2
loc_1681A:
lea rdi, [rbp+var_28]
mov [rbp+var_E0], rdi
lea rsi, [rbp+var_68]
mov [rbp+var_E8], rsi
call _ZN10QByteArrayaSEOS_; QByteArray::operator=(QByteArray&&)
mov rdi, [rbp+var_E8]; this
call _ZN10QByteArrayD2Ev; QByteArray::~QByteArray()
mov rdi, [rbp+var_E0]; this
call _ZNK10QByteArray6lengthEv; QByteArray::length(void)
mov [rbp+var_D8], rax
jmp short $+2
loc_16856:
mov rax, [rbp+var_D8]
cmp rax, 0
jnz short loc_1686D
mov edi, 1
call _exit
loc_1686D:
mov rsi, [rbp+var_B8]; QString *
lea rdi, [rbp+var_80]; this
mov [rbp+var_F0], rdi
call _ZN7QStringC2ERKS_; QString::QString(QString const&)
mov rdi, [rbp+var_C0]
mov rsi, [rbp+var_F0]
call _ZN7GoodASM12pushFilenameE7QString; GoodASM::pushFilename(QString)
jmp short $+2
loc_16899:
lea rdi, [rbp+var_80]; this
call _ZN7QStringD2Ev; QString::~QString()
lea rdi, [rbp+var_98]; this
lea rsi, [rbp+var_28]; QByteArray *
call _ZN7QStringC2ERK10QByteArray; QString::QString(QByteArray const&)
jmp short $+2
loc_168B4:
mov rdi, [rbp+var_C0]
lea rsi, [rbp+var_98]
call _ZN7GoodASM4loadE7QString; GoodASM::load(QString)
jmp short $+2
loc_168C9:
lea rdi, [rbp+var_98]; this
call _ZN7QStringD2Ev; QString::~QString()
mov rsi, [rbp+var_C0]
lea rdi, [rbp+var_B0]; this
call _ZN7GoodASM11popFilenameEv; GoodASM::popFilename(void)
jmp short $+2
loc_168EA:
lea rdi, [rbp+var_B0]; this
call _ZN7QStringD2Ev; QString::~QString()
lea rdi, [rbp+var_38]; this
call __ZN5QFileD1Ev; QFile::~QFile()
lea rdi, [rbp+var_28]; this
call _ZN10QByteArrayD2Ev; QByteArray::~QByteArray()
add rsp, 0F0h
pop rbp
retn
mov rcx, rax
mov eax, edx
mov [rbp+var_40], rcx
mov [rbp+var_44], eax
lea rdi, [rbp+var_80]; this
call _ZN7QStringD2Ev; QString::~QString()
jmp short loc_16940
mov rcx, rax
mov eax, edx
mov [rbp+var_40], rcx
mov [rbp+var_44], eax
lea rdi, [rbp+var_98]; this
call _ZN7QStringD2Ev; QString::~QString()
loc_16940:
lea rdi, [rbp+var_38]; this
call __ZN5QFileD1Ev; QFile::~QFile()
loc_16949:
lea rdi, [rbp+var_28]; this
call _ZN10QByteArrayD2Ev; QByteArray::~QByteArray()
mov rdi, [rbp+var_40]
call __Unwind_Resume
|
void GoodASM::loadFile(GoodASM *a1, const QString *a2)
{
long long v2; // [rsp+20h] [rbp-D0h]
_BYTE v3[24]; // [rsp+40h] [rbp-B0h] BYREF
_BYTE v4[24]; // [rsp+58h] [rbp-98h] BYREF
_BYTE v5[24]; // [rsp+70h] [rbp-80h] BYREF
_BYTE v6[24]; // [rsp+88h] [rbp-68h] BYREF
unsigned int v7; // [rsp+A0h] [rbp-50h] BYREF
unsigned int v8; // [rsp+A4h] [rbp-4Ch] BYREF
unsigned int v9; // [rsp+A8h] [rbp-48h] BYREF
_BYTE v10[16]; // [rsp+B8h] [rbp-38h] BYREF
_BYTE v11[24]; // [rsp+C8h] [rbp-28h] BYREF
const QString *v12; // [rsp+E0h] [rbp-10h]
GoodASM *v13; // [rsp+E8h] [rbp-8h]
v13 = a1;
v12 = a2;
QByteArray::QByteArray((QByteArray *)v11);
QFile::QFile((QFile *)v10, a2);
if ( QString::operator==(a2, (long long)"-") )
{
v2 = stdin;
QFlags<QIODeviceBase::OpenModeFlag>::QFlags(&v9, 1);
QFlags<QFileDevice::FileHandleFlag>::QFlags(&v8, 0);
QFile::open(v10, v2, v9, v8);
}
else
{
QFlags<QIODeviceBase::OpenModeFlag>::QFlags(&v7, 1);
QFile::open(v10, v7);
}
QIODevice::readAll((QIODevice *)v6);
QByteArray::operator=(v11);
QByteArray::~QByteArray((QByteArray *)v6);
if ( !QByteArray::length((QByteArray *)v11) )
exit(1LL);
QString::QString((QString *)v5, a2);
GoodASM::pushFilename(a1, v5);
QString::~QString((QString *)v5);
QString::QString((QString *)v4, (const QByteArray *)v11);
GoodASM::load(a1, (const QString *)v4);
QString::~QString((QString *)v4);
GoodASM::popFilename((GoodASM *)v3);
QString::~QString((QString *)v3);
QFile::~QFile((QFile *)v10);
QByteArray::~QByteArray((QByteArray *)v11);
}
|
loadFile:
PUSH RBP
MOV RBP,RSP
SUB RSP,0xf0
MOV qword ptr [RBP + -0xb8],RSI
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RBP + -0xc0],RAX
LEA RDI,[RBP + -0x28]
CALL 0x001175c0
MOV RSI,qword ptr [RBP + -0xb8]
LAB_00116755:
LEA RDI,[RBP + -0x38]
CALL 0x00107750
JMP 0x00116760
LAB_00116760:
MOV RDI,qword ptr [RBP + -0xb8]
LEA RSI,[0x211052]
CALL 0x0010eb20
MOV byte ptr [RBP + -0xc1],AL
JMP 0x0011677b
LAB_0011677b:
MOV AL,byte ptr [RBP + -0xc1]
TEST AL,0x1
JNZ 0x00116787
JMP 0x001167ed
LAB_00116787:
MOV RAX,qword ptr [0x0024bff8]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0xd0],RAX
LEA RDI,[RBP + -0x48]
MOV ESI,0x1
CALL 0x0010eb80
LEA RDI,[RBP + -0x4c]
XOR ESI,ESI
CALL 0x0010eba0
MOV RSI,qword ptr [RBP + -0xd0]
MOV EDX,dword ptr [RBP + -0x48]
MOV ECX,dword ptr [RBP + -0x4c]
LEA RDI,[RBP + -0x38]
CALL 0x001072a0
JMP 0x001167c9
LAB_001167c9:
JMP 0x0011680b
LAB_001167ed:
LEA RDI,[RBP + -0x50]
MOV ESI,0x1
CALL 0x0010eb80
MOV ESI,dword ptr [RBP + -0x50]
LEA RDI,[RBP + -0x38]
CALL 0x001072c0
JMP 0x00116809
LAB_00116809:
JMP 0x0011680b
LAB_0011680b:
LEA RDI,[RBP + -0x68]
LEA RSI,[RBP + -0x38]
CALL 0x001071c0
JMP 0x0011681a
LAB_0011681a:
LEA RDI,[RBP + -0x28]
MOV qword ptr [RBP + -0xe0],RDI
LEA RSI,[RBP + -0x68]
MOV qword ptr [RBP + -0xe8],RSI
CALL 0x00118680
MOV RDI,qword ptr [RBP + -0xe8]
CALL 0x0010ebc0
MOV RDI,qword ptr [RBP + -0xe0]
CALL 0x0010f5b0
MOV qword ptr [RBP + -0xd8],RAX
JMP 0x00116856
LAB_00116856:
MOV RAX,qword ptr [RBP + -0xd8]
CMP RAX,0x0
JNZ 0x0011686d
MOV EDI,0x1
CALL 0x001075f0
LAB_0011686d:
MOV RSI,qword ptr [RBP + -0xb8]
LEA RDI,[RBP + -0x80]
MOV qword ptr [RBP + -0xf0],RDI
CALL 0x0010e8f0
MOV RDI,qword ptr [RBP + -0xc0]
MOV RSI,qword ptr [RBP + -0xf0]
LAB_00116892:
CALL 0x00116960
JMP 0x00116899
LAB_00116899:
LEA RDI,[RBP + -0x80]
CALL 0x0010e770
LAB_001168a2:
LEA RDI,[RBP + -0x98]
LEA RSI,[RBP + -0x28]
CALL 0x00118760
JMP 0x001168b4
LAB_001168b4:
MOV RDI,qword ptr [RBP + -0xc0]
LEA RSI,[RBP + -0x98]
CALL 0x00115d30
JMP 0x001168c9
LAB_001168c9:
LEA RDI,[RBP + -0x98]
CALL 0x0010e770
MOV RSI,qword ptr [RBP + -0xc0]
LAB_001168dc:
LEA RDI,[RBP + -0xb0]
CALL 0x001169d0
LAB_001168e8:
JMP 0x001168ea
LAB_001168ea:
LEA RDI,[RBP + -0xb0]
CALL 0x0010e770
LEA RDI,[RBP + -0x38]
CALL 0x00107770
LEA RDI,[RBP + -0x28]
CALL 0x0010ebc0
ADD RSP,0xf0
POP RBP
RET
|
/* GoodASM::loadFile(QString) */
void __thiscall GoodASM::loadFile(GoodASM *this,QString *param_2)
{
int8 uVar1;
byte bVar2;
long lVar3;
QString local_b8 [24];
QString local_a0 [24];
QString local_88 [24];
QByteArray local_70 [24];
int4 local_58;
int4 local_54;
int4 local_50 [4];
QFile local_40 [16];
QByteArray local_30 [24];
QString *local_18;
GoodASM *local_10;
local_18 = param_2;
local_10 = this;
QByteArray::QByteArray(local_30);
/* try { // try from 00116755 to 0011675d has its CatchHandler @ 001167cb */
QFile::QFile(local_40,param_2);
/* try { // try from 00116760 to 0011684c has its CatchHandler @ 001167dc */
bVar2 = QString::operator==(param_2,"-");
if ((bVar2 & 1) == 0) {
QFlags<QIODeviceBase::OpenModeFlag>::QFlags((QFlags<QIODeviceBase::OpenModeFlag> *)&local_58,1);
QFile::open(local_40,local_58);
}
else {
uVar1 = *(int8 *)PTR_stdin_0024bff8;
QFlags<QIODeviceBase::OpenModeFlag>::QFlags((QFlags<QIODeviceBase::OpenModeFlag> *)local_50,1);
QFlags<QFileDevice::FileHandleFlag>::QFlags((QFlags<QFileDevice::FileHandleFlag> *)&local_54,0);
QFile::open(local_40,uVar1,local_50[0],local_54);
}
QIODevice::readAll();
QByteArray::operator=(local_30,local_70);
QByteArray::~QByteArray(local_70);
lVar3 = QByteArray::length(local_30);
if (lVar3 == 0) {
/* WARNING: Subroutine does not return */
exit(1);
}
QString::QString(local_88,param_2);
/* try { // try from 00116892 to 00116896 has its CatchHandler @ 00116911 */
pushFilename(this,local_88);
QString::~QString(local_88);
/* try { // try from 001168a2 to 001168b1 has its CatchHandler @ 001167dc */
QString::QString(local_a0,local_30);
/* try { // try from 001168b4 to 001168c6 has its CatchHandler @ 00116928 */
load(this,local_a0);
QString::~QString(local_a0);
/* try { // try from 001168dc to 001168e7 has its CatchHandler @ 001167dc */
popFilename();
QString::~QString(local_b8);
QFile::~QFile(local_40);
QByteArray::~QByteArray(local_30);
return;
}
|
|
57,241
|
allocate_dynamic
|
eloqsql/mysys/array.c
|
my_bool allocate_dynamic(DYNAMIC_ARRAY *array, uint max_elements)
{
DBUG_ENTER("allocate_dynamic");
if (max_elements >= array->max_element)
{
uint size;
uchar *new_ptr;
size= (max_elements + array->alloc_increment)/array->alloc_increment;
size*= array->alloc_increment;
if (array->malloc_flags & MY_INIT_BUFFER_USED)
{
/*
In this senerio, the buffer is statically preallocated,
so we have to create an all-new malloc since we overflowed
*/
if (!(new_ptr= (uchar *) my_malloc(array->m_psi_key, size *
array->size_of_element,
MYF(array->malloc_flags | MY_WME))))
DBUG_RETURN(0);
memcpy(new_ptr, array->buffer,
array->elements * array->size_of_element);
array->malloc_flags&= ~MY_INIT_BUFFER_USED;
}
else if (!(new_ptr= (uchar*) my_realloc(array->m_psi_key,
array->buffer,size *
array->size_of_element,
MYF(MY_WME | MY_ALLOW_ZERO_PTR |
array->malloc_flags))))
DBUG_RETURN(TRUE);
array->buffer= new_ptr;
array->max_element= size;
}
DBUG_RETURN(FALSE);
}
|
O0
|
c
|
allocate_dynamic:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movl -0x14(%rbp), %eax
movq -0x10(%rbp), %rcx
cmpl 0xc(%rcx), %eax
jb 0x32685
movl -0x14(%rbp), %eax
movq -0x10(%rbp), %rcx
addl 0x10(%rcx), %eax
movq -0x10(%rbp), %rcx
xorl %edx, %edx
divl 0x10(%rcx)
movl %eax, -0x18(%rbp)
movq -0x10(%rbp), %rax
movl 0x10(%rax), %eax
imull -0x18(%rbp), %eax
movl %eax, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq 0x20(%rax), %rax
andq $0x100, %rax # imm = 0x100
cmpq $0x0, %rax
je 0x3262e
movq -0x10(%rbp), %rax
movl 0x18(%rax), %edi
movl -0x18(%rbp), %eax
movq -0x10(%rbp), %rcx
imull 0x14(%rcx), %eax
movl %eax, %eax
movl %eax, %esi
movq -0x10(%rbp), %rax
movq 0x20(%rax), %rdx
orq $0x10, %rdx
callq 0x2e060
movq %rax, -0x20(%rbp)
cmpq $0x0, %rax
jne 0x325f3
jmp 0x325ea
movb $0x0, -0x1(%rbp)
jmp 0x3268b
movq -0x20(%rbp), %rdi
movq -0x10(%rbp), %rax
movq (%rax), %rsi
movq -0x10(%rbp), %rax
movl 0x8(%rax), %eax
movq -0x10(%rbp), %rcx
imull 0x14(%rcx), %eax
movl %eax, %eax
movl %eax, %edx
callq 0x25270
movq -0x10(%rbp), %rax
movabsq $0xfffffeff, %rcx # imm = 0xFFFFFEFF
andq 0x20(%rax), %rcx
movq %rcx, 0x20(%rax)
jmp 0x32670
movq -0x10(%rbp), %rax
movl 0x18(%rax), %edi
movq -0x10(%rbp), %rax
movq (%rax), %rsi
movl -0x18(%rbp), %eax
movq -0x10(%rbp), %rcx
imull 0x14(%rcx), %eax
movl %eax, %eax
movl %eax, %edx
movq -0x10(%rbp), %rax
movq 0x20(%rax), %rcx
orq $0x50, %rcx
callq 0x2e230
movq %rax, -0x20(%rbp)
cmpq $0x0, %rax
jne 0x3266e
jmp 0x32668
movb $0x1, -0x1(%rbp)
jmp 0x3268b
jmp 0x32670
movq -0x20(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, (%rax)
movl -0x18(%rbp), %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0xc(%rax)
jmp 0x32687
movb $0x0, -0x1(%rbp)
movb -0x1(%rbp), %al
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
|
allocate_dynamic:
push rbp
mov rbp, rsp
sub rsp, 20h
mov [rbp+var_10], rdi
mov [rbp+var_14], esi
mov eax, [rbp+var_14]
mov rcx, [rbp+var_10]
cmp eax, [rcx+0Ch]
jb loc_32685
mov eax, [rbp+var_14]
mov rcx, [rbp+var_10]
add eax, [rcx+10h]
mov rcx, [rbp+var_10]
xor edx, edx
div dword ptr [rcx+10h]
mov [rbp+var_18], eax
mov rax, [rbp+var_10]
mov eax, [rax+10h]
imul eax, [rbp+var_18]
mov [rbp+var_18], eax
mov rax, [rbp+var_10]
mov rax, [rax+20h]
and rax, 100h
cmp rax, 0
jz short loc_3262E
mov rax, [rbp+var_10]
mov edi, [rax+18h]
mov eax, [rbp+var_18]
mov rcx, [rbp+var_10]
imul eax, [rcx+14h]
mov eax, eax
mov esi, eax
mov rax, [rbp+var_10]
mov rdx, [rax+20h]
or rdx, 10h
call my_malloc
mov [rbp+var_20], rax
cmp rax, 0
jnz short loc_325F3
jmp short $+2
loc_325EA:
mov [rbp+var_1], 0
jmp loc_3268B
loc_325F3:
mov rdi, [rbp+var_20]
mov rax, [rbp+var_10]
mov rsi, [rax]
mov rax, [rbp+var_10]
mov eax, [rax+8]
mov rcx, [rbp+var_10]
imul eax, [rcx+14h]
mov eax, eax
mov edx, eax
call _memcpy
mov rax, [rbp+var_10]
mov rcx, 0FFFFFEFFh
and rcx, [rax+20h]
mov [rax+20h], rcx
jmp short loc_32670
loc_3262E:
mov rax, [rbp+var_10]
mov edi, [rax+18h]
mov rax, [rbp+var_10]
mov rsi, [rax]
mov eax, [rbp+var_18]
mov rcx, [rbp+var_10]
imul eax, [rcx+14h]
mov eax, eax
mov edx, eax
mov rax, [rbp+var_10]
mov rcx, [rax+20h]
or rcx, 50h
call my_realloc
mov [rbp+var_20], rax
cmp rax, 0
jnz short loc_3266E
jmp short $+2
loc_32668:
mov [rbp+var_1], 1
jmp short loc_3268B
loc_3266E:
jmp short $+2
loc_32670:
mov rcx, [rbp+var_20]
mov rax, [rbp+var_10]
mov [rax], rcx
mov ecx, [rbp+var_18]
mov rax, [rbp+var_10]
mov [rax+0Ch], ecx
loc_32685:
jmp short $+2
loc_32687:
mov [rbp+var_1], 0
loc_3268B:
mov al, [rbp+var_1]
add rsp, 20h
pop rbp
retn
|
char allocate_dynamic(long long *a1, unsigned int a2)
{
long long v3; // [rsp+0h] [rbp-20h]
unsigned int v4; // [rsp+8h] [rbp-18h]
if ( a2 < *((_DWORD *)a1 + 3) )
return 0;
v4 = (*((_DWORD *)a1 + 4) + a2) / *((_DWORD *)a1 + 4) * *((_DWORD *)a1 + 4);
if ( (a1[4] & 0x100) == 0 )
{
v3 = my_realloc(*((_DWORD *)a1 + 6), *a1, *((_DWORD *)a1 + 5) * v4, *((_BYTE *)a1 + 32) | 0x50u);
if ( !v3 )
return 1;
goto LABEL_8;
}
v3 = my_malloc(*((_DWORD *)a1 + 6), *((_DWORD *)a1 + 5) * v4, *((_DWORD *)a1 + 8) | 0x10u);
if ( v3 )
{
memcpy(v3, *a1, (unsigned int)(*((_DWORD *)a1 + 5) * *((_DWORD *)a1 + 2)));
a1[4] &= 0xFFFFFEFFuLL;
LABEL_8:
*a1 = v3;
*((_DWORD *)a1 + 3) = v4;
return 0;
}
return 0;
}
|
allocate_dynamic:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x20
MOV qword ptr [RBP + -0x10],RDI
MOV dword ptr [RBP + -0x14],ESI
MOV EAX,dword ptr [RBP + -0x14]
MOV RCX,qword ptr [RBP + -0x10]
CMP EAX,dword ptr [RCX + 0xc]
JC 0x00132685
MOV EAX,dword ptr [RBP + -0x14]
MOV RCX,qword ptr [RBP + -0x10]
ADD EAX,dword ptr [RCX + 0x10]
MOV RCX,qword ptr [RBP + -0x10]
XOR EDX,EDX
DIV dword ptr [RCX + 0x10]
MOV dword ptr [RBP + -0x18],EAX
MOV RAX,qword ptr [RBP + -0x10]
MOV EAX,dword ptr [RAX + 0x10]
IMUL EAX,dword ptr [RBP + -0x18]
MOV dword ptr [RBP + -0x18],EAX
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x20]
AND RAX,0x100
CMP RAX,0x0
JZ 0x0013262e
MOV RAX,qword ptr [RBP + -0x10]
MOV EDI,dword ptr [RAX + 0x18]
MOV EAX,dword ptr [RBP + -0x18]
MOV RCX,qword ptr [RBP + -0x10]
IMUL EAX,dword ptr [RCX + 0x14]
MOV EAX,EAX
MOV ESI,EAX
MOV RAX,qword ptr [RBP + -0x10]
MOV RDX,qword ptr [RAX + 0x20]
OR RDX,0x10
CALL 0x0012e060
MOV qword ptr [RBP + -0x20],RAX
CMP RAX,0x0
JNZ 0x001325f3
JMP 0x001325ea
LAB_001325ea:
MOV byte ptr [RBP + -0x1],0x0
JMP 0x0013268b
LAB_001325f3:
MOV RDI,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RAX]
MOV RAX,qword ptr [RBP + -0x10]
MOV EAX,dword ptr [RAX + 0x8]
MOV RCX,qword ptr [RBP + -0x10]
IMUL EAX,dword ptr [RCX + 0x14]
MOV EAX,EAX
MOV EDX,EAX
CALL 0x00125270
MOV RAX,qword ptr [RBP + -0x10]
MOV RCX,0xfffffeff
AND RCX,qword ptr [RAX + 0x20]
MOV qword ptr [RAX + 0x20],RCX
JMP 0x00132670
LAB_0013262e:
MOV RAX,qword ptr [RBP + -0x10]
MOV EDI,dword ptr [RAX + 0x18]
MOV RAX,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RAX]
MOV EAX,dword ptr [RBP + -0x18]
MOV RCX,qword ptr [RBP + -0x10]
IMUL EAX,dword ptr [RCX + 0x14]
MOV EAX,EAX
MOV EDX,EAX
MOV RAX,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RAX + 0x20]
OR RCX,0x50
CALL 0x0012e230
MOV qword ptr [RBP + -0x20],RAX
CMP RAX,0x0
JNZ 0x0013266e
JMP 0x00132668
LAB_00132668:
MOV byte ptr [RBP + -0x1],0x1
JMP 0x0013268b
LAB_0013266e:
JMP 0x00132670
LAB_00132670:
MOV RCX,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RAX],RCX
MOV ECX,dword ptr [RBP + -0x18]
MOV RAX,qword ptr [RBP + -0x10]
MOV dword ptr [RAX + 0xc],ECX
LAB_00132685:
JMP 0x00132687
LAB_00132687:
MOV byte ptr [RBP + -0x1],0x0
LAB_0013268b:
MOV AL,byte ptr [RBP + -0x1]
ADD RSP,0x20
POP RBP
RET
|
int1 allocate_dynamic(int8 *param_1,uint param_2)
{
int iVar1;
void *local_28;
if (*(uint *)((long)param_1 + 0xc) <= param_2) {
iVar1 = *(int *)(param_1 + 2) * ((param_2 + *(int *)(param_1 + 2)) / *(uint *)(param_1 + 2));
if ((param_1[4] & 0x100) == 0) {
local_28 = (void *)my_realloc(*(int4 *)(param_1 + 3),*param_1,
iVar1 * *(int *)((long)param_1 + 0x14),param_1[4] | 0x50);
if (local_28 == (void *)0x0) {
return 1;
}
}
else {
local_28 = (void *)my_malloc(*(int4 *)(param_1 + 3),
iVar1 * *(int *)((long)param_1 + 0x14),param_1[4] | 0x10);
if (local_28 == (void *)0x0) {
return 0;
}
memcpy(local_28,(void *)*param_1,
(ulong)(uint)(*(int *)(param_1 + 1) * *(int *)((long)param_1 + 0x14)));
param_1[4] = param_1[4] & 0xfffffeff;
}
*param_1 = local_28;
*(int *)((long)param_1 + 0xc) = iVar1;
}
return 0;
}
|
|
57,242
|
ftb_climb_the_tree
|
eloqsql/storage/myisam/ft_boolean_search.c
|
static int _ftb_climb_the_tree(FTB *ftb, FTB_WORD *ftbw, FT_SEG_ITERATOR *ftsi_orig)
{
FT_SEG_ITERATOR ftsi;
FTB_EXPR *ftbe;
float weight=ftbw->weight;
int yn_flag= ftbw->flags, ythresh, mode=(ftsi_orig != 0);
my_off_t curdoc=ftbw->docid[mode];
struct st_mysql_ftparser *parser= ftb->keynr == NO_SUCH_KEY ?
&ft_default_parser :
ftb->info->s->keyinfo[ftb->keynr].parser;
for (ftbe=ftbw->up; ftbe; ftbe=ftbe->up)
{
ythresh = ftbe->ythresh - (mode ? 0 : ftbe->yweaks);
if (ftbe->docid[mode] != curdoc)
{
ftbe->cur_weight=0;
ftbe->yesses=ftbe->nos=0;
ftbe->docid[mode]=curdoc;
}
if (ftbe->nos)
break;
if (yn_flag & FTB_FLAG_YES)
{
weight /= ftbe->ythresh;
ftbe->cur_weight += weight;
if ((int) ++ftbe->yesses == ythresh)
{
yn_flag=ftbe->flags;
weight=ftbe->cur_weight*ftbe->weight;
if (mode && ftbe->phrase)
{
int found= 0;
memcpy(&ftsi, ftsi_orig, sizeof(ftsi));
while (_mi_ft_segiterator(&ftsi) && !found)
{
if (!ftsi.pos)
continue;
found= _ftb_check_phrase(ftb, ftsi.pos, ftsi.len, ftbe, parser);
if (unlikely(found < 0))
return 1;
}
if (!found)
break;
} /* ftbe->quot */
}
else
break;
}
else
if (yn_flag & FTB_FLAG_NO)
{
/*
NOTE: special sort function of queue assures that all
(yn_flag & FTB_FLAG_NO) != 0
events for every particular subexpression will
"auto-magically" happen BEFORE all the
(yn_flag & FTB_FLAG_YES) != 0 events. So no
already matched expression can become not-matched again.
*/
++ftbe->nos;
break;
}
else
{
if (ftbe->ythresh)
weight/=3;
ftbe->cur_weight += weight;
if ((int) ftbe->yesses < ythresh)
break;
if (!(yn_flag & FTB_FLAG_WONLY))
yn_flag= ((int) ftbe->yesses++ == ythresh) ? ftbe->flags : FTB_FLAG_WONLY ;
weight*= ftbe->weight;
}
}
return 0;
}
|
O0
|
c
|
ftb_climb_the_tree:
pushq %rbp
movq %rsp, %rbp
subq $0x90, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq -0x18(%rbp), %rax
movss 0x40(%rax), %xmm0
movss %xmm0, -0x4c(%rbp)
movq -0x18(%rbp), %rax
movl 0x8(%rax), %eax
movl %eax, -0x50(%rbp)
cmpq $0x0, -0x20(%rbp)
setne %al
andb $0x1, %al
movzbl %al, %eax
movl %eax, -0x58(%rbp)
movq -0x18(%rbp), %rax
movslq -0x58(%rbp), %rcx
movq 0x10(%rax,%rcx,8), %rax
movq %rax, -0x60(%rbp)
movq -0x10(%rbp), %rax
cmpl $-0x1, 0x340(%rax)
jne 0x9ec8a
leaq 0x2204fc(%rip), %rax # 0x2bf180
movq %rax, -0x78(%rbp)
jmp 0x9ecb5
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movq (%rax), %rax
movq 0x218(%rax), %rax
movq -0x10(%rbp), %rcx
movl 0x340(%rcx), %ecx
imulq $0x70, %rcx, %rcx
addq %rcx, %rax
movq 0x38(%rax), %rax
movq %rax, -0x78(%rbp)
movq -0x78(%rbp), %rax
movq %rax, -0x68(%rbp)
movq -0x18(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x48(%rbp)
cmpq $0x0, -0x48(%rbp)
je 0x9ef73
movq -0x48(%rbp), %rax
movl 0x48(%rax), %eax
movl %eax, -0x7c(%rbp)
cmpl $0x0, -0x58(%rbp)
je 0x9ecea
xorl %eax, %eax
movl %eax, -0x80(%rbp)
jmp 0x9ecf4
movq -0x48(%rbp), %rax
movl 0x4c(%rax), %eax
movl %eax, -0x80(%rbp)
movl -0x7c(%rbp), %eax
movl -0x80(%rbp), %ecx
subl %ecx, %eax
movl %eax, -0x54(%rbp)
movq -0x48(%rbp), %rax
movslq -0x58(%rbp), %rcx
movq 0x10(%rax,%rcx,8), %rax
cmpq -0x60(%rbp), %rax
je 0x9ed45
movq -0x48(%rbp), %rax
xorps %xmm0, %xmm0
movss %xmm0, 0x2c(%rax)
movq -0x48(%rbp), %rax
movl $0x0, 0x44(%rax)
movq -0x48(%rbp), %rax
movl $0x0, 0x40(%rax)
movq -0x60(%rbp), %rdx
movq -0x48(%rbp), %rax
movslq -0x58(%rbp), %rcx
movq %rdx, 0x10(%rax,%rcx,8)
movq -0x48(%rbp), %rax
cmpl $0x0, 0x44(%rax)
je 0x9ed54
jmp 0x9ef73
movl -0x50(%rbp), %eax
andl $0x2, %eax
cmpl $0x0, %eax
je 0x9eeaa
movq -0x48(%rbp), %rax
movl 0x48(%rax), %eax
cvtsi2ss %rax, %xmm1
movss -0x4c(%rbp), %xmm0
divss %xmm1, %xmm0
movss %xmm0, -0x4c(%rbp)
movss -0x4c(%rbp), %xmm0
movq -0x48(%rbp), %rax
addss 0x2c(%rax), %xmm0
movss %xmm0, 0x2c(%rax)
movq -0x48(%rbp), %rcx
movl 0x40(%rcx), %eax
addl $0x1, %eax
movl %eax, 0x40(%rcx)
cmpl -0x54(%rbp), %eax
jne 0x9eea0
movq -0x48(%rbp), %rax
movl 0x8(%rax), %eax
movl %eax, -0x50(%rbp)
movq -0x48(%rbp), %rax
movss 0x2c(%rax), %xmm0
movq -0x48(%rbp), %rax
mulss 0x28(%rax), %xmm0
movss %xmm0, -0x4c(%rbp)
cmpl $0x0, -0x58(%rbp)
je 0x9ee9e
movq -0x48(%rbp), %rax
cmpq $0x0, 0x30(%rax)
je 0x9ee9e
movl $0x0, -0x6c(%rbp)
movq -0x20(%rbp), %rax
movq (%rax), %rcx
movq %rcx, -0x40(%rbp)
movq 0x8(%rax), %rcx
movq %rcx, -0x38(%rbp)
movq 0x10(%rax), %rcx
movq %rcx, -0x30(%rbp)
movq 0x18(%rax), %rax
movq %rax, -0x28(%rbp)
leaq -0x40(%rbp), %rdi
callq 0xa2ba0
movl %eax, %ecx
xorl %eax, %eax
cmpl $0x0, %ecx
movb %al, -0x81(%rbp)
je 0x9ee31
cmpl $0x0, -0x6c(%rbp)
setne %al
xorb $-0x1, %al
movb %al, -0x81(%rbp)
movb -0x81(%rbp), %al
testb $0x1, %al
jne 0x9ee3d
jmp 0x9ee91
cmpq $0x0, -0x28(%rbp)
jne 0x9ee46
jmp 0x9ee0a
movq -0x10(%rbp), %rdi
movq -0x28(%rbp), %rsi
movl -0x3c(%rbp), %edx
movq -0x48(%rbp), %rcx
movq -0x68(%rbp), %r8
callq 0x9fec0
movl %eax, -0x6c(%rbp)
cmpl $0x0, -0x6c(%rbp)
setl %al
andb $0x1, %al
movzbl %al, %eax
cmpl $0x0, %eax
setne %al
andb $0x1, %al
movzbl %al, %eax
cltq
cmpq $0x0, %rax
je 0x9ee8c
movl $0x1, -0x4(%rbp)
jmp 0x9ef7a
jmp 0x9ee0a
cmpl $0x0, -0x6c(%rbp)
jne 0x9ee9c
jmp 0x9ef73
jmp 0x9ee9e
jmp 0x9eea5
jmp 0x9ef73
jmp 0x9ef61
movl -0x50(%rbp), %eax
andl $0x4, %eax
cmpl $0x0, %eax
je 0x9eec7
movq -0x48(%rbp), %rax
movl 0x44(%rax), %ecx
addl $0x1, %ecx
movl %ecx, 0x44(%rax)
jmp 0x9ef73
movq -0x48(%rbp), %rax
cmpl $0x0, 0x48(%rax)
je 0x9eee7
movss -0x4c(%rbp), %xmm0
movss 0xb212e(%rip), %xmm1 # 0x15100c
divss %xmm1, %xmm0
movss %xmm0, -0x4c(%rbp)
movss -0x4c(%rbp), %xmm0
movq -0x48(%rbp), %rax
addss 0x2c(%rax), %xmm0
movss %xmm0, 0x2c(%rax)
movq -0x48(%rbp), %rax
movl 0x40(%rax), %eax
cmpl -0x54(%rbp), %eax
jge 0x9ef08
jmp 0x9ef73
movl -0x50(%rbp), %eax
andl $0x8, %eax
cmpl $0x0, %eax
jne 0x9ef4c
movq -0x48(%rbp), %rcx
movl 0x40(%rcx), %eax
movl %eax, %edx
addl $0x1, %edx
movl %edx, 0x40(%rcx)
cmpl -0x54(%rbp), %eax
jne 0x9ef36
movq -0x48(%rbp), %rax
movl 0x8(%rax), %eax
movl %eax, -0x88(%rbp)
jmp 0x9ef43
movl $0x8, %eax
movl %eax, -0x88(%rbp)
jmp 0x9ef43
movl -0x88(%rbp), %eax
movl %eax, -0x50(%rbp)
movq -0x48(%rbp), %rax
movss 0x28(%rax), %xmm0
mulss -0x4c(%rbp), %xmm0
movss %xmm0, -0x4c(%rbp)
jmp 0x9ef61
jmp 0x9ef63
movq -0x48(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x48(%rbp)
jmp 0x9ecc8
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x90, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
|
_ftb_climb_the_tree:
push rbp
mov rbp, rsp
sub rsp, 90h
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov [rbp+var_20], rdx
mov rax, [rbp+var_18]
movss xmm0, dword ptr [rax+40h]
movss [rbp+var_4C], xmm0
mov rax, [rbp+var_18]
mov eax, [rax+8]
mov [rbp+var_50], eax
cmp [rbp+var_20], 0
setnz al
and al, 1
movzx eax, al
mov [rbp+var_58], eax
mov rax, [rbp+var_18]
movsxd rcx, [rbp+var_58]
mov rax, [rax+rcx*8+10h]
mov [rbp+var_60], rax
mov rax, [rbp+var_10]
cmp dword ptr [rax+340h], 0FFFFFFFFh
jnz short loc_9EC8A
lea rax, ft_default_parser
mov [rbp+var_78], rax
jmp short loc_9ECB5
loc_9EC8A:
mov rax, [rbp+var_10]
mov rax, [rax+8]
mov rax, [rax]
mov rax, [rax+218h]
mov rcx, [rbp+var_10]
mov ecx, [rcx+340h]
imul rcx, 70h ; 'p'
add rax, rcx
mov rax, [rax+38h]
mov [rbp+var_78], rax
loc_9ECB5:
mov rax, [rbp+var_78]
mov [rbp+var_68], rax
mov rax, [rbp+var_18]
mov rax, [rax]
mov [rbp+var_48], rax
loc_9ECC8:
cmp [rbp+var_48], 0
jz loc_9EF73
mov rax, [rbp+var_48]
mov eax, [rax+48h]
mov [rbp+var_7C], eax
cmp [rbp+var_58], 0
jz short loc_9ECEA
xor eax, eax
mov [rbp+var_80], eax
jmp short loc_9ECF4
loc_9ECEA:
mov rax, [rbp+var_48]
mov eax, [rax+4Ch]
mov [rbp+var_80], eax
loc_9ECF4:
mov eax, [rbp+var_7C]
mov ecx, [rbp+var_80]
sub eax, ecx
mov [rbp+var_54], eax
mov rax, [rbp+var_48]
movsxd rcx, [rbp+var_58]
mov rax, [rax+rcx*8+10h]
cmp rax, [rbp+var_60]
jz short loc_9ED45
mov rax, [rbp+var_48]
xorps xmm0, xmm0
movss dword ptr [rax+2Ch], xmm0
mov rax, [rbp+var_48]
mov dword ptr [rax+44h], 0
mov rax, [rbp+var_48]
mov dword ptr [rax+40h], 0
mov rdx, [rbp+var_60]
mov rax, [rbp+var_48]
movsxd rcx, [rbp+var_58]
mov [rax+rcx*8+10h], rdx
loc_9ED45:
mov rax, [rbp+var_48]
cmp dword ptr [rax+44h], 0
jz short loc_9ED54
jmp loc_9EF73
loc_9ED54:
mov eax, [rbp+var_50]
and eax, 2
cmp eax, 0
jz loc_9EEAA
mov rax, [rbp+var_48]
mov eax, [rax+48h]
cvtsi2ss xmm1, rax
movss xmm0, [rbp+var_4C]
divss xmm0, xmm1
movss [rbp+var_4C], xmm0
movss xmm0, [rbp+var_4C]
mov rax, [rbp+var_48]
addss xmm0, dword ptr [rax+2Ch]
movss dword ptr [rax+2Ch], xmm0
mov rcx, [rbp+var_48]
mov eax, [rcx+40h]
add eax, 1
mov [rcx+40h], eax
cmp eax, [rbp+var_54]
jnz loc_9EEA0
mov rax, [rbp+var_48]
mov eax, [rax+8]
mov [rbp+var_50], eax
mov rax, [rbp+var_48]
movss xmm0, dword ptr [rax+2Ch]
mov rax, [rbp+var_48]
mulss xmm0, dword ptr [rax+28h]
movss [rbp+var_4C], xmm0
cmp [rbp+var_58], 0
jz loc_9EE9E
mov rax, [rbp+var_48]
cmp qword ptr [rax+30h], 0
jz loc_9EE9E
mov [rbp+var_6C], 0
mov rax, [rbp+var_20]
mov rcx, [rax]
mov [rbp+var_40], rcx
mov rcx, [rax+8]
mov [rbp+var_38], rcx
mov rcx, [rax+10h]
mov [rbp+var_30], rcx
mov rax, [rax+18h]
mov [rbp+var_28], rax
loc_9EE0A:
lea rdi, [rbp+var_40]
call _mi_ft_segiterator
mov ecx, eax
xor eax, eax
cmp ecx, 0
mov [rbp+var_81], al
jz short loc_9EE31
cmp [rbp+var_6C], 0
setnz al
xor al, 0FFh
mov [rbp+var_81], al
loc_9EE31:
mov al, [rbp+var_81]
test al, 1
jnz short loc_9EE3D
jmp short loc_9EE91
loc_9EE3D:
cmp [rbp+var_28], 0
jnz short loc_9EE46
jmp short loc_9EE0A
loc_9EE46:
mov rdi, [rbp+var_10]
mov rsi, [rbp+var_28]
mov edx, dword ptr [rbp+var_40+4]
mov rcx, [rbp+var_48]
mov r8, [rbp+var_68]
call _ftb_check_phrase
mov [rbp+var_6C], eax
cmp [rbp+var_6C], 0
setl al
and al, 1
movzx eax, al
cmp eax, 0
setnz al
and al, 1
movzx eax, al
cdqe
cmp rax, 0
jz short loc_9EE8C
mov [rbp+var_4], 1
jmp loc_9EF7A
loc_9EE8C:
jmp loc_9EE0A
loc_9EE91:
cmp [rbp+var_6C], 0
jnz short loc_9EE9C
jmp loc_9EF73
loc_9EE9C:
jmp short $+2
loc_9EE9E:
jmp short loc_9EEA5
loc_9EEA0:
jmp loc_9EF73
loc_9EEA5:
jmp loc_9EF61
loc_9EEAA:
mov eax, [rbp+var_50]
and eax, 4
cmp eax, 0
jz short loc_9EEC7
mov rax, [rbp+var_48]
mov ecx, [rax+44h]
add ecx, 1
mov [rax+44h], ecx
jmp loc_9EF73
loc_9EEC7:
mov rax, [rbp+var_48]
cmp dword ptr [rax+48h], 0
jz short loc_9EEE7
movss xmm0, [rbp+var_4C]
movss xmm1, cs:dword_15100C
divss xmm0, xmm1
movss [rbp+var_4C], xmm0
loc_9EEE7:
movss xmm0, [rbp+var_4C]
mov rax, [rbp+var_48]
addss xmm0, dword ptr [rax+2Ch]
movss dword ptr [rax+2Ch], xmm0
mov rax, [rbp+var_48]
mov eax, [rax+40h]
cmp eax, [rbp+var_54]
jge short loc_9EF08
jmp short loc_9EF73
loc_9EF08:
mov eax, [rbp+var_50]
and eax, 8
cmp eax, 0
jnz short loc_9EF4C
mov rcx, [rbp+var_48]
mov eax, [rcx+40h]
mov edx, eax
add edx, 1
mov [rcx+40h], edx
cmp eax, [rbp+var_54]
jnz short loc_9EF36
mov rax, [rbp+var_48]
mov eax, [rax+8]
mov [rbp+var_88], eax
jmp short loc_9EF43
loc_9EF36:
mov eax, 8
mov [rbp+var_88], eax
jmp short $+2
loc_9EF43:
mov eax, [rbp+var_88]
mov [rbp+var_50], eax
loc_9EF4C:
mov rax, [rbp+var_48]
movss xmm0, dword ptr [rax+28h]
mulss xmm0, [rbp+var_4C]
movss [rbp+var_4C], xmm0
jmp short $+2
loc_9EF61:
jmp short $+2
loc_9EF63:
mov rax, [rbp+var_48]
mov rax, [rax]
mov [rbp+var_48], rax
jmp loc_9ECC8
loc_9EF73:
mov [rbp+var_4], 0
loc_9EF7A:
mov eax, [rbp+var_4]
add rsp, 90h
pop rbp
retn
|
long long ftb_climb_the_tree(long long a1, long long a2, _QWORD *a3)
{
int v3; // eax
int v4; // eax
int v6; // [rsp+8h] [rbp-88h]
char v7; // [rsp+Fh] [rbp-81h]
int v8; // [rsp+10h] [rbp-80h]
void *v9; // [rsp+18h] [rbp-78h]
int v10; // [rsp+24h] [rbp-6Ch]
long long v11; // [rsp+30h] [rbp-60h]
BOOL v12; // [rsp+38h] [rbp-58h]
int v13; // [rsp+3Ch] [rbp-54h]
int v14; // [rsp+40h] [rbp-50h]
float v15; // [rsp+44h] [rbp-4Ch]
long long *i; // [rsp+48h] [rbp-48h]
_QWORD v17[3]; // [rsp+50h] [rbp-40h] BYREF
long long v18; // [rsp+68h] [rbp-28h]
_QWORD *v19; // [rsp+70h] [rbp-20h]
long long **v20; // [rsp+78h] [rbp-18h]
long long v21; // [rsp+80h] [rbp-10h]
v21 = a1;
v20 = (long long **)a2;
v19 = a3;
v15 = *(float *)(a2 + 64);
v14 = *(_DWORD *)(a2 + 8);
v12 = a3 != 0LL;
v11 = *(_QWORD *)(a2 + 8LL * (a3 != 0LL) + 16);
if ( *(_DWORD *)(a1 + 832) == -1 )
v9 = &ft_default_parser;
else
v9 = *(void **)(112LL * *(unsigned int *)(v21 + 832) + *(_QWORD *)(**(_QWORD **)(v21 + 8) + 536LL) + 56);
for ( i = *v20; i; i = (long long *)*i )
{
if ( v12 )
v8 = 0;
else
v8 = *((_DWORD *)i + 19);
v13 = *((_DWORD *)i + 18) - v8;
if ( i[v12 + 2] != v11 )
{
*((_DWORD *)i + 11) = 0;
*((_DWORD *)i + 17) = 0;
*((_DWORD *)i + 16) = 0;
i[v12 + 2] = v11;
}
if ( *((_DWORD *)i + 17) )
break;
if ( (v14 & 2) != 0 )
{
*((float *)i + 11) = (float)(v15 / (float)*((int *)i + 18)) + *((float *)i + 11);
v3 = *((_DWORD *)i + 16) + 1;
*((_DWORD *)i + 16) = v3;
if ( v3 != v13 )
break;
v14 = *((_DWORD *)i + 2);
v15 = *((float *)i + 11) * *((float *)i + 10);
if ( v12 )
{
if ( i[6] )
{
v10 = 0;
v17[0] = *v19;
v17[1] = v19[1];
v17[2] = v19[2];
v18 = v19[3];
while ( 1 )
{
v7 = 0;
if ( (unsigned int)mi_ft_segiterator(v17) )
v7 = ~(v10 != 0);
if ( (v7 & 1) == 0 )
break;
if ( v18 )
{
v10 = ftb_check_phrase(v21, v18, HIDWORD(v17[0]), i, v9);
if ( v10 < 0 )
return 1;
}
}
if ( !v10 )
break;
}
}
}
else
{
if ( (v14 & 4) != 0 )
{
++*((_DWORD *)i + 17);
break;
}
if ( *((_DWORD *)i + 18) )
v15 = v15 / 3.0;
*((float *)i + 11) = v15 + *((float *)i + 11);
if ( *((_DWORD *)i + 16) < v13 )
break;
if ( (v14 & 8) == 0 )
{
v4 = *((_DWORD *)i + 16);
*((_DWORD *)i + 16) = v4 + 1;
if ( v4 == v13 )
v6 = *((_DWORD *)i + 2);
else
LOBYTE(v6) = 8;
LOBYTE(v14) = v6;
}
v15 = *((float *)i + 10) * v15;
}
}
return 0;
}
|
_ftb_climb_the_tree:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x90
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x18],RSI
MOV qword ptr [RBP + -0x20],RDX
MOV RAX,qword ptr [RBP + -0x18]
MOVSS XMM0,dword ptr [RAX + 0x40]
MOVSS dword ptr [RBP + -0x4c],XMM0
MOV RAX,qword ptr [RBP + -0x18]
MOV EAX,dword ptr [RAX + 0x8]
MOV dword ptr [RBP + -0x50],EAX
CMP qword ptr [RBP + -0x20],0x0
SETNZ AL
AND AL,0x1
MOVZX EAX,AL
MOV dword ptr [RBP + -0x58],EAX
MOV RAX,qword ptr [RBP + -0x18]
MOVSXD RCX,dword ptr [RBP + -0x58]
MOV RAX,qword ptr [RAX + RCX*0x8 + 0x10]
MOV qword ptr [RBP + -0x60],RAX
MOV RAX,qword ptr [RBP + -0x10]
CMP dword ptr [RAX + 0x340],-0x1
JNZ 0x0019ec8a
LEA RAX,[0x3bf180]
MOV qword ptr [RBP + -0x78],RAX
JMP 0x0019ecb5
LAB_0019ec8a:
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x8]
MOV RAX,qword ptr [RAX]
MOV RAX,qword ptr [RAX + 0x218]
MOV RCX,qword ptr [RBP + -0x10]
MOV ECX,dword ptr [RCX + 0x340]
IMUL RCX,RCX,0x70
ADD RAX,RCX
MOV RAX,qword ptr [RAX + 0x38]
MOV qword ptr [RBP + -0x78],RAX
LAB_0019ecb5:
MOV RAX,qword ptr [RBP + -0x78]
MOV qword ptr [RBP + -0x68],RAX
MOV RAX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x48],RAX
LAB_0019ecc8:
CMP qword ptr [RBP + -0x48],0x0
JZ 0x0019ef73
MOV RAX,qword ptr [RBP + -0x48]
MOV EAX,dword ptr [RAX + 0x48]
MOV dword ptr [RBP + -0x7c],EAX
CMP dword ptr [RBP + -0x58],0x0
JZ 0x0019ecea
XOR EAX,EAX
MOV dword ptr [RBP + -0x80],EAX
JMP 0x0019ecf4
LAB_0019ecea:
MOV RAX,qword ptr [RBP + -0x48]
MOV EAX,dword ptr [RAX + 0x4c]
MOV dword ptr [RBP + -0x80],EAX
LAB_0019ecf4:
MOV EAX,dword ptr [RBP + -0x7c]
MOV ECX,dword ptr [RBP + -0x80]
SUB EAX,ECX
MOV dword ptr [RBP + -0x54],EAX
MOV RAX,qword ptr [RBP + -0x48]
MOVSXD RCX,dword ptr [RBP + -0x58]
MOV RAX,qword ptr [RAX + RCX*0x8 + 0x10]
CMP RAX,qword ptr [RBP + -0x60]
JZ 0x0019ed45
MOV RAX,qword ptr [RBP + -0x48]
XORPS XMM0,XMM0
MOVSS dword ptr [RAX + 0x2c],XMM0
MOV RAX,qword ptr [RBP + -0x48]
MOV dword ptr [RAX + 0x44],0x0
MOV RAX,qword ptr [RBP + -0x48]
MOV dword ptr [RAX + 0x40],0x0
MOV RDX,qword ptr [RBP + -0x60]
MOV RAX,qword ptr [RBP + -0x48]
MOVSXD RCX,dword ptr [RBP + -0x58]
MOV qword ptr [RAX + RCX*0x8 + 0x10],RDX
LAB_0019ed45:
MOV RAX,qword ptr [RBP + -0x48]
CMP dword ptr [RAX + 0x44],0x0
JZ 0x0019ed54
JMP 0x0019ef73
LAB_0019ed54:
MOV EAX,dword ptr [RBP + -0x50]
AND EAX,0x2
CMP EAX,0x0
JZ 0x0019eeaa
MOV RAX,qword ptr [RBP + -0x48]
MOV EAX,dword ptr [RAX + 0x48]
CVTSI2SS XMM1,RAX
MOVSS XMM0,dword ptr [RBP + -0x4c]
DIVSS XMM0,XMM1
MOVSS dword ptr [RBP + -0x4c],XMM0
MOVSS XMM0,dword ptr [RBP + -0x4c]
MOV RAX,qword ptr [RBP + -0x48]
ADDSS XMM0,dword ptr [RAX + 0x2c]
MOVSS dword ptr [RAX + 0x2c],XMM0
MOV RCX,qword ptr [RBP + -0x48]
MOV EAX,dword ptr [RCX + 0x40]
ADD EAX,0x1
MOV dword ptr [RCX + 0x40],EAX
CMP EAX,dword ptr [RBP + -0x54]
JNZ 0x0019eea0
MOV RAX,qword ptr [RBP + -0x48]
MOV EAX,dword ptr [RAX + 0x8]
MOV dword ptr [RBP + -0x50],EAX
MOV RAX,qword ptr [RBP + -0x48]
MOVSS XMM0,dword ptr [RAX + 0x2c]
MOV RAX,qword ptr [RBP + -0x48]
MULSS XMM0,dword ptr [RAX + 0x28]
MOVSS dword ptr [RBP + -0x4c],XMM0
CMP dword ptr [RBP + -0x58],0x0
JZ 0x0019ee9e
MOV RAX,qword ptr [RBP + -0x48]
CMP qword ptr [RAX + 0x30],0x0
JZ 0x0019ee9e
MOV dword ptr [RBP + -0x6c],0x0
MOV RAX,qword ptr [RBP + -0x20]
MOV RCX,qword ptr [RAX]
MOV qword ptr [RBP + -0x40],RCX
MOV RCX,qword ptr [RAX + 0x8]
MOV qword ptr [RBP + -0x38],RCX
MOV RCX,qword ptr [RAX + 0x10]
MOV qword ptr [RBP + -0x30],RCX
MOV RAX,qword ptr [RAX + 0x18]
MOV qword ptr [RBP + -0x28],RAX
LAB_0019ee0a:
LEA RDI,[RBP + -0x40]
CALL 0x001a2ba0
MOV ECX,EAX
XOR EAX,EAX
CMP ECX,0x0
MOV byte ptr [RBP + -0x81],AL
JZ 0x0019ee31
CMP dword ptr [RBP + -0x6c],0x0
SETNZ AL
XOR AL,0xff
MOV byte ptr [RBP + -0x81],AL
LAB_0019ee31:
MOV AL,byte ptr [RBP + -0x81]
TEST AL,0x1
JNZ 0x0019ee3d
JMP 0x0019ee91
LAB_0019ee3d:
CMP qword ptr [RBP + -0x28],0x0
JNZ 0x0019ee46
JMP 0x0019ee0a
LAB_0019ee46:
MOV RDI,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RBP + -0x28]
MOV EDX,dword ptr [RBP + -0x3c]
MOV RCX,qword ptr [RBP + -0x48]
MOV R8,qword ptr [RBP + -0x68]
CALL 0x0019fec0
MOV dword ptr [RBP + -0x6c],EAX
CMP dword ptr [RBP + -0x6c],0x0
SETL AL
AND AL,0x1
MOVZX EAX,AL
CMP EAX,0x0
SETNZ AL
AND AL,0x1
MOVZX EAX,AL
CDQE
CMP RAX,0x0
JZ 0x0019ee8c
MOV dword ptr [RBP + -0x4],0x1
JMP 0x0019ef7a
LAB_0019ee8c:
JMP 0x0019ee0a
LAB_0019ee91:
CMP dword ptr [RBP + -0x6c],0x0
JNZ 0x0019ee9c
JMP 0x0019ef73
LAB_0019ee9c:
JMP 0x0019ee9e
LAB_0019ee9e:
JMP 0x0019eea5
LAB_0019eea0:
JMP 0x0019ef73
LAB_0019eea5:
JMP 0x0019ef61
LAB_0019eeaa:
MOV EAX,dword ptr [RBP + -0x50]
AND EAX,0x4
CMP EAX,0x0
JZ 0x0019eec7
MOV RAX,qword ptr [RBP + -0x48]
MOV ECX,dword ptr [RAX + 0x44]
ADD ECX,0x1
MOV dword ptr [RAX + 0x44],ECX
JMP 0x0019ef73
LAB_0019eec7:
MOV RAX,qword ptr [RBP + -0x48]
CMP dword ptr [RAX + 0x48],0x0
JZ 0x0019eee7
MOVSS XMM0,dword ptr [RBP + -0x4c]
MOVSS XMM1,dword ptr [0x0025100c]
DIVSS XMM0,XMM1
MOVSS dword ptr [RBP + -0x4c],XMM0
LAB_0019eee7:
MOVSS XMM0,dword ptr [RBP + -0x4c]
MOV RAX,qword ptr [RBP + -0x48]
ADDSS XMM0,dword ptr [RAX + 0x2c]
MOVSS dword ptr [RAX + 0x2c],XMM0
MOV RAX,qword ptr [RBP + -0x48]
MOV EAX,dword ptr [RAX + 0x40]
CMP EAX,dword ptr [RBP + -0x54]
JGE 0x0019ef08
JMP 0x0019ef73
LAB_0019ef08:
MOV EAX,dword ptr [RBP + -0x50]
AND EAX,0x8
CMP EAX,0x0
JNZ 0x0019ef4c
MOV RCX,qword ptr [RBP + -0x48]
MOV EAX,dword ptr [RCX + 0x40]
MOV EDX,EAX
ADD EDX,0x1
MOV dword ptr [RCX + 0x40],EDX
CMP EAX,dword ptr [RBP + -0x54]
JNZ 0x0019ef36
MOV RAX,qword ptr [RBP + -0x48]
MOV EAX,dword ptr [RAX + 0x8]
MOV dword ptr [RBP + -0x88],EAX
JMP 0x0019ef43
LAB_0019ef36:
MOV EAX,0x8
MOV dword ptr [RBP + -0x88],EAX
JMP 0x0019ef43
LAB_0019ef43:
MOV EAX,dword ptr [RBP + -0x88]
MOV dword ptr [RBP + -0x50],EAX
LAB_0019ef4c:
MOV RAX,qword ptr [RBP + -0x48]
MOVSS XMM0,dword ptr [RAX + 0x28]
MULSS XMM0,dword ptr [RBP + -0x4c]
MOVSS dword ptr [RBP + -0x4c],XMM0
JMP 0x0019ef61
LAB_0019ef61:
JMP 0x0019ef63
LAB_0019ef63:
MOV RAX,qword ptr [RBP + -0x48]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x48],RAX
JMP 0x0019ecc8
LAB_0019ef73:
MOV dword ptr [RBP + -0x4],0x0
LAB_0019ef7a:
MOV EAX,dword ptr [RBP + -0x4]
ADD RSP,0x90
POP RBP
RET
|
int4 _ftb_climb_the_tree(long param_1,int8 *param_2,int8 *param_3)
{
long lVar1;
uint uVar2;
int iVar3;
uint local_90;
int local_88;
int1 *local_80;
int local_74;
uint local_58;
float local_54;
int8 *local_50;
int8 local_48;
int8 local_40;
int8 local_38;
long local_30;
int8 *local_28;
int8 *local_20;
long local_18;
local_54 = *(float *)(param_2 + 8);
local_58 = *(uint *)(param_2 + 1);
uVar2 = (uint)(param_3 != (int8 *)0x0);
lVar1 = param_2[(long)(int)uVar2 + 2];
if (*(int *)(param_1 + 0x340) == -1) {
local_80 = ft_default_parser;
}
else {
local_80 = *(int1 **)
(*(long *)(**(long **)(param_1 + 8) + 0x218) +
(ulong)*(uint *)(param_1 + 0x340) * 0x70 + 0x38);
}
local_50 = (int8 *)*param_2;
local_28 = param_3;
local_20 = param_2;
local_18 = param_1;
do {
if (local_50 == (int8 *)0x0) {
return 0;
}
if (uVar2 == 0) {
local_88 = *(int *)((long)local_50 + 0x4c);
}
else {
local_88 = 0;
}
local_88 = *(int *)(local_50 + 9) - local_88;
if (local_50[(long)(int)uVar2 + 2] != lVar1) {
*(int4 *)((long)local_50 + 0x2c) = 0;
*(int4 *)((long)local_50 + 0x44) = 0;
*(int4 *)(local_50 + 8) = 0;
local_50[(long)(int)uVar2 + 2] = lVar1;
}
if (*(int *)((long)local_50 + 0x44) != 0) {
return 0;
}
if ((local_58 & 2) == 0) {
if ((local_58 & 4) != 0) {
*(int *)((long)local_50 + 0x44) = *(int *)((long)local_50 + 0x44) + 1;
return 0;
}
if (*(int *)(local_50 + 9) != 0) {
local_54 = local_54 / DAT_0025100c;
}
*(float *)((long)local_50 + 0x2c) = local_54 + *(float *)((long)local_50 + 0x2c);
if (*(int *)(local_50 + 8) < local_88) {
return 0;
}
if ((local_58 & 8) == 0) {
iVar3 = *(int *)(local_50 + 8);
*(int *)(local_50 + 8) = iVar3 + 1;
if (iVar3 == local_88) {
local_90 = *(uint *)(local_50 + 1);
}
else {
local_90 = 8;
}
local_58 = local_90;
}
local_54 = *(float *)(local_50 + 5) * local_54;
}
else {
*(float *)((long)local_50 + 0x2c) =
local_54 / (float)*(uint *)(local_50 + 9) + *(float *)((long)local_50 + 0x2c);
iVar3 = *(int *)(local_50 + 8);
*(int *)(local_50 + 8) = iVar3 + 1;
if (iVar3 + 1 != local_88) {
return 0;
}
local_58 = *(uint *)(local_50 + 1);
local_54 = *(float *)((long)local_50 + 0x2c) * *(float *)(local_50 + 5);
if ((uVar2 != 0) && (local_50[6] != 0)) {
local_74 = 0;
local_48 = *local_28;
local_40 = local_28[1];
local_38 = local_28[2];
local_30 = local_28[3];
while (iVar3 = _mi_ft_segiterator(&local_48), iVar3 != 0 && local_74 == 0) {
if (local_30 != 0) {
local_74 = _ftb_check_phrase(local_18,local_30,local_48._4_4_,local_50,local_80);
if (local_74 < 0) {
return 1;
}
}
}
if (local_74 == 0) {
return 0;
}
}
}
local_50 = (int8 *)*local_50;
} while( true );
}
|
|
57,243
|
ftb_climb_the_tree
|
eloqsql/storage/myisam/ft_boolean_search.c
|
static int _ftb_climb_the_tree(FTB *ftb, FTB_WORD *ftbw, FT_SEG_ITERATOR *ftsi_orig)
{
FT_SEG_ITERATOR ftsi;
FTB_EXPR *ftbe;
float weight=ftbw->weight;
int yn_flag= ftbw->flags, ythresh, mode=(ftsi_orig != 0);
my_off_t curdoc=ftbw->docid[mode];
struct st_mysql_ftparser *parser= ftb->keynr == NO_SUCH_KEY ?
&ft_default_parser :
ftb->info->s->keyinfo[ftb->keynr].parser;
for (ftbe=ftbw->up; ftbe; ftbe=ftbe->up)
{
ythresh = ftbe->ythresh - (mode ? 0 : ftbe->yweaks);
if (ftbe->docid[mode] != curdoc)
{
ftbe->cur_weight=0;
ftbe->yesses=ftbe->nos=0;
ftbe->docid[mode]=curdoc;
}
if (ftbe->nos)
break;
if (yn_flag & FTB_FLAG_YES)
{
weight /= ftbe->ythresh;
ftbe->cur_weight += weight;
if ((int) ++ftbe->yesses == ythresh)
{
yn_flag=ftbe->flags;
weight=ftbe->cur_weight*ftbe->weight;
if (mode && ftbe->phrase)
{
int found= 0;
memcpy(&ftsi, ftsi_orig, sizeof(ftsi));
while (_mi_ft_segiterator(&ftsi) && !found)
{
if (!ftsi.pos)
continue;
found= _ftb_check_phrase(ftb, ftsi.pos, ftsi.len, ftbe, parser);
if (unlikely(found < 0))
return 1;
}
if (!found)
break;
} /* ftbe->quot */
}
else
break;
}
else
if (yn_flag & FTB_FLAG_NO)
{
/*
NOTE: special sort function of queue assures that all
(yn_flag & FTB_FLAG_NO) != 0
events for every particular subexpression will
"auto-magically" happen BEFORE all the
(yn_flag & FTB_FLAG_YES) != 0 events. So no
already matched expression can become not-matched again.
*/
++ftbe->nos;
break;
}
else
{
if (ftbe->ythresh)
weight/=3;
ftbe->cur_weight += weight;
if ((int) ftbe->yesses < ythresh)
break;
if (!(yn_flag & FTB_FLAG_WONLY))
yn_flag= ((int) ftbe->yesses++ == ythresh) ? ftbe->flags : FTB_FLAG_WONLY ;
weight*= ftbe->weight;
}
}
return 0;
}
|
O3
|
c
|
ftb_climb_the_tree:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x78, %rsp
movq %rdx, %r15
movq %rdi, %r14
xorl %r12d, %r12d
testq %rdx, %rdx
setne %al
movl 0x340(%rdi), %ecx
movl $0xffffffff, %edx # imm = 0xFFFFFFFF
cmpq %rdx, %rcx
je 0x71db9
movq 0x8(%r14), %rdx
movq (%rdx), %rdx
movq 0x218(%rdx), %rdx
imulq $0x70, %rcx, %rcx
movq 0x38(%rdx,%rcx), %rcx
jmp 0x71dc0
leaq 0x313540(%rip), %rcx # 0x385300
movq %rcx, -0x38(%rbp)
movq (%rsi), %rbx
testq %rbx, %rbx
je 0x72014
movb %al, %r12b
movss 0x40(%rsi), %xmm1
movl 0x8(%rsi), %edi
movq 0x10(%rsi,%r12,8), %rsi
movss 0x67224(%rip), %xmm2 # 0xd900c
movq %r15, -0x50(%rbp)
movq %r12, -0x48(%rbp)
movq %rsi, -0x40(%rbp)
xorl %edx, %edx
testq %r15, %r15
jne 0x71dfe
movl 0x4c(%rbx), %edx
movl 0x48(%rbx), %ecx
cmpq %rsi, 0x10(%rbx,%r12,8)
jne 0x71e13
cmpl $0x0, 0x44(%rbx)
je 0x71e27
jmp 0x72014
movl $0x0, 0x2c(%rbx)
movq $0x0, 0x40(%rbx)
movq %rsi, 0x10(%rbx,%r12,8)
movl %ecx, %r8d
subl %edx, %r8d
testb $0x2, %dil
jne 0x71e79
testb $0x4, %dil
jne 0x7200d
movaps %xmm1, %xmm0
divss %xmm2, %xmm0
testl %ecx, %ecx
je 0x71e4b
movaps %xmm0, %xmm1
movss 0x2c(%rbx), %xmm0
addss %xmm1, %xmm0
movss %xmm0, 0x2c(%rbx)
movl 0x40(%rbx), %ecx
cmpl %r8d, %ecx
jl 0x72014
testb $0x8, %dil
je 0x71ff1
mulss 0x28(%rbx), %xmm1
jmp 0x71fe3
movl %ecx, %ecx
xorps %xmm0, %xmm0
cvtsi2ss %rcx, %xmm0
divss %xmm0, %xmm1
addss 0x2c(%rbx), %xmm1
movss %xmm1, 0x2c(%rbx)
movl 0x40(%rbx), %ecx
incl %ecx
movl %ecx, 0x40(%rbx)
xorl %eax, %eax
cmpl %r8d, %ecx
jne 0x72016
movl 0x8(%rbx), %edi
mulss 0x28(%rbx), %xmm1
testq %r15, %r15
je 0x71fe3
cmpq $0x0, 0x30(%rbx)
je 0x71fe3
movl %edi, -0x2c(%rbp)
movss %xmm1, -0x30(%rbp)
movups (%r15), %xmm0
movups 0x10(%r15), %xmm1
movaps %xmm1, -0x60(%rbp)
movaps %xmm0, -0x70(%rbp)
leaq -0x70(%rbp), %rdi
callq 0x73fc6
testl %eax, %eax
je 0x72014
movq -0x58(%rbp), %r12
testq %r12, %r12
je 0x71ed9
movl -0x6c(%rbp), %r15d
movq 0x8(%r14), %rdi
movl 0x340(%r14), %esi
movl $0x1, %edx
callq 0x73e01
testq %rax, %rax
je 0x71fa4
movq %rax, %r13
movq 0x30(%rbx), %rdi
movq %rdi, -0x98(%rbp)
movq 0x38(%rbx), %rax
movq %rax, -0x90(%rbp)
movq 0x10(%r14), %rax
movq %rax, -0x88(%rbp)
callq 0x94785
movl %eax, -0x80(%rbp)
movq $0x1, -0x7c(%rbp)
leaq 0xaaf(%rip), %rax # 0x729ff
movq %rax, (%r13)
leaq 0xb0d(%rip), %rax # 0x72a68
movq %rax, 0x8(%r13)
leaq -0x98(%rbp), %rax
movq %rax, 0x18(%r13)
movq 0x10(%r14), %rax
movq %rax, 0x20(%r13)
movq %r12, 0x28(%r13)
movl %r15d, 0x30(%r13)
movabsq $0x100000000, %rax # imm = 0x100000000
movq %rax, 0x34(%r13)
movq %r13, %rdi
movq -0x38(%rbp), %rax
callq *0x8(%rax)
testl %eax, %eax
jne 0x72025
cmpl $0x0, -0x78(%rbp)
sete %r15b
jmp 0x71fa7
movb $0x1, %r15b
leaq -0x70(%rbp), %rdi
callq 0x73fc6
testl %eax, %eax
je 0x71fbd
testb %r15b, %r15b
jne 0x71eea
testb %r15b, %r15b
movq -0x50(%rbp), %r15
movq -0x48(%rbp), %r12
movss -0x30(%rbp), %xmm1
movq -0x40(%rbp), %rsi
movss 0x67033(%rip), %xmm2 # 0xd900c
movl -0x2c(%rbp), %edi
movl $0x0, %eax
jne 0x72016
movq (%rbx), %rbx
testq %rbx, %rbx
jne 0x71df4
jmp 0x72014
leal 0x1(%rcx), %edx
movl %edx, 0x40(%rbx)
movl $0x8, %edi
cmpl %r8d, %ecx
jne 0x71e6f
movl 0x8(%rbx), %edi
jmp 0x71e6f
movl $0x1, 0x44(%rbx)
xorl %eax, %eax
addq $0x78, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl $0x1, %eax
jmp 0x72016
|
_ftb_climb_the_tree:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 78h
mov r15, rdx
mov r14, rdi
xor r12d, r12d
test rdx, rdx
setnz al
mov ecx, [rdi+340h]
mov edx, 0FFFFFFFFh
cmp rcx, rdx
jz short loc_71DB9
mov rdx, [r14+8]
mov rdx, [rdx]
mov rdx, [rdx+218h]
imul rcx, 70h ; 'p'
mov rcx, [rdx+rcx+38h]
jmp short loc_71DC0
loc_71DB9:
lea rcx, ft_default_parser
loc_71DC0:
mov [rbp+var_38], rcx
mov rbx, [rsi]
test rbx, rbx
jz loc_72014
mov r12b, al
movss xmm1, dword ptr [rsi+40h]
mov edi, [rsi+8]
mov rsi, [rsi+r12*8+10h]
movss xmm2, cs:dword_D900C
mov [rbp+var_50], r15
mov [rbp+var_48], r12
mov [rbp+var_40], rsi
loc_71DF4:
xor edx, edx
test r15, r15
jnz short loc_71DFE
mov edx, [rbx+4Ch]
loc_71DFE:
mov ecx, [rbx+48h]
cmp [rbx+r12*8+10h], rsi
jnz short loc_71E13
cmp dword ptr [rbx+44h], 0
jz short loc_71E27
jmp loc_72014
loc_71E13:
mov dword ptr [rbx+2Ch], 0
mov qword ptr [rbx+40h], 0
mov [rbx+r12*8+10h], rsi
loc_71E27:
mov r8d, ecx
sub r8d, edx
test dil, 2
jnz short loc_71E79
test dil, 4
jnz loc_7200D
movaps xmm0, xmm1
divss xmm0, xmm2
test ecx, ecx
jz short loc_71E4B
movaps xmm1, xmm0
loc_71E4B:
movss xmm0, dword ptr [rbx+2Ch]
addss xmm0, xmm1
movss dword ptr [rbx+2Ch], xmm0
mov ecx, [rbx+40h]
cmp ecx, r8d
jl loc_72014
test dil, 8
jz loc_71FF1
loc_71E6F:
mulss xmm1, dword ptr [rbx+28h]
jmp loc_71FE3
loc_71E79:
mov ecx, ecx
xorps xmm0, xmm0
cvtsi2ss xmm0, rcx
divss xmm1, xmm0
addss xmm1, dword ptr [rbx+2Ch]
movss dword ptr [rbx+2Ch], xmm1
mov ecx, [rbx+40h]
inc ecx
mov [rbx+40h], ecx
xor eax, eax
cmp ecx, r8d
jnz loc_72016
mov edi, [rbx+8]
mulss xmm1, dword ptr [rbx+28h]
test r15, r15
jz loc_71FE3
cmp qword ptr [rbx+30h], 0
jz loc_71FE3
mov [rbp+var_2C], edi
movss [rbp+var_30], xmm1
movups xmm0, xmmword ptr [r15]
movups xmm1, xmmword ptr [r15+10h]
movaps [rbp+var_60], xmm1
movaps [rbp+var_70], xmm0
loc_71ED9:
lea rdi, [rbp+var_70]
call _mi_ft_segiterator
test eax, eax
jz loc_72014
loc_71EEA:
mov r12, qword ptr [rbp+var_60+8]
test r12, r12
jz short loc_71ED9
mov r15d, dword ptr [rbp+var_70+4]
mov rdi, [r14+8]
mov esi, [r14+340h]
mov edx, 1
call ftparser_call_initializer
test rax, rax
jz loc_71FA4
mov r13, rax
mov rdi, [rbx+30h]
mov [rbp+var_98], rdi
mov rax, [rbx+38h]
mov [rbp+var_90], rax
mov rax, [r14+10h]
mov [rbp+var_88], rax
call list_length
mov [rbp+var_80], eax
mov [rbp+var_7C], 1
lea rax, ftb_check_phrase_internal
mov [r13+0], rax
lea rax, ftb_phrase_add_word
mov [r13+8], rax
lea rax, [rbp+var_98]
mov [r13+18h], rax
mov rax, [r14+10h]
mov [r13+20h], rax
mov [r13+28h], r12
mov [r13+30h], r15d
mov rax, 100000000h
mov [r13+34h], rax
mov rdi, r13
mov rax, [rbp+var_38]
call qword ptr [rax+8]
test eax, eax
jnz loc_72025
cmp dword ptr [rbp+var_7C+4], 0
setz r15b
jmp short loc_71FA7
loc_71FA4:
mov r15b, 1
loc_71FA7:
lea rdi, [rbp+var_70]
call _mi_ft_segiterator
test eax, eax
jz short loc_71FBD
test r15b, r15b
jnz loc_71EEA
loc_71FBD:
test r15b, r15b
mov r15, [rbp+var_50]
mov r12, [rbp+var_48]
movss xmm1, [rbp+var_30]
mov rsi, [rbp+var_40]
movss xmm2, cs:dword_D900C
mov edi, [rbp+var_2C]
mov eax, 0
jnz short loc_72016
loc_71FE3:
mov rbx, [rbx]
test rbx, rbx
jnz loc_71DF4
jmp short loc_72014
loc_71FF1:
lea edx, [rcx+1]
mov [rbx+40h], edx
mov edi, 8
cmp ecx, r8d
jnz loc_71E6F
mov edi, [rbx+8]
jmp loc_71E6F
loc_7200D:
mov dword ptr [rbx+44h], 1
loc_72014:
xor eax, eax
loc_72016:
add rsp, 78h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_72025:
mov eax, 1
jmp short loc_72016
|
long long ftb_climb_the_tree(long long a1, long long **a2, __int128 *a3, long long a4, long long a5, long long a6)
{
__int128 *v6; // r15
long long v8; // r12
long long v9; // rcx
unsigned int ( **v10)(long long); // rcx
long long *v11; // rbx
__int128 v12; // xmm1
int v13; // edi
long long v14; // rsi
long long v15; // rdx
int v16; // ecx
long long v17; // r8
__int128 v18; // xmm0
int v19; // ecx
float v20; // xmm1_4
long long v21; // rcx
long long result; // rax
__int128 v23; // xmm0
__int128 v24; // xmm1
long long v25; // r12
int v26; // r15d
long long v27; // rax
long long v28; // rdx
long long v29; // rcx
long long v30; // r8
long long v31; // r9
long long v32; // r13
bool v33; // r15
bool v34; // zf
_QWORD v35[3]; // [rsp+8h] [rbp-98h] BYREF
int v36; // [rsp+20h] [rbp-80h]
long long v37; // [rsp+24h] [rbp-7Ch]
__int128 v38; // [rsp+30h] [rbp-70h] BYREF
__int128 v39; // [rsp+40h] [rbp-60h]
__int128 *v40; // [rsp+50h] [rbp-50h]
long long v41; // [rsp+58h] [rbp-48h]
long long v42; // [rsp+60h] [rbp-40h]
unsigned int ( **v43)(long long); // [rsp+68h] [rbp-38h]
unsigned int v44; // [rsp+70h] [rbp-30h]
int v45; // [rsp+74h] [rbp-2Ch]
v6 = a3;
v8 = 0LL;
v9 = *(unsigned int *)(a1 + 832);
if ( v9 == 0xFFFFFFFFLL )
v10 = (unsigned int ( **)(long long))&ft_default_parser;
else
v10 = *(unsigned int ( ***)(long long))(*(_QWORD *)(**(_QWORD **)(a1 + 8) + 536LL) + 112 * v9 + 56);
v43 = v10;
v11 = *a2;
if ( *a2 )
{
LOBYTE(v8) = a3 != 0LL;
v12 = *((unsigned int *)a2 + 16);
v13 = *((_DWORD *)a2 + 2);
v14 = (long long)a2[v8 + 2];
v40 = a3;
v41 = v8;
v42 = v14;
do
{
v15 = 0LL;
if ( !v6 )
v15 = *((unsigned int *)v11 + 19);
v16 = *((_DWORD *)v11 + 18);
if ( v11[v8 + 2] == v14 )
{
if ( *((_DWORD *)v11 + 17) )
return 0LL;
}
else
{
*((_DWORD *)v11 + 11) = 0;
v11[8] = 0LL;
v11[v8 + 2] = v14;
}
v17 = (unsigned int)(v16 - v15);
if ( (v13 & 2) != 0 )
{
v20 = (float)(*(float *)&v12 / (float)v16) + *((float *)v11 + 11);
*((float *)v11 + 11) = v20;
v21 = (unsigned int)(*((_DWORD *)v11 + 16) + 1);
*((_DWORD *)v11 + 16) = v21;
result = 0LL;
if ( (_DWORD)v21 != (_DWORD)v17 )
return result;
v13 = *((_DWORD *)v11 + 2);
*(float *)&v12 = v20 * *((float *)v11 + 10);
if ( v6 && v11[6] )
{
v45 = *((_DWORD *)v11 + 2);
v44 = v12;
v23 = *v6;
v24 = v6[1];
v39 = v24;
v38 = v23;
while ( (unsigned int)mi_ft_segiterator(&v38, v14, v15, v21, v17, a6) )
{
while ( 1 )
{
v25 = *((_QWORD *)&v39 + 1);
if ( !*((_QWORD *)&v39 + 1) )
break;
v26 = DWORD1(v38);
v14 = *(unsigned int *)(a1 + 832);
v27 = ftparser_call_initializer(*(_QWORD *)(a1 + 8), v14, 1LL, *(double *)&v23);
if ( v27 )
{
v32 = v27;
v35[0] = v11[6];
v35[1] = v11[7];
v35[2] = *(_QWORD *)(a1 + 16);
v36 = list_length(*(double *)&v23, *(double *)&v24, COERCE_DOUBLE(1077936128LL));
v37 = 1LL;
*(_QWORD *)v32 = ftb_check_phrase_internal;
*(_QWORD *)(v32 + 8) = ftb_phrase_add_word;
*(_QWORD *)(v32 + 24) = v35;
*(_QWORD *)(v32 + 32) = *(_QWORD *)(a1 + 16);
*(_QWORD *)(v32 + 40) = v25;
*(_DWORD *)(v32 + 48) = v26;
*(_QWORD *)(v32 + 52) = 0x100000000LL;
if ( v43[1](v32) )
return 1LL;
v33 = HIDWORD(v37) == 0;
}
else
{
v33 = 1;
}
if ( !(unsigned int)mi_ft_segiterator(&v38, v14, v28, v29, v30, v31) || !v33 )
{
v34 = !v33;
v6 = v40;
v8 = v41;
v12 = v44;
v14 = v42;
LOBYTE(v13) = v45;
result = 0LL;
if ( !v34 )
return result;
goto LABEL_32;
}
}
}
return 0LL;
}
}
else
{
if ( (v13 & 4) != 0 )
{
*((_DWORD *)v11 + 17) = 1;
return 0LL;
}
v18 = v12;
if ( v16 )
{
*(float *)&v18 = *(float *)&v12 / 3.0;
v12 = v18;
}
*((float *)v11 + 11) = *((float *)v11 + 11) + *(float *)&v12;
v19 = *((_DWORD *)v11 + 16);
if ( v19 < (int)v17 )
return 0LL;
if ( (v13 & 8) == 0 )
{
*((_DWORD *)v11 + 16) = v19 + 1;
LOBYTE(v13) = 8;
if ( v19 == (_DWORD)v17 )
v13 = *((_DWORD *)v11 + 2);
}
*(float *)&v12 = *(float *)&v12 * *((float *)v11 + 10);
}
LABEL_32:
v11 = (long long *)*v11;
}
while ( v11 );
}
return 0LL;
}
|
_ftb_climb_the_tree:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x78
MOV R15,RDX
MOV R14,RDI
XOR R12D,R12D
TEST RDX,RDX
SETNZ AL
MOV ECX,dword ptr [RDI + 0x340]
MOV EDX,0xffffffff
CMP RCX,RDX
JZ 0x00171db9
MOV RDX,qword ptr [R14 + 0x8]
MOV RDX,qword ptr [RDX]
MOV RDX,qword ptr [RDX + 0x218]
IMUL RCX,RCX,0x70
MOV RCX,qword ptr [RDX + RCX*0x1 + 0x38]
JMP 0x00171dc0
LAB_00171db9:
LEA RCX,[0x485300]
LAB_00171dc0:
MOV qword ptr [RBP + -0x38],RCX
MOV RBX,qword ptr [RSI]
TEST RBX,RBX
JZ 0x00172014
MOV R12B,AL
MOVSS XMM1,dword ptr [RSI + 0x40]
MOV EDI,dword ptr [RSI + 0x8]
MOV RSI,qword ptr [RSI + R12*0x8 + 0x10]
MOVSS XMM2,dword ptr [0x001d900c]
MOV qword ptr [RBP + -0x50],R15
MOV qword ptr [RBP + -0x48],R12
MOV qword ptr [RBP + -0x40],RSI
LAB_00171df4:
XOR EDX,EDX
TEST R15,R15
JNZ 0x00171dfe
MOV EDX,dword ptr [RBX + 0x4c]
LAB_00171dfe:
MOV ECX,dword ptr [RBX + 0x48]
CMP qword ptr [RBX + R12*0x8 + 0x10],RSI
JNZ 0x00171e13
CMP dword ptr [RBX + 0x44],0x0
JZ 0x00171e27
JMP 0x00172014
LAB_00171e13:
MOV dword ptr [RBX + 0x2c],0x0
MOV qword ptr [RBX + 0x40],0x0
MOV qword ptr [RBX + R12*0x8 + 0x10],RSI
LAB_00171e27:
MOV R8D,ECX
SUB R8D,EDX
TEST DIL,0x2
JNZ 0x00171e79
TEST DIL,0x4
JNZ 0x0017200d
MOVAPS XMM0,XMM1
DIVSS XMM0,XMM2
TEST ECX,ECX
JZ 0x00171e4b
MOVAPS XMM1,XMM0
LAB_00171e4b:
MOVSS XMM0,dword ptr [RBX + 0x2c]
ADDSS XMM0,XMM1
MOVSS dword ptr [RBX + 0x2c],XMM0
MOV ECX,dword ptr [RBX + 0x40]
CMP ECX,R8D
JL 0x00172014
TEST DIL,0x8
JZ 0x00171ff1
LAB_00171e6f:
MULSS XMM1,dword ptr [RBX + 0x28]
JMP 0x00171fe3
LAB_00171e79:
MOV ECX,ECX
XORPS XMM0,XMM0
CVTSI2SS XMM0,RCX
DIVSS XMM1,XMM0
ADDSS XMM1,dword ptr [RBX + 0x2c]
MOVSS dword ptr [RBX + 0x2c],XMM1
MOV ECX,dword ptr [RBX + 0x40]
INC ECX
MOV dword ptr [RBX + 0x40],ECX
XOR EAX,EAX
CMP ECX,R8D
JNZ 0x00172016
MOV EDI,dword ptr [RBX + 0x8]
MULSS XMM1,dword ptr [RBX + 0x28]
TEST R15,R15
JZ 0x00171fe3
CMP qword ptr [RBX + 0x30],0x0
JZ 0x00171fe3
MOV dword ptr [RBP + -0x2c],EDI
MOVSS dword ptr [RBP + -0x30],XMM1
MOVUPS XMM0,xmmword ptr [R15]
MOVUPS XMM1,xmmword ptr [R15 + 0x10]
MOVAPS xmmword ptr [RBP + -0x60],XMM1
MOVAPS xmmword ptr [RBP + -0x70],XMM0
LAB_00171ed9:
LEA RDI,[RBP + -0x70]
CALL 0x00173fc6
TEST EAX,EAX
JZ 0x00172014
LAB_00171eea:
MOV R12,qword ptr [RBP + -0x58]
TEST R12,R12
JZ 0x00171ed9
MOV R15D,dword ptr [RBP + -0x6c]
MOV RDI,qword ptr [R14 + 0x8]
MOV ESI,dword ptr [R14 + 0x340]
MOV EDX,0x1
CALL 0x00173e01
TEST RAX,RAX
JZ 0x00171fa4
MOV R13,RAX
MOV RDI,qword ptr [RBX + 0x30]
MOV qword ptr [RBP + -0x98],RDI
MOV RAX,qword ptr [RBX + 0x38]
MOV qword ptr [RBP + -0x90],RAX
MOV RAX,qword ptr [R14 + 0x10]
MOV qword ptr [RBP + -0x88],RAX
CALL 0x00194785
MOV dword ptr [RBP + -0x80],EAX
MOV qword ptr [RBP + -0x7c],0x1
LEA RAX,[0x1729ff]
MOV qword ptr [R13],RAX
LEA RAX,[0x172a68]
MOV qword ptr [R13 + 0x8],RAX
LEA RAX,[RBP + -0x98]
MOV qword ptr [R13 + 0x18],RAX
MOV RAX,qword ptr [R14 + 0x10]
MOV qword ptr [R13 + 0x20],RAX
MOV qword ptr [R13 + 0x28],R12
MOV dword ptr [R13 + 0x30],R15D
MOV RAX,0x100000000
MOV qword ptr [R13 + 0x34],RAX
MOV RDI,R13
MOV RAX,qword ptr [RBP + -0x38]
CALL qword ptr [RAX + 0x8]
TEST EAX,EAX
JNZ 0x00172025
CMP dword ptr [RBP + -0x78],0x0
SETZ R15B
JMP 0x00171fa7
LAB_00171fa4:
MOV R15B,0x1
LAB_00171fa7:
LEA RDI,[RBP + -0x70]
CALL 0x00173fc6
TEST EAX,EAX
JZ 0x00171fbd
TEST R15B,R15B
JNZ 0x00171eea
LAB_00171fbd:
TEST R15B,R15B
MOV R15,qword ptr [RBP + -0x50]
MOV R12,qword ptr [RBP + -0x48]
MOVSS XMM1,dword ptr [RBP + -0x30]
MOV RSI,qword ptr [RBP + -0x40]
MOVSS XMM2,dword ptr [0x001d900c]
MOV EDI,dword ptr [RBP + -0x2c]
MOV EAX,0x0
JNZ 0x00172016
LAB_00171fe3:
MOV RBX,qword ptr [RBX]
TEST RBX,RBX
JNZ 0x00171df4
JMP 0x00172014
LAB_00171ff1:
LEA EDX,[RCX + 0x1]
MOV dword ptr [RBX + 0x40],EDX
MOV EDI,0x8
CMP ECX,R8D
JNZ 0x00171e6f
MOV EDI,dword ptr [RBX + 0x8]
JMP 0x00171e6f
LAB_0017200d:
MOV dword ptr [RBX + 0x44],0x1
LAB_00172014:
XOR EAX,EAX
LAB_00172016:
ADD RSP,0x78
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_00172025:
MOV EAX,0x1
JMP 0x00172016
|
int8 _ftb_climb_the_tree(long param_1,long *param_2,int4 *param_3)
{
uint uVar1;
int4 uVar2;
int8 *puVar3;
int iVar4;
long *plVar5;
long lVar6;
int iVar7;
ulong uVar8;
bool bVar9;
float fVar10;
long local_a0;
long local_98;
int8 local_90;
int4 local_88;
int8 local_84;
int4 local_78;
int4 uStack_74;
int4 uStack_70;
int4 uStack_6c;
int8 local_68;
long lStack_60;
int4 *local_58;
ulong local_50;
long local_48;
int1 *local_40;
float local_38;
uint local_34;
if ((ulong)*(uint *)(param_1 + 0x340) == 0xffffffff) {
local_40 = ft_default_parser;
}
else {
local_40 = *(int1 **)
(*(long *)(**(long **)(param_1 + 8) + 0x218) + 0x38 +
(ulong)*(uint *)(param_1 + 0x340) * 0x70);
}
plVar5 = (long *)*param_2;
if (plVar5 != (long *)0x0) {
uVar8 = (ulong)(param_3 != (int4 *)0x0);
local_38 = *(float *)(param_2 + 8);
local_34 = *(uint *)(param_2 + 1);
lVar6 = param_2[uVar8 + 2];
fVar10 = DAT_001d900c;
local_58 = param_3;
local_50 = uVar8;
local_48 = lVar6;
do {
iVar7 = 0;
if (param_3 == (int4 *)0x0) {
iVar7 = *(int *)((long)plVar5 + 0x4c);
}
uVar1 = *(uint *)(plVar5 + 9);
if (plVar5[uVar8 + 2] == lVar6) {
if (*(int *)((long)plVar5 + 0x44) != 0) {
return 0;
}
}
else {
*(int4 *)((long)plVar5 + 0x2c) = 0;
plVar5[8] = 0;
plVar5[uVar8 + 2] = lVar6;
}
iVar7 = uVar1 - iVar7;
if ((local_34 & 2) == 0) {
if ((local_34 & 4) != 0) {
*(int4 *)((long)plVar5 + 0x44) = 1;
return 0;
}
if (uVar1 != 0) {
local_38 = local_38 / fVar10;
}
*(float *)((long)plVar5 + 0x2c) = *(float *)((long)plVar5 + 0x2c) + local_38;
iVar4 = (int)plVar5[8];
if (iVar4 < iVar7) {
return 0;
}
if ((local_34 & 8) == 0) {
*(int *)(plVar5 + 8) = iVar4 + 1;
local_34 = 8;
if (iVar4 == iVar7) {
local_34 = *(uint *)(plVar5 + 1);
}
}
local_38 = local_38 * *(float *)(plVar5 + 5);
}
else {
local_38 = local_38 / (float)uVar1 + *(float *)((long)plVar5 + 0x2c);
*(float *)((long)plVar5 + 0x2c) = local_38;
iVar4 = (int)plVar5[8] + 1;
*(int *)(plVar5 + 8) = iVar4;
if (iVar4 != iVar7) {
return 0;
}
local_34 = *(uint *)(plVar5 + 1);
local_38 = local_38 * *(float *)(plVar5 + 5);
if ((param_3 != (int4 *)0x0) && (plVar5[6] != 0)) {
local_78 = *param_3;
uStack_74 = param_3[1];
uStack_70 = param_3[2];
uStack_6c = param_3[3];
local_68 = *(int8 *)(param_3 + 4);
lStack_60 = *(long *)(param_3 + 6);
do {
iVar7 = _mi_ft_segiterator(&local_78);
if (iVar7 == 0) {
return 0;
}
while (lVar6 = lStack_60, uVar2 = uStack_74, lStack_60 != 0) {
puVar3 = (int8 *)
ftparser_call_initializer
(*(int8 *)(param_1 + 8),*(int4 *)(param_1 + 0x340),1);
if (puVar3 == (int8 *)0x0) {
bVar9 = true;
}
else {
local_a0 = plVar5[6];
local_98 = plVar5[7];
local_90 = *(int8 *)(param_1 + 0x10);
local_88 = list_length();
local_84 = 1;
*puVar3 = ftb_check_phrase_internal;
puVar3[1] = ftb_phrase_add_word;
puVar3[3] = &local_a0;
puVar3[4] = *(int8 *)(param_1 + 0x10);
puVar3[5] = lVar6;
*(int4 *)(puVar3 + 6) = uVar2;
*(int8 *)((long)puVar3 + 0x34) = 0x100000000;
iVar7 = (**(code **)(local_40 + 8))(puVar3);
if (iVar7 != 0) {
return 1;
}
bVar9 = local_84._4_4_ == 0;
}
iVar7 = _mi_ft_segiterator(&local_78);
if ((iVar7 == 0) || (!bVar9)) {
lVar6 = local_48;
uVar8 = local_50;
param_3 = local_58;
fVar10 = DAT_001d900c;
if (bVar9) {
return 0;
}
goto LAB_00171fe3;
}
}
} while( true );
}
}
LAB_00171fe3:
plVar5 = (long *)*plVar5;
} while (plVar5 != (long *)0x0);
}
return 0;
}
|
|
57,244
|
my_b_seq_read
|
eloqsql/mysys/mf_iocache.c
|
static int _my_b_seq_read(IO_CACHE *info, uchar *Buffer, size_t Count)
{
size_t length, diff_length, save_count, max_length;
my_off_t pos_in_file;
save_count=Count;
lock_append_buffer(info);
/* pos_in_file always point on where info->buffer was read */
if ((pos_in_file=info->pos_in_file +
(size_t) (info->read_end - info->buffer)) >= info->end_of_file)
goto read_append_buffer;
/*
With read-append cache we must always do a seek before we read,
because the write could have moved the file pointer astray
*/
if (mysql_file_seek(info->file, pos_in_file, MY_SEEK_SET, MYF(0)) == MY_FILEPOS_ERROR)
{
info->error= -1;
unlock_append_buffer(info);
return (1);
}
info->seek_not_done=0;
diff_length= (size_t) (pos_in_file & (IO_SIZE-1));
/* now the second stage begins - read from file descriptor */
if (Count >= (size_t) (IO_SIZE+(IO_SIZE-diff_length)))
{
/* Fill first intern buffer */
size_t read_length;
length= IO_ROUND_DN(Count) - diff_length;
if ((read_length= mysql_file_read(info->file,Buffer, length,
info->myflags)) == (size_t) -1)
{
info->error= -1;
unlock_append_buffer(info);
return 1;
}
Count-=read_length;
Buffer+=read_length;
pos_in_file+=read_length;
if (read_length != length)
{
/*
We only got part of data; Read the rest of the data from the
write buffer
*/
goto read_append_buffer;
}
diff_length=0;
}
max_length= info->read_length-diff_length;
if (max_length > (info->end_of_file - pos_in_file))
max_length= (size_t) (info->end_of_file - pos_in_file);
if (!max_length)
{
if (Count)
goto read_append_buffer;
length=0; /* Didn't read any more chars */
}
else
{
length= mysql_file_read(info->file,info->buffer, max_length, info->myflags);
if (length == (size_t) -1)
{
info->error= -1;
unlock_append_buffer(info);
return 1;
}
if (length < Count)
{
memcpy(Buffer, info->buffer, length);
Count -= length;
Buffer += length;
/*
added the line below to make
DBUG_ASSERT(pos_in_file==info->end_of_file) pass.
otherwise this does not appear to be needed
*/
pos_in_file += length;
goto read_append_buffer;
}
}
unlock_append_buffer(info);
info->read_pos=info->buffer+Count;
info->read_end=info->buffer+length;
info->pos_in_file=pos_in_file;
memcpy(Buffer,info->buffer,(size_t) Count);
return 0;
read_append_buffer:
/*
Read data from the current write buffer.
Count should never be == 0 here (The code will work even if count is 0)
*/
{
/* First copy the data to Count */
size_t len_in_buff = (size_t) (info->write_pos - info->append_read_pos);
size_t copy_len;
size_t transfer_len;
DBUG_ASSERT(info->append_read_pos <= info->write_pos);
copy_len=MY_MIN(Count, len_in_buff);
memcpy(Buffer, info->append_read_pos, copy_len);
info->append_read_pos += copy_len;
Count -= copy_len;
if (Count)
info->error= (int) (save_count - Count);
/* Fill read buffer with data from write buffer */
memcpy(info->buffer, info->append_read_pos,
(size_t) (transfer_len=len_in_buff - copy_len));
info->read_pos= info->buffer;
info->read_end= info->buffer+transfer_len;
info->append_read_pos=info->write_pos;
info->pos_in_file=pos_in_file+copy_len;
info->end_of_file+=len_in_buff;
}
unlock_append_buffer(info);
return Count ? 1 : 0;
}
|
O3
|
c
|
my_b_seq_read:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x88, %rsp
movq %rdx, %r12
movq %rsi, -0x40(%rbp)
movq %rdi, %r14
leaq 0x50(%rdi), %r15
cmpq $0x0, 0x90(%rdi)
jne 0x7cd7b
movq %r15, %rdi
callq 0x3a310
movq 0x18(%r14), %r13
subq 0x20(%r14), %r13
addq (%r14), %r13
cmpq 0x8(%r14), %r13
jae 0x7caf7
movl 0xd4(%r14), %ebx
leaq 0x2f3555(%rip), %rax # 0x36ffe8
movq (%rax), %rax
leaq -0xa8(%rbp), %rdi
movl %ebx, %esi
movl $0x8, %edx
callq *0x158(%rax)
testq %rax, %rax
jne 0x7cda9
movl %ebx, %edi
movq %r13, %rsi
xorl %edx, %edx
xorl %ecx, %ecx
callq 0x85264
cmpq $-0x1, %rax
je 0x7ccde
movl $0x0, 0xe0(%r14)
movl %r13d, %eax
andl $0xfff, %eax # imm = 0xFFF
movl $0x2000, %ecx # imm = 0x2000
subq %rax, %rcx
cmpq %r12, %rcx
jbe 0x7cb9e
movq %r12, %rdx
jmp 0x7cc24
movq %r13, -0x38(%rbp)
movq %r15, -0x30(%rbp)
movq %r12, %r13
movq 0x38(%r14), %rsi
movq 0x40(%r14), %r15
subq %rsi, %r15
cmpq %r15, %r13
movq %r15, %rbx
cmovbq %r13, %rbx
movq -0x40(%rbp), %rdi
movq %rbx, %rdx
callq 0x3a0c0
movq 0x38(%r14), %rsi
addq %rbx, %rsi
movq %rsi, 0x38(%r14)
cmpq %r15, %r13
jbe 0x7cb41
subl %r13d, %r12d
leal (%rbx,%r12), %eax
movl %eax, 0xe4(%r14)
movq 0x20(%r14), %rdi
movq %r15, %r12
subq %rbx, %r12
movq %r12, %rdx
callq 0x3a0c0
movq 0x20(%r14), %rax
movq 0x40(%r14), %rcx
movq %rax, 0x10(%r14)
addq %rax, %r12
movq %r12, 0x18(%r14)
movq %rcx, 0x38(%r14)
movq -0x38(%rbp), %rax
addq %rbx, %rax
movq %rax, (%r14)
addq %r15, 0x8(%r14)
movq 0x90(%r14), %rdi
testq %rdi, %rdi
jne 0x7cd94
xorl %ebx, %ebx
cmpq %r15, %r13
seta %bl
movq -0x30(%rbp), %rdi
callq 0x3a2d0
jmp 0x7cd06
movq %r13, -0x38(%rbp)
movl %r12d, %r13d
andl $0xfffff000, %r13d # imm = 0xFFFFF000
subq %rax, %r13
movl 0xd4(%r14), %ebx
movq 0xf8(%r14), %rax
movq %rax, -0x30(%rbp)
leaq 0x2f3420(%rip), %rax # 0x36ffe8
movq (%rax), %rax
leaq -0xa8(%rbp), %rdi
movl %ebx, %esi
movl $0x6, %edx
callq *0x158(%rax)
testq %rax, %rax
jne 0x7cdda
movl %ebx, %edi
movq -0x40(%rbp), %rsi
movq %r13, %rdx
movq -0x30(%rbp), %rcx
callq 0x85064
movq %rax, %rbx
cmpq $-0x1, %rbx
je 0x7ccde
movq %r12, %rdx
subq %rbx, %rdx
addq %rbx, -0x40(%rbp)
addq %rbx, -0x38(%rbp)
cmpq %r13, %rbx
jne 0x7cd23
xorl %eax, %eax
movq -0x38(%rbp), %r13
movq 0x8(%r14), %rbx
movq 0xf0(%r14), %rcx
subq %rax, %rcx
subq %r13, %rbx
cmpq %rbx, %rcx
cmovbq %rcx, %rbx
testq %rbx, %rbx
je 0x7cd1a
movq %rdx, -0x48(%rbp)
movq %r13, -0x38(%rbp)
movl 0xd4(%r14), %r13d
movq 0x20(%r14), %rax
movq %rax, -0x50(%rbp)
movq 0xf8(%r14), %rax
movq %rax, -0x30(%rbp)
leaq 0x2f337a(%rip), %rax # 0x36ffe8
movq (%rax), %rax
leaq -0xa8(%rbp), %rdi
movl %r13d, %esi
movl $0x6, %edx
callq *0x158(%rax)
testq %rax, %rax
jne 0x7ce4f
movl %r13d, %edi
movq -0x50(%rbp), %rsi
movq %rbx, %rdx
movq -0x30(%rbp), %rcx
callq 0x85064
cmpq $-0x1, %rax
movq -0x48(%rbp), %rdx
je 0x7ccde
movq %rdx, %r13
subq %rax, %r13
jbe 0x7cd2f
movq %r15, -0x30(%rbp)
movq 0x20(%r14), %rsi
movq -0x40(%rbp), %rbx
movq %rbx, %rdi
movq %rax, %rdx
movq %rax, %r15
callq 0x3a0c0
addq %r15, %rbx
movq %rbx, -0x40(%rbp)
addq %r15, -0x38(%rbp)
jmp 0x7cb02
movl $0xffffffff, 0xe4(%r14) # imm = 0xFFFFFFFF
movq 0x90(%r14), %rdi
testq %rdi, %rdi
jne 0x7cdc5
movq %r15, %rdi
callq 0x3a2d0
movl $0x1, %ebx
movl %ebx, %eax
addq $0x88, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
testq %rdx, %rdx
je 0x7cd35
movq %r13, -0x38(%rbp)
movq %r15, -0x30(%rbp)
movq %rdx, %r13
jmp 0x7cb02
movq -0x38(%rbp), %r13
jmp 0x7cd37
xorl %eax, %eax
movq %rax, %r12
movq %rdx, %rbx
movq 0x90(%r14), %rdi
testq %rdi, %rdi
jne 0x7cec3
movq %r15, %rdi
callq 0x3a2d0
movq 0x20(%r14), %rsi
movq %rbx, %rdx
leaq (%rsi,%rbx), %rax
movq %rax, 0x10(%r14)
addq %rsi, %r12
movq %r12, 0x18(%r14)
movq %r13, (%r14)
movq -0x40(%rbp), %rdi
callq 0x3a0c0
xorl %ebx, %ebx
jmp 0x7cd06
leaq 0x438ef(%rip), %rsi # 0xc0671
movq %r15, %rdi
movl $0x54c, %edx # imm = 0x54C
callq 0x3cbe6
jmp 0x7ca74
leaq 0x2f324d(%rip), %rax # 0x36ffe8
movq (%rax), %rax
callq *0x160(%rax)
jmp 0x7cb88
leaq -0x60(%rbp), %rcx
movq %rax, %rdi
movl %ebx, %esi
movq %r13, %rdx
movq %rcx, %rbx
callq 0x3ca8d
movq (%rbx), %rax
jmp 0x7cac1
leaq 0x2f321c(%rip), %rax # 0x36ffe8
movq (%rax), %rax
callq *0x160(%rax)
jmp 0x7ccf9
movq %rax, %rcx
leaq 0x2f3204(%rip), %rax # 0x36ffe8
movq (%rax), %rax
leaq 0x43883(%rip), %rdx # 0xc0671
movq %rcx, -0x48(%rbp)
movq %rcx, %rdi
movq %r13, %rsi
movl $0x569, %ecx # imm = 0x569
callq *0x210(%rax)
movl %ebx, %edi
movq -0x40(%rbp), %rsi
movq %r13, %rdx
movq -0x30(%rbp), %rcx
callq 0x85064
movq %rax, %rbx
xorl %esi, %esi
testq %rax, %rax
movl $0x0, %eax
cmoveq %r13, %rax
cmpq $-0x1, %rbx
cmovneq %rbx, %rsi
testb $0x6, -0x30(%rbp)
cmovneq %rax, %rsi
leaq 0x2f31ab(%rip), %rax # 0x36ffe8
movq (%rax), %rax
movq -0x48(%rbp), %rdi
callq *0x218(%rax)
jmp 0x7cbfd
movq %rax, %rcx
leaq 0x2f318f(%rip), %rax # 0x36ffe8
movq (%rax), %rax
leaq 0x4380e(%rip), %rdx # 0xc0671
movq %rcx, -0x58(%rbp)
movq %rcx, %rdi
movq %rbx, %rsi
movl $0x589, %ecx # imm = 0x589
callq *0x210(%rax)
movl %r13d, %edi
movq -0x50(%rbp), %rsi
movq %rbx, %rdx
movq -0x30(%rbp), %rcx
callq 0x85064
movq %rax, %r13
xorl %esi, %esi
testq %rax, %rax
cmovneq %rsi, %rbx
cmpq $-0x1, %rax
cmovneq %rax, %rsi
testb $0x6, -0x30(%rbp)
cmovneq %rbx, %rsi
leaq 0x2f313a(%rip), %rax # 0x36ffe8
movq (%rax), %rax
movq -0x58(%rbp), %rdi
callq *0x218(%rax)
movq %r13, %rax
jmp 0x7cca2
leaq 0x2f311e(%rip), %rax # 0x36ffe8
movq (%rax), %rax
callq *0x160(%rax)
jmp 0x7cd4d
|
_my_b_seq_read:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 88h
mov r12, rdx
mov [rbp+var_40], rsi
mov r14, rdi
lea r15, [rdi+50h]
cmp qword ptr [rdi+90h], 0
jnz loc_7CD7B
mov rdi, r15
call _pthread_mutex_lock
loc_7CA74:
mov r13, [r14+18h]
sub r13, [r14+20h]
add r13, [r14]
cmp r13, [r14+8]
jnb short loc_7CAF7
mov ebx, [r14+0D4h]
lea rax, PSI_server
mov rax, [rax]
lea rdi, [rbp+var_A8]
mov esi, ebx
mov edx, 8
call qword ptr [rax+158h]
test rax, rax
jnz loc_7CDA9
mov edi, ebx
mov rsi, r13
xor edx, edx
xor ecx, ecx
call my_seek
loc_7CAC1:
cmp rax, 0FFFFFFFFFFFFFFFFh
jz loc_7CCDE
mov dword ptr [r14+0E0h], 0
mov eax, r13d
and eax, 0FFFh
mov ecx, 2000h
sub rcx, rax
cmp rcx, r12
jbe loc_7CB9E
mov rdx, r12
jmp loc_7CC24
loc_7CAF7:
mov [rbp+var_38], r13
mov [rbp+var_30], r15
mov r13, r12
loc_7CB02:
mov rsi, [r14+38h]
mov r15, [r14+40h]
sub r15, rsi
cmp r13, r15
mov rbx, r15
cmovb rbx, r13
mov rdi, [rbp+var_40]
mov rdx, rbx
call _memcpy
mov rsi, [r14+38h]
add rsi, rbx
mov [r14+38h], rsi
cmp r13, r15
jbe short loc_7CB41
sub r12d, r13d
lea eax, [rbx+r12]
mov [r14+0E4h], eax
loc_7CB41:
mov rdi, [r14+20h]
mov r12, r15
sub r12, rbx
mov rdx, r12
call _memcpy
mov rax, [r14+20h]
mov rcx, [r14+40h]
mov [r14+10h], rax
add r12, rax
mov [r14+18h], r12
mov [r14+38h], rcx
mov rax, [rbp+var_38]
add rax, rbx
mov [r14], rax
add [r14+8], r15
mov rdi, [r14+90h]
test rdi, rdi
jnz loc_7CD94
loc_7CB88:
xor ebx, ebx
cmp r13, r15
setnbe bl
mov rdi, [rbp+var_30]
call _pthread_mutex_unlock
jmp loc_7CD06
loc_7CB9E:
mov [rbp+var_38], r13
mov r13d, r12d
and r13d, 0FFFFF000h
sub r13, rax
mov ebx, [r14+0D4h]
mov rax, [r14+0F8h]
mov [rbp+var_30], rax
lea rax, PSI_server
mov rax, [rax]
lea rdi, [rbp+var_A8]
mov esi, ebx
mov edx, 6
call qword ptr [rax+158h]
test rax, rax
jnz loc_7CDDA
mov edi, ebx
mov rsi, [rbp+var_40]
mov rdx, r13
mov rcx, [rbp+var_30]
call my_read
mov rbx, rax
loc_7CBFD:
cmp rbx, 0FFFFFFFFFFFFFFFFh
jz loc_7CCDE
mov rdx, r12
sub rdx, rbx
add [rbp+var_40], rbx
add [rbp+var_38], rbx
cmp rbx, r13
jnz loc_7CD23
xor eax, eax
mov r13, [rbp+var_38]
loc_7CC24:
mov rbx, [r14+8]
mov rcx, [r14+0F0h]
sub rcx, rax
sub rbx, r13
cmp rcx, rbx
cmovb rbx, rcx
test rbx, rbx
jz loc_7CD1A
mov [rbp+var_48], rdx
mov [rbp+var_38], r13
mov r13d, [r14+0D4h]
mov rax, [r14+20h]
mov [rbp+var_50], rax
mov rax, [r14+0F8h]
mov [rbp+var_30], rax
lea rax, PSI_server
mov rax, [rax]
lea rdi, [rbp+var_A8]
mov esi, r13d
mov edx, 6
call qword ptr [rax+158h]
test rax, rax
jnz loc_7CE4F
mov edi, r13d
mov rsi, [rbp+var_50]
mov rdx, rbx
mov rcx, [rbp+var_30]
call my_read
loc_7CCA2:
cmp rax, 0FFFFFFFFFFFFFFFFh
mov rdx, [rbp+var_48]
jz short loc_7CCDE
mov r13, rdx
sub r13, rax
jbe short loc_7CD2F
mov [rbp+var_30], r15
mov rsi, [r14+20h]
mov rbx, [rbp+var_40]
mov rdi, rbx
mov rdx, rax
mov r15, rax
call _memcpy
add rbx, r15
mov [rbp+var_40], rbx
add [rbp+var_38], r15
jmp loc_7CB02
loc_7CCDE:
mov dword ptr [r14+0E4h], 0FFFFFFFFh
mov rdi, [r14+90h]
test rdi, rdi
jnz loc_7CDC5
loc_7CCF9:
mov rdi, r15
call _pthread_mutex_unlock
mov ebx, 1
loc_7CD06:
mov eax, ebx
add rsp, 88h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_7CD1A:
test rdx, rdx
jz short loc_7CD35
mov [rbp+var_38], r13
loc_7CD23:
mov [rbp+var_30], r15
mov r13, rdx
jmp loc_7CB02
loc_7CD2F:
mov r13, [rbp+var_38]
jmp short loc_7CD37
loc_7CD35:
xor eax, eax
loc_7CD37:
mov r12, rax
mov rbx, rdx
mov rdi, [r14+90h]
test rdi, rdi
jnz loc_7CEC3
loc_7CD4D:
mov rdi, r15
call _pthread_mutex_unlock
mov rsi, [r14+20h]
mov rdx, rbx
lea rax, [rsi+rbx]
mov [r14+10h], rax
add r12, rsi
mov [r14+18h], r12
mov [r14], r13
mov rdi, [rbp+var_40]
call _memcpy
xor ebx, ebx
jmp short loc_7CD06
loc_7CD7B:
lea rsi, aWorkspaceLlm4b_1; "/workspace/llm4binary/github2025/eloqsq"...
mov rdi, r15
mov edx, 54Ch
call psi_mutex_lock
jmp loc_7CA74
loc_7CD94:
lea rax, PSI_server
mov rax, [rax]
call qword ptr [rax+160h]
jmp loc_7CB88
loc_7CDA9:
lea rcx, [rbp+var_60]
mov rdi, rax
mov esi, ebx
mov rdx, r13
mov rbx, rcx
call _my_b_seq_read_cold_1
mov rax, [rbx]
jmp loc_7CAC1
loc_7CDC5:
lea rax, PSI_server
mov rax, [rax]
call qword ptr [rax+160h]
jmp loc_7CCF9
loc_7CDDA:
mov rcx, rax
lea rax, PSI_server
mov rax, [rax]
lea rdx, aWorkspaceLlm4b_1; "/workspace/llm4binary/github2025/eloqsq"...
mov [rbp+var_48], rcx
mov rdi, rcx
mov rsi, r13
mov ecx, 569h
call qword ptr [rax+210h]
mov edi, ebx
mov rsi, [rbp+var_40]
mov rdx, r13
mov rcx, [rbp+var_30]
call my_read
mov rbx, rax
xor esi, esi
test rax, rax
mov eax, 0
cmovz rax, r13
cmp rbx, 0FFFFFFFFFFFFFFFFh
cmovnz rsi, rbx
test byte ptr [rbp+var_30], 6
cmovnz rsi, rax
lea rax, PSI_server
mov rax, [rax]
mov rdi, [rbp+var_48]
call qword ptr [rax+218h]
jmp loc_7CBFD
loc_7CE4F:
mov rcx, rax
lea rax, PSI_server
mov rax, [rax]
lea rdx, aWorkspaceLlm4b_1; "/workspace/llm4binary/github2025/eloqsq"...
mov [rbp+var_58], rcx
mov rdi, rcx
mov rsi, rbx
mov ecx, 589h
call qword ptr [rax+210h]
mov edi, r13d
mov rsi, [rbp+var_50]
mov rdx, rbx
mov rcx, [rbp+var_30]
call my_read
mov r13, rax
xor esi, esi
test rax, rax
cmovnz rbx, rsi
cmp rax, 0FFFFFFFFFFFFFFFFh
cmovnz rsi, rax
test byte ptr [rbp+var_30], 6
cmovnz rsi, rbx
lea rax, PSI_server
mov rax, [rax]
mov rdi, [rbp+var_58]
call qword ptr [rax+218h]
mov rax, r13
jmp loc_7CCA2
loc_7CEC3:
lea rax, PSI_server
mov rax, [rax]
call qword ptr [rax+160h]
jmp loc_7CD4D
|
_BOOL8 my_b_seq_read(long long a1, unsigned long long a2, unsigned long long a3)
{
long long v4; // r15
unsigned long long v5; // rcx
long long v6; // r8
long long v7; // r9
unsigned long long v8; // r13
unsigned int v9; // ebx
long long v10; // rax
unsigned long long v11; // rsi
long long v12; // rax
unsigned long long v13; // rdx
unsigned long long v14; // rax
unsigned long long v15; // r13
long long v16; // rsi
unsigned long long v17; // r15
unsigned long long v18; // rbx
long long v19; // rcx
long long v20; // r8
long long v21; // r9
unsigned long long v22; // rsi
long long v23; // rax
long long v24; // rcx
BOOL v25; // ebx
unsigned long long v26; // r13
unsigned int v27; // ebx
long long v28; // rax
long long v29; // rbx
unsigned long long v30; // rbx
unsigned int v31; // r13d
long long v32; // rax
unsigned long long v33; // rax
long long v34; // rcx
long long v35; // r8
long long v36; // r9
unsigned long long v37; // rbx
unsigned long long v38; // r15
long long v39; // rdi
unsigned long long v41; // r12
unsigned long long v42; // rbx
long long v43; // rsi
long long v44; // rcx
long long v45; // r8
long long v46; // r9
unsigned long long v47; // rax
long long v48; // rax
unsigned long long v49; // r13
_BYTE v50[72]; // [rsp+8h] [rbp-A8h] BYREF
long long v51; // [rsp+50h] [rbp-60h] BYREF
long long v52; // [rsp+58h] [rbp-58h]
unsigned long long v53; // [rsp+60h] [rbp-50h]
unsigned long long v54; // [rsp+68h] [rbp-48h]
unsigned long long v55; // [rsp+70h] [rbp-40h]
unsigned long long v56; // [rsp+78h] [rbp-38h]
long long v57; // [rsp+80h] [rbp-30h]
v55 = a2;
v4 = a1 + 80;
if ( *(_QWORD *)(a1 + 144) )
psi_mutex_lock(a1 + 80, (long long)"/workspace/llm4binary/github2025/eloqsql/mysys/mf_iocache.c", 0x54Cu);
else
pthread_mutex_lock(a1 + 80);
v8 = *(_QWORD *)a1 + *(_QWORD *)(a1 + 24) - *(_QWORD *)(a1 + 32);
if ( v8 >= *(_QWORD *)(a1 + 8) )
{
v56 = *(_QWORD *)a1 + *(_QWORD *)(a1 + 24) - *(_QWORD *)(a1 + 32);
v57 = a1 + 80;
v15 = a3;
LABEL_10:
v16 = *(_QWORD *)(a1 + 56);
v17 = *(_QWORD *)(a1 + 64) - v16;
v18 = v17;
if ( v15 < v17 )
v18 = v15;
memcpy(v55, v16, v18, v5, v6, v7);
v22 = v18 + *(_QWORD *)(a1 + 56);
*(_QWORD *)(a1 + 56) = v22;
if ( v15 > v17 )
*(_DWORD *)(a1 + 228) = v18 + a3 - v15;
memcpy(*(_QWORD *)(a1 + 32), v22, v17 - v18, v19, v20, v21);
v23 = *(_QWORD *)(a1 + 32);
v24 = *(_QWORD *)(a1 + 64);
*(_QWORD *)(a1 + 16) = v23;
*(_QWORD *)(a1 + 24) = v23 + v17 - v18;
*(_QWORD *)(a1 + 56) = v24;
*(_QWORD *)a1 = v18 + v56;
*(_QWORD *)(a1 + 8) += v17;
if ( *(_QWORD *)(a1 + 144) )
(*((void (**)(void))PSI_server + 44))();
v25 = v15 > v17;
pthread_mutex_unlock(v57);
return v25;
}
v9 = *(_DWORD *)(a1 + 212);
v10 = (*((long long ( **)(_BYTE *, _QWORD, long long))PSI_server + 43))(v50, v9, 8LL);
if ( v10 )
{
v11 = v9;
my_b_seq_read_cold_1(v10, v9, v8, &v51);
v12 = v51;
}
else
{
v11 = v8;
v12 = my_seek(v9, v8, 0LL, 0LL);
}
if ( v12 == -1 )
goto LABEL_30;
*(_DWORD *)(a1 + 224) = 0;
v14 = v8 & 0xFFF;
if ( 0x2000 - v14 <= a3 )
{
v56 = v8;
v26 = ((unsigned int)a3 & 0xFFFFF000) - v14;
v27 = *(_DWORD *)(a1 + 212);
v57 = *(_QWORD *)(a1 + 248);
v28 = (*((long long ( **)(_BYTE *, _QWORD, long long))PSI_server + 43))(v50, v27, 6LL);
if ( v28 )
{
v54 = v28;
(*((void ( **)(long long, unsigned long long, const char *, long long))PSI_server + 66))(
v28,
v26,
"/workspace/llm4binary/github2025/eloqsql/mysys/mf_iocache.c",
1385LL);
v29 = my_read(v27, v55, v26, v57);
v11 = 0LL;
v47 = 0LL;
if ( !v29 )
v47 = v26;
if ( v29 != -1 )
v11 = v29;
if ( (v57 & 6) != 0 )
v11 = v47;
(*((void ( **)(unsigned long long, unsigned long long))PSI_server + 67))(v54, v11);
}
else
{
v11 = v55;
v29 = my_read(v27, v55, v26, v57);
}
if ( v29 == -1 )
goto LABEL_30;
v13 = a3 - v29;
v55 += v29;
v56 += v29;
if ( v29 != v26 )
{
LABEL_36:
v57 = a1 + 80;
v15 = v13;
goto LABEL_10;
}
v14 = 0LL;
v8 = v56;
}
else
{
v13 = a3;
}
v5 = *(_QWORD *)(a1 + 240) - v14;
v30 = *(_QWORD *)(a1 + 8) - v8;
if ( v5 < v30 )
v30 = *(_QWORD *)(a1 + 240) - v14;
if ( !v30 )
{
if ( !v13 )
{
v33 = 0LL;
LABEL_39:
v41 = v33;
v42 = v13;
if ( *(_QWORD *)(a1 + 144) )
(*((void (**)(void))PSI_server + 44))();
pthread_mutex_unlock(v4);
v43 = *(_QWORD *)(a1 + 32);
*(_QWORD *)(a1 + 16) = v43 + v42;
*(_QWORD *)(a1 + 24) = v43 + v41;
*(_QWORD *)a1 = v8;
memcpy(v55, v43, v42, v44, v45, v46);
return 0;
}
v56 = v8;
goto LABEL_36;
}
v54 = v13;
v56 = v8;
v31 = *(_DWORD *)(a1 + 212);
v53 = *(_QWORD *)(a1 + 32);
v57 = *(_QWORD *)(a1 + 248);
v32 = (*((long long ( **)(_BYTE *, _QWORD, long long))PSI_server + 43))(v50, v31, 6LL);
if ( v32 )
{
v52 = v32;
(*((void ( **)(long long, unsigned long long, const char *, long long))PSI_server + 66))(
v32,
v30,
"/workspace/llm4binary/github2025/eloqsql/mysys/mf_iocache.c",
1417LL);
v48 = my_read(v31, v53, v30, v57);
v49 = v48;
v11 = 0LL;
if ( v48 )
v30 = 0LL;
if ( v48 != -1 )
v11 = v48;
if ( (v57 & 6) != 0 )
v11 = v30;
(*((void ( **)(long long))PSI_server + 67))(v52);
v33 = v49;
}
else
{
v11 = v53;
v33 = my_read(v31, v53, v30, v57);
}
v13 = v54;
if ( v33 != -1LL )
{
v15 = v54 - v33;
if ( v54 > v33 )
{
v57 = a1 + 80;
v37 = v55;
v38 = v33;
memcpy(v55, *(_QWORD *)(a1 + 32), v33, v34, v35, v36);
v55 = v38 + v37;
v56 += v38;
goto LABEL_10;
}
v8 = v56;
goto LABEL_39;
}
LABEL_30:
*(_DWORD *)(a1 + 228) = -1;
v39 = *(_QWORD *)(a1 + 144);
if ( v39 )
(*((void ( **)(long long, unsigned long long, unsigned long long))PSI_server + 44))(v39, v11, v13);
pthread_mutex_unlock(v4);
return 1;
}
|
_my_b_seq_read:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x88
MOV R12,RDX
MOV qword ptr [RBP + -0x40],RSI
MOV R14,RDI
LEA R15,[RDI + 0x50]
CMP qword ptr [RDI + 0x90],0x0
JNZ 0x0017cd7b
MOV RDI,R15
CALL 0x0013a310
LAB_0017ca74:
MOV R13,qword ptr [R14 + 0x18]
SUB R13,qword ptr [R14 + 0x20]
ADD R13,qword ptr [R14]
CMP R13,qword ptr [R14 + 0x8]
JNC 0x0017caf7
MOV EBX,dword ptr [R14 + 0xd4]
LEA RAX,[0x46ffe8]
MOV RAX,qword ptr [RAX]
LEA RDI,[RBP + -0xa8]
MOV ESI,EBX
MOV EDX,0x8
CALL qword ptr [RAX + 0x158]
TEST RAX,RAX
JNZ 0x0017cda9
MOV EDI,EBX
MOV RSI,R13
XOR EDX,EDX
XOR ECX,ECX
CALL 0x00185264
LAB_0017cac1:
CMP RAX,-0x1
JZ 0x0017ccde
MOV dword ptr [R14 + 0xe0],0x0
MOV EAX,R13D
AND EAX,0xfff
MOV ECX,0x2000
SUB RCX,RAX
CMP RCX,R12
JBE 0x0017cb9e
MOV RDX,R12
JMP 0x0017cc24
LAB_0017caf7:
MOV qword ptr [RBP + -0x38],R13
MOV qword ptr [RBP + -0x30],R15
MOV R13,R12
LAB_0017cb02:
MOV RSI,qword ptr [R14 + 0x38]
MOV R15,qword ptr [R14 + 0x40]
SUB R15,RSI
CMP R13,R15
MOV RBX,R15
CMOVC RBX,R13
MOV RDI,qword ptr [RBP + -0x40]
MOV RDX,RBX
CALL 0x0013a0c0
MOV RSI,qword ptr [R14 + 0x38]
ADD RSI,RBX
MOV qword ptr [R14 + 0x38],RSI
CMP R13,R15
JBE 0x0017cb41
SUB R12D,R13D
LEA EAX,[RBX + R12*0x1]
MOV dword ptr [R14 + 0xe4],EAX
LAB_0017cb41:
MOV RDI,qword ptr [R14 + 0x20]
MOV R12,R15
SUB R12,RBX
MOV RDX,R12
CALL 0x0013a0c0
MOV RAX,qword ptr [R14 + 0x20]
MOV RCX,qword ptr [R14 + 0x40]
MOV qword ptr [R14 + 0x10],RAX
ADD R12,RAX
MOV qword ptr [R14 + 0x18],R12
MOV qword ptr [R14 + 0x38],RCX
MOV RAX,qword ptr [RBP + -0x38]
ADD RAX,RBX
MOV qword ptr [R14],RAX
ADD qword ptr [R14 + 0x8],R15
MOV RDI,qword ptr [R14 + 0x90]
TEST RDI,RDI
JNZ 0x0017cd94
LAB_0017cb88:
XOR EBX,EBX
CMP R13,R15
SETA BL
MOV RDI,qword ptr [RBP + -0x30]
CALL 0x0013a2d0
JMP 0x0017cd06
LAB_0017cb9e:
MOV qword ptr [RBP + -0x38],R13
MOV R13D,R12D
AND R13D,0xfffff000
SUB R13,RAX
MOV EBX,dword ptr [R14 + 0xd4]
MOV RAX,qword ptr [R14 + 0xf8]
MOV qword ptr [RBP + -0x30],RAX
LEA RAX,[0x46ffe8]
MOV RAX,qword ptr [RAX]
LEA RDI,[RBP + -0xa8]
MOV ESI,EBX
MOV EDX,0x6
CALL qword ptr [RAX + 0x158]
TEST RAX,RAX
JNZ 0x0017cdda
MOV EDI,EBX
MOV RSI,qword ptr [RBP + -0x40]
MOV RDX,R13
MOV RCX,qword ptr [RBP + -0x30]
CALL 0x00185064
MOV RBX,RAX
LAB_0017cbfd:
CMP RBX,-0x1
JZ 0x0017ccde
MOV RDX,R12
SUB RDX,RBX
ADD qword ptr [RBP + -0x40],RBX
ADD qword ptr [RBP + -0x38],RBX
CMP RBX,R13
JNZ 0x0017cd23
XOR EAX,EAX
MOV R13,qword ptr [RBP + -0x38]
LAB_0017cc24:
MOV RBX,qword ptr [R14 + 0x8]
MOV RCX,qword ptr [R14 + 0xf0]
SUB RCX,RAX
SUB RBX,R13
CMP RCX,RBX
CMOVC RBX,RCX
TEST RBX,RBX
JZ 0x0017cd1a
MOV qword ptr [RBP + -0x48],RDX
MOV qword ptr [RBP + -0x38],R13
MOV R13D,dword ptr [R14 + 0xd4]
MOV RAX,qword ptr [R14 + 0x20]
MOV qword ptr [RBP + -0x50],RAX
MOV RAX,qword ptr [R14 + 0xf8]
MOV qword ptr [RBP + -0x30],RAX
LEA RAX,[0x46ffe8]
MOV RAX,qword ptr [RAX]
LEA RDI,[RBP + -0xa8]
MOV ESI,R13D
MOV EDX,0x6
CALL qword ptr [RAX + 0x158]
TEST RAX,RAX
JNZ 0x0017ce4f
MOV EDI,R13D
MOV RSI,qword ptr [RBP + -0x50]
MOV RDX,RBX
MOV RCX,qword ptr [RBP + -0x30]
CALL 0x00185064
LAB_0017cca2:
CMP RAX,-0x1
MOV RDX,qword ptr [RBP + -0x48]
JZ 0x0017ccde
MOV R13,RDX
SUB R13,RAX
JBE 0x0017cd2f
MOV qword ptr [RBP + -0x30],R15
MOV RSI,qword ptr [R14 + 0x20]
MOV RBX,qword ptr [RBP + -0x40]
MOV RDI,RBX
MOV RDX,RAX
MOV R15,RAX
CALL 0x0013a0c0
ADD RBX,R15
MOV qword ptr [RBP + -0x40],RBX
ADD qword ptr [RBP + -0x38],R15
JMP 0x0017cb02
LAB_0017ccde:
MOV dword ptr [R14 + 0xe4],0xffffffff
MOV RDI,qword ptr [R14 + 0x90]
TEST RDI,RDI
JNZ 0x0017cdc5
LAB_0017ccf9:
MOV RDI,R15
CALL 0x0013a2d0
MOV EBX,0x1
LAB_0017cd06:
MOV EAX,EBX
ADD RSP,0x88
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_0017cd1a:
TEST RDX,RDX
JZ 0x0017cd35
MOV qword ptr [RBP + -0x38],R13
LAB_0017cd23:
MOV qword ptr [RBP + -0x30],R15
MOV R13,RDX
JMP 0x0017cb02
LAB_0017cd2f:
MOV R13,qword ptr [RBP + -0x38]
JMP 0x0017cd37
LAB_0017cd35:
XOR EAX,EAX
LAB_0017cd37:
MOV R12,RAX
MOV RBX,RDX
MOV RDI,qword ptr [R14 + 0x90]
TEST RDI,RDI
JNZ 0x0017cec3
LAB_0017cd4d:
MOV RDI,R15
CALL 0x0013a2d0
MOV RSI,qword ptr [R14 + 0x20]
MOV RDX,RBX
LEA RAX,[RSI + RBX*0x1]
MOV qword ptr [R14 + 0x10],RAX
ADD R12,RSI
MOV qword ptr [R14 + 0x18],R12
MOV qword ptr [R14],R13
MOV RDI,qword ptr [RBP + -0x40]
CALL 0x0013a0c0
XOR EBX,EBX
JMP 0x0017cd06
LAB_0017cd7b:
LEA RSI,[0x1c0671]
MOV RDI,R15
MOV EDX,0x54c
CALL 0x0013cbe6
JMP 0x0017ca74
LAB_0017cd94:
LEA RAX,[0x46ffe8]
MOV RAX,qword ptr [RAX]
CALL qword ptr [RAX + 0x160]
JMP 0x0017cb88
LAB_0017cda9:
LEA RCX,[RBP + -0x60]
MOV RDI,RAX
MOV ESI,EBX
MOV RDX,R13
MOV RBX,RCX
CALL 0x0013ca8d
MOV RAX,qword ptr [RBX]
JMP 0x0017cac1
LAB_0017cdc5:
LEA RAX,[0x46ffe8]
MOV RAX,qword ptr [RAX]
CALL qword ptr [RAX + 0x160]
JMP 0x0017ccf9
LAB_0017cdda:
MOV RCX,RAX
LEA RAX,[0x46ffe8]
MOV RAX,qword ptr [RAX]
LEA RDX,[0x1c0671]
MOV qword ptr [RBP + -0x48],RCX
MOV RDI,RCX
MOV RSI,R13
MOV ECX,0x569
CALL qword ptr [RAX + 0x210]
MOV EDI,EBX
MOV RSI,qword ptr [RBP + -0x40]
MOV RDX,R13
MOV RCX,qword ptr [RBP + -0x30]
CALL 0x00185064
MOV RBX,RAX
XOR ESI,ESI
TEST RAX,RAX
MOV EAX,0x0
CMOVZ RAX,R13
CMP RBX,-0x1
CMOVNZ RSI,RBX
TEST byte ptr [RBP + -0x30],0x6
CMOVNZ RSI,RAX
LEA RAX,[0x46ffe8]
MOV RAX,qword ptr [RAX]
MOV RDI,qword ptr [RBP + -0x48]
CALL qword ptr [RAX + 0x218]
JMP 0x0017cbfd
LAB_0017ce4f:
MOV RCX,RAX
LEA RAX,[0x46ffe8]
MOV RAX,qword ptr [RAX]
LEA RDX,[0x1c0671]
MOV qword ptr [RBP + -0x58],RCX
MOV RDI,RCX
MOV RSI,RBX
MOV ECX,0x589
CALL qword ptr [RAX + 0x210]
MOV EDI,R13D
MOV RSI,qword ptr [RBP + -0x50]
MOV RDX,RBX
MOV RCX,qword ptr [RBP + -0x30]
CALL 0x00185064
MOV R13,RAX
XOR ESI,ESI
TEST RAX,RAX
CMOVNZ RBX,RSI
CMP RAX,-0x1
CMOVNZ RSI,RAX
TEST byte ptr [RBP + -0x30],0x6
CMOVNZ RSI,RBX
LEA RAX,[0x46ffe8]
MOV RAX,qword ptr [RAX]
MOV RDI,qword ptr [RBP + -0x58]
CALL qword ptr [RAX + 0x218]
MOV RAX,R13
JMP 0x0017cca2
LAB_0017cec3:
LEA RAX,[0x46ffe8]
MOV RAX,qword ptr [RAX]
CALL qword ptr [RAX + 0x160]
JMP 0x0017cd4d
|
bool _my_b_seq_read(ulong *param_1,void *param_2,ulong param_3)
{
int4 uVar1;
void *pvVar2;
pthread_mutex_t *__mutex;
long lVar3;
long lVar4;
ulong __n;
long lVar5;
ulong uVar6;
long lVar7;
uint uVar8;
ulong uVar9;
ulong uVar10;
int1 local_b0 [72];
long local_68;
long local_60;
ulong local_58;
ulong local_50;
void *local_48;
ulong local_40;
pthread_mutex_t *local_38;
__mutex = (pthread_mutex_t *)(param_1 + 10);
local_48 = param_2;
if (param_1[0x12] == 0) {
pthread_mutex_lock(__mutex);
}
else {
psi_mutex_lock(__mutex,"/workspace/llm4binary/github2025/eloqsql/mysys/mf_iocache.c",0x54c);
}
uVar9 = (param_1[3] - param_1[4]) + *param_1;
uVar8 = (uint)param_3;
if (uVar9 < param_1[1]) {
uVar1 = *(int4 *)((long)param_1 + 0xd4);
lVar3 = (**(code **)(PSI_server + 0x158))(local_b0,uVar1,8);
if (lVar3 == 0) {
local_68 = my_seek(uVar1,uVar9,0,0);
}
else {
_my_b_seq_read_cold_1(lVar3,uVar1,uVar9);
}
if (local_68 == -1) {
LAB_0017ccde:
*(int4 *)((long)param_1 + 0xe4) = 0xffffffff;
if (param_1[0x12] != 0) {
(**(code **)(PSI_server + 0x160))();
}
pthread_mutex_unlock(__mutex);
return true;
}
*(int4 *)(param_1 + 0x1c) = 0;
uVar10 = (ulong)((uint)uVar9 & 0xfff);
if (0x2000 - uVar10 <= param_3) {
lVar3 = (uVar8 & 0xfffff000) - uVar10;
uVar1 = *(int4 *)((long)param_1 + 0xd4);
local_38 = (pthread_mutex_t *)param_1[0x1f];
local_40 = uVar9;
uVar9 = (**(code **)(PSI_server + 0x158))(local_b0,uVar1,6);
if (uVar9 == 0) {
lVar4 = my_read(uVar1,local_48,lVar3,local_38);
}
else {
local_50 = uVar9;
(**(code **)(PSI_server + 0x210))
(uVar9,lVar3,"/workspace/llm4binary/github2025/eloqsql/mysys/mf_iocache.c",0x569);
lVar4 = my_read(uVar1,local_48,lVar3,local_38);
lVar5 = 0;
if (lVar4 == 0) {
lVar5 = lVar3;
}
lVar7 = 0;
if (lVar4 != -1) {
lVar7 = lVar4;
}
if (((ulong)local_38 & 6) != 0) {
lVar7 = lVar5;
}
(**(code **)(PSI_server + 0x218))(local_50,lVar7);
}
if (lVar4 == -1) goto LAB_0017ccde;
param_3 = param_3 - lVar4;
local_48 = (void *)((long)local_48 + lVar4);
uVar9 = local_40 + lVar4;
if (lVar4 != lVar3) goto LAB_0017cb02;
uVar10 = 0;
local_40 = uVar9;
}
uVar6 = param_1[1] - uVar9;
if (param_1[0x1e] - uVar10 < param_1[1] - uVar9) {
uVar6 = param_1[0x1e] - uVar10;
}
if (uVar6 == 0) {
if (param_3 == 0) {
__n = 0;
uVar10 = param_3;
LAB_0017cd37:
if (param_1[0x12] != 0) {
(**(code **)(PSI_server + 0x160))();
}
pthread_mutex_unlock(__mutex);
pvVar2 = (void *)param_1[4];
param_1[2] = (long)pvVar2 + uVar10;
param_1[3] = __n + (long)pvVar2;
*param_1 = uVar9;
memcpy(local_48,pvVar2,uVar10);
return false;
}
}
else {
uVar1 = *(int4 *)((long)param_1 + 0xd4);
local_58 = param_1[4];
local_38 = (pthread_mutex_t *)param_1[0x1f];
local_50 = param_3;
local_40 = uVar9;
lVar3 = (**(code **)(PSI_server + 0x158))(local_b0,uVar1,6);
if (lVar3 == 0) {
__n = my_read(uVar1,local_58,uVar6,local_38);
}
else {
local_60 = lVar3;
(**(code **)(PSI_server + 0x210))
(lVar3,uVar6,"/workspace/llm4binary/github2025/eloqsql/mysys/mf_iocache.c",0x589);
__n = my_read(uVar1,local_58,uVar6,local_38);
if (__n != 0) {
uVar6 = 0;
}
uVar9 = 0;
if (__n != 0xffffffffffffffff) {
uVar9 = __n;
}
if (((ulong)local_38 & 6) != 0) {
uVar9 = uVar6;
}
(**(code **)(PSI_server + 0x218))(local_60,uVar9);
}
pvVar2 = local_48;
if (__n == 0xffffffffffffffff) goto LAB_0017ccde;
param_3 = local_50 - __n;
uVar10 = local_50;
uVar9 = local_40;
if (local_50 < __n || param_3 == 0) goto LAB_0017cd37;
local_38 = __mutex;
memcpy(local_48,(void *)param_1[4],__n);
local_48 = (void *)((long)pvVar2 + __n);
uVar9 = local_40 + __n;
__mutex = local_38;
}
}
LAB_0017cb02:
local_38 = __mutex;
local_40 = uVar9;
uVar10 = param_1[8] - (long)param_1[7];
uVar9 = uVar10;
if (param_3 < uVar10) {
uVar9 = param_3;
}
memcpy(local_48,(void *)param_1[7],uVar9);
uVar6 = param_1[7];
param_1[7] = uVar6 + uVar9;
if (uVar10 < param_3) {
*(uint *)((long)param_1 + 0xe4) = (int)uVar9 + (uVar8 - (int)param_3);
}
memcpy((void *)param_1[4],(void *)(uVar6 + uVar9),uVar10 - uVar9);
param_1[2] = param_1[4];
param_1[3] = (uVar10 - uVar9) + param_1[4];
param_1[7] = param_1[8];
*param_1 = local_40 + uVar9;
param_1[1] = param_1[1] + uVar10;
if (param_1[0x12] != 0) {
(**(code **)(PSI_server + 0x160))();
}
pthread_mutex_unlock(local_38);
return uVar10 < param_3;
}
|
|
57,245
|
store_param
|
eloqsql/libmariadb/libmariadb/mariadb_stmt.c
|
int store_param(MYSQL_STMT *stmt, int column, unsigned char **p, unsigned long row_nr)
{
void *buf= ma_get_buffer_offset(stmt, stmt->params[column].buffer_type,
stmt->params[column].buffer, row_nr);
signed char indicator= ma_get_indicator(stmt, column, row_nr);
switch (stmt->params[column].buffer_type) {
case MYSQL_TYPE_TINY:
int1store(*p, (*(uchar *)buf));
(*p) += 1;
break;
case MYSQL_TYPE_SHORT:
case MYSQL_TYPE_YEAR:
int2store(*p, (*(short *)buf));
(*p) += 2;
break;
case MYSQL_TYPE_FLOAT:
float4store(*p, (*(float *)buf));
(*p) += 4;
break;
case MYSQL_TYPE_DOUBLE:
float8store(*p, (*(double *)buf));
(*p) += 8;
break;
case MYSQL_TYPE_LONGLONG:
int8store(*p, (*(ulonglong *)buf));
(*p) += 8;
break;
case MYSQL_TYPE_LONG:
case MYSQL_TYPE_INT24:
int4store(*p, (*(int32 *)buf));
(*p)+= 4;
break;
case MYSQL_TYPE_TIME:
{
/* binary encoding:
Offset Length Field
0 1 Length
1 1 negative
2-5 4 day
6 1 hour
7 1 minute
8 1 second;
9-13 4 second_part
*/
MYSQL_TIME *t= (MYSQL_TIME *)ma_get_buffer_offset(stmt, stmt->params[column].buffer_type,
stmt->params[column].buffer, row_nr);
char t_buffer[MAX_TIME_STR_LEN];
uint len= 0;
t_buffer[1]= t->neg ? 1 : 0;
int4store(t_buffer + 2, t->day);
t_buffer[6]= (uchar) t->hour;
t_buffer[7]= (uchar) t->minute;
t_buffer[8]= (uchar) t->second;
if (t->second_part)
{
int4store(t_buffer + 9, t->second_part);
len= 12;
}
else if (t->day || t->hour || t->minute || t->second)
len= 8;
t_buffer[0]= len++;
memcpy(*p, t_buffer, len);
(*p)+= len;
break;
}
case MYSQL_TYPE_DATE:
case MYSQL_TYPE_TIMESTAMP:
case MYSQL_TYPE_DATETIME:
{
/* binary format for date, timestamp and datetime
Offset Length Field
0 1 Length
1-2 2 Year
3 1 Month
4 1 Day
5 1 Hour
6 1 minute
7 1 second
8-11 4 secondpart
*/
MYSQL_TIME *t= (MYSQL_TIME *)ma_get_buffer_offset(stmt, stmt->params[column].buffer_type,
stmt->params[column].buffer, row_nr);
char t_buffer[MAX_DATETIME_STR_LEN];
uint len= 0;
int2store(t_buffer + 1, t->year);
t_buffer[3]= (char) t->month;
t_buffer[4]= (char) t->day;
t_buffer[5]= (char) t->hour;
t_buffer[6]= (char) t->minute;
t_buffer[7]= (char) t->second;
if (t->second_part)
{
int4store(t_buffer + 8, t->second_part);
len= 11;
}
else if (t->hour || t->minute || t->second)
len= 7;
else if (t->year || t->month || t->day)
len= 4;
else
len=0;
t_buffer[0]= len++;
memcpy(*p, t_buffer, len);
(*p)+= len;
break;
}
case MYSQL_TYPE_TINY_BLOB:
case MYSQL_TYPE_MEDIUM_BLOB:
case MYSQL_TYPE_LONG_BLOB:
case MYSQL_TYPE_BLOB:
case MYSQL_TYPE_VARCHAR:
case MYSQL_TYPE_VAR_STRING:
case MYSQL_TYPE_STRING:
case MYSQL_TYPE_JSON:
case MYSQL_TYPE_DECIMAL:
case MYSQL_TYPE_NEWDECIMAL:
{
ulong len;
/* to is after p. The latter hasn't been moved */
uchar *to;
if (indicator == STMT_INDICATOR_NTS)
len= -1;
else
len= ma_get_length(stmt, column, row_nr);
if (len == (ulong)-1)
len= (ulong)strlen((char *)buf);
to = mysql_net_store_length(*p, len);
if (len)
memcpy(to, buf, len);
(*p) = to + len;
break;
}
default:
/* unsupported parameter type */
SET_CLIENT_STMT_ERROR(stmt, CR_UNSUPPORTED_PARAM_TYPE, SQLSTATE_UNKNOWN, 0);
return 1;
}
return 0;
}
|
O3
|
c
|
store_param:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rdx, %r10
movl %esi, %r13d
movq %rdi, %r12
movq %fs:0x28, %rax
movq %rax, -0x30(%rbp)
movq 0x70(%rdi), %r14
movslq %esi, %rax
imulq $0x70, %rax, %rax
movl 0x60(%r14,%rax), %edi
movq 0x10(%r14,%rax), %rax
movq 0x390(%r12), %rbx
movq %rax, %r15
testq %rbx, %rbx
jne 0x1ee54
cmpl $0x0, 0x368(%r12)
movq %rax, %r15
je 0x1ee54
movq 0x370(%r12), %r15
testq %r15, %r15
jne 0x1ee4d
leaq (%rdi,%rdi,2), %rdx
leaq 0x2a191(%rip), %rsi # 0x48fd0
movslq 0x8(%rsi,%rdx,8), %r15
testq %r15, %r15
jle 0x1f14c
imulq %rcx, %r15
addq %rax, %r15
cmpl $0xf, %edi
ja 0x1eeee
leaq 0x19144(%rip), %rdx # 0x37fa8
movslq (%rdx,%rdi,4), %rsi
addq %rdx, %rsi
jmpq *%rsi
testq %rbx, %rbx
jne 0x1eeaa
cmpl $0x0, 0x368(%r12)
je 0x1eeaa
movq 0x370(%r12), %rdx
testq %rdx, %rdx
jne 0x1eea3
leaq (%rdi,%rdi,2), %rsi
leaq 0x2a13b(%rip), %rdx # 0x48fd0
movslq 0x8(%rdx,%rsi,8), %rdx
testq %rdx, %rdx
jle 0x1f1f3
imulq %rcx, %rdx
addq %rdx, %rax
movl (%rax), %ecx
movw %cx, -0x3c(%rbp)
movl 0x4(%rax), %esi
movb %sil, -0x3a(%rbp)
movl 0x8(%rax), %edx
movb %dl, -0x39(%rbp)
movl 0xc(%rax), %edi
movb %dil, -0x38(%rbp)
movl 0x10(%rax), %r8d
movb %r8b, -0x37(%rbp)
movl 0x14(%rax), %r9d
movb %r9b, -0x36(%rbp)
movq 0x18(%rax), %rax
testq %rax, %rax
je 0x1f020
movl %eax, -0x35(%rbp)
movl $0xb, %eax
jmp 0x1f040
leal -0xf5(%rdi), %eax
cmpl $0x9, %eax
ja 0x1efbc
movl $0x3f3, %edx # imm = 0x3F3
btl %eax, %edx
jae 0x1efbc
movq %r10, -0x48(%rbp)
movq %r12, %rdi
movl %r13d, %esi
movq %rcx, -0x50(%rbp)
movq %rcx, %rdx
callq 0x1f20a
cmpb $-0x1, %al
je 0x1f166
movl %r13d, %eax
imulq $0x70, %rax, %rax
movq (%r14,%rax), %rax
testq %rax, %rax
je 0x1ef60
testq %rbx, %rbx
jne 0x1f15d
movq 0x370(%r12), %rcx
testq %rcx, %rcx
je 0x1f155
imulq -0x50(%rbp), %rcx
addq %rcx, %rax
jmp 0x1f15d
movq -0x48(%rbp), %rax
movq (%rax), %rdi
xorl %r14d, %r14d
xorl %esi, %esi
callq 0x1ed2f
movq %rax, %r12
jmp 0x1f19b
movzwl (%r15), %eax
movq (%r10), %rcx
movb %al, (%rcx)
movq (%r10), %rcx
movb %ah, 0x1(%rcx)
addq $0x2, (%r10)
jmp 0x1f1d3
movb (%r15), %al
movq (%r10), %rcx
movb %al, (%rcx)
movb 0x1(%r15), %al
movq (%r10), %rcx
movb %al, 0x1(%rcx)
movb 0x2(%r15), %al
movq (%r10), %rcx
movb %al, 0x2(%rcx)
movb 0x3(%r15), %al
movq (%r10), %rcx
movb %al, 0x3(%rcx)
jmp 0x1f143
movl $0x7f4, 0x108(%r12) # imm = 0x7F4
leaq 0x30d(%r12), %rdi
leaq 0x29a89(%rip), %rax # 0x48a60
movq (%rax), %rsi
movl $0x5, %edx
callq 0x13220
xorl %ebx, %ebx
movb %bl, 0x312(%r12)
leaq 0x10c(%r12), %rdi
leaq 0x29a73(%rip), %rax # 0x48a70
movq 0x120(%rax), %rsi
movl $0x200, %edx # imm = 0x200
callq 0x13220
movb %bl, 0x30b(%r12)
movl $0x1, %eax
jmp 0x1f1d5
orl %r8d, %edi
movl $0x7, %eax
orl %r9d, %edi
jne 0x1f040
movl $0x4, %eax
orl %esi, %ecx
jne 0x1f040
xorl %eax, %eax
testl %edx, %edx
setne %al
shll $0x2, %eax
movl %eax, %r14d
incq %r14
jmp 0x1f1bc
testq %rbx, %rbx
jne 0x1f086
cmpl $0x0, 0x368(%r12)
je 0x1f086
movq 0x370(%r12), %rdx
testq %rdx, %rdx
jne 0x1f07f
leaq 0x29f61(%rip), %rdx # 0x48fd0
movslq 0x110(%rdx), %rdx
testq %rdx, %rdx
jle 0x1f1fc
imulq %rcx, %rdx
addq %rdx, %rax
cmpb $0x0, 0x20(%rax)
setne -0x3c(%rbp)
movl 0x8(%rax), %ecx
movl %ecx, -0x3b(%rbp)
movl 0xc(%rax), %edx
movb %dl, -0x37(%rbp)
movl 0x10(%rax), %esi
movb %sil, -0x36(%rbp)
movl 0x14(%rax), %edi
movb %dil, -0x35(%rbp)
movq 0x18(%rax), %rax
testq %rax, %rax
je 0x1f1a7
movl %eax, -0x34(%rbp)
movl $0xc, %eax
jmp 0x1f1b5
movq (%r10), %rax
movq (%r15), %rcx
movq %rcx, (%rax)
jmp 0x1f132
movb (%r15), %al
movq (%r10), %rcx
movb %al, (%rcx)
incq (%r10)
jmp 0x1f1d3
movq (%r15), %rax
movq %rax, %rcx
shrq $0x20, %rcx
movq (%r10), %rdx
movb %al, (%rdx)
movq (%r10), %rdx
movb %ah, 0x1(%rdx)
movl %eax, %edx
shrl $0x10, %edx
movq (%r10), %rsi
movb %dl, 0x2(%rsi)
movl %eax, %edx
shrl $0x18, %edx
movq (%r10), %rsi
movb %dl, 0x3(%rsi)
movq (%r10), %rdx
movb %cl, 0x4(%rdx)
movq %rax, %rcx
shrq $0x28, %rcx
movq (%r10), %rdx
movb %cl, 0x5(%rdx)
movq %rax, %rcx
shrq $0x30, %rcx
movq (%r10), %rdx
movb %cl, 0x6(%rdx)
shrq $0x38, %rax
movq (%r10), %rcx
movb %al, 0x7(%rcx)
addq $0x8, (%r10)
jmp 0x1f1d3
movq (%r10), %rax
movl (%r15), %ecx
movl %ecx, (%rax)
addq $0x4, (%r10)
jmp 0x1f1d3
movq (%rax,%rcx,8), %r15
jmp 0x1ee54
movq -0x50(%rbp), %rcx
leaq (%rax,%rcx,8), %rax
movq (%rax), %r14
cmpq $-0x1, %r14
jne 0x1f171
movq %r15, %rdi
callq 0x131c0
movq %rax, %r14
movq -0x48(%rbp), %rax
movq (%rax), %rdi
movq %r14, %rsi
callq 0x1ed2f
movq %rax, %r12
testq %r14, %r14
je 0x1f198
movq %r12, %rdi
movq %r15, %rsi
movq %r14, %rdx
callq 0x13390
jmp 0x1f19b
xorl %r14d, %r14d
addq %r14, %r12
movq -0x48(%rbp), %rax
movq %r12, (%rax)
jmp 0x1f1d3
orl %edx, %ecx
orl %esi, %ecx
xorl %eax, %eax
orl %edi, %ecx
setne %al
shll $0x3, %eax
movl %eax, %r14d
orl $0x1, %r14d
leaq -0x3d(%rbp), %rsi
movb %al, (%rsi)
movq (%r10), %rdi
movq %r14, %rdx
movq %r10, %rbx
callq 0x13390
addq %r14, (%rbx)
xorl %eax, %eax
movq %fs:0x28, %rcx
cmpq -0x30(%rbp), %rcx
jne 0x1f205
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq (%rax,%rcx,8), %rax
jmp 0x1eeaa
movq (%rax,%rcx,8), %rax
jmp 0x1f086
callq 0x13500
|
store_param:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 28h
mov r10, rdx
mov r13d, esi
mov r12, rdi
mov rax, fs:28h
mov [rbp+var_30], rax
mov r14, [rdi+70h]
movsxd rax, esi
imul rax, 70h ; 'p'
mov edi, [r14+rax+60h]
mov rax, [r14+rax+10h]
mov rbx, [r12+390h]
mov r15, rax
test rbx, rbx
jnz short loc_1EE54
cmp dword ptr [r12+368h], 0
mov r15, rax
jz short loc_1EE54
mov r15, [r12+370h]
test r15, r15
jnz short loc_1EE4D
lea rdx, [rdi+rdi*2]
lea rsi, mysql_ps_fetch_functions
movsxd r15, dword ptr [rsi+rdx*8+8]
test r15, r15
jle loc_1F14C
loc_1EE4D:
imul r15, rcx
add r15, rax
loc_1EE54:
cmp edi, 0Fh; switch 16 cases
ja def_1EE6B; jumptable 000000000001EE6B default case
lea rdx, jpt_1EE6B
movsxd rsi, ds:(jpt_1EE6B - 37FA8h)[rdx+rdi*4]
add rsi, rdx
jmp rsi; switch jump
loc_1EE6D:
test rbx, rbx; jumptable 000000000001EE6B cases 7,10,12
jnz short loc_1EEAA
cmp dword ptr [r12+368h], 0
jz short loc_1EEAA
mov rdx, [r12+370h]
test rdx, rdx
jnz short loc_1EEA3
lea rsi, [rdi+rdi*2]
lea rdx, mysql_ps_fetch_functions
movsxd rdx, dword ptr [rdx+rsi*8+8]
test rdx, rdx
jle loc_1F1F3
loc_1EEA3:
imul rdx, rcx
add rax, rdx
loc_1EEAA:
mov ecx, [rax]
mov word ptr [rbp+var_3C], cx
mov esi, [rax+4]
mov byte ptr [rbp+var_3C+2], sil
mov edx, [rax+8]
mov byte ptr [rbp+var_3C+3], dl
mov edi, [rax+0Ch]
mov [rbp+var_38], dil
mov r8d, [rax+10h]
mov [rbp+var_37], r8b
mov r9d, [rax+14h]
mov [rbp+var_36], r9b
mov rax, [rax+18h]
test rax, rax
jz loc_1F020
mov [rbp+var_35], eax
mov eax, 0Bh
jmp loc_1F040
def_1EE6B:
lea eax, [rdi-0F5h]; jumptable 000000000001EE6B default case
cmp eax, 9
ja loc_1EFBC; jumptable 000000000001EE6B cases 6,14
mov edx, 3F3h
bt edx, eax
jnb loc_1EFBC; jumptable 000000000001EE6B cases 6,14
loc_1EF0B:
mov [rbp+var_48], r10; jumptable 000000000001EE6B cases 0,15
mov rdi, r12
mov esi, r13d
mov [rbp+var_50], rcx
mov rdx, rcx
call ma_get_indicator
cmp al, 0FFh
jz loc_1F166
mov eax, r13d
imul rax, 70h ; 'p'
mov rax, [r14+rax]
test rax, rax
jz short loc_1EF60
test rbx, rbx
jnz loc_1F15D
mov rcx, [r12+370h]
test rcx, rcx
jz loc_1F155
imul rcx, [rbp+var_50]
add rax, rcx
jmp loc_1F15D
loc_1EF60:
mov rax, [rbp+var_48]
mov rdi, [rax]
xor r14d, r14d
xor esi, esi
call mysql_net_store_length
mov r12, rax
jmp loc_1F19B
loc_1EF79:
movzx eax, word ptr [r15]; jumptable 000000000001EE6B cases 2,13
mov rcx, [r10]
mov [rcx], al
mov rcx, [r10]
mov [rcx+1], ah
add qword ptr [r10], 2
jmp loc_1F1D3
loc_1EF91:
mov al, [r15]; jumptable 000000000001EE6B cases 3,9
mov rcx, [r10]
mov [rcx], al
mov al, [r15+1]
mov rcx, [r10]
mov [rcx+1], al
mov al, [r15+2]
mov rcx, [r10]
mov [rcx+2], al
mov al, [r15+3]
mov rcx, [r10]
mov [rcx+3], al
jmp loc_1F143
loc_1EFBC:
mov dword ptr [r12+108h], 7F4h; jumptable 000000000001EE6B cases 6,14
lea rdi, [r12+30Dh]
lea rax, SQLSTATE_UNKNOWN
mov rsi, [rax]
mov edx, 5
call _strncpy
xor ebx, ebx
mov [r12+312h], bl
lea rdi, [r12+10Ch]
lea rax, client_errors
mov rsi, [rax+120h]
mov edx, 200h
call _strncpy
mov [r12+30Bh], bl
mov eax, 1
jmp loc_1F1D5
loc_1F020:
or edi, r8d
mov eax, 7
or edi, r9d
jnz short loc_1F040
mov eax, 4
or ecx, esi
jnz short loc_1F040
xor eax, eax
test edx, edx
setnz al
shl eax, 2
loc_1F040:
mov r14d, eax
inc r14
jmp loc_1F1BC
loc_1F04B:
test rbx, rbx; jumptable 000000000001EE6B case 11
jnz short loc_1F086
cmp dword ptr [r12+368h], 0
jz short loc_1F086
mov rdx, [r12+370h]
test rdx, rdx
jnz short loc_1F07F
lea rdx, mysql_ps_fetch_functions
movsxd rdx, dword ptr [rdx+110h]
test rdx, rdx
jle loc_1F1FC
loc_1F07F:
imul rdx, rcx
add rax, rdx
loc_1F086:
cmp byte ptr [rax+20h], 0
setnz byte ptr [rbp+var_3C]
mov ecx, [rax+8]
mov [rbp+var_3C+1], ecx
mov edx, [rax+0Ch]
mov [rbp+var_37], dl
mov esi, [rax+10h]
mov [rbp+var_36], sil
mov edi, [rax+14h]
mov byte ptr [rbp+var_35], dil
mov rax, [rax+18h]
test rax, rax
jz loc_1F1A7
mov [rbp+var_35+1], eax
mov eax, 0Ch
jmp loc_1F1B5
loc_1F0C2:
mov rax, [r10]; jumptable 000000000001EE6B case 5
mov rcx, [r15]
mov [rax], rcx
jmp short loc_1F132
loc_1F0CD:
mov al, [r15]; jumptable 000000000001EE6B case 1
mov rcx, [r10]
mov [rcx], al
inc qword ptr [r10]
jmp loc_1F1D3
loc_1F0DD:
mov rax, [r15]; jumptable 000000000001EE6B case 8
mov rcx, rax
shr rcx, 20h
mov rdx, [r10]
mov [rdx], al
mov rdx, [r10]
mov [rdx+1], ah
mov edx, eax
shr edx, 10h
mov rsi, [r10]
mov [rsi+2], dl
mov edx, eax
shr edx, 18h
mov rsi, [r10]
mov [rsi+3], dl
mov rdx, [r10]
mov [rdx+4], cl
mov rcx, rax
shr rcx, 28h
mov rdx, [r10]
mov [rdx+5], cl
mov rcx, rax
shr rcx, 30h
mov rdx, [r10]
mov [rdx+6], cl
shr rax, 38h
mov rcx, [r10]
mov [rcx+7], al
loc_1F132:
add qword ptr [r10], 8
jmp loc_1F1D3
loc_1F13B:
mov rax, [r10]; jumptable 000000000001EE6B case 4
mov ecx, [r15]
mov [rax], ecx
loc_1F143:
add qword ptr [r10], 4
jmp loc_1F1D3
loc_1F14C:
mov r15, [rax+rcx*8]
jmp loc_1EE54
loc_1F155:
mov rcx, [rbp+var_50]
lea rax, [rax+rcx*8]
loc_1F15D:
mov r14, [rax]
cmp r14, 0FFFFFFFFFFFFFFFFh
jnz short loc_1F171
loc_1F166:
mov rdi, r15
call _strlen
mov r14, rax
loc_1F171:
mov rax, [rbp+var_48]
mov rdi, [rax]
mov rsi, r14
call mysql_net_store_length
mov r12, rax
test r14, r14
jz short loc_1F198
mov rdi, r12
mov rsi, r15
mov rdx, r14
call _memcpy
jmp short loc_1F19B
loc_1F198:
xor r14d, r14d
loc_1F19B:
add r12, r14
mov rax, [rbp+var_48]
mov [rax], r12
jmp short loc_1F1D3
loc_1F1A7:
or ecx, edx
or ecx, esi
xor eax, eax
or ecx, edi
setnz al
shl eax, 3
loc_1F1B5:
mov r14d, eax
or r14d, 1
loc_1F1BC:
lea rsi, [rbp+var_3D]
mov [rsi], al
mov rdi, [r10]
mov rdx, r14
mov rbx, r10
call _memcpy
add [rbx], r14
loc_1F1D3:
xor eax, eax
loc_1F1D5:
mov rcx, fs:28h
cmp rcx, [rbp+var_30]
jnz short loc_1F205
add rsp, 28h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_1F1F3:
mov rax, [rax+rcx*8]
jmp loc_1EEAA
loc_1F1FC:
mov rax, [rax+rcx*8]
jmp loc_1F086
loc_1F205:
call ___stack_chk_fail
|
long long store_param(long long a1, unsigned int a2, _QWORD *a3, long long a4)
{
long long v6; // r14
long long v7; // rax
long long v8; // rdi
int *v9; // rax
long long v10; // rbx
_BYTE *v11; // r15
long long v12; // r15
long long v13; // rdx
int v14; // ecx
int v15; // esi
int v16; // edx
int v17; // edi
int v18; // r8d
int v19; // r9d
long long v20; // rax
unsigned int v21; // eax
int v22; // edx
unsigned long long *v23; // rax
long long v24; // rcx
unsigned long long v25; // r14
long long v26; // r12
long long v28; // r14
long long v29; // rdx
int v30; // ecx
int v31; // edx
int v32; // esi
int v33; // edi
long long v34; // rax
long long v35; // rax
long long v36; // rcx
long long v37; // rax
_QWORD *v38; // rbx
long long *v40; // [rsp+8h] [rbp-48h]
char v41; // [rsp+13h] [rbp-3Dh] BYREF
_BYTE v42[5]; // [rsp+14h] [rbp-3Ch]
char v43; // [rsp+19h] [rbp-37h]
char v44; // [rsp+1Ah] [rbp-36h]
_BYTE v45[5]; // [rsp+1Bh] [rbp-35h]
unsigned long long v46; // [rsp+20h] [rbp-30h]
v46 = __readfsqword(0x28u);
v6 = *(_QWORD *)(a1 + 112);
v7 = 112LL * (int)a2;
v8 = *(unsigned int *)(v6 + v7 + 96);
v9 = *(int **)(v6 + v7 + 16);
v10 = *(_QWORD *)(a1 + 912);
v11 = v9;
if ( !v10 )
{
v11 = v9;
if ( *(_DWORD *)(a1 + 872) )
{
v12 = *(_QWORD *)(a1 + 880);
if ( v12 || (v12 = mysql_ps_fetch_functions[6 * v8 + 2], v12 > 0) )
v11 = (char *)v9 + a4 * v12;
else
v11 = *(_BYTE **)&v9[2 * a4];
}
}
switch ( (int)v8 )
{
case 0:
case 15:
goto LABEL_16;
case 1:
*(_BYTE *)(*a3)++ = *v11;
return 0LL;
case 2:
case 13:
*(_WORD *)*a3 = *(_WORD *)v11;
*a3 += 2LL;
return 0LL;
case 3:
case 9:
*(_BYTE *)*a3 = *v11;
*(_BYTE *)(*a3 + 1LL) = v11[1];
*(_BYTE *)(*a3 + 2LL) = v11[2];
*(_BYTE *)(*a3 + 3LL) = v11[3];
goto LABEL_41;
case 4:
*(_DWORD *)*a3 = *(_DWORD *)v11;
LABEL_41:
*a3 += 4LL;
return 0LL;
case 5:
*(_QWORD *)*a3 = *(_QWORD *)v11;
goto LABEL_39;
case 6:
case 14:
goto LABEL_24;
case 7:
case 10:
case 12:
if ( !v10 && *(_DWORD *)(a1 + 872) )
{
v13 = *(_QWORD *)(a1 + 880);
if ( v13 || (v13 = mysql_ps_fetch_functions[6 * v8 + 2], v13 > 0) )
v9 = (int *)((char *)v9 + a4 * v13);
else
v9 = *(int **)&v9[2 * a4];
}
v14 = *v9;
*(_WORD *)v42 = *v9;
v15 = v9[1];
v42[2] = v15;
v16 = v9[2];
v42[3] = v16;
v17 = v9[3];
v42[4] = v17;
v18 = v9[4];
v43 = v18;
v19 = v9[5];
v44 = v19;
v20 = *((_QWORD *)v9 + 3);
if ( v20 )
{
*(_DWORD *)v45 = v20;
v21 = 11;
}
else
{
v21 = 7;
if ( !(v19 | v18 | v17) )
{
v21 = 4;
if ( !(v15 | v14) )
v21 = 4 * (v16 != 0);
}
}
v28 = v21 + 1LL;
goto LABEL_52;
case 8:
v35 = *(_QWORD *)v11;
v36 = HIDWORD(*(_QWORD *)v11);
*(_WORD *)*a3 = *(_QWORD *)v11;
*(_BYTE *)(*a3 + 2LL) = BYTE2(v35);
*(_BYTE *)(*a3 + 3LL) = BYTE3(v35);
*(_BYTE *)(*a3 + 4LL) = v36;
*(_BYTE *)(*a3 + 5LL) = BYTE5(v35);
*(_BYTE *)(*a3 + 6LL) = BYTE6(v35);
*(_BYTE *)(*a3 + 7LL) = HIBYTE(v35);
LABEL_39:
*a3 += 8LL;
return 0LL;
case 11:
if ( !v10 && *(_DWORD *)(a1 + 872) )
{
v29 = *(_QWORD *)(a1 + 880);
if ( v29 || (v29 = mysql_ps_fetch_functions[68], v29 > 0) )
v9 = (int *)((char *)v9 + a4 * v29);
else
v9 = *(int **)&v9[2 * a4];
}
v42[0] = *((_BYTE *)v9 + 32) != 0;
v30 = v9[2];
*(_DWORD *)&v42[1] = v30;
v31 = v9[3];
v43 = v31;
v32 = v9[4];
v44 = v32;
v33 = v9[5];
v45[0] = v33;
v34 = *((_QWORD *)v9 + 3);
if ( v34 )
{
*(_DWORD *)&v45[1] = v34;
v21 = 12;
}
else
{
v21 = 8 * ((v33 | v32 | v31 | v30) != 0);
}
v28 = v21 | 1;
LABEL_52:
v41 = v21;
v38 = a3;
memcpy(*a3, &v41, v28);
*v38 += v28;
return 0LL;
default:
if ( (unsigned int)(v8 - 245) > 9 || (v22 = 1011, !_bittest(&v22, v8 - 245)) )
{
LABEL_24:
*(_DWORD *)(a1 + 264) = 2036;
strncpy(a1 + 781, SQLSTATE_UNKNOWN, 5LL);
*(_BYTE *)(a1 + 786) = 0;
strncpy(a1 + 268, client_errors[36], 512LL);
*(_BYTE *)(a1 + 779) = 0;
return 1LL;
}
LABEL_16:
v40 = a3;
if ( (unsigned __int8)ma_get_indicator(a1, a2, a4) == 0xFF )
goto LABEL_45;
v23 = *(unsigned long long **)(v6 + 112LL * a2);
if ( v23 )
{
if ( !v10 )
{
v24 = *(_QWORD *)(a1 + 880);
if ( v24 )
v23 = (unsigned long long *)((char *)v23 + a4 * v24);
else
v23 += a4;
}
v25 = *v23;
if ( *v23 == -1LL )
LABEL_45:
v25 = strlen(v11);
v37 = mysql_net_store_length(*v40, v25);
v26 = v37;
if ( v25 )
memcpy(v37, v11, v25);
else
v25 = 0LL;
}
else
{
v25 = 0LL;
v26 = mysql_net_store_length(*v40, 0LL);
}
*v40 = v25 + v26;
return 0LL;
}
}
|
store_param:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x28
MOV R10,RDX
MOV R13D,ESI
MOV R12,RDI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x30],RAX
MOV R14,qword ptr [RDI + 0x70]
MOVSXD RAX,ESI
IMUL RAX,RAX,0x70
MOV EDI,dword ptr [R14 + RAX*0x1 + 0x60]
MOV RAX,qword ptr [R14 + RAX*0x1 + 0x10]
MOV RBX,qword ptr [R12 + 0x390]
MOV R15,RAX
TEST RBX,RBX
JNZ 0x0011ee54
CMP dword ptr [R12 + 0x368],0x0
MOV R15,RAX
JZ 0x0011ee54
MOV R15,qword ptr [R12 + 0x370]
TEST R15,R15
JNZ 0x0011ee4d
LEA RDX,[RDI + RDI*0x2]
LEA RSI,[0x148fd0]
MOVSXD R15,dword ptr [RSI + RDX*0x8 + 0x8]
TEST R15,R15
JLE 0x0011f14c
LAB_0011ee4d:
IMUL R15,RCX
ADD R15,RAX
LAB_0011ee54:
CMP EDI,0xf
JA 0x0011eeee
LEA RDX,[0x137fa8]
MOVSXD RSI,dword ptr [RDX + RDI*0x4]
ADD RSI,RDX
switchD:
JMP RSI
caseD_7:
TEST RBX,RBX
JNZ 0x0011eeaa
CMP dword ptr [R12 + 0x368],0x0
JZ 0x0011eeaa
MOV RDX,qword ptr [R12 + 0x370]
TEST RDX,RDX
JNZ 0x0011eea3
LEA RSI,[RDI + RDI*0x2]
LEA RDX,[0x148fd0]
MOVSXD RDX,dword ptr [RDX + RSI*0x8 + 0x8]
TEST RDX,RDX
JLE 0x0011f1f3
LAB_0011eea3:
IMUL RDX,RCX
ADD RAX,RDX
LAB_0011eeaa:
MOV ECX,dword ptr [RAX]
MOV word ptr [RBP + -0x3c],CX
MOV ESI,dword ptr [RAX + 0x4]
MOV byte ptr [RBP + -0x3a],SIL
MOV EDX,dword ptr [RAX + 0x8]
MOV byte ptr [RBP + -0x39],DL
MOV EDI,dword ptr [RAX + 0xc]
MOV byte ptr [RBP + -0x38],DIL
MOV R8D,dword ptr [RAX + 0x10]
MOV byte ptr [RBP + -0x37],R8B
MOV R9D,dword ptr [RAX + 0x14]
MOV byte ptr [RBP + -0x36],R9B
MOV RAX,qword ptr [RAX + 0x18]
TEST RAX,RAX
JZ 0x0011f020
MOV dword ptr [RBP + -0x35],EAX
MOV EAX,0xb
JMP 0x0011f040
default:
LEA EAX,[RDI + -0xf5]
CMP EAX,0x9
JA 0x0011efbc
MOV EDX,0x3f3
BT EDX,EAX
JNC 0x0011efbc
caseD_0:
MOV qword ptr [RBP + -0x48],R10
MOV RDI,R12
MOV ESI,R13D
MOV qword ptr [RBP + -0x50],RCX
MOV RDX,RCX
CALL 0x0011f20a
CMP AL,0xff
JZ 0x0011f166
MOV EAX,R13D
IMUL RAX,RAX,0x70
MOV RAX,qword ptr [R14 + RAX*0x1]
TEST RAX,RAX
JZ 0x0011ef60
TEST RBX,RBX
JNZ 0x0011f15d
MOV RCX,qword ptr [R12 + 0x370]
TEST RCX,RCX
JZ 0x0011f155
IMUL RCX,qword ptr [RBP + -0x50]
ADD RAX,RCX
JMP 0x0011f15d
LAB_0011ef60:
MOV RAX,qword ptr [RBP + -0x48]
MOV RDI,qword ptr [RAX]
XOR R14D,R14D
XOR ESI,ESI
CALL 0x0011ed2f
MOV R12,RAX
JMP 0x0011f19b
caseD_2:
MOVZX EAX,word ptr [R15]
MOV RCX,qword ptr [R10]
MOV byte ptr [RCX],AL
MOV RCX,qword ptr [R10]
MOV byte ptr [RCX + 0x1],AH
ADD qword ptr [R10],0x2
JMP 0x0011f1d3
caseD_3:
MOV AL,byte ptr [R15]
MOV RCX,qword ptr [R10]
MOV byte ptr [RCX],AL
MOV AL,byte ptr [R15 + 0x1]
MOV RCX,qword ptr [R10]
MOV byte ptr [RCX + 0x1],AL
MOV AL,byte ptr [R15 + 0x2]
MOV RCX,qword ptr [R10]
MOV byte ptr [RCX + 0x2],AL
MOV AL,byte ptr [R15 + 0x3]
MOV RCX,qword ptr [R10]
MOV byte ptr [RCX + 0x3],AL
JMP 0x0011f143
caseD_6:
MOV dword ptr [R12 + 0x108],0x7f4
LEA RDI,[R12 + 0x30d]
LEA RAX,[0x148a60]
MOV RSI,qword ptr [RAX]
MOV EDX,0x5
CALL 0x00113220
XOR EBX,EBX
MOV byte ptr [R12 + 0x312],BL
LEA RDI,[R12 + 0x10c]
LEA RAX,[0x148a70]
MOV RSI,qword ptr [RAX + 0x120]
MOV EDX,0x200
CALL 0x00113220
MOV byte ptr [R12 + 0x30b],BL
MOV EAX,0x1
JMP 0x0011f1d5
LAB_0011f020:
OR EDI,R8D
MOV EAX,0x7
OR EDI,R9D
JNZ 0x0011f040
MOV EAX,0x4
OR ECX,ESI
JNZ 0x0011f040
XOR EAX,EAX
TEST EDX,EDX
SETNZ AL
SHL EAX,0x2
LAB_0011f040:
MOV R14D,EAX
INC R14
JMP 0x0011f1bc
caseD_b:
TEST RBX,RBX
JNZ 0x0011f086
CMP dword ptr [R12 + 0x368],0x0
JZ 0x0011f086
MOV RDX,qword ptr [R12 + 0x370]
TEST RDX,RDX
JNZ 0x0011f07f
LEA RDX,[0x148fd0]
MOVSXD RDX,dword ptr [RDX + 0x110]
TEST RDX,RDX
JLE 0x0011f1fc
LAB_0011f07f:
IMUL RDX,RCX
ADD RAX,RDX
LAB_0011f086:
CMP byte ptr [RAX + 0x20],0x0
SETNZ byte ptr [RBP + -0x3c]
MOV ECX,dword ptr [RAX + 0x8]
MOV dword ptr [RBP + -0x3b],ECX
MOV EDX,dword ptr [RAX + 0xc]
MOV byte ptr [RBP + -0x37],DL
MOV ESI,dword ptr [RAX + 0x10]
MOV byte ptr [RBP + -0x36],SIL
MOV EDI,dword ptr [RAX + 0x14]
MOV byte ptr [RBP + -0x35],DIL
MOV RAX,qword ptr [RAX + 0x18]
TEST RAX,RAX
JZ 0x0011f1a7
MOV dword ptr [RBP + -0x34],EAX
MOV EAX,0xc
JMP 0x0011f1b5
caseD_5:
MOV RAX,qword ptr [R10]
MOV RCX,qword ptr [R15]
MOV qword ptr [RAX],RCX
JMP 0x0011f132
caseD_1:
MOV AL,byte ptr [R15]
MOV RCX,qword ptr [R10]
MOV byte ptr [RCX],AL
INC qword ptr [R10]
JMP 0x0011f1d3
caseD_8:
MOV RAX,qword ptr [R15]
MOV RCX,RAX
SHR RCX,0x20
MOV RDX,qword ptr [R10]
MOV byte ptr [RDX],AL
MOV RDX,qword ptr [R10]
MOV byte ptr [RDX + 0x1],AH
MOV EDX,EAX
SHR EDX,0x10
MOV RSI,qword ptr [R10]
MOV byte ptr [RSI + 0x2],DL
MOV EDX,EAX
SHR EDX,0x18
MOV RSI,qword ptr [R10]
MOV byte ptr [RSI + 0x3],DL
MOV RDX,qword ptr [R10]
MOV byte ptr [RDX + 0x4],CL
MOV RCX,RAX
SHR RCX,0x28
MOV RDX,qword ptr [R10]
MOV byte ptr [RDX + 0x5],CL
MOV RCX,RAX
SHR RCX,0x30
MOV RDX,qword ptr [R10]
MOV byte ptr [RDX + 0x6],CL
SHR RAX,0x38
MOV RCX,qword ptr [R10]
MOV byte ptr [RCX + 0x7],AL
LAB_0011f132:
ADD qword ptr [R10],0x8
JMP 0x0011f1d3
caseD_4:
MOV RAX,qword ptr [R10]
MOV ECX,dword ptr [R15]
MOV dword ptr [RAX],ECX
LAB_0011f143:
ADD qword ptr [R10],0x4
JMP 0x0011f1d3
LAB_0011f14c:
MOV R15,qword ptr [RAX + RCX*0x8]
JMP 0x0011ee54
LAB_0011f155:
MOV RCX,qword ptr [RBP + -0x50]
LEA RAX,[RAX + RCX*0x8]
LAB_0011f15d:
MOV R14,qword ptr [RAX]
CMP R14,-0x1
JNZ 0x0011f171
LAB_0011f166:
MOV RDI,R15
CALL 0x001131c0
MOV R14,RAX
LAB_0011f171:
MOV RAX,qword ptr [RBP + -0x48]
MOV RDI,qword ptr [RAX]
MOV RSI,R14
CALL 0x0011ed2f
MOV R12,RAX
TEST R14,R14
JZ 0x0011f198
MOV RDI,R12
MOV RSI,R15
MOV RDX,R14
CALL 0x00113390
JMP 0x0011f19b
LAB_0011f198:
XOR R14D,R14D
LAB_0011f19b:
ADD R12,R14
MOV RAX,qword ptr [RBP + -0x48]
MOV qword ptr [RAX],R12
JMP 0x0011f1d3
LAB_0011f1a7:
OR ECX,EDX
OR ECX,ESI
XOR EAX,EAX
OR ECX,EDI
SETNZ AL
SHL EAX,0x3
LAB_0011f1b5:
MOV R14D,EAX
OR R14D,0x1
LAB_0011f1bc:
LEA RSI,[RBP + -0x3d]
MOV byte ptr [RSI],AL
MOV RDI,qword ptr [R10]
MOV RDX,R14
MOV RBX,R10
CALL 0x00113390
ADD qword ptr [RBX],R14
LAB_0011f1d3:
XOR EAX,EAX
LAB_0011f1d5:
MOV RCX,qword ptr FS:[0x28]
CMP RCX,qword ptr [RBP + -0x30]
JNZ 0x0011f205
ADD RSP,0x28
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_0011f1f3:
MOV RAX,qword ptr [RAX + RCX*0x8]
JMP 0x0011eeaa
LAB_0011f1fc:
MOV RAX,qword ptr [RAX + RCX*0x8]
JMP 0x0011f086
LAB_0011f205:
CALL 0x00113500
|
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
int8 store_param(long param_1,uint param_2,long *param_3,long param_4)
{
long lVar1;
int iVar2;
char cVar3;
uint uVar4;
int *piVar5;
size_t *psVar6;
int8 uVar7;
size_t sVar8;
void *__dest;
long lVar9;
ulong uVar10;
long lVar11;
int *__s;
long in_FS_OFFSET;
int1 local_45;
int1 local_44;
int1 uStack_43;
int1 uStack_42;
int1 uStack_41;
int1 uStack_40;
int1 local_3f;
int1 local_3e;
int4 local_3d;
int1 uStack_39;
long local_38;
local_38 = *(long *)(in_FS_OFFSET + 0x28);
lVar9 = *(long *)(param_1 + 0x70);
uVar4 = *(uint *)(lVar9 + 0x60 + (long)(int)param_2 * 0x70);
uVar10 = (ulong)uVar4;
piVar5 = *(int **)(lVar9 + 0x10 + (long)(int)param_2 * 0x70);
lVar1 = *(long *)(param_1 + 0x390);
__s = piVar5;
if ((lVar1 == 0) && (*(int *)(param_1 + 0x368) != 0)) {
lVar11 = *(long *)(param_1 + 0x370);
if ((lVar11 == 0) && (lVar11 = (long)(int)(&DAT_00148fd8)[uVar10 * 6], lVar11 < 1)) {
__s = *(int **)(piVar5 + param_4 * 2);
}
else {
__s = (int *)(lVar11 * param_4 + (long)piVar5);
}
}
switch(uVar10) {
case 0:
case 0xf:
goto switchD_0011ee6b_caseD_0;
case 1:
*(char *)*param_3 = (char)*__s;
*param_3 = *param_3 + 1;
break;
case 2:
case 0xd:
iVar2 = *__s;
*(char *)*param_3 = (char)(short)iVar2;
*(char *)(*param_3 + 1) = (char)((ushort)(short)iVar2 >> 8);
*param_3 = *param_3 + 2;
break;
case 3:
case 9:
*(char *)*param_3 = (char)*__s;
*(int1 *)(*param_3 + 1) = *(int1 *)((long)__s + 1);
*(int1 *)(*param_3 + 2) = *(int1 *)((long)__s + 2);
*(int1 *)(*param_3 + 3) = *(int1 *)((long)__s + 3);
goto LAB_0011f143;
case 4:
*(int *)*param_3 = *__s;
LAB_0011f143:
*param_3 = *param_3 + 4;
break;
case 5:
*(int8 *)*param_3 = *(int8 *)__s;
goto LAB_0011f132;
case 6:
case 0xe:
switchD_0011ee6b_caseD_6:
*(int4 *)(param_1 + 0x108) = 0x7f4;
strncpy((char *)(param_1 + 0x30d),SQLSTATE_UNKNOWN,5);
*(int1 *)(param_1 + 0x312) = 0;
strncpy((char *)(param_1 + 0x10c),PTR_s_Buffer_type_is_not_supported_00148b90,0x200);
*(int1 *)(param_1 + 0x30b) = 0;
uVar7 = 1;
goto LAB_0011f1d5;
case 7:
case 10:
case 0xc:
if ((lVar1 == 0) && (*(int *)(param_1 + 0x368) != 0)) {
lVar9 = *(long *)(param_1 + 0x370);
if ((lVar9 == 0) && (lVar9 = (long)(int)(&DAT_00148fd8)[uVar10 * 6], lVar9 < 1)) {
piVar5 = *(int **)(piVar5 + param_4 * 2);
}
else {
piVar5 = (int *)((long)piVar5 + lVar9 * param_4);
}
}
iVar2 = *piVar5;
local_44 = (int1)iVar2;
uStack_43 = (int1)((uint)iVar2 >> 8);
uStack_42 = (int1)piVar5[1];
uStack_41 = (int1)piVar5[2];
uStack_40 = (int1)piVar5[3];
local_3f = (int1)piVar5[4];
local_3e = (int1)piVar5[5];
if (*(long *)(piVar5 + 6) == 0) {
uVar4 = 7;
if (((piVar5[3] == 0 && piVar5[4] == 0) && piVar5[5] == 0) &&
(uVar4 = 4, iVar2 == 0 && piVar5[1] == 0)) {
uVar4 = (uint)(piVar5[2] != 0) << 2;
}
}
else {
local_3d = (int4)*(long *)(piVar5 + 6);
uVar4 = 0xb;
}
sVar8 = (ulong)uVar4 + 1;
goto LAB_0011f1bc;
case 8:
uVar7 = *(int8 *)__s;
*(char *)*param_3 = (char)uVar7;
*(char *)(*param_3 + 1) = (char)((ulong)uVar7 >> 8);
*(char *)(*param_3 + 2) = (char)((ulong)uVar7 >> 0x10);
*(char *)(*param_3 + 3) = (char)((ulong)uVar7 >> 0x18);
*(char *)(*param_3 + 4) = (char)((ulong)uVar7 >> 0x20);
*(char *)(*param_3 + 5) = (char)((ulong)uVar7 >> 0x28);
*(char *)(*param_3 + 6) = (char)((ulong)uVar7 >> 0x30);
*(char *)(*param_3 + 7) = (char)((ulong)uVar7 >> 0x38);
LAB_0011f132:
*param_3 = *param_3 + 8;
break;
case 0xb:
if ((lVar1 == 0) && (*(int *)(param_1 + 0x368) != 0)) {
lVar9 = *(long *)(param_1 + 0x370);
if ((lVar9 == 0) && (lVar9 = (long)_DAT_001490e0, lVar9 < 1)) {
piVar5 = *(int **)(piVar5 + param_4 * 2);
}
else {
piVar5 = (int *)((long)piVar5 + lVar9 * param_4);
}
}
local_44 = (char)piVar5[8] != '\0';
iVar2 = piVar5[2];
uStack_43 = (int1)iVar2;
uStack_42 = (int1)((uint)iVar2 >> 8);
uStack_41 = (int1)((uint)iVar2 >> 0x10);
uStack_40 = (int1)((uint)iVar2 >> 0x18);
local_3f = (int1)piVar5[3];
local_3e = (int1)piVar5[4];
lVar9 = *(long *)(piVar5 + 6);
if (lVar9 == 0) {
uVar4 = (uint)(((iVar2 != 0 || piVar5[3] != 0) || piVar5[4] != 0) || piVar5[5] != 0) << 3;
}
else {
local_3d._1_3_ = (int3)lVar9;
uStack_39 = (int1)((ulong)lVar9 >> 0x18);
uVar4 = 0xc;
}
local_3d = CONCAT31(local_3d._1_3_,(char)piVar5[5]);
sVar8 = (size_t)(uVar4 | 1);
LAB_0011f1bc:
local_45 = (int1)uVar4;
memcpy((void *)*param_3,&local_45,sVar8);
*param_3 = *param_3 + sVar8;
break;
default:
uVar4 = uVar4 - 0xf5;
if ((9 < uVar4) || ((0x3f3U >> (uVar4 & 0x1f) & 1) == 0)) goto switchD_0011ee6b_caseD_6;
switchD_0011ee6b_caseD_0:
cVar3 = ma_get_indicator(param_1,param_2,param_4);
if (cVar3 == -1) {
LAB_0011f166:
sVar8 = strlen((char *)__s);
LAB_0011f171:
__dest = (void *)mysql_net_store_length(*param_3,sVar8);
if (sVar8 == 0) {
sVar8 = 0;
}
else {
memcpy(__dest,__s,sVar8);
}
}
else {
psVar6 = *(size_t **)(lVar9 + (ulong)param_2 * 0x70);
if (psVar6 != (size_t *)0x0) {
if (lVar1 == 0) {
if (*(long *)(param_1 + 0x370) == 0) {
psVar6 = psVar6 + param_4;
}
else {
psVar6 = (size_t *)((long)psVar6 + *(long *)(param_1 + 0x370) * param_4);
}
}
sVar8 = *psVar6;
if (sVar8 == 0xffffffffffffffff) goto LAB_0011f166;
goto LAB_0011f171;
}
sVar8 = 0;
__dest = (void *)mysql_net_store_length(*param_3,0);
}
*param_3 = (long)__dest + sVar8;
}
uVar7 = 0;
LAB_0011f1d5:
if (*(long *)(in_FS_OFFSET + 0x28) != local_38) {
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
return uVar7;
}
|
|
57,246
|
minja::Parser::parseIdentifier()
|
llama.cpp/common/minja/minja.hpp
|
std::shared_ptr<VariableExpr> parseIdentifier() {
static std::regex ident_regex(R"((?!(?:not|is|and|or|del)\b)[a-zA-Z_]\w*)");
auto location = get_location();
auto ident = consumeToken(ident_regex);
if (ident.empty())
return nullptr;
return std::make_shared<VariableExpr>(location, ident);
}
|
O3
|
cpp
|
minja::Parser::parseIdentifier():
pushq %r15
pushq %r14
pushq %rbx
subq $0x40, %rsp
movq %rsi, %r15
movq %rdi, %rbx
leaq 0x728a2(%rip), %rax # 0x10c500
movb (%rax), %al
testb %al, %al
je 0x99d1f
movq (%r15), %rax
movq %rax, 0x28(%rsp)
movq 0x8(%r15), %rax
movq %rax, 0x30(%rsp)
testq %rax, %rax
je 0x99c93
movq 0x71303(%rip), %rcx # 0x10af88
cmpb $0x0, (%rcx)
je 0x99c8f
incl 0x8(%rax)
jmp 0x99c93
lock
incl 0x8(%rax)
leaq 0x30(%rsp), %r14
movq 0x20(%r15), %rax
subq 0x10(%r15), %rax
movq %rax, 0x8(%r14)
leaq 0x72835(%rip), %rdx # 0x10c4e0
leaq 0x8(%rsp), %rdi
movq %r15, %rsi
movl $0x1, %ecx
callq 0x99536
cmpq $0x0, 0x10(%rsp)
je 0x99ce9
movq $0x0, (%rbx)
leaq 0x8(%rbx), %rdi
leaq 0x7(%rsp), %rdx
leaq 0x28(%rsp), %rcx
leaq 0x8(%rsp), %r8
movq %rbx, %rsi
callq 0xa8e4e
jmp 0x99cef
xorps %xmm0, %xmm0
movups %xmm0, (%rbx)
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x99d0a
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x1d160
movq %r14, %rdi
callq 0x56124
movq %rbx, %rax
addq $0x40, %rsp
popq %rbx
popq %r14
popq %r15
retq
leaq 0x727da(%rip), %rdi # 0x10c500
callq 0x1d4a0
testl %eax, %eax
je 0x99c68
leaq 0x727a6(%rip), %rdi # 0x10c4e0
leaq 0x3bdd0(%rip), %rsi # 0xd5b11
movl $0x10, %edx
callq 0x562d4
leaq -0x43a18(%rip), %rdi # 0x5633a
leaq 0x72787(%rip), %rsi # 0x10c4e0
leaq 0x71b28(%rip), %rdx # 0x10b888
callq 0x1dc70
leaq 0x72794(%rip), %rdi # 0x10c500
callq 0x1d7d0
jmp 0x99c68
movq %rax, %rbx
leaq 0x72780(%rip), %rdi # 0x10c500
callq 0x1d5b0
jmp 0x99db2
movq %rax, %rbx
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x99daa
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x1d160
jmp 0x99daa
movq %rax, %rbx
movq %r14, %rdi
callq 0x56124
movq %rbx, %rdi
callq 0x1d8e0
|
_ZN5minja6Parser15parseIdentifierEv:
push r15
push r14
push rbx
sub rsp, 40h
mov r15, rsi
mov rbx, rdi
lea rax, _ZGVZN5minja6Parser15parseIdentifierEvE11ident_regexB5cxx11; `guard variable for'minja::Parser::parseIdentifier(void)::ident_regex
mov al, [rax]
test al, al
jz loc_99D1F
loc_99C68:
mov rax, [r15]
mov [rsp+58h+var_30], rax
mov rax, [r15+8]
mov [rsp+58h+var_28], rax
test rax, rax
jz short loc_99C93
mov rcx, cs:_ZTISt19_Sp_make_shared_tag; `typeinfo for'std::_Sp_make_shared_tag
cmp byte ptr [rcx], 0
jz short loc_99C8F
inc dword ptr [rax+8]
jmp short loc_99C93
loc_99C8F:
lock inc dword ptr [rax+8]
loc_99C93:
lea r14, [rsp+58h+var_28]
mov rax, [r15+20h]
sub rax, [r15+10h]
mov [r14+8], rax
lea rdx, _ZZN5minja6Parser15parseIdentifierEvE11ident_regexB5cxx11; int
lea rdi, [rsp+58h+var_50]; int
mov rsi, r15; int
mov ecx, 1; int
call _ZN5minja6Parser12consumeTokenERKNSt7__cxx1111basic_regexIcNS1_12regex_traitsIcEEEENS_13SpaceHandlingE; minja::Parser::consumeToken(std::basic_regex<char,std::regex_traits<char>> const&,minja::SpaceHandling)
cmp [rsp+58h+var_48], 0
jz short loc_99CE9
mov qword ptr [rbx], 0
lea rdi, [rbx+8]
lea rdx, [rsp+58h+var_51]
lea rcx, [rsp+58h+var_30]
lea r8, [rsp+58h+var_50]
mov rsi, rbx
call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EEC2IN5minja12VariableExprESaIvEJRNS4_8LocationERNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEEERPT_St20_Sp_alloc_shared_tagIT0_EDpOT1_; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::__shared_count<minja::VariableExpr,std::allocator<void>,minja::Location &,std::string &>(minja::VariableExpr *&,std::_Sp_alloc_shared_tag<std::allocator<void>>,minja::Location &,std::string &)
jmp short loc_99CEF
loc_99CE9:
xorps xmm0, xmm0
movups xmmword ptr [rbx], xmm0
loc_99CEF:
lea rax, [rsp+58h+var_40]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_99D0A
mov rsi, [rsp+58h+var_40]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_99D0A:
mov rdi, r14
call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count()
mov rax, rbx
add rsp, 40h
pop rbx
pop r14
pop r15
retn
loc_99D1F:
lea rdi, _ZGVZN5minja6Parser15parseIdentifierEvE11ident_regexB5cxx11; __guard *
call ___cxa_guard_acquire
test eax, eax
jz loc_99C68
lea rdi, _ZZN5minja6Parser15parseIdentifierEvE11ident_regexB5cxx11; minja::Parser::parseIdentifier(void)::ident_regex
lea rsi, aNotIsAndOrDelB; "(?!(?:not|is|and|or|del)\\b)[a-zA-Z_]\\"...
mov edx, 10h
call _ZNSt7__cxx1111basic_regexIcNS_12regex_traitsIcEEEC2EPKcNSt15regex_constants18syntax_option_typeE; std::basic_regex<char,std::regex_traits<char>>::basic_regex(char const*,std::regex_constants::syntax_option_type)
lea rdi, _ZNSt7__cxx1111basic_regexIcNS_12regex_traitsIcEEED2Ev; lpfunc
lea rsi, _ZZN5minja6Parser15parseIdentifierEvE11ident_regexB5cxx11; obj
lea rdx, __dso_handle; lpdso_handle
call ___cxa_atexit
lea rdi, _ZGVZN5minja6Parser15parseIdentifierEvE11ident_regexB5cxx11; __guard *
call ___cxa_guard_release
jmp loc_99C68
mov rbx, rax
lea rdi, _ZGVZN5minja6Parser15parseIdentifierEvE11ident_regexB5cxx11; __guard *
call ___cxa_guard_abort
jmp short loc_99DB2
mov rbx, rax
lea rax, [rsp+arg_10]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_99DAA
mov rsi, [rsp+arg_10]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_99DAA
mov rbx, rax
loc_99DAA:
mov rdi, r14
call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count()
loc_99DB2:
mov rdi, rbx
call __Unwind_Resume
|
minja::Parser * minja::Parser::parseIdentifier(minja::Parser *this, long long *a2)
{
volatile signed __int32 *v2; // rax
char v4; // [rsp+7h] [rbp-51h] BYREF
void *v5[2]; // [rsp+8h] [rbp-50h] BYREF
long long v6; // [rsp+18h] [rbp-40h] BYREF
long long v7; // [rsp+28h] [rbp-30h] BYREF
volatile signed __int32 *v8[5]; // [rsp+30h] [rbp-28h] BYREF
if ( !(_BYTE)`guard variable for'minja::Parser::parseIdentifier(void)::ident_regex[abi:cxx11]
&& __cxa_guard_acquire(&`guard variable for'minja::Parser::parseIdentifier(void)::ident_regex[abi:cxx11]) )
{
std::basic_regex<char,std::regex_traits<char>>::basic_regex(
(long long)&minja::Parser::parseIdentifier(void)::ident_regex[abi:cxx11],
(long long)"(?!(?:not|is|and|or|del)\\b)[a-zA-Z_]\\w*",
0x10u);
__cxa_atexit(
(void (*)(void *))std::basic_regex<char,std::regex_traits<char>>::~basic_regex,
&minja::Parser::parseIdentifier(void)::ident_regex[abi:cxx11],
&_dso_handle);
__cxa_guard_release(&`guard variable for'minja::Parser::parseIdentifier(void)::ident_regex[abi:cxx11]);
}
v7 = *a2;
v2 = (volatile signed __int32 *)a2[1];
v8[0] = v2;
if ( v2 )
{
if ( _libc_single_threaded )
++*((_DWORD *)v2 + 2);
else
_InterlockedIncrement(v2 + 2);
}
v8[1] = (volatile signed __int32 *)(a2[4] - a2[2]);
minja::Parser::consumeToken(
v5,
(long long)a2,
(long long)&minja::Parser::parseIdentifier(void)::ident_regex[abi:cxx11],
1u);
if ( v5[1] )
{
*(_QWORD *)this = 0LL;
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::__shared_count<minja::VariableExpr,std::allocator<void>,minja::Location &,std::string &>(
(char *)this + 8,
this,
&v4,
&v7,
v5);
}
else
{
*(_OWORD *)this = 0LL;
}
if ( v5[0] != &v6 )
operator delete(v5[0], v6 + 1);
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(v8);
return this;
}
|
parseIdentifier:
PUSH R15
PUSH R14
PUSH RBX
SUB RSP,0x40
MOV R15,RSI
MOV RBX,RDI
LEA RAX,[0x20c500]
MOV AL,byte ptr [RAX]
TEST AL,AL
JZ 0x00199d1f
LAB_00199c68:
MOV RAX,qword ptr [R15]
MOV qword ptr [RSP + 0x28],RAX
MOV RAX,qword ptr [R15 + 0x8]
MOV qword ptr [RSP + 0x30],RAX
TEST RAX,RAX
JZ 0x00199c93
MOV RCX,qword ptr [0x0020af88]
CMP byte ptr [RCX],0x0
JZ 0x00199c8f
INC dword ptr [RAX + 0x8]
JMP 0x00199c93
LAB_00199c8f:
INC.LOCK dword ptr [RAX + 0x8]
LAB_00199c93:
LEA R14,[RSP + 0x30]
MOV RAX,qword ptr [R15 + 0x20]
SUB RAX,qword ptr [R15 + 0x10]
MOV qword ptr [R14 + 0x8],RAX
LAB_00199ca4:
LEA RDX,[0x20c4e0]
LEA RDI,[RSP + 0x8]
MOV RSI,R15
MOV ECX,0x1
CALL 0x00199536
CMP qword ptr [RSP + 0x10],0x0
JZ 0x00199ce9
MOV qword ptr [RBX],0x0
LEA RDI,[RBX + 0x8]
LAB_00199cd0:
LEA RDX,[RSP + 0x7]
LEA RCX,[RSP + 0x28]
LEA R8,[RSP + 0x8]
MOV RSI,RBX
CALL 0x001a8e4e
JMP 0x00199cef
LAB_00199ce9:
XORPS XMM0,XMM0
MOVUPS xmmword ptr [RBX],XMM0
LAB_00199cef:
LEA RAX,[RSP + 0x18]
MOV RDI,qword ptr [RAX + -0x10]
CMP RDI,RAX
JZ 0x00199d0a
MOV RSI,qword ptr [RSP + 0x18]
INC RSI
CALL 0x0011d160
LAB_00199d0a:
MOV RDI,R14
CALL 0x00156124
MOV RAX,RBX
ADD RSP,0x40
POP RBX
POP R14
POP R15
RET
LAB_00199d1f:
LEA RDI,[0x20c500]
CALL 0x0011d4a0
TEST EAX,EAX
JZ 0x00199c68
LAB_00199d33:
LEA RDI,[0x20c4e0]
LEA RSI,[0x1d5b11]
MOV EDX,0x10
CALL 0x001562d4
LAB_00199d4b:
LEA RDI,[0x15633a]
LEA RSI,[0x20c4e0]
LEA RDX,[0x20b888]
CALL 0x0011dc70
LEA RDI,[0x20c500]
CALL 0x0011d7d0
JMP 0x00199c68
|
/* minja::Parser::parseIdentifier() */
void minja::Parser::parseIdentifier(void)
{
int iVar1;
int8 *in_RSI;
int8 *in_RDI;
long *local_50;
long local_48;
long local_40 [2];
int8 local_30;
long local_28;
long local_20;
if (parseIdentifier()::ident_regex_abi_cxx11_ == '\0') {
iVar1 = __cxa_guard_acquire(&parseIdentifier()::ident_regex_abi_cxx11_);
if (iVar1 != 0) {
/* try { // try from 00199d33 to 00199d4a has its CatchHandler @ 00199d76 */
std::__cxx11::basic_regex<char,std::__cxx11::regex_traits<char>>::basic_regex
((basic_regex<char,std::__cxx11::regex_traits<char>> *)
parseIdentifier()::ident_regex_abi_cxx11_,
"(?!(?:not|is|and|or|del)\\b)[a-zA-Z_]\\w*",0x10);
__cxa_atexit(std::__cxx11::basic_regex<char,std::__cxx11::regex_traits<char>>::~basic_regex,
parseIdentifier()::ident_regex_abi_cxx11_,&__dso_handle);
__cxa_guard_release(&parseIdentifier()::ident_regex_abi_cxx11_);
}
}
local_30 = *in_RSI;
local_28 = in_RSI[1];
if (local_28 != 0) {
if (*PTR___libc_single_threaded_0020af88 == '\0') {
LOCK();
*(int *)(local_28 + 8) = *(int *)(local_28 + 8) + 1;
UNLOCK();
}
else {
*(int *)(local_28 + 8) = *(int *)(local_28 + 8) + 1;
}
}
local_20 = in_RSI[4] - in_RSI[2];
/* try { // try from 00199ca4 to 00199cbc has its CatchHandler @ 00199da7 */
consumeToken(&local_50);
if (local_48 == 0) {
*in_RDI = 0;
in_RDI[1] = 0;
}
else {
*in_RDI = 0;
/* try { // try from 00199cd0 to 00199ce6 has its CatchHandler @ 00199d87 */
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::
__shared_count<minja::VariableExpr,std::allocator<void>,minja::Location&,std::__cxx11::string&>
((__shared_count<(__gnu_cxx::_Lock_policy)2> *)(in_RDI + 1));
}
if (local_50 != local_40) {
operator_delete(local_50,local_40[0] + 1);
}
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count
((__shared_count<(__gnu_cxx::_Lock_policy)2> *)&local_28);
return;
}
|
|
57,247
|
pvio_socket_write
|
eloqsql/libmariadb/plugins/pvio/pvio_socket.c
|
ssize_t pvio_socket_write(MARIADB_PVIO *pvio, const uchar *buffer, size_t length)
{
ssize_t r;
struct st_pvio_socket *csock;
int timeout;
int send_flags= MSG_DONTWAIT;
#ifdef MSG_NOSIGNAL
send_flags|= MSG_NOSIGNAL;
#endif
if (!pvio || !pvio->data)
return -1;
csock= (struct st_pvio_socket *)pvio->data;
timeout = pvio->timeout[PVIO_WRITE_TIMEOUT];
while ((r = ma_send(csock->socket, (void *)buffer, length,send_flags)) == -1)
{
int err = socket_errno;
if ((err != SOCKET_EAGAIN
#ifdef HAVE_SOCKET_EWOULDBLOCK
&& err != SOCKET_EWOULDBLOCK
#endif
)|| timeout == 0)
return r;
if (pvio_socket_wait_io_or_timeout(pvio, FALSE, timeout) < 1)
return -1;
}
return r;
}
|
O3
|
c
|
pvio_socket_write:
movq $-0x1, %rax
testq %rdi, %rdi
je 0x31ab1
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %r12
movq (%rdi), %rbx
testq %rbx, %rbx
je 0x31aa3
movq %rdx, %r14
movq %rsi, %r15
movl 0x2c(%r12), %r13d
movl (%rbx), %edi
movq %r15, %rsi
movq %r14, %rdx
callq 0x3261b
cmpq $-0x1, %rax
jne 0x31aa3
callq 0x13060
cmpl $0xb, (%rax)
jne 0x31a9c
testl %r13d, %r13d
je 0x31a9c
movq %r12, %rdi
xorl %esi, %esi
movl %r13d, %edx
callq 0x31ad4
testl %eax, %eax
jg 0x31a69
movq $-0x1, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
|
pvio_socket_write:
mov rax, 0FFFFFFFFFFFFFFFFh
test rdi, rdi
jz short locret_31AB1
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
push rax
mov r12, rdi
mov rbx, [rdi]
test rbx, rbx
jz short loc_31AA3
mov r14, rdx
mov r15, rsi
mov r13d, [r12+2Ch]
loc_31A69:
mov edi, [rbx]
mov rsi, r15
mov rdx, r14
call ma_send
cmp rax, 0FFFFFFFFFFFFFFFFh
jnz short loc_31AA3
call ___errno_location
cmp dword ptr [rax], 0Bh
jnz short loc_31A9C
test r13d, r13d
jz short loc_31A9C
mov rdi, r12
xor esi, esi
mov edx, r13d
call pvio_socket_wait_io_or_timeout
test eax, eax
jg short loc_31A69
loc_31A9C:
mov rax, 0FFFFFFFFFFFFFFFFh
loc_31AA3:
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
locret_31AB1:
retn
|
long long pvio_socket_write(unsigned int **a1, long long a2, long long a3)
{
long long result; // rax
unsigned int *v5; // rbx
unsigned int v7; // r13d
long long v8; // rdi
result = -1LL;
if ( a1 )
{
v5 = *a1;
if ( *a1 )
{
v7 = *((_DWORD *)a1 + 11);
while ( 1 )
{
v8 = *v5;
result = ma_send(v8, a2, a3);
if ( result != -1 )
break;
if ( *(_DWORD *)__errno_location(v8) != 11 || !v7 || (int)pvio_socket_wait_io_or_timeout(a1, 0LL, v7) <= 0 )
return -1LL;
}
}
}
return result;
}
|
pvio_socket_write:
MOV RAX,-0x1
TEST RDI,RDI
JZ 0x00131ab1
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
PUSH RAX
MOV R12,RDI
MOV RBX,qword ptr [RDI]
TEST RBX,RBX
JZ 0x00131aa3
MOV R14,RDX
MOV R15,RSI
MOV R13D,dword ptr [R12 + 0x2c]
LAB_00131a69:
MOV EDI,dword ptr [RBX]
MOV RSI,R15
MOV RDX,R14
CALL 0x0013261b
CMP RAX,-0x1
JNZ 0x00131aa3
CALL 0x00113060
CMP dword ptr [RAX],0xb
JNZ 0x00131a9c
TEST R13D,R13D
JZ 0x00131a9c
MOV RDI,R12
XOR ESI,ESI
MOV EDX,R13D
CALL 0x00131ad4
TEST EAX,EAX
JG 0x00131a69
LAB_00131a9c:
MOV RAX,-0x1
LAB_00131aa3:
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
LAB_00131ab1:
RET
|
long pvio_socket_write(int8 *param_1,int8 param_2,int8 param_3)
{
int iVar1;
int4 *puVar2;
int iVar3;
long lVar4;
int *piVar5;
if ((param_1 != (int8 *)0x0) &&
(puVar2 = (int4 *)*param_1, puVar2 != (int4 *)0x0)) {
iVar1 = *(int *)((long)param_1 + 0x2c);
do {
lVar4 = ma_send(*puVar2,param_2,param_3);
if (lVar4 != -1) {
return lVar4;
}
piVar5 = __errno_location();
} while (((*piVar5 == 0xb) && (iVar1 != 0)) &&
(iVar3 = pvio_socket_wait_io_or_timeout(param_1,0,iVar1), 0 < iVar3));
}
return -1;
}
|
|
57,248
|
plutovg_canvas_create
|
dmazzella[P]pylunasvg/lunasvg/plutovg/source/plutovg-canvas.c
|
plutovg_canvas_t* plutovg_canvas_create(plutovg_surface_t* surface)
{
plutovg_canvas_t* canvas = malloc(sizeof(plutovg_canvas_t));
canvas->ref_count = 1;
canvas->surface = plutovg_surface_reference(surface);
canvas->path = plutovg_path_create();
canvas->state = plutovg_state_create();
canvas->freed_state = NULL;
canvas->clip_rect = PLUTOVG_MAKE_RECT(0, 0, surface->width, surface->height);
plutovg_span_buffer_init(&canvas->clip_spans);
plutovg_span_buffer_init(&canvas->fill_spans);
return canvas;
}
|
O1
|
c
|
plutovg_canvas_create:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %r14
movl $0x78, %edi
callq 0x31b0
movq %rax, %rbx
movl $0x1, (%rax)
movq %r14, %rdi
callq 0xdc1b
movq %rax, 0x8(%rbx)
callq 0xa2f0
movq %rax, 0x10(%rbx)
callq 0x35ef
movq %rax, 0x18(%rbx)
xorl %eax, %eax
movq %rax, 0x20(%rbx)
cvtsi2ssl 0x4(%r14), %xmm0
cvtsi2ssl 0x8(%r14), %xmm1
movq %rax, 0x28(%rbx)
movss %xmm0, 0x30(%rbx)
movss %xmm1, 0x34(%rbx)
leaq 0x38(%rbx), %rdi
callq 0xcd30
leaq 0x58(%rbx), %rdi
callq 0xcd30
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
|
plutovg_canvas_create:
push r14
push rbx
push rax
mov r14, rdi
mov edi, 78h ; 'x'
call _malloc
mov rbx, rax
mov dword ptr [rax], 1
mov rdi, r14
call plutovg_surface_reference
mov [rbx+8], rax
call plutovg_path_create
mov [rbx+10h], rax
call plutovg_state_create
mov [rbx+18h], rax
xor eax, eax
mov [rbx+20h], rax
cvtsi2ss xmm0, dword ptr [r14+4]
cvtsi2ss xmm1, dword ptr [r14+8]
mov [rbx+28h], rax
movss dword ptr [rbx+30h], xmm0
movss dword ptr [rbx+34h], xmm1
lea rdi, [rbx+38h]
call plutovg_span_buffer_init
lea rdi, [rbx+58h]
call plutovg_span_buffer_init
mov rax, rbx
add rsp, 8
pop rbx
pop r14
retn
|
long long plutovg_canvas_create(long long a1)
{
long long v1; // rbx
float v2; // xmm0_4
float v3; // xmm1_4
v1 = malloc(120LL);
*(_DWORD *)v1 = 1;
*(_QWORD *)(v1 + 8) = plutovg_surface_reference(a1);
*(_QWORD *)(v1 + 16) = plutovg_path_create();
*(_QWORD *)(v1 + 24) = plutovg_state_create();
*(_QWORD *)(v1 + 32) = 0LL;
v2 = (float)*(int *)(a1 + 4);
v3 = (float)*(int *)(a1 + 8);
*(_QWORD *)(v1 + 40) = 0LL;
*(float *)(v1 + 48) = v2;
*(float *)(v1 + 52) = v3;
plutovg_span_buffer_init(v1 + 56);
plutovg_span_buffer_init(v1 + 88);
return v1;
}
|
plutovg_canvas_create:
PUSH R14
PUSH RBX
PUSH RAX
MOV R14,RDI
MOV EDI,0x78
CALL 0x001031b0
MOV RBX,RAX
MOV dword ptr [RAX],0x1
MOV RDI,R14
CALL 0x0010dc1b
MOV qword ptr [RBX + 0x8],RAX
CALL 0x0010a2f0
MOV qword ptr [RBX + 0x10],RAX
CALL 0x001035ef
MOV qword ptr [RBX + 0x18],RAX
XOR EAX,EAX
MOV qword ptr [RBX + 0x20],RAX
CVTSI2SS XMM0,dword ptr [R14 + 0x4]
CVTSI2SS XMM1,dword ptr [R14 + 0x8]
MOV qword ptr [RBX + 0x28],RAX
MOVSS dword ptr [RBX + 0x30],XMM0
MOVSS dword ptr [RBX + 0x34],XMM1
LEA RDI,[RBX + 0x38]
CALL 0x0010cd30
LEA RDI,[RBX + 0x58]
CALL 0x0010cd30
MOV RAX,RBX
ADD RSP,0x8
POP RBX
POP R14
RET
|
int4 * plutovg_canvas_create(long param_1)
{
int iVar1;
int iVar2;
int4 *puVar3;
int8 uVar4;
puVar3 = (int4 *)malloc(0x78);
*puVar3 = 1;
uVar4 = plutovg_surface_reference(param_1);
*(int8 *)(puVar3 + 2) = uVar4;
uVar4 = plutovg_path_create();
*(int8 *)(puVar3 + 4) = uVar4;
uVar4 = plutovg_state_create();
*(int8 *)(puVar3 + 6) = uVar4;
*(int8 *)(puVar3 + 8) = 0;
iVar1 = *(int *)(param_1 + 4);
iVar2 = *(int *)(param_1 + 8);
*(int8 *)(puVar3 + 10) = 0;
puVar3[0xc] = (float)iVar1;
puVar3[0xd] = (float)iVar2;
plutovg_span_buffer_init(puVar3 + 0xe);
plutovg_span_buffer_init(puVar3 + 0x16);
return puVar3;
}
|
|
57,249
|
mi_keydef_read
|
eloqsql/storage/myisam/mi_open.c
|
uchar *mi_keydef_read(uchar *ptr, MI_KEYDEF *keydef)
{
keydef->keysegs = (uint) *ptr++;
keydef->key_alg = *ptr++; /* Rtree or Btree */
keydef->flag = mi_uint2korr(ptr); ptr +=2;
keydef->block_length = mi_uint2korr(ptr); ptr +=2;
keydef->keylength = mi_uint2korr(ptr); ptr +=2;
keydef->minlength = mi_uint2korr(ptr); ptr +=2;
keydef->maxlength = mi_uint2korr(ptr); ptr +=2;
keydef->block_size_index= keydef->block_length/MI_MIN_KEY_BLOCK_LENGTH-1;
keydef->underflow_block_length=keydef->block_length/3;
keydef->version = 0; /* Not saved */
keydef->parser = &ft_default_parser;
keydef->ftkey_nr = 0;
return ptr;
}
|
O0
|
c
|
mi_keydef_read:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x8(%rbp)
movzbl (%rax), %eax
movw %ax, %cx
movq -0x10(%rbp), %rax
movw %cx, 0x8(%rax)
movq -0x8(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x8(%rbp)
movb (%rax), %cl
movq -0x10(%rbp), %rax
movb %cl, 0xc(%rax)
movq -0x8(%rbp), %rax
movzbl 0x1(%rax), %eax
movzwl %ax, %eax
movq -0x8(%rbp), %rcx
movzbl (%rcx), %ecx
movzwl %cx, %ecx
shll $0x8, %ecx
orl %ecx, %eax
movw %ax, %cx
movq -0x10(%rbp), %rax
movw %cx, 0xa(%rax)
movq -0x8(%rbp), %rax
addq $0x2, %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
movzbl 0x1(%rax), %eax
movzwl %ax, %eax
movq -0x8(%rbp), %rcx
movzbl (%rcx), %ecx
movzwl %cx, %ecx
shll $0x8, %ecx
orl %ecx, %eax
movw %ax, %cx
movq -0x10(%rbp), %rax
movw %cx, 0xe(%rax)
movq -0x8(%rbp), %rax
addq $0x2, %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
movzbl 0x1(%rax), %eax
movzwl %ax, %eax
movq -0x8(%rbp), %rcx
movzbl (%rcx), %ecx
movzwl %cx, %ecx
shll $0x8, %ecx
orl %ecx, %eax
movw %ax, %cx
movq -0x10(%rbp), %rax
movw %cx, 0x12(%rax)
movq -0x8(%rbp), %rax
addq $0x2, %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
movzbl 0x1(%rax), %eax
movzwl %ax, %eax
movq -0x8(%rbp), %rcx
movzbl (%rcx), %ecx
movzwl %cx, %ecx
shll $0x8, %ecx
orl %ecx, %eax
movw %ax, %cx
movq -0x10(%rbp), %rax
movw %cx, 0x14(%rax)
movq -0x8(%rbp), %rax
addq $0x2, %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
movzbl 0x1(%rax), %eax
movzwl %ax, %eax
movq -0x8(%rbp), %rcx
movzbl (%rcx), %ecx
movzwl %cx, %ecx
shll $0x8, %ecx
orl %ecx, %eax
movw %ax, %cx
movq -0x10(%rbp), %rax
movw %cx, 0x16(%rax)
movq -0x8(%rbp), %rax
addq $0x2, %rax
movq %rax, -0x8(%rbp)
movq -0x10(%rbp), %rax
movzwl 0xe(%rax), %eax
movl $0x400, %ecx # imm = 0x400
cltd
idivl %ecx
subl $0x1, %eax
movw %ax, %cx
movq -0x10(%rbp), %rax
movw %cx, 0x18(%rax)
movq -0x10(%rbp), %rax
movzwl 0xe(%rax), %eax
movl $0x3, %ecx
cltd
idivl %ecx
movw %ax, %cx
movq -0x10(%rbp), %rax
movw %cx, 0x10(%rax)
movq -0x10(%rbp), %rax
movl $0x0, 0x1c(%rax)
movq -0x10(%rbp), %rax
leaq 0x2034db(%rip), %rcx # 0x245b60
movq %rcx, 0x38(%rax)
movq -0x10(%rbp), %rax
movl $0x0, 0x20(%rax)
movq -0x8(%rbp), %rax
popq %rbp
retq
nopw (%rax,%rax)
|
mi_keydef_read:
push rbp
mov rbp, rsp
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov rax, [rbp+var_8]
mov rcx, rax
add rcx, 1
mov [rbp+var_8], rcx
movzx eax, byte ptr [rax]
mov cx, ax
mov rax, [rbp+var_10]
mov [rax+8], cx
mov rax, [rbp+var_8]
mov rcx, rax
add rcx, 1
mov [rbp+var_8], rcx
mov cl, [rax]
mov rax, [rbp+var_10]
mov [rax+0Ch], cl
mov rax, [rbp+var_8]
movzx eax, byte ptr [rax+1]
movzx eax, ax
mov rcx, [rbp+var_8]
movzx ecx, byte ptr [rcx]
movzx ecx, cx
shl ecx, 8
or eax, ecx
mov cx, ax
mov rax, [rbp+var_10]
mov [rax+0Ah], cx
mov rax, [rbp+var_8]
add rax, 2
mov [rbp+var_8], rax
mov rax, [rbp+var_8]
movzx eax, byte ptr [rax+1]
movzx eax, ax
mov rcx, [rbp+var_8]
movzx ecx, byte ptr [rcx]
movzx ecx, cx
shl ecx, 8
or eax, ecx
mov cx, ax
mov rax, [rbp+var_10]
mov [rax+0Eh], cx
mov rax, [rbp+var_8]
add rax, 2
mov [rbp+var_8], rax
mov rax, [rbp+var_8]
movzx eax, byte ptr [rax+1]
movzx eax, ax
mov rcx, [rbp+var_8]
movzx ecx, byte ptr [rcx]
movzx ecx, cx
shl ecx, 8
or eax, ecx
mov cx, ax
mov rax, [rbp+var_10]
mov [rax+12h], cx
mov rax, [rbp+var_8]
add rax, 2
mov [rbp+var_8], rax
mov rax, [rbp+var_8]
movzx eax, byte ptr [rax+1]
movzx eax, ax
mov rcx, [rbp+var_8]
movzx ecx, byte ptr [rcx]
movzx ecx, cx
shl ecx, 8
or eax, ecx
mov cx, ax
mov rax, [rbp+var_10]
mov [rax+14h], cx
mov rax, [rbp+var_8]
add rax, 2
mov [rbp+var_8], rax
mov rax, [rbp+var_8]
movzx eax, byte ptr [rax+1]
movzx eax, ax
mov rcx, [rbp+var_8]
movzx ecx, byte ptr [rcx]
movzx ecx, cx
shl ecx, 8
or eax, ecx
mov cx, ax
mov rax, [rbp+var_10]
mov [rax+16h], cx
mov rax, [rbp+var_8]
add rax, 2
mov [rbp+var_8], rax
mov rax, [rbp+var_10]
movzx eax, word ptr [rax+0Eh]
mov ecx, 400h
cdq
idiv ecx
sub eax, 1
mov cx, ax
mov rax, [rbp+var_10]
mov [rax+18h], cx
mov rax, [rbp+var_10]
movzx eax, word ptr [rax+0Eh]
mov ecx, 3
cdq
idiv ecx
mov cx, ax
mov rax, [rbp+var_10]
mov [rax+10h], cx
mov rax, [rbp+var_10]
mov dword ptr [rax+1Ch], 0
mov rax, [rbp+var_10]
lea rcx, ft_default_parser
mov [rax+38h], rcx
mov rax, [rbp+var_10]
mov dword ptr [rax+20h], 0
mov rax, [rbp+var_8]
pop rbp
retn
|
unsigned __int8 * mi_keydef_read(unsigned __int8 *a1, long long a2)
{
*(_WORD *)(a2 + 8) = *a1;
*(_BYTE *)(a2 + 12) = a1[1];
*(_WORD *)(a2 + 10) = _byteswap_ushort(*((_WORD *)a1 + 1));
*(_WORD *)(a2 + 14) = _byteswap_ushort(*((_WORD *)a1 + 2));
*(_WORD *)(a2 + 18) = _byteswap_ushort(*((_WORD *)a1 + 3));
*(_WORD *)(a2 + 20) = _byteswap_ushort(*((_WORD *)a1 + 4));
*(_WORD *)(a2 + 22) = _byteswap_ushort(*((_WORD *)a1 + 5));
*(_WORD *)(a2 + 24) = *(unsigned __int16 *)(a2 + 14) / 1024 - 1;
*(_WORD *)(a2 + 16) = *(unsigned __int16 *)(a2 + 14) / 3;
*(_DWORD *)(a2 + 28) = 0;
*(_QWORD *)(a2 + 56) = &ft_default_parser;
*(_DWORD *)(a2 + 32) = 0;
return a1 + 12;
}
|
mi_keydef_read:
PUSH RBP
MOV RBP,RSP
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV RAX,qword ptr [RBP + -0x8]
MOV RCX,RAX
ADD RCX,0x1
MOV qword ptr [RBP + -0x8],RCX
MOVZX EAX,byte ptr [RAX]
MOV CX,AX
MOV RAX,qword ptr [RBP + -0x10]
MOV word ptr [RAX + 0x8],CX
MOV RAX,qword ptr [RBP + -0x8]
MOV RCX,RAX
ADD RCX,0x1
MOV qword ptr [RBP + -0x8],RCX
MOV CL,byte ptr [RAX]
MOV RAX,qword ptr [RBP + -0x10]
MOV byte ptr [RAX + 0xc],CL
MOV RAX,qword ptr [RBP + -0x8]
MOVZX EAX,byte ptr [RAX + 0x1]
MOVZX EAX,AX
MOV RCX,qword ptr [RBP + -0x8]
MOVZX ECX,byte ptr [RCX]
MOVZX ECX,CX
SHL ECX,0x8
OR EAX,ECX
MOV CX,AX
MOV RAX,qword ptr [RBP + -0x10]
MOV word ptr [RAX + 0xa],CX
MOV RAX,qword ptr [RBP + -0x8]
ADD RAX,0x2
MOV qword ptr [RBP + -0x8],RAX
MOV RAX,qword ptr [RBP + -0x8]
MOVZX EAX,byte ptr [RAX + 0x1]
MOVZX EAX,AX
MOV RCX,qword ptr [RBP + -0x8]
MOVZX ECX,byte ptr [RCX]
MOVZX ECX,CX
SHL ECX,0x8
OR EAX,ECX
MOV CX,AX
MOV RAX,qword ptr [RBP + -0x10]
MOV word ptr [RAX + 0xe],CX
MOV RAX,qword ptr [RBP + -0x8]
ADD RAX,0x2
MOV qword ptr [RBP + -0x8],RAX
MOV RAX,qword ptr [RBP + -0x8]
MOVZX EAX,byte ptr [RAX + 0x1]
MOVZX EAX,AX
MOV RCX,qword ptr [RBP + -0x8]
MOVZX ECX,byte ptr [RCX]
MOVZX ECX,CX
SHL ECX,0x8
OR EAX,ECX
MOV CX,AX
MOV RAX,qword ptr [RBP + -0x10]
MOV word ptr [RAX + 0x12],CX
MOV RAX,qword ptr [RBP + -0x8]
ADD RAX,0x2
MOV qword ptr [RBP + -0x8],RAX
MOV RAX,qword ptr [RBP + -0x8]
MOVZX EAX,byte ptr [RAX + 0x1]
MOVZX EAX,AX
MOV RCX,qword ptr [RBP + -0x8]
MOVZX ECX,byte ptr [RCX]
MOVZX ECX,CX
SHL ECX,0x8
OR EAX,ECX
MOV CX,AX
MOV RAX,qword ptr [RBP + -0x10]
MOV word ptr [RAX + 0x14],CX
MOV RAX,qword ptr [RBP + -0x8]
ADD RAX,0x2
MOV qword ptr [RBP + -0x8],RAX
MOV RAX,qword ptr [RBP + -0x8]
MOVZX EAX,byte ptr [RAX + 0x1]
MOVZX EAX,AX
MOV RCX,qword ptr [RBP + -0x8]
MOVZX ECX,byte ptr [RCX]
MOVZX ECX,CX
SHL ECX,0x8
OR EAX,ECX
MOV CX,AX
MOV RAX,qword ptr [RBP + -0x10]
MOV word ptr [RAX + 0x16],CX
MOV RAX,qword ptr [RBP + -0x8]
ADD RAX,0x2
MOV qword ptr [RBP + -0x8],RAX
MOV RAX,qword ptr [RBP + -0x10]
MOVZX EAX,word ptr [RAX + 0xe]
MOV ECX,0x400
CDQ
IDIV ECX
SUB EAX,0x1
MOV CX,AX
MOV RAX,qword ptr [RBP + -0x10]
MOV word ptr [RAX + 0x18],CX
MOV RAX,qword ptr [RBP + -0x10]
MOVZX EAX,word ptr [RAX + 0xe]
MOV ECX,0x3
CDQ
IDIV ECX
MOV CX,AX
MOV RAX,qword ptr [RBP + -0x10]
MOV word ptr [RAX + 0x10],CX
MOV RAX,qword ptr [RBP + -0x10]
MOV dword ptr [RAX + 0x1c],0x0
MOV RAX,qword ptr [RBP + -0x10]
LEA RCX,[0x345b60]
MOV qword ptr [RAX + 0x38],RCX
MOV RAX,qword ptr [RBP + -0x10]
MOV dword ptr [RAX + 0x20],0x0
MOV RAX,qword ptr [RBP + -0x8]
POP RBP
RET
|
int1 [16] mi_keydef_read(byte *param_1,long param_2)
{
int1 auVar1 [16];
*(ushort *)(param_2 + 8) = (ushort)*param_1;
*(byte *)(param_2 + 0xc) = param_1[1];
*(ushort *)(param_2 + 10) = CONCAT11(param_1[2],param_1[3]);
*(ushort *)(param_2 + 0xe) = CONCAT11(param_1[4],param_1[5]);
*(ushort *)(param_2 + 0x12) = CONCAT11(param_1[6],param_1[7]);
*(ushort *)(param_2 + 0x14) = CONCAT11(param_1[8],param_1[9]);
*(ushort *)(param_2 + 0x16) = CONCAT11(param_1[10],param_1[0xb]);
auVar1._0_8_ = param_1 + 0xc;
*(ushort *)(param_2 + 0x18) = *(ushort *)(param_2 + 0xe) / 0x400 - 1;
*(ushort *)(param_2 + 0x10) = *(ushort *)(param_2 + 0xe) / 3;
*(int4 *)(param_2 + 0x1c) = 0;
*(int1 **)(param_2 + 0x38) = ft_default_parser;
*(int4 *)(param_2 + 0x20) = 0;
auVar1._8_8_ = (ulong)*(ushort *)(param_2 + 0xe) % 3;
return auVar1;
}
|
|
57,250
|
google::protobuf::compiler::csharp::WrapperFieldGenerator::GenerateMembers(google::protobuf::io::Printer*)
|
aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/compiler/csharp/csharp_wrapper_field.cc
|
void WrapperFieldGenerator::GenerateMembers(io::Printer* printer) {
printer->Print(
variables_,
"private static readonly pb::FieldCodec<$type_name$> _single_$name$_codec = ");
GenerateCodecCode(printer);
printer->Print(
variables_,
";\n"
"private $type_name$ $name$_;\n");
WritePropertyDocComment(printer, descriptor_);
AddPublicMemberAttributes(printer);
printer->Print(
variables_,
"$access_level$ $type_name$ $property_name$ {\n"
" get { return $name$_; }\n"
" set {\n"
" $name$_ = value;\n"
" }\n"
"}\n\n");
if (SupportsPresenceApi(descriptor_)) {
printer->Print(
variables_,
"/// <summary>Gets whether the $descriptor_name$ field is set</summary>\n");
AddPublicMemberAttributes(printer);
printer->Print(
variables_,
"$access_level$ bool Has$property_name$ {\n"
" get { return $name$_ != null; }\n"
"}\n\n");
printer->Print(
variables_,
"/// <summary>Clears the value of the $descriptor_name$ field</summary>\n");
AddPublicMemberAttributes(printer);
printer->Print(
variables_,
"$access_level$ void Clear$property_name$() {\n"
" $name$_ = null;\n"
"}\n");
}
}
|
O3
|
cpp
|
google::protobuf::compiler::csharp::WrapperFieldGenerator::GenerateMembers(google::protobuf::io::Printer*):
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rsi, %rbx
movq %rdi, %r15
leaq 0x20(%rdi), %r14
leaq 0x15ed55(%rip), %rdx # 0x1a0bd5
movq %rsi, %rdi
movq %r14, %rsi
callq 0x16cd32
movq (%r15), %rax
movq %r15, %rdi
movq %rbx, %rsi
callq *0x20(%rax)
leaq 0x15ed83(%rip), %rdx # 0x1a0c21
movq %rbx, %rdi
movq %r14, %rsi
callq 0x16cd32
movq 0x10(%r15), %rsi
movq %rbx, %rdi
callq 0x9d827
movq %r15, %rdi
movq %rbx, %rsi
callq 0xa130c
leaq 0x15ed7a(%rip), %rdx # 0x1a0c41
movq %rbx, %rdi
movq %r14, %rsi
callq 0x16cd32
movq 0x10(%r15), %r12
movb 0x1(%r12), %al
notb %al
testb $0x60, %al
je 0x41f84
movq 0x18(%r12), %rdi
testq %rdi, %rdi
je 0x41f0b
leaq 0xf7d3e(%rip), %rax # 0x139c34
leaq 0x10(%rsp), %rsi
movq %rax, (%rsi)
leaq 0x8(%rsp), %rdx
movq %r12, (%rdx)
callq 0x2f19d
cmpb $0xb, 0x2(%r12)
je 0x41f84
movq 0x10(%r12), %rax
cmpb $0x2, 0x3(%rax)
je 0x41f26
testb $0x2, 0x1(%r12)
je 0x41f84
leaq 0x15c8fe(%rip), %rdx # 0x19e82b
movq %rbx, %rdi
movq %r14, %rsi
callq 0x16cd32
movq %r15, %rdi
movq %rbx, %rsi
callq 0xa130c
leaq 0x15ed63(%rip), %rdx # 0x1a0cad
movq %rbx, %rdi
movq %r14, %rsi
callq 0x16cd32
leaq 0x15c965(%rip), %rdx # 0x19e8c1
movq %rbx, %rdi
movq %r14, %rsi
callq 0x16cd32
movq %r15, %rdi
movq %rbx, %rsi
callq 0xa130c
leaq 0x15c990(%rip), %rdx # 0x19e909
movq %rbx, %rdi
movq %r14, %rsi
callq 0x16cd32
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
|
_ZN6google8protobuf8compiler6csharp21WrapperFieldGenerator15GenerateMembersEPNS0_2io7PrinterE:
push r15; int
push r14; int
push r12; int
push rbx; int
sub rsp, 18h
mov rbx, rsi
mov r15, rdi
lea r14, [rdi+20h]
lea rdx, aPrivateStaticR_3; "private static readonly pb::FieldCodec<"...
mov rdi, rsi; this
mov rsi, r14
call _ZN6google8protobuf2io7Printer5PrintERKSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES9_St4lessIS9_ESaISt4pairIKS9_S9_EEEPKc; google::protobuf::io::Printer::Print(std::map<std::string,std::string> const&,char const*)
mov rax, [r15]
mov rdi, r15
mov rsi, rbx
call qword ptr [rax+20h]
lea rdx, aPrivateTypeNam; ";\nprivate $type_name$ $name$_;\n"
mov rdi, rbx; this
mov rsi, r14
call _ZN6google8protobuf2io7Printer5PrintERKSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES9_St4lessIS9_ESaISt4pairIKS9_S9_EEEPKc; google::protobuf::io::Printer::Print(std::map<std::string,std::string> const&,char const*)
mov rsi, [r15+10h]; google::protobuf::io::Printer *
mov rdi, rbx; this
call _ZN6google8protobuf8compiler6csharp23WritePropertyDocCommentEPNS0_2io7PrinterEPKNS0_15FieldDescriptorE; google::protobuf::compiler::csharp::WritePropertyDocComment(google::protobuf::io::Printer *,google::protobuf::FieldDescriptor const*)
mov rdi, r15; this
mov rsi, rbx; google::protobuf::io::Printer *
call _ZN6google8protobuf8compiler6csharp18FieldGeneratorBase25AddPublicMemberAttributesEPNS0_2io7PrinterE; google::protobuf::compiler::csharp::FieldGeneratorBase::AddPublicMemberAttributes(google::protobuf::io::Printer *)
lea rdx, aAccessLevelTyp_3; "$access_level$ $type_name$ $property_na"...
mov rdi, rbx; this
mov rsi, r14
call _ZN6google8protobuf2io7Printer5PrintERKSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES9_St4lessIS9_ESaISt4pairIKS9_S9_EEEPKc; google::protobuf::io::Printer::Print(std::map<std::string,std::string> const&,char const*)
mov r12, [r15+10h]
mov al, [r12+1]
not al
test al, 60h
jz loc_41F84
mov rdi, [r12+18h]
test rdi, rdi
jz short loc_41F0B
lea rax, _ZN6google8protobuf15FieldDescriptor12TypeOnceInitEPKS1_; google::protobuf::FieldDescriptor::TypeOnceInit(google::protobuf::FieldDescriptor const*)
lea rsi, [rsp+38h+var_28]
mov [rsi], rax
lea rdx, [rsp+38h+var_30]
mov [rdx], r12
call _ZSt9call_onceIPFvPKN6google8protobuf15FieldDescriptorEEJS4_EEvRSt9once_flagOT_DpOT0_; std::call_once<void (*)(google::protobuf::FieldDescriptor const*),google::protobuf::FieldDescriptor const*>(std::once_flag &,void (*)(google::protobuf::FieldDescriptor const*) &&,google::protobuf::FieldDescriptor const* &&)
loc_41F0B:
cmp byte ptr [r12+2], 0Bh
jz short loc_41F84
mov rax, [r12+10h]
cmp byte ptr [rax+3], 2
jz short loc_41F26
test byte ptr [r12+1], 2
jz short loc_41F84
loc_41F26:
lea rdx, aSummaryGetsWhe; "/// <summary>Gets whether the $descript"...
mov rdi, rbx; this
mov rsi, r14
call _ZN6google8protobuf2io7Printer5PrintERKSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES9_St4lessIS9_ESaISt4pairIKS9_S9_EEEPKc; google::protobuf::io::Printer::Print(std::map<std::string,std::string> const&,char const*)
mov rdi, r15; this
mov rsi, rbx; google::protobuf::io::Printer *
call _ZN6google8protobuf8compiler6csharp18FieldGeneratorBase25AddPublicMemberAttributesEPNS0_2io7PrinterE; google::protobuf::compiler::csharp::FieldGeneratorBase::AddPublicMemberAttributes(google::protobuf::io::Printer *)
lea rdx, aAccessLevelBoo_2; "$access_level$ bool Has$property_name$ "...
mov rdi, rbx; this
mov rsi, r14
call _ZN6google8protobuf2io7Printer5PrintERKSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES9_St4lessIS9_ESaISt4pairIKS9_S9_EEEPKc; google::protobuf::io::Printer::Print(std::map<std::string,std::string> const&,char const*)
lea rdx, aSummaryClearsT; "/// <summary>Clears the value of the $d"...
mov rdi, rbx; this
mov rsi, r14
call _ZN6google8protobuf2io7Printer5PrintERKSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES9_St4lessIS9_ESaISt4pairIKS9_S9_EEEPKc; google::protobuf::io::Printer::Print(std::map<std::string,std::string> const&,char const*)
mov rdi, r15; this
mov rsi, rbx; google::protobuf::io::Printer *
call _ZN6google8protobuf8compiler6csharp18FieldGeneratorBase25AddPublicMemberAttributesEPNS0_2io7PrinterE; google::protobuf::compiler::csharp::FieldGeneratorBase::AddPublicMemberAttributes(google::protobuf::io::Printer *)
lea rdx, aAccessLevelVoi; "$access_level$ void Clear$property_name"...
mov rdi, rbx; this
mov rsi, r14
call _ZN6google8protobuf2io7Printer5PrintERKSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES9_St4lessIS9_ESaISt4pairIKS9_S9_EEEPKc; google::protobuf::io::Printer::Print(std::map<std::string,std::string> const&,char const*)
loc_41F84:
add rsp, 18h
pop rbx
pop r12
pop r14
pop r15
retn
|
GenerateMembers:
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
SUB RSP,0x18
MOV RBX,RSI
MOV R15,RDI
LEA R14,[RDI + 0x20]
LEA RDX,[0x2a0bd5]
MOV RDI,RSI
MOV RSI,R14
CALL 0x0026cd32
MOV RAX,qword ptr [R15]
MOV RDI,R15
MOV RSI,RBX
CALL qword ptr [RAX + 0x20]
LEA RDX,[0x2a0c21]
MOV RDI,RBX
MOV RSI,R14
CALL 0x0026cd32
MOV RSI,qword ptr [R15 + 0x10]
MOV RDI,RBX
CALL 0x0019d827
MOV RDI,R15
MOV RSI,RBX
CALL 0x001a130c
LEA RDX,[0x2a0c41]
MOV RDI,RBX
MOV RSI,R14
CALL 0x0026cd32
MOV R12,qword ptr [R15 + 0x10]
MOV AL,byte ptr [R12 + 0x1]
NOT AL
TEST AL,0x60
JZ 0x00141f84
MOV RDI,qword ptr [R12 + 0x18]
TEST RDI,RDI
JZ 0x00141f0b
LEA RAX,[0x239c34]
LEA RSI,[RSP + 0x10]
MOV qword ptr [RSI],RAX
LEA RDX,[RSP + 0x8]
MOV qword ptr [RDX],R12
CALL 0x0012f19d
LAB_00141f0b:
CMP byte ptr [R12 + 0x2],0xb
JZ 0x00141f84
MOV RAX,qword ptr [R12 + 0x10]
CMP byte ptr [RAX + 0x3],0x2
JZ 0x00141f26
TEST byte ptr [R12 + 0x1],0x2
JZ 0x00141f84
LAB_00141f26:
LEA RDX,[0x29e82b]
MOV RDI,RBX
MOV RSI,R14
CALL 0x0026cd32
MOV RDI,R15
MOV RSI,RBX
CALL 0x001a130c
LEA RDX,[0x2a0cad]
MOV RDI,RBX
MOV RSI,R14
CALL 0x0026cd32
LEA RDX,[0x29e8c1]
MOV RDI,RBX
MOV RSI,R14
CALL 0x0026cd32
MOV RDI,R15
MOV RSI,RBX
CALL 0x001a130c
LEA RDX,[0x29e909]
MOV RDI,RBX
MOV RSI,R14
CALL 0x0026cd32
LAB_00141f84:
ADD RSP,0x18
POP RBX
POP R12
POP R14
POP R15
RET
|
/* google::protobuf::compiler::csharp::WrapperFieldGenerator::GenerateMembers(google::protobuf::io::Printer*)
*/
void __thiscall
google::protobuf::compiler::csharp::WrapperFieldGenerator::GenerateMembers
(WrapperFieldGenerator *this,Printer *param_1)
{
map *pmVar1;
FieldDescriptor *pFVar2;
FieldDescriptor *local_30;
code *local_28;
pmVar1 = (map *)(this + 0x20);
io::Printer::Print(param_1,pmVar1,
"private static readonly pb::FieldCodec<$type_name$> _single_$name$_codec = ");
(**(code **)(*(long *)this + 0x20))(this,param_1);
io::Printer::Print(param_1,pmVar1,";\nprivate $type_name$ $name$_;\n");
WritePropertyDocComment(param_1,*(FieldDescriptor **)(this + 0x10));
FieldGeneratorBase::AddPublicMemberAttributes((FieldGeneratorBase *)this,param_1);
io::Printer::Print(param_1,pmVar1,
"$access_level$ $type_name$ $property_name$ {\n get { return $name$_; }\n set {\n $name$_ = value;\n }\n}\n\n"
);
pFVar2 = *(FieldDescriptor **)(this + 0x10);
if ((~(byte)pFVar2[1] & 0x60) != 0) {
if (*(once_flag **)(pFVar2 + 0x18) != (once_flag *)0x0) {
local_28 = FieldDescriptor::TypeOnceInit;
local_30 = pFVar2;
std::
call_once<void(*)(google::protobuf::FieldDescriptor_const*),google::protobuf::FieldDescriptor_const*>
(*(once_flag **)(pFVar2 + 0x18),(_func_void_FieldDescriptor_ptr *)&local_28,
&local_30);
}
if ((pFVar2[2] != (FieldDescriptor)0xb) &&
((*(char *)(*(long *)(pFVar2 + 0x10) + 3) == '\x02' || (((byte)pFVar2[1] & 2) != 0)))) {
io::Printer::Print(param_1,pmVar1,
"/// <summary>Gets whether the $descriptor_name$ field is set</summary>\n")
;
FieldGeneratorBase::AddPublicMemberAttributes((FieldGeneratorBase *)this,param_1);
io::Printer::Print(param_1,pmVar1,
"$access_level$ bool Has$property_name$ {\n get { return $name$_ != null; }\n}\n\n"
);
io::Printer::Print(param_1,pmVar1,
"/// <summary>Clears the value of the $descriptor_name$ field</summary>\n")
;
FieldGeneratorBase::AddPublicMemberAttributes((FieldGeneratorBase *)this,param_1);
io::Printer::Print(param_1,pmVar1,
"$access_level$ void Clear$property_name$() {\n $name$_ = null;\n}\n");
}
}
return;
}
|
||
57,251
|
check_mb_ujis
|
eloqsql/libmariadb/libmariadb/ma_charset.c
|
static unsigned int check_mb_ujis(const char *start, const char *end)
{
if (*(uchar*)start < 0x80) {
return 0; /* invalid ujis character */
}
if (valid_ujis(*(start)) && valid_ujis(*((start)+1))) {
return 2;
}
if (valid_ujis_ss2(*(start)) && valid_ujis_kata(*((start)+1))) {
return 2;
}
if (valid_ujis_ss3(*(start)) && (end-start) > 2 && valid_ujis(*((start)+1)) && valid_ujis(*((start)+2))) {
return 3;
}
return 0;
}
|
O3
|
c
|
check_mb_ujis:
pushq %rbp
movq %rsp, %rbp
movb (%rdi), %cl
xorl %eax, %eax
testb %cl, %cl
jns 0x2fd9e
leal 0x1(%rcx), %eax
cmpb $-0x5e, %al
jae 0x2fd5f
cmpb $-0x72, %cl
jne 0x2fd70
movb 0x1(%rdi), %cl
addb $0x5f, %cl
movl $0x2, %eax
cmpb $0x3f, %cl
jae 0x2fd9c
jmp 0x2fd9e
movb 0x1(%rdi), %cl
incb %cl
movl $0x2, %eax
cmpb $-0x5e, %cl
jb 0x2fd9c
jmp 0x2fd9e
cmpb $-0x71, %cl
setne %al
subq %rdi, %rsi
cmpq $0x3, %rsi
setl %cl
orb %al, %cl
jne 0x2fd9c
movb 0x1(%rdi), %al
incb %al
cmpb $-0x5e, %al
jb 0x2fd9c
movb 0x2(%rdi), %cl
incb %cl
movl $0x3, %eax
cmpb $-0x5f, %cl
ja 0x2fd9e
xorl %eax, %eax
popq %rbp
retq
|
check_mb_ujis:
push rbp
mov rbp, rsp
mov cl, [rdi]
xor eax, eax
test cl, cl
jns short loc_2FD9E
lea eax, [rcx+1]
cmp al, 0A2h
jnb short loc_2FD5F
cmp cl, 8Eh
jnz short loc_2FD70
mov cl, [rdi+1]
add cl, 5Fh ; '_'
mov eax, 2
cmp cl, 3Fh ; '?'
jnb short loc_2FD9C
jmp short loc_2FD9E
loc_2FD5F:
mov cl, [rdi+1]
inc cl
mov eax, 2
cmp cl, 0A2h
jb short loc_2FD9C
jmp short loc_2FD9E
loc_2FD70:
cmp cl, 8Fh
setnz al
sub rsi, rdi
cmp rsi, 3
setl cl
or cl, al
jnz short loc_2FD9C
mov al, [rdi+1]
inc al
cmp al, 0A2h
jb short loc_2FD9C
mov cl, [rdi+2]
inc cl
mov eax, 3
cmp cl, 0A1h
ja short loc_2FD9E
loc_2FD9C:
xor eax, eax
loc_2FD9E:
pop rbp
retn
|
long long check_mb_ujis(char *a1, long long a2)
{
char v2; // cl
long long result; // rax
v2 = *a1;
result = 0LL;
if ( *a1 < 0 )
{
if ( (unsigned __int8)(v2 + 1) >= 0xA2u )
{
result = 2LL;
if ( (unsigned __int8)(a1[1] + 1) < 0xA2u )
return 0LL;
}
else
{
if ( v2 == -114 )
{
result = 2LL;
if ( (unsigned __int8)(a1[1] + 95) < 0x3Fu )
return result;
return 0LL;
}
if ( v2 != -113 || a2 - (long long)a1 < 3 )
return 0LL;
if ( (unsigned __int8)(a1[1] + 1) < 0xA2u )
return 0LL;
result = 3LL;
if ( (unsigned __int8)(a1[2] + 1) <= 0xA1u )
return 0LL;
}
}
return result;
}
|
check_mb_ujis:
PUSH RBP
MOV RBP,RSP
MOV CL,byte ptr [RDI]
XOR EAX,EAX
TEST CL,CL
JNS 0x0012fd9e
LEA EAX,[RCX + 0x1]
CMP AL,0xa2
JNC 0x0012fd5f
CMP CL,0x8e
JNZ 0x0012fd70
MOV CL,byte ptr [RDI + 0x1]
ADD CL,0x5f
MOV EAX,0x2
CMP CL,0x3f
JNC 0x0012fd9c
JMP 0x0012fd9e
LAB_0012fd5f:
MOV CL,byte ptr [RDI + 0x1]
INC CL
MOV EAX,0x2
CMP CL,0xa2
JC 0x0012fd9c
JMP 0x0012fd9e
LAB_0012fd70:
CMP CL,0x8f
SETNZ AL
SUB RSI,RDI
CMP RSI,0x3
SETL CL
OR CL,AL
JNZ 0x0012fd9c
MOV AL,byte ptr [RDI + 0x1]
INC AL
CMP AL,0xa2
JC 0x0012fd9c
MOV CL,byte ptr [RDI + 0x2]
INC CL
MOV EAX,0x3
CMP CL,0xa1
JA 0x0012fd9e
LAB_0012fd9c:
XOR EAX,EAX
LAB_0012fd9e:
POP RBP
RET
|
int8 check_mb_ujis(char *param_1,long param_2)
{
char cVar1;
int8 uVar2;
cVar1 = *param_1;
if (-1 < cVar1) {
return 0;
}
if ((byte)(cVar1 + 1U) < 0xa2) {
if (cVar1 == -0x72) {
if (0x3e < (byte)(param_1[1] + 0x5fU)) {
return 0;
}
return 2;
}
if (param_2 - (long)param_1 < 3 || cVar1 != -0x71) {
return 0;
}
if ((byte)(param_1[1] + 1U) < 0xa2) {
return 0;
}
cVar1 = param_1[2];
uVar2 = 3;
}
else {
cVar1 = param_1[1];
uVar2 = 2;
}
if ((byte)(cVar1 + 1U) < 0xa2) {
return 0;
}
return uVar2;
}
|
|
57,252
|
LefDefParser::defrData::DefGetTokenFromStack(char*)
|
Efficient-TDP/thirdparty/Limbo/limbo/thirdparty/lefdef/5.8/def/def/def_keywords.cpp
|
int
defrData::DefGetTokenFromStack(char *s) {
const char *ch; /* utility variable */
char *prS = NULL; /* pointing to the previous char or s */
while(input_level >= 0) {
for(ch=stack[input_level].c_str(); *ch != 0; ch++) /* skip white space */
if (*ch != ' ' && *ch != '\t' && (nl_token || *ch != '\n'))
break;
/* did we find anything? If not, decrement level and try again */
if (*ch == 0)
input_level--;
else if (*ch == '\n') {
*s++ = *ch;
*s = 0;
return TRUE;
}
else { /* we found something */
for(; ; ch++) {
if (*ch == ' ' || *ch == '\t' || *ch == '\n' || *ch == 0) {
/* 10/10/2000 - Wanda da Rosa, pcr 341032
** Take out the last '"', the 1st will be skip later
*/
if (*prS == '"') {
*prS = '\0';
} else
*s++ = '\0';
stack[input_level] = ch;
return TRUE;
}
/* 10/10/2000 - Wanda da Rosa, pcr 341032
** Save the location of the previous s
*/
prS = s;
*s++ = *ch;
}
}
}
return FALSE; /* if we get here, we ran out of input levels */
}
|
O0
|
cpp
|
LefDefParser::defrData::DefGetTokenFromStack(char*):
subq $0x38, %rsp
movq %rdi, 0x28(%rsp)
movq %rsi, 0x20(%rsp)
movq 0x28(%rsp), %rax
movq %rax, 0x8(%rsp)
movq $0x0, 0x10(%rsp)
movq 0x8(%rsp), %rax
cmpl $0x0, 0x130(%rax)
jl 0x25370
movq 0x8(%rsp), %rax
movq %rax, %rdi
addq $0x91a0, %rdi # imm = 0x91A0
movslq 0x130(%rax), %rax
shlq $0x3, %rax
addq %rax, %rdi
callq 0x72e0
movq %rax, 0x18(%rsp)
movq 0x18(%rsp), %rax
movsbl (%rax), %eax
cmpl $0x0, %eax
je 0x25240
movq 0x18(%rsp), %rax
movsbl (%rax), %eax
cmpl $0x20, %eax
je 0x2522e
movq 0x18(%rsp), %rax
movsbl (%rax), %eax
cmpl $0x9, %eax
je 0x2522e
movq 0x8(%rsp), %rax
cmpl $0x0, 0x154(%rax)
jne 0x2522c
movq 0x18(%rsp), %rax
movsbl (%rax), %eax
cmpl $0xa, %eax
je 0x2522e
jmp 0x25240
jmp 0x25230
movq 0x18(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x18(%rsp)
jmp 0x251ea
movq 0x18(%rsp), %rax
movsbl (%rax), %eax
cmpl $0x0, %eax
jne 0x25266
movq 0x8(%rsp), %rax
movl 0x130(%rax), %ecx
addl $-0x1, %ecx
movl %ecx, 0x130(%rax)
jmp 0x2536b
movq 0x18(%rsp), %rax
movsbl (%rax), %eax
cmpl $0xa, %eax
jne 0x252a2
movq 0x18(%rsp), %rax
movb (%rax), %cl
movq 0x20(%rsp), %rax
movq %rax, %rdx
addq $0x1, %rdx
movq %rdx, 0x20(%rsp)
movb %cl, (%rax)
movq 0x20(%rsp), %rax
movb $0x0, (%rax)
movl $0x1, 0x34(%rsp)
jmp 0x25378
jmp 0x252a4
movq 0x18(%rsp), %rax
movsbl (%rax), %eax
cmpl $0x20, %eax
je 0x252d8
movq 0x18(%rsp), %rax
movsbl (%rax), %eax
cmpl $0x9, %eax
je 0x252d8
movq 0x18(%rsp), %rax
movsbl (%rax), %eax
cmpl $0xa, %eax
je 0x252d8
movq 0x18(%rsp), %rax
movsbl (%rax), %eax
cmpl $0x0, %eax
jne 0x25334
movq 0x10(%rsp), %rax
movsbl (%rax), %eax
cmpl $0x22, %eax
jne 0x252ef
movq 0x10(%rsp), %rax
movb $0x0, (%rax)
jmp 0x25303
movq 0x20(%rsp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, 0x20(%rsp)
movb $0x0, (%rax)
movq 0x8(%rsp), %rax
movq 0x18(%rsp), %rsi
movq %rax, %rdi
addq $0x91a0, %rdi # imm = 0x91A0
movslq 0x130(%rax), %rax
shlq $0x3, %rax
addq %rax, %rdi
callq 0x7310
movl $0x1, 0x34(%rsp)
jmp 0x25378
movq 0x20(%rsp), %rax
movq %rax, 0x10(%rsp)
movq 0x18(%rsp), %rax
movb (%rax), %cl
movq 0x20(%rsp), %rax
movq %rax, %rdx
addq $0x1, %rdx
movq %rdx, 0x20(%rsp)
movb %cl, (%rax)
movq 0x18(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x18(%rsp)
jmp 0x252a4
jmp 0x251b1
movl $0x0, 0x34(%rsp)
movl 0x34(%rsp), %eax
addq $0x38, %rsp
retq
nopw %cs:(%rax,%rax)
|
_ZN12LefDefParser8defrData20DefGetTokenFromStackEPc:
sub rsp, 38h
mov [rsp+38h+var_10], rdi
mov [rsp+38h+var_18], rsi
mov rax, [rsp+38h+var_10]
mov [rsp+38h+var_30], rax
mov [rsp+38h+var_28], 0
loc_251B1:
mov rax, [rsp+38h+var_30]
cmp dword ptr [rax+130h], 0
jl loc_25370
mov rax, [rsp+38h+var_30]
mov rdi, rax
add rdi, 91A0h
movsxd rax, dword ptr [rax+130h]
shl rax, 3
add rdi, rax; this
call __ZNKSs5c_strEv; std::string::c_str(void)
mov [rsp+38h+var_20], rax
loc_251EA:
mov rax, [rsp+38h+var_20]
movsx eax, byte ptr [rax]
cmp eax, 0
jz short loc_25240
mov rax, [rsp+38h+var_20]
movsx eax, byte ptr [rax]
cmp eax, 20h ; ' '
jz short loc_2522E
mov rax, [rsp+38h+var_20]
movsx eax, byte ptr [rax]
cmp eax, 9
jz short loc_2522E
mov rax, [rsp+38h+var_30]
cmp dword ptr [rax+154h], 0
jnz short loc_2522C
mov rax, [rsp+38h+var_20]
movsx eax, byte ptr [rax]
cmp eax, 0Ah
jz short loc_2522E
loc_2522C:
jmp short loc_25240
loc_2522E:
jmp short $+2
loc_25230:
mov rax, [rsp+38h+var_20]
add rax, 1
mov [rsp+38h+var_20], rax
jmp short loc_251EA
loc_25240:
mov rax, [rsp+38h+var_20]
movsx eax, byte ptr [rax]
cmp eax, 0
jnz short loc_25266
mov rax, [rsp+38h+var_30]
mov ecx, [rax+130h]
add ecx, 0FFFFFFFFh
mov [rax+130h], ecx
jmp loc_2536B
loc_25266:
mov rax, [rsp+38h+var_20]
movsx eax, byte ptr [rax]
cmp eax, 0Ah
jnz short loc_252A2
mov rax, [rsp+38h+var_20]
mov cl, [rax]
mov rax, [rsp+38h+var_18]
mov rdx, rax
add rdx, 1
mov [rsp+38h+var_18], rdx
mov [rax], cl
mov rax, [rsp+38h+var_18]
mov byte ptr [rax], 0
mov [rsp+38h+var_4], 1
jmp loc_25378
loc_252A2:
jmp short $+2
loc_252A4:
mov rax, [rsp+38h+var_20]
movsx eax, byte ptr [rax]
cmp eax, 20h ; ' '
jz short loc_252D8
mov rax, [rsp+38h+var_20]
movsx eax, byte ptr [rax]
cmp eax, 9
jz short loc_252D8
mov rax, [rsp+38h+var_20]
movsx eax, byte ptr [rax]
cmp eax, 0Ah
jz short loc_252D8
mov rax, [rsp+38h+var_20]
movsx eax, byte ptr [rax]
cmp eax, 0
jnz short loc_25334
loc_252D8:
mov rax, [rsp+38h+var_28]
movsx eax, byte ptr [rax]
cmp eax, 22h ; '"'
jnz short loc_252EF
mov rax, [rsp+38h+var_28]
mov byte ptr [rax], 0
jmp short loc_25303
loc_252EF:
mov rax, [rsp+38h+var_18]
mov rcx, rax
add rcx, 1
mov [rsp+38h+var_18], rcx
mov byte ptr [rax], 0
loc_25303:
mov rax, [rsp+38h+var_30]
mov rsi, [rsp+38h+var_20]
mov rdi, rax
add rdi, 91A0h
movsxd rax, dword ptr [rax+130h]
shl rax, 3
add rdi, rax
call __ZNSsaSEPKc; std::string::operator=(char const*)
mov [rsp+38h+var_4], 1
jmp short loc_25378
loc_25334:
mov rax, [rsp+38h+var_18]
mov [rsp+38h+var_28], rax
mov rax, [rsp+38h+var_20]
mov cl, [rax]
mov rax, [rsp+38h+var_18]
mov rdx, rax
add rdx, 1
mov [rsp+38h+var_18], rdx
mov [rax], cl
mov rax, [rsp+38h+var_20]
add rax, 1
mov [rsp+38h+var_20], rax
jmp loc_252A4
loc_2536B:
jmp loc_251B1
loc_25370:
mov [rsp+38h+var_4], 0
loc_25378:
mov eax, [rsp+38h+var_4]
add rsp, 38h
retn
|
long long LefDefParser::defrData::DefGetTokenFromStack(LefDefParser::defrData *this, char *a2)
{
char *v2; // rax
char *v4; // [rsp+10h] [rbp-28h]
char *i; // [rsp+18h] [rbp-20h]
char *v6; // [rsp+20h] [rbp-18h]
v6 = a2;
v4 = 0LL;
while ( 1 )
{
if ( *((int *)this + 76) < 0 )
return 0;
for ( i = (char *)std::string::c_str((LefDefParser::defrData *)((char *)this + 8 * *((int *)this + 76) + 37280));
*i && (*i == 32 || *i == 9 || !*((_DWORD *)this + 85) && *i == 10);
++i )
{
;
}
if ( *i )
break;
--*((_DWORD *)this + 76);
}
if ( *i == 10 )
{
*a2 = *i;
a2[1] = 0;
return 1;
}
else
{
while ( *i != 32 && *i != 9 && *i != 10 && *i )
{
v4 = v6;
v2 = v6++;
*v2 = *i++;
}
if ( *v4 == 34 )
*v4 = 0;
else
*v6 = 0;
std::string::operator=((char *)this + 8 * *((int *)this + 76) + 37280, i);
return 1;
}
}
|
DefGetTokenFromStack:
SUB RSP,0x38
MOV qword ptr [RSP + 0x28],RDI
MOV qword ptr [RSP + 0x20],RSI
MOV RAX,qword ptr [RSP + 0x28]
MOV qword ptr [RSP + 0x8],RAX
MOV qword ptr [RSP + 0x10],0x0
LAB_001251b1:
MOV RAX,qword ptr [RSP + 0x8]
CMP dword ptr [RAX + 0x130],0x0
JL 0x00125370
MOV RAX,qword ptr [RSP + 0x8]
MOV RDI,RAX
ADD RDI,0x91a0
MOVSXD RAX,dword ptr [RAX + 0x130]
SHL RAX,0x3
ADD RDI,RAX
CALL 0x001072e0
MOV qword ptr [RSP + 0x18],RAX
LAB_001251ea:
MOV RAX,qword ptr [RSP + 0x18]
MOVSX EAX,byte ptr [RAX]
CMP EAX,0x0
JZ 0x00125240
MOV RAX,qword ptr [RSP + 0x18]
MOVSX EAX,byte ptr [RAX]
CMP EAX,0x20
JZ 0x0012522e
MOV RAX,qword ptr [RSP + 0x18]
MOVSX EAX,byte ptr [RAX]
CMP EAX,0x9
JZ 0x0012522e
MOV RAX,qword ptr [RSP + 0x8]
CMP dword ptr [RAX + 0x154],0x0
JNZ 0x0012522c
MOV RAX,qword ptr [RSP + 0x18]
MOVSX EAX,byte ptr [RAX]
CMP EAX,0xa
JZ 0x0012522e
LAB_0012522c:
JMP 0x00125240
LAB_0012522e:
JMP 0x00125230
LAB_00125230:
MOV RAX,qword ptr [RSP + 0x18]
ADD RAX,0x1
MOV qword ptr [RSP + 0x18],RAX
JMP 0x001251ea
LAB_00125240:
MOV RAX,qword ptr [RSP + 0x18]
MOVSX EAX,byte ptr [RAX]
CMP EAX,0x0
JNZ 0x00125266
MOV RAX,qword ptr [RSP + 0x8]
MOV ECX,dword ptr [RAX + 0x130]
ADD ECX,-0x1
MOV dword ptr [RAX + 0x130],ECX
JMP 0x0012536b
LAB_00125266:
MOV RAX,qword ptr [RSP + 0x18]
MOVSX EAX,byte ptr [RAX]
CMP EAX,0xa
JNZ 0x001252a2
MOV RAX,qword ptr [RSP + 0x18]
MOV CL,byte ptr [RAX]
MOV RAX,qword ptr [RSP + 0x20]
MOV RDX,RAX
ADD RDX,0x1
MOV qword ptr [RSP + 0x20],RDX
MOV byte ptr [RAX],CL
MOV RAX,qword ptr [RSP + 0x20]
MOV byte ptr [RAX],0x0
MOV dword ptr [RSP + 0x34],0x1
JMP 0x00125378
LAB_001252a2:
JMP 0x001252a4
LAB_001252a4:
MOV RAX,qword ptr [RSP + 0x18]
MOVSX EAX,byte ptr [RAX]
CMP EAX,0x20
JZ 0x001252d8
MOV RAX,qword ptr [RSP + 0x18]
MOVSX EAX,byte ptr [RAX]
CMP EAX,0x9
JZ 0x001252d8
MOV RAX,qword ptr [RSP + 0x18]
MOVSX EAX,byte ptr [RAX]
CMP EAX,0xa
JZ 0x001252d8
MOV RAX,qword ptr [RSP + 0x18]
MOVSX EAX,byte ptr [RAX]
CMP EAX,0x0
JNZ 0x00125334
LAB_001252d8:
MOV RAX,qword ptr [RSP + 0x10]
MOVSX EAX,byte ptr [RAX]
CMP EAX,0x22
JNZ 0x001252ef
MOV RAX,qword ptr [RSP + 0x10]
MOV byte ptr [RAX],0x0
JMP 0x00125303
LAB_001252ef:
MOV RAX,qword ptr [RSP + 0x20]
MOV RCX,RAX
ADD RCX,0x1
MOV qword ptr [RSP + 0x20],RCX
MOV byte ptr [RAX],0x0
LAB_00125303:
MOV RAX,qword ptr [RSP + 0x8]
MOV RSI,qword ptr [RSP + 0x18]
MOV RDI,RAX
ADD RDI,0x91a0
MOVSXD RAX,dword ptr [RAX + 0x130]
SHL RAX,0x3
ADD RDI,RAX
CALL 0x00107310
MOV dword ptr [RSP + 0x34],0x1
JMP 0x00125378
LAB_00125334:
MOV RAX,qword ptr [RSP + 0x20]
MOV qword ptr [RSP + 0x10],RAX
MOV RAX,qword ptr [RSP + 0x18]
MOV CL,byte ptr [RAX]
MOV RAX,qword ptr [RSP + 0x20]
MOV RDX,RAX
ADD RDX,0x1
MOV qword ptr [RSP + 0x20],RDX
MOV byte ptr [RAX],CL
MOV RAX,qword ptr [RSP + 0x18]
ADD RAX,0x1
MOV qword ptr [RSP + 0x18],RAX
JMP 0x001252a4
LAB_0012536b:
JMP 0x001251b1
LAB_00125370:
MOV dword ptr [RSP + 0x34],0x0
LAB_00125378:
MOV EAX,dword ptr [RSP + 0x34]
ADD RSP,0x38
RET
|
/* LefDefParser::defrData::DefGetTokenFromStack(char*) */
int4 __thiscall LefDefParser::defrData::DefGetTokenFromStack(defrData *this,char *param_1)
{
char *local_28;
char *local_20;
char *local_18;
local_28 = (char *)0x0;
while( true ) {
if (*(int *)(this + 0x130) < 0) {
return 0;
}
for (local_20 = (char *)std::string::c_str();
(*local_20 != '\0' &&
(((*local_20 == ' ' || (*local_20 == '\t')) ||
((*(int *)(this + 0x154) == 0 && (*local_20 == '\n')))))); local_20 = local_20 + 1) {
}
if (*local_20 != '\0') break;
*(int *)(this + 0x130) = *(int *)(this + 0x130) + -1;
}
local_18 = param_1;
if (*local_20 == '\n') {
*param_1 = *local_20;
param_1[1] = '\0';
return 1;
}
for (; (((*local_20 != ' ' && (*local_20 != '\t')) && (*local_20 != '\n')) && (*local_20 != '\0'))
; local_20 = local_20 + 1) {
local_28 = local_18;
*local_18 = *local_20;
local_18 = local_18 + 1;
}
if (*local_28 == '\"') {
*local_28 = '\0';
}
else {
*local_18 = '\0';
}
std::string::operator=((string *)(this + (long)*(int *)(this + 0x130) * 8 + 0x91a0),local_20);
return 1;
}
|
|
57,253
|
my_snprintf_8bit
|
eloqsql/strings/ctype-simple.c
|
size_t my_snprintf_8bit(CHARSET_INFO *cs __attribute__((unused)),
char* to, size_t n __attribute__((unused)),
const char* fmt, ...)
{
va_list args;
size_t result;
va_start(args,fmt);
result= my_vsnprintf(to, n, fmt, args);
va_end(args);
return result;
}
|
O0
|
c
|
my_snprintf_8bit:
pushq %rbp
movq %rsp, %rbp
subq $0x100, %rsp # imm = 0x100
testb %al, %al
je 0x5264e
movaps %xmm0, -0xd0(%rbp)
movaps %xmm1, -0xc0(%rbp)
movaps %xmm2, -0xb0(%rbp)
movaps %xmm3, -0xa0(%rbp)
movaps %xmm4, -0x90(%rbp)
movaps %xmm5, -0x80(%rbp)
movaps %xmm6, -0x70(%rbp)
movaps %xmm7, -0x60(%rbp)
movq %r9, -0xd8(%rbp)
movq %r8, -0xe0(%rbp)
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
leaq -0x100(%rbp), %rax
movq %rax, -0x30(%rbp)
leaq 0x10(%rbp), %rax
movq %rax, -0x38(%rbp)
movl $0x30, -0x3c(%rbp)
movl $0x20, -0x40(%rbp)
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x20(%rbp), %rdx
leaq -0x40(%rbp), %rcx
callq 0x85870
movq %rax, -0x48(%rbp)
movq -0x48(%rbp), %rax
addq $0x100, %rsp # imm = 0x100
popq %rbp
retq
nopw %cs:(%rax,%rax)
|
my_snprintf_8bit:
push rbp
mov rbp, rsp
sub rsp, 100h
test al, al
jz short loc_5264E
movaps [rbp+var_D0], xmm0
movaps [rbp+var_C0], xmm1
movaps [rbp+var_B0], xmm2
movaps [rbp+var_A0], xmm3
movaps [rbp+var_90], xmm4
movaps [rbp+var_80], xmm5
movaps [rbp+var_70], xmm6
movaps [rbp+var_60], xmm7
loc_5264E:
mov [rbp+var_D8], r9
mov [rbp+var_E0], r8
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov [rbp+var_18], rdx
mov [rbp+var_20], rcx
lea rax, [rbp+var_100]
mov [rbp+var_30], rax
lea rax, [rbp+arg_0]
mov [rbp+var_38], rax
mov [rbp+var_3C], 30h ; '0'
mov [rbp+var_40], 20h ; ' '
mov rdi, [rbp+var_10]
mov rsi, [rbp+var_18]
mov rdx, [rbp+var_20]
lea rcx, [rbp+var_40]
call my_vsnprintf
mov [rbp+var_48], rax
mov rax, [rbp+var_48]
add rsp, 100h
pop rbp
retn
|
long long my_snprintf_8bit(
long long a1,
long long a2,
long long a3,
long long a4,
long long a5,
long long a6,
__m128 a7,
__m128 a8,
__m128 a9,
__m128 a10,
__m128 a11,
__m128 a12,
__m128 a13,
__m128 a14,
char a15)
{
char v16; // [rsp+0h] [rbp-100h] BYREF
long long v17; // [rsp+20h] [rbp-E0h]
long long v18; // [rsp+28h] [rbp-D8h]
__m128 v19; // [rsp+30h] [rbp-D0h]
__m128 v20; // [rsp+40h] [rbp-C0h]
__m128 v21; // [rsp+50h] [rbp-B0h]
__m128 v22; // [rsp+60h] [rbp-A0h]
__m128 v23; // [rsp+70h] [rbp-90h]
__m128 v24; // [rsp+80h] [rbp-80h]
__m128 v25; // [rsp+90h] [rbp-70h]
__m128 v26; // [rsp+A0h] [rbp-60h]
_DWORD v27[2]; // [rsp+C0h] [rbp-40h] BYREF
char *v28; // [rsp+C8h] [rbp-38h]
char *v29; // [rsp+D0h] [rbp-30h]
long long v30; // [rsp+E0h] [rbp-20h]
long long v31; // [rsp+E8h] [rbp-18h]
long long v32; // [rsp+F0h] [rbp-10h]
long long v33; // [rsp+F8h] [rbp-8h]
v19 = a7;
v20 = a8;
v21 = a9;
v22 = a10;
v23 = a11;
v24 = a12;
v25 = a13;
v26 = a14;
v18 = a6;
v17 = a5;
v33 = a1;
v32 = a2;
v31 = a3;
v30 = a4;
v29 = &v16;
v28 = &a15;
v27[1] = 48;
v27[0] = 32;
return my_vsnprintf(a2, a3, a4, v27);
}
|
my_snprintf_8bit:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x100
TEST AL,AL
JZ 0x0015264e
MOVAPS xmmword ptr [RBP + -0xd0],XMM0
MOVAPS xmmword ptr [RBP + -0xc0],XMM1
MOVAPS xmmword ptr [RBP + -0xb0],XMM2
MOVAPS xmmword ptr [RBP + -0xa0],XMM3
MOVAPS xmmword ptr [RBP + -0x90],XMM4
MOVAPS xmmword ptr [RBP + -0x80],XMM5
MOVAPS xmmword ptr [RBP + -0x70],XMM6
MOVAPS xmmword ptr [RBP + -0x60],XMM7
LAB_0015264e:
MOV qword ptr [RBP + -0xd8],R9
MOV qword ptr [RBP + -0xe0],R8
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV qword ptr [RBP + -0x18],RDX
MOV qword ptr [RBP + -0x20],RCX
LEA RAX,[RBP + -0x100]
MOV qword ptr [RBP + -0x30],RAX
LEA RAX,[RBP + 0x10]
MOV qword ptr [RBP + -0x38],RAX
MOV dword ptr [RBP + -0x3c],0x30
MOV dword ptr [RBP + -0x40],0x20
MOV RDI,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RBP + -0x18]
MOV RDX,qword ptr [RBP + -0x20]
LEA RCX,[RBP + -0x40]
CALL 0x00185870
MOV qword ptr [RBP + -0x48],RAX
MOV RAX,qword ptr [RBP + -0x48]
ADD RSP,0x100
POP RBP
RET
|
int8
my_snprintf_8bit(int8 param_1,int8 param_2,int8 param_3,int8 param_4,
int8 param_5,int8 param_6,int8 param_7,int8 param_8,
int8 param_9,int8 param_10,int8 param_11,int8 param_12,
int8 param_13,int8 param_14)
{
char in_AL;
int8 uVar1;
int1 local_108 [32];
int8 local_e8;
int8 local_e0;
int8 local_d8;
int8 local_c8;
int8 local_b8;
int8 local_a8;
int8 local_98;
int8 local_88;
int8 local_78;
int8 local_68;
int4 local_48;
int4 local_44;
int1 *local_40;
int1 *local_38;
int8 local_28;
int8 local_20;
int8 local_18;
int8 local_10;
if (in_AL != '\0') {
local_d8 = param_1;
local_c8 = param_2;
local_b8 = param_3;
local_a8 = param_4;
local_98 = param_5;
local_88 = param_6;
local_78 = param_7;
local_68 = param_8;
}
local_38 = local_108;
local_40 = &stack0x00000008;
local_44 = 0x30;
local_48 = 0x20;
local_e8 = param_13;
local_e0 = param_14;
local_28 = param_12;
local_20 = param_11;
local_18 = param_10;
local_10 = param_9;
uVar1 = my_vsnprintf(param_10,param_11,param_12,&local_48);
return uVar1;
}
|
|
57,254
|
c4_chain_genesis_validators_root
|
corpus-core[P]colibri-stateless/src/util/chains.c
|
bool c4_chain_genesis_validators_root(chain_id_t chain_id, bytes32_t genesis_validators_root) {
void* hash;
switch (chain_id) {
case C4_CHAIN_MAINNET:
hash = "\x4b\x36\x3d\xb9\x4e\x28\x61\x20\xd7\x6e\xb9\x05\x34\x0f\xdd\x4e\x54\xbf\xe9\xf0\x6b\xf3\x3f\xf6\xcf\x5a\xd2\x7f\x51\x1b\xfe\x95";
break;
default: return false;
}
memcpy(genesis_validators_root, hash, 32);
return true;
}
|
O0
|
c
|
c4_chain_genesis_validators_root:
pushq %rbp
movq %rsp, %rbp
movl %edi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl -0x8(%rbp), %eax
subl $0x1, %eax
jne 0x22112
jmp 0x22105
leaq 0x3282c(%rip), %rax # 0x54938
movq %rax, -0x18(%rbp)
jmp 0x22118
movb $0x0, -0x1(%rbp)
jmp 0x22142
movq -0x10(%rbp), %rax
movq -0x18(%rbp), %rcx
movq (%rcx), %rdx
movq %rdx, (%rax)
movq 0x8(%rcx), %rdx
movq %rdx, 0x8(%rax)
movq 0x10(%rcx), %rdx
movq %rdx, 0x10(%rax)
movq 0x18(%rcx), %rcx
movq %rcx, 0x18(%rax)
movb $0x1, -0x1(%rbp)
movb -0x1(%rbp), %al
andb $0x1, %al
popq %rbp
retq
nopl (%rax)
|
c4_chain_genesis_validators_root:
push rbp
mov rbp, rsp
mov [rbp+var_8], edi
mov [rbp+var_10], rsi
mov eax, [rbp+var_8]
sub eax, 1
jnz short loc_22112
jmp short $+2
loc_22105:
lea rax, unk_54938
mov [rbp+var_18], rax
jmp short loc_22118
loc_22112:
mov [rbp+var_1], 0
jmp short loc_22142
loc_22118:
mov rax, [rbp+var_10]
mov rcx, [rbp+var_18]
mov rdx, [rcx]
mov [rax], rdx
mov rdx, [rcx+8]
mov [rax+8], rdx
mov rdx, [rcx+10h]
mov [rax+10h], rdx
mov rcx, [rcx+18h]
mov [rax+18h], rcx
mov [rbp+var_1], 1
loc_22142:
mov al, [rbp+var_1]
and al, 1
pop rbp
retn
|
char c4_chain_genesis_validators_root(int a1, _QWORD *a2)
{
if ( a1 != 1 )
return 0;
*a2 = qword_54938[0];
a2[1] = qword_54938[1];
a2[2] = qword_54938[2];
a2[3] = qword_54938[3];
return 1;
}
|
c4_chain_genesis_validators_root:
PUSH RBP
MOV RBP,RSP
MOV dword ptr [RBP + -0x8],EDI
MOV qword ptr [RBP + -0x10],RSI
MOV EAX,dword ptr [RBP + -0x8]
SUB EAX,0x1
JNZ 0x00122112
JMP 0x00122105
LAB_00122105:
LEA RAX,[0x154938]
MOV qword ptr [RBP + -0x18],RAX
JMP 0x00122118
LAB_00122112:
MOV byte ptr [RBP + -0x1],0x0
JMP 0x00122142
LAB_00122118:
MOV RAX,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RBP + -0x18]
MOV RDX,qword ptr [RCX]
MOV qword ptr [RAX],RDX
MOV RDX,qword ptr [RCX + 0x8]
MOV qword ptr [RAX + 0x8],RDX
MOV RDX,qword ptr [RCX + 0x10]
MOV qword ptr [RAX + 0x10],RDX
MOV RCX,qword ptr [RCX + 0x18]
MOV qword ptr [RAX + 0x18],RCX
MOV byte ptr [RBP + -0x1],0x1
LAB_00122142:
MOV AL,byte ptr [RBP + -0x1]
AND AL,0x1
POP RBP
RET
|
bool c4_chain_genesis_validators_root(int param_1,int8 *param_2)
{
if (param_1 == 1) {
*param_2 = DAT_00154938;
param_2[1] = DAT_00154940;
param_2[2] = DAT_00154948;
param_2[3] = DAT_00154950;
}
return param_1 == 1;
}
|
|
57,255
|
c4_chain_genesis_validators_root
|
corpus-core[P]colibri-stateless/src/util/chains.c
|
bool c4_chain_genesis_validators_root(chain_id_t chain_id, bytes32_t genesis_validators_root) {
void* hash;
switch (chain_id) {
case C4_CHAIN_MAINNET:
hash = "\x4b\x36\x3d\xb9\x4e\x28\x61\x20\xd7\x6e\xb9\x05\x34\x0f\xdd\x4e\x54\xbf\xe9\xf0\x6b\xf3\x3f\xf6\xcf\x5a\xd2\x7f\x51\x1b\xfe\x95";
break;
default: return false;
}
memcpy(genesis_validators_root, hash, 32);
return true;
}
|
O1
|
c
|
c4_chain_genesis_validators_root:
cmpl $0x1, %edi
jne 0x186c2
movups 0x27074(%rip), %xmm0 # 0x3f728
movups %xmm0, 0x10(%rsi)
movups 0x27059(%rip), %xmm0 # 0x3f718
movups %xmm0, (%rsi)
cmpl $0x1, %edi
sete %al
retq
|
c4_chain_genesis_validators_root:
cmp edi, 1
jnz short loc_186C2
movups xmm0, cs:xmmword_3F728
movups xmmword ptr [rsi+10h], xmm0
movups xmm0, cs:xmmword_3F718
movups xmmword ptr [rsi], xmm0
loc_186C2:
cmp edi, 1
setz al
retn
|
bool c4_chain_genesis_validators_root(int a1, _OWORD *a2)
{
if ( a1 == 1 )
{
a2[1] = xmmword_3F728;
*a2 = xmmword_3F718;
}
return a1 == 1;
}
|
c4_chain_genesis_validators_root:
CMP EDI,0x1
JNZ 0x001186c2
MOVUPS XMM0,xmmword ptr [0x0013f728]
MOVUPS xmmword ptr [RSI + 0x10],XMM0
MOVUPS XMM0,xmmword ptr [0x0013f718]
MOVUPS xmmword ptr [RSI],XMM0
LAB_001186c2:
CMP EDI,0x1
SETZ AL
RET
|
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
bool c4_chain_genesis_validators_root(int param_1,int8 *param_2)
{
int8 uVar1;
uVar1 = _UNK_0013f730;
if (param_1 == 1) {
param_2[2] = _DAT_0013f728;
param_2[3] = uVar1;
uVar1 = _UNK_0013f720;
*param_2 = _DAT_0013f718;
param_2[1] = uVar1;
}
return param_1 == 1;
}
|
|
57,256
|
c4_chain_genesis_validators_root
|
corpus-core[P]colibri-stateless/src/util/chains.c
|
bool c4_chain_genesis_validators_root(chain_id_t chain_id, bytes32_t genesis_validators_root) {
void* hash;
switch (chain_id) {
case C4_CHAIN_MAINNET:
hash = "\x4b\x36\x3d\xb9\x4e\x28\x61\x20\xd7\x6e\xb9\x05\x34\x0f\xdd\x4e\x54\xbf\xe9\xf0\x6b\xf3\x3f\xf6\xcf\x5a\xd2\x7f\x51\x1b\xfe\x95";
break;
default: return false;
}
memcpy(genesis_validators_root, hash, 32);
return true;
}
|
O3
|
c
|
c4_chain_genesis_validators_root:
cmpl $0x1, %edi
jne 0x17e3e
movups 0x278e8(%rip), %xmm0 # 0x3f718
movups %xmm0, 0x10(%rsi)
movups 0x278cd(%rip), %xmm0 # 0x3f708
movups %xmm0, (%rsi)
cmpl $0x1, %edi
sete %al
retq
|
c4_chain_genesis_validators_root:
cmp edi, 1
jnz short loc_17E3E
movups xmm0, cs:xmmword_3F718
movups xmmword ptr [rsi+10h], xmm0
movups xmm0, cs:xmmword_3F708
movups xmmword ptr [rsi], xmm0
loc_17E3E:
cmp edi, 1
setz al
retn
|
bool c4_chain_genesis_validators_root(int a1, _OWORD *a2)
{
if ( a1 == 1 )
{
a2[1] = xmmword_3F718;
*a2 = xmmword_3F708;
}
return a1 == 1;
}
|
c4_chain_genesis_validators_root:
CMP EDI,0x1
JNZ 0x00117e3e
MOVUPS XMM0,xmmword ptr [0x0013f718]
MOVUPS xmmword ptr [RSI + 0x10],XMM0
MOVUPS XMM0,xmmword ptr [0x0013f708]
MOVUPS xmmword ptr [RSI],XMM0
LAB_00117e3e:
CMP EDI,0x1
SETZ AL
RET
|
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
bool c4_chain_genesis_validators_root(int param_1,int8 *param_2)
{
int8 uVar1;
uVar1 = _UNK_0013f720;
if (param_1 == 1) {
param_2[2] = _DAT_0013f718;
param_2[3] = uVar1;
uVar1 = _UNK_0013f710;
*param_2 = _DAT_0013f708;
param_2[1] = uVar1;
}
return param_1 == 1;
}
|
|
57,257
|
blst_core_verify_pk_in_g1
|
corpus-core[P]colibri-stateless/build_O3/_deps/blst-src/src/aggregate.c
|
BLST_ERROR blst_core_verify_pk_in_g1(const POINTonE1_affine *pk,
const POINTonE2_affine *signature,
int hash_or_encode,
const void *msg, size_t msg_len,
const void *DST, size_t DST_len,
const void *aug, size_t aug_len)
{
PAIRING ctx;
BLST_ERROR ret;
ctx.ctrl = AGGR_UNDEFINED | (hash_or_encode ? AGGR_HASH_OR_ENCODE : 0);
ctx.nelems = 0;
ctx.DST = DST;
ctx.DST_len = DST_len;
ret = PAIRING_Aggregate_PK_in_G1(&ctx, pk, 1, signature, 1, NULL, 0,
msg, msg_len, aug, aug_len);
if (ret != BLST_SUCCESS)
return ret;
PAIRING_Commit(&ctx);
return PAIRING_FinalVerify(&ctx, NULL) ? BLST_SUCCESS : BLST_VERIFY_FAIL;
}
|
O3
|
c
|
blst_core_verify_pk_in_g1:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
subq $0xca8, %rsp # imm = 0xCA8
movq %rcx, %rax
movq %rsi, %rcx
movq %rdi, %rsi
xorl %r10d, %r10d
testl %edx, %edx
setne %r10b
movups 0x18(%rbp), %xmm0
movq 0x10(%rbp), %rdx
shll $0x6, %r10d
leaq -0xc80(%rbp), %rdi
movl %r10d, (%rdi)
movl $0x0, 0x4(%rdi)
movq %r9, 0x8(%rdi)
movq %rdx, 0x10(%rdi)
movups %xmm0, 0x18(%rsp)
movq %r8, 0x10(%rsp)
movq %rax, 0x8(%rsp)
movq $0x0, (%rsp)
movl $0x1, %edx
movl $0x1, %r8d
xorl %r9d, %r9d
callq 0x20d73
testl %eax, %eax
jne 0x21877
leaq -0xc80(%rbp), %rbx
movq %rbx, %rdi
callq 0x211a9
movq %rbx, %rdi
xorl %esi, %esi
callq 0x21367
xorl %ecx, %ecx
testq %rax, %rax
sete %cl
leal (%rcx,%rcx,4), %eax
addq $0xca8, %rsp # imm = 0xCA8
popq %rbx
popq %rbp
retq
|
blst_core_verify_pk_in_g1:
push rbp
mov rbp, rsp
push rbx
sub rsp, 0CA8h
mov rax, rcx
mov rcx, rsi
mov rsi, rdi
xor r10d, r10d
test edx, edx
setnz r10b
movups xmm0, [rbp+arg_8]
mov rdx, [rbp+arg_0]
shl r10d, 6
lea rdi, [rbp+var_C80]
mov [rdi], r10d
mov dword ptr [rdi+4], 0
mov [rdi+8], r9
mov [rdi+10h], rdx
movups [rsp+0CB0h+var_C98], xmm0
mov [rsp+0CB0h+var_CA0], r8
mov [rsp+0CB0h+var_CA8], rax
mov [rsp+0CB0h+var_CB0], 0
mov edx, 1
mov r8d, 1
xor r9d, r9d
call PAIRING_Aggregate_PK_in_G1
test eax, eax
jnz short loc_21877
lea rbx, [rbp+var_C80]
mov rdi, rbx
call PAIRING_Commit
mov rdi, rbx
xor esi, esi
call PAIRING_FinalVerify
xor ecx, ecx
test rax, rax
setz cl
lea eax, [rcx+rcx*4]
loc_21877:
add rsp, 0CA8h
pop rbx
pop rbp
retn
|
long long blst_core_verify_pk_in_g1(
_BYTE *a1,
long long a2,
int a3,
long long a4,
long long a5,
long long a6,
long long a7,
__int128 a8)
{
long long result; // rax
_QWORD v9[400]; // [rsp+30h] [rbp-C80h] BYREF
v9[0] = (unsigned __int8)(a3 != 0) << 6;
v9[1] = a6;
v9[2] = a7;
result = PAIRING_Aggregate_PK_in_G1((long long)v9, a1, 1LL, a2, 1LL, 0LL, 0LL, a4, a5, a8, *((long long *)&a8 + 1));
if ( !(_DWORD)result )
{
PAIRING_Commit((long long)v9);
return 5 * (unsigned int)(PAIRING_FinalVerify(v9, 0LL) == 0);
}
return result;
}
|
blst_core_verify_pk_in_g1:
PUSH RBP
MOV RBP,RSP
PUSH RBX
SUB RSP,0xca8
MOV RAX,RCX
MOV RCX,RSI
MOV RSI,RDI
XOR R10D,R10D
TEST EDX,EDX
SETNZ R10B
MOVUPS XMM0,xmmword ptr [RBP + 0x18]
MOV RDX,qword ptr [RBP + 0x10]
SHL R10D,0x6
LEA RDI,[RBP + -0xc80]
MOV dword ptr [RDI],R10D
MOV dword ptr [RDI + 0x4],0x0
MOV qword ptr [RDI + 0x8],R9
MOV qword ptr [RDI + 0x10],RDX
MOVUPS xmmword ptr [RSP + 0x18],XMM0
MOV qword ptr [RSP + 0x10],R8
MOV qword ptr [RSP + 0x8],RAX
MOV qword ptr [RSP],0x0
MOV EDX,0x1
MOV R8D,0x1
XOR R9D,R9D
CALL 0x00120d73
TEST EAX,EAX
JNZ 0x00121877
LEA RBX,[RBP + -0xc80]
MOV RDI,RBX
CALL 0x001211a9
MOV RDI,RBX
XOR ESI,ESI
CALL 0x00121367
XOR ECX,ECX
TEST RAX,RAX
SETZ CL
LEA EAX,[RCX + RCX*0x4]
LAB_00121877:
ADD RSP,0xca8
POP RBX
POP RBP
RET
|
ulong blst_core_verify_pk_in_g1
(int8 param_1,int8 param_2,int param_3,int8 param_4,
int8 param_5,int8 param_6,int8 param_7,int4 param_8,
int4 param_9)
{
ulong uVar1;
long lVar2;
int local_c88 [2];
int8 local_c80;
int8 local_c78;
local_c88[0] = (uint)(param_3 != 0) << 6;
local_c88[1] = 0;
local_c78 = param_7;
local_c80 = param_6;
uVar1 = PAIRING_Aggregate_PK_in_G1
(local_c88,param_1,1,param_2,1,0,0,param_4,param_5,param_8,param_9);
if ((int)uVar1 == 0) {
PAIRING_Commit(local_c88);
lVar2 = PAIRING_FinalVerify(local_c88,0);
uVar1 = (ulong)((uint)(lVar2 == 0) * 5);
}
return uVar1;
}
|
|
57,258
|
my_strntoll_8bit
|
eloqsql/strings/ctype-simple.c
|
longlong my_strntoll_8bit(CHARSET_INFO *cs __attribute__((unused)),
const char *nptr, size_t l, int base,
char **endptr,int *err)
{
int negative;
register ulonglong cutoff;
register uint cutlim;
register ulonglong i;
register const char *s, *e;
const char *save;
int overflow;
*err= 0; /* Initialize error indicator */
s = nptr;
e = nptr+l;
for(; s<e && my_isspace(cs,*s); s++);
if (s == e)
{
goto noconv;
}
if (*s == '-')
{
negative = 1;
++s;
}
else if (*s == '+')
{
negative = 0;
++s;
}
else
negative = 0;
save = s;
cutoff = (~(ulonglong) 0) / (unsigned long int) base;
cutlim = (uint) ((~(ulonglong) 0) % (unsigned long int) base);
overflow = 0;
i = 0;
for ( ; s != e; s++)
{
register uchar c= *s;
if (c>='0' && c<='9')
c -= '0';
else if (c>='A' && c<='Z')
c = c - 'A' + 10;
else if (c>='a' && c<='z')
c = c - 'a' + 10;
else
break;
if (c >= base)
break;
if (i > cutoff || (i == cutoff && c > cutlim))
overflow = 1;
else
{
i *= (ulonglong) base;
i += c;
}
}
if (s == save)
goto noconv;
if (endptr != NULL)
*endptr = (char *) s;
if (negative)
{
if (i > (ulonglong) LONGLONG_MIN)
overflow = 1;
}
else if (i > (ulonglong) LONGLONG_MAX)
overflow = 1;
if (overflow)
{
err[0]= ERANGE;
return negative ? LONGLONG_MIN : LONGLONG_MAX;
}
return (negative ? -((longlong) i) : (longlong) i);
noconv:
err[0]= EDOM;
if (endptr != NULL)
*endptr = (char *) nptr;
return 0L;
}
|
O0
|
c
|
my_strntoll_8bit:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movl %ecx, -0x24(%rbp)
movq %r8, -0x30(%rbp)
movq %r9, -0x38(%rbp)
movq -0x38(%rbp), %rax
movl $0x0, (%rax)
movq -0x18(%rbp), %rax
movq %rax, -0x60(%rbp)
movq -0x18(%rbp), %rax
addq -0x20(%rbp), %rax
movq %rax, -0x68(%rbp)
movq -0x60(%rbp), %rcx
xorl %eax, %eax
cmpq -0x68(%rbp), %rcx
movb %al, -0x76(%rbp)
jae 0x42418
movq -0x10(%rbp), %rax
movq 0x40(%rax), %rax
movq -0x60(%rbp), %rcx
movzbl (%rcx), %ecx
movzbl 0x1(%rax,%rcx), %eax
andl $0x8, %eax
cmpl $0x0, %eax
setne %al
movb %al, -0x76(%rbp)
movb -0x76(%rbp), %al
testb $0x1, %al
jne 0x42421
jmp 0x42431
jmp 0x42423
movq -0x60(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x60(%rbp)
jmp 0x423e9
movq -0x60(%rbp), %rax
cmpq -0x68(%rbp), %rax
jne 0x42440
jmp 0x42656
movq -0x60(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x2d, %eax
jne 0x42461
movl $0x1, -0x3c(%rbp)
movq -0x60(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x60(%rbp)
jmp 0x4248b
movq -0x60(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x2b, %eax
jne 0x42482
movl $0x0, -0x3c(%rbp)
movq -0x60(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x60(%rbp)
jmp 0x42489
movl $0x0, -0x3c(%rbp)
jmp 0x4248b
movq -0x60(%rbp), %rax
movq %rax, -0x70(%rbp)
movslq -0x24(%rbp), %rcx
movq $-0x1, %rax
xorl %edx, %edx
divq %rcx
movq %rax, -0x48(%rbp)
movslq -0x24(%rbp), %rcx
movq $-0x1, %rax
xorl %edx, %edx
divq %rcx
movl %edx, %eax
movl %eax, -0x4c(%rbp)
movl $0x0, -0x74(%rbp)
movq $0x0, -0x58(%rbp)
movq -0x60(%rbp), %rax
cmpq -0x68(%rbp), %rax
je 0x425a5
movq -0x60(%rbp), %rax
movb (%rax), %al
movb %al, -0x75(%rbp)
movzbl -0x75(%rbp), %eax
cmpl $0x30, %eax
jl 0x42500
movzbl -0x75(%rbp), %eax
cmpl $0x39, %eax
jg 0x42500
movzbl -0x75(%rbp), %eax
subl $0x30, %eax
movb %al, -0x75(%rbp)
jmp 0x42548
movzbl -0x75(%rbp), %eax
cmpl $0x41, %eax
jl 0x42521
movzbl -0x75(%rbp), %eax
cmpl $0x5a, %eax
jg 0x42521
movzbl -0x75(%rbp), %eax
subl $0x41, %eax
addl $0xa, %eax
movb %al, -0x75(%rbp)
jmp 0x42546
movzbl -0x75(%rbp), %eax
cmpl $0x61, %eax
jl 0x42542
movzbl -0x75(%rbp), %eax
cmpl $0x7a, %eax
jg 0x42542
movzbl -0x75(%rbp), %eax
subl $0x61, %eax
addl $0xa, %eax
movb %al, -0x75(%rbp)
jmp 0x42544
jmp 0x425a5
jmp 0x42546
jmp 0x42548
movzbl -0x75(%rbp), %eax
cmpl -0x24(%rbp), %eax
jl 0x42553
jmp 0x425a5
movq -0x58(%rbp), %rax
cmpq -0x48(%rbp), %rax
ja 0x42570
movq -0x58(%rbp), %rax
cmpq -0x48(%rbp), %rax
jne 0x42579
movzbl -0x75(%rbp), %eax
cmpl -0x4c(%rbp), %eax
jbe 0x42579
movl $0x1, -0x74(%rbp)
jmp 0x42592
movslq -0x24(%rbp), %rax
imulq -0x58(%rbp), %rax
movq %rax, -0x58(%rbp)
movzbl -0x75(%rbp), %eax
addq -0x58(%rbp), %rax
movq %rax, -0x58(%rbp)
jmp 0x42594
movq -0x60(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x60(%rbp)
jmp 0x424cb
movq -0x60(%rbp), %rax
cmpq -0x70(%rbp), %rax
jne 0x425b4
jmp 0x42656
cmpq $0x0, -0x30(%rbp)
je 0x425c6
movq -0x60(%rbp), %rcx
movq -0x30(%rbp), %rax
movq %rcx, (%rax)
cmpl $0x0, -0x3c(%rbp)
je 0x425e5
movabsq $-0x8000000000000000, %rax # imm = 0x8000000000000000
cmpq %rax, -0x58(%rbp)
jbe 0x425e3
movl $0x1, -0x74(%rbp)
jmp 0x425fe
movabsq $0x7fffffffffffffff, %rax # imm = 0x7FFFFFFFFFFFFFFF
cmpq %rax, -0x58(%rbp)
jbe 0x425fc
movl $0x1, -0x74(%rbp)
jmp 0x425fe
cmpl $0x0, -0x74(%rbp)
je 0x42632
movq -0x38(%rbp), %rax
movl $0x22, (%rax)
movl -0x3c(%rbp), %edx
movabsq $0x7fffffffffffffff, %rax # imm = 0x7FFFFFFFFFFFFFFF
movabsq $-0x8000000000000000, %rcx # imm = 0x8000000000000000
cmpl $0x0, %edx
cmovneq %rcx, %rax
movq %rax, -0x8(%rbp)
jmp 0x4267a
cmpl $0x0, -0x3c(%rbp)
je 0x42644
xorl %eax, %eax
subq -0x58(%rbp), %rax
movq %rax, -0x80(%rbp)
jmp 0x4264c
movq -0x58(%rbp), %rax
movq %rax, -0x80(%rbp)
movq -0x80(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x4267a
movq -0x38(%rbp), %rax
movl $0x21, (%rax)
cmpq $0x0, -0x30(%rbp)
je 0x42672
movq -0x18(%rbp), %rcx
movq -0x30(%rbp), %rax
movq %rcx, (%rax)
movq $0x0, -0x8(%rbp)
movq -0x8(%rbp), %rax
popq %rbp
retq
|
my_strntoll_8bit:
push rbp
mov rbp, rsp
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov [rbp+var_20], rdx
mov [rbp+var_24], ecx
mov [rbp+var_30], r8
mov [rbp+var_38], r9
mov rax, [rbp+var_38]
mov dword ptr [rax], 0
mov rax, [rbp+var_18]
mov [rbp+var_60], rax
mov rax, [rbp+var_18]
add rax, [rbp+var_20]
mov [rbp+var_68], rax
loc_423E9:
mov rcx, [rbp+var_60]
xor eax, eax
cmp rcx, [rbp+var_68]
mov [rbp+var_76], al
jnb short loc_42418
mov rax, [rbp+var_10]
mov rax, [rax+40h]
mov rcx, [rbp+var_60]
movzx ecx, byte ptr [rcx]
movzx eax, byte ptr [rax+rcx+1]
and eax, 8
cmp eax, 0
setnz al
mov [rbp+var_76], al
loc_42418:
mov al, [rbp+var_76]
test al, 1
jnz short loc_42421
jmp short loc_42431
loc_42421:
jmp short $+2
loc_42423:
mov rax, [rbp+var_60]
add rax, 1
mov [rbp+var_60], rax
jmp short loc_423E9
loc_42431:
mov rax, [rbp+var_60]
cmp rax, [rbp+var_68]
jnz short loc_42440
jmp loc_42656
loc_42440:
mov rax, [rbp+var_60]
movsx eax, byte ptr [rax]
cmp eax, 2Dh ; '-'
jnz short loc_42461
mov [rbp+var_3C], 1
mov rax, [rbp+var_60]
add rax, 1
mov [rbp+var_60], rax
jmp short loc_4248B
loc_42461:
mov rax, [rbp+var_60]
movsx eax, byte ptr [rax]
cmp eax, 2Bh ; '+'
jnz short loc_42482
mov [rbp+var_3C], 0
mov rax, [rbp+var_60]
add rax, 1
mov [rbp+var_60], rax
jmp short loc_42489
loc_42482:
mov [rbp+var_3C], 0
loc_42489:
jmp short $+2
loc_4248B:
mov rax, [rbp+var_60]
mov [rbp+var_70], rax
movsxd rcx, [rbp+var_24]
mov rax, 0FFFFFFFFFFFFFFFFh
xor edx, edx
div rcx
mov [rbp+var_48], rax
movsxd rcx, [rbp+var_24]
mov rax, 0FFFFFFFFFFFFFFFFh
xor edx, edx
div rcx
mov eax, edx
mov [rbp+var_4C], eax
mov [rbp+var_74], 0
mov [rbp+var_58], 0
loc_424CB:
mov rax, [rbp+var_60]
cmp rax, [rbp+var_68]
jz loc_425A5
mov rax, [rbp+var_60]
mov al, [rax]
mov [rbp+var_75], al
movzx eax, [rbp+var_75]
cmp eax, 30h ; '0'
jl short loc_42500
movzx eax, [rbp+var_75]
cmp eax, 39h ; '9'
jg short loc_42500
movzx eax, [rbp+var_75]
sub eax, 30h ; '0'
mov [rbp+var_75], al
jmp short loc_42548
loc_42500:
movzx eax, [rbp+var_75]
cmp eax, 41h ; 'A'
jl short loc_42521
movzx eax, [rbp+var_75]
cmp eax, 5Ah ; 'Z'
jg short loc_42521
movzx eax, [rbp+var_75]
sub eax, 41h ; 'A'
add eax, 0Ah
mov [rbp+var_75], al
jmp short loc_42546
loc_42521:
movzx eax, [rbp+var_75]
cmp eax, 61h ; 'a'
jl short loc_42542
movzx eax, [rbp+var_75]
cmp eax, 7Ah ; 'z'
jg short loc_42542
movzx eax, [rbp+var_75]
sub eax, 61h ; 'a'
add eax, 0Ah
mov [rbp+var_75], al
jmp short loc_42544
loc_42542:
jmp short loc_425A5
loc_42544:
jmp short $+2
loc_42546:
jmp short $+2
loc_42548:
movzx eax, [rbp+var_75]
cmp eax, [rbp+var_24]
jl short loc_42553
jmp short loc_425A5
loc_42553:
mov rax, [rbp+var_58]
cmp rax, [rbp+var_48]
ja short loc_42570
mov rax, [rbp+var_58]
cmp rax, [rbp+var_48]
jnz short loc_42579
movzx eax, [rbp+var_75]
cmp eax, [rbp+var_4C]
jbe short loc_42579
loc_42570:
mov [rbp+var_74], 1
jmp short loc_42592
loc_42579:
movsxd rax, [rbp+var_24]
imul rax, [rbp+var_58]
mov [rbp+var_58], rax
movzx eax, [rbp+var_75]
add rax, [rbp+var_58]
mov [rbp+var_58], rax
loc_42592:
jmp short $+2
loc_42594:
mov rax, [rbp+var_60]
add rax, 1
mov [rbp+var_60], rax
jmp loc_424CB
loc_425A5:
mov rax, [rbp+var_60]
cmp rax, [rbp+var_70]
jnz short loc_425B4
jmp loc_42656
loc_425B4:
cmp [rbp+var_30], 0
jz short loc_425C6
mov rcx, [rbp+var_60]
mov rax, [rbp+var_30]
mov [rax], rcx
loc_425C6:
cmp [rbp+var_3C], 0
jz short loc_425E5
mov rax, 8000000000000000h
cmp [rbp+var_58], rax
jbe short loc_425E3
mov [rbp+var_74], 1
loc_425E3:
jmp short loc_425FE
loc_425E5:
mov rax, 7FFFFFFFFFFFFFFFh
cmp [rbp+var_58], rax
jbe short loc_425FC
mov [rbp+var_74], 1
loc_425FC:
jmp short $+2
loc_425FE:
cmp [rbp+var_74], 0
jz short loc_42632
mov rax, [rbp+var_38]
mov dword ptr [rax], 22h ; '"'
mov edx, [rbp+var_3C]
mov rax, 7FFFFFFFFFFFFFFFh
mov rcx, 8000000000000000h
cmp edx, 0
cmovnz rax, rcx
mov [rbp+var_8], rax
jmp short loc_4267A
loc_42632:
cmp [rbp+var_3C], 0
jz short loc_42644
xor eax, eax
sub rax, [rbp+var_58]
mov [rbp+var_80], rax
jmp short loc_4264C
loc_42644:
mov rax, [rbp+var_58]
mov [rbp+var_80], rax
loc_4264C:
mov rax, [rbp+var_80]
mov [rbp+var_8], rax
jmp short loc_4267A
loc_42656:
mov rax, [rbp+var_38]
mov dword ptr [rax], 21h ; '!'
cmp [rbp+var_30], 0
jz short loc_42672
mov rcx, [rbp+var_18]
mov rax, [rbp+var_30]
mov [rax], rcx
loc_42672:
mov [rbp+var_8], 0
loc_4267A:
mov rax, [rbp+var_8]
pop rbp
retn
|
unsigned long long my_strntoll_8bit(long long a1, _BYTE *a2, long long a3, int a4, _QWORD *a5, _DWORD *a6)
{
long long v6; // rax
bool v9; // [rsp+Ah] [rbp-76h]
unsigned __int8 v10; // [rsp+Bh] [rbp-75h]
unsigned __int8 v11; // [rsp+Bh] [rbp-75h]
int v12; // [rsp+Ch] [rbp-74h]
_BYTE *v13; // [rsp+10h] [rbp-70h]
_BYTE *v14; // [rsp+18h] [rbp-68h]
_BYTE *v15; // [rsp+20h] [rbp-60h]
unsigned long long v16; // [rsp+28h] [rbp-58h]
unsigned long long v17; // [rsp+38h] [rbp-48h]
int v18; // [rsp+44h] [rbp-3Ch]
*a6 = 0;
v15 = a2;
v14 = &a2[a3];
while ( 1 )
{
v9 = 0;
if ( v15 < v14 )
v9 = (*(_BYTE *)(*(_QWORD *)(a1 + 64) + (unsigned __int8)*v15 + 1LL) & 8) != 0;
if ( !v9 )
break;
++v15;
}
if ( v15 == v14 )
goto LABEL_47;
if ( *v15 == 45 )
{
v18 = 1;
++v15;
}
else
{
v18 = 0;
if ( *v15 == 43 )
++v15;
}
v13 = v15;
v17 = 0xFFFFFFFFFFFFFFFFLL / a4;
v12 = 0;
v16 = 0LL;
while ( v15 != v14 )
{
v10 = *v15;
if ( (unsigned __int8)*v15 < 0x30u || v10 > 0x39u )
{
if ( v10 < 0x41u || v10 > 0x5Au )
{
if ( v10 < 0x61u || v10 > 0x7Au )
break;
v11 = v10 - 97 + 10;
}
else
{
v11 = v10 - 65 + 10;
}
}
else
{
v11 = v10 - 48;
}
if ( v11 >= a4 )
break;
if ( v16 > v17 || v16 == v17 && v11 > (unsigned int)(0xFFFFFFFFFFFFFFFFLL % a4) )
v12 = 1;
else
v16 = v16 * a4 + v11;
++v15;
}
if ( v15 == v13 )
{
LABEL_47:
*a6 = 33;
if ( a5 )
*a5 = a2;
return 0LL;
}
else
{
if ( a5 )
*a5 = v15;
if ( v18 )
{
if ( v16 > 0x8000000000000000LL )
v12 = 1;
}
else if ( v16 > 0x7FFFFFFFFFFFFFFFLL )
{
v12 = 1;
}
if ( v12 )
{
*a6 = 34;
v6 = 0x7FFFFFFFFFFFFFFFLL;
if ( v18 )
return 0x8000000000000000LL;
return v6;
}
else if ( v18 )
{
return -(long long)v16;
}
else
{
return v16;
}
}
}
|
my_strntoll_8bit:
PUSH RBP
MOV RBP,RSP
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x18],RSI
MOV qword ptr [RBP + -0x20],RDX
MOV dword ptr [RBP + -0x24],ECX
MOV qword ptr [RBP + -0x30],R8
MOV qword ptr [RBP + -0x38],R9
MOV RAX,qword ptr [RBP + -0x38]
MOV dword ptr [RAX],0x0
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RBP + -0x60],RAX
MOV RAX,qword ptr [RBP + -0x18]
ADD RAX,qword ptr [RBP + -0x20]
MOV qword ptr [RBP + -0x68],RAX
LAB_001423e9:
MOV RCX,qword ptr [RBP + -0x60]
XOR EAX,EAX
CMP RCX,qword ptr [RBP + -0x68]
MOV byte ptr [RBP + -0x76],AL
JNC 0x00142418
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x40]
MOV RCX,qword ptr [RBP + -0x60]
MOVZX ECX,byte ptr [RCX]
MOVZX EAX,byte ptr [RAX + RCX*0x1 + 0x1]
AND EAX,0x8
CMP EAX,0x0
SETNZ AL
MOV byte ptr [RBP + -0x76],AL
LAB_00142418:
MOV AL,byte ptr [RBP + -0x76]
TEST AL,0x1
JNZ 0x00142421
JMP 0x00142431
LAB_00142421:
JMP 0x00142423
LAB_00142423:
MOV RAX,qword ptr [RBP + -0x60]
ADD RAX,0x1
MOV qword ptr [RBP + -0x60],RAX
JMP 0x001423e9
LAB_00142431:
MOV RAX,qword ptr [RBP + -0x60]
CMP RAX,qword ptr [RBP + -0x68]
JNZ 0x00142440
JMP 0x00142656
LAB_00142440:
MOV RAX,qword ptr [RBP + -0x60]
MOVSX EAX,byte ptr [RAX]
CMP EAX,0x2d
JNZ 0x00142461
MOV dword ptr [RBP + -0x3c],0x1
MOV RAX,qword ptr [RBP + -0x60]
ADD RAX,0x1
MOV qword ptr [RBP + -0x60],RAX
JMP 0x0014248b
LAB_00142461:
MOV RAX,qword ptr [RBP + -0x60]
MOVSX EAX,byte ptr [RAX]
CMP EAX,0x2b
JNZ 0x00142482
MOV dword ptr [RBP + -0x3c],0x0
MOV RAX,qword ptr [RBP + -0x60]
ADD RAX,0x1
MOV qword ptr [RBP + -0x60],RAX
JMP 0x00142489
LAB_00142482:
MOV dword ptr [RBP + -0x3c],0x0
LAB_00142489:
JMP 0x0014248b
LAB_0014248b:
MOV RAX,qword ptr [RBP + -0x60]
MOV qword ptr [RBP + -0x70],RAX
MOVSXD RCX,dword ptr [RBP + -0x24]
MOV RAX,-0x1
XOR EDX,EDX
DIV RCX
MOV qword ptr [RBP + -0x48],RAX
MOVSXD RCX,dword ptr [RBP + -0x24]
MOV RAX,-0x1
XOR EDX,EDX
DIV RCX
MOV EAX,EDX
MOV dword ptr [RBP + -0x4c],EAX
MOV dword ptr [RBP + -0x74],0x0
MOV qword ptr [RBP + -0x58],0x0
LAB_001424cb:
MOV RAX,qword ptr [RBP + -0x60]
CMP RAX,qword ptr [RBP + -0x68]
JZ 0x001425a5
MOV RAX,qword ptr [RBP + -0x60]
MOV AL,byte ptr [RAX]
MOV byte ptr [RBP + -0x75],AL
MOVZX EAX,byte ptr [RBP + -0x75]
CMP EAX,0x30
JL 0x00142500
MOVZX EAX,byte ptr [RBP + -0x75]
CMP EAX,0x39
JG 0x00142500
MOVZX EAX,byte ptr [RBP + -0x75]
SUB EAX,0x30
MOV byte ptr [RBP + -0x75],AL
JMP 0x00142548
LAB_00142500:
MOVZX EAX,byte ptr [RBP + -0x75]
CMP EAX,0x41
JL 0x00142521
MOVZX EAX,byte ptr [RBP + -0x75]
CMP EAX,0x5a
JG 0x00142521
MOVZX EAX,byte ptr [RBP + -0x75]
SUB EAX,0x41
ADD EAX,0xa
MOV byte ptr [RBP + -0x75],AL
JMP 0x00142546
LAB_00142521:
MOVZX EAX,byte ptr [RBP + -0x75]
CMP EAX,0x61
JL 0x00142542
MOVZX EAX,byte ptr [RBP + -0x75]
CMP EAX,0x7a
JG 0x00142542
MOVZX EAX,byte ptr [RBP + -0x75]
SUB EAX,0x61
ADD EAX,0xa
MOV byte ptr [RBP + -0x75],AL
JMP 0x00142544
LAB_00142542:
JMP 0x001425a5
LAB_00142544:
JMP 0x00142546
LAB_00142546:
JMP 0x00142548
LAB_00142548:
MOVZX EAX,byte ptr [RBP + -0x75]
CMP EAX,dword ptr [RBP + -0x24]
JL 0x00142553
JMP 0x001425a5
LAB_00142553:
MOV RAX,qword ptr [RBP + -0x58]
CMP RAX,qword ptr [RBP + -0x48]
JA 0x00142570
MOV RAX,qword ptr [RBP + -0x58]
CMP RAX,qword ptr [RBP + -0x48]
JNZ 0x00142579
MOVZX EAX,byte ptr [RBP + -0x75]
CMP EAX,dword ptr [RBP + -0x4c]
JBE 0x00142579
LAB_00142570:
MOV dword ptr [RBP + -0x74],0x1
JMP 0x00142592
LAB_00142579:
MOVSXD RAX,dword ptr [RBP + -0x24]
IMUL RAX,qword ptr [RBP + -0x58]
MOV qword ptr [RBP + -0x58],RAX
MOVZX EAX,byte ptr [RBP + -0x75]
ADD RAX,qword ptr [RBP + -0x58]
MOV qword ptr [RBP + -0x58],RAX
LAB_00142592:
JMP 0x00142594
LAB_00142594:
MOV RAX,qword ptr [RBP + -0x60]
ADD RAX,0x1
MOV qword ptr [RBP + -0x60],RAX
JMP 0x001424cb
LAB_001425a5:
MOV RAX,qword ptr [RBP + -0x60]
CMP RAX,qword ptr [RBP + -0x70]
JNZ 0x001425b4
JMP 0x00142656
LAB_001425b4:
CMP qword ptr [RBP + -0x30],0x0
JZ 0x001425c6
MOV RCX,qword ptr [RBP + -0x60]
MOV RAX,qword ptr [RBP + -0x30]
MOV qword ptr [RAX],RCX
LAB_001425c6:
CMP dword ptr [RBP + -0x3c],0x0
JZ 0x001425e5
MOV RAX,-0x8000000000000000
CMP qword ptr [RBP + -0x58],RAX
JBE 0x001425e3
MOV dword ptr [RBP + -0x74],0x1
LAB_001425e3:
JMP 0x001425fe
LAB_001425e5:
MOV RAX,0x7fffffffffffffff
CMP qword ptr [RBP + -0x58],RAX
JBE 0x001425fc
MOV dword ptr [RBP + -0x74],0x1
LAB_001425fc:
JMP 0x001425fe
LAB_001425fe:
CMP dword ptr [RBP + -0x74],0x0
JZ 0x00142632
MOV RAX,qword ptr [RBP + -0x38]
MOV dword ptr [RAX],0x22
MOV EDX,dword ptr [RBP + -0x3c]
MOV RAX,0x7fffffffffffffff
MOV RCX,-0x8000000000000000
CMP EDX,0x0
CMOVNZ RAX,RCX
MOV qword ptr [RBP + -0x8],RAX
JMP 0x0014267a
LAB_00142632:
CMP dword ptr [RBP + -0x3c],0x0
JZ 0x00142644
XOR EAX,EAX
SUB RAX,qword ptr [RBP + -0x58]
MOV qword ptr [RBP + -0x80],RAX
JMP 0x0014264c
LAB_00142644:
MOV RAX,qword ptr [RBP + -0x58]
MOV qword ptr [RBP + -0x80],RAX
LAB_0014264c:
MOV RAX,qword ptr [RBP + -0x80]
MOV qword ptr [RBP + -0x8],RAX
JMP 0x0014267a
LAB_00142656:
MOV RAX,qword ptr [RBP + -0x38]
MOV dword ptr [RAX],0x21
CMP qword ptr [RBP + -0x30],0x0
JZ 0x00142672
MOV RCX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RBP + -0x30]
MOV qword ptr [RAX],RCX
LAB_00142672:
MOV qword ptr [RBP + -0x8],0x0
LAB_0014267a:
MOV RAX,qword ptr [RBP + -0x8]
POP RBP
RET
|
ulong my_strntoll_8bit(long param_1,byte *param_2,long param_3,int param_4,int8 *param_5,
int4 *param_6)
{
int1 auVar1 [16];
int1 auVar2 [16];
bool bVar3;
byte *pbVar4;
byte *pbVar5;
ulong uVar6;
bool bVar7;
ulong local_88;
byte local_7d;
byte *local_68;
ulong local_60;
*param_6 = 0;
pbVar5 = param_2 + param_3;
local_68 = param_2;
while( true ) {
bVar7 = false;
if (local_68 < pbVar5) {
bVar7 = (*(byte *)(*(long *)(param_1 + 0x40) + 1 + (ulong)*local_68) & 8) != 0;
}
if (!bVar7) break;
local_68 = local_68 + 1;
}
if (local_68 != pbVar5) {
if (*local_68 == 0x2d) {
bVar7 = true;
local_68 = local_68 + 1;
}
else {
if (*local_68 == 0x2b) {
local_68 = local_68 + 1;
}
bVar7 = false;
}
pbVar4 = local_68;
auVar1._8_8_ = 0;
auVar1._0_8_ = (long)param_4;
uVar6 = SUB168((ZEXT816(0) << 0x40 | ZEXT816(0xffffffffffffffff)) / auVar1,0);
auVar2._8_8_ = 0;
auVar2._0_8_ = (long)param_4;
bVar3 = false;
local_60 = 0;
for (; local_68 != pbVar5; local_68 = local_68 + 1) {
local_7d = *local_68;
if ((local_7d < 0x30) || (0x39 < local_7d)) {
if ((local_7d < 0x41) || (0x5a < local_7d)) {
if ((local_7d < 0x61) || (0x7a < local_7d)) break;
local_7d = local_7d + 0xa9;
}
else {
local_7d = local_7d - 0x37;
}
}
else {
local_7d = local_7d - 0x30;
}
if (param_4 <= (int)(uint)local_7d) break;
if ((uVar6 < local_60) ||
((local_60 == uVar6 &&
(SUB164((ZEXT816(0) << 0x40 | ZEXT816(0xffffffffffffffff)) % auVar2,0) < (uint)local_7d)))
) {
bVar3 = true;
}
else {
local_60 = (ulong)local_7d + (long)param_4 * local_60;
}
}
if (local_68 != pbVar4) {
if (param_5 != (int8 *)0x0) {
*param_5 = local_68;
}
if (bVar7) {
if (0x8000000000000000 < local_60) {
bVar3 = true;
}
}
else if (0x7fffffffffffffff < local_60) {
bVar3 = true;
}
if (bVar3) {
*param_6 = 0x22;
if (!bVar7) {
return 0x7fffffffffffffff;
}
return 0x8000000000000000;
}
if (bVar7) {
local_88 = -local_60;
}
else {
local_88 = local_60;
}
return local_88;
}
}
*param_6 = 0x21;
if (param_5 != (int8 *)0x0) {
*param_5 = param_2;
}
return 0;
}
|
|
57,259
|
mariadb_server_version_id
|
eloqsql/libmariadb/libmariadb/mariadb_lib.c
|
static size_t mariadb_server_version_id(MYSQL *mysql)
{
size_t major, minor, patch;
char *p;
if (!(p = mysql->server_version)) {
return 0;
}
major = strtol(p, &p, 10);
p += 1; /* consume the dot */
minor = strtol(p, &p, 10);
p += 1; /* consume the dot */
patch = strtol(p, &p, 10);
return (major * 10000L + (unsigned long)(minor * 100L + patch));
}
|
O3
|
c
|
mariadb_server_version_id:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, -0x20(%rbp)
testq %rdi, %rdi
je 0x1f771
leaq -0x20(%rbp), %rbx
movq %rbx, %rsi
movl $0xa, %edx
callq 0x13650
movq %rax, %r14
movq (%rbx), %rdi
incq %rdi
movq %rdi, (%rbx)
movq %rbx, %rsi
movl $0xa, %edx
callq 0x13650
movq %rax, %r15
movq (%rbx), %rdi
incq %rdi
movq %rdi, (%rbx)
movq %rbx, %rsi
movl $0xa, %edx
callq 0x13650
movq %rax, %rcx
imulq $0x2710, %r14, %rax # imm = 0x2710
imulq $0x64, %r15, %rdx
addq %rcx, %rax
addq %rdx, %rax
jmp 0x1f773
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
|
mariadb_server_version_id:
push rbp
mov rbp, rsp
push r15
push r14
push rbx
push rax
mov [rbp+var_20], rdi
test rdi, rdi
jz short loc_1F771
lea rbx, [rbp+var_20]
mov rsi, rbx
mov edx, 0Ah
call _strtol
mov r14, rax
mov rdi, [rbx]
inc rdi
mov [rbx], rdi
mov rsi, rbx
mov edx, 0Ah
call _strtol
mov r15, rax
mov rdi, [rbx]
inc rdi
mov [rbx], rdi
mov rsi, rbx
mov edx, 0Ah
call _strtol
mov rcx, rax
imul rax, r14, 2710h
imul rdx, r15, 64h ; 'd'
add rax, rcx
add rax, rdx
jmp short loc_1F773
loc_1F771:
xor eax, eax
loc_1F773:
add rsp, 8
pop rbx
pop r14
pop r15
pop rbp
retn
|
long long mariadb_server_version_id(long long a1)
{
long long v1; // r14
long long v2; // r15
_QWORD v4[4]; // [rsp+0h] [rbp-20h] BYREF
v4[0] = a1;
if ( !a1 )
return 0LL;
v1 = strtol(a1, v4, 10LL);
v2 = strtol(++v4[0], v4, 10LL);
return 100 * v2 + strtol(v4[0] + 1LL, v4, 10LL) + 10000 * v1;
}
|
mariadb_server_version_id:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH RBX
PUSH RAX
MOV qword ptr [RBP + -0x20],RDI
TEST RDI,RDI
JZ 0x0011f771
LEA RBX,[RBP + -0x20]
MOV RSI,RBX
MOV EDX,0xa
CALL 0x00113650
MOV R14,RAX
MOV RDI,qword ptr [RBX]
INC RDI
MOV qword ptr [RBX],RDI
MOV RSI,RBX
MOV EDX,0xa
CALL 0x00113650
MOV R15,RAX
MOV RDI,qword ptr [RBX]
INC RDI
MOV qword ptr [RBX],RDI
MOV RSI,RBX
MOV EDX,0xa
CALL 0x00113650
MOV RCX,RAX
IMUL RAX,R14,0x2710
IMUL RDX,R15,0x64
ADD RAX,RCX
ADD RAX,RDX
JMP 0x0011f773
LAB_0011f771:
XOR EAX,EAX
LAB_0011f773:
ADD RSP,0x8
POP RBX
POP R14
POP R15
POP RBP
RET
|
long mariadb_server_version_id(char *param_1)
{
long lVar1;
long lVar2;
long lVar3;
char *local_28;
if (param_1 == (char *)0x0) {
lVar1 = 0;
}
else {
local_28 = param_1;
lVar1 = strtol(param_1,&local_28,10);
local_28 = local_28 + 1;
lVar2 = strtol(local_28,&local_28,10);
local_28 = local_28 + 1;
lVar3 = strtol(local_28,&local_28,10);
lVar1 = lVar1 * 10000 + lVar3 + lVar2 * 100;
}
return lVar1;
}
|
|
57,260
|
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>::find<char const (&) [12], 0>(char const (&) [12]) const
|
monkey531[P]llama/common/./json.hpp
|
const_iterator find(KeyType && key) const
{
auto result = cend();
if (is_object())
{
result.m_it.object_iterator = m_data.m_value.object->find(std::forward<KeyType>(key));
}
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> 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>::find<char const (&) [12], 0>(char const (&) [12]) const:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %rbx
callq 0x7bada
cmpb $0x1, (%r15)
jne 0x89b14
movq 0x8(%r15), %r12
movq (%r12), %r15
movq 0x8(%r12), %rax
cmpq %rax, %r15
je 0x89b10
movq %r15, %rdi
movq %r14, %rsi
callq 0x1f2b0
testl %eax, %eax
je 0x89b0d
addq $0x30, %r15
jmp 0x89aee
movq %r15, %rax
movq %rax, 0x8(%rbx)
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
nop
|
_ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4findIRA12_KcTnNSt9enable_ifIXsr6detail32is_usable_as_basic_json_key_typeISD_T_EE5valueEiE4typeELi0EEENS0_6detail9iter_implIKSD_EEOSJ_:
push r15
push r14
push r12
push rbx
push rax
mov r14, rdx
mov r15, rsi
mov rbx, rdi
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4cendEv; 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>::cend(void)
cmp byte ptr [r15], 1
jnz short loc_89B14
mov r12, [r15+8]
mov r15, [r12]
loc_89AEE:
mov rax, [r12+8]
cmp r15, rax
jz short loc_89B10
mov rdi, r15
mov rsi, r14
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7compareEPKc; std::string::compare(char const*)
test eax, eax
jz short loc_89B0D
add r15, 30h ; '0'
jmp short loc_89AEE
loc_89B0D:
mov rax, r15
loc_89B10:
mov [rbx+8], rax
loc_89B14:
mov rax, rbx
add rsp, 8
pop rbx
pop r12
pop r14
pop r15
retn
|
long long ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4findIRA12_KcTnNSt9enable_ifIXsr6detail32is_usable_as_basic_json_key_typeISD_T_EE5valueEiE4typeELi0EEENS0_6detail9iter_implIKSD_EEOSJ_(
long long a1,
long long a2,
long long a3)
{
long long *v4; // r12
long long i; // r15
long long v6; // rax
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::cend(
a1,
(unsigned __int8 *)a2);
if ( *(_BYTE *)a2 == 1 )
{
v4 = *(long long **)(a2 + 8);
for ( i = *v4; ; i += 48LL )
{
v6 = v4[1];
if ( i == v6 )
break;
if ( !(unsigned int)std::string::compare(i, a3) )
{
v6 = i;
break;
}
}
*(_QWORD *)(a1 + 8) = v6;
}
return a1;
}
|
_ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4findIRA12_KcTnNSt9enable_ifIXsr6detail32is_usable_as_basic_json_key_typeISD_T_EE5valueEiE4typeELi0EEENS0_6detail9iter_implIKSD_EEOSJ_:
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
PUSH RAX
MOV R14,RDX
MOV R15,RSI
MOV RBX,RDI
CALL 0x0017bada
CMP byte ptr [R15],0x1
JNZ 0x00189b14
MOV R12,qword ptr [R15 + 0x8]
MOV R15,qword ptr [R12]
LAB_00189aee:
MOV RAX,qword ptr [R12 + 0x8]
CMP R15,RAX
JZ 0x00189b10
MOV RDI,R15
MOV RSI,R14
CALL 0x0011f2b0
TEST EAX,EAX
JZ 0x00189b0d
ADD R15,0x30
JMP 0x00189aee
LAB_00189b0d:
MOV RAX,R15
LAB_00189b10:
MOV qword ptr [RBX + 0x8],RAX
LAB_00189b14:
MOV RAX,RBX
ADD RSP,0x8
POP RBX
POP R12
POP R14
POP R15
RET
|
long _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4findIRA12_KcTnNSt9enable_ifIXsr6detail32is_usable_as_basic_json_key_typeISD_T_EE5valueEiE4typeELi0EEENS0_6detail9iter_implIKSD_EEOSJ_
(long param_1,char *param_2)
{
int8 *puVar1;
int iVar2;
char *pcVar3;
char *pcVar4;
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>
::cend();
if (*param_2 == '\x01') {
puVar1 = *(int8 **)(param_2 + 8);
pcVar4 = (char *)*puVar1;
while ((pcVar3 = (char *)puVar1[1], pcVar4 != pcVar3 &&
(iVar2 = std::__cxx11::string::compare(pcVar4), pcVar3 = pcVar4, iVar2 != 0))) {
pcVar4 = pcVar4 + 0x30;
}
*(char **)(param_1 + 8) = pcVar3;
}
return param_1;
}
|
|
57,261
|
extend_area_on_page
|
eloqsql/storage/maria/ma_blockrec.c
|
static my_bool extend_area_on_page(MARIA_HA *info,
uchar *buff, uchar *dir,
uint rownr,
uint request_length,
uint *empty_space, uint *ret_offset,
uint *ret_length,
my_bool head_page)
{
uint rec_offset, length, org_rec_length;
uint max_entry= (uint) buff[DIR_COUNT_OFFSET];
MARIA_SHARE *share= info->s;
uint block_size= share->block_size;
DBUG_ENTER("extend_area_on_page");
/*
We can't check for min length here as we may have called
extend_directory() to create a new (empty) entry just before
*/
check_directory(share, buff, block_size, 0, *empty_space);
rec_offset= uint2korr(dir);
if (rec_offset)
{
/* Extending old row; Mark current space as 'free' */
length= org_rec_length= uint2korr(dir + 2);
DBUG_PRINT("info", ("rec_offset: %u length: %u request_length: %u "
"empty_space: %u",
rec_offset, org_rec_length, request_length,
*empty_space));
*empty_space+= org_rec_length;
}
else
{
/* Reusing free directory entry; Free it from the directory list */
if (dir[2] == END_OF_DIR_FREE_LIST)
buff[DIR_FREE_OFFSET]= dir[3];
else
{
uchar *prev_dir= dir_entry_pos(buff, block_size, (uint) dir[2]);
DBUG_ASSERT(uint2korr(prev_dir) == 0 && prev_dir[3] == (uchar) rownr);
prev_dir[3]= dir[3];
}
if (dir[3] != END_OF_DIR_FREE_LIST)
{
uchar *next_dir= dir_entry_pos(buff, block_size, (uint) dir[3]);
DBUG_ASSERT(uint2korr(next_dir) == 0 && next_dir[2] == (uchar) rownr);
next_dir[2]= dir[2];
}
rec_offset= start_of_next_entry(dir);
length= 0;
}
if (length < request_length)
{
uint old_rec_offset;
/*
New data did not fit in old position.
Find first possible position where to put new data.
*/
old_rec_offset= rec_offset;
rec_offset= end_of_previous_entry(share,
dir, buff + block_size -
PAGE_SUFFIX_SIZE);
length+= (uint) (old_rec_offset - rec_offset);
DBUG_ASSERT(old_rec_offset);
/*
'length' is 0 if we are doing an insert into a not allocated block.
This can only happen during "REDO of INSERT" or "UNDO of DELETE."
*/
if (length < request_length)
{
/*
Did not fit in current block + empty space. Extend with
empty space after block.
*/
if (rownr == max_entry - 1)
{
/* Last entry; Everything is free between this and directory */
length= ((block_size - PAGE_SUFFIX_SIZE - DIR_ENTRY_SIZE * max_entry) -
rec_offset);
}
else
length= start_of_next_entry(dir) - rec_offset;
DBUG_ASSERT((int) length >= 0);
if (length < request_length)
{
/* Not enough continuous space, compact page to get more */
int2store(dir, rec_offset);
/* Reset length, as this may be a deleted block */
int2store(dir+2, 0);
_ma_compact_block_page(share,
buff, rownr, 1,
head_page ? info->trn->min_read_from: 0,
head_page ? share->base.min_block_length : 0);
rec_offset= uint2korr(dir);
length= uint2korr(dir+2);
if (length < request_length)
{
DBUG_PRINT("error", ("Not enough space: "
"length: %u request_length: %u",
length, request_length));
_ma_set_fatal_error(info, HA_ERR_WRONG_IN_RECORD);
DBUG_RETURN(1); /* Error in block */
}
*empty_space= length; /* All space is here */
}
}
}
int2store(dir, rec_offset);
int2store(dir + 2, length);
*ret_offset= rec_offset;
*ret_length= length;
check_directory(share,
buff, block_size,
head_page ? share->base.min_block_length : 0,
*empty_space - length);
DBUG_RETURN(0);
}
|
O3
|
c
|
extend_area_on_page:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %r9, %r14
movl %r8d, %r12d
movq %rdx, %rbx
movq %rdi, %r15
movzbl 0x8(%rsi), %edx
movq (%rdi), %rdi
movl 0x7bc(%rdi), %eax
movzwl (%rbx), %r9d
testw %r9w, %r9w
je 0x4e4dd
movzwl 0x2(%rbx), %r8d
addl %r8d, (%r14)
jmp 0x4e545
movzbl 0x2(%rbx), %r8d
cmpq $0xff, %r8
je 0x4e500
leaq (%rsi,%rax), %r9
shll $0x2, %r8d
subq %r8, %r9
movb 0x3(%rbx), %r8b
movb %r8b, -0x5(%r9)
jmp 0x4e508
movb 0x3(%rbx), %r8b
movb %r8b, 0x9(%rsi)
cmpb $-0x1, %r8b
je 0x4e525
leaq (%rsi,%rax), %r9
movzbl %r8b, %r8d
shll $0x2, %r8d
subq %r8, %r9
movb 0x2(%rbx), %r8b
movb %r8b, -0x6(%r9)
leaq -0x3(%rbx), %r9
movq %r9, %r8
cmpb $0x0, -0x1(%r9)
jne 0x4e53d
leaq -0x4(%r8), %r9
cmpb $0x0, (%r8)
je 0x4e529
movzwl -0x1(%r8), %r9d
xorl %r8d, %r8d
movzwl %r9w, %r11d
cmpl %r12d, %r8d
jae 0x4e5f1
leaq (%rsi,%rax), %r13
addq $-0x4, %r13
leaq 0x4(%rbx), %r10
cmpq %r13, %r10
jae 0x4e57a
movzwl (%r10), %r9d
addq $0x4, %r10
testl %r9d, %r9d
je 0x4e55e
movzwl -0x2(%r10), %r10d
addl %r9d, %r10d
jmp 0x4e585
movl 0xc18(%rdi), %r10d
addl $0xc, %r10d
subl %r10d, %r11d
addl %r11d, %r8d
cmpl %r12d, %r8d
jae 0x4e5ee
leal -0x1(%rdx), %r8d
cmpl %ecx, %r8d
jne 0x4e5a7
leal (%r10,%rdx,4), %edx
subl %edx, %eax
addl $-0x4, %eax
movl %eax, %r8d
jmp 0x4e5c5
leaq -0x3(%rbx), %rdx
movq %rdx, %rax
cmpb $0x0, -0x1(%rdx)
jne 0x4e5bd
leaq -0x4(%rax), %rdx
cmpb $0x0, (%rax)
je 0x4e5ab
movzwl -0x1(%rax), %r8d
subl %r10d, %r8d
cmpl %r12d, %r8d
jae 0x4e5ee
movw %r10w, (%rbx)
movw $0x0, 0x2(%rbx)
cmpb $0x0, 0x20(%rbp)
je 0x4e619
movq 0x8(%r15), %rax
movq 0x80(%rax), %r8
movl 0x3b8(%rdi), %r9d
jmp 0x4e61f
movl %r10d, %r11d
movq 0x18(%rbp), %rax
movq 0x10(%rbp), %rcx
movw %r11w, (%rbx)
movw %r8w, 0x2(%rbx)
movl %r11d, (%rcx)
movl %r8d, (%rax)
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
xorl %r8d, %r8d
xorl %r9d, %r9d
movl %ecx, %edx
movl $0x1, %ecx
callq 0x4af34
movzwl 0x2(%rbx), %r8d
cmpl %r12d, %r8d
jae 0x4e646
movq %r15, %rdi
movl $0x7f, %esi
callq 0x4056c
movb $0x1, %al
jmp 0x4e60a
movzwl (%rbx), %r11d
movl %r8d, (%r14)
jmp 0x4e5f1
|
extend_area_on_page:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
push rax
mov r14, r9
mov r12d, r8d
mov rbx, rdx
mov r15, rdi
movzx edx, byte ptr [rsi+8]
mov rdi, [rdi]
mov eax, [rdi+7BCh]
movzx r9d, word ptr [rbx]
test r9w, r9w
jz short loc_4E4DD
movzx r8d, word ptr [rbx+2]
add [r14], r8d
jmp short loc_4E545
loc_4E4DD:
movzx r8d, byte ptr [rbx+2]
cmp r8, 0FFh
jz short loc_4E500
lea r9, [rsi+rax]
shl r8d, 2
sub r9, r8
mov r8b, [rbx+3]
mov [r9-5], r8b
jmp short loc_4E508
loc_4E500:
mov r8b, [rbx+3]
mov [rsi+9], r8b
loc_4E508:
cmp r8b, 0FFh
jz short loc_4E525
lea r9, [rsi+rax]
movzx r8d, r8b
shl r8d, 2
sub r9, r8
mov r8b, [rbx+2]
mov [r9-6], r8b
loc_4E525:
lea r9, [rbx-3]
loc_4E529:
mov r8, r9
cmp byte ptr [r9-1], 0
jnz short loc_4E53D
lea r9, [r8-4]
cmp byte ptr [r8], 0
jz short loc_4E529
loc_4E53D:
movzx r9d, word ptr [r8-1]
xor r8d, r8d
loc_4E545:
movzx r11d, r9w
cmp r8d, r12d
jnb loc_4E5F1
lea r13, [rsi+rax]
add r13, 0FFFFFFFFFFFFFFFCh
lea r10, [rbx+4]
loc_4E55E:
cmp r10, r13
jnb short loc_4E57A
movzx r9d, word ptr [r10]
add r10, 4
test r9d, r9d
jz short loc_4E55E
movzx r10d, word ptr [r10-2]
add r10d, r9d
jmp short loc_4E585
loc_4E57A:
mov r10d, [rdi+0C18h]
add r10d, 0Ch
loc_4E585:
sub r11d, r10d
add r8d, r11d
cmp r8d, r12d
jnb short loc_4E5EE
lea r8d, [rdx-1]
cmp r8d, ecx
jnz short loc_4E5A7
lea edx, [r10+rdx*4]
sub eax, edx
add eax, 0FFFFFFFCh
mov r8d, eax
jmp short loc_4E5C5
loc_4E5A7:
lea rdx, [rbx-3]
loc_4E5AB:
mov rax, rdx
cmp byte ptr [rdx-1], 0
jnz short loc_4E5BD
lea rdx, [rax-4]
cmp byte ptr [rax], 0
jz short loc_4E5AB
loc_4E5BD:
movzx r8d, word ptr [rax-1]
sub r8d, r10d
loc_4E5C5:
cmp r8d, r12d
jnb short loc_4E5EE
mov [rbx], r10w
mov word ptr [rbx+2], 0
cmp [rbp+arg_10], 0
jz short loc_4E619
mov rax, [r15+8]
mov r8, [rax+80h]
mov r9d, [rdi+3B8h]
jmp short loc_4E61F
loc_4E5EE:
mov r11d, r10d
loc_4E5F1:
mov rax, [rbp+arg_8]
mov rcx, [rbp+arg_0]
mov [rbx], r11w
mov [rbx+2], r8w
mov [rcx], r11d
mov [rax], r8d
xor eax, eax
loc_4E60A:
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_4E619:
xor r8d, r8d
xor r9d, r9d
loc_4E61F:
mov edx, ecx
mov ecx, 1
call _ma_compact_block_page
movzx r8d, word ptr [rbx+2]
cmp r8d, r12d
jnb short loc_4E646
mov rdi, r15
mov esi, 7Fh
call _ma_set_fatal_error
mov al, 1
jmp short loc_4E60A
loc_4E646:
movzx r11d, word ptr [rbx]
mov [r14], r8d
jmp short loc_4E5F1
|
char extend_area_on_page(
long long a1,
long long a2,
unsigned __int16 *a3,
int a4,
unsigned int a5,
_DWORD *a6,
_DWORD *a7,
_DWORD *a8,
char a9)
{
int v13; // edx
_DWORD *v14; // rdi
long long v15; // rax
unsigned __int16 v16; // r9
long long v17; // r8
long long v18; // r8
long long v19; // r9
unsigned __int8 v20; // r8
char *v21; // r9
int v22; // r11d
unsigned __int16 *v23; // r10
int v24; // r9d
int v25; // r10d
_BYTE *v26; // rdx
_BYTE *v27; // rax
unsigned long long v28; // r8
unsigned int v29; // r9d
long long v31; // rdx
long long v32; // rcx
int v33; // r9d
v13 = *(unsigned __int8 *)(a2 + 8);
v14 = *(_DWORD **)a1;
v15 = (unsigned int)v14[495];
v16 = *a3;
if ( *a3 )
{
LODWORD(v17) = a3[1];
*a6 += v17;
}
else
{
v18 = *((unsigned __int8 *)a3 + 2);
if ( v18 == 255 )
{
v20 = *((_BYTE *)a3 + 3);
*(_BYTE *)(a2 + 9) = v20;
}
else
{
v19 = a2 + v15 - (unsigned int)(4 * v18);
v20 = *((_BYTE *)a3 + 3);
*(_BYTE *)(v19 - 5) = v20;
}
if ( v20 != 0xFF )
*(_BYTE *)(a2 + v15 - 4 * (unsigned int)v20 - 6) = *((_BYTE *)a3 + 2);
v21 = (char *)a3 - 3;
do
{
v17 = (long long)v21;
if ( *(v21 - 1) )
break;
v21 -= 4;
}
while ( !*(_BYTE *)v17 );
v16 = *(_WORD *)(v17 - 1);
LODWORD(v17) = 0;
}
v22 = v16;
if ( (unsigned int)v17 < a5 )
{
v23 = a3 + 2;
while ( (unsigned long long)v23 < a2 + v15 - 4 )
{
v24 = *v23;
v23 += 2;
if ( v24 )
{
v25 = v24 + *(v23 - 1);
goto LABEL_18;
}
}
v25 = v14[774] + 12;
LABEL_18:
LODWORD(v17) = v22 - v25 + v17;
if ( (unsigned int)v17 >= a5 )
goto LABEL_28;
if ( v13 - 1 == a4 )
{
LODWORD(v17) = v15 - (v25 + 4 * v13) - 4;
}
else
{
v26 = (char *)a3 - 3;
do
{
v27 = v26;
if ( *(v26 - 1) )
break;
v26 -= 4;
}
while ( !*v27 );
LODWORD(v17) = *(unsigned __int16 *)(v27 - 1) - v25;
}
if ( (unsigned int)v17 >= a5 )
{
LABEL_28:
v22 = v25;
}
else
{
*a3 = v25;
a3[1] = 0;
if ( a9 )
{
v28 = *(_QWORD *)(*(_QWORD *)(a1 + 8) + 128LL);
v29 = v14[238];
}
else
{
v28 = 0LL;
v29 = 0;
}
ma_compact_block_page((long long)v14, a2, a4, 1, v28, v29);
v17 = a3[1];
if ( (unsigned int)v17 < a5 )
{
ma_set_fatal_error((_DWORD *)a1, 127LL, v31, v32, v17, v33);
return 1;
}
v22 = *a3;
*a6 = v17;
}
}
*a3 = v22;
a3[1] = v17;
*a7 = v22;
*a8 = v17;
return 0;
}
|
extend_area_on_page:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
PUSH RAX
MOV R14,R9
MOV R12D,R8D
MOV RBX,RDX
MOV R15,RDI
MOVZX EDX,byte ptr [RSI + 0x8]
MOV RDI,qword ptr [RDI]
MOV EAX,dword ptr [RDI + 0x7bc]
MOVZX R9D,word ptr [RBX]
TEST R9W,R9W
JZ 0x0014e4dd
MOVZX R8D,word ptr [RBX + 0x2]
ADD dword ptr [R14],R8D
JMP 0x0014e545
LAB_0014e4dd:
MOVZX R8D,byte ptr [RBX + 0x2]
CMP R8,0xff
JZ 0x0014e500
LEA R9,[RSI + RAX*0x1]
SHL R8D,0x2
SUB R9,R8
MOV R8B,byte ptr [RBX + 0x3]
MOV byte ptr [R9 + -0x5],R8B
JMP 0x0014e508
LAB_0014e500:
MOV R8B,byte ptr [RBX + 0x3]
MOV byte ptr [RSI + 0x9],R8B
LAB_0014e508:
CMP R8B,0xff
JZ 0x0014e525
LEA R9,[RSI + RAX*0x1]
MOVZX R8D,R8B
SHL R8D,0x2
SUB R9,R8
MOV R8B,byte ptr [RBX + 0x2]
MOV byte ptr [R9 + -0x6],R8B
LAB_0014e525:
LEA R9,[RBX + -0x3]
LAB_0014e529:
MOV R8,R9
CMP byte ptr [R9 + -0x1],0x0
JNZ 0x0014e53d
LEA R9,[R8 + -0x4]
CMP byte ptr [R8],0x0
JZ 0x0014e529
LAB_0014e53d:
MOVZX R9D,word ptr [R8 + -0x1]
XOR R8D,R8D
LAB_0014e545:
MOVZX R11D,R9W
CMP R8D,R12D
JNC 0x0014e5f1
LEA R13,[RSI + RAX*0x1]
ADD R13,-0x4
LEA R10,[RBX + 0x4]
LAB_0014e55e:
CMP R10,R13
JNC 0x0014e57a
MOVZX R9D,word ptr [R10]
ADD R10,0x4
TEST R9D,R9D
JZ 0x0014e55e
MOVZX R10D,word ptr [R10 + -0x2]
ADD R10D,R9D
JMP 0x0014e585
LAB_0014e57a:
MOV R10D,dword ptr [RDI + 0xc18]
ADD R10D,0xc
LAB_0014e585:
SUB R11D,R10D
ADD R8D,R11D
CMP R8D,R12D
JNC 0x0014e5ee
LEA R8D,[RDX + -0x1]
CMP R8D,ECX
JNZ 0x0014e5a7
LEA EDX,[R10 + RDX*0x4]
SUB EAX,EDX
ADD EAX,-0x4
MOV R8D,EAX
JMP 0x0014e5c5
LAB_0014e5a7:
LEA RDX,[RBX + -0x3]
LAB_0014e5ab:
MOV RAX,RDX
CMP byte ptr [RDX + -0x1],0x0
JNZ 0x0014e5bd
LEA RDX,[RAX + -0x4]
CMP byte ptr [RAX],0x0
JZ 0x0014e5ab
LAB_0014e5bd:
MOVZX R8D,word ptr [RAX + -0x1]
SUB R8D,R10D
LAB_0014e5c5:
CMP R8D,R12D
JNC 0x0014e5ee
MOV word ptr [RBX],R10W
MOV word ptr [RBX + 0x2],0x0
CMP byte ptr [RBP + 0x20],0x0
JZ 0x0014e619
MOV RAX,qword ptr [R15 + 0x8]
MOV R8,qword ptr [RAX + 0x80]
MOV R9D,dword ptr [RDI + 0x3b8]
JMP 0x0014e61f
LAB_0014e5ee:
MOV R11D,R10D
LAB_0014e5f1:
MOV RAX,qword ptr [RBP + 0x18]
MOV RCX,qword ptr [RBP + 0x10]
MOV word ptr [RBX],R11W
MOV word ptr [RBX + 0x2],R8W
MOV dword ptr [RCX],R11D
MOV dword ptr [RAX],R8D
XOR EAX,EAX
LAB_0014e60a:
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_0014e619:
XOR R8D,R8D
XOR R9D,R9D
LAB_0014e61f:
MOV EDX,ECX
MOV ECX,0x1
CALL 0x0014af34
MOVZX R8D,word ptr [RBX + 0x2]
CMP R8D,R12D
JNC 0x0014e646
MOV RDI,R15
MOV ESI,0x7f
CALL 0x0014056c
MOV AL,0x1
JMP 0x0014e60a
LAB_0014e646:
MOVZX R11D,word ptr [RBX]
MOV dword ptr [R14],R8D
JMP 0x0014e5f1
|
int8
extend_area_on_page(long *param_1,long param_2,ushort *param_3,int param_4,uint param_5,
uint *param_6,uint *param_7,uint *param_8,char param_9)
{
byte bVar1;
ushort uVar2;
uint uVar3;
long lVar4;
char *pcVar5;
ushort *puVar6;
ulong uVar7;
char *pcVar8;
byte bVar9;
uint uVar10;
int8 uVar11;
int4 uVar12;
uint uVar13;
ushort *puVar14;
bVar1 = *(byte *)(param_2 + 8);
lVar4 = *param_1;
uVar3 = *(uint *)(lVar4 + 0x7bc);
uVar7 = (ulong)uVar3;
uVar2 = *param_3;
if (uVar2 == 0) {
if ((byte)param_3[1] == 0xff) {
bVar9 = *(byte *)((long)param_3 + 3);
*(byte *)(param_2 + 9) = bVar9;
}
else {
bVar9 = *(byte *)((long)param_3 + 3);
*(byte *)(param_2 + uVar7 + (ulong)(byte)param_3[1] * -4 + -5) = bVar9;
}
if (bVar9 != 0xff) {
*(char *)(param_2 + uVar7 + (ulong)bVar9 * -4 + -6) = (char)param_3[1];
}
pcVar5 = (char *)((long)param_3 + -3);
do {
pcVar8 = pcVar5;
if (pcVar8[-1] != '\0') break;
pcVar5 = pcVar8 + -4;
} while (*pcVar8 == '\0');
uVar2 = *(ushort *)(pcVar8 + -1);
uVar10 = 0;
}
else {
uVar10 = (uint)param_3[1];
*param_6 = *param_6 + (uint)param_3[1];
}
uVar13 = (uint)uVar2;
if (uVar10 < param_5) {
puVar6 = param_3 + 2;
do {
puVar14 = puVar6;
if ((ushort *)(param_2 + uVar7 + -4) <= puVar14) {
uVar13 = *(int *)(lVar4 + 0xc18) + 0xc;
goto LAB_0014e585;
}
puVar6 = puVar14 + 2;
} while (*puVar14 == 0);
uVar13 = (uint)puVar14[1] + (uint)*puVar14;
LAB_0014e585:
uVar10 = uVar10 + (uVar2 - uVar13);
if (uVar10 < param_5) {
if (bVar1 - 1 == param_4) {
uVar10 = (uVar3 - (uVar13 + (uint)bVar1 * 4)) - 4;
}
else {
pcVar5 = (char *)((long)param_3 + -3);
do {
pcVar8 = pcVar5;
if (pcVar8[-1] != '\0') break;
pcVar5 = pcVar8 + -4;
} while (*pcVar8 == '\0');
uVar10 = *(ushort *)(pcVar8 + -1) - uVar13;
}
if (uVar10 < param_5) {
*param_3 = (ushort)uVar13;
param_3[1] = 0;
if (param_9 == '\0') {
uVar11 = 0;
uVar12 = 0;
}
else {
uVar11 = *(int8 *)(param_1[1] + 0x80);
uVar12 = *(int4 *)(lVar4 + 0x3b8);
}
_ma_compact_block_page(lVar4,param_2,param_4,1,uVar11,uVar12);
uVar10 = (uint)param_3[1];
if (uVar10 < param_5) {
_ma_set_fatal_error(param_1,0x7f);
return 1;
}
uVar13 = (uint)*param_3;
*param_6 = uVar10;
}
}
}
*param_3 = (ushort)uVar13;
param_3[1] = (ushort)uVar10;
*param_7 = uVar13;
*param_8 = uVar10;
return 0;
}
|
|
57,262
|
ma_update_static_record
|
eloqsql/storage/maria/ma_statrec.c
|
my_bool _ma_update_static_record(MARIA_HA *info, MARIA_RECORD_POS pos,
const uchar *oldrec __attribute__ ((unused)),
const uchar *record)
{
info->rec_cache.seek_not_done=1; /* We have done a seek */
return (info->s->file_write(info,
record, info->s->base.reclength,
pos,
MYF(MY_NABP)) != 0);
}
|
O3
|
c
|
ma_update_static_record:
pushq %rbp
movq %rsp, %rbp
movq %rsi, %rax
movl $0x1, 0x598(%rdi)
movq (%rdi), %r9
movq 0x398(%r9), %rdx
movl $0x4, %r8d
movq %rcx, %rsi
movq %rax, %rcx
callq *0x6e8(%r9)
testq %rax, %rax
setne %al
popq %rbp
retq
|
_ma_update_static_record:
push rbp
mov rbp, rsp
mov rax, rsi
mov dword ptr [rdi+598h], 1
mov r9, [rdi]
mov rdx, [r9+398h]
mov r8d, 4
mov rsi, rcx
mov rcx, rax
call qword ptr [r9+6E8h]
test rax, rax
setnz al
pop rbp
retn
|
bool ma_update_static_record(_DWORD *a1, long long a2, long long a3, long long a4)
{
a1[358] = 1;
return (*(long long ( **)(_DWORD *, long long, _QWORD, long long, long long))(*(_QWORD *)a1 + 1768LL))(
a1,
a4,
*(_QWORD *)(*(_QWORD *)a1 + 920LL),
a2,
4LL) != 0;
}
|
_ma_update_static_record:
PUSH RBP
MOV RBP,RSP
MOV RAX,RSI
MOV dword ptr [RDI + 0x598],0x1
MOV R9,qword ptr [RDI]
MOV RDX,qword ptr [R9 + 0x398]
MOV R8D,0x4
MOV RSI,RCX
MOV RCX,RAX
CALL qword ptr [R9 + 0x6e8]
TEST RAX,RAX
SETNZ AL
POP RBP
RET
|
bool _ma_update_static_record
(long *param_1,int8 param_2,int8 param_3,int8 param_4)
{
long lVar1;
*(int4 *)(param_1 + 0xb3) = 1;
lVar1 = (**(code **)(*param_1 + 0x6e8))
(param_1,param_4,*(int8 *)(*param_1 + 0x398),param_2,4);
return lVar1 != 0;
}
|
|
57,263
|
ma_log_split
|
eloqsql/storage/maria/ma_write.c
|
static my_bool _ma_log_split(MARIA_PAGE *ma_page,
uint org_length, uint new_length,
const uchar *key_pos, uint key_length,
int move_length, enum en_key_op prefix_or_suffix,
const uchar *data, uint data_length,
uint changed_length)
{
LSN lsn;
uchar log_data[FILEID_STORE_SIZE + PAGE_STORE_SIZE + 2 + 2 + 3+3+3+3+3+2 +7];
uchar *log_pos;
LEX_CUSTRING log_array[TRANSLOG_INTERNAL_PARTS + 6];
uint offset= (uint) (key_pos - ma_page->buff);
uint translog_parts, extra_length;
MARIA_HA *info= ma_page->info;
my_off_t page= ma_page->pos / info->s->block_size;
DBUG_ENTER("_ma_log_split");
DBUG_PRINT("enter", ("page: %lu org_length: %u new_length: %u",
(ulong) page, org_length, new_length));
DBUG_ASSERT(changed_length >= data_length);
DBUG_ASSERT(org_length <= info->s->max_index_block_size);
DBUG_ASSERT(new_length == ma_page->size);
DBUG_ASSERT(org_length == ma_page->org_size);
log_pos= log_data + FILEID_STORE_SIZE;
page_store(log_pos, page);
log_pos+= PAGE_STORE_SIZE;
#ifdef EXTRA_DEBUG_KEY_CHANGES
(*log_pos++)= KEY_OP_DEBUG;
(*log_pos++)= KEY_OP_DEBUG_LOG_SPLIT;
#endif
/* Store keypage_flag */
*log_pos++= KEY_OP_SET_PAGEFLAG;
*log_pos++= _ma_get_keypage_flag(info->s, ma_page->buff);
if (new_length <= offset || !key_pos)
{
/*
Page was split before inserted key. Write redo entry where
we just cut current page at page_length
*/
uint length_offset= org_length - new_length;
log_pos[0]= KEY_OP_DEL_SUFFIX;
int2store(log_pos+1, length_offset);
log_pos+= 3;
translog_parts= 1;
extra_length= 0;
DBUG_ASSERT(data_length == 0);
}
else
{
/* Key was added to page which was split after the inserted key */
uint max_key_length;
/*
Handle case when split happened directly after the newly inserted key.
*/
max_key_length= new_length - offset;
extra_length= MY_MIN(key_length, max_key_length);
if (offset + move_length > new_length)
{
/* This is true when move_length includes changes for next packed key */
move_length= new_length - offset;
}
if ((int) new_length < (int) (org_length + move_length + data_length))
{
/* Shorten page */
uint diff= org_length + move_length + data_length - new_length;
log_pos[0]= KEY_OP_DEL_SUFFIX;
int2store(log_pos + 1, diff);
log_pos+= 3;
DBUG_ASSERT(data_length == 0); /* Page is shortened */
DBUG_ASSERT(offset <= org_length - diff);
}
else
{
DBUG_ASSERT(new_length == org_length + move_length + data_length);
DBUG_ASSERT(offset <= org_length);
}
log_pos[0]= KEY_OP_OFFSET;
int2store(log_pos+1, offset);
log_pos+= 3;
if (move_length)
{
log_pos[0]= KEY_OP_SHIFT;
int2store(log_pos+1, move_length);
log_pos+= 3;
}
log_pos[0]= KEY_OP_CHANGE;
int2store(log_pos+1, extra_length);
log_pos+= 3;
/* Point to original inserted key data */
if (prefix_or_suffix == KEY_OP_ADD_PREFIX)
key_pos+= data_length;
translog_parts= 2;
log_array[TRANSLOG_INTERNAL_PARTS + 1].str= key_pos;
log_array[TRANSLOG_INTERNAL_PARTS + 1].length= extra_length;
}
if (data_length)
{
/* Add prefix or suffix */
log_pos[0]= prefix_or_suffix;
int2store(log_pos+1, data_length);
log_pos+= 3;
if (prefix_or_suffix == KEY_OP_ADD_PREFIX)
{
int2store(log_pos+1, changed_length);
log_pos+= 2;
data_length= changed_length;
}
log_array[TRANSLOG_INTERNAL_PARTS + translog_parts].str= data;
log_array[TRANSLOG_INTERNAL_PARTS + translog_parts].length= data_length;
translog_parts++;
extra_length+= data_length;
}
log_array[TRANSLOG_INTERNAL_PARTS + 0].str= log_data;
log_array[TRANSLOG_INTERNAL_PARTS + 0].length= (uint) (log_pos -
log_data);
_ma_log_key_changes(ma_page,
log_array + TRANSLOG_INTERNAL_PARTS + translog_parts,
log_pos, &extra_length, &translog_parts);
/* Remember new page length for future log entires for same page */
ma_page->org_size= ma_page->size;
DBUG_RETURN(translog_write_record(&lsn, LOGREC_REDO_INDEX,
info->trn, info,
(translog_size_t)
log_array[TRANSLOG_INTERNAL_PARTS +
0].length + extra_length,
TRANSLOG_INTERNAL_PARTS + translog_parts,
log_array, log_data, NULL));
}
|
O3
|
c
|
ma_log_split:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0xc0, %rsp
movq %rcx, %r10
movl %edx, %r11d
movl 0x20(%rbp), %ebx
movq %fs:0x28, %rax
movq %rax, -0x28(%rbp)
movq (%rdi), %rcx
movq 0x10(%rdi), %r15
movq 0x18(%rdi), %rax
movq (%rcx), %r14
movl 0x7bc(%r14), %r12d
xorl %edx, %edx
divq %r12
movl %eax, -0x4e(%rbp)
shrq $0x20, %rax
movb %al, -0x4a(%rbp)
movl 0x10(%rbp), %edx
movb $0xa, -0x49(%rbp)
movl 0x744(%r14), %eax
addl $-0x3, %eax
movb (%r15,%rax), %al
movb %al, -0x48(%rbp)
xorl %eax, %eax
testq %r10, %r10
je 0x58d20
movq %r10, %r14
subq %r15, %r14
movl %r11d, %r15d
subl %r14d, %r15d
jbe 0x58d20
cmpl %r8d, %r15d
cmovbl %r15d, %r8d
leal (%r14,%r9), %eax
cmpl %r11d, %eax
cmoval %r15d, %r9d
addl %ebx, %esi
addl %r9d, %esi
subl %r11d, %esi
jle 0x58d39
leaq -0x44(%rbp), %r11
movb $0x7, -0x3(%r11)
movw %si, -0x2(%r11)
jmp 0x58d3d
subl %r11d, %esi
leaq -0x44(%rbp), %r11
movb $0x7, -0x3(%r11)
movw %si, -0x2(%r11)
movl $0x1, %r9d
jmp 0x58d91
leaq -0x47(%rbp), %r11
movb $0x1, (%r11)
movw %r14w, 0x1(%r11)
testl %r9d, %r9d
je 0x58d5b
movb $0x2, 0x3(%r11)
movw %r9w, 0x4(%r11)
addq $0x6, %r11
jmp 0x58d5f
addq $0x3, %r11
movb $0x3, (%r11)
movw %r8w, 0x1(%r11)
addq $0x3, %r11
xorl %eax, %eax
cmpl $0x4, %edx
cmovel %ebx, %eax
addq %rax, %r10
movq %r10, -0xb0(%rbp)
movl %r8d, %eax
movq %rax, -0xa8(%rbp)
movl $0x2, %r9d
movl %r8d, %eax
testl %ebx, %ebx
je 0x58dd6
movq 0x18(%rbp), %rsi
movb %dl, (%r11)
movw %bx, 0x1(%r11)
cmpl $0x4, %edx
jne 0x58db4
movl 0x28(%rbp), %ebx
movw %bx, 0x4(%r11)
addq $0x5, %r11
jmp 0x58db8
addq $0x3, %r11
movl %r9d, %edx
shll $0x4, %edx
leaq -0xe0(%rbp), %r8
movq %rsi, 0x20(%rdx,%r8)
movl %ebx, %esi
movq %rsi, 0x28(%rdx,%r8)
incl %r9d
addl %ebx, %eax
leaq -0x50(%rbp), %r10
leaq -0xe0(%rbp), %rbx
movq %r10, 0x20(%rbx)
subq %r10, %r11
movl %r11d, %edx
movq %rdx, 0x28(%rbx)
movl 0x20(%rdi), %edx
movl %edx, 0x24(%rdi)
movq 0x8(%rcx), %rdx
addl %r11d, %eax
addl $0x2, %r9d
subq $0x8, %rsp
leaq -0x58(%rbp), %rdi
movl $0xc, %esi
movl %eax, %r8d
pushq $0x0
pushq %r10
pushq %rbx
callq 0x2be39
addq $0x20, %rsp
movq %fs:0x28, %rcx
cmpq -0x28(%rbp), %rcx
jne 0x58e3d
addq $0xc0, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
callq 0x2a250
|
_ma_log_split:
push rbp
mov rbp, rsp
push r15
push r14
push r12
push rbx
sub rsp, 0C0h
mov r10, rcx
mov r11d, edx
mov ebx, [rbp+arg_10]
mov rax, fs:28h
mov [rbp+var_28], rax
mov rcx, [rdi]
mov r15, [rdi+10h]
mov rax, [rdi+18h]
mov r14, [rcx]
mov r12d, [r14+7BCh]
xor edx, edx
div r12
mov [rbp+var_4E], eax
shr rax, 20h
mov [rbp+var_4A], al
mov edx, [rbp+arg_0]
mov [rbp+var_49], 0Ah
mov eax, [r14+744h]
add eax, 0FFFFFFFDh
mov al, [r15+rax]
mov [rbp+var_48], al
xor eax, eax
test r10, r10
jz short loc_58D20
mov r14, r10
sub r14, r15
mov r15d, r11d
sub r15d, r14d
jbe short loc_58D20
cmp r15d, r8d
cmovb r8d, r15d
lea eax, [r14+r9]
cmp eax, r11d
cmova r9d, r15d
add esi, ebx
add esi, r9d
sub esi, r11d
jle short loc_58D39
lea r11, [rbp+var_44]
mov byte ptr [r11-3], 7
mov [r11-2], si
jmp short loc_58D3D
loc_58D20:
sub esi, r11d
lea r11, [rbp+var_44]
mov byte ptr [r11-3], 7
mov [r11-2], si
mov r9d, 1
jmp short loc_58D91
loc_58D39:
lea r11, [rbp+var_47]
loc_58D3D:
mov byte ptr [r11], 1
mov [r11+1], r14w
test r9d, r9d
jz short loc_58D5B
mov byte ptr [r11+3], 2
mov [r11+4], r9w
add r11, 6
jmp short loc_58D5F
loc_58D5B:
add r11, 3
loc_58D5F:
mov byte ptr [r11], 3
mov [r11+1], r8w
add r11, 3
xor eax, eax
cmp edx, 4
cmovz eax, ebx
add r10, rax
mov [rbp+var_B0], r10
mov eax, r8d
mov [rbp+var_A8], rax
mov r9d, 2
mov eax, r8d
loc_58D91:
test ebx, ebx
jz short loc_58DD6
mov rsi, [rbp+arg_8]
mov [r11], dl
mov [r11+1], bx
cmp edx, 4
jnz short loc_58DB4
mov ebx, [rbp+arg_18]
mov [r11+4], bx
add r11, 5
jmp short loc_58DB8
loc_58DB4:
add r11, 3
loc_58DB8:
mov edx, r9d
shl edx, 4
lea r8, [rbp+var_E0]
mov [rdx+r8+20h], rsi
mov esi, ebx
mov [rdx+r8+28h], rsi
inc r9d
add eax, ebx
loc_58DD6:
lea r10, [rbp+var_50]
lea rbx, [rbp+var_E0]
mov [rbx+20h], r10
sub r11, r10
mov edx, r11d
mov [rbx+28h], rdx
mov edx, [rdi+20h]
mov [rdi+24h], edx
mov rdx, [rcx+8]
add eax, r11d
add r9d, 2
sub rsp, 8
lea rdi, [rbp+var_58]
mov esi, 0Ch
mov r8d, eax
push 0
push r10
push rbx
call translog_write_record
add rsp, 20h
mov rcx, fs:28h
cmp rcx, [rbp+var_28]
jnz short loc_58E3D
add rsp, 0C0h
pop rbx
pop r12
pop r14
pop r15
pop rbp
retn
loc_58E3D:
call ___stack_chk_fail
|
long long ma_log_split(
long long **a1,
int a2,
unsigned int a3,
long long a4,
unsigned int a5,
unsigned int a6,
int a7,
long long a8,
unsigned int a9,
unsigned int a10)
{
unsigned int v11; // ebx
long long *v12; // rcx
long long *v13; // r15
long long v14; // r14
unsigned long long v15; // rax
unsigned int v16; // eax
unsigned int v17; // r14d
unsigned int v18; // r15d
int v19; // esi
bool v20; // cc
__int16 v21; // si
char *v22; // r11
_BYTE *v23; // r11
int v24; // r9d
char *v25; // r11
long long v26; // rax
long long v27; // rdx
long long v28; // r11
_OWORD v30[2]; // [rsp+0h] [rbp-E0h] BYREF
__int16 *v31; // [rsp+20h] [rbp-C0h]
long long v32; // [rsp+28h] [rbp-B8h]
long long v33; // [rsp+30h] [rbp-B0h]
long long v34; // [rsp+38h] [rbp-A8h]
_BYTE v35[8]; // [rsp+88h] [rbp-58h] BYREF
__int16 v36; // [rsp+90h] [rbp-50h] BYREF
int v37; // [rsp+92h] [rbp-4Eh]
char v38; // [rsp+96h] [rbp-4Ah]
char v39; // [rsp+97h] [rbp-49h]
char v40; // [rsp+98h] [rbp-48h]
char v41; // [rsp+99h] [rbp-47h] BYREF
__int16 v42; // [rsp+9Ah] [rbp-46h]
_BYTE v43[28]; // [rsp+9Ch] [rbp-44h] BYREF
unsigned long long v44; // [rsp+B8h] [rbp-28h]
v11 = a9;
v44 = __readfsqword(0x28u);
v12 = *a1;
v13 = a1[2];
v14 = **a1;
v15 = (unsigned long long)a1[3] / *(unsigned int *)(v14 + 1980);
v37 = v15;
v38 = BYTE4(v15);
v39 = 10;
v40 = *((_BYTE *)v13 + (unsigned int)(*(_DWORD *)(v14 + 1860) - 3));
v16 = 0;
if ( a4 && (v17 = a4 - (_DWORD)v13, v18 = a3 - (a4 - (_DWORD)v13), a3 > v17) )
{
if ( v18 < a5 )
a5 = v18;
if ( v17 + a6 > a3 )
a6 = v18;
v19 = a6 + a9 + a2;
v20 = v19 <= (int)a3;
v21 = v19 - a3;
if ( v20 )
{
v22 = &v41;
}
else
{
v22 = v43;
v41 = 7;
v42 = v21;
}
*v22 = 1;
*(_WORD *)(v22 + 1) = v17;
if ( a6 )
{
v22[3] = 2;
*((_WORD *)v22 + 2) = a6;
v25 = v22 + 6;
}
else
{
v25 = v22 + 3;
}
*v25 = 3;
*(_WORD *)(v25 + 1) = a5;
v23 = v25 + 3;
v26 = 0LL;
if ( a7 == 4 )
v26 = a9;
v33 = v26 + a4;
v34 = a5;
v24 = 2;
v16 = a5;
}
else
{
v23 = v43;
v41 = 7;
v42 = a2 - a3;
v24 = 1;
}
if ( a9 )
{
*v23 = a7;
*(_WORD *)(v23 + 1) = a9;
if ( a7 == 4 )
{
v11 = a10;
*((_WORD *)v23 + 2) = a10;
v23 += 5;
}
else
{
v23 += 3;
}
v27 = (unsigned int)(16 * v24);
*(_QWORD *)((char *)&v30[2] + v27) = a8;
*(_QWORD *)((char *)&v30[2] + v27 + 8) = v11;
++v24;
v16 += v11;
}
v31 = &v36;
v28 = v23 - (_BYTE *)&v36;
v32 = (unsigned int)v28;
*((_DWORD *)a1 + 9) = *((_DWORD *)a1 + 8);
return translog_write_record(
(unsigned long long)v35,
&byte_9[3],
v12[1],
v12,
(unsigned int)v28 + v16,
v24 + 2,
v30,
&v36,
0LL);
}
|
_ma_log_split:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
SUB RSP,0xc0
MOV R10,RCX
MOV R11D,EDX
MOV EBX,dword ptr [RBP + 0x20]
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x28],RAX
MOV RCX,qword ptr [RDI]
MOV R15,qword ptr [RDI + 0x10]
MOV RAX,qword ptr [RDI + 0x18]
MOV R14,qword ptr [RCX]
MOV R12D,dword ptr [R14 + 0x7bc]
XOR EDX,EDX
DIV R12
MOV dword ptr [RBP + -0x4e],EAX
SHR RAX,0x20
MOV byte ptr [RBP + -0x4a],AL
MOV EDX,dword ptr [RBP + 0x10]
MOV byte ptr [RBP + -0x49],0xa
MOV EAX,dword ptr [R14 + 0x744]
ADD EAX,-0x3
MOV AL,byte ptr [R15 + RAX*0x1]
MOV byte ptr [RBP + -0x48],AL
XOR EAX,EAX
TEST R10,R10
JZ 0x00158d20
MOV R14,R10
SUB R14,R15
MOV R15D,R11D
SUB R15D,R14D
JBE 0x00158d20
CMP R15D,R8D
CMOVC R8D,R15D
LEA EAX,[R14 + R9*0x1]
CMP EAX,R11D
CMOVA R9D,R15D
ADD ESI,EBX
ADD ESI,R9D
SUB ESI,R11D
JLE 0x00158d39
LEA R11,[RBP + -0x44]
MOV byte ptr [R11 + -0x3],0x7
MOV word ptr [R11 + -0x2],SI
JMP 0x00158d3d
LAB_00158d20:
SUB ESI,R11D
LEA R11,[RBP + -0x44]
MOV byte ptr [R11 + -0x3],0x7
MOV word ptr [R11 + -0x2],SI
MOV R9D,0x1
JMP 0x00158d91
LAB_00158d39:
LEA R11,[RBP + -0x47]
LAB_00158d3d:
MOV byte ptr [R11],0x1
MOV word ptr [R11 + 0x1],R14W
TEST R9D,R9D
JZ 0x00158d5b
MOV byte ptr [R11 + 0x3],0x2
MOV word ptr [R11 + 0x4],R9W
ADD R11,0x6
JMP 0x00158d5f
LAB_00158d5b:
ADD R11,0x3
LAB_00158d5f:
MOV byte ptr [R11],0x3
MOV word ptr [R11 + 0x1],R8W
ADD R11,0x3
XOR EAX,EAX
CMP EDX,0x4
CMOVZ EAX,EBX
ADD R10,RAX
MOV qword ptr [RBP + -0xb0],R10
MOV EAX,R8D
MOV qword ptr [RBP + -0xa8],RAX
MOV R9D,0x2
MOV EAX,R8D
LAB_00158d91:
TEST EBX,EBX
JZ 0x00158dd6
MOV RSI,qword ptr [RBP + 0x18]
MOV byte ptr [R11],DL
MOV word ptr [R11 + 0x1],BX
CMP EDX,0x4
JNZ 0x00158db4
MOV EBX,dword ptr [RBP + 0x28]
MOV word ptr [R11 + 0x4],BX
ADD R11,0x5
JMP 0x00158db8
LAB_00158db4:
ADD R11,0x3
LAB_00158db8:
MOV EDX,R9D
SHL EDX,0x4
LEA R8,[RBP + -0xe0]
MOV qword ptr [RDX + R8*0x1 + 0x20],RSI
MOV ESI,EBX
MOV qword ptr [RDX + R8*0x1 + 0x28],RSI
INC R9D
ADD EAX,EBX
LAB_00158dd6:
LEA R10,[RBP + -0x50]
LEA RBX,[RBP + -0xe0]
MOV qword ptr [RBX + 0x20],R10
SUB R11,R10
MOV EDX,R11D
MOV qword ptr [RBX + 0x28],RDX
MOV EDX,dword ptr [RDI + 0x20]
MOV dword ptr [RDI + 0x24],EDX
MOV RDX,qword ptr [RCX + 0x8]
ADD EAX,R11D
ADD R9D,0x2
SUB RSP,0x8
LEA RDI,[RBP + -0x58]
MOV ESI,0xc
MOV R8D,EAX
PUSH 0x0
PUSH R10
PUSH RBX
CALL 0x0012be39
ADD RSP,0x20
MOV RCX,qword ptr FS:[0x28]
CMP RCX,qword ptr [RBP + -0x28]
JNZ 0x00158e3d
ADD RSP,0xc0
POP RBX
POP R12
POP R14
POP R15
POP RBP
RET
LAB_00158e3d:
CALL 0x0012a250
|
void _ma_log_split(long *param_1,int param_2,uint param_3,long param_4,uint param_5,uint param_6,
int param_7,int8 param_8,uint param_9,uint param_10)
{
long *plVar1;
int1 auVar2 [16];
uint uVar3;
int iVar4;
int iVar5;
int1 *puVar6;
uint uVar7;
long lVar8;
uint uVar9;
long in_FS_OFFSET;
int1 local_e8 [32];
int1 *local_c8;
ulong local_c0 [12];
int1 local_60 [8];
int1 local_58 [2];
int4 local_56;
int1 local_52;
int1 local_51;
int1 local_50;
int1 local_4f;
short local_4e;
int1 local_4c [28];
long local_30;
local_30 = *(long *)(in_FS_OFFSET + 0x28);
plVar1 = (long *)*param_1;
auVar2._8_8_ = 0;
auVar2._0_8_ = param_1[3];
auVar2 = auVar2 / ZEXT416(*(uint *)(*plVar1 + 0x7bc));
local_56 = auVar2._0_4_;
local_52 = auVar2[4];
local_51 = 10;
local_50 = *(int1 *)(param_1[2] + (ulong)(*(int *)(*plVar1 + 0x744) - 3));
uVar3 = 0;
if (param_4 != 0) {
lVar8 = param_4 - param_1[2];
uVar7 = (uint)lVar8;
uVar9 = param_3 - uVar7;
if (uVar7 <= param_3 && uVar9 != 0) {
uVar3 = param_5;
if (uVar9 < param_5) {
uVar3 = uVar9;
}
if (param_3 < uVar7 + param_6) {
param_6 = uVar9;
}
iVar4 = param_2 + param_9 + param_6;
iVar5 = iVar4 - param_3;
if (iVar5 == 0 || iVar4 < (int)param_3) {
puVar6 = &local_4f;
}
else {
puVar6 = local_4c;
local_4f = 7;
local_4e = (short)iVar5;
}
*puVar6 = 1;
*(short *)(puVar6 + 1) = (short)lVar8;
if (param_6 == 0) {
puVar6 = puVar6 + 3;
}
else {
puVar6[3] = 2;
*(short *)(puVar6 + 4) = (short)param_6;
puVar6 = puVar6 + 6;
}
*puVar6 = 3;
*(short *)(puVar6 + 1) = (short)uVar3;
puVar6 = puVar6 + 3;
uVar7 = 0;
if (param_7 == 4) {
uVar7 = param_9;
}
local_c0[1] = param_4 + (ulong)uVar7;
local_c0[2] = (ulong)uVar3;
iVar4 = 2;
goto LAB_00158d91;
}
}
local_4e = (short)param_2 - (short)param_3;
puVar6 = local_4c;
local_4f = 7;
iVar4 = 1;
LAB_00158d91:
if (param_9 != 0) {
*puVar6 = (char)param_7;
*(short *)(puVar6 + 1) = (short)param_9;
if (param_7 == 4) {
*(short *)(puVar6 + 4) = (short)param_10;
puVar6 = puVar6 + 5;
}
else {
puVar6 = puVar6 + 3;
param_10 = param_9;
}
*(int8 *)((long)&local_c8 + (ulong)(uint)(iVar4 << 4)) = param_8;
*(ulong *)((long)local_c0 + (ulong)(uint)(iVar4 << 4)) = (ulong)param_10;
iVar4 = iVar4 + 1;
uVar3 = uVar3 + param_10;
}
local_c8 = local_58;
local_c0[0] = (long)puVar6 - (long)local_c8 & 0xffffffff;
*(int *)((long)param_1 + 0x24) = (int)param_1[4];
translog_write_record
(local_60,0xc,plVar1[1],plVar1,uVar3 + (int)((long)puVar6 - (long)local_c8),iVar4 + 2,
local_e8,local_c8,0);
if (*(long *)(in_FS_OFFSET + 0x28) == local_30) {
return;
}
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
|
|
57,264
|
unlink_hash
|
eloqsql/storage/maria/ma_pagecache.c
|
static void unlink_hash(PAGECACHE *pagecache, PAGECACHE_HASH_LINK *hash_link)
{
DBUG_ENTER("unlink_hash");
DBUG_PRINT("enter", ("hash_link: %p block: %p fd: %u pos: %lu requests: %u",
hash_link, hash_link->block, (uint) hash_link->file.file,
(ulong) hash_link->pageno,
hash_link->requests));
DBUG_ASSERT(hash_link->requests == 0);
DBUG_ASSERT(!hash_link->block || hash_link->block->pins == 0);
if ((*hash_link->prev= hash_link->next))
hash_link->next->prev= hash_link->prev;
hash_link->block= NULL;
if (pagecache->waiting_for_hash_link.last_thread)
{
/* Signal that a free hash link has appeared */
struct st_my_thread_var *last_thread=
pagecache->waiting_for_hash_link.last_thread;
struct st_my_thread_var *first_thread= last_thread->next;
struct st_my_thread_var *next_thread= first_thread;
PAGECACHE_PAGE *first_page= (PAGECACHE_PAGE *) (first_thread->keycache_link);
struct st_my_thread_var *thread;
hash_link->file= first_page->file;
DBUG_ASSERT(first_page->pageno < ((1ULL) << 40));
hash_link->pageno= first_page->pageno;
do
{
PAGECACHE_PAGE *page;
thread= next_thread;
page= (PAGECACHE_PAGE *) thread->keycache_link;
next_thread= thread->next;
/*
We notify about the event all threads that ask
for the same page as the first thread in the queue
*/
if (page->file.file == hash_link->file.file &&
page->pageno == hash_link->pageno)
{
DBUG_PRINT("signal", ("thread %s %ld", thread->name,
(ulong) thread->id));
pagecache_pthread_cond_signal(&thread->suspend);
wqueue_unlink_from_queue(&pagecache->waiting_for_hash_link, thread);
}
}
while (thread != last_thread);
/*
Add this to the hash, so that the waiting threads can find it
when they retry the call to get_hash_link(). This entry is special
in that it has no associated block.
*/
link_hash(&pagecache->hash_root[PAGECACHE_HASH(pagecache,
hash_link->file,
hash_link->pageno)],
hash_link);
DBUG_VOID_RETURN;
}
/* Add hash to free hash list */
hash_link->next= pagecache->free_hash_list;
pagecache->free_hash_list= hash_link;
DBUG_VOID_RETURN;
}
|
O3
|
c
|
unlink_hash:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq (%rsi), %rax
movq 0x8(%rsi), %rcx
movq %rax, (%rcx)
testq %rax, %rax
je 0x74c91
movq 0x8(%rbx), %rcx
movq %rcx, 0x8(%rax)
movq $0x0, 0x10(%rbx)
movq 0x118(%rdi), %r13
testq %r13, %r13
je 0x74d67
movq %rdi, -0x30(%rbp)
leaq 0x118(%rdi), %r15
movq 0x88(%r13), %r14
movq 0xa8(%r14), %rax
leaq 0x18(%rbx), %rdi
movl $0x9, %ecx
movq %rax, %rsi
rep movsq (%rsi), %es:(%rdi)
movq 0x48(%rax), %rax
movq %rax, 0x60(%rbx)
movq %r14, %r12
movq 0x88(%r14), %r14
movq 0xa8(%r12), %rax
movl 0x10(%rax), %ecx
cmpl 0x28(%rbx), %ecx
jne 0x74d1c
movq 0x48(%rax), %rax
cmpq 0x60(%rbx), %rax
jne 0x74d1c
movq 0x38(%r12), %rdi
testq %rdi, %rdi
jne 0x74d23
leaq 0x8(%r12), %rdi
callq 0x2a5d0
movq %r15, %rdi
movq %r12, %rsi
callq 0xb1470
cmpq %r13, %r12
jne 0x74cd9
jmp 0x74d35
leaq 0x31ed2e(%rip), %rax # 0x393a58
movq (%rax), %rax
callq *0x170(%rax)
jmp 0x74d07
movq -0x30(%rbp), %rcx
movq 0x20(%rcx), %rax
movq 0x88(%rcx), %rcx
movslq 0x28(%rbx), %rdx
addq 0x60(%rbx), %rdx
decq %rax
andq %rdx, %rax
leaq (%rcx,%rax,8), %rdi
movq (%rdi), %rax
testq %rax, %rax
je 0x74d7a
movq %rbx, 0x8(%rax)
movq (%rdi), %rax
jmp 0x74d7c
movq 0x98(%rdi), %rax
addq $0x98, %rdi
movq %rax, (%rbx)
jmp 0x74d83
xorl %eax, %eax
movq %rax, (%rbx)
movq %rdi, 0x8(%rbx)
movq %rbx, (%rdi)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
|
unlink_hash:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
push rax
mov rbx, rsi
mov rax, [rsi]
mov rcx, [rsi+8]
mov [rcx], rax
test rax, rax
jz short loc_74C91
mov rcx, [rbx+8]
mov [rax+8], rcx
loc_74C91:
mov qword ptr [rbx+10h], 0
mov r13, [rdi+118h]
test r13, r13
jz loc_74D67
mov [rbp+var_30], rdi
lea r15, [rdi+118h]
mov r14, [r13+88h]
mov rax, [r14+0A8h]
lea rdi, [rbx+18h]
mov ecx, 9
mov rsi, rax
rep movsq
mov rax, [rax+48h]
mov [rbx+60h], rax
loc_74CD9:
mov r12, r14
mov r14, [r14+88h]
mov rax, [r12+0A8h]
mov ecx, [rax+10h]
cmp ecx, [rbx+28h]
jnz short loc_74D1C
mov rax, [rax+48h]
cmp rax, [rbx+60h]
jnz short loc_74D1C
mov rdi, [r12+38h]
test rdi, rdi
jnz short loc_74D23
loc_74D07:
lea rdi, [r12+8]
call _pthread_cond_signal
mov rdi, r15
mov rsi, r12
call wqueue_unlink_from_queue
loc_74D1C:
cmp r12, r13
jnz short loc_74CD9
jmp short loc_74D35
loc_74D23:
lea rax, PSI_server
mov rax, [rax]
call qword ptr [rax+170h]
jmp short loc_74D07
loc_74D35:
mov rcx, [rbp+var_30]
mov rax, [rcx+20h]
mov rcx, [rcx+88h]
movsxd rdx, dword ptr [rbx+28h]
add rdx, [rbx+60h]
dec rax
and rax, rdx
lea rdi, [rcx+rax*8]
mov rax, [rdi]
test rax, rax
jz short loc_74D7A
mov [rax+8], rbx
mov rax, [rdi]
jmp short loc_74D7C
loc_74D67:
mov rax, [rdi+98h]
add rdi, 98h
mov [rbx], rax
jmp short loc_74D83
loc_74D7A:
xor eax, eax
loc_74D7C:
mov [rbx], rax
mov [rbx+8], rdi
loc_74D83:
mov [rdi], rbx
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
|
long long unlink_hash(_QWORD *a1, long long *a2)
{
long long v2; // rax
long long v3; // r13
long long v4; // r14
const void *v5; // rax
long long v6; // r12
long long v7; // rax
long long v8; // rdi
long long result; // rax
v2 = *a2;
*(_QWORD *)a2[1] = *a2;
if ( v2 )
*(_QWORD *)(v2 + 8) = a2[1];
a2[2] = 0LL;
v3 = a1[35];
if ( v3 )
{
v4 = *(_QWORD *)(v3 + 136);
v5 = *(const void **)(v4 + 168);
qmemcpy(a2 + 3, v5, 0x50uLL);
do
{
v6 = v4;
v4 = *(_QWORD *)(v4 + 136);
v7 = *(_QWORD *)(v6 + 168);
if ( *(_DWORD *)(v7 + 16) == *((_DWORD *)a2 + 10) && *(_QWORD *)(v7 + 72) == a2[12] )
{
if ( *(_QWORD *)(v6 + 56) )
PSI_server[46]();
pthread_cond_signal(v6 + 8);
wqueue_unlink_from_queue(a1 + 35, v6);
}
}
while ( v6 != v3 );
v8 = a1[17] + 8 * ((a2[12] + *((int *)a2 + 10)) & (a1[4] - 1LL));
if ( *(_QWORD *)v8 )
{
*(_QWORD *)(*(_QWORD *)v8 + 8LL) = a2;
result = *(_QWORD *)v8;
}
else
{
result = 0LL;
}
*a2 = result;
a2[1] = v8;
}
else
{
result = a1[19];
v8 = (long long)(a1 + 19);
*a2 = result;
}
*(_QWORD *)v8 = a2;
return result;
}
|
unlink_hash:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
PUSH RAX
MOV RBX,RSI
MOV RAX,qword ptr [RSI]
MOV RCX,qword ptr [RSI + 0x8]
MOV qword ptr [RCX],RAX
TEST RAX,RAX
JZ 0x00174c91
MOV RCX,qword ptr [RBX + 0x8]
MOV qword ptr [RAX + 0x8],RCX
LAB_00174c91:
MOV qword ptr [RBX + 0x10],0x0
MOV R13,qword ptr [RDI + 0x118]
TEST R13,R13
JZ 0x00174d67
MOV qword ptr [RBP + -0x30],RDI
LEA R15,[RDI + 0x118]
MOV R14,qword ptr [R13 + 0x88]
MOV RAX,qword ptr [R14 + 0xa8]
LEA RDI,[RBX + 0x18]
MOV ECX,0x9
MOV RSI,RAX
MOVSQ.REP RDI,RSI
MOV RAX,qword ptr [RAX + 0x48]
MOV qword ptr [RBX + 0x60],RAX
LAB_00174cd9:
MOV R12,R14
MOV R14,qword ptr [R14 + 0x88]
MOV RAX,qword ptr [R12 + 0xa8]
MOV ECX,dword ptr [RAX + 0x10]
CMP ECX,dword ptr [RBX + 0x28]
JNZ 0x00174d1c
MOV RAX,qword ptr [RAX + 0x48]
CMP RAX,qword ptr [RBX + 0x60]
JNZ 0x00174d1c
MOV RDI,qword ptr [R12 + 0x38]
TEST RDI,RDI
JNZ 0x00174d23
LAB_00174d07:
LEA RDI,[R12 + 0x8]
CALL 0x0012a5d0
MOV RDI,R15
MOV RSI,R12
CALL 0x001b1470
LAB_00174d1c:
CMP R12,R13
JNZ 0x00174cd9
JMP 0x00174d35
LAB_00174d23:
LEA RAX,[0x493a58]
MOV RAX,qword ptr [RAX]
CALL qword ptr [RAX + 0x170]
JMP 0x00174d07
LAB_00174d35:
MOV RCX,qword ptr [RBP + -0x30]
MOV RAX,qword ptr [RCX + 0x20]
MOV RCX,qword ptr [RCX + 0x88]
MOVSXD RDX,dword ptr [RBX + 0x28]
ADD RDX,qword ptr [RBX + 0x60]
DEC RAX
AND RAX,RDX
LEA RDI,[RCX + RAX*0x8]
MOV RAX,qword ptr [RDI]
TEST RAX,RAX
JZ 0x00174d7a
MOV qword ptr [RAX + 0x8],RBX
MOV RAX,qword ptr [RDI]
JMP 0x00174d7c
LAB_00174d67:
MOV RAX,qword ptr [RDI + 0x98]
ADD RDI,0x98
MOV qword ptr [RBX],RAX
JMP 0x00174d83
LAB_00174d7a:
XOR EAX,EAX
LAB_00174d7c:
MOV qword ptr [RBX],RAX
MOV qword ptr [RBX + 0x8],RDI
LAB_00174d83:
MOV qword ptr [RDI],RBX
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
void unlink_hash(long param_1,long *param_2)
{
long lVar1;
long lVar2;
long *plVar3;
long *plVar4;
long *plVar5;
long lVar6;
bool bVar7;
lVar1 = *param_2;
*(long *)param_2[1] = lVar1;
if (lVar1 != 0) {
*(long *)(lVar1 + 8) = param_2[1];
}
param_2[2] = 0;
lVar1 = *(long *)(param_1 + 0x118);
if (lVar1 == 0) {
plVar5 = (long *)(param_1 + 0x98);
*param_2 = *(long *)(param_1 + 0x98);
}
else {
lVar6 = *(long *)(lVar1 + 0x88);
plVar5 = *(long **)(lVar6 + 0xa8);
plVar3 = plVar5;
plVar4 = param_2 + 3;
for (lVar2 = 9; lVar2 != 0; lVar2 = lVar2 + -1) {
*plVar4 = *plVar3;
plVar3 = plVar3 + 1;
plVar4 = plVar4 + 1;
}
param_2[0xc] = plVar5[9];
do {
lVar2 = *(long *)(lVar6 + 0x88);
if ((*(int *)(*(long *)(lVar6 + 0xa8) + 0x10) == (int)param_2[5]) &&
(*(long *)(*(long *)(lVar6 + 0xa8) + 0x48) == param_2[0xc])) {
if (*(long *)(lVar6 + 0x38) != 0) {
(**(code **)(PSI_server + 0x170))();
}
pthread_cond_signal((pthread_cond_t *)(lVar6 + 8));
wqueue_unlink_from_queue(param_1 + 0x118,lVar6);
}
bVar7 = lVar6 != lVar1;
lVar6 = lVar2;
} while (bVar7);
plVar5 = (long *)(*(long *)(param_1 + 0x88) +
(*(long *)(param_1 + 0x20) - 1U & (long)(int)param_2[5] + param_2[0xc]) * 8);
if (*plVar5 == 0) {
lVar1 = 0;
}
else {
*(long **)(*plVar5 + 8) = param_2;
lVar1 = *plVar5;
}
*param_2 = lVar1;
param_2[1] = (long)plVar5;
}
*plVar5 = (long)param_2;
return;
}
|
|
57,265
|
js_build_rest
|
bluesky950520[P]quickjs/quickjs.c
|
static JSValue js_build_rest(JSContext *ctx, int first, int argc, JSValue *argv)
{
JSValue val;
int i, ret;
val = JS_NewArray(ctx);
if (JS_IsException(val))
return val;
for (i = first; i < argc; i++) {
ret = JS_DefinePropertyValueUint32(ctx, val, i - first,
js_dup(argv[i]),
JS_PROP_C_W_E);
if (ret < 0) {
JS_FreeValue(ctx, val);
return JS_EXCEPTION;
}
}
return val;
}
|
O0
|
c
|
js_build_rest:
subq $0x78, %rsp
movq %rdi, 0x60(%rsp)
movl %esi, 0x5c(%rsp)
movl %edx, 0x58(%rsp)
movq %rcx, 0x50(%rsp)
movq 0x60(%rsp), %rdi
callq 0x30810
movq %rax, 0x28(%rsp)
movq %rdx, 0x30(%rsp)
movq 0x28(%rsp), %rax
movq %rax, 0x40(%rsp)
movq 0x30(%rsp), %rax
movq %rax, 0x48(%rsp)
movq 0x40(%rsp), %rdi
movq 0x48(%rsp), %rsi
callq 0x29fb0
cmpl $0x0, %eax
je 0x6af3b
movq 0x40(%rsp), %rax
movq %rax, 0x68(%rsp)
movq 0x48(%rsp), %rax
movq %rax, 0x70(%rsp)
jmp 0x6b00f
movl 0x5c(%rsp), %eax
movl %eax, 0x3c(%rsp)
movl 0x3c(%rsp), %eax
cmpl 0x58(%rsp), %eax
jge 0x6affb
movq 0x60(%rsp), %rax
movq %rax, 0x8(%rsp)
movl 0x3c(%rsp), %eax
subl 0x5c(%rsp), %eax
movl %eax, 0x14(%rsp)
movq 0x50(%rsp), %rax
movslq 0x3c(%rsp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movq (%rax), %rdi
movq 0x8(%rax), %rsi
callq 0x279c0
movq 0x8(%rsp), %rdi
movl 0x14(%rsp), %ecx
movq %rax, 0x18(%rsp)
movq %rdx, 0x20(%rsp)
movq 0x40(%rsp), %rsi
movq 0x48(%rsp), %rdx
movq 0x18(%rsp), %r8
movq 0x20(%rsp), %r9
movl $0x7, (%rsp)
callq 0x3d660
movl %eax, 0x38(%rsp)
cmpl $0x0, 0x38(%rsp)
jge 0x6afe9
movq 0x60(%rsp), %rdi
movq 0x40(%rsp), %rsi
movq 0x48(%rsp), %rdx
callq 0x29f80
movl $0x0, 0x68(%rsp)
movq $0x6, 0x70(%rsp)
jmp 0x6b00f
jmp 0x6afeb
movl 0x3c(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x3c(%rsp)
jmp 0x6af43
movq 0x40(%rsp), %rax
movq %rax, 0x68(%rsp)
movq 0x48(%rsp), %rax
movq %rax, 0x70(%rsp)
movq 0x68(%rsp), %rax
movq 0x70(%rsp), %rdx
addq $0x78, %rsp
retq
nop
|
js_build_rest:
sub rsp, 78h
mov [rsp+78h+var_18], rdi
mov [rsp+78h+var_1C], esi
mov [rsp+78h+var_20], edx
mov [rsp+78h+var_28], rcx
mov rdi, [rsp+78h+var_18]
call JS_NewArray
mov [rsp+78h+var_50], rax
mov [rsp+78h+var_48], rdx
mov rax, [rsp+78h+var_50]
mov [rsp+78h+var_38], rax
mov rax, [rsp+78h+var_48]
mov [rsp+78h+var_30], rax
mov rdi, [rsp+78h+var_38]
mov rsi, [rsp+78h+var_30]
call JS_IsException_1
cmp eax, 0
jz short loc_6AF3B
mov rax, [rsp+78h+var_38]
mov [rsp+78h+var_10], rax
mov rax, [rsp+78h+var_30]
mov [rsp+78h+var_8], rax
jmp loc_6B00F
loc_6AF3B:
mov eax, [rsp+78h+var_1C]
mov [rsp+78h+var_3C], eax
loc_6AF43:
mov eax, [rsp+78h+var_3C]
cmp eax, [rsp+78h+var_20]
jge loc_6AFFB
mov rax, [rsp+78h+var_18]
mov [rsp+78h+var_70], rax
mov eax, [rsp+78h+var_3C]
sub eax, [rsp+78h+var_1C]
mov [rsp+78h+var_64], eax
mov rax, [rsp+78h+var_28]
movsxd rcx, [rsp+78h+var_3C]
shl rcx, 4
add rax, rcx
mov rdi, [rax]
mov rsi, [rax+8]
call js_dup
mov rdi, [rsp+78h+var_70]
mov ecx, [rsp+78h+var_64]
mov [rsp+78h+var_60], rax
mov [rsp+78h+var_58], rdx
mov rsi, [rsp+78h+var_38]
mov rdx, [rsp+78h+var_30]
mov r8, [rsp+78h+var_60]
mov r9, [rsp+78h+var_58]
mov [rsp+78h+var_78], 7
call JS_DefinePropertyValueUint32
mov [rsp+78h+var_40], eax
cmp [rsp+78h+var_40], 0
jge short loc_6AFE9
mov rdi, [rsp+78h+var_18]
mov rsi, [rsp+78h+var_38]
mov rdx, [rsp+78h+var_30]
call JS_FreeValue
mov dword ptr [rsp+78h+var_10], 0
mov [rsp+78h+var_8], 6
jmp short loc_6B00F
loc_6AFE9:
jmp short $+2
loc_6AFEB:
mov eax, [rsp+78h+var_3C]
add eax, 1
mov [rsp+78h+var_3C], eax
jmp loc_6AF43
loc_6AFFB:
mov rax, [rsp+78h+var_38]
mov [rsp+78h+var_10], rax
mov rax, [rsp+78h+var_30]
mov [rsp+78h+var_8], rax
loc_6B00F:
mov rax, [rsp+78h+var_10]
mov rdx, [rsp+78h+var_8]
add rsp, 78h
retn
|
long long js_build_rest(
long long a1,
int a2,
int a3,
long long a4,
__m128 a5,
__m128 a6,
__m128 a7,
__m128 a8,
double a9,
double a10,
__m128 a11,
__m128 a12)
{
long long v12; // rdx
long long v13; // rdx
double v14; // xmm4_8
double v15; // xmm5_8
_DWORD *v17; // [rsp+18h] [rbp-60h]
long long v18; // [rsp+28h] [rbp-50h]
int i; // [rsp+3Ch] [rbp-3Ch]
long long v20; // [rsp+48h] [rbp-30h]
long long v23; // [rsp+68h] [rbp-10h]
v18 = JS_NewArray(a1);
v20 = v12;
if ( JS_IsException_1(v18, v12) )
return v18;
for ( i = a2; i < a3; ++i )
{
v17 = js_dup(*(_DWORD **)(16LL * i + a4), *(_QWORD *)(16LL * i + a4 + 8));
if ( (int)JS_DefinePropertyValueUint32(a1, v18, v20, i - a2, v17, v13, a5, a6, a7, a8, v14, v15, a11, a12, 7) < 0 )
{
JS_FreeValue(a1, v18, v20);
LODWORD(v23) = 0;
return v23;
}
}
return v18;
}
|
js_build_rest:
SUB RSP,0x78
MOV qword ptr [RSP + 0x60],RDI
MOV dword ptr [RSP + 0x5c],ESI
MOV dword ptr [RSP + 0x58],EDX
MOV qword ptr [RSP + 0x50],RCX
MOV RDI,qword ptr [RSP + 0x60]
CALL 0x00130810
MOV qword ptr [RSP + 0x28],RAX
MOV qword ptr [RSP + 0x30],RDX
MOV RAX,qword ptr [RSP + 0x28]
MOV qword ptr [RSP + 0x40],RAX
MOV RAX,qword ptr [RSP + 0x30]
MOV qword ptr [RSP + 0x48],RAX
MOV RDI,qword ptr [RSP + 0x40]
MOV RSI,qword ptr [RSP + 0x48]
CALL 0x00129fb0
CMP EAX,0x0
JZ 0x0016af3b
MOV RAX,qword ptr [RSP + 0x40]
MOV qword ptr [RSP + 0x68],RAX
MOV RAX,qword ptr [RSP + 0x48]
MOV qword ptr [RSP + 0x70],RAX
JMP 0x0016b00f
LAB_0016af3b:
MOV EAX,dword ptr [RSP + 0x5c]
MOV dword ptr [RSP + 0x3c],EAX
LAB_0016af43:
MOV EAX,dword ptr [RSP + 0x3c]
CMP EAX,dword ptr [RSP + 0x58]
JGE 0x0016affb
MOV RAX,qword ptr [RSP + 0x60]
MOV qword ptr [RSP + 0x8],RAX
MOV EAX,dword ptr [RSP + 0x3c]
SUB EAX,dword ptr [RSP + 0x5c]
MOV dword ptr [RSP + 0x14],EAX
MOV RAX,qword ptr [RSP + 0x50]
MOVSXD RCX,dword ptr [RSP + 0x3c]
SHL RCX,0x4
ADD RAX,RCX
MOV RDI,qword ptr [RAX]
MOV RSI,qword ptr [RAX + 0x8]
CALL 0x001279c0
MOV RDI,qword ptr [RSP + 0x8]
MOV ECX,dword ptr [RSP + 0x14]
MOV qword ptr [RSP + 0x18],RAX
MOV qword ptr [RSP + 0x20],RDX
MOV RSI,qword ptr [RSP + 0x40]
MOV RDX,qword ptr [RSP + 0x48]
MOV R8,qword ptr [RSP + 0x18]
MOV R9,qword ptr [RSP + 0x20]
MOV dword ptr [RSP],0x7
CALL 0x0013d660
MOV dword ptr [RSP + 0x38],EAX
CMP dword ptr [RSP + 0x38],0x0
JGE 0x0016afe9
MOV RDI,qword ptr [RSP + 0x60]
MOV RSI,qword ptr [RSP + 0x40]
MOV RDX,qword ptr [RSP + 0x48]
CALL 0x00129f80
MOV dword ptr [RSP + 0x68],0x0
MOV qword ptr [RSP + 0x70],0x6
JMP 0x0016b00f
LAB_0016afe9:
JMP 0x0016afeb
LAB_0016afeb:
MOV EAX,dword ptr [RSP + 0x3c]
ADD EAX,0x1
MOV dword ptr [RSP + 0x3c],EAX
JMP 0x0016af43
LAB_0016affb:
MOV RAX,qword ptr [RSP + 0x40]
MOV qword ptr [RSP + 0x68],RAX
MOV RAX,qword ptr [RSP + 0x48]
MOV qword ptr [RSP + 0x70],RAX
LAB_0016b00f:
MOV RAX,qword ptr [RSP + 0x68]
MOV RDX,qword ptr [RSP + 0x70]
ADD RSP,0x78
RET
|
int1 [16] js_build_rest(int8 param_1,int param_2,int param_3,long param_4)
{
int4 uVar1;
int iVar2;
int8 *puVar4;
int1 auVar5 [16];
int local_3c;
int4 local_10;
int4 uStack_c;
int8 local_8;
int8 uVar3;
uVar1 = uStack_c;
auVar5 = JS_NewArray(param_1);
local_8 = auVar5._8_8_;
uVar3 = auVar5._0_8_;
iVar2 = JS_IsException(uVar3,local_8);
local_10 = auVar5._0_4_;
uStack_c = auVar5._4_4_;
local_3c = param_2;
if (iVar2 == 0) {
for (; local_3c < param_3; local_3c = local_3c + 1) {
puVar4 = (int8 *)(param_4 + (long)local_3c * 0x10);
auVar5 = js_dup(*puVar4,puVar4[1]);
iVar2 = JS_DefinePropertyValueUint32
(param_1,uVar3,local_8,local_3c - param_2,auVar5._0_8_,auVar5._8_8_,7);
if (iVar2 < 0) {
JS_FreeValue(param_1,uVar3,local_8);
local_10 = 0;
local_8 = 6;
uStack_c = uVar1;
break;
}
}
}
auVar5._4_4_ = uStack_c;
auVar5._0_4_ = local_10;
auVar5._8_8_ = local_8;
return auVar5;
}
|
|
57,266
|
link_block
|
eloqsql/mysys/mf_keycache.c
|
static void link_block(SIMPLE_KEY_CACHE_CB *keycache, BLOCK_LINK *block,
my_bool hot, my_bool at_end)
{
BLOCK_LINK *ins;
BLOCK_LINK **pins;
DBUG_ASSERT((block->status & ~BLOCK_CHANGED) == (BLOCK_READ | BLOCK_IN_USE));
DBUG_ASSERT(block->hash_link); /*backptr to block NULL from free_block()*/
DBUG_ASSERT(!block->requests);
DBUG_ASSERT(block->prev_changed && *block->prev_changed == block);
DBUG_ASSERT(!block->next_used);
DBUG_ASSERT(!block->prev_used);
if (!hot && keycache->waiting_for_block.last_thread)
{
/* Signal that in the LRU warm sub-chain an available block has appeared */
struct st_my_thread_var *last_thread=
keycache->waiting_for_block.last_thread;
struct st_my_thread_var *first_thread= last_thread->next;
struct st_my_thread_var *next_thread= first_thread;
HASH_LINK *hash_link= (HASH_LINK *) first_thread->keycache_link;
struct st_my_thread_var *thread;
do
{
thread= next_thread;
next_thread= thread->next;
/*
We notify about the event all threads that ask
for the same page as the first thread in the queue
*/
if ((HASH_LINK *) thread->keycache_link == hash_link)
{
KEYCACHE_DBUG_PRINT("link_block: signal",
("thread %ld", (ulong) thread->id));
keycache_pthread_cond_signal(&thread->suspend);
unlink_from_queue(&keycache->waiting_for_block, thread);
block->requests++;
}
}
while (thread != last_thread);
hash_link->block= block;
/*
NOTE: We assigned the block to the hash_link and signalled the
requesting thread(s). But it is possible that other threads runs
first. These threads see the hash_link assigned to a block which
is assigned to another hash_link and not marked BLOCK_IN_SWITCH.
This can be a problem for functions that do not select the block
via its hash_link: flush and free. They do only see a block which
is in a "normal" state and don't know that it will be evicted soon.
We cannot set BLOCK_IN_SWITCH here because only one of the
requesting threads must handle the eviction. All others must wait
for it to complete. If we set the flag here, the threads would not
know who is in charge of the eviction. Without the flag, the first
thread takes the stick and sets the flag.
But we need to note in the block that is has been selected for
eviction. It must not be freed. The evicting thread will not
expect the block in the free list. Before freeing we could also
check if block->requests > 1. But I think including another flag
in the check of block->status is slightly more efficient and
probably easier to read.
*/
block->status|= BLOCK_IN_EVICTION;
KEYCACHE_THREAD_TRACE("link_block: after signaling");
#if defined(KEYCACHE_DEBUG)
KEYCACHE_DBUG_PRINT("link_block",
("linked,unlinked block %u status=%x #requests=%u #available=%u",
BLOCK_NUMBER(block), block->status,
block->requests, keycache->blocks_available));
#endif
return;
}
pins= hot ? &keycache->used_ins : &keycache->used_last;
ins= *pins;
if (ins)
{
ins->next_used->prev_used= &block->next_used;
block->next_used= ins->next_used;
block->prev_used= &ins->next_used;
ins->next_used= block;
if (at_end)
*pins= block;
}
else
{
/* The LRU ring is empty. Let the block point to itself. */
keycache->used_last= keycache->used_ins= block->next_used= block;
block->prev_used= &block->next_used;
}
KEYCACHE_THREAD_TRACE("link_block");
#if defined(KEYCACHE_DEBUG)
keycache->blocks_available++;
KEYCACHE_DBUG_PRINT("link_block",
("linked block %u:%1u status=%x #requests=%u #available=%u",
BLOCK_NUMBER(block), at_end, block->status,
block->requests, keycache->blocks_available));
KEYCACHE_DBUG_ASSERT((ulong) keycache->blocks_available <=
keycache->blocks_used);
#endif
}
|
O3
|
c
|
link_block:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %r12
testb %dl, %dl
je 0x9896c
leaq 0xb8(%r12), %r9
leaq 0xb0(%r12), %r10
xorl %r8d, %r8d
testb %dl, %dl
setne %r8b
movq %r9, %rax
cmoveq %r10, %rax
movq 0xb0(%r12,%r8,8), %rdx
testq %rdx, %rdx
je 0x98a2e
movq (%rdx), %rdi
movq %r14, 0x8(%rdi)
movq (%rdx), %rdi
movq %rdi, (%r14)
movq %rdx, 0x8(%r14)
movq %r14, (%rdx)
testb %cl, %cl
je 0x98a46
movq %r14, (%rax)
jmp 0x98a46
movq 0x120(%r12), %r15
testq %r15, %r15
je 0x98917
movq 0x88(%r15), %r13
movq 0xa8(%r13), %rax
movq %rax, -0x30(%rbp)
movq 0x88(%r13), %rbx
cmpq %rax, 0xa8(%r13)
jne 0x98a0b
movq 0x38(%r13), %rdi
testq %rdi, %rdi
jne 0x98a19
leaq 0x8(%r13), %rdi
callq 0x295b0
movq 0x88(%r13), %rax
cmpq %r13, %rax
je 0x989ee
movq 0x90(%r13), %rcx
movq %rcx, 0x90(%rax)
movq 0x88(%r13), %rax
movq %rax, (%rcx)
cmpq %r13, 0x120(%r12)
jne 0x989f8
movq 0x90(%r13), %rax
movq $-0x88, %rcx
addq %rcx, %rax
jmp 0x989f0
xorl %eax, %eax
movq %rax, 0x120(%r12)
movq $0x0, 0x88(%r13)
incl 0x38(%r14)
movq -0x30(%rbp), %rax
cmpq %r15, %r13
movq %rbx, %r13
jne 0x9898b
jmp 0x98a3d
leaq 0x2ed5f0(%rip), %rax # 0x386010
movq (%rax), %rax
callq *0x170(%rax)
jmp 0x989a4
movq %r14, (%r14)
movq %r14, (%r9)
movq %r14, (%r10)
movq %r14, 0x8(%r14)
jmp 0x98a46
movq %r14, 0x10(%rax)
orb $-0x80, 0x50(%r14)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
|
link_block_0:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
push rax
mov r14, rsi
mov r12, rdi
test dl, dl
jz short loc_9896C
loc_98917:
lea r9, [r12+0B8h]
lea r10, [r12+0B0h]
xor r8d, r8d
test dl, dl
setnz r8b
mov rax, r9
cmovz rax, r10
mov rdx, [r12+r8*8+0B0h]
test rdx, rdx
jz loc_98A2E
mov rdi, [rdx]
mov [rdi+8], r14
mov rdi, [rdx]
mov [r14], rdi
mov [r14+8], rdx
mov [rdx], r14
test cl, cl
jz loc_98A46
mov [rax], r14
jmp loc_98A46
loc_9896C:
mov r15, [r12+120h]
test r15, r15
jz short loc_98917
mov r13, [r15+88h]
mov rax, [r13+0A8h]
mov [rbp+var_30], rax
loc_9898B:
mov rbx, [r13+88h]
cmp [r13+0A8h], rax
jnz short loc_98A0B
mov rdi, [r13+38h]
test rdi, rdi
jnz short loc_98A19
loc_989A4:
lea rdi, [r13+8]
call _pthread_cond_signal
mov rax, [r13+88h]
cmp rax, r13
jz short loc_989EE
mov rcx, [r13+90h]
mov [rax+90h], rcx
mov rax, [r13+88h]
mov [rcx], rax
cmp [r12+120h], r13
jnz short loc_989F8
mov rax, [r13+90h]
mov rcx, 0FFFFFFFFFFFFFF78h
add rax, rcx
jmp short loc_989F0
loc_989EE:
xor eax, eax
loc_989F0:
mov [r12+120h], rax
loc_989F8:
mov qword ptr [r13+88h], 0
inc dword ptr [r14+38h]
mov rax, [rbp+var_30]
loc_98A0B:
cmp r13, r15
mov r13, rbx
jnz loc_9898B
jmp short loc_98A3D
loc_98A19:
lea rax, PSI_server
mov rax, [rax]
call qword ptr [rax+170h]
jmp loc_989A4
loc_98A2E:
mov [r14], r14
mov [r9], r14
mov [r10], r14
mov [r14+8], r14
jmp short loc_98A46
loc_98A3D:
mov [rax+10h], r14
or byte ptr [r14+50h], 80h
loc_98A46:
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
|
_QWORD * link_block_0(_QWORD *a1, long long a2, char a3, char a4)
{
_QWORD *result; // rax
long long v5; // rdx
_QWORD *v6; // r15
_QWORD *v7; // r13
_QWORD *v8; // rbx
_QWORD *v9; // rax
_QWORD *v10; // rcx
long long v11; // rax
bool v12; // zf
_QWORD *v13; // [rsp+0h] [rbp-30h]
if ( !a3 )
{
v6 = (_QWORD *)a1[36];
if ( v6 )
{
v7 = (_QWORD *)v6[17];
result = (_QWORD *)v7[21];
v13 = result;
while ( 1 )
{
v8 = (_QWORD *)v7[17];
if ( (_QWORD *)v7[21] == result )
break;
LABEL_18:
v12 = v7 == v6;
v7 = v8;
if ( v12 )
{
result[2] = a2;
*(_BYTE *)(a2 + 80) |= 0x80u;
return result;
}
}
if ( v7[7] )
PSI_server[46]();
pthread_cond_signal(v7 + 1);
v9 = (_QWORD *)v7[17];
if ( v9 == v7 )
{
v11 = 0LL;
}
else
{
v10 = (_QWORD *)v7[18];
v9[18] = v10;
*v10 = v7[17];
if ( (_QWORD *)a1[36] != v7 )
{
LABEL_17:
v7[17] = 0LL;
++*(_DWORD *)(a2 + 56);
result = v13;
goto LABEL_18;
}
v11 = v7[18] - 136LL;
}
a1[36] = v11;
goto LABEL_17;
}
}
result = a1 + 23;
if ( !a3 )
result = a1 + 22;
v5 = a1[(a3 != 0) + 22];
if ( v5 )
{
*(_QWORD *)(*(_QWORD *)v5 + 8LL) = a2;
*(_QWORD *)a2 = *(_QWORD *)v5;
*(_QWORD *)(a2 + 8) = v5;
*(_QWORD *)v5 = a2;
if ( a4 )
*result = a2;
}
else
{
*(_QWORD *)a2 = a2;
a1[23] = a2;
a1[22] = a2;
*(_QWORD *)(a2 + 8) = a2;
}
return result;
}
|
link_block:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
PUSH RAX
MOV R14,RSI
MOV R12,RDI
TEST DL,DL
JZ 0x0019896c
LAB_00198917:
LEA R9,[R12 + 0xb8]
LEA R10,[R12 + 0xb0]
XOR R8D,R8D
TEST DL,DL
SETNZ R8B
MOV RAX,R9
CMOVZ RAX,R10
MOV RDX,qword ptr [R12 + R8*0x8 + 0xb0]
TEST RDX,RDX
JZ 0x00198a2e
MOV RDI,qword ptr [RDX]
MOV qword ptr [RDI + 0x8],R14
MOV RDI,qword ptr [RDX]
MOV qword ptr [R14],RDI
MOV qword ptr [R14 + 0x8],RDX
MOV qword ptr [RDX],R14
TEST CL,CL
JZ 0x00198a46
MOV qword ptr [RAX],R14
JMP 0x00198a46
LAB_0019896c:
MOV R15,qword ptr [R12 + 0x120]
TEST R15,R15
JZ 0x00198917
MOV R13,qword ptr [R15 + 0x88]
MOV RAX,qword ptr [R13 + 0xa8]
MOV qword ptr [RBP + -0x30],RAX
LAB_0019898b:
MOV RBX,qword ptr [R13 + 0x88]
CMP qword ptr [R13 + 0xa8],RAX
JNZ 0x00198a0b
MOV RDI,qword ptr [R13 + 0x38]
TEST RDI,RDI
JNZ 0x00198a19
LAB_001989a4:
LEA RDI,[R13 + 0x8]
CALL 0x001295b0
MOV RAX,qword ptr [R13 + 0x88]
CMP RAX,R13
JZ 0x001989ee
MOV RCX,qword ptr [R13 + 0x90]
MOV qword ptr [RAX + 0x90],RCX
MOV RAX,qword ptr [R13 + 0x88]
MOV qword ptr [RCX],RAX
CMP qword ptr [R12 + 0x120],R13
JNZ 0x001989f8
MOV RAX,qword ptr [R13 + 0x90]
MOV RCX,-0x88
ADD RAX,RCX
JMP 0x001989f0
LAB_001989ee:
XOR EAX,EAX
LAB_001989f0:
MOV qword ptr [R12 + 0x120],RAX
LAB_001989f8:
MOV qword ptr [R13 + 0x88],0x0
INC dword ptr [R14 + 0x38]
MOV RAX,qword ptr [RBP + -0x30]
LAB_00198a0b:
CMP R13,R15
MOV R13,RBX
JNZ 0x0019898b
JMP 0x00198a3d
LAB_00198a19:
LEA RAX,[0x486010]
MOV RAX,qword ptr [RAX]
CALL qword ptr [RAX + 0x170]
JMP 0x001989a4
LAB_00198a2e:
MOV qword ptr [R14],R14
MOV qword ptr [R9],R14
MOV qword ptr [R10],R14
MOV qword ptr [R14 + 0x8],R14
JMP 0x00198a46
LAB_00198a3d:
MOV qword ptr [RAX + 0x10],R14
OR byte ptr [R14 + 0x50],0x80
LAB_00198a46:
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
void link_block(long param_1,long *param_2,char param_3,char param_4)
{
long *plVar1;
long lVar2;
long lVar3;
long lVar4;
int8 *puVar5;
long lVar6;
long lVar7;
bool bVar8;
if ((param_3 == '\0') && (lVar2 = *(long *)(param_1 + 0x120), lVar2 != 0)) {
lVar3 = *(long *)(*(long *)(lVar2 + 0x88) + 0xa8);
lVar7 = *(long *)(lVar2 + 0x88);
do {
lVar4 = *(long *)(lVar7 + 0x88);
if (*(long *)(lVar7 + 0xa8) == lVar3) {
if (*(long *)(lVar7 + 0x38) != 0) {
(**(code **)(PSI_server + 0x170))();
}
pthread_cond_signal((pthread_cond_t *)(lVar7 + 8));
if (*(long *)(lVar7 + 0x88) == lVar7) {
lVar6 = 0;
LAB_001989f0:
*(long *)(param_1 + 0x120) = lVar6;
}
else {
puVar5 = *(int8 **)(lVar7 + 0x90);
*(int8 **)(*(long *)(lVar7 + 0x88) + 0x90) = puVar5;
*puVar5 = *(int8 *)(lVar7 + 0x88);
if (*(long *)(param_1 + 0x120) == lVar7) {
lVar6 = *(long *)(lVar7 + 0x90) + -0x88;
goto LAB_001989f0;
}
}
*(int8 *)(lVar7 + 0x88) = 0;
*(int *)(param_2 + 7) = (int)param_2[7] + 1;
}
bVar8 = lVar7 != lVar2;
lVar7 = lVar4;
} while (bVar8);
*(long **)(lVar3 + 0x10) = param_2;
*(byte *)(param_2 + 10) = *(byte *)(param_2 + 10) | 0x80;
}
else {
puVar5 = (int8 *)(param_1 + 0xb8);
if (param_3 == '\0') {
puVar5 = (int8 *)(param_1 + 0xb0);
}
plVar1 = *(long **)(param_1 + 0xb0 + (ulong)(param_3 != '\0') * 8);
if (plVar1 == (long *)0x0) {
*param_2 = (long)param_2;
*(int8 *)(param_1 + 0xb8) = param_2;
*(int8 *)(param_1 + 0xb0) = param_2;
param_2[1] = (long)param_2;
}
else {
*(long **)(*plVar1 + 8) = param_2;
*param_2 = *plVar1;
param_2[1] = (long)plVar1;
*plVar1 = (long)param_2;
if (param_4 != '\0') {
*puVar5 = param_2;
}
}
}
return;
}
|
|
57,267
|
expected_token_error
|
fabiosvm[P]rak/src/compiler.c
|
static inline void expected_token_error(RakError *err, RakTokenKind kind, RakToken tok)
{
if (tok.kind == RAK_TOKEN_KIND_EOF)
{
rak_error_set(err, "expected %s, but got end of file at %d:%d",
rak_token_kind_to_cstr(kind), tok.ln, tok.col);
return;
}
rak_error_set(err, "expected %s, but got '%.*s' at %d:%d",
rak_token_kind_to_cstr(kind), tok.len, tok.chars, tok.ln, tok.col);
}
|
O2
|
c
|
expected_token_error:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
leaq 0x30(%rsp), %r14
movl (%r14), %ebp
movl %esi, %edi
callq 0x54dc
testl %ebp, %ebp
je 0x3feb
movl 0xc(%r14), %ecx
movq 0x10(%r14), %r8
movl 0x4(%r14), %r9d
movl 0x8(%r14), %edx
movl %edx, (%rsp)
leaq 0x5529(%rip), %rsi # 0x94fe
movq %rbx, %rdi
movq %rax, %rdx
xorl %eax, %eax
callq 0x5408
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
retq
movl 0x4(%r14), %ecx
movl 0x8(%r14), %r8d
leaq 0x54da(%rip), %rsi # 0x94d4
movq %rbx, %rdi
movq %rax, %rdx
xorl %eax, %eax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
jmp 0x5408
|
expected_token_error:
push rbp
push r14
push rbx
sub rsp, 10h
mov rbx, rdi
lea r14, [rsp+28h+arg_0]
mov ebp, [r14]
mov edi, esi
call rak_token_kind_to_cstr
test ebp, ebp
jz short loc_3FEB
mov ecx, [r14+0Ch]
mov r8, [r14+10h]
mov r9d, [r14+4]
mov edx, [r14+8]
mov [rsp+28h+var_28], edx
lea rsi, aExpectedSButGo; "expected %s, but got '%.*s' at %d:%d"
mov rdi, rbx
mov rdx, rax
xor eax, eax
call rak_error_set
add rsp, 10h
pop rbx
pop r14
pop rbp
retn
loc_3FEB:
mov ecx, [r14+4]
mov r8d, [r14+8]
lea rsi, aExpectedSButGo_0; "expected %s, but got end of file at %d:"...
mov rdi, rbx
mov rdx, rax
xor eax, eax
add rsp, 10h
pop rbx
pop r14
pop rbp
jmp rak_error_set
|
long long expected_token_error(
int a1,
unsigned int a2,
_DWORD a3,
_DWORD a4,
_DWORD a5,
_DWORD a6,
long long a7,
long long a8,
int a9)
{
int v9; // eax
int v10; // r9d
v9 = rak_token_kind_to_cstr(a2);
if ( (_DWORD)a7 )
return rak_error_set(a1, (unsigned int)"expected %s, but got '%.*s' at %d:%d", v9, HIDWORD(a8), a9, HIDWORD(a7));
else
return rak_error_set(a1, (unsigned int)"expected %s, but got end of file at %d:%d", v9, HIDWORD(a7), a8, v10);
}
|
expected_token_error:
PUSH RBP
PUSH R14
PUSH RBX
SUB RSP,0x10
MOV RBX,RDI
LEA R14,[RSP + 0x30]
MOV EBP,dword ptr [R14]
MOV EDI,ESI
CALL 0x001054dc
TEST EBP,EBP
JZ 0x00103feb
MOV ECX,dword ptr [R14 + 0xc]
MOV R8,qword ptr [R14 + 0x10]
MOV R9D,dword ptr [R14 + 0x4]
MOV EDX,dword ptr [R14 + 0x8]
MOV dword ptr [RSP],EDX
LEA RSI,[0x1094fe]
MOV RDI,RBX
MOV RDX,RAX
XOR EAX,EAX
CALL 0x00105408
ADD RSP,0x10
POP RBX
POP R14
POP RBP
RET
LAB_00103feb:
MOV ECX,dword ptr [R14 + 0x4]
MOV R8D,dword ptr [R14 + 0x8]
LEA RSI,[0x1094d4]
MOV RDI,RBX
MOV RDX,RAX
XOR EAX,EAX
ADD RSP,0x10
POP RBX
POP R14
POP RBP
JMP 0x00105408
|
void expected_token_error(int8 param_1,int4 param_2)
{
int8 uVar1;
int iStack0000000000000008;
int4 uStack000000000000000c;
int4 uStack0000000000000010;
int4 uStack0000000000000014;
int8 in_stack_00000018;
uVar1 = rak_token_kind_to_cstr(param_2);
if (iStack0000000000000008 != 0) {
rak_error_set(param_1,"expected %s, but got \'%.*s\' at %d:%d",uVar1,uStack0000000000000014,
in_stack_00000018,uStack000000000000000c,uStack0000000000000010);
return;
}
rak_error_set(param_1,"expected %s, but got end of file at %d:%d",uVar1,uStack000000000000000c,
uStack0000000000000010);
return;
}
|
|
57,268
|
my_timer_init_resolution
|
eloqsql/mysys/my_rdtsc.c
|
static ulonglong my_timer_init_resolution(ulonglong (*this_timer)(void),
ulonglong overhead_times_2)
{
ulonglong time1, time2;
ulonglong best_jump;
int i, jumps, divisible_by_1000, divisible_by_1000000;
divisible_by_1000= divisible_by_1000000= 0;
best_jump= 1000000;
for (i= jumps= 0; jumps < 3 && i < MY_TIMER_ITERATIONS * 10; ++i)
{
time1= this_timer();
time2= this_timer();
time2-= time1;
if (time2)
{
++jumps;
if (!(time2 % 1000))
{
++divisible_by_1000;
if (!(time2 % 1000000))
++divisible_by_1000000;
}
if (best_jump > time2)
best_jump= time2;
/* For milliseconds, one jump is enough. */
if (overhead_times_2 == 0)
break;
}
}
if (jumps == 3)
{
if (jumps == divisible_by_1000000)
return 1000000;
if (jumps == divisible_by_1000)
return 1000;
}
if (best_jump > overhead_times_2)
return best_jump;
return 1;
}
|
O3
|
c
|
my_timer_init_resolution:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rsi, -0x38(%rbp)
movq %rdi, %r14
movl $0xf4240, %r12d # imm = 0xF4240
movl $0x0, -0x30(%rbp)
movl $0x0, -0x2c(%rbp)
xorl %r13d, %r13d
xorl %ebx, %ebx
callq *%r14
movq %rax, %r15
callq *%r14
subq %r15, %rax
je 0x47d06
movq %rax, %rcx
movabsq $0x1cac083126e978d5, %rdx # imm = 0x1CAC083126E978D5
imulq %rdx, %rcx
rorq $0x3, %rcx
movabsq $0x4189374bc6a7ef, %rdx # imm = 0x4189374BC6A7EF
cmpq %rdx, %rcx
ja 0x47cf5
movq %rax, %rcx
movabsq $0x790fb65668c26139, %rdx # imm = 0x790FB65668C26139
imulq %rdx, %rcx
rorq $0x6, %rcx
incl -0x2c(%rbp)
movabsq $0x10c6f7a0b5ee, %rdx # imm = 0x10C6F7A0B5EE
cmpq %rdx, %rcx
adcl $0x0, -0x30(%rbp)
incl %r13d
cmpq %rax, %r12
cmovaeq %rax, %r12
cmpq $0x0, -0x38(%rbp)
je 0x47d19
cmpl $0x2, %r13d
jg 0x47d19
leal 0x1(%rbx), %eax
cmpl $0x98967f, %ebx # imm = 0x98967F
movl %eax, %ebx
jb 0x47c9a
cmpl $0x3, %r13d
jne 0x47d35
movl $0xf4240, %eax # imm = 0xF4240
cmpl $0x3, -0x30(%rbp)
je 0x47d42
movl $0x3e8, %eax # imm = 0x3E8
cmpl $0x3, -0x2c(%rbp)
je 0x47d42
cmpq -0x38(%rbp), %r12
movl $0x1, %eax
cmovaq %r12, %rax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
|
my_timer_init_resolution:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 18h
mov [rbp+var_38], rsi
mov r14, rdi
mov r12d, offset unk_F4240
mov [rbp+var_30], 0
mov [rbp+var_2C], 0
xor r13d, r13d
xor ebx, ebx
loc_47C9A:
call r14
mov r15, rax
call r14
sub rax, r15
jz short loc_47D06
mov rcx, rax
mov rdx, 1CAC083126E978D5h
imul rcx, rdx
ror rcx, 3
mov rdx, 4189374BC6A7EFh
cmp rcx, rdx
ja short loc_47CF5
mov rcx, rax
mov rdx, 790FB65668C26139h
imul rcx, rdx
ror rcx, 6
inc [rbp+var_2C]
mov rdx, 10C6F7A0B5EEh
cmp rcx, rdx
adc [rbp+var_30], 0
loc_47CF5:
inc r13d
cmp r12, rax
cmovnb r12, rax
cmp [rbp+var_38], 0
jz short loc_47D19
loc_47D06:
cmp r13d, 2
jg short loc_47D19
lea eax, [rbx+1]
cmp ebx, 98967Fh
mov ebx, eax
jb short loc_47C9A
loc_47D19:
cmp r13d, 3
jnz short loc_47D35
mov eax, offset unk_F4240
cmp [rbp+var_30], 3
jz short loc_47D42
mov eax, 3E8h
cmp [rbp+var_2C], 3
jz short loc_47D42
loc_47D35:
cmp r12, [rbp+var_38]
mov eax, 1
cmova rax, r12
loc_47D42:
add rsp, 18h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
|
void * my_timer_init_resolution(long long (*a1)(void), unsigned long long a2)
{
void *v2; // r12
int v3; // r13d
unsigned int v4; // ebx
long long v5; // r15
unsigned long long v6; // rax
void *result; // rax
int v9; // [rsp+10h] [rbp-30h]
int v10; // [rsp+14h] [rbp-2Ch]
v2 = &unk_F4240;
v9 = 0;
v10 = 0;
v3 = 0;
v4 = 0;
do
{
v5 = a1();
v6 = a1() - v5;
if ( v6 )
{
if ( __ROR8__(0x1CAC083126E978D5LL * v6, 3) <= 0x4189374BC6A7EFuLL )
{
++v10;
v9 += __ROR8__(0x790FB65668C26139LL * v6, 6) < 0x10C6F7A0B5EEuLL;
}
++v3;
if ( (unsigned long long)v2 >= v6 )
v2 = (void *)v6;
if ( !a2 )
break;
}
if ( v3 > 2 )
break;
}
while ( v4++ < 0x98967F );
if ( v3 != 3 || (result = &unk_F4240, v9 != 3) && (result = &stru_3E8, v10 != 3) )
{
result = &dword_0 + 1;
if ( (unsigned long long)v2 > a2 )
return v2;
}
return result;
}
|
my_timer_init_resolution:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x18
MOV qword ptr [RBP + -0x38],RSI
MOV R14,RDI
MOV R12D,0xf4240
MOV dword ptr [RBP + -0x30],0x0
MOV dword ptr [RBP + -0x2c],0x0
XOR R13D,R13D
XOR EBX,EBX
LAB_00147c9a:
CALL R14
MOV R15,RAX
CALL R14
SUB RAX,R15
JZ 0x00147d06
MOV RCX,RAX
MOV RDX,0x1cac083126e978d5
IMUL RCX,RDX
ROR RCX,0x3
MOV RDX,0x4189374bc6a7ef
CMP RCX,RDX
JA 0x00147cf5
MOV RCX,RAX
MOV RDX,0x790fb65668c26139
IMUL RCX,RDX
ROR RCX,0x6
INC dword ptr [RBP + -0x2c]
MOV RDX,0x10c6f7a0b5ee
CMP RCX,RDX
ADC dword ptr [RBP + -0x30],0x0
LAB_00147cf5:
INC R13D
CMP R12,RAX
CMOVNC R12,RAX
CMP qword ptr [RBP + -0x38],0x0
JZ 0x00147d19
LAB_00147d06:
CMP R13D,0x2
JG 0x00147d19
LEA EAX,[RBX + 0x1]
CMP EBX,0x98967f
MOV EBX,EAX
JC 0x00147c9a
LAB_00147d19:
CMP R13D,0x3
JNZ 0x00147d35
MOV EAX,0xf4240
CMP dword ptr [RBP + -0x30],0x3
JZ 0x00147d42
MOV EAX,0x3e8
CMP dword ptr [RBP + -0x2c],0x3
JZ 0x00147d42
LAB_00147d35:
CMP R12,qword ptr [RBP + -0x38]
MOV EAX,0x1
CMOVA RAX,R12
LAB_00147d42:
ADD RSP,0x18
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
ulong my_timer_init_resolution(code *param_1,ulong param_2)
{
long lVar1;
long lVar2;
ulong uVar3;
uint uVar4;
ulong uVar5;
int iVar6;
bool bVar7;
int4 local_38;
int4 local_34;
uVar5 = 1000000;
local_38 = 0;
local_34 = 0;
iVar6 = 0;
uVar4 = 0;
do {
lVar1 = (*param_1)();
lVar2 = (*param_1)();
uVar3 = lVar2 - lVar1;
if (uVar3 != 0) {
if ((uVar3 * 0x1cac083126e978d5 >> 3 | uVar3 * 0x1cac083126e978d5 << 0x3d) < 0x4189374bc6a7f0)
{
local_34 = local_34 + 1;
local_38 = local_38 +
(uint)((uVar3 * 0x790fb65668c26139 >> 6 | uVar3 * 0x790fb65668c26139 << 0x3a) <
0x10c6f7a0b5ee);
}
iVar6 = iVar6 + 1;
if (uVar3 <= uVar5) {
uVar5 = uVar3;
}
if (param_2 == 0) {
LAB_00147d19:
if (((iVar6 != 3) || ((uVar3 = 1000000, local_38 != 3 && (uVar3 = 1000, local_34 != 3)))) &&
(uVar3 = 1, param_2 < uVar5)) {
uVar3 = uVar5;
}
return uVar3;
}
}
if ((2 < iVar6) || (bVar7 = 0x98967e < uVar4, uVar4 = uVar4 + 1, bVar7)) goto LAB_00147d19;
} while( true );
}
|
|
57,269
|
my_numchars_mb
|
eloqsql/strings/ctype-mb.c
|
size_t my_numchars_mb(CHARSET_INFO *cs __attribute__((unused)),
const char *pos, const char *end)
{
register size_t count= 0;
while (pos < end)
{
uint mb_len;
pos+= (mb_len= my_ismbchar(cs,pos,end)) ? mb_len : 1;
count++;
}
return count;
}
|
O3
|
c
|
my_numchars_mb:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
cmpq %rdx, %rsi
jae 0x3f6a1
movq %rdx, %rbx
movq %rsi, %r15
movq %rdi, %r12
xorl %r14d, %r14d
movl $0x1, %r13d
movq 0xb8(%r12), %rax
movq %r12, %rdi
movq %r15, %rsi
movq %rbx, %rdx
callq *0xc0(%rax)
cmpl $0x2, %eax
cmovbl %r13d, %eax
cmovll %r13d, %eax
addq %rax, %r15
incq %r14
cmpq %rbx, %r15
jb 0x3f672
jmp 0x3f6a4
xorl %r14d, %r14d
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
|
my_numchars_mb:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
push rax
cmp rsi, rdx
jnb short loc_3F6A1
mov rbx, rdx
mov r15, rsi
mov r12, rdi
xor r14d, r14d
mov r13d, 1
loc_3F672:
mov rax, [r12+0B8h]
mov rdi, r12
mov rsi, r15
mov rdx, rbx
call qword ptr [rax+0C0h]
cmp eax, 2
cmovb eax, r13d
cmovl eax, r13d
add r15, rax
inc r14
cmp r15, rbx
jb short loc_3F672
jmp short loc_3F6A4
loc_3F6A1:
xor r14d, r14d
loc_3F6A4:
mov rax, r14
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
|
long long my_numchars_mb(long long a1, unsigned long long a2, unsigned long long a3)
{
unsigned long long v4; // r15
long long v5; // r14
long long v6; // rax
bool v7; // cc
if ( a2 >= a3 )
return 0LL;
v4 = a2;
v5 = 0LL;
do
{
v6 = (*(long long ( **)(long long, unsigned long long, unsigned long long))(*(_QWORD *)(a1 + 184) + 192LL))(
a1,
v4,
a3);
v7 = (int)v6 < 2;
if ( (unsigned int)v6 < 2 )
v6 = 1LL;
if ( v7 )
v6 = 1LL;
v4 += v6;
++v5;
}
while ( v4 < a3 );
return v5;
}
|
my_numchars_mb:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
PUSH RAX
CMP RSI,RDX
JNC 0x0013f6a1
MOV RBX,RDX
MOV R15,RSI
MOV R12,RDI
XOR R14D,R14D
MOV R13D,0x1
LAB_0013f672:
MOV RAX,qword ptr [R12 + 0xb8]
MOV RDI,R12
MOV RSI,R15
MOV RDX,RBX
CALL qword ptr [RAX + 0xc0]
CMP EAX,0x2
CMOVC EAX,R13D
CMOVL EAX,R13D
ADD R15,RAX
INC R14
CMP R15,RBX
JC 0x0013f672
JMP 0x0013f6a4
LAB_0013f6a1:
XOR R14D,R14D
LAB_0013f6a4:
MOV RAX,R14
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
long my_numchars_mb(long param_1,ulong param_2,ulong param_3)
{
uint uVar1;
ulong uVar2;
long lVar3;
if (param_2 < param_3) {
lVar3 = 0;
do {
uVar1 = (**(code **)(*(long *)(param_1 + 0xb8) + 0xc0))(param_1,param_2,param_3);
uVar2 = (ulong)uVar1;
if (uVar1 < 2) {
uVar2 = 1;
}
if ((int)uVar1 < 2) {
uVar2 = 1;
}
param_2 = param_2 + uVar2;
lVar3 = lVar3 + 1;
} while (param_2 < param_3);
}
else {
lVar3 = 0;
}
return lVar3;
}
|
|
57,270
|
mp_sqrtrem1
|
bluesky950520[P]quickjs/libbf.c
|
static limb_t mp_sqrtrem1(limb_t *pr, limb_t a)
{
limb_t s1, r1, s, r, q, u, num;
/* use a table for the 16 -> 8 bit sqrt */
s1 = sqrt_table[(a >> (LIMB_BITS - 8)) - 64];
r1 = (a >> (LIMB_BITS - 16)) - s1 * s1;
if (r1 > 2 * s1) {
r1 -= 2 * s1 + 1;
s1++;
}
/* one iteration to get a 32 -> 16 bit sqrt */
num = (r1 << 8) | ((a >> (LIMB_BITS - 32 + 8)) & 0xff);
q = num / (2 * s1); /* q <= 2^8 */
u = num % (2 * s1);
s = (s1 << 8) + q;
r = (u << 8) | ((a >> (LIMB_BITS - 32)) & 0xff);
r -= q * q;
if ((slimb_t)r < 0) {
s--;
r += 2 * s + 1;
}
#if LIMB_BITS == 64
s1 = s;
r1 = r;
/* one more iteration for 64 -> 32 bit sqrt */
num = (r1 << 16) | ((a >> (LIMB_BITS - 64 + 16)) & 0xffff);
q = num / (2 * s1); /* q <= 2^16 */
u = num % (2 * s1);
s = (s1 << 16) + q;
r = (u << 16) | ((a >> (LIMB_BITS - 64)) & 0xffff);
r -= q * q;
if ((slimb_t)r < 0) {
s--;
r += 2 * s + 1;
}
#endif
*pr = r;
return s;
}
|
O1
|
c
|
mp_sqrtrem1:
pushq %rbx
movq %rsi, %rdx
movq %rsi, %rax
movq %rsi, %r8
movl %esi, %ecx
movzwl %si, %r9d
shrq $0x38, %rsi
leaq 0x1b13c(%rip), %r10 # 0xa1670
movzwl -0x80(%r10,%rsi,2), %esi
shrq $0x30, %rdx
movq %rsi, %r10
imulq %rsi, %r10
subq %r10, %rdx
leal (%rsi,%rsi), %r10d
xorl %r11d, %r11d
xorl %ebx, %ebx
cmpq %r10, %rdx
notq %r10
cmovbeq %r11, %r10
seta %bl
addl %esi, %ebx
addq %rdx, %r10
shlq $0x8, %r10
shrq $0x28, %rax
movl $0xff, %esi
andq %rsi, %rax
orq %r10, %rax
leal (%rbx,%rbx), %r10d
xorl %edx, %edx
divq %r10
shll $0x8, %ebx
shrq $0x20, %r8
andq %rsi, %r8
leaq (%rbx,%rax), %rsi
shll $0x8, %edx
leaq (%rbx,%rax), %r10
decq %r10
imulq %rax, %rax
subq %rax, %r8
addq %rdx, %r8
leaq -0x1(%rsi,%rsi), %rax
cmovnsq %rsi, %r10
movq %r8, %rdx
sarq $0x3f, %rdx
andq %rax, %rdx
addq %r8, %rdx
shlq $0x10, %rdx
shrl $0x10, %ecx
orq %rdx, %rcx
leaq (%r10,%r10), %rsi
movq %rcx, %rax
xorl %edx, %edx
divq %rsi
shlq $0x10, %r10
leaq (%r10,%rax), %rsi
shlq $0x10, %rdx
leaq (%r10,%rax), %rcx
decq %rcx
imulq %rax, %rax
subq %rax, %r9
addq %rdx, %r9
leaq -0x1(%rsi,%rsi), %rax
cmovnsq %rsi, %rcx
movq %r9, %rdx
sarq $0x3f, %rdx
andq %rax, %rdx
addq %r9, %rdx
movq %rdx, (%rdi)
movq %rcx, %rax
popq %rbx
retq
|
mp_sqrtrem1:
push rbx
mov rdx, rsi
mov rax, rsi
mov r8, rsi
mov ecx, esi
movzx r9d, si
shr rsi, 38h
lea r10, sqrt_table
movzx esi, word ptr [r10+rsi*2-80h]
shr rdx, 30h
mov r10, rsi
imul r10, rsi
sub rdx, r10
lea r10d, [rsi+rsi]
xor r11d, r11d
xor ebx, ebx
cmp rdx, r10
not r10
cmovbe r10, r11
setnbe bl
add ebx, esi
add r10, rdx
shl r10, 8
shr rax, 28h
mov esi, 0FFh
and rax, rsi
or rax, r10
lea r10d, [rbx+rbx]
xor edx, edx
div r10
shl ebx, 8
shr r8, 20h
and r8, rsi
lea rsi, [rbx+rax]
shl edx, 8
lea r10, [rbx+rax]
dec r10
imul rax, rax
sub r8, rax
add r8, rdx
lea rax, [rsi+rsi-1]
cmovns r10, rsi
mov rdx, r8
sar rdx, 3Fh
and rdx, rax
add rdx, r8
shl rdx, 10h
shr ecx, 10h
or rcx, rdx
lea rsi, [r10+r10]
mov rax, rcx
xor edx, edx
div rsi
shl r10, 10h
lea rsi, [r10+rax]
shl rdx, 10h
lea rcx, [r10+rax]
dec rcx
imul rax, rax
sub r9, rax
add r9, rdx
lea rax, [rsi+rsi-1]
cmovns rcx, rsi
mov rdx, r9
sar rdx, 3Fh
and rdx, rax
add rdx, r9
mov [rdi], rdx
mov rax, rcx
pop rbx
retn
|
unsigned long long mp_sqrtrem1(_QWORD *a1, unsigned long long a2)
{
unsigned __int8 v3; // rax^5
unsigned __int8 v4; // r8^4
unsigned int v5; // ecx
long long v6; // r9
long long v7; // rsi
unsigned long long v8; // rdx
unsigned long long v9; // r10
int v10; // ebx
bool v11; // cf
bool v12; // zf
bool v13; // cc
long long v14; // r10
int v15; // ebx
unsigned long long v16; // rax
unsigned long long v17; // rtt
unsigned long long v18; // rsi
unsigned long long v19; // r10
long long v20; // r8
unsigned long long v21; // rax
unsigned long long v22; // rtt
unsigned long long v23; // rsi
unsigned long long v24; // rcx
signed long long v25; // r9
v3 = BYTE5(a2);
v4 = BYTE4(a2);
v5 = a2;
v6 = (unsigned __int16)a2;
v7 = sqrt_table[HIBYTE(a2) - 64];
v8 = HIWORD(a2) - v7 * v7;
v9 = (unsigned int)(2 * v7);
v10 = 0;
v11 = v8 < v9;
v12 = v8 == v9;
v13 = v8 <= v9;
v14 = ~v9;
if ( v13 )
v14 = 0LL;
LOBYTE(v10) = !v11 && !v12;
v15 = v7 + v10;
v17 = ((v8 + v14) << 8) | v3;
v16 = v17 / (unsigned int)(2 * v15);
v18 = (unsigned int)(v15 << 8) + v16;
v19 = v18 - 1;
v20 = ((unsigned int)(v17 % (unsigned int)(2 * v15)) << 8) + v4 - v16 * v16;
if ( v20 >= 0 )
v19 = (unsigned int)(v15 << 8) + v16;
v22 = ((v20 + ((2 * v18 - 1) & (v20 >> 63))) << 16) | HIWORD(v5);
v21 = v22 / (2 * v19);
v23 = (v19 << 16) + v21;
v24 = v23 - 1;
v25 = ((v22 % (2 * v19)) << 16) + v6 - v21 * v21;
if ( v25 >= 0 )
v24 = (v19 << 16) + v21;
*a1 = v25 + ((2 * v23 - 1) & (v25 >> 63));
return v24;
}
|
mp_sqrtrem1:
PUSH RBX
MOV RDX,RSI
MOV RAX,RSI
MOV R8,RSI
MOV ECX,ESI
MOVZX R9D,SI
SHR RSI,0x38
LEA R10,[0x1a1670]
MOVZX ESI,word ptr [R10 + RSI*0x2 + -0x80]
SHR RDX,0x30
MOV R10,RSI
IMUL R10,RSI
SUB RDX,R10
LEA R10D,[RSI + RSI*0x1]
XOR R11D,R11D
XOR EBX,EBX
CMP RDX,R10
NOT R10
CMOVBE R10,R11
SETA BL
ADD EBX,ESI
ADD R10,RDX
SHL R10,0x8
SHR RAX,0x28
MOV ESI,0xff
AND RAX,RSI
OR RAX,R10
LEA R10D,[RBX + RBX*0x1]
XOR EDX,EDX
DIV R10
SHL EBX,0x8
SHR R8,0x20
AND R8,RSI
LEA RSI,[RBX + RAX*0x1]
SHL EDX,0x8
LEA R10,[RBX + RAX*0x1]
DEC R10
IMUL RAX,RAX
SUB R8,RAX
ADD R8,RDX
LEA RAX,[RSI + RSI*0x1 + -0x1]
CMOVNS R10,RSI
MOV RDX,R8
SAR RDX,0x3f
AND RDX,RAX
ADD RDX,R8
SHL RDX,0x10
SHR ECX,0x10
OR RCX,RDX
LEA RSI,[R10 + R10*0x1]
MOV RAX,RCX
XOR EDX,EDX
DIV RSI
SHL R10,0x10
LEA RSI,[R10 + RAX*0x1]
SHL RDX,0x10
LEA RCX,[R10 + RAX*0x1]
DEC RCX
IMUL RAX,RAX
SUB R9,RAX
ADD R9,RDX
LEA RAX,[RSI + RSI*0x1 + -0x1]
CMOVNS RCX,RSI
MOV RDX,R9
SAR RDX,0x3f
AND RDX,RAX
ADD RDX,R9
MOV qword ptr [RDI],RDX
MOV RAX,RCX
POP RBX
RET
|
long mp_sqrtrem1(long *param_1,ulong param_2)
{
long lVar1;
ushort uVar2;
uint uVar3;
ulong uVar4;
long lVar5;
ulong uVar6;
int iVar7;
ulong uVar8;
long lVar9;
uVar2 = *(ushort *)(mp_pow_dec + (param_2 >> 0x38) * 2 + 0x40);
uVar6 = (param_2 >> 0x30) - (ulong)uVar2 * (ulong)uVar2;
uVar8 = (ulong)((uint)uVar2 + (uint)uVar2);
uVar4 = ~uVar8;
if (uVar6 <= uVar8) {
uVar4 = 0;
}
iVar7 = (uint)(uVar8 < uVar6) + (uint)uVar2;
uVar4 = param_2 >> 0x28 & 0xff | (uVar4 + uVar6) * 0x100;
uVar3 = iVar7 * 2;
uVar6 = uVar4 / uVar3;
uVar8 = (ulong)(uint)(iVar7 * 0x100);
lVar1 = uVar8 + uVar6;
lVar9 = ((param_2 >> 0x20 & 0xff) - uVar6 * uVar6) +
(ulong)(uint)((int)(uVar4 % (ulong)uVar3) << 8);
lVar5 = uVar8 + uVar6 + -1;
if (-1 < lVar9) {
lVar5 = lVar1;
}
uVar6 = param_2 >> 0x10 & 0xffff | ((lVar9 >> 0x3f & lVar1 * 2 - 1U) + lVar9) * 0x10000;
uVar4 = uVar6 / (ulong)(lVar5 * 2);
lVar1 = lVar5 * 0x10000 + uVar4;
lVar9 = ((param_2 & 0xffff) - uVar4 * uVar4) + (uVar6 % (ulong)(lVar5 * 2)) * 0x10000;
lVar5 = lVar5 * 0x10000 + uVar4 + -1;
if (-1 < lVar9) {
lVar5 = lVar1;
}
*param_1 = (lVar9 >> 0x3f & lVar1 * 2 - 1U) + lVar9;
return lVar5;
}
|
|
57,271
|
mp_sqrtrem1
|
bluesky950520[P]quickjs/libbf.c
|
static limb_t mp_sqrtrem1(limb_t *pr, limb_t a)
{
limb_t s1, r1, s, r, q, u, num;
/* use a table for the 16 -> 8 bit sqrt */
s1 = sqrt_table[(a >> (LIMB_BITS - 8)) - 64];
r1 = (a >> (LIMB_BITS - 16)) - s1 * s1;
if (r1 > 2 * s1) {
r1 -= 2 * s1 + 1;
s1++;
}
/* one iteration to get a 32 -> 16 bit sqrt */
num = (r1 << 8) | ((a >> (LIMB_BITS - 32 + 8)) & 0xff);
q = num / (2 * s1); /* q <= 2^8 */
u = num % (2 * s1);
s = (s1 << 8) + q;
r = (u << 8) | ((a >> (LIMB_BITS - 32)) & 0xff);
r -= q * q;
if ((slimb_t)r < 0) {
s--;
r += 2 * s + 1;
}
#if LIMB_BITS == 64
s1 = s;
r1 = r;
/* one more iteration for 64 -> 32 bit sqrt */
num = (r1 << 16) | ((a >> (LIMB_BITS - 64 + 16)) & 0xffff);
q = num / (2 * s1); /* q <= 2^16 */
u = num % (2 * s1);
s = (s1 << 16) + q;
r = (u << 16) | ((a >> (LIMB_BITS - 64)) & 0xffff);
r -= q * q;
if ((slimb_t)r < 0) {
s--;
r += 2 * s + 1;
}
#endif
*pr = r;
return s;
}
|
O3
|
c
|
mp_sqrtrem1:
pushq %rbx
movq %rsi, %rdx
movq %rsi, %rax
movq %rsi, %r8
movl %esi, %ecx
movzwl %si, %r9d
shrq $0x38, %rsi
leaq 0x1b69d(%rip), %r10 # 0xa4620
movzwl -0x80(%r10,%rsi,2), %esi
shrq $0x30, %rdx
movq %rsi, %r10
imulq %rsi, %r10
subq %r10, %rdx
leal (%rsi,%rsi), %r10d
xorl %r11d, %r11d
xorl %ebx, %ebx
cmpq %r10, %rdx
notq %r10
cmovbeq %r11, %r10
seta %bl
addl %esi, %ebx
addq %rdx, %r10
shlq $0x8, %r10
shrq $0x28, %rax
movl $0xff, %esi
andq %rsi, %rax
orq %r10, %rax
leal (%rbx,%rbx), %r10d
xorl %edx, %edx
divq %r10
shll $0x8, %ebx
shrq $0x20, %r8
andq %rsi, %r8
leaq (%rbx,%rax), %rsi
shll $0x8, %edx
leaq (%rbx,%rax), %r10
decq %r10
imulq %rax, %rax
subq %rax, %r8
addq %rdx, %r8
leaq -0x1(%rsi,%rsi), %rax
cmovnsq %rsi, %r10
movq %r8, %rdx
sarq $0x3f, %rdx
andq %rax, %rdx
addq %r8, %rdx
shlq $0x10, %rdx
shrl $0x10, %ecx
orq %rdx, %rcx
leaq (%r10,%r10), %rsi
movq %rcx, %rax
xorl %edx, %edx
divq %rsi
shlq $0x10, %r10
leaq (%r10,%rax), %rsi
shlq $0x10, %rdx
leaq (%r10,%rax), %rcx
decq %rcx
imulq %rax, %rax
subq %rax, %r9
addq %rdx, %r9
leaq -0x1(%rsi,%rsi), %rax
cmovnsq %rsi, %rcx
movq %r9, %rdx
sarq $0x3f, %rdx
andq %rax, %rdx
addq %r9, %rdx
movq %rdx, (%rdi)
movq %rcx, %rax
popq %rbx
retq
|
mp_sqrtrem1:
push rbx
mov rdx, rsi
mov rax, rsi
mov r8, rsi
mov ecx, esi
movzx r9d, si
shr rsi, 38h
lea r10, sqrt_table
movzx esi, word ptr [r10+rsi*2-80h]
shr rdx, 30h
mov r10, rsi
imul r10, rsi
sub rdx, r10
lea r10d, [rsi+rsi]
xor r11d, r11d
xor ebx, ebx
cmp rdx, r10
not r10
cmovbe r10, r11
setnbe bl
add ebx, esi
add r10, rdx
shl r10, 8
shr rax, 28h
mov esi, 0FFh
and rax, rsi
or rax, r10
lea r10d, [rbx+rbx]
xor edx, edx
div r10
shl ebx, 8
shr r8, 20h
and r8, rsi
lea rsi, [rbx+rax]
shl edx, 8
lea r10, [rbx+rax]
dec r10
imul rax, rax
sub r8, rax
add r8, rdx
lea rax, [rsi+rsi-1]
cmovns r10, rsi
mov rdx, r8
sar rdx, 3Fh
and rdx, rax
add rdx, r8
shl rdx, 10h
shr ecx, 10h
or rcx, rdx
lea rsi, [r10+r10]
mov rax, rcx
xor edx, edx
div rsi
shl r10, 10h
lea rsi, [r10+rax]
shl rdx, 10h
lea rcx, [r10+rax]
dec rcx
imul rax, rax
sub r9, rax
add r9, rdx
lea rax, [rsi+rsi-1]
cmovns rcx, rsi
mov rdx, r9
sar rdx, 3Fh
and rdx, rax
add rdx, r9
mov [rdi], rdx
mov rax, rcx
pop rbx
retn
|
unsigned long long mp_sqrtrem1(_QWORD *a1, unsigned long long a2)
{
unsigned __int8 v3; // rax^5
unsigned __int8 v4; // r8^4
unsigned int v5; // ecx
long long v6; // r9
long long v7; // rsi
unsigned long long v8; // rdx
unsigned long long v9; // r10
int v10; // ebx
bool v11; // cf
bool v12; // zf
bool v13; // cc
long long v14; // r10
int v15; // ebx
unsigned long long v16; // rax
unsigned long long v17; // rtt
unsigned long long v18; // rsi
unsigned long long v19; // r10
long long v20; // r8
unsigned long long v21; // rax
unsigned long long v22; // rtt
unsigned long long v23; // rsi
unsigned long long v24; // rcx
signed long long v25; // r9
v3 = BYTE5(a2);
v4 = BYTE4(a2);
v5 = a2;
v6 = (unsigned __int16)a2;
v7 = sqrt_table[HIBYTE(a2) - 64];
v8 = HIWORD(a2) - v7 * v7;
v9 = (unsigned int)(2 * v7);
v10 = 0;
v11 = v8 < v9;
v12 = v8 == v9;
v13 = v8 <= v9;
v14 = ~v9;
if ( v13 )
v14 = 0LL;
LOBYTE(v10) = !v11 && !v12;
v15 = v7 + v10;
v17 = ((v8 + v14) << 8) | v3;
v16 = v17 / (unsigned int)(2 * v15);
v18 = (unsigned int)(v15 << 8) + v16;
v19 = v18 - 1;
v20 = ((unsigned int)(v17 % (unsigned int)(2 * v15)) << 8) + v4 - v16 * v16;
if ( v20 >= 0 )
v19 = (unsigned int)(v15 << 8) + v16;
v22 = ((v20 + ((2 * v18 - 1) & (v20 >> 63))) << 16) | HIWORD(v5);
v21 = v22 / (2 * v19);
v23 = (v19 << 16) + v21;
v24 = v23 - 1;
v25 = ((v22 % (2 * v19)) << 16) + v6 - v21 * v21;
if ( v25 >= 0 )
v24 = (v19 << 16) + v21;
*a1 = v25 + ((2 * v23 - 1) & (v25 >> 63));
return v24;
}
|
mp_sqrtrem1:
PUSH RBX
MOV RDX,RSI
MOV RAX,RSI
MOV R8,RSI
MOV ECX,ESI
MOVZX R9D,SI
SHR RSI,0x38
LEA R10,[0x1a4620]
MOVZX ESI,word ptr [R10 + RSI*0x2 + -0x80]
SHR RDX,0x30
MOV R10,RSI
IMUL R10,RSI
SUB RDX,R10
LEA R10D,[RSI + RSI*0x1]
XOR R11D,R11D
XOR EBX,EBX
CMP RDX,R10
NOT R10
CMOVBE R10,R11
SETA BL
ADD EBX,ESI
ADD R10,RDX
SHL R10,0x8
SHR RAX,0x28
MOV ESI,0xff
AND RAX,RSI
OR RAX,R10
LEA R10D,[RBX + RBX*0x1]
XOR EDX,EDX
DIV R10
SHL EBX,0x8
SHR R8,0x20
AND R8,RSI
LEA RSI,[RBX + RAX*0x1]
SHL EDX,0x8
LEA R10,[RBX + RAX*0x1]
DEC R10
IMUL RAX,RAX
SUB R8,RAX
ADD R8,RDX
LEA RAX,[RSI + RSI*0x1 + -0x1]
CMOVNS R10,RSI
MOV RDX,R8
SAR RDX,0x3f
AND RDX,RAX
ADD RDX,R8
SHL RDX,0x10
SHR ECX,0x10
OR RCX,RDX
LEA RSI,[R10 + R10*0x1]
MOV RAX,RCX
XOR EDX,EDX
DIV RSI
SHL R10,0x10
LEA RSI,[R10 + RAX*0x1]
SHL RDX,0x10
LEA RCX,[R10 + RAX*0x1]
DEC RCX
IMUL RAX,RAX
SUB R9,RAX
ADD R9,RDX
LEA RAX,[RSI + RSI*0x1 + -0x1]
CMOVNS RCX,RSI
MOV RDX,R9
SAR RDX,0x3f
AND RDX,RAX
ADD RDX,R9
MOV qword ptr [RDI],RDX
MOV RAX,RCX
POP RBX
RET
|
long mp_sqrtrem1(long *param_1,ulong param_2)
{
long lVar1;
ushort uVar2;
uint uVar3;
ulong uVar4;
long lVar5;
ulong uVar6;
int iVar7;
ulong uVar8;
long lVar9;
uVar2 = *(ushort *)(mp_pow_dec + (param_2 >> 0x38) * 2 + 0x40);
uVar6 = (param_2 >> 0x30) - (ulong)uVar2 * (ulong)uVar2;
uVar8 = (ulong)((uint)uVar2 + (uint)uVar2);
uVar4 = ~uVar8;
if (uVar6 <= uVar8) {
uVar4 = 0;
}
iVar7 = (uint)(uVar8 < uVar6) + (uint)uVar2;
uVar4 = param_2 >> 0x28 & 0xff | (uVar4 + uVar6) * 0x100;
uVar3 = iVar7 * 2;
uVar6 = uVar4 / uVar3;
uVar8 = (ulong)(uint)(iVar7 * 0x100);
lVar1 = uVar8 + uVar6;
lVar9 = ((param_2 >> 0x20 & 0xff) - uVar6 * uVar6) +
(ulong)(uint)((int)(uVar4 % (ulong)uVar3) << 8);
lVar5 = uVar8 + uVar6 + -1;
if (-1 < lVar9) {
lVar5 = lVar1;
}
uVar6 = param_2 >> 0x10 & 0xffff | ((lVar9 >> 0x3f & lVar1 * 2 - 1U) + lVar9) * 0x10000;
uVar4 = uVar6 / (ulong)(lVar5 * 2);
lVar1 = lVar5 * 0x10000 + uVar4;
lVar9 = ((param_2 & 0xffff) - uVar4 * uVar4) + (uVar6 % (ulong)(lVar5 * 2)) * 0x10000;
lVar5 = lVar5 * 0x10000 + uVar4 + -1;
if (-1 < lVar9) {
lVar5 = lVar1;
}
*param_1 = (lVar9 >> 0x3f & lVar1 * 2 - 1U) + lVar9;
return lVar5;
}
|
|
57,272
|
google::protobuf::ExtensionRangeOptions::Clear()
|
aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/descriptor.pb.cc
|
void ExtensionRangeOptions::Clear() {
// @@protoc_insertion_point(message_clear_start:google.protobuf.ExtensionRangeOptions)
uint32_t cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
_impl_._extensions_.Clear();
_impl_.uninterpreted_option_.Clear();
_internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}
|
O0
|
cpp
|
google::protobuf::ExtensionRangeOptions::Clear():
subq $0x38, %rsp
movq %rdi, 0x18(%rsp)
movq 0x18(%rsp), %rdi
movq %rdi, (%rsp)
movl $0x0, 0x14(%rsp)
addq $0x10, %rdi
callq 0x1984c0
movq (%rsp), %rdi
addq $0x10, %rdi
addq $0x18, %rdi
callq 0xd6c10
movq (%rsp), %rax
addq $0x8, %rax
movq %rax, 0x20(%rsp)
movq 0x20(%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 0xacbd6
movq 0x8(%rsp), %rdi
callq 0xe0a90
addq $0x38, %rsp
retq
nopl (%rax,%rax)
|
_ZN6google8protobuf21ExtensionRangeOptions5ClearEv:
sub rsp, 38h
mov [rsp+38h+var_20], rdi
mov rdi, [rsp+38h+var_20]
mov [rsp+38h+var_38], rdi
mov [rsp+38h+var_24], 0
add rdi, 10h; this
call _ZN6google8protobuf8internal12ExtensionSet5ClearEv; google::protobuf::internal::ExtensionSet::Clear(void)
mov rdi, [rsp+38h+var_38]
add rdi, 10h
add rdi, 18h
call _ZN6google8protobuf16RepeatedPtrFieldINS0_19UninterpretedOptionEE5ClearEv; google::protobuf::RepeatedPtrField<google::protobuf::UninterpretedOption>::Clear(void)
mov rax, [rsp+38h+var_38]
add rax, 8
mov [rsp+38h+var_18], rax
mov rax, [rsp+38h+var_18]
mov [rsp+38h+var_30], rax
mov [rsp+38h+var_10], rax
mov rax, [rsp+38h+var_10]
mov [rsp+38h+var_8], rax
mov rax, [rsp+38h+var_8]
mov rax, [rax]
and rax, 1
cmp rax, 0
jz short loc_ACBD6
mov rdi, [rsp+38h+var_30]; void *
call _ZN6google8protobuf8internal16InternalMetadata7DoClearINS0_15UnknownFieldSetEEEvv; google::protobuf::internal::InternalMetadata::DoClear<google::protobuf::UnknownFieldSet>(void)
loc_ACBD6:
add rsp, 38h
retn
|
long long google::protobuf::ExtensionRangeOptions::Clear(google::protobuf::ExtensionRangeOptions *this)
{
long long result; // rax
google::protobuf::internal::ExtensionSet::Clear((google::protobuf::ExtensionRangeOptions *)((char *)this + 16));
google::protobuf::RepeatedPtrField<google::protobuf::UninterpretedOption>::Clear((char *)this + 40);
result = *((_QWORD *)this + 1) & 1LL;
if ( result )
return google::protobuf::internal::InternalMetadata::DoClear<google::protobuf::UnknownFieldSet>((char *)this + 8);
return result;
}
|
Clear:
SUB RSP,0x38
MOV qword ptr [RSP + 0x18],RDI
MOV RDI,qword ptr [RSP + 0x18]
MOV qword ptr [RSP],RDI
MOV dword ptr [RSP + 0x14],0x0
ADD RDI,0x10
CALL 0x002984c0
MOV RDI,qword ptr [RSP]
ADD RDI,0x10
ADD RDI,0x18
CALL 0x001d6c10
MOV RAX,qword ptr [RSP]
ADD RAX,0x8
MOV qword ptr [RSP + 0x20],RAX
MOV RAX,qword ptr [RSP + 0x20]
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 0x001acbd6
MOV RDI,qword ptr [RSP + 0x8]
CALL 0x001e0a90
LAB_001acbd6:
ADD RSP,0x38
RET
|
/* google::protobuf::ExtensionRangeOptions::Clear() */
void __thiscall google::protobuf::ExtensionRangeOptions::Clear(ExtensionRangeOptions *this)
{
internal::ExtensionSet::Clear((ExtensionSet *)(this + 0x10));
RepeatedPtrField<google::protobuf::UninterpretedOption>::Clear
((RepeatedPtrField<google::protobuf::UninterpretedOption> *)(this + 0x28));
if ((*(ulong *)(this + 8) & 1) != 0) {
internal::InternalMetadata::DoClear<google::protobuf::UnknownFieldSet>
((InternalMetadata *)(this + 8));
}
return;
}
|
|
57,273
|
ftxui::VerticalContainer::EventHandler(ftxui::Event)
|
Andrewchistyakov[P]flashcards_lyc/build_O0/_deps/ftxui-src/src/ftxui/component/container.cpp
|
bool EventHandler(Event event) override {
const int old_selected = *selector_;
if (event == Event::ArrowUp || event == Event::Character('k')) {
MoveSelector(-1);
}
if (event == Event::ArrowDown || event == Event::Character('j')) {
MoveSelector(+1);
}
if (event == Event::PageUp) {
for (int i = 0; i < box_.y_max - box_.y_min; ++i) {
MoveSelector(-1);
}
}
if (event == Event::PageDown) {
for (int i = 0; i < box_.y_max - box_.y_min; ++i) {
MoveSelector(1);
}
}
if (event == Event::Home) {
for (size_t i = 0; i < children_.size(); ++i) {
MoveSelector(-1);
}
}
if (event == Event::End) {
for (size_t i = 0; i < children_.size(); ++i) {
MoveSelector(1);
}
}
if (event == Event::Tab) {
MoveSelectorWrap(+1);
}
if (event == Event::TabReverse) {
MoveSelectorWrap(-1);
}
*selector_ = std::max(0, std::min(int(children_.size()) - 1, *selector_));
return old_selected != *selector_;
}
|
O0
|
cpp
|
ftxui::VerticalContainer::EventHandler(ftxui::Event):
pushq %rbp
movq %rsp, %rbp
subq $0x130, %rsp # imm = 0x130
movq %rsi, -0xf8(%rbp)
movq %rdi, %rax
movq -0xf8(%rbp), %rdi
movq %rdi, -0xf0(%rbp)
movq %rax, -0x8(%rbp)
movq %rdi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0xe8(%rbp)
movq 0x30(%rax), %rax
movl (%rax), %eax
movl %eax, -0x14(%rbp)
leaq 0x8c132(%rip), %rsi # 0xdfcd8
callq 0x25390
movb %al, %cl
movb $0x0, -0x59(%rbp)
movb $0x1, %al
testb $0x1, %cl
movb %al, -0xd9(%rbp)
jne 0x53c00
leaq -0x58(%rbp), %rdi
movq %rdi, -0x108(%rbp)
movl $0x6b, %esi
callq 0x57d10
movq -0xf0(%rbp), %rdi
movq -0x108(%rbp), %rsi
movb $0x1, -0x59(%rbp)
callq 0x25390
movb %al, -0xf9(%rbp)
jmp 0x53bf2
movb -0xf9(%rbp), %al
movb %al, -0xd9(%rbp)
jmp 0x53c00
movb -0xd9(%rbp), %al
movb %al, -0x109(%rbp)
testb $0x1, -0x59(%rbp)
jne 0x53c14
jmp 0x53c1d
leaq -0x58(%rbp), %rdi
callq 0x219e0
movb -0x109(%rbp), %al
testb $0x1, %al
jne 0x53c29
jmp 0x53c5e
movq -0xe8(%rbp), %rdi
movl $0xffffffff, %esi # imm = 0xFFFFFFFF
callq 0x54280
jmp 0x53c5e
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x68(%rbp)
movl %eax, -0x6c(%rbp)
testb $0x1, -0x59(%rbp)
jne 0x53c50
jmp 0x53c59
leaq -0x58(%rbp), %rdi
callq 0x219e0
jmp 0x53fab
movq -0xf0(%rbp), %rdi
leaq 0x8c0ac(%rip), %rsi # 0xdfd18
callq 0x25390
movb %al, %cl
movb $0x0, -0xb1(%rbp)
movb $0x1, %al
testb $0x1, %cl
movb %al, -0x10a(%rbp)
jne 0x53ccf
leaq -0xb0(%rbp), %rdi
movq %rdi, -0x118(%rbp)
movl $0x6a, %esi
callq 0x57d10
movq -0xf0(%rbp), %rdi
movq -0x118(%rbp), %rsi
movb $0x1, -0xb1(%rbp)
callq 0x25390
movb %al, -0x10b(%rbp)
jmp 0x53cc1
movb -0x10b(%rbp), %al
movb %al, -0x10a(%rbp)
jmp 0x53ccf
movb -0x10a(%rbp), %al
movb %al, -0x119(%rbp)
testb $0x1, -0xb1(%rbp)
jne 0x53ce6
jmp 0x53cf2
leaq -0xb0(%rbp), %rdi
callq 0x219e0
movb -0x119(%rbp), %al
testb $0x1, %al
jne 0x53cfe
jmp 0x53d39
movq -0xe8(%rbp), %rdi
movl $0x1, %esi
callq 0x54280
jmp 0x53d39
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x68(%rbp)
movl %eax, -0x6c(%rbp)
testb $0x1, -0xb1(%rbp)
jne 0x53d28
jmp 0x53d34
leaq -0xb0(%rbp), %rdi
callq 0x219e0
jmp 0x53fab
movq -0xf0(%rbp), %rdi
leaq 0x8c611(%rip), %rsi # 0xe0358
callq 0x25390
testb $0x1, %al
jne 0x53d52
jmp 0x53d97
movl $0x0, -0xb8(%rbp)
movq -0xe8(%rbp), %rdx
movl -0xb8(%rbp), %eax
movl 0x44(%rdx), %ecx
subl 0x40(%rdx), %ecx
cmpl %ecx, %eax
jge 0x53d95
movq -0xe8(%rbp), %rdi
movl $0xffffffff, %esi # imm = 0xFFFFFFFF
callq 0x54280
movl -0xb8(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xb8(%rbp)
jmp 0x53d5c
jmp 0x53d97
movq -0xf0(%rbp), %rdi
leaq 0x8c5f3(%rip), %rsi # 0xe0398
callq 0x25390
testb $0x1, %al
jne 0x53db0
jmp 0x53df5
movl $0x0, -0xbc(%rbp)
movq -0xe8(%rbp), %rdx
movl -0xbc(%rbp), %eax
movl 0x44(%rdx), %ecx
subl 0x40(%rdx), %ecx
cmpl %ecx, %eax
jge 0x53df3
movq -0xe8(%rbp), %rdi
movl $0x1, %esi
callq 0x54280
movl -0xbc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xbc(%rbp)
jmp 0x53dba
jmp 0x53df5
movq -0xf0(%rbp), %rdi
leaq 0x8c4d5(%rip), %rsi # 0xe02d8
callq 0x25390
testb $0x1, %al
jne 0x53e0e
jmp 0x53e6d
movq $0x0, -0xc8(%rbp)
movq -0xe8(%rbp), %rdi
movq -0xc8(%rbp), %rax
movq %rax, -0x128(%rbp)
addq $0x8, %rdi
callq 0x51300
movq %rax, %rcx
movq -0x128(%rbp), %rax
cmpq %rcx, %rax
jae 0x53e6b
movq -0xe8(%rbp), %rdi
movl $0xffffffff, %esi # imm = 0xFFFFFFFF
callq 0x54280
movq -0xc8(%rbp), %rax
addq $0x1, %rax
movq %rax, -0xc8(%rbp)
jmp 0x53e19
jmp 0x53e6d
movq -0xf0(%rbp), %rdi
leaq 0x8c49d(%rip), %rsi # 0xe0318
callq 0x25390
testb $0x1, %al
jne 0x53e86
jmp 0x53ee5
movq $0x0, -0xd0(%rbp)
movq -0xe8(%rbp), %rdi
movq -0xd0(%rbp), %rax
movq %rax, -0x130(%rbp)
addq $0x8, %rdi
callq 0x51300
movq %rax, %rcx
movq -0x130(%rbp), %rax
cmpq %rcx, %rax
jae 0x53ee3
movq -0xe8(%rbp), %rdi
movl $0x1, %esi
callq 0x54280
movq -0xd0(%rbp), %rax
addq $0x1, %rax
movq %rax, -0xd0(%rbp)
jmp 0x53e91
jmp 0x53ee5
movq -0xf0(%rbp), %rdi
leaq 0x8c065(%rip), %rsi # 0xdff58
callq 0x25390
testb $0x1, %al
jne 0x53efe
jmp 0x53f0f
movq -0xe8(%rbp), %rdi
movl $0x1, %esi
callq 0x54330
movq -0xf0(%rbp), %rdi
leaq 0x8c07b(%rip), %rsi # 0xdff98
callq 0x25390
testb $0x1, %al
jne 0x53f28
jmp 0x53f39
movq -0xe8(%rbp), %rdi
movl $0xffffffff, %esi # imm = 0xFFFFFFFF
callq 0x54330
movq -0xe8(%rbp), %rdi
movl $0x0, -0xd4(%rbp)
addq $0x8, %rdi
callq 0x51300
movq %rax, %rcx
movq -0xe8(%rbp), %rax
subl $0x1, %ecx
movl %ecx, -0xd8(%rbp)
movq 0x30(%rax), %rsi
leaq -0xd8(%rbp), %rdi
callq 0x4b0c0
movq %rax, %rsi
leaq -0xd4(%rbp), %rdi
callq 0x3e710
movq -0xe8(%rbp), %rcx
movl (%rax), %edx
movq 0x30(%rcx), %rax
movl %edx, (%rax)
movl -0x14(%rbp), %eax
movq 0x30(%rcx), %rcx
cmpl (%rcx), %eax
setne %al
andb $0x1, %al
addq $0x130, %rsp # imm = 0x130
popq %rbp
retq
movq -0x68(%rbp), %rdi
callq 0xda90
nopw %cs:(%rax,%rax)
nop
|
_ZN5ftxui17VerticalContainer12EventHandlerENS_5EventE:
push rbp
mov rbp, rsp
sub rsp, 130h
mov [rbp+var_F8], rsi
mov rax, rdi
mov rdi, [rbp+var_F8]
mov [rbp+var_F0], rdi
mov [rbp+var_8], rax
mov [rbp+var_10], rdi
mov rax, [rbp+var_8]
mov [rbp+var_E8], rax
mov rax, [rax+30h]
mov eax, [rax]
mov [rbp+var_14], eax
lea rsi, _ZN5ftxui5Event7ArrowUpE; ftxui::Event::ArrowUp
call _ZNK5ftxui5EventeqERKS0_; ftxui::Event::operator==(ftxui::Event const&)
mov cl, al
mov [rbp+var_59], 0
mov al, 1
test cl, 1
mov [rbp+var_D9], al
jnz short loc_53C00
lea rdi, [rbp+var_58]; this
mov [rbp+var_108], rdi
mov esi, 6Bh ; 'k'; char
call _ZN5ftxui5Event9CharacterEc; ftxui::Event::Character(char)
mov rdi, [rbp+var_F0]
mov rsi, [rbp+var_108]
mov [rbp+var_59], 1
call _ZNK5ftxui5EventeqERKS0_; ftxui::Event::operator==(ftxui::Event const&)
mov [rbp+var_F9], al
jmp short $+2
loc_53BF2:
mov al, [rbp+var_F9]
mov [rbp+var_D9], al
jmp short $+2
loc_53C00:
mov al, [rbp+var_D9]
mov [rbp+var_109], al
test [rbp+var_59], 1
jnz short loc_53C14
jmp short loc_53C1D
loc_53C14:
lea rdi, [rbp+var_58]; void *
call _ZN5ftxui5EventD2Ev; ftxui::Event::~Event()
loc_53C1D:
mov al, [rbp+var_109]
test al, 1
jnz short loc_53C29
jmp short loc_53C5E
loc_53C29:
mov rdi, [rbp+var_E8]; this
mov esi, 0FFFFFFFFh; int
call _ZN5ftxui13ContainerBase12MoveSelectorEi; ftxui::ContainerBase::MoveSelector(int)
jmp short loc_53C5E
mov rcx, rax
mov eax, edx
mov [rbp+var_68], rcx
mov [rbp+var_6C], eax
test [rbp+var_59], 1
jnz short loc_53C50
jmp short loc_53C59
loc_53C50:
lea rdi, [rbp+var_58]; void *
call _ZN5ftxui5EventD2Ev; ftxui::Event::~Event()
loc_53C59:
jmp loc_53FAB
loc_53C5E:
mov rdi, [rbp+var_F0]
lea rsi, _ZN5ftxui5Event9ArrowDownE; ftxui::Event::ArrowDown
call _ZNK5ftxui5EventeqERKS0_; ftxui::Event::operator==(ftxui::Event const&)
mov cl, al
mov [rbp+var_B1], 0
mov al, 1
test cl, 1
mov [rbp+var_10A], al
jnz short loc_53CCF
lea rdi, [rbp+var_B0]; this
mov [rbp+var_118], rdi
mov esi, 6Ah ; 'j'; char
call _ZN5ftxui5Event9CharacterEc; ftxui::Event::Character(char)
mov rdi, [rbp+var_F0]
mov rsi, [rbp+var_118]
mov [rbp+var_B1], 1
call _ZNK5ftxui5EventeqERKS0_; ftxui::Event::operator==(ftxui::Event const&)
mov [rbp+var_10B], al
jmp short $+2
loc_53CC1:
mov al, [rbp+var_10B]
mov [rbp+var_10A], al
jmp short $+2
loc_53CCF:
mov al, [rbp+var_10A]
mov [rbp+var_119], al
test [rbp+var_B1], 1
jnz short loc_53CE6
jmp short loc_53CF2
loc_53CE6:
lea rdi, [rbp+var_B0]; void *
call _ZN5ftxui5EventD2Ev; ftxui::Event::~Event()
loc_53CF2:
mov al, [rbp+var_119]
test al, 1
jnz short loc_53CFE
jmp short loc_53D39
loc_53CFE:
mov rdi, [rbp+var_E8]; this
mov esi, 1; int
call _ZN5ftxui13ContainerBase12MoveSelectorEi; ftxui::ContainerBase::MoveSelector(int)
jmp short loc_53D39
mov rcx, rax
mov eax, edx
mov [rbp+var_68], rcx
mov [rbp+var_6C], eax
test [rbp+var_B1], 1
jnz short loc_53D28
jmp short loc_53D34
loc_53D28:
lea rdi, [rbp+var_B0]; void *
call _ZN5ftxui5EventD2Ev; ftxui::Event::~Event()
loc_53D34:
jmp loc_53FAB
loc_53D39:
mov rdi, [rbp+var_F0]
lea rsi, _ZN5ftxui5Event6PageUpE; ftxui::Event::PageUp
call _ZNK5ftxui5EventeqERKS0_; ftxui::Event::operator==(ftxui::Event const&)
test al, 1
jnz short loc_53D52
jmp short loc_53D97
loc_53D52:
mov [rbp+var_B8], 0
loc_53D5C:
mov rdx, [rbp+var_E8]
mov eax, [rbp+var_B8]
mov ecx, [rdx+44h]
sub ecx, [rdx+40h]
cmp eax, ecx
jge short loc_53D95
mov rdi, [rbp+var_E8]; this
mov esi, 0FFFFFFFFh; int
call _ZN5ftxui13ContainerBase12MoveSelectorEi; ftxui::ContainerBase::MoveSelector(int)
mov eax, [rbp+var_B8]
add eax, 1
mov [rbp+var_B8], eax
jmp short loc_53D5C
loc_53D95:
jmp short $+2
loc_53D97:
mov rdi, [rbp+var_F0]
lea rsi, _ZN5ftxui5Event8PageDownE; ftxui::Event::PageDown
call _ZNK5ftxui5EventeqERKS0_; ftxui::Event::operator==(ftxui::Event const&)
test al, 1
jnz short loc_53DB0
jmp short loc_53DF5
loc_53DB0:
mov [rbp+var_BC], 0
loc_53DBA:
mov rdx, [rbp+var_E8]
mov eax, [rbp+var_BC]
mov ecx, [rdx+44h]
sub ecx, [rdx+40h]
cmp eax, ecx
jge short loc_53DF3
mov rdi, [rbp+var_E8]; this
mov esi, 1; int
call _ZN5ftxui13ContainerBase12MoveSelectorEi; ftxui::ContainerBase::MoveSelector(int)
mov eax, [rbp+var_BC]
add eax, 1
mov [rbp+var_BC], eax
jmp short loc_53DBA
loc_53DF3:
jmp short $+2
loc_53DF5:
mov rdi, [rbp+var_F0]
lea rsi, _ZN5ftxui5Event4HomeE; ftxui::Event::Home
call _ZNK5ftxui5EventeqERKS0_; ftxui::Event::operator==(ftxui::Event const&)
test al, 1
jnz short loc_53E0E
jmp short loc_53E6D
loc_53E0E:
mov [rbp+var_C8], 0
loc_53E19:
mov rdi, [rbp+var_E8]
mov rax, [rbp+var_C8]
mov [rbp+var_128], rax
add rdi, 8
call _ZNKSt6vectorISt10shared_ptrIN5ftxui13ComponentBaseEESaIS3_EE4sizeEv; std::vector<std::shared_ptr<ftxui::ComponentBase>>::size(void)
mov rcx, rax
mov rax, [rbp+var_128]
cmp rax, rcx
jnb short loc_53E6B
mov rdi, [rbp+var_E8]; this
mov esi, 0FFFFFFFFh; int
call _ZN5ftxui13ContainerBase12MoveSelectorEi; ftxui::ContainerBase::MoveSelector(int)
mov rax, [rbp+var_C8]
add rax, 1
mov [rbp+var_C8], rax
jmp short loc_53E19
loc_53E6B:
jmp short $+2
loc_53E6D:
mov rdi, [rbp+var_F0]
lea rsi, _ZN5ftxui5Event3EndE; ftxui::Event::End
call _ZNK5ftxui5EventeqERKS0_; ftxui::Event::operator==(ftxui::Event const&)
test al, 1
jnz short loc_53E86
jmp short loc_53EE5
loc_53E86:
mov [rbp+var_D0], 0
loc_53E91:
mov rdi, [rbp+var_E8]
mov rax, [rbp+var_D0]
mov [rbp+var_130], rax
add rdi, 8
call _ZNKSt6vectorISt10shared_ptrIN5ftxui13ComponentBaseEESaIS3_EE4sizeEv; std::vector<std::shared_ptr<ftxui::ComponentBase>>::size(void)
mov rcx, rax
mov rax, [rbp+var_130]
cmp rax, rcx
jnb short loc_53EE3
mov rdi, [rbp+var_E8]; this
mov esi, 1; int
call _ZN5ftxui13ContainerBase12MoveSelectorEi; ftxui::ContainerBase::MoveSelector(int)
mov rax, [rbp+var_D0]
add rax, 1
mov [rbp+var_D0], rax
jmp short loc_53E91
loc_53EE3:
jmp short $+2
loc_53EE5:
mov rdi, [rbp+var_F0]
lea rsi, _ZN5ftxui5Event3TabE; ftxui::Event::Tab
call _ZNK5ftxui5EventeqERKS0_; ftxui::Event::operator==(ftxui::Event const&)
test al, 1
jnz short loc_53EFE
jmp short loc_53F0F
loc_53EFE:
mov rdi, [rbp+var_E8]; this
mov esi, 1; int
call _ZN5ftxui13ContainerBase16MoveSelectorWrapEi; ftxui::ContainerBase::MoveSelectorWrap(int)
loc_53F0F:
mov rdi, [rbp+var_F0]
lea rsi, _ZN5ftxui5Event10TabReverseE; ftxui::Event::TabReverse
call _ZNK5ftxui5EventeqERKS0_; ftxui::Event::operator==(ftxui::Event const&)
test al, 1
jnz short loc_53F28
jmp short loc_53F39
loc_53F28:
mov rdi, [rbp+var_E8]; this
mov esi, 0FFFFFFFFh; int
call _ZN5ftxui13ContainerBase16MoveSelectorWrapEi; ftxui::ContainerBase::MoveSelectorWrap(int)
loc_53F39:
mov rdi, [rbp+var_E8]
mov [rbp+var_D4], 0
add rdi, 8
call _ZNKSt6vectorISt10shared_ptrIN5ftxui13ComponentBaseEESaIS3_EE4sizeEv; std::vector<std::shared_ptr<ftxui::ComponentBase>>::size(void)
mov rcx, rax
mov rax, [rbp+var_E8]
sub ecx, 1
mov [rbp+var_D8], ecx
mov rsi, [rax+30h]
lea rdi, [rbp+var_D8]
call _ZSt3minIiERKT_S2_S2_; std::min<int>(int const&,int const&)
mov rsi, rax
lea rdi, [rbp+var_D4]
call _ZSt3maxIiERKT_S2_S2_; std::max<int>(int const&,int const&)
mov rcx, [rbp+var_E8]
mov edx, [rax]
mov rax, [rcx+30h]
mov [rax], edx
mov eax, [rbp+var_14]
mov rcx, [rcx+30h]
cmp eax, [rcx]
setnz al
and al, 1
add rsp, 130h
pop rbp
retn
loc_53FAB:
mov rdi, [rbp+var_68]
call __Unwind_Resume
|
bool ftxui::VerticalContainer::EventHandler(long long a1, long long a2)
{
_DWORD *v2; // rax
char v4; // [rsp+26h] [rbp-10Ah]
char v5; // [rsp+57h] [rbp-D9h]
int v6; // [rsp+58h] [rbp-D8h] BYREF
int v7; // [rsp+5Ch] [rbp-D4h] BYREF
unsigned long long m; // [rsp+60h] [rbp-D0h]
unsigned long long k; // [rsp+68h] [rbp-C8h]
int j; // [rsp+74h] [rbp-BCh]
int i; // [rsp+78h] [rbp-B8h]
char v12; // [rsp+7Fh] [rbp-B1h]
char v13[68]; // [rsp+80h] [rbp-B0h] BYREF
char v14; // [rsp+D7h] [rbp-59h]
char v15[68]; // [rsp+D8h] [rbp-58h] BYREF
int v16; // [rsp+11Ch] [rbp-14h]
long long v17; // [rsp+120h] [rbp-10h]
long long v18; // [rsp+128h] [rbp-8h]
v18 = a1;
v17 = a2;
v16 = **(_DWORD **)(a1 + 48);
v14 = 0;
v5 = 1;
if ( (ftxui::Event::operator==(a2, (long long)&ftxui::Event::ArrowUp) & 1) == 0 )
{
ftxui::Event::Character((ftxui::Event *)v15, 107);
v14 = 1;
v5 = ftxui::Event::operator==(a2, (long long)v15);
}
if ( (v14 & 1) != 0 )
ftxui::Event::~Event(v15);
if ( (v5 & 1) != 0 )
ftxui::ContainerBase::MoveSelector((ftxui::ContainerBase *)a1, -1);
v12 = 0;
v4 = 1;
if ( (ftxui::Event::operator==(a2, (long long)&ftxui::Event::ArrowDown) & 1) == 0 )
{
ftxui::Event::Character((ftxui::Event *)v13, 106);
v12 = 1;
v4 = ftxui::Event::operator==(a2, (long long)v13);
}
if ( (v12 & 1) != 0 )
ftxui::Event::~Event(v13);
if ( (v4 & 1) != 0 )
ftxui::ContainerBase::MoveSelector((ftxui::ContainerBase *)a1, 1);
if ( (ftxui::Event::operator==(a2, (long long)&ftxui::Event::PageUp) & 1) != 0 )
{
for ( i = 0; i < *(_DWORD *)(a1 + 68) - *(_DWORD *)(a1 + 64); ++i )
ftxui::ContainerBase::MoveSelector((ftxui::ContainerBase *)a1, -1);
}
if ( (ftxui::Event::operator==(a2, (long long)&ftxui::Event::PageDown) & 1) != 0 )
{
for ( j = 0; j < *(_DWORD *)(a1 + 68) - *(_DWORD *)(a1 + 64); ++j )
ftxui::ContainerBase::MoveSelector((ftxui::ContainerBase *)a1, 1);
}
if ( (ftxui::Event::operator==(a2, (long long)&ftxui::Event::Home) & 1) != 0 )
{
for ( k = 0LL; k < std::vector<std::shared_ptr<ftxui::ComponentBase>>::size((_QWORD *)(a1 + 8)); ++k )
ftxui::ContainerBase::MoveSelector((ftxui::ContainerBase *)a1, -1);
}
if ( (ftxui::Event::operator==(a2, (long long)&ftxui::Event::End) & 1) != 0 )
{
for ( m = 0LL; m < std::vector<std::shared_ptr<ftxui::ComponentBase>>::size((_QWORD *)(a1 + 8)); ++m )
ftxui::ContainerBase::MoveSelector((ftxui::ContainerBase *)a1, 1);
}
if ( (ftxui::Event::operator==(a2, (long long)&ftxui::Event::Tab) & 1) != 0 )
ftxui::ContainerBase::MoveSelectorWrap((ftxui::ContainerBase *)a1, 1);
if ( (ftxui::Event::operator==(a2, (long long)&ftxui::Event::TabReverse) & 1) != 0 )
ftxui::ContainerBase::MoveSelectorWrap((ftxui::ContainerBase *)a1, -1);
v7 = 0;
v6 = std::vector<std::shared_ptr<ftxui::ComponentBase>>::size((_QWORD *)(a1 + 8)) - 1;
v2 = std::min<int>(&v6, *(_DWORD **)(a1 + 48));
**(_DWORD **)(a1 + 48) = *std::max<int>(&v7, v2);
return v16 != **(_DWORD **)(a1 + 48);
}
|
EventHandler:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x130
MOV qword ptr [RBP + -0xf8],RSI
MOV RAX,RDI
MOV RDI,qword ptr [RBP + -0xf8]
MOV qword ptr [RBP + -0xf0],RDI
MOV qword ptr [RBP + -0x8],RAX
MOV qword ptr [RBP + -0x10],RDI
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RBP + -0xe8],RAX
MOV RAX,qword ptr [RAX + 0x30]
MOV EAX,dword ptr [RAX]
MOV dword ptr [RBP + -0x14],EAX
LEA RSI,[0x1dfcd8]
CALL 0x00125390
MOV CL,AL
MOV byte ptr [RBP + -0x59],0x0
MOV AL,0x1
TEST CL,0x1
MOV byte ptr [RBP + -0xd9],AL
JNZ 0x00153c00
LEA RDI,[RBP + -0x58]
MOV qword ptr [RBP + -0x108],RDI
MOV ESI,0x6b
CALL 0x00157d10
MOV RDI,qword ptr [RBP + -0xf0]
MOV RSI,qword ptr [RBP + -0x108]
MOV byte ptr [RBP + -0x59],0x1
LAB_00153be5:
CALL 0x00125390
LAB_00153bea:
MOV byte ptr [RBP + -0xf9],AL
JMP 0x00153bf2
LAB_00153bf2:
MOV AL,byte ptr [RBP + -0xf9]
MOV byte ptr [RBP + -0xd9],AL
JMP 0x00153c00
LAB_00153c00:
MOV AL,byte ptr [RBP + -0xd9]
MOV byte ptr [RBP + -0x109],AL
TEST byte ptr [RBP + -0x59],0x1
JNZ 0x00153c14
JMP 0x00153c1d
LAB_00153c14:
LEA RDI,[RBP + -0x58]
CALL 0x001219e0
LAB_00153c1d:
MOV AL,byte ptr [RBP + -0x109]
TEST AL,0x1
JNZ 0x00153c29
JMP 0x00153c5e
LAB_00153c29:
MOV RDI,qword ptr [RBP + -0xe8]
MOV ESI,0xffffffff
CALL 0x00154280
JMP 0x00153c5e
LAB_00153c5e:
MOV RDI,qword ptr [RBP + -0xf0]
LEA RSI,[0x1dfd18]
CALL 0x00125390
MOV CL,AL
MOV byte ptr [RBP + -0xb1],0x0
MOV AL,0x1
TEST CL,0x1
MOV byte ptr [RBP + -0x10a],AL
JNZ 0x00153ccf
LEA RDI,[RBP + -0xb0]
MOV qword ptr [RBP + -0x118],RDI
MOV ESI,0x6a
CALL 0x00157d10
MOV RDI,qword ptr [RBP + -0xf0]
MOV RSI,qword ptr [RBP + -0x118]
MOV byte ptr [RBP + -0xb1],0x1
LAB_00153cb4:
CALL 0x00125390
LAB_00153cb9:
MOV byte ptr [RBP + -0x10b],AL
JMP 0x00153cc1
LAB_00153cc1:
MOV AL,byte ptr [RBP + -0x10b]
MOV byte ptr [RBP + -0x10a],AL
JMP 0x00153ccf
LAB_00153ccf:
MOV AL,byte ptr [RBP + -0x10a]
MOV byte ptr [RBP + -0x119],AL
TEST byte ptr [RBP + -0xb1],0x1
JNZ 0x00153ce6
JMP 0x00153cf2
LAB_00153ce6:
LEA RDI,[RBP + -0xb0]
CALL 0x001219e0
LAB_00153cf2:
MOV AL,byte ptr [RBP + -0x119]
TEST AL,0x1
JNZ 0x00153cfe
JMP 0x00153d39
LAB_00153cfe:
MOV RDI,qword ptr [RBP + -0xe8]
MOV ESI,0x1
CALL 0x00154280
JMP 0x00153d39
LAB_00153d39:
MOV RDI,qword ptr [RBP + -0xf0]
LEA RSI,[0x1e0358]
CALL 0x00125390
TEST AL,0x1
JNZ 0x00153d52
JMP 0x00153d97
LAB_00153d52:
MOV dword ptr [RBP + -0xb8],0x0
LAB_00153d5c:
MOV RDX,qword ptr [RBP + -0xe8]
MOV EAX,dword ptr [RBP + -0xb8]
MOV ECX,dword ptr [RDX + 0x44]
SUB ECX,dword ptr [RDX + 0x40]
CMP EAX,ECX
JGE 0x00153d95
MOV RDI,qword ptr [RBP + -0xe8]
MOV ESI,0xffffffff
CALL 0x00154280
MOV EAX,dword ptr [RBP + -0xb8]
ADD EAX,0x1
MOV dword ptr [RBP + -0xb8],EAX
JMP 0x00153d5c
LAB_00153d95:
JMP 0x00153d97
LAB_00153d97:
MOV RDI,qword ptr [RBP + -0xf0]
LEA RSI,[0x1e0398]
CALL 0x00125390
TEST AL,0x1
JNZ 0x00153db0
JMP 0x00153df5
LAB_00153db0:
MOV dword ptr [RBP + -0xbc],0x0
LAB_00153dba:
MOV RDX,qword ptr [RBP + -0xe8]
MOV EAX,dword ptr [RBP + -0xbc]
MOV ECX,dword ptr [RDX + 0x44]
SUB ECX,dword ptr [RDX + 0x40]
CMP EAX,ECX
JGE 0x00153df3
MOV RDI,qword ptr [RBP + -0xe8]
MOV ESI,0x1
CALL 0x00154280
MOV EAX,dword ptr [RBP + -0xbc]
ADD EAX,0x1
MOV dword ptr [RBP + -0xbc],EAX
JMP 0x00153dba
LAB_00153df3:
JMP 0x00153df5
LAB_00153df5:
MOV RDI,qword ptr [RBP + -0xf0]
LEA RSI,[0x1e02d8]
CALL 0x00125390
TEST AL,0x1
JNZ 0x00153e0e
JMP 0x00153e6d
LAB_00153e0e:
MOV qword ptr [RBP + -0xc8],0x0
LAB_00153e19:
MOV RDI,qword ptr [RBP + -0xe8]
MOV RAX,qword ptr [RBP + -0xc8]
MOV qword ptr [RBP + -0x128],RAX
ADD RDI,0x8
CALL 0x00151300
MOV RCX,RAX
MOV RAX,qword ptr [RBP + -0x128]
CMP RAX,RCX
JNC 0x00153e6b
MOV RDI,qword ptr [RBP + -0xe8]
MOV ESI,0xffffffff
CALL 0x00154280
MOV RAX,qword ptr [RBP + -0xc8]
ADD RAX,0x1
MOV qword ptr [RBP + -0xc8],RAX
JMP 0x00153e19
LAB_00153e6b:
JMP 0x00153e6d
LAB_00153e6d:
MOV RDI,qword ptr [RBP + -0xf0]
LEA RSI,[0x1e0318]
CALL 0x00125390
TEST AL,0x1
JNZ 0x00153e86
JMP 0x00153ee5
LAB_00153e86:
MOV qword ptr [RBP + -0xd0],0x0
LAB_00153e91:
MOV RDI,qword ptr [RBP + -0xe8]
MOV RAX,qword ptr [RBP + -0xd0]
MOV qword ptr [RBP + -0x130],RAX
ADD RDI,0x8
CALL 0x00151300
MOV RCX,RAX
MOV RAX,qword ptr [RBP + -0x130]
CMP RAX,RCX
JNC 0x00153ee3
MOV RDI,qword ptr [RBP + -0xe8]
MOV ESI,0x1
CALL 0x00154280
MOV RAX,qword ptr [RBP + -0xd0]
ADD RAX,0x1
MOV qword ptr [RBP + -0xd0],RAX
JMP 0x00153e91
LAB_00153ee3:
JMP 0x00153ee5
LAB_00153ee5:
MOV RDI,qword ptr [RBP + -0xf0]
LEA RSI,[0x1dff58]
CALL 0x00125390
TEST AL,0x1
JNZ 0x00153efe
JMP 0x00153f0f
LAB_00153efe:
MOV RDI,qword ptr [RBP + -0xe8]
MOV ESI,0x1
CALL 0x00154330
LAB_00153f0f:
MOV RDI,qword ptr [RBP + -0xf0]
LEA RSI,[0x1dff98]
CALL 0x00125390
TEST AL,0x1
JNZ 0x00153f28
JMP 0x00153f39
LAB_00153f28:
MOV RDI,qword ptr [RBP + -0xe8]
MOV ESI,0xffffffff
CALL 0x00154330
LAB_00153f39:
MOV RDI,qword ptr [RBP + -0xe8]
MOV dword ptr [RBP + -0xd4],0x0
ADD RDI,0x8
CALL 0x00151300
MOV RCX,RAX
MOV RAX,qword ptr [RBP + -0xe8]
SUB ECX,0x1
MOV dword ptr [RBP + -0xd8],ECX
MOV RSI,qword ptr [RAX + 0x30]
LEA RDI,[RBP + -0xd8]
CALL 0x0014b0c0
MOV RSI,RAX
LEA RDI,[RBP + -0xd4]
CALL 0x0013e710
MOV RCX,qword ptr [RBP + -0xe8]
MOV EDX,dword ptr [RAX]
MOV RAX,qword ptr [RCX + 0x30]
MOV dword ptr [RAX],EDX
MOV EAX,dword ptr [RBP + -0x14]
MOV RCX,qword ptr [RCX + 0x30]
CMP EAX,dword ptr [RCX]
SETNZ AL
AND AL,0x1
ADD RSP,0x130
POP RBP
RET
|
/* ftxui::VerticalContainer::EventHandler(ftxui::Event) */
bool __thiscall ftxui::VerticalContainer::EventHandler(VerticalContainer *this,Event *param_2)
{
byte bVar1;
ulong uVar2;
ulong uVar3;
int *piVar4;
byte local_112;
byte local_e1;
int local_e0 [2];
ulong local_d8;
ulong local_d0;
int local_c4;
int local_c0;
byte local_b9;
Event local_b8 [87];
byte local_61;
Event local_60 [68];
int local_1c;
Event *local_18;
VerticalContainer *local_10;
local_1c = **(int **)(this + 0x30);
local_18 = param_2;
local_10 = this;
bVar1 = Event::operator==(param_2,(Event *)Event::ArrowUp);
local_61 = 0;
local_e1 = 1;
if ((bVar1 & 1) == 0) {
Event::Character(local_60,'k');
local_61 = 1;
/* try { // try from 00153be5 to 00153be9 has its CatchHandler @ 00153c3c */
local_e1 = Event::operator==(param_2,local_60);
}
if ((local_61 & 1) != 0) {
Event::~Event(local_60);
}
if ((local_e1 & 1) != 0) {
ftxui::ContainerBase::MoveSelector((ContainerBase *)this,-1);
}
bVar1 = Event::operator==(param_2,(Event *)Event::ArrowDown);
local_b9 = 0;
local_112 = 1;
if ((bVar1 & 1) == 0) {
Event::Character(local_b8,'j');
local_b9 = 1;
/* try { // try from 00153cb4 to 00153cb8 has its CatchHandler @ 00153d11 */
local_112 = Event::operator==(param_2,local_b8);
}
if ((local_b9 & 1) != 0) {
Event::~Event(local_b8);
}
if ((local_112 & 1) != 0) {
ftxui::ContainerBase::MoveSelector((ContainerBase *)this,1);
}
uVar2 = Event::operator==(param_2,(Event *)Event::PageUp);
if ((uVar2 & 1) != 0) {
for (local_c0 = 0; local_c0 < *(int *)(this + 0x44) - *(int *)(this + 0x40);
local_c0 = local_c0 + 1) {
ftxui::ContainerBase::MoveSelector((ContainerBase *)this,-1);
}
}
uVar2 = Event::operator==(param_2,(Event *)Event::PageDown);
if ((uVar2 & 1) != 0) {
for (local_c4 = 0; local_c4 < *(int *)(this + 0x44) - *(int *)(this + 0x40);
local_c4 = local_c4 + 1) {
ftxui::ContainerBase::MoveSelector((ContainerBase *)this,1);
}
}
uVar2 = Event::operator==(param_2,(Event *)Event::Home);
if ((uVar2 & 1) != 0) {
for (local_d0 = 0; uVar2 = local_d0,
uVar3 = std::
vector<std::shared_ptr<ftxui::ComponentBase>,std::allocator<std::shared_ptr<ftxui::ComponentBase>>>
::size((vector<std::shared_ptr<ftxui::ComponentBase>,std::allocator<std::shared_ptr<ftxui::ComponentBase>>>
*)(this + 8)), uVar2 < uVar3; local_d0 = local_d0 + 1) {
ftxui::ContainerBase::MoveSelector((ContainerBase *)this,-1);
}
}
uVar2 = Event::operator==(param_2,(Event *)Event::End);
if ((uVar2 & 1) != 0) {
for (local_d8 = 0; uVar2 = local_d8,
uVar3 = std::
vector<std::shared_ptr<ftxui::ComponentBase>,std::allocator<std::shared_ptr<ftxui::ComponentBase>>>
::size((vector<std::shared_ptr<ftxui::ComponentBase>,std::allocator<std::shared_ptr<ftxui::ComponentBase>>>
*)(this + 8)), uVar2 < uVar3; local_d8 = local_d8 + 1) {
ftxui::ContainerBase::MoveSelector((ContainerBase *)this,1);
}
}
uVar2 = Event::operator==(param_2,(Event *)Event::Tab);
if ((uVar2 & 1) != 0) {
ftxui::ContainerBase::MoveSelectorWrap((ContainerBase *)this,1);
}
uVar2 = Event::operator==(param_2,(Event *)Event::TabReverse);
if ((uVar2 & 1) != 0) {
ftxui::ContainerBase::MoveSelectorWrap((ContainerBase *)this,-1);
}
local_e0[1] = 0;
local_e0[0] = std::
vector<std::shared_ptr<ftxui::ComponentBase>,std::allocator<std::shared_ptr<ftxui::ComponentBase>>>
::size((vector<std::shared_ptr<ftxui::ComponentBase>,std::allocator<std::shared_ptr<ftxui::ComponentBase>>>
*)(this + 8));
local_e0[0] = local_e0[0] + -1;
piVar4 = std::min<int>(local_e0,*(int **)(this + 0x30));
piVar4 = std::max<int>(local_e0 + 1,piVar4);
**(int **)(this + 0x30) = *piVar4;
return local_1c != **(int **)(this + 0x30);
}
|
|
57,274
|
js_parseInt
|
bluesky950520[P]quickjs/quickjs.c
|
static JSValue js_parseInt(JSContext *ctx, JSValue this_val,
int argc, JSValue *argv)
{
const char *str;
int radix, flags;
JSValue ret;
size_t len;
str = JS_ToCStringLen(ctx, &len, argv[0]);
if (!str)
return JS_EXCEPTION;
if (JS_ToInt32(ctx, &radix, argv[1])) {
JS_FreeCString(ctx, str);
return JS_EXCEPTION;
}
flags = ATOD_TRIM_SPACES;
if (radix == 0) {
flags |= ATOD_ACCEPT_HEX_PREFIX; // Only 0x and 0X are supported
radix = 10;
}
ret = js_atof(ctx, str, len, NULL, radix, flags);
JS_FreeCString(ctx, str);
return ret;
}
|
O0
|
c
|
js_parseInt:
subq $0x78, %rsp
movq %rsi, 0x58(%rsp)
movq %rdx, 0x60(%rsp)
movq %rdi, 0x50(%rsp)
movl %ecx, 0x4c(%rsp)
movq %r8, 0x40(%rsp)
movq 0x50(%rsp), %rdi
movq 0x40(%rsp), %rax
movq (%rax), %rdx
movq 0x8(%rax), %rcx
leaq 0x18(%rsp), %rsi
callq 0x62ed0
movq %rax, 0x38(%rsp)
cmpq $0x0, 0x38(%rsp)
jne 0xd005a
movl $0x0, 0x68(%rsp)
movq $0x6, 0x70(%rsp)
jmp 0xd0125
movq 0x50(%rsp), %rdi
movq 0x40(%rsp), %rax
movq 0x10(%rax), %rdx
movq 0x18(%rax), %rcx
leaq 0x34(%rsp), %rsi
callq 0x38f20
cmpl $0x0, %eax
je 0xd00a0
movq 0x50(%rsp), %rdi
movq 0x38(%rsp), %rsi
callq 0x29e50
movl $0x0, 0x68(%rsp)
movq $0x6, 0x70(%rsp)
jmp 0xd0125
movl $0x1, 0x30(%rsp)
cmpl $0x0, 0x34(%rsp)
jne 0xd00c2
movl 0x30(%rsp), %eax
orl $0x20, %eax
movl %eax, 0x30(%rsp)
movl $0xa, 0x34(%rsp)
movq 0x50(%rsp), %rdi
movq 0x38(%rsp), %rsi
movq 0x18(%rsp), %rdx
movl 0x34(%rsp), %r8d
movl 0x30(%rsp), %r9d
xorl %eax, %eax
movl %eax, %ecx
callq 0x62f10
movq %rax, 0x8(%rsp)
movq %rdx, 0x10(%rsp)
movq 0x8(%rsp), %rax
movq %rax, 0x20(%rsp)
movq 0x10(%rsp), %rax
movq %rax, 0x28(%rsp)
movq 0x50(%rsp), %rdi
movq 0x38(%rsp), %rsi
callq 0x29e50
movq 0x20(%rsp), %rax
movq %rax, 0x68(%rsp)
movq 0x28(%rsp), %rax
movq %rax, 0x70(%rsp)
movq 0x68(%rsp), %rax
movq 0x70(%rsp), %rdx
addq $0x78, %rsp
retq
nopw %cs:(%rax,%rax)
|
js_parseInt:
sub rsp, 78h
mov [rsp+78h+var_20], rsi
mov [rsp+78h+var_18], rdx
mov [rsp+78h+var_28], rdi
mov [rsp+78h+var_2C], ecx
mov [rsp+78h+var_38], r8
mov rdi, [rsp+78h+var_28]
mov rax, [rsp+78h+var_38]
mov rdx, [rax]
mov rcx, [rax+8]
lea rsi, [rsp+78h+var_60]
call JS_ToCStringLen_0
mov [rsp+78h+var_40], rax
cmp [rsp+78h+var_40], 0
jnz short loc_D005A
mov dword ptr [rsp+78h+var_10], 0
mov [rsp+78h+var_8], 6
jmp loc_D0125
loc_D005A:
mov rdi, [rsp+78h+var_28]
mov rax, [rsp+78h+var_38]
mov rdx, [rax+10h]
mov rcx, [rax+18h]
lea rsi, [rsp+78h+var_44]
call JS_ToInt32
cmp eax, 0
jz short loc_D00A0
mov rdi, [rsp+78h+var_28]
mov rsi, [rsp+78h+var_40]
call JS_FreeCString
mov dword ptr [rsp+78h+var_10], 0
mov [rsp+78h+var_8], 6
jmp loc_D0125
loc_D00A0:
mov [rsp+78h+var_48], 1
cmp [rsp+78h+var_44], 0
jnz short loc_D00C2
mov eax, [rsp+78h+var_48]
or eax, 20h
mov [rsp+78h+var_48], eax
mov [rsp+78h+var_44], 0Ah
loc_D00C2:
mov rdi, [rsp+78h+var_28]
mov rsi, [rsp+78h+var_40]
mov rdx, [rsp+78h+var_60]
mov r8d, [rsp+78h+var_44]
mov r9d, [rsp+78h+var_48]
xor eax, eax
mov ecx, eax
call js_atof
mov [rsp+78h+var_70], rax
mov [rsp+78h+var_68], rdx
mov rax, [rsp+78h+var_70]
mov [rsp+78h+var_58], rax
mov rax, [rsp+78h+var_68]
mov [rsp+78h+var_50], rax
mov rdi, [rsp+78h+var_28]
mov rsi, [rsp+78h+var_40]
call JS_FreeCString
mov rax, [rsp+78h+var_58]
mov [rsp+78h+var_10], rax
mov rax, [rsp+78h+var_50]
mov [rsp+78h+var_8], rax
loc_D0125:
mov rax, [rsp+78h+var_10]
mov rdx, [rsp+78h+var_8]
add rsp, 78h
retn
|
long long js_parseInt(long long a1, long long a2, long long a3, int a4, long long *a5)
{
long long v5; // rdx
unsigned __int8 *v7; // [rsp+18h] [rbp-60h] BYREF
long long v8; // [rsp+20h] [rbp-58h]
long long v9; // [rsp+28h] [rbp-50h]
int v10; // [rsp+30h] [rbp-48h]
int v11; // [rsp+34h] [rbp-44h] BYREF
unsigned __int8 *v12; // [rsp+38h] [rbp-40h]
long long *v13; // [rsp+40h] [rbp-38h]
int v14; // [rsp+4Ch] [rbp-2Ch]
long long v15; // [rsp+50h] [rbp-28h]
long long v16; // [rsp+58h] [rbp-20h]
long long v17; // [rsp+60h] [rbp-18h]
long long v18; // [rsp+68h] [rbp-10h]
long long v19; // [rsp+70h] [rbp-8h]
v16 = a2;
v17 = a3;
v15 = a1;
v14 = a4;
v13 = a5;
v12 = (unsigned __int8 *)JS_ToCStringLen_0(a1, &v7, *a5, a5[1]);
if ( v12 )
{
if ( (unsigned int)JS_ToInt32(v15, (long long)&v11, (_DWORD *)v13[2], v13[3]) )
{
JS_FreeCString(v15, (long long)v12);
LODWORD(v18) = 0;
v19 = 6LL;
}
else
{
v10 = 1;
if ( !v11 )
{
v10 |= 0x20u;
v11 = 10;
}
v8 = js_atof(v15, v12, v7, 0LL, v11, v10);
v9 = v5;
JS_FreeCString(v15, (long long)v12);
v18 = v8;
v19 = v9;
}
}
else
{
LODWORD(v18) = 0;
v19 = 6LL;
}
return v18;
}
|
js_parseInt:
SUB RSP,0x78
MOV qword ptr [RSP + 0x58],RSI
MOV qword ptr [RSP + 0x60],RDX
MOV qword ptr [RSP + 0x50],RDI
MOV dword ptr [RSP + 0x4c],ECX
MOV qword ptr [RSP + 0x40],R8
MOV RDI,qword ptr [RSP + 0x50]
MOV RAX,qword ptr [RSP + 0x40]
MOV RDX,qword ptr [RAX]
MOV RCX,qword ptr [RAX + 0x8]
LEA RSI,[RSP + 0x18]
CALL 0x00162ed0
MOV qword ptr [RSP + 0x38],RAX
CMP qword ptr [RSP + 0x38],0x0
JNZ 0x001d005a
MOV dword ptr [RSP + 0x68],0x0
MOV qword ptr [RSP + 0x70],0x6
JMP 0x001d0125
LAB_001d005a:
MOV RDI,qword ptr [RSP + 0x50]
MOV RAX,qword ptr [RSP + 0x40]
MOV RDX,qword ptr [RAX + 0x10]
MOV RCX,qword ptr [RAX + 0x18]
LEA RSI,[RSP + 0x34]
CALL 0x00138f20
CMP EAX,0x0
JZ 0x001d00a0
MOV RDI,qword ptr [RSP + 0x50]
MOV RSI,qword ptr [RSP + 0x38]
CALL 0x00129e50
MOV dword ptr [RSP + 0x68],0x0
MOV qword ptr [RSP + 0x70],0x6
JMP 0x001d0125
LAB_001d00a0:
MOV dword ptr [RSP + 0x30],0x1
CMP dword ptr [RSP + 0x34],0x0
JNZ 0x001d00c2
MOV EAX,dword ptr [RSP + 0x30]
OR EAX,0x20
MOV dword ptr [RSP + 0x30],EAX
MOV dword ptr [RSP + 0x34],0xa
LAB_001d00c2:
MOV RDI,qword ptr [RSP + 0x50]
MOV RSI,qword ptr [RSP + 0x38]
MOV RDX,qword ptr [RSP + 0x18]
MOV R8D,dword ptr [RSP + 0x34]
MOV R9D,dword ptr [RSP + 0x30]
XOR EAX,EAX
MOV ECX,EAX
CALL 0x00162f10
MOV qword ptr [RSP + 0x8],RAX
MOV qword ptr [RSP + 0x10],RDX
MOV RAX,qword ptr [RSP + 0x8]
MOV qword ptr [RSP + 0x20],RAX
MOV RAX,qword ptr [RSP + 0x10]
MOV qword ptr [RSP + 0x28],RAX
MOV RDI,qword ptr [RSP + 0x50]
MOV RSI,qword ptr [RSP + 0x38]
CALL 0x00129e50
MOV RAX,qword ptr [RSP + 0x20]
MOV qword ptr [RSP + 0x68],RAX
MOV RAX,qword ptr [RSP + 0x28]
MOV qword ptr [RSP + 0x70],RAX
LAB_001d0125:
MOV RAX,qword ptr [RSP + 0x68]
MOV RDX,qword ptr [RSP + 0x70]
ADD RSP,0x78
RET
|
int1 [16]
js_parseInt(int8 param_1,int8 param_2,int8 param_3,int4 param_4,
int8 *param_5)
{
int1 auVar1 [16];
int iVar2;
int8 local_60;
int1 local_58 [16];
int4 local_48;
int local_44;
long local_40;
int8 *local_38;
int4 local_2c;
int8 local_28;
int8 local_20;
int8 local_18;
int4 local_10;
int4 uStack_c;
int8 local_8;
local_38 = param_5;
local_2c = param_4;
local_28 = param_1;
local_20 = param_2;
local_18 = param_3;
local_40 = JS_ToCStringLen(param_1,&local_60,*param_5,param_5[1]);
if (local_40 == 0) {
local_10 = 0;
local_8 = 6;
}
else {
iVar2 = JS_ToInt32(local_28,&local_44,local_38[2],local_38[3]);
if (iVar2 == 0) {
local_48 = 1;
if (local_44 == 0) {
local_48 = 0x21;
local_44 = 10;
}
local_58 = js_atof(local_28,local_40,local_60,0,local_44,local_48);
JS_FreeCString(local_28,local_40);
local_10 = local_58._0_4_;
uStack_c = local_58._4_4_;
local_8 = local_58._8_8_;
}
else {
JS_FreeCString(local_28,local_40);
local_10 = 0;
local_8 = 6;
}
}
auVar1._4_4_ = uStack_c;
auVar1._0_4_ = local_10;
auVar1._8_8_ = local_8;
return auVar1;
}
|
|
57,275
|
std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> nlohmann::json_abi_v3_11_3::detail::concat<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, char const (&) [17], std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, char, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, char const (&) [3]>(char const (&) [17], std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, char&&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&&, char const (&) [3])
|
llama.cpp/common/json.hpp
|
inline OutStringType concat(Args && ... args)
{
OutStringType str;
str.reserve(concat_length(args...));
concat_into(str, std::forward<Args>(args)...);
return str;
}
|
O3
|
cpp
|
std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> nlohmann::json_abi_v3_11_3::detail::concat<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, char const (&) [17], std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, char, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, char const (&) [3]>(char const (&) [17], std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, char&&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&&, char const (&) [3]):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %r9, %r14
movq %r8, %r15
movq %rcx, 0x10(%rsp)
movq %rdx, %r13
movq %rsi, %rbp
movq %rdi, %rbx
leaq 0x10(%rdi), %rax
movq %rax, 0x8(%rsp)
movq %rax, (%rdi)
movq $0x0, 0x8(%rdi)
movb $0x0, 0x10(%rdi)
movq %rsi, %rdi
callq 0x206b0
movq %rax, %r12
addq 0x8(%r13), %r12
addq 0x8(%r15), %r12
movq %r14, %rdi
callq 0x206b0
leaq (%rax,%r12), %rsi
incq %rsi
movq %rbx, %rdi
callq 0x20e80
movq %rbx, %rdi
movq %rbp, %rsi
callq 0x20ba0
movq (%r13), %rsi
movq 0x8(%r13), %rdx
movq %rbx, %rdi
callq 0x20590
movq 0x10(%rsp), %rax
movsbl (%rax), %esi
movq %rbx, %rdi
callq 0x21410
movq (%r15), %rsi
movq 0x8(%r15), %rdx
movq %rbx, %rdi
callq 0x20590
movq %rbx, %rdi
movq %r14, %rsi
callq 0x20ba0
movq %rbx, %rax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r14
movq (%rbx), %rdi
cmpq 0x8(%rsp), %rdi
je 0x77642
movq 0x8(%rsp), %rax
movq (%rax), %rsi
incq %rsi
callq 0x20180
movq %r14, %rdi
callq 0x20b50
|
_ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJRA17_KcRKS8_cS8_RA3_S9_EEET_DpOT0_:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 18h
mov r14, r9
mov r15, r8
mov [rsp+48h+var_38], rcx
mov r13, rdx
mov rbp, rsi
mov rbx, rdi
lea rax, [rdi+10h]
mov [rsp+48h+var_40], rax
mov [rdi], rax
mov qword ptr [rdi+8], 0
mov byte ptr [rdi+10h], 0
mov rdi, rsi
call _strlen
mov r12, rax
add r12, [r13+8]
add r12, [r15+8]
mov rdi, r14
call _strlen
lea rsi, [rax+r12]
inc rsi
mov rdi, rbx
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7reserveEm; std::string::reserve(ulong)
mov rdi, rbx
mov rsi, rbp
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendEPKc; std::string::append(char const*)
mov rsi, [r13+0]
mov rdx, [r13+8]
mov rdi, rbx
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendEPKcm; std::string::append(char const*,ulong)
mov rax, [rsp+48h+var_38]
movsx esi, byte ptr [rax]
mov rdi, rbx
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9push_backEc; std::string::push_back(char)
mov rsi, [r15]
mov rdx, [r15+8]
mov rdi, rbx
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendEPKcm; std::string::append(char const*,ulong)
mov rdi, rbx
mov rsi, r14
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendEPKc; std::string::append(char const*)
mov rax, rbx
add rsp, 18h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
mov r14, rax
mov rdi, [rbx]; void *
cmp rdi, [rsp+arg_0]
jz short loc_77642
mov rax, [rsp+arg_0]
mov rsi, [rax]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_77642:
mov rdi, r14
call __Unwind_Resume
|
long long nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[17],std::string const&,char,std::string,char const(&)[3]>(
long long a1,
long long a2,
_QWORD *a3,
char *a4,
_QWORD *a5,
long long a6)
{
long long v9; // r12
long long v10; // rax
*(_QWORD *)a1 = a1 + 16;
*(_QWORD *)(a1 + 8) = 0LL;
*(_BYTE *)(a1 + 16) = 0;
v9 = a5[1] + a3[1] + strlen(a2);
v10 = strlen(a6);
std::string::reserve(a1, v10 + v9 + 1);
std::string::append(a1, a2);
std::string::append(a1, *a3, a3[1]);
std::string::push_back(a1, (unsigned int)*a4);
std::string::append(a1, *a5, a5[1]);
std::string::append(a1, a6);
return a1;
}
|
concat<std::__cxx11::string,char_const(&)[17],std::__cxx11::string_const&,char,std::__cxx11::string,char_const(&)[3]>:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x18
MOV R14,R9
MOV R15,R8
MOV qword ptr [RSP + 0x10],RCX
MOV R13,RDX
MOV RBP,RSI
MOV RBX,RDI
LEA RAX,[RDI + 0x10]
MOV qword ptr [RSP + 0x8],RAX
MOV qword ptr [RDI],RAX
MOV qword ptr [RDI + 0x8],0x0
MOV byte ptr [RDI + 0x10],0x0
MOV RDI,RSI
CALL 0x001206b0
MOV R12,RAX
ADD R12,qword ptr [R13 + 0x8]
ADD R12,qword ptr [R15 + 0x8]
MOV RDI,R14
CALL 0x001206b0
LEA RSI,[RAX + R12*0x1]
INC RSI
LAB_001775c6:
MOV RDI,RBX
CALL 0x00120e80
MOV RDI,RBX
MOV RSI,RBP
CALL 0x00120ba0
MOV RSI,qword ptr [R13]
MOV RDX,qword ptr [R13 + 0x8]
MOV RDI,RBX
CALL 0x00120590
MOV RAX,qword ptr [RSP + 0x10]
MOVSX ESI,byte ptr [RAX]
MOV RDI,RBX
CALL 0x00121410
MOV RSI,qword ptr [R15]
MOV RDX,qword ptr [R15 + 0x8]
MOV RDI,RBX
CALL 0x00120590
MOV RDI,RBX
MOV RSI,R14
CALL 0x00120ba0
LAB_00177613:
MOV RAX,RBX
ADD RSP,0x18
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
/* std::__cxx11::string nlohmann::json_abi_v3_11_3::detail::concat<std::__cxx11::string, char const
(&) [17], std::__cxx11::string const&, char, std::__cxx11::string, char const (&) [3]>(char const
(&) [17], std::__cxx11::string const&, char&&, std::__cxx11::string&&, char const (&) [3]) */
detail * __thiscall
nlohmann::json_abi_v3_11_3::detail::
concat<std::__cxx11::string,char_const(&)[17],std::__cxx11::string_const&,char,std::__cxx11::string,char_const(&)[3]>
(detail *this,char *param_1,string *param_2,char *param_3,string *param_4,char *param_5)
{
*(detail **)this = this + 0x10;
*(int8 *)(this + 8) = 0;
this[0x10] = (detail)0x0;
strlen(param_1);
strlen(param_5);
/* try { // try from 001775c6 to 00177612 has its CatchHandler @ 00177625 */
std::__cxx11::string::reserve((ulong)this);
std::__cxx11::string::append((char *)this);
std::__cxx11::string::append((char *)this,*(ulong *)param_2);
std::__cxx11::string::push_back((char)this);
std::__cxx11::string::append((char *)this,*(ulong *)param_4);
std::__cxx11::string::append((char *)this);
return this;
}
|
|
57,276
|
spdlog::details::z_formatter<spdlog::details::null_scoped_padder>::format(spdlog::details::log_msg const&, tm const&, fmt::v10::basic_memory_buffer<char, 250ul, std::allocator<char>>&)
|
AlayaLite/build_O3/_deps/spdlog-src/include/spdlog/pattern_formatter-inl.h
|
void format(const details::log_msg &msg, const std::tm &tm_time, memory_buf_t &dest) override {
const size_t field_size = 6;
ScopedPadder p(field_size, padinfo_, dest);
auto total_minutes = get_cached_offset(msg, tm_time);
bool is_negative = total_minutes < 0;
if (is_negative) {
total_minutes = -total_minutes;
dest.push_back('-');
} else {
dest.push_back('+');
}
fmt_helper::pad2(total_minutes / 60, dest); // hours
dest.push_back(':');
fmt_helper::pad2(total_minutes % 60, dest); // minutes
}
|
O3
|
c
|
spdlog::details::z_formatter<spdlog::details::null_scoped_padder>::format(spdlog::details::log_msg const&, tm const&, fmt::v10::basic_memory_buffer<char, 250ul, std::allocator<char>>&):
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %rcx, %rbx
movq 0x18(%rsi), %rsi
movq %rsi, %rax
subq 0x18(%rdi), %rax
movabsq $0x2540be3ff, %rcx # imm = 0x2540BE3FF
cmpq %rcx, %rax
jle 0x39a31
movq 0x28(%rdx), %rcx
movabsq $-0x7777777777777777, %rdx # imm = 0x8888888888888889
movq %rcx, %rax
imulq %rdx
movq %rdx, %r14
addq %rcx, %r14
movq %r14, %rax
shrq $0x3f, %rax
shrq $0x5, %r14
addl %eax, %r14d
movl %r14d, 0x20(%rdi)
movq %rsi, 0x18(%rdi)
jmp 0x39a35
movl 0x20(%rdi), %r14d
testl %r14d, %r14d
js 0x39a66
movq 0x10(%rbx), %rax
leaq 0x1(%rax), %rsi
cmpq %rsi, 0x18(%rbx)
jae 0x39a58
movq (%rbx), %rax
movq %rbx, %rdi
callq *(%rax)
movq 0x10(%rbx), %rax
leaq 0x1(%rax), %rsi
movq 0x8(%rbx), %rcx
movq %rsi, 0x10(%rbx)
movb $0x2b, (%rcx,%rax)
jmp 0x39a93
movq 0x10(%rbx), %rax
leaq 0x1(%rax), %rsi
cmpq %rsi, 0x18(%rbx)
jae 0x39a84
movq (%rbx), %rax
movq %rbx, %rdi
callq *(%rax)
movq 0x10(%rbx), %rax
leaq 0x1(%rax), %rsi
negl %r14d
movq 0x8(%rbx), %rcx
movq %rsi, 0x10(%rbx)
movb $0x2d, (%rcx,%rax)
movl %r14d, %ecx
movl $0x88888889, %eax # imm = 0x88888889
imulq %rcx, %rax
shrq $0x25, %rax
imull $0x3c, %eax, %ebp
cmpl $0x176f, %r14d # imm = 0x176F
ja 0x39b26
movzbl %al, %r15d
imull $0xcd, %r15d, %r12d
shrl $0xb, %r12d
leal (%r12,%r12), %eax
leal (%rax,%rax,4), %eax
subb %al, %r15b
orb $0x30, %r12b
movq 0x10(%rbx), %rax
leaq 0x1(%rax), %rsi
cmpq %rsi, 0x18(%rbx)
jae 0x39aea
movq (%rbx), %rax
movq %rbx, %rdi
callq *(%rax)
movq 0x10(%rbx), %rax
leaq 0x1(%rax), %rsi
movq 0x8(%rbx), %rcx
movq %rsi, 0x10(%rbx)
movb %r12b, (%rcx,%rax)
orb $0x30, %r15b
movq 0x10(%rbx), %rax
leaq 0x1(%rax), %rsi
cmpq %rsi, 0x18(%rbx)
jae 0x39b18
movq (%rbx), %rax
movq %rbx, %rdi
callq *(%rax)
movq 0x10(%rbx), %rax
leaq 0x1(%rax), %rsi
movq 0x8(%rbx), %rcx
movq %rsi, 0x10(%rbx)
movb %r15b, (%rcx,%rax)
jmp 0x39b4a
movl %eax, %eax
movq %rsp, %r8
movq %rax, (%r8)
leaq 0x48036(%rip), %rsi # 0x81b6b
movl $0x5, %edx
movl $0x1, %ecx
movq %rbx, %rdi
xorl %r9d, %r9d
callq 0x4163d
subl %ebp, %r14d
movq 0x10(%rbx), %rax
leaq 0x1(%rax), %rsi
cmpq %rsi, 0x18(%rbx)
jae 0x39b6b
movq (%rbx), %rax
movq %rbx, %rdi
callq *(%rax)
movq 0x10(%rbx), %rax
leaq 0x1(%rax), %rsi
movq 0x8(%rbx), %rcx
movq %rsi, 0x10(%rbx)
movb $0x3a, (%rcx,%rax)
movzbl %r14b, %eax
imull $0xcd, %eax, %r15d
shrl $0xb, %r15d
leal (%r15,%r15), %eax
leal (%rax,%rax,4), %ebp
orb $0x30, %r15b
movq 0x10(%rbx), %rax
leaq 0x1(%rax), %rsi
cmpq %rsi, 0x18(%rbx)
jae 0x39baf
movq (%rbx), %rax
movq %rbx, %rdi
callq *(%rax)
movq 0x10(%rbx), %rax
leaq 0x1(%rax), %rsi
subb %bpl, %r14b
movq 0x8(%rbx), %rcx
movq %rsi, 0x10(%rbx)
movb %r15b, (%rcx,%rax)
movq 0x10(%rbx), %rax
leaq 0x1(%rax), %rsi
cmpq %rsi, 0x18(%rbx)
jae 0x39bdc
movq (%rbx), %rax
movq %rbx, %rdi
callq *(%rax)
movq 0x10(%rbx), %rax
leaq 0x1(%rax), %rsi
orb $0x30, %r14b
movq 0x8(%rbx), %rcx
movq %rsi, 0x10(%rbx)
movb %r14b, (%rcx,%rax)
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
nop
|
_ZN6spdlog7details11z_formatterINS0_18null_scoped_padderEE6formatERKNS0_7log_msgERK2tmRN3fmt3v1019basic_memory_bufferIcLm250ESaIcEEE:
push rbp
push r15
push r14
push r12
push rbx
sub rsp, 10h
mov rbx, rcx
mov rsi, [rsi+18h]
mov rax, rsi
sub rax, [rdi+18h]
mov rcx, 2540BE3FFh
cmp rax, rcx
jle short loc_39A31
mov rcx, [rdx+28h]
mov rdx, 8888888888888889h
mov rax, rcx
imul rdx
mov r14, rdx
add r14, rcx
mov rax, r14
shr rax, 3Fh
shr r14, 5
add r14d, eax
mov [rdi+20h], r14d
mov [rdi+18h], rsi
jmp short loc_39A35
loc_39A31:
mov r14d, [rdi+20h]
loc_39A35:
test r14d, r14d
js short loc_39A66
mov rax, [rbx+10h]
lea rsi, [rax+1]
cmp [rbx+18h], rsi
jnb short loc_39A58
mov rax, [rbx]
mov rdi, rbx
call qword ptr [rax]
mov rax, [rbx+10h]
lea rsi, [rax+1]
loc_39A58:
mov rcx, [rbx+8]
mov [rbx+10h], rsi
mov byte ptr [rcx+rax], 2Bh ; '+'
jmp short loc_39A93
loc_39A66:
mov rax, [rbx+10h]
lea rsi, [rax+1]
cmp [rbx+18h], rsi
jnb short loc_39A84
mov rax, [rbx]
mov rdi, rbx
call qword ptr [rax]
mov rax, [rbx+10h]
lea rsi, [rax+1]
loc_39A84:
neg r14d
mov rcx, [rbx+8]
mov [rbx+10h], rsi
mov byte ptr [rcx+rax], 2Dh ; '-'
loc_39A93:
mov ecx, r14d
mov eax, 88888889h
imul rax, rcx
shr rax, 25h
imul ebp, eax, 3Ch ; '<'
cmp r14d, 176Fh
ja short loc_39B26
movzx r15d, al
imul r12d, r15d, 0CDh
shr r12d, 0Bh
lea eax, [r12+r12]
lea eax, [rax+rax*4]
sub r15b, al
or r12b, 30h
mov rax, [rbx+10h]
lea rsi, [rax+1]
cmp [rbx+18h], rsi
jnb short loc_39AEA
mov rax, [rbx]
mov rdi, rbx
call qword ptr [rax]
mov rax, [rbx+10h]
lea rsi, [rax+1]
loc_39AEA:
mov rcx, [rbx+8]
mov [rbx+10h], rsi
mov [rcx+rax], r12b
or r15b, 30h
mov rax, [rbx+10h]
lea rsi, [rax+1]
cmp [rbx+18h], rsi
jnb short loc_39B18
mov rax, [rbx]
mov rdi, rbx
call qword ptr [rax]
mov rax, [rbx+10h]
lea rsi, [rax+1]
loc_39B18:
mov rcx, [rbx+8]
mov [rbx+10h], rsi
mov [rcx+rax], r15b
jmp short loc_39B4A
loc_39B26:
mov eax, eax
mov r8, rsp
mov [r8], rax
lea rsi, a02; "{:02}"
mov edx, 5
mov ecx, 1
mov rdi, rbx; int
xor r9d, r9d
call _ZN3fmt3v106detail10vformat_toIcEEvRNS1_6bufferIT_EENS0_17basic_string_viewIS4_EENS1_12vformat_argsIS4_E4typeENS1_10locale_refE; fmt::v10::detail::vformat_to<char>(fmt::v10::detail::buffer<char> &,fmt::v10::basic_string_view<char>,fmt::v10::detail::vformat_args<char>::type,fmt::v10::detail::locale_ref)
loc_39B4A:
sub r14d, ebp
mov rax, [rbx+10h]
lea rsi, [rax+1]
cmp [rbx+18h], rsi
jnb short loc_39B6B
mov rax, [rbx]
mov rdi, rbx
call qword ptr [rax]
mov rax, [rbx+10h]
lea rsi, [rax+1]
loc_39B6B:
mov rcx, [rbx+8]
mov [rbx+10h], rsi
mov byte ptr [rcx+rax], 3Ah ; ':'
movzx eax, r14b
imul r15d, eax, 0CDh
shr r15d, 0Bh
lea eax, [r15+r15]
lea ebp, [rax+rax*4]
or r15b, 30h
mov rax, [rbx+10h]
lea rsi, [rax+1]
cmp [rbx+18h], rsi
jnb short loc_39BAF
mov rax, [rbx]
mov rdi, rbx
call qword ptr [rax]
mov rax, [rbx+10h]
lea rsi, [rax+1]
loc_39BAF:
sub r14b, bpl
mov rcx, [rbx+8]
mov [rbx+10h], rsi
mov [rcx+rax], r15b
mov rax, [rbx+10h]
lea rsi, [rax+1]
cmp [rbx+18h], rsi
jnb short loc_39BDC
mov rax, [rbx]
mov rdi, rbx
call qword ptr [rax]
mov rax, [rbx+10h]
lea rsi, [rax+1]
loc_39BDC:
or r14b, 30h
mov rcx, [rbx+8]
mov [rbx+10h], rsi
mov [rcx+rax], r14b
add rsp, 10h
pop rbx
pop r12
pop r14
pop r15
pop rbp
retn
|
long long spdlog::details::z_formatter<spdlog::details::null_scoped_padder>::format(
long long a1,
long long a2,
long long a3,
long long a4)
{
long long v5; // rsi
unsigned int v6; // r14d
long long v7; // rax
long long v8; // rsi
long long v9; // rcx
long long v10; // rax
long long v11; // rsi
long long v12; // rcx
unsigned int v13; // eax
char v14; // r15
char v15; // r12
long long v16; // rax
long long v17; // rsi
long long v18; // rcx
char v19; // r15
long long v20; // rax
long long v21; // rsi
long long v22; // rcx
unsigned __int8 v23; // r14
long long v24; // rax
long long v25; // rsi
long long v26; // rcx
char v27; // r15
long long v28; // rax
long long v29; // rsi
char v30; // r14
long long v31; // rcx
long long result; // rax
long long v33; // rsi
long long v34; // rcx
v5 = *(_QWORD *)(a2 + 24);
if ( v5 - *(_QWORD *)(a1 + 24) <= 0x2540BE3FFLL )
{
v6 = *(_DWORD *)(a1 + 32);
}
else
{
v6 = (int)*(_QWORD *)(a3 + 40) / 60;
*(_DWORD *)(a1 + 32) = v6;
*(_QWORD *)(a1 + 24) = v5;
}
if ( (v6 & 0x80000000) != 0 )
{
v10 = *(_QWORD *)(a4 + 16);
v11 = v10 + 1;
if ( *(_QWORD *)(a4 + 24) < (unsigned long long)(v10 + 1) )
{
(**(void ( ***)(long long))a4)(a4);
v10 = *(_QWORD *)(a4 + 16);
v11 = v10 + 1;
}
v6 = -v6;
v12 = *(_QWORD *)(a4 + 8);
*(_QWORD *)(a4 + 16) = v11;
*(_BYTE *)(v12 + v10) = 45;
}
else
{
v7 = *(_QWORD *)(a4 + 16);
v8 = v7 + 1;
if ( *(_QWORD *)(a4 + 24) < (unsigned long long)(v7 + 1) )
{
(**(void ( ***)(long long))a4)(a4);
v7 = *(_QWORD *)(a4 + 16);
v8 = v7 + 1;
}
v9 = *(_QWORD *)(a4 + 8);
*(_QWORD *)(a4 + 16) = v8;
*(_BYTE *)(v9 + v7) = 43;
}
v13 = v6 / 0x3C;
if ( v6 > 0x176F )
{
fmt::v10::detail::vformat_to<char>(a4);
}
else
{
v14 = (unsigned __int8)v13 % 0xAu;
v15 = ((unsigned __int8)v13 / 0xAu) | 0x30;
v16 = *(_QWORD *)(a4 + 16);
v17 = v16 + 1;
if ( *(_QWORD *)(a4 + 24) < (unsigned long long)(v16 + 1) )
{
(**(void ( ***)(long long))a4)(a4);
v16 = *(_QWORD *)(a4 + 16);
v17 = v16 + 1;
}
v18 = *(_QWORD *)(a4 + 8);
*(_QWORD *)(a4 + 16) = v17;
*(_BYTE *)(v18 + v16) = v15;
v19 = v14 | 0x30;
v20 = *(_QWORD *)(a4 + 16);
v21 = v20 + 1;
if ( *(_QWORD *)(a4 + 24) < (unsigned long long)(v20 + 1) )
{
(**(void ( ***)(long long))a4)(a4);
v20 = *(_QWORD *)(a4 + 16);
v21 = v20 + 1;
}
v22 = *(_QWORD *)(a4 + 8);
*(_QWORD *)(a4 + 16) = v21;
*(_BYTE *)(v22 + v20) = v19;
}
v23 = v6 % 0x3C;
v24 = *(_QWORD *)(a4 + 16);
v25 = v24 + 1;
if ( *(_QWORD *)(a4 + 24) < (unsigned long long)(v24 + 1) )
{
(**(void ( ***)(long long))a4)(a4);
v24 = *(_QWORD *)(a4 + 16);
v25 = v24 + 1;
}
v26 = *(_QWORD *)(a4 + 8);
*(_QWORD *)(a4 + 16) = v25;
*(_BYTE *)(v26 + v24) = 58;
v27 = (v23 / 0xAu) | 0x30;
v28 = *(_QWORD *)(a4 + 16);
v29 = v28 + 1;
if ( *(_QWORD *)(a4 + 24) < (unsigned long long)(v28 + 1) )
{
(**(void ( ***)(long long))a4)(a4);
v28 = *(_QWORD *)(a4 + 16);
v29 = v28 + 1;
}
v30 = v23 % 0xAu;
v31 = *(_QWORD *)(a4 + 8);
*(_QWORD *)(a4 + 16) = v29;
*(_BYTE *)(v31 + v28) = v27;
result = *(_QWORD *)(a4 + 16);
v33 = result + 1;
if ( *(_QWORD *)(a4 + 24) < (unsigned long long)(result + 1) )
{
(**(void ( ***)(long long))a4)(a4);
result = *(_QWORD *)(a4 + 16);
v33 = result + 1;
}
v34 = *(_QWORD *)(a4 + 8);
*(_QWORD *)(a4 + 16) = v33;
*(_BYTE *)(v34 + result) = v30 | 0x30;
return result;
}
|
format:
PUSH RBP
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
SUB RSP,0x10
MOV RBX,RCX
MOV RSI,qword ptr [RSI + 0x18]
MOV RAX,RSI
SUB RAX,qword ptr [RDI + 0x18]
MOV RCX,0x2540be3ff
CMP RAX,RCX
JLE 0x00139a31
MOV RCX,qword ptr [RDX + 0x28]
MOV RDX,-0x7777777777777777
MOV RAX,RCX
IMUL RDX
MOV R14,RDX
ADD R14,RCX
MOV RAX,R14
SHR RAX,0x3f
SHR R14,0x5
ADD R14D,EAX
MOV dword ptr [RDI + 0x20],R14D
MOV qword ptr [RDI + 0x18],RSI
JMP 0x00139a35
LAB_00139a31:
MOV R14D,dword ptr [RDI + 0x20]
LAB_00139a35:
TEST R14D,R14D
JS 0x00139a66
MOV RAX,qword ptr [RBX + 0x10]
LEA RSI,[RAX + 0x1]
CMP qword ptr [RBX + 0x18],RSI
JNC 0x00139a58
MOV RAX,qword ptr [RBX]
MOV RDI,RBX
CALL qword ptr [RAX]
MOV RAX,qword ptr [RBX + 0x10]
LEA RSI,[RAX + 0x1]
LAB_00139a58:
MOV RCX,qword ptr [RBX + 0x8]
MOV qword ptr [RBX + 0x10],RSI
MOV byte ptr [RCX + RAX*0x1],0x2b
JMP 0x00139a93
LAB_00139a66:
MOV RAX,qword ptr [RBX + 0x10]
LEA RSI,[RAX + 0x1]
CMP qword ptr [RBX + 0x18],RSI
JNC 0x00139a84
MOV RAX,qword ptr [RBX]
MOV RDI,RBX
CALL qword ptr [RAX]
MOV RAX,qword ptr [RBX + 0x10]
LEA RSI,[RAX + 0x1]
LAB_00139a84:
NEG R14D
MOV RCX,qword ptr [RBX + 0x8]
MOV qword ptr [RBX + 0x10],RSI
MOV byte ptr [RCX + RAX*0x1],0x2d
LAB_00139a93:
MOV ECX,R14D
MOV EAX,0x88888889
IMUL RAX,RCX
SHR RAX,0x25
IMUL EBP,EAX,0x3c
CMP R14D,0x176f
JA 0x00139b26
MOVZX R15D,AL
IMUL R12D,R15D,0xcd
SHR R12D,0xb
LEA EAX,[R12 + R12*0x1]
LEA EAX,[RAX + RAX*0x4]
SUB R15B,AL
OR R12B,0x30
MOV RAX,qword ptr [RBX + 0x10]
LEA RSI,[RAX + 0x1]
CMP qword ptr [RBX + 0x18],RSI
JNC 0x00139aea
MOV RAX,qword ptr [RBX]
MOV RDI,RBX
CALL qword ptr [RAX]
MOV RAX,qword ptr [RBX + 0x10]
LEA RSI,[RAX + 0x1]
LAB_00139aea:
MOV RCX,qword ptr [RBX + 0x8]
MOV qword ptr [RBX + 0x10],RSI
MOV byte ptr [RCX + RAX*0x1],R12B
OR R15B,0x30
MOV RAX,qword ptr [RBX + 0x10]
LEA RSI,[RAX + 0x1]
CMP qword ptr [RBX + 0x18],RSI
JNC 0x00139b18
MOV RAX,qword ptr [RBX]
MOV RDI,RBX
CALL qword ptr [RAX]
MOV RAX,qword ptr [RBX + 0x10]
LEA RSI,[RAX + 0x1]
LAB_00139b18:
MOV RCX,qword ptr [RBX + 0x8]
MOV qword ptr [RBX + 0x10],RSI
MOV byte ptr [RCX + RAX*0x1],R15B
JMP 0x00139b4a
LAB_00139b26:
MOV EAX,EAX
MOV R8,RSP
MOV qword ptr [R8],RAX
LEA RSI,[0x181b6b]
MOV EDX,0x5
MOV ECX,0x1
MOV RDI,RBX
XOR R9D,R9D
CALL 0x0014163d
LAB_00139b4a:
SUB R14D,EBP
MOV RAX,qword ptr [RBX + 0x10]
LEA RSI,[RAX + 0x1]
CMP qword ptr [RBX + 0x18],RSI
JNC 0x00139b6b
MOV RAX,qword ptr [RBX]
MOV RDI,RBX
CALL qword ptr [RAX]
MOV RAX,qword ptr [RBX + 0x10]
LEA RSI,[RAX + 0x1]
LAB_00139b6b:
MOV RCX,qword ptr [RBX + 0x8]
MOV qword ptr [RBX + 0x10],RSI
MOV byte ptr [RCX + RAX*0x1],0x3a
MOVZX EAX,R14B
IMUL R15D,EAX,0xcd
SHR R15D,0xb
LEA EAX,[R15 + R15*0x1]
LEA EBP,[RAX + RAX*0x4]
OR R15B,0x30
MOV RAX,qword ptr [RBX + 0x10]
LEA RSI,[RAX + 0x1]
CMP qword ptr [RBX + 0x18],RSI
JNC 0x00139baf
MOV RAX,qword ptr [RBX]
MOV RDI,RBX
CALL qword ptr [RAX]
MOV RAX,qword ptr [RBX + 0x10]
LEA RSI,[RAX + 0x1]
LAB_00139baf:
SUB R14B,BPL
MOV RCX,qword ptr [RBX + 0x8]
MOV qword ptr [RBX + 0x10],RSI
MOV byte ptr [RCX + RAX*0x1],R15B
MOV RAX,qword ptr [RBX + 0x10]
LEA RSI,[RAX + 0x1]
CMP qword ptr [RBX + 0x18],RSI
JNC 0x00139bdc
MOV RAX,qword ptr [RBX]
MOV RDI,RBX
CALL qword ptr [RAX]
MOV RAX,qword ptr [RBX + 0x10]
LEA RSI,[RAX + 0x1]
LAB_00139bdc:
OR R14B,0x30
MOV RCX,qword ptr [RBX + 0x8]
MOV qword ptr [RBX + 0x10],RSI
MOV byte ptr [RCX + RAX*0x1],R14B
ADD RSP,0x10
POP RBX
POP R12
POP R14
POP R15
POP RBP
RET
|
/* spdlog::details::z_formatter<spdlog::details::null_scoped_padder>::format(spdlog::details::log_msg
const&, tm const&, fmt::v10::basic_memory_buffer<char, 250ul, std::allocator<char> >&) */
void __thiscall
spdlog::details::z_formatter<spdlog::details::null_scoped_padder>::format
(z_formatter<spdlog::details::null_scoped_padder> *this,log_msg *param_1,tm *param_2,
basic_memory_buffer *param_3)
{
int1 auVar1 [16];
byte bVar2;
long lVar3;
ulong uVar4;
uint uVar5;
ulong local_38 [2];
lVar3 = *(long *)(param_1 + 0x18);
if (lVar3 - *(long *)(this + 0x18) < 10000000000) {
uVar5 = *(uint *)(this + 0x20);
}
else {
auVar1 = SEXT816(param_2->tm_gmtoff) * ZEXT816(0x8888888888888889);
uVar5 = (int)(auVar1._8_8_ >> 5) - (auVar1._12_4_ >> 0x1f);
*(uint *)(this + 0x20) = uVar5;
*(long *)(this + 0x18) = lVar3;
}
if ((int)uVar5 < 0) {
lVar3 = *(long *)(param_3 + 0x10);
uVar4 = lVar3 + 1;
if (*(ulong *)(param_3 + 0x18) < uVar4) {
(*(code *)**(int8 **)param_3)(param_3);
lVar3 = *(long *)(param_3 + 0x10);
uVar4 = lVar3 + 1;
}
uVar5 = -uVar5;
*(ulong *)(param_3 + 0x10) = uVar4;
*(int1 *)(*(long *)(param_3 + 8) + lVar3) = 0x2d;
}
else {
lVar3 = *(long *)(param_3 + 0x10);
uVar4 = lVar3 + 1;
if (*(ulong *)(param_3 + 0x18) < uVar4) {
(*(code *)**(int8 **)param_3)(param_3);
lVar3 = *(long *)(param_3 + 0x10);
uVar4 = lVar3 + 1;
}
*(ulong *)(param_3 + 0x10) = uVar4;
*(int1 *)(*(long *)(param_3 + 8) + lVar3) = 0x2b;
}
if (uVar5 < 6000) {
bVar2 = (byte)((uVar5 / 0x3c & 0xff) / 10);
lVar3 = *(long *)(param_3 + 0x10);
uVar4 = lVar3 + 1;
if (*(ulong *)(param_3 + 0x18) < uVar4) {
(*(code *)**(int8 **)param_3)(param_3);
lVar3 = *(long *)(param_3 + 0x10);
uVar4 = lVar3 + 1;
}
*(ulong *)(param_3 + 0x10) = uVar4;
*(byte *)(*(long *)(param_3 + 8) + lVar3) = bVar2 | 0x30;
lVar3 = *(long *)(param_3 + 0x10);
uVar4 = lVar3 + 1;
if (*(ulong *)(param_3 + 0x18) < uVar4) {
(*(code *)**(int8 **)param_3)(param_3);
lVar3 = *(long *)(param_3 + 0x10);
uVar4 = lVar3 + 1;
}
*(ulong *)(param_3 + 0x10) = uVar4;
*(byte *)(*(long *)(param_3 + 8) + lVar3) = (char)((ulong)uVar5 / 0x3c) + bVar2 * -10 | 0x30;
}
else {
local_38[0] = (ulong)(uVar5 / 0x3c);
fmt::v10::detail::vformat_to<char>(param_3,"{:02}",5,1,local_38,0);
}
lVar3 = *(long *)(param_3 + 0x10);
uVar4 = lVar3 + 1;
if (*(ulong *)(param_3 + 0x18) < uVar4) {
(*(code *)**(int8 **)param_3)(param_3);
lVar3 = *(long *)(param_3 + 0x10);
uVar4 = lVar3 + 1;
}
*(ulong *)(param_3 + 0x10) = uVar4;
*(int1 *)(*(long *)(param_3 + 8) + lVar3) = 0x3a;
bVar2 = (byte)((uVar5 % 0x3c) / 10);
lVar3 = *(long *)(param_3 + 0x10);
uVar4 = lVar3 + 1;
if (*(ulong *)(param_3 + 0x18) < uVar4) {
(*(code *)**(int8 **)param_3)(param_3);
lVar3 = *(long *)(param_3 + 0x10);
uVar4 = lVar3 + 1;
}
*(ulong *)(param_3 + 0x10) = uVar4;
*(byte *)(*(long *)(param_3 + 8) + lVar3) = bVar2 | 0x30;
lVar3 = *(long *)(param_3 + 0x10);
uVar4 = lVar3 + 1;
if (*(ulong *)(param_3 + 0x18) < uVar4) {
(*(code *)**(int8 **)param_3)(param_3);
lVar3 = *(long *)(param_3 + 0x10);
uVar4 = lVar3 + 1;
}
*(ulong *)(param_3 + 0x10) = uVar4;
*(byte *)(*(long *)(param_3 + 8) + lVar3) = (char)(uVar5 % 0x3c) + bVar2 * -10 | 0x30;
return;
}
|
|
57,277
|
Master::handleShot[abi:cxx11](unsigned long, unsigned long)
|
666mxvbee[P]BattleShip/lib/Master/Master.cpp
|
std::string Master::handleShot(uint64_t x, uint64_t y) {
auto& ships = settings.getSlaveShipsMutable();
for (auto& ship : ships) {
if (ship.contains(x, y)) {
if (ship.hitAt(x ,y)) {
if (ship.isSunk()) {
return "hit_and_sunk";
}
return "hit";
}
}
}
return "miss";
}
|
O0
|
cpp
|
Master::handleShot[abi:cxx11](unsigned long, unsigned long):
pushq %rbp
movq %rsp, %rbp
subq $0x90, %rsp
movq %rdi, -0x70(%rbp)
movq %rdi, %rax
movq %rax, -0x68(%rbp)
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rdi
callq 0xac90
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rdi
callq 0xb910
movq %rax, -0x38(%rbp)
movq -0x30(%rbp), %rdi
callq 0xb940
movq %rax, -0x40(%rbp)
leaq -0x38(%rbp), %rdi
leaq -0x40(%rbp), %rsi
callq 0xb970
xorb $-0x1, %al
testb $0x1, %al
jne 0x386b0
jmp 0x387a2
leaq -0x38(%rbp), %rdi
callq 0xb9b0
movq %rax, -0x48(%rbp)
movq -0x48(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x20(%rbp), %rdx
callq 0x38340
testb $0x1, %al
jne 0x386d7
jmp 0x38792
movq -0x48(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x20(%rbp), %rdx
callq 0x38150
testb $0x1, %al
jne 0x386f1
jmp 0x38790
movq -0x48(%rbp), %rdi
callq 0x380b0
testb $0x1, %al
jne 0x38700
jmp 0x3874b
leaq -0x49(%rbp), %rdi
movq %rdi, -0x78(%rbp)
callq 0x7650
movq -0x70(%rbp), %rdi
movq -0x78(%rbp), %rdx
leaq 0x8cad(%rip), %rsi # 0x413c9
callq 0xb110
jmp 0x38723
leaq -0x49(%rbp), %rdi
callq 0x73d0
jmp 0x387ed
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x58(%rbp)
movl %eax, -0x5c(%rbp)
leaq -0x49(%rbp), %rdi
callq 0x73d0
jmp 0x387fa
leaq -0x5d(%rbp), %rdi
movq %rdi, -0x80(%rbp)
callq 0x7650
movq -0x70(%rbp), %rdi
movq -0x80(%rbp), %rdx
leaq 0x8c6f(%rip), %rsi # 0x413d6
callq 0xb110
jmp 0x3876e
leaq -0x5d(%rbp), %rdi
callq 0x73d0
jmp 0x387ed
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x58(%rbp)
movl %eax, -0x5c(%rbp)
leaq -0x5d(%rbp), %rdi
callq 0x73d0
jmp 0x387fa
jmp 0x38792
jmp 0x38794
leaq -0x38(%rbp), %rdi
callq 0xba90
jmp 0x38698
leaq -0x5e(%rbp), %rdi
movq %rdi, -0x88(%rbp)
callq 0x7650
movq -0x70(%rbp), %rdi
movq -0x88(%rbp), %rdx
leaq 0x8c16(%rip), %rsi # 0x413da
callq 0xb110
jmp 0x387cb
leaq -0x5e(%rbp), %rdi
callq 0x73d0
jmp 0x387ed
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x58(%rbp)
movl %eax, -0x5c(%rbp)
leaq -0x5e(%rbp), %rdi
callq 0x73d0
jmp 0x387fa
movq -0x68(%rbp), %rax
addq $0x90, %rsp
popq %rbp
retq
movq -0x58(%rbp), %rdi
callq 0x7640
nopw %cs:(%rax,%rax)
|
_ZN6Master10handleShotB5cxx11Emm:
push rbp
mov rbp, rsp
sub rsp, 90h
mov [rbp+var_70], rdi
mov rax, rdi
mov [rbp+var_68], rax
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov [rbp+var_18], rdx
mov [rbp+var_20], rcx
mov rax, [rbp+var_10]
mov rdi, [rax]; this
call _ZN8Settings20getSlaveShipsMutableEv; Settings::getSlaveShipsMutable(void)
mov [rbp+var_28], rax
mov rax, [rbp+var_28]
mov [rbp+var_30], rax
mov rdi, [rbp+var_30]
call _ZNSt6vectorI4ShipSaIS0_EE5beginEv; std::vector<Ship>::begin(void)
mov [rbp+var_38], rax
mov rdi, [rbp+var_30]
call _ZNSt6vectorI4ShipSaIS0_EE3endEv; std::vector<Ship>::end(void)
mov [rbp+var_40], rax
loc_38698:
lea rdi, [rbp+var_38]
lea rsi, [rbp+var_40]
call _ZN9__gnu_cxxeqIP4ShipSt6vectorIS1_SaIS1_EEEEbRKNS_17__normal_iteratorIT_T0_EESB_QrqXeqcldtfp_4baseEcldtfp0_4baseERSt14convertible_toIbEE
xor al, 0FFh
test al, 1
jnz short loc_386B0
jmp loc_387A2
loc_386B0:
lea rdi, [rbp+var_38]
call _ZNK9__gnu_cxx17__normal_iteratorIP4ShipSt6vectorIS1_SaIS1_EEEdeEv; __gnu_cxx::__normal_iterator<Ship *,std::vector<Ship>>::operator*(void)
mov [rbp+var_48], rax
mov rdi, [rbp+var_48]; this
mov rsi, [rbp+var_18]; unsigned __int64
mov rdx, [rbp+var_20]; unsigned __int64
call _ZNK4Ship8containsEmm; Ship::contains(ulong,ulong)
test al, 1
jnz short loc_386D7
jmp loc_38792
loc_386D7:
mov rdi, [rbp+var_48]; this
mov rsi, [rbp+var_18]; unsigned __int64
mov rdx, [rbp+var_20]; unsigned __int64
call _ZN4Ship5hitAtEmm; Ship::hitAt(ulong,ulong)
test al, 1
jnz short loc_386F1
jmp loc_38790
loc_386F1:
mov rdi, [rbp+var_48]; this
call _ZNK4Ship6isSunkEv; Ship::isSunk(void)
test al, 1
jnz short loc_38700
jmp short loc_3874B
loc_38700:
lea rdi, [rbp+var_49]
mov [rbp+var_78], rdi
call __ZNSaIcEC1Ev; std::allocator<char>::allocator(void)
mov rdi, [rbp+var_70]
mov rdx, [rbp+var_78]
lea rsi, aHitAndSunk; "hit_and_sunk"
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&)
jmp short $+2
loc_38723:
lea rdi, [rbp+var_49]
call __ZNSaIcED1Ev; std::allocator<char>::~allocator()
jmp loc_387ED
mov rcx, rax
mov eax, edx
mov [rbp+var_58], rcx
mov [rbp+var_5C], eax
lea rdi, [rbp+var_49]
call __ZNSaIcED1Ev; std::allocator<char>::~allocator()
jmp loc_387FA
loc_3874B:
lea rdi, [rbp+var_5D]
mov [rbp+var_80], rdi
call __ZNSaIcEC1Ev; std::allocator<char>::allocator(void)
mov rdi, [rbp+var_70]
mov rdx, [rbp+var_80]
lea rsi, aHit; "hit"
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&)
jmp short $+2
loc_3876E:
lea rdi, [rbp+var_5D]
call __ZNSaIcED1Ev; std::allocator<char>::~allocator()
jmp short loc_387ED
mov rcx, rax
mov eax, edx
mov [rbp+var_58], rcx
mov [rbp+var_5C], eax
lea rdi, [rbp+var_5D]
call __ZNSaIcED1Ev; std::allocator<char>::~allocator()
jmp short loc_387FA
loc_38790:
jmp short $+2
loc_38792:
jmp short $+2
loc_38794:
lea rdi, [rbp+var_38]
call _ZN9__gnu_cxx17__normal_iteratorIP4ShipSt6vectorIS1_SaIS1_EEEppEv; __gnu_cxx::__normal_iterator<Ship *,std::vector<Ship>>::operator++(void)
jmp loc_38698
loc_387A2:
lea rdi, [rbp+var_5E]
mov [rbp+var_88], rdi
call __ZNSaIcEC1Ev; std::allocator<char>::allocator(void)
mov rdi, [rbp+var_70]
mov rdx, [rbp+var_88]
lea rsi, aMiss; "miss"
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&)
jmp short $+2
loc_387CB:
lea rdi, [rbp+var_5E]
call __ZNSaIcED1Ev; std::allocator<char>::~allocator()
jmp short loc_387ED
mov rcx, rax
mov eax, edx
mov [rbp+var_58], rcx
mov [rbp+var_5C], eax
lea rdi, [rbp+var_5E]
call __ZNSaIcED1Ev; std::allocator<char>::~allocator()
jmp short loc_387FA
loc_387ED:
mov rax, [rbp+var_68]
add rsp, 90h
pop rbp
retn
loc_387FA:
mov rdi, [rbp+var_58]
call __Unwind_Resume
|
_QWORD * Master::handleShot[abi:cxx11](_QWORD *a1, Settings **a2, unsigned long long a3, unsigned long long a4)
{
char v5; // [rsp+32h] [rbp-5Eh] BYREF
char v6; // [rsp+33h] [rbp-5Dh] BYREF
char v7; // [rsp+47h] [rbp-49h] BYREF
Ship *v8; // [rsp+48h] [rbp-48h]
long long v9; // [rsp+50h] [rbp-40h] BYREF
_QWORD v10[2]; // [rsp+58h] [rbp-38h] BYREF
long long SlaveShipsMutable; // [rsp+68h] [rbp-28h]
unsigned long long v12; // [rsp+70h] [rbp-20h]
unsigned long long v13; // [rsp+78h] [rbp-18h]
Settings **v14; // [rsp+80h] [rbp-10h]
_QWORD *v15; // [rsp+88h] [rbp-8h]
v15 = a1;
v14 = a2;
v13 = a3;
v12 = a4;
SlaveShipsMutable = Settings::getSlaveShipsMutable(*a2);
v10[1] = SlaveShipsMutable;
v10[0] = std::vector<Ship>::begin(SlaveShipsMutable);
v9 = std::vector<Ship>::end(SlaveShipsMutable);
while ( 1 )
{
if ( __gnu_cxx::operator==<Ship *,std::vector<Ship>>((long long)v10, (long long)&v9) )
{
std::allocator<char>::allocator();
std::string::basic_string<std::allocator<char>>(a1, (long long)"miss", (long long)&v5);
std::allocator<char>::~allocator(&v5);
return a1;
}
v8 = (Ship *)__gnu_cxx::__normal_iterator<Ship *,std::vector<Ship>>::operator*((long long)v10);
if ( Ship::contains(v8, v13, v12) && (Ship::hitAt(v8, v13, v12) & 1) != 0 )
break;
__gnu_cxx::__normal_iterator<Ship *,std::vector<Ship>>::operator++(v10);
}
if ( (Ship::isSunk((unsigned long long **)v8) & 1) != 0 )
{
std::allocator<char>::allocator();
std::string::basic_string<std::allocator<char>>(a1, (long long)"hit_and_sunk", (long long)&v7);
std::allocator<char>::~allocator(&v7);
}
else
{
std::allocator<char>::allocator();
std::string::basic_string<std::allocator<char>>(a1, (long long)"hit", (long long)&v6);
std::allocator<char>::~allocator(&v6);
}
return a1;
}
|
handleShot[abi:cxx11]:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x90
MOV qword ptr [RBP + -0x70],RDI
MOV RAX,RDI
MOV qword ptr [RBP + -0x68],RAX
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV qword ptr [RBP + -0x18],RDX
MOV qword ptr [RBP + -0x20],RCX
MOV RAX,qword ptr [RBP + -0x10]
MOV RDI,qword ptr [RAX]
CALL 0x0010ac90
MOV qword ptr [RBP + -0x28],RAX
MOV RAX,qword ptr [RBP + -0x28]
MOV qword ptr [RBP + -0x30],RAX
MOV RDI,qword ptr [RBP + -0x30]
CALL 0x0010b910
MOV qword ptr [RBP + -0x38],RAX
MOV RDI,qword ptr [RBP + -0x30]
CALL 0x0010b940
MOV qword ptr [RBP + -0x40],RAX
LAB_00138698:
LEA RDI,[RBP + -0x38]
LEA RSI,[RBP + -0x40]
CALL 0x0010b970
XOR AL,0xff
TEST AL,0x1
JNZ 0x001386b0
JMP 0x001387a2
LAB_001386b0:
LEA RDI,[RBP + -0x38]
CALL 0x0010b9b0
MOV qword ptr [RBP + -0x48],RAX
MOV RDI,qword ptr [RBP + -0x48]
MOV RSI,qword ptr [RBP + -0x18]
MOV RDX,qword ptr [RBP + -0x20]
CALL 0x00138340
TEST AL,0x1
JNZ 0x001386d7
JMP 0x00138792
LAB_001386d7:
MOV RDI,qword ptr [RBP + -0x48]
MOV RSI,qword ptr [RBP + -0x18]
MOV RDX,qword ptr [RBP + -0x20]
CALL 0x00138150
TEST AL,0x1
JNZ 0x001386f1
JMP 0x00138790
LAB_001386f1:
MOV RDI,qword ptr [RBP + -0x48]
CALL 0x001380b0
TEST AL,0x1
JNZ 0x00138700
JMP 0x0013874b
LAB_00138700:
LEA RDI,[RBP + -0x49]
MOV qword ptr [RBP + -0x78],RDI
CALL 0x00107650
MOV RDI,qword ptr [RBP + -0x70]
MOV RDX,qword ptr [RBP + -0x78]
LAB_00138715:
LEA RSI,[0x1413c9]
CALL 0x0010b110
JMP 0x00138723
LAB_00138723:
LEA RDI,[RBP + -0x49]
CALL 0x001073d0
JMP 0x001387ed
LAB_0013874b:
LEA RDI,[RBP + -0x5d]
MOV qword ptr [RBP + -0x80],RDI
CALL 0x00107650
MOV RDI,qword ptr [RBP + -0x70]
MOV RDX,qword ptr [RBP + -0x80]
LAB_00138760:
LEA RSI,[0x1413d6]
CALL 0x0010b110
JMP 0x0013876e
LAB_0013876e:
LEA RDI,[RBP + -0x5d]
CALL 0x001073d0
JMP 0x001387ed
LAB_00138790:
JMP 0x00138792
LAB_00138792:
JMP 0x00138794
LAB_00138794:
LEA RDI,[RBP + -0x38]
CALL 0x0010ba90
JMP 0x00138698
LAB_001387a2:
LEA RDI,[RBP + -0x5e]
MOV qword ptr [RBP + -0x88],RDI
CALL 0x00107650
MOV RDI,qword ptr [RBP + -0x70]
MOV RDX,qword ptr [RBP + -0x88]
LAB_001387bd:
LEA RSI,[0x1413da]
CALL 0x0010b110
LAB_001387c9:
JMP 0x001387cb
LAB_001387cb:
LEA RDI,[RBP + -0x5e]
CALL 0x001073d0
JMP 0x001387ed
LAB_001387ed:
MOV RAX,qword ptr [RBP + -0x68]
ADD RSP,0x90
POP RBP
RET
|
/* Master::handleShot[abi:cxx11](unsigned long, unsigned long) */
ulong Master::handleShot_abi_cxx11_(ulong param_1,ulong param_2)
{
byte bVar1;
ulong uVar2;
ulong in_RCX;
ulong in_RDX;
allocator local_66;
allocator local_65 [20];
allocator local_51;
Ship *local_50;
int8 local_48;
int8 local_40;
vector<Ship,std::allocator<Ship>> *local_38;
vector<Ship,std::allocator<Ship>> *local_30;
ulong local_28;
ulong local_20;
ulong local_18;
ulong local_10;
local_28 = in_RCX;
local_20 = in_RDX;
local_18 = param_2;
local_10 = param_1;
local_38 = (vector<Ship,std::allocator<Ship>> *)
Settings::getSlaveShipsMutable(*(Settings **)param_2);
local_30 = local_38;
local_40 = std::vector<Ship,std::allocator<Ship>>::begin(local_38);
local_48 = std::vector<Ship,std::allocator<Ship>>::end(local_38);
while( true ) {
bVar1 = _ZN9__gnu_cxxeqIP4ShipSt6vectorIS1_SaIS1_EEEEbRKNS_17__normal_iteratorIT_T0_EESB_QrqXeqcldtfp_4baseEcldtfp0_4baseERSt14convertible_toIbEE
(&local_40,&local_48);
if (((bVar1 ^ 0xff) & 1) == 0) {
std::allocator<char>::allocator();
/* try { // try from 001387bd to 001387c8 has its CatchHandler @ 001387d6 */
std::__cxx11::string::string<std::allocator<char>>((string *)param_1,"miss",&local_66);
std::allocator<char>::~allocator((allocator<char> *)&local_66);
return param_1;
}
local_50 = (Ship *)__gnu_cxx::__normal_iterator<Ship*,std::vector<Ship,std::allocator<Ship>>>::
operator*((__normal_iterator<Ship*,std::vector<Ship,std::allocator<Ship>>> *)
&local_40);
uVar2 = Ship::contains(local_50,local_20,local_28);
if (((uVar2 & 1) != 0) && (uVar2 = Ship::hitAt(local_50,local_20,local_28), (uVar2 & 1) != 0))
break;
__gnu_cxx::__normal_iterator<Ship*,std::vector<Ship,std::allocator<Ship>>>::operator++
((__normal_iterator<Ship*,std::vector<Ship,std::allocator<Ship>>> *)&local_40);
}
uVar2 = Ship::isSunk(local_50);
if ((uVar2 & 1) == 0) {
std::allocator<char>::allocator();
/* try { // try from 00138760 to 0013876b has its CatchHandler @ 00138779 */
std::__cxx11::string::string<std::allocator<char>>((string *)param_1,"hit",local_65);
std::allocator<char>::~allocator((allocator<char> *)local_65);
return param_1;
}
std::allocator<char>::allocator();
/* try { // try from 00138715 to 00138720 has its CatchHandler @ 00138731 */
std::__cxx11::string::string<std::allocator<char>>((string *)param_1,"hit_and_sunk",&local_51);
std::allocator<char>::~allocator((allocator<char> *)&local_51);
return param_1;
}
|
|
57,278
|
Master::handleShot[abi:cxx11](unsigned long, unsigned long)
|
666mxvbee[P]BattleShip/lib/Master/Master.cpp
|
std::string Master::handleShot(uint64_t x, uint64_t y) {
auto& ships = settings.getSlaveShipsMutable();
for (auto& ship : ships) {
if (ship.contains(x, y)) {
if (ship.hitAt(x ,y)) {
if (ship.isSunk()) {
return "hit_and_sunk";
}
return "hit";
}
}
}
return "miss";
}
|
O3
|
cpp
|
Master::handleShot[abi:cxx11](unsigned long, unsigned long):
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rcx, %r14
movq %rdx, %r15
movq %rdi, %rbx
movq (%rsi), %rdi
callq 0x70ea
movq (%rax), %r12
movq 0x8(%rax), %r13
cmpq %r13, %r12
je 0x15760
movq %r12, %rdi
movq %r15, %rsi
movq %r14, %rdx
callq 0x15662
testb %al, %al
je 0x1575a
movq %r12, %rdi
movq %r15, %rsi
movq %r14, %rdx
callq 0x15522
testb %al, %al
jne 0x1578a
addq $0x40, %r12
jmp 0x15731
leaq 0x10(%rbx), %rax
movq %rax, (%rbx)
leaq 0x5b9a(%rip), %rsi # 0x1b308
leaq 0x5b97(%rip), %rdx # 0x1b30c
movq %rbx, %rdi
callq 0x5fea
movq %rbx, %rax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
movq %r12, %rdi
callq 0x154c2
leaq 0x10(%rbx), %rcx
movq %rcx, (%rbx)
testb %al, %al
je 0x157ad
leaq 0x5b53(%rip), %rsi # 0x1b2f7
leaq 0x5b58(%rip), %rdx # 0x1b303
jmp 0x15775
leaq 0x5b50(%rip), %rsi # 0x1b304
leaq 0x5b4c(%rip), %rdx # 0x1b307
jmp 0x15775
nop
|
_ZN6Master10handleShotB5cxx11Emm:
push r15
push r14
push r13
push r12
push rbx
mov r14, rcx
mov r15, rdx
mov rbx, rdi
mov rdi, [rsi]; this
call _ZN8Settings20getSlaveShipsMutableEv; Settings::getSlaveShipsMutable(void)
mov r12, [rax]
mov r13, [rax+8]
loc_15731:
cmp r12, r13
jz short loc_15760
mov rdi, r12; this
mov rsi, r15; unsigned __int64
mov rdx, r14; unsigned __int64
call _ZNK4Ship8containsEmm; Ship::contains(ulong,ulong)
test al, al
jz short loc_1575A
mov rdi, r12; this
mov rsi, r15; unsigned __int64
mov rdx, r14; unsigned __int64
call _ZN4Ship5hitAtEmm; Ship::hitAt(ulong,ulong)
test al, al
jnz short loc_1578A
loc_1575A:
add r12, 40h ; '@'
jmp short loc_15731
loc_15760:
lea rax, [rbx+10h]
mov [rbx], rax
lea rsi, aMiss; "miss"
lea rdx, aMiss+4; ""
loc_15775:
mov rdi, rbx
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag; std::string::_M_construct<char const*>(char const*,char const*,std::forward_iterator_tag)
mov rax, rbx
pop rbx
pop r12
pop r13
pop r14
pop r15
retn
loc_1578A:
mov rdi, r12; this
call _ZNK4Ship6isSunkEv; Ship::isSunk(void)
lea rcx, [rbx+10h]
mov [rbx], rcx
test al, al
jz short loc_157AD
lea rsi, aHitAndSunk; "hit_and_sunk"
lea rdx, aHitAndSunk+0Ch; ""
jmp short loc_15775
loc_157AD:
lea rsi, aHit; "hit"
lea rdx, aHit+3; ""
jmp short loc_15775
|
_QWORD * Master::handleShot[abi:cxx11](_QWORD *a1, Settings **a2, unsigned long long a3, unsigned long long a4)
{
long long SlaveShipsMutable; // rax
Ship *v7; // r12
Ship *v8; // r13
char *v9; // rsi
char *v10; // rdx
bool isSunk; // al
SlaveShipsMutable = Settings::getSlaveShipsMutable(*a2);
v7 = *(Ship **)SlaveShipsMutable;
v8 = *(Ship **)(SlaveShipsMutable + 8);
while ( 1 )
{
if ( v7 == v8 )
{
*a1 = a1 + 2;
v9 = "miss";
v10 = "";
goto LABEL_7;
}
if ( Ship::contains(v7, a3, a4) && Ship::hitAt(v7, a3, a4) )
break;
v7 = (Ship *)((char *)v7 + 64);
}
isSunk = Ship::isSunk(v7);
*a1 = a1 + 2;
if ( isSunk )
{
v9 = "hit_and_sunk";
v10 = "";
}
else
{
v9 = "hit";
v10 = "";
}
LABEL_7:
std::string::_M_construct<char const*>((long long)a1, v9, (long long)v10);
return a1;
}
|
handleShot[abi:cxx11]:
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
MOV R14,RCX
MOV R15,RDX
MOV RBX,RDI
MOV RDI,qword ptr [RSI]
CALL 0x001070ea
MOV R12,qword ptr [RAX]
MOV R13,qword ptr [RAX + 0x8]
LAB_00115731:
CMP R12,R13
JZ 0x00115760
MOV RDI,R12
MOV RSI,R15
MOV RDX,R14
CALL 0x00115662
TEST AL,AL
JZ 0x0011575a
MOV RDI,R12
MOV RSI,R15
MOV RDX,R14
CALL 0x00115522
TEST AL,AL
JNZ 0x0011578a
LAB_0011575a:
ADD R12,0x40
JMP 0x00115731
LAB_00115760:
LEA RAX,[RBX + 0x10]
MOV qword ptr [RBX],RAX
LEA RSI,[0x11b308]
LEA RDX,[0x11b30c]
LAB_00115775:
MOV RDI,RBX
CALL 0x00105fea
MOV RAX,RBX
POP RBX
POP R12
POP R13
POP R14
POP R15
RET
LAB_0011578a:
MOV RDI,R12
CALL 0x001154c2
LEA RCX,[RBX + 0x10]
MOV qword ptr [RBX],RCX
TEST AL,AL
JZ 0x001157ad
LEA RSI,[0x11b2f7]
LEA RDX,[0x11b303]
JMP 0x00115775
LAB_001157ad:
LEA RSI,[0x11b304]
LEA RDX,[0x11b307]
JMP 0x00115775
|
/* Master::handleShot[abi:cxx11](unsigned long, unsigned long) */
ulong Master::handleShot_abi_cxx11_(ulong param_1,ulong param_2)
{
Ship *pSVar1;
char cVar2;
int8 *puVar3;
ulong in_RCX;
ulong in_RDX;
char *pcVar4;
char *pcVar5;
Ship *this;
puVar3 = (int8 *)Settings::getSlaveShipsMutable(*(Settings **)param_2);
this = (Ship *)*puVar3;
pSVar1 = (Ship *)puVar3[1];
do {
if (this == pSVar1) {
*(ulong *)param_1 = param_1 + 0x10;
pcVar5 = "miss";
pcVar4 = "";
LAB_00115775:
std::__cxx11::string::_M_construct<char_const*>(param_1,pcVar5,pcVar4);
return param_1;
}
cVar2 = Ship::contains(this,in_RDX,in_RCX);
if (cVar2 != '\0') {
cVar2 = Ship::hitAt(this,in_RDX,in_RCX);
if (cVar2 != '\0') {
cVar2 = Ship::isSunk(this);
*(ulong *)param_1 = param_1 + 0x10;
if (cVar2 == '\0') {
pcVar5 = "hit";
pcVar4 = "";
}
else {
pcVar5 = "hit_and_sunk";
pcVar4 = "";
}
goto LAB_00115775;
}
}
this = this + 0x40;
} while( true );
}
|
|
57,279
|
insert_events_stages_history_long(PFS_events_stages*)
|
eloqsql/storage/perfschema/pfs_events_stages.cc
|
void insert_events_stages_history_long(PFS_events_stages *stage)
{
if (unlikely(events_stages_history_long_size == 0))
return;
assert(events_stages_history_long_array != NULL);
uint index= PFS_atomic::add_u32(&events_stages_history_long_index.m_u32, 1);
index= index % events_stages_history_long_size;
if (index == 0)
events_stages_history_long_full= true;
/* See related comment in insert_events_stages_history. */
copy_events_stages(&events_stages_history_long_array[index], stage);
}
|
O0
|
cpp
|
insert_events_stages_history_long(PFS_events_stages*):
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
cmpq $0x0, 0x3d9e7c(%rip) # 0x40df80
sete %al
andb $0x1, %al
movzbl %al, %eax
cmpl $0x0, %eax
je 0x34113
jmp 0x34161
leaq 0x3d9fa6(%rip), %rdi # 0x40e0c0
movl $0x1, %esi
callq 0x33c80
movl %eax, -0xc(%rbp)
movl -0xc(%rbp), %eax
xorl %ecx, %ecx
movl %ecx, %edx
divq 0x3d9e4b(%rip) # 0x40df80
movl %edx, %eax
movl %eax, -0xc(%rbp)
cmpl $0x0, -0xc(%rbp)
jne 0x34147
movb $0x1, 0x3d9f39(%rip) # 0x40e080
movq 0x3d9fb2(%rip), %rdi # 0x40e100
movl -0xc(%rbp), %eax
imulq $0x68, %rax, %rax
addq %rax, %rdi
movq -0x8(%rbp), %rsi
callq 0x340c0
addq $0x10, %rsp
popq %rbp
retq
nopw (%rax,%rax)
|
_Z33insert_events_stages_history_longP17PFS_events_stages:
push rbp
mov rbp, rsp
sub rsp, 10h
mov [rbp+var_8], rdi
cmp cs:events_stages_history_long_size, 0
setz al
and al, 1
movzx eax, al
cmp eax, 0
jz short loc_34113
jmp short loc_34161
loc_34113:
lea rdi, events_stages_history_long_index; this
mov esi, (offset dword_0+1); unsigned int *
call _ZN10PFS_atomic7add_u32EPjj; PFS_atomic::add_u32(uint *,uint)
mov [rbp+var_C], eax
mov eax, [rbp+var_C]
xor ecx, ecx
mov edx, ecx
div cs:events_stages_history_long_size
mov eax, edx
mov [rbp+var_C], eax
cmp [rbp+var_C], 0
jnz short loc_34147
mov cs:events_stages_history_long_full, 1
loc_34147:
mov rdi, cs:events_stages_history_long_array
mov eax, [rbp+var_C]
imul rax, 68h ; 'h'
add rdi, rax
mov rsi, [rbp+var_8]
call _ZL18copy_events_stagesP17PFS_events_stagesPKS_; copy_events_stages(PFS_events_stages *,PFS_events_stages const*)
loc_34161:
add rsp, 10h
pop rbp
retn
|
long long insert_events_stages_history_long(long long a1)
{
long long result; // rax
unsigned int v2; // [rsp+4h] [rbp-Ch]
result = events_stages_history_long_size == 0;
if ( events_stages_history_long_size )
{
v2 = (unsigned int)PFS_atomic::add_u32(
(PFS_atomic *)&events_stages_history_long_index,
(unsigned int *)((char *)&dword_0 + 1))
% (unsigned long long)events_stages_history_long_size;
if ( !v2 )
events_stages_history_long_full = 1;
return copy_events_stages(104LL * v2 + events_stages_history_long_array, a1);
}
return result;
}
|
insert_events_stages_history_long:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x10
MOV qword ptr [RBP + -0x8],RDI
CMP qword ptr [0x0050df80],0x0
SETZ AL
AND AL,0x1
MOVZX EAX,AL
CMP EAX,0x0
JZ 0x00134113
JMP 0x00134161
LAB_00134113:
LEA RDI,[0x50e0c0]
MOV ESI,0x1
CALL 0x00133c80
MOV dword ptr [RBP + -0xc],EAX
MOV EAX,dword ptr [RBP + -0xc]
XOR ECX,ECX
MOV EDX,ECX
DIV qword ptr [0x0050df80]
MOV EAX,EDX
MOV dword ptr [RBP + -0xc],EAX
CMP dword ptr [RBP + -0xc],0x0
JNZ 0x00134147
MOV byte ptr [0x0050e080],0x1
LAB_00134147:
MOV RDI,qword ptr [0x0050e100]
MOV EAX,dword ptr [RBP + -0xc]
IMUL RAX,RAX,0x68
ADD RDI,RAX
MOV RSI,qword ptr [RBP + -0x8]
CALL 0x001340c0
LAB_00134161:
ADD RSP,0x10
POP RBP
RET
|
/* insert_events_stages_history_long(PFS_events_stages*) */
void insert_events_stages_history_long(PFS_events_stages *param_1)
{
uint uVar1;
if (events_stages_history_long_size != 0) {
uVar1 = PFS_atomic::add_u32((uint *)events_stages_history_long_index,1);
if ((int)((ulong)uVar1 % events_stages_history_long_size) == 0) {
events_stages_history_long_full = 1;
}
copy_events_stages((PFS_events_stages *)
(events_stages_history_long_array +
((ulong)uVar1 % events_stages_history_long_size & 0xffffffff) * 0x68),param_1
);
}
return;
}
|
|
57,280
|
insert_events_stages_history_long(PFS_events_stages*)
|
eloqsql/storage/perfschema/pfs_events_stages.cc
|
void insert_events_stages_history_long(PFS_events_stages *stage)
{
if (unlikely(events_stages_history_long_size == 0))
return;
assert(events_stages_history_long_array != NULL);
uint index= PFS_atomic::add_u32(&events_stages_history_long_index.m_u32, 1);
index= index % events_stages_history_long_size;
if (index == 0)
events_stages_history_long_full= true;
/* See related comment in insert_events_stages_history. */
copy_events_stages(&events_stages_history_long_array[index], stage);
}
|
O3
|
cpp
|
insert_events_stages_history_long(PFS_events_stages*):
pushq %rbp
movq %rsp, %rbp
cmpq $0x0, 0x3aaf16(%rip) # 0x3d1f80
je 0x270ac
movq %rdi, %rsi
movl $0x1, %eax
lock
xaddl %eax, 0x3ab044(%rip) # 0x3d20c0
xorl %edx, %edx
divq 0x3aaefb(%rip) # 0x3d1f80
testq %rdx, %rdx
jne 0x27091
movb $0x1, 0x3aafef(%rip) # 0x3d2080
imulq $0x68, %rdx, %rdi
addq 0x3ab064(%rip), %rdi # 0x3d2100
movabsq $0x68, %rdx
popq %rbp
jmp 0x26290
popq %rbp
retq
|
_Z33insert_events_stages_history_longP17PFS_events_stages:
push rbp
mov rbp, rsp
cmp cs:events_stages_history_long_size, 0
jz short loc_270AC
mov rsi, rdi
mov eax, 1
lock xadd cs:events_stages_history_long_index, eax
xor edx, edx
div cs:events_stages_history_long_size
test rdx, rdx
jnz short loc_27091
mov cs:events_stages_history_long_full, 1
loc_27091:
imul rdi, rdx, 68h ; 'h'
add rdi, cs:events_stages_history_long_array
mov rdx, 68h ; 'h'
pop rbp
jmp _memcpy
loc_270AC:
pop rbp
retn
|
long long insert_events_stages_history_long(long long a1)
{
unsigned long long v1; // rdx
long long result; // rax
if ( events_stages_history_long_size )
{
v1 = (unsigned int)_InterlockedExchangeAdd(&events_stages_history_long_index, 1u)
% (unsigned long long)events_stages_history_long_size;
if ( !v1 )
events_stages_history_long_full = 1;
return memcpy(events_stages_history_long_array + 104 * v1, a1, 104LL);
}
return result;
}
|
insert_events_stages_history_long:
PUSH RBP
MOV RBP,RSP
CMP qword ptr [0x004d1f80],0x0
JZ 0x001270ac
MOV RSI,RDI
MOV EAX,0x1
XADD.LOCK dword ptr [0x004d20c0],EAX
XOR EDX,EDX
DIV qword ptr [0x004d1f80]
TEST RDX,RDX
JNZ 0x00127091
MOV byte ptr [0x004d2080],0x1
LAB_00127091:
IMUL RDI,RDX,0x68
ADD RDI,qword ptr [0x004d2100]
MOV RDX,0x68
POP RBP
JMP 0x00126290
LAB_001270ac:
POP RBP
RET
|
/* insert_events_stages_history_long(PFS_events_stages*) */
void insert_events_stages_history_long(PFS_events_stages *param_1)
{
ulong uVar1;
if (events_stages_history_long_size != 0) {
LOCK();
UNLOCK();
uVar1 = (ulong)events_stages_history_long_index;
if (uVar1 % events_stages_history_long_size == 0) {
events_stages_history_long_full = 1;
}
events_stages_history_long_index = events_stages_history_long_index + 1;
memcpy((void *)((uVar1 % events_stages_history_long_size) * 0x68 +
events_stages_history_long_array),param_1,0x68);
return;
}
return;
}
|
|
57,281
|
write_full_pages
|
eloqsql/storage/maria/ma_blockrec.c
|
static my_bool write_full_pages(MARIA_HA *info,
LSN lsn,
MARIA_BITMAP_BLOCK *block,
uchar *data, ulong length)
{
pgcache_page_no_t page;
MARIA_SHARE *share= info->s;
uint block_size= share->block_size;
uint data_size= FULL_PAGE_SIZE(share);
uchar *buff= info->keyread_buff;
uint page_count, sub_blocks;
my_off_t position, max_position;
DBUG_ENTER("write_full_pages");
DBUG_PRINT("enter", ("length: %lu page: %lu page_count: %lu",
(ulong) length, (ulong) block->page,
(ulong) block->page_count));
DBUG_ASSERT((block->page_count & TAIL_BIT) == 0);
info->keyread_buff_used= 1;
page= block->page;
page_count= block->page_count;
sub_blocks= block->sub_blocks;
max_position= (my_off_t) (page + page_count) * block_size;
/* Increase data file size, if extended */
for (; length; data+= data_size)
{
uint copy_length;
if (!page_count--)
{
if (!--sub_blocks)
{
_ma_set_fatal_error(info, HA_ERR_WRONG_IN_RECORD);
DBUG_RETURN(1);
}
block++;
page= block->page;
page_count= block->page_count - 1;
DBUG_PRINT("info", ("page: %lu page_count: %lu",
(ulong) block->page, (ulong) block->page_count));
position= (page + page_count + 1) * block_size;
set_if_bigger(max_position, position);
}
lsn_store(buff, lsn);
buff[PAGE_TYPE_OFFSET]= (uchar) BLOB_PAGE;
bzero(buff + LSN_SIZE + PAGE_TYPE_SIZE,
FULL_PAGE_HEADER_SIZE(share) - (LSN_SIZE + PAGE_TYPE_SIZE));
copy_length= MY_MIN(data_size, length);
memcpy(buff + FULL_PAGE_HEADER_SIZE(share), data, copy_length);
length-= copy_length;
/*
Zero out old information from the block. This removes possible
sensitive information from the block and also makes the file
easier to compress and easier to compare after recovery.
*/
if (copy_length != data_size)
bzero(buff + block_size - PAGE_SUFFIX_SIZE - (data_size - copy_length),
(data_size - copy_length) + PAGE_SUFFIX_SIZE);
if (pagecache_write(share->pagecache,
&info->dfile, page, 0,
buff, share->page_type,
PAGECACHE_LOCK_LEFT_UNLOCKED,
PAGECACHE_PIN_LEFT_UNPINNED,
PAGECACHE_WRITE_DELAY,
0, info->trn->rec_lsn))
DBUG_RETURN(1);
page++;
DBUG_ASSERT(block->used & BLOCKUSED_USED);
}
if (share->state.state.data_file_length < max_position)
_ma_set_share_data_file_length(share, max_position);
DBUG_RETURN(0);
}
|
O3
|
c
|
write_full_pages:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x88, %rsp
movq %r8, %r14
movq %rcx, %r15
movq (%rdi), %rax
movl 0x7bc(%rax), %r8d
movq %rax, -0x40(%rbp)
movl 0xc18(%rax), %eax
movl %r8d, %ecx
subl %eax, %ecx
movq 0x380(%rdi), %r12
movb $0x1, 0x685(%rdi)
movq (%rdx), %r13
movl 0x8(%rdx), %r9d
leaq (%r9,%r13), %rax
imulq %r8, %rax
movq %rax, -0x38(%rbp)
testq %r14, %r14
je 0x52172
addl $-0xc, %ecx
movl %ecx, -0x44(%rbp)
movl 0x10(%rdx), %eax
movl %eax, -0x2c(%rbp)
movq %rsi, %rax
shrq $0x20, %rax
movq %rax, -0xa8(%rbp)
movq %rsi, %rax
shrq $0x28, %rax
movq %rax, -0xa0(%rbp)
movq %rsi, %rax
shrq $0x30, %rax
movq %rax, -0x98(%rbp)
leaq 0x8(%r12), %rax
movq %rax, -0x90(%rbp)
movl %ecx, %ebx
leaq -0x4(%r12,%r8), %rax
movq %rax, -0x68(%rbp)
leaq 0x470(%rdi), %rax
movq %rax, -0x88(%rbp)
movq %rdi, -0x60(%rbp)
movq %r8, -0x78(%rbp)
movq %rsi, -0x80(%rbp)
movq %rbx, -0x70(%rbp)
subl $0x1, %r9d
movq %r15, -0xb0(%rbp)
jae 0x52063
movl -0x2c(%rbp), %eax
decl %eax
je 0x52189
movl %eax, -0x2c(%rbp)
movq 0x18(%rdx), %r13
movl 0x20(%rdx), %ecx
leaq 0x18(%rdx), %rax
decl %ecx
movq %rcx, -0x50(%rbp)
addq %r13, %rcx
incq %rcx
imulq %r8, %rcx
movq -0x38(%rbp), %rdx
cmpq %rcx, %rdx
cmovbeq %rcx, %rdx
movq %rdx, -0x38(%rbp)
movq %rax, -0x58(%rbp)
jmp 0x5206b
movq %r9, -0x50(%rbp)
movq %rdx, -0x58(%rbp)
movq -0xa8(%rbp), %rax
movb %al, (%r12)
movq -0xa0(%rbp), %rax
movb %al, 0x1(%r12)
movq -0x98(%rbp), %rax
movb %al, 0x2(%r12)
movl %esi, 0x3(%r12)
movb $0x3, 0x7(%r12)
movq -0x40(%rbp), %r15
movl 0xc18(%r15), %edx
movq -0x90(%rbp), %rdi
xorl %esi, %esi
callq 0x292a0
cmpq %rbx, %r14
cmovbq %r14, %rbx
movl 0xc18(%r15), %edi
addl $0x8, %edi
addq %r12, %rdi
movq -0xb0(%rbp), %r15
movq %r15, %rsi
movq %rbx, %rdx
callq 0x29080
movl -0x44(%rbp), %eax
movl %eax, %edx
subl %ebx, %edx
je 0x520f2
movq -0x68(%rbp), %rdi
subq %rdx, %rdi
addl $0x4, %edx
xorl %esi, %esi
callq 0x292a0
movq -0x40(%rbp), %rax
movq 0x600(%rax), %rdi
movl 0x7d4(%rax), %r9d
movq -0x60(%rbp), %rax
movq 0x8(%rax), %rax
movl 0x80(%rdi), %r10d
subq $0x8, %rsp
movq -0x88(%rbp), %rsi
movq %r13, %rdx
xorl %ecx, %ecx
movq %r12, %r8
pushq %r10
xorl %r10d, %r10d
pushq %r10
pushq 0x90(%rax)
pushq $0x0
pushq %r10
pushq $0x1
pushq %r10
callq 0x3c506
addq $0x40, %rsp
testb %al, %al
jne 0x52193
subq %rbx, %r14
incq %r13
movq -0x70(%rbp), %rbx
addq %rbx, %r15
testq %r14, %r14
movq -0x60(%rbp), %rdi
movq -0x80(%rbp), %rsi
movq -0x78(%rbp), %r8
movq -0x58(%rbp), %rdx
movq -0x50(%rbp), %r9
jne 0x52018
movq -0x40(%rbp), %rdi
movq -0x38(%rbp), %rsi
cmpq %rsi, 0x40(%rdi)
jae 0x52185
callq 0x4369c
xorl %eax, %eax
jmp 0x52195
movl $0x7f, %esi
callq 0x3fc44
movb $0x1, %al
addq $0x88, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
|
write_full_pages:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 88h
mov r14, r8
mov r15, rcx
mov rax, [rdi]
mov r8d, [rax+7BCh]
mov [rbp+var_40], rax
mov eax, [rax+0C18h]
mov ecx, r8d
sub ecx, eax
mov r12, [rdi+380h]
mov byte ptr [rdi+685h], 1
mov r13, [rdx]
mov r9d, [rdx+8]
lea rax, [r9+r13]
imul rax, r8
mov [rbp+var_38], rax
test r14, r14
jz loc_52172
add ecx, 0FFFFFFF4h
mov [rbp+var_44], ecx
mov eax, [rdx+10h]
mov [rbp+var_2C], eax
mov rax, rsi
shr rax, 20h
mov [rbp+var_A8], rax
mov rax, rsi
shr rax, 28h
mov [rbp+var_A0], rax
mov rax, rsi
shr rax, 30h
mov [rbp+var_98], rax
lea rax, [r12+8]
mov [rbp+var_90], rax
mov ebx, ecx
lea rax, [r12+r8-4]
mov [rbp+var_68], rax
lea rax, [rdi+470h]
mov [rbp+var_88], rax
mov [rbp+var_60], rdi
mov [rbp+var_78], r8
mov [rbp+var_80], rsi
mov [rbp+var_70], rbx
loc_52018:
sub r9d, 1
mov [rbp+var_B0], r15
jnb short loc_52063
mov eax, [rbp+var_2C]
dec eax
jz loc_52189
mov [rbp+var_2C], eax
mov r13, [rdx+18h]
mov ecx, [rdx+20h]
lea rax, [rdx+18h]
dec ecx
mov [rbp+var_50], rcx
add rcx, r13
inc rcx
imul rcx, r8
mov rdx, [rbp+var_38]
cmp rdx, rcx
cmovbe rdx, rcx
mov [rbp+var_38], rdx
mov [rbp+var_58], rax
jmp short loc_5206B
loc_52063:
mov [rbp+var_50], r9
mov [rbp+var_58], rdx
loc_5206B:
mov rax, [rbp+var_A8]
mov [r12], al
mov rax, [rbp+var_A0]
mov [r12+1], al
mov rax, [rbp+var_98]
mov [r12+2], al
mov [r12+3], esi
mov byte ptr [r12+7], 3
mov r15, [rbp+var_40]
mov edx, [r15+0C18h]
mov rdi, [rbp+var_90]
xor esi, esi
call _memset
cmp r14, rbx
cmovb rbx, r14
mov edi, [r15+0C18h]
add edi, 8
add rdi, r12
mov r15, [rbp+var_B0]
mov rsi, r15
mov rdx, rbx
call _memcpy
mov eax, [rbp+var_44]
mov edx, eax
sub edx, ebx
jz short loc_520F2
mov rdi, [rbp+var_68]
sub rdi, rdx
add edx, 4
xor esi, esi
call _memset
loc_520F2:
mov rax, [rbp+var_40]
mov rdi, [rax+600h]
mov r9d, [rax+7D4h]
mov rax, [rbp+var_60]
mov rax, [rax+8]
mov r10d, [rdi+80h]
sub rsp, 8
mov rsi, [rbp+var_88]
mov rdx, r13
xor ecx, ecx
mov r8, r12
push r10
xor r10d, r10d
push r10
push qword ptr [rax+90h]
push 0
push r10
push 1
push r10
call pagecache_write_part
add rsp, 40h
test al, al
jnz short loc_52193
sub r14, rbx
inc r13
mov rbx, [rbp+var_70]
add r15, rbx
test r14, r14
mov rdi, [rbp+var_60]
mov rsi, [rbp+var_80]
mov r8, [rbp+var_78]
mov rdx, [rbp+var_58]
mov r9, [rbp+var_50]
jnz loc_52018
loc_52172:
mov rdi, [rbp+var_40]
mov rsi, [rbp+var_38]
cmp [rdi+40h], rsi
jnb short loc_52185
call _ma_set_share_data_file_length
loc_52185:
xor eax, eax
jmp short loc_52195
loc_52189:
mov esi, 7Fh
call _ma_set_fatal_error
loc_52193:
mov al, 1
loc_52195:
add rsp, 88h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
|
char write_full_pages(_DWORD *a1, unsigned long long a2, long long a3, long long a4, unsigned long long a5)
{
long long v7; // r8
int v8; // ecx
long long v9; // r12
long long v10; // r13
long long v11; // r9
long long v12; // rcx
unsigned long long v13; // rbx
bool v14; // cf
int v15; // r9d
long long v16; // rax
long long v17; // rdx
unsigned long long v19; // [rsp+8h] [rbp-A8h]
unsigned long long v20; // [rsp+10h] [rbp-A0h]
unsigned long long v21; // [rsp+18h] [rbp-98h]
char *v22; // [rsp+28h] [rbp-88h]
int v23; // [rsp+30h] [rbp-80h]
long long v24; // [rsp+38h] [rbp-78h]
unsigned long long v25; // [rsp+40h] [rbp-70h]
long long v26; // [rsp+48h] [rbp-68h]
_DWORD *v27; // [rsp+50h] [rbp-60h]
long long v28; // [rsp+58h] [rbp-58h]
long long v29; // [rsp+60h] [rbp-50h]
int v30; // [rsp+6Ch] [rbp-44h]
long long v31; // [rsp+70h] [rbp-40h]
unsigned long long v32; // [rsp+78h] [rbp-38h]
int v33; // [rsp+84h] [rbp-2Ch]
v7 = *(unsigned int *)(*(_QWORD *)a1 + 1980LL);
v31 = *(_QWORD *)a1;
v8 = v7 - *(_DWORD *)(*(_QWORD *)a1 + 3096LL);
v9 = *((_QWORD *)a1 + 112);
*((_BYTE *)a1 + 1669) = 1;
v10 = *(_QWORD *)a3;
v11 = *(unsigned int *)(a3 + 8);
v32 = v7 * (v11 + *(_QWORD *)a3);
if ( !a5 )
{
LABEL_15:
if ( *(_QWORD *)(v31 + 64) < v32 )
ma_set_share_data_file_length(v31, v32);
return 0;
}
v12 = (unsigned int)(v8 - 12);
v30 = v12;
v33 = *(_DWORD *)(a3 + 16);
v19 = HIDWORD(a2);
v20 = a2 >> 40;
v21 = HIWORD(a2);
v13 = (unsigned int)v12;
v26 = v9 + v7 - 4;
v22 = (char *)(a1 + 284);
v27 = a1;
v24 = v7;
v23 = a2;
v25 = (unsigned int)v12;
while ( 1 )
{
v14 = (_DWORD)v11 == 0;
v15 = v11 - 1;
if ( !v14 )
{
LODWORD(v29) = v15;
v28 = a3;
goto LABEL_9;
}
if ( v33 == 1 )
break;
--v33;
v10 = *(_QWORD *)(a3 + 24);
v16 = a3 + 24;
v29 = (unsigned int)(*(_DWORD *)(a3 + 32) - 1);
v17 = v32;
if ( v32 <= v7 * (v10 + v29 + 1) )
v17 = v7 * (v10 + v29 + 1);
v32 = v17;
v28 = v16;
LABEL_9:
*(_BYTE *)v9 = v19;
*(_BYTE *)(v9 + 1) = v20;
*(_BYTE *)(v9 + 2) = v21;
*(_DWORD *)(v9 + 3) = a2;
*(_BYTE *)(v9 + 7) = 3;
memset(v9 + 8, 0LL, *(unsigned int *)(v31 + 3096));
if ( a5 < v13 )
v13 = a5;
memcpy(v9 + (unsigned int)(*(_DWORD *)(v31 + 3096) + 8), a4, v13);
if ( v30 != (_DWORD)v13 )
memset(v26 - (unsigned int)(v30 - v13), 0LL, (unsigned int)(v30 - v13 + 4));
if ( (unsigned __int8)pagecache_write_part(
*(__m128i **)(v31 + 1536),
v22,
v10,
0,
(char *)v9,
*(_DWORD *)(v31 + 2004),
0,
1u,
0,
0LL,
*(_QWORD *)(*((_QWORD *)v27 + 1) + 144LL),
0,
*(_DWORD *)(*(_QWORD *)(v31 + 1536) + 128LL)) )
return 1;
a5 -= v13;
++v10;
v13 = v25;
a4 += v25;
a1 = v27;
LODWORD(a2) = v23;
v7 = v24;
a3 = v28;
LODWORD(v11) = v29;
if ( !a5 )
goto LABEL_15;
}
ma_set_fatal_error(a1, 127, a3, v12, v7, v15);
return 1;
}
|
write_full_pages:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x88
MOV R14,R8
MOV R15,RCX
MOV RAX,qword ptr [RDI]
MOV R8D,dword ptr [RAX + 0x7bc]
MOV qword ptr [RBP + -0x40],RAX
MOV EAX,dword ptr [RAX + 0xc18]
MOV ECX,R8D
SUB ECX,EAX
MOV R12,qword ptr [RDI + 0x380]
MOV byte ptr [RDI + 0x685],0x1
MOV R13,qword ptr [RDX]
MOV R9D,dword ptr [RDX + 0x8]
LEA RAX,[R9 + R13*0x1]
IMUL RAX,R8
MOV qword ptr [RBP + -0x38],RAX
TEST R14,R14
JZ 0x00152172
ADD ECX,-0xc
MOV dword ptr [RBP + -0x44],ECX
MOV EAX,dword ptr [RDX + 0x10]
MOV dword ptr [RBP + -0x2c],EAX
MOV RAX,RSI
SHR RAX,0x20
MOV qword ptr [RBP + -0xa8],RAX
MOV RAX,RSI
SHR RAX,0x28
MOV qword ptr [RBP + -0xa0],RAX
MOV RAX,RSI
SHR RAX,0x30
MOV qword ptr [RBP + -0x98],RAX
LEA RAX,[R12 + 0x8]
MOV qword ptr [RBP + -0x90],RAX
MOV EBX,ECX
LEA RAX,[R12 + R8*0x1 + -0x4]
MOV qword ptr [RBP + -0x68],RAX
LEA RAX,[RDI + 0x470]
MOV qword ptr [RBP + -0x88],RAX
MOV qword ptr [RBP + -0x60],RDI
MOV qword ptr [RBP + -0x78],R8
MOV qword ptr [RBP + -0x80],RSI
MOV qword ptr [RBP + -0x70],RBX
LAB_00152018:
SUB R9D,0x1
MOV qword ptr [RBP + -0xb0],R15
JNC 0x00152063
MOV EAX,dword ptr [RBP + -0x2c]
DEC EAX
JZ 0x00152189
MOV dword ptr [RBP + -0x2c],EAX
MOV R13,qword ptr [RDX + 0x18]
MOV ECX,dword ptr [RDX + 0x20]
LEA RAX,[RDX + 0x18]
DEC ECX
MOV qword ptr [RBP + -0x50],RCX
ADD RCX,R13
INC RCX
IMUL RCX,R8
MOV RDX,qword ptr [RBP + -0x38]
CMP RDX,RCX
CMOVBE RDX,RCX
MOV qword ptr [RBP + -0x38],RDX
MOV qword ptr [RBP + -0x58],RAX
JMP 0x0015206b
LAB_00152063:
MOV qword ptr [RBP + -0x50],R9
MOV qword ptr [RBP + -0x58],RDX
LAB_0015206b:
MOV RAX,qword ptr [RBP + -0xa8]
MOV byte ptr [R12],AL
MOV RAX,qword ptr [RBP + -0xa0]
MOV byte ptr [R12 + 0x1],AL
MOV RAX,qword ptr [RBP + -0x98]
MOV byte ptr [R12 + 0x2],AL
MOV dword ptr [R12 + 0x3],ESI
MOV byte ptr [R12 + 0x7],0x3
MOV R15,qword ptr [RBP + -0x40]
MOV EDX,dword ptr [R15 + 0xc18]
MOV RDI,qword ptr [RBP + -0x90]
XOR ESI,ESI
CALL 0x001292a0
CMP R14,RBX
CMOVC RBX,R14
MOV EDI,dword ptr [R15 + 0xc18]
ADD EDI,0x8
ADD RDI,R12
MOV R15,qword ptr [RBP + -0xb0]
MOV RSI,R15
MOV RDX,RBX
CALL 0x00129080
MOV EAX,dword ptr [RBP + -0x44]
MOV EDX,EAX
SUB EDX,EBX
JZ 0x001520f2
MOV RDI,qword ptr [RBP + -0x68]
SUB RDI,RDX
ADD EDX,0x4
XOR ESI,ESI
CALL 0x001292a0
LAB_001520f2:
MOV RAX,qword ptr [RBP + -0x40]
MOV RDI,qword ptr [RAX + 0x600]
MOV R9D,dword ptr [RAX + 0x7d4]
MOV RAX,qword ptr [RBP + -0x60]
MOV RAX,qword ptr [RAX + 0x8]
MOV R10D,dword ptr [RDI + 0x80]
SUB RSP,0x8
MOV RSI,qword ptr [RBP + -0x88]
MOV RDX,R13
XOR ECX,ECX
MOV R8,R12
PUSH R10
XOR R10D,R10D
PUSH R10
PUSH qword ptr [RAX + 0x90]
PUSH 0x0
PUSH R10
PUSH 0x1
PUSH R10
CALL 0x0013c506
ADD RSP,0x40
TEST AL,AL
JNZ 0x00152193
SUB R14,RBX
INC R13
MOV RBX,qword ptr [RBP + -0x70]
ADD R15,RBX
TEST R14,R14
MOV RDI,qword ptr [RBP + -0x60]
MOV RSI,qword ptr [RBP + -0x80]
MOV R8,qword ptr [RBP + -0x78]
MOV RDX,qword ptr [RBP + -0x58]
MOV R9,qword ptr [RBP + -0x50]
JNZ 0x00152018
LAB_00152172:
MOV RDI,qword ptr [RBP + -0x40]
MOV RSI,qword ptr [RBP + -0x38]
CMP qword ptr [RDI + 0x40],RSI
JNC 0x00152185
CALL 0x0014369c
LAB_00152185:
XOR EAX,EAX
JMP 0x00152195
LAB_00152189:
MOV ESI,0x7f
CALL 0x0013fc44
LAB_00152193:
MOV AL,0x1
LAB_00152195:
ADD RSP,0x88
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
int8
write_full_pages(long *param_1,int8 param_2,long *param_3,void *param_4,ulong param_5)
{
long lVar1;
int1 *puVar2;
char cVar3;
uint uVar4;
ulong uVar5;
uint uVar6;
ulong uVar7;
ulong uVar8;
int iVar9;
long lVar10;
long *local_60;
ulong local_58;
ulong local_40;
int local_34;
lVar1 = *param_1;
uVar4 = *(uint *)(lVar1 + 0x7bc);
uVar8 = (ulong)uVar4;
iVar9 = *(int *)(lVar1 + 0xc18);
puVar2 = (int1 *)param_1[0x70];
*(int1 *)((long)param_1 + 0x685) = 1;
lVar10 = *param_3;
local_58 = (ulong)*(uint *)(param_3 + 1);
local_40 = (local_58 + lVar10) * uVar8;
if (param_5 != 0) {
uVar4 = (uVar4 - iVar9) - 0xc;
local_34 = (int)param_3[2];
uVar7 = (ulong)uVar4;
do {
iVar9 = (int)local_58;
local_58 = (ulong)(iVar9 - 1);
local_60 = param_3;
if (iVar9 == 0) {
local_34 = local_34 + -1;
if (local_34 == 0) {
_ma_set_fatal_error(param_1,0x7f);
return 1;
}
lVar10 = param_3[3];
local_60 = param_3 + 3;
local_58 = (ulong)((int)param_3[4] - 1);
uVar5 = (local_58 + lVar10 + 1) * uVar8;
if (local_40 <= uVar5) {
local_40 = uVar5;
}
}
*puVar2 = (char)((ulong)param_2 >> 0x20);
puVar2[1] = (char)((ulong)param_2 >> 0x28);
puVar2[2] = (char)((ulong)param_2 >> 0x30);
*(int *)(puVar2 + 3) = (int)param_2;
puVar2[7] = 3;
memset(puVar2 + 8,0,(ulong)*(uint *)(lVar1 + 0xc18));
uVar5 = uVar7;
if (param_5 < uVar7) {
uVar5 = param_5;
}
memcpy(puVar2 + (*(int *)(lVar1 + 0xc18) + 8),param_4,uVar5);
uVar6 = uVar4 - (int)uVar5;
if (uVar6 != 0) {
memset(puVar2 + ((uVar8 - 4) - (ulong)uVar6),0,(ulong)(uVar6 + 4));
}
cVar3 = pagecache_write_part
(*(long *)(lVar1 + 0x600),param_1 + 0x8e,lVar10,0,puVar2,
*(int4 *)(lVar1 + 0x7d4),0,1,0,0,*(int8 *)(param_1[1] + 0x90),0
,*(int4 *)(*(long *)(lVar1 + 0x600) + 0x80));
if (cVar3 != '\0') {
return 1;
}
param_5 = param_5 - uVar5;
lVar10 = lVar10 + 1;
param_4 = (void *)((long)param_4 + uVar7);
param_3 = local_60;
} while (param_5 != 0);
}
if (*(ulong *)(lVar1 + 0x40) < local_40) {
_ma_set_share_data_file_length();
}
return 0;
}
|
|
57,282
|
httplib::detail::case_ignore::hash::hash_core(char const*, unsigned long, unsigned long) const
|
hkr04[P]cpp-mcp/common/httplib.h
|
size_t hash_core(const char *s, size_t l, size_t h) const {
return (l == 0) ? h
: hash_core(s + 1, l - 1,
// Unsets the 6 high bits of h, therefore no
// overflow happens
(((std::numeric_limits<size_t>::max)() >> 6) &
h * 33) ^
static_cast<unsigned char>(to_lower(*s)));
}
|
O0
|
c
|
httplib::detail::case_ignore::hash::hash_core(char const*, unsigned long, unsigned long) const:
subq $0x48, %rsp
movq %rdi, 0x40(%rsp)
movq %rsi, 0x38(%rsp)
movq %rdx, 0x30(%rsp)
movq %rcx, 0x28(%rsp)
movq 0x40(%rsp), %rax
movq %rax, 0x20(%rsp)
cmpq $0x0, 0x30(%rsp)
jne 0x227c6
movq 0x28(%rsp), %rax
movq %rax, 0x18(%rsp)
jmp 0x22828
movq 0x38(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x8(%rsp)
movq 0x30(%rsp), %rax
subq $0x1, %rax
movq %rax, 0x10(%rsp)
callq 0x22840
shrq $0x6, %rax
imulq $0x21, 0x28(%rsp), %rcx
andq %rcx, %rax
movq %rax, (%rsp)
movq 0x38(%rsp), %rax
movsbl (%rax), %edi
callq 0x21fc0
movq (%rsp), %rcx
movq 0x20(%rsp), %rdi
movq 0x8(%rsp), %rsi
movq 0x10(%rsp), %rdx
movzbl %al, %eax
xorq %rax, %rcx
callq 0x22790
movq %rax, 0x18(%rsp)
movq 0x18(%rsp), %rax
addq $0x48, %rsp
retq
nopw %cs:(%rax,%rax)
nopl (%rax)
|
_ZNK7httplib6detail11case_ignore4hash9hash_coreEPKcmm:
sub rsp, 48h
mov [rsp+48h+var_8], rdi
mov [rsp+48h+var_10], rsi
mov [rsp+48h+var_18], rdx
mov [rsp+48h+var_20], rcx
mov rax, [rsp+48h+var_8]
mov [rsp+48h+var_28], rax
cmp [rsp+48h+var_18], 0
jnz short loc_227C6
mov rax, [rsp+48h+var_20]
mov [rsp+48h+var_30], rax
jmp short loc_22828
loc_227C6:
mov rax, [rsp+48h+var_10]
add rax, 1
mov [rsp+48h+var_40], rax
mov rax, [rsp+48h+var_18]
sub rax, 1
mov [rsp+48h+var_38], rax
call _ZNSt14numeric_limitsImE3maxEv; std::numeric_limits<ulong>::max(void)
shr rax, 6
imul rcx, [rsp+48h+var_20], 21h ; '!'
and rax, rcx
mov [rsp+48h+var_48], rax
mov rax, [rsp+48h+var_10]
movsx edi, byte ptr [rax]; this
call _ZN7httplib6detail11case_ignore8to_lowerEi; httplib::detail::case_ignore::to_lower(int)
mov rcx, [rsp+48h+var_48]
mov rdi, [rsp+48h+var_28]; this
mov rsi, [rsp+48h+var_40]; char *
mov rdx, [rsp+48h+var_38]; unsigned __int64
movzx eax, al
xor rcx, rax; unsigned __int64
call _ZNK7httplib6detail11case_ignore4hash9hash_coreEPKcmm; httplib::detail::case_ignore::hash::hash_core(char const*,ulong,ulong)
mov [rsp+48h+var_30], rax
loc_22828:
mov rax, [rsp+48h+var_30]
add rsp, 48h
retn
|
long long httplib::detail::case_ignore::hash::hash_core(
httplib::detail::case_ignore::hash *this,
const char *a2,
long long a3,
long long a4)
{
unsigned __int8 v4; // al
unsigned long long v6; // [rsp+0h] [rbp-48h]
if ( !a3 )
return a4;
v6 = (33 * a4) & ((unsigned long long)std::numeric_limits<unsigned long>::max() >> 6);
v4 = httplib::detail::case_ignore::to_lower((httplib::detail::case_ignore *)(unsigned int)*a2);
return httplib::detail::case_ignore::hash::hash_core(this, a2 + 1, a3 - 1, v4 ^ v6);
}
|
hash_core:
SUB RSP,0x48
MOV qword ptr [RSP + 0x40],RDI
MOV qword ptr [RSP + 0x38],RSI
MOV qword ptr [RSP + 0x30],RDX
MOV qword ptr [RSP + 0x28],RCX
MOV RAX,qword ptr [RSP + 0x40]
MOV qword ptr [RSP + 0x20],RAX
CMP qword ptr [RSP + 0x30],0x0
JNZ 0x001227c6
MOV RAX,qword ptr [RSP + 0x28]
MOV qword ptr [RSP + 0x18],RAX
JMP 0x00122828
LAB_001227c6:
MOV RAX,qword ptr [RSP + 0x38]
ADD RAX,0x1
MOV qword ptr [RSP + 0x8],RAX
MOV RAX,qword ptr [RSP + 0x30]
SUB RAX,0x1
MOV qword ptr [RSP + 0x10],RAX
CALL 0x00122840
SHR RAX,0x6
IMUL RCX,qword ptr [RSP + 0x28],0x21
AND RAX,RCX
MOV qword ptr [RSP],RAX
MOV RAX,qword ptr [RSP + 0x38]
MOVSX EDI,byte ptr [RAX]
CALL 0x00121fc0
MOV RCX,qword ptr [RSP]
MOV RDI,qword ptr [RSP + 0x20]
MOV RSI,qword ptr [RSP + 0x8]
MOV RDX,qword ptr [RSP + 0x10]
MOVZX EAX,AL
XOR RCX,RAX
CALL 0x00122790
MOV qword ptr [RSP + 0x18],RAX
LAB_00122828:
MOV RAX,qword ptr [RSP + 0x18]
ADD RSP,0x48
RET
|
/* httplib::detail::case_ignore::hash::hash_core(char const*, unsigned long, unsigned long) const */
ulong __thiscall
httplib::detail::case_ignore::hash::hash_core(hash *this,char *param_1,ulong param_2,ulong param_3)
{
byte bVar1;
ulong uVar2;
ulong local_30;
local_30 = param_3;
if (param_2 != 0) {
uVar2 = std::numeric_limits<unsigned_long>::max();
bVar1 = to_lower((int)*param_1);
local_30 = hash_core(this,param_1 + 1,param_2 - 1,uVar2 >> 6 & param_3 * 0x21 ^ (ulong)bVar1);
}
return local_30;
}
|
|
57,283
|
minja::Parser::parseExpression(bool)
|
monkey531[P]llama/common/minja.hpp
|
std::shared_ptr<Expression> parseExpression(bool allow_if_expr = true) {
auto left = parseLogicalOr();
if (it == end) return left;
if (!allow_if_expr) return left;
static std::regex if_tok(R"(if\b)");
if (consumeToken(if_tok).empty()) {
return left;
}
auto location = get_location();
auto [condition, else_expr] = parseIfExpression();
return std::make_shared<IfExpr>(location, std::move(condition), std::move(left), std::move(else_expr));
}
|
O2
|
cpp
|
minja::Parser::parseExpression(bool):
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x68, %rsp
movl %edx, %ebp
movq %rsi, %r14
movq %rdi, %rbx
movq %rsp, %rdi
callq 0x664e6
movq 0x20(%r14), %rax
cmpq 0x18(%r14), %rax
je 0x65174
testb %bpl, %bpl
je 0x65174
leaq 0x9ff9e(%rip), %rax # 0x105078
movb (%rax), %al
testb %al, %al
je 0x6519e
leaq 0x9ff6d(%rip), %rdx # 0x105058
leaq 0x18(%rsp), %rdi
pushq $0x1
popq %rcx
movq %r14, %rsi
callq 0x65288
leaq 0x18(%rsp), %rdi
movq 0x8(%rdi), %r15
callq 0x25258
testq %r15, %r15
je 0x65174
leaq 0x38(%rsp), %rdi
movq %r14, %rsi
callq 0x64e64
leaq 0x18(%rsp), %rdi
movq %r14, %rsi
callq 0x666e8
leaq 0x28(%rsp), %r8
leaq 0x50(%rsp), %rdi
leaq 0x38(%rsp), %rsi
leaq 0x18(%rsp), %rdx
movq %rsp, %rcx
callq 0x668d9
leaq 0x58(%rsp), %rdi
movaps -0x8(%rdi), %xmm0
andq $0x0, (%rdi)
movups %xmm0, (%rbx)
andq $0x0, -0x8(%rdi)
callq 0x37354
leaq 0x18(%rsp), %rdi
callq 0x66900
leaq 0x40(%rsp), %rdi
callq 0x37354
jmp 0x65186
movaps (%rsp), %xmm0
andq $0x0, 0x8(%rsp)
movups %xmm0, (%rbx)
andq $0x0, (%rsp)
leaq 0x8(%rsp), %rdi
callq 0x37354
movq %rbx, %rax
addq $0x68, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
leaq 0x9fed3(%rip), %rdi # 0x105078
callq 0x25060
testl %eax, %eax
je 0x650e4
leaq 0x9fe9f(%rip), %rdi # 0x105058
leaq 0x53937(%rip), %rsi # 0xb8af7
pushq $0x10
popq %rdx
callq 0x2b33e
leaq -0x39ddb(%rip), %rdi # 0x2b3f4
leaq 0x9fe82(%rip), %rsi # 0x105058
leaq 0x9f75b(%rip), %rdx # 0x104938
callq 0x24800
leaq 0x9fe8f(%rip), %rdi # 0x105078
callq 0x245f0
jmp 0x650e4
movq %rax, %rbx
leaq 0x9fe7b(%rip), %rdi # 0x105078
callq 0x245e0
jmp 0x65227
movq %rax, %rbx
leaq 0x18(%rsp), %rdi
callq 0x66900
jmp 0x65216
movq %rax, %rbx
leaq 0x40(%rsp), %rdi
callq 0x37354
jmp 0x65227
jmp 0x65224
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x37354
movq %rbx, %rdi
callq 0x24fe0
|
_ZN5minja6Parser15parseExpressionEb:
push rbp
push r15
push r14
push rbx
sub rsp, 68h
mov ebp, edx
mov r14, rsi
mov rbx, rdi
mov rdi, rsp; this
call _ZN5minja6Parser14parseLogicalOrEv; minja::Parser::parseLogicalOr(void)
mov rax, [r14+20h]
cmp rax, [r14+18h]
jz loc_65174
test bpl, bpl
jz loc_65174
lea rax, _ZGVZN5minja6Parser15parseExpressionEbE6if_tokB5cxx11; `guard variable for'minja::Parser::parseExpression(bool)::if_tok
mov al, [rax]
test al, al
jz loc_6519E
loc_650E4:
lea rdx, _ZZN5minja6Parser15parseExpressionEbE6if_tokB5cxx11; minja::Parser::parseExpression(bool)::if_tok
lea rdi, [rsp+88h+var_70]
push 1
pop rcx
mov rsi, r14
call _ZN5minja6Parser12consumeTokenERKNSt7__cxx1111basic_regexIcNS1_12regex_traitsIcEEEENS_13SpaceHandlingE; minja::Parser::consumeToken(std::basic_regex<char,std::regex_traits<char>> const&,minja::SpaceHandling)
lea rdi, [rsp+88h+var_70]; void *
mov r15, [rdi+8]
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
test r15, r15
jz short loc_65174
lea rdi, [rsp+88h+var_50]; this
mov rsi, r14
call _ZNK5minja6Parser12get_locationEv; minja::Parser::get_location(void)
lea rdi, [rsp+88h+var_70]; this
mov rsi, r14
call _ZN5minja6Parser17parseIfExpressionEv; minja::Parser::parseIfExpression(void)
lea r8, [rsp+88h+var_60]
lea rdi, [rsp+88h+var_38]
lea rsi, [rsp+88h+var_50]
lea rdx, [rsp+88h+var_70]
mov rcx, rsp
call _ZSt11make_sharedIN5minja6IfExprEJRNS0_8LocationESt10shared_ptrINS0_10ExpressionEES6_S6_EES4_IT_EDpOT0_; std::make_shared<minja::IfExpr,minja::Location &,std::shared_ptr<minja::Expression>,std::shared_ptr<minja::Expression>,std::shared_ptr<minja::Expression>>(minja::Location &,std::shared_ptr<minja::Expression>,std::shared_ptr<minja::Expression>,std::shared_ptr<minja::Expression> &&)
lea rdi, [rsp+88h+var_30]
movaps xmm0, xmmword ptr [rdi-8]
and qword ptr [rdi], 0
movups xmmword ptr [rbx], xmm0
and qword ptr [rdi-8], 0
call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count()
lea rdi, [rsp+88h+var_70]
call _ZNSt4pairISt10shared_ptrIN5minja10ExpressionEES3_ED2Ev; std::pair<std::shared_ptr<minja::Expression>,std::shared_ptr<minja::Expression>>::~pair()
lea rdi, [rsp+88h+var_48]
call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count()
jmp short loc_65186
loc_65174:
movaps xmm0, [rsp+88h+var_88]
and qword ptr [rsp+88h+var_88+8], 0
movups xmmword ptr [rbx], xmm0
and qword ptr [rsp+88h+var_88], 0
loc_65186:
lea rdi, [rsp+88h+var_88+8]
call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count()
mov rax, rbx
add rsp, 68h
pop rbx
pop r14
pop r15
pop rbp
retn
loc_6519E:
lea rdi, _ZGVZN5minja6Parser15parseExpressionEbE6if_tokB5cxx11; __guard *
call ___cxa_guard_acquire
test eax, eax
jz loc_650E4
lea rdi, _ZZN5minja6Parser15parseExpressionEbE6if_tokB5cxx11; minja::Parser::parseExpression(bool)::if_tok
lea rsi, aIfB; "if\\b"
push 10h
pop rdx
call _ZNSt7__cxx1111basic_regexIcNS_12regex_traitsIcEEEC2EPKcNSt15regex_constants18syntax_option_typeE; std::basic_regex<char,std::regex_traits<char>>::basic_regex(char const*,std::regex_constants::syntax_option_type)
lea rdi, _ZNSt7__cxx1111basic_regexIcNS_12regex_traitsIcEEED2Ev; lpfunc
lea rsi, _ZZN5minja6Parser15parseExpressionEbE6if_tokB5cxx11; obj
lea rdx, __dso_handle; lpdso_handle
call ___cxa_atexit
lea rdi, _ZGVZN5minja6Parser15parseExpressionEbE6if_tokB5cxx11; __guard *
call ___cxa_guard_release
jmp loc_650E4
mov rbx, rax
lea rdi, _ZGVZN5minja6Parser15parseExpressionEbE6if_tokB5cxx11; __guard *
call ___cxa_guard_abort
jmp short loc_65227
mov rbx, rax
lea rdi, [rsp+arg_10]
call _ZNSt4pairISt10shared_ptrIN5minja10ExpressionEES3_ED2Ev; std::pair<std::shared_ptr<minja::Expression>,std::shared_ptr<minja::Expression>>::~pair()
jmp short loc_65216
mov rbx, rax
loc_65216:
lea rdi, [rsp+arg_38]
call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count()
jmp short loc_65227
jmp short $+2
loc_65224:
mov rbx, rax
loc_65227:
lea rdi, [rsp+arg_0]
call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count()
mov rdi, rbx
call __Unwind_Resume
|
minja::Parser * minja::Parser::parseExpression(minja::Parser *this, _QWORD *a2, char a3)
{
int v4; // r8d
int v5; // r9d
long long v6; // r15
__int128 v7; // xmm0
__int128 v8; // xmm0
__int128 v10; // [rsp+0h] [rbp-88h] BYREF
_BYTE v11[8]; // [rsp+18h] [rbp-70h] BYREF
long long v12; // [rsp+20h] [rbp-68h]
_BYTE v13[16]; // [rsp+28h] [rbp-60h] BYREF
_BYTE v14[8]; // [rsp+38h] [rbp-50h] BYREF
long long v15; // [rsp+40h] [rbp-48h] BYREF
_OWORD v16[3]; // [rsp+50h] [rbp-38h] BYREF
minja::Parser::parseLogicalOr((minja::Parser *)&v10);
if ( a2[4] == a2[3] || !a3 )
goto LABEL_6;
if ( !(_BYTE)`guard variable for'minja::Parser::parseExpression(bool)::if_tok[abi:cxx11]
&& __cxa_guard_acquire(&`guard variable for'minja::Parser::parseExpression(bool)::if_tok[abi:cxx11]) )
{
std::basic_regex<char,std::regex_traits<char>>::basic_regex(
(long long)&minja::Parser::parseExpression(bool)::if_tok[abi:cxx11],
(long long)"if\\b",
0x10u);
__cxa_atexit(
(void (*)(void *))std::basic_regex<char,std::regex_traits<char>>::~basic_regex,
&minja::Parser::parseExpression(bool)::if_tok[abi:cxx11],
&_dso_handle);
__cxa_guard_release(&`guard variable for'minja::Parser::parseExpression(bool)::if_tok[abi:cxx11]);
}
minja::Parser::consumeToken(
(unsigned int)v11,
(_DWORD)a2,
(unsigned int)&minja::Parser::parseExpression(bool)::if_tok[abi:cxx11],
1,
v4,
v5,
v10,
SBYTE8(v10));
v6 = v12;
std::string::~string(v11);
if ( v6 )
{
minja::Parser::get_location((minja::Parser *)v14, a2);
minja::Parser::parseIfExpression((minja::Parser *)v11);
std::make_shared<minja::IfExpr,minja::Location &,std::shared_ptr<minja::Expression>,std::shared_ptr<minja::Expression>,std::shared_ptr<minja::Expression>>(
v16,
v14,
v11,
&v10,
v13);
v7 = v16[0];
*((_QWORD *)&v16[0] + 1) = 0LL;
*(_OWORD *)this = v7;
*(_QWORD *)&v16[0] = 0LL;
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count((_QWORD *)v16 + 1);
std::pair<std::shared_ptr<minja::Expression>,std::shared_ptr<minja::Expression>>::~pair(v11);
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v15);
}
else
{
LABEL_6:
v8 = v10;
*((_QWORD *)&v10 + 1) = 0LL;
*(_OWORD *)this = v8;
*(_QWORD *)&v10 = 0LL;
}
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count((_QWORD *)&v10 + 1);
return this;
}
|
parseExpression:
PUSH RBP
PUSH R15
PUSH R14
PUSH RBX
SUB RSP,0x68
MOV EBP,EDX
MOV R14,RSI
MOV RBX,RDI
MOV RDI,RSP
CALL 0x001664e6
MOV RAX,qword ptr [R14 + 0x20]
CMP RAX,qword ptr [R14 + 0x18]
JZ 0x00165174
TEST BPL,BPL
JZ 0x00165174
LEA RAX,[0x205078]
MOV AL,byte ptr [RAX]
TEST AL,AL
JZ 0x0016519e
LAB_001650e4:
LEA RDX,[0x205058]
LEA RDI,[RSP + 0x18]
PUSH 0x1
POP RCX
MOV RSI,R14
CALL 0x00165288
LEA RDI,[RSP + 0x18]
MOV R15,qword ptr [RDI + 0x8]
CALL 0x00125258
TEST R15,R15
JZ 0x00165174
LAB_0016510e:
LEA RDI,[RSP + 0x38]
MOV RSI,R14
CALL 0x00164e64
LAB_0016511b:
LEA RDI,[RSP + 0x18]
MOV RSI,R14
CALL 0x001666e8
LEA R8,[RSP + 0x28]
LAB_0016512d:
LEA RDI,[RSP + 0x50]
LEA RSI,[RSP + 0x38]
LEA RDX,[RSP + 0x18]
MOV RCX,RSP
CALL 0x001668d9
LEA RDI,[RSP + 0x58]
MOVAPS XMM0,xmmword ptr [RDI + -0x8]
AND qword ptr [RDI],0x0
MOVUPS xmmword ptr [RBX],XMM0
AND qword ptr [RDI + -0x8],0x0
CALL 0x00137354
LEA RDI,[RSP + 0x18]
CALL 0x00166900
LEA RDI,[RSP + 0x40]
CALL 0x00137354
JMP 0x00165186
LAB_00165174:
MOVAPS XMM0,xmmword ptr [RSP]
AND qword ptr [RSP + 0x8],0x0
MOVUPS xmmword ptr [RBX],XMM0
AND qword ptr [RSP],0x0
LAB_00165186:
LEA RDI,[RSP + 0x8]
CALL 0x00137354
MOV RAX,RBX
ADD RSP,0x68
POP RBX
POP R14
POP R15
POP RBP
RET
LAB_0016519e:
LEA RDI,[0x205078]
CALL 0x00125060
TEST EAX,EAX
JZ 0x001650e4
LAB_001651b2:
LEA RDI,[0x205058]
LEA RSI,[0x1b8af7]
PUSH 0x10
POP RDX
CALL 0x0012b33e
LAB_001651c8:
LEA RDI,[0x12b3f4]
LEA RSI,[0x205058]
LEA RDX,[0x204938]
CALL 0x00124800
LEA RDI,[0x205078]
CALL 0x001245f0
JMP 0x001650e4
|
/* minja::Parser::parseExpression(bool) */
int8 * minja::Parser::parseExpression(bool param_1)
{
int8 uVar1;
int iVar2;
char in_DL;
long in_RSI;
int7 in_register_00000039;
int8 *puVar3;
int8 local_88;
int8 auStack_80 [2];
string local_70 [8];
long local_68;
shared_ptr local_50 [8];
__shared_count<(__gnu_cxx::_Lock_policy)2> local_48 [16];
int8 local_38;
int8 auStack_30 [2];
puVar3 = (int8 *)CONCAT71(in_register_00000039,param_1);
parseLogicalOr();
if ((*(long *)(in_RSI + 0x20) != *(long *)(in_RSI + 0x18)) && (in_DL != '\0')) {
if (parseExpression(bool)::if_tok_abi_cxx11_ == '\0') {
iVar2 = __cxa_guard_acquire(&parseExpression(bool)::if_tok_abi_cxx11_);
if (iVar2 != 0) {
/* try { // try from 001651b2 to 001651c7 has its CatchHandler @ 001651f3 */
std::__cxx11::basic_regex<char,std::__cxx11::regex_traits<char>>::basic_regex
((basic_regex<char,std::__cxx11::regex_traits<char>> *)
parseExpression(bool)::if_tok_abi_cxx11_,&DAT_001b8af7,0x10);
__cxa_atexit(std::__cxx11::basic_regex<char,std::__cxx11::regex_traits<char>>::~basic_regex,
parseExpression(bool)::if_tok_abi_cxx11_,&__dso_handle);
__cxa_guard_release(&parseExpression(bool)::if_tok_abi_cxx11_);
}
}
/* try { // try from 001650e4 to 001650fa has its CatchHandler @ 00165224 */
consumeToken(local_70);
std::__cxx11::string::~string(local_70);
if (local_68 != 0) {
/* try { // try from 0016510e to 0016511a has its CatchHandler @ 00165222 */
get_location();
/* try { // try from 0016511b to 00165127 has its CatchHandler @ 00165213 */
parseIfExpression();
/* try { // try from 0016512d to 00165143 has its CatchHandler @ 00165204 */
std::
make_shared<minja::IfExpr,minja::Location&,std::shared_ptr<minja::Expression>,std::shared_ptr<minja::Expression>,std::shared_ptr<minja::Expression>>
((Location *)&local_38,local_50,local_70,(shared_ptr *)&local_88);
uVar1 = auStack_30[0];
auStack_30[0] = 0;
*puVar3 = local_38;
puVar3[1] = uVar1;
local_38 = 0;
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count
((__shared_count<(__gnu_cxx::_Lock_policy)2> *)auStack_30);
std::pair<std::shared_ptr<minja::Expression>,std::shared_ptr<minja::Expression>>::~pair
((pair<std::shared_ptr<minja::Expression>,std::shared_ptr<minja::Expression>> *)
local_70);
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(local_48);
goto LAB_00165186;
}
}
uVar1 = auStack_80[0];
auStack_80[0] = 0;
*puVar3 = local_88;
puVar3[1] = uVar1;
local_88 = 0;
LAB_00165186:
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count
((__shared_count<(__gnu_cxx::_Lock_policy)2> *)auStack_80);
return puVar3;
}
|
|
57,284
|
minja::Parser::parseExpression(bool)
|
monkey531[P]llama/common/minja.hpp
|
std::shared_ptr<Expression> parseExpression(bool allow_if_expr = true) {
auto left = parseLogicalOr();
if (it == end) return left;
if (!allow_if_expr) return left;
static std::regex if_tok(R"(if\b)");
if (consumeToken(if_tok).empty()) {
return left;
}
auto location = get_location();
auto [condition, else_expr] = parseIfExpression();
return std::make_shared<IfExpr>(location, std::move(condition), std::move(left), std::move(else_expr));
}
|
O3
|
cpp
|
minja::Parser::parseExpression(bool):
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x50, %rsp
movl %edx, %ebp
movq %rsi, %r14
movq %rdi, %rbx
movq %rsp, %rdi
callq 0x8a69c
movq 0x20(%r14), %rax
cmpq 0x18(%r14), %rax
je 0x893da
testb %bpl, %bpl
je 0x893da
leaq 0xa8cec(%rip), %rax # 0x132058
movb (%rax), %al
testb %al, %al
je 0x894a8
leaq 0xa8cbb(%rip), %rdx # 0x132038
leaq 0x30(%rsp), %rdi
movq %r14, %rsi
movl $0x1, %ecx
callq 0x8954e
leaq 0x40(%rsp), %rax
movq -0x10(%rax), %rdi
movq -0x8(%rax), %r15
cmpq %rax, %rdi
je 0x893ae
movq 0x40(%rsp), %rsi
incq %rsi
callq 0x1b910
testq %r15, %r15
je 0x893da
movq (%r14), %rax
movq %rax, 0x18(%rsp)
movq 0x8(%r14), %rax
movq %rax, 0x20(%rsp)
testq %rax, %rax
je 0x893f5
movq 0xa7bb0(%rip), %rcx # 0x130f80
cmpb $0x0, (%rcx)
je 0x893f1
incl 0x8(%rax)
jmp 0x893f5
movaps (%rsp), %xmm0
movups %xmm0, (%rbx)
movq %rbx, %rax
addq $0x50, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
lock
incl 0x8(%rax)
movq 0x20(%r14), %rax
subq 0x10(%r14), %rax
movq %rax, 0x28(%rsp)
leaq 0x30(%rsp), %rdi
movq %r14, %rsi
callq 0x8a92a
movl $0x60, %edi
callq 0x1b8f0
movq %rax, %r14
leaq 0x40(%rsp), %r8
movabsq $0x100000001, %rax # imm = 0x100000001
movq %rax, 0x8(%r14)
leaq 0xa6632(%rip), %rax # 0x12fa68
addq $0x10, %rax
movq %rax, (%r14)
movq %r14, %r15
addq $0x10, %r15
leaq 0x18(%rsp), %rsi
leaq 0x30(%rsp), %r12
movq %rsp, %rcx
movq %r15, %rdi
movq %r12, %rdx
callq 0x9d74e
movq %r15, (%rbx)
movq %r14, 0x8(%rbx)
movq 0x18(%r12), %rdi
testq %rdi, %rdi
je 0x89472
callq 0x33c02
movq 0x38(%rsp), %rdi
testq %rdi, %rdi
je 0x89481
callq 0x33c02
movq 0x20(%rsp), %rdi
testq %rdi, %rdi
je 0x89490
callq 0x33c02
movq 0x8(%rsp), %rdi
testq %rdi, %rdi
je 0x893e1
callq 0x33c02
jmp 0x893e1
leaq 0xa8ba9(%rip), %rdi # 0x132058
callq 0x1c060
testl %eax, %eax
je 0x89376
leaq 0xa8b75(%rip), %rdi # 0x132038
leaq 0x6b61d(%rip), %rsi # 0xf4ae7
movl $0x10, %edx
callq 0x26358
leaq -0x6311b(%rip), %rdi # 0x263c0
leaq 0xa8b56(%rip), %rsi # 0x132038
leaq 0xa842f(%rip), %rdx # 0x131918
callq 0x1b7f0
leaq 0xa8b63(%rip), %rdi # 0x132058
callq 0x1b5c0
jmp 0x89376
movq %rax, %rbx
leaq 0xa8b4f(%rip), %rdi # 0x132058
callq 0x1b5b0
jmp 0x89536
movq %rax, %rbx
leaq 0x30(%rsp), %rdi
callq 0x8aaf6
jmp 0x89522
movq %rax, %rbx
movq 0x20(%rsp), %rdi
testq %rdi, %rdi
je 0x89536
callq 0x33c02
jmp 0x89536
movq %rax, %rbx
movq 0x8(%rsp), %rdi
testq %rdi, %rdi
je 0x89545
callq 0x33c02
movq %rbx, %rdi
callq 0x1bff0
nop
|
_ZN5minja6Parser15parseExpressionEb:
push rbp
push r15
push r14
push r12
push rbx
sub rsp, 50h
mov ebp, edx
mov r14, rsi
mov rbx, rdi
mov rdi, rsp; this
call _ZN5minja6Parser14parseLogicalOrEv; minja::Parser::parseLogicalOr(void)
mov rax, [r14+20h]
cmp rax, [r14+18h]
jz short loc_893DA
test bpl, bpl
jz short loc_893DA
lea rax, _ZGVZN5minja6Parser15parseExpressionEbE6if_tokB5cxx11; `guard variable for'minja::Parser::parseExpression(bool)::if_tok
mov al, [rax]
test al, al
jz loc_894A8
loc_89376:
lea rdx, _ZZN5minja6Parser15parseExpressionEbE6if_tokB5cxx11; minja::Parser::parseExpression(bool)::if_tok
lea rdi, [rsp+78h+var_48]
mov rsi, r14
mov ecx, 1
call _ZN5minja6Parser12consumeTokenERKNSt7__cxx1111basic_regexIcNS1_12regex_traitsIcEEEENS_13SpaceHandlingE; minja::Parser::consumeToken(std::basic_regex<char,std::regex_traits<char>> const&,minja::SpaceHandling)
lea rax, [rsp+78h+var_38]
mov rdi, [rax-10h]; void *
mov r15, [rax-8]
cmp rdi, rax
jz short loc_893AE
mov rsi, [rsp+78h+var_38]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_893AE:
test r15, r15
jz short loc_893DA
mov rax, [r14]
mov [rsp+78h+var_60], rax
mov rax, [r14+8]
mov [rsp+78h+var_58], rax
test rax, rax
jz short loc_893F5
mov rcx, cs:__libc_single_threaded_ptr
cmp byte ptr [rcx], 0
jz short loc_893F1
inc dword ptr [rax+8]
jmp short loc_893F5
loc_893DA:
movaps xmm0, [rsp+78h+var_78]
movups xmmword ptr [rbx], xmm0
loc_893E1:
mov rax, rbx
add rsp, 50h
pop rbx
pop r12
pop r14
pop r15
pop rbp
retn
loc_893F1:
lock inc dword ptr [rax+8]
loc_893F5:
mov rax, [r14+20h]
sub rax, [r14+10h]
mov [rsp+78h+var_50], rax
lea rdi, [rsp+78h+var_48]; this
mov rsi, r14
call _ZN5minja6Parser17parseIfExpressionEv; minja::Parser::parseIfExpression(void)
mov edi, 60h ; '`'; unsigned __int64
call __Znwm; operator new(ulong)
mov r14, rax
lea r8, [rsp+78h+var_38]
mov rax, 100000001h
mov [r14+8], rax
lea rax, _ZTVSt23_Sp_counted_ptr_inplaceIN5minja6IfExprESaIS1_ELN9__gnu_cxx12_Lock_policyE2EE; `vtable for'std::_Sp_counted_ptr_inplace<minja::IfExpr,std::allocator<minja::IfExpr>,(__gnu_cxx::_Lock_policy)2>
add rax, 10h
mov [r14], rax
mov r15, r14
add r15, 10h
lea rsi, [rsp+78h+var_60]
lea r12, [rsp+78h+var_48]
mov rcx, rsp
mov rdi, r15
mov rdx, r12
call _ZN5minja6IfExprC2ERKNS_8LocationEOSt10shared_ptrINS_10ExpressionEES7_S7_; minja::IfExpr::IfExpr(minja::Location const&,std::shared_ptr<minja::Expression> &&,std::shared_ptr<minja::Expression> &,std::shared_ptr<minja::Expression> &)
mov [rbx], r15
mov [rbx+8], r14
mov rdi, [r12+18h]
test rdi, rdi
jz short loc_89472
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_89472:
mov rdi, [rsp+78h+var_40]
test rdi, rdi
jz short loc_89481
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_89481:
mov rdi, [rsp+78h+var_58]
test rdi, rdi
jz short loc_89490
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_89490:
mov rdi, qword ptr [rsp+78h+var_78+8]
test rdi, rdi
jz loc_893E1
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
jmp loc_893E1
loc_894A8:
lea rdi, _ZGVZN5minja6Parser15parseExpressionEbE6if_tokB5cxx11; __guard *
call ___cxa_guard_acquire
test eax, eax
jz loc_89376
lea rdi, _ZZN5minja6Parser15parseExpressionEbE6if_tokB5cxx11; minja::Parser::parseExpression(bool)::if_tok
lea rsi, aIfB; "if\\b"
mov edx, 10h
call _ZNSt7__cxx1111basic_regexIcNS_12regex_traitsIcEEEC2EPKcNSt15regex_constants18syntax_option_typeE; std::basic_regex<char,std::regex_traits<char>>::basic_regex(char const*,std::regex_constants::syntax_option_type)
lea rdi, _ZNSt7__cxx1111basic_regexIcNS_12regex_traitsIcEEED2Ev; lpfunc
lea rsi, _ZZN5minja6Parser15parseExpressionEbE6if_tokB5cxx11; obj
lea rdx, __dso_handle; lpdso_handle
call ___cxa_atexit
lea rdi, _ZGVZN5minja6Parser15parseExpressionEbE6if_tokB5cxx11; __guard *
call ___cxa_guard_release
jmp loc_89376
mov rbx, rax
lea rdi, _ZGVZN5minja6Parser15parseExpressionEbE6if_tokB5cxx11; __guard *
call ___cxa_guard_abort
jmp short loc_89536
mov rbx, rax
lea rdi, [rsp+arg_28]
call _ZNSt4pairISt10shared_ptrIN5minja10ExpressionEES3_ED2Ev; std::pair<std::shared_ptr<minja::Expression>,std::shared_ptr<minja::Expression>>::~pair()
jmp short loc_89522
mov rbx, rax
loc_89522:
mov rdi, [rsp+arg_18]
test rdi, rdi
jz short loc_89536
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_89536
mov rbx, rax
loc_89536:
mov rdi, [rsp+arg_0]
test rdi, rdi
jz short loc_89545
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_89545:
mov rdi, rbx
call __Unwind_Resume
|
minja::Parser * minja::Parser::parseExpression(minja::Parser *this, long long *a2, char a3)
{
int v4; // r8d
int v5; // r9d
volatile signed __int32 *v6; // r15
volatile signed __int32 *v7; // rax
_QWORD *v9; // r14
__int128 v10; // [rsp+0h] [rbp-78h] BYREF
long long v11; // [rsp+18h] [rbp-60h] BYREF
volatile signed __int32 *v12; // [rsp+20h] [rbp-58h]
long long v13; // [rsp+28h] [rbp-50h]
long long *v14; // [rsp+30h] [rbp-48h] BYREF
volatile signed __int32 *v15; // [rsp+38h] [rbp-40h]
long long v16; // [rsp+40h] [rbp-38h] BYREF
volatile signed __int32 *v17; // [rsp+48h] [rbp-30h]
minja::Parser::parseLogicalOr((minja::Parser *)&v10);
if ( a2[4] == a2[3] || !a3 )
goto LABEL_10;
if ( !(_BYTE)`guard variable for'minja::Parser::parseExpression(bool)::if_tok[abi:cxx11]
&& __cxa_guard_acquire(&`guard variable for'minja::Parser::parseExpression(bool)::if_tok[abi:cxx11]) )
{
std::basic_regex<char,std::regex_traits<char>>::basic_regex(
(long long)&minja::Parser::parseExpression(bool)::if_tok[abi:cxx11],
(long long)"if\\b",
0x10u);
__cxa_atexit(
(void (*)(void *))std::basic_regex<char,std::regex_traits<char>>::~basic_regex,
&minja::Parser::parseExpression(bool)::if_tok[abi:cxx11],
&_dso_handle);
__cxa_guard_release(&`guard variable for'minja::Parser::parseExpression(bool)::if_tok[abi:cxx11]);
}
minja::Parser::consumeToken(
(unsigned int)&v14,
(_DWORD)a2,
(unsigned int)&minja::Parser::parseExpression(bool)::if_tok[abi:cxx11],
1,
v4,
v5,
v10,
*((long long *)&v10 + 1));
v6 = v15;
if ( v14 != &v16 )
operator delete(v14, v16 + 1);
if ( v6 )
{
v11 = *a2;
v7 = (volatile signed __int32 *)a2[1];
v12 = v7;
if ( v7 )
{
if ( _libc_single_threaded )
++*((_DWORD *)v7 + 2);
else
_InterlockedIncrement(v7 + 2);
}
v13 = a2[4] - a2[2];
minja::Parser::parseIfExpression((minja::Parser *)&v14);
v9 = (_QWORD *)operator new(0x60uLL);
v9[1] = 0x100000001LL;
*v9 = &`vtable for'std::_Sp_counted_ptr_inplace<minja::IfExpr,std::allocator<minja::IfExpr>,(__gnu_cxx::_Lock_policy)2>
+ 2;
minja::IfExpr::IfExpr(v9 + 2, &v11, &v14, &v10, &v16);
*(_QWORD *)this = v9 + 2;
*((_QWORD *)this + 1) = v9;
if ( v17 )
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v17);
if ( v15 )
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v15);
if ( v12 )
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v12);
if ( *((_QWORD *)&v10 + 1) )
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(*((volatile signed __int32 **)&v10 + 1));
}
else
{
LABEL_10:
*(_OWORD *)this = v10;
}
return this;
}
|
parseExpression:
PUSH RBP
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
SUB RSP,0x50
MOV EBP,EDX
MOV R14,RSI
MOV RBX,RDI
MOV RDI,RSP
CALL 0x0018a69c
MOV RAX,qword ptr [R14 + 0x20]
CMP RAX,qword ptr [R14 + 0x18]
JZ 0x001893da
TEST BPL,BPL
JZ 0x001893da
LEA RAX,[0x232058]
MOV AL,byte ptr [RAX]
TEST AL,AL
JZ 0x001894a8
LAB_00189376:
LEA RDX,[0x232038]
LEA RDI,[RSP + 0x30]
MOV RSI,R14
MOV ECX,0x1
CALL 0x0018954e
LEA RAX,[RSP + 0x40]
MOV RDI,qword ptr [RAX + -0x10]
MOV R15,qword ptr [RAX + -0x8]
CMP RDI,RAX
JZ 0x001893ae
MOV RSI,qword ptr [RSP + 0x40]
INC RSI
CALL 0x0011b910
LAB_001893ae:
TEST R15,R15
JZ 0x001893da
MOV RAX,qword ptr [R14]
MOV qword ptr [RSP + 0x18],RAX
MOV RAX,qword ptr [R14 + 0x8]
MOV qword ptr [RSP + 0x20],RAX
TEST RAX,RAX
JZ 0x001893f5
MOV RCX,qword ptr [0x00230f80]
CMP byte ptr [RCX],0x0
JZ 0x001893f1
INC dword ptr [RAX + 0x8]
JMP 0x001893f5
LAB_001893da:
MOVAPS XMM0,xmmword ptr [RSP]
MOVUPS xmmword ptr [RBX],XMM0
LAB_001893e1:
MOV RAX,RBX
ADD RSP,0x50
POP RBX
POP R12
POP R14
POP R15
POP RBP
RET
LAB_001893f1:
INC.LOCK dword ptr [RAX + 0x8]
LAB_001893f5:
MOV RAX,qword ptr [R14 + 0x20]
SUB RAX,qword ptr [R14 + 0x10]
MOV qword ptr [RSP + 0x28],RAX
LAB_00189402:
LEA RDI,[RSP + 0x30]
MOV RSI,R14
CALL 0x0018a92a
LAB_0018940f:
MOV EDI,0x60
CALL 0x0011b8f0
MOV R14,RAX
LEA R8,[RSP + 0x40]
MOV RAX,0x100000001
MOV qword ptr [R14 + 0x8],RAX
LEA RAX,[0x22fa68]
ADD RAX,0x10
MOV qword ptr [R14],RAX
MOV R15,R14
ADD R15,0x10
LEA RSI,[RSP + 0x18]
LEA R12,[RSP + 0x30]
MOV RCX,RSP
MOV RDI,R15
MOV RDX,R12
CALL 0x0019d74e
MOV qword ptr [RBX],R15
MOV qword ptr [RBX + 0x8],R14
MOV RDI,qword ptr [R12 + 0x18]
TEST RDI,RDI
JZ 0x00189472
CALL 0x00133c02
LAB_00189472:
MOV RDI,qword ptr [RSP + 0x38]
TEST RDI,RDI
JZ 0x00189481
CALL 0x00133c02
LAB_00189481:
MOV RDI,qword ptr [RSP + 0x20]
TEST RDI,RDI
JZ 0x00189490
CALL 0x00133c02
LAB_00189490:
MOV RDI,qword ptr [RSP + 0x8]
TEST RDI,RDI
JZ 0x001893e1
CALL 0x00133c02
JMP 0x001893e1
LAB_001894a8:
LEA RDI,[0x232058]
CALL 0x0011c060
TEST EAX,EAX
JZ 0x00189376
LAB_001894bc:
LEA RDI,[0x232038]
LEA RSI,[0x1f4ae7]
MOV EDX,0x10
CALL 0x00126358
LAB_001894d4:
LEA RDI,[0x1263c0]
LEA RSI,[0x232038]
LEA RDX,[0x231918]
CALL 0x0011b7f0
LEA RDI,[0x232058]
CALL 0x0011b5c0
JMP 0x00189376
|
/* minja::Parser::parseExpression(bool) */
int8 * minja::Parser::parseExpression(bool param_1)
{
_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *p_Var1;
int iVar2;
int8 *puVar3;
char in_DL;
int8 *in_RSI;
int7 in_register_00000039;
int8 *puVar4;
int8 local_78;
_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *p_Stack_70;
int8 local_60;
_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *local_58;
long local_50;
long *local_48;
_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *local_40;
long local_38;
_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *local_30;
puVar4 = (int8 *)CONCAT71(in_register_00000039,param_1);
parseLogicalOr();
if ((in_RSI[4] != in_RSI[3]) && (in_DL != '\0')) {
if ((parseExpression(bool)::if_tok_abi_cxx11_ == '\0') &&
(iVar2 = __cxa_guard_acquire(&parseExpression(bool)::if_tok_abi_cxx11_), iVar2 != 0)) {
/* try { // try from 001894bc to 001894d3 has its CatchHandler @ 001894ff */
std::__cxx11::basic_regex<char,std::__cxx11::regex_traits<char>>::basic_regex
((basic_regex<char,std::__cxx11::regex_traits<char>> *)
parseExpression(bool)::if_tok_abi_cxx11_,&DAT_001f4ae7,0x10);
__cxa_atexit(std::__cxx11::basic_regex<char,std::__cxx11::regex_traits<char>>::~basic_regex,
parseExpression(bool)::if_tok_abi_cxx11_,&__dso_handle);
__cxa_guard_release(&parseExpression(bool)::if_tok_abi_cxx11_);
}
/* try { // try from 00189376 to 0018938e has its CatchHandler @ 00189533 */
consumeToken(&local_48);
p_Var1 = local_40;
if (local_48 != &local_38) {
operator_delete(local_48,local_38 + 1);
}
if (p_Var1 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) {
local_60 = *in_RSI;
local_58 = (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)in_RSI[1];
if (local_58 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) {
if (*PTR___libc_single_threaded_00230f80 == '\0') {
LOCK();
*(int *)(local_58 + 8) = *(int *)(local_58 + 8) + 1;
UNLOCK();
}
else {
*(int *)(local_58 + 8) = *(int *)(local_58 + 8) + 1;
}
}
local_50 = in_RSI[4] - in_RSI[2];
/* try { // try from 00189402 to 0018940e has its CatchHandler @ 0018951f */
parseIfExpression();
/* try { // try from 0018940f to 00189418 has its CatchHandler @ 00189510 */
puVar3 = (int8 *)operator_new(0x60);
puVar3[1] = 0x100000001;
*puVar3 = &PTR___Sp_counted_ptr_inplace_0022fa78;
IfExpr::IfExpr((IfExpr *)(puVar3 + 2),(Location *)&local_60,(shared_ptr *)&local_48,
(shared_ptr *)&local_78,(shared_ptr *)&local_38);
*puVar4 = (IfExpr *)(puVar3 + 2);
puVar4[1] = puVar3;
if (local_30 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) {
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(local_30);
}
if (local_40 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) {
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(local_40);
}
if (local_58 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) {
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(local_58);
}
if (p_Stack_70 == (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) {
return puVar4;
}
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(p_Stack_70);
return puVar4;
}
}
*puVar4 = local_78;
puVar4[1] = p_Stack_70;
return puVar4;
}
|
|
57,285
|
my_strnncollsp_simple_nopad
|
eloqsql/strings/ctype-simple.c
|
int my_strnncollsp_simple_nopad(CHARSET_INFO * cs,
const uchar *a, size_t a_length,
const uchar *b, size_t b_length)
{
return my_strnncoll_simple(cs, a, a_length, b, b_length, FALSE);
}
|
O3
|
c
|
my_strnncollsp_simple_nopad:
pushq %rbp
movq %rsp, %rbp
cmpq %r8, %rdx
movq %r8, %r9
cmovbq %rdx, %r9
movq 0x58(%rdi), %rdi
xorl %r10d, %r10d
cmpq %r10, %r9
je 0x41533
movzbl (%rsi,%r10), %eax
movzbl (%rdi,%rax), %eax
movzbl (%rcx,%r10), %r11d
movzbl (%rdi,%r11), %r11d
incq %r10
cmpb %r11b, %al
je 0x4150e
subl %r11d, %eax
jmp 0x41545
xorl %ecx, %ecx
cmpq %r8, %rdx
sbbl %ecx, %ecx
cmpq %r8, %rdx
movl $0x1, %eax
cmovbel %ecx, %eax
popq %rbp
retq
|
my_strnncollsp_simple_nopad:
push rbp
mov rbp, rsp
cmp rdx, r8
mov r9, r8
cmovb r9, rdx
mov rdi, [rdi+58h]
xor r10d, r10d
loc_4150E:
cmp r9, r10
jz short loc_41533
movzx eax, byte ptr [rsi+r10]
movzx eax, byte ptr [rdi+rax]
movzx r11d, byte ptr [rcx+r10]
movzx r11d, byte ptr [rdi+r11]
inc r10
cmp al, r11b
jz short loc_4150E
sub eax, r11d
jmp short loc_41545
loc_41533:
xor ecx, ecx
cmp rdx, r8
sbb ecx, ecx
cmp rdx, r8
mov eax, 1
cmovbe eax, ecx
loc_41545:
pop rbp
retn
|
long long my_strnncollsp_simple_nopad(
long long a1,
long long a2,
unsigned long long a3,
long long a4,
unsigned long long a5)
{
unsigned long long v5; // r9
long long v6; // rdi
long long v7; // r10
int v8; // eax
int v9; // r11d
long long result; // rax
v5 = a5;
if ( a3 < a5 )
v5 = a3;
v6 = *(_QWORD *)(a1 + 88);
v7 = 0LL;
while ( v5 != v7 )
{
v8 = *(unsigned __int8 *)(v6 + *(unsigned __int8 *)(a2 + v7));
v9 = *(unsigned __int8 *)(v6 + *(unsigned __int8 *)(a4 + v7++));
if ( (_BYTE)v8 != (_BYTE)v9 )
return (unsigned int)(v8 - v9);
}
result = 1LL;
if ( a3 <= a5 )
return (unsigned int)-(a3 < a5);
return result;
}
|
my_strnncollsp_simple_nopad:
PUSH RBP
MOV RBP,RSP
CMP RDX,R8
MOV R9,R8
CMOVC R9,RDX
MOV RDI,qword ptr [RDI + 0x58]
XOR R10D,R10D
LAB_0014150e:
CMP R9,R10
JZ 0x00141533
MOVZX EAX,byte ptr [RSI + R10*0x1]
MOVZX EAX,byte ptr [RDI + RAX*0x1]
MOVZX R11D,byte ptr [RCX + R10*0x1]
MOVZX R11D,byte ptr [RDI + R11*0x1]
INC R10
CMP AL,R11B
JZ 0x0014150e
SUB EAX,R11D
JMP 0x00141545
LAB_00141533:
XOR ECX,ECX
CMP RDX,R8
SBB ECX,ECX
CMP RDX,R8
MOV EAX,0x1
CMOVBE EAX,ECX
LAB_00141545:
POP RBP
RET
|
int my_strnncollsp_simple_nopad(long param_1,long param_2,ulong param_3,long param_4,ulong param_5)
{
byte bVar1;
byte bVar2;
ulong uVar3;
ulong uVar4;
uVar3 = param_5;
if (param_3 < param_5) {
uVar3 = param_3;
}
uVar4 = 0;
do {
if (uVar3 == uVar4) {
if (param_5 < param_3) {
return 1;
}
return -(uint)(param_3 < param_5);
}
bVar1 = *(byte *)(*(long *)(param_1 + 0x58) + (ulong)*(byte *)(param_2 + uVar4));
bVar2 = *(byte *)(*(long *)(param_1 + 0x58) + (ulong)*(byte *)(param_4 + uVar4));
uVar4 = uVar4 + 1;
} while (bVar1 == bVar2);
return (uint)bVar1 - (uint)bVar2;
}
|
|
57,286
|
aimrt::runtime::core::executor::TBBThreadExecutor::IsInCurrentExecutor() const
|
aimrt_mujoco_sim/_deps/aimrt-src/src/runtime/core/executor/tbb_thread_executor.cc
|
bool TBBThreadExecutor::IsInCurrentExecutor() const noexcept {
try {
auto finditr = std::find(thread_id_vec_.begin(), thread_id_vec_.end(), std::this_thread::get_id());
return (finditr != thread_id_vec_.end());
} catch (const std::exception& e) {
AIMRT_ERROR("{}", e.what());
}
return false;
}
|
O3
|
cpp
|
aimrt::runtime::core::executor::TBBThreadExecutor::IsInCurrentExecutor() const:
pushq %r15
pushq %r14
pushq %rbx
subq $0x40, %rsp
movq %rdi, %rbx
movq 0xc8(%rdi), %r14
movq 0xd0(%rdi), %r15
callq 0x84378
leaq 0x10(%rsp), %rdx
movq %rax, (%rdx)
movq %r14, %rdi
movq %r15, %rsi
callq 0xb416d
cmpq 0xd0(%rbx), %rax
setne %al
addq $0x40, %rsp
popq %rbx
popq %r14
popq %r15
retq
cmpl $0x2, %edx
jne 0xb35a4
movq %rax, %rdi
callq 0x80c90
movq 0x78(%rbx), %rbx
cmpq $0x0, 0x10(%rbx)
je 0xb359f
movq %rax, %r14
movq %rbx, %rdi
callq *0x18(%rbx)
cmpl $0x4, %eax
ja 0xb3593
movq (%r14), %rax
movq %r14, %rdi
callq *0x10(%rax)
leaq 0x30(%rsp), %r8
movq %rax, (%r8)
leaq 0x13dc51(%rip), %rsi # 0x1f1183
leaq 0x10(%rsp), %rdi
movl $0x2, %edx
movl $0xc, %ecx
callq 0x9b9c8
movq 0x10(%rsp), %r9
movq 0x18(%rsp), %rax
addq $0x20, %rbx
movq %rax, (%rsp)
leaq 0x13f061(%rip), %rcx # 0x1f25c0
leaq 0x13d445(%rip), %r8 # 0x1f09ab
movq %rbx, %rdi
movl $0x4, %esi
movl $0x8b, %edx
callq 0x83aa0
leaq 0x20(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xb3593
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x82190
callq 0x83710
xorl %eax, %eax
jmp 0xb34e2
callq 0x80b20
movq %rax, %rdi
callq 0x8b40b
|
_ZNK5aimrt7runtime4core8executor17TBBThreadExecutor19IsInCurrentExecutorEv:
push r15
push r14
push rbx
sub rsp, 40h
mov rbx, rdi
mov r14, [rdi+0C8h]
mov r15, [rdi+0D0h]
call pthread_self
lea rdx, [rsp+58h+var_48]
mov [rdx], rax
mov rdi, r14
mov rsi, r15
call _ZSt9__find_ifIN9__gnu_cxx17__normal_iteratorIPKNSt6thread2idESt6vectorIS3_SaIS3_EEEENS0_5__ops16_Iter_equals_valIS4_EEET_SD_SD_T0_St26random_access_iterator_tag; std::__find_if<__gnu_cxx::__normal_iterator<std::thread::id const*,std::vector<std::thread::id>>,__gnu_cxx::__ops::_Iter_equals_val<std::thread::id const>>(__gnu_cxx::__normal_iterator<std::thread::id const*,std::vector<std::thread::id>>,__gnu_cxx::__normal_iterator<std::thread::id const*,std::vector<std::thread::id>>,__gnu_cxx::__ops::_Iter_equals_val<std::thread::id const>,std::random_access_iterator_tag)
cmp rax, [rbx+0D0h]
setnz al
loc_B34E2:
add rsp, 40h
pop rbx
pop r14
pop r15
retn
cmp edx, 2
jnz loc_B35A4
mov rdi, rax; void *
call ___cxa_begin_catch
mov rbx, [rbx+78h]
cmp qword ptr [rbx+10h], 0
jz loc_B359F
mov r14, rax
mov rdi, rbx
call qword ptr [rbx+18h]
cmp eax, 4
ja short loc_B3593
mov rax, [r14]
mov rdi, r14
call qword ptr [rax+10h]
lea r8, [rsp+58h+var_28]; int
mov [r8], rax
lea rsi, aInitializeFail+13h; int
lea rdi, [rsp+58h+var_48]; int
mov edx, 2; int
mov ecx, 0Ch; int
call _ZN3fmt3v107vformatB5cxx11ENS0_17basic_string_viewIcEENS0_17basic_format_argsINS0_20basic_format_contextINS0_8appenderEcEEEE; fmt::v10::vformat(fmt::v10::basic_string_view<char>,fmt::v10::basic_format_args<fmt::v10::basic_format_context<fmt::v10::appender,char>>)
mov r9, qword ptr [rsp+58h+var_48]
mov rax, [rsp+58h+var_40]
add rbx, 20h ; ' '
mov [rsp+58h+var_58], rax
lea rcx, aWorkspaceLlm4b_4; "/workspace/llm4binary/github2025/aimrt_"...
lea r8, aIsincurrentexe; "IsInCurrentExecutor"
mov rdi, rbx
mov esi, 4
mov edx, 8Bh
call __ZNKSt8functionIFvjjPKcS1_S1_mEEclEjjS1_S1_S1_m; std::function<void ()(uint,uint,char const*,char const*,char const*,ulong)>::operator()(uint,uint,char const*,char const*,char const*,ulong)
lea rax, [rsp+58h+var_38]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_B3593
mov rsi, [rsp+58h+var_38]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_B3593:
call ___cxa_end_catch
xor eax, eax
jmp loc_B34E2
loc_B359F:
call __ZSt25__throw_bad_function_callv; std::__throw_bad_function_call(void)
loc_B35A4:
mov rdi, rax
call __clang_call_terminate
|
bool aimrt::runtime::core::executor::TBBThreadExecutor::IsInCurrentExecutor(
aimrt::runtime::core::executor::TBBThreadExecutor *this)
{
long long v1; // r14
long long v2; // r15
long long v4; // [rsp+10h] [rbp-48h]
v1 = *((_QWORD *)this + 25);
v2 = *((_QWORD *)this + 26);
v4 = pthread_self();
return std::__find_if<__gnu_cxx::__normal_iterator<std::thread::id const*,std::vector<std::thread::id>>,__gnu_cxx::__ops::_Iter_equals_val<std::thread::id const>>(
v1,
v2) != *((_QWORD *)this + 26);
}
|
IsInCurrentExecutor:
PUSH R15
PUSH R14
PUSH RBX
SUB RSP,0x40
MOV RBX,RDI
MOV R14,qword ptr [RDI + 0xc8]
MOV R15,qword ptr [RDI + 0xd0]
CALL 0x00184378
LEA RDX,[RSP + 0x10]
MOV qword ptr [RDX],RAX
LAB_001b34cd:
MOV RDI,R14
MOV RSI,R15
CALL 0x001b416d
LAB_001b34d8:
CMP RAX,qword ptr [RBX + 0xd0]
SETNZ AL
LAB_001b34e2:
ADD RSP,0x40
POP RBX
POP R14
POP R15
RET
|
/* aimrt::runtime::core::executor::TBBThreadExecutor::IsInCurrentExecutor() const */
bool __thiscall
aimrt::runtime::core::executor::TBBThreadExecutor::IsInCurrentExecutor(TBBThreadExecutor *this)
{
int8 uVar1;
int8 uVar2;
long lVar3;
uVar1 = *(int8 *)(this + 200);
uVar2 = *(int8 *)(this + 0xd0);
pthread_self();
/* try { // try from 001b34cd to 001b34d7 has its CatchHandler @ 001b34ec */
lVar3 = std::
__find_if<__gnu_cxx::__normal_iterator<std::thread::id_const*,std::vector<std::thread::id,std::allocator<std::thread::id>>>,__gnu_cxx::__ops::_Iter_equals_val<std::thread::id_const>>
(uVar1,uVar2);
return lVar3 != *(long *)(this + 0xd0);
}
|
|
57,287
|
Item_func_timestamp::fix_length_and_dec()
|
eloqsql/sql/item_timefunc.h
|
bool fix_length_and_dec() override
{
THD *thd= current_thd;
uint dec0= args[0]->datetime_precision(thd);
uint dec1= Interval_DDhhmmssff::fsp(thd, args[1]);
fix_attributes_datetime(MY_MAX(dec0, dec1));
set_maybe_null();
return false;
}
|
O0
|
c
|
Item_func_timestamp::fix_length_and_dec():
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x28(%rbp)
callq 0x88f160
movq %rax, %rcx
movq -0x28(%rbp), %rax
movq %rcx, -0x10(%rbp)
movq 0x70(%rax), %rax
movq (%rax), %rdi
movq -0x10(%rbp), %rsi
callq 0xc00eb0
movl %eax, %ecx
movq -0x28(%rbp), %rax
movl %ecx, -0x14(%rbp)
movq -0x10(%rbp), %rdi
movq 0x70(%rax), %rax
movq 0x8(%rax), %rsi
callq 0xbe2660
movl %eax, %ecx
movq -0x28(%rbp), %rax
movl %ecx, -0x18(%rbp)
addq $0x8, %rax
movq %rax, -0x20(%rbp)
movl -0x14(%rbp), %eax
cmpl -0x18(%rbp), %eax
jbe 0xc9477f
movl -0x14(%rbp), %eax
movl %eax, -0x2c(%rbp)
jmp 0xc94785
movl -0x18(%rbp), %eax
movl %eax, -0x2c(%rbp)
movq -0x20(%rbp), %rdi
movl -0x2c(%rbp), %eax
movzwl %ax, %esi
callq 0xc085f0
movq -0x28(%rbp), %rdi
callq 0x885060
xorl %eax, %eax
andb $0x1, %al
addq $0x30, %rsp
popq %rbp
retq
nopw (%rax,%rax)
|
_ZN19Item_func_timestamp18fix_length_and_decEv:
push rbp
mov rbp, rsp
sub rsp, 30h
mov [rbp+var_8], rdi
mov rax, [rbp+var_8]
mov [rbp+var_28], rax
call _current_thd
mov rcx, rax
mov rax, [rbp+var_28]
mov [rbp+var_10], rcx
mov rax, [rax+70h]
mov rdi, [rax]; this
mov rsi, [rbp+var_10]; THD *
call _ZN4Item18datetime_precisionEP3THD; Item::datetime_precision(THD *)
mov ecx, eax
mov rax, [rbp+var_28]
mov [rbp+var_14], ecx
mov rdi, [rbp+var_10]; this
mov rax, [rax+70h]
mov rsi, [rax+8]; THD *
call _ZN19Interval_DDhhmmssff3fspEP3THDP4Item; Interval_DDhhmmssff::fsp(THD *,Item *)
mov ecx, eax
mov rax, [rbp+var_28]
mov [rbp+var_18], ecx
add rax, 8
mov [rbp+var_20], rax
mov eax, [rbp+var_14]
cmp eax, [rbp+var_18]
jbe short loc_C9477F
mov eax, [rbp+var_14]
mov [rbp+var_2C], eax
jmp short loc_C94785
loc_C9477F:
mov eax, [rbp+var_18]
mov [rbp+var_2C], eax
loc_C94785:
mov rdi, [rbp+var_20]; this
mov eax, [rbp+var_2C]
movzx esi, ax; unsigned __int16
call _ZN19Type_std_attributes23fix_attributes_datetimeEt; Type_std_attributes::fix_attributes_datetime(ushort)
mov rdi, [rbp+var_28]; this
call _ZN4Item14set_maybe_nullEv; Item::set_maybe_null(void)
xor eax, eax
and al, 1
add rsp, 30h
pop rbp
retn
|
long long Item_func_timestamp::fix_length_and_dec(Item ***this)
{
Item *v1; // rdx
Type_std_attributes *v3; // [rsp+10h] [rbp-20h]
unsigned int v4; // [rsp+18h] [rbp-18h]
unsigned int v5; // [rsp+1Ch] [rbp-14h]
THD *v6; // [rsp+20h] [rbp-10h]
v6 = (THD *)current_thd();
v5 = Item::datetime_precision(*this[14], v6);
v4 = Interval_DDhhmmssff::fsp(v6, this[14][1], v1);
v3 = (Type_std_attributes *)(this + 1);
if ( v5 <= v4 )
Type_std_attributes::fix_attributes_datetime(v3, v4);
else
Type_std_attributes::fix_attributes_datetime(v3, v5);
Item::set_maybe_null((Item *)this);
return 0LL;
}
|
delete_explain_query:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x10
MOV qword ptr [RBP + -0x8],RDI
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX + 0xd60]
MOV qword ptr [RBP + -0x10],RAX
CMP RAX,0x0
JZ 0x00c94748
MOV RDI,qword ptr [RBP + -0x10]
CALL 0x00c8a810
MOV RDI,qword ptr [RBP + -0x10]
MOV ESI,0x80
CALL 0x009a3ab0
LAB_00c94748:
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RAX + 0xd60],0x0
JMP 0x00c94759
LAB_00c94759:
ADD RSP,0x10
POP RBP
RET
|
/* delete_explain_query(LEX*) */
void delete_explain_query(LEX *param_1)
{
Explain_query *this;
this = *(Explain_query **)(param_1 + 0xd60);
if (this != (Explain_query *)0x0) {
Explain_query::~Explain_query(this);
Sql_alloc::operator_delete(this,0x80);
}
*(int8 *)(param_1 + 0xd60) = 0;
return;
}
|
|
57,288
|
fts_cache_find_word(fts_index_cache_t const*, fts_string_t const*)
|
eloqsql/storage/innobase/fts/fts0fts.cc
|
const ib_vector_t*
fts_cache_find_word(
/*================*/
const fts_index_cache_t*index_cache, /*!< in: cache to search */
const fts_string_t* text) /*!< in: word to search for */
{
ib_rbt_bound_t parent;
const ib_vector_t* nodes = NULL;
mysql_mutex_assert_owner(&index_cache->index->table->fts->cache->lock);
/* Lookup the word in the rb tree */
if (rbt_search(index_cache->words, &parent, text) == 0) {
const fts_tokenizer_word_t* word;
word = rbt_value(fts_tokenizer_word_t, parent.last);
nodes = word->nodes;
}
return(nodes);
}
|
O0
|
cpp
|
fts_cache_find_word(fts_index_cache_t const*, fts_string_t const*):
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq $0x0, -0x28(%rbp)
jmp 0x108b41a
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rdi
movq -0x10(%rbp), %rdx
leaq -0x20(%rbp), %rsi
callq 0x122a020
cmpl $0x0, %eax
jne 0x108b44c
movq -0x20(%rbp), %rax
addq $0x20, %rax
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rax
movq 0x18(%rax), %rax
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
|
_Z19fts_cache_find_wordPK17fts_index_cache_tPK12fts_string_t:
push rbp
mov rbp, rsp
sub rsp, 30h
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov [rbp+var_28], 0
jmp short $+2
loc_108B41A:
mov rax, [rbp+var_8]
mov rdi, [rax+8]
mov rdx, [rbp+var_10]
lea rsi, [rbp+var_20]
call _Z10rbt_searchPK8ib_rbt_tP14ib_rbt_bound_tPKv; rbt_search(ib_rbt_t const*,ib_rbt_bound_t *,void const*)
cmp eax, 0
jnz short loc_108B44C
mov rax, [rbp+var_20]
add rax, 20h ; ' '
mov [rbp+var_30], rax
mov rax, [rbp+var_30]
mov rax, [rax+18h]
mov [rbp+var_28], rax
loc_108B44C:
mov rax, [rbp+var_28]
add rsp, 30h
pop rbp
retn
|
long long fts_cache_find_word(long long a1, long long a2)
{
long long v3; // [rsp+8h] [rbp-28h]
_QWORD v4[4]; // [rsp+10h] [rbp-20h] BYREF
v4[3] = a1;
v4[2] = a2;
v3 = 0LL;
if ( !(unsigned int)rbt_search(*(_QWORD *)(a1 + 8), v4, a2) )
return *(_QWORD *)(v4[0] + 56LL);
return v3;
}
|
~table_esgs_by_account_by_event_name:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x10
MOV qword ptr [RBP + -0x8],RDI
MOV RDI,qword ptr [RBP + -0x8]
CALL 0x01068170
ADD RSP,0x10
POP RBP
RET
|
/* table_esgs_by_account_by_event_name::~table_esgs_by_account_by_event_name() */
void __thiscall
table_esgs_by_account_by_event_name::~table_esgs_by_account_by_event_name
(table_esgs_by_account_by_event_name *this)
{
PFS_engine_table::~PFS_engine_table((PFS_engine_table *)this);
return;
}
|
|
57,289
|
ast_create_function_def
|
tsotchke[P]eshkol/src/frontend/ast/create/ast_create.c
|
AstNode* ast_create_function_def(Arena* arena, AstNode* name, Parameter** params, AstNode** param_nodes, size_t param_count, Type* return_type, AstNode* body, size_t line, size_t column) {
AstNode* node = ast_create_node(arena, AST_FUNCTION_DEF, line, column);
if (!node) {
return NULL;
}
node->as.function_def.name = name;
node->as.function_def.params = params;
node->as.function_def.param_nodes = param_nodes;
node->as.function_def.param_count = param_count;
node->as.function_def.return_type = return_type;
node->as.function_def.body = body;
return node;
}
|
O3
|
c
|
ast_create_function_def:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %r9, %rbx
movq %r8, %r14
movq %rcx, %r15
movq %rdx, %r12
movq %rsi, %r13
movq 0x38(%rsp), %rdx
movq 0x40(%rsp), %rcx
movl $0x1b, %esi
callq 0xa65c
testq %rax, %rax
je 0xabe3
movq 0x30(%rsp), %rcx
movq %r13, 0x48(%rax)
movq %r12, 0x50(%rax)
movq %r15, 0x58(%rax)
movq %r14, 0x60(%rax)
movq %rbx, 0x68(%rax)
movq %rcx, 0x70(%rax)
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
|
ast_create_function_def:
push r15
push r14
push r13
push r12
push rbx
mov rbx, r9
mov r14, r8
mov r15, rcx
mov r12, rdx
mov r13, rsi
mov rdx, [rsp+28h+arg_8]
mov rcx, [rsp+28h+arg_10]
mov esi, 1Bh
call ast_create_node
test rax, rax
jz short loc_ABE3
mov rcx, [rsp+28h+arg_0]
mov [rax+48h], r13
mov [rax+50h], r12
mov [rax+58h], r15
mov [rax+60h], r14
mov [rax+68h], rbx
mov [rax+70h], rcx
loc_ABE3:
pop rbx
pop r12
pop r13
pop r14
pop r15
retn
|
_QWORD * ast_create_function_def(
long long a1,
long long a2,
long long a3,
long long a4,
long long a5,
long long a6,
long long a7,
long long a8,
long long a9)
{
_QWORD *result; // rax
result = (_QWORD *)ast_create_node(a1, 27, a8, a9);
if ( result )
{
result[9] = a2;
result[10] = a3;
result[11] = a4;
result[12] = a5;
result[13] = a6;
result[14] = a7;
}
return result;
}
|
ast_create_function_def:
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
MOV RBX,R9
MOV R14,R8
MOV R15,RCX
MOV R12,RDX
MOV R13,RSI
MOV RDX,qword ptr [RSP + 0x38]
MOV RCX,qword ptr [RSP + 0x40]
MOV ESI,0x1b
CALL 0x0010a65c
TEST RAX,RAX
JZ 0x0010abe3
MOV RCX,qword ptr [RSP + 0x30]
MOV qword ptr [RAX + 0x48],R13
MOV qword ptr [RAX + 0x50],R12
MOV qword ptr [RAX + 0x58],R15
MOV qword ptr [RAX + 0x60],R14
MOV qword ptr [RAX + 0x68],RBX
MOV qword ptr [RAX + 0x70],RCX
LAB_0010abe3:
POP RBX
POP R12
POP R13
POP R14
POP R15
RET
|
void ast_create_function_def
(int8 param_1,int8 param_2,int8 param_3,int8 param_4,
int8 param_5,int8 param_6,int8 param_7,int8 param_8,
int8 param_9)
{
long lVar1;
lVar1 = ast_create_node(param_1,0x1b,param_8,param_9);
if (lVar1 != 0) {
*(int8 *)(lVar1 + 0x48) = param_2;
*(int8 *)(lVar1 + 0x50) = param_3;
*(int8 *)(lVar1 + 0x58) = param_4;
*(int8 *)(lVar1 + 0x60) = param_5;
*(int8 *)(lVar1 + 0x68) = param_6;
*(int8 *)(lVar1 + 0x70) = param_7;
}
return;
}
|
|
57,290
|
mi_search_next
|
eloqsql/storage/myisam/mi_search.c
|
int _mi_search_next(register MI_INFO *info, register MI_KEYDEF *keyinfo,
uchar *key, uint key_length, uint nextflag, my_off_t pos)
{
int error;
uint nod_flag;
uchar lastkey[HA_MAX_KEY_BUFF];
DBUG_ENTER("_mi_search_next");
DBUG_PRINT("enter",("nextflag: %u lastpos: %llu int_keypos: %p",
nextflag, info->lastpos,
info->int_keypos));
DBUG_EXECUTE("key",_mi_print_key(DBUG_FILE,keyinfo->seg,key,key_length););
/* Force full read if we are at last key or if we are not on a leaf
and the key tree has changed since we used it last time
Note that even if the key tree has changed since last read, we can use
the last read data from the leaf if we haven't used the buffer for
something else.
*/
if (((nextflag & SEARCH_BIGGER) && info->int_keypos >= info->int_maxpos) ||
info->page_changed ||
(info->int_keytree_version != keyinfo->version &&
(info->int_nod_flag || info->buff_used)))
DBUG_RETURN(_mi_search(info,keyinfo,key, USE_WHOLE_KEY,
nextflag | SEARCH_SAVE_BUFF, pos));
if (info->buff_used)
{
if (!_mi_fetch_keypage(info,keyinfo,info->last_search_keypage,
DFLT_INIT_HITS,info->buff,0))
DBUG_RETURN(-1);
info->buff_used=0;
}
/* Last used buffer is in info->buff */
nod_flag=mi_test_if_nod(info->buff);
if (nextflag & SEARCH_BIGGER) /* Next key */
{
my_off_t tmp_pos=_mi_kpos(nod_flag,info->int_keypos);
if (tmp_pos != HA_OFFSET_ERROR)
{
if ((error=_mi_search(info,keyinfo,key, USE_WHOLE_KEY,
nextflag | SEARCH_SAVE_BUFF, tmp_pos)) <=0)
DBUG_RETURN(error);
}
memcpy(lastkey,key,key_length);
if (!(info->lastkey_length=(*keyinfo->get_key)(keyinfo,nod_flag,
&info->int_keypos,lastkey)))
DBUG_RETURN(-1);
}
else /* Previous key */
{
uint length;
/* Find start of previous key */
info->int_keypos=_mi_get_last_key(info,keyinfo,info->buff,lastkey,
info->int_keypos, &length);
if (!info->int_keypos)
DBUG_RETURN(-1);
if (info->int_keypos == info->buff+2)
DBUG_RETURN(_mi_search(info,keyinfo,key, USE_WHOLE_KEY,
nextflag | SEARCH_SAVE_BUFF, pos));
if ((error=_mi_search(info,keyinfo,key, USE_WHOLE_KEY,
nextflag | SEARCH_SAVE_BUFF,
_mi_kpos(nod_flag,info->int_keypos))) <= 0)
DBUG_RETURN(error);
/* QQ: We should be able to optimize away the following call */
if (! _mi_get_last_key(info,keyinfo,info->buff,lastkey,
info->int_keypos,&info->lastkey_length))
DBUG_RETURN(-1);
}
memcpy(info->lastkey,lastkey,info->lastkey_length);
info->lastpos=_mi_dpos(info,0,info->lastkey+info->lastkey_length);
DBUG_PRINT("exit",("found key at %lu",(ulong) info->lastpos));
DBUG_RETURN(0);
}
|
O3
|
c
|
mi_search_next:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x4d8, %rsp # imm = 0x4D8
movq %r9, %r13
movl %r8d, %r12d
movq %rdx, %r15
movq %rsi, %r14
movq %rdi, %rbx
movq %fs:0x28, %rax
movq %rax, -0x30(%rbp)
testb $0x8, %r12b
je 0x8cb8f
movq 0x128(%rbx), %rax
cmpq 0x130(%rbx), %rax
jae 0x8cb98
cmpb $0x0, 0x33c(%rbx)
je 0x8cbd9
movq %fs:0x28, %rax
cmpq -0x30(%rbp), %rax
jne 0x8ce15
orl $0x20, %r12d
movq %rbx, %rdi
movq %r14, %rsi
movq %r15, %rdx
movl $0x970, %ecx # imm = 0x970
movl %r12d, %r8d
movq %r13, %r9
addq $0x4d8, %rsp # imm = 0x4D8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x8aecb
movl 0x13c(%rbx), %eax
cmpl 0x1c(%r14), %eax
jne 0x8cc2d
cmpb $0x0, 0x33d(%rbx)
je 0x8cc47
movl %ecx, -0x4f4(%rbp)
movq 0x100(%rbx), %r8
movq 0x198(%rbx), %rdx
movq %rbx, %rdi
movq %r14, %rsi
movl $0x3, %ecx
xorl %r9d, %r9d
callq 0x8aad0
testq %rax, %rax
je 0x8cdcd
movb $0x0, 0x33d(%rbx)
movl -0x4f4(%rbp), %ecx
jmp 0x8cc47
cmpl $0x0, 0x138(%rbx)
jne 0x8cb98
cmpb $0x0, 0x33d(%rbx)
jne 0x8cb98
movq 0x100(%rbx), %rdx
xorl %edi, %edi
cmpb $0x0, (%rdx)
jns 0x8cc5e
movq (%rbx), %rax
movl 0x17c(%rax), %edi
testb $0x8, %r12b
movl %edi, -0x4f4(%rbp)
jne 0x8cd1d
movq 0x128(%rbx), %r8
leaq -0x4f0(%rbp), %rcx
leaq -0x4f8(%rbp), %r9
movq %rbx, %rdi
movq %r14, %rsi
callq 0x8c93a
movq %rax, 0x128(%rbx)
testq %rax, %rax
je 0x8cdcd
movq 0x100(%rbx), %rcx
addq $0x2, %rcx
orl $0x20, %r12d
cmpq %rcx, %rax
je 0x8cdd5
movl -0x4f4(%rbp), %edi
movq %rax, %rsi
callq 0x8b44a
movq %rbx, %rdi
movq %r14, %rsi
movq %r15, %rdx
movl $0x970, %ecx # imm = 0x970
movl %r12d, %r8d
movq %rax, %r9
callq 0x8aecb
testl %eax, %eax
jle 0x8cdee
movq 0x100(%rbx), %rdx
movq 0x128(%rbx), %r8
leaq 0x1d8(%rbx), %r15
leaq -0x4f0(%rbp), %rcx
movq %rbx, %rdi
movq %r14, %rsi
movq %r15, %r9
callq 0x8c93a
testq %rax, %rax
je 0x8cdcd
movl (%r15), %eax
jmp 0x8cd95
movl %ecx, %r13d
movq 0x128(%rbx), %rsi
callq 0x8b44a
cmpq $-0x1, %rax
je 0x8cd57
orl $0x20, %r12d
movq %rbx, %rdi
movq %r14, %rsi
movq %r15, %rdx
movl $0x970, %ecx # imm = 0x970
movl %r12d, %r8d
movq %rax, %r9
callq 0x8aecb
testl %eax, %eax
jle 0x8cdee
leaq 0x128(%rbx), %r12
movl %r13d, %edx
leaq -0x4f0(%rbp), %r13
movl $0x4b8, %ecx # imm = 0x4B8
movq %r13, %rdi
movq %r15, %rsi
callq 0x2a420
movq %r14, %rdi
movl -0x4f4(%rbp), %esi
movq %r12, %rdx
movq %r13, %rcx
callq *0x48(%r14)
movl %eax, 0x1d8(%rbx)
testl %eax, %eax
je 0x8cdcd
movq 0x108(%rbx), %rdi
movl %eax, %edx
leaq -0x4f0(%rbp), %rsi
callq 0x2a0a0
movl 0x1d8(%rbx), %edx
addq 0x108(%rbx), %rdx
xorl %r12d, %r12d
movq %rbx, %rdi
xorl %esi, %esi
callq 0x8b529
movq %rax, 0x170(%rbx)
jmp 0x8cdf1
movl $0xffffffff, %r12d # imm = 0xFFFFFFFF
jmp 0x8cdf1
movq %rbx, %rdi
movq %r14, %rsi
movq %r15, %rdx
movl $0x970, %ecx # imm = 0x970
movl %r12d, %r8d
movq %r13, %r9
callq 0x8aecb
movl %eax, %r12d
movq %fs:0x28, %rax
cmpq -0x30(%rbp), %rax
jne 0x8ce15
movl %r12d, %eax
addq $0x4d8, %rsp # imm = 0x4D8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0x2a250
|
_mi_search_next:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 4D8h
mov r13, r9
mov r12d, r8d
mov r15, rdx
mov r14, rsi
mov rbx, rdi
mov rax, fs:28h
mov [rbp+var_30], rax
test r12b, 8
jz short loc_8CB8F
mov rax, [rbx+128h]
cmp rax, [rbx+130h]
jnb short loc_8CB98
loc_8CB8F:
cmp byte ptr [rbx+33Ch], 0
jz short loc_8CBD9
loc_8CB98:
mov rax, fs:28h
cmp rax, [rbp+var_30]
jnz loc_8CE15
or r12d, 20h
mov rdi, rbx
mov rsi, r14
mov rdx, r15
mov ecx, 970h
mov r8d, r12d
mov r9, r13
add rsp, 4D8h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
jmp _mi_search
loc_8CBD9:
mov eax, [rbx+13Ch]
cmp eax, [r14+1Ch]
jnz short loc_8CC2D
cmp byte ptr [rbx+33Dh], 0
jz short loc_8CC47
mov [rbp+var_4F4], ecx
mov r8, [rbx+100h]
mov rdx, [rbx+198h]
mov rdi, rbx
mov rsi, r14
mov ecx, 3
xor r9d, r9d
call _mi_fetch_keypage
test rax, rax
jz loc_8CDCD
mov byte ptr [rbx+33Dh], 0
mov ecx, [rbp+var_4F4]
jmp short loc_8CC47
loc_8CC2D:
cmp dword ptr [rbx+138h], 0
jnz loc_8CB98
cmp byte ptr [rbx+33Dh], 0
jnz loc_8CB98
loc_8CC47:
mov rdx, [rbx+100h]
xor edi, edi
cmp byte ptr [rdx], 0
jns short loc_8CC5E
mov rax, [rbx]
mov edi, [rax+17Ch]
loc_8CC5E:
test r12b, 8
mov [rbp+var_4F4], edi
jnz loc_8CD1D
mov r8, [rbx+128h]
lea rcx, [rbp+var_4F0]
lea r9, [rbp+var_4F8]
mov rdi, rbx
mov rsi, r14
call _mi_get_last_key
mov [rbx+128h], rax
test rax, rax
jz loc_8CDCD
mov rcx, [rbx+100h]
add rcx, 2
or r12d, 20h
cmp rax, rcx
jz loc_8CDD5
mov edi, [rbp+var_4F4]
mov rsi, rax
call _mi_kpos
mov rdi, rbx
mov rsi, r14
mov rdx, r15
mov ecx, 970h
mov r8d, r12d
mov r9, rax
call _mi_search
test eax, eax
jle loc_8CDEE
mov rdx, [rbx+100h]
mov r8, [rbx+128h]
lea r15, [rbx+1D8h]
lea rcx, [rbp+var_4F0]
mov rdi, rbx
mov rsi, r14
mov r9, r15
call _mi_get_last_key
test rax, rax
jz loc_8CDCD
mov eax, [r15]
jmp short loc_8CD95
loc_8CD1D:
mov r13d, ecx
mov rsi, [rbx+128h]
call _mi_kpos
cmp rax, 0FFFFFFFFFFFFFFFFh
jz short loc_8CD57
or r12d, 20h
mov rdi, rbx
mov rsi, r14
mov rdx, r15
mov ecx, 970h
mov r8d, r12d
mov r9, rax
call _mi_search
test eax, eax
jle loc_8CDEE
loc_8CD57:
lea r12, [rbx+128h]
mov edx, r13d
lea r13, [rbp+var_4F0]
mov ecx, 4B8h
mov rdi, r13
mov rsi, r15
call ___memcpy_chk
mov rdi, r14
mov esi, [rbp+var_4F4]
mov rdx, r12
mov rcx, r13
call qword ptr [r14+48h]
mov [rbx+1D8h], eax
test eax, eax
jz short loc_8CDCD
loc_8CD95:
mov rdi, [rbx+108h]
mov edx, eax
lea rsi, [rbp+var_4F0]
call _memcpy
mov edx, [rbx+1D8h]
add rdx, [rbx+108h]
xor r12d, r12d
mov rdi, rbx
xor esi, esi
call _mi_dpos
mov [rbx+170h], rax
jmp short loc_8CDF1
loc_8CDCD:
mov r12d, 0FFFFFFFFh
jmp short loc_8CDF1
loc_8CDD5:
mov rdi, rbx
mov rsi, r14
mov rdx, r15
mov ecx, 970h
mov r8d, r12d
mov r9, r13
call _mi_search
loc_8CDEE:
mov r12d, eax
loc_8CDF1:
mov rax, fs:28h
cmp rax, [rbp+var_30]
jnz short loc_8CE15
mov eax, r12d
add rsp, 4D8h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_8CE15:
call ___stack_chk_fail
|
long long mi_search_next(long long a1, long long a2, long long a3, unsigned int a4, int a5, long long a6)
{
char *v11; // rdx
unsigned int v12; // edi
char *last_key; // rax
unsigned int v14; // r12d
unsigned long long v15; // rax
int v16; // eax
unsigned int v17; // eax
unsigned int v18; // r13d
unsigned long long v19; // rax
unsigned int v20; // r12d
int v21; // [rsp+8h] [rbp-4F8h] BYREF
unsigned int v22; // [rsp+Ch] [rbp-4F4h]
_BYTE v23[1216]; // [rsp+10h] [rbp-4F0h] BYREF
unsigned long long v24; // [rsp+4D0h] [rbp-30h]
v24 = __readfsqword(0x28u);
if ( (a5 & 8) != 0 && *(_QWORD *)(a1 + 296) >= *(_QWORD *)(a1 + 304) || *(_BYTE *)(a1 + 828) )
return mi_search(a1, a2, a3, 0x970u, a5 | 0x20u, a6);
if ( *(_DWORD *)(a1 + 316) == *(_DWORD *)(a2 + 28) )
{
if ( *(_BYTE *)(a1 + 829) )
{
v22 = a4;
if ( !mi_fetch_keypage((_QWORD *)a1, a2, *(_QWORD *)(a1 + 408)) )
return (unsigned int)-1;
*(_BYTE *)(a1 + 829) = 0;
a4 = v22;
}
}
else if ( *(_DWORD *)(a1 + 312) || *(_BYTE *)(a1 + 829) )
{
return mi_search(a1, a2, a3, 0x970u, a5 | 0x20u, a6);
}
v11 = *(char **)(a1 + 256);
v12 = 0;
if ( *v11 < 0 )
v12 = *(_DWORD *)(*(_QWORD *)a1 + 380LL);
v22 = v12;
if ( (a5 & 8) != 0 )
{
v18 = a4;
v19 = mi_kpos(v12, *(_QWORD *)(a1 + 296));
if ( v19 != -1LL )
{
v16 = mi_search(a1, a2, a3, 0x970u, a5 | 0x20u, v19);
if ( v16 <= 0 )
return (unsigned int)v16;
}
__memcpy_chk(v23, a3, v18, 1208LL);
v17 = (*(long long ( **)(long long, _QWORD, long long, _BYTE *))(a2 + 72))(a2, v22, a1 + 296, v23);
*(_DWORD *)(a1 + 472) = v17;
if ( v17 )
goto LABEL_22;
return (unsigned int)-1;
}
last_key = mi_get_last_key(a1, a2, v11, v23, *(_QWORD *)(a1 + 296), &v21);
*(_QWORD *)(a1 + 296) = last_key;
if ( !last_key )
return (unsigned int)-1;
v14 = a5 | 0x20;
if ( last_key == (char *)(*(_QWORD *)(a1 + 256) + 2LL) )
return (unsigned int)mi_search(a1, a2, a3, 0x970u, v14, a6);
v15 = mi_kpos(v22, (long long)last_key);
v16 = mi_search(a1, a2, a3, 0x970u, v14, v15);
if ( v16 <= 0 )
return (unsigned int)v16;
if ( !mi_get_last_key(a1, a2, *(char **)(a1 + 256), v23, *(_QWORD *)(a1 + 296), (_DWORD *)(a1 + 472)) )
return (unsigned int)-1;
v17 = *(_DWORD *)(a1 + 472);
LABEL_22:
memcpy(*(_QWORD *)(a1 + 264), v23, v17);
v20 = 0;
*(_QWORD *)(a1 + 368) = mi_dpos((long long *)a1, 0, *(_QWORD *)(a1 + 264) + *(unsigned int *)(a1 + 472));
return v20;
}
|
_mi_search_next:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x4d8
MOV R13,R9
MOV R12D,R8D
MOV R15,RDX
MOV R14,RSI
MOV RBX,RDI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x30],RAX
TEST R12B,0x8
JZ 0x0018cb8f
MOV RAX,qword ptr [RBX + 0x128]
CMP RAX,qword ptr [RBX + 0x130]
JNC 0x0018cb98
LAB_0018cb8f:
CMP byte ptr [RBX + 0x33c],0x0
JZ 0x0018cbd9
LAB_0018cb98:
MOV RAX,qword ptr FS:[0x28]
CMP RAX,qword ptr [RBP + -0x30]
JNZ 0x0018ce15
OR R12D,0x20
MOV RDI,RBX
MOV RSI,R14
MOV RDX,R15
MOV ECX,0x970
MOV R8D,R12D
MOV R9,R13
ADD RSP,0x4d8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
JMP 0x0018aecb
LAB_0018cbd9:
MOV EAX,dword ptr [RBX + 0x13c]
CMP EAX,dword ptr [R14 + 0x1c]
JNZ 0x0018cc2d
CMP byte ptr [RBX + 0x33d],0x0
JZ 0x0018cc47
MOV dword ptr [RBP + -0x4f4],ECX
MOV R8,qword ptr [RBX + 0x100]
MOV RDX,qword ptr [RBX + 0x198]
MOV RDI,RBX
MOV RSI,R14
MOV ECX,0x3
XOR R9D,R9D
CALL 0x0018aad0
TEST RAX,RAX
JZ 0x0018cdcd
MOV byte ptr [RBX + 0x33d],0x0
MOV ECX,dword ptr [RBP + -0x4f4]
JMP 0x0018cc47
LAB_0018cc2d:
CMP dword ptr [RBX + 0x138],0x0
JNZ 0x0018cb98
CMP byte ptr [RBX + 0x33d],0x0
JNZ 0x0018cb98
LAB_0018cc47:
MOV RDX,qword ptr [RBX + 0x100]
XOR EDI,EDI
CMP byte ptr [RDX],0x0
JNS 0x0018cc5e
MOV RAX,qword ptr [RBX]
MOV EDI,dword ptr [RAX + 0x17c]
LAB_0018cc5e:
TEST R12B,0x8
MOV dword ptr [RBP + -0x4f4],EDI
JNZ 0x0018cd1d
MOV R8,qword ptr [RBX + 0x128]
LEA RCX,[RBP + -0x4f0]
LEA R9,[RBP + -0x4f8]
MOV RDI,RBX
MOV RSI,R14
CALL 0x0018c93a
MOV qword ptr [RBX + 0x128],RAX
TEST RAX,RAX
JZ 0x0018cdcd
MOV RCX,qword ptr [RBX + 0x100]
ADD RCX,0x2
OR R12D,0x20
CMP RAX,RCX
JZ 0x0018cdd5
MOV EDI,dword ptr [RBP + -0x4f4]
MOV RSI,RAX
CALL 0x0018b44a
MOV RDI,RBX
MOV RSI,R14
MOV RDX,R15
MOV ECX,0x970
MOV R8D,R12D
MOV R9,RAX
CALL 0x0018aecb
TEST EAX,EAX
JLE 0x0018cdee
MOV RDX,qword ptr [RBX + 0x100]
MOV R8,qword ptr [RBX + 0x128]
LEA R15,[RBX + 0x1d8]
LEA RCX,[RBP + -0x4f0]
MOV RDI,RBX
MOV RSI,R14
MOV R9,R15
CALL 0x0018c93a
TEST RAX,RAX
JZ 0x0018cdcd
MOV EAX,dword ptr [R15]
JMP 0x0018cd95
LAB_0018cd1d:
MOV R13D,ECX
MOV RSI,qword ptr [RBX + 0x128]
CALL 0x0018b44a
CMP RAX,-0x1
JZ 0x0018cd57
OR R12D,0x20
MOV RDI,RBX
MOV RSI,R14
MOV RDX,R15
MOV ECX,0x970
MOV R8D,R12D
MOV R9,RAX
CALL 0x0018aecb
TEST EAX,EAX
JLE 0x0018cdee
LAB_0018cd57:
LEA R12,[RBX + 0x128]
MOV EDX,R13D
LEA R13,[RBP + -0x4f0]
MOV ECX,0x4b8
MOV RDI,R13
MOV RSI,R15
CALL 0x0012a420
MOV RDI,R14
MOV ESI,dword ptr [RBP + -0x4f4]
MOV RDX,R12
MOV RCX,R13
CALL qword ptr [R14 + 0x48]
MOV dword ptr [RBX + 0x1d8],EAX
TEST EAX,EAX
JZ 0x0018cdcd
LAB_0018cd95:
MOV RDI,qword ptr [RBX + 0x108]
MOV EDX,EAX
LEA RSI,[RBP + -0x4f0]
CALL 0x0012a0a0
MOV EDX,dword ptr [RBX + 0x1d8]
ADD RDX,qword ptr [RBX + 0x108]
XOR R12D,R12D
MOV RDI,RBX
XOR ESI,ESI
CALL 0x0018b529
MOV qword ptr [RBX + 0x170],RAX
JMP 0x0018cdf1
LAB_0018cdcd:
MOV R12D,0xffffffff
JMP 0x0018cdf1
LAB_0018cdd5:
MOV RDI,RBX
MOV RSI,R14
MOV RDX,R15
MOV ECX,0x970
MOV R8D,R12D
MOV R9,R13
CALL 0x0018aecb
LAB_0018cdee:
MOV R12D,EAX
LAB_0018cdf1:
MOV RAX,qword ptr FS:[0x28]
CMP RAX,qword ptr [RBP + -0x30]
JNZ 0x0018ce15
MOV EAX,R12D
ADD RSP,0x4d8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_0018ce15:
CALL 0x0012a250
|
ulong _mi_search_next(long *param_1,long param_2,int8 param_3,int4 param_4,uint param_5,
int8 param_6)
{
uint uVar1;
ulong uVar2;
long lVar3;
int8 uVar4;
long in_FS_OFFSET;
int1 local_500 [4];
int4 local_4fc;
int1 local_4f8 [1216];
long local_38;
local_38 = *(long *)(in_FS_OFFSET + 0x28);
if ((((param_5 & 8) == 0) || ((ulong)param_1[0x25] < (ulong)param_1[0x26])) &&
(*(char *)((long)param_1 + 0x33c) == '\0')) {
if (*(int *)((long)param_1 + 0x13c) == *(int *)(param_2 + 0x1c)) {
if (*(char *)((long)param_1 + 0x33d) == '\0') {
LAB_0018cc47:
local_4fc = 0;
if (*(char *)param_1[0x20] < '\0') {
local_4fc = *(int4 *)(*param_1 + 0x17c);
}
if ((param_5 & 8) == 0) {
lVar3 = _mi_get_last_key(param_1,param_2,(char *)param_1[0x20],local_4f8,param_1[0x25],
local_500);
param_1[0x25] = lVar3;
if (lVar3 == 0) goto LAB_0018cdcd;
if (lVar3 == param_1[0x20] + 2) {
uVar1 = _mi_search(param_1,param_2,param_3,0x970,param_5 | 0x20,param_6);
}
else {
uVar4 = _mi_kpos(local_4fc,lVar3);
uVar1 = _mi_search(param_1,param_2,param_3,0x970,param_5 | 0x20,uVar4);
if (0 < (int)uVar1) {
lVar3 = _mi_get_last_key(param_1,param_2,param_1[0x20],local_4f8,param_1[0x25],
param_1 + 0x3b);
if (lVar3 != 0) {
uVar1 = *(uint *)(param_1 + 0x3b);
goto LAB_0018cd95;
}
goto LAB_0018cdcd;
}
}
LAB_0018cdee:
uVar2 = (ulong)uVar1;
}
else {
lVar3 = _mi_kpos(local_4fc,param_1[0x25]);
if (lVar3 != -1) {
uVar1 = _mi_search(param_1,param_2,param_3,0x970,param_5 | 0x20,lVar3);
if ((int)uVar1 < 1) goto LAB_0018cdee;
}
__memcpy_chk(local_4f8,param_3,param_4,0x4b8);
uVar1 = (**(code **)(param_2 + 0x48))(param_2,local_4fc,param_1 + 0x25,local_4f8);
*(uint *)(param_1 + 0x3b) = uVar1;
if (uVar1 == 0) goto LAB_0018cdcd;
LAB_0018cd95:
memcpy((void *)param_1[0x21],local_4f8,(ulong)uVar1);
uVar2 = 0;
lVar3 = _mi_dpos(param_1,0,(ulong)*(uint *)(param_1 + 0x3b) + param_1[0x21]);
param_1[0x2e] = lVar3;
}
}
else {
local_4fc = param_4;
lVar3 = _mi_fetch_keypage(param_1,param_2,param_1[0x33],3,param_1[0x20],0);
if (lVar3 != 0) {
*(int1 *)((long)param_1 + 0x33d) = 0;
param_4 = local_4fc;
goto LAB_0018cc47;
}
LAB_0018cdcd:
uVar2 = 0xffffffff;
}
if (*(long *)(in_FS_OFFSET + 0x28) == local_38) {
return uVar2;
}
goto LAB_0018ce15;
}
if (((int)param_1[0x27] == 0) && (*(char *)((long)param_1 + 0x33d) == '\0')) goto LAB_0018cc47;
}
if (*(long *)(in_FS_OFFSET + 0x28) == local_38) {
uVar2 = _mi_search(param_1,param_2,param_3,0x970,param_5 | 0x20,param_6);
return uVar2;
}
LAB_0018ce15:
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
|
|
57,291
|
testing::internal::CharFormat testing::internal::PrintAsCharLiteralTo<signed char>(signed char, std::ostream*)
|
seiftnesse[P]memoryallocator/build_O0/_deps/googletest-src/googletest/src/gtest-printers.cc
|
static CharFormat PrintAsCharLiteralTo(Char c, ostream* os) {
const char32_t u_c = ToChar32(c);
switch (u_c) {
case L'\0':
*os << "\\0";
break;
case L'\'':
*os << "\\'";
break;
case L'\\':
*os << "\\\\";
break;
case L'\a':
*os << "\\a";
break;
case L'\b':
*os << "\\b";
break;
case L'\f':
*os << "\\f";
break;
case L'\n':
*os << "\\n";
break;
case L'\r':
*os << "\\r";
break;
case L'\t':
*os << "\\t";
break;
case L'\v':
*os << "\\v";
break;
default:
if (IsPrintableAscii(u_c)) {
*os << static_cast<char>(c);
return kAsIs;
} else {
ostream::fmtflags flags = os->flags();
*os << "\\x" << std::hex << std::uppercase << static_cast<int>(u_c);
os->flags(flags);
return kHexEscape;
}
}
return kSpecialEscape;
}
|
O0
|
cpp
|
testing::internal::CharFormat testing::internal::PrintAsCharLiteralTo<signed char>(signed char, std::ostream*):
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movb %dil, %al
movb %al, -0x5(%rbp)
movq %rsi, -0x10(%rbp)
movsbl -0x5(%rbp), %edi
callq 0x48820
movl %eax, -0x14(%rbp)
movl -0x14(%rbp), %eax
movq %rax, -0x20(%rbp)
subq $0x5c, %rax
ja 0x48775
movq -0x20(%rbp), %rax
leaq 0x29c42(%rip), %rcx # 0x722dc
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq -0x10(%rbp), %rdi
leaq 0x2bf91(%rip), %rsi # 0x7463f
callq 0xb640
jmp 0x48801
movq -0x10(%rbp), %rdi
leaq 0x2d94a(%rip), %rsi # 0x7600d
callq 0xb640
jmp 0x48801
movq -0x10(%rbp), %rdi
leaq 0x2d938(%rip), %rsi # 0x76010
callq 0xb640
jmp 0x48801
movq -0x10(%rbp), %rdi
leaq 0x2d926(%rip), %rsi # 0x76013
callq 0xb640
jmp 0x48801
movq -0x10(%rbp), %rdi
leaq 0x2c8db(%rip), %rsi # 0x74fdd
callq 0xb640
jmp 0x48801
movq -0x10(%rbp), %rdi
leaq 0x2c8cf(%rip), %rsi # 0x74fe6
callq 0xb640
jmp 0x48801
movq -0x10(%rbp), %rdi
leaq 0x2c8b7(%rip), %rsi # 0x74fe3
callq 0xb640
jmp 0x48801
movq -0x10(%rbp), %rdi
leaq 0x2c8a8(%rip), %rsi # 0x74fe9
callq 0xb640
jmp 0x48801
movq -0x10(%rbp), %rdi
leaq 0x2c88a(%rip), %rsi # 0x74fe0
callq 0xb640
jmp 0x48801
movq -0x10(%rbp), %rdi
leaq 0x2d8ab(%rip), %rsi # 0x76016
callq 0xb640
jmp 0x48801
movl -0x14(%rbp), %edi
callq 0x634a0
testb $0x1, %al
jne 0x48783
jmp 0x48799
movq -0x10(%rbp), %rdi
movsbl -0x5(%rbp), %esi
callq 0xb840
movl $0x0, -0x4(%rbp)
jmp 0x48808
movq -0x10(%rbp), %rdi
movq (%rdi), %rax
addq -0x18(%rax), %rdi
callq 0x634d0
movl %eax, -0x18(%rbp)
movq -0x10(%rbp), %rdi
leaq 0x2d862(%rip), %rsi # 0x76019
callq 0xb640
movq %rax, %rdi
leaq -0x33726(%rip), %rsi # 0x150a0
callq 0xb200
movq %rax, %rdi
leaq 0x402b(%rip), %rsi # 0x4c800
callq 0xb200
movq %rax, %rdi
movl -0x14(%rbp), %esi
callq 0xbcb0
movq -0x10(%rbp), %rdi
movq (%rdi), %rax
addq -0x18(%rax), %rdi
movl -0x18(%rbp), %esi
callq 0x634f0
movl $0x1, -0x4(%rbp)
jmp 0x48808
movl $0x2, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
|
_ZN7testing8internalL20PrintAsCharLiteralToIaEENS0_10CharFormatET_PSo:
push rbp
mov rbp, rsp
sub rsp, 20h
mov al, dil
mov [rbp+var_5], al
mov [rbp+var_10], rsi
movsx edi, [rbp+var_5]
call _ZN7testing12_GLOBAL__N_18ToChar32IaEEDiT_; testing::`anonymous namespace'::ToChar32<signed char>(signed char)
mov [rbp+var_14], eax
mov eax, [rbp+var_14]
mov [rbp+var_20], rax
sub rax, 5Ch; switch 93 cases
ja def_486A1; jumptable 00000000000486A1 default case, cases 1-6,14-38,40-91
mov rax, [rbp+var_20]
lea rcx, jpt_486A1
movsxd rax, ds:(jpt_486A1 - 722DCh)[rcx+rax*4]
add rax, rcx
jmp rax; switch jump
loc_486A3:
mov rdi, [rbp+var_10]; jumptable 00000000000486A1 case 0
lea rsi, a0; "\\0"
call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*)
jmp loc_48801
loc_486B8:
mov rdi, [rbp+var_10]; jumptable 00000000000486A1 case 39
lea rsi, asc_7600D; "\\'"
call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*)
jmp loc_48801
loc_486CD:
mov rdi, [rbp+var_10]; jumptable 00000000000486A1 case 92
lea rsi, asc_76010; "\\\\"
call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*)
jmp loc_48801
loc_486E2:
mov rdi, [rbp+var_10]; jumptable 00000000000486A1 case 7
lea rsi, aA_0; "\\a"
call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*)
jmp loc_48801
loc_486F7:
mov rdi, [rbp+var_10]; jumptable 00000000000486A1 case 8
lea rsi, aB; "\\b"
call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*)
jmp loc_48801
loc_4870C:
mov rdi, [rbp+var_10]; jumptable 00000000000486A1 case 12
lea rsi, asc_74FE6; "\\f"
call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*)
jmp loc_48801
loc_48721:
mov rdi, [rbp+var_10]; jumptable 00000000000486A1 case 10
lea rsi, aN; "\\n"
call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*)
jmp loc_48801
loc_48736:
mov rdi, [rbp+var_10]; jumptable 00000000000486A1 case 13
lea rsi, aR; "\\r"
call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*)
jmp loc_48801
loc_4874B:
mov rdi, [rbp+var_10]; jumptable 00000000000486A1 case 9
lea rsi, aT; "\\t"
call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*)
jmp loc_48801
loc_48760:
mov rdi, [rbp+var_10]; jumptable 00000000000486A1 case 11
lea rsi, aV; "\\v"
call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*)
jmp loc_48801
def_486A1:
mov edi, [rbp+var_14]; jumptable 00000000000486A1 default case, cases 1-6,14-38,40-91
call _ZN7testing8internal16IsPrintableAsciiEDi; testing::internal::IsPrintableAscii(char32_t)
test al, 1
jnz short loc_48783
jmp short loc_48799
loc_48783:
mov rdi, [rbp+var_10]
movsx esi, [rbp+var_5]
call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c; std::operator<<<std::char_traits<char>>(std::ostream &,char)
mov [rbp+var_4], 0
jmp short loc_48808
loc_48799:
mov rdi, [rbp+var_10]
mov rax, [rdi]
add rdi, [rax-18h]; this
call _ZNKSt8ios_base5flagsEv; std::ios_base::flags(void)
mov [rbp+var_18], eax
mov rdi, [rbp+var_10]
lea rsi, asc_76019; "\\x"
call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*)
mov rdi, rax
lea rsi, _ZSt3hexRSt8ios_base; std::hex(std::ios_base &)
call __ZNSolsEPFRSt8ios_baseS0_E; std::ostream::operator<<(std::ios_base & (*)(std::ios_base &))
mov rdi, rax
lea rsi, _ZSt9uppercaseRSt8ios_base; std::uppercase(std::ios_base &)
call __ZNSolsEPFRSt8ios_baseS0_E; std::ostream::operator<<(std::ios_base & (*)(std::ios_base &))
mov rdi, rax
mov esi, [rbp+var_14]
call __ZNSolsEi; std::ostream::operator<<(int)
mov rdi, [rbp+var_10]
mov rax, [rdi]
add rdi, [rax-18h]
mov esi, [rbp+var_18]
call _ZNSt8ios_base5flagsESt13_Ios_Fmtflags; std::ios_base::flags(std::_Ios_Fmtflags)
mov [rbp+var_4], 1
jmp short loc_48808
loc_48801:
mov [rbp+var_4], 2
loc_48808:
mov eax, [rbp+var_4]
add rsp, 20h
pop rbp
retn
|
long long testing::internal::PrintAsCharLiteralTo<signed char>(char a1, _QWORD *a2)
{
long long v2; // rax
long long v3; // rax
long long v4; // rax
unsigned int v6; // [rsp+8h] [rbp-18h]
unsigned int v7; // [rsp+Ch] [rbp-14h]
unsigned int v8; // [rsp+1Ch] [rbp-4h]
v7 = testing::`anonymous namespace'::ToChar32<signed char>((unsigned int)a1);
switch ( v7 )
{
case 0u:
std::operator<<<std::char_traits<char>>(a2, "\\0");
goto LABEL_15;
case 7u:
std::operator<<<std::char_traits<char>>(a2, "\\a");
goto LABEL_15;
case 8u:
std::operator<<<std::char_traits<char>>(a2, "\\b");
goto LABEL_15;
case 9u:
std::operator<<<std::char_traits<char>>(a2, "\\t");
goto LABEL_15;
case 0xAu:
std::operator<<<std::char_traits<char>>(a2, "\\n");
goto LABEL_15;
case 0xBu:
std::operator<<<std::char_traits<char>>(a2, "\\v");
goto LABEL_15;
case 0xCu:
std::operator<<<std::char_traits<char>>(a2, "\\f");
goto LABEL_15;
case 0xDu:
std::operator<<<std::char_traits<char>>(a2, "\\r");
goto LABEL_15;
case 0x27u:
std::operator<<<std::char_traits<char>>(a2, "\\'");
goto LABEL_15;
case 0x5Cu:
std::operator<<<std::char_traits<char>>(a2, "\\\\");
LABEL_15:
v8 = 2;
break;
default:
if ( (testing::internal::IsPrintableAscii(v7) & 1) != 0 )
{
std::operator<<<std::char_traits<char>>(a2, (unsigned int)a1);
v8 = 0;
}
else
{
v6 = std::ios_base::flags((std::ios_base *)((char *)a2 + *(_QWORD *)(*a2 - 24LL)));
v2 = std::operator<<<std::char_traits<char>>(a2, "\\x");
v3 = std::ostream::operator<<(v2, std::hex);
v4 = std::ostream::operator<<(v3, std::uppercase);
std::ostream::operator<<(v4, v7);
std::ios_base::flags((char *)a2 + *(_QWORD *)(*a2 - 24LL), v6);
v8 = 1;
}
break;
}
return v8;
}
|
PrintAsCharLiteralTo<signed_char>:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x20
MOV AL,DIL
MOV byte ptr [RBP + -0x5],AL
MOV qword ptr [RBP + -0x10],RSI
MOVSX EDI,byte ptr [RBP + -0x5]
CALL 0x00148820
MOV dword ptr [RBP + -0x14],EAX
MOV EAX,dword ptr [RBP + -0x14]
MOV qword ptr [RBP + -0x20],RAX
SUB RAX,0x5c
JA 0x00148775
MOV RAX,qword ptr [RBP + -0x20]
LEA RCX,[0x1722dc]
MOVSXD RAX,dword ptr [RCX + RAX*0x4]
ADD RAX,RCX
switchD:
JMP RAX
caseD_0:
MOV RDI,qword ptr [RBP + -0x10]
LEA RSI,[0x17463f]
CALL 0x0010b640
JMP 0x00148801
caseD_27:
MOV RDI,qword ptr [RBP + -0x10]
LEA RSI,[0x17600d]
CALL 0x0010b640
JMP 0x00148801
caseD_5c:
MOV RDI,qword ptr [RBP + -0x10]
LEA RSI,[0x176010]
CALL 0x0010b640
JMP 0x00148801
caseD_7:
MOV RDI,qword ptr [RBP + -0x10]
LEA RSI,[0x176013]
CALL 0x0010b640
JMP 0x00148801
caseD_8:
MOV RDI,qword ptr [RBP + -0x10]
LEA RSI,[0x174fdd]
CALL 0x0010b640
JMP 0x00148801
caseD_c:
MOV RDI,qword ptr [RBP + -0x10]
LEA RSI,[0x174fe6]
CALL 0x0010b640
JMP 0x00148801
caseD_a:
MOV RDI,qword ptr [RBP + -0x10]
LEA RSI,[0x174fe3]
CALL 0x0010b640
JMP 0x00148801
caseD_d:
MOV RDI,qword ptr [RBP + -0x10]
LEA RSI,[0x174fe9]
CALL 0x0010b640
JMP 0x00148801
caseD_9:
MOV RDI,qword ptr [RBP + -0x10]
LEA RSI,[0x174fe0]
CALL 0x0010b640
JMP 0x00148801
caseD_b:
MOV RDI,qword ptr [RBP + -0x10]
LEA RSI,[0x176016]
CALL 0x0010b640
JMP 0x00148801
caseD_1:
MOV EDI,dword ptr [RBP + -0x14]
CALL 0x001634a0
TEST AL,0x1
JNZ 0x00148783
JMP 0x00148799
LAB_00148783:
MOV RDI,qword ptr [RBP + -0x10]
MOVSX ESI,byte ptr [RBP + -0x5]
CALL 0x0010b840
MOV dword ptr [RBP + -0x4],0x0
JMP 0x00148808
LAB_00148799:
MOV RDI,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RDI]
ADD RDI,qword ptr [RAX + -0x18]
CALL 0x001634d0
MOV dword ptr [RBP + -0x18],EAX
MOV RDI,qword ptr [RBP + -0x10]
LEA RSI,[0x176019]
CALL 0x0010b640
MOV RDI,RAX
LEA RSI,[0x1150a0]
CALL 0x0010b200
MOV RDI,RAX
LEA RSI,[0x14c800]
CALL 0x0010b200
MOV RDI,RAX
MOV ESI,dword ptr [RBP + -0x14]
CALL 0x0010bcb0
MOV RDI,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RDI]
ADD RDI,qword ptr [RAX + -0x18]
MOV ESI,dword ptr [RBP + -0x18]
CALL 0x001634f0
MOV dword ptr [RBP + -0x4],0x1
JMP 0x00148808
LAB_00148801:
MOV dword ptr [RBP + -0x4],0x2
LAB_00148808:
MOV EAX,dword ptr [RBP + -0x4]
ADD RSP,0x20
POP RBP
RET
|
/* testing::internal::CharFormat testing::internal::PrintAsCharLiteralTo<signed char>(signed char,
std::ostream*) */
int4 testing::internal::PrintAsCharLiteralTo<signed_char>(char param_1,ostream *param_2)
{
wchar32 wVar1;
int4 uVar2;
ulong uVar3;
ostream *poVar4;
wVar1 = testing::(anonymous_namespace)::ToChar32<signed_char>((int)param_1);
switch(wVar1) {
case L'\0':
std::operator<<(param_2,"\\0");
break;
default:
uVar3 = IsPrintableAscii(wVar1);
if ((uVar3 & 1) == 0) {
uVar2 = std::ios_base::flags((ios_base *)(param_2 + *(long *)(*(long *)param_2 + -0x18)));
poVar4 = std::operator<<(param_2,"\\x");
poVar4 = (ostream *)std::ostream::operator<<(poVar4,std::hex);
poVar4 = (ostream *)std::ostream::operator<<(poVar4,std::uppercase);
std::ostream::operator<<(poVar4,wVar1);
std::ios_base::flags((ios_base *)(param_2 + *(long *)(*(long *)param_2 + -0x18)),uVar2);
return 1;
}
std::operator<<(param_2,param_1);
return 0;
case L'\a':
std::operator<<(param_2,"\\a");
break;
case L'\b':
std::operator<<(param_2,"\\b");
break;
case L'\t':
std::operator<<(param_2,"\\t");
break;
case L'\n':
std::operator<<(param_2,"\\n");
break;
case L'\v':
std::operator<<(param_2,"\\v");
break;
case L'\f':
std::operator<<(param_2,"\\f");
break;
case L'\r':
std::operator<<(param_2,"\\r");
break;
case L'\'':
std::operator<<(param_2,"\\\'");
break;
case L'\\':
std::operator<<(param_2,"\\\\");
}
return 2;
}
|
|
57,292
|
my_uni_utf8mb3_no_range
|
eloqsql/strings/ctype-utf8.c
|
static int my_uni_utf8mb3_no_range(CHARSET_INFO *cs __attribute__((unused)),
my_wc_t wc, uchar *r)
{
int count;
if (wc < 0x80)
count= 1;
else if (wc < 0x800)
count= 2;
else if (wc < 0x10000)
count= 3;
else
return MY_CS_ILUNI;
switch (count)
{
case 3: r[2]= (uchar) (0x80 | (wc & 0x3f)); wc= wc >> 6; wc |= 0x800;
/* fall through */
case 2: r[1]= (uchar) (0x80 | (wc & 0x3f)); wc= wc >> 6; wc |= 0xc0;
/* fall through */
case 1: r[0]= (uchar) wc;
}
return count;
}
|
O0
|
c
|
my_uni_utf8mb3_no_range:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
cmpq $0x80, -0x18(%rbp)
jae 0x659b3
movl $0x1, -0x24(%rbp)
jmp 0x659e9
cmpq $0x800, -0x18(%rbp) # imm = 0x800
jae 0x659c6
movl $0x2, -0x24(%rbp)
jmp 0x659e7
cmpq $0x10000, -0x18(%rbp) # imm = 0x10000
jae 0x659d9
movl $0x3, -0x24(%rbp)
jmp 0x659e5
movl $0x0, -0x4(%rbp)
jmp 0x65a7e
jmp 0x659e7
jmp 0x659e9
movl -0x24(%rbp), %eax
movl %eax, -0x28(%rbp)
subl $0x1, %eax
je 0x65a6c
jmp 0x659f6
movl -0x28(%rbp), %eax
subl $0x2, %eax
je 0x65a3b
jmp 0x65a00
movl -0x28(%rbp), %eax
subl $0x3, %eax
jne 0x65a78
jmp 0x65a0a
movq -0x18(%rbp), %rax
andq $0x3f, %rax
orq $0x80, %rax
movb %al, %cl
movq -0x20(%rbp), %rax
movb %cl, 0x2(%rax)
movq -0x18(%rbp), %rax
shrq $0x6, %rax
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
orq $0x800, %rax # imm = 0x800
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
andq $0x3f, %rax
orq $0x80, %rax
movb %al, %cl
movq -0x20(%rbp), %rax
movb %cl, 0x1(%rax)
movq -0x18(%rbp), %rax
shrq $0x6, %rax
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
orq $0xc0, %rax
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
movb %al, %cl
movq -0x20(%rbp), %rax
movb %cl, (%rax)
movl -0x24(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
popq %rbp
retq
nopw %cs:(%rax,%rax)
|
my_uni_utf8mb3_no_range:
push rbp
mov rbp, rsp
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov [rbp+var_20], rdx
cmp [rbp+var_18], 80h
jnb short loc_659B3
mov [rbp+var_24], 1
jmp short loc_659E9
loc_659B3:
cmp [rbp+var_18], 800h
jnb short loc_659C6
mov [rbp+var_24], 2
jmp short loc_659E7
loc_659C6:
cmp [rbp+var_18], offset stru_10000
jnb short loc_659D9
mov [rbp+var_24], 3
jmp short loc_659E5
loc_659D9:
mov [rbp+var_4], 0
jmp loc_65A7E
loc_659E5:
jmp short $+2
loc_659E7:
jmp short $+2
loc_659E9:
mov eax, [rbp+var_24]
mov [rbp+var_28], eax
sub eax, 1
jz short loc_65A6C
jmp short $+2
loc_659F6:
mov eax, [rbp+var_28]
sub eax, 2
jz short loc_65A3B
jmp short $+2
loc_65A00:
mov eax, [rbp+var_28]
sub eax, 3
jnz short loc_65A78
jmp short $+2
loc_65A0A:
mov rax, [rbp+var_18]
and rax, 3Fh
or rax, 80h
mov cl, al
mov rax, [rbp+var_20]
mov [rax+2], cl
mov rax, [rbp+var_18]
shr rax, 6
mov [rbp+var_18], rax
mov rax, [rbp+var_18]
or rax, 800h
mov [rbp+var_18], rax
loc_65A3B:
mov rax, [rbp+var_18]
and rax, 3Fh
or rax, 80h
mov cl, al
mov rax, [rbp+var_20]
mov [rax+1], cl
mov rax, [rbp+var_18]
shr rax, 6
mov [rbp+var_18], rax
mov rax, [rbp+var_18]
or rax, 0C0h
mov [rbp+var_18], rax
loc_65A6C:
mov rax, [rbp+var_18]
mov cl, al
mov rax, [rbp+var_20]
mov [rax], cl
loc_65A78:
mov eax, [rbp+var_24]
mov [rbp+var_4], eax
loc_65A7E:
mov eax, [rbp+var_4]
pop rbp
retn
|
long long my_uni_utf8mb3_no_range(long long a1, unsigned long long a2, _BYTE *a3)
{
unsigned int v4; // [rsp+4h] [rbp-24h]
unsigned long long v5; // [rsp+10h] [rbp-18h]
v5 = a2;
if ( a2 >= 0x80 )
{
if ( a2 >= 0x800 )
{
if ( a2 >= (unsigned long long)&stru_10000 )
return 0;
v4 = 3;
}
else
{
v4 = 2;
}
}
else
{
v4 = 1;
}
if ( v4 != 1 )
{
if ( v4 != 2 )
{
a3[2] = a2 & 0x3F | 0x80;
v5 = (a2 >> 6) | 0x800;
}
a3[1] = v5 & 0x3F | 0x80;
v5 = (v5 >> 6) | 0xC0;
}
*a3 = v5;
return v4;
}
|
my_uni_utf8mb3_no_range:
PUSH RBP
MOV RBP,RSP
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x18],RSI
MOV qword ptr [RBP + -0x20],RDX
CMP qword ptr [RBP + -0x18],0x80
JNC 0x001659b3
MOV dword ptr [RBP + -0x24],0x1
JMP 0x001659e9
LAB_001659b3:
CMP qword ptr [RBP + -0x18],0x800
JNC 0x001659c6
MOV dword ptr [RBP + -0x24],0x2
JMP 0x001659e7
LAB_001659c6:
CMP qword ptr [RBP + -0x18],0x10000
JNC 0x001659d9
MOV dword ptr [RBP + -0x24],0x3
JMP 0x001659e5
LAB_001659d9:
MOV dword ptr [RBP + -0x4],0x0
JMP 0x00165a7e
LAB_001659e5:
JMP 0x001659e7
LAB_001659e7:
JMP 0x001659e9
LAB_001659e9:
MOV EAX,dword ptr [RBP + -0x24]
MOV dword ptr [RBP + -0x28],EAX
SUB EAX,0x1
JZ 0x00165a6c
JMP 0x001659f6
LAB_001659f6:
MOV EAX,dword ptr [RBP + -0x28]
SUB EAX,0x2
JZ 0x00165a3b
JMP 0x00165a00
LAB_00165a00:
MOV EAX,dword ptr [RBP + -0x28]
SUB EAX,0x3
JNZ 0x00165a78
JMP 0x00165a0a
LAB_00165a0a:
MOV RAX,qword ptr [RBP + -0x18]
AND RAX,0x3f
OR RAX,0x80
MOV CL,AL
MOV RAX,qword ptr [RBP + -0x20]
MOV byte ptr [RAX + 0x2],CL
MOV RAX,qword ptr [RBP + -0x18]
SHR RAX,0x6
MOV qword ptr [RBP + -0x18],RAX
MOV RAX,qword ptr [RBP + -0x18]
OR RAX,0x800
MOV qword ptr [RBP + -0x18],RAX
LAB_00165a3b:
MOV RAX,qword ptr [RBP + -0x18]
AND RAX,0x3f
OR RAX,0x80
MOV CL,AL
MOV RAX,qword ptr [RBP + -0x20]
MOV byte ptr [RAX + 0x1],CL
MOV RAX,qword ptr [RBP + -0x18]
SHR RAX,0x6
MOV qword ptr [RBP + -0x18],RAX
MOV RAX,qword ptr [RBP + -0x18]
OR RAX,0xc0
MOV qword ptr [RBP + -0x18],RAX
LAB_00165a6c:
MOV RAX,qword ptr [RBP + -0x18]
MOV CL,AL
MOV RAX,qword ptr [RBP + -0x20]
MOV byte ptr [RAX],CL
LAB_00165a78:
MOV EAX,dword ptr [RBP + -0x24]
MOV dword ptr [RBP + -0x4],EAX
LAB_00165a7e:
MOV EAX,dword ptr [RBP + -0x4]
POP RBP
RET
|
int my_uni_utf8mb3_no_range(int8 param_1,ulong param_2,int1 *param_3)
{
int local_2c;
ulong local_20;
if (param_2 < 0x80) {
local_2c = 1;
}
else if (param_2 < 0x800) {
local_2c = 2;
}
else {
if (0xffff < param_2) {
return 0;
}
local_2c = 3;
}
local_20 = param_2;
if (local_2c != 1) {
if (local_2c != 2) {
if (local_2c != 3) {
return local_2c;
}
param_3[2] = (byte)param_2 & 0x3f | 0x80;
local_20 = param_2 >> 6 | 0x800;
}
param_3[1] = (byte)local_20 & 0x3f | 0x80;
local_20 = local_20 >> 6 | 0xc0;
}
*param_3 = (char)local_20;
return local_2c;
}
|
|
57,293
|
Arg_comparator::set_cmp_func_native(THD*)
|
eloqsql/sql/item_cmpfunc.cc
|
bool Arg_comparator::set_cmp_func_native(THD *thd)
{
m_compare_collation= &my_charset_numeric;
func= is_owner_equal_func() ? &Arg_comparator::compare_e_native :
&Arg_comparator::compare_native;
a= cache_converted_constant(thd, a, &a_cache, compare_type_handler());
b= cache_converted_constant(thd, b, &b_cache, compare_type_handler());
return false;
}
|
O0
|
cpp
|
Arg_comparator::set_cmp_func_native(THD*):
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x18(%rbp)
leaq 0xee6d21(%rip), %rax # 0x1c2ecb0
movq %rax, 0x18(%rdi)
callq 0xd5bc10
movq -0x18(%rbp), %rdi
movb %al, %dl
leaq 0xab(%rip), %rcx # 0xd48050
leaq 0x1b4(%rip), %rax # 0xd48160
testb %dl, %dl
cmovneq %rcx, %rax
movq %rax, 0x20(%rdi)
movq $0x0, 0x28(%rdi)
movq -0x10(%rbp), %rax
movq %rax, -0x48(%rbp)
movq (%rdi), %rax
movq %rax, -0x40(%rbp)
movq %rdi, %rax
addq $0x50, %rax
movq %rax, -0x38(%rbp)
callq 0x8d0af0
movq -0x48(%rbp), %rsi
movq -0x40(%rbp), %rdx
movq -0x38(%rbp), %rcx
movq -0x18(%rbp), %rdi
movq %rax, %r8
callq 0xd479a0
movq -0x18(%rbp), %rdi
movq %rax, (%rdi)
movq -0x10(%rbp), %rax
movq %rax, -0x30(%rbp)
movq 0x8(%rdi), %rax
movq %rax, -0x28(%rbp)
movq %rdi, %rax
addq $0x58, %rax
movq %rax, -0x20(%rbp)
callq 0x8d0af0
movq -0x30(%rbp), %rsi
movq -0x28(%rbp), %rdx
movq -0x20(%rbp), %rcx
movq -0x18(%rbp), %rdi
movq %rax, %r8
callq 0xd479a0
movq %rax, %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x8(%rax)
xorl %eax, %eax
andb $0x1, %al
addq $0x50, %rsp
popq %rbp
retq
nopl (%rax)
|
_ZN14Arg_comparator19set_cmp_func_nativeEP3THD:
push rbp
mov rbp, rsp
sub rsp, 50h
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov rdi, [rbp+var_8]; this
mov [rbp+var_18], rdi
lea rax, my_charset_latin1
mov [rdi+18h], rax
call _ZN14Arg_comparator19is_owner_equal_funcEv; Arg_comparator::is_owner_equal_func(void)
mov rdi, [rbp+var_18]; this
mov dl, al
lea rcx, _ZN14Arg_comparator16compare_e_nativeEv; Arg_comparator::compare_e_native(void)
lea rax, _ZN14Arg_comparator14compare_nativeEv; Arg_comparator::compare_native(void)
test dl, dl
cmovnz rax, rcx
mov [rdi+20h], rax
mov qword ptr [rdi+28h], 0
mov rax, [rbp+var_10]
mov [rbp+var_48], rax
mov rax, [rdi]
mov [rbp+var_40], rax
mov rax, rdi
add rax, 50h ; 'P'
mov [rbp+var_38], rax
call _ZNK14Arg_comparator20compare_type_handlerEv; Arg_comparator::compare_type_handler(void)
mov rsi, [rbp+var_48]; THD *
mov rdx, [rbp+var_40]; Item **
mov rcx, [rbp+var_38]; Item **
mov rdi, [rbp+var_18]; this
mov r8, rax; Type_handler *
call _ZN14Arg_comparator24cache_converted_constantEP3THDPP4ItemS4_PK12Type_handler; Arg_comparator::cache_converted_constant(THD *,Item **,Item **,Type_handler const*)
mov rdi, [rbp+var_18]; this
mov [rdi], rax
mov rax, [rbp+var_10]
mov [rbp+var_30], rax
mov rax, [rdi+8]
mov [rbp+var_28], rax
mov rax, rdi
add rax, 58h ; 'X'
mov [rbp+var_20], rax
call _ZNK14Arg_comparator20compare_type_handlerEv; Arg_comparator::compare_type_handler(void)
mov rsi, [rbp+var_30]; THD *
mov rdx, [rbp+var_28]; Item **
mov rcx, [rbp+var_20]; Item **
mov rdi, [rbp+var_18]; this
mov r8, rax; Type_handler *
call _ZN14Arg_comparator24cache_converted_constantEP3THDPP4ItemS4_PK12Type_handler; Arg_comparator::cache_converted_constant(THD *,Item **,Item **,Type_handler const*)
mov rcx, rax
mov rax, [rbp+var_18]
mov [rax+8], rcx
xor eax, eax
and al, 1
add rsp, 50h
pop rbp
retn
|
long long Arg_comparator::set_cmp_func_native(Arg_comparator *this, LEX **a2)
{
char is_owner_equal_func; // dl
long long ( *v3)(Arg_comparator *__hidden); // rax
const Type_handler *v4; // rax
const Type_handler *v5; // rax
Item **v7; // [rsp+10h] [rbp-40h]
Item **v8; // [rsp+28h] [rbp-28h]
*((_QWORD *)this + 3) = &my_charset_latin1;
is_owner_equal_func = Arg_comparator::is_owner_equal_func(this);
v3 = Arg_comparator::compare_native;
if ( is_owner_equal_func )
v3 = Arg_comparator::compare_e_native;
*((_QWORD *)this + 4) = v3;
*((_QWORD *)this + 5) = 0LL;
v7 = *(Item ***)this;
v4 = (const Type_handler *)Arg_comparator::compare_type_handler(this);
*(_QWORD *)this = Arg_comparator::cache_converted_constant(this, a2, v7, (Item **)this + 10, v4);
v8 = (Item **)*((_QWORD *)this + 1);
v5 = (const Type_handler *)Arg_comparator::compare_type_handler(this);
*((_QWORD *)this + 1) = Arg_comparator::cache_converted_constant(this, a2, v8, (Item **)this + 11, v5);
return 0LL;
}
|
add:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x40
MOV qword ptr [RBP + -0x20],RDI
MOV qword ptr [RBP + -0x28],RSI
MOV RAX,qword ptr [RBP + -0x20]
MOV qword ptr [RBP + -0x40],RAX
MOV RAX,qword ptr [RBP + -0x28]
ADD RAX,0x130
MOV qword ptr [RBP + -0x8],RAX
MOV dword ptr [RBP + -0xc],0x80000000
MOV dword ptr [RBP + -0x10],0x4
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RBP + -0x38],RAX
MOV EAX,dword ptr [RBP + -0x10]
MOV ECX,dword ptr [RBP + -0xc]
MOV dword ptr [RBP + -0x14],ECX
DEC EAX
MOV ECX,EAX
MOV qword ptr [RBP + -0x30],RCX
SUB EAX,0x4
JA 0x00d47fd6
MOV RAX,qword ptr [RBP + -0x30]
LEA RCX,[0x15b7028]
MOVSXD RAX,dword ptr [RCX + RAX*0x4]
ADD RAX,RCX
JMP RAX
LAB_00d47fd6:
MOV RCX,qword ptr [RBP + -0x38]
MOV EAX,dword ptr [RBP + -0x14]
XADD.LOCK dword ptr [RCX],EAX
MOV dword ptr [RBP + -0x18],EAX
JMP 0x00d48024
LAB_00d48024:
CMP dword ptr [RBP + -0x18],0x0
JNZ 0x00d48037
MOV RDI,qword ptr [RBP + -0x40]
MOV RSI,qword ptr [RBP + -0x28]
CALL 0x00d48040
LAB_00d48037:
ADD RSP,0x40
POP RBP
RET
|
/* WARNING: Removing unreachable block (ram,0x00d47fd6) */
/* WARNING: Removing unreachable block (ram,0x00d4802a) */
/* WARNING: Removing unreachable block (ram,0x00d48037) */
/* moodycamel::ConcurrentQueue<TP_connection_generic*,
moodycamel::ConcurrentQueueDefaultTraits>::FreeList<moodycamel::ConcurrentQueue<TP_connection_generic*,
moodycamel::ConcurrentQueueDefaultTraits>::Block>::add(moodycamel::ConcurrentQueue<TP_connection_generic*,
moodycamel::ConcurrentQueueDefaultTraits>::Block*) */
void __thiscall
moodycamel::ConcurrentQueue<TP_connection_generic*,moodycamel::ConcurrentQueueDefaultTraits>::
FreeList<moodycamel::ConcurrentQueue<TP_connection_generic*,moodycamel::ConcurrentQueueDefaultTraits>::Block>
::add(FreeList<moodycamel::ConcurrentQueue<TP_connection_generic*,moodycamel::ConcurrentQueueDefaultTraits>::Block>
*this,Block *param_1)
{
/* WARNING: Could not recover jumptable at 0x00d47fd4. Too many branches */
/* WARNING: Treating indirect jump as call */
(*(code *)(&DAT_015b7028 + DAT_015b7034))();
return;
}
|
|
57,294
|
ok
|
eloqsql/unittest/mytap/tap.c
|
void
ok(int pass, char const *fmt, ...)
{
va_list ap;
va_start(ap, fmt);
if (!pass && *g_test.todo == '\0')
++g_test.failed;
vemit_tap(pass, fmt, ap);
va_end(ap);
if (*g_test.todo != '\0')
emit_dir("todo", g_test.todo);
emit_endl();
}
|
O0
|
c
|
ok:
pushq %rbp
movq %rsp, %rbp
subq $0xe0, %rsp
testb %al, %al
je 0x1668
movaps %xmm0, -0xb0(%rbp)
movaps %xmm1, -0xa0(%rbp)
movaps %xmm2, -0x90(%rbp)
movaps %xmm3, -0x80(%rbp)
movaps %xmm4, -0x70(%rbp)
movaps %xmm5, -0x60(%rbp)
movaps %xmm6, -0x50(%rbp)
movaps %xmm7, -0x40(%rbp)
movq %r9, -0xb8(%rbp)
movq %r8, -0xc0(%rbp)
movq %rcx, -0xc8(%rbp)
movq %rdx, -0xd0(%rbp)
movl %edi, -0x4(%rbp)
movq %rsi, -0x10(%rbp)
leaq -0x30(%rbp), %rax
leaq -0xe0(%rbp), %rcx
movq %rcx, 0x10(%rax)
leaq 0x10(%rbp), %rcx
movq %rcx, 0x8(%rax)
movl $0x30, 0x4(%rax)
movl $0x10, (%rax)
cmpl $0x0, -0x4(%rbp)
jne 0x16d0
movsbl 0x2a28(%rip), %eax # 0x40e4
cmpl $0x0, %eax
jne 0x16d0
movl 0x2a19(%rip), %eax # 0x40e0
addl $0x1, %eax
movl %eax, 0x2a10(%rip) # 0x40e0
movl -0x4(%rbp), %edi
movq -0x10(%rbp), %rsi
leaq -0x30(%rbp), %rdx
callq 0x1720
leaq -0x30(%rbp), %rax
movsbl 0x29f9(%rip), %eax # 0x40e4
cmpl $0x0, %eax
je 0x1707
leaq 0x974(%rip), %rdi # 0x206b
leaq 0x29da(%rip), %rsi # 0x40d8
addq $0xc, %rsi
callq 0x1800
callq 0x1c60
addq $0xe0, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
|
ok:
push rbp
mov rbp, rsp
sub rsp, 0E0h
test al, al
jz short loc_1668
movaps [rbp+var_B0], xmm0
movaps [rbp+var_A0], xmm1
movaps [rbp+var_90], xmm2
movaps [rbp+var_80], xmm3
movaps [rbp+var_70], xmm4
movaps [rbp+var_60], xmm5
movaps [rbp+var_50], xmm6
movaps [rbp+var_40], xmm7
loc_1668:
mov [rbp+var_B8], r9
mov [rbp+var_C0], r8
mov [rbp+var_C8], rcx
mov [rbp+var_D0], rdx
mov [rbp+var_4], edi
mov [rbp+var_10], rsi
lea rax, [rbp+var_30]
lea rcx, [rbp+var_E0]
mov [rax+10h], rcx
lea rcx, [rbp+arg_0]
mov [rax+8], rcx
mov dword ptr [rax+4], 30h ; '0'
mov dword ptr [rax], 10h
cmp [rbp+var_4], 0
jnz short loc_16D0
movsx eax, cs:byte_40E4
cmp eax, 0
jnz short loc_16D0
mov eax, cs:dword_40E0
add eax, 1
mov cs:dword_40E0, eax
loc_16D0:
mov edi, [rbp+var_4]
mov rsi, [rbp+var_10]
lea rdx, [rbp+var_30]
call vemit_tap
lea rax, [rbp+var_30]
movsx eax, cs:byte_40E4
cmp eax, 0
jz short loc_1707
lea rdi, aTodo; "todo"
lea rsi, g_test
add rsi, 0Ch
call emit_dir
loc_1707:
call emit_endl
add rsp, 0E0h
pop rbp
retn
|
long long ok(unsigned int a1, long long a2, ...)
{
va_list va; // [rsp+B0h] [rbp-30h] BYREF
long long v4; // [rsp+D0h] [rbp-10h]
unsigned int v5; // [rsp+DCh] [rbp-4h]
va_start(va, a2);
v5 = a1;
v4 = a2;
if ( !a1 && !byte_40E4 )
++dword_40E0;
vemit_tap(v5, v4, va);
if ( byte_40E4 )
emit_dir("todo", &g_test + 3);
return emit_endl();
}
|
ok:
PUSH RBP
MOV RBP,RSP
SUB RSP,0xe0
TEST AL,AL
JZ 0x00101668
MOVAPS xmmword ptr [RBP + -0xb0],XMM0
MOVAPS xmmword ptr [RBP + -0xa0],XMM1
MOVAPS xmmword ptr [RBP + -0x90],XMM2
MOVAPS xmmword ptr [RBP + -0x80],XMM3
MOVAPS xmmword ptr [RBP + -0x70],XMM4
MOVAPS xmmword ptr [RBP + -0x60],XMM5
MOVAPS xmmword ptr [RBP + -0x50],XMM6
MOVAPS xmmword ptr [RBP + -0x40],XMM7
LAB_00101668:
MOV qword ptr [RBP + -0xb8],R9
MOV qword ptr [RBP + -0xc0],R8
MOV qword ptr [RBP + -0xc8],RCX
MOV qword ptr [RBP + -0xd0],RDX
MOV dword ptr [RBP + -0x4],EDI
MOV qword ptr [RBP + -0x10],RSI
LEA RAX,[RBP + -0x30]
LEA RCX,[RBP + -0xe0]
MOV qword ptr [RAX + 0x10],RCX
LEA RCX,[RBP + 0x10]
MOV qword ptr [RAX + 0x8],RCX
MOV dword ptr [RAX + 0x4],0x30
MOV dword ptr [RAX],0x10
CMP dword ptr [RBP + -0x4],0x0
JNZ 0x001016d0
MOVSX EAX,byte ptr [0x001040e4]
CMP EAX,0x0
JNZ 0x001016d0
MOV EAX,dword ptr [0x001040e0]
ADD EAX,0x1
MOV dword ptr [0x001040e0],EAX
LAB_001016d0:
MOV EDI,dword ptr [RBP + -0x4]
MOV RSI,qword ptr [RBP + -0x10]
LEA RDX,[RBP + -0x30]
CALL 0x00101720
LEA RAX,[RBP + -0x30]
MOVSX EAX,byte ptr [0x001040e4]
CMP EAX,0x0
JZ 0x00101707
LEA RDI,[0x10206b]
LEA RSI,[0x1040d8]
ADD RSI,0xc
CALL 0x00101800
LAB_00101707:
CALL 0x00101c60
ADD RSP,0xe0
POP RBP
RET
|
void ok(int8 param_1,int8 param_2,int8 param_3,int8 param_4,
int8 param_5,int8 param_6,int8 param_7,int8 param_8,int param_9,
int8 param_10,int8 param_11,int8 param_12,int8 param_13,
int8 param_14)
{
char in_AL;
int1 local_e8 [16];
int8 local_d8;
int8 local_d0;
int8 local_c8;
int8 local_c0;
int8 local_b8;
int8 local_a8;
int8 local_98;
int8 local_88;
int8 local_78;
int8 local_68;
int8 local_58;
int8 local_48;
int4 local_38;
int4 local_34;
int1 *local_30;
int1 *local_28;
int8 local_18;
int local_c;
if (in_AL != '\0') {
local_b8 = param_1;
local_a8 = param_2;
local_98 = param_3;
local_88 = param_4;
local_78 = param_5;
local_68 = param_6;
local_58 = param_7;
local_48 = param_8;
}
local_28 = local_e8;
local_30 = &stack0x00000008;
local_34 = 0x30;
local_38 = 0x10;
if ((param_9 == 0) && (DAT_001040e4 == '\0')) {
DAT_001040e0 = DAT_001040e0 + 1;
}
local_d8 = param_11;
local_d0 = param_12;
local_c8 = param_13;
local_c0 = param_14;
local_18 = param_10;
local_c = param_9;
vemit_tap(param_9,param_10,&local_38);
if (DAT_001040e4 != '\0') {
emit_dir(&DAT_0010206b,&DAT_001040e4);
}
emit_endl();
return;
}
|
|
57,295
|
LefDefParser::defwSpecialNetWidth(char const*, int)
|
Efficient-TDP/thirdparty/Limbo/limbo/thirdparty/lefdef/5.8/def/def/defwWriter.cpp
|
int
defwSpecialNetWidth(const char *layer,
int w)
{
defwFunc = DEFW_SNET; // Current function of writer
if (!defwFile)
return DEFW_UNINITIALIZED;
if (!defwSpecialNetOptions())
return DEFW_BAD_ORDER;
fprintf(defwFile, "\n + WIDTH %s %d", layer, w);
defwLines++;
return DEFW_OK;
}
|
O0
|
cpp
|
LefDefParser::defwSpecialNetWidth(char const*, int):
subq $0x18, %rsp
movq %rdi, 0x8(%rsp)
movl %esi, 0x4(%rsp)
leaq 0x13844(%rip), %rax # 0x2b168
movl $0x32, (%rax)
leaq 0x13827(%rip), %rax # 0x2b158
cmpq $0x0, (%rax)
jne 0x17941
movl $0x1, 0x14(%rsp)
jmp 0x17993
callq 0x174e0
cmpl $0x0, %eax
jne 0x17955
movl $0x2, 0x14(%rsp)
jmp 0x17993
leaq 0x137fc(%rip), %rax # 0x2b158
movq (%rax), %rdi
movq 0x8(%rsp), %rdx
movl 0x4(%rsp), %ecx
leaq 0xd0fb(%rip), %rsi # 0x24a6a
movb $0x0, %al
callq 0x10f0
leaq 0x137e3(%rip), %rax # 0x2b160
movl (%rax), %ecx
addl $0x1, %ecx
leaq 0x137d7(%rip), %rax # 0x2b160
movl %ecx, (%rax)
movl $0x0, 0x14(%rsp)
movl 0x14(%rsp), %eax
addq $0x18, %rsp
retq
nopl (%rax)
|
_ZN12LefDefParser19defwSpecialNetWidthEPKci:
sub rsp, 18h
mov [rsp+18h+var_10], rdi
mov [rsp+18h+var_14], esi
lea rax, _ZN12LefDefParser8defwFuncE; LefDefParser::defwFunc
mov dword ptr [rax], 32h ; '2'
lea rax, _ZN12LefDefParser8defwFileE; LefDefParser::defwFile
cmp qword ptr [rax], 0
jnz short loc_17941
mov [rsp+18h+var_4], 1
jmp short loc_17993
loc_17941:
call _ZN12LefDefParser21defwSpecialNetOptionsEv; LefDefParser::defwSpecialNetOptions(void)
cmp eax, 0
jnz short loc_17955
mov [rsp+18h+var_4], 2
jmp short loc_17993
loc_17955:
lea rax, _ZN12LefDefParser8defwFileE; LefDefParser::defwFile
mov rdi, [rax]
mov rdx, [rsp+18h+var_10]
mov ecx, [rsp+18h+var_14]
lea rsi, aWidthSD; "\n + WIDTH %s %d"
mov al, 0
call _fprintf
lea rax, _ZN12LefDefParser9defwLinesE; LefDefParser::defwLines
mov ecx, [rax]
add ecx, 1
lea rax, _ZN12LefDefParser9defwLinesE; LefDefParser::defwLines
mov [rax], ecx
mov [rsp+18h+var_4], 0
loc_17993:
mov eax, [rsp+18h+var_4]
add rsp, 18h
retn
|
long long LefDefParser::defwSpecialNetWidth(LefDefParser *this, const char *a2)
{
LefDefParser::defwFunc = 50;
if ( LefDefParser::defwFile )
{
if ( LefDefParser::defwSpecialNetOptions(this) )
{
fprintf(LefDefParser::defwFile, "\n + WIDTH %s %d", (const char *)this, (_DWORD)a2);
++LefDefParser::defwLines;
return 0;
}
else
{
return 2;
}
}
else
{
return 1;
}
}
|
defwSpecialNetWidth:
SUB RSP,0x18
MOV qword ptr [RSP + 0x8],RDI
MOV dword ptr [RSP + 0x4],ESI
LEA RAX,[0x12b168]
MOV dword ptr [RAX],0x32
LEA RAX,[0x12b158]
CMP qword ptr [RAX],0x0
JNZ 0x00117941
MOV dword ptr [RSP + 0x14],0x1
JMP 0x00117993
LAB_00117941:
CALL 0x001174e0
CMP EAX,0x0
JNZ 0x00117955
MOV dword ptr [RSP + 0x14],0x2
JMP 0x00117993
LAB_00117955:
LEA RAX,[0x12b158]
MOV RDI,qword ptr [RAX]
MOV RDX,qword ptr [RSP + 0x8]
MOV ECX,dword ptr [RSP + 0x4]
LEA RSI,[0x124a6a]
MOV AL,0x0
CALL 0x001010f0
LEA RAX,[0x12b160]
MOV ECX,dword ptr [RAX]
ADD ECX,0x1
LEA RAX,[0x12b160]
MOV dword ptr [RAX],ECX
MOV dword ptr [RSP + 0x14],0x0
LAB_00117993:
MOV EAX,dword ptr [RSP + 0x14]
ADD RSP,0x18
RET
|
/* LefDefParser::defwSpecialNetWidth(char const*, int) */
int4 LefDefParser::defwSpecialNetWidth(char *param_1,int param_2)
{
int iVar1;
int4 local_4;
defwFunc = 0x32;
if (defwFile == (FILE *)0x0) {
local_4 = 1;
}
else {
iVar1 = defwSpecialNetOptions();
if (iVar1 == 0) {
local_4 = 2;
}
else {
fprintf(defwFile,"\n + WIDTH %s %d",param_1,(ulong)(uint)param_2);
defwLines = defwLines + 1;
local_4 = 0;
}
}
return local_4;
}
|
|
57,296
|
push_break_entry
|
bluesky950520[P]quickjs/quickjs.c
|
static void push_break_entry(JSFunctionDef *fd, BlockEnv *be,
JSAtom label_name,
int label_break, int label_cont,
int drop_count)
{
be->prev = fd->top_break;
fd->top_break = be;
be->label_name = label_name;
be->label_break = label_break;
be->label_cont = label_cont;
be->drop_count = drop_count;
be->label_finally = -1;
be->scope_level = fd->scope_level;
be->has_iterator = FALSE;
be->is_regular_stmt = FALSE;
}
|
O0
|
c
|
push_break_entry:
movq %rdi, -0x8(%rsp)
movq %rsi, -0x10(%rsp)
movl %edx, -0x14(%rsp)
movl %ecx, -0x18(%rsp)
movl %r8d, -0x1c(%rsp)
movl %r9d, -0x20(%rsp)
movq -0x8(%rsp), %rax
movq 0x180(%rax), %rcx
movq -0x10(%rsp), %rax
movq %rcx, (%rax)
movq -0x10(%rsp), %rcx
movq -0x8(%rsp), %rax
movq %rcx, 0x180(%rax)
movl -0x14(%rsp), %ecx
movq -0x10(%rsp), %rax
movl %ecx, 0x8(%rax)
movl -0x18(%rsp), %ecx
movq -0x10(%rsp), %rax
movl %ecx, 0xc(%rax)
movl -0x1c(%rsp), %ecx
movq -0x10(%rsp), %rax
movl %ecx, 0x10(%rax)
movl -0x20(%rsp), %ecx
movq -0x10(%rsp), %rax
movl %ecx, 0x14(%rax)
movq -0x10(%rsp), %rax
movl $0xffffffff, 0x18(%rax) # imm = 0xFFFFFFFF
movq -0x8(%rsp), %rax
movl 0xe8(%rax), %ecx
movq -0x10(%rsp), %rax
movl %ecx, 0x1c(%rax)
movq -0x10(%rsp), %rax
movb 0x20(%rax), %cl
andb $-0x2, %cl
orb $0x0, %cl
movb %cl, 0x20(%rax)
movq -0x10(%rsp), %rax
movb 0x20(%rax), %cl
andb $-0x3, %cl
orb $0x0, %cl
movb %cl, 0x20(%rax)
retq
nopw %cs:(%rax,%rax)
|
push_break_entry:
mov [rsp+var_8], rdi
mov [rsp+var_10], rsi
mov [rsp+var_14], edx
mov [rsp+var_18], ecx
mov [rsp+var_1C], r8d
mov [rsp+var_20], r9d
mov rax, [rsp+var_8]
mov rcx, [rax+180h]
mov rax, [rsp+var_10]
mov [rax], rcx
mov rcx, [rsp+var_10]
mov rax, [rsp+var_8]
mov [rax+180h], rcx
mov ecx, [rsp+var_14]
mov rax, [rsp+var_10]
mov [rax+8], ecx
mov ecx, [rsp+var_18]
mov rax, [rsp+var_10]
mov [rax+0Ch], ecx
mov ecx, [rsp+var_1C]
mov rax, [rsp+var_10]
mov [rax+10h], ecx
mov ecx, [rsp+var_20]
mov rax, [rsp+var_10]
mov [rax+14h], ecx
mov rax, [rsp+var_10]
mov dword ptr [rax+18h], 0FFFFFFFFh
mov rax, [rsp+var_8]
mov ecx, [rax+0E8h]
mov rax, [rsp+var_10]
mov [rax+1Ch], ecx
mov rax, [rsp+var_10]
mov cl, [rax+20h]
and cl, 0FEh
or cl, 0
mov [rax+20h], cl
mov rax, [rsp+var_10]
mov cl, [rax+20h]
and cl, 0FDh
or cl, 0
mov [rax+20h], cl
retn
|
long long push_break_entry(long long a1, long long a2, int a3, int a4, int a5, int a6)
{
long long result; // rax
*(_QWORD *)a2 = *(_QWORD *)(a1 + 384);
*(_QWORD *)(a1 + 384) = a2;
*(_DWORD *)(a2 + 8) = a3;
*(_DWORD *)(a2 + 12) = a4;
*(_DWORD *)(a2 + 16) = a5;
*(_DWORD *)(a2 + 20) = a6;
*(_DWORD *)(a2 + 24) = -1;
*(_DWORD *)(a2 + 28) = *(_DWORD *)(a1 + 232);
*(_BYTE *)(a2 + 32) &= ~1u;
result = a2;
*(_BYTE *)(a2 + 32) &= ~2u;
return result;
}
|
push_break_entry:
MOV qword ptr [RSP + -0x8],RDI
MOV qword ptr [RSP + -0x10],RSI
MOV dword ptr [RSP + -0x14],EDX
MOV dword ptr [RSP + -0x18],ECX
MOV dword ptr [RSP + -0x1c],R8D
MOV dword ptr [RSP + -0x20],R9D
MOV RAX,qword ptr [RSP + -0x8]
MOV RCX,qword ptr [RAX + 0x180]
MOV RAX,qword ptr [RSP + -0x10]
MOV qword ptr [RAX],RCX
MOV RCX,qword ptr [RSP + -0x10]
MOV RAX,qword ptr [RSP + -0x8]
MOV qword ptr [RAX + 0x180],RCX
MOV ECX,dword ptr [RSP + -0x14]
MOV RAX,qword ptr [RSP + -0x10]
MOV dword ptr [RAX + 0x8],ECX
MOV ECX,dword ptr [RSP + -0x18]
MOV RAX,qword ptr [RSP + -0x10]
MOV dword ptr [RAX + 0xc],ECX
MOV ECX,dword ptr [RSP + -0x1c]
MOV RAX,qword ptr [RSP + -0x10]
MOV dword ptr [RAX + 0x10],ECX
MOV ECX,dword ptr [RSP + -0x20]
MOV RAX,qword ptr [RSP + -0x10]
MOV dword ptr [RAX + 0x14],ECX
MOV RAX,qword ptr [RSP + -0x10]
MOV dword ptr [RAX + 0x18],0xffffffff
MOV RAX,qword ptr [RSP + -0x8]
MOV ECX,dword ptr [RAX + 0xe8]
MOV RAX,qword ptr [RSP + -0x10]
MOV dword ptr [RAX + 0x1c],ECX
MOV RAX,qword ptr [RSP + -0x10]
MOV CL,byte ptr [RAX + 0x20]
AND CL,0xfe
OR CL,0x0
MOV byte ptr [RAX + 0x20],CL
MOV RAX,qword ptr [RSP + -0x10]
MOV CL,byte ptr [RAX + 0x20]
AND CL,0xfd
OR CL,0x0
MOV byte ptr [RAX + 0x20],CL
RET
|
void push_break_entry(long param_1,int8 *param_2,int4 param_3,int4 param_4,
int4 param_5,int4 param_6)
{
*param_2 = *(int8 *)(param_1 + 0x180);
*(int8 **)(param_1 + 0x180) = param_2;
*(int4 *)(param_2 + 1) = param_3;
*(int4 *)((long)param_2 + 0xc) = param_4;
*(int4 *)(param_2 + 2) = param_5;
*(int4 *)((long)param_2 + 0x14) = param_6;
*(int4 *)(param_2 + 3) = 0xffffffff;
*(int4 *)((long)param_2 + 0x1c) = *(int4 *)(param_1 + 0xe8);
*(byte *)(param_2 + 4) = *(byte *)(param_2 + 4) & 0xfe;
*(byte *)(param_2 + 4) = *(byte *)(param_2 + 4) & 0xfd;
return;
}
|
|
57,297
|
add_private_class_field
|
bluesky950520[P]quickjs/quickjs.c
|
static int add_private_class_field(JSParseState *s, JSFunctionDef *fd,
JSAtom name, JSVarKindEnum var_kind, BOOL is_static)
{
JSContext *ctx = s->ctx;
JSVarDef *vd;
int idx;
idx = add_scope_var(ctx, fd, name, var_kind);
if (idx < 0)
return idx;
vd = &fd->vars[idx];
vd->is_lexical = 1;
vd->is_const = 1;
vd->is_static_private = is_static;
return idx;
}
|
O0
|
c
|
add_private_class_field:
subq $0x48, %rsp
movq %rdi, 0x38(%rsp)
movq %rsi, 0x30(%rsp)
movl %edx, 0x2c(%rsp)
movl %ecx, 0x28(%rsp)
movl %r8d, 0x24(%rsp)
movq 0x38(%rsp), %rax
movq (%rax), %rax
movq %rax, 0x18(%rsp)
movq 0x18(%rsp), %rdi
movq 0x30(%rsp), %rsi
movl 0x2c(%rsp), %edx
movl 0x28(%rsp), %ecx
callq 0xa7820
movl %eax, 0xc(%rsp)
cmpl $0x0, 0xc(%rsp)
jge 0xae374
movl 0xc(%rsp), %eax
movl %eax, 0x44(%rsp)
jmp 0xae3da
movq 0x30(%rsp), %rax
movq 0x90(%rax), %rax
movslq 0xc(%rsp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movq %rax, 0x10(%rsp)
movq 0x10(%rsp), %rax
movl 0xc(%rax), %ecx
andl $-0x3, %ecx
orl $0x2, %ecx
movl %ecx, 0xc(%rax)
movq 0x10(%rsp), %rax
movl 0xc(%rax), %ecx
andl $-0x2, %ecx
orl $0x1, %ecx
movl %ecx, 0xc(%rax)
movl 0x24(%rsp), %eax
movb %al, %cl
movq 0x10(%rsp), %rax
movzbl %cl, %edx
movl 0xc(%rax), %ecx
andl $0x1, %edx
shll $0x3, %edx
andl $-0x9, %ecx
orl %edx, %ecx
movl %ecx, 0xc(%rax)
movl 0xc(%rsp), %eax
movl %eax, 0x44(%rsp)
movl 0x44(%rsp), %eax
addq $0x48, %rsp
retq
nopw %cs:(%rax,%rax)
|
add_private_class_field:
sub rsp, 48h
mov [rsp+48h+var_10], rdi
mov [rsp+48h+var_18], rsi
mov [rsp+48h+var_1C], edx
mov [rsp+48h+var_20], ecx
mov [rsp+48h+var_24], r8d
mov rax, [rsp+48h+var_10]
mov rax, [rax]
mov [rsp+48h+var_30], rax
mov rdi, [rsp+48h+var_30]
mov rsi, [rsp+48h+var_18]
mov edx, [rsp+48h+var_1C]
mov ecx, [rsp+48h+var_20]
call add_scope_var
mov [rsp+48h+var_3C], eax
cmp [rsp+48h+var_3C], 0
jge short loc_AE374
mov eax, [rsp+48h+var_3C]
mov [rsp+48h+var_4], eax
jmp short loc_AE3DA
loc_AE374:
mov rax, [rsp+48h+var_18]
mov rax, [rax+90h]
movsxd rcx, [rsp+48h+var_3C]
shl rcx, 4
add rax, rcx
mov [rsp+48h+var_38], rax
mov rax, [rsp+48h+var_38]
mov ecx, [rax+0Ch]
and ecx, 0FFFFFFFDh
or ecx, 2
mov [rax+0Ch], ecx
mov rax, [rsp+48h+var_38]
mov ecx, [rax+0Ch]
and ecx, 0FFFFFFFEh
or ecx, 1
mov [rax+0Ch], ecx
mov eax, [rsp+48h+var_24]
mov cl, al
mov rax, [rsp+48h+var_38]
movzx edx, cl
mov ecx, [rax+0Ch]
and edx, 1
shl edx, 3
and ecx, 0FFFFFFF7h
or ecx, edx
mov [rax+0Ch], ecx
mov eax, [rsp+48h+var_3C]
mov [rsp+48h+var_4], eax
loc_AE3DA:
mov eax, [rsp+48h+var_4]
add rsp, 48h
retn
|
long long add_private_class_field(
long long *a1,
long long a2,
unsigned int a3,
unsigned int a4,
long long a5,
long long a6,
__m128 a7,
__m128 a8,
__m128 a9,
__m128 a10,
__m128 a11,
__m128 a12,
__m128 a13,
__m128 a14)
{
int v15; // [rsp+Ch] [rbp-3Ch]
long long v16; // [rsp+10h] [rbp-38h]
char v17; // [rsp+24h] [rbp-24h]
v17 = a5;
v15 = add_scope_var(*a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14);
if ( v15 >= 0 )
{
v16 = 16LL * v15 + *(_QWORD *)(a2 + 144);
*(_DWORD *)(v16 + 12) = *(_DWORD *)(v16 + 12) & 0xFFFFFFFD | 2;
*(_DWORD *)(v16 + 12) = *(_DWORD *)(v16 + 12) & 0xFFFFFFFE | 1;
*(_DWORD *)(v16 + 12) = (8 * (v17 & 1)) | *(_DWORD *)(v16 + 12) & 0xFFFFFFF7;
}
return (unsigned int)v15;
}
|
add_private_class_field:
SUB RSP,0x48
MOV qword ptr [RSP + 0x38],RDI
MOV qword ptr [RSP + 0x30],RSI
MOV dword ptr [RSP + 0x2c],EDX
MOV dword ptr [RSP + 0x28],ECX
MOV dword ptr [RSP + 0x24],R8D
MOV RAX,qword ptr [RSP + 0x38]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RSP + 0x18],RAX
MOV RDI,qword ptr [RSP + 0x18]
MOV RSI,qword ptr [RSP + 0x30]
MOV EDX,dword ptr [RSP + 0x2c]
MOV ECX,dword ptr [RSP + 0x28]
CALL 0x001a7820
MOV dword ptr [RSP + 0xc],EAX
CMP dword ptr [RSP + 0xc],0x0
JGE 0x001ae374
MOV EAX,dword ptr [RSP + 0xc]
MOV dword ptr [RSP + 0x44],EAX
JMP 0x001ae3da
LAB_001ae374:
MOV RAX,qword ptr [RSP + 0x30]
MOV RAX,qword ptr [RAX + 0x90]
MOVSXD RCX,dword ptr [RSP + 0xc]
SHL RCX,0x4
ADD RAX,RCX
MOV qword ptr [RSP + 0x10],RAX
MOV RAX,qword ptr [RSP + 0x10]
MOV ECX,dword ptr [RAX + 0xc]
AND ECX,0xfffffffd
OR ECX,0x2
MOV dword ptr [RAX + 0xc],ECX
MOV RAX,qword ptr [RSP + 0x10]
MOV ECX,dword ptr [RAX + 0xc]
AND ECX,0xfffffffe
OR ECX,0x1
MOV dword ptr [RAX + 0xc],ECX
MOV EAX,dword ptr [RSP + 0x24]
MOV CL,AL
MOV RAX,qword ptr [RSP + 0x10]
MOVZX EDX,CL
MOV ECX,dword ptr [RAX + 0xc]
AND EDX,0x1
SHL EDX,0x3
AND ECX,0xfffffff7
OR ECX,EDX
MOV dword ptr [RAX + 0xc],ECX
MOV EAX,dword ptr [RSP + 0xc]
MOV dword ptr [RSP + 0x44],EAX
LAB_001ae3da:
MOV EAX,dword ptr [RSP + 0x44]
ADD RSP,0x48
RET
|
int add_private_class_field
(int8 *param_1,long param_2,int4 param_3,int4 param_4,uint param_5)
{
int iVar1;
long lVar2;
iVar1 = add_scope_var(*param_1,param_2,param_3,param_4);
if (-1 < iVar1) {
lVar2 = *(long *)(param_2 + 0x90) + (long)iVar1 * 0x10;
*(uint *)(lVar2 + 0xc) = *(uint *)(lVar2 + 0xc) & 0xfffffffd | 2;
*(uint *)(lVar2 + 0xc) = *(uint *)(lVar2 + 0xc) & 0xfffffffe | 1;
*(uint *)(lVar2 + 0xc) = *(uint *)(lVar2 + 0xc) & 0xfffffff7 | (param_5 & 1) << 3;
}
return iVar1;
}
|
|
57,298
|
add_private_class_field
|
bluesky950520[P]quickjs/quickjs.c
|
static int add_private_class_field(JSParseState *s, JSFunctionDef *fd,
JSAtom name, JSVarKindEnum var_kind, BOOL is_static)
{
JSContext *ctx = s->ctx;
JSVarDef *vd;
int idx;
idx = add_scope_var(ctx, fd, name, var_kind);
if (idx < 0)
return idx;
vd = &fd->vars[idx];
vd->is_lexical = 1;
vd->is_const = 1;
vd->is_static_private = is_static;
return idx;
}
|
O1
|
c
|
add_private_class_field:
pushq %r14
pushq %rbx
pushq %rax
movl %r8d, %ebx
movq %rsi, %r14
movq (%rdi), %rdi
callq 0x65257
testl %eax, %eax
js 0x6a6a3
movq 0x90(%r14), %rcx
movl %eax, %edx
shlq $0x4, %rdx
movl 0xc(%rcx,%rdx), %esi
andl $0x1, %ebx
andl $-0xc, %esi
leal (%rsi,%rbx,8), %esi
addl $0x3, %esi
movl %esi, 0xc(%rcx,%rdx)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
|
add_private_class_field:
push r14
push rbx
push rax
mov ebx, r8d
mov r14, rsi
mov rdi, [rdi]
call add_scope_var
test eax, eax
js short loc_6A6A3
mov rcx, [r14+90h]
mov edx, eax
shl rdx, 4
mov esi, [rcx+rdx+0Ch]
and ebx, 1
and esi, 0FFFFFFF4h
lea esi, [rsi+rbx*8]
add esi, 3
mov [rcx+rdx+0Ch], esi
loc_6A6A3:
add rsp, 8
pop rbx
pop r14
retn
|
long long add_private_class_field(
long long *a1,
long long a2,
int a3,
long long a4,
long long a5,
long long a6,
__m128 a7,
__m128 a8,
__m128 a9,
__m128 a10,
__m128 a11,
__m128 a12,
__m128 a13,
__m128 a14)
{
char v14; // bl
long long result; // rax
v14 = a5;
result = add_scope_var(*a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14);
if ( (int)result >= 0 )
*(_DWORD *)(*(_QWORD *)(a2 + 144) + 16LL * (unsigned int)result + 12) = (*(_DWORD *)(*(_QWORD *)(a2 + 144)
+ 16LL * (unsigned int)result
+ 12) & 0xFFFFFFF4)
+ 8 * (v14 & 1)
+ 3;
return result;
}
|
add_private_class_field:
PUSH R14
PUSH RBX
PUSH RAX
MOV EBX,R8D
MOV R14,RSI
MOV RDI,qword ptr [RDI]
CALL 0x00165257
TEST EAX,EAX
JS 0x0016a6a3
MOV RCX,qword ptr [R14 + 0x90]
MOV EDX,EAX
SHL RDX,0x4
MOV ESI,dword ptr [RCX + RDX*0x1 + 0xc]
AND EBX,0x1
AND ESI,0xfffffff4
LEA ESI,[RSI + RBX*0x8]
ADD ESI,0x3
MOV dword ptr [RCX + RDX*0x1 + 0xc],ESI
LAB_0016a6a3:
ADD RSP,0x8
POP RBX
POP R14
RET
|
void add_private_class_field
(int8 *param_1,long param_2,int8 param_3,int8 param_4,uint param_5)
{
uint uVar1;
uVar1 = add_scope_var(*param_1);
if (-1 < (int)uVar1) {
*(uint *)(*(long *)(param_2 + 0x90) + 0xc + (ulong)uVar1 * 0x10) =
(*(uint *)(*(long *)(param_2 + 0x90) + 0xc + (ulong)uVar1 * 0x10) & 0xfffffff4) +
(param_5 & 1) * 8 + 3;
}
return;
}
|
|
57,299
|
u64toa
|
bluesky950520[P]quickjs/cutils.c
|
size_t u64toa(char buf[minimum_length(21)], uint64_t n)
{
if (likely(n < 0x100000000))
return u32toa(buf, n);
size_t len;
if (n >= TEN_POW_7) {
uint64_t n1 = n / TEN_POW_7;
n %= TEN_POW_7;
if (n1 >= TEN_POW_7) {
uint32_t quo = n1 / TEN_POW_7;
n1 %= TEN_POW_7;
len = u7toa_shift(buf, quo);
len = u07toa_shift(buf, n1, len);
} else {
len = u7toa_shift(buf, n1);
}
return u07toa_shift(buf, n, len);
}
return u7toa_shift(buf, n);
}
|
O0
|
c
|
u64toa:
subq $0x38, %rsp
movq %rdi, 0x28(%rsp)
movq %rsi, 0x20(%rsp)
movabsq $0x100000000, %rax # imm = 0x100000000
cmpq %rax, 0x20(%rsp)
setb %al
xorb $-0x1, %al
xorb $-0x1, %al
andb $0x1, %al
movzbl %al, %eax
cltq
cmpq $0x0, %rax
je 0x1f9ac
movq 0x28(%rsp), %rdi
movq 0x20(%rsp), %rax
movl %eax, %esi
callq 0x1f710
movq %rax, 0x30(%rsp)
jmp 0x1fa8e
cmpq $0x989680, 0x20(%rsp) # imm = 0x989680
jb 0x1fa78
movq 0x20(%rsp), %rax
movl $0x989680, %ecx # imm = 0x989680
xorl %edx, %edx
divq %rcx
movq %rax, 0x10(%rsp)
movq 0x20(%rsp), %rax
movl $0x989680, %ecx # imm = 0x989680
xorl %edx, %edx
divq %rcx
movq %rdx, 0x20(%rsp)
cmpq $0x989680, 0x10(%rsp) # imm = 0x989680
jb 0x1fa45
movq 0x10(%rsp), %rax
movl $0x989680, %ecx # imm = 0x989680
xorl %edx, %edx
divq %rcx
movl %eax, 0xc(%rsp)
movq 0x10(%rsp), %rax
movl $0x989680, %ecx # imm = 0x989680
xorl %edx, %edx
divq %rcx
movq %rdx, 0x10(%rsp)
movq 0x28(%rsp), %rdi
movl 0xc(%rsp), %esi
callq 0x1f7c0
movq %rax, 0x18(%rsp)
movq 0x28(%rsp), %rdi
movq 0x10(%rsp), %rax
movl %eax, %esi
movq 0x18(%rsp), %rdx
callq 0x1f8c0
movq %rax, 0x18(%rsp)
jmp 0x1fa5b
movq 0x28(%rsp), %rdi
movq 0x10(%rsp), %rax
movl %eax, %esi
callq 0x1f7c0
movq %rax, 0x18(%rsp)
movq 0x28(%rsp), %rdi
movq 0x20(%rsp), %rax
movl %eax, %esi
movq 0x18(%rsp), %rdx
callq 0x1f8c0
movq %rax, 0x30(%rsp)
jmp 0x1fa8e
movq 0x28(%rsp), %rdi
movq 0x20(%rsp), %rax
movl %eax, %esi
callq 0x1f7c0
movq %rax, 0x30(%rsp)
movq 0x30(%rsp), %rax
addq $0x38, %rsp
retq
nopl (%rax,%rax)
|
u64toa:
sub rsp, 38h
mov [rsp+38h+var_10], rdi
mov [rsp+38h+var_18], rsi
mov rax, 100000000h
cmp [rsp+38h+var_18], rax
setb al
xor al, 0FFh
xor al, 0FFh
and al, 1
movzx eax, al
cdqe
cmp rax, 0
jz short loc_1F9AC
mov rdi, [rsp+38h+var_10]
mov rax, [rsp+38h+var_18]
mov esi, eax
call u32toa
mov [rsp+38h+var_8], rax
jmp loc_1FA8E
loc_1F9AC:
cmp [rsp+38h+var_18], 989680h
jb loc_1FA78
mov rax, [rsp+38h+var_18]
mov ecx, 989680h
xor edx, edx
div rcx
mov [rsp+38h+var_28], rax
mov rax, [rsp+38h+var_18]
mov ecx, 989680h
xor edx, edx
div rcx
mov [rsp+38h+var_18], rdx
cmp [rsp+38h+var_28], 989680h
jb short loc_1FA45
mov rax, [rsp+38h+var_28]
mov ecx, 989680h
xor edx, edx
div rcx
mov [rsp+38h+var_2C], eax
mov rax, [rsp+38h+var_28]
mov ecx, 989680h
xor edx, edx
div rcx
mov [rsp+38h+var_28], rdx
mov rdi, [rsp+38h+var_10]
mov esi, [rsp+38h+var_2C]
call u7toa_shift
mov [rsp+38h+var_20], rax
mov rdi, [rsp+38h+var_10]
mov rax, [rsp+38h+var_28]
mov esi, eax
mov rdx, [rsp+38h+var_20]
call u07toa_shift
mov [rsp+38h+var_20], rax
jmp short loc_1FA5B
loc_1FA45:
mov rdi, [rsp+38h+var_10]
mov rax, [rsp+38h+var_28]
mov esi, eax
call u7toa_shift
mov [rsp+38h+var_20], rax
loc_1FA5B:
mov rdi, [rsp+38h+var_10]
mov rax, [rsp+38h+var_18]
mov esi, eax
mov rdx, [rsp+38h+var_20]
call u07toa_shift
mov [rsp+38h+var_8], rax
jmp short loc_1FA8E
loc_1FA78:
mov rdi, [rsp+38h+var_10]
mov rax, [rsp+38h+var_18]
mov esi, eax
call u7toa_shift
mov [rsp+38h+var_8], rax
loc_1FA8E:
mov rax, [rsp+38h+var_8]
add rsp, 38h
retn
|
long long u64toa(unsigned long long *a1, unsigned long long a2)
{
long long v2; // rax
unsigned long long v4; // [rsp+10h] [rbp-28h]
long long v5; // [rsp+18h] [rbp-20h]
if ( a2 < 0x100000000LL )
return u32toa(a1, a2);
v4 = a2 / 0x989680;
if ( a2 / 0x989680 < 0x989680 )
{
v5 = u7toa_shift(a1, (unsigned int)v4);
}
else
{
v2 = u7toa_shift(a1, (unsigned int)(v4 / 0x989680));
v5 = u07toa_shift((long long)a1, v4 % 0x989680, v2);
}
return u07toa_shift((long long)a1, a2 % 0x989680, v5);
}
|
u64toa:
SUB RSP,0x38
MOV qword ptr [RSP + 0x28],RDI
MOV qword ptr [RSP + 0x20],RSI
MOV RAX,0x100000000
CMP qword ptr [RSP + 0x20],RAX
SETC AL
XOR AL,0xff
XOR AL,0xff
AND AL,0x1
MOVZX EAX,AL
CDQE
CMP RAX,0x0
JZ 0x0011f9ac
MOV RDI,qword ptr [RSP + 0x28]
MOV RAX,qword ptr [RSP + 0x20]
MOV ESI,EAX
CALL 0x0011f710
MOV qword ptr [RSP + 0x30],RAX
JMP 0x0011fa8e
LAB_0011f9ac:
CMP qword ptr [RSP + 0x20],0x989680
JC 0x0011fa78
MOV RAX,qword ptr [RSP + 0x20]
MOV ECX,0x989680
XOR EDX,EDX
DIV RCX
MOV qword ptr [RSP + 0x10],RAX
MOV RAX,qword ptr [RSP + 0x20]
MOV ECX,0x989680
XOR EDX,EDX
DIV RCX
MOV qword ptr [RSP + 0x20],RDX
CMP qword ptr [RSP + 0x10],0x989680
JC 0x0011fa45
MOV RAX,qword ptr [RSP + 0x10]
MOV ECX,0x989680
XOR EDX,EDX
DIV RCX
MOV dword ptr [RSP + 0xc],EAX
MOV RAX,qword ptr [RSP + 0x10]
MOV ECX,0x989680
XOR EDX,EDX
DIV RCX
MOV qword ptr [RSP + 0x10],RDX
MOV RDI,qword ptr [RSP + 0x28]
MOV ESI,dword ptr [RSP + 0xc]
CALL 0x0011f7c0
MOV qword ptr [RSP + 0x18],RAX
MOV RDI,qword ptr [RSP + 0x28]
MOV RAX,qword ptr [RSP + 0x10]
MOV ESI,EAX
MOV RDX,qword ptr [RSP + 0x18]
CALL 0x0011f8c0
MOV qword ptr [RSP + 0x18],RAX
JMP 0x0011fa5b
LAB_0011fa45:
MOV RDI,qword ptr [RSP + 0x28]
MOV RAX,qword ptr [RSP + 0x10]
MOV ESI,EAX
CALL 0x0011f7c0
MOV qword ptr [RSP + 0x18],RAX
LAB_0011fa5b:
MOV RDI,qword ptr [RSP + 0x28]
MOV RAX,qword ptr [RSP + 0x20]
MOV ESI,EAX
MOV RDX,qword ptr [RSP + 0x18]
CALL 0x0011f8c0
MOV qword ptr [RSP + 0x30],RAX
JMP 0x0011fa8e
LAB_0011fa78:
MOV RDI,qword ptr [RSP + 0x28]
MOV RAX,qword ptr [RSP + 0x20]
MOV ESI,EAX
CALL 0x0011f7c0
MOV qword ptr [RSP + 0x30],RAX
LAB_0011fa8e:
MOV RAX,qword ptr [RSP + 0x30]
ADD RSP,0x38
RET
|
int8 u64toa(int8 param_1,ulong param_2)
{
int1 auVar1 [16];
ulong uVar2;
int8 uVar3;
int8 local_20;
int8 local_8;
if (param_2 < 0x100000000) {
local_8 = u32toa(param_1,param_2 & 0xffffffff);
}
else if (param_2 < 10000000) {
local_8 = u7toa_shift(param_1,param_2 & 0xffffffff);
}
else {
uVar2 = param_2 / 10000000;
if (uVar2 < 10000000) {
local_20 = u7toa_shift(param_1,uVar2 & 0xffffffff);
}
else {
auVar1._8_8_ = 0;
auVar1._0_8_ = uVar2;
uVar3 = u7toa_shift(param_1,SUB164(auVar1 / ZEXT816(10000000),0));
local_20 = u07toa_shift(param_1,uVar2 % 10000000,uVar3);
}
local_8 = u07toa_shift(param_1,param_2 % 10000000,local_20);
}
return local_8;
}
|
Subsets and Splits
C++ Functions Using STL
Identifies C++ functions that depend on standard library components, revealing patterns in how developers utilize STL libraries and potentially highlighting common coding practices or dependencies in the dataset.
C++ STL Function Queries
Filters C++ code examples that use standard library containers and algorithms, helping identify common programming patterns and library usage in code generation tasks.
Random Training Function Samples
Performs basic filtering and random sampling of assembly code data without revealing meaningful patterns or relationships.
Random Training Function Samples
Retrieves a random sample of 1000 records from the training dataset, providing basic data exploration but offering limited analytical value beyond seeing raw entries.