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
|
---|---|---|---|---|---|---|---|---|---|---|---|
8,900 |
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
|
monkey531[P]llama/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));
}
}
}
|
O0
|
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:
subq $0x88, %rsp
movq %rdi, 0x78(%rsp)
movq 0x78(%rsp), %rax
movq %rax, 0x28(%rsp)
cmpq $0x0, (%rax)
je 0xbaa9e
jmp 0xbaabd
leaq 0x11b412(%rip), %rdi # 0x1d5eb7
leaq 0x111e70(%rip), %rsi # 0x1cc91c
movl $0x338b, %edx # imm = 0x338B
leaq 0x1146d6(%rip), %rcx # 0x1cf18e
callq 0x50230
movq 0x28(%rsp), %rax
movq (%rax), %rax
movzbl (%rax), %eax
movq %rax, 0x20(%rsp)
subq $0x9, %rax
ja 0xbabe0
movq 0x20(%rsp), %rax
leaq 0x10809d(%rip), %rcx # 0x1c2b80
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq 0x28(%rsp), %rax
movq %rax, %rcx
addq $0x8, %rcx
movq %rcx, 0x18(%rsp)
movq (%rax), %rax
movq 0x8(%rax), %rdi
callq 0xa2ac0
movq 0x18(%rsp), %rdi
movq %rax, 0x70(%rsp)
leaq 0x70(%rsp), %rsi
callq 0xa2af0
testb $0x1, %al
jne 0xbab23
jmp 0xbab25
jmp 0xbab44
leaq 0x114705(%rip), %rdi # 0x1cf231
leaq 0x111de9(%rip), %rsi # 0x1cc91c
movl $0x3391, %edx # imm = 0x3391
leaq 0x11464f(%rip), %rcx # 0x1cf18e
callq 0x50230
movq 0x28(%rsp), %rdi
addq $0x8, %rdi
callq 0xbbbe0
addq $0x20, %rax
movq %rax, 0x80(%rsp)
jmp 0xbaccc
movq 0x28(%rsp), %rax
movq %rax, %rcx
addq $0x8, %rcx
addq $0x8, %rcx
movq %rcx, 0x10(%rsp)
movq (%rax), %rax
movq 0x8(%rax), %rdi
callq 0xa2a10
movq 0x10(%rsp), %rdi
movq %rax, 0x68(%rsp)
leaq 0x68(%rsp), %rsi
callq 0xbbbf0
testb $0x1, %al
jne 0xbab9e
jmp 0xbaba0
jmp 0xbabbf
leaq 0x1146c9(%rip), %rdi # 0x1cf270
leaq 0x111d6e(%rip), %rsi # 0x1cc91c
movl $0x3397, %edx # imm = 0x3397
leaq 0x1145d4(%rip), %rcx # 0x1cf18e
callq 0x50230
movq 0x28(%rsp), %rdi
addq $0x8, %rdi
addq $0x8, %rdi
callq 0xa3b60
movq %rax, 0x80(%rsp)
jmp 0xbaccc
jmp 0xbabe0
movq 0x28(%rsp), %rdi
addq $0x8, %rdi
addq $0x10, %rdi
callq 0xbbc30
xorb $-0x1, %al
xorb $-0x1, %al
testb $0x1, %al
jne 0xbabfc
jmp 0xbac11
movq 0x28(%rsp), %rax
movq (%rax), %rax
movq %rax, 0x80(%rsp)
jmp 0xbaccc
movb $0x1, 0x33(%rsp)
movl $0x20, %edi
callq 0x50540
movq %rax, (%rsp)
leaq 0x47(%rsp), %rdi
movq %rdi, 0x8(%rsp)
callq 0x50d60
movq 0x8(%rsp), %rdx
leaq 0x11466e(%rip), %rsi # 0x1cf2ad
leaq 0x48(%rsp), %rdi
callq 0x61bd0
jmp 0xbac4b
movq (%rsp), %rdi
movq 0x28(%rsp), %rax
movq (%rax), %rcx
movl $0xd6, %esi
leaq 0x48(%rsp), %rdx
callq 0xbb830
jmp 0xbac68
movq (%rsp), %rdi
movb $0x0, 0x33(%rsp)
leaq 0x1975a8(%rip), %rsi # 0x252220
leaq 0xd61(%rip), %rdx # 0xbb9e0
callq 0x508f0
jmp 0xbace6
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x38(%rsp)
movl %eax, 0x34(%rsp)
jmp 0xbacae
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x38(%rsp)
movl %eax, 0x34(%rsp)
leaq 0x48(%rsp), %rdi
callq 0x510c0
leaq 0x47(%rsp), %rdi
callq 0x510a0
testb $0x1, 0x33(%rsp)
jne 0xbacc1
jmp 0xbacca
movq (%rsp), %rdi
callq 0x50c40
jmp 0xbacdc
movq 0x80(%rsp), %rax
addq $0x88, %rsp
retq
movq 0x38(%rsp), %rdi
callq 0x50940
nopw %cs:(%rax,%rax)
|
_ZNK8nlohmann16json_abi_v3_11_36detail9iter_implINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEEptEv:
sub rsp, 88h
mov qword ptr [rsp+88h+var_10], rdi; int
mov rax, qword ptr [rsp+88h+var_10]
mov qword ptr [rsp+88h+var_60], rax; int
cmp qword ptr [rax], 0
jz short loc_BAA9E
jmp short loc_BAABD
loc_BAA9E:
lea rdi, aAnchorMObjectN+7; "m_object != nullptr"
lea rsi, aWorkspaceLlm4b_1; "/workspace/llm4binary/github/2025_star3"...
mov edx, 338Bh
lea rcx, aPointerNlohman; "pointer nlohmann::detail::iter_impl<nlo"...
call ___assert_fail
loc_BAABD:
mov rax, qword ptr [rsp+88h+var_60]
mov rax, [rax]
movzx eax, byte ptr [rax]
mov qword ptr [rsp+88h+var_68], rax; int
sub rax, 9; switch 10 cases
ja def_BAAEA; jumptable 00000000000BAAEA default case
mov rax, qword ptr [rsp+88h+var_68]
lea rcx, jpt_BAAEA
movsxd rax, ds:(jpt_BAAEA - 1C2B80h)[rcx+rax*4]
add rax, rcx
jmp rax; switch jump
loc_BAAEC:
mov rax, qword ptr [rsp+88h+var_60]; jumptable 00000000000BAAEA case 1
mov rcx, rax
add rcx, 8
mov [rsp+88h+var_70], rcx
mov rax, [rax]
mov rdi, [rax+8]
call _ZNSt6vectorISt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN8nlohmann16json_abi_v3_11_310basic_jsonINS9_11ordered_mapES_S6_blmdSaNS9_14adl_serializerES_IhSaIhEEvEEESaISG_EE3endEv; std::vector<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>>::end(void)
mov rdi, [rsp+88h+var_70]
mov [rsp+88h+var_18], rax
lea rsi, [rsp+88h+var_18]
call _ZN9__gnu_cxxneIPSt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN8nlohmann16json_abi_v3_11_310basic_jsonINSA_11ordered_mapESt6vectorS7_blmdSaNSA_14adl_serializerESD_IhSaIhEEvEEESD_ISI_SaISI_EEEEbRKNS_17__normal_iteratorIT_T0_EESR_; __gnu_cxx::operator!=<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>> *,std::vector<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>>>(__gnu_cxx::__normal_iterator<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>> *,std::vector<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>>> const&,__gnu_cxx::__normal_iterator<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>> *,std::vector<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>>> const&)
test al, 1
jnz short loc_BAB23
jmp short loc_BAB25
loc_BAB23:
jmp short loc_BAB44
loc_BAB25:
lea rdi, aMItObjectItera; "m_it.object_iterator != m_object->m_dat"...
lea rsi, aWorkspaceLlm4b_1; "/workspace/llm4binary/github/2025_star3"...
mov edx, 3391h
lea rcx, aPointerNlohman; "pointer nlohmann::detail::iter_impl<nlo"...
call ___assert_fail
loc_BAB44:
mov rdi, qword ptr [rsp+88h+var_60]
add rdi, 8
call _ZNK9__gnu_cxx17__normal_iteratorIPSt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN8nlohmann16json_abi_v3_11_310basic_jsonINSA_11ordered_mapESt6vectorS7_blmdSaNSA_14adl_serializerESD_IhSaIhEEvEEESD_ISI_SaISI_EEEptEv; __gnu_cxx::__normal_iterator<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>> *,std::vector<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>>>::operator->(void)
add rax, 20h ; ' '
mov [rsp+88h+var_8], rax
jmp loc_BACCC
loc_BAB63:
mov rax, qword ptr [rsp+88h+var_60]; jumptable 00000000000BAAEA case 2
mov rcx, rax
add rcx, 8
add rcx, 8
mov [rsp+88h+var_78], rcx
mov rax, [rax]
mov rdi, [rax+8]
call _ZNSt6vectorIN8nlohmann16json_abi_v3_11_310basic_jsonINS1_11ordered_mapES_NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES_IhSaIhEEvEESaISD_EE3endEv; std::vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>::end(void)
mov rdi, [rsp+88h+var_78]
mov [rsp+88h+var_20], rax
lea rsi, [rsp+88h+var_20]
call _ZN9__gnu_cxxneIPN8nlohmann16json_abi_v3_11_310basic_jsonINS2_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS2_14adl_serializerES5_IhSaIhEEvEES5_ISF_SaISF_EEEEbRKNS_17__normal_iteratorIT_T0_EESO_; __gnu_cxx::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> *,std::vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>>(__gnu_cxx::__normal_iterator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> *,std::vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>> const&,__gnu_cxx::__normal_iterator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> *,std::vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>> const&)
test al, 1
jnz short loc_BAB9E
jmp short loc_BABA0
loc_BAB9E:
jmp short loc_BABBF
loc_BABA0:
lea rdi, aMItArrayIterat; "m_it.array_iterator != m_object->m_data"...
lea rsi, aWorkspaceLlm4b_1; "/workspace/llm4binary/github/2025_star3"...
mov edx, 3397h
lea rcx, aPointerNlohman; "pointer nlohmann::detail::iter_impl<nlo"...
call ___assert_fail
loc_BABBF:
mov rdi, qword ptr [rsp+88h+var_60]
add rdi, 8
add rdi, 8
call _ZNK9__gnu_cxx17__normal_iteratorIPN8nlohmann16json_abi_v3_11_310basic_jsonINS2_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS2_14adl_serializerES5_IhSaIhEEvEES5_ISF_SaISF_EEEdeEv; __gnu_cxx::__normal_iterator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> *,std::vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>>::operator*(void)
mov [rsp+88h+var_8], rax
jmp loc_BACCC
loc_BABDE:
jmp short $+2; jumptable 00000000000BAAEA cases 0,3-9
def_BAAEA:
mov rdi, qword ptr [rsp+88h+var_60]; jumptable 00000000000BAAEA default case
add rdi, 8
add rdi, 10h; this
call _ZNK8nlohmann16json_abi_v3_11_36detail20primitive_iterator_t8is_beginEv; nlohmann::json_abi_v3_11_3::detail::primitive_iterator_t::is_begin(void)
xor al, 0FFh
xor al, 0FFh
test al, 1
jnz short loc_BABFC
jmp short loc_BAC11
loc_BABFC:
mov rax, qword ptr [rsp+88h+var_60]
mov rax, [rax]
mov [rsp+88h+var_8], rax
jmp loc_BACCC
loc_BAC11:
mov [rsp+88h+var_55], 1
mov edi, 20h ; ' '; thrown_size
call ___cxa_allocate_exception
mov [rsp+88h+var_88], rax; int
lea rdi, [rsp+88h+var_41]
mov qword ptr [rsp+88h+var_80], rdi; int
call __ZNSaIcEC1Ev; std::allocator<char>::allocator(void)
mov rdx, qword ptr [rsp+88h+var_80]
lea rsi, aCannotGetValue; "cannot get value"
lea rdi, [rsp+88h+var_41+1]
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&)
jmp short $+2
loc_BAC4B:
mov rdi, [rsp+88h+var_88]; int
mov rax, qword ptr [rsp+88h+var_60]
mov rcx, [rax]
mov esi, 0D6h
lea rdx, [rsp+88h+var_41+1]
call _ZN8nlohmann16json_abi_v3_11_36detail16invalid_iterator6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_
jmp short $+2
loc_BAC68:
mov rdi, [rsp+88h+var_88]; void *
mov [rsp+88h+var_55], 0
lea rsi, _ZTIN8nlohmann16json_abi_v3_11_36detail16invalid_iteratorE; lptinfo
lea rdx, _ZN8nlohmann16json_abi_v3_11_36detail16invalid_iteratorD2Ev; void (*)(void *)
call ___cxa_throw
jmp short loc_BACE6
mov rcx, rax
mov eax, edx
mov [rsp+arg_30], rcx
mov [rsp+arg_2C], eax
jmp short loc_BACAE
mov rcx, rax
mov eax, edx
mov [rsp+arg_30], rcx
mov [rsp+arg_2C], eax
lea rdi, [rsp+arg_40]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
loc_BACAE:
lea rdi, [rsp+arg_3F]
call __ZNSaIcED1Ev; std::allocator<char>::~allocator()
test [rsp+arg_2B], 1
jnz short loc_BACC1
jmp short loc_BACCA
loc_BACC1:
mov rdi, [rsp+0]; void *
call ___cxa_free_exception
loc_BACCA:
jmp short loc_BACDC
loc_BACCC:
mov rax, [rsp+88h+var_8]
add rsp, 88h
retn
loc_BACDC:
mov rdi, [rsp+arg_30]
call __Unwind_Resume
loc_BACE6:
nop word ptr [rax+rax+00000000h]
|
operator->:
SUB RSP,0x88
MOV qword ptr [RSP + 0x78],RDI
MOV RAX,qword ptr [RSP + 0x78]
MOV qword ptr [RSP + 0x28],RAX
CMP qword ptr [RAX],0x0
JZ 0x001baa9e
JMP 0x001baabd
LAB_001baa9e:
LEA RDI,[0x2d5eb7]
LEA RSI,[0x2cc91c]
MOV EDX,0x338b
LEA RCX,[0x2cf18e]
CALL 0x00150230
LAB_001baabd:
MOV RAX,qword ptr [RSP + 0x28]
MOV RAX,qword ptr [RAX]
MOVZX EAX,byte ptr [RAX]
MOV qword ptr [RSP + 0x20],RAX
SUB RAX,0x9
JA 0x001babe0
MOV RAX,qword ptr [RSP + 0x20]
LEA RCX,[0x2c2b80]
MOVSXD RAX,dword ptr [RCX + RAX*0x4]
ADD RAX,RCX
switchD:
JMP RAX
caseD_1:
MOV RAX,qword ptr [RSP + 0x28]
MOV RCX,RAX
ADD RCX,0x8
MOV qword ptr [RSP + 0x18],RCX
MOV RAX,qword ptr [RAX]
MOV RDI,qword ptr [RAX + 0x8]
CALL 0x001a2ac0
MOV RDI,qword ptr [RSP + 0x18]
MOV qword ptr [RSP + 0x70],RAX
LEA RSI,[RSP + 0x70]
CALL 0x001a2af0
TEST AL,0x1
JNZ 0x001bab23
JMP 0x001bab25
LAB_001bab23:
JMP 0x001bab44
LAB_001bab25:
LEA RDI,[0x2cf231]
LEA RSI,[0x2cc91c]
MOV EDX,0x3391
LEA RCX,[0x2cf18e]
CALL 0x00150230
LAB_001bab44:
MOV RDI,qword ptr [RSP + 0x28]
ADD RDI,0x8
CALL 0x001bbbe0
ADD RAX,0x20
MOV qword ptr [RSP + 0x80],RAX
JMP 0x001baccc
caseD_2:
MOV RAX,qword ptr [RSP + 0x28]
MOV RCX,RAX
ADD RCX,0x8
ADD RCX,0x8
MOV qword ptr [RSP + 0x10],RCX
MOV RAX,qword ptr [RAX]
MOV RDI,qword ptr [RAX + 0x8]
CALL 0x001a2a10
MOV RDI,qword ptr [RSP + 0x10]
MOV qword ptr [RSP + 0x68],RAX
LEA RSI,[RSP + 0x68]
CALL 0x001bbbf0
TEST AL,0x1
JNZ 0x001bab9e
JMP 0x001baba0
LAB_001bab9e:
JMP 0x001babbf
LAB_001baba0:
LEA RDI,[0x2cf270]
LEA RSI,[0x2cc91c]
MOV EDX,0x3397
LEA RCX,[0x2cf18e]
CALL 0x00150230
LAB_001babbf:
MOV RDI,qword ptr [RSP + 0x28]
ADD RDI,0x8
ADD RDI,0x8
CALL 0x001a3b60
MOV qword ptr [RSP + 0x80],RAX
JMP 0x001baccc
caseD_0:
JMP 0x001babe0
default:
MOV RDI,qword ptr [RSP + 0x28]
ADD RDI,0x8
ADD RDI,0x10
CALL 0x001bbc30
XOR AL,0xff
XOR AL,0xff
TEST AL,0x1
JNZ 0x001babfc
JMP 0x001bac11
LAB_001babfc:
MOV RAX,qword ptr [RSP + 0x28]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RSP + 0x80],RAX
JMP 0x001baccc
LAB_001bac11:
MOV byte ptr [RSP + 0x33],0x1
MOV EDI,0x20
CALL 0x00150540
MOV qword ptr [RSP],RAX
LEA RDI,[RSP + 0x47]
MOV qword ptr [RSP + 0x8],RDI
CALL 0x00150d60
MOV RDX,qword ptr [RSP + 0x8]
LAB_001bac38:
LEA RSI,[0x2cf2ad]
LEA RDI,[RSP + 0x48]
CALL 0x00161bd0
JMP 0x001bac4b
LAB_001bac4b:
MOV RDI,qword ptr [RSP]
MOV RAX,qword ptr [RSP + 0x28]
MOV RCX,qword ptr [RAX]
LAB_001bac57:
MOV ESI,0xd6
LEA RDX,[RSP + 0x48]
CALL 0x001bb830
JMP 0x001bac68
LAB_001bac68:
MOV RDI,qword ptr [RSP]
MOV byte ptr [RSP + 0x33],0x0
LEA RSI,[0x352220]
LEA RDX,[0x1bb9e0]
CALL 0x001508f0
LAB_001baccc:
MOV RAX,qword ptr [RSP + 0x80]
ADD RSP,0x88
RET
|
/* 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 */
long __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)
{
bool bVar1;
byte bVar2;
int8 uVar3;
allocator local_41;
string local_40 [32];
int8 local_20;
int8 local_18;
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>>
*local_10;
long local_8;
local_10 = this;
if (*(long *)this == 0) {
/* WARNING: Subroutine does not return */
__assert_fail("m_object != nullptr",
"/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/./json.hpp",
0x338b,
"pointer nlohmann::detail::iter_impl<nlohmann::basic_json<nlohmann::ordered_map>>::operator->() const [BasicJsonType = nlohmann::basic_json<nlohmann::ordered_map>]"
);
}
switch(**(int1 **)this) {
case 0:
case 3:
case 4:
case 5:
case 6:
case 7:
case 8:
case 9:
default:
bVar2 = primitive_iterator_t::is_begin((primitive_iterator_t *)(this + 0x18));
if ((bVar2 & 1) == 0) {
uVar3 = __cxa_allocate_exception(0x20);
std::allocator<char>::allocator();
/* try { // try from 001bac38 to 001bac48 has its CatchHandler @ 001bac86 */
std::__cxx11::string::string<std::allocator<char>>(local_40,"cannot get value",&local_41);
/* try { // try from 001bac57 to 001bac83 has its CatchHandler @ 001bac96 */
_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,invalid_iterator::~invalid_iterator);
}
local_8 = *(long *)this;
break;
case 1:
local_18 = std::
vector<std::pair<std::__cxx11::string_const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>,std::allocator<std::pair<std::__cxx11::string_const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>>
::end(*(vector<std::pair<std::__cxx11::string_const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>,std::allocator<std::pair<std::__cxx11::string_const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>>
**)(*(long *)this + 8));
bVar1 = __gnu_cxx::operator!=((__normal_iterator *)(this + 8),(__normal_iterator *)&local_18);
if (!bVar1) {
/* WARNING: Subroutine does not return */
__assert_fail("m_it.object_iterator != m_object->m_data.m_value.object->end()",
"/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/./json.hpp",
0x3391,
"pointer nlohmann::detail::iter_impl<nlohmann::basic_json<nlohmann::ordered_map>>::operator->() const [BasicJsonType = nlohmann::basic_json<nlohmann::ordered_map>]"
);
}
local_8 = __gnu_cxx::
__normal_iterator<std::pair<std::__cxx11::string_const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>*,std::vector<std::pair<std::__cxx11::string_const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>,std::allocator<std::pair<std::__cxx11::string_const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>>>
::operator->((__normal_iterator<std::pair<std::__cxx11::string_const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>*,std::vector<std::pair<std::__cxx11::string_const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>,std::allocator<std::pair<std::__cxx11::string_const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>>>
*)(this + 8));
local_8 = local_8 + 0x20;
break;
case 2:
local_20 = std::
vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>
::end(*(vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>
**)(*(long *)this + 8));
bVar1 = __gnu_cxx::operator!=((__normal_iterator *)(this + 0x10),(__normal_iterator *)&local_20)
;
if (!bVar1) {
/* WARNING: Subroutine does not return */
__assert_fail("m_it.array_iterator != m_object->m_data.m_value.array->end()",
"/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/./json.hpp",
0x3397,
"pointer nlohmann::detail::iter_impl<nlohmann::basic_json<nlohmann::ordered_map>>::operator->() const [BasicJsonType = nlohmann::basic_json<nlohmann::ordered_map>]"
);
}
local_8 = __gnu_cxx::
__normal_iterator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>*,std::vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>>
::operator*((__normal_iterator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>*,std::vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>>
*)(this + 0x10));
}
return local_8;
}
|
||
8,901 |
OpenSubdiv::v3_6_0::Vtr::internal::Refinement::populateEdgeParentFromParentEdges(OpenSubdiv::v3_6_0::Vtr::internal::Refinement::ChildTag const (*) [4])
|
NVIDIA-RTX[P]OSD-Lite/opensubdiv/vtr/refinement.cpp
|
void
Refinement::populateEdgeParentFromParentEdges(ChildTag const initialChildTags[2][4]) {
if (_uniform) {
Index cEdge = getFirstChildEdgeFromEdges();
for (Index pEdge = 0; pEdge < _parent->getNumEdges(); ++pEdge, cEdge += 2) {
_childEdgeTag[cEdge + 0] = initialChildTags[0][0];
_childEdgeTag[cEdge + 1] = initialChildTags[0][1];
_childEdgeParentIndex[cEdge + 0] = pEdge;
_childEdgeParentIndex[cEdge + 1] = pEdge;
}
} else {
for (Index pEdge = 0; pEdge < _parent->getNumEdges(); ++pEdge) {
bool incomplete = !_parentEdgeTag[pEdge]._selected;
IndexArray cEdges = getEdgeChildEdges(pEdge);
if (!incomplete) {
_childEdgeTag[cEdges[0]] = initialChildTags[0][0];
_childEdgeTag[cEdges[1]] = initialChildTags[0][1];
_childEdgeParentIndex[cEdges[0]] = pEdge;
_childEdgeParentIndex[cEdges[1]] = pEdge;
} else {
for (int i = 0; i < 2; ++i) {
if (IndexIsValid(cEdges[i])) {
_childEdgeTag[cEdges[i]] = initialChildTags[incomplete][i];
_childEdgeParentIndex[cEdges[i]] = pEdge;
}
}
}
}
}
}
|
O0
|
cpp
|
OpenSubdiv::v3_6_0::Vtr::internal::Refinement::populateEdgeParentFromParentEdges(OpenSubdiv::v3_6_0::Vtr::internal::Refinement::ChildTag const (*) [4]):
pushq %rbp
movq %rsp, %rbp
subq $0xe0, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x50(%rbp)
testb $0x1, 0x24(%rax)
je 0x10041f
movq -0x50(%rbp), %rdi
callq 0xd0770
movl %eax, -0x14(%rbp)
movl $0x0, -0x18(%rbp)
movq -0x50(%rbp), %rax
movl -0x18(%rbp), %ecx
movl %ecx, -0x54(%rbp)
movq 0x8(%rax), %rdi
callq 0xca130
movl %eax, %ecx
movl -0x54(%rbp), %eax
cmpl %ecx, %eax
jge 0x10041a
movq -0x50(%rbp), %rdi
movq -0x10(%rbp), %rax
movq %rax, -0x70(%rbp)
addq $0x168, %rdi # imm = 0x168
movl -0x14(%rbp), %eax
addl $0x0, %eax
movslq %eax, %rsi
callq 0xcb1f0
movq -0x70(%rbp), %rcx
movq -0x50(%rbp), %rdi
movb (%rcx), %cl
movb %cl, (%rax)
movq -0x10(%rbp), %rax
movq %rax, -0x68(%rbp)
addq $0x168, %rdi # imm = 0x168
movl -0x14(%rbp), %eax
addl $0x1, %eax
movslq %eax, %rsi
callq 0xcb1f0
movq -0x68(%rbp), %rcx
movq -0x50(%rbp), %rdi
movb 0x1(%rcx), %cl
movb %cl, (%rax)
movl -0x18(%rbp), %eax
movl %eax, -0x5c(%rbp)
addq $0x120, %rdi # imm = 0x120
movl -0x14(%rbp), %eax
addl $0x0, %eax
movslq %eax, %rsi
callq 0xc7140
movl -0x5c(%rbp), %ecx
movq -0x50(%rbp), %rdi
movl %ecx, (%rax)
movl -0x18(%rbp), %eax
movl %eax, -0x58(%rbp)
addq $0x120, %rdi # imm = 0x120
movl -0x14(%rbp), %eax
addl $0x1, %eax
movslq %eax, %rsi
callq 0xc7140
movl -0x58(%rbp), %ecx
movl %ecx, (%rax)
movl -0x18(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x18(%rbp)
movl -0x14(%rbp), %eax
addl $0x2, %eax
movl %eax, -0x14(%rbp)
jmp 0x100348
jmp 0x100686
movl $0x0, -0x1c(%rbp)
movq -0x50(%rbp), %rax
movl -0x1c(%rbp), %ecx
movl %ecx, -0x74(%rbp)
movq 0x8(%rax), %rdi
callq 0xca130
movl %eax, %ecx
movl -0x74(%rbp), %eax
cmpl %ecx, %eax
jge 0x100684
movq -0x50(%rbp), %rdi
addq $0x1b0, %rdi # imm = 0x1B0
movslq -0x1c(%rbp), %rsi
callq 0xccd50
movq -0x50(%rbp), %rdi
movb (%rax), %al
testb $0x1, %al
sete -0x1d(%rbp)
movl -0x1c(%rbp), %esi
callq 0xd6850
movl %edx, -0x38(%rbp)
movq %rax, -0x40(%rbp)
movq -0x40(%rbp), %rax
movq %rax, -0x30(%rbp)
movl -0x38(%rbp), %eax
movl %eax, -0x28(%rbp)
testb $0x1, -0x1d(%rbp)
jne 0x100590
movq -0x50(%rbp), %rax
movq -0x10(%rbp), %rcx
movq %rcx, -0xa8(%rbp)
addq $0x168, %rax # imm = 0x168
movq %rax, -0xb0(%rbp)
leaq -0x30(%rbp), %rdi
xorl %esi, %esi
callq 0xc37f0
movq -0xb0(%rbp), %rdi
movslq (%rax), %rsi
callq 0xcb1f0
movq -0xa8(%rbp), %rdx
movq %rax, %rcx
movq -0x50(%rbp), %rax
movb (%rdx), %dl
movb %dl, (%rcx)
movq -0x10(%rbp), %rcx
movq %rcx, -0x98(%rbp)
addq $0x168, %rax # imm = 0x168
movq %rax, -0xa0(%rbp)
leaq -0x30(%rbp), %rdi
movl $0x1, %esi
callq 0xc37f0
movq -0xa0(%rbp), %rdi
movslq (%rax), %rsi
callq 0xcb1f0
movq -0x98(%rbp), %rdx
movq %rax, %rcx
movq -0x50(%rbp), %rax
movb 0x1(%rdx), %dl
movb %dl, (%rcx)
movl -0x1c(%rbp), %ecx
movl %ecx, -0x84(%rbp)
addq $0x120, %rax # imm = 0x120
movq %rax, -0x90(%rbp)
leaq -0x30(%rbp), %rdi
xorl %esi, %esi
callq 0xc37f0
movq -0x90(%rbp), %rdi
movslq (%rax), %rsi
callq 0xc7140
movl -0x84(%rbp), %edx
movq %rax, %rcx
movq -0x50(%rbp), %rax
movl %edx, (%rcx)
movl -0x1c(%rbp), %ecx
movl %ecx, -0x78(%rbp)
addq $0x120, %rax # imm = 0x120
movq %rax, -0x80(%rbp)
leaq -0x30(%rbp), %rdi
movl $0x1, %esi
callq 0xc37f0
movq -0x80(%rbp), %rdi
movslq (%rax), %rsi
callq 0xc7140
movl -0x78(%rbp), %ecx
movl %ecx, (%rax)
jmp 0x100674
movl $0x0, -0x44(%rbp)
cmpl $0x2, -0x44(%rbp)
jge 0x100672
movl -0x44(%rbp), %esi
leaq -0x30(%rbp), %rdi
callq 0xc37f0
movl (%rax), %edi
callq 0xd63b0
testb $0x1, %al
jne 0x1005bd
jmp 0x100662
movq -0x50(%rbp), %rax
movq -0x10(%rbp), %rcx
movb -0x1d(%rbp), %dl
andb $0x1, %dl
movzbl %dl, %edx
shlq $0x2, %rdx
addq %rdx, %rcx
movq %rcx, -0xc8(%rbp)
movslq -0x44(%rbp), %rcx
movq %rcx, -0xd0(%rbp)
addq $0x168, %rax # imm = 0x168
movq %rax, -0xd8(%rbp)
movl -0x44(%rbp), %esi
leaq -0x30(%rbp), %rdi
callq 0xc37f0
movq -0xd8(%rbp), %rdi
movslq (%rax), %rsi
callq 0xcb1f0
movq -0xd0(%rbp), %rsi
movq -0xc8(%rbp), %rdx
movq %rax, %rcx
movq -0x50(%rbp), %rax
movb (%rdx,%rsi), %dl
movb %dl, (%rcx)
movl -0x1c(%rbp), %ecx
movl %ecx, -0xb4(%rbp)
addq $0x120, %rax # imm = 0x120
movq %rax, -0xc0(%rbp)
movl -0x44(%rbp), %esi
leaq -0x30(%rbp), %rdi
callq 0xc37f0
movq -0xc0(%rbp), %rdi
movslq (%rax), %rsi
callq 0xc7140
movl -0xb4(%rbp), %ecx
movl %ecx, (%rax)
jmp 0x100664
movl -0x44(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x44(%rbp)
jmp 0x100597
jmp 0x100674
jmp 0x100676
movl -0x1c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1c(%rbp)
jmp 0x100426
jmp 0x100686
addq $0xe0, %rsp
popq %rbp
retq
nop
|
_ZN10OpenSubdiv6v3_6_03Vtr8internal10Refinement33populateEdgeParentFromParentEdgesEPA4_KNS3_8ChildTagE:
push rbp
mov rbp, rsp
sub rsp, 0E0h
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov rax, [rbp+var_8]
mov [rbp+var_50], rax
test byte ptr [rax+24h], 1
jz loc_10041F
mov rdi, [rbp+var_50]; this
call __ZNK10OpenSubdiv6v3_6_03Vtr8internal10Refinement26getFirstChildEdgeFromEdgesEv; OpenSubdiv::v3_6_0::Vtr::internal::Refinement::getFirstChildEdgeFromEdges(void)
mov [rbp+var_14], eax
mov [rbp+var_18], 0
loc_100348:
mov rax, [rbp+var_50]
mov ecx, [rbp+var_18]
mov [rbp+var_54], ecx
mov rdi, [rax+8]; this
call __ZNK10OpenSubdiv6v3_6_03Vtr8internal5Level11getNumEdgesEv; OpenSubdiv::v3_6_0::Vtr::internal::Level::getNumEdges(void)
mov ecx, eax
mov eax, [rbp+var_54]
cmp eax, ecx
jge loc_10041A
mov rdi, [rbp+var_50]
mov rax, [rbp+var_10]
mov [rbp+var_70], rax
add rdi, 168h
mov eax, [rbp+var_14]
add eax, 0
movsxd rsi, eax
call __ZNSt6vectorIN10OpenSubdiv6v3_6_03Vtr8internal10Refinement8ChildTagESaIS5_EEixEm; std::vector<OpenSubdiv::v3_6_0::Vtr::internal::Refinement::ChildTag>::operator[](ulong)
mov rcx, [rbp+var_70]
mov rdi, [rbp+var_50]
mov cl, [rcx]
mov [rax], cl
mov rax, [rbp+var_10]
mov [rbp+var_68], rax
add rdi, 168h
mov eax, [rbp+var_14]
add eax, 1
movsxd rsi, eax
call __ZNSt6vectorIN10OpenSubdiv6v3_6_03Vtr8internal10Refinement8ChildTagESaIS5_EEixEm; std::vector<OpenSubdiv::v3_6_0::Vtr::internal::Refinement::ChildTag>::operator[](ulong)
mov rcx, [rbp+var_68]
mov rdi, [rbp+var_50]
mov cl, [rcx+1]
mov [rax], cl
mov eax, [rbp+var_18]
mov [rbp+var_5C], eax
add rdi, 120h
mov eax, [rbp+var_14]
add eax, 0
movsxd rsi, eax
call __ZNSt6vectorIiSaIiEEixEm; std::vector<int>::operator[](ulong)
mov ecx, [rbp+var_5C]
mov rdi, [rbp+var_50]
mov [rax], ecx
mov eax, [rbp+var_18]
mov [rbp+var_58], eax
add rdi, 120h
mov eax, [rbp+var_14]
add eax, 1
movsxd rsi, eax
call __ZNSt6vectorIiSaIiEEixEm; std::vector<int>::operator[](ulong)
mov ecx, [rbp+var_58]
mov [rax], ecx
mov eax, [rbp+var_18]
add eax, 1
mov [rbp+var_18], eax
mov eax, [rbp+var_14]
add eax, 2
mov [rbp+var_14], eax
jmp loc_100348
loc_10041A:
jmp loc_100686
loc_10041F:
mov [rbp+var_1C], 0
loc_100426:
mov rax, [rbp+var_50]
mov ecx, [rbp+var_1C]
mov [rbp+var_74], ecx
mov rdi, [rax+8]; this
call __ZNK10OpenSubdiv6v3_6_03Vtr8internal5Level11getNumEdgesEv; OpenSubdiv::v3_6_0::Vtr::internal::Level::getNumEdges(void)
mov ecx, eax
mov eax, [rbp+var_74]
cmp eax, ecx
jge loc_100684
mov rdi, [rbp+var_50]
add rdi, 1B0h
movsxd rsi, [rbp+var_1C]
call __ZNSt6vectorIN10OpenSubdiv6v3_6_03Vtr8internal10Refinement9SparseTagESaIS5_EEixEm; std::vector<OpenSubdiv::v3_6_0::Vtr::internal::Refinement::SparseTag>::operator[](ulong)
mov rdi, [rbp+var_50]; this
mov al, [rax]
test al, 1
setz [rbp+var_1D]
mov esi, [rbp+var_1C]; int
call __ZN10OpenSubdiv6v3_6_03Vtr8internal10Refinement17getEdgeChildEdgesEi; OpenSubdiv::v3_6_0::Vtr::internal::Refinement::getEdgeChildEdges(int)
mov [rbp+var_38], edx
mov [rbp+var_40], rax
mov rax, [rbp+var_40]
mov [rbp+var_30], rax
mov eax, [rbp+var_38]
mov [rbp+var_28], eax
test [rbp+var_1D], 1
jnz loc_100590
mov rax, [rbp+var_50]
mov rcx, [rbp+var_10]
mov [rbp+var_A8], rcx
add rax, 168h
mov [rbp+var_B0], rax
lea rdi, [rbp+var_30]
xor esi, esi
call __ZN10OpenSubdiv6v3_6_03Vtr5ArrayIiEixEi; OpenSubdiv::v3_6_0::Vtr::Array<int>::operator[](int)
mov rdi, [rbp+var_B0]
movsxd rsi, dword ptr [rax]
call __ZNSt6vectorIN10OpenSubdiv6v3_6_03Vtr8internal10Refinement8ChildTagESaIS5_EEixEm; std::vector<OpenSubdiv::v3_6_0::Vtr::internal::Refinement::ChildTag>::operator[](ulong)
mov rdx, [rbp+var_A8]
mov rcx, rax
mov rax, [rbp+var_50]
mov dl, [rdx]
mov [rcx], dl
mov rcx, [rbp+var_10]
mov [rbp+var_98], rcx
add rax, 168h
mov [rbp+var_A0], rax
lea rdi, [rbp+var_30]
mov esi, 1
call __ZN10OpenSubdiv6v3_6_03Vtr5ArrayIiEixEi; OpenSubdiv::v3_6_0::Vtr::Array<int>::operator[](int)
mov rdi, [rbp+var_A0]
movsxd rsi, dword ptr [rax]
call __ZNSt6vectorIN10OpenSubdiv6v3_6_03Vtr8internal10Refinement8ChildTagESaIS5_EEixEm; std::vector<OpenSubdiv::v3_6_0::Vtr::internal::Refinement::ChildTag>::operator[](ulong)
mov rdx, [rbp+var_98]
mov rcx, rax
mov rax, [rbp+var_50]
mov dl, [rdx+1]
mov [rcx], dl
mov ecx, [rbp+var_1C]
mov [rbp+var_84], ecx
add rax, 120h
mov [rbp+var_90], rax
lea rdi, [rbp+var_30]
xor esi, esi
call __ZN10OpenSubdiv6v3_6_03Vtr5ArrayIiEixEi; OpenSubdiv::v3_6_0::Vtr::Array<int>::operator[](int)
mov rdi, [rbp+var_90]
movsxd rsi, dword ptr [rax]
call __ZNSt6vectorIiSaIiEEixEm; std::vector<int>::operator[](ulong)
mov edx, [rbp+var_84]
mov rcx, rax
mov rax, [rbp+var_50]
mov [rcx], edx
mov ecx, [rbp+var_1C]
mov [rbp+var_78], ecx
add rax, 120h
mov [rbp+var_80], rax
lea rdi, [rbp+var_30]
mov esi, 1
call __ZN10OpenSubdiv6v3_6_03Vtr5ArrayIiEixEi; OpenSubdiv::v3_6_0::Vtr::Array<int>::operator[](int)
mov rdi, [rbp+var_80]
movsxd rsi, dword ptr [rax]
call __ZNSt6vectorIiSaIiEEixEm; std::vector<int>::operator[](ulong)
mov ecx, [rbp+var_78]
mov [rax], ecx
jmp loc_100674
loc_100590:
mov [rbp+var_44], 0
loc_100597:
cmp [rbp+var_44], 2
jge loc_100672
mov esi, [rbp+var_44]; int
lea rdi, [rbp+var_30]
call __ZN10OpenSubdiv6v3_6_03Vtr5ArrayIiEixEi; OpenSubdiv::v3_6_0::Vtr::Array<int>::operator[](int)
mov edi, [rax]; this
call __ZN10OpenSubdiv6v3_6_03Vtr12IndexIsValidEi; OpenSubdiv::v3_6_0::Vtr::IndexIsValid(int)
test al, 1
jnz short loc_1005BD
jmp loc_100662
loc_1005BD:
mov rax, [rbp+var_50]
mov rcx, [rbp+var_10]
mov dl, [rbp+var_1D]
and dl, 1
movzx edx, dl
shl rdx, 2
add rcx, rdx
mov [rbp+var_C8], rcx
movsxd rcx, [rbp+var_44]
mov [rbp+var_D0], rcx
add rax, 168h
mov [rbp+var_D8], rax
mov esi, [rbp+var_44]
lea rdi, [rbp+var_30]
call __ZN10OpenSubdiv6v3_6_03Vtr5ArrayIiEixEi; OpenSubdiv::v3_6_0::Vtr::Array<int>::operator[](int)
mov rdi, [rbp+var_D8]
movsxd rsi, dword ptr [rax]
call __ZNSt6vectorIN10OpenSubdiv6v3_6_03Vtr8internal10Refinement8ChildTagESaIS5_EEixEm; std::vector<OpenSubdiv::v3_6_0::Vtr::internal::Refinement::ChildTag>::operator[](ulong)
mov rsi, [rbp+var_D0]
mov rdx, [rbp+var_C8]
mov rcx, rax
mov rax, [rbp+var_50]
mov dl, [rdx+rsi]
mov [rcx], dl
mov ecx, [rbp+var_1C]
mov [rbp+var_B4], ecx
add rax, 120h
mov [rbp+var_C0], rax
mov esi, [rbp+var_44]
lea rdi, [rbp+var_30]
call __ZN10OpenSubdiv6v3_6_03Vtr5ArrayIiEixEi; OpenSubdiv::v3_6_0::Vtr::Array<int>::operator[](int)
mov rdi, [rbp+var_C0]
movsxd rsi, dword ptr [rax]
call __ZNSt6vectorIiSaIiEEixEm; std::vector<int>::operator[](ulong)
mov ecx, [rbp+var_B4]
mov [rax], ecx
loc_100662:
jmp short $+2
loc_100664:
mov eax, [rbp+var_44]
add eax, 1
mov [rbp+var_44], eax
jmp loc_100597
loc_100672:
jmp short $+2
loc_100674:
jmp short $+2
loc_100676:
mov eax, [rbp+var_1C]
add eax, 1
mov [rbp+var_1C], eax
jmp loc_100426
loc_100684:
jmp short $+2
loc_100686:
add rsp, 0E0h
pop rbp
retn
|
long long OpenSubdiv::v3_6_0::Vtr::internal::Refinement::populateEdgeParentFromParentEdges(
long long a1,
_BYTE *a2)
{
int NumEdges; // ecx
long long result; // rax
int v4; // ecx
int v5; // edx
int *v6; // rax
int *v7; // rax
int *v8; // rax
int *v9; // rax
unsigned int *v10; // rax
int *v11; // rax
int *v12; // rax
_BYTE *v13; // [rsp+18h] [rbp-C8h]
int v14; // [rsp+2Ch] [rbp-B4h]
_BYTE *v15; // [rsp+38h] [rbp-A8h]
_BYTE *v16; // [rsp+48h] [rbp-98h]
int v17; // [rsp+5Ch] [rbp-84h]
int v18; // [rsp+68h] [rbp-78h]
int v19; // [rsp+6Ch] [rbp-74h]
int j; // [rsp+9Ch] [rbp-44h]
long long EdgeChildEdges; // [rsp+B0h] [rbp-30h] BYREF
int v22; // [rsp+B8h] [rbp-28h]
bool v23; // [rsp+C3h] [rbp-1Dh]
int i; // [rsp+C4h] [rbp-1Ch]
unsigned int v25; // [rsp+C8h] [rbp-18h]
int FirstChildEdgeFromEdges; // [rsp+CCh] [rbp-14h]
_BYTE *v27; // [rsp+D0h] [rbp-10h]
long long v28; // [rsp+D8h] [rbp-8h]
v28 = a1;
v27 = a2;
if ( (*(_BYTE *)(a1 + 36) & 1) != 0 )
{
FirstChildEdgeFromEdges = OpenSubdiv::v3_6_0::Vtr::internal::Refinement::getFirstChildEdgeFromEdges((OpenSubdiv::v3_6_0::Vtr::internal::Refinement *)a1);
v25 = 0;
while ( 1 )
{
NumEdges = OpenSubdiv::v3_6_0::Vtr::internal::Level::getNumEdges(*(OpenSubdiv::v3_6_0::Vtr::internal::Level **)(a1 + 8));
result = v25;
if ( (int)v25 >= NumEdges )
break;
*(_BYTE *)std::vector<OpenSubdiv::v3_6_0::Vtr::internal::Refinement::ChildTag>::operator[](
a1 + 360,
FirstChildEdgeFromEdges) = *v27;
*(_BYTE *)std::vector<OpenSubdiv::v3_6_0::Vtr::internal::Refinement::ChildTag>::operator[](
a1 + 360,
FirstChildEdgeFromEdges + 1) = v27[1];
*(_DWORD *)std::vector<int>::operator[](a1 + 288, FirstChildEdgeFromEdges) = v25;
*(_DWORD *)std::vector<int>::operator[](a1 + 288, FirstChildEdgeFromEdges + 1) = v25++;
FirstChildEdgeFromEdges += 2;
}
}
else
{
for ( i = 0; ; ++i )
{
v19 = i;
v4 = OpenSubdiv::v3_6_0::Vtr::internal::Level::getNumEdges(*(OpenSubdiv::v3_6_0::Vtr::internal::Level **)(a1 + 8));
result = (unsigned int)v19;
if ( v19 >= v4 )
break;
v23 = (*(_BYTE *)std::vector<OpenSubdiv::v3_6_0::Vtr::internal::Refinement::SparseTag>::operator[](a1 + 432, i) & 1) == 0;
EdgeChildEdges = OpenSubdiv::v3_6_0::Vtr::internal::Refinement::getEdgeChildEdges(
(OpenSubdiv::v3_6_0::Vtr::internal::Refinement *)a1,
i);
v22 = v5;
if ( v23 )
{
for ( j = 0; j < 2; ++j )
{
v10 = (unsigned int *)OpenSubdiv::v3_6_0::Vtr::Array<int>::operator[](&EdgeChildEdges, (unsigned int)j);
if ( (OpenSubdiv::v3_6_0::Vtr::IndexIsValid((OpenSubdiv::v3_6_0::Vtr *)*v10, j) & 1) != 0 )
{
v13 = &v27[4 * v23];
v11 = (int *)OpenSubdiv::v3_6_0::Vtr::Array<int>::operator[](&EdgeChildEdges, (unsigned int)j);
*(_BYTE *)std::vector<OpenSubdiv::v3_6_0::Vtr::internal::Refinement::ChildTag>::operator[](a1 + 360, *v11) = v13[j];
v14 = i;
v12 = (int *)OpenSubdiv::v3_6_0::Vtr::Array<int>::operator[](&EdgeChildEdges, (unsigned int)j);
*(_DWORD *)std::vector<int>::operator[](a1 + 288, *v12) = v14;
}
}
}
else
{
v15 = v27;
v6 = (int *)OpenSubdiv::v3_6_0::Vtr::Array<int>::operator[](&EdgeChildEdges, 0LL);
*(_BYTE *)std::vector<OpenSubdiv::v3_6_0::Vtr::internal::Refinement::ChildTag>::operator[](a1 + 360, *v6) = *v15;
v16 = v27;
v7 = (int *)OpenSubdiv::v3_6_0::Vtr::Array<int>::operator[](&EdgeChildEdges, 1LL);
*(_BYTE *)std::vector<OpenSubdiv::v3_6_0::Vtr::internal::Refinement::ChildTag>::operator[](a1 + 360, *v7) = v16[1];
v17 = i;
v8 = (int *)OpenSubdiv::v3_6_0::Vtr::Array<int>::operator[](&EdgeChildEdges, 0LL);
*(_DWORD *)std::vector<int>::operator[](a1 + 288, *v8) = v17;
v18 = i;
v9 = (int *)OpenSubdiv::v3_6_0::Vtr::Array<int>::operator[](&EdgeChildEdges, 1LL);
*(_DWORD *)std::vector<int>::operator[](a1 + 288, *v9) = v18;
}
}
}
return result;
}
| |||
8,902 |
OpenSubdiv::v3_6_0::Vtr::internal::Refinement::populateEdgeParentFromParentEdges(OpenSubdiv::v3_6_0::Vtr::internal::Refinement::ChildTag const (*) [4])
|
NVIDIA-RTX[P]OSD-Lite/opensubdiv/vtr/refinement.cpp
|
void
Refinement::populateEdgeParentFromParentEdges(ChildTag const initialChildTags[2][4]) {
if (_uniform) {
Index cEdge = getFirstChildEdgeFromEdges();
for (Index pEdge = 0; pEdge < _parent->getNumEdges(); ++pEdge, cEdge += 2) {
_childEdgeTag[cEdge + 0] = initialChildTags[0][0];
_childEdgeTag[cEdge + 1] = initialChildTags[0][1];
_childEdgeParentIndex[cEdge + 0] = pEdge;
_childEdgeParentIndex[cEdge + 1] = pEdge;
}
} else {
for (Index pEdge = 0; pEdge < _parent->getNumEdges(); ++pEdge) {
bool incomplete = !_parentEdgeTag[pEdge]._selected;
IndexArray cEdges = getEdgeChildEdges(pEdge);
if (!incomplete) {
_childEdgeTag[cEdges[0]] = initialChildTags[0][0];
_childEdgeTag[cEdges[1]] = initialChildTags[0][1];
_childEdgeParentIndex[cEdges[0]] = pEdge;
_childEdgeParentIndex[cEdges[1]] = pEdge;
} else {
for (int i = 0; i < 2; ++i) {
if (IndexIsValid(cEdges[i])) {
_childEdgeTag[cEdges[i]] = initialChildTags[incomplete][i];
_childEdgeParentIndex[cEdges[i]] = pEdge;
}
}
}
}
}
}
|
O1
|
cpp
|
OpenSubdiv::v3_6_0::Vtr::internal::Refinement::populateEdgeParentFromParentEdges(OpenSubdiv::v3_6_0::Vtr::internal::Refinement::ChildTag const (*) [4]):
movq 0x8(%rdi), %rax
movl 0x4(%rax), %eax
cmpb $0x0, 0x24(%rdi)
je 0x499f5
testl %eax, %eax
jle 0x49aa6
movslq 0x48(%rdi), %rax
xorl %ecx, %ecx
movq 0x168(%rdi), %rdx
movb (%rsi), %r8b
movb %r8b, (%rdx,%rax)
movq 0x168(%rdi), %rdx
movb 0x1(%rsi), %r8b
movb %r8b, 0x1(%rdx,%rax)
movq 0x120(%rdi), %rdx
movl %ecx, (%rdx,%rax,4)
movl %ecx, 0x4(%rdx,%rax,4)
incl %ecx
addq $0x2, %rax
movq 0x8(%rdi), %rdx
cmpl 0x4(%rdx), %ecx
jl 0x499b5
jmp 0x49aa6
testl %eax, %eax
jle 0x49aa6
xorl %eax, %eax
xorl %ecx, %ecx
movq 0xc0(%rdi), %rdx
movq 0x1b0(%rdi), %r8
testb $0x1, (%r8,%rcx)
jne 0x49a50
addq %rax, %rdx
xorl %r8d, %r8d
movslq (%rdx,%r8,4), %r9
cmpq $-0x1, %r9
je 0x49a45
movq 0x168(%rdi), %r10
movb 0x4(%rsi,%r8), %r11b
movb %r11b, (%r10,%r9)
movslq (%rdx,%r8,4), %r9
movq 0x120(%rdi), %r10
movl %ecx, (%r10,%r9,4)
incq %r8
cmpq $0x1, %r8
je 0x49a1c
jmp 0x49a8e
movslq (%rdx,%rcx,8), %r8
movq 0x168(%rdi), %r9
movb (%rsi), %r10b
movb %r10b, (%r9,%r8)
movslq 0x4(%rdx,%rcx,8), %r8
movq 0x168(%rdi), %r9
movb 0x1(%rsi), %r10b
movb %r10b, (%r9,%r8)
movslq (%rdx,%rcx,8), %r8
movq 0x120(%rdi), %r9
movl %ecx, (%r9,%r8,4)
movslq 0x4(%rdx,%rcx,8), %rdx
movl %ecx, (%r9,%rdx,4)
incq %rcx
movq 0x8(%rdi), %rdx
movslq 0x4(%rdx), %rdx
addq $0x8, %rax
cmpq %rdx, %rcx
jl 0x49a01
retq
nop
|
_ZN10OpenSubdiv6v3_6_03Vtr8internal10Refinement33populateEdgeParentFromParentEdgesEPA4_KNS3_8ChildTagE:
mov rax, [rdi+8]
mov eax, [rax+4]
cmp byte ptr [rdi+24h], 0
jz short loc_499F5
test eax, eax
jle locret_49AA6
movsxd rax, dword ptr [rdi+48h]
xor ecx, ecx
loc_499B5:
mov rdx, [rdi+168h]
mov r8b, [rsi]
mov [rdx+rax], r8b
mov rdx, [rdi+168h]
mov r8b, [rsi+1]
mov [rdx+rax+1], r8b
mov rdx, [rdi+120h]
mov [rdx+rax*4], ecx
mov [rdx+rax*4+4], ecx
inc ecx
add rax, 2
mov rdx, [rdi+8]
cmp ecx, [rdx+4]
jl short loc_499B5
jmp locret_49AA6
loc_499F5:
test eax, eax
jle locret_49AA6
xor eax, eax
xor ecx, ecx
loc_49A01:
mov rdx, [rdi+0C0h]
mov r8, [rdi+1B0h]
test byte ptr [r8+rcx], 1
jnz short loc_49A50
add rdx, rax
xor r8d, r8d
loc_49A1C:
movsxd r9, dword ptr [rdx+r8*4]
cmp r9, 0FFFFFFFFFFFFFFFFh
jz short loc_49A45
mov r10, [rdi+168h]
mov r11b, [rsi+r8+4]
mov [r10+r9], r11b
movsxd r9, dword ptr [rdx+r8*4]
mov r10, [rdi+120h]
mov [r10+r9*4], ecx
loc_49A45:
inc r8
cmp r8, 1
jz short loc_49A1C
jmp short loc_49A8E
loc_49A50:
movsxd r8, dword ptr [rdx+rcx*8]
mov r9, [rdi+168h]
mov r10b, [rsi]
mov [r9+r8], r10b
movsxd r8, dword ptr [rdx+rcx*8+4]
mov r9, [rdi+168h]
mov r10b, [rsi+1]
mov [r9+r8], r10b
movsxd r8, dword ptr [rdx+rcx*8]
mov r9, [rdi+120h]
mov [r9+r8*4], ecx
movsxd rdx, dword ptr [rdx+rcx*8+4]
mov [r9+rdx*4], ecx
loc_49A8E:
inc rcx
mov rdx, [rdi+8]
movsxd rdx, dword ptr [rdx+4]
add rax, 8
cmp rcx, rdx
jl loc_49A01
locret_49AA6:
retn
|
long long OpenSubdiv::v3_6_0::Vtr::internal::Refinement::populateEdgeParentFromParentEdges(
long long a1,
_BYTE *a2)
{
long long result; // rax
int v3; // ecx
long long v4; // rdx
long long v5; // rcx
long long v6; // rdx
long long v7; // rdx
long long v8; // r8
long long v9; // r9
long long v10; // r9
result = *(unsigned int *)(*(_QWORD *)(a1 + 8) + 4LL);
if ( *(_BYTE *)(a1 + 36) )
{
if ( (int)result > 0 )
{
result = *(int *)(a1 + 72);
v3 = 0;
do
{
*(_BYTE *)(*(_QWORD *)(a1 + 360) + result) = *a2;
*(_BYTE *)(*(_QWORD *)(a1 + 360) + result + 1) = a2[1];
v4 = *(_QWORD *)(a1 + 288);
*(_DWORD *)(v4 + 4 * result) = v3;
*(_DWORD *)(v4 + 4 * result + 4) = v3++;
result += 2LL;
}
while ( v3 < *(_DWORD *)(*(_QWORD *)(a1 + 8) + 4LL) );
}
}
else if ( (int)result > 0 )
{
result = 0LL;
v5 = 0LL;
do
{
v6 = *(_QWORD *)(a1 + 192);
if ( (*(_BYTE *)(*(_QWORD *)(a1 + 432) + v5) & 1) != 0 )
{
*(_BYTE *)(*(_QWORD *)(a1 + 360) + *(int *)(v6 + 8 * v5)) = *a2;
*(_BYTE *)(*(_QWORD *)(a1 + 360) + *(int *)(v6 + 8 * v5 + 4)) = a2[1];
v10 = *(_QWORD *)(a1 + 288);
*(_DWORD *)(v10 + 4LL * *(int *)(v6 + 8 * v5)) = v5;
*(_DWORD *)(v10 + 4LL * *(int *)(v6 + 8 * v5 + 4)) = v5;
}
else
{
v7 = result + v6;
v8 = 0LL;
do
{
v9 = *(int *)(v7 + 4 * v8);
if ( v9 != -1 )
{
*(_BYTE *)(*(_QWORD *)(a1 + 360) + v9) = a2[v8 + 4];
*(_DWORD *)(*(_QWORD *)(a1 + 288) + 4LL * *(int *)(v7 + 4 * v8)) = v5;
}
++v8;
}
while ( v8 == 1 );
}
++v5;
result += 8LL;
}
while ( v5 < *(int *)(*(_QWORD *)(a1 + 8) + 4LL) );
}
return result;
}
|
populateEdgeParentFromParentEdges:
MOV RAX,qword ptr [RDI + 0x8]
MOV EAX,dword ptr [RAX + 0x4]
CMP byte ptr [RDI + 0x24],0x0
JZ 0x001499f5
TEST EAX,EAX
JLE 0x00149aa6
MOVSXD RAX,dword ptr [RDI + 0x48]
XOR ECX,ECX
LAB_001499b5:
MOV RDX,qword ptr [RDI + 0x168]
MOV R8B,byte ptr [RSI]
MOV byte ptr [RDX + RAX*0x1],R8B
MOV RDX,qword ptr [RDI + 0x168]
MOV R8B,byte ptr [RSI + 0x1]
MOV byte ptr [RDX + RAX*0x1 + 0x1],R8B
MOV RDX,qword ptr [RDI + 0x120]
MOV dword ptr [RDX + RAX*0x4],ECX
MOV dword ptr [RDX + RAX*0x4 + 0x4],ECX
INC ECX
ADD RAX,0x2
MOV RDX,qword ptr [RDI + 0x8]
CMP ECX,dword ptr [RDX + 0x4]
JL 0x001499b5
JMP 0x00149aa6
LAB_001499f5:
TEST EAX,EAX
JLE 0x00149aa6
XOR EAX,EAX
XOR ECX,ECX
LAB_00149a01:
MOV RDX,qword ptr [RDI + 0xc0]
MOV R8,qword ptr [RDI + 0x1b0]
TEST byte ptr [R8 + RCX*0x1],0x1
JNZ 0x00149a50
ADD RDX,RAX
XOR R8D,R8D
LAB_00149a1c:
MOVSXD R9,dword ptr [RDX + R8*0x4]
CMP R9,-0x1
JZ 0x00149a45
MOV R10,qword ptr [RDI + 0x168]
MOV R11B,byte ptr [RSI + R8*0x1 + 0x4]
MOV byte ptr [R10 + R9*0x1],R11B
MOVSXD R9,dword ptr [RDX + R8*0x4]
MOV R10,qword ptr [RDI + 0x120]
MOV dword ptr [R10 + R9*0x4],ECX
LAB_00149a45:
INC R8
CMP R8,0x1
JZ 0x00149a1c
JMP 0x00149a8e
LAB_00149a50:
MOVSXD R8,dword ptr [RDX + RCX*0x8]
MOV R9,qword ptr [RDI + 0x168]
MOV R10B,byte ptr [RSI]
MOV byte ptr [R9 + R8*0x1],R10B
MOVSXD R8,dword ptr [RDX + RCX*0x8 + 0x4]
MOV R9,qword ptr [RDI + 0x168]
MOV R10B,byte ptr [RSI + 0x1]
MOV byte ptr [R9 + R8*0x1],R10B
MOVSXD R8,dword ptr [RDX + RCX*0x8]
MOV R9,qword ptr [RDI + 0x120]
MOV dword ptr [R9 + R8*0x4],ECX
MOVSXD RDX,dword ptr [RDX + RCX*0x8 + 0x4]
MOV dword ptr [R9 + RDX*0x4],ECX
LAB_00149a8e:
INC RCX
MOV RDX,qword ptr [RDI + 0x8]
MOVSXD RDX,dword ptr [RDX + 0x4]
ADD RAX,0x8
CMP RCX,RDX
JL 0x00149a01
LAB_00149aa6:
RET
|
/* OpenSubdiv::v3_6_0::Vtr::internal::Refinement::populateEdgeParentFromParentEdges(OpenSubdiv::v3_6_0::Vtr::internal::Refinement::ChildTag
const (*) [4]) */
void __thiscall
OpenSubdiv::v3_6_0::Vtr::internal::Refinement::populateEdgeParentFromParentEdges
(Refinement *this,ChildTag *param_1)
{
long lVar1;
long lVar2;
int iVar3;
int4 uVar4;
long lVar5;
long lVar6;
long lVar7;
if (this[0x24] == (Refinement)0x0) {
if (0 < *(int *)(*(long *)(this + 8) + 4)) {
lVar2 = 0;
lVar5 = 0;
do {
lVar1 = *(long *)(this + 0xc0);
uVar4 = (int4)lVar5;
if ((*(byte *)(*(long *)(this + 0x1b0) + lVar5) & 1) == 0) {
lVar6 = 0;
do {
lVar7 = (long)*(int *)(lVar1 + lVar2 + lVar6 * 4);
if (lVar7 != -1) {
*(ChildTag *)(*(long *)(this + 0x168) + lVar7) = param_1[lVar6 + 4];
*(int4 *)
(*(long *)(this + 0x120) + (long)*(int *)(lVar1 + lVar2 + lVar6 * 4) * 4) = uVar4;
}
lVar6 = lVar6 + 1;
} while (lVar6 == 1);
}
else {
*(ChildTag *)(*(long *)(this + 0x168) + (long)*(int *)(lVar1 + lVar5 * 8)) = *param_1;
*(ChildTag *)(*(long *)(this + 0x168) + (long)*(int *)(lVar1 + 4 + lVar5 * 8)) =
param_1[1];
lVar6 = *(long *)(this + 0x120);
*(int4 *)(lVar6 + (long)*(int *)(lVar1 + lVar5 * 8) * 4) = uVar4;
*(int4 *)(lVar6 + (long)*(int *)(lVar1 + 4 + lVar5 * 8) * 4) = uVar4;
}
lVar5 = lVar5 + 1;
lVar2 = lVar2 + 8;
} while (lVar5 < *(int *)(*(long *)(this + 8) + 4));
}
}
else if (0 < *(int *)(*(long *)(this + 8) + 4)) {
lVar2 = (long)*(int *)(this + 0x48);
iVar3 = 0;
do {
*(ChildTag *)(*(long *)(this + 0x168) + lVar2) = *param_1;
*(ChildTag *)(*(long *)(this + 0x168) + 1 + lVar2) = param_1[1];
lVar5 = *(long *)(this + 0x120);
*(int *)(lVar5 + lVar2 * 4) = iVar3;
*(int *)(lVar5 + 4 + lVar2 * 4) = iVar3;
iVar3 = iVar3 + 1;
lVar2 = lVar2 + 2;
} while (iVar3 < *(int *)(*(long *)(this + 8) + 4));
}
return;
}
|
|
8,903 |
OpenSubdiv::v3_6_0::Vtr::internal::Refinement::populateEdgeParentFromParentEdges(OpenSubdiv::v3_6_0::Vtr::internal::Refinement::ChildTag const (*) [4])
|
NVIDIA-RTX[P]OSD-Lite/opensubdiv/vtr/refinement.cpp
|
void
Refinement::populateEdgeParentFromParentEdges(ChildTag const initialChildTags[2][4]) {
if (_uniform) {
Index cEdge = getFirstChildEdgeFromEdges();
for (Index pEdge = 0; pEdge < _parent->getNumEdges(); ++pEdge, cEdge += 2) {
_childEdgeTag[cEdge + 0] = initialChildTags[0][0];
_childEdgeTag[cEdge + 1] = initialChildTags[0][1];
_childEdgeParentIndex[cEdge + 0] = pEdge;
_childEdgeParentIndex[cEdge + 1] = pEdge;
}
} else {
for (Index pEdge = 0; pEdge < _parent->getNumEdges(); ++pEdge) {
bool incomplete = !_parentEdgeTag[pEdge]._selected;
IndexArray cEdges = getEdgeChildEdges(pEdge);
if (!incomplete) {
_childEdgeTag[cEdges[0]] = initialChildTags[0][0];
_childEdgeTag[cEdges[1]] = initialChildTags[0][1];
_childEdgeParentIndex[cEdges[0]] = pEdge;
_childEdgeParentIndex[cEdges[1]] = pEdge;
} else {
for (int i = 0; i < 2; ++i) {
if (IndexIsValid(cEdges[i])) {
_childEdgeTag[cEdges[i]] = initialChildTags[incomplete][i];
_childEdgeParentIndex[cEdges[i]] = pEdge;
}
}
}
}
}
}
|
O2
|
cpp
|
OpenSubdiv::v3_6_0::Vtr::internal::Refinement::populateEdgeParentFromParentEdges(OpenSubdiv::v3_6_0::Vtr::internal::Refinement::ChildTag const (*) [4]):
cmpb $0x0, 0x24(%rdi)
je 0x6169f
movslq 0x48(%rdi), %rax
xorl %ecx, %ecx
movq 0x8(%rdi), %rdx
cmpl 0x4(%rdx), %ecx
jge 0x6174d
movq 0x168(%rdi), %rdx
movb (%rsi), %r8b
movb %r8b, (%rdx,%rax)
movq 0x168(%rdi), %rdx
movb 0x1(%rsi), %r8b
movb %r8b, 0x1(%rdx,%rax)
movq 0x120(%rdi), %rdx
movl %ecx, (%rdx,%rax,4)
movl %ecx, 0x4(%rdx,%rax,4)
incl %ecx
addq $0x2, %rax
jmp 0x6165e
xorl %eax, %eax
xorl %ecx, %ecx
movq 0x8(%rdi), %rdx
movslq 0x4(%rdx), %rdx
cmpq %rdx, %rcx
jge 0x6174d
movq 0xc0(%rdi), %rdx
movq 0x1b0(%rdi), %r8
testb $0x1, (%r8,%rcx)
jne 0x61703
addq %rax, %rdx
xorl %r8d, %r8d
cmpq $0x2, %r8
je 0x61741
movslq (%rdx,%r8,4), %r9
cmpq $-0x1, %r9
je 0x616fe
movq 0x168(%rdi), %r10
movb 0x4(%rsi,%r8), %r11b
movb %r11b, (%r10,%r9)
movslq (%rdx,%r8,4), %r9
movq 0x120(%rdi), %r10
movl %ecx, (%r10,%r9,4)
incq %r8
jmp 0x616cf
movslq (%rdx,%rcx,8), %r8
movq 0x168(%rdi), %r9
movb (%rsi), %r10b
movb %r10b, (%r9,%r8)
movslq 0x4(%rdx,%rcx,8), %r8
movq 0x168(%rdi), %r9
movb 0x1(%rsi), %r10b
movb %r10b, (%r9,%r8)
movslq (%rdx,%rcx,8), %r8
movq 0x120(%rdi), %r9
movl %ecx, (%r9,%r8,4)
movslq 0x4(%rdx,%rcx,8), %rdx
movl %ecx, (%r9,%rdx,4)
incq %rcx
addq $0x8, %rax
jmp 0x616a3
retq
|
_ZN10OpenSubdiv6v3_6_03Vtr8internal10Refinement33populateEdgeParentFromParentEdgesEPA4_KNS3_8ChildTagE:
cmp byte ptr [rdi+24h], 0
jz short loc_6169F
movsxd rax, dword ptr [rdi+48h]
xor ecx, ecx
loc_6165E:
mov rdx, [rdi+8]
cmp ecx, [rdx+4]
jge locret_6174D
mov rdx, [rdi+168h]
mov r8b, [rsi]
mov [rdx+rax], r8b
mov rdx, [rdi+168h]
mov r8b, [rsi+1]
mov [rdx+rax+1], r8b
mov rdx, [rdi+120h]
mov [rdx+rax*4], ecx
mov [rdx+rax*4+4], ecx
inc ecx
add rax, 2
jmp short loc_6165E
loc_6169F:
xor eax, eax
xor ecx, ecx
loc_616A3:
mov rdx, [rdi+8]
movsxd rdx, dword ptr [rdx+4]
cmp rcx, rdx
jge locret_6174D
mov rdx, [rdi+0C0h]
mov r8, [rdi+1B0h]
test byte ptr [r8+rcx], 1
jnz short loc_61703
add rdx, rax
xor r8d, r8d
loc_616CF:
cmp r8, 2
jz short loc_61741
movsxd r9, dword ptr [rdx+r8*4]
cmp r9, 0FFFFFFFFFFFFFFFFh
jz short loc_616FE
mov r10, [rdi+168h]
mov r11b, [rsi+r8+4]
mov [r10+r9], r11b
movsxd r9, dword ptr [rdx+r8*4]
mov r10, [rdi+120h]
mov [r10+r9*4], ecx
loc_616FE:
inc r8
jmp short loc_616CF
loc_61703:
movsxd r8, dword ptr [rdx+rcx*8]
mov r9, [rdi+168h]
mov r10b, [rsi]
mov [r9+r8], r10b
movsxd r8, dword ptr [rdx+rcx*8+4]
mov r9, [rdi+168h]
mov r10b, [rsi+1]
mov [r9+r8], r10b
movsxd r8, dword ptr [rdx+rcx*8]
mov r9, [rdi+120h]
mov [r9+r8*4], ecx
movsxd rdx, dword ptr [rdx+rcx*8+4]
mov [r9+rdx*4], ecx
loc_61741:
inc rcx
add rax, 8
jmp loc_616A3
locret_6174D:
retn
|
long long OpenSubdiv::v3_6_0::Vtr::internal::Refinement::populateEdgeParentFromParentEdges(
long long a1,
_BYTE *a2)
{
long long result; // rax
int i; // ecx
long long v4; // rdx
long long j; // rcx
long long v6; // rdx
long long v7; // rdx
long long k; // r8
long long v9; // r9
long long v10; // r9
if ( *(_BYTE *)(a1 + 36) )
{
result = *(int *)(a1 + 72);
for ( i = 0; i < *(_DWORD *)(*(_QWORD *)(a1 + 8) + 4LL); ++i )
{
*(_BYTE *)(*(_QWORD *)(a1 + 360) + result) = *a2;
*(_BYTE *)(*(_QWORD *)(a1 + 360) + result + 1) = a2[1];
v4 = *(_QWORD *)(a1 + 288);
*(_DWORD *)(v4 + 4 * result) = i;
*(_DWORD *)(v4 + 4 * result + 4) = i;
result += 2LL;
}
}
else
{
result = 0LL;
for ( j = 0LL; j < *(int *)(*(_QWORD *)(a1 + 8) + 4LL); ++j )
{
v6 = *(_QWORD *)(a1 + 192);
if ( (*(_BYTE *)(*(_QWORD *)(a1 + 432) + j) & 1) != 0 )
{
*(_BYTE *)(*(_QWORD *)(a1 + 360) + *(int *)(v6 + 8 * j)) = *a2;
*(_BYTE *)(*(_QWORD *)(a1 + 360) + *(int *)(v6 + 8 * j + 4)) = a2[1];
v10 = *(_QWORD *)(a1 + 288);
*(_DWORD *)(v10 + 4LL * *(int *)(v6 + 8 * j)) = j;
*(_DWORD *)(v10 + 4LL * *(int *)(v6 + 8 * j + 4)) = j;
}
else
{
v7 = result + v6;
for ( k = 0LL; k != 2; ++k )
{
v9 = *(int *)(v7 + 4 * k);
if ( v9 != -1 )
{
*(_BYTE *)(*(_QWORD *)(a1 + 360) + v9) = a2[k + 4];
*(_DWORD *)(*(_QWORD *)(a1 + 288) + 4LL * *(int *)(v7 + 4 * k)) = j;
}
}
}
result += 8LL;
}
}
return result;
}
|
populateEdgeParentFromParentEdges:
CMP byte ptr [RDI + 0x24],0x0
JZ 0x0016169f
MOVSXD RAX,dword ptr [RDI + 0x48]
XOR ECX,ECX
LAB_0016165e:
MOV RDX,qword ptr [RDI + 0x8]
CMP ECX,dword ptr [RDX + 0x4]
JGE 0x0016174d
MOV RDX,qword ptr [RDI + 0x168]
MOV R8B,byte ptr [RSI]
MOV byte ptr [RDX + RAX*0x1],R8B
MOV RDX,qword ptr [RDI + 0x168]
MOV R8B,byte ptr [RSI + 0x1]
MOV byte ptr [RDX + RAX*0x1 + 0x1],R8B
MOV RDX,qword ptr [RDI + 0x120]
MOV dword ptr [RDX + RAX*0x4],ECX
MOV dword ptr [RDX + RAX*0x4 + 0x4],ECX
INC ECX
ADD RAX,0x2
JMP 0x0016165e
LAB_0016169f:
XOR EAX,EAX
XOR ECX,ECX
LAB_001616a3:
MOV RDX,qword ptr [RDI + 0x8]
MOVSXD RDX,dword ptr [RDX + 0x4]
CMP RCX,RDX
JGE 0x0016174d
MOV RDX,qword ptr [RDI + 0xc0]
MOV R8,qword ptr [RDI + 0x1b0]
TEST byte ptr [R8 + RCX*0x1],0x1
JNZ 0x00161703
ADD RDX,RAX
XOR R8D,R8D
LAB_001616cf:
CMP R8,0x2
JZ 0x00161741
MOVSXD R9,dword ptr [RDX + R8*0x4]
CMP R9,-0x1
JZ 0x001616fe
MOV R10,qword ptr [RDI + 0x168]
MOV R11B,byte ptr [RSI + R8*0x1 + 0x4]
MOV byte ptr [R10 + R9*0x1],R11B
MOVSXD R9,dword ptr [RDX + R8*0x4]
MOV R10,qword ptr [RDI + 0x120]
MOV dword ptr [R10 + R9*0x4],ECX
LAB_001616fe:
INC R8
JMP 0x001616cf
LAB_00161703:
MOVSXD R8,dword ptr [RDX + RCX*0x8]
MOV R9,qword ptr [RDI + 0x168]
MOV R10B,byte ptr [RSI]
MOV byte ptr [R9 + R8*0x1],R10B
MOVSXD R8,dword ptr [RDX + RCX*0x8 + 0x4]
MOV R9,qword ptr [RDI + 0x168]
MOV R10B,byte ptr [RSI + 0x1]
MOV byte ptr [R9 + R8*0x1],R10B
MOVSXD R8,dword ptr [RDX + RCX*0x8]
MOV R9,qword ptr [RDI + 0x120]
MOV dword ptr [R9 + R8*0x4],ECX
MOVSXD RDX,dword ptr [RDX + RCX*0x8 + 0x4]
MOV dword ptr [R9 + RDX*0x4],ECX
LAB_00161741:
INC RCX
ADD RAX,0x8
JMP 0x001616a3
LAB_0016174d:
RET
|
/* OpenSubdiv::v3_6_0::Vtr::internal::Refinement::populateEdgeParentFromParentEdges(OpenSubdiv::v3_6_0::Vtr::internal::Refinement::ChildTag
const (*) [4]) */
void __thiscall
OpenSubdiv::v3_6_0::Vtr::internal::Refinement::populateEdgeParentFromParentEdges
(Refinement *this,ChildTag *param_1)
{
long lVar1;
long lVar2;
int iVar3;
int4 uVar4;
long lVar5;
long lVar6;
long lVar7;
if (this[0x24] == (Refinement)0x0) {
lVar2 = 0;
for (lVar5 = 0; lVar5 < *(int *)(*(long *)(this + 8) + 4); lVar5 = lVar5 + 1) {
lVar1 = *(long *)(this + 0xc0);
uVar4 = (int4)lVar5;
if ((*(byte *)(*(long *)(this + 0x1b0) + lVar5) & 1) == 0) {
for (lVar6 = 0; lVar6 != 2; lVar6 = lVar6 + 1) {
lVar7 = (long)*(int *)(lVar1 + lVar2 + lVar6 * 4);
if (lVar7 != -1) {
*(ChildTag *)(*(long *)(this + 0x168) + lVar7) = param_1[lVar6 + 4];
*(int4 *)(*(long *)(this + 0x120) + (long)*(int *)(lVar1 + lVar2 + lVar6 * 4) * 4)
= uVar4;
}
}
}
else {
*(ChildTag *)(*(long *)(this + 0x168) + (long)*(int *)(lVar1 + lVar5 * 8)) = *param_1;
*(ChildTag *)(*(long *)(this + 0x168) + (long)*(int *)(lVar1 + 4 + lVar5 * 8)) = param_1[1];
lVar6 = *(long *)(this + 0x120);
*(int4 *)(lVar6 + (long)*(int *)(lVar1 + lVar5 * 8) * 4) = uVar4;
*(int4 *)(lVar6 + (long)*(int *)(lVar1 + 4 + lVar5 * 8) * 4) = uVar4;
}
lVar2 = lVar2 + 8;
}
}
else {
lVar2 = (long)*(int *)(this + 0x48);
for (iVar3 = 0; iVar3 < *(int *)(*(long *)(this + 8) + 4); iVar3 = iVar3 + 1) {
*(ChildTag *)(*(long *)(this + 0x168) + lVar2) = *param_1;
*(ChildTag *)(*(long *)(this + 0x168) + 1 + lVar2) = param_1[1];
lVar5 = *(long *)(this + 0x120);
*(int *)(lVar5 + lVar2 * 4) = iVar3;
*(int *)(lVar5 + 4 + lVar2 * 4) = iVar3;
lVar2 = lVar2 + 2;
}
}
return;
}
|
|
8,904 |
OpenSubdiv::v3_6_0::Vtr::internal::Refinement::populateEdgeParentFromParentEdges(OpenSubdiv::v3_6_0::Vtr::internal::Refinement::ChildTag const (*) [4])
|
NVIDIA-RTX[P]OSD-Lite/opensubdiv/vtr/refinement.cpp
|
void
Refinement::populateEdgeParentFromParentEdges(ChildTag const initialChildTags[2][4]) {
if (_uniform) {
Index cEdge = getFirstChildEdgeFromEdges();
for (Index pEdge = 0; pEdge < _parent->getNumEdges(); ++pEdge, cEdge += 2) {
_childEdgeTag[cEdge + 0] = initialChildTags[0][0];
_childEdgeTag[cEdge + 1] = initialChildTags[0][1];
_childEdgeParentIndex[cEdge + 0] = pEdge;
_childEdgeParentIndex[cEdge + 1] = pEdge;
}
} else {
for (Index pEdge = 0; pEdge < _parent->getNumEdges(); ++pEdge) {
bool incomplete = !_parentEdgeTag[pEdge]._selected;
IndexArray cEdges = getEdgeChildEdges(pEdge);
if (!incomplete) {
_childEdgeTag[cEdges[0]] = initialChildTags[0][0];
_childEdgeTag[cEdges[1]] = initialChildTags[0][1];
_childEdgeParentIndex[cEdges[0]] = pEdge;
_childEdgeParentIndex[cEdges[1]] = pEdge;
} else {
for (int i = 0; i < 2; ++i) {
if (IndexIsValid(cEdges[i])) {
_childEdgeTag[cEdges[i]] = initialChildTags[incomplete][i];
_childEdgeParentIndex[cEdges[i]] = pEdge;
}
}
}
}
}
}
|
O3
|
cpp
|
OpenSubdiv::v3_6_0::Vtr::internal::Refinement::populateEdgeParentFromParentEdges(OpenSubdiv::v3_6_0::Vtr::internal::Refinement::ChildTag const (*) [4]):
movq 0x8(%rdi), %rax
movl 0x4(%rax), %eax
cmpb $0x0, 0x24(%rdi)
je 0x4bc4b
testl %eax, %eax
jle 0x4bcff
movslq 0x48(%rdi), %rax
xorl %ecx, %ecx
movq 0x168(%rdi), %rdx
movb (%rsi), %r8b
movb %r8b, (%rdx,%rax)
movq 0x168(%rdi), %rdx
movb 0x1(%rsi), %r8b
movb %r8b, 0x1(%rdx,%rax)
movq 0x120(%rdi), %rdx
movl %ecx, (%rdx,%rax,4)
movl %ecx, 0x4(%rdx,%rax,4)
incl %ecx
addq $0x2, %rax
movq 0x8(%rdi), %rdx
cmpl 0x4(%rdx), %ecx
jl 0x4bc0b
jmp 0x4bcff
testl %eax, %eax
jle 0x4bcff
xorl %eax, %eax
movq 0x1b0(%rdi), %rdx
leaq (,%rax,8), %rcx
addq 0xc0(%rdi), %rcx
testb $0x1, (%rdx,%rax)
jne 0x4bcb1
movb $0x1, %dl
xorl %r8d, %r8d
movslq (%rcx,%r8,4), %r9
cmpq $-0x1, %r9
je 0x4bc9f
movq 0x168(%rdi), %r10
movb 0x4(%rsi,%r8), %r11b
movb %r11b, (%r10,%r9)
movslq (%rcx,%r8,4), %r8
movq 0x120(%rdi), %r9
movl %eax, (%r9,%r8,4)
movl $0x1, %r8d
testb $0x1, %dl
movl $0x0, %edx
jne 0x4bc76
jmp 0x4bceb
movslq (%rcx), %rdx
movq 0x168(%rdi), %r8
movb (%rsi), %r9b
movb %r9b, (%r8,%rdx)
movslq 0x4(%rcx), %rdx
movq 0x168(%rdi), %r8
movb 0x1(%rsi), %r9b
movb %r9b, (%r8,%rdx)
movslq (%rcx), %rdx
movq 0x120(%rdi), %r8
movl %eax, (%r8,%rdx,4)
movslq 0x4(%rcx), %rcx
movl %eax, (%r8,%rcx,4)
incq %rax
movq 0x8(%rdi), %rcx
movslq 0x4(%rcx), %rcx
cmpq %rcx, %rax
jl 0x4bc55
retq
|
_ZN10OpenSubdiv6v3_6_03Vtr8internal10Refinement33populateEdgeParentFromParentEdgesEPA4_KNS3_8ChildTagE:
mov rax, [rdi+8]
mov eax, [rax+4]
cmp byte ptr [rdi+24h], 0
jz short loc_4BC4B
test eax, eax
jle locret_4BCFF
movsxd rax, dword ptr [rdi+48h]
xor ecx, ecx
loc_4BC0B:
mov rdx, [rdi+168h]
mov r8b, [rsi]
mov [rdx+rax], r8b
mov rdx, [rdi+168h]
mov r8b, [rsi+1]
mov [rdx+rax+1], r8b
mov rdx, [rdi+120h]
mov [rdx+rax*4], ecx
mov [rdx+rax*4+4], ecx
inc ecx
add rax, 2
mov rdx, [rdi+8]
cmp ecx, [rdx+4]
jl short loc_4BC0B
jmp locret_4BCFF
loc_4BC4B:
test eax, eax
jle locret_4BCFF
xor eax, eax
loc_4BC55:
mov rdx, [rdi+1B0h]
lea rcx, ds:0[rax*8]
add rcx, [rdi+0C0h]
test byte ptr [rdx+rax], 1
jnz short loc_4BCB1
mov dl, 1
xor r8d, r8d
loc_4BC76:
movsxd r9, dword ptr [rcx+r8*4]
cmp r9, 0FFFFFFFFFFFFFFFFh
jz short loc_4BC9F
mov r10, [rdi+168h]
mov r11b, [rsi+r8+4]
mov [r10+r9], r11b
movsxd r8, dword ptr [rcx+r8*4]
mov r9, [rdi+120h]
mov [r9+r8*4], eax
loc_4BC9F:
mov r8d, 1
test dl, 1
mov edx, 0
jnz short loc_4BC76
jmp short loc_4BCEB
loc_4BCB1:
movsxd rdx, dword ptr [rcx]
mov r8, [rdi+168h]
mov r9b, [rsi]
mov [r8+rdx], r9b
movsxd rdx, dword ptr [rcx+4]
mov r8, [rdi+168h]
mov r9b, [rsi+1]
mov [r8+rdx], r9b
movsxd rdx, dword ptr [rcx]
mov r8, [rdi+120h]
mov [r8+rdx*4], eax
movsxd rcx, dword ptr [rcx+4]
mov [r8+rcx*4], eax
loc_4BCEB:
inc rax
mov rcx, [rdi+8]
movsxd rcx, dword ptr [rcx+4]
cmp rax, rcx
jl loc_4BC55
locret_4BCFF:
retn
|
long long OpenSubdiv::v3_6_0::Vtr::internal::Refinement::populateEdgeParentFromParentEdges(
long long a1,
_BYTE *a2)
{
long long result; // rax
int v3; // ecx
long long v4; // rdx
int *v5; // rcx
char v6; // dl
long long v7; // r8
long long v8; // r9
bool v9; // zf
long long v10; // r8
result = *(unsigned int *)(*(_QWORD *)(a1 + 8) + 4LL);
if ( *(_BYTE *)(a1 + 36) )
{
if ( (int)result > 0 )
{
result = *(int *)(a1 + 72);
v3 = 0;
do
{
*(_BYTE *)(*(_QWORD *)(a1 + 360) + result) = *a2;
*(_BYTE *)(*(_QWORD *)(a1 + 360) + result + 1) = a2[1];
v4 = *(_QWORD *)(a1 + 288);
*(_DWORD *)(v4 + 4 * result) = v3;
*(_DWORD *)(v4 + 4 * result + 4) = v3++;
result += 2LL;
}
while ( v3 < *(_DWORD *)(*(_QWORD *)(a1 + 8) + 4LL) );
}
}
else if ( (int)result > 0 )
{
result = 0LL;
do
{
v5 = (int *)(*(_QWORD *)(a1 + 192) + 8 * result);
if ( (*(_BYTE *)(*(_QWORD *)(a1 + 432) + result) & 1) != 0 )
{
*(_BYTE *)(*(_QWORD *)(a1 + 360) + *v5) = *a2;
*(_BYTE *)(*(_QWORD *)(a1 + 360) + v5[1]) = a2[1];
v10 = *(_QWORD *)(a1 + 288);
*(_DWORD *)(v10 + 4LL * *v5) = result;
*(_DWORD *)(v10 + 4LL * v5[1]) = result;
}
else
{
v6 = 1;
v7 = 0LL;
do
{
v8 = v5[v7];
if ( v8 != -1 )
{
*(_BYTE *)(*(_QWORD *)(a1 + 360) + v8) = a2[v7 + 4];
*(_DWORD *)(*(_QWORD *)(a1 + 288) + 4LL * v5[v7]) = result;
}
v7 = 1LL;
v9 = (v6 & 1) == 0;
v6 = 0;
}
while ( !v9 );
}
++result;
}
while ( result < *(int *)(*(_QWORD *)(a1 + 8) + 4LL) );
}
return result;
}
|
populateEdgeParentFromParentEdges:
MOV RAX,qword ptr [RDI + 0x8]
MOV EAX,dword ptr [RAX + 0x4]
CMP byte ptr [RDI + 0x24],0x0
JZ 0x0014bc4b
TEST EAX,EAX
JLE 0x0014bcff
MOVSXD RAX,dword ptr [RDI + 0x48]
XOR ECX,ECX
LAB_0014bc0b:
MOV RDX,qword ptr [RDI + 0x168]
MOV R8B,byte ptr [RSI]
MOV byte ptr [RDX + RAX*0x1],R8B
MOV RDX,qword ptr [RDI + 0x168]
MOV R8B,byte ptr [RSI + 0x1]
MOV byte ptr [RDX + RAX*0x1 + 0x1],R8B
MOV RDX,qword ptr [RDI + 0x120]
MOV dword ptr [RDX + RAX*0x4],ECX
MOV dword ptr [RDX + RAX*0x4 + 0x4],ECX
INC ECX
ADD RAX,0x2
MOV RDX,qword ptr [RDI + 0x8]
CMP ECX,dword ptr [RDX + 0x4]
JL 0x0014bc0b
JMP 0x0014bcff
LAB_0014bc4b:
TEST EAX,EAX
JLE 0x0014bcff
XOR EAX,EAX
LAB_0014bc55:
MOV RDX,qword ptr [RDI + 0x1b0]
LEA RCX,[RAX*0x8]
ADD RCX,qword ptr [RDI + 0xc0]
TEST byte ptr [RDX + RAX*0x1],0x1
JNZ 0x0014bcb1
MOV DL,0x1
XOR R8D,R8D
LAB_0014bc76:
MOVSXD R9,dword ptr [RCX + R8*0x4]
CMP R9,-0x1
JZ 0x0014bc9f
MOV R10,qword ptr [RDI + 0x168]
MOV R11B,byte ptr [RSI + R8*0x1 + 0x4]
MOV byte ptr [R10 + R9*0x1],R11B
MOVSXD R8,dword ptr [RCX + R8*0x4]
MOV R9,qword ptr [RDI + 0x120]
MOV dword ptr [R9 + R8*0x4],EAX
LAB_0014bc9f:
MOV R8D,0x1
TEST DL,0x1
MOV EDX,0x0
JNZ 0x0014bc76
JMP 0x0014bceb
LAB_0014bcb1:
MOVSXD RDX,dword ptr [RCX]
MOV R8,qword ptr [RDI + 0x168]
MOV R9B,byte ptr [RSI]
MOV byte ptr [R8 + RDX*0x1],R9B
MOVSXD RDX,dword ptr [RCX + 0x4]
MOV R8,qword ptr [RDI + 0x168]
MOV R9B,byte ptr [RSI + 0x1]
MOV byte ptr [R8 + RDX*0x1],R9B
MOVSXD RDX,dword ptr [RCX]
MOV R8,qword ptr [RDI + 0x120]
MOV dword ptr [R8 + RDX*0x4],EAX
MOVSXD RCX,dword ptr [RCX + 0x4]
MOV dword ptr [R8 + RCX*0x4],EAX
LAB_0014bceb:
INC RAX
MOV RCX,qword ptr [RDI + 0x8]
MOVSXD RCX,dword ptr [RCX + 0x4]
CMP RAX,RCX
JL 0x0014bc55
LAB_0014bcff:
RET
|
/* OpenSubdiv::v3_6_0::Vtr::internal::Refinement::populateEdgeParentFromParentEdges(OpenSubdiv::v3_6_0::Vtr::internal::Refinement::ChildTag
const (*) [4]) */
void __thiscall
OpenSubdiv::v3_6_0::Vtr::internal::Refinement::populateEdgeParentFromParentEdges
(Refinement *this,ChildTag *param_1)
{
bool bVar1;
int4 uVar2;
long lVar3;
int iVar4;
int *piVar5;
bool bVar6;
long lVar7;
if (this[0x24] == (Refinement)0x0) {
if (0 < *(int *)(*(long *)(this + 8) + 4)) {
lVar3 = 0;
do {
piVar5 = (int *)(lVar3 * 8 + *(long *)(this + 0xc0));
uVar2 = (int4)lVar3;
if ((*(byte *)(*(long *)(this + 0x1b0) + lVar3) & 1) == 0) {
lVar7 = 0;
bVar1 = true;
do {
bVar6 = bVar1;
if ((long)piVar5[lVar7] != -1) {
*(ChildTag *)(*(long *)(this + 0x168) + (long)piVar5[lVar7]) = param_1[lVar7 + 4];
*(int4 *)(*(long *)(this + 0x120) + (long)piVar5[lVar7] * 4) = uVar2;
}
lVar7 = 1;
bVar1 = false;
} while (bVar6);
}
else {
*(ChildTag *)(*(long *)(this + 0x168) + (long)*piVar5) = *param_1;
*(ChildTag *)(*(long *)(this + 0x168) + (long)piVar5[1]) = param_1[1];
lVar7 = *(long *)(this + 0x120);
*(int4 *)(lVar7 + (long)*piVar5 * 4) = uVar2;
*(int4 *)(lVar7 + (long)piVar5[1] * 4) = uVar2;
}
lVar3 = lVar3 + 1;
} while (lVar3 < *(int *)(*(long *)(this + 8) + 4));
}
}
else if (0 < *(int *)(*(long *)(this + 8) + 4)) {
lVar3 = (long)*(int *)(this + 0x48);
iVar4 = 0;
do {
*(ChildTag *)(*(long *)(this + 0x168) + lVar3) = *param_1;
*(ChildTag *)(*(long *)(this + 0x168) + 1 + lVar3) = param_1[1];
lVar7 = *(long *)(this + 0x120);
*(int *)(lVar7 + lVar3 * 4) = iVar4;
*(int *)(lVar7 + 4 + lVar3 * 4) = iVar4;
iVar4 = iVar4 + 1;
lVar3 = lVar3 + 2;
} while (iVar4 < *(int *)(*(long *)(this + 8) + 4));
}
return;
}
|
|
8,905 |
fmt::v10::appender fmt::v10::detail::fill<fmt::v10::appender, char>(fmt::v10::appender, unsigned long, fmt::v10::detail::fill_t<char> const&)
|
aimrt_mujoco_sim/_deps/fmt-src/include/fmt/format.h
|
FMT_NOINLINE FMT_CONSTEXPR auto fill(OutputIt it, size_t n,
const fill_t<Char>& fill) -> OutputIt {
auto fill_size = fill.size();
if (fill_size == 1) return detail::fill_n(it, n, fill[0]);
auto data = fill.data();
for (size_t i = 0; i < n; ++i)
it = copy_str<Char>(data, data + fill_size, it);
return it;
}
|
O3
|
c
|
fmt::v10::appender fmt::v10::detail::fill<fmt::v10::appender, char>(fmt::v10::appender, unsigned long, fmt::v10::detail::fill_t<char> const&):
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
movzbl 0x4(%rdx), %r12d
cmpq $0x1, %r12
jne 0x8c765
movq %r15, %rdi
movq %r14, %rsi
movq %rbx, %rdx
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x8c78f
testq %r14, %r14
je 0x8c780
addq %rbx, %r12
movq %r15, %rdi
movq %rbx, %rsi
movq %r12, %rdx
callq 0x8a126
decq %r14
jne 0x8c76d
movq %r15, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
|
_ZN3fmt3v106detail4fillINS0_8appenderEcEET_S4_mRKNS1_6fill_tIT0_EE:
push r15
push r14
push r12
push rbx
push rax
mov rbx, rdx
mov r14, rsi
mov r15, rdi
movzx r12d, byte ptr [rdx+4]
cmp r12, 1
jnz short loc_8C765
mov rdi, r15
mov rsi, r14
mov rdx, rbx
add rsp, 8
pop rbx
pop r12
pop r14
pop r15
jmp _ZN3fmt3v106detail6fill_nINS0_8appenderEmcEET_S4_T0_RKT1_; fmt::v10::detail::fill_n<fmt::v10::appender,ulong,char>(fmt::v10::appender,ulong,char const&)
loc_8C765:
test r14, r14
jz short loc_8C780
add r12, rbx
loc_8C76D:
mov rdi, r15
mov rsi, rbx
mov rdx, r12
call _ZN3fmt3v106detail6bufferIcE6appendIcEEvPKT_S7_; fmt::v10::detail::buffer<char>::append<char>(char const*,char const*)
dec r14
jnz short loc_8C76D
loc_8C780:
mov rax, r15
add rsp, 8
pop rbx
pop r12
pop r14
pop r15
retn
|
long long fmt::v10::detail::fill<fmt::v10::appender,char>(long long a1, long long a2, long long a3)
{
long long v4; // r14
long long v5; // r12
long long v7; // r12
v4 = a2;
v5 = *(unsigned __int8 *)(a3 + 4);
if ( v5 == 1 )
return fmt::v10::detail::fill_n<fmt::v10::appender,unsigned long,char>(a1, a2, a3);
if ( a2 )
{
v7 = a3 + v5;
do
{
fmt::v10::detail::buffer<char>::append<char>(a1, a3, v7);
--v4;
}
while ( v4 );
}
return a1;
}
|
fill<fmt::v10::appender,char>:
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
PUSH RAX
MOV RBX,RDX
MOV R14,RSI
MOV R15,RDI
MOVZX R12D,byte ptr [RDX + 0x4]
CMP R12,0x1
JNZ 0x0018c765
MOV RDI,R15
MOV RSI,R14
MOV RDX,RBX
ADD RSP,0x8
POP RBX
POP R12
POP R14
POP R15
JMP 0x0018c78f
LAB_0018c765:
TEST R14,R14
JZ 0x0018c780
ADD R12,RBX
LAB_0018c76d:
MOV RDI,R15
MOV RSI,RBX
MOV RDX,R12
CALL 0x0018a126
DEC R14
JNZ 0x0018c76d
LAB_0018c780:
MOV RAX,R15
ADD RSP,0x8
POP RBX
POP R12
POP R14
POP R15
RET
|
/* fmt::v10::appender fmt::v10::detail::fill<fmt::v10::appender, char>(fmt::v10::appender, unsigned
long, fmt::v10::detail::fill_t<char> const&) */
buffer<char> *
fmt::v10::detail::fill<fmt::v10::appender,char>(buffer<char> *param_1,long param_2,char *param_3)
{
byte bVar1;
buffer<char> *pbVar2;
bVar1 = param_3[4];
if ((ulong)bVar1 == 1) {
pbVar2 = (buffer<char> *)fill_n<fmt::v10::appender,unsigned_long,char>(param_1,param_2,param_3);
return pbVar2;
}
if (param_2 != 0) {
do {
buffer<char>::append<char>(param_1,param_3,param_3 + bVar1);
param_2 = param_2 + -1;
} while (param_2 != 0);
}
return param_1;
}
|
|
8,906 |
get_all_kv_cache_types[abi:cxx11]()
|
monkey531[P]llama/common/arg.cpp
|
static std::string get_all_kv_cache_types() {
std::ostringstream msg;
for (const auto & type : kv_cache_types) {
msg << ggml_type_name(type) << (&type == &kv_cache_types.back() ? "" : ", ");
}
return msg.str();
}
|
O3
|
cpp
|
get_all_kv_cache_types[abi:cxx11]():
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x188, %rsp # imm = 0x188
movq %rdi, 0x8(%rsp)
leaq 0x10(%rsp), %rdi
callq 0x1bbd0
movq 0xdfa94(%rip), %r12 # 0x13bdc8
movq 0xdfa95(%rip), %r13 # 0x13bdd0
cmpq %r13, %r12
je 0x5c3c9
leaq 0x9d951(%rip), %rbp # 0xf9c9c
leaq 0xa1455(%rip), %rbx # 0xfd7a7
leaq 0x10(%rsp), %r14
movl (%r12), %edi
callq 0x1b850
movq %rax, %r15
testq %rax, %rax
je 0x5c380
movq %r15, %rdi
callq 0x1b3f0
movq %r14, %rdi
movq %r15, %rsi
movq %rax, %rdx
callq 0x1ba10
jmp 0x5c39c
movq 0x10(%rsp), %rax
movq -0x18(%rax), %rax
leaq (%rsp,%rax), %rdi
addq $0x10, %rdi
movl 0x20(%rdi), %esi
orl $0x1, %esi
callq 0x1bf60
movq 0xdfa2d(%rip), %rax # 0x13bdd0
addq $-0x4, %rax
xorl %edx, %edx
cmpq %rax, %r12
setne %dl
movq %rbx, %rsi
cmoveq %rbp, %rsi
addl %edx, %edx
movq %r14, %rdi
callq 0x1ba10
addq $0x4, %r12
cmpq %r13, %r12
jne 0x5c357
leaq 0x18(%rsp), %rsi
movq 0x8(%rsp), %rdi
callq 0x1be10
movq 0xdeb91(%rip), %rsi # 0x13af70
leaq 0x10(%rsp), %rdi
callq 0x1b4b0
leaq 0x80(%rsp), %rdi
callq 0x1b2c0
addq $0x188, %rsp # imm = 0x188
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x5c40a
movq %rax, %rbx
movq 0xdeb5c(%rip), %rsi # 0x13af70
leaq 0x10(%rsp), %rdi
callq 0x1b4b0
leaq 0x80(%rsp), %rdi
callq 0x1b2c0
movq %rbx, %rdi
callq 0x1c020
|
_ZL22get_all_kv_cache_typesB5cxx11v:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 188h
mov [rsp+1B8h+var_1B0], rdi
lea rdi, [rsp+1B8h+var_1A8]
call __ZNSt7__cxx1119basic_ostringstreamIcSt11char_traitsIcESaIcEEC1Ev; std::ostringstream::basic_ostringstream(void)
mov r12, cs:_ZL14kv_cache_types; kv_cache_types
mov r13, cs:qword_13BDD0
cmp r12, r13
jz loc_5C3C9
lea rbp, aErrorWhileHand_0+34h; ""
lea rbx, aZuD+6; ", "
lea r14, [rsp+1B8h+var_1A8]
loc_5C357:
mov edi, [r12]
call _ggml_type_name
mov r15, rax
test rax, rax
jz short loc_5C380
mov rdi, r15
call _strlen
mov rdi, r14
mov rsi, r15
mov rdx, rax
call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long)
jmp short loc_5C39C
loc_5C380:
mov rax, [rsp+1B8h+var_1A8]
mov rax, [rax-18h]
lea rdi, [rsp+rax+1B8h+var_1B8]
add rdi, 10h
mov esi, [rdi+20h]
or esi, 1
call __ZNSt9basic_iosIcSt11char_traitsIcEE5clearESt12_Ios_Iostate; std::ios::clear(std::_Ios_Iostate)
loc_5C39C:
mov rax, cs:qword_13BDD0
add rax, 0FFFFFFFFFFFFFFFCh
xor edx, edx
cmp r12, rax
setnz dl
mov rsi, rbx
cmovz rsi, rbp
add edx, edx
mov rdi, r14
call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long)
add r12, 4
cmp r12, r13
jnz short loc_5C357
loc_5C3C9:
lea rsi, [rsp+1B8h+var_1A0]
mov rdi, [rsp+1B8h+var_1B0]
call __ZNKSt7__cxx1115basic_stringbufIcSt11char_traitsIcESaIcEE3strEv; std::stringbuf::str(void)
mov rsi, cs:_ZTTNSt7__cxx1119basic_ostringstreamIcSt11char_traitsIcESaIcEEE_ptr
lea rdi, [rsp+1B8h+var_1A8]
call __ZNSt7__cxx1119basic_ostringstreamIcSt11char_traitsIcESaIcEED2Ev; std::ostringstream::~ostringstream()
lea rdi, [rsp+1B8h+var_138]; this
call __ZNSt8ios_baseD2Ev; std::ios_base::~ios_base()
add rsp, 188h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
jmp short $+2
loc_5C40A:
mov rbx, rax
mov rsi, cs:_ZTTNSt7__cxx1119basic_ostringstreamIcSt11char_traitsIcESaIcEEE_ptr
lea rdi, [rsp+arg_8]
call __ZNSt7__cxx1119basic_ostringstreamIcSt11char_traitsIcESaIcEED2Ev; std::ostringstream::~ostringstream()
lea rdi, [rsp+arg_78]; this
call __ZNSt8ios_baseD2Ev; std::ios_base::~ios_base()
mov rdi, rbx
call __Unwind_Resume
|
void get_all_kv_cache_types[abi:cxx11](long long a1)
{
unsigned int *v1; // r12
long long i; // r13
long long v3; // rax
long long v4; // r15
long long v5; // rax
char *v6; // rsi
long long v7; // [rsp+10h] [rbp-1A8h] BYREF
_BYTE v8[104]; // [rsp+18h] [rbp-1A0h] BYREF
_BYTE v9[312]; // [rsp+80h] [rbp-138h] BYREF
std::ostringstream::basic_ostringstream(&v7);
v1 = (unsigned int *)kv_cache_types;
for ( i = qword_13BDD0; v1 != (unsigned int *)i; ++v1 )
{
v3 = ggml_type_name(*v1);
v4 = v3;
if ( v3 )
{
v5 = strlen(v3);
std::__ostream_insert<char,std::char_traits<char>>(&v7, v4, v5);
}
else
{
std::ios::clear(&v8[*(_QWORD *)(v7 - 24) - 8], *(_DWORD *)&v8[*(_QWORD *)(v7 - 24) + 24] | 1u);
}
v6 = ", ";
if ( v1 == (unsigned int *)(qword_13BDD0 - 4) )
v6 = "";
std::__ostream_insert<char,std::char_traits<char>>(
&v7,
v6,
2 * (unsigned int)(v1 != (unsigned int *)(qword_13BDD0 - 4)));
}
std::stringbuf::str(a1, v8);
std::ostringstream::~ostringstream(&v7, &`VTT for'std::ostringstream);
std::ios_base::~ios_base((std::ios_base *)v9);
}
|
get_all_kv_cache_types[abi:cxx11]:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x188
MOV qword ptr [RSP + 0x8],RDI
LEA RDI,[RSP + 0x10]
CALL 0x0011bbd0
MOV R12,qword ptr [0x0023bdc8]
MOV R13,qword ptr [0x0023bdd0]
CMP R12,R13
JZ 0x0015c3c9
LEA RBP,[0x1f9c9c]
LEA RBX,[0x1fd7a7]
LEA R14,[RSP + 0x10]
LAB_0015c357:
MOV EDI,dword ptr [R12]
LAB_0015c35b:
CALL 0x0011b850
MOV R15,RAX
TEST RAX,RAX
JZ 0x0015c380
MOV RDI,R15
CALL 0x0011b3f0
MOV RDI,R14
MOV RSI,R15
MOV RDX,RAX
CALL 0x0011ba10
JMP 0x0015c39c
LAB_0015c380:
MOV RAX,qword ptr [RSP + 0x10]
MOV RAX,qword ptr [RAX + -0x18]
LEA RDI,[RSP + RAX*0x1]
ADD RDI,0x10
MOV ESI,dword ptr [RDI + 0x20]
OR ESI,0x1
CALL 0x0011bf60
LAB_0015c39c:
MOV RAX,qword ptr [0x0023bdd0]
ADD RAX,-0x4
XOR EDX,EDX
CMP R12,RAX
SETNZ DL
MOV RSI,RBX
CMOVZ RSI,RBP
ADD EDX,EDX
MOV RDI,R14
CALL 0x0011ba10
ADD R12,0x4
CMP R12,R13
JNZ 0x0015c357
LAB_0015c3c9:
LEA RSI,[RSP + 0x18]
LAB_0015c3ce:
MOV RDI,qword ptr [RSP + 0x8]
CALL 0x0011be10
LAB_0015c3d8:
MOV RSI,qword ptr [0x0023af70]
LEA RDI,[RSP + 0x10]
CALL 0x0011b4b0
LEA RDI,[RSP + 0x80]
CALL 0x0011b2c0
ADD RSP,0x188
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
/* WARNING: Unknown calling convention -- yet parameter storage is locked */
/* get_all_kv_cache_types[abi:cxx11]() */
void get_all_kv_cache_types_abi_cxx11_(void)
{
int4 *puVar1;
char *pcVar2;
size_t sVar3;
int4 *puVar4;
long local_1a8 [4];
uint auStack_188 [20];
ios_base local_138 [264];
std::__cxx11::ostringstream::ostringstream((ostringstream *)local_1a8);
puVar1 = DAT_0023bdd0;
if (kv_cache_types != DAT_0023bdd0) {
puVar4 = kv_cache_types;
do {
/* try { // try from 0015c35b to 0015c3bf has its CatchHandler @ 0015c40a */
pcVar2 = (char *)ggml_type_name(*puVar4);
if (pcVar2 == (char *)0x0) {
std::ios::clear((long)local_1a8 + *(long *)(local_1a8[0] + -0x18),
*(uint *)((long)auStack_188 + *(long *)(local_1a8[0] + -0x18)) | 1);
}
else {
sVar3 = strlen(pcVar2);
std::__ostream_insert<char,std::char_traits<char>>((ostream *)local_1a8,pcVar2,sVar3);
}
pcVar2 = ", ";
if (puVar4 == DAT_0023bdd0 + -1) {
pcVar2 = "";
}
std::__ostream_insert<char,std::char_traits<char>>
((ostream *)local_1a8,pcVar2,(ulong)((uint)(puVar4 != DAT_0023bdd0 + -1) * 2));
puVar4 = puVar4 + 1;
} while (puVar4 != puVar1);
}
/* try { // try from 0015c3ce to 0015c3d7 has its CatchHandler @ 0015c408 */
std::__cxx11::stringbuf::str();
std::__cxx11::ostringstream::~ostringstream((ostringstream *)local_1a8);
std::ios_base::~ios_base(local_138);
return;
}
|
|
8,907 |
ma_enlarge_root
|
eloqsql/storage/maria/ma_write.c
|
my_bool _ma_enlarge_root(MARIA_HA *info, MARIA_KEY *key, my_off_t *root)
{
uint t_length, nod_flag;
MARIA_KEY_PARAM s_temp;
MARIA_SHARE *share= info->s;
MARIA_PINNED_PAGE tmp_page_link, *page_link= &tmp_page_link;
MARIA_KEYDEF *keyinfo= key->keyinfo;
MARIA_PAGE page;
my_bool res= 0;
DBUG_ENTER("_ma_enlarge_root");
page.info= info;
page.keyinfo= keyinfo;
page.buff= info->buff;
page.flag= 0;
nod_flag= (*root != HA_OFFSET_ERROR) ? share->base.key_reflength : 0;
/* Store pointer to prev page if nod */
_ma_kpointer(info, page.buff + share->keypage_header, *root);
t_length= (*keyinfo->pack_key)(key, nod_flag, (uchar*) 0,
(uchar*) 0, (uchar*) 0, &s_temp);
page.size= share->keypage_header + t_length + nod_flag;
bzero(page.buff, share->keypage_header);
_ma_store_keynr(share, page.buff, keyinfo->key_nr);
if (nod_flag)
page.flag|= KEYPAGE_FLAG_ISNOD;
if (key->flag & (SEARCH_USER_KEY_HAS_TRANSID | SEARCH_PAGE_KEY_HAS_TRANSID))
page.flag|= KEYPAGE_FLAG_HAS_TRANSID;
(*keyinfo->store_key)(keyinfo, page.buff + share->keypage_header +
nod_flag, &s_temp);
/* Mark that info->buff was used */
info->keyread_buff_used= info->page_changed= 1;
if ((page.pos= _ma_new(info, PAGECACHE_PRIORITY_HIGH, &page_link)) ==
HA_OFFSET_ERROR)
DBUG_RETURN(1);
*root= page.pos;
page_store_info(share, &page);
/*
Clear unitialized part of page to avoid valgrind/purify warnings
and to get a clean page that is easier to compress and compare with
pages generated with redo
*/
bzero(page.buff + page.size, share->block_size - page.size);
if (share->now_transactional && _ma_log_new(&page, 1))
res= 1;
if (_ma_write_keypage(&page, page_link->write_lock,
PAGECACHE_PRIORITY_HIGH))
res= 1;
DBUG_RETURN(res);
}
|
O3
|
c
|
ma_enlarge_root:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xd8, %rsp
movq %rsi, %r15
movq (%rdi), %rbx
leaq -0xa8(%rbp), %rax
movq %rax, -0x40(%rbp)
movq 0x8(%rsi), %rax
movq %rdi, -0x90(%rbp)
movq %rax, -0x38(%rbp)
movq %rax, -0x88(%rbp)
movq 0x378(%rdi), %r12
movq %r12, -0x80(%rbp)
movl $0x0, -0x64(%rbp)
movq %rdx, -0x48(%rbp)
movq (%rdx), %rdx
movq $0x0, -0x30(%rbp)
movl $0x0, %r14d
cmpq $-0x1, %rdx
je 0x565b3
movl 0x3e4(%rbx), %r14d
movl 0x744(%rbx), %esi
addq %r12, %rsi
movq %rdi, -0x58(%rbp)
callq 0x6d3ed
leaq -0xf8(%rbp), %r9
movq %r15, -0x50(%rbp)
movq %r15, %rdi
movl %r14d, %esi
xorl %edx, %edx
xorl %ecx, %ecx
xorl %r8d, %r8d
movq %rbx, %r15
movq -0x38(%rbp), %r13
callq *0xf0(%r13)
movl %eax, %ebx
movl 0x744(%r15), %edx
addl %r14d, %ebx
addl %edx, %ebx
movl %ebx, -0x70(%rbp)
movq %r12, %rdi
xorl %esi, %esi
callq 0x292b0
movb 0xa5(%r13), %al
movl 0x744(%r15), %ecx
addl $-0x4, %ecx
movb %al, (%r12,%rcx)
testl %r14d, %r14d
je 0x56630
movl $0x1, -0x64(%rbp)
movl $0x1, %eax
movq %rax, -0x30(%rbp)
movq -0x50(%rbp), %rax
testb $0x18, 0x1a(%rax)
je 0x56648
movq -0x30(%rbp), %rax
orl $0x2, %eax
movq %rax, -0x30(%rbp)
movl %eax, -0x64(%rbp)
movl 0x744(%r15), %eax
movl %r14d, %esi
addq %r12, %rsi
addq %rax, %rsi
leaq -0xf8(%rbp), %rdx
movq -0x38(%rbp), %rdi
callq *0xf8(%rdi)
movq -0x58(%rbp), %rdi
movw $0x101, 0x684(%rdi) # imm = 0x101
leaq -0x40(%rbp), %rdx
movl $0x6, %esi
callq 0x6f757
movq %rax, -0x78(%rbp)
cmpq $-0x1, %rax
je 0x56720
movq -0x48(%rbp), %rcx
movq %rax, (%rcx)
movl 0x744(%r15), %eax
addl $-0x3, %eax
movq -0x30(%rbp), %rcx
movq %r12, %rdx
movb %cl, (%r12,%rax)
movl 0x744(%r15), %eax
movb %bl, -0x1(%r12,%rax)
movl 0x744(%r15), %eax
movb %bh, -0x2(%rdx,%rax)
movl %ebx, %edi
addq %r12, %rdi
movl 0x7bc(%r15), %edx
subl %ebx, %edx
xorl %ebx, %ebx
xorl %esi, %esi
callq 0x292b0
cmpb $0x0, 0x7e7(%r15)
je 0x566f9
leaq -0x90(%rbp), %rdi
movl $0x1, %esi
callq 0x56734
movl %eax, %ebx
movq -0x40(%rbp), %rax
movl 0xc(%rax), %esi
leaq -0x90(%rbp), %rdi
movl $0x6, %edx
callq 0x6f46d
testb %al, %al
movzbl %bl, %ecx
movl $0x1, %eax
cmovel %ecx, %eax
jmp 0x56722
movb $0x1, %al
addq $0xd8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
|
_ma_enlarge_root:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 0D8h
mov r15, rsi
mov rbx, [rdi]
lea rax, [rbp+var_A8]
mov [rbp+var_40], rax
mov rax, [rsi+8]
mov [rbp+var_90], rdi
mov [rbp+var_38], rax
mov [rbp+var_88], rax
mov r12, [rdi+378h]
mov [rbp+var_80], r12
mov [rbp+var_64], 0
mov [rbp+var_48], rdx
mov rdx, [rdx]
mov [rbp+var_30], 0
mov r14d, 0
cmp rdx, 0FFFFFFFFFFFFFFFFh
jz short loc_565B3
mov r14d, [rbx+3E4h]
loc_565B3:
mov esi, [rbx+744h]
add rsi, r12
mov [rbp+var_58], rdi
call _ma_kpointer
lea r9, [rbp+var_F8]
mov [rbp+var_50], r15
mov rdi, r15
mov esi, r14d
xor edx, edx
xor ecx, ecx
xor r8d, r8d
mov r15, rbx
mov r13, [rbp+var_38]
call qword ptr [r13+0F0h]
mov ebx, eax
mov edx, [r15+744h]
add ebx, r14d
add ebx, edx
mov [rbp+var_70], ebx
mov rdi, r12
xor esi, esi
call _memset
mov al, [r13+0A5h]
mov ecx, [r15+744h]
add ecx, 0FFFFFFFCh
mov [r12+rcx], al
test r14d, r14d
jz short loc_56630
mov [rbp+var_64], 1
mov eax, 1
mov [rbp+var_30], rax
loc_56630:
mov rax, [rbp+var_50]
test byte ptr [rax+1Ah], 18h
jz short loc_56648
mov rax, [rbp+var_30]
or eax, 2
mov [rbp+var_30], rax
mov [rbp+var_64], eax
loc_56648:
mov eax, [r15+744h]
mov esi, r14d
add rsi, r12
add rsi, rax
lea rdx, [rbp+var_F8]
mov rdi, [rbp+var_38]
call qword ptr [rdi+0F8h]
mov rdi, [rbp+var_58]
mov word ptr [rdi+684h], 101h
lea rdx, [rbp+var_40]
mov esi, 6
call _ma_new
mov [rbp+var_78], rax
cmp rax, 0FFFFFFFFFFFFFFFFh
jz loc_56720
mov rcx, [rbp+var_48]
mov [rcx], rax
mov eax, [r15+744h]
add eax, 0FFFFFFFDh
mov rcx, [rbp+var_30]
mov rdx, r12
mov [r12+rax], cl
mov eax, [r15+744h]
mov [r12+rax-1], bl
mov eax, [r15+744h]
mov [rdx+rax-2], bh
mov edi, ebx
add rdi, r12
mov edx, [r15+7BCh]
sub edx, ebx
xor ebx, ebx
xor esi, esi
call _memset
cmp byte ptr [r15+7E7h], 0
jz short loc_566F9
lea rdi, [rbp+var_90]
mov esi, 1
call _ma_log_new
mov ebx, eax
loc_566F9:
mov rax, [rbp+var_40]
mov esi, [rax+0Ch]
lea rdi, [rbp+var_90]
mov edx, 6
call _ma_write_keypage
test al, al
movzx ecx, bl
mov eax, 1
cmovz eax, ecx
jmp short loc_56722
loc_56720:
mov al, 1
loc_56722:
add rsp, 0D8h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
|
char ma_enlarge_root(_QWORD *a1, long long a2, long long *a3)
{
long long v4; // rbx
long long v5; // rax
long long v6; // r12
long long v7; // rdx
unsigned int v8; // r14d
long long v9; // rsi
long long v10; // rdi
long long v11; // r15
long long v12; // r13
int v13; // eax
long long v14; // rdx
unsigned int v15; // ebx
_QWORD *v16; // rdi
long long v17; // rax
long long v18; // rdi
long long v19; // rdx
char v20; // bl
bool v21; // zf
char result; // al
_BYTE v23[80]; // [rsp+8h] [rbp-F8h] BYREF
char v24; // [rsp+58h] [rbp-A8h] BYREF
_QWORD v25[4]; // [rsp+70h] [rbp-90h] BYREF
unsigned int v26; // [rsp+90h] [rbp-70h]
int v27; // [rsp+9Ch] [rbp-64h]
_QWORD *v28; // [rsp+A8h] [rbp-58h]
long long v29; // [rsp+B0h] [rbp-50h]
long long *v30; // [rsp+B8h] [rbp-48h]
char *v31; // [rsp+C0h] [rbp-40h] BYREF
long long v32; // [rsp+C8h] [rbp-38h]
long long v33; // [rsp+D0h] [rbp-30h]
v4 = *a1;
v31 = &v24;
v5 = *(_QWORD *)(a2 + 8);
v25[0] = a1;
v32 = v5;
v25[1] = v5;
v6 = a1[111];
v25[2] = v6;
v27 = 0;
v30 = a3;
v7 = *a3;
v33 = 0LL;
v8 = 0;
if ( v7 != -1 )
v8 = *(_DWORD *)(v4 + 996);
v9 = v6 + *(unsigned int *)(v4 + 1860);
v28 = a1;
ma_kpointer(a1, v9);
v29 = a2;
v10 = a2;
v11 = v4;
v12 = v32;
v13 = (*(long long ( **)(long long, _QWORD, _QWORD, _QWORD, _QWORD, _BYTE *))(v32 + 240))(
v10,
v8,
0LL,
0LL,
0LL,
v23);
v14 = *(unsigned int *)(v4 + 1860);
v15 = v14 + v8 + v13;
v26 = v15;
memset(v6, 0LL, v14);
*(_BYTE *)(v6 + (unsigned int)(*(_DWORD *)(v11 + 1860) - 4)) = *(_BYTE *)(v12 + 165);
if ( v8 )
{
v27 = 1;
v33 = 1LL;
}
if ( (*(_BYTE *)(v29 + 26) & 0x18) != 0 )
{
v33 = (unsigned int)v33 | 2;
v27 = v33;
}
(*(void ( **)(long long, long long, _BYTE *))(v32 + 248))(v32, *(unsigned int *)(v11 + 1860) + v6 + v8, v23);
v16 = v28;
*((_WORD *)v28 + 834) = 257;
v17 = ma_new(v16, 6LL, &v31);
v25[3] = v17;
if ( v17 == -1 )
return 1;
*v30 = v17;
*(_BYTE *)(v6 + (unsigned int)(*(_DWORD *)(v11 + 1860) - 3)) = v33;
*(_BYTE *)(v6 + *(unsigned int *)(v11 + 1860) - 1) = v15;
*(_BYTE *)(v6 + *(unsigned int *)(v11 + 1860) - 2) = BYTE1(v15);
v18 = v6 + v15;
v19 = *(_DWORD *)(v11 + 1980) - v15;
v20 = 0;
memset(v18, 0LL, v19);
if ( *(_BYTE *)(v11 + 2023) )
v20 = ma_log_new(v25, 1LL);
v21 = (unsigned __int8)ma_write_keypage(v25, *((unsigned int *)v31 + 3), 6LL) == 0;
result = 1;
if ( v21 )
return v20;
return result;
}
|
_ma_enlarge_root:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0xd8
MOV R15,RSI
MOV RBX,qword ptr [RDI]
LEA RAX,[RBP + -0xa8]
MOV qword ptr [RBP + -0x40],RAX
MOV RAX,qword ptr [RSI + 0x8]
MOV qword ptr [RBP + -0x90],RDI
MOV qword ptr [RBP + -0x38],RAX
MOV qword ptr [RBP + -0x88],RAX
MOV R12,qword ptr [RDI + 0x378]
MOV qword ptr [RBP + -0x80],R12
MOV dword ptr [RBP + -0x64],0x0
MOV qword ptr [RBP + -0x48],RDX
MOV RDX,qword ptr [RDX]
MOV qword ptr [RBP + -0x30],0x0
MOV R14D,0x0
CMP RDX,-0x1
JZ 0x001565b3
MOV R14D,dword ptr [RBX + 0x3e4]
LAB_001565b3:
MOV ESI,dword ptr [RBX + 0x744]
ADD RSI,R12
MOV qword ptr [RBP + -0x58],RDI
CALL 0x0016d3ed
LEA R9,[RBP + -0xf8]
MOV qword ptr [RBP + -0x50],R15
MOV RDI,R15
MOV ESI,R14D
XOR EDX,EDX
XOR ECX,ECX
XOR R8D,R8D
MOV R15,RBX
MOV R13,qword ptr [RBP + -0x38]
CALL qword ptr [R13 + 0xf0]
MOV EBX,EAX
MOV EDX,dword ptr [R15 + 0x744]
ADD EBX,R14D
ADD EBX,EDX
MOV dword ptr [RBP + -0x70],EBX
MOV RDI,R12
XOR ESI,ESI
CALL 0x001292b0
MOV AL,byte ptr [R13 + 0xa5]
MOV ECX,dword ptr [R15 + 0x744]
ADD ECX,-0x4
MOV byte ptr [R12 + RCX*0x1],AL
TEST R14D,R14D
JZ 0x00156630
MOV dword ptr [RBP + -0x64],0x1
MOV EAX,0x1
MOV qword ptr [RBP + -0x30],RAX
LAB_00156630:
MOV RAX,qword ptr [RBP + -0x50]
TEST byte ptr [RAX + 0x1a],0x18
JZ 0x00156648
MOV RAX,qword ptr [RBP + -0x30]
OR EAX,0x2
MOV qword ptr [RBP + -0x30],RAX
MOV dword ptr [RBP + -0x64],EAX
LAB_00156648:
MOV EAX,dword ptr [R15 + 0x744]
MOV ESI,R14D
ADD RSI,R12
ADD RSI,RAX
LEA RDX,[RBP + -0xf8]
MOV RDI,qword ptr [RBP + -0x38]
CALL qword ptr [RDI + 0xf8]
MOV RDI,qword ptr [RBP + -0x58]
MOV word ptr [RDI + 0x684],0x101
LEA RDX,[RBP + -0x40]
MOV ESI,0x6
CALL 0x0016f757
MOV qword ptr [RBP + -0x78],RAX
CMP RAX,-0x1
JZ 0x00156720
MOV RCX,qword ptr [RBP + -0x48]
MOV qword ptr [RCX],RAX
MOV EAX,dword ptr [R15 + 0x744]
ADD EAX,-0x3
MOV RCX,qword ptr [RBP + -0x30]
MOV RDX,R12
MOV byte ptr [R12 + RAX*0x1],CL
MOV EAX,dword ptr [R15 + 0x744]
MOV byte ptr [R12 + RAX*0x1 + -0x1],BL
MOV EAX,dword ptr [R15 + 0x744]
MOV byte ptr [RDX + RAX*0x1 + -0x2],BH
MOV EDI,EBX
ADD RDI,R12
MOV EDX,dword ptr [R15 + 0x7bc]
SUB EDX,EBX
XOR EBX,EBX
XOR ESI,ESI
CALL 0x001292b0
CMP byte ptr [R15 + 0x7e7],0x0
JZ 0x001566f9
LEA RDI,[RBP + -0x90]
MOV ESI,0x1
CALL 0x00156734
MOV EBX,EAX
LAB_001566f9:
MOV RAX,qword ptr [RBP + -0x40]
MOV ESI,dword ptr [RAX + 0xc]
LEA RDI,[RBP + -0x90]
MOV EDX,0x6
CALL 0x0016f46d
TEST AL,AL
MOVZX ECX,BL
MOV EAX,0x1
CMOVZ EAX,ECX
JMP 0x00156722
LAB_00156720:
MOV AL,0x1
LAB_00156722:
ADD RSP,0xd8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
ulong _ma_enlarge_root(long *param_1,long param_2,long *param_3)
{
long lVar1;
void *__s;
long lVar2;
char cVar3;
int iVar4;
ulong uVar5;
uint uVar6;
uint uVar7;
int1 local_100 [80];
int1 local_b0 [24];
long *local_98;
long local_90;
void *local_88;
long local_80;
uint local_78;
uint local_6c;
long *local_60;
long local_58;
long *local_50;
int1 *local_48;
long local_40;
ulong local_38;
lVar1 = *param_1;
local_48 = local_b0;
local_90 = *(long *)(param_2 + 8);
__s = (void *)param_1[0x6f];
local_6c = 0;
local_38 = 0;
uVar7 = 0;
if (*param_3 != -1) {
uVar7 = *(uint *)(lVar1 + 0x3e4);
}
local_98 = param_1;
local_88 = __s;
local_60 = param_1;
local_50 = param_3;
local_40 = local_90;
_ma_kpointer(param_1,(ulong)*(uint *)(lVar1 + 0x744) + (long)__s);
lVar2 = local_40;
local_58 = param_2;
iVar4 = (**(code **)(local_40 + 0xf0))(param_2,uVar7,0,0,0,local_100);
uVar6 = iVar4 + uVar7 + *(uint *)(lVar1 + 0x744);
local_78 = uVar6;
memset(__s,0,(ulong)*(uint *)(lVar1 + 0x744));
*(int1 *)((long)__s + (ulong)(*(int *)(lVar1 + 0x744) - 4)) = *(int1 *)(lVar2 + 0xa5);
if (uVar7 != 0) {
local_6c = 1;
local_38 = 1;
}
if ((*(byte *)(local_58 + 0x1a) & 0x18) != 0) {
local_6c = (uint)local_38 | 2;
local_38 = (ulong)local_6c;
}
(**(code **)(local_40 + 0xf8))
(local_40,(long)__s + (ulong)*(uint *)(lVar1 + 0x744) + (ulong)uVar7,local_100);
*(int2 *)((long)local_60 + 0x684) = 0x101;
local_80 = _ma_new(local_60,6,&local_48);
if (local_80 == -1) {
uVar5 = 0xffffffffffffff01;
}
else {
*local_50 = local_80;
*(char *)((long)__s + (ulong)(*(int *)(lVar1 + 0x744) - 3)) = (char)local_38;
*(char *)((long)__s + ((ulong)*(uint *)(lVar1 + 0x744) - 1)) = (char)uVar6;
*(char *)((long)__s + ((ulong)*(uint *)(lVar1 + 0x744) - 2)) = (char)(uVar6 >> 8);
uVar7 = 0;
memset((void *)((ulong)uVar6 + (long)__s),0,(ulong)(*(int *)(lVar1 + 0x7bc) - uVar6));
if (*(char *)(lVar1 + 0x7e7) != '\0') {
uVar7 = _ma_log_new(&local_98,1);
}
cVar3 = _ma_write_keypage(&local_98,*(int4 *)(local_48 + 0xc),6);
uVar5 = 1;
if (cVar3 == '\0') {
uVar5 = (ulong)(uVar7 & 0xff);
}
}
return uVar5;
}
|
|
8,908 |
CLI::App::_move_to_missing(CLI::detail::Classifier, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
|
MikePodsytnik[P]TCRtrie/build_O2/_deps/cli11-src/include/CLI/impl/App_inl.hpp
|
CLI11_INLINE void App::_move_to_missing(detail::Classifier val_type, const std::string &val) {
if(allow_extras_ || subcommands_.empty()) {
missing_.emplace_back(val_type, val);
return;
}
// allow extra arguments to be places in an option group if it is allowed there
for(auto &subc : subcommands_) {
if(subc->name_.empty() && subc->allow_extras_) {
subc->missing_.emplace_back(val_type, val);
return;
}
}
// if we haven't found any place to put them yet put them in missing
missing_.emplace_back(val_type, val);
}
|
O2
|
cpp
|
CLI::App::_move_to_missing(CLI::detail::Classifier, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&):
pushq %rax
movl %esi, 0x4(%rsp)
cmpb $0x0, 0x48(%rdi)
jne 0x17331
movq 0x280(%rdi), %rcx
movq 0x288(%rdi), %rsi
cmpq %rsi, %rcx
je 0x17331
cmpq %rsi, %rcx
je 0x17331
movq (%rcx), %rax
cmpq $0x0, 0x10(%rax)
jne 0x1732b
cmpb $0x0, 0x48(%rax)
jne 0x17334
addq $0x10, %rcx
jmp 0x17316
movq %rdi, %rax
addq $0x178, %rax # imm = 0x178
leaq 0x4(%rsp), %rsi
movq %rax, %rdi
callq 0x192f6
popq %rax
retq
nop
|
_ZN3CLI3App16_move_to_missingENS_6detail10ClassifierERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE:
push rax
mov [rsp+8+var_4], esi
cmp byte ptr [rdi+48h], 0
jnz short loc_17331
mov rcx, [rdi+280h]
mov rsi, [rdi+288h]
cmp rcx, rsi
jz short loc_17331
loc_17316:
cmp rcx, rsi
jz short loc_17331
mov rax, [rcx]
cmp qword ptr [rax+10h], 0
jnz short loc_1732B
cmp byte ptr [rax+48h], 0
jnz short loc_17334
loc_1732B:
add rcx, 10h
jmp short loc_17316
loc_17331:
mov rax, rdi
loc_17334:
add rax, 178h
lea rsi, [rsp+8+var_4]
mov rdi, rax
call _ZNSt6vectorISt4pairIN3CLI6detail10ClassifierENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEESaISA_EE12emplace_backIJRS3_RKS9_EEERSA_DpOT_; std::vector<std::pair<CLI::detail::Classifier,std::string>>::emplace_back<CLI::detail::Classifier&,std::string const&>(CLI::detail::Classifier&,std::string const&)
pop rax
retn
|
unsigned long long CLI::App::_move_to_missing(long long a1, unsigned int a2)
{
unsigned int v2; // eax
long long *v3; // rcx
long long *v4; // rsi
long long v5; // rax
unsigned long long v7; // [rsp-4h] [rbp-8h] BYREF
v7 = __PAIR64__(a2, v2);
if ( !*(_BYTE *)(a1 + 72) )
{
v3 = *(long long **)(a1 + 640);
v4 = *(long long **)(a1 + 648);
if ( v3 != v4 )
{
while ( v3 != v4 )
{
v5 = *v3;
if ( !*(_QWORD *)(*v3 + 16) && *(_BYTE *)(v5 + 72) )
goto LABEL_8;
v3 += 2;
}
}
}
v5 = a1;
LABEL_8:
std::vector<std::pair<CLI::detail::Classifier,std::string>>::emplace_back<CLI::detail::Classifier&,std::string const&>(
v5 + 376,
(char *)&v7 + 4);
return v7;
}
|
_move_to_missing:
PUSH RAX
MOV dword ptr [RSP + 0x4],ESI
CMP byte ptr [RDI + 0x48],0x0
JNZ 0x00117331
MOV RCX,qword ptr [RDI + 0x280]
MOV RSI,qword ptr [RDI + 0x288]
CMP RCX,RSI
JZ 0x00117331
LAB_00117316:
CMP RCX,RSI
JZ 0x00117331
MOV RAX,qword ptr [RCX]
CMP qword ptr [RAX + 0x10],0x0
JNZ 0x0011732b
CMP byte ptr [RAX + 0x48],0x0
JNZ 0x00117334
LAB_0011732b:
ADD RCX,0x10
JMP 0x00117316
LAB_00117331:
MOV RAX,RDI
LAB_00117334:
ADD RAX,0x178
LEA RSI,[RSP + 0x4]
MOV RDI,RAX
CALL 0x001192f6
POP RAX
RET
|
/* CLI::App::_move_to_missing(CLI::detail::Classifier, std::__cxx11::string const&) */
int8 __thiscall CLI::App::_move_to_missing(App *this,int4 param_2,string *param_3)
{
int4 in_EAX;
App *pAVar1;
long *plVar2;
int8 uStack_8;
uStack_8 = CONCAT44(param_2,in_EAX);
pAVar1 = this;
if (this[0x48] == (App)0x0) {
plVar2 = *(long **)(this + 0x280);
if (plVar2 != *(long **)(this + 0x288)) {
for (; (pAVar1 = this, plVar2 != *(long **)(this + 0x288) &&
((pAVar1 = (App *)*plVar2, *(long *)(pAVar1 + 0x10) != 0 || (pAVar1[0x48] == (App)0x0))
)); plVar2 = plVar2 + 2) {
}
}
}
std::
vector<std::pair<CLI::detail::Classifier,std::__cxx11::string>,std::allocator<std::pair<CLI::detail::Classifier,std::__cxx11::string>>>
::emplace_back<CLI::detail::Classifier&,std::__cxx11::string_const&>
((vector<std::pair<CLI::detail::Classifier,std::__cxx11::string>,std::allocator<std::pair<CLI::detail::Classifier,std::__cxx11::string>>>
*)(pAVar1 + 0x178),(Classifier *)((long)&uStack_8 + 4),param_3);
return uStack_8;
}
|
|
8,909 |
my_uca_scanner_init_any
|
eloqsql/strings/ctype-uca.c
|
static void
my_uca_scanner_init_any(my_uca_scanner *scanner,
CHARSET_INFO *cs,
const MY_UCA_WEIGHT_LEVEL *level,
const uchar *str, size_t length)
{
/* Note, no needs to initialize scanner->wbeg */
scanner->sbeg= str;
scanner->send= str + length;
scanner->wbeg= nochar;
scanner->level= level;
scanner->cs= cs;
}
|
O0
|
c
|
my_uca_scanner_init_any:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq %r8, -0x28(%rbp)
movq -0x20(%rbp), %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x20(%rbp), %rcx
addq -0x28(%rbp), %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x10(%rax)
movq -0x8(%rbp), %rax
leaq 0x164621(%rip), %rcx # 0x208c20
movq %rcx, (%rax)
movq -0x18(%rbp), %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x18(%rax)
movq -0x10(%rbp), %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x30(%rax)
popq %rbp
retq
nopl (%rax)
|
my_uca_scanner_init_any:
push rbp
mov rbp, rsp
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov [rbp+var_18], rdx
mov [rbp+var_20], rcx
mov [rbp+var_28], r8
mov rcx, [rbp+var_20]
mov rax, [rbp+var_8]
mov [rax+8], rcx
mov rcx, [rbp+var_20]
add rcx, [rbp+var_28]
mov rax, [rbp+var_8]
mov [rax+10h], rcx
mov rax, [rbp+var_8]
lea rcx, nochar
mov [rax], rcx
mov rcx, [rbp+var_18]
mov rax, [rbp+var_8]
mov [rax+18h], rcx
mov rcx, [rbp+var_10]
mov rax, [rbp+var_8]
mov [rax+30h], rcx
pop rbp
retn
|
_QWORD * my_uca_scanner_init_any(_QWORD *a1, long long a2, long long a3, long long a4, long long a5)
{
_QWORD *result; // rax
a1[1] = a4;
a1[2] = a5 + a4;
*a1 = &nochar;
a1[3] = a3;
result = a1;
a1[6] = a2;
return result;
}
|
my_uca_scanner_init_any:
PUSH RBP
MOV RBP,RSP
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV qword ptr [RBP + -0x18],RDX
MOV qword ptr [RBP + -0x20],RCX
MOV qword ptr [RBP + -0x28],R8
MOV RCX,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RAX + 0x8],RCX
MOV RCX,qword ptr [RBP + -0x20]
ADD RCX,qword ptr [RBP + -0x28]
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RAX + 0x10],RCX
MOV RAX,qword ptr [RBP + -0x8]
LEA RCX,[0x308c20]
MOV qword ptr [RAX],RCX
MOV RCX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RAX + 0x18],RCX
MOV RCX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RAX + 0x30],RCX
POP RBP
RET
|
void my_uca_scanner_init_any
(int8 *param_1,int8 param_2,int8 param_3,long param_4,long param_5)
{
param_1[1] = param_4;
param_1[2] = param_4 + param_5;
*param_1 = &nochar;
param_1[3] = param_3;
param_1[6] = param_2;
return;
}
|
|
8,910 |
reset_connection
|
eloqsql/libmariadb/unittest/libmariadb/my_test.h
|
static int reset_connection(MYSQL *mysql) {
int rc;
if (is_mariadb && !IS_MAXSCALE())
rc= mysql_change_user(mysql, username, password, schema);
else
rc= mysql_reset_connection(mysql);
check_mysql_rc(rc, mysql);
rc= mysql_query(mysql, "SET sql_mode=''");
check_mysql_rc(rc, mysql);
return OK;
}
|
O0
|
c
|
reset_connection:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movzbl 0x6b55e(%rip), %eax # 0x81341
cmpl $0x0, %eax
je 0x15e8f
cmpq $0x0, 0x6b3cc(%rip) # 0x811c0
je 0x15e17
movq 0x6b3c3(%rip), %rdi # 0x811c0
callq 0x3af90
movq %rax, %rdi
leaq 0x50223(%rip), %rsi # 0x6602f
callq 0x14100
cmpq $0x0, %rax
jne 0x15e8f
leaq 0x4fbac(%rip), %rdi # 0x659ca
callq 0x14550
cmpq $0x0, %rax
je 0x15e69
leaq 0x4fb9a(%rip), %rdi # 0x659ca
callq 0x14550
movq %rax, %rdi
leaq 0x50216(%rip), %rsi # 0x66055
callq 0x14600
cmpl $0x0, %eax
je 0x15e8f
leaq 0x4fb7a(%rip), %rdi # 0x659ca
callq 0x14550
movq %rax, %rdi
leaq 0x501d9(%rip), %rsi # 0x66038
callq 0x14600
cmpl $0x0, %eax
je 0x15e8f
movq -0x10(%rbp), %rdi
movq 0x6b494(%rip), %rsi # 0x81308
movq 0x6b495(%rip), %rdx # 0x81310
movq 0x6b496(%rip), %rcx # 0x81318
callq 0x385b0
movsbl %al, %eax
movl %eax, -0x14(%rbp)
jmp 0x15e9b
movq -0x10(%rbp), %rdi
callq 0x3d250
movl %eax, -0x14(%rbp)
jmp 0x15e9d
cmpl $0x0, -0x14(%rbp)
je 0x15eec
movl -0x14(%rbp), %eax
movl %eax, -0x24(%rbp)
movq -0x10(%rbp), %rdi
callq 0x3c3f0
movq %rax, -0x20(%rbp)
movq -0x10(%rbp), %rdi
callq 0x3c3c0
movl -0x24(%rbp), %esi
movq -0x20(%rbp), %rdx
movl %eax, %ecx
leaq 0x4f806(%rip), %rdi # 0x656d5
leaq 0x4f6e2(%rip), %r8 # 0x655b8
movl $0x238, %r9d # imm = 0x238
movb $0x0, %al
callq 0x2fc40
movl $0x1, -0x4(%rbp)
jmp 0x15f59
jmp 0x15eee
movq -0x10(%rbp), %rdi
leaq 0x4f930(%rip), %rsi # 0x65829
callq 0x38a70
movl %eax, -0x14(%rbp)
cmpl $0x0, -0x14(%rbp)
je 0x15f50
movl -0x14(%rbp), %eax
movl %eax, -0x34(%rbp)
movq -0x10(%rbp), %rdi
callq 0x3c3f0
movq %rax, -0x30(%rbp)
movq -0x10(%rbp), %rdi
callq 0x3c3c0
movl -0x34(%rbp), %esi
movq -0x30(%rbp), %rdx
movl %eax, %ecx
leaq 0x4f7a2(%rip), %rdi # 0x656d5
leaq 0x4f67e(%rip), %r8 # 0x655b8
movl $0x23a, %r9d # imm = 0x23A
movb $0x0, %al
callq 0x2fc40
movl $0x1, -0x4(%rbp)
jmp 0x15f59
jmp 0x15f52
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
|
reset_connection:
push rbp
mov rbp, rsp
sub rsp, 40h
mov [rbp+var_10], rdi
movzx eax, cs:is_mariadb
cmp eax, 0
jz loc_15E8F
cmp cs:mysql_default, 0
jz short loc_15E17
mov rdi, cs:mysql_default
call mysql_get_server_info
mov rdi, rax
lea rsi, aMaxscale; "maxScale"
call _strstr
cmp rax, 0
jnz short loc_15E8F
loc_15E17:
lea rdi, aSrv; "srv"
call _getenv
cmp rax, 0
jz short loc_15E69
lea rdi, aSrv; "srv"
call _getenv
mov rdi, rax
lea rsi, aTestDisabledWi+13h; "maxscale"
call _strcmp
cmp eax, 0
jz short loc_15E8F
lea rdi, aSrv; "srv"
call _getenv
mov rdi, rax
lea rsi, aSkysqlHa; "skysql-ha"
call _strcmp
cmp eax, 0
jz short loc_15E8F
loc_15E69:
mov rdi, [rbp+var_10]
mov rsi, cs:username
mov rdx, cs:password
mov rcx, cs:schema
call mysql_change_user
movsx eax, al
mov [rbp+var_14], eax
jmp short loc_15E9B
loc_15E8F:
mov rdi, [rbp+var_10]
call mysql_reset_connection
mov [rbp+var_14], eax
loc_15E9B:
jmp short $+2
loc_15E9D:
cmp [rbp+var_14], 0
jz short loc_15EEC
mov eax, [rbp+var_14]
mov [rbp+var_24], eax
mov rdi, [rbp+var_10]
call mysql_error
mov [rbp+var_20], rax
mov rdi, [rbp+var_10]
call mysql_errno
mov esi, [rbp+var_24]
mov rdx, [rbp+var_20]
mov ecx, eax
lea rdi, aErrorDSDInSLin; "Error (%d): %s (%d) in %s line %d"
lea r8, aWorkspaceLlm4b; "/workspace/llm4binary/github2025/eloqsq"...
mov r9d, 238h
mov al, 0
call diag
mov [rbp+var_4], 1
jmp short loc_15F59
loc_15EEC:
jmp short $+2
loc_15EEE:
mov rdi, [rbp+var_10]
lea rsi, aSetSqlMode; "SET sql_mode=''"
call mysql_query
mov [rbp+var_14], eax
cmp [rbp+var_14], 0
jz short loc_15F50
mov eax, [rbp+var_14]
mov [rbp+var_34], eax
mov rdi, [rbp+var_10]
call mysql_error
mov [rbp+var_30], rax
mov rdi, [rbp+var_10]
call mysql_errno
mov esi, [rbp+var_34]
mov rdx, [rbp+var_30]
mov ecx, eax
lea rdi, aErrorDSDInSLin; "Error (%d): %s (%d) in %s line %d"
lea r8, aWorkspaceLlm4b; "/workspace/llm4binary/github2025/eloqsq"...
mov r9d, 23Ah
mov al, 0
call diag
mov [rbp+var_4], 1
jmp short loc_15F59
loc_15F50:
jmp short $+2
loc_15F52:
mov [rbp+var_4], 0
loc_15F59:
mov eax, [rbp+var_4]
add rsp, 40h
pop rbp
retn
|
long long reset_connection(long long a1)
{
long long server_info; // rax
long long v2; // rax
long long v3; // rax
int v4; // eax
int v5; // eax
int v7; // [rsp+10h] [rbp-30h]
int v8; // [rsp+20h] [rbp-20h]
int v9; // [rsp+2Ch] [rbp-14h]
int v10; // [rsp+2Ch] [rbp-14h]
if ( !is_mariadb
|| mysql_default && (server_info = mysql_get_server_info(mysql_default), strstr(server_info, "maxScale"))
|| getenv("srv")
&& ((v2 = getenv("srv"), !(unsigned int)strcmp(v2, "maxscale"))
|| (v3 = getenv("srv"), !(unsigned int)strcmp(v3, "skysql-ha"))) )
{
v9 = mysql_reset_connection(a1);
}
else
{
v9 = (char)mysql_change_user(a1, username, password, schema);
}
if ( v9 )
{
v8 = mysql_error(a1);
v4 = mysql_errno(a1);
diag(
(unsigned int)"Error (%d): %s (%d) in %s line %d",
v9,
v8,
v4,
(unsigned int)"/workspace/llm4binary/github2025/eloqsql/libmariadb/unittest/libmariadb/my_test.h",
568);
return 1;
}
else
{
v10 = mysql_query(a1, "SET sql_mode=''");
if ( v10 )
{
v7 = mysql_error(a1);
v5 = mysql_errno(a1);
diag(
(unsigned int)"Error (%d): %s (%d) in %s line %d",
v10,
v7,
v5,
(unsigned int)"/workspace/llm4binary/github2025/eloqsql/libmariadb/unittest/libmariadb/my_test.h",
570);
return 1;
}
else
{
return 0;
}
}
}
|
reset_connection:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x40
MOV qword ptr [RBP + -0x10],RDI
MOVZX EAX,byte ptr [0x00181341]
CMP EAX,0x0
JZ 0x00115e8f
CMP qword ptr [0x001811c0],0x0
JZ 0x00115e17
MOV RDI,qword ptr [0x001811c0]
CALL 0x0013af90
MOV RDI,RAX
LEA RSI,[0x16602f]
CALL 0x00114100
CMP RAX,0x0
JNZ 0x00115e8f
LAB_00115e17:
LEA RDI,[0x1659ca]
CALL 0x00114550
CMP RAX,0x0
JZ 0x00115e69
LEA RDI,[0x1659ca]
CALL 0x00114550
MOV RDI,RAX
LEA RSI,[0x166055]
CALL 0x00114600
CMP EAX,0x0
JZ 0x00115e8f
LEA RDI,[0x1659ca]
CALL 0x00114550
MOV RDI,RAX
LEA RSI,[0x166038]
CALL 0x00114600
CMP EAX,0x0
JZ 0x00115e8f
LAB_00115e69:
MOV RDI,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [0x00181308]
MOV RDX,qword ptr [0x00181310]
MOV RCX,qword ptr [0x00181318]
CALL 0x001385b0
MOVSX EAX,AL
MOV dword ptr [RBP + -0x14],EAX
JMP 0x00115e9b
LAB_00115e8f:
MOV RDI,qword ptr [RBP + -0x10]
CALL 0x0013d250
MOV dword ptr [RBP + -0x14],EAX
LAB_00115e9b:
JMP 0x00115e9d
LAB_00115e9d:
CMP dword ptr [RBP + -0x14],0x0
JZ 0x00115eec
MOV EAX,dword ptr [RBP + -0x14]
MOV dword ptr [RBP + -0x24],EAX
MOV RDI,qword ptr [RBP + -0x10]
CALL 0x0013c3f0
MOV qword ptr [RBP + -0x20],RAX
MOV RDI,qword ptr [RBP + -0x10]
CALL 0x0013c3c0
MOV ESI,dword ptr [RBP + -0x24]
MOV RDX,qword ptr [RBP + -0x20]
MOV ECX,EAX
LEA RDI,[0x1656d5]
LEA R8,[0x1655b8]
MOV R9D,0x238
MOV AL,0x0
CALL 0x0012fc40
MOV dword ptr [RBP + -0x4],0x1
JMP 0x00115f59
LAB_00115eec:
JMP 0x00115eee
LAB_00115eee:
MOV RDI,qword ptr [RBP + -0x10]
LEA RSI,[0x165829]
CALL 0x00138a70
MOV dword ptr [RBP + -0x14],EAX
CMP dword ptr [RBP + -0x14],0x0
JZ 0x00115f50
MOV EAX,dword ptr [RBP + -0x14]
MOV dword ptr [RBP + -0x34],EAX
MOV RDI,qword ptr [RBP + -0x10]
CALL 0x0013c3f0
MOV qword ptr [RBP + -0x30],RAX
MOV RDI,qword ptr [RBP + -0x10]
CALL 0x0013c3c0
MOV ESI,dword ptr [RBP + -0x34]
MOV RDX,qword ptr [RBP + -0x30]
MOV ECX,EAX
LEA RDI,[0x1656d5]
LEA R8,[0x1655b8]
MOV R9D,0x23a
MOV AL,0x0
CALL 0x0012fc40
MOV dword ptr [RBP + -0x4],0x1
JMP 0x00115f59
LAB_00115f50:
JMP 0x00115f52
LAB_00115f52:
MOV dword ptr [RBP + -0x4],0x0
LAB_00115f59:
MOV EAX,dword ptr [RBP + -0x4]
ADD RSP,0x40
POP RBP
RET
|
int4 reset_connection(int8 param_1)
{
char cVar1;
int iVar2;
int4 uVar3;
char *pcVar4;
int8 uVar5;
int local_1c;
int4 local_c;
if (is_mariadb != '\0') {
if (mysql_default != 0) {
pcVar4 = (char *)mysql_get_server_info(mysql_default);
pcVar4 = strstr(pcVar4,"maxScale");
if (pcVar4 != (char *)0x0) goto LAB_00115e8f;
}
pcVar4 = getenv("srv");
if (pcVar4 == (char *)0x0) {
LAB_00115e69:
cVar1 = mysql_change_user(param_1,username,password,schema);
local_1c = (int)cVar1;
goto LAB_00115e9b;
}
pcVar4 = getenv("srv");
iVar2 = strcmp(pcVar4,"maxscale");
if (iVar2 != 0) {
pcVar4 = getenv("srv");
iVar2 = strcmp(pcVar4,"skysql-ha");
if (iVar2 != 0) goto LAB_00115e69;
}
}
LAB_00115e8f:
local_1c = mysql_reset_connection(param_1);
LAB_00115e9b:
if (local_1c == 0) {
iVar2 = mysql_query(param_1,"SET sql_mode=\'\'");
if (iVar2 == 0) {
local_c = 0;
}
else {
uVar5 = mysql_error(param_1);
uVar3 = mysql_errno(param_1);
diag("Error (%d): %s (%d) in %s line %d",iVar2,uVar5,uVar3,
"/workspace/llm4binary/github2025/eloqsql/libmariadb/unittest/libmariadb/my_test.h",0x23a
);
local_c = 1;
}
}
else {
uVar5 = mysql_error(param_1);
uVar3 = mysql_errno(param_1);
diag("Error (%d): %s (%d) in %s line %d",local_1c,uVar5,uVar3,
"/workspace/llm4binary/github2025/eloqsql/libmariadb/unittest/libmariadb/my_test.h",0x238);
local_c = 1;
}
return local_c;
}
|
|
8,911 |
hash_to_field
|
corpus-core[P]colibri-stateless/build_O0/_deps/blst-src/src/hash_to_field.c
|
static void hash_to_field(vec384 elems[], size_t nelems,
const unsigned char *aug, size_t aug_len,
const unsigned char *msg, size_t msg_len,
const unsigned char *DST, size_t DST_len)
{
size_t L = sizeof(vec384) + 128/8; /* ceil((ceil(log2(p)) + k) / 8) */
size_t len_in_bytes = L * nelems; /* divisible by 64, hurray! */
#if !defined(__STDC_VERSION__) || __STDC_VERSION__<199901 \
|| defined(__STDC_NO_VLA__)
limb_t *pseudo_random = alloca(len_in_bytes);
#else
limb_t pseudo_random[len_in_bytes/sizeof(limb_t)];
#endif
unsigned char *bytes;
vec768 elem;
aug_len = aug!=NULL ? aug_len : 0;
DST_len = DST!=NULL ? DST_len : 0;
expand_message_xmd((unsigned char *)pseudo_random, len_in_bytes,
aug, aug_len, msg, msg_len, DST, DST_len);
vec_zero(elem, sizeof(elem));
bytes = (unsigned char *)pseudo_random;
while (nelems--) {
limbs_from_be_bytes(elem, bytes, L);
bytes += L;
/*
* L-bytes block % P, output is in Montgomery domain...
*/
redc_mont_384(elems[0], elem, BLS12_381_P, p0);
mul_mont_384(elems[0], elems[0], BLS12_381_RRRR, BLS12_381_P, p0);
elems++;
}
}
|
O0
|
c
|
hash_to_field:
pushq %rbp
movq %rsp, %rbp
subq $0xe0, %rsp
movq 0x18(%rbp), %rax
movq 0x10(%rbp), %rax
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq %r8, -0x28(%rbp)
movq %r9, -0x30(%rbp)
movq $0x40, -0x38(%rbp)
movq -0x38(%rbp), %rax
movq -0x10(%rbp), %rcx
imulq %rcx, %rax
movq %rax, -0x40(%rbp)
movq -0x40(%rbp), %rdx
movq %rdx, %rax
shrq $0x3, %rax
movq %rsp, %rcx
movq %rcx, -0x48(%rbp)
andq $-0x8, %rdx
addq $0xf, %rdx
andq $-0x10, %rdx
movq %rsp, %rcx
subq %rdx, %rcx
movq %rcx, -0xc8(%rbp)
movq %rcx, %rsp
movq %rax, -0x50(%rbp)
cmpq $0x0, -0x18(%rbp)
je 0xb9f99
movq -0x20(%rbp), %rax
movq %rax, -0xd0(%rbp)
jmp 0xb9fa4
xorl %eax, %eax
movq %rax, -0xd0(%rbp)
jmp 0xb9fa4
movq -0xd0(%rbp), %rax
movq %rax, -0x20(%rbp)
cmpq $0x0, 0x10(%rbp)
je 0xb9fc3
movq 0x18(%rbp), %rax
movq %rax, -0xd8(%rbp)
jmp 0xb9fce
xorl %eax, %eax
movq %rax, -0xd8(%rbp)
jmp 0xb9fce
movq -0xc8(%rbp), %rdi
movq -0xd8(%rbp), %rax
movq %rax, 0x18(%rbp)
movq -0x40(%rbp), %rsi
movq -0x18(%rbp), %rdx
movq -0x20(%rbp), %rcx
movq -0x28(%rbp), %r8
movq -0x30(%rbp), %r9
movq 0x10(%rbp), %r10
movq 0x18(%rbp), %rax
subq $0x10, %rsp
movq %r10, (%rsp)
movq %rax, 0x8(%rsp)
callq 0xa6da0
addq $0x10, %rsp
leaq -0xc0(%rbp), %rdi
movl $0x60, %esi
callq 0xa7170
movq -0xc8(%rbp), %rax
movq %rax, -0x58(%rbp)
movq -0x10(%rbp), %rax
movq %rax, %rcx
addq $-0x1, %rcx
movq %rcx, -0x10(%rbp)
cmpq $0x0, %rax
je 0xba0ba
leaq -0xc0(%rbp), %rdi
movq -0x58(%rbp), %rsi
movq -0x38(%rbp), %rdx
callq 0xb4d00
movq -0x38(%rbp), %rax
addq -0x58(%rbp), %rax
movq %rax, -0x58(%rbp)
movq -0x8(%rbp), %rdi
leaq -0xc0(%rbp), %rsi
leaq 0x2bfeb(%rip), %rdx # 0xe6060
movabsq $-0x760c000300030003, %rcx # imm = 0x89F3FFFCFFFCFFFD
callq 0xc97e0
movq -0x8(%rbp), %rdi
movq -0x8(%rbp), %rsi
leaq 0x2ce6d(%rip), %rdx # 0xe6f00
leaq 0x2bfc6(%rip), %rcx # 0xe6060
movabsq $-0x760c000300030003, %r8 # imm = 0x89F3FFFCFFFCFFFD
callq 0xc9ee0
movq -0x8(%rbp), %rax
addq $0x30, %rax
movq %rax, -0x8(%rbp)
jmp 0xba02e
movq -0x48(%rbp), %rax
movq %rax, %rsp
movq %rbp, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
|
hash_to_field:
push rbp
mov rbp, rsp
sub rsp, 0E0h
mov rax, [rbp+arg_8]
mov rax, [rbp+arg_0]
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov [rbp+var_18], rdx
mov [rbp+var_20], rcx
mov [rbp+var_28], r8
mov [rbp+var_30], r9
mov [rbp+var_38], 40h ; '@'
mov rax, [rbp+var_38]
mov rcx, [rbp+var_10]
imul rax, rcx
mov [rbp+var_40], rax
mov rdx, [rbp+var_40]
mov rax, rdx
shr rax, 3
mov rcx, rsp
mov [rbp+var_48], rcx
and rdx, 0FFFFFFFFFFFFFFF8h
add rdx, 0Fh
and rdx, 0FFFFFFFFFFFFFFF0h
mov rcx, rsp
sub rcx, rdx
mov [rbp+var_C8], rcx
mov rsp, rcx
mov [rbp+var_50], rax
cmp [rbp+var_18], 0
jz short loc_B9F99
mov rax, [rbp+var_20]
mov [rbp+var_D0], rax
jmp short loc_B9FA4
loc_B9F99:
xor eax, eax
mov [rbp+var_D0], rax
jmp short $+2
loc_B9FA4:
mov rax, [rbp+var_D0]
mov [rbp+var_20], rax
cmp [rbp+arg_0], 0
jz short loc_B9FC3
mov rax, [rbp+arg_8]
mov [rbp+var_D8], rax
jmp short loc_B9FCE
loc_B9FC3:
xor eax, eax
mov [rbp+var_D8], rax
jmp short $+2
loc_B9FCE:
mov rdi, [rbp+var_C8]
mov rax, [rbp+var_D8]
mov [rbp+arg_8], rax
mov rsi, [rbp+var_40]
mov rdx, [rbp+var_18]
mov rcx, [rbp+var_20]
mov r8, [rbp+var_28]
mov r9, [rbp+var_30]
mov r10, [rbp+arg_0]
mov rax, [rbp+arg_8]
sub rsp, 10h
mov [rsp+10h+var_10], r10
mov [rsp+10h+var_8], rax
call expand_message_xmd
add rsp, 10h
lea rdi, [rbp+var_C0]
mov esi, 60h ; '`'
call vec_zero
mov rax, [rbp+var_C8]
mov [rbp+var_58], rax
loc_BA02E:
mov rax, [rbp+var_10]
mov rcx, rax
add rcx, 0FFFFFFFFFFFFFFFFh
mov [rbp+var_10], rcx
cmp rax, 0
jz short loc_BA0BA
lea rdi, [rbp+var_C0]
mov rsi, [rbp+var_58]
mov rdx, [rbp+var_38]
call limbs_from_be_bytes
mov rax, [rbp+var_38]
add rax, [rbp+var_58]
mov [rbp+var_58], rax
mov rdi, [rbp+var_8]
lea rsi, [rbp+var_C0]
lea rdx, BLS12_381_P
mov rcx, 89F3FFFCFFFCFFFDh
call redc_mont_384
mov rdi, [rbp+var_8]
mov rsi, [rbp+var_8]
lea rdx, BLS12_381_RRRR
lea rcx, BLS12_381_P
mov r8, 89F3FFFCFFFCFFFDh
call mul_mont_384
mov rax, [rbp+var_8]
add rax, 30h ; '0'
mov [rbp+var_8], rax
jmp loc_BA02E
loc_BA0BA:
mov rax, [rbp+var_48]
mov rsp, rax
mov rsp, rbp
pop rbp
retn
|
// bad sp value at call has been detected, the output may be wrong!
long long * hash_to_field(
long long a1,
long long a2,
long long a3,
long long a4,
long long a5,
long long a6,
_BYTE *a7,
unsigned long long a8)
{
long long v10; // [rsp+10h] [rbp-E0h] BYREF
unsigned long long v11; // [rsp+18h] [rbp-D8h]
long long v12; // [rsp+20h] [rbp-D0h]
unsigned __int8 *v13; // [rsp+28h] [rbp-C8h]
_BYTE v14[104]; // [rsp+30h] [rbp-C0h] BYREF
unsigned __int8 *v15; // [rsp+98h] [rbp-58h]
long long v16; // [rsp+A0h] [rbp-50h]
long long *v17; // [rsp+A8h] [rbp-48h]
unsigned long long v18; // [rsp+B0h] [rbp-40h]
unsigned long long v19; // [rsp+B8h] [rbp-38h]
long long v20; // [rsp+C0h] [rbp-30h]
long long v21; // [rsp+C8h] [rbp-28h]
long long v22; // [rsp+D0h] [rbp-20h]
long long v23; // [rsp+D8h] [rbp-18h]
long long v24; // [rsp+E0h] [rbp-10h]
long long v25; // [rsp+E8h] [rbp-8h]
v25 = a1;
v24 = a2;
v23 = a3;
v22 = a4;
v21 = a5;
v20 = a6;
v19 = 64LL;
v18 = a2 << 6;
v17 = &v10;
v13 = (unsigned __int8 *)&v10 - (((a2 << 6) + 15) & 0xFFFFFFFFFFFFFFF0LL);
v16 = (8 * a2) & 0x1FFFFFFFFFFFFFFFLL;
if ( a3 )
v12 = v22;
else
v12 = 0LL;
v22 = v12;
if ( a7 )
v11 = a8;
else
v11 = 0LL;
expand_message_xmd((long long)v13, v18, v23, v22, v21, v20, a7, v11);
vec_zero((long long)v14, 0x60uLL);
v15 = v13;
while ( v24-- )
{
limbs_from_be_bytes((long long)v14, v15, v19);
v15 += v19;
redc_mont_384(v25, v14, &BLS12_381_P, 0x89F3FFFCFFFCFFFDLL);
mul_mont_384(v25, v25, &BLS12_381_RRRR, &BLS12_381_P, 0x89F3FFFCFFFCFFFDLL);
v25 += 48LL;
}
return v17;
}
|
hash_to_field:
PUSH RBP
MOV RBP,RSP
SUB RSP,0xe0
MOV RAX,qword ptr [RBP + 0x18]
MOV RAX,qword ptr [RBP + 0x10]
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV qword ptr [RBP + -0x18],RDX
MOV qword ptr [RBP + -0x20],RCX
MOV qword ptr [RBP + -0x28],R8
MOV qword ptr [RBP + -0x30],R9
MOV qword ptr [RBP + -0x38],0x40
MOV RAX,qword ptr [RBP + -0x38]
MOV RCX,qword ptr [RBP + -0x10]
IMUL RAX,RCX
MOV qword ptr [RBP + -0x40],RAX
MOV RDX,qword ptr [RBP + -0x40]
MOV RAX,RDX
SHR RAX,0x3
MOV RCX,RSP
MOV qword ptr [RBP + -0x48],RCX
AND RDX,-0x8
ADD RDX,0xf
AND RDX,-0x10
MOV RCX,RSP
SUB RCX,RDX
MOV qword ptr [RBP + -0xc8],RCX
MOV RSP,RCX
MOV qword ptr [RBP + -0x50],RAX
CMP qword ptr [RBP + -0x18],0x0
JZ 0x001b9f99
MOV RAX,qword ptr [RBP + -0x20]
MOV qword ptr [RBP + -0xd0],RAX
JMP 0x001b9fa4
LAB_001b9f99:
XOR EAX,EAX
MOV qword ptr [RBP + -0xd0],RAX
JMP 0x001b9fa4
LAB_001b9fa4:
MOV RAX,qword ptr [RBP + -0xd0]
MOV qword ptr [RBP + -0x20],RAX
CMP qword ptr [RBP + 0x10],0x0
JZ 0x001b9fc3
MOV RAX,qword ptr [RBP + 0x18]
MOV qword ptr [RBP + -0xd8],RAX
JMP 0x001b9fce
LAB_001b9fc3:
XOR EAX,EAX
MOV qword ptr [RBP + -0xd8],RAX
JMP 0x001b9fce
LAB_001b9fce:
MOV RDI,qword ptr [RBP + -0xc8]
MOV RAX,qword ptr [RBP + -0xd8]
MOV qword ptr [RBP + 0x18],RAX
MOV RSI,qword ptr [RBP + -0x40]
MOV RDX,qword ptr [RBP + -0x18]
MOV RCX,qword ptr [RBP + -0x20]
MOV R8,qword ptr [RBP + -0x28]
MOV R9,qword ptr [RBP + -0x30]
MOV R10,qword ptr [RBP + 0x10]
MOV RAX,qword ptr [RBP + 0x18]
SUB RSP,0x10
MOV qword ptr [RSP],R10
MOV qword ptr [RSP + 0x8],RAX
CALL 0x001a6da0
ADD RSP,0x10
LEA RDI,[RBP + -0xc0]
MOV ESI,0x60
CALL 0x001a7170
MOV RAX,qword ptr [RBP + -0xc8]
MOV qword ptr [RBP + -0x58],RAX
LAB_001ba02e:
MOV RAX,qword ptr [RBP + -0x10]
MOV RCX,RAX
ADD RCX,-0x1
MOV qword ptr [RBP + -0x10],RCX
CMP RAX,0x0
JZ 0x001ba0ba
LEA RDI,[RBP + -0xc0]
MOV RSI,qword ptr [RBP + -0x58]
MOV RDX,qword ptr [RBP + -0x38]
CALL 0x001b4d00
MOV RAX,qword ptr [RBP + -0x38]
ADD RAX,qword ptr [RBP + -0x58]
MOV qword ptr [RBP + -0x58],RAX
MOV RDI,qword ptr [RBP + -0x8]
LEA RSI,[RBP + -0xc0]
LEA RDX,[0x1e6060]
MOV RCX,-0x760c000300030003
CALL 0x001c97e0
MOV RDI,qword ptr [RBP + -0x8]
MOV RSI,qword ptr [RBP + -0x8]
LEA RDX,[0x1e6f00]
LEA RCX,[0x1e6060]
MOV R8,-0x760c000300030003
CALL 0x001c9ee0
MOV RAX,qword ptr [RBP + -0x8]
ADD RAX,0x30
MOV qword ptr [RBP + -0x8],RAX
JMP 0x001ba02e
LAB_001ba0ba:
MOV RAX,qword ptr [RBP + -0x48]
MOV RSP,RAX
MOV RSP,RBP
POP RBP
RET
|
int1 *
hash_to_field(long param_1,long param_2,long param_3,int8 param_4,int8 param_5,
int8 param_6,long param_7,int8 param_8)
{
long lVar1;
int8 uVar2;
int8 uVar3;
int1 *puVar4;
long lVar5;
ulong uVar6;
long alStack_100 [3];
int1 auStack_e8 [8];
int8 local_e0;
int8 local_d8;
int1 *local_d0;
int1 local_c8 [104];
int1 *local_60;
ulong local_58;
int1 *local_50;
ulong local_48;
long local_40;
int8 local_38;
int8 local_30;
int8 local_28;
long local_20;
long local_18;
long local_10;
local_50 = auStack_e8;
local_40 = 0x40;
uVar6 = param_2 * 0x40;
local_58 = uVar6 >> 3;
lVar1 = param_2 * -0x40;
local_d8 = param_4;
if (param_3 == 0) {
local_d8 = 0;
}
uVar3 = local_d8;
local_28 = local_d8;
if (param_7 == 0) {
local_e0 = 0;
}
else {
local_e0 = param_8;
}
uVar2 = local_e0;
local_d0 = auStack_e8 + lVar1;
local_48 = uVar6;
local_38 = param_6;
local_30 = param_5;
local_20 = param_3;
local_18 = param_2;
local_10 = param_1;
alStack_100[param_2 * -8 + 1] = param_7;
*(int8 *)(auStack_e8 + lVar1 + -8) = uVar2;
alStack_100[param_2 * -8] = 0x1ba00e;
expand_message_xmd(auStack_e8 + lVar1,uVar6,param_3,uVar3,param_5,param_6);
*(int8 *)(auStack_e8 + lVar1 + -8) = 0x1ba023;
vec_zero(local_c8,0x60);
local_60 = local_d0;
while (lVar5 = local_40, puVar4 = local_60, local_18 != 0) {
local_18 = local_18 + -1;
*(int8 *)(auStack_e8 + lVar1 + -8) = 0x1ba057;
limbs_from_be_bytes(local_c8,puVar4,lVar5);
lVar5 = local_10;
local_60 = local_60 + local_40;
*(int8 *)(auStack_e8 + lVar1 + -8) = 0x1ba084;
redc_mont_384(lVar5,local_c8,BLS12_381_P,0x89f3fffcfffcfffd);
lVar5 = local_10;
*(int8 *)(auStack_e8 + lVar1 + -8) = 0x1ba0a9;
mul_mont_384(lVar5,lVar5,BLS12_381_RRRR,BLS12_381_P,0x89f3fffcfffcfffd);
local_10 = local_10 + 0x30;
}
return local_50;
}
|
|
8,912 |
LefDefParser::defiGroup::propValue(int) const
|
Efficient-TDP/thirdparty/Limbo/limbo/thirdparty/lefdef/5.8/def/def/defiGroup.cpp
|
const char* defiGroup::propValue(int index) const {
char msg[160];
if (index < 0 || index >= numProps_) {
sprintf (msg, "ERROR (LEFPARS-6050): The index number %d given for the GROUP PROPERTY is invalid.\nValid index is from 0 to %d", index, numProps_);
defiError(0, 6050, msg, defData);
return 0;
}
return propValues_[index];
}
|
O3
|
cpp
|
LefDefParser::defiGroup::propValue(int) const:
pushq %r15
pushq %r14
pushq %rbx
subq $0xa0, %rsp
movl %esi, %edx
movq %rdi, %r14
testl %esi, %esi
setns %al
movl 0x5c(%rdi), %ecx
cmpl %esi, %ecx
setg %sil
testb %sil, %al
je 0x2e8a2
movq 0x70(%r14), %rax
movl %edx, %ecx
movq (%rax,%rcx,8), %rbx
jmp 0x2e8ce
leaq 0x17467(%rip), %rsi # 0x45d10
xorl %ebx, %ebx
movq %rsp, %r15
movq %r15, %rdi
xorl %eax, %eax
callq 0x7060
movq 0x88(%r14), %rcx
xorl %edi, %edi
movl $0x17a2, %esi # imm = 0x17A2
movq %r15, %rdx
callq 0x1bb18
movq %rbx, %rax
addq $0xa0, %rsp
popq %rbx
popq %r14
popq %r15
retq
|
_ZNK12LefDefParser9defiGroup9propValueEi:
push r15
push r14
push rbx
sub rsp, 0A0h
mov edx, esi
mov r14, rdi
test esi, esi
setns al
mov ecx, [rdi+5Ch]
cmp ecx, esi
setnle sil
test al, sil
jz short loc_2E8A2
mov rax, [r14+70h]
mov ecx, edx
mov rbx, [rax+rcx*8]
jmp short loc_2E8CE
loc_2E8A2:
lea rsi, aErrorLefpars60_0; "ERROR (LEFPARS-6050): The index number "...
xor ebx, ebx
mov r15, rsp
mov rdi, r15
xor eax, eax
call _sprintf
mov rcx, [r14+88h]; LefDefParser::defrData *
xor edi, edi; this
mov esi, 17A2h; int
mov rdx, r15; char *
call _ZN12LefDefParser9defiErrorEiiPKcPNS_8defrDataE; LefDefParser::defiError(int,int,char const*,LefDefParser::defrData *)
loc_2E8CE:
mov rax, rbx
add rsp, 0A0h
pop rbx
pop r14
pop r15
retn
|
long long LefDefParser::defiGroup::propValue(LefDefParser::defiGroup *this, signed int a2)
{
int v2; // ecx
long long v3; // rbx
LefDefParser::defrData *v4; // r8
char v6[184]; // [rsp+0h] [rbp-B8h] BYREF
v2 = *((_DWORD *)this + 23);
if ( v2 > a2 && a2 >= 0 )
return *(_QWORD *)(*((_QWORD *)this + 14) + 8LL * (unsigned int)a2);
v3 = 0LL;
sprintf(
v6,
"ERROR (LEFPARS-6050): The index number %d given for the GROUP PROPERTY is invalid.\nValid index is from 0 to %d",
a2,
v2);
LefDefParser::defiError(0LL, 6050, v6, *((LefDefParser::defrData **)this + 17), v4);
return v3;
}
|
propValue:
PUSH R15
PUSH R14
PUSH RBX
SUB RSP,0xa0
MOV EDX,ESI
MOV R14,RDI
TEST ESI,ESI
SETNS AL
MOV ECX,dword ptr [RDI + 0x5c]
CMP ECX,ESI
SETG SIL
TEST AL,SIL
JZ 0x0012e8a2
MOV RAX,qword ptr [R14 + 0x70]
MOV ECX,EDX
MOV RBX,qword ptr [RAX + RCX*0x8]
JMP 0x0012e8ce
LAB_0012e8a2:
LEA RSI,[0x145d10]
XOR EBX,EBX
MOV R15,RSP
MOV RDI,R15
XOR EAX,EAX
CALL 0x00107060
MOV RCX,qword ptr [R14 + 0x88]
XOR EDI,EDI
MOV ESI,0x17a2
MOV RDX,R15
CALL 0x0011bb18
LAB_0012e8ce:
MOV RAX,RBX
ADD RSP,0xa0
POP RBX
POP R14
POP R15
RET
|
/* LefDefParser::defiGroup::propValue(int) const */
int8 __thiscall LefDefParser::defiGroup::propValue(defiGroup *this,int param_1)
{
int8 uVar1;
char acStack_b8 [160];
if (param_1 < 0 || *(int *)(this + 0x5c) <= param_1) {
uVar1 = 0;
sprintf(acStack_b8,
"ERROR (LEFPARS-6050): The index number %d given for the GROUP PROPERTY is invalid.\nValid index is from 0 to %d"
);
defiError(0,0x17a2,acStack_b8,*(defrData **)(this + 0x88));
}
else {
uVar1 = *(int8 *)(*(long *)(this + 0x70) + (ulong)(uint)param_1 * 8);
}
return uVar1;
}
|
|
8,913 |
my_wildcmp_unicode_impl
|
eloqsql/strings/ctype-utf8.c
|
static
int my_wildcmp_unicode_impl(CHARSET_INFO *cs,
const char *str,const char *str_end,
const char *wildstr,const char *wildend,
int escape, int w_one, int w_many,
MY_UNICASE_INFO *weights, int recurse_level)
{
int result= -1; /* Not found, using wildcards */
my_wc_t s_wc, w_wc;
int scan;
my_charset_conv_mb_wc mb_wc= cs->cset->mb_wc;
if (my_string_stack_guard && my_string_stack_guard(recurse_level))
return 1;
while (wildstr != wildend)
{
while (1)
{
my_bool escaped= 0;
if ((scan= mb_wc(cs, &w_wc, (const uchar*)wildstr,
(const uchar*)wildend)) <= 0)
return 1;
if (w_wc == (my_wc_t) w_many)
{
result= 1; /* Found an anchor char */
break;
}
wildstr+= scan;
if (w_wc == (my_wc_t) escape && wildstr < wildend)
{
if ((scan= mb_wc(cs, &w_wc, (const uchar*)wildstr,
(const uchar*)wildend)) <= 0)
return 1;
wildstr+= scan;
escaped= 1;
}
if ((scan= mb_wc(cs, &s_wc, (const uchar*)str,
(const uchar*)str_end)) <= 0)
return 1;
str+= scan;
if (!escaped && w_wc == (my_wc_t) w_one)
{
result= 1; /* Found an anchor char */
}
else
{
if (weights)
{
my_tosort_unicode(weights, &s_wc, cs->state);
my_tosort_unicode(weights, &w_wc, cs->state);
}
if (s_wc != w_wc)
return 1; /* No match */
}
if (wildstr == wildend)
return (str != str_end); /* Match if both are at end */
}
if (w_wc == (my_wc_t) w_many)
{ /* Found w_many */
/* Remove any '%' and '_' from the wild search string */
for ( ; wildstr != wildend ; )
{
if ((scan= mb_wc(cs, &w_wc, (const uchar*)wildstr,
(const uchar*)wildend)) <= 0)
return 1;
if (w_wc == (my_wc_t) w_many)
{
wildstr+= scan;
continue;
}
if (w_wc == (my_wc_t) w_one)
{
wildstr+= scan;
if ((scan= mb_wc(cs, &s_wc, (const uchar*)str,
(const uchar*)str_end)) <= 0)
return 1;
str+= scan;
continue;
}
break; /* Not a wild character */
}
if (wildstr == wildend)
return 0; /* Ok if w_many is last */
if (str == str_end)
return -1;
if ((scan= mb_wc(cs, &w_wc, (const uchar*)wildstr,
(const uchar*)wildend)) <= 0)
return 1;
wildstr+= scan;
if (w_wc == (my_wc_t) escape)
{
if (wildstr < wildend)
{
if ((scan= mb_wc(cs, &w_wc, (const uchar*)wildstr,
(const uchar*)wildend)) <= 0)
return 1;
wildstr+= scan;
}
}
while (1)
{
/* Skip until the first character from wildstr is found */
while (str != str_end)
{
if ((scan= mb_wc(cs, &s_wc, (const uchar*)str,
(const uchar*)str_end)) <= 0)
return 1;
if (weights)
{
my_tosort_unicode(weights, &s_wc, cs->state);
my_tosort_unicode(weights, &w_wc, cs->state);
}
if (s_wc == w_wc)
break;
str+= scan;
}
if (str == str_end)
return -1;
str+= scan;
result= my_wildcmp_unicode_impl(cs, str, str_end, wildstr, wildend,
escape, w_one, w_many,
weights, recurse_level + 1);
if (result <= 0)
return result;
}
}
}
return (str != str_end ? 1 : 0);
}
|
O3
|
c
|
my_wildcmp_unicode_impl:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x58, %rsp
movl %r9d, -0x54(%rbp)
movq %r8, %r12
movq %rcx, %r13
movq %rdx, -0x50(%rbp)
movq %rsi, -0x38(%rbp)
movq %rdi, %r15
movl 0x28(%rbp), %eax
movq %rax, -0x60(%rbp)
movq 0xb8(%rdi), %rax
movq 0x28(%rax), %rax
movq %rax, -0x40(%rbp)
leaq 0xb468e3(%rip), %rax # 0xc31780
movq (%rax), %rax
testq %rax, %rax
je 0xeaeb7
movl 0x28(%rbp), %edi
callq *%rax
movl $0x1, %ebx
testl %eax, %eax
jne 0xeb247
cmpq %r12, %r13
je 0xeb046
movl 0x18(%rbp), %eax
movl 0x10(%rbp), %ecx
cltq
movq %rax, -0x78(%rbp)
movslq -0x54(%rbp), %rax
movq %rax, -0x70(%rbp)
movslq %ecx, %rax
movq %rax, -0x68(%rbp)
movq %r15, %rdi
leaq -0x30(%rbp), %rsi
movq %r13, %rdx
movq %r12, %rcx
movq -0x40(%rbp), %r14
callq *%r14
testl %eax, %eax
jle 0xeb242
movq -0x30(%rbp), %rcx
cmpq -0x78(%rbp), %rcx
je 0xeb058
movl %eax, %eax
addq %rax, %r13
cmpq -0x70(%rbp), %rcx
jne 0xeaf5e
cmpq %r12, %r13
jae 0xeaf5e
movq %r15, %rdi
leaq -0x30(%rbp), %rsi
movq %r13, %rdx
movq %r12, %rcx
callq *%r14
testl %eax, %eax
jle 0xeb242
movl %eax, %ebx
movq %r15, %rdi
leaq -0x48(%rbp), %rsi
movq %r14, %rax
movq -0x38(%rbp), %r14
movq %r14, %rdx
movq -0x50(%rbp), %rcx
callq *%rax
testl %eax, %eax
jle 0xeb242
movl %ebx, %ecx
addq %rcx, %r13
movl %eax, %eax
addq %rax, %r14
movq %r14, -0x38(%rbp)
jmp 0xeaf92
movq %r15, %rdi
leaq -0x48(%rbp), %rsi
movq -0x38(%rbp), %rbx
movq %rbx, %rdx
movq -0x50(%rbp), %rcx
callq *%r14
testl %eax, %eax
jle 0xeb242
movl %eax, %eax
addq %rax, %rbx
movq %rbx, -0x38(%rbp)
movq -0x68(%rbp), %rax
cmpq %rax, -0x30(%rbp)
je 0xeb03d
movq -0x48(%rbp), %rax
movq 0x20(%rbp), %r8
testq %r8, %r8
je 0xeb02b
movl 0xc(%r15), %ecx
movq (%r8), %rdx
movl $0xfffd, %esi # imm = 0xFFFD
cmpq %rdx, %rax
ja 0xeafe0
movq 0x8(%r8), %rsi
movq %rax, %rdi
shrq $0x8, %rdi
movq (%rsi,%rdi,8), %rsi
testq %rsi, %rsi
je 0xeafe7
xorl %edi, %edi
testw %cx, %cx
setns %dil
movzbl %al, %eax
leaq (%rax,%rax,2), %rax
leaq (%rsi,%rax,4), %rax
movl 0x4(%rax,%rdi,4), %esi
movq %rsi, -0x48(%rbp)
movq %rsi, %rax
movq -0x30(%rbp), %rsi
movl $0xfffd, %edi # imm = 0xFFFD
cmpq %rdx, %rsi
ja 0xeb022
movq 0x8(%r8), %rdx
movq %rsi, %rdi
shrq $0x8, %rdi
movq (%rdx,%rdi,8), %rdx
testq %rdx, %rdx
je 0xeb02f
xorl %edi, %edi
testw %cx, %cx
setns %dil
movzbl %sil, %ecx
leaq (%rcx,%rcx,2), %rcx
leaq (%rdx,%rcx,4), %rcx
movl 0x4(%rcx,%rdi,4), %edi
movq %rdi, -0x30(%rbp)
movq %rdi, %rsi
jmp 0xeb02f
movq -0x30(%rbp), %rsi
movl $0x1, %ebx
cmpq %rsi, %rax
jne 0xeb247
cmpq %r12, %r13
jne 0xeaedb
xorl %ebx, %ebx
movq -0x50(%rbp), %rax
cmpq %rax, -0x38(%rbp)
setne %bl
jmp 0xeb247
xorl %ebx, %ebx
cmpq %r12, %r13
je 0xeb247
movq %r15, %rdi
leaq -0x30(%rbp), %rsi
movq %r13, %rdx
movq %r12, %rcx
callq *%r14
testl %eax, %eax
jle 0xeb242
movl %eax, %r14d
movq -0x30(%rbp), %rax
cmpq -0x78(%rbp), %rax
jne 0xeb09c
movl %r14d, %eax
addq %rax, %r13
cmpq %r12, %r13
movq -0x40(%rbp), %r14
jne 0xeb063
jmp 0xeb247
cmpq -0x68(%rbp), %rax
jne 0xeb0ca
movq %r15, %rdi
leaq -0x48(%rbp), %rsi
movq -0x38(%rbp), %rdx
movq -0x50(%rbp), %rcx
callq *-0x40(%rbp)
testl %eax, %eax
jle 0xeb242
movl %r14d, %ecx
addq %rcx, %r13
movl %eax, %eax
addq %rax, -0x38(%rbp)
jmp 0xeb08e
movq -0x50(%rbp), %r14
cmpq %r14, -0x38(%rbp)
je 0xeb258
leaq -0x30(%rbp), %rsi
movq %r15, %rdi
movq %r13, %rdx
movq %r12, %rcx
callq *-0x40(%rbp)
testl %eax, %eax
jle 0xeb242
movl %eax, %eax
addq %rax, %r13
movq -0x70(%rbp), %rax
cmpq %rax, -0x30(%rbp)
jne 0xeb121
cmpq %r12, %r13
jae 0xeb121
leaq -0x30(%rbp), %rsi
movq %r15, %rdi
movq %r13, %rdx
movq %r12, %rcx
callq *-0x40(%rbp)
testl %eax, %eax
jle 0xeb242
movl %eax, %eax
addq %rax, %r13
movq -0x60(%rbp), %rax
incl %eax
movq %rax, -0x60(%rbp)
movq -0x38(%rbp), %rbx
cmpq %r14, %rbx
je 0xeb258
movq %r15, %rdi
leaq -0x48(%rbp), %rsi
movq %rbx, %rdx
movq %r14, %rcx
callq *-0x40(%rbp)
testl %eax, %eax
jle 0xeb242
movq -0x48(%rbp), %rcx
movq 0x20(%rbp), %rsi
testq %rsi, %rsi
je 0xeb1f6
movl 0xc(%r15), %edx
movq (%rsi), %rsi
movl $0xfffd, %edi # imm = 0xFFFD
cmpq %rsi, %rcx
ja 0xeb1a4
movq 0x20(%rbp), %rdi
movq 0x8(%rdi), %rdi
movq %rcx, %r8
shrq $0x8, %r8
movq (%rdi,%r8,8), %rdi
testq %rdi, %rdi
je 0xeb1ab
xorl %r8d, %r8d
testw %dx, %dx
setns %r8b
movzbl %cl, %ecx
leaq (%rcx,%rcx,2), %rcx
leaq (%rdi,%rcx,4), %rcx
movl 0x4(%rcx,%r8,4), %edi
movq %rdi, -0x48(%rbp)
movq %rdi, %rcx
movq -0x30(%rbp), %rdi
movl $0xfffd, %r8d # imm = 0xFFFD
cmpq %rsi, %rdi
ja 0xeb1ed
movq 0x20(%rbp), %rsi
movq 0x8(%rsi), %rsi
movq %rdi, %r8
shrq $0x8, %r8
movq (%rsi,%r8,8), %rsi
testq %rsi, %rsi
je 0xeb1fa
xorl %r8d, %r8d
testw %dx, %dx
setns %r8b
movzbl %dil, %edx
leaq (%rdx,%rdx,2), %rdx
leaq (%rsi,%rdx,4), %rdx
movl 0x4(%rdx,%r8,4), %r8d
movq %r8, -0x30(%rbp)
movq %r8, %rdi
jmp 0xeb1fa
movq -0x30(%rbp), %rdi
movl %eax, %eax
addq %rax, %rbx
cmpq %rdi, %rcx
jne 0xeb12f
movq %r15, %rdi
movq %rbx, -0x38(%rbp)
movq %rbx, %rsi
movq %r14, %rdx
movq %r13, %rcx
movq %r12, %r8
movl -0x54(%rbp), %r9d
pushq -0x60(%rbp)
pushq 0x20(%rbp)
movl 0x18(%rbp), %eax
pushq %rax
movl 0x10(%rbp), %eax
pushq %rax
callq 0xeae5a
addq $0x20, %rsp
movl %eax, %ebx
testl %eax, %eax
jg 0xeb12b
jmp 0xeb247
movl $0x1, %ebx
movl %ebx, %eax
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl $0xffffffff, %ebx # imm = 0xFFFFFFFF
jmp 0xeb247
|
my_wildcmp_unicode_impl:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 58h
mov [rbp+var_54], r9d
mov r12, r8
mov r13, rcx
mov [rbp+var_50], rdx
mov [rbp+var_38], rsi
mov r15, rdi
mov eax, [rbp+arg_18]
mov [rbp+var_60], rax
mov rax, [rdi+0B8h]
mov rax, [rax+28h]
mov [rbp+var_40], rax
lea rax, my_string_stack_guard
mov rax, [rax]
test rax, rax
jz short loc_EAEB7
mov edi, [rbp+arg_18]
call rax
mov ebx, 1
test eax, eax
jnz loc_EB247
loc_EAEB7:
cmp r13, r12
jz loc_EB046
mov eax, [rbp+arg_8]
mov ecx, [rbp+arg_0]
cdqe
mov [rbp+var_78], rax
movsxd rax, [rbp+var_54]
mov [rbp+var_70], rax
movsxd rax, ecx
mov [rbp+var_68], rax
loc_EAEDB:
mov rdi, r15
lea rsi, [rbp+var_30]
mov rdx, r13
mov rcx, r12
mov r14, [rbp+var_40]
call r14
test eax, eax
jle loc_EB242
mov rcx, [rbp+var_30]
cmp rcx, [rbp+var_78]
jz loc_EB058
mov eax, eax
add r13, rax
cmp rcx, [rbp+var_70]
jnz short loc_EAF5E
cmp r13, r12
jnb short loc_EAF5E
mov rdi, r15
lea rsi, [rbp+var_30]
mov rdx, r13
mov rcx, r12
call r14
test eax, eax
jle loc_EB242
mov ebx, eax
mov rdi, r15
lea rsi, [rbp+var_48]
mov rax, r14
mov r14, [rbp+var_38]
mov rdx, r14
mov rcx, [rbp+var_50]
call rax
test eax, eax
jle loc_EB242
mov ecx, ebx
add r13, rcx
mov eax, eax
add r14, rax
mov [rbp+var_38], r14
jmp short loc_EAF92
loc_EAF5E:
mov rdi, r15
lea rsi, [rbp+var_48]
mov rbx, [rbp+var_38]
mov rdx, rbx
mov rcx, [rbp+var_50]
call r14
test eax, eax
jle loc_EB242
mov eax, eax
add rbx, rax
mov [rbp+var_38], rbx
mov rax, [rbp+var_68]
cmp [rbp+var_30], rax
jz loc_EB03D
loc_EAF92:
mov rax, [rbp+var_48]
mov r8, [rbp+arg_10]
test r8, r8
jz loc_EB02B
mov ecx, [r15+0Ch]
mov rdx, [r8]
mov esi, 0FFFDh
cmp rax, rdx
ja short loc_EAFE0
mov rsi, [r8+8]
mov rdi, rax
shr rdi, 8
mov rsi, [rsi+rdi*8]
test rsi, rsi
jz short loc_EAFE7
xor edi, edi
test cx, cx
setns dil
movzx eax, al
lea rax, [rax+rax*2]
lea rax, [rsi+rax*4]
mov esi, [rax+rdi*4+4]
loc_EAFE0:
mov [rbp+var_48], rsi
mov rax, rsi
loc_EAFE7:
mov rsi, [rbp+var_30]
mov edi, 0FFFDh
cmp rsi, rdx
ja short loc_EB022
mov rdx, [r8+8]
mov rdi, rsi
shr rdi, 8
mov rdx, [rdx+rdi*8]
test rdx, rdx
jz short loc_EB02F
xor edi, edi
test cx, cx
setns dil
movzx ecx, sil
lea rcx, [rcx+rcx*2]
lea rcx, [rdx+rcx*4]
mov edi, [rcx+rdi*4+4]
loc_EB022:
mov [rbp+var_30], rdi
mov rsi, rdi
jmp short loc_EB02F
loc_EB02B:
mov rsi, [rbp+var_30]
loc_EB02F:
mov ebx, 1
cmp rax, rsi
jnz loc_EB247
loc_EB03D:
cmp r13, r12
jnz loc_EAEDB
loc_EB046:
xor ebx, ebx
mov rax, [rbp+var_50]
cmp [rbp+var_38], rax
setnz bl
jmp loc_EB247
loc_EB058:
xor ebx, ebx
cmp r13, r12
jz loc_EB247
loc_EB063:
mov rdi, r15
lea rsi, [rbp+var_30]
mov rdx, r13
mov rcx, r12
call r14
test eax, eax
jle loc_EB242
mov r14d, eax
mov rax, [rbp+var_30]
cmp rax, [rbp+var_78]
jnz short loc_EB09C
mov eax, r14d
add r13, rax
loc_EB08E:
cmp r13, r12
mov r14, [rbp+var_40]
jnz short loc_EB063
jmp loc_EB247
loc_EB09C:
cmp rax, [rbp+var_68]
jnz short loc_EB0CA
mov rdi, r15
lea rsi, [rbp+var_48]
mov rdx, [rbp+var_38]
mov rcx, [rbp+var_50]
call [rbp+var_40]
test eax, eax
jle loc_EB242
mov ecx, r14d
add r13, rcx
mov eax, eax
add [rbp+var_38], rax
jmp short loc_EB08E
loc_EB0CA:
mov r14, [rbp+var_50]
cmp [rbp+var_38], r14
jz loc_EB258
lea rsi, [rbp+var_30]
mov rdi, r15
mov rdx, r13
mov rcx, r12
call [rbp+var_40]
test eax, eax
jle loc_EB242
mov eax, eax
add r13, rax
mov rax, [rbp+var_70]
cmp [rbp+var_30], rax
jnz short loc_EB121
cmp r13, r12
jnb short loc_EB121
lea rsi, [rbp+var_30]
mov rdi, r15
mov rdx, r13
mov rcx, r12
call [rbp+var_40]
test eax, eax
jle loc_EB242
mov eax, eax
add r13, rax
loc_EB121:
mov rax, [rbp+var_60]
inc eax
mov [rbp+var_60], rax
loc_EB12B:
mov rbx, [rbp+var_38]
loc_EB12F:
cmp rbx, r14
jz loc_EB258
mov rdi, r15
lea rsi, [rbp+var_48]
mov rdx, rbx
mov rcx, r14
call [rbp+var_40]
test eax, eax
jle loc_EB242
mov rcx, [rbp+var_48]
mov rsi, [rbp+arg_10]
test rsi, rsi
jz loc_EB1F6
mov edx, [r15+0Ch]
mov rsi, [rsi]
mov edi, 0FFFDh
cmp rcx, rsi
ja short loc_EB1A4
mov rdi, [rbp+arg_10]
mov rdi, [rdi+8]
mov r8, rcx
shr r8, 8
mov rdi, [rdi+r8*8]
test rdi, rdi
jz short loc_EB1AB
xor r8d, r8d
test dx, dx
setns r8b
movzx ecx, cl
lea rcx, [rcx+rcx*2]
lea rcx, [rdi+rcx*4]
mov edi, [rcx+r8*4+4]
loc_EB1A4:
mov [rbp+var_48], rdi
mov rcx, rdi
loc_EB1AB:
mov rdi, [rbp+var_30]
mov r8d, 0FFFDh
cmp rdi, rsi
ja short loc_EB1ED
mov rsi, [rbp+arg_10]
mov rsi, [rsi+8]
mov r8, rdi
shr r8, 8
mov rsi, [rsi+r8*8]
test rsi, rsi
jz short loc_EB1FA
xor r8d, r8d
test dx, dx
setns r8b
movzx edx, dil
lea rdx, [rdx+rdx*2]
lea rdx, [rsi+rdx*4]
mov r8d, [rdx+r8*4+4]
loc_EB1ED:
mov [rbp+var_30], r8
mov rdi, r8
jmp short loc_EB1FA
loc_EB1F6:
mov rdi, [rbp+var_30]
loc_EB1FA:
mov eax, eax
add rbx, rax
cmp rcx, rdi
jnz loc_EB12F
mov rdi, r15
mov [rbp+var_38], rbx
mov rsi, rbx
mov rdx, r14
mov rcx, r13
mov r8, r12
mov r9d, [rbp+var_54]
push [rbp+var_60]
push [rbp+arg_10]
mov eax, [rbp+arg_8]
push rax
mov eax, [rbp+arg_0]
push rax
call my_wildcmp_unicode_impl
add rsp, 20h
mov ebx, eax
test eax, eax
jg loc_EB12B
jmp short loc_EB247
loc_EB242:
mov ebx, 1
loc_EB247:
mov eax, ebx
add rsp, 58h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_EB258:
mov ebx, 0FFFFFFFFh
jmp short loc_EB247
|
long long my_wildcmp_unicode_impl(
long long a1,
long long a2,
unsigned long long a3,
unsigned long long a4,
unsigned long long a5,
int a6,
int a7,
int a8,
unsigned long long *a9,
unsigned int a10)
{
unsigned int v13; // ebx
long long ( *v14)(long long, unsigned __int8 *, unsigned long long, unsigned long long); // r14
int v15; // eax
int v16; // eax
unsigned int v17; // ebx
long long ( *v18)(long long, unsigned long long *, long long, long long); // rax
long long v19; // r14
int v20; // eax
long long v21; // rbx
int v22; // eax
long long v23; // rax
int v24; // ecx
unsigned long long v25; // rdx
long long v26; // rsi
long long v27; // rsi
long long v28; // rsi
long long v29; // rdi
long long v30; // rdx
int v31; // eax
unsigned int v32; // r14d
int v33; // eax
int v34; // eax
unsigned long long v35; // r13
int v36; // eax
unsigned long long v37; // rbx
int v38; // eax
long long v39; // rcx
int v40; // edx
unsigned long long v41; // rsi
long long v42; // rdi
long long v43; // rdi
long long v44; // rdi
long long v45; // r8
long long v46; // rsi
unsigned long long v50; // [rsp+38h] [rbp-48h] BYREF
long long ( *v51)(long long, unsigned __int8 *, unsigned long long, unsigned long long); // [rsp+40h] [rbp-40h]
long long v52; // [rsp+48h] [rbp-38h]
unsigned __int8 v53[48]; // [rsp+50h] [rbp-30h] BYREF
v52 = a2;
v51 = *(long long ( **)(long long, unsigned __int8 *, unsigned long long, unsigned long long))(*(_QWORD *)(a1 + 184)
+ 40LL);
if ( my_string_stack_guard )
{
v13 = 1;
if ( (unsigned int)my_string_stack_guard(a10) )
return v13;
}
if ( a4 == a5 )
return v52 != a3;
while ( 1 )
{
v14 = v51;
v15 = v51(a1, v53, a4, a5);
if ( v15 <= 0 )
return 1;
if ( *(_QWORD *)v53 == a8 )
break;
a4 += (unsigned int)v15;
if ( *(_QWORD *)v53 == a6 && a4 < a5 )
{
v16 = v14(a1, v53, a4, a5);
if ( v16 <= 0 )
return 1;
v17 = v16;
v18 = (long long ( *)(long long, unsigned long long *, long long, long long))v14;
v19 = v52;
v20 = v18(a1, &v50, v52, a3);
if ( v20 <= 0 )
return 1;
a4 += v17;
v52 = (unsigned int)v20 + v19;
LABEL_13:
v23 = v50;
if ( a9 )
{
v24 = *(_DWORD *)(a1 + 12);
v25 = *a9;
v26 = 65533LL;
if ( v50 > *a9 )
goto LABEL_17;
v27 = *(_QWORD *)(a9[1] + 8 * (v50 >> 8));
if ( v27 )
{
v26 = *(unsigned int *)(v27 + 12LL * (unsigned __int8)v50 + 4LL * ((v24 & 0x8000u) == 0) + 4);
LABEL_17:
v50 = v26;
v23 = v26;
}
v28 = *(_QWORD *)v53;
v29 = 65533LL;
if ( *(_QWORD *)v53 > v25 )
{
LABEL_21:
*(_QWORD *)v53 = v29;
v28 = v29;
}
else
{
v30 = *(_QWORD *)(a9[1] + 8LL * (*(_QWORD *)v53 >> 8));
if ( v30 )
{
v29 = *(unsigned int *)(v30 + 12LL * v53[0] + 4LL * ((v24 & 0x8000u) == 0) + 4);
goto LABEL_21;
}
}
}
else
{
v28 = *(_QWORD *)v53;
}
v13 = 1;
if ( v23 != v28 )
return v13;
goto LABEL_24;
}
v21 = v52;
v22 = v14(a1, (unsigned __int8 *)&v50, v52, a3);
if ( v22 <= 0 )
return 1;
v52 = (unsigned int)v22 + v21;
if ( *(_QWORD *)v53 != a7 )
goto LABEL_13;
LABEL_24:
if ( a4 == a5 )
return v52 != a3;
}
v13 = 0;
if ( a4 == a5 )
return v13;
while ( 2 )
{
v31 = v14(a1, v53, a4, a5);
if ( v31 <= 0 )
return 1;
v32 = v31;
if ( *(_QWORD *)v53 == a8 )
{
a4 += (unsigned int)v31;
LABEL_30:
v14 = v51;
if ( a4 == a5 )
return v13;
continue;
}
break;
}
if ( *(_QWORD *)v53 == a7 )
{
v33 = v51(a1, (unsigned __int8 *)&v50, v52, a3);
if ( v33 <= 0 )
return 1;
a4 += v32;
v52 += (unsigned int)v33;
goto LABEL_30;
}
if ( v52 == a3 )
return (unsigned int)-1;
v34 = v51(a1, v53, a4, a5);
if ( v34 <= 0 )
return 1;
v35 = (unsigned int)v34 + a4;
if ( *(_QWORD *)v53 != a6 || v35 >= a5 )
{
LABEL_41:
v37 = v52;
while ( 1 )
{
if ( v37 == a3 )
return (unsigned int)-1;
v38 = v51(a1, (unsigned __int8 *)&v50, v37, a3);
if ( v38 <= 0 )
return 1;
v39 = v50;
if ( !a9 )
{
v44 = *(_QWORD *)v53;
goto LABEL_54;
}
v40 = *(_DWORD *)(a1 + 12);
v41 = *a9;
v42 = 65533LL;
if ( v50 <= *a9 )
{
v43 = *(_QWORD *)(a9[1] + 8 * (v50 >> 8));
if ( !v43 )
goto LABEL_49;
v42 = *(unsigned int *)(v43 + 12LL * (unsigned __int8)v50 + 4LL * ((v40 & 0x8000u) == 0) + 4);
}
v50 = v42;
v39 = v42;
LABEL_49:
v44 = *(_QWORD *)v53;
v45 = 65533LL;
if ( *(_QWORD *)v53 > v41 )
goto LABEL_52;
v46 = *(_QWORD *)(a9[1] + 8LL * (*(_QWORD *)v53 >> 8));
if ( v46 )
{
v45 = *(unsigned int *)(v46 + 12LL * v53[0] + 4LL * ((v40 & 0x8000u) == 0) + 4);
LABEL_52:
*(_QWORD *)v53 = v45;
v44 = v45;
}
LABEL_54:
v37 += (unsigned int)v38;
if ( v39 == v44 )
{
v52 = v37;
v13 = my_wildcmp_unicode_impl(a1, v37, a3, v35, a5, a6, a7, a8, (long long)a9, a10 + 1);
if ( (int)v13 > 0 )
goto LABEL_41;
return v13;
}
}
}
v36 = v51(a1, v53, v35, a5);
if ( v36 > 0 )
{
LODWORD(v35) = v36 + v35;
goto LABEL_41;
}
return 1;
}
|
my_wildcmp_unicode_impl:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x58
MOV dword ptr [RBP + -0x54],R9D
MOV R12,R8
MOV R13,RCX
MOV qword ptr [RBP + -0x50],RDX
MOV qword ptr [RBP + -0x38],RSI
MOV R15,RDI
MOV EAX,dword ptr [RBP + 0x28]
MOV qword ptr [RBP + -0x60],RAX
MOV RAX,qword ptr [RDI + 0xb8]
MOV RAX,qword ptr [RAX + 0x28]
MOV qword ptr [RBP + -0x40],RAX
LEA RAX,[0xd31780]
MOV RAX,qword ptr [RAX]
TEST RAX,RAX
JZ 0x001eaeb7
MOV EDI,dword ptr [RBP + 0x28]
CALL RAX
MOV EBX,0x1
TEST EAX,EAX
JNZ 0x001eb247
LAB_001eaeb7:
CMP R13,R12
JZ 0x001eb046
MOV EAX,dword ptr [RBP + 0x18]
MOV ECX,dword ptr [RBP + 0x10]
CDQE
MOV qword ptr [RBP + -0x78],RAX
MOVSXD RAX,dword ptr [RBP + -0x54]
MOV qword ptr [RBP + -0x70],RAX
MOVSXD RAX,ECX
MOV qword ptr [RBP + -0x68],RAX
LAB_001eaedb:
MOV RDI,R15
LEA RSI,[RBP + -0x30]
MOV RDX,R13
MOV RCX,R12
MOV R14,qword ptr [RBP + -0x40]
CALL R14
TEST EAX,EAX
JLE 0x001eb242
MOV RCX,qword ptr [RBP + -0x30]
CMP RCX,qword ptr [RBP + -0x78]
JZ 0x001eb058
MOV EAX,EAX
ADD R13,RAX
CMP RCX,qword ptr [RBP + -0x70]
JNZ 0x001eaf5e
CMP R13,R12
JNC 0x001eaf5e
MOV RDI,R15
LEA RSI,[RBP + -0x30]
MOV RDX,R13
MOV RCX,R12
CALL R14
TEST EAX,EAX
JLE 0x001eb242
MOV EBX,EAX
MOV RDI,R15
LEA RSI,[RBP + -0x48]
MOV RAX,R14
MOV R14,qword ptr [RBP + -0x38]
MOV RDX,R14
MOV RCX,qword ptr [RBP + -0x50]
CALL RAX
TEST EAX,EAX
JLE 0x001eb242
MOV ECX,EBX
ADD R13,RCX
MOV EAX,EAX
ADD R14,RAX
MOV qword ptr [RBP + -0x38],R14
JMP 0x001eaf92
LAB_001eaf5e:
MOV RDI,R15
LEA RSI,[RBP + -0x48]
MOV RBX,qword ptr [RBP + -0x38]
MOV RDX,RBX
MOV RCX,qword ptr [RBP + -0x50]
CALL R14
TEST EAX,EAX
JLE 0x001eb242
MOV EAX,EAX
ADD RBX,RAX
MOV qword ptr [RBP + -0x38],RBX
MOV RAX,qword ptr [RBP + -0x68]
CMP qword ptr [RBP + -0x30],RAX
JZ 0x001eb03d
LAB_001eaf92:
MOV RAX,qword ptr [RBP + -0x48]
MOV R8,qword ptr [RBP + 0x20]
TEST R8,R8
JZ 0x001eb02b
MOV ECX,dword ptr [R15 + 0xc]
MOV RDX,qword ptr [R8]
MOV ESI,0xfffd
CMP RAX,RDX
JA 0x001eafe0
MOV RSI,qword ptr [R8 + 0x8]
MOV RDI,RAX
SHR RDI,0x8
MOV RSI,qword ptr [RSI + RDI*0x8]
TEST RSI,RSI
JZ 0x001eafe7
XOR EDI,EDI
TEST CX,CX
SETNS DIL
MOVZX EAX,AL
LEA RAX,[RAX + RAX*0x2]
LEA RAX,[RSI + RAX*0x4]
MOV ESI,dword ptr [RAX + RDI*0x4 + 0x4]
LAB_001eafe0:
MOV qword ptr [RBP + -0x48],RSI
MOV RAX,RSI
LAB_001eafe7:
MOV RSI,qword ptr [RBP + -0x30]
MOV EDI,0xfffd
CMP RSI,RDX
JA 0x001eb022
MOV RDX,qword ptr [R8 + 0x8]
MOV RDI,RSI
SHR RDI,0x8
MOV RDX,qword ptr [RDX + RDI*0x8]
TEST RDX,RDX
JZ 0x001eb02f
XOR EDI,EDI
TEST CX,CX
SETNS DIL
MOVZX ECX,SIL
LEA RCX,[RCX + RCX*0x2]
LEA RCX,[RDX + RCX*0x4]
MOV EDI,dword ptr [RCX + RDI*0x4 + 0x4]
LAB_001eb022:
MOV qword ptr [RBP + -0x30],RDI
MOV RSI,RDI
JMP 0x001eb02f
LAB_001eb02b:
MOV RSI,qword ptr [RBP + -0x30]
LAB_001eb02f:
MOV EBX,0x1
CMP RAX,RSI
JNZ 0x001eb247
LAB_001eb03d:
CMP R13,R12
JNZ 0x001eaedb
LAB_001eb046:
XOR EBX,EBX
MOV RAX,qword ptr [RBP + -0x50]
CMP qword ptr [RBP + -0x38],RAX
SETNZ BL
JMP 0x001eb247
LAB_001eb058:
XOR EBX,EBX
CMP R13,R12
JZ 0x001eb247
LAB_001eb063:
MOV RDI,R15
LEA RSI,[RBP + -0x30]
MOV RDX,R13
MOV RCX,R12
CALL R14
TEST EAX,EAX
JLE 0x001eb242
MOV R14D,EAX
MOV RAX,qword ptr [RBP + -0x30]
CMP RAX,qword ptr [RBP + -0x78]
JNZ 0x001eb09c
MOV EAX,R14D
ADD R13,RAX
LAB_001eb08e:
CMP R13,R12
MOV R14,qword ptr [RBP + -0x40]
JNZ 0x001eb063
JMP 0x001eb247
LAB_001eb09c:
CMP RAX,qword ptr [RBP + -0x68]
JNZ 0x001eb0ca
MOV RDI,R15
LEA RSI,[RBP + -0x48]
MOV RDX,qword ptr [RBP + -0x38]
MOV RCX,qword ptr [RBP + -0x50]
CALL qword ptr [RBP + -0x40]
TEST EAX,EAX
JLE 0x001eb242
MOV ECX,R14D
ADD R13,RCX
MOV EAX,EAX
ADD qword ptr [RBP + -0x38],RAX
JMP 0x001eb08e
LAB_001eb0ca:
MOV R14,qword ptr [RBP + -0x50]
CMP qword ptr [RBP + -0x38],R14
JZ 0x001eb258
LEA RSI,[RBP + -0x30]
MOV RDI,R15
MOV RDX,R13
MOV RCX,R12
CALL qword ptr [RBP + -0x40]
TEST EAX,EAX
JLE 0x001eb242
MOV EAX,EAX
ADD R13,RAX
MOV RAX,qword ptr [RBP + -0x70]
CMP qword ptr [RBP + -0x30],RAX
JNZ 0x001eb121
CMP R13,R12
JNC 0x001eb121
LEA RSI,[RBP + -0x30]
MOV RDI,R15
MOV RDX,R13
MOV RCX,R12
CALL qword ptr [RBP + -0x40]
TEST EAX,EAX
JLE 0x001eb242
MOV EAX,EAX
ADD R13,RAX
LAB_001eb121:
MOV RAX,qword ptr [RBP + -0x60]
INC EAX
MOV qword ptr [RBP + -0x60],RAX
LAB_001eb12b:
MOV RBX,qword ptr [RBP + -0x38]
LAB_001eb12f:
CMP RBX,R14
JZ 0x001eb258
MOV RDI,R15
LEA RSI,[RBP + -0x48]
MOV RDX,RBX
MOV RCX,R14
CALL qword ptr [RBP + -0x40]
TEST EAX,EAX
JLE 0x001eb242
MOV RCX,qword ptr [RBP + -0x48]
MOV RSI,qword ptr [RBP + 0x20]
TEST RSI,RSI
JZ 0x001eb1f6
MOV EDX,dword ptr [R15 + 0xc]
MOV RSI,qword ptr [RSI]
MOV EDI,0xfffd
CMP RCX,RSI
JA 0x001eb1a4
MOV RDI,qword ptr [RBP + 0x20]
MOV RDI,qword ptr [RDI + 0x8]
MOV R8,RCX
SHR R8,0x8
MOV RDI,qword ptr [RDI + R8*0x8]
TEST RDI,RDI
JZ 0x001eb1ab
XOR R8D,R8D
TEST DX,DX
SETNS R8B
MOVZX ECX,CL
LEA RCX,[RCX + RCX*0x2]
LEA RCX,[RDI + RCX*0x4]
MOV EDI,dword ptr [RCX + R8*0x4 + 0x4]
LAB_001eb1a4:
MOV qword ptr [RBP + -0x48],RDI
MOV RCX,RDI
LAB_001eb1ab:
MOV RDI,qword ptr [RBP + -0x30]
MOV R8D,0xfffd
CMP RDI,RSI
JA 0x001eb1ed
MOV RSI,qword ptr [RBP + 0x20]
MOV RSI,qword ptr [RSI + 0x8]
MOV R8,RDI
SHR R8,0x8
MOV RSI,qword ptr [RSI + R8*0x8]
TEST RSI,RSI
JZ 0x001eb1fa
XOR R8D,R8D
TEST DX,DX
SETNS R8B
MOVZX EDX,DIL
LEA RDX,[RDX + RDX*0x2]
LEA RDX,[RSI + RDX*0x4]
MOV R8D,dword ptr [RDX + R8*0x4 + 0x4]
LAB_001eb1ed:
MOV qword ptr [RBP + -0x30],R8
MOV RDI,R8
JMP 0x001eb1fa
LAB_001eb1f6:
MOV RDI,qword ptr [RBP + -0x30]
LAB_001eb1fa:
MOV EAX,EAX
ADD RBX,RAX
CMP RCX,RDI
JNZ 0x001eb12f
MOV RDI,R15
MOV qword ptr [RBP + -0x38],RBX
MOV RSI,RBX
MOV RDX,R14
MOV RCX,R13
MOV R8,R12
MOV R9D,dword ptr [RBP + -0x54]
PUSH qword ptr [RBP + -0x60]
PUSH qword ptr [RBP + 0x20]
MOV EAX,dword ptr [RBP + 0x18]
PUSH RAX
MOV EAX,dword ptr [RBP + 0x10]
PUSH RAX
CALL 0x001eae5a
ADD RSP,0x20
MOV EBX,EAX
TEST EAX,EAX
JG 0x001eb12b
JMP 0x001eb247
LAB_001eb242:
MOV EBX,0x1
LAB_001eb247:
MOV EAX,EBX
ADD RSP,0x58
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_001eb258:
MOV EBX,0xffffffff
JMP 0x001eb247
|
uint my_wildcmp_unicode_impl
(long param_1,long param_2,long param_3,ulong param_4,ulong param_5,int param_6,
int param_7,int param_8,ulong *param_9,int param_10)
{
long lVar1;
code *pcVar2;
ulong uVar3;
int iVar4;
uint uVar5;
uint uVar6;
short sVar7;
long lVar8;
ulong local_50;
code *local_48;
long local_40;
ulong local_38;
local_48 = *(code **)(*(long *)(param_1 + 0xb8) + 0x28);
local_40 = param_2;
if ((my_string_stack_guard != (code *)0x0) &&
(iVar4 = (*my_string_stack_guard)(param_10), iVar4 != 0)) {
return 1;
}
if (param_4 != param_5) {
do {
pcVar2 = local_48;
uVar5 = (*local_48)(param_1,&local_38,param_4,param_5);
lVar8 = local_40;
if ((int)uVar5 < 1) {
return 1;
}
if (local_38 == (long)param_8) {
do {
if (param_4 == param_5) {
return 0;
}
uVar5 = (*pcVar2)(param_1,&local_38,param_4,param_5);
if ((int)uVar5 < 1) {
return 1;
}
if (local_38 != (long)param_8) {
if (local_38 != (long)param_7) {
if (local_40 == param_3) {
return 0xffffffff;
}
uVar5 = (*local_48)(param_1,&local_38,param_4,param_5);
if (0 < (int)uVar5) {
param_4 = param_4 + uVar5;
if ((local_38 == (long)param_6) && (param_4 < param_5)) {
uVar5 = (*local_48)(param_1,&local_38,param_4,param_5);
if ((int)uVar5 < 1) {
return 1;
}
param_4 = param_4 + uVar5;
}
lVar8 = local_40;
while( true ) {
if (lVar8 == param_3) {
return 0xffffffff;
}
uVar5 = (*local_48)(param_1,&local_50,lVar8,param_3);
if ((int)uVar5 < 1) break;
uVar3 = local_38;
if (param_9 != (ulong *)0x0) {
sVar7 = (short)*(int4 *)(param_1 + 0xc);
uVar3 = 0xfffd;
if ((local_50 <= *param_9) &&
(lVar1 = *(long *)(param_9[1] + (local_50 >> 8) * 8), uVar3 = local_50,
lVar1 != 0)) {
uVar3 = (ulong)*(uint *)(lVar1 + (local_50 & 0xff) * 0xc + 4 +
(ulong)(-1 < sVar7) * 4);
}
local_50 = uVar3;
uVar3 = 0xfffd;
if ((local_38 <= *param_9) &&
(lVar1 = *(long *)(param_9[1] + (local_38 >> 8) * 8), uVar3 = local_38,
lVar1 != 0)) {
uVar3 = (ulong)*(uint *)(lVar1 + (local_38 & 0xff) * 0xc + 4 +
(ulong)(-1 < sVar7) * 4);
}
}
local_38 = uVar3;
lVar8 = lVar8 + (ulong)uVar5;
if ((local_50 == local_38) &&
(local_40 = lVar8,
uVar5 = my_wildcmp_unicode_impl
(param_1,lVar8,param_3,param_4,param_5,param_6,param_7,
param_8,param_9,param_10 + 1), lVar8 = local_40,
(int)uVar5 < 1)) {
return uVar5;
}
}
return 1;
}
return 1;
}
uVar6 = (*local_48)(param_1,&local_50,local_40,param_3);
if ((int)uVar6 < 1) {
return 1;
}
local_40 = local_40 + (ulong)uVar6;
}
param_4 = param_4 + uVar5;
pcVar2 = local_48;
} while( true );
}
param_4 = param_4 + uVar5;
if ((local_38 == (long)param_6) && (param_4 < param_5)) {
uVar5 = (*pcVar2)(param_1,&local_38,param_4,param_5);
lVar8 = local_40;
if ((int)uVar5 < 1) {
return 1;
}
uVar6 = (*pcVar2)(param_1,&local_50,local_40,param_3);
if ((int)uVar6 < 1) {
return 1;
}
param_4 = param_4 + uVar5;
local_40 = lVar8 + (ulong)uVar6;
LAB_001eaf92:
uVar3 = local_38;
if (param_9 != (ulong *)0x0) {
sVar7 = (short)*(int4 *)(param_1 + 0xc);
uVar3 = 0xfffd;
if ((local_50 <= *param_9) &&
(lVar8 = *(long *)(param_9[1] + (local_50 >> 8) * 8), uVar3 = local_50, lVar8 != 0)) {
uVar3 = (ulong)*(uint *)(lVar8 + (local_50 & 0xff) * 0xc + 4 + (ulong)(-1 < sVar7) * 4);
}
local_50 = uVar3;
uVar3 = 0xfffd;
if ((local_38 <= *param_9) &&
(lVar8 = *(long *)(param_9[1] + (local_38 >> 8) * 8), uVar3 = local_38, lVar8 != 0)) {
uVar3 = (ulong)*(uint *)(lVar8 + (local_38 & 0xff) * 0xc + 4 + (ulong)(-1 < sVar7) * 4);
}
}
local_38 = uVar3;
if (local_50 != local_38) {
return 1;
}
}
else {
uVar5 = (*pcVar2)(param_1,&local_50,local_40,param_3);
if ((int)uVar5 < 1) {
return 1;
}
local_40 = lVar8 + (ulong)uVar5;
if (local_38 != (long)param_7) goto LAB_001eaf92;
}
} while (param_4 != param_5);
}
return (uint)(local_40 != param_3);
}
|
|
8,914 |
minja::TemplateNode::render(std::__cxx11::basic_ostringstream<char, std::char_traits<char>, std::allocator<char>>&, std::shared_ptr<minja::Context> const&) const
|
monkey531[P]llama/common/minja.hpp
|
void render(std::ostringstream & out, const std::shared_ptr<Context> & context) const {
try {
do_render(out, context);
} catch (const LoopControlException & e) {
// TODO: make stack creation lazy. Only needed if it was thrown outside of a loop.
std::ostringstream err;
err << e.what();
if (location_.source) err << error_location_suffix(*location_.source, location_.pos);
throw LoopControlException(err.str(), e.control_type);
} catch (const std::exception & e) {
std::ostringstream err;
err << e.what();
if (location_.source) err << error_location_suffix(*location_.source, location_.pos);
throw std::runtime_error(err.str());
}
}
|
O2
|
cpp
|
minja::TemplateNode::render(std::__cxx11::basic_ostringstream<char, std::char_traits<char>, std::allocator<char>>&, std::shared_ptr<minja::Context> const&) const:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x1a0, %rsp # imm = 0x1A0
movq %rdi, %r14
movq (%rdi), %rax
callq *(%rax)
addq $0x1a0, %rsp # imm = 0x1A0
popq %rbx
popq %r14
popq %rbp
retq
movq %rax, %rbx
cmpl $0x2, %edx
jne 0x72ec7
movq %rbx, %rdi
callq 0x23370
movq %rax, %rbx
leaq 0x28(%rsp), %rdi
callq 0x23ba0
movq (%rbx), %rax
movq %rbx, %rdi
callq *0x10(%rax)
leaq 0x28(%rsp), %rdi
movq %rax, %rsi
callq 0x238a0
movq 0x8(%r14), %rsi
testq %rsi, %rsi
jne 0x72f6d
pushq $0x18
popq %rdi
callq 0x23450
movq %rax, %r14
leaq 0x30(%rsp), %rsi
leaq 0x8(%rsp), %rdi
callq 0x23da0
movl 0x10(%rbx), %edx
movb $0x1, %bpl
leaq 0x8(%rsp), %rsi
movq %r14, %rdi
callq 0x7303e
xorl %ebp, %ebp
leaq 0x8814d(%rip), %rsi # 0xfb000
movq 0x890ae(%rip), %rdx # 0xfbf68
movq %r14, %rdi
callq 0x23ef0
jmp 0x72f6d
cmpl $0x1, %edx
jne 0x7302d
movq %rbx, %rdi
callq 0x23370
movq %rax, %rbx
leaq 0x28(%rsp), %rdi
callq 0x23ba0
movq (%rbx), %rax
movq %rbx, %rdi
callq *0x10(%rax)
leaq 0x28(%rsp), %rdi
movq %rax, %rsi
callq 0x238a0
movq 0x8(%r14), %rsi
testq %rsi, %rsi
je 0x72f2b
movq 0x18(%r14), %rdx
leaq 0x8(%rsp), %rdi
callq 0x5796a
leaq 0x28(%rsp), %rdi
leaq 0x8(%rsp), %rsi
callq 0x237c0
leaq 0x8(%rsp), %rdi
callq 0x241b8
pushq $0x10
popq %rdi
callq 0x23450
movq %rax, %r14
leaq 0x30(%rsp), %rsi
leaq 0x8(%rsp), %rdi
callq 0x23da0
movb $0x1, %bpl
leaq 0x8(%rsp), %rsi
movq %r14, %rdi
callq 0x23e20
xorl %ebp, %ebp
movq 0x89092(%rip), %rsi # 0xfbff0
movq 0x88ff3(%rip), %rdx # 0xfbf58
movq %r14, %rdi
callq 0x23ef0
movq 0x18(%r14), %rdx
leaq 0x8(%rsp), %rdi
callq 0x5796a
leaq 0x28(%rsp), %rdi
leaq 0x8(%rsp), %rsi
callq 0x237c0
leaq 0x8(%rsp), %rdi
callq 0x241b8
jmp 0x72e7d
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x241b8
jmp 0x73000
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x241b8
jmp 0x73019
jmp 0x72ffd
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x241b8
testb %bpl, %bpl
jne 0x72fd0
jmp 0x73000
movq %rax, %rbx
movq %r14, %rdi
callq 0x23680
jmp 0x73000
jmp 0x73016
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x241b8
testb %bpl, %bpl
jne 0x72ff3
jmp 0x73019
movq %rax, %rbx
movq %r14, %rdi
callq 0x23680
jmp 0x73019
movq %rax, %rbx
leaq 0x28(%rsp), %rdi
callq 0x231e0
jmp 0x7300f
movq %rax, %rbx
callq 0x23e40
jmp 0x7302d
movq %rax, %rbx
leaq 0x28(%rsp), %rdi
callq 0x231e0
jmp 0x73028
movq %rax, %rbx
callq 0x23e40
movq %rbx, %rdi
callq 0x23f80
movq %rax, %rdi
callq 0x276e7
nop
|
_ZNK5minja12TemplateNode6renderERNSt7__cxx1119basic_ostringstreamIcSt11char_traitsIcESaIcEEERKSt10shared_ptrINS_7ContextEE:
push rbp
push r14
push rbx
sub rsp, 1A0h
mov r14, rdi
mov rax, [rdi]
call qword ptr [rax]
add rsp, 1A0h
pop rbx
pop r14
pop rbp
retn
mov rbx, rax
cmp edx, 2
jnz loc_72EC7
mov rdi, rbx; void *
call ___cxa_begin_catch
mov rbx, rax
lea rdi, [rsp+arg_20]
call __ZNSt7__cxx1119basic_ostringstreamIcSt11char_traitsIcESaIcEEC1Ev; std::ostringstream::basic_ostringstream(void)
mov rax, [rbx]
mov rdi, rbx
call qword ptr [rax+10h]
lea rdi, [rsp+arg_20]
mov rsi, rax
call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*)
mov rsi, [r14+8]
test rsi, rsi
jnz loc_72F6D
loc_72E7D:
push 18h
pop rdi; thrown_size
call ___cxa_allocate_exception
mov r14, rax
lea rsi, [rsp+arg_28]
lea rdi, [rsp+arg_0]
call __ZNKSt7__cxx1115basic_stringbufIcSt11char_traitsIcESaIcEE3strEv; std::stringbuf::str(void)
mov edx, [rbx+10h]
mov bpl, 1
lea rsi, [rsp+arg_0]
mov rdi, r14
call _ZN5minja20LoopControlExceptionC2ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS_15LoopControlTypeE; minja::LoopControlException::LoopControlException(std::string const&,minja::LoopControlType)
xor ebp, ebp
lea rsi, _ZTIN5minja20LoopControlExceptionE; lptinfo
mov rdx, cs:_ZNSt13runtime_errorD2Ev_ptr; void (*)(void *)
mov rdi, r14; void *
call ___cxa_throw
|
long long minja::TemplateNode::render(long long ( ***a1)(_QWORD))
{
return (**a1)(a1);
}
|
render:
PUSH RBP
PUSH R14
PUSH RBX
SUB RSP,0x1a0
MOV R14,RDI
MOV RAX,qword ptr [RDI]
LAB_00172e2b:
CALL qword ptr [RAX]
LAB_00172e2d:
ADD RSP,0x1a0
POP RBX
POP R14
POP RBP
RET
|
/* minja::TemplateNode::render(std::__cxx11::ostringstream&, std::shared_ptr<minja::Context> const&)
const */
void minja::TemplateNode::render(ostringstream *param_1,shared_ptr *param_2)
{
/* try { // try from 00172e2b to 00172e2c has its CatchHandler @ 00172e39 */
(*(code *)**(int8 **)param_1)();
return;
}
|
|
8,915 |
minja::TemplateNode::render(std::__cxx11::basic_ostringstream<char, std::char_traits<char>, std::allocator<char>>&, std::shared_ptr<minja::Context> const&) const
|
monkey531[P]llama/common/minja.hpp
|
void render(std::ostringstream & out, const std::shared_ptr<Context> & context) const {
try {
do_render(out, context);
} catch (const LoopControlException & e) {
// TODO: make stack creation lazy. Only needed if it was thrown outside of a loop.
std::ostringstream err;
err << e.what();
if (location_.source) err << error_location_suffix(*location_.source, location_.pos);
throw LoopControlException(err.str(), e.control_type);
} catch (const std::exception & e) {
std::ostringstream err;
err << e.what();
if (location_.source) err << error_location_suffix(*location_.source, location_.pos);
throw std::runtime_error(err.str());
}
}
|
O3
|
cpp
|
minja::TemplateNode::render(std::__cxx11::basic_ostringstream<char, std::char_traits<char>, std::allocator<char>>&, std::shared_ptr<minja::Context> const&) const:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x1a0, %rsp # imm = 0x1A0
movq %rdi, %r14
movq (%rdi), %rax
callq *(%rax)
addq $0x1a0, %rsp # imm = 0x1A0
popq %rbx
popq %r14
popq %rbp
retq
movq %rax, %rbx
cmpl $0x2, %edx
jne 0x99d47
movq %rbx, %rdi
callq 0x1a370
movq %rax, %rbx
leaq 0x28(%rsp), %rdi
callq 0x1ab80
movq (%rbx), %rax
movq %rbx, %rdi
callq *0x10(%rax)
leaq 0x28(%rsp), %rdi
movq %rax, %rsi
callq 0x1a880
movq 0x8(%r14), %rsi
testq %rsi, %rsi
jne 0x99dcc
movl $0x18, %edi
callq 0x1a430
movq %rax, %r14
leaq 0x30(%rsp), %rsi
leaq 0x8(%rsp), %rdi
callq 0x1ad90
movl 0x10(%rbx), %ebx
movb $0x1, %bpl
leaq 0x8(%rsp), %rsi
movq %r14, %rdi
callq 0x1aac0
leaq 0x902f9(%rip), %rax # 0x12a018
addq $0x10, %rax
movq %rax, (%r14)
movl %ebx, 0x10(%r14)
xorl %ebp, %ebp
leaq 0x902cd(%rip), %rsi # 0x12a000
movq 0x91246(%rip), %rdx # 0x12af80
movq %r14, %rdi
callq 0x1aef0
jmp 0x99dcc
cmpl $0x1, %edx
jne 0x99f69
movq %rbx, %rdi
callq 0x1a370
movq %rax, %rbx
leaq 0x28(%rsp), %rdi
callq 0x1ab80
movq (%rbx), %rax
movq %rbx, %rdi
callq *0x10(%rax)
leaq 0x28(%rsp), %rdi
movq %rax, %rsi
callq 0x1a880
movq 0x8(%r14), %rsi
testq %rsi, %rsi
jne 0x99e12
movl $0x10, %edi
callq 0x1a430
movq %rax, %r14
leaq 0x30(%rsp), %rsi
leaq 0x8(%rsp), %rdi
callq 0x1ad90
movb $0x1, %bpl
leaq 0x8(%rsp), %rsi
movq %r14, %rdi
callq 0x1ae00
xorl %ebp, %ebp
movq 0x91233(%rip), %rsi # 0x12aff0
movq 0x9119c(%rip), %rdx # 0x12af60
movq %r14, %rdi
callq 0x1aef0
movq 0x18(%r14), %rdx
leaq 0x8(%rsp), %rdi
callq 0x775b8
movq 0x8(%rsp), %rsi
movq 0x10(%rsp), %rdx
leaq 0x28(%rsp), %rdi
callq 0x1a9e0
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x99ce9
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x1a8c0
jmp 0x99ce9
movq 0x18(%r14), %rdx
leaq 0x8(%rsp), %rdi
callq 0x775b8
movq 0x8(%rsp), %rsi
movq 0x10(%rsp), %rdx
leaq 0x28(%rsp), %rdi
callq 0x1a9e0
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x99d88
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x1a8c0
jmp 0x99d88
movq %rax, %rbx
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x99f14
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x1a8c0
jmp 0x99f14
jmp 0x99f11
movq %rax, %rbx
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x99f41
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x1a8c0
jmp 0x99f41
movq %rax, %rbx
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x99ec9
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x1a8c0
testb %bpl, %bpl
jne 0x99ed3
jmp 0x99f14
movq %rax, %rbx
movq %r14, %rdi
callq 0x1a660
jmp 0x99f14
jmp 0x99f3e
movq %rax, %rbx
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x99efd
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x1a8c0
testb %bpl, %bpl
jne 0x99f07
jmp 0x99f41
movq %rax, %rbx
movq %r14, %rdi
callq 0x1a660
jmp 0x99f41
movq %rax, %rbx
movq 0x9105d(%rip), %rsi # 0x12af78
leaq 0x28(%rsp), %rdi
callq 0x1a490
leaq 0x98(%rsp), %rdi
callq 0x1a2a0
jmp 0x99f37
movq %rax, %rbx
callq 0x1ae30
jmp 0x99f69
movq %rax, %rbx
movq 0x91030(%rip), %rsi # 0x12af78
leaq 0x28(%rsp), %rdi
callq 0x1a490
leaq 0x98(%rsp), %rdi
callq 0x1a2a0
jmp 0x99f64
movq %rax, %rbx
callq 0x1ae30
movq %rbx, %rdi
callq 0x1af80
movq %rax, %rdi
callq 0x21927
nop
|
_ZNK5minja12TemplateNode6renderERNSt7__cxx1119basic_ostringstreamIcSt11char_traitsIcESaIcEEERKSt10shared_ptrINS_7ContextEE:
push rbp
push r14
push rbx
sub rsp, 1A0h
mov r14, rdi
mov rax, [rdi]
call qword ptr [rax]
add rsp, 1A0h
pop rbx
pop r14
pop rbp
retn
mov rbx, rax
cmp edx, 2
jnz loc_99D47
mov rdi, rbx; void *
call ___cxa_begin_catch
mov rbx, rax
lea rdi, [rsp+arg_20]
call __ZNSt7__cxx1119basic_ostringstreamIcSt11char_traitsIcESaIcEEC1Ev; std::ostringstream::basic_ostringstream(void)
mov rax, [rbx]
mov rdi, rbx
call qword ptr [rax+10h]
lea rdi, [rsp+arg_20]
mov rsi, rax
call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*)
mov rsi, [r14+8]; int
test rsi, rsi
jnz loc_99DCC
loc_99CE9:
mov edi, 18h; thrown_size
call ___cxa_allocate_exception
mov r14, rax
lea rsi, [rsp+arg_28]
lea rdi, [rsp+arg_0]
call __ZNKSt7__cxx1115basic_stringbufIcSt11char_traitsIcESaIcEE3strEv; std::stringbuf::str(void)
mov ebx, [rbx+10h]
mov bpl, 1
lea rsi, [rsp+arg_0]
mov rdi, r14
call __ZNSt13runtime_errorC2ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; std::runtime_error::runtime_error(std::string const&)
lea rax, _ZTVN5minja20LoopControlExceptionE; `vtable for'minja::LoopControlException
add rax, 10h
mov [r14], rax
mov [r14+10h], ebx
xor ebp, ebp
lea rsi, _ZTIN5minja20LoopControlExceptionE; lptinfo
mov rdx, cs:_ZNSt13runtime_errorD2Ev_ptr; void (*)(void *)
mov rdi, r14; void *
call ___cxa_throw
|
long long minja::TemplateNode::render(long long ( ***a1)(_QWORD))
{
return (**a1)(a1);
}
|
render:
PUSH RBP
PUSH R14
PUSH RBX
SUB RSP,0x1a0
MOV R14,RDI
MOV RAX,qword ptr [RDI]
LAB_00199c97:
CALL qword ptr [RAX]
LAB_00199c99:
ADD RSP,0x1a0
POP RBX
POP R14
POP RBP
RET
|
/* minja::TemplateNode::render(std::__cxx11::ostringstream&, std::shared_ptr<minja::Context> const&)
const */
void minja::TemplateNode::render(ostringstream *param_1,shared_ptr *param_2)
{
/* try { // try from 00199c97 to 00199c98 has its CatchHandler @ 00199ca5 */
(*(code *)**(int8 **)param_1)();
return;
}
|
|
8,916 |
translog_write_variable_record_1group
|
eloqsql/storage/maria/ma_loghandler.c
|
static my_bool
translog_write_variable_record_1group(LSN *lsn,
enum translog_record_type type,
MARIA_HA *tbl_info,
SHORT_TRANSACTION_ID short_trid,
struct st_translog_parts *parts,
struct st_translog_buffer
*buffer_to_flush, uint16 header_length,
TRN *trn, void *hook_arg)
{
TRANSLOG_ADDRESS horizon;
struct st_buffer_cursor cursor;
int rc= 0;
uint i;
translog_size_t record_rest, full_pages, first_page;
uint additional_chunk3_page= 0;
uchar chunk0_header[1 + 2 + 5 + 2];
DBUG_ENTER("translog_write_variable_record_1group");
translog_lock_assert_owner();
if (buffer_to_flush)
translog_buffer_lock_assert_owner(buffer_to_flush);
set_lsn(lsn, horizon= log_descriptor.horizon);
if (translog_set_lsn_for_files(LSN_FILE_NO(*lsn), LSN_FILE_NO(*lsn),
*lsn, TRUE) ||
(log_record_type_descriptor[type].inwrite_hook &&
(*log_record_type_descriptor[type].inwrite_hook)(type, trn, tbl_info,
lsn, hook_arg)))
{
translog_unlock();
if (buffer_to_flush != NULL)
{
translog_buffer_flush(buffer_to_flush);
translog_buffer_unlock(buffer_to_flush);
}
DBUG_RETURN(1);
}
cursor= log_descriptor.bc;
cursor.chaser= 1;
/* Advance pointer to be able unlock the loghandler */
first_page= translog_get_current_page_rest();
record_rest= parts->record_length - (first_page - header_length);
full_pages= record_rest / log_descriptor.page_capacity_chunk_2;
record_rest= (record_rest % log_descriptor.page_capacity_chunk_2);
if (record_rest + 1 == log_descriptor.page_capacity_chunk_2)
{
DBUG_PRINT("info", ("2 chunks type 3 is needed"));
/* We will write 2 chunks type 3 at the end of this group */
additional_chunk3_page= 1;
record_rest= 1;
}
DBUG_PRINT("info", ("first_page: %u (%u) full_pages: %u (%lu) "
"additional: %u (%u) rest %u = %u",
first_page, first_page - header_length,
full_pages,
(ulong) full_pages *
log_descriptor.page_capacity_chunk_2,
additional_chunk3_page,
additional_chunk3_page *
(log_descriptor.page_capacity_chunk_2 - 1),
record_rest, parts->record_length));
/* record_rest + 3 is chunk type 3 overhead + record_rest */
rc= translog_advance_pointer((int)(full_pages + additional_chunk3_page),
(record_rest ? record_rest + 3 : 0),
&cursor.buffs);
log_descriptor.bc.buffer->last_lsn= *lsn;
DBUG_PRINT("info", ("last_lsn set to " LSN_FMT " buffer: %p",
LSN_IN_PARTS(log_descriptor.bc.buffer->last_lsn),
log_descriptor.bc.buffer));
translog_unlock();
/*
Check if we switched buffer and need process it (current buffer is
unlocked already => we will not delay other threads
*/
if (buffer_to_flush != NULL)
{
if (!rc)
rc= translog_buffer_flush(buffer_to_flush);
translog_buffer_unlock(buffer_to_flush);
}
if (rc)
{
//translog_advance_pointer decreased writers so it is OK
DBUG_ASSERT(cursor.buffs.unlck_ptr == cursor.buffs.wrt_ptr);
DBUG_RETURN(1);
}
translog_write_variable_record_1group_header(parts, type, short_trid,
header_length, chunk0_header);
/* fill the pages */
translog_write_parts_on_page(&horizon, &cursor, first_page, parts);
DBUG_PRINT("info", ("absolute horizon: " LSN_FMT " local: " LSN_FMT,
LSN_IN_PARTS(log_descriptor.horizon),
LSN_IN_PARTS(horizon)));
for (i= 0; i < full_pages; i++)
{
if (translog_write_variable_record_chunk2_page(parts, &horizon, &cursor))
goto error;
DBUG_PRINT("info", ("absolute horizon: " LSN_FMT " local: " LSN_FMT,
LSN_IN_PARTS(log_descriptor.horizon),
LSN_IN_PARTS(horizon)));
}
if (additional_chunk3_page)
{
if (translog_write_variable_record_chunk3_page(parts,
log_descriptor.
page_capacity_chunk_2 - 2,
&horizon, &cursor))
goto error;
DBUG_PRINT("info", ("absolute horizon: " LSN_FMT " local: " LSN_FMT,
LSN_IN_PARTS(log_descriptor.horizon),
LSN_IN_PARTS(horizon)));
DBUG_ASSERT(cursor.current_page_fill == TRANSLOG_PAGE_SIZE);
}
if (translog_write_variable_record_chunk3_page(parts,
record_rest,
&horizon, &cursor))
goto error;
DBUG_PRINT("info", ("absolute horizon: " LSN_FMT " local: " LSN_FMT,
(uint) LSN_FILE_NO(log_descriptor.horizon),
(uint) LSN_OFFSET(log_descriptor.horizon),
(uint) LSN_FILE_NO(horizon),
(uint) LSN_OFFSET(horizon)));
translog_buffer_lock(cursor.buffer);
translog_buffer_decrease_writers(cursor.buffer);
used_buffs_register_unlock(&cursor.buffs, cursor.buffer);
translog_buffer_unlock(cursor.buffer);
DBUG_ASSERT(cursor.buffs.unlck_ptr == cursor.buffs.wrt_ptr);
DBUG_RETURN(0);
error:
used_buffs_urgent_unlock(&cursor.buffs);
DBUG_RETURN(1);
}
|
O0
|
c
|
translog_write_variable_record_1group:
pushq %rbp
movq %rsp, %rbp
subq $0xc0, %rsp
movw %cx, %ax
movq 0x20(%rbp), %rcx
movq 0x18(%rbp), %rcx
movw 0x10(%rbp), %cx
movq %fs:0x28, %rcx
movq %rcx, -0x8(%rbp)
movq %rdi, -0x20(%rbp)
movl %esi, -0x24(%rbp)
movq %rdx, -0x30(%rbp)
movw %ax, -0x32(%rbp)
movq %r8, -0x40(%rbp)
movq %r9, -0x48(%rbp)
movl $0x0, -0x94(%rbp)
movl $0x0, -0xa8(%rbp)
cmpq $0x0, -0x48(%rbp)
je 0x5a07b
jmp 0x5a07b
movq -0x20(%rbp), %rdi
movq 0xc1ff82(%rip), %rsi # 0xc7a008
movq %rsi, -0x50(%rbp)
callq 0x5b3f0
movq -0x20(%rbp), %rax
movq (%rax), %rax
sarq $0x20, %rax
movl %eax, %edi
movq -0x20(%rbp), %rax
movq (%rax), %rax
sarq $0x20, %rax
movl %eax, %esi
movq -0x20(%rbp), %rax
movq (%rax), %rdx
movl $0x1, %ecx
callq 0x5b420
movsbl %al, %eax
cmpl $0x0, %eax
jne 0x5a110
movl -0x24(%rbp), %eax
movl %eax, %ecx
leaq 0x41e0f2(%rip), %rax # 0x4781c0
imulq $0x48, %rcx, %rcx
addq %rcx, %rax
cmpq $0x0, 0x10(%rax)
je 0x5a139
movl -0x24(%rbp), %eax
movl %eax, %ecx
leaq 0x41e0d8(%rip), %rax # 0x4781c0
imulq $0x48, %rcx, %rcx
addq %rcx, %rax
movq 0x10(%rax), %rax
movl -0x24(%rbp), %edi
movq 0x18(%rbp), %rsi
movq -0x30(%rbp), %rdx
movq -0x20(%rbp), %rcx
movq 0x20(%rbp), %r8
callq *%rax
movsbl %al, %eax
cmpl $0x0, %eax
je 0x5a139
callq 0x501e0
cmpq $0x0, -0x48(%rbp)
je 0x5a12e
movq -0x48(%rbp), %rdi
callq 0x563a0
movq -0x48(%rbp), %rdi
callq 0x501b0
jmp 0x5a130
movb $0x1, -0x13(%rbp)
jmp 0x5a3c4
leaq -0x90(%rbp), %rdi
leaq 0x41f279(%rip), %rsi # 0x4793c0
addq $0x800c50, %rsi # imm = 0x800C50
movl $0x40, %edx
callq 0x2a090
movb $0x1, -0x59(%rbp)
callq 0x5be80
movl %eax, -0xa4(%rbp)
movq -0x40(%rbp), %rax
movl (%rax), %eax
movl -0xa4(%rbp), %ecx
movzwl 0x10(%rbp), %edx
subl %edx, %ecx
subl %ecx, %eax
movl %eax, -0x9c(%rbp)
movl -0x9c(%rbp), %eax
movzwl 0x41f258(%rip), %ecx # 0x4793e6
xorl %edx, %edx
divl %ecx
movl %eax, -0xa0(%rbp)
movl -0x9c(%rbp), %eax
movzwl 0x41f241(%rip), %ecx # 0x4793e6
xorl %edx, %edx
divl %ecx
movl %edx, -0x9c(%rbp)
movl -0x9c(%rbp), %eax
addl $0x1, %eax
movzwl 0x41f227(%rip), %ecx # 0x4793e6
cmpl %ecx, %eax
jne 0x5a1db
jmp 0x5a1c5
jmp 0x5a1c7
movl $0x1, -0xa8(%rbp)
movl $0x1, -0x9c(%rbp)
jmp 0x5a1dd
jmp 0x5a1df
movl -0xa0(%rbp), %eax
addl -0xa8(%rbp), %eax
movl %eax, -0xac(%rbp)
cmpl $0x0, -0x9c(%rbp)
je 0x5a20b
movl -0x9c(%rbp), %eax
addl $0x3, %eax
movl %eax, -0xb0(%rbp)
jmp 0x5a215
xorl %eax, %eax
movl %eax, -0xb0(%rbp)
jmp 0x5a215
movl -0xac(%rbp), %edi
movl -0xb0(%rbp), %eax
leaq -0x90(%rbp), %rdx
movzwl %ax, %esi
callq 0x5b8a0
movsbl %al, %eax
movl %eax, -0x94(%rbp)
movq -0x20(%rbp), %rax
movq (%rax), %rcx
movq 0xc1fdf1(%rip), %rax # 0xc7a038
movq %rcx, 0x100000(%rax)
jmp 0x5a250
callq 0x501e0
cmpq $0x0, -0x48(%rbp)
je 0x5a280
cmpl $0x0, -0x94(%rbp)
jne 0x5a277
movq -0x48(%rbp), %rdi
callq 0x563a0
movsbl %al, %eax
movl %eax, -0x94(%rbp)
movq -0x48(%rbp), %rdi
callq 0x501b0
cmpl $0x0, -0x94(%rbp)
je 0x5a298
jmp 0x5a28b
jmp 0x5a28d
jmp 0x5a28f
movb $0x1, -0x13(%rbp)
jmp 0x5a3c4
movq -0x40(%rbp), %rdi
movl -0x24(%rbp), %esi
movw -0x32(%rbp), %cx
movw 0x10(%rbp), %ax
leaq -0x12(%rbp), %r8
movzwl %cx, %edx
movzwl %ax, %ecx
callq 0x5b320
movl -0xa4(%rbp), %edx
movq -0x40(%rbp), %rcx
leaq -0x50(%rbp), %rdi
leaq -0x90(%rbp), %rsi
callq 0x5b5c0
jmp 0x5a2d2
movl $0x0, -0x98(%rbp)
movl -0x98(%rbp), %eax
cmpl -0xa0(%rbp), %eax
jae 0x5a31e
movq -0x40(%rbp), %rdi
leaq -0x50(%rbp), %rsi
leaq -0x90(%rbp), %rdx
callq 0x5bc20
cmpb $0x0, %al
je 0x5a307
jmp 0x5a3b4
jmp 0x5a309
jmp 0x5a30b
jmp 0x5a30d
movl -0x98(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x98(%rbp)
jmp 0x5a2dc
cmpl $0x0, -0xa8(%rbp)
je 0x5a358
movq -0x40(%rbp), %rdi
movzwl 0x41f0b4(%rip), %eax # 0x4793e6
subl $0x2, %eax
leaq -0x50(%rbp), %rdx
leaq -0x90(%rbp), %rcx
movzwl %ax, %esi
callq 0x5bc90
cmpb $0x0, %al
je 0x5a34e
jmp 0x5a3b4
jmp 0x5a350
jmp 0x5a352
jmp 0x5a354
jmp 0x5a356
jmp 0x5a358
movq -0x40(%rbp), %rdi
movl -0x9c(%rbp), %eax
leaq -0x50(%rbp), %rdx
leaq -0x90(%rbp), %rcx
movzwl %ax, %esi
callq 0x5bc90
cmpb $0x0, %al
je 0x5a37b
jmp 0x5a3b4
jmp 0x5a37d
jmp 0x5a37f
movq -0x68(%rbp), %rdi
callq 0x50170
movq -0x68(%rbp), %rdi
callq 0x5bd70
leaq -0x90(%rbp), %rdi
movq -0x68(%rbp), %rsi
callq 0x5bdc0
movq -0x68(%rbp), %rdi
callq 0x501b0
jmp 0x5a3ac
jmp 0x5a3ae
movb $0x0, -0x13(%rbp)
jmp 0x5a3c4
leaq -0x90(%rbp), %rdi
callq 0x5bdf0
movb $0x1, -0x13(%rbp)
movb -0x13(%rbp), %al
movb %al, -0xb1(%rbp)
movq %fs:0x28, %rax
movq -0x8(%rbp), %rcx
cmpq %rcx, %rax
jne 0x5a3ee
movb -0xb1(%rbp), %al
addq $0xc0, %rsp
popq %rbp
retq
callq 0x2a270
nopw %cs:(%rax,%rax)
|
translog_write_variable_record_1group:
push rbp
mov rbp, rsp
sub rsp, 0C0h
mov ax, cx
mov rcx, [rbp+arg_10]
mov rcx, [rbp+arg_8]
mov cx, [rbp+arg_0]
mov rcx, fs:28h
mov [rbp+var_8], rcx
mov [rbp+var_20], rdi
mov [rbp+var_24], esi
mov [rbp+var_30], rdx
mov [rbp+var_32], ax
mov [rbp+var_40], r8
mov [rbp+var_48], r9
mov [rbp+var_94], 0
mov [rbp+var_A8], 0
cmp [rbp+var_48], 0
jz short loc_5A07B
jmp short $+2
loc_5A07B:
mov rdi, [rbp+var_20]
mov rsi, cs:qword_C7A008
mov [rbp+var_50], rsi
call set_lsn
mov rax, [rbp+var_20]
mov rax, [rax]
sar rax, 20h
mov edi, eax
mov rax, [rbp+var_20]
mov rax, [rax]
sar rax, 20h
mov esi, eax
mov rax, [rbp+var_20]
mov rdx, [rax]
mov ecx, 1
call translog_set_lsn_for_files
movsx eax, al
cmp eax, 0
jnz short loc_5A110
mov eax, [rbp+var_24]
mov ecx, eax
lea rax, log_record_type_descriptor
imul rcx, 48h ; 'H'
add rax, rcx
cmp qword ptr [rax+10h], 0
jz short loc_5A139
mov eax, [rbp+var_24]
mov ecx, eax
lea rax, log_record_type_descriptor
imul rcx, 48h ; 'H'
add rax, rcx
mov rax, [rax+10h]
mov edi, [rbp+var_24]
mov rsi, [rbp+arg_8]
mov rdx, [rbp+var_30]
mov rcx, [rbp+var_20]
mov r8, [rbp+arg_10]
call rax
movsx eax, al
cmp eax, 0
jz short loc_5A139
loc_5A110:
call translog_unlock
cmp [rbp+var_48], 0
jz short loc_5A12E
mov rdi, [rbp+var_48]
call translog_buffer_flush
mov rdi, [rbp+var_48]
call translog_buffer_unlock
loc_5A12E:
jmp short $+2
loc_5A130:
mov [rbp+var_13], 1
jmp loc_5A3C4
loc_5A139:
lea rdi, [rbp+var_90]
lea rsi, log_descriptor
add rsi, 800C50h
mov edx, 40h ; '@'
call _memcpy
mov [rbp+var_59], 1
call translog_get_current_page_rest
mov [rbp+var_A4], eax
mov rax, [rbp+var_40]
mov eax, [rax]
mov ecx, [rbp+var_A4]
movzx edx, [rbp+arg_0]
sub ecx, edx
sub eax, ecx
mov [rbp+var_9C], eax
mov eax, [rbp+var_9C]
movzx ecx, cs:word_4793E6
xor edx, edx
div ecx
mov [rbp+var_A0], eax
mov eax, [rbp+var_9C]
movzx ecx, cs:word_4793E6
xor edx, edx
div ecx
mov [rbp+var_9C], edx
mov eax, [rbp+var_9C]
add eax, 1
movzx ecx, cs:word_4793E6
cmp eax, ecx
jnz short loc_5A1DB
jmp short $+2
loc_5A1C5:
jmp short $+2
loc_5A1C7:
mov [rbp+var_A8], 1
mov [rbp+var_9C], 1
loc_5A1DB:
jmp short $+2
loc_5A1DD:
jmp short $+2
loc_5A1DF:
mov eax, [rbp+var_A0]
add eax, [rbp+var_A8]
mov [rbp+var_AC], eax
cmp [rbp+var_9C], 0
jz short loc_5A20B
mov eax, [rbp+var_9C]
add eax, 3
mov [rbp+var_B0], eax
jmp short loc_5A215
loc_5A20B:
xor eax, eax
mov [rbp+var_B0], eax
jmp short $+2
loc_5A215:
mov edi, [rbp+var_AC]
mov eax, [rbp+var_B0]
lea rdx, [rbp+var_90]
movzx esi, ax
call translog_advance_pointer
movsx eax, al
mov [rbp+var_94], eax
mov rax, [rbp+var_20]
mov rcx, [rax]
mov rax, cs:qword_C7A038
mov [rax+100000h], rcx
jmp short $+2
loc_5A250:
call translog_unlock
cmp [rbp+var_48], 0
jz short loc_5A280
cmp [rbp+var_94], 0
jnz short loc_5A277
mov rdi, [rbp+var_48]
call translog_buffer_flush
movsx eax, al
mov [rbp+var_94], eax
loc_5A277:
mov rdi, [rbp+var_48]
call translog_buffer_unlock
loc_5A280:
cmp [rbp+var_94], 0
jz short loc_5A298
jmp short $+2
loc_5A28B:
jmp short $+2
loc_5A28D:
jmp short $+2
loc_5A28F:
mov [rbp+var_13], 1
jmp loc_5A3C4
loc_5A298:
mov rdi, [rbp+var_40]
mov esi, [rbp+var_24]
mov cx, [rbp+var_32]
mov ax, [rbp+arg_0]
lea r8, [rbp+var_12]
movzx edx, cx
movzx ecx, ax
call translog_write_variable_record_1group_header
mov edx, [rbp+var_A4]
mov rcx, [rbp+var_40]
lea rdi, [rbp+var_50]
lea rsi, [rbp+var_90]
call translog_write_parts_on_page
jmp short $+2
loc_5A2D2:
mov [rbp+var_98], 0
loc_5A2DC:
mov eax, [rbp+var_98]
cmp eax, [rbp+var_A0]
jnb short loc_5A31E
mov rdi, [rbp+var_40]
lea rsi, [rbp+var_50]
lea rdx, [rbp+var_90]
call translog_write_variable_record_chunk2_page
cmp al, 0
jz short loc_5A307
jmp loc_5A3B4
loc_5A307:
jmp short $+2
loc_5A309:
jmp short $+2
loc_5A30B:
jmp short $+2
loc_5A30D:
mov eax, [rbp+var_98]
add eax, 1
mov [rbp+var_98], eax
jmp short loc_5A2DC
loc_5A31E:
cmp [rbp+var_A8], 0
jz short loc_5A358
mov rdi, [rbp+var_40]
movzx eax, cs:word_4793E6
sub eax, 2
lea rdx, [rbp+var_50]
lea rcx, [rbp+var_90]
movzx esi, ax
call translog_write_variable_record_chunk3_page
cmp al, 0
jz short loc_5A34E
jmp short loc_5A3B4
loc_5A34E:
jmp short $+2
loc_5A350:
jmp short $+2
loc_5A352:
jmp short $+2
loc_5A354:
jmp short $+2
loc_5A356:
jmp short $+2
loc_5A358:
mov rdi, [rbp+var_40]
mov eax, [rbp+var_9C]
lea rdx, [rbp+var_50]
lea rcx, [rbp+var_90]
movzx esi, ax
call translog_write_variable_record_chunk3_page
cmp al, 0
jz short loc_5A37B
jmp short loc_5A3B4
loc_5A37B:
jmp short $+2
loc_5A37D:
jmp short $+2
loc_5A37F:
mov rdi, [rbp+var_68]
call translog_buffer_lock
mov rdi, [rbp+var_68]
call translog_buffer_decrease_writers
lea rdi, [rbp+var_90]
mov rsi, [rbp+var_68]
call used_buffs_register_unlock
mov rdi, [rbp+var_68]
call translog_buffer_unlock
jmp short $+2
loc_5A3AC:
jmp short $+2
loc_5A3AE:
mov [rbp+var_13], 0
jmp short loc_5A3C4
loc_5A3B4:
lea rdi, [rbp+var_90]
call used_buffs_urgent_unlock
mov [rbp+var_13], 1
loc_5A3C4:
mov al, [rbp+var_13]
mov [rbp+var_B1], al
mov rax, fs:28h
mov rcx, [rbp+var_8]
cmp rax, rcx
jnz short loc_5A3EE
mov al, [rbp+var_B1]
add rsp, 0C0h
pop rbp
retn
loc_5A3EE:
call ___stack_chk_fail
|
char translog_write_variable_record_1group(
_QWORD *a1,
unsigned int a2,
long long a3,
unsigned __int16 a4,
_DWORD *a5,
long long a6,
unsigned __int16 a7,
long long a8,
long long a9)
{
unsigned __int16 v10; // [rsp+10h] [rbp-B0h]
int v11; // [rsp+18h] [rbp-A8h]
unsigned int current_page_rest; // [rsp+1Ch] [rbp-A4h]
unsigned int v13; // [rsp+20h] [rbp-A0h]
unsigned int v14; // [rsp+24h] [rbp-9Ch]
unsigned int v15; // [rsp+24h] [rbp-9Ch]
unsigned int i; // [rsp+28h] [rbp-98h]
int v17; // [rsp+2Ch] [rbp-94h]
_BYTE v18[40]; // [rsp+30h] [rbp-90h] BYREF
long long v19; // [rsp+58h] [rbp-68h]
char v20; // [rsp+67h] [rbp-59h]
long long v21; // [rsp+70h] [rbp-50h] BYREF
long long v22; // [rsp+78h] [rbp-48h]
_DWORD *v23; // [rsp+80h] [rbp-40h]
unsigned __int16 v24; // [rsp+8Eh] [rbp-32h]
long long v25; // [rsp+90h] [rbp-30h]
unsigned int v26; // [rsp+9Ch] [rbp-24h]
_QWORD *v27; // [rsp+A0h] [rbp-20h]
_BYTE v29[10]; // [rsp+AEh] [rbp-12h] BYREF
unsigned long long v30; // [rsp+B8h] [rbp-8h]
v30 = __readfsqword(0x28u);
v27 = a1;
v26 = a2;
v25 = a3;
v24 = a4;
v23 = a5;
v22 = a6;
v11 = 0;
v21 = qword_C7A008;
set_lsn(a1, qword_C7A008);
if ( (unsigned __int8)translog_set_lsn_for_files((unsigned int)HIDWORD(*v27), (unsigned int)HIDWORD(*v27), *v27, 1LL)
|| *(_QWORD *)&log_record_type_descriptor[18 * v26 + 4]
&& (*(unsigned __int8 ( **)(_QWORD, long long, long long, _QWORD *, long long))&log_record_type_descriptor[18 * v26 + 4])(
v26,
a8,
v25,
v27,
a9) )
{
translog_unlock();
if ( v22 )
{
translog_buffer_flush(v22);
translog_buffer_unlock(v22);
}
return 1;
}
else
{
memcpy(v18, &log_descriptor[1048970], 64LL);
v20 = 1;
current_page_rest = translog_get_current_page_rest();
v14 = *v23 - (current_page_rest - a7);
v13 = v14 / (unsigned __int16)word_4793E6;
v15 = v14 % (unsigned __int16)word_4793E6;
if ( v15 + 1 == (unsigned __int16)word_4793E6 )
{
v11 = 1;
v15 = 1;
}
if ( v15 )
v10 = v15 + 3;
else
v10 = 0;
v17 = (char)translog_advance_pointer(v11 + v13, v10, v18);
*(_QWORD *)(qword_C7A038 + 0x100000) = *v27;
translog_unlock();
if ( v22 )
{
if ( !v17 )
v17 = translog_buffer_flush(v22);
translog_buffer_unlock(v22);
}
if ( v17 )
{
return 1;
}
else
{
translog_write_variable_record_1group_header(v23, v26, v24, a7, v29);
translog_write_parts_on_page(&v21, v18, current_page_rest, v23);
for ( i = 0; i < v13; ++i )
{
if ( (unsigned __int8)translog_write_variable_record_chunk2_page(v23, &v21, v18) )
goto LABEL_26;
}
if ( (!v11
|| !(unsigned __int8)translog_write_variable_record_chunk3_page(
v23,
(unsigned __int16)(word_4793E6 - 2),
&v21,
v18))
&& !(unsigned __int8)translog_write_variable_record_chunk3_page(v23, (unsigned __int16)v15, &v21, v18) )
{
translog_buffer_lock(v19);
translog_buffer_decrease_writers(v19);
used_buffs_register_unlock(v18, v19);
translog_buffer_unlock(v19);
return 0;
}
LABEL_26:
used_buffs_urgent_unlock(v18);
return 1;
}
}
}
|
translog_write_variable_record_1group:
PUSH RBP
MOV RBP,RSP
SUB RSP,0xc0
MOV AX,CX
MOV RCX,qword ptr [RBP + 0x20]
MOV RCX,qword ptr [RBP + 0x18]
MOV CX,word ptr [RBP + 0x10]
MOV RCX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x8],RCX
MOV qword ptr [RBP + -0x20],RDI
MOV dword ptr [RBP + -0x24],ESI
MOV qword ptr [RBP + -0x30],RDX
MOV word ptr [RBP + -0x32],AX
MOV qword ptr [RBP + -0x40],R8
MOV qword ptr [RBP + -0x48],R9
MOV dword ptr [RBP + -0x94],0x0
MOV dword ptr [RBP + -0xa8],0x0
CMP qword ptr [RBP + -0x48],0x0
JZ 0x0015a07b
JMP 0x0015a07b
LAB_0015a07b:
MOV RDI,qword ptr [RBP + -0x20]
MOV RSI,qword ptr [0x00d7a008]
MOV qword ptr [RBP + -0x50],RSI
CALL 0x0015b3f0
MOV RAX,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RAX]
SAR RAX,0x20
MOV EDI,EAX
MOV RAX,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RAX]
SAR RAX,0x20
MOV ESI,EAX
MOV RAX,qword ptr [RBP + -0x20]
MOV RDX,qword ptr [RAX]
MOV ECX,0x1
CALL 0x0015b420
MOVSX EAX,AL
CMP EAX,0x0
JNZ 0x0015a110
MOV EAX,dword ptr [RBP + -0x24]
MOV ECX,EAX
LEA RAX,[0x5781c0]
IMUL RCX,RCX,0x48
ADD RAX,RCX
CMP qword ptr [RAX + 0x10],0x0
JZ 0x0015a139
MOV EAX,dword ptr [RBP + -0x24]
MOV ECX,EAX
LEA RAX,[0x5781c0]
IMUL RCX,RCX,0x48
ADD RAX,RCX
MOV RAX,qword ptr [RAX + 0x10]
MOV EDI,dword ptr [RBP + -0x24]
MOV RSI,qword ptr [RBP + 0x18]
MOV RDX,qword ptr [RBP + -0x30]
MOV RCX,qword ptr [RBP + -0x20]
MOV R8,qword ptr [RBP + 0x20]
CALL RAX
MOVSX EAX,AL
CMP EAX,0x0
JZ 0x0015a139
LAB_0015a110:
CALL 0x001501e0
CMP qword ptr [RBP + -0x48],0x0
JZ 0x0015a12e
MOV RDI,qword ptr [RBP + -0x48]
CALL 0x001563a0
MOV RDI,qword ptr [RBP + -0x48]
CALL 0x001501b0
LAB_0015a12e:
JMP 0x0015a130
LAB_0015a130:
MOV byte ptr [RBP + -0x13],0x1
JMP 0x0015a3c4
LAB_0015a139:
LEA RDI,[RBP + -0x90]
LEA RSI,[0x5793c0]
ADD RSI,0x800c50
MOV EDX,0x40
CALL 0x0012a090
MOV byte ptr [RBP + -0x59],0x1
CALL 0x0015be80
MOV dword ptr [RBP + -0xa4],EAX
MOV RAX,qword ptr [RBP + -0x40]
MOV EAX,dword ptr [RAX]
MOV ECX,dword ptr [RBP + -0xa4]
MOVZX EDX,word ptr [RBP + 0x10]
SUB ECX,EDX
SUB EAX,ECX
MOV dword ptr [RBP + -0x9c],EAX
MOV EAX,dword ptr [RBP + -0x9c]
MOVZX ECX,word ptr [0x005793e6]
XOR EDX,EDX
DIV ECX
MOV dword ptr [RBP + -0xa0],EAX
MOV EAX,dword ptr [RBP + -0x9c]
MOVZX ECX,word ptr [0x005793e6]
XOR EDX,EDX
DIV ECX
MOV dword ptr [RBP + -0x9c],EDX
MOV EAX,dword ptr [RBP + -0x9c]
ADD EAX,0x1
MOVZX ECX,word ptr [0x005793e6]
CMP EAX,ECX
JNZ 0x0015a1db
JMP 0x0015a1c5
LAB_0015a1c5:
JMP 0x0015a1c7
LAB_0015a1c7:
MOV dword ptr [RBP + -0xa8],0x1
MOV dword ptr [RBP + -0x9c],0x1
LAB_0015a1db:
JMP 0x0015a1dd
LAB_0015a1dd:
JMP 0x0015a1df
LAB_0015a1df:
MOV EAX,dword ptr [RBP + -0xa0]
ADD EAX,dword ptr [RBP + -0xa8]
MOV dword ptr [RBP + -0xac],EAX
CMP dword ptr [RBP + -0x9c],0x0
JZ 0x0015a20b
MOV EAX,dword ptr [RBP + -0x9c]
ADD EAX,0x3
MOV dword ptr [RBP + -0xb0],EAX
JMP 0x0015a215
LAB_0015a20b:
XOR EAX,EAX
MOV dword ptr [RBP + -0xb0],EAX
JMP 0x0015a215
LAB_0015a215:
MOV EDI,dword ptr [RBP + -0xac]
MOV EAX,dword ptr [RBP + -0xb0]
LEA RDX,[RBP + -0x90]
MOVZX ESI,AX
CALL 0x0015b8a0
MOVSX EAX,AL
MOV dword ptr [RBP + -0x94],EAX
MOV RAX,qword ptr [RBP + -0x20]
MOV RCX,qword ptr [RAX]
MOV RAX,qword ptr [0x00d7a038]
MOV qword ptr [RAX + 0x100000],RCX
JMP 0x0015a250
LAB_0015a250:
CALL 0x001501e0
CMP qword ptr [RBP + -0x48],0x0
JZ 0x0015a280
CMP dword ptr [RBP + -0x94],0x0
JNZ 0x0015a277
MOV RDI,qword ptr [RBP + -0x48]
CALL 0x001563a0
MOVSX EAX,AL
MOV dword ptr [RBP + -0x94],EAX
LAB_0015a277:
MOV RDI,qword ptr [RBP + -0x48]
CALL 0x001501b0
LAB_0015a280:
CMP dword ptr [RBP + -0x94],0x0
JZ 0x0015a298
JMP 0x0015a28b
LAB_0015a28b:
JMP 0x0015a28d
LAB_0015a28d:
JMP 0x0015a28f
LAB_0015a28f:
MOV byte ptr [RBP + -0x13],0x1
JMP 0x0015a3c4
LAB_0015a298:
MOV RDI,qword ptr [RBP + -0x40]
MOV ESI,dword ptr [RBP + -0x24]
MOV CX,word ptr [RBP + -0x32]
MOV AX,word ptr [RBP + 0x10]
LEA R8,[RBP + -0x12]
MOVZX EDX,CX
MOVZX ECX,AX
CALL 0x0015b320
MOV EDX,dword ptr [RBP + -0xa4]
MOV RCX,qword ptr [RBP + -0x40]
LEA RDI,[RBP + -0x50]
LEA RSI,[RBP + -0x90]
CALL 0x0015b5c0
JMP 0x0015a2d2
LAB_0015a2d2:
MOV dword ptr [RBP + -0x98],0x0
LAB_0015a2dc:
MOV EAX,dword ptr [RBP + -0x98]
CMP EAX,dword ptr [RBP + -0xa0]
JNC 0x0015a31e
MOV RDI,qword ptr [RBP + -0x40]
LEA RSI,[RBP + -0x50]
LEA RDX,[RBP + -0x90]
CALL 0x0015bc20
CMP AL,0x0
JZ 0x0015a307
JMP 0x0015a3b4
LAB_0015a307:
JMP 0x0015a309
LAB_0015a309:
JMP 0x0015a30b
LAB_0015a30b:
JMP 0x0015a30d
LAB_0015a30d:
MOV EAX,dword ptr [RBP + -0x98]
ADD EAX,0x1
MOV dword ptr [RBP + -0x98],EAX
JMP 0x0015a2dc
LAB_0015a31e:
CMP dword ptr [RBP + -0xa8],0x0
JZ 0x0015a358
MOV RDI,qword ptr [RBP + -0x40]
MOVZX EAX,word ptr [0x005793e6]
SUB EAX,0x2
LEA RDX,[RBP + -0x50]
LEA RCX,[RBP + -0x90]
MOVZX ESI,AX
CALL 0x0015bc90
CMP AL,0x0
JZ 0x0015a34e
JMP 0x0015a3b4
LAB_0015a34e:
JMP 0x0015a350
LAB_0015a350:
JMP 0x0015a352
LAB_0015a352:
JMP 0x0015a354
LAB_0015a354:
JMP 0x0015a356
LAB_0015a356:
JMP 0x0015a358
LAB_0015a358:
MOV RDI,qword ptr [RBP + -0x40]
MOV EAX,dword ptr [RBP + -0x9c]
LEA RDX,[RBP + -0x50]
LEA RCX,[RBP + -0x90]
MOVZX ESI,AX
CALL 0x0015bc90
CMP AL,0x0
JZ 0x0015a37b
JMP 0x0015a3b4
LAB_0015a37b:
JMP 0x0015a37d
LAB_0015a37d:
JMP 0x0015a37f
LAB_0015a37f:
MOV RDI,qword ptr [RBP + -0x68]
CALL 0x00150170
MOV RDI,qword ptr [RBP + -0x68]
CALL 0x0015bd70
LEA RDI,[RBP + -0x90]
MOV RSI,qword ptr [RBP + -0x68]
CALL 0x0015bdc0
MOV RDI,qword ptr [RBP + -0x68]
CALL 0x001501b0
JMP 0x0015a3ac
LAB_0015a3ac:
JMP 0x0015a3ae
LAB_0015a3ae:
MOV byte ptr [RBP + -0x13],0x0
JMP 0x0015a3c4
LAB_0015a3b4:
LEA RDI,[RBP + -0x90]
CALL 0x0015bdf0
MOV byte ptr [RBP + -0x13],0x1
LAB_0015a3c4:
MOV AL,byte ptr [RBP + -0x13]
MOV byte ptr [RBP + -0xb1],AL
MOV RAX,qword ptr FS:[0x28]
MOV RCX,qword ptr [RBP + -0x8]
CMP RAX,RCX
JNZ 0x0015a3ee
MOV AL,byte ptr [RBP + -0xb1]
ADD RSP,0xc0
POP RBP
RET
LAB_0015a3ee:
CALL 0x0012a270
|
int8
translog_write_variable_record_1group
(long *param_1,uint param_2,int8 param_3,int2 param_4,int *param_5,
long param_6,ushort param_7,int8 param_8,int8 param_9)
{
char cVar1;
int iVar2;
uint uVar3;
long in_FS_OFFSET;
bool bVar4;
uint local_b8;
uint local_b0;
uint local_a4;
uint local_a0;
int1 local_98 [40];
int8 local_70;
int1 local_61;
int8 local_58;
long local_50;
int *local_48;
int2 local_3a;
int8 local_38;
uint local_2c;
long *local_28;
int1 local_1b;
int1 local_1a [10];
long local_10;
local_10 = *(long *)(in_FS_OFFSET + 0x28);
local_58 = DAT_00d7a008;
local_50 = param_6;
local_48 = param_5;
local_3a = param_4;
local_38 = param_3;
local_2c = param_2;
local_28 = param_1;
set_lsn(param_1);
cVar1 = translog_set_lsn_for_files
(*local_28 >> 0x20 & 0xffffffff,*local_28 >> 0x20 & 0xffffffff,*local_28,1);
if ((cVar1 == '\0') &&
((*(long *)(log_record_type_descriptor + (ulong)local_2c * 0x48 + 0x10) == 0 ||
(cVar1 = (**(code **)(log_record_type_descriptor + (ulong)local_2c * 0x48 + 0x10))
(local_2c,param_8,local_38,local_28,param_9), cVar1 == '\0')))) {
memcpy(local_98,&DAT_00d7a010,0x40);
local_61 = 1;
iVar2 = translog_get_current_page_rest();
local_a4 = *local_48 - (iVar2 - (uint)param_7);
uVar3 = local_a4 / DAT_005793e6;
local_a4 = local_a4 % (uint)DAT_005793e6;
bVar4 = local_a4 + 1 == (uint)DAT_005793e6;
if (bVar4) {
local_a4 = 1;
}
local_b0 = (uint)bVar4;
if (local_a4 == 0) {
local_b8 = 0;
}
else {
local_b8 = local_a4 + 3;
}
cVar1 = translog_advance_pointer(uVar3 + local_b0,local_b8 & 0xffff,local_98);
*(long *)(DAT_00d7a038 + 0x100000) = *local_28;
translog_unlock();
if (local_50 != 0) {
if (cVar1 == '\0') {
cVar1 = translog_buffer_flush(local_50);
}
translog_buffer_unlock(local_50);
}
if (cVar1 == '\0') {
translog_write_variable_record_1group_header(local_48,local_2c,local_3a,param_7,local_1a);
translog_write_parts_on_page(&local_58,local_98,iVar2,local_48);
for (local_a0 = 0; local_a0 < uVar3; local_a0 = local_a0 + 1) {
cVar1 = translog_write_variable_record_chunk2_page(local_48,&local_58,local_98);
if (cVar1 != '\0') goto LAB_0015a3b4;
}
if (((local_b0 == 0) ||
(cVar1 = translog_write_variable_record_chunk3_page
(local_48,DAT_005793e6 - 2,&local_58,local_98), cVar1 == '\0')) &&
(cVar1 = translog_write_variable_record_chunk3_page(local_48,local_a4,&local_58,local_98),
cVar1 == '\0')) {
translog_buffer_lock(local_70);
translog_buffer_decrease_writers(local_70);
used_buffs_register_unlock(local_98,local_70);
translog_buffer_unlock(local_70);
local_1b = 0;
}
else {
LAB_0015a3b4:
used_buffs_urgent_unlock(local_98);
local_1b = 1;
}
}
else {
local_1b = 1;
}
}
else {
translog_unlock();
if (local_50 != 0) {
translog_buffer_flush(local_50);
translog_buffer_unlock(local_50);
}
local_1b = 1;
}
if (*(long *)(in_FS_OFFSET + 0x28) == local_10) {
return CONCAT71((int7)((ulong)*(long *)(in_FS_OFFSET + 0x28) >> 8),local_1b);
}
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
|
|
8,917 |
allocate_blobs
|
eloqsql/storage/maria/ma_bitmap.c
|
static my_bool allocate_blobs(MARIA_HA *info, MARIA_ROW *row)
{
ulong *length, *end;
uint elements;
/*
Reserve size for:
head block
one extent
tail block
*/
elements= info->bitmap_blocks.elements;
for (length= row->blob_lengths, end= length + info->s->base.blobs;
length < end; length++)
{
if (*length && find_blob(info, *length))
return 1;
}
row->extents_count= (info->bitmap_blocks.elements - elements);
return 0;
}
|
O3
|
c
|
allocate_blobs:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movl 0x2c8(%rdi), %edx
movq (%rdi), %rax
movl 0x3f0(%rax), %ecx
movl %edx, %eax
testq %rcx, %rcx
je 0x40bdc
movq %rdi, %r14
movl %edx, -0x2c(%rbp)
movq %rsi, -0x40(%rbp)
movq 0x60(%rsi), %r15
leaq (%r15,%rcx,8), %rax
movq %rax, -0x60(%rbp)
leaq 0x2c0(%rdi), %rax
movq %rax, -0x38(%rbp)
movl $0x3fff, %r13d # imm = 0x3FFF
movq (%r15), %rax
testq %rax, %rax
je 0x40bc0
movq (%r14), %r12
movl 0x7bc(%r12), %ecx
movl 0xc18(%r12), %edx
negl %edx
leal (%rcx,%rdx), %esi
addl $-0xc, %esi
xorl %edx, %edx
divq %rsi
movq %rdx, %rsi
leal (%rcx,%rcx,2), %ecx
shrl $0x2, %ecx
xorl %ebx, %ebx
cmpl %esi, %ecx
setbe %bl
movl $0x0, %ecx
cmovbel %ecx, %esi
movl 0x2c8(%r14), %ecx
movl %ecx, %edx
addq %rax, %rbx
je 0x40b88
movq %rsi, -0x50(%rbp)
movq %rbx, %rax
shrq $0x7, %rax
movq %rcx, -0x58(%rbp)
leal (%rcx,%rax), %esi
addl $0x2, %esi
movq -0x38(%rbp), %rdi
callq 0x91d55
testb %al, %al
jne 0x40be8
movq %r15, -0x48(%rbp)
addq $0xa10, %r12 # imm = 0xA10
movl 0x2c8(%r14), %eax
leaq (%rax,%rax,2), %r15
shlq $0x3, %r15
addq 0x2c0(%r14), %r15
movl %ebx, %esi
cmpq %r13, %rbx
cmovaeq %r13, %rsi
movq %r12, %rdi
movq %r15, %rdx
xorl %ecx, %ecx
callq 0x4212f
movl $0xffffffff, %ecx # imm = 0xFFFFFFFF
andq %rcx, %rax
je 0x40b61
subq %rax, %rbx
incl 0x2c8(%r14)
addq $0x18, %r15
jmp 0x40b70
movq %r14, %rdi
movq %r12, %rsi
callq 0x420ec
testb %al, %al
jne 0x40be8
testq %rbx, %rbx
jne 0x40b31
movl 0x2c8(%r14), %edx
movq -0x48(%rbp), %r15
movq -0x58(%rbp), %rcx
movq -0x50(%rbp), %rsi
testl %esi, %esi
je 0x40baf
movq %rcx, %rbx
leal 0x1(%rdx), %eax
movl %eax, 0x2c8(%r14)
movq %r14, %rdi
callq 0x423fc
testb %al, %al
jne 0x40be8
movl 0x2c8(%r14), %edx
movq %rbx, %rcx
movq -0x38(%rbp), %rax
movq (%rax), %rax
subl %ecx, %edx
leaq (%rcx,%rcx,2), %rcx
movl %edx, 0x10(%rax,%rcx,8)
addq $0x8, %r15
cmpq -0x60(%rbp), %r15
jb 0x40a94
movl 0x2c8(%r14), %eax
movq -0x40(%rbp), %rsi
movl -0x2c(%rbp), %edx
subl %edx, %eax
movl %eax, 0xac(%rsi)
xorl %eax, %eax
jmp 0x40bea
movb $0x1, %al
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
|
allocate_blobs:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 38h
mov edx, [rdi+2C8h]
mov rax, [rdi]
mov ecx, [rax+3F0h]
mov eax, edx
test rcx, rcx
jz loc_40BDC
mov r14, rdi
mov [rbp+var_2C], edx
mov [rbp+var_40], rsi
mov r15, [rsi+60h]
lea rax, [r15+rcx*8]
mov [rbp+var_60], rax
lea rax, [rdi+2C0h]
mov [rbp+var_38], rax
mov r13d, 3FFFh
loc_40A94:
mov rax, [r15]
test rax, rax
jz loc_40BC0
mov r12, [r14]
mov ecx, [r12+7BCh]
mov edx, [r12+0C18h]
neg edx
lea esi, [rcx+rdx]
add esi, 0FFFFFFF4h
xor edx, edx
div rsi
mov rsi, rdx
lea ecx, [rcx+rcx*2]
shr ecx, 2
xor ebx, ebx
cmp ecx, esi
setbe bl
mov ecx, 0
cmovbe esi, ecx
mov ecx, [r14+2C8h]
mov edx, ecx
add rbx, rax
jz loc_40B88
mov [rbp+var_50], rsi
mov rax, rbx
shr rax, 7
mov [rbp+var_58], rcx
lea esi, [rcx+rax]
add esi, 2
mov rdi, [rbp+var_38]
call allocate_dynamic
test al, al
jnz loc_40BE8
mov [rbp+var_48], r15
add r12, 0A10h
mov eax, [r14+2C8h]
lea r15, [rax+rax*2]
shl r15, 3
add r15, [r14+2C0h]
loc_40B31:
mov esi, ebx
cmp rbx, r13
cmovnb rsi, r13
mov rdi, r12
mov rdx, r15
xor ecx, ecx
call allocate_full_pages
mov ecx, 0FFFFFFFFh
and rax, rcx
jz short loc_40B61
sub rbx, rax
inc dword ptr [r14+2C8h]
add r15, 18h
jmp short loc_40B70
loc_40B61:
mov rdi, r14
mov rsi, r12
call move_to_next_bitmap
test al, al
jnz short loc_40BE8
loc_40B70:
test rbx, rbx
jnz short loc_40B31
mov edx, [r14+2C8h]
mov r15, [rbp+var_48]
mov rcx, [rbp+var_58]
mov rsi, [rbp+var_50]
loc_40B88:
test esi, esi
jz short loc_40BAF
mov rbx, rcx
lea eax, [rdx+1]
mov [r14+2C8h], eax
mov rdi, r14
call find_tail
test al, al
jnz short loc_40BE8
mov edx, [r14+2C8h]
mov rcx, rbx
loc_40BAF:
mov rax, [rbp+var_38]
mov rax, [rax]
sub edx, ecx
lea rcx, [rcx+rcx*2]
mov [rax+rcx*8+10h], edx
loc_40BC0:
add r15, 8
cmp r15, [rbp+var_60]
jb loc_40A94
mov eax, [r14+2C8h]
mov rsi, [rbp+var_40]
mov edx, [rbp+var_2C]
loc_40BDC:
sub eax, edx
mov [rsi+0ACh], eax
xor eax, eax
jmp short loc_40BEA
loc_40BE8:
mov al, 1
loc_40BEA:
add rsp, 38h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
|
char allocate_blobs(long long *a1, long long a2)
{
int v2; // edx
int v3; // eax
_QWORD *v4; // r15
long long v5; // r12
int v6; // ecx
unsigned long long v7; // rax
unsigned long long v8; // rsi
_BOOL8 v9; // rbx
long long v10; // rcx
int v11; // edx
unsigned long long v12; // rbx
long long v13; // r12
long long v14; // r15
long long v15; // rsi
long long full_pages; // rax
long long v17; // rdx
long long v18; // r8
long long v19; // r9
long long v20; // rbx
_QWORD *v22; // [rsp+0h] [rbp-60h]
long long v23; // [rsp+8h] [rbp-58h]
int v24; // [rsp+10h] [rbp-50h]
_QWORD *v25; // [rsp+18h] [rbp-48h]
long long v26; // [rsp+20h] [rbp-40h]
_QWORD *v27; // [rsp+28h] [rbp-38h]
int v28; // [rsp+34h] [rbp-2Ch]
v2 = *((_DWORD *)a1 + 178);
v3 = v2;
if ( !*(_DWORD *)(*a1 + 1008) )
{
LABEL_22:
*(_DWORD *)(a2 + 172) = v3 - v2;
return 0;
}
v28 = *((_DWORD *)a1 + 178);
v26 = a2;
v4 = *(_QWORD **)(a2 + 96);
v22 = &v4[*(unsigned int *)(*a1 + 1008)];
v27 = a1 + 88;
while ( !*v4 )
{
LABEL_20:
if ( ++v4 >= v22 )
{
v3 = *((_DWORD *)a1 + 178);
a2 = v26;
v2 = v28;
goto LABEL_22;
}
}
v5 = *a1;
v6 = *(_DWORD *)(*a1 + 1980);
v7 = *v4 / (unsigned long long)(unsigned int)(v6 - *(_DWORD *)(*a1 + 3096) - 12);
v8 = *v4 % (unsigned long long)(unsigned int)(v6 - *(_DWORD *)(*a1 + 3096) - 12);
v9 = (unsigned int)(3 * v6) >> 2 <= (unsigned int)v8;
if ( (unsigned int)(3 * v6) >> 2 <= (unsigned int)v8 )
LODWORD(v8) = 0;
v10 = *((unsigned int *)a1 + 178);
v11 = v10;
v12 = v7 + v9;
if ( v12 )
{
v24 = v8;
v23 = *((unsigned int *)a1 + 178);
if ( (unsigned __int8)allocate_dynamic(v27, (unsigned int)v10 + (unsigned int)(v12 >> 7) + 2, v10) )
return 1;
v25 = v4;
v13 = v5 + 2576;
v14 = a1[88] + 24LL * *((unsigned int *)a1 + 178);
do
{
v15 = (unsigned int)v12;
if ( v12 >= 0x3FFF )
v15 = 0x3FFFLL;
full_pages = (unsigned int)allocate_full_pages(v13, v15, v14, 0LL);
if ( full_pages )
{
v12 -= full_pages;
++*((_DWORD *)a1 + 178);
v14 += 24LL;
}
else if ( (unsigned __int8)move_to_next_bitmap(a1, v13, v17, 0xFFFFFFFFLL, v18, v19) )
{
return 1;
}
}
while ( v12 );
v11 = *((_DWORD *)a1 + 178);
v4 = v25;
v10 = v23;
LODWORD(v8) = v24;
}
if ( !(_DWORD)v8 )
{
LABEL_19:
*(_DWORD *)(*v27 + 24 * v10 + 16) = v11 - v10;
goto LABEL_20;
}
v20 = v10;
*((_DWORD *)a1 + 178) = v11 + 1;
if ( !(unsigned __int8)find_tail(a1) )
{
v11 = *((_DWORD *)a1 + 178);
v10 = v20;
goto LABEL_19;
}
return 1;
}
|
allocate_blobs:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x38
MOV EDX,dword ptr [RDI + 0x2c8]
MOV RAX,qword ptr [RDI]
MOV ECX,dword ptr [RAX + 0x3f0]
MOV EAX,EDX
TEST RCX,RCX
JZ 0x00140bdc
MOV R14,RDI
MOV dword ptr [RBP + -0x2c],EDX
MOV qword ptr [RBP + -0x40],RSI
MOV R15,qword ptr [RSI + 0x60]
LEA RAX,[R15 + RCX*0x8]
MOV qword ptr [RBP + -0x60],RAX
LEA RAX,[RDI + 0x2c0]
MOV qword ptr [RBP + -0x38],RAX
MOV R13D,0x3fff
LAB_00140a94:
MOV RAX,qword ptr [R15]
TEST RAX,RAX
JZ 0x00140bc0
MOV R12,qword ptr [R14]
MOV ECX,dword ptr [R12 + 0x7bc]
MOV EDX,dword ptr [R12 + 0xc18]
NEG EDX
LEA ESI,[RCX + RDX*0x1]
ADD ESI,-0xc
XOR EDX,EDX
DIV RSI
MOV RSI,RDX
LEA ECX,[RCX + RCX*0x2]
SHR ECX,0x2
XOR EBX,EBX
CMP ECX,ESI
SETBE BL
MOV ECX,0x0
CMOVBE ESI,ECX
MOV ECX,dword ptr [R14 + 0x2c8]
MOV EDX,ECX
ADD RBX,RAX
JZ 0x00140b88
MOV qword ptr [RBP + -0x50],RSI
MOV RAX,RBX
SHR RAX,0x7
MOV qword ptr [RBP + -0x58],RCX
LEA ESI,[RCX + RAX*0x1]
ADD ESI,0x2
MOV RDI,qword ptr [RBP + -0x38]
CALL 0x00191d55
TEST AL,AL
JNZ 0x00140be8
MOV qword ptr [RBP + -0x48],R15
ADD R12,0xa10
MOV EAX,dword ptr [R14 + 0x2c8]
LEA R15,[RAX + RAX*0x2]
SHL R15,0x3
ADD R15,qword ptr [R14 + 0x2c0]
LAB_00140b31:
MOV ESI,EBX
CMP RBX,R13
CMOVNC RSI,R13
MOV RDI,R12
MOV RDX,R15
XOR ECX,ECX
CALL 0x0014212f
MOV ECX,0xffffffff
AND RAX,RCX
JZ 0x00140b61
SUB RBX,RAX
INC dword ptr [R14 + 0x2c8]
ADD R15,0x18
JMP 0x00140b70
LAB_00140b61:
MOV RDI,R14
MOV RSI,R12
CALL 0x001420ec
TEST AL,AL
JNZ 0x00140be8
LAB_00140b70:
TEST RBX,RBX
JNZ 0x00140b31
MOV EDX,dword ptr [R14 + 0x2c8]
MOV R15,qword ptr [RBP + -0x48]
MOV RCX,qword ptr [RBP + -0x58]
MOV RSI,qword ptr [RBP + -0x50]
LAB_00140b88:
TEST ESI,ESI
JZ 0x00140baf
MOV RBX,RCX
LEA EAX,[RDX + 0x1]
MOV dword ptr [R14 + 0x2c8],EAX
MOV RDI,R14
CALL 0x001423fc
TEST AL,AL
JNZ 0x00140be8
MOV EDX,dword ptr [R14 + 0x2c8]
MOV RCX,RBX
LAB_00140baf:
MOV RAX,qword ptr [RBP + -0x38]
MOV RAX,qword ptr [RAX]
SUB EDX,ECX
LEA RCX,[RCX + RCX*0x2]
MOV dword ptr [RAX + RCX*0x8 + 0x10],EDX
LAB_00140bc0:
ADD R15,0x8
CMP R15,qword ptr [RBP + -0x60]
JC 0x00140a94
MOV EAX,dword ptr [R14 + 0x2c8]
MOV RSI,qword ptr [RBP + -0x40]
MOV EDX,dword ptr [RBP + -0x2c]
LAB_00140bdc:
SUB EAX,EDX
MOV dword ptr [RSI + 0xac],EAX
XOR EAX,EAX
JMP 0x00140bea
LAB_00140be8:
MOV AL,0x1
LAB_00140bea:
ADD RSP,0x38
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
int8 allocate_blobs(long *param_1,long param_2)
{
ulong *puVar1;
long lVar2;
bool bVar3;
long lVar4;
char cVar5;
int iVar6;
uint uVar7;
uint uVar8;
ulong uVar9;
uint uVar10;
ulong uVar11;
ulong *puVar12;
long lVar13;
lVar4 = param_1[0x59];
iVar6 = (int)lVar4;
if ((ulong)*(uint *)(*param_1 + 0x3f0) != 0) {
puVar12 = *(ulong **)(param_2 + 0x60);
puVar1 = puVar12 + *(uint *)(*param_1 + 0x3f0);
do {
uVar9 = *puVar12;
if (uVar9 != 0) {
lVar2 = *param_1;
uVar10 = (*(int *)(lVar2 + 0x7bc) - *(int *)(lVar2 + 0xc18)) - 0xc;
uVar8 = (uint)(uVar9 % (ulong)uVar10);
uVar7 = (uint)(*(int *)(lVar2 + 0x7bc) * 3) >> 2;
bVar3 = uVar7 <= uVar8;
if (uVar7 <= uVar8) {
uVar8 = 0;
}
uVar7 = *(uint *)(param_1 + 0x59);
uVar9 = (ulong)bVar3 + uVar9 / uVar10;
uVar10 = uVar7;
if (uVar9 != 0) {
cVar5 = allocate_dynamic(param_1 + 0x58,uVar7 + (int)(uVar9 >> 7) + 2);
if (cVar5 != '\0') {
return 1;
}
lVar13 = (ulong)*(uint *)(param_1 + 0x59) * 0x18 + param_1[0x58];
do {
uVar11 = uVar9 & 0xffffffff;
if (0x3ffe < uVar9) {
uVar11 = 0x3fff;
}
uVar11 = allocate_full_pages(lVar2 + 0xa10,uVar11,lVar13,0);
if ((uVar11 & 0xffffffff) == 0) {
cVar5 = move_to_next_bitmap(param_1,lVar2 + 0xa10);
if (cVar5 != '\0') {
return 1;
}
}
else {
uVar9 = uVar9 - (uVar11 & 0xffffffff);
*(int *)(param_1 + 0x59) = (int)param_1[0x59] + 1;
lVar13 = lVar13 + 0x18;
}
} while (uVar9 != 0);
uVar10 = *(uint *)(param_1 + 0x59);
}
if (uVar8 != 0) {
*(uint *)(param_1 + 0x59) = uVar10 + 1;
cVar5 = find_tail(param_1);
if (cVar5 != '\0') {
return 1;
}
uVar10 = *(uint *)(param_1 + 0x59);
}
*(uint *)(param_1[0x58] + 0x10 + (ulong)uVar7 * 0x18) = uVar10 - uVar7;
}
puVar12 = puVar12 + 1;
} while (puVar12 < puVar1);
iVar6 = (int)param_1[0x59];
}
*(int *)(param_2 + 0xac) = iVar6 - (int)lVar4;
return 0;
}
|
|
8,918 |
stbi__psd_info(stbi__context*, int*, int*, int*)
|
llama.cpp/examples/llava/../../common/stb_image.h
|
static int stbi__psd_info(stbi__context *s, int *x, int *y, int *comp)
{
int channelCount, dummy, depth;
if (!x) x = &dummy;
if (!y) y = &dummy;
if (!comp) comp = &dummy;
if (stbi__get32be(s) != 0x38425053) {
stbi__rewind( s );
return 0;
}
if (stbi__get16be(s) != 1) {
stbi__rewind( s );
return 0;
}
stbi__skip(s, 6);
channelCount = stbi__get16be(s);
if (channelCount < 0 || channelCount > 16) {
stbi__rewind( s );
return 0;
}
*y = stbi__get32be(s);
*x = stbi__get32be(s);
depth = stbi__get16be(s);
if (depth != 8 && depth != 16) {
stbi__rewind( s );
return 0;
}
if (stbi__get16be(s) != 3) {
stbi__rewind( s );
return 0;
}
*comp = 4;
return 1;
}
|
O3
|
c
|
stbi__psd_info(stbi__context*, int*, int*, int*):
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rcx, %r14
movq %rdx, %r12
movq %rsi, %r15
movq %rdi, %rbx
callq 0x308af
movl %eax, %ebp
shll $0x10, %ebp
movq %rbx, %rdi
callq 0x308af
orl %ebp, %eax
cmpl $0x38425053, %eax # imm = 0x38425053
jne 0x36326
movq %rbx, %rdi
callq 0x308af
cmpl $0x1, %eax
jne 0x36326
cmpq $0x0, 0x10(%rbx)
je 0x36296
movq 0xc0(%rbx), %rax
movq 0xc8(%rbx), %rdx
movl %edx, %ecx
subl %eax, %ecx
cmpl $0x5, %ecx
jg 0x3629d
movq %rdx, 0xc0(%rbx)
movq 0x28(%rbx), %rdi
movl $0x6, %esi
subl %ecx, %esi
callq *0x18(%rbx)
jmp 0x362a8
movq 0xc0(%rbx), %rax
addq $0x6, %rax
movq %rax, 0xc0(%rbx)
movq %rbx, %rdi
callq 0x308af
cmpl $0x11, %eax
jae 0x36326
movq %rbx, %rdi
callq 0x308af
movl %eax, %ebp
movq %rbx, %rdi
callq 0x308af
testq %r12, %r12
je 0x362d5
shll $0x10, %ebp
orl %eax, %ebp
movl %ebp, (%r12)
movq %rbx, %rdi
callq 0x308af
movl %eax, %ebp
movq %rbx, %rdi
callq 0x308af
testq %r15, %r15
je 0x362f4
shll $0x10, %ebp
orl %eax, %ebp
movl %ebp, (%r15)
movq %rbx, %rdi
callq 0x308af
cmpl $0x8, %eax
je 0x36306
cmpl $0x10, %eax
jne 0x36326
movq %rbx, %rdi
callq 0x308af
cmpl $0x3, %eax
jne 0x36326
movl $0x1, %eax
testq %r14, %r14
je 0x36336
movl $0x4, (%r14)
jmp 0x36336
movups 0xd0(%rbx), %xmm0
movups %xmm0, 0xc0(%rbx)
xorl %eax, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
|
_ZL14stbi__psd_infoP13stbi__contextPiS1_S1_:
push rbp
push r15
push r14
push r12
push rbx
mov r14, rcx
mov r12, rdx
mov r15, rsi
mov rbx, rdi
call _ZL13stbi__get16beP13stbi__context; stbi__get16be(stbi__context *)
mov ebp, eax
shl ebp, 10h
mov rdi, rbx
call _ZL13stbi__get16beP13stbi__context; stbi__get16be(stbi__context *)
or eax, ebp
cmp eax, 38425053h
jnz loc_36326
mov rdi, rbx
call _ZL13stbi__get16beP13stbi__context; stbi__get16be(stbi__context *)
cmp eax, 1
jnz loc_36326
cmp qword ptr [rbx+10h], 0
jz short loc_36296
mov rax, [rbx+0C0h]
mov rdx, [rbx+0C8h]
mov ecx, edx
sub ecx, eax
cmp ecx, 5
jg short loc_3629D
mov [rbx+0C0h], rdx
mov rdi, [rbx+28h]
mov esi, 6
sub esi, ecx
call qword ptr [rbx+18h]
jmp short loc_362A8
loc_36296:
mov rax, [rbx+0C0h]
loc_3629D:
add rax, 6
mov [rbx+0C0h], rax
loc_362A8:
mov rdi, rbx
call _ZL13stbi__get16beP13stbi__context; stbi__get16be(stbi__context *)
cmp eax, 11h
jnb short loc_36326
mov rdi, rbx
call _ZL13stbi__get16beP13stbi__context; stbi__get16be(stbi__context *)
mov ebp, eax
mov rdi, rbx
call _ZL13stbi__get16beP13stbi__context; stbi__get16be(stbi__context *)
test r12, r12
jz short loc_362D5
shl ebp, 10h
or ebp, eax
mov [r12], ebp
loc_362D5:
mov rdi, rbx
call _ZL13stbi__get16beP13stbi__context; stbi__get16be(stbi__context *)
mov ebp, eax
mov rdi, rbx
call _ZL13stbi__get16beP13stbi__context; stbi__get16be(stbi__context *)
test r15, r15
jz short loc_362F4
shl ebp, 10h
or ebp, eax
mov [r15], ebp
loc_362F4:
mov rdi, rbx
call _ZL13stbi__get16beP13stbi__context; stbi__get16be(stbi__context *)
cmp eax, 8
jz short loc_36306
cmp eax, 10h
jnz short loc_36326
loc_36306:
mov rdi, rbx
call _ZL13stbi__get16beP13stbi__context; stbi__get16be(stbi__context *)
cmp eax, 3
jnz short loc_36326
mov eax, 1
test r14, r14
jz short loc_36336
mov dword ptr [r14], 4
jmp short loc_36336
loc_36326:
movups xmm0, xmmword ptr [rbx+0D0h]
movups xmmword ptr [rbx+0C0h], xmm0
xor eax, eax
loc_36336:
pop rbx
pop r12
pop r14
pop r15
pop rbp
retn
|
long long stbi__psd_info(long long a1, int *a2, int *a3, _DWORD *a4)
{
unsigned int v6; // ebp
long long v7; // rax
int v8; // ecx
int v9; // ebp
int v10; // eax
int v11; // ebp
int v12; // eax
int v13; // eax
long long result; // rax
v6 = (unsigned int)stbi__get16be(a1) << 16;
if ( (v6 | (unsigned int)stbi__get16be(a1)) != 0x38425053 || (unsigned int)stbi__get16be(a1) != 1 )
{
LABEL_18:
*(_OWORD *)(a1 + 192) = *(_OWORD *)(a1 + 208);
return 0LL;
}
if ( !*(_QWORD *)(a1 + 16) )
{
v7 = *(_QWORD *)(a1 + 192);
goto LABEL_7;
}
v7 = *(_QWORD *)(a1 + 192);
v8 = *(_QWORD *)(a1 + 200) - v7;
if ( v8 > 5 )
{
LABEL_7:
*(_QWORD *)(a1 + 192) = v7 + 6;
goto LABEL_8;
}
*(_QWORD *)(a1 + 192) = *(_QWORD *)(a1 + 200);
(*(void ( **)(_QWORD, _QWORD))(a1 + 24))(*(_QWORD *)(a1 + 40), (unsigned int)(6 - v8));
LABEL_8:
if ( (unsigned int)stbi__get16be(a1) >= 0x11 )
goto LABEL_18;
v9 = stbi__get16be(a1);
v10 = stbi__get16be(a1);
if ( a3 )
*a3 = v10 | (v9 << 16);
v11 = stbi__get16be(a1);
v12 = stbi__get16be(a1);
if ( a2 )
*a2 = v12 | (v11 << 16);
v13 = stbi__get16be(a1);
if ( v13 != 8 && v13 != 16 )
goto LABEL_18;
if ( (unsigned int)stbi__get16be(a1) != 3 )
goto LABEL_18;
result = 1LL;
if ( a4 )
*a4 = 4;
return result;
}
|
stbi__psd_info:
PUSH RBP
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
MOV R14,RCX
MOV R12,RDX
MOV R15,RSI
MOV RBX,RDI
CALL 0x001308af
MOV EBP,EAX
SHL EBP,0x10
MOV RDI,RBX
CALL 0x001308af
OR EAX,EBP
CMP EAX,0x38425053
JNZ 0x00136326
MOV RDI,RBX
CALL 0x001308af
CMP EAX,0x1
JNZ 0x00136326
CMP qword ptr [RBX + 0x10],0x0
JZ 0x00136296
MOV RAX,qword ptr [RBX + 0xc0]
MOV RDX,qword ptr [RBX + 0xc8]
MOV ECX,EDX
SUB ECX,EAX
CMP ECX,0x5
JG 0x0013629d
MOV qword ptr [RBX + 0xc0],RDX
MOV RDI,qword ptr [RBX + 0x28]
MOV ESI,0x6
SUB ESI,ECX
CALL qword ptr [RBX + 0x18]
JMP 0x001362a8
LAB_00136296:
MOV RAX,qword ptr [RBX + 0xc0]
LAB_0013629d:
ADD RAX,0x6
MOV qword ptr [RBX + 0xc0],RAX
LAB_001362a8:
MOV RDI,RBX
CALL 0x001308af
CMP EAX,0x11
JNC 0x00136326
MOV RDI,RBX
CALL 0x001308af
MOV EBP,EAX
MOV RDI,RBX
CALL 0x001308af
TEST R12,R12
JZ 0x001362d5
SHL EBP,0x10
OR EBP,EAX
MOV dword ptr [R12],EBP
LAB_001362d5:
MOV RDI,RBX
CALL 0x001308af
MOV EBP,EAX
MOV RDI,RBX
CALL 0x001308af
TEST R15,R15
JZ 0x001362f4
SHL EBP,0x10
OR EBP,EAX
MOV dword ptr [R15],EBP
LAB_001362f4:
MOV RDI,RBX
CALL 0x001308af
CMP EAX,0x8
JZ 0x00136306
CMP EAX,0x10
JNZ 0x00136326
LAB_00136306:
MOV RDI,RBX
CALL 0x001308af
CMP EAX,0x3
JNZ 0x00136326
MOV EAX,0x1
TEST R14,R14
JZ 0x00136336
MOV dword ptr [R14],0x4
JMP 0x00136336
LAB_00136326:
MOVUPS XMM0,xmmword ptr [RBX + 0xd0]
MOVUPS xmmword ptr [RBX + 0xc0],XMM0
XOR EAX,EAX
LAB_00136336:
POP RBX
POP R12
POP R14
POP R15
POP RBP
RET
|
/* stbi__psd_info(stbi__context*, int*, int*, int*) */
int8 stbi__psd_info(stbi__context *param_1,int *param_2,int *param_3,int *param_4)
{
int iVar1;
uint uVar2;
long lVar3;
iVar1 = stbi__get16be(param_1);
uVar2 = stbi__get16be(param_1);
if (((uVar2 | iVar1 << 0x10) != 0x38425053) || (iVar1 = stbi__get16be(param_1), iVar1 != 1))
goto LAB_00136326;
if (*(long *)(param_1 + 0x10) == 0) {
lVar3 = *(long *)(param_1 + 0xc0);
LAB_0013629d:
*(long *)(param_1 + 0xc0) = lVar3 + 6;
}
else {
lVar3 = *(long *)(param_1 + 0xc0);
iVar1 = (int)*(int8 *)(param_1 + 200) - (int)lVar3;
if (5 < iVar1) goto LAB_0013629d;
*(int8 *)(param_1 + 0xc0) = *(int8 *)(param_1 + 200);
(**(code **)(param_1 + 0x18))(*(int8 *)(param_1 + 0x28),6 - iVar1);
}
uVar2 = stbi__get16be(param_1);
if (uVar2 < 0x11) {
iVar1 = stbi__get16be(param_1);
uVar2 = stbi__get16be(param_1);
if (param_3 != (int *)0x0) {
*param_3 = iVar1 << 0x10 | uVar2;
}
iVar1 = stbi__get16be(param_1);
uVar2 = stbi__get16be(param_1);
if (param_2 != (int *)0x0) {
*param_2 = iVar1 << 0x10 | uVar2;
}
iVar1 = stbi__get16be(param_1);
if (((iVar1 == 8) || (iVar1 == 0x10)) && (iVar1 = stbi__get16be(param_1), iVar1 == 3)) {
if (param_4 == (int *)0x0) {
return 1;
}
*param_4 = 4;
return 1;
}
}
LAB_00136326:
*(int8 *)(param_1 + 0xc0) = *(int8 *)(param_1 + 0xd0);
*(int8 *)(param_1 + 200) = *(int8 *)(param_1 + 0xd8);
return 0;
}
|
|
8,919 |
parse_rgb_component
|
dmazzella[P]pylunasvg/lunasvg/plutovg/source/plutovg-paint.c
|
static bool parse_rgb_component(const char** begin, const char* end, float* component)
{
float value = 0;
if(!plutovg_parse_number(begin, end, &value))
return false;
if(plutovg_skip_delim(begin, end, '%'))
value *= 2.55f;
*component = plutovg_clamp(value, 0.f, 255.f) / 255.f;
return true;
}
|
O1
|
c
|
parse_rgb_component:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rdx, %rbx
movq %rsi, %r15
movq %rdi, %r14
leaq 0xc(%rsp), %rdx
movl $0x0, (%rdx)
callq 0x9c72
testb %al, %al
je 0x9b6c
movq (%r14), %rcx
cmpq %r15, %rcx
jae 0x9b44
cmpb $0x25, (%rcx)
jne 0x9b44
incq %rcx
movq %rcx, (%r14)
movss 0xc(%rsp), %xmm0
mulss 0x19ce2(%rip), %xmm0 # 0x23820
movss %xmm0, 0xc(%rsp)
movss 0xc(%rsp), %xmm0
movss 0x19cae(%rip), %xmm1 # 0x23800
movaps %xmm1, %xmm2
minss %xmm0, %xmm2
divss %xmm1, %xmm2
xorps %xmm1, %xmm1
cmpltss %xmm1, %xmm0
andnps %xmm2, %xmm0
movss %xmm0, (%rbx)
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
|
parse_rgb_component:
push r15
push r14
push rbx
sub rsp, 10h
mov rbx, rdx
mov r15, rsi
mov r14, rdi
lea rdx, [rsp+28h+var_1C]
mov dword ptr [rdx], 0
call plutovg_parse_number
test al, al
jz short loc_9B6C
mov rcx, [r14]
cmp rcx, r15
jnb short loc_9B44
cmp byte ptr [rcx], 25h ; '%'
jnz short loc_9B44
inc rcx
mov [r14], rcx
movss xmm0, [rsp+28h+var_1C]
mulss xmm0, cs:dword_23820
movss [rsp+28h+var_1C], xmm0
loc_9B44:
movss xmm0, [rsp+28h+var_1C]
movss xmm1, cs:dword_23800
movaps xmm2, xmm1
minss xmm2, xmm0
divss xmm2, xmm1
xorps xmm1, xmm1
cmpltss xmm0, xmm1
andnps xmm0, xmm2
movss dword ptr [rbx], xmm0
loc_9B6C:
add rsp, 10h
pop rbx
pop r14
pop r15
retn
|
long long parse_rgb_component(_BYTE **a1, unsigned long long a2, _DWORD *a3)
{
long long result; // rax
_BYTE *v5; // rcx
__m128 v6; // xmm2
unsigned int v7[7]; // [rsp+Ch] [rbp-1Ch] BYREF
*(float *)v7 = 0.0;
result = plutovg_parse_number(a1, a2, v7);
if ( (_BYTE)result )
{
v5 = *a1;
if ( (unsigned long long)*a1 < a2 && *v5 == 37 )
{
*a1 = v5 + 1;
*(float *)v7 = *(float *)v7 * 2.55;
}
v6 = (__m128)0x437F0000u;
v6.m128_f32[0] = fminf(255.0, *(float *)v7) / 255.0;
*a3 = _mm_andnot_ps(_mm_cmplt_ss((__m128)v7[0], (__m128)0LL), v6).m128_u32[0];
}
return result;
}
|
parse_rgb_component:
PUSH R15
PUSH R14
PUSH RBX
SUB RSP,0x10
MOV RBX,RDX
MOV R15,RSI
MOV R14,RDI
LEA RDX,[RSP + 0xc]
MOV dword ptr [RDX],0x0
CALL 0x00109c72
TEST AL,AL
JZ 0x00109b6c
MOV RCX,qword ptr [R14]
CMP RCX,R15
JNC 0x00109b44
CMP byte ptr [RCX],0x25
JNZ 0x00109b44
INC RCX
MOV qword ptr [R14],RCX
MOVSS XMM0,dword ptr [RSP + 0xc]
MULSS XMM0,dword ptr [0x00123820]
MOVSS dword ptr [RSP + 0xc],XMM0
LAB_00109b44:
MOVSS XMM0,dword ptr [RSP + 0xc]
MOVSS XMM1,dword ptr [0x00123800]
MOVAPS XMM2,XMM1
MINSS XMM2,XMM0
DIVSS XMM2,XMM1
XORPS XMM1,XMM1
CMPLTSS XMM0,XMM1
ANDNPS XMM0,XMM2
MOVSS dword ptr [RBX],XMM0
LAB_00109b6c:
ADD RSP,0x10
POP RBX
POP R14
POP R15
RET
|
void parse_rgb_component(int8 *param_1,char *param_2,uint *param_3)
{
char *pcVar1;
char cVar2;
float fVar3;
float local_1c;
local_1c = 0.0;
cVar2 = plutovg_parse_number();
if (cVar2 != '\0') {
pcVar1 = (char *)*param_1;
if ((pcVar1 < param_2) && (*pcVar1 == '%')) {
*param_1 = pcVar1 + 1;
local_1c = (float)s__33__transparent_0012381f._1_4_ * 0.0;
}
fVar3 = DAT_00123800;
if (local_1c <= DAT_00123800) {
fVar3 = local_1c;
}
*param_3 = ~-(uint)(local_1c < 0.0) & (uint)(fVar3 / DAT_00123800);
}
return;
}
|
|
8,920 |
translog_scanner_set_last_page
|
eloqsql/storage/maria/ma_loghandler.c
|
static my_bool translog_scanner_set_last_page(TRANSLOG_SCANNER_DATA *scanner)
{
my_bool page_ok;
if (LSN_FILE_NO(scanner->page_addr) == LSN_FILE_NO(scanner->horizon))
{
/* It is last file => we can easy find last page address by horizon */
uint pagegrest= LSN_OFFSET(scanner->horizon) % TRANSLOG_PAGE_SIZE;
scanner->last_file_page= (scanner->horizon -
(pagegrest ? pagegrest : TRANSLOG_PAGE_SIZE));
return (0);
}
scanner->last_file_page= scanner->page_addr;
return (translog_get_last_page_addr(&scanner->last_file_page, &page_ok, 0));
}
|
O0
|
c
|
translog_scanner_set_last_page:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq 0x2000(%rax), %rax
sarq $0x20, %rax
movq -0x10(%rbp), %rcx
movq 0x2008(%rcx), %rcx
sarq $0x20, %rcx
cmpl %ecx, %eax
jne 0x501a0
movq -0x10(%rbp), %rcx
movabsq $0xffffffff, %rax # imm = 0xFFFFFFFF
andq 0x2008(%rcx), %rax
andq $0x1fff, %rax # imm = 0x1FFF
movl %eax, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq 0x2008(%rax), %rax
movq %rax, -0x20(%rbp)
cmpl $0x0, -0x18(%rbp)
je 0x50179
movl -0x18(%rbp), %eax
movl %eax, -0x24(%rbp)
jmp 0x50183
movl $0x2000, %eax # imm = 0x2000
movl %eax, -0x24(%rbp)
jmp 0x50183
movq -0x20(%rbp), %rcx
movl -0x24(%rbp), %eax
movl %eax, %eax
subq %rax, %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x2010(%rax)
movb $0x0, -0x1(%rbp)
jmp 0x501cf
movq -0x10(%rbp), %rax
movq 0x2000(%rax), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x2010(%rax)
movq -0x10(%rbp), %rdi
addq $0x2010, %rdi # imm = 0x2010
leaq -0x11(%rbp), %rsi
xorl %edx, %edx
callq 0x4d190
movb %al, -0x1(%rbp)
movb -0x1(%rbp), %al
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax,%rax)
|
translog_scanner_set_last_page:
push rbp
mov rbp, rsp
sub rsp, 30h
mov [rbp+var_10], rdi
mov rax, [rbp+var_10]
mov rax, [rax+2000h]
sar rax, 20h
mov rcx, [rbp+var_10]
mov rcx, [rcx+2008h]
sar rcx, 20h
cmp eax, ecx
jnz short loc_501A0
mov rcx, [rbp+var_10]
mov rax, 0FFFFFFFFh
and rax, [rcx+2008h]
and rax, 1FFFh
mov [rbp+var_18], eax
mov rax, [rbp+var_10]
mov rax, [rax+2008h]
mov [rbp+var_20], rax
cmp [rbp+var_18], 0
jz short loc_50179
mov eax, [rbp+var_18]
mov [rbp+var_24], eax
jmp short loc_50183
loc_50179:
mov eax, 2000h
mov [rbp+var_24], eax
jmp short $+2
loc_50183:
mov rcx, [rbp+var_20]
mov eax, [rbp+var_24]
mov eax, eax
sub rcx, rax
mov rax, [rbp+var_10]
mov [rax+2010h], rcx
mov [rbp+var_1], 0
jmp short loc_501CF
loc_501A0:
mov rax, [rbp+var_10]
mov rcx, [rax+2000h]
mov rax, [rbp+var_10]
mov [rax+2010h], rcx
mov rdi, [rbp+var_10]
add rdi, 2010h
lea rsi, [rbp+var_11]
xor edx, edx
call translog_get_last_page_addr
mov [rbp+var_1], al
loc_501CF:
mov al, [rbp+var_1]
add rsp, 30h
pop rbp
retn
|
char translog_scanner_set_last_page(_QWORD *a1)
{
unsigned int v2; // [rsp+Ch] [rbp-24h]
bool v3; // [rsp+1Fh] [rbp-11h] BYREF
_QWORD *v4; // [rsp+20h] [rbp-10h]
v4 = a1;
if ( HIDWORD(a1[1024]) == HIDWORD(a1[1025]) )
{
if ( (v4[1025] & 0x1FFF) != 0 )
v2 = v4[1025] & 0x1FFF;
else
v2 = 0x2000;
v4[1026] = v4[1025] - v2;
return 0;
}
else
{
v4[1026] = v4[1024];
return translog_get_last_page_addr(v4 + 1026, &v3, 0);
}
}
|
translog_scanner_set_last_page:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x30
MOV qword ptr [RBP + -0x10],RDI
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x2000]
SAR RAX,0x20
MOV RCX,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RCX + 0x2008]
SAR RCX,0x20
CMP EAX,ECX
JNZ 0x001501a0
MOV RCX,qword ptr [RBP + -0x10]
MOV RAX,0xffffffff
AND RAX,qword ptr [RCX + 0x2008]
AND RAX,0x1fff
MOV dword ptr [RBP + -0x18],EAX
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x2008]
MOV qword ptr [RBP + -0x20],RAX
CMP dword ptr [RBP + -0x18],0x0
JZ 0x00150179
MOV EAX,dword ptr [RBP + -0x18]
MOV dword ptr [RBP + -0x24],EAX
JMP 0x00150183
LAB_00150179:
MOV EAX,0x2000
MOV dword ptr [RBP + -0x24],EAX
JMP 0x00150183
LAB_00150183:
MOV RCX,qword ptr [RBP + -0x20]
MOV EAX,dword ptr [RBP + -0x24]
MOV EAX,EAX
SUB RCX,RAX
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RAX + 0x2010],RCX
MOV byte ptr [RBP + -0x1],0x0
JMP 0x001501cf
LAB_001501a0:
MOV RAX,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RAX + 0x2000]
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RAX + 0x2010],RCX
MOV RDI,qword ptr [RBP + -0x10]
ADD RDI,0x2010
LEA RSI,[RBP + -0x11]
XOR EDX,EDX
CALL 0x0014d190
MOV byte ptr [RBP + -0x1],AL
LAB_001501cf:
MOV AL,byte ptr [RBP + -0x1]
ADD RSP,0x30
POP RBP
RET
|
int1 translog_scanner_set_last_page(long param_1)
{
uint local_2c;
int1 local_19;
long local_18;
int1 local_9;
if ((int)((ulong)*(int8 *)(param_1 + 0x2000) >> 0x20) ==
(int)((ulong)*(int8 *)(param_1 + 0x2008) >> 0x20)) {
local_2c = (uint)*(ulong *)(param_1 + 0x2008) & 0x1fff;
if ((*(ulong *)(param_1 + 0x2008) & 0x1fff) == 0) {
local_2c = 0x2000;
}
*(ulong *)(param_1 + 0x2010) = *(long *)(param_1 + 0x2008) - (ulong)local_2c;
local_9 = 0;
}
else {
*(int8 *)(param_1 + 0x2010) = *(int8 *)(param_1 + 0x2000);
local_18 = param_1;
local_9 = translog_get_last_page_addr(param_1 + 0x2010,&local_19,0);
}
return local_9;
}
|
|
8,921 |
void google::protobuf::compiler::php::(anonymous namespace)::LegacyGenerateClassFile<google::protobuf::EnumDescriptor>(google::protobuf::FileDescriptor const*, google::protobuf::EnumDescriptor const*, google::protobuf::compiler::php::Options const&, google::protobuf::compiler::GeneratorContext*)
|
aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/compiler/php/php_generator.cc
|
void LegacyGenerateClassFile(const FileDescriptor* file,
const DescriptorType* desc, const Options& options,
GeneratorContext* generator_context) {
std::string filename = LegacyGeneratedClassFileName(desc, options);
std::unique_ptr<io::ZeroCopyOutputStream> output(
generator_context->Open(filename));
io::Printer printer(output.get(), '^');
GenerateHead(file, &printer);
std::string php_namespace = RootPhpNamespace(desc, options);
if (!php_namespace.empty()) {
printer.Print(
"namespace ^name^;\n\n",
"name", php_namespace);
}
std::string newname = FullClassName(desc, options);
printer.Print("if (false) {\n");
Indent(&printer);
printer.Print("/**\n");
printer.Print(" * This class is deprecated. Use ^new^ instead.\n",
"new", newname);
printer.Print(" * @deprecated\n");
printer.Print(" */\n");
printer.Print("class ^old^ {}\n",
"old", LegacyGeneratedClassName(desc));
Outdent(&printer);
printer.Print("}\n");
printer.Print("class_exists(^new^::class);\n",
"new", GeneratedClassNameImpl(desc));
printer.Print("@trigger_error('^old^ is deprecated and will be removed in "
"the next major release. Use ^fullname^ instead', E_USER_DEPRECATED);\n\n",
"old", LegacyFullClassName(desc, options),
"fullname", newname);
}
|
O0
|
cpp
|
void google::protobuf::compiler::php::(anonymous namespace)::LegacyGenerateClassFile<google::protobuf::EnumDescriptor>(google::protobuf::FileDescriptor const*, google::protobuf::EnumDescriptor const*, google::protobuf::compiler::php::Options const&, google::protobuf::compiler::GeneratorContext*):
subq $0x1b8, %rsp # imm = 0x1B8
movq %rdi, 0x1b0(%rsp)
movq %rsi, 0x1a8(%rsp)
movq %rdx, 0x1a0(%rsp)
movq %rcx, 0x198(%rsp)
movq 0x1a8(%rsp), %rsi
movq 0x1a0(%rsp), %rdx
leaq 0x178(%rsp), %rdi
movq %rdi, 0x10(%rsp)
callq 0x9db70
movq 0x10(%rsp), %rsi
movq 0x198(%rsp), %rdi
movq (%rdi), %rax
movq 0x10(%rax), %rax
callq *%rax
movq %rax, 0x18(%rsp)
jmp 0x9d066
movq 0x18(%rsp), %rsi
leaq 0x170(%rsp), %rdi
movq %rdi, 0x8(%rsp)
callq 0x4d4d0
movq 0x8(%rsp), %rdi
callq 0x39590
movq %rax, %rsi
leaq 0xc0(%rsp), %rdi
movl $0x5e, %edx
callq 0x322f80
jmp 0x9d09e
movq 0x1b0(%rsp), %rdi
leaq 0xc0(%rsp), %rsi
callq 0x93f80
jmp 0x9d0b5
movq 0x1a8(%rsp), %rsi
movq 0x1a0(%rsp), %rdx
leaq 0xa0(%rsp), %rdi
callq 0x9c490
jmp 0x9d0d4
leaq 0xa0(%rsp), %rdi
callq 0x212d0
testb $0x1, %al
jne 0x9d174
leaq 0x315889(%rip), %rsi # 0x3b2979
leaq 0x318ac6(%rip), %rdx # 0x3b5bbd
leaq 0xc0(%rsp), %rdi
leaq 0xa0(%rsp), %rcx
callq 0xa0140
jmp 0x9d10e
jmp 0x9d174
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x168(%rsp)
movl %eax, 0x164(%rsp)
jmp 0x9d40c
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x168(%rsp)
movl %eax, 0x164(%rsp)
jmp 0x9d3ff
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x168(%rsp)
movl %eax, 0x164(%rsp)
jmp 0x9d3f2
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x168(%rsp)
movl %eax, 0x164(%rsp)
jmp 0x9d3e5
movq 0x1a8(%rsp), %rsi
movq 0x1a0(%rsp), %rdx
leaq 0x80(%rsp), %rdi
callq 0x9bf90
jmp 0x9d193
leaq 0x316995(%rip), %rsi # 0x3b3b2f
leaq 0xc0(%rsp), %rdi
callq 0x39230
jmp 0x9d1a9
leaq 0xc0(%rsp), %rdi
callq 0x940e0
jmp 0x9d1b8
leaq 0x313978(%rip), %rsi # 0x3b0b37
leaq 0xc0(%rsp), %rdi
callq 0x39230
jmp 0x9d1ce
leaq 0x316968(%rip), %rsi # 0x3b3b3d
leaq 0x30ecea(%rip), %rdx # 0x3abec6
leaq 0xc0(%rsp), %rdi
leaq 0x80(%rsp), %rcx
callq 0xa5490
jmp 0x9d1f3
leaq 0x316160(%rip), %rsi # 0x3b335a
leaq 0xc0(%rsp), %rdi
callq 0x39230
jmp 0x9d209
leaq 0x342b85(%rip), %rsi # 0x3dfd95
leaq 0xc0(%rsp), %rdi
callq 0x39230
jmp 0x9d21f
movq 0x1a8(%rsp), %rsi
leaq 0x60(%rsp), %rdi
callq 0x9d940
jmp 0x9d233
leaq 0x316934(%rip), %rsi # 0x3b3b6e
leaq 0x315de4(%rip), %rdx # 0x3b3025
leaq 0xc0(%rsp), %rdi
leaq 0x60(%rsp), %rcx
callq 0xa5490
jmp 0x9d255
leaq 0x60(%rsp), %rdi
callq 0x21cc8
leaq 0xc0(%rsp), %rdi
callq 0x949e0
jmp 0x9d26e
leaq 0x353f8c(%rip), %rsi # 0x3f1201
leaq 0xc0(%rsp), %rdi
callq 0x39230
jmp 0x9d284
movq 0x1a8(%rsp), %rsi
leaq 0x40(%rsp), %rdi
callq 0x8f900
jmp 0x9d298
leaq 0x3168df(%rip), %rsi # 0x3b3b7e
leaq 0x30ec20(%rip), %rdx # 0x3abec6
leaq 0xc0(%rsp), %rdi
leaq 0x40(%rsp), %rcx
callq 0xa5490
jmp 0x9d2ba
leaq 0x40(%rsp), %rdi
callq 0x21cc8
movq 0x1a8(%rsp), %rsi
movq 0x1a0(%rsp), %rdx
leaq 0x20(%rsp), %rdi
callq 0x9cec0
jmp 0x9d2e0
leaq 0x3168b4(%rip), %rsi # 0x3b3b9b
leaq 0x315d37(%rip), %rdx # 0x3b3025
leaq 0x315c16(%rip), %r8 # 0x3b2f0b
leaq 0xc0(%rsp), %rdi
leaq 0x20(%rsp), %rcx
leaq 0x80(%rsp), %r9
callq 0xa6a50
jmp 0x9d311
leaq 0x20(%rsp), %rdi
callq 0x21cc8
leaq 0x80(%rsp), %rdi
callq 0x21cc8
leaq 0xa0(%rsp), %rdi
callq 0x21cc8
leaq 0xc0(%rsp), %rdi
callq 0x3230a0
leaq 0x170(%rsp), %rdi
callq 0x396b0
leaq 0x178(%rsp), %rdi
callq 0x21cc8
addq $0x1b8, %rsp # imm = 0x1B8
retq
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x168(%rsp)
movl %eax, 0x164(%rsp)
jmp 0x9d3d8
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x168(%rsp)
movl %eax, 0x164(%rsp)
leaq 0x60(%rsp), %rdi
callq 0x21cc8
jmp 0x9d3d8
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x168(%rsp)
movl %eax, 0x164(%rsp)
leaq 0x40(%rsp), %rdi
callq 0x21cc8
jmp 0x9d3d8
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x168(%rsp)
movl %eax, 0x164(%rsp)
leaq 0x20(%rsp), %rdi
callq 0x21cc8
leaq 0x80(%rsp), %rdi
callq 0x21cc8
leaq 0xa0(%rsp), %rdi
callq 0x21cc8
leaq 0xc0(%rsp), %rdi
callq 0x3230a0
leaq 0x170(%rsp), %rdi
callq 0x396b0
leaq 0x178(%rsp), %rdi
callq 0x21cc8
movq 0x168(%rsp), %rdi
callq 0x21700
nopw %cs:(%rax,%rax)
|
_ZN6google8protobuf8compiler3php12_GLOBAL__N_123LegacyGenerateClassFileINS0_14EnumDescriptorEEEvPKNS0_14FileDescriptorEPKT_RKNS2_7OptionsEPNS1_16GeneratorContextE:
sub rsp, 1B8h
mov [rsp+1B8h+var_8], rdi
mov qword ptr [rsp+1B8h+var_10], rsi
mov qword ptr [rsp+1B8h+var_18], rdx
mov [rsp+1B8h+var_20], rcx
mov rsi, qword ptr [rsp+1B8h+var_10]; char
mov rdx, qword ptr [rsp+1B8h+var_18]; int
lea rdi, [rsp+1B8h+var_40]; char
mov qword ptr [rsp+1B8h+var_1A8], rdi; int
call _ZN6google8protobuf8compiler3php12_GLOBAL__N_128LegacyGeneratedClassFileNameINS0_14EnumDescriptorEEENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEPKT_RKNS2_7OptionsE; google::protobuf::compiler::php::`anonymous namespace'::LegacyGeneratedClassFileName<google::protobuf::EnumDescriptor>(google::protobuf::EnumDescriptor const*,google::protobuf::compiler::php::Options const&)
mov rsi, qword ptr [rsp+1B8h+var_1A8]
mov rdi, [rsp+1B8h+var_20]
mov rax, [rdi]
mov rax, [rax+10h]
call rax
mov qword ptr [rsp+1B8h+var_1A0], rax; char
jmp short $+2
loc_9D066:
mov rsi, qword ptr [rsp+1B8h+var_1A0]
lea rdi, [rsp+1B8h+var_48]
mov qword ptr [rsp+1B8h+var_1B0], rdi; int
call _ZNSt10unique_ptrIN6google8protobuf2io20ZeroCopyOutputStreamESt14default_deleteIS3_EEC2IS5_vEEPS3_; std::unique_ptr<google::protobuf::io::ZeroCopyOutputStream>::unique_ptr<std::default_delete<google::protobuf::io::ZeroCopyOutputStream>,void>(google::protobuf::io::ZeroCopyOutputStream*)
mov rdi, qword ptr [rsp+1B8h+var_1B0]
call _ZNKSt10unique_ptrIN6google8protobuf2io20ZeroCopyOutputStreamESt14default_deleteIS3_EE3getEv; std::unique_ptr<google::protobuf::io::ZeroCopyOutputStream>::get(void)
mov rsi, rax; google::protobuf::io::ZeroCopyOutputStream *
lea rdi, [rsp+1B8h+var_F8]; this
mov edx, 5Eh ; '^'; char
call _ZN6google8protobuf2io7PrinterC2EPNS1_20ZeroCopyOutputStreamEc; google::protobuf::io::Printer::Printer(google::protobuf::io::ZeroCopyOutputStream *,char)
jmp short $+2
loc_9D09E:
mov rdi, [rsp+1B8h+var_8]; this
lea rsi, [rsp+1B8h+var_F8]; google::protobuf::FileDescriptor *
call _ZN6google8protobuf8compiler3php12_GLOBAL__N_112GenerateHeadEPKNS0_14FileDescriptorEPNS0_2io7PrinterE; google::protobuf::compiler::php::`anonymous namespace'::GenerateHead(google::protobuf::FileDescriptor const*,google::protobuf::io::Printer *)
jmp short $+2
loc_9D0B5:
mov rsi, qword ptr [rsp+1B8h+var_10]; int
mov rdx, qword ptr [rsp+1B8h+var_18]; int
lea rdi, [rsp+1B8h+var_118]; char
call _ZN6google8protobuf8compiler3php12_GLOBAL__N_116RootPhpNamespaceINS0_14EnumDescriptorEEENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEPKT_RKNS2_7OptionsE; google::protobuf::compiler::php::`anonymous namespace'::RootPhpNamespace<google::protobuf::EnumDescriptor>(google::protobuf::EnumDescriptor const*,google::protobuf::compiler::php::Options const&)
jmp short $+2
loc_9D0D4:
lea rdi, [rsp+1B8h+var_118]
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5emptyEv; std::string::empty(void)
test al, 1
jnz loc_9D174
lea rsi, aNamespaceName; "namespace ^name^;\n\n"
lea rdx, aGoogleProtobuf_24+34h; "name"
lea rdi, [rsp+1B8h+var_F8]
lea rcx, [rsp+1B8h+var_118]
call _ZN6google8protobuf2io7Printer5PrintIJA5_cNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEEEvPKcDpRKT_; google::protobuf::io::Printer::Print<char [5],std::string>(char const*,char [5],std::string const&)
jmp short $+2
loc_9D10E:
jmp short loc_9D174
mov rcx, rax
mov eax, edx
mov [rsp+arg_160], rcx
mov [rsp+arg_15C], eax
jmp loc_9D40C
mov rcx, rax
mov eax, edx
mov [rsp+arg_160], rcx
mov [rsp+arg_15C], eax
jmp loc_9D3FF
mov rcx, rax
mov eax, edx
mov [rsp+arg_160], rcx
mov [rsp+arg_15C], eax
jmp loc_9D3F2
mov rcx, rax
mov eax, edx
mov [rsp+arg_160], rcx
mov [rsp+arg_15C], eax
jmp loc_9D3E5
loc_9D174:
mov rsi, qword ptr [rsp+1B8h+var_10]; int
mov rdx, qword ptr [rsp+1B8h+var_18]; int
lea rdi, [rsp+1B8h+var_138]; int
call _ZN6google8protobuf8compiler3php12_GLOBAL__N_113FullClassNameINS0_14EnumDescriptorEEENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEPKT_RKNS2_7OptionsE; google::protobuf::compiler::php::`anonymous namespace'::FullClassName<google::protobuf::EnumDescriptor>(google::protobuf::EnumDescriptor const*,google::protobuf::compiler::php::Options const&)
jmp short $+2
loc_9D193:
lea rsi, aIfFalse; "if (false) {\n"
lea rdi, [rsp+1B8h+var_F8]
call _ZN6google8protobuf2io7Printer5PrintIJEEEvPKcDpRKT_
jmp short $+2
loc_9D1A9:
lea rdi, [rsp+1B8h+var_F8]; this
call _ZN6google8protobuf8compiler3php12_GLOBAL__N_16IndentEPNS0_2io7PrinterE; google::protobuf::compiler::php::`anonymous namespace'::Indent(google::protobuf::io::Printer *)
jmp short $+2
loc_9D1B8:
lea rsi, asc_3B0B37; "/**\n"
lea rdi, [rsp+1B8h+var_F8]
call _ZN6google8protobuf2io7Printer5PrintIJEEEvPKcDpRKT_
jmp short $+2
loc_9D1CE:
lea rsi, aThisClassIsDep; " * This class is deprecated. Use ^new^ "...
lea rdx, aNew_0; "new"
lea rdi, [rsp+1B8h+var_F8]
lea rcx, [rsp+1B8h+var_138]
call _ZN6google8protobuf2io7Printer5PrintIJA4_cNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEEEvPKcDpRKT_; google::protobuf::io::Printer::Print<char [4],std::string>(char const*,char [4],std::string const&)
jmp short $+2
loc_9D1F3:
lea rsi, aDeprecated; " * @deprecated\n"
lea rdi, [rsp+1B8h+var_F8]
call _ZN6google8protobuf2io7Printer5PrintIJEEEvPKcDpRKT_
jmp short $+2
loc_9D209:
lea rsi, aCodeDefCode_0+16h; " */\n"
lea rdi, [rsp+1B8h+var_F8]
call _ZN6google8protobuf2io7Printer5PrintIJEEEvPKcDpRKT_
jmp short $+2
loc_9D21F:
mov rsi, qword ptr [rsp+1B8h+var_10]
lea rdi, [rsp+1B8h+var_158]; void *
call _ZN6google8protobuf8compiler3php12_GLOBAL__N_124LegacyGeneratedClassNameINS0_14EnumDescriptorEEENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEPKT_; google::protobuf::compiler::php::`anonymous namespace'::LegacyGeneratedClassName<google::protobuf::EnumDescriptor>(google::protobuf::EnumDescriptor const*)
jmp short $+2
loc_9D233:
lea rsi, aClassOld; "class ^old^ {}\n"
lea rdx, aOld; "old"
lea rdi, [rsp+1B8h+var_F8]
lea rcx, [rsp+1B8h+var_158]
call _ZN6google8protobuf2io7Printer5PrintIJA4_cNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEEEvPKcDpRKT_; google::protobuf::io::Printer::Print<char [4],std::string>(char const*,char [4],std::string const&)
jmp short $+2
loc_9D255:
lea rdi, [rsp+1B8h+var_158]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
lea rdi, [rsp+1B8h+var_F8]; this
call _ZN6google8protobuf8compiler3php12_GLOBAL__N_17OutdentEPNS0_2io7PrinterE; google::protobuf::compiler::php::`anonymous namespace'::Outdent(google::protobuf::io::Printer *)
jmp short $+2
loc_9D26E:
lea rsi, aIfOtherHasCapi_1+6Dh; "}\n"
lea rdi, [rsp+1B8h+var_F8]
call _ZN6google8protobuf2io7Printer5PrintIJEEEvPKcDpRKT_
jmp short $+2
loc_9D284:
mov rsi, qword ptr [rsp+1B8h+var_10]; int
lea rdi, [rsp+1B8h+var_178]; int
call _ZN6google8protobuf8compiler3php12_GLOBAL__N_122GeneratedClassNameImplINS0_14EnumDescriptorEEENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEPKT_; google::protobuf::compiler::php::`anonymous namespace'::GeneratedClassNameImpl<google::protobuf::EnumDescriptor>(google::protobuf::EnumDescriptor const*)
jmp short $+2
loc_9D298:
lea rsi, aClassExistsNew; "class_exists(^new^::class);\n"
lea rdx, aNew_0; "new"
lea rdi, [rsp+1B8h+var_F8]
lea rcx, [rsp+1B8h+var_178]
call _ZN6google8protobuf2io7Printer5PrintIJA4_cNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEEEvPKcDpRKT_; google::protobuf::io::Printer::Print<char [4],std::string>(char const*,char [4],std::string const&)
jmp short $+2
loc_9D2BA:
lea rdi, [rsp+1B8h+var_178]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
mov rsi, qword ptr [rsp+1B8h+var_10]
mov rdx, qword ptr [rsp+1B8h+var_18]
lea rdi, [rsp+1B8h+var_198]; char
call _ZN6google8protobuf8compiler3php12_GLOBAL__N_119LegacyFullClassNameINS0_14EnumDescriptorEEENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEPKT_RKNS2_7OptionsE; google::protobuf::compiler::php::`anonymous namespace'::LegacyFullClassName<google::protobuf::EnumDescriptor>(google::protobuf::EnumDescriptor const*,google::protobuf::compiler::php::Options const&)
jmp short $+2
loc_9D2E0:
lea rsi, aTriggerErrorOl; "@trigger_error('^old^ is deprecated and"...
lea rdx, aOld; "old"
lea r8, aFullname; "fullname"
lea rdi, [rsp+1B8h+var_F8]
lea rcx, [rsp+1B8h+var_198]
lea r9, [rsp+1B8h+var_138]
call _ZN6google8protobuf2io7Printer5PrintIJA4_cNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEA9_cSA_EEEvPKcDpRKT_; google::protobuf::io::Printer::Print<char [4],std::string,char [9],std::string>(char const*,char [4],std::string,char [9],std::string const&)
jmp short $+2
loc_9D311:
lea rdi, [rsp+1B8h+var_198]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
lea rdi, [rsp+1B8h+var_138]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
lea rdi, [rsp+1B8h+var_118]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
lea rdi, [rsp+1B8h+var_F8]; this
call _ZN6google8protobuf2io7PrinterD2Ev; google::protobuf::io::Printer::~Printer()
lea rdi, [rsp+1B8h+var_48]
call _ZNSt10unique_ptrIN6google8protobuf2io20ZeroCopyOutputStreamESt14default_deleteIS3_EED2Ev; std::unique_ptr<google::protobuf::io::ZeroCopyOutputStream>::~unique_ptr()
lea rdi, [rsp+1B8h+var_40]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
add rsp, 1B8h
retn
mov rcx, rax
mov eax, edx
mov [rsp+arg_160], rcx
mov [rsp+arg_15C], eax
jmp short loc_9D3D8
mov rcx, rax
mov eax, edx
mov [rsp+arg_160], rcx
mov [rsp+arg_15C], eax
lea rdi, [rsp+arg_58]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
jmp short loc_9D3D8
mov rcx, rax
mov eax, edx
mov [rsp+arg_160], rcx
mov [rsp+arg_15C], eax
lea rdi, [rsp+arg_38]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
jmp short loc_9D3D8
mov rcx, rax
mov eax, edx
mov [rsp+arg_160], rcx
mov [rsp+arg_15C], eax
lea rdi, [rsp+arg_18]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
loc_9D3D8:
lea rdi, [rsp+arg_78]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
loc_9D3E5:
lea rdi, [rsp+arg_98]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
loc_9D3F2:
lea rdi, [rsp+arg_B8]; this
call _ZN6google8protobuf2io7PrinterD2Ev; google::protobuf::io::Printer::~Printer()
loc_9D3FF:
lea rdi, [rsp+arg_168]
call _ZNSt10unique_ptrIN6google8protobuf2io20ZeroCopyOutputStreamESt14default_deleteIS3_EED2Ev; std::unique_ptr<google::protobuf::io::ZeroCopyOutputStream>::~unique_ptr()
loc_9D40C:
lea rdi, [rsp+arg_170]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
mov rdi, [rsp+arg_160]
call __Unwind_Resume
|
void google::protobuf::compiler::php::`anonymous namespace'::LegacyGenerateClassFile<google::protobuf::EnumDescriptor>(
google::protobuf::compiler::php::_anonymous_namespace_ *a1,
long long a2,
long long a3,
long long a4)
{
google::protobuf::io::ZeroCopyOutputStream *v4; // rax
google::protobuf::io::Printer *v5; // rdx
int v6; // r8d
int v7; // r9d
int v8; // r8d
int v9; // r9d
int v10; // r8d
int v11; // r9d
int v12; // r8d
int v13; // r9d
int v14; // [rsp+0h] [rbp-1B8h]
int v15; // [rsp+0h] [rbp-1B8h]
int v16; // [rsp+0h] [rbp-1B8h]
int v17; // [rsp+0h] [rbp-1B8h]
int v18; // [rsp+0h] [rbp-1B8h]
int v19; // [rsp+0h] [rbp-1B8h]
int v20; // [rsp+8h] [rbp-1B0h]
char v21; // [rsp+8h] [rbp-1B0h]
int v22; // [rsp+8h] [rbp-1B0h]
int v23; // [rsp+8h] [rbp-1B0h]
int v24; // [rsp+8h] [rbp-1B0h]
char v25[8]; // [rsp+10h] [rbp-1A8h]
int v26; // [rsp+10h] [rbp-1A8h]
int v27; // [rsp+10h] [rbp-1A8h]
int v28; // [rsp+10h] [rbp-1A8h]
int v29; // [rsp+10h] [rbp-1A8h]
int v30; // [rsp+18h] [rbp-1A0h]
long long v31; // [rsp+18h] [rbp-1A0h]
int v32; // [rsp+18h] [rbp-1A0h]
long long v33; // [rsp+18h] [rbp-1A0h]
long long v34; // [rsp+18h] [rbp-1A0h]
long long v35; // [rsp+18h] [rbp-1A0h]
int v36; // [rsp+20h] [rbp-198h] BYREF
long long v37; // [rsp+28h] [rbp-190h]
long long v38; // [rsp+30h] [rbp-188h]
char v39; // [rsp+38h] [rbp-180h]
int v40[8]; // [rsp+40h] [rbp-178h] BYREF
int v41[8]; // [rsp+60h] [rbp-158h] BYREF
char v42[32]; // [rsp+80h] [rbp-138h] BYREF
char v43[32]; // [rsp+A0h] [rbp-118h] BYREF
char v44[176]; // [rsp+C0h] [rbp-F8h] BYREF
char v45[4]; // [rsp+170h] [rbp-48h] BYREF
char v46[4]; // [rsp+178h] [rbp-40h] BYREF
long long v47; // [rsp+198h] [rbp-20h]
int v48[2]; // [rsp+1A0h] [rbp-18h]
char v49[8]; // [rsp+1A8h] [rbp-10h]
google::protobuf::compiler::php::_anonymous_namespace_ *v50; // [rsp+1B0h] [rbp-8h]
v50 = a1;
*(_QWORD *)v49 = a2;
*(_QWORD *)v48 = a3;
v47 = a4;
google::protobuf::compiler::php::`anonymous namespace'::LegacyGeneratedClassFileName<google::protobuf::EnumDescriptor>(
(char)v46,
a2,
a3,
v14,
v20,
(int)v46,
v30,
v36,
v37,
v38,
v39);
v31 = (*(long long ( **)(long long, char *))(*(_QWORD *)v47 + 16LL))(v47, *(char **)v25);
std::unique_ptr<google::protobuf::io::ZeroCopyOutputStream>::unique_ptr<std::default_delete<google::protobuf::io::ZeroCopyOutputStream>,void>();
v4 = (google::protobuf::io::ZeroCopyOutputStream *)std::unique_ptr<google::protobuf::io::ZeroCopyOutputStream>::get();
google::protobuf::io::Printer::Printer((google::protobuf::io::Printer *)v44, v4, 94);
google::protobuf::compiler::php::`anonymous namespace'::GenerateHead(
v50,
(const google::protobuf::FileDescriptor *)v44,
v5);
google::protobuf::compiler::php::`anonymous namespace'::RootPhpNamespace<google::protobuf::EnumDescriptor>(
(long long)v43,
*(google::protobuf::EnumDescriptor **)v49,
*(long long *)v48);
if ( (std::string::empty(v43) & 1) == 0 )
google::protobuf::io::Printer::Print<char [5],std::string>(
(unsigned int)v44,
(unsigned int)"namespace ^name^;\n\n",
(unsigned int)"name",
(unsigned int)v43,
v6,
v7);
google::protobuf::compiler::php::`anonymous namespace'::FullClassName<google::protobuf::EnumDescriptor>(
(long long)v42,
*(google::protobuf::EnumDescriptor **)v49,
*(long long *)v48);
google::protobuf::io::Printer::Print<>((long long)v44, (long long)"if (false) {\n");
google::protobuf::compiler::php::`anonymous namespace'::Indent(
(google::protobuf::compiler::php::_anonymous_namespace_ *)v44,
(google::protobuf::io::Printer *)"if (false) {\n");
google::protobuf::io::Printer::Print<>((long long)v44, (long long)"/**\n");
google::protobuf::io::Printer::Print<char [4],std::string>(
(unsigned int)v44,
(unsigned int)" * This class is deprecated. Use ^new^ instead.\n",
(unsigned int)"new",
(unsigned int)v42,
v8,
v9,
v15,
(unsigned int)v45,
*(_DWORD *)v25,
v31);
google::protobuf::io::Printer::Print<>((long long)v44, (long long)" * @deprecated\n");
google::protobuf::io::Printer::Print<>((long long)v44, (long long)" */\n");
google::protobuf::compiler::php::`anonymous namespace'::LegacyGeneratedClassName<google::protobuf::EnumDescriptor>(
v41,
v16,
v21,
v26,
v32,
v36,
v37,
v38,
v39,
v40[0],
v40[2],
v40[4],
v40[6],
v41[0],
v41[2],
v41[4],
v41[6],
v42[0]);
google::protobuf::io::Printer::Print<char [4],std::string>(
(unsigned int)v44,
(unsigned int)"class ^old^ {}\n",
(unsigned int)"old",
(unsigned int)v41,
v10,
v11,
v17,
v22,
v27,
v33);
std::string::~string(v41);
google::protobuf::compiler::php::`anonymous namespace'::Outdent(
(google::protobuf::compiler::php::_anonymous_namespace_ *)v44,
(google::protobuf::io::Printer *)"class ^old^ {}\n");
google::protobuf::io::Printer::Print<>((long long)v44, (long long)"}\n");
google::protobuf::compiler::php::`anonymous namespace'::GeneratedClassNameImpl<google::protobuf::EnumDescriptor>(
(long long)v40,
*(google::protobuf::EnumDescriptor **)v49);
google::protobuf::io::Printer::Print<char [4],std::string>(
(unsigned int)v44,
(unsigned int)"class_exists(^new^::class);\n",
(unsigned int)"new",
(unsigned int)v40,
v12,
v13,
v18,
v23,
v28,
v34);
std::string::~string(v40);
google::protobuf::compiler::php::`anonymous namespace'::LegacyFullClassName<google::protobuf::EnumDescriptor>(
(long long)&v36,
*(long long *)v49,
*(long long *)v48);
google::protobuf::io::Printer::Print<char [4],std::string,char [9],std::string>(
(unsigned int)v44,
(unsigned int)"@trigger_error('^old^ is deprecated and will be removed in the next major release. Use ^fullname^ inst"
"ead', E_USER_DEPRECATED);\n"
"\n",
(unsigned int)"old",
(unsigned int)&v36,
(unsigned int)"fullname",
(unsigned int)v42,
v19,
v24,
v29,
v35,
v36);
std::string::~string(&v36);
std::string::~string(v42);
std::string::~string(v43);
google::protobuf::io::Printer::~Printer((google::protobuf::io::Printer *)v44);
std::unique_ptr<google::protobuf::io::ZeroCopyOutputStream>::~unique_ptr((long long)v45);
std::string::~string(v46);
}
|
LegacyGenerateClassFile<google::protobuf::EnumDescriptor>:
SUB RSP,0x1b8
MOV qword ptr [RSP + 0x1b0],RDI
MOV qword ptr [RSP + 0x1a8],RSI
MOV qword ptr [RSP + 0x1a0],RDX
MOV qword ptr [RSP + 0x198],RCX
MOV RSI,qword ptr [RSP + 0x1a8]
MOV RDX,qword ptr [RSP + 0x1a0]
LEA RDI,[RSP + 0x178]
MOV qword ptr [RSP + 0x10],RDI
CALL 0x0019db70
MOV RSI,qword ptr [RSP + 0x10]
MOV RDI,qword ptr [RSP + 0x198]
MOV RAX,qword ptr [RDI]
MOV RAX,qword ptr [RAX + 0x10]
LAB_0019d05d:
CALL RAX
MOV qword ptr [RSP + 0x18],RAX
JMP 0x0019d066
LAB_0019d066:
MOV RSI,qword ptr [RSP + 0x18]
LEA RDI,[RSP + 0x170]
MOV qword ptr [RSP + 0x8],RDI
CALL 0x0014d4d0
MOV RDI,qword ptr [RSP + 0x8]
CALL 0x00139590
MOV RSI,RAX
LAB_0019d08a:
LEA RDI,[RSP + 0xc0]
MOV EDX,0x5e
CALL 0x00422f80
JMP 0x0019d09e
LAB_0019d09e:
MOV RDI,qword ptr [RSP + 0x1b0]
LAB_0019d0a6:
LEA RSI,[RSP + 0xc0]
CALL 0x00193f80
JMP 0x0019d0b5
LAB_0019d0b5:
MOV RSI,qword ptr [RSP + 0x1a8]
MOV RDX,qword ptr [RSP + 0x1a0]
LEA RDI,[RSP + 0xa0]
CALL 0x0019c490
JMP 0x0019d0d4
LAB_0019d0d4:
LEA RDI,[RSP + 0xa0]
CALL 0x001212d0
TEST AL,0x1
JNZ 0x0019d174
LAB_0019d0e9:
LEA RSI,[0x4b2979]
LEA RDX,[0x4b5bbd]
LEA RDI,[RSP + 0xc0]
LEA RCX,[RSP + 0xa0]
CALL 0x001a0140
JMP 0x0019d10e
LAB_0019d10e:
JMP 0x0019d174
LAB_0019d174:
MOV RSI,qword ptr [RSP + 0x1a8]
MOV RDX,qword ptr [RSP + 0x1a0]
LEA RDI,[RSP + 0x80]
CALL 0x0019bf90
JMP 0x0019d193
LAB_0019d193:
LEA RSI,[0x4b3b2f]
LEA RDI,[RSP + 0xc0]
CALL 0x00139230
JMP 0x0019d1a9
LAB_0019d1a9:
LEA RDI,[RSP + 0xc0]
CALL 0x001940e0
JMP 0x0019d1b8
LAB_0019d1b8:
LEA RSI,[0x4b0b37]
LEA RDI,[RSP + 0xc0]
CALL 0x00139230
JMP 0x0019d1ce
LAB_0019d1ce:
LEA RSI,[0x4b3b3d]
LEA RDX,[0x4abec6]
LEA RDI,[RSP + 0xc0]
LEA RCX,[RSP + 0x80]
CALL 0x001a5490
JMP 0x0019d1f3
LAB_0019d1f3:
LEA RSI,[0x4b335a]
LEA RDI,[RSP + 0xc0]
CALL 0x00139230
JMP 0x0019d209
LAB_0019d209:
LEA RSI,[0x4dfd95]
LEA RDI,[RSP + 0xc0]
CALL 0x00139230
JMP 0x0019d21f
LAB_0019d21f:
MOV RSI,qword ptr [RSP + 0x1a8]
LEA RDI,[RSP + 0x60]
CALL 0x0019d940
JMP 0x0019d233
LAB_0019d233:
LEA RSI,[0x4b3b6e]
LEA RDX,[0x4b3025]
LEA RDI,[RSP + 0xc0]
LEA RCX,[RSP + 0x60]
CALL 0x001a5490
JMP 0x0019d255
LAB_0019d255:
LEA RDI,[RSP + 0x60]
CALL 0x00121cc8
LAB_0019d25f:
LEA RDI,[RSP + 0xc0]
CALL 0x001949e0
JMP 0x0019d26e
LAB_0019d26e:
LEA RSI,[0x4f1201]
LEA RDI,[RSP + 0xc0]
CALL 0x00139230
JMP 0x0019d284
LAB_0019d284:
MOV RSI,qword ptr [RSP + 0x1a8]
LEA RDI,[RSP + 0x40]
CALL 0x0018f900
JMP 0x0019d298
LAB_0019d298:
LEA RSI,[0x4b3b7e]
LEA RDX,[0x4abec6]
LEA RDI,[RSP + 0xc0]
LEA RCX,[RSP + 0x40]
CALL 0x001a5490
JMP 0x0019d2ba
LAB_0019d2ba:
LEA RDI,[RSP + 0x40]
CALL 0x00121cc8
MOV RSI,qword ptr [RSP + 0x1a8]
MOV RDX,qword ptr [RSP + 0x1a0]
LAB_0019d2d4:
LEA RDI,[RSP + 0x20]
CALL 0x0019cec0
JMP 0x0019d2e0
LAB_0019d2e0:
LEA RSI,[0x4b3b9b]
LEA RDX,[0x4b3025]
LEA R8,[0x4b2f0b]
LEA RDI,[RSP + 0xc0]
LEA RCX,[RSP + 0x20]
LEA R9,[RSP + 0x80]
CALL 0x001a6a50
LAB_0019d30f:
JMP 0x0019d311
LAB_0019d311:
LEA RDI,[RSP + 0x20]
CALL 0x00121cc8
LEA RDI,[RSP + 0x80]
CALL 0x00121cc8
LEA RDI,[RSP + 0xa0]
CALL 0x00121cc8
LEA RDI,[RSP + 0xc0]
CALL 0x004230a0
LEA RDI,[RSP + 0x170]
CALL 0x001396b0
LEA RDI,[RSP + 0x178]
CALL 0x00121cc8
ADD RSP,0x1b8
RET
|
/* void google::protobuf::compiler::php::(anonymous
namespace)::LegacyGenerateClassFile<google::protobuf::EnumDescriptor>(google::protobuf::FileDescriptor
const*, google::protobuf::EnumDescriptor const*, google::protobuf::compiler::php::Options const&,
google::protobuf::compiler::GeneratorContext*) */
void google::protobuf::compiler::php::(anonymous_namespace)::
LegacyGenerateClassFile<google::protobuf::EnumDescriptor>
(FileDescriptor *param_1,EnumDescriptor *param_2,Options *param_3,
GeneratorContext *param_4)
{
ZeroCopyOutputStream *pZVar1;
ulong uVar2;
_anonymous_namespace_ local_198 [32];
_anonymous_namespace_ local_178 [32];
_anonymous_namespace_ local_158 [32];
_anonymous_namespace_ local_138 [32];
_anonymous_namespace_ local_118 [32];
Printer local_f8 [176];
unique_ptr<google::protobuf::io::ZeroCopyOutputStream,std::default_delete<google::protobuf::io::ZeroCopyOutputStream>>
local_48 [8];
_anonymous_namespace_ local_40 [32];
GeneratorContext *local_20;
Options *local_18;
EnumDescriptor *local_10;
FileDescriptor *local_8;
local_20 = param_4;
local_18 = param_3;
local_10 = param_2;
local_8 = param_1;
LegacyGeneratedClassFileName<google::protobuf::EnumDescriptor>(local_40,param_2,param_3);
/* try { // try from 0019d05d to 0019d05e has its CatchHandler @ 0019d110 */
pZVar1 = (ZeroCopyOutputStream *)(**(code **)(*(long *)local_20 + 0x10))(local_20,local_40);
std::
unique_ptr<google::protobuf::io::ZeroCopyOutputStream,std::default_delete<google::protobuf::io::ZeroCopyOutputStream>>
::unique_ptr<std::default_delete<google::protobuf::io::ZeroCopyOutputStream>,void>
(local_48,pZVar1);
pZVar1 = (ZeroCopyOutputStream *)
std::
unique_ptr<google::protobuf::io::ZeroCopyOutputStream,std::default_delete<google::protobuf::io::ZeroCopyOutputStream>>
::get(local_48);
/* try { // try from 0019d08a to 0019d09b has its CatchHandler @ 0019d129 */
io::Printer::Printer(local_f8,pZVar1,'^');
/* try { // try from 0019d0a6 to 0019d0d1 has its CatchHandler @ 0019d142 */
GenerateHead(local_8,local_f8);
RootPhpNamespace<google::protobuf::EnumDescriptor>(local_118,local_10,local_18);
uVar2 = std::__cxx11::string::empty();
if ((uVar2 & 1) == 0) {
/* try { // try from 0019d0e9 to 0019d190 has its CatchHandler @ 0019d15b */
io::Printer::Print<char[5],std::__cxx11::string>
(local_f8,"namespace ^name^;\n\n","name",(string *)local_118);
}
FullClassName<google::protobuf::EnumDescriptor>(local_138,local_10,local_18);
/* try { // try from 0019d193 to 0019d230 has its CatchHandler @ 0019d364 */
io::Printer::Print<>(local_f8,"if (false) {\n");
Indent(local_f8);
io::Printer::Print<>(local_f8,"/**\n");
io::Printer::Print<char[4],std::__cxx11::string>
(local_f8," * This class is deprecated. Use ^new^ instead.\n","new",(string *)local_138)
;
io::Printer::Print<>(local_f8," * @deprecated\n");
io::Printer::Print<>(local_f8," */\n");
LegacyGeneratedClassName<google::protobuf::EnumDescriptor>(local_158,local_10);
/* try { // try from 0019d233 to 0019d252 has its CatchHandler @ 0019d37a */
io::Printer::Print<char[4],std::__cxx11::string>
(local_f8,"class ^old^ {}\n","old",(string *)local_158);
std::__cxx11::string::~string((string *)local_158);
/* try { // try from 0019d25f to 0019d295 has its CatchHandler @ 0019d364 */
Outdent(local_f8);
io::Printer::Print<>(local_f8,"}\n");
GeneratedClassNameImpl<google::protobuf::EnumDescriptor>(local_178,local_10);
/* try { // try from 0019d298 to 0019d2b7 has its CatchHandler @ 0019d39a */
io::Printer::Print<char[4],std::__cxx11::string>
(local_f8,"class_exists(^new^::class);\n","new",(string *)local_178);
std::__cxx11::string::~string((string *)local_178);
/* try { // try from 0019d2d4 to 0019d2dd has its CatchHandler @ 0019d364 */
LegacyFullClassName<google::protobuf::EnumDescriptor>(local_198,local_10,local_18);
/* try { // try from 0019d2e0 to 0019d30e has its CatchHandler @ 0019d3ba */
io::Printer::Print<char[4],std::__cxx11::string,char[9],std::__cxx11::string>
(local_f8,
"@trigger_error(\'^old^ is deprecated and will be removed in the next major release. Use ^fullname^ instead\', E_USER_DEPRECATED);\n\n"
,"old",(string *)local_198,"fullname",(string *)local_138);
std::__cxx11::string::~string((string *)local_198);
std::__cxx11::string::~string((string *)local_138);
std::__cxx11::string::~string((string *)local_118);
io::Printer::~Printer(local_f8);
std::
unique_ptr<google::protobuf::io::ZeroCopyOutputStream,std::default_delete<google::protobuf::io::ZeroCopyOutputStream>>
::~unique_ptr(local_48);
std::__cxx11::string::~string((string *)local_40);
return;
}
|
|
8,922 |
nlohmann::json_abi_v3_11_3::detail::dtoa_impl::diyfp::normalize(nlohmann::json_abi_v3_11_3::detail::dtoa_impl::diyfp)
|
monkey531[P]llama/common/json.hpp
|
static diyfp normalize(diyfp x) noexcept
{
JSON_ASSERT(x.f != 0);
while ((x.f >> 63u) == 0)
{
x.f <<= 1u;
x.e--;
}
return x;
}
|
O2
|
cpp
|
nlohmann::json_abi_v3_11_3::detail::dtoa_impl::diyfp::normalize(nlohmann::json_abi_v3_11_3::detail::dtoa_impl::diyfp):
pushq %rax
testq %rdi, %rdi
jne 0x8b1b0
leaq 0x28a0b(%rip), %rdi # 0xb3b9c
leaq 0x2245d(%rip), %rdx # 0xad5f5
leaq 0x2e185(%rip), %rcx # 0xb9324
movl $0x42a1, %esi # imm = 0x42A1
xorl %eax, %eax
callq 0x23fe0
addq %rdi, %rdi
decl %esi
testq %rdi, %rdi
jns 0x8b1ab
movq %rdi, %rax
movl %esi, %edx
popq %rcx
retq
movq %rax, %rdi
callq 0x2a647
|
_ZN8nlohmann16json_abi_v3_11_36detail9dtoa_impl5diyfp9normalizeES3_:
push rax
test rdi, rdi
jnz short loc_8B1B0
lea rdi, aWorkspaceLlm4b_1; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aXF0; "x.f != 0"
mov esi, 42A1h
xor eax, eax
call _ggml_abort
loc_8B1AB:
add rdi, rdi
dec esi
loc_8B1B0:
test rdi, rdi
jns short loc_8B1AB
mov rax, rdi
mov edx, esi
pop rcx
retn
mov rdi, rax
call __clang_call_terminate
|
long long nlohmann::json_abi_v3_11_3::detail::dtoa_impl::diyfp::normalize(long long a1, int a2)
{
if ( a1 )
goto LABEL_4;
a1 = (long long)"/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp";
a2 = 17057;
ggml_abort(
"/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp",
17057LL,
"GGML_ASSERT(%s) failed",
"x.f != 0");
do
{
a1 *= 2LL;
--a2;
LABEL_4:
;
}
while ( a1 >= 0 );
return a1;
}
|
normalize:
PUSH RAX
TEST RDI,RDI
JNZ 0x0018b1b0
LAB_0018b18a:
LEA RDI,[0x1b3b9c]
LEA RDX,[0x1ad5f5]
LEA RCX,[0x1b9324]
MOV ESI,0x42a1
XOR EAX,EAX
CALL 0x00123fe0
LAB_0018b1ab:
ADD RDI,RDI
DEC ESI
LAB_0018b1b0:
TEST RDI,RDI
JNS 0x0018b1ab
MOV RAX,RDI
MOV EDX,ESI
POP RCX
RET
|
/* nlohmann::json_abi_v3_11_3::detail::dtoa_impl::diyfp::normalize(nlohmann::json_abi_v3_11_3::detail::dtoa_impl::diyfp)
*/
int1 [16] __thiscall
nlohmann::json_abi_v3_11_3::detail::dtoa_impl::diyfp::normalize(diyfp *this,int param_2)
{
int1 auVar1 [16];
if (this == (diyfp *)0x0) {
/* try { // try from 0018b18a to 0018b1aa has its CatchHandler @ 0018b1bc */
/* WARNING: Subroutine does not return */
ggml_abort("/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp",0x42a1,
"GGML_ASSERT(%s) failed","x.f != 0");
}
for (; -1 < (long)this; this = (diyfp *)((long)this * 2)) {
param_2 = param_2 + -1;
}
auVar1._8_4_ = param_2;
auVar1._0_8_ = this;
auVar1._12_4_ = 0;
return auVar1;
}
|
|
8,923 |
nlohmann::json_abi_v3_11_3::detail::dtoa_impl::diyfp::normalize(nlohmann::json_abi_v3_11_3::detail::dtoa_impl::diyfp)
|
monkey531[P]llama/common/json.hpp
|
static diyfp normalize(diyfp x) noexcept
{
JSON_ASSERT(x.f != 0);
while ((x.f >> 63u) == 0)
{
x.f <<= 1u;
x.e--;
}
return x;
}
|
O3
|
cpp
|
nlohmann::json_abi_v3_11_3::detail::dtoa_impl::diyfp::normalize(nlohmann::json_abi_v3_11_3::detail::dtoa_impl::diyfp):
pushq %rax
testq %rdi, %rdi
je 0xbc7df
js 0xbc7d8
addq %rdi, %rdi
decl %esi
testq %rdi, %rdi
jns 0xbc7ce
movq %rdi, %rax
movl %esi, %edx
popq %rcx
retq
leaq 0x343b3(%rip), %rdi # 0xf0b99
leaq 0x2de08(%rip), %rdx # 0xea5f5
leaq 0x39b04(%rip), %rcx # 0xf62f8
movl $0x42a1, %esi # imm = 0x42A1
xorl %eax, %eax
callq 0x1bfb0
movq %rax, %rdi
callq 0x26123
|
_ZN8nlohmann16json_abi_v3_11_36detail9dtoa_impl5diyfp9normalizeES3_:
push rax
test rdi, rdi
jz short loc_BC7DF
js short loc_BC7D8
loc_BC7CE:
add rdi, rdi
dec esi
test rdi, rdi
jns short loc_BC7CE
loc_BC7D8:
mov rax, rdi
mov edx, esi
pop rcx
retn
loc_BC7DF:
lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aXF0; "x.f != 0"
mov esi, 42A1h
xor eax, eax
call _ggml_abort
mov rdi, rax
call __clang_call_terminate
|
long long nlohmann::json_abi_v3_11_3::detail::dtoa_impl::diyfp::normalize(long long a1, int a2)
{
void *v3; // rax
if ( !a1 )
{
ggml_abort(
"/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp",
17057LL,
"GGML_ASSERT(%s) failed",
"x.f != 0");
_clang_call_terminate(v3);
}
for ( ; a1 >= 0; --a2 )
a1 *= 2LL;
return a1;
}
|
normalize:
PUSH RAX
TEST RDI,RDI
JZ 0x001bc7df
JS 0x001bc7d8
LAB_001bc7ce:
ADD RDI,RDI
DEC ESI
TEST RDI,RDI
JNS 0x001bc7ce
LAB_001bc7d8:
MOV RAX,RDI
MOV EDX,ESI
POP RCX
RET
LAB_001bc7df:
LEA RDI,[0x1f0b99]
LEA RDX,[0x1ea5f5]
LEA RCX,[0x1f62f8]
MOV ESI,0x42a1
XOR EAX,EAX
CALL 0x0011bfb0
|
/* nlohmann::json_abi_v3_11_3::detail::dtoa_impl::diyfp::normalize(nlohmann::json_abi_v3_11_3::detail::dtoa_impl::diyfp)
*/
int1 [16] __thiscall
nlohmann::json_abi_v3_11_3::detail::dtoa_impl::diyfp::normalize(diyfp *this,int param_2)
{
int1 auVar1 [16];
if (this != (diyfp *)0x0) {
if (-1 < (long)this) {
do {
this = (diyfp *)((long)this * 2);
param_2 = param_2 + -1;
} while (-1 < (long)this);
}
auVar1._8_4_ = param_2;
auVar1._0_8_ = this;
auVar1._12_4_ = 0;
return auVar1;
}
/* try { // try from 001bc7df to 001bc7ff has its CatchHandler @ 001bc800 */
/* WARNING: Subroutine does not return */
ggml_abort("/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp",0x42a1,
"GGML_ASSERT(%s) failed","x.f != 0");
}
|
|
8,924 |
common_log::common_log(unsigned long)
|
monkey531[P]llama/common/log.cpp
|
common_log(size_t capacity) {
file = nullptr;
prefix = false;
timestamps = false;
running = false;
t_start = t_us();
// initial message size - will be expanded if longer messages arrive
entries.resize(capacity);
for (auto & entry : entries) {
entry.msg.resize(256);
}
head = 0;
tail = 0;
resume();
}
|
O3
|
cpp
|
common_log::common_log(unsigned long):
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rsi, %r12
movq %rdi, %rbx
leaq 0x30(%rdi), %r14
xorps %xmm0, %xmm0
movups %xmm0, 0x20(%rdi)
movups %xmm0, 0x10(%rdi)
movups %xmm0, (%rdi)
movq %r14, %rdi
callq 0x1bc90
leaq 0x78(%rbx), %r15
xorl %eax, %eax
movq %rax, 0x88(%rbx)
xorps %xmm0, %xmm0
movups %xmm0, 0x78(%rbx)
movups %xmm0, 0xb0(%rbx)
movq %rax, 0xc0(%rbx)
movq %rax, 0x60(%rbx)
movl $0x0, 0x67(%rbx)
callq 0x1b0a0
movabsq $0x20c49ba5e353f7cf, %rcx # imm = 0x20C49BA5E353F7CF
imulq %rcx
movq %rdx, %rax
shrq $0x3f, %rax
sarq $0x7, %rdx
addq %rax, %rdx
movq %rdx, 0x70(%rbx)
movq %r15, %rdi
movq %r12, %rsi
callq 0xda0e8
movq 0x78(%rbx), %r12
movq 0x80(%rbx), %r13
cmpq %r13, %r12
je 0xda084
leaq 0x10(%r12), %rdi
movl $0x100, %esi # imm = 0x100
callq 0x8c5d4
addq $0x30, %r12
jmp 0xda06a
xorps %xmm0, %xmm0
movups %xmm0, 0x90(%rbx)
movq %rbx, %rdi
callq 0xd9b06
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
jmp 0xda0a2
movq %rax, %r12
leaq 0xb0(%rbx), %rax
movq (%rax), %rdi
testq %rdi, %rdi
je 0xda0c3
movq 0xc0(%rbx), %rsi
subq %rdi, %rsi
callq 0x1b8f0
movq %r15, %rdi
callq 0xda12a
movq %r14, %rdi
callq 0x1c0a0
cmpq $0x0, 0x28(%rbx)
jne 0xda0e2
movq %r12, %rdi
callq 0x1c020
callq 0x1b210
nop
|
_ZN10common_logC2Em:
push r15
push r14
push r13
push r12
push rbx
mov r12, rsi
mov rbx, rdi
lea r14, [rdi+30h]
xorps xmm0, xmm0
movups xmmword ptr [rdi+20h], xmm0
movups xmmword ptr [rdi+10h], xmm0
movups xmmword ptr [rdi], xmm0
mov rdi, r14; this
call __ZNSt18condition_variableC1Ev; std::condition_variable::condition_variable(void)
lea r15, [rbx+78h]
xor eax, eax
mov [rbx+88h], rax
xorps xmm0, xmm0
movups xmmword ptr [rbx+78h], xmm0
movups xmmword ptr [rbx+0B0h], xmm0
mov [rbx+0C0h], rax
mov [rbx+60h], rax
mov dword ptr [rbx+67h], 0
call __ZNSt6chrono3_V212system_clock3nowEv; std::chrono::_V2::system_clock::now(void)
mov rcx, 20C49BA5E353F7CFh
imul rcx
mov rax, rdx
shr rax, 3Fh
sar rdx, 7
add rdx, rax
mov [rbx+70h], rdx
mov rdi, r15
mov rsi, r12
call _ZNSt6vectorI16common_log_entrySaIS0_EE6resizeEm; std::vector<common_log_entry>::resize(ulong)
mov r12, [rbx+78h]
mov r13, [rbx+80h]
loc_DA06A:
cmp r12, r13
jz short loc_DA084
lea rdi, [r12+10h]
mov esi, 100h
call _ZNSt6vectorIcSaIcEE6resizeEm; std::vector<char>::resize(ulong)
add r12, 30h ; '0'
jmp short loc_DA06A
loc_DA084:
xorps xmm0, xmm0
movups xmmword ptr [rbx+90h], xmm0
mov rdi, rbx; this
call _ZN10common_log6resumeEv; common_log::resume(void)
pop rbx
pop r12
pop r13
pop r14
pop r15
retn
jmp short $+2
loc_DA0A2:
mov r12, rax
lea rax, [rbx+0B0h]
mov rdi, [rax]; void *
test rdi, rdi
jz short loc_DA0C3
mov rsi, [rbx+0C0h]
sub rsi, rdi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_DA0C3:
mov rdi, r15
call _ZNSt6vectorI16common_log_entrySaIS0_EED2Ev; std::vector<common_log_entry>::~vector()
mov rdi, r14; this
call __ZNSt18condition_variableD1Ev; std::condition_variable::~condition_variable()
cmp qword ptr [rbx+28h], 0
jnz short loc_DA0E2
mov rdi, r12
call __Unwind_Resume
loc_DA0E2:
call __ZSt9terminatev; std::terminate(void)
|
void common_log::common_log(common_log *this, long long a2)
{
std::condition_variable *v3; // rdi
long long v4; // r12
long long v5; // r13
*((_OWORD *)this + 2) = 0LL;
*((_OWORD *)this + 1) = 0LL;
*(_OWORD *)this = 0LL;
v3 = (common_log *)((char *)this + 48);
std::condition_variable::condition_variable(v3);
*((_QWORD *)this + 17) = 0LL;
*(_OWORD *)((char *)this + 120) = 0LL;
*((_OWORD *)this + 11) = 0LL;
*((_QWORD *)this + 24) = 0LL;
*((_QWORD *)this + 12) = 0LL;
*(_DWORD *)((char *)this + 103) = 0;
*((_QWORD *)this + 14) = std::chrono::_V2::system_clock::now(v3) / 1000LL;
std::vector<common_log_entry>::resize((char *)this + 120, a2);
v4 = *((_QWORD *)this + 15);
v5 = *((_QWORD *)this + 16);
while ( v4 != v5 )
{
std::vector<char>::resize((_QWORD *)(v4 + 16), 0x100uLL);
v4 += 48LL;
}
*((_OWORD *)this + 9) = 0LL;
common_log::resume(this);
}
|
common_log:
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
MOV R12,RSI
MOV RBX,RDI
LEA R14,[RDI + 0x30]
XORPS XMM0,XMM0
MOVUPS xmmword ptr [RDI + 0x20],XMM0
MOVUPS xmmword ptr [RDI + 0x10],XMM0
MOVUPS xmmword ptr [RDI],XMM0
MOV RDI,R14
CALL 0x0011bc90
LEA R15,[RBX + 0x78]
XOR EAX,EAX
MOV qword ptr [RBX + 0x88],RAX
XORPS XMM0,XMM0
MOVUPS xmmword ptr [RBX + 0x78],XMM0
MOVUPS xmmword ptr [RBX + 0xb0],XMM0
MOV qword ptr [RBX + 0xc0],RAX
MOV qword ptr [RBX + 0x60],RAX
MOV dword ptr [RBX + 0x67],0x0
CALL 0x0011b0a0
MOV RCX,0x20c49ba5e353f7cf
IMUL RCX
MOV RAX,RDX
SHR RAX,0x3f
SAR RDX,0x7
ADD RDX,RAX
MOV qword ptr [RBX + 0x70],RDX
LAB_001da054:
MOV RDI,R15
MOV RSI,R12
CALL 0x001da0e8
MOV R12,qword ptr [RBX + 0x78]
MOV R13,qword ptr [RBX + 0x80]
LAB_001da06a:
CMP R12,R13
JZ 0x001da084
LEA RDI,[R12 + 0x10]
LAB_001da074:
MOV ESI,0x100
CALL 0x0018c5d4
ADD R12,0x30
JMP 0x001da06a
LAB_001da084:
XORPS XMM0,XMM0
MOVUPS xmmword ptr [RBX + 0x90],XMM0
LAB_001da08e:
MOV RDI,RBX
CALL 0x001d9b06
LAB_001da096:
POP RBX
POP R12
POP R13
POP R14
POP R15
RET
|
/* common_log::common_log(unsigned long) */
void __thiscall common_log::common_log(common_log *this,ulong param_1)
{
long lVar1;
long lVar2;
*(int8 *)(this + 0x20) = 0;
*(int8 *)(this + 0x28) = 0;
*(int8 *)(this + 0x10) = 0;
*(int8 *)(this + 0x18) = 0;
*(int8 *)this = 0;
*(int8 *)(this + 8) = 0;
std::condition_variable::condition_variable((condition_variable *)(this + 0x30));
*(int8 *)(this + 0x88) = 0;
*(int8 *)(this + 0x78) = 0;
*(int8 *)(this + 0x80) = 0;
*(int8 *)(this + 0xb0) = 0;
*(int8 *)(this + 0xb8) = 0;
*(int8 *)(this + 0xc0) = 0;
*(int8 *)(this + 0x60) = 0;
*(int4 *)(this + 0x67) = 0;
lVar2 = std::chrono::_V2::system_clock::now();
*(long *)(this + 0x70) = lVar2 / 1000;
/* try { // try from 001da054 to 001da05e has its CatchHandler @ 001da0a0 */
std::vector<common_log_entry,std::allocator<common_log_entry>>::resize
((vector<common_log_entry,std::allocator<common_log_entry>> *)(this + 0x78),param_1);
lVar1 = *(long *)(this + 0x80);
for (lVar2 = *(long *)(this + 0x78); lVar2 != lVar1; lVar2 = lVar2 + 0x30) {
/* try { // try from 001da074 to 001da07d has its CatchHandler @ 001da0a2 */
std::vector<char,std::allocator<char>>::resize
((vector<char,std::allocator<char>> *)(lVar2 + 0x10),0x100);
}
*(int8 *)(this + 0x90) = 0;
*(int8 *)(this + 0x98) = 0;
/* try { // try from 001da08e to 001da095 has its CatchHandler @ 001da0a0 */
resume(this);
return;
}
|
|
8,925 |
maria_rtree_find_next
|
eloqsql/storage/maria/ma_rt_index.c
|
int maria_rtree_find_next(MARIA_HA *info, uint keynr, uint32 search_flag)
{
my_off_t root;
uint32 nod_cmp_flag;
MARIA_KEYDEF *keyinfo= info->s->keyinfo + keynr;
DBUG_ASSERT(info->last_key.keyinfo == keyinfo);
/*
At the moment index can only properly handle the
MBR_INTERSECT, so we use it for all sorts of queries.
TODO: better searsh for CONTAINS/WITHIN.
*/
search_flag= nod_cmp_flag= MBR_INTERSECT;
if (info->update & HA_STATE_DELETED)
return maria_rtree_find_first(info, &info->last_key, search_flag);
if (!info->keyread_buff_used)
{
uchar *key= info->int_keypos;
while (key < info->int_maxpos)
{
if (!maria_rtree_key_cmp(keyinfo->seg,
info->first_mbr_key, key,
info->last_rkey_length, search_flag))
{
uchar *after_key= key + keyinfo->keylength;
MARIA_KEY tmp_key;
/*
We don't need to set all MARIA_KEY elements here as
_ma_row_pos_from_key only uses a few of them.
*/
tmp_key.keyinfo= keyinfo;
tmp_key.data= key;
tmp_key.data_length= keyinfo->keylength - info->s->base.rec_reflength;
info->cur_row.lastpos= _ma_row_pos_from_key(&tmp_key);
memcpy(info->last_key.data, key, info->last_key.data_length);
if (after_key < info->int_maxpos)
info->int_keypos= after_key;
else
info->keyread_buff_used= 1;
return 0;
}
key+= keyinfo->keylength;
}
}
if ((root= info->s->state.key_root[keynr]) == HA_OFFSET_ERROR)
{
my_errno= HA_ERR_END_OF_FILE;
return -1;
}
/*
TODO better search for CONTAINS/WITHIN.
nod_cmp_flag= (((search_flag & (MBR_EQUAL | MBR_WITHIN)) ?
MBR_WITHIN : MBR_INTERSECT));
*/
return maria_rtree_find_req(info, keyinfo, search_flag, nod_cmp_flag, root,
0);
}
|
O0
|
c
|
maria_rtree_find_next:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movl %edx, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq 0x570(%rax), %rax
movl -0x14(%rbp), %ecx
imulq $0x118, %rcx, %rcx # imm = 0x118
addq %rcx, %rax
movq %rax, -0x30(%rbp)
jmp 0x75823
movl $0x400, -0x24(%rbp) # imm = 0x400
movl $0x400, -0x18(%rbp) # imm = 0x400
movq -0x10(%rbp), %rax
movl 0x624(%rax), %eax
andl $0x8, %eax
cmpl $0x0, %eax
je 0x75862
movq -0x10(%rbp), %rdi
movq -0x10(%rbp), %rsi
addq $0x200, %rsi # imm = 0x200
movl -0x18(%rbp), %edx
callq 0x75180
movl %eax, -0x4(%rbp)
jmp 0x759ee
movq -0x10(%rbp), %rax
cmpb $0x0, 0x685(%rax)
jne 0x7599e
movq -0x10(%rbp), %rax
movq 0x3b0(%rax), %rax
movq %rax, -0x38(%rbp)
movq -0x38(%rbp), %rax
movq -0x10(%rbp), %rcx
cmpq 0x3b8(%rcx), %rax
jae 0x7599c
movq -0x30(%rbp), %rax
movq 0xc0(%rax), %rdi
movq -0x10(%rbp), %rax
movq 0x398(%rax), %rsi
movq -0x38(%rbp), %rdx
movq -0x10(%rbp), %rax
movl 0x630(%rax), %ecx
movl -0x18(%rbp), %r8d
callq 0x78670
cmpl $0x0, %eax
jne 0x7597e
movq -0x38(%rbp), %rax
movq -0x30(%rbp), %rcx
movzwl 0xaa(%rcx), %ecx
movslq %ecx, %rcx
addq %rcx, %rax
movq %rax, -0x40(%rbp)
movq -0x30(%rbp), %rax
movq %rax, -0x58(%rbp)
movq -0x38(%rbp), %rax
movq %rax, -0x60(%rbp)
movq -0x30(%rbp), %rax
movzwl 0xaa(%rax), %eax
movq -0x10(%rbp), %rcx
movq (%rcx), %rcx
subl 0x3e0(%rcx), %eax
movl %eax, -0x50(%rbp)
leaq -0x60(%rbp), %rdi
callq 0x391e0
movq %rax, %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x98(%rax)
movq -0x10(%rbp), %rax
movq 0x200(%rax), %rdi
movq -0x38(%rbp), %rsi
movq -0x10(%rbp), %rax
movl 0x210(%rax), %eax
movl %eax, %edx
callq 0x29090
movq -0x40(%rbp), %rax
movq -0x10(%rbp), %rcx
cmpq 0x3b8(%rcx), %rax
jae 0x7596a
movq -0x40(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x3b0(%rax)
jmp 0x75975
movq -0x10(%rbp), %rax
movb $0x1, 0x685(%rax)
movl $0x0, -0x4(%rbp)
jmp 0x759ee
movq -0x30(%rbp), %rax
movzwl 0xaa(%rax), %ecx
movq -0x38(%rbp), %rax
movslq %ecx, %rcx
addq %rcx, %rax
movq %rax, -0x38(%rbp)
jmp 0x75882
jmp 0x7599e
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq 0x118(%rax), %rax
movl -0x14(%rbp), %ecx
movq (%rax,%rcx,8), %rax
movq %rax, -0x20(%rbp)
cmpq $-0x1, %rax
jne 0x759d1
callq 0xf7b30
movl $0x89, (%rax)
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x759ee
movq -0x10(%rbp), %rdi
movq -0x30(%rbp), %rsi
movl -0x18(%rbp), %edx
movl -0x24(%rbp), %ecx
movq -0x20(%rbp), %r8
xorl %r9d, %r9d
callq 0x75270
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x60, %rsp
popq %rbp
retq
nopw (%rax,%rax)
|
maria_rtree_find_next:
push rbp
mov rbp, rsp
sub rsp, 60h
mov [rbp+var_10], rdi
mov [rbp+var_14], esi
mov [rbp+var_18], edx
mov rax, [rbp+var_10]
mov rax, [rax]
mov rax, [rax+570h]
mov ecx, [rbp+var_14]
imul rcx, 118h
add rax, rcx
mov [rbp+var_30], rax
jmp short $+2
loc_75823:
mov [rbp+var_24], 400h
mov [rbp+var_18], 400h
mov rax, [rbp+var_10]
mov eax, [rax+624h]
and eax, 8
cmp eax, 0
jz short loc_75862
mov rdi, [rbp+var_10]
mov rsi, [rbp+var_10]
add rsi, 200h
mov edx, [rbp+var_18]
call maria_rtree_find_first
mov [rbp+var_4], eax
jmp loc_759EE
loc_75862:
mov rax, [rbp+var_10]
cmp byte ptr [rax+685h], 0
jnz loc_7599E
mov rax, [rbp+var_10]
mov rax, [rax+3B0h]
mov [rbp+var_38], rax
loc_75882:
mov rax, [rbp+var_38]
mov rcx, [rbp+var_10]
cmp rax, [rcx+3B8h]
jnb loc_7599C
mov rax, [rbp+var_30]
mov rdi, [rax+0C0h]
mov rax, [rbp+var_10]
mov rsi, [rax+398h]
mov rdx, [rbp+var_38]
mov rax, [rbp+var_10]
mov ecx, [rax+630h]
mov r8d, [rbp+var_18]
call maria_rtree_key_cmp
cmp eax, 0
jnz loc_7597E
mov rax, [rbp+var_38]
mov rcx, [rbp+var_30]
movzx ecx, word ptr [rcx+0AAh]
movsxd rcx, ecx
add rax, rcx
mov [rbp+var_40], rax
mov rax, [rbp+var_30]
mov [rbp+var_58], rax
mov rax, [rbp+var_38]
mov [rbp+var_60], rax
mov rax, [rbp+var_30]
movzx eax, word ptr [rax+0AAh]
mov rcx, [rbp+var_10]
mov rcx, [rcx]
sub eax, [rcx+3E0h]
mov [rbp+var_50], eax
lea rdi, [rbp+var_60]
call _ma_row_pos_from_key
mov rcx, rax
mov rax, [rbp+var_10]
mov [rax+98h], rcx
mov rax, [rbp+var_10]
mov rdi, [rax+200h]
mov rsi, [rbp+var_38]
mov rax, [rbp+var_10]
mov eax, [rax+210h]
mov edx, eax
call _memcpy
mov rax, [rbp+var_40]
mov rcx, [rbp+var_10]
cmp rax, [rcx+3B8h]
jnb short loc_7596A
mov rcx, [rbp+var_40]
mov rax, [rbp+var_10]
mov [rax+3B0h], rcx
jmp short loc_75975
loc_7596A:
mov rax, [rbp+var_10]
mov byte ptr [rax+685h], 1
loc_75975:
mov [rbp+var_4], 0
jmp short loc_759EE
loc_7597E:
mov rax, [rbp+var_30]
movzx ecx, word ptr [rax+0AAh]
mov rax, [rbp+var_38]
movsxd rcx, ecx
add rax, rcx
mov [rbp+var_38], rax
jmp loc_75882
loc_7599C:
jmp short $+2
loc_7599E:
mov rax, [rbp+var_10]
mov rax, [rax]
mov rax, [rax+118h]
mov ecx, [rbp+var_14]
mov rax, [rax+rcx*8]
mov [rbp+var_20], rax
cmp rax, 0FFFFFFFFFFFFFFFFh
jnz short loc_759D1
call _my_thread_var
mov dword ptr [rax], 89h
mov [rbp+var_4], 0FFFFFFFFh
jmp short loc_759EE
loc_759D1:
mov rdi, [rbp+var_10]
mov rsi, [rbp+var_30]
mov edx, [rbp+var_18]
mov ecx, [rbp+var_24]
mov r8, [rbp+var_20]
xor r9d, r9d
call maria_rtree_find_req
mov [rbp+var_4], eax
loc_759EE:
mov eax, [rbp+var_4]
add rsp, 60h
pop rbp
retn
|
long long maria_rtree_find_next(_DWORD *a1, const char *a2, unsigned int a3)
{
long long v3; // rax
_QWORD v5[2]; // [rsp+0h] [rbp-60h] BYREF
int v6; // [rsp+10h] [rbp-50h]
unsigned long long v7; // [rsp+20h] [rbp-40h]
unsigned long long i; // [rsp+28h] [rbp-38h]
long long v9; // [rsp+30h] [rbp-30h]
unsigned int v10; // [rsp+3Ch] [rbp-24h]
unsigned long long v11; // [rsp+40h] [rbp-20h]
unsigned int v12; // [rsp+48h] [rbp-18h]
unsigned int v13; // [rsp+4Ch] [rbp-14h]
_DWORD *v14; // [rsp+50h] [rbp-10h]
v14 = a1;
v13 = (unsigned int)a2;
v12 = a3;
v9 = 280LL * (unsigned int)a2 + *(_QWORD *)(*(_QWORD *)a1 + 1392LL);
v10 = 1024;
v12 = 1024;
if ( (a1[393] & 8) != 0 )
{
return (unsigned int)maria_rtree_find_first((long long)v14, (const char *)v14 + 512);
}
else
{
if ( !*((_BYTE *)v14 + 1669) )
{
for ( i = *((_QWORD *)v14 + 118); i < *((_QWORD *)v14 + 119); i += *(unsigned __int16 *)(v9 + 170) )
{
a1 = *(_DWORD **)(v9 + 192);
a2 = (const char *)*((_QWORD *)v14 + 115);
if ( !(unsigned int)maria_rtree_key_cmp(a1, a2, i, (unsigned int)v14[396], v12) )
{
v7 = *(unsigned __int16 *)(v9 + 170) + i;
v5[1] = v9;
v5[0] = i;
v6 = *(unsigned __int16 *)(v9 + 170) - *(_DWORD *)(*(_QWORD *)v14 + 992LL);
v3 = ma_row_pos_from_key((long long)v5);
*((_QWORD *)v14 + 19) = v3;
memcpy(*((_QWORD *)v14 + 64), i, (unsigned int)v14[132]);
if ( v7 >= *((_QWORD *)v14 + 119) )
*((_BYTE *)v14 + 1669) = 1;
else
*((_QWORD *)v14 + 118) = v7;
return 0;
}
}
}
v11 = *(_QWORD *)(*(_QWORD *)(*(_QWORD *)v14 + 280LL) + 8LL * v13);
if ( v11 == -1LL )
{
*(_DWORD *)my_thread_var(a1, a2) = 137;
return (unsigned int)-1;
}
else
{
return (unsigned int)maria_rtree_find_req((long long)v14, v9, v12, v10, v11, 0);
}
}
}
|
maria_rtree_find_next:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x60
MOV qword ptr [RBP + -0x10],RDI
MOV dword ptr [RBP + -0x14],ESI
MOV dword ptr [RBP + -0x18],EDX
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX]
MOV RAX,qword ptr [RAX + 0x570]
MOV ECX,dword ptr [RBP + -0x14]
IMUL RCX,RCX,0x118
ADD RAX,RCX
MOV qword ptr [RBP + -0x30],RAX
JMP 0x00175823
LAB_00175823:
MOV dword ptr [RBP + -0x24],0x400
MOV dword ptr [RBP + -0x18],0x400
MOV RAX,qword ptr [RBP + -0x10]
MOV EAX,dword ptr [RAX + 0x624]
AND EAX,0x8
CMP EAX,0x0
JZ 0x00175862
MOV RDI,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RBP + -0x10]
ADD RSI,0x200
MOV EDX,dword ptr [RBP + -0x18]
CALL 0x00175180
MOV dword ptr [RBP + -0x4],EAX
JMP 0x001759ee
LAB_00175862:
MOV RAX,qword ptr [RBP + -0x10]
CMP byte ptr [RAX + 0x685],0x0
JNZ 0x0017599e
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x3b0]
MOV qword ptr [RBP + -0x38],RAX
LAB_00175882:
MOV RAX,qword ptr [RBP + -0x38]
MOV RCX,qword ptr [RBP + -0x10]
CMP RAX,qword ptr [RCX + 0x3b8]
JNC 0x0017599c
MOV RAX,qword ptr [RBP + -0x30]
MOV RDI,qword ptr [RAX + 0xc0]
MOV RAX,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RAX + 0x398]
MOV RDX,qword ptr [RBP + -0x38]
MOV RAX,qword ptr [RBP + -0x10]
MOV ECX,dword ptr [RAX + 0x630]
MOV R8D,dword ptr [RBP + -0x18]
CALL 0x00178670
CMP EAX,0x0
JNZ 0x0017597e
MOV RAX,qword ptr [RBP + -0x38]
MOV RCX,qword ptr [RBP + -0x30]
MOVZX ECX,word ptr [RCX + 0xaa]
MOVSXD RCX,ECX
ADD RAX,RCX
MOV qword ptr [RBP + -0x40],RAX
MOV RAX,qword ptr [RBP + -0x30]
MOV qword ptr [RBP + -0x58],RAX
MOV RAX,qword ptr [RBP + -0x38]
MOV qword ptr [RBP + -0x60],RAX
MOV RAX,qword ptr [RBP + -0x30]
MOVZX EAX,word ptr [RAX + 0xaa]
MOV RCX,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RCX]
SUB EAX,dword ptr [RCX + 0x3e0]
MOV dword ptr [RBP + -0x50],EAX
LEA RDI,[RBP + -0x60]
CALL 0x001391e0
MOV RCX,RAX
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RAX + 0x98],RCX
MOV RAX,qword ptr [RBP + -0x10]
MOV RDI,qword ptr [RAX + 0x200]
MOV RSI,qword ptr [RBP + -0x38]
MOV RAX,qword ptr [RBP + -0x10]
MOV EAX,dword ptr [RAX + 0x210]
MOV EDX,EAX
CALL 0x00129090
MOV RAX,qword ptr [RBP + -0x40]
MOV RCX,qword ptr [RBP + -0x10]
CMP RAX,qword ptr [RCX + 0x3b8]
JNC 0x0017596a
MOV RCX,qword ptr [RBP + -0x40]
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RAX + 0x3b0],RCX
JMP 0x00175975
LAB_0017596a:
MOV RAX,qword ptr [RBP + -0x10]
MOV byte ptr [RAX + 0x685],0x1
LAB_00175975:
MOV dword ptr [RBP + -0x4],0x0
JMP 0x001759ee
LAB_0017597e:
MOV RAX,qword ptr [RBP + -0x30]
MOVZX ECX,word ptr [RAX + 0xaa]
MOV RAX,qword ptr [RBP + -0x38]
MOVSXD RCX,ECX
ADD RAX,RCX
MOV qword ptr [RBP + -0x38],RAX
JMP 0x00175882
LAB_0017599c:
JMP 0x0017599e
LAB_0017599e:
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX]
MOV RAX,qword ptr [RAX + 0x118]
MOV ECX,dword ptr [RBP + -0x14]
MOV RAX,qword ptr [RAX + RCX*0x8]
MOV qword ptr [RBP + -0x20],RAX
CMP RAX,-0x1
JNZ 0x001759d1
CALL 0x001f7b30
MOV dword ptr [RAX],0x89
MOV dword ptr [RBP + -0x4],0xffffffff
JMP 0x001759ee
LAB_001759d1:
MOV RDI,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RBP + -0x30]
MOV EDX,dword ptr [RBP + -0x18]
MOV ECX,dword ptr [RBP + -0x24]
MOV R8,qword ptr [RBP + -0x20]
XOR R9D,R9D
CALL 0x00175270
MOV dword ptr [RBP + -0x4],EAX
LAB_001759ee:
MOV EAX,dword ptr [RBP + -0x4]
ADD RSP,0x60
POP RBP
RET
|
int4 maria_rtree_find_next(long *param_1,uint param_2)
{
int iVar1;
long lVar2;
int4 *puVar3;
void *local_68;
long local_60;
int local_58;
ulong local_48;
void *local_40;
long local_38;
int4 local_2c;
long local_28;
int4 local_20;
uint local_1c;
long *local_18;
int4 local_c;
local_38 = *(long *)(*param_1 + 0x570) + (ulong)param_2 * 0x118;
local_2c = 0x400;
local_20 = 0x400;
local_1c = param_2;
local_18 = param_1;
if ((*(uint *)((long)param_1 + 0x624) & 8) == 0) {
if (*(char *)((long)param_1 + 0x685) == '\0') {
for (local_40 = (void *)param_1[0x76]; local_40 < (void *)local_18[0x77];
local_40 = (void *)((long)local_40 + (long)(int)(uint)*(ushort *)(local_38 + 0xaa))) {
iVar1 = maria_rtree_key_cmp(*(int8 *)(local_38 + 0xc0),local_18[0x73],local_40,
(int)local_18[0xc6],local_20);
if (iVar1 == 0) {
local_48 = (long)local_40 + (long)(int)(uint)*(ushort *)(local_38 + 0xaa);
local_60 = local_38;
local_68 = local_40;
local_58 = (uint)*(ushort *)(local_38 + 0xaa) - *(int *)(*local_18 + 0x3e0);
lVar2 = _ma_row_pos_from_key(&local_68);
local_18[0x13] = lVar2;
memcpy((void *)local_18[0x40],local_40,(ulong)*(uint *)(local_18 + 0x42));
if (local_48 < (ulong)local_18[0x77]) {
local_18[0x76] = local_48;
}
else {
*(int1 *)((long)local_18 + 0x685) = 1;
}
return 0;
}
}
}
local_28 = *(long *)(*(long *)(*local_18 + 0x118) + (ulong)local_1c * 8);
if (local_28 == -1) {
puVar3 = (int4 *)_my_thread_var();
*puVar3 = 0x89;
local_c = 0xffffffff;
}
else {
local_c = maria_rtree_find_req(local_18,local_38,local_20,local_2c,local_28,0);
}
}
else {
local_c = maria_rtree_find_first(param_1,param_1 + 0x40,0x400);
}
return local_c;
}
|
|
8,926 |
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>::end()
|
monkey531[P]llama/common/json.hpp
|
iterator end() noexcept
{
iterator result(this);
result.set_end();
return result;
}
|
O1
|
cpp
|
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>::end():
pushq %rbx
movq %rdi, %rbx
movabsq $-0x8000000000000000, %rax # imm = 0x8000000000000000
movq %rsi, (%rdi)
xorps %xmm0, %xmm0
movups %xmm0, 0x8(%rdi)
movq %rax, 0x18(%rdi)
movzbl (%rsi), %ecx
cmpl $0x2, %ecx
je 0x49b78
cmpl $0x1, %ecx
jne 0x49b82
leaq 0x8(%rbx), %rax
movq $0x0, (%rax)
jmp 0x49b86
movq $0x0, 0x10(%rbx)
jmp 0x49b86
movq %rax, 0x18(%rbx)
movq %rbx, %rdi
callq 0x4a31c
movq %rbx, %rax
popq %rbx
retq
nop
|
_ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE3endEv:
push rbx
mov rbx, rdi
mov rax, 8000000000000000h
mov [rdi], rsi
xorps xmm0, xmm0
movups xmmword ptr [rdi+8], xmm0
mov [rdi+18h], rax
movzx ecx, byte ptr [rsi]
cmp ecx, 2
jz short loc_49B78
cmp ecx, 1
jnz short loc_49B82
lea rax, [rbx+8]
mov qword ptr [rax], 0
jmp short loc_49B86
loc_49B78:
mov qword ptr [rbx+10h], 0
jmp short loc_49B86
loc_49B82:
mov [rbx+18h], rax
loc_49B86:
mov rdi, rbx
call _ZN8nlohmann16json_abi_v3_11_36detail9iter_implINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEE7set_endEv; 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::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>::set_end(void)
mov rax, rbx
pop rbx
retn
|
long long nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::end(
long long a1,
unsigned __int8 *a2)
{
int v2; // ecx
*(_QWORD *)a1 = a2;
*(_OWORD *)(a1 + 8) = 0LL;
*(_QWORD *)(a1 + 24) = 0x8000000000000000LL;
v2 = *a2;
if ( v2 == 2 )
{
*(_QWORD *)(a1 + 16) = 0LL;
}
else if ( v2 == 1 )
{
*(_QWORD *)(a1 + 8) = 0LL;
}
else
{
*(_QWORD *)(a1 + 24) = 0x8000000000000000LL;
}
nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<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>>::set_end(a1);
return a1;
}
|
end:
PUSH RBX
MOV RBX,RDI
MOV RAX,-0x8000000000000000
MOV qword ptr [RDI],RSI
XORPS XMM0,XMM0
MOVUPS xmmword ptr [RDI + 0x8],XMM0
MOV qword ptr [RDI + 0x18],RAX
MOVZX ECX,byte ptr [RSI]
CMP ECX,0x2
JZ 0x00149b78
CMP ECX,0x1
JNZ 0x00149b82
LEA RAX,[RBX + 0x8]
MOV qword ptr [RAX],0x0
JMP 0x00149b86
LAB_00149b78:
MOV qword ptr [RBX + 0x10],0x0
JMP 0x00149b86
LAB_00149b82:
MOV qword ptr [RBX + 0x18],RAX
LAB_00149b86:
MOV RDI,RBX
CALL 0x0014a31c
MOV RAX,RBX
POP RBX
RET
|
/* nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector,
std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void>::end() */
void nlohmann::json_abi_v3_11_3::
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::end(void)
{
char *in_RSI;
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>>
*in_RDI;
*(char **)in_RDI = in_RSI;
*(int8 *)(in_RDI + 8) = 0;
*(int8 *)(in_RDI + 0x10) = 0;
*(int8 *)(in_RDI + 0x18) = 0x8000000000000000;
if (*in_RSI == '\x02') {
*(int8 *)(in_RDI + 0x10) = 0;
}
else if (*in_RSI == '\x01') {
*(int8 *)(in_RDI + 8) = 0;
}
else {
*(int8 *)(in_RDI + 0x18) = 0x8000000000000000;
}
detail::
iter_impl<nlohmann::json_abi_v3_11_3::basic_json<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>>
::set_end(in_RDI);
return;
}
|
|
8,927 |
bitmap_intersect
|
eloqsql/mysys/my_bitmap.c
|
void bitmap_intersect(MY_BITMAP *map, const MY_BITMAP *map2)
{
my_bitmap_map *to= map->bitmap, *from= map2->bitmap, *end;
uint len= no_words_in_map(map), len2 = no_words_in_map(map2);
DBUG_ASSERT(map->bitmap);
DBUG_ASSERT(map2->bitmap);
end= to+MY_MIN(len,len2);
while (to < end)
*to++ &= *from++;
if (len2 <= len)
{
to[-1]&= ~map2->last_word_mask; /* Clear last not relevant bits */
end+= len-len2;
while (to < end)
*to++= 0;
}
}
|
O0
|
c
|
bitmap_intersect:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x20(%rbp)
movq -0x8(%rbp), %rax
movl 0x1c(%rax), %eax
addl $0x1f, %eax
shrl $0x5, %eax
movl %eax, -0x2c(%rbp)
movq -0x10(%rbp), %rax
movl 0x1c(%rax), %eax
addl $0x1f, %eax
shrl $0x5, %eax
movl %eax, -0x30(%rbp)
jmp 0xf09b4
jmp 0xf09b6
jmp 0xf09b8
movq -0x18(%rbp), %rax
movq %rax, -0x38(%rbp)
movl -0x2c(%rbp), %eax
cmpl -0x30(%rbp), %eax
jae 0xf09d0
movl -0x2c(%rbp), %eax
movl %eax, -0x3c(%rbp)
jmp 0xf09d6
movl -0x30(%rbp), %eax
movl %eax, -0x3c(%rbp)
movq -0x38(%rbp), %rax
movl -0x3c(%rbp), %ecx
movl %ecx, %ecx
shlq $0x2, %rcx
addq %rcx, %rax
movq %rax, -0x28(%rbp)
movq -0x18(%rbp), %rax
cmpq -0x28(%rbp), %rax
jae 0xf0a1a
movq -0x20(%rbp), %rax
movq %rax, %rcx
addq $0x4, %rcx
movq %rcx, -0x20(%rbp)
movl (%rax), %ecx
movq -0x18(%rbp), %rax
movq %rax, %rdx
addq $0x4, %rdx
movq %rdx, -0x18(%rbp)
andl (%rax), %ecx
movl %ecx, (%rax)
jmp 0xf09ea
movl -0x30(%rbp), %eax
cmpl -0x2c(%rbp), %eax
ja 0xf0a70
movq -0x10(%rbp), %rax
movl 0x18(%rax), %ecx
xorl $-0x1, %ecx
movq -0x18(%rbp), %rax
andl -0x4(%rax), %ecx
movl %ecx, -0x4(%rax)
movl -0x2c(%rbp), %ecx
subl -0x30(%rbp), %ecx
movq -0x28(%rbp), %rax
movl %ecx, %ecx
shlq $0x2, %rcx
addq %rcx, %rax
movq %rax, -0x28(%rbp)
movq -0x18(%rbp), %rax
cmpq -0x28(%rbp), %rax
jae 0xf0a6e
movq -0x18(%rbp), %rax
movq %rax, %rcx
addq $0x4, %rcx
movq %rcx, -0x18(%rbp)
movl $0x0, (%rax)
jmp 0xf0a4d
jmp 0xf0a70
popq %rbp
retq
nopw %cs:(%rax,%rax)
|
bitmap_intersect:
push rbp
mov rbp, rsp
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov rax, [rbp+var_8]
mov rax, [rax]
mov [rbp+var_18], rax
mov rax, [rbp+var_10]
mov rax, [rax]
mov [rbp+var_20], rax
mov rax, [rbp+var_8]
mov eax, [rax+1Ch]
add eax, 1Fh
shr eax, 5
mov [rbp+var_2C], eax
mov rax, [rbp+var_10]
mov eax, [rax+1Ch]
add eax, 1Fh
shr eax, 5
mov [rbp+var_30], eax
jmp short $+2
loc_F09B4:
jmp short $+2
loc_F09B6:
jmp short $+2
loc_F09B8:
mov rax, [rbp+var_18]
mov [rbp+var_38], rax
mov eax, [rbp+var_2C]
cmp eax, [rbp+var_30]
jnb short loc_F09D0
mov eax, [rbp+var_2C]
mov [rbp+var_3C], eax
jmp short loc_F09D6
loc_F09D0:
mov eax, [rbp+var_30]
mov [rbp+var_3C], eax
loc_F09D6:
mov rax, [rbp+var_38]
mov ecx, [rbp+var_3C]
mov ecx, ecx
shl rcx, 2
add rax, rcx
mov [rbp+var_28], rax
loc_F09EA:
mov rax, [rbp+var_18]
cmp rax, [rbp+var_28]
jnb short loc_F0A1A
mov rax, [rbp+var_20]
mov rcx, rax
add rcx, 4
mov [rbp+var_20], rcx
mov ecx, [rax]
mov rax, [rbp+var_18]
mov rdx, rax
add rdx, 4
mov [rbp+var_18], rdx
and ecx, [rax]
mov [rax], ecx
jmp short loc_F09EA
loc_F0A1A:
mov eax, [rbp+var_30]
cmp eax, [rbp+var_2C]
ja short loc_F0A70
mov rax, [rbp+var_10]
mov ecx, [rax+18h]
xor ecx, 0FFFFFFFFh
mov rax, [rbp+var_18]
and ecx, [rax-4]
mov [rax-4], ecx
mov ecx, [rbp+var_2C]
sub ecx, [rbp+var_30]
mov rax, [rbp+var_28]
mov ecx, ecx
shl rcx, 2
add rax, rcx
mov [rbp+var_28], rax
loc_F0A4D:
mov rax, [rbp+var_18]
cmp rax, [rbp+var_28]
jnb short loc_F0A6E
mov rax, [rbp+var_18]
mov rcx, rax
add rcx, 4
mov [rbp+var_18], rcx
mov dword ptr [rax], 0
jmp short loc_F0A4D
loc_F0A6E:
jmp short $+2
loc_F0A70:
pop rbp
retn
|
_DWORD * bitmap_intersect(long long a1, long long a2)
{
int *v2; // rax
int v3; // ecx
_DWORD *v4; // rax
_DWORD *result; // rax
_DWORD *v6; // rax
unsigned int v7; // [rsp+0h] [rbp-3Ch]
unsigned int v8; // [rsp+Ch] [rbp-30h]
unsigned int v9; // [rsp+10h] [rbp-2Ch]
unsigned long long v10; // [rsp+14h] [rbp-28h]
unsigned long long v11; // [rsp+14h] [rbp-28h]
int *v12; // [rsp+1Ch] [rbp-20h]
_DWORD *v13; // [rsp+24h] [rbp-18h]
v13 = *(_DWORD **)a1;
v12 = *(int **)a2;
v9 = (unsigned int)(*(_DWORD *)(a1 + 28) + 31) >> 5;
v8 = (unsigned int)(*(_DWORD *)(a2 + 28) + 31) >> 5;
if ( v9 >= v8 )
v7 = (unsigned int)(*(_DWORD *)(a2 + 28) + 31) >> 5;
else
v7 = (unsigned int)(*(_DWORD *)(a1 + 28) + 31) >> 5;
v10 = 4LL * v7 + *(_QWORD *)a1;
while ( (unsigned long long)v13 < v10 )
{
v2 = v12++;
v3 = *v2;
v4 = v13++;
*v4 &= v3;
}
result = (_DWORD *)v8;
if ( v8 <= v9 )
{
*(v13 - 1) &= ~*(_DWORD *)(a2 + 24);
v11 = 4LL * (v9 - v8) + v10;
while ( 1 )
{
result = v13;
if ( (unsigned long long)v13 >= v11 )
break;
v6 = v13++;
*v6 = 0;
}
}
return result;
}
|
bitmap_intersect:
PUSH RBP
MOV RBP,RSP
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x18],RAX
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x20],RAX
MOV RAX,qword ptr [RBP + -0x8]
MOV EAX,dword ptr [RAX + 0x1c]
ADD EAX,0x1f
SHR EAX,0x5
MOV dword ptr [RBP + -0x2c],EAX
MOV RAX,qword ptr [RBP + -0x10]
MOV EAX,dword ptr [RAX + 0x1c]
ADD EAX,0x1f
SHR EAX,0x5
MOV dword ptr [RBP + -0x30],EAX
JMP 0x001f09b4
LAB_001f09b4:
JMP 0x001f09b6
LAB_001f09b6:
JMP 0x001f09b8
LAB_001f09b8:
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RBP + -0x38],RAX
MOV EAX,dword ptr [RBP + -0x2c]
CMP EAX,dword ptr [RBP + -0x30]
JNC 0x001f09d0
MOV EAX,dword ptr [RBP + -0x2c]
MOV dword ptr [RBP + -0x3c],EAX
JMP 0x001f09d6
LAB_001f09d0:
MOV EAX,dword ptr [RBP + -0x30]
MOV dword ptr [RBP + -0x3c],EAX
LAB_001f09d6:
MOV RAX,qword ptr [RBP + -0x38]
MOV ECX,dword ptr [RBP + -0x3c]
MOV ECX,ECX
SHL RCX,0x2
ADD RAX,RCX
MOV qword ptr [RBP + -0x28],RAX
LAB_001f09ea:
MOV RAX,qword ptr [RBP + -0x18]
CMP RAX,qword ptr [RBP + -0x28]
JNC 0x001f0a1a
MOV RAX,qword ptr [RBP + -0x20]
MOV RCX,RAX
ADD RCX,0x4
MOV qword ptr [RBP + -0x20],RCX
MOV ECX,dword ptr [RAX]
MOV RAX,qword ptr [RBP + -0x18]
MOV RDX,RAX
ADD RDX,0x4
MOV qword ptr [RBP + -0x18],RDX
AND ECX,dword ptr [RAX]
MOV dword ptr [RAX],ECX
JMP 0x001f09ea
LAB_001f0a1a:
MOV EAX,dword ptr [RBP + -0x30]
CMP EAX,dword ptr [RBP + -0x2c]
JA 0x001f0a70
MOV RAX,qword ptr [RBP + -0x10]
MOV ECX,dword ptr [RAX + 0x18]
XOR ECX,0xffffffff
MOV RAX,qword ptr [RBP + -0x18]
AND ECX,dword ptr [RAX + -0x4]
MOV dword ptr [RAX + -0x4],ECX
MOV ECX,dword ptr [RBP + -0x2c]
SUB ECX,dword ptr [RBP + -0x30]
MOV RAX,qword ptr [RBP + -0x28]
MOV ECX,ECX
SHL RCX,0x2
ADD RAX,RCX
MOV qword ptr [RBP + -0x28],RAX
LAB_001f0a4d:
MOV RAX,qword ptr [RBP + -0x18]
CMP RAX,qword ptr [RBP + -0x28]
JNC 0x001f0a6e
MOV RAX,qword ptr [RBP + -0x18]
MOV RCX,RAX
ADD RCX,0x4
MOV qword ptr [RBP + -0x18],RCX
MOV dword ptr [RAX],0x0
JMP 0x001f0a4d
LAB_001f0a6e:
JMP 0x001f0a70
LAB_001f0a70:
POP RBP
RET
|
void bitmap_intersect(int8 *param_1,int8 *param_2)
{
uint uVar1;
uint uVar2;
uint *puVar3;
uint local_44;
uint *local_28;
uint *local_20;
uVar1 = *(int *)((long)param_1 + 0x1c) + 0x1fU >> 5;
uVar2 = *(int *)((long)param_2 + 0x1c) + 0x1fU >> 5;
local_44 = uVar2;
if (uVar1 < uVar2) {
local_44 = uVar1;
}
puVar3 = (uint *)*param_1 + local_44;
local_28 = (uint *)*param_2;
local_20 = (uint *)*param_1;
while (local_20 < puVar3) {
*local_20 = *local_28 & *local_20;
local_28 = local_28 + 1;
local_20 = local_20 + 1;
}
if (uVar2 <= uVar1) {
local_20[-1] = (*(uint *)(param_2 + 3) ^ 0xffffffff) & local_20[-1];
while (local_20 < puVar3 + (uVar1 - uVar2)) {
*local_20 = 0;
local_20 = local_20 + 1;
}
}
return;
}
|
|
8,928 |
send_change_user_packet
|
eloqsql/libmariadb/plugins/auth/my_auth.c
|
static int send_change_user_packet(MCPVIO_EXT *mpvio,
const uchar *data, int data_len)
{
MYSQL *mysql= mpvio->mysql;
char *buff, *end;
int res= 1;
size_t conn_attr_len= (mysql->options.extension) ?
mysql->options.extension->connect_attrs_len : 0;
buff= malloc(USERNAME_LENGTH+1 + data_len+1 + NAME_LEN+1 + 2 + NAME_LEN+1 + 9 + conn_attr_len);
end= ma_strmake(buff, mysql->user, USERNAME_LENGTH) + 1;
if (!data_len)
*end++= 0;
else
{
if (mysql->client_flag & CLIENT_SECURE_CONNECTION)
{
DBUG_ASSERT(data_len <= 255);
if (data_len > 255)
{
my_set_error(mysql, CR_MALFORMED_PACKET, SQLSTATE_UNKNOWN, 0);
goto error;
}
*end++= data_len;
}
else
{
DBUG_ASSERT(data_len == SCRAMBLE_LENGTH_323 + 1);
DBUG_ASSERT(data[SCRAMBLE_LENGTH_323] == 0);
}
memcpy(end, data, data_len);
end+= data_len;
}
end= ma_strmake(end, mpvio->db ? mpvio->db : "", NAME_LEN) + 1;
if (mysql->server_capabilities & CLIENT_PROTOCOL_41)
{
int2store(end, (ushort) mysql->charset->nr);
end+= 2;
}
if (mysql->server_capabilities & CLIENT_PLUGIN_AUTH)
end= ma_strmake(end, mpvio->plugin->name, NAME_LEN) + 1;
end= ma_send_connect_attr(mysql, (unsigned char *)end);
res= ma_simple_command(mysql, COM_CHANGE_USER,
buff, (ulong)(end-buff), 1, NULL);
error:
free(buff);
return res;
}
|
O0
|
c
|
send_change_user_packet:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rax
movq %rax, -0x20(%rbp)
movl $0x1, -0x34(%rbp)
movq -0x20(%rbp), %rax
cmpq $0x0, 0x480(%rax)
je 0x40009
movq -0x20(%rbp), %rax
movq 0x480(%rax), %rax
movq 0x78(%rax), %rax
movq %rax, -0x50(%rbp)
jmp 0x40011
xorl %eax, %eax
movq %rax, -0x50(%rbp)
jmp 0x40011
movq -0x50(%rbp), %rax
movq %rax, -0x40(%rbp)
movl -0x14(%rbp), %eax
addl $0x201, %eax # imm = 0x201
addl $0x1, %eax
addl $0x100, %eax # imm = 0x100
addl $0x1, %eax
addl $0x2, %eax
addl $0x100, %eax # imm = 0x100
addl $0x1, %eax
addl $0x9, %eax
movslq %eax, %rdi
addq -0x40(%rbp), %rdi
callq 0x135b0
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rdi
movq -0x20(%rbp), %rax
movq 0x2b8(%rax), %rsi
movl $0x200, %edx # imm = 0x200
callq 0x31e50
addq $0x1, %rax
movq %rax, -0x30(%rbp)
cmpl $0x0, -0x14(%rbp)
jne 0x40085
movq -0x30(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x30(%rbp)
movb $0x0, (%rax)
jmp 0x40104
movq -0x20(%rbp), %rax
movq 0x368(%rax), %rax
andq $0x8000, %rax # imm = 0x8000
cmpq $0x0, %rax
je 0x400e0
cmpl $0xff, -0x14(%rbp)
jle 0x400c8
movq -0x20(%rbp), %rdi
leaq 0x1fdd0(%rip), %rax # 0x5fe80
movq (%rax), %rdx
movl $0x7eb, %esi # imm = 0x7EB
xorl %eax, %eax
movl %eax, %ecx
movb $0x0, %al
callq 0x15fd0
jmp 0x40213
movl -0x14(%rbp), %eax
movb %al, %cl
movq -0x30(%rbp), %rax
movq %rax, %rdx
addq $0x1, %rdx
movq %rdx, -0x30(%rbp)
movb %cl, (%rax)
jmp 0x400e2
jmp 0x400e2
movq -0x30(%rbp), %rdi
movq -0x10(%rbp), %rsi
movslq -0x14(%rbp), %rdx
callq 0x13360
movl -0x14(%rbp), %ecx
movq -0x30(%rbp), %rax
movslq %ecx, %rcx
addq %rcx, %rax
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rax
movq %rax, -0x58(%rbp)
movq -0x8(%rbp), %rax
cmpq $0x0, 0x28(%rax)
je 0x40125
movq -0x8(%rbp), %rax
movq 0x28(%rax), %rax
movq %rax, -0x60(%rbp)
jmp 0x40132
leaq 0xb5fa(%rip), %rax # 0x4b726
movq %rax, -0x60(%rbp)
jmp 0x40132
movq -0x58(%rbp), %rdi
movq -0x60(%rbp), %rsi
movl $0x100, %edx # imm = 0x100
callq 0x31e50
addq $0x1, %rax
movq %rax, -0x30(%rbp)
movq -0x20(%rbp), %rax
movq 0x370(%rax), %rax
andq $0x200, %rax # imm = 0x200
cmpq $0x0, %rax
je 0x4019e
jmp 0x40165
movq -0x20(%rbp), %rax
movq 0x2f0(%rax), %rax
movl (%rax), %eax
movzwl %ax, %eax
movl %eax, -0x44(%rbp)
movl -0x44(%rbp), %eax
movb %al, %cl
movq -0x30(%rbp), %rax
movb %cl, (%rax)
movl -0x44(%rbp), %eax
shrl $0x8, %eax
movb %al, %cl
movq -0x30(%rbp), %rax
movb %cl, 0x1(%rax)
movq -0x30(%rbp), %rax
addq $0x2, %rax
movq %rax, -0x30(%rbp)
movq -0x20(%rbp), %rax
movq 0x370(%rax), %rax
andq $0x80000, %rax # imm = 0x80000
cmpq $0x0, %rax
je 0x401d7
movq -0x30(%rbp), %rdi
movq -0x8(%rbp), %rax
movq 0x20(%rax), %rax
movq 0x8(%rax), %rsi
movl $0x100, %edx # imm = 0x100
callq 0x31e50
addq $0x1, %rax
movq %rax, -0x30(%rbp)
movq -0x20(%rbp), %rdi
movq -0x30(%rbp), %rsi
callq 0x1ac70
movq %rax, -0x30(%rbp)
movq -0x20(%rbp), %rdi
movq -0x28(%rbp), %rdx
movq -0x30(%rbp), %rcx
movq -0x28(%rbp), %rax
subq %rax, %rcx
movl $0x11, %esi
movl $0x1, %r8d
xorl %eax, %eax
movl %eax, %r9d
callq 0x16e20
movl %eax, -0x34(%rbp)
movq -0x28(%rbp), %rdi
callq 0x13520
movl -0x34(%rbp), %eax
addq $0x60, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
|
send_change_user_packet:
push rbp
mov rbp, rsp
sub rsp, 60h
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov [rbp+var_14], edx
mov rax, [rbp+var_8]
mov rax, [rax+18h]
mov [rbp+var_20], rax
mov [rbp+var_34], 1
mov rax, [rbp+var_20]
cmp qword ptr [rax+480h], 0
jz short loc_40009
mov rax, [rbp+var_20]
mov rax, [rax+480h]
mov rax, [rax+78h]
mov [rbp+var_50], rax
jmp short loc_40011
loc_40009:
xor eax, eax
mov [rbp+var_50], rax
jmp short $+2
loc_40011:
mov rax, [rbp+var_50]
mov [rbp+var_40], rax
mov eax, [rbp+var_14]
add eax, 201h
add eax, 1
add eax, 100h
add eax, 1
add eax, 2
add eax, 100h
add eax, 1
add eax, 9
movsxd rdi, eax
add rdi, [rbp+var_40]
call _malloc
mov [rbp+var_28], rax
mov rdi, [rbp+var_28]
mov rax, [rbp+var_20]
mov rsi, [rax+2B8h]
mov edx, 200h
call ma_strmake
add rax, 1
mov [rbp+var_30], rax
cmp [rbp+var_14], 0
jnz short loc_40085
mov rax, [rbp+var_30]
mov rcx, rax
add rcx, 1
mov [rbp+var_30], rcx
mov byte ptr [rax], 0
jmp short loc_40104
loc_40085:
mov rax, [rbp+var_20]
mov rax, [rax+368h]
and rax, 8000h
cmp rax, 0
jz short loc_400E0
cmp [rbp+var_14], 0FFh
jle short loc_400C8
mov rdi, [rbp+var_20]
lea rax, SQLSTATE_UNKNOWN
mov rdx, [rax]
mov esi, 7EBh
xor eax, eax
mov ecx, eax
mov al, 0
call my_set_error
jmp loc_40213
loc_400C8:
mov eax, [rbp+var_14]
mov cl, al
mov rax, [rbp+var_30]
mov rdx, rax
add rdx, 1
mov [rbp+var_30], rdx
mov [rax], cl
jmp short loc_400E2
loc_400E0:
jmp short $+2
loc_400E2:
mov rdi, [rbp+var_30]
mov rsi, [rbp+var_10]
movsxd rdx, [rbp+var_14]
call _memcpy
mov ecx, [rbp+var_14]
mov rax, [rbp+var_30]
movsxd rcx, ecx
add rax, rcx
mov [rbp+var_30], rax
loc_40104:
mov rax, [rbp+var_30]
mov [rbp+var_58], rax
mov rax, [rbp+var_8]
cmp qword ptr [rax+28h], 0
jz short loc_40125
mov rax, [rbp+var_8]
mov rax, [rax+28h]
mov [rbp+var_60], rax
jmp short loc_40132
loc_40125:
lea rax, aExecuteTestWit+29h; ""
mov [rbp+var_60], rax
jmp short $+2
loc_40132:
mov rdi, [rbp+var_58]
mov rsi, [rbp+var_60]
mov edx, 100h
call ma_strmake
add rax, 1
mov [rbp+var_30], rax
mov rax, [rbp+var_20]
mov rax, [rax+370h]
and rax, 200h
cmp rax, 0
jz short loc_4019E
jmp short $+2
loc_40165:
mov rax, [rbp+var_20]
mov rax, [rax+2F0h]
mov eax, [rax]
movzx eax, ax
mov [rbp+var_44], eax
mov eax, [rbp+var_44]
mov cl, al
mov rax, [rbp+var_30]
mov [rax], cl
mov eax, [rbp+var_44]
shr eax, 8
mov cl, al
mov rax, [rbp+var_30]
mov [rax+1], cl
mov rax, [rbp+var_30]
add rax, 2
mov [rbp+var_30], rax
loc_4019E:
mov rax, [rbp+var_20]
mov rax, [rax+370h]
and rax, 80000h
cmp rax, 0
jz short loc_401D7
mov rdi, [rbp+var_30]
mov rax, [rbp+var_8]
mov rax, [rax+20h]
mov rsi, [rax+8]
mov edx, 100h
call ma_strmake
add rax, 1
mov [rbp+var_30], rax
loc_401D7:
mov rdi, [rbp+var_20]
mov rsi, [rbp+var_30]
call ma_send_connect_attr
mov [rbp+var_30], rax
mov rdi, [rbp+var_20]
mov rdx, [rbp+var_28]
mov rcx, [rbp+var_30]
mov rax, [rbp+var_28]
sub rcx, rax
mov esi, 11h
mov r8d, 1
xor eax, eax
mov r9d, eax
call ma_simple_command
mov [rbp+var_34], eax
loc_40213:
mov rdi, [rbp+var_28]
call _free
mov eax, [rbp+var_34]
add rsp, 60h
pop rbp
retn
|
long long send_change_user_packet(long long a1, long long a2, int a3)
{
_BYTE *v3; // rax
_BYTE *v4; // rax
_BYTE *v5; // rax
long long v7; // [rsp+10h] [rbp-50h]
__int16 v8; // [rsp+1Ch] [rbp-44h]
unsigned int v9; // [rsp+2Ch] [rbp-34h]
_BYTE *v10; // [rsp+30h] [rbp-30h]
_BYTE *v11; // [rsp+30h] [rbp-30h]
_BYTE *v12; // [rsp+30h] [rbp-30h]
long long v13; // [rsp+30h] [rbp-30h]
_BYTE *v14; // [rsp+38h] [rbp-28h]
long long v15; // [rsp+40h] [rbp-20h]
v15 = *(_QWORD *)(a1 + 24);
v9 = 1;
if ( *(_QWORD *)(v15 + 1152) )
v7 = *(_QWORD *)(*(_QWORD *)(v15 + 1152) + 120LL);
else
v7 = 0LL;
v14 = (_BYTE *)malloc(v7 + a3 + 1039);
v10 = ma_strmake(v14, *(_BYTE **)(v15 + 696), 512LL) + 1;
if ( a3 )
{
if ( (*(_QWORD *)(v15 + 872) & 0x8000LL) != 0 )
{
if ( a3 > 255 )
{
my_set_error(v15, 0x7EBu, (long long)SQLSTATE_UNKNOWN, 0LL);
goto LABEL_19;
}
v4 = v10++;
*v4 = a3;
}
memcpy(v10, a2, a3);
v11 = &v10[a3];
}
else
{
v3 = v10;
v11 = v10 + 1;
*v3 = 0;
}
if ( *(_QWORD *)(a1 + 40) )
v5 = ma_strmake(v11, *(_BYTE **)(a1 + 40), 256LL);
else
v5 = ma_strmake(v11, "", 256LL);
v12 = v5 + 1;
if ( (*(_QWORD *)(v15 + 880) & 0x200LL) != 0 )
{
v8 = **(_DWORD **)(v15 + 752);
*v12 = **(_DWORD **)(v15 + 752);
v5[2] = HIBYTE(v8);
v12 = v5 + 3;
}
if ( (*(_QWORD *)(v15 + 880) & 0x80000LL) != 0 )
v12 = ma_strmake(v12, *(_BYTE **)(*(_QWORD *)(a1 + 32) + 8LL), 256LL) + 1;
v13 = ma_send_connect_attr(v15, (long long)v12);
v9 = ma_simple_command(v15, 0x11u, (long long)v14, v13 - (_QWORD)v14, 1, 0LL);
LABEL_19:
free(v14);
return v9;
}
|
send_change_user_packet:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x60
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV dword ptr [RBP + -0x14],EDX
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX + 0x18]
MOV qword ptr [RBP + -0x20],RAX
MOV dword ptr [RBP + -0x34],0x1
MOV RAX,qword ptr [RBP + -0x20]
CMP qword ptr [RAX + 0x480],0x0
JZ 0x00140009
MOV RAX,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RAX + 0x480]
MOV RAX,qword ptr [RAX + 0x78]
MOV qword ptr [RBP + -0x50],RAX
JMP 0x00140011
LAB_00140009:
XOR EAX,EAX
MOV qword ptr [RBP + -0x50],RAX
JMP 0x00140011
LAB_00140011:
MOV RAX,qword ptr [RBP + -0x50]
MOV qword ptr [RBP + -0x40],RAX
MOV EAX,dword ptr [RBP + -0x14]
ADD EAX,0x201
ADD EAX,0x1
ADD EAX,0x100
ADD EAX,0x1
ADD EAX,0x2
ADD EAX,0x100
ADD EAX,0x1
ADD EAX,0x9
MOVSXD RDI,EAX
ADD RDI,qword ptr [RBP + -0x40]
CALL 0x001135b0
MOV qword ptr [RBP + -0x28],RAX
MOV RDI,qword ptr [RBP + -0x28]
MOV RAX,qword ptr [RBP + -0x20]
MOV RSI,qword ptr [RAX + 0x2b8]
MOV EDX,0x200
CALL 0x00131e50
ADD RAX,0x1
MOV qword ptr [RBP + -0x30],RAX
CMP dword ptr [RBP + -0x14],0x0
JNZ 0x00140085
MOV RAX,qword ptr [RBP + -0x30]
MOV RCX,RAX
ADD RCX,0x1
MOV qword ptr [RBP + -0x30],RCX
MOV byte ptr [RAX],0x0
JMP 0x00140104
LAB_00140085:
MOV RAX,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RAX + 0x368]
AND RAX,0x8000
CMP RAX,0x0
JZ 0x001400e0
CMP dword ptr [RBP + -0x14],0xff
JLE 0x001400c8
MOV RDI,qword ptr [RBP + -0x20]
LEA RAX,[0x15fe80]
MOV RDX,qword ptr [RAX]
MOV ESI,0x7eb
XOR EAX,EAX
MOV ECX,EAX
MOV AL,0x0
CALL 0x00115fd0
JMP 0x00140213
LAB_001400c8:
MOV EAX,dword ptr [RBP + -0x14]
MOV CL,AL
MOV RAX,qword ptr [RBP + -0x30]
MOV RDX,RAX
ADD RDX,0x1
MOV qword ptr [RBP + -0x30],RDX
MOV byte ptr [RAX],CL
JMP 0x001400e2
LAB_001400e0:
JMP 0x001400e2
LAB_001400e2:
MOV RDI,qword ptr [RBP + -0x30]
MOV RSI,qword ptr [RBP + -0x10]
MOVSXD RDX,dword ptr [RBP + -0x14]
CALL 0x00113360
MOV ECX,dword ptr [RBP + -0x14]
MOV RAX,qword ptr [RBP + -0x30]
MOVSXD RCX,ECX
ADD RAX,RCX
MOV qword ptr [RBP + -0x30],RAX
LAB_00140104:
MOV RAX,qword ptr [RBP + -0x30]
MOV qword ptr [RBP + -0x58],RAX
MOV RAX,qword ptr [RBP + -0x8]
CMP qword ptr [RAX + 0x28],0x0
JZ 0x00140125
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX + 0x28]
MOV qword ptr [RBP + -0x60],RAX
JMP 0x00140132
LAB_00140125:
LEA RAX,[0x14b726]
MOV qword ptr [RBP + -0x60],RAX
JMP 0x00140132
LAB_00140132:
MOV RDI,qword ptr [RBP + -0x58]
MOV RSI,qword ptr [RBP + -0x60]
MOV EDX,0x100
CALL 0x00131e50
ADD RAX,0x1
MOV qword ptr [RBP + -0x30],RAX
MOV RAX,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RAX + 0x370]
AND RAX,0x200
CMP RAX,0x0
JZ 0x0014019e
JMP 0x00140165
LAB_00140165:
MOV RAX,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RAX + 0x2f0]
MOV EAX,dword ptr [RAX]
MOVZX EAX,AX
MOV dword ptr [RBP + -0x44],EAX
MOV EAX,dword ptr [RBP + -0x44]
MOV CL,AL
MOV RAX,qword ptr [RBP + -0x30]
MOV byte ptr [RAX],CL
MOV EAX,dword ptr [RBP + -0x44]
SHR EAX,0x8
MOV CL,AL
MOV RAX,qword ptr [RBP + -0x30]
MOV byte ptr [RAX + 0x1],CL
MOV RAX,qword ptr [RBP + -0x30]
ADD RAX,0x2
MOV qword ptr [RBP + -0x30],RAX
LAB_0014019e:
MOV RAX,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RAX + 0x370]
AND RAX,0x80000
CMP RAX,0x0
JZ 0x001401d7
MOV RDI,qword ptr [RBP + -0x30]
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX + 0x20]
MOV RSI,qword ptr [RAX + 0x8]
MOV EDX,0x100
CALL 0x00131e50
ADD RAX,0x1
MOV qword ptr [RBP + -0x30],RAX
LAB_001401d7:
MOV RDI,qword ptr [RBP + -0x20]
MOV RSI,qword ptr [RBP + -0x30]
CALL 0x0011ac70
MOV qword ptr [RBP + -0x30],RAX
MOV RDI,qword ptr [RBP + -0x20]
MOV RDX,qword ptr [RBP + -0x28]
MOV RCX,qword ptr [RBP + -0x30]
MOV RAX,qword ptr [RBP + -0x28]
SUB RCX,RAX
MOV ESI,0x11
MOV R8D,0x1
XOR EAX,EAX
MOV R9D,EAX
CALL 0x00116e20
MOV dword ptr [RBP + -0x34],EAX
LAB_00140213:
MOV RDI,qword ptr [RBP + -0x28]
CALL 0x00113520
MOV EAX,dword ptr [RBP + -0x34]
ADD RSP,0x60
POP RBP
RET
|
int4 send_change_user_packet(long param_1,void *param_2,int param_3)
{
long lVar1;
uint uVar2;
void *__ptr;
long lVar3;
char *local_68;
long local_58;
int4 local_3c;
int1 *local_38;
lVar1 = *(long *)(param_1 + 0x18);
local_3c = 1;
if (*(long *)(lVar1 + 0x480) == 0) {
local_58 = 0;
}
else {
local_58 = *(long *)(*(long *)(lVar1 + 0x480) + 0x78);
}
__ptr = malloc((param_3 + 0x40f) + local_58);
lVar3 = ma_strmake(__ptr,*(int8 *)(lVar1 + 0x2b8),0x200);
local_38 = (int1 *)(lVar3 + 1);
if (param_3 == 0) {
*local_38 = 0;
local_38 = (int1 *)(lVar3 + 2);
}
else {
if ((*(ulong *)(lVar1 + 0x368) & 0x8000) != 0) {
if (0xff < param_3) {
my_set_error(lVar1,0x7eb,SQLSTATE_UNKNOWN,0);
goto LAB_00140213;
}
*local_38 = (char)param_3;
local_38 = (int1 *)(lVar3 + 2);
}
memcpy(local_38,param_2,(long)param_3);
local_38 = local_38 + param_3;
}
if (*(long *)(param_1 + 0x28) == 0) {
local_68 = "";
}
else {
local_68 = *(char **)(param_1 + 0x28);
}
lVar3 = ma_strmake(local_38,local_68,0x100);
local_38 = (int1 *)(lVar3 + 1);
if ((*(ulong *)(lVar1 + 0x370) & 0x200) != 0) {
uVar2 = **(uint **)(lVar1 + 0x2f0) & 0xffff;
*local_38 = (char)uVar2;
*(char *)(lVar3 + 2) = (char)(uVar2 >> 8);
local_38 = (int1 *)(lVar3 + 3);
}
if ((*(ulong *)(lVar1 + 0x370) & 0x80000) != 0) {
lVar3 = ma_strmake(local_38,*(int8 *)(*(long *)(param_1 + 0x20) + 8),0x100);
local_38 = (int1 *)(lVar3 + 1);
}
lVar3 = ma_send_connect_attr(lVar1,local_38);
local_3c = ma_simple_command(lVar1,0x11,__ptr,lVar3 - (long)__ptr,1,0);
LAB_00140213:
free(__ptr);
return local_3c;
}
|
|
8,929 |
YAML::detail::node_iterator_base<YAML::detail::node>::operator*() const
|
aimrt_mujoco_sim/_deps/yaml-cpp-src/include/yaml-cpp/node/detail/node_iterator.h
|
value_type operator*() const {
switch (m_type) {
case iterator_type::NoneType:
return value_type();
case iterator_type::Sequence:
return value_type(**m_seqIt);
case iterator_type::Map:
return value_type(*m_mapIt->first, *m_mapIt->second);
}
return value_type();
}
|
O0
|
c
|
YAML::detail::node_iterator_base<YAML::detail::node>::operator*() const:
subq $0x38, %rsp
movq %rdi, 0x10(%rsp)
movq %rdi, 0x18(%rsp)
movq %rsi, 0x30(%rsp)
movq 0x30(%rsp), %rax
movq %rax, 0x20(%rsp)
movl (%rax), %eax
movl %eax, 0x2c(%rsp)
testl %eax, %eax
je 0xcdb4f
jmp 0xcdb39
movl 0x2c(%rsp), %eax
subl $0x1, %eax
je 0xcdb5b
jmp 0xcdb44
movl 0x2c(%rsp), %eax
subl $0x2, %eax
je 0xcdb78
jmp 0xcdbb1
movq 0x10(%rsp), %rdi
callq 0xcdd90
jmp 0xcdbbb
movq 0x20(%rsp), %rdi
addq $0x8, %rdi
callq 0xcddc0
movq 0x10(%rsp), %rdi
movq (%rax), %rsi
callq 0xcddd0
jmp 0xcdbbb
movq 0x20(%rsp), %rdi
addq $0x10, %rdi
callq 0xcde00
movq 0x20(%rsp), %rdi
movq (%rax), %rax
movq %rax, 0x8(%rsp)
addq $0x10, %rdi
callq 0xcde00
movq 0x10(%rsp), %rdi
movq 0x8(%rsp), %rsi
movq 0x8(%rax), %rdx
callq 0xcde10
jmp 0xcdbbb
movq 0x10(%rsp), %rdi
callq 0xcdd90
movq 0x18(%rsp), %rax
addq $0x38, %rsp
retq
nopw %cs:(%rax,%rax)
nop
|
_ZNK4YAML6detail18node_iterator_baseINS0_4nodeEEdeEv:
sub rsp, 38h
mov [rsp+38h+var_28], rdi
mov [rsp+38h+var_20], rdi
mov [rsp+38h+var_8], rsi
mov rax, [rsp+38h+var_8]
mov [rsp+38h+var_18], rax
mov eax, [rax]
mov [rsp+38h+var_C], eax
test eax, eax
jz short loc_CDB4F
jmp short $+2
loc_CDB39:
mov eax, [rsp+38h+var_C]
sub eax, 1
jz short loc_CDB5B
jmp short $+2
loc_CDB44:
mov eax, [rsp+38h+var_C]
sub eax, 2
jz short loc_CDB78
jmp short loc_CDBB1
loc_CDB4F:
mov rdi, [rsp+38h+var_28]
call _ZN4YAML6detail19node_iterator_valueINS0_4nodeEEC2Ev; YAML::detail::node_iterator_value<YAML::detail::node>::node_iterator_value(void)
jmp short loc_CDBBB
loc_CDB5B:
mov rdi, [rsp+38h+var_18]
add rdi, 8
call _ZNK9__gnu_cxx17__normal_iteratorIPPN4YAML6detail4nodeESt6vectorIS4_SaIS4_EEEdeEv; __gnu_cxx::__normal_iterator<YAML::detail::node **,std::vector<YAML::detail::node *>>::operator*(void)
mov rdi, [rsp+38h+var_28]
mov rsi, [rax]
call _ZN4YAML6detail19node_iterator_valueINS0_4nodeEEC2ERS2_; YAML::detail::node_iterator_value<YAML::detail::node>::node_iterator_value(YAML::detail::node&)
jmp short loc_CDBBB
loc_CDB78:
mov rdi, [rsp+38h+var_18]
add rdi, 10h
call _ZNK9__gnu_cxx17__normal_iteratorIPSt4pairIPN4YAML6detail4nodeES5_ESt6vectorIS6_SaIS6_EEEptEv; __gnu_cxx::__normal_iterator<std::pair<YAML::detail::node *,YAML::detail::node *> *,std::vector<std::pair<YAML::detail::node *,YAML::detail::node *>>>::operator->(void)
mov rdi, [rsp+38h+var_18]
mov rax, [rax]
mov [rsp+38h+var_30], rax
add rdi, 10h
call _ZNK9__gnu_cxx17__normal_iteratorIPSt4pairIPN4YAML6detail4nodeES5_ESt6vectorIS6_SaIS6_EEEptEv; __gnu_cxx::__normal_iterator<std::pair<YAML::detail::node *,YAML::detail::node *> *,std::vector<std::pair<YAML::detail::node *,YAML::detail::node *>>>::operator->(void)
mov rdi, [rsp+38h+var_28]
mov rsi, [rsp+38h+var_30]
mov rdx, [rax+8]
call _ZN4YAML6detail19node_iterator_valueINS0_4nodeEEC2ERS2_S4_; YAML::detail::node_iterator_value<YAML::detail::node>::node_iterator_value(YAML::detail::node&,YAML::detail::node&)
jmp short loc_CDBBB
loc_CDBB1:
mov rdi, [rsp+38h+var_28]
call _ZN4YAML6detail19node_iterator_valueINS0_4nodeEEC2Ev; YAML::detail::node_iterator_value<YAML::detail::node>::node_iterator_value(void)
loc_CDBBB:
mov rax, [rsp+38h+var_20]
add rsp, 38h
retn
|
long long YAML::detail::node_iterator_base<YAML::detail::node>::operator*(long long a1, int *a2)
{
_QWORD *v2; // rax
long long v3; // rax
long long v5; // [rsp+8h] [rbp-30h]
int v6; // [rsp+2Ch] [rbp-Ch]
v6 = *a2;
if ( *a2 )
{
if ( v6 == 1 )
{
v2 = (_QWORD *)__gnu_cxx::__normal_iterator<YAML::detail::node **,std::vector<YAML::detail::node *>>::operator*(a2 + 2);
YAML::detail::node_iterator_value<YAML::detail::node>::node_iterator_value(a1, *v2);
return a1;
}
if ( v6 == 2 )
{
v5 = *(_QWORD *)__gnu_cxx::__normal_iterator<std::pair<YAML::detail::node *,YAML::detail::node *> *,std::vector<std::pair<YAML::detail::node *,YAML::detail::node *>>>::operator->(a2 + 4);
v3 = __gnu_cxx::__normal_iterator<std::pair<YAML::detail::node *,YAML::detail::node *> *,std::vector<std::pair<YAML::detail::node *,YAML::detail::node *>>>::operator->(a2 + 4);
YAML::detail::node_iterator_value<YAML::detail::node>::node_iterator_value(a1, v5, *(_QWORD *)(v3 + 8));
return a1;
}
}
YAML::detail::node_iterator_value<YAML::detail::node>::node_iterator_value(a1);
return a1;
}
|
operator*:
SUB RSP,0x38
MOV qword ptr [RSP + 0x10],RDI
MOV qword ptr [RSP + 0x18],RDI
MOV qword ptr [RSP + 0x30],RSI
MOV RAX,qword ptr [RSP + 0x30]
MOV qword ptr [RSP + 0x20],RAX
MOV EAX,dword ptr [RAX]
MOV dword ptr [RSP + 0x2c],EAX
TEST EAX,EAX
JZ 0x001cdb4f
JMP 0x001cdb39
LAB_001cdb39:
MOV EAX,dword ptr [RSP + 0x2c]
SUB EAX,0x1
JZ 0x001cdb5b
JMP 0x001cdb44
LAB_001cdb44:
MOV EAX,dword ptr [RSP + 0x2c]
SUB EAX,0x2
JZ 0x001cdb78
JMP 0x001cdbb1
LAB_001cdb4f:
MOV RDI,qword ptr [RSP + 0x10]
CALL 0x001cdd90
JMP 0x001cdbbb
LAB_001cdb5b:
MOV RDI,qword ptr [RSP + 0x20]
ADD RDI,0x8
CALL 0x001cddc0
MOV RDI,qword ptr [RSP + 0x10]
MOV RSI,qword ptr [RAX]
CALL 0x001cddd0
JMP 0x001cdbbb
LAB_001cdb78:
MOV RDI,qword ptr [RSP + 0x20]
ADD RDI,0x10
CALL 0x001cde00
MOV RDI,qword ptr [RSP + 0x20]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RSP + 0x8],RAX
ADD RDI,0x10
CALL 0x001cde00
MOV RDI,qword ptr [RSP + 0x10]
MOV RSI,qword ptr [RSP + 0x8]
MOV RDX,qword ptr [RAX + 0x8]
CALL 0x001cde10
JMP 0x001cdbbb
LAB_001cdbb1:
MOV RDI,qword ptr [RSP + 0x10]
CALL 0x001cdd90
LAB_001cdbbb:
MOV RAX,qword ptr [RSP + 0x18]
ADD RSP,0x38
RET
|
/* YAML::detail::node_iterator_base<YAML::detail::node>::TEMPNAMEPLACEHOLDERVALUE() const */
node_iterator_base<YAML::detail::node> * __thiscall
YAML::detail::node_iterator_base<YAML::detail::node>::operator*
(node_iterator_base<YAML::detail::node> *this)
{
int iVar1;
node *pnVar2;
int8 *puVar3;
long lVar4;
int *in_RSI;
iVar1 = *in_RSI;
if (iVar1 == 0) {
node_iterator_value<YAML::detail::node>::node_iterator_value
((node_iterator_value<YAML::detail::node> *)this);
}
else if (iVar1 == 1) {
puVar3 = (int8 *)
__gnu_cxx::
__normal_iterator<YAML::detail::node**,std::vector<YAML::detail::node*,std::allocator<YAML::detail::node*>>>
::operator*((__normal_iterator<YAML::detail::node**,std::vector<YAML::detail::node*,std::allocator<YAML::detail::node*>>>
*)(in_RSI + 2));
node_iterator_value<YAML::detail::node>::node_iterator_value
((node_iterator_value<YAML::detail::node> *)this,(node *)*puVar3);
}
else if (iVar1 == 2) {
puVar3 = (int8 *)
__gnu_cxx::
__normal_iterator<std::pair<YAML::detail::node*,YAML::detail::node*>*,std::vector<std::pair<YAML::detail::node*,YAML::detail::node*>,std::allocator<std::pair<YAML::detail::node*,YAML::detail::node*>>>>
::operator->((__normal_iterator<std::pair<YAML::detail::node*,YAML::detail::node*>*,std::vector<std::pair<YAML::detail::node*,YAML::detail::node*>,std::allocator<std::pair<YAML::detail::node*,YAML::detail::node*>>>>
*)(in_RSI + 4));
pnVar2 = (node *)*puVar3;
lVar4 = __gnu_cxx::
__normal_iterator<std::pair<YAML::detail::node*,YAML::detail::node*>*,std::vector<std::pair<YAML::detail::node*,YAML::detail::node*>,std::allocator<std::pair<YAML::detail::node*,YAML::detail::node*>>>>
::operator->((__normal_iterator<std::pair<YAML::detail::node*,YAML::detail::node*>*,std::vector<std::pair<YAML::detail::node*,YAML::detail::node*>,std::allocator<std::pair<YAML::detail::node*,YAML::detail::node*>>>>
*)(in_RSI + 4));
node_iterator_value<YAML::detail::node>::node_iterator_value
((node_iterator_value<YAML::detail::node> *)this,pnVar2,*(node **)(lVar4 + 8));
}
else {
node_iterator_value<YAML::detail::node>::node_iterator_value
((node_iterator_value<YAML::detail::node> *)this);
}
return this;
}
|
|
8,930 |
testing::internal::GetNextRandomSeed(int)
|
giladroyz[P]FindPeaks/build_O3/_deps/googletest-src/googletest/src/gtest-internal-inl.h
|
inline int GetNextRandomSeed(int seed) {
GTEST_CHECK_(1 <= seed && seed <= kMaxRandomSeed)
<< "Invalid random seed " << seed << " - must be in [1, "
<< kMaxRandomSeed << "].";
const int next_seed = seed + 1;
return (next_seed > kMaxRandomSeed) ? 1 : next_seed;
}
|
O3
|
c
|
testing::internal::GetNextRandomSeed(int):
pushq %r14
pushq %rbx
pushq %rax
movl %edi, %ebx
leal -0x1(%rbx), %eax
cmpl $0x1869f, %eax # imm = 0x1869F
jb 0x34edb
leaq 0xf391(%rip), %rdx # 0x441d8
leaq 0x4(%rsp), %rdi
movl $0x3, %esi
movl $0x84, %ecx
callq 0x16b08
movq 0x24186(%rip), %rdi # 0x58fe8
leaq 0xf76a(%rip), %rsi # 0x445d3
movl $0x36, %edx
callq 0x85b0
movq 0x2416e(%rip), %rdi # 0x58fe8
leaq 0xf789(%rip), %rsi # 0x4460a
movl $0x14, %edx
callq 0x85b0
movq 0x24156(%rip), %rdi # 0x58fe8
movl %ebx, %esi
callq 0x8950
movq %rax, %r14
leaq 0xf77c(%rip), %rsi # 0x4461f
movl $0x12, %edx
movq %rax, %rdi
callq 0x85b0
movq %r14, %rdi
movl $0x1869f, %esi # imm = 0x1869F
callq 0x8950
leaq 0xf76e(%rip), %rsi # 0x44632
movl $0x2, %edx
movq %rax, %rdi
callq 0x85b0
leaq 0x4(%rsp), %rdi
callq 0x16c4a
leal 0x1(%rbx), %ecx
cmpl $0x1869f, %ebx # imm = 0x1869F
movl $0x1, %eax
cmovll %ecx, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
movq %rax, %rbx
leaq 0x4(%rsp), %rdi
callq 0x16c4a
movq %rbx, %rdi
callq 0x8990
nop
|
_ZN7testing8internal17GetNextRandomSeedEi:
push r14
push rbx
push rax
mov ebx, edi
lea eax, [rbx-1]
cmp eax, 1869Fh
jb loc_34EDB
lea rdx, aWorkspaceLlm4b_6; "/workspace/llm4binary/github/2025_star3"...
lea rdi, [rsp+18h+var_14]
mov esi, 3
mov ecx, 84h
call _ZN7testing8internal8GTestLogC2ENS0_16GTestLogSeverityEPKci; testing::internal::GTestLog::GTestLog(testing::internal::GTestLogSeverity,char const*,int)
mov rdi, cs:_ZSt4cerr_ptr
lea rsi, aCondition1Seed; "Condition 1 <= seed && seed <= kMaxRand"...
mov edx, 36h ; '6'
call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long)
mov rdi, cs:_ZSt4cerr_ptr
lea rsi, aInvalidRandomS; "Invalid random seed "
mov edx, 14h
call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long)
mov rdi, cs:_ZSt4cerr_ptr
mov esi, ebx
call __ZNSolsEi; std::ostream::operator<<(int)
mov r14, rax
lea rsi, aMustBeIn1; " - must be in [1, "
mov edx, 12h
mov rdi, rax
call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long)
mov rdi, r14
mov esi, 1869Fh
call __ZNSolsEi; std::ostream::operator<<(int)
lea rsi, asc_44632; "]."
mov edx, 2
mov rdi, rax
call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long)
lea rdi, [rsp+18h+var_14]; this
call _ZN7testing8internal8GTestLogD2Ev; testing::internal::GTestLog::~GTestLog()
loc_34EDB:
lea ecx, [rbx+1]
cmp ebx, 1869Fh
mov eax, 1
cmovl eax, ecx
add rsp, 8
pop rbx
pop r14
retn
mov rbx, rax
lea rdi, [rsp+4]; this
call _ZN7testing8internal8GTestLogD2Ev; testing::internal::GTestLog::~GTestLog()
mov rdi, rbx
call __Unwind_Resume
|
long long testing::internal::GetNextRandomSeed(testing::internal *this)
{
long long v1; // rax
long long v2; // r14
long long v3; // rax
long long v4; // rdx
long long v5; // rcx
long long result; // rax
_DWORD v7[5]; // [rsp+0h] [rbp-14h] BYREF
v7[0] = HIDWORD(v1);
if ( (unsigned int)((_DWORD)this - 1) >= 0x1869F )
{
testing::internal::GTestLog::GTestLog(
v7,
3,
"/workspace/llm4binary/github/2025_star3/giladroyz[P]FindPeaks/build_O3/_deps/googletest-src/googletest/src/gtest-internal-inl.h",
132);
std::__ostream_insert<char,std::char_traits<char>>(
&std::cerr,
"Condition 1 <= seed && seed <= kMaxRandomSeed failed. ",
54LL);
std::__ostream_insert<char,std::char_traits<char>>(&std::cerr, "Invalid random seed ", 20LL);
v2 = std::ostream::operator<<(&std::cerr, (unsigned int)this);
std::__ostream_insert<char,std::char_traits<char>>(v2, " - must be in [1, ", 18LL);
v3 = std::ostream::operator<<(v2, 99999LL);
std::__ostream_insert<char,std::char_traits<char>>(v3, "].", 2LL);
testing::internal::GTestLog::~GTestLog((testing::internal::GTestLog *)v7, (long long)"].", v4, v5);
}
result = 1LL;
if ( (int)this < 99999 )
return (unsigned int)((_DWORD)this + 1);
return result;
}
|
GetNextRandomSeed:
PUSH R14
PUSH RBX
PUSH RAX
MOV EBX,EDI
LEA EAX,[RBX + -0x1]
CMP EAX,0x1869f
JC 0x00134edb
LEA RDX,[0x1441d8]
LEA RDI,[RSP + 0x4]
MOV ESI,0x3
MOV ECX,0x84
CALL 0x00116b08
LAB_00134e5b:
MOV RDI,qword ptr [0x00158fe8]
LEA RSI,[0x1445d3]
MOV EDX,0x36
CALL 0x001085b0
MOV RDI,qword ptr [0x00158fe8]
LEA RSI,[0x14460a]
MOV EDX,0x14
CALL 0x001085b0
MOV RDI,qword ptr [0x00158fe8]
MOV ESI,EBX
CALL 0x00108950
MOV R14,RAX
LEA RSI,[0x14461f]
MOV EDX,0x12
MOV RDI,RAX
CALL 0x001085b0
MOV RDI,R14
MOV ESI,0x1869f
CALL 0x00108950
LEA RSI,[0x144632]
MOV EDX,0x2
MOV RDI,RAX
CALL 0x001085b0
LAB_00134ed1:
LEA RDI,[RSP + 0x4]
CALL 0x00116c4a
LAB_00134edb:
LEA ECX,[RBX + 0x1]
CMP EBX,0x1869f
MOV EAX,0x1
CMOVL EAX,ECX
ADD RSP,0x8
POP RBX
POP R14
RET
|
/* testing::internal::GetNextRandomSeed(int) */
int testing::internal::GetNextRandomSeed(int param_1)
{
int iVar1;
ostream *poVar2;
GTestLog local_14 [4];
if (0x1869e < param_1 - 1U) {
GTestLog::GTestLog(local_14,3,
"/workspace/llm4binary/github/2025_star3/giladroyz[P]FindPeaks/build_O3/_deps/googletest-src/googletest/src/gtest-internal-inl.h"
,0x84);
/* try { // try from 00134e5b to 00134ed0 has its CatchHandler @ 00134ef4 */
std::__ostream_insert<char,std::char_traits<char>>
((ostream *)PTR_cerr_00158fe8,"Condition 1 <= seed && seed <= kMaxRandomSeed failed. "
,0x36);
std::__ostream_insert<char,std::char_traits<char>>
((ostream *)PTR_cerr_00158fe8,"Invalid random seed ",0x14);
poVar2 = (ostream *)std::ostream::operator<<((ostream *)PTR_cerr_00158fe8,param_1);
std::__ostream_insert<char,std::char_traits<char>>(poVar2," - must be in [1, ",0x12);
poVar2 = (ostream *)std::ostream::operator<<(poVar2,99999);
std::__ostream_insert<char,std::char_traits<char>>(poVar2,"].",2);
GTestLog::~GTestLog(local_14);
}
iVar1 = 1;
if (param_1 < 99999) {
iVar1 = param_1 + 1;
}
return iVar1;
}
|
|
8,931 |
OpenSubdiv::v3_6_0::Vtr::internal::FVarRefinement::populateChildValuesForEdgeVertex(int, int)
|
NVIDIA-RTX[P]OSD-Lite/opensubdiv/vtr/fvarRefinement.cpp
|
inline int
FVarRefinement::populateChildValuesForEdgeVertex(Index cVert, Index pEdge) {
//
// Determine the number of sibling values for the child vertex of this discts
// edge and populate their related topological data (e.g. source face).
//
// This turns out to be very simple. For FVar refinement to handle all cases
// of non-manifold edges, when an edge is discts we generate a FVar value for
// each face incident the edge. So in the uniform refinement case we will
// have as many child values as parent faces incident the edge. But even when
// refinement is sparse, if this edge-vertex is not complete, we will still be
// guaranteed that a child face exists for each parent face since one of the
// edge's end vertices must be complete and therefore include all child faces.
//
ConstIndexArray pEdgeFaces = _parentLevel.getEdgeFaces(pEdge);
if (pEdgeFaces.size() == 1) {
// No sibling so the first face (0) guaranteed to be a source and all
// sibling indices per incident face will also be 0 -- all of which was
// done on initialization, so nothing further to do.
return 1;
}
//
// Update the parent-source of all child values:
//
int cValueCount = pEdgeFaces.size();
Index cValueOffset = _childFVar.getVertexValueOffset(cVert);
for (int i = 0; i < cValueCount; ++i) {
_childValueParentSource[cValueOffset + i] = (LocalIndex) i;
}
//
// Update the vertex-face siblings for the faces incident the child vertex:
//
ConstIndexArray cVertFaces = _childLevel.getVertexFaces(cVert);
FVarLevel::SiblingArray cVertFaceSiblings = _childFVar.getVertexFaceSiblings(cVert);
assert(cVertFaces.size() == cVertFaceSiblings.size());
assert(cVertFaces.size() >= cValueCount);
for (int i = 0; i < cVertFaceSiblings.size(); ++i) {
Index pFaceI = _refinement.getChildFaceParentFace(cVertFaces[i]);
if (pEdgeFaces.size() == 2) {
// Only two parent faces and all siblings previously initialized to 0:
if (pFaceI == pEdgeFaces[1]) {
cVertFaceSiblings[i] = (LocalIndex) 1;
}
} else {
// Non-manifold case with > 2 parent faces -- match child faces to parent:
for (int j = 0; j < pEdgeFaces.size(); ++j) {
if (pFaceI == pEdgeFaces[j]) {
cVertFaceSiblings[i] = (LocalIndex) j;
}
}
}
}
return cValueCount;
}
|
O1
|
cpp
|
OpenSubdiv::v3_6_0::Vtr::internal::FVarRefinement::populateChildValuesForEdgeVertex(int, int):
pushq %rbx
movq 0x8(%rdi), %r8
leal (%rdx,%rdx), %eax
movq 0x90(%r8), %r9
cltq
movl (%r9,%rax,4), %ecx
movl $0x1, %eax
cmpq $0x1, %rcx
je 0x411fe
leal 0x1(,%rdx,2), %eax
cltq
movslq (%r9,%rax,4), %rax
shlq $0x2, %rax
addq 0xa8(%r8), %rax
movq 0x20(%rdi), %r8
testl %ecx, %ecx
jle 0x4115a
movq 0x60(%r8), %rdx
movslq %esi, %r9
movslq (%rdx,%r9,4), %rdx
addq %rdx, %rdx
addq 0x28(%rdi), %rdx
xorl %r9d, %r9d
movw %r9w, (%rdx,%r9,2)
incq %r9
cmpq %r9, %rcx
jne 0x4114d
movq 0x18(%rdi), %r9
leal (%rsi,%rsi), %edx
movq 0x108(%r9), %r11
movslq %edx, %rdx
movl (%r11,%rdx,4), %ebx
movq (%r8), %r10
movq 0x108(%r10), %r10
movl (%r10,%rdx,4), %edx
cmpl %edx, %ebx
jne 0x41200
cmpl %ecx, %ebx
jl 0x4121f
testl %edx, %edx
jle 0x411fc
leal 0x1(,%rsi,2), %esi
movslq %esi, %rbx
movslq (%r11,%rbx,4), %rsi
shlq $0x2, %rsi
addq 0x120(%r9), %rsi
movslq (%r10,%rbx,4), %r9
addq %r9, %r9
addq 0x78(%r8), %r9
movq (%rdi), %rdi
movq 0x108(%rdi), %rdi
xorl %r8d, %r8d
movslq (%rsi,%r8,4), %r10
movl (%rdi,%r10,4), %r10d
cmpl $0x2, %ecx
jne 0x411da
cmpl 0x4(%rax), %r10d
jne 0x411f4
movw $0x1, (%r9,%r8,2)
jmp 0x411f4
testl %ecx, %ecx
jle 0x411f4
xorl %r11d, %r11d
cmpl (%rax,%r11,4), %r10d
jne 0x411ec
movw %r11w, (%r9,%r8,2)
incq %r11
cmpq %r11, %rcx
jne 0x411e1
incq %r8
cmpq %rdx, %r8
jne 0x411be
movl %ecx, %eax
popq %rbx
retq
leaq 0x71555(%rip), %rdi # 0xb275c
leaq 0x713d7(%rip), %rsi # 0xb25e5
leaq 0x71575(%rip), %rcx # 0xb278a
movl $0xdc, %edx
callq 0x39560
leaq 0x715ca(%rip), %rdi # 0xb27f0
leaq 0x713b8(%rip), %rsi # 0xb25e5
leaq 0x71556(%rip), %rcx # 0xb278a
movl $0xdd, %edx
callq 0x39560
|
_ZN10OpenSubdiv6v3_6_03Vtr8internal14FVarRefinement32populateChildValuesForEdgeVertexEii:
push rbx
mov r8, [rdi+8]
lea eax, [rdx+rdx]
mov r9, [r8+90h]
cdqe
mov ecx, [r9+rax*4]
mov eax, 1
cmp rcx, 1
jz loc_411FE
lea eax, ds:1[rdx*2]
cdqe
movsxd rax, dword ptr [r9+rax*4]
shl rax, 2
add rax, [r8+0A8h]
mov r8, [rdi+20h]
test ecx, ecx
jle short loc_4115A
mov rdx, [r8+60h]
movsxd r9, esi
movsxd rdx, dword ptr [rdx+r9*4]
add rdx, rdx
add rdx, [rdi+28h]
xor r9d, r9d
loc_4114D:
mov [rdx+r9*2], r9w
inc r9
cmp rcx, r9
jnz short loc_4114D
loc_4115A:
mov r9, [rdi+18h]
lea edx, [rsi+rsi]
mov r11, [r9+108h]
movsxd rdx, edx
mov ebx, [r11+rdx*4]
mov r10, [r8]
mov r10, [r10+108h]
mov edx, [r10+rdx*4]
cmp ebx, edx
jnz short loc_41200
cmp ebx, ecx
jl loc_4121F
test edx, edx
jle short loc_411FC
lea esi, ds:1[rsi*2]
movsxd rbx, esi
movsxd rsi, dword ptr [r11+rbx*4]
shl rsi, 2
add rsi, [r9+120h]
movsxd r9, dword ptr [r10+rbx*4]
add r9, r9
add r9, [r8+78h]
mov rdi, [rdi]
mov rdi, [rdi+108h]
xor r8d, r8d
loc_411BE:
movsxd r10, dword ptr [rsi+r8*4]
mov r10d, [rdi+r10*4]
cmp ecx, 2
jnz short loc_411DA
cmp r10d, [rax+4]
jnz short loc_411F4
mov word ptr [r9+r8*2], 1
jmp short loc_411F4
loc_411DA:
test ecx, ecx
jle short loc_411F4
xor r11d, r11d
loc_411E1:
cmp r10d, [rax+r11*4]
jnz short loc_411EC
mov [r9+r8*2], r11w
loc_411EC:
inc r11
cmp rcx, r11
jnz short loc_411E1
loc_411F4:
inc r8
cmp r8, rdx
jnz short loc_411BE
loc_411FC:
mov eax, ecx
loc_411FE:
pop rbx
retn
loc_41200:
lea rdi, aCvertfacesSize; "cVertFaces.size() == cVertFaceSiblings."...
lea rsi, aWorkspaceLlm4b_1; "/workspace/llm4binary/github/2025_star3"...
lea rcx, aIntOpensubdivV_0; "int OpenSubdiv::v3_6_0::Vtr::internal::"...
mov edx, 0DCh
call ___assert_fail
loc_4121F:
lea rdi, aCvertfacesSize_0; "cVertFaces.size() >= cValueCount"
lea rsi, aWorkspaceLlm4b_1; "/workspace/llm4binary/github/2025_star3"...
lea rcx, aIntOpensubdivV_0; "int OpenSubdiv::v3_6_0::Vtr::internal::"...
mov edx, 0DDh
call ___assert_fail
|
long long OpenSubdiv::v3_6_0::Vtr::internal::FVarRefinement::populateChildValuesForEdgeVertex(
OpenSubdiv::v3_6_0::Vtr::internal::FVarRefinement *this,
int a2,
int a3)
{
long long v3; // r8
long long v4; // r9
long long v5; // rcx
long long result; // rax
long long v7; // rax
_QWORD *v8; // r8
long long v9; // rdx
long long i; // r9
long long v11; // r9
long long v12; // r11
long long v13; // rdx
int v14; // ebx
long long v15; // r10
long long v16; // rdx
long long v17; // rbx
long long v18; // rsi
long long v19; // r9
long long v20; // rdi
long long j; // r8
int v22; // r10d
long long k; // r11
v3 = *((_QWORD *)this + 1);
v4 = *(_QWORD *)(v3 + 144);
v5 = *(unsigned int *)(v4 + 8LL * a3);
result = 1LL;
if ( v5 != 1 )
{
v7 = *(_QWORD *)(v3 + 168) + 4LL * *(int *)(v4 + 4LL * (2 * a3 + 1));
v8 = (_QWORD *)*((_QWORD *)this + 4);
if ( (int)v5 > 0 )
{
v9 = *((_QWORD *)this + 5) + 2LL * *(int *)(v8[12] + 4LL * a2);
for ( i = 0LL; i != v5; ++i )
*(_WORD *)(v9 + 2 * i) = i;
}
v11 = *((_QWORD *)this + 3);
v12 = *(_QWORD *)(v11 + 264);
v13 = 2 * a2;
v14 = *(_DWORD *)(v12 + 4 * v13);
v15 = *(_QWORD *)(*v8 + 264LL);
v16 = *(unsigned int *)(v15 + 4 * v13);
if ( v14 != (_DWORD)v16 )
__assert_fail(
"cVertFaces.size() == cVertFaceSiblings.size()",
"/workspace/llm4binary/github/2025_star3/NVIDIA-RTX[P]OSD-Lite/opensubdiv/vtr/fvarRefinement.cpp",
220LL,
"int OpenSubdiv::v3_6_0::Vtr::internal::FVarRefinement::populateChildValuesForEdgeVertex(Index, Index)");
if ( v14 < (int)v5 )
__assert_fail(
"cVertFaces.size() >= cValueCount",
"/workspace/llm4binary/github/2025_star3/NVIDIA-RTX[P]OSD-Lite/opensubdiv/vtr/fvarRefinement.cpp",
221LL,
"int OpenSubdiv::v3_6_0::Vtr::internal::FVarRefinement::populateChildValuesForEdgeVertex(Index, Index)");
if ( (int)v16 > 0 )
{
v17 = 2 * a2 + 1;
v18 = *(_QWORD *)(v11 + 288) + 4LL * *(int *)(v12 + 4 * v17);
v19 = v8[15] + 2LL * *(int *)(v15 + 4 * v17);
v20 = *(_QWORD *)(*(_QWORD *)this + 264LL);
for ( j = 0LL; j != v16; ++j )
{
v22 = *(_DWORD *)(v20 + 4LL * *(int *)(v18 + 4 * j));
if ( (_DWORD)v5 == 2 )
{
if ( v22 == *(_DWORD *)(v7 + 4) )
*(_WORD *)(v19 + 2 * j) = 1;
}
else if ( (int)v5 > 0 )
{
for ( k = 0LL; k != v5; ++k )
{
if ( v22 == *(_DWORD *)(v7 + 4 * k) )
*(_WORD *)(v19 + 2 * j) = k;
}
}
}
}
return (unsigned int)v5;
}
return result;
}
|
populateChildValuesForEdgeVertex:
PUSH RBX
MOV R8,qword ptr [RDI + 0x8]
LEA EAX,[RDX + RDX*0x1]
MOV R9,qword ptr [R8 + 0x90]
CDQE
MOV ECX,dword ptr [R9 + RAX*0x4]
MOV EAX,0x1
CMP RCX,0x1
JZ 0x001411fe
LEA EAX,[0x1 + RDX*0x2]
CDQE
MOVSXD RAX,dword ptr [R9 + RAX*0x4]
SHL RAX,0x2
ADD RAX,qword ptr [R8 + 0xa8]
MOV R8,qword ptr [RDI + 0x20]
TEST ECX,ECX
JLE 0x0014115a
MOV RDX,qword ptr [R8 + 0x60]
MOVSXD R9,ESI
MOVSXD RDX,dword ptr [RDX + R9*0x4]
ADD RDX,RDX
ADD RDX,qword ptr [RDI + 0x28]
XOR R9D,R9D
LAB_0014114d:
MOV word ptr [RDX + R9*0x2],R9W
INC R9
CMP RCX,R9
JNZ 0x0014114d
LAB_0014115a:
MOV R9,qword ptr [RDI + 0x18]
LEA EDX,[RSI + RSI*0x1]
MOV R11,qword ptr [R9 + 0x108]
MOVSXD RDX,EDX
MOV EBX,dword ptr [R11 + RDX*0x4]
MOV R10,qword ptr [R8]
MOV R10,qword ptr [R10 + 0x108]
MOV EDX,dword ptr [R10 + RDX*0x4]
CMP EBX,EDX
JNZ 0x00141200
CMP EBX,ECX
JL 0x0014121f
TEST EDX,EDX
JLE 0x001411fc
LEA ESI,[0x1 + RSI*0x2]
MOVSXD RBX,ESI
MOVSXD RSI,dword ptr [R11 + RBX*0x4]
SHL RSI,0x2
ADD RSI,qword ptr [R9 + 0x120]
MOVSXD R9,dword ptr [R10 + RBX*0x4]
ADD R9,R9
ADD R9,qword ptr [R8 + 0x78]
MOV RDI,qword ptr [RDI]
MOV RDI,qword ptr [RDI + 0x108]
XOR R8D,R8D
LAB_001411be:
MOVSXD R10,dword ptr [RSI + R8*0x4]
MOV R10D,dword ptr [RDI + R10*0x4]
CMP ECX,0x2
JNZ 0x001411da
CMP R10D,dword ptr [RAX + 0x4]
JNZ 0x001411f4
MOV word ptr [R9 + R8*0x2],0x1
JMP 0x001411f4
LAB_001411da:
TEST ECX,ECX
JLE 0x001411f4
XOR R11D,R11D
LAB_001411e1:
CMP R10D,dword ptr [RAX + R11*0x4]
JNZ 0x001411ec
MOV word ptr [R9 + R8*0x2],R11W
LAB_001411ec:
INC R11
CMP RCX,R11
JNZ 0x001411e1
LAB_001411f4:
INC R8
CMP R8,RDX
JNZ 0x001411be
LAB_001411fc:
MOV EAX,ECX
LAB_001411fe:
POP RBX
RET
LAB_00141200:
LEA RDI,[0x1b275c]
LEA RSI,[0x1b25e5]
LEA RCX,[0x1b278a]
MOV EDX,0xdc
CALL 0x00139560
LAB_0014121f:
LEA RDI,[0x1b27f0]
LEA RSI,[0x1b25e5]
LEA RCX,[0x1b278a]
MOV EDX,0xdd
CALL 0x00139560
|
/* OpenSubdiv::v3_6_0::Vtr::internal::FVarRefinement::populateChildValuesForEdgeVertex(int, int) */
uint __thiscall
OpenSubdiv::v3_6_0::Vtr::internal::FVarRefinement::populateChildValuesForEdgeVertex
(FVarRefinement *this,int param_1,int param_2)
{
uint uVar1;
int iVar2;
uint uVar3;
int iVar4;
long *plVar5;
long lVar6;
uint uVar7;
long lVar8;
ulong uVar9;
long lVar10;
ulong uVar11;
long lVar12;
ulong uVar13;
lVar8 = *(long *)(*(long *)(this + 8) + 0x90);
uVar1 = *(uint *)(lVar8 + (long)(param_2 * 2) * 4);
uVar9 = (ulong)uVar1;
uVar7 = 1;
if (uVar9 != 1) {
lVar8 = (long)*(int *)(lVar8 + (long)(param_2 * 2 + 1) * 4) * 4 +
*(long *)(*(long *)(this + 8) + 0xa8);
plVar5 = *(long **)(this + 0x20);
if (0 < (int)uVar1) {
iVar2 = *(int *)(plVar5[0xc] + (long)param_1 * 4);
lVar6 = *(long *)(this + 0x28);
uVar11 = 0;
do {
*(short *)((long)iVar2 * 2 + lVar6 + uVar11 * 2) = (short)uVar11;
uVar11 = uVar11 + 1;
} while (uVar9 != uVar11);
}
lVar6 = *(long *)(*(long *)(this + 0x18) + 0x108);
uVar7 = *(uint *)(lVar6 + (long)(param_1 * 2) * 4);
uVar3 = *(uint *)(*(long *)(*plVar5 + 0x108) + (long)(param_1 * 2) * 4);
if (uVar7 != uVar3) {
/* WARNING: Subroutine does not return */
__assert_fail("cVertFaces.size() == cVertFaceSiblings.size()",
"/workspace/llm4binary/github/2025_star3/NVIDIA-RTX[P]OSD-Lite/opensubdiv/vtr/fvarRefinement.cpp"
,0xdc,
"int OpenSubdiv::v3_6_0::Vtr::internal::FVarRefinement::populateChildValuesForEdgeVertex(Index, Index)"
);
}
if ((int)uVar7 < (int)uVar1) {
/* WARNING: Subroutine does not return */
__assert_fail("cVertFaces.size() >= cValueCount",
"/workspace/llm4binary/github/2025_star3/NVIDIA-RTX[P]OSD-Lite/opensubdiv/vtr/fvarRefinement.cpp"
,0xdd,
"int OpenSubdiv::v3_6_0::Vtr::internal::FVarRefinement::populateChildValuesForEdgeVertex(Index, Index)"
);
}
uVar7 = uVar1;
if (0 < (int)uVar3) {
lVar10 = (long)(param_1 * 2 + 1);
iVar2 = *(int *)(lVar6 + lVar10 * 4);
lVar6 = *(long *)(*(long *)(this + 0x18) + 0x120);
lVar12 = (long)*(int *)(*(long *)(*plVar5 + 0x108) + lVar10 * 4) * 2 + plVar5[0xf];
lVar10 = *(long *)(*(long *)this + 0x108);
uVar11 = 0;
do {
iVar4 = *(int *)(lVar10 + (long)*(int *)((long)iVar2 * 4 + lVar6 + uVar11 * 4) * 4);
if (uVar1 == 2) {
if (iVar4 == *(int *)(lVar8 + 4)) {
*(int2 *)(lVar12 + uVar11 * 2) = 1;
}
}
else if (0 < (int)uVar1) {
uVar13 = 0;
do {
if (iVar4 == *(int *)(lVar8 + uVar13 * 4)) {
*(short *)(lVar12 + uVar11 * 2) = (short)uVar13;
}
uVar13 = uVar13 + 1;
} while (uVar9 != uVar13);
}
uVar11 = uVar11 + 1;
} while (uVar11 != uVar3);
}
}
return uVar7;
}
|
|
8,932 |
OpenSubdiv::v3_6_0::Vtr::internal::FVarRefinement::populateChildValuesForEdgeVertex(int, int)
|
NVIDIA-RTX[P]OSD-Lite/opensubdiv/vtr/fvarRefinement.cpp
|
inline int
FVarRefinement::populateChildValuesForEdgeVertex(Index cVert, Index pEdge) {
//
// Determine the number of sibling values for the child vertex of this discts
// edge and populate their related topological data (e.g. source face).
//
// This turns out to be very simple. For FVar refinement to handle all cases
// of non-manifold edges, when an edge is discts we generate a FVar value for
// each face incident the edge. So in the uniform refinement case we will
// have as many child values as parent faces incident the edge. But even when
// refinement is sparse, if this edge-vertex is not complete, we will still be
// guaranteed that a child face exists for each parent face since one of the
// edge's end vertices must be complete and therefore include all child faces.
//
ConstIndexArray pEdgeFaces = _parentLevel.getEdgeFaces(pEdge);
if (pEdgeFaces.size() == 1) {
// No sibling so the first face (0) guaranteed to be a source and all
// sibling indices per incident face will also be 0 -- all of which was
// done on initialization, so nothing further to do.
return 1;
}
//
// Update the parent-source of all child values:
//
int cValueCount = pEdgeFaces.size();
Index cValueOffset = _childFVar.getVertexValueOffset(cVert);
for (int i = 0; i < cValueCount; ++i) {
_childValueParentSource[cValueOffset + i] = (LocalIndex) i;
}
//
// Update the vertex-face siblings for the faces incident the child vertex:
//
ConstIndexArray cVertFaces = _childLevel.getVertexFaces(cVert);
FVarLevel::SiblingArray cVertFaceSiblings = _childFVar.getVertexFaceSiblings(cVert);
assert(cVertFaces.size() == cVertFaceSiblings.size());
assert(cVertFaces.size() >= cValueCount);
for (int i = 0; i < cVertFaceSiblings.size(); ++i) {
Index pFaceI = _refinement.getChildFaceParentFace(cVertFaces[i]);
if (pEdgeFaces.size() == 2) {
// Only two parent faces and all siblings previously initialized to 0:
if (pFaceI == pEdgeFaces[1]) {
cVertFaceSiblings[i] = (LocalIndex) 1;
}
} else {
// Non-manifold case with > 2 parent faces -- match child faces to parent:
for (int j = 0; j < pEdgeFaces.size(); ++j) {
if (pFaceI == pEdgeFaces[j]) {
cVertFaceSiblings[i] = (LocalIndex) j;
}
}
}
}
return cValueCount;
}
|
O2
|
cpp
|
OpenSubdiv::v3_6_0::Vtr::internal::FVarRefinement::populateChildValuesForEdgeVertex(int, int):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %esi, %r15d
movq %rdi, %r13
movq 0x8(%rdi), %rdi
movl %edx, %esi
callq 0x52330
movl %edx, %ebx
cmpl $0x1, %edx
jne 0x5a0bc
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r14
movq 0x20(%r13), %rax
movslq %r15d, %rcx
movq 0x60(%rax), %rdx
xorl %eax, %eax
testl %ebx, %ebx
movl $0x0, %ebp
cmovgl %ebx, %ebp
movslq (%rdx,%rcx,4), %rcx
addq %rcx, %rcx
addq 0x28(%r13), %rcx
cmpq %rax, %rbp
je 0x5a0ef
movw %ax, (%rcx,%rax,2)
incq %rax
jmp 0x5a0e1
movq 0x18(%r13), %rdi
movl %r15d, %esi
callq 0x55df0
movl %r15d, %esi
movq %rax, %r15
movl %edx, %r12d
movq 0x20(%r13), %rdi
callq 0x54000
cmpl %edx, %r12d
jne 0x5a163
cmpl %ebx, %r12d
jl 0x5a182
movq (%r13), %rcx
xorl %edx, %edx
testl %r12d, %r12d
cmovlel %edx, %r12d
cmpq %r12, %rdx
je 0x5a0ab
movslq (%r15,%rdx,4), %rsi
movq 0x108(%rcx), %rdi
movl (%rdi,%rsi,4), %esi
cmpl $0x2, %ebx
jne 0x5a14d
cmpl 0x4(%r14), %esi
jne 0x5a148
movw $0x1, (%rax,%rdx,2)
incq %rdx
jmp 0x5a124
xorl %edi, %edi
cmpq %rdi, %rbp
je 0x5a148
cmpl (%r14,%rdi,4), %esi
jne 0x5a15e
movw %di, (%rax,%rdx,2)
incq %rdi
jmp 0x5a14f
leaq 0x625f2(%rip), %rdi # 0xbc75c
leaq 0x62474(%rip), %rsi # 0xbc5e5
leaq 0x62612(%rip), %rcx # 0xbc78a
movl $0xdc, %edx
callq 0x512a0
leaq 0x62667(%rip), %rdi # 0xbc7f0
leaq 0x62455(%rip), %rsi # 0xbc5e5
leaq 0x625f3(%rip), %rcx # 0xbc78a
movl $0xdd, %edx
callq 0x512a0
nop
|
_ZN10OpenSubdiv6v3_6_03Vtr8internal14FVarRefinement32populateChildValuesForEdgeVertexEii:
push rbp
push r15
push r14
push r13
push r12
push rbx
push rax
mov r15d, esi
mov r13, rdi
mov rdi, [rdi+8]; this
mov esi, edx; int
call __ZNK10OpenSubdiv6v3_6_03Vtr8internal5Level12getEdgeFacesEi; OpenSubdiv::v3_6_0::Vtr::internal::Level::getEdgeFaces(int)
mov ebx, edx
cmp edx, 1
jnz short loc_5A0BC
loc_5A0AB:
mov eax, ebx
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_5A0BC:
mov r14, rax
mov rax, [r13+20h]
movsxd rcx, r15d
mov rdx, [rax+60h]
xor eax, eax
test ebx, ebx
mov ebp, 0
cmovg ebp, ebx
movsxd rcx, dword ptr [rdx+rcx*4]
add rcx, rcx
add rcx, [r13+28h]
loc_5A0E1:
cmp rbp, rax
jz short loc_5A0EF
mov [rcx+rax*2], ax
inc rax
jmp short loc_5A0E1
loc_5A0EF:
mov rdi, [r13+18h]; this
mov esi, r15d; int
call __ZNK10OpenSubdiv6v3_6_03Vtr8internal5Level14getVertexFacesEi; OpenSubdiv::v3_6_0::Vtr::internal::Level::getVertexFaces(int)
mov esi, r15d; int
mov r15, rax
mov r12d, edx
mov rdi, [r13+20h]; this
call __ZN10OpenSubdiv6v3_6_03Vtr8internal9FVarLevel21getVertexFaceSiblingsEi; OpenSubdiv::v3_6_0::Vtr::internal::FVarLevel::getVertexFaceSiblings(int)
cmp r12d, edx
jnz short loc_5A163
cmp r12d, ebx
jl short loc_5A182
mov rcx, [r13+0]
xor edx, edx
test r12d, r12d
cmovle r12d, edx
loc_5A124:
cmp rdx, r12
jz short loc_5A0AB
movsxd rsi, dword ptr [r15+rdx*4]
mov rdi, [rcx+108h]
mov esi, [rdi+rsi*4]
cmp ebx, 2
jnz short loc_5A14D
cmp esi, [r14+4]
jnz short loc_5A148
mov word ptr [rax+rdx*2], 1
loc_5A148:
inc rdx
jmp short loc_5A124
loc_5A14D:
xor edi, edi
loc_5A14F:
cmp rbp, rdi
jz short loc_5A148
cmp esi, [r14+rdi*4]
jnz short loc_5A15E
mov [rax+rdx*2], di
loc_5A15E:
inc rdi
jmp short loc_5A14F
loc_5A163:
lea rdi, aCvertfacesSize; "cVertFaces.size() == cVertFaceSiblings."...
lea rsi, aWorkspaceLlm4b_1; "/workspace/llm4binary/github/2025_star3"...
lea rcx, aIntOpensubdivV; "int OpenSubdiv::v3_6_0::Vtr::internal::"...
mov edx, 0DCh
call ___assert_fail
loc_5A182:
lea rdi, aCvertfacesSize_0; "cVertFaces.size() >= cValueCount"
lea rsi, aWorkspaceLlm4b_1; "/workspace/llm4binary/github/2025_star3"...
lea rcx, aIntOpensubdivV; "int OpenSubdiv::v3_6_0::Vtr::internal::"...
mov edx, 0DDh
call ___assert_fail
|
long long OpenSubdiv::v3_6_0::Vtr::internal::FVarRefinement::populateChildValuesForEdgeVertex(
OpenSubdiv::v3_6_0::Vtr::internal::Level **this,
int a2,
int a3)
{
long long EdgeFaces; // rax
int v4; // edx
int v5; // ebx
long long v7; // r14
long long v8; // rax
long long v9; // rbp
long long v10; // rcx
long long VertexFaces; // r15
unsigned int v12; // edx
long long v13; // r12
long long VertexFaceSiblings; // rax
int v15; // edx
OpenSubdiv::v3_6_0::Vtr::internal::Level *v16; // rcx
long long v17; // rdx
int v18; // esi
long long i; // rdi
EdgeFaces = OpenSubdiv::v3_6_0::Vtr::internal::Level::getEdgeFaces(this[1], a3);
v5 = v4;
if ( v4 != 1 )
{
v7 = EdgeFaces;
v8 = 0LL;
v9 = 0LL;
if ( v4 > 0 )
v9 = (unsigned int)v4;
v10 = (long long)this[5] + 2 * *(int *)(*((_QWORD *)this[4] + 12) + 4LL * a2);
while ( v9 != v8 )
{
*(_WORD *)(v10 + 2 * v8) = v8;
++v8;
}
VertexFaces = OpenSubdiv::v3_6_0::Vtr::internal::Level::getVertexFaces(this[3], a2);
v13 = v12;
VertexFaceSiblings = OpenSubdiv::v3_6_0::Vtr::internal::FVarLevel::getVertexFaceSiblings(this[4], a2);
if ( (_DWORD)v13 != v15 )
__assert_fail(
"cVertFaces.size() == cVertFaceSiblings.size()",
"/workspace/llm4binary/github/2025_star3/NVIDIA-RTX[P]OSD-Lite/opensubdiv/vtr/fvarRefinement.cpp",
220LL,
"int OpenSubdiv::v3_6_0::Vtr::internal::FVarRefinement::populateChildValuesForEdgeVertex(Index, Index)");
if ( (int)v13 < v5 )
__assert_fail(
"cVertFaces.size() >= cValueCount",
"/workspace/llm4binary/github/2025_star3/NVIDIA-RTX[P]OSD-Lite/opensubdiv/vtr/fvarRefinement.cpp",
221LL,
"int OpenSubdiv::v3_6_0::Vtr::internal::FVarRefinement::populateChildValuesForEdgeVertex(Index, Index)");
v16 = *this;
v17 = 0LL;
if ( (int)v13 <= 0 )
v13 = 0LL;
while ( v17 != v13 )
{
v18 = *(_DWORD *)(*((_QWORD *)v16 + 33) + 4LL * *(int *)(VertexFaces + 4 * v17));
if ( v5 == 2 )
{
if ( v18 == *(_DWORD *)(v7 + 4) )
*(_WORD *)(VertexFaceSiblings + 2 * v17) = 1;
}
else
{
for ( i = 0LL; v9 != i; ++i )
{
if ( v18 == *(_DWORD *)(v7 + 4 * i) )
*(_WORD *)(VertexFaceSiblings + 2 * v17) = i;
}
}
++v17;
}
}
return (unsigned int)v5;
}
|
populateChildValuesForEdgeVertex:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
PUSH RAX
MOV R15D,ESI
MOV R13,RDI
MOV RDI,qword ptr [RDI + 0x8]
MOV ESI,EDX
CALL 0x00152330
MOV EBX,EDX
CMP EDX,0x1
JNZ 0x0015a0bc
LAB_0015a0ab:
MOV EAX,EBX
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_0015a0bc:
MOV R14,RAX
MOV RAX,qword ptr [R13 + 0x20]
MOVSXD RCX,R15D
MOV RDX,qword ptr [RAX + 0x60]
XOR EAX,EAX
TEST EBX,EBX
MOV EBP,0x0
CMOVG EBP,EBX
MOVSXD RCX,dword ptr [RDX + RCX*0x4]
ADD RCX,RCX
ADD RCX,qword ptr [R13 + 0x28]
LAB_0015a0e1:
CMP RBP,RAX
JZ 0x0015a0ef
MOV word ptr [RCX + RAX*0x2],AX
INC RAX
JMP 0x0015a0e1
LAB_0015a0ef:
MOV RDI,qword ptr [R13 + 0x18]
MOV ESI,R15D
CALL 0x00155df0
MOV ESI,R15D
MOV R15,RAX
MOV R12D,EDX
MOV RDI,qword ptr [R13 + 0x20]
CALL 0x00154000
CMP R12D,EDX
JNZ 0x0015a163
CMP R12D,EBX
JL 0x0015a182
MOV RCX,qword ptr [R13]
XOR EDX,EDX
TEST R12D,R12D
CMOVLE R12D,EDX
LAB_0015a124:
CMP RDX,R12
JZ 0x0015a0ab
MOVSXD RSI,dword ptr [R15 + RDX*0x4]
MOV RDI,qword ptr [RCX + 0x108]
MOV ESI,dword ptr [RDI + RSI*0x4]
CMP EBX,0x2
JNZ 0x0015a14d
CMP ESI,dword ptr [R14 + 0x4]
JNZ 0x0015a148
MOV word ptr [RAX + RDX*0x2],0x1
LAB_0015a148:
INC RDX
JMP 0x0015a124
LAB_0015a14d:
XOR EDI,EDI
LAB_0015a14f:
CMP RBP,RDI
JZ 0x0015a148
CMP ESI,dword ptr [R14 + RDI*0x4]
JNZ 0x0015a15e
MOV word ptr [RAX + RDX*0x2],DI
LAB_0015a15e:
INC RDI
JMP 0x0015a14f
LAB_0015a163:
LEA RDI,[0x1bc75c]
LEA RSI,[0x1bc5e5]
LEA RCX,[0x1bc78a]
MOV EDX,0xdc
CALL 0x001512a0
LAB_0015a182:
LEA RDI,[0x1bc7f0]
LEA RSI,[0x1bc5e5]
LEA RCX,[0x1bc78a]
MOV EDX,0xdd
CALL 0x001512a0
|
/* OpenSubdiv::v3_6_0::Vtr::internal::FVarRefinement::populateChildValuesForEdgeVertex(int, int) */
uint __thiscall
OpenSubdiv::v3_6_0::Vtr::internal::FVarRefinement::populateChildValuesForEdgeVertex
(FVarRefinement *this,int param_1,int param_2)
{
int iVar1;
long lVar2;
ulong uVar3;
uint uVar4;
uint uVar5;
ulong uVar6;
ulong uVar7;
ulong uVar8;
int1 auVar9 [12];
int1 auVar10 [12];
int1 auVar11 [12];
auVar9 = Level::getEdgeFaces(*(Level **)(this + 8),param_2);
uVar4 = auVar9._8_4_;
if (uVar4 != 1) {
uVar3 = 0;
uVar6 = 0;
if (0 < (int)uVar4) {
uVar6 = (ulong)uVar4;
}
iVar1 = *(int *)(*(long *)(*(long *)(this + 0x20) + 0x60) + (long)param_1 * 4);
lVar2 = *(long *)(this + 0x28);
for (; uVar6 != uVar3; uVar3 = uVar3 + 1) {
*(short *)((long)iVar1 * 2 + lVar2 + uVar3 * 2) = (short)uVar3;
}
auVar10 = Level::getVertexFaces(*(Level **)(this + 0x18),param_1);
uVar5 = auVar10._8_4_;
auVar11 = FVarLevel::getVertexFaceSiblings(*(FVarLevel **)(this + 0x20),param_1);
if (uVar5 != auVar11._8_4_) {
/* WARNING: Subroutine does not return */
__assert_fail("cVertFaces.size() == cVertFaceSiblings.size()",
"/workspace/llm4binary/github/2025_star3/NVIDIA-RTX[P]OSD-Lite/opensubdiv/vtr/fvarRefinement.cpp"
,0xdc,
"int OpenSubdiv::v3_6_0::Vtr::internal::FVarRefinement::populateChildValuesForEdgeVertex(Index, Index)"
);
}
if ((int)uVar5 < (int)uVar4) {
/* WARNING: Subroutine does not return */
__assert_fail("cVertFaces.size() >= cValueCount",
"/workspace/llm4binary/github/2025_star3/NVIDIA-RTX[P]OSD-Lite/opensubdiv/vtr/fvarRefinement.cpp"
,0xdd,
"int OpenSubdiv::v3_6_0::Vtr::internal::FVarRefinement::populateChildValuesForEdgeVertex(Index, Index)"
);
}
lVar2 = *(long *)this;
uVar3 = 0;
uVar8 = (ulong)uVar5;
if ((int)uVar5 < 1) {
uVar8 = 0;
}
for (; uVar3 != uVar8; uVar3 = uVar3 + 1) {
iVar1 = *(int *)(*(long *)(lVar2 + 0x108) + (long)*(int *)(auVar10._0_8_ + uVar3 * 4) * 4);
if (uVar4 == 2) {
if (iVar1 == *(int *)(auVar9._0_8_ + 4)) {
*(int2 *)(auVar11._0_8_ + uVar3 * 2) = 1;
}
}
else {
for (uVar7 = 0; uVar6 != uVar7; uVar7 = uVar7 + 1) {
if (iVar1 == *(int *)(auVar9._0_8_ + uVar7 * 4)) {
*(short *)(auVar11._0_8_ + uVar3 * 2) = (short)uVar7;
}
}
}
}
}
return uVar4;
}
|
|
8,933 |
OpenSubdiv::v3_6_0::Vtr::internal::FVarRefinement::populateChildValuesForEdgeVertex(int, int)
|
NVIDIA-RTX[P]OSD-Lite/opensubdiv/vtr/fvarRefinement.cpp
|
inline int
FVarRefinement::populateChildValuesForEdgeVertex(Index cVert, Index pEdge) {
//
// Determine the number of sibling values for the child vertex of this discts
// edge and populate their related topological data (e.g. source face).
//
// This turns out to be very simple. For FVar refinement to handle all cases
// of non-manifold edges, when an edge is discts we generate a FVar value for
// each face incident the edge. So in the uniform refinement case we will
// have as many child values as parent faces incident the edge. But even when
// refinement is sparse, if this edge-vertex is not complete, we will still be
// guaranteed that a child face exists for each parent face since one of the
// edge's end vertices must be complete and therefore include all child faces.
//
ConstIndexArray pEdgeFaces = _parentLevel.getEdgeFaces(pEdge);
if (pEdgeFaces.size() == 1) {
// No sibling so the first face (0) guaranteed to be a source and all
// sibling indices per incident face will also be 0 -- all of which was
// done on initialization, so nothing further to do.
return 1;
}
//
// Update the parent-source of all child values:
//
int cValueCount = pEdgeFaces.size();
Index cValueOffset = _childFVar.getVertexValueOffset(cVert);
for (int i = 0; i < cValueCount; ++i) {
_childValueParentSource[cValueOffset + i] = (LocalIndex) i;
}
//
// Update the vertex-face siblings for the faces incident the child vertex:
//
ConstIndexArray cVertFaces = _childLevel.getVertexFaces(cVert);
FVarLevel::SiblingArray cVertFaceSiblings = _childFVar.getVertexFaceSiblings(cVert);
assert(cVertFaces.size() == cVertFaceSiblings.size());
assert(cVertFaces.size() >= cValueCount);
for (int i = 0; i < cVertFaceSiblings.size(); ++i) {
Index pFaceI = _refinement.getChildFaceParentFace(cVertFaces[i]);
if (pEdgeFaces.size() == 2) {
// Only two parent faces and all siblings previously initialized to 0:
if (pFaceI == pEdgeFaces[1]) {
cVertFaceSiblings[i] = (LocalIndex) 1;
}
} else {
// Non-manifold case with > 2 parent faces -- match child faces to parent:
for (int j = 0; j < pEdgeFaces.size(); ++j) {
if (pFaceI == pEdgeFaces[j]) {
cVertFaceSiblings[i] = (LocalIndex) j;
}
}
}
}
return cValueCount;
}
|
O3
|
cpp
|
OpenSubdiv::v3_6_0::Vtr::internal::FVarRefinement::populateChildValuesForEdgeVertex(int, int):
pushq %rbx
movq 0x8(%rdi), %r8
leal (%rdx,%rdx), %eax
movq 0x90(%r8), %rcx
cltq
movl (%rcx,%rax,4), %eax
cmpq $0x1, %rax
je 0x427af
leal 0x1(,%rdx,2), %edx
movslq %edx, %rdx
movslq (%rcx,%rdx,4), %rcx
shlq $0x2, %rcx
addq 0xa8(%r8), %rcx
movq 0x20(%rdi), %rdx
testl %eax, %eax
jle 0x4270d
movq 0x60(%rdx), %r8
movslq %esi, %r9
movslq (%r8,%r9,4), %r9
movq 0x28(%rdi), %r10
leal 0x7(%rax), %r8d
andl $-0x8, %r8d
leaq -0x1(%rax), %r11
movq %r11, %xmm0
pshufd $0x44, %xmm0, %xmm0 # xmm0 = xmm0[0,1,0,1]
leaq (%r10,%r9,2), %r9
addq $0xe, %r9
movdqa 0x72bd2(%rip), %xmm1 # 0xb5030
movdqa 0x72bda(%rip), %xmm2 # 0xb5040
movdqa 0x72be2(%rip), %xmm3 # 0xb5050
movdqa 0x72bea(%rip), %xmm4 # 0xb5060
xorl %r10d, %r10d
movdqa 0x72bef(%rip), %xmm5 # 0xb5070
pxor %xmm5, %xmm0
pcmpeqd %xmm6, %xmm6
movdqa 0x7318f(%rip), %xmm7 # 0xb5620
movdqa %xmm4, %xmm8
pxor %xmm5, %xmm8
movdqa %xmm8, %xmm10
pcmpgtd %xmm0, %xmm10
pshufd $0xa0, %xmm10, %xmm9 # xmm9 = xmm10[0,0,2,2]
pshuflw $0xe8, %xmm9, %xmm11 # xmm11 = xmm9[0,2,2,3,4,5,6,7]
pcmpeqd %xmm0, %xmm8
pshufd $0xf5, %xmm8, %xmm8 # xmm8 = xmm8[1,1,3,3]
pshuflw $0xe8, %xmm8, %xmm12 # xmm12 = xmm8[0,2,2,3,4,5,6,7]
pand %xmm11, %xmm12
pshufd $0xf5, %xmm10, %xmm10 # xmm10 = xmm10[1,1,3,3]
pshuflw $0xe8, %xmm10, %xmm11 # xmm11 = xmm10[0,2,2,3,4,5,6,7]
por %xmm12, %xmm11
pxor %xmm6, %xmm11
packssdw %xmm11, %xmm11
movd %xmm11, %r11d
testb $0x1, %r11b
je 0x424f3
movw %r10w, -0xe(%r9,%r10,2)
pand %xmm9, %xmm8
por %xmm10, %xmm8
packssdw %xmm8, %xmm8
pxor %xmm6, %xmm8
packssdw %xmm8, %xmm8
movd %xmm8, %r11d
shrl $0x10, %r11d
testb $0x1, %r11b
je 0x42525
leal 0x1(%r10), %r11d
movw %r11w, -0xc(%r9,%r10,2)
movdqa %xmm3, %xmm9
pxor %xmm5, %xmm9
movdqa %xmm9, %xmm10
pcmpgtd %xmm0, %xmm10
pshufd $0xa0, %xmm10, %xmm8 # xmm8 = xmm10[0,0,2,2]
pcmpeqd %xmm0, %xmm9
pshufd $0xf5, %xmm9, %xmm9 # xmm9 = xmm9[1,1,3,3]
movdqa %xmm9, %xmm11
pand %xmm8, %xmm11
pshufd $0xf5, %xmm10, %xmm10 # xmm10 = xmm10[1,1,3,3]
por %xmm10, %xmm11
packssdw %xmm11, %xmm11
pxor %xmm6, %xmm11
packssdw %xmm11, %xmm11
pextrw $0x2, %xmm11, %r11d
testb $0x1, %r11b
je 0x42584
leal 0x2(%r10), %r11d
movw %r11w, -0xa(%r9,%r10,2)
pshufhw $0x84, %xmm8, %xmm8 # xmm8 = xmm8[0,1,2,3,4,5,4,6]
pshufhw $0x84, %xmm9, %xmm9 # xmm9 = xmm9[0,1,2,3,4,5,4,6]
pand %xmm8, %xmm9
pshufhw $0x84, %xmm10, %xmm8 # xmm8 = xmm10[0,1,2,3,4,5,4,6]
por %xmm9, %xmm8
pxor %xmm6, %xmm8
packssdw %xmm8, %xmm8
pextrw $0x3, %xmm8, %r11d
testb $0x1, %r11b
je 0x425c0
leal 0x3(%r10), %r11d
movw %r11w, -0x8(%r9,%r10,2)
movdqa %xmm2, %xmm8
pxor %xmm5, %xmm8
movdqa %xmm8, %xmm10
pcmpgtd %xmm0, %xmm10
pshufd $0xa0, %xmm10, %xmm9 # xmm9 = xmm10[0,0,2,2]
pshuflw $0xe8, %xmm9, %xmm11 # xmm11 = xmm9[0,2,2,3,4,5,6,7]
pcmpeqd %xmm0, %xmm8
pshufd $0xf5, %xmm8, %xmm8 # xmm8 = xmm8[1,1,3,3]
pshuflw $0xe8, %xmm8, %xmm12 # xmm12 = xmm8[0,2,2,3,4,5,6,7]
pand %xmm11, %xmm12
pshufd $0xf5, %xmm10, %xmm10 # xmm10 = xmm10[1,1,3,3]
pshuflw $0xe8, %xmm10, %xmm11 # xmm11 = xmm10[0,2,2,3,4,5,6,7]
por %xmm12, %xmm11
pxor %xmm6, %xmm11
packssdw %xmm11, %xmm11
pextrw $0x4, %xmm11, %r11d
testb $0x1, %r11b
je 0x42627
leal 0x4(%r10), %r11d
movw %r11w, -0x6(%r9,%r10,2)
pand %xmm9, %xmm8
por %xmm10, %xmm8
packssdw %xmm8, %xmm8
pxor %xmm6, %xmm8
packssdw %xmm8, %xmm8
pextrw $0x5, %xmm8, %r11d
testb $0x1, %r11b
je 0x42656
leal 0x5(%r10), %r11d
movw %r11w, -0x4(%r9,%r10,2)
movdqa %xmm1, %xmm9
pxor %xmm5, %xmm9
movdqa %xmm9, %xmm10
pcmpgtd %xmm0, %xmm10
pshufd $0xa0, %xmm10, %xmm8 # xmm8 = xmm10[0,0,2,2]
pcmpeqd %xmm0, %xmm9
pshufd $0xf5, %xmm9, %xmm9 # xmm9 = xmm9[1,1,3,3]
movdqa %xmm9, %xmm11
pand %xmm8, %xmm11
pshufd $0xf5, %xmm10, %xmm10 # xmm10 = xmm10[1,1,3,3]
por %xmm10, %xmm11
packssdw %xmm11, %xmm11
pxor %xmm6, %xmm11
packssdw %xmm11, %xmm11
pextrw $0x6, %xmm11, %r11d
testb $0x1, %r11b
je 0x426b5
leal 0x6(%r10), %r11d
movw %r11w, -0x2(%r9,%r10,2)
pshufhw $0x84, %xmm8, %xmm8 # xmm8 = xmm8[0,1,2,3,4,5,4,6]
pshufhw $0x84, %xmm9, %xmm9 # xmm9 = xmm9[0,1,2,3,4,5,4,6]
pand %xmm8, %xmm9
pshufhw $0x84, %xmm10, %xmm8 # xmm8 = xmm10[0,1,2,3,4,5,4,6]
por %xmm9, %xmm8
pxor %xmm6, %xmm8
packssdw %xmm8, %xmm8
pextrw $0x7, %xmm8, %r11d
testb $0x1, %r11b
je 0x426f0
leal 0x7(%r10), %r11d
movw %r11w, (%r9,%r10,2)
addq $0x8, %r10
paddq %xmm7, %xmm4
paddq %xmm7, %xmm3
paddq %xmm7, %xmm2
paddq %xmm7, %xmm1
cmpq %r10, %r8
jne 0x42491
movq 0x18(%rdi), %r9
leal (%rsi,%rsi), %r8d
movq 0x108(%r9), %r10
movslq %r8d, %rbx
movl (%r10,%rbx,4), %r8d
movq (%rdx), %r11
movq 0x108(%r11), %r11
cmpl (%r11,%rbx,4), %r8d
jne 0x427b1
cmpl %eax, %r8d
jl 0x427d0
testl %r8d, %r8d
jle 0x427af
leal 0x1(,%rsi,2), %esi
movslq %esi, %rbx
movslq (%r10,%rbx,4), %rsi
shlq $0x2, %rsi
addq 0x120(%r9), %rsi
movslq (%r11,%rbx,4), %r9
addq %r9, %r9
addq 0x78(%rdx), %r9
movq (%rdi), %rdx
movq 0x108(%rdx), %rdx
xorl %edi, %edi
movslq (%rsi,%rdi,4), %r10
movl (%rdx,%r10,4), %r10d
cmpl $0x2, %eax
jne 0x4278d
cmpl 0x4(%rcx), %r10d
jne 0x427a7
movw $0x1, (%r9,%rdi,2)
jmp 0x427a7
testl %eax, %eax
jle 0x427a7
xorl %r11d, %r11d
cmpl (%rcx,%r11,4), %r10d
jne 0x4279f
movw %r11w, (%r9,%rdi,2)
incq %r11
cmpq %r11, %rax
jne 0x42794
incq %rdi
cmpq %r8, %rdi
jne 0x42771
popq %rbx
retq
leaq 0x73018(%rip), %rdi # 0xb57d0
leaq 0x72e9a(%rip), %rsi # 0xb5659
leaq 0x73038(%rip), %rcx # 0xb57fe
movl $0xdc, %edx
callq 0x39540
leaq 0x7308d(%rip), %rdi # 0xb5864
leaq 0x72e7b(%rip), %rsi # 0xb5659
leaq 0x73019(%rip), %rcx # 0xb57fe
movl $0xdd, %edx
callq 0x39540
nop
|
_ZN10OpenSubdiv6v3_6_03Vtr8internal14FVarRefinement32populateChildValuesForEdgeVertexEii:
push rbx
mov r8, [rdi+8]
lea eax, [rdx+rdx]
mov rcx, [r8+90h]
cdqe
mov eax, [rcx+rax*4]
cmp rax, 1
jz loc_427AF
lea edx, ds:1[rdx*2]
movsxd rdx, edx
movsxd rcx, dword ptr [rcx+rdx*4]
shl rcx, 2
add rcx, [r8+0A8h]
mov rdx, [rdi+20h]
test eax, eax
jle loc_4270D
mov r8, [rdx+60h]
movsxd r9, esi
movsxd r9, dword ptr [r8+r9*4]
mov r10, [rdi+28h]
lea r8d, [rax+7]
and r8d, 0FFFFFFF8h
lea r11, [rax-1]
movq xmm0, r11
pshufd xmm0, xmm0, 44h ; 'D'
lea r9, [r10+r9*2]
add r9, 0Eh
movdqa xmm1, cs:xmmword_B5030
movdqa xmm2, cs:xmmword_B5040
movdqa xmm3, cs:xmmword_B5050
movdqa xmm4, cs:xmmword_B5060
xor r10d, r10d
movdqa xmm5, cs:xmmword_B5070
pxor xmm0, xmm5
pcmpeqd xmm6, xmm6
movdqa xmm7, cs:xmmword_B5620
loc_42491:
movdqa xmm8, xmm4
pxor xmm8, xmm5
movdqa xmm10, xmm8
pcmpgtd xmm10, xmm0
pshufd xmm9, xmm10, 0A0h
pshuflw xmm11, xmm9, 0E8h
pcmpeqd xmm8, xmm0
pshufd xmm8, xmm8, 0F5h
pshuflw xmm12, xmm8, 0E8h
pand xmm12, xmm11
pshufd xmm10, xmm10, 0F5h
pshuflw xmm11, xmm10, 0E8h
por xmm11, xmm12
pxor xmm11, xmm6
packssdw xmm11, xmm11
movd r11d, xmm11
test r11b, 1
jz short loc_424F3
mov [r9+r10*2-0Eh], r10w
loc_424F3:
pand xmm8, xmm9
por xmm8, xmm10
packssdw xmm8, xmm8
pxor xmm8, xmm6
packssdw xmm8, xmm8
movd r11d, xmm8
shr r11d, 10h
test r11b, 1
jz short loc_42525
lea r11d, [r10+1]
mov [r9+r10*2-0Ch], r11w
loc_42525:
movdqa xmm9, xmm3
pxor xmm9, xmm5
movdqa xmm10, xmm9
pcmpgtd xmm10, xmm0
pshufd xmm8, xmm10, 0A0h
pcmpeqd xmm9, xmm0
pshufd xmm9, xmm9, 0F5h
movdqa xmm11, xmm9
pand xmm11, xmm8
pshufd xmm10, xmm10, 0F5h
por xmm11, xmm10
packssdw xmm11, xmm11
pxor xmm11, xmm6
packssdw xmm11, xmm11
pextrw r11d, xmm11, 2
test r11b, 1
jz short loc_42584
lea r11d, [r10+2]
mov [r9+r10*2-0Ah], r11w
loc_42584:
pshufhw xmm8, xmm8, 84h
pshufhw xmm9, xmm9, 84h
pand xmm9, xmm8
pshufhw xmm8, xmm10, 84h
por xmm8, xmm9
pxor xmm8, xmm6
packssdw xmm8, xmm8
pextrw r11d, xmm8, 3
test r11b, 1
jz short loc_425C0
lea r11d, [r10+3]
mov [r9+r10*2-8], r11w
loc_425C0:
movdqa xmm8, xmm2
pxor xmm8, xmm5
movdqa xmm10, xmm8
pcmpgtd xmm10, xmm0
pshufd xmm9, xmm10, 0A0h
pshuflw xmm11, xmm9, 0E8h
pcmpeqd xmm8, xmm0
pshufd xmm8, xmm8, 0F5h
pshuflw xmm12, xmm8, 0E8h
pand xmm12, xmm11
pshufd xmm10, xmm10, 0F5h
pshuflw xmm11, xmm10, 0E8h
por xmm11, xmm12
pxor xmm11, xmm6
packssdw xmm11, xmm11
pextrw r11d, xmm11, 4
test r11b, 1
jz short loc_42627
lea r11d, [r10+4]
mov [r9+r10*2-6], r11w
loc_42627:
pand xmm8, xmm9
por xmm8, xmm10
packssdw xmm8, xmm8
pxor xmm8, xmm6
packssdw xmm8, xmm8
pextrw r11d, xmm8, 5
test r11b, 1
jz short loc_42656
lea r11d, [r10+5]
mov [r9+r10*2-4], r11w
loc_42656:
movdqa xmm9, xmm1
pxor xmm9, xmm5
movdqa xmm10, xmm9
pcmpgtd xmm10, xmm0
pshufd xmm8, xmm10, 0A0h
pcmpeqd xmm9, xmm0
pshufd xmm9, xmm9, 0F5h
movdqa xmm11, xmm9
pand xmm11, xmm8
pshufd xmm10, xmm10, 0F5h
por xmm11, xmm10
packssdw xmm11, xmm11
pxor xmm11, xmm6
packssdw xmm11, xmm11
pextrw r11d, xmm11, 6
test r11b, 1
jz short loc_426B5
lea r11d, [r10+6]
mov [r9+r10*2-2], r11w
loc_426B5:
pshufhw xmm8, xmm8, 84h
pshufhw xmm9, xmm9, 84h
pand xmm9, xmm8
pshufhw xmm8, xmm10, 84h
por xmm8, xmm9
pxor xmm8, xmm6
packssdw xmm8, xmm8
pextrw r11d, xmm8, 7
test r11b, 1
jz short loc_426F0
lea r11d, [r10+7]
mov [r9+r10*2], r11w
loc_426F0:
add r10, 8
paddq xmm4, xmm7
paddq xmm3, xmm7
paddq xmm2, xmm7
paddq xmm1, xmm7
cmp r8, r10
jnz loc_42491
loc_4270D:
mov r9, [rdi+18h]
lea r8d, [rsi+rsi]
mov r10, [r9+108h]
movsxd rbx, r8d
mov r8d, [r10+rbx*4]
mov r11, [rdx]
mov r11, [r11+108h]
cmp r8d, [r11+rbx*4]
jnz short loc_427B1
cmp r8d, eax
jl loc_427D0
test r8d, r8d
jle short loc_427AF
lea esi, ds:1[rsi*2]
movsxd rbx, esi
movsxd rsi, dword ptr [r10+rbx*4]
shl rsi, 2
add rsi, [r9+120h]
movsxd r9, dword ptr [r11+rbx*4]
add r9, r9
add r9, [rdx+78h]
mov rdx, [rdi]
mov rdx, [rdx+108h]
xor edi, edi
loc_42771:
movsxd r10, dword ptr [rsi+rdi*4]
mov r10d, [rdx+r10*4]
cmp eax, 2
jnz short loc_4278D
cmp r10d, [rcx+4]
jnz short loc_427A7
mov word ptr [r9+rdi*2], 1
jmp short loc_427A7
loc_4278D:
test eax, eax
jle short loc_427A7
xor r11d, r11d
loc_42794:
cmp r10d, [rcx+r11*4]
jnz short loc_4279F
mov [r9+rdi*2], r11w
loc_4279F:
inc r11
cmp rax, r11
jnz short loc_42794
loc_427A7:
inc rdi
cmp rdi, r8
jnz short loc_42771
loc_427AF:
pop rbx
retn
loc_427B1:
lea rdi, aCvertfacesSize; "cVertFaces.size() == cVertFaceSiblings."...
lea rsi, aWorkspaceLlm4b_1; "/workspace/llm4binary/github/2025_star3"...
lea rcx, aIntOpensubdivV_0; "int OpenSubdiv::v3_6_0::Vtr::internal::"...
mov edx, 0DCh
call ___assert_fail
loc_427D0:
lea rdi, aCvertfacesSize_0; "cVertFaces.size() >= cValueCount"
lea rsi, aWorkspaceLlm4b_1; "/workspace/llm4binary/github/2025_star3"...
lea rcx, aIntOpensubdivV_0; "int OpenSubdiv::v3_6_0::Vtr::internal::"...
mov edx, 0DDh
call ___assert_fail
|
long long OpenSubdiv::v3_6_0::Vtr::internal::FVarRefinement::populateChildValuesForEdgeVertex(
OpenSubdiv::v3_6_0::Vtr::internal::FVarRefinement *this,
int a2,
int a3)
{
long long v3; // r8
long long v4; // rcx
long long result; // rax
long long v6; // rcx
_QWORD *v7; // rdx
long long v8; // r9
__m128i si128; // xmm1
__m128i v10; // xmm2
__m128i v11; // xmm3
__m128i v12; // xmm4
long long v13; // r10
__m128i v14; // xmm5
__m128i v15; // xmm0
__m128i v16; // xmm7
__m128i v17; // xmm8
__m128i v18; // xmm10
__m128i v19; // xmm9
__m128i v20; // xmm8
__m128i v21; // xmm10
__m128i v22; // xmm11
__m128i v23; // xmm8
__m128i v24; // xmm8
__m128i v25; // xmm9
__m128i v26; // xmm10
__m128i v27; // xmm8
__m128i v28; // xmm9
__m128i v29; // xmm10
__m128i v30; // xmm11
__m128i v31; // xmm11
__m128i v32; // xmm8
__m128i v33; // xmm8
__m128i v34; // xmm10
__m128i v35; // xmm9
__m128i v36; // xmm8
__m128i v37; // xmm10
__m128i v38; // xmm11
__m128i v39; // xmm8
__m128i v40; // xmm8
__m128i v41; // xmm9
__m128i v42; // xmm10
__m128i v43; // xmm8
__m128i v44; // xmm9
__m128i v45; // xmm10
__m128i v46; // xmm11
__m128i v47; // xmm11
__m128i v48; // xmm8
long long v49; // r9
long long v50; // r10
long long v51; // rbx
long long v52; // r8
long long v53; // r11
long long v54; // rbx
long long v55; // rsi
long long v56; // r9
long long v57; // rdx
long long i; // rdi
int v59; // r10d
long long j; // r11
v3 = *((_QWORD *)this + 1);
v4 = *(_QWORD *)(v3 + 144);
result = *(unsigned int *)(v4 + 8LL * a3);
if ( result != 1 )
{
v6 = *(_QWORD *)(v3 + 168) + 4LL * *(int *)(v4 + 4LL * (2 * a3 + 1));
v7 = (_QWORD *)*((_QWORD *)this + 4);
if ( (int)result > 0 )
{
v8 = *((_QWORD *)this + 5) + 2LL * *(int *)(v7[12] + 4LL * a2) + 14;
si128 = _mm_load_si128((const __m128i *)&xmmword_B5030);
v10 = _mm_load_si128((const __m128i *)&xmmword_B5040);
v11 = _mm_load_si128((const __m128i *)&xmmword_B5050);
v12 = _mm_load_si128((const __m128i *)&xmmword_B5060);
v13 = 0LL;
v14 = _mm_load_si128((const __m128i *)&xmmword_B5070);
v15 = _mm_xor_si128(_mm_shuffle_epi32((__m128i)(unsigned long long)(result - 1), 68), v14);
v16 = _mm_load_si128((const __m128i *)&xmmword_B5620);
do
{
v17 = _mm_xor_si128(v12, v14);
v18 = _mm_cmpgt_epi32(v17, v15);
v19 = _mm_shuffle_epi32(v18, 160);
v20 = _mm_shuffle_epi32(_mm_cmpeq_epi32(v17, v15), 245);
v21 = _mm_shuffle_epi32(v18, 245);
v22 = _mm_xor_si128(
_mm_or_si128(
_mm_shufflelo_epi16(v21, 232),
_mm_and_si128(_mm_shufflelo_epi16(v20, 232), _mm_shufflelo_epi16(v19, 232))),
(__m128i)-1LL);
if ( (_mm_cvtsi128_si32(_mm_packs_epi32(v22, v22)) & 1) != 0 )
*(_WORD *)(v8 + 2 * v13 - 14) = v13;
v23 = _mm_or_si128(_mm_and_si128(v20, v19), v21);
v24 = _mm_xor_si128(_mm_packs_epi32(v23, v23), (__m128i)-1LL);
if ( (_mm_cvtsi128_si32(_mm_packs_epi32(v24, v24)) & 0x10000) != 0 )
*(_WORD *)(v8 + 2 * v13 - 12) = v13 + 1;
v25 = _mm_xor_si128(v11, v14);
v26 = _mm_cmpgt_epi32(v25, v15);
v27 = _mm_shuffle_epi32(v26, 160);
v28 = _mm_shuffle_epi32(_mm_cmpeq_epi32(v25, v15), 245);
v29 = _mm_shuffle_epi32(v26, 245);
v30 = _mm_or_si128(_mm_and_si128(v28, v27), v29);
v31 = _mm_xor_si128(_mm_packs_epi32(v30, v30), (__m128i)-1LL);
if ( (_mm_extract_epi16(_mm_packs_epi32(v31, v31), 2) & 1) != 0 )
*(_WORD *)(v8 + 2 * v13 - 10) = v13 + 2;
v32 = _mm_xor_si128(
_mm_or_si128(
_mm_shufflehi_epi16(v29, 132),
_mm_and_si128(_mm_shufflehi_epi16(v28, 132), _mm_shufflehi_epi16(v27, 132))),
(__m128i)-1LL);
if ( (_mm_extract_epi16(_mm_packs_epi32(v32, v32), 3) & 1) != 0 )
*(_WORD *)(v8 + 2 * v13 - 8) = v13 + 3;
v33 = _mm_xor_si128(v10, v14);
v34 = _mm_cmpgt_epi32(v33, v15);
v35 = _mm_shuffle_epi32(v34, 160);
v36 = _mm_shuffle_epi32(_mm_cmpeq_epi32(v33, v15), 245);
v37 = _mm_shuffle_epi32(v34, 245);
v38 = _mm_xor_si128(
_mm_or_si128(
_mm_shufflelo_epi16(v37, 232),
_mm_and_si128(_mm_shufflelo_epi16(v36, 232), _mm_shufflelo_epi16(v35, 232))),
(__m128i)-1LL);
if ( (_mm_extract_epi16(_mm_packs_epi32(v38, v38), 4) & 1) != 0 )
*(_WORD *)(v8 + 2 * v13 - 6) = v13 + 4;
v39 = _mm_or_si128(_mm_and_si128(v36, v35), v37);
v40 = _mm_xor_si128(_mm_packs_epi32(v39, v39), (__m128i)-1LL);
if ( (_mm_extract_epi16(_mm_packs_epi32(v40, v40), 5) & 1) != 0 )
*(_WORD *)(v8 + 2 * v13 - 4) = v13 + 5;
v41 = _mm_xor_si128(si128, v14);
v42 = _mm_cmpgt_epi32(v41, v15);
v43 = _mm_shuffle_epi32(v42, 160);
v44 = _mm_shuffle_epi32(_mm_cmpeq_epi32(v41, v15), 245);
v45 = _mm_shuffle_epi32(v42, 245);
v46 = _mm_or_si128(_mm_and_si128(v44, v43), v45);
v47 = _mm_xor_si128(_mm_packs_epi32(v46, v46), (__m128i)-1LL);
if ( (_mm_extract_epi16(_mm_packs_epi32(v47, v47), 6) & 1) != 0 )
*(_WORD *)(v8 + 2 * v13 - 2) = v13 + 6;
v48 = _mm_xor_si128(
_mm_or_si128(
_mm_shufflehi_epi16(v45, 132),
_mm_and_si128(_mm_shufflehi_epi16(v44, 132), _mm_shufflehi_epi16(v43, 132))),
(__m128i)-1LL);
if ( (_mm_extract_epi16(_mm_packs_epi32(v48, v48), 7) & 1) != 0 )
*(_WORD *)(v8 + 2 * v13) = v13 + 7;
v13 += 8LL;
v12 = _mm_add_epi64(v12, v16);
v11 = _mm_add_epi64(v11, v16);
v10 = _mm_add_epi64(v10, v16);
si128 = _mm_add_epi64(si128, v16);
}
while ( (((_DWORD)result + 7) & 0xFFFFFFF8) != v13 );
}
v49 = *((_QWORD *)this + 3);
v50 = *(_QWORD *)(v49 + 264);
v51 = 2 * a2;
v52 = *(unsigned int *)(v50 + 4 * v51);
v53 = *(_QWORD *)(*v7 + 264LL);
if ( (_DWORD)v52 != *(_DWORD *)(v53 + 4 * v51) )
__assert_fail(
"cVertFaces.size() == cVertFaceSiblings.size()",
"/workspace/llm4binary/github/2025_star3/NVIDIA-RTX[P]OSD-Lite/opensubdiv/vtr/fvarRefinement.cpp",
220LL,
"int OpenSubdiv::v3_6_0::Vtr::internal::FVarRefinement::populateChildValuesForEdgeVertex(Index, Index)");
if ( (int)v52 < (int)result )
__assert_fail(
"cVertFaces.size() >= cValueCount",
"/workspace/llm4binary/github/2025_star3/NVIDIA-RTX[P]OSD-Lite/opensubdiv/vtr/fvarRefinement.cpp",
221LL,
"int OpenSubdiv::v3_6_0::Vtr::internal::FVarRefinement::populateChildValuesForEdgeVertex(Index, Index)");
if ( (int)v52 > 0 )
{
v54 = 2 * a2 + 1;
v55 = *(_QWORD *)(v49 + 288) + 4LL * *(int *)(v50 + 4 * v54);
v56 = v7[15] + 2LL * *(int *)(v53 + 4 * v54);
v57 = *(_QWORD *)(*(_QWORD *)this + 264LL);
for ( i = 0LL; i != v52; ++i )
{
v59 = *(_DWORD *)(v57 + 4LL * *(int *)(v55 + 4 * i));
if ( (_DWORD)result == 2 )
{
if ( v59 == *(_DWORD *)(v6 + 4) )
*(_WORD *)(v56 + 2 * i) = 1;
}
else if ( (int)result > 0 )
{
for ( j = 0LL; j != result; ++j )
{
if ( v59 == *(_DWORD *)(v6 + 4 * j) )
*(_WORD *)(v56 + 2 * i) = j;
}
}
}
}
}
return result;
}
|
populateChildValuesForEdgeVertex:
PUSH RBX
MOV R8,qword ptr [RDI + 0x8]
LEA EAX,[RDX + RDX*0x1]
MOV RCX,qword ptr [R8 + 0x90]
CDQE
MOV EAX,dword ptr [RCX + RAX*0x4]
CMP RAX,0x1
JZ 0x001427af
LEA EDX,[0x1 + RDX*0x2]
MOVSXD RDX,EDX
MOVSXD RCX,dword ptr [RCX + RDX*0x4]
SHL RCX,0x2
ADD RCX,qword ptr [R8 + 0xa8]
MOV RDX,qword ptr [RDI + 0x20]
TEST EAX,EAX
JLE 0x0014270d
MOV R8,qword ptr [RDX + 0x60]
MOVSXD R9,ESI
MOVSXD R9,dword ptr [R8 + R9*0x4]
MOV R10,qword ptr [RDI + 0x28]
LEA R8D,[RAX + 0x7]
AND R8D,0xfffffff8
LEA R11,[RAX + -0x1]
MOVQ XMM0,R11
PSHUFD XMM0,XMM0,0x44
LEA R9,[R10 + R9*0x2]
ADD R9,0xe
MOVDQA XMM1,xmmword ptr [0x001b5030]
MOVDQA XMM2,xmmword ptr [0x001b5040]
MOVDQA XMM3,xmmword ptr [0x001b5050]
MOVDQA XMM4,xmmword ptr [0x001b5060]
XOR R10D,R10D
MOVDQA XMM5,xmmword ptr [0x001b5070]
PXOR XMM0,XMM5
PCMPEQD XMM6,XMM6
MOVDQA XMM7,xmmword ptr [0x001b5620]
LAB_00142491:
MOVDQA XMM8,XMM4
PXOR XMM8,XMM5
MOVDQA XMM10,XMM8
PCMPGTD XMM10,XMM0
PSHUFD XMM9,XMM10,0xa0
PSHUFLW XMM11,XMM9,0xe8
PCMPEQD XMM8,XMM0
PSHUFD XMM8,XMM8,0xf5
PSHUFLW XMM12,XMM8,0xe8
PAND XMM12,XMM11
PSHUFD XMM10,XMM10,0xf5
PSHUFLW XMM11,XMM10,0xe8
POR XMM11,XMM12
PXOR XMM11,XMM6
PACKSSDW XMM11,XMM11
MOVD R11D,XMM11
TEST R11B,0x1
JZ 0x001424f3
MOV word ptr [R9 + R10*0x2 + -0xe],R10W
LAB_001424f3:
PAND XMM8,XMM9
POR XMM8,XMM10
PACKSSDW XMM8,XMM8
PXOR XMM8,XMM6
PACKSSDW XMM8,XMM8
MOVD R11D,XMM8
SHR R11D,0x10
TEST R11B,0x1
JZ 0x00142525
LEA R11D,[R10 + 0x1]
MOV word ptr [R9 + R10*0x2 + -0xc],R11W
LAB_00142525:
MOVDQA XMM9,XMM3
PXOR XMM9,XMM5
MOVDQA XMM10,XMM9
PCMPGTD XMM10,XMM0
PSHUFD XMM8,XMM10,0xa0
PCMPEQD XMM9,XMM0
PSHUFD XMM9,XMM9,0xf5
MOVDQA XMM11,XMM9
PAND XMM11,XMM8
PSHUFD XMM10,XMM10,0xf5
POR XMM11,XMM10
PACKSSDW XMM11,XMM11
PXOR XMM11,XMM6
PACKSSDW XMM11,XMM11
PEXTRW R11D,XMM11,0x2
TEST R11B,0x1
JZ 0x00142584
LEA R11D,[R10 + 0x2]
MOV word ptr [R9 + R10*0x2 + -0xa],R11W
LAB_00142584:
PSHUFHW XMM8,XMM8,0x84
PSHUFHW XMM9,XMM9,0x84
PAND XMM9,XMM8
PSHUFHW XMM8,XMM10,0x84
POR XMM8,XMM9
PXOR XMM8,XMM6
PACKSSDW XMM8,XMM8
PEXTRW R11D,XMM8,0x3
TEST R11B,0x1
JZ 0x001425c0
LEA R11D,[R10 + 0x3]
MOV word ptr [R9 + R10*0x2 + -0x8],R11W
LAB_001425c0:
MOVDQA XMM8,XMM2
PXOR XMM8,XMM5
MOVDQA XMM10,XMM8
PCMPGTD XMM10,XMM0
PSHUFD XMM9,XMM10,0xa0
PSHUFLW XMM11,XMM9,0xe8
PCMPEQD XMM8,XMM0
PSHUFD XMM8,XMM8,0xf5
PSHUFLW XMM12,XMM8,0xe8
PAND XMM12,XMM11
PSHUFD XMM10,XMM10,0xf5
PSHUFLW XMM11,XMM10,0xe8
POR XMM11,XMM12
PXOR XMM11,XMM6
PACKSSDW XMM11,XMM11
PEXTRW R11D,XMM11,0x4
TEST R11B,0x1
JZ 0x00142627
LEA R11D,[R10 + 0x4]
MOV word ptr [R9 + R10*0x2 + -0x6],R11W
LAB_00142627:
PAND XMM8,XMM9
POR XMM8,XMM10
PACKSSDW XMM8,XMM8
PXOR XMM8,XMM6
PACKSSDW XMM8,XMM8
PEXTRW R11D,XMM8,0x5
TEST R11B,0x1
JZ 0x00142656
LEA R11D,[R10 + 0x5]
MOV word ptr [R9 + R10*0x2 + -0x4],R11W
LAB_00142656:
MOVDQA XMM9,XMM1
PXOR XMM9,XMM5
MOVDQA XMM10,XMM9
PCMPGTD XMM10,XMM0
PSHUFD XMM8,XMM10,0xa0
PCMPEQD XMM9,XMM0
PSHUFD XMM9,XMM9,0xf5
MOVDQA XMM11,XMM9
PAND XMM11,XMM8
PSHUFD XMM10,XMM10,0xf5
POR XMM11,XMM10
PACKSSDW XMM11,XMM11
PXOR XMM11,XMM6
PACKSSDW XMM11,XMM11
PEXTRW R11D,XMM11,0x6
TEST R11B,0x1
JZ 0x001426b5
LEA R11D,[R10 + 0x6]
MOV word ptr [R9 + R10*0x2 + -0x2],R11W
LAB_001426b5:
PSHUFHW XMM8,XMM8,0x84
PSHUFHW XMM9,XMM9,0x84
PAND XMM9,XMM8
PSHUFHW XMM8,XMM10,0x84
POR XMM8,XMM9
PXOR XMM8,XMM6
PACKSSDW XMM8,XMM8
PEXTRW R11D,XMM8,0x7
TEST R11B,0x1
JZ 0x001426f0
LEA R11D,[R10 + 0x7]
MOV word ptr [R9 + R10*0x2],R11W
LAB_001426f0:
ADD R10,0x8
PADDQ XMM4,XMM7
PADDQ XMM3,XMM7
PADDQ XMM2,XMM7
PADDQ XMM1,XMM7
CMP R8,R10
JNZ 0x00142491
LAB_0014270d:
MOV R9,qword ptr [RDI + 0x18]
LEA R8D,[RSI + RSI*0x1]
MOV R10,qword ptr [R9 + 0x108]
MOVSXD RBX,R8D
MOV R8D,dword ptr [R10 + RBX*0x4]
MOV R11,qword ptr [RDX]
MOV R11,qword ptr [R11 + 0x108]
CMP R8D,dword ptr [R11 + RBX*0x4]
JNZ 0x001427b1
CMP R8D,EAX
JL 0x001427d0
TEST R8D,R8D
JLE 0x001427af
LEA ESI,[0x1 + RSI*0x2]
MOVSXD RBX,ESI
MOVSXD RSI,dword ptr [R10 + RBX*0x4]
SHL RSI,0x2
ADD RSI,qword ptr [R9 + 0x120]
MOVSXD R9,dword ptr [R11 + RBX*0x4]
ADD R9,R9
ADD R9,qword ptr [RDX + 0x78]
MOV RDX,qword ptr [RDI]
MOV RDX,qword ptr [RDX + 0x108]
XOR EDI,EDI
LAB_00142771:
MOVSXD R10,dword ptr [RSI + RDI*0x4]
MOV R10D,dword ptr [RDX + R10*0x4]
CMP EAX,0x2
JNZ 0x0014278d
CMP R10D,dword ptr [RCX + 0x4]
JNZ 0x001427a7
MOV word ptr [R9 + RDI*0x2],0x1
JMP 0x001427a7
LAB_0014278d:
TEST EAX,EAX
JLE 0x001427a7
XOR R11D,R11D
LAB_00142794:
CMP R10D,dword ptr [RCX + R11*0x4]
JNZ 0x0014279f
MOV word ptr [R9 + RDI*0x2],R11W
LAB_0014279f:
INC R11
CMP RAX,R11
JNZ 0x00142794
LAB_001427a7:
INC RDI
CMP RDI,R8
JNZ 0x00142771
LAB_001427af:
POP RBX
RET
LAB_001427b1:
LEA RDI,[0x1b57d0]
LEA RSI,[0x1b5659]
LEA RCX,[0x1b57fe]
MOV EDX,0xdc
CALL 0x00139540
LAB_001427d0:
LEA RDI,[0x1b5864]
LEA RSI,[0x1b5659]
LEA RCX,[0x1b57fe]
MOV EDX,0xdd
CALL 0x00139540
|
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
/* OpenSubdiv::v3_6_0::Vtr::internal::FVarRefinement::populateChildValuesForEdgeVertex(int, int) */
void __thiscall
OpenSubdiv::v3_6_0::Vtr::internal::FVarRefinement::populateChildValuesForEdgeVertex
(FVarRefinement *this,int param_1,int param_2)
{
uint uVar1;
uint uVar2;
long *plVar3;
long lVar4;
int1 auVar5 [16];
int1 auVar6 [16];
int1 auVar7 [16];
ulong uVar8;
long lVar9;
long lVar10;
long lVar11;
short sVar12;
ulong uVar13;
ulong uVar14;
int iVar16;
int1 auVar15 [16];
int iVar17;
int1 auVar18 [16];
int1 auVar20 [16];
int1 auVar21 [16];
int1 auVar22 [16];
int1 auVar23 [16];
int1 auVar24 [16];
int1 auVar25 [16];
int1 auVar26 [16];
int1 auVar27 [16];
int1 auVar28 [16];
int1 auVar29 [16];
int1 auVar30 [16];
int1 auVar31 [16];
int1 auVar32 [16];
int1 auVar33 [16];
int1 auVar34 [16];
int1 auVar35 [16];
int iVar36;
int iVar37;
int iVar40;
int1 auVar38 [16];
int iVar41;
int1 auVar39 [16];
int1 in_XMM11 [16];
int1 auVar42 [16];
int1 auVar43 [16];
int1 in_XMM12 [16];
int1 auVar44 [16];
long lVar19;
lVar10 = _UNK_001b5628;
lVar4 = _DAT_001b5620;
auVar7 = _DAT_001b5070;
lVar9 = *(long *)(*(long *)(this + 8) + 0x90);
uVar1 = *(uint *)(lVar9 + (long)(param_2 * 2) * 4);
uVar8 = (ulong)uVar1;
if (uVar8 != 1) {
lVar9 = (long)*(int *)(lVar9 + (long)(param_2 * 2 + 1) * 4) * 4 +
*(long *)(*(long *)(this + 8) + 0xa8);
plVar3 = *(long **)(this + 0x20);
if (0 < (int)uVar1) {
lVar11 = uVar8 - 1;
auVar15._8_4_ = (int)lVar11;
auVar15._0_8_ = lVar11;
auVar15._12_4_ = (int)((ulong)lVar11 >> 0x20);
lVar11 = *(long *)(this + 0x28) + (long)*(int *)(plVar3[0xc] + (long)param_1 * 4) * 2;
uVar13 = 0;
auVar15 = auVar15 ^ _DAT_001b5070;
auVar18 = _DAT_001b5030;
auVar20 = _DAT_001b5040;
auVar21 = _DAT_001b5050;
auVar22 = _DAT_001b5060;
do {
auVar23 = auVar22 ^ auVar7;
iVar37 = auVar15._0_4_;
iVar36 = -(uint)(iVar37 < auVar23._0_4_);
iVar16 = auVar15._4_4_;
auVar24._4_4_ = -(uint)(iVar16 < auVar23._4_4_);
iVar41 = auVar15._8_4_;
iVar40 = -(uint)(iVar41 < auVar23._8_4_);
iVar17 = auVar15._12_4_;
auVar24._12_4_ = -(uint)(iVar17 < auVar23._12_4_);
auVar33._4_4_ = iVar36;
auVar33._0_4_ = iVar36;
auVar33._8_4_ = iVar40;
auVar33._12_4_ = iVar40;
auVar42 = pshuflw(in_XMM11,auVar33,0xe8);
auVar26._4_4_ = -(uint)(auVar23._4_4_ == iVar16);
auVar26._12_4_ = -(uint)(auVar23._12_4_ == iVar17);
auVar26._0_4_ = auVar26._4_4_;
auVar26._8_4_ = auVar26._12_4_;
auVar44 = pshuflw(in_XMM12,auVar26,0xe8);
auVar24._0_4_ = auVar24._4_4_;
auVar24._8_4_ = auVar24._12_4_;
auVar43 = pshuflw(auVar42,auVar24,0xe8);
auVar23._8_4_ = 0xffffffff;
auVar23._0_8_ = 0xffffffffffffffff;
auVar23._12_4_ = 0xffffffff;
auVar23 = (auVar43 | auVar44 & auVar42) ^ auVar23;
auVar23 = packssdw(auVar23,auVar23);
sVar12 = (short)uVar13;
if ((auVar23 & (int1 [16])0x1) != (int1 [16])0x0) {
*(short *)(lVar11 + uVar13 * 2) = sVar12;
}
auVar24 = auVar26 & auVar33 | auVar24;
auVar23 = packssdw(auVar24,auVar24);
auVar43._8_4_ = 0xffffffff;
auVar43._0_8_ = 0xffffffffffffffff;
auVar43._12_4_ = 0xffffffff;
auVar23 = packssdw(auVar23 ^ auVar43,auVar23 ^ auVar43);
if ((auVar23._0_4_ >> 0x10 & 1) != 0) {
*(short *)(lVar11 + 2 + uVar13 * 2) = sVar12 + 1;
}
auVar23 = auVar21 ^ auVar7;
iVar36 = -(uint)(iVar37 < auVar23._0_4_);
auVar38._4_4_ = -(uint)(iVar16 < auVar23._4_4_);
iVar40 = -(uint)(iVar41 < auVar23._8_4_);
auVar38._12_4_ = -(uint)(iVar17 < auVar23._12_4_);
auVar25._4_4_ = iVar36;
auVar25._0_4_ = iVar36;
auVar25._8_4_ = iVar40;
auVar25._12_4_ = iVar40;
auVar32._4_4_ = -(uint)(auVar23._4_4_ == iVar16);
auVar32._12_4_ = -(uint)(auVar23._12_4_ == iVar17);
auVar32._0_4_ = auVar32._4_4_;
auVar32._8_4_ = auVar32._12_4_;
auVar38._0_4_ = auVar38._4_4_;
auVar38._8_4_ = auVar38._12_4_;
auVar23 = auVar32 & auVar25 | auVar38;
auVar23 = packssdw(auVar23,auVar23);
auVar5._8_4_ = 0xffffffff;
auVar5._0_8_ = 0xffffffffffffffff;
auVar5._12_4_ = 0xffffffff;
auVar23 = packssdw(auVar23 ^ auVar5,auVar23 ^ auVar5);
if ((auVar23 & (int1 [16])0x100000000) != (int1 [16])0x0) {
*(short *)(lVar11 + 4 + uVar13 * 2) = sVar12 + 2;
}
auVar26 = pshufhw(auVar25,auVar25,0x84);
auVar33 = pshufhw(auVar32,auVar32,0x84);
auVar24 = pshufhw(auVar26,auVar38,0x84);
auVar27._8_4_ = 0xffffffff;
auVar27._0_8_ = 0xffffffffffffffff;
auVar27._12_4_ = 0xffffffff;
auVar27 = (auVar24 | auVar33 & auVar26) ^ auVar27;
auVar26 = packssdw(auVar27,auVar27);
if ((auVar26 & (int1 [16])0x1000000000000) != (int1 [16])0x0) {
*(short *)(lVar11 + 6 + uVar13 * 2) = sVar12 + 3;
}
auVar26 = auVar20 ^ auVar7;
iVar36 = -(uint)(iVar37 < auVar26._0_4_);
auVar29._4_4_ = -(uint)(iVar16 < auVar26._4_4_);
iVar40 = -(uint)(iVar41 < auVar26._8_4_);
auVar29._12_4_ = -(uint)(iVar17 < auVar26._12_4_);
auVar34._4_4_ = iVar36;
auVar34._0_4_ = iVar36;
auVar34._8_4_ = iVar40;
auVar34._12_4_ = iVar40;
auVar23 = pshuflw(auVar23,auVar34,0xe8);
auVar28._4_4_ = -(uint)(auVar26._4_4_ == iVar16);
auVar28._12_4_ = -(uint)(auVar26._12_4_ == iVar17);
auVar28._0_4_ = auVar28._4_4_;
auVar28._8_4_ = auVar28._12_4_;
auVar26 = pshuflw(auVar44 & auVar42,auVar28,0xe8);
in_XMM12 = auVar26 & auVar23;
auVar29._0_4_ = auVar29._4_4_;
auVar29._8_4_ = auVar29._12_4_;
auVar23 = pshuflw(auVar23,auVar29,0xe8);
auVar42._8_4_ = 0xffffffff;
auVar42._0_8_ = 0xffffffffffffffff;
auVar42._12_4_ = 0xffffffff;
auVar42 = (auVar23 | in_XMM12) ^ auVar42;
auVar23 = packssdw(auVar42,auVar42);
if ((auVar23 & (int1 [16])0x1) != (int1 [16])0x0) {
*(short *)(lVar11 + 8 + uVar13 * 2) = sVar12 + 4;
}
auVar29 = auVar28 & auVar34 | auVar29;
auVar23 = packssdw(auVar29,auVar29);
auVar44._8_4_ = 0xffffffff;
auVar44._0_8_ = 0xffffffffffffffff;
auVar44._12_4_ = 0xffffffff;
auVar23 = packssdw(auVar23 ^ auVar44,auVar23 ^ auVar44);
if ((auVar23 & (int1 [16])0x10000) != (int1 [16])0x0) {
*(short *)(lVar11 + 10 + uVar13 * 2) = sVar12 + 5;
}
auVar23 = auVar18 ^ auVar7;
iVar37 = -(uint)(iVar37 < auVar23._0_4_);
auVar39._4_4_ = -(uint)(iVar16 < auVar23._4_4_);
iVar41 = -(uint)(iVar41 < auVar23._8_4_);
auVar39._12_4_ = -(uint)(iVar17 < auVar23._12_4_);
auVar30._4_4_ = iVar37;
auVar30._0_4_ = iVar37;
auVar30._8_4_ = iVar41;
auVar30._12_4_ = iVar41;
auVar35._4_4_ = -(uint)(auVar23._4_4_ == iVar16);
auVar35._12_4_ = -(uint)(auVar23._12_4_ == iVar17);
auVar35._0_4_ = auVar35._4_4_;
auVar35._8_4_ = auVar35._12_4_;
auVar39._0_4_ = auVar39._4_4_;
auVar39._8_4_ = auVar39._12_4_;
auVar23 = auVar35 & auVar30 | auVar39;
auVar23 = packssdw(auVar23,auVar23);
auVar6._8_4_ = 0xffffffff;
auVar6._0_8_ = 0xffffffffffffffff;
auVar6._12_4_ = 0xffffffff;
in_XMM11 = packssdw(auVar23 ^ auVar6,auVar23 ^ auVar6);
if ((in_XMM11 & (int1 [16])0x100000000) != (int1 [16])0x0) {
*(short *)(lVar11 + 0xc + uVar13 * 2) = sVar12 + 6;
}
auVar23 = pshufhw(auVar30,auVar30,0x84);
auVar24 = pshufhw(auVar35,auVar35,0x84);
auVar26 = pshufhw(auVar23,auVar39,0x84);
auVar31._8_4_ = 0xffffffff;
auVar31._0_8_ = 0xffffffffffffffff;
auVar31._12_4_ = 0xffffffff;
auVar31 = (auVar26 | auVar24 & auVar23) ^ auVar31;
auVar23 = packssdw(auVar31,auVar31);
if ((auVar23 & (int1 [16])0x1000000000000) != (int1 [16])0x0) {
*(short *)(lVar11 + 0xe + uVar13 * 2) = sVar12 + 7;
}
uVar13 = uVar13 + 8;
lVar19 = auVar22._8_8_;
auVar22._0_8_ = auVar22._0_8_ + lVar4;
auVar22._8_8_ = lVar19 + lVar10;
lVar19 = auVar21._8_8_;
auVar21._0_8_ = auVar21._0_8_ + lVar4;
auVar21._8_8_ = lVar19 + lVar10;
lVar19 = auVar20._8_8_;
auVar20._0_8_ = auVar20._0_8_ + lVar4;
auVar20._8_8_ = lVar19 + lVar10;
lVar19 = auVar18._8_8_;
auVar18._0_8_ = auVar18._0_8_ + lVar4;
auVar18._8_8_ = lVar19 + lVar10;
} while ((uVar1 + 7 & 0xfffffff8) != uVar13);
}
lVar4 = *(long *)(*(long *)(this + 0x18) + 0x108);
uVar2 = *(uint *)(lVar4 + (long)(param_1 * 2) * 4);
if (uVar2 != *(uint *)(*(long *)(*plVar3 + 0x108) + (long)(param_1 * 2) * 4)) {
/* WARNING: Subroutine does not return */
__assert_fail("cVertFaces.size() == cVertFaceSiblings.size()",
"/workspace/llm4binary/github/2025_star3/NVIDIA-RTX[P]OSD-Lite/opensubdiv/vtr/fvarRefinement.cpp"
,0xdc,
"int OpenSubdiv::v3_6_0::Vtr::internal::FVarRefinement::populateChildValuesForEdgeVertex(Index, Index)"
);
}
if ((int)uVar2 < (int)uVar1) {
/* WARNING: Subroutine does not return */
__assert_fail("cVertFaces.size() >= cValueCount",
"/workspace/llm4binary/github/2025_star3/NVIDIA-RTX[P]OSD-Lite/opensubdiv/vtr/fvarRefinement.cpp"
,0xdd,
"int OpenSubdiv::v3_6_0::Vtr::internal::FVarRefinement::populateChildValuesForEdgeVertex(Index, Index)"
);
}
if (0 < (int)uVar2) {
lVar10 = (long)(param_1 * 2 + 1);
iVar37 = *(int *)(lVar4 + lVar10 * 4);
lVar4 = *(long *)(*(long *)(this + 0x18) + 0x120);
lVar11 = (long)*(int *)(*(long *)(*plVar3 + 0x108) + lVar10 * 4) * 2 + plVar3[0xf];
lVar10 = *(long *)(*(long *)this + 0x108);
uVar13 = 0;
do {
iVar16 = *(int *)(lVar10 + (long)*(int *)((long)iVar37 * 4 + lVar4 + uVar13 * 4) * 4);
if (uVar1 == 2) {
if (iVar16 == *(int *)(lVar9 + 4)) {
*(int2 *)(lVar11 + uVar13 * 2) = 1;
}
}
else if (0 < (int)uVar1) {
uVar14 = 0;
do {
if (iVar16 == *(int *)(lVar9 + uVar14 * 4)) {
*(short *)(lVar11 + uVar13 * 2) = (short)uVar14;
}
uVar14 = uVar14 + 1;
} while (uVar8 != uVar14);
}
uVar13 = uVar13 + 1;
} while (uVar13 != uVar2);
}
}
return;
}
|
|
8,934 |
js_string_memcmp
|
bluesky950520[P]quickjs/quickjs.c
|
static int js_string_memcmp(const JSString *p1, const JSString *p2, int len)
{
int res;
if (likely(!p1->is_wide_char)) {
if (likely(!p2->is_wide_char))
res = memcmp(p1->u.str8, p2->u.str8, len);
else
res = -memcmp16_8(p2->u.str16, p1->u.str8, len);
} else {
if (!p2->is_wide_char)
res = memcmp16_8(p1->u.str16, p2->u.str8, len);
else
res = memcmp16(p1->u.str16, p2->u.str16, len);
}
return res;
}
|
O0
|
c
|
js_string_memcmp:
subq $0x18, %rsp
movq %rdi, 0x10(%rsp)
movq %rsi, 0x8(%rsp)
movl %edx, 0x4(%rsp)
movq 0x10(%rsp), %rax
movq 0x4(%rax), %rax
shrq $0x1f, %rax
andq $0x1, %rax
cmpb $0x0, %al
setne %al
xorb $-0x1, %al
xorb $-0x1, %al
xorb $-0x1, %al
andb $0x1, %al
movzbl %al, %eax
cltq
cmpq $0x0, %rax
je 0x5d2ab
movq 0x8(%rsp), %rax
movq 0x4(%rax), %rax
shrq $0x1f, %rax
andq $0x1, %rax
cmpb $0x0, %al
setne %al
xorb $-0x1, %al
xorb $-0x1, %al
xorb $-0x1, %al
andb $0x1, %al
movzbl %al, %eax
cltq
cmpq $0x0, %rax
je 0x5d285
movq 0x10(%rsp), %rdi
addq $0x18, %rdi
movq 0x8(%rsp), %rsi
addq $0x18, %rsi
movslq 0x4(%rsp), %rdx
callq 0xe480
movl %eax, (%rsp)
jmp 0x5d2a9
movq 0x8(%rsp), %rdi
addq $0x18, %rdi
movq 0x10(%rsp), %rsi
addq $0x18, %rsi
movl 0x4(%rsp), %edx
callq 0x5d3b0
movl %eax, %ecx
xorl %eax, %eax
subl %ecx, %eax
movl %eax, (%rsp)
jmp 0x5d300
movq 0x8(%rsp), %rax
movq 0x4(%rax), %rax
shrq $0x1f, %rax
andq $0x1, %rax
cmpb $0x0, %al
jne 0x5d2e0
movq 0x10(%rsp), %rdi
addq $0x18, %rdi
movq 0x8(%rsp), %rsi
addq $0x18, %rsi
movl 0x4(%rsp), %edx
callq 0x5d3b0
movl %eax, (%rsp)
jmp 0x5d2fe
movq 0x10(%rsp), %rdi
addq $0x18, %rdi
movq 0x8(%rsp), %rsi
addq $0x18, %rsi
movl 0x4(%rsp), %edx
callq 0x5d420
movl %eax, (%rsp)
jmp 0x5d300
movl (%rsp), %eax
addq $0x18, %rsp
retq
nopl (%rax,%rax)
|
js_string_memcmp:
sub rsp, 18h
mov [rsp+18h+var_8], rdi
mov [rsp+18h+var_10], rsi
mov [rsp+18h+var_14], edx
mov rax, [rsp+18h+var_8]
mov rax, [rax+4]
shr rax, 1Fh
and rax, 1
cmp al, 0
setnz al
xor al, 0FFh
xor al, 0FFh
xor al, 0FFh
and al, 1
movzx eax, al
cdqe
cmp rax, 0
jz short loc_5D2AB
mov rax, [rsp+18h+var_10]
mov rax, [rax+4]
shr rax, 1Fh
and rax, 1
cmp al, 0
setnz al
xor al, 0FFh
xor al, 0FFh
xor al, 0FFh
and al, 1
movzx eax, al
cdqe
cmp rax, 0
jz short loc_5D285
mov rdi, [rsp+18h+var_8]
add rdi, 18h
mov rsi, [rsp+18h+var_10]
add rsi, 18h
movsxd rdx, [rsp+18h+var_14]
call _memcmp
mov [rsp+18h+var_18], eax
jmp short loc_5D2A9
loc_5D285:
mov rdi, [rsp+18h+var_10]
add rdi, 18h
mov rsi, [rsp+18h+var_8]
add rsi, 18h
mov edx, [rsp+18h+var_14]
call memcmp16_8
mov ecx, eax
xor eax, eax
sub eax, ecx
mov [rsp+18h+var_18], eax
loc_5D2A9:
jmp short loc_5D300
loc_5D2AB:
mov rax, [rsp+18h+var_10]
mov rax, [rax+4]
shr rax, 1Fh
and rax, 1
cmp al, 0
jnz short loc_5D2E0
mov rdi, [rsp+18h+var_8]
add rdi, 18h
mov rsi, [rsp+18h+var_10]
add rsi, 18h
mov edx, [rsp+18h+var_14]
call memcmp16_8
mov [rsp+18h+var_18], eax
jmp short loc_5D2FE
loc_5D2E0:
mov rdi, [rsp+18h+var_8]
add rdi, 18h
mov rsi, [rsp+18h+var_10]
add rsi, 18h
mov edx, [rsp+18h+var_14]
call memcmp16
mov [rsp+18h+var_18], eax
loc_5D2FE:
jmp short $+2
loc_5D300:
mov eax, [rsp+18h+var_18]
add rsp, 18h
retn
|
long long js_string_memcmp(long long a1, long long a2, unsigned int a3)
{
if ( (*(_QWORD *)(a1 + 4) & 0x80000000LL) != 0 )
{
if ( (*(_QWORD *)(a2 + 4) & 0x80000000LL) != 0 )
return (unsigned int)memcmp16(a1 + 24, a2 + 24, a3);
else
return (unsigned int)memcmp16_8(a1 + 24, a2 + 24, a3);
}
else if ( (*(_QWORD *)(a2 + 4) & 0x80000000LL) != 0 )
{
return (unsigned int)-(int)memcmp16_8(a2 + 24, a1 + 24, a3);
}
else
{
return (unsigned int)memcmp(a1 + 24, a2 + 24, (int)a3);
}
}
|
js_string_memcmp:
SUB RSP,0x18
MOV qword ptr [RSP + 0x10],RDI
MOV qword ptr [RSP + 0x8],RSI
MOV dword ptr [RSP + 0x4],EDX
MOV RAX,qword ptr [RSP + 0x10]
MOV RAX,qword ptr [RAX + 0x4]
SHR RAX,0x1f
AND RAX,0x1
CMP AL,0x0
SETNZ AL
XOR AL,0xff
XOR AL,0xff
XOR AL,0xff
AND AL,0x1
MOVZX EAX,AL
CDQE
CMP RAX,0x0
JZ 0x0015d2ab
MOV RAX,qword ptr [RSP + 0x8]
MOV RAX,qword ptr [RAX + 0x4]
SHR RAX,0x1f
AND RAX,0x1
CMP AL,0x0
SETNZ AL
XOR AL,0xff
XOR AL,0xff
XOR AL,0xff
AND AL,0x1
MOVZX EAX,AL
CDQE
CMP RAX,0x0
JZ 0x0015d285
MOV RDI,qword ptr [RSP + 0x10]
ADD RDI,0x18
MOV RSI,qword ptr [RSP + 0x8]
ADD RSI,0x18
MOVSXD RDX,dword ptr [RSP + 0x4]
CALL 0x0010e480
MOV dword ptr [RSP],EAX
JMP 0x0015d2a9
LAB_0015d285:
MOV RDI,qword ptr [RSP + 0x8]
ADD RDI,0x18
MOV RSI,qword ptr [RSP + 0x10]
ADD RSI,0x18
MOV EDX,dword ptr [RSP + 0x4]
CALL 0x0015d3b0
MOV ECX,EAX
XOR EAX,EAX
SUB EAX,ECX
MOV dword ptr [RSP],EAX
LAB_0015d2a9:
JMP 0x0015d300
LAB_0015d2ab:
MOV RAX,qword ptr [RSP + 0x8]
MOV RAX,qword ptr [RAX + 0x4]
SHR RAX,0x1f
AND RAX,0x1
CMP AL,0x0
JNZ 0x0015d2e0
MOV RDI,qword ptr [RSP + 0x10]
ADD RDI,0x18
MOV RSI,qword ptr [RSP + 0x8]
ADD RSI,0x18
MOV EDX,dword ptr [RSP + 0x4]
CALL 0x0015d3b0
MOV dword ptr [RSP],EAX
JMP 0x0015d2fe
LAB_0015d2e0:
MOV RDI,qword ptr [RSP + 0x10]
ADD RDI,0x18
MOV RSI,qword ptr [RSP + 0x8]
ADD RSI,0x18
MOV EDX,dword ptr [RSP + 0x4]
CALL 0x0015d420
MOV dword ptr [RSP],EAX
LAB_0015d2fe:
JMP 0x0015d300
LAB_0015d300:
MOV EAX,dword ptr [RSP]
ADD RSP,0x18
RET
|
int js_string_memcmp(long param_1,long param_2,int param_3)
{
int4 local_18;
if ((*(ulong *)(param_1 + 4) >> 0x1f & 1) == 0) {
if ((*(ulong *)(param_2 + 4) >> 0x1f & 1) == 0) {
local_18 = memcmp((void *)(param_1 + 0x18),(void *)(param_2 + 0x18),(long)param_3);
}
else {
local_18 = memcmp16_8(param_2 + 0x18,param_1 + 0x18,param_3);
local_18 = -local_18;
}
}
else if ((*(ulong *)(param_2 + 4) >> 0x1f & 1) == 0) {
local_18 = memcmp16_8(param_1 + 0x18,param_2 + 0x18,param_3);
}
else {
local_18 = memcmp16(param_1 + 0x18,param_2 + 0x18,param_3);
}
return local_18;
}
|
|
8,935 |
js_string_memcmp
|
bluesky950520[P]quickjs/quickjs.c
|
static int js_string_memcmp(const JSString *p1, const JSString *p2, int len)
{
int res;
if (likely(!p1->is_wide_char)) {
if (likely(!p2->is_wide_char))
res = memcmp(p1->u.str8, p2->u.str8, len);
else
res = -memcmp16_8(p2->u.str16, p1->u.str8, len);
} else {
if (!p2->is_wide_char)
res = memcmp16_8(p1->u.str16, p2->u.str8, len);
else
res = memcmp16(p1->u.str16, p2->u.str16, len);
}
return res;
}
|
O1
|
c
|
js_string_memcmp:
testb $-0x80, 0x7(%rdi)
movq 0x4(%rsi), %rax
jne 0x3bbb1
testl %eax, %eax
js 0x3bbd7
addq $0x18, %rdi
addq $0x18, %rsi
movslq %edx, %rdx
jmp 0xe480
testl %eax, %eax
js 0x3bbfc
testl %edx, %edx
jle 0x3bc1c
movl %edx, %ecx
xorl %edx, %edx
movzwl 0x18(%rdi,%rdx,2), %eax
movzbl 0x18(%rsi,%rdx), %r8d
subl %r8d, %eax
jne 0x3bc1e
incq %rdx
cmpq %rdx, %rcx
jne 0x3bbbd
jmp 0x3bc1c
testl %edx, %edx
jle 0x3bbf7
movl %edx, %ecx
xorl %edx, %edx
movzwl 0x18(%rsi,%rdx,2), %eax
movzbl 0x18(%rdi,%rdx), %r8d
subl %r8d, %eax
jne 0x3bbf9
incq %rdx
cmpq %rdx, %rcx
jne 0x3bbdf
xorl %eax, %eax
negl %eax
retq
testl %edx, %edx
jle 0x3bc1c
movl %edx, %ecx
xorl %edx, %edx
movzwl 0x18(%rdi,%rdx,2), %eax
movzwl 0x18(%rsi,%rdx,2), %r8d
subl %r8d, %eax
jne 0x3bc1e
incq %rdx
cmpq %rdx, %rcx
jne 0x3bc04
xorl %eax, %eax
retq
|
js_string_memcmp:
test byte ptr [rdi+7], 80h
mov rax, [rsi+4]
jnz short loc_3BBB1
test eax, eax
js short loc_3BBD7
add rdi, 18h
add rsi, 18h
movsxd rdx, edx
jmp _memcmp
loc_3BBB1:
test eax, eax
js short loc_3BBFC
test edx, edx
jle short loc_3BC1C
mov ecx, edx
xor edx, edx
loc_3BBBD:
movzx eax, word ptr [rdi+rdx*2+18h]
movzx r8d, byte ptr [rsi+rdx+18h]
sub eax, r8d
jnz short locret_3BC1E
inc rdx
cmp rcx, rdx
jnz short loc_3BBBD
jmp short loc_3BC1C
loc_3BBD7:
test edx, edx
jle short loc_3BBF7
mov ecx, edx
xor edx, edx
loc_3BBDF:
movzx eax, word ptr [rsi+rdx*2+18h]
movzx r8d, byte ptr [rdi+rdx+18h]
sub eax, r8d
jnz short loc_3BBF9
inc rdx
cmp rcx, rdx
jnz short loc_3BBDF
loc_3BBF7:
xor eax, eax
loc_3BBF9:
neg eax
retn
loc_3BBFC:
test edx, edx
jle short loc_3BC1C
mov ecx, edx
xor edx, edx
loc_3BC04:
movzx eax, word ptr [rdi+rdx*2+18h]
movzx r8d, word ptr [rsi+rdx*2+18h]
sub eax, r8d
jnz short locret_3BC1E
inc rdx
cmp rcx, rdx
jnz short loc_3BC04
loc_3BC1C:
xor eax, eax
locret_3BC1E:
retn
|
long long js_string_memcmp(long long a1, long long a2, int a3)
{
long long v3; // rax
long long result; // rax
long long v5; // rcx
long long v6; // rdx
long long v7; // rcx
long long v8; // rdx
int v9; // eax
long long v10; // rcx
long long v11; // rdx
v3 = *(_QWORD *)(a2 + 4);
if ( *(char *)(a1 + 7) >= 0 )
{
if ( (int)v3 >= 0 )
return memcmp(a1 + 24, a2 + 24, a3);
if ( a3 <= 0 )
{
LABEL_14:
v9 = 0;
}
else
{
v7 = (unsigned int)a3;
v8 = 0LL;
while ( 1 )
{
v9 = *(unsigned __int16 *)(a2 + 2 * v8 + 24) - *(unsigned __int8 *)(a1 + v8 + 24);
if ( v9 )
break;
if ( v7 == ++v8 )
goto LABEL_14;
}
}
return (unsigned int)-v9;
}
if ( (int)v3 >= 0 )
{
if ( a3 > 0 )
{
v5 = (unsigned int)a3;
v6 = 0LL;
while ( 1 )
{
result = *(unsigned __int16 *)(a1 + 2 * v6 + 24) - (unsigned int)*(unsigned __int8 *)(a2 + v6 + 24);
if ( (_DWORD)result )
break;
if ( v5 == ++v6 )
return 0LL;
}
return result;
}
return 0LL;
}
if ( a3 <= 0 )
return 0LL;
v10 = (unsigned int)a3;
v11 = 0LL;
while ( 1 )
{
result = *(unsigned __int16 *)(a1 + 2 * v11 + 24) - (unsigned int)*(unsigned __int16 *)(a2 + 2 * v11 + 24);
if ( (_DWORD)result )
break;
if ( v10 == ++v11 )
return 0LL;
}
return result;
}
| |||
8,936 |
gguf_writer::write(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&) const
|
Yangxiaoz[P]GGML-Tutorial/ggml/src/gguf.cpp
|
void write(const std::string & val) const {
{
const uint64_t n = val.length();
write(n);
}
for (size_t i = 0; i < val.length(); ++i) {
buf.push_back(reinterpret_cast<const int8_t *>(val.data())[i]);
}
}
|
O2
|
cpp
|
gguf_writer::write(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&) const:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rsi, %rbx
movq %rdi, %r14
movq 0x8(%rsi), %rax
leaq 0x8(%rsp), %rsi
movq %rax, (%rsi)
callq 0x1d890
xorl %r15d, %r15d
cmpq 0x8(%rbx), %r15
jae 0x45176
movq (%r14), %rdi
movq (%rbx), %rsi
addq %r15, %rsi
callq 0x1da00
incq %r15
jmp 0x4515d
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
|
_ZNK11gguf_writer5writeERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE:
push r15
push r14
push rbx
sub rsp, 10h
mov rbx, rsi
mov r14, rdi
mov rax, [rsi+8]
lea rsi, [rsp+28h+var_20]
mov [rsi], rax
call __ZNK11gguf_writer5writeImEEvRKT_; gguf_writer::write<ulong>(ulong const&)
xor r15d, r15d
loc_4515D:
cmp r15, [rbx+8]
jnb short loc_45176
mov rdi, [r14]
mov rsi, [rbx]
add rsi, r15
call __ZNSt6vectorIaSaIaEE9push_backERKa; std::vector<signed char>::push_back(signed char const&)
inc r15
jmp short loc_4515D
loc_45176:
add rsp, 10h
pop rbx
pop r14
pop r15
retn
|
long long gguf_writer::write(_QWORD *a1, _QWORD *a2)
{
long long result; // rax
long long v3; // rdx
unsigned long long i; // r15
_QWORD v5[4]; // [rsp+8h] [rbp-20h] BYREF
v5[0] = a2[1];
result = gguf_writer::write<unsigned long>(a1, v5);
for ( i = 0LL; i < a2[1]; ++i )
result = std::vector<signed char>::push_back(*a1, i + *a2, v3);
return result;
}
|
write:
PUSH R15
PUSH R14
PUSH RBX
SUB RSP,0x10
MOV RBX,RSI
MOV R14,RDI
MOV RAX,qword ptr [RSI + 0x8]
LEA RSI,[RSP + 0x8]
MOV qword ptr [RSI],RAX
CALL 0x0011d890
XOR R15D,R15D
LAB_0014515d:
CMP R15,qword ptr [RBX + 0x8]
JNC 0x00145176
MOV RDI,qword ptr [R14]
MOV RSI,qword ptr [RBX]
ADD RSI,R15
CALL 0x0011da00
INC R15
JMP 0x0014515d
LAB_00145176:
ADD RSP,0x10
POP RBX
POP R14
POP R15
RET
|
/* gguf_writer::write(std::__cxx11::string const&) const */
void __thiscall gguf_writer::write(gguf_writer *this,string *param_1)
{
ulong uVar1;
ulong local_20;
local_20 = *(ulong *)(param_1 + 8);
write<unsigned_long>(this,&local_20);
for (uVar1 = 0; uVar1 < *(ulong *)(param_1 + 8); uVar1 = uVar1 + 1) {
std::vector<signed_char,std::allocator<signed_char>>::push_back
(*(vector<signed_char,std::allocator<signed_char>> **)this,
(signed *)(*(long *)param_1 + uVar1));
}
return;
}
|
|
8,937 |
gguf_writer::write(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&) const
|
Yangxiaoz[P]GGML-Tutorial/ggml/src/gguf.cpp
|
void write(const std::string & val) const {
{
const uint64_t n = val.length();
write(n);
}
for (size_t i = 0; i < val.length(); ++i) {
buf.push_back(reinterpret_cast<const int8_t *>(val.data())[i]);
}
}
|
O3
|
cpp
|
gguf_writer::write(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&) const:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rsi, %rbx
movq %rdi, %r14
movq 0x8(%rsi), %rax
leaq 0x8(%rsp), %rsi
movq %rax, (%rsi)
callq 0x165c0
cmpq $0x0, 0x8(%rbx)
je 0x42ec9
xorl %r15d, %r15d
movq (%r14), %rdi
movq (%rbx), %rdx
addq %r15, %rdx
movq 0x8(%rdi), %rsi
cmpq 0x10(%rdi), %rsi
je 0x42ebb
movb (%rdx), %al
movb %al, (%rsi)
incq 0x8(%rdi)
jmp 0x42ec0
callq 0x17870
incq %r15
cmpq 0x8(%rbx), %r15
jb 0x42e9e
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
nop
|
_ZNK11gguf_writer5writeERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE:
push r15
push r14
push rbx
sub rsp, 10h
mov rbx, rsi
mov r14, rdi
mov rax, [rsi+8]
lea rsi, [rsp+28h+var_20]
mov [rsi], rax
call __ZNK11gguf_writer5writeImEEvRKT_; gguf_writer::write<ulong>(ulong const&)
cmp qword ptr [rbx+8], 0
jz short loc_42EC9
xor r15d, r15d
loc_42E9E:
mov rdi, [r14]
mov rdx, [rbx]
add rdx, r15
mov rsi, [rdi+8]
cmp rsi, [rdi+10h]
jz short loc_42EBB
mov al, [rdx]
mov [rsi], al
inc qword ptr [rdi+8]
jmp short loc_42EC0
loc_42EBB:
call __ZNSt6vectorIaSaIaEE17_M_realloc_insertIJRKaEEEvN9__gnu_cxx17__normal_iteratorIPaS1_EEDpOT_; std::vector<signed char>::_M_realloc_insert<signed char const&>(__gnu_cxx::__normal_iterator<signed char *,std::vector<signed char>>,signed char const&)
loc_42EC0:
inc r15
cmp r15, [rbx+8]
jb short loc_42E9E
loc_42EC9:
add rsp, 10h
pop rbx
pop r14
pop r15
retn
|
char gguf_writer::write(long long *a1, _QWORD *a2)
{
char result; // al
unsigned long long v5; // r15
long long v6; // rdi
char *v7; // rdx
char *v8; // rsi
_QWORD v9[4]; // [rsp+8h] [rbp-20h] BYREF
v9[0] = a2[1];
result = gguf_writer::write<unsigned long>(a1, v9);
if ( a2[1] )
{
v5 = 0LL;
do
{
v6 = *a1;
v7 = (char *)(v5 + *a2);
v8 = *(char **)(*a1 + 8);
if ( v8 == *(char **)(*a1 + 16) )
{
result = std::vector<signed char>::_M_realloc_insert<signed char const&>(v6, v8, v7);
}
else
{
result = *v7;
*v8 = *v7;
++*(_QWORD *)(v6 + 8);
}
++v5;
}
while ( v5 < a2[1] );
}
return result;
}
|
write:
PUSH R15
PUSH R14
PUSH RBX
SUB RSP,0x10
MOV RBX,RSI
MOV R14,RDI
MOV RAX,qword ptr [RSI + 0x8]
LEA RSI,[RSP + 0x8]
MOV qword ptr [RSI],RAX
CALL 0x001165c0
CMP qword ptr [RBX + 0x8],0x0
JZ 0x00142ec9
XOR R15D,R15D
LAB_00142e9e:
MOV RDI,qword ptr [R14]
MOV RDX,qword ptr [RBX]
ADD RDX,R15
MOV RSI,qword ptr [RDI + 0x8]
CMP RSI,qword ptr [RDI + 0x10]
JZ 0x00142ebb
MOV AL,byte ptr [RDX]
MOV byte ptr [RSI],AL
INC qword ptr [RDI + 0x8]
JMP 0x00142ec0
LAB_00142ebb:
CALL 0x00117870
LAB_00142ec0:
INC R15
CMP R15,qword ptr [RBX + 0x8]
JC 0x00142e9e
LAB_00142ec9:
ADD RSP,0x10
POP RBX
POP R14
POP R15
RET
|
/* gguf_writer::write(std::__cxx11::string const&) const */
void __thiscall gguf_writer::write(gguf_writer *this,string *param_1)
{
long lVar1;
ulong uVar2;
ulong local_20;
local_20 = *(ulong *)(param_1 + 8);
write<unsigned_long>(this,&local_20);
if (*(long *)(param_1 + 8) != 0) {
uVar2 = 0;
do {
lVar1 = *(long *)this;
if (*(int1 **)(lVar1 + 8) == *(int1 **)(lVar1 + 0x10)) {
std::vector<signed_char,std::allocator<signed_char>>::_M_realloc_insert<signed_char_const&>
();
}
else {
**(int1 **)(lVar1 + 8) = *(int1 *)(*(long *)param_1 + uVar2);
*(long *)(lVar1 + 8) = *(long *)(lVar1 + 8) + 1;
}
uVar2 = uVar2 + 1;
} while (uVar2 < *(ulong *)(param_1 + 8));
}
return;
}
|
|
8,938 |
js_os_setTimeout
|
bluesky950520[P]quickjs/quickjs-libc.c
|
static JSValue js_os_setTimeout(JSContext *ctx, JSValue this_val,
int argc, JSValue *argv, int magic)
{
JSRuntime *rt = JS_GetRuntime(ctx);
JSThreadState *ts = js_get_thread_state(rt);
int64_t delay;
JSValue func;
JSOSTimer *th;
func = argv[0];
if (!JS_IsFunction(ctx, func))
return JS_ThrowTypeError(ctx, "not a function");
if (JS_ToInt64(ctx, &delay, argv[1]))
return JS_EXCEPTION;
if (delay < 1)
delay = 1;
th = js_mallocz(ctx, sizeof(*th));
if (!th)
return JS_EXCEPTION;
th->timer_id = ts->next_timer_id++;
if (ts->next_timer_id > MAX_SAFE_INTEGER)
ts->next_timer_id = 1;
th->repeats = (magic > 0);
th->timeout = js__hrtime_ms() + delay;
th->delay = delay;
th->func = JS_DupValue(ctx, func);
list_add_tail(&th->link, &ts->os_timers);
return JS_NewInt64(ctx, th->timer_id);
}
|
O2
|
c
|
js_os_setTimeout:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movl %r9d, %ebp
movq %r8, %r13
movq %rdi, %rbx
callq 0x1a185
movq %rax, %rdi
callq 0x1028a
movq %rax, %r14
movq (%r13), %r15
movq 0x8(%r13), %r12
movq %rbx, %rdi
movq %r15, %rsi
movq %r12, %rdx
callq 0x1ce7d
testl %eax, %eax
je 0x13e51
movq 0x10(%r13), %rdx
movq 0x18(%r13), %rcx
leaq 0x8(%rsp), %rsi
movq %rbx, %rdi
callq 0x214fe
pushq $0x6
popq %r13
testl %eax, %eax
je 0x13e6a
xorl %eax, %eax
xorl %ecx, %ecx
jmp 0x13f43
leaq 0x733b2(%rip), %rsi # 0x8720a
movq %rbx, %rdi
xorl %eax, %eax
callq 0x1c64d
movq %rdx, %r13
jmp 0x13f36
movl %ebp, 0x14(%rsp)
cmpq $0x0, 0x8(%rsp)
jg 0x13e7f
movq $0x1, 0x8(%rsp)
pushq $0x40
popq %rsi
movq %rbx, %rdi
callq 0x17241
testq %rax, %rax
je 0x13e48
movq %rax, %rbp
movq 0x48(%r14), %rax
leaq 0x1(%rax), %rcx
movq %rcx, 0x48(%r14)
movq %rax, 0x10(%rbp)
movabsq $0x1fffffffffffff, %rcx # imm = 0x1FFFFFFFFFFFFF
cmpq %rcx, %rax
jl 0x13eb9
movq $0x1, 0x48(%r14)
cmpl $0x0, 0x14(%rsp)
setg %al
movb 0x18(%rbp), %cl
andb $-0x2, %cl
orb %al, %cl
movb %cl, 0x18(%rbp)
callq 0x157aa
movq 0x8(%rsp), %rcx
addq %rcx, %rax
movq %rax, 0x20(%rbp)
movq %rcx, 0x28(%rbp)
movq %rbx, %rdi
movq %r15, %rsi
movq %r12, %rdx
callq 0x16ffb
movq %rax, 0x30(%rbp)
movq %rdx, 0x38(%rbp)
movq %r14, %rax
addq $0x20, %rax
movq 0x20(%r14), %rcx
movq %rbp, 0x8(%rcx)
movq %rcx, (%rbp)
movq %rax, 0x8(%rbp)
movq %rbp, 0x20(%r14)
movq 0x10(%rbp), %rax
movslq %eax, %rcx
xorl %edx, %edx
cmpq %rax, %rcx
movl %ecx, %ecx
cvtsi2sd %rax, %xmm0
movq %xmm0, %rax
cmoveq %rcx, %rax
pushq $0x7
popq %r13
cmoveq %rdx, %r13
movabsq $-0x100000000, %rcx # imm = 0xFFFFFFFF00000000
andq %rax, %rcx
movl %eax, %eax
orq %rcx, %rax
movq %r13, %rdx
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
|
js_os_setTimeout:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 18h
mov ebp, r9d
mov r13, r8
mov rbx, rdi
call JS_GetRuntime
mov rdi, rax
call js_get_thread_state
mov r14, rax
mov r15, [r13+0]
mov r12, [r13+8]
mov rdi, rbx
mov rsi, r15
mov rdx, r12
call JS_IsFunction
test eax, eax
jz short loc_13E51
mov rdx, [r13+10h]
mov rcx, [r13+18h]
lea rsi, [rsp+48h+var_40]
mov rdi, rbx
call JS_ToInt64
push 6
pop r13
test eax, eax
jz short loc_13E6A
loc_13E48:
xor eax, eax
xor ecx, ecx
jmp loc_13F43
loc_13E51:
lea rsi, aSetAddIsNotAFu+0Bh; "not a function"
mov rdi, rbx
xor eax, eax
call JS_ThrowTypeError
mov r13, rdx
jmp loc_13F36
loc_13E6A:
mov [rsp+48h+var_34], ebp
cmp [rsp+48h+var_40], 0
jg short loc_13E7F
mov [rsp+48h+var_40], 1
loc_13E7F:
push 40h ; '@'
pop rsi
mov rdi, rbx
call js_mallocz
test rax, rax
jz short loc_13E48
mov rbp, rax
mov rax, [r14+48h]
lea rcx, [rax+1]
mov [r14+48h], rcx
mov [rbp+10h], rax
mov rcx, 1FFFFFFFFFFFFFh
cmp rax, rcx
jl short loc_13EB9
mov qword ptr [r14+48h], 1
loc_13EB9:
cmp [rsp+48h+var_34], 0
setnle al
mov cl, [rbp+18h]
and cl, 0FEh
or cl, al
mov [rbp+18h], cl
call js__hrtime_ms
mov rcx, [rsp+48h+var_40]
add rax, rcx
mov [rbp+20h], rax
mov [rbp+28h], rcx
mov rdi, rbx
mov rsi, r15
mov rdx, r12
call JS_DupValue
mov [rbp+30h], rax
mov [rbp+38h], rdx
mov rax, r14
add rax, 20h ; ' '
mov rcx, [r14+20h]
mov [rcx+8], rbp
mov [rbp+0], rcx
mov [rbp+8], rax
mov [r14+20h], rbp
mov rax, [rbp+10h]
movsxd rcx, eax
xor edx, edx
cmp rcx, rax
mov ecx, ecx
cvtsi2sd xmm0, rax
movq rax, xmm0
cmovz rax, rcx
push 7
pop r13
cmovz r13, rdx
loc_13F36:
mov rcx, 0FFFFFFFF00000000h
and rcx, rax
loc_13F43:
mov eax, eax
or rax, rcx
mov rdx, r13
add rsp, 18h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
|
unsigned long long js_os_setTimeout(long long a1, long long a2, long long a3, long long a4, _QWORD *a5, int a6)
{
int Runtime; // eax
int v9; // edx
int v10; // ecx
int v11; // r8d
int v12; // r9d
long long thread_state; // r14
long long v14; // r15
long long v15; // r12
int v16; // edx
int v17; // ecx
int v18; // r8d
int v19; // r9d
double v20; // rax
unsigned long long v21; // rcx
long long v22; // rax
long long v23; // rdx
long long v24; // rbp
long long v25; // rax
long long v26; // rax
long long v27; // rcx
long long v28; // rdx
long long v29; // rcx
long long v30; // rax
bool v31; // zf
double v32; // rcx
char v34; // [rsp+0h] [rbp-48h]
long long v35; // [rsp+8h] [rbp-40h] BYREF
int v36; // [rsp+14h] [rbp-34h]
Runtime = JS_GetRuntime(a1);
thread_state = js_get_thread_state(Runtime, a2, v9, v10, v11, v12, v34);
v14 = *a5;
v15 = a5[1];
if ( !(unsigned int)JS_IsFunction(a1, *a5) )
{
v20 = COERCE_DOUBLE(JS_ThrowTypeError(a1, (unsigned int)"not a function", v16, v17, v18, v19));
LABEL_12:
v21 = *(_QWORD *)&v20 & 0xFFFFFFFF00000000LL;
return v21 | LODWORD(v20);
}
if ( !(unsigned int)JS_ToInt64(a1, &v35, a5[2], a5[3]) )
{
v36 = a6;
if ( v35 <= 0 )
v35 = 1LL;
v22 = js_mallocz(a1, 64LL);
if ( v22 )
{
v24 = v22;
v25 = *(_QWORD *)(thread_state + 72);
*(_QWORD *)(thread_state + 72) = v25 + 1;
*(_QWORD *)(v24 + 16) = v25;
if ( v25 >= 0x1FFFFFFFFFFFFFLL )
*(_QWORD *)(thread_state + 72) = 1LL;
*(_BYTE *)(v24 + 24) = (v36 > 0) | *(_BYTE *)(v24 + 24) & 0xFE;
v26 = js__hrtime_ms(a1, 64LL, v23);
v27 = v35;
*(_QWORD *)(v24 + 32) = v35 + v26;
*(_QWORD *)(v24 + 40) = v27;
*(_QWORD *)(v24 + 48) = JS_DupValue(a1, v14, v15);
*(_QWORD *)(v24 + 56) = v28;
v29 = *(_QWORD *)(thread_state + 32);
*(_QWORD *)(v29 + 8) = v24;
*(_QWORD *)v24 = v29;
*(_QWORD *)(v24 + 8) = thread_state + 32;
*(_QWORD *)(thread_state + 32) = v24;
v30 = *(_QWORD *)(v24 + 16);
v31 = (int)v30 == v30;
*(_QWORD *)&v32 = (unsigned int)v30;
v20 = (double)(int)v30;
if ( v31 )
v20 = v32;
goto LABEL_12;
}
}
LODWORD(v20) = 0;
v21 = 0LL;
return v21 | LODWORD(v20);
}
|
js_os_setTimeout:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x18
MOV EBP,R9D
MOV R13,R8
MOV RBX,RDI
CALL 0x0011a185
MOV RDI,RAX
CALL 0x0011028a
MOV R14,RAX
MOV R15,qword ptr [R13]
MOV R12,qword ptr [R13 + 0x8]
MOV RDI,RBX
MOV RSI,R15
MOV RDX,R12
CALL 0x0011ce7d
TEST EAX,EAX
JZ 0x00113e51
MOV RDX,qword ptr [R13 + 0x10]
MOV RCX,qword ptr [R13 + 0x18]
LEA RSI,[RSP + 0x8]
MOV RDI,RBX
CALL 0x001214fe
PUSH 0x6
POP R13
TEST EAX,EAX
JZ 0x00113e6a
LAB_00113e48:
XOR EAX,EAX
XOR ECX,ECX
JMP 0x00113f43
LAB_00113e51:
LEA RSI,[0x18720a]
MOV RDI,RBX
XOR EAX,EAX
CALL 0x0011c64d
MOV R13,RDX
JMP 0x00113f36
LAB_00113e6a:
MOV dword ptr [RSP + 0x14],EBP
CMP qword ptr [RSP + 0x8],0x0
JG 0x00113e7f
MOV qword ptr [RSP + 0x8],0x1
LAB_00113e7f:
PUSH 0x40
POP RSI
MOV RDI,RBX
CALL 0x00117241
TEST RAX,RAX
JZ 0x00113e48
MOV RBP,RAX
MOV RAX,qword ptr [R14 + 0x48]
LEA RCX,[RAX + 0x1]
MOV qword ptr [R14 + 0x48],RCX
MOV qword ptr [RBP + 0x10],RAX
MOV RCX,0x1fffffffffffff
CMP RAX,RCX
JL 0x00113eb9
MOV qword ptr [R14 + 0x48],0x1
LAB_00113eb9:
CMP dword ptr [RSP + 0x14],0x0
SETG AL
MOV CL,byte ptr [RBP + 0x18]
AND CL,0xfe
OR CL,AL
MOV byte ptr [RBP + 0x18],CL
CALL 0x001157aa
MOV RCX,qword ptr [RSP + 0x8]
ADD RAX,RCX
MOV qword ptr [RBP + 0x20],RAX
MOV qword ptr [RBP + 0x28],RCX
MOV RDI,RBX
MOV RSI,R15
MOV RDX,R12
CALL 0x00116ffb
MOV qword ptr [RBP + 0x30],RAX
MOV qword ptr [RBP + 0x38],RDX
MOV RAX,R14
ADD RAX,0x20
MOV RCX,qword ptr [R14 + 0x20]
MOV qword ptr [RCX + 0x8],RBP
MOV qword ptr [RBP],RCX
MOV qword ptr [RBP + 0x8],RAX
MOV qword ptr [R14 + 0x20],RBP
MOV RAX,qword ptr [RBP + 0x10]
MOVSXD RCX,EAX
XOR EDX,EDX
CMP RCX,RAX
MOV ECX,ECX
CVTSI2SD XMM0,RAX
MOVQ RAX,XMM0
CMOVZ RAX,RCX
PUSH 0x7
POP R13
CMOVZ R13,RDX
LAB_00113f36:
MOV RCX,-0x100000000
AND RCX,RAX
LAB_00113f43:
MOV EAX,EAX
OR RAX,RCX
MOV RDX,R13
ADD RSP,0x18
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
int1 [16] js_os_setTimeout(int8 param_1)
{
int8 uVar1;
int1 auVar2 [16];
int iVar3;
int8 uVar4;
long lVar5;
long *plVar6;
long lVar7;
double dVar8;
ulong uVar9;
int8 *in_R8;
int in_R9D;
bool bVar10;
int1 auVar11 [16];
int1 auVar12 [16];
long local_40;
int local_34;
uVar4 = JS_GetRuntime();
lVar5 = js_get_thread_state(uVar4);
uVar4 = *in_R8;
uVar1 = in_R8[1];
iVar3 = JS_IsFunction(param_1,uVar4,uVar1);
if (iVar3 == 0) {
auVar11 = JS_ThrowTypeError(param_1,"not a function");
LAB_00113f36:
uVar9 = auVar11._0_8_ & 0xffffffff00000000;
}
else {
iVar3 = JS_ToInt64(param_1,&local_40,in_R8[2],in_R8[3]);
if (iVar3 == 0) {
if (local_40 < 1) {
local_40 = 1;
}
local_34 = in_R9D;
plVar6 = (long *)js_mallocz(param_1,0x40);
if (plVar6 != (long *)0x0) {
lVar7 = *(long *)(lVar5 + 0x48);
*(long *)(lVar5 + 0x48) = lVar7 + 1;
plVar6[2] = lVar7;
if (0x1ffffffffffffe < lVar7) {
*(int8 *)(lVar5 + 0x48) = 1;
}
*(byte *)(plVar6 + 3) = *(byte *)(plVar6 + 3) & 0xfe | 0 < local_34;
lVar7 = js__hrtime_ms();
plVar6[4] = lVar7 + local_40;
plVar6[5] = local_40;
auVar11 = JS_DupValue(param_1,uVar4,uVar1);
*(int1 (*) [16])(plVar6 + 6) = auVar11;
lVar7 = *(long *)(lVar5 + 0x20);
*(long **)(lVar7 + 8) = plVar6;
*plVar6 = lVar7;
plVar6[1] = lVar5 + 0x20;
*(long **)(lVar5 + 0x20) = plVar6;
uVar9 = plVar6[2];
bVar10 = (long)(int)uVar9 == uVar9;
dVar8 = (double)(long)uVar9;
if (bVar10) {
dVar8 = (double)(uVar9 & 0xffffffff);
}
auVar2._8_8_ = 0;
auVar2._0_8_ = dVar8;
auVar11._8_8_ = 7;
auVar11._0_8_ = dVar8;
if (bVar10) {
auVar11 = auVar2;
}
goto LAB_00113f36;
}
}
auVar11 = ZEXT816(6) << 0x40;
uVar9 = 0;
}
auVar12._0_8_ = auVar11._0_8_ & 0xffffffff | uVar9;
auVar12._8_8_ = auVar11._8_8_;
return auVar12;
}
|
|
8,939 |
translog_walk_filenames
|
eloqsql/storage/maria/ma_loghandler.c
|
my_bool translog_walk_filenames(const char *directory,
my_bool (*callback)(const char *,
const char *))
{
MY_DIR *dirp;
uint i;
my_bool rc= FALSE;
/* Finds and removes transaction log files */
if (!(dirp = my_dir(directory, MYF(MY_DONT_SORT))))
return FALSE;
for (i= 0; i < dirp->number_of_files; i++)
{
char *file= dirp->dir_entry[i].name;
if (strncmp(file, "aria_log.", 10) == 0 &&
file[10] >= '0' && file[10] <= '9' &&
file[11] >= '0' && file[11] <= '9' &&
file[12] >= '0' && file[12] <= '9' &&
file[13] >= '0' && file[13] <= '9' &&
file[14] >= '0' && file[14] <= '9' &&
file[15] >= '0' && file[15] <= '9' &&
file[16] >= '0' && file[16] <= '9' &&
file[17] >= '0' && file[17] <= '9' &&
file[18] == '\0' && (*callback)(directory, file))
{
rc= TRUE;
break;
}
}
my_dirend(dirp);
return rc;
}
|
O0
|
c
|
translog_walk_filenames:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movb $0x0, -0x25(%rbp)
movq -0x10(%rbp), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0xf2fa0
movq %rax, -0x20(%rbp)
cmpq $0x0, %rax
jne 0x50234
movb $0x0, -0x1(%rbp)
jmp 0x503bd
movl $0x0, -0x24(%rbp)
movl -0x24(%rbp), %eax
movq -0x20(%rbp), %rcx
cmpl 0x8(%rcx), %eax
jae 0x503ae
movq -0x20(%rbp), %rax
movq (%rax), %rax
movl -0x24(%rbp), %ecx
shlq $0x4, %rcx
addq %rcx, %rax
movq (%rax), %rax
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rdi
leaq 0x101ab0(%rip), %rsi # 0x151d1e
movl $0xa, %edx
callq 0x2a1e0
cmpl $0x0, %eax
jne 0x5039e
movq -0x30(%rbp), %rax
movsbl 0xa(%rax), %eax
cmpl $0x30, %eax
jl 0x5039e
movq -0x30(%rbp), %rax
movsbl 0xa(%rax), %eax
cmpl $0x39, %eax
jg 0x5039e
movq -0x30(%rbp), %rax
movsbl 0xb(%rax), %eax
cmpl $0x30, %eax
jl 0x5039e
movq -0x30(%rbp), %rax
movsbl 0xb(%rax), %eax
cmpl $0x39, %eax
jg 0x5039e
movq -0x30(%rbp), %rax
movsbl 0xc(%rax), %eax
cmpl $0x30, %eax
jl 0x5039e
movq -0x30(%rbp), %rax
movsbl 0xc(%rax), %eax
cmpl $0x39, %eax
jg 0x5039e
movq -0x30(%rbp), %rax
movsbl 0xd(%rax), %eax
cmpl $0x30, %eax
jl 0x5039e
movq -0x30(%rbp), %rax
movsbl 0xd(%rax), %eax
cmpl $0x39, %eax
jg 0x5039e
movq -0x30(%rbp), %rax
movsbl 0xe(%rax), %eax
cmpl $0x30, %eax
jl 0x5039e
movq -0x30(%rbp), %rax
movsbl 0xe(%rax), %eax
cmpl $0x39, %eax
jg 0x5039e
movq -0x30(%rbp), %rax
movsbl 0xf(%rax), %eax
cmpl $0x30, %eax
jl 0x5039e
movq -0x30(%rbp), %rax
movsbl 0xf(%rax), %eax
cmpl $0x39, %eax
jg 0x5039e
movq -0x30(%rbp), %rax
movsbl 0x10(%rax), %eax
cmpl $0x30, %eax
jl 0x5039e
movq -0x30(%rbp), %rax
movsbl 0x10(%rax), %eax
cmpl $0x39, %eax
jg 0x5039e
movq -0x30(%rbp), %rax
movsbl 0x11(%rax), %eax
cmpl $0x30, %eax
jl 0x5039e
movq -0x30(%rbp), %rax
movsbl 0x11(%rax), %eax
cmpl $0x39, %eax
jg 0x5039e
movq -0x30(%rbp), %rax
movsbl 0x12(%rax), %eax
cmpl $0x0, %eax
jne 0x5039e
movq -0x18(%rbp), %rax
movq -0x10(%rbp), %rdi
movq -0x30(%rbp), %rsi
callq *%rax
movsbl %al, %eax
cmpl $0x0, %eax
je 0x5039e
movb $0x1, -0x25(%rbp)
jmp 0x503ae
jmp 0x503a0
movl -0x24(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x24(%rbp)
jmp 0x5023b
movq -0x20(%rbp), %rdi
callq 0xf2f50
movb -0x25(%rbp), %al
movb %al, -0x1(%rbp)
movb -0x1(%rbp), %al
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
|
translog_walk_filenames:
push rbp
mov rbp, rsp
sub rsp, 30h
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov [rbp+var_25], 0
mov rdi, [rbp+var_10]
xor eax, eax
mov esi, eax
call my_dir
mov [rbp+var_20], rax
cmp rax, 0
jnz short loc_50234
mov [rbp+var_1], 0
jmp loc_503BD
loc_50234:
mov [rbp+var_24], 0
loc_5023B:
mov eax, [rbp+var_24]
mov rcx, [rbp+var_20]
cmp eax, [rcx+8]
jnb loc_503AE
mov rax, [rbp+var_20]
mov rax, [rax]
mov ecx, [rbp+var_24]
shl rcx, 4
add rax, rcx
mov rax, [rax]
mov [rbp+var_30], rax
mov rdi, [rbp+var_30]
lea rsi, aAriaLog; "aria_log."
mov edx, 0Ah
call _strncmp
cmp eax, 0
jnz loc_5039E
mov rax, [rbp+var_30]
movsx eax, byte ptr [rax+0Ah]
cmp eax, 30h ; '0'
jl loc_5039E
mov rax, [rbp+var_30]
movsx eax, byte ptr [rax+0Ah]
cmp eax, 39h ; '9'
jg loc_5039E
mov rax, [rbp+var_30]
movsx eax, byte ptr [rax+0Bh]
cmp eax, 30h ; '0'
jl loc_5039E
mov rax, [rbp+var_30]
movsx eax, byte ptr [rax+0Bh]
cmp eax, 39h ; '9'
jg loc_5039E
mov rax, [rbp+var_30]
movsx eax, byte ptr [rax+0Ch]
cmp eax, 30h ; '0'
jl loc_5039E
mov rax, [rbp+var_30]
movsx eax, byte ptr [rax+0Ch]
cmp eax, 39h ; '9'
jg loc_5039E
mov rax, [rbp+var_30]
movsx eax, byte ptr [rax+0Dh]
cmp eax, 30h ; '0'
jl loc_5039E
mov rax, [rbp+var_30]
movsx eax, byte ptr [rax+0Dh]
cmp eax, 39h ; '9'
jg loc_5039E
mov rax, [rbp+var_30]
movsx eax, byte ptr [rax+0Eh]
cmp eax, 30h ; '0'
jl loc_5039E
mov rax, [rbp+var_30]
movsx eax, byte ptr [rax+0Eh]
cmp eax, 39h ; '9'
jg short loc_5039E
mov rax, [rbp+var_30]
movsx eax, byte ptr [rax+0Fh]
cmp eax, 30h ; '0'
jl short loc_5039E
mov rax, [rbp+var_30]
movsx eax, byte ptr [rax+0Fh]
cmp eax, 39h ; '9'
jg short loc_5039E
mov rax, [rbp+var_30]
movsx eax, byte ptr [rax+10h]
cmp eax, 30h ; '0'
jl short loc_5039E
mov rax, [rbp+var_30]
movsx eax, byte ptr [rax+10h]
cmp eax, 39h ; '9'
jg short loc_5039E
mov rax, [rbp+var_30]
movsx eax, byte ptr [rax+11h]
cmp eax, 30h ; '0'
jl short loc_5039E
mov rax, [rbp+var_30]
movsx eax, byte ptr [rax+11h]
cmp eax, 39h ; '9'
jg short loc_5039E
mov rax, [rbp+var_30]
movsx eax, byte ptr [rax+12h]
cmp eax, 0
jnz short loc_5039E
mov rax, [rbp+var_18]
mov rdi, [rbp+var_10]
mov rsi, [rbp+var_30]
call rax
movsx eax, al
cmp eax, 0
jz short loc_5039E
mov [rbp+var_25], 1
jmp short loc_503AE
loc_5039E:
jmp short $+2
loc_503A0:
mov eax, [rbp+var_24]
add eax, 1
mov [rbp+var_24], eax
jmp loc_5023B
loc_503AE:
mov rdi, [rbp+var_20]
call my_dirend
mov al, [rbp+var_25]
mov [rbp+var_1], al
loc_503BD:
mov al, [rbp+var_1]
add rsp, 30h
pop rbp
retn
|
char translog_walk_filenames(long long a1, unsigned __int8 ( *a2)(long long, char *))
{
char *v3; // [rsp+0h] [rbp-30h]
char v4; // [rsp+Bh] [rbp-25h]
unsigned int i; // [rsp+Ch] [rbp-24h]
long long v6; // [rsp+10h] [rbp-20h]
v4 = 0;
v6 = my_dir(a1, 0LL);
if ( !v6 )
return 0;
for ( i = 0; i < *(_DWORD *)(v6 + 8); ++i )
{
v3 = *(char **)(16LL * i + *(_QWORD *)v6);
if ( !(unsigned int)strncmp(v3, "aria_log.", 10LL)
&& v3[10] >= 48
&& v3[10] <= 57
&& v3[11] >= 48
&& v3[11] <= 57
&& v3[12] >= 48
&& v3[12] <= 57
&& v3[13] >= 48
&& v3[13] <= 57
&& v3[14] >= 48
&& v3[14] <= 57
&& v3[15] >= 48
&& v3[15] <= 57
&& v3[16] >= 48
&& v3[16] <= 57
&& v3[17] >= 48
&& v3[17] <= 57
&& !v3[18]
&& a2(a1, v3) )
{
v4 = 1;
break;
}
}
my_dirend(v6);
return v4;
}
|
translog_walk_filenames:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x30
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x18],RSI
MOV byte ptr [RBP + -0x25],0x0
MOV RDI,qword ptr [RBP + -0x10]
XOR EAX,EAX
MOV ESI,EAX
CALL 0x001f2fa0
MOV qword ptr [RBP + -0x20],RAX
CMP RAX,0x0
JNZ 0x00150234
MOV byte ptr [RBP + -0x1],0x0
JMP 0x001503bd
LAB_00150234:
MOV dword ptr [RBP + -0x24],0x0
LAB_0015023b:
MOV EAX,dword ptr [RBP + -0x24]
MOV RCX,qword ptr [RBP + -0x20]
CMP EAX,dword ptr [RCX + 0x8]
JNC 0x001503ae
MOV RAX,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RAX]
MOV ECX,dword ptr [RBP + -0x24]
SHL RCX,0x4
ADD RAX,RCX
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x30],RAX
MOV RDI,qword ptr [RBP + -0x30]
LEA RSI,[0x251d1e]
MOV EDX,0xa
CALL 0x0012a1e0
CMP EAX,0x0
JNZ 0x0015039e
MOV RAX,qword ptr [RBP + -0x30]
MOVSX EAX,byte ptr [RAX + 0xa]
CMP EAX,0x30
JL 0x0015039e
MOV RAX,qword ptr [RBP + -0x30]
MOVSX EAX,byte ptr [RAX + 0xa]
CMP EAX,0x39
JG 0x0015039e
MOV RAX,qword ptr [RBP + -0x30]
MOVSX EAX,byte ptr [RAX + 0xb]
CMP EAX,0x30
JL 0x0015039e
MOV RAX,qword ptr [RBP + -0x30]
MOVSX EAX,byte ptr [RAX + 0xb]
CMP EAX,0x39
JG 0x0015039e
MOV RAX,qword ptr [RBP + -0x30]
MOVSX EAX,byte ptr [RAX + 0xc]
CMP EAX,0x30
JL 0x0015039e
MOV RAX,qword ptr [RBP + -0x30]
MOVSX EAX,byte ptr [RAX + 0xc]
CMP EAX,0x39
JG 0x0015039e
MOV RAX,qword ptr [RBP + -0x30]
MOVSX EAX,byte ptr [RAX + 0xd]
CMP EAX,0x30
JL 0x0015039e
MOV RAX,qword ptr [RBP + -0x30]
MOVSX EAX,byte ptr [RAX + 0xd]
CMP EAX,0x39
JG 0x0015039e
MOV RAX,qword ptr [RBP + -0x30]
MOVSX EAX,byte ptr [RAX + 0xe]
CMP EAX,0x30
JL 0x0015039e
MOV RAX,qword ptr [RBP + -0x30]
MOVSX EAX,byte ptr [RAX + 0xe]
CMP EAX,0x39
JG 0x0015039e
MOV RAX,qword ptr [RBP + -0x30]
MOVSX EAX,byte ptr [RAX + 0xf]
CMP EAX,0x30
JL 0x0015039e
MOV RAX,qword ptr [RBP + -0x30]
MOVSX EAX,byte ptr [RAX + 0xf]
CMP EAX,0x39
JG 0x0015039e
MOV RAX,qword ptr [RBP + -0x30]
MOVSX EAX,byte ptr [RAX + 0x10]
CMP EAX,0x30
JL 0x0015039e
MOV RAX,qword ptr [RBP + -0x30]
MOVSX EAX,byte ptr [RAX + 0x10]
CMP EAX,0x39
JG 0x0015039e
MOV RAX,qword ptr [RBP + -0x30]
MOVSX EAX,byte ptr [RAX + 0x11]
CMP EAX,0x30
JL 0x0015039e
MOV RAX,qword ptr [RBP + -0x30]
MOVSX EAX,byte ptr [RAX + 0x11]
CMP EAX,0x39
JG 0x0015039e
MOV RAX,qword ptr [RBP + -0x30]
MOVSX EAX,byte ptr [RAX + 0x12]
CMP EAX,0x0
JNZ 0x0015039e
MOV RAX,qword ptr [RBP + -0x18]
MOV RDI,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RBP + -0x30]
CALL RAX
MOVSX EAX,AL
CMP EAX,0x0
JZ 0x0015039e
MOV byte ptr [RBP + -0x25],0x1
JMP 0x001503ae
LAB_0015039e:
JMP 0x001503a0
LAB_001503a0:
MOV EAX,dword ptr [RBP + -0x24]
ADD EAX,0x1
MOV dword ptr [RBP + -0x24],EAX
JMP 0x0015023b
LAB_001503ae:
MOV RDI,qword ptr [RBP + -0x20]
CALL 0x001f2f50
MOV AL,byte ptr [RBP + -0x25]
MOV byte ptr [RBP + -0x1],AL
LAB_001503bd:
MOV AL,byte ptr [RBP + -0x1]
ADD RSP,0x30
POP RBP
RET
|
int8 translog_walk_filenames(int8 param_1,code *param_2)
{
char *__s1;
char cVar1;
int iVar2;
long *plVar3;
int8 uVar4;
int7 uVar5;
int1 local_2d;
uint local_2c;
int1 local_9;
local_2d = 0;
plVar3 = (long *)my_dir(param_1,0);
if (plVar3 == (long *)0x0) {
local_9 = 0;
uVar5 = 0;
}
else {
for (local_2c = 0; local_2c < *(uint *)(plVar3 + 1); local_2c = local_2c + 1) {
__s1 = *(char **)(*plVar3 + (ulong)local_2c * 0x10);
iVar2 = strncmp(__s1,"aria_log.",10);
if (((((((iVar2 == 0) && ('/' < __s1[10])) && (__s1[10] < ':')) &&
(('/' < __s1[0xb] && (__s1[0xb] < ':')))) &&
(('/' < __s1[0xc] && ((__s1[0xc] < ':' && ('/' < __s1[0xd])))))) && (__s1[0xd] < ':')) &&
((((('/' < __s1[0xe] && (__s1[0xe] < ':')) && ('/' < __s1[0xf])) &&
(((__s1[0xf] < ':' && ('/' < __s1[0x10])) &&
((__s1[0x10] < ':' && (('/' < __s1[0x11] && (__s1[0x11] < ':')))))))) &&
(__s1[0x12] == '\0')))) {
cVar1 = (*param_2)(param_1,__s1);
if (cVar1 != '\0') {
local_2d = 1;
break;
}
}
}
uVar4 = my_dirend(plVar3);
uVar5 = (int7)((ulong)uVar4 >> 8);
local_9 = local_2d;
}
return CONCAT71(uVar5,local_9);
}
|
|
8,940 |
ps_fetch_float
|
eloqsql/libmariadb/libmariadb/ma_stmt_codec.c
|
static
void ps_fetch_float(MYSQL_BIND *r_param, const MYSQL_FIELD * field, unsigned char **row)
{
switch(r_param->buffer_type)
{
case MYSQL_TYPE_FLOAT:
{
float *value= (float *)r_param->buffer;
float4get(*value, *row);
r_param->buffer_length= 4;
*r_param->error= 0;
}
break;
default:
{
float value;
memcpy(&value, *row, sizeof(float));
float4get(value, (char *)*row);
convert_from_float(r_param, field, value, sizeof(float));
}
break;
}
(*row)+= 4;
}
|
O0
|
c
|
ps_fetch_float:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x8(%rbp), %rax
movl 0x60(%rax), %eax
subl $0x4, %eax
jne 0x2f1d6
jmp 0x2f1a2
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
movq -0x18(%rbp), %rcx
movq (%rcx), %rcx
movl (%rcx), %ecx
movl %ecx, (%rax)
movq -0x8(%rbp), %rax
movq $0x4, 0x40(%rax)
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rax
movb $0x0, (%rax)
jmp 0x2f205
movq -0x18(%rbp), %rax
movq (%rax), %rax
movl (%rax), %eax
movl %eax, -0x24(%rbp)
movq -0x18(%rbp), %rax
movq (%rax), %rax
movl (%rax), %eax
movl %eax, -0x24(%rbp)
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movss -0x24(%rbp), %xmm0
movl $0x4, %edx
callq 0x30a50
movq -0x18(%rbp), %rax
movq (%rax), %rcx
addq $0x4, %rcx
movq %rcx, (%rax)
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax)
|
ps_fetch_float:
push rbp
mov rbp, rsp
sub rsp, 30h
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov [rbp+var_18], rdx
mov rax, [rbp+var_8]
mov eax, [rax+60h]
sub eax, 4
jnz short loc_2F1D6
jmp short $+2
loc_2F1A2:
mov rax, [rbp+var_8]
mov rax, [rax+10h]
mov [rbp+var_20], rax
mov rax, [rbp+var_20]
mov rcx, [rbp+var_18]
mov rcx, [rcx]
mov ecx, [rcx]
mov [rax], ecx
mov rax, [rbp+var_8]
mov qword ptr [rax+40h], 4
mov rax, [rbp+var_8]
mov rax, [rax+18h]
mov byte ptr [rax], 0
jmp short loc_2F205
loc_2F1D6:
mov rax, [rbp+var_18]
mov rax, [rax]
mov eax, [rax]
mov [rbp+var_24], eax
mov rax, [rbp+var_18]
mov rax, [rax]
mov eax, [rax]
mov [rbp+var_24], eax
mov rdi, [rbp+var_8]
mov rsi, [rbp+var_10]
movss xmm0, [rbp+var_24]
mov edx, 4
call convert_from_float
loc_2F205:
mov rax, [rbp+var_18]
mov rcx, [rax]
add rcx, 4
mov [rax], rcx
add rsp, 30h
pop rbp
retn
|
float ** ps_fetch_float(long long a1, long long a2, float **a3)
{
float **result; // rax
if ( *(_DWORD *)(a1 + 96) == 4 )
{
**(float **)(a1 + 16) = **a3;
*(_QWORD *)(a1 + 64) = 4LL;
**(_BYTE **)(a1 + 24) = 0;
}
else
{
convert_from_float(a1, a2, 4LL, **a3);
}
result = a3;
++*a3;
return result;
}
|
ps_fetch_float:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x30
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV qword ptr [RBP + -0x18],RDX
MOV RAX,qword ptr [RBP + -0x8]
MOV EAX,dword ptr [RAX + 0x60]
SUB EAX,0x4
JNZ 0x0012f1d6
JMP 0x0012f1a2
LAB_0012f1a2:
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX + 0x10]
MOV qword ptr [RBP + -0x20],RAX
MOV RAX,qword ptr [RBP + -0x20]
MOV RCX,qword ptr [RBP + -0x18]
MOV RCX,qword ptr [RCX]
MOV ECX,dword ptr [RCX]
MOV dword ptr [RAX],ECX
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RAX + 0x40],0x4
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX + 0x18]
MOV byte ptr [RAX],0x0
JMP 0x0012f205
LAB_0012f1d6:
MOV RAX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RAX]
MOV EAX,dword ptr [RAX]
MOV dword ptr [RBP + -0x24],EAX
MOV RAX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RAX]
MOV EAX,dword ptr [RAX]
MOV dword ptr [RBP + -0x24],EAX
MOV RDI,qword ptr [RBP + -0x8]
MOV RSI,qword ptr [RBP + -0x10]
MOVSS XMM0,dword ptr [RBP + -0x24]
MOV EDX,0x4
CALL 0x00130a50
LAB_0012f205:
MOV RAX,qword ptr [RBP + -0x18]
MOV RCX,qword ptr [RAX]
ADD RCX,0x4
MOV qword ptr [RAX],RCX
ADD RSP,0x30
POP RBP
RET
|
void ps_fetch_float(long param_1,int8 param_2,long *param_3)
{
if (*(int *)(param_1 + 0x60) == 4) {
**(int4 **)(param_1 + 0x10) = *(int4 *)*param_3;
*(int8 *)(param_1 + 0x40) = 4;
**(int1 **)(param_1 + 0x18) = 0;
}
else {
convert_from_float(*(int4 *)*param_3,param_1,param_2,4);
}
*param_3 = *param_3 + 4;
return;
}
|
|
8,941 |
ps_fetch_float
|
eloqsql/libmariadb/libmariadb/ma_stmt_codec.c
|
static
void ps_fetch_float(MYSQL_BIND *r_param, const MYSQL_FIELD * field, unsigned char **row)
{
switch(r_param->buffer_type)
{
case MYSQL_TYPE_FLOAT:
{
float *value= (float *)r_param->buffer;
float4get(*value, *row);
r_param->buffer_length= 4;
*r_param->error= 0;
}
break;
default:
{
float value;
memcpy(&value, *row, sizeof(float));
float4get(value, (char *)*row);
convert_from_float(r_param, field, value, sizeof(float));
}
break;
}
(*row)+= 4;
}
|
O3
|
c
|
ps_fetch_float:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x150, %rsp # imm = 0x150
movq %rdx, %rbx
movq %rdi, %r14
movq %fs:0x28, %rax
movq %rax, -0x28(%rbp)
movl 0x60(%rdi), %r12d
cmpl $0x4, %r12d
jne 0x23a6e
movq 0x10(%r14), %rax
movq (%rbx), %rcx
movl (%rcx), %ecx
movl %ecx, (%rax)
movq $0x4, 0x40(%r14)
movq 0x18(%r14), %rax
movb $0x0, (%rax)
jmp 0x23d1f
movq %rsi, %r15
movq (%rbx), %rax
movss (%rax), %xmm1
xorps %xmm0, %xmm0
ucomiss %xmm0, %xmm1
movaps %xmm1, -0x170(%rbp)
jbe 0x23a95
movaps %xmm1, %xmm0
callq 0x131a0
cvtss2sd %xmm0, %xmm0
jmp 0x23aaf
movaps 0x147b4(%rip), %xmm0 # 0x38250
xorps %xmm1, %xmm0
callq 0x131a0
cvtss2sd %xmm0, %xmm0
xorps 0x147b1(%rip), %xmm0 # 0x38260
decl %r12d
cmpl $0xc, %r12d
ja 0x23b65
movq 0x10(%r14), %rax
leaq 0x14659(%rip), %rcx # 0x38120
movslq (%rcx,%r12,4), %rdx
addq %rcx, %rdx
jmpq *%rdx
cmpb $0x0, 0x65(%r14)
movaps -0x170(%rbp), %xmm1
cvttss2si %xmm1, %ecx
je 0x23be3
movzwl %cx, %edx
jmp 0x23be6
cmpb $0x0, 0x65(%r14)
movaps -0x170(%rbp), %xmm1
je 0x23cf5
cvttss2si %xmm1, %rcx
movq %rcx, %rdx
subss 0x104f4(%rip), %xmm1 # 0x34004
cvttss2si %xmm1, %rsi
sarq $0x3f, %rdx
andq %rdx, %rsi
orq %rcx, %rsi
movq %rsi, %xmm2
punpckldq 0x14744(%rip), %xmm2 # xmm2 = xmm2[0],mem[0],xmm2[1],mem[1]
subpd 0x1474c(%rip), %xmm2 # 0x38280
movq %rsi, (%rax)
movapd %xmm2, %xmm1
unpckhpd %xmm2, %xmm1 # xmm1 = xmm1[1],xmm2[1]
addsd %xmm2, %xmm1
jmp 0x23d05
cvttss2si -0x170(%rbp), %ecx
movb %cl, (%rax)
cmpb $0x0, 0x65(%r14)
je 0x23c0f
movzbl %cl, %eax
jmp 0x23c12
movl 0x68(%r15), %edi
cmpl $0x1f, %edi
movaps -0x170(%rbp), %xmm0
jb 0x23c38
movq 0x40(%r14), %rax
movl $0x12b, %esi # imm = 0x12B
cmpq %rsi, %rax
cmovbq %rax, %rsi
cvtss2sd %xmm0, %xmm0
leaq -0x160(%rbp), %rdx
xorl %edi, %edi
xorl %ecx, %ecx
callq 0x266c5
jmp 0x23c4a
cmpb $0x0, 0x65(%r14)
movaps -0x170(%rbp), %xmm1
cvttss2si %xmm1, %ecx
cvttss2si %xmm1, %rdx
cmovnel %edx, %ecx
je 0x23ccf
movl %edx, %edx
xorps %xmm1, %xmm1
cvtsi2sd %rdx, %xmm1
jmp 0x23cd7
xorps %xmm0, %xmm0
cvtss2sd -0x170(%rbp), %xmm0
movsd %xmm0, (%rax)
jmp 0x23d17
movswl %cx, %edx
xorps %xmm1, %xmm1
cvtsi2sd %edx, %xmm1
movw %cx, (%rax)
ucomisd %xmm1, %xmm0
setp %al
setne %cl
orb %al, %cl
movq 0x18(%r14), %rax
movb %cl, (%rax)
movq $0x2, 0x40(%r14)
jmp 0x23d1f
movsbl %cl, %eax
xorps %xmm1, %xmm1
cvtsi2sd %eax, %xmm1
ucomisd %xmm1, %xmm0
setp %al
setne %cl
orb %al, %cl
movq 0x18(%r14), %rax
movb %cl, (%rax)
movq $0x1, 0x40(%r14)
jmp 0x23d1f
cvtss2sd %xmm0, %xmm0
leaq -0x160(%rbp), %rsi
xorl %edx, %edx
callq 0x250e8
testb $0x40, 0x64(%r15)
jne 0x23c56
movq %rax, %r15
jmp 0x23cbb
movq 0x38(%r15), %r15
movq %r15, %rdx
subq %rax, %rdx
setb %cl
cmpq $0x12c, %r15 # imm = 0x12C
setae %sil
orb %cl, %sil
jne 0x23d1f
testq %rax, %rax
je 0x23ca5
leaq -0x160(%rbp), %rsi
leaq (%rax,%rsi), %rcx
decq %rcx
negq %rax
addq %r15, %rsi
decq %rsi
xorl %edi, %edi
movb (%rcx,%rdi), %r8b
movb %r8b, (%rsi,%rdi)
decq %rdi
cmpq %rdi, %rax
jne 0x23c95
leaq -0x160(%rbp), %rdi
movl $0x12c, %ecx # imm = 0x12C
movl $0x30, %esi
callq 0x13620
leaq -0x160(%rbp), %rsi
movq %r14, %rdi
movq %r15, %rdx
callq 0x247dd
jmp 0x23d1f
cvttps2dq %xmm1, %xmm1
cvtdq2pd %xmm1, %xmm1
movl %ecx, (%rax)
ucomisd %xmm1, %xmm0
setp %al
setne %cl
orb %al, %cl
movq 0x18(%r14), %rax
movb %cl, (%rax)
movq $0x4, 0x40(%r14)
jmp 0x23d1f
cvttss2si %xmm1, %rcx
movq %rcx, (%rax)
xorps %xmm1, %xmm1
cvtsi2sd %rcx, %xmm1
ucomisd %xmm1, %xmm0
setp %al
setne %cl
orb %al, %cl
movq 0x18(%r14), %rax
movb %cl, (%rax)
movq $0x8, 0x40(%r14)
addq $0x4, (%rbx)
movq %fs:0x28, %rax
cmpq -0x28(%rbp), %rax
jne 0x23d42
addq $0x150, %rsp # imm = 0x150
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
callq 0x13500
|
ps_fetch_float:
push rbp
mov rbp, rsp
push r15
push r14
push r12
push rbx
sub rsp, 150h
mov rbx, rdx
mov r14, rdi
mov rax, fs:28h
mov [rbp+var_28], rax
mov r12d, [rdi+60h]
cmp r12d, 4
jnz short loc_23A6E
mov rax, [r14+10h]
mov rcx, [rbx]
mov ecx, [rcx]
mov [rax], ecx
mov qword ptr [r14+40h], 4
mov rax, [r14+18h]
mov byte ptr [rax], 0
jmp loc_23D1F
loc_23A6E:
mov r15, rsi
mov rax, [rbx]
movss xmm1, dword ptr [rax]
xorps xmm0, xmm0
ucomiss xmm1, xmm0
movaps [rbp+var_170], xmm1
jbe short loc_23A95
movaps xmm0, xmm1
call _floorf
cvtss2sd xmm0, xmm0
jmp short loc_23AAF
loc_23A95:
movaps xmm0, cs:xmmword_38250
xorps xmm0, xmm1
call _floorf
cvtss2sd xmm0, xmm0
xorps xmm0, cs:xmmword_38260
loc_23AAF:
dec r12d; switch 13 cases
cmp r12d, 0Ch
ja def_23ACE; jumptable 0000000000023ACE default case, cases 4,6,7,9-12
mov rax, [r14+10h]
lea rcx, jpt_23ACE
movsxd rdx, ds:(jpt_23ACE - 38120h)[rcx+r12*4]
add rdx, rcx
jmp rdx; switch jump
loc_23AD0:
cmp byte ptr [r14+65h], 0; jumptable 0000000000023ACE cases 2,13
movaps xmm1, [rbp+var_170]
cvttss2si ecx, xmm1
jz loc_23BE3
movzx edx, cx
jmp loc_23BE6
loc_23AEE:
cmp byte ptr [r14+65h], 0; jumptable 0000000000023ACE case 8
movaps xmm1, [rbp+var_170]
jz loc_23CF5
cvttss2si rcx, xmm1
mov rdx, rcx
subss xmm1, cs:dword_34004
cvttss2si rsi, xmm1
sar rdx, 3Fh
and rsi, rdx
or rsi, rcx
movq xmm2, rsi
punpckldq xmm2, cs:xmmword_38270
subpd xmm2, cs:xmmword_38280
mov [rax], rsi
movapd xmm1, xmm2
unpckhpd xmm1, xmm2
addsd xmm1, xmm2
jmp loc_23D05
loc_23B48:
cvttss2si ecx, dword ptr [rbp+var_170]; jumptable 0000000000023ACE case 1
mov [rax], cl
cmp byte ptr [r14+65h], 0
jz loc_23C0F
movzx eax, cl
jmp loc_23C12
def_23ACE:
mov edi, [r15+68h]; jumptable 0000000000023ACE default case, cases 4,6,7,9-12
cmp edi, 1Fh
movaps xmm0, [rbp+var_170]
jb loc_23C38
mov rax, [r14+40h]
mov esi, 12Bh
cmp rax, rsi
cmovb rsi, rax
cvtss2sd xmm0, xmm0
lea rdx, [rbp+var_160]
xor edi, edi
xor ecx, ecx
call ma_gcvt
jmp loc_23C4A
loc_23BA2:
cmp byte ptr [r14+65h], 0; jumptable 0000000000023ACE case 3
movaps xmm1, [rbp+var_170]
cvttss2si ecx, xmm1
cvttss2si rdx, xmm1
cmovnz ecx, edx
jz loc_23CCF
mov edx, edx
xorps xmm1, xmm1
cvtsi2sd xmm1, rdx
jmp loc_23CD7
loc_23BCF:
xorps xmm0, xmm0; jumptable 0000000000023ACE case 5
cvtss2sd xmm0, dword ptr [rbp+var_170]
movsd qword ptr [rax], xmm0
jmp loc_23D17
loc_23BE3:
movsx edx, cx
loc_23BE6:
xorps xmm1, xmm1
cvtsi2sd xmm1, edx
mov [rax], cx
ucomisd xmm0, xmm1
setp al
setnz cl
or cl, al
mov rax, [r14+18h]
mov [rax], cl
mov qword ptr [r14+40h], 2
jmp loc_23D1F
loc_23C0F:
movsx eax, cl
loc_23C12:
xorps xmm1, xmm1
cvtsi2sd xmm1, eax
ucomisd xmm0, xmm1
setp al
setnz cl
or cl, al
mov rax, [r14+18h]
mov [rax], cl
mov qword ptr [r14+40h], 1
jmp loc_23D1F
loc_23C38:
cvtss2sd xmm0, xmm0
lea rsi, [rbp+var_160]
xor edx, edx
call ma_fcvt
loc_23C4A:
test byte ptr [r15+64h], 40h
jnz short loc_23C56
mov r15, rax
jmp short loc_23CBB
loc_23C56:
mov r15, [r15+38h]
mov rdx, r15
sub rdx, rax
setb cl
cmp r15, 12Ch
setnb sil
or sil, cl
jnz loc_23D1F
test rax, rax
jz short loc_23CA5
lea rsi, [rbp+var_160]
lea rcx, [rax+rsi]
dec rcx
neg rax
add rsi, r15
dec rsi
xor edi, edi
loc_23C95:
mov r8b, [rcx+rdi]
mov [rsi+rdi], r8b
dec rdi
cmp rax, rdi
jnz short loc_23C95
loc_23CA5:
lea rdi, [rbp+var_160]
mov ecx, 12Ch
mov esi, 30h ; '0'
call ___memset_chk
loc_23CBB:
lea rsi, [rbp+var_160]
mov rdi, r14
mov rdx, r15
call convert_froma_string
jmp short loc_23D1F
loc_23CCF:
cvttps2dq xmm1, xmm1
cvtdq2pd xmm1, xmm1
loc_23CD7:
mov [rax], ecx
ucomisd xmm0, xmm1
setp al
setnz cl
or cl, al
mov rax, [r14+18h]
mov [rax], cl
mov qword ptr [r14+40h], 4
jmp short loc_23D1F
loc_23CF5:
cvttss2si rcx, xmm1
mov [rax], rcx
xorps xmm1, xmm1
cvtsi2sd xmm1, rcx
loc_23D05:
ucomisd xmm0, xmm1
setp al
setnz cl
or cl, al
mov rax, [r14+18h]
mov [rax], cl
loc_23D17:
mov qword ptr [r14+40h], 8
loc_23D1F:
add qword ptr [rbx], 4
mov rax, fs:28h
cmp rax, [rbp+var_28]
jnz short loc_23D42
add rsp, 150h
pop rbx
pop r12
pop r14
pop r15
pop rbp
retn
loc_23D42:
call ___stack_chk_fail
|
unsigned long long ps_fetch_float(long long a1, long long a2, _DWORD **a3)
{
int v5; // r12d
double v7; // xmm1_8
double v8; // xmm0_8
_BYTE *v9; // rax
int v10; // ecx
int v11; // edx
__m128d v12; // xmm2
double v13; // xmm1_8
int v14; // ecx
int v15; // eax
long long v16; // rdi
long long v17; // rsi
unsigned long long v18; // rax
int v19; // ecx
double v20; // xmm1_8
unsigned long long v21; // r15
unsigned long long v22; // rdx
_BYTE *v23; // rcx
long long v24; // rax
long long v25; // rdi
long long v26; // rcx
__m128 v28; // [rsp+0h] [rbp-170h]
_BYTE v29[312]; // [rsp+10h] [rbp-160h] BYREF
unsigned long long v30; // [rsp+148h] [rbp-28h]
v30 = __readfsqword(0x28u);
v5 = *(_DWORD *)(a1 + 96);
if ( v5 == 4 )
{
**(_DWORD **)(a1 + 16) = **a3;
*(_QWORD *)(a1 + 64) = 4LL;
**(_BYTE **)(a1 + 24) = 0;
}
else
{
*(_QWORD *)&v7 = (unsigned int)**a3;
v28 = (__m128)(unsigned int)**a3;
if ( *(float *)&v7 <= 0.0 )
v8 = -floorf(COERCE_DOUBLE(*(_QWORD *)&v7 ^ 0x8000000080000000LL));
else
v8 = floorf(v7);
v9 = *(_BYTE **)(a1 + 16);
switch ( v5 )
{
case 1:
v14 = (int)v28.m128_f32[0];
*v9 = (int)v28.m128_f32[0];
if ( *(_BYTE *)(a1 + 101) )
v15 = (unsigned __int8)v14;
else
v15 = (char)v14;
**(_BYTE **)(a1 + 24) = v8 != (double)v15;
*(_QWORD *)(a1 + 64) = 1LL;
break;
case 2:
case 13:
v10 = (int)v28.m128_f32[0];
if ( *(_BYTE *)(a1 + 101) )
v11 = (unsigned __int16)v10;
else
v11 = (__int16)v10;
*(_WORD *)v9 = v10;
**(_BYTE **)(a1 + 24) = v8 != (double)v11;
*(_QWORD *)(a1 + 64) = 2LL;
break;
case 3:
v19 = (int)v28.m128_f32[0];
if ( *(_BYTE *)(a1 + 101) )
{
v19 = (int)v28.m128_f32[0];
v20 = (double)(int)v28.m128_f32[0];
}
else
{
*(_QWORD *)&v20 = *(_OWORD *)&_mm_cvtepi32_pd(_mm_cvttps_epi32(v28));
}
*(_DWORD *)v9 = v19;
**(_BYTE **)(a1 + 24) = v8 != v20;
*(_QWORD *)(a1 + 64) = 4LL;
break;
case 5:
*(double *)v9 = v28.m128_f32[0];
goto LABEL_37;
case 8:
if ( *(_BYTE *)(a1 + 101) )
{
v12 = _mm_sub_pd(
(__m128d)_mm_unpacklo_epi32((__m128i)(unsigned int)(int)v28.m128_f32[0], (__m128i)xmmword_38270),
(__m128d)xmmword_38280);
*(_QWORD *)v9 = (unsigned int)(int)v28.m128_f32[0];
v13 = _mm_unpackhi_pd(v12, v12).m128d_f64[0] + v12.m128d_f64[0];
}
else
{
v26 = (unsigned int)(int)v28.m128_f32[0];
*(_QWORD *)v9 = v26;
v13 = (double)(int)v26;
}
**(_BYTE **)(a1 + 24) = v8 != v13;
LABEL_37:
*(_QWORD *)(a1 + 64) = 8LL;
break;
default:
v16 = *(unsigned int *)(a2 + 104);
if ( (unsigned int)v16 < 0x1F )
{
v18 = ma_fcvt(v16, v29, 0LL, v28.m128_f32[0]);
}
else
{
v17 = 299LL;
if ( *(_QWORD *)(a1 + 64) < 0x12BuLL )
v17 = *(_QWORD *)(a1 + 64);
v18 = ma_gcvt(0LL, v17, v29, 0LL, v28.m128_f32[0]);
}
if ( (*(_BYTE *)(a2 + 100) & 0x40) != 0 )
{
v21 = *(_QWORD *)(a2 + 56);
v22 = v21 - v18;
if ( v21 < v18 || v21 >= 0x12C )
break;
if ( v18 )
{
v23 = &v29[v18 - 1];
v24 = -(long long)v18;
v25 = 0LL;
do
{
v29[v21 - 1 + v25] = v23[v25];
--v25;
}
while ( v24 != v25 );
}
__memset_chk(v29, 48LL, v22, 300LL);
}
else
{
v21 = v18;
}
convert_froma_string(a1, v29, v21);
break;
}
}
++*a3;
return __readfsqword(0x28u);
}
|
ps_fetch_float:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
SUB RSP,0x150
MOV RBX,RDX
MOV R14,RDI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x28],RAX
MOV R12D,dword ptr [RDI + 0x60]
CMP R12D,0x4
JNZ 0x00123a6e
MOV RAX,qword ptr [R14 + 0x10]
MOV RCX,qword ptr [RBX]
MOV ECX,dword ptr [RCX]
MOV dword ptr [RAX],ECX
MOV qword ptr [R14 + 0x40],0x4
MOV RAX,qword ptr [R14 + 0x18]
MOV byte ptr [RAX],0x0
JMP 0x00123d1f
LAB_00123a6e:
MOV R15,RSI
MOV RAX,qword ptr [RBX]
MOVSS XMM1,dword ptr [RAX]
XORPS XMM0,XMM0
UCOMISS XMM1,XMM0
MOVAPS xmmword ptr [RBP + -0x170],XMM1
JBE 0x00123a95
MOVAPS XMM0,XMM1
CALL 0x001131a0
CVTSS2SD XMM0,XMM0
JMP 0x00123aaf
LAB_00123a95:
MOVAPS XMM0,xmmword ptr [0x00138250]
XORPS XMM0,XMM1
CALL 0x001131a0
CVTSS2SD XMM0,XMM0
XORPS XMM0,xmmword ptr [0x00138260]
LAB_00123aaf:
DEC R12D
CMP R12D,0xc
JA 0x00123b65
MOV RAX,qword ptr [R14 + 0x10]
LEA RCX,[0x138120]
MOVSXD RDX,dword ptr [RCX + R12*0x4]
ADD RDX,RCX
switchD:
JMP RDX
caseD_2:
CMP byte ptr [R14 + 0x65],0x0
MOVAPS XMM1,xmmword ptr [RBP + -0x170]
CVTTSS2SI ECX,XMM1
JZ 0x00123be3
MOVZX EDX,CX
JMP 0x00123be6
caseD_8:
CMP byte ptr [R14 + 0x65],0x0
MOVAPS XMM1,xmmword ptr [RBP + -0x170]
JZ 0x00123cf5
CVTTSS2SI RCX,XMM1
MOV RDX,RCX
SUBSS XMM1,dword ptr [0x00134004]
CVTTSS2SI RSI,XMM1
SAR RDX,0x3f
AND RSI,RDX
OR RSI,RCX
MOVQ XMM2,RSI
PUNPCKLDQ XMM2,xmmword ptr [0x00138270]
SUBPD XMM2,xmmword ptr [0x00138280]
MOV qword ptr [RAX],RSI
MOVAPD XMM1,XMM2
UNPCKHPD XMM1,XMM2
ADDSD XMM1,XMM2
JMP 0x00123d05
caseD_1:
CVTTSS2SI ECX,dword ptr [RBP + -0x170]
MOV byte ptr [RAX],CL
CMP byte ptr [R14 + 0x65],0x0
JZ 0x00123c0f
MOVZX EAX,CL
JMP 0x00123c12
caseD_4:
MOV EDI,dword ptr [R15 + 0x68]
CMP EDI,0x1f
MOVAPS XMM0,xmmword ptr [RBP + -0x170]
JC 0x00123c38
MOV RAX,qword ptr [R14 + 0x40]
MOV ESI,0x12b
CMP RAX,RSI
CMOVC RSI,RAX
CVTSS2SD XMM0,XMM0
LEA RDX,[RBP + -0x160]
XOR EDI,EDI
XOR ECX,ECX
CALL 0x001266c5
JMP 0x00123c4a
caseD_3:
CMP byte ptr [R14 + 0x65],0x0
MOVAPS XMM1,xmmword ptr [RBP + -0x170]
CVTTSS2SI ECX,XMM1
CVTTSS2SI RDX,XMM1
CMOVNZ ECX,EDX
JZ 0x00123ccf
MOV EDX,EDX
XORPS XMM1,XMM1
CVTSI2SD XMM1,RDX
JMP 0x00123cd7
caseD_5:
XORPS XMM0,XMM0
CVTSS2SD XMM0,dword ptr [RBP + -0x170]
MOVSD qword ptr [RAX],XMM0
JMP 0x00123d17
LAB_00123be3:
MOVSX EDX,CX
LAB_00123be6:
XORPS XMM1,XMM1
CVTSI2SD XMM1,EDX
MOV word ptr [RAX],CX
UCOMISD XMM0,XMM1
SETP AL
SETNZ CL
OR CL,AL
MOV RAX,qword ptr [R14 + 0x18]
MOV byte ptr [RAX],CL
MOV qword ptr [R14 + 0x40],0x2
JMP 0x00123d1f
LAB_00123c0f:
MOVSX EAX,CL
LAB_00123c12:
XORPS XMM1,XMM1
CVTSI2SD XMM1,EAX
UCOMISD XMM0,XMM1
SETP AL
SETNZ CL
OR CL,AL
MOV RAX,qword ptr [R14 + 0x18]
MOV byte ptr [RAX],CL
MOV qword ptr [R14 + 0x40],0x1
JMP 0x00123d1f
LAB_00123c38:
CVTSS2SD XMM0,XMM0
LEA RSI,[RBP + -0x160]
XOR EDX,EDX
CALL 0x001250e8
LAB_00123c4a:
TEST byte ptr [R15 + 0x64],0x40
JNZ 0x00123c56
MOV R15,RAX
JMP 0x00123cbb
LAB_00123c56:
MOV R15,qword ptr [R15 + 0x38]
MOV RDX,R15
SUB RDX,RAX
SETC CL
CMP R15,0x12c
SETNC SIL
OR SIL,CL
JNZ 0x00123d1f
TEST RAX,RAX
JZ 0x00123ca5
LEA RSI,[RBP + -0x160]
LEA RCX,[RAX + RSI*0x1]
DEC RCX
NEG RAX
ADD RSI,R15
DEC RSI
XOR EDI,EDI
LAB_00123c95:
MOV R8B,byte ptr [RCX + RDI*0x1]
MOV byte ptr [RSI + RDI*0x1],R8B
DEC RDI
CMP RAX,RDI
JNZ 0x00123c95
LAB_00123ca5:
LEA RDI,[RBP + -0x160]
MOV ECX,0x12c
MOV ESI,0x30
CALL 0x00113620
LAB_00123cbb:
LEA RSI,[RBP + -0x160]
MOV RDI,R14
MOV RDX,R15
CALL 0x001247dd
JMP 0x00123d1f
LAB_00123ccf:
CVTTPS2DQ XMM1,XMM1
CVTDQ2PD XMM1,XMM1
LAB_00123cd7:
MOV dword ptr [RAX],ECX
UCOMISD XMM0,XMM1
SETP AL
SETNZ CL
OR CL,AL
MOV RAX,qword ptr [R14 + 0x18]
MOV byte ptr [RAX],CL
MOV qword ptr [R14 + 0x40],0x4
JMP 0x00123d1f
LAB_00123cf5:
CVTTSS2SI RCX,XMM1
MOV qword ptr [RAX],RCX
XORPS XMM1,XMM1
CVTSI2SD XMM1,RCX
LAB_00123d05:
UCOMISD XMM0,XMM1
SETP AL
SETNZ CL
OR CL,AL
MOV RAX,qword ptr [R14 + 0x18]
MOV byte ptr [RAX],CL
LAB_00123d17:
MOV qword ptr [R14 + 0x40],0x8
LAB_00123d1f:
ADD qword ptr [RBX],0x4
MOV RAX,qword ptr FS:[0x28]
CMP RAX,qword ptr [RBP + -0x28]
JNZ 0x00123d42
ADD RSP,0x150
POP RBX
POP R12
POP R14
POP R15
POP RBP
RET
LAB_00123d42:
CALL 0x00113500
|
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
void ps_fetch_float(long param_1,long param_2,long *param_3)
{
double *pdVar1;
ulong uVar2;
ulong uVar3;
char cVar4;
short sVar5;
int iVar6;
uint uVar7;
double dVar8;
long lVar9;
long in_FS_OFFSET;
float fVar10;
double dVar11;
double dVar12;
int1 auVar13 [16];
double dVar14;
int1 local_178 [16];
int1 local_168 [312];
long local_30;
local_30 = *(long *)(in_FS_OFFSET + 0x28);
iVar6 = *(int *)(param_1 + 0x60);
if (iVar6 == 4) {
**(int4 **)(param_1 + 0x10) = *(int4 *)*param_3;
*(int8 *)(param_1 + 0x40) = 4;
**(int1 **)(param_1 + 0x18) = 0;
goto LAB_00123d1f;
}
fVar10 = *(float *)*param_3;
local_178 = ZEXT416((uint)fVar10);
if (fVar10 <= 0.0) {
fVar10 = floorf((float)(_DAT_00138250 ^ (uint)fVar10));
dVar11 = (double)CONCAT44((uint)((ulong)(double)fVar10 >> 0x20) ^ _UNK_00138264,
SUB84((double)fVar10,0) ^ _DAT_00138260);
}
else {
fVar10 = floorf(fVar10);
dVar11 = (double)fVar10;
}
if (0xc < iVar6 - 1U) {
switchD_00123ace_caseD_4:
if (*(uint *)(param_2 + 0x68) < 0x1f) {
uVar3 = ma_fcvt((double)(float)local_178._0_4_,*(uint *)(param_2 + 0x68),local_168,0);
}
else {
uVar3 = 299;
if (*(ulong *)(param_1 + 0x40) < 299) {
uVar3 = *(ulong *)(param_1 + 0x40);
}
uVar3 = ma_gcvt((double)(float)local_178._0_4_,0,uVar3,local_168,0);
}
if ((*(byte *)(param_2 + 100) & 0x40) != 0) {
uVar2 = *(ulong *)(param_2 + 0x38);
if (299 < uVar2 || uVar2 < uVar3) goto LAB_00123d1f;
if (uVar3 != 0) {
lVar9 = 0;
do {
local_178[lVar9 + uVar2 + 0xf] = local_178[lVar9 + uVar3 + 0xf];
lVar9 = lVar9 + -1;
} while (-lVar9 != uVar3);
}
__memset_chk(local_168,0x30,uVar2 - uVar3,300);
uVar3 = uVar2;
}
convert_froma_string(param_1,local_168,uVar3);
goto LAB_00123d1f;
}
pdVar1 = *(double **)(param_1 + 0x10);
switch(iVar6) {
case 1:
cVar4 = (char)(int)(float)local_178._0_4_;
*(char *)pdVar1 = cVar4;
if (*(char *)(param_1 + 0x65) == '\0') {
uVar7 = (uint)cVar4;
}
else {
uVar7 = (int)(float)local_178._0_4_ & 0xff;
}
*(bool *)*(int8 *)(param_1 + 0x18) = dVar11 != (double)(int)uVar7;
*(int8 *)(param_1 + 0x40) = 1;
break;
case 2:
case 0xd:
sVar5 = (short)(int)(float)local_178._0_4_;
if (*(char *)(param_1 + 0x65) == '\0') {
uVar7 = (uint)sVar5;
}
else {
uVar7 = (int)(float)local_178._0_4_ & 0xffff;
}
*(short *)pdVar1 = sVar5;
*(bool *)*(int8 *)(param_1 + 0x18) = dVar11 != (double)(int)uVar7;
*(int8 *)(param_1 + 0x40) = 2;
break;
case 3:
iVar6 = (int)(float)local_178._0_4_;
if (*(char *)(param_1 + 0x65) == '\0') {
dVar14 = (double)(int)(float)local_178._0_4_;
}
else {
iVar6 = (int)(long)(float)local_178._0_4_;
dVar14 = (double)((long)(float)local_178._0_4_ & 0xffffffff);
}
*(int *)pdVar1 = iVar6;
*(bool *)*(int8 *)(param_1 + 0x18) = dVar11 != dVar14;
*(int8 *)(param_1 + 0x40) = 4;
break;
default:
goto switchD_00123ace_caseD_4;
case 5:
*pdVar1 = (double)(float)local_178._0_4_;
goto LAB_00123d17;
case 8:
if (*(char *)(param_1 + 0x65) == '\0') {
*pdVar1 = (double)(long)(float)local_178._0_4_;
dVar14 = (double)(long)(float)local_178._0_4_;
}
else {
dVar8 = (double)((long)((float)local_178._0_4_ - _DAT_00134004) &
(long)(float)local_178._0_4_ >> 0x3f | (long)(float)local_178._0_4_);
auVar13._8_4_ = (int)((ulong)dVar8 >> 0x20);
auVar13._0_8_ = dVar8;
auVar13._12_4_ = _UNK_00138274;
dVar12 = (double)CONCAT44(_DAT_00138270,SUB84(dVar8,0)) - _DAT_00138280;
dVar14 = auVar13._8_8_ - _UNK_00138288;
*pdVar1 = dVar8;
dVar14 = dVar14 + dVar12;
}
*(bool *)*(int8 *)(param_1 + 0x18) = dVar11 != dVar14;
LAB_00123d17:
*(int8 *)(param_1 + 0x40) = 8;
}
LAB_00123d1f:
*param_3 = *param_3 + 4;
if (*(long *)(in_FS_OFFSET + 0x28) == local_30) {
return;
}
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
|
|
8,942 |
ma_ft_convert_to_ft2
|
eloqsql/storage/maria/ma_ft_update.c
|
my_bool _ma_ft_convert_to_ft2(MARIA_HA *info, MARIA_KEY *key)
{
MARIA_SHARE *share= info->s;
my_off_t root;
DYNAMIC_ARRAY *da=info->ft1_to_ft2;
MARIA_KEYDEF *keyinfo=&share->ft2_keyinfo;
uchar *key_ptr= (uchar*) dynamic_array_ptr(da, 0), *end;
uint length, key_length;
MARIA_PINNED_PAGE tmp_page_link, *page_link= &tmp_page_link;
MARIA_KEY tmp_key;
MARIA_PAGE page;
DBUG_ENTER("_ma_ft_convert_to_ft2");
/* we'll generate one pageful at once, and insert the rest one-by-one */
/* calculating the length of this page ...*/
length=(keyinfo->block_length-2) / keyinfo->keylength;
set_if_smaller(length, da->elements);
length=length * keyinfo->keylength;
get_key_full_length_rdonly(key_length, key->data);
while (_ma_ck_delete(info, key) == 0)
{
/*
nothing to do here.
_ma_ck_delete() will populate info->ft1_to_ft2 with deleted keys
*/
}
/* creating pageful of keys */
bzero(info->buff, share->keypage_header);
_ma_store_keynr(share, info->buff, keyinfo->key_nr);
_ma_store_page_used(share, info->buff, length + share->keypage_header);
memcpy(info->buff + share->keypage_header, key_ptr, length);
info->keyread_buff_used= info->page_changed=1; /* info->buff is used */
/**
@todo RECOVERY BUG this is not logged yet. Ok as this code is never
called, but soon it will be.
*/
if ((root= _ma_new(info, DFLT_INIT_HITS, &page_link)) == HA_OFFSET_ERROR)
DBUG_RETURN(1);
_ma_page_setup(&page, info, keyinfo, root, info->buff);
if (_ma_write_keypage(&page, page_link->write_lock, DFLT_INIT_HITS))
DBUG_RETURN(1);
/* inserting the rest of key values */
end= (uchar*) dynamic_array_ptr(da, da->elements);
tmp_key.keyinfo= keyinfo;
tmp_key.data_length= keyinfo->keylength;
tmp_key.ref_length= 0;
tmp_key.flag= 0;
for (key_ptr+=length; key_ptr < end; key_ptr+=keyinfo->keylength)
{
tmp_key.data= key_ptr;
if (_ma_ck_real_write_btree(info, &tmp_key, &root, SEARCH_SAME))
DBUG_RETURN(1);
}
/* now, writing the word key entry */
ft_intXstore(key->data + key_length, - (int) da->elements);
_ma_dpointer(share, key->data + key_length + HA_FT_WLEN, root);
DBUG_RETURN(_ma_ck_real_write_btree(info, key,
&share->state.key_root[key->keyinfo->
key_nr],
SEARCH_SAME));
}
|
O3
|
c
|
ma_ft_convert_to_ft2:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xa8, %rsp
movq %rdi, %rbx
movq (%rdi), %r14
movq 0x320(%rdi), %rdi
movq (%rdi), %r12
leaq -0x90(%rbp), %rax
movq %rax, -0x40(%rbp)
movzwl 0x4fe(%r14), %eax
addl $-0x2, %eax
movzwl 0x502(%r14), %ecx
cltd
idivl %ecx
movq %rdi, -0x38(%rbp)
movl 0x8(%rdi), %r13d
cmpl %r13d, %eax
cmovbl %eax, %r13d
movq %rsi, %r15
movq (%rsi), %rax
movzbl (%rax), %edx
cmpq $0xff, %rdx
je 0x6abdc
incq %rdx
movq %rdx, -0x30(%rbp)
jmp 0x6abef
movzwl 0x1(%rax), %eax
rolw $0x8, %ax
movzwl %ax, %eax
addq $0x3, %rax
movq %rax, -0x30(%rbp)
leaq 0x458(%r14), %rax
movq %rax, -0x58(%rbp)
imull %ecx, %r13d
movq %rbx, %rdi
movq %r15, %rsi
callq 0x67505
testb %al, %al
je 0x6abfe
movq 0x378(%rbx), %rdi
movl 0x744(%r14), %edx
xorl %esi, %esi
callq 0x292c0
movb 0x4fd(%r14), %al
movq 0x378(%rbx), %rcx
movl 0x744(%r14), %edx
addl $-0x4, %edx
movb %al, (%rcx,%rdx)
movl 0x744(%r14), %eax
leal (%rax,%r13), %ecx
movq 0x378(%rbx), %rdx
movb %cl, -0x1(%rdx,%rax)
movq 0x378(%rbx), %rax
movl 0x744(%r14), %edx
movb %ch, -0x2(%rax,%rdx)
movl 0x744(%r14), %edi
addq 0x378(%rbx), %rdi
movl %r13d, %r13d
movq %r12, %rsi
movq %r13, %rdx
callq 0x29080
movw $0x101, 0x684(%rbx) # imm = 0x101
leaq -0x40(%rbp), %rdx
movq %rbx, %rdi
movl $0x3, %esi
callq 0x592ff
movq %rax, -0x48(%rbp)
movb $0x1, %cl
cmpq $-0x1, %rax
je 0x6adc1
movq %r13, -0x50(%rbp)
movq 0x378(%rbx), %r8
leaq -0xc8(%rbp), %rdi
movq %rbx, %rsi
movq -0x58(%rbp), %r13
movq %r13, %rdx
movq %rax, %rcx
callq 0x58e84
movq -0x40(%rbp), %rax
movl 0xc(%rax), %esi
leaq -0xc8(%rbp), %rdi
movl $0x3, %edx
callq 0x59015
testb %al, %al
je 0x6acf2
movb $0x1, %cl
jmp 0x6adc1
movq -0x38(%rbp), %rcx
movl 0x8(%rcx), %eax
movq %r13, %rdx
movl 0x14(%rcx), %r13d
imull %eax, %r13d
addq (%rcx), %r13
movq %rdx, -0x70(%rbp)
movzwl 0x502(%r14), %ecx
movl %ecx, -0x68(%rbp)
movq $0x0, -0x64(%rbp)
addq -0x50(%rbp), %r12
cmpq %r13, %r12
jae 0x6ad5b
movq %r12, -0x78(%rbp)
movq %rbx, %rdi
leaq -0x78(%rbp), %rsi
leaq -0x48(%rbp), %rdx
movl $0x4, %ecx
callq 0x64a20
testb %al, %al
jne 0x6aceb
movzwl 0x502(%r14), %eax
addq %rax, %r12
cmpq %r13, %r12
jb 0x6ad27
movq -0x38(%rbp), %rax
movl 0x8(%rax), %eax
negl %eax
movq (%r15), %rcx
movq -0x30(%rbp), %rsi
movb %al, 0x3(%rcx,%rsi)
movq (%r15), %rcx
movb %ah, 0x2(%rcx,%rsi)
movl %eax, %ecx
shrl $0x10, %ecx
movq (%r15), %rdx
movb %cl, 0x1(%rdx,%rsi)
shrl $0x18, %eax
movq (%r15), %rcx
movb %al, (%rcx,%rsi)
movq (%r15), %rax
addq %rax, %rsi
addq $0x4, %rsi
movq -0x48(%rbp), %rdx
movq %r14, %rdi
callq 0x57230
movq 0x8(%r15), %rax
movzbl 0xa5(%rax), %edx
shll $0x3, %edx
addq 0x118(%r14), %rdx
movq %rbx, %rdi
movq %r15, %rsi
movl $0x4, %ecx
callq 0x64a20
movl %eax, %ecx
movl %ecx, %eax
addq $0xa8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nopl (%rax)
|
_ma_ft_convert_to_ft2:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 0A8h
mov rbx, rdi
mov r14, [rdi]
mov rdi, [rdi+320h]
mov r12, [rdi]
lea rax, [rbp+var_90]
mov [rbp+var_40], rax
movzx eax, word ptr [r14+4FEh]
add eax, 0FFFFFFFEh
movzx ecx, word ptr [r14+502h]
cdq
idiv ecx
mov [rbp+var_38], rdi
mov r13d, [rdi+8]
cmp eax, r13d
cmovb r13d, eax
mov r15, rsi
mov rax, [rsi]
movzx edx, byte ptr [rax]
cmp rdx, 0FFh
jz short loc_6ABDC
inc rdx
mov [rbp+var_30], rdx
jmp short loc_6ABEF
loc_6ABDC:
movzx eax, word ptr [rax+1]
rol ax, 8
movzx eax, ax
add rax, 3
mov [rbp+var_30], rax
loc_6ABEF:
lea rax, [r14+458h]
mov [rbp+var_58], rax
imul r13d, ecx
loc_6ABFE:
mov rdi, rbx
mov rsi, r15
call _ma_ck_delete
test al, al
jz short loc_6ABFE
mov rdi, [rbx+378h]
mov edx, [r14+744h]
xor esi, esi
call _memset
mov al, [r14+4FDh]
mov rcx, [rbx+378h]
mov edx, [r14+744h]
add edx, 0FFFFFFFCh
mov [rcx+rdx], al
mov eax, [r14+744h]
lea ecx, [rax+r13]
mov rdx, [rbx+378h]
mov [rdx+rax-1], cl
mov rax, [rbx+378h]
mov edx, [r14+744h]
mov [rax+rdx-2], ch
mov edi, [r14+744h]
add rdi, [rbx+378h]
mov r13d, r13d
mov rsi, r12
mov rdx, r13
call _memcpy
mov word ptr [rbx+684h], 101h
lea rdx, [rbp+var_40]
mov rdi, rbx
mov esi, 3
call _ma_new
mov [rbp+var_48], rax
mov cl, 1
cmp rax, 0FFFFFFFFFFFFFFFFh
jz loc_6ADC1
mov [rbp+var_50], r13
mov r8, [rbx+378h]
lea rdi, [rbp+var_C8]
mov rsi, rbx
mov r13, [rbp+var_58]
mov rdx, r13
mov rcx, rax
call _ma_page_setup
mov rax, [rbp+var_40]
mov esi, [rax+0Ch]
lea rdi, [rbp+var_C8]
mov edx, 3
call _ma_write_keypage
test al, al
jz short loc_6ACF2
loc_6ACEB:
mov cl, 1
jmp loc_6ADC1
loc_6ACF2:
mov rcx, [rbp+var_38]
mov eax, [rcx+8]
mov rdx, r13
mov r13d, [rcx+14h]
imul r13d, eax
add r13, [rcx]
mov [rbp+var_70], rdx
movzx ecx, word ptr [r14+502h]
mov [rbp+var_68], ecx
mov [rbp+var_64], 0
add r12, [rbp+var_50]
cmp r12, r13
jnb short loc_6AD5B
loc_6AD27:
mov [rbp+var_78], r12
mov rdi, rbx
lea rsi, [rbp+var_78]
lea rdx, [rbp+var_48]
mov ecx, 4
call _ma_ck_real_write_btree
test al, al
jnz short loc_6ACEB
movzx eax, word ptr [r14+502h]
add r12, rax
cmp r12, r13
jb short loc_6AD27
mov rax, [rbp+var_38]
mov eax, [rax+8]
loc_6AD5B:
neg eax
mov rcx, [r15]
mov rsi, [rbp+var_30]
mov [rcx+rsi+3], al
mov rcx, [r15]
mov [rcx+rsi+2], ah
mov ecx, eax
shr ecx, 10h
mov rdx, [r15]
mov [rdx+rsi+1], cl
shr eax, 18h
mov rcx, [r15]
mov [rcx+rsi], al
mov rax, [r15]
add rsi, rax
add rsi, 4
mov rdx, [rbp+var_48]
mov rdi, r14
call _ma_dpointer
mov rax, [r15+8]
movzx edx, byte ptr [rax+0A5h]
shl edx, 3
add rdx, [r14+118h]
mov rdi, rbx
mov rsi, r15
mov ecx, 4
call _ma_ck_real_write_btree
mov ecx, eax
loc_6ADC1:
mov eax, ecx
add rsp, 0A8h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
|
long long ma_ft_convert_to_ft2(long long a1, long long *a2)
{
_QWORD *v3; // r14
long long *v4; // rdi
long long v5; // r12
int v6; // ecx
unsigned int v7; // eax
unsigned int v8; // r13d
long long v10; // rdx
unsigned int v11; // r13d
long long v12; // rax
long long v13; // rax
unsigned int v14; // ecx
long long v15; // r13
int v16; // eax
long long v17; // rdx
unsigned long long v18; // r13
unsigned long long v19; // r12
int v20; // eax
long long v21; // rsi
unsigned int v22; // eax
long long *v24[7]; // [rsp+8h] [rbp-C8h] BYREF
char v25; // [rsp+40h] [rbp-90h] BYREF
_QWORD v26[2]; // [rsp+58h] [rbp-78h] BYREF
int v27; // [rsp+68h] [rbp-68h]
long long v28; // [rsp+6Ch] [rbp-64h]
_QWORD *v29; // [rsp+78h] [rbp-58h]
long long v30; // [rsp+80h] [rbp-50h]
long long v31; // [rsp+88h] [rbp-48h] BYREF
char *v32; // [rsp+90h] [rbp-40h] BYREF
long long *v33; // [rsp+98h] [rbp-38h]
long long v34; // [rsp+A0h] [rbp-30h]
v3 = *(_QWORD **)a1;
v4 = *(long long **)(a1 + 800);
v5 = *v4;
v32 = &v25;
v6 = *((unsigned __int16 *)v3 + 641);
v7 = (*((unsigned __int16 *)v3 + 639) - 2) / v6;
v33 = v4;
v8 = *((_DWORD *)v4 + 2);
if ( v7 < v8 )
v8 = v7;
v10 = *(unsigned __int8 *)*a2;
if ( v10 == 255 )
v34 = (unsigned __int16)__ROL2__(*(_WORD *)(*a2 + 1), 8) + 3LL;
else
v34 = v10 + 1;
v29 = v3 + 139;
v11 = v6 * v8;
while ( !ma_ck_delete((_QWORD **)a1, a2) )
;
memset(*(_QWORD *)(a1 + 888), 0LL, *((unsigned int *)v3 + 465));
*(_BYTE *)(*(_QWORD *)(a1 + 888) + (unsigned int)(*((_DWORD *)v3 + 465) - 4)) = *((_BYTE *)v3 + 1277);
v12 = *((unsigned int *)v3 + 465);
*(_BYTE *)(*(_QWORD *)(a1 + 888) + v12 - 1) = v12 + v11;
*(_BYTE *)(*(_QWORD *)(a1 + 888) + *((unsigned int *)v3 + 465) - 2LL) = (unsigned __int16)(v12 + v11) >> 8;
memcpy(*(_QWORD *)(a1 + 888) + *((unsigned int *)v3 + 465), v5, v11);
*(_WORD *)(a1 + 1668) = 257;
v13 = ma_new((long long *)a1, 3, &v32);
v31 = v13;
LOBYTE(v14) = 1;
if ( v13 != -1 )
{
v30 = v11;
v15 = (long long)v29;
ma_page_setup((long long)v24, (long long *)a1, (long long)v29, v13, *(_QWORD *)(a1 + 888));
if ( !(unsigned __int8)ma_write_keypage(v24, *((_DWORD *)v32 + 3), 3) )
{
v16 = *((_DWORD *)v33 + 2);
v17 = v15;
v18 = *v33 + (unsigned int)(v16 * *((_DWORD *)v33 + 5));
v26[1] = v17;
v27 = *((unsigned __int16 *)v3 + 641);
v28 = 0LL;
v19 = v30 + v5;
if ( v19 >= v18 )
{
LABEL_15:
v20 = -v16;
v21 = v34;
*(_BYTE *)(*a2 + v34 + 3) = v20;
*(_BYTE *)(*a2 + v21 + 2) = BYTE1(v20);
*(_BYTE *)(*a2 + v21 + 1) = BYTE2(v20);
*(_BYTE *)(*a2 + v21) = HIBYTE(v20);
ma_dpointer((long long)v3, *a2 + v21 + 4, v31);
LOBYTE(v22) = ma_ck_real_write_btree(
a1,
(long long)a2,
(_QWORD *)(v3[35] + 8 * (unsigned int)*(unsigned __int8 *)(a2[1] + 165)),
4);
return v22;
}
while ( 1 )
{
v26[0] = v19;
if ( ma_ck_real_write_btree(a1, (long long)v26, &v31, 4) )
break;
v19 += *((unsigned __int16 *)v3 + 641);
if ( v19 >= v18 )
{
v16 = *((_DWORD *)v33 + 2);
goto LABEL_15;
}
}
}
LOBYTE(v14) = 1;
}
return v14;
}
|
_ma_ft_convert_to_ft2:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0xa8
MOV RBX,RDI
MOV R14,qword ptr [RDI]
MOV RDI,qword ptr [RDI + 0x320]
MOV R12,qword ptr [RDI]
LEA RAX,[RBP + -0x90]
MOV qword ptr [RBP + -0x40],RAX
MOVZX EAX,word ptr [R14 + 0x4fe]
ADD EAX,-0x2
MOVZX ECX,word ptr [R14 + 0x502]
CDQ
IDIV ECX
MOV qword ptr [RBP + -0x38],RDI
MOV R13D,dword ptr [RDI + 0x8]
CMP EAX,R13D
CMOVC R13D,EAX
MOV R15,RSI
MOV RAX,qword ptr [RSI]
MOVZX EDX,byte ptr [RAX]
CMP RDX,0xff
JZ 0x0016abdc
INC RDX
MOV qword ptr [RBP + -0x30],RDX
JMP 0x0016abef
LAB_0016abdc:
MOVZX EAX,word ptr [RAX + 0x1]
ROL AX,0x8
MOVZX EAX,AX
ADD RAX,0x3
MOV qword ptr [RBP + -0x30],RAX
LAB_0016abef:
LEA RAX,[R14 + 0x458]
MOV qword ptr [RBP + -0x58],RAX
IMUL R13D,ECX
LAB_0016abfe:
MOV RDI,RBX
MOV RSI,R15
CALL 0x00167505
TEST AL,AL
JZ 0x0016abfe
MOV RDI,qword ptr [RBX + 0x378]
MOV EDX,dword ptr [R14 + 0x744]
XOR ESI,ESI
CALL 0x001292c0
MOV AL,byte ptr [R14 + 0x4fd]
MOV RCX,qword ptr [RBX + 0x378]
MOV EDX,dword ptr [R14 + 0x744]
ADD EDX,-0x4
MOV byte ptr [RCX + RDX*0x1],AL
MOV EAX,dword ptr [R14 + 0x744]
LEA ECX,[RAX + R13*0x1]
MOV RDX,qword ptr [RBX + 0x378]
MOV byte ptr [RDX + RAX*0x1 + -0x1],CL
MOV RAX,qword ptr [RBX + 0x378]
MOV EDX,dword ptr [R14 + 0x744]
MOV byte ptr [RAX + RDX*0x1 + -0x2],CH
MOV EDI,dword ptr [R14 + 0x744]
ADD RDI,qword ptr [RBX + 0x378]
MOV R13D,R13D
MOV RSI,R12
MOV RDX,R13
CALL 0x00129080
MOV word ptr [RBX + 0x684],0x101
LEA RDX,[RBP + -0x40]
MOV RDI,RBX
MOV ESI,0x3
CALL 0x001592ff
MOV qword ptr [RBP + -0x48],RAX
MOV CL,0x1
CMP RAX,-0x1
JZ 0x0016adc1
MOV qword ptr [RBP + -0x50],R13
MOV R8,qword ptr [RBX + 0x378]
LEA RDI,[RBP + -0xc8]
MOV RSI,RBX
MOV R13,qword ptr [RBP + -0x58]
MOV RDX,R13
MOV RCX,RAX
CALL 0x00158e84
MOV RAX,qword ptr [RBP + -0x40]
MOV ESI,dword ptr [RAX + 0xc]
LEA RDI,[RBP + -0xc8]
MOV EDX,0x3
CALL 0x00159015
TEST AL,AL
JZ 0x0016acf2
LAB_0016aceb:
MOV CL,0x1
JMP 0x0016adc1
LAB_0016acf2:
MOV RCX,qword ptr [RBP + -0x38]
MOV EAX,dword ptr [RCX + 0x8]
MOV RDX,R13
MOV R13D,dword ptr [RCX + 0x14]
IMUL R13D,EAX
ADD R13,qword ptr [RCX]
MOV qword ptr [RBP + -0x70],RDX
MOVZX ECX,word ptr [R14 + 0x502]
MOV dword ptr [RBP + -0x68],ECX
MOV qword ptr [RBP + -0x64],0x0
ADD R12,qword ptr [RBP + -0x50]
CMP R12,R13
JNC 0x0016ad5b
LAB_0016ad27:
MOV qword ptr [RBP + -0x78],R12
MOV RDI,RBX
LEA RSI,[RBP + -0x78]
LEA RDX,[RBP + -0x48]
MOV ECX,0x4
CALL 0x00164a20
TEST AL,AL
JNZ 0x0016aceb
MOVZX EAX,word ptr [R14 + 0x502]
ADD R12,RAX
CMP R12,R13
JC 0x0016ad27
MOV RAX,qword ptr [RBP + -0x38]
MOV EAX,dword ptr [RAX + 0x8]
LAB_0016ad5b:
NEG EAX
MOV RCX,qword ptr [R15]
MOV RSI,qword ptr [RBP + -0x30]
MOV byte ptr [RCX + RSI*0x1 + 0x3],AL
MOV RCX,qword ptr [R15]
MOV byte ptr [RCX + RSI*0x1 + 0x2],AH
MOV ECX,EAX
SHR ECX,0x10
MOV RDX,qword ptr [R15]
MOV byte ptr [RDX + RSI*0x1 + 0x1],CL
SHR EAX,0x18
MOV RCX,qword ptr [R15]
MOV byte ptr [RCX + RSI*0x1],AL
MOV RAX,qword ptr [R15]
ADD RSI,RAX
ADD RSI,0x4
MOV RDX,qword ptr [RBP + -0x48]
MOV RDI,R14
CALL 0x00157230
MOV RAX,qword ptr [R15 + 0x8]
MOVZX EDX,byte ptr [RAX + 0xa5]
SHL EDX,0x3
ADD RDX,qword ptr [R14 + 0x118]
MOV RDI,RBX
MOV RSI,R15
MOV ECX,0x4
CALL 0x00164a20
MOV ECX,EAX
LAB_0016adc1:
MOV EAX,ECX
ADD RSP,0xa8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
ulong _ma_ft_convert_to_ft2(long *param_1,long *param_2)
{
ushort uVar1;
long lVar2;
void *__src;
char cVar3;
uint uVar4;
int iVar5;
long lVar6;
ulong uVar7;
uint uVar8;
ulong uVar9;
int1 local_d0 [56];
int1 local_98 [24];
ulong local_80;
long local_78;
uint local_70;
int8 local_6c;
long local_60;
ulong local_58;
long local_50;
int1 *local_48;
long *local_40;
long local_38;
lVar2 = *param_1;
local_40 = (long *)param_1[100];
__src = (void *)*local_40;
local_48 = local_98;
uVar4 = (int)(*(ushort *)(lVar2 + 0x4fe) - 2) / (int)(uint)*(ushort *)(lVar2 + 0x502);
uVar8 = *(uint *)(local_40 + 1);
if (uVar4 < *(uint *)(local_40 + 1)) {
uVar8 = uVar4;
}
uVar7 = (ulong)*(byte *)*param_2;
if (uVar7 == 0xff) {
uVar1 = *(ushort *)((byte *)*param_2 + 1);
local_38 = (ulong)(ushort)(uVar1 << 8 | uVar1 >> 8) + 3;
}
else {
local_38 = uVar7 + 1;
}
local_60 = lVar2 + 0x458;
uVar8 = uVar8 * *(ushort *)(lVar2 + 0x502);
do {
cVar3 = _ma_ck_delete(param_1);
} while (cVar3 == '\0');
memset((void *)param_1[0x6f],0,(ulong)*(uint *)(lVar2 + 0x744));
*(int1 *)(param_1[0x6f] + (ulong)(*(int *)(lVar2 + 0x744) - 4)) =
*(int1 *)(lVar2 + 0x4fd);
uVar4 = *(uint *)(lVar2 + 0x744) + uVar8;
uVar7 = (ulong)uVar4;
*(char *)(param_1[0x6f] + -1 + (ulong)*(uint *)(lVar2 + 0x744)) = (char)uVar4;
*(char *)(param_1[0x6f] + -2 + (ulong)*(uint *)(lVar2 + 0x744)) = (char)(uVar4 >> 8);
memcpy((void *)((ulong)*(uint *)(lVar2 + 0x744) + param_1[0x6f]),__src,(ulong)uVar8);
*(int2 *)((long)param_1 + 0x684) = 0x101;
lVar6 = _ma_new(param_1,3,&local_48);
local_78 = local_60;
uVar7 = CONCAT71((int7)(uVar7 >> 8),1);
if (lVar6 != -1) {
local_58 = (ulong)uVar8;
local_50 = lVar6;
_ma_page_setup(local_d0,param_1,local_60,lVar6,param_1[0x6f]);
cVar3 = _ma_write_keypage(local_d0,*(int4 *)(local_48 + 0xc),3);
if (cVar3 == '\0') {
iVar5 = (int)local_40[1];
uVar9 = (ulong)(uint)(*(int *)((long)local_40 + 0x14) * iVar5) + *local_40;
local_70 = (uint)*(ushort *)(lVar2 + 0x502);
local_6c = 0;
uVar7 = (long)__src + local_58;
if (uVar7 < uVar9) {
do {
lVar6 = 0;
local_80 = uVar7;
cVar3 = _ma_ck_real_write_btree(param_1,&local_80,&local_50,4);
if (cVar3 != '\0') goto LAB_0016aceb;
uVar7 = uVar7 + *(ushort *)(lVar2 + 0x502);
} while (uVar7 < uVar9);
iVar5 = (int)local_40[1];
}
iVar5 = -iVar5;
*(char *)(*param_2 + 3 + local_38) = (char)iVar5;
*(char *)(*param_2 + 2 + local_38) = (char)((uint)iVar5 >> 8);
*(char *)(*param_2 + 1 + local_38) = (char)((uint)iVar5 >> 0x10);
*(char *)(*param_2 + local_38) = (char)((uint)iVar5 >> 0x18);
_ma_dpointer(lVar2,local_38 + *param_2 + 4,local_50);
uVar8 = _ma_ck_real_write_btree
(param_1,param_2,
(ulong)*(byte *)(param_2[1] + 0xa5) * 8 + *(long *)(lVar2 + 0x118),4);
uVar7 = (ulong)uVar8;
}
else {
LAB_0016aceb:
uVar7 = CONCAT71((int7)((ulong)lVar6 >> 8),1);
}
}
return uVar7 & 0xffffffff;
}
|
|
8,943 |
blst_scalar_from_bendian
|
corpus-core[P]colibri-stateless/build_O3/_deps/blst-src/src/exports.c
|
void blst_scalar_from_bendian(pow256 ret, const unsigned char a[32])
{
vec256 out;
limbs_from_be_bytes(out, a, sizeof(out));
le_bytes_from_limbs(ret, out, sizeof(out));
vec_zero(out, sizeof(out));
}
|
O3
|
c
|
blst_scalar_from_bendian:
pushq %rbp
movq %rsp, %rbp
movl $0x1f, %eax
xorl %ecx, %ecx
shlq $0x8, %rcx
movzbl (%rsi), %edx
incq %rsi
orq %rdx, %rcx
movq %rax, %rdx
andq $-0x8, %rdx
movq %rcx, -0x20(%rbp,%rdx)
addq $-0x1, %rax
jb 0x65a91
leaq -0x20(%rbp), %rax
cmpq %rdi, %rax
je 0x65ade
xorl %eax, %eax
movq -0x20(%rbp,%rax,8), %rdx
xorl %ecx, %ecx
movb %dl, (%rdi,%rcx)
incq %rcx
shrq $0x8, %rdx
cmpq $0x8, %rcx
jne 0x65ac2
incq %rax
addq %rcx, %rdi
cmpq $0x4, %rax
jne 0x65abb
xorl %eax, %eax
movq $0x0, -0x20(%rbp,%rax,8)
incq %rax
cmpq $0x4, %rax
jne 0x65ae0
leaq -0x20(%rbp), %rax
popq %rbp
retq
|
blst_scalar_from_bendian:
push rbp
mov rbp, rsp
mov eax, 1Fh
xor ecx, ecx
loc_65A91:
shl rcx, 8
movzx edx, byte ptr [rsi]
inc rsi
or rcx, rdx
mov rdx, rax
and rdx, 0FFFFFFFFFFFFFFF8h
mov [rbp+rdx+var_20], rcx
add rax, 0FFFFFFFFFFFFFFFFh
jb short loc_65A91
lea rax, [rbp+var_20]
cmp rax, rdi
jz short loc_65ADE
xor eax, eax
loc_65ABB:
mov rdx, [rbp+rax*8+var_20]
xor ecx, ecx
loc_65AC2:
mov [rdi+rcx], dl
inc rcx
shr rdx, 8
cmp rcx, 8
jnz short loc_65AC2
inc rax
add rdi, rcx
cmp rax, 4
jnz short loc_65ABB
loc_65ADE:
xor eax, eax
loc_65AE0:
mov [rbp+rax*8+var_20], 0
inc rax
cmp rax, 4
jnz short loc_65AE0
lea rax, [rbp+var_20]
pop rbp
retn
|
_QWORD * blst_scalar_from_bendian(_QWORD *a1, unsigned __int8 *a2)
{
long long v2; // rax
long long v3; // rcx
long long v4; // rdx
long long i; // rax
unsigned long long v7; // rdx
long long j; // rcx
long long k; // rax
_QWORD v11[4]; // [rsp+0h] [rbp-20h] BYREF
v2 = 31LL;
v3 = 0LL;
do
{
v4 = *a2++;
v3 = v4 | (v3 << 8);
*(_QWORD *)((char *)v11 + (v2 & 0xFFFFFFFFFFFFFFF8LL)) = v3;
}
while ( v2-- != 0 );
if ( v11 != a1 )
{
for ( i = 0LL; i != 4; ++i )
{
v7 = v11[i];
for ( j = 0LL; j != 8; ++j )
{
*((_BYTE *)a1 + j) = v7;
v7 >>= 8;
}
++a1;
}
}
for ( k = 0LL; k != 4; ++k )
v11[k] = 0LL;
return v11;
}
|
blst_scalar_from_bendian:
PUSH RBP
MOV RBP,RSP
MOV EAX,0x1f
XOR ECX,ECX
LAB_00165a91:
SHL RCX,0x8
MOVZX EDX,byte ptr [RSI]
INC RSI
OR RCX,RDX
MOV RDX,RAX
AND RDX,-0x8
MOV qword ptr [RBP + RDX*0x1 + -0x20],RCX
ADD RAX,-0x1
JC 0x00165a91
LEA RAX,[RBP + -0x20]
CMP RAX,RDI
JZ 0x00165ade
XOR EAX,EAX
LAB_00165abb:
MOV RDX,qword ptr [RBP + RAX*0x8 + -0x20]
XOR ECX,ECX
LAB_00165ac2:
MOV byte ptr [RDI + RCX*0x1],DL
INC RCX
SHR RDX,0x8
CMP RCX,0x8
JNZ 0x00165ac2
INC RAX
ADD RDI,RCX
CMP RAX,0x4
JNZ 0x00165abb
LAB_00165ade:
XOR EAX,EAX
LAB_00165ae0:
MOV qword ptr [RBP + RAX*0x8 + -0x20],0x0
INC RAX
CMP RAX,0x4
JNZ 0x00165ae0
LEA RAX,[RBP + -0x20]
POP RBP
RET
|
ulong * blst_scalar_from_bendian(ulong *param_1,byte *param_2)
{
byte bVar1;
ulong uVar2;
long lVar3;
ulong uVar4;
long lVar5;
bool bVar6;
ulong local_28 [4];
uVar2 = 0x1f;
uVar4 = 0;
do {
bVar1 = *param_2;
param_2 = param_2 + 1;
uVar4 = uVar4 << 8 | (ulong)bVar1;
*(ulong *)((long)local_28 + (uVar2 & 0xfffffffffffffff8)) = uVar4;
bVar6 = uVar2 != 0;
uVar2 = uVar2 - 1;
} while (bVar6);
if (local_28 != param_1) {
lVar3 = 0;
do {
uVar2 = local_28[lVar3];
lVar5 = 0;
do {
*(char *)((long)param_1 + lVar5) = (char)uVar2;
lVar5 = lVar5 + 1;
uVar2 = uVar2 >> 8;
} while (lVar5 != 8);
lVar3 = lVar3 + 1;
param_1 = param_1 + 1;
} while (lVar3 != 4);
}
lVar3 = 0;
do {
local_28[lVar3] = 0;
lVar3 = lVar3 + 1;
} while (lVar3 != 4);
return local_28;
}
|
|
8,944 |
cpu_tensor_init_ops_fill_random_uniform_e8m23_Test::cpu_tensor_init_ops_fill_random_uniform_e8m23_Test()
|
magnetron/test/unittests/tensor/init_operators.cpp
|
TEST(cpu_tensor_init_ops, fill_random_uniform_e8m23) {
context ctx {compute_device::cpu};
for_all_shape_perms(lim, 1, [&](std::span<const std::int64_t> shape) {
std::uniform_real_distribution dist {dtype_traits<e8m23_t>::min, dtype_traits<e8m23_t>::max};
e8m23_t min {dist(gen)};
e8m23_t max {std::uniform_real_distribution{min, dtype_traits<e8m23_t>::max}(gen)};
tensor t {ctx, dtype::e8m23, shape};
t.fill_rand_uniform(min, max);
std::vector<e8m23_t> data {t.to_vector()};
ASSERT_EQ(data.size(), t.numel());
for (auto x : data) {
ASSERT_GE(x, min);
ASSERT_LE(x, max);
}
});
}
|
O0
|
cpp
|
cpu_tensor_init_ops_fill_random_uniform_e8m23_Test::cpu_tensor_init_ops_fill_random_uniform_e8m23_Test():
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x10(%rbp)
callq 0x9ed60
movq -0x10(%rbp), %rax
leaq 0xab32c(%rip), %rcx # 0x1358d0
addq $0x10, %rcx
movq %rcx, (%rax)
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
nopl (%rax,%rax)
|
_ZN50cpu_tensor_init_ops_fill_random_uniform_e8m23_TestC2Ev:
push rbp
mov rbp, rsp
sub rsp, 10h
mov [rbp+var_8], rdi
mov rdi, [rbp+var_8]; this
mov [rbp+var_10], rdi
call _ZN7testing4TestC2Ev; testing::Test::Test(void)
mov rax, [rbp+var_10]
lea rcx, _ZTV50cpu_tensor_init_ops_fill_random_uniform_e8m23_Test; `vtable for'cpu_tensor_init_ops_fill_random_uniform_e8m23_Test
add rcx, 10h
mov [rax], rcx
add rsp, 10h
pop rbp
retn
|
void cpu_tensor_init_ops_fill_random_uniform_e8m23_Test::cpu_tensor_init_ops_fill_random_uniform_e8m23_Test(
cpu_tensor_init_ops_fill_random_uniform_e8m23_Test *this)
{
testing::Test::Test(this);
*(_QWORD *)this = &`vtable for'cpu_tensor_init_ops_fill_random_uniform_e8m23_Test + 2;
}
|
cpu_tensor_init_ops_fill_random_uniform_e8m23_Test:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x10
MOV qword ptr [RBP + -0x8],RDI
MOV RDI,qword ptr [RBP + -0x8]
MOV qword ptr [RBP + -0x10],RDI
CALL 0x0019ed60
MOV RAX,qword ptr [RBP + -0x10]
LEA RCX,[0x2358d0]
ADD RCX,0x10
MOV qword ptr [RAX],RCX
ADD RSP,0x10
POP RBP
RET
|
/* cpu_tensor_init_ops_fill_random_uniform_e8m23_Test::cpu_tensor_init_ops_fill_random_uniform_e8m23_Test()
*/
void __thiscall
cpu_tensor_init_ops_fill_random_uniform_e8m23_Test::
cpu_tensor_init_ops_fill_random_uniform_e8m23_Test
(cpu_tensor_init_ops_fill_random_uniform_e8m23_Test *this)
{
testing::Test::Test((Test *)this);
*(int ***)this = &PTR__cpu_tensor_init_ops_fill_random_uniform_e8m23_Test_002358e0;
return;
}
|
|
8,945 |
ma_memmap_file
|
eloqsql/storage/maria/ma_packrec.c
|
my_bool _ma_memmap_file(MARIA_HA *info)
{
MARIA_SHARE *share= info->s;
DBUG_ENTER("maria_memmap_file");
if (!info->s->file_map)
{
if (mysql_file_seek(info->dfile.file, 0L, MY_SEEK_END, MYF(0)) <
share->state.state.data_file_length+MEMMAP_EXTRA_MARGIN)
{
DBUG_PRINT("warning",("File isn't extended for memmap"));
DBUG_RETURN(0);
}
if (_ma_dynmap_file(info, share->state.state.data_file_length))
DBUG_RETURN(0);
}
info->opt_flag|= MEMMAP_USED;
info->read_record= share->read_record= _ma_read_mempack_record;
share->scan= _ma_read_rnd_mempack_record;
DBUG_RETURN(1);
}
|
O0
|
c
|
ma_memmap_file:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rax
cmpq $0x0, 0x5f0(%rax)
jne 0x39d0d
movq -0x10(%rbp), %rax
movl 0x480(%rax), %edx
leaq 0x118bd1(%rip), %rdi # 0x15288a
movl $0x610, %esi # imm = 0x610
xorl %eax, %eax
movl %eax, %r9d
movl $0x2, %r8d
movq %r9, %rcx
callq 0x39ad0
movq -0x18(%rbp), %rcx
movq 0x40(%rcx), %rcx
addq $0x7, %rcx
cmpq %rcx, %rax
jae 0x39cee
jmp 0x39ce4
jmp 0x39ce6
jmp 0x39ce8
movb $0x0, -0x1(%rbp)
jmp 0x39d5a
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rax
movq 0x40(%rax), %rsi
callq 0x3c720
cmpb $0x0, %al
je 0x39d0b
jmp 0x39d05
movb $0x0, -0x1(%rbp)
jmp 0x39d5a
jmp 0x39d0d
movq -0x10(%rbp), %rax
movl 0x61c(%rax), %ecx
orl $0x20, %ecx
movl %ecx, 0x61c(%rax)
movq -0x18(%rbp), %rax
leaq 0x45(%rip), %rcx # 0x39d70
movq %rcx, 0x648(%rax)
movq -0x10(%rbp), %rax
leaq 0x33(%rip), %rcx # 0x39d70
movq %rcx, 0x3d8(%rax)
movq -0x18(%rbp), %rax
leaq 0x121(%rip), %rcx # 0x39e70
movq %rcx, 0x658(%rax)
movb $0x1, -0x1(%rbp)
movb -0x1(%rbp), %al
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
|
_ma_memmap_file:
push rbp
mov rbp, rsp
sub rsp, 20h
mov [rbp+var_10], rdi
mov rax, [rbp+var_10]
mov rax, [rax]
mov [rbp+var_18], rax
mov rax, [rbp+var_10]
mov rax, [rax]
cmp qword ptr [rax+5F0h], 0
jnz short loc_39D0D
mov rax, [rbp+var_10]
mov edx, [rax+480h]
lea rdi, aWorkspaceLlm4b_4; "/workspace/llm4binary/github2025/eloqsq"...
mov esi, 610h
xor eax, eax
mov r9d, eax
mov r8d, 2
mov rcx, r9
call inline_mysql_file_seek
mov rcx, [rbp+var_18]
mov rcx, [rcx+40h]
add rcx, 7
cmp rax, rcx
jnb short loc_39CEE
jmp short $+2
loc_39CE4:
jmp short $+2
loc_39CE6:
jmp short $+2
loc_39CE8:
mov [rbp+var_1], 0
jmp short loc_39D5A
loc_39CEE:
mov rdi, [rbp+var_10]
mov rax, [rbp+var_18]
mov rsi, [rax+40h]
call _ma_dynmap_file
cmp al, 0
jz short loc_39D0B
jmp short $+2
loc_39D05:
mov [rbp+var_1], 0
jmp short loc_39D5A
loc_39D0B:
jmp short $+2
loc_39D0D:
mov rax, [rbp+var_10]
mov ecx, [rax+61Ch]
or ecx, 20h
mov [rax+61Ch], ecx
mov rax, [rbp+var_18]
lea rcx, _ma_read_mempack_record
mov [rax+648h], rcx
mov rax, [rbp+var_10]
lea rcx, _ma_read_mempack_record
mov [rax+3D8h], rcx
mov rax, [rbp+var_18]
lea rcx, _ma_read_rnd_mempack_record
mov [rax+658h], rcx
mov [rbp+var_1], 1
loc_39D5A:
mov al, [rbp+var_1]
add rsp, 20h
pop rbp
retn
|
char ma_memmap_file(long long a1)
{
_QWORD *v2; // [rsp+8h] [rbp-18h]
v2 = *(_QWORD **)a1;
if ( *(_QWORD *)(*(_QWORD *)a1 + 1520LL) )
goto LABEL_6;
if ( inline_mysql_file_seek(
(long long)"/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_packrec.c",
0x610u,
*(_DWORD *)(a1 + 1152),
0LL,
2u,
0LL) >= (unsigned long long)(v2[8] + 7LL) )
{
if ( (unsigned __int8)ma_dynmap_file(a1, v2[8]) )
return 0;
LABEL_6:
*(_DWORD *)(a1 + 1564) |= 0x20u;
v2[201] = ma_read_mempack_record;
*(_QWORD *)(a1 + 984) = ma_read_mempack_record;
v2[203] = ma_read_rnd_mempack_record;
return 1;
}
return 0;
}
|
_ma_memmap_file:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x20
MOV qword ptr [RBP + -0x10],RDI
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x18],RAX
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX]
CMP qword ptr [RAX + 0x5f0],0x0
JNZ 0x00139d0d
MOV RAX,qword ptr [RBP + -0x10]
MOV EDX,dword ptr [RAX + 0x480]
LEA RDI,[0x25288a]
MOV ESI,0x610
XOR EAX,EAX
MOV R9D,EAX
MOV R8D,0x2
MOV RCX,R9
CALL 0x00139ad0
MOV RCX,qword ptr [RBP + -0x18]
MOV RCX,qword ptr [RCX + 0x40]
ADD RCX,0x7
CMP RAX,RCX
JNC 0x00139cee
JMP 0x00139ce4
LAB_00139ce4:
JMP 0x00139ce6
LAB_00139ce6:
JMP 0x00139ce8
LAB_00139ce8:
MOV byte ptr [RBP + -0x1],0x0
JMP 0x00139d5a
LAB_00139cee:
MOV RDI,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RBP + -0x18]
MOV RSI,qword ptr [RAX + 0x40]
CALL 0x0013c720
CMP AL,0x0
JZ 0x00139d0b
JMP 0x00139d05
LAB_00139d05:
MOV byte ptr [RBP + -0x1],0x0
JMP 0x00139d5a
LAB_00139d0b:
JMP 0x00139d0d
LAB_00139d0d:
MOV RAX,qword ptr [RBP + -0x10]
MOV ECX,dword ptr [RAX + 0x61c]
OR ECX,0x20
MOV dword ptr [RAX + 0x61c],ECX
MOV RAX,qword ptr [RBP + -0x18]
LEA RCX,[0x139d70]
MOV qword ptr [RAX + 0x648],RCX
MOV RAX,qword ptr [RBP + -0x10]
LEA RCX,[0x139d70]
MOV qword ptr [RAX + 0x3d8],RCX
MOV RAX,qword ptr [RBP + -0x18]
LEA RCX,[0x139e70]
MOV qword ptr [RAX + 0x658],RCX
MOV byte ptr [RBP + -0x1],0x1
LAB_00139d5a:
MOV AL,byte ptr [RBP + -0x1]
ADD RSP,0x20
POP RBP
RET
|
int1 _ma_memmap_file(long *param_1)
{
long lVar1;
char cVar2;
ulong uVar3;
lVar1 = *param_1;
if (*(long *)(*param_1 + 0x5f0) == 0) {
uVar3 = inline_mysql_file_seek
("/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_packrec.c",0x610,
(int)param_1[0x90],0,2);
if (uVar3 < *(long *)(lVar1 + 0x40) + 7U) {
return 0;
}
cVar2 = _ma_dynmap_file(param_1,*(int8 *)(lVar1 + 0x40));
if (cVar2 != '\0') {
return 0;
}
}
*(uint *)((long)param_1 + 0x61c) = *(uint *)((long)param_1 + 0x61c) | 0x20;
*(code **)(lVar1 + 0x648) = _ma_read_mempack_record;
param_1[0x7b] = (long)_ma_read_mempack_record;
*(code **)(lVar1 + 0x658) = _ma_read_rnd_mempack_record;
return 1;
}
|
|
8,946 |
ColorToHSV
|
csit-sgu[P]mit-game-2025_1/Libraries/raylib/src/rtextures.c
|
Vector3 ColorToHSV(Color color)
{
Vector3 hsv = { 0 };
Vector3 rgb = { (float)color.r/255.0f, (float)color.g/255.0f, (float)color.b/255.0f };
float min, max, delta;
min = rgb.x < rgb.y? rgb.x : rgb.y;
min = min < rgb.z? min : rgb.z;
max = rgb.x > rgb.y? rgb.x : rgb.y;
max = max > rgb.z? max : rgb.z;
hsv.z = max; // Value
delta = max - min;
if (delta < 0.00001f)
{
hsv.y = 0.0f;
hsv.x = 0.0f; // Undefined, maybe NAN?
return hsv;
}
if (max > 0.0f)
{
// NOTE: If max is 0, this divide would cause a crash
hsv.y = (delta/max); // Saturation
}
else
{
// NOTE: If max is 0, then r = g = b = 0, s = 0, h is undefined
hsv.y = 0.0f;
hsv.x = NAN; // Undefined
return hsv;
}
// NOTE: Comparing float values could not work properly
if (rgb.x >= max) hsv.x = (rgb.y - rgb.z)/delta; // Between yellow & magenta
else
{
if (rgb.y >= max) hsv.x = 2.0f + (rgb.z - rgb.x)/delta; // Between cyan & yellow
else hsv.x = 4.0f + (rgb.x - rgb.y)/delta; // Between magenta & cyan
}
hsv.x *= 60.0f; // Convert to degrees
if (hsv.x < 0.0f) hsv.x += 360.0f;
return hsv;
}
|
O0
|
c
|
ColorToHSV:
pushq %rbp
movq %rsp, %rbp
movl %edi, -0x14(%rbp)
movl $0x0, -0x8(%rbp)
movq $0x0, -0x10(%rbp)
movzbl -0x14(%rbp), %eax
cvtsi2ss %eax, %xmm0
movss 0x9c57a(%rip), %xmm1 # 0x1a7f90
divss %xmm1, %xmm0
movss %xmm0, -0x20(%rbp)
movzbl -0x13(%rbp), %eax
cvtsi2ss %eax, %xmm0
divss %xmm1, %xmm0
movss %xmm0, -0x1c(%rbp)
movzbl -0x12(%rbp), %eax
cvtsi2ss %eax, %xmm0
movss 0x9c550(%rip), %xmm1 # 0x1a7f90
divss %xmm1, %xmm0
movss %xmm0, -0x18(%rbp)
movss -0x20(%rbp), %xmm1
movss -0x1c(%rbp), %xmm0
ucomiss %xmm1, %xmm0
jbe 0x10ba64
movss -0x20(%rbp), %xmm0
movss %xmm0, -0x44(%rbp)
jmp 0x10ba6e
movss -0x1c(%rbp), %xmm0
movss %xmm0, -0x44(%rbp)
movss -0x44(%rbp), %xmm0
movss %xmm0, -0x24(%rbp)
movss -0x24(%rbp), %xmm1
movss -0x18(%rbp), %xmm0
ucomiss %xmm1, %xmm0
jbe 0x10ba93
movss -0x24(%rbp), %xmm0
movss %xmm0, -0x48(%rbp)
jmp 0x10ba9d
movss -0x18(%rbp), %xmm0
movss %xmm0, -0x48(%rbp)
movss -0x48(%rbp), %xmm0
movss %xmm0, -0x24(%rbp)
movss -0x20(%rbp), %xmm0
ucomiss -0x1c(%rbp), %xmm0
jbe 0x10babe
movss -0x20(%rbp), %xmm0
movss %xmm0, -0x4c(%rbp)
jmp 0x10bac8
movss -0x1c(%rbp), %xmm0
movss %xmm0, -0x4c(%rbp)
movss -0x4c(%rbp), %xmm0
movss %xmm0, -0x28(%rbp)
movss -0x28(%rbp), %xmm0
ucomiss -0x18(%rbp), %xmm0
jbe 0x10bae9
movss -0x28(%rbp), %xmm0
movss %xmm0, -0x50(%rbp)
jmp 0x10baf3
movss -0x18(%rbp), %xmm0
movss %xmm0, -0x50(%rbp)
movss -0x50(%rbp), %xmm0
movss %xmm0, -0x28(%rbp)
movss -0x28(%rbp), %xmm0
movss %xmm0, -0x8(%rbp)
movss -0x28(%rbp), %xmm0
subss -0x24(%rbp), %xmm0
movss %xmm0, -0x2c(%rbp)
movss 0xb33ae(%rip), %xmm0 # 0x1beecc
ucomiss -0x2c(%rbp), %xmm0
jbe 0x10bb39
xorps %xmm0, %xmm0
movss %xmm0, -0xc(%rbp)
xorps %xmm0, %xmm0
movss %xmm0, -0x10(%rbp)
jmp 0x10bc10
movss -0x28(%rbp), %xmm0
xorps %xmm1, %xmm1
ucomiss %xmm1, %xmm0
jbe 0x10bb57
movss -0x2c(%rbp), %xmm0
divss -0x28(%rbp), %xmm0
movss %xmm0, -0xc(%rbp)
jmp 0x10bb71
xorps %xmm0, %xmm0
movss %xmm0, -0xc(%rbp)
movss 0xb3369(%rip), %xmm0 # 0x1beed0
movss %xmm0, -0x10(%rbp)
jmp 0x10bc10
movss -0x20(%rbp), %xmm0
ucomiss -0x28(%rbp), %xmm0
jb 0x10bb92
movss -0x1c(%rbp), %xmm0
subss -0x18(%rbp), %xmm0
divss -0x2c(%rbp), %xmm0
movss %xmm0, -0x10(%rbp)
jmp 0x10bbe1
movss -0x1c(%rbp), %xmm0
ucomiss -0x28(%rbp), %xmm0
jb 0x10bbbf
movss -0x18(%rbp), %xmm1
subss -0x20(%rbp), %xmm1
divss -0x2c(%rbp), %xmm1
movss 0x9c468(%rip), %xmm0 # 0x1a801c
addss %xmm1, %xmm0
movss %xmm0, -0x10(%rbp)
jmp 0x10bbdf
movss -0x20(%rbp), %xmm1
subss -0x1c(%rbp), %xmm1
divss -0x2c(%rbp), %xmm1
movss 0x9c44a(%rip), %xmm0 # 0x1a8020
addss %xmm1, %xmm0
movss %xmm0, -0x10(%rbp)
jmp 0x10bbe1
movss 0xb32eb(%rip), %xmm0 # 0x1beed4
mulss -0x10(%rbp), %xmm0
movss %xmm0, -0x10(%rbp)
xorps %xmm0, %xmm0
ucomiss -0x10(%rbp), %xmm0
jbe 0x10bc0e
movss 0xa7744(%rip), %xmm0 # 0x1b3348
addss -0x10(%rbp), %xmm0
movss %xmm0, -0x10(%rbp)
jmp 0x10bc10
movl -0x8(%rbp), %eax
movl %eax, -0x38(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x40(%rbp)
movsd -0x40(%rbp), %xmm0
movss -0x38(%rbp), %xmm1
popq %rbp
retq
nopw (%rax,%rax)
|
ColorToHSV:
push rbp
mov rbp, rsp
mov [rbp+var_14], edi
mov [rbp+var_8], 0
mov [rbp+var_10], 0
movzx eax, byte ptr [rbp+var_14]
cvtsi2ss xmm0, eax
movss xmm1, cs:dword_1A7F90
divss xmm0, xmm1
movss [rbp+var_20], xmm0
movzx eax, byte ptr [rbp+var_14+1]
cvtsi2ss xmm0, eax
divss xmm0, xmm1
movss [rbp+var_1C], xmm0
movzx eax, byte ptr [rbp+var_14+2]
cvtsi2ss xmm0, eax
movss xmm1, cs:dword_1A7F90
divss xmm0, xmm1
movss [rbp+var_18], xmm0
movss xmm1, [rbp+var_20]
movss xmm0, [rbp+var_1C]
ucomiss xmm0, xmm1
jbe short loc_10BA64
movss xmm0, [rbp+var_20]
movss [rbp+var_44], xmm0
jmp short loc_10BA6E
loc_10BA64:
movss xmm0, [rbp+var_1C]
movss [rbp+var_44], xmm0
loc_10BA6E:
movss xmm0, [rbp+var_44]
movss [rbp+var_24], xmm0
movss xmm1, [rbp+var_24]
movss xmm0, [rbp+var_18]
ucomiss xmm0, xmm1
jbe short loc_10BA93
movss xmm0, [rbp+var_24]
movss [rbp+var_48], xmm0
jmp short loc_10BA9D
loc_10BA93:
movss xmm0, [rbp+var_18]
movss [rbp+var_48], xmm0
loc_10BA9D:
movss xmm0, [rbp+var_48]
movss [rbp+var_24], xmm0
movss xmm0, [rbp+var_20]
ucomiss xmm0, [rbp+var_1C]
jbe short loc_10BABE
movss xmm0, [rbp+var_20]
movss [rbp+var_4C], xmm0
jmp short loc_10BAC8
loc_10BABE:
movss xmm0, [rbp+var_1C]
movss [rbp+var_4C], xmm0
loc_10BAC8:
movss xmm0, [rbp+var_4C]
movss [rbp+var_28], xmm0
movss xmm0, [rbp+var_28]
ucomiss xmm0, [rbp+var_18]
jbe short loc_10BAE9
movss xmm0, [rbp+var_28]
movss [rbp+var_50], xmm0
jmp short loc_10BAF3
loc_10BAE9:
movss xmm0, [rbp+var_18]
movss [rbp+var_50], xmm0
loc_10BAF3:
movss xmm0, [rbp+var_50]
movss [rbp+var_28], xmm0
movss xmm0, [rbp+var_28]
movss [rbp+var_8], xmm0
movss xmm0, [rbp+var_28]
subss xmm0, [rbp+var_24]
movss [rbp+var_2C], xmm0
movss xmm0, cs:dword_1BEECC
ucomiss xmm0, [rbp+var_2C]
jbe short loc_10BB39
xorps xmm0, xmm0
movss dword ptr [rbp+var_10+4], xmm0
xorps xmm0, xmm0
movss dword ptr [rbp+var_10], xmm0
jmp loc_10BC10
loc_10BB39:
movss xmm0, [rbp+var_28]
xorps xmm1, xmm1
ucomiss xmm0, xmm1
jbe short loc_10BB57
movss xmm0, [rbp+var_2C]
divss xmm0, [rbp+var_28]
movss dword ptr [rbp+var_10+4], xmm0
jmp short loc_10BB71
loc_10BB57:
xorps xmm0, xmm0
movss dword ptr [rbp+var_10+4], xmm0
movss xmm0, cs:dword_1BEED0
movss dword ptr [rbp+var_10], xmm0
jmp loc_10BC10
loc_10BB71:
movss xmm0, [rbp+var_20]
ucomiss xmm0, [rbp+var_28]
jb short loc_10BB92
movss xmm0, [rbp+var_1C]
subss xmm0, [rbp+var_18]
divss xmm0, [rbp+var_2C]
movss dword ptr [rbp+var_10], xmm0
jmp short loc_10BBE1
loc_10BB92:
movss xmm0, [rbp+var_1C]
ucomiss xmm0, [rbp+var_28]
jb short loc_10BBBF
movss xmm1, [rbp+var_18]
subss xmm1, [rbp+var_20]
divss xmm1, [rbp+var_2C]
movss xmm0, cs:dword_1A801C
addss xmm0, xmm1
movss dword ptr [rbp+var_10], xmm0
jmp short loc_10BBDF
loc_10BBBF:
movss xmm1, [rbp+var_20]
subss xmm1, [rbp+var_1C]
divss xmm1, [rbp+var_2C]
movss xmm0, cs:dword_1A8020
addss xmm0, xmm1
movss dword ptr [rbp+var_10], xmm0
loc_10BBDF:
jmp short $+2
loc_10BBE1:
movss xmm0, cs:dword_1BEED4
mulss xmm0, dword ptr [rbp+var_10]
movss dword ptr [rbp+var_10], xmm0
xorps xmm0, xmm0
ucomiss xmm0, dword ptr [rbp+var_10]
jbe short loc_10BC0E
movss xmm0, cs:dword_1B3348
addss xmm0, dword ptr [rbp+var_10]
movss dword ptr [rbp+var_10], xmm0
loc_10BC0E:
jmp short $+2
loc_10BC10:
mov eax, [rbp+var_8]
mov [rbp+var_38], eax
mov rax, [rbp+var_10]
mov [rbp+var_40], rax
movsd xmm0, [rbp+var_40]
movss xmm1, [rbp+var_38]
pop rbp
retn
|
double ColorToHSV(int a1)
{
float v2; // [rsp+0h] [rbp-50h]
float v3; // [rsp+4h] [rbp-4Ch]
float v4; // [rsp+8h] [rbp-48h]
float v5; // [rsp+Ch] [rbp-44h]
float v6; // [rsp+24h] [rbp-2Ch]
float v7; // [rsp+30h] [rbp-20h]
float v8; // [rsp+34h] [rbp-1Ch]
float v9; // [rsp+38h] [rbp-18h]
double v10; // [rsp+40h] [rbp-10h]
float v11; // [rsp+40h] [rbp-10h]
v7 = (float)(unsigned __int8)a1 / 255.0;
v8 = (float)BYTE1(a1) / 255.0;
v9 = (float)BYTE2(a1) / 255.0;
if ( v8 <= v7 )
v5 = (float)BYTE1(a1) / 255.0;
else
v5 = (float)(unsigned __int8)a1 / 255.0;
if ( v9 <= v5 )
v4 = (float)BYTE2(a1) / 255.0;
else
v4 = v5;
if ( v7 <= v8 )
v3 = (float)BYTE1(a1) / 255.0;
else
v3 = (float)(unsigned __int8)a1 / 255.0;
if ( v3 <= v9 )
v2 = (float)BYTE2(a1) / 255.0;
else
v2 = v3;
v6 = v2 - v4;
if ( (float)(v2 - v4) < 0.0000099999997 )
return 0.0;
if ( v2 <= 0.0 )
{
*(_QWORD *)&v10 = 2143289344LL;
}
else
{
*((float *)&v10 + 1) = v6 / v2;
if ( v7 < v2 )
{
if ( v8 < v2 )
v11 = (float)((float)(v7 - v8) / v6) + 4.0;
else
v11 = (float)((float)(v9 - v7) / v6) + 2.0;
}
else
{
v11 = (float)(v8 - v9) / v6;
}
*(float *)&v10 = 60.0 * v11;
if ( *(float *)&v10 < 0.0 )
*(float *)&v10 = *(float *)&v10 + 360.0;
}
return v10;
}
| |||
8,947 |
ColorToHSV
|
csit-sgu[P]mit-game-2025_1/Libraries/raylib/src/rtextures.c
|
Vector3 ColorToHSV(Color color)
{
Vector3 hsv = { 0 };
Vector3 rgb = { (float)color.r/255.0f, (float)color.g/255.0f, (float)color.b/255.0f };
float min, max, delta;
min = rgb.x < rgb.y? rgb.x : rgb.y;
min = min < rgb.z? min : rgb.z;
max = rgb.x > rgb.y? rgb.x : rgb.y;
max = max > rgb.z? max : rgb.z;
hsv.z = max; // Value
delta = max - min;
if (delta < 0.00001f)
{
hsv.y = 0.0f;
hsv.x = 0.0f; // Undefined, maybe NAN?
return hsv;
}
if (max > 0.0f)
{
// NOTE: If max is 0, this divide would cause a crash
hsv.y = (delta/max); // Saturation
}
else
{
// NOTE: If max is 0, then r = g = b = 0, s = 0, h is undefined
hsv.y = 0.0f;
hsv.x = NAN; // Undefined
return hsv;
}
// NOTE: Comparing float values could not work properly
if (rgb.x >= max) hsv.x = (rgb.y - rgb.z)/delta; // Between yellow & magenta
else
{
if (rgb.y >= max) hsv.x = 2.0f + (rgb.z - rgb.x)/delta; // Between cyan & yellow
else hsv.x = 4.0f + (rgb.x - rgb.y)/delta; // Between magenta & cyan
}
hsv.x *= 60.0f; // Convert to degrees
if (hsv.x < 0.0f) hsv.x += 360.0f;
return hsv;
}
|
O1
|
c
|
ColorToHSV:
movl %edi, %eax
shrl $0x8, %eax
movl %edi, %ecx
shrl $0x10, %ecx
movl $0xff, %edx
andl %edx, %edi
cvtsi2ss %edi, %xmm3
andl %edx, %eax
cvtsi2ss %eax, %xmm2
movss 0x3712b(%rip), %xmm0 # 0xd99c8
divss %xmm0, %xmm3
divss %xmm0, %xmm2
andl %edx, %ecx
cvtsi2ss %ecx, %xmm4
divss %xmm0, %xmm4
movaps %xmm3, %xmm0
minss %xmm2, %xmm0
minss %xmm4, %xmm0
movaps %xmm3, %xmm1
maxss %xmm2, %xmm1
maxss %xmm4, %xmm1
movaps %xmm1, %xmm6
subss %xmm0, %xmm6
xorps %xmm0, %xmm0
movss 0x4ca9d(%rip), %xmm5 # 0xef374
ucomiss %xmm6, %xmm5
jbe 0xa28dd
retq
xorps %xmm0, %xmm0
ucomiss %xmm0, %xmm1
jbe 0xa290b
movaps %xmm6, %xmm5
divss %xmm1, %xmm5
ucomiss %xmm1, %xmm3
jae 0xa2914
ucomiss %xmm1, %xmm2
jae 0xa291e
subss %xmm2, %xmm3
divss %xmm6, %xmm3
addss 0x370e2(%rip), %xmm3 # 0xd99e8
movaps %xmm3, %xmm2
jmp 0xa2931
movss 0x4ca65(%rip), %xmm0 # 0xef378
retq
subss %xmm4, %xmm2
divss %xmm6, %xmm2
jmp 0xa2931
subss %xmm3, %xmm4
divss %xmm6, %xmm4
addss 0x40b16(%rip), %xmm4 # 0xe3444
movaps %xmm4, %xmm2
mulss 0x4ca43(%rip), %xmm2 # 0xef37c
movaps %xmm2, %xmm0
unpcklps %xmm5, %xmm0 # xmm0 = xmm0[0],xmm5[0],xmm0[1],xmm5[1]
xorps %xmm3, %xmm3
ucomiss %xmm2, %xmm3
jbe 0xa28dc
addss 0x40b11(%rip), %xmm2 # 0xe3460
movss %xmm2, %xmm0 # xmm0 = xmm2[0],xmm0[1,2,3]
retq
|
ColorToHSV:
mov eax, edi
shr eax, 8
mov ecx, edi
shr ecx, 10h
mov edx, 0FFh
and edi, edx
cvtsi2ss xmm3, edi
and eax, edx
cvtsi2ss xmm2, eax
movss xmm0, cs:dword_D99C8
divss xmm3, xmm0
divss xmm2, xmm0
and ecx, edx
cvtsi2ss xmm4, ecx
divss xmm4, xmm0
movaps xmm0, xmm3
minss xmm0, xmm2
minss xmm0, xmm4
movaps xmm1, xmm3
maxss xmm1, xmm2
maxss xmm1, xmm4
movaps xmm6, xmm1
subss xmm6, xmm0
xorps xmm0, xmm0
movss xmm5, cs:dword_EF374
ucomiss xmm5, xmm6
jbe short loc_A28DD
locret_A28DC:
retn
loc_A28DD:
xorps xmm0, xmm0
ucomiss xmm1, xmm0
jbe short loc_A290B
movaps xmm5, xmm6
divss xmm5, xmm1
ucomiss xmm3, xmm1
jnb short loc_A2914
ucomiss xmm2, xmm1
jnb short loc_A291E
subss xmm3, xmm2
divss xmm3, xmm6
addss xmm3, cs:dword_D99E8
movaps xmm2, xmm3
jmp short loc_A2931
loc_A290B:
movss xmm0, cs:dword_EF378
retn
loc_A2914:
subss xmm2, xmm4
divss xmm2, xmm6
jmp short loc_A2931
loc_A291E:
subss xmm4, xmm3
divss xmm4, xmm6
addss xmm4, cs:dword_E3444
movaps xmm2, xmm4
loc_A2931:
mulss xmm2, cs:dword_EF37C
movaps xmm0, xmm2
unpcklps xmm0, xmm5
xorps xmm3, xmm3
ucomiss xmm3, xmm2
jbe short locret_A28DC
addss xmm2, cs:dword_E3460
movss xmm0, xmm2
retn
|
float ColorToHSV(int a1, double a2, double a3, __m128 a4, __m128 a5, __m128 a6)
{
float v6; // xmm2_4
__m128 v7; // xmm1
__m128 v8; // xmm6
float result; // xmm0_4
__m128 v10; // xmm5
a5.m128_f32[0] = (float)(unsigned __int8)a1 / 255.0;
v6 = (float)BYTE1(a1) / 255.0;
a6.m128_f32[0] = (float)BYTE2(a1) / 255.0;
v7 = a5;
v7.m128_f32[0] = fmaxf(fmaxf(a5.m128_f32[0], v6), a6.m128_f32[0]);
v8 = v7;
v8.m128_f32[0] = v7.m128_f32[0] - fminf(fminf(a5.m128_f32[0], v6), a6.m128_f32[0]);
result = 0.0;
if ( v8.m128_f32[0] >= 0.0000099999997 )
{
if ( v7.m128_f32[0] <= 0.0 )
{
return NAN;
}
else
{
v10 = v8;
if ( a5.m128_f32[0] >= v7.m128_f32[0] )
{
a4.m128_f32[0] = (float)(v6 - a6.m128_f32[0]) / v8.m128_f32[0];
}
else if ( v6 >= v7.m128_f32[0] )
{
a6.m128_f32[0] = (float)((float)(a6.m128_f32[0] - a5.m128_f32[0]) / v8.m128_f32[0]) + 2.0;
a4 = a6;
}
else
{
a5.m128_f32[0] = (float)((float)(a5.m128_f32[0] - v6) / v8.m128_f32[0]) + 4.0;
a4 = a5;
}
a4.m128_f32[0] = a4.m128_f32[0] * 60.0;
v10.m128_f32[0] = v8.m128_f32[0] / v7.m128_f32[0];
LODWORD(result) = _mm_unpacklo_ps(a4, v10).m128_u32[0];
if ( a4.m128_f32[0] < 0.0 )
return a4.m128_f32[0] + 360.0;
}
}
return result;
}
|
ColorToHSV:
MOV EAX,EDI
SHR EAX,0x8
MOV ECX,EDI
SHR ECX,0x10
MOV EDX,0xff
AND EDI,EDX
CVTSI2SS XMM3,EDI
AND EAX,EDX
CVTSI2SS XMM2,EAX
MOVSS XMM0,dword ptr [0x001d99c8]
DIVSS XMM3,XMM0
DIVSS XMM2,XMM0
AND ECX,EDX
CVTSI2SS XMM4,ECX
DIVSS XMM4,XMM0
MOVAPS XMM0,XMM3
MINSS XMM0,XMM2
MINSS XMM0,XMM4
MOVAPS XMM1,XMM3
MAXSS XMM1,XMM2
MAXSS XMM1,XMM4
MOVAPS XMM6,XMM1
SUBSS XMM6,XMM0
XORPS XMM0,XMM0
MOVSS XMM5,dword ptr [0x001ef374]
UCOMISS XMM5,XMM6
JBE 0x001a28dd
LAB_001a28dc:
RET
LAB_001a28dd:
XORPS XMM0,XMM0
UCOMISS XMM1,XMM0
JBE 0x001a290b
MOVAPS XMM5,XMM6
DIVSS XMM5,XMM1
UCOMISS XMM3,XMM1
JNC 0x001a2914
UCOMISS XMM2,XMM1
JNC 0x001a291e
SUBSS XMM3,XMM2
DIVSS XMM3,XMM6
ADDSS XMM3,dword ptr [0x001d99e8]
MOVAPS XMM2,XMM3
JMP 0x001a2931
LAB_001a290b:
MOVSS XMM0,dword ptr [0x001ef378]
RET
LAB_001a2914:
SUBSS XMM2,XMM4
DIVSS XMM2,XMM6
JMP 0x001a2931
LAB_001a291e:
SUBSS XMM4,XMM3
DIVSS XMM4,XMM6
ADDSS XMM4,dword ptr [0x001e3444]
MOVAPS XMM2,XMM4
LAB_001a2931:
MULSS XMM2,dword ptr [0x001ef37c]
MOVAPS XMM0,XMM2
UNPCKLPS XMM0,XMM5
XORPS XMM3,XMM3
UCOMISS XMM3,XMM2
JBE 0x001a28dc
ADDSS XMM2,dword ptr [0x001e3460]
MOVSS XMM0,XMM2
RET
|
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
ulong ColorToHSV(uint param_1)
{
float fVar1;
float fVar2;
float fVar3;
float fVar4;
float fVar5;
float fVar6;
float fVar7;
fVar5 = (float)(param_1 & 0xff) / DAT_001d99c8;
fVar4 = (float)(param_1 >> 8 & 0xff) / DAT_001d99c8;
fVar6 = (float)(param_1 >> 0x10 & 0xff) / DAT_001d99c8;
fVar7 = fVar5;
if (fVar4 <= fVar5) {
fVar7 = fVar4;
}
if (fVar6 <= fVar7) {
fVar7 = fVar6;
}
fVar3 = fVar5;
if (fVar5 <= fVar4) {
fVar3 = fVar4;
}
if (fVar3 <= fVar6) {
fVar3 = fVar6;
}
fVar7 = fVar3 - fVar7;
fVar1 = 0.0;
fVar2 = 0.0;
if (DAT_001ef374 <= fVar7) {
if (fVar3 <= 0.0) {
return (ulong)DAT_001ef378;
}
fVar2 = fVar7 / fVar3;
if (fVar3 <= fVar5) {
fVar1 = (fVar4 - fVar6) / fVar7;
}
else if (fVar3 <= fVar4) {
fVar1 = (fVar6 - fVar5) / fVar7 + DAT_001e3444;
}
else {
fVar1 = (fVar5 - fVar4) / fVar7 + DAT_001d99e8;
}
fVar1 = fVar1 * _DAT_001ef37c;
if (fVar1 < 0.0) {
return CONCAT44(fVar2,fVar1 + DAT_001e3460);
}
}
return CONCAT44(fVar2,fVar1);
}
|
|
8,948 |
ColorToHSV
|
csit-sgu[P]mit-game-2025_1/Libraries/raylib/src/rtextures.c
|
Vector3 ColorToHSV(Color color)
{
Vector3 hsv = { 0 };
Vector3 rgb = { (float)color.r/255.0f, (float)color.g/255.0f, (float)color.b/255.0f };
float min, max, delta;
min = rgb.x < rgb.y? rgb.x : rgb.y;
min = min < rgb.z? min : rgb.z;
max = rgb.x > rgb.y? rgb.x : rgb.y;
max = max > rgb.z? max : rgb.z;
hsv.z = max; // Value
delta = max - min;
if (delta < 0.00001f)
{
hsv.y = 0.0f;
hsv.x = 0.0f; // Undefined, maybe NAN?
return hsv;
}
if (max > 0.0f)
{
// NOTE: If max is 0, this divide would cause a crash
hsv.y = (delta/max); // Saturation
}
else
{
// NOTE: If max is 0, then r = g = b = 0, s = 0, h is undefined
hsv.y = 0.0f;
hsv.x = NAN; // Undefined
return hsv;
}
// NOTE: Comparing float values could not work properly
if (rgb.x >= max) hsv.x = (rgb.y - rgb.z)/delta; // Between yellow & magenta
else
{
if (rgb.y >= max) hsv.x = 2.0f + (rgb.z - rgb.x)/delta; // Between cyan & yellow
else hsv.x = 4.0f + (rgb.x - rgb.y)/delta; // Between magenta & cyan
}
hsv.x *= 60.0f; // Convert to degrees
if (hsv.x < 0.0f) hsv.x += 360.0f;
return hsv;
}
|
O3
|
c
|
ColorToHSV:
movl %edi, %eax
movl %edi, %ecx
shrl $0x10, %ecx
movl $0xff, %edx
andl %edx, %ecx
cvtsi2ss %ecx, %xmm3
shrl $0x8, %eax
divss 0x36c76(%rip), %xmm3 # 0xd3b94
andl %edx, %edi
andl %edx, %eax
movd %eax, %xmm0
pinsrw $0x2, %edi, %xmm0
cvtdq2ps %xmm0, %xmm2
divps 0x404cb(%rip), %xmm2 # 0xdd400
movaps %xmm2, %xmm0
shufps $0xe1, %xmm2, %xmm0 # xmm0 = xmm0[1,0],xmm2[2,3]
cmpltps %xmm2, %xmm0
movaps %xmm2, %xmm4
shufps $0x55, %xmm2, %xmm4 # xmm4 = xmm4[1,1],xmm2[1,1]
movaps %xmm2, %xmm1
shufps $0x0, %xmm2, %xmm1 # xmm1 = xmm1[0,0],xmm2[0,0]
movaps %xmm4, %xmm5
andps %xmm0, %xmm5
andnps %xmm1, %xmm0
orps %xmm5, %xmm0
movaps %xmm0, %xmm1
movss %xmm3, %xmm1 # xmm1 = xmm3[0],xmm1[1,2,3]
movaps %xmm3, %xmm5
movlhps %xmm0, %xmm5 # xmm5 = xmm5[0],xmm0[0]
shufps $0xe2, %xmm0, %xmm5 # xmm5 = xmm5[2,0],xmm0[2,3]
cmpltps %xmm1, %xmm5
movaps %xmm3, %xmm1
shufps $0x0, %xmm3, %xmm1 # xmm1 = xmm1[0,0],xmm3[0,0]
andps %xmm5, %xmm0
andnps %xmm1, %xmm5
orps %xmm0, %xmm5
pshufd $0x55, %xmm5, %xmm1 # xmm1 = xmm5[1,1,1,1]
movdqa %xmm1, %xmm6
subss %xmm5, %xmm6
xorps %xmm0, %xmm0
movss 0x4c4b9(%rip), %xmm5 # 0xe9450
ucomiss %xmm6, %xmm5
jbe 0x9cf9d
retq
xorps %xmm0, %xmm0
ucomiss %xmm0, %xmm1
jbe 0x9cfcb
movaps %xmm6, %xmm5
divss %xmm1, %xmm5
ucomiss %xmm1, %xmm4
jae 0x9cfd4
ucomiss %xmm1, %xmm2
jae 0x9cfde
subss %xmm2, %xmm4
divss %xmm6, %xmm4
addss 0x36bee(%rip), %xmm4 # 0xd3bb4
movaps %xmm4, %xmm2
jmp 0x9cff1
movss 0x4c481(%rip), %xmm0 # 0xe9454
retq
subss %xmm3, %xmm2
divss %xmm6, %xmm2
jmp 0x9cff1
subss %xmm4, %xmm3
divss %xmm6, %xmm3
addss 0x402e6(%rip), %xmm3 # 0xdd2d4
movaps %xmm3, %xmm2
mulss 0x4c45f(%rip), %xmm2 # 0xe9458
movaps %xmm2, %xmm0
unpcklps %xmm5, %xmm0 # xmm0 = xmm0[0],xmm5[0],xmm0[1],xmm5[1]
xorps %xmm3, %xmm3
ucomiss %xmm2, %xmm3
jbe 0x9cf9c
addss 0x402e1(%rip), %xmm2 # 0xdd2f0
movss %xmm2, %xmm0 # xmm0 = xmm2[0],xmm0[1,2,3]
retq
|
ColorToHSV:
mov eax, edi
mov ecx, edi
shr ecx, 10h
mov edx, 0FFh
and ecx, edx
cvtsi2ss xmm3, ecx
shr eax, 8
divss xmm3, cs:dword_D3B94
and edi, edx
and eax, edx
movd xmm0, eax
pinsrw xmm0, edi, 2
cvtdq2ps xmm2, xmm0
divps xmm2, cs:xmmword_DD400
movaps xmm0, xmm2
shufps xmm0, xmm2, 0E1h
cmpltps xmm0, xmm2
movaps xmm4, xmm2
shufps xmm4, xmm2, 55h ; 'U'
movaps xmm1, xmm2
shufps xmm1, xmm2, 0
movaps xmm5, xmm4
andps xmm5, xmm0
andnps xmm0, xmm1
orps xmm0, xmm5
movaps xmm1, xmm0
movss xmm1, xmm3
movaps xmm5, xmm3
movlhps xmm5, xmm0
shufps xmm5, xmm0, 0E2h
cmpltps xmm5, xmm1
movaps xmm1, xmm3
shufps xmm1, xmm3, 0
andps xmm0, xmm5
andnps xmm5, xmm1
orps xmm5, xmm0
pshufd xmm1, xmm5, 55h ; 'U'
movdqa xmm6, xmm1
subss xmm6, xmm5
xorps xmm0, xmm0
movss xmm5, cs:dword_E9450
ucomiss xmm5, xmm6
jbe short loc_9CF9D
locret_9CF9C:
retn
loc_9CF9D:
xorps xmm0, xmm0
ucomiss xmm1, xmm0
jbe short loc_9CFCB
movaps xmm5, xmm6
divss xmm5, xmm1
ucomiss xmm4, xmm1
jnb short loc_9CFD4
ucomiss xmm2, xmm1
jnb short loc_9CFDE
subss xmm4, xmm2
divss xmm4, xmm6
addss xmm4, cs:dword_D3BB4
movaps xmm2, xmm4
jmp short loc_9CFF1
loc_9CFCB:
movss xmm0, cs:dword_E9454
retn
loc_9CFD4:
subss xmm2, xmm3
divss xmm2, xmm6
jmp short loc_9CFF1
loc_9CFDE:
subss xmm3, xmm4
divss xmm3, xmm6
addss xmm3, cs:dword_DD2D4
movaps xmm2, xmm3
loc_9CFF1:
mulss xmm2, cs:dword_E9458
movaps xmm0, xmm2
unpcklps xmm0, xmm5
xorps xmm3, xmm3
ucomiss xmm3, xmm2
jbe short locret_9CF9C
addss xmm2, cs:dword_DD2F0
movss xmm0, xmm2
retn
|
float ColorToHSV(int a1, double a2, double a3, double a4, __m128 a5)
{
__m128 v5; // xmm2
__m128 v6; // xmm0
__m128 v7; // xmm4
__m128 v8; // xmm0
__m128 v9; // xmm1
__m128 v10; // xmm5
__m128i v11; // xmm5
__m128i v12; // xmm1
__m128 v13; // xmm6
float result; // xmm0_4
__m128 v15; // xmm5
a5.m128_f32[0] = (float)BYTE2(a1) / 255.0;
v5 = _mm_div_ps(
_mm_cvtepi32_ps(_mm_insert_epi16(_mm_cvtsi32_si128(BYTE1(a1)), (unsigned __int8)a1, 2)),
(__m128)xmmword_DD400);
v6 = _mm_cmplt_ps(_mm_shuffle_ps(v5, v5, 225), v5);
v7 = _mm_shuffle_ps(v5, v5, 85);
v8 = _mm_or_ps(_mm_andnot_ps(v6, _mm_shuffle_ps(v5, v5, 0)), _mm_and_ps(v7, v6));
v9 = v8;
v9.m128_f32[0] = a5.m128_f32[0];
v10 = _mm_cmplt_ps(_mm_shuffle_ps(_mm_movelh_ps(a5, v8), v8, 226), v9);
v11 = (__m128i)_mm_or_ps(_mm_andnot_ps(v10, _mm_shuffle_ps(a5, a5, 0)), _mm_and_ps(v8, v10));
v12 = _mm_shuffle_epi32(v11, 85);
v13 = (__m128)v12;
v13.m128_f32[0] = *(float *)v12.m128i_i32 - *(float *)v11.m128i_i32;
result = 0.0;
if ( (float)(*(float *)v12.m128i_i32 - *(float *)v11.m128i_i32) >= 0.0000099999997 )
{
if ( *(float *)v12.m128i_i32 <= 0.0 )
{
return NAN;
}
else
{
v15 = v13;
if ( v7.m128_f32[0] >= *(float *)v12.m128i_i32 )
{
v5.m128_f32[0] = (float)(v5.m128_f32[0] - a5.m128_f32[0]) / v13.m128_f32[0];
}
else if ( v5.m128_f32[0] >= *(float *)v12.m128i_i32 )
{
a5.m128_f32[0] = (float)((float)(a5.m128_f32[0] - v7.m128_f32[0]) / v13.m128_f32[0]) + 2.0;
v5 = a5;
}
else
{
v7.m128_f32[0] = (float)((float)(v7.m128_f32[0] - v5.m128_f32[0]) / v13.m128_f32[0]) + 4.0;
v5 = v7;
}
v5.m128_f32[0] = v5.m128_f32[0] * 60.0;
v15.m128_f32[0] = v13.m128_f32[0] / *(float *)v12.m128i_i32;
LODWORD(result) = _mm_unpacklo_ps(v5, v15).m128_u32[0];
if ( v5.m128_f32[0] < 0.0 )
return v5.m128_f32[0] + 360.0;
}
}
return result;
}
|
ColorToHSV:
MOV EAX,EDI
MOV ECX,EDI
SHR ECX,0x10
MOV EDX,0xff
AND ECX,EDX
CVTSI2SS XMM3,ECX
SHR EAX,0x8
DIVSS XMM3,dword ptr [0x001d3b94]
AND EDI,EDX
AND EAX,EDX
MOVD XMM0,EAX
PINSRW XMM0,EDI,0x2
CVTDQ2PS XMM2,XMM0
DIVPS XMM2,xmmword ptr [0x001dd400]
MOVAPS XMM0,XMM2
SHUFPS XMM0,XMM2,0xe1
CMPLTPS XMM0,XMM2
MOVAPS XMM4,XMM2
SHUFPS XMM4,XMM2,0x55
MOVAPS XMM1,XMM2
SHUFPS XMM1,XMM2,0x0
MOVAPS XMM5,XMM4
ANDPS XMM5,XMM0
ANDNPS XMM0,XMM1
ORPS XMM0,XMM5
MOVAPS XMM1,XMM0
MOVSS XMM1,XMM3
MOVAPS XMM5,XMM3
MOVLHPS XMM5,XMM0
SHUFPS XMM5,XMM0,0xe2
CMPLTPS XMM5,XMM1
MOVAPS XMM1,XMM3
SHUFPS XMM1,XMM3,0x0
ANDPS XMM0,XMM5
ANDNPS XMM5,XMM1
ORPS XMM5,XMM0
PSHUFD XMM1,XMM5,0x55
MOVDQA XMM6,XMM1
SUBSS XMM6,XMM5
XORPS XMM0,XMM0
MOVSS XMM5,dword ptr [0x001e9450]
UCOMISS XMM5,XMM6
JBE 0x0019cf9d
LAB_0019cf9c:
RET
LAB_0019cf9d:
XORPS XMM0,XMM0
UCOMISS XMM1,XMM0
JBE 0x0019cfcb
MOVAPS XMM5,XMM6
DIVSS XMM5,XMM1
UCOMISS XMM4,XMM1
JNC 0x0019cfd4
UCOMISS XMM2,XMM1
JNC 0x0019cfde
SUBSS XMM4,XMM2
DIVSS XMM4,XMM6
ADDSS XMM4,dword ptr [0x001d3bb4]
MOVAPS XMM2,XMM4
JMP 0x0019cff1
LAB_0019cfcb:
MOVSS XMM0,dword ptr [0x001e9454]
RET
LAB_0019cfd4:
SUBSS XMM2,XMM3
DIVSS XMM2,XMM6
JMP 0x0019cff1
LAB_0019cfde:
SUBSS XMM3,XMM4
DIVSS XMM3,XMM6
ADDSS XMM3,dword ptr [0x001dd2d4]
MOVAPS XMM2,XMM3
LAB_0019cff1:
MULSS XMM2,dword ptr [0x001e9458]
MOVAPS XMM0,XMM2
UNPCKLPS XMM0,XMM5
XORPS XMM3,XMM3
UCOMISS XMM3,XMM2
JBE 0x0019cf9c
ADDSS XMM2,dword ptr [0x001dd2f0]
MOVSS XMM0,XMM2
RET
|
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
ulong ColorToHSV(uint param_1)
{
uint6 uVar1;
uint uVar2;
uint uVar3;
float fVar7;
int1 auVar5 [16];
int1 auVar6 [16];
float fVar8;
float fVar12;
int8 uVar9;
int4 uVar13;
int1 auVar10 [16];
int1 auVar11 [16];
float fVar14;
int8 in_XMM3_Qa;
float fVar15;
int1 auVar4 [16];
fVar14 = (float)(param_1 >> 0x10 & 0xff) / DAT_001d3b94;
uVar1 = CONCAT24((short)param_1,param_1 >> 8) & 0xff000000ff;
auVar10._0_4_ = (float)(int)uVar1;
auVar10._4_4_ = (float)(ushort)(uVar1 >> 0x20);
auVar10._8_8_ = 0;
auVar10 = divps(auVar10,_DAT_001dd400);
fVar8 = auVar10._0_4_;
fVar12 = auVar10._4_4_;
fVar15 = (float)(~-(uint)(fVar12 < fVar8) & (uint)fVar8 | (uint)fVar12 & -(uint)(fVar12 < fVar8));
fVar7 = (float)(~-(uint)(fVar8 < fVar12) & (uint)fVar8 | (uint)fVar12 & -(uint)(fVar8 < fVar12));
uVar2 = -(uint)(fVar15 < fVar14);
uVar3 = -(uint)(fVar14 < fVar7);
fVar7 = (float)(~uVar3 & (uint)fVar14 | (uint)fVar7 & uVar3);
fVar15 = fVar7 - (float)(~uVar2 & (uint)fVar14 | (uint)fVar15 & uVar2);
auVar4._0_8_ = 0;
if (DAT_001e9450 <= fVar15) {
if (fVar7 <= 0.0) {
return (ulong)DAT_001e9454;
}
if (fVar7 <= fVar12) {
auVar11._0_4_ = (fVar8 - fVar14) / fVar15;
auVar11._4_12_ = auVar10._4_12_;
uVar9 = auVar11._0_8_;
}
else if (fVar7 <= fVar8) {
uVar9 = CONCAT44((int)((ulong)in_XMM3_Qa >> 0x20),(fVar14 - fVar12) / fVar15 + DAT_001dd2d4);
}
else {
uVar9 = CONCAT44(fVar12,(fVar12 - fVar8) / fVar15 + DAT_001d3bb4);
}
fVar8 = (float)uVar9 * _DAT_001e9458;
uVar13 = (int4)((ulong)uVar9 >> 0x20);
auVar5._4_4_ = uVar13;
auVar5._0_4_ = fVar8;
auVar5._8_4_ = uVar13;
auVar5._12_4_ = fVar7;
auVar4._8_8_ = auVar5._8_8_;
auVar4._0_8_ = CONCAT44(fVar15 / fVar7,fVar8);
if (fVar8 < 0.0) {
auVar6._4_12_ = auVar4._4_12_;
auVar6._0_4_ = fVar8 + DAT_001dd2f0;
return auVar6._0_8_;
}
}
return auVar4._0_8_;
}
|
|
8,949 |
common_sampler_types_from_chars(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
|
monkey531[P]llama/common/sampling.cpp
|
std::vector<common_sampler_type> common_sampler_types_from_chars(const std::string & chars) {
std::unordered_map<char, common_sampler_type> sampler_name_map = {
{ common_sampler_type_to_chr(COMMON_SAMPLER_TYPE_DRY), COMMON_SAMPLER_TYPE_DRY },
{ common_sampler_type_to_chr(COMMON_SAMPLER_TYPE_TOP_K), COMMON_SAMPLER_TYPE_TOP_K },
{ common_sampler_type_to_chr(COMMON_SAMPLER_TYPE_TYPICAL_P), COMMON_SAMPLER_TYPE_TYPICAL_P },
{ common_sampler_type_to_chr(COMMON_SAMPLER_TYPE_TOP_P), COMMON_SAMPLER_TYPE_TOP_P },
{ common_sampler_type_to_chr(COMMON_SAMPLER_TYPE_MIN_P), COMMON_SAMPLER_TYPE_MIN_P },
{ common_sampler_type_to_chr(COMMON_SAMPLER_TYPE_TEMPERATURE), COMMON_SAMPLER_TYPE_TEMPERATURE },
{ common_sampler_type_to_chr(COMMON_SAMPLER_TYPE_XTC), COMMON_SAMPLER_TYPE_XTC },
{ common_sampler_type_to_chr(COMMON_SAMPLER_TYPE_INFILL), COMMON_SAMPLER_TYPE_INFILL },
{ common_sampler_type_to_chr(COMMON_SAMPLER_TYPE_PENALTIES), COMMON_SAMPLER_TYPE_PENALTIES },
};
std::vector<common_sampler_type> samplers;
samplers.reserve(chars.size());
for (const auto & c : chars) {
const auto sampler = sampler_name_map.find(c);
if (sampler != sampler_name_map.end()) {
samplers.push_back(sampler->second);
}
}
return samplers;
}
|
O3
|
cpp
|
common_sampler_types_from_chars(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&):
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x98, %rsp
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x98(%rsp), %rdx
movb $0x64, -0x48(%rdx)
movl $0x1, -0x44(%rdx)
movb $0x6b, -0x40(%rdx)
movl $0x2, -0x3c(%rdx)
movb $0x79, -0x38(%rdx)
movl $0x6, -0x34(%rdx)
movb $0x70, -0x30(%rdx)
movl $0x3, -0x2c(%rdx)
movb $0x6d, -0x28(%rdx)
movl $0x4, -0x24(%rdx)
movb $0x74, -0x20(%rdx)
movl $0x7, -0x1c(%rdx)
movb $0x78, -0x18(%rdx)
movl $0x8, -0x14(%rdx)
movb $0x69, -0x10(%rdx)
movl $0x9, -0xc(%rdx)
movb $0x65, -0x8(%rdx)
movl $0xa, -0x4(%rdx)
leaq 0x15(%rsp), %rax
movq %rax, (%rsp)
leaq 0x18(%rsp), %rdi
leaq 0x50(%rsp), %rsi
leaq 0x17(%rsp), %r8
leaq 0x16(%rsp), %r9
xorl %ecx, %ecx
callq 0xd2140
xorps %xmm0, %xmm0
movups %xmm0, (%rbx)
movq $0x0, 0x10(%rbx)
movq 0x8(%r14), %rsi
movq %rbx, %rdi
callq 0xd160a
movq 0x8(%r14), %r12
testq %r12, %r12
je 0xd12c1
movq (%r14), %r14
leaq 0x18(%rsp), %r15
movq %r15, %rdi
movq %r14, %rsi
callq 0xd24d2
testq %rax, %rax
je 0xd12b9
addq $0xc, %rax
movq 0x8(%rbx), %rsi
cmpq 0x10(%rbx), %rsi
je 0xd12ae
movl (%rax), %eax
movl %eax, (%rsi)
addq $0x4, %rsi
movq %rsi, 0x8(%rbx)
jmp 0xd12b9
movq %rbx, %rdi
movq %rax, %rdx
callq 0xd2020
incq %r14
decq %r12
jne 0xd1282
leaq 0x18(%rsp), %rdi
callq 0xd1976
movq %rbx, %rax
addq $0x98, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
jmp 0xd12df
movq %rax, %r14
movq (%rbx), %rdi
testq %rdi, %rdi
je 0xd12f6
movq 0x10(%rbx), %rsi
subq %rdi, %rsi
callq 0x1ba20
leaq 0x18(%rsp), %rdi
callq 0xd1976
movq %r14, %rdi
callq 0x1c1e0
|
_Z31common_sampler_types_from_charsRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE:
push r15
push r14
push r12
push rbx
sub rsp, 98h
mov r14, rsi
mov rbx, rdi
lea rdx, [rsp+0B8h+var_20]
mov byte ptr [rdx-48h], 64h ; 'd'
mov dword ptr [rdx-44h], 1
mov byte ptr [rdx-40h], 6Bh ; 'k'
mov dword ptr [rdx-3Ch], 2
mov byte ptr [rdx-38h], 79h ; 'y'
mov dword ptr [rdx-34h], 6
mov byte ptr [rdx-30h], 70h ; 'p'
mov dword ptr [rdx-2Ch], 3
mov byte ptr [rdx-28h], 6Dh ; 'm'
mov dword ptr [rdx-24h], 4
mov byte ptr [rdx-20h], 74h ; 't'
mov dword ptr [rdx-1Ch], 7
mov byte ptr [rdx-18h], 78h ; 'x'
mov dword ptr [rdx-14h], 8
mov byte ptr [rdx-10h], 69h ; 'i'
mov dword ptr [rdx-0Ch], 9
mov byte ptr [rdx-8], 65h ; 'e'
mov dword ptr [rdx-4], 0Ah
lea rax, [rsp+0B8h+var_A3]
mov [rsp+0B8h+var_B8], rax
lea rdi, [rsp+0B8h+var_A0]
lea rsi, [rsp+0B8h+var_68]
lea r8, [rsp+0B8h+var_A1]
lea r9, [rsp+0B8h+var_A2]
xor ecx, ecx
call _ZNSt10_HashtableIcSt4pairIKc19common_sampler_typeESaIS3_ENSt8__detail10_Select1stESt8equal_toIcESt4hashIcENS5_18_Mod_range_hashingENS5_20_Default_ranged_hashENS5_20_Prime_rehash_policyENS5_17_Hashtable_traitsILb0ELb0ELb1EEEEC2IPKS3_EET_SK_mRKSA_RKS8_RKS4_St17integral_constantIbLb1EE; std::_Hashtable<char,std::pair<char const,common_sampler_type>,std::allocator<std::pair<char const,common_sampler_type>>,std::__detail::_Select1st,std::equal_to<char>,std::hash<char>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<false,false,true>>::_Hashtable<std::pair<char const,common_sampler_type> const*>(std::pair<char const,common_sampler_type> const*,std::pair<char const,common_sampler_type> const*,ulong,std::hash<char> const&,std::equal_to<char> const&,std::allocator<std::pair<char const,common_sampler_type>> const&,std::integral_constant<bool,true>)
xorps xmm0, xmm0
movups xmmword ptr [rbx], xmm0
mov qword ptr [rbx+10h], 0
mov rsi, [r14+8]
mov rdi, rbx
call _ZNSt6vectorI19common_sampler_typeSaIS0_EE7reserveEm; std::vector<common_sampler_type>::reserve(ulong)
mov r12, [r14+8]
test r12, r12
jz short loc_D12C1
mov r14, [r14]
lea r15, [rsp+0B8h+var_A0]
loc_D1282:
mov rdi, r15
mov rsi, r14
call _ZNSt10_HashtableIcSt4pairIKc19common_sampler_typeESaIS3_ENSt8__detail10_Select1stESt8equal_toIcESt4hashIcENS5_18_Mod_range_hashingENS5_20_Default_ranged_hashENS5_20_Prime_rehash_policyENS5_17_Hashtable_traitsILb0ELb0ELb1EEEE4findERS1_; std::_Hashtable<char,std::pair<char const,common_sampler_type>,std::allocator<std::pair<char const,common_sampler_type>>,std::__detail::_Select1st,std::equal_to<char>,std::hash<char>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<false,false,true>>::find(char const&)
test rax, rax
jz short loc_D12B9
add rax, 0Ch
mov rsi, [rbx+8]
cmp rsi, [rbx+10h]
jz short loc_D12AE
mov eax, [rax]
mov [rsi], eax
add rsi, 4
mov [rbx+8], rsi
jmp short loc_D12B9
loc_D12AE:
mov rdi, rbx
mov rdx, rax
call _ZNSt6vectorI19common_sampler_typeSaIS0_EE17_M_realloc_insertIJRKS0_EEEvN9__gnu_cxx17__normal_iteratorIPS0_S2_EEDpOT_; std::vector<common_sampler_type>::_M_realloc_insert<common_sampler_type const&>(__gnu_cxx::__normal_iterator<common_sampler_type*,std::vector<common_sampler_type>>,common_sampler_type const&)
loc_D12B9:
inc r14
dec r12
jnz short loc_D1282
loc_D12C1:
lea rdi, [rsp+0B8h+var_A0]
call _ZNSt10_HashtableIcSt4pairIKc19common_sampler_typeESaIS3_ENSt8__detail10_Select1stESt8equal_toIcESt4hashIcENS5_18_Mod_range_hashingENS5_20_Default_ranged_hashENS5_20_Prime_rehash_policyENS5_17_Hashtable_traitsILb0ELb0ELb1EEEED2Ev; std::_Hashtable<char,std::pair<char const,common_sampler_type>,std::allocator<std::pair<char const,common_sampler_type>>,std::__detail::_Select1st,std::equal_to<char>,std::hash<char>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<false,false,true>>::~_Hashtable()
mov rax, rbx
add rsp, 98h
pop rbx
pop r12
pop r14
pop r15
retn
jmp short $+2
loc_D12DF:
mov r14, rax
mov rdi, [rbx]; void *
test rdi, rdi
jz short loc_D12F6
mov rsi, [rbx+10h]
sub rsi, rdi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_D12F6:
lea rdi, [rsp+arg_10]
call _ZNSt10_HashtableIcSt4pairIKc19common_sampler_typeESaIS3_ENSt8__detail10_Select1stESt8equal_toIcESt4hashIcENS5_18_Mod_range_hashingENS5_20_Default_ranged_hashENS5_20_Prime_rehash_policyENS5_17_Hashtable_traitsILb0ELb0ELb1EEEED2Ev; std::_Hashtable<char,std::pair<char const,common_sampler_type>,std::allocator<std::pair<char const,common_sampler_type>>,std::__detail::_Select1st,std::equal_to<char>,std::hash<char>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<false,false,true>>::~_Hashtable()
mov rdi, r14
call __Unwind_Resume
|
long long common_sampler_types_from_chars(long long a1, long long *a2)
{
long long v2; // r12
long long v3; // r14
long long v4; // rax
_DWORD *v5; // rax
_DWORD *v6; // rsi
char v8; // [rsp+15h] [rbp-A3h] BYREF
char v9; // [rsp+16h] [rbp-A2h] BYREF
char v10; // [rsp+17h] [rbp-A1h] BYREF
_BYTE v11[56]; // [rsp+18h] [rbp-A0h] BYREF
char v12; // [rsp+50h] [rbp-68h] BYREF
int v13; // [rsp+54h] [rbp-64h]
char v14; // [rsp+58h] [rbp-60h]
int v15; // [rsp+5Ch] [rbp-5Ch]
char v16; // [rsp+60h] [rbp-58h]
int v17; // [rsp+64h] [rbp-54h]
char v18; // [rsp+68h] [rbp-50h]
int v19; // [rsp+6Ch] [rbp-4Ch]
char v20; // [rsp+70h] [rbp-48h]
int v21; // [rsp+74h] [rbp-44h]
char v22; // [rsp+78h] [rbp-40h]
int v23; // [rsp+7Ch] [rbp-3Ch]
char v24; // [rsp+80h] [rbp-38h]
int v25; // [rsp+84h] [rbp-34h]
char v26; // [rsp+88h] [rbp-30h]
int v27; // [rsp+8Ch] [rbp-2Ch]
char v28; // [rsp+90h] [rbp-28h]
int v29; // [rsp+94h] [rbp-24h]
char v30; // [rsp+98h] [rbp-20h] BYREF
v12 = 100;
v13 = 1;
v14 = 107;
v15 = 2;
v16 = 121;
v17 = 6;
v18 = 112;
v19 = 3;
v20 = 109;
v21 = 4;
v22 = 116;
v23 = 7;
v24 = 120;
v25 = 8;
v26 = 105;
v27 = 9;
v28 = 101;
v29 = 10;
std::_Hashtable<char,std::pair<char const,common_sampler_type>,std::allocator<std::pair<char const,common_sampler_type>>,std::__detail::_Select1st,std::equal_to<char>,std::hash<char>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<false,false,true>>::_Hashtable<std::pair<char const,common_sampler_type> const*>(
(unsigned int)v11,
(unsigned int)&v12,
(unsigned int)&v30,
0,
(unsigned int)&v10,
(unsigned int)&v9,
(long long)&v8);
*(_OWORD *)a1 = 0LL;
*(_QWORD *)(a1 + 16) = 0LL;
std::vector<common_sampler_type>::reserve(a1, a2[1]);
v2 = a2[1];
if ( v2 )
{
v3 = *a2;
do
{
v4 = std::_Hashtable<char,std::pair<char const,common_sampler_type>,std::allocator<std::pair<char const,common_sampler_type>>,std::__detail::_Select1st,std::equal_to<char>,std::hash<char>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<false,false,true>>::find(
v11,
v3);
if ( v4 )
{
v5 = (_DWORD *)(v4 + 12);
v6 = *(_DWORD **)(a1 + 8);
if ( v6 == *(_DWORD **)(a1 + 16) )
{
std::vector<common_sampler_type>::_M_realloc_insert<common_sampler_type const&>(a1, v6, v5);
}
else
{
*v6 = *v5;
*(_QWORD *)(a1 + 8) = v6 + 1;
}
}
++v3;
--v2;
}
while ( v2 );
}
std::_Hashtable<char,std::pair<char const,common_sampler_type>,std::allocator<std::pair<char const,common_sampler_type>>,std::__detail::_Select1st,std::equal_to<char>,std::hash<char>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<false,false,true>>::~_Hashtable(v11);
return a1;
}
|
common_sampler_types_from_chars:
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
SUB RSP,0x98
MOV R14,RSI
MOV RBX,RDI
LEA RDX,[RSP + 0x98]
MOV byte ptr [RDX + -0x48],0x64
MOV dword ptr [RDX + -0x44],0x1
MOV byte ptr [RDX + -0x40],0x6b
MOV dword ptr [RDX + -0x3c],0x2
MOV byte ptr [RDX + -0x38],0x79
MOV dword ptr [RDX + -0x34],0x6
MOV byte ptr [RDX + -0x30],0x70
MOV dword ptr [RDX + -0x2c],0x3
MOV byte ptr [RDX + -0x28],0x6d
MOV dword ptr [RDX + -0x24],0x4
MOV byte ptr [RDX + -0x20],0x74
MOV dword ptr [RDX + -0x1c],0x7
MOV byte ptr [RDX + -0x18],0x78
MOV dword ptr [RDX + -0x14],0x8
MOV byte ptr [RDX + -0x10],0x69
MOV dword ptr [RDX + -0xc],0x9
MOV byte ptr [RDX + -0x8],0x65
MOV dword ptr [RDX + -0x4],0xa
LEA RAX,[RSP + 0x15]
MOV qword ptr [RSP],RAX
LEA RDI,[RSP + 0x18]
LEA RSI,[RSP + 0x50]
LEA R8,[RSP + 0x17]
LEA R9,[RSP + 0x16]
XOR ECX,ECX
CALL 0x001d2140
XORPS XMM0,XMM0
MOVUPS xmmword ptr [RBX],XMM0
MOV qword ptr [RBX + 0x10],0x0
MOV RSI,qword ptr [R14 + 0x8]
LAB_001d1269:
MOV RDI,RBX
CALL 0x001d160a
MOV R12,qword ptr [R14 + 0x8]
TEST R12,R12
JZ 0x001d12c1
MOV R14,qword ptr [R14]
LEA R15,[RSP + 0x18]
LAB_001d1282:
MOV RDI,R15
MOV RSI,R14
CALL 0x001d24d2
TEST RAX,RAX
JZ 0x001d12b9
ADD RAX,0xc
MOV RSI,qword ptr [RBX + 0x8]
CMP RSI,qword ptr [RBX + 0x10]
JZ 0x001d12ae
MOV EAX,dword ptr [RAX]
MOV dword ptr [RSI],EAX
ADD RSI,0x4
MOV qword ptr [RBX + 0x8],RSI
JMP 0x001d12b9
LAB_001d12ae:
MOV RDI,RBX
MOV RDX,RAX
CALL 0x001d2020
LAB_001d12b9:
INC R14
DEC R12
JNZ 0x001d1282
LAB_001d12c1:
LEA RDI,[RSP + 0x18]
CALL 0x001d1976
MOV RAX,RBX
ADD RSP,0x98
POP RBX
POP R12
POP R14
POP R15
RET
|
/* common_sampler_types_from_chars(std::__cxx11::string const&) */
string * common_sampler_types_from_chars(string *param_1)
{
int4 *puVar1;
long lVar2;
int8 *in_RSI;
long lVar3;
char *pcVar4;
int1 local_a3;
int1 local_a2;
int1 local_a1;
_Hashtable<char,std::pair<char_const,common_sampler_type>,std::allocator<std::pair<char_const,common_sampler_type>>,std::__detail::_Select1st,std::equal_to<char>,std::hash<char>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<false,false,true>>
local_a0 [56];
int1 local_68 [4];
int4 local_64;
int1 local_60;
int4 local_5c;
int1 local_58;
int4 local_54;
int1 local_50;
int4 local_4c;
int1 local_48;
int4 local_44;
int1 local_40;
int4 local_3c;
int1 local_38;
int4 local_34;
int1 local_30;
int4 local_2c;
int1 local_28;
int4 local_24;
local_68[0] = 100;
local_64 = 1;
local_60 = 0x6b;
local_5c = 2;
local_58 = 0x79;
local_54 = 6;
local_50 = 0x70;
local_4c = 3;
local_48 = 0x6d;
local_44 = 4;
local_40 = 0x74;
local_3c = 7;
local_38 = 0x78;
local_34 = 8;
local_30 = 0x69;
local_2c = 9;
local_28 = 0x65;
local_24 = 10;
std::
_Hashtable<char,std::pair<char_const,common_sampler_type>,std::allocator<std::pair<char_const,common_sampler_type>>,std::__detail::_Select1st,std::equal_to<char>,std::hash<char>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<false,false,true>>
::_Hashtable<std::pair<char_const,common_sampler_type>const*>
(local_a0,local_68,&stack0xffffffffffffffe0,0,&local_a1,&local_a2,&local_a3);
*(int8 *)param_1 = 0;
*(int8 *)(param_1 + 8) = 0;
*(int8 *)(param_1 + 0x10) = 0;
/* try { // try from 001d1269 to 001d1270 has its CatchHandler @ 001d12dd */
std::vector<common_sampler_type,std::allocator<common_sampler_type>>::reserve
((vector<common_sampler_type,std::allocator<common_sampler_type>> *)param_1,in_RSI[1]);
lVar3 = in_RSI[1];
if (lVar3 != 0) {
pcVar4 = (char *)*in_RSI;
do {
/* try { // try from 001d1282 to 001d12b8 has its CatchHandler @ 001d12df */
lVar2 = std::
_Hashtable<char,std::pair<char_const,common_sampler_type>,std::allocator<std::pair<char_const,common_sampler_type>>,std::__detail::_Select1st,std::equal_to<char>,std::hash<char>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<false,false,true>>
::find(local_a0,pcVar4);
if (lVar2 != 0) {
puVar1 = *(int4 **)(param_1 + 8);
if (puVar1 == *(int4 **)(param_1 + 0x10)) {
std::vector<common_sampler_type,std::allocator<common_sampler_type>>::
_M_realloc_insert<common_sampler_type_const&>
((vector<common_sampler_type,std::allocator<common_sampler_type>> *)param_1,
puVar1,(int4 *)(lVar2 + 0xc));
}
else {
*puVar1 = *(int4 *)(lVar2 + 0xc);
*(int4 **)(param_1 + 8) = puVar1 + 1;
}
}
pcVar4 = pcVar4 + 1;
lVar3 = lVar3 + -1;
} while (lVar3 != 0);
}
std::
_Hashtable<char,std::pair<char_const,common_sampler_type>,std::allocator<std::pair<char_const,common_sampler_type>>,std::__detail::_Select1st,std::equal_to<char>,std::hash<char>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<false,false,true>>
::~_Hashtable(local_a0);
return param_1;
}
|
|
8,950 |
my_hash_sort_latin1_de
|
eloqsql/strings/ctype-latin1.c
|
void my_hash_sort_latin1_de(CHARSET_INFO *cs __attribute__((unused)),
const uchar *key, size_t len,
ulong *nr1, ulong *nr2)
{
const uchar *end;
register ulong m1= *nr1, m2= *nr2;
/*
Remove end space. We have to do this to be able to compare
'AE' and 'Ä' as identical
*/
end= skip_trailing_space(key, len);
for (; key < end ; key++)
{
uint X= (uint) combo1map[(uint) *key];
MY_HASH_ADD(m1, m2, X);
if ((X= combo2map[*key]))
{
MY_HASH_ADD(m1, m2, X);
}
}
*nr1= m1;
*nr2= m2;
}
|
O3
|
c
|
my_hash_sort_latin1_de:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
leaq (%rsi,%rdx), %r9
cmpq $0x15, %rdx
jb 0x4898b
movq %r9, %rdx
andq $-0x4, %rdx
cmpq %rsi, %rdx
jbe 0x4898b
leaq 0x3(%rsi), %rax
andq $-0x4, %rax
movq %r9, %rdi
movb -0x1(%r9), %r10b
cmpq %rdx, %r9
jbe 0x48a34
leaq -0x1(%rdi), %r9
cmpb $0x20, %r10b
je 0x4896f
jmp 0x4898e
movq %r9, %rdi
movq (%rcx), %r11
movq (%r8), %rax
cmpq %rsi, %rdi
jbe 0x48a21
leaq -0x1(%rdi), %rdx
cmpb $0x20, -0x1(%rdi)
movq %rdx, %rdi
je 0x48994
incq %rdx
leaq 0x18605c(%rip), %r9 # 0x1cea10
leaq 0x186155(%rip), %r10 # 0x1ceb10
movq %r11, %rdi
movzbl (%rsi), %r14d
movzbl (%r14,%r9), %ebx
movl %r11d, %r15d
andl $0x3f, %r15d
addq %rax, %r15
imulq %rbx, %r15
shlq $0x8, %rdi
addq %r15, %rdi
xorq %r11, %rdi
leaq 0x3(%rax), %rbx
movzbl (%r14,%r10), %r11d
testq %r11, %r11
je 0x48a11
movl %edi, %r14d
andl $0x3f, %r14d
addq %rbx, %r14
imulq %r11, %r14
movq %rdi, %r11
shlq $0x8, %r11
addq %r14, %r11
xorq %r11, %rdi
addq $0x6, %rax
movq %rax, %rbx
jmp 0x48a14
movq %rbx, %rax
incq %rsi
movq %rdi, %r11
cmpq %rdx, %rsi
jb 0x489be
jmp 0x48a27
movq %r11, %rdi
movq %rax, %rbx
movq %rdi, (%rcx)
movq %rbx, (%r8)
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
cmpb $0x20, %r10b
setne %r9b
cmpq %rdx, %rax
setae %dl
orb %r9b, %dl
jne 0x4898e
movq %rdi, %rdx
movq %rdx, %rdi
cmpq %rax, %rdx
jbe 0x4898e
leaq -0x4(%rdi), %rdx
cmpl $0x20202020, -0x4(%rdi) # imm = 0x20202020
je 0x48a4e
jmp 0x4898e
|
my_hash_sort_latin1_de:
push rbp
mov rbp, rsp
push r15
push r14
push rbx
lea r9, [rsi+rdx]
cmp rdx, 15h
jb short loc_4898B
mov rdx, r9
and rdx, 0FFFFFFFFFFFFFFFCh
cmp rdx, rsi
jbe short loc_4898B
lea rax, [rsi+3]
and rax, 0FFFFFFFFFFFFFFFCh
loc_4896F:
mov rdi, r9
mov r10b, [r9-1]
cmp r9, rdx
jbe loc_48A34
lea r9, [rdi-1]
cmp r10b, 20h ; ' '
jz short loc_4896F
jmp short loc_4898E
loc_4898B:
mov rdi, r9
loc_4898E:
mov r11, [rcx]
mov rax, [r8]
loc_48994:
cmp rdi, rsi
jbe loc_48A21
lea rdx, [rdi-1]
cmp byte ptr [rdi-1], 20h ; ' '
mov rdi, rdx
jz short loc_48994
inc rdx
lea r9, combo1map
lea r10, combo2map
mov rdi, r11
loc_489BE:
movzx r14d, byte ptr [rsi]
movzx ebx, byte ptr [r14+r9]
mov r15d, r11d
and r15d, 3Fh
add r15, rax
imul r15, rbx
shl rdi, 8
add rdi, r15
xor rdi, r11
lea rbx, [rax+3]
movzx r11d, byte ptr [r14+r10]
test r11, r11
jz short loc_48A11
mov r14d, edi
and r14d, 3Fh
add r14, rbx
imul r14, r11
mov r11, rdi
shl r11, 8
add r11, r14
xor rdi, r11
add rax, 6
mov rbx, rax
jmp short loc_48A14
loc_48A11:
mov rax, rbx
loc_48A14:
inc rsi
mov r11, rdi
cmp rsi, rdx
jb short loc_489BE
jmp short loc_48A27
loc_48A21:
mov rdi, r11
mov rbx, rax
loc_48A27:
mov [rcx], rdi
mov [r8], rbx
pop rbx
pop r14
pop r15
pop rbp
retn
loc_48A34:
cmp r10b, 20h ; ' '
setnz r9b
cmp rax, rdx
setnb dl
or dl, r9b
jnz loc_4898E
mov rdx, rdi
loc_48A4E:
mov rdi, rdx
cmp rdx, rax
jbe loc_4898E
lea rdx, [rdi-4]
cmp dword ptr [rdi-4], 20202020h
jz short loc_48A4E
jmp loc_4898E
|
long long my_hash_sort_latin1_de(
long long a1,
unsigned __int8 *a2,
unsigned long long a3,
long long *a4,
long long *a5)
{
unsigned long long v5; // r9
unsigned long long v6; // rdx
unsigned long long v7; // rax
unsigned long long v8; // rdi
char v9; // r10
long long v10; // r11
long long result; // rax
unsigned long long v12; // rdx
unsigned long long v14; // rdx
long long v15; // rdi
long long v16; // r14
long long v17; // rbx
unsigned long long v18; // rdx
v5 = (unsigned long long)&a2[a3];
if ( a3 < 0x15 || (v6 = v5 & 0xFFFFFFFFFFFFFFFCLL, (v5 & 0xFFFFFFFFFFFFFFFCLL) <= (unsigned long long)a2) )
{
v8 = v5;
}
else
{
v7 = (unsigned long long)(a2 + 3) & 0xFFFFFFFFFFFFFFFCLL;
while ( 1 )
{
v8 = v5;
v9 = *(_BYTE *)(v5 - 1);
if ( v5 <= v6 )
break;
--v5;
if ( v9 != 32 )
goto LABEL_8;
}
if ( v9 == 32 && v7 < v6 )
{
v18 = v5;
do
{
v8 = v18;
if ( v18 <= v7 )
break;
v18 -= 4LL;
}
while ( *(_DWORD *)(v8 - 4) == 538976288 );
}
}
LABEL_8:
v10 = *a4;
result = *a5;
do
{
if ( v8 <= (unsigned long long)a2 )
{
v15 = *a4;
v17 = *a5;
goto LABEL_18;
}
v12 = v8 - 1;
}
while ( *(_BYTE *)--v8 == 32 );
v14 = v12 + 1;
v15 = *a4;
do
{
v16 = *a2;
v15 = v10 ^ (combo1map[v16] * (result + (v10 & 0x3F)) + (v15 << 8));
v17 = result + 3;
if ( combo2map[v16] )
{
v15 ^= combo2map[v16] * (v17 + (v15 & 0x3F)) + (v15 << 8);
result += 6LL;
v17 = result;
}
else
{
result += 3LL;
}
++a2;
v10 = v15;
}
while ( (unsigned long long)a2 < v14 );
LABEL_18:
*a4 = v15;
*a5 = v17;
return result;
}
|
my_hash_sort_latin1_de:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH RBX
LEA R9,[RSI + RDX*0x1]
CMP RDX,0x15
JC 0x0014898b
MOV RDX,R9
AND RDX,-0x4
CMP RDX,RSI
JBE 0x0014898b
LEA RAX,[RSI + 0x3]
AND RAX,-0x4
LAB_0014896f:
MOV RDI,R9
MOV R10B,byte ptr [R9 + -0x1]
CMP R9,RDX
JBE 0x00148a34
LEA R9,[RDI + -0x1]
CMP R10B,0x20
JZ 0x0014896f
JMP 0x0014898e
LAB_0014898b:
MOV RDI,R9
LAB_0014898e:
MOV R11,qword ptr [RCX]
MOV RAX,qword ptr [R8]
LAB_00148994:
CMP RDI,RSI
JBE 0x00148a21
LEA RDX,[RDI + -0x1]
CMP byte ptr [RDI + -0x1],0x20
MOV RDI,RDX
JZ 0x00148994
INC RDX
LEA R9,[0x2cea10]
LEA R10,[0x2ceb10]
MOV RDI,R11
LAB_001489be:
MOVZX R14D,byte ptr [RSI]
MOVZX EBX,byte ptr [R14 + R9*0x1]
MOV R15D,R11D
AND R15D,0x3f
ADD R15,RAX
IMUL R15,RBX
SHL RDI,0x8
ADD RDI,R15
XOR RDI,R11
LEA RBX,[RAX + 0x3]
MOVZX R11D,byte ptr [R14 + R10*0x1]
TEST R11,R11
JZ 0x00148a11
MOV R14D,EDI
AND R14D,0x3f
ADD R14,RBX
IMUL R14,R11
MOV R11,RDI
SHL R11,0x8
ADD R11,R14
XOR RDI,R11
ADD RAX,0x6
MOV RBX,RAX
JMP 0x00148a14
LAB_00148a11:
MOV RAX,RBX
LAB_00148a14:
INC RSI
MOV R11,RDI
CMP RSI,RDX
JC 0x001489be
JMP 0x00148a27
LAB_00148a21:
MOV RDI,R11
MOV RBX,RAX
LAB_00148a27:
MOV qword ptr [RCX],RDI
MOV qword ptr [R8],RBX
POP RBX
POP R14
POP R15
POP RBP
RET
LAB_00148a34:
CMP R10B,0x20
SETNZ R9B
CMP RAX,RDX
SETNC DL
OR DL,R9B
JNZ 0x0014898e
MOV RDX,RDI
LAB_00148a4e:
MOV RDI,RDX
CMP RDX,RAX
JBE 0x0014898e
LEA RDX,[RDI + -0x4]
CMP dword ptr [RDI + -0x4],0x20202020
JZ 0x00148a4e
JMP 0x0014898e
|
void my_hash_sort_latin1_de
(int8 param_1,byte *param_2,ulong param_3,ulong *param_4,long *param_5)
{
byte *pbVar1;
long lVar2;
long lVar3;
byte *pbVar4;
byte *pbVar5;
ulong uVar6;
pbVar5 = param_2 + param_3;
if ((0x14 < param_3) && (pbVar4 = (byte *)((ulong)pbVar5 & 0xfffffffffffffffc), param_2 < pbVar4))
{
pbVar1 = pbVar5;
do {
pbVar5 = pbVar1;
if (pbVar5 <= pbVar4) {
pbVar1 = pbVar5;
if ((byte *)((ulong)(param_2 + 3) & 0xfffffffffffffffc) < pbVar4 && pbVar5[-1] == 0x20)
goto LAB_00148a4e;
break;
}
pbVar1 = pbVar5 + -1;
} while (pbVar5[-1] == 0x20);
}
goto LAB_0014898e;
while (pbVar1 = pbVar5 + -4, *(int *)(pbVar5 + -4) == 0x20202020) {
LAB_00148a4e:
pbVar5 = pbVar1;
if (pbVar5 <= (byte *)((ulong)(param_2 + 3) & 0xfffffffffffffffc)) break;
}
LAB_0014898e:
uVar6 = *param_4;
lVar2 = *param_5;
do {
pbVar4 = pbVar5;
lVar3 = lVar2;
if (pbVar4 <= param_2) goto LAB_00148a27;
pbVar5 = pbVar4 + -1;
} while (pbVar4[-1] == 0x20);
do {
uVar6 = uVar6 * 0x100 + ((ulong)((uint)uVar6 & 0x3f) + lVar2) * (ulong)(byte)combo1map[*param_2]
^ uVar6;
lVar3 = lVar2 + 3;
if ((ulong)(byte)combo2map[*param_2] != 0) {
uVar6 = uVar6 ^ uVar6 * 0x100 +
((ulong)((uint)uVar6 & 0x3f) + lVar3) * (ulong)(byte)combo2map[*param_2];
lVar3 = lVar2 + 6;
}
param_2 = param_2 + 1;
lVar2 = lVar3;
} while (param_2 < pbVar4);
LAB_00148a27:
*param_4 = uVar6;
*param_5 = lVar3;
return;
}
|
|
8,951 |
ma_calc_length_for_store_length
|
eloqsql/storage/maria/ma_blockrec.c
|
uint ma_calc_length_for_store_length(ulong nr)
{
if (nr < 251)
return 1;
if (nr < 65536)
{
if (nr <= 255)
return 2;
return 3;
}
if (nr < 16777216)
return 4;
return 5;
}
|
O3
|
c
|
ma_calc_length_for_store_length:
pushq %rbp
movq %rsp, %rbp
movl $0x1, %eax
cmpq $0xfb, %rdi
jb 0x5e70a
cmpq $0xffff, %rdi # imm = 0xFFFF
ja 0x5e6fb
cmpq $0x100, %rdi # imm = 0x100
movl $0x3, %eax
jmp 0x5e707
cmpq $0x1000000, %rdi # imm = 0x1000000
movl $0x5, %eax
sbbl $0x0, %eax
popq %rbp
retq
|
ma_calc_length_for_store_length:
push rbp
mov rbp, rsp
mov eax, 1
cmp rdi, 0FBh
jb short loc_5E70A
cmp rdi, 0FFFFh
ja short loc_5E6FB
cmp rdi, 100h
mov eax, 3
jmp short loc_5E707
loc_5E6FB:
cmp rdi, 1000000h
mov eax, 5
loc_5E707:
sbb eax, 0
loc_5E70A:
pop rbp
retn
|
long long ma_calc_length_for_store_length(unsigned long long a1)
{
long long result; // rax
bool v2; // cf
int v3; // eax
result = 1LL;
if ( a1 >= 0xFB )
{
if ( a1 > 0xFFFF )
{
v2 = a1 < 0x1000000;
v3 = 5;
}
else
{
v2 = a1 < 0x100;
v3 = 3;
}
return v3 - (unsigned int)v2;
}
return result;
}
|
ma_calc_length_for_store_length:
PUSH RBP
MOV RBP,RSP
MOV EAX,0x1
CMP RDI,0xfb
JC 0x0015e70a
CMP RDI,0xffff
JA 0x0015e6fb
CMP RDI,0x100
MOV EAX,0x3
JMP 0x0015e707
LAB_0015e6fb:
CMP RDI,0x1000000
MOV EAX,0x5
LAB_0015e707:
SBB EAX,0x0
LAB_0015e70a:
POP RBP
RET
|
int ma_calc_length_for_store_length(ulong param_1)
{
int iVar1;
bool bVar2;
iVar1 = 1;
if (0xfa < param_1) {
if (param_1 < 0x10000) {
bVar2 = param_1 < 0x100;
iVar1 = 3;
}
else {
bVar2 = param_1 < 0x1000000;
iVar1 = 5;
}
iVar1 = iVar1 - (uint)bVar2;
}
return iVar1;
}
|
|
8,952 |
run_query_normal(st_connection*, st_command*, int, char const*, unsigned long, st_dynamic_string*, st_dynamic_string*)
|
eloqsql/client/mysqltest.cc
|
void run_query_normal(struct st_connection *cn, struct st_command *command,
int flags, const char *query, size_t query_len,
DYNAMIC_STRING *ds, DYNAMIC_STRING *ds_warnings)
{
MYSQL_RES *res= 0;
MYSQL *mysql= cn->mysql;
int err= 0, counter= 0;
DBUG_ENTER("run_query_normal");
DBUG_PRINT("enter",("flags: %d", flags));
DBUG_PRINT("enter", ("query: '%-.60s'", query));
if (!mysql)
{
handle_no_active_connection(command, cn, ds);
DBUG_VOID_RETURN;
}
/* handle prepared statement commands */
switch (command->type) {
case Q_PS_PREPARE:
run_prepare_stmt(cn, command, query, query_len, ds, ds_warnings);
flags &= ~QUERY_SEND_FLAG;
goto end;
break;
case Q_PS_BIND:
run_bind_stmt(cn, command, query, query_len, ds, ds_warnings);
flags &= ~QUERY_SEND_FLAG;
goto end;
break;
case Q_PS_EXECUTE:
run_execute_stmt(cn, command, query, query_len, ds, ds_warnings);
flags &= ~QUERY_SEND_FLAG;
goto end;
break;
case Q_PS_CLOSE:
run_close_stmt(cn, command, query, query_len, ds, ds_warnings);
flags &= ~QUERY_SEND_FLAG;
goto end;
break;
default: /* not a prepared statement command */
break;
}
if (flags & QUERY_SEND_FLAG)
{
/*
Send the query
*/
if (do_send_query(cn, query, query_len))
{
handle_error(command, mysql_errno(mysql), mysql_error(mysql),
mysql_sqlstate(mysql), ds);
goto end;
}
}
if (!(flags & QUERY_REAP_FLAG))
{
cn->pending= TRUE;
DBUG_VOID_RETURN;
}
do
{
/*
When on first result set, call mysql_read_query_result to retrieve
answer to the query sent earlier
*/
if ((counter==0) && do_read_query_result(cn))
{
/* we've failed to collect the result set */
cn->pending= TRUE;
handle_error(command, mysql_errno(mysql), mysql_error(mysql),
mysql_sqlstate(mysql), ds);
goto end;
}
/*
Store the result of the query if it will return any fields
*/
if (mysql_field_count(mysql) && ((res= mysql_store_result(mysql)) == 0))
{
handle_error(command, mysql_errno(mysql), mysql_error(mysql),
mysql_sqlstate(mysql), ds);
goto end;
}
if (!disable_result_log)
{
if (res)
{
MYSQL_FIELD *fields= mysql_fetch_fields(res);
uint num_fields= mysql_num_fields(res);
if (display_metadata)
append_metadata(ds, fields, num_fields);
if (!display_result_vertically)
append_table_headings(ds, fields, num_fields);
append_result(ds, res);
}
/*
Need to call mysql_affected_rows() before the "new"
query to find the warnings.
*/
if (!disable_info)
append_info(ds, mysql_affected_rows(mysql), mysql_info(mysql));
if (display_session_track_info)
append_session_track_info(ds, mysql);
/*
Add all warnings to the result. We can't do this if we are in
the middle of processing results from multi-statement, because
this will break protocol.
*/
if (!disable_warnings && !mysql_more_results(mysql))
{
if (append_warnings(ds_warnings, mysql) || ds_warnings->length)
{
dynstr_append_mem(ds, "Warnings:\n", 10);
dynstr_append_mem(ds, ds_warnings->str, ds_warnings->length);
}
}
}
if (res)
{
mysql_free_result(res);
res= 0;
}
counter++;
} while (!(err= mysql_next_result(mysql)));
if (err > 0)
{
/* We got an error from mysql_next_result, maybe expected */
handle_error(command, mysql_errno(mysql), mysql_error(mysql),
mysql_sqlstate(mysql), ds);
goto end;
}
DBUG_ASSERT(err == -1); /* Successful and there are no more results */
/* If we come here the query is both executed and read successfully */
handle_no_error(command);
display_optimizer_trace(cn, ds);
revert_properties();
end:
cn->pending= FALSE;
/*
We save the return code (mysql_errno(mysql)) from the last call sent
to the server into the mysqltest builtin variable $mysql_errno. This
variable then can be used from the test case itself.
*/
var_set_errno(mysql_errno(mysql));
DBUG_VOID_RETURN;
}
|
O0
|
cpp
|
run_query_normal(st_connection*, st_command*, int, char const*, unsigned long, st_dynamic_string*, st_dynamic_string*):
pushq %rbp
movq %rsp, %rbp
subq $0xd0, %rsp
movq 0x10(%rbp), %rax
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movq %rcx, -0x20(%rbp)
movq %r8, -0x28(%rbp)
movq %r9, -0x30(%rbp)
movq $0x0, -0x38(%rbp)
movq -0x8(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x40(%rbp)
movl $0x0, -0x44(%rbp)
movl $0x0, -0x48(%rbp)
jmp 0x6efd9
jmp 0x6efdb
jmp 0x6efdd
cmpq $0x0, -0x40(%rbp)
jne 0x6effa
movq -0x10(%rbp), %rdi
movq -0x8(%rbp), %rsi
movq -0x30(%rbp), %rdx
callq 0x65920
jmp 0x6f441
movq -0x10(%rbp), %rax
movl 0x110(%rax), %eax
addl $-0x65, %eax
movl %eax, %ecx
movq %rcx, -0x60(%rbp)
subl $0x3, %eax
ja 0x6f0d6
movq -0x60(%rbp), %rax
leaq 0xdc083(%rip), %rcx # 0x14b0a4
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x20(%rbp), %rdx
movq -0x28(%rbp), %rcx
movq -0x30(%rbp), %r8
movq 0x10(%rbp), %r9
callq 0x6f450
movl -0x14(%rbp), %eax
andl $-0x2, %eax
movl %eax, -0x14(%rbp)
jmp 0x6f427
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x20(%rbp), %rdx
movq -0x28(%rbp), %rcx
movq -0x30(%rbp), %r8
movq 0x10(%rbp), %r9
callq 0x6f5a0
movl -0x14(%rbp), %eax
andl $-0x2, %eax
movl %eax, -0x14(%rbp)
jmp 0x6f427
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x20(%rbp), %rdx
movq -0x28(%rbp), %rcx
movq -0x30(%rbp), %r8
movq 0x10(%rbp), %r9
callq 0x6f8a0
movl -0x14(%rbp), %eax
andl $-0x2, %eax
movl %eax, -0x14(%rbp)
jmp 0x6f427
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x20(%rbp), %rdx
movq -0x28(%rbp), %rcx
movq -0x30(%rbp), %r8
movq 0x10(%rbp), %r9
callq 0x6fd20
movl -0x14(%rbp), %eax
andl $-0x2, %eax
movl %eax, -0x14(%rbp)
jmp 0x6f427
jmp 0x6f0d8
movl -0x14(%rbp), %eax
andl $0x1, %eax
cmpl $0x0, %eax
je 0x6f144
movq -0x8(%rbp), %rax
movq (%rax), %rdi
movq -0x20(%rbp), %rsi
movq -0x28(%rbp), %rdx
callq 0x61420
cmpl $0x0, %eax
je 0x6f142
movq -0x10(%rbp), %rax
movq %rax, -0x78(%rbp)
movq -0x40(%rbp), %rdi
callq 0x86630
movl %eax, -0x6c(%rbp)
movq -0x40(%rbp), %rdi
callq 0x86660
movq %rax, -0x68(%rbp)
movq -0x40(%rbp), %rdi
callq 0x86900
movq -0x78(%rbp), %rdi
movl -0x6c(%rbp), %esi
movq -0x68(%rbp), %rdx
movq %rax, %rcx
movq -0x30(%rbp), %r8
callq 0x65970
jmp 0x6f427
jmp 0x6f144
movl -0x14(%rbp), %eax
andl $0x2, %eax
cmpl $0x0, %eax
jne 0x6f15c
movq -0x8(%rbp), %rax
movb $0x1, 0x30(%rax)
jmp 0x6f441
jmp 0x6f15e
cmpl $0x0, -0x48(%rbp)
jne 0x6f1ce
movq -0x8(%rbp), %rax
movq (%rax), %rdi
callq 0x61a40
cmpb $0x0, %al
je 0x6f1ce
movq -0x8(%rbp), %rax
movb $0x1, 0x30(%rax)
movq -0x10(%rbp), %rax
movq %rax, -0x90(%rbp)
movq -0x40(%rbp), %rdi
callq 0x86630
movl %eax, -0x84(%rbp)
movq -0x40(%rbp), %rdi
callq 0x86660
movq %rax, -0x80(%rbp)
movq -0x40(%rbp), %rdi
callq 0x86900
movq -0x90(%rbp), %rdi
movl -0x84(%rbp), %esi
movq -0x80(%rbp), %rdx
movq %rax, %rcx
movq -0x30(%rbp), %r8
callq 0x65970
jmp 0x6f427
movq -0x40(%rbp), %rdi
callq 0x86530
cmpl $0x0, %eax
je 0x6f247
movq -0x40(%rbp), %rdi
callq 0x614b0
movq %rax, -0x38(%rbp)
cmpq $0x0, %rax
jne 0x6f247
movq -0x10(%rbp), %rax
movq %rax, -0xa8(%rbp)
movq -0x40(%rbp), %rdi
callq 0x86630
movl %eax, -0x9c(%rbp)
movq -0x40(%rbp), %rdi
callq 0x86660
movq %rax, -0x98(%rbp)
movq -0x40(%rbp), %rdi
callq 0x86900
movq -0xa8(%rbp), %rdi
movl -0x9c(%rbp), %esi
movq -0x98(%rbp), %rdx
movq %rax, %rcx
movq -0x30(%rbp), %r8
callq 0x65970
jmp 0x6f427
cmpb $0x0, 0x44b233(%rip) # 0x4ba481
jne 0x6f370
cmpq $0x0, -0x38(%rbp)
je 0x6f2b3
movq -0x38(%rbp), %rdi
callq 0x864d0
movq %rax, -0x50(%rbp)
movq -0x38(%rbp), %rdi
callq 0x86470
movl %eax, -0x54(%rbp)
cmpb $0x0, 0x44c397(%rip) # 0x4bb612
je 0x6f28d
movq -0x30(%rbp), %rdi
movq -0x50(%rbp), %rsi
movl -0x54(%rbp), %edx
callq 0x6e870
cmpb $0x0, 0x44c37c(%rip) # 0x4bb610
jne 0x6f2a6
movq -0x30(%rbp), %rdi
movq -0x50(%rbp), %rsi
movl -0x54(%rbp), %edx
callq 0x6ee00
movq -0x30(%rbp), %rdi
movq -0x38(%rbp), %rsi
callq 0x6e4d0
cmpb $0x0, 0x290256(%rip) # 0x2ff510
jne 0x6f2f6
movq -0x30(%rbp), %rax
movq %rax, -0xb8(%rbp)
movq -0x40(%rbp), %rdi
callq 0x86550
movq %rax, -0xb0(%rbp)
movq -0x40(%rbp), %rdi
callq 0x866a0
movq -0xb8(%rbp), %rdi
movq -0xb0(%rbp), %rsi
movq %rax, %rdx
callq 0x6ed50
cmpb $0x0, 0x44c316(%rip) # 0x4bb613
je 0x6f30c
movq -0x30(%rbp), %rdi
movq -0x40(%rbp), %rsi
callq 0x6fdf0
cmpb $0x0, 0x44b195(%rip) # 0x4ba4a8
jne 0x6f36e
movq -0x40(%rbp), %rdi
callq 0x866c0
cmpb $0x0, %al
jne 0x6f36e
movq 0x10(%rbp), %rdi
movq -0x40(%rbp), %rsi
callq 0x6ee90
cmpl $0x0, %eax
jne 0x6f33f
movq 0x10(%rbp), %rax
cmpq $0x0, 0x8(%rax)
je 0x6f36c
movq -0x30(%rbp), %rdi
leaq 0xde21a(%rip), %rsi # 0x14d564
movl $0xa, %edx
callq 0xc5f40
movq -0x30(%rbp), %rdi
movq 0x10(%rbp), %rax
movq (%rax), %rsi
movq 0x10(%rbp), %rax
movq 0x8(%rax), %rdx
callq 0xc5f40
jmp 0x6f36e
jmp 0x6f370
cmpq $0x0, -0x38(%rbp)
je 0x6f388
movq -0x38(%rbp), %rdi
callq 0x61520
movq $0x0, -0x38(%rbp)
movl -0x48(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x48(%rbp)
movq -0x40(%rbp), %rdi
callq 0x61fe0
movl %eax, -0x44(%rbp)
cmpl $0x0, %eax
setne %al
xorb $-0x1, %al
testb $0x1, %al
jne 0x6f15e
cmpl $0x0, -0x44(%rbp)
jle 0x6f408
movq -0x10(%rbp), %rax
movq %rax, -0xd0(%rbp)
movq -0x40(%rbp), %rdi
callq 0x86630
movl %eax, -0xc4(%rbp)
movq -0x40(%rbp), %rdi
callq 0x86660
movq %rax, -0xc0(%rbp)
movq -0x40(%rbp), %rdi
callq 0x86900
movq -0xd0(%rbp), %rdi
movl -0xc4(%rbp), %esi
movq -0xc0(%rbp), %rdx
movq %rax, %rcx
movq -0x30(%rbp), %r8
callq 0x65970
jmp 0x6f427
jmp 0x6f40a
jmp 0x6f40c
movq -0x10(%rbp), %rdi
callq 0x689a0
movq -0x8(%rbp), %rdi
movq -0x30(%rbp), %rsi
callq 0x6ff30
callq 0x62f10
movq -0x8(%rbp), %rax
movb $0x0, 0x30(%rax)
movq -0x40(%rbp), %rdi
callq 0x86630
movl %eax, %edi
callq 0x652d0
jmp 0x6f441
addq $0xd0, %rsp
popq %rbp
retq
nopw (%rax,%rax)
|
_Z16run_query_normalP13st_connectionP10st_commandiPKcmP17st_dynamic_stringS6_:
push rbp
mov rbp, rsp
sub rsp, 0D0h
mov rax, [rbp+arg_0]
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov [rbp+var_14], edx
mov [rbp+var_20], rcx
mov [rbp+var_28], r8
mov [rbp+var_30], r9
mov [rbp+var_38], 0
mov rax, [rbp+var_8]
mov rax, [rax]
mov [rbp+var_40], rax
mov [rbp+var_44], 0
mov [rbp+var_48], 0
jmp short $+2
loc_6EFD9:
jmp short $+2
loc_6EFDB:
jmp short $+2
loc_6EFDD:
cmp [rbp+var_40], 0
jnz short loc_6EFFA
mov rdi, [rbp+var_10]
mov rsi, [rbp+var_8]
mov rdx, [rbp+var_30]
call _ZL27handle_no_active_connectionP10st_commandP13st_connectionP17st_dynamic_string; handle_no_active_connection(st_command *,st_connection *,st_dynamic_string *)
jmp loc_6F441
loc_6EFFA:
mov rax, [rbp+var_10]
mov eax, [rax+110h]
add eax, 0FFFFFF9Bh; switch 4 cases
mov ecx, eax
mov [rbp+var_60], rcx
sub eax, 3
ja def_6F028; jumptable 000000000006F028 default case
mov rax, [rbp+var_60]
lea rcx, jpt_6F028
movsxd rax, ds:(jpt_6F028 - 14B0A4h)[rcx+rax*4]
add rax, rcx
jmp rax; switch jump
loc_6F02A:
mov rdi, [rbp+var_8]; jumptable 000000000006F028 case 101
mov rsi, [rbp+var_10]
mov rdx, [rbp+var_20]
mov rcx, [rbp+var_28]
mov r8, [rbp+var_30]
mov r9, [rbp+arg_0]
call _Z16run_prepare_stmtP13st_connectionP10st_commandPKcmP17st_dynamic_stringS6_; run_prepare_stmt(st_connection *,st_command *,char const*,ulong,st_dynamic_string *,st_dynamic_string *)
mov eax, [rbp+var_14]
and eax, 0FFFFFFFEh
mov [rbp+var_14], eax
jmp loc_6F427
loc_6F055:
mov rdi, [rbp+var_8]; jumptable 000000000006F028 case 102
mov rsi, [rbp+var_10]
mov rdx, [rbp+var_20]
mov rcx, [rbp+var_28]
mov r8, [rbp+var_30]
mov r9, [rbp+arg_0]
call _Z13run_bind_stmtP13st_connectionP10st_commandPKcmP17st_dynamic_stringS6_; run_bind_stmt(st_connection *,st_command *,char const*,ulong,st_dynamic_string *,st_dynamic_string *)
mov eax, [rbp+var_14]
and eax, 0FFFFFFFEh
mov [rbp+var_14], eax
jmp loc_6F427
loc_6F080:
mov rdi, [rbp+var_8]; jumptable 000000000006F028 case 103
mov rsi, [rbp+var_10]
mov rdx, [rbp+var_20]
mov rcx, [rbp+var_28]
mov r8, [rbp+var_30]
mov r9, [rbp+arg_0]
call _Z16run_execute_stmtP13st_connectionP10st_commandPKcmP17st_dynamic_stringS6_; run_execute_stmt(st_connection *,st_command *,char const*,ulong,st_dynamic_string *,st_dynamic_string *)
mov eax, [rbp+var_14]
and eax, 0FFFFFFFEh
mov [rbp+var_14], eax
jmp loc_6F427
loc_6F0AB:
mov rdi, [rbp+var_8]; jumptable 000000000006F028 case 104
mov rsi, [rbp+var_10]
mov rdx, [rbp+var_20]
mov rcx, [rbp+var_28]
mov r8, [rbp+var_30]
mov r9, [rbp+arg_0]
call _Z14run_close_stmtP13st_connectionP10st_commandPKcmP17st_dynamic_stringS6_; run_close_stmt(st_connection *,st_command *,char const*,ulong,st_dynamic_string *,st_dynamic_string *)
mov eax, [rbp+var_14]
and eax, 0FFFFFFFEh
mov [rbp+var_14], eax
jmp loc_6F427
def_6F028:
jmp short $+2; jumptable 000000000006F028 default case
loc_6F0D8:
mov eax, [rbp+var_14]
and eax, 1
cmp eax, 0
jz short loc_6F144
mov rax, [rbp+var_8]
mov rdi, [rax]
mov rsi, [rbp+var_20]
mov rdx, [rbp+var_28]
call _Z21wrap_mysql_send_queryP8st_mysqlPKcm; wrap_mysql_send_query(st_mysql *,char const*,ulong)
cmp eax, 0
jz short loc_6F142
mov rax, [rbp+var_10]
mov [rbp+var_78], rax
mov rdi, [rbp+var_40]
call mysql_errno
mov [rbp+var_6C], eax
mov rdi, [rbp+var_40]
call mysql_error
mov [rbp+var_68], rax
mov rdi, [rbp+var_40]
call mysql_sqlstate
mov rdi, [rbp+var_78]
mov esi, [rbp+var_6C]
mov rdx, [rbp+var_68]
mov rcx, rax
mov r8, [rbp+var_30]
call _Z12handle_errorP10st_commandjPKcS2_P17st_dynamic_string; handle_error(st_command *,uint,char const*,char const*,st_dynamic_string *)
jmp loc_6F427
loc_6F142:
jmp short $+2
loc_6F144:
mov eax, [rbp+var_14]
and eax, 2
cmp eax, 0
jnz short loc_6F15C
mov rax, [rbp+var_8]
mov byte ptr [rax+30h], 1
jmp loc_6F441
loc_6F15C:
jmp short $+2
loc_6F15E:
cmp [rbp+var_48], 0
jnz short loc_6F1CE
mov rax, [rbp+var_8]
mov rdi, [rax]
call _Z28wrap_mysql_read_query_resultP8st_mysql; wrap_mysql_read_query_result(st_mysql *)
cmp al, 0
jz short loc_6F1CE
mov rax, [rbp+var_8]
mov byte ptr [rax+30h], 1
mov rax, [rbp+var_10]
mov [rbp+var_90], rax
mov rdi, [rbp+var_40]
call mysql_errno
mov [rbp+var_84], eax
mov rdi, [rbp+var_40]
call mysql_error
mov [rbp+var_80], rax
mov rdi, [rbp+var_40]
call mysql_sqlstate
mov rdi, [rbp+var_90]
mov esi, [rbp+var_84]
mov rdx, [rbp+var_80]
mov rcx, rax
mov r8, [rbp+var_30]
call _Z12handle_errorP10st_commandjPKcS2_P17st_dynamic_string; handle_error(st_command *,uint,char const*,char const*,st_dynamic_string *)
jmp loc_6F427
loc_6F1CE:
mov rdi, [rbp+var_40]
call mysql_field_count
cmp eax, 0
jz short loc_6F247
mov rdi, [rbp+var_40]
call _Z23wrap_mysql_store_resultP8st_mysql; wrap_mysql_store_result(st_mysql *)
mov [rbp+var_38], rax
cmp rax, 0
jnz short loc_6F247
mov rax, [rbp+var_10]
mov [rbp+var_A8], rax
mov rdi, [rbp+var_40]
call mysql_errno
mov [rbp+var_9C], eax
mov rdi, [rbp+var_40]
call mysql_error
mov [rbp+var_98], rax
mov rdi, [rbp+var_40]
call mysql_sqlstate
mov rdi, [rbp+var_A8]
mov esi, [rbp+var_9C]
mov rdx, [rbp+var_98]
mov rcx, rax
mov r8, [rbp+var_30]
call _Z12handle_errorP10st_commandjPKcS2_P17st_dynamic_string; handle_error(st_command *,uint,char const*,char const*,st_dynamic_string *)
jmp loc_6F427
loc_6F247:
cmp cs:_ZL18disable_result_log, 0; disable_result_log
jnz loc_6F370
cmp [rbp+var_38], 0
jz short loc_6F2B3
mov rdi, [rbp+var_38]
call mysql_fetch_fields
mov [rbp+var_50], rax
mov rdi, [rbp+var_38]
call mysql_num_fields
mov [rbp+var_54], eax
cmp cs:_ZL16display_metadata, 0; display_metadata
jz short loc_6F28D
mov rdi, [rbp+var_30]
mov rsi, [rbp+var_50]
mov edx, [rbp+var_54]
call _Z15append_metadataP17st_dynamic_stringP14st_mysql_fieldj; append_metadata(st_dynamic_string *,st_mysql_field *,uint)
loc_6F28D:
cmp cs:_ZL25display_result_vertically, 0; display_result_vertically
jnz short loc_6F2A6
mov rdi, [rbp+var_30]
mov rsi, [rbp+var_50]
mov edx, [rbp+var_54]
call _Z21append_table_headingsP17st_dynamic_stringP14st_mysql_fieldj; append_table_headings(st_dynamic_string *,st_mysql_field *,uint)
loc_6F2A6:
mov rdi, [rbp+var_30]
mov rsi, [rbp+var_38]
call _Z13append_resultP17st_dynamic_stringP12st_mysql_res; append_result(st_dynamic_string *,st_mysql_res *)
loc_6F2B3:
cmp cs:_ZL12disable_info, 0; disable_info
jnz short loc_6F2F6
mov rax, [rbp+var_30]
mov [rbp+var_B8], rax
mov rdi, [rbp+var_40]
call mysql_affected_rows
mov [rbp+var_B0], rax
mov rdi, [rbp+var_40]
call mysql_info
mov rdi, [rbp+var_B8]
mov rsi, [rbp+var_B0]
mov rdx, rax
call _Z11append_infoP17st_dynamic_stringyPKc; append_info(st_dynamic_string *,ulong long,char const*)
loc_6F2F6:
cmp cs:_ZL26display_session_track_info, 0; display_session_track_info
jz short loc_6F30C
mov rdi, [rbp+var_30]
mov rsi, [rbp+var_40]
call _ZL25append_session_track_infoP17st_dynamic_stringP8st_mysql; append_session_track_info(st_dynamic_string *,st_mysql *)
loc_6F30C:
cmp cs:_ZL16disable_warnings, 0; disable_warnings
jnz short loc_6F36E
mov rdi, [rbp+var_40]
call mysql_more_results
cmp al, 0
jnz short loc_6F36E
mov rdi, [rbp+arg_0]
mov rsi, [rbp+var_40]
call _Z15append_warningsP17st_dynamic_stringP8st_mysql; append_warnings(st_dynamic_string *,st_mysql *)
cmp eax, 0
jnz short loc_6F33F
mov rax, [rbp+arg_0]
cmp qword ptr [rax+8], 0
jz short loc_6F36C
loc_6F33F:
mov rdi, [rbp+var_30]
lea rsi, aWarnings; "Warnings:\n"
mov edx, 0Ah
call dynstr_append_mem
mov rdi, [rbp+var_30]
mov rax, [rbp+arg_0]
mov rsi, [rax]
mov rax, [rbp+arg_0]
mov rdx, [rax+8]
call dynstr_append_mem
loc_6F36C:
jmp short $+2
loc_6F36E:
jmp short $+2
loc_6F370:
cmp [rbp+var_38], 0
jz short loc_6F388
mov rdi, [rbp+var_38]
call _Z22wrap_mysql_free_resultP12st_mysql_res; wrap_mysql_free_result(st_mysql_res *)
mov [rbp+var_38], 0
loc_6F388:
mov eax, [rbp+var_48]
add eax, 1
mov [rbp+var_48], eax
mov rdi, [rbp+var_40]
call _Z22wrap_mysql_next_resultP8st_mysql; wrap_mysql_next_result(st_mysql *)
mov [rbp+var_44], eax
cmp eax, 0
setnz al
xor al, 0FFh
test al, 1
jnz loc_6F15E
cmp [rbp+var_44], 0
jle short loc_6F408
mov rax, [rbp+var_10]
mov [rbp+var_D0], rax
mov rdi, [rbp+var_40]
call mysql_errno
mov [rbp+var_C4], eax
mov rdi, [rbp+var_40]
call mysql_error
mov [rbp+var_C0], rax
mov rdi, [rbp+var_40]
call mysql_sqlstate
mov rdi, [rbp+var_D0]
mov esi, [rbp+var_C4]
mov rdx, [rbp+var_C0]
mov rcx, rax
mov r8, [rbp+var_30]
call _Z12handle_errorP10st_commandjPKcS2_P17st_dynamic_string; handle_error(st_command *,uint,char const*,char const*,st_dynamic_string *)
jmp short loc_6F427
loc_6F408:
jmp short $+2
loc_6F40A:
jmp short $+2
loc_6F40C:
mov rdi, [rbp+var_10]
call _Z15handle_no_errorP10st_command; handle_no_error(st_command *)
mov rdi, [rbp+var_8]
mov rsi, [rbp+var_30]
call _Z23display_optimizer_traceP13st_connectionP17st_dynamic_string; display_optimizer_trace(st_connection *,st_dynamic_string *)
call _Z17revert_propertiesv; revert_properties(void)
loc_6F427:
mov rax, [rbp+var_8]
mov byte ptr [rax+30h], 0
mov rdi, [rbp+var_40]
call mysql_errno
mov edi, eax; int
call _Z13var_set_errnoi; var_set_errno(int)
jmp short $+2
loc_6F441:
add rsp, 0D0h
pop rbp
retn
|
long long run_query_normal(long long a1, long long a2, char a3, long long a4, long long a5, long long a6, _QWORD *a7)
{
long long result; // rax
const char *v8; // rax
int v9; // r9d
const char *v10; // rax
int v11; // r9d
const char *v12; // rax
int v13; // r9d
long long v14; // rax
const char *v15; // rax
int v16; // r9d
long long v17; // rdx
long long v18; // rcx
int v19; // r8d
int v20; // r9d
unsigned int v21; // eax
long long v22; // rdx
long long v23; // rcx
int v24; // r8d
int v25; // r9d
unsigned int v26; // [rsp+Ch] [rbp-C4h]
const char *v27; // [rsp+10h] [rbp-C0h]
long long v28; // [rsp+20h] [rbp-B0h]
unsigned int v29; // [rsp+34h] [rbp-9Ch]
const char *v30; // [rsp+38h] [rbp-98h]
unsigned int v31; // [rsp+4Ch] [rbp-84h]
const char *v32; // [rsp+50h] [rbp-80h]
unsigned int v33; // [rsp+64h] [rbp-6Ch]
const char *v34; // [rsp+68h] [rbp-68h]
unsigned int v35; // [rsp+7Ch] [rbp-54h]
long long fields; // [rsp+80h] [rbp-50h]
int v37; // [rsp+88h] [rbp-48h]
int v38; // [rsp+8Ch] [rbp-44h]
long long v39; // [rsp+90h] [rbp-40h]
long long v40; // [rsp+98h] [rbp-38h]
const char *v43; // [rsp+C0h] [rbp-10h]
v43 = (const char *)a2;
v40 = 0LL;
v39 = *(_QWORD *)a1;
v37 = 0;
if ( !*(_QWORD *)a1 )
return handle_no_active_connection(a2, a1, a6);
switch ( *(_DWORD *)(a2 + 272) )
{
case 'e':
run_prepare_stmt(a1, a2, a4, a5, a6, a7);
goto LABEL_41;
case 'f':
run_bind_stmt(a1, a2, a4, a5, a6, a7);
goto LABEL_41;
case 'g':
run_execute_stmt(a1, a2, a4, a5, a6, a7);
goto LABEL_41;
case 'h':
run_close_stmt(a1, a2, a4, a5, a6, a7);
goto LABEL_41;
default:
if ( (a3 & 1) != 0 && (unsigned int)wrap_mysql_send_query(*(_QWORD *)a1, a4, a5) )
{
v33 = mysql_errno(v39);
v34 = (const char *)mysql_error(v39);
v8 = (const char *)mysql_sqlstate(v39);
a2 = v33;
handle_error(v43, v33, v34, v8, a6, v9);
goto LABEL_41;
}
if ( (a3 & 2) == 0 )
{
result = a1;
*(_BYTE *)(a1 + 48) = 1;
return result;
}
break;
}
do
{
if ( !v37 && wrap_mysql_read_query_result(*(_QWORD *)a1) )
{
*(_BYTE *)(a1 + 48) = 1;
v31 = mysql_errno(v39);
v32 = (const char *)mysql_error(v39);
v10 = (const char *)mysql_sqlstate(v39);
a2 = v31;
handle_error(v43, v31, v32, v10, a6, v11);
goto LABEL_41;
}
if ( (unsigned int)mysql_field_count(v39) )
{
v40 = wrap_mysql_store_result(v39);
if ( !v40 )
{
v29 = mysql_errno(v39);
v30 = (const char *)mysql_error(v39);
v12 = (const char *)mysql_sqlstate(v39);
a2 = v29;
handle_error(v43, v29, v30, v12, a6, v13);
goto LABEL_41;
}
}
if ( !disable_result_log )
{
if ( v40 )
{
fields = mysql_fetch_fields(v40);
v35 = mysql_num_fields(v40);
if ( display_metadata )
append_metadata(a6, fields, v35);
if ( !display_result_vertically )
append_table_headings(a6, fields, v35);
append_result(a6, v40);
}
if ( !disable_info )
{
v28 = mysql_affected_rows(v39);
v14 = mysql_info(v39);
append_info(a6, v28, v14);
}
if ( display_session_track_info )
append_session_track_info(a6, v39);
if ( !disable_warnings
&& !(unsigned __int8)mysql_more_results(v39)
&& ((unsigned int)append_warnings((long long)a7, v39) || a7[1]) )
{
dynstr_append_mem(a6, "Warnings:\n", 10LL);
dynstr_append_mem(a6, *a7, a7[1]);
}
}
if ( v40 )
{
wrap_mysql_free_result(v40);
v40 = 0LL;
}
++v37;
v38 = wrap_mysql_next_result(v39);
}
while ( !v38 );
if ( v38 <= 0 )
{
handle_no_error((const char **)a2);
a2 = a6;
display_optimizer_trace(a1, a6);
revert_properties(a1, a6, v17, v18, v19, v20);
}
else
{
v26 = mysql_errno(v39);
v27 = (const char *)mysql_error(v39);
v15 = (const char *)mysql_sqlstate(v39);
a2 = v26;
handle_error(v43, v26, v27, v15, a6, v16);
}
LABEL_41:
*(_BYTE *)(a1 + 48) = 0;
v21 = mysql_errno(v39);
return var_set_errno(v21, a2, v22, v23, v24, v25);
}
|
run_query_normal:
PUSH RBP
MOV RBP,RSP
SUB RSP,0xd0
MOV RAX,qword ptr [RBP + 0x10]
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV dword ptr [RBP + -0x14],EDX
MOV qword ptr [RBP + -0x20],RCX
MOV qword ptr [RBP + -0x28],R8
MOV qword ptr [RBP + -0x30],R9
MOV qword ptr [RBP + -0x38],0x0
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x40],RAX
MOV dword ptr [RBP + -0x44],0x0
MOV dword ptr [RBP + -0x48],0x0
JMP 0x0016efd9
LAB_0016efd9:
JMP 0x0016efdb
LAB_0016efdb:
JMP 0x0016efdd
LAB_0016efdd:
CMP qword ptr [RBP + -0x40],0x0
JNZ 0x0016effa
MOV RDI,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RBP + -0x8]
MOV RDX,qword ptr [RBP + -0x30]
CALL 0x00165920
JMP 0x0016f441
LAB_0016effa:
MOV RAX,qword ptr [RBP + -0x10]
MOV EAX,dword ptr [RAX + 0x110]
ADD EAX,-0x65
MOV ECX,EAX
MOV qword ptr [RBP + -0x60],RCX
SUB EAX,0x3
JA 0x0016f0d6
MOV RAX,qword ptr [RBP + -0x60]
LEA RCX,[0x24b0a4]
MOVSXD RAX,dword ptr [RCX + RAX*0x4]
ADD RAX,RCX
switchD:
JMP RAX
caseD_65:
MOV RDI,qword ptr [RBP + -0x8]
MOV RSI,qword ptr [RBP + -0x10]
MOV RDX,qword ptr [RBP + -0x20]
MOV RCX,qword ptr [RBP + -0x28]
MOV R8,qword ptr [RBP + -0x30]
MOV R9,qword ptr [RBP + 0x10]
CALL 0x0016f450
MOV EAX,dword ptr [RBP + -0x14]
AND EAX,0xfffffffe
MOV dword ptr [RBP + -0x14],EAX
JMP 0x0016f427
caseD_66:
MOV RDI,qword ptr [RBP + -0x8]
MOV RSI,qword ptr [RBP + -0x10]
MOV RDX,qword ptr [RBP + -0x20]
MOV RCX,qword ptr [RBP + -0x28]
MOV R8,qword ptr [RBP + -0x30]
MOV R9,qword ptr [RBP + 0x10]
CALL 0x0016f5a0
MOV EAX,dword ptr [RBP + -0x14]
AND EAX,0xfffffffe
MOV dword ptr [RBP + -0x14],EAX
JMP 0x0016f427
caseD_67:
MOV RDI,qword ptr [RBP + -0x8]
MOV RSI,qword ptr [RBP + -0x10]
MOV RDX,qword ptr [RBP + -0x20]
MOV RCX,qword ptr [RBP + -0x28]
MOV R8,qword ptr [RBP + -0x30]
MOV R9,qword ptr [RBP + 0x10]
CALL 0x0016f8a0
MOV EAX,dword ptr [RBP + -0x14]
AND EAX,0xfffffffe
MOV dword ptr [RBP + -0x14],EAX
JMP 0x0016f427
caseD_68:
MOV RDI,qword ptr [RBP + -0x8]
MOV RSI,qword ptr [RBP + -0x10]
MOV RDX,qword ptr [RBP + -0x20]
MOV RCX,qword ptr [RBP + -0x28]
MOV R8,qword ptr [RBP + -0x30]
MOV R9,qword ptr [RBP + 0x10]
CALL 0x0016fd20
MOV EAX,dword ptr [RBP + -0x14]
AND EAX,0xfffffffe
MOV dword ptr [RBP + -0x14],EAX
JMP 0x0016f427
default:
JMP 0x0016f0d8
LAB_0016f0d8:
MOV EAX,dword ptr [RBP + -0x14]
AND EAX,0x1
CMP EAX,0x0
JZ 0x0016f144
MOV RAX,qword ptr [RBP + -0x8]
MOV RDI,qword ptr [RAX]
MOV RSI,qword ptr [RBP + -0x20]
MOV RDX,qword ptr [RBP + -0x28]
CALL 0x00161420
CMP EAX,0x0
JZ 0x0016f142
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RBP + -0x78],RAX
MOV RDI,qword ptr [RBP + -0x40]
CALL 0x00186630
MOV dword ptr [RBP + -0x6c],EAX
MOV RDI,qword ptr [RBP + -0x40]
CALL 0x00186660
MOV qword ptr [RBP + -0x68],RAX
MOV RDI,qword ptr [RBP + -0x40]
CALL 0x00186900
MOV RDI,qword ptr [RBP + -0x78]
MOV ESI,dword ptr [RBP + -0x6c]
MOV RDX,qword ptr [RBP + -0x68]
MOV RCX,RAX
MOV R8,qword ptr [RBP + -0x30]
CALL 0x00165970
JMP 0x0016f427
LAB_0016f142:
JMP 0x0016f144
LAB_0016f144:
MOV EAX,dword ptr [RBP + -0x14]
AND EAX,0x2
CMP EAX,0x0
JNZ 0x0016f15c
MOV RAX,qword ptr [RBP + -0x8]
MOV byte ptr [RAX + 0x30],0x1
JMP 0x0016f441
LAB_0016f15c:
JMP 0x0016f15e
LAB_0016f15e:
CMP dword ptr [RBP + -0x48],0x0
JNZ 0x0016f1ce
MOV RAX,qword ptr [RBP + -0x8]
MOV RDI,qword ptr [RAX]
CALL 0x00161a40
CMP AL,0x0
JZ 0x0016f1ce
MOV RAX,qword ptr [RBP + -0x8]
MOV byte ptr [RAX + 0x30],0x1
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RBP + -0x90],RAX
MOV RDI,qword ptr [RBP + -0x40]
CALL 0x00186630
MOV dword ptr [RBP + -0x84],EAX
MOV RDI,qword ptr [RBP + -0x40]
CALL 0x00186660
MOV qword ptr [RBP + -0x80],RAX
MOV RDI,qword ptr [RBP + -0x40]
CALL 0x00186900
MOV RDI,qword ptr [RBP + -0x90]
MOV ESI,dword ptr [RBP + -0x84]
MOV RDX,qword ptr [RBP + -0x80]
MOV RCX,RAX
MOV R8,qword ptr [RBP + -0x30]
CALL 0x00165970
JMP 0x0016f427
LAB_0016f1ce:
MOV RDI,qword ptr [RBP + -0x40]
CALL 0x00186530
CMP EAX,0x0
JZ 0x0016f247
MOV RDI,qword ptr [RBP + -0x40]
CALL 0x001614b0
MOV qword ptr [RBP + -0x38],RAX
CMP RAX,0x0
JNZ 0x0016f247
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RBP + -0xa8],RAX
MOV RDI,qword ptr [RBP + -0x40]
CALL 0x00186630
MOV dword ptr [RBP + -0x9c],EAX
MOV RDI,qword ptr [RBP + -0x40]
CALL 0x00186660
MOV qword ptr [RBP + -0x98],RAX
MOV RDI,qword ptr [RBP + -0x40]
CALL 0x00186900
MOV RDI,qword ptr [RBP + -0xa8]
MOV ESI,dword ptr [RBP + -0x9c]
MOV RDX,qword ptr [RBP + -0x98]
MOV RCX,RAX
MOV R8,qword ptr [RBP + -0x30]
CALL 0x00165970
JMP 0x0016f427
LAB_0016f247:
CMP byte ptr [0x005ba481],0x0
JNZ 0x0016f370
CMP qword ptr [RBP + -0x38],0x0
JZ 0x0016f2b3
MOV RDI,qword ptr [RBP + -0x38]
CALL 0x001864d0
MOV qword ptr [RBP + -0x50],RAX
MOV RDI,qword ptr [RBP + -0x38]
CALL 0x00186470
MOV dword ptr [RBP + -0x54],EAX
CMP byte ptr [0x005bb612],0x0
JZ 0x0016f28d
MOV RDI,qword ptr [RBP + -0x30]
MOV RSI,qword ptr [RBP + -0x50]
MOV EDX,dword ptr [RBP + -0x54]
CALL 0x0016e870
LAB_0016f28d:
CMP byte ptr [0x005bb610],0x0
JNZ 0x0016f2a6
MOV RDI,qword ptr [RBP + -0x30]
MOV RSI,qword ptr [RBP + -0x50]
MOV EDX,dword ptr [RBP + -0x54]
CALL 0x0016ee00
LAB_0016f2a6:
MOV RDI,qword ptr [RBP + -0x30]
MOV RSI,qword ptr [RBP + -0x38]
CALL 0x0016e4d0
LAB_0016f2b3:
CMP byte ptr [0x003ff510],0x0
JNZ 0x0016f2f6
MOV RAX,qword ptr [RBP + -0x30]
MOV qword ptr [RBP + -0xb8],RAX
MOV RDI,qword ptr [RBP + -0x40]
CALL 0x00186550
MOV qword ptr [RBP + -0xb0],RAX
MOV RDI,qword ptr [RBP + -0x40]
CALL 0x001866a0
MOV RDI,qword ptr [RBP + -0xb8]
MOV RSI,qword ptr [RBP + -0xb0]
MOV RDX,RAX
CALL 0x0016ed50
LAB_0016f2f6:
CMP byte ptr [0x005bb613],0x0
JZ 0x0016f30c
MOV RDI,qword ptr [RBP + -0x30]
MOV RSI,qword ptr [RBP + -0x40]
CALL 0x0016fdf0
LAB_0016f30c:
CMP byte ptr [0x005ba4a8],0x0
JNZ 0x0016f36e
MOV RDI,qword ptr [RBP + -0x40]
CALL 0x001866c0
CMP AL,0x0
JNZ 0x0016f36e
MOV RDI,qword ptr [RBP + 0x10]
MOV RSI,qword ptr [RBP + -0x40]
CALL 0x0016ee90
CMP EAX,0x0
JNZ 0x0016f33f
MOV RAX,qword ptr [RBP + 0x10]
CMP qword ptr [RAX + 0x8],0x0
JZ 0x0016f36c
LAB_0016f33f:
MOV RDI,qword ptr [RBP + -0x30]
LEA RSI,[0x24d564]
MOV EDX,0xa
CALL 0x001c5f40
MOV RDI,qword ptr [RBP + -0x30]
MOV RAX,qword ptr [RBP + 0x10]
MOV RSI,qword ptr [RAX]
MOV RAX,qword ptr [RBP + 0x10]
MOV RDX,qword ptr [RAX + 0x8]
CALL 0x001c5f40
LAB_0016f36c:
JMP 0x0016f36e
LAB_0016f36e:
JMP 0x0016f370
LAB_0016f370:
CMP qword ptr [RBP + -0x38],0x0
JZ 0x0016f388
MOV RDI,qword ptr [RBP + -0x38]
CALL 0x00161520
MOV qword ptr [RBP + -0x38],0x0
LAB_0016f388:
MOV EAX,dword ptr [RBP + -0x48]
ADD EAX,0x1
MOV dword ptr [RBP + -0x48],EAX
MOV RDI,qword ptr [RBP + -0x40]
CALL 0x00161fe0
MOV dword ptr [RBP + -0x44],EAX
CMP EAX,0x0
SETNZ AL
XOR AL,0xff
TEST AL,0x1
JNZ 0x0016f15e
CMP dword ptr [RBP + -0x44],0x0
JLE 0x0016f408
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RBP + -0xd0],RAX
MOV RDI,qword ptr [RBP + -0x40]
CALL 0x00186630
MOV dword ptr [RBP + -0xc4],EAX
MOV RDI,qword ptr [RBP + -0x40]
CALL 0x00186660
MOV qword ptr [RBP + -0xc0],RAX
MOV RDI,qword ptr [RBP + -0x40]
CALL 0x00186900
MOV RDI,qword ptr [RBP + -0xd0]
MOV ESI,dword ptr [RBP + -0xc4]
MOV RDX,qword ptr [RBP + -0xc0]
MOV RCX,RAX
MOV R8,qword ptr [RBP + -0x30]
CALL 0x00165970
JMP 0x0016f427
LAB_0016f408:
JMP 0x0016f40a
LAB_0016f40a:
JMP 0x0016f40c
LAB_0016f40c:
MOV RDI,qword ptr [RBP + -0x10]
CALL 0x001689a0
MOV RDI,qword ptr [RBP + -0x8]
MOV RSI,qword ptr [RBP + -0x30]
CALL 0x0016ff30
CALL 0x00162f10
LAB_0016f427:
MOV RAX,qword ptr [RBP + -0x8]
MOV byte ptr [RAX + 0x30],0x0
MOV RDI,qword ptr [RBP + -0x40]
CALL 0x00186630
MOV EDI,EAX
CALL 0x001652d0
JMP 0x0016f441
LAB_0016f441:
ADD RSP,0xd0
POP RBP
RET
|
/* run_query_normal(st_connection*, st_command*, int, char const*, unsigned long,
st_dynamic_string*, st_dynamic_string*) */
void run_query_normal(st_connection *param_1,st_command *param_2,int param_3,char *param_4,
ulong param_5,st_dynamic_string *param_6,st_dynamic_string *param_7)
{
st_mysql *psVar1;
char cVar2;
int iVar3;
uint uVar4;
char *pcVar5;
char *pcVar6;
st_mysql_field *psVar7;
ulonglong uVar8;
int local_50;
st_mysql_res *local_40;
local_40 = (st_mysql_res *)0x0;
psVar1 = *(st_mysql **)param_1;
local_50 = 0;
if (psVar1 == (st_mysql *)0x0) {
handle_no_active_connection(param_2,param_1,param_6);
}
else {
switch(*(int4 *)(param_2 + 0x110)) {
case 0x65:
run_prepare_stmt(param_1,param_2,param_4,param_5,param_6,param_7);
break;
case 0x66:
run_bind_stmt(param_1,param_2,param_4,param_5,param_6,param_7);
break;
case 0x67:
run_execute_stmt(param_1,param_2,param_4,param_5,param_6,param_7);
break;
case 0x68:
run_close_stmt(param_1,param_2,param_4,param_5,param_6,param_7);
break;
default:
if (((param_3 & 1U) == 0) ||
(iVar3 = wrap_mysql_send_query(*(st_mysql **)param_1,param_4,param_5), iVar3 == 0)) {
if ((param_3 & 2U) == 0) {
param_1[0x30] = (st_connection)0x1;
return;
}
do {
if ((local_50 == 0) &&
(cVar2 = wrap_mysql_read_query_result(*(st_mysql **)param_1), cVar2 != '\0')) {
param_1[0x30] = (st_connection)0x1;
uVar4 = mysql_errno(psVar1);
pcVar5 = (char *)mysql_error(psVar1);
pcVar6 = (char *)mysql_sqlstate(psVar1);
handle_error(param_2,uVar4,pcVar5,pcVar6,param_6);
goto LAB_0016f427;
}
iVar3 = mysql_field_count(psVar1);
if ((iVar3 != 0) &&
(local_40 = (st_mysql_res *)wrap_mysql_store_result(psVar1),
local_40 == (st_mysql_res *)0x0)) {
uVar4 = mysql_errno(psVar1);
pcVar5 = (char *)mysql_error(psVar1);
pcVar6 = (char *)mysql_sqlstate(psVar1);
handle_error(param_2,uVar4,pcVar5,pcVar6,param_6);
goto LAB_0016f427;
}
if (disable_result_log == '\0') {
if (local_40 != (st_mysql_res *)0x0) {
psVar7 = (st_mysql_field *)mysql_fetch_fields(local_40);
uVar4 = mysql_num_fields(local_40);
if (display_metadata != '\0') {
append_metadata(param_6,psVar7,uVar4);
}
if (display_result_vertically == '\0') {
append_table_headings(param_6,psVar7,uVar4);
}
append_result(param_6,local_40);
}
if (disable_info == '\0') {
uVar8 = mysql_affected_rows(psVar1);
pcVar5 = (char *)mysql_info(psVar1);
append_info(param_6,uVar8,pcVar5);
}
if (display_session_track_info != '\0') {
append_session_track_info(param_6,psVar1);
}
if (((disable_warnings == '\0') && (cVar2 = mysql_more_results(psVar1), cVar2 == '\0'))
&& ((iVar3 = append_warnings(param_7,psVar1), iVar3 != 0 ||
(*(long *)(param_7 + 8) != 0)))) {
dynstr_append_mem(param_6,"Warnings:\n",10);
dynstr_append_mem(param_6,*(int8 *)param_7,*(int8 *)(param_7 + 8));
}
}
if (local_40 != (st_mysql_res *)0x0) {
wrap_mysql_free_result(local_40);
local_40 = (st_mysql_res *)0x0;
}
local_50 = local_50 + 1;
iVar3 = wrap_mysql_next_result(psVar1);
} while (iVar3 == 0);
if (iVar3 < 1) {
handle_no_error(param_2);
display_optimizer_trace(param_1,param_6);
revert_properties();
}
else {
uVar4 = mysql_errno(psVar1);
pcVar5 = (char *)mysql_error(psVar1);
pcVar6 = (char *)mysql_sqlstate(psVar1);
handle_error(param_2,uVar4,pcVar5,pcVar6,param_6);
}
}
else {
uVar4 = mysql_errno(psVar1);
pcVar5 = (char *)mysql_error(psVar1);
pcVar6 = (char *)mysql_sqlstate(psVar1);
handle_error(param_2,uVar4,pcVar5,pcVar6,param_6);
}
}
LAB_0016f427:
param_1[0x30] = (st_connection)0x0;
iVar3 = mysql_errno(psVar1);
var_set_errno(iVar3);
}
return;
}
|
|
8,953 |
testing::internal::TestFactoryImpl<alaya::WorkerTest_Initialization_Test>::CreateTest()
|
AlayaLite/build_O3/_deps/googletest-src/googletest/include/gtest/internal/gtest-internal.h
|
Test* CreateTest() override { return new TestClass; }
|
O3
|
c
|
testing::internal::TestFactoryImpl<alaya::WorkerTest_Initialization_Test>::CreateTest():
pushq %r14
pushq %rbx
pushq %rax
movl $0x50, %edi
callq 0x11190
movq %rax, %rbx
movq %rax, %rdi
callq 0x61a0c
xorps %xmm0, %xmm0
movups %xmm0, 0x40(%rbx)
movups %xmm0, 0x30(%rbx)
movups %xmm0, 0x20(%rbx)
movups %xmm0, 0x10(%rbx)
leaq 0x84ee7(%rip), %rax # 0xb0a70
addq $0x10, %rax
movq %rax, (%rbx)
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
movq %rax, %r14
movl $0x50, %esi
movq %rbx, %rdi
callq 0x11120
movq %r14, %rdi
callq 0x11760
nop
|
_ZN7testing8internal15TestFactoryImplIN5alaya30WorkerTest_Initialization_TestEE10CreateTestEv:
push r14
push rbx
push rax
mov edi, 50h ; 'P'; unsigned __int64
call __Znwm; operator new(ulong)
mov rbx, rax
mov rdi, rax; this
call _ZN7testing4TestC2Ev; testing::Test::Test(void)
xorps xmm0, xmm0
movups xmmword ptr [rbx+40h], xmm0
movups xmmword ptr [rbx+30h], xmm0
movups xmmword ptr [rbx+20h], xmm0
movups xmmword ptr [rbx+10h], xmm0
lea rax, _ZTVN5alaya30WorkerTest_Initialization_TestE; `vtable for'alaya::WorkerTest_Initialization_Test
add rax, 10h
mov [rbx], rax
mov rax, rbx
add rsp, 8
pop rbx
pop r14
retn
mov r14, rax
mov esi, 50h ; 'P'; unsigned __int64
mov rdi, rbx; void *
call __ZdlPvm; operator delete(void *,ulong)
mov rdi, r14
call __Unwind_Resume
|
testing::Test *testing::internal::TestFactoryImpl<alaya::WorkerTest_Initialization_Test>::CreateTest()
{
testing::Test *v0; // rbx
v0 = (testing::Test *)operator new(0x50uLL);
testing::Test::Test(v0);
*((_OWORD *)v0 + 4) = 0LL;
*((_OWORD *)v0 + 3) = 0LL;
*((_OWORD *)v0 + 2) = 0LL;
*((_OWORD *)v0 + 1) = 0LL;
*(_QWORD *)v0 = &`vtable for'alaya::WorkerTest_Initialization_Test + 2;
return v0;
}
|
CreateTest:
PUSH R14
PUSH RBX
PUSH RAX
MOV EDI,0x50
CALL 0x00111190
MOV RBX,RAX
LAB_0012bb67:
MOV RDI,RAX
CALL 0x00161a0c
LAB_0012bb6f:
XORPS XMM0,XMM0
MOVUPS xmmword ptr [RBX + 0x40],XMM0
MOVUPS xmmword ptr [RBX + 0x30],XMM0
MOVUPS xmmword ptr [RBX + 0x20],XMM0
MOVUPS xmmword ptr [RBX + 0x10],XMM0
LEA RAX,[0x1b0a70]
ADD RAX,0x10
MOV qword ptr [RBX],RAX
MOV RAX,RBX
ADD RSP,0x8
POP RBX
POP R14
RET
|
/* testing::internal::TestFactoryImpl<alaya::WorkerTest_Initialization_Test>::CreateTest() */
Test * testing::internal::TestFactoryImpl<alaya::WorkerTest_Initialization_Test>::CreateTest(void)
{
Test *this;
this = (Test *)operator_new(0x50);
/* try { // try from 0012bb67 to 0012bb6e has its CatchHandler @ 0012bb9b */
Test::Test(this);
*(int8 *)(this + 0x40) = 0;
*(int8 *)(this + 0x48) = 0;
*(int8 *)(this + 0x30) = 0;
*(int8 *)(this + 0x38) = 0;
*(int8 *)(this + 0x20) = 0;
*(int8 *)(this + 0x28) = 0;
*(int8 *)(this + 0x10) = 0;
*(int8 *)(this + 0x18) = 0;
*(int ***)this = &PTR__WorkerTest_001b0a80;
return this;
}
|
|
8,954 |
my_timeval_to_str
|
eloqsql/client/../sql-common/my_time.c
|
int my_timeval_to_str(const struct timeval *tm, char *to, uint dec)
{
char *pos= longlong10_to_str((longlong) tm->tv_sec, to, 10);
if (dec)
{
*pos++= '.';
pos= fmt_usec((uint) sec_part_shift(tm->tv_usec, dec), pos, dec);
}
*pos= '\0';
return (int) (pos - to);
}
|
O0
|
c
|
my_timeval_to_str:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movq -0x8(%rbp), %rax
movq (%rax), %rdi
movq -0x10(%rbp), %rsi
movl $0xa, %edx
callq 0x1091d0
movq %rax, -0x20(%rbp)
cmpl $0x0, -0x14(%rbp)
je 0x498e6
movq -0x20(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x20(%rbp)
movb $0x2e, (%rax)
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rdi
movl -0x14(%rbp), %esi
callq 0x49a60
movl %eax, %edi
movq -0x20(%rbp), %rsi
movl -0x14(%rbp), %edx
callq 0x49900
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
movb $0x0, (%rax)
movq -0x20(%rbp), %rax
movq -0x10(%rbp), %rcx
subq %rcx, %rax
addq $0x20, %rsp
popq %rbp
retq
nop
|
my_timeval_to_str:
push rbp
mov rbp, rsp
sub rsp, 20h
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov [rbp+var_14], edx
mov rax, [rbp+var_8]
mov rdi, [rax]
mov rsi, [rbp+var_10]
mov edx, 0Ah
call int10_to_str
mov [rbp+var_20], rax
cmp [rbp+var_14], 0
jz short loc_498E6
mov rax, [rbp+var_20]
mov rcx, rax
add rcx, 1
mov [rbp+var_20], rcx
mov byte ptr [rax], 2Eh ; '.'
mov rax, [rbp+var_8]
mov rdi, [rax+8]; __int64
mov esi, [rbp+var_14]; unsigned int
call _ZL14sec_part_shiftxj; sec_part_shift(long long,uint)
mov edi, eax; unsigned int
mov rsi, [rbp+var_20]; char *
mov edx, [rbp+var_14]; unsigned int
call _ZL8fmt_usecjPcj; fmt_usec(uint,char *,uint)
mov [rbp+var_20], rax
loc_498E6:
mov rax, [rbp+var_20]
mov byte ptr [rax], 0
mov rax, [rbp+var_20]
mov rcx, [rbp+var_10]
sub rax, rcx
add rsp, 20h
pop rbp
retn
|
char * my_timeval_to_str(_QWORD *a1, long long a2, unsigned int a3)
{
unsigned int v3; // eax
char *v5; // [rsp+0h] [rbp-20h]
v5 = (char *)int10_to_str(*a1, a2, 10LL);
if ( a3 )
{
*v5 = 46;
v3 = sec_part_shift(a1[1], a3);
v5 = (char *)fmt_usec(v3, v5 + 1, a3);
}
*v5 = 0;
return &v5[-a2];
}
|
my_timeval_to_str:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x20
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV dword ptr [RBP + -0x14],EDX
MOV RAX,qword ptr [RBP + -0x8]
MOV RDI,qword ptr [RAX]
MOV RSI,qword ptr [RBP + -0x10]
MOV EDX,0xa
CALL 0x002091d0
MOV qword ptr [RBP + -0x20],RAX
CMP dword ptr [RBP + -0x14],0x0
JZ 0x001498e6
MOV RAX,qword ptr [RBP + -0x20]
MOV RCX,RAX
ADD RCX,0x1
MOV qword ptr [RBP + -0x20],RCX
MOV byte ptr [RAX],0x2e
MOV RAX,qword ptr [RBP + -0x8]
MOV RDI,qword ptr [RAX + 0x8]
MOV ESI,dword ptr [RBP + -0x14]
CALL 0x00149a60
MOV EDI,EAX
MOV RSI,qword ptr [RBP + -0x20]
MOV EDX,dword ptr [RBP + -0x14]
CALL 0x00149900
MOV qword ptr [RBP + -0x20],RAX
LAB_001498e6:
MOV RAX,qword ptr [RBP + -0x20]
MOV byte ptr [RAX],0x0
MOV RAX,qword ptr [RBP + -0x20]
MOV RCX,qword ptr [RBP + -0x10]
SUB RAX,RCX
ADD RSP,0x20
POP RBP
RET
|
long my_timeval_to_str(int8 *param_1,long param_2,uint param_3)
{
uint uVar1;
int1 *local_28;
local_28 = (int1 *)int10_to_str(*param_1,param_2,10);
if (param_3 != 0) {
*local_28 = 0x2e;
uVar1 = sec_part_shift(param_1[1],param_3);
local_28 = (int1 *)fmt_usec(uVar1,local_28 + 1,param_3);
}
*local_28 = 0;
return (long)local_28 - param_2;
}
|
|
8,955 |
Circle::toJson[abi:cxx11]() const
|
11AgReS1SoR11[P]Graph/Common/Figures/Circle.cpp
|
std::string Circle::toJson() const
{
return "{\n"
"\t\"type\": \"Circle\","
+ Shape::toJson() + ",\n"
"\t\"property\": {\n"
"\t\t\"radius\": " + std::to_string(radius) +
"\n\t}\n"
"}";
}
|
O0
|
cpp
|
Circle::toJson[abi:cxx11]() const:
pushq %rbp
movq %rsp, %rbp
subq $0xe0, %rsp
movq %rdi, -0xe0(%rbp)
movq %rdi, %rax
movq %rax, -0xd8(%rbp)
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rsi
movq %rsi, -0xd0(%rbp)
leaq -0x90(%rbp), %rdi
movq %rdi, -0xc8(%rbp)
callq 0x93e0
movq -0xc8(%rbp), %rdx
leaq 0x4c19(%rip), %rsi # 0xf129
leaq -0x70(%rbp), %rdi
callq 0x9a60
jmp 0xa51b
leaq 0x4c1c(%rip), %rdx # 0xf13e
leaq -0x50(%rbp), %rdi
leaq -0x70(%rbp), %rsi
callq 0x9100
jmp 0xa531
movq -0xd0(%rbp), %rax
movl 0x5c(%rax), %esi
leaq -0xc0(%rbp), %rdi
callq 0x97e0
jmp 0xa549
leaq -0x30(%rbp), %rdi
leaq -0x50(%rbp), %rsi
leaq -0xc0(%rbp), %rdx
callq 0x9530
jmp 0xa55f
movq -0xe0(%rbp), %rdi
leaq 0x4d40(%rip), %rdx # 0xf2ad
leaq -0x30(%rbp), %rsi
callq 0x9100
jmp 0xa578
leaq -0x30(%rbp), %rdi
callq 0x93d0
leaq -0xc0(%rbp), %rdi
callq 0x93d0
leaq -0x50(%rbp), %rdi
callq 0x93d0
leaq -0x70(%rbp), %rdi
callq 0x93d0
leaq -0x90(%rbp), %rdi
callq 0x93d0
movq -0xd8(%rbp), %rax
addq $0xe0, %rsp
popq %rbp
retq
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x98(%rbp)
movl %eax, -0x9c(%rbp)
jmp 0xa644
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x98(%rbp)
movl %eax, -0x9c(%rbp)
jmp 0xa63b
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x98(%rbp)
movl %eax, -0x9c(%rbp)
jmp 0xa632
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x98(%rbp)
movl %eax, -0x9c(%rbp)
jmp 0xa626
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x98(%rbp)
movl %eax, -0x9c(%rbp)
leaq -0x30(%rbp), %rdi
callq 0x93d0
leaq -0xc0(%rbp), %rdi
callq 0x93d0
leaq -0x50(%rbp), %rdi
callq 0x93d0
leaq -0x70(%rbp), %rdi
callq 0x93d0
leaq -0x90(%rbp), %rdi
callq 0x93d0
movq -0x98(%rbp), %rdi
callq 0x9ab0
nopl (%rax)
|
_ZNK6Circle6toJsonB5cxx11Ev:
push rbp
mov rbp, rsp
sub rsp, 0E0h
mov [rbp+var_E0], rdi
mov rax, rdi
mov [rbp+var_D8], rax
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov rsi, [rbp+var_10]
mov [rbp+var_D0], rsi
lea rdi, [rbp+var_90]
mov [rbp+var_C8], rdi
call __ZNK5Shape6toJsonB5cxx11Ev; Shape::toJson(void)
mov rdx, [rbp+var_C8]
lea rsi, aTypeCircle; "{\n\t\"type\": \"Circle\","
lea rdi, [rbp+var_70]
call __ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_OS8_; std::operator+<char>(char const*,std::string&&)
jmp short $+2
loc_A51B:
lea rdx, aPropertyRadius; ",\n\t\"property\": {\n\t\t\"radius\": "
lea rdi, [rbp+var_50]
lea rsi, [rbp+var_70]
call __ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_PKS5_; std::operator+<char>(std::string&&,char const*)
jmp short $+2
loc_A531:
mov rax, [rbp+var_D0]
mov esi, [rax+5Ch]; int
lea rdi, [rbp+var_C0]; this
call __ZNSt7__cxx119to_stringEi; std::to_string(int)
jmp short $+2
loc_A549:
lea rdi, [rbp+var_30]
lea rsi, [rbp+var_50]
lea rdx, [rbp+var_C0]
call __ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_S9_; std::operator+<char>(std::string&&,std::string&)
jmp short $+2
loc_A55F:
mov rdi, [rbp+var_E0]
lea rdx, asc_F2AC+1; "\n\t}\n}"
lea rsi, [rbp+var_30]
call __ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_PKS5_; std::operator+<char>(std::string&&,char const*)
jmp short $+2
loc_A578:
lea rdi, [rbp+var_30]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
lea rdi, [rbp+var_C0]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
lea rdi, [rbp+var_50]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
lea rdi, [rbp+var_70]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
lea rdi, [rbp+var_90]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
mov rax, [rbp+var_D8]
add rsp, 0E0h
pop rbp
retn
mov rcx, rax
mov eax, edx
mov [rbp+var_98], rcx
mov [rbp+var_9C], eax
jmp short loc_A644
mov rcx, rax
mov eax, edx
mov [rbp+var_98], rcx
mov [rbp+var_9C], eax
jmp short loc_A63B
mov rcx, rax
mov eax, edx
mov [rbp+var_98], rcx
mov [rbp+var_9C], eax
jmp short loc_A632
mov rcx, rax
mov eax, edx
mov [rbp+var_98], rcx
mov [rbp+var_9C], eax
jmp short loc_A626
mov rcx, rax
mov eax, edx
mov [rbp+var_98], rcx
mov [rbp+var_9C], eax
lea rdi, [rbp+var_30]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
loc_A626:
lea rdi, [rbp+var_C0]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
loc_A632:
lea rdi, [rbp+var_50]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
loc_A63B:
lea rdi, [rbp+var_70]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
loc_A644:
lea rdi, [rbp+var_90]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
mov rdi, [rbp+var_98]
call __Unwind_Resume
|
long long Circle::toJson[abi:cxx11](long long a1, long long a2)
{
_BYTE v3[36]; // [rsp+20h] [rbp-C0h] BYREF
_BYTE v4[32]; // [rsp+50h] [rbp-90h] BYREF
_BYTE v5[32]; // [rsp+70h] [rbp-70h] BYREF
_BYTE v6[32]; // [rsp+90h] [rbp-50h] BYREF
_BYTE v7[32]; // [rsp+B0h] [rbp-30h] BYREF
long long v8; // [rsp+D0h] [rbp-10h]
long long v9; // [rsp+D8h] [rbp-8h]
v9 = a1;
v8 = a2;
Shape::toJson[abi:cxx11]();
std::operator+<char>(v5, "{\n\t\"type\": \"Circle\",", v4);
std::operator+<char>(v6, v5, ",\n\t\"property\": {\n\t\t\"radius\": ");
std::to_string((std::__cxx11 *)v3, *(_DWORD *)(a2 + 92));
std::operator+<char>(v7, v6, v3);
std::operator+<char>(a1, v7, "\n\t}\n}");
std::string::~string(v7);
std::string::~string(v3);
std::string::~string(v6);
std::string::~string(v5);
std::string::~string(v4);
return a1;
}
|
toJson[abi:cxx11]:
PUSH RBP
MOV RBP,RSP
SUB RSP,0xe0
MOV qword ptr [RBP + -0xe0],RDI
MOV RAX,RDI
MOV qword ptr [RBP + -0xd8],RAX
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV RSI,qword ptr [RBP + -0x10]
MOV qword ptr [RBP + -0xd0],RSI
LEA RDI,[RBP + -0x90]
MOV qword ptr [RBP + -0xc8],RDI
CALL 0x001093e0
MOV RDX,qword ptr [RBP + -0xc8]
LAB_0010a509:
LEA RSI,[0x10f129]
LEA RDI,[RBP + -0x70]
CALL 0x00109a60
JMP 0x0010a51b
LAB_0010a51b:
LEA RDX,[0x10f13e]
LEA RDI,[RBP + -0x50]
LEA RSI,[RBP + -0x70]
CALL 0x00109100
JMP 0x0010a531
LAB_0010a531:
MOV RAX,qword ptr [RBP + -0xd0]
MOV ESI,dword ptr [RAX + 0x5c]
LAB_0010a53b:
LEA RDI,[RBP + -0xc0]
CALL 0x001097e0
JMP 0x0010a549
LAB_0010a549:
LEA RDI,[RBP + -0x30]
LEA RSI,[RBP + -0x50]
LEA RDX,[RBP + -0xc0]
CALL 0x00109530
JMP 0x0010a55f
LAB_0010a55f:
MOV RDI,qword ptr [RBP + -0xe0]
LEA RDX,[0x10f2ad]
LEA RSI,[RBP + -0x30]
CALL 0x00109100
LAB_0010a576:
JMP 0x0010a578
LAB_0010a578:
LEA RDI,[RBP + -0x30]
CALL 0x001093d0
LEA RDI,[RBP + -0xc0]
CALL 0x001093d0
LEA RDI,[RBP + -0x50]
CALL 0x001093d0
LEA RDI,[RBP + -0x70]
CALL 0x001093d0
LEA RDI,[RBP + -0x90]
CALL 0x001093d0
MOV RAX,qword ptr [RBP + -0xd8]
ADD RSP,0xe0
POP RBP
RET
|
/* Circle::toJson[abi:cxx11]() const */
string * Circle::toJson_abi_cxx11_(void)
{
long in_RSI;
string *in_RDI;
__cxx11 local_c8 [48];
string local_98 [32];
string local_78 [32];
string local_58 [32];
string local_38 [48];
Shape::toJson_abi_cxx11_();
/* try { // try from 0010a509 to 0010a518 has its CatchHandler @ 0010a5bb */
std::operator+((char *)local_78,(string *)"{\n\t\"type\": \"Circle\",");
/* try { // try from 0010a51b to 0010a52e has its CatchHandler @ 0010a5cf */
std::operator+(local_58,(char *)local_78);
/* try { // try from 0010a53b to 0010a546 has its CatchHandler @ 0010a5e3 */
std::__cxx11::to_string(local_c8,*(int *)(in_RSI + 0x5c));
/* try { // try from 0010a549 to 0010a55c has its CatchHandler @ 0010a5f7 */
std::operator+(local_38,local_58);
/* try { // try from 0010a55f to 0010a575 has its CatchHandler @ 0010a60b */
std::operator+(in_RDI,(char *)local_38);
std::__cxx11::string::~string(local_38);
std::__cxx11::string::~string((string *)local_c8);
std::__cxx11::string::~string(local_58);
std::__cxx11::string::~string(local_78);
std::__cxx11::string::~string(local_98);
return in_RDI;
}
|
|
8,956 |
Circle::toJson[abi:cxx11]() const
|
11AgReS1SoR11[P]Graph/Common/Figures/Circle.cpp
|
std::string Circle::toJson() const
{
return "{\n"
"\t\"type\": \"Circle\","
+ Shape::toJson() + ",\n"
"\t\"property\": {\n"
"\t\t\"radius\": " + std::to_string(radius) +
"\n\t}\n"
"}";
}
|
O1
|
cpp
|
Circle::toJson[abi:cxx11]() const:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xa8, %rsp
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x88(%rsp), %r15
movq %r15, %rdi
callq 0x3160
leaq 0x43af(%rip), %rcx # 0x8129
movl $0x14, %r8d
movq %r15, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x3210
leaq 0x78(%rsp), %rsi
movq %rsi, -0x10(%rsi)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x3db3
movq %rdx, 0x68(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x78(%rsp)
jmp 0x3db9
movups (%rcx), %xmm0
movups %xmm0, (%rsi)
movq 0x8(%rax), %rdx
leaq 0x68(%rsp), %rdi
movq %rdx, 0x8(%rdi)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
leaq 0x4362(%rip), %rsi # 0x813e
callq 0x3310
leaq 0x58(%rsp), %r13
movq %r13, -0x10(%r13)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x3e08
movq %rdx, 0x48(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x58(%rsp)
jmp 0x3e10
movups (%rcx), %xmm0
movups %xmm0, (%r13)
movq 0x8(%rax), %rdx
movq %rdx, 0x50(%rsp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movl 0x5c(%r14), %r14d
movl %r14d, %ebp
negl %ebp
cmovsl %r14d, %ebp
movl $0x1, %r15d
cmpl $0xa, %ebp
jb 0x3e89
movl $0x4, %r15d
movl $0xd1b71759, %eax # imm = 0xD1B71759
movl %ebp, %ecx
cmpl $0x63, %ecx
jbe 0x3e80
cmpl $0x3e7, %ecx # imm = 0x3E7
jbe 0x3e86
cmpl $0x2710, %ecx # imm = 0x2710
jb 0x3e89
movl %ecx, %edx
imulq %rax, %rdx
shrq $0x2d, %rdx
addl $0x4, %r15d
cmpl $0x1869f, %ecx # imm = 0x1869F
movl %edx, %ecx
ja 0x3e4d
addl $-0x3, %r15d
jmp 0x3e89
addl $-0x2, %r15d
jmp 0x3e89
decl %r15d
shrl $0x1f, %r14d
leal (%r15,%r14), %esi
leaq 0x38(%rsp), %r12
movq %r12, -0x10(%r12)
leaq 0x28(%rsp), %rdi
movl $0x2d, %edx
callq 0x3230
addq 0x28(%rsp), %r14
movq %r14, %rdi
movl %r15d, %esi
movl %ebp, %edx
callq 0x3250
movq 0x48(%rsp), %rcx
movq 0x50(%rsp), %r8
movq 0x30(%rsp), %rdx
leaq (%rdx,%r8), %rax
movl $0xf, %esi
cmpq %r13, %rcx
je 0x3ede
movq 0x58(%rsp), %rsi
cmpq %rsi, %rax
jbe 0x3ef9
movl $0xf, %esi
cmpq %r12, 0x28(%rsp)
je 0x3ef4
movq 0x38(%rsp), %rsi
cmpq %rsi, %rax
jbe 0x3f0a
movq 0x28(%rsp), %rsi
leaq 0x48(%rsp), %rdi
callq 0x30d0
jmp 0x3f18
leaq 0x28(%rsp), %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x3210
leaq 0x18(%rsp), %rdx
movq %rdx, -0x10(%rdx)
movq (%rax), %rsi
leaq 0x10(%rax), %rcx
cmpq %rcx, %rsi
je 0x3f3c
movq %rsi, 0x8(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x18(%rsp)
jmp 0x3f42
movups (%rcx), %xmm0
movups %xmm0, (%rdx)
movq %rax, %rdx
addq $0x8, %rdx
movq 0x8(%rax), %rsi
movq %rsi, 0x10(%rsp)
movq %rcx, (%rax)
movq $0x0, (%rdx)
movb $0x0, (%rcx)
leaq 0x4365(%rip), %rsi # 0x82cb
leaq 0x8(%rsp), %rdi
callq 0x3310
leaq 0x10(%rbx), %rdx
movq %rdx, (%rbx)
movq (%rax), %rsi
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rsi
je 0x3f92
movq %rsi, (%rbx)
movq (%rcx), %rdx
movq %rdx, 0x10(%rbx)
jmp 0x3f98
movups (%rcx), %xmm0
movups %xmm0, (%rdx)
movq 0x8(%rax), %rdx
movq %rdx, 0x8(%rbx)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x3fca
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x31f0
movq 0x28(%rsp), %rdi
cmpq %r12, %rdi
je 0x3fe1
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x31f0
movq 0x48(%rsp), %rdi
cmpq %r13, %rdi
je 0x3ff8
movq 0x58(%rsp), %rsi
incq %rsi
callq 0x31f0
movq 0x68(%rsp), %rdi
leaq 0x78(%rsp), %rax
cmpq %rax, %rdi
je 0x4014
movq 0x78(%rsp), %rsi
incq %rsi
callq 0x31f0
leaq 0x98(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x4035
movq 0x98(%rsp), %rsi
incq %rsi
callq 0x31f0
movq %rbx, %rax
addq $0xa8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x406d
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x31f0
jmp 0x406d
movq %rax, %rbx
movq 0x28(%rsp), %rdi
cmpq %r12, %rdi
je 0x4089
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x31f0
jmp 0x4089
movq %rax, %rbx
movq 0x48(%rsp), %rdi
cmpq %r13, %rdi
je 0x40a5
movq 0x58(%rsp), %rsi
incq %rsi
callq 0x31f0
jmp 0x40a5
movq %rax, %rbx
movq 0x68(%rsp), %rdi
leaq 0x78(%rsp), %rax
cmpq %rax, %rdi
je 0x40c6
movq 0x78(%rsp), %rsi
incq %rsi
callq 0x31f0
jmp 0x40c6
movq %rax, %rbx
leaq 0x98(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x40e7
movq 0x98(%rsp), %rsi
incq %rsi
callq 0x31f0
movq %rbx, %rdi
callq 0x32e0
nop
|
_ZNK6Circle6toJsonB5cxx11Ev:
push rbp; __int64
push r15; int
push r14; void *
push r13; int
push r12; __int64
push rbx; int
sub rsp, 0A8h
mov r14, rsi
mov rbx, rdi
lea r15, [rsp+0D8h+var_50]
mov rdi, r15; int
call __ZNK5Shape6toJsonB5cxx11Ev; Shape::toJson(void)
lea rcx, aTypeCircle; "{\n\t\"type\": \"Circle\","
mov r8d, 14h
mov rdi, r15
xor esi, esi
xor edx, edx
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7replaceEmmPKcm; std::string::replace(ulong,ulong,char const*,ulong)
lea rsi, [rsp+0D8h+var_60]
mov [rsi-10h], rsi
mov rdx, [rax]
mov rcx, rax
add rcx, 10h
cmp rdx, rcx
jz short loc_3DB3
mov [rsp+0D8h+var_70], rdx
mov rdx, [rcx]
mov [rsp+0D8h+var_60], rdx
jmp short loc_3DB9
loc_3DB3:
movups xmm0, xmmword ptr [rcx]
movups xmmword ptr [rsi], xmm0
loc_3DB9:
mov rdx, [rax+8]
lea rdi, [rsp+0D8h+var_70]
mov [rdi+8], rdx
mov [rax], rcx
mov qword ptr [rax+8], 0
mov byte ptr [rax+10h], 0
lea rsi, aPropertyRadius; ",\n\t\"property\": {\n\t\t\"radius\": "
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendEPKc; std::string::append(char const*)
lea r13, [rsp+0D8h+var_80]
mov [r13-10h], r13
mov rdx, [rax]
mov rcx, rax
add rcx, 10h
cmp rdx, rcx
jz short loc_3E08
mov [rsp+0D8h+var_90], rdx
mov rdx, [rcx]
mov [rsp+0D8h+var_80], rdx
jmp short loc_3E10
loc_3E08:
movups xmm0, xmmword ptr [rcx]
movups xmmword ptr [r13+0], xmm0
loc_3E10:
mov rdx, [rax+8]
mov [rsp+0D8h+var_88], rdx
mov [rax], rcx
mov qword ptr [rax+8], 0
mov byte ptr [rax+10h], 0
mov r14d, [r14+5Ch]
mov ebp, r14d
neg ebp
cmovs ebp, r14d
mov r15d, 1
cmp ebp, 0Ah
jb short loc_3E89
mov r15d, 4
mov eax, 0D1B71759h
mov ecx, ebp
loc_3E4D:
cmp ecx, 63h ; 'c'
jbe short loc_3E80
cmp ecx, 3E7h
jbe short loc_3E86
cmp ecx, 2710h
jb short loc_3E89
mov edx, ecx
imul rdx, rax
shr rdx, 2Dh
add r15d, 4
cmp ecx, 1869Fh
mov ecx, edx
ja short loc_3E4D
add r15d, 0FFFFFFFDh
jmp short loc_3E89
loc_3E80:
add r15d, 0FFFFFFFEh
jmp short loc_3E89
loc_3E86:
dec r15d
loc_3E89:
shr r14d, 1Fh
lea esi, [r15+r14]
lea r12, [rsp+0D8h+var_A0]
mov [r12-10h], r12
lea rdi, [rsp+0D8h+var_B0]
mov edx, 2Dh ; '-'
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructEmc; std::string::_M_construct(ulong,char)
add r14, [rsp+0D8h+var_B0]
mov rdi, r14
mov esi, r15d
mov edx, ebp
call __ZNSt8__detail18__to_chars_10_implIjEEvPcjT_; std::__detail::__to_chars_10_impl<uint>(char *,uint,uint)
mov rcx, [rsp+0D8h+var_90]
mov r8, [rsp+0D8h+var_88]
mov rdx, [rsp+0D8h+var_A8]
lea rax, [rdx+r8]
mov esi, 0Fh
cmp rcx, r13
jz short loc_3EDE
mov rsi, [rsp+0D8h+var_80]
loc_3EDE:
cmp rax, rsi
jbe short loc_3EF9
mov esi, 0Fh
cmp [rsp+0D8h+var_B0], r12
jz short loc_3EF4
mov rsi, [rsp+0D8h+var_A0]
loc_3EF4:
cmp rax, rsi
jbe short loc_3F0A
loc_3EF9:
mov rsi, [rsp+0D8h+var_B0]
lea rdi, [rsp+0D8h+var_90]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_appendEPKcm; std::string::_M_append(char const*,ulong)
jmp short loc_3F18
loc_3F0A:
lea rdi, [rsp+0D8h+var_B0]
xor esi, esi
xor edx, edx
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7replaceEmmPKcm; std::string::replace(ulong,ulong,char const*,ulong)
loc_3F18:
lea rdx, [rsp+0D8h+var_C0]
mov [rdx-10h], rdx
mov rsi, [rax]
lea rcx, [rax+10h]
cmp rsi, rcx
jz short loc_3F3C
mov [rsp+0D8h+var_D0], rsi
mov rdx, [rcx]
mov [rsp+0D8h+var_C0], rdx
jmp short loc_3F42
loc_3F3C:
movups xmm0, xmmword ptr [rcx]
movups xmmword ptr [rdx], xmm0
loc_3F42:
mov rdx, rax
add rdx, 8
mov rsi, [rax+8]
mov [rsp+0D8h+var_C8], rsi
mov [rax], rcx
mov qword ptr [rdx], 0
mov byte ptr [rcx], 0
lea rsi, asc_82CA+1; "\n\t}\n}"
lea rdi, [rsp+0D8h+var_D0]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendEPKc; std::string::append(char const*)
lea rdx, [rbx+10h]
mov [rbx], rdx
mov rsi, [rax]
mov rcx, rax
add rcx, 10h
cmp rsi, rcx
jz short loc_3F92
mov [rbx], rsi
mov rdx, [rcx]
mov [rbx+10h], rdx
jmp short loc_3F98
loc_3F92:
movups xmm0, xmmword ptr [rcx]
movups xmmword ptr [rdx], xmm0
loc_3F98:
mov rdx, [rax+8]
mov [rbx+8], rdx
mov [rax], rcx
mov qword ptr [rax+8], 0
mov byte ptr [rax+10h], 0
lea rax, [rsp+0D8h+var_C0]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_3FCA
mov rsi, [rsp+0D8h+var_C0]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_3FCA:
mov rdi, [rsp+0D8h+var_B0]; void *
cmp rdi, r12
jz short loc_3FE1
mov rsi, [rsp+0D8h+var_A0]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_3FE1:
mov rdi, [rsp+0D8h+var_90]; void *
cmp rdi, r13
jz short loc_3FF8
mov rsi, [rsp+0D8h+var_80]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_3FF8:
mov rdi, [rsp+0D8h+var_70]; void *
lea rax, [rsp+0D8h+var_60]
cmp rdi, rax
jz short loc_4014
mov rsi, [rsp+0D8h+var_60]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_4014:
lea rax, [rsp+0D8h+var_40]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_4035
mov rsi, [rsp+0D8h+var_40]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_4035:
mov rax, rbx
add rsp, 0A8h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
mov rbx, rax
lea rax, [rsp+arg_10]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_406D
mov rsi, [rsp+arg_10]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_406D
mov rbx, rax
loc_406D:
mov rdi, [rsp+arg_20]; void *
cmp rdi, r12
jz short loc_4089
mov rsi, [rsp+arg_30]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_4089
mov rbx, rax
loc_4089:
mov rdi, [rsp+arg_40]; void *
cmp rdi, r13
jz short loc_40A5
mov rsi, [rsp+arg_50]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_40A5
mov rbx, rax
loc_40A5:
mov rdi, [rsp+arg_60]; void *
lea rax, [rsp+arg_70]
cmp rdi, rax
jz short loc_40C6
mov rsi, [rsp+arg_70]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_40C6
mov rbx, rax
loc_40C6:
lea rax, [rsp+arg_90]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_40E7
mov rsi, [rsp+arg_90]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_40E7:
mov rdi, rbx
call __Unwind_Resume
|
toJson[abi:cxx11]:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0xa8
MOV R14,RSI
MOV RBX,RDI
LEA R15,[RSP + 0x88]
MOV RDI,R15
CALL 0x00103160
LAB_00103d73:
LEA RCX,[0x108129]
MOV R8D,0x14
MOV RDI,R15
XOR ESI,ESI
XOR EDX,EDX
CALL 0x00103210
LEA RSI,[RSP + 0x78]
MOV qword ptr [RSI + -0x10],RSI
MOV RDX,qword ptr [RAX]
MOV RCX,RAX
ADD RCX,0x10
CMP RDX,RCX
JZ 0x00103db3
MOV qword ptr [RSP + 0x68],RDX
MOV RDX,qword ptr [RCX]
MOV qword ptr [RSP + 0x78],RDX
JMP 0x00103db9
LAB_00103db3:
MOVUPS XMM0,xmmword ptr [RCX]
MOVUPS xmmword ptr [RSI],XMM0
LAB_00103db9:
MOV RDX,qword ptr [RAX + 0x8]
LEA RDI,[RSP + 0x68]
MOV qword ptr [RDI + 0x8],RDX
MOV qword ptr [RAX],RCX
MOV qword ptr [RAX + 0x8],0x0
MOV byte ptr [RAX + 0x10],0x0
LAB_00103dd5:
LEA RSI,[0x10813e]
CALL 0x00103310
LEA R13,[RSP + 0x58]
MOV qword ptr [R13 + -0x10],R13
MOV RDX,qword ptr [RAX]
MOV RCX,RAX
ADD RCX,0x10
CMP RDX,RCX
JZ 0x00103e08
MOV qword ptr [RSP + 0x48],RDX
MOV RDX,qword ptr [RCX]
MOV qword ptr [RSP + 0x58],RDX
JMP 0x00103e10
LAB_00103e08:
MOVUPS XMM0,xmmword ptr [RCX]
MOVUPS xmmword ptr [R13],XMM0
LAB_00103e10:
MOV RDX,qword ptr [RAX + 0x8]
MOV qword ptr [RSP + 0x50],RDX
MOV qword ptr [RAX],RCX
MOV qword ptr [RAX + 0x8],0x0
MOV byte ptr [RAX + 0x10],0x0
MOV R14D,dword ptr [R14 + 0x5c]
MOV EBP,R14D
NEG EBP
CMOVS EBP,R14D
MOV R15D,0x1
CMP EBP,0xa
JC 0x00103e89
MOV R15D,0x4
MOV EAX,0xd1b71759
MOV ECX,EBP
LAB_00103e4d:
CMP ECX,0x63
JBE 0x00103e80
CMP ECX,0x3e7
JBE 0x00103e86
CMP ECX,0x2710
JC 0x00103e89
MOV EDX,ECX
IMUL RDX,RAX
SHR RDX,0x2d
ADD R15D,0x4
CMP ECX,0x1869f
MOV ECX,EDX
JA 0x00103e4d
ADD R15D,-0x3
JMP 0x00103e89
LAB_00103e80:
ADD R15D,-0x2
JMP 0x00103e89
LAB_00103e86:
DEC R15D
LAB_00103e89:
SHR R14D,0x1f
LEA ESI,[R15 + R14*0x1]
LEA R12,[RSP + 0x38]
MOV qword ptr [R12 + -0x10],R12
LAB_00103e9b:
LEA RDI,[RSP + 0x28]
MOV EDX,0x2d
CALL 0x00103230
ADD R14,qword ptr [RSP + 0x28]
MOV RDI,R14
MOV ESI,R15D
MOV EDX,EBP
CALL 0x00103250
MOV RCX,qword ptr [RSP + 0x48]
MOV R8,qword ptr [RSP + 0x50]
MOV RDX,qword ptr [RSP + 0x30]
LEA RAX,[RDX + R8*0x1]
MOV ESI,0xf
CMP RCX,R13
JZ 0x00103ede
MOV RSI,qword ptr [RSP + 0x58]
LAB_00103ede:
CMP RAX,RSI
JBE 0x00103ef9
MOV ESI,0xf
CMP qword ptr [RSP + 0x28],R12
JZ 0x00103ef4
MOV RSI,qword ptr [RSP + 0x38]
LAB_00103ef4:
CMP RAX,RSI
JBE 0x00103f0a
LAB_00103ef9:
MOV RSI,qword ptr [RSP + 0x28]
LAB_00103efe:
LEA RDI,[RSP + 0x48]
CALL 0x001030d0
JMP 0x00103f18
LAB_00103f0a:
LEA RDI,[RSP + 0x28]
XOR ESI,ESI
XOR EDX,EDX
CALL 0x00103210
LAB_00103f18:
LEA RDX,[RSP + 0x18]
MOV qword ptr [RDX + -0x10],RDX
MOV RSI,qword ptr [RAX]
LEA RCX,[RAX + 0x10]
CMP RSI,RCX
JZ 0x00103f3c
MOV qword ptr [RSP + 0x8],RSI
MOV RDX,qword ptr [RCX]
MOV qword ptr [RSP + 0x18],RDX
JMP 0x00103f42
LAB_00103f3c:
MOVUPS XMM0,xmmword ptr [RCX]
MOVUPS xmmword ptr [RDX],XMM0
LAB_00103f42:
MOV RDX,RAX
ADD RDX,0x8
MOV RSI,qword ptr [RAX + 0x8]
MOV qword ptr [RSP + 0x10],RSI
MOV qword ptr [RAX],RCX
MOV qword ptr [RDX],0x0
MOV byte ptr [RCX],0x0
LAB_00103f5f:
LEA RSI,[0x1082cb]
LEA RDI,[RSP + 0x8]
CALL 0x00103310
LAB_00103f70:
LEA RDX,[RBX + 0x10]
MOV qword ptr [RBX],RDX
MOV RSI,qword ptr [RAX]
MOV RCX,RAX
ADD RCX,0x10
CMP RSI,RCX
JZ 0x00103f92
MOV qword ptr [RBX],RSI
MOV RDX,qword ptr [RCX]
MOV qword ptr [RBX + 0x10],RDX
JMP 0x00103f98
LAB_00103f92:
MOVUPS XMM0,xmmword ptr [RCX]
MOVUPS xmmword ptr [RDX],XMM0
LAB_00103f98:
MOV RDX,qword ptr [RAX + 0x8]
MOV qword ptr [RBX + 0x8],RDX
MOV qword ptr [RAX],RCX
MOV qword ptr [RAX + 0x8],0x0
MOV byte ptr [RAX + 0x10],0x0
LEA RAX,[RSP + 0x18]
MOV RDI,qword ptr [RAX + -0x10]
CMP RDI,RAX
JZ 0x00103fca
MOV RSI,qword ptr [RSP + 0x18]
INC RSI
CALL 0x001031f0
LAB_00103fca:
MOV RDI,qword ptr [RSP + 0x28]
CMP RDI,R12
JZ 0x00103fe1
MOV RSI,qword ptr [RSP + 0x38]
INC RSI
CALL 0x001031f0
LAB_00103fe1:
MOV RDI,qword ptr [RSP + 0x48]
CMP RDI,R13
JZ 0x00103ff8
MOV RSI,qword ptr [RSP + 0x58]
INC RSI
CALL 0x001031f0
LAB_00103ff8:
MOV RDI,qword ptr [RSP + 0x68]
LEA RAX,[RSP + 0x78]
CMP RDI,RAX
JZ 0x00104014
MOV RSI,qword ptr [RSP + 0x78]
INC RSI
CALL 0x001031f0
LAB_00104014:
LEA RAX,[RSP + 0x98]
MOV RDI,qword ptr [RAX + -0x10]
CMP RDI,RAX
JZ 0x00104035
MOV RSI,qword ptr [RSP + 0x98]
INC RSI
CALL 0x001031f0
LAB_00104035:
MOV RAX,RBX
ADD RSP,0xa8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
/* Circle::toJson[abi:cxx11]() const */
void Circle::toJson_abi_cxx11_(void)
{
uint uVar1;
uint uVar2;
long lVar3;
uint uVar4;
long *plVar5;
int8 *puVar6;
uint uVar7;
long *plVar8;
ulong *puVar9;
ulong uVar10;
long in_RSI;
long *in_RDI;
uint uVar11;
long *local_d0;
int8 local_c8;
long local_c0;
int8 uStack_b8;
ulong *local_b0;
long local_a8;
ulong local_a0 [2];
ulong *local_90;
long local_88;
ulong local_80;
long lStack_78;
long *local_70;
long local_68;
long local_60;
long lStack_58;
long *local_50 [2];
long local_40 [2];
Shape::toJson_abi_cxx11_();
/* try { // try from 00103d73 to 00103d8b has its CatchHandler @ 001040c3 */
plVar5 = (long *)std::__cxx11::string::replace((ulong)local_50,0,(char *)0x0,0x108129);
local_70 = &local_60;
plVar8 = plVar5 + 2;
if ((long *)*plVar5 == plVar8) {
local_60 = *plVar8;
lStack_58 = plVar5[3];
}
else {
local_60 = *plVar8;
local_70 = (long *)*plVar5;
}
local_68 = plVar5[1];
*plVar5 = (long)plVar8;
plVar5[1] = 0;
*(int1 *)(plVar5 + 2) = 0;
/* try { // try from 00103dd5 to 00103de0 has its CatchHandler @ 001040a2 */
plVar5 = (long *)std::__cxx11::string::append((char *)&local_70);
puVar9 = (ulong *)(plVar5 + 2);
if ((ulong *)*plVar5 == puVar9) {
local_80 = *puVar9;
lStack_78 = plVar5[3];
local_90 = &local_80;
}
else {
local_80 = *puVar9;
local_90 = (ulong *)*plVar5;
}
local_88 = plVar5[1];
*plVar5 = (long)puVar9;
plVar5[1] = 0;
*(int1 *)(plVar5 + 2) = 0;
uVar1 = *(uint *)(in_RSI + 0x5c);
uVar2 = -uVar1;
if (0 < (int)uVar1) {
uVar2 = uVar1;
}
uVar11 = 1;
if (9 < uVar2) {
uVar10 = (ulong)uVar2;
uVar4 = 4;
do {
uVar11 = uVar4;
uVar7 = (uint)uVar10;
if (uVar7 < 100) {
uVar11 = uVar11 - 2;
goto LAB_00103e89;
}
if (uVar7 < 1000) {
uVar11 = uVar11 - 1;
goto LAB_00103e89;
}
if (uVar7 < 10000) goto LAB_00103e89;
uVar10 = uVar10 / 10000;
uVar4 = uVar11 + 4;
} while (99999 < uVar7);
uVar11 = uVar11 + 1;
}
LAB_00103e89:
/* try { // try from 00103e9b to 00103ea9 has its CatchHandler @ 00104086 */
local_b0 = local_a0;
std::__cxx11::string::_M_construct((ulong)&local_b0,(char)uVar11 - (char)((int)uVar1 >> 0x1f));
std::__detail::__to_chars_10_impl<unsigned_int>
((char *)((ulong)(uVar1 >> 0x1f) + (long)local_b0),uVar11,uVar2);
uVar10 = 0xf;
if (local_90 != &local_80) {
uVar10 = local_80;
}
if (uVar10 < (ulong)(local_a8 + local_88)) {
uVar10 = 0xf;
if (local_b0 != local_a0) {
uVar10 = local_a0[0];
}
if ((ulong)(local_a8 + local_88) <= uVar10) {
puVar6 = (int8 *)
std::__cxx11::string::replace((ulong)&local_b0,0,(char *)0x0,(ulong)local_90);
goto LAB_00103f18;
}
}
/* try { // try from 00103efe to 00103f17 has its CatchHandler @ 0010406a */
puVar6 = (int8 *)std::__cxx11::string::_M_append((char *)&local_90,(ulong)local_b0);
LAB_00103f18:
local_d0 = &local_c0;
plVar5 = puVar6 + 2;
if ((long *)*puVar6 == plVar5) {
local_c0 = *plVar5;
uStack_b8 = puVar6[3];
}
else {
local_c0 = *plVar5;
local_d0 = (long *)*puVar6;
}
local_c8 = puVar6[1];
*puVar6 = plVar5;
puVar6[1] = 0;
*(int1 *)plVar5 = 0;
/* try { // try from 00103f5f to 00103f6f has its CatchHandler @ 0010404a */
puVar6 = (int8 *)std::__cxx11::string::append((char *)&local_d0);
*in_RDI = (long)(in_RDI + 2);
plVar5 = puVar6 + 2;
if ((long *)*puVar6 == plVar5) {
lVar3 = puVar6[3];
in_RDI[2] = *plVar5;
in_RDI[3] = lVar3;
}
else {
*in_RDI = (long)*puVar6;
in_RDI[2] = *plVar5;
}
in_RDI[1] = puVar6[1];
*puVar6 = plVar5;
puVar6[1] = 0;
*(int1 *)(puVar6 + 2) = 0;
if (local_d0 != &local_c0) {
operator_delete(local_d0,local_c0 + 1);
}
if (local_b0 != local_a0) {
operator_delete(local_b0,local_a0[0] + 1);
}
if (local_90 != &local_80) {
operator_delete(local_90,local_80 + 1);
}
if (local_70 != &local_60) {
operator_delete(local_70,local_60 + 1);
}
if (local_50[0] != local_40) {
operator_delete(local_50[0],local_40[0] + 1);
}
return;
}
|
||
8,957 |
my_char_weight_put
|
eloqsql/strings/ctype-uca.c
|
static my_bool
my_char_weight_put(MY_UCA_WEIGHT_LEVEL *dst,
uint16 *to, size_t to_length, size_t *nweights,
my_wc_t *str, size_t len)
{
size_t count;
int rc= FALSE;
if (!to_length)
{
*nweights= 0;
return len > 0;
}
to_length--; /* Without trailing zero */
for (count= 0; len; )
{
size_t chlen;
const uint16 *from= NULL;
uint16 implicit_weights[3];
for (chlen= len; chlen > 1; chlen--)
{
const MY_CONTRACTION *cnt;
if (chlen <= MY_UCA_MAX_CONTRACTION &&
(cnt= my_uca_contraction_find(&dst->contractions, str, chlen)))
{
from= cnt->weight;
str+= chlen;
len-= chlen;
break;
}
}
if (!from)
{
from= my_char_weight_addr(dst, *str);
if (!from)
{
from= implicit_weights;
my_uca_implicit_weight_put(implicit_weights, *str, dst->levelno);
}
str++;
len--;
}
for ( ; from && *from && count < to_length; )
{
*to++= *from++;
count++;
}
if (count == to_length && from && * from)
rc= TRUE; /* All weights did not fit */
}
*to= 0;
*nweights= count;
return rc;
}
|
O0
|
c
|
my_char_weight_put:
pushq %rbp
movq %rsp, %rbp
subq $0x70, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
movq %r8, -0x30(%rbp)
movq %r9, -0x38(%rbp)
movl $0x0, -0x44(%rbp)
cmpq $0x0, -0x20(%rbp)
jne 0xe614e
movq -0x28(%rbp), %rax
movq $0x0, (%rax)
cmpq $0x0, -0x38(%rbp)
seta %al
andb $0x1, %al
movzbl %al, %eax
movb %al, -0x1(%rbp)
jmp 0xe62ed
movq -0x20(%rbp), %rax
addq $-0x1, %rax
movq %rax, -0x20(%rbp)
movq $0x0, -0x40(%rbp)
cmpq $0x0, -0x38(%rbp)
je 0xe62d3
movq $0x0, -0x58(%rbp)
movq -0x38(%rbp), %rax
movq %rax, -0x50(%rbp)
cmpq $0x1, -0x50(%rbp)
jbe 0xe61e7
cmpq $0x6, -0x50(%rbp)
ja 0xe61d7
movq -0x10(%rbp), %rdi
addq $0x18, %rdi
movq -0x30(%rbp), %rsi
movq -0x50(%rbp), %rdx
callq 0xe65a0
movq %rax, -0x68(%rbp)
cmpq $0x0, %rax
je 0xe61d7
movq -0x68(%rbp), %rax
addq $0x30, %rax
movq %rax, -0x58(%rbp)
movq -0x50(%rbp), %rax
shlq $0x3, %rax
addq -0x30(%rbp), %rax
movq %rax, -0x30(%rbp)
movq -0x50(%rbp), %rcx
movq -0x38(%rbp), %rax
subq %rcx, %rax
movq %rax, -0x38(%rbp)
jmp 0xe61e7
jmp 0xe61d9
movq -0x50(%rbp), %rax
addq $-0x1, %rax
movq %rax, -0x50(%rbp)
jmp 0xe617d
cmpq $0x0, -0x58(%rbp)
jne 0xe6242
movq -0x10(%rbp), %rdi
movq -0x30(%rbp), %rax
movq (%rax), %rax
movl %eax, %esi
callq 0xe38c0
movq %rax, -0x58(%rbp)
cmpq $0x0, -0x58(%rbp)
jne 0xe622a
leaq -0x5e(%rbp), %rax
movq %rax, -0x58(%rbp)
leaq -0x5e(%rbp), %rdi
movq -0x30(%rbp), %rax
movq (%rax), %rsi
movq -0x10(%rbp), %rax
movl 0x30(%rax), %edx
callq 0xe5ec0
movq -0x30(%rbp), %rax
addq $0x8, %rax
movq %rax, -0x30(%rbp)
movq -0x38(%rbp), %rax
addq $-0x1, %rax
movq %rax, -0x38(%rbp)
jmp 0xe6244
xorl %eax, %eax
cmpq $0x0, -0x58(%rbp)
movb %al, -0x69(%rbp)
je 0xe626f
movq -0x58(%rbp), %rax
movzwl (%rax), %ecx
xorl %eax, %eax
cmpl $0x0, %ecx
movb %al, -0x69(%rbp)
je 0xe626f
movq -0x40(%rbp), %rax
cmpq -0x20(%rbp), %rax
setb %al
movb %al, -0x69(%rbp)
movb -0x69(%rbp), %al
testb $0x1, %al
jne 0xe6278
jmp 0xe62aa
movq -0x58(%rbp), %rax
movq %rax, %rcx
addq $0x2, %rcx
movq %rcx, -0x58(%rbp)
movw (%rax), %cx
movq -0x18(%rbp), %rax
movq %rax, %rdx
addq $0x2, %rdx
movq %rdx, -0x18(%rbp)
movw %cx, (%rax)
movq -0x40(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x40(%rbp)
jmp 0xe6244
movq -0x40(%rbp), %rax
cmpq -0x20(%rbp), %rax
jne 0xe62ce
cmpq $0x0, -0x58(%rbp)
je 0xe62ce
movq -0x58(%rbp), %rax
movzwl (%rax), %eax
cmpl $0x0, %eax
je 0xe62ce
movl $0x1, -0x44(%rbp)
jmp 0xe6162
movq -0x18(%rbp), %rax
movw $0x0, (%rax)
movq -0x40(%rbp), %rcx
movq -0x28(%rbp), %rax
movq %rcx, (%rax)
movl -0x44(%rbp), %eax
movb %al, -0x1(%rbp)
movb -0x1(%rbp), %al
addq $0x70, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
|
my_char_weight_put:
push rbp
mov rbp, rsp
sub rsp, 70h
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov [rbp+var_20], rdx
mov [rbp+var_28], rcx
mov [rbp+var_30], r8
mov [rbp+var_38], r9
mov [rbp+var_44], 0
cmp [rbp+var_20], 0
jnz short loc_E614E
mov rax, [rbp+var_28]
mov qword ptr [rax], 0
cmp [rbp+var_38], 0
setnbe al
and al, 1
movzx eax, al
mov [rbp+var_1], al
jmp loc_E62ED
loc_E614E:
mov rax, [rbp+var_20]
add rax, 0FFFFFFFFFFFFFFFFh
mov [rbp+var_20], rax
mov [rbp+var_40], 0
loc_E6162:
cmp [rbp+var_38], 0
jz loc_E62D3
mov [rbp+var_58], 0
mov rax, [rbp+var_38]
mov [rbp+var_50], rax
loc_E617D:
cmp [rbp+var_50], 1
jbe short loc_E61E7
cmp [rbp+var_50], 6
ja short loc_E61D7
mov rdi, [rbp+var_10]
add rdi, 18h
mov rsi, [rbp+var_30]
mov rdx, [rbp+var_50]
call my_uca_contraction_find
mov [rbp+var_68], rax
cmp rax, 0
jz short loc_E61D7
mov rax, [rbp+var_68]
add rax, 30h ; '0'
mov [rbp+var_58], rax
mov rax, [rbp+var_50]
shl rax, 3
add rax, [rbp+var_30]
mov [rbp+var_30], rax
mov rcx, [rbp+var_50]
mov rax, [rbp+var_38]
sub rax, rcx
mov [rbp+var_38], rax
jmp short loc_E61E7
loc_E61D7:
jmp short $+2
loc_E61D9:
mov rax, [rbp+var_50]
add rax, 0FFFFFFFFFFFFFFFFh
mov [rbp+var_50], rax
jmp short loc_E617D
loc_E61E7:
cmp [rbp+var_58], 0
jnz short loc_E6242
mov rdi, [rbp+var_10]
mov rax, [rbp+var_30]
mov rax, [rax]
mov esi, eax
call my_char_weight_addr
mov [rbp+var_58], rax
cmp [rbp+var_58], 0
jnz short loc_E622A
lea rax, [rbp+var_5E]
mov [rbp+var_58], rax
lea rdi, [rbp+var_5E]
mov rax, [rbp+var_30]
mov rsi, [rax]
mov rax, [rbp+var_10]
mov edx, [rax+30h]
call my_uca_implicit_weight_put
loc_E622A:
mov rax, [rbp+var_30]
add rax, 8
mov [rbp+var_30], rax
mov rax, [rbp+var_38]
add rax, 0FFFFFFFFFFFFFFFFh
mov [rbp+var_38], rax
loc_E6242:
jmp short $+2
loc_E6244:
xor eax, eax
cmp [rbp+var_58], 0
mov [rbp+var_69], al
jz short loc_E626F
mov rax, [rbp+var_58]
movzx ecx, word ptr [rax]
xor eax, eax
cmp ecx, 0
mov [rbp+var_69], al
jz short loc_E626F
mov rax, [rbp+var_40]
cmp rax, [rbp+var_20]
setb al
mov [rbp+var_69], al
loc_E626F:
mov al, [rbp+var_69]
test al, 1
jnz short loc_E6278
jmp short loc_E62AA
loc_E6278:
mov rax, [rbp+var_58]
mov rcx, rax
add rcx, 2
mov [rbp+var_58], rcx
mov cx, [rax]
mov rax, [rbp+var_18]
mov rdx, rax
add rdx, 2
mov [rbp+var_18], rdx
mov [rax], cx
mov rax, [rbp+var_40]
add rax, 1
mov [rbp+var_40], rax
jmp short loc_E6244
loc_E62AA:
mov rax, [rbp+var_40]
cmp rax, [rbp+var_20]
jnz short loc_E62CE
cmp [rbp+var_58], 0
jz short loc_E62CE
mov rax, [rbp+var_58]
movzx eax, word ptr [rax]
cmp eax, 0
jz short loc_E62CE
mov [rbp+var_44], 1
loc_E62CE:
jmp loc_E6162
loc_E62D3:
mov rax, [rbp+var_18]
mov word ptr [rax], 0
mov rcx, [rbp+var_40]
mov rax, [rbp+var_28]
mov [rax], rcx
mov eax, [rbp+var_44]
mov [rbp+var_1], al
loc_E62ED:
mov al, [rbp+var_1]
add rsp, 70h
pop rbp
retn
|
bool my_char_weight_put(
_QWORD *a1,
_WORD *a2,
unsigned long long a3,
unsigned long long *a4,
unsigned long long *a5,
unsigned long long a6)
{
__int16 *v6; // rax
__int16 v7; // cx
_WORD *v8; // rax
bool v10; // [rsp+7h] [rbp-69h]
long long v11; // [rsp+8h] [rbp-68h]
_WORD v12[3]; // [rsp+12h] [rbp-5Eh] BYREF
__int16 *v13; // [rsp+18h] [rbp-58h]
unsigned long long i; // [rsp+20h] [rbp-50h]
int v15; // [rsp+2Ch] [rbp-44h]
unsigned long long v16; // [rsp+30h] [rbp-40h]
unsigned long long v17; // [rsp+38h] [rbp-38h]
unsigned long long *v18; // [rsp+40h] [rbp-30h]
unsigned long long *v19; // [rsp+48h] [rbp-28h]
unsigned long long v20; // [rsp+50h] [rbp-20h]
_WORD *v21; // [rsp+58h] [rbp-18h]
_QWORD *v22; // [rsp+60h] [rbp-10h]
v22 = a1;
v21 = a2;
v20 = a3;
v19 = a4;
v18 = a5;
v17 = a6;
v15 = 0;
if ( a3 )
{
--v20;
v16 = 0LL;
while ( v17 )
{
v13 = 0LL;
for ( i = v17; i > 1; --i )
{
if ( i <= 6 )
{
v11 = my_uca_contraction_find(v22 + 3, v18, i);
if ( v11 )
{
v13 = (__int16 *)(v11 + 48);
v18 += i;
v17 -= i;
break;
}
}
}
if ( !v13 )
{
v13 = (__int16 *)my_char_weight_addr(v22, *v18);
if ( !v13 )
{
v13 = v12;
my_uca_implicit_weight_put(v12, *v18, *((_DWORD *)v22 + 12));
}
++v18;
--v17;
}
while ( 1 )
{
v10 = 0;
if ( v13 )
{
v10 = 0;
if ( *v13 )
v10 = v16 < v20;
}
if ( !v10 )
break;
v6 = v13++;
v7 = *v6;
v8 = v21++;
*v8 = v7;
++v16;
}
if ( v16 == v20 && v13 && *v13 )
v15 = 1;
}
*v21 = 0;
*v19 = v16;
return v15;
}
else
{
*v19 = 0LL;
return v17 != 0;
}
}
|
my_char_weight_put:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x70
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x18],RSI
MOV qword ptr [RBP + -0x20],RDX
MOV qword ptr [RBP + -0x28],RCX
MOV qword ptr [RBP + -0x30],R8
MOV qword ptr [RBP + -0x38],R9
MOV dword ptr [RBP + -0x44],0x0
CMP qword ptr [RBP + -0x20],0x0
JNZ 0x001e614e
MOV RAX,qword ptr [RBP + -0x28]
MOV qword ptr [RAX],0x0
CMP qword ptr [RBP + -0x38],0x0
SETA AL
AND AL,0x1
MOVZX EAX,AL
MOV byte ptr [RBP + -0x1],AL
JMP 0x001e62ed
LAB_001e614e:
MOV RAX,qword ptr [RBP + -0x20]
ADD RAX,-0x1
MOV qword ptr [RBP + -0x20],RAX
MOV qword ptr [RBP + -0x40],0x0
LAB_001e6162:
CMP qword ptr [RBP + -0x38],0x0
JZ 0x001e62d3
MOV qword ptr [RBP + -0x58],0x0
MOV RAX,qword ptr [RBP + -0x38]
MOV qword ptr [RBP + -0x50],RAX
LAB_001e617d:
CMP qword ptr [RBP + -0x50],0x1
JBE 0x001e61e7
CMP qword ptr [RBP + -0x50],0x6
JA 0x001e61d7
MOV RDI,qword ptr [RBP + -0x10]
ADD RDI,0x18
MOV RSI,qword ptr [RBP + -0x30]
MOV RDX,qword ptr [RBP + -0x50]
CALL 0x001e65a0
MOV qword ptr [RBP + -0x68],RAX
CMP RAX,0x0
JZ 0x001e61d7
MOV RAX,qword ptr [RBP + -0x68]
ADD RAX,0x30
MOV qword ptr [RBP + -0x58],RAX
MOV RAX,qword ptr [RBP + -0x50]
SHL RAX,0x3
ADD RAX,qword ptr [RBP + -0x30]
MOV qword ptr [RBP + -0x30],RAX
MOV RCX,qword ptr [RBP + -0x50]
MOV RAX,qword ptr [RBP + -0x38]
SUB RAX,RCX
MOV qword ptr [RBP + -0x38],RAX
JMP 0x001e61e7
LAB_001e61d7:
JMP 0x001e61d9
LAB_001e61d9:
MOV RAX,qword ptr [RBP + -0x50]
ADD RAX,-0x1
MOV qword ptr [RBP + -0x50],RAX
JMP 0x001e617d
LAB_001e61e7:
CMP qword ptr [RBP + -0x58],0x0
JNZ 0x001e6242
MOV RDI,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RBP + -0x30]
MOV RAX,qword ptr [RAX]
MOV ESI,EAX
CALL 0x001e38c0
MOV qword ptr [RBP + -0x58],RAX
CMP qword ptr [RBP + -0x58],0x0
JNZ 0x001e622a
LEA RAX,[RBP + -0x5e]
MOV qword ptr [RBP + -0x58],RAX
LEA RDI,[RBP + -0x5e]
MOV RAX,qword ptr [RBP + -0x30]
MOV RSI,qword ptr [RAX]
MOV RAX,qword ptr [RBP + -0x10]
MOV EDX,dword ptr [RAX + 0x30]
CALL 0x001e5ec0
LAB_001e622a:
MOV RAX,qword ptr [RBP + -0x30]
ADD RAX,0x8
MOV qword ptr [RBP + -0x30],RAX
MOV RAX,qword ptr [RBP + -0x38]
ADD RAX,-0x1
MOV qword ptr [RBP + -0x38],RAX
LAB_001e6242:
JMP 0x001e6244
LAB_001e6244:
XOR EAX,EAX
CMP qword ptr [RBP + -0x58],0x0
MOV byte ptr [RBP + -0x69],AL
JZ 0x001e626f
MOV RAX,qword ptr [RBP + -0x58]
MOVZX ECX,word ptr [RAX]
XOR EAX,EAX
CMP ECX,0x0
MOV byte ptr [RBP + -0x69],AL
JZ 0x001e626f
MOV RAX,qword ptr [RBP + -0x40]
CMP RAX,qword ptr [RBP + -0x20]
SETC AL
MOV byte ptr [RBP + -0x69],AL
LAB_001e626f:
MOV AL,byte ptr [RBP + -0x69]
TEST AL,0x1
JNZ 0x001e6278
JMP 0x001e62aa
LAB_001e6278:
MOV RAX,qword ptr [RBP + -0x58]
MOV RCX,RAX
ADD RCX,0x2
MOV qword ptr [RBP + -0x58],RCX
MOV CX,word ptr [RAX]
MOV RAX,qword ptr [RBP + -0x18]
MOV RDX,RAX
ADD RDX,0x2
MOV qword ptr [RBP + -0x18],RDX
MOV word ptr [RAX],CX
MOV RAX,qword ptr [RBP + -0x40]
ADD RAX,0x1
MOV qword ptr [RBP + -0x40],RAX
JMP 0x001e6244
LAB_001e62aa:
MOV RAX,qword ptr [RBP + -0x40]
CMP RAX,qword ptr [RBP + -0x20]
JNZ 0x001e62ce
CMP qword ptr [RBP + -0x58],0x0
JZ 0x001e62ce
MOV RAX,qword ptr [RBP + -0x58]
MOVZX EAX,word ptr [RAX]
CMP EAX,0x0
JZ 0x001e62ce
MOV dword ptr [RBP + -0x44],0x1
LAB_001e62ce:
JMP 0x001e6162
LAB_001e62d3:
MOV RAX,qword ptr [RBP + -0x18]
MOV word ptr [RAX],0x0
MOV RCX,qword ptr [RBP + -0x40]
MOV RAX,qword ptr [RBP + -0x28]
MOV qword ptr [RAX],RCX
MOV EAX,dword ptr [RBP + -0x44]
MOV byte ptr [RBP + -0x1],AL
LAB_001e62ed:
MOV AL,byte ptr [RBP + -0x1]
ADD RSP,0x70
POP RBP
RET
|
int8
my_char_weight_put(long param_1,short *param_2,long param_3,ulong *param_4,ulong *param_5,
ulong param_6)
{
long lVar1;
ulong uVar2;
bool bVar3;
short local_66 [3];
short *local_60;
ulong local_58;
uint local_4c;
ulong local_48;
ulong local_40;
ulong *local_38;
ulong *local_30;
ulong local_28;
short *local_20;
long local_18;
int1 local_9;
local_4c = 0;
if (param_3 == 0) {
*param_4 = 0;
local_9 = param_6 != 0;
uVar2 = 0;
}
else {
local_28 = param_3 - 1;
local_48 = 0;
local_40 = param_6;
local_38 = param_5;
local_30 = param_4;
local_20 = param_2;
local_18 = param_1;
while (local_40 != 0) {
local_60 = (short *)0x0;
for (local_58 = local_40; 1 < local_58; local_58 = local_58 - 1) {
if ((local_58 < 7) &&
(lVar1 = my_uca_contraction_find(local_18 + 0x18,local_38,local_58), lVar1 != 0)) {
local_60 = (short *)(lVar1 + 0x30);
local_38 = local_38 + local_58;
local_40 = local_40 - local_58;
break;
}
}
if (local_60 == (short *)0x0) {
local_60 = (short *)my_char_weight_addr(local_18,*local_38 & 0xffffffff);
if (local_60 == (short *)0x0) {
local_60 = local_66;
my_uca_implicit_weight_put(local_66,*local_38,*(int4 *)(local_18 + 0x30));
}
local_38 = local_38 + 1;
local_40 = local_40 - 1;
}
while( true ) {
bVar3 = false;
if ((local_60 != (short *)0x0) && (bVar3 = false, *local_60 != 0)) {
bVar3 = local_48 < local_28;
}
if (!bVar3) break;
*local_20 = *local_60;
local_48 = local_48 + 1;
local_60 = local_60 + 1;
local_20 = local_20 + 1;
}
if (((local_48 == local_28) && (local_60 != (short *)0x0)) && (*local_60 != 0)) {
local_4c = 1;
}
}
*local_20 = 0;
*local_30 = local_48;
uVar2 = (ulong)local_4c;
local_9 = (int1)local_4c;
}
return CONCAT71((int7)(uVar2 >> 8),local_9);
}
|
|
8,958 |
voxel_sounds::get_footsteps(voxel_surface)
|
untodesu[P]voxelius/game/client/voxel_sounds.cc
|
resource_ptr<SoundEffect> voxel_sounds::get_footsteps(voxel_surface surface)
{
if(auto effect = get_footsteps_effect(surface)) {
return effect;
}
if(auto effect = get_footsteps_effect(voxel_surface::DEFAULT)) {
return effect;
}
return nullptr;
}
|
O1
|
cpp
|
voxel_sounds::get_footsteps(voxel_surface):
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
callq 0x71ee0
movq (%rbx), %r14
testq %r14, %r14
jne 0x71ed5
movq 0x8(%rbx), %rdi
testq %rdi, %rdi
je 0x71ea5
callq 0x2f77a
testq %r14, %r14
jne 0x71ed5
movq %rbx, %rdi
xorl %esi, %esi
callq 0x71ee0
movq (%rbx), %r14
testq %r14, %r14
jne 0x71ed5
movq 0x8(%rbx), %rdi
testq %rdi, %rdi
je 0x71eca
callq 0x2f77a
testq %r14, %r14
jne 0x71ed5
xorps %xmm0, %xmm0
movups %xmm0, (%rbx)
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
|
_ZN12voxel_sounds13get_footstepsE13voxel_surface:
push r14
push rbx
push rax
mov rbx, rdi
call _ZL20get_footsteps_effect13voxel_surface; get_footsteps_effect(voxel_surface)
mov r14, [rbx]
test r14, r14
jnz short loc_71ED5
mov rdi, [rbx+8]
test rdi, rdi
jz short loc_71EA5
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_71EA5:
test r14, r14
jnz short loc_71ED5
mov rdi, rbx
xor esi, esi
call _ZL20get_footsteps_effect13voxel_surface; get_footsteps_effect(voxel_surface)
mov r14, [rbx]
test r14, r14
jnz short loc_71ED5
mov rdi, [rbx+8]
test rdi, rdi
jz short loc_71ECA
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_71ECA:
test r14, r14
jnz short loc_71ED5
xorps xmm0, xmm0
movups xmmword ptr [rbx], xmm0
loc_71ED5:
mov rax, rbx
add rsp, 8
pop rbx
pop r14
retn
|
long long voxel_sounds::get_footsteps(long long a1)
{
volatile signed __int32 *v2; // rdi
volatile signed __int32 *v3; // rdi
get_footsteps_effect(a1);
if ( !*(_QWORD *)a1 )
{
v2 = *(volatile signed __int32 **)(a1 + 8);
if ( v2 )
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v2);
get_footsteps_effect(a1);
if ( !*(_QWORD *)a1 )
{
v3 = *(volatile signed __int32 **)(a1 + 8);
if ( v3 )
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v3);
*(_OWORD *)a1 = 0LL;
}
}
return a1;
}
|
get_footsteps:
PUSH R14
PUSH RBX
PUSH RAX
MOV RBX,RDI
CALL 0x00171ee0
MOV R14,qword ptr [RBX]
TEST R14,R14
JNZ 0x00171ed5
MOV RDI,qword ptr [RBX + 0x8]
TEST RDI,RDI
JZ 0x00171ea5
CALL 0x0012f77a
LAB_00171ea5:
TEST R14,R14
JNZ 0x00171ed5
MOV RDI,RBX
XOR ESI,ESI
CALL 0x00171ee0
MOV R14,qword ptr [RBX]
TEST R14,R14
JNZ 0x00171ed5
MOV RDI,qword ptr [RBX + 0x8]
TEST RDI,RDI
JZ 0x00171eca
CALL 0x0012f77a
LAB_00171eca:
TEST R14,R14
JNZ 0x00171ed5
XORPS XMM0,XMM0
MOVUPS xmmword ptr [RBX],XMM0
LAB_00171ed5:
MOV RAX,RBX
ADD RSP,0x8
POP RBX
POP R14
RET
|
/* voxel_sounds::get_footsteps(voxel_surface) */
long * voxel_sounds::get_footsteps(long *param_1)
{
get_footsteps_effect();
if (*param_1 == 0) {
if ((_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)param_1[1] !=
(_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) {
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release
((_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)param_1[1]);
}
get_footsteps_effect(param_1,0);
if (*param_1 == 0) {
if ((_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)param_1[1] !=
(_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) {
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release
((_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)param_1[1]);
}
*param_1 = 0;
param_1[1] = 0;
}
}
return param_1;
}
|
|
8,959 |
voxel_sounds::get_footsteps(voxel_surface)
|
untodesu[P]voxelius/game/client/voxel_sounds.cc
|
resource_ptr<SoundEffect> voxel_sounds::get_footsteps(voxel_surface surface)
{
if(auto effect = get_footsteps_effect(surface)) {
return effect;
}
if(auto effect = get_footsteps_effect(voxel_surface::DEFAULT)) {
return effect;
}
return nullptr;
}
|
O2
|
cpp
|
voxel_sounds::get_footsteps(voxel_surface):
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
callq 0x6c076
cmpq $0x0, (%rbx)
jne 0x6c06b
leaq 0x8(%rbx), %r14
movq %r14, %rdi
callq 0x29c54
movq %rbx, %rdi
xorl %esi, %esi
callq 0x6c076
cmpq $0x0, (%rbx)
jne 0x6c06b
movq %r14, %rdi
callq 0x29c54
xorps %xmm0, %xmm0
movups %xmm0, (%rbx)
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
|
_ZN12voxel_sounds13get_footstepsE13voxel_surface:
push r14
push rbx
push rax
mov rbx, rdi
call _ZL20get_footsteps_effect13voxel_surface; get_footsteps_effect(voxel_surface)
cmp qword ptr [rbx], 0
jnz short loc_6C06B
lea r14, [rbx+8]
mov rdi, r14
call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count()
mov rdi, rbx
xor esi, esi
call _ZL20get_footsteps_effect13voxel_surface; get_footsteps_effect(voxel_surface)
cmp qword ptr [rbx], 0
jnz short loc_6C06B
mov rdi, r14
call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count()
xorps xmm0, xmm0
movups xmmword ptr [rbx], xmm0
loc_6C06B:
mov rax, rbx
add rsp, 8
pop rbx
pop r14
retn
|
long long voxel_sounds::get_footsteps(long long a1)
{
get_footsteps_effect(a1);
if ( !*(_QWORD *)a1 )
{
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count((_QWORD *)(a1 + 8));
get_footsteps_effect(a1);
if ( !*(_QWORD *)a1 )
{
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count((_QWORD *)(a1 + 8));
*(_OWORD *)a1 = 0LL;
}
}
return a1;
}
|
get_footsteps:
PUSH R14
PUSH RBX
PUSH RAX
MOV RBX,RDI
CALL 0x0016c076
CMP qword ptr [RBX],0x0
JNZ 0x0016c06b
LEA R14,[RBX + 0x8]
MOV RDI,R14
CALL 0x00129c54
MOV RDI,RBX
XOR ESI,ESI
CALL 0x0016c076
CMP qword ptr [RBX],0x0
JNZ 0x0016c06b
MOV RDI,R14
CALL 0x00129c54
XORPS XMM0,XMM0
MOVUPS xmmword ptr [RBX],XMM0
LAB_0016c06b:
MOV RAX,RBX
ADD RSP,0x8
POP RBX
POP R14
RET
|
/* voxel_sounds::get_footsteps(voxel_surface) */
long * voxel_sounds::get_footsteps(long *param_1)
{
get_footsteps_effect();
if (*param_1 == 0) {
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count
((__shared_count<(__gnu_cxx::_Lock_policy)2> *)(param_1 + 1));
get_footsteps_effect(param_1,0);
if (*param_1 == 0) {
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count
((__shared_count<(__gnu_cxx::_Lock_policy)2> *)(param_1 + 1));
*param_1 = 0;
param_1[1] = 0;
}
}
return param_1;
}
|
|
8,960 |
js_closure
|
bluesky950520[P]quickjs/quickjs.c
|
static JSValue js_closure(JSContext *ctx, JSValue bfunc,
JSVarRef **cur_var_refs,
JSStackFrame *sf)
{
JSFunctionBytecode *b;
JSValue func_obj;
JSAtom name_atom;
b = JS_VALUE_GET_PTR(bfunc);
func_obj = JS_NewObjectClass(ctx, func_kind_to_class_id[b->func_kind]);
if (JS_IsException(func_obj)) {
JS_FreeValue(ctx, bfunc);
return JS_EXCEPTION;
}
func_obj = js_closure2(ctx, func_obj, b, cur_var_refs, sf);
if (JS_IsException(func_obj)) {
/* bfunc has been freed */
goto fail;
}
name_atom = b->func_name;
if (name_atom == JS_ATOM_NULL)
name_atom = JS_ATOM_empty_string;
js_function_set_properties(ctx, func_obj, name_atom,
b->defined_arg_count);
if (b->func_kind & JS_FUNC_GENERATOR) {
JSValue proto;
int proto_class_id;
/* generators have a prototype field which is used as
prototype for the generator object */
if (b->func_kind == JS_FUNC_ASYNC_GENERATOR)
proto_class_id = JS_CLASS_ASYNC_GENERATOR;
else
proto_class_id = JS_CLASS_GENERATOR;
proto = JS_NewObjectProto(ctx, ctx->class_proto[proto_class_id]);
if (JS_IsException(proto))
goto fail;
JS_DefinePropertyValue(ctx, func_obj, JS_ATOM_prototype, proto,
JS_PROP_WRITABLE);
} else if (b->has_prototype) {
/* add the 'prototype' property: delay instantiation to avoid
creating cycles for every javascript function. The prototype
object is created on the fly when first accessed */
JS_SetConstructorBit(ctx, func_obj, TRUE);
JS_DefineAutoInitProperty(ctx, func_obj, JS_ATOM_prototype,
JS_AUTOINIT_ID_PROTOTYPE, NULL,
JS_PROP_WRITABLE);
}
return func_obj;
fail:
/* bfunc is freed when func_obj is freed */
JS_FreeValue(ctx, func_obj);
return JS_EXCEPTION;
}
|
O0
|
c
|
js_closure:
subq $0xa8, %rsp
movq %rsi, 0x88(%rsp)
movq %rdx, 0x90(%rsp)
movq %rdi, 0x80(%rsp)
movq %rcx, 0x78(%rsp)
movq %r8, 0x70(%rsp)
movq 0x88(%rsp), %rax
movq %rax, 0x68(%rsp)
movq 0x80(%rsp), %rdi
movq 0x68(%rsp), %rax
movw 0x18(%rax), %ax
shrw $0x5, %ax
andw $0x3, %ax
movzbl %al, %eax
movl %eax, %ecx
leaq 0xa9171(%rip), %rax # 0x10bf1c
movzwl (%rax,%rcx,2), %esi
callq 0x291c0
movq %rax, 0x40(%rsp)
movq %rdx, 0x48(%rsp)
movq 0x40(%rsp), %rax
movq %rax, 0x58(%rsp)
movq 0x48(%rsp), %rax
movq %rax, 0x60(%rsp)
movq 0x58(%rsp), %rdi
movq 0x60(%rsp), %rsi
callq 0x22a00
cmpl $0x0, %eax
je 0x62e1f
movq 0x80(%rsp), %rdi
movq 0x88(%rsp), %rsi
movq 0x90(%rsp), %rdx
callq 0x229d0
movl $0x0, 0x98(%rsp)
movq $0x6, 0xa0(%rsp)
jmp 0x63040
movq 0x80(%rsp), %rdi
movq 0x68(%rsp), %rcx
movq 0x78(%rsp), %r8
movq 0x70(%rsp), %r9
movq 0x58(%rsp), %rsi
movq 0x60(%rsp), %rdx
callq 0x6c3b0
movq %rax, 0x30(%rsp)
movq %rdx, 0x38(%rsp)
movq 0x30(%rsp), %rax
movq %rax, 0x58(%rsp)
movq 0x38(%rsp), %rax
movq %rax, 0x60(%rsp)
movq 0x58(%rsp), %rdi
movq 0x60(%rsp), %rsi
callq 0x22a00
cmpl $0x0, %eax
je 0x62e7c
jmp 0x63012
movq 0x68(%rsp), %rax
movl 0x2c(%rax), %eax
movl %eax, 0x54(%rsp)
cmpl $0x0, 0x54(%rsp)
jne 0x62e97
movl $0x2f, 0x54(%rsp)
movq 0x80(%rsp), %rdi
movl 0x54(%rsp), %ecx
movq 0x68(%rsp), %rax
movzwl 0x44(%rax), %r8d
movq 0x58(%rsp), %rsi
movq 0x60(%rsp), %rdx
callq 0x29710
movq 0x68(%rsp), %rax
movw 0x18(%rax), %ax
shrw $0x5, %ax
andw $0x3, %ax
movzbl %al, %eax
andl $0x1, %eax
cmpl $0x0, %eax
je 0x62f99
movq 0x68(%rsp), %rax
movw 0x18(%rax), %ax
shrw $0x5, %ax
andw $0x3, %ax
movzbl %al, %eax
cmpl $0x3, %eax
jne 0x62eff
movl $0x39, 0x1c(%rsp)
jmp 0x62f07
movl $0x2f, 0x1c(%rsp)
movq 0x80(%rsp), %rdi
movq 0x80(%rsp), %rax
movq 0x40(%rax), %rax
movslq 0x1c(%rsp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movq (%rax), %rsi
movq 0x8(%rax), %rdx
callq 0x29210
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 0x20(%rsp), %rdi
movq 0x28(%rsp), %rsi
callq 0x22a00
cmpl $0x0, %eax
je 0x62f6a
jmp 0x63012
movq 0x80(%rsp), %rdi
movq 0x58(%rsp), %rsi
movq 0x60(%rsp), %rdx
movq 0x20(%rsp), %r8
movq 0x28(%rsp), %r9
movl $0x3c, %ecx
movl $0x2, (%rsp)
callq 0x35ef0
jmp 0x62ff6
movq 0x68(%rsp), %rax
movw 0x18(%rax), %ax
shrw %ax
andw $0x1, %ax
cmpb $0x0, %al
je 0x62ff4
movq 0x80(%rsp), %rdi
movq 0x58(%rsp), %rsi
movq 0x60(%rsp), %rdx
movl $0x1, %ecx
callq 0x36e80
movq 0x80(%rsp), %rdi
movq 0x58(%rsp), %rsi
movq 0x60(%rsp), %rdx
movl $0x3c, %ecx
xorl %r8d, %r8d
xorl %eax, %eax
movl %eax, %r9d
movl $0x2, (%rsp)
callq 0x6c550
jmp 0x62ff6
movq 0x58(%rsp), %rax
movq %rax, 0x98(%rsp)
movq 0x60(%rsp), %rax
movq %rax, 0xa0(%rsp)
jmp 0x63040
movq 0x80(%rsp), %rdi
movq 0x58(%rsp), %rsi
movq 0x60(%rsp), %rdx
callq 0x229d0
movl $0x0, 0x98(%rsp)
movq $0x6, 0xa0(%rsp)
movq 0x98(%rsp), %rax
movq 0xa0(%rsp), %rdx
addq $0xa8, %rsp
retq
nopl (%rax,%rax)
|
js_closure:
sub rsp, 0A8h
mov [rsp+0A8h+var_20], rsi
mov [rsp+0A8h+var_18], rdx
mov [rsp+0A8h+var_28], rdi
mov [rsp+0A8h+var_30], rcx
mov [rsp+0A8h+var_38], r8
mov rax, [rsp+0A8h+var_20]
mov [rsp+0A8h+var_40], rax
mov rdi, [rsp+0A8h+var_28]
mov rax, [rsp+0A8h+var_40]
mov ax, [rax+18h]
shr ax, 5
and ax, 3
movzx eax, al
mov ecx, eax
lea rax, func_kind_to_class_id
movzx esi, word ptr [rax+rcx*2]
call JS_NewObjectClass
mov [rsp+0A8h+var_68], rax
mov [rsp+0A8h+var_60], rdx
mov rax, [rsp+0A8h+var_68]
mov [rsp+0A8h+var_50], rax
mov rax, [rsp+0A8h+var_60]
mov [rsp+0A8h+var_48], rax
mov rdi, [rsp+0A8h+var_50]
mov rsi, [rsp+0A8h+var_48]
call JS_IsException_1
cmp eax, 0
jz short loc_62E1F
mov rdi, [rsp+0A8h+var_28]
mov rsi, [rsp+0A8h+var_20]
mov rdx, [rsp+0A8h+var_18]
call JS_FreeValue
mov dword ptr [rsp+0A8h+var_10], 0
mov [rsp+0A8h+var_8], 6
jmp loc_63040
loc_62E1F:
mov rdi, [rsp+0A8h+var_28]
mov rcx, [rsp+0A8h+var_40]
mov r8, [rsp+0A8h+var_30]
mov r9, [rsp+0A8h+var_38]
mov rsi, [rsp+0A8h+var_50]
mov rdx, [rsp+0A8h+var_48]
call js_closure2
mov [rsp+0A8h+var_78], rax
mov [rsp+0A8h+var_70], rdx
mov rax, [rsp+0A8h+var_78]
mov [rsp+0A8h+var_50], rax
mov rax, [rsp+0A8h+var_70]
mov [rsp+0A8h+var_48], rax
mov rdi, [rsp+0A8h+var_50]
mov rsi, [rsp+0A8h+var_48]
call JS_IsException_1
cmp eax, 0
jz short loc_62E7C
jmp loc_63012
loc_62E7C:
mov rax, [rsp+0A8h+var_40]
mov eax, [rax+2Ch]
mov [rsp+0A8h+var_54], eax
cmp [rsp+0A8h+var_54], 0
jnz short loc_62E97
mov [rsp+0A8h+var_54], 2Fh ; '/'
loc_62E97:
mov rdi, [rsp+0A8h+var_28]
mov ecx, [rsp+0A8h+var_54]
mov rax, [rsp+0A8h+var_40]
movzx r8d, word ptr [rax+44h]
mov rsi, [rsp+0A8h+var_50]
mov rdx, [rsp+0A8h+var_48]
call js_function_set_properties
mov rax, [rsp+0A8h+var_40]
mov ax, [rax+18h]
shr ax, 5
and ax, 3
movzx eax, al
and eax, 1
cmp eax, 0
jz loc_62F99
mov rax, [rsp+0A8h+var_40]
mov ax, [rax+18h]
shr ax, 5
and ax, 3
movzx eax, al
cmp eax, 3
jnz short loc_62EFF
mov [rsp+0A8h+var_8C], 39h ; '9'
jmp short loc_62F07
loc_62EFF:
mov [rsp+0A8h+var_8C], 2Fh ; '/'
loc_62F07:
mov rdi, [rsp+0A8h+var_28]
mov rax, [rsp+0A8h+var_28]
mov rax, [rax+40h]
movsxd rcx, [rsp+0A8h+var_8C]
shl rcx, 4
add rax, rcx
mov rsi, [rax]
mov rdx, [rax+8]
call JS_NewObjectProto
mov [rsp+0A8h+var_A0], rax
mov [rsp+0A8h+var_98], rdx
mov rax, [rsp+0A8h+var_A0]
mov [rsp+0A8h+var_88], rax
mov rax, [rsp+0A8h+var_98]
mov [rsp+0A8h+var_80], rax
mov rdi, [rsp+0A8h+var_88]
mov rsi, [rsp+0A8h+var_80]
call JS_IsException_1
cmp eax, 0
jz short loc_62F6A
jmp loc_63012
loc_62F6A:
mov rdi, [rsp+0A8h+var_28]
mov rsi, [rsp+0A8h+var_50]
mov rdx, [rsp+0A8h+var_48]
mov r8, [rsp+0A8h+var_88]
mov r9, [rsp+0A8h+var_80]
mov ecx, 3Ch ; '<'
mov [rsp+0A8h+var_A8], 2
call JS_DefinePropertyValue
jmp short loc_62FF6
loc_62F99:
mov rax, [rsp+0A8h+var_40]
mov ax, [rax+18h]
shr ax, 1
and ax, 1
cmp al, 0
jz short loc_62FF4
mov rdi, [rsp+0A8h+var_28]
mov rsi, [rsp+0A8h+var_50]
mov rdx, [rsp+0A8h+var_48]
mov ecx, 1
call JS_SetConstructorBit
mov rdi, [rsp+0A8h+var_28]
mov rsi, [rsp+0A8h+var_50]
mov rdx, [rsp+0A8h+var_48]
mov ecx, 3Ch ; '<'
xor r8d, r8d
xor eax, eax
mov r9d, eax
mov [rsp+0A8h+var_A8], 2
call JS_DefineAutoInitProperty
loc_62FF4:
jmp short $+2
loc_62FF6:
mov rax, [rsp+0A8h+var_50]
mov [rsp+0A8h+var_10], rax
mov rax, [rsp+0A8h+var_48]
mov [rsp+0A8h+var_8], rax
jmp short loc_63040
loc_63012:
mov rdi, [rsp+0A8h+var_28]
mov rsi, [rsp+0A8h+var_50]
mov rdx, [rsp+0A8h+var_48]
call JS_FreeValue
mov dword ptr [rsp+0A8h+var_10], 0
mov [rsp+0A8h+var_8], 6
loc_63040:
mov rax, [rsp+0A8h+var_10]
mov rdx, [rsp+0A8h+var_8]
add rsp, 0A8h
retn
|
long long js_closure(
long long a1,
long long a2,
long long a3,
long long a4,
long long a5,
__m128 a6,
__m128 a7,
__m128 a8,
__m128 a9,
double a10,
double a11,
__m128 a12,
__m128 a13)
{
long long v13; // rdx
long long v14; // rdx
long long *v15; // rax
long long v16; // rdx
__m128 v17; // xmm4
__m128 v18; // xmm5
_DWORD *v20; // [rsp+8h] [rbp-A0h]
int v21; // [rsp+1Ch] [rbp-8Ch]
long long v22; // [rsp+28h] [rbp-80h]
long long v23; // [rsp+30h] [rbp-78h]
long long v24; // [rsp+40h] [rbp-68h]
unsigned int v25; // [rsp+54h] [rbp-54h]
long long v26; // [rsp+60h] [rbp-48h]
long long v27; // [rsp+60h] [rbp-48h]
long long v31; // [rsp+98h] [rbp-10h]
v24 = JS_NewObjectClass(a1, func_kind_to_class_id[(*(_WORD *)(a2 + 24) >> 5) & 3]);
v26 = v13;
if ( !JS_IsException_1(v24, v13) )
{
v23 = js_closure2(a1, v24, v26, a2, a4, a5);
v27 = v14;
if ( !JS_IsException_1(v23, v14) )
{
v25 = *(_DWORD *)(a2 + 44);
if ( !v25 )
v25 = 47;
js_function_set_properties(a1, v23, v27, v25, *(unsigned __int16 *)(a2 + 68));
if ( (*(_WORD *)(a2 + 24) & 0x20) == 0 )
{
if ( (*(_WORD *)(a2 + 24) & 2) != 0 )
{
JS_SetConstructorBit(a1, v23, v27, 1);
JS_DefineAutoInitProperty(a1, v23, v27, 60, 0, 0, 2);
}
return v23;
}
if ( ((*(_WORD *)(a2 + 24) >> 5) & 3) == 3 )
v21 = 57;
else
v21 = 47;
v15 = (long long *)(16LL * v21 + *(_QWORD *)(a1 + 64));
v20 = (_DWORD *)JS_NewObjectProto(a1, *v15, v15[1]);
v22 = v16;
if ( !JS_IsException_1((long long)v20, v16) )
{
JS_DefinePropertyValue(a1, v23, v27, 0x3Cu, v20, v22, a6, a7, a8, a9, v17, v18, a12, a13, 2);
return v23;
}
}
JS_FreeValue(a1, v23, v27);
LODWORD(v31) = 0;
return v31;
}
JS_FreeValue(a1, a2, a3);
LODWORD(v31) = 0;
return v31;
}
|
js_closure:
SUB RSP,0xa8
MOV qword ptr [RSP + 0x88],RSI
MOV qword ptr [RSP + 0x90],RDX
MOV qword ptr [RSP + 0x80],RDI
MOV qword ptr [RSP + 0x78],RCX
MOV qword ptr [RSP + 0x70],R8
MOV RAX,qword ptr [RSP + 0x88]
MOV qword ptr [RSP + 0x68],RAX
MOV RDI,qword ptr [RSP + 0x80]
MOV RAX,qword ptr [RSP + 0x68]
MOV AX,word ptr [RAX + 0x18]
SHR AX,0x5
AND AX,0x3
MOVZX EAX,AL
MOV ECX,EAX
LEA RAX,[0x20bf1c]
MOVZX ESI,word ptr [RAX + RCX*0x2]
CALL 0x001291c0
MOV qword ptr [RSP + 0x40],RAX
MOV qword ptr [RSP + 0x48],RDX
MOV RAX,qword ptr [RSP + 0x40]
MOV qword ptr [RSP + 0x58],RAX
MOV RAX,qword ptr [RSP + 0x48]
MOV qword ptr [RSP + 0x60],RAX
MOV RDI,qword ptr [RSP + 0x58]
MOV RSI,qword ptr [RSP + 0x60]
CALL 0x00122a00
CMP EAX,0x0
JZ 0x00162e1f
MOV RDI,qword ptr [RSP + 0x80]
MOV RSI,qword ptr [RSP + 0x88]
MOV RDX,qword ptr [RSP + 0x90]
CALL 0x001229d0
MOV dword ptr [RSP + 0x98],0x0
MOV qword ptr [RSP + 0xa0],0x6
JMP 0x00163040
LAB_00162e1f:
MOV RDI,qword ptr [RSP + 0x80]
MOV RCX,qword ptr [RSP + 0x68]
MOV R8,qword ptr [RSP + 0x78]
MOV R9,qword ptr [RSP + 0x70]
MOV RSI,qword ptr [RSP + 0x58]
MOV RDX,qword ptr [RSP + 0x60]
CALL 0x0016c3b0
MOV qword ptr [RSP + 0x30],RAX
MOV qword ptr [RSP + 0x38],RDX
MOV RAX,qword ptr [RSP + 0x30]
MOV qword ptr [RSP + 0x58],RAX
MOV RAX,qword ptr [RSP + 0x38]
MOV qword ptr [RSP + 0x60],RAX
MOV RDI,qword ptr [RSP + 0x58]
MOV RSI,qword ptr [RSP + 0x60]
CALL 0x00122a00
CMP EAX,0x0
JZ 0x00162e7c
JMP 0x00163012
LAB_00162e7c:
MOV RAX,qword ptr [RSP + 0x68]
MOV EAX,dword ptr [RAX + 0x2c]
MOV dword ptr [RSP + 0x54],EAX
CMP dword ptr [RSP + 0x54],0x0
JNZ 0x00162e97
MOV dword ptr [RSP + 0x54],0x2f
LAB_00162e97:
MOV RDI,qword ptr [RSP + 0x80]
MOV ECX,dword ptr [RSP + 0x54]
MOV RAX,qword ptr [RSP + 0x68]
MOVZX R8D,word ptr [RAX + 0x44]
MOV RSI,qword ptr [RSP + 0x58]
MOV RDX,qword ptr [RSP + 0x60]
CALL 0x00129710
MOV RAX,qword ptr [RSP + 0x68]
MOV AX,word ptr [RAX + 0x18]
SHR AX,0x5
AND AX,0x3
MOVZX EAX,AL
AND EAX,0x1
CMP EAX,0x0
JZ 0x00162f99
MOV RAX,qword ptr [RSP + 0x68]
MOV AX,word ptr [RAX + 0x18]
SHR AX,0x5
AND AX,0x3
MOVZX EAX,AL
CMP EAX,0x3
JNZ 0x00162eff
MOV dword ptr [RSP + 0x1c],0x39
JMP 0x00162f07
LAB_00162eff:
MOV dword ptr [RSP + 0x1c],0x2f
LAB_00162f07:
MOV RDI,qword ptr [RSP + 0x80]
MOV RAX,qword ptr [RSP + 0x80]
MOV RAX,qword ptr [RAX + 0x40]
MOVSXD RCX,dword ptr [RSP + 0x1c]
SHL RCX,0x4
ADD RAX,RCX
MOV RSI,qword ptr [RAX]
MOV RDX,qword ptr [RAX + 0x8]
CALL 0x00129210
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 + 0x20]
MOV RSI,qword ptr [RSP + 0x28]
CALL 0x00122a00
CMP EAX,0x0
JZ 0x00162f6a
JMP 0x00163012
LAB_00162f6a:
MOV RDI,qword ptr [RSP + 0x80]
MOV RSI,qword ptr [RSP + 0x58]
MOV RDX,qword ptr [RSP + 0x60]
MOV R8,qword ptr [RSP + 0x20]
MOV R9,qword ptr [RSP + 0x28]
MOV ECX,0x3c
MOV dword ptr [RSP],0x2
CALL 0x00135ef0
JMP 0x00162ff6
LAB_00162f99:
MOV RAX,qword ptr [RSP + 0x68]
MOV AX,word ptr [RAX + 0x18]
SHR AX,0x1
AND AX,0x1
CMP AL,0x0
JZ 0x00162ff4
MOV RDI,qword ptr [RSP + 0x80]
MOV RSI,qword ptr [RSP + 0x58]
MOV RDX,qword ptr [RSP + 0x60]
MOV ECX,0x1
CALL 0x00136e80
MOV RDI,qword ptr [RSP + 0x80]
MOV RSI,qword ptr [RSP + 0x58]
MOV RDX,qword ptr [RSP + 0x60]
MOV ECX,0x3c
XOR R8D,R8D
XOR EAX,EAX
MOV R9D,EAX
MOV dword ptr [RSP],0x2
CALL 0x0016c550
LAB_00162ff4:
JMP 0x00162ff6
LAB_00162ff6:
MOV RAX,qword ptr [RSP + 0x58]
MOV qword ptr [RSP + 0x98],RAX
MOV RAX,qword ptr [RSP + 0x60]
MOV qword ptr [RSP + 0xa0],RAX
JMP 0x00163040
LAB_00163012:
MOV RDI,qword ptr [RSP + 0x80]
MOV RSI,qword ptr [RSP + 0x58]
MOV RDX,qword ptr [RSP + 0x60]
CALL 0x001229d0
MOV dword ptr [RSP + 0x98],0x0
MOV qword ptr [RSP + 0xa0],0x6
LAB_00163040:
MOV RAX,qword ptr [RSP + 0x98]
MOV RDX,qword ptr [RSP + 0xa0]
ADD RSP,0xa8
RET
|
int1 [16]
js_closure(long param_1,long param_2,int8 param_3,int8 param_4,int8 param_5)
{
int iVar1;
int8 uVar2;
int8 *puVar3;
int1 auVar4 [16];
int1 auVar5 [16];
int local_8c;
int local_54;
int4 local_10;
int4 uStack_c;
int8 local_8;
auVar4 = JS_NewObjectClass(param_1,*(int2 *)
((long)&func_kind_to_class_id +
(ulong)((byte)(*(ushort *)(param_2 + 0x18) >> 5) & 3) * 2));
iVar1 = JS_IsException(auVar4._0_8_,auVar4._8_8_);
if (iVar1 != 0) {
JS_FreeValue(param_1,param_2,param_3);
local_10 = 0;
local_8 = 6;
goto LAB_00163040;
}
auVar4 = js_closure2(param_1,auVar4._0_8_,auVar4._8_8_,param_2,param_4,param_5);
local_8 = auVar4._8_8_;
uVar2 = auVar4._0_8_;
iVar1 = JS_IsException(uVar2,local_8);
if (iVar1 == 0) {
local_54 = *(int *)(param_2 + 0x2c);
if (local_54 == 0) {
local_54 = 0x2f;
}
js_function_set_properties(param_1,uVar2,local_8,local_54,*(int2 *)(param_2 + 0x44));
if ((*(ushort *)(param_2 + 0x18) >> 5 & 1) == 0) {
if ((*(ushort *)(param_2 + 0x18) >> 1 & 1) != 0) {
JS_SetConstructorBit(param_1,uVar2,local_8,1);
JS_DefineAutoInitProperty(param_1,uVar2,local_8,0x3c,0,0,2);
}
}
else {
if (((byte)(*(ushort *)(param_2 + 0x18) >> 5) & 3) == 3) {
local_8c = 0x39;
}
else {
local_8c = 0x2f;
}
puVar3 = (int8 *)(*(long *)(param_1 + 0x40) + (long)local_8c * 0x10);
auVar5 = JS_NewObjectProto(param_1,*puVar3,puVar3[1]);
iVar1 = JS_IsException(auVar5._0_8_,auVar5._8_8_);
if (iVar1 != 0) goto LAB_00163012;
JS_DefinePropertyValue(param_1,uVar2,local_8,0x3c,auVar5._0_8_,auVar5._8_8_,2);
}
local_10 = auVar4._0_4_;
uStack_c = auVar4._4_4_;
}
else {
LAB_00163012:
JS_FreeValue(param_1,uVar2,local_8);
local_10 = 0;
local_8 = 6;
}
LAB_00163040:
auVar4._4_4_ = uStack_c;
auVar4._0_4_ = local_10;
auVar4._8_8_ = local_8;
return auVar4;
}
|
|
8,961 |
js_closure
|
bluesky950520[P]quickjs/quickjs.c
|
static JSValue js_closure(JSContext *ctx, JSValue bfunc,
JSVarRef **cur_var_refs,
JSStackFrame *sf)
{
JSFunctionBytecode *b;
JSValue func_obj;
JSAtom name_atom;
b = JS_VALUE_GET_PTR(bfunc);
func_obj = JS_NewObjectClass(ctx, func_kind_to_class_id[b->func_kind]);
if (JS_IsException(func_obj)) {
JS_FreeValue(ctx, bfunc);
return JS_EXCEPTION;
}
func_obj = js_closure2(ctx, func_obj, b, cur_var_refs, sf);
if (JS_IsException(func_obj)) {
/* bfunc has been freed */
goto fail;
}
name_atom = b->func_name;
if (name_atom == JS_ATOM_NULL)
name_atom = JS_ATOM_empty_string;
js_function_set_properties(ctx, func_obj, name_atom,
b->defined_arg_count);
if (b->func_kind & JS_FUNC_GENERATOR) {
JSValue proto;
int proto_class_id;
/* generators have a prototype field which is used as
prototype for the generator object */
if (b->func_kind == JS_FUNC_ASYNC_GENERATOR)
proto_class_id = JS_CLASS_ASYNC_GENERATOR;
else
proto_class_id = JS_CLASS_GENERATOR;
proto = JS_NewObjectProto(ctx, ctx->class_proto[proto_class_id]);
if (JS_IsException(proto))
goto fail;
JS_DefinePropertyValue(ctx, func_obj, JS_ATOM_prototype, proto,
JS_PROP_WRITABLE);
} else if (b->has_prototype) {
/* add the 'prototype' property: delay instantiation to avoid
creating cycles for every javascript function. The prototype
object is created on the fly when first accessed */
JS_SetConstructorBit(ctx, func_obj, TRUE);
JS_DefineAutoInitProperty(ctx, func_obj, JS_ATOM_prototype,
JS_AUTOINIT_ID_PROTOTYPE, NULL,
JS_PROP_WRITABLE);
}
return func_obj;
fail:
/* bfunc is freed when func_obj is freed */
JS_FreeValue(ctx, func_obj);
return JS_EXCEPTION;
}
|
O1
|
c
|
js_closure:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %r8, %rbx
movq %rcx, %r15
movq %rdx, %r13
movq %rsi, %r12
movq %rdi, %r14
movzwl 0x18(%rsi), %eax
shrl $0x4, %eax
andl $0x6, %eax
leaq 0x5ee61(%rip), %rcx # 0x9d258
movzwl (%rax,%rcx), %ecx
movq 0x40(%rdi), %rax
movl %ecx, %edx
shll $0x4, %edx
movq (%rax,%rdx), %rsi
movq 0x8(%rax,%rdx), %rdx
callq 0x202f1
cmpl $0x6, %edx
jne 0x3e423
movq 0x18(%r14), %rdi
movq %r12, %rsi
movq %r13, %rdx
jmp 0x3e450
movq %r14, %rdi
movq %rax, %rsi
movq %r12, %rcx
movq %r15, %r8
movq %rbx, %r9
callq 0x4081e
movq %rax, %r15
movq %rdx, %rbx
movl %ebx, %r13d
cmpq $0x6, %r13
jne 0x3e472
movq 0x18(%r14), %rdi
movq %r15, %rsi
movq %rbx, %rdx
callq 0x1ccb2
movl $0x6, %ebx
xorl %eax, %eax
xorl %ecx, %ecx
orq %rcx, %rax
movq %rbx, %rdx
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
movl 0x2c(%r12), %eax
testl %eax, %eax
movl $0x2f, %ecx
cmovnel %eax, %ecx
movzwl 0x44(%r12), %r8d
movq %r14, %rdi
movq %r15, %rsi
movq %rbx, %rdx
callq 0x205e8
movzwl 0x18(%r12), %eax
testb $0x20, %al
jne 0x3e4dd
testb $0x2, %al
je 0x3e532
movq %r15, 0x8(%rsp)
cmpl $-0x1, %r13d
jne 0x3e4bb
movq 0x8(%rsp), %rax
orb $0x10, 0x5(%rax)
movl $0x2, (%rsp)
movq %r14, %rdi
movq %r15, %rsi
movq %rbx, %rdx
movl $0x3c, %ecx
xorl %r8d, %r8d
xorl %r9d, %r9d
callq 0x40903
jmp 0x3e532
notl %eax
testb $0x60, %al
movq 0x40(%r14), %rax
movl $0x390, %ecx # imm = 0x390
movl $0x2f0, %edx # imm = 0x2F0
cmovel %ecx, %edx
movq (%rax,%rdx), %rsi
movq 0x8(%rax,%rdx), %rdx
movq %r14, %rdi
movl $0x1, %ecx
callq 0x202f1
movq %rdx, %r9
cmpl $0x6, %r9d
je 0x3e446
movl $0x2, (%rsp)
movq %r14, %rdi
movq %r15, %rsi
movq %rbx, %rdx
movl $0x3c, %ecx
movq %rax, %r8
callq 0x25ea7
movabsq $-0x100000000, %rax # imm = 0xFFFFFFFF00000000
movq %r15, %rcx
andq %rax, %rcx
movl %r15d, %eax
jmp 0x3e45e
|
js_closure:
push r15
push r14
push r13
push r12
push rbx
sub rsp, 10h
mov rbx, r8
mov r15, rcx
mov r13, rdx
mov r12, rsi
mov r14, rdi
movzx eax, word ptr [rsi+18h]
shr eax, 4
and eax, 6
lea rcx, func_kind_to_class_id
movzx ecx, word ptr [rax+rcx]
mov rax, [rdi+40h]
mov edx, ecx
shl edx, 4
mov rsi, [rax+rdx]
mov rdx, [rax+rdx+8]
call JS_NewObjectProtoClass
cmp edx, 6
jnz short loc_3E423
mov rdi, [r14+18h]
mov rsi, r12
mov rdx, r13
jmp short loc_3E450
loc_3E423:
mov rdi, r14
mov rsi, rax
mov rcx, r12
mov r8, r15
mov r9, rbx
call js_closure2
mov r15, rax
mov rbx, rdx
mov r13d, ebx
cmp r13, 6
jnz short loc_3E472
loc_3E446:
mov rdi, [r14+18h]
mov rsi, r15
mov rdx, rbx
loc_3E450:
call JS_FreeValueRT
mov ebx, 6
xor eax, eax
xor ecx, ecx
loc_3E45E:
or rax, rcx
mov rdx, rbx
add rsp, 10h
pop rbx
pop r12
pop r13
pop r14
pop r15
retn
loc_3E472:
mov eax, [r12+2Ch]
test eax, eax
mov ecx, 2Fh ; '/'
cmovnz ecx, eax
movzx r8d, word ptr [r12+44h]
mov rdi, r14
mov rsi, r15
mov rdx, rbx
call js_function_set_properties
movzx eax, word ptr [r12+18h]
test al, 20h
jnz short loc_3E4DD
test al, 2
jz loc_3E532
mov [rsp+38h+var_30], r15
cmp r13d, 0FFFFFFFFh
jnz short loc_3E4BB
mov rax, [rsp+38h+var_30]
or byte ptr [rax+5], 10h
loc_3E4BB:
mov [rsp+38h+var_38], 2
mov rdi, r14
mov rsi, r15
mov rdx, rbx
mov ecx, 3Ch ; '<'
xor r8d, r8d
xor r9d, r9d
call JS_DefineAutoInitProperty
jmp short loc_3E532
loc_3E4DD:
not eax
test al, 60h
mov rax, [r14+40h]
mov ecx, 390h
mov edx, 2F0h
cmovz edx, ecx
mov rsi, [rax+rdx]
mov rdx, [rax+rdx+8]
mov rdi, r14
mov ecx, 1
call JS_NewObjectProtoClass
mov r9, rdx
cmp r9d, 6
jz loc_3E446
mov [rsp+38h+var_38], 2
mov rdi, r14
mov rsi, r15
mov rdx, rbx
mov ecx, 3Ch ; '<'
mov r8, rax
call JS_DefinePropertyValue
loc_3E532:
mov rax, 0FFFFFFFF00000000h
mov rcx, r15
and rcx, rax
mov eax, r15d
jmp loc_3E45E
|
unsigned long long js_closure(
long long a1,
long long a2,
long long a3,
long long a4,
long long a5,
double a6,
__m128 a7,
__m128 a8,
__m128 a9,
double a10,
double a11,
__m128 a12,
__m128 a13)
{
unsigned int v16; // edx
long long v17; // rax
long long v18; // rdx
long long v19; // rdi
long long v20; // rdx
long long v21; // rdx
long long v22; // r15
long long v23; // rbx
int v24; // r13d
long long v25; // rax
unsigned long long v26; // rcx
int v28; // ecx
__int16 v29; // ax
long long v30; // rdx
_DWORD *v31; // rax
long long v32; // rdx
__m128 v33; // xmm4
__m128 v34; // xmm5
v16 = 16 * *(unsigned __int16 *)((char *)func_kind_to_class_id + ((*(unsigned __int16 *)(a2 + 24) >> 4) & 6));
v17 = JS_NewObjectProtoClass(
a1,
*(_QWORD *)(*(_QWORD *)(a1 + 64) + v16),
*(_QWORD *)(*(_QWORD *)(a1 + 64) + v16 + 8LL),
*(unsigned __int16 *)((char *)func_kind_to_class_id + ((*(unsigned __int16 *)(a2 + 24) >> 4) & 6)));
if ( (_DWORD)v18 != 6 )
{
v22 = js_closure2(a1, v17, v18, a2, a4, a5);
v23 = v21;
v24 = v21;
if ( (unsigned int)v21 == 6LL )
{
LABEL_4:
v19 = *(_QWORD *)(a1 + 24);
a2 = v22;
v20 = v23;
goto LABEL_5;
}
v28 = 47;
if ( *(_DWORD *)(a2 + 44) )
v28 = *(_DWORD *)(a2 + 44);
js_function_set_properties(a1, v22, v21, v28, *(unsigned __int16 *)(a2 + 68));
v29 = *(_WORD *)(a2 + 24);
if ( (v29 & 0x20) != 0 )
{
v30 = 752LL;
if ( (~(_BYTE)v29 & 0x60) == 0 )
v30 = 912LL;
v31 = (_DWORD *)JS_NewObjectProtoClass(
a1,
*(_QWORD *)(*(_QWORD *)(a1 + 64) + v30),
*(_QWORD *)(*(_QWORD *)(a1 + 64) + v30 + 8),
1u);
if ( (_DWORD)v32 == 6 )
goto LABEL_4;
JS_DefinePropertyValue(a1, v22, v23, 60LL, v31, v32, a6, a7, a8, a9, v33, v34, a12, a13, 2);
}
else if ( (v29 & 2) != 0 )
{
if ( v24 == -1 )
*(_BYTE *)(v22 + 5) |= 0x10u;
JS_DefineAutoInitProperty(a1, v22, v23, 60, 0, 0, 2);
}
v26 = v22 & 0xFFFFFFFF00000000LL;
v25 = (unsigned int)v22;
return v26 | v25;
}
v19 = *(_QWORD *)(a1 + 24);
v20 = a3;
LABEL_5:
JS_FreeValueRT(v19, (_DWORD *)a2, v20);
v25 = 0LL;
v26 = 0LL;
return v26 | v25;
}
|
js_closure:
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x10
MOV RBX,R8
MOV R15,RCX
MOV R13,RDX
MOV R12,RSI
MOV R14,RDI
MOVZX EAX,word ptr [RSI + 0x18]
SHR EAX,0x4
AND EAX,0x6
LEA RCX,[0x19d258]
MOVZX ECX,word ptr [RAX + RCX*0x1]
MOV RAX,qword ptr [RDI + 0x40]
MOV EDX,ECX
SHL EDX,0x4
MOV RSI,qword ptr [RAX + RDX*0x1]
MOV RDX,qword ptr [RAX + RDX*0x1 + 0x8]
CALL 0x001202f1
CMP EDX,0x6
JNZ 0x0013e423
MOV RDI,qword ptr [R14 + 0x18]
MOV RSI,R12
MOV RDX,R13
JMP 0x0013e450
LAB_0013e423:
MOV RDI,R14
MOV RSI,RAX
MOV RCX,R12
MOV R8,R15
MOV R9,RBX
CALL 0x0014081e
MOV R15,RAX
MOV RBX,RDX
MOV R13D,EBX
CMP R13,0x6
JNZ 0x0013e472
LAB_0013e446:
MOV RDI,qword ptr [R14 + 0x18]
MOV RSI,R15
MOV RDX,RBX
LAB_0013e450:
CALL 0x0011ccb2
MOV EBX,0x6
XOR EAX,EAX
XOR ECX,ECX
LAB_0013e45e:
OR RAX,RCX
MOV RDX,RBX
ADD RSP,0x10
POP RBX
POP R12
POP R13
POP R14
POP R15
RET
LAB_0013e472:
MOV EAX,dword ptr [R12 + 0x2c]
TEST EAX,EAX
MOV ECX,0x2f
CMOVNZ ECX,EAX
MOVZX R8D,word ptr [R12 + 0x44]
MOV RDI,R14
MOV RSI,R15
MOV RDX,RBX
CALL 0x001205e8
MOVZX EAX,word ptr [R12 + 0x18]
TEST AL,0x20
JNZ 0x0013e4dd
TEST AL,0x2
JZ 0x0013e532
MOV qword ptr [RSP + 0x8],R15
CMP R13D,-0x1
JNZ 0x0013e4bb
MOV RAX,qword ptr [RSP + 0x8]
OR byte ptr [RAX + 0x5],0x10
LAB_0013e4bb:
MOV dword ptr [RSP],0x2
MOV RDI,R14
MOV RSI,R15
MOV RDX,RBX
MOV ECX,0x3c
XOR R8D,R8D
XOR R9D,R9D
CALL 0x00140903
JMP 0x0013e532
LAB_0013e4dd:
NOT EAX
TEST AL,0x60
MOV RAX,qword ptr [R14 + 0x40]
MOV ECX,0x390
MOV EDX,0x2f0
CMOVZ EDX,ECX
MOV RSI,qword ptr [RAX + RDX*0x1]
MOV RDX,qword ptr [RAX + RDX*0x1 + 0x8]
MOV RDI,R14
MOV ECX,0x1
CALL 0x001202f1
MOV R9,RDX
CMP R9D,0x6
JZ 0x0013e446
MOV dword ptr [RSP],0x2
MOV RDI,R14
MOV RSI,R15
MOV RDX,RBX
MOV ECX,0x3c
MOV R8,RAX
CALL 0x00125ea7
LAB_0013e532:
MOV RAX,-0x100000000
MOV RCX,R15
AND RCX,RAX
MOV EAX,R15D
JMP 0x0013e45e
|
int1 [16]
js_closure(long param_1,long param_2,int8 param_3,int8 param_4,int8 param_5)
{
ushort uVar1;
ulong uVar2;
int iVar3;
ulong uVar4;
long lVar5;
ulong uVar6;
int8 uVar7;
int1 auVar8 [16];
int1 auVar9 [16];
auVar9._8_8_ = param_3;
auVar9._0_8_ = param_2;
lVar5 = (ulong)*(ushort *)
((long)&func_kind_to_class_id + (ulong)(*(ushort *)(param_2 + 0x18) >> 4 & 6)) *
0x10;
auVar8 = JS_NewObjectProtoClass
(param_1,*(int8 *)(*(long *)(param_1 + 0x40) + lVar5),
*(int8 *)(*(long *)(param_1 + 0x40) + 8 + lVar5));
if (auVar8._8_4_ == 6) {
uVar7 = *(int8 *)(param_1 + 0x18);
}
else {
auVar9 = js_closure2(param_1,auVar8._0_8_,auVar8._8_8_,param_2,param_4,param_5);
uVar6 = auVar9._8_8_;
uVar2 = auVar9._0_8_;
if ((uVar6 & 0xffffffff) != 6) {
iVar3 = 0x2f;
if (*(int *)(param_2 + 0x2c) != 0) {
iVar3 = *(int *)(param_2 + 0x2c);
}
js_function_set_properties(param_1,uVar2,uVar6,iVar3,*(int2 *)(param_2 + 0x44));
uVar1 = *(ushort *)(param_2 + 0x18);
if ((uVar1 & 0x20) == 0) {
if ((uVar1 & 2) != 0) {
if (auVar9._8_4_ == -1) {
*(byte *)(uVar2 + 5) = *(byte *)(uVar2 + 5) | 0x10;
}
JS_DefineAutoInitProperty(param_1,uVar2,uVar6,0x3c,0,0,2);
}
}
else {
lVar5 = 0x2f0;
if ((~uVar1 & 0x60) == 0) {
lVar5 = 0x390;
}
auVar8 = JS_NewObjectProtoClass
(param_1,*(int8 *)(*(long *)(param_1 + 0x40) + lVar5),
*(int8 *)(*(long *)(param_1 + 0x40) + 8 + lVar5),1);
if (auVar8._8_4_ == 6) goto LAB_0013e446;
JS_DefinePropertyValue(param_1,uVar2,uVar6,0x3c,auVar8._0_8_,auVar8._8_8_,2);
}
uVar4 = uVar2 & 0xffffffff00000000;
uVar2 = uVar2 & 0xffffffff;
goto LAB_0013e45e;
}
LAB_0013e446:
uVar7 = *(int8 *)(param_1 + 0x18);
}
JS_FreeValueRT(uVar7,auVar9._0_8_,auVar9._8_8_);
uVar6 = 6;
uVar2 = 0;
uVar4 = 0;
LAB_0013e45e:
auVar8._0_8_ = uVar2 | uVar4;
auVar8._8_8_ = uVar6;
return auVar8;
}
|
|
8,962 |
js_closure
|
bluesky950520[P]quickjs/quickjs.c
|
static JSValue js_closure(JSContext *ctx, JSValue bfunc,
JSVarRef **cur_var_refs,
JSStackFrame *sf)
{
JSFunctionBytecode *b;
JSValue func_obj;
JSAtom name_atom;
b = JS_VALUE_GET_PTR(bfunc);
func_obj = JS_NewObjectClass(ctx, func_kind_to_class_id[b->func_kind]);
if (JS_IsException(func_obj)) {
JS_FreeValue(ctx, bfunc);
return JS_EXCEPTION;
}
func_obj = js_closure2(ctx, func_obj, b, cur_var_refs, sf);
if (JS_IsException(func_obj)) {
/* bfunc has been freed */
goto fail;
}
name_atom = b->func_name;
if (name_atom == JS_ATOM_NULL)
name_atom = JS_ATOM_empty_string;
js_function_set_properties(ctx, func_obj, name_atom,
b->defined_arg_count);
if (b->func_kind & JS_FUNC_GENERATOR) {
JSValue proto;
int proto_class_id;
/* generators have a prototype field which is used as
prototype for the generator object */
if (b->func_kind == JS_FUNC_ASYNC_GENERATOR)
proto_class_id = JS_CLASS_ASYNC_GENERATOR;
else
proto_class_id = JS_CLASS_GENERATOR;
proto = JS_NewObjectProto(ctx, ctx->class_proto[proto_class_id]);
if (JS_IsException(proto))
goto fail;
JS_DefinePropertyValue(ctx, func_obj, JS_ATOM_prototype, proto,
JS_PROP_WRITABLE);
} else if (b->has_prototype) {
/* add the 'prototype' property: delay instantiation to avoid
creating cycles for every javascript function. The prototype
object is created on the fly when first accessed */
JS_SetConstructorBit(ctx, func_obj, TRUE);
JS_DefineAutoInitProperty(ctx, func_obj, JS_ATOM_prototype,
JS_AUTOINIT_ID_PROTOTYPE, NULL,
JS_PROP_WRITABLE);
}
return func_obj;
fail:
/* bfunc is freed when func_obj is freed */
JS_FreeValue(ctx, func_obj);
return JS_EXCEPTION;
}
|
O3
|
c
|
js_closure:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %r8, %rbx
movq %rcx, %r13
movq %rdx, %r15
movq %rsi, %r12
movq %rdi, %r14
movzwl 0x18(%rsi), %eax
shrl $0x4, %eax
andl $0x6, %eax
leaq 0x60658(%rip), %rcx # 0xa0228
movzwl (%rax,%rcx), %ecx
movq 0x40(%rdi), %rax
movl %ecx, %edx
shll $0x4, %edx
movq (%rax,%rdx), %rsi
movq 0x8(%rax,%rdx), %rdx
callq 0x20a15
cmpl $0x6, %edx
jne 0x3fc23
movl $0x6, %ebx
cmpl $-0x9, %r15d
jb 0x3fc1a
movq 0x18(%r14), %rdi
movl (%r12), %eax
leal -0x1(%rax), %ecx
movl %ecx, (%r12)
cmpl $0x1, %eax
jg 0x3fc1a
movq %r12, %rsi
movq %r15, %rdx
callq 0x20d90
xorl %eax, %eax
xorl %ecx, %ecx
jmp 0x3fd40
movq %r14, %rdi
movq %rax, %rsi
movq %r12, %rcx
movq %r13, %r8
movq %rbx, %r9
callq 0x421af
movq %rax, %r15
movq %rdx, %rbx
movl %ebx, %r13d
cmpq $0x6, %r13
jne 0x3fc76
cmpl $-0x9, %ebx
jb 0x3fc68
movq 0x18(%r14), %rdi
movl (%r15), %eax
leal -0x1(%rax), %ecx
movl %ecx, (%r15)
cmpl $0x1, %eax
jg 0x3fc68
movq %r15, %rsi
movq %rbx, %rdx
callq 0x20d90
xorl %eax, %eax
xorl %ecx, %ecx
movl $0x6, %ebx
jmp 0x3fd40
movl 0x2c(%r12), %eax
testl %eax, %eax
movl $0x2f, %ecx
cmovnel %eax, %ecx
movzwl 0x44(%r12), %r8d
movq %r14, %rdi
movq %r15, %rsi
movq %rbx, %rdx
callq 0x20cfd
movzwl 0x18(%r12), %eax
testb $0x20, %al
jne 0x3fcd8
testb $0x2, %al
je 0x3fd2d
cmpl $-0x1, %r13d
jne 0x3fcb6
orb $0x10, 0x5(%r15)
movl $0x2, (%rsp)
movq %r14, %rdi
movq %r15, %rsi
movq %rbx, %rdx
movl $0x3c, %ecx
xorl %r8d, %r8d
xorl %r9d, %r9d
callq 0x422ab
jmp 0x3fd2d
notl %eax
testb $0x60, %al
movq 0x40(%r14), %rax
movl $0x390, %ecx # imm = 0x390
movl $0x2f0, %edx # imm = 0x2F0
cmovel %ecx, %edx
movq (%rax,%rdx), %rsi
movq 0x8(%rax,%rdx), %rdx
movq %r14, %rdi
movl $0x1, %ecx
callq 0x20a15
movq %rdx, %r9
cmpl $0x6, %r9d
je 0x3fc46
movl $0x2, (%rsp)
movq %r14, %rdi
movq %r15, %rsi
movq %rbx, %rdx
movl $0x3c, %ecx
movq %rax, %r8
callq 0x26541
movabsq $-0x100000000, %rax # imm = 0xFFFFFFFF00000000
movq %r15, %rcx
andq %rax, %rcx
movl %r15d, %eax
orq %rcx, %rax
movq %rbx, %rdx
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
|
js_closure:
push r15
push r14
push r13
push r12
push rbx
sub rsp, 10h
mov rbx, r8
mov r13, rcx
mov r15, rdx
mov r12, rsi
mov r14, rdi
movzx eax, word ptr [rsi+18h]
shr eax, 4
and eax, 6
lea rcx, func_kind_to_class_id
movzx ecx, word ptr [rax+rcx]
mov rax, [rdi+40h]
mov edx, ecx
shl edx, 4
mov rsi, [rax+rdx]
mov rdx, [rax+rdx+8]
call JS_NewObjectProtoClass
cmp edx, 6
jnz short loc_3FC23
mov ebx, 6
cmp r15d, 0FFFFFFF7h
jb short loc_3FC1A
mov rdi, [r14+18h]
mov eax, [r12]
lea ecx, [rax-1]
mov [r12], ecx
cmp eax, 1
jg short loc_3FC1A
mov rsi, r12
mov rdx, r15
call js_free_value_rt
loc_3FC1A:
xor eax, eax
xor ecx, ecx
jmp loc_3FD40
loc_3FC23:
mov rdi, r14
mov rsi, rax
mov rcx, r12
mov r8, r13
mov r9, rbx
call js_closure2
mov r15, rax
mov rbx, rdx
mov r13d, ebx
cmp r13, 6
jnz short loc_3FC76
loc_3FC46:
cmp ebx, 0FFFFFFF7h
jb short loc_3FC68
mov rdi, [r14+18h]
mov eax, [r15]
lea ecx, [rax-1]
mov [r15], ecx
cmp eax, 1
jg short loc_3FC68
mov rsi, r15
mov rdx, rbx
call js_free_value_rt
loc_3FC68:
xor eax, eax
xor ecx, ecx
mov ebx, 6
jmp loc_3FD40
loc_3FC76:
mov eax, [r12+2Ch]
test eax, eax
mov ecx, 2Fh ; '/'
cmovnz ecx, eax
movzx r8d, word ptr [r12+44h]
mov rdi, r14
mov rsi, r15
mov rdx, rbx
call js_function_set_properties
movzx eax, word ptr [r12+18h]
test al, 20h
jnz short loc_3FCD8
test al, 2
jz loc_3FD2D
cmp r13d, 0FFFFFFFFh
jnz short loc_3FCB6
or byte ptr [r15+5], 10h
loc_3FCB6:
mov [rsp+38h+var_38], 2
mov rdi, r14
mov rsi, r15
mov rdx, rbx
mov ecx, 3Ch ; '<'
xor r8d, r8d
xor r9d, r9d
call JS_DefineAutoInitProperty
jmp short loc_3FD2D
loc_3FCD8:
not eax
test al, 60h
mov rax, [r14+40h]
mov ecx, 390h
mov edx, 2F0h
cmovz edx, ecx
mov rsi, [rax+rdx]
mov rdx, [rax+rdx+8]
mov rdi, r14
mov ecx, 1
call JS_NewObjectProtoClass
mov r9, rdx
cmp r9d, 6
jz loc_3FC46
mov [rsp+38h+var_38], 2
mov rdi, r14
mov rsi, r15
mov rdx, rbx
mov ecx, 3Ch ; '<'
mov r8, rax
call JS_DefinePropertyValue
loc_3FD2D:
mov rax, 0FFFFFFFF00000000h
mov rcx, r15
and rcx, rax
mov eax, r15d
loc_3FD40:
or rax, rcx
mov rdx, rbx
add rsp, 10h
pop rbx
pop r12
pop r13
pop r14
pop r15
retn
|
unsigned long long js_closure(
long long a1,
long long a2,
long long a3,
long long a4,
long long a5,
double a6,
__m128 a7,
__m128 a8,
__m128 a9,
double a10,
double a11,
__m128 a12,
__m128 a13)
{
unsigned int v16; // edx
long long v17; // rax
long long v18; // rdx
long long v19; // r8
long long v20; // r9
long long v21; // rdi
int v22; // eax
long long v23; // rcx
long long v24; // rax
unsigned long long v25; // rcx
long long v26; // rdx
long long v27; // r8
long long v28; // r9
long long v29; // r15
long long v30; // rbx
int v31; // r13d
long long v32; // rdi
int v33; // eax
long long v34; // rcx
int v35; // ecx
__int16 v36; // ax
long long v37; // rdx
int *v38; // rax
long long v39; // rdx
__m128 v40; // xmm4
__m128 v41; // xmm5
v16 = 16 * *(unsigned __int16 *)((char *)func_kind_to_class_id + ((*(unsigned __int16 *)(a2 + 24) >> 4) & 6));
v17 = JS_NewObjectProtoClass(
a1,
*(_QWORD *)(*(_QWORD *)(a1 + 64) + v16),
*(_QWORD *)(*(_QWORD *)(a1 + 64) + v16 + 8LL),
*(unsigned __int16 *)((char *)func_kind_to_class_id + ((*(unsigned __int16 *)(a2 + 24) >> 4) & 6)));
if ( (_DWORD)v18 == 6 )
{
if ( (unsigned int)a3 >= 0xFFFFFFF7 )
{
v21 = *(_QWORD *)(a1 + 24);
v22 = *(_DWORD *)a2;
v23 = (unsigned int)(*(_DWORD *)a2 - 1);
*(_DWORD *)a2 = v23;
if ( v22 <= 1 )
js_free_value_rt(v21, (_QWORD *)a2, a3, v23, v19, v20);
}
v24 = 0LL;
v25 = 0LL;
return v25 | v24;
}
v29 = js_closure2(a1, v17, v18, a2, a4, a5);
v30 = v26;
v31 = v26;
if ( (unsigned int)v26 != 6LL )
{
v35 = 47;
if ( *(_DWORD *)(a2 + 44) )
v35 = *(_DWORD *)(a2 + 44);
js_function_set_properties(a1, v29, v26, v35, *(unsigned __int16 *)(a2 + 68));
v36 = *(_WORD *)(a2 + 24);
if ( (v36 & 0x20) != 0 )
{
v37 = 752LL;
if ( (~(_BYTE)v36 & 0x60) == 0 )
v37 = 912LL;
v38 = (int *)JS_NewObjectProtoClass(
a1,
*(_QWORD *)(*(_QWORD *)(a1 + 64) + v37),
*(_QWORD *)(*(_QWORD *)(a1 + 64) + v37 + 8),
1u);
v28 = v39;
if ( (_DWORD)v39 == 6 )
goto LABEL_7;
JS_DefinePropertyValue(a1, v29, v30, 60LL, v38, v39, a6, a7, a8, a9, v40, v41, a12, a13, 2);
}
else if ( (v36 & 2) != 0 )
{
if ( v31 == -1 )
*(_BYTE *)(v29 + 5) |= 0x10u;
JS_DefineAutoInitProperty(a1, v29, v30, 60, 0, 0, 2);
}
v25 = v29 & 0xFFFFFFFF00000000LL;
v24 = (unsigned int)v29;
return v25 | v24;
}
LABEL_7:
if ( (unsigned int)v30 >= 0xFFFFFFF7 )
{
v32 = *(_QWORD *)(a1 + 24);
v33 = *(_DWORD *)v29;
v34 = (unsigned int)(*(_DWORD *)v29 - 1);
*(_DWORD *)v29 = v34;
if ( v33 <= 1 )
js_free_value_rt(v32, (_QWORD *)v29, v30, v34, v27, v28);
}
v24 = 0LL;
v25 = 0LL;
return v25 | v24;
}
|
js_closure:
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x10
MOV RBX,R8
MOV R13,RCX
MOV R15,RDX
MOV R12,RSI
MOV R14,RDI
MOVZX EAX,word ptr [RSI + 0x18]
SHR EAX,0x4
AND EAX,0x6
LEA RCX,[0x1a0228]
MOVZX ECX,word ptr [RAX + RCX*0x1]
MOV RAX,qword ptr [RDI + 0x40]
MOV EDX,ECX
SHL EDX,0x4
MOV RSI,qword ptr [RAX + RDX*0x1]
MOV RDX,qword ptr [RAX + RDX*0x1 + 0x8]
CALL 0x00120a15
CMP EDX,0x6
JNZ 0x0013fc23
MOV EBX,0x6
CMP R15D,-0x9
JC 0x0013fc1a
MOV RDI,qword ptr [R14 + 0x18]
MOV EAX,dword ptr [R12]
LEA ECX,[RAX + -0x1]
MOV dword ptr [R12],ECX
CMP EAX,0x1
JG 0x0013fc1a
MOV RSI,R12
MOV RDX,R15
CALL 0x00120d90
LAB_0013fc1a:
XOR EAX,EAX
XOR ECX,ECX
JMP 0x0013fd40
LAB_0013fc23:
MOV RDI,R14
MOV RSI,RAX
MOV RCX,R12
MOV R8,R13
MOV R9,RBX
CALL 0x001421af
MOV R15,RAX
MOV RBX,RDX
MOV R13D,EBX
CMP R13,0x6
JNZ 0x0013fc76
LAB_0013fc46:
CMP EBX,-0x9
JC 0x0013fc68
MOV RDI,qword ptr [R14 + 0x18]
MOV EAX,dword ptr [R15]
LEA ECX,[RAX + -0x1]
MOV dword ptr [R15],ECX
CMP EAX,0x1
JG 0x0013fc68
MOV RSI,R15
MOV RDX,RBX
CALL 0x00120d90
LAB_0013fc68:
XOR EAX,EAX
XOR ECX,ECX
MOV EBX,0x6
JMP 0x0013fd40
LAB_0013fc76:
MOV EAX,dword ptr [R12 + 0x2c]
TEST EAX,EAX
MOV ECX,0x2f
CMOVNZ ECX,EAX
MOVZX R8D,word ptr [R12 + 0x44]
MOV RDI,R14
MOV RSI,R15
MOV RDX,RBX
CALL 0x00120cfd
MOVZX EAX,word ptr [R12 + 0x18]
TEST AL,0x20
JNZ 0x0013fcd8
TEST AL,0x2
JZ 0x0013fd2d
CMP R13D,-0x1
JNZ 0x0013fcb6
OR byte ptr [R15 + 0x5],0x10
LAB_0013fcb6:
MOV dword ptr [RSP],0x2
MOV RDI,R14
MOV RSI,R15
MOV RDX,RBX
MOV ECX,0x3c
XOR R8D,R8D
XOR R9D,R9D
CALL 0x001422ab
JMP 0x0013fd2d
LAB_0013fcd8:
NOT EAX
TEST AL,0x60
MOV RAX,qword ptr [R14 + 0x40]
MOV ECX,0x390
MOV EDX,0x2f0
CMOVZ EDX,ECX
MOV RSI,qword ptr [RAX + RDX*0x1]
MOV RDX,qword ptr [RAX + RDX*0x1 + 0x8]
MOV RDI,R14
MOV ECX,0x1
CALL 0x00120a15
MOV R9,RDX
CMP R9D,0x6
JZ 0x0013fc46
MOV dword ptr [RSP],0x2
MOV RDI,R14
MOV RSI,R15
MOV RDX,RBX
MOV ECX,0x3c
MOV R8,RAX
CALL 0x00126541
LAB_0013fd2d:
MOV RAX,-0x100000000
MOV RCX,R15
AND RCX,RAX
MOV EAX,R15D
LAB_0013fd40:
OR RAX,RCX
MOV RDX,RBX
ADD RSP,0x10
POP RBX
POP R12
POP R13
POP R14
POP R15
RET
|
int1 [16]
js_closure(long param_1,int *param_2,int8 param_3,int8 param_4,int8 param_5)
{
ushort uVar1;
int8 uVar2;
ulong uVar3;
int *piVar4;
int iVar5;
ulong uVar6;
long lVar7;
ulong uVar8;
int1 auVar9 [16];
int1 auVar10 [16];
lVar7 = (ulong)*(ushort *)
((long)&func_kind_to_class_id + (ulong)(*(ushort *)(param_2 + 6) >> 4 & 6)) * 0x10
;
auVar9 = JS_NewObjectProtoClass
(param_1,*(int8 *)(*(long *)(param_1 + 0x40) + lVar7),
*(int8 *)(*(long *)(param_1 + 0x40) + 8 + lVar7));
if (auVar9._8_4_ == 6) {
uVar8 = 6;
if (0xfffffff6 < (uint)param_3) {
uVar2 = *(int8 *)(param_1 + 0x18);
iVar5 = *param_2;
*param_2 = iVar5 + -1;
if (iVar5 < 2) {
js_free_value_rt(uVar2,param_2,param_3);
}
}
uVar3 = 0;
uVar6 = 0;
goto LAB_0013fd40;
}
auVar9 = js_closure2(param_1,auVar9._0_8_,auVar9._8_8_,param_2,param_4,param_5);
uVar8 = auVar9._8_8_;
piVar4 = auVar9._0_8_;
if ((uVar8 & 0xffffffff) == 6) {
LAB_0013fc46:
if (0xfffffff6 < auVar9._8_4_) {
uVar2 = *(int8 *)(param_1 + 0x18);
iVar5 = *piVar4;
*piVar4 = iVar5 + -1;
if (iVar5 < 2) {
js_free_value_rt(uVar2,piVar4,uVar8);
}
}
uVar3 = 0;
uVar6 = 0;
uVar8 = 6;
}
else {
iVar5 = 0x2f;
if (param_2[0xb] != 0) {
iVar5 = param_2[0xb];
}
js_function_set_properties(param_1,piVar4,uVar8,iVar5,(short)param_2[0x11]);
uVar1 = *(ushort *)(param_2 + 6);
if ((uVar1 & 0x20) == 0) {
if ((uVar1 & 2) != 0) {
if (auVar9._8_4_ == 0xffffffff) {
*(byte *)((long)piVar4 + 5) = *(byte *)((long)piVar4 + 5) | 0x10;
}
JS_DefineAutoInitProperty(param_1,piVar4,uVar8,0x3c,0,0,2);
}
}
else {
lVar7 = 0x2f0;
if ((~uVar1 & 0x60) == 0) {
lVar7 = 0x390;
}
auVar10 = JS_NewObjectProtoClass
(param_1,*(int8 *)(*(long *)(param_1 + 0x40) + lVar7),
*(int8 *)(*(long *)(param_1 + 0x40) + 8 + lVar7),1);
if (auVar10._8_4_ == 6) goto LAB_0013fc46;
JS_DefinePropertyValue(param_1,piVar4,uVar8,0x3c,auVar10._0_8_,auVar10._8_8_,2);
}
uVar6 = (ulong)piVar4 & 0xffffffff00000000;
uVar3 = (ulong)piVar4 & 0xffffffff;
}
LAB_0013fd40:
auVar9._0_8_ = uVar3 | uVar6;
auVar9._8_8_ = uVar8;
return auVar9;
}
|
|
8,963 |
llama_relative_position_bucket(int, int, unsigned long, bool)
|
llama.cpp/src/llama-graph.cpp
|
static int32_t llama_relative_position_bucket(llama_pos x, llama_pos y, uint64_t n_buckets, bool bidirectional) {
// TODO move to hparams if a T5 variant appears that uses a different value
const int64_t max_distance = 128;
if (bidirectional) {
n_buckets >>= 1;
}
const int64_t max_exact = n_buckets >> 1;
int32_t relative_position = x - y;
int32_t relative_bucket = 0;
if (bidirectional) {
relative_bucket += (relative_position > 0) * n_buckets;
relative_position = abs(relative_position);
} else {
relative_position = -std::min<int32_t>(relative_position, 0);
}
int32_t relative_position_if_large = floorf(max_exact + logf(1.0 * relative_position / max_exact) * (n_buckets - max_exact) / log(1.0 * max_distance / max_exact));
relative_position_if_large = std::min<int32_t>(relative_position_if_large, n_buckets - 1);
relative_bucket += (relative_position < max_exact ? relative_position : relative_position_if_large);
return relative_bucket;
}
|
O3
|
cpp
|
llama_relative_position_bucket(int, int, unsigned long, bool):
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x18, %rsp
movq %rdx, %rbx
subl %esi, %edi
testl %ecx, %ecx
je 0xaa341
shrq %rbx
xorl %eax, %eax
testl %edi, %edi
movl %ebx, %r14d
cmovlel %eax, %r14d
movl %edi, %ebp
negl %ebp
cmovsl %edi, %ebp
jmp 0xaa34d
movl %edi, %ebp
sarl $0x1f, %ebp
andl %edi, %ebp
negl %ebp
xorl %r14d, %r14d
movq %rbx, %r15
shrq %r15
cvtsi2sd %r15, %xmm1
cvtsi2sd %ebp, %xmm0
movsd %xmm1, 0x8(%rsp)
divsd %xmm1, %xmm0
cvtsd2ss %xmm0, %xmm0
callq 0x7cae0
movq %rbx, %rax
subq %r15, %rax
js 0xaa381
xorps %xmm1, %xmm1
cvtsi2ss %rax, %xmm1
jmp 0xaa399
movq %rax, %rcx
shrq %rcx
andl $0x1, %eax
orq %rcx, %rax
xorps %xmm1, %xmm1
cvtsi2ss %rax, %xmm1
addss %xmm1, %xmm1
mulss %xmm1, %xmm0
cvtss2sd %xmm0, %xmm0
movsd %xmm0, 0x10(%rsp)
movsd 0x8ca59(%rip), %xmm0 # 0x136e08
divsd 0x8(%rsp), %xmm0
callq 0x77860
movsd 0x10(%rsp), %xmm1
divsd %xmm0, %xmm1
addsd 0x8(%rsp), %xmm1
xorps %xmm0, %xmm0
cvtsd2ss %xmm1, %xmm0
callq 0x75840
cvttss2si %xmm0, %eax
decl %ebx
cmpl %eax, %ebx
cmovgel %eax, %ebx
movl %ebp, %eax
cmpq %rax, %r15
cmoval %ebp, %ebx
addl %r14d, %ebx
movl %ebx, %eax
addq $0x18, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
nop
|
_ZL30llama_relative_position_bucketiimb:
push rbp
push r15
push r14
push rbx
sub rsp, 18h
mov rbx, rdx
sub edi, esi
test ecx, ecx
jz short loc_AA341
shr rbx, 1
xor eax, eax
test edi, edi
mov r14d, ebx
cmovle r14d, eax
mov ebp, edi
neg ebp
cmovs ebp, edi
jmp short loc_AA34D
loc_AA341:
mov ebp, edi
sar ebp, 1Fh
and ebp, edi
neg ebp
xor r14d, r14d
loc_AA34D:
mov r15, rbx
shr r15, 1
cvtsi2sd xmm1, r15
cvtsi2sd xmm0, ebp
movsd [rsp+38h+var_30], xmm1
divsd xmm0, xmm1
cvtsd2ss xmm0, xmm0
call _logf
mov rax, rbx
sub rax, r15
js short loc_AA381
xorps xmm1, xmm1
cvtsi2ss xmm1, rax
jmp short loc_AA399
loc_AA381:
mov rcx, rax
shr rcx, 1
and eax, 1
or rax, rcx
xorps xmm1, xmm1
cvtsi2ss xmm1, rax
addss xmm1, xmm1
loc_AA399:
mulss xmm0, xmm1
cvtss2sd xmm0, xmm0
movsd [rsp+38h+var_28], xmm0
movsd xmm0, cs:qword_136E08
divsd xmm0, [rsp+38h+var_30]
call _log
movsd xmm1, [rsp+38h+var_28]
divsd xmm1, xmm0
addsd xmm1, [rsp+38h+var_30]
xorps xmm0, xmm0
cvtsd2ss xmm0, xmm1
call _floorf
cvttss2si eax, xmm0
dec ebx
cmp ebx, eax
cmovge ebx, eax
mov eax, ebp
cmp r15, rax
cmova ebx, ebp
add ebx, r14d
mov eax, ebx
add rsp, 18h
pop rbx
pop r14
pop r15
pop rbp
retn
|
long long llama_relative_position_bucket(int a1, int a2, unsigned long long a3, int a4)
{
unsigned long long v4; // rbx
int v5; // edi
int v6; // r14d
int v7; // ebp
unsigned long long v8; // r15
float v9; // xmm0_4
long long v10; // rax
float v11; // xmm1_4
float v12; // xmm0_4
int v13; // eax
int v14; // ebx
double v16; // [rsp+8h] [rbp-30h]
v4 = a3;
v5 = a1 - a2;
if ( a4 )
{
v4 = a3 >> 1;
v6 = a3 >> 1;
if ( v5 <= 0 )
v6 = 0;
v7 = -v5;
if ( v5 > 0 )
v7 = v5;
}
else
{
v7 = -(v5 & (v5 >> 31));
v6 = 0;
}
v8 = v4 >> 1;
v16 = (double)(int)(v4 >> 1);
v9 = (double)v7 / v16;
logf(v9);
v10 = v4 - (v4 >> 1);
if ( v10 < 0 )
v11 = (float)(int)(((unsigned long long)v10 >> 1) | v10 & 1) + (float)(int)(((unsigned long long)v10 >> 1) | v10 & 1);
else
v11 = (float)(int)v10;
v12 = (float)(v9 * v11) / log(128.0 / v16) + v16;
v13 = (int)floorf(v12);
v14 = v4 - 1;
if ( v14 >= v13 )
v14 = v13;
if ( v8 > (unsigned int)v7 )
v14 = v7;
return (unsigned int)(v6 + v14);
}
|
llama_relative_position_bucket:
PUSH RBP
PUSH R15
PUSH R14
PUSH RBX
SUB RSP,0x18
MOV RBX,RDX
SUB EDI,ESI
TEST ECX,ECX
JZ 0x001aa341
SHR RBX,0x1
XOR EAX,EAX
TEST EDI,EDI
MOV R14D,EBX
CMOVLE R14D,EAX
MOV EBP,EDI
NEG EBP
CMOVS EBP,EDI
JMP 0x001aa34d
LAB_001aa341:
MOV EBP,EDI
SAR EBP,0x1f
AND EBP,EDI
NEG EBP
XOR R14D,R14D
LAB_001aa34d:
MOV R15,RBX
SHR R15,0x1
CVTSI2SD XMM1,R15
CVTSI2SD XMM0,EBP
MOVSD qword ptr [RSP + 0x8],XMM1
DIVSD XMM0,XMM1
CVTSD2SS XMM0,XMM0
CALL 0x0017cae0
MOV RAX,RBX
SUB RAX,R15
JS 0x001aa381
XORPS XMM1,XMM1
CVTSI2SS XMM1,RAX
JMP 0x001aa399
LAB_001aa381:
MOV RCX,RAX
SHR RCX,0x1
AND EAX,0x1
OR RAX,RCX
XORPS XMM1,XMM1
CVTSI2SS XMM1,RAX
ADDSS XMM1,XMM1
LAB_001aa399:
MULSS XMM0,XMM1
CVTSS2SD XMM0,XMM0
MOVSD qword ptr [RSP + 0x10],XMM0
MOVSD XMM0,qword ptr [0x00236e08]
DIVSD XMM0,qword ptr [RSP + 0x8]
CALL 0x00177860
MOVSD XMM1,qword ptr [RSP + 0x10]
DIVSD XMM1,XMM0
ADDSD XMM1,qword ptr [RSP + 0x8]
XORPS XMM0,XMM0
CVTSD2SS XMM0,XMM1
CALL 0x00175840
CVTTSS2SI EAX,XMM0
DEC EBX
CMP EBX,EAX
CMOVGE EBX,EAX
MOV EAX,EBP
CMP R15,RAX
CMOVA EBX,EBP
ADD EBX,R14D
MOV EAX,EBX
ADD RSP,0x18
POP RBX
POP R14
POP R15
POP RBP
RET
|
/* llama_relative_position_bucket(int, int, unsigned long, bool) */
int llama_relative_position_bucket(int param_1,int param_2,ulong param_3,bool param_4)
{
int7 in_register_00000009;
uint uVar1;
uint uVar2;
int iVar3;
ulong uVar4;
float fVar5;
double dVar6;
double dVar7;
uVar2 = param_1 - param_2;
if ((int)CONCAT71(in_register_00000009,param_4) == 0) {
iVar3 = 0;
uVar1 = -((int)uVar2 >> 0x1f & uVar2);
}
else {
param_3 = param_3 >> 1;
iVar3 = (int)param_3;
if ((int)uVar2 < 1) {
iVar3 = 0;
}
uVar1 = -uVar2;
if (0 < (int)uVar2) {
uVar1 = uVar2;
}
}
uVar4 = param_3 >> 1;
dVar7 = (double)uVar4;
fVar5 = logf((float)((double)(int)uVar1 / dVar7));
dVar6 = log(DAT_00236e08 / dVar7);
fVar5 = floorf((float)((double)(fVar5 * (float)(param_3 - uVar4)) / dVar6 + dVar7));
uVar2 = (int)param_3 - 1;
if ((int)fVar5 <= (int)uVar2) {
uVar2 = (int)fVar5;
}
if (uVar1 < uVar4) {
uVar2 = uVar1;
}
return uVar2 + iVar3;
}
|
|
8,964 |
fabe13_initialize_dispatcher
|
farukalpay[P]FABE/fabe13/fabe13.c
|
static void fabe13_initialize_dispatcher() {
#if FABE13_PLATFORM_ARM
active_impl_type = IMPL_NEON; active_impl_name = "NEON (AArch64)"; active_simd_width = 2;
#elif FABE13_PLATFORM_X86
if (fabe13_detect_avx512f()) {
#if defined(__AVX512F__)
active_impl_type = IMPL_AVX512; active_impl_name = "AVX-512F"; active_simd_width = 8;
#else
#warning "AVX512F detected but not compiled with AVX512F support. Falling back."
if (fabe13_detect_avx2()) { active_impl_type = IMPL_AVX2; active_impl_name = "AVX2+FMA"; active_simd_width = 4; }
else { active_impl_type = IMPL_SCALAR; active_impl_name = "Scalar (Custom-HX, x86)"; active_simd_width = 1; }
#endif
} else if (fabe13_detect_avx2()) { active_impl_type = IMPL_AVX2; active_impl_name = "AVX2+FMA"; active_simd_width = 4; }
else { active_impl_type = IMPL_SCALAR; active_impl_name = "Scalar (Custom-HX, x86)"; active_simd_width = 1; }
#else
active_impl_type = IMPL_SCALAR; active_impl_name = "Scalar (Custom-HX, Unknown)"; active_simd_width = 1;
#endif
#ifdef FABE13_ENABLE_FAST_FP
fabe13_set_fast_fp_mode();
#endif
}
|
O0
|
c
|
fabe13_initialize_dispatcher:
pushq %rax
callq 0x5400
testb $0x1, %al
jne 0x534c
jmp 0x539f
callq 0x5410
testb $0x1, %al
jne 0x5357
jmp 0x537b
movl $0x2, 0x3d8f(%rip) # 0x90f0
leaq 0x1398(%rip), %rax # 0x6700
movq %rax, 0x3d41(%rip) # 0x90b0
movl $0x4, 0x3d3f(%rip) # 0x90b8
jmp 0x539d
movl $0x0, 0x3d6b(%rip) # 0x90f0
leaq 0x137d(%rip), %rax # 0x6709
movq %rax, 0x3d1d(%rip) # 0x90b0
movl $0x1, 0x3d1b(%rip) # 0x90b8
jmp 0x53f2
callq 0x5410
testb $0x1, %al
jne 0x53aa
jmp 0x53ce
movl $0x2, 0x3d3c(%rip) # 0x90f0
leaq 0x1345(%rip), %rax # 0x6700
movq %rax, 0x3cee(%rip) # 0x90b0
movl $0x4, 0x3cec(%rip) # 0x90b8
jmp 0x53f0
movl $0x0, 0x3d18(%rip) # 0x90f0
leaq 0x132a(%rip), %rax # 0x6709
movq %rax, 0x3cca(%rip) # 0x90b0
movl $0x1, 0x3cc8(%rip) # 0x90b8
jmp 0x53f2
popq %rax
retq
nopw %cs:(%rax,%rax)
|
fabe13_initialize_dispatcher:
push rax
call fabe13_detect_avx512f
test al, 1
jnz short loc_534C
jmp short loc_539F
loc_534C:
call fabe13_detect_avx2
test al, 1
jnz short loc_5357
jmp short loc_537B
loc_5357:
mov cs:active_impl_type, 2
lea rax, aAvx2Fma; "AVX2+FMA"
mov cs:active_impl_name, rax
mov cs:active_simd_width, 4
jmp short loc_539D
loc_537B:
mov cs:active_impl_type, 0
lea rax, aScalarCustomHx; "Scalar (Custom-HX, x86)"
mov cs:active_impl_name, rax
mov cs:active_simd_width, 1
loc_539D:
jmp short loc_53F2
loc_539F:
call fabe13_detect_avx2
test al, 1
jnz short loc_53AA
jmp short loc_53CE
loc_53AA:
mov cs:active_impl_type, 2
lea rax, aAvx2Fma; "AVX2+FMA"
mov cs:active_impl_name, rax
mov cs:active_simd_width, 4
jmp short loc_53F0
loc_53CE:
mov cs:active_impl_type, 0
lea rax, aScalarCustomHx; "Scalar (Custom-HX, x86)"
mov cs:active_impl_name, rax
mov cs:active_simd_width, 1
loc_53F0:
jmp short $+2
loc_53F2:
pop rax
retn
|
void __spoils<rdx,rcx,r8,r9,r10,r11,xmm4,xmm5> fabe13_initialize_dispatcher()
{
if ( (fabe13_detect_avx512f() & 1) != 0 )
{
if ( (fabe13_detect_avx2() & 1) != 0 )
{
active_impl_type = 2;
active_impl_name = "AVX2+FMA";
active_simd_width = 4;
}
else
{
active_impl_type = 0;
active_impl_name = "Scalar (Custom-HX, x86)";
active_simd_width = 1;
}
}
else if ( (fabe13_detect_avx2() & 1) != 0 )
{
active_impl_type = 2;
active_impl_name = "AVX2+FMA";
active_simd_width = 4;
}
else
{
active_impl_type = 0;
active_impl_name = "Scalar (Custom-HX, x86)";
active_simd_width = 1;
}
}
|
fabe13_initialize_dispatcher:
PUSH RAX
CALL 0x00105400
TEST AL,0x1
JNZ 0x0010534c
JMP 0x0010539f
LAB_0010534c:
CALL 0x00105410
TEST AL,0x1
JNZ 0x00105357
JMP 0x0010537b
LAB_00105357:
MOV dword ptr [0x001090f0],0x2
LEA RAX,[0x106700]
MOV qword ptr [0x001090b0],RAX
MOV dword ptr [0x001090b8],0x4
JMP 0x0010539d
LAB_0010537b:
MOV dword ptr [0x001090f0],0x0
LEA RAX,[0x106709]
MOV qword ptr [0x001090b0],RAX
MOV dword ptr [0x001090b8],0x1
LAB_0010539d:
JMP 0x001053f2
LAB_0010539f:
CALL 0x00105410
TEST AL,0x1
JNZ 0x001053aa
JMP 0x001053ce
LAB_001053aa:
MOV dword ptr [0x001090f0],0x2
LEA RAX,[0x106700]
MOV qword ptr [0x001090b0],RAX
MOV dword ptr [0x001090b8],0x4
JMP 0x001053f0
LAB_001053ce:
MOV dword ptr [0x001090f0],0x0
LEA RAX,[0x106709]
MOV qword ptr [0x001090b0],RAX
MOV dword ptr [0x001090b8],0x1
LAB_001053f0:
JMP 0x001053f2
LAB_001053f2:
POP RAX
RET
|
int8 fabe13_initialize_dispatcher(void)
{
int8 in_RAX;
ulong uVar1;
uVar1 = fabe13_detect_avx512f();
if ((uVar1 & 1) == 0) {
uVar1 = fabe13_detect_avx2();
if ((uVar1 & 1) == 0) {
active_impl_type = 0;
active_impl_name = s_Scalar__Custom_HX__x86__00106709;
active_simd_width = 1;
}
else {
active_impl_type = 2;
active_impl_name = s_AVX2_FMA_00106700;
active_simd_width = 4;
}
}
else {
uVar1 = fabe13_detect_avx2();
if ((uVar1 & 1) == 0) {
active_impl_type = 0;
active_impl_name = s_Scalar__Custom_HX__x86__00106709;
active_simd_width = 1;
}
else {
active_impl_type = 2;
active_impl_name = s_AVX2_FMA_00106700;
active_simd_width = 4;
}
}
return in_RAX;
}
|
|
8,965 |
ma_control_file_write_and_force
|
eloqsql/storage/maria/ma_control_file.c
|
int ma_control_file_write_and_force(LSN last_checkpoint_lsn_arg,
uint32 last_logno_arg,
TrID max_trid_arg,
uint8 recovery_failures_arg)
{
uchar buffer[CF_MAX_SIZE];
uint32 sum;
my_bool no_need_sync;
DBUG_ENTER("ma_control_file_write_and_force");
/*
We don't need to sync if this is just an increase of
recovery_failures: it's even good if that counter is not increased on disk
in case of power or hardware failure (less false positives when removing
logs).
*/
no_need_sync= ((last_checkpoint_lsn == last_checkpoint_lsn_arg) &&
(last_logno == last_logno_arg) &&
(max_trid_in_control_file == max_trid_arg) &&
(recovery_failures_arg > 0));
if (control_file_fd < 0)
DBUG_RETURN(1);
#ifndef DBUG_OFF
if (maria_multi_threaded)
translog_lock_handler_assert_owner();
#endif
lsn_store(buffer + CF_LSN_OFFSET, last_checkpoint_lsn_arg);
int4store(buffer + CF_FILENO_OFFSET, last_logno_arg);
transid_store(buffer + CF_MAX_TRID_OFFSET, max_trid_arg);
(buffer + CF_RECOV_FAIL_OFFSET)[0]= recovery_failures_arg;
if (cf_changeable_size > CF_CHANGEABLE_TOTAL_SIZE)
{
/*
More room than needed for us. Must be a newer version. Clear part which
we cannot maintain, so that any future version notices we didn't
maintain its extra data.
*/
uint zeroed= cf_changeable_size - CF_CHANGEABLE_TOTAL_SIZE;
char msg[150];
bzero(buffer + CF_CHANGEABLE_TOTAL_SIZE, zeroed);
my_snprintf(msg, sizeof(msg),
"Control file must be from a newer version; zero-ing out %u"
" unknown bytes in control file at offset %u", zeroed,
cf_changeable_size + cf_create_time_size);
ma_message_no_user(ME_WARNING, msg);
}
else
{
/* not enough room for what we need to store: enlarge */
cf_changeable_size= CF_CHANGEABLE_TOTAL_SIZE;
}
/* Note that the create-time portion is not touched */
/* Checksum is stored first */
compile_time_assert(CF_CHECKSUM_OFFSET == 0);
sum= my_checksum(0, buffer + CF_CHECKSUM_SIZE,
cf_changeable_size - CF_CHECKSUM_SIZE);
int4store(buffer, sum);
if (my_pwrite(control_file_fd, buffer, cf_changeable_size,
cf_create_time_size, MYF(MY_FNABP | MY_WME)) ||
(!no_need_sync && mysql_file_sync(control_file_fd, MYF(MY_WME))))
DBUG_RETURN(1);
last_checkpoint_lsn= last_checkpoint_lsn_arg;
last_logno= last_logno_arg;
max_trid_in_control_file= max_trid_arg;
recovery_failures= recovery_failures_arg;
cf_changeable_size= CF_CHANGEABLE_TOTAL_SIZE; /* no more warning */
DBUG_RETURN(0);
}
|
O3
|
c
|
ma_control_file_write_and_force:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x2b8, %rsp # imm = 0x2B8
movl %ecx, %r12d
movq %rdx, %r14
movq %rdi, %r13
movq %fs:0x28, %rax
movq %rax, -0x30(%rbp)
cmpq %rdi, 0x3cb776(%rip) # 0x3fcc90
setne %al
cmpl %esi, 0x3cb775(%rip) # 0x3fcc98
setne %dl
cmpq %r14, 0x3cb773(%rip) # 0x3fcca0
setne %dil
testl %ecx, %ecx
sete %cl
movl $0x1, %r15d
cmpl $0x0, 0x352bfd(%rip) # 0x384140
js 0x31706
movb %dil, -0x2d1(%rbp)
movb %dl, -0x2d2(%rbp)
movb %cl, -0x2d3(%rbp)
movb %al, -0x2d4(%rbp)
movq %r13, %rax
shrq $0x20, %rax
leaq -0x22c(%rbp), %r15
movb %al, (%r15)
movq %r13, %rax
shrq $0x28, %rax
movb %al, 0x1(%r15)
movq %r13, %rax
shrq $0x30, %rax
movb %al, 0x2(%r15)
movl %r13d, 0x3(%r15)
movl %esi, 0x7(%r15)
movl %r14d, 0xb(%r15)
movq %r14, %rax
shrq $0x20, %rax
movw %ax, 0xf(%r15)
movb %r12b, 0x11(%r15)
movl 0x3cb705(%rip), %ebx # 0x3fccb0
cmpl $0x17, %ebx
movl %esi, -0x2dc(%rbp)
jb 0x3162e
movl %r12d, -0x2d8(%rbp)
leal -0x16(%rbx), %r12d
leaq -0x21a(%rbp), %rdi
movl $0x1ea, %ecx # imm = 0x1EA
xorl %esi, %esi
movq %r12, %rdx
callq 0x297d0
addl 0x3cb6cf(%rip), %ebx # 0x3fccac
leaq 0xa7f04(%rip), %rdx # 0xd94e8
leaq -0x2d0(%rbp), %rdi
movl $0x96, %esi
movl %r12d, %ecx
movl -0x2d8(%rbp), %r12d
movl %ebx, %r8d
xorl %eax, %eax
callq 0xd6d9e
leaq 0xa7f43(%rip), %rsi # 0xd954e
movl $0x800, %edx # imm = 0x800
movl $0xa8, %edi
leaq -0x2d0(%rbp), %rcx
xorl %eax, %eax
callq 0x9e151
movl 0x3cb687(%rip), %edx # 0x3fccb0
addl $-0x4, %edx
jmp 0x3163d
movl $0x16, 0x3cb678(%rip) # 0x3fccb0
movl $0x12, %edx
xorl %edi, %edi
movq %r15, %rsi
callq 0xa7f78
leaq -0x230(%rbp), %rsi
movl %eax, (%rsi)
movl 0x352aea(%rip), %edi # 0x384140
movl 0x3cb654(%rip), %edx # 0x3fccb0
movl 0x3cb64a(%rip), %ecx # 0x3fccac
movl $0x12, %r8d
callq 0xa07f2
testq %rax, %rax
je 0x3167d
movl $0x1, %r15d
jmp 0x31706
movb -0x2d4(%rbp), %al
orb -0x2d2(%rbp), %al
movb -0x2d3(%rbp), %cl
orb -0x2d1(%rbp), %cl
orb %al, %cl
movl $0x1, %r15d
je 0x316d8
movl 0x352a9b(%rip), %ebx # 0x384140
leaq 0x354964(%rip), %rax # 0x386010
movq (%rax), %rax
leaq -0x2d0(%rbp), %rdi
movl %ebx, %esi
movl $0x10, %edx
callq *0x158(%rax)
testq %rax, %rax
jne 0x3172a
movl $0x10, %esi
movl %ebx, %edi
callq 0xa14a8
testl %eax, %eax
jne 0x31706
movq %r13, 0x3cb5b1(%rip) # 0x3fcc90
movl -0x2dc(%rbp), %eax
movl %eax, 0x3cb5ad(%rip) # 0x3fcc98
movq %r14, 0x3cb5ae(%rip) # 0x3fcca0
movb %r12b, 0x3cb5af(%rip) # 0x3fcca8
movl $0x16, 0x3cb5ad(%rip) # 0x3fccb0
xorl %r15d, %r15d
movq %fs:0x28, %rax
cmpq -0x30(%rbp), %rax
jne 0x31749
movl %r15d, %eax
addq $0x2b8, %rsp # imm = 0x2B8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq -0x2e0(%rbp), %r15
movq %rax, %rdi
movl %ebx, %esi
movq %r15, %rdx
callq 0x29b31
movl (%r15), %eax
movl $0x1, %r15d
jmp 0x316d4
callq 0x29250
|
ma_control_file_write_and_force:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 2B8h
mov r12d, ecx
mov r14, rdx
mov r13, rdi
mov rax, fs:28h
mov [rbp+var_30], rax
cmp cs:last_checkpoint_lsn, rdi
setnz al
cmp cs:last_logno, esi
setnz dl
cmp cs:max_trid_in_control_file, r14
setnz dil
test ecx, ecx
setz cl
mov r15d, 1
cmp cs:control_file_fd, 0
js loc_31706
mov [rbp+var_2D1], dil
mov [rbp+var_2D2], dl
mov [rbp+var_2D3], cl
mov [rbp+var_2D4], al
mov rax, r13
shr rax, 20h
lea r15, [rbp+var_22C]
mov [r15], al
mov rax, r13
shr rax, 28h
mov [r15+1], al
mov rax, r13
shr rax, 30h
mov [r15+2], al
mov [r15+3], r13d
mov [r15+7], esi
mov [r15+0Bh], r14d
mov rax, r14
shr rax, 20h
mov [r15+0Fh], ax
mov [r15+11h], r12b
mov ebx, cs:cf_changeable_size
cmp ebx, 17h
mov [rbp+var_2DC], esi
jb short loc_3162E
mov [rbp+var_2D8], r12d
lea r12d, [rbx-16h]
lea rdi, [rbp+var_21A]
mov ecx, 1EAh
xor esi, esi
mov rdx, r12
call ___memset_chk
add ebx, cs:cf_create_time_size
lea rdx, aControlFileMus; "Control file must be from a newer versi"...
lea rdi, [rbp+var_2D0]
mov esi, 96h
mov ecx, r12d
mov r12d, [rbp+var_2D8]
mov r8d, ebx
xor eax, eax
call my_snprintf
lea rsi, aAriaEngineS; "Aria engine: %s"
mov edx, 800h
mov edi, 0A8h
lea rcx, [rbp+var_2D0]
xor eax, eax
call my_printf_error
mov edx, cs:cf_changeable_size
add edx, 0FFFFFFFCh
jmp short loc_3163D
loc_3162E:
mov cs:cf_changeable_size, 16h
mov edx, 12h
loc_3163D:
xor edi, edi
mov rsi, r15
call my_checksum
lea rsi, [rbp+var_230]
mov [rsi], eax
mov edi, cs:control_file_fd
mov edx, cs:cf_changeable_size
mov ecx, cs:cf_create_time_size
mov r8d, 12h
call my_pwrite
test rax, rax
jz short loc_3167D
mov r15d, 1
jmp loc_31706
loc_3167D:
mov al, [rbp+var_2D4]
or al, [rbp+var_2D2]
mov cl, [rbp+var_2D3]
or cl, [rbp+var_2D1]
or cl, al
mov r15d, 1
jz short loc_316D8
mov ebx, cs:control_file_fd
lea rax, PSI_server
mov rax, [rax]
lea rdi, [rbp+var_2D0]
mov esi, ebx
mov edx, 10h
call qword ptr [rax+158h]
test rax, rax
jnz short loc_3172A
mov esi, 10h
mov edi, ebx
call my_sync
loc_316D4:
test eax, eax
jnz short loc_31706
loc_316D8:
mov cs:last_checkpoint_lsn, r13
mov eax, [rbp+var_2DC]
mov cs:last_logno, eax
mov cs:max_trid_in_control_file, r14
mov cs:recovery_failures, r12b
mov cs:cf_changeable_size, 16h
xor r15d, r15d
loc_31706:
mov rax, fs:28h
cmp rax, [rbp+var_30]
jnz short loc_31749
mov eax, r15d
add rsp, 2B8h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_3172A:
lea r15, [rbp+var_2E0]
mov rdi, rax
mov esi, ebx
mov rdx, r15
call ma_control_file_write_and_force_cold_1
mov eax, [r15]
mov r15d, 1
jmp short loc_316D4
loc_31749:
call ___stack_chk_fail
|
long long ma_control_file_write_and_force(long long a1, int a2, long long a3, int a4)
{
int v4; // r12d
bool v6; // cl
unsigned int v7; // r15d
int v8; // ebx
int v9; // ecx
int v10; // r9d
int v11; // r8d
int v12; // r9d
long long v13; // rdx
long long v14; // rcx
unsigned int v15; // ebx
long long v16; // rax
int v17; // eax
int v19; // [rsp+0h] [rbp-2E0h] BYREF
int v20; // [rsp+4h] [rbp-2DCh]
int v21; // [rsp+8h] [rbp-2D8h]
int v22; // [rsp+Ch] [rbp-2D4h]
_BYTE v23[160]; // [rsp+10h] [rbp-2D0h] BYREF
int v24; // [rsp+B0h] [rbp-230h] BYREF
_BYTE v25[3]; // [rsp+B4h] [rbp-22Ch] BYREF
int v26; // [rsp+B7h] [rbp-229h]
int v27; // [rsp+BBh] [rbp-225h]
int v28; // [rsp+BFh] [rbp-221h]
__int16 v29; // [rsp+C3h] [rbp-21Dh]
char v30; // [rsp+C5h] [rbp-21Bh]
char v31[490]; // [rsp+C6h] [rbp-21Ah] BYREF
unsigned long long v32; // [rsp+2B0h] [rbp-30h]
v4 = a4;
v32 = __readfsqword(0x28u);
v6 = a4 == 0;
v7 = 1;
if ( control_file_fd >= 0 )
{
HIBYTE(v22) = max_trid_in_control_file != a3;
BYTE2(v22) = last_logno != a2;
BYTE1(v22) = v6;
LOBYTE(v22) = last_checkpoint_lsn != a1;
v25[0] = BYTE4(a1);
v25[1] = BYTE5(a1);
v25[2] = BYTE6(a1);
v26 = a1;
v27 = a2;
v28 = a3;
v29 = WORD2(a3);
v30 = v4;
v8 = cf_changeable_size;
v20 = a2;
if ( (unsigned int)cf_changeable_size < 0x17 )
{
cf_changeable_size = 22;
v13 = 18LL;
}
else
{
v21 = v4;
v4 = cf_changeable_size - 22;
__memset_chk(v31, 0LL, (unsigned int)(cf_changeable_size - 22), 490LL);
v9 = v4;
LOBYTE(v4) = v21;
my_snprintf(
(unsigned int)v23,
150,
(unsigned int)"Control file must be from a newer version; zero-ing out %u unknown bytes in control file at offset %u",
v9,
cf_create_time_size + v8,
v10,
v19);
my_printf_error(168, (unsigned int)"Aria engine: %s", 2048, (unsigned int)v23, v11, v12);
v13 = (unsigned int)(cf_changeable_size - 4);
}
v24 = my_checksum(0LL, v25, v13);
if ( my_pwrite(
(unsigned int)control_file_fd,
&v24,
(unsigned int)cf_changeable_size,
(unsigned int)cf_create_time_size,
18LL) )
{
return 1;
}
else
{
v7 = 1;
if ( !v22
|| ((v15 = control_file_fd,
LOBYTE(v14) = BYTE2(v22) | v22 | HIBYTE(v22) | BYTE1(v22),
(v16 = ((long long ( *)(_BYTE *, _QWORD, long long, long long))PSI_server[43])(
v23,
(unsigned int)control_file_fd,
16LL,
v14)) != 0)
? (ma_control_file_write_and_force_cold_1(v16, v15, &v19), v17 = v19, v7 = 1)
: (v17 = my_sync(v15, 16LL)),
!v17) )
{
last_checkpoint_lsn = a1;
last_logno = v20;
max_trid_in_control_file = a3;
recovery_failures = v4;
cf_changeable_size = 22;
return 0;
}
}
}
return v7;
}
|
ma_control_file_write_and_force:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x2b8
MOV R12D,ECX
MOV R14,RDX
MOV R13,RDI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x30],RAX
CMP qword ptr [0x004fcc90],RDI
SETNZ AL
CMP dword ptr [0x004fcc98],ESI
SETNZ DL
CMP qword ptr [0x004fcca0],R14
SETNZ DIL
TEST ECX,ECX
SETZ CL
MOV R15D,0x1
CMP dword ptr [0x00484140],0x0
JS 0x00131706
MOV byte ptr [RBP + -0x2d1],DIL
MOV byte ptr [RBP + -0x2d2],DL
MOV byte ptr [RBP + -0x2d3],CL
MOV byte ptr [RBP + -0x2d4],AL
MOV RAX,R13
SHR RAX,0x20
LEA R15,[RBP + -0x22c]
MOV byte ptr [R15],AL
MOV RAX,R13
SHR RAX,0x28
MOV byte ptr [R15 + 0x1],AL
MOV RAX,R13
SHR RAX,0x30
MOV byte ptr [R15 + 0x2],AL
MOV dword ptr [R15 + 0x3],R13D
MOV dword ptr [R15 + 0x7],ESI
MOV dword ptr [R15 + 0xb],R14D
MOV RAX,R14
SHR RAX,0x20
MOV word ptr [R15 + 0xf],AX
MOV byte ptr [R15 + 0x11],R12B
MOV EBX,dword ptr [0x004fccb0]
CMP EBX,0x17
MOV dword ptr [RBP + -0x2dc],ESI
JC 0x0013162e
MOV dword ptr [RBP + -0x2d8],R12D
LEA R12D,[RBX + -0x16]
LEA RDI,[RBP + -0x21a]
MOV ECX,0x1ea
XOR ESI,ESI
MOV RDX,R12
CALL 0x001297d0
ADD EBX,dword ptr [0x004fccac]
LEA RDX,[0x1d94e8]
LEA RDI,[RBP + -0x2d0]
MOV ESI,0x96
MOV ECX,R12D
MOV R12D,dword ptr [RBP + -0x2d8]
MOV R8D,EBX
XOR EAX,EAX
CALL 0x001d6d9e
LEA RSI,[0x1d954e]
MOV EDX,0x800
MOV EDI,0xa8
LEA RCX,[RBP + -0x2d0]
XOR EAX,EAX
CALL 0x0019e151
MOV EDX,dword ptr [0x004fccb0]
ADD EDX,-0x4
JMP 0x0013163d
LAB_0013162e:
MOV dword ptr [0x004fccb0],0x16
MOV EDX,0x12
LAB_0013163d:
XOR EDI,EDI
MOV RSI,R15
CALL 0x001a7f78
LEA RSI,[RBP + -0x230]
MOV dword ptr [RSI],EAX
MOV EDI,dword ptr [0x00484140]
MOV EDX,dword ptr [0x004fccb0]
MOV ECX,dword ptr [0x004fccac]
MOV R8D,0x12
CALL 0x001a07f2
TEST RAX,RAX
JZ 0x0013167d
MOV R15D,0x1
JMP 0x00131706
LAB_0013167d:
MOV AL,byte ptr [RBP + -0x2d4]
OR AL,byte ptr [RBP + -0x2d2]
MOV CL,byte ptr [RBP + -0x2d3]
OR CL,byte ptr [RBP + -0x2d1]
OR CL,AL
MOV R15D,0x1
JZ 0x001316d8
MOV EBX,dword ptr [0x00484140]
LEA RAX,[0x486010]
MOV RAX,qword ptr [RAX]
LEA RDI,[RBP + -0x2d0]
MOV ESI,EBX
MOV EDX,0x10
CALL qword ptr [RAX + 0x158]
TEST RAX,RAX
JNZ 0x0013172a
MOV ESI,0x10
MOV EDI,EBX
CALL 0x001a14a8
LAB_001316d4:
TEST EAX,EAX
JNZ 0x00131706
LAB_001316d8:
MOV qword ptr [0x004fcc90],R13
MOV EAX,dword ptr [RBP + -0x2dc]
MOV dword ptr [0x004fcc98],EAX
MOV qword ptr [0x004fcca0],R14
MOV byte ptr [0x004fcca8],R12B
MOV dword ptr [0x004fccb0],0x16
XOR R15D,R15D
LAB_00131706:
MOV RAX,qword ptr FS:[0x28]
CMP RAX,qword ptr [RBP + -0x30]
JNZ 0x00131749
MOV EAX,R15D
ADD RSP,0x2b8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_0013172a:
LEA R15,[RBP + -0x2e0]
MOV RDI,RAX
MOV ESI,EBX
MOV RDX,R15
CALL 0x00129b31
MOV EAX,dword ptr [R15]
MOV R15D,0x1
JMP 0x001316d4
LAB_00131749:
CALL 0x00129250
|
int8 ma_control_file_write_and_force(long param_1,int param_2,long param_3,int param_4)
{
uint uVar1;
long lVar2;
int iVar3;
int8 uVar4;
long in_FS_OFFSET;
int local_2e8;
int local_2e4;
int local_2e0;
char local_2dc;
char local_2db;
char local_2da;
char local_2d9;
int1 local_2d8 [160];
int4 local_238;
int1 local_234;
int1 local_233;
int1 local_232;
int4 local_231;
int local_22d;
int4 local_229;
int2 local_225;
int1 local_223;
int1 local_222 [490];
long local_38;
uVar1 = cf_changeable_size;
local_38 = *(long *)(in_FS_OFFSET + 0x28);
uVar4 = 1;
if (-1 < control_file_fd) {
local_234 = (int1)((ulong)param_1 >> 0x20);
local_233 = (int1)((ulong)param_1 >> 0x28);
local_232 = (int1)((ulong)param_1 >> 0x30);
local_231 = (int4)param_1;
local_229 = (int4)param_3;
local_225 = (int2)((ulong)param_3 >> 0x20);
local_223 = (int1)param_4;
local_2e4 = param_2;
local_2dc = last_checkpoint_lsn != param_1;
local_2db = param_4 == 0;
local_2da = last_logno != param_2;
local_2d9 = max_trid_in_control_file != param_3;
local_22d = param_2;
if (cf_changeable_size < 0x17) {
cf_changeable_size = 0x16;
iVar3 = 0x12;
}
else {
iVar3 = cf_changeable_size - 0x16;
local_2e0 = param_4;
__memset_chk(local_222,0,iVar3,0x1ea);
param_4 = local_2e0;
my_snprintf(local_2d8,0x96,
"Control file must be from a newer version; zero-ing out %u unknown bytes in control file at offset %u"
,iVar3,uVar1 + cf_create_time_size);
my_printf_error(0xa8,"Aria engine: %s",0x800,local_2d8);
iVar3 = cf_changeable_size - 4;
}
local_238 = my_checksum(0,&local_234,iVar3);
lVar2 = my_pwrite(control_file_fd,&local_238,cf_changeable_size,cf_create_time_size,0x12);
iVar3 = control_file_fd;
if (lVar2 == 0) {
if ((local_2db != '\0' || local_2d9 != '\0') || (local_2dc != '\0' || local_2da != '\0')) {
lVar2 = (**(code **)(PSI_server + 0x158))(local_2d8,control_file_fd,0x10);
if (lVar2 == 0) {
local_2e8 = my_sync(iVar3,0x10);
}
else {
ma_control_file_write_and_force_cold_1(lVar2,iVar3,&local_2e8);
}
uVar4 = 1;
if (local_2e8 != 0) goto LAB_00131706;
}
last_logno = local_2e4;
recovery_failures = (int1)param_4;
cf_changeable_size = 0x16;
uVar4 = 0;
last_checkpoint_lsn = param_1;
max_trid_in_control_file = param_3;
}
else {
uVar4 = 1;
}
}
LAB_00131706:
if (*(long *)(in_FS_OFFSET + 0x28) == local_38) {
return uVar4;
}
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
|
|
8,966 |
filter_flush_file_evenly
|
eloqsql/storage/maria/ma_checkpoint.c
|
static enum pagecache_flush_filter_result
filter_flush_file_evenly(enum pagecache_page_type type,
pgcache_page_no_t pageno __attribute__ ((unused)),
LSN rec_lsn, void *arg)
{
struct st_filter_param *param= (struct st_filter_param *)arg;
if (unlikely(param->max_pages == 0)) /* all flushed already */
return FLUSH_FILTER_SKIP_ALL;
if ((type == PAGECACHE_LSN_PAGE) &&
(cmp_translog_addr(rec_lsn, param->up_to_lsn) <= 0))
{
param->max_pages--;
return FLUSH_FILTER_OK;
}
return FLUSH_FILTER_SKIP_TRY_NEXT;
}
|
O3
|
c
|
filter_flush_file_evenly:
pushq %rbp
movq %rsp, %rbp
movl 0x8(%rcx), %esi
testl %esi, %esi
je 0x2dafb
xorl %eax, %eax
cmpl $0x2, %edi
jne 0x2daf9
cmpq %rdx, (%rcx)
jl 0x2daf9
decl %esi
movl %esi, 0x8(%rcx)
movl $0x1, %eax
popq %rbp
retq
movl $0x2, %eax
jmp 0x2daf9
|
filter_flush_file_evenly:
push rbp
mov rbp, rsp
mov esi, [rcx+8]
test esi, esi
jz short loc_2DAFB
xor eax, eax
cmp edi, 2
jnz short loc_2DAF9
cmp [rcx], rdx
jl short loc_2DAF9
dec esi
mov [rcx+8], esi
mov eax, 1
loc_2DAF9:
pop rbp
retn
loc_2DAFB:
mov eax, 2
jmp short loc_2DAF9
|
long long filter_flush_file_evenly(int a1, long long a2, long long a3, long long a4)
{
int v4; // esi
long long result; // rax
v4 = *(_DWORD *)(a4 + 8);
if ( !v4 )
return 2LL;
result = 0LL;
if ( a1 == 2 && *(_QWORD *)a4 >= a3 )
{
*(_DWORD *)(a4 + 8) = v4 - 1;
return 1LL;
}
return result;
}
|
filter_flush_file_evenly:
PUSH RBP
MOV RBP,RSP
MOV ESI,dword ptr [RCX + 0x8]
TEST ESI,ESI
JZ 0x0012dafb
XOR EAX,EAX
CMP EDI,0x2
JNZ 0x0012daf9
CMP qword ptr [RCX],RDX
JL 0x0012daf9
DEC ESI
MOV dword ptr [RCX + 0x8],ESI
MOV EAX,0x1
LAB_0012daf9:
POP RBP
RET
LAB_0012dafb:
MOV EAX,0x2
JMP 0x0012daf9
|
int8 filter_flush_file_evenly(int param_1,int8 param_2,long param_3,long *param_4)
{
int8 uVar1;
if ((int)param_4[1] == 0) {
uVar1 = 2;
}
else {
uVar1 = 0;
if ((param_1 == 2) && (param_3 <= *param_4)) {
*(int *)(param_4 + 1) = (int)param_4[1] + -1;
uVar1 = 1;
}
}
return uVar1;
}
|
|
8,967 |
my_wildcmp_8bit_impl
|
eloqsql/strings/ctype-simple.c
|
static
int my_wildcmp_8bit_impl(CHARSET_INFO *cs,
const char *str,const char *str_end,
const char *wildstr,const char *wildend,
int escape, int w_one, int w_many, int recurse_level)
{
int result= -1; /* Not found, using wildcards */
if (my_string_stack_guard && my_string_stack_guard(recurse_level))
return 1;
while (wildstr != wildend)
{
while (*wildstr != w_many && *wildstr != w_one)
{
if (*wildstr == escape && wildstr+1 != wildend)
wildstr++;
if (str == str_end || likeconv(cs,*wildstr++) != likeconv(cs,*str++))
return(1); /* No match */
if (wildstr == wildend)
return(str != str_end); /* Match if both are at end */
result=1; /* Found an anchor char */
}
if (*wildstr == w_one)
{
do
{
if (str == str_end) /* Skip one char if possible */
return(result);
INC_PTR(cs,str,str_end);
} while (++wildstr < wildend && *wildstr == w_one);
if (wildstr == wildend)
break;
}
if (*wildstr == w_many)
{ /* Found w_many */
uchar cmp;
wildstr++;
/* Remove any '%' and '_' from the wild search string */
for (; wildstr != wildend ; wildstr++)
{
if (*wildstr == w_many)
continue;
if (*wildstr == w_one)
{
if (str == str_end)
return(-1);
INC_PTR(cs,str,str_end);
continue;
}
break; /* Not a wild character */
}
if (wildstr == wildend)
return(0); /* Ok if w_many is last */
if (str == str_end)
return(-1);
if ((cmp= *wildstr) == escape && wildstr+1 != wildend)
cmp= *++wildstr;
INC_PTR(cs,wildstr,wildend); /* This is compared trough cmp */
cmp=likeconv(cs,cmp);
do
{
/*
Find the next character in the subject string equal to 'cmp', then
check recursively my_wildcmp_8bit_impl() for the pattern remainder.
*/
while (str != str_end && (uchar) likeconv(cs,*str) != cmp)
str++;
if (str++ == str_end)
return(-1); /* 'cmp' was not found in the subject string */
{
int tmp=my_wildcmp_8bit_impl(cs,str,str_end,
wildstr,wildend,escape,w_one,
w_many, recurse_level+1);
if (tmp <= 0)
return(tmp);
}
/*
The recursion call did not match. But it returned 1, which means
the pattern remainder has some non-special characters.
Continue, there is a chance that we'll find another 'cmp'
at a different position in the subject string.
*/
} while (str != str_end);
return(-1);
}
}
return(str != str_end ? 1 : 0);
}
|
O0
|
c
|
my_wildcmp_8bit_impl:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movl 0x20(%rbp), %eax
movl 0x18(%rbp), %eax
movl 0x10(%rbp), %eax
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
movq %r8, -0x30(%rbp)
movl %r9d, -0x34(%rbp)
movl $0xffffffff, -0x38(%rbp) # imm = 0xFFFFFFFF
leaq 0x376901(%rip), %rax # 0x4509e8
cmpq $0x0, (%rax)
je 0xda10d
leaq 0x3768f4(%rip), %rax # 0x4509e8
movq (%rax), %rax
movl 0x20(%rbp), %edi
callq *%rax
cmpl $0x0, %eax
je 0xda10d
movl $0x1, -0x4(%rbp)
jmp 0xda43a
jmp 0xda10f
movq -0x28(%rbp), %rax
cmpq -0x30(%rbp), %rax
je 0xda422
jmp 0xda11f
movq -0x28(%rbp), %rax
movsbl (%rax), %ecx
xorl %eax, %eax
cmpl 0x18(%rbp), %ecx
movb %al, -0x41(%rbp)
je 0xda140
movq -0x28(%rbp), %rax
movsbl (%rax), %eax
cmpl 0x10(%rbp), %eax
setne %al
movb %al, -0x41(%rbp)
movb -0x41(%rbp), %al
testb $0x1, %al
jne 0xda14c
jmp 0xda1f6
movq -0x28(%rbp), %rax
movsbl (%rax), %eax
cmpl -0x34(%rbp), %eax
jne 0xda172
movq -0x28(%rbp), %rax
addq $0x1, %rax
cmpq -0x30(%rbp), %rax
je 0xda172
movq -0x28(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x28(%rbp)
movq -0x18(%rbp), %rax
cmpq -0x20(%rbp), %rax
je 0xda1bc
movq -0x10(%rbp), %rax
movq 0x58(%rax), %rax
movq -0x28(%rbp), %rcx
movq %rcx, %rdx
addq $0x1, %rdx
movq %rdx, -0x28(%rbp)
movzbl (%rcx), %ecx
movzbl (%rax,%rcx), %eax
movq -0x10(%rbp), %rcx
movq 0x58(%rcx), %rcx
movq -0x18(%rbp), %rdx
movq %rdx, %rsi
addq $0x1, %rsi
movq %rsi, -0x18(%rbp)
movzbl (%rdx), %edx
movzbl (%rcx,%rdx), %ecx
cmpl %ecx, %eax
je 0xda1c8
movl $0x1, -0x4(%rbp)
jmp 0xda43a
movq -0x28(%rbp), %rax
cmpq -0x30(%rbp), %rax
jne 0xda1ea
movq -0x18(%rbp), %rax
cmpq -0x20(%rbp), %rax
setne %al
andb $0x1, %al
movzbl %al, %eax
movl %eax, -0x4(%rbp)
jmp 0xda43a
movl $0x1, -0x38(%rbp)
jmp 0xda11f
movq -0x28(%rbp), %rax
movsbl (%rax), %eax
cmpl 0x10(%rbp), %eax
jne 0xda264
jmp 0xda204
movq -0x18(%rbp), %rax
cmpq -0x20(%rbp), %rax
jne 0xda219
movl -0x38(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0xda43a
movq -0x18(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x18(%rbp)
movq -0x28(%rbp), %rcx
addq $0x1, %rcx
movq %rcx, -0x28(%rbp)
xorl %eax, %eax
cmpq -0x30(%rbp), %rcx
movb %al, -0x42(%rbp)
jae 0xda24c
movq -0x28(%rbp), %rax
movsbl (%rax), %eax
cmpl 0x10(%rbp), %eax
sete %al
movb %al, -0x42(%rbp)
movb -0x42(%rbp), %al
testb $0x1, %al
jne 0xda204
movq -0x28(%rbp), %rax
cmpq -0x30(%rbp), %rax
jne 0xda262
jmp 0xda422
jmp 0xda264
movq -0x28(%rbp), %rax
movsbl (%rax), %eax
cmpl 0x18(%rbp), %eax
jne 0xda41d
movq -0x28(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
cmpq -0x30(%rbp), %rax
je 0xda2d8
movq -0x28(%rbp), %rax
movsbl (%rax), %eax
cmpl 0x18(%rbp), %eax
jne 0xda298
jmp 0xda2ca
movq -0x28(%rbp), %rax
movsbl (%rax), %eax
cmpl 0x10(%rbp), %eax
jne 0xda2c8
movq -0x18(%rbp), %rax
cmpq -0x20(%rbp), %rax
jne 0xda2ba
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0xda43a
movq -0x18(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x18(%rbp)
jmp 0xda2ca
jmp 0xda2d8
movq -0x28(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x28(%rbp)
jmp 0xda280
movq -0x28(%rbp), %rax
cmpq -0x30(%rbp), %rax
jne 0xda2ee
movl $0x0, -0x4(%rbp)
jmp 0xda43a
movq -0x18(%rbp), %rax
cmpq -0x20(%rbp), %rax
jne 0xda304
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0xda43a
movq -0x28(%rbp), %rax
movb (%rax), %al
movb %al, -0x39(%rbp)
movzbl %al, %eax
cmpl -0x34(%rbp), %eax
jne 0xda338
movq -0x28(%rbp), %rax
addq $0x1, %rax
cmpq -0x30(%rbp), %rax
je 0xda338
movq -0x28(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x28(%rbp)
movb 0x1(%rax), %al
movb %al, -0x39(%rbp)
movq -0x28(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x28(%rbp)
movq -0x10(%rbp), %rax
movq 0x58(%rax), %rax
movzbl -0x39(%rbp), %ecx
movb (%rax,%rcx), %al
movb %al, -0x39(%rbp)
jmp 0xda358
movq -0x18(%rbp), %rcx
xorl %eax, %eax
cmpq -0x20(%rbp), %rcx
movb %al, -0x43(%rbp)
je 0xda386
movq -0x10(%rbp), %rax
movq 0x58(%rax), %rax
movq -0x18(%rbp), %rcx
movzbl (%rcx), %ecx
movzbl (%rax,%rcx), %eax
movzbl -0x39(%rbp), %ecx
cmpl %ecx, %eax
setne %al
movb %al, -0x43(%rbp)
movb -0x43(%rbp), %al
testb $0x1, %al
jne 0xda38f
jmp 0xda39d
movq -0x18(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x18(%rbp)
jmp 0xda358
movq -0x18(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x18(%rbp)
cmpq -0x20(%rbp), %rax
jne 0xda3bb
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0xda43a
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x20(%rbp), %rdx
movq -0x28(%rbp), %rcx
movq -0x30(%rbp), %r8
movl -0x34(%rbp), %r9d
movl 0x10(%rbp), %r11d
movl 0x18(%rbp), %r10d
movl 0x20(%rbp), %eax
addl $0x1, %eax
movl %r11d, (%rsp)
movl %r10d, 0x8(%rsp)
movl %eax, 0x10(%rsp)
callq 0xda0b0
movl %eax, -0x40(%rbp)
cmpl $0x0, -0x40(%rbp)
jg 0xda404
movl -0x40(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0xda43a
jmp 0xda406
movq -0x18(%rbp), %rax
cmpq -0x20(%rbp), %rax
jne 0xda356
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0xda43a
jmp 0xda10f
movq -0x18(%rbp), %rdx
movq -0x20(%rbp), %rsi
xorl %eax, %eax
movl $0x1, %ecx
cmpq %rsi, %rdx
cmovnel %ecx, %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x60, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
|
my_wildcmp_8bit_impl:
push rbp
mov rbp, rsp
sub rsp, 60h
mov eax, [rbp+arg_10]
mov eax, [rbp+arg_8]
mov eax, [rbp+arg_0]
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov [rbp+var_20], rdx
mov [rbp+var_28], rcx
mov [rbp+var_30], r8
mov [rbp+var_34], r9d
mov [rbp+var_38], 0FFFFFFFFh
lea rax, my_string_stack_guard
cmp qword ptr [rax], 0
jz short loc_DA10D
lea rax, my_string_stack_guard
mov rax, [rax]
mov edi, [rbp+arg_10]
call rax
cmp eax, 0
jz short loc_DA10D
mov [rbp+var_4], 1
jmp loc_DA43A
loc_DA10D:
jmp short $+2
loc_DA10F:
mov rax, [rbp+var_28]
cmp rax, [rbp+var_30]
jz loc_DA422
jmp short $+2
loc_DA11F:
mov rax, [rbp+var_28]
movsx ecx, byte ptr [rax]
xor eax, eax
cmp ecx, [rbp+arg_8]
mov [rbp+var_41], al
jz short loc_DA140
mov rax, [rbp+var_28]
movsx eax, byte ptr [rax]
cmp eax, [rbp+arg_0]
setnz al
mov [rbp+var_41], al
loc_DA140:
mov al, [rbp+var_41]
test al, 1
jnz short loc_DA14C
jmp loc_DA1F6
loc_DA14C:
mov rax, [rbp+var_28]
movsx eax, byte ptr [rax]
cmp eax, [rbp+var_34]
jnz short loc_DA172
mov rax, [rbp+var_28]
add rax, 1
cmp rax, [rbp+var_30]
jz short loc_DA172
mov rax, [rbp+var_28]
add rax, 1
mov [rbp+var_28], rax
loc_DA172:
mov rax, [rbp+var_18]
cmp rax, [rbp+var_20]
jz short loc_DA1BC
mov rax, [rbp+var_10]
mov rax, [rax+58h]
mov rcx, [rbp+var_28]
mov rdx, rcx
add rdx, 1
mov [rbp+var_28], rdx
movzx ecx, byte ptr [rcx]
movzx eax, byte ptr [rax+rcx]
mov rcx, [rbp+var_10]
mov rcx, [rcx+58h]
mov rdx, [rbp+var_18]
mov rsi, rdx
add rsi, 1
mov [rbp+var_18], rsi
movzx edx, byte ptr [rdx]
movzx ecx, byte ptr [rcx+rdx]
cmp eax, ecx
jz short loc_DA1C8
loc_DA1BC:
mov [rbp+var_4], 1
jmp loc_DA43A
loc_DA1C8:
mov rax, [rbp+var_28]
cmp rax, [rbp+var_30]
jnz short loc_DA1EA
mov rax, [rbp+var_18]
cmp rax, [rbp+var_20]
setnz al
and al, 1
movzx eax, al
mov [rbp+var_4], eax
jmp loc_DA43A
loc_DA1EA:
mov [rbp+var_38], 1
jmp loc_DA11F
loc_DA1F6:
mov rax, [rbp+var_28]
movsx eax, byte ptr [rax]
cmp eax, [rbp+arg_0]
jnz short loc_DA264
jmp short $+2
loc_DA204:
mov rax, [rbp+var_18]
cmp rax, [rbp+var_20]
jnz short loc_DA219
mov eax, [rbp+var_38]
mov [rbp+var_4], eax
jmp loc_DA43A
loc_DA219:
mov rax, [rbp+var_18]
add rax, 1
mov [rbp+var_18], rax
mov rcx, [rbp+var_28]
add rcx, 1
mov [rbp+var_28], rcx
xor eax, eax
cmp rcx, [rbp+var_30]
mov [rbp+var_42], al
jnb short loc_DA24C
mov rax, [rbp+var_28]
movsx eax, byte ptr [rax]
cmp eax, [rbp+arg_0]
setz al
mov [rbp+var_42], al
loc_DA24C:
mov al, [rbp+var_42]
test al, 1
jnz short loc_DA204
mov rax, [rbp+var_28]
cmp rax, [rbp+var_30]
jnz short loc_DA262
jmp loc_DA422
loc_DA262:
jmp short $+2
loc_DA264:
mov rax, [rbp+var_28]
movsx eax, byte ptr [rax]
cmp eax, [rbp+arg_8]
jnz loc_DA41D
mov rax, [rbp+var_28]
add rax, 1
mov [rbp+var_28], rax
loc_DA280:
mov rax, [rbp+var_28]
cmp rax, [rbp+var_30]
jz short loc_DA2D8
mov rax, [rbp+var_28]
movsx eax, byte ptr [rax]
cmp eax, [rbp+arg_8]
jnz short loc_DA298
jmp short loc_DA2CA
loc_DA298:
mov rax, [rbp+var_28]
movsx eax, byte ptr [rax]
cmp eax, [rbp+arg_0]
jnz short loc_DA2C8
mov rax, [rbp+var_18]
cmp rax, [rbp+var_20]
jnz short loc_DA2BA
mov [rbp+var_4], 0FFFFFFFFh
jmp loc_DA43A
loc_DA2BA:
mov rax, [rbp+var_18]
add rax, 1
mov [rbp+var_18], rax
jmp short loc_DA2CA
loc_DA2C8:
jmp short loc_DA2D8
loc_DA2CA:
mov rax, [rbp+var_28]
add rax, 1
mov [rbp+var_28], rax
jmp short loc_DA280
loc_DA2D8:
mov rax, [rbp+var_28]
cmp rax, [rbp+var_30]
jnz short loc_DA2EE
mov [rbp+var_4], 0
jmp loc_DA43A
loc_DA2EE:
mov rax, [rbp+var_18]
cmp rax, [rbp+var_20]
jnz short loc_DA304
mov [rbp+var_4], 0FFFFFFFFh
jmp loc_DA43A
loc_DA304:
mov rax, [rbp+var_28]
mov al, [rax]
mov [rbp+var_39], al
movzx eax, al
cmp eax, [rbp+var_34]
jnz short loc_DA338
mov rax, [rbp+var_28]
add rax, 1
cmp rax, [rbp+var_30]
jz short loc_DA338
mov rax, [rbp+var_28]
mov rcx, rax
add rcx, 1
mov [rbp+var_28], rcx
mov al, [rax+1]
mov [rbp+var_39], al
loc_DA338:
mov rax, [rbp+var_28]
add rax, 1
mov [rbp+var_28], rax
mov rax, [rbp+var_10]
mov rax, [rax+58h]
movzx ecx, [rbp+var_39]
mov al, [rax+rcx]
mov [rbp+var_39], al
loc_DA356:
jmp short $+2
loc_DA358:
mov rcx, [rbp+var_18]
xor eax, eax
cmp rcx, [rbp+var_20]
mov [rbp+var_43], al
jz short loc_DA386
mov rax, [rbp+var_10]
mov rax, [rax+58h]
mov rcx, [rbp+var_18]
movzx ecx, byte ptr [rcx]
movzx eax, byte ptr [rax+rcx]
movzx ecx, [rbp+var_39]
cmp eax, ecx
setnz al
mov [rbp+var_43], al
loc_DA386:
mov al, [rbp+var_43]
test al, 1
jnz short loc_DA38F
jmp short loc_DA39D
loc_DA38F:
mov rax, [rbp+var_18]
add rax, 1
mov [rbp+var_18], rax
jmp short loc_DA358
loc_DA39D:
mov rax, [rbp+var_18]
mov rcx, rax
add rcx, 1
mov [rbp+var_18], rcx
cmp rax, [rbp+var_20]
jnz short loc_DA3BB
mov [rbp+var_4], 0FFFFFFFFh
jmp short loc_DA43A
loc_DA3BB:
mov rdi, [rbp+var_10]
mov rsi, [rbp+var_18]
mov rdx, [rbp+var_20]
mov rcx, [rbp+var_28]
mov r8, [rbp+var_30]
mov r9d, [rbp+var_34]
mov r11d, [rbp+arg_0]
mov r10d, [rbp+arg_8]
mov eax, [rbp+arg_10]
add eax, 1
mov [rsp+60h+var_60], r11d
mov [rsp+60h+var_58], r10d
mov [rsp+60h+var_50], eax
call my_wildcmp_8bit_impl
mov [rbp+var_40], eax
cmp [rbp+var_40], 0
jg short loc_DA404
mov eax, [rbp+var_40]
mov [rbp+var_4], eax
jmp short loc_DA43A
loc_DA404:
jmp short $+2
loc_DA406:
mov rax, [rbp+var_18]
cmp rax, [rbp+var_20]
jnz loc_DA356
mov [rbp+var_4], 0FFFFFFFFh
jmp short loc_DA43A
loc_DA41D:
jmp loc_DA10F
loc_DA422:
mov rdx, [rbp+var_18]
mov rsi, [rbp+var_20]
xor eax, eax
mov ecx, 1
cmp rdx, rsi
cmovnz eax, ecx
mov [rbp+var_4], eax
loc_DA43A:
mov eax, [rbp+var_4]
add rsp, 60h
pop rbp
retn
|
long long my_wildcmp_8bit_impl(
long long a1,
unsigned __int8 *a2,
unsigned __int8 *a3,
char *a4,
char *a5,
int a6,
int a7,
int a8,
unsigned int a9)
{
char *v9; // rcx
unsigned __int8 *v10; // rdx
char *v11; // rax
unsigned __int8 *v12; // rax
bool v14; // [rsp+1Dh] [rbp-43h]
bool v15; // [rsp+1Eh] [rbp-42h]
bool v16; // [rsp+1Fh] [rbp-41h]
int v17; // [rsp+20h] [rbp-40h]
unsigned __int8 v18; // [rsp+27h] [rbp-39h]
unsigned __int8 v19; // [rsp+27h] [rbp-39h]
unsigned int v20; // [rsp+28h] [rbp-38h]
char *i; // [rsp+38h] [rbp-28h]
int v25; // [rsp+38h] [rbp-28h]
v20 = -1;
if ( my_string_stack_guard && (unsigned int)my_string_stack_guard(a9) )
{
return 1;
}
else
{
do
{
if ( a4 != a5 )
{
while ( 1 )
{
v16 = 0;
if ( *a4 != a8 )
v16 = *a4 != a7;
if ( !v16 )
break;
if ( *a4 == a6 && a4 + 1 != a5 )
++a4;
if ( a2 == a3 )
return 1;
v9 = a4++;
v10 = a2++;
if ( *(unsigned __int8 *)(*(_QWORD *)(a1 + 88) + (unsigned __int8)*v9) != *(unsigned __int8 *)(*(_QWORD *)(a1 + 88) + *v10) )
return 1;
if ( a4 == a5 )
return a2 != a3;
v20 = 1;
}
if ( *a4 != a7 )
continue;
do
{
if ( a2 == a3 )
return v20;
++a2;
++a4;
v15 = 0;
if ( a4 < a5 )
v15 = *a4 == a7;
}
while ( v15 );
if ( a4 != a5 )
continue;
}
return a2 != a3;
}
while ( *a4 != a8 );
for ( i = a4 + 1; i != a5; ++i )
{
if ( *i != a8 )
{
if ( *i != a7 )
break;
if ( a2 == a3 )
return (unsigned int)-1;
++a2;
}
}
if ( i == a5 )
{
return 0;
}
else if ( a2 == a3 )
{
return (unsigned int)-1;
}
else
{
v18 = *i;
if ( (unsigned __int8)*i == a6 && i + 1 != a5 )
{
v11 = i;
LODWORD(i) = (_DWORD)i + 1;
v18 = v11[1];
}
v25 = (_DWORD)i + 1;
v19 = *(_BYTE *)(*(_QWORD *)(a1 + 88) + v18);
do
{
while ( 1 )
{
v14 = 0;
if ( a2 != a3 )
v14 = *(unsigned __int8 *)(*(_QWORD *)(a1 + 88) + *a2) != v19;
if ( !v14 )
break;
++a2;
}
v12 = a2++;
if ( v12 == a3 )
return (unsigned int)-1;
v17 = my_wildcmp_8bit_impl(a1, (_DWORD)a2, (_DWORD)a3, v25, (_DWORD)a5, a6, a7, a8, a9 + 1);
if ( v17 <= 0 )
return (unsigned int)v17;
}
while ( a2 != a3 );
return (unsigned int)-1;
}
}
}
|
my_wildcmp_8bit_impl:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x60
MOV EAX,dword ptr [RBP + 0x20]
MOV EAX,dword ptr [RBP + 0x18]
MOV EAX,dword ptr [RBP + 0x10]
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x18],RSI
MOV qword ptr [RBP + -0x20],RDX
MOV qword ptr [RBP + -0x28],RCX
MOV qword ptr [RBP + -0x30],R8
MOV dword ptr [RBP + -0x34],R9D
MOV dword ptr [RBP + -0x38],0xffffffff
LEA RAX,[0x5509e8]
CMP qword ptr [RAX],0x0
JZ 0x001da10d
LEA RAX,[0x5509e8]
MOV RAX,qword ptr [RAX]
MOV EDI,dword ptr [RBP + 0x20]
CALL RAX
CMP EAX,0x0
JZ 0x001da10d
MOV dword ptr [RBP + -0x4],0x1
JMP 0x001da43a
LAB_001da10d:
JMP 0x001da10f
LAB_001da10f:
MOV RAX,qword ptr [RBP + -0x28]
CMP RAX,qword ptr [RBP + -0x30]
JZ 0x001da422
JMP 0x001da11f
LAB_001da11f:
MOV RAX,qword ptr [RBP + -0x28]
MOVSX ECX,byte ptr [RAX]
XOR EAX,EAX
CMP ECX,dword ptr [RBP + 0x18]
MOV byte ptr [RBP + -0x41],AL
JZ 0x001da140
MOV RAX,qword ptr [RBP + -0x28]
MOVSX EAX,byte ptr [RAX]
CMP EAX,dword ptr [RBP + 0x10]
SETNZ AL
MOV byte ptr [RBP + -0x41],AL
LAB_001da140:
MOV AL,byte ptr [RBP + -0x41]
TEST AL,0x1
JNZ 0x001da14c
JMP 0x001da1f6
LAB_001da14c:
MOV RAX,qword ptr [RBP + -0x28]
MOVSX EAX,byte ptr [RAX]
CMP EAX,dword ptr [RBP + -0x34]
JNZ 0x001da172
MOV RAX,qword ptr [RBP + -0x28]
ADD RAX,0x1
CMP RAX,qword ptr [RBP + -0x30]
JZ 0x001da172
MOV RAX,qword ptr [RBP + -0x28]
ADD RAX,0x1
MOV qword ptr [RBP + -0x28],RAX
LAB_001da172:
MOV RAX,qword ptr [RBP + -0x18]
CMP RAX,qword ptr [RBP + -0x20]
JZ 0x001da1bc
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x58]
MOV RCX,qword ptr [RBP + -0x28]
MOV RDX,RCX
ADD RDX,0x1
MOV qword ptr [RBP + -0x28],RDX
MOVZX ECX,byte ptr [RCX]
MOVZX EAX,byte ptr [RAX + RCX*0x1]
MOV RCX,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RCX + 0x58]
MOV RDX,qword ptr [RBP + -0x18]
MOV RSI,RDX
ADD RSI,0x1
MOV qword ptr [RBP + -0x18],RSI
MOVZX EDX,byte ptr [RDX]
MOVZX ECX,byte ptr [RCX + RDX*0x1]
CMP EAX,ECX
JZ 0x001da1c8
LAB_001da1bc:
MOV dword ptr [RBP + -0x4],0x1
JMP 0x001da43a
LAB_001da1c8:
MOV RAX,qword ptr [RBP + -0x28]
CMP RAX,qword ptr [RBP + -0x30]
JNZ 0x001da1ea
MOV RAX,qword ptr [RBP + -0x18]
CMP RAX,qword ptr [RBP + -0x20]
SETNZ AL
AND AL,0x1
MOVZX EAX,AL
MOV dword ptr [RBP + -0x4],EAX
JMP 0x001da43a
LAB_001da1ea:
MOV dword ptr [RBP + -0x38],0x1
JMP 0x001da11f
LAB_001da1f6:
MOV RAX,qword ptr [RBP + -0x28]
MOVSX EAX,byte ptr [RAX]
CMP EAX,dword ptr [RBP + 0x10]
JNZ 0x001da264
JMP 0x001da204
LAB_001da204:
MOV RAX,qword ptr [RBP + -0x18]
CMP RAX,qword ptr [RBP + -0x20]
JNZ 0x001da219
MOV EAX,dword ptr [RBP + -0x38]
MOV dword ptr [RBP + -0x4],EAX
JMP 0x001da43a
LAB_001da219:
MOV RAX,qword ptr [RBP + -0x18]
ADD RAX,0x1
MOV qword ptr [RBP + -0x18],RAX
MOV RCX,qword ptr [RBP + -0x28]
ADD RCX,0x1
MOV qword ptr [RBP + -0x28],RCX
XOR EAX,EAX
CMP RCX,qword ptr [RBP + -0x30]
MOV byte ptr [RBP + -0x42],AL
JNC 0x001da24c
MOV RAX,qword ptr [RBP + -0x28]
MOVSX EAX,byte ptr [RAX]
CMP EAX,dword ptr [RBP + 0x10]
SETZ AL
MOV byte ptr [RBP + -0x42],AL
LAB_001da24c:
MOV AL,byte ptr [RBP + -0x42]
TEST AL,0x1
JNZ 0x001da204
MOV RAX,qword ptr [RBP + -0x28]
CMP RAX,qword ptr [RBP + -0x30]
JNZ 0x001da262
JMP 0x001da422
LAB_001da262:
JMP 0x001da264
LAB_001da264:
MOV RAX,qword ptr [RBP + -0x28]
MOVSX EAX,byte ptr [RAX]
CMP EAX,dword ptr [RBP + 0x18]
JNZ 0x001da41d
MOV RAX,qword ptr [RBP + -0x28]
ADD RAX,0x1
MOV qword ptr [RBP + -0x28],RAX
LAB_001da280:
MOV RAX,qword ptr [RBP + -0x28]
CMP RAX,qword ptr [RBP + -0x30]
JZ 0x001da2d8
MOV RAX,qword ptr [RBP + -0x28]
MOVSX EAX,byte ptr [RAX]
CMP EAX,dword ptr [RBP + 0x18]
JNZ 0x001da298
JMP 0x001da2ca
LAB_001da298:
MOV RAX,qword ptr [RBP + -0x28]
MOVSX EAX,byte ptr [RAX]
CMP EAX,dword ptr [RBP + 0x10]
JNZ 0x001da2c8
MOV RAX,qword ptr [RBP + -0x18]
CMP RAX,qword ptr [RBP + -0x20]
JNZ 0x001da2ba
MOV dword ptr [RBP + -0x4],0xffffffff
JMP 0x001da43a
LAB_001da2ba:
MOV RAX,qword ptr [RBP + -0x18]
ADD RAX,0x1
MOV qword ptr [RBP + -0x18],RAX
JMP 0x001da2ca
LAB_001da2c8:
JMP 0x001da2d8
LAB_001da2ca:
MOV RAX,qword ptr [RBP + -0x28]
ADD RAX,0x1
MOV qword ptr [RBP + -0x28],RAX
JMP 0x001da280
LAB_001da2d8:
MOV RAX,qword ptr [RBP + -0x28]
CMP RAX,qword ptr [RBP + -0x30]
JNZ 0x001da2ee
MOV dword ptr [RBP + -0x4],0x0
JMP 0x001da43a
LAB_001da2ee:
MOV RAX,qword ptr [RBP + -0x18]
CMP RAX,qword ptr [RBP + -0x20]
JNZ 0x001da304
MOV dword ptr [RBP + -0x4],0xffffffff
JMP 0x001da43a
LAB_001da304:
MOV RAX,qword ptr [RBP + -0x28]
MOV AL,byte ptr [RAX]
MOV byte ptr [RBP + -0x39],AL
MOVZX EAX,AL
CMP EAX,dword ptr [RBP + -0x34]
JNZ 0x001da338
MOV RAX,qword ptr [RBP + -0x28]
ADD RAX,0x1
CMP RAX,qword ptr [RBP + -0x30]
JZ 0x001da338
MOV RAX,qword ptr [RBP + -0x28]
MOV RCX,RAX
ADD RCX,0x1
MOV qword ptr [RBP + -0x28],RCX
MOV AL,byte ptr [RAX + 0x1]
MOV byte ptr [RBP + -0x39],AL
LAB_001da338:
MOV RAX,qword ptr [RBP + -0x28]
ADD RAX,0x1
MOV qword ptr [RBP + -0x28],RAX
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x58]
MOVZX ECX,byte ptr [RBP + -0x39]
MOV AL,byte ptr [RAX + RCX*0x1]
MOV byte ptr [RBP + -0x39],AL
LAB_001da356:
JMP 0x001da358
LAB_001da358:
MOV RCX,qword ptr [RBP + -0x18]
XOR EAX,EAX
CMP RCX,qword ptr [RBP + -0x20]
MOV byte ptr [RBP + -0x43],AL
JZ 0x001da386
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x58]
MOV RCX,qword ptr [RBP + -0x18]
MOVZX ECX,byte ptr [RCX]
MOVZX EAX,byte ptr [RAX + RCX*0x1]
MOVZX ECX,byte ptr [RBP + -0x39]
CMP EAX,ECX
SETNZ AL
MOV byte ptr [RBP + -0x43],AL
LAB_001da386:
MOV AL,byte ptr [RBP + -0x43]
TEST AL,0x1
JNZ 0x001da38f
JMP 0x001da39d
LAB_001da38f:
MOV RAX,qword ptr [RBP + -0x18]
ADD RAX,0x1
MOV qword ptr [RBP + -0x18],RAX
JMP 0x001da358
LAB_001da39d:
MOV RAX,qword ptr [RBP + -0x18]
MOV RCX,RAX
ADD RCX,0x1
MOV qword ptr [RBP + -0x18],RCX
CMP RAX,qword ptr [RBP + -0x20]
JNZ 0x001da3bb
MOV dword ptr [RBP + -0x4],0xffffffff
JMP 0x001da43a
LAB_001da3bb:
MOV RDI,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RBP + -0x18]
MOV RDX,qword ptr [RBP + -0x20]
MOV RCX,qword ptr [RBP + -0x28]
MOV R8,qword ptr [RBP + -0x30]
MOV R9D,dword ptr [RBP + -0x34]
MOV R11D,dword ptr [RBP + 0x10]
MOV R10D,dword ptr [RBP + 0x18]
MOV EAX,dword ptr [RBP + 0x20]
ADD EAX,0x1
MOV dword ptr [RSP],R11D
MOV dword ptr [RSP + 0x8],R10D
MOV dword ptr [RSP + 0x10],EAX
CALL 0x001da0b0
MOV dword ptr [RBP + -0x40],EAX
CMP dword ptr [RBP + -0x40],0x0
JG 0x001da404
MOV EAX,dword ptr [RBP + -0x40]
MOV dword ptr [RBP + -0x4],EAX
JMP 0x001da43a
LAB_001da404:
JMP 0x001da406
LAB_001da406:
MOV RAX,qword ptr [RBP + -0x18]
CMP RAX,qword ptr [RBP + -0x20]
JNZ 0x001da356
MOV dword ptr [RBP + -0x4],0xffffffff
JMP 0x001da43a
LAB_001da41d:
JMP 0x001da10f
LAB_001da422:
MOV RDX,qword ptr [RBP + -0x18]
MOV RSI,qword ptr [RBP + -0x20]
XOR EAX,EAX
MOV ECX,0x1
CMP RDX,RSI
CMOVNZ EAX,ECX
MOV dword ptr [RBP + -0x4],EAX
LAB_001da43a:
MOV EAX,dword ptr [RBP + -0x4]
ADD RSP,0x60
POP RBP
RET
|
uint my_wildcmp_8bit_impl
(long param_1,byte *param_2,byte *param_3,byte *param_4,byte *param_5,uint param_6,
int param_7,int param_8,int param_9)
{
char cVar1;
int iVar2;
uint uVar3;
byte *pbVar4;
bool bVar5;
byte local_41;
uint local_40;
byte *local_30;
byte *local_20;
uint local_c;
local_40 = 0xffffffff;
local_30 = param_4;
local_20 = param_2;
if ((my_string_stack_guard == (code *)0x0) ||
(iVar2 = (*my_string_stack_guard)(param_9), iVar2 == 0)) {
do {
if (local_30 == param_5) {
LAB_001da422:
return (uint)(local_20 != param_3);
}
while( true ) {
bVar5 = false;
if ((char)*local_30 != param_8) {
bVar5 = (char)*local_30 != param_7;
}
if (!bVar5) break;
if (((int)(char)*local_30 == param_6) && (local_30 + 1 != param_5)) {
local_30 = local_30 + 1;
}
if (local_20 == param_3) {
return 1;
}
if (*(char *)(*(long *)(param_1 + 0x58) + (ulong)*local_30) !=
*(char *)(*(long *)(param_1 + 0x58) + (ulong)*local_20)) {
return 1;
}
if (local_30 + 1 == param_5) {
return (uint)(local_20 + 1 != param_3);
}
local_40 = 1;
local_30 = local_30 + 1;
local_20 = local_20 + 1;
}
if ((char)*local_30 == param_7) {
do {
if (local_20 == param_3) {
return local_40;
}
local_20 = local_20 + 1;
local_30 = local_30 + 1;
bVar5 = false;
if (local_30 < param_5) {
bVar5 = (char)*local_30 == param_7;
}
} while (bVar5);
if (local_30 == param_5) goto LAB_001da422;
}
} while ((char)*local_30 != param_8);
while (pbVar4 = local_30, local_30 = pbVar4 + 1, local_30 != param_5) {
if ((char)*local_30 != param_8) {
if ((char)*local_30 != param_7) break;
if (local_20 == param_3) {
return 0xffffffff;
}
local_20 = local_20 + 1;
}
}
if (local_30 == param_5) {
local_c = 0;
}
else if (local_20 == param_3) {
local_c = 0xffffffff;
}
else {
local_41 = *local_30;
if ((local_41 == param_6) && (pbVar4 + 2 != param_5)) {
local_30 = pbVar4 + 2;
local_41 = pbVar4[2];
}
cVar1 = *(char *)(*(long *)(param_1 + 0x58) + (ulong)local_41);
do {
while( true ) {
bVar5 = false;
if (local_20 != param_3) {
bVar5 = *(char *)(*(long *)(param_1 + 0x58) + (ulong)*local_20) != cVar1;
}
if (!bVar5) break;
local_20 = local_20 + 1;
}
pbVar4 = local_20 + 1;
if (local_20 == param_3) {
return 0xffffffff;
}
uVar3 = my_wildcmp_8bit_impl
(param_1,pbVar4,param_3,local_30 + 1,param_5,param_6,param_7,param_8,
param_9 + 1);
if ((int)uVar3 < 1) {
return uVar3;
}
local_20 = pbVar4;
} while (pbVar4 != param_3);
local_c = 0xffffffff;
}
}
else {
local_c = 1;
}
return local_c;
}
|
|
8,968 |
my_wildcmp_8bit_impl
|
eloqsql/strings/ctype-simple.c
|
static
int my_wildcmp_8bit_impl(CHARSET_INFO *cs,
const char *str,const char *str_end,
const char *wildstr,const char *wildend,
int escape, int w_one, int w_many, int recurse_level)
{
int result= -1; /* Not found, using wildcards */
if (my_string_stack_guard && my_string_stack_guard(recurse_level))
return 1;
while (wildstr != wildend)
{
while (*wildstr != w_many && *wildstr != w_one)
{
if (*wildstr == escape && wildstr+1 != wildend)
wildstr++;
if (str == str_end || likeconv(cs,*wildstr++) != likeconv(cs,*str++))
return(1); /* No match */
if (wildstr == wildend)
return(str != str_end); /* Match if both are at end */
result=1; /* Found an anchor char */
}
if (*wildstr == w_one)
{
do
{
if (str == str_end) /* Skip one char if possible */
return(result);
INC_PTR(cs,str,str_end);
} while (++wildstr < wildend && *wildstr == w_one);
if (wildstr == wildend)
break;
}
if (*wildstr == w_many)
{ /* Found w_many */
uchar cmp;
wildstr++;
/* Remove any '%' and '_' from the wild search string */
for (; wildstr != wildend ; wildstr++)
{
if (*wildstr == w_many)
continue;
if (*wildstr == w_one)
{
if (str == str_end)
return(-1);
INC_PTR(cs,str,str_end);
continue;
}
break; /* Not a wild character */
}
if (wildstr == wildend)
return(0); /* Ok if w_many is last */
if (str == str_end)
return(-1);
if ((cmp= *wildstr) == escape && wildstr+1 != wildend)
cmp= *++wildstr;
INC_PTR(cs,wildstr,wildend); /* This is compared trough cmp */
cmp=likeconv(cs,cmp);
do
{
/*
Find the next character in the subject string equal to 'cmp', then
check recursively my_wildcmp_8bit_impl() for the pattern remainder.
*/
while (str != str_end && (uchar) likeconv(cs,*str) != cmp)
str++;
if (str++ == str_end)
return(-1); /* 'cmp' was not found in the subject string */
{
int tmp=my_wildcmp_8bit_impl(cs,str,str_end,
wildstr,wildend,escape,w_one,
w_many, recurse_level+1);
if (tmp <= 0)
return(tmp);
}
/*
The recursion call did not match. But it returned 1, which means
the pattern remainder has some non-special characters.
Continue, there is a chance that we'll find another 'cmp'
at a different position in the subject string.
*/
} while (str != str_end);
return(-1);
}
}
return(str != str_end ? 1 : 0);
}
|
O3
|
c
|
my_wildcmp_8bit_impl:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %r8, %r12
movq %rcx, %r13
movq %rdx, %rbx
movq %rsi, %r14
movl 0x20(%rbp), %r10d
leaq 0x35c639(%rip), %rax # 0x3f1858
movq (%rax), %rax
testq %rax, %rax
je 0x95252
movq %rbx, -0x30(%rbp)
movq %rdi, %rbx
movl %r10d, %edi
movl %r9d, %r15d
callq *%rax
movl 0x20(%rbp), %r10d
movq %rbx, %rdi
movq -0x30(%rbp), %rbx
movl %r15d, %r9d
movl $0x1, %r15d
testl %eax, %eax
jne 0x95378
movl 0x18(%rbp), %r11d
movl 0x10(%rbp), %r8d
movl $0xffffffff, %r15d # imm = 0xFFFFFFFF
cmpq %r12, %r13
je 0x9536e
movb (%r13), %al
movsbl %al, %ecx
cmpl %r11d, %ecx
sete %sil
cmpl %r8d, %ecx
sete %dl
orb %dl, %sil
je 0x952cf
testb %dl, %dl
je 0x952c5
incq %r13
movq %r13, %rax
cmpq %rbx, %r14
je 0x95378
movq %r14, %rcx
movq %rax, %r13
cmpq %r12, %rax
jae 0x952b2
leaq 0x1(%rcx), %r14
movsbl (%r13), %edx
leaq 0x1(%r13), %rax
cmpl %r8d, %edx
je 0x9528c
incq %rcx
cmpq %r12, %r13
je 0x9536b
movb (%r13), %al
movq %rcx, %r14
movsbl %al, %eax
cmpl %r11d, %eax
jne 0x95260
jmp 0x95330
movl $0x1, %r15d
cmpq %rbx, %r14
je 0x95378
leaq 0x1(%r13), %rax
cmpq %r12, %rax
cmoveq %r13, %rax
cmpl %r9d, %ecx
cmoveq %rax, %r13
movq 0x58(%rdi), %rax
movzbl (%r13), %ecx
movb (%rax,%rcx), %cl
movzbl (%r14), %edx
cmpb (%rax,%rdx), %cl
jne 0x95378
incq %r14
incq %r13
cmpq %r12, %r13
je 0x9536e
movb (%r13), %al
movsbl %al, %ecx
cmpl %r8d, %ecx
sete %dl
cmpl %r11d, %ecx
je 0x95282
cmpl %r8d, %ecx
jne 0x952cf
jmp 0x95282
leaq 0x1(%r13), %rax
xorl %r15d, %r15d
cmpq %r12, %rax
je 0x95378
addq $0x2, %r13
movb -0x1(%r13), %al
movsbl %al, %ecx
cmpl %r11d, %ecx
je 0x9535d
cmpl %r8d, %ecx
jne 0x9538a
cmpq %rbx, %r14
je 0x95435
incq %r14
leaq 0x1(%r13), %rax
cmpq %r12, %r13
movq %rax, %r13
jne 0x95340
jmp 0x95378
movq %rcx, %r14
xorl %r15d, %r15d
cmpq %rbx, %r14
setne %r15b
movl %r15d, %eax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl $0xffffffff, %r15d # imm = 0xFFFFFFFF
cmpq %rbx, %r14
je 0x95378
movzbl %al, %ecx
leaq -0x1(%r13), %rdx
cmpl %r9d, %ecx
jne 0x953ad
cmpq %r12, %r13
je 0x953ad
movb (%r13), %al
movq %r13, %rdx
incq %rdx
movq 0x58(%rdi), %rcx
movzbl %al, %eax
movb (%rcx,%rax), %r13b
incl %r10d
cmpq %rbx, %r14
je 0x95378
movq 0x58(%rdi), %rax
movzbl (%r14), %ecx
cmpb %r13b, (%rax,%rcx)
je 0x953db
incq %r14
cmpq %rbx, %r14
jne 0x953c7
jmp 0x95378
incq %r14
subq $0x8, %rsp
movq %rdi, -0x48(%rbp)
movq %r14, %rsi
movq %rdx, %rcx
movq %rbx, %rdx
movq %rcx, -0x38(%rbp)
movq %r8, %rax
movq %r12, %r8
movl %r9d, -0x30(%rbp)
movq %r10, -0x40(%rbp)
pushq %r10
pushq %r11
pushq %rax
callq 0x951f7
addq $0x20, %rsp
testl %eax, %eax
jle 0x95440
cmpq %rbx, %r14
movl -0x30(%rbp), %r9d
movq -0x48(%rbp), %rdi
movq -0x40(%rbp), %r10
movl 0x18(%rbp), %r11d
movl 0x10(%rbp), %r8d
movq -0x38(%rbp), %rdx
jne 0x953be
jmp 0x95378
movl $0xffffffff, %r15d # imm = 0xFFFFFFFF
jmp 0x95378
movl %eax, %r15d
jmp 0x95378
|
my_wildcmp_8bit_impl:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 28h
mov r12, r8
mov r13, rcx
mov rbx, rdx
mov r14, rsi
mov r10d, [rbp+arg_10]
lea rax, my_string_stack_guard
mov rax, [rax]
test rax, rax
jz short loc_95252
mov [rbp+var_30], rbx
mov rbx, rdi
mov edi, r10d
mov r15d, r9d
call rax
mov r10d, [rbp+arg_10]
mov rdi, rbx
mov rbx, [rbp+var_30]
mov r9d, r15d
mov r15d, 1
test eax, eax
jnz loc_95378
loc_95252:
mov r11d, [rbp+arg_8]
mov r8d, [rbp+arg_0]
mov r15d, 0FFFFFFFFh
loc_95260:
cmp r13, r12
jz loc_9536E
mov al, [r13+0]
movsx ecx, al
cmp ecx, r11d
setz sil
cmp ecx, r8d
setz dl
or sil, dl
jz short loc_952CF
loc_95282:
test dl, dl
jz short loc_952C5
inc r13
mov rax, r13
loc_9528C:
cmp r14, rbx
jz loc_95378
mov rcx, r14
mov r13, rax
cmp rax, r12
jnb short loc_952B2
lea r14, [rcx+1]
movsx edx, byte ptr [r13+0]
lea rax, [r13+1]
cmp edx, r8d
jz short loc_9528C
loc_952B2:
inc rcx
cmp r13, r12
jz loc_9536B
mov al, [r13+0]
mov r14, rcx
loc_952C5:
movsx eax, al
cmp eax, r11d
jnz short loc_95260
jmp short loc_95330
loc_952CF:
mov r15d, 1
cmp r14, rbx
jz loc_95378
lea rax, [r13+1]
cmp rax, r12
cmovz rax, r13
cmp ecx, r9d
cmovz r13, rax
mov rax, [rdi+58h]
movzx ecx, byte ptr [r13+0]
mov cl, [rax+rcx]
movzx edx, byte ptr [r14]
cmp cl, [rax+rdx]
jnz short loc_95378
inc r14
inc r13
cmp r13, r12
jz short loc_9536E
mov al, [r13+0]
movsx ecx, al
cmp ecx, r8d
setz dl
cmp ecx, r11d
jz loc_95282
cmp ecx, r8d
jnz short loc_952CF
jmp loc_95282
loc_95330:
lea rax, [r13+1]
xor r15d, r15d
cmp rax, r12
jz short loc_95378
add r13, 2
loc_95340:
mov al, [r13-1]
movsx ecx, al
cmp ecx, r11d
jz short loc_9535D
cmp ecx, r8d
jnz short loc_9538A
cmp r14, rbx
jz loc_95435
inc r14
loc_9535D:
lea rax, [r13+1]
cmp r13, r12
mov r13, rax
jnz short loc_95340
jmp short loc_95378
loc_9536B:
mov r14, rcx
loc_9536E:
xor r15d, r15d
cmp r14, rbx
setnz r15b
loc_95378:
mov eax, r15d
add rsp, 28h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_9538A:
mov r15d, 0FFFFFFFFh
cmp r14, rbx
jz short loc_95378
movzx ecx, al
lea rdx, [r13-1]
cmp ecx, r9d
jnz short loc_953AD
cmp r13, r12
jz short loc_953AD
mov al, [r13+0]
mov rdx, r13
loc_953AD:
inc rdx
mov rcx, [rdi+58h]
movzx eax, al
mov r13b, [rcx+rax]
inc r10d
loc_953BE:
cmp r14, rbx
jz short loc_95378
mov rax, [rdi+58h]
loc_953C7:
movzx ecx, byte ptr [r14]
cmp [rax+rcx], r13b
jz short loc_953DB
inc r14
cmp r14, rbx
jnz short loc_953C7
jmp short loc_95378
loc_953DB:
inc r14
sub rsp, 8
mov [rbp+var_48], rdi
mov rsi, r14
mov rcx, rdx
mov rdx, rbx
mov [rbp+var_38], rcx
mov rax, r8
mov r8, r12
mov dword ptr [rbp+var_30], r9d
mov [rbp+var_40], r10
push r10
push r11
push rax
call my_wildcmp_8bit_impl
add rsp, 20h
test eax, eax
jle short loc_95440
cmp r14, rbx
mov r9d, dword ptr [rbp+var_30]
mov rdi, [rbp+var_48]
mov r10, [rbp+var_40]
mov r11d, [rbp+arg_8]
mov r8d, [rbp+arg_0]
mov rdx, [rbp+var_38]
jnz short loc_953BE
jmp loc_95378
loc_95435:
mov r15d, 0FFFFFFFFh
jmp loc_95378
loc_95440:
mov r15d, eax
jmp loc_95378
|
long long my_wildcmp_8bit_impl(
long long a1,
unsigned __int8 *a2,
unsigned __int8 *a3,
char *a4,
char *a5,
int a6,
int a7,
int a8,
unsigned int a9)
{
unsigned __int8 *v11; // rbx
unsigned int v13; // r10d
int v14; // r15d
int v15; // eax
unsigned int v16; // r15d
int v17; // r11d
int v18; // r8d
signed __int8 v19; // al
int v20; // ecx
bool v21; // dl
char *v22; // rax
unsigned __int8 *v23; // rcx
int v24; // edx
unsigned __int8 *v25; // rcx
char *v26; // rax
char *v27; // r13
unsigned __int8 v28; // al
char *v31; // rdx
_BYTE *v32; // rdx
char v33; // r13
long long v34; // r10
int v35; // eax
long long v36; // [rsp+10h] [rbp-40h]
_BYTE *v37; // [rsp+18h] [rbp-38h]
int v39; // [rsp+20h] [rbp-30h]
v11 = a3;
v13 = a9;
if ( my_string_stack_guard )
{
v14 = a6;
v15 = my_string_stack_guard(a9);
v13 = a9;
v11 = a3;
a6 = v14;
v16 = 1;
if ( v15 )
return v16;
}
v17 = a8;
v18 = a7;
v16 = -1;
do
{
if ( a4 == a5 )
return a2 != v11;
v19 = *a4;
v20 = *a4;
v21 = v20 == a7;
if ( v20 != a7 && v20 != a8 )
{
do
{
v16 = 1;
if ( a2 == v11 )
return v16;
v26 = a4 + 1;
if ( a4 + 1 == a5 )
v26 = a4;
if ( v20 == a6 )
a4 = v26;
if ( *(_BYTE *)(*(_QWORD *)(a1 + 88) + (unsigned __int8)*a4) != *(_BYTE *)(*(_QWORD *)(a1 + 88) + *a2) )
return v16;
++a2;
if ( ++a4 == a5 )
return a2 != v11;
v19 = *a4;
v20 = *a4;
v21 = v20 == a7;
}
while ( v20 != a8 && v20 != a7 );
}
if ( v21 )
{
v22 = a4 + 1;
do
{
if ( a2 == v11 )
return v16;
v23 = a2;
a4 = v22;
if ( v22 >= a5 )
break;
++a2;
v24 = *v22++;
}
while ( v24 == a7 );
v25 = v23 + 1;
if ( a4 == a5 )
{
a2 = v25;
return a2 != v11;
}
v19 = *a4;
a2 = v25;
}
}
while ( v19 != a8 );
v16 = 0;
if ( a4 + 1 == a5 )
return v16;
v27 = a4 + 2;
while ( 1 )
{
v28 = *(v27 - 1);
if ( (char)v28 == a8 )
goto LABEL_31;
if ( (char)v28 != a7 )
break;
if ( a2 == v11 )
return (unsigned int)-1;
++a2;
LABEL_31:
if ( v27++ == a5 )
return v16;
}
v16 = -1;
if ( a2 != v11 )
{
v31 = v27 - 1;
if ( v28 == a6 && v27 != a5 )
{
v28 = *v27;
v31 = v27;
}
v32 = v31 + 1;
v33 = *(_BYTE *)(*(_QWORD *)(a1 + 88) + v28);
v34 = v13 + 1;
while ( a2 != v11 )
{
while ( *(_BYTE *)(*(_QWORD *)(a1 + 88) + *a2) != v33 )
{
if ( ++a2 == v11 )
return v16;
}
++a2;
v37 = v32;
v39 = a6;
v36 = v34;
v35 = my_wildcmp_8bit_impl(a1, (_DWORD)a2, (_DWORD)v11, (_DWORD)v32, (_DWORD)a5, a6, v18, v17, v34);
if ( v35 <= 0 )
return (unsigned int)v35;
a6 = v39;
v34 = v36;
v17 = a8;
v18 = a7;
v32 = v37;
if ( a2 == v11 )
return v16;
}
}
return v16;
}
|
my_wildcmp_8bit_impl:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x28
MOV R12,R8
MOV R13,RCX
MOV RBX,RDX
MOV R14,RSI
MOV R10D,dword ptr [RBP + 0x20]
LEA RAX,[0x4f1858]
MOV RAX,qword ptr [RAX]
TEST RAX,RAX
JZ 0x00195252
MOV qword ptr [RBP + -0x30],RBX
MOV RBX,RDI
MOV EDI,R10D
MOV R15D,R9D
CALL RAX
MOV R10D,dword ptr [RBP + 0x20]
MOV RDI,RBX
MOV RBX,qword ptr [RBP + -0x30]
MOV R9D,R15D
MOV R15D,0x1
TEST EAX,EAX
JNZ 0x00195378
LAB_00195252:
MOV R11D,dword ptr [RBP + 0x18]
MOV R8D,dword ptr [RBP + 0x10]
MOV R15D,0xffffffff
LAB_00195260:
CMP R13,R12
JZ 0x0019536e
MOV AL,byte ptr [R13]
MOVSX ECX,AL
CMP ECX,R11D
SETZ SIL
CMP ECX,R8D
SETZ DL
OR SIL,DL
JZ 0x001952cf
LAB_00195282:
TEST DL,DL
JZ 0x001952c5
INC R13
MOV RAX,R13
LAB_0019528c:
CMP R14,RBX
JZ 0x00195378
MOV RCX,R14
MOV R13,RAX
CMP RAX,R12
JNC 0x001952b2
LEA R14,[RCX + 0x1]
MOVSX EDX,byte ptr [R13]
LEA RAX,[R13 + 0x1]
CMP EDX,R8D
JZ 0x0019528c
LAB_001952b2:
INC RCX
CMP R13,R12
JZ 0x0019536b
MOV AL,byte ptr [R13]
MOV R14,RCX
LAB_001952c5:
MOVSX EAX,AL
CMP EAX,R11D
JNZ 0x00195260
JMP 0x00195330
LAB_001952cf:
MOV R15D,0x1
CMP R14,RBX
JZ 0x00195378
LEA RAX,[R13 + 0x1]
CMP RAX,R12
CMOVZ RAX,R13
CMP ECX,R9D
CMOVZ R13,RAX
MOV RAX,qword ptr [RDI + 0x58]
MOVZX ECX,byte ptr [R13]
MOV CL,byte ptr [RAX + RCX*0x1]
MOVZX EDX,byte ptr [R14]
CMP CL,byte ptr [RAX + RDX*0x1]
JNZ 0x00195378
INC R14
INC R13
CMP R13,R12
JZ 0x0019536e
MOV AL,byte ptr [R13]
MOVSX ECX,AL
CMP ECX,R8D
SETZ DL
CMP ECX,R11D
JZ 0x00195282
CMP ECX,R8D
JNZ 0x001952cf
JMP 0x00195282
LAB_00195330:
LEA RAX,[R13 + 0x1]
XOR R15D,R15D
CMP RAX,R12
JZ 0x00195378
ADD R13,0x2
LAB_00195340:
MOV AL,byte ptr [R13 + -0x1]
MOVSX ECX,AL
CMP ECX,R11D
JZ 0x0019535d
CMP ECX,R8D
JNZ 0x0019538a
CMP R14,RBX
JZ 0x00195435
INC R14
LAB_0019535d:
LEA RAX,[R13 + 0x1]
CMP R13,R12
MOV R13,RAX
JNZ 0x00195340
JMP 0x00195378
LAB_0019536b:
MOV R14,RCX
LAB_0019536e:
XOR R15D,R15D
CMP R14,RBX
SETNZ R15B
LAB_00195378:
MOV EAX,R15D
ADD RSP,0x28
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_0019538a:
MOV R15D,0xffffffff
CMP R14,RBX
JZ 0x00195378
MOVZX ECX,AL
LEA RDX,[R13 + -0x1]
CMP ECX,R9D
JNZ 0x001953ad
CMP R13,R12
JZ 0x001953ad
MOV AL,byte ptr [R13]
MOV RDX,R13
LAB_001953ad:
INC RDX
MOV RCX,qword ptr [RDI + 0x58]
MOVZX EAX,AL
MOV R13B,byte ptr [RCX + RAX*0x1]
INC R10D
LAB_001953be:
CMP R14,RBX
JZ 0x00195378
MOV RAX,qword ptr [RDI + 0x58]
LAB_001953c7:
MOVZX ECX,byte ptr [R14]
CMP byte ptr [RAX + RCX*0x1],R13B
JZ 0x001953db
INC R14
CMP R14,RBX
JNZ 0x001953c7
JMP 0x00195378
LAB_001953db:
INC R14
SUB RSP,0x8
MOV qword ptr [RBP + -0x48],RDI
MOV RSI,R14
MOV RCX,RDX
MOV RDX,RBX
MOV qword ptr [RBP + -0x38],RCX
MOV RAX,R8
MOV R8,R12
MOV dword ptr [RBP + -0x30],R9D
MOV qword ptr [RBP + -0x40],R10
PUSH R10
PUSH R11
PUSH RAX
CALL 0x001951f7
ADD RSP,0x20
TEST EAX,EAX
JLE 0x00195440
CMP R14,RBX
MOV R9D,dword ptr [RBP + -0x30]
MOV RDI,qword ptr [RBP + -0x48]
MOV R10,qword ptr [RBP + -0x40]
MOV R11D,dword ptr [RBP + 0x18]
MOV R8D,dword ptr [RBP + 0x10]
MOV RDX,qword ptr [RBP + -0x38]
JNZ 0x001953be
JMP 0x00195378
LAB_00195435:
MOV R15D,0xffffffff
JMP 0x00195378
LAB_00195440:
MOV R15D,EAX
JMP 0x00195378
|
uint my_wildcmp_8bit_impl
(long param_1,byte *param_2,byte *param_3,byte *param_4,byte *param_5,ulong param_6,
uint param_7,uint param_8,int param_9)
{
char cVar1;
byte bVar2;
int iVar3;
uint uVar4;
byte *pbVar5;
uint uVar6;
byte *pbVar7;
bool bVar8;
if (my_string_stack_guard != (code *)0x0) {
param_6 = param_6 & 0xffffffff;
iVar3 = (*my_string_stack_guard)(param_9);
if (iVar3 != 0) {
return 1;
}
}
uVar4 = 0xffffffff;
while (param_4 != param_5) {
bVar2 = *param_4;
uVar6 = (uint)(char)bVar2;
bVar8 = uVar6 == param_7;
if (uVar6 != param_8 && !bVar8) {
do {
uVar4 = 1;
if (param_2 == param_3) {
return 1;
}
pbVar5 = param_4 + 1;
if (param_4 + 1 == param_5) {
pbVar5 = param_4;
}
if (uVar6 == (uint)param_6) {
param_4 = pbVar5;
}
if (*(char *)(*(long *)(param_1 + 0x58) + (ulong)*param_4) !=
*(char *)(*(long *)(param_1 + 0x58) + (ulong)*param_2)) {
return 1;
}
param_2 = param_2 + 1;
param_4 = param_4 + 1;
if (param_4 == param_5) goto LAB_0019536e;
bVar2 = *param_4;
uVar6 = (uint)(char)bVar2;
bVar8 = uVar6 == param_7;
} while ((uVar6 != param_8) && (uVar6 != param_7));
}
if (bVar8) {
do {
pbVar5 = param_2;
param_4 = param_4 + 1;
if (pbVar5 == param_3) {
return uVar4;
}
} while ((param_4 < param_5) && (param_2 = pbVar5 + 1, (int)(char)*param_4 == param_7));
param_2 = pbVar5 + 1;
if (param_4 == param_5) break;
bVar2 = *param_4;
}
if ((int)(char)bVar2 == param_8) {
if (param_4 + 1 != param_5) {
pbVar5 = param_4 + 2;
do {
bVar2 = pbVar5[-1];
if ((int)(char)bVar2 != param_8) {
if ((int)(char)bVar2 != param_7) {
if (param_2 == param_3) {
return 0xffffffff;
}
pbVar7 = pbVar5 + -1;
if (((uint)bVar2 == (uint)param_6) && (pbVar5 != param_5)) {
bVar2 = *pbVar5;
pbVar7 = pbVar5;
}
cVar1 = *(char *)(*(long *)(param_1 + 0x58) + (ulong)bVar2);
while( true ) {
if (param_2 == param_3) {
return 0xffffffff;
}
while (*(char *)(*(long *)(param_1 + 0x58) + (ulong)*param_2) != cVar1) {
param_2 = param_2 + 1;
if (param_2 == param_3) {
return 0xffffffff;
}
}
param_2 = param_2 + 1;
uVar4 = my_wildcmp_8bit_impl
(param_1,param_2,param_3,pbVar7 + 1,param_5,param_6,param_7,
param_8,param_9 + 1);
if ((int)uVar4 < 1) break;
param_6 = param_6 & 0xffffffff;
if (param_2 == param_3) {
return 0xffffffff;
}
}
return uVar4;
}
if (param_2 == param_3) {
return 0xffffffff;
}
param_2 = param_2 + 1;
}
bVar8 = pbVar5 != param_5;
pbVar5 = pbVar5 + 1;
} while (bVar8);
}
return 0;
}
}
LAB_0019536e:
return (uint)(param_2 != param_3);
}
|
|
8,969 |
minja::strip(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
|
monkey531[P]llama/common/minja.hpp
|
static std::string strip(const std::string & s) {
auto start = s.find_first_not_of(" \t\n\r");
if (start == std::string::npos) return "";
auto end = s.find_last_not_of(" \t\n\r");
return s.substr(start, end - start + 1);
}
|
O0
|
cpp
|
minja::strip(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&):
subq $0x58, %rsp
movq %rdi, 0x10(%rsp)
movq %rdi, %rax
movq %rax, 0x18(%rsp)
movq %rdi, 0x50(%rsp)
movq %rsi, 0x48(%rsp)
movq 0x48(%rsp), %rdi
leaq 0x12a6c3(%rip), %rsi # 0x1e963a
xorl %eax, %eax
movl %eax, %edx
callq 0x56de0
movq %rax, 0x40(%rsp)
cmpq $-0x1, 0x40(%rsp)
jne 0xbefda
leaq 0x3f(%rsp), %rdi
movq %rdi, 0x8(%rsp)
callq 0x56f00
movq 0x10(%rsp), %rdi
movq 0x8(%rsp), %rdx
leaq 0x12779c(%rip), %rsi # 0x1e6749
callq 0x66600
jmp 0xbefb4
leaq 0x3f(%rsp), %rdi
callq 0x572b0
jmp 0xbf019
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x30(%rsp)
movl %eax, 0x2c(%rsp)
leaq 0x3f(%rsp), %rdi
callq 0x572b0
jmp 0xbf023
movq 0x48(%rsp), %rdi
leaq 0x12a654(%rip), %rsi # 0x1e963a
movq $-0x1, %rdx
callq 0x56d70
movq 0x10(%rsp), %rdi
movq %rax, 0x20(%rsp)
movq 0x48(%rsp), %rsi
movq 0x40(%rsp), %rdx
movq 0x20(%rsp), %rcx
subq 0x40(%rsp), %rcx
addq $0x1, %rcx
callq 0x56f60
movq 0x18(%rsp), %rax
addq $0x58, %rsp
retq
movq 0x30(%rsp), %rdi
callq 0x56a10
nopl (%rax)
|
_ZN5minjaL5stripERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE:
sub rsp, 58h
mov [rsp+58h+var_48], rdi
mov rax, rdi
mov [rsp+58h+var_40], rax
mov [rsp+58h+var_8], rdi
mov [rsp+58h+var_10], rsi
mov rdi, [rsp+58h+var_10]
lea rsi, asc_1E963A; " \t\n\r"
xor eax, eax
mov edx, eax
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE17find_first_not_ofEPKcm; std::string::find_first_not_of(char const*,ulong)
mov [rsp+58h+var_18], rax
cmp [rsp+58h+var_18], 0FFFFFFFFFFFFFFFFh
jnz short loc_BEFDA
lea rdi, [rsp+58h+var_19]
mov [rsp+58h+var_50], rdi
call __ZNSaIcEC1Ev; std::allocator<char>::allocator(void)
mov rdi, [rsp+58h+var_48]
mov rdx, [rsp+58h+var_50]
lea rsi, aEndIndexOutOfB+19h; ""
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&)
jmp short $+2
loc_BEFB4:
lea rdi, [rsp+58h+var_19]
call __ZNSaIcED1Ev; std::allocator<char>::~allocator()
jmp short loc_BF019
mov rcx, rax
mov eax, edx
mov [rsp+arg_28], rcx
mov [rsp+arg_24], eax
lea rdi, [rsp+arg_37]
call __ZNSaIcED1Ev; std::allocator<char>::~allocator()
jmp short loc_BF023
loc_BEFDA:
mov rdi, [rsp+58h+var_10]
lea rsi, asc_1E963A; " \t\n\r"
mov rdx, 0FFFFFFFFFFFFFFFFh
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE16find_last_not_ofEPKcm; std::string::find_last_not_of(char const*,ulong)
mov rdi, [rsp+58h+var_48]
mov [rsp+58h+var_38], rax
mov rsi, [rsp+58h+var_10]
mov rdx, [rsp+58h+var_18]
mov rcx, [rsp+58h+var_38]
sub rcx, [rsp+58h+var_18]
add rcx, 1
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6substrEmm; std::string::substr(ulong,ulong)
loc_BF019:
mov rax, [rsp+58h+var_40]
add rsp, 58h
retn
loc_BF023:
mov rdi, [rsp+arg_28]
call __Unwind_Resume
|
long long minja::strip(long long a1, long long a2)
{
long long last_not_of; // [rsp+20h] [rbp-38h]
char v4; // [rsp+3Fh] [rbp-19h] BYREF
long long first_not_of; // [rsp+40h] [rbp-18h]
long long v6; // [rsp+48h] [rbp-10h]
long long v7; // [rsp+50h] [rbp-8h]
v7 = a1;
v6 = a2;
first_not_of = std::string::find_first_not_of(a2, " \t\n\r", 0LL);
if ( first_not_of == -1 )
{
std::allocator<char>::allocator();
std::string::basic_string<std::allocator<char>>(a1, (long long)"", (long long)&v4);
std::allocator<char>::~allocator(&v4);
}
else
{
last_not_of = std::string::find_last_not_of(v6, " \t\n\r", -1LL);
std::string::substr(a1, v6, first_not_of, last_not_of - first_not_of + 1);
}
return a1;
}
|
strip:
SUB RSP,0x58
MOV qword ptr [RSP + 0x10],RDI
MOV RAX,RDI
MOV qword ptr [RSP + 0x18],RAX
MOV qword ptr [RSP + 0x50],RDI
MOV qword ptr [RSP + 0x48],RSI
MOV RDI,qword ptr [RSP + 0x48]
LEA RSI,[0x2e963a]
XOR EAX,EAX
MOV EDX,EAX
CALL 0x00156de0
MOV qword ptr [RSP + 0x40],RAX
CMP qword ptr [RSP + 0x40],-0x1
JNZ 0x001befda
LEA RDI,[RSP + 0x3f]
MOV qword ptr [RSP + 0x8],RDI
CALL 0x00156f00
MOV RDI,qword ptr [RSP + 0x10]
MOV RDX,qword ptr [RSP + 0x8]
LAB_001befa6:
LEA RSI,[0x2e6749]
CALL 0x00166600
LAB_001befb2:
JMP 0x001befb4
LAB_001befb4:
LEA RDI,[RSP + 0x3f]
CALL 0x001572b0
JMP 0x001bf019
LAB_001befda:
MOV RDI,qword ptr [RSP + 0x48]
LEA RSI,[0x2e963a]
MOV RDX,-0x1
CALL 0x00156d70
MOV RDI,qword ptr [RSP + 0x10]
MOV qword ptr [RSP + 0x20],RAX
MOV RSI,qword ptr [RSP + 0x48]
MOV RDX,qword ptr [RSP + 0x40]
MOV RCX,qword ptr [RSP + 0x20]
SUB RCX,qword ptr [RSP + 0x40]
ADD RCX,0x1
CALL 0x00156f60
LAB_001bf019:
MOV RAX,qword ptr [RSP + 0x18]
ADD RSP,0x58
RET
|
/* minja::strip(std::__cxx11::string const&) */
minja * __thiscall minja::strip(minja *this,string *param_1)
{
allocator local_19;
long local_18;
string *local_10;
minja *local_8;
local_10 = param_1;
local_8 = this;
local_18 = std::__cxx11::string::find_first_not_of((char *)param_1,0x2e963a);
if (local_18 == -1) {
std::allocator<char>::allocator();
/* try { // try from 001befa6 to 001befb1 has its CatchHandler @ 001befc0 */
std::__cxx11::string::string<std::allocator<char>>((string *)this,"",&local_19);
std::allocator<char>::~allocator((allocator<char> *)&local_19);
}
else {
std::__cxx11::string::find_last_not_of((char *)local_10,0x2e963a);
std::__cxx11::string::substr((ulong)this,(ulong)local_10);
}
return this;
}
|
|
8,970 |
vec_is_equal
|
corpus-core[P]colibri-stateless/build_O2/_deps/blst-src/src/vect.h
|
static inline bool_t vec_is_equal(const void *a, const void *b, size_t num)
{
const limb_t *ap = (const limb_t *)a;
const limb_t *bp = (const limb_t *)b;
limb_t acc;
size_t i;
#ifndef __BLST_NO_ASM__
bool_t vec_is_equal_16x(const void *a, const void *b, size_t num);
if ((num & 15) == 0)
return vec_is_equal_16x(a, b, num);
#endif
num /= sizeof(limb_t);
for (acc = 0, i = 0; i < num; i++)
acc |= ap[i] ^ bp[i];
return is_zero(acc);
}
|
O2
|
c
|
vec_is_equal:
pushq %rbp
movq %rsp, %rbp
testb $0xf, %dl
je 0x52f6c
shrq $0x3, %rdx
xorl %eax, %eax
xorl %ecx, %ecx
cmpq %rcx, %rdx
je 0x52f5a
movq (%rsi,%rcx,8), %r8
xorq (%rdi,%rcx,8), %r8
orq %r8, %rax
incq %rcx
jmp 0x52f45
movq %rax, %rcx
notq %rcx
decq %rax
andq %rcx, %rax
shrq $0x3f, %rax
popq %rbp
retq
popq %rbp
jmp 0x64c00
|
vec_is_equal:
push rbp
mov rbp, rsp
test dl, 0Fh
jz short loc_52F6C
shr rdx, 3
xor eax, eax
xor ecx, ecx
loc_52F45:
cmp rdx, rcx
jz short loc_52F5A
mov r8, [rsi+rcx*8]
xor r8, [rdi+rcx*8]
or rax, r8
inc rcx
jmp short loc_52F45
loc_52F5A:
mov rcx, rax
not rcx
dec rax
and rax, rcx
shr rax, 3Fh
pop rbp
retn
loc_52F6C:
pop rbp
jmp vec_is_equal_16x
|
unsigned long long vec_is_equal(long long a1, long long a2, unsigned long long a3)
{
unsigned long long v3; // rdx
long long v4; // rax
long long i; // rcx
if ( (a3 & 0xF) == 0 )
return vec_is_equal_16x();
v3 = a3 >> 3;
v4 = 0LL;
for ( i = 0LL; v3 != i; ++i )
v4 |= *(_QWORD *)(a1 + 8 * i) ^ *(_QWORD *)(a2 + 8 * i);
return (~v4 & (unsigned long long)(v4 - 1)) >> 63;
}
|
vec_is_equal:
PUSH RBP
MOV RBP,RSP
TEST DL,0xf
JZ 0x00152f6c
SHR RDX,0x3
XOR EAX,EAX
XOR ECX,ECX
LAB_00152f45:
CMP RDX,RCX
JZ 0x00152f5a
MOV R8,qword ptr [RSI + RCX*0x8]
XOR R8,qword ptr [RDI + RCX*0x8]
OR RAX,R8
INC RCX
JMP 0x00152f45
LAB_00152f5a:
MOV RCX,RAX
NOT RCX
DEC RAX
AND RAX,RCX
SHR RAX,0x3f
POP RBP
RET
LAB_00152f6c:
POP RBP
JMP 0x00164c00
|
ulong vec_is_equal(long param_1,long param_2,ulong param_3)
{
ulong uVar1;
ulong uVar2;
if ((param_3 & 0xf) != 0) {
uVar1 = 0;
for (uVar2 = 0; param_3 >> 3 != uVar2; uVar2 = uVar2 + 1) {
uVar1 = uVar1 | *(ulong *)(param_2 + uVar2 * 8) ^ *(ulong *)(param_1 + uVar2 * 8);
}
return (uVar1 - 1 & ~uVar1) >> 0x3f;
}
uVar1 = vec_is_equal_16x();
return uVar1;
}
|
|
8,971 |
my_xml_parse
|
eloqsql/strings/xml.c
|
int my_xml_parse(MY_XML_PARSER *p,const char *str, size_t len)
{
my_xml_attr_rewind(p);
p->beg=str;
p->cur=str;
p->end=str+len;
while ( p->cur < p->end )
{
MY_XML_ATTR a;
if (p->cur[0] == '<')
{
int lex;
int question=0;
int exclam=0;
lex=my_xml_scan(p,&a);
if (MY_XML_COMMENT == lex)
continue;
if (lex == MY_XML_CDATA)
{
a.beg+= 9;
a.end-= 3;
my_xml_value(p, a.beg, (size_t) (a.end-a.beg));
continue;
}
lex=my_xml_scan(p,&a);
if (MY_XML_SLASH == lex)
{
if (MY_XML_IDENT != (lex=my_xml_scan(p,&a)))
{
sprintf(p->errstr,"%s unexpected (ident wanted)",lex2str(lex));
return MY_XML_ERROR;
}
if (MY_XML_OK != my_xml_leave(p,a.beg,(size_t) (a.end-a.beg)))
return MY_XML_ERROR;
lex=my_xml_scan(p,&a);
goto gt;
}
if (MY_XML_EXCLAM == lex)
{
lex=my_xml_scan(p,&a);
exclam=1;
}
else if (MY_XML_QUESTION == lex)
{
lex=my_xml_scan(p,&a);
question=1;
}
if (MY_XML_IDENT == lex)
{
p->current_node_type= MY_XML_NODE_TAG;
if (MY_XML_OK != my_xml_enter(p,a.beg,(size_t) (a.end-a.beg)))
return MY_XML_ERROR;
}
else
{
sprintf(p->errstr,"%s unexpected (ident or '/' wanted)",
lex2str(lex));
return MY_XML_ERROR;
}
while ((MY_XML_IDENT == (lex=my_xml_scan(p,&a))) ||
((MY_XML_STRING == lex && exclam)))
{
MY_XML_ATTR b;
if (MY_XML_EQ == (lex=my_xml_scan(p,&b)))
{
lex=my_xml_scan(p,&b);
if ( (lex == MY_XML_IDENT) || (lex == MY_XML_STRING) )
{
p->current_node_type= MY_XML_NODE_ATTR;
if ((MY_XML_OK != my_xml_enter(p,a.beg,(size_t) (a.end-a.beg))) ||
(MY_XML_OK != my_xml_value(p,b.beg,(size_t) (b.end-b.beg))) ||
(MY_XML_OK != my_xml_leave(p,a.beg,(size_t) (a.end-a.beg))))
return MY_XML_ERROR;
}
else
{
sprintf(p->errstr,"%s unexpected (ident or string wanted)",
lex2str(lex));
return MY_XML_ERROR;
}
}
else if (MY_XML_IDENT == lex)
{
p->current_node_type= MY_XML_NODE_ATTR;
if ((MY_XML_OK != my_xml_enter(p,a.beg,(size_t) (a.end-a.beg))) ||
(MY_XML_OK != my_xml_leave(p,a.beg,(size_t) (a.end-a.beg))))
return MY_XML_ERROR;
}
else if ((MY_XML_STRING == lex) && exclam)
{
/*
We are in <!DOCTYPE>, e.g.
<!DOCTYPE name SYSTEM "SystemLiteral">
<!DOCTYPE name PUBLIC "PublidLiteral" "SystemLiteral">
Just skip "SystemLiteral" and "PublicidLiteral"
*/
}
else
break;
}
if (lex == MY_XML_SLASH)
{
if (MY_XML_OK != my_xml_leave(p,NULL,0))
return MY_XML_ERROR;
lex=my_xml_scan(p,&a);
}
gt:
if (question)
{
if (lex != MY_XML_QUESTION)
{
sprintf(p->errstr,"%s unexpected ('?' wanted)",lex2str(lex));
return MY_XML_ERROR;
}
if (MY_XML_OK != my_xml_leave(p,NULL,0))
return MY_XML_ERROR;
lex=my_xml_scan(p,&a);
}
if (exclam)
{
if (MY_XML_OK != my_xml_leave(p,NULL,0))
return MY_XML_ERROR;
}
if (lex != MY_XML_GT)
{
sprintf(p->errstr,"%s unexpected ('>' wanted)",lex2str(lex));
return MY_XML_ERROR;
}
}
else
{
a.beg=p->cur;
for ( ; (p->cur < p->end) && (p->cur[0] != '<') ; p->cur++);
a.end=p->cur;
if (!(p->flags & MY_XML_FLAG_SKIP_TEXT_NORMALIZATION))
my_xml_norm_text(&a);
if (a.beg != a.end)
{
my_xml_value(p,a.beg,(size_t) (a.end-a.beg));
}
}
}
if (p->attr.start[0])
{
sprintf(p->errstr,"unexpected END-OF-INPUT");
return MY_XML_ERROR;
}
return MY_XML_OK;
}
|
O3
|
c
|
my_xml_parse:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rdi, %rbx
movq 0x118(%rdi), %rcx
movq %rcx, 0x120(%rdi)
movq %rsi, 0x128(%rdi)
movq %rsi, 0x130(%rdi)
leaq (%rsi,%rdx), %rax
movq %rax, 0x138(%rdi)
testq %rdx, %rdx
jle 0xd7265
leaq -0x40(%rbp), %r15
cmpb $0x3c, (%rsi)
jne 0xd6fa7
movq %rbx, %rdi
movq %r15, %rsi
callq 0xd732f
cmpl $0x43, %eax
je 0xd7247
cmpl $0x44, %eax
jne 0xd700c
movq 0x150(%rbx), %rax
testq %rax, %rax
je 0xd7247
movq -0x40(%rbp), %rsi
movq -0x38(%rbp), %rdx
addq $0x9, %rsi
subq %rsi, %rdx
addq $-0x3, %rdx
jmp 0xd7002
movq %rsi, -0x40(%rbp)
movq %rsi, %rdx
cmpq %rax, %rsi
jae 0xd6fcd
subq %rsi, %rax
movq %rsi, %rdx
cmpb $0x3c, (%rdx)
je 0xd6fcd
incq %rdx
movq %rdx, 0x130(%rbx)
decq %rax
jne 0xd6fb9
movq %rdx, -0x38(%rbp)
testb $0x2, (%rbx)
jne 0xd6fe6
movq %r15, %rdi
callq 0xd7967
movq -0x40(%rbp), %rsi
movq -0x38(%rbp), %rdx
cmpq %rdx, %rsi
je 0xd7247
movq 0x150(%rbx), %rax
testq %rax, %rax
je 0xd7247
subq %rsi, %rdx
movq %rbx, %rdi
callq *%rax
jmp 0xd7247
movq %rbx, %rdi
movq %r15, %rsi
callq 0xd732f
cmpl $0x2f, %eax
jne 0xd705e
movq %rbx, %rdi
movq %r15, %rsi
callq 0xd732f
cmpl $0x49, %eax
jne 0xd72c5
movq -0x40(%rbp), %rsi
movq -0x38(%rbp), %rdx
subq %rsi, %rdx
movq %rbx, %rdi
callq 0xd762d
testl %eax, %eax
jne 0xd7317
movq %rbx, %rdi
movq %r15, %rsi
callq 0xd732f
movl %eax, %r13d
jmp 0xd7241
movl %eax, %r14d
cmpl $0x21, %eax
sete %r12b
cmpl $0x3f, %eax
je 0xd7073
cmpl $0x21, %r14d
jne 0xd7080
movq %rbx, %rdi
movq %r15, %rsi
callq 0xd732f
jmp 0xd7086
movb $0x1, %r12b
movl %r14d, %eax
cmpl $0x49, %eax
jne 0xd72b1
movl $0x0, 0x4(%rbx)
movq -0x40(%rbp), %rsi
movq -0x38(%rbp), %rdx
subq %rsi, %rdx
movq %rbx, %rdi
callq 0xd77f0
testl %eax, %eax
jne 0xd7317
movb %r12b, -0x29(%rbp)
movl %r14d, %r12d
xorl $0x21, %r12d
movq %rbx, %rdi
movq %r15, %rsi
callq 0xd732f
movl %eax, %r13d
xorl $0x53, %eax
orl %r12d, %eax
sete %al
cmpl $0x49, %r13d
je 0xd70e1
testb %al, %al
je 0xd71ca
movq %rbx, %rdi
leaq -0x50(%rbp), %rsi
callq 0xd732f
cmpl $0x49, %eax
je 0xd716f
movl %eax, %r13d
cmpl $0x3d, %eax
jne 0xd71ae
movq %rbx, %rdi
leaq -0x50(%rbp), %rsi
callq 0xd732f
cmpl $0x53, %eax
je 0xd7118
cmpl $0x49, %eax
jne 0xd72d9
movl $0x1, 0x4(%rbx)
movq -0x40(%rbp), %r13
movq -0x38(%rbp), %r15
subq %r13, %r15
movq %rbx, %rdi
movq %r13, %rsi
movq %r15, %rdx
callq 0xd77f0
testl %eax, %eax
jne 0xd7317
movq 0x150(%rbx), %rax
testq %rax, %rax
je 0xd7164
movq -0x50(%rbp), %rsi
movq -0x48(%rbp), %rdx
subq %rsi, %rdx
movq %rbx, %rdi
callq *%rax
testl %eax, %eax
jne 0xd7317
movq %rbx, %rdi
movq %r13, %rsi
movq %r15, %rdx
jmp 0xd71a0
movl $0x1, 0x4(%rbx)
movq -0x40(%rbp), %r15
movq -0x38(%rbp), %r13
subq %r15, %r13
movq %rbx, %rdi
movq %r15, %rsi
movq %r13, %rdx
callq 0xd77f0
testl %eax, %eax
jne 0xd7317
movq %rbx, %rdi
movq %r15, %rsi
movq %r13, %rdx
callq 0xd762d
testl %eax, %eax
je 0xd71ba
jmp 0xd7317
cmpl $0x21, %r14d
jne 0xd71c6
cmpl $0x53, %r13d
jne 0xd71c6
movq %rbx, %rdi
leaq -0x40(%rbp), %r15
jmp 0xd70bf
leaq -0x40(%rbp), %r15
cmpl $0x2f, %r13d
movb -0x29(%rbp), %r12b
jne 0xd71f6
movq %rbx, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0xd762d
testl %eax, %eax
jne 0xd7317
movq %rbx, %rdi
movq %r15, %rsi
callq 0xd732f
movl %eax, %r13d
testb %r12b, %r12b
jne 0xd7227
cmpl $0x3f, %r13d
jne 0xd72ed
movq %rbx, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0xd762d
testl %eax, %eax
jne 0xd7317
movq %rbx, %rdi
movq %r15, %rsi
callq 0xd732f
movl %eax, %r13d
cmpl $0x21, %r14d
jne 0xd7241
movq %rbx, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0xd762d
testl %eax, %eax
jne 0xd7317
cmpl $0x3e, %r13d
jne 0xd729c
movq 0x130(%rbx), %rsi
movq 0x138(%rbx), %rax
cmpq %rax, %rsi
jb 0xd6f60
movq 0x118(%rbx), %rcx
cmpb $0x0, (%rcx)
je 0xd7294
addq $0x8, %rbx
leaq 0x969a(%rip), %rcx # 0xe090f
movl $0x1, %r14d
movl $0x80, %edx
movq %rbx, %rdi
movl $0x1, %esi
xorl %eax, %eax
callq 0x29970
jmp 0xd731d
xorl %r14d, %r14d
jmp 0xd731d
addq $0x8, %rbx
movl %r13d, %edi
callq 0xd7592
leaq 0x9645(%rip), %rcx # 0xe08f4
jmp 0xd7300
addq $0x8, %rbx
movl %eax, %edi
callq 0xd7592
leaq 0x95cb(%rip), %rcx # 0xe088e
jmp 0xd7300
addq $0x8, %rbx
movl %eax, %edi
callq 0xd7592
leaq 0x959a(%rip), %rcx # 0xe0871
jmp 0xd7300
addq $0x8, %rbx
movl %eax, %edi
callq 0xd7592
leaq 0x95c7(%rip), %rcx # 0xe08b2
jmp 0xd7300
addq $0x8, %rbx
movl %r13d, %edi
callq 0xd7592
leaq 0x95d9(%rip), %rcx # 0xe08d9
movl $0x80, %edx
movq %rbx, %rdi
movl $0x1, %esi
movq %rax, %r8
xorl %eax, %eax
callq 0x29970
movl $0x1, %r14d
movl %r14d, %eax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
|
my_xml_parse:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 28h
mov rbx, rdi
mov rcx, [rdi+118h]
mov [rdi+120h], rcx
mov [rdi+128h], rsi
mov [rdi+130h], rsi
lea rax, [rsi+rdx]
mov [rdi+138h], rax
test rdx, rdx
jle loc_D7265
lea r15, [rbp+var_40]
loc_D6F60:
cmp byte ptr [rsi], 3Ch ; '<'
jnz short loc_D6FA7
mov rdi, rbx
mov rsi, r15
call my_xml_scan
cmp eax, 43h ; 'C'
jz loc_D7247
cmp eax, 44h ; 'D'
jnz loc_D700C
mov rax, [rbx+150h]
test rax, rax
jz loc_D7247
mov rsi, [rbp+var_40]
mov rdx, [rbp+var_38]
add rsi, 9
sub rdx, rsi
add rdx, 0FFFFFFFFFFFFFFFDh
jmp short loc_D7002
loc_D6FA7:
mov [rbp+var_40], rsi
mov rdx, rsi
cmp rsi, rax
jnb short loc_D6FCD
sub rax, rsi
mov rdx, rsi
loc_D6FB9:
cmp byte ptr [rdx], 3Ch ; '<'
jz short loc_D6FCD
inc rdx
mov [rbx+130h], rdx
dec rax
jnz short loc_D6FB9
loc_D6FCD:
mov [rbp+var_38], rdx
test byte ptr [rbx], 2
jnz short loc_D6FE6
mov rdi, r15
call my_xml_norm_text
mov rsi, [rbp+var_40]
mov rdx, [rbp+var_38]
loc_D6FE6:
cmp rsi, rdx
jz loc_D7247
mov rax, [rbx+150h]
test rax, rax
jz loc_D7247
sub rdx, rsi
loc_D7002:
mov rdi, rbx
call rax
jmp loc_D7247
loc_D700C:
mov rdi, rbx
mov rsi, r15
call my_xml_scan
cmp eax, 2Fh ; '/'
jnz short loc_D705E
mov rdi, rbx
mov rsi, r15
call my_xml_scan
cmp eax, 49h ; 'I'
jnz loc_D72C5
mov rsi, [rbp+var_40]
mov rdx, [rbp+var_38]
sub rdx, rsi
mov rdi, rbx
call my_xml_leave
test eax, eax
jnz loc_D7317
mov rdi, rbx
mov rsi, r15
call my_xml_scan
mov r13d, eax
jmp loc_D7241
loc_D705E:
mov r14d, eax
cmp eax, 21h ; '!'
setz r12b
cmp eax, 3Fh ; '?'
jz short loc_D7073
cmp r14d, 21h ; '!'
jnz short loc_D7080
loc_D7073:
mov rdi, rbx
mov rsi, r15
call my_xml_scan
jmp short loc_D7086
loc_D7080:
mov r12b, 1
mov eax, r14d
loc_D7086:
cmp eax, 49h ; 'I'
jnz loc_D72B1
mov dword ptr [rbx+4], 0
mov rsi, [rbp+var_40]
mov rdx, [rbp+var_38]
sub rdx, rsi
mov rdi, rbx
call my_xml_enter
test eax, eax
jnz loc_D7317
mov [rbp+var_29], r12b
mov r12d, r14d
xor r12d, 21h
mov rdi, rbx
loc_D70BF:
mov rsi, r15
call my_xml_scan
mov r13d, eax
xor eax, 53h
or eax, r12d
setz al
cmp r13d, 49h ; 'I'
jz short loc_D70E1
test al, al
jz loc_D71CA
loc_D70E1:
mov rdi, rbx
lea rsi, [rbp+var_50]
call my_xml_scan
cmp eax, 49h ; 'I'
jz short loc_D716F
mov r13d, eax
cmp eax, 3Dh ; '='
jnz loc_D71AE
mov rdi, rbx
lea rsi, [rbp+var_50]
call my_xml_scan
cmp eax, 53h ; 'S'
jz short loc_D7118
cmp eax, 49h ; 'I'
jnz loc_D72D9
loc_D7118:
mov dword ptr [rbx+4], 1
mov r13, [rbp+var_40]
mov r15, [rbp+var_38]
sub r15, r13
mov rdi, rbx
mov rsi, r13
mov rdx, r15
call my_xml_enter
test eax, eax
jnz loc_D7317
mov rax, [rbx+150h]
test rax, rax
jz short loc_D7164
mov rsi, [rbp+var_50]
mov rdx, [rbp+var_48]
sub rdx, rsi
mov rdi, rbx
call rax
test eax, eax
jnz loc_D7317
loc_D7164:
mov rdi, rbx
mov rsi, r13
mov rdx, r15
jmp short loc_D71A0
loc_D716F:
mov dword ptr [rbx+4], 1
mov r15, [rbp+var_40]
mov r13, [rbp+var_38]
sub r13, r15
mov rdi, rbx
mov rsi, r15
mov rdx, r13
call my_xml_enter
test eax, eax
jnz loc_D7317
mov rdi, rbx
mov rsi, r15
mov rdx, r13
loc_D71A0:
call my_xml_leave
test eax, eax
jz short loc_D71BA
jmp loc_D7317
loc_D71AE:
cmp r14d, 21h ; '!'
jnz short loc_D71C6
cmp r13d, 53h ; 'S'
jnz short loc_D71C6
loc_D71BA:
mov rdi, rbx
lea r15, [rbp+var_40]
jmp loc_D70BF
loc_D71C6:
lea r15, [rbp+var_40]
loc_D71CA:
cmp r13d, 2Fh ; '/'
mov r12b, [rbp+var_29]
jnz short loc_D71F6
mov rdi, rbx
xor esi, esi
xor edx, edx
call my_xml_leave
test eax, eax
jnz loc_D7317
mov rdi, rbx
mov rsi, r15
call my_xml_scan
mov r13d, eax
loc_D71F6:
test r12b, r12b
jnz short loc_D7227
cmp r13d, 3Fh ; '?'
jnz loc_D72ED
mov rdi, rbx
xor esi, esi
xor edx, edx
call my_xml_leave
test eax, eax
jnz loc_D7317
mov rdi, rbx
mov rsi, r15
call my_xml_scan
mov r13d, eax
loc_D7227:
cmp r14d, 21h ; '!'
jnz short loc_D7241
mov rdi, rbx
xor esi, esi
xor edx, edx
call my_xml_leave
test eax, eax
jnz loc_D7317
loc_D7241:
cmp r13d, 3Eh ; '>'
jnz short loc_D729C
loc_D7247:
mov rsi, [rbx+130h]
mov rax, [rbx+138h]
cmp rsi, rax
jb loc_D6F60
mov rcx, [rbx+118h]
loc_D7265:
cmp byte ptr [rcx], 0
jz short loc_D7294
add rbx, 8
lea rcx, aUnexpectedEndO; "unexpected END-OF-INPUT"
mov r14d, 1
mov edx, 80h
mov rdi, rbx
mov esi, 1
xor eax, eax
call ___sprintf_chk
jmp loc_D731D
loc_D7294:
xor r14d, r14d
jmp loc_D731D
loc_D729C:
add rbx, 8
mov edi, r13d
call lex2str
lea rcx, aSUnexpectedWan; "%s unexpected ('>' wanted)"
jmp short loc_D7300
loc_D72B1:
add rbx, 8
mov edi, eax
call lex2str
lea rcx, aSUnexpectedIde; "%s unexpected (ident or '/' wanted)"
jmp short loc_D7300
loc_D72C5:
add rbx, 8
mov edi, eax
call lex2str
lea rcx, aSUnexpectedIde_0; "%s unexpected (ident wanted)"
jmp short loc_D7300
loc_D72D9:
add rbx, 8
mov edi, eax
call lex2str
lea rcx, aSUnexpectedIde_1; "%s unexpected (ident or string wanted)"
jmp short loc_D7300
loc_D72ED:
add rbx, 8
mov edi, r13d
call lex2str
lea rcx, aSUnexpectedWan_0; "%s unexpected ('?' wanted)"
loc_D7300:
mov edx, 80h
mov rdi, rbx
mov esi, 1
mov r8, rax
xor eax, eax
call ___sprintf_chk
loc_D7317:
mov r14d, 1
loc_D731D:
mov eax, r14d
add rsp, 28h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
|
long long my_xml_parse(long long a1, _BYTE *a2, long long a3)
{
_BYTE *v4; // rcx
_BYTE *v5; // rax
int v6; // eax
void ( *v7)(long long, _BYTE *, long long); // rax
long long v8; // rdx
_BYTE *v9; // rdx
long long v10; // rax
unsigned int v11; // eax
unsigned int v12; // eax
unsigned int v13; // r13d
unsigned int v14; // r14d
bool v15; // r12
long long i; // rdi
unsigned int v17; // eax
unsigned int v18; // eax
_BYTE *v19; // r13
long long v20; // r15
unsigned int ( *v21)(long long, _QWORD, _QWORD); // rax
long long v22; // rdi
_BYTE *v23; // rsi
long long v24; // rdx
_BYTE *v25; // r15
long long v26; // r13
bool v27; // r12
unsigned int v28; // r14d
long long v29; // rax
long long v30; // rax
long long v31; // rax
long long v32; // rax
long long v33; // rax
_QWORD v35[2]; // [rsp+0h] [rbp-50h] BYREF
_BYTE *v36; // [rsp+10h] [rbp-40h] BYREF
_BYTE *v37; // [rsp+18h] [rbp-38h]
bool v38; // [rsp+27h] [rbp-29h]
v4 = *(_BYTE **)(a1 + 280);
*(_QWORD *)(a1 + 288) = v4;
*(_QWORD *)(a1 + 296) = a2;
*(_QWORD *)(a1 + 304) = a2;
v5 = &a2[a3];
*(_QWORD *)(a1 + 312) = &a2[a3];
if ( a3 <= 0 )
goto LABEL_57;
while ( *a2 != 60 )
{
v36 = a2;
v9 = a2;
if ( a2 < v5 )
{
v10 = v5 - a2;
v9 = a2;
do
{
if ( *v9 == 60 )
break;
*(_QWORD *)(a1 + 304) = ++v9;
--v10;
}
while ( v10 );
}
v37 = v9;
if ( (*(_BYTE *)a1 & 2) == 0 )
{
my_xml_norm_text(&v36);
a2 = v36;
v9 = v37;
}
if ( a2 != v9 )
{
v7 = *(void ( **)(long long, _BYTE *, long long))(a1 + 336);
if ( v7 )
{
v8 = v9 - a2;
LABEL_16:
v7(a1, a2, v8);
}
}
LABEL_55:
a2 = *(_BYTE **)(a1 + 304);
v5 = *(_BYTE **)(a1 + 312);
if ( a2 >= v5 )
{
v4 = *(_BYTE **)(a1 + 280);
LABEL_57:
if ( *v4 )
{
v28 = 1;
__sprintf_chk(a1 + 8, 1LL, 128LL, "unexpected END-OF-INPUT");
}
else
{
return 0;
}
return v28;
}
}
v6 = my_xml_scan(a1, &v36);
if ( v6 == 67 )
goto LABEL_55;
if ( v6 == 68 )
{
v7 = *(void ( **)(long long, _BYTE *, long long))(a1 + 336);
if ( !v7 )
goto LABEL_55;
a2 = v36 + 9;
v8 = v37 - (v36 + 9) - 3;
goto LABEL_16;
}
v11 = my_xml_scan(a1, &v36);
if ( v11 == 47 )
{
v12 = my_xml_scan(a1, &v36);
if ( v12 == 73 )
{
if ( !(unsigned int)my_xml_leave(a1, v36, v37 - v36) )
{
v13 = my_xml_scan(a1, &v36);
goto LABEL_54;
}
}
else
{
v31 = lex2str(v12);
__sprintf_chk(a1 + 8, 1LL, 128LL, "%s unexpected (ident wanted)", v31);
}
return 1;
}
v14 = v11;
v15 = v11 == 33;
if ( v11 == 63 || v11 == 33 )
v11 = my_xml_scan(a1, &v36);
else
v15 = 1;
if ( v11 != 73 )
{
v30 = lex2str(v11);
__sprintf_chk(a1 + 8, 1LL, 128LL, "%s unexpected (ident or '/' wanted)", v30);
return 1;
}
*(_DWORD *)(a1 + 4) = 0;
if ( (unsigned int)my_xml_enter(a1, v36, v37 - v36) )
return 1;
v38 = v15;
for ( i = a1; ; i = a1 )
{
v13 = my_xml_scan(i, &v36);
if ( v13 != 73 )
{
if ( v14 ^ 0x21 | v13 ^ 0x53 )
break;
}
v17 = my_xml_scan(a1, v35);
if ( v17 == 73 )
{
*(_DWORD *)(a1 + 4) = 1;
v25 = v36;
v26 = v37 - v36;
if ( (unsigned int)my_xml_enter(a1, v36, v37 - v36) )
return 1;
v22 = a1;
v23 = v25;
v24 = v26;
LABEL_40:
if ( (unsigned int)my_xml_leave(v22, v23, v24) )
return 1;
continue;
}
v13 = v17;
if ( v17 == 61 )
{
v18 = my_xml_scan(a1, v35);
if ( v18 != 83 && v18 != 73 )
{
v32 = lex2str(v18);
__sprintf_chk(a1 + 8, 1LL, 128LL, "%s unexpected (ident or string wanted)", v32);
return 1;
}
*(_DWORD *)(a1 + 4) = 1;
v19 = v36;
v20 = v37 - v36;
if ( (unsigned int)my_xml_enter(a1, v36, v37 - v36) )
return 1;
v21 = *(unsigned int ( **)(long long, _QWORD, _QWORD))(a1 + 336);
if ( v21 )
{
if ( v21(a1, v35[0], v35[1] - v35[0]) )
return 1;
}
v22 = a1;
v23 = v19;
v24 = v20;
goto LABEL_40;
}
if ( v14 != 33 || v17 != 83 )
break;
}
v27 = v38;
if ( v13 == 47 )
{
if ( (unsigned int)my_xml_leave(a1, 0LL, 0LL) )
return 1;
v13 = my_xml_scan(a1, &v36);
}
if ( v27 )
goto LABEL_52;
if ( v13 == 63 )
{
if ( (unsigned int)my_xml_leave(a1, 0LL, 0LL) )
return 1;
v13 = my_xml_scan(a1, &v36);
LABEL_52:
if ( v14 != 33 || !(unsigned int)my_xml_leave(a1, 0LL, 0LL) )
{
LABEL_54:
if ( v13 == 62 )
goto LABEL_55;
v29 = lex2str(v13);
__sprintf_chk(a1 + 8, 1LL, 128LL, "%s unexpected ('>' wanted)", v29);
}
}
else
{
v33 = lex2str(v13);
__sprintf_chk(a1 + 8, 1LL, 128LL, "%s unexpected ('?' wanted)", v33);
}
return 1;
}
|
my_xml_parse:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x28
MOV RBX,RDI
MOV RCX,qword ptr [RDI + 0x118]
MOV qword ptr [RDI + 0x120],RCX
MOV qword ptr [RDI + 0x128],RSI
MOV qword ptr [RDI + 0x130],RSI
LEA RAX,[RSI + RDX*0x1]
MOV qword ptr [RDI + 0x138],RAX
TEST RDX,RDX
JLE 0x001d7265
LEA R15,[RBP + -0x40]
LAB_001d6f60:
CMP byte ptr [RSI],0x3c
JNZ 0x001d6fa7
MOV RDI,RBX
MOV RSI,R15
CALL 0x001d732f
CMP EAX,0x43
JZ 0x001d7247
CMP EAX,0x44
JNZ 0x001d700c
MOV RAX,qword ptr [RBX + 0x150]
TEST RAX,RAX
JZ 0x001d7247
MOV RSI,qword ptr [RBP + -0x40]
MOV RDX,qword ptr [RBP + -0x38]
ADD RSI,0x9
SUB RDX,RSI
ADD RDX,-0x3
JMP 0x001d7002
LAB_001d6fa7:
MOV qword ptr [RBP + -0x40],RSI
MOV RDX,RSI
CMP RSI,RAX
JNC 0x001d6fcd
SUB RAX,RSI
MOV RDX,RSI
LAB_001d6fb9:
CMP byte ptr [RDX],0x3c
JZ 0x001d6fcd
INC RDX
MOV qword ptr [RBX + 0x130],RDX
DEC RAX
JNZ 0x001d6fb9
LAB_001d6fcd:
MOV qword ptr [RBP + -0x38],RDX
TEST byte ptr [RBX],0x2
JNZ 0x001d6fe6
MOV RDI,R15
CALL 0x001d7967
MOV RSI,qword ptr [RBP + -0x40]
MOV RDX,qword ptr [RBP + -0x38]
LAB_001d6fe6:
CMP RSI,RDX
JZ 0x001d7247
MOV RAX,qword ptr [RBX + 0x150]
TEST RAX,RAX
JZ 0x001d7247
SUB RDX,RSI
LAB_001d7002:
MOV RDI,RBX
CALL RAX
JMP 0x001d7247
LAB_001d700c:
MOV RDI,RBX
MOV RSI,R15
CALL 0x001d732f
CMP EAX,0x2f
JNZ 0x001d705e
MOV RDI,RBX
MOV RSI,R15
CALL 0x001d732f
CMP EAX,0x49
JNZ 0x001d72c5
MOV RSI,qword ptr [RBP + -0x40]
MOV RDX,qword ptr [RBP + -0x38]
SUB RDX,RSI
MOV RDI,RBX
CALL 0x001d762d
TEST EAX,EAX
JNZ 0x001d7317
MOV RDI,RBX
MOV RSI,R15
CALL 0x001d732f
MOV R13D,EAX
JMP 0x001d7241
LAB_001d705e:
MOV R14D,EAX
CMP EAX,0x21
SETZ R12B
CMP EAX,0x3f
JZ 0x001d7073
CMP R14D,0x21
JNZ 0x001d7080
LAB_001d7073:
MOV RDI,RBX
MOV RSI,R15
CALL 0x001d732f
JMP 0x001d7086
LAB_001d7080:
MOV R12B,0x1
MOV EAX,R14D
LAB_001d7086:
CMP EAX,0x49
JNZ 0x001d72b1
MOV dword ptr [RBX + 0x4],0x0
MOV RSI,qword ptr [RBP + -0x40]
MOV RDX,qword ptr [RBP + -0x38]
SUB RDX,RSI
MOV RDI,RBX
CALL 0x001d77f0
TEST EAX,EAX
JNZ 0x001d7317
MOV byte ptr [RBP + -0x29],R12B
MOV R12D,R14D
XOR R12D,0x21
MOV RDI,RBX
LAB_001d70bf:
MOV RSI,R15
CALL 0x001d732f
MOV R13D,EAX
XOR EAX,0x53
OR EAX,R12D
SETZ AL
CMP R13D,0x49
JZ 0x001d70e1
TEST AL,AL
JZ 0x001d71ca
LAB_001d70e1:
MOV RDI,RBX
LEA RSI,[RBP + -0x50]
CALL 0x001d732f
CMP EAX,0x49
JZ 0x001d716f
MOV R13D,EAX
CMP EAX,0x3d
JNZ 0x001d71ae
MOV RDI,RBX
LEA RSI,[RBP + -0x50]
CALL 0x001d732f
CMP EAX,0x53
JZ 0x001d7118
CMP EAX,0x49
JNZ 0x001d72d9
LAB_001d7118:
MOV dword ptr [RBX + 0x4],0x1
MOV R13,qword ptr [RBP + -0x40]
MOV R15,qword ptr [RBP + -0x38]
SUB R15,R13
MOV RDI,RBX
MOV RSI,R13
MOV RDX,R15
CALL 0x001d77f0
TEST EAX,EAX
JNZ 0x001d7317
MOV RAX,qword ptr [RBX + 0x150]
TEST RAX,RAX
JZ 0x001d7164
MOV RSI,qword ptr [RBP + -0x50]
MOV RDX,qword ptr [RBP + -0x48]
SUB RDX,RSI
MOV RDI,RBX
CALL RAX
TEST EAX,EAX
JNZ 0x001d7317
LAB_001d7164:
MOV RDI,RBX
MOV RSI,R13
MOV RDX,R15
JMP 0x001d71a0
LAB_001d716f:
MOV dword ptr [RBX + 0x4],0x1
MOV R15,qword ptr [RBP + -0x40]
MOV R13,qword ptr [RBP + -0x38]
SUB R13,R15
MOV RDI,RBX
MOV RSI,R15
MOV RDX,R13
CALL 0x001d77f0
TEST EAX,EAX
JNZ 0x001d7317
MOV RDI,RBX
MOV RSI,R15
MOV RDX,R13
LAB_001d71a0:
CALL 0x001d762d
TEST EAX,EAX
JZ 0x001d71ba
JMP 0x001d7317
LAB_001d71ae:
CMP R14D,0x21
JNZ 0x001d71c6
CMP R13D,0x53
JNZ 0x001d71c6
LAB_001d71ba:
MOV RDI,RBX
LEA R15,[RBP + -0x40]
JMP 0x001d70bf
LAB_001d71c6:
LEA R15,[RBP + -0x40]
LAB_001d71ca:
CMP R13D,0x2f
MOV R12B,byte ptr [RBP + -0x29]
JNZ 0x001d71f6
MOV RDI,RBX
XOR ESI,ESI
XOR EDX,EDX
CALL 0x001d762d
TEST EAX,EAX
JNZ 0x001d7317
MOV RDI,RBX
MOV RSI,R15
CALL 0x001d732f
MOV R13D,EAX
LAB_001d71f6:
TEST R12B,R12B
JNZ 0x001d7227
CMP R13D,0x3f
JNZ 0x001d72ed
MOV RDI,RBX
XOR ESI,ESI
XOR EDX,EDX
CALL 0x001d762d
TEST EAX,EAX
JNZ 0x001d7317
MOV RDI,RBX
MOV RSI,R15
CALL 0x001d732f
MOV R13D,EAX
LAB_001d7227:
CMP R14D,0x21
JNZ 0x001d7241
MOV RDI,RBX
XOR ESI,ESI
XOR EDX,EDX
CALL 0x001d762d
TEST EAX,EAX
JNZ 0x001d7317
LAB_001d7241:
CMP R13D,0x3e
JNZ 0x001d729c
LAB_001d7247:
MOV RSI,qword ptr [RBX + 0x130]
MOV RAX,qword ptr [RBX + 0x138]
CMP RSI,RAX
JC 0x001d6f60
MOV RCX,qword ptr [RBX + 0x118]
LAB_001d7265:
CMP byte ptr [RCX],0x0
JZ 0x001d7294
ADD RBX,0x8
LEA RCX,[0x1e090f]
MOV R14D,0x1
MOV EDX,0x80
MOV RDI,RBX
MOV ESI,0x1
XOR EAX,EAX
CALL 0x00129970
JMP 0x001d731d
LAB_001d7294:
XOR R14D,R14D
JMP 0x001d731d
LAB_001d729c:
ADD RBX,0x8
MOV EDI,R13D
CALL 0x001d7592
LEA RCX,[0x1e08f4]
JMP 0x001d7300
LAB_001d72b1:
ADD RBX,0x8
MOV EDI,EAX
CALL 0x001d7592
LEA RCX,[0x1e088e]
JMP 0x001d7300
LAB_001d72c5:
ADD RBX,0x8
MOV EDI,EAX
CALL 0x001d7592
LEA RCX,[0x1e0871]
JMP 0x001d7300
LAB_001d72d9:
ADD RBX,0x8
MOV EDI,EAX
CALL 0x001d7592
LEA RCX,[0x1e08b2]
JMP 0x001d7300
LAB_001d72ed:
ADD RBX,0x8
MOV EDI,R13D
CALL 0x001d7592
LEA RCX,[0x1e08d9]
LAB_001d7300:
MOV EDX,0x80
MOV RDI,RBX
MOV ESI,0x1
MOV R8,RAX
XOR EAX,EAX
CALL 0x00129970
LAB_001d7317:
MOV R14D,0x1
LAB_001d731d:
MOV EAX,R14D
ADD RSP,0x28
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
/* WARNING: Type propagation algorithm not settling */
bool my_xml_parse(byte *param_1,char *param_2,long param_3)
{
char cVar1;
int iVar2;
int iVar3;
code *pcVar4;
int8 uVar5;
char *pcVar6;
char *pcVar7;
long lVar8;
bool bVar9;
long local_58;
long local_50;
char *local_48;
char *local_40;
char local_31;
pcVar7 = *(char **)(param_1 + 0x118);
*(char **)(param_1 + 0x120) = pcVar7;
*(char **)(param_1 + 0x128) = param_2;
*(char **)(param_1 + 0x130) = param_2;
pcVar6 = param_2 + param_3;
*(char **)(param_1 + 0x138) = pcVar6;
if (0 < param_3) {
do {
if (*param_2 == '<') {
iVar2 = my_xml_scan(param_1,&local_48);
if (iVar2 != 0x43) {
if (iVar2 == 0x44) {
pcVar4 = *(code **)(param_1 + 0x150);
if (pcVar4 != (code *)0x0) {
pcVar7 = local_40 + (-3 - (long)(local_48 + 9));
pcVar6 = local_48 + 9;
goto LAB_001d7002;
}
}
else {
iVar2 = my_xml_scan(param_1,&local_48);
if (iVar2 != 0x2f) {
bVar9 = iVar2 == 0x21;
if ((iVar2 == 0x3f) || (iVar2 == 0x21)) {
iVar3 = my_xml_scan(param_1,&local_48);
}
else {
bVar9 = true;
iVar3 = iVar2;
}
if (iVar3 == 0x49) {
param_1[4] = 0;
param_1[5] = 0;
param_1[6] = 0;
param_1[7] = 0;
iVar3 = my_xml_enter(param_1,local_48,(long)local_40 - (long)local_48);
local_31 = bVar9;
do {
if (iVar3 != 0) {
return true;
}
LAB_001d70bf:
iVar3 = my_xml_scan(param_1,&local_48);
if ((iVar3 != 0x49) && (iVar3 != 0x53 || iVar2 != 0x21)) goto LAB_001d71ca;
iVar3 = my_xml_scan(param_1,&local_58);
pcVar6 = local_48;
if (iVar3 == 0x49) {
param_1[4] = 1;
param_1[5] = 0;
param_1[6] = 0;
param_1[7] = 0;
lVar8 = (long)local_40 - (long)local_48;
iVar3 = my_xml_enter(param_1,local_48,lVar8);
goto joined_r0x001d7191;
}
if (iVar3 != 0x3d) goto LAB_001d71ae;
iVar3 = my_xml_scan(param_1,&local_58);
pcVar6 = local_48;
if ((iVar3 != 0x53) && (iVar3 != 0x49)) {
uVar5 = lex2str(iVar3);
pcVar6 = "%s unexpected (ident or string wanted)";
goto LAB_001d7300;
}
param_1[4] = 1;
param_1[5] = 0;
param_1[6] = 0;
param_1[7] = 0;
lVar8 = (long)local_40 - (long)local_48;
iVar3 = my_xml_enter(param_1,local_48,lVar8);
if (iVar3 != 0) {
return true;
}
if (*(code **)(param_1 + 0x150) != (code *)0x0) {
iVar3 = (**(code **)(param_1 + 0x150))(param_1,local_58,local_50 - local_58);
joined_r0x001d7191:
if (iVar3 != 0) {
return true;
}
}
iVar3 = my_xml_leave(param_1,pcVar6,lVar8);
} while( true );
}
uVar5 = lex2str(iVar3);
pcVar6 = "%s unexpected (ident or \'/\' wanted)";
LAB_001d7300:
__sprintf_chk(param_1 + 8,1,0x80,pcVar6,uVar5);
return true;
}
iVar2 = my_xml_scan(param_1,&local_48);
if (iVar2 != 0x49) {
uVar5 = lex2str(iVar2);
pcVar6 = "%s unexpected (ident wanted)";
goto LAB_001d7300;
}
iVar2 = my_xml_leave(param_1,local_48,(long)local_40 - (long)local_48);
if (iVar2 != 0) {
return true;
}
iVar3 = my_xml_scan(param_1,&local_48);
LAB_001d7241:
if (iVar3 != 0x3e) {
uVar5 = lex2str(iVar3);
pcVar6 = "%s unexpected (\'>\' wanted)";
goto LAB_001d7300;
}
}
}
}
else {
local_40 = param_2;
if (param_2 < pcVar6) {
lVar8 = (long)pcVar6 - (long)param_2;
do {
if (*local_40 == '<') break;
local_40 = local_40 + 1;
*(char **)(param_1 + 0x130) = local_40;
lVar8 = lVar8 + -1;
} while (lVar8 != 0);
}
local_48 = param_2;
if ((*param_1 & 2) == 0) {
my_xml_norm_text(&local_48);
}
if ((local_48 != local_40) && (pcVar4 = *(code **)(param_1 + 0x150), pcVar4 != (code *)0x0))
{
pcVar7 = local_40 + -(long)local_48;
pcVar6 = local_48;
LAB_001d7002:
(*pcVar4)(param_1,pcVar6,pcVar7);
}
}
param_2 = *(char **)(param_1 + 0x130);
pcVar6 = *(char **)(param_1 + 0x138);
} while (param_2 < pcVar6);
pcVar7 = *(char **)(param_1 + 0x118);
}
cVar1 = *pcVar7;
if (cVar1 != '\0') {
__sprintf_chk(param_1 + 8,1,0x80,"unexpected END-OF-INPUT");
}
return cVar1 != '\0';
LAB_001d71ae:
if ((iVar2 != 0x21) || (iVar3 != 0x53)) {
LAB_001d71ca:
cVar1 = local_31;
if (iVar3 == 0x2f) {
iVar3 = my_xml_leave(param_1,0,0);
if (iVar3 != 0) {
return true;
}
iVar3 = my_xml_scan(param_1,&local_48);
}
if (cVar1 == '\0') {
if (iVar3 != 0x3f) {
uVar5 = lex2str(iVar3);
pcVar6 = "%s unexpected (\'?\' wanted)";
goto LAB_001d7300;
}
iVar3 = my_xml_leave(param_1,0,0);
if (iVar3 != 0) {
return true;
}
iVar3 = my_xml_scan(param_1,&local_48);
}
if ((iVar2 == 0x21) && (iVar2 = my_xml_leave(param_1,0,0), iVar2 != 0)) {
return true;
}
goto LAB_001d7241;
}
goto LAB_001d70bf;
}
|
|
8,972 |
thr_lock_delete
|
eloqsql/mysys/thr_lock.c
|
void thr_lock_delete(THR_LOCK *lock)
{
DBUG_ENTER("thr_lock_delete");
mysql_mutex_lock(&THR_LOCK_lock);
thr_lock_thread_list=list_delete(thr_lock_thread_list,&lock->list);
mysql_mutex_unlock(&THR_LOCK_lock);
mysql_mutex_destroy(&lock->mutex);
DBUG_VOID_RETURN;
}
|
O0
|
c
|
thr_lock_delete:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
leaq 0xb8b505(%rip), %rdi # 0xc83038
leaq 0x5c9ab(%rip), %rsi # 0x1544e5
movl $0x1bb, %edx # imm = 0x1BB
callq 0xf7a50
leaq 0xb8b79d(%rip), %rax # 0xc832e8
movq (%rax), %rdi
movq -0x8(%rbp), %rsi
callq 0xdf2d0
movq %rax, %rcx
leaq 0xb8b787(%rip), %rax # 0xc832e8
movq %rcx, (%rax)
leaq 0xb8b4cd(%rip), %rdi # 0xc83038
callq 0xf7ac0
movq -0x8(%rbp), %rdi
addq $0x18, %rdi
callq 0xf7b90
jmp 0xf7b7f
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
|
thr_lock_delete:
push rbp
mov rbp, rsp
sub rsp, 10h
mov [rbp+var_8], rdi
lea rdi, THR_LOCK_lock
lea rsi, aWorkspaceLlm4b_39; "/workspace/llm4binary/github2025/eloqsq"...
mov edx, 1BBh
call inline_mysql_mutex_lock_27
lea rax, thr_lock_thread_list
mov rdi, [rax]
mov rsi, [rbp+var_8]
call list_delete
mov rcx, rax
lea rax, thr_lock_thread_list
mov [rax], rcx
lea rdi, THR_LOCK_lock
call inline_mysql_mutex_unlock_28
mov rdi, [rbp+var_8]
add rdi, 18h
call inline_mysql_mutex_destroy_10
jmp short $+2
loc_F7B7F:
add rsp, 10h
pop rbp
retn
|
long long thr_lock_delete(_QWORD *a1)
{
inline_mysql_mutex_lock_27(
(long long)&THR_LOCK_lock,
(long long)"/workspace/llm4binary/github2025/eloqsql/mysys/thr_lock.c",
0x1BBu);
thr_lock_thread_list = list_delete(thr_lock_thread_list, a1);
inline_mysql_mutex_unlock_28((long long)&THR_LOCK_lock);
return inline_mysql_mutex_destroy_10(a1 + 3);
}
|
thr_lock_delete:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x10
MOV qword ptr [RBP + -0x8],RDI
LEA RDI,[0xd83038]
LEA RSI,[0x2544e5]
MOV EDX,0x1bb
CALL 0x001f7a50
LEA RAX,[0xd832e8]
MOV RDI,qword ptr [RAX]
MOV RSI,qword ptr [RBP + -0x8]
CALL 0x001df2d0
MOV RCX,RAX
LEA RAX,[0xd832e8]
MOV qword ptr [RAX],RCX
LEA RDI,[0xd83038]
CALL 0x001f7ac0
MOV RDI,qword ptr [RBP + -0x8]
ADD RDI,0x18
CALL 0x001f7b90
JMP 0x001f7b7f
LAB_001f7b7f:
ADD RSP,0x10
POP RBP
RET
|
void thr_lock_delete(long param_1)
{
inline_mysql_mutex_lock
(THR_LOCK_lock,"/workspace/llm4binary/github2025/eloqsql/mysys/thr_lock.c",0x1bb);
thr_lock_thread_list = list_delete(thr_lock_thread_list,param_1);
inline_mysql_mutex_unlock(THR_LOCK_lock);
inline_mysql_mutex_destroy(param_1 + 0x18);
return;
}
|
|
8,973 |
minja::SliceExpr::SliceExpr(minja::Location const&, std::shared_ptr<minja::Expression>&&, std::shared_ptr<minja::Expression>&&)
|
monkey531[P]llama/common/./minja.hpp
|
SliceExpr(const Location & location, std::shared_ptr<Expression> && s, std::shared_ptr<Expression> && e)
: Expression(location), start(std::move(s)), end(std::move(e)) {}
|
O2
|
cpp
|
minja::SliceExpr::SliceExpr(minja::Location const&, std::shared_ptr<minja::Expression>&&, std::shared_ptr<minja::Expression>&&):
pushq %r15
pushq %r14
pushq %rbx
movq %rcx, %rbx
movq %rdx, %r14
movq %rdi, %r15
callq 0x3aef0
leaq 0x9559a(%rip), %rax # 0xe06f8
movq %rax, (%r15)
andq $0x0, 0x28(%r15)
movups (%r14), %xmm0
andq $0x0, 0x8(%r14)
movups %xmm0, 0x20(%r15)
andq $0x0, (%r14)
andq $0x0, 0x38(%r15)
movups (%rbx), %xmm0
andq $0x0, 0x8(%rbx)
movups %xmm0, 0x30(%r15)
andq $0x0, (%rbx)
popq %rbx
popq %r14
popq %r15
retq
|
_ZN5minja9SliceExprC2ERKNS_8LocationEOSt10shared_ptrINS_10ExpressionEES7_:
push r15
push r14
push rbx
mov rbx, rcx
mov r14, rdx
mov r15, rdi
call _ZN5minja10ExpressionC2ERKNS_8LocationE; minja::Expression::Expression(minja::Location const&)
lea rax, off_E06F8
mov [r15], rax
and qword ptr [r15+28h], 0
movups xmm0, xmmword ptr [r14]
and qword ptr [r14+8], 0
movups xmmword ptr [r15+20h], xmm0
and qword ptr [r14], 0
and qword ptr [r15+38h], 0
movups xmm0, xmmword ptr [rbx]
and qword ptr [rbx+8], 0
movups xmmword ptr [r15+30h], xmm0
and qword ptr [rbx], 0
pop rbx
pop r14
pop r15
retn
|
void ( __noreturn ** minja::SliceExpr::SliceExpr(
long long a1,
_QWORD *a2,
__int128 *a3,
__int128 *a4))()
{
void ( __noreturn **result)(); // rax
__int128 v7; // xmm0
__int128 v8; // xmm0
minja::Expression::Expression((_QWORD *)a1, a2);
result = &off_E06F8;
*(_QWORD *)a1 = &off_E06F8;
*(_QWORD *)(a1 + 40) = 0LL;
v7 = *a3;
*((_QWORD *)a3 + 1) = 0LL;
*(_OWORD *)(a1 + 32) = v7;
*(_QWORD *)a3 = 0LL;
*(_QWORD *)(a1 + 56) = 0LL;
v8 = *a4;
*((_QWORD *)a4 + 1) = 0LL;
*(_OWORD *)(a1 + 48) = v8;
*(_QWORD *)a4 = 0LL;
return result;
}
| |||
8,974 |
minja::SliceExpr::SliceExpr(minja::Location const&, std::shared_ptr<minja::Expression>&&, std::shared_ptr<minja::Expression>&&)
|
monkey531[P]llama/common/./minja.hpp
|
SliceExpr(const Location & location, std::shared_ptr<Expression> && s, std::shared_ptr<Expression> && e)
: Expression(location), start(std::move(s)), end(std::move(e)) {}
|
O3
|
cpp
|
minja::SliceExpr::SliceExpr(minja::Location const&, std::shared_ptr<minja::Expression>&&, std::shared_ptr<minja::Expression>&&):
pushq %rbx
movq %rdi, %rbx
leaq 0x9db71(%rip), %rax # 0xee6f8
movq %rax, (%rdi)
movq 0x38(%rdi), %rdi
testq %rdi, %rdi
je 0x50b98
callq 0x2f80e
movq 0x28(%rbx), %rdi
testq %rdi, %rdi
je 0x50ba6
callq 0x2f80e
leaq 0x9d6db(%rip), %rax # 0xee288
movq %rax, (%rbx)
movq 0x10(%rbx), %rdi
testq %rdi, %rdi
je 0x50bbf
popq %rbx
jmp 0x2f80e
popq %rbx
retq
nop
|
_ZN5minja9SliceExprD2Ev:
push rbx
mov rbx, rdi
lea rax, off_EE6F8
mov [rdi], rax
mov rdi, [rdi+38h]
test rdi, rdi
jz short loc_50B98
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_50B98:
mov rdi, [rbx+28h]
test rdi, rdi
jz short loc_50BA6
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_50BA6:
lea rax, off_EE288
mov [rbx], rax
mov rdi, [rbx+10h]
test rdi, rdi
jz short loc_50BBF
pop rbx
jmp _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_50BBF:
pop rbx
retn
|
void minja::SliceExpr::~SliceExpr(minja::SliceExpr *this)
{
volatile signed __int32 *v2; // rdi
volatile signed __int32 *v3; // rdi
volatile signed __int32 *v4; // rdi
*(_QWORD *)this = &off_EE6F8;
v2 = (volatile signed __int32 *)*((_QWORD *)this + 7);
if ( v2 )
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v2);
v3 = (volatile signed __int32 *)*((_QWORD *)this + 5);
if ( v3 )
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v3);
*(_QWORD *)this = &off_EE288;
v4 = (volatile signed __int32 *)*((_QWORD *)this + 2);
if ( v4 )
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v4);
}
|
~SliceExpr:
PUSH RBX
MOV RBX,RDI
LEA RAX,[0x1ee6f8]
MOV qword ptr [RDI],RAX
MOV RDI,qword ptr [RDI + 0x38]
TEST RDI,RDI
JZ 0x00150b98
CALL 0x0012f80e
LAB_00150b98:
MOV RDI,qword ptr [RBX + 0x28]
TEST RDI,RDI
JZ 0x00150ba6
CALL 0x0012f80e
LAB_00150ba6:
LEA RAX,[0x1ee288]
MOV qword ptr [RBX],RAX
MOV RDI,qword ptr [RBX + 0x10]
TEST RDI,RDI
JZ 0x00150bbf
POP RBX
JMP 0x0012f80e
LAB_00150bbf:
POP RBX
RET
|
/* minja::SliceExpr::~SliceExpr() */
void __thiscall minja::SliceExpr::~SliceExpr(SliceExpr *this)
{
*(int ***)this = &PTR_do_evaluate_001ee6f8;
if (*(_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> **)(this + 0x38) !=
(_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) {
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release
(*(_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> **)(this + 0x38));
}
if (*(_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> **)(this + 0x28) !=
(_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) {
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release
(*(_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> **)(this + 0x28));
}
*(int ***)this = &PTR___cxa_pure_virtual_001ee288;
if (*(_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> **)(this + 0x10) !=
(_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) {
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release
(*(_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> **)(this + 0x10));
return;
}
return;
}
|
|
8,975 |
string_process_escapes(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&)
|
monkey531[P]llama/common/common.cpp
|
void string_process_escapes(std::string & input) {
std::size_t input_len = input.length();
std::size_t output_idx = 0;
for (std::size_t input_idx = 0; input_idx < input_len; ++input_idx) {
if (input[input_idx] == '\\' && input_idx + 1 < input_len) {
switch (input[++input_idx]) {
case 'n': input[output_idx++] = '\n'; break;
case 'r': input[output_idx++] = '\r'; break;
case 't': input[output_idx++] = '\t'; break;
case '\'': input[output_idx++] = '\''; break;
case '\"': input[output_idx++] = '\"'; break;
case '\\': input[output_idx++] = '\\'; break;
case 'x':
// Handle \x12, etc
if (input_idx + 2 < input_len) {
const char x[3] = { input[input_idx + 1], input[input_idx + 2], 0 };
char *err_p = nullptr;
const long val = std::strtol(x, &err_p, 16);
if (err_p == x + 2) {
input_idx += 2;
input[output_idx++] = char(val);
break;
}
}
// fall through
default: input[output_idx++] = '\\';
input[output_idx++] = input[input_idx]; break;
}
} else {
input[output_idx++] = input[input_idx];
}
}
input.resize(output_idx);
}
|
O3
|
cpp
|
string_process_escapes(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rbx
movq 0x8(%rdi), %r13
testq %r13, %r13
je 0x73d0f
leaq 0xf(%rsp), %r12
xorl %r14d, %r14d
leaq 0xd(%rsp), %rdi
leaq 0x10(%rsp), %rsi
xorl %ecx, %ecx
movq (%rbx), %rax
movb (%rax,%rcx), %dl
cmpb $0x5c, %dl
jne 0x73c2e
leaq 0x1(%rcx), %rbp
cmpq %r13, %rbp
jae 0x73c2e
movzbl (%rax,%rbp), %edx
cmpl $0x6d, %edx
jle 0x73c48
cmpl $0x73, %edx
jg 0x73c69
cmpl $0x6e, %edx
je 0x73cd8
cmpl $0x72, %edx
jne 0x73cb8
movb $0xd, (%rax,%r14)
jmp 0x73ceb
movb %dl, (%rax,%r14)
incq %r14
movq %rcx, %rbp
incq %rbp
movq %rbp, %rcx
cmpq %r13, %rbp
jb 0x73bf0
jmp 0x73d12
cmpl $0x22, %edx
je 0x73cd1
cmpl $0x27, %edx
je 0x73ce6
cmpl $0x5c, %edx
jne 0x73cb8
movb $0x5c, (%rax,%r14)
jmp 0x73ceb
cmpl $0x74, %edx
je 0x73cdf
cmpl $0x78, %edx
jne 0x73cb8
leaq 0x3(%rcx), %r15
cmpq %r13, %r15
jae 0x73cb8
movb 0x2(%rax,%rcx), %dl
movb %dl, 0xd(%rsp)
movb 0x3(%rax,%rcx), %al
movb %al, 0xe(%rsp)
movb $0x0, 0xf(%rsp)
movq $0x0, 0x10(%rsp)
movl $0x10, %edx
callq 0x1bc40
cmpq %r12, 0x10(%rsp)
je 0x73cf3
movq (%rbx), %rax
leaq 0xd(%rsp), %rdi
leaq 0x10(%rsp), %rsi
movb $0x5c, (%rax,%r14)
movq (%rbx), %rax
movb (%rax,%rbp), %cl
movb %cl, 0x1(%rax,%r14)
addq $0x2, %r14
jmp 0x73c38
movb $0x22, (%rax,%r14)
jmp 0x73ceb
movb $0xa, (%rax,%r14)
jmp 0x73ceb
movb $0x9, (%rax,%r14)
jmp 0x73ceb
movb $0x27, (%rax,%r14)
incq %r14
jmp 0x73c38
movq (%rbx), %rcx
movb %al, (%rcx,%r14)
incq %r14
movq %r15, %rbp
leaq 0xd(%rsp), %rdi
leaq 0x10(%rsp), %rsi
jmp 0x73c38
xorl %r14d, %r14d
movq %rbx, %rdi
movq %r14, %rsi
xorl %edx, %edx
callq 0x1b250
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
|
_Z22string_process_escapesRNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 18h
mov rbx, rdi
mov r13, [rdi+8]
test r13, r13
jz loc_73D0F
lea r12, [rsp+48h+var_39]
xor r14d, r14d
lea rdi, [rsp+48h+var_3B]
lea rsi, [rsp+48h+var_38]
xor ecx, ecx
loc_73BF0:
mov rax, [rbx]
mov dl, [rax+rcx]
cmp dl, 5Ch ; '\'
jnz short loc_73C2E
lea rbp, [rcx+1]
cmp rbp, r13
jnb short loc_73C2E
movzx edx, byte ptr [rax+rbp]
cmp edx, 6Dh ; 'm'
jle short loc_73C48
cmp edx, 73h ; 's'
jg short loc_73C69
cmp edx, 6Eh ; 'n'
jz loc_73CD8
cmp edx, 72h ; 'r'
jnz loc_73CB8
mov byte ptr [rax+r14], 0Dh
jmp loc_73CEB
loc_73C2E:
mov [rax+r14], dl
inc r14
mov rbp, rcx
loc_73C38:
inc rbp
mov rcx, rbp
cmp rbp, r13
jb short loc_73BF0
jmp loc_73D12
loc_73C48:
cmp edx, 22h ; '"'
jz loc_73CD1
cmp edx, 27h ; '''
jz loc_73CE6
cmp edx, 5Ch ; '\'
jnz short loc_73CB8
mov byte ptr [rax+r14], 5Ch ; '\'
jmp loc_73CEB
loc_73C69:
cmp edx, 74h ; 't'
jz short loc_73CDF
cmp edx, 78h ; 'x'
jnz short loc_73CB8
lea r15, [rcx+3]
cmp r15, r13
jnb short loc_73CB8
mov dl, [rax+rcx+2]
mov [rsp+48h+var_3B], dl
mov al, [rax+rcx+3]
mov [rsp+48h+var_3A], al
mov [rsp+48h+var_39], 0
mov [rsp+48h+var_38], 0
mov edx, 10h
call _strtol
cmp [rsp+48h+var_38], r12
jz short loc_73CF3
mov rax, [rbx]
lea rdi, [rsp+48h+var_3B]
lea rsi, [rsp+48h+var_38]
loc_73CB8:
mov byte ptr [rax+r14], 5Ch ; '\'
mov rax, [rbx]
mov cl, [rax+rbp]
mov [rax+r14+1], cl
add r14, 2
jmp loc_73C38
loc_73CD1:
mov byte ptr [rax+r14], 22h ; '"'
jmp short loc_73CEB
loc_73CD8:
mov byte ptr [rax+r14], 0Ah
jmp short loc_73CEB
loc_73CDF:
mov byte ptr [rax+r14], 9
jmp short loc_73CEB
loc_73CE6:
mov byte ptr [rax+r14], 27h ; '''
loc_73CEB:
inc r14
jmp loc_73C38
loc_73CF3:
mov rcx, [rbx]
mov [rcx+r14], al
inc r14
mov rbp, r15
lea rdi, [rsp+48h+var_3B]
lea rsi, [rsp+48h+var_38]
jmp loc_73C38
loc_73D0F:
xor r14d, r14d
loc_73D12:
mov rdi, rbx
mov rsi, r14
xor edx, edx
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6resizeEmc; std::string::resize(ulong,char)
add rsp, 18h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
|
long long string_process_escapes(long long *a1, long long a2, long long a3, long long a4)
{
unsigned long long v4; // r13
long long v5; // r14
long long v6; // rax
char v7; // dl
long long v8; // rbp
unsigned int v9; // edx
long long v10; // r15
char v11; // al
_BYTE v13[2]; // [rsp+Dh] [rbp-3Bh] BYREF
char v14; // [rsp+Fh] [rbp-39h] BYREF
char *v15; // [rsp+10h] [rbp-38h] BYREF
v4 = a1[1];
if ( v4 )
{
v5 = 0LL;
a4 = 0LL;
while ( 1 )
{
v6 = *a1;
v7 = *(_BYTE *)(*a1 + a4);
if ( v7 == 92 && (v8 = a4 + 1, a4 + 1 < v4) )
{
v9 = *(unsigned __int8 *)(v6 + v8);
if ( v9 <= 0x6D )
{
switch ( v9 )
{
case '"':
*(_BYTE *)(v6 + v5) = 34;
goto LABEL_27;
case '\'':
*(_BYTE *)(v6 + v5) = 39;
goto LABEL_27;
case '\\':
*(_BYTE *)(v6 + v5) = 92;
goto LABEL_27;
}
}
else if ( *(unsigned __int8 *)(v6 + v8) > 0x73u )
{
if ( v9 == 116 )
{
*(_BYTE *)(v6 + v5) = 9;
goto LABEL_27;
}
if ( v9 == 120 )
{
v10 = a4 + 3;
if ( a4 + 3 < v4 )
{
v13[0] = *(_BYTE *)(v6 + a4 + 2);
v13[1] = *(_BYTE *)(v6 + a4 + 3);
v14 = 0;
v15 = 0LL;
v11 = strtol(v13, &v15, 16LL);
if ( v15 == &v14 )
{
*(_BYTE *)(*a1 + v5++) = v11;
v8 = v10;
goto LABEL_11;
}
v6 = *a1;
}
}
}
else
{
if ( v9 == 110 )
{
*(_BYTE *)(v6 + v5) = 10;
goto LABEL_27;
}
if ( v9 == 114 )
{
*(_BYTE *)(v6 + v5) = 13;
LABEL_27:
++v5;
goto LABEL_11;
}
}
*(_BYTE *)(v6 + v5) = 92;
*(_BYTE *)(*a1 + v5 + 1) = *(_BYTE *)(*a1 + v8);
v5 += 2LL;
}
else
{
*(_BYTE *)(v6 + v5++) = v7;
v8 = a4;
}
LABEL_11:
a4 = v8 + 1;
if ( v8 + 1 >= v4 )
return std::string::resize(a1, v5, 0LL, a4);
}
}
v5 = 0LL;
return std::string::resize(a1, v5, 0LL, a4);
}
|
string_process_escapes:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x18
MOV RBX,RDI
MOV R13,qword ptr [RDI + 0x8]
TEST R13,R13
JZ 0x00173d0f
LEA R12,[RSP + 0xf]
XOR R14D,R14D
LEA RDI,[RSP + 0xd]
LEA RSI,[RSP + 0x10]
XOR ECX,ECX
LAB_00173bf0:
MOV RAX,qword ptr [RBX]
MOV DL,byte ptr [RAX + RCX*0x1]
CMP DL,0x5c
JNZ 0x00173c2e
LEA RBP,[RCX + 0x1]
CMP RBP,R13
JNC 0x00173c2e
MOVZX EDX,byte ptr [RAX + RBP*0x1]
CMP EDX,0x6d
JLE 0x00173c48
CMP EDX,0x73
JG 0x00173c69
CMP EDX,0x6e
JZ 0x00173cd8
CMP EDX,0x72
JNZ 0x00173cb8
MOV byte ptr [RAX + R14*0x1],0xd
JMP 0x00173ceb
LAB_00173c2e:
MOV byte ptr [RAX + R14*0x1],DL
INC R14
MOV RBP,RCX
LAB_00173c38:
INC RBP
MOV RCX,RBP
CMP RBP,R13
JC 0x00173bf0
JMP 0x00173d12
LAB_00173c48:
CMP EDX,0x22
JZ 0x00173cd1
CMP EDX,0x27
JZ 0x00173ce6
CMP EDX,0x5c
JNZ 0x00173cb8
MOV byte ptr [RAX + R14*0x1],0x5c
JMP 0x00173ceb
LAB_00173c69:
CMP EDX,0x74
JZ 0x00173cdf
CMP EDX,0x78
JNZ 0x00173cb8
LEA R15,[RCX + 0x3]
CMP R15,R13
JNC 0x00173cb8
MOV DL,byte ptr [RAX + RCX*0x1 + 0x2]
MOV byte ptr [RSP + 0xd],DL
MOV AL,byte ptr [RAX + RCX*0x1 + 0x3]
MOV byte ptr [RSP + 0xe],AL
MOV byte ptr [RSP + 0xf],0x0
MOV qword ptr [RSP + 0x10],0x0
MOV EDX,0x10
CALL 0x0011bc40
CMP qword ptr [RSP + 0x10],R12
JZ 0x00173cf3
MOV RAX,qword ptr [RBX]
LEA RDI,[RSP + 0xd]
LEA RSI,[RSP + 0x10]
LAB_00173cb8:
MOV byte ptr [RAX + R14*0x1],0x5c
MOV RAX,qword ptr [RBX]
MOV CL,byte ptr [RAX + RBP*0x1]
MOV byte ptr [RAX + R14*0x1 + 0x1],CL
ADD R14,0x2
JMP 0x00173c38
LAB_00173cd1:
MOV byte ptr [RAX + R14*0x1],0x22
JMP 0x00173ceb
LAB_00173cd8:
MOV byte ptr [RAX + R14*0x1],0xa
JMP 0x00173ceb
LAB_00173cdf:
MOV byte ptr [RAX + R14*0x1],0x9
JMP 0x00173ceb
LAB_00173ce6:
MOV byte ptr [RAX + R14*0x1],0x27
LAB_00173ceb:
INC R14
JMP 0x00173c38
LAB_00173cf3:
MOV RCX,qword ptr [RBX]
MOV byte ptr [RCX + R14*0x1],AL
INC R14
MOV RBP,R15
LEA RDI,[RSP + 0xd]
LEA RSI,[RSP + 0x10]
JMP 0x00173c38
LAB_00173d0f:
XOR R14D,R14D
LAB_00173d12:
MOV RDI,RBX
MOV RSI,R14
XOR EDX,EDX
CALL 0x0011b250
ADD RSP,0x18
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
/* string_process_escapes(std::__cxx11::string&) */
void string_process_escapes(string *param_1)
{
ulong uVar1;
byte bVar2;
ulong uVar3;
long lVar4;
ulong uVar5;
long lVar6;
char local_3b;
int1 local_3a;
char local_39;
char *local_38;
uVar3 = *(ulong *)(param_1 + 8);
if (uVar3 == 0) {
lVar6 = 0;
}
else {
lVar6 = 0;
uVar5 = 0;
do {
lVar4 = *(long *)param_1;
if ((*(char *)(lVar4 + uVar5) == '\\') && (uVar1 = uVar5 + 1, uVar1 < uVar3)) {
bVar2 = *(byte *)(lVar4 + uVar1);
if (bVar2 < 0x6e) {
if (bVar2 == 0x22) {
*(int1 *)(lVar4 + lVar6) = 0x22;
}
else if (bVar2 == 0x27) {
*(int1 *)(lVar4 + lVar6) = 0x27;
}
else {
if (bVar2 != 0x5c) goto LAB_00173cb8;
*(int1 *)(lVar4 + lVar6) = 0x5c;
}
}
else if (bVar2 < 0x74) {
if (bVar2 == 0x6e) {
*(int1 *)(lVar4 + lVar6) = 10;
}
else {
if (bVar2 != 0x72) goto LAB_00173cb8;
*(int1 *)(lVar4 + lVar6) = 0xd;
}
}
else {
if (bVar2 != 0x74) {
if ((bVar2 == 0x78) && (uVar5 + 3 < uVar3)) {
local_3b = *(char *)(lVar4 + 2 + uVar5);
local_3a = *(int1 *)(lVar4 + 3 + uVar5);
local_39 = '\0';
local_38 = (char *)0x0;
lVar4 = strtol(&local_3b,&local_38,0x10);
if (local_38 == &local_39) {
*(char *)(*(long *)param_1 + lVar6) = (char)lVar4;
lVar6 = lVar6 + 1;
uVar5 = uVar5 + 3;
goto LAB_00173c38;
}
lVar4 = *(long *)param_1;
}
LAB_00173cb8:
*(int1 *)(lVar4 + lVar6) = 0x5c;
*(int1 *)(*(long *)param_1 + 1 + lVar6) =
*(int1 *)(*(long *)param_1 + uVar1);
lVar6 = lVar6 + 2;
uVar5 = uVar1;
goto LAB_00173c38;
}
*(int1 *)(lVar4 + lVar6) = 9;
}
lVar6 = lVar6 + 1;
uVar5 = uVar1;
}
else {
*(char *)(lVar4 + lVar6) = *(char *)(lVar4 + uVar5);
lVar6 = lVar6 + 1;
}
LAB_00173c38:
uVar5 = uVar5 + 1;
} while (uVar5 < uVar3);
}
std::__cxx11::string::resize((ulong)param_1,(char)lVar6);
return;
}
|
|
8,976 |
spdlog::logger::should_log(spdlog::level::level_enum) const
|
AlayaLite/build_O0/_deps/spdlog-src/include/spdlog/logger.h
|
bool should_log(level::level_enum msg_level) const {
return msg_level >= level_.load(std::memory_order_relaxed);
}
|
O0
|
c
|
spdlog::logger::should_log(spdlog::level::level_enum) const:
subq $0x38, %rsp
movq %rdi, 0x18(%rsp)
movl %esi, 0x14(%rsp)
movq 0x18(%rsp), %rax
movl 0x14(%rsp), %ecx
movl %ecx, 0x4(%rsp)
addq $0x40, %rax
movq %rax, 0x30(%rsp)
movl $0x0, 0x2c(%rsp)
movq 0x30(%rsp), %rax
movq %rax, 0x8(%rsp)
movl 0x2c(%rsp), %edi
movl $0xffff, %esi # imm = 0xFFFF
callq 0x29b30
movl %eax, 0x10(%rsp)
jmp 0x295a9
movl 0x10(%rsp), %eax
movl %eax, 0x28(%rsp)
movl 0x2c(%rsp), %eax
movl %eax, (%rsp)
decl %eax
subl $0x2, %eax
jb 0x295d8
jmp 0x295c1
movl (%rsp), %eax
subl $0x5, %eax
je 0x295e5
jmp 0x295cb
movq 0x8(%rsp), %rax
movl (%rax), %eax
movl %eax, 0x24(%rsp)
jmp 0x295fa
movq 0x8(%rsp), %rax
movl (%rax), %eax
movl %eax, 0x24(%rsp)
jmp 0x295fa
movq 0x8(%rsp), %rax
movl (%rax), %eax
movl %eax, 0x24(%rsp)
jmp 0x295fa
movq %rax, %rdi
callq 0x1eac0
movl 0x4(%rsp), %eax
cmpl 0x24(%rsp), %eax
setge %al
andb $0x1, %al
addq $0x38, %rsp
retq
nopl (%rax)
|
_ZNK6spdlog6logger10should_logENS_5level10level_enumE:
sub rsp, 38h
mov [rsp+38h+var_20], rdi
mov [rsp+38h+var_24], esi
mov rax, [rsp+38h+var_20]
mov ecx, [rsp+38h+var_24]
mov [rsp+38h+var_34], ecx
add rax, 40h ; '@'
mov [rsp+38h+var_8], rax
mov [rsp+38h+var_C], 0
mov rax, [rsp+38h+var_8]
mov [rsp+38h+var_30], rax
mov edi, [rsp+38h+var_C]
mov esi, 0FFFFh
call _ZStanSt12memory_orderSt23__memory_order_modifier; std::operator&(std::memory_order,std::__memory_order_modifier)
mov [rsp+38h+var_28], eax
jmp short $+2
loc_295A9:
mov eax, [rsp+38h+var_28]
mov [rsp+38h+var_10], eax
mov eax, [rsp+38h+var_C]
mov [rsp+38h+var_38], eax
dec eax
sub eax, 2
jb short loc_295D8
jmp short $+2
loc_295C1:
mov eax, [rsp+38h+var_38]
sub eax, 5
jz short loc_295E5
jmp short $+2
loc_295CB:
mov rax, [rsp+38h+var_30]
mov eax, [rax]
mov [rsp+38h+var_14], eax
jmp short loc_295FA
loc_295D8:
mov rax, [rsp+38h+var_30]
mov eax, [rax]
mov [rsp+38h+var_14], eax
jmp short loc_295FA
loc_295E5:
mov rax, [rsp+38h+var_30]
mov eax, [rax]
mov [rsp+38h+var_14], eax
jmp short loc_295FA
mov rdi, rax
call __clang_call_terminate
loc_295FA:
mov eax, [rsp+38h+var_34]
cmp eax, [rsp+38h+var_14]
setnl al
and al, 1
add rsp, 38h
retn
|
bool spdlog::logger::should_log(long long a1, int a2)
{
std::operator&(0LL, 0xFFFFLL);
return a2 >= *(_DWORD *)(a1 + 64);
}
|
should_log:
SUB RSP,0x38
MOV qword ptr [RSP + 0x18],RDI
MOV dword ptr [RSP + 0x14],ESI
MOV RAX,qword ptr [RSP + 0x18]
MOV ECX,dword ptr [RSP + 0x14]
MOV dword ptr [RSP + 0x4],ECX
ADD RAX,0x40
MOV qword ptr [RSP + 0x30],RAX
MOV dword ptr [RSP + 0x2c],0x0
MOV RAX,qword ptr [RSP + 0x30]
MOV qword ptr [RSP + 0x8],RAX
MOV EDI,dword ptr [RSP + 0x2c]
LAB_00129599:
MOV ESI,0xffff
CALL 0x00129b30
MOV dword ptr [RSP + 0x10],EAX
JMP 0x001295a9
LAB_001295a9:
MOV EAX,dword ptr [RSP + 0x10]
MOV dword ptr [RSP + 0x28],EAX
MOV EAX,dword ptr [RSP + 0x2c]
MOV dword ptr [RSP],EAX
DEC EAX
SUB EAX,0x2
JC 0x001295d8
JMP 0x001295c1
LAB_001295c1:
MOV EAX,dword ptr [RSP]
SUB EAX,0x5
JZ 0x001295e5
JMP 0x001295cb
LAB_001295cb:
MOV RAX,qword ptr [RSP + 0x8]
MOV EAX,dword ptr [RAX]
MOV dword ptr [RSP + 0x24],EAX
JMP 0x001295fa
LAB_001295d8:
MOV RAX,qword ptr [RSP + 0x8]
MOV EAX,dword ptr [RAX]
MOV dword ptr [RSP + 0x24],EAX
JMP 0x001295fa
LAB_001295e5:
MOV RAX,qword ptr [RSP + 0x8]
MOV EAX,dword ptr [RAX]
MOV dword ptr [RSP + 0x24],EAX
JMP 0x001295fa
LAB_001295fa:
MOV EAX,dword ptr [RSP + 0x4]
CMP EAX,dword ptr [RSP + 0x24]
SETGE AL
AND AL,0x1
ADD RSP,0x38
RET
|
/* WARNING: Removing unreachable block (ram,0x001295e5) */
/* WARNING: Removing unreachable block (ram,0x001295d8) */
/* spdlog::logger::should_log(spdlog::level::level_enum) const */
bool __thiscall spdlog::logger::should_log(logger *this,int param_2)
{
/* try { // try from 00129599 to 001295a2 has its CatchHandler @ 001295f2 */
std::operator&(0,0xffff);
return *(int *)(this + 0x40) <= param_2;
}
|
|
8,977 |
my_wc_mb_eucjpms
|
eloqsql/strings/ctype-eucjpms.c
|
static int
my_wc_mb_eucjpms(CHARSET_INFO *cs __attribute__((unused)),
my_wc_t wc, uchar *s, uchar *e)
{
int jp;
if ((int) wc < 0x80) /* ASCII [00-7F] */
{
if (s >= e)
return MY_CS_TOOSMALL;
*s= (uchar) wc;
return 1;
}
if (wc > 0xFFFF)
return MY_CS_ILUNI;
if ((jp= unicode_to_jisx0208_eucjpms[wc])) /* JIS-X-0208 MS */
{
if (s + 2 > e)
return MY_CS_TOOSMALL2;
MY_PUT_MB2(s, jp);
return 2;
}
if ((jp= unicode_to_jisx0212_eucjpms[wc])) /* JIS-X-0212 MS */
{
if (s + 3 > e)
return MY_CS_TOOSMALL3;
s[0]= 0x8F;
MY_PUT_MB2(s + 1, jp);
return 3;
}
if (wc >= 0xFF61 && wc <= 0xFF9F) /* Half width Katakana */
{
if (s + 2 > e)
return MY_CS_TOOSMALL2;
s[0]= 0x8E;
s[1]= (uchar) (wc - 0xFEC0);
return 2;
}
return MY_CS_ILUNI;
}
|
O3
|
c
|
my_wc_mb_eucjpms:
cmpl $0x7f, %esi
jg 0x366d5
movl $0xffffff9b, %eax # imm = 0xFFFFFF9B
cmpq %rcx, %rdx
jae 0x3670a
movb %sil, (%rdx)
movl $0x1, %eax
retq
xorl %eax, %eax
cmpq $0xffff, %rsi # imm = 0xFFFF
ja 0x3670a
leaq 0xe7e09(%rip), %rdi # 0x11e4f0
movzwl (%rdi,%rsi,2), %edi
testw %di, %di
je 0x3670b
leaq 0x2(%rdx), %rsi
movl $0xffffff9a, %eax # imm = 0xFFFFFF9A
cmpq %rcx, %rsi
ja 0x3670a
rolw $0x8, %di
movw %di, (%rdx)
movl $0x2, %eax
retq
pushq %rbp
movq %rsp, %rbp
pushq %rbx
leaq 0x107dd9(%rip), %rdi # 0x13e4f0
movzwl (%rdi,%rsi,2), %ebx
testw %bx, %bx
je 0x3673e
leaq 0x3(%rdx), %rsi
movl $0xffffff99, %eax # imm = 0xFFFFFF99
cmpq %rcx, %rsi
ja 0x36769
movb $-0x71, (%rdx)
movb %bh, 0x1(%rdx)
movb %bl, 0x2(%rdx)
movl $0x3, %eax
jmp 0x36769
leaq -0xff61(%rsi), %rdi
cmpq $0x3e, %rdi
ja 0x36769
leaq 0x2(%rdx), %rdi
movl $0xffffff9a, %eax # imm = 0xFFFFFF9A
cmpq %rcx, %rdi
ja 0x36769
movb $-0x72, (%rdx)
addb $0x40, %sil
movb %sil, 0x1(%rdx)
movl $0x2, %eax
popq %rbx
popq %rbp
retq
|
my_wc_mb_eucjpms:
cmp esi, 7Fh
jg short loc_366D5
mov eax, 0FFFFFF9Bh
cmp rdx, rcx
jnb short locret_3670A
mov [rdx], sil
mov eax, 1
retn
loc_366D5:
xor eax, eax
cmp rsi, 0FFFFh
ja short locret_3670A
lea rdi, unicode_to_jisx0208_eucjpms
movzx edi, word ptr [rdi+rsi*2]
test di, di
jz short loc_3670B
lea rsi, [rdx+2]
mov eax, 0FFFFFF9Ah
cmp rsi, rcx
ja short locret_3670A
rol di, 8
mov [rdx], di
mov eax, 2
locret_3670A:
retn
loc_3670B:
push rbp
mov rbp, rsp
push rbx
lea rdi, unicode_to_jisx0212_eucjpms
movzx ebx, word ptr [rdi+rsi*2]
test bx, bx
jz short loc_3673E
lea rsi, [rdx+3]
mov eax, 0FFFFFF99h
cmp rsi, rcx
ja short loc_36769
mov byte ptr [rdx], 8Fh
mov [rdx+1], bh
mov [rdx+2], bl
mov eax, 3
jmp short loc_36769
loc_3673E:
lea rdi, [rsi-0FF61h]
cmp rdi, 3Eh ; '>'
ja short loc_36769
lea rdi, [rdx+2]
mov eax, 0FFFFFF9Ah
cmp rdi, rcx
ja short loc_36769
mov byte ptr [rdx], 8Eh
add sil, 40h ; '@'
mov [rdx+1], sil
mov eax, 2
loc_36769:
pop rbx
pop rbp
retn
|
long long my_wc_mb_eucjpms(long long a1, unsigned long long a2, unsigned long long a3, unsigned long long a4)
{
long long result; // rax
__int16 v5; // di
__int16 v6; // bx
if ( (int)a2 > 127 )
{
result = 0LL;
if ( a2 <= 0xFFFF )
{
v5 = unicode_to_jisx0208_eucjpms[a2];
if ( v5 )
{
result = 4294967194LL;
if ( a3 + 2 <= a4 )
{
*(_WORD *)a3 = __ROL2__(v5, 8);
return 2LL;
}
}
else
{
v6 = unicode_to_jisx0212_eucjpms[a2];
if ( v6 )
{
result = 4294967193LL;
if ( a3 + 3 <= a4 )
{
*(_BYTE *)a3 = -113;
*(_BYTE *)(a3 + 1) = HIBYTE(v6);
*(_BYTE *)(a3 + 2) = v6;
return 3LL;
}
}
else if ( a2 - 65377 <= 0x3E )
{
result = 4294967194LL;
if ( a3 + 2 <= a4 )
{
*(_BYTE *)a3 = -114;
*(_BYTE *)(a3 + 1) = a2 + 64;
return 2LL;
}
}
}
}
}
else
{
result = 4294967195LL;
if ( a3 < a4 )
{
*(_BYTE *)a3 = a2;
return 1LL;
}
}
return result;
}
|
my_wc_mb_eucjpms:
CMP ESI,0x7f
JG 0x001366d5
MOV EAX,0xffffff9b
CMP RDX,RCX
JNC 0x0013670a
MOV byte ptr [RDX],SIL
MOV EAX,0x1
RET
LAB_001366d5:
XOR EAX,EAX
CMP RSI,0xffff
JA 0x0013670a
LEA RDI,[0x21e4f0]
MOVZX EDI,word ptr [RDI + RSI*0x2]
TEST DI,DI
JZ 0x0013670b
LEA RSI,[RDX + 0x2]
MOV EAX,0xffffff9a
CMP RSI,RCX
JA 0x0013670a
ROL DI,0x8
MOV word ptr [RDX],DI
MOV EAX,0x2
LAB_0013670a:
RET
LAB_0013670b:
PUSH RBP
MOV RBP,RSP
PUSH RBX
LEA RDI,[0x23e4f0]
MOVZX EBX,word ptr [RDI + RSI*0x2]
TEST BX,BX
JZ 0x0013673e
LEA RSI,[RDX + 0x3]
MOV EAX,0xffffff99
CMP RSI,RCX
JA 0x00136769
MOV byte ptr [RDX],0x8f
MOV byte ptr [RDX + 0x1],BH
MOV byte ptr [RDX + 0x2],BL
MOV EAX,0x3
JMP 0x00136769
LAB_0013673e:
LEA RDI,[RSI + -0xff61]
CMP RDI,0x3e
JA 0x00136769
LEA RDI,[RDX + 0x2]
MOV EAX,0xffffff9a
CMP RDI,RCX
JA 0x00136769
MOV byte ptr [RDX],0x8e
ADD SIL,0x40
MOV byte ptr [RDX + 0x1],SIL
MOV EAX,0x2
LAB_00136769:
POP RBX
POP RBP
RET
|
int8 my_wc_mb_eucjpms(int8 param_1,ulong param_2,ushort *param_3,ushort *param_4)
{
ushort uVar1;
short sVar2;
int8 uVar3;
if ((int)param_2 < 0x80) {
uVar3 = 0xffffff9b;
if (param_3 < param_4) {
*(char *)param_3 = (char)param_2;
return 1;
}
}
else {
uVar3 = 0;
if (param_2 < 0x10000) {
uVar1 = *(ushort *)(unicode_to_jisx0208_eucjpms + param_2 * 2);
if (uVar1 == 0) {
sVar2 = *(short *)(unicode_to_jisx0212_eucjpms + param_2 * 2);
if (sVar2 == 0) {
if ((param_2 - 0xff61 < 0x3f) && (uVar3 = 0xffffff9a, param_3 + 1 <= param_4)) {
*(char *)param_3 = -0x72;
*(char *)((long)param_3 + 1) = (char)param_2 + '@';
uVar3 = 2;
}
}
else {
uVar3 = 0xffffff99;
if ((ushort *)((long)param_3 + 3) <= param_4) {
*(char *)param_3 = -0x71;
*(char *)((long)param_3 + 1) = (char)((ushort)sVar2 >> 8);
*(char *)(param_3 + 1) = (char)sVar2;
uVar3 = 3;
}
}
return uVar3;
}
uVar3 = 0xffffff9a;
if (param_3 + 1 <= param_4) {
*param_3 = uVar1 << 8 | uVar1 >> 8;
uVar3 = 2;
}
}
}
return uVar3;
}
|
|
8,978 |
string_parse_kv_override(char const*, std::vector<llama_model_kv_override, std::allocator<llama_model_kv_override>>&)
|
monkey531[P]llama/common/common.cpp
|
bool string_parse_kv_override(const char * data, std::vector<llama_model_kv_override> & overrides) {
const char * sep = strchr(data, '=');
if (sep == nullptr || sep - data >= 128) {
LOG_ERR("%s: malformed KV override '%s'\n", __func__, data);
return false;
}
llama_model_kv_override kvo;
std::strncpy(kvo.key, data, sep - data);
kvo.key[sep - data] = 0;
sep++;
if (strncmp(sep, "int:", 4) == 0) {
sep += 4;
kvo.tag = LLAMA_KV_OVERRIDE_TYPE_INT;
kvo.val_i64 = std::atol(sep);
} else if (strncmp(sep, "float:", 6) == 0) {
sep += 6;
kvo.tag = LLAMA_KV_OVERRIDE_TYPE_FLOAT;
kvo.val_f64 = std::atof(sep);
} else if (strncmp(sep, "bool:", 5) == 0) {
sep += 5;
kvo.tag = LLAMA_KV_OVERRIDE_TYPE_BOOL;
if (std::strcmp(sep, "true") == 0) {
kvo.val_bool = true;
} else if (std::strcmp(sep, "false") == 0) {
kvo.val_bool = false;
} else {
LOG_ERR("%s: invalid boolean value for KV override '%s'\n", __func__, data);
return false;
}
} else if (strncmp(sep, "str:", 4) == 0) {
sep += 4;
kvo.tag = LLAMA_KV_OVERRIDE_TYPE_STR;
if (strlen(sep) > 127) {
LOG_ERR("%s: malformed KV override '%s', value cannot exceed 127 chars\n", __func__, data);
return false;
}
strncpy(kvo.val_str, sep, 127);
kvo.val_str[127] = '\0';
} else {
LOG_ERR("%s: invalid type for KV override '%s'\n", __func__, data);
return false;
}
overrides.emplace_back(std::move(kvo));
return true;
}
|
O1
|
cpp
|
string_parse_kv_override(char const*, std::vector<llama_model_kv_override, std::allocator<llama_model_kv_override>>&):
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x110, %rsp # imm = 0x110
movq %rsi, %r14
movq %rdi, %rbx
movl $0x3d, %esi
callq 0x19260
testq %rax, %rax
je 0x53bd9
movq %rax, %r15
movq %rax, %r12
subq %rbx, %r12
cmpq $0x80, %r12
jl 0x53c15
leaq 0x9b618(%rip), %rax # 0xef1f8
cmpl $0x0, (%rax)
js 0x53dc1
callq 0x97743
leaq 0x68931(%rip), %rdx # 0xbc526
leaq 0x6894a(%rip), %rcx # 0xbc546
xorl %ebp, %ebp
movq %rax, %rdi
movl $0x4, %esi
movq %rbx, %r8
xorl %eax, %eax
callq 0x977de
jmp 0x53dc3
leaq 0xc(%rsp), %rdi
movq %rbx, %rsi
movq %r12, %rdx
callq 0x19390
movb $0x0, 0xc(%rsp,%r12)
leaq 0x1(%r15), %r12
leaq 0x68929(%rip), %rsi # 0xbc55f
movl $0x4, %edx
movq %r12, %rdi
callq 0x19360
testl %eax, %eax
je 0x53cb8
leaq 0x68916(%rip), %rsi # 0xbc564
movl $0x6, %edx
movq %r12, %rdi
callq 0x19360
testl %eax, %eax
je 0x53cd6
leaq 0x68905(%rip), %rsi # 0xbc56b
movl $0x5, %edx
movq %r12, %rdi
callq 0x19360
testl %eax, %eax
je 0x53d31
leaq 0x6891f(%rip), %rsi # 0xbc5a1
movl $0x4, %edx
movq %r12, %rdi
callq 0x19360
testl %eax, %eax
je 0x53d88
leaq 0x9b55a(%rip), %rax # 0xef1f8
cmpl $0x0, (%rax)
js 0x53dc1
callq 0x97743
leaq 0x68932(%rip), %rdx # 0xbc5e5
jmp 0x53bf5
addq $0x5, %r15
movl $0x0, 0x8(%rsp)
movq %r15, %rdi
callq 0x19810
movq %rax, 0x90(%rsp)
jmp 0x53cf3
addq $0x7, %r15
movl $0x1, 0x8(%rsp)
movq %r15, %rdi
callq 0x19850
movsd %xmm0, 0x90(%rsp)
movq 0x8(%r14), %rax
cmpq 0x10(%r14), %rax
je 0x53d19
leaq 0x8(%rsp), %rsi
movl $0x108, %edx # imm = 0x108
movq %rax, %rdi
callq 0x195a0
addq $0x108, 0x8(%r14) # imm = 0x108
jmp 0x53d29
leaq 0x8(%rsp), %rdx
movq %r14, %rdi
movq %rax, %rsi
callq 0x95284
movb $0x1, %bpl
jmp 0x53dc3
addq $0x6, %r15
movl $0x2, 0x8(%rsp)
leaq 0x5c95c(%rip), %rsi # 0xb06a0
movq %r15, %rdi
callq 0x19960
testl %eax, %eax
je 0x53dd5
leaq 0x5c94a(%rip), %rsi # 0xb06a5
movq %r15, %rdi
callq 0x19960
testl %eax, %eax
je 0x53e03
leaq 0x9b486(%rip), %rax # 0xef1f8
cmpl $0x0, (%rax)
js 0x53dc1
callq 0x97743
leaq 0x687ee(%rip), %rdx # 0xbc571
jmp 0x53bf5
addq $0x5, %r15
movl $0x3, 0x8(%rsp)
movq %r15, %rdi
callq 0x19320
cmpq $0x80, %rax
jb 0x53de2
leaq 0x9b44d(%rip), %rax # 0xef1f8
cmpl $0x0, (%rax)
js 0x53dc1
callq 0x97743
leaq 0x687ea(%rip), %rdx # 0xbc5a6
jmp 0x53bf5
xorl %ebp, %ebp
movl %ebp, %eax
addq $0x110, %rsp # imm = 0x110
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movb $0x1, 0x90(%rsp)
jmp 0x53cf3
leaq 0x90(%rsp), %rbx
movl $0x7f, %edx
movq %rbx, %rdi
movq %r15, %rsi
callq 0x19390
movb $0x0, 0x7f(%rbx)
jmp 0x53cf3
movb $0x0, 0x90(%rsp)
jmp 0x53cf3
|
_Z24string_parse_kv_overridePKcRSt6vectorI23llama_model_kv_overrideSaIS2_EE:
push rbp
push r15
push r14
push r12
push rbx
sub rsp, 110h
mov r14, rsi
mov rbx, rdi
mov esi, 3Dh ; '='
call _strchr
test rax, rax
jz short loc_53BD9
mov r15, rax
mov r12, rax
sub r12, rbx
cmp r12, 80h
jl short loc_53C15
loc_53BD9:
lea rax, common_log_verbosity_thold
cmp dword ptr [rax], 0
js loc_53DC1
call _Z15common_log_mainv; common_log_main(void)
lea rdx, aSMalformedKvOv; "%s: malformed KV override '%s'\n"
loc_53BF5:
lea rcx, aStringParseKvO; "string_parse_kv_override"
xor ebp, ebp
mov rdi, rax
mov esi, 4
mov r8, rbx
xor eax, eax
call _Z14common_log_addP10common_log14ggml_log_levelPKcz; common_log_add(common_log *,ggml_log_level,char const*,...)
jmp loc_53DC3
loc_53C15:
lea rdi, [rsp+138h+var_12C]
mov rsi, rbx
mov rdx, r12
call _strncpy
mov [rsp+r12+138h+var_12C], 0
lea r12, [r15+1]
lea rsi, aInt; "int:"
mov edx, 4
mov rdi, r12
call _strncmp
test eax, eax
jz short loc_53CB8
lea rsi, aFloat; "float:"
mov edx, 6
mov rdi, r12
call _strncmp
test eax, eax
jz short loc_53CD6
lea rsi, aBool; "bool:"
mov edx, 5
mov rdi, r12
call _strncmp
test eax, eax
jz loc_53D31
lea rsi, aStr; "str:"
mov edx, 4
mov rdi, r12
call _strncmp
test eax, eax
jz loc_53D88
lea rax, common_log_verbosity_thold
cmp dword ptr [rax], 0
js loc_53DC1
call _Z15common_log_mainv; common_log_main(void)
lea rdx, aSInvalidTypeFo; "%s: invalid type for KV override '%s'\n"
jmp loc_53BF5
loc_53CB8:
add r15, 5
mov [rsp+138h+var_130], 0
mov rdi, r15
call _atol
mov [rsp+138h+var_A8], rax
jmp short loc_53CF3
loc_53CD6:
add r15, 7
mov [rsp+138h+var_130], 1
mov rdi, r15
call _atof
movsd [rsp+138h+var_A8], xmm0
loc_53CF3:
mov rax, [r14+8]
cmp rax, [r14+10h]
jz short loc_53D19
lea rsi, [rsp+138h+var_130]
mov edx, 108h
mov rdi, rax
call _memcpy
add qword ptr [r14+8], 108h
jmp short loc_53D29
loc_53D19:
lea rdx, [rsp+138h+var_130]
mov rdi, r14
mov rsi, rax
call _ZNSt6vectorI23llama_model_kv_overrideSaIS0_EE17_M_realloc_insertIJS0_EEEvN9__gnu_cxx17__normal_iteratorIPS0_S2_EEDpOT_; std::vector<llama_model_kv_override>::_M_realloc_insert<llama_model_kv_override>(__gnu_cxx::__normal_iterator<llama_model_kv_override*,std::vector<llama_model_kv_override>>,llama_model_kv_override &&)
loc_53D29:
mov bpl, 1
jmp loc_53DC3
loc_53D31:
add r15, 6
mov [rsp+138h+var_130], 2
lea rsi, aTrue; "true"
mov rdi, r15
call _strcmp
test eax, eax
jz loc_53DD5
lea rsi, aFalse; "false"
mov rdi, r15
call _strcmp
test eax, eax
jz loc_53E03
lea rax, common_log_verbosity_thold
cmp dword ptr [rax], 0
js short loc_53DC1
call _Z15common_log_mainv; common_log_main(void)
lea rdx, aSInvalidBoolea; "%s: invalid boolean value for KV overri"...
jmp loc_53BF5
loc_53D88:
add r15, 5
mov [rsp+138h+var_130], 3
mov rdi, r15
call _strlen
cmp rax, 80h
jb short loc_53DE2
lea rax, common_log_verbosity_thold
cmp dword ptr [rax], 0
js short loc_53DC1
call _Z15common_log_mainv; common_log_main(void)
lea rdx, aSMalformedKvOv_0; "%s: malformed KV override '%s', value c"...
jmp loc_53BF5
loc_53DC1:
xor ebp, ebp
loc_53DC3:
mov eax, ebp
add rsp, 110h
pop rbx
pop r12
pop r14
pop r15
pop rbp
retn
loc_53DD5:
mov byte ptr [rsp+138h+var_A8], 1
jmp loc_53CF3
loc_53DE2:
lea rbx, [rsp+138h+var_A8]
mov edx, 7Fh
mov rdi, rbx
mov rsi, r15
call _strncpy
mov byte ptr [rbx+7Fh], 0
jmp loc_53CF3
loc_53E03:
mov byte ptr [rsp+138h+var_A8], 0
jmp loc_53CF3
|
long long string_parse_kv_override(long long a1, long long a2)
{
unsigned int v2; // ebp
long long v3; // rax
long long v4; // r15
long long v5; // r12
int v6; // eax
int v7; // r9d
const char *v8; // rdx
long long v9; // r15
long long v10; // r15
int v12; // [rsp+8h] [rbp-130h] BYREF
_BYTE v13[132]; // [rsp+Ch] [rbp-12Ch] BYREF
long long v14[15]; // [rsp+90h] [rbp-A8h] BYREF
char v15; // [rsp+10Fh] [rbp-29h]
v3 = strchr(a1, 61LL);
if ( !v3 || (v4 = v3, v5 = v3 - a1, v3 - a1 >= 128) )
{
if ( common_log_verbosity_thold >= 0 )
{
v6 = common_log_main();
v8 = "%s: malformed KV override '%s'\n";
LABEL_5:
v2 = 0;
common_log_add(v6, 4, (_DWORD)v8, (unsigned int)"string_parse_kv_override", a1, v7);
return v2;
}
return 0;
}
strncpy(v13, a1, v3 - a1);
v13[v5] = 0;
if ( !(unsigned int)strncmp(v4 + 1, "int:", 4LL) )
{
v12 = 0;
v14[0] = atol(v4 + 5);
}
else if ( !(unsigned int)strncmp(v4 + 1, "float:", 6LL) )
{
v12 = 1;
v14[0] = atof(v4 + 7);
}
else if ( !(unsigned int)strncmp(v4 + 1, "bool:", 5LL) )
{
v9 = v4 + 6;
v12 = 2;
if ( !(unsigned int)strcmp(v9, "true") )
{
LOBYTE(v14[0]) = 1;
}
else
{
if ( (unsigned int)strcmp(v9, "false") )
{
if ( common_log_verbosity_thold >= 0 )
{
v6 = common_log_main();
v8 = "%s: invalid boolean value for KV override '%s'\n";
goto LABEL_5;
}
return 0;
}
LOBYTE(v14[0]) = 0;
}
}
else
{
if ( (unsigned int)strncmp(v4 + 1, "str:", 4LL) )
{
if ( common_log_verbosity_thold >= 0 )
{
v6 = common_log_main();
v8 = "%s: invalid type for KV override '%s'\n";
goto LABEL_5;
}
return 0;
}
v10 = v4 + 5;
v12 = 3;
if ( (unsigned long long)strlen(v10) >= 0x80 )
{
if ( common_log_verbosity_thold >= 0 )
{
v6 = common_log_main();
v8 = "%s: malformed KV override '%s', value cannot exceed 127 chars\n";
goto LABEL_5;
}
return 0;
}
strncpy(v14, v10, 127LL);
v15 = 0;
}
if ( *(_QWORD *)(a2 + 8) == *(_QWORD *)(a2 + 16) )
{
std::vector<llama_model_kv_override>::_M_realloc_insert<llama_model_kv_override>(a2, *(_QWORD *)(a2 + 8), &v12);
}
else
{
memcpy(*(_QWORD *)(a2 + 8), &v12, 264LL);
*(_QWORD *)(a2 + 8) += 264LL;
}
LOBYTE(v2) = 1;
return v2;
}
|
string_parse_kv_override:
PUSH RBP
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
SUB RSP,0x110
MOV R14,RSI
MOV RBX,RDI
MOV ESI,0x3d
CALL 0x00119260
TEST RAX,RAX
JZ 0x00153bd9
MOV R15,RAX
MOV R12,RAX
SUB R12,RBX
CMP R12,0x80
JL 0x00153c15
LAB_00153bd9:
LEA RAX,[0x1ef1f8]
CMP dword ptr [RAX],0x0
JS 0x00153dc1
CALL 0x00197743
LEA RDX,[0x1bc526]
LAB_00153bf5:
LEA RCX,[0x1bc546]
XOR EBP,EBP
MOV RDI,RAX
MOV ESI,0x4
MOV R8,RBX
XOR EAX,EAX
CALL 0x001977de
JMP 0x00153dc3
LAB_00153c15:
LEA RDI,[RSP + 0xc]
MOV RSI,RBX
MOV RDX,R12
CALL 0x00119390
MOV byte ptr [RSP + R12*0x1 + 0xc],0x0
LEA R12,[R15 + 0x1]
LEA RSI,[0x1bc55f]
MOV EDX,0x4
MOV RDI,R12
CALL 0x00119360
TEST EAX,EAX
JZ 0x00153cb8
LEA RSI,[0x1bc564]
MOV EDX,0x6
MOV RDI,R12
CALL 0x00119360
TEST EAX,EAX
JZ 0x00153cd6
LEA RSI,[0x1bc56b]
MOV EDX,0x5
MOV RDI,R12
CALL 0x00119360
TEST EAX,EAX
JZ 0x00153d31
LEA RSI,[0x1bc5a1]
MOV EDX,0x4
MOV RDI,R12
CALL 0x00119360
TEST EAX,EAX
JZ 0x00153d88
LEA RAX,[0x1ef1f8]
CMP dword ptr [RAX],0x0
JS 0x00153dc1
CALL 0x00197743
LEA RDX,[0x1bc5e5]
JMP 0x00153bf5
LAB_00153cb8:
ADD R15,0x5
MOV dword ptr [RSP + 0x8],0x0
MOV RDI,R15
CALL 0x00119810
MOV qword ptr [RSP + 0x90],RAX
JMP 0x00153cf3
LAB_00153cd6:
ADD R15,0x7
MOV dword ptr [RSP + 0x8],0x1
MOV RDI,R15
CALL 0x00119850
MOVSD qword ptr [RSP + 0x90],XMM0
LAB_00153cf3:
MOV RAX,qword ptr [R14 + 0x8]
CMP RAX,qword ptr [R14 + 0x10]
JZ 0x00153d19
LEA RSI,[RSP + 0x8]
MOV EDX,0x108
MOV RDI,RAX
CALL 0x001195a0
ADD qword ptr [R14 + 0x8],0x108
JMP 0x00153d29
LAB_00153d19:
LEA RDX,[RSP + 0x8]
MOV RDI,R14
MOV RSI,RAX
CALL 0x00195284
LAB_00153d29:
MOV BPL,0x1
JMP 0x00153dc3
LAB_00153d31:
ADD R15,0x6
MOV dword ptr [RSP + 0x8],0x2
LEA RSI,[0x1b06a0]
MOV RDI,R15
CALL 0x00119960
TEST EAX,EAX
JZ 0x00153dd5
LEA RSI,[0x1b06a5]
MOV RDI,R15
CALL 0x00119960
TEST EAX,EAX
JZ 0x00153e03
LEA RAX,[0x1ef1f8]
CMP dword ptr [RAX],0x0
JS 0x00153dc1
CALL 0x00197743
LEA RDX,[0x1bc571]
JMP 0x00153bf5
LAB_00153d88:
ADD R15,0x5
MOV dword ptr [RSP + 0x8],0x3
MOV RDI,R15
CALL 0x00119320
CMP RAX,0x80
JC 0x00153de2
LEA RAX,[0x1ef1f8]
CMP dword ptr [RAX],0x0
JS 0x00153dc1
CALL 0x00197743
LEA RDX,[0x1bc5a6]
JMP 0x00153bf5
LAB_00153dc1:
XOR EBP,EBP
LAB_00153dc3:
MOV EAX,EBP
ADD RSP,0x110
POP RBX
POP R12
POP R14
POP R15
POP RBP
RET
LAB_00153dd5:
MOV byte ptr [RSP + 0x90],0x1
JMP 0x00153cf3
LAB_00153de2:
LEA RBX,[RSP + 0x90]
MOV EDX,0x7f
MOV RDI,RBX
MOV RSI,R15
CALL 0x00119390
MOV byte ptr [RBX + 0x7f],0x0
JMP 0x00153cf3
LAB_00153e03:
MOV byte ptr [RSP + 0x90],0x0
JMP 0x00153cf3
|
/* string_parse_kv_override(char const*, std::vector<llama_model_kv_override,
std::allocator<llama_model_kv_override> >&) */
ulong string_parse_kv_override(char *param_1,vector *param_2)
{
char *__s1;
void *__dest;
int iVar1;
char *pcVar2;
int8 uVar3;
int8 unaff_RBP;
ulong uVar4;
size_t sVar5;
int4 local_130;
char local_12c [132];
double local_a8 [15];
int1 local_29;
pcVar2 = strchr(param_1,0x3d);
if ((pcVar2 == (char *)0x0) || (sVar5 = (long)pcVar2 - (long)param_1, 0x7f < (long)sVar5)) {
if (common_log_verbosity_thold < 0) goto LAB_00153dc1;
uVar3 = common_log_main();
pcVar2 = "%s: malformed KV override \'%s\'\n";
goto LAB_00153bf5;
}
strncpy(local_12c,param_1,sVar5);
local_12c[sVar5] = '\0';
__s1 = pcVar2 + 1;
iVar1 = strncmp(__s1,"int:",4);
if (iVar1 == 0) {
local_130 = 0;
local_a8[0] = (double)atol(pcVar2 + 5);
}
else {
iVar1 = strncmp(__s1,"float:",6);
if (iVar1 == 0) {
local_130 = 1;
local_a8[0] = atof(pcVar2 + 7);
}
else {
iVar1 = strncmp(__s1,"bool:",5);
if (iVar1 != 0) {
iVar1 = strncmp(__s1,"str:",4);
if (iVar1 == 0) {
local_130 = 3;
sVar5 = strlen(pcVar2 + 5);
if (sVar5 < 0x80) {
strncpy((char *)local_a8,pcVar2 + 5,0x7f);
local_29 = 0;
goto LAB_00153cf3;
}
if (common_log_verbosity_thold < 0) goto LAB_00153dc1;
uVar3 = common_log_main();
pcVar2 = "%s: malformed KV override \'%s\', value cannot exceed 127 chars\n";
}
else {
if (common_log_verbosity_thold < 0) {
LAB_00153dc1:
uVar4 = 0;
goto LAB_00153dc3;
}
uVar3 = common_log_main();
pcVar2 = "%s: invalid type for KV override \'%s\'\n";
}
LAB_00153bf5:
uVar4 = 0;
common_log_add(uVar3,4,pcVar2,"string_parse_kv_override",param_1);
goto LAB_00153dc3;
}
local_130 = 2;
iVar1 = strcmp(pcVar2 + 6,"true");
if (iVar1 == 0) {
local_a8[0] = (double)CONCAT71(local_a8[0]._1_7_,1);
}
else {
iVar1 = strcmp(pcVar2 + 6,"false");
if (iVar1 != 0) {
if (common_log_verbosity_thold < 0) goto LAB_00153dc1;
uVar3 = common_log_main();
pcVar2 = "%s: invalid boolean value for KV override \'%s\'\n";
goto LAB_00153bf5;
}
local_a8[0] = (double)((ulong)local_a8[0] & 0xffffffffffffff00);
}
}
}
LAB_00153cf3:
__dest = *(void **)(param_2 + 8);
if (__dest == *(void **)(param_2 + 0x10)) {
std::vector<llama_model_kv_override,std::allocator<llama_model_kv_override>>::
_M_realloc_insert<llama_model_kv_override>
((vector<llama_model_kv_override,std::allocator<llama_model_kv_override>> *)param_2,
__dest,&local_130);
}
else {
memcpy(__dest,&local_130,0x108);
*(long *)(param_2 + 8) = *(long *)(param_2 + 8) + 0x108;
}
uVar4 = CONCAT71((int7)((ulong)unaff_RBP >> 8),1);
LAB_00153dc3:
return uVar4 & 0xffffffff;
}
|
|
8,979 |
string_repeat(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, unsigned long)
|
llama.cpp/common/common.cpp
|
std::string string_repeat(const std::string & str, size_t n) {
if (n == 0) {
return "";
}
std::string result;
result.reserve(str.length() * n);
for (size_t i = 0; i < n; ++i) {
result += str;
}
return result;
}
|
O3
|
cpp
|
string_repeat(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, unsigned long):
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0x10(%rdi), %r12
movq %r12, (%rdi)
testq %rdx, %rdx
je 0xb1b78
movq %rdx, %r14
movq %rsi, %r15
movq $0x0, 0x8(%rbx)
movb $0x0, 0x10(%rbx)
movq 0x8(%rsi), %rsi
imulq %rdx, %rsi
movq %rbx, %rdi
callq 0x1dbc0
movq (%r15), %rsi
movq 0x8(%r15), %rdx
movq %rbx, %rdi
callq 0x1d470
decq %r14
jne 0xb1b62
jmp 0xb1b8a
leaq 0x20a11(%rip), %rdx # 0xd2590
movq %rbx, %rdi
movq %rdx, %rsi
callq 0x237c2
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
jmp 0xb1b9b
movq %rax, %r14
movq (%rbx), %rdi
cmpq %r12, %rdi
je 0xb1bb2
movq (%r12), %rsi
incq %rsi
callq 0x1d160
movq %r14, %rdi
callq 0x1d8e0
|
_Z13string_repeatRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEm:
push r15
push r14
push r12
push rbx
push rax
mov rbx, rdi
lea r12, [rdi+10h]
mov [rdi], r12
test rdx, rdx
jz short loc_B1B78
mov r14, rdx
mov r15, rsi
mov qword ptr [rbx+8], 0
mov byte ptr [rbx+10h], 0
mov rsi, [rsi+8]
imul rsi, rdx
mov rdi, rbx
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7reserveEm; std::string::reserve(ulong)
loc_B1B62:
mov rsi, [r15]
mov rdx, [r15+8]
mov rdi, rbx
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendEPKcm; std::string::append(char const*,ulong)
dec r14
jnz short loc_B1B62
jmp short loc_B1B8A
loc_B1B78:
lea rdx, aExampleToolCal+1Dh; ""
mov rdi, rbx
mov rsi, rdx
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag; std::string::_M_construct<char const*>(char const*,char const*,std::forward_iterator_tag)
loc_B1B8A:
mov rax, rbx
add rsp, 8
pop rbx
pop r12
pop r14
pop r15
retn
jmp short $+2
loc_B1B9B:
mov r14, rax
mov rdi, [rbx]; void *
cmp rdi, r12
jz short loc_B1BB2
mov rsi, [r12]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_B1BB2:
mov rdi, r14
call __Unwind_Resume
|
long long string_repeat(long long a1, _QWORD *a2, long long a3)
{
long long v3; // r14
*(_QWORD *)a1 = a1 + 16;
if ( a3 )
{
v3 = a3;
*(_QWORD *)(a1 + 8) = 0LL;
*(_BYTE *)(a1 + 16) = 0;
std::string::reserve(a1, a3 * a2[1]);
do
{
std::string::append(a1, *a2, a2[1]);
--v3;
}
while ( v3 );
}
else
{
std::string::_M_construct<char const*>(a1, "", (long long)"");
}
return a1;
}
|
string_repeat:
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
PUSH RAX
MOV RBX,RDI
LEA R12,[RDI + 0x10]
MOV qword ptr [RDI],R12
TEST RDX,RDX
JZ 0x001b1b78
MOV R14,RDX
MOV R15,RSI
MOV qword ptr [RBX + 0x8],0x0
MOV byte ptr [RBX + 0x10],0x0
MOV RSI,qword ptr [RSI + 0x8]
IMUL RSI,RDX
LAB_001b1b5a:
MOV RDI,RBX
CALL 0x0011dbc0
LAB_001b1b62:
MOV RSI,qword ptr [R15]
MOV RDX,qword ptr [R15 + 0x8]
LAB_001b1b69:
MOV RDI,RBX
CALL 0x0011d470
LAB_001b1b71:
DEC R14
JNZ 0x001b1b62
JMP 0x001b1b8a
LAB_001b1b78:
LEA RDX,[0x1d2590]
MOV RDI,RBX
MOV RSI,RDX
CALL 0x001237c2
LAB_001b1b8a:
MOV RAX,RBX
ADD RSP,0x8
POP RBX
POP R12
POP R14
POP R15
RET
|
/* string_repeat(std::__cxx11::string const&, unsigned long) */
string * string_repeat(string *param_1,ulong param_2)
{
long in_RDX;
*(string **)param_1 = param_1 + 0x10;
if (in_RDX == 0) {
std::__cxx11::string::_M_construct<char_const*>(param_1,"");
}
else {
*(int8 *)(param_1 + 8) = 0;
param_1[0x10] = (string)0x0;
/* try { // try from 001b1b5a to 001b1b61 has its CatchHandler @ 001b1b99 */
std::__cxx11::string::reserve((ulong)param_1);
do {
/* try { // try from 001b1b69 to 001b1b70 has its CatchHandler @ 001b1b9b */
std::__cxx11::string::append((char *)param_1,*(ulong *)param_2);
in_RDX = in_RDX + -1;
} while (in_RDX != 0);
}
return param_1;
}
|
|
8,980 |
nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<std::map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>::operator->() const
|
zkingston[P]unknot/build_O1/_deps/json-src/include/nlohmann/detail/iterators/iter_impl.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));
}
}
}
|
O1
|
cpp
|
nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<std::map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>::operator->() const:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x28, %rsp
movq %rdi, %r14
movq (%rdi), %rax
movzbl (%rax), %ecx
cmpl $0x2, %ecx
je 0x35749
cmpl $0x1, %ecx
jne 0x3574f
movq 0x8(%r14), %rax
addq $0x40, %rax
jmp 0x35756
movq 0x10(%r14), %rax
jmp 0x35756
cmpq $0x0, 0x18(%r14)
jne 0x35761
addq $0x28, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movl $0x20, %edi
callq 0xf4f0
movq %rax, %rbx
leaq 0x18(%rsp), %r15
movq %r15, -0x10(%r15)
leaq 0x25ba19(%rip), %rsi # 0x291197
leaq 0x25ba22(%rip), %rdx # 0x2911a7
leaq 0x8(%rsp), %rdi
callq 0x1a83c
movq (%r14), %rcx
movb $0x1, %bpl
leaq 0x8(%rsp), %rdx
movq %rbx, %rdi
movl $0xd6, %esi
callq 0x35a60
xorl %ebp, %ebp
leaq 0x2fe350(%rip), %rsi # 0x333b00
leaq -0x2345(%rip), %rdx # 0x33472
movq %rbx, %rdi
callq 0x10170
movq %rax, %r14
movq 0x8(%rsp), %rdi
cmpq %r15, %rdi
je 0x357e1
movq 0x18(%rsp), %rsi
incq %rsi
callq 0xfa70
jmp 0x357e1
movq %rax, %r14
movb $0x1, %bpl
testb %bpl, %bpl
je 0x357ee
movq %rbx, %rdi
callq 0xf6f0
movq %r14, %rdi
callq 0x101c0
|
_ZNK8nlohmann16json_abi_v3_11_36detail9iter_implINS0_10basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEEptEv:
push rbp; char
push r15; int
push r14; __int64
push rbx; int
sub rsp, 28h
mov r14, rdi
mov rax, [rdi]
movzx ecx, byte ptr [rax]
cmp ecx, 2
jz short loc_35749
cmp ecx, 1
jnz short loc_3574F
mov rax, [r14+8]
add rax, 40h ; '@'
jmp short loc_35756
loc_35749:
mov rax, [r14+10h]
jmp short loc_35756
loc_3574F:
cmp qword ptr [r14+18h], 0
jnz short loc_35761
loc_35756:
add rsp, 28h
pop rbx
pop r14
pop r15
pop rbp
retn
loc_35761:
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_jsonISt3mapSt6vectorNSt7__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
mov r14, rax
mov rdi, [rsp+48h+var_40]; void *
cmp rdi, r15
jz short loc_357E1
mov rsi, [rsp+48h+var_30]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_357E1
mov r14, rax
mov bpl, 1
loc_357E1:
test bpl, bpl
jz short loc_357EE
mov rdi, rbx; void *
call ___cxa_free_exception
loc_357EE:
mov rdi, r14
call __Unwind_Resume
|
operator->:
PUSH RBP
PUSH R15
PUSH R14
PUSH RBX
SUB RSP,0x28
MOV R14,RDI
MOV RAX,qword ptr [RDI]
MOVZX ECX,byte ptr [RAX]
CMP ECX,0x2
JZ 0x00135749
CMP ECX,0x1
JNZ 0x0013574f
MOV RAX,qword ptr [R14 + 0x8]
ADD RAX,0x40
JMP 0x00135756
LAB_00135749:
MOV RAX,qword ptr [R14 + 0x10]
JMP 0x00135756
LAB_0013574f:
CMP qword ptr [R14 + 0x18],0x0
JNZ 0x00135761
LAB_00135756:
ADD RSP,0x28
POP RBX
POP R14
POP R15
POP RBP
RET
LAB_00135761:
MOV EDI,0x20
CALL 0x0010f4f0
MOV RBX,RAX
LEA R15,[RSP + 0x18]
MOV qword ptr [R15 + -0x10],R15
LAB_00135777:
LEA RSI,[0x391197]
LEA RDX,[0x3911a7]
LEA RDI,[RSP + 0x8]
CALL 0x0011a83c
MOV RCX,qword ptr [R14]
MOV BPL,0x1
LAB_00135795:
LEA RDX,[RSP + 0x8]
MOV RDI,RBX
MOV ESI,0xd6
CALL 0x00135a60
XOR EBP,EBP
LEA RSI,[0x433b00]
LEA RDX,[0x133472]
MOV RDI,RBX
CALL 0x00110170
|
/* nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<std::map,
std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void> >::TEMPNAMEPLACEHOLDERVALUE() const */
char * __thiscall
nlohmann::json_abi_v3_11_3::detail::
iter_impl<nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>
::operator->(iter_impl<nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>
*this)
{
char *pcVar1;
int8 uVar2;
int1 *local_40 [2];
int1 local_30 [16];
pcVar1 = *(char **)this;
if (*pcVar1 == '\x02') {
pcVar1 = *(char **)(this + 0x10);
}
else if (*pcVar1 == '\x01') {
pcVar1 = (char *)(*(long *)(this + 8) + 0x40);
}
else if (*(long *)(this + 0x18) != 0) {
uVar2 = __cxa_allocate_exception(0x20);
local_40[0] = local_30;
/* try { // try from 00135777 to 0013578e has its CatchHandler @ 001357db */
std::__cxx11::string::_M_construct<char_const*>(local_40,"cannot get value","");
/* try { // try from 00135795 to 001357be has its CatchHandler @ 001357bf */
_ZN8nlohmann16json_abi_v3_11_36detail16invalid_iterator6createIPNS0_10basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_
(uVar2,0xd6,local_40,*(int8 *)this);
/* WARNING: Subroutine does not return */
__cxa_throw(uVar2,&invalid_iterator::typeinfo,exception::~exception);
}
return pcVar1;
}
|
||
8,981 |
my_stat
|
eloqsql/mysys/my_lib.c
|
MY_STAT *my_stat(const char *path, MY_STAT *stat_area, myf my_flags)
{
int m_used;
DBUG_ENTER("my_stat");
DBUG_PRINT("my", ("path: '%s' stat_area: %p MyFlags: %lu", path,
stat_area, my_flags));
if ((m_used= (stat_area == NULL)))
if (!(stat_area= (MY_STAT *) my_malloc(key_memory_MY_STAT, sizeof(MY_STAT),
my_flags)))
goto error;
#ifndef _WIN32
if (!stat((char *) path, (struct stat *) stat_area))
{
MSAN_STAT_WORKAROUND(stat_area);
DBUG_RETURN(stat_area);
}
#else
if (!my_win_stat(path, stat_area))
DBUG_RETURN(stat_area);
#endif
DBUG_PRINT("error",("Got errno: %d from stat", errno));
my_errno= errno;
if (m_used) /* Free if new area */
my_free(stat_area);
error:
if (my_flags & (MY_FAE+MY_WME))
{
my_error(EE_STAT, MYF(ME_BELL), path, my_errno);
DBUG_RETURN((MY_STAT *) NULL);
}
DBUG_RETURN((MY_STAT *) NULL);
}
|
O0
|
c
|
my_stat:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
jmp 0x2fb66
cmpq $0x0, -0x18(%rbp)
sete %al
movb %al, %cl
andb $0x1, %cl
movzbl %cl, %ecx
movl %ecx, -0x24(%rbp)
testb $0x1, %al
jne 0x2fb7f
jmp 0x2fba4
leaq 0x357782(%rip), %rax # 0x387308
movl (%rax), %edi
movq -0x20(%rbp), %rdx
movl $0x90, %esi
callq 0x2fcf0
movq %rax, -0x18(%rbp)
cmpq $0x0, %rax
jne 0x2fba2
jmp 0x2fbeb
jmp 0x2fba4
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x24520
cmpl $0x0, %eax
jne 0x2fbc2
jmp 0x2fbb8
movq -0x18(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x2fc31
jmp 0x2fbc4
jmp 0x2fbc6
callq 0x24050
movl (%rax), %eax
movl %eax, -0x28(%rbp)
callq 0x27070
movl -0x28(%rbp), %ecx
movl %ecx, (%rax)
cmpl $0x0, -0x24(%rbp)
je 0x2fbe9
movq -0x18(%rbp), %rdi
callq 0x30070
jmp 0x2fbeb
movq -0x20(%rbp), %rax
andq $0x18, %rax
cmpq $0x0, %rax
je 0x2fc27
movq -0x10(%rbp), %rax
movq %rax, -0x30(%rbp)
callq 0x27070
movq -0x30(%rbp), %rdx
movl (%rax), %ecx
movl $0xd, %edi
movl $0x4, %esi
movb $0x0, %al
callq 0x2ed80
movq $0x0, -0x8(%rbp)
jmp 0x2fc31
jmp 0x2fc29
movq $0x0, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax,%rax)
|
my_stat:
push rbp
mov rbp, rsp
sub rsp, 30h
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov [rbp+var_20], rdx
jmp short $+2
loc_2FB66:
cmp [rbp+var_18], 0
setz al
mov cl, al
and cl, 1
movzx ecx, cl
mov [rbp+var_24], ecx
test al, 1
jnz short loc_2FB7F
jmp short loc_2FBA4
loc_2FB7F:
lea rax, key_memory_MY_STAT
mov edi, [rax]
mov rdx, [rbp+var_20]
mov esi, 90h
call my_malloc
mov [rbp+var_18], rax
cmp rax, 0
jnz short loc_2FBA2
jmp short loc_2FBEB
loc_2FBA2:
jmp short $+2
loc_2FBA4:
mov rdi, [rbp+var_10]
mov rsi, [rbp+var_18]
call _stat64
cmp eax, 0
jnz short loc_2FBC2
jmp short $+2
loc_2FBB8:
mov rax, [rbp+var_18]
mov [rbp+var_8], rax
jmp short loc_2FC31
loc_2FBC2:
jmp short $+2
loc_2FBC4:
jmp short $+2
loc_2FBC6:
call ___errno_location
mov eax, [rax]
mov [rbp+var_28], eax
call _my_thread_var
mov ecx, [rbp+var_28]
mov [rax], ecx
cmp [rbp+var_24], 0
jz short loc_2FBE9
mov rdi, [rbp+var_18]
call my_free
loc_2FBE9:
jmp short $+2
loc_2FBEB:
mov rax, [rbp+var_20]
and rax, 18h
cmp rax, 0
jz short loc_2FC27
mov rax, [rbp+var_10]
mov [rbp+var_30], rax
call _my_thread_var
mov rdx, [rbp+var_30]
mov ecx, [rax]
mov edi, 0Dh
mov esi, 4
mov al, 0
call my_error
mov [rbp+var_8], 0
jmp short loc_2FC31
loc_2FC27:
jmp short $+2
loc_2FC29:
mov [rbp+var_8], 0
loc_2FC31:
mov rax, [rbp+var_8]
add rsp, 30h
pop rbp
retn
|
long long my_stat(long long a1, long long a2, long long a3)
{
unsigned int *v3; // rax
int v5; // [rsp+8h] [rbp-28h]
char v6; // [rsp+10h] [rbp-20h]
long long v7; // [rsp+18h] [rbp-18h]
v7 = a2;
v6 = a3;
if ( a2 || (v7 = my_malloc(key_memory_MY_STAT, 144LL, a3)) != 0 )
{
if ( !(unsigned int)stat64(a1, v7) )
return v7;
v5 = *(_DWORD *)__errno_location();
*(_DWORD *)my_thread_var() = v5;
if ( !a2 )
my_free(v7);
}
if ( (v6 & 0x18) != 0 )
{
v3 = (unsigned int *)my_thread_var();
my_error(0xDu, 4LL, a1, *v3);
}
return 0LL;
}
|
my_stat:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x30
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x18],RSI
MOV qword ptr [RBP + -0x20],RDX
JMP 0x0012fb66
LAB_0012fb66:
CMP qword ptr [RBP + -0x18],0x0
SETZ AL
MOV CL,AL
AND CL,0x1
MOVZX ECX,CL
MOV dword ptr [RBP + -0x24],ECX
TEST AL,0x1
JNZ 0x0012fb7f
JMP 0x0012fba4
LAB_0012fb7f:
LEA RAX,[0x487308]
MOV EDI,dword ptr [RAX]
MOV RDX,qword ptr [RBP + -0x20]
MOV ESI,0x90
CALL 0x0012fcf0
MOV qword ptr [RBP + -0x18],RAX
CMP RAX,0x0
JNZ 0x0012fba2
JMP 0x0012fbeb
LAB_0012fba2:
JMP 0x0012fba4
LAB_0012fba4:
MOV RDI,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RBP + -0x18]
CALL 0x00124520
CMP EAX,0x0
JNZ 0x0012fbc2
JMP 0x0012fbb8
LAB_0012fbb8:
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RBP + -0x8],RAX
JMP 0x0012fc31
LAB_0012fbc2:
JMP 0x0012fbc4
LAB_0012fbc4:
JMP 0x0012fbc6
LAB_0012fbc6:
CALL 0x00124050
MOV EAX,dword ptr [RAX]
MOV dword ptr [RBP + -0x28],EAX
CALL 0x00127070
MOV ECX,dword ptr [RBP + -0x28]
MOV dword ptr [RAX],ECX
CMP dword ptr [RBP + -0x24],0x0
JZ 0x0012fbe9
MOV RDI,qword ptr [RBP + -0x18]
CALL 0x00130070
LAB_0012fbe9:
JMP 0x0012fbeb
LAB_0012fbeb:
MOV RAX,qword ptr [RBP + -0x20]
AND RAX,0x18
CMP RAX,0x0
JZ 0x0012fc27
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RBP + -0x30],RAX
CALL 0x00127070
MOV RDX,qword ptr [RBP + -0x30]
MOV ECX,dword ptr [RAX]
MOV EDI,0xd
MOV ESI,0x4
MOV AL,0x0
CALL 0x0012ed80
MOV qword ptr [RBP + -0x8],0x0
JMP 0x0012fc31
LAB_0012fc27:
JMP 0x0012fc29
LAB_0012fc29:
MOV qword ptr [RBP + -0x8],0x0
LAB_0012fc31:
MOV RAX,qword ptr [RBP + -0x8]
ADD RSP,0x30
POP RBP
RET
|
stat64 * my_stat(char *param_1,stat64 *param_2,ulong param_3)
{
int iVar1;
int *piVar2;
int4 *puVar3;
stat64 *local_20;
local_20 = param_2;
if ((param_2 != (stat64 *)0x0) ||
(local_20 = (stat64 *)my_malloc(key_memory_MY_STAT,0x90,param_3), local_20 != (stat64 *)0x0)) {
iVar1 = stat64(param_1,local_20);
if (iVar1 == 0) {
return local_20;
}
piVar2 = __errno_location();
iVar1 = *piVar2;
piVar2 = (int *)_my_thread_var();
*piVar2 = iVar1;
if (param_2 == (stat64 *)0x0) {
my_free(local_20);
}
}
if ((param_3 & 0x18) != 0) {
puVar3 = (int4 *)_my_thread_var();
my_error(0xd,4,param_1,*puVar3);
}
return (stat64 *)0x0;
}
|
|
8,982 |
my_error_unregister_all
|
eloqsql/mysys/my_error.c
|
void my_error_unregister_all(void)
{
struct my_err_head *cursor, *saved_next;
for (cursor= my_errmsgs_globerrs.meh_next; cursor != NULL; cursor= saved_next)
{
/* We need this ptr, but we're about to free its container, so save it. */
saved_next= cursor->meh_next;
my_free(cursor);
}
my_errmsgs_globerrs.meh_next= NULL; /* Freed in first iteration above. */
my_errmsgs_list= &my_errmsgs_globerrs;
}
|
O0
|
c
|
my_error_unregister_all:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq 0x1af1d1(%rip), %rax # 0x1e12d0
movq %rax, -0x8(%rbp)
cmpq $0x0, -0x8(%rbp)
je 0x32128
movq -0x8(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x10(%rbp)
movq -0x8(%rbp), %rdi
callq 0x371e0
movq -0x10(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x32103
movq $0x0, 0x1af19d(%rip) # 0x1e12d0
leaq 0x1af196(%rip), %rax # 0x1e12d0
movq %rax, 0x1af187(%rip) # 0x1e12c8
addq $0x10, %rsp
popq %rbp
retq
nopw (%rax,%rax)
|
my_error_unregister_all:
push rbp
mov rbp, rsp
sub rsp, 10h
mov rax, cs:my_errmsgs_globerrs
mov [rbp+var_8], rax
loc_32103:
cmp [rbp+var_8], 0
jz short loc_32128
mov rax, [rbp+var_8]
mov rax, [rax]
mov [rbp+var_10], rax
mov rdi, [rbp+var_8]
call my_free
mov rax, [rbp+var_10]
mov [rbp+var_8], rax
jmp short loc_32103
loc_32128:
mov cs:my_errmsgs_globerrs, 0
lea rax, my_errmsgs_globerrs
mov cs:my_errmsgs_list, rax
add rsp, 10h
pop rbp
retn
|
long long *my_error_unregister_all()
{
long long *result; // rax
_QWORD *v1; // [rsp+0h] [rbp-10h]
_QWORD *i; // [rsp+8h] [rbp-8h]
for ( i = (_QWORD *)my_errmsgs_globerrs; i; i = v1 )
{
v1 = (_QWORD *)*i;
my_free(i);
}
my_errmsgs_globerrs = 0LL;
result = &my_errmsgs_globerrs;
my_errmsgs_list = &my_errmsgs_globerrs;
return result;
}
|
my_error_unregister_all:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x10
MOV RAX,qword ptr [0x002e12d0]
MOV qword ptr [RBP + -0x8],RAX
LAB_00132103:
CMP qword ptr [RBP + -0x8],0x0
JZ 0x00132128
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x10],RAX
MOV RDI,qword ptr [RBP + -0x8]
CALL 0x001371e0
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RBP + -0x8],RAX
JMP 0x00132103
LAB_00132128:
MOV qword ptr [0x002e12d0],0x0
LEA RAX,[0x2e12d0]
MOV qword ptr [0x002e12c8],RAX
ADD RSP,0x10
POP RBP
RET
|
void my_error_unregister_all(void)
{
int8 *puVar1;
int8 *local_10;
local_10 = my_errmsgs_globerrs;
while (local_10 != (int8 *)0x0) {
puVar1 = (int8 *)*local_10;
my_free(local_10);
local_10 = puVar1;
}
my_errmsgs_globerrs = (int8 *)0x0;
my_errmsgs_list = (int *)&my_errmsgs_globerrs;
return;
}
|
|
8,983 |
stbi__grow_buffer_unsafe(stbi__jpeg*)
|
llama.cpp/examples/llava/../../common/stb_image.h
|
static void stbi__grow_buffer_unsafe(stbi__jpeg *j)
{
do {
unsigned int b = j->nomore ? 0 : stbi__get8(j->s);
if (b == 0xff) {
int c = stbi__get8(j->s);
while (c == 0xff) c = stbi__get8(j->s); // consume fill bytes
if (c != 0) {
j->marker = (unsigned char) c;
j->nomore = 1;
return;
}
}
j->code_buffer |= b << (24 - j->code_bits);
j->code_bits += 8;
} while (j->code_bits <= 24);
}
|
O3
|
c
|
stbi__grow_buffer_unsafe(stbi__jpeg*):
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
cmpl $0x0, 0x482c(%rbx)
je 0x3502a
xorl %eax, %eax
jmp 0x350d3
movq (%rbx), %r14
movq 0xc0(%r14), %rax
cmpq 0xc8(%r14), %rax
jb 0x35053
cmpl $0x0, 0x30(%r14)
je 0x35023
movq %r14, %rdi
callq 0x2f0a9
movq 0xc0(%r14), %rax
leaq 0x1(%rax), %rcx
movq %rcx, 0xc0(%r14)
movb (%rax), %al
cmpb $-0x1, %al
jne 0x350d3
movq (%rbx), %r14
leaq 0xc0(%r14), %r15
movq 0xc0(%r14), %rax
cmpq 0xc8(%r14), %rax
jb 0x35089
cmpl $0x0, 0x30(%r14)
jne 0x350b9
xorl %eax, %eax
jmp 0x35092
leaq 0x1(%rax), %rcx
movq %rcx, (%r15)
movb (%rax), %al
cmpb $-0x1, %al
jne 0x350ca
movq (%rbx), %r14
movq 0xc0(%r14), %rax
cmpq 0xc8(%r14), %rax
jb 0x350fc
xorl %eax, %eax
cmpl $0x0, 0x30(%r14)
je 0x35092
leaq 0xc0(%r14), %r15
movq %r14, %rdi
callq 0x2f0a9
movq 0xc0(%r14), %rax
jmp 0x35089
movzbl %al, %ecx
testl %ecx, %ecx
jne 0x35108
movb $-0x1, %al
movzbl %al, %eax
movl 0x4824(%rbx), %edx
movb $0x18, %cl
subb %dl, %cl
shll %cl, %eax
orl %eax, 0x4820(%rbx)
leal 0x8(%rdx), %eax
movl %eax, 0x4824(%rbx)
cmpl $0x11, %edx
jl 0x3501a
jmp 0x35118
addq $0xc0, %r14
movq %r14, %r15
jmp 0x35089
movb %al, 0x4828(%rbx)
movl $0x1, 0x482c(%rbx)
popq %rbx
popq %r14
popq %r15
retq
|
_ZL24stbi__grow_buffer_unsafeP10stbi__jpeg:
push r15
push r14
push rbx
mov rbx, rdi
loc_3501A:
cmp dword ptr [rbx+482Ch], 0
jz short loc_3502A
loc_35023:
xor eax, eax
jmp loc_350D3
loc_3502A:
mov r14, [rbx]
mov rax, [r14+0C0h]
cmp rax, [r14+0C8h]
jb short loc_35053
cmp dword ptr [r14+30h], 0
jz short loc_35023
mov rdi, r14
call _ZL19stbi__refill_bufferP13stbi__context; stbi__refill_buffer(stbi__context *)
mov rax, [r14+0C0h]
loc_35053:
lea rcx, [rax+1]
mov [r14+0C0h], rcx
mov al, [rax]
cmp al, 0FFh
jnz short loc_350D3
mov r14, [rbx]
lea r15, [r14+0C0h]
mov rax, [r14+0C0h]
cmp rax, [r14+0C8h]
jb short loc_35089
cmp dword ptr [r14+30h], 0
jnz short loc_350B9
xor eax, eax
jmp short loc_35092
loc_35089:
lea rcx, [rax+1]
mov [r15], rcx
mov al, [rax]
loc_35092:
cmp al, 0FFh
jnz short loc_350CA
mov r14, [rbx]
mov rax, [r14+0C0h]
cmp rax, [r14+0C8h]
jb short loc_350FC
xor eax, eax
cmp dword ptr [r14+30h], 0
jz short loc_35092
lea r15, [r14+0C0h]
loc_350B9:
mov rdi, r14
call _ZL19stbi__refill_bufferP13stbi__context; stbi__refill_buffer(stbi__context *)
mov rax, [r14+0C0h]
jmp short loc_35089
loc_350CA:
movzx ecx, al
test ecx, ecx
jnz short loc_35108
mov al, 0FFh
loc_350D3:
movzx eax, al
mov edx, [rbx+4824h]
mov cl, 18h
sub cl, dl
shl eax, cl
or [rbx+4820h], eax
lea eax, [rdx+8]
mov [rbx+4824h], eax
cmp edx, 11h
jl loc_3501A
jmp short loc_35118
loc_350FC:
add r14, 0C0h
mov r15, r14
jmp short loc_35089
loc_35108:
mov [rbx+4828h], al
mov dword ptr [rbx+482Ch], 1
loc_35118:
pop rbx
pop r14
pop r15
retn
|
char stbi__grow_buffer_unsafe(_DWORD *a1)
{
unsigned __int8 v1; // al
long long v2; // r14
unsigned __int8 *v3; // rax
long long v4; // r14
char **v5; // r15
char *v6; // rax
char result; // al
int v8; // edx
while ( 1 )
{
if ( !a1[4619] )
{
v2 = *(_QWORD *)a1;
v3 = *(unsigned __int8 **)(*(_QWORD *)a1 + 192LL);
if ( (unsigned long long)v3 < *(_QWORD *)(*(_QWORD *)a1 + 200LL) )
goto LABEL_6;
if ( *(_DWORD *)(v2 + 48) )
break;
}
v1 = 0;
LABEL_18:
v8 = a1[4617];
a1[4616] |= v1 << (24 - v8);
result = v8 + 8;
a1[4617] = v8 + 8;
if ( v8 >= 17 )
return result;
}
stbi__refill_buffer(*(_QWORD *)a1);
v3 = *(unsigned __int8 **)(v2 + 192);
LABEL_6:
*(_QWORD *)(v2 + 192) = v3 + 1;
v1 = *v3;
if ( v1 != 0xFF )
goto LABEL_18;
v4 = *(_QWORD *)a1;
v5 = (char **)(*(_QWORD *)a1 + 192LL);
v6 = *v5;
if ( (unsigned long long)*v5 >= *(_QWORD *)(*(_QWORD *)a1 + 200LL) )
{
if ( !*(_DWORD *)(v4 + 48) )
{
result = 0;
goto LABEL_11;
}
LABEL_15:
stbi__refill_buffer(v4);
v6 = *(char **)(v4 + 192);
}
LABEL_10:
*v5 = v6 + 1;
result = *v6;
LABEL_11:
while ( result == -1 )
{
v4 = *(_QWORD *)a1;
v6 = *(char **)(*(_QWORD *)a1 + 192LL);
if ( (unsigned long long)v6 < *(_QWORD *)(*(_QWORD *)a1 + 200LL) )
{
v5 = (char **)(v4 + 192);
goto LABEL_10;
}
result = 0;
if ( *(_DWORD *)(v4 + 48) )
{
v5 = (char **)(v4 + 192);
goto LABEL_15;
}
}
if ( !result )
{
v1 = -1;
goto LABEL_18;
}
*((_BYTE *)a1 + 18472) = result;
a1[4619] = 1;
return result;
}
|
stbi__grow_buffer_unsafe:
PUSH R15
PUSH R14
PUSH RBX
MOV RBX,RDI
LAB_0013501a:
CMP dword ptr [RBX + 0x482c],0x0
JZ 0x0013502a
LAB_00135023:
XOR EAX,EAX
JMP 0x001350d3
LAB_0013502a:
MOV R14,qword ptr [RBX]
MOV RAX,qword ptr [R14 + 0xc0]
CMP RAX,qword ptr [R14 + 0xc8]
JC 0x00135053
CMP dword ptr [R14 + 0x30],0x0
JZ 0x00135023
MOV RDI,R14
CALL 0x0012f0a9
MOV RAX,qword ptr [R14 + 0xc0]
LAB_00135053:
LEA RCX,[RAX + 0x1]
MOV qword ptr [R14 + 0xc0],RCX
MOV AL,byte ptr [RAX]
CMP AL,0xff
JNZ 0x001350d3
MOV R14,qword ptr [RBX]
LEA R15,[R14 + 0xc0]
MOV RAX,qword ptr [R14 + 0xc0]
CMP RAX,qword ptr [R14 + 0xc8]
JC 0x00135089
CMP dword ptr [R14 + 0x30],0x0
JNZ 0x001350b9
XOR EAX,EAX
JMP 0x00135092
LAB_00135089:
LEA RCX,[RAX + 0x1]
MOV qword ptr [R15],RCX
MOV AL,byte ptr [RAX]
LAB_00135092:
CMP AL,0xff
JNZ 0x001350ca
MOV R14,qword ptr [RBX]
MOV RAX,qword ptr [R14 + 0xc0]
CMP RAX,qword ptr [R14 + 0xc8]
JC 0x001350fc
XOR EAX,EAX
CMP dword ptr [R14 + 0x30],0x0
JZ 0x00135092
LEA R15,[R14 + 0xc0]
LAB_001350b9:
MOV RDI,R14
CALL 0x0012f0a9
MOV RAX,qword ptr [R14 + 0xc0]
JMP 0x00135089
LAB_001350ca:
MOVZX ECX,AL
TEST ECX,ECX
JNZ 0x00135108
MOV AL,0xff
LAB_001350d3:
MOVZX EAX,AL
MOV EDX,dword ptr [RBX + 0x4824]
MOV CL,0x18
SUB CL,DL
SHL EAX,CL
OR dword ptr [RBX + 0x4820],EAX
LEA EAX,[RDX + 0x8]
MOV dword ptr [RBX + 0x4824],EAX
CMP EDX,0x11
JL 0x0013501a
JMP 0x00135118
LAB_001350fc:
ADD R14,0xc0
MOV R15,R14
JMP 0x00135089
LAB_00135108:
MOV byte ptr [RBX + 0x4828],AL
MOV dword ptr [RBX + 0x482c],0x1
LAB_00135118:
POP RBX
POP R14
POP R15
RET
|
/* stbi__grow_buffer_unsafe(stbi__jpeg*) */
void stbi__grow_buffer_unsafe(stbi__jpeg *param_1)
{
int iVar1;
stbi__jpeg sVar2;
byte bVar3;
byte *pbVar4;
stbi__jpeg *psVar5;
stbi__context *psVar6;
stbi__context *psVar7;
do {
if (*(int *)(param_1 + 0x482c) == 0) {
psVar7 = *(stbi__context **)param_1;
pbVar4 = *(byte **)(psVar7 + 0xc0);
if (*(byte **)(psVar7 + 200) <= pbVar4) {
if (*(int *)(psVar7 + 0x30) == 0) goto LAB_00135023;
stbi__refill_buffer(psVar7);
pbVar4 = *(byte **)(psVar7 + 0xc0);
}
*(byte **)(psVar7 + 0xc0) = pbVar4 + 1;
bVar3 = *pbVar4;
if (bVar3 == 0xff) {
psVar6 = *(stbi__context **)param_1;
psVar7 = psVar6 + 0xc0;
psVar5 = *(stbi__jpeg **)(psVar6 + 0xc0);
if (psVar5 < *(stbi__jpeg **)(psVar6 + 200)) goto LAB_00135089;
if (*(int *)(psVar6 + 0x30) != 0) goto LAB_001350b9;
sVar2 = (stbi__jpeg)0x0;
LAB_00135092:
if (sVar2 == (stbi__jpeg)0xff) {
psVar6 = *(stbi__context **)param_1;
psVar5 = *(stbi__jpeg **)(psVar6 + 0xc0);
if (*(stbi__jpeg **)(psVar6 + 200) <= psVar5) break;
psVar7 = psVar6 + 0xc0;
goto LAB_00135089;
}
if (sVar2 != (stbi__jpeg)0x0) {
param_1[0x4828] = sVar2;
*(int4 *)(param_1 + 0x482c) = 1;
return;
}
bVar3 = 0xff;
}
}
else {
LAB_00135023:
bVar3 = 0;
}
iVar1 = *(int *)(param_1 + 0x4824);
*(uint *)(param_1 + 0x4820) =
*(uint *)(param_1 + 0x4820) | (uint)bVar3 << (0x18U - (char)iVar1 & 0x1f);
*(int *)(param_1 + 0x4824) = iVar1 + 8;
if (0x10 < iVar1) {
return;
}
} while( true );
sVar2 = (stbi__jpeg)0x0;
if (*(int *)(psVar6 + 0x30) != 0) {
psVar7 = psVar6 + 0xc0;
LAB_001350b9:
stbi__refill_buffer(psVar6);
psVar5 = *(stbi__jpeg **)(psVar6 + 0xc0);
LAB_00135089:
*(stbi__jpeg **)psVar7 = psVar5 + 1;
sVar2 = *psVar5;
}
goto LAB_00135092;
}
|
|
8,984 |
minja::IfTemplateToken::~IfTemplateToken()
|
monkey531[P]llama/common/minja.hpp
|
IfTemplateToken(const Location & location, SpaceHandling pre, SpaceHandling post, std::shared_ptr<Expression> && c) : TemplateToken(Type::If, location, pre, post), condition(std::move(c)) {}
|
O1
|
cpp
|
minja::IfTemplateToken::~IfTemplateToken():
pushq %rbx
movq %rdi, %rbx
leaq 0x9574d(%rip), %rax # 0x13bb30
addq $0x10, %rax
movq %rax, (%rdi)
movq 0x38(%rdi), %rdi
testq %rdi, %rdi
je 0xa63f8
callq 0x7ae1c
leaq 0x94ee9(%rip), %rax # 0x13b2e8
addq $0x10, %rax
movq %rax, (%rbx)
movq 0x18(%rbx), %rdi
testq %rdi, %rdi
je 0xa6414
callq 0x7ae1c
movl $0x40, %esi
movq %rbx, %rdi
popq %rbx
jmp 0x1b8f0
|
_ZN5minja15IfTemplateTokenD0Ev:
push rbx
mov rbx, rdi
lea rax, _ZTVN5minja15IfTemplateTokenE; `vtable for'minja::IfTemplateToken
add rax, 10h
mov [rdi], rax
mov rdi, [rdi+38h]
test rdi, rdi
jz short loc_A63F8
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_A63F8:
lea rax, _ZTVN5minja13TemplateTokenE; `vtable for'minja::TemplateToken
add rax, 10h
mov [rbx], rax
mov rdi, [rbx+18h]
test rdi, rdi
jz short loc_A6414
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_A6414:
mov esi, 40h ; '@'; unsigned __int64
mov rdi, rbx; void *
pop rbx
jmp __ZdlPvm; operator delete(void *,ulong)
|
void minja::IfTemplateToken::~IfTemplateToken(minja::IfTemplateToken *this)
{
volatile signed __int32 *v2; // rdi
volatile signed __int32 *v3; // rdi
*(_QWORD *)this = &`vtable for'minja::IfTemplateToken + 2;
v2 = (volatile signed __int32 *)*((_QWORD *)this + 7);
if ( v2 )
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v2);
*(_QWORD *)this = &`vtable for'minja::TemplateToken + 2;
v3 = (volatile signed __int32 *)*((_QWORD *)this + 3);
if ( v3 )
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v3);
operator delete(this, 0x40uLL);
}
|
~IfTemplateToken:
PUSH RBX
MOV RBX,RDI
LEA RAX,[0x23bb30]
ADD RAX,0x10
MOV qword ptr [RDI],RAX
MOV RDI,qword ptr [RDI + 0x38]
TEST RDI,RDI
JZ 0x001a63f8
CALL 0x0017ae1c
LAB_001a63f8:
LEA RAX,[0x23b2e8]
ADD RAX,0x10
MOV qword ptr [RBX],RAX
MOV RDI,qword ptr [RBX + 0x18]
TEST RDI,RDI
JZ 0x001a6414
CALL 0x0017ae1c
LAB_001a6414:
MOV ESI,0x40
MOV RDI,RBX
POP RBX
JMP 0x0011b8f0
|
/* minja::IfTemplateToken::~IfTemplateToken() */
void __thiscall minja::IfTemplateToken::~IfTemplateToken(IfTemplateToken *this)
{
*(int ***)this = &PTR__IfTemplateToken_0023bb40;
if (*(_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> **)(this + 0x38) !=
(_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) {
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release
(*(_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> **)(this + 0x38));
}
*(int ***)this = &PTR__TemplateToken_0023b2f8;
if (*(_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> **)(this + 0x18) !=
(_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) {
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release
(*(_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> **)(this + 0x18));
}
operator_delete(this,0x40);
return;
}
|
|
8,985 |
minja::IfTemplateToken::~IfTemplateToken()
|
monkey531[P]llama/common/minja.hpp
|
IfTemplateToken(const Location & location, SpaceHandling pre, SpaceHandling post, std::shared_ptr<Expression> && c) : TemplateToken(Type::If, location, pre, post), condition(std::move(c)) {}
|
O2
|
cpp
|
minja::IfTemplateToken::~IfTemplateToken():
pushq %r14
pushq %rbx
pushq %rax
movq %r8, %rbx
movl %ecx, %r8d
movl %edx, %ecx
movq %rsi, %rdx
movq %rdi, %r14
pushq $0x2
popq %rsi
callq 0x6d4fe
leaq 0x8d9f7(%rip), %rax # 0x10ab40
addq $0x10, %rax
movq %rax, (%r14)
andq $0x0, 0x38(%r14)
movups (%rbx), %xmm0
andq $0x0, 0x8(%rbx)
movups %xmm0, 0x30(%r14)
andq $0x0, (%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
|
_ZN5minja15IfTemplateTokenC2ERKNS_8LocationENS_13SpaceHandlingES4_OSt10shared_ptrINS_10ExpressionEE:
push r14
push rbx
push rax
mov rbx, r8
mov r8d, ecx
mov ecx, edx
mov rdx, rsi
mov r14, rdi
push 2
pop rsi
call _ZN5minja13TemplateTokenC2ENS0_4TypeERKNS_8LocationENS_13SpaceHandlingES5_; minja::TemplateToken::TemplateToken(minja::TemplateToken::Type,minja::Location const&,minja::SpaceHandling,minja::SpaceHandling)
lea rax, _ZTVN5minja15IfTemplateTokenE; `vtable for'minja::IfTemplateToken
add rax, 10h
mov [r14], rax
and qword ptr [r14+38h], 0
movups xmm0, xmmword ptr [rbx]
and qword ptr [rbx+8], 0
movups xmmword ptr [r14+30h], xmm0
and qword ptr [rbx], 0
add rsp, 8
pop rbx
pop r14
retn
|
long long * minja::IfTemplateToken::IfTemplateToken(long long a1, long long a2, int a3, int a4, __int128 *a5)
{
long long *result; // rax
__int128 v7; // xmm0
minja::TemplateToken::TemplateToken(a1, 2, a2, a3, a4);
result = &`vtable for'minja::IfTemplateToken + 2;
*(_QWORD *)a1 = &`vtable for'minja::IfTemplateToken + 2;
*(_QWORD *)(a1 + 56) = 0LL;
v7 = *a5;
*((_QWORD *)a5 + 1) = 0LL;
*(_OWORD *)(a1 + 48) = v7;
*(_QWORD *)a5 = 0LL;
return result;
}
|
IfTemplateToken:
PUSH R14
PUSH RBX
PUSH RAX
MOV RBX,R8
MOV R8D,ECX
MOV ECX,EDX
MOV RDX,RSI
MOV R14,RDI
PUSH 0x2
POP RSI
CALL 0x0016d4fe
LEA RAX,[0x20ab40]
ADD RAX,0x10
MOV qword ptr [R14],RAX
AND qword ptr [R14 + 0x38],0x0
MOVUPS XMM0,xmmword ptr [RBX]
AND qword ptr [RBX + 0x8],0x0
MOVUPS xmmword ptr [R14 + 0x30],XMM0
AND qword ptr [RBX],0x0
ADD RSP,0x8
POP RBX
POP R14
RET
|
/* minja::IfTemplateToken::IfTemplateToken(minja::Location const&, minja::SpaceHandling,
minja::SpaceHandling, std::shared_ptr<minja::Expression>&&) */
void __thiscall
minja::IfTemplateToken::IfTemplateToken
(IfTemplateToken *this,int8 param_1,int4 param_3,int4 param_4,
int8 *param_5)
{
int8 uVar1;
TemplateToken::TemplateToken((TemplateToken *)this,2,param_1,param_3,param_4);
*(int ***)this = &PTR__IfTemplateToken_0020ab50;
*(int8 *)(this + 0x38) = 0;
uVar1 = param_5[1];
param_5[1] = 0;
*(int8 *)(this + 0x30) = *param_5;
*(int8 *)(this + 0x38) = uVar1;
*param_5 = 0;
return;
}
|
|
8,986 |
minja::IfTemplateToken::~IfTemplateToken()
|
monkey531[P]llama/common/minja.hpp
|
IfTemplateToken(const Location & location, SpaceHandling pre, SpaceHandling post, std::shared_ptr<Expression> && c) : TemplateToken(Type::If, location, pre, post), condition(std::move(c)) {}
|
O3
|
cpp
|
minja::IfTemplateToken::~IfTemplateToken():
pushq %rbx
movq %rdi, %rbx
leaq 0x93edf(%rip), %rax # 0x139b30
addq $0x10, %rax
movq %rax, (%rdi)
movq 0x38(%rdi), %rdi
testq %rdi, %rdi
je 0xa5c66
callq 0x7b578
leaq 0x9367b(%rip), %rax # 0x1392e8
addq $0x10, %rax
movq %rax, (%rbx)
movq 0x18(%rbx), %rdi
testq %rdi, %rdi
je 0xa5c82
callq 0x7b578
movl $0x40, %esi
movq %rbx, %rdi
popq %rbx
jmp 0x1b8f0
|
_ZN5minja15IfTemplateTokenD0Ev:
push rbx
mov rbx, rdi
lea rax, _ZTVN5minja15IfTemplateTokenE; `vtable for'minja::IfTemplateToken
add rax, 10h
mov [rdi], rax
mov rdi, [rdi+38h]
test rdi, rdi
jz short loc_A5C66
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_A5C66:
lea rax, _ZTVN5minja13TemplateTokenE; `vtable for'minja::TemplateToken
add rax, 10h
mov [rbx], rax
mov rdi, [rbx+18h]
test rdi, rdi
jz short loc_A5C82
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_A5C82:
mov esi, 40h ; '@'; unsigned __int64
mov rdi, rbx; void *
pop rbx
jmp __ZdlPvm; operator delete(void *,ulong)
|
void minja::IfTemplateToken::~IfTemplateToken(minja::IfTemplateToken *this)
{
volatile signed __int32 *v2; // rdi
volatile signed __int32 *v3; // rdi
*(_QWORD *)this = &`vtable for'minja::IfTemplateToken + 2;
v2 = (volatile signed __int32 *)*((_QWORD *)this + 7);
if ( v2 )
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v2);
*(_QWORD *)this = &`vtable for'minja::TemplateToken + 2;
v3 = (volatile signed __int32 *)*((_QWORD *)this + 3);
if ( v3 )
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v3);
operator delete(this, 0x40uLL);
}
|
~IfTemplateToken:
PUSH RBX
MOV RBX,RDI
LEA RAX,[0x239b30]
ADD RAX,0x10
MOV qword ptr [RDI],RAX
MOV RDI,qword ptr [RDI + 0x38]
TEST RDI,RDI
JZ 0x001a5c66
CALL 0x0017b578
LAB_001a5c66:
LEA RAX,[0x2392e8]
ADD RAX,0x10
MOV qword ptr [RBX],RAX
MOV RDI,qword ptr [RBX + 0x18]
TEST RDI,RDI
JZ 0x001a5c82
CALL 0x0017b578
LAB_001a5c82:
MOV ESI,0x40
MOV RDI,RBX
POP RBX
JMP 0x0011b8f0
|
/* minja::IfTemplateToken::~IfTemplateToken() */
void __thiscall minja::IfTemplateToken::~IfTemplateToken(IfTemplateToken *this)
{
*(int ***)this = &PTR__IfTemplateToken_00239b40;
if (*(_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> **)(this + 0x38) !=
(_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) {
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release
(*(_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> **)(this + 0x38));
}
*(int ***)this = &PTR__TemplateToken_002392f8;
if (*(_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> **)(this + 0x18) !=
(_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) {
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release
(*(_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> **)(this + 0x18));
}
operator_delete(this,0x40);
return;
}
|
|
8,987 |
ma_multi_malloc
|
eloqsql/libmariadb/libmariadb/ma_alloc.c
|
void *ma_multi_malloc(myf myFlags, ...)
{
va_list args;
char **ptr,*start,*res;
size_t tot_length,length;
va_start(args,myFlags);
tot_length=0;
while ((ptr=va_arg(args, char **)))
{
length=va_arg(args, size_t);
tot_length+=ALIGN_SIZE(length);
}
va_end(args);
if (!(start=(char *)malloc(tot_length)))
return 0;
va_start(args,myFlags);
res=start;
while ((ptr=va_arg(args, char **)))
{
*ptr=res;
length=va_arg(args,size_t);
res+=ALIGN_SIZE(length);
}
va_end(args);
return start;
}
|
O0
|
c
|
ma_multi_malloc:
pushq %rbp
movq %rsp, %rbp
subq $0x170, %rsp # imm = 0x170
testb %al, %al
je 0x48d01
movaps %xmm0, -0xe0(%rbp)
movaps %xmm1, -0xd0(%rbp)
movaps %xmm2, -0xc0(%rbp)
movaps %xmm3, -0xb0(%rbp)
movaps %xmm4, -0xa0(%rbp)
movaps %xmm5, -0x90(%rbp)
movaps %xmm6, -0x80(%rbp)
movaps %xmm7, -0x70(%rbp)
movq %r9, -0xe8(%rbp)
movq %r8, -0xf0(%rbp)
movq %rcx, -0xf8(%rbp)
movq %rdx, -0x100(%rbp)
movq %rsi, -0x108(%rbp)
movl %edi, -0xc(%rbp)
leaq -0x30(%rbp), %rax
leaq -0x110(%rbp), %rcx
movq %rcx, 0x10(%rax)
leaq 0x10(%rbp), %rcx
movq %rcx, 0x8(%rax)
movl $0x30, 0x4(%rax)
movl $0x8, (%rax)
movq $0x0, -0x50(%rbp)
leaq -0x30(%rbp), %rax
movq %rax, -0x120(%rbp)
movl -0x30(%rbp), %eax
movl %eax, -0x114(%rbp)
cmpl $0x28, %eax
ja 0x48d8e
movq -0x120(%rbp), %rcx
movl -0x114(%rbp), %edx
movslq %edx, %rax
addq 0x10(%rcx), %rax
addl $0x8, %edx
movl %edx, (%rcx)
movq %rax, -0x128(%rbp)
jmp 0x48dab
movq -0x120(%rbp), %rcx
movq 0x8(%rcx), %rax
movq %rax, %rdx
addq $0x8, %rdx
movq %rdx, 0x8(%rcx)
movq %rax, -0x128(%rbp)
movq -0x128(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x38(%rbp)
cmpq $0x0, %rax
je 0x48e46
leaq -0x30(%rbp), %rax
movq %rax, -0x138(%rbp)
movl -0x30(%rbp), %eax
movl %eax, -0x12c(%rbp)
cmpl $0x28, %eax
ja 0x48dfe
movq -0x138(%rbp), %rcx
movl -0x12c(%rbp), %edx
movslq %edx, %rax
addq 0x10(%rcx), %rax
addl $0x8, %edx
movl %edx, (%rcx)
movq %rax, -0x140(%rbp)
jmp 0x48e1b
movq -0x138(%rbp), %rcx
movq 0x8(%rcx), %rax
movq %rax, %rdx
addq $0x8, %rdx
movq %rdx, 0x8(%rcx)
movq %rax, -0x140(%rbp)
movq -0x140(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x58(%rbp)
movq -0x58(%rbp), %rax
addq $0x8, %rax
subq $0x1, %rax
andq $-0x8, %rax
addq -0x50(%rbp), %rax
movq %rax, -0x50(%rbp)
jmp 0x48d53
leaq -0x30(%rbp), %rax
movq -0x50(%rbp), %rdi
callq 0x368d0
movq %rax, -0x40(%rbp)
cmpq $0x0, %rax
jne 0x48e6a
movq $0x0, -0x8(%rbp)
jmp 0x48fa0
leaq -0x30(%rbp), %rax
leaq -0x110(%rbp), %rcx
movq %rcx, 0x10(%rax)
leaq 0x10(%rbp), %rcx
movq %rcx, 0x8(%rax)
movl $0x30, 0x4(%rax)
movl $0x8, (%rax)
movq -0x40(%rbp), %rax
movq %rax, -0x48(%rbp)
leaq -0x30(%rbp), %rax
movq %rax, -0x150(%rbp)
movl -0x30(%rbp), %eax
movl %eax, -0x144(%rbp)
cmpl $0x28, %eax
ja 0x48ed1
movq -0x150(%rbp), %rcx
movl -0x144(%rbp), %edx
movslq %edx, %rax
addq 0x10(%rcx), %rax
addl $0x8, %edx
movl %edx, (%rcx)
movq %rax, -0x158(%rbp)
jmp 0x48eee
movq -0x150(%rbp), %rcx
movq 0x8(%rcx), %rax
movq %rax, %rdx
addq $0x8, %rdx
movq %rdx, 0x8(%rcx)
movq %rax, -0x158(%rbp)
movq -0x158(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x38(%rbp)
cmpq $0x0, %rax
je 0x48f94
movq -0x48(%rbp), %rcx
movq -0x38(%rbp), %rax
movq %rcx, (%rax)
leaq -0x30(%rbp), %rax
movq %rax, -0x168(%rbp)
movl -0x30(%rbp), %eax
movl %eax, -0x15c(%rbp)
cmpl $0x28, %eax
ja 0x48f4c
movq -0x168(%rbp), %rcx
movl -0x15c(%rbp), %edx
movslq %edx, %rax
addq 0x10(%rcx), %rax
addl $0x8, %edx
movl %edx, (%rcx)
movq %rax, -0x170(%rbp)
jmp 0x48f69
movq -0x168(%rbp), %rcx
movq 0x8(%rcx), %rax
movq %rax, %rdx
addq $0x8, %rdx
movq %rdx, 0x8(%rcx)
movq %rax, -0x170(%rbp)
movq -0x170(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x58(%rbp)
movq -0x58(%rbp), %rax
addq $0x8, %rax
subq $0x1, %rax
andq $-0x8, %rax
addq -0x48(%rbp), %rax
movq %rax, -0x48(%rbp)
jmp 0x48e96
leaq -0x30(%rbp), %rax
movq -0x40(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x170, %rsp # imm = 0x170
popq %rbp
retq
nopl (%rax)
|
ma_multi_malloc:
push rbp
mov rbp, rsp
sub rsp, 170h
test al, al
jz short loc_48D01
movaps [rbp+var_E0], xmm0
movaps [rbp+var_D0], xmm1
movaps [rbp+var_C0], xmm2
movaps [rbp+var_B0], xmm3
movaps [rbp+var_A0], xmm4
movaps [rbp+var_90], xmm5
movaps [rbp+var_80], xmm6
movaps [rbp+var_70], xmm7
loc_48D01:
mov [rbp+var_E8], r9
mov [rbp+var_F0], r8
mov [rbp+var_F8], rcx
mov [rbp+var_100], rdx
mov [rbp+var_108], rsi
mov [rbp+var_C], edi
lea rax, [rbp+var_30]
lea rcx, [rbp+var_110]
mov [rax+10h], rcx
lea rcx, [rbp+arg_0]
mov [rax+8], rcx
mov dword ptr [rax+4], 30h ; '0'
mov dword ptr [rax], 8
mov [rbp+var_50], 0
loc_48D53:
lea rax, [rbp+var_30]
mov [rbp+var_120], rax
mov eax, [rbp+var_30]
mov [rbp+var_114], eax
cmp eax, 28h ; '('
ja short loc_48D8E
mov rcx, [rbp+var_120]
mov edx, [rbp+var_114]
movsxd rax, edx
add rax, [rcx+10h]
add edx, 8
mov [rcx], edx
mov [rbp+var_128], rax
jmp short loc_48DAB
loc_48D8E:
mov rcx, [rbp+var_120]
mov rax, [rcx+8]
mov rdx, rax
add rdx, 8
mov [rcx+8], rdx
mov [rbp+var_128], rax
loc_48DAB:
mov rax, [rbp+var_128]
mov rax, [rax]
mov [rbp+var_38], rax
cmp rax, 0
jz loc_48E46
lea rax, [rbp+var_30]
mov [rbp+var_138], rax
mov eax, [rbp+var_30]
mov [rbp+var_12C], eax
cmp eax, 28h ; '('
ja short loc_48DFE
mov rcx, [rbp+var_138]
mov edx, [rbp+var_12C]
movsxd rax, edx
add rax, [rcx+10h]
add edx, 8
mov [rcx], edx
mov [rbp+var_140], rax
jmp short loc_48E1B
loc_48DFE:
mov rcx, [rbp+var_138]
mov rax, [rcx+8]
mov rdx, rax
add rdx, 8
mov [rcx+8], rdx
mov [rbp+var_140], rax
loc_48E1B:
mov rax, [rbp+var_140]
mov rax, [rax]
mov [rbp+var_58], rax
mov rax, [rbp+var_58]
add rax, 8
sub rax, 1
and rax, 0FFFFFFFFFFFFFFF8h
add rax, [rbp+var_50]
mov [rbp+var_50], rax
jmp loc_48D53
loc_48E46:
lea rax, [rbp+var_30]
mov rdi, [rbp+var_50]
call _malloc
mov [rbp+var_40], rax
cmp rax, 0
jnz short loc_48E6A
mov [rbp+var_8], 0
jmp loc_48FA0
loc_48E6A:
lea rax, [rbp+var_30]
lea rcx, [rbp+var_110]
mov [rax+10h], rcx
lea rcx, [rbp+arg_0]
mov [rax+8], rcx
mov dword ptr [rax+4], 30h ; '0'
mov dword ptr [rax], 8
mov rax, [rbp+var_40]
mov [rbp+var_48], rax
loc_48E96:
lea rax, [rbp+var_30]
mov [rbp+var_150], rax
mov eax, [rbp+var_30]
mov [rbp+var_144], eax
cmp eax, 28h ; '('
ja short loc_48ED1
mov rcx, [rbp+var_150]
mov edx, [rbp+var_144]
movsxd rax, edx
add rax, [rcx+10h]
add edx, 8
mov [rcx], edx
mov [rbp+var_158], rax
jmp short loc_48EEE
loc_48ED1:
mov rcx, [rbp+var_150]
mov rax, [rcx+8]
mov rdx, rax
add rdx, 8
mov [rcx+8], rdx
mov [rbp+var_158], rax
loc_48EEE:
mov rax, [rbp+var_158]
mov rax, [rax]
mov [rbp+var_38], rax
cmp rax, 0
jz loc_48F94
mov rcx, [rbp+var_48]
mov rax, [rbp+var_38]
mov [rax], rcx
lea rax, [rbp+var_30]
mov [rbp+var_168], rax
mov eax, [rbp+var_30]
mov [rbp+var_15C], eax
cmp eax, 28h ; '('
ja short loc_48F4C
mov rcx, [rbp+var_168]
mov edx, [rbp+var_15C]
movsxd rax, edx
add rax, [rcx+10h]
add edx, 8
mov [rcx], edx
mov [rbp+var_170], rax
jmp short loc_48F69
loc_48F4C:
mov rcx, [rbp+var_168]
mov rax, [rcx+8]
mov rdx, rax
add rdx, 8
mov [rcx+8], rdx
mov [rbp+var_170], rax
loc_48F69:
mov rax, [rbp+var_170]
mov rax, [rax]
mov [rbp+var_58], rax
mov rax, [rbp+var_58]
add rax, 8
sub rax, 1
and rax, 0FFFFFFFFFFFFFFF8h
add rax, [rbp+var_48]
mov [rbp+var_48], rax
jmp loc_48E96
loc_48F94:
lea rax, [rbp+var_30]
mov rax, [rbp+var_40]
mov [rbp+var_8], rax
loc_48FA0:
mov rax, [rbp+var_8]
add rsp, 170h
pop rbp
retn
|
long long ma_multi_malloc(int a1, ...)
{
_QWORD *overflow_arg_area; // rax
_QWORD *v2; // rax
_QWORD *v3; // rax
_QWORD *v4; // rax
long long i; // [rsp+120h] [rbp-50h]
long long j; // [rsp+128h] [rbp-48h]
long long v8; // [rsp+130h] [rbp-40h]
va_list va; // [rsp+140h] [rbp-30h] BYREF
int v10; // [rsp+164h] [rbp-Ch]
va_start(va, a1);
v10 = a1;
for ( i = 0LL; ; i += (*v2 + 7LL) & 0xFFFFFFFFFFFFFFF8LL )
{
if ( va[0].gp_offset > 0x28 )
{
overflow_arg_area = va[0].overflow_arg_area;
va[0].overflow_arg_area = (char *)va[0].overflow_arg_area + 8;
}
else
{
overflow_arg_area = (char *)va[0].reg_save_area + (int)va[0].gp_offset;
va[0].gp_offset += 8;
}
if ( !*overflow_arg_area )
break;
if ( va[0].gp_offset > 0x28 )
{
v2 = va[0].overflow_arg_area;
va[0].overflow_arg_area = (char *)va[0].overflow_arg_area + 8;
}
else
{
v2 = (char *)va[0].reg_save_area + (int)va[0].gp_offset;
va[0].gp_offset += 8;
}
}
v8 = malloc(i);
if ( !v8 )
return 0LL;
va_end(va);
va_start(va, a1);
for ( j = v8; ; j += (*v4 + 7LL) & 0xFFFFFFFFFFFFFFF8LL )
{
if ( va[0].gp_offset > 0x28 )
{
v3 = va[0].overflow_arg_area;
va[0].overflow_arg_area = (char *)va[0].overflow_arg_area + 8;
}
else
{
v3 = (char *)va[0].reg_save_area + (int)va[0].gp_offset;
va[0].gp_offset += 8;
}
if ( !*v3 )
break;
*(_QWORD *)*v3 = j;
if ( va[0].gp_offset > 0x28 )
{
v4 = va[0].overflow_arg_area;
va[0].overflow_arg_area = (char *)va[0].overflow_arg_area + 8;
}
else
{
v4 = (char *)va[0].reg_save_area + (int)va[0].gp_offset;
va[0].gp_offset += 8;
}
}
return v8;
}
|
ma_multi_malloc:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x170
TEST AL,AL
JZ 0x00148d01
MOVAPS xmmword ptr [RBP + -0xe0],XMM0
MOVAPS xmmword ptr [RBP + -0xd0],XMM1
MOVAPS xmmword ptr [RBP + -0xc0],XMM2
MOVAPS xmmword ptr [RBP + -0xb0],XMM3
MOVAPS xmmword ptr [RBP + -0xa0],XMM4
MOVAPS xmmword ptr [RBP + -0x90],XMM5
MOVAPS xmmword ptr [RBP + -0x80],XMM6
MOVAPS xmmword ptr [RBP + -0x70],XMM7
LAB_00148d01:
MOV qword ptr [RBP + -0xe8],R9
MOV qword ptr [RBP + -0xf0],R8
MOV qword ptr [RBP + -0xf8],RCX
MOV qword ptr [RBP + -0x100],RDX
MOV qword ptr [RBP + -0x108],RSI
MOV dword ptr [RBP + -0xc],EDI
LEA RAX,[RBP + -0x30]
LEA RCX,[RBP + -0x110]
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],0x8
MOV qword ptr [RBP + -0x50],0x0
LAB_00148d53:
LEA RAX,[RBP + -0x30]
MOV qword ptr [RBP + -0x120],RAX
MOV EAX,dword ptr [RBP + -0x30]
MOV dword ptr [RBP + -0x114],EAX
CMP EAX,0x28
JA 0x00148d8e
MOV RCX,qword ptr [RBP + -0x120]
MOV EDX,dword ptr [RBP + -0x114]
MOVSXD RAX,EDX
ADD RAX,qword ptr [RCX + 0x10]
ADD EDX,0x8
MOV dword ptr [RCX],EDX
MOV qword ptr [RBP + -0x128],RAX
JMP 0x00148dab
LAB_00148d8e:
MOV RCX,qword ptr [RBP + -0x120]
MOV RAX,qword ptr [RCX + 0x8]
MOV RDX,RAX
ADD RDX,0x8
MOV qword ptr [RCX + 0x8],RDX
MOV qword ptr [RBP + -0x128],RAX
LAB_00148dab:
MOV RAX,qword ptr [RBP + -0x128]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x38],RAX
CMP RAX,0x0
JZ 0x00148e46
LEA RAX,[RBP + -0x30]
MOV qword ptr [RBP + -0x138],RAX
MOV EAX,dword ptr [RBP + -0x30]
MOV dword ptr [RBP + -0x12c],EAX
CMP EAX,0x28
JA 0x00148dfe
MOV RCX,qword ptr [RBP + -0x138]
MOV EDX,dword ptr [RBP + -0x12c]
MOVSXD RAX,EDX
ADD RAX,qword ptr [RCX + 0x10]
ADD EDX,0x8
MOV dword ptr [RCX],EDX
MOV qword ptr [RBP + -0x140],RAX
JMP 0x00148e1b
LAB_00148dfe:
MOV RCX,qword ptr [RBP + -0x138]
MOV RAX,qword ptr [RCX + 0x8]
MOV RDX,RAX
ADD RDX,0x8
MOV qword ptr [RCX + 0x8],RDX
MOV qword ptr [RBP + -0x140],RAX
LAB_00148e1b:
MOV RAX,qword ptr [RBP + -0x140]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x58],RAX
MOV RAX,qword ptr [RBP + -0x58]
ADD RAX,0x8
SUB RAX,0x1
AND RAX,-0x8
ADD RAX,qword ptr [RBP + -0x50]
MOV qword ptr [RBP + -0x50],RAX
JMP 0x00148d53
LAB_00148e46:
LEA RAX,[RBP + -0x30]
MOV RDI,qword ptr [RBP + -0x50]
CALL 0x001368d0
MOV qword ptr [RBP + -0x40],RAX
CMP RAX,0x0
JNZ 0x00148e6a
MOV qword ptr [RBP + -0x8],0x0
JMP 0x00148fa0
LAB_00148e6a:
LEA RAX,[RBP + -0x30]
LEA RCX,[RBP + -0x110]
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],0x8
MOV RAX,qword ptr [RBP + -0x40]
MOV qword ptr [RBP + -0x48],RAX
LAB_00148e96:
LEA RAX,[RBP + -0x30]
MOV qword ptr [RBP + -0x150],RAX
MOV EAX,dword ptr [RBP + -0x30]
MOV dword ptr [RBP + -0x144],EAX
CMP EAX,0x28
JA 0x00148ed1
MOV RCX,qword ptr [RBP + -0x150]
MOV EDX,dword ptr [RBP + -0x144]
MOVSXD RAX,EDX
ADD RAX,qword ptr [RCX + 0x10]
ADD EDX,0x8
MOV dword ptr [RCX],EDX
MOV qword ptr [RBP + -0x158],RAX
JMP 0x00148eee
LAB_00148ed1:
MOV RCX,qword ptr [RBP + -0x150]
MOV RAX,qword ptr [RCX + 0x8]
MOV RDX,RAX
ADD RDX,0x8
MOV qword ptr [RCX + 0x8],RDX
MOV qword ptr [RBP + -0x158],RAX
LAB_00148eee:
MOV RAX,qword ptr [RBP + -0x158]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x38],RAX
CMP RAX,0x0
JZ 0x00148f94
MOV RCX,qword ptr [RBP + -0x48]
MOV RAX,qword ptr [RBP + -0x38]
MOV qword ptr [RAX],RCX
LEA RAX,[RBP + -0x30]
MOV qword ptr [RBP + -0x168],RAX
MOV EAX,dword ptr [RBP + -0x30]
MOV dword ptr [RBP + -0x15c],EAX
CMP EAX,0x28
JA 0x00148f4c
MOV RCX,qword ptr [RBP + -0x168]
MOV EDX,dword ptr [RBP + -0x15c]
MOVSXD RAX,EDX
ADD RAX,qword ptr [RCX + 0x10]
ADD EDX,0x8
MOV dword ptr [RCX],EDX
MOV qword ptr [RBP + -0x170],RAX
JMP 0x00148f69
LAB_00148f4c:
MOV RCX,qword ptr [RBP + -0x168]
MOV RAX,qword ptr [RCX + 0x8]
MOV RDX,RAX
ADD RDX,0x8
MOV qword ptr [RCX + 0x8],RDX
MOV qword ptr [RBP + -0x170],RAX
LAB_00148f69:
MOV RAX,qword ptr [RBP + -0x170]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x58],RAX
MOV RAX,qword ptr [RBP + -0x58]
ADD RAX,0x8
SUB RAX,0x1
AND RAX,-0x8
ADD RAX,qword ptr [RBP + -0x48]
MOV qword ptr [RBP + -0x48],RAX
JMP 0x00148e96
LAB_00148f94:
LEA RAX,[RBP + -0x30]
MOV RAX,qword ptr [RBP + -0x40]
MOV qword ptr [RBP + -0x8],RAX
LAB_00148fa0:
MOV RAX,qword ptr [RBP + -0x8]
ADD RSP,0x170
POP RBP
RET
|
/* WARNING: Restarted to delay deadcode elimination for space: stack */
void * ma_multi_malloc(int8 param_1,int8 param_2,int8 param_3,int8 param_4,
int8 param_5,int8 param_6,int8 param_7,int8 param_8,
int4 param_9,int8 param_10,int8 param_11,int8 param_12
,int8 param_13,int8 param_14)
{
char in_AL;
long *local_178;
long *local_160;
long *local_148;
long *local_130;
long local_118 [4];
int8 local_f8;
int8 local_f0;
int8 local_e8;
int8 local_d8;
int8 local_c8;
int8 local_b8;
int8 local_a8;
int8 local_98;
int8 local_88;
int8 local_78;
long local_60;
size_t local_58;
void *local_50;
long local_40;
uint local_38;
int4 local_34;
long *local_30;
long *local_28;
int4 local_14;
void *local_10;
if (in_AL != '\0') {
local_e8 = param_1;
local_d8 = param_2;
local_c8 = param_3;
local_b8 = param_4;
local_a8 = param_5;
local_98 = param_6;
local_88 = param_7;
local_78 = param_8;
}
local_28 = local_118;
local_30 = (long *)&stack0x00000008;
local_34 = 0x30;
local_38 = 8;
local_58 = 0;
while( true ) {
if (local_38 < 0x29) {
local_130 = (long *)((long)local_28 + (long)(int)local_38);
local_38 = local_38 + 8;
}
else {
local_130 = local_30;
local_30 = local_30 + 1;
}
local_40 = *local_130;
if (local_40 == 0) break;
if (local_38 < 0x29) {
local_148 = (long *)((long)local_28 + (long)(int)local_38);
local_38 = local_38 + 8;
}
else {
local_148 = local_30;
local_30 = local_30 + 1;
}
local_60 = *local_148;
local_58 = (local_60 + 7U & 0xfffffffffffffff8) + local_58;
}
local_118[1] = param_10;
local_118[2] = param_11;
local_118[3] = param_12;
local_f8 = param_13;
local_f0 = param_14;
local_14 = param_9;
local_10 = malloc(local_58);
if (local_10 == (void *)0x0) {
local_10 = (void *)0x0;
}
else {
local_30 = (long *)&stack0x00000008;
local_38 = 8;
local_50 = local_10;
while( true ) {
if (local_38 < 0x29) {
local_160 = (long *)((long)local_118 + (long)(int)local_38);
local_38 = local_38 + 8;
}
else {
local_160 = local_30;
local_30 = local_30 + 1;
}
if ((int8 *)*local_160 == (int8 *)0x0) break;
*(int8 *)*local_160 = local_50;
if (local_38 < 0x29) {
local_178 = (long *)((long)local_118 + (long)(int)local_38);
local_38 = local_38 + 8;
}
else {
local_178 = local_30;
local_30 = local_30 + 1;
}
local_50 = (void *)((*local_178 + 7U & 0xfffffffffffffff8) + (long)local_50);
}
}
return local_10;
}
|
|
8,988 |
mysql_server_end
|
eloqsql/libmariadb/libmariadb/mariadb_lib.c
|
void STDCALL mysql_server_end(void)
{
if (!mysql_client_init)
return;
release_configuration_dirs();
mysql_client_plugin_deinit();
list_free(pvio_callback, 0);
if (ma_init_done)
ma_end(0);
#ifdef HAVE_TLS
ma_pvio_tls_end();
#endif
mysql_client_init= 0;
ma_init_done= 0;
#ifdef WIN32
init_once = (INIT_ONCE)INIT_ONCE_STATIC_INIT;
#else
init_once = (pthread_once_t)PTHREAD_ONCE_INIT;
#endif
}
|
O3
|
c
|
mysql_server_end:
cmpb $0x1, 0x2cfc4(%rip) # 0x4c1a4
jne 0x1f23d
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
xorl %eax, %eax
callq 0x33d44
xorl %eax, %eax
callq 0x2a0d6
leaq 0x2cfaa(%rip), %rax # 0x4c1a8
movq (%rax), %rdi
xorl %esi, %esi
callq 0x1fa4b
leaq 0x2cfa2(%rip), %rbx # 0x4c1b1
cmpb $0x0, (%rbx)
je 0x1f21b
xorl %edi, %edi
callq 0x20dc5
xorl %r14d, %r14d
xorl %eax, %eax
callq 0x20544
movb %r14b, 0x2cf78(%rip) # 0x4c1a4
movb %r14b, (%rbx)
movl $0x0, 0x2cf67(%rip) # 0x4c1a0
popq %rbx
popq %r14
popq %rbp
retq
|
mysql_server_end:
cmp cs:mysql_client_init, 1
jnz short locret_1F23D
push rbp
mov rbp, rsp
push r14
push rbx
xor eax, eax
call release_configuration_dirs
xor eax, eax
call mysql_client_plugin_deinit
lea rax, pvio_callback
mov rdi, [rax]
xor esi, esi
call list_free
lea rbx, ma_init_done
cmp byte ptr [rbx], 0
jz short loc_1F21B
xor edi, edi
call ma_end
loc_1F21B:
xor r14d, r14d
xor eax, eax
call ma_pvio_tls_end
mov cs:mysql_client_init, r14b
mov [rbx], r14b
mov cs:init_once, 0
pop rbx
pop r14
pop rbp
locret_1F23D:
retn
|
long long mysql_server_end()
{
long long result; // rax
if ( mysql_client_init == 1 )
{
release_configuration_dirs();
mysql_client_plugin_deinit();
list_free(pvio_callback, 0LL);
if ( ma_init_done )
ma_end(0LL);
result = ma_pvio_tls_end();
mysql_client_init = 0;
ma_init_done = 0;
init_once = 0;
}
return result;
}
|
mysql_server_end:
CMP byte ptr [0x0014c1a4],0x1
JNZ 0x0011f23d
PUSH RBP
MOV RBP,RSP
PUSH R14
PUSH RBX
XOR EAX,EAX
CALL 0x00133d44
XOR EAX,EAX
CALL 0x0012a0d6
LEA RAX,[0x14c1a8]
MOV RDI,qword ptr [RAX]
XOR ESI,ESI
CALL 0x0011fa4b
LEA RBX,[0x14c1b1]
CMP byte ptr [RBX],0x0
JZ 0x0011f21b
XOR EDI,EDI
CALL 0x00120dc5
LAB_0011f21b:
XOR R14D,R14D
XOR EAX,EAX
CALL 0x00120544
MOV byte ptr [0x0014c1a4],R14B
MOV byte ptr [RBX],R14B
MOV dword ptr [0x0014c1a0],0x0
POP RBX
POP R14
POP RBP
LAB_0011f23d:
RET
|
void mysql_server_end(void)
{
if (mysql_client_init == '\x01') {
release_configuration_dirs();
mysql_client_plugin_deinit();
list_free(pvio_callback,0);
if (ma_init_done != '\0') {
ma_end(0);
}
ma_pvio_tls_end();
mysql_client_init = '\0';
ma_init_done = '\0';
init_once = 0;
}
return;
}
|
|
8,989 |
my_coll_parser_scan_logical_position
|
eloqsql/strings/ctype-uca.c
|
static int
my_coll_parser_scan_logical_position(MY_COLL_RULE_PARSER *p,
my_wc_t *pwc, size_t limit)
{
MY_COLL_RULES *rules= p->rules;
MY_COLL_LEXEM *lexem= my_coll_parser_curr(p);
if (!lex_cmp(lexem, C_STRING_WITH_LEN("[first non-ignorable]")))
lexem->code= rules->uca->first_non_ignorable;
else if (!lex_cmp(lexem, C_STRING_WITH_LEN("[last non-ignorable]")))
lexem->code= rules->uca->last_non_ignorable;
else if (!lex_cmp(lexem, C_STRING_WITH_LEN("[first primary ignorable]")))
lexem->code= rules->uca->first_primary_ignorable;
else if (!lex_cmp(lexem, C_STRING_WITH_LEN("[last primary ignorable]")))
lexem->code= rules->uca->last_primary_ignorable;
else if (!lex_cmp(lexem, C_STRING_WITH_LEN("[first secondary ignorable]")))
lexem->code= rules->uca->first_secondary_ignorable;
else if (!lex_cmp(lexem, C_STRING_WITH_LEN("[last secondary ignorable]")))
lexem->code= rules->uca->last_secondary_ignorable;
else if (!lex_cmp(lexem, C_STRING_WITH_LEN("[first tertiary ignorable]")))
lexem->code= rules->uca->first_tertiary_ignorable;
else if (!lex_cmp(lexem, C_STRING_WITH_LEN("[last tertiary ignorable]")))
lexem->code= rules->uca->last_tertiary_ignorable;
else if (!lex_cmp(lexem, C_STRING_WITH_LEN("[first trailing]")))
lexem->code= rules->uca->first_trailing;
else if (!lex_cmp(lexem, C_STRING_WITH_LEN("[last trailing]")))
lexem->code= rules->uca->last_trailing;
else if (!lex_cmp(lexem, C_STRING_WITH_LEN("[first variable]")))
lexem->code= rules->uca->first_variable;
else if (!lex_cmp(lexem, C_STRING_WITH_LEN("[last variable]")))
lexem->code= rules->uca->last_variable;
else
return 0; /* Don't scan the next token */
if (!my_coll_rule_expand(pwc, limit, lexem->code))
{
/*
Logical position can not be in a contraction,
so the above call should never fail.
Let's assert in debug version and print
a nice error message in production version.
*/
DBUG_ASSERT(0);
return my_coll_parser_too_long_error(p, "Logical position");
}
return my_coll_parser_scan(p);
}
|
O0
|
c
|
my_coll_parser_scan_logical_position:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq -0x10(%rbp), %rax
movq 0xf0(%rax), %rax
movq %rax, -0x28(%rbp)
movq -0x10(%rbp), %rdi
callq 0xad020
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rdi
leaq 0x36a48(%rip), %rsi # 0xe4743
movl $0x15, %edx
callq 0xad7a0
cmpl $0x0, %eax
jne 0xadd24
movq -0x28(%rbp), %rax
movq 0x8(%rax), %rax
movq 0x70(%rax), %rax
movl %eax, %ecx
movq -0x30(%rbp), %rax
movl %ecx, 0x24(%rax)
jmp 0xadf94
movq -0x30(%rbp), %rdi
leaq 0x36a2a(%rip), %rsi # 0xe4759
movl $0x14, %edx
callq 0xad7a0
cmpl $0x0, %eax
jne 0xadd58
movq -0x28(%rbp), %rax
movq 0x8(%rax), %rax
movq 0x78(%rax), %rax
movl %eax, %ecx
movq -0x30(%rbp), %rax
movl %ecx, 0x24(%rax)
jmp 0xadf92
movq -0x30(%rbp), %rdi
leaq 0x36a0b(%rip), %rsi # 0xe476e
movl $0x19, %edx
callq 0xad7a0
cmpl $0x0, %eax
jne 0xadd8f
movq -0x28(%rbp), %rax
movq 0x8(%rax), %rax
movq 0x80(%rax), %rax
movl %eax, %ecx
movq -0x30(%rbp), %rax
movl %ecx, 0x24(%rax)
jmp 0xadf90
movq -0x30(%rbp), %rdi
leaq 0x369ee(%rip), %rsi # 0xe4788
movl $0x18, %edx
callq 0xad7a0
cmpl $0x0, %eax
jne 0xaddc6
movq -0x28(%rbp), %rax
movq 0x8(%rax), %rax
movq 0x88(%rax), %rax
movl %eax, %ecx
movq -0x30(%rbp), %rax
movl %ecx, 0x24(%rax)
jmp 0xadf8e
movq -0x30(%rbp), %rdi
leaq 0x369d0(%rip), %rsi # 0xe47a1
movl $0x1b, %edx
callq 0xad7a0
cmpl $0x0, %eax
jne 0xaddfd
movq -0x28(%rbp), %rax
movq 0x8(%rax), %rax
movq 0x90(%rax), %rax
movl %eax, %ecx
movq -0x30(%rbp), %rax
movl %ecx, 0x24(%rax)
jmp 0xadf8c
movq -0x30(%rbp), %rdi
leaq 0x369b5(%rip), %rsi # 0xe47bd
movl $0x1a, %edx
callq 0xad7a0
cmpl $0x0, %eax
jne 0xade34
movq -0x28(%rbp), %rax
movq 0x8(%rax), %rax
movq 0x98(%rax), %rax
movl %eax, %ecx
movq -0x30(%rbp), %rax
movl %ecx, 0x24(%rax)
jmp 0xadf8a
movq -0x30(%rbp), %rdi
leaq 0x36999(%rip), %rsi # 0xe47d8
movl $0x1a, %edx
callq 0xad7a0
cmpl $0x0, %eax
jne 0xade6b
movq -0x28(%rbp), %rax
movq 0x8(%rax), %rax
movq 0xa0(%rax), %rax
movl %eax, %ecx
movq -0x30(%rbp), %rax
movl %ecx, 0x24(%rax)
jmp 0xadf88
movq -0x30(%rbp), %rdi
leaq 0x3697d(%rip), %rsi # 0xe47f3
movl $0x19, %edx
callq 0xad7a0
cmpl $0x0, %eax
jne 0xadea2
movq -0x28(%rbp), %rax
movq 0x8(%rax), %rax
movq 0xa8(%rax), %rax
movl %eax, %ecx
movq -0x30(%rbp), %rax
movl %ecx, 0x24(%rax)
jmp 0xadf86
movq -0x30(%rbp), %rdi
leaq 0x36960(%rip), %rsi # 0xe480d
movl $0x10, %edx
callq 0xad7a0
cmpl $0x0, %eax
jne 0xaded9
movq -0x28(%rbp), %rax
movq 0x8(%rax), %rax
movq 0xb0(%rax), %rax
movl %eax, %ecx
movq -0x30(%rbp), %rax
movl %ecx, 0x24(%rax)
jmp 0xadf84
movq -0x30(%rbp), %rdi
leaq 0x3693a(%rip), %rsi # 0xe481e
movl $0xf, %edx
callq 0xad7a0
cmpl $0x0, %eax
jne 0xadf0d
movq -0x28(%rbp), %rax
movq 0x8(%rax), %rax
movq 0xb8(%rax), %rax
movl %eax, %ecx
movq -0x30(%rbp), %rax
movl %ecx, 0x24(%rax)
jmp 0xadf82
movq -0x30(%rbp), %rdi
leaq 0x36916(%rip), %rsi # 0xe482e
movl $0x10, %edx
callq 0xad7a0
cmpl $0x0, %eax
jne 0xadf41
movq -0x28(%rbp), %rax
movq 0x8(%rax), %rax
movq 0xc0(%rax), %rax
movl %eax, %ecx
movq -0x30(%rbp), %rax
movl %ecx, 0x24(%rax)
jmp 0xadf80
movq -0x30(%rbp), %rdi
leaq 0x368f3(%rip), %rsi # 0xe483f
movl $0xf, %edx
callq 0xad7a0
cmpl $0x0, %eax
jne 0xadf75
movq -0x28(%rbp), %rax
movq 0x8(%rax), %rax
movq 0xc8(%rax), %rax
movl %eax, %ecx
movq -0x30(%rbp), %rax
movl %ecx, 0x24(%rax)
jmp 0xadf7e
movl $0x0, -0x4(%rbp)
jmp 0xadfd3
jmp 0xadf80
jmp 0xadf82
jmp 0xadf84
jmp 0xadf86
jmp 0xadf88
jmp 0xadf8a
jmp 0xadf8c
jmp 0xadf8e
jmp 0xadf90
jmp 0xadf92
jmp 0xadf94
movq -0x18(%rbp), %rdi
movq -0x20(%rbp), %rsi
movq -0x30(%rbp), %rax
movslq 0x24(%rax), %rdx
callq 0xae0f0
cmpl $0x0, %eax
jne 0xadfc7
jmp 0xadfb0
jmp 0xadfb2
movq -0x10(%rbp), %rdi
leaq 0x36892(%rip), %rsi # 0xe484f
callq 0xae160
movl %eax, -0x4(%rbp)
jmp 0xadfd3
movq -0x10(%rbp), %rdi
callq 0xad800
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax)
|
my_coll_parser_scan_logical_position:
push rbp
mov rbp, rsp
sub rsp, 30h
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov [rbp+var_20], rdx
mov rax, [rbp+var_10]
mov rax, [rax+0F0h]
mov [rbp+var_28], rax
mov rdi, [rbp+var_10]
call my_coll_parser_curr
mov [rbp+var_30], rax
mov rdi, [rbp+var_30]
lea rsi, aFirstNonIgnora; "[first non-ignorable]"
mov edx, 15h
call lex_cmp
cmp eax, 0
jnz short loc_ADD24
mov rax, [rbp+var_28]
mov rax, [rax+8]
mov rax, [rax+70h]
mov ecx, eax
mov rax, [rbp+var_30]
mov [rax+24h], ecx
jmp loc_ADF94
loc_ADD24:
mov rdi, [rbp+var_30]
lea rsi, aLastNonIgnorab; "[last non-ignorable]"
mov edx, 14h
call lex_cmp
cmp eax, 0
jnz short loc_ADD58
mov rax, [rbp+var_28]
mov rax, [rax+8]
mov rax, [rax+78h]
mov ecx, eax
mov rax, [rbp+var_30]
mov [rax+24h], ecx
jmp loc_ADF92
loc_ADD58:
mov rdi, [rbp+var_30]
lea rsi, aFirstPrimaryIg; "[first primary ignorable]"
mov edx, 19h
call lex_cmp
cmp eax, 0
jnz short loc_ADD8F
mov rax, [rbp+var_28]
mov rax, [rax+8]
mov rax, [rax+80h]
mov ecx, eax
mov rax, [rbp+var_30]
mov [rax+24h], ecx
jmp loc_ADF90
loc_ADD8F:
mov rdi, [rbp+var_30]
lea rsi, aLastPrimaryIgn; "[last primary ignorable]"
mov edx, 18h
call lex_cmp
cmp eax, 0
jnz short loc_ADDC6
mov rax, [rbp+var_28]
mov rax, [rax+8]
mov rax, [rax+88h]
mov ecx, eax
mov rax, [rbp+var_30]
mov [rax+24h], ecx
jmp loc_ADF8E
loc_ADDC6:
mov rdi, [rbp+var_30]
lea rsi, aFirstSecondary; "[first secondary ignorable]"
mov edx, 1Bh
call lex_cmp
cmp eax, 0
jnz short loc_ADDFD
mov rax, [rbp+var_28]
mov rax, [rax+8]
mov rax, [rax+90h]
mov ecx, eax
mov rax, [rbp+var_30]
mov [rax+24h], ecx
jmp loc_ADF8C
loc_ADDFD:
mov rdi, [rbp+var_30]
lea rsi, aLastSecondaryI; "[last secondary ignorable]"
mov edx, 1Ah
call lex_cmp
cmp eax, 0
jnz short loc_ADE34
mov rax, [rbp+var_28]
mov rax, [rax+8]
mov rax, [rax+98h]
mov ecx, eax
mov rax, [rbp+var_30]
mov [rax+24h], ecx
jmp loc_ADF8A
loc_ADE34:
mov rdi, [rbp+var_30]
lea rsi, aFirstTertiaryI; "[first tertiary ignorable]"
mov edx, 1Ah
call lex_cmp
cmp eax, 0
jnz short loc_ADE6B
mov rax, [rbp+var_28]
mov rax, [rax+8]
mov rax, [rax+0A0h]
mov ecx, eax
mov rax, [rbp+var_30]
mov [rax+24h], ecx
jmp loc_ADF88
loc_ADE6B:
mov rdi, [rbp+var_30]
lea rsi, aLastTertiaryIg; "[last tertiary ignorable]"
mov edx, 19h
call lex_cmp
cmp eax, 0
jnz short loc_ADEA2
mov rax, [rbp+var_28]
mov rax, [rax+8]
mov rax, [rax+0A8h]
mov ecx, eax
mov rax, [rbp+var_30]
mov [rax+24h], ecx
jmp loc_ADF86
loc_ADEA2:
mov rdi, [rbp+var_30]
lea rsi, aFirstTrailing; "[first trailing]"
mov edx, 10h
call lex_cmp
cmp eax, 0
jnz short loc_ADED9
mov rax, [rbp+var_28]
mov rax, [rax+8]
mov rax, [rax+0B0h]
mov ecx, eax
mov rax, [rbp+var_30]
mov [rax+24h], ecx
jmp loc_ADF84
loc_ADED9:
mov rdi, [rbp+var_30]
lea rsi, aLastTrailing; "[last trailing]"
mov edx, 0Fh
call lex_cmp
cmp eax, 0
jnz short loc_ADF0D
mov rax, [rbp+var_28]
mov rax, [rax+8]
mov rax, [rax+0B8h]
mov ecx, eax
mov rax, [rbp+var_30]
mov [rax+24h], ecx
jmp short loc_ADF82
loc_ADF0D:
mov rdi, [rbp+var_30]
lea rsi, aFirstVariable; "[first variable]"
mov edx, 10h
call lex_cmp
cmp eax, 0
jnz short loc_ADF41
mov rax, [rbp+var_28]
mov rax, [rax+8]
mov rax, [rax+0C0h]
mov ecx, eax
mov rax, [rbp+var_30]
mov [rax+24h], ecx
jmp short loc_ADF80
loc_ADF41:
mov rdi, [rbp+var_30]
lea rsi, aLastVariable; "[last variable]"
mov edx, 0Fh
call lex_cmp
cmp eax, 0
jnz short loc_ADF75
mov rax, [rbp+var_28]
mov rax, [rax+8]
mov rax, [rax+0C8h]
mov ecx, eax
mov rax, [rbp+var_30]
mov [rax+24h], ecx
jmp short loc_ADF7E
loc_ADF75:
mov [rbp+var_4], 0
jmp short loc_ADFD3
loc_ADF7E:
jmp short $+2
loc_ADF80:
jmp short $+2
loc_ADF82:
jmp short $+2
loc_ADF84:
jmp short $+2
loc_ADF86:
jmp short $+2
loc_ADF88:
jmp short $+2
loc_ADF8A:
jmp short $+2
loc_ADF8C:
jmp short $+2
loc_ADF8E:
jmp short $+2
loc_ADF90:
jmp short $+2
loc_ADF92:
jmp short $+2
loc_ADF94:
mov rdi, [rbp+var_18]
mov rsi, [rbp+var_20]
mov rax, [rbp+var_30]
movsxd rdx, dword ptr [rax+24h]
call my_coll_rule_expand
cmp eax, 0
jnz short loc_ADFC7
jmp short $+2
loc_ADFB0:
jmp short $+2
loc_ADFB2:
mov rdi, [rbp+var_10]
lea rsi, aLogicalPositio; "Logical position"
call my_coll_parser_too_long_error
mov [rbp+var_4], eax
jmp short loc_ADFD3
loc_ADFC7:
mov rdi, [rbp+var_10]
call my_coll_parser_scan
mov [rbp+var_4], eax
loc_ADFD3:
mov eax, [rbp+var_4]
add rsp, 30h
pop rbp
retn
|
long long my_coll_parser_scan_logical_position(long long a1, long long a2, long long a3)
{
long long v4; // [rsp+0h] [rbp-30h]
long long v5; // [rsp+8h] [rbp-28h]
v5 = *(_QWORD *)(a1 + 240);
v4 = my_coll_parser_curr(a1);
if ( (unsigned int)lex_cmp(v4, (long long)"[first non-ignorable]", 0x15uLL) )
{
if ( (unsigned int)lex_cmp(v4, (long long)"[last non-ignorable]", 0x14uLL) )
{
if ( (unsigned int)lex_cmp(v4, (long long)"[first primary ignorable]", 0x19uLL) )
{
if ( (unsigned int)lex_cmp(v4, (long long)"[last primary ignorable]", 0x18uLL) )
{
if ( (unsigned int)lex_cmp(v4, (long long)"[first secondary ignorable]", 0x1BuLL) )
{
if ( (unsigned int)lex_cmp(v4, (long long)"[last secondary ignorable]", 0x1AuLL) )
{
if ( (unsigned int)lex_cmp(v4, (long long)"[first tertiary ignorable]", 0x1AuLL) )
{
if ( (unsigned int)lex_cmp(v4, (long long)"[last tertiary ignorable]", 0x19uLL) )
{
if ( (unsigned int)lex_cmp(v4, (long long)"[first trailing]", 0x10uLL) )
{
if ( (unsigned int)lex_cmp(v4, (long long)"[last trailing]", 0xFuLL) )
{
if ( (unsigned int)lex_cmp(v4, (long long)"[first variable]", 0x10uLL) )
{
if ( (unsigned int)lex_cmp(v4, (long long)"[last variable]", 0xFuLL) )
return 0;
*(_DWORD *)(v4 + 36) = *(_QWORD *)(*(_QWORD *)(v5 + 8) + 200LL);
}
else
{
*(_DWORD *)(v4 + 36) = *(_QWORD *)(*(_QWORD *)(v5 + 8) + 192LL);
}
}
else
{
*(_DWORD *)(v4 + 36) = *(_QWORD *)(*(_QWORD *)(v5 + 8) + 184LL);
}
}
else
{
*(_DWORD *)(v4 + 36) = *(_QWORD *)(*(_QWORD *)(v5 + 8) + 176LL);
}
}
else
{
*(_DWORD *)(v4 + 36) = *(_QWORD *)(*(_QWORD *)(v5 + 8) + 168LL);
}
}
else
{
*(_DWORD *)(v4 + 36) = *(_QWORD *)(*(_QWORD *)(v5 + 8) + 160LL);
}
}
else
{
*(_DWORD *)(v4 + 36) = *(_QWORD *)(*(_QWORD *)(v5 + 8) + 152LL);
}
}
else
{
*(_DWORD *)(v4 + 36) = *(_QWORD *)(*(_QWORD *)(v5 + 8) + 144LL);
}
}
else
{
*(_DWORD *)(v4 + 36) = *(_QWORD *)(*(_QWORD *)(v5 + 8) + 136LL);
}
}
else
{
*(_DWORD *)(v4 + 36) = *(_QWORD *)(*(_QWORD *)(v5 + 8) + 128LL);
}
}
else
{
*(_DWORD *)(v4 + 36) = *(_QWORD *)(*(_QWORD *)(v5 + 8) + 120LL);
}
}
else
{
*(_DWORD *)(v4 + 36) = *(_QWORD *)(*(_QWORD *)(v5 + 8) + 112LL);
}
if ( (unsigned int)my_coll_rule_expand(a2, a3, *(int *)(v4 + 36)) )
return (unsigned int)my_coll_parser_scan(a1);
else
return (unsigned int)my_coll_parser_too_long_error(a1, "Logical position");
}
|
my_coll_parser_scan_logical_position:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x30
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x18],RSI
MOV qword ptr [RBP + -0x20],RDX
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0xf0]
MOV qword ptr [RBP + -0x28],RAX
MOV RDI,qword ptr [RBP + -0x10]
CALL 0x001ad020
MOV qword ptr [RBP + -0x30],RAX
MOV RDI,qword ptr [RBP + -0x30]
LEA RSI,[0x1e4743]
MOV EDX,0x15
CALL 0x001ad7a0
CMP EAX,0x0
JNZ 0x001add24
MOV RAX,qword ptr [RBP + -0x28]
MOV RAX,qword ptr [RAX + 0x8]
MOV RAX,qword ptr [RAX + 0x70]
MOV ECX,EAX
MOV RAX,qword ptr [RBP + -0x30]
MOV dword ptr [RAX + 0x24],ECX
JMP 0x001adf94
LAB_001add24:
MOV RDI,qword ptr [RBP + -0x30]
LEA RSI,[0x1e4759]
MOV EDX,0x14
CALL 0x001ad7a0
CMP EAX,0x0
JNZ 0x001add58
MOV RAX,qword ptr [RBP + -0x28]
MOV RAX,qword ptr [RAX + 0x8]
MOV RAX,qword ptr [RAX + 0x78]
MOV ECX,EAX
MOV RAX,qword ptr [RBP + -0x30]
MOV dword ptr [RAX + 0x24],ECX
JMP 0x001adf92
LAB_001add58:
MOV RDI,qword ptr [RBP + -0x30]
LEA RSI,[0x1e476e]
MOV EDX,0x19
CALL 0x001ad7a0
CMP EAX,0x0
JNZ 0x001add8f
MOV RAX,qword ptr [RBP + -0x28]
MOV RAX,qword ptr [RAX + 0x8]
MOV RAX,qword ptr [RAX + 0x80]
MOV ECX,EAX
MOV RAX,qword ptr [RBP + -0x30]
MOV dword ptr [RAX + 0x24],ECX
JMP 0x001adf90
LAB_001add8f:
MOV RDI,qword ptr [RBP + -0x30]
LEA RSI,[0x1e4788]
MOV EDX,0x18
CALL 0x001ad7a0
CMP EAX,0x0
JNZ 0x001addc6
MOV RAX,qword ptr [RBP + -0x28]
MOV RAX,qword ptr [RAX + 0x8]
MOV RAX,qword ptr [RAX + 0x88]
MOV ECX,EAX
MOV RAX,qword ptr [RBP + -0x30]
MOV dword ptr [RAX + 0x24],ECX
JMP 0x001adf8e
LAB_001addc6:
MOV RDI,qword ptr [RBP + -0x30]
LEA RSI,[0x1e47a1]
MOV EDX,0x1b
CALL 0x001ad7a0
CMP EAX,0x0
JNZ 0x001addfd
MOV RAX,qword ptr [RBP + -0x28]
MOV RAX,qword ptr [RAX + 0x8]
MOV RAX,qword ptr [RAX + 0x90]
MOV ECX,EAX
MOV RAX,qword ptr [RBP + -0x30]
MOV dword ptr [RAX + 0x24],ECX
JMP 0x001adf8c
LAB_001addfd:
MOV RDI,qword ptr [RBP + -0x30]
LEA RSI,[0x1e47bd]
MOV EDX,0x1a
CALL 0x001ad7a0
CMP EAX,0x0
JNZ 0x001ade34
MOV RAX,qword ptr [RBP + -0x28]
MOV RAX,qword ptr [RAX + 0x8]
MOV RAX,qword ptr [RAX + 0x98]
MOV ECX,EAX
MOV RAX,qword ptr [RBP + -0x30]
MOV dword ptr [RAX + 0x24],ECX
JMP 0x001adf8a
LAB_001ade34:
MOV RDI,qword ptr [RBP + -0x30]
LEA RSI,[0x1e47d8]
MOV EDX,0x1a
CALL 0x001ad7a0
CMP EAX,0x0
JNZ 0x001ade6b
MOV RAX,qword ptr [RBP + -0x28]
MOV RAX,qword ptr [RAX + 0x8]
MOV RAX,qword ptr [RAX + 0xa0]
MOV ECX,EAX
MOV RAX,qword ptr [RBP + -0x30]
MOV dword ptr [RAX + 0x24],ECX
JMP 0x001adf88
LAB_001ade6b:
MOV RDI,qword ptr [RBP + -0x30]
LEA RSI,[0x1e47f3]
MOV EDX,0x19
CALL 0x001ad7a0
CMP EAX,0x0
JNZ 0x001adea2
MOV RAX,qword ptr [RBP + -0x28]
MOV RAX,qword ptr [RAX + 0x8]
MOV RAX,qword ptr [RAX + 0xa8]
MOV ECX,EAX
MOV RAX,qword ptr [RBP + -0x30]
MOV dword ptr [RAX + 0x24],ECX
JMP 0x001adf86
LAB_001adea2:
MOV RDI,qword ptr [RBP + -0x30]
LEA RSI,[0x1e480d]
MOV EDX,0x10
CALL 0x001ad7a0
CMP EAX,0x0
JNZ 0x001aded9
MOV RAX,qword ptr [RBP + -0x28]
MOV RAX,qword ptr [RAX + 0x8]
MOV RAX,qword ptr [RAX + 0xb0]
MOV ECX,EAX
MOV RAX,qword ptr [RBP + -0x30]
MOV dword ptr [RAX + 0x24],ECX
JMP 0x001adf84
LAB_001aded9:
MOV RDI,qword ptr [RBP + -0x30]
LEA RSI,[0x1e481e]
MOV EDX,0xf
CALL 0x001ad7a0
CMP EAX,0x0
JNZ 0x001adf0d
MOV RAX,qword ptr [RBP + -0x28]
MOV RAX,qword ptr [RAX + 0x8]
MOV RAX,qword ptr [RAX + 0xb8]
MOV ECX,EAX
MOV RAX,qword ptr [RBP + -0x30]
MOV dword ptr [RAX + 0x24],ECX
JMP 0x001adf82
LAB_001adf0d:
MOV RDI,qword ptr [RBP + -0x30]
LEA RSI,[0x1e482e]
MOV EDX,0x10
CALL 0x001ad7a0
CMP EAX,0x0
JNZ 0x001adf41
MOV RAX,qword ptr [RBP + -0x28]
MOV RAX,qword ptr [RAX + 0x8]
MOV RAX,qword ptr [RAX + 0xc0]
MOV ECX,EAX
MOV RAX,qword ptr [RBP + -0x30]
MOV dword ptr [RAX + 0x24],ECX
JMP 0x001adf80
LAB_001adf41:
MOV RDI,qword ptr [RBP + -0x30]
LEA RSI,[0x1e483f]
MOV EDX,0xf
CALL 0x001ad7a0
CMP EAX,0x0
JNZ 0x001adf75
MOV RAX,qword ptr [RBP + -0x28]
MOV RAX,qword ptr [RAX + 0x8]
MOV RAX,qword ptr [RAX + 0xc8]
MOV ECX,EAX
MOV RAX,qword ptr [RBP + -0x30]
MOV dword ptr [RAX + 0x24],ECX
JMP 0x001adf7e
LAB_001adf75:
MOV dword ptr [RBP + -0x4],0x0
JMP 0x001adfd3
LAB_001adf7e:
JMP 0x001adf80
LAB_001adf80:
JMP 0x001adf82
LAB_001adf82:
JMP 0x001adf84
LAB_001adf84:
JMP 0x001adf86
LAB_001adf86:
JMP 0x001adf88
LAB_001adf88:
JMP 0x001adf8a
LAB_001adf8a:
JMP 0x001adf8c
LAB_001adf8c:
JMP 0x001adf8e
LAB_001adf8e:
JMP 0x001adf90
LAB_001adf90:
JMP 0x001adf92
LAB_001adf92:
JMP 0x001adf94
LAB_001adf94:
MOV RDI,qword ptr [RBP + -0x18]
MOV RSI,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RBP + -0x30]
MOVSXD RDX,dword ptr [RAX + 0x24]
CALL 0x001ae0f0
CMP EAX,0x0
JNZ 0x001adfc7
JMP 0x001adfb0
LAB_001adfb0:
JMP 0x001adfb2
LAB_001adfb2:
MOV RDI,qword ptr [RBP + -0x10]
LEA RSI,[0x1e484f]
CALL 0x001ae160
MOV dword ptr [RBP + -0x4],EAX
JMP 0x001adfd3
LAB_001adfc7:
MOV RDI,qword ptr [RBP + -0x10]
CALL 0x001ad800
MOV dword ptr [RBP + -0x4],EAX
LAB_001adfd3:
MOV EAX,dword ptr [RBP + -0x4]
ADD RSP,0x30
POP RBP
RET
|
int4 my_coll_parser_scan_logical_position(long param_1,int8 param_2,int8 param_3)
{
long lVar1;
int iVar2;
long lVar3;
int4 local_c;
lVar1 = *(long *)(param_1 + 0xf0);
lVar3 = my_coll_parser_curr(param_1);
iVar2 = lex_cmp(lVar3,"[first non-ignorable]",0x15);
if (iVar2 == 0) {
*(int *)(lVar3 + 0x24) = (int)*(int8 *)(*(long *)(lVar1 + 8) + 0x70);
}
else {
iVar2 = lex_cmp(lVar3,"[last non-ignorable]",0x14);
if (iVar2 == 0) {
*(int *)(lVar3 + 0x24) = (int)*(int8 *)(*(long *)(lVar1 + 8) + 0x78);
}
else {
iVar2 = lex_cmp(lVar3,"[first primary ignorable]",0x19);
if (iVar2 == 0) {
*(int *)(lVar3 + 0x24) = (int)*(int8 *)(*(long *)(lVar1 + 8) + 0x80);
}
else {
iVar2 = lex_cmp(lVar3,"[last primary ignorable]",0x18);
if (iVar2 == 0) {
*(int *)(lVar3 + 0x24) = (int)*(int8 *)(*(long *)(lVar1 + 8) + 0x88);
}
else {
iVar2 = lex_cmp(lVar3,"[first secondary ignorable]",0x1b);
if (iVar2 == 0) {
*(int *)(lVar3 + 0x24) = (int)*(int8 *)(*(long *)(lVar1 + 8) + 0x90);
}
else {
iVar2 = lex_cmp(lVar3,"[last secondary ignorable]",0x1a);
if (iVar2 == 0) {
*(int *)(lVar3 + 0x24) = (int)*(int8 *)(*(long *)(lVar1 + 8) + 0x98);
}
else {
iVar2 = lex_cmp(lVar3,"[first tertiary ignorable]",0x1a);
if (iVar2 == 0) {
*(int *)(lVar3 + 0x24) = (int)*(int8 *)(*(long *)(lVar1 + 8) + 0xa0);
}
else {
iVar2 = lex_cmp(lVar3,"[last tertiary ignorable]",0x19);
if (iVar2 == 0) {
*(int *)(lVar3 + 0x24) = (int)*(int8 *)(*(long *)(lVar1 + 8) + 0xa8);
}
else {
iVar2 = lex_cmp(lVar3,"[first trailing]",0x10);
if (iVar2 == 0) {
*(int *)(lVar3 + 0x24) = (int)*(int8 *)(*(long *)(lVar1 + 8) + 0xb0);
}
else {
iVar2 = lex_cmp(lVar3,"[last trailing]",0xf);
if (iVar2 == 0) {
*(int *)(lVar3 + 0x24) = (int)*(int8 *)(*(long *)(lVar1 + 8) + 0xb8);
}
else {
iVar2 = lex_cmp(lVar3,"[first variable]",0x10);
if (iVar2 == 0) {
*(int *)(lVar3 + 0x24) = (int)*(int8 *)(*(long *)(lVar1 + 8) + 0xc0);
}
else {
iVar2 = lex_cmp(lVar3,"[last variable]",0xf);
if (iVar2 != 0) {
return 0;
}
*(int *)(lVar3 + 0x24) = (int)*(int8 *)(*(long *)(lVar1 + 8) + 200);
}
}
}
}
}
}
}
}
}
}
}
iVar2 = my_coll_rule_expand(param_2,param_3,(long)*(int *)(lVar3 + 0x24));
if (iVar2 == 0) {
local_c = my_coll_parser_too_long_error(param_1,"Logical position");
}
else {
local_c = my_coll_parser_scan(param_1);
}
return local_c;
}
|
|
8,990 |
ImPlot3D::GetColormapSize(int)
|
zkingston[P]unknot/build_O1/_deps/implot3d-src/implot3d.cpp
|
int GetColormapSize(ImPlot3DColormap cmap) {
ImPlot3DContext& gp = *GImPlot3D;
cmap = cmap == IMPLOT3D_AUTO ? gp.Style.Colormap : cmap;
IM_ASSERT_USER_ERROR(cmap >= 0 && cmap < gp.ColormapData.Count, "Invalid colormap index!");
return gp.ColormapData.GetKeyCount(cmap);
}
|
O1
|
cpp
|
ImPlot3D::GetColormapSize(int):
pushq %r14
pushq %rbx
pushq %rax
movl %edi, %ebx
movq 0x2e28da(%rip), %r14 # 0x336c98
cmpl $-0x1, %edi
jne 0x543ca
movl 0x1d0(%r14), %ebx
testl %ebx, %ebx
js 0x543d7
cmpl 0x2a8(%r14), %ebx
jl 0x543e3
leaq 0x2412a9(%rip), %rdi # 0x295687
callq 0x2161f4
movq 0x220(%r14), %rax
movslq %ebx, %rcx
movl (%rax,%rcx,4), %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
|
_ZN8ImPlot3D15GetColormapSizeEi:
push r14
push rbx
push rax
mov ebx, edi
mov r14, cs:_ZN8ImPlot3D9GImPlot3DE; ImPlot3D::GImPlot3D
cmp edi, 0FFFFFFFFh
jnz short loc_543CA
mov ebx, [r14+1D0h]
loc_543CA:
test ebx, ebx
js short loc_543D7
cmp ebx, [r14+2A8h]
jl short loc_543E3
loc_543D7:
lea rdi, aInvalidColorma; "Invalid colormap index!"
call _ZN5ImGui8ErrorLogEPKc; ImGui::ErrorLog(char const*)
loc_543E3:
mov rax, [r14+220h]
movsxd rcx, ebx
mov eax, [rax+rcx*4]
add rsp, 8
pop rbx
pop r14
retn
|
long long ImPlot3D::GetColormapSize(ImPlot3D *this, const char *a2)
{
int v2; // ebx
ImGui *v3; // r14
v2 = (int)this;
v3 = ImPlot3D::GImPlot3D;
if ( (_DWORD)this == -1 )
v2 = *((_DWORD *)ImPlot3D::GImPlot3D + 116);
if ( v2 < 0 || v2 >= *((_DWORD *)ImPlot3D::GImPlot3D + 170) )
ImGui::ErrorLog((ImGui *)"Invalid colormap index!", a2);
return *(unsigned int *)(*((_QWORD *)v3 + 68) + 4LL * v2);
}
|
GetColormapSize:
PUSH R14
PUSH RBX
PUSH RAX
MOV EBX,EDI
MOV R14,qword ptr [0x00436c98]
CMP EDI,-0x1
JNZ 0x001543ca
MOV EBX,dword ptr [R14 + 0x1d0]
LAB_001543ca:
TEST EBX,EBX
JS 0x001543d7
CMP EBX,dword ptr [R14 + 0x2a8]
JL 0x001543e3
LAB_001543d7:
LEA RDI,[0x395687]
CALL 0x003161f4
LAB_001543e3:
MOV RAX,qword ptr [R14 + 0x220]
MOVSXD RCX,EBX
MOV EAX,dword ptr [RAX + RCX*0x4]
ADD RSP,0x8
POP RBX
POP R14
RET
|
/* ImPlot3D::GetColormapSize(int) */
int4 ImPlot3D::GetColormapSize(int param_1)
{
long lVar1;
lVar1 = GImPlot3D;
if (param_1 == -1) {
param_1 = *(int *)(GImPlot3D + 0x1d0);
}
if ((param_1 < 0) || (*(int *)(GImPlot3D + 0x2a8) <= param_1)) {
ImGui::ErrorLog("Invalid colormap index!");
}
return *(int4 *)(*(long *)(lVar1 + 0x220) + (long)param_1 * 4);
}
|
|
8,991 |
nlohmann::json_abi_v3_11_3::ordered_map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>, std::less<void>, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>>>::erase(__gnu_cxx::__normal_iterator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>*, std::vector<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>>>>, __gnu_cxx::__normal_iterator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>*, std::vector<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>>>>)
|
llama.cpp/common/json.hpp
|
iterator erase(iterator first, iterator last)
{
if (first == last)
{
return first;
}
const auto elements_affected = std::distance(first, last);
const auto offset = std::distance(Container::begin(), first);
// This is the start situation. We need to delete elements_affected
// elements (3 in this example: e, f, g), and need to return an
// iterator past the last deleted element (h in this example).
// Note that offset is the distance from the start of the vector
// to first. We will need this later.
// [ a, b, c, d, e, f, g, h, i, j ]
// ^ ^
// first last
// Since we cannot move const Keys, we re-construct them in place.
// We start at first and re-construct (viz. copy) the elements from
// the back of the vector. Example for first iteration:
// ,--------.
// v | destroy e and re-construct with h
// [ a, b, c, d, e, f, g, h, i, j ]
// ^ ^
// it it + elements_affected
for (auto it = first; std::next(it, elements_affected) != Container::end(); ++it)
{
it->~value_type(); // destroy but keep allocation
new (&*it) value_type{std::move(*std::next(it, elements_affected))}; // "move" next element to it
}
// [ a, b, c, d, h, i, j, h, i, j ]
// ^ ^
// first last
// remove the unneeded elements at the end of the vector
Container::resize(this->size() - static_cast<size_type>(elements_affected));
// [ a, b, c, d, h, i, j ]
// ^ ^
// first last
// first is now pointing past the last deleted element, but we cannot
// use this iterator, because it may have been invalidated by the
// resize call. Instead, we can return begin() + offset.
return Container::begin() + offset;
}
|
O3
|
cpp
|
nlohmann::json_abi_v3_11_3::ordered_map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>, std::less<void>, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>>>::erase(__gnu_cxx::__normal_iterator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>*, std::vector<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>>>>, __gnu_cxx::__normal_iterator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>*, std::vector<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>>>>):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rsi, %rbx
cmpq %rdx, %rsi
je 0x8a828
movq %rdx, %r15
movq %rdi, %r14
movq %rdx, %rax
subq %rbx, %rax
sarq $0x4, %rax
movabsq $-0x5555555555555555, %rcx # imm = 0xAAAAAAAAAAAAAAAB
imulq %rcx, %rax
movq %rax, 0x10(%rsp)
movq (%rdi), %rax
movq %rax, 0x8(%rsp)
leaq 0x10(%rbx), %rbp
movq %rdx, %r12
negq %r12
cmpq 0x8(%r14), %r15
je 0x8a7f8
leaq 0x10(%rbp), %r13
movq %r13, %rdi
xorl %esi, %esi
callq 0x8508e
movq %r13, %rdi
callq 0x897a8
movq -0x10(%rbp), %rdi
cmpq %rdi, %rbp
je 0x8a7de
movq (%rbp), %rsi
incq %rsi
callq 0x20180
leaq -0x10(%rbp), %rdi
movq %r15, %rsi
callq 0x8a83a
addq $0x30, %r15
addq $0x30, %rbp
addq $-0x30, %r12
jmp 0x8a7ad
subq 0x8(%rsp), %rbx
addq (%r14), %r12
negq %r12
sarq $0x4, %r12
movabsq $-0x5555555555555555, %rax # imm = 0xAAAAAAAAAAAAAAAB
imulq %rax, %r12
subq 0x10(%rsp), %r12
movq %r14, %rdi
movq %r12, %rsi
callq 0x8a892
addq (%r14), %rbx
movq %rbx, %rax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
|
_ZN8nlohmann16json_abi_v3_11_311ordered_mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS0_10basic_jsonIS1_St6vectorS7_blmdSaNS0_14adl_serializerES9_IhSaIhEEvEESt4lessIvESaISt4pairIKS7_SD_EEE5eraseEN9__gnu_cxx17__normal_iteratorIPSI_S9_ISI_SJ_EEESP_:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 18h
mov rbx, rsi
cmp rsi, rdx
jz loc_8A828
mov r15, rdx
mov r14, rdi
mov rax, rdx
sub rax, rbx
sar rax, 4
mov rcx, 0AAAAAAAAAAAAAAABh
imul rax, rcx
mov [rsp+48h+var_38], rax
mov rax, [rdi]
mov [rsp+48h+var_40], rax
lea rbp, [rbx+10h]
mov r12, rdx
neg r12
loc_8A7AD:
cmp r15, [r14+8]
jz short loc_8A7F8
lea r13, [rbp+10h]
mov rdi, r13
xor esi, esi
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool)
mov rdi, r13
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::data::~data()
mov rdi, [rbp-10h]; void *
cmp rbp, rdi
jz short loc_8A7DE
mov rsi, [rbp+0]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_8A7DE:
lea rdi, [rbp-10h]
mov rsi, r15
call _ZNSt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN8nlohmann16json_abi_v3_11_310basic_jsonINS8_11ordered_mapESt6vectorS5_blmdSaNS8_14adl_serializerESB_IhSaIhEEvEEEC2EOSG_; std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>::pair(std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>&&)
add r15, 30h ; '0'
add rbp, 30h ; '0'
add r12, 0FFFFFFFFFFFFFFD0h
jmp short loc_8A7AD
loc_8A7F8:
sub rbx, [rsp+48h+var_40]
add r12, [r14]
neg r12
sar r12, 4
mov rax, 0AAAAAAAAAAAAAAABh
imul r12, rax
sub r12, [rsp+48h+var_38]
mov rdi, r14
mov rsi, r12
call _ZNSt6vectorISt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN8nlohmann16json_abi_v3_11_310basic_jsonINS9_11ordered_mapES_S6_blmdSaNS9_14adl_serializerES_IhSaIhEEvEEESaISG_EE6resizeEm; std::vector<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>>::resize(ulong)
add rbx, [r14]
loc_8A828:
mov rax, rbx
add rsp, 18h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
|
long long nlohmann::json_abi_v3_11_3::ordered_map<std::string,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,std::less<void>,std::allocator<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>>>::erase(
long long *a1,
long long a2,
long long a3)
{
long long v3; // rbx
long long v4; // r15
char *v6; // rbp
long long v7; // r12
char *v8; // rdi
long long v10; // [rsp+8h] [rbp-40h]
unsigned long long v11; // [rsp+10h] [rbp-38h]
v3 = a2;
if ( a2 != a3 )
{
v4 = a3;
v11 = 0xAAAAAAAAAAAAAAABLL * ((a3 - a2) >> 4);
v10 = *a1;
v6 = (char *)(a2 + 16);
v7 = -a3;
while ( v4 != a1[1] )
{
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::assert_invariant(v6 + 16);
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::data::~data(v6 + 16);
v8 = (char *)*((_QWORD *)v6 - 2);
if ( v6 != v8 )
operator delete(v8, *(_QWORD *)v6 + 1LL);
std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>::pair(
v6 - 16,
v4);
v4 += 48LL;
v6 += 48;
v7 -= 48LL;
}
std::vector<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>>::resize(
a1,
0xAAAAAAAAAAAAAAABLL * (-(*a1 + v7) >> 4) - v11);
return *a1 + a2 - v10;
}
return v3;
}
|
erase:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x18
MOV RBX,RSI
CMP RSI,RDX
JZ 0x0018a828
MOV R15,RDX
MOV R14,RDI
MOV RAX,RDX
SUB RAX,RBX
SAR RAX,0x4
MOV RCX,-0x5555555555555555
IMUL RAX,RCX
MOV qword ptr [RSP + 0x10],RAX
MOV RAX,qword ptr [RDI]
MOV qword ptr [RSP + 0x8],RAX
LEA RBP,[RBX + 0x10]
MOV R12,RDX
NEG R12
LAB_0018a7ad:
CMP R15,qword ptr [R14 + 0x8]
JZ 0x0018a7f8
LEA R13,[RBP + 0x10]
MOV RDI,R13
XOR ESI,ESI
CALL 0x0018508e
MOV RDI,R13
CALL 0x001897a8
MOV RDI,qword ptr [RBP + -0x10]
CMP RBP,RDI
JZ 0x0018a7de
MOV RSI,qword ptr [RBP]
INC RSI
CALL 0x00120180
LAB_0018a7de:
LEA RDI,[RBP + -0x10]
MOV RSI,R15
CALL 0x0018a83a
ADD R15,0x30
ADD RBP,0x30
ADD R12,-0x30
JMP 0x0018a7ad
LAB_0018a7f8:
SUB RBX,qword ptr [RSP + 0x8]
ADD R12,qword ptr [R14]
NEG R12
SAR R12,0x4
MOV RAX,-0x5555555555555555
IMUL R12,RAX
SUB R12,qword ptr [RSP + 0x10]
MOV RDI,R14
MOV RSI,R12
CALL 0x0018a892
ADD RBX,qword ptr [R14]
LAB_0018a828:
MOV RAX,RBX
ADD RSP,0x18
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
/* nlohmann::json_abi_v3_11_3::ordered_map<std::__cxx11::string,
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector,
std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void>, std::less<void>, std::allocator<std::pair<std::__cxx11::string const,
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector,
std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void> > > >::erase(__gnu_cxx::__normal_iterator<std::pair<std::__cxx11::string const,
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector,
std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void> >*, std::vector<std::pair<std::__cxx11::string const,
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector,
std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void> >, std::allocator<std::pair<std::__cxx11::string const,
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector,
std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void> > > > >, __gnu_cxx::__normal_iterator<std::pair<std::__cxx11::string const,
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector,
std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void> >*, std::vector<std::pair<std::__cxx11::string const,
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector,
std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void> >, std::allocator<std::pair<std::__cxx11::string const,
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector,
std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void> > > > >) */
pair * __thiscall
nlohmann::json_abi_v3_11_3::
ordered_map<std::__cxx11::string,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,std::less<void>,std::allocator<std::pair<std::__cxx11::string_const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>>
::erase(ordered_map<std::__cxx11::string,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,std::less<void>,std::allocator<std::pair<std::__cxx11::string_const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>>
*this,pair *param_2,pair *param_3)
{
long lVar1;
long lVar2;
pair *ppVar3;
long lVar4;
if (param_2 != param_3) {
lVar2 = (long)param_3 - (long)param_2;
lVar1 = *(long *)this;
ppVar3 = param_2 + 0x10;
lVar4 = -(long)param_3;
for (; param_3 != *(pair **)(this + 8); param_3 = param_3 + 0x30) {
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::assert_invariant(SUB81((data *)(ppVar3 + 0x10),0));
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::data::~data((data *)(ppVar3 + 0x10));
if (ppVar3 != *(pair **)(ppVar3 + -0x10)) {
operator_delete(*(pair **)(ppVar3 + -0x10),*(long *)ppVar3 + 1);
}
std::
pair<std::__cxx11::string_const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>
::pair((pair<std::__cxx11::string_const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>
*)(ppVar3 + -0x10),param_3);
ppVar3 = ppVar3 + 0x30;
lVar4 = lVar4 + -0x30;
}
std::
vector<std::pair<std::__cxx11::string_const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>,std::allocator<std::pair<std::__cxx11::string_const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>>
::resize((vector<std::pair<std::__cxx11::string_const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>,std::allocator<std::pair<std::__cxx11::string_const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>>
*)this,(-(lVar4 + *(long *)this) >> 4) * -0x5555555555555555 +
(lVar2 >> 4) * 0x5555555555555555);
param_2 = param_2 + (*(long *)this - lVar1);
}
return param_2;
}
|
|
8,992 |
ma_state_info_read
|
eloqsql/storage/maria/ma_open.c
|
static uchar *_ma_state_info_read(uchar *ptr, MARIA_STATE_INFO *state, myf flag)
{
uint i,keys,key_parts;
DBUG_ENTER("_ma_state_info_read");
memcpy(&state->header,ptr, sizeof(state->header));
ptr+= sizeof(state->header);
keys= (uint) state->header.keys;
key_parts= mi_uint2korr(state->header.key_parts);
/* Allocate memory for key parts if not already done */
if (!state->rec_per_key_part &&
!my_multi_malloc(PSI_INSTRUMENT_ME, MYF(MY_WME | flag),
&state->rec_per_key_part,
sizeof(*state->rec_per_key_part) * key_parts,
&state->nulls_per_key_part,
sizeof(*state->nulls_per_key_part) * key_parts,
NullS))
DBUG_RETURN(0);
state->open_count = mi_uint2korr(ptr); ptr+= 2;
state->changed= mi_uint2korr(ptr); ptr+= 2;
state->create_rename_lsn= lsn_korr(ptr); ptr+= LSN_STORE_SIZE;
state->is_of_horizon= lsn_korr(ptr); ptr+= LSN_STORE_SIZE;
state->skip_redo_lsn= lsn_korr(ptr); ptr+= LSN_STORE_SIZE;
state->state.records= mi_rowkorr(ptr); ptr+= 8;
state->state.del = mi_rowkorr(ptr); ptr+= 8;
state->split = mi_rowkorr(ptr); ptr+= 8;
state->dellink= mi_sizekorr(ptr); ptr+= 8;
state->first_bitmap_with_space= mi_sizekorr(ptr); ptr+= 8;
state->state.key_file_length = mi_sizekorr(ptr); ptr+= 8;
state->state.data_file_length= mi_sizekorr(ptr); ptr+= 8;
state->state.empty = mi_sizekorr(ptr); ptr+= 8;
state->state.key_empty= mi_sizekorr(ptr); ptr+= 8;
state->auto_increment=mi_uint8korr(ptr); ptr+= 8;
state->state.checksum=(ha_checksum) mi_uint8korr(ptr);ptr+= 8;
state->create_trid= mi_uint8korr(ptr); ptr+= 8;
state->status = mi_uint4korr(ptr); ptr+= 4;
state->update_count=mi_uint4korr(ptr); ptr+= 4;
state->sortkey= (uint) *ptr++;
ptr++; /* reserved */
ptr+= state->state_diff_length;
for (i=0; i < keys; i++)
{
state->key_root[i]= mi_sizekorr(ptr); ptr+= 8;
}
state->key_del= mi_sizekorr(ptr); ptr+= 8;
state->sec_index_changed = mi_uint4korr(ptr); ptr+= 4;
state->sec_index_used = mi_uint4korr(ptr); ptr+= 4;
state->version = mi_uint4korr(ptr); ptr+= 4;
state->key_map = mi_uint8korr(ptr); ptr+= 8;
state->create_time = (time_t) mi_sizekorr(ptr); ptr+= 8;
state->recover_time =(time_t) mi_sizekorr(ptr); ptr+= 8;
state->check_time = (time_t) mi_sizekorr(ptr); ptr+= 8;
state->records_at_analyze= mi_sizekorr(ptr); ptr+= 8;
ptr+= keys * 4; /* Skip reserved bytes */
for (i=0 ; i < key_parts ; i++)
{
float8get(state->rec_per_key_part[i], ptr); ptr+= 8;
state->nulls_per_key_part[i]= mi_uint4korr(ptr); ptr+= 4;
}
DBUG_PRINT("info", ("Records: %lld", state->state.records));
DBUG_RETURN(ptr);
}
|
O3
|
c
|
ma_state_info_read:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rsi, %rbx
movq %rdi, %r14
movq 0x10(%rdi), %rax
movq %rax, 0x10(%rsi)
movups (%rdi), %xmm0
movups %xmm0, (%rsi)
movzbl 0x12(%rsi), %r9d
movzbl 0xf(%rsi), %r8d
movzbl 0xe(%rsi), %r12d
shll $0x8, %r12d
leal (%r12,%r8), %r13d
cmpq $0x0, 0x100(%rsi)
jne 0x59971
leaq 0x100(%rbx), %rax
orq $0x10, %rdx
leal (,%r13,8), %ecx
movq %r8, -0x38(%rbp)
leaq 0x108(%rbx), %r8
movq $0x0, (%rsp)
xorl %r15d, %r15d
xorl %edi, %edi
movq %rdx, %rsi
movq %rax, %rdx
movq %r9, -0x30(%rbp)
movq %rcx, %r9
xorl %eax, %eax
callq 0xb9430
movq -0x30(%rbp), %r9
movq -0x38(%rbp), %r8
testq %rax, %rax
je 0x59bb3
movzwl 0x18(%r14), %eax
rolw $0x8, %ax
movzwl %ax, %eax
movl %eax, 0x16c(%rbx)
movzwl 0x1a(%r14), %eax
rolw $0x8, %ax
movzwl %ax, %eax
movl %eax, 0x170(%rbx)
movzwl 0x1c(%r14), %eax
shlq $0x20, %rax
movzbl 0x1e(%r14), %ecx
shlq $0x30, %rcx
orq %rax, %rcx
movl 0x1f(%r14), %eax
orq %rcx, %rax
movq %rax, 0x178(%rbx)
movzwl 0x23(%r14), %eax
shlq $0x20, %rax
movzbl 0x25(%r14), %ecx
shlq $0x30, %rcx
orq %rax, %rcx
movl 0x26(%r14), %eax
orq %rcx, %rax
movq %rax, 0x180(%rbx)
movzwl 0x2a(%r14), %eax
shlq $0x20, %rax
movzbl 0x2c(%r14), %ecx
shlq $0x30, %rcx
orq %rax, %rcx
movl 0x2d(%r14), %eax
orq %rcx, %rax
movq %rax, 0x188(%rbx)
movq 0x31(%r14), %rax
bswapq %rax
movq %rax, 0x18(%rbx)
movq 0x39(%r14), %rax
bswapq %rax
movq %rax, 0x20(%rbx)
movq 0x41(%r14), %rax
bswapq %rax
movq %rax, 0xc0(%rbx)
movq 0x49(%r14), %rax
bswapq %rax
movq %rax, 0xc8(%rbx)
movq 0x51(%r14), %rax
bswapq %rax
movq %rax, 0xd0(%rbx)
movq 0x59(%r14), %rax
bswapq %rax
movq %rax, 0x38(%rbx)
movq 0x61(%r14), %rax
bswapq %rax
movq %rax, 0x40(%rbx)
movq 0x69(%r14), %rax
bswapq %rax
movq %rax, 0x28(%rbx)
movq 0x71(%r14), %rax
bswapq %rax
movq %rax, 0x30(%rbx)
movq 0x79(%r14), %rax
bswapq %rax
movq %rax, 0xd8(%rbx)
movl 0x85(%r14), %eax
bswapl %eax
movl %eax, 0x48(%rbx)
movq 0x89(%r14), %rax
bswapq %rax
movq %rax, 0xe0(%rbx)
movl 0x91(%r14), %eax
bswapl %eax
movq %rax, 0xf8(%rbx)
movl 0x95(%r14), %eax
bswapl %eax
movq %rax, 0xf0(%rbx)
movzbl 0x99(%r14), %eax
movl %eax, 0x168(%rbx)
movl 0x19c(%rbx), %eax
addq %r14, %rax
addq $0x9b, %rax
testq %r9, %r9
je 0x59aff
leal (,%r9,8), %edx
xorl %ecx, %ecx
movq (%rax,%rcx), %rsi
bswapq %rsi
movq 0x118(%rbx), %rdi
movq %rsi, (%rdi,%rcx)
addq $0x8, %rcx
cmpq %rcx, %rdx
jne 0x59ae1
addq %rcx, %rax
movq (%rax), %rcx
bswapq %rcx
movq %rcx, 0x120(%rbx)
movl 0x8(%rax), %ecx
bswapl %ecx
movq %rcx, 0x130(%rbx)
movl 0xc(%rax), %ecx
bswapl %ecx
movq %rcx, 0x138(%rbx)
movl 0x10(%rax), %ecx
bswapl %ecx
movq %rcx, 0x148(%rbx)
movq 0x14(%rax), %rcx
bswapq %rcx
movq %rcx, 0x140(%rbx)
movq 0x1c(%rax), %rcx
bswapq %rcx
movq %rcx, 0x150(%rbx)
movq 0x24(%rax), %rcx
bswapq %rcx
movq %rcx, 0x158(%rbx)
movq 0x2c(%rax), %rcx
bswapq %rcx
movq %rcx, 0x160(%rbx)
movq 0x34(%rax), %rcx
bswapq %rcx
movq %rcx, 0x128(%rbx)
leaq (%rax,%r9,4), %r15
addq $0x3c, %r15
testl %r13d, %r13d
je 0x59bb3
addl %r8d, %r12d
xorl %eax, %eax
movq 0x100(%rbx), %rcx
movq (%r15), %rdx
movq %rdx, (%rcx,%rax,8)
movl 0x8(%r15), %ecx
bswapl %ecx
movq 0x108(%rbx), %rdx
movq %rcx, (%rdx,%rax,8)
addq $0xc, %r15
incq %rax
cmpq %rax, %r12
jne 0x59b88
movq %r15, %rax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
|
_ma_state_info_read:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 18h
mov rbx, rsi
mov r14, rdi
mov rax, [rdi+10h]
mov [rsi+10h], rax
movups xmm0, xmmword ptr [rdi]
movups xmmword ptr [rsi], xmm0
movzx r9d, byte ptr [rsi+12h]
movzx r8d, byte ptr [rsi+0Fh]
movzx r12d, byte ptr [rsi+0Eh]
shl r12d, 8
lea r13d, [r12+r8]
cmp qword ptr [rsi+100h], 0
jnz short loc_59971
lea rax, [rbx+100h]
or rdx, 10h
lea ecx, ds:0[r13*8]
mov [rbp+var_38], r8
lea r8, [rbx+108h]
mov [rsp+40h+var_40], 0
xor r15d, r15d
xor edi, edi
mov rsi, rdx
mov rdx, rax
mov [rbp+var_30], r9
mov r9, rcx
xor eax, eax
call my_multi_malloc
mov r9, [rbp+var_30]
mov r8, [rbp+var_38]
test rax, rax
jz loc_59BB3
loc_59971:
movzx eax, word ptr [r14+18h]
rol ax, 8
movzx eax, ax
mov [rbx+16Ch], eax
movzx eax, word ptr [r14+1Ah]
rol ax, 8
movzx eax, ax
mov [rbx+170h], eax
movzx eax, word ptr [r14+1Ch]
shl rax, 20h
movzx ecx, byte ptr [r14+1Eh]
shl rcx, 30h
or rcx, rax
mov eax, [r14+1Fh]
or rax, rcx
mov [rbx+178h], rax
movzx eax, word ptr [r14+23h]
shl rax, 20h
movzx ecx, byte ptr [r14+25h]
shl rcx, 30h
or rcx, rax
mov eax, [r14+26h]
or rax, rcx
mov [rbx+180h], rax
movzx eax, word ptr [r14+2Ah]
shl rax, 20h
movzx ecx, byte ptr [r14+2Ch]
shl rcx, 30h
or rcx, rax
mov eax, [r14+2Dh]
or rax, rcx
mov [rbx+188h], rax
mov rax, [r14+31h]
bswap rax
mov [rbx+18h], rax
mov rax, [r14+39h]
bswap rax
mov [rbx+20h], rax
mov rax, [r14+41h]
bswap rax
mov [rbx+0C0h], rax
mov rax, [r14+49h]
bswap rax
mov [rbx+0C8h], rax
mov rax, [r14+51h]
bswap rax
mov [rbx+0D0h], rax
mov rax, [r14+59h]
bswap rax
mov [rbx+38h], rax
mov rax, [r14+61h]
bswap rax
mov [rbx+40h], rax
mov rax, [r14+69h]
bswap rax
mov [rbx+28h], rax
mov rax, [r14+71h]
bswap rax
mov [rbx+30h], rax
mov rax, [r14+79h]
bswap rax
mov [rbx+0D8h], rax
mov eax, [r14+85h]
bswap eax
mov [rbx+48h], eax
mov rax, [r14+89h]
bswap rax
mov [rbx+0E0h], rax
mov eax, [r14+91h]
bswap eax
mov [rbx+0F8h], rax
mov eax, [r14+95h]
bswap eax
mov [rbx+0F0h], rax
movzx eax, byte ptr [r14+99h]
mov [rbx+168h], eax
mov eax, [rbx+19Ch]
add rax, r14
add rax, 9Bh
test r9, r9
jz short loc_59AFF
lea edx, ds:0[r9*8]
xor ecx, ecx
loc_59AE1:
mov rsi, [rax+rcx]
bswap rsi
mov rdi, [rbx+118h]
mov [rdi+rcx], rsi
add rcx, 8
cmp rdx, rcx
jnz short loc_59AE1
add rax, rcx
loc_59AFF:
mov rcx, [rax]
bswap rcx
mov [rbx+120h], rcx
mov ecx, [rax+8]
bswap ecx
mov [rbx+130h], rcx
mov ecx, [rax+0Ch]
bswap ecx
mov [rbx+138h], rcx
mov ecx, [rax+10h]
bswap ecx
mov [rbx+148h], rcx
mov rcx, [rax+14h]
bswap rcx
mov [rbx+140h], rcx
mov rcx, [rax+1Ch]
bswap rcx
mov [rbx+150h], rcx
mov rcx, [rax+24h]
bswap rcx
mov [rbx+158h], rcx
mov rcx, [rax+2Ch]
bswap rcx
mov [rbx+160h], rcx
mov rcx, [rax+34h]
bswap rcx
mov [rbx+128h], rcx
lea r15, [rax+r9*4]
add r15, 3Ch ; '<'
test r13d, r13d
jz short loc_59BB3
add r12d, r8d
xor eax, eax
loc_59B88:
mov rcx, [rbx+100h]
mov rdx, [r15]
mov [rcx+rax*8], rdx
mov ecx, [r15+8]
bswap ecx
mov rdx, [rbx+108h]
mov [rdx+rax*8], rcx
add r15, 0Ch
inc rax
cmp r12, rax
jnz short loc_59B88
loc_59BB3:
mov rax, r15
add rsp, 18h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
|
long long ma_state_info_read(long long a1, long long a2, int a3)
{
long long v3; // r9
int v4; // r8d
int v5; // r12d
int v6; // r13d
long long v7; // r15
long long v8; // rax
long long v9; // rax
long long v10; // rcx
long long v11; // r12
long long v12; // rax
int v14; // [rsp+8h] [rbp-38h]
long long v15; // [rsp+10h] [rbp-30h]
*(_QWORD *)(a2 + 16) = *(_QWORD *)(a1 + 16);
*(_OWORD *)a2 = *(_OWORD *)a1;
v3 = *(unsigned __int8 *)(a2 + 18);
v4 = *(unsigned __int8 *)(a2 + 15);
v5 = *(unsigned __int8 *)(a2 + 14) << 8;
v6 = v5 + v4;
if ( *(_QWORD *)(a2 + 256)
|| (v14 = *(unsigned __int8 *)(a2 + 15),
v7 = 0LL,
v15 = *(unsigned __int8 *)(a2 + 18),
v8 = my_multi_malloc(0, a3 | 0x10u, (int)a2 + 256, 8 * v6, (int)a2 + 264, 8 * v6, 0LL),
v3 = v15,
v4 = v14,
v8) )
{
*(_DWORD *)(a2 + 364) = (unsigned __int16)__ROL2__(*(_WORD *)(a1 + 24), 8);
*(_DWORD *)(a2 + 368) = (unsigned __int16)__ROL2__(*(_WORD *)(a1 + 26), 8);
*(_QWORD *)(a2 + 376) = ((unsigned long long)*(unsigned __int16 *)(a1 + 28) << 32) | ((unsigned long long)*(unsigned __int8 *)(a1 + 30) << 48) | *(unsigned int *)(a1 + 31);
*(_QWORD *)(a2 + 384) = ((unsigned long long)*(unsigned __int16 *)(a1 + 35) << 32) | ((unsigned long long)*(unsigned __int8 *)(a1 + 37) << 48) | *(unsigned int *)(a1 + 38);
*(_QWORD *)(a2 + 392) = ((unsigned long long)*(unsigned __int16 *)(a1 + 42) << 32) | ((unsigned long long)*(unsigned __int8 *)(a1 + 44) << 48) | *(unsigned int *)(a1 + 45);
*(_QWORD *)(a2 + 24) = _byteswap_uint64(*(_QWORD *)(a1 + 49));
*(_QWORD *)(a2 + 32) = _byteswap_uint64(*(_QWORD *)(a1 + 57));
*(_QWORD *)(a2 + 192) = _byteswap_uint64(*(_QWORD *)(a1 + 65));
*(_QWORD *)(a2 + 200) = _byteswap_uint64(*(_QWORD *)(a1 + 73));
*(_QWORD *)(a2 + 208) = _byteswap_uint64(*(_QWORD *)(a1 + 81));
*(_QWORD *)(a2 + 56) = _byteswap_uint64(*(_QWORD *)(a1 + 89));
*(_QWORD *)(a2 + 64) = _byteswap_uint64(*(_QWORD *)(a1 + 97));
*(_QWORD *)(a2 + 40) = _byteswap_uint64(*(_QWORD *)(a1 + 105));
*(_QWORD *)(a2 + 48) = _byteswap_uint64(*(_QWORD *)(a1 + 113));
*(_QWORD *)(a2 + 216) = _byteswap_uint64(*(_QWORD *)(a1 + 121));
*(_DWORD *)(a2 + 72) = _byteswap_ulong(*(_DWORD *)(a1 + 133));
*(_QWORD *)(a2 + 224) = _byteswap_uint64(*(_QWORD *)(a1 + 137));
*(_QWORD *)(a2 + 248) = _byteswap_ulong(*(_DWORD *)(a1 + 145));
*(_QWORD *)(a2 + 240) = _byteswap_ulong(*(_DWORD *)(a1 + 149));
*(_DWORD *)(a2 + 360) = *(unsigned __int8 *)(a1 + 153);
v9 = a1 + *(unsigned int *)(a2 + 412) + 155;
if ( v3 )
{
v10 = 0LL;
do
{
*(_QWORD *)(*(_QWORD *)(a2 + 280) + v10) = _byteswap_uint64(*(_QWORD *)(v9 + v10));
v10 += 8LL;
}
while ( 8 * (_DWORD)v3 != v10 );
v9 += v10;
}
*(_QWORD *)(a2 + 288) = _byteswap_uint64(*(_QWORD *)v9);
*(_QWORD *)(a2 + 304) = _byteswap_ulong(*(_DWORD *)(v9 + 8));
*(_QWORD *)(a2 + 312) = _byteswap_ulong(*(_DWORD *)(v9 + 12));
*(_QWORD *)(a2 + 328) = _byteswap_ulong(*(_DWORD *)(v9 + 16));
*(_QWORD *)(a2 + 320) = _byteswap_uint64(*(_QWORD *)(v9 + 20));
*(_QWORD *)(a2 + 336) = _byteswap_uint64(*(_QWORD *)(v9 + 28));
*(_QWORD *)(a2 + 344) = _byteswap_uint64(*(_QWORD *)(v9 + 36));
*(_QWORD *)(a2 + 352) = _byteswap_uint64(*(_QWORD *)(v9 + 44));
*(_QWORD *)(a2 + 296) = _byteswap_uint64(*(_QWORD *)(v9 + 52));
v7 = v9 + 4 * v3 + 60;
if ( v6 )
{
v11 = (unsigned int)(v4 + v5);
v12 = 0LL;
do
{
*(_QWORD *)(*(_QWORD *)(a2 + 256) + 8 * v12) = *(_QWORD *)v7;
*(_QWORD *)(*(_QWORD *)(a2 + 264) + 8 * v12) = _byteswap_ulong(*(_DWORD *)(v7 + 8));
v7 += 12LL;
++v12;
}
while ( v11 != v12 );
}
}
return v7;
}
|
_ma_state_info_read:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x18
MOV RBX,RSI
MOV R14,RDI
MOV RAX,qword ptr [RDI + 0x10]
MOV qword ptr [RSI + 0x10],RAX
MOVUPS XMM0,xmmword ptr [RDI]
MOVUPS xmmword ptr [RSI],XMM0
MOVZX R9D,byte ptr [RSI + 0x12]
MOVZX R8D,byte ptr [RSI + 0xf]
MOVZX R12D,byte ptr [RSI + 0xe]
SHL R12D,0x8
LEA R13D,[R12 + R8*0x1]
CMP qword ptr [RSI + 0x100],0x0
JNZ 0x00159971
LEA RAX,[RBX + 0x100]
OR RDX,0x10
LEA ECX,[R13*0x8]
MOV qword ptr [RBP + -0x38],R8
LEA R8,[RBX + 0x108]
MOV qword ptr [RSP],0x0
XOR R15D,R15D
XOR EDI,EDI
MOV RSI,RDX
MOV RDX,RAX
MOV qword ptr [RBP + -0x30],R9
MOV R9,RCX
XOR EAX,EAX
CALL 0x001b9430
MOV R9,qword ptr [RBP + -0x30]
MOV R8,qword ptr [RBP + -0x38]
TEST RAX,RAX
JZ 0x00159bb3
LAB_00159971:
MOVZX EAX,word ptr [R14 + 0x18]
ROL AX,0x8
MOVZX EAX,AX
MOV dword ptr [RBX + 0x16c],EAX
MOVZX EAX,word ptr [R14 + 0x1a]
ROL AX,0x8
MOVZX EAX,AX
MOV dword ptr [RBX + 0x170],EAX
MOVZX EAX,word ptr [R14 + 0x1c]
SHL RAX,0x20
MOVZX ECX,byte ptr [R14 + 0x1e]
SHL RCX,0x30
OR RCX,RAX
MOV EAX,dword ptr [R14 + 0x1f]
OR RAX,RCX
MOV qword ptr [RBX + 0x178],RAX
MOVZX EAX,word ptr [R14 + 0x23]
SHL RAX,0x20
MOVZX ECX,byte ptr [R14 + 0x25]
SHL RCX,0x30
OR RCX,RAX
MOV EAX,dword ptr [R14 + 0x26]
OR RAX,RCX
MOV qword ptr [RBX + 0x180],RAX
MOVZX EAX,word ptr [R14 + 0x2a]
SHL RAX,0x20
MOVZX ECX,byte ptr [R14 + 0x2c]
SHL RCX,0x30
OR RCX,RAX
MOV EAX,dword ptr [R14 + 0x2d]
OR RAX,RCX
MOV qword ptr [RBX + 0x188],RAX
MOV RAX,qword ptr [R14 + 0x31]
BSWAP RAX
MOV qword ptr [RBX + 0x18],RAX
MOV RAX,qword ptr [R14 + 0x39]
BSWAP RAX
MOV qword ptr [RBX + 0x20],RAX
MOV RAX,qword ptr [R14 + 0x41]
BSWAP RAX
MOV qword ptr [RBX + 0xc0],RAX
MOV RAX,qword ptr [R14 + 0x49]
BSWAP RAX
MOV qword ptr [RBX + 0xc8],RAX
MOV RAX,qword ptr [R14 + 0x51]
BSWAP RAX
MOV qword ptr [RBX + 0xd0],RAX
MOV RAX,qword ptr [R14 + 0x59]
BSWAP RAX
MOV qword ptr [RBX + 0x38],RAX
MOV RAX,qword ptr [R14 + 0x61]
BSWAP RAX
MOV qword ptr [RBX + 0x40],RAX
MOV RAX,qword ptr [R14 + 0x69]
BSWAP RAX
MOV qword ptr [RBX + 0x28],RAX
MOV RAX,qword ptr [R14 + 0x71]
BSWAP RAX
MOV qword ptr [RBX + 0x30],RAX
MOV RAX,qword ptr [R14 + 0x79]
BSWAP RAX
MOV qword ptr [RBX + 0xd8],RAX
MOV EAX,dword ptr [R14 + 0x85]
BSWAP EAX
MOV dword ptr [RBX + 0x48],EAX
MOV RAX,qword ptr [R14 + 0x89]
BSWAP RAX
MOV qword ptr [RBX + 0xe0],RAX
MOV EAX,dword ptr [R14 + 0x91]
BSWAP EAX
MOV qword ptr [RBX + 0xf8],RAX
MOV EAX,dword ptr [R14 + 0x95]
BSWAP EAX
MOV qword ptr [RBX + 0xf0],RAX
MOVZX EAX,byte ptr [R14 + 0x99]
MOV dword ptr [RBX + 0x168],EAX
MOV EAX,dword ptr [RBX + 0x19c]
ADD RAX,R14
ADD RAX,0x9b
TEST R9,R9
JZ 0x00159aff
LEA EDX,[R9*0x8]
XOR ECX,ECX
LAB_00159ae1:
MOV RSI,qword ptr [RAX + RCX*0x1]
BSWAP RSI
MOV RDI,qword ptr [RBX + 0x118]
MOV qword ptr [RDI + RCX*0x1],RSI
ADD RCX,0x8
CMP RDX,RCX
JNZ 0x00159ae1
ADD RAX,RCX
LAB_00159aff:
MOV RCX,qword ptr [RAX]
BSWAP RCX
MOV qword ptr [RBX + 0x120],RCX
MOV ECX,dword ptr [RAX + 0x8]
BSWAP ECX
MOV qword ptr [RBX + 0x130],RCX
MOV ECX,dword ptr [RAX + 0xc]
BSWAP ECX
MOV qword ptr [RBX + 0x138],RCX
MOV ECX,dword ptr [RAX + 0x10]
BSWAP ECX
MOV qword ptr [RBX + 0x148],RCX
MOV RCX,qword ptr [RAX + 0x14]
BSWAP RCX
MOV qword ptr [RBX + 0x140],RCX
MOV RCX,qword ptr [RAX + 0x1c]
BSWAP RCX
MOV qword ptr [RBX + 0x150],RCX
MOV RCX,qword ptr [RAX + 0x24]
BSWAP RCX
MOV qword ptr [RBX + 0x158],RCX
MOV RCX,qword ptr [RAX + 0x2c]
BSWAP RCX
MOV qword ptr [RBX + 0x160],RCX
MOV RCX,qword ptr [RAX + 0x34]
BSWAP RCX
MOV qword ptr [RBX + 0x128],RCX
LEA R15,[RAX + R9*0x4]
ADD R15,0x3c
TEST R13D,R13D
JZ 0x00159bb3
ADD R12D,R8D
XOR EAX,EAX
LAB_00159b88:
MOV RCX,qword ptr [RBX + 0x100]
MOV RDX,qword ptr [R15]
MOV qword ptr [RCX + RAX*0x8],RDX
MOV ECX,dword ptr [R15 + 0x8]
BSWAP ECX
MOV RDX,qword ptr [RBX + 0x108]
MOV qword ptr [RDX + RAX*0x8],RCX
ADD R15,0xc
INC RAX
CMP R12,RAX
JNZ 0x00159b88
LAB_00159bb3:
MOV RAX,R15
ADD RSP,0x18
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
int8 * _ma_state_info_read(int4 *param_1,int4 *param_2,ulong param_3)
{
int iVar1;
byte bVar2;
byte bVar3;
byte bVar4;
uint uVar5;
ulong uVar6;
int4 uVar7;
int4 uVar8;
int4 uVar9;
long lVar10;
ulong *puVar11;
ulong uVar12;
int iVar13;
int8 *puVar14;
*(int8 *)(param_2 + 4) = *(int8 *)(param_1 + 4);
uVar7 = param_1[1];
uVar8 = param_1[2];
uVar9 = param_1[3];
*param_2 = *param_1;
param_2[1] = uVar7;
param_2[2] = uVar8;
param_2[3] = uVar9;
bVar2 = *(byte *)((long)param_2 + 0x12);
bVar3 = *(byte *)((long)param_2 + 0xf);
bVar4 = *(byte *)((long)param_2 + 0xe);
iVar13 = (uint)bVar4 * 0x100 + (uint)bVar3;
if ((*(long *)(param_2 + 0x40) == 0) &&
(iVar1 = iVar13 * 8,
lVar10 = my_multi_malloc(0,param_3 | 0x10,param_2 + 0x40,iVar1,param_2 + 0x42,iVar1,0),
lVar10 == 0)) {
return (int8 *)0x0;
}
param_2[0x5b] = (uint)(ushort)(*(ushort *)(param_1 + 6) << 8 | *(ushort *)(param_1 + 6) >> 8);
param_2[0x5c] =
(uint)(ushort)(*(ushort *)((long)param_1 + 0x1a) << 8 |
*(ushort *)((long)param_1 + 0x1a) >> 8);
*(ulong *)(param_2 + 0x5e) =
(ulong)*(uint *)((long)param_1 + 0x1f) |
(ulong)*(byte *)((long)param_1 + 0x1e) << 0x30 | (ulong)*(ushort *)(param_1 + 7) << 0x20;
*(ulong *)(param_2 + 0x60) =
(ulong)*(uint *)((long)param_1 + 0x26) |
(ulong)*(byte *)((long)param_1 + 0x25) << 0x30 |
(ulong)*(ushort *)((long)param_1 + 0x23) << 0x20;
*(ulong *)(param_2 + 0x62) =
(ulong)*(uint *)((long)param_1 + 0x2d) |
(ulong)*(byte *)(param_1 + 0xb) << 0x30 | (ulong)*(ushort *)((long)param_1 + 0x2a) << 0x20;
uVar12 = *(ulong *)((long)param_1 + 0x31);
*(ulong *)(param_2 + 6) =
uVar12 >> 0x38 | (uVar12 & 0xff000000000000) >> 0x28 | (uVar12 & 0xff0000000000) >> 0x18 |
(uVar12 & 0xff00000000) >> 8 | (uVar12 & 0xff000000) << 8 | (uVar12 & 0xff0000) << 0x18 |
(uVar12 & 0xff00) << 0x28 | uVar12 << 0x38;
uVar12 = *(ulong *)((long)param_1 + 0x39);
*(ulong *)(param_2 + 8) =
uVar12 >> 0x38 | (uVar12 & 0xff000000000000) >> 0x28 | (uVar12 & 0xff0000000000) >> 0x18 |
(uVar12 & 0xff00000000) >> 8 | (uVar12 & 0xff000000) << 8 | (uVar12 & 0xff0000) << 0x18 |
(uVar12 & 0xff00) << 0x28 | uVar12 << 0x38;
uVar12 = *(ulong *)((long)param_1 + 0x41);
*(ulong *)(param_2 + 0x30) =
uVar12 >> 0x38 | (uVar12 & 0xff000000000000) >> 0x28 | (uVar12 & 0xff0000000000) >> 0x18 |
(uVar12 & 0xff00000000) >> 8 | (uVar12 & 0xff000000) << 8 | (uVar12 & 0xff0000) << 0x18 |
(uVar12 & 0xff00) << 0x28 | uVar12 << 0x38;
uVar12 = *(ulong *)((long)param_1 + 0x49);
*(ulong *)(param_2 + 0x32) =
uVar12 >> 0x38 | (uVar12 & 0xff000000000000) >> 0x28 | (uVar12 & 0xff0000000000) >> 0x18 |
(uVar12 & 0xff00000000) >> 8 | (uVar12 & 0xff000000) << 8 | (uVar12 & 0xff0000) << 0x18 |
(uVar12 & 0xff00) << 0x28 | uVar12 << 0x38;
uVar12 = *(ulong *)((long)param_1 + 0x51);
*(ulong *)(param_2 + 0x34) =
uVar12 >> 0x38 | (uVar12 & 0xff000000000000) >> 0x28 | (uVar12 & 0xff0000000000) >> 0x18 |
(uVar12 & 0xff00000000) >> 8 | (uVar12 & 0xff000000) << 8 | (uVar12 & 0xff0000) << 0x18 |
(uVar12 & 0xff00) << 0x28 | uVar12 << 0x38;
uVar12 = *(ulong *)((long)param_1 + 0x59);
*(ulong *)(param_2 + 0xe) =
uVar12 >> 0x38 | (uVar12 & 0xff000000000000) >> 0x28 | (uVar12 & 0xff0000000000) >> 0x18 |
(uVar12 & 0xff00000000) >> 8 | (uVar12 & 0xff000000) << 8 | (uVar12 & 0xff0000) << 0x18 |
(uVar12 & 0xff00) << 0x28 | uVar12 << 0x38;
uVar12 = *(ulong *)((long)param_1 + 0x61);
*(ulong *)(param_2 + 0x10) =
uVar12 >> 0x38 | (uVar12 & 0xff000000000000) >> 0x28 | (uVar12 & 0xff0000000000) >> 0x18 |
(uVar12 & 0xff00000000) >> 8 | (uVar12 & 0xff000000) << 8 | (uVar12 & 0xff0000) << 0x18 |
(uVar12 & 0xff00) << 0x28 | uVar12 << 0x38;
uVar12 = *(ulong *)((long)param_1 + 0x69);
*(ulong *)(param_2 + 10) =
uVar12 >> 0x38 | (uVar12 & 0xff000000000000) >> 0x28 | (uVar12 & 0xff0000000000) >> 0x18 |
(uVar12 & 0xff00000000) >> 8 | (uVar12 & 0xff000000) << 8 | (uVar12 & 0xff0000) << 0x18 |
(uVar12 & 0xff00) << 0x28 | uVar12 << 0x38;
uVar12 = *(ulong *)((long)param_1 + 0x71);
*(ulong *)(param_2 + 0xc) =
uVar12 >> 0x38 | (uVar12 & 0xff000000000000) >> 0x28 | (uVar12 & 0xff0000000000) >> 0x18 |
(uVar12 & 0xff00000000) >> 8 | (uVar12 & 0xff000000) << 8 | (uVar12 & 0xff0000) << 0x18 |
(uVar12 & 0xff00) << 0x28 | uVar12 << 0x38;
uVar12 = *(ulong *)((long)param_1 + 0x79);
*(ulong *)(param_2 + 0x36) =
uVar12 >> 0x38 | (uVar12 & 0xff000000000000) >> 0x28 | (uVar12 & 0xff0000000000) >> 0x18 |
(uVar12 & 0xff00000000) >> 8 | (uVar12 & 0xff000000) << 8 | (uVar12 & 0xff0000) << 0x18 |
(uVar12 & 0xff00) << 0x28 | uVar12 << 0x38;
uVar5 = *(uint *)((long)param_1 + 0x85);
param_2[0x12] = uVar5 >> 0x18 | (uVar5 & 0xff0000) >> 8 | (uVar5 & 0xff00) << 8 | uVar5 << 0x18;
uVar12 = *(ulong *)((long)param_1 + 0x89);
*(ulong *)(param_2 + 0x38) =
uVar12 >> 0x38 | (uVar12 & 0xff000000000000) >> 0x28 | (uVar12 & 0xff0000000000) >> 0x18 |
(uVar12 & 0xff00000000) >> 8 | (uVar12 & 0xff000000) << 8 | (uVar12 & 0xff0000) << 0x18 |
(uVar12 & 0xff00) << 0x28 | uVar12 << 0x38;
uVar5 = *(uint *)((long)param_1 + 0x91);
*(ulong *)(param_2 + 0x3e) =
(ulong)(uVar5 >> 0x18 | (uVar5 & 0xff0000) >> 8 | (uVar5 & 0xff00) << 8 | uVar5 << 0x18);
uVar5 = *(uint *)((long)param_1 + 0x95);
*(ulong *)(param_2 + 0x3c) =
(ulong)(uVar5 >> 0x18 | (uVar5 & 0xff0000) >> 8 | (uVar5 & 0xff00) << 8 | uVar5 << 0x18);
param_2[0x5a] = (uint)*(byte *)((long)param_1 + 0x99);
puVar11 = (ulong *)((long)param_1 + (ulong)(uint)param_2[0x67] + 0x9b);
if ((ulong)bVar2 != 0) {
uVar12 = 0;
do {
uVar6 = *(ulong *)((long)puVar11 + uVar12);
*(ulong *)(*(long *)(param_2 + 0x46) + uVar12) =
uVar6 >> 0x38 | (uVar6 & 0xff000000000000) >> 0x28 | (uVar6 & 0xff0000000000) >> 0x18 |
(uVar6 & 0xff00000000) >> 8 | (uVar6 & 0xff000000) << 8 | (uVar6 & 0xff0000) << 0x18 |
(uVar6 & 0xff00) << 0x28 | uVar6 << 0x38;
uVar12 = uVar12 + 8;
} while ((uint)bVar2 * 8 != uVar12);
puVar11 = (ulong *)((long)puVar11 + uVar12);
}
uVar12 = *puVar11;
*(ulong *)(param_2 + 0x48) =
uVar12 >> 0x38 | (uVar12 & 0xff000000000000) >> 0x28 | (uVar12 & 0xff0000000000) >> 0x18 |
(uVar12 & 0xff00000000) >> 8 | (uVar12 & 0xff000000) << 8 | (uVar12 & 0xff0000) << 0x18 |
(uVar12 & 0xff00) << 0x28 | uVar12 << 0x38;
uVar5 = (uint)puVar11[1];
*(ulong *)(param_2 + 0x4c) =
(ulong)(uVar5 >> 0x18 | (uVar5 & 0xff0000) >> 8 | (uVar5 & 0xff00) << 8 | uVar5 << 0x18);
uVar5 = *(uint *)((long)puVar11 + 0xc);
*(ulong *)(param_2 + 0x4e) =
(ulong)(uVar5 >> 0x18 | (uVar5 & 0xff0000) >> 8 | (uVar5 & 0xff00) << 8 | uVar5 << 0x18);
uVar5 = (uint)puVar11[2];
*(ulong *)(param_2 + 0x52) =
(ulong)(uVar5 >> 0x18 | (uVar5 & 0xff0000) >> 8 | (uVar5 & 0xff00) << 8 | uVar5 << 0x18);
uVar12 = *(ulong *)((long)puVar11 + 0x14);
*(ulong *)(param_2 + 0x50) =
uVar12 >> 0x38 | (uVar12 & 0xff000000000000) >> 0x28 | (uVar12 & 0xff0000000000) >> 0x18 |
(uVar12 & 0xff00000000) >> 8 | (uVar12 & 0xff000000) << 8 | (uVar12 & 0xff0000) << 0x18 |
(uVar12 & 0xff00) << 0x28 | uVar12 << 0x38;
uVar12 = *(ulong *)((long)puVar11 + 0x1c);
*(ulong *)(param_2 + 0x54) =
uVar12 >> 0x38 | (uVar12 & 0xff000000000000) >> 0x28 | (uVar12 & 0xff0000000000) >> 0x18 |
(uVar12 & 0xff00000000) >> 8 | (uVar12 & 0xff000000) << 8 | (uVar12 & 0xff0000) << 0x18 |
(uVar12 & 0xff00) << 0x28 | uVar12 << 0x38;
uVar12 = *(ulong *)((long)puVar11 + 0x24);
*(ulong *)(param_2 + 0x56) =
uVar12 >> 0x38 | (uVar12 & 0xff000000000000) >> 0x28 | (uVar12 & 0xff0000000000) >> 0x18 |
(uVar12 & 0xff00000000) >> 8 | (uVar12 & 0xff000000) << 8 | (uVar12 & 0xff0000) << 0x18 |
(uVar12 & 0xff00) << 0x28 | uVar12 << 0x38;
uVar12 = *(ulong *)((long)puVar11 + 0x2c);
*(ulong *)(param_2 + 0x58) =
uVar12 >> 0x38 | (uVar12 & 0xff000000000000) >> 0x28 | (uVar12 & 0xff0000000000) >> 0x18 |
(uVar12 & 0xff00000000) >> 8 | (uVar12 & 0xff000000) << 8 | (uVar12 & 0xff0000) << 0x18 |
(uVar12 & 0xff00) << 0x28 | uVar12 << 0x38;
uVar12 = *(ulong *)((long)puVar11 + 0x34);
*(ulong *)(param_2 + 0x4a) =
uVar12 >> 0x38 | (uVar12 & 0xff000000000000) >> 0x28 | (uVar12 & 0xff0000000000) >> 0x18 |
(uVar12 & 0xff00000000) >> 8 | (uVar12 & 0xff000000) << 8 | (uVar12 & 0xff0000) << 0x18 |
(uVar12 & 0xff00) << 0x28 | uVar12 << 0x38;
puVar14 = (int8 *)((long)puVar11 + (ulong)bVar2 * 4 + 0x3c);
if (iVar13 != 0) {
uVar12 = 0;
do {
*(int8 *)(*(long *)(param_2 + 0x40) + uVar12 * 8) = *puVar14;
uVar5 = *(uint *)(puVar14 + 1);
*(ulong *)(*(long *)(param_2 + 0x42) + uVar12 * 8) =
(ulong)(uVar5 >> 0x18 | (uVar5 & 0xff0000) >> 8 | (uVar5 & 0xff00) << 8 | uVar5 << 0x18);
puVar14 = (int8 *)((long)puVar14 + 0xc);
uVar12 = uVar12 + 1;
} while (CONCAT11(bVar4,bVar3) != uVar12);
}
return puVar14;
}
|
|
8,993 |
nlohmann::json_abi_v3_11_3::detail::dtoa_impl::get_cached_power_for_binary_exponent(int)
|
monkey531[P]llama/common/json.hpp
|
inline cached_power get_cached_power_for_binary_exponent(int e)
{
// Now
//
// alpha <= e_c + e + q <= gamma (1)
// ==> f_c * 2^alpha <= c * 2^e * 2^q
//
// and since the c's are normalized, 2^(q-1) <= f_c,
//
// ==> 2^(q - 1 + alpha) <= c * 2^(e + q)
// ==> 2^(alpha - e - 1) <= c
//
// If c were an exact power of ten, i.e. c = 10^k, one may determine k as
//
// k = ceil( log_10( 2^(alpha - e - 1) ) )
// = ceil( (alpha - e - 1) * log_10(2) )
//
// From the paper:
// "In theory the result of the procedure could be wrong since c is rounded,
// and the computation itself is approximated [...]. In practice, however,
// this simple function is sufficient."
//
// For IEEE double precision floating-point numbers converted into
// normalized diyfp's w = f * 2^e, with q = 64,
//
// e >= -1022 (min IEEE exponent)
// -52 (p - 1)
// -52 (p - 1, possibly normalize denormal IEEE numbers)
// -11 (normalize the diyfp)
// = -1137
//
// and
//
// e <= +1023 (max IEEE exponent)
// -52 (p - 1)
// -11 (normalize the diyfp)
// = 960
//
// This binary exponent range [-1137,960] results in a decimal exponent
// range [-307,324]. One does not need to store a cached power for each
// k in this range. For each such k it suffices to find a cached power
// such that the exponent of the product lies in [alpha,gamma].
// This implies that the difference of the decimal exponents of adjacent
// table entries must be less than or equal to
//
// floor( (gamma - alpha) * log_10(2) ) = 8.
//
// (A smaller distance gamma-alpha would require a larger table.)
// NB:
// Actually this function returns c, such that -60 <= e_c + e + 64 <= -34.
constexpr int kCachedPowersMinDecExp = -300;
constexpr int kCachedPowersDecStep = 8;
static constexpr std::array<cached_power, 79> kCachedPowers =
{
{
{ 0xAB70FE17C79AC6CA, -1060, -300 },
{ 0xFF77B1FCBEBCDC4F, -1034, -292 },
{ 0xBE5691EF416BD60C, -1007, -284 },
{ 0x8DD01FAD907FFC3C, -980, -276 },
{ 0xD3515C2831559A83, -954, -268 },
{ 0x9D71AC8FADA6C9B5, -927, -260 },
{ 0xEA9C227723EE8BCB, -901, -252 },
{ 0xAECC49914078536D, -874, -244 },
{ 0x823C12795DB6CE57, -847, -236 },
{ 0xC21094364DFB5637, -821, -228 },
{ 0x9096EA6F3848984F, -794, -220 },
{ 0xD77485CB25823AC7, -768, -212 },
{ 0xA086CFCD97BF97F4, -741, -204 },
{ 0xEF340A98172AACE5, -715, -196 },
{ 0xB23867FB2A35B28E, -688, -188 },
{ 0x84C8D4DFD2C63F3B, -661, -180 },
{ 0xC5DD44271AD3CDBA, -635, -172 },
{ 0x936B9FCEBB25C996, -608, -164 },
{ 0xDBAC6C247D62A584, -582, -156 },
{ 0xA3AB66580D5FDAF6, -555, -148 },
{ 0xF3E2F893DEC3F126, -529, -140 },
{ 0xB5B5ADA8AAFF80B8, -502, -132 },
{ 0x87625F056C7C4A8B, -475, -124 },
{ 0xC9BCFF6034C13053, -449, -116 },
{ 0x964E858C91BA2655, -422, -108 },
{ 0xDFF9772470297EBD, -396, -100 },
{ 0xA6DFBD9FB8E5B88F, -369, -92 },
{ 0xF8A95FCF88747D94, -343, -84 },
{ 0xB94470938FA89BCF, -316, -76 },
{ 0x8A08F0F8BF0F156B, -289, -68 },
{ 0xCDB02555653131B6, -263, -60 },
{ 0x993FE2C6D07B7FAC, -236, -52 },
{ 0xE45C10C42A2B3B06, -210, -44 },
{ 0xAA242499697392D3, -183, -36 },
{ 0xFD87B5F28300CA0E, -157, -28 },
{ 0xBCE5086492111AEB, -130, -20 },
{ 0x8CBCCC096F5088CC, -103, -12 },
{ 0xD1B71758E219652C, -77, -4 },
{ 0x9C40000000000000, -50, 4 },
{ 0xE8D4A51000000000, -24, 12 },
{ 0xAD78EBC5AC620000, 3, 20 },
{ 0x813F3978F8940984, 30, 28 },
{ 0xC097CE7BC90715B3, 56, 36 },
{ 0x8F7E32CE7BEA5C70, 83, 44 },
{ 0xD5D238A4ABE98068, 109, 52 },
{ 0x9F4F2726179A2245, 136, 60 },
{ 0xED63A231D4C4FB27, 162, 68 },
{ 0xB0DE65388CC8ADA8, 189, 76 },
{ 0x83C7088E1AAB65DB, 216, 84 },
{ 0xC45D1DF942711D9A, 242, 92 },
{ 0x924D692CA61BE758, 269, 100 },
{ 0xDA01EE641A708DEA, 295, 108 },
{ 0xA26DA3999AEF774A, 322, 116 },
{ 0xF209787BB47D6B85, 348, 124 },
{ 0xB454E4A179DD1877, 375, 132 },
{ 0x865B86925B9BC5C2, 402, 140 },
{ 0xC83553C5C8965D3D, 428, 148 },
{ 0x952AB45CFA97A0B3, 455, 156 },
{ 0xDE469FBD99A05FE3, 481, 164 },
{ 0xA59BC234DB398C25, 508, 172 },
{ 0xF6C69A72A3989F5C, 534, 180 },
{ 0xB7DCBF5354E9BECE, 561, 188 },
{ 0x88FCF317F22241E2, 588, 196 },
{ 0xCC20CE9BD35C78A5, 614, 204 },
{ 0x98165AF37B2153DF, 641, 212 },
{ 0xE2A0B5DC971F303A, 667, 220 },
{ 0xA8D9D1535CE3B396, 694, 228 },
{ 0xFB9B7CD9A4A7443C, 720, 236 },
{ 0xBB764C4CA7A44410, 747, 244 },
{ 0x8BAB8EEFB6409C1A, 774, 252 },
{ 0xD01FEF10A657842C, 800, 260 },
{ 0x9B10A4E5E9913129, 827, 268 },
{ 0xE7109BFBA19C0C9D, 853, 276 },
{ 0xAC2820D9623BF429, 880, 284 },
{ 0x80444B5E7AA7CF85, 907, 292 },
{ 0xBF21E44003ACDD2D, 933, 300 },
{ 0x8E679C2F5E44FF8F, 960, 308 },
{ 0xD433179D9C8CB841, 986, 316 },
{ 0x9E19DB92B4E31BA9, 1013, 324 },
}
};
// This computation gives exactly the same results for k as
// k = ceil((kAlpha - e - 1) * 0.30102999566398114)
// for |e| <= 1500, but doesn't require floating-point operations.
// NB: log_10(2) ~= 78913 / 2^18
JSON_ASSERT(e >= -1500);
JSON_ASSERT(e <= 1500);
const int f = kAlpha - e - 1;
const int k = (f * 78913) / (1 << 18) + static_cast<int>(f > 0);
const int index = (-kCachedPowersMinDecExp + k + (kCachedPowersDecStep - 1)) / kCachedPowersDecStep;
JSON_ASSERT(index >= 0);
JSON_ASSERT(static_cast<std::size_t>(index) < kCachedPowers.size());
const cached_power cached = kCachedPowers[static_cast<std::size_t>(index)];
JSON_ASSERT(kAlpha <= cached.e + e + 64);
JSON_ASSERT(kGamma >= cached.e + e + 64);
return cached;
}
|
O3
|
cpp
|
nlohmann::json_abi_v3_11_3::detail::dtoa_impl::get_cached_power_for_binary_exponent(int):
pushq %rax
cmpl $0xfffffa23, %edi # imm = 0xFFFFFA23
jle 0xb80d0
cmpl $0x5dd, %edi # imm = 0x5DD
jge 0xb80ef
xorl %eax, %eax
movl %edi, %ecx
subl $-0x3d, %ecx
setl %al
negl %ecx
imull $0x13441, %ecx, %ecx # imm = 0x13441
leal 0x3ffff(%rcx), %edx
testl %ecx, %ecx
cmovnsl %ecx, %edx
sarl $0x12, %edx
addl %edx, %eax
cmpl $0xfffffec5, %eax # imm = 0xFFFFFEC5
jle 0xb810b
leal 0x133(%rax), %ecx
addl $0x13a, %eax # imm = 0x13A
testw %cx, %cx
cmovnsl %ecx, %eax
cwtl
shrl $0x3, %eax
cmpw $0x4f, %ax
jae 0xb8127
movzwl %ax, %eax
shll $0x4, %eax
leaq 0x3bc77(%rip), %rcx # 0xf3d28
movq 0x8(%rcx,%rax), %rdx
addl %edx, %edi
cmpl $-0x7d, %edi
jle 0xb8143
cmpl $-0x5f, %edi
jge 0xb815f
movq (%rcx,%rax), %rax
popq %rcx
retq
leaq 0x33f6c(%rip), %rdi # 0xec043
leaq 0x2e1c3(%rip), %rdx # 0xe62a1
leaq 0x396aa(%rip), %rcx # 0xf178f
movl $0x43e4, %esi # imm = 0x43E4
jmp 0xb8179
leaq 0x33f4d(%rip), %rdi # 0xec043
leaq 0x2e1a4(%rip), %rdx # 0xe62a1
leaq 0x39696(%rip), %rcx # 0xf179a
movl $0x43e5, %esi # imm = 0x43E5
jmp 0xb8179
leaq 0x33f31(%rip), %rdi # 0xec043
leaq 0x2e188(%rip), %rdx # 0xe62a1
leaq 0x39684(%rip), %rcx # 0xf17a4
movl $0x43ea, %esi # imm = 0x43EA
jmp 0xb8179
leaq 0x33f15(%rip), %rdi # 0xec043
leaq 0x2e16c(%rip), %rdx # 0xe62a1
leaq 0x39673(%rip), %rcx # 0xf17af
movl $0x43eb, %esi # imm = 0x43EB
jmp 0xb8179
leaq 0x33ef9(%rip), %rdi # 0xec043
leaq 0x2e150(%rip), %rdx # 0xe62a1
leaq 0x3968e(%rip), %rcx # 0xf17e6
movl $0x43ee, %esi # imm = 0x43EE
jmp 0xb8179
leaq 0x33edd(%rip), %rdi # 0xec043
leaq 0x2e134(%rip), %rdx # 0xe62a1
leaq 0x3968e(%rip), %rcx # 0xf1802
movl $0x43ef, %esi # imm = 0x43EF
xorl %eax, %eax
callq 0x1aed0
|
_ZN8nlohmann16json_abi_v3_11_36detail9dtoa_impl36get_cached_power_for_binary_exponentEi:
push rax
cmp edi, 0FFFFFA23h
jle loc_B80D0
cmp edi, 5DDh
jge loc_B80EF
xor eax, eax
mov ecx, edi
sub ecx, 0FFFFFFC3h
setl al
neg ecx
imul ecx, 13441h
lea edx, [rcx+3FFFFh]
test ecx, ecx
cmovns edx, ecx
sar edx, 12h
add eax, edx
cmp eax, 0FFFFFEC5h
jle loc_B810B
lea ecx, [rax+133h]
add eax, 13Ah
test cx, cx
cmovns eax, ecx
cwde
shr eax, 3
cmp ax, 4Fh ; 'O'
jnb loc_B8127
movzx eax, ax
shl eax, 4
lea rcx, _ZZN8nlohmann16json_abi_v3_11_36detail9dtoa_impl36get_cached_power_for_binary_exponentEiE13kCachedPowers; nlohmann::json_abi_v3_11_3::detail::dtoa_impl::get_cached_power_for_binary_exponent(int)::kCachedPowers
mov rdx, [rcx+rax+8]
add edi, edx
cmp edi, 0FFFFFF83h
jle loc_B8143
cmp edi, 0FFFFFFA1h
jge loc_B815F
mov rax, [rcx+rax]
pop rcx
retn
loc_B80D0:
lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aE1500; "e >= -1500"
mov esi, 43E4h
jmp loc_B8179
loc_B80EF:
lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aE1500_0; "e <= 1500"
mov esi, 43E5h
jmp short loc_B8179
loc_B810B:
lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aIndex0; "index >= 0"
mov esi, 43EAh
jmp short loc_B8179
loc_B8127:
lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aStaticCastStdS; "static_cast<std::size_t>(index) < kCach"...
mov esi, 43EBh
jmp short loc_B8179
loc_B8143:
lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aKalphaCachedEE; "kAlpha <= cached.e + e + 64"
mov esi, 43EEh
jmp short loc_B8179
loc_B815F:
lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aKgammaCachedEE; "kGamma >= cached.e + e + 64"
mov esi, 43EFh
loc_B8179:
xor eax, eax
call _ggml_abort
|
long long nlohmann::json_abi_v3_11_3::detail::dtoa_impl::get_cached_power_for_binary_exponent(
nlohmann::json_abi_v3_11_3::detail::dtoa_impl *this)
{
int v1; // eax
__int16 v2; // cx
__int16 v3; // ax
unsigned int v4; // eax
long long v5; // rax
int v6; // edi
long long v8; // rsi
if ( (int)this <= -1501 )
{
v8 = 17380LL;
ggml_abort(
"/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp",
17380LL,
"GGML_ASSERT(%s) failed",
"e >= -1500");
}
else if ( (int)this >= 1501 )
{
v8 = 17381LL;
ggml_abort(
"/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp",
17381LL,
"GGML_ASSERT(%s) failed",
"e <= 1500");
}
else
{
v1 = -78913 * ((int)this + 61) / 0x40000 + ((int)this < -61);
if ( v1 <= -315 )
{
v8 = 17386LL;
ggml_abort(
"/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp",
17386LL,
"GGML_ASSERT(%s) failed",
"index >= 0");
}
else
{
v2 = v1 + 307;
v3 = v1 + 314;
if ( v2 >= 0 )
v3 = v2;
v4 = (unsigned int)v3 >> 3;
if ( (unsigned __int16)v4 >= 0x4Fu )
{
v8 = 17387LL;
ggml_abort(
"/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp",
17387LL,
"GGML_ASSERT(%s) failed",
"static_cast<std::size_t>(index) < kCachedPowers.size()");
}
else
{
v5 = 16 * (unsigned int)(unsigned __int16)v4;
v6 = *(_QWORD *)((char *)&nlohmann::json_abi_v3_11_3::detail::dtoa_impl::get_cached_power_for_binary_exponent(int)::kCachedPowers
+ v5
+ 8)
+ (_DWORD)this;
if ( v6 <= -125 )
{
v8 = 17390LL;
ggml_abort(
"/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp",
17390LL,
"GGML_ASSERT(%s) failed",
"kAlpha <= cached.e + e + 64");
}
else
{
if ( v6 < -95 )
return *(_QWORD *)((char *)&nlohmann::json_abi_v3_11_3::detail::dtoa_impl::get_cached_power_for_binary_exponent(int)::kCachedPowers
+ v5);
v8 = 17391LL;
ggml_abort(
"/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp",
17391LL,
"GGML_ASSERT(%s) failed",
"kGamma >= cached.e + e + 64");
}
}
}
}
return nlohmann::json_abi_v3_11_3::detail::dtoa_impl::diyfp::mul(
"/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp",
v8);
}
|
get_cached_power_for_binary_exponent:
PUSH RAX
CMP EDI,0xfffffa23
JLE 0x001b80d0
CMP EDI,0x5dd
JGE 0x001b80ef
XOR EAX,EAX
MOV ECX,EDI
SUB ECX,-0x3d
SETL AL
NEG ECX
IMUL ECX,ECX,0x13441
LEA EDX,[RCX + 0x3ffff]
TEST ECX,ECX
CMOVNS EDX,ECX
SAR EDX,0x12
ADD EAX,EDX
CMP EAX,0xfffffec5
JLE 0x001b810b
LEA ECX,[RAX + 0x133]
ADD EAX,0x13a
TEST CX,CX
CMOVNS EAX,ECX
CWDE
SHR EAX,0x3
CMP AX,0x4f
JNC 0x001b8127
MOVZX EAX,AX
SHL EAX,0x4
LEA RCX,[0x1f3d28]
MOV RDX,qword ptr [RCX + RAX*0x1 + 0x8]
ADD EDI,EDX
CMP EDI,-0x7d
JLE 0x001b8143
CMP EDI,-0x5f
JGE 0x001b815f
MOV RAX,qword ptr [RCX + RAX*0x1]
POP RCX
RET
LAB_001b80d0:
LEA RDI,[0x1ec043]
LEA RDX,[0x1e62a1]
LEA RCX,[0x1f178f]
MOV ESI,0x43e4
JMP 0x001b8179
LAB_001b80ef:
LEA RDI,[0x1ec043]
LEA RDX,[0x1e62a1]
LEA RCX,[0x1f179a]
MOV ESI,0x43e5
JMP 0x001b8179
LAB_001b810b:
LEA RDI,[0x1ec043]
LEA RDX,[0x1e62a1]
LEA RCX,[0x1f17a4]
MOV ESI,0x43ea
JMP 0x001b8179
LAB_001b8127:
LEA RDI,[0x1ec043]
LEA RDX,[0x1e62a1]
LEA RCX,[0x1f17af]
MOV ESI,0x43eb
JMP 0x001b8179
LAB_001b8143:
LEA RDI,[0x1ec043]
LEA RDX,[0x1e62a1]
LEA RCX,[0x1f17e6]
MOV ESI,0x43ee
JMP 0x001b8179
LAB_001b815f:
LEA RDI,[0x1ec043]
LEA RDX,[0x1e62a1]
LEA RCX,[0x1f1802]
MOV ESI,0x43ef
LAB_001b8179:
XOR EAX,EAX
CALL 0x0011aed0
|
/* nlohmann::json_abi_v3_11_3::detail::dtoa_impl::get_cached_power_for_binary_exponent(int) */
int8
nlohmann::json_abi_v3_11_3::detail::dtoa_impl::get_cached_power_for_binary_exponent(int param_1)
{
short sVar1;
int iVar2;
ulong uVar3;
short sVar4;
int iVar5;
char *pcVar6;
int8 uVar7;
if (param_1 < -0x5dc) {
pcVar6 = "e >= -1500";
uVar7 = 0x43e4;
}
else if (param_1 < 0x5dd) {
iVar5 = (param_1 + 0x3d) * -0x13441;
iVar2 = iVar5 + 0x3ffff;
if (-1 < iVar5) {
iVar2 = iVar5;
}
iVar2 = (uint)(param_1 < -0x3d) + (iVar2 >> 0x12);
if (iVar2 < -0x13a) {
pcVar6 = "index >= 0";
uVar7 = 0x43ea;
}
else {
sVar1 = (short)iVar2;
sVar4 = sVar1 + 0x133;
sVar1 = sVar1 + 0x13a;
if (-1 < sVar4) {
sVar1 = sVar4;
}
if ((ushort)((uint)(int)sVar1 >> 3) < 0x4f) {
uVar3 = (ulong)(((uint)(int)sVar1 >> 3 & 0xffff) << 4);
iVar2 = param_1 + (int)*(int8 *)
(get_cached_power_for_binary_exponent(int)::kCachedPowers +
uVar3 + 8);
if (iVar2 < -0x7c) {
pcVar6 = "kAlpha <= cached.e + e + 64";
uVar7 = 0x43ee;
}
else {
if (iVar2 < -0x5f) {
return *(int8 *)(get_cached_power_for_binary_exponent(int)::kCachedPowers + uVar3)
;
}
pcVar6 = "kGamma >= cached.e + e + 64";
uVar7 = 0x43ef;
}
}
else {
pcVar6 = "static_cast<std::size_t>(index) < kCachedPowers.size()";
uVar7 = 0x43eb;
}
}
}
else {
pcVar6 = "e <= 1500";
uVar7 = 0x43e5;
}
/* WARNING: Subroutine does not return */
ggml_abort("/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp",uVar7,
"GGML_ASSERT(%s) failed",pcVar6);
}
|
|
8,994 |
longest_match
|
bluesky950520[P]quickjs/run-test262.c
|
int longest_match(const char *str, const char *find, int pos, int *ppos, int line, int *pline)
{
int len, maxlen;
maxlen = 0;
if (*find) {
const char *p;
for (p = str + pos; *p; p++) {
if (*p == *find) {
for (len = 1; p[len] && p[len] == find[len]; len++)
continue;
if (len > maxlen) {
maxlen = len;
if (ppos)
*ppos = p - str;
if (pline)
*pline = line;
if (!find[len])
break;
}
}
if (*p == '\n')
line++;
}
}
return maxlen;
}
|
O0
|
c
|
longest_match:
movq %rdi, -0x8(%rsp)
movq %rsi, -0x10(%rsp)
movl %edx, -0x14(%rsp)
movq %rcx, -0x20(%rsp)
movl %r8d, -0x24(%rsp)
movq %r9, -0x30(%rsp)
movl $0x0, -0x38(%rsp)
movq -0x10(%rsp), %rax
cmpb $0x0, (%rax)
je 0x10a82
movq -0x8(%rsp), %rax
movslq -0x14(%rsp), %rcx
addq %rcx, %rax
movq %rax, -0x40(%rsp)
movq -0x40(%rsp), %rax
cmpb $0x0, (%rax)
je 0x10a80
movq -0x40(%rsp), %rax
movzbl (%rax), %eax
movq -0x10(%rsp), %rcx
movzbl (%rcx), %ecx
cmpl %ecx, %eax
jne 0x10a53
movl $0x1, -0x34(%rsp)
movq -0x40(%rsp), %rax
movslq -0x34(%rsp), %rcx
movzbl (%rax,%rcx), %ecx
xorl %eax, %eax
cmpl $0x0, %ecx
movb %al, -0x41(%rsp)
je 0x109e1
movq -0x40(%rsp), %rax
movslq -0x34(%rsp), %rcx
movzbl (%rax,%rcx), %eax
movq -0x10(%rsp), %rcx
movslq -0x34(%rsp), %rdx
movzbl (%rcx,%rdx), %ecx
cmpl %ecx, %eax
sete %al
movb %al, -0x41(%rsp)
movb -0x41(%rsp), %al
testb $0x1, %al
jne 0x109eb
jmp 0x109fa
jmp 0x109ed
movl -0x34(%rsp), %eax
addl $0x1, %eax
movl %eax, -0x34(%rsp)
jmp 0x109a3
movl -0x34(%rsp), %eax
cmpl -0x38(%rsp), %eax
jle 0x10a51
movl -0x34(%rsp), %eax
movl %eax, -0x38(%rsp)
cmpq $0x0, -0x20(%rsp)
je 0x10a2a
movq -0x40(%rsp), %rax
movq -0x8(%rsp), %rcx
subq %rcx, %rax
movl %eax, %ecx
movq -0x20(%rsp), %rax
movl %ecx, (%rax)
cmpq $0x0, -0x30(%rsp)
je 0x10a3d
movl -0x24(%rsp), %ecx
movq -0x30(%rsp), %rax
movl %ecx, (%rax)
movq -0x10(%rsp), %rax
movslq -0x34(%rsp), %rcx
cmpb $0x0, (%rax,%rcx)
jne 0x10a4f
jmp 0x10a80
jmp 0x10a51
jmp 0x10a53
movq -0x40(%rsp), %rax
movzbl (%rax), %eax
cmpl $0xa, %eax
jne 0x10a6b
movl -0x24(%rsp), %eax
addl $0x1, %eax
movl %eax, -0x24(%rsp)
jmp 0x10a6d
movq -0x40(%rsp), %rax
addq $0x1, %rax
movq %rax, -0x40(%rsp)
jmp 0x10975
jmp 0x10a82
movl -0x38(%rsp), %eax
retq
nopw (%rax,%rax)
|
longest_match:
mov [rsp+var_8], rdi
mov [rsp+var_10], rsi
mov [rsp+var_14], edx
mov [rsp+var_20], rcx
mov [rsp+var_24], r8d
mov [rsp+var_30], r9
mov [rsp+var_38], 0
mov rax, [rsp+var_10]
cmp byte ptr [rax], 0
jz loc_10A82
mov rax, [rsp+var_8]
movsxd rcx, [rsp+var_14]
add rax, rcx
mov [rsp+var_40], rax
loc_10975:
mov rax, [rsp+var_40]
cmp byte ptr [rax], 0
jz loc_10A80
mov rax, [rsp+var_40]
movzx eax, byte ptr [rax]
mov rcx, [rsp+var_10]
movzx ecx, byte ptr [rcx]
cmp eax, ecx
jnz loc_10A53
mov [rsp+var_34], 1
loc_109A3:
mov rax, [rsp+var_40]
movsxd rcx, [rsp+var_34]
movzx ecx, byte ptr [rax+rcx]
xor eax, eax
cmp ecx, 0
mov [rsp+var_41], al
jz short loc_109E1
mov rax, [rsp+var_40]
movsxd rcx, [rsp+var_34]
movzx eax, byte ptr [rax+rcx]
mov rcx, [rsp+var_10]
movsxd rdx, [rsp+var_34]
movzx ecx, byte ptr [rcx+rdx]
cmp eax, ecx
setz al
mov [rsp+var_41], al
loc_109E1:
mov al, [rsp+var_41]
test al, 1
jnz short loc_109EB
jmp short loc_109FA
loc_109EB:
jmp short $+2
loc_109ED:
mov eax, [rsp+var_34]
add eax, 1
mov [rsp+var_34], eax
jmp short loc_109A3
loc_109FA:
mov eax, [rsp+var_34]
cmp eax, [rsp+var_38]
jle short loc_10A51
mov eax, [rsp+var_34]
mov [rsp+var_38], eax
cmp [rsp+var_20], 0
jz short loc_10A2A
mov rax, [rsp+var_40]
mov rcx, [rsp+var_8]
sub rax, rcx
mov ecx, eax
mov rax, [rsp+var_20]
mov [rax], ecx
loc_10A2A:
cmp [rsp+var_30], 0
jz short loc_10A3D
mov ecx, [rsp+var_24]
mov rax, [rsp+var_30]
mov [rax], ecx
loc_10A3D:
mov rax, [rsp+var_10]
movsxd rcx, [rsp+var_34]
cmp byte ptr [rax+rcx], 0
jnz short loc_10A4F
jmp short loc_10A80
loc_10A4F:
jmp short $+2
loc_10A51:
jmp short $+2
loc_10A53:
mov rax, [rsp+var_40]
movzx eax, byte ptr [rax]
cmp eax, 0Ah
jnz short loc_10A6B
mov eax, [rsp+var_24]
add eax, 1
mov [rsp+var_24], eax
loc_10A6B:
jmp short $+2
loc_10A6D:
mov rax, [rsp+var_40]
add rax, 1
mov [rsp+var_40], rax
jmp loc_10975
loc_10A80:
jmp short $+2
loc_10A82:
mov eax, [rsp+var_38]
retn
|
long long longest_match(long long a1, _BYTE *a2, int a3, _DWORD *a4, int a5, _DWORD *a6)
{
bool v7; // [rsp+1h] [rbp-41h]
_BYTE *i; // [rsp+2h] [rbp-40h]
int v9; // [rsp+Ah] [rbp-38h]
int j; // [rsp+Eh] [rbp-34h]
v9 = 0;
if ( *a2 )
{
for ( i = (_BYTE *)(a3 + a1); *i; ++i )
{
if ( *i == *a2 )
{
for ( j = 1; ; ++j )
{
v7 = 0;
if ( i[j] )
v7 = i[j] == a2[j];
if ( !v7 )
break;
}
if ( j > v9 )
{
v9 = j;
if ( a4 )
*a4 = (_DWORD)i - a1;
if ( a6 )
*a6 = a5;
if ( !a2[j] )
break;
}
}
if ( *i == 10 )
++a5;
}
}
return (unsigned int)v9;
}
|
longest_match:
MOV qword ptr [RSP + -0x8],RDI
MOV qword ptr [RSP + -0x10],RSI
MOV dword ptr [RSP + -0x14],EDX
MOV qword ptr [RSP + -0x20],RCX
MOV dword ptr [RSP + -0x24],R8D
MOV qword ptr [RSP + -0x30],R9
MOV dword ptr [RSP + -0x38],0x0
MOV RAX,qword ptr [RSP + -0x10]
CMP byte ptr [RAX],0x0
JZ 0x00110a82
MOV RAX,qword ptr [RSP + -0x8]
MOVSXD RCX,dword ptr [RSP + -0x14]
ADD RAX,RCX
MOV qword ptr [RSP + -0x40],RAX
LAB_00110975:
MOV RAX,qword ptr [RSP + -0x40]
CMP byte ptr [RAX],0x0
JZ 0x00110a80
MOV RAX,qword ptr [RSP + -0x40]
MOVZX EAX,byte ptr [RAX]
MOV RCX,qword ptr [RSP + -0x10]
MOVZX ECX,byte ptr [RCX]
CMP EAX,ECX
JNZ 0x00110a53
MOV dword ptr [RSP + -0x34],0x1
LAB_001109a3:
MOV RAX,qword ptr [RSP + -0x40]
MOVSXD RCX,dword ptr [RSP + -0x34]
MOVZX ECX,byte ptr [RAX + RCX*0x1]
XOR EAX,EAX
CMP ECX,0x0
MOV byte ptr [RSP + -0x41],AL
JZ 0x001109e1
MOV RAX,qword ptr [RSP + -0x40]
MOVSXD RCX,dword ptr [RSP + -0x34]
MOVZX EAX,byte ptr [RAX + RCX*0x1]
MOV RCX,qword ptr [RSP + -0x10]
MOVSXD RDX,dword ptr [RSP + -0x34]
MOVZX ECX,byte ptr [RCX + RDX*0x1]
CMP EAX,ECX
SETZ AL
MOV byte ptr [RSP + -0x41],AL
LAB_001109e1:
MOV AL,byte ptr [RSP + -0x41]
TEST AL,0x1
JNZ 0x001109eb
JMP 0x001109fa
LAB_001109eb:
JMP 0x001109ed
LAB_001109ed:
MOV EAX,dword ptr [RSP + -0x34]
ADD EAX,0x1
MOV dword ptr [RSP + -0x34],EAX
JMP 0x001109a3
LAB_001109fa:
MOV EAX,dword ptr [RSP + -0x34]
CMP EAX,dword ptr [RSP + -0x38]
JLE 0x00110a51
MOV EAX,dword ptr [RSP + -0x34]
MOV dword ptr [RSP + -0x38],EAX
CMP qword ptr [RSP + -0x20],0x0
JZ 0x00110a2a
MOV RAX,qword ptr [RSP + -0x40]
MOV RCX,qword ptr [RSP + -0x8]
SUB RAX,RCX
MOV ECX,EAX
MOV RAX,qword ptr [RSP + -0x20]
MOV dword ptr [RAX],ECX
LAB_00110a2a:
CMP qword ptr [RSP + -0x30],0x0
JZ 0x00110a3d
MOV ECX,dword ptr [RSP + -0x24]
MOV RAX,qword ptr [RSP + -0x30]
MOV dword ptr [RAX],ECX
LAB_00110a3d:
MOV RAX,qword ptr [RSP + -0x10]
MOVSXD RCX,dword ptr [RSP + -0x34]
CMP byte ptr [RAX + RCX*0x1],0x0
JNZ 0x00110a4f
JMP 0x00110a80
LAB_00110a4f:
JMP 0x00110a51
LAB_00110a51:
JMP 0x00110a53
LAB_00110a53:
MOV RAX,qword ptr [RSP + -0x40]
MOVZX EAX,byte ptr [RAX]
CMP EAX,0xa
JNZ 0x00110a6b
MOV EAX,dword ptr [RSP + -0x24]
ADD EAX,0x1
MOV dword ptr [RSP + -0x24],EAX
LAB_00110a6b:
JMP 0x00110a6d
LAB_00110a6d:
MOV RAX,qword ptr [RSP + -0x40]
ADD RAX,0x1
MOV qword ptr [RSP + -0x40],RAX
JMP 0x00110975
LAB_00110a80:
JMP 0x00110a82
LAB_00110a82:
MOV EAX,dword ptr [RSP + -0x38]
RET
|
int longest_match(long param_1,char *param_2,int param_3,int *param_4,int param_5,int *param_6)
{
bool bVar1;
char *local_40;
int local_38;
int local_34;
int local_24;
local_38 = 0;
if (*param_2 != '\0') {
local_24 = param_5;
for (local_40 = (char *)(param_1 + param_3); *local_40 != '\0'; local_40 = local_40 + 1) {
if (*local_40 == *param_2) {
local_34 = 1;
while( true ) {
bVar1 = false;
if (local_40[local_34] != '\0') {
bVar1 = local_40[local_34] == param_2[local_34];
}
if (!bVar1) break;
local_34 = local_34 + 1;
}
if (local_38 < local_34) {
local_38 = local_34;
if (param_4 != (int *)0x0) {
*param_4 = (int)local_40 - (int)param_1;
}
if (param_6 != (int *)0x0) {
*param_6 = local_24;
}
if (param_2[local_34] == '\0') {
return local_34;
}
}
}
if (*local_40 == '\n') {
local_24 = local_24 + 1;
}
}
}
return local_38;
}
|
|
8,995 |
_gnu_cxx::__normal_iterator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const, minja::Value>*, std::vector<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const, minja::Value>, std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const, minja::Value>>>> nlohmann::json_abi_v3_11_3::ordered_map<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>, minja::Value, std::less<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>, std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const, minja::Value>>>::find<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, 0>(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
|
monkey531[P]llama/common/json.hpp
|
iterator find(KeyType && key) // NOLINT(cppcoreguidelines-missing-std-forward)
{
for (auto it = this->begin(); it != this->end(); ++it)
{
if (m_compare(it->first, key))
{
return it;
}
}
return Container::end();
}
|
O2
|
cpp
|
_gnu_cxx::__normal_iterator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const, minja::Value>*, std::vector<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const, minja::Value>, std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const, minja::Value>>>> nlohmann::json_abi_v3_11_3::ordered_map<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>, minja::Value, std::less<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>, std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const, minja::Value>>>::find<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, 0>(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&):
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r15
movq (%rdi), %r14
movq 0x8(%r15), %rax
cmpq %rax, %r14
je 0x934eb
movq %r14, %rdi
movq %rbx, %rsi
callq 0x3af56
testb %al, %al
jne 0x934e8
addq $0x30, %r14
jmp 0x934ca
movq %r14, %rax
popq %rbx
popq %r14
popq %r15
retq
nop
|
_ZN8nlohmann16json_abi_v3_11_311ordered_mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS0_10basic_jsonIS1_St6vectorS7_blmdSaNS0_14adl_serializerES9_IhSaIhEEvEESt4lessIvESaISt4pairIKS7_SD_EEE4findIRA7_KcTnNSt9enable_ifIXsr6detail21is_usable_as_key_typeISt8equal_toIvES7_T_EE5valueEiE4typeELi0EEEN9__gnu_cxx17__normal_iteratorIPSI_S9_ISI_SJ_EEEOSS_:
push r15
push r14
push rbx
mov rbx, rsi
mov r15, rdi
mov r14, [rdi]
loc_934CA:
mov rax, [r15+8]
cmp r14, rax
jz short loc_934EB
mov rdi, r14
mov rsi, rbx
call _ZSteqIcSt11char_traitsIcESaIcEEbRKNSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_; std::operator==<char>(std::string const&,char const*)
test al, al
jnz short loc_934E8
add r14, 30h ; '0'
jmp short loc_934CA
loc_934E8:
mov rax, r14
loc_934EB:
pop rbx
pop r14
pop r15
retn
|
long long ZN8nlohmann16json_abi_v3_11_311ordered_mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS0_10basic_jsonIS1_St6vectorS7_blmdSaNS0_14adl_serializerES9_IhSaIhEEvEESt4lessIvESaISt4pairIKS7_SD_EEE4findIRA7_KcTnNSt9enable_ifIXsr6detail21is_usable_as_key_typeISt8equal_toIvES7_T_EE5valueEiE4typeELi0EEEN9__gnu_cxx17__normal_iteratorIPSI_S9_ISI_SJ_EEEOSS_(
long long *a1)
{
long long i; // r14
long long result; // rax
for ( i = *a1; ; i += 48LL )
{
result = a1[1];
if ( i == result )
break;
if ( std::operator==<char>(i) )
return i;
}
return result;
}
|
_ZN8nlohmann16json_abi_v3_11_311ordered_mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS0_10basic_jsonIS1_St6vectorS7_blmdSaNS0_14adl_serializerES9_IhSaIhEEvEESt4lessIvESaISt4pairIKS7_SD_EEE4findIRA7_KcTnNSt9enable_ifIXsr6detail21is_usable_as_key_typeISt8equal_toIvES7_T_EE5valueEiE4typeELi0EEEN9__gnu_cxx17__normal_iteratorIPSI_S9_ISI_SJ_EEEOSS_:
PUSH R15
PUSH R14
PUSH RBX
MOV RBX,RSI
MOV R15,RDI
MOV R14,qword ptr [RDI]
LAB_001934ca:
MOV RAX,qword ptr [R15 + 0x8]
CMP R14,RAX
JZ 0x001934eb
MOV RDI,R14
MOV RSI,RBX
CALL 0x0013af56
TEST AL,AL
JNZ 0x001934e8
ADD R14,0x30
JMP 0x001934ca
LAB_001934e8:
MOV RAX,R14
LAB_001934eb:
POP RBX
POP R14
POP R15
RET
|
string * _ZN8nlohmann16json_abi_v3_11_311ordered_mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS0_10basic_jsonIS1_St6vectorS7_blmdSaNS0_14adl_serializerES9_IhSaIhEEvEESt4lessIvESaISt4pairIKS7_SD_EEE4findIRA7_KcTnNSt9enable_ifIXsr6detail21is_usable_as_key_typeISt8equal_toIvES7_T_EE5valueEiE4typeELi0EEEN9__gnu_cxx17__normal_iteratorIPSI_S9_ISI_SJ_EEEOSS_
(int8 *param_1,char *param_2)
{
bool bVar1;
string *psVar2;
string *psVar3;
psVar3 = (string *)*param_1;
while ((psVar2 = (string *)param_1[1], psVar3 != (string *)param_1[1] &&
(bVar1 = std::operator==(psVar3,param_2), psVar2 = psVar3, !bVar1))) {
psVar3 = psVar3 + 0x30;
}
return psVar2;
}
|
|
8,996 |
Vector3Refract
|
csit-sgu[P]mit-game-2025_1/Libraries/raylib/src/raymath.h
|
RMAPI Vector3 Vector3Refract(Vector3 v, Vector3 n, float r)
{
Vector3 result = { 0 };
float dot = v.x*n.x + v.y*n.y + v.z*n.z;
float d = 1.0f - r*r*(1.0f - dot*dot);
if (d >= 0.0f)
{
d = sqrtf(d);
v.x = r*v.x - (r*dot + d)*n.x;
v.y = r*v.y - (r*dot + d)*n.y;
v.z = r*v.z - (r*dot + d)*n.z;
result = v;
}
return result;
}
|
O2
|
c
|
Vector3Refract:
movaps %xmm1, %xmm5
movaps %xmm0, %xmm6
mulps %xmm2, %xmm0
shufps $0x55, %xmm0, %xmm0 # xmm0 = xmm0[1,1,1,1]
movaps %xmm6, %xmm1
mulss %xmm2, %xmm1
addss %xmm0, %xmm1
movaps %xmm5, %xmm7
mulss %xmm3, %xmm7
addss %xmm1, %xmm7
movaps %xmm7, %xmm1
mulss %xmm7, %xmm1
movss 0x61c95(%rip), %xmm0 # 0xb969c
movaps %xmm0, %xmm8
subss %xmm1, %xmm8
movaps %xmm4, %xmm1
mulss %xmm4, %xmm1
mulss %xmm8, %xmm1
subss %xmm1, %xmm0
xorps %xmm1, %xmm1
xorps %xmm8, %xmm8
ucomiss %xmm1, %xmm0
jb 0x57aba
ucomiss %xmm1, %xmm0
jb 0x57a3b
sqrtss %xmm0, %xmm0
jmp 0x57a88
subq $0x58, %rsp
movss %xmm5, 0xc(%rsp)
movaps %xmm4, 0x40(%rsp)
movss %xmm3, 0x8(%rsp)
movaps %xmm6, 0x30(%rsp)
movaps %xmm7, 0x20(%rsp)
movaps %xmm2, 0x10(%rsp)
callq 0x99e0
movaps 0x10(%rsp), %xmm2
movaps 0x20(%rsp), %xmm7
movaps 0x30(%rsp), %xmm6
movss 0x8(%rsp), %xmm3
movaps 0x40(%rsp), %xmm4
movss 0xc(%rsp), %xmm5
addq $0x58, %rsp
mulss %xmm4, %xmm7
addss %xmm0, %xmm7
movaps %xmm7, %xmm0
shufps $0x0, %xmm7, %xmm0 # xmm0 = xmm0[0,0],xmm7[0,0]
mulps %xmm2, %xmm0
movaps %xmm4, %xmm8
shufps $0x0, %xmm4, %xmm8 # xmm8 = xmm8[0,0],xmm4[0,0]
mulps %xmm6, %xmm8
subps %xmm0, %xmm8
mulss %xmm3, %xmm7
mulss %xmm4, %xmm5
subss %xmm7, %xmm5
movaps %xmm5, %xmm1
movaps %xmm8, %xmm0
retq
|
Vector3Refract:
movaps xmm5, xmm1
movaps xmm6, xmm0
mulps xmm0, xmm2
shufps xmm0, xmm0, 55h ; 'U'
movaps xmm1, xmm6
mulss xmm1, xmm2
addss xmm1, xmm0
movaps xmm7, xmm5
mulss xmm7, xmm3
addss xmm7, xmm1
movaps xmm1, xmm7
mulss xmm1, xmm7
movss xmm0, cs:dword_B969C
movaps xmm8, xmm0
subss xmm8, xmm1
movaps xmm1, xmm4
mulss xmm1, xmm4
mulss xmm1, xmm8
subss xmm0, xmm1
xorps xmm1, xmm1
xorps xmm8, xmm8
ucomiss xmm0, xmm1
jb loc_57ABA
ucomiss xmm0, xmm1
jb short loc_57A3B
sqrtss xmm0, xmm0
jmp short loc_57A88
loc_57A3B:
sub rsp, 58h
movss [rsp+58h+var_4C], xmm5
movaps [rsp+58h+var_18], xmm4
movss [rsp+58h+var_50], xmm3
movaps [rsp+58h+var_28], xmm6
movaps [rsp+58h+var_38], xmm7
movaps [rsp+58h+var_48], xmm2
call _sqrtf
movaps xmm2, [rsp+58h+var_48]
movaps xmm7, [rsp+58h+var_38]
movaps xmm6, [rsp+58h+var_28]
movss xmm3, [rsp+58h+var_50]
movaps xmm4, [rsp+58h+var_18]
movss xmm5, [rsp+58h+var_4C]
add rsp, 58h
loc_57A88:
mulss xmm7, xmm4
addss xmm7, xmm0
movaps xmm0, xmm7
shufps xmm0, xmm7, 0
mulps xmm0, xmm2
movaps xmm8, xmm4
shufps xmm8, xmm4, 0
mulps xmm8, xmm6
subps xmm8, xmm0
mulss xmm7, xmm3
mulss xmm5, xmm4
subss xmm5, xmm7
movaps xmm1, xmm5
loc_57ABA:
movaps xmm0, xmm8
retn
|
__m128 Vector3Refract(__m128 a1, __m128 a2, __m128 a3, float a4, __m128 a5)
{
__m128 v6; // xmm0
__m128 v7; // xmm7
float v8; // xmm0_4
__int128 v9; // xmm8
v6 = _mm_mul_ps(a1, a3);
v7 = a2;
v7.m128_f32[0] = (float)(a2.m128_f32[0] * a4)
+ (float)((float)(a1.m128_f32[0] * a3.m128_f32[0]) + _mm_shuffle_ps(v6, v6, 85).m128_f32[0]);
v8 = 1.0 - (float)((float)(a5.m128_f32[0] * a5.m128_f32[0]) * (float)(1.0 - (float)(v7.m128_f32[0] * v7.m128_f32[0])));
v9 = 0LL;
if ( v8 >= 0.0 )
{
v7.m128_f32[0] = (float)(v7.m128_f32[0] * a5.m128_f32[0]) + fsqrt(v8);
return _mm_sub_ps(_mm_mul_ps(_mm_shuffle_ps(a5, a5, 0), a1), _mm_mul_ps(_mm_shuffle_ps(v7, v7, 0), a3));
}
return (__m128)v9;
}
|
Vector3Refract:
MOVAPS XMM5,XMM1
MOVAPS XMM6,XMM0
MULPS XMM0,XMM2
SHUFPS XMM0,XMM0,0x55
MOVAPS XMM1,XMM6
MULSS XMM1,XMM2
ADDSS XMM1,XMM0
MOVAPS XMM7,XMM5
MULSS XMM7,XMM3
ADDSS XMM7,XMM1
MOVAPS XMM1,XMM7
MULSS XMM1,XMM7
MOVSS XMM0,dword ptr [0x001b969c]
MOVAPS XMM8,XMM0
SUBSS XMM8,XMM1
MOVAPS XMM1,XMM4
MULSS XMM1,XMM4
MULSS XMM1,XMM8
SUBSS XMM0,XMM1
XORPS XMM1,XMM1
XORPS XMM8,XMM8
UCOMISS XMM0,XMM1
JC 0x00157aba
UCOMISS XMM0,XMM1
JC 0x00157a3b
SQRTSS XMM0,XMM0
JMP 0x00157a88
LAB_00157a3b:
SUB RSP,0x58
MOVSS dword ptr [RSP + 0xc],XMM5
MOVAPS xmmword ptr [RSP + 0x40],XMM4
MOVSS dword ptr [RSP + 0x8],XMM3
MOVAPS xmmword ptr [RSP + 0x30],XMM6
MOVAPS xmmword ptr [RSP + 0x20],XMM7
MOVAPS xmmword ptr [RSP + 0x10],XMM2
CALL 0x001099e0
MOVAPS XMM2,xmmword ptr [RSP + 0x10]
MOVAPS XMM7,xmmword ptr [RSP + 0x20]
MOVAPS XMM6,xmmword ptr [RSP + 0x30]
MOVSS XMM3,dword ptr [RSP + 0x8]
MOVAPS XMM4,xmmword ptr [RSP + 0x40]
MOVSS XMM5,dword ptr [RSP + 0xc]
ADD RSP,0x58
LAB_00157a88:
MULSS XMM7,XMM4
ADDSS XMM7,XMM0
MOVAPS XMM0,XMM7
SHUFPS XMM0,XMM7,0x0
MULPS XMM0,XMM2
MOVAPS XMM8,XMM4
SHUFPS XMM8,XMM4,0x0
MULPS XMM8,XMM6
SUBPS XMM8,XMM0
MULSS XMM7,XMM3
MULSS XMM5,XMM4
SUBSS XMM5,XMM7
MOVAPS XMM1,XMM5
LAB_00157aba:
MOVAPS XMM0,XMM8
RET
|
int8
Vector3Refract(int8 param_1,float param_2,int8 param_3,float param_4,float param_5)
{
float fVar1;
float fVar2;
float fVar3;
float fVar4;
float fVar5;
float fVar6;
fVar3 = (float)((ulong)param_3 >> 0x20);
fVar2 = (float)((ulong)param_1 >> 0x20);
fVar4 = param_2 * param_4 + (float)param_1 * (float)param_3 + fVar2 * fVar3;
fVar1 = DAT_001b969c - param_5 * param_5 * (DAT_001b969c - fVar4 * fVar4);
fVar5 = 0.0;
fVar6 = 0.0;
if (0.0 <= fVar1) {
if (fVar1 < 0.0) {
fVar1 = sqrtf(fVar1);
}
else {
fVar1 = SQRT(fVar1);
}
fVar1 = fVar4 * param_5 + fVar1;
fVar5 = param_5 * (float)param_1 - fVar1 * (float)param_3;
fVar6 = param_5 * fVar2 - fVar1 * fVar3;
}
return CONCAT44(fVar6,fVar5);
}
|
|
8,997 |
my_hash_sort_utf8mb3
|
eloqsql/strings/ctype-utf8.c
|
static void my_hash_sort_utf8mb3(CHARSET_INFO *cs, const uchar *s, size_t slen,
ulong *nr1, ulong *nr2)
{
/*
Remove end space. We have to do this to be able to compare
'A ' and 'A' as identical
*/
const uchar *e= skip_trailing_space(s, slen);
my_hash_sort_utf8mb3_nopad(cs, s, e - s, nr1, nr2);
}
|
O3
|
c
|
my_hash_sort_utf8mb3:
pushq %rbp
movq %rsp, %rbp
leaq (%rsi,%rdx), %r10
cmpq $0x15, %rdx
jb 0xd594f
movq %r10, %r9
andq $-0x4, %r9
cmpq %rsi, %r9
jbe 0xd594f
leaq 0x3(%rsi), %rdx
andq $-0x4, %rdx
movq %r10, %rax
movb -0x1(%r10), %r11b
cmpq %r9, %r10
jbe 0xd5974
leaq -0x1(%rax), %r10
cmpb $0x20, %r11b
je 0xd5937
jmp 0xd5952
movq %r10, %rax
movq %rax, %r9
subq %rsi, %r9
movq %r9, %rdx
cmpq %rsi, %rax
jbe 0xd596e
cmpb $0x20, -0x1(%rax)
leaq -0x1(%rax), %rax
leaq -0x1(%rdx), %r9
je 0xd5958
popq %rbp
jmp 0xd5b59
cmpb $0x20, %r11b
setne %r10b
cmpq %r9, %rdx
setae %r9b
orb %r10b, %r9b
jne 0xd5952
movq %rax, %r9
movq %r9, %rax
cmpq %rdx, %r9
jbe 0xd5952
leaq -0x4(%rax), %r9
cmpl $0x20202020, -0x4(%rax) # imm = 0x20202020
je 0xd598b
jmp 0xd5952
|
my_hash_sort_utf8mb3:
push rbp
mov rbp, rsp
lea r10, [rsi+rdx]
cmp rdx, 15h
jb short loc_D594F
mov r9, r10
and r9, 0FFFFFFFFFFFFFFFCh
cmp r9, rsi
jbe short loc_D594F
lea rdx, [rsi+3]
and rdx, 0FFFFFFFFFFFFFFFCh
loc_D5937:
mov rax, r10
mov r11b, [r10-1]
cmp r10, r9
jbe short loc_D5974
lea r10, [rax-1]
cmp r11b, 20h ; ' '
jz short loc_D5937
jmp short loc_D5952
loc_D594F:
mov rax, r10
loc_D5952:
mov r9, rax
sub r9, rsi
loc_D5958:
mov rdx, r9
cmp rax, rsi
jbe short loc_D596E
cmp byte ptr [rax-1], 20h ; ' '
lea rax, [rax-1]
lea r9, [rdx-1]
jz short loc_D5958
loc_D596E:
pop rbp
jmp my_hash_sort_utf8mb3_nopad
loc_D5974:
cmp r11b, 20h ; ' '
setnz r10b
cmp rdx, r9
setnb r9b
or r9b, r10b
jnz short loc_D5952
mov r9, rax
loc_D598B:
mov rax, r9
cmp r9, rdx
jbe short loc_D5952
lea r9, [rax-4]
cmp dword ptr [rax-4], 20202020h
jz short loc_D598B
jmp short loc_D5952
|
long long my_hash_sort_utf8mb3(long long a1, unsigned long long a2, unsigned long long a3, long long a4, long long a5)
{
unsigned long long v5; // r10
unsigned long long v6; // r9
unsigned long long v7; // rdx
unsigned long long v8; // rax
char v9; // r11
unsigned long long v10; // r9
unsigned long long v11; // rdx
bool v12; // zf
unsigned long long v14; // r9
v5 = a2 + a3;
if ( a3 < 0x15 || (v6 = v5 & 0xFFFFFFFFFFFFFFFCLL, (v5 & 0xFFFFFFFFFFFFFFFCLL) <= a2) )
{
v8 = a2 + a3;
}
else
{
v7 = (a2 + 3) & 0xFFFFFFFFFFFFFFFCLL;
while ( 1 )
{
v8 = v5;
v9 = *(_BYTE *)(v5 - 1);
if ( v5 <= v6 )
break;
--v5;
if ( v9 != 32 )
goto LABEL_8;
}
if ( v9 == 32 && v7 < v6 )
{
v14 = v5;
do
{
v8 = v14;
if ( v14 <= v7 )
break;
v14 -= 4LL;
}
while ( *(_DWORD *)(v8 - 4) == 538976288 );
}
}
LABEL_8:
v10 = v8 - a2;
do
{
v11 = v10;
if ( v8 <= a2 )
break;
v12 = *(_BYTE *)--v8 == 32;
--v10;
}
while ( v12 );
return my_hash_sort_utf8mb3_nopad(a1, a2, v11, a4, a5, v10);
}
|
my_hash_sort_utf8mb3:
PUSH RBP
MOV RBP,RSP
LEA R10,[RSI + RDX*0x1]
CMP RDX,0x15
JC 0x001d594f
MOV R9,R10
AND R9,-0x4
CMP R9,RSI
JBE 0x001d594f
LEA RDX,[RSI + 0x3]
AND RDX,-0x4
LAB_001d5937:
MOV RAX,R10
MOV R11B,byte ptr [R10 + -0x1]
CMP R10,R9
JBE 0x001d5974
LEA R10,[RAX + -0x1]
CMP R11B,0x20
JZ 0x001d5937
JMP 0x001d5952
LAB_001d594f:
MOV RAX,R10
LAB_001d5952:
MOV R9,RAX
SUB R9,RSI
LAB_001d5958:
MOV RDX,R9
CMP RAX,RSI
JBE 0x001d596e
CMP byte ptr [RAX + -0x1],0x20
LEA RAX,[RAX + -0x1]
LEA R9,[RDX + -0x1]
JZ 0x001d5958
LAB_001d596e:
POP RBP
JMP 0x001d5b59
LAB_001d5974:
CMP R11B,0x20
SETNZ R10B
CMP RDX,R9
SETNC R9B
OR R9B,R10B
JNZ 0x001d5952
MOV R9,RAX
LAB_001d598b:
MOV RAX,R9
CMP R9,RDX
JBE 0x001d5952
LEA R9,[RAX + -0x4]
CMP dword ptr [RAX + -0x4],0x20202020
JZ 0x001d598b
JMP 0x001d5952
|
void my_hash_sort_utf8mb3(int8 param_1,ulong param_2,ulong param_3)
{
char *pcVar1;
ulong uVar2;
ulong uVar3;
ulong uVar4;
ulong uVar5;
uVar3 = param_2 + param_3;
if ((0x14 < param_3) && (uVar5 = uVar3 & 0xfffffffffffffffc, param_2 < uVar5)) {
uVar4 = param_2 + 3 & 0xfffffffffffffffc;
uVar2 = uVar3;
do {
uVar3 = uVar2;
if (uVar3 <= uVar5) {
uVar2 = uVar3;
if (uVar4 < uVar5 && *(char *)(uVar3 - 1) == ' ') goto LAB_001d598b;
break;
}
uVar2 = uVar3 - 1;
} while (*(char *)(uVar3 - 1) == ' ');
}
goto LAB_001d5958;
while (uVar2 = uVar3 - 4, *(int *)(uVar3 - 4) == 0x20202020) {
LAB_001d598b:
uVar3 = uVar2;
if (uVar3 <= uVar4) break;
}
LAB_001d5958:
do {
if (uVar3 <= param_2) break;
pcVar1 = (char *)(uVar3 - 1);
uVar3 = uVar3 - 1;
} while (*pcVar1 == ' ');
my_hash_sort_utf8mb3_nopad();
return;
}
|
|
8,998 |
adler32_combine_
|
3fs/build_O3/src/apache-arrow-cpp/cpp/zlib_ep-prefix/src/zlib_ep/adler32.c
|
local uLong adler32_combine_(adler1, adler2, len2)
uLong adler1;
uLong adler2;
z_off64_t len2;
{
unsigned long sum1;
unsigned long sum2;
unsigned rem;
/* for negative len, return invalid adler32 as a clue for debugging */
if (len2 < 0)
return 0xffffffffUL;
/* the derivation of this formula is left as an exercise for the reader */
MOD63(len2); /* assumes len2 >= 0 */
rem = (unsigned)len2;
sum1 = adler1 & 0xffff;
sum2 = rem * sum1;
MOD(sum2);
sum1 += (adler2 & 0xffff) + BASE - 1;
sum2 += ((adler1 >> 16) & 0xffff) + ((adler2 >> 16) & 0xffff) + BASE - rem;
if (sum1 >= BASE) sum1 -= BASE;
if (sum1 >= BASE) sum1 -= BASE;
if (sum2 >= ((unsigned long)BASE << 1)) sum2 -= ((unsigned long)BASE << 1);
if (sum2 >= BASE) sum2 -= BASE;
return sum1 | (sum2 << 16);
}
|
O3
|
c
|
adler32_combine_:
testq %rdx, %rdx
js 0x37c7
movq %rdx, %rcx
movabsq $0xf00e10d2fc5cd, %rdx # imm = 0xF00E10D2FC5CD
movq %rcx, %rax
mulq %rdx
movq %rcx, %rax
subq %rdx, %rax
shrq %rax
addq %rdx, %rax
shrq $0xf, %rax
imulq $0xfff1, %rax, %rax # imm = 0xFFF1
subq %rax, %rcx
movl $0xffff, %eax # imm = 0xFFFF
movq %rdi, %rdx
andq %rax, %rdx
movq %rcx, %r8
imulq %rdx, %r8
movl $0x80078071, %r9d # imm = 0x80078071
imulq %r8, %r9
shrq $0x2f, %r9
imull $0xfff1, %r9d, %r9d # imm = 0xFFF1
subl %r9d, %r8d
andq %rsi, %rax
leaq (%rdx,%rax), %r9
addl $0xfff0, %r9d # imm = 0xFFF0
shrl $0x10, %edi
shrl $0x10, %esi
addq %rdi, %rsi
subq %rcx, %rsi
addq %r8, %rsi
movl $0xfff1, %ecx # imm = 0xFFF1
leaq (%rsi,%rcx), %rdi
cmpl $0xfff1, %r9d # imm = 0xFFF1
leaq -0x1(%rdx,%rax), %rax
movl $0xfff0, %edx # imm = 0xFFF0
cmovaeq %rax, %rdx
movq $-0xfff1, %rax # imm = 0xFFFF000F
leaq (%rdx,%rax), %r8
cmpq %rcx, %rdx
cmovbq %rdx, %r8
addq %rax, %rsi
cmpq $0x1ffe2, %rdi # imm = 0x1FFE2
cmovbq %rdi, %rsi
movq %rsi, %rdx
shlq $0x10, %rdx
movabsq $-0xfff10000, %rax # imm = 0xFFFFFFFF000F0000
addq %rdx, %rax
cmpq %rcx, %rsi
cmovbq %rdx, %rax
orq %r8, %rax
retq
movl $0xffffffff, %eax # imm = 0xFFFFFFFF
retq
|
adler32_combine_:
test rdx, rdx
js loc_37C7
mov rcx, rdx
mov rdx, 0F00E10D2FC5CDh
mov rax, rcx
mul rdx
mov rax, rcx
sub rax, rdx
shr rax, 1
add rax, rdx
shr rax, 0Fh
imul rax, 0FFF1h
sub rcx, rax
mov eax, 0FFFFh
mov rdx, rdi
and rdx, rax
mov r8, rcx
imul r8, rdx
mov r9d, 80078071h
imul r9, r8
shr r9, 2Fh
imul r9d, 0FFF1h
sub r8d, r9d
and rax, rsi
lea r9, [rdx+rax]
add r9d, 0FFF0h
shr edi, 10h
shr esi, 10h
add rsi, rdi
sub rsi, rcx
add rsi, r8
mov ecx, 0FFF1h
lea rdi, [rsi+rcx]
cmp r9d, 0FFF1h
lea rax, [rdx+rax-1]
mov edx, 0FFF0h
cmovnb rdx, rax
mov rax, 0FFFFFFFFFFFF000Fh
lea r8, [rdx+rax]
cmp rdx, rcx
cmovb r8, rdx
add rsi, rax
cmp rdi, 1FFE2h
cmovb rsi, rdi
mov rdx, rsi
shl rdx, 10h
mov rax, 0FFFFFFFF000F0000h
add rax, rdx
cmp rsi, rcx
cmovb rax, rdx
or rax, r8
retn
loc_37C7:
mov eax, 0FFFFFFFFh
retn
|
long long adler32_combine_(unsigned int a1, unsigned int a2, long long a3)
{
unsigned long long v3; // rcx
long long v4; // rdx
long long v5; // rax
unsigned int v6; // r9d
unsigned long long v7; // rsi
unsigned long long v8; // rdi
long long v9; // rax
unsigned long long v10; // rdx
unsigned long long v11; // r8
unsigned long long v12; // rsi
long long v13; // rax
if ( a3 < 0 )
return 0xFFFFFFFFLL;
v3 = a3 % 0xFFF1uLL;
v4 = (unsigned __int16)a1;
v5 = (unsigned __int16)a2;
v6 = (unsigned __int16)a1 + (unsigned __int16)a2 + 65520;
v7 = (unsigned __int16)a1 * (unsigned int)v3 % 0xFFF1 + HIWORD(a1) + (unsigned long long)HIWORD(a2) - v3;
v8 = v7 + 65521;
v9 = v4 + v5 - 1;
v10 = 65520LL;
if ( v6 >= 0xFFF1 )
v10 = v9;
v11 = v10 - 65521;
if ( v10 < 0xFFF1 )
v11 = v10;
v12 = v7 - 65521;
if ( v8 < 0x1FFE2 )
v12 = v8;
v13 = (v12 << 16) - 4293984256u;
if ( v12 < 0xFFF1 )
v13 = v12 << 16;
return v11 | v13;
}
|
adler32_combine_:
TEST RDX,RDX
JS 0x001037c7
MOV RCX,RDX
MOV RDX,0xf00e10d2fc5cd
MOV RAX,RCX
MUL RDX
MOV RAX,RCX
SUB RAX,RDX
SHR RAX,0x1
ADD RAX,RDX
SHR RAX,0xf
IMUL RAX,RAX,0xfff1
SUB RCX,RAX
MOV EAX,0xffff
MOV RDX,RDI
AND RDX,RAX
MOV R8,RCX
IMUL R8,RDX
MOV R9D,0x80078071
IMUL R9,R8
SHR R9,0x2f
IMUL R9D,R9D,0xfff1
SUB R8D,R9D
AND RAX,RSI
LEA R9,[RDX + RAX*0x1]
ADD R9D,0xfff0
SHR EDI,0x10
SHR ESI,0x10
ADD RSI,RDI
SUB RSI,RCX
ADD RSI,R8
MOV ECX,0xfff1
LEA RDI,[RSI + RCX*0x1]
CMP R9D,0xfff1
LEA RAX,[RDX + RAX*0x1 + -0x1]
MOV EDX,0xfff0
CMOVNC RDX,RAX
MOV RAX,-0xfff1
LEA R8,[RDX + RAX*0x1]
CMP RDX,RCX
CMOVC R8,RDX
ADD RSI,RAX
CMP RDI,0x1ffe2
CMOVC RSI,RDI
MOV RDX,RSI
SHL RDX,0x10
MOV RAX,-0xfff10000
ADD RAX,RDX
CMP RSI,RCX
CMOVC RAX,RDX
OR RAX,R8
RET
LAB_001037c7:
MOV EAX,0xffffffff
RET
|
ulong adler32_combine_(ulong param_1,ulong param_2,ulong param_3)
{
ulong uVar1;
ulong uVar2;
long lVar3;
ulong uVar4;
if (-1 < (long)param_3) {
uVar1 = param_1 & 0xffff;
uVar4 = (param_3 % 0xfff1) * uVar1;
lVar3 = (((param_2 >> 0x10 & 0xffff) + (param_1 >> 0x10 & 0xffff)) - param_3 % 0xfff1) +
(ulong)(uint)((int)uVar4 + (int)(uVar4 / 0xfff1) * -0xfff1);
uVar4 = lVar3 + 0xfff1;
uVar2 = 0xfff0;
if (0xfff0 < (int)uVar1 + (int)(param_2 & 0xffff) + 0xfff0U) {
uVar2 = (uVar1 - 1) + (param_2 & 0xffff);
}
uVar1 = uVar2 - 0xfff1;
if (uVar2 < 0xfff1) {
uVar1 = uVar2;
}
uVar2 = lVar3 - 0xfff1;
if (uVar4 < 0x1ffe2) {
uVar2 = uVar4;
}
uVar4 = uVar2 * 0x10000 - 0xfff10000;
if (uVar2 < 0xfff1) {
uVar4 = uVar2 * 0x10000;
}
return uVar4 | uVar1;
}
return 0xffffffff;
}
|
|
8,999 |
ac_psr_finish_call
|
alca/libalca/parser.c
|
ac_expr *ac_psr_finish_call(ac_parser *parser, ac_expr *callee)
{
ac_expr *call = ac_expr_new_call(callee, ac_psr_previous_token(parser));
while (!ac_psr_check(parser, TOKEN_RPAREN))
{
ac_expr *arg = ac_psr_expression(parser);
if (!arg)
{
ac_expr_free_expression(call);
return NULL;
}
ac_expr_call_append_argument(call, arg);
MATCH(parser, TOKEN_COMMA);
}
if (!ac_psr_consume(parser,
TOKEN_RPAREN,
ERROR_UNTERMINATED_EXPRESSION,
"incomplete call (expected ')')"))
{
ac_expr_free_expression(call);
return NULL;
}
return call;
}
|
O0
|
c
|
ac_psr_finish_call:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0x30(%rbp)
movq -0x10(%rbp), %rdi
callq 0x7370
movq -0x30(%rbp), %rdi
movq %rax, %rsi
callq 0x7c40
movq %rax, -0x20(%rbp)
movq -0x10(%rbp), %rdi
movl $0x1, %esi
callq 0x75f0
cmpl $0x0, %eax
setne %al
xorb $-0x1, %al
testb $0x1, %al
jne 0xa12d
jmp 0xa178
movq -0x10(%rbp), %rdi
callq 0x7590
movq %rax, -0x28(%rbp)
cmpq $0x0, -0x28(%rbp)
jne 0xa154
movq -0x20(%rbp), %rdi
callq 0x7430
movq $0x0, -0x8(%rbp)
jmp 0xa1b3
movq -0x20(%rbp), %rdi
movq -0x28(%rbp), %rsi
callq 0x7220
movq -0x10(%rbp), %rdi
movl $0x7, %esi
movl $0xffffffff, %edx # imm = 0xFFFFFFFF
movb $0x0, %al
callq 0x7700
jmp 0xa111
movq -0x10(%rbp), %rdi
movl $0x1, %esi
movl $0x4, %edx
leaq 0x54437(%rip), %rcx # 0x5e5c4
callq 0x7440
cmpq $0x0, %rax
jne 0xa1ab
movq -0x20(%rbp), %rdi
callq 0x7430
movq $0x0, -0x8(%rbp)
jmp 0xa1b3
movq -0x20(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax)
|
ac_psr_finish_call:
push rbp
mov rbp, rsp
sub rsp, 30h
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov rax, [rbp+var_18]
mov [rbp+var_30], rax
mov rdi, [rbp+var_10]
call _ac_psr_previous_token
mov rdi, [rbp+var_30]
mov rsi, rax
call _ac_expr_new_call
mov [rbp+var_20], rax
loc_A111:
mov rdi, [rbp+var_10]
mov esi, 1
call _ac_psr_check
cmp eax, 0
setnz al
xor al, 0FFh
test al, 1
jnz short loc_A12D
jmp short loc_A178
loc_A12D:
mov rdi, [rbp+var_10]
call _ac_psr_expression
mov [rbp+var_28], rax
cmp [rbp+var_28], 0
jnz short loc_A154
mov rdi, [rbp+var_20]
call _ac_expr_free_expression
mov [rbp+var_8], 0
jmp short loc_A1B3
loc_A154:
mov rdi, [rbp+var_20]
mov rsi, [rbp+var_28]
call _ac_expr_call_append_argument
mov rdi, [rbp+var_10]
mov esi, 7
mov edx, 0FFFFFFFFh
mov al, 0
call _ac_psr_match
jmp short loc_A111
loc_A178:
mov rdi, [rbp+var_10]
mov esi, 1
mov edx, 4
lea rcx, aIncompleteCall; "incomplete call (expected ')')"
call _ac_psr_consume
cmp rax, 0
jnz short loc_A1AB
mov rdi, [rbp+var_20]
call _ac_expr_free_expression
mov [rbp+var_8], 0
jmp short loc_A1B3
loc_A1AB:
mov rax, [rbp+var_20]
mov [rbp+var_8], rax
loc_A1B3:
mov rax, [rbp+var_8]
add rsp, 30h
pop rbp
retn
|
long long ac_psr_finish_call(
const char **a1,
long long a2,
__m128 a3,
__m128 a4,
__m128 a5,
__m128 a6,
double a7,
double a8,
__m128 a9,
__m128 a10)
{
long long v10; // rax
long long v11; // rcx
long long v12; // r8
long long v13; // r9
__m128 v14; // xmm4
__m128 v15; // xmm5
char v17; // [rsp+0h] [rbp-30h]
long long v18; // [rsp+8h] [rbp-28h]
long long v19; // [rsp+10h] [rbp-20h]
v17 = a2;
v10 = ac_psr_previous_token((long long)a1);
v19 = ac_expr_new_call(a2, v10);
while ( !ac_psr_check((long long)a1, 1) )
{
v18 = ac_psr_expression(a1);
if ( !v18 )
goto LABEL_4;
*(double *)a3.m128_u64 = ac_expr_call_append_argument(v19, v18);
ac_psr_match((long long)a1, 7LL, 0xFFFFFFFFLL, v11, v12, v13, a3, a4, a5, a6, v14, v15, a9, a10, v17);
}
if ( !ac_psr_consume(a1, 1, 4, "incomplete call (expected ')')") )
{
LABEL_4:
ac_expr_free_expression(v19);
return 0LL;
}
return v19;
}
|
ac_psr_finish_call:
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 + -0x18]
MOV qword ptr [RBP + -0x30],RAX
MOV RDI,qword ptr [RBP + -0x10]
CALL 0x00107370
MOV RDI,qword ptr [RBP + -0x30]
MOV RSI,RAX
CALL 0x00107c40
MOV qword ptr [RBP + -0x20],RAX
LAB_0010a111:
MOV RDI,qword ptr [RBP + -0x10]
MOV ESI,0x1
CALL 0x001075f0
CMP EAX,0x0
SETNZ AL
XOR AL,0xff
TEST AL,0x1
JNZ 0x0010a12d
JMP 0x0010a178
LAB_0010a12d:
MOV RDI,qword ptr [RBP + -0x10]
CALL 0x00107590
MOV qword ptr [RBP + -0x28],RAX
CMP qword ptr [RBP + -0x28],0x0
JNZ 0x0010a154
MOV RDI,qword ptr [RBP + -0x20]
CALL 0x00107430
MOV qword ptr [RBP + -0x8],0x0
JMP 0x0010a1b3
LAB_0010a154:
MOV RDI,qword ptr [RBP + -0x20]
MOV RSI,qword ptr [RBP + -0x28]
CALL 0x00107220
MOV RDI,qword ptr [RBP + -0x10]
MOV ESI,0x7
MOV EDX,0xffffffff
MOV AL,0x0
CALL 0x00107700
JMP 0x0010a111
LAB_0010a178:
MOV RDI,qword ptr [RBP + -0x10]
MOV ESI,0x1
MOV EDX,0x4
LEA RCX,[0x15e5c4]
CALL 0x00107440
CMP RAX,0x0
JNZ 0x0010a1ab
MOV RDI,qword ptr [RBP + -0x20]
CALL 0x00107430
MOV qword ptr [RBP + -0x8],0x0
JMP 0x0010a1b3
LAB_0010a1ab:
MOV RAX,qword ptr [RBP + -0x20]
MOV qword ptr [RBP + -0x8],RAX
LAB_0010a1b3:
MOV RAX,qword ptr [RBP + -0x8]
ADD RSP,0x30
POP RBP
RET
|
int8 ac_psr_finish_call(int8 param_1,int8 param_2)
{
int iVar1;
int8 uVar2;
long lVar3;
int8 local_10;
uVar2 = ac_psr_previous_token(param_1);
local_10 = ac_expr_new_call(param_2,uVar2);
while( true ) {
iVar1 = ac_psr_check(param_1,1);
if (iVar1 != 0) {
lVar3 = ac_psr_consume(param_1,1,4,"incomplete call (expected \')\')");
if (lVar3 == 0) {
ac_expr_free_expression(local_10);
local_10 = 0;
}
return local_10;
}
lVar3 = ac_psr_expression(param_1);
if (lVar3 == 0) break;
ac_expr_call_append_argument(local_10,lVar3);
ac_psr_match(param_1,7,0xffffffff);
}
ac_expr_free_expression(local_10);
return 0;
}
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.