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
|
---|---|---|---|---|---|---|---|---|---|---|---|
64,300 |
nlohmann::json_abi_v3_11_3::detail::json_sax_dom_callback_parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>::json_sax_dom_callback_parser(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>&, std::function<bool (int, nlohmann::json_abi_v3_11_3::detail::parse_event_t, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>&)>, bool)
|
llama.cpp/common/json.hpp
|
json_sax_dom_callback_parser(BasicJsonType& r,
const parser_callback_t cb,
const bool allow_exceptions_ = true)
: root(r), callback(cb), allow_exceptions(allow_exceptions_)
{
keep_stack.push_back(true);
}
|
O3
|
cpp
|
nlohmann::json_abi_v3_11_3::detail::json_sax_dom_callback_parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>::json_sax_dom_callback_parser(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>&, std::function<bool (int, nlohmann::json_abi_v3_11_3::detail::parse_event_t, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>&)>, bool):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %ecx, %ebp
movq %rdi, %rbx
movq %rsi, (%rdi)
leaq 0x20(%rdi), %r14
leaq 0x80(%rdi), %r12
xorps %xmm0, %xmm0
movups %xmm0, 0x8(%rdi)
movups %xmm0, 0x18(%rdi)
movups %xmm0, 0x28(%rdi)
movups %xmm0, 0x38(%rdi)
movups %xmm0, 0x48(%rdi)
movups %xmm0, 0x58(%rdi)
movups %xmm0, 0x68(%rdi)
movb $0x0, 0x78(%rdi)
movq %r12, %rdi
movq %rdx, %rsi
callq 0x83df4
movb %bpl, 0xa0(%rbx)
leaq 0xa8(%rbx), %r13
movb $0x9, 0xa8(%rbx)
movq $0x0, 0xb0(%rbx)
movq %r13, %rdi
movl $0x1, %esi
callq 0x84452
movq %r14, %rdi
movl $0x1, %esi
callq 0x768e2
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r15
movq %r13, %rdi
xorl %esi, %esi
callq 0x84452
movq %r13, %rdi
callq 0x88b6c
movq 0x90(%rbx), %rax
testq %rax, %rax
je 0x853dc
movq %r12, %rdi
movq %r12, %rsi
movl $0x3, %edx
callq *%rax
jmp 0x853dc
jmp 0x85403
movq %rax, %r15
leaq 0x48(%rbx), %rdi
callq 0x76aea
movq %r14, %rdi
callq 0x76aea
leaq 0x8(%rbx), %rdi
movq %rbx, %rsi
callq 0x21c91
movq %r15, %rdi
callq 0x20ad0
jmp 0x85403
movq %rax, %rdi
callq 0x27dc5
nop
|
_ZN8nlohmann16json_abi_v3_11_36detail28json_sax_dom_callback_parserINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEEC2ERSF_St8functionIFbiNS1_13parse_event_tESH_EEb:
push rbp
push r15
push r14
push r13
push r12
push rbx
push rax
mov ebp, ecx
mov rbx, rdi
mov [rdi], rsi
lea r14, [rdi+20h]
lea r12, [rdi+80h]
xorps xmm0, xmm0
movups xmmword ptr [rdi+8], xmm0
movups xmmword ptr [rdi+18h], xmm0
movups xmmword ptr [rdi+28h], xmm0
movups xmmword ptr [rdi+38h], xmm0
movups xmmword ptr [rdi+48h], xmm0
movups xmmword ptr [rdi+58h], xmm0
movups xmmword ptr [rdi+68h], xmm0
mov byte ptr [rdi+78h], 0
mov rdi, r12
mov rsi, rdx
call _ZNSt8functionIFbiN8nlohmann16json_abi_v3_11_36detail13parse_event_tERNS1_10basic_jsonINS1_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES6_IhSaIhEEvEEEEC2ERKSJ_; std::function<bool ()(int,nlohmann::json_abi_v3_11_3::detail::parse_event_t,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> &)>::function(std::function<bool ()(int,nlohmann::json_abi_v3_11_3::detail::parse_event_t,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> &)> const&)
mov [rbx+0A0h], bpl
lea r13, [rbx+0A8h]
mov byte ptr [rbx+0A8h], 9
mov qword ptr [rbx+0B0h], 0
mov rdi, r13
mov esi, 1
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool)
mov rdi, r14
mov esi, 1
call _ZNSt6vectorIbSaIbEE9push_backEb; std::vector<bool>::push_back(bool)
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
mov r15, rax
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 rax, [rbx+90h]
test rax, rax
jz short loc_853DC
mov rdi, r12
mov rsi, r12
mov edx, 3
call rax
jmp short loc_853DC
jmp short loc_85403
mov r15, rax
loc_853DC:
lea rdi, [rbx+48h]
call _ZNSt13_Bvector_baseISaIbEE13_M_deallocateEv; std::_Bvector_base<std::allocator<bool>>::_M_deallocate(void)
mov rdi, r14
call _ZNSt13_Bvector_baseISaIbEE13_M_deallocateEv; std::_Bvector_base<std::allocator<bool>>::_M_deallocate(void)
lea rdi, [rbx+8]
mov rsi, rbx
call _ZN8nlohmann16json_abi_v3_11_36detail28json_sax_dom_callback_parserINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEEC2ERSF_St8functionIFbiNS1_13parse_event_tESH_EEb_cold_1; nlohmann::json_abi_v3_11_3::detail::json_sax_dom_callback_parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>::json_sax_dom_callback_parser(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>&,std::function<bool ()(int,nlohmann::json_abi_v3_11_3::detail::parse_event_t,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>&)>,bool) [clone]
mov rdi, r15
call __Unwind_Resume
jmp short $+2
loc_85403:
mov rdi, rax
call __clang_call_terminate
|
long long nlohmann::json_abi_v3_11_3::detail::json_sax_dom_callback_parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>::json_sax_dom_callback_parser(
long long a1,
long long a2,
long long a3,
char a4)
{
*(_QWORD *)a1 = a2;
*(_OWORD *)(a1 + 8) = 0LL;
*(_OWORD *)(a1 + 24) = 0LL;
*(_OWORD *)(a1 + 40) = 0LL;
*(_OWORD *)(a1 + 56) = 0LL;
*(_OWORD *)(a1 + 72) = 0LL;
*(_OWORD *)(a1 + 88) = 0LL;
*(_OWORD *)(a1 + 104) = 0LL;
*(_BYTE *)(a1 + 120) = 0;
std::function<bool ()(int,nlohmann::json_abi_v3_11_3::detail::parse_event_t,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> &)>::function(
(_OWORD *)(a1 + 128),
a3);
*(_BYTE *)(a1 + 160) = a4;
*(_BYTE *)(a1 + 168) = 9;
*(_QWORD *)(a1 + 176) = 0LL;
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::assert_invariant((char *)(a1 + 168));
return std::vector<bool>::push_back(a1 + 32, 1u);
}
|
json_sax_dom_callback_parser:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
PUSH RAX
MOV EBP,ECX
MOV RBX,RDI
MOV qword ptr [RDI],RSI
LEA R14,[RDI + 0x20]
LEA R12,[RDI + 0x80]
XORPS XMM0,XMM0
MOVUPS xmmword ptr [RDI + 0x8],XMM0
MOVUPS xmmword ptr [RDI + 0x18],XMM0
MOVUPS xmmword ptr [RDI + 0x28],XMM0
MOVUPS xmmword ptr [RDI + 0x38],XMM0
MOVUPS xmmword ptr [RDI + 0x48],XMM0
MOVUPS xmmword ptr [RDI + 0x58],XMM0
MOVUPS xmmword ptr [RDI + 0x68],XMM0
MOV byte ptr [RDI + 0x78],0x0
LAB_00185353:
MOV RDI,R12
MOV RSI,RDX
CALL 0x00183df4
MOV byte ptr [RBX + 0xa0],BPL
LEA R13,[RBX + 0xa8]
MOV byte ptr [RBX + 0xa8],0x9
MOV qword ptr [RBX + 0xb0],0x0
MOV RDI,R13
MOV ESI,0x1
CALL 0x00184452
LAB_0018538b:
MOV RDI,R14
MOV ESI,0x1
CALL 0x001768e2
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
/* nlohmann::json_abi_v3_11_3::detail::json_sax_dom_callback_parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,
std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void>
>::json_sax_dom_callback_parser(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,
std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void>&, std::function<bool (int, nlohmann::json_abi_v3_11_3::detail::parse_event_t,
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector,
std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void>&)>, bool) */
void __thiscall
nlohmann::json_abi_v3_11_3::detail::
json_sax_dom_callback_parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>
::json_sax_dom_callback_parser
(json_sax_dom_callback_parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>
*this,int8 param_1,function *param_3,
json_sax_dom_callback_parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>
param_4)
{
*(int8 *)this = param_1;
*(int8 *)(this + 8) = 0;
*(int8 *)(this + 0x10) = 0;
*(int8 *)(this + 0x18) = 0;
*(int8 *)(this + 0x20) = 0;
*(int8 *)(this + 0x28) = 0;
*(int8 *)(this + 0x30) = 0;
*(int8 *)(this + 0x38) = 0;
*(int8 *)(this + 0x40) = 0;
*(int8 *)(this + 0x48) = 0;
*(int8 *)(this + 0x50) = 0;
*(int8 *)(this + 0x58) = 0;
*(int8 *)(this + 0x60) = 0;
*(int8 *)(this + 0x68) = 0;
*(int8 *)(this + 0x70) = 0;
this[0x78] = (json_sax_dom_callback_parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>
)0x0;
/* try { // try from 00185353 to 0018535d has its CatchHandler @ 001853d9 */
std::
function<bool(int,nlohmann::json_abi_v3_11_3::detail::parse_event_t,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>&)>
::function((function<bool(int,nlohmann::json_abi_v3_11_3::detail::parse_event_t,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 + 0x80),param_3);
this[0xa0] = param_4;
this[0xa8] = (json_sax_dom_callback_parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>
)0x9;
*(int8 *)(this + 0xb0) = 0;
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::assert_invariant((bool)((char)this + -0x58));
/* try { // try from 0018538b to 00185397 has its CatchHandler @ 001853a7 */
std::vector<bool,std::allocator<bool>>::push_back
((vector<bool,std::allocator<bool>> *)(this + 0x20),true);
return;
}
|
|
64,301 |
mark_blocks_free
|
eloqsql/mysys/my_alloc.c
|
static inline void mark_blocks_free(MEM_ROOT* root)
{
reg1 USED_MEM *next;
reg2 USED_MEM **last;
/* iterate through (partially) free blocks, mark them free */
last= &root->free;
for (next= root->free; next; next= *(last= &next->next))
{
next->left= next->size - ALIGN_SIZE(sizeof(USED_MEM));
TRASH_MEM(next);
}
/* Combine the free and the used list */
*last= next=root->used;
/* now go through the used blocks and mark them free */
for (; next; next= next->next)
{
next->left= next->size - ALIGN_SIZE(sizeof(USED_MEM));
TRASH_MEM(next);
}
/* Now everything is set; Indicate that nothing is used anymore */
root->used= 0;
root->first_block_usage= 0;
root->block_num= 4;
}
|
O0
|
c
|
mark_blocks_free:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x18(%rbp)
movq -0x8(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x10(%rbp)
cmpq $0x0, -0x10(%rbp)
je 0x7f39f
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rcx
subq $0x18, %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x8(%rax)
jmp 0x7f388
jmp 0x7f38a
jmp 0x7f38c
jmp 0x7f38e
movq -0x10(%rbp), %rax
movq %rax, -0x18(%rbp)
movq (%rax), %rax
movq %rax, -0x10(%rbp)
jmp 0x7f36b
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rcx
movq %rcx, -0x10(%rbp)
movq -0x18(%rbp), %rax
movq %rcx, (%rax)
cmpq $0x0, -0x10(%rbp)
je 0x7f3e2
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rcx
subq $0x18, %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x8(%rax)
jmp 0x7f3cf
jmp 0x7f3d1
jmp 0x7f3d3
jmp 0x7f3d5
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x10(%rbp)
jmp 0x7f3b2
movq -0x8(%rbp), %rax
movq $0x0, 0x8(%rax)
movq -0x8(%rbp), %rax
movl $0x0, 0x2c(%rax)
movq -0x8(%rbp), %rax
movl $0x4, 0x28(%rax)
popq %rbp
retq
nopw %cs:(%rax,%rax)
|
mark_blocks_free:
push rbp
mov rbp, rsp
mov [rbp+var_8], rdi
mov rax, [rbp+var_8]
mov [rbp+var_18], rax
mov rax, [rbp+var_8]
mov rax, [rax]
mov [rbp+var_10], rax
loc_7F36B:
cmp [rbp+var_10], 0
jz short loc_7F39F
mov rax, [rbp+var_10]
mov rcx, [rax+10h]
sub rcx, 18h
mov rax, [rbp+var_10]
mov [rax+8], rcx
jmp short $+2
loc_7F388:
jmp short $+2
loc_7F38A:
jmp short $+2
loc_7F38C:
jmp short $+2
loc_7F38E:
mov rax, [rbp+var_10]
mov [rbp+var_18], rax
mov rax, [rax]
mov [rbp+var_10], rax
jmp short loc_7F36B
loc_7F39F:
mov rax, [rbp+var_8]
mov rcx, [rax+8]
mov [rbp+var_10], rcx
mov rax, [rbp+var_18]
mov [rax], rcx
loc_7F3B2:
cmp [rbp+var_10], 0
jz short loc_7F3E2
mov rax, [rbp+var_10]
mov rcx, [rax+10h]
sub rcx, 18h
mov rax, [rbp+var_10]
mov [rax+8], rcx
jmp short $+2
loc_7F3CF:
jmp short $+2
loc_7F3D1:
jmp short $+2
loc_7F3D3:
jmp short $+2
loc_7F3D5:
mov rax, [rbp+var_10]
mov rax, [rax]
mov [rbp+var_10], rax
jmp short loc_7F3B2
loc_7F3E2:
mov rax, [rbp+var_8]
mov qword ptr [rax+8], 0
mov rax, [rbp+var_8]
mov dword ptr [rax+2Ch], 0
mov rax, [rbp+var_8]
mov dword ptr [rax+28h], 4
pop rbp
retn
|
long long mark_blocks_free(long long a1)
{
long long result; // rax
_QWORD *v2; // [rsp+0h] [rbp-18h]
_QWORD *i; // [rsp+8h] [rbp-10h]
_QWORD *v4; // [rsp+8h] [rbp-10h]
v2 = (_QWORD *)a1;
for ( i = *(_QWORD **)a1; i; i = (_QWORD *)*i )
{
i[1] = i[2] - 24LL;
v2 = i;
}
v4 = *(_QWORD **)(a1 + 8);
*v2 = v4;
while ( v4 )
{
v4[1] = v4[2] - 24LL;
v4 = (_QWORD *)*v4;
}
*(_QWORD *)(a1 + 8) = 0LL;
*(_DWORD *)(a1 + 44) = 0;
result = a1;
*(_DWORD *)(a1 + 40) = 4;
return result;
}
|
mark_blocks_free:
PUSH RBP
MOV RBP,RSP
MOV qword ptr [RBP + -0x8],RDI
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RBP + -0x18],RAX
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x10],RAX
LAB_0017f36b:
CMP qword ptr [RBP + -0x10],0x0
JZ 0x0017f39f
MOV RAX,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RAX + 0x10]
SUB RCX,0x18
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RAX + 0x8],RCX
JMP 0x0017f388
LAB_0017f388:
JMP 0x0017f38a
LAB_0017f38a:
JMP 0x0017f38c
LAB_0017f38c:
JMP 0x0017f38e
LAB_0017f38e:
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RBP + -0x18],RAX
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x10],RAX
JMP 0x0017f36b
LAB_0017f39f:
MOV RAX,qword ptr [RBP + -0x8]
MOV RCX,qword ptr [RAX + 0x8]
MOV qword ptr [RBP + -0x10],RCX
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RAX],RCX
LAB_0017f3b2:
CMP qword ptr [RBP + -0x10],0x0
JZ 0x0017f3e2
MOV RAX,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RAX + 0x10]
SUB RCX,0x18
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RAX + 0x8],RCX
JMP 0x0017f3cf
LAB_0017f3cf:
JMP 0x0017f3d1
LAB_0017f3d1:
JMP 0x0017f3d3
LAB_0017f3d3:
JMP 0x0017f3d5
LAB_0017f3d5:
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x10],RAX
JMP 0x0017f3b2
LAB_0017f3e2:
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RAX + 0x8],0x0
MOV RAX,qword ptr [RBP + -0x8]
MOV dword ptr [RAX + 0x2c],0x0
MOV RAX,qword ptr [RBP + -0x8]
MOV dword ptr [RAX + 0x28],0x4
POP RBP
RET
|
void mark_blocks_free(int8 *param_1)
{
int8 *local_20;
int8 *local_18;
local_20 = param_1;
for (local_18 = (int8 *)*param_1; local_18 != (int8 *)0x0;
local_18 = (int8 *)*local_18) {
local_18[1] = local_18[2] + -0x18;
local_20 = local_18;
}
local_18 = (int8 *)param_1[1];
*local_20 = local_18;
for (; local_18 != (int8 *)0x0; local_18 = (int8 *)*local_18) {
local_18[1] = local_18[2] + -0x18;
}
param_1[1] = 0;
*(int4 *)((long)param_1 + 0x2c) = 0;
*(int4 *)(param_1 + 5) = 4;
return;
}
|
|
64,302 |
LefDefParser::lefwMacroPinCapacitance(double)
|
Efficient-TDP/thirdparty/Limbo/limbo/thirdparty/lefdef/5.8/lef/lef/lefwWriter.cpp
|
int
lefwMacroPinCapacitance(double capacitance)
{
lefwObsoleteNum = LEFW_MACRO_CAPACITANCE;
if (!lefwFile)
return LEFW_UNINITIALIZED;
if (!lefwDidInit)
return LEFW_BAD_ORDER;
if (!lefwIsMacroPin)
return LEFW_BAD_ORDER;
if (versionNum >= 5.4)
return LEFW_OBSOLETE;
if (lefwWriteEncrypt)
encPrint(lefwFile, (char*) " CAPACITANCE %.11g ;\n", capacitance);
else
fprintf(lefwFile, " CAPACITANCE %.11g ;\n", capacitance);
lefwLines++;
lefwState = LEFW_MACRO;
return LEFW_OK;
}
|
O0
|
cpp
|
LefDefParser::lefwMacroPinCapacitance(double):
subq $0x18, %rsp
movsd %xmm0, 0x8(%rsp)
movl $0x22, 0x97c04(%rip) # 0xc4f18
leaq 0x97f35(%rip), %rax # 0xc5250
cmpq $0x0, (%rax)
jne 0x2d32e
movl $0x1, 0x14(%rsp)
jmp 0x2d3f1
leaq 0x9816f(%rip), %rax # 0xc54a4
cmpl $0x0, (%rax)
jne 0x2d347
movl $0x2, 0x14(%rsp)
jmp 0x2d3f1
leaq 0x981a2(%rip), %rax # 0xc54f0
cmpl $0x0, (%rax)
jne 0x2d360
movl $0x2, 0x14(%rsp)
jmp 0x2d3f1
movsd 0x97ba8(%rip), %xmm0 # 0xc4f10
movsd 0x758d0(%rip), %xmm1 # 0xa2c40
ucomisd %xmm1, %xmm0
jb 0x2d380
movl $0x7, 0x14(%rsp)
jmp 0x2d3f1
cmpl $0x0, 0x981b5(%rip) # 0xc553c
je 0x2d3a9
leaq 0x97ec0(%rip), %rax # 0xc5250
movq (%rax), %rdi
movsd 0x8(%rsp), %xmm0
leaq 0x66ce8(%rip), %rsi # 0x94088
movb $0x1, %al
callq 0x8bf50
jmp 0x2d3c7
leaq 0x97ea0(%rip), %rax # 0xc5250
movq (%rax), %rdi
movsd 0x8(%rsp), %xmm0
leaq 0x66cc8(%rip), %rsi # 0x94088
movb $0x1, %al
callq 0x2370
leaq 0x980ce(%rip), %rax # 0xc549c
movl (%rax), %ecx
addl $0x1, %ecx
leaq 0x980c2(%rip), %rax # 0xc549c
movl %ecx, (%rax)
leaq 0x980bd(%rip), %rax # 0xc54a0
movl $0x21, (%rax)
movl $0x0, 0x14(%rsp)
movl 0x14(%rsp), %eax
addq $0x18, %rsp
retq
nopw (%rax,%rax)
|
_ZN12LefDefParser23lefwMacroPinCapacitanceEd:
sub rsp, 18h
movsd [rsp+18h+var_10], xmm0
mov cs:_ZN12LefDefParserL15lefwObsoleteNumE, 22h ; '"'; LefDefParser::lefwObsoleteNum
lea rax, _ZN12LefDefParser8lefwFileE; LefDefParser::lefwFile
cmp qword ptr [rax], 0
jnz short loc_2D32E
mov [rsp+18h+var_4], 1
jmp loc_2D3F1
loc_2D32E:
lea rax, _ZN12LefDefParser11lefwDidInitE; LefDefParser::lefwDidInit
cmp dword ptr [rax], 0
jnz short loc_2D347
mov [rsp+18h+var_4], 2
jmp loc_2D3F1
loc_2D347:
lea rax, _ZN12LefDefParser14lefwIsMacroPinE; LefDefParser::lefwIsMacroPin
cmp dword ptr [rax], 0
jnz short loc_2D360
mov [rsp+18h+var_4], 2
jmp loc_2D3F1
loc_2D360:
movsd xmm0, cs:_ZN12LefDefParserL10versionNumE; LefDefParser::versionNum
movsd xmm1, cs:qword_A2C40
ucomisd xmm0, xmm1
jb short loc_2D380
mov [rsp+18h+var_4], 7
jmp short loc_2D3F1
loc_2D380:
cmp cs:_ZN12LefDefParserL16lefwWriteEncryptE, 0; LefDefParser::lefwWriteEncrypt
jz short loc_2D3A9
lea rax, _ZN12LefDefParser8lefwFileE; LefDefParser::lefwFile
mov rdi, [rax]
movsd xmm0, [rsp+18h+var_10]
lea rsi, aCapacitance11g; " CAPACITANCE %.11g ;\n"
mov al, 1
call _ZN12LefDefParser8encPrintEP8_IO_FILEPcz; LefDefParser::encPrint(_IO_FILE *,char *,...)
jmp short loc_2D3C7
loc_2D3A9:
lea rax, _ZN12LefDefParser8lefwFileE; LefDefParser::lefwFile
mov rdi, [rax]
movsd xmm0, [rsp+18h+var_10]
lea rsi, aCapacitance11g; " CAPACITANCE %.11g ;\n"
mov al, 1
call _fprintf
loc_2D3C7:
lea rax, _ZN12LefDefParser9lefwLinesE; LefDefParser::lefwLines
mov ecx, [rax]
add ecx, 1
lea rax, _ZN12LefDefParser9lefwLinesE; LefDefParser::lefwLines
mov [rax], ecx
lea rax, _ZN12LefDefParser9lefwStateE; LefDefParser::lefwState
mov dword ptr [rax], 21h ; '!'
mov [rsp+18h+var_4], 0
loc_2D3F1:
mov eax, [rsp+18h+var_4]
add rsp, 18h
retn
|
long long LefDefParser::lefwMacroPinCapacitance(
LefDefParser *this,
double a2,
long long a3,
int a4,
int a5,
int a6,
int a7)
{
LefDefParser::lefwObsoleteNum = 34;
if ( *(_QWORD *)&LefDefParser::lefwFile )
{
if ( LefDefParser::lefwDidInit )
{
if ( LefDefParser::lefwIsMacroPin )
{
if ( *(double *)&LefDefParser::versionNum < 5.4 )
{
if ( LefDefParser::lefwWriteEncrypt )
LefDefParser::encPrint(LefDefParser::lefwFile, (unsigned int)" CAPACITANCE %.11g ;\n", a4, a5, a6, a7);
else
fprintf(*(_QWORD *)&LefDefParser::lefwFile, " CAPACITANCE %.11g ;\n", a2);
++LefDefParser::lefwLines;
LefDefParser::lefwState = 33;
return 0;
}
else
{
return 7;
}
}
else
{
return 2;
}
}
else
{
return 2;
}
}
else
{
return 1;
}
}
|
lefwMacroPinCapacitance:
SUB RSP,0x18
MOVSD qword ptr [RSP + 0x8],XMM0
MOV dword ptr [0x001c4f18],0x22
LEA RAX,[0x1c5250]
CMP qword ptr [RAX],0x0
JNZ 0x0012d32e
MOV dword ptr [RSP + 0x14],0x1
JMP 0x0012d3f1
LAB_0012d32e:
LEA RAX,[0x1c54a4]
CMP dword ptr [RAX],0x0
JNZ 0x0012d347
MOV dword ptr [RSP + 0x14],0x2
JMP 0x0012d3f1
LAB_0012d347:
LEA RAX,[0x1c54f0]
CMP dword ptr [RAX],0x0
JNZ 0x0012d360
MOV dword ptr [RSP + 0x14],0x2
JMP 0x0012d3f1
LAB_0012d360:
MOVSD XMM0,qword ptr [0x001c4f10]
MOVSD XMM1,qword ptr [0x001a2c40]
UCOMISD XMM0,XMM1
JC 0x0012d380
MOV dword ptr [RSP + 0x14],0x7
JMP 0x0012d3f1
LAB_0012d380:
CMP dword ptr [0x001c553c],0x0
JZ 0x0012d3a9
LEA RAX,[0x1c5250]
MOV RDI,qword ptr [RAX]
MOVSD XMM0,qword ptr [RSP + 0x8]
LEA RSI,[0x194088]
MOV AL,0x1
CALL 0x0018bf50
JMP 0x0012d3c7
LAB_0012d3a9:
LEA RAX,[0x1c5250]
MOV RDI,qword ptr [RAX]
MOVSD XMM0,qword ptr [RSP + 0x8]
LEA RSI,[0x194088]
MOV AL,0x1
CALL 0x00102370
LAB_0012d3c7:
LEA RAX,[0x1c549c]
MOV ECX,dword ptr [RAX]
ADD ECX,0x1
LEA RAX,[0x1c549c]
MOV dword ptr [RAX],ECX
LEA RAX,[0x1c54a0]
MOV dword ptr [RAX],0x21
MOV dword ptr [RSP + 0x14],0x0
LAB_0012d3f1:
MOV EAX,dword ptr [RSP + 0x14]
ADD RSP,0x18
RET
|
/* LefDefParser::lefwMacroPinCapacitance(double) */
int4 LefDefParser::lefwMacroPinCapacitance(double param_1)
{
int4 local_4;
lefwObsoleteNum = 0x22;
if (lefwFile == (_IO_FILE *)0x0) {
local_4 = 1;
}
else if (lefwDidInit == 0) {
local_4 = 2;
}
else if (lefwIsMacroPin == 0) {
local_4 = 2;
}
else if (versionNum < DAT_001a2c40) {
if (lefwWriteEncrypt == 0) {
fprintf(lefwFile," CAPACITANCE %.11g ;\n",param_1);
}
else {
encPrint(lefwFile," CAPACITANCE %.11g ;\n",param_1);
}
lefwLines = lefwLines + 1;
lefwState = 0x21;
local_4 = 0;
}
else {
local_4 = 7;
}
return local_4;
}
|
|
64,303 |
ttt::game::ComposedObserver::remove_observer(ttt::game::IObserver*)
|
vsennov[P]tictactoe-course/src/core/game.cpp
|
void ComposedObserver::remove_observer(IObserver *obs) {
if (!obs)
return;
for (IObserver **pt1 = m_observers, **pt2 = m_observers; *pt2; ++pt1, ++pt2) {
if (*pt1 == obs) {
++pt2;
}
*pt1 = *pt2;
}
}
|
O0
|
cpp
|
ttt::game::ComposedObserver::remove_observer(ttt::game::IObserver*):
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x28(%rbp)
cmpq $0x0, -0x10(%rbp)
jne 0x30fd
jmp 0x315c
movq -0x28(%rbp), %rax
movq 0x8(%rax), %rcx
movq %rcx, -0x18(%rbp)
movq 0x8(%rax), %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
cmpq $0x0, (%rax)
je 0x315c
movq -0x18(%rbp), %rax
movq (%rax), %rax
cmpq -0x10(%rbp), %rax
jne 0x3134
movq -0x20(%rbp), %rax
addq $0x8, %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
movq (%rax), %rcx
movq -0x18(%rbp), %rax
movq %rcx, (%rax)
movq -0x18(%rbp), %rax
addq $0x8, %rax
movq %rax, -0x18(%rbp)
movq -0x20(%rbp), %rax
addq $0x8, %rax
movq %rax, -0x20(%rbp)
jmp 0x3111
popq %rbp
retq
nop
|
_ZN3ttt4game16ComposedObserver15remove_observerEPNS0_9IObserverE:
push rbp
mov rbp, rsp
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov rax, [rbp+var_8]
mov [rbp+var_28], rax
cmp [rbp+var_10], 0
jnz short loc_30FD
jmp short loc_315C
loc_30FD:
mov rax, [rbp+var_28]
mov rcx, [rax+8]
mov [rbp+var_18], rcx
mov rax, [rax+8]
mov [rbp+var_20], rax
loc_3111:
mov rax, [rbp+var_20]
cmp qword ptr [rax], 0
jz short loc_315C
mov rax, [rbp+var_18]
mov rax, [rax]
cmp rax, [rbp+var_10]
jnz short loc_3134
mov rax, [rbp+var_20]
add rax, 8
mov [rbp+var_20], rax
loc_3134:
mov rax, [rbp+var_20]
mov rcx, [rax]
mov rax, [rbp+var_18]
mov [rax], rcx
mov rax, [rbp+var_18]
add rax, 8
mov [rbp+var_18], rax
mov rax, [rbp+var_20]
add rax, 8
mov [rbp+var_20], rax
jmp short loc_3111
loc_315C:
pop rbp
retn
|
ttt::game::ComposedObserver * ttt::game::ComposedObserver::remove_observer(
ttt::game::IObserver ***this,
ttt::game::IObserver *a2)
{
ttt::game::ComposedObserver *result; // rax
ttt::game::IObserver **i; // [rsp+8h] [rbp-20h]
ttt::game::IObserver **v4; // [rsp+10h] [rbp-18h]
result = (ttt::game::ComposedObserver *)this;
if ( a2 )
{
v4 = this[1];
for ( i = v4; ; ++i )
{
result = (ttt::game::ComposedObserver *)i;
if ( !*i )
break;
if ( *v4 == a2 )
++i;
*v4++ = *i;
}
}
return result;
}
|
remove_observer:
PUSH RBP
MOV RBP,RSP
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RBP + -0x28],RAX
CMP qword ptr [RBP + -0x10],0x0
JNZ 0x001030fd
JMP 0x0010315c
LAB_001030fd:
MOV RAX,qword ptr [RBP + -0x28]
MOV RCX,qword ptr [RAX + 0x8]
MOV qword ptr [RBP + -0x18],RCX
MOV RAX,qword ptr [RAX + 0x8]
MOV qword ptr [RBP + -0x20],RAX
LAB_00103111:
MOV RAX,qword ptr [RBP + -0x20]
CMP qword ptr [RAX],0x0
JZ 0x0010315c
MOV RAX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RAX]
CMP RAX,qword ptr [RBP + -0x10]
JNZ 0x00103134
MOV RAX,qword ptr [RBP + -0x20]
ADD RAX,0x8
MOV qword ptr [RBP + -0x20],RAX
LAB_00103134:
MOV RAX,qword ptr [RBP + -0x20]
MOV RCX,qword ptr [RAX]
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RAX],RCX
MOV RAX,qword ptr [RBP + -0x18]
ADD RAX,0x8
MOV qword ptr [RBP + -0x18],RAX
MOV RAX,qword ptr [RBP + -0x20]
ADD RAX,0x8
MOV qword ptr [RBP + -0x20],RAX
JMP 0x00103111
LAB_0010315c:
POP RBP
RET
|
/* ttt::game::ComposedObserver::remove_observer(ttt::game::IObserver*) */
void __thiscall
ttt::game::ComposedObserver::remove_observer(ComposedObserver *this,IObserver *param_1)
{
long *local_28;
long *local_20;
if (param_1 != (IObserver *)0x0) {
local_20 = *(long **)(this + 8);
for (local_28 = *(long **)(this + 8); *local_28 != 0; local_28 = local_28 + 1) {
if ((IObserver *)*local_20 == param_1) {
local_28 = local_28 + 1;
}
*local_20 = *local_28;
local_20 = local_20 + 1;
}
}
return;
}
|
|
64,304 |
ttt::game::ComposedObserver::remove_observer(ttt::game::IObserver*)
|
vsennov[P]tictactoe-course/src/core/game.cpp
|
void ComposedObserver::remove_observer(IObserver *obs) {
if (!obs)
return;
for (IObserver **pt1 = m_observers, **pt2 = m_observers; *pt2; ++pt1, ++pt2) {
if (*pt1 == obs) {
++pt2;
}
*pt1 = *pt2;
}
}
|
O2
|
cpp
|
ttt::game::ComposedObserver::remove_observer(ttt::game::IObserver*):
testq %rsi, %rsi
je 0x19bf
movq 0x8(%rdi), %rax
movq %rax, %rcx
cmpq $0x0, (%rcx)
je 0x19bf
xorl %edx, %edx
cmpq %rsi, (%rax)
sete %dl
leaq (%rcx,%rdx,8), %rcx
addq $0x8, %rcx
movq -0x8(%rcx), %rdx
movq %rdx, (%rax)
addq $0x8, %rax
jmp 0x199c
retq
|
_ZN3ttt4game16ComposedObserver15remove_observerEPNS0_9IObserverE:
test rsi, rsi
jz short locret_19BF
mov rax, [rdi+8]
mov rcx, rax
loc_199C:
cmp qword ptr [rcx], 0
jz short locret_19BF
xor edx, edx
cmp [rax], rsi
setz dl
lea rcx, [rcx+rdx*8]
add rcx, 8
mov rdx, [rcx-8]
mov [rax], rdx
add rax, 8
jmp short loc_199C
locret_19BF:
retn
|
void ttt::game::ComposedObserver::remove_observer(
ttt::game::ComposedObserver *this,
ttt::game::IObserver *a2)
{
_QWORD *v2; // rax
_QWORD *i; // rcx
if ( a2 )
{
v2 = (_QWORD *)*((_QWORD *)this + 1);
for ( i = v2; *i; *v2++ = *(i - 1) )
i += (*v2 == (_QWORD)a2) + 1;
}
}
|
remove_observer:
TEST RSI,RSI
JZ 0x001019bf
MOV RAX,qword ptr [RDI + 0x8]
MOV RCX,RAX
LAB_0010199c:
CMP qword ptr [RCX],0x0
JZ 0x001019bf
XOR EDX,EDX
CMP qword ptr [RAX],RSI
SETZ DL
LEA RCX,[RCX + RDX*0x8]
ADD RCX,0x8
MOV RDX,qword ptr [RCX + -0x8]
MOV qword ptr [RAX],RDX
ADD RAX,0x8
JMP 0x0010199c
LAB_001019bf:
RET
|
/* ttt::game::ComposedObserver::remove_observer(ttt::game::IObserver*) */
void __thiscall
ttt::game::ComposedObserver::remove_observer(ComposedObserver *this,IObserver *param_1)
{
IObserver *pIVar1;
long *plVar2;
long *plVar3;
if (param_1 != (IObserver *)0x0) {
plVar2 = *(long **)(this + 8);
for (plVar3 = plVar2; *plVar3 != 0; plVar3 = plVar3 + (pIVar1 == param_1) + 1) {
pIVar1 = (IObserver *)*plVar2;
*plVar2 = plVar3[pIVar1 == param_1];
plVar2 = plVar2 + 1;
}
}
return;
}
|
|
64,305 |
my_charpos_mb
|
eloqsql/strings/ctype-mb.c
|
size_t my_charpos_mb(CHARSET_INFO *cs __attribute__((unused)),
const char *pos, const char *end, size_t length)
{
const char *start= pos;
while (length && pos < end)
{
uint mb_len;
pos+= (mb_len= my_ismbchar(cs, pos, end)) ? mb_len : 1;
length--;
}
return (size_t) (length ? end+2-start : pos-start);
}
|
O0
|
c
|
my_charpos_mb:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x28(%rbp)
xorl %eax, %eax
cmpq $0x0, -0x20(%rbp)
movb %al, -0x2d(%rbp)
je 0x3f1aa
movq -0x10(%rbp), %rax
cmpq -0x18(%rbp), %rax
setb %al
movb %al, -0x2d(%rbp)
movb -0x2d(%rbp), %al
testb $0x1, %al
jne 0x3f1b3
jmp 0x3f1fc
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
callq 0x3e620
movl %eax, -0x2c(%rbp)
cmpl $0x0, %eax
je 0x3f1d4
movl -0x2c(%rbp), %eax
movl %eax, -0x34(%rbp)
jmp 0x3f1de
movl $0x1, %eax
movl %eax, -0x34(%rbp)
jmp 0x3f1de
movl -0x34(%rbp), %ecx
movq -0x10(%rbp), %rax
movl %ecx, %ecx
addq %rcx, %rax
movq %rax, -0x10(%rbp)
movq -0x20(%rbp), %rax
addq $-0x1, %rax
movq %rax, -0x20(%rbp)
jmp 0x3f190
cmpq $0x0, -0x20(%rbp)
je 0x3f218
movq -0x18(%rbp), %rax
addq $0x2, %rax
movq -0x28(%rbp), %rcx
subq %rcx, %rax
movq %rax, -0x40(%rbp)
jmp 0x3f227
movq -0x10(%rbp), %rax
movq -0x28(%rbp), %rcx
subq %rcx, %rax
movq %rax, -0x40(%rbp)
movq -0x40(%rbp), %rax
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
|
my_charpos_mb:
push rbp
mov rbp, rsp
sub rsp, 40h
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov [rbp+var_18], rdx
mov [rbp+var_20], rcx
mov rax, [rbp+var_10]
mov [rbp+var_28], rax
loc_3F190:
xor eax, eax
cmp [rbp+var_20], 0
mov [rbp+var_2D], al
jz short loc_3F1AA
mov rax, [rbp+var_10]
cmp rax, [rbp+var_18]
setb al
mov [rbp+var_2D], al
loc_3F1AA:
mov al, [rbp+var_2D]
test al, 1
jnz short loc_3F1B3
jmp short loc_3F1FC
loc_3F1B3:
mov rdi, [rbp+var_8]
mov rsi, [rbp+var_10]
mov rdx, [rbp+var_18]
call my_ismbchar_0
mov [rbp+var_2C], eax
cmp eax, 0
jz short loc_3F1D4
mov eax, [rbp+var_2C]
mov [rbp+var_34], eax
jmp short loc_3F1DE
loc_3F1D4:
mov eax, 1
mov [rbp+var_34], eax
jmp short $+2
loc_3F1DE:
mov ecx, [rbp+var_34]
mov rax, [rbp+var_10]
mov ecx, ecx
add rax, rcx
mov [rbp+var_10], rax
mov rax, [rbp+var_20]
add rax, 0FFFFFFFFFFFFFFFFh
mov [rbp+var_20], rax
jmp short loc_3F190
loc_3F1FC:
cmp [rbp+var_20], 0
jz short loc_3F218
mov rax, [rbp+var_18]
add rax, 2
mov rcx, [rbp+var_28]
sub rax, rcx
mov [rbp+var_40], rax
jmp short loc_3F227
loc_3F218:
mov rax, [rbp+var_10]
mov rcx, [rbp+var_28]
sub rax, rcx
mov [rbp+var_40], rax
loc_3F227:
mov rax, [rbp+var_40]
add rsp, 40h
pop rbp
retn
|
unsigned long long my_charpos_mb(long long a1, unsigned long long a2, unsigned long long a3, long long a4)
{
unsigned int v6; // [rsp+Ch] [rbp-34h]
bool v7; // [rsp+13h] [rbp-2Dh]
unsigned int v8; // [rsp+14h] [rbp-2Ch]
unsigned long long v11; // [rsp+30h] [rbp-10h]
v11 = a2;
while ( 1 )
{
v7 = 0;
if ( a4 )
v7 = v11 < a3;
if ( !v7 )
break;
v8 = my_ismbchar_0(a1, v11, a3);
if ( v8 )
v6 = v8;
else
v6 = 1;
v11 += v6;
--a4;
}
if ( a4 )
return a3 + 2 - a2;
else
return v11 - a2;
}
|
my_charpos_mb:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x40
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV qword ptr [RBP + -0x18],RDX
MOV qword ptr [RBP + -0x20],RCX
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RBP + -0x28],RAX
LAB_0013f190:
XOR EAX,EAX
CMP qword ptr [RBP + -0x20],0x0
MOV byte ptr [RBP + -0x2d],AL
JZ 0x0013f1aa
MOV RAX,qword ptr [RBP + -0x10]
CMP RAX,qword ptr [RBP + -0x18]
SETC AL
MOV byte ptr [RBP + -0x2d],AL
LAB_0013f1aa:
MOV AL,byte ptr [RBP + -0x2d]
TEST AL,0x1
JNZ 0x0013f1b3
JMP 0x0013f1fc
LAB_0013f1b3:
MOV RDI,qword ptr [RBP + -0x8]
MOV RSI,qword ptr [RBP + -0x10]
MOV RDX,qword ptr [RBP + -0x18]
CALL 0x0013e620
MOV dword ptr [RBP + -0x2c],EAX
CMP EAX,0x0
JZ 0x0013f1d4
MOV EAX,dword ptr [RBP + -0x2c]
MOV dword ptr [RBP + -0x34],EAX
JMP 0x0013f1de
LAB_0013f1d4:
MOV EAX,0x1
MOV dword ptr [RBP + -0x34],EAX
JMP 0x0013f1de
LAB_0013f1de:
MOV ECX,dword ptr [RBP + -0x34]
MOV RAX,qword ptr [RBP + -0x10]
MOV ECX,ECX
ADD RAX,RCX
MOV qword ptr [RBP + -0x10],RAX
MOV RAX,qword ptr [RBP + -0x20]
ADD RAX,-0x1
MOV qword ptr [RBP + -0x20],RAX
JMP 0x0013f190
LAB_0013f1fc:
CMP qword ptr [RBP + -0x20],0x0
JZ 0x0013f218
MOV RAX,qword ptr [RBP + -0x18]
ADD RAX,0x2
MOV RCX,qword ptr [RBP + -0x28]
SUB RAX,RCX
MOV qword ptr [RBP + -0x40],RAX
JMP 0x0013f227
LAB_0013f218:
MOV RAX,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RBP + -0x28]
SUB RAX,RCX
MOV qword ptr [RBP + -0x40],RAX
LAB_0013f227:
MOV RAX,qword ptr [RBP + -0x40]
ADD RSP,0x40
POP RBP
RET
|
long my_charpos_mb(int8 param_1,ulong param_2,ulong param_3,long param_4)
{
long local_48;
uint local_3c;
long local_28;
ulong local_18;
local_18 = param_2;
for (local_28 = param_4; local_28 != 0 && local_18 < param_3; local_28 = local_28 + -1) {
local_3c = my_ismbchar(param_1,local_18,param_3);
if (local_3c == 0) {
local_3c = 1;
}
local_18 = local_18 + local_3c;
}
if (local_28 == 0) {
local_48 = local_18 - param_2;
}
else {
local_48 = (param_3 + 2) - param_2;
}
return local_48;
}
|
|
64,306 |
my_bitmap_init
|
eloqsql/mysys/my_bitmap.c
|
my_bool my_bitmap_init(MY_BITMAP *map, my_bitmap_map *buf, uint n_bits,
my_bool thread_safe)
{
DBUG_ENTER("my_bitmap_init");
map->mutex= 0;
if (!buf)
{
uint size_in_bytes= bitmap_buffer_size(n_bits);
uint extra= 0;
if (thread_safe)
{
size_in_bytes= ALIGN_SIZE(size_in_bytes);
extra= sizeof(mysql_mutex_t);
}
if (!(buf= (my_bitmap_map*) my_malloc(key_memory_MY_BITMAP_bitmap,
size_in_bytes+extra, MYF(MY_WME))))
DBUG_RETURN(1);
if (thread_safe)
{
map->mutex= (mysql_mutex_t *) ((char*) buf + size_in_bytes);
mysql_mutex_init(key_BITMAP_mutex, map->mutex, MY_MUTEX_INIT_FAST);
}
}
else
{
DBUG_ASSERT(thread_safe == 0);
}
map->bitmap= buf;
map->n_bits= n_bits;
create_last_word_mask(map);
bitmap_clear_all(map);
DBUG_RETURN(0);
}
|
O0
|
c
|
my_bitmap_init:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movb %cl, %al
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movl %edx, -0x1c(%rbp)
movb %al, -0x1d(%rbp)
movq -0x10(%rbp), %rax
movq $0x0, 0x10(%rax)
cmpq $0x0, -0x18(%rbp)
jne 0xedfcd
movl -0x1c(%rbp), %eax
addl $0x1f, %eax
shrl $0x5, %eax
shll $0x2, %eax
movl %eax, -0x24(%rbp)
movl $0x0, -0x28(%rbp)
cmpb $0x0, -0x1d(%rbp)
je 0xedf64
movl -0x24(%rbp), %eax
addq $0x8, %rax
subq $0x1, %rax
andq $-0x8, %rax
movl %eax, -0x24(%rbp)
movl $0x48, -0x28(%rbp)
leaq 0xb95355(%rip), %rax # 0xc832c0
movl (%rax), %edi
movl -0x24(%rbp), %eax
addl -0x28(%rbp), %eax
movl %eax, %eax
movl %eax, %esi
movl $0x10, %edx
callq 0xf3830
movq %rax, -0x18(%rbp)
cmpq $0x0, %rax
jne 0xedf96
jmp 0xedf8d
movb $0x1, -0x1(%rbp)
jmp 0xee017
cmpb $0x0, -0x1d(%rbp)
je 0xedfcb
movq -0x18(%rbp), %rcx
movl -0x24(%rbp), %eax
addq %rax, %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x10(%rax)
leaq 0xb9495b(%rip), %rax # 0xc82910
movl (%rax), %edi
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rsi
leaq 0xb9566a(%rip), %rdx # 0xc83630
callq 0xee020
jmp 0xedfd3
jmp 0xedfcf
jmp 0xedfd1
jmp 0xedfd3
movq -0x18(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, (%rax)
movl -0x1c(%rbp), %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x1c(%rax)
movq -0x10(%rbp), %rdi
callq 0xeddf0
movq -0x10(%rbp), %rax
movq (%rax), %rdi
movq -0x10(%rbp), %rax
movl 0x1c(%rax), %eax
addl $0x1f, %eax
shrl $0x5, %eax
shll $0x2, %eax
movl %eax, %eax
movl %eax, %edx
xorl %esi, %esi
callq 0x2a2c0
movb $0x0, -0x1(%rbp)
movb -0x1(%rbp), %al
addq $0x30, %rsp
popq %rbp
retq
|
my_bitmap_init:
push rbp
mov rbp, rsp
sub rsp, 30h
mov al, cl
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov [rbp+var_1C], edx
mov [rbp+var_1D], al
mov rax, [rbp+var_10]
mov qword ptr [rax+10h], 0
cmp [rbp+var_18], 0
jnz loc_EDFCD
mov eax, [rbp+var_1C]
add eax, 1Fh
shr eax, 5
shl eax, 2
mov [rbp+var_24], eax
mov [rbp+var_28], 0
cmp [rbp+var_1D], 0
jz short loc_EDF64
mov eax, [rbp+var_24]
add rax, 8
sub rax, 1
and rax, 0FFFFFFFFFFFFFFF8h
mov [rbp+var_24], eax
mov [rbp+var_28], 48h ; 'H'
loc_EDF64:
lea rax, key_memory_MY_BITMAP_bitmap
mov edi, [rax]
mov eax, [rbp+var_24]
add eax, [rbp+var_28]
mov eax, eax
mov esi, eax
mov edx, 10h
call my_malloc
mov [rbp+var_18], rax
cmp rax, 0
jnz short loc_EDF96
jmp short $+2
loc_EDF8D:
mov [rbp+var_1], 1
jmp loc_EE017
loc_EDF96:
cmp [rbp+var_1D], 0
jz short loc_EDFCB
mov rcx, [rbp+var_18]
mov eax, [rbp+var_24]
add rcx, rax
mov rax, [rbp+var_10]
mov [rax+10h], rcx
lea rax, key_BITMAP_mutex
mov edi, [rax]
mov rax, [rbp+var_10]
mov rsi, [rax+10h]
lea rdx, my_fast_mutexattr
call inline_mysql_mutex_init_9
loc_EDFCB:
jmp short loc_EDFD3
loc_EDFCD:
jmp short $+2
loc_EDFCF:
jmp short $+2
loc_EDFD1:
jmp short $+2
loc_EDFD3:
mov rcx, [rbp+var_18]
mov rax, [rbp+var_10]
mov [rax], rcx
mov ecx, [rbp+var_1C]
mov rax, [rbp+var_10]
mov [rax+1Ch], ecx
mov rdi, [rbp+var_10]
call create_last_word_mask
mov rax, [rbp+var_10]
mov rdi, [rax]
mov rax, [rbp+var_10]
mov eax, [rax+1Ch]
add eax, 1Fh
shr eax, 5
shl eax, 2
mov eax, eax
mov edx, eax
xor esi, esi
call _memset
mov [rbp+var_1], 0
loc_EE017:
mov al, [rbp+var_1]
add rsp, 30h
pop rbp
retn
|
char my_bitmap_init(long long a1, long long a2, int a3, char a4)
{
int v5; // [rsp+8h] [rbp-28h]
unsigned int v6; // [rsp+Ch] [rbp-24h]
long long v9; // [rsp+18h] [rbp-18h]
v9 = a2;
*(_QWORD *)(a1 + 16) = 0LL;
if ( a2 )
{
LABEL_8:
*(_QWORD *)a1 = v9;
*(_DWORD *)(a1 + 28) = a3;
create_last_word_mask(a1);
memset(*(_QWORD *)a1, 0LL, 4 * ((unsigned int)(*(_DWORD *)(a1 + 28) + 31) >> 5));
return 0;
}
v6 = 4 * ((unsigned int)(a3 + 31) >> 5);
v5 = 0;
if ( a4 )
{
v6 = (v6 + 7) & 0xFFFFFFF8;
v5 = 72;
}
v9 = my_malloc(key_memory_MY_BITMAP_bitmap, v5 + v6, 16LL);
if ( v9 )
{
if ( a4 )
{
*(_QWORD *)(a1 + 16) = v6 + v9;
inline_mysql_mutex_init_9(key_BITMAP_mutex, *(_QWORD *)(a1 + 16), &my_fast_mutexattr);
}
goto LABEL_8;
}
return 1;
}
|
my_bitmap_init:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x30
MOV AL,CL
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x18],RSI
MOV dword ptr [RBP + -0x1c],EDX
MOV byte ptr [RBP + -0x1d],AL
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RAX + 0x10],0x0
CMP qword ptr [RBP + -0x18],0x0
JNZ 0x001edfcd
MOV EAX,dword ptr [RBP + -0x1c]
ADD EAX,0x1f
SHR EAX,0x5
SHL EAX,0x2
MOV dword ptr [RBP + -0x24],EAX
MOV dword ptr [RBP + -0x28],0x0
CMP byte ptr [RBP + -0x1d],0x0
JZ 0x001edf64
MOV EAX,dword ptr [RBP + -0x24]
ADD RAX,0x8
SUB RAX,0x1
AND RAX,-0x8
MOV dword ptr [RBP + -0x24],EAX
MOV dword ptr [RBP + -0x28],0x48
LAB_001edf64:
LEA RAX,[0xd832c0]
MOV EDI,dword ptr [RAX]
MOV EAX,dword ptr [RBP + -0x24]
ADD EAX,dword ptr [RBP + -0x28]
MOV EAX,EAX
MOV ESI,EAX
MOV EDX,0x10
CALL 0x001f3830
MOV qword ptr [RBP + -0x18],RAX
CMP RAX,0x0
JNZ 0x001edf96
JMP 0x001edf8d
LAB_001edf8d:
MOV byte ptr [RBP + -0x1],0x1
JMP 0x001ee017
LAB_001edf96:
CMP byte ptr [RBP + -0x1d],0x0
JZ 0x001edfcb
MOV RCX,qword ptr [RBP + -0x18]
MOV EAX,dword ptr [RBP + -0x24]
ADD RCX,RAX
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RAX + 0x10],RCX
LEA RAX,[0xd82910]
MOV EDI,dword ptr [RAX]
MOV RAX,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RAX + 0x10]
LEA RDX,[0xd83630]
CALL 0x001ee020
LAB_001edfcb:
JMP 0x001edfd3
LAB_001edfcd:
JMP 0x001edfcf
LAB_001edfcf:
JMP 0x001edfd1
LAB_001edfd1:
JMP 0x001edfd3
LAB_001edfd3:
MOV RCX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RAX],RCX
MOV ECX,dword ptr [RBP + -0x1c]
MOV RAX,qword ptr [RBP + -0x10]
MOV dword ptr [RAX + 0x1c],ECX
MOV RDI,qword ptr [RBP + -0x10]
CALL 0x001eddf0
MOV RAX,qword ptr [RBP + -0x10]
MOV RDI,qword ptr [RAX]
MOV RAX,qword ptr [RBP + -0x10]
MOV EAX,dword ptr [RAX + 0x1c]
ADD EAX,0x1f
SHR EAX,0x5
SHL EAX,0x2
MOV EAX,EAX
MOV EDX,EAX
XOR ESI,ESI
CALL 0x0012a2c0
MOV byte ptr [RBP + -0x1],0x0
LAB_001ee017:
MOV AL,byte ptr [RBP + -0x1]
ADD RSP,0x30
POP RBP
RET
|
int1 my_bitmap_init(long *param_1,long param_2,int param_3,char param_4)
{
int local_30;
uint local_2c;
long local_20;
param_1[2] = 0;
local_20 = param_2;
if (param_2 == 0) {
local_2c = (param_3 + 0x1fU >> 5) * 4;
local_30 = 0;
if (param_4 != '\0') {
local_2c = local_2c + 7 & 0xfffffff8;
local_30 = 0x48;
}
local_20 = my_malloc(key_memory_MY_BITMAP_bitmap,local_2c + local_30,0x10);
if (local_20 == 0) {
return 1;
}
if (param_4 != '\0') {
param_1[2] = local_20 + (ulong)local_2c;
inline_mysql_mutex_init(key_BITMAP_mutex,param_1[2],&my_fast_mutexattr);
}
}
*param_1 = local_20;
*(int *)((long)param_1 + 0x1c) = param_3;
create_last_word_mask(param_1);
memset((void *)*param_1,0,(ulong)((*(int *)((long)param_1 + 0x1c) + 0x1fU >> 5) << 2));
return 0;
}
|
|
64,307 |
test_vector_mul_scalar
|
tsotchke[P]eshkol/tests/unit/test_vector.c
|
static void test_vector_mul_scalar(void) {
printf("Testing vector scalar multiplication...\n");
// Create an arena
Arena* arena = arena_create(1024);
assert(arena != NULL);
// Create vector
VectorF* a = vector_f_create(arena, 3);
assert(a != NULL);
// Set vector
float a_data[3] = {1.0f, 2.0f, 3.0f};
assert(vector_f_set(a, a_data, 3));
// Multiply vector by scalar
VectorF* b = vector_f_mul_scalar(arena, a, 2.0f);
assert(b != NULL);
assert(b->dim == 3);
assert(b->data[0] == 2.0f && b->data[1] == 4.0f && b->data[2] == 6.0f);
// Destroy the arena
arena_destroy(arena);
printf("PASS: vector_mul_scalar\n");
}
|
O0
|
c
|
test_vector_mul_scalar:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
leaq 0x8832(%rip), %rdi # 0xa5d1
movb $0x0, %al
callq 0x1080
movl $0x400, %edi # imm = 0x400
callq 0x42a0
movq %rax, -0x8(%rbp)
cmpq $0x0, -0x8(%rbp)
je 0x1dbd
jmp 0x1ddc
leaq 0x8411(%rip), %rdi # 0xa1d5
leaq 0x8366(%rip), %rsi # 0xa131
movl $0xa5, %edx
leaq 0x8823(%rip), %rcx # 0xa5fa
callq 0x1090
movq -0x8(%rbp), %rdi
movl $0x3, %esi
callq 0x49a0
movq %rax, -0x10(%rbp)
cmpq $0x0, -0x10(%rbp)
je 0x1df7
jmp 0x1e16
leaq 0x83db(%rip), %rdi # 0xa1d9
leaq 0x832c(%rip), %rsi # 0xa131
movl $0xa9, %edx
leaq 0x87e9(%rip), %rcx # 0xa5fa
callq 0x1090
movq 0x95bf(%rip), %rax # 0xb3dc
movq %rax, -0x1c(%rbp)
movl 0x95bd(%rip), %eax # 0xb3e4
movl %eax, -0x14(%rbp)
movq -0x10(%rbp), %rdi
leaq -0x1c(%rbp), %rsi
movl $0x3, %edx
callq 0x4d80
testb $0x1, %al
jne 0x1e42
jmp 0x1e44
jmp 0x1e63
leaq 0x8668(%rip), %rdi # 0xa4b3
leaq 0x82df(%rip), %rsi # 0xa131
movl $0xad, %edx
leaq 0x879c(%rip), %rcx # 0xa5fa
callq 0x1090
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movss 0x8195(%rip), %xmm0 # 0xa008
callq 0x5840
movq %rax, -0x28(%rbp)
cmpq $0x0, -0x28(%rbp)
je 0x1e85
jmp 0x1ea4
leaq 0x861d(%rip), %rdi # 0xa4a9
leaq 0x829e(%rip), %rsi # 0xa131
movl $0xb1, %edx
leaq 0x875b(%rip), %rcx # 0xa5fa
callq 0x1090
movq -0x28(%rbp), %rax
cmpq $0x3, 0x10(%rax)
jne 0x1eb1
jmp 0x1ed0
leaq 0x9c15(%rip), %rdi # 0xbacd
leaq 0x8272(%rip), %rsi # 0xa131
movl $0xb2, %edx
leaq 0x872f(%rip), %rcx # 0xa5fa
callq 0x1090
movq -0x28(%rbp), %rax
movss (%rax), %xmm0
movss 0x8128(%rip), %xmm1 # 0xa008
ucomiss %xmm1, %xmm0
jne 0x1f19
jp 0x1f19
movq -0x28(%rbp), %rax
movss 0x4(%rax), %xmm0
movss 0x8124(%rip), %xmm1 # 0xa01c
ucomiss %xmm1, %xmm0
jne 0x1f19
jp 0x1f19
movq -0x28(%rbp), %rax
movss 0x8(%rax), %xmm0
movss 0x8110(%rip), %xmm1 # 0xa020
ucomiss %xmm1, %xmm0
jne 0x1f19
jp 0x1f19
jmp 0x1f38
leaq 0x86fc(%rip), %rdi # 0xa61c
leaq 0x820a(%rip), %rsi # 0xa131
movl $0xb3, %edx
leaq 0x86c7(%rip), %rcx # 0xa5fa
callq 0x1090
movq -0x8(%rbp), %rdi
callq 0x4880
leaq 0x8713(%rip), %rdi # 0xa65b
movb $0x0, %al
callq 0x1080
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
|
test_vector_mul_scalar:
push rbp
mov rbp, rsp
sub rsp, 30h
lea rdi, aTestingVectorS_1; "Testing vector scalar multiplication..."...
mov al, 0
call _printf
mov edi, 400h
call arena_create
mov [rbp+var_8], rax
cmp [rbp+var_8], 0
jz short loc_1DBD
jmp short loc_1DDC
loc_1DBD:
lea rdi, aArenaNull; "arena != NULL"
lea rsi, aWorkspaceLlm4b; "/workspace/llm4binary/github/2025_star3"...
mov edx, 0A5h
lea rcx, aVoidTestVector_3; "void test_vector_mul_scalar(void)"
call ___assert_fail
loc_1DDC:
mov rdi, [rbp+var_8]
mov esi, 3
call vector_f_create
mov [rbp+var_10], rax
cmp [rbp+var_10], 0
jz short loc_1DF7
jmp short loc_1E16
loc_1DF7:
lea rdi, aArenaNull+4; "a != NULL"
lea rsi, aWorkspaceLlm4b; "/workspace/llm4binary/github/2025_star3"...
mov edx, 0A9h
lea rcx, aVoidTestVector_3; "void test_vector_mul_scalar(void)"
call ___assert_fail
loc_1E16:
mov rax, cs:qword_B3DC
mov [rbp+var_1C], rax
mov eax, cs:dword_B3E4
mov [rbp+var_14], eax
mov rdi, [rbp+var_10]
lea rsi, [rbp+var_1C]
mov edx, 3
call vector_f_set
test al, 1
jnz short loc_1E42
jmp short loc_1E44
loc_1E42:
jmp short loc_1E63
loc_1E44:
lea rdi, aVectorFSetAADa; "vector_f_set(a, a_data, 3)"
lea rsi, aWorkspaceLlm4b; "/workspace/llm4binary/github/2025_star3"...
mov edx, 0ADh
lea rcx, aVoidTestVector_3; "void test_vector_mul_scalar(void)"
call ___assert_fail
loc_1E63:
mov rdi, [rbp+var_8]
mov rsi, [rbp+var_10]
movss xmm0, cs:dword_A008
call vector_f_mul_scalar
mov [rbp+var_28], rax
cmp [rbp+var_28], 0
jz short loc_1E85
jmp short loc_1EA4
loc_1E85:
lea rdi, aBNull; "b != NULL"
lea rsi, aWorkspaceLlm4b; "/workspace/llm4binary/github/2025_star3"...
mov edx, 0B1h
lea rcx, aVoidTestVector_3; "void test_vector_mul_scalar(void)"
call ___assert_fail
loc_1EA4:
mov rax, [rbp+var_28]
cmp qword ptr [rax+10h], 3
jnz short loc_1EB1
jmp short loc_1ED0
loc_1EB1:
lea rdi, aADim3BDim3+0Fh; "b->dim == 3"
lea rsi, aWorkspaceLlm4b; "/workspace/llm4binary/github/2025_star3"...
mov edx, 0B2h
lea rcx, aVoidTestVector_3; "void test_vector_mul_scalar(void)"
call ___assert_fail
loc_1ED0:
mov rax, [rbp+var_28]
movss xmm0, dword ptr [rax]
movss xmm1, cs:dword_A008
ucomiss xmm0, xmm1
jnz short loc_1F19
jp short loc_1F19
mov rax, [rbp+var_28]
movss xmm0, dword ptr [rax+4]
movss xmm1, cs:dword_A01C
ucomiss xmm0, xmm1
jnz short loc_1F19
jp short loc_1F19
mov rax, [rbp+var_28]
movss xmm0, dword ptr [rax+8]
movss xmm1, cs:dword_A020
ucomiss xmm0, xmm1
jnz short loc_1F19
jp short loc_1F19
jmp short loc_1F38
loc_1F19:
lea rdi, aBData020fBData; "b->data[0] == 2.0f && b->data[1] == 4.0"...
lea rsi, aWorkspaceLlm4b; "/workspace/llm4binary/github/2025_star3"...
mov edx, 0B3h
lea rcx, aVoidTestVector_3; "void test_vector_mul_scalar(void)"
call ___assert_fail
loc_1F38:
mov rdi, [rbp+var_8]
call arena_destroy
lea rdi, aPassVectorMulS; "PASS: vector_mul_scalar\n"
mov al, 0
call _printf
add rsp, 30h
pop rbp
retn
|
long long test_vector_mul_scalar(long long a1, long long a2, long long a3)
{
long long v3; // rsi
long long v4; // rax
long long v5; // rdx
long long v7; // [rsp+14h] [rbp-1Ch] BYREF
int v8; // [rsp+1Ch] [rbp-14h]
long long v9; // [rsp+20h] [rbp-10h]
long long v10; // [rsp+28h] [rbp-8h]
printf("Testing vector scalar multiplication...\n", a2, a3);
v10 = arena_create(1024LL);
if ( !v10 )
__assert_fail(
"arena != NULL",
"/workspace/llm4binary/github/2025_star3/tsotchke[P]eshkol/tests/unit/test_vector.c",
165LL,
"void test_vector_mul_scalar(void)");
v9 = vector_f_create(v10, 3LL);
if ( !v9 )
__assert_fail(
"a != NULL",
"/workspace/llm4binary/github/2025_star3/tsotchke[P]eshkol/tests/unit/test_vector.c",
169LL,
"void test_vector_mul_scalar(void)");
v7 = 0x400000003F800000LL;
v8 = 1077936128;
if ( (vector_f_set(v9, &v7, 3LL) & 1) == 0 )
__assert_fail(
"vector_f_set(a, a_data, 3)",
"/workspace/llm4binary/github/2025_star3/tsotchke[P]eshkol/tests/unit/test_vector.c",
173LL,
"void test_vector_mul_scalar(void)");
v3 = v9;
v4 = vector_f_mul_scalar(v10, v9, 2.0);
if ( !v4 )
__assert_fail(
"b != NULL",
"/workspace/llm4binary/github/2025_star3/tsotchke[P]eshkol/tests/unit/test_vector.c",
177LL,
"void test_vector_mul_scalar(void)");
if ( *(_QWORD *)(v4 + 16) != 3LL )
__assert_fail(
"b->dim == 3",
"/workspace/llm4binary/github/2025_star3/tsotchke[P]eshkol/tests/unit/test_vector.c",
178LL,
"void test_vector_mul_scalar(void)");
if ( *(float *)v4 != 2.0 || *(float *)(v4 + 4) != 4.0 || *(float *)(v4 + 8) != 6.0 )
__assert_fail(
"b->data[0] == 2.0f && b->data[1] == 4.0f && b->data[2] == 6.0f",
"/workspace/llm4binary/github/2025_star3/tsotchke[P]eshkol/tests/unit/test_vector.c",
179LL,
"void test_vector_mul_scalar(void)");
arena_destroy(v10);
return printf("PASS: vector_mul_scalar\n", v3, v5);
}
|
test_vector_mul_scalar:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x30
LEA RDI,[0x10a5bf]
MOV AL,0x0
CALL 0x00101080
MOV EDI,0x400
CALL 0x001042a0
MOV qword ptr [RBP + -0x8],RAX
CMP qword ptr [RBP + -0x8],0x0
JZ 0x00101dbd
JMP 0x00101ddc
LAB_00101dbd:
LEA RDI,[0x10a1c3]
LEA RSI,[0x10a131]
MOV EDX,0xa5
LEA RCX,[0x10a5e8]
CALL 0x00101090
LAB_00101ddc:
MOV RDI,qword ptr [RBP + -0x8]
MOV ESI,0x3
CALL 0x001049a0
MOV qword ptr [RBP + -0x10],RAX
CMP qword ptr [RBP + -0x10],0x0
JZ 0x00101df7
JMP 0x00101e16
LAB_00101df7:
LEA RDI,[0x10a1c7]
LEA RSI,[0x10a131]
MOV EDX,0xa9
LEA RCX,[0x10a5e8]
CALL 0x00101090
LAB_00101e16:
MOV RAX,qword ptr [0x0010b3bc]
MOV qword ptr [RBP + -0x1c],RAX
MOV EAX,dword ptr [0x0010b3c4]
MOV dword ptr [RBP + -0x14],EAX
MOV RDI,qword ptr [RBP + -0x10]
LEA RSI,[RBP + -0x1c]
MOV EDX,0x3
CALL 0x00104d80
TEST AL,0x1
JNZ 0x00101e42
JMP 0x00101e44
LAB_00101e42:
JMP 0x00101e63
LAB_00101e44:
LEA RDI,[0x10a4a1]
LEA RSI,[0x10a131]
MOV EDX,0xad
LEA RCX,[0x10a5e8]
CALL 0x00101090
LAB_00101e63:
MOV RDI,qword ptr [RBP + -0x8]
MOV RSI,qword ptr [RBP + -0x10]
MOVSS XMM0,dword ptr [0x0010a008]
CALL 0x00105840
MOV qword ptr [RBP + -0x28],RAX
CMP qword ptr [RBP + -0x28],0x0
JZ 0x00101e85
JMP 0x00101ea4
LAB_00101e85:
LEA RDI,[0x10a497]
LEA RSI,[0x10a131]
MOV EDX,0xb1
LEA RCX,[0x10a5e8]
CALL 0x00101090
LAB_00101ea4:
MOV RAX,qword ptr [RBP + -0x28]
CMP qword ptr [RAX + 0x10],0x3
JNZ 0x00101eb1
JMP 0x00101ed0
LAB_00101eb1:
LEA RDI,[0x10ba87]
LEA RSI,[0x10a131]
MOV EDX,0xb2
LEA RCX,[0x10a5e8]
CALL 0x00101090
LAB_00101ed0:
MOV RAX,qword ptr [RBP + -0x28]
MOVSS XMM0,dword ptr [RAX]
MOVSS XMM1,dword ptr [0x0010a008]
UCOMISS XMM0,XMM1
JNZ 0x00101f19
JP 0x00101f19
MOV RAX,qword ptr [RBP + -0x28]
MOVSS XMM0,dword ptr [RAX + 0x4]
MOVSS XMM1,dword ptr [0x0010a01c]
UCOMISS XMM0,XMM1
JNZ 0x00101f19
JP 0x00101f19
MOV RAX,qword ptr [RBP + -0x28]
MOVSS XMM0,dword ptr [RAX + 0x8]
MOVSS XMM1,dword ptr [0x0010a020]
UCOMISS XMM0,XMM1
JNZ 0x00101f19
JP 0x00101f19
JMP 0x00101f38
LAB_00101f19:
LEA RDI,[0x10a60a]
LEA RSI,[0x10a131]
MOV EDX,0xb3
LEA RCX,[0x10a5e8]
CALL 0x00101090
LAB_00101f38:
MOV RDI,qword ptr [RBP + -0x8]
CALL 0x00104880
LEA RDI,[0x10a649]
MOV AL,0x0
CALL 0x00101080
ADD RSP,0x30
POP RBP
RET
|
void test_vector_mul_scalar(void)
{
ulong uVar1;
float *pfVar2;
int8 local_24;
int4 local_1c;
long local_18;
long local_10;
printf("Testing vector scalar multiplication...\n");
local_10 = arena_create(0x400);
if (local_10 == 0) {
/* WARNING: Subroutine does not return */
__assert_fail("arena != NULL","/workspace/llm4binary/github2025/eshkol/tests/unit/test_vector.c"
,0xa5,"void test_vector_mul_scalar(void)");
}
local_18 = vector_f_create(local_10,3);
if (local_18 == 0) {
/* WARNING: Subroutine does not return */
__assert_fail("a != NULL","/workspace/llm4binary/github2025/eshkol/tests/unit/test_vector.c",
0xa9,"void test_vector_mul_scalar(void)");
}
local_24 = DAT_0010b3bc;
local_1c = DAT_0010b3c4;
uVar1 = vector_f_set(local_18,&local_24,3);
if ((uVar1 & 1) == 0) {
/* WARNING: Subroutine does not return */
__assert_fail("vector_f_set(a, a_data, 3)",
"/workspace/llm4binary/github2025/eshkol/tests/unit/test_vector.c",0xad,
"void test_vector_mul_scalar(void)");
}
pfVar2 = (float *)vector_f_mul_scalar(DAT_0010a008,local_10,local_18);
if (pfVar2 != (float *)0x0) {
if (*(long *)(pfVar2 + 4) != 3) {
/* WARNING: Subroutine does not return */
__assert_fail("b->dim == 3","/workspace/llm4binary/github2025/eshkol/tests/unit/test_vector.c"
,0xb2,"void test_vector_mul_scalar(void)");
}
if ((((*pfVar2 == DAT_0010a008) && (!NAN(*pfVar2) && !NAN(DAT_0010a008))) &&
(pfVar2[1] == DAT_0010a01c)) && (!NAN(pfVar2[1]) && !NAN(DAT_0010a01c))) {
if ((pfVar2[2] == DAT_0010a020) && (!NAN(pfVar2[2]) && !NAN(DAT_0010a020))) {
arena_destroy(local_10);
printf("PASS: vector_mul_scalar\n");
return;
}
}
/* WARNING: Subroutine does not return */
__assert_fail("b->data[0] == 2.0f && b->data[1] == 4.0f && b->data[2] == 6.0f",
"/workspace/llm4binary/github2025/eshkol/tests/unit/test_vector.c",0xb3,
"void test_vector_mul_scalar(void)");
}
/* WARNING: Subroutine does not return */
__assert_fail("b != NULL","/workspace/llm4binary/github2025/eshkol/tests/unit/test_vector.c",0xb1,
"void test_vector_mul_scalar(void)");
}
|
|
64,308 |
FTB_WORD_cmp
|
eloqsql/storage/myisam/ft_boolean_search.c
|
static int FTB_WORD_cmp(my_off_t *v, FTB_WORD *a, FTB_WORD *b)
{
int i;
/* if a==curdoc, take it as a < b */
if (v && a->docid[0] == *v)
return -1;
/* ORDER BY docid, ndepth DESC */
i=CMP_NUM(a->docid[0], b->docid[0]);
if (!i)
i=CMP_NUM(b->ndepth,a->ndepth);
return i;
}
|
O3
|
c
|
FTB_WORD_cmp:
pushq %rbp
movq %rsp, %rbp
movq 0x10(%rsi), %rcx
testq %rdi, %rdi
je 0x74ce5
movl $0xffffffff, %eax # imm = 0xFFFFFFFF
cmpq (%rdi), %rcx
je 0x74d08
xorl %eax, %eax
cmpq 0x10(%rdx), %rcx
setne %al
movl $0xffffffff, %ecx # imm = 0xFFFFFFFF
cmovbl %ecx, %eax
testl %eax, %eax
jne 0x74d08
movl 0x44(%rdx), %edx
xorl %eax, %eax
cmpl 0x44(%rsi), %edx
setne %al
cmovbl %ecx, %eax
popq %rbp
retq
|
FTB_WORD_cmp:
push rbp
mov rbp, rsp
mov rcx, [rsi+10h]
test rdi, rdi
jz short loc_74CE5
mov eax, 0FFFFFFFFh
cmp rcx, [rdi]
jz short loc_74D08
loc_74CE5:
xor eax, eax
cmp rcx, [rdx+10h]
setnz al
mov ecx, 0FFFFFFFFh
cmovb eax, ecx
test eax, eax
jnz short loc_74D08
mov edx, [rdx+44h]
xor eax, eax
cmp edx, [rsi+44h]
setnz al
cmovb eax, ecx
loc_74D08:
pop rbp
retn
|
long long FTB_WORD_cmp(_QWORD *a1, long long a2, long long a3)
{
unsigned long long v3; // rcx
long long result; // rax
unsigned int v5; // edx
v3 = *(_QWORD *)(a2 + 16);
if ( !a1 || (result = 0xFFFFFFFFLL, v3 != *a1) )
{
result = v3 != *(_QWORD *)(a3 + 16);
if ( v3 < *(_QWORD *)(a3 + 16) )
result = 0xFFFFFFFFLL;
if ( !(_DWORD)result )
{
v5 = *(_DWORD *)(a3 + 68);
result = v5 != *(_DWORD *)(a2 + 68);
if ( v5 < *(_DWORD *)(a2 + 68) )
return 0xFFFFFFFFLL;
}
}
return result;
}
|
FTB_WORD_cmp:
PUSH RBP
MOV RBP,RSP
MOV RCX,qword ptr [RSI + 0x10]
TEST RDI,RDI
JZ 0x00174ce5
MOV EAX,0xffffffff
CMP RCX,qword ptr [RDI]
JZ 0x00174d08
LAB_00174ce5:
XOR EAX,EAX
CMP RCX,qword ptr [RDX + 0x10]
SETNZ AL
MOV ECX,0xffffffff
CMOVC EAX,ECX
TEST EAX,EAX
JNZ 0x00174d08
MOV EDX,dword ptr [RDX + 0x44]
XOR EAX,EAX
CMP EDX,dword ptr [RSI + 0x44]
SETNZ AL
CMOVC EAX,ECX
LAB_00174d08:
POP RBP
RET
|
uint FTB_WORD_cmp(ulong *param_1,long param_2,long param_3)
{
ulong uVar1;
uint uVar2;
uVar1 = *(ulong *)(param_2 + 0x10);
if ((param_1 == (ulong *)0x0) || (uVar2 = 0xffffffff, uVar1 != *param_1)) {
uVar2 = (uint)(uVar1 != *(ulong *)(param_3 + 0x10));
if (uVar1 < *(ulong *)(param_3 + 0x10)) {
uVar2 = 0xffffffff;
}
if ((uVar2 == 0) &&
(uVar2 = (uint)(*(uint *)(param_3 + 0x44) != *(uint *)(param_2 + 0x44)),
*(uint *)(param_3 + 0x44) < *(uint *)(param_2 + 0x44))) {
uVar2 = 0xffffffff;
}
}
return uVar2;
}
|
|
64,309 |
ResnetBlock::init_params(ggml_context*, ggml_type)
|
7CodeWizard[P]stablediffusion/vae.hpp
|
void init_params(struct ggml_context* ctx, ggml_type wtype) {
norm1_w = ggml_new_tensor_1d(ctx, GGML_TYPE_F32, in_channels);
norm1_b = ggml_new_tensor_1d(ctx, GGML_TYPE_F32, in_channels);
conv1_w = ggml_new_tensor_4d(ctx, GGML_TYPE_F16, 3, 3, in_channels, out_channels);
conv1_b = ggml_new_tensor_1d(ctx, GGML_TYPE_F32, out_channels);
norm2_w = ggml_new_tensor_1d(ctx, GGML_TYPE_F32, out_channels);
norm2_b = ggml_new_tensor_1d(ctx, GGML_TYPE_F32, out_channels);
conv2_w = ggml_new_tensor_4d(ctx, GGML_TYPE_F16, 3, 3, out_channels, out_channels);
conv2_b = ggml_new_tensor_1d(ctx, GGML_TYPE_F32, out_channels);
if (out_channels != in_channels) {
nin_shortcut_w = ggml_new_tensor_4d(ctx, GGML_TYPE_F16, 1, 1, in_channels, out_channels);
nin_shortcut_b = ggml_new_tensor_1d(ctx, GGML_TYPE_F32, out_channels);
}
}
|
O0
|
cpp
|
ResnetBlock::init_params(ggml_context*, ggml_type):
subq $0x28, %rsp
movq %rdi, 0x20(%rsp)
movq %rsi, 0x18(%rsp)
movl %edx, 0x14(%rsp)
movq 0x20(%rsp), %rax
movq %rax, 0x8(%rsp)
movq 0x18(%rsp), %rdi
movslq (%rax), %rdx
xorl %esi, %esi
callq 0x11c880
movq %rax, %rcx
movq 0x8(%rsp), %rax
movq %rcx, 0x8(%rax)
movq 0x18(%rsp), %rdi
movslq (%rax), %rdx
xorl %esi, %esi
callq 0x11c880
movq %rax, %rcx
movq 0x8(%rsp), %rax
movq %rcx, 0x10(%rax)
movq 0x18(%rsp), %rdi
movslq (%rax), %r8
movslq 0x4(%rax), %r9
movl $0x1, %esi
movl $0x3, %ecx
movq %rcx, %rdx
callq 0x11c960
movq %rax, %rcx
movq 0x8(%rsp), %rax
movq %rcx, 0x18(%rax)
movq 0x18(%rsp), %rdi
movslq 0x4(%rax), %rdx
xorl %esi, %esi
callq 0x11c880
movq %rax, %rcx
movq 0x8(%rsp), %rax
movq %rcx, 0x20(%rax)
movq 0x18(%rsp), %rdi
movslq 0x4(%rax), %rdx
xorl %esi, %esi
callq 0x11c880
movq %rax, %rcx
movq 0x8(%rsp), %rax
movq %rcx, 0x28(%rax)
movq 0x18(%rsp), %rdi
movslq 0x4(%rax), %rdx
xorl %esi, %esi
callq 0x11c880
movq %rax, %rcx
movq 0x8(%rsp), %rax
movq %rcx, 0x30(%rax)
movq 0x18(%rsp), %rdi
movslq 0x4(%rax), %r8
movslq 0x4(%rax), %r9
movl $0x1, %esi
movl $0x3, %ecx
movq %rcx, %rdx
callq 0x11c960
movq %rax, %rcx
movq 0x8(%rsp), %rax
movq %rcx, 0x38(%rax)
movq 0x18(%rsp), %rdi
movslq 0x4(%rax), %rdx
xorl %esi, %esi
callq 0x11c880
movq 0x8(%rsp), %rcx
movq %rax, 0x40(%rcx)
movl 0x4(%rcx), %eax
cmpl (%rcx), %eax
je 0x61676
movq 0x8(%rsp), %rax
movq 0x18(%rsp), %rdi
movslq (%rax), %r8
movslq 0x4(%rax), %r9
movl $0x1, %esi
movl $0x1, %ecx
movq %rcx, %rdx
callq 0x11c960
movq %rax, %rcx
movq 0x8(%rsp), %rax
movq %rcx, 0x48(%rax)
movq 0x18(%rsp), %rdi
movslq 0x4(%rax), %rdx
xorl %esi, %esi
callq 0x11c880
movq %rax, %rcx
movq 0x8(%rsp), %rax
movq %rcx, 0x50(%rax)
addq $0x28, %rsp
retq
nopl (%rax,%rax)
|
_ZN11ResnetBlock11init_paramsEP12ggml_context9ggml_type:
sub rsp, 28h
mov [rsp+28h+var_8], rdi
mov [rsp+28h+var_10], rsi
mov [rsp+28h+var_14], edx
mov rax, [rsp+28h+var_8]
mov [rsp+28h+var_20], rax
mov rdi, [rsp+28h+var_10]
movsxd rdx, dword ptr [rax]
xor esi, esi
call ggml_new_tensor_1d
mov rcx, rax
mov rax, [rsp+28h+var_20]
mov [rax+8], rcx
mov rdi, [rsp+28h+var_10]
movsxd rdx, dword ptr [rax]
xor esi, esi
call ggml_new_tensor_1d
mov rcx, rax
mov rax, [rsp+28h+var_20]
mov [rax+10h], rcx
mov rdi, [rsp+28h+var_10]
movsxd r8, dword ptr [rax]
movsxd r9, dword ptr [rax+4]
mov esi, 1
mov ecx, 3
mov rdx, rcx
call ggml_new_tensor_4d
mov rcx, rax
mov rax, [rsp+28h+var_20]
mov [rax+18h], rcx
mov rdi, [rsp+28h+var_10]
movsxd rdx, dword ptr [rax+4]
xor esi, esi
call ggml_new_tensor_1d
mov rcx, rax
mov rax, [rsp+28h+var_20]
mov [rax+20h], rcx
mov rdi, [rsp+28h+var_10]
movsxd rdx, dword ptr [rax+4]
xor esi, esi
call ggml_new_tensor_1d
mov rcx, rax
mov rax, [rsp+28h+var_20]
mov [rax+28h], rcx
mov rdi, [rsp+28h+var_10]
movsxd rdx, dword ptr [rax+4]
xor esi, esi
call ggml_new_tensor_1d
mov rcx, rax
mov rax, [rsp+28h+var_20]
mov [rax+30h], rcx
mov rdi, [rsp+28h+var_10]
movsxd r8, dword ptr [rax+4]
movsxd r9, dword ptr [rax+4]
mov esi, 1
mov ecx, 3
mov rdx, rcx
call ggml_new_tensor_4d
mov rcx, rax
mov rax, [rsp+28h+var_20]
mov [rax+38h], rcx
mov rdi, [rsp+28h+var_10]
movsxd rdx, dword ptr [rax+4]
xor esi, esi
call ggml_new_tensor_1d
mov rcx, [rsp+28h+var_20]
mov [rcx+40h], rax
mov eax, [rcx+4]
cmp eax, [rcx]
jz short loc_61676
mov rax, [rsp+28h+var_20]
mov rdi, [rsp+28h+var_10]
movsxd r8, dword ptr [rax]
movsxd r9, dword ptr [rax+4]
mov esi, 1
mov ecx, 1
mov rdx, rcx
call ggml_new_tensor_4d
mov rcx, rax
mov rax, [rsp+28h+var_20]
mov [rax+48h], rcx
mov rdi, [rsp+28h+var_10]
movsxd rdx, dword ptr [rax+4]
xor esi, esi
call ggml_new_tensor_1d
mov rcx, rax
mov rax, [rsp+28h+var_20]
mov [rax+50h], rcx
loc_61676:
add rsp, 28h
retn
|
unsigned long long ResnetBlock::init_params(int *a1, long long a2)
{
unsigned long long result; // rax
long long v3; // rcx
*((_QWORD *)a1 + 1) = ggml_new_tensor_1d(a2, 0LL, *a1);
*((_QWORD *)a1 + 2) = ggml_new_tensor_1d(a2, 0LL, *a1);
*((_QWORD *)a1 + 3) = ggml_new_tensor_4d(a2, 1LL, 3LL, 3LL, *a1, a1[1]);
*((_QWORD *)a1 + 4) = ggml_new_tensor_1d(a2, 0LL, a1[1]);
*((_QWORD *)a1 + 5) = ggml_new_tensor_1d(a2, 0LL, a1[1]);
*((_QWORD *)a1 + 6) = ggml_new_tensor_1d(a2, 0LL, a1[1]);
*((_QWORD *)a1 + 7) = ggml_new_tensor_4d(a2, 1LL, 3LL, 3LL, a1[1], a1[1]);
*((_QWORD *)a1 + 8) = ggml_new_tensor_1d(a2, 0LL, a1[1]);
result = (unsigned int)a1[1];
if ( (_DWORD)result != *a1 )
{
*((_QWORD *)a1 + 9) = ggml_new_tensor_4d(a2, 1LL, 1LL, 1LL, *a1, a1[1]);
v3 = ggml_new_tensor_1d(a2, 0LL, a1[1]);
result = (unsigned long long)a1;
*((_QWORD *)a1 + 10) = v3;
}
return result;
}
|
init_params:
SUB RSP,0x28
MOV qword ptr [RSP + 0x20],RDI
MOV qword ptr [RSP + 0x18],RSI
MOV dword ptr [RSP + 0x14],EDX
MOV RAX,qword ptr [RSP + 0x20]
MOV qword ptr [RSP + 0x8],RAX
MOV RDI,qword ptr [RSP + 0x18]
MOVSXD RDX,dword ptr [RAX]
XOR ESI,ESI
CALL 0x0021c880
MOV RCX,RAX
MOV RAX,qword ptr [RSP + 0x8]
MOV qword ptr [RAX + 0x8],RCX
MOV RDI,qword ptr [RSP + 0x18]
MOVSXD RDX,dword ptr [RAX]
XOR ESI,ESI
CALL 0x0021c880
MOV RCX,RAX
MOV RAX,qword ptr [RSP + 0x8]
MOV qword ptr [RAX + 0x10],RCX
MOV RDI,qword ptr [RSP + 0x18]
MOVSXD R8,dword ptr [RAX]
MOVSXD R9,dword ptr [RAX + 0x4]
MOV ESI,0x1
MOV ECX,0x3
MOV RDX,RCX
CALL 0x0021c960
MOV RCX,RAX
MOV RAX,qword ptr [RSP + 0x8]
MOV qword ptr [RAX + 0x18],RCX
MOV RDI,qword ptr [RSP + 0x18]
MOVSXD RDX,dword ptr [RAX + 0x4]
XOR ESI,ESI
CALL 0x0021c880
MOV RCX,RAX
MOV RAX,qword ptr [RSP + 0x8]
MOV qword ptr [RAX + 0x20],RCX
MOV RDI,qword ptr [RSP + 0x18]
MOVSXD RDX,dword ptr [RAX + 0x4]
XOR ESI,ESI
CALL 0x0021c880
MOV RCX,RAX
MOV RAX,qword ptr [RSP + 0x8]
MOV qword ptr [RAX + 0x28],RCX
MOV RDI,qword ptr [RSP + 0x18]
MOVSXD RDX,dword ptr [RAX + 0x4]
XOR ESI,ESI
CALL 0x0021c880
MOV RCX,RAX
MOV RAX,qword ptr [RSP + 0x8]
MOV qword ptr [RAX + 0x30],RCX
MOV RDI,qword ptr [RSP + 0x18]
MOVSXD R8,dword ptr [RAX + 0x4]
MOVSXD R9,dword ptr [RAX + 0x4]
MOV ESI,0x1
MOV ECX,0x3
MOV RDX,RCX
CALL 0x0021c960
MOV RCX,RAX
MOV RAX,qword ptr [RSP + 0x8]
MOV qword ptr [RAX + 0x38],RCX
MOV RDI,qword ptr [RSP + 0x18]
MOVSXD RDX,dword ptr [RAX + 0x4]
XOR ESI,ESI
CALL 0x0021c880
MOV RCX,qword ptr [RSP + 0x8]
MOV qword ptr [RCX + 0x40],RAX
MOV EAX,dword ptr [RCX + 0x4]
CMP EAX,dword ptr [RCX]
JZ 0x00161676
MOV RAX,qword ptr [RSP + 0x8]
MOV RDI,qword ptr [RSP + 0x18]
MOVSXD R8,dword ptr [RAX]
MOVSXD R9,dword ptr [RAX + 0x4]
MOV ESI,0x1
MOV ECX,0x1
MOV RDX,RCX
CALL 0x0021c960
MOV RCX,RAX
MOV RAX,qword ptr [RSP + 0x8]
MOV qword ptr [RAX + 0x48],RCX
MOV RDI,qword ptr [RSP + 0x18]
MOVSXD RDX,dword ptr [RAX + 0x4]
XOR ESI,ESI
CALL 0x0021c880
MOV RCX,RAX
MOV RAX,qword ptr [RSP + 0x8]
MOV qword ptr [RAX + 0x50],RCX
LAB_00161676:
ADD RSP,0x28
RET
|
/* ResnetBlock::init_params(ggml_context*, ggml_type) */
void ResnetBlock::init_params(int *param_1,int8 param_2)
{
int8 uVar1;
uVar1 = ggml_new_tensor_1d(param_2,0,(long)*param_1);
*(int8 *)(param_1 + 2) = uVar1;
uVar1 = ggml_new_tensor_1d(param_2,0,(long)*param_1);
*(int8 *)(param_1 + 4) = uVar1;
uVar1 = ggml_new_tensor_4d(param_2,1,3,3,(long)*param_1,(long)param_1[1]);
*(int8 *)(param_1 + 6) = uVar1;
uVar1 = ggml_new_tensor_1d(param_2,0,(long)param_1[1]);
*(int8 *)(param_1 + 8) = uVar1;
uVar1 = ggml_new_tensor_1d(param_2,0,(long)param_1[1]);
*(int8 *)(param_1 + 10) = uVar1;
uVar1 = ggml_new_tensor_1d(param_2,0,(long)param_1[1]);
*(int8 *)(param_1 + 0xc) = uVar1;
uVar1 = ggml_new_tensor_4d(param_2,1,3,3,(long)param_1[1],(long)param_1[1]);
*(int8 *)(param_1 + 0xe) = uVar1;
uVar1 = ggml_new_tensor_1d(param_2,0,(long)param_1[1]);
*(int8 *)(param_1 + 0x10) = uVar1;
if (param_1[1] != *param_1) {
uVar1 = ggml_new_tensor_4d(param_2,1,1,1,(long)*param_1,(long)param_1[1]);
*(int8 *)(param_1 + 0x12) = uVar1;
uVar1 = ggml_new_tensor_1d(param_2,0,(long)param_1[1]);
*(int8 *)(param_1 + 0x14) = uVar1;
}
return;
}
|
|
64,310 |
ResnetBlock::init_params(ggml_context*, ggml_type)
|
7CodeWizard[P]stablediffusion/vae.hpp
|
void init_params(struct ggml_context* ctx, ggml_type wtype) {
norm1_w = ggml_new_tensor_1d(ctx, GGML_TYPE_F32, in_channels);
norm1_b = ggml_new_tensor_1d(ctx, GGML_TYPE_F32, in_channels);
conv1_w = ggml_new_tensor_4d(ctx, GGML_TYPE_F16, 3, 3, in_channels, out_channels);
conv1_b = ggml_new_tensor_1d(ctx, GGML_TYPE_F32, out_channels);
norm2_w = ggml_new_tensor_1d(ctx, GGML_TYPE_F32, out_channels);
norm2_b = ggml_new_tensor_1d(ctx, GGML_TYPE_F32, out_channels);
conv2_w = ggml_new_tensor_4d(ctx, GGML_TYPE_F16, 3, 3, out_channels, out_channels);
conv2_b = ggml_new_tensor_1d(ctx, GGML_TYPE_F32, out_channels);
if (out_channels != in_channels) {
nin_shortcut_w = ggml_new_tensor_4d(ctx, GGML_TYPE_F16, 1, 1, in_channels, out_channels);
nin_shortcut_b = ggml_new_tensor_1d(ctx, GGML_TYPE_F32, out_channels);
}
}
|
O1
|
cpp
|
ResnetBlock::init_params(ggml_context*, ggml_type):
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
movslq (%rdi), %rdx
movq %rsi, %rdi
xorl %esi, %esi
callq 0x8ec3c
movq %rax, 0x8(%rbx)
movslq (%rbx), %rdx
movq %r14, %rdi
xorl %esi, %esi
callq 0x8ec3c
movq %rax, 0x10(%rbx)
movslq (%rbx), %r8
movslq 0x4(%rbx), %r9
movl $0x3, %edx
movl $0x3, %ecx
movq %r14, %rdi
movl $0x1, %esi
callq 0x8eca5
movq %rax, 0x18(%rbx)
movslq 0x4(%rbx), %rdx
movq %r14, %rdi
xorl %esi, %esi
callq 0x8ec3c
movq %rax, 0x20(%rbx)
movslq 0x4(%rbx), %rdx
movq %r14, %rdi
xorl %esi, %esi
callq 0x8ec3c
movq %rax, 0x28(%rbx)
movslq 0x4(%rbx), %rdx
movq %r14, %rdi
xorl %esi, %esi
callq 0x8ec3c
movq %rax, 0x30(%rbx)
movslq 0x4(%rbx), %r8
movl $0x3, %edx
movl $0x3, %ecx
movq %r14, %rdi
movl $0x1, %esi
movq %r8, %r9
callq 0x8eca5
movq %rax, 0x38(%rbx)
movslq 0x4(%rbx), %rdx
movq %r14, %rdi
xorl %esi, %esi
callq 0x8ec3c
movq %rax, 0x40(%rbx)
movslq 0x4(%rbx), %r9
movslq (%rbx), %r8
cmpl %r8d, %r9d
je 0x44e0b
movl $0x1, %edx
movl $0x1, %ecx
movq %r14, %rdi
movl $0x1, %esi
callq 0x8eca5
movq %rax, 0x48(%rbx)
movslq 0x4(%rbx), %rdx
movq %r14, %rdi
xorl %esi, %esi
callq 0x8ec3c
movq %rax, 0x50(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
nop
|
_ZN11ResnetBlock11init_paramsEP12ggml_context9ggml_type:
push r14
push rbx
push rax
mov r14, rsi
mov rbx, rdi
movsxd rdx, dword ptr [rdi]
mov rdi, rsi
xor esi, esi
call ggml_new_tensor_1d
mov [rbx+8], rax
movsxd rdx, dword ptr [rbx]
mov rdi, r14
xor esi, esi
call ggml_new_tensor_1d
mov [rbx+10h], rax
movsxd r8, dword ptr [rbx]
movsxd r9, dword ptr [rbx+4]
mov edx, 3
mov ecx, 3
mov rdi, r14
mov esi, 1
call ggml_new_tensor_4d
mov [rbx+18h], rax
movsxd rdx, dword ptr [rbx+4]
mov rdi, r14
xor esi, esi
call ggml_new_tensor_1d
mov [rbx+20h], rax
movsxd rdx, dword ptr [rbx+4]
mov rdi, r14
xor esi, esi
call ggml_new_tensor_1d
mov [rbx+28h], rax
movsxd rdx, dword ptr [rbx+4]
mov rdi, r14
xor esi, esi
call ggml_new_tensor_1d
mov [rbx+30h], rax
movsxd r8, dword ptr [rbx+4]
mov edx, 3
mov ecx, 3
mov rdi, r14
mov esi, 1
mov r9, r8
call ggml_new_tensor_4d
mov [rbx+38h], rax
movsxd rdx, dword ptr [rbx+4]
mov rdi, r14
xor esi, esi
call ggml_new_tensor_1d
mov [rbx+40h], rax
movsxd r9, dword ptr [rbx+4]
movsxd r8, dword ptr [rbx]
cmp r9d, r8d
jz short loc_44E0B
mov edx, 1
mov ecx, 1
mov rdi, r14
mov esi, 1
call ggml_new_tensor_4d
mov [rbx+48h], rax
movsxd rdx, dword ptr [rbx+4]
mov rdi, r14
xor esi, esi
call ggml_new_tensor_1d
mov [rbx+50h], rax
loc_44E0B:
add rsp, 8
pop rbx
pop r14
retn
|
long long ResnetBlock::init_params(int *a1, long long a2)
{
long long result; // rax
long long v3; // r9
long long v4; // r8
*((_QWORD *)a1 + 1) = ggml_new_tensor_1d(a2, 0LL, *a1);
*((_QWORD *)a1 + 2) = ggml_new_tensor_1d(a2, 0LL, *a1);
*((_QWORD *)a1 + 3) = ggml_new_tensor_4d(a2, 1LL, 3LL, 3LL, *a1, a1[1]);
*((_QWORD *)a1 + 4) = ggml_new_tensor_1d(a2, 0LL, a1[1]);
*((_QWORD *)a1 + 5) = ggml_new_tensor_1d(a2, 0LL, a1[1]);
*((_QWORD *)a1 + 6) = ggml_new_tensor_1d(a2, 0LL, a1[1]);
*((_QWORD *)a1 + 7) = ggml_new_tensor_4d(a2, 1LL, 3LL, 3LL, a1[1], a1[1]);
result = ggml_new_tensor_1d(a2, 0LL, a1[1]);
*((_QWORD *)a1 + 8) = result;
v3 = a1[1];
v4 = *a1;
if ( (_DWORD)v3 != (_DWORD)v4 )
{
*((_QWORD *)a1 + 9) = ggml_new_tensor_4d(a2, 1LL, 1LL, 1LL, v4, v3);
result = ggml_new_tensor_1d(a2, 0LL, a1[1]);
*((_QWORD *)a1 + 10) = result;
}
return result;
}
| |||
64,311 |
ResnetBlock::init_params(ggml_context*, ggml_type)
|
7CodeWizard[P]stablediffusion/vae.hpp
|
void init_params(struct ggml_context* ctx, ggml_type wtype) {
norm1_w = ggml_new_tensor_1d(ctx, GGML_TYPE_F32, in_channels);
norm1_b = ggml_new_tensor_1d(ctx, GGML_TYPE_F32, in_channels);
conv1_w = ggml_new_tensor_4d(ctx, GGML_TYPE_F16, 3, 3, in_channels, out_channels);
conv1_b = ggml_new_tensor_1d(ctx, GGML_TYPE_F32, out_channels);
norm2_w = ggml_new_tensor_1d(ctx, GGML_TYPE_F32, out_channels);
norm2_b = ggml_new_tensor_1d(ctx, GGML_TYPE_F32, out_channels);
conv2_w = ggml_new_tensor_4d(ctx, GGML_TYPE_F16, 3, 3, out_channels, out_channels);
conv2_b = ggml_new_tensor_1d(ctx, GGML_TYPE_F32, out_channels);
if (out_channels != in_channels) {
nin_shortcut_w = ggml_new_tensor_4d(ctx, GGML_TYPE_F16, 1, 1, in_channels, out_channels);
nin_shortcut_b = ggml_new_tensor_1d(ctx, GGML_TYPE_F32, out_channels);
}
}
|
O3
|
cpp
|
ResnetBlock::init_params(ggml_context*, ggml_type):
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
movslq (%rdi), %rdx
movq %rsi, %rdi
xorl %esi, %esi
callq 0x8d9b7
movq %rax, 0x8(%rbx)
movslq (%rbx), %rdx
movq %r14, %rdi
xorl %esi, %esi
callq 0x8d9b7
movq %rax, 0x10(%rbx)
movslq (%rbx), %r8
movslq 0x4(%rbx), %r9
movl $0x3, %edx
movl $0x3, %ecx
movq %r14, %rdi
movl $0x1, %esi
callq 0x8da20
movq %rax, 0x18(%rbx)
movslq 0x4(%rbx), %rdx
movq %r14, %rdi
xorl %esi, %esi
callq 0x8d9b7
movq %rax, 0x20(%rbx)
movslq 0x4(%rbx), %rdx
movq %r14, %rdi
xorl %esi, %esi
callq 0x8d9b7
movq %rax, 0x28(%rbx)
movslq 0x4(%rbx), %rdx
movq %r14, %rdi
xorl %esi, %esi
callq 0x8d9b7
movq %rax, 0x30(%rbx)
movslq 0x4(%rbx), %r8
movl $0x3, %edx
movl $0x3, %ecx
movq %r14, %rdi
movl $0x1, %esi
movq %r8, %r9
callq 0x8da20
movq %rax, 0x38(%rbx)
movslq 0x4(%rbx), %rdx
movq %r14, %rdi
xorl %esi, %esi
callq 0x8d9b7
movq %rax, 0x40(%rbx)
movslq 0x4(%rbx), %r9
movslq (%rbx), %r8
cmpl %r8d, %r9d
je 0x4433d
movl $0x1, %edx
movl $0x1, %ecx
movq %r14, %rdi
movl $0x1, %esi
callq 0x8da20
movq %rax, 0x48(%rbx)
movslq 0x4(%rbx), %rdx
movq %r14, %rdi
xorl %esi, %esi
callq 0x8d9b7
movq %rax, 0x50(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
nop
|
_ZN11ResnetBlock11init_paramsEP12ggml_context9ggml_type:
push r14
push rbx
push rax
mov r14, rsi
mov rbx, rdi
movsxd rdx, dword ptr [rdi]
mov rdi, rsi
xor esi, esi
call ggml_new_tensor_1d
mov [rbx+8], rax
movsxd rdx, dword ptr [rbx]
mov rdi, r14
xor esi, esi
call ggml_new_tensor_1d
mov [rbx+10h], rax
movsxd r8, dword ptr [rbx]
movsxd r9, dword ptr [rbx+4]
mov edx, 3
mov ecx, 3
mov rdi, r14
mov esi, 1
call ggml_new_tensor_4d
mov [rbx+18h], rax
movsxd rdx, dword ptr [rbx+4]
mov rdi, r14
xor esi, esi
call ggml_new_tensor_1d
mov [rbx+20h], rax
movsxd rdx, dword ptr [rbx+4]
mov rdi, r14
xor esi, esi
call ggml_new_tensor_1d
mov [rbx+28h], rax
movsxd rdx, dword ptr [rbx+4]
mov rdi, r14
xor esi, esi
call ggml_new_tensor_1d
mov [rbx+30h], rax
movsxd r8, dword ptr [rbx+4]
mov edx, 3
mov ecx, 3
mov rdi, r14
mov esi, 1
mov r9, r8
call ggml_new_tensor_4d
mov [rbx+38h], rax
movsxd rdx, dword ptr [rbx+4]
mov rdi, r14
xor esi, esi
call ggml_new_tensor_1d
mov [rbx+40h], rax
movsxd r9, dword ptr [rbx+4]
movsxd r8, dword ptr [rbx]
cmp r9d, r8d
jz short loc_4433D
mov edx, 1
mov ecx, 1
mov rdi, r14
mov esi, 1
call ggml_new_tensor_4d
mov [rbx+48h], rax
movsxd rdx, dword ptr [rbx+4]
mov rdi, r14
xor esi, esi
call ggml_new_tensor_1d
mov [rbx+50h], rax
loc_4433D:
add rsp, 8
pop rbx
pop r14
retn
|
long long ResnetBlock::init_params(int *a1, long long a2)
{
long long result; // rax
long long v3; // r9
long long v4; // r8
*((_QWORD *)a1 + 1) = ggml_new_tensor_1d(a2, 0LL, *a1);
*((_QWORD *)a1 + 2) = ggml_new_tensor_1d(a2, 0LL, *a1);
*((_QWORD *)a1 + 3) = ggml_new_tensor_4d(a2, 1LL, 3LL, 3LL, *a1, a1[1]);
*((_QWORD *)a1 + 4) = ggml_new_tensor_1d(a2, 0LL, a1[1]);
*((_QWORD *)a1 + 5) = ggml_new_tensor_1d(a2, 0LL, a1[1]);
*((_QWORD *)a1 + 6) = ggml_new_tensor_1d(a2, 0LL, a1[1]);
*((_QWORD *)a1 + 7) = ggml_new_tensor_4d(a2, 1LL, 3LL, 3LL, a1[1], a1[1]);
result = ggml_new_tensor_1d(a2, 0LL, a1[1]);
*((_QWORD *)a1 + 8) = result;
v3 = a1[1];
v4 = *a1;
if ( (_DWORD)v3 != (_DWORD)v4 )
{
*((_QWORD *)a1 + 9) = ggml_new_tensor_4d(a2, 1LL, 1LL, 1LL, v4, v3);
result = ggml_new_tensor_1d(a2, 0LL, a1[1]);
*((_QWORD *)a1 + 10) = result;
}
return result;
}
| |||
64,312 |
ma_zlib_decompress
|
eloqsql/libmariadb/plugins/compress/c_zlib.c
|
my_bool ma_zlib_decompress(ma_compress_ctx *ctx, void *dst, size_t *dst_len,
void *source, size_t *source_len)
{
int rc;
if (!ctx)
return 1;
rc= uncompress((Bytef*) dst, (uLongf *)dst_len, (Bytef*) source, (uLongf)*source_len);
if (rc != Z_OK)
return 1;
return 0;
}
|
O0
|
c
|
ma_zlib_decompress:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
movq %r8, -0x30(%rbp)
cmpq $0x0, -0x10(%rbp)
jne 0x3e0b9
movb $0x1, -0x1(%rbp)
jmp 0x3e0e4
movq -0x18(%rbp), %rdi
movq -0x20(%rbp), %rsi
movq -0x28(%rbp), %rdx
movq -0x30(%rbp), %rax
movq (%rax), %rcx
callq 0x12170
movl %eax, -0x34(%rbp)
cmpl $0x0, -0x34(%rbp)
je 0x3e0e0
movb $0x1, -0x1(%rbp)
jmp 0x3e0e4
movb $0x0, -0x1(%rbp)
movb -0x1(%rbp), %al
addq $0x40, %rsp
popq %rbp
retq
nopl (%rax)
|
ma_zlib_decompress:
push rbp
mov rbp, rsp
sub rsp, 40h
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov [rbp+var_20], rdx
mov [rbp+var_28], rcx
mov [rbp+var_30], r8
cmp [rbp+var_10], 0
jnz short loc_3E0B9
mov [rbp+var_1], 1
jmp short loc_3E0E4
loc_3E0B9:
mov rdi, [rbp+var_18]
mov rsi, [rbp+var_20]
mov rdx, [rbp+var_28]
mov rax, [rbp+var_30]
mov rcx, [rax]
call _uncompress
mov [rbp+var_34], eax
cmp [rbp+var_34], 0
jz short loc_3E0E0
mov [rbp+var_1], 1
jmp short loc_3E0E4
loc_3E0E0:
mov [rbp+var_1], 0
loc_3E0E4:
mov al, [rbp+var_1]
add rsp, 40h
pop rbp
retn
|
bool ma_zlib_decompress(long long a1, long long a2, long long a3, long long a4, _QWORD *a5)
{
return !a1 || (unsigned int)uncompress(a2, a3, a4, *a5) != 0;
}
|
ma_zlib_decompress:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x40
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x18],RSI
MOV qword ptr [RBP + -0x20],RDX
MOV qword ptr [RBP + -0x28],RCX
MOV qword ptr [RBP + -0x30],R8
CMP qword ptr [RBP + -0x10],0x0
JNZ 0x0013e0b9
MOV byte ptr [RBP + -0x1],0x1
JMP 0x0013e0e4
LAB_0013e0b9:
MOV RDI,qword ptr [RBP + -0x18]
MOV RSI,qword ptr [RBP + -0x20]
MOV RDX,qword ptr [RBP + -0x28]
MOV RAX,qword ptr [RBP + -0x30]
MOV RCX,qword ptr [RAX]
CALL 0x00112170
MOV dword ptr [RBP + -0x34],EAX
CMP dword ptr [RBP + -0x34],0x0
JZ 0x0013e0e0
MOV byte ptr [RBP + -0x1],0x1
JMP 0x0013e0e4
LAB_0013e0e0:
MOV byte ptr [RBP + -0x1],0x0
LAB_0013e0e4:
MOV AL,byte ptr [RBP + -0x1]
ADD RSP,0x40
POP RBP
RET
|
int1
ma_zlib_decompress(long param_1,int8 param_2,int8 param_3,int8 param_4,
int8 *param_5)
{
int iVar1;
int1 local_9;
if (param_1 == 0) {
local_9 = 1;
}
else {
iVar1 = uncompress(param_2,param_3,param_4,*param_5);
if (iVar1 == 0) {
local_9 = 0;
}
else {
local_9 = 1;
}
}
return local_9;
}
|
|
64,313 |
LefDefParser::defwSpecialNetSpacing(char const*, int, double, double)
|
Efficient-TDP/thirdparty/Limbo/limbo/thirdparty/lefdef/5.8/def/def/defwWriter.cpp
|
int
defwSpecialNetSpacing(const char *layer,
int spacing,
double minwidth,
double maxwidth)
{
defwFunc = DEFW_SNET; // Current function of writer
if (!defwFile)
return DEFW_UNINITIALIZED;
if (!defwSpecialNetOptions())
return DEFW_BAD_ORDER;
fprintf(defwFile, "\n + SPACING %s %d", layer, spacing);
if (minwidth || maxwidth)
fprintf(defwFile, " RANGE %.11g %.11g", minwidth, maxwidth);
defwLines++;
return DEFW_OK;
}
|
O0
|
cpp
|
LefDefParser::defwSpecialNetSpacing(char const*, int, double, double):
subq $0x28, %rsp
movq %rdi, 0x18(%rsp)
movl %esi, 0x14(%rsp)
movsd %xmm0, 0x8(%rsp)
movsd %xmm1, (%rsp)
leaq 0x13929(%rip), %rax # 0x2b168
movl $0x32, (%rax)
leaq 0x1390c(%rip), %rax # 0x2b158
cmpq $0x0, (%rax)
jne 0x1785f
movl $0x1, 0x24(%rsp)
jmp 0x178fa
callq 0x174e0
cmpl $0x0, %eax
jne 0x17876
movl $0x2, 0x24(%rsp)
jmp 0x178fa
leaq 0x138db(%rip), %rax # 0x2b158
movq (%rax), %rdi
movq 0x18(%rsp), %rdx
movl 0x14(%rsp), %ecx
leaq 0xd1b0(%rip), %rsi # 0x24a40
movb $0x0, %al
callq 0x10f0
movsd 0x8(%rsp), %xmm0
xorps %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jne 0x178ba
jp 0x178ba
movsd (%rsp), %xmm0
xorps %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jne 0x178ba
jp 0x178ba
jmp 0x178dd
leaq 0x13897(%rip), %rax # 0x2b158
movq (%rax), %rdi
movsd 0x8(%rsp), %xmm0
movsd (%rsp), %xmm1
leaq 0xd181(%rip), %rsi # 0x24a57
movb $0x2, %al
callq 0x10f0
leaq 0x1387c(%rip), %rax # 0x2b160
movl (%rax), %ecx
addl $0x1, %ecx
leaq 0x13870(%rip), %rax # 0x2b160
movl %ecx, (%rax)
movl $0x0, 0x24(%rsp)
movl 0x24(%rsp), %eax
addq $0x28, %rsp
retq
nopw %cs:(%rax,%rax)
|
_ZN12LefDefParser21defwSpecialNetSpacingEPKcidd:
sub rsp, 28h
mov [rsp+28h+var_10], rdi
mov [rsp+28h+var_14], esi
movsd [rsp+28h+var_20], xmm0
movsd [rsp+28h+var_28], xmm1
lea rax, _ZN12LefDefParser8defwFuncE; LefDefParser::defwFunc
mov dword ptr [rax], 32h ; '2'
lea rax, _ZN12LefDefParser8defwFileE; LefDefParser::defwFile
cmp qword ptr [rax], 0
jnz short loc_1785F
mov [rsp+28h+var_4], 1
jmp loc_178FA
loc_1785F:
call _ZN12LefDefParser21defwSpecialNetOptionsEv; LefDefParser::defwSpecialNetOptions(void)
cmp eax, 0
jnz short loc_17876
mov [rsp+28h+var_4], 2
jmp loc_178FA
loc_17876:
lea rax, _ZN12LefDefParser8defwFileE; LefDefParser::defwFile
mov rdi, [rax]
mov rdx, [rsp+28h+var_10]
mov ecx, [rsp+28h+var_14]
lea rsi, aSpacingSD; "\n + SPACING %s %d"
mov al, 0
call _fprintf
movsd xmm0, [rsp+28h+var_20]
xorps xmm1, xmm1
ucomisd xmm0, xmm1
jnz short loc_178BA
jp short loc_178BA
movsd xmm0, [rsp+28h+var_28]
xorps xmm1, xmm1
ucomisd xmm0, xmm1
jnz short loc_178BA
jp short loc_178BA
jmp short loc_178DD
loc_178BA:
lea rax, _ZN12LefDefParser8defwFileE; LefDefParser::defwFile
mov rdi, [rax]
movsd xmm0, [rsp+28h+var_20]
movsd xmm1, [rsp+28h+var_28]
lea rsi, aRange11g11g_0; " RANGE %.11g %.11g"
mov al, 2
call _fprintf
loc_178DD:
lea rax, _ZN12LefDefParser9defwLinesE; LefDefParser::defwLines
mov ecx, [rax]
add ecx, 1
lea rax, _ZN12LefDefParser9defwLinesE; LefDefParser::defwLines
mov [rax], ecx
mov [rsp+28h+var_4], 0
loc_178FA:
mov eax, [rsp+28h+var_4]
add rsp, 28h
retn
|
long long LefDefParser::defwSpecialNetSpacing(LefDefParser *this, const char *a2, double a3, double a4)
{
LefDefParser::defwFunc = 50;
if ( LefDefParser::defwFile )
{
if ( LefDefParser::defwSpecialNetOptions(this) )
{
fprintf(LefDefParser::defwFile, "\n + SPACING %s %d", (const char *)this, (_DWORD)a2);
if ( a3 != 0.0 || a4 != 0.0 )
fprintf(LefDefParser::defwFile, " RANGE %.11g %.11g", a3, a4);
++LefDefParser::defwLines;
return 0;
}
else
{
return 2;
}
}
else
{
return 1;
}
}
|
defwSpecialNetSpacing:
SUB RSP,0x28
MOV qword ptr [RSP + 0x18],RDI
MOV dword ptr [RSP + 0x14],ESI
MOVSD qword ptr [RSP + 0x8],XMM0
MOVSD qword ptr [RSP],XMM1
LEA RAX,[0x12b168]
MOV dword ptr [RAX],0x32
LEA RAX,[0x12b158]
CMP qword ptr [RAX],0x0
JNZ 0x0011785f
MOV dword ptr [RSP + 0x24],0x1
JMP 0x001178fa
LAB_0011785f:
CALL 0x001174e0
CMP EAX,0x0
JNZ 0x00117876
MOV dword ptr [RSP + 0x24],0x2
JMP 0x001178fa
LAB_00117876:
LEA RAX,[0x12b158]
MOV RDI,qword ptr [RAX]
MOV RDX,qword ptr [RSP + 0x18]
MOV ECX,dword ptr [RSP + 0x14]
LEA RSI,[0x124a40]
MOV AL,0x0
CALL 0x001010f0
MOVSD XMM0,qword ptr [RSP + 0x8]
XORPS XMM1,XMM1
UCOMISD XMM0,XMM1
JNZ 0x001178ba
JP 0x001178ba
MOVSD XMM0,qword ptr [RSP]
XORPS XMM1,XMM1
UCOMISD XMM0,XMM1
JNZ 0x001178ba
JP 0x001178ba
JMP 0x001178dd
LAB_001178ba:
LEA RAX,[0x12b158]
MOV RDI,qword ptr [RAX]
MOVSD XMM0,qword ptr [RSP + 0x8]
MOVSD XMM1,qword ptr [RSP]
LEA RSI,[0x124a57]
MOV AL,0x2
CALL 0x001010f0
LAB_001178dd:
LEA RAX,[0x12b160]
MOV ECX,dword ptr [RAX]
ADD ECX,0x1
LEA RAX,[0x12b160]
MOV dword ptr [RAX],ECX
MOV dword ptr [RSP + 0x24],0x0
LAB_001178fa:
MOV EAX,dword ptr [RSP + 0x24]
ADD RSP,0x28
RET
|
/* LefDefParser::defwSpecialNetSpacing(char const*, int, double, double) */
int4
LefDefParser::defwSpecialNetSpacing(char *param_1,int param_2,double param_3,double param_4)
{
int iVar1;
int4 local_4;
defwFunc = 0x32;
if (defwFile == (FILE *)0x0) {
local_4 = 1;
}
else {
iVar1 = defwSpecialNetOptions();
if (iVar1 == 0) {
local_4 = 2;
}
else {
fprintf(defwFile,"\n + SPACING %s %d",param_1,(ulong)(uint)param_2);
if ((((param_3 != 0.0) || (NAN(param_3))) || (param_4 != 0.0)) || (NAN(param_4))) {
fprintf(defwFile," RANGE %.11g %.11g",param_3,param_4);
}
defwLines = defwLines + 1;
local_4 = 0;
}
}
return local_4;
}
|
|
64,314 |
LefDefParser::defwSpecialNetSpacing(char const*, int, double, double)
|
Efficient-TDP/thirdparty/Limbo/limbo/thirdparty/lefdef/5.8/def/def/defwWriter.cpp
|
int
defwSpecialNetSpacing(const char *layer,
int spacing,
double minwidth,
double maxwidth)
{
defwFunc = DEFW_SNET; // Current function of writer
if (!defwFile)
return DEFW_UNINITIALIZED;
if (!defwSpecialNetOptions())
return DEFW_BAD_ORDER;
fprintf(defwFile, "\n + SPACING %s %d", layer, spacing);
if (minwidth || maxwidth)
fprintf(defwFile, " RANGE %.11g %.11g", minwidth, maxwidth);
defwLines++;
return DEFW_OK;
}
|
O3
|
cpp
|
LefDefParser::defwSpecialNetSpacing(char const*, int, double, double):
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rdx
leaq 0x12418(%rip), %rax # 0x1e178
movl $0x32, (%rax)
leaq 0x123fb(%rip), %rbx # 0x1e168
movq (%rbx), %rdi
testq %rdi, %rdi
je 0xbdee
movl %esi, %ecx
leaq 0x123f6(%rip), %rsi # 0x1e174
movl (%rsi), %r8d
cmpl $0x33, %r8d
je 0xbd98
movl $0x2, %eax
cmpl $0x32, %r8d
jne 0xbdf3
movl $0x33, (%rsi)
leaq 0x9de0(%rip), %rsi # 0x15b7f
xorl %eax, %eax
movsd %xmm1, 0x8(%rsp)
movsd %xmm0, (%rsp)
callq 0x10e0
movsd (%rsp), %xmm0
movsd 0x8(%rsp), %xmm1
xorpd %xmm2, %xmm2
ucomisd %xmm2, %xmm0
jne 0xbdd0
jp 0xbdd0
ucomisd %xmm2, %xmm1
jne 0xbdd0
jnp 0xbde1
movq (%rbx), %rdi
leaq 0x9dbc(%rip), %rsi # 0x15b96
movb $0x2, %al
callq 0x10e0
leaq 0x12388(%rip), %rax # 0x1e170
incl (%rax)
xorl %eax, %eax
jmp 0xbdf3
movl $0x1, %eax
addq $0x10, %rsp
popq %rbx
retq
|
_ZN12LefDefParser21defwSpecialNetSpacingEPKcidd:
push rbx
sub rsp, 10h
mov rdx, rdi
lea rax, _ZN12LefDefParser8defwFuncE; LefDefParser::defwFunc
mov dword ptr [rax], 32h ; '2'
lea rbx, _ZN12LefDefParser8defwFileE; LefDefParser::defwFile
mov rdi, [rbx]
test rdi, rdi
jz short loc_BDEE
mov ecx, esi
lea rsi, _ZN12LefDefParser9defwStateE; LefDefParser::defwState
mov r8d, [rsi]
cmp r8d, 33h ; '3'
jz short loc_BD98
mov eax, 2
cmp r8d, 32h ; '2'
jnz short loc_BDF3
mov dword ptr [rsi], 33h ; '3'
loc_BD98:
lea rsi, aSpacingSD; "\n + SPACING %s %d"
xor eax, eax
movsd [rsp+18h+var_10], xmm1
movsd [rsp+18h+var_18], xmm0
call _fprintf
movsd xmm0, [rsp+18h+var_18]
movsd xmm1, [rsp+18h+var_10]
xorpd xmm2, xmm2
ucomisd xmm0, xmm2
jnz short loc_BDD0
jp short loc_BDD0
ucomisd xmm1, xmm2
jnz short loc_BDD0
jnp short loc_BDE1
loc_BDD0:
mov rdi, [rbx]
lea rsi, aRange11g11g_0; " RANGE %.11g %.11g"
mov al, 2
call _fprintf
loc_BDE1:
lea rax, _ZN12LefDefParser9defwLinesE; LefDefParser::defwLines
inc dword ptr [rax]
xor eax, eax
jmp short loc_BDF3
loc_BDEE:
mov eax, 1
loc_BDF3:
add rsp, 10h
pop rbx
retn
|
long long LefDefParser::defwSpecialNetSpacing(LefDefParser *this, const char *a2, double a3, double a4)
{
long long result; // rax
LefDefParser::defwFunc = 50;
if ( !LefDefParser::defwFile )
return 1LL;
if ( LefDefParser::defwState != 51 )
{
result = 2LL;
if ( LefDefParser::defwState != 50 )
return result;
LefDefParser::defwState = 51;
}
fprintf(LefDefParser::defwFile, "\n + SPACING %s %d", (const char *)this, (_DWORD)a2);
if ( a3 != 0.0 || a4 != 0.0 )
fprintf(LefDefParser::defwFile, " RANGE %.11g %.11g", a3, a4);
++LefDefParser::defwLines;
return 0LL;
}
|
defwSpecialNetSpacing:
PUSH RBX
SUB RSP,0x10
MOV RDX,RDI
LEA RAX,[0x11e178]
MOV dword ptr [RAX],0x32
LEA RBX,[0x11e168]
MOV RDI,qword ptr [RBX]
TEST RDI,RDI
JZ 0x0010bdee
MOV ECX,ESI
LEA RSI,[0x11e174]
MOV R8D,dword ptr [RSI]
CMP R8D,0x33
JZ 0x0010bd98
MOV EAX,0x2
CMP R8D,0x32
JNZ 0x0010bdf3
MOV dword ptr [RSI],0x33
LAB_0010bd98:
LEA RSI,[0x115b7f]
XOR EAX,EAX
MOVSD qword ptr [RSP + 0x8],XMM1
MOVSD qword ptr [RSP],XMM0
CALL 0x001010e0
MOVSD XMM0,qword ptr [RSP]
MOVSD XMM1,qword ptr [RSP + 0x8]
XORPD XMM2,XMM2
UCOMISD XMM0,XMM2
JNZ 0x0010bdd0
JP 0x0010bdd0
UCOMISD XMM1,XMM2
JNZ 0x0010bdd0
JNP 0x0010bde1
LAB_0010bdd0:
MOV RDI,qword ptr [RBX]
LEA RSI,[0x115b96]
MOV AL,0x2
CALL 0x001010e0
LAB_0010bde1:
LEA RAX,[0x11e170]
INC dword ptr [RAX]
XOR EAX,EAX
JMP 0x0010bdf3
LAB_0010bdee:
MOV EAX,0x1
LAB_0010bdf3:
ADD RSP,0x10
POP RBX
RET
|
/* LefDefParser::defwSpecialNetSpacing(char const*, int, double, double) */
int8
LefDefParser::defwSpecialNetSpacing(char *param_1,int param_2,double param_3,double param_4)
{
int8 uVar1;
defwFunc = 0x32;
if (defwFile == (FILE *)0x0) {
uVar1 = 1;
}
else {
if (defwState != 0x33) {
if (defwState != 0x32) {
defwFunc = 0x32;
return 2;
}
defwState = 0x33;
}
fprintf(defwFile,"\n + SPACING %s %d",param_1,param_2);
if ((((param_3 != 0.0) || (NAN(param_3))) || (param_4 != 0.0)) || (NAN(param_4))) {
fprintf(defwFile," RANGE %.11g %.11g");
}
defwLines = defwLines + 1;
uVar1 = 0;
}
return uVar1;
}
|
|
64,315 |
close_cached_file
|
eloqsql/mysys/mf_cache.c
|
void close_cached_file(IO_CACHE *cache)
{
DBUG_ENTER("close_cached_file");
if (my_b_inited(cache))
{
File file=cache->file;
cache->file= -1; /* Don't flush data */
(void) end_io_cache(cache);
if (file >= 0)
{
(void) my_close(file,MYF(0));
#ifdef CANT_DELETE_OPEN_FILES
if (cache->file_name)
{
(void) my_delete(cache->file_name, MYF(MY_WME));
my_free(cache->file_name);
}
#endif
}
}
DBUG_VOID_RETURN;
}
|
O3
|
c
|
close_cached_file:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
cmpq $0x0, 0x20(%rdi)
je 0xb3971
movl 0xd4(%rdi), %ebx
movl $0xffffffff, 0xd4(%rdi) # imm = 0xFFFFFFFF
callq 0x9dc1b
testl %ebx, %ebx
js 0xb3971
movl %ebx, %edi
xorl %esi, %esi
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0xaa941
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
|
close_cached_file:
push rbp
mov rbp, rsp
push rbx
push rax
cmp qword ptr [rdi+20h], 0
jz short loc_B3971
mov ebx, [rdi+0D4h]
mov dword ptr [rdi+0D4h], 0FFFFFFFFh
call end_io_cache
test ebx, ebx
js short loc_B3971
mov edi, ebx
xor esi, esi
add rsp, 8
pop rbx
pop rbp
jmp my_close
loc_B3971:
add rsp, 8
pop rbx
pop rbp
retn
|
long long close_cached_file(long long a1)
{
int v1; // ebx
long long result; // rax
if ( *(_QWORD *)(a1 + 32) )
{
v1 = *(_DWORD *)(a1 + 212);
*(_DWORD *)(a1 + 212) = -1;
result = end_io_cache(a1);
if ( v1 >= 0 )
return my_close((unsigned int)v1, 0);
}
return result;
}
|
close_cached_file:
PUSH RBP
MOV RBP,RSP
PUSH RBX
PUSH RAX
CMP qword ptr [RDI + 0x20],0x0
JZ 0x001b3971
MOV EBX,dword ptr [RDI + 0xd4]
MOV dword ptr [RDI + 0xd4],0xffffffff
CALL 0x0019dc1b
TEST EBX,EBX
JS 0x001b3971
MOV EDI,EBX
XOR ESI,ESI
ADD RSP,0x8
POP RBX
POP RBP
JMP 0x001aa941
LAB_001b3971:
ADD RSP,0x8
POP RBX
POP RBP
RET
|
void close_cached_file(long param_1)
{
int iVar1;
if (*(long *)(param_1 + 0x20) != 0) {
iVar1 = *(int *)(param_1 + 0xd4);
*(int4 *)(param_1 + 0xd4) = 0xffffffff;
end_io_cache();
if (-1 < iVar1) {
my_close(iVar1,0);
return;
}
}
return;
}
|
|
64,316 |
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 0x19af0
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 0x19080
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 0x8fed6
movq 0x78(%rbx), %r12
movq 0x80(%rbx), %r13
cmpq %r13, %r12
je 0x8fe72
leaq 0x10(%r12), %rdi
movl $0x100, %esi # imm = 0x100
callq 0x48f80
addq $0x30, %r12
jmp 0x8fe58
xorps %xmm0, %xmm0
movups %xmm0, 0x90(%rbx)
movq %rbx, %rdi
callq 0x8f8f4
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
jmp 0x8fe90
movq %rax, %r12
leaq 0xb0(%rbx), %rax
movq (%rax), %rdi
testq %rdi, %rdi
je 0x8feb1
movq 0xc0(%rbx), %rsi
subq %rdi, %rsi
callq 0x197f0
movq %r15, %rdi
callq 0x8ff18
movq %r14, %rdi
callq 0x19e20
cmpq $0x0, 0x28(%rbx)
jne 0x8fed0
movq %r12, %rdi
callq 0x19dc0
callq 0x191a0
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_8FE58:
cmp r12, r13
jz short loc_8FE72
lea rdi, [r12+10h]
mov esi, 100h
call _ZNSt6vectorIcSaIcEE6resizeEm; std::vector<char>::resize(ulong)
add r12, 30h ; '0'
jmp short loc_8FE58
loc_8FE72:
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_8FE90:
mov r12, rax
lea rax, [rbx+0B0h]
mov rdi, [rax]; void *
test rdi, rdi
jz short loc_8FEB1
mov rsi, [rbx+0C0h]
sub rsi, rdi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_8FEB1:
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_8FED0
mov rdi, r12
call __Unwind_Resume
loc_8FED0:
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 0x00119af0
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 0x00119080
MOV RCX,0x20c49ba5e353f7cf
IMUL RCX
MOV RAX,RDX
SHR RAX,0x3f
SAR RDX,0x7
ADD RDX,RAX
MOV qword ptr [RBX + 0x70],RDX
LAB_0018fe42:
MOV RDI,R15
MOV RSI,R12
CALL 0x0018fed6
MOV R12,qword ptr [RBX + 0x78]
MOV R13,qword ptr [RBX + 0x80]
LAB_0018fe58:
CMP R12,R13
JZ 0x0018fe72
LEA RDI,[R12 + 0x10]
LAB_0018fe62:
MOV ESI,0x100
CALL 0x00148f80
ADD R12,0x30
JMP 0x0018fe58
LAB_0018fe72:
XORPS XMM0,XMM0
MOVUPS xmmword ptr [RBX + 0x90],XMM0
LAB_0018fe7c:
MOV RDI,RBX
CALL 0x0018f8f4
LAB_0018fe84:
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 0018fe42 to 0018fe4c has its CatchHandler @ 0018fe8e */
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 0018fe62 to 0018fe6b has its CatchHandler @ 0018fe90 */
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 0018fe7c to 0018fe83 has its CatchHandler @ 0018fe8e */
resume(this);
return;
}
|
|
64,317 |
ma_get_bitmap_description
|
eloqsql/storage/maria/ma_bitmap.c
|
size_t _ma_get_bitmap_description(MARIA_FILE_BITMAP *bitmap,
uchar *bitmap_data,
pgcache_page_no_t page,
char *out)
{
uchar *pos, *end;
size_t count=0, dot_printed= 0, len;
char buff[80], last[80];
page++;
last[0]=0;
for (pos= bitmap_data, end= pos+ bitmap->used_size ; pos < end ; pos+= 6)
{
ulonglong bits= uint6korr(pos); /* 6 bytes = 6*8/3= 16 patterns */
uint i;
for (i= 0; i < 16 ; i++, bits>>= 3)
{
if (count > 60)
{
if (memcmp(buff, last, count))
{
memcpy(last, buff, count);
len= sprintf(out, "%8lu: ", (ulong) (page - count));
memcpy(out+len, buff, count);
out+= len + count + 1;
out[-1]= '\n';
dot_printed= 0;
}
else if (!(dot_printed++))
{
out= strmov(out, "...\n");
}
count= 0;
}
buff[count++]= '0' + (uint) (bits & 7);
page++;
}
}
len= sprintf(out, "%8lu: ", (ulong) (page - count));
memcpy(out+len, buff, count);
out[len + count]= '\n';
out[len + count + 1]= 0;
return len + count + 1;
}
|
O3
|
c
|
ma_get_bitmap_description:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xc8, %rsp
movq %rcx, -0xd8(%rbp)
movq %rdx, %r14
movq %fs:0x28, %rax
movq %rax, -0x30(%rbp)
incq %r14
movb $0x0, -0xd0(%rbp)
movl 0x24(%rdi), %eax
testq %rax, %rax
je 0x5306e
addq %rsi, %rax
leaq -0x80(%rbp), %rbx
leaq -0xd0(%rbp), %rcx
xorl %edx, %edx
xorl %r12d, %r12d
movq %rax, -0xe8(%rbp)
movl (%rsi), %eax
movq %rsi, -0xf0(%rbp)
movzwl 0x4(%rsi), %r15d
shlq $0x20, %r15
orq %rax, %r15
movl $0x10, %r13d
cmpq $0x3d, %r12
jb 0x53032
movq %rdx, -0xe0(%rbp)
movq %rbx, %rdi
movq %rcx, %rsi
movq %r12, %rdx
callq 0x29560
testl %eax, %eax
je 0x52ff6
movl $0x50, %ecx
leaq -0xd0(%rbp), %rdi
movq %rbx, %rsi
movq %r12, %rdx
callq 0x29410
movq %r14, %r8
subq %r12, %r8
movq -0xd8(%rbp), %rdi
movl $0x1, %esi
movq $-0x1, %rdx
leaq 0x8765a(%rip), %rcx # 0xda5fc
xorl %eax, %eax
callq 0x29950
movslq %eax, %rcx
movq %rcx, -0xe0(%rbp)
movq -0xd8(%rbp), %rax
leaq (%rax,%rcx), %rdi
movq %rbx, %rsi
movq %r12, %rdx
callq 0x29080
addq -0xe0(%rbp), %r12
movq -0xd8(%rbp), %rax
addq %r12, %rax
incq %rax
movq %rax, -0xd8(%rbp)
movb $0xa, -0x1(%rax)
xorl %r12d, %r12d
xorl %edx, %edx
leaq -0xd0(%rbp), %rcx
jmp 0x53032
leaq -0xd0(%rbp), %rcx
movq -0xe0(%rbp), %rdx
testq %rdx, %rdx
je 0x5300e
incq %rdx
jmp 0x5302f
movq -0xd8(%rbp), %rax
movb $0x0, 0x4(%rax)
movl $0xa2e2e2e, (%rax) # imm = 0xA2E2E2E
addq $0x4, %rax
movl $0x1, %edx
movq %rax, -0xd8(%rbp)
xorl %r12d, %r12d
movl %r15d, %eax
andb $0x7, %al
orb $0x30, %al
movb %al, -0x80(%rbp,%r12)
incq %r12
incq %r14
shrq $0x3, %r15
decl %r13d
jne 0x52f44
movq -0xf0(%rbp), %rsi
addq $0x6, %rsi
movq -0xe8(%rbp), %rax
cmpq %rax, %rsi
jb 0x52f29
jmp 0x53071
xorl %r12d, %r12d
subq %r12, %r14
leaq 0x87581(%rip), %rcx # 0xda5fc
movq -0xd8(%rbp), %rbx
movq %rbx, %rdi
movl $0x1, %esi
movq $-0x1, %rdx
movq %r14, %r8
xorl %eax, %eax
callq 0x29950
movslq %eax, %r14
leaq (%rbx,%r14), %rdi
leaq -0x80(%rbp), %rsi
movq %r12, %rdx
callq 0x29080
leaq (%r12,%r14), %rax
movw $0xa, (%rbx,%rax)
movq %fs:0x28, %rax
cmpq -0x30(%rbp), %rax
jne 0x530e0
leaq (%r12,%r14), %rax
incq %rax
addq $0xc8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0x29250
|
_ma_get_bitmap_description:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 0C8h
mov [rbp+var_D8], rcx
mov r14, rdx
mov rax, fs:28h
mov [rbp+var_30], rax
inc r14
mov [rbp+var_D0], 0
mov eax, [rdi+24h]
test rax, rax
jz loc_5306E
add rax, rsi
lea rbx, [rbp+var_80]
lea rcx, [rbp+var_D0]
xor edx, edx
xor r12d, r12d
mov [rbp+var_E8], rax
loc_52F29:
mov eax, [rsi]
mov [rbp+var_F0], rsi
movzx r15d, word ptr [rsi+4]
shl r15, 20h
or r15, rax
mov r13d, 10h
loc_52F44:
cmp r12, 3Dh ; '='
jb loc_53032
mov [rbp+var_E0], rdx
mov rdi, rbx
mov rsi, rcx
mov rdx, r12
call _bcmp
test eax, eax
jz loc_52FF6
mov ecx, 50h ; 'P'
lea rdi, [rbp+var_D0]
mov rsi, rbx
mov rdx, r12
call ___memcpy_chk
mov r8, r14
sub r8, r12
mov rdi, [rbp+var_D8]
mov esi, 1
mov rdx, 0FFFFFFFFFFFFFFFFh
lea rcx, a8lu; "%8lu: "
xor eax, eax
call ___sprintf_chk
movsxd rcx, eax
mov [rbp+var_E0], rcx
mov rax, [rbp+var_D8]
lea rdi, [rax+rcx]
mov rsi, rbx
mov rdx, r12
call _memcpy
add r12, [rbp+var_E0]
mov rax, [rbp+var_D8]
add rax, r12
inc rax
mov [rbp+var_D8], rax
mov byte ptr [rax-1], 0Ah
xor r12d, r12d
xor edx, edx
lea rcx, [rbp+var_D0]
jmp short loc_53032
loc_52FF6:
lea rcx, [rbp+var_D0]
mov rdx, [rbp+var_E0]
test rdx, rdx
jz short loc_5300E
inc rdx
jmp short loc_5302F
loc_5300E:
mov rax, [rbp+var_D8]
mov byte ptr [rax+4], 0
mov dword ptr [rax], 0A2E2E2Eh
add rax, 4
mov edx, 1
mov [rbp+var_D8], rax
loc_5302F:
xor r12d, r12d
loc_53032:
mov eax, r15d
and al, 7
or al, 30h
mov [rbp+r12+var_80], al
inc r12
inc r14
shr r15, 3
dec r13d
jnz loc_52F44
mov rsi, [rbp+var_F0]
add rsi, 6
mov rax, [rbp+var_E8]
cmp rsi, rax
jb loc_52F29
jmp short loc_53071
loc_5306E:
xor r12d, r12d
loc_53071:
sub r14, r12
lea rcx, a8lu; "%8lu: "
mov rbx, [rbp+var_D8]
mov rdi, rbx
mov esi, 1
mov rdx, 0FFFFFFFFFFFFFFFFh
mov r8, r14
xor eax, eax
call ___sprintf_chk
movsxd r14, eax
lea rdi, [rbx+r14]
lea rsi, [rbp+var_80]
mov rdx, r12
call _memcpy
lea rax, [r12+r14]
mov word ptr [rbx+rax], 0Ah
mov rax, fs:28h
cmp rax, [rbp+var_30]
jnz short loc_530E0
lea rax, [r12+r14]
inc rax
add rsp, 0C8h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_530E0:
call ___stack_chk_fail
|
long long ma_get_bitmap_description(long long a1, unsigned int *a2, long long a3, char *a4)
{
long long v4; // r14
long long v5; // rdx
unsigned long long v6; // r12
unsigned long long v7; // r15
int v8; // r13d
long long v9; // r14
unsigned int *v11; // [rsp+0h] [rbp-F0h]
unsigned long long v12; // [rsp+8h] [rbp-E8h]
long long v13; // [rsp+10h] [rbp-E0h]
long long v14; // [rsp+10h] [rbp-E0h]
_BYTE v16[80]; // [rsp+20h] [rbp-D0h] BYREF
_BYTE v17[80]; // [rsp+70h] [rbp-80h] BYREF
unsigned long long v18; // [rsp+C0h] [rbp-30h]
v18 = __readfsqword(0x28u);
v4 = a3 + 1;
v16[0] = 0;
if ( *(_DWORD *)(a1 + 36) )
{
v5 = 0LL;
v6 = 0LL;
v12 = (unsigned long long)a2 + *(unsigned int *)(a1 + 36);
do
{
v11 = a2;
v7 = *a2 | ((unsigned long long)*((unsigned __int16 *)a2 + 2) << 32);
v8 = 16;
do
{
if ( v6 >= 0x3D )
{
v13 = v5;
if ( (unsigned int)bcmp(v17, v16, v6) )
{
__memcpy_chk(v16, v17, v6, 80LL);
v14 = (int)__sprintf_chk(a4, 1LL, -1LL, "%8lu: ", v4 - v6);
memcpy(&a4[v14], v17, v6);
a4 += v14 + v6 + 1;
*(a4 - 1) = 10;
v6 = 0LL;
v5 = 0LL;
}
else
{
if ( v13 )
{
v5 = v13 + 1;
}
else
{
strcpy(a4, "...\n");
v5 = 1LL;
a4 += 4;
}
v6 = 0LL;
}
}
v17[v6++] = v7 & 7 | 0x30;
++v4;
v7 >>= 3;
--v8;
}
while ( v8 );
a2 = (unsigned int *)((char *)a2 + 6);
}
while ( (unsigned long long)v11 + 6 < v12 );
}
else
{
v6 = 0LL;
}
v9 = (int)__sprintf_chk(a4, 1LL, -1LL, "%8lu: ", v4 - v6);
memcpy(&a4[v9], v17, v6);
*(_WORD *)&a4[v6 + v9] = 10;
return v6 + v9 + 1;
}
|
_ma_get_bitmap_description:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0xc8
MOV qword ptr [RBP + -0xd8],RCX
MOV R14,RDX
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x30],RAX
INC R14
MOV byte ptr [RBP + -0xd0],0x0
MOV EAX,dword ptr [RDI + 0x24]
TEST RAX,RAX
JZ 0x0015306e
ADD RAX,RSI
LEA RBX,[RBP + -0x80]
LEA RCX,[RBP + -0xd0]
XOR EDX,EDX
XOR R12D,R12D
MOV qword ptr [RBP + -0xe8],RAX
LAB_00152f29:
MOV EAX,dword ptr [RSI]
MOV qword ptr [RBP + -0xf0],RSI
MOVZX R15D,word ptr [RSI + 0x4]
SHL R15,0x20
OR R15,RAX
MOV R13D,0x10
LAB_00152f44:
CMP R12,0x3d
JC 0x00153032
MOV qword ptr [RBP + -0xe0],RDX
MOV RDI,RBX
MOV RSI,RCX
MOV RDX,R12
CALL 0x00129560
TEST EAX,EAX
JZ 0x00152ff6
MOV ECX,0x50
LEA RDI,[RBP + -0xd0]
MOV RSI,RBX
MOV RDX,R12
CALL 0x00129410
MOV R8,R14
SUB R8,R12
MOV RDI,qword ptr [RBP + -0xd8]
MOV ESI,0x1
MOV RDX,-0x1
LEA RCX,[0x1da5fc]
XOR EAX,EAX
CALL 0x00129950
MOVSXD RCX,EAX
MOV qword ptr [RBP + -0xe0],RCX
MOV RAX,qword ptr [RBP + -0xd8]
LEA RDI,[RAX + RCX*0x1]
MOV RSI,RBX
MOV RDX,R12
CALL 0x00129080
ADD R12,qword ptr [RBP + -0xe0]
MOV RAX,qword ptr [RBP + -0xd8]
ADD RAX,R12
INC RAX
MOV qword ptr [RBP + -0xd8],RAX
MOV byte ptr [RAX + -0x1],0xa
XOR R12D,R12D
XOR EDX,EDX
LEA RCX,[RBP + -0xd0]
JMP 0x00153032
LAB_00152ff6:
LEA RCX,[RBP + -0xd0]
MOV RDX,qword ptr [RBP + -0xe0]
TEST RDX,RDX
JZ 0x0015300e
INC RDX
JMP 0x0015302f
LAB_0015300e:
MOV RAX,qword ptr [RBP + -0xd8]
MOV byte ptr [RAX + 0x4],0x0
MOV dword ptr [RAX],0xa2e2e2e
ADD RAX,0x4
MOV EDX,0x1
MOV qword ptr [RBP + -0xd8],RAX
LAB_0015302f:
XOR R12D,R12D
LAB_00153032:
MOV EAX,R15D
AND AL,0x7
OR AL,0x30
MOV byte ptr [RBP + R12*0x1 + -0x80],AL
INC R12
INC R14
SHR R15,0x3
DEC R13D
JNZ 0x00152f44
MOV RSI,qword ptr [RBP + -0xf0]
ADD RSI,0x6
MOV RAX,qword ptr [RBP + -0xe8]
CMP RSI,RAX
JC 0x00152f29
JMP 0x00153071
LAB_0015306e:
XOR R12D,R12D
LAB_00153071:
SUB R14,R12
LEA RCX,[0x1da5fc]
MOV RBX,qword ptr [RBP + -0xd8]
MOV RDI,RBX
MOV ESI,0x1
MOV RDX,-0x1
MOV R8,R14
XOR EAX,EAX
CALL 0x00129950
MOVSXD R14,EAX
LEA RDI,[RBX + R14*0x1]
LEA RSI,[RBP + -0x80]
MOV RDX,R12
CALL 0x00129080
LEA RAX,[R12 + R14*0x1]
MOV word ptr [RBX + RAX*0x1],0xa
MOV RAX,qword ptr FS:[0x28]
CMP RAX,qword ptr [RBP + -0x30]
JNZ 0x001530e0
LEA RAX,[R12 + R14*0x1]
INC RAX
ADD RSP,0xc8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_001530e0:
CALL 0x00129250
|
long _ma_get_bitmap_description(long param_1,uint6 *param_2,long param_3,int4 *param_4)
{
int iVar1;
uint6 *puVar2;
int1 *puVar3;
size_t __n;
int iVar4;
long lVar5;
ulong uVar6;
long in_FS_OFFSET;
int4 *local_e0;
int1 local_d8 [80];
byte local_88 [80];
long local_38;
local_38 = *(long *)(in_FS_OFFSET + 0x28);
param_3 = param_3 + 1;
local_d8[0] = 0;
local_e0 = param_4;
if ((ulong)*(uint *)(param_1 + 0x24) == 0) {
__n = 0;
}
else {
puVar2 = (uint6 *)((ulong)*(uint *)(param_1 + 0x24) + (long)param_2);
lVar5 = 0;
__n = 0;
do {
uVar6 = (ulong)*param_2;
iVar4 = 0x10;
do {
if (0x3c < __n) {
iVar1 = bcmp(local_88,local_d8,__n);
if (iVar1 == 0) {
if (lVar5 == 0) {
*(int1 *)(local_e0 + 1) = 0;
*local_e0 = 0xa2e2e2e;
local_e0 = local_e0 + 1;
lVar5 = 1;
}
else {
lVar5 = lVar5 + 1;
}
__n = 0;
}
else {
__memcpy_chk(local_d8,local_88,__n,0x50);
iVar1 = __sprintf_chk(local_e0,1,0xffffffffffffffff,"%8lu: ",param_3 - __n);
memcpy((int1 *)((long)local_e0 + (long)iVar1),local_88,__n);
puVar3 = (int1 *)((long)local_e0 + __n + (long)iVar1);
local_e0 = (int4 *)(puVar3 + 1);
*puVar3 = 10;
__n = 0;
lVar5 = 0;
}
}
local_88[__n] = (byte)uVar6 & 7 | 0x30;
__n = __n + 1;
param_3 = param_3 + 1;
uVar6 = uVar6 >> 3;
iVar4 = iVar4 + -1;
} while (iVar4 != 0);
param_2 = (uint6 *)((long)param_2 + 6);
} while (param_2 < puVar2);
}
iVar4 = __sprintf_chk(local_e0,1,0xffffffffffffffff,"%8lu: ",param_3 - __n);
lVar5 = (long)iVar4;
memcpy((int1 *)((long)local_e0 + lVar5),local_88,__n);
*(int2 *)((long)local_e0 + __n + lVar5) = 10;
if (*(long *)(in_FS_OFFSET + 0x28) != local_38) {
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
return __n + lVar5 + 1;
}
|
|
64,318 |
mysql_stmt_store_result
|
eloqsql/libmariadb/libmariadb/mariadb_stmt.c
|
int STDCALL mysql_stmt_store_result(MYSQL_STMT *stmt)
{
unsigned int last_server_status;
if (!stmt->mysql)
{
SET_CLIENT_STMT_ERROR(stmt, CR_SERVER_LOST, SQLSTATE_UNKNOWN, 0);
return(1);
}
if (!stmt->field_count)
return(0);
/* test_pure_coverage requires checking of error_no */
if (stmt->last_errno)
return(1);
if (stmt->state < MYSQL_STMT_EXECUTED)
{
SET_CLIENT_ERROR(stmt->mysql, CR_COMMANDS_OUT_OF_SYNC, SQLSTATE_UNKNOWN, 0);
SET_CLIENT_STMT_ERROR(stmt, CR_COMMANDS_OUT_OF_SYNC, SQLSTATE_UNKNOWN, 0);
return(1);
}
last_server_status= stmt->mysql->server_status;
/* if stmt is a cursor, we need to tell server to send all rows */
if (stmt->cursor_exists && stmt->mysql->status == MYSQL_STATUS_READY)
{
char buff[STMT_ID_LENGTH + 4];
int4store(buff, stmt->stmt_id);
int4store(buff + STMT_ID_LENGTH, (int)~0);
if (stmt->mysql->methods->db_command(stmt->mysql, COM_STMT_FETCH,
buff, sizeof(buff), 1, stmt))
{
UPDATE_STMT_ERROR(stmt);
return(1);
}
}
else if (stmt->mysql->status != MYSQL_STATUS_STMT_RESULT)
{
SET_CLIENT_ERROR(stmt->mysql, CR_COMMANDS_OUT_OF_SYNC, SQLSTATE_UNKNOWN, 0);
SET_CLIENT_STMT_ERROR(stmt, CR_COMMANDS_OUT_OF_SYNC, SQLSTATE_UNKNOWN, 0);
return(1);
}
if (stmt->mysql->methods->db_stmt_read_all_rows(stmt))
{
/* error during read - reset stmt->data */
ma_free_root(&stmt->result.alloc, 0);
stmt->result.data= NULL;
stmt->result.rows= 0;
stmt->mysql->status= MYSQL_STATUS_READY;
return(1);
}
/* workaround for MDEV 6304:
more results not set if the resultset has
SERVER_PS_OUT_PARAMS set
*/
if (last_server_status & SERVER_PS_OUT_PARAMS &&
!(stmt->mysql->server_status & SERVER_MORE_RESULTS_EXIST))
stmt->mysql->server_status|= SERVER_MORE_RESULTS_EXIST;
stmt->result_cursor= stmt->result.data;
stmt->fetch_row_func= stmt_buffered_fetch;
stmt->mysql->status= MYSQL_STATUS_READY;
if (!stmt->result.rows)
stmt->state= MYSQL_STMT_FETCH_DONE;
else
stmt->state= MYSQL_STMT_USE_OR_STORE_CALLED;
/* set affected rows: see bug 2247 */
stmt->upsert_status.affected_rows= stmt->result.rows;
stmt->mysql->affected_rows= stmt->result.rows;
return(0);
}
|
O3
|
c
|
mysql_stmt_store_result:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rbx
movq %fs:0x28, %rax
movq %rax, -0x30(%rbp)
movq 0x38(%rdi), %rdi
testq %rdi, %rdi
je 0x24352
xorl %r14d, %r14d
cmpl $0x0, 0x60(%rbx)
je 0x243aa
cmpl $0x0, 0x108(%rbx)
jne 0x243a4
cmpl $0x1, 0x50(%rbx)
ja 0x243cf
movl $0x7de, %r15d # imm = 0x7DE
movl %r15d, 0x90(%rdi)
movl $0x297, %edi # imm = 0x297
addq 0x38(%rbx), %rdi
leaq 0x299c3(%rip), %r12 # 0x4dca0
movq (%r12), %rsi
movl $0x5, %edx
callq 0x13220
movq 0x38(%rbx), %rax
xorl %r14d, %r14d
movb %r14b, 0x29c(%rax)
movl $0x97, %edi
addq 0x38(%rbx), %rdi
leaq 0x299a7(%rip), %r13 # 0x4dcb0
movq 0x70(%r13), %rsi
movl $0x1ff, %edx # imm = 0x1FF
callq 0x13220
movq 0x38(%rbx), %rax
movb %r14b, 0x296(%rax)
movl %r15d, 0x108(%rbx)
leaq 0x30d(%rbx), %rdi
movq (%r12), %rsi
movl $0x5, %edx
callq 0x13220
movb %r14b, 0x312(%rbx)
leaq 0x10c(%rbx), %rdi
movq 0x70(%r13), %rsi
jmp 0x24393
movl $0x7dd, 0x108(%rbx) # imm = 0x7DD
leaq 0x30d(%rbx), %rdi
leaq 0x29936(%rip), %rax # 0x4dca0
movq (%rax), %rsi
movl $0x5, %edx
callq 0x13220
xorl %r14d, %r14d
movb %r14b, 0x312(%rbx)
leaq 0x10c(%rbx), %rdi
leaq 0x29921(%rip), %rax # 0x4dcb0
movq 0x68(%rax), %rsi
movl $0x200, %edx # imm = 0x200
callq 0x13220
movb %r14b, 0x30b(%rbx)
movl $0x1, %r14d
movq %fs:0x28, %rax
cmpq -0x30(%rbp), %rax
jne 0x2454b
movl %r14d, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl 0x380(%rdi), %r15d
movl 0x488(%rdi), %eax
cmpb $0x0, 0x338(%rbx)
setne %cl
testl %eax, %eax
sete %dl
andb %cl, %dl
cmpb $0x1, %dl
jne 0x24480
movq 0x40(%rbx), %rax
leaq -0x38(%rbp), %rdx
movb %al, (%rdx)
movb %ah, -0x37(%rbp)
movl %eax, %ecx
shrl $0x10, %ecx
movb %cl, 0x2(%rdx)
shrl $0x18, %eax
movb %al, 0x3(%rdx)
movl $0xffffffff, 0x4(%rdx) # imm = 0xFFFFFFFF
movq 0x4d0(%rdi), %rax
movl $0x8, %ecx
movl $0x1c, %esi
movl $0x1, %r8d
movq %rbx, %r9
callq *0x10(%rax)
testl %eax, %eax
je 0x2448b
movq 0x38(%rbx), %rsi
movl 0x90(%rsi), %eax
movl %eax, 0x108(%rbx)
leaq 0x30d(%rbx), %rdi
addq $0x297, %rsi # imm = 0x297
movl $0x5, %edx
callq 0x13220
xorl %r14d, %r14d
movb %r14b, 0x312(%rbx)
leaq 0x10c(%rbx), %rdi
movl $0x97, %esi
addq 0x38(%rbx), %rsi
jmp 0x24393
cmpl $0x8, %eax
jne 0x242c0
jmp 0x2448f
movq 0x38(%rbx), %rdi
movq 0x4d0(%rdi), %rax
movq %rbx, %rdi
callq *0x60(%rax)
testl %eax, %eax
je 0x244d2
leaq 0x90(%rbx), %rdi
xorl %r14d, %r14d
xorl %esi, %esi
callq 0x20e83
movq %r14, 0x80(%rbx)
movq %r14, 0xc8(%rbx)
movq 0x38(%rbx), %rax
movl $0x0, 0x488(%rax)
jmp 0x243a4
btl $0xc, %r15d
movq 0x38(%rbx), %rax
jae 0x244f5
movl 0x380(%rax), %ecx
testb $0x8, %cl
jne 0x244f5
orl $0x8, %ecx
movl %ecx, 0x380(%rax)
movq 0x38(%rbx), %rax
movq 0x80(%rbx), %rcx
movq %rcx, 0xe0(%rbx)
leaq 0x46(%rip), %rcx # 0x24550
movq %rcx, 0x348(%rbx)
movl $0x0, 0x488(%rax)
movq 0x38(%rbx), %rax
movq 0xc8(%rbx), %rcx
xorl %edx, %edx
testq %rcx, %rcx
sete %dl
leal 0x4(,%rdx,2), %edx
movl %edx, 0x50(%rbx)
movq %rcx, 0xf8(%rbx)
movq %rcx, 0x338(%rax)
jmp 0x243aa
callq 0x13500
|
mysql_stmt_store_result:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 18h
mov rbx, rdi
mov rax, fs:28h
mov [rbp+var_30], rax
mov rdi, [rdi+38h]
test rdi, rdi
jz loc_24352
xor r14d, r14d
cmp dword ptr [rbx+60h], 0
jz loc_243AA
cmp dword ptr [rbx+108h], 0
jnz loc_243A4
cmp dword ptr [rbx+50h], 1
ja loc_243CF
loc_242C0:
mov r15d, 7DEh
mov [rdi+90h], r15d
mov edi, 297h
add rdi, [rbx+38h]
lea r12, SQLSTATE_UNKNOWN
mov rsi, [r12]
mov edx, 5
call _strncpy
mov rax, [rbx+38h]
xor r14d, r14d
mov [rax+29Ch], r14b
mov edi, 97h
add rdi, [rbx+38h]
lea r13, client_errors
mov rsi, [r13+70h]
mov edx, 1FFh
call _strncpy
mov rax, [rbx+38h]
mov [rax+296h], r14b
mov [rbx+108h], r15d
lea rdi, [rbx+30Dh]
mov rsi, [r12]
mov edx, 5
call _strncpy
mov [rbx+312h], r14b
lea rdi, [rbx+10Ch]
mov rsi, [r13+70h]
jmp short loc_24393
loc_24352:
mov dword ptr [rbx+108h], 7DDh
lea rdi, [rbx+30Dh]
lea rax, SQLSTATE_UNKNOWN
mov rsi, [rax]
mov edx, 5
call _strncpy
xor r14d, r14d
mov [rbx+312h], r14b
lea rdi, [rbx+10Ch]
lea rax, client_errors
mov rsi, [rax+68h]
loc_24393:
mov edx, 200h
call _strncpy
mov [rbx+30Bh], r14b
loc_243A4:
mov r14d, 1
loc_243AA:
mov rax, fs:28h
cmp rax, [rbp+var_30]
jnz loc_2454B
mov eax, r14d
add rsp, 18h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_243CF:
mov r15d, [rdi+380h]
mov eax, [rdi+488h]
cmp byte ptr [rbx+338h], 0
setnz cl
test eax, eax
setz dl
and dl, cl
cmp dl, 1
jnz loc_24480
mov rax, [rbx+40h]
lea rdx, [rbp+var_38]
mov [rdx], al
mov [rbp+var_37], ah
mov ecx, eax
shr ecx, 10h
mov [rdx+2], cl
shr eax, 18h
mov [rdx+3], al
mov dword ptr [rdx+4], 0FFFFFFFFh
mov rax, [rdi+4D0h]
mov ecx, 8
mov esi, 1Ch
mov r8d, 1
mov r9, rbx
call qword ptr [rax+10h]
test eax, eax
jz short loc_2448B
mov rsi, [rbx+38h]
mov eax, [rsi+90h]
mov [rbx+108h], eax
lea rdi, [rbx+30Dh]
add rsi, 297h
mov edx, 5
call _strncpy
xor r14d, r14d
mov [rbx+312h], r14b
lea rdi, [rbx+10Ch]
mov esi, 97h
add rsi, [rbx+38h]
jmp loc_24393
loc_24480:
cmp eax, 8
jnz loc_242C0
jmp short loc_2448F
loc_2448B:
mov rdi, [rbx+38h]
loc_2448F:
mov rax, [rdi+4D0h]
mov rdi, rbx
call qword ptr [rax+60h]
test eax, eax
jz short loc_244D2
lea rdi, [rbx+90h]
xor r14d, r14d
xor esi, esi
call ma_free_root
mov [rbx+80h], r14
mov [rbx+0C8h], r14
mov rax, [rbx+38h]
mov dword ptr [rax+488h], 0
jmp loc_243A4
loc_244D2:
bt r15d, 0Ch
mov rax, [rbx+38h]
jnb short loc_244F5
mov ecx, [rax+380h]
test cl, 8
jnz short loc_244F5
or ecx, 8
mov [rax+380h], ecx
mov rax, [rbx+38h]
loc_244F5:
mov rcx, [rbx+80h]
mov [rbx+0E0h], rcx
lea rcx, stmt_buffered_fetch
mov [rbx+348h], rcx
mov dword ptr [rax+488h], 0
mov rax, [rbx+38h]
mov rcx, [rbx+0C8h]
xor edx, edx
test rcx, rcx
setz dl
lea edx, ds:4[rdx*2]
mov [rbx+50h], edx
mov [rbx+0F8h], rcx
mov [rax+338h], rcx
jmp loc_243AA
loc_2454B:
call ___stack_chk_fail
|
long long mysql_stmt_store_result(long long a1)
{
long long v2; // rdi
unsigned int v3; // r14d
long long v4; // rdi
char *v5; // rsi
int v7; // r15d
int v8; // eax
long long v9; // rax
long long v10; // rsi
long long v11; // rax
int v12; // ecx
long long v13; // rax
long long v14; // rcx
__int16 v15; // [rsp+8h] [rbp-38h] BYREF
char v16; // [rsp+Ah] [rbp-36h]
char v17; // [rsp+Bh] [rbp-35h]
int v18; // [rsp+Ch] [rbp-34h]
unsigned long long v19; // [rsp+10h] [rbp-30h]
v19 = __readfsqword(0x28u);
v2 = *(_QWORD *)(a1 + 56);
if ( !v2 )
{
*(_DWORD *)(a1 + 264) = 2013;
strncpy(a1 + 781, SQLSTATE_UNKNOWN, 5LL);
*(_BYTE *)(a1 + 786) = 0;
v4 = a1 + 268;
v5 = client_errors[13];
goto LABEL_7;
}
v3 = 0;
if ( *(_DWORD *)(a1 + 96) )
{
if ( *(_DWORD *)(a1 + 264) )
return 1;
if ( *(_DWORD *)(a1 + 80) <= 1u )
goto LABEL_5;
v7 = *(_DWORD *)(v2 + 896);
v8 = *(_DWORD *)(v2 + 1160);
if ( *(_BYTE *)(a1 + 824) != 0 && v8 == 0 )
{
v9 = *(_QWORD *)(a1 + 64);
v15 = v9;
v16 = BYTE2(v9);
v17 = BYTE3(v9);
v18 = -1;
if ( (*(unsigned int ( **)(long long, long long, __int16 *, long long, long long, long long))(*(_QWORD *)(v2 + 1232)
+ 16LL))(
v2,
28LL,
&v15,
8LL,
1LL,
a1) )
{
v10 = *(_QWORD *)(a1 + 56);
*(_DWORD *)(a1 + 264) = *(_DWORD *)(v10 + 144);
strncpy(a1 + 781, v10 + 663, 5LL);
*(_BYTE *)(a1 + 786) = 0;
v4 = a1 + 268;
v5 = (char *)(*(_QWORD *)(a1 + 56) + 151LL);
goto LABEL_7;
}
v2 = *(_QWORD *)(a1 + 56);
}
else if ( v8 != 8 )
{
LABEL_5:
*(_DWORD *)(v2 + 144) = 2014;
strncpy(*(_QWORD *)(a1 + 56) + 663LL, SQLSTATE_UNKNOWN, 5LL);
*(_BYTE *)(*(_QWORD *)(a1 + 56) + 668LL) = 0;
strncpy(*(_QWORD *)(a1 + 56) + 151LL, client_errors[14], 511LL);
*(_BYTE *)(*(_QWORD *)(a1 + 56) + 662LL) = 0;
*(_DWORD *)(a1 + 264) = 2014;
strncpy(a1 + 781, SQLSTATE_UNKNOWN, 5LL);
*(_BYTE *)(a1 + 786) = 0;
v4 = a1 + 268;
v5 = client_errors[14];
LABEL_7:
strncpy(v4, v5, 512LL);
*(_BYTE *)(a1 + 779) = 0;
return 1;
}
if ( (*(unsigned int ( **)(long long))(*(_QWORD *)(v2 + 1232) + 96LL))(a1) )
{
ma_free_root(a1 + 144, 0);
*(_QWORD *)(a1 + 128) = 0LL;
*(_QWORD *)(a1 + 200) = 0LL;
*(_DWORD *)(*(_QWORD *)(a1 + 56) + 1160LL) = 0;
return 1;
}
v11 = *(_QWORD *)(a1 + 56);
if ( (v7 & 0x1000) != 0 )
{
v12 = *(_DWORD *)(v11 + 896);
if ( (v12 & 8) == 0 )
{
*(_DWORD *)(v11 + 896) = v12 | 8;
v11 = *(_QWORD *)(a1 + 56);
}
}
*(_QWORD *)(a1 + 224) = *(_QWORD *)(a1 + 128);
*(_QWORD *)(a1 + 840) = stmt_buffered_fetch;
*(_DWORD *)(v11 + 1160) = 0;
v13 = *(_QWORD *)(a1 + 56);
v14 = *(_QWORD *)(a1 + 200);
*(_DWORD *)(a1 + 80) = 2 * (v14 == 0) + 4;
*(_QWORD *)(a1 + 248) = v14;
*(_QWORD *)(v13 + 824) = v14;
}
return v3;
}
|
mysql_stmt_store_result:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x18
MOV RBX,RDI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x30],RAX
MOV RDI,qword ptr [RDI + 0x38]
TEST RDI,RDI
JZ 0x00124352
XOR R14D,R14D
CMP dword ptr [RBX + 0x60],0x0
JZ 0x001243aa
CMP dword ptr [RBX + 0x108],0x0
JNZ 0x001243a4
CMP dword ptr [RBX + 0x50],0x1
JA 0x001243cf
LAB_001242c0:
MOV R15D,0x7de
MOV dword ptr [RDI + 0x90],R15D
MOV EDI,0x297
ADD RDI,qword ptr [RBX + 0x38]
LEA R12,[0x14dca0]
MOV RSI,qword ptr [R12]
MOV EDX,0x5
CALL 0x00113220
MOV RAX,qword ptr [RBX + 0x38]
XOR R14D,R14D
MOV byte ptr [RAX + 0x29c],R14B
MOV EDI,0x97
ADD RDI,qword ptr [RBX + 0x38]
LEA R13,[0x14dcb0]
MOV RSI,qword ptr [R13 + 0x70]
MOV EDX,0x1ff
CALL 0x00113220
MOV RAX,qword ptr [RBX + 0x38]
MOV byte ptr [RAX + 0x296],R14B
MOV dword ptr [RBX + 0x108],R15D
LEA RDI,[RBX + 0x30d]
MOV RSI,qword ptr [R12]
MOV EDX,0x5
CALL 0x00113220
MOV byte ptr [RBX + 0x312],R14B
LEA RDI,[RBX + 0x10c]
MOV RSI,qword ptr [R13 + 0x70]
JMP 0x00124393
LAB_00124352:
MOV dword ptr [RBX + 0x108],0x7dd
LEA RDI,[RBX + 0x30d]
LEA RAX,[0x14dca0]
MOV RSI,qword ptr [RAX]
MOV EDX,0x5
CALL 0x00113220
XOR R14D,R14D
MOV byte ptr [RBX + 0x312],R14B
LEA RDI,[RBX + 0x10c]
LEA RAX,[0x14dcb0]
MOV RSI,qword ptr [RAX + 0x68]
LAB_00124393:
MOV EDX,0x200
CALL 0x00113220
MOV byte ptr [RBX + 0x30b],R14B
LAB_001243a4:
MOV R14D,0x1
LAB_001243aa:
MOV RAX,qword ptr FS:[0x28]
CMP RAX,qword ptr [RBP + -0x30]
JNZ 0x0012454b
MOV EAX,R14D
ADD RSP,0x18
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_001243cf:
MOV R15D,dword ptr [RDI + 0x380]
MOV EAX,dword ptr [RDI + 0x488]
CMP byte ptr [RBX + 0x338],0x0
SETNZ CL
TEST EAX,EAX
SETZ DL
AND DL,CL
CMP DL,0x1
JNZ 0x00124480
MOV RAX,qword ptr [RBX + 0x40]
LEA RDX,[RBP + -0x38]
MOV byte ptr [RDX],AL
MOV byte ptr [RBP + -0x37],AH
MOV ECX,EAX
SHR ECX,0x10
MOV byte ptr [RDX + 0x2],CL
SHR EAX,0x18
MOV byte ptr [RDX + 0x3],AL
MOV dword ptr [RDX + 0x4],0xffffffff
MOV RAX,qword ptr [RDI + 0x4d0]
MOV ECX,0x8
MOV ESI,0x1c
MOV R8D,0x1
MOV R9,RBX
CALL qword ptr [RAX + 0x10]
TEST EAX,EAX
JZ 0x0012448b
MOV RSI,qword ptr [RBX + 0x38]
MOV EAX,dword ptr [RSI + 0x90]
MOV dword ptr [RBX + 0x108],EAX
LEA RDI,[RBX + 0x30d]
ADD RSI,0x297
MOV EDX,0x5
CALL 0x00113220
XOR R14D,R14D
MOV byte ptr [RBX + 0x312],R14B
LEA RDI,[RBX + 0x10c]
MOV ESI,0x97
ADD RSI,qword ptr [RBX + 0x38]
JMP 0x00124393
LAB_00124480:
CMP EAX,0x8
JNZ 0x001242c0
JMP 0x0012448f
LAB_0012448b:
MOV RDI,qword ptr [RBX + 0x38]
LAB_0012448f:
MOV RAX,qword ptr [RDI + 0x4d0]
MOV RDI,RBX
CALL qword ptr [RAX + 0x60]
TEST EAX,EAX
JZ 0x001244d2
LEA RDI,[RBX + 0x90]
XOR R14D,R14D
XOR ESI,ESI
CALL 0x00120e83
MOV qword ptr [RBX + 0x80],R14
MOV qword ptr [RBX + 0xc8],R14
MOV RAX,qword ptr [RBX + 0x38]
MOV dword ptr [RAX + 0x488],0x0
JMP 0x001243a4
LAB_001244d2:
BT R15D,0xc
MOV RAX,qword ptr [RBX + 0x38]
JNC 0x001244f5
MOV ECX,dword ptr [RAX + 0x380]
TEST CL,0x8
JNZ 0x001244f5
OR ECX,0x8
MOV dword ptr [RAX + 0x380],ECX
MOV RAX,qword ptr [RBX + 0x38]
LAB_001244f5:
MOV RCX,qword ptr [RBX + 0x80]
MOV qword ptr [RBX + 0xe0],RCX
LEA RCX,[0x124550]
MOV qword ptr [RBX + 0x348],RCX
MOV dword ptr [RAX + 0x488],0x0
MOV RAX,qword ptr [RBX + 0x38]
MOV RCX,qword ptr [RBX + 0xc8]
XOR EDX,EDX
TEST RCX,RCX
SETZ DL
LEA EDX,[0x4 + RDX*0x2]
MOV dword ptr [RBX + 0x50],EDX
MOV qword ptr [RBX + 0xf8],RCX
MOV qword ptr [RAX + 0x338],RCX
JMP 0x001243aa
LAB_0012454b:
CALL 0x00113500
|
int8 mysql_stmt_store_result(long param_1)
{
uint uVar1;
int8 uVar2;
int iVar3;
long lVar4;
char *__src;
int8 uVar5;
long in_FS_OFFSET;
int1 local_40;
int1 local_3f;
int1 local_3e;
int1 local_3d;
int4 local_3c;
long local_38;
local_38 = *(long *)(in_FS_OFFSET + 0x28);
lVar4 = *(long *)(param_1 + 0x38);
if (lVar4 == 0) {
*(int4 *)(param_1 + 0x108) = 0x7dd;
strncpy((char *)(param_1 + 0x30d),SQLSTATE_UNKNOWN,5);
*(int1 *)(param_1 + 0x312) = 0;
__src = PTR_s_Lost_connection_to_server_during_0014dd18;
LAB_00124393:
strncpy((char *)(param_1 + 0x10c),__src,0x200);
*(int1 *)(param_1 + 0x30b) = 0;
}
else {
uVar5 = 0;
if (*(int *)(param_1 + 0x60) == 0) goto LAB_001243aa;
if (*(int *)(param_1 + 0x108) == 0) {
if (*(uint *)(param_1 + 0x50) < 2) {
LAB_001242c0:
*(int4 *)(lVar4 + 0x90) = 0x7de;
strncpy((char *)(*(long *)(param_1 + 0x38) + 0x297),SQLSTATE_UNKNOWN,5);
*(int1 *)(*(long *)(param_1 + 0x38) + 0x29c) = 0;
strncpy((char *)(*(long *)(param_1 + 0x38) + 0x97),
PTR_s_Commands_out_of_sync__you_can_t_r_0014dd20,0x1ff);
*(int1 *)(*(long *)(param_1 + 0x38) + 0x296) = 0;
*(int4 *)(param_1 + 0x108) = 0x7de;
strncpy((char *)(param_1 + 0x30d),SQLSTATE_UNKNOWN,5);
*(int1 *)(param_1 + 0x312) = 0;
__src = PTR_s_Commands_out_of_sync__you_can_t_r_0014dd20;
goto LAB_00124393;
}
uVar1 = *(uint *)(lVar4 + 0x380);
if (*(int *)(lVar4 + 0x488) == 0 && *(char *)(param_1 + 0x338) != '\0') {
uVar2 = *(int8 *)(param_1 + 0x40);
local_40 = (int1)uVar2;
local_3f = (int1)((ulong)uVar2 >> 8);
local_3e = (int1)((ulong)uVar2 >> 0x10);
local_3d = (int1)((ulong)uVar2 >> 0x18);
local_3c = 0xffffffff;
iVar3 = (**(code **)(*(long *)(lVar4 + 0x4d0) + 0x10))(lVar4,0x1c,&local_40,8,1,param_1);
if (iVar3 != 0) {
*(int4 *)(param_1 + 0x108) = *(int4 *)(*(long *)(param_1 + 0x38) + 0x90);
strncpy((char *)(param_1 + 0x30d),(char *)(*(long *)(param_1 + 0x38) + 0x297),5);
*(int1 *)(param_1 + 0x312) = 0;
__src = (char *)(*(long *)(param_1 + 0x38) + 0x97);
goto LAB_00124393;
}
lVar4 = *(long *)(param_1 + 0x38);
}
else if (*(int *)(lVar4 + 0x488) != 8) goto LAB_001242c0;
iVar3 = (**(code **)(*(long *)(lVar4 + 0x4d0) + 0x60))(param_1);
if (iVar3 == 0) {
lVar4 = *(long *)(param_1 + 0x38);
if (((uVar1 >> 0xc & 1) != 0) && ((*(uint *)(lVar4 + 0x380) & 8) == 0)) {
*(uint *)(lVar4 + 0x380) = *(uint *)(lVar4 + 0x380) | 8;
lVar4 = *(long *)(param_1 + 0x38);
}
*(int8 *)(param_1 + 0xe0) = *(int8 *)(param_1 + 0x80);
*(code **)(param_1 + 0x348) = stmt_buffered_fetch;
*(int4 *)(lVar4 + 0x488) = 0;
lVar4 = *(long *)(param_1 + 200);
*(uint *)(param_1 + 0x50) = (uint)(lVar4 == 0) * 2 + 4;
*(long *)(param_1 + 0xf8) = lVar4;
*(long *)(*(long *)(param_1 + 0x38) + 0x338) = lVar4;
goto LAB_001243aa;
}
ma_free_root(param_1 + 0x90,0);
*(int8 *)(param_1 + 0x80) = 0;
*(int8 *)(param_1 + 200) = 0;
*(int4 *)(*(long *)(param_1 + 0x38) + 0x488) = 0;
}
}
uVar5 = 1;
LAB_001243aa:
if (*(long *)(in_FS_OFFSET + 0x28) != local_38) {
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
return uVar5;
}
|
|
64,319 |
my_thread_global_end
|
eloqsql/mysys/my_thr_init.c
|
void my_thread_global_end(void)
{
struct timespec abstime;
my_bool all_threads_killed= 1;
set_timespec(abstime, my_thread_end_wait_time);
mysql_mutex_lock(&THR_LOCK_threads);
while (THR_thread_count > 0)
{
int error= mysql_cond_timedwait(&THR_COND_threads, &THR_LOCK_threads,
&abstime);
if (error == ETIMEDOUT || error == ETIME)
{
#ifdef HAVE_PTHREAD_KILL
/*
We shouldn't give an error here, because if we don't have
pthread_kill(), programs like mysqld can't ensure that all threads
are killed when we enter here.
*/
if (THR_thread_count)
fprintf(stderr,
"Error in my_thread_global_end(): %d threads didn't exit\n",
THR_thread_count);
#endif
all_threads_killed= 0;
break;
}
}
mysql_mutex_unlock(&THR_LOCK_threads);
my_thread_destroy_common_mutex();
/*
Only destroy the mutex & conditions if we don't have other threads around
that could use them.
*/
if (all_threads_killed)
{
my_thread_destroy_internal_mutex();
}
my_thread_global_init_done= 0;
}
|
O0
|
c
|
my_thread_global_end:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movb $0x1, -0x11(%rbp)
callq 0xf4bc0
movq %rax, -0x28(%rbp)
imulq $0x3e8, -0x28(%rbp), %rax # imm = 0x3E8
leaq 0x1cffc4(%rip), %rcx # 0x2cade8
movl (%rcx), %ecx
imulq $0x3b9aca00, %rcx, %rcx # imm = 0x3B9ACA00
addq %rcx, %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
movl $0x3b9aca00, %ecx # imm = 0x3B9ACA00
xorl %edx, %edx
divq %rcx
movq %rax, -0x10(%rbp)
movq -0x20(%rbp), %rax
movl $0x3b9aca00, %ecx # imm = 0x3B9ACA00
xorl %edx, %edx
divq %rcx
movq %rdx, -0x8(%rbp)
leaq 0xb93639(%rip), %rdi # 0xc8e498
leaq 0x62766(%rip), %rsi # 0x15d5cc
movl $0xce, %edx
callq 0xfaf10
leaq 0xb93421(%rip), %rax # 0xc8e298
cmpl $0x0, (%rax)
jbe 0xfaee4
leaq 0xb936a5(%rip), %rdi # 0xc8e528
leaq 0xb9360e(%rip), %rsi # 0xc8e498
leaq -0x10(%rbp), %rdx
leaq 0x62737(%rip), %rcx # 0x15d5cc
movl $0xd2, %r8d
callq 0xfaf80
movl %eax, -0x2c(%rbp)
cmpl $0x6e, -0x2c(%rbp)
je 0xfaeaf
cmpl $0x3e, -0x2c(%rbp)
jne 0xfaee2
leaq 0xb933e2(%rip), %rax # 0xc8e298
cmpl $0x0, (%rax)
je 0xfaedc
movq 0x1cd11e(%rip), %rax # 0x2c7fe0
movq (%rax), %rdi
leaq 0xb933cc(%rip), %rax # 0xc8e298
movl (%rax), %edx
leaq 0x62734(%rip), %rsi # 0x15d609
movb $0x0, %al
callq 0x2a180
movb $0x0, -0x11(%rbp)
jmp 0xfaee4
jmp 0xfae70
leaq 0xb935ad(%rip), %rdi # 0xc8e498
callq 0xfb000
callq 0xfa8e0
cmpb $0x0, -0x11(%rbp)
je 0xfaf00
callq 0xfa990
movb $0x0, 0xb93659(%rip) # 0xc8e560
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax)
|
my_thread_global_end:
push rbp
mov rbp, rsp
sub rsp, 30h
mov [rbp+var_11], 1
call my_hrtime
mov [rbp+var_28], rax
imul rax, [rbp+var_28], 3E8h
lea rcx, my_thread_end_wait_time
mov ecx, [rcx]
imul rcx, 3B9ACA00h
add rax, rcx
mov [rbp+var_20], rax
mov rax, [rbp+var_20]
mov ecx, 3B9ACA00h
xor edx, edx
div rcx
mov [rbp+var_10], rax
mov rax, [rbp+var_20]
mov ecx, 3B9ACA00h
xor edx, edx
div rcx
mov [rbp+var_8], rdx
lea rdi, THR_LOCK_threads
lea rsi, aWorkspaceLlm4b_38; "/workspace/llm4binary/github2025/eloqsq"...
mov edx, 0CEh
call inline_mysql_mutex_lock_26
loc_FAE70:
lea rax, THR_thread_count
cmp dword ptr [rax], 0
jbe short loc_FAEE4
lea rdi, THR_COND_threads
lea rsi, THR_LOCK_threads
lea rdx, [rbp+var_10]
lea rcx, aWorkspaceLlm4b_38; "/workspace/llm4binary/github2025/eloqsq"...
mov r8d, 0D2h
call inline_mysql_cond_timedwait_1
mov [rbp+var_2C], eax
cmp [rbp+var_2C], 6Eh ; 'n'
jz short loc_FAEAF
cmp [rbp+var_2C], 3Eh ; '>'
jnz short loc_FAEE2
loc_FAEAF:
lea rax, THR_thread_count
cmp dword ptr [rax], 0
jz short loc_FAEDC
mov rax, cs:stderr_ptr
mov rdi, [rax]
lea rax, THR_thread_count
mov edx, [rax]
lea rsi, aErrorInMyThrea; "Error in my_thread_global_end(): %d thr"...
mov al, 0
call _fprintf
loc_FAEDC:
mov [rbp+var_11], 0
jmp short loc_FAEE4
loc_FAEE2:
jmp short loc_FAE70
loc_FAEE4:
lea rdi, THR_LOCK_threads
call inline_mysql_mutex_unlock_27
call my_thread_destroy_common_mutex
cmp [rbp+var_11], 0
jz short loc_FAF00
call my_thread_destroy_internal_mutex
loc_FAF00:
mov cs:my_thread_global_init_done, 0
add rsp, 30h
pop rbp
retn
|
long long my_thread_global_end()
{
long long result; // rax
int v1; // [rsp+4h] [rbp-2Ch]
unsigned long long v2; // [rsp+10h] [rbp-20h]
char v3; // [rsp+1Fh] [rbp-11h]
_QWORD v4[2]; // [rsp+20h] [rbp-10h] BYREF
v3 = 1;
v2 = 1000000000LL * my_thread_end_wait_time + 1000 * my_hrtime();
v4[0] = v2 / 0x3B9ACA00;
v4[1] = v2 % 0x3B9ACA00;
inline_mysql_mutex_lock_26(&THR_LOCK_threads, "/workspace/llm4binary/github2025/eloqsql/mysys/my_thr_init.c", 206LL);
while ( THR_thread_count )
{
v1 = inline_mysql_cond_timedwait_1(
&THR_COND_threads,
&THR_LOCK_threads,
v4,
"/workspace/llm4binary/github2025/eloqsql/mysys/my_thr_init.c",
210LL);
if ( v1 == 110 || v1 == 62 )
{
if ( THR_thread_count )
fprintf(stderr, "Error in my_thread_global_end(): %d threads didn't exit\n", THR_thread_count);
v3 = 0;
break;
}
}
inline_mysql_mutex_unlock_27(&THR_LOCK_threads);
result = my_thread_destroy_common_mutex();
if ( v3 )
result = my_thread_destroy_internal_mutex();
my_thread_global_init_done = 0;
return result;
}
|
my_thread_global_end:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x30
MOV byte ptr [RBP + -0x11],0x1
CALL 0x001f4bc0
MOV qword ptr [RBP + -0x28],RAX
IMUL RAX,qword ptr [RBP + -0x28],0x3e8
LEA RCX,[0x3cade8]
MOV ECX,dword ptr [RCX]
IMUL RCX,RCX,0x3b9aca00
ADD RAX,RCX
MOV qword ptr [RBP + -0x20],RAX
MOV RAX,qword ptr [RBP + -0x20]
MOV ECX,0x3b9aca00
XOR EDX,EDX
DIV RCX
MOV qword ptr [RBP + -0x10],RAX
MOV RAX,qword ptr [RBP + -0x20]
MOV ECX,0x3b9aca00
XOR EDX,EDX
DIV RCX
MOV qword ptr [RBP + -0x8],RDX
LEA RDI,[0xd8e498]
LEA RSI,[0x25d5cc]
MOV EDX,0xce
CALL 0x001faf10
LAB_001fae70:
LEA RAX,[0xd8e298]
CMP dword ptr [RAX],0x0
JBE 0x001faee4
LEA RDI,[0xd8e528]
LEA RSI,[0xd8e498]
LEA RDX,[RBP + -0x10]
LEA RCX,[0x25d5cc]
MOV R8D,0xd2
CALL 0x001faf80
MOV dword ptr [RBP + -0x2c],EAX
CMP dword ptr [RBP + -0x2c],0x6e
JZ 0x001faeaf
CMP dword ptr [RBP + -0x2c],0x3e
JNZ 0x001faee2
LAB_001faeaf:
LEA RAX,[0xd8e298]
CMP dword ptr [RAX],0x0
JZ 0x001faedc
MOV RAX,qword ptr [0x003c7fe0]
MOV RDI,qword ptr [RAX]
LEA RAX,[0xd8e298]
MOV EDX,dword ptr [RAX]
LEA RSI,[0x25d609]
MOV AL,0x0
CALL 0x0012a180
LAB_001faedc:
MOV byte ptr [RBP + -0x11],0x0
JMP 0x001faee4
LAB_001faee2:
JMP 0x001fae70
LAB_001faee4:
LEA RDI,[0xd8e498]
CALL 0x001fb000
CALL 0x001fa8e0
CMP byte ptr [RBP + -0x11],0x0
JZ 0x001faf00
CALL 0x001fa990
LAB_001faf00:
MOV byte ptr [0x00d8e560],0x0
ADD RSP,0x30
POP RBP
RET
|
void my_thread_global_end(void)
{
bool bVar1;
int iVar2;
long lVar3;
ulong local_18;
ulong local_10;
bVar1 = true;
lVar3 = my_hrtime();
local_10 = lVar3 * 1000 + (ulong)my_thread_end_wait_time * 1000000000;
local_18 = local_10 / 1000000000;
local_10 = local_10 % 1000000000;
inline_mysql_mutex_lock
(THR_LOCK_threads,"/workspace/llm4binary/github2025/eloqsql/mysys/my_thr_init.c",0xce);
do {
if (THR_thread_count == 0) goto LAB_001faee4;
iVar2 = inline_mysql_cond_timedwait
(THR_COND_threads,THR_LOCK_threads,&local_18,
"/workspace/llm4binary/github2025/eloqsql/mysys/my_thr_init.c",0xd2);
} while ((iVar2 != 0x6e) && (iVar2 != 0x3e));
if (THR_thread_count != 0) {
fprintf(*(FILE **)PTR_stderr_003c7fe0,
"Error in my_thread_global_end(): %d threads didn\'t exit\n",(ulong)THR_thread_count);
}
bVar1 = false;
LAB_001faee4:
inline_mysql_mutex_unlock(THR_LOCK_threads);
my_thread_destroy_common_mutex();
if (bVar1) {
my_thread_destroy_internal_mutex();
}
my_thread_global_init_done = 0;
return;
}
|
|
64,320 |
my_hash_insert
|
eloqsql/mysys/hash.c
|
my_bool my_hash_insert(HASH *info, const uchar *record)
{
int flag;
size_t idx, halfbuff, first_index;
size_t length;
my_hash_value_type current_hash_nr, UNINIT_VAR(rec_hash_nr),
UNINIT_VAR(rec2_hash_nr);
uchar *UNINIT_VAR(rec_data),*UNINIT_VAR(rec2_data), *key;
HASH_LINK *data,*empty,*UNINIT_VAR(gpos),*UNINIT_VAR(gpos2),*pos;
key= (uchar*) my_hash_key(info, record, &length, 1);
current_hash_nr= info->hash_function(info->charset, key, length);
if (info->flags & HASH_UNIQUE)
{
if (my_hash_search_using_hash_value(info, current_hash_nr, key, length))
return(TRUE); /* Duplicate entry */
}
flag=0;
if (!(empty=(HASH_LINK*) alloc_dynamic(&info->array)))
return(TRUE); /* No more memory */
data=dynamic_element(&info->array,0,HASH_LINK*);
halfbuff= info->blength >> 1;
idx=first_index=info->records-halfbuff;
if (idx != info->records) /* If some records */
{
do
{
my_hash_value_type hash_nr;
pos=data+idx;
hash_nr= pos->hash_nr;
if (flag == 0) /* First loop; Check if ok */
if (my_hash_mask(hash_nr, info->blength, info->records) != first_index)
break;
if (!(hash_nr & halfbuff))
{ /* Key will not move */
if (!(flag & LOWFIND))
{
if (flag & HIGHFIND)
{
flag= LOWFIND | HIGHFIND;
/* key shall be moved to the current empty position */
gpos= empty;
rec_data= pos->data;
rec_hash_nr= pos->hash_nr;
empty=pos; /* This place is now free */
}
else
{
flag= LOWFIND | LOWUSED; /* key isn't changed */
gpos= pos;
rec_data= pos->data;
rec_hash_nr= pos->hash_nr;
}
}
else
{
if (!(flag & LOWUSED))
{
/* Change link of previous LOW-key */
gpos->data= rec_data;
gpos->hash_nr= rec_hash_nr;
gpos->next= (uint) (pos-data);
flag= (flag & HIGHFIND) | (LOWFIND | LOWUSED);
}
gpos= pos;
rec_data= pos->data;
rec_hash_nr= pos->hash_nr;
}
}
else
{ /* key will be moved */
if (!(flag & HIGHFIND))
{
flag= (flag & LOWFIND) | HIGHFIND;
/* key shall be moved to the last (empty) position */
gpos2= empty;
empty= pos;
rec2_data= pos->data;
rec2_hash_nr= pos->hash_nr;
}
else
{
if (!(flag & HIGHUSED))
{
/* Change link of previous hash-key and save */
gpos2->data= rec2_data;
gpos2->hash_nr= rec2_hash_nr;
gpos2->next= (uint) (pos-data);
flag= (flag & LOWFIND) | (HIGHFIND | HIGHUSED);
}
gpos2= pos;
rec2_data= pos->data;
rec2_hash_nr= pos->hash_nr;
}
}
}
while ((idx=pos->next) != NO_RECORD);
if ((flag & (LOWFIND | LOWUSED)) == LOWFIND)
{
gpos->data= rec_data;
gpos->hash_nr= rec_hash_nr;
gpos->next= NO_RECORD;
}
if ((flag & (HIGHFIND | HIGHUSED)) == HIGHFIND)
{
gpos2->data= rec2_data;
gpos2->hash_nr= rec2_hash_nr;
gpos2->next= NO_RECORD;
}
}
idx= my_hash_mask(current_hash_nr, info->blength, info->records + 1);
pos= data+idx;
/* Check if we are at the empty position */
if (pos == empty)
{
pos->next=NO_RECORD;
}
else
{
/* Move conflicting record to empty position (last) */
empty[0]= pos[0];
/* Check if the moved record was in same hash-nr family */
gpos= data + my_hash_rec_mask(pos, info->blength, info->records + 1);
if (pos == gpos)
{
/* Point to moved record */
pos->next= (uint32) (empty - data);
}
else
{
pos->next= NO_RECORD;
movelink(data,(uint) (pos-data),(uint) (gpos-data),(uint) (empty-data));
}
}
pos->data= (uchar*) record;
pos->hash_nr= current_hash_nr;
if (++info->records == info->blength)
info->blength+= info->blength;
return(0);
}
|
O3
|
c
|
my_hash_insert:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %rsi, %r14
movq %rdi, %rbx
movq 0x50(%rdi), %rax
testq %rax, %rax
je 0x4f2b7
leaq -0x50(%rbp), %r15
movq %r14, %rdi
movq %r15, %rsi
movl $0x1, %edx
callq *%rax
movq %rax, %r12
movq (%r15), %rdx
jmp 0x4f2c5
movq 0x8(%rbx), %rdx
movq %rdx, -0x50(%rbp)
movq (%rbx), %r12
addq %r14, %r12
movq 0x68(%rbx), %rdi
movq %r12, %rsi
callq *0x58(%rbx)
movl %eax, %r15d
testb $0x1, 0x20(%rbx)
je 0x4f2fc
movq -0x50(%rbp), %rcx
leaq -0x5c(%rbp), %r8
movq %rbx, %rdi
movl %r15d, %esi
movq %r12, %rdx
callq 0x4f097
movq %rax, %rcx
movb $0x1, %al
testq %rcx, %rcx
jne 0x4f573
leaq 0x28(%rbx), %rdi
callq 0x4cf8c
testq %rax, %rax
je 0x4f4aa
movq %rax, %rdi
movl $0xffffffff, %edx # imm = 0xFFFFFFFF
movq 0x28(%rbx), %rcx
movq 0x10(%rbx), %rsi
cmpq $0x2, %rsi
jb 0x4f4bc
movl %r15d, -0x2c(%rbp)
movq %r14, -0x48(%rbp)
movq 0x18(%rbx), %r12
shrq %rsi
subq %rsi, %r12
xorl %r8d, %r8d
movq %r12, -0x58(%rbp)
movq %rdi, %r14
movq %r12, %rax
shlq $0x4, %rax
movl 0x4(%rcx,%rax), %r10d
testl %r8d, %r8d
jne 0x4f394
movq 0x10(%rbx), %rdi
leal (%rdi,%rdx), %r9d
movq %rsi, %rdx
movq %r15, %rsi
movl %r11d, %r15d
movl %r10d, %r11d
andl %r9d, %r11d
shrq %rdi
decl %edi
andl %r10d, %edi
cmpq 0x18(%rbx), %r11
cmovbl %r11d, %edi
movl %r15d, %r11d
movq %rsi, %r15
movq %rdx, %rsi
movl $0xffffffff, %edx # imm = 0xFFFFFFFF
cmpq %rdi, -0x58(%rbp)
jne 0x4f4b1
addq %rcx, %rax
testl %r10d, %esi
je 0x4f3bc
testb $0x4, %r8b
jne 0x4f3f3
andl $0x1, %r8d
orl $0x4, %r8d
movq 0x8(%rax), %r15
movl %r10d, %r11d
movq %rax, %rdi
movq %r14, %r13
jmp 0x4f45b
testb $0x1, %r8b
jne 0x4f420
andl $0x4, %r8d
movl %r8d, %r9d
shrl %r9d
addl $0x3, %r9d
testl %r8d, %r8d
movq %rax, %rdi
cmoveq %r14, %rdi
cmoveq %rax, %r14
movq 0x8(%rax), %r8
movq %r8, -0x40(%rbp)
movl %r10d, -0x30(%rbp)
movl %r9d, %r8d
movq %r14, -0x38(%rbp)
jmp 0x4f45b
testb $0x8, %r8b
jne 0x4f411
movq %r15, 0x8(%r13)
movl %r11d, 0x4(%r13)
movl %r12d, (%r13)
andl $0x1, %r8d
orl $0xc, %r8d
movl 0x4(%rax), %r10d
movq 0x8(%rax), %r15
movl %r10d, %r11d
movq %r14, %rdi
movq %rax, %r13
jmp 0x4f45b
testb $0x2, %r8b
jne 0x4f448
movq -0x40(%rbp), %rdi
movq -0x38(%rbp), %r9
movq %rdi, 0x8(%r9)
movl -0x30(%rbp), %edi
movl %edi, 0x4(%r9)
movl %r12d, (%r9)
andl $0x4, %r8d
orl $0x3, %r8d
movl 0x4(%rax), %r10d
movq 0x8(%rax), %rdi
movq %rdi, -0x40(%rbp)
movl %r10d, -0x30(%rbp)
movq %r14, %rdi
movq %rax, -0x38(%rbp)
movl (%rax), %r12d
cmpq %rdx, %r12
jne 0x4f341
movl %r8d, %eax
andl $0x3, %eax
cmpl $0x1, %eax
jne 0x4f48a
movq -0x40(%rbp), %rax
movq -0x38(%rbp), %rsi
movq %rax, 0x8(%rsi)
movl -0x30(%rbp), %eax
movl %eax, 0x4(%rsi)
movl $0xffffffff, (%rsi) # imm = 0xFFFFFFFF
andl $0xc, %r8d
cmpl $0x4, %r8d
movq -0x48(%rbp), %r14
jne 0x4f4b8
movq %r15, 0x8(%r13)
movl %r11d, 0x4(%r13)
movl $0xffffffff, (%r13) # imm = 0xFFFFFFFF
jmp 0x4f4b8
movb $0x1, %al
jmp 0x4f573
movq %r14, %rdi
movq -0x48(%rbp), %r14
movl -0x2c(%rbp), %r15d
movq 0x10(%rbx), %rax
movq 0x18(%rbx), %rsi
incq %rsi
leal (%rax,%rdx), %r8d
andl %r15d, %r8d
shrq %rax
decl %eax
andl %r15d, %eax
cmpq %rsi, %r8
cmovbl %r8d, %eax
movq %rax, %rsi
shlq $0x4, %rsi
addq %rcx, %rsi
cmpq %rdi, %rsi
je 0x4f527
movups (%rsi), %xmm0
movups %xmm0, (%rdi)
movq 0x10(%rbx), %r8
movq 0x18(%rbx), %r9
incq %r9
movl 0x4(%rsi), %r10d
addl %r8d, %edx
andl %r10d, %edx
shrq %r8
decl %r8d
andl %r10d, %r8d
cmpq %r9, %rdx
cmovbl %edx, %r8d
cmpl %r8d, %eax
jne 0x4f52f
subq %rcx, %rdi
shrq $0x4, %rdi
movl %edi, (%rsi)
jmp 0x4f551
movl $0xffffffff, (%rsi) # imm = 0xFFFFFFFF
jmp 0x4f551
movl $0xffffffff, (%rsi) # imm = 0xFFFFFFFF
subq %rcx, %rdi
shrq $0x4, %rdi
movl %r8d, %edx
shlq $0x4, %rdx
movl (%rcx,%rdx), %r8d
cmpl %eax, %r8d
jne 0x4f53c
addq %rdx, %rcx
movl %edi, (%rcx)
movq %r14, 0x8(%rsi)
movl %r15d, 0x4(%rsi)
movq 0x18(%rbx), %rax
incq %rax
movq %rax, 0x18(%rbx)
cmpq 0x10(%rbx), %rax
jne 0x4f571
addq %rax, %rax
movq %rax, 0x10(%rbx)
xorl %eax, %eax
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
|
my_hash_insert:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 38h
mov r14, rsi
mov rbx, rdi
mov rax, [rdi+50h]
test rax, rax
jz short loc_4F2B7
lea r15, [rbp+var_50]
mov rdi, r14
mov rsi, r15
mov edx, 1
call rax
mov r12, rax
mov rdx, [r15]
jmp short loc_4F2C5
loc_4F2B7:
mov rdx, [rbx+8]
mov [rbp+var_50], rdx
mov r12, [rbx]
add r12, r14
loc_4F2C5:
mov rdi, [rbx+68h]
mov rsi, r12
call qword ptr [rbx+58h]
mov r15d, eax
test byte ptr [rbx+20h], 1
jz short loc_4F2FC
mov rcx, [rbp+var_50]
lea r8, [rbp+var_5C]
mov rdi, rbx
mov esi, r15d
mov rdx, r12
call my_hash_first_from_hash_value
mov rcx, rax
mov al, 1
test rcx, rcx
jnz loc_4F573
loc_4F2FC:
lea rdi, [rbx+28h]
call alloc_dynamic
test rax, rax
jz loc_4F4AA
mov rdi, rax
mov edx, 0FFFFFFFFh
mov rcx, [rbx+28h]
mov rsi, [rbx+10h]
cmp rsi, 2
jb loc_4F4BC
mov [rbp+var_2C], r15d
mov [rbp+var_48], r14
mov r12, [rbx+18h]
shr rsi, 1
sub r12, rsi
xor r8d, r8d
mov [rbp+var_58], r12
loc_4F341:
mov r14, rdi
mov rax, r12
shl rax, 4
mov r10d, [rcx+rax+4]
test r8d, r8d
jnz short loc_4F394
mov rdi, [rbx+10h]
lea r9d, [rdi+rdx]
mov rdx, rsi
mov rsi, r15
mov r15d, r11d
mov r11d, r10d
and r11d, r9d
shr rdi, 1
dec edi
and edi, r10d
cmp r11, [rbx+18h]
cmovb edi, r11d
mov r11d, r15d
mov r15, rsi
mov rsi, rdx
mov edx, 0FFFFFFFFh
cmp [rbp+var_58], rdi
jnz loc_4F4B1
loc_4F394:
add rax, rcx
test esi, r10d
jz short loc_4F3BC
test r8b, 4
jnz short loc_4F3F3
and r8d, 1
or r8d, 4
mov r15, [rax+8]
mov r11d, r10d
mov rdi, rax
mov r13, r14
jmp loc_4F45B
loc_4F3BC:
test r8b, 1
jnz short loc_4F420
and r8d, 4
mov r9d, r8d
shr r9d, 1
add r9d, 3
test r8d, r8d
mov rdi, rax
cmovz rdi, r14
cmovz r14, rax
mov r8, [rax+8]
mov [rbp+var_40], r8
mov [rbp+var_30], r10d
mov r8d, r9d
mov [rbp+var_38], r14
jmp short loc_4F45B
loc_4F3F3:
test r8b, 8
jnz short loc_4F411
mov [r13+8], r15
mov [r13+4], r11d
mov [r13+0], r12d
and r8d, 1
or r8d, 0Ch
mov r10d, [rax+4]
loc_4F411:
mov r15, [rax+8]
mov r11d, r10d
mov rdi, r14
mov r13, rax
jmp short loc_4F45B
loc_4F420:
test r8b, 2
jnz short loc_4F448
mov rdi, [rbp+var_40]
mov r9, [rbp+var_38]
mov [r9+8], rdi
mov edi, [rbp+var_30]
mov [r9+4], edi
mov [r9], r12d
and r8d, 4
or r8d, 3
mov r10d, [rax+4]
loc_4F448:
mov rdi, [rax+8]
mov [rbp+var_40], rdi
mov [rbp+var_30], r10d
mov rdi, r14
mov [rbp+var_38], rax
loc_4F45B:
mov r12d, [rax]
cmp r12, rdx
jnz loc_4F341
mov eax, r8d
and eax, 3
cmp eax, 1
jnz short loc_4F48A
mov rax, [rbp+var_40]
mov rsi, [rbp+var_38]
mov [rsi+8], rax
mov eax, [rbp+var_30]
mov [rsi+4], eax
mov dword ptr [rsi], 0FFFFFFFFh
loc_4F48A:
and r8d, 0Ch
cmp r8d, 4
mov r14, [rbp+var_48]
jnz short loc_4F4B8
mov [r13+8], r15
mov [r13+4], r11d
mov dword ptr [r13+0], 0FFFFFFFFh
jmp short loc_4F4B8
loc_4F4AA:
mov al, 1
jmp loc_4F573
loc_4F4B1:
mov rdi, r14
mov r14, [rbp+var_48]
loc_4F4B8:
mov r15d, [rbp+var_2C]
loc_4F4BC:
mov rax, [rbx+10h]
mov rsi, [rbx+18h]
inc rsi
lea r8d, [rax+rdx]
and r8d, r15d
shr rax, 1
dec eax
and eax, r15d
cmp r8, rsi
cmovb eax, r8d
mov rsi, rax
shl rsi, 4
add rsi, rcx
cmp rsi, rdi
jz short loc_4F527
movups xmm0, xmmword ptr [rsi]
movups xmmword ptr [rdi], xmm0
mov r8, [rbx+10h]
mov r9, [rbx+18h]
inc r9
mov r10d, [rsi+4]
add edx, r8d
and edx, r10d
shr r8, 1
dec r8d
and r8d, r10d
cmp rdx, r9
cmovb r8d, edx
cmp eax, r8d
jnz short loc_4F52F
sub rdi, rcx
shr rdi, 4
mov [rsi], edi
jmp short loc_4F551
loc_4F527:
mov dword ptr [rsi], 0FFFFFFFFh
jmp short loc_4F551
loc_4F52F:
mov dword ptr [rsi], 0FFFFFFFFh
sub rdi, rcx
shr rdi, 4
loc_4F53C:
mov edx, r8d
shl rdx, 4
mov r8d, [rcx+rdx]
cmp r8d, eax
jnz short loc_4F53C
add rcx, rdx
mov [rcx], edi
loc_4F551:
mov [rsi+8], r14
mov [rsi+4], r15d
mov rax, [rbx+18h]
inc rax
mov [rbx+18h], rax
cmp rax, [rbx+10h]
jnz short loc_4F571
add rax, rax
mov [rbx+10h], rax
loc_4F571:
xor eax, eax
loc_4F573:
add rsp, 38h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
|
char my_hash_insert(long long a1, long long a2)
{
_OWORD *v2; // r13
long long v3; // r14
long long ( *v5)(long long, long long *, long long); // rax
long long v6; // r12
long long v7; // rdx
unsigned int v8; // eax
long long v9; // r15
long long v10; // rcx
char result; // al
long long v12; // rax
unsigned int v13; // r11d
_OWORD *v14; // rdi
long long v15; // rcx
unsigned long long v16; // rsi
unsigned long long v17; // rsi
unsigned long long v18; // r12
int v19; // r8d
_OWORD *v20; // r14
unsigned int v21; // r10d
unsigned long long v22; // rdi
unsigned long long v23; // rdx
long long v24; // rsi
unsigned int v25; // r15d
unsigned long long v26; // r11
long long v27; // rdi
unsigned int *v28; // rax
unsigned int v29; // r8d
_DWORD *v30; // r9
_DWORD *v31; // rsi
unsigned long long v32; // rax
unsigned long long v33; // r8
long long v34; // rax
long long v35; // rsi
unsigned long long v36; // r8
int v37; // r10d
unsigned long long v38; // rdx
unsigned int v39; // r8d
unsigned long long v40; // rdi
long long v41; // rdx
long long v42; // rax
unsigned int v43; // [rsp+4h] [rbp-5Ch] BYREF
unsigned long long v44; // [rsp+8h] [rbp-58h]
long long v45; // [rsp+10h] [rbp-50h] BYREF
long long v46; // [rsp+18h] [rbp-48h]
long long v47; // [rsp+20h] [rbp-40h]
_OWORD *v48; // [rsp+28h] [rbp-38h]
unsigned int v49; // [rsp+30h] [rbp-30h]
int v50; // [rsp+34h] [rbp-2Ch]
v3 = a2;
v5 = *(long long ( **)(long long, long long *, long long))(a1 + 80);
if ( v5 )
{
v6 = v5(a2, &v45, 1LL);
v7 = v45;
}
else
{
v7 = *(_QWORD *)(a1 + 8);
v45 = v7;
v6 = a2 + *(_QWORD *)a1;
}
v8 = (*(long long ( **)(_QWORD, long long, long long))(a1 + 88))(*(_QWORD *)(a1 + 104), v6, v7);
v9 = v8;
if ( (*(_BYTE *)(a1 + 32) & 1) == 0
|| (v10 = my_hash_first_from_hash_value((_QWORD *)a1, v8, v6, v45, &v43), result = 1, !v10) )
{
v12 = alloc_dynamic((long long *)(a1 + 40));
if ( v12 )
{
v14 = (_OWORD *)v12;
v15 = *(_QWORD *)(a1 + 40);
v16 = *(_QWORD *)(a1 + 16);
if ( v16 >= 2 )
{
v50 = v9;
v46 = v3;
v17 = v16 >> 1;
v18 = *(_QWORD *)(a1 + 24) - v17;
v19 = 0;
v44 = v18;
do
{
v20 = v14;
v21 = *(_DWORD *)(v15 + 16 * v18 + 4);
if ( !v19 )
{
v22 = *(_QWORD *)(a1 + 16);
v23 = v17;
v24 = v9;
v25 = v13;
v26 = ((_DWORD)v22 - 1) & v21;
v27 = v21 & ((unsigned int)(v22 >> 1) - 1);
if ( v26 < *(_QWORD *)(a1 + 24) )
v27 = (unsigned int)v26;
v13 = v25;
v9 = v24;
v17 = v23;
if ( v44 != v27 )
{
v14 = v20;
v3 = v46;
goto LABEL_33;
}
}
v28 = (unsigned int *)(v15 + 16 * v18);
if ( (v21 & (unsigned int)v17) != 0 )
{
if ( (v19 & 4) != 0 )
{
if ( (v19 & 8) == 0 )
{
*((_QWORD *)v2 + 1) = v9;
*((_DWORD *)v2 + 1) = v13;
*(_DWORD *)v2 = v18;
v19 = v19 & 1 | 0xC;
v21 = v28[1];
}
v9 = *((_QWORD *)v28 + 1);
v13 = v21;
v14 = v20;
v2 = (_OWORD *)(v15 + 16 * v18);
}
else
{
v19 = v19 & 1 | 4;
v9 = *((_QWORD *)v28 + 1);
v13 = *(_DWORD *)(v15 + 16 * v18 + 4);
v14 = (_OWORD *)(v15 + 16 * v18);
v2 = v20;
}
}
else if ( (v19 & 1) != 0 )
{
if ( (v19 & 2) == 0 )
{
v30 = v48;
*((_QWORD *)v48 + 1) = v47;
v30[1] = v49;
*v30 = v18;
v19 = v19 & 4 | 3;
v21 = v28[1];
}
v47 = *((_QWORD *)v28 + 1);
v49 = v21;
v14 = v20;
v48 = (_OWORD *)(v15 + 16 * v18);
}
else
{
v29 = v19 & 4;
v14 = (_OWORD *)(v15 + 16 * v18);
if ( !v29 )
{
v14 = v20;
v20 = (_OWORD *)(v15 + 16 * v18);
}
v47 = *((_QWORD *)v28 + 1);
v49 = v21;
v19 = (v29 >> 1) + 3;
v48 = v20;
}
v18 = *v28;
}
while ( v18 != 0xFFFFFFFF );
if ( (v19 & 3) == 1 )
{
v31 = v48;
*((_QWORD *)v48 + 1) = v47;
v31[1] = v49;
*v31 = -1;
}
v3 = v46;
if ( (v19 & 0xC) == 4 )
{
*((_QWORD *)v2 + 1) = v9;
*((_DWORD *)v2 + 1) = v13;
*(_DWORD *)v2 = -1;
}
LABEL_33:
LODWORD(v9) = v50;
}
v32 = *(_QWORD *)(a1 + 16);
v33 = (unsigned int)v9 & ((_DWORD)v32 - 1);
v34 = (unsigned int)v9 & ((unsigned int)(v32 >> 1) - 1);
if ( v33 < *(_QWORD *)(a1 + 24) + 1LL )
v34 = (unsigned int)v33;
v35 = v15 + 16 * v34;
if ( (_OWORD *)v35 == v14 )
{
*(_DWORD *)v35 = -1;
}
else
{
*v14 = *(_OWORD *)v35;
v36 = *(_QWORD *)(a1 + 16);
v37 = *(_DWORD *)(v35 + 4);
v38 = v37 & (unsigned int)(v36 - 1);
v39 = v37 & ((v36 >> 1) - 1);
if ( v38 < *(_QWORD *)(a1 + 24) + 1LL )
v39 = v38;
if ( (_DWORD)v34 == v39 )
{
*(_DWORD *)v35 = ((unsigned long long)v14 - v15) >> 4;
}
else
{
*(_DWORD *)v35 = -1;
v40 = ((unsigned long long)v14 - v15) >> 4;
do
{
v41 = 16LL * v39;
v39 = *(_DWORD *)(v15 + v41);
}
while ( v39 != (_DWORD)v34 );
*(_DWORD *)(v41 + v15) = v40;
}
}
*(_QWORD *)(v35 + 8) = v3;
*(_DWORD *)(v35 + 4) = v9;
v42 = *(_QWORD *)(a1 + 24) + 1LL;
*(_QWORD *)(a1 + 24) = v42;
if ( v42 == *(_QWORD *)(a1 + 16) )
*(_QWORD *)(a1 + 16) = 2 * v42;
return 0;
}
else
{
return 1;
}
}
return result;
}
|
my_hash_insert:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x38
MOV R14,RSI
MOV RBX,RDI
MOV RAX,qword ptr [RDI + 0x50]
TEST RAX,RAX
JZ 0x0014f2b7
LEA R15,[RBP + -0x50]
MOV RDI,R14
MOV RSI,R15
MOV EDX,0x1
CALL RAX
MOV R12,RAX
MOV RDX,qword ptr [R15]
JMP 0x0014f2c5
LAB_0014f2b7:
MOV RDX,qword ptr [RBX + 0x8]
MOV qword ptr [RBP + -0x50],RDX
MOV R12,qword ptr [RBX]
ADD R12,R14
LAB_0014f2c5:
MOV RDI,qword ptr [RBX + 0x68]
MOV RSI,R12
CALL qword ptr [RBX + 0x58]
MOV R15D,EAX
TEST byte ptr [RBX + 0x20],0x1
JZ 0x0014f2fc
MOV RCX,qword ptr [RBP + -0x50]
LEA R8,[RBP + -0x5c]
MOV RDI,RBX
MOV ESI,R15D
MOV RDX,R12
CALL 0x0014f097
MOV RCX,RAX
MOV AL,0x1
TEST RCX,RCX
JNZ 0x0014f573
LAB_0014f2fc:
LEA RDI,[RBX + 0x28]
CALL 0x0014cf8c
TEST RAX,RAX
JZ 0x0014f4aa
MOV RDI,RAX
MOV EDX,0xffffffff
MOV RCX,qword ptr [RBX + 0x28]
MOV RSI,qword ptr [RBX + 0x10]
CMP RSI,0x2
JC 0x0014f4bc
MOV dword ptr [RBP + -0x2c],R15D
MOV qword ptr [RBP + -0x48],R14
MOV R12,qword ptr [RBX + 0x18]
SHR RSI,0x1
SUB R12,RSI
XOR R8D,R8D
MOV qword ptr [RBP + -0x58],R12
LAB_0014f341:
MOV R14,RDI
MOV RAX,R12
SHL RAX,0x4
MOV R10D,dword ptr [RCX + RAX*0x1 + 0x4]
TEST R8D,R8D
JNZ 0x0014f394
MOV RDI,qword ptr [RBX + 0x10]
LEA R9D,[RDI + RDX*0x1]
MOV RDX,RSI
MOV RSI,R15
MOV R15D,R11D
MOV R11D,R10D
AND R11D,R9D
SHR RDI,0x1
DEC EDI
AND EDI,R10D
CMP R11,qword ptr [RBX + 0x18]
CMOVC EDI,R11D
MOV R11D,R15D
MOV R15,RSI
MOV RSI,RDX
MOV EDX,0xffffffff
CMP qword ptr [RBP + -0x58],RDI
JNZ 0x0014f4b1
LAB_0014f394:
ADD RAX,RCX
TEST ESI,R10D
JZ 0x0014f3bc
TEST R8B,0x4
JNZ 0x0014f3f3
AND R8D,0x1
OR R8D,0x4
MOV R15,qword ptr [RAX + 0x8]
MOV R11D,R10D
MOV RDI,RAX
MOV R13,R14
JMP 0x0014f45b
LAB_0014f3bc:
TEST R8B,0x1
JNZ 0x0014f420
AND R8D,0x4
MOV R9D,R8D
SHR R9D,0x1
ADD R9D,0x3
TEST R8D,R8D
MOV RDI,RAX
CMOVZ RDI,R14
CMOVZ R14,RAX
MOV R8,qword ptr [RAX + 0x8]
MOV qword ptr [RBP + -0x40],R8
MOV dword ptr [RBP + -0x30],R10D
MOV R8D,R9D
MOV qword ptr [RBP + -0x38],R14
JMP 0x0014f45b
LAB_0014f3f3:
TEST R8B,0x8
JNZ 0x0014f411
MOV qword ptr [R13 + 0x8],R15
MOV dword ptr [R13 + 0x4],R11D
MOV dword ptr [R13],R12D
AND R8D,0x1
OR R8D,0xc
MOV R10D,dword ptr [RAX + 0x4]
LAB_0014f411:
MOV R15,qword ptr [RAX + 0x8]
MOV R11D,R10D
MOV RDI,R14
MOV R13,RAX
JMP 0x0014f45b
LAB_0014f420:
TEST R8B,0x2
JNZ 0x0014f448
MOV RDI,qword ptr [RBP + -0x40]
MOV R9,qword ptr [RBP + -0x38]
MOV qword ptr [R9 + 0x8],RDI
MOV EDI,dword ptr [RBP + -0x30]
MOV dword ptr [R9 + 0x4],EDI
MOV dword ptr [R9],R12D
AND R8D,0x4
OR R8D,0x3
MOV R10D,dword ptr [RAX + 0x4]
LAB_0014f448:
MOV RDI,qword ptr [RAX + 0x8]
MOV qword ptr [RBP + -0x40],RDI
MOV dword ptr [RBP + -0x30],R10D
MOV RDI,R14
MOV qword ptr [RBP + -0x38],RAX
LAB_0014f45b:
MOV R12D,dword ptr [RAX]
CMP R12,RDX
JNZ 0x0014f341
MOV EAX,R8D
AND EAX,0x3
CMP EAX,0x1
JNZ 0x0014f48a
MOV RAX,qword ptr [RBP + -0x40]
MOV RSI,qword ptr [RBP + -0x38]
MOV qword ptr [RSI + 0x8],RAX
MOV EAX,dword ptr [RBP + -0x30]
MOV dword ptr [RSI + 0x4],EAX
MOV dword ptr [RSI],0xffffffff
LAB_0014f48a:
AND R8D,0xc
CMP R8D,0x4
MOV R14,qword ptr [RBP + -0x48]
JNZ 0x0014f4b8
MOV qword ptr [R13 + 0x8],R15
MOV dword ptr [R13 + 0x4],R11D
MOV dword ptr [R13],0xffffffff
JMP 0x0014f4b8
LAB_0014f4aa:
MOV AL,0x1
JMP 0x0014f573
LAB_0014f4b1:
MOV RDI,R14
MOV R14,qword ptr [RBP + -0x48]
LAB_0014f4b8:
MOV R15D,dword ptr [RBP + -0x2c]
LAB_0014f4bc:
MOV RAX,qword ptr [RBX + 0x10]
MOV RSI,qword ptr [RBX + 0x18]
INC RSI
LEA R8D,[RAX + RDX*0x1]
AND R8D,R15D
SHR RAX,0x1
DEC EAX
AND EAX,R15D
CMP R8,RSI
CMOVC EAX,R8D
MOV RSI,RAX
SHL RSI,0x4
ADD RSI,RCX
CMP RSI,RDI
JZ 0x0014f527
MOVUPS XMM0,xmmword ptr [RSI]
MOVUPS xmmword ptr [RDI],XMM0
MOV R8,qword ptr [RBX + 0x10]
MOV R9,qword ptr [RBX + 0x18]
INC R9
MOV R10D,dword ptr [RSI + 0x4]
ADD EDX,R8D
AND EDX,R10D
SHR R8,0x1
DEC R8D
AND R8D,R10D
CMP RDX,R9
CMOVC R8D,EDX
CMP EAX,R8D
JNZ 0x0014f52f
SUB RDI,RCX
SHR RDI,0x4
MOV dword ptr [RSI],EDI
JMP 0x0014f551
LAB_0014f527:
MOV dword ptr [RSI],0xffffffff
JMP 0x0014f551
LAB_0014f52f:
MOV dword ptr [RSI],0xffffffff
SUB RDI,RCX
SHR RDI,0x4
LAB_0014f53c:
MOV EDX,R8D
SHL RDX,0x4
MOV R8D,dword ptr [RCX + RDX*0x1]
CMP R8D,EAX
JNZ 0x0014f53c
ADD RCX,RDX
MOV dword ptr [RCX],EDI
LAB_0014f551:
MOV qword ptr [RSI + 0x8],R14
MOV dword ptr [RSI + 0x4],R15D
MOV RAX,qword ptr [RBX + 0x18]
INC RAX
MOV qword ptr [RBX + 0x18],RAX
CMP RAX,qword ptr [RBX + 0x10]
JNZ 0x0014f571
ADD RAX,RAX
MOV qword ptr [RBX + 0x10],RAX
LAB_0014f571:
XOR EAX,EAX
LAB_0014f573:
ADD RSP,0x38
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
int8 my_hash_insert(long *param_1,long param_2)
{
uint uVar1;
long lVar2;
uint *puVar3;
uint *puVar4;
int8 uVar5;
ulong uVar6;
uint uVar7;
ulong uVar8;
uint *puVar9;
ulong uVar10;
uint uVar11;
uint uVar12;
ulong uVar13;
ulong in_R11;
ulong uVar14;
ulong uVar15;
uint *unaff_R13;
long local_58 [2];
int8 local_48;
uint *local_40;
uint local_38;
if ((code *)param_1[10] == (code *)0x0) {
local_58[0] = param_1[1];
lVar2 = *param_1 + param_2;
}
else {
lVar2 = (*(code *)param_1[10])(param_2,local_58,1);
}
uVar1 = (*(code *)param_1[0xb])(param_1[0xd],lVar2,local_58[0]);
uVar6 = (ulong)uVar1;
if (((*(byte *)(param_1 + 4) & 1) != 0) &&
(lVar2 = my_hash_first_from_hash_value(param_1,uVar6,lVar2,local_58[0]), lVar2 != 0)) {
return 1;
}
puVar3 = (uint *)alloc_dynamic(param_1 + 5);
if (puVar3 == (uint *)0x0) {
uVar5 = 1;
}
else {
lVar2 = param_1[5];
if (1 < (ulong)param_1[2]) {
uVar8 = (ulong)param_1[2] >> 1;
uVar15 = param_1[3] - uVar8;
uVar11 = 0;
uVar13 = uVar15;
do {
uVar7 = *(uint *)(lVar2 + 4 + uVar13 * 0x10);
if (uVar11 == 0) {
in_R11 = in_R11 & 0xffffffff;
uVar14 = (ulong)(uVar7 & (int)param_1[2] - 1U);
uVar10 = (ulong)((int)((ulong)param_1[2] >> 1) - 1U & uVar7);
if (uVar14 < (ulong)param_1[3]) {
uVar10 = uVar14;
}
if (uVar15 != uVar10) goto LAB_0014f4bc;
}
puVar4 = (uint *)(uVar13 * 0x10 + lVar2);
puVar9 = puVar4;
if (((uint)uVar8 & uVar7) == 0) {
if ((uVar11 & 1) == 0) {
uVar12 = uVar11 & 4;
uVar11 = (uVar12 >> 1) + 3;
local_40 = puVar3;
if (uVar12 == 0) {
local_40 = puVar4;
puVar9 = puVar3;
}
local_48 = *(int8 *)(puVar4 + 2);
local_38 = uVar7;
}
else {
if ((uVar11 & 2) == 0) {
*(int8 *)(local_40 + 2) = local_48;
local_40[1] = local_38;
*local_40 = (uint)uVar13;
uVar11 = uVar11 & 4 | 3;
uVar7 = puVar4[1];
}
local_48 = *(int8 *)(puVar4 + 2);
puVar9 = puVar3;
local_40 = puVar4;
local_38 = uVar7;
}
}
else if ((uVar11 & 4) == 0) {
uVar11 = uVar11 & 1 | 4;
uVar6 = *(ulong *)(puVar4 + 2);
in_R11 = (ulong)uVar7;
unaff_R13 = puVar3;
}
else {
if ((uVar11 & 8) == 0) {
*(ulong *)(unaff_R13 + 2) = uVar6;
unaff_R13[1] = (uint)in_R11;
*unaff_R13 = (uint)uVar13;
uVar11 = uVar11 & 1 | 0xc;
uVar7 = puVar4[1];
}
uVar6 = *(ulong *)(puVar4 + 2);
in_R11 = (ulong)uVar7;
puVar9 = puVar3;
unaff_R13 = puVar4;
}
uVar13 = (ulong)*puVar4;
puVar3 = puVar9;
} while (uVar13 != 0xffffffff);
if ((uVar11 & 3) == 1) {
*(int8 *)(local_40 + 2) = local_48;
local_40[1] = local_38;
*local_40 = 0xffffffff;
}
if ((uVar11 & 0xc) == 4) {
*(ulong *)(unaff_R13 + 2) = uVar6;
unaff_R13[1] = (uint)in_R11;
*unaff_R13 = 0xffffffff;
}
}
LAB_0014f4bc:
uVar13 = (ulong)((int)param_1[2] - 1U & uVar1);
uVar6 = (ulong)((int)((ulong)param_1[2] >> 1) - 1U & uVar1);
if (uVar13 < param_1[3] + 1U) {
uVar6 = uVar13;
}
puVar9 = (uint *)(uVar6 * 0x10 + lVar2);
if (puVar9 == puVar3) {
*puVar9 = 0xffffffff;
}
else {
uVar5 = *(int8 *)(puVar9 + 2);
*(int8 *)puVar3 = *(int8 *)puVar9;
*(int8 *)(puVar3 + 2) = uVar5;
uVar7 = (int)param_1[2] - 1U & puVar9[1];
uVar11 = (int)((ulong)param_1[2] >> 1) - 1U & puVar9[1];
if ((ulong)uVar7 < param_1[3] + 1U) {
uVar11 = uVar7;
}
if ((uint)uVar6 == uVar11) {
*puVar9 = (uint)((ulong)((long)puVar3 - lVar2) >> 4);
}
else {
*puVar9 = 0xffffffff;
do {
uVar13 = (ulong)uVar11;
uVar11 = *(uint *)(lVar2 + uVar13 * 0x10);
} while (uVar11 != (uint)uVar6);
*(int *)(lVar2 + uVar13 * 0x10) = (int)((ulong)((long)puVar3 - lVar2) >> 4);
}
}
*(long *)(puVar9 + 2) = param_2;
puVar9[1] = uVar1;
lVar2 = param_1[3] + 1;
param_1[3] = lVar2;
if (lVar2 == param_1[2]) {
param_1[2] = lVar2 * 2;
}
uVar5 = 0;
}
return uVar5;
}
|
|
64,321 |
update_dynamic_record
|
eloqsql/storage/myisam/mi_dynrec.c
|
static int update_dynamic_record(MI_INFO *info, my_off_t filepos, uchar *record,
ulong reclength)
{
int flag;
uint error;
ulong length;
MI_BLOCK_INFO block_info;
DBUG_ENTER("update_dynamic_record");
flag=block_info.second_read=0;
/*
Check if we have enough room for the record.
First we do simplified check to make usual case faster.
Then we do more precise check for the space left.
Though it still is not absolutely precise, as
we always use MI_MAX_DYN_BLOCK_HEADER while it can be
less in the most of the cases.
*/
/*
compare with just the reclength as we're going
to get some space from the old replaced record
*/
if (unlikely(info->s->base.max_data_file_length -
info->state->data_file_length < reclength))
{
/*
let's read the old record's block to find out the length of the
old record
*/
if ((error=_mi_get_block_info(&block_info,info->dfile,filepos))
& (BLOCK_DELETED | BLOCK_ERROR | BLOCK_SYNC_ERROR | BLOCK_FATAL_ERROR))
{
DBUG_PRINT("error",("Got wrong block info"));
if (!(error & BLOCK_FATAL_ERROR))
my_errno=HA_ERR_WRONG_IN_RECORD;
goto err;
}
/*
if new record isn't longer, we can go on safely
*/
if (block_info.rec_len < reclength)
{
if (info->s->base.max_data_file_length - info->state->data_file_length +
info->state->empty - info->state->del * MI_MAX_DYN_BLOCK_HEADER <
reclength - block_info.rec_len + MI_MAX_DYN_BLOCK_HEADER)
{
my_errno=HA_ERR_RECORD_FILE_FULL;
goto err;
}
}
block_info.second_read=0;
}
while (reclength > 0)
{
if (filepos != info->s->state.dellink)
{
block_info.next_filepos= HA_OFFSET_ERROR;
if ((error=_mi_get_block_info(&block_info,info->dfile,filepos))
& (BLOCK_DELETED | BLOCK_ERROR | BLOCK_SYNC_ERROR |
BLOCK_FATAL_ERROR))
{
DBUG_PRINT("error",("Got wrong block info"));
if (!(error & BLOCK_FATAL_ERROR))
my_errno=HA_ERR_WRONG_IN_RECORD;
goto err;
}
length=(ulong) (block_info.filepos-filepos) + block_info.block_len;
if (length < reclength)
{
uint tmp=MY_ALIGN(reclength - length + 3 +
MY_TEST(reclength >= 65520L), MI_DYN_ALIGN_SIZE);
/* Don't create a block bigger than MI_MAX_BLOCK_LENGTH */
tmp= MY_MIN(length+tmp, MI_MAX_BLOCK_LENGTH)-length;
/* Check if we can extend this block */
if (block_info.filepos + block_info.block_len ==
info->state->data_file_length &&
info->state->data_file_length <
info->s->base.max_data_file_length-tmp)
{
/* extend file */
DBUG_PRINT("info",("Extending file with %d bytes",tmp));
if (info->nextpos == info->state->data_file_length)
info->nextpos+= tmp;
info->state->data_file_length+= tmp;
info->update|= HA_STATE_WRITE_AT_END | HA_STATE_EXTEND_BLOCK;
length+=tmp;
}
else if (length < MI_MAX_BLOCK_LENGTH - MI_MIN_BLOCK_LENGTH)
{
/*
Check if next block is a deleted block
Above we have MI_MIN_BLOCK_LENGTH to avoid the problem where
the next block is so small it can't be split which could
cause problems
*/
MI_BLOCK_INFO del_block;
del_block.second_read=0;
if (_mi_get_block_info(&del_block,info->dfile,
block_info.filepos + block_info.block_len) &
BLOCK_DELETED)
{
/* Use; Unlink it and extend the current block */
DBUG_PRINT("info",("Extending current block"));
if (unlink_deleted_block(info,&del_block))
goto err;
if ((length+=del_block.block_len) > MI_MAX_BLOCK_LENGTH)
{
/*
New block was too big, link overflow part back to
delete list
*/
my_off_t next_pos;
ulong rest_length= length-MI_MAX_BLOCK_LENGTH;
set_if_bigger(rest_length, MI_MIN_BLOCK_LENGTH);
next_pos= del_block.filepos+ del_block.block_len - rest_length;
if (update_backward_delete_link(info, info->s->state.dellink,
next_pos))
DBUG_RETURN(1);
/* create delete link for data that didn't fit into the page */
del_block.header[0]=0;
mi_int3store(del_block.header+1, rest_length);
mi_sizestore(del_block.header+4,info->s->state.dellink);
bfill(del_block.header+12,8,255);
if (info->s->file_write(info,(uchar*) del_block.header,20, next_pos,
MYF(MY_NABP)))
DBUG_RETURN(1);
info->s->state.dellink= next_pos;
info->s->state.split++;
info->state->del++;
info->state->empty+= rest_length;
length-= rest_length;
}
}
}
}
}
else
{
if (_mi_find_writepos(info,reclength,&filepos,&length))
goto err;
}
if (_mi_write_part_record(info,filepos,length,block_info.next_filepos,
&record,&reclength,&flag))
goto err;
if ((filepos=block_info.next_filepos) == HA_OFFSET_ERROR)
{
/* Start writing data on deleted blocks */
filepos=info->s->state.dellink;
}
}
if (block_info.next_filepos != HA_OFFSET_ERROR)
{
/*
delete_dynamic_record() may change data file position.
IO cache must be notified as it may still have cached
data, which has to be flushed later.
*/
info->rec_cache.seek_not_done= 1;
if (delete_dynamic_record(info,block_info.next_filepos,1))
goto err;
}
DBUG_RETURN(0);
err:
DBUG_RETURN(1);
}
|
O3
|
c
|
update_dynamic_record:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xf8, %rsp
movq %rcx, %r13
movq %rsi, %r14
movq %rdi, %rbx
movq %fs:0x28, %rax
movq %rax, -0x30(%rbp)
movq %rsi, -0xf0(%rbp)
movq %rdx, -0x110(%rbp)
movq %rcx, -0x108(%rbp)
xorl %eax, %eax
movl %eax, -0x38(%rbp)
movl %eax, -0xf4(%rbp)
movq (%rdi), %rax
movq 0x8(%rdi), %rcx
movq 0x110(%rax), %rax
subq 0x28(%rcx), %rax
cmpq %r13, %rax
jb 0x78b90
testq %r13, %r13
je 0x78b62
leaq -0x108(%rbp), %r15
movq (%rbx), %rax
cmpq 0x58(%rax), %r14
jne 0x788c0
movq %rbx, %rdi
movq %r13, %rsi
leaq -0xf0(%rbp), %rdx
leaq -0xe8(%rbp), %rcx
callq 0x7b0f5
testl %eax, %eax
jne 0x78bff
movq -0xf0(%rbp), %r14
movq -0xe8(%rbp), %r12
jmp 0x78aff
movq $-0x1, -0x48(%rbp)
movl 0x1c0(%rbx), %esi
leaq -0x88(%rbp), %rdi
movq %r14, %rdx
callq 0x796a3
cmpl $0x4, %eax
jae 0x78bf4
movq -0x60(%rbp), %rdx
movq -0x50(%rbp), %rax
movq %rax, %r12
subq %r14, %r12
addq %rdx, %r12
movq %r12, -0xe8(%rbp)
cmpq %r13, %r12
jae 0x78aff
addq %rax, %rdx
movq 0x8(%rbx), %rax
cmpq 0x28(%rax), %rdx
jne 0x7897b
cmpq $0xfff0, %r13 # imm = 0xFFF0
sbbl $-0x1, %r13d
subl %r12d, %r13d
addl $0x6, %r13d
andl $-0x4, %r13d
addq %r12, %r13
movl $0xfffffc, %ecx # imm = 0xFFFFFC
cmpq %rcx, %r13
cmovaeq %rcx, %r13
subl %r12d, %r13d
movq (%rbx), %rcx
movq 0x110(%rcx), %rcx
subq %r13, %rcx
cmpq %rcx, %rdx
jae 0x7897b
cmpq %rdx, 0x178(%rbx)
jne 0x78965
addq %r13, %rdx
movq %rdx, 0x178(%rbx)
movq 0x28(%rax), %rdx
addq %r13, %rdx
movq %rdx, 0x28(%rax)
orb $0x9, 0x1d1(%rbx)
addq %r13, %r12
jmp 0x78af8
cmpq $0xffffe7, %r12 # imm = 0xFFFFE7
ja 0x78aff
movl $0x0, -0x90(%rbp)
movl 0x1c0(%rbx), %esi
leaq -0xe0(%rbp), %r13
movq %r13, %rdi
callq 0x796a3
testb $0x4, %al
je 0x78aff
movq %rbx, %rdi
movq %r13, %rsi
callq 0x79a79
testb %al, %al
jne 0x78bff
movq -0xb8(%rbp), %r13
addq %r13, %r12
movq %r12, -0xe8(%rbp)
cmpq $0xfffffd, %r12 # imm = 0xFFFFFD
jb 0x78aff
leaq -0xfffffc(%r12), %rcx
cmpq $0x15, %rcx
movl $0x14, %eax
cmovbq %rax, %rcx
movq %rcx, -0x100(%rbp)
subq %rcx, %r13
addq -0xa8(%rbp), %r13
movq (%rbx), %rax
movq 0x58(%rax), %rsi
movq %rbx, %rdi
movq %r13, %rdx
callq 0x79baa
testl %eax, %eax
jne 0x78bff
movb $0x0, -0xe0(%rbp)
movq -0x100(%rbp), %rax
movb %al, -0xdd(%rbp)
movb %ah, -0xde(%rbp)
shrl $0x10, %eax
movb %al, -0xdf(%rbp)
movq (%rbx), %rax
movq 0x58(%rax), %rcx
movq %rcx, %rdx
shrq $0x20, %rdx
movb %dl, -0xd9(%rbp)
movq %rcx, %rdx
shrq $0x28, %rdx
movb %dl, -0xda(%rbp)
movq %rcx, %rdx
shrq $0x30, %rdx
movb %dl, -0xdb(%rbp)
movq %rcx, %rdx
shrq $0x38, %rdx
movb %dl, -0xdc(%rbp)
movb %cl, -0xd5(%rbp)
movb %ch, -0xd6(%rbp)
movl %ecx, %edx
shrl $0x10, %edx
movb %dl, -0xd7(%rbp)
shrl $0x18, %ecx
movb %cl, -0xd8(%rbp)
movq $-0x1, -0xd4(%rbp)
movl $0x14, %edx
movl $0x4, %r8d
movq %rbx, %rdi
leaq -0xe0(%rbp), %rsi
movq %r13, %rcx
callq *0x2e8(%rax)
testq %rax, %rax
jne 0x78bff
movq (%rbx), %rax
movq %r13, 0x58(%rax)
movq (%rbx), %rax
incq 0x50(%rax)
movq 0x8(%rbx), %rax
incq 0x8(%rax)
movq 0x8(%rbx), %rax
movq -0x100(%rbp), %rcx
addq %rcx, 0x10(%rax)
subq %rcx, %r12
movq %r12, -0xe8(%rbp)
movq -0x48(%rbp), %rcx
leaq -0xf4(%rbp), %rax
movq %rax, (%rsp)
movq %rbx, %rdi
movq %r14, %rsi
movq %r12, %rdx
leaq -0x110(%rbp), %r8
movq %r15, %r9
callq 0x78fbc
testl %eax, %eax
jne 0x78bff
movq -0x48(%rbp), %rsi
movq %rsi, -0xf0(%rbp)
movq %rsi, %r14
cmpq $-0x1, %rsi
jne 0x78b50
movq (%rbx), %rax
movq 0x58(%rax), %r14
movq %r14, -0xf0(%rbp)
movq -0x108(%rbp), %r13
testq %r13, %r13
jne 0x78883
jmp 0x78b66
movq -0x48(%rbp), %rsi
xorl %r14d, %r14d
cmpq $-0x1, %rsi
je 0x78c05
movl $0x1, 0x300(%rbx)
movq %rbx, %rdi
movl $0x1, %edx
callq 0x78de7
testl %eax, %eax
jne 0x78bff
jmp 0x78c05
movl 0x1c0(%rbx), %esi
leaq -0x88(%rbp), %rdi
movq %r14, %rdx
callq 0x796a3
cmpl $0x4, %eax
jae 0x78bf4
movq -0x70(%rbp), %rax
cmpq %r13, %rax
jae 0x78c29
movq (%rbx), %rcx
movq 0x8(%rbx), %rdx
movq 0x110(%rcx), %rcx
subq 0x28(%rdx), %rcx
addq 0x10(%rdx), %rcx
movq 0x8(%rdx), %rdx
shlq $0x2, %rdx
leaq (%rdx,%rdx,4), %rdx
subq %rdx, %rcx
movq %r13, %rdx
subq %rax, %rdx
addq $0x14, %rdx
cmpq %rdx, %rcx
jae 0x78c29
callq 0xa2f56
movl $0x87, (%rax)
jmp 0x78bff
callq 0xa2f56
movl $0x7f, (%rax)
movl $0x1, %r14d
movq %fs:0x28, %rax
cmpq -0x30(%rbp), %rax
jne 0x78c35
movl %r14d, %eax
addq $0xf8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl $0x0, -0x38(%rbp)
jmp 0x7887c
callq 0x29250
|
update_dynamic_record_0:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 0F8h
mov r13, rcx
mov r14, rsi
mov rbx, rdi
mov rax, fs:28h
mov [rbp+var_30], rax
mov [rbp+var_F0], rsi
mov [rbp+var_110], rdx
mov [rbp+var_108], rcx
xor eax, eax
mov [rbp+var_38], eax
mov [rbp+var_F4], eax
mov rax, [rdi]
mov rcx, [rdi+8]
mov rax, [rax+110h]
sub rax, [rcx+28h]
cmp rax, r13
jb loc_78B90
test r13, r13
jz loc_78B62
loc_7887C:
lea r15, [rbp+var_108]
loc_78883:
mov rax, [rbx]
cmp r14, [rax+58h]
jnz short loc_788C0
mov rdi, rbx
mov rsi, r13
lea rdx, [rbp+var_F0]
lea rcx, [rbp+var_E8]
call _mi_find_writepos
test eax, eax
jnz loc_78BFF
mov r14, [rbp+var_F0]
mov r12, [rbp+var_E8]
jmp loc_78AFF
loc_788C0:
mov [rbp+var_48], 0FFFFFFFFFFFFFFFFh
mov esi, [rbx+1C0h]
lea rdi, [rbp+var_88]
mov rdx, r14
call _mi_get_block_info
cmp eax, 4
jnb loc_78BF4
mov rdx, [rbp+var_60]
mov rax, [rbp+var_50]
mov r12, rax
sub r12, r14
add r12, rdx
mov [rbp+var_E8], r12
cmp r12, r13
jnb loc_78AFF
add rdx, rax
mov rax, [rbx+8]
cmp rdx, [rax+28h]
jnz short loc_7897B
cmp r13, 0FFF0h
sbb r13d, 0FFFFFFFFh
sub r13d, r12d
add r13d, 6
and r13d, 0FFFFFFFCh
add r13, r12
mov ecx, 0FFFFFCh
cmp r13, rcx
cmovnb r13, rcx
sub r13d, r12d
mov rcx, [rbx]
mov rcx, [rcx+110h]
sub rcx, r13
cmp rdx, rcx
jnb short loc_7897B
cmp [rbx+178h], rdx
jnz short loc_78965
add rdx, r13
mov [rbx+178h], rdx
mov rdx, [rax+28h]
loc_78965:
add rdx, r13
mov [rax+28h], rdx
or byte ptr [rbx+1D1h], 9
add r12, r13
jmp loc_78AF8
loc_7897B:
cmp r12, 0FFFFE7h
ja loc_78AFF
mov [rbp+var_90], 0
mov esi, [rbx+1C0h]
lea r13, [rbp+var_E0]
mov rdi, r13
call _mi_get_block_info
test al, 4
jz loc_78AFF
mov rdi, rbx
mov rsi, r13
call unlink_deleted_block_0
test al, al
jnz loc_78BFF
mov r13, [rbp+var_B8]
add r12, r13
mov [rbp+var_E8], r12
cmp r12, 0FFFFFDh
jb loc_78AFF
lea rcx, [r12-0FFFFFCh]
cmp rcx, 15h
mov eax, 14h
cmovb rcx, rax
mov [rbp+var_100], rcx
sub r13, rcx
add r13, [rbp+var_A8]
mov rax, [rbx]
mov rsi, [rax+58h]
mov rdi, rbx
mov rdx, r13
call update_backward_delete_link_0
test eax, eax
jnz loc_78BFF
mov [rbp+var_E0], 0
mov rax, [rbp+var_100]
mov [rbp+var_DD], al
mov [rbp+var_DE], ah
shr eax, 10h
mov [rbp+var_DF], al
mov rax, [rbx]
mov rcx, [rax+58h]
mov rdx, rcx
shr rdx, 20h
mov [rbp+var_D9], dl
mov rdx, rcx
shr rdx, 28h
mov [rbp+var_DA], dl
mov rdx, rcx
shr rdx, 30h
mov [rbp+var_DB], dl
mov rdx, rcx
shr rdx, 38h
mov [rbp+var_DC], dl
mov [rbp+var_D5], cl
mov [rbp+var_D6], ch
mov edx, ecx
shr edx, 10h
mov [rbp+var_D7], dl
shr ecx, 18h
mov [rbp+var_D8], cl
mov [rbp+var_D4], 0FFFFFFFFFFFFFFFFh
mov edx, 14h
mov r8d, 4
mov rdi, rbx
lea rsi, [rbp+var_E0]
mov rcx, r13
call qword ptr [rax+2E8h]
test rax, rax
jnz loc_78BFF
mov rax, [rbx]
mov [rax+58h], r13
mov rax, [rbx]
inc qword ptr [rax+50h]
mov rax, [rbx+8]
inc qword ptr [rax+8]
mov rax, [rbx+8]
mov rcx, [rbp+var_100]
add [rax+10h], rcx
sub r12, rcx
loc_78AF8:
mov [rbp+var_E8], r12
loc_78AFF:
mov rcx, [rbp+var_48]
lea rax, [rbp+var_F4]
mov [rsp+120h+var_120], rax
mov rdi, rbx
mov rsi, r14
mov rdx, r12
lea r8, [rbp+var_110]
mov r9, r15
call _mi_write_part_record
test eax, eax
jnz loc_78BFF
mov rsi, [rbp+var_48]
mov [rbp+var_F0], rsi
mov r14, rsi
cmp rsi, 0FFFFFFFFFFFFFFFFh
jnz short loc_78B50
mov rax, [rbx]
mov r14, [rax+58h]
mov [rbp+var_F0], r14
loc_78B50:
mov r13, [rbp+var_108]
test r13, r13
jnz loc_78883
jmp short loc_78B66
loc_78B62:
mov rsi, [rbp+var_48]
loc_78B66:
xor r14d, r14d
cmp rsi, 0FFFFFFFFFFFFFFFFh
jz loc_78C05
mov dword ptr [rbx+300h], 1
mov rdi, rbx
mov edx, 1
call delete_dynamic_record_0
test eax, eax
jnz short loc_78BFF
jmp short loc_78C05
loc_78B90:
mov esi, [rbx+1C0h]
lea rdi, [rbp+var_88]
mov rdx, r14
call _mi_get_block_info
cmp eax, 4
jnb short loc_78BF4
mov rax, [rbp+var_70]
cmp rax, r13
jnb short loc_78C29
mov rcx, [rbx]
mov rdx, [rbx+8]
mov rcx, [rcx+110h]
sub rcx, [rdx+28h]
add rcx, [rdx+10h]
mov rdx, [rdx+8]
shl rdx, 2
lea rdx, [rdx+rdx*4]
sub rcx, rdx
mov rdx, r13
sub rdx, rax
add rdx, 14h
cmp rcx, rdx
jnb short loc_78C29
call _my_thread_var
mov dword ptr [rax], 87h
jmp short loc_78BFF
loc_78BF4:
call _my_thread_var
mov dword ptr [rax], 7Fh
loc_78BFF:
mov r14d, 1
loc_78C05:
mov rax, fs:28h
cmp rax, [rbp+var_30]
jnz short loc_78C35
mov eax, r14d
add rsp, 0F8h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_78C29:
mov [rbp+var_38], 0
jmp loc_7887C
loc_78C35:
call ___stack_chk_fail
|
long long update_dynamic_record_0(long long *a1, long long a2, long long a3, unsigned long long a4)
{
unsigned long long v4; // r13
long long v5; // r14
unsigned long long v6; // r12
unsigned long long v7; // rdx
long long v8; // rax
unsigned long long v9; // r13
long long v10; // r13
long long v11; // rcx
long long v12; // r13
long long v13; // rax
long long v14; // rcx
long long v15; // rcx
long long v16; // rsi
unsigned int v17; // r14d
long long v19; // [rsp+10h] [rbp-110h] BYREF
unsigned long long v20; // [rsp+18h] [rbp-108h] BYREF
long long v21; // [rsp+20h] [rbp-100h]
int v22; // [rsp+2Ch] [rbp-F4h] BYREF
long long v23; // [rsp+30h] [rbp-F0h] BYREF
unsigned long long v24; // [rsp+38h] [rbp-E8h] BYREF
_BYTE v25[12]; // [rsp+40h] [rbp-E0h] BYREF
long long v26; // [rsp+4Ch] [rbp-D4h]
long long v27; // [rsp+68h] [rbp-B8h]
long long v28; // [rsp+78h] [rbp-A8h]
int v29; // [rsp+90h] [rbp-90h]
_BYTE v30[24]; // [rsp+98h] [rbp-88h] BYREF
unsigned long long v31; // [rsp+B0h] [rbp-70h]
long long v32; // [rsp+C0h] [rbp-60h]
long long v33; // [rsp+D0h] [rbp-50h]
long long v34; // [rsp+D8h] [rbp-48h]
int v35; // [rsp+E8h] [rbp-38h]
unsigned long long v36; // [rsp+F0h] [rbp-30h]
v4 = a4;
v5 = a2;
v36 = __readfsqword(0x28u);
v23 = a2;
v19 = a3;
v20 = a4;
v35 = 0;
v22 = 0;
if ( *(_QWORD *)(*a1 + 272) - *(_QWORD *)(a1[1] + 40) < a4 )
{
if ( (unsigned int)mi_get_block_info(v30, *((unsigned int *)a1 + 112), a2) >= 4 )
{
LABEL_38:
*(_DWORD *)my_thread_var(v30) = 127;
return 1;
}
if ( v31 < v4
&& *(_QWORD *)(a1[1] + 16) + *(_QWORD *)(*a1 + 272) - *(_QWORD *)(a1[1] + 40) - 20LL * *(_QWORD *)(a1[1] + 8) < v4 - v31 + 20 )
{
*(_DWORD *)my_thread_var(v30) = 135;
return 1;
}
v35 = 0;
while ( 1 )
{
LABEL_3:
if ( v5 == *(_QWORD *)(*a1 + 88) )
{
if ( (unsigned int)mi_find_writepos(a1, v4, &v23, &v24) )
return 1;
LODWORD(v5) = v23;
LODWORD(v6) = v24;
}
else
{
v34 = -1LL;
if ( (unsigned int)mi_get_block_info(v30, *((unsigned int *)a1 + 112), v5) >= 4 )
goto LABEL_38;
v6 = v32 + v33 - v5;
v24 = v6;
if ( v6 < v4 )
{
v7 = v33 + v32;
v8 = a1[1];
if ( v33 + v32 != *(_QWORD *)(v8 + 40) )
goto LABEL_44;
v9 = v6 + (((_DWORD)v4 - ((v4 < 0xFFF0) - 1) - (_DWORD)v6 + 6) & 0xFFFFFFFC);
if ( v9 >= 0xFFFFFC )
LODWORD(v9) = 16777212;
v10 = (unsigned int)(v9 - v6);
if ( v7 < *(_QWORD *)(*a1 + 272) - v10 )
{
if ( a1[47] == v7 )
{
a1[47] = v10 + v7;
v7 = *(_QWORD *)(v8 + 40);
}
*(_QWORD *)(v8 + 40) = v10 + v7;
*((_BYTE *)a1 + 465) |= 9u;
v6 += v10;
}
else
{
LABEL_44:
if ( v6 > 0xFFFFE7 )
goto LABEL_25;
v29 = 0;
if ( (mi_get_block_info(v25, *((unsigned int *)a1 + 112), v7) & 4) == 0 )
goto LABEL_25;
if ( (unsigned __int8)unlink_deleted_block_0(a1, v25) )
return 1;
v6 += v27;
v24 = v6;
if ( v6 < 0xFFFFFD )
goto LABEL_25;
v11 = v6 - 16777212;
if ( v6 - 16777212 < 0x15 )
v11 = 20LL;
v21 = v11;
v12 = v28 + v27 - v11;
if ( (unsigned int)update_backward_delete_link_0(a1, *(_QWORD *)(*a1 + 88), v12) )
return 1;
v25[0] = 0;
v25[2] = BYTE1(v21);
v25[3] = v21;
v25[1] = BYTE2(v21);
v13 = *a1;
v14 = *(_QWORD *)(*a1 + 88);
v25[7] = BYTE4(v14);
v25[6] = BYTE5(v14);
v25[5] = BYTE6(v14);
v25[4] = HIBYTE(v14);
v25[10] = BYTE1(v14);
v25[11] = v14;
v25[9] = BYTE2(v14);
v25[8] = BYTE3(v14);
v26 = -1LL;
if ( (*(long long ( **)(long long *, _BYTE *, long long, long long, long long))(v13 + 744))(
a1,
v25,
20LL,
v12,
4LL) )
{
return 1;
}
*(_QWORD *)(*a1 + 88) = v12;
++*(_QWORD *)(*a1 + 80);
++*(_QWORD *)(a1[1] + 8);
v15 = v21;
*(_QWORD *)(a1[1] + 16) += v21;
v6 -= v15;
}
v24 = v6;
}
}
LABEL_25:
if ( (unsigned int)mi_write_part_record(
(_DWORD)a1,
v5,
v6,
v34,
(unsigned int)&v19,
(unsigned int)&v20,
(long long)&v22) )
return 1;
v16 = v34;
v23 = v34;
v5 = v34;
if ( v34 == -1 )
{
v5 = *(_QWORD *)(*a1 + 88);
v23 = v5;
}
v4 = v20;
if ( !v20 )
goto LABEL_31;
}
}
if ( a4 )
goto LABEL_3;
v16 = v34;
LABEL_31:
v17 = 0;
if ( v16 != -1 )
{
*((_DWORD *)a1 + 192) = 1;
if ( (unsigned int)delete_dynamic_record_0(a1, v16, 1LL) )
return 1;
}
return v17;
}
|
update_dynamic_record:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0xf8
MOV R13,RCX
MOV R14,RSI
MOV RBX,RDI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x30],RAX
MOV qword ptr [RBP + -0xf0],RSI
MOV qword ptr [RBP + -0x110],RDX
MOV qword ptr [RBP + -0x108],RCX
XOR EAX,EAX
MOV dword ptr [RBP + -0x38],EAX
MOV dword ptr [RBP + -0xf4],EAX
MOV RAX,qword ptr [RDI]
MOV RCX,qword ptr [RDI + 0x8]
MOV RAX,qword ptr [RAX + 0x110]
SUB RAX,qword ptr [RCX + 0x28]
CMP RAX,R13
JC 0x00178b90
TEST R13,R13
JZ 0x00178b62
LAB_0017887c:
LEA R15,[RBP + -0x108]
LAB_00178883:
MOV RAX,qword ptr [RBX]
CMP R14,qword ptr [RAX + 0x58]
JNZ 0x001788c0
MOV RDI,RBX
MOV RSI,R13
LEA RDX,[RBP + -0xf0]
LEA RCX,[RBP + -0xe8]
CALL 0x0017b0f5
TEST EAX,EAX
JNZ 0x00178bff
MOV R14,qword ptr [RBP + -0xf0]
MOV R12,qword ptr [RBP + -0xe8]
JMP 0x00178aff
LAB_001788c0:
MOV qword ptr [RBP + -0x48],-0x1
MOV ESI,dword ptr [RBX + 0x1c0]
LEA RDI,[RBP + -0x88]
MOV RDX,R14
CALL 0x001796a3
CMP EAX,0x4
JNC 0x00178bf4
MOV RDX,qword ptr [RBP + -0x60]
MOV RAX,qword ptr [RBP + -0x50]
MOV R12,RAX
SUB R12,R14
ADD R12,RDX
MOV qword ptr [RBP + -0xe8],R12
CMP R12,R13
JNC 0x00178aff
ADD RDX,RAX
MOV RAX,qword ptr [RBX + 0x8]
CMP RDX,qword ptr [RAX + 0x28]
JNZ 0x0017897b
CMP R13,0xfff0
SBB R13D,-0x1
SUB R13D,R12D
ADD R13D,0x6
AND R13D,0xfffffffc
ADD R13,R12
MOV ECX,0xfffffc
CMP R13,RCX
CMOVNC R13,RCX
SUB R13D,R12D
MOV RCX,qword ptr [RBX]
MOV RCX,qword ptr [RCX + 0x110]
SUB RCX,R13
CMP RDX,RCX
JNC 0x0017897b
CMP qword ptr [RBX + 0x178],RDX
JNZ 0x00178965
ADD RDX,R13
MOV qword ptr [RBX + 0x178],RDX
MOV RDX,qword ptr [RAX + 0x28]
LAB_00178965:
ADD RDX,R13
MOV qword ptr [RAX + 0x28],RDX
OR byte ptr [RBX + 0x1d1],0x9
ADD R12,R13
JMP 0x00178af8
LAB_0017897b:
CMP R12,0xffffe7
JA 0x00178aff
MOV dword ptr [RBP + -0x90],0x0
MOV ESI,dword ptr [RBX + 0x1c0]
LEA R13,[RBP + -0xe0]
MOV RDI,R13
CALL 0x001796a3
TEST AL,0x4
JZ 0x00178aff
MOV RDI,RBX
MOV RSI,R13
CALL 0x00179a79
TEST AL,AL
JNZ 0x00178bff
MOV R13,qword ptr [RBP + -0xb8]
ADD R12,R13
MOV qword ptr [RBP + -0xe8],R12
CMP R12,0xfffffd
JC 0x00178aff
LEA RCX,[R12 + -0xfffffc]
CMP RCX,0x15
MOV EAX,0x14
CMOVC RCX,RAX
MOV qword ptr [RBP + -0x100],RCX
SUB R13,RCX
ADD R13,qword ptr [RBP + -0xa8]
MOV RAX,qword ptr [RBX]
MOV RSI,qword ptr [RAX + 0x58]
MOV RDI,RBX
MOV RDX,R13
CALL 0x00179baa
TEST EAX,EAX
JNZ 0x00178bff
MOV byte ptr [RBP + -0xe0],0x0
MOV RAX,qword ptr [RBP + -0x100]
MOV byte ptr [RBP + -0xdd],AL
MOV byte ptr [RBP + -0xde],AH
SHR EAX,0x10
MOV byte ptr [RBP + -0xdf],AL
MOV RAX,qword ptr [RBX]
MOV RCX,qword ptr [RAX + 0x58]
MOV RDX,RCX
SHR RDX,0x20
MOV byte ptr [RBP + -0xd9],DL
MOV RDX,RCX
SHR RDX,0x28
MOV byte ptr [RBP + -0xda],DL
MOV RDX,RCX
SHR RDX,0x30
MOV byte ptr [RBP + -0xdb],DL
MOV RDX,RCX
SHR RDX,0x38
MOV byte ptr [RBP + -0xdc],DL
MOV byte ptr [RBP + -0xd5],CL
MOV byte ptr [RBP + -0xd6],CH
MOV EDX,ECX
SHR EDX,0x10
MOV byte ptr [RBP + -0xd7],DL
SHR ECX,0x18
MOV byte ptr [RBP + -0xd8],CL
MOV qword ptr [RBP + -0xd4],-0x1
MOV EDX,0x14
MOV R8D,0x4
MOV RDI,RBX
LEA RSI,[RBP + -0xe0]
MOV RCX,R13
CALL qword ptr [RAX + 0x2e8]
TEST RAX,RAX
JNZ 0x00178bff
MOV RAX,qword ptr [RBX]
MOV qword ptr [RAX + 0x58],R13
MOV RAX,qword ptr [RBX]
INC qword ptr [RAX + 0x50]
MOV RAX,qword ptr [RBX + 0x8]
INC qword ptr [RAX + 0x8]
MOV RAX,qword ptr [RBX + 0x8]
MOV RCX,qword ptr [RBP + -0x100]
ADD qword ptr [RAX + 0x10],RCX
SUB R12,RCX
LAB_00178af8:
MOV qword ptr [RBP + -0xe8],R12
LAB_00178aff:
MOV RCX,qword ptr [RBP + -0x48]
LEA RAX,[RBP + -0xf4]
MOV qword ptr [RSP],RAX
MOV RDI,RBX
MOV RSI,R14
MOV RDX,R12
LEA R8,[RBP + -0x110]
MOV R9,R15
CALL 0x00178fbc
TEST EAX,EAX
JNZ 0x00178bff
MOV RSI,qword ptr [RBP + -0x48]
MOV qword ptr [RBP + -0xf0],RSI
MOV R14,RSI
CMP RSI,-0x1
JNZ 0x00178b50
MOV RAX,qword ptr [RBX]
MOV R14,qword ptr [RAX + 0x58]
MOV qword ptr [RBP + -0xf0],R14
LAB_00178b50:
MOV R13,qword ptr [RBP + -0x108]
TEST R13,R13
JNZ 0x00178883
JMP 0x00178b66
LAB_00178b62:
MOV RSI,qword ptr [RBP + -0x48]
LAB_00178b66:
XOR R14D,R14D
CMP RSI,-0x1
JZ 0x00178c05
MOV dword ptr [RBX + 0x300],0x1
MOV RDI,RBX
MOV EDX,0x1
CALL 0x00178de7
TEST EAX,EAX
JNZ 0x00178bff
JMP 0x00178c05
LAB_00178b90:
MOV ESI,dword ptr [RBX + 0x1c0]
LEA RDI,[RBP + -0x88]
MOV RDX,R14
CALL 0x001796a3
CMP EAX,0x4
JNC 0x00178bf4
MOV RAX,qword ptr [RBP + -0x70]
CMP RAX,R13
JNC 0x00178c29
MOV RCX,qword ptr [RBX]
MOV RDX,qword ptr [RBX + 0x8]
MOV RCX,qword ptr [RCX + 0x110]
SUB RCX,qword ptr [RDX + 0x28]
ADD RCX,qword ptr [RDX + 0x10]
MOV RDX,qword ptr [RDX + 0x8]
SHL RDX,0x2
LEA RDX,[RDX + RDX*0x4]
SUB RCX,RDX
MOV RDX,R13
SUB RDX,RAX
ADD RDX,0x14
CMP RCX,RDX
JNC 0x00178c29
CALL 0x001a2f56
MOV dword ptr [RAX],0x87
JMP 0x00178bff
LAB_00178bf4:
CALL 0x001a2f56
MOV dword ptr [RAX],0x7f
LAB_00178bff:
MOV R14D,0x1
LAB_00178c05:
MOV RAX,qword ptr FS:[0x28]
CMP RAX,qword ptr [RBP + -0x30]
JNZ 0x00178c35
MOV EAX,R14D
ADD RSP,0xf8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_00178c29:
MOV dword ptr [RBP + -0x38],0x0
JMP 0x0017887c
LAB_00178c35:
CALL 0x00129250
|
int8 update_dynamic_record(long *param_1,long param_2,int8 param_3,ulong param_4)
{
char cVar1;
int iVar2;
uint uVar3;
long lVar4;
int4 *puVar5;
ulong uVar6;
ulong uVar7;
ulong uVar8;
long lVar9;
int8 uVar10;
long in_FS_OFFSET;
int8 local_118;
ulong local_110;
ulong local_108;
int4 local_fc;
long local_f8;
ulong local_f0;
int1 local_e8;
int1 local_e7;
int1 local_e6;
int1 local_e5;
int1 local_e4;
int1 local_e3;
int1 local_e2;
int1 local_e1;
int1 local_e0;
int1 local_df;
int1 local_de;
int1 local_dd;
int8 local_dc;
long local_c0;
long local_b0;
int4 local_98;
int1 local_90 [24];
ulong local_78;
long local_68;
long local_58;
long local_50;
int4 local_40;
long local_38;
local_38 = *(long *)(in_FS_OFFSET + 0x28);
local_40 = 0;
local_fc = 0;
local_118 = param_3;
local_110 = param_4;
local_f8 = param_2;
if ((ulong)(*(long *)(*param_1 + 0x110) - *(long *)(param_1[1] + 0x28)) < param_4) {
uVar3 = _mi_get_block_info(local_90,(int)param_1[0x38],param_2);
if (uVar3 < 4) {
if ((param_4 <= local_78) ||
(lVar9 = param_1[1],
(param_4 - local_78) + 0x14 <=
(ulong)((*(long *)(*param_1 + 0x110) - *(long *)(lVar9 + 0x28)) + *(long *)(lVar9 + 0x10) +
*(long *)(lVar9 + 8) * -0x14))) goto LAB_0017887c;
puVar5 = (int4 *)_my_thread_var();
*puVar5 = 0x87;
}
else {
LAB_00178bf4:
puVar5 = (int4 *)_my_thread_var();
*puVar5 = 0x7f;
}
}
else {
if (param_4 != 0) {
LAB_0017887c:
local_40 = 0;
do {
if (param_2 == *(long *)(*param_1 + 0x58)) {
iVar2 = _mi_find_writepos(param_1,param_4,&local_f8,&local_f0);
uVar7 = local_f0;
param_2 = local_f8;
if (iVar2 != 0) goto LAB_00178bff;
}
else {
local_50 = -1;
uVar3 = _mi_get_block_info(local_90,(int)param_1[0x38],param_2);
if (3 < uVar3) goto LAB_00178bf4;
uVar7 = (local_58 - param_2) + local_68;
local_f0 = uVar7;
if (uVar7 < param_4) {
uVar6 = local_68 + local_58;
lVar9 = param_1[1];
if (uVar6 == *(ulong *)(lVar9 + 0x28)) {
uVar8 = ((((int)param_4 - (uint)(param_4 < 0xfff0)) - (int)uVar7) + 7 & 0xfffffffc) +
uVar7;
if (0xfffffb < uVar8) {
uVar8 = 0xfffffc;
}
uVar8 = (ulong)(uint)((int)uVar8 - (int)uVar7);
if (uVar6 < *(long *)(*param_1 + 0x110) - uVar8) {
if (param_1[0x2f] == uVar6) {
param_1[0x2f] = uVar6 + uVar8;
uVar6 = *(ulong *)(lVar9 + 0x28);
}
*(ulong *)(lVar9 + 0x28) = uVar6 + uVar8;
*(byte *)((long)param_1 + 0x1d1) = *(byte *)((long)param_1 + 0x1d1) | 9;
local_f0 = uVar7 + uVar8;
uVar7 = local_f0;
goto LAB_00178aff;
}
}
if (uVar7 < 0xffffe8) {
local_98 = 0;
uVar6 = _mi_get_block_info(&local_e8,(int)param_1[0x38]);
if ((uVar6 & 4) != 0) {
cVar1 = unlink_deleted_block(param_1,&local_e8);
if (cVar1 != '\0') goto LAB_00178bff;
uVar7 = uVar7 + local_c0;
local_f0 = uVar7;
if (0xfffffc < uVar7) {
local_108 = uVar7 - 0xfffffc;
if (local_108 < 0x15) {
local_108 = 0x14;
}
lVar9 = (local_c0 - local_108) + local_b0;
iVar2 = update_backward_delete_link
(param_1,*(int8 *)(*param_1 + 0x58),lVar9);
if (iVar2 != 0) goto LAB_00178bff;
local_e8 = 0;
local_e5 = (int1)local_108;
local_e6 = (int1)(local_108 >> 8);
local_e7 = (int1)(local_108 >> 0x10);
uVar10 = *(int8 *)(*param_1 + 0x58);
local_e1 = (int1)((ulong)uVar10 >> 0x20);
local_e2 = (int1)((ulong)uVar10 >> 0x28);
local_e3 = (int1)((ulong)uVar10 >> 0x30);
local_e4 = (int1)((ulong)uVar10 >> 0x38);
local_dd = (int1)uVar10;
local_de = (int1)((ulong)uVar10 >> 8);
local_df = (int1)((ulong)uVar10 >> 0x10);
local_e0 = (int1)((ulong)uVar10 >> 0x18);
local_dc = 0xffffffffffffffff;
lVar4 = (**(code **)(*param_1 + 0x2e8))(param_1,&local_e8,0x14,lVar9,4);
if (lVar4 != 0) goto LAB_00178bff;
*(long *)(*param_1 + 0x58) = lVar9;
*(long *)(*param_1 + 0x50) = *(long *)(*param_1 + 0x50) + 1;
*(long *)(param_1[1] + 8) = *(long *)(param_1[1] + 8) + 1;
*(long *)(param_1[1] + 0x10) = *(long *)(param_1[1] + 0x10) + local_108;
local_f0 = uVar7 - local_108;
uVar7 = local_f0;
}
}
}
}
}
LAB_00178aff:
iVar2 = _mi_write_part_record
(param_1,param_2,uVar7,local_50,&local_118,&local_110,&local_fc);
if (iVar2 != 0) goto LAB_00178bff;
param_2 = local_50;
if (local_50 == -1) {
param_2 = *(long *)(*param_1 + 0x58);
}
param_4 = local_110;
local_f8 = param_2;
} while (local_110 != 0);
}
uVar10 = 0;
if (local_50 == -1) goto LAB_00178c05;
*(int4 *)(param_1 + 0x60) = 1;
iVar2 = delete_dynamic_record(param_1,local_50,1);
if (iVar2 == 0) goto LAB_00178c05;
}
LAB_00178bff:
uVar10 = 1;
LAB_00178c05:
if (*(long *)(in_FS_OFFSET + 0x28) != local_38) {
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
return uVar10;
}
|
|
64,322 |
nlohmann::json_abi_v3_11_3::operator==(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const&, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const&)
|
monkey531[P]llama/common/json.hpp
|
constexpr value_t type() const noexcept
{
return m_data.m_type;
}
|
O3
|
cpp
|
nlohmann::json_abi_v3_11_3::operator==(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const&, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const&):
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x38, %rsp
movzbl (%rdi), %eax
movb (%rsi), %cl
cmpb %cl, %al
jne 0x8d3f2
cmpl $0x8, %eax
ja 0x8d5ba
movb $0x1, %bl
movl %eax, %eax
leaq 0x61c94(%rip), %rcx # 0xef070
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq 0x8(%rdi), %rax
cmpq 0x8(%rsi), %rax
jmp 0x8d543
movl %eax, %edx
xorb $0x5, %dl
movl %ecx, %r8d
xorb $0x7, %r8b
orb %r8b, %dl
jne 0x8d414
cvtsi2sdq 0x8(%rdi), %xmm0
cmpeqsd 0x8(%rsi), %xmm0
jmp 0x8d4ba
movl %eax, %r9d
xorb $0x7, %r9b
movl %ecx, %edx
xorb $0x5, %dl
orb %dl, %r9b
jne 0x8d430
cvtsi2sdq 0x8(%rsi), %xmm0
jmp 0x8d4b4
movl %eax, %r9d
xorb $0x6, %r9b
orb %r8b, %r9b
jne 0x8d464
movsd 0x8(%rdi), %xmm0
unpcklps 0x61b98(%rip), %xmm0 # xmm0 = xmm0[0],mem[0],xmm0[1],mem[1]
subpd 0x61ba0(%rip), %xmm0 # 0xeeff0
movapd %xmm0, %xmm1
unpckhpd %xmm0, %xmm1 # xmm1 = xmm1[1],xmm0[1]
addsd %xmm0, %xmm1
cmpeqsd 0x8(%rsi), %xmm1
jmp 0x8d49d
movl %eax, %r8d
xorb $0x7, %r8b
xorb $0x6, %cl
orb %cl, %r8b
jne 0x8d60b
movsd 0x8(%rsi), %xmm0
unpcklps 0x61b5d(%rip), %xmm0 # xmm0 = xmm0[0],mem[0],xmm0[1],mem[1]
subpd 0x61b65(%rip), %xmm0 # 0xeeff0
movapd %xmm0, %xmm1
unpckhpd %xmm0, %xmm1 # xmm1 = xmm1[1],xmm0[1]
addsd %xmm0, %xmm1
cmpeqsd 0x8(%rdi), %xmm1
movq %xmm1, %rbx
jmp 0x8d4bf
movb 0x8(%rdi), %al
cmpb 0x8(%rsi), %al
jmp 0x8d543
movsd 0x8(%rsi), %xmm0
cmpeqsd 0x8(%rdi), %xmm0
movq %xmm0, %rbx
andl $0x1, %ebx
jmp 0x8d5fd
movq 0x8(%rdi), %rax
movq 0x8(%rsi), %rcx
movq (%rax), %r14
movq 0x8(%rax), %r12
movq %r12, %rax
subq %r14, %rax
movq (%rcx), %r15
movq 0x8(%rcx), %rcx
subq %r15, %rcx
cmpq %rcx, %rax
jne 0x8d5ba
cmpq %r12, %r14
je 0x8d5fd
movq %r14, %rdi
movq %r15, %rsi
callq 0x8d3b4
movl %eax, %ebx
testb %al, %al
je 0x8d5fd
addq $0x10, %r14
addq $0x10, %r15
jmp 0x8d4ef
movq 0x8(%rdi), %rax
movq 0x8(%rsi), %rcx
movq 0x8(%rax), %rdx
cmpq 0x8(%rcx), %rdx
jne 0x8d5ba
testq %rdx, %rdx
je 0x8d5fd
movq (%rcx), %rsi
movq (%rax), %rdi
callq 0x1a930
testl %eax, %eax
sete %bl
jmp 0x8d5fd
movq 0x8(%rdi), %rax
movq 0x8(%rsi), %rcx
movq (%rax), %r15
movq 0x8(%rax), %r12
movq %r12, %rax
subq %r15, %rax
movq (%rcx), %r14
movq 0x8(%rcx), %rcx
subq %r14, %rcx
cmpq %rcx, %rax
jne 0x8d5ba
cmpq %r12, %r15
je 0x8d5fd
addq $0x20, %r14
movq 0x8(%r15), %rdx
cmpq -0x18(%r14), %rdx
jne 0x8d5ba
testq %rdx, %rdx
je 0x8d59b
movq -0x20(%r14), %rsi
movq (%r15), %rdi
callq 0x1a930
testl %eax, %eax
jne 0x8d5ba
leaq 0x20(%r15), %rdi
movq %r14, %rsi
callq 0x8d3b4
testb %al, %al
je 0x8d5ba
addq $0x30, %r15
addq $0x30, %r14
cmpq %r12, %r15
jne 0x8d57c
jmp 0x8d5fd
xorl %ebx, %ebx
jmp 0x8d5fd
movq 0x8(%rdi), %rax
movq 0x8(%rsi), %rcx
leaq 0x18(%rax), %rdx
leaq 0x20(%rax), %rsi
leaq 0x20(%rsp), %rdi
movq %rsi, (%rdi)
movq %rdx, 0x8(%rdi)
movq %rax, 0x10(%rdi)
leaq 0x18(%rcx), %rax
leaq 0x20(%rcx), %rdx
leaq 0x8(%rsp), %rsi
movq %rdx, (%rsi)
movq %rax, 0x8(%rsi)
movq %rcx, 0x10(%rsi)
callq 0x8d694
movl %eax, %ebx
movl %ebx, %eax
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movl %eax, %r8d
xorb $0x6, %r8b
orb %dl, %r8b
je 0x8d3e5
xorb $0x5, %al
orb %cl, %al
je 0x8d3e5
xorl %ebx, %ebx
xorl %edx, %edx
callq 0x8d638
jmp 0x8d5fd
movq %rax, %rdi
callq 0x21a05
|
_ZN8nlohmann16json_abi_v3_11_3eqERKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEESF_:
push r15
push r14
push r12
push rbx
sub rsp, 38h
movzx eax, byte ptr [rdi]
mov cl, [rsi]
cmp al, cl
jnz short loc_8D3F2
cmp eax, 8; switch 9 cases
ja def_8D3E3; jumptable 000000000008D3E3 default case
mov bl, 1
mov eax, eax
lea rcx, jpt_8D3E3
movsxd rax, ds:(jpt_8D3E3 - 0EF070h)[rcx+rax*4]
add rax, rcx
jmp rax; switch jump
loc_8D3E5:
mov rax, [rdi+8]; jumptable 000000000008D3E3 cases 5,6
cmp rax, [rsi+8]
jmp loc_8D543
loc_8D3F2:
mov edx, eax
xor dl, 5
mov r8d, ecx
xor r8b, 7
or dl, r8b
jnz short loc_8D414
cvtsi2sd xmm0, qword ptr [rdi+8]
cmpeqsd xmm0, qword ptr [rsi+8]
jmp loc_8D4BA
loc_8D414:
mov r9d, eax
xor r9b, 7
mov edx, ecx
xor dl, 5
or r9b, dl
jnz short loc_8D430
cvtsi2sd xmm0, qword ptr [rsi+8]
jmp loc_8D4B4
loc_8D430:
mov r9d, eax
xor r9b, 6
or r9b, r8b
jnz short loc_8D464
movsd xmm0, qword ptr [rdi+8]
unpcklps xmm0, cs:xmmword_EEFE0
subpd xmm0, cs:xmmword_EEFF0
movapd xmm1, xmm0
unpckhpd xmm1, xmm0
addsd xmm1, xmm0
cmpeqsd xmm1, qword ptr [rsi+8]
jmp short loc_8D49D
loc_8D464:
mov r8d, eax
xor r8b, 7
xor cl, 6
or r8b, cl
jnz loc_8D60B
movsd xmm0, qword ptr [rsi+8]
unpcklps xmm0, cs:xmmword_EEFE0
subpd xmm0, cs:xmmword_EEFF0
movapd xmm1, xmm0
unpckhpd xmm1, xmm0
addsd xmm1, xmm0
cmpeqsd xmm1, qword ptr [rdi+8]
loc_8D49D:
movq rbx, xmm1
jmp short loc_8D4BF
loc_8D4A4:
mov al, [rdi+8]; jumptable 000000000008D3E3 case 4
cmp al, [rsi+8]
jmp loc_8D543
loc_8D4AF:
movsd xmm0, qword ptr [rsi+8]; jumptable 000000000008D3E3 case 7
loc_8D4B4:
cmpeqsd xmm0, qword ptr [rdi+8]
loc_8D4BA:
movq rbx, xmm0
loc_8D4BF:
and ebx, 1
jmp loc_8D5FD; jumptable 000000000008D3E3 case 0
loc_8D4C7:
mov rax, [rdi+8]; jumptable 000000000008D3E3 case 2
mov rcx, [rsi+8]
mov r14, [rax]
mov r12, [rax+8]
mov rax, r12
sub rax, r14
mov r15, [rcx]
mov rcx, [rcx+8]
sub rcx, r15
cmp rax, rcx
jnz def_8D3E3; jumptable 000000000008D3E3 default case
loc_8D4EF:
cmp r14, r12
jz loc_8D5FD; jumptable 000000000008D3E3 case 0
mov rdi, r14
mov rsi, r15
call _ZN8nlohmann16json_abi_v3_11_3eqERKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEESF_; nlohmann::json_abi_v3_11_3::operator==(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const&,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const&)
mov ebx, eax
test al, al
jz loc_8D5FD; jumptable 000000000008D3E3 case 0
add r14, 10h
add r15, 10h
jmp short loc_8D4EF
loc_8D517:
mov rax, [rdi+8]; jumptable 000000000008D3E3 case 3
mov rcx, [rsi+8]
mov rdx, [rax+8]
cmp rdx, [rcx+8]
jnz def_8D3E3; jumptable 000000000008D3E3 default case
test rdx, rdx
jz loc_8D5FD; jumptable 000000000008D3E3 case 0
mov rsi, [rcx]
mov rdi, [rax]
call _bcmp
test eax, eax
loc_8D543:
setz bl
jmp loc_8D5FD; jumptable 000000000008D3E3 case 0
loc_8D54B:
mov rax, [rdi+8]; jumptable 000000000008D3E3 case 1
mov rcx, [rsi+8]
mov r15, [rax]
mov r12, [rax+8]
mov rax, r12
sub rax, r15
mov r14, [rcx]
mov rcx, [rcx+8]
sub rcx, r14
cmp rax, rcx
jnz short def_8D3E3; jumptable 000000000008D3E3 default case
cmp r15, r12
jz loc_8D5FD; jumptable 000000000008D3E3 case 0
add r14, 20h ; ' '
loc_8D57C:
mov rdx, [r15+8]
cmp rdx, [r14-18h]
jnz short def_8D3E3; jumptable 000000000008D3E3 default case
test rdx, rdx
jz short loc_8D59B
mov rsi, [r14-20h]
mov rdi, [r15]
call _bcmp
test eax, eax
jnz short def_8D3E3; jumptable 000000000008D3E3 default case
loc_8D59B:
lea rdi, [r15+20h]
mov rsi, r14
call _ZN8nlohmann16json_abi_v3_11_3eqERKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEESF_; nlohmann::json_abi_v3_11_3::operator==(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const&,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const&)
test al, al
jz short def_8D3E3; jumptable 000000000008D3E3 default case
add r15, 30h ; '0'
add r14, 30h ; '0'
cmp r15, r12
jnz short loc_8D57C
jmp short loc_8D5FD; jumptable 000000000008D3E3 case 0
def_8D3E3:
xor ebx, ebx; jumptable 000000000008D3E3 default case
jmp short loc_8D5FD; jumptable 000000000008D3E3 case 0
loc_8D5BE:
mov rax, [rdi+8]; jumptable 000000000008D3E3 case 8
mov rcx, [rsi+8]
lea rdx, [rax+18h]
lea rsi, [rax+20h]
lea rdi, [rsp+58h+var_38]
mov [rdi], rsi
mov [rdi+8], rdx
mov [rdi+10h], rax
lea rax, [rcx+18h]
lea rdx, [rcx+20h]
lea rsi, [rsp+58h+var_50]
mov [rsi], rdx
mov [rsi+8], rax
mov [rsi+10h], rcx
call _ZNSt15__tuple_compareISt5tupleIJRKSt6vectorIhSaIhEERKmRKbEESA_Lm0ELm3EE4__eqERKSA_SD_; std::__tuple_compare<std::tuple<std::vector<uchar> const&,ulong const&,bool const&>,std::tuple<std::vector<uchar> const&,ulong const&,bool const&>,0ul,3ul>::__eq(std::tuple<std::vector<uchar> const&,ulong const&,bool const&> const&,std::tuple<std::vector<uchar> const&,ulong const&,bool const&> const&)
mov ebx, eax
loc_8D5FD:
mov eax, ebx; jumptable 000000000008D3E3 case 0
add rsp, 38h
pop rbx
pop r12
pop r14
pop r15
retn
loc_8D60B:
mov r8d, eax
xor r8b, 6
or r8b, dl
jz loc_8D3E5; jumptable 000000000008D3E3 cases 5,6
xor al, 5
or al, cl
jz loc_8D3E5; jumptable 000000000008D3E3 cases 5,6
xor ebx, ebx
xor edx, edx
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE18compares_unorderedERKSD_SF_b; 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>::compares_unordered(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const&,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const&,bool)
jmp short loc_8D5FD; jumptable 000000000008D3E3 case 0
mov rdi, rax
call __clang_call_terminate
|
long long nlohmann::json_abi_v3_11_3::operator==(unsigned __int8 *a1, unsigned __int8 *a2, __m128d a3)
{
unsigned int v3; // ebx
unsigned __int8 v4; // al
unsigned __int8 v5; // cl
bool v6; // zf
__m128d v7; // rt1
unsigned __int8 v8; // dl
__m128d v9; // xmm0
__m128d v10; // xmm1
__m128d v11; // rt1
__int8 v12; // xmm1_1
unsigned __int8 v13; // cl
__m128d v14; // xmm0
__m128d v15; // xmm1
__m128d v16; // rt1
__int8 v17; // bl
__m128d v18; // rt1
long long *v19; // rax
long long *v20; // rcx
long long v21; // r14
long long v22; // r12
long long v23; // r15
_QWORD *v24; // rax
_QWORD *v25; // rcx
long long v26; // rdx
_QWORD *v27; // rax
_QWORD *v28; // rcx
_QWORD *v29; // r15
_QWORD *v30; // r12
long long v31; // r14
long long v32; // rdx
v4 = *a1;
v5 = *a2;
if ( *a1 != *a2 )
{
if ( v5 ^ 7 | v4 ^ 5 )
{
v8 = v5 ^ 5;
if ( v5 ^ 5 | v4 ^ 7 )
{
if ( v5 ^ 7 | v4 ^ 6 )
{
v13 = v5 ^ 6;
if ( v13 | v4 ^ 7 )
{
if ( v8 | v4 ^ 6 && v13 | v4 ^ 5 )
{
v3 = 0;
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::compares_unordered(
a1,
a2,
0LL);
}
else
{
LABEL_3:
v6 = *((_QWORD *)a1 + 1) == *((_QWORD *)a2 + 1);
LABEL_25:
LOBYTE(v3) = v6;
}
return v3;
}
v14 = _mm_sub_pd(
(__m128d)_mm_unpacklo_ps((__m128)*((unsigned long long *)a2 + 1), (__m128)xmmword_EEFE0),
(__m128d)xmmword_EEFF0);
v15 = _mm_unpackhi_pd(v14, v14);
v15.m128d_f64[0] = v15.m128d_f64[0] + v14.m128d_f64[0];
v16.m128d_f64[0] = *((double *)a1 + 1);
v12 = *(_OWORD *)&_mm_cmpeq_sd(v15, v16);
}
else
{
v9 = _mm_sub_pd(
(__m128d)_mm_unpacklo_ps((__m128)*((unsigned long long *)a1 + 1), (__m128)xmmword_EEFE0),
(__m128d)xmmword_EEFF0);
v10 = _mm_unpackhi_pd(v9, v9);
v10.m128d_f64[0] = v10.m128d_f64[0] + v9.m128d_f64[0];
v11.m128d_f64[0] = *((double *)a2 + 1);
v12 = *(_OWORD *)&_mm_cmpeq_sd(v10, v11);
}
v17 = v12;
return v17 & 1;
}
a3.m128d_f64[0] = (double)(int)*((_QWORD *)a2 + 1);
LABEL_15:
v18.m128d_f64[0] = *((double *)a1 + 1);
LOBYTE(a3.m128d_f64[0]) = *(_OWORD *)&_mm_cmpeq_sd(a3, v18);
}
else
{
a3.m128d_f64[0] = (double)(int)*((_QWORD *)a1 + 1);
v7.m128d_f64[0] = *((double *)a2 + 1);
LOBYTE(a3.m128d_f64[0]) = *(_OWORD *)&_mm_cmpeq_sd(a3, v7);
}
v17 = LOBYTE(a3.m128d_f64[0]);
return v17 & 1;
}
LOBYTE(v3) = 1;
switch ( *a1 )
{
case 0u:
return v3;
case 1u:
v27 = (_QWORD *)*((_QWORD *)a1 + 1);
v28 = (_QWORD *)*((_QWORD *)a2 + 1);
v29 = (_QWORD *)*v27;
v30 = (_QWORD *)v27[1];
if ( (_QWORD *)((char *)v30 - *v27) != (_QWORD *)(v28[1] - *v28) )
return 0;
if ( v29 == v30 )
return v3;
v31 = *v28 + 32LL;
break;
case 2u:
v19 = (long long *)*((_QWORD *)a1 + 1);
v20 = (long long *)*((_QWORD *)a2 + 1);
v21 = *v19;
v22 = v19[1];
v23 = *v20;
if ( v22 - *v19 != v20[1] - *v20 )
return 0;
while ( v21 != v22 )
{
v3 = nlohmann::json_abi_v3_11_3::operator==(v21, v23);
if ( !(_BYTE)v3 )
break;
v21 += 16LL;
v23 += 16LL;
}
return v3;
case 3u:
v24 = (_QWORD *)*((_QWORD *)a1 + 1);
v25 = (_QWORD *)*((_QWORD *)a2 + 1);
v26 = v24[1];
if ( v26 != v25[1] )
return 0;
if ( !v26 )
return v3;
v6 = (unsigned int)bcmp(*v24, *v25) == 0;
goto LABEL_25;
case 4u:
v6 = a1[8] == a2[8];
goto LABEL_25;
case 5u:
case 6u:
goto LABEL_3;
case 7u:
a3 = (__m128d)*((unsigned long long *)a2 + 1);
goto LABEL_15;
case 8u:
return (unsigned int)std::__tuple_compare<std::tuple<std::vector<unsigned char> const&,unsigned long const&,bool const&>,std::tuple<std::vector<unsigned char> const&,unsigned long const&,bool const&>,0ul,3ul>::__eq();
default:
return 0;
}
while ( 1 )
{
v32 = v29[1];
if ( v32 != *(_QWORD *)(v31 - 24) || v32 && (unsigned int)bcmp(*v29, *(_QWORD *)(v31 - 32)) )
break;
if ( !(unsigned __int8)nlohmann::json_abi_v3_11_3::operator==(v29 + 4, v31) )
break;
v29 += 6;
v31 += 48LL;
if ( v29 == v30 )
return v3;
}
return 0;
}
|
operator==:
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
SUB RSP,0x38
MOVZX EAX,byte ptr [RDI]
MOV CL,byte ptr [RSI]
CMP AL,CL
JNZ 0x0018d3f2
CMP EAX,0x8
JA 0x0018d5ba
MOV BL,0x1
MOV EAX,EAX
LEA RCX,[0x1ef070]
MOVSXD RAX,dword ptr [RCX + RAX*0x4]
ADD RAX,RCX
switchD:
JMP RAX
caseD_5:
MOV RAX,qword ptr [RDI + 0x8]
CMP RAX,qword ptr [RSI + 0x8]
JMP 0x0018d543
LAB_0018d3f2:
MOV EDX,EAX
XOR DL,0x5
MOV R8D,ECX
XOR R8B,0x7
OR DL,R8B
JNZ 0x0018d414
CVTSI2SD XMM0,qword ptr [RDI + 0x8]
CMPEQSD XMM0,qword ptr [RSI + 0x8]
JMP 0x0018d4ba
LAB_0018d414:
MOV R9D,EAX
XOR R9B,0x7
MOV EDX,ECX
XOR DL,0x5
OR R9B,DL
JNZ 0x0018d430
CVTSI2SD XMM0,qword ptr [RSI + 0x8]
JMP 0x0018d4b4
LAB_0018d430:
MOV R9D,EAX
XOR R9B,0x6
OR R9B,R8B
JNZ 0x0018d464
MOVSD XMM0,qword ptr [RDI + 0x8]
UNPCKLPS XMM0,xmmword ptr [0x001eefe0]
SUBPD XMM0,xmmword ptr [0x001eeff0]
MOVAPD XMM1,XMM0
UNPCKHPD XMM1,XMM0
ADDSD XMM1,XMM0
CMPEQSD XMM1,qword ptr [RSI + 0x8]
JMP 0x0018d49d
LAB_0018d464:
MOV R8D,EAX
XOR R8B,0x7
XOR CL,0x6
OR R8B,CL
JNZ 0x0018d60b
MOVSD XMM0,qword ptr [RSI + 0x8]
UNPCKLPS XMM0,xmmword ptr [0x001eefe0]
SUBPD XMM0,xmmword ptr [0x001eeff0]
MOVAPD XMM1,XMM0
UNPCKHPD XMM1,XMM0
ADDSD XMM1,XMM0
CMPEQSD XMM1,qword ptr [RDI + 0x8]
LAB_0018d49d:
MOVQ RBX,XMM1
JMP 0x0018d4bf
caseD_4:
MOV AL,byte ptr [RDI + 0x8]
CMP AL,byte ptr [RSI + 0x8]
JMP 0x0018d543
caseD_7:
MOVSD XMM0,qword ptr [RSI + 0x8]
LAB_0018d4b4:
CMPEQSD XMM0,qword ptr [RDI + 0x8]
LAB_0018d4ba:
MOVQ RBX,XMM0
LAB_0018d4bf:
AND EBX,0x1
JMP 0x0018d5fd
caseD_2:
MOV RAX,qword ptr [RDI + 0x8]
MOV RCX,qword ptr [RSI + 0x8]
MOV R14,qword ptr [RAX]
MOV R12,qword ptr [RAX + 0x8]
MOV RAX,R12
SUB RAX,R14
MOV R15,qword ptr [RCX]
MOV RCX,qword ptr [RCX + 0x8]
SUB RCX,R15
CMP RAX,RCX
JNZ 0x0018d5ba
LAB_0018d4ef:
CMP R14,R12
JZ 0x0018d5fd
MOV RDI,R14
MOV RSI,R15
CALL 0x0018d3b4
MOV EBX,EAX
TEST AL,AL
JZ 0x0018d5fd
ADD R14,0x10
ADD R15,0x10
JMP 0x0018d4ef
caseD_3:
MOV RAX,qword ptr [RDI + 0x8]
MOV RCX,qword ptr [RSI + 0x8]
MOV RDX,qword ptr [RAX + 0x8]
CMP RDX,qword ptr [RCX + 0x8]
JNZ 0x0018d5ba
TEST RDX,RDX
JZ 0x0018d5fd
MOV RSI,qword ptr [RCX]
MOV RDI,qword ptr [RAX]
CALL 0x0011a930
TEST EAX,EAX
LAB_0018d543:
SETZ BL
JMP 0x0018d5fd
caseD_1:
MOV RAX,qword ptr [RDI + 0x8]
MOV RCX,qword ptr [RSI + 0x8]
MOV R15,qword ptr [RAX]
MOV R12,qword ptr [RAX + 0x8]
MOV RAX,R12
SUB RAX,R15
MOV R14,qword ptr [RCX]
MOV RCX,qword ptr [RCX + 0x8]
SUB RCX,R14
CMP RAX,RCX
JNZ 0x0018d5ba
CMP R15,R12
JZ 0x0018d5fd
ADD R14,0x20
LAB_0018d57c:
MOV RDX,qword ptr [R15 + 0x8]
CMP RDX,qword ptr [R14 + -0x18]
JNZ 0x0018d5ba
TEST RDX,RDX
JZ 0x0018d59b
MOV RSI,qword ptr [R14 + -0x20]
MOV RDI,qword ptr [R15]
CALL 0x0011a930
TEST EAX,EAX
JNZ 0x0018d5ba
LAB_0018d59b:
LEA RDI,[R15 + 0x20]
MOV RSI,R14
CALL 0x0018d3b4
TEST AL,AL
JZ 0x0018d5ba
ADD R15,0x30
ADD R14,0x30
CMP R15,R12
JNZ 0x0018d57c
JMP 0x0018d5fd
LAB_0018d5ba:
XOR EBX,EBX
JMP 0x0018d5fd
caseD_8:
MOV RAX,qword ptr [RDI + 0x8]
MOV RCX,qword ptr [RSI + 0x8]
LEA RDX,[RAX + 0x18]
LEA RSI,[RAX + 0x20]
LEA RDI,[RSP + 0x20]
MOV qword ptr [RDI],RSI
MOV qword ptr [RDI + 0x8],RDX
MOV qword ptr [RDI + 0x10],RAX
LEA RAX,[RCX + 0x18]
LEA RDX,[RCX + 0x20]
LEA RSI,[RSP + 0x8]
MOV qword ptr [RSI],RDX
MOV qword ptr [RSI + 0x8],RAX
MOV qword ptr [RSI + 0x10],RCX
LAB_0018d5f6:
CALL 0x0018d694
MOV EBX,EAX
caseD_0:
MOV EAX,EBX
ADD RSP,0x38
POP RBX
POP R12
POP R14
POP R15
RET
LAB_0018d60b:
MOV R8D,EAX
XOR R8B,0x6
OR R8B,DL
JZ 0x0018d3e5
XOR AL,0x5
OR AL,CL
JZ 0x0018d3e5
XOR EBX,EBX
XOR EDX,EDX
CALL 0x0018d638
JMP 0x0018d5fd
|
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
/* nlohmann::json_abi_v3_11_3::TEMPNAMEPLACEHOLDERVALUE(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,
std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void> const&,
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector,
std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void> const&) */
ulong nlohmann::json_abi_v3_11_3::operator==(basic_json *param_1,basic_json *param_2)
{
basic_json bVar1;
basic_json bVar2;
basic_json *pbVar3;
size_t sVar4;
int8 *puVar5;
long lVar6;
double dVar7;
char cVar8;
int iVar9;
uint uVar10;
ulong unaff_RBX;
basic_json *pbVar11;
basic_json *pbVar12;
int8 *puVar13;
bool bVar14;
long local_50;
long local_48;
long local_40;
long local_38;
long local_30;
long local_28;
bVar2 = *param_1;
bVar1 = *param_2;
if (bVar2 != bVar1) {
if (bVar2 == (basic_json)0x5 && ((byte)bVar1 ^ 7) == 0) {
bVar14 = (double)*(long *)(param_1 + 8) == *(double *)(param_2 + 8);
}
else {
if (bVar2 == (basic_json)0x7 && ((byte)bVar1 ^ 5) == 0) {
dVar7 = (double)*(long *)(param_2 + 8);
goto LAB_0018d4b4;
}
if (bVar2 == (basic_json)0x6 && ((byte)bVar1 ^ 7) == 0) {
bVar14 = ((double)CONCAT44(_UNK_001eefe4,(int)((ulong)*(int8 *)(param_1 + 8) >> 0x20))
- _UNK_001eeff8) +
((double)CONCAT44(_DAT_001eefe0,(int)*(int8 *)(param_1 + 8)) - _DAT_001eeff0)
== *(double *)(param_2 + 8);
}
else {
if (bVar2 != (basic_json)0x7 || ((byte)bVar1 ^ 6) != 0) {
if ((bVar2 != (basic_json)0x6 || ((byte)bVar1 ^ 5) != 0) &&
(bVar2 != (basic_json)0x5 || ((byte)bVar1 ^ 6) != 0)) {
unaff_RBX = 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>
::compares_unordered(param_1,param_2,false);
goto switchD_0018d3e3_caseD_0;
}
goto switchD_0018d3e3_caseD_5;
}
bVar14 = ((double)CONCAT44(_UNK_001eefe4,(int)((ulong)*(int8 *)(param_2 + 8) >> 0x20))
- _UNK_001eeff8) +
((double)CONCAT44(_DAT_001eefe0,(int)*(int8 *)(param_2 + 8)) - _DAT_001eeff0)
== *(double *)(param_1 + 8);
}
}
LAB_0018d4bf:
unaff_RBX = (ulong)(-(uint)bVar14 & 1);
goto switchD_0018d3e3_caseD_0;
}
if (8 < (byte)bVar2) goto LAB_0018d5ba;
unaff_RBX = CONCAT71((int7)(unaff_RBX >> 8),1);
switch(bVar2) {
case (basic_json)0x0:
goto switchD_0018d3e3_caseD_0;
case (basic_json)0x1:
puVar13 = (int8 *)**(long **)(param_1 + 8);
puVar5 = (int8 *)(*(long **)(param_1 + 8))[1];
lVar6 = **(long **)(param_2 + 8);
if ((long)puVar5 - (long)puVar13 == (*(long **)(param_2 + 8))[1] - lVar6) {
if (puVar13 != puVar5) {
pbVar11 = (basic_json *)(lVar6 + 0x20);
do {
sVar4 = puVar13[1];
if ((sVar4 != *(size_t *)(pbVar11 + -0x18)) ||
(((sVar4 != 0 &&
(iVar9 = bcmp((void *)*puVar13,*(void **)(pbVar11 + -0x20),sVar4), iVar9 != 0)) ||
(cVar8 = operator==((basic_json *)(puVar13 + 4),pbVar11), cVar8 == '\0'))))
goto LAB_0018d5ba;
puVar13 = puVar13 + 6;
pbVar11 = pbVar11 + 0x30;
} while (puVar13 != puVar5);
}
goto switchD_0018d3e3_caseD_0;
}
break;
case (basic_json)0x2:
pbVar11 = (basic_json *)**(long **)(param_1 + 8);
pbVar3 = (basic_json *)(*(long **)(param_1 + 8))[1];
pbVar12 = (basic_json *)**(long **)(param_2 + 8);
if ((long)pbVar3 - (long)pbVar11 == (*(long **)(param_2 + 8))[1] - (long)pbVar12) {
for (; pbVar11 != pbVar3; pbVar11 = pbVar11 + 0x10) {
uVar10 = operator==(pbVar11,pbVar12);
unaff_RBX = (ulong)uVar10;
if ((char)uVar10 == '\0') break;
pbVar12 = pbVar12 + 0x10;
}
goto switchD_0018d3e3_caseD_0;
}
break;
case (basic_json)0x3:
sVar4 = (*(int8 **)(param_1 + 8))[1];
if (sVar4 == (*(int8 **)(param_2 + 8))[1]) {
if (sVar4 == 0) goto switchD_0018d3e3_caseD_0;
iVar9 = bcmp((void *)**(int8 **)(param_1 + 8),(void *)**(int8 **)(param_2 + 8),
sVar4);
bVar14 = iVar9 == 0;
goto LAB_0018d543;
}
break;
case (basic_json)0x4:
bVar14 = param_1[8] == param_2[8];
goto LAB_0018d543;
default:
switchD_0018d3e3_caseD_5:
bVar14 = *(long *)(param_1 + 8) == *(long *)(param_2 + 8);
LAB_0018d543:
unaff_RBX = CONCAT71((int7)(unaff_RBX >> 8),bVar14);
goto switchD_0018d3e3_caseD_0;
case (basic_json)0x7:
dVar7 = *(double *)(param_2 + 8);
LAB_0018d4b4:
bVar14 = dVar7 == *(double *)(param_1 + 8);
goto LAB_0018d4bf;
case (basic_json)0x8:
local_28 = *(long *)(param_1 + 8);
local_40 = *(long *)(param_2 + 8);
local_30 = local_28 + 0x18;
local_38 = local_28 + 0x20;
local_48 = local_40 + 0x18;
local_50 = local_40 + 0x20;
/* try { // try from 0018d5f6 to 0018d5fa has its CatchHandler @ 0018d630 */
uVar10 = std::
__tuple_compare<std::tuple<std::vector<unsigned_char,std::allocator<unsigned_char>>const&,unsigned_long_const&,bool_const&>,std::tuple<std::vector<unsigned_char,std::allocator<unsigned_char>>const&,unsigned_long_const&,bool_const&>,0ul,3ul>
::__eq((tuple *)&local_38,(tuple *)&local_50);
unaff_RBX = (ulong)uVar10;
goto switchD_0018d3e3_caseD_0;
}
LAB_0018d5ba:
unaff_RBX = 0;
switchD_0018d3e3_caseD_0:
return unaff_RBX & 0xffffffff;
}
|
|
64,323 |
SEMANTICANALYZER::AstStatementParser::serializeObjectDec(AST::ASTTree::DSFIterator&, SEMANTICANALYZER::ObjectDecl&)
|
11AgReS1SoR11[P]Graph/Common/SemanticAnalyzer/src/AstStatementParser.cpp
|
void SEMANTICANALYZER::AstStatementParser::serializeObjectDec(AST::ASTTree::DSFIterator& objectDecIter, ObjectDecl& objectDecl) noexcept
{
for(auto& it = objectDecIter; it != AST::ASTTree::DSFIterator(); ++it)
{
if(it->value == GRAMMERCONSTANTS::SHAPE)
{
++it;
++astIter;
objectDecl.shape = it->value;
}
else if(it->value == GRAMMERCONSTANTS::ID)
{
++it;
++astIter;
objectDecl.id = it->value;
}
else if(it->value == GRAMMERCONSTANTS::PROPERTY)
{
Property property;
AST::ASTTree::DSFIterator propertyIter(it.get());
serializeProperty(propertyIter, property);
objectDecl.properties.push_back(std::move(property));
while(it.get() != astIter.get()) {
++it;
}
}
auto nextIt = it;
++nextIt;
if(nextIt != AST::ASTTree::DSFIterator())
{
++astIter;
}
}
}
|
O0
|
cpp
|
SEMANTICANALYZER::AstStatementParser::serializeObjectDec(AST::ASTTree::DSFIterator&, SEMANTICANALYZER::ObjectDecl&):
pushq %rbp
movq %rsp, %rbp
subq $0x210, %rsp # imm = 0x210
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x1a8(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
movq %rax, -0x1b0(%rbp)
xorps %xmm0, %xmm0
movaps %xmm0, -0x30(%rbp)
movaps %xmm0, -0x40(%rbp)
movaps %xmm0, -0x50(%rbp)
movaps %xmm0, -0x60(%rbp)
movaps %xmm0, -0x70(%rbp)
leaq -0x70(%rbp), %rdi
callq 0x2f660
jmp 0x45f77
movq -0x1b0(%rbp), %rdi
leaq -0x70(%rbp), %rsi
callq 0x2f500
movb %al, -0x1b1(%rbp)
leaq -0x70(%rbp), %rdi
callq 0x307d0
movb -0x1b1(%rbp), %al
testb $0x1, %al
jne 0x45fa5
jmp 0x4624f
movq -0x20(%rbp), %rdi
callq 0x2f900
movq %rax, -0x1c0(%rbp)
jmp 0x45fb7
movq -0x1c0(%rbp), %rdi
leaq 0x77cf(%rip), %rsi # 0x4d794
callq 0x31710
movb %al, -0x1c1(%rbp)
jmp 0x45fd2
movb -0x1c1(%rbp), %al
testb $0x1, %al
jne 0x45fde
jmp 0x46024
movq -0x20(%rbp), %rdi
callq 0x30780
jmp 0x45fe9
movq -0x1a8(%rbp), %rdi
addq $0x8, %rdi
callq 0x30780
jmp 0x45ffb
movq -0x20(%rbp), %rdi
callq 0x2f900
movq %rax, -0x1d0(%rbp)
jmp 0x4600d
movq -0x1d0(%rbp), %rsi
movq -0x18(%rbp), %rdi
callq 0x2d130
jmp 0x4601f
jmp 0x4619a
movq -0x20(%rbp), %rdi
callq 0x2f900
movq %rax, -0x1d8(%rbp)
jmp 0x46036
movq -0x1d8(%rbp), %rdi
leaq 0x7756(%rip), %rsi # 0x4d79a
callq 0x31710
movb %al, -0x1d9(%rbp)
jmp 0x46051
movb -0x1d9(%rbp), %al
testb $0x1, %al
jne 0x4605d
jmp 0x460a7
movq -0x20(%rbp), %rdi
callq 0x30780
jmp 0x46068
movq -0x1a8(%rbp), %rdi
addq $0x8, %rdi
callq 0x30780
jmp 0x4607a
movq -0x20(%rbp), %rdi
callq 0x2f900
movq %rax, -0x1e8(%rbp)
jmp 0x4608c
movq -0x1e8(%rbp), %rsi
movq -0x18(%rbp), %rdi
addq $0x20, %rdi
callq 0x2d130
jmp 0x460a2
jmp 0x46198
movq -0x20(%rbp), %rdi
callq 0x2f900
movq %rax, -0x1f0(%rbp)
jmp 0x460b9
movq -0x1f0(%rbp), %rdi
leaq 0x76d6(%rip), %rsi # 0x4d79d
callq 0x31710
movb %al, -0x1f1(%rbp)
jmp 0x460d4
movb -0x1f1(%rbp), %al
testb $0x1, %al
jne 0x460e3
jmp 0x46196
leaq -0xb0(%rbp), %rdi
callq 0x2f480
movq -0x20(%rbp), %rdi
callq 0x2d780
movq %rax, %rsi
leaq -0x100(%rbp), %rdi
callq 0x2d6b0
jmp 0x46109
movq -0x1a8(%rbp), %rdi
leaq -0x100(%rbp), %rsi
leaq -0xb0(%rbp), %rdx
movq %rdx, -0x200(%rbp)
callq 0x2edf0
movq -0x200(%rbp), %rsi
movq -0x18(%rbp), %rdi
addq $0x40, %rdi
callq 0x2fab0
jmp 0x46140
jmp 0x46142
movq -0x20(%rbp), %rdi
callq 0x2d780
movq -0x1a8(%rbp), %rdi
movq %rax, -0x208(%rbp)
addq $0x8, %rdi
callq 0x2d780
movq %rax, %rcx
movq -0x208(%rbp), %rax
cmpq %rcx, %rax
je 0x4617e
movq -0x20(%rbp), %rdi
callq 0x30780
jmp 0x4617c
jmp 0x46142
leaq -0x100(%rbp), %rdi
callq 0x307d0
leaq -0xb0(%rbp), %rdi
callq 0x2dee0
jmp 0x46198
jmp 0x4619a
movq -0x20(%rbp), %rsi
leaq -0x150(%rbp), %rdi
callq 0x30c90
jmp 0x461ac
leaq -0x150(%rbp), %rdi
callq 0x30780
jmp 0x461ba
xorps %xmm0, %xmm0
movaps %xmm0, -0x160(%rbp)
movaps %xmm0, -0x170(%rbp)
movaps %xmm0, -0x180(%rbp)
movaps %xmm0, -0x190(%rbp)
movaps %xmm0, -0x1a0(%rbp)
leaq -0x1a0(%rbp), %rdi
callq 0x2f660
jmp 0x461ee
leaq -0x150(%rbp), %rdi
leaq -0x1a0(%rbp), %rsi
callq 0x2f500
movb %al, -0x209(%rbp)
leaq -0x1a0(%rbp), %rdi
callq 0x307d0
movb -0x209(%rbp), %al
testb $0x1, %al
jne 0x4621f
jmp 0x46233
movq -0x1a8(%rbp), %rdi
addq $0x8, %rdi
callq 0x30780
jmp 0x46231
jmp 0x46233
leaq -0x150(%rbp), %rdi
callq 0x307d0
movq -0x20(%rbp), %rdi
callq 0x30780
jmp 0x4624a
jmp 0x45f4a
addq $0x210, %rsp # imm = 0x210
popq %rbp
retq
movq %rax, %rdi
callq 0x39830
|
_ZN16SEMANTICANALYZER18AstStatementParser18serializeObjectDecERN3AST7ASTTree11DSFIteratorERNS_10ObjectDeclE:
push rbp
mov rbp, rsp
sub rsp, 210h
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov [rbp+var_18], rdx
mov rax, [rbp+var_8]
mov [rbp+var_1A8], rax
mov rax, [rbp+var_10]
mov [rbp+var_20], rax
loc_45F4A:
mov rax, [rbp+var_20]
mov [rbp+var_1B0], rax
xorps xmm0, xmm0
movaps [rbp+var_30], xmm0
movaps [rbp+var_40], xmm0
movaps [rbp+var_50], xmm0
movaps [rbp+var_60], xmm0
movaps [rbp+var_70], xmm0
lea rdi, [rbp+var_70]; this
call __ZN3AST7ASTTree11DSFIteratorC2Ev; AST::ASTTree::DSFIterator::DSFIterator(void)
jmp short $+2
loc_45F77:
mov rdi, [rbp+var_1B0]
lea rsi, [rbp+var_70]
call __ZNK3AST7ASTTree11DSFIteratorneERKS1_; AST::ASTTree::DSFIterator::operator!=(AST::ASTTree::DSFIterator const&)
mov [rbp+var_1B1], al
lea rdi, [rbp+var_70]; this
call __ZN3AST7ASTTree11DSFIteratorD2Ev; AST::ASTTree::DSFIterator::~DSFIterator()
mov al, [rbp+var_1B1]
test al, 1
jnz short loc_45FA5
jmp loc_4624F
loc_45FA5:
mov rdi, [rbp+var_20]
call __ZNK3AST7ASTTree11DSFIteratorptEv; AST::ASTTree::DSFIterator::operator->(void)
mov [rbp+var_1C0], rax
jmp short $+2
loc_45FB7:
mov rdi, [rbp+var_1C0]
lea rsi, aShape; "SHAPE"
call __ZSteqIcSt11char_traitsIcESaIcEEbRKNSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_; std::operator==<char>(std::string const&,char const*)
mov [rbp+var_1C1], al
jmp short $+2
loc_45FD2:
mov al, [rbp+var_1C1]
test al, 1
jnz short loc_45FDE
jmp short loc_46024
loc_45FDE:
mov rdi, [rbp+var_20]
call __ZN3AST7ASTTree11DSFIteratorppEv; AST::ASTTree::DSFIterator::operator++(void)
jmp short $+2
loc_45FE9:
mov rdi, [rbp+var_1A8]
add rdi, 8
call __ZN3AST7ASTTree11DSFIteratorppEv; AST::ASTTree::DSFIterator::operator++(void)
jmp short $+2
loc_45FFB:
mov rdi, [rbp+var_20]
call __ZNK3AST7ASTTree11DSFIteratorptEv; AST::ASTTree::DSFIterator::operator->(void)
mov [rbp+var_1D0], rax
jmp short $+2
loc_4600D:
mov rsi, [rbp+var_1D0]
mov rdi, [rbp+var_18]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSERKS4_; std::string::operator=(std::string const&)
jmp short $+2
loc_4601F:
jmp loc_4619A
loc_46024:
mov rdi, [rbp+var_20]
call __ZNK3AST7ASTTree11DSFIteratorptEv; AST::ASTTree::DSFIterator::operator->(void)
mov [rbp+var_1D8], rax
jmp short $+2
loc_46036:
mov rdi, [rbp+var_1D8]
lea rsi, aId; "ID"
call __ZSteqIcSt11char_traitsIcESaIcEEbRKNSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_; std::operator==<char>(std::string const&,char const*)
mov [rbp+var_1D9], al
jmp short $+2
loc_46051:
mov al, [rbp+var_1D9]
test al, 1
jnz short loc_4605D
jmp short loc_460A7
loc_4605D:
mov rdi, [rbp+var_20]
call __ZN3AST7ASTTree11DSFIteratorppEv; AST::ASTTree::DSFIterator::operator++(void)
jmp short $+2
loc_46068:
mov rdi, [rbp+var_1A8]
add rdi, 8
call __ZN3AST7ASTTree11DSFIteratorppEv; AST::ASTTree::DSFIterator::operator++(void)
jmp short $+2
loc_4607A:
mov rdi, [rbp+var_20]
call __ZNK3AST7ASTTree11DSFIteratorptEv; AST::ASTTree::DSFIterator::operator->(void)
mov [rbp+var_1E8], rax
jmp short $+2
loc_4608C:
mov rsi, [rbp+var_1E8]
mov rdi, [rbp+var_18]
add rdi, 20h ; ' '
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSERKS4_; std::string::operator=(std::string const&)
jmp short $+2
loc_460A2:
jmp loc_46198
loc_460A7:
mov rdi, [rbp+var_20]
call __ZNK3AST7ASTTree11DSFIteratorptEv; AST::ASTTree::DSFIterator::operator->(void)
mov [rbp+var_1F0], rax
jmp short $+2
loc_460B9:
mov rdi, [rbp+var_1F0]
lea rsi, aProperty; "property"
call __ZSteqIcSt11char_traitsIcESaIcEEbRKNSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_; std::operator==<char>(std::string const&,char const*)
mov [rbp+var_1F1], al
jmp short $+2
loc_460D4:
mov al, [rbp+var_1F1]
test al, 1
jnz short loc_460E3
jmp loc_46196
loc_460E3:
lea rdi, [rbp+var_B0]; this
call __ZN16SEMANTICANALYZER8PropertyC2Ev; SEMANTICANALYZER::Property::Property(void)
mov rdi, [rbp+var_20]; this
call __ZNK3AST7ASTTree11DSFIterator3getEv; AST::ASTTree::DSFIterator::get(void)
mov rsi, rax
lea rdi, [rbp+var_100]
call __ZN3AST7ASTTree11DSFIteratorC1EPNS_4NodeE; AST::ASTTree::DSFIterator::DSFIterator(AST::Node *)
jmp short $+2
loc_46109:
mov rdi, [rbp+var_1A8]; this
lea rsi, [rbp+var_100]; AST::ASTTree::DSFIterator *
lea rdx, [rbp+var_B0]; SEMANTICANALYZER::Property *
mov [rbp+var_200], rdx
call __ZN16SEMANTICANALYZER18AstStatementParser17serializePropertyERN3AST7ASTTree11DSFIteratorERNS_8PropertyE; SEMANTICANALYZER::AstStatementParser::serializeProperty(AST::ASTTree::DSFIterator &,SEMANTICANALYZER::Property &)
mov rsi, [rbp+var_200]
mov rdi, [rbp+var_18]
add rdi, 40h ; '@'
call __ZNSt6vectorIN16SEMANTICANALYZER8PropertyESaIS1_EE9push_backEOS1_; std::vector<SEMANTICANALYZER::Property>::push_back(SEMANTICANALYZER::Property&&)
jmp short $+2
loc_46140:
jmp short $+2
loc_46142:
mov rdi, [rbp+var_20]; this
call __ZNK3AST7ASTTree11DSFIterator3getEv; AST::ASTTree::DSFIterator::get(void)
mov rdi, [rbp+var_1A8]
mov [rbp+var_208], rax
add rdi, 8; this
call __ZNK3AST7ASTTree11DSFIterator3getEv; AST::ASTTree::DSFIterator::get(void)
mov rcx, rax
mov rax, [rbp+var_208]
cmp rax, rcx
jz short loc_4617E
mov rdi, [rbp+var_20]
call __ZN3AST7ASTTree11DSFIteratorppEv; AST::ASTTree::DSFIterator::operator++(void)
jmp short $+2
loc_4617C:
jmp short loc_46142
loc_4617E:
lea rdi, [rbp+var_100]; this
call __ZN3AST7ASTTree11DSFIteratorD2Ev; AST::ASTTree::DSFIterator::~DSFIterator()
lea rdi, [rbp+var_B0]; this
call __ZN16SEMANTICANALYZER8PropertyD2Ev; SEMANTICANALYZER::Property::~Property()
loc_46196:
jmp short $+2
loc_46198:
jmp short $+2
loc_4619A:
mov rsi, [rbp+var_20]; AST::ASTTree::DSFIterator *
lea rdi, [rbp+var_150]; this
call __ZN3AST7ASTTree11DSFIteratorC2ERKS1_; AST::ASTTree::DSFIterator::DSFIterator(AST::ASTTree::DSFIterator const&)
jmp short $+2
loc_461AC:
lea rdi, [rbp+var_150]
call __ZN3AST7ASTTree11DSFIteratorppEv; AST::ASTTree::DSFIterator::operator++(void)
jmp short $+2
loc_461BA:
xorps xmm0, xmm0
movaps [rbp+var_160], xmm0
movaps [rbp+var_170], xmm0
movaps [rbp+var_180], xmm0
movaps [rbp+var_190], xmm0
movaps [rbp+var_1A0], xmm0
lea rdi, [rbp+var_1A0]; this
call __ZN3AST7ASTTree11DSFIteratorC2Ev; AST::ASTTree::DSFIterator::DSFIterator(void)
jmp short $+2
loc_461EE:
lea rdi, [rbp+var_150]
lea rsi, [rbp+var_1A0]
call __ZNK3AST7ASTTree11DSFIteratorneERKS1_; AST::ASTTree::DSFIterator::operator!=(AST::ASTTree::DSFIterator const&)
mov [rbp+var_209], al
lea rdi, [rbp+var_1A0]; this
call __ZN3AST7ASTTree11DSFIteratorD2Ev; AST::ASTTree::DSFIterator::~DSFIterator()
mov al, [rbp+var_209]
test al, 1
jnz short loc_4621F
jmp short loc_46233
loc_4621F:
mov rdi, [rbp+var_1A8]
add rdi, 8
call __ZN3AST7ASTTree11DSFIteratorppEv; AST::ASTTree::DSFIterator::operator++(void)
jmp short $+2
loc_46231:
jmp short $+2
loc_46233:
lea rdi, [rbp+var_150]; this
call __ZN3AST7ASTTree11DSFIteratorD2Ev; AST::ASTTree::DSFIterator::~DSFIterator()
mov rdi, [rbp+var_20]
call __ZN3AST7ASTTree11DSFIteratorppEv; AST::ASTTree::DSFIterator::operator++(void)
jmp short $+2
loc_4624A:
jmp loc_45F4A
loc_4624F:
add rsp, 210h
pop rbp
retn
mov rdi, rax
call __clang_call_terminate
|
char SEMANTICANALYZER::AstStatementParser::serializeObjectDec(
SEMANTICANALYZER::AstStatementParser *this,
AST::ASTTree::DSFIterator *a2,
SEMANTICANALYZER::ObjectDecl *a3)
{
char result; // al
long long v4; // rax
char v5; // [rsp+7h] [rbp-209h]
long long v6; // [rsp+8h] [rbp-208h]
long long v7; // [rsp+20h] [rbp-1F0h]
long long v8; // [rsp+28h] [rbp-1E8h]
long long v9; // [rsp+38h] [rbp-1D8h]
long long v10; // [rsp+40h] [rbp-1D0h]
long long v11; // [rsp+50h] [rbp-1C0h]
char v12; // [rsp+5Fh] [rbp-1B1h]
AST::ASTTree::DSFIterator *v13; // [rsp+60h] [rbp-1B0h]
_OWORD v14[5]; // [rsp+70h] [rbp-1A0h] BYREF
_BYTE v15[80]; // [rsp+C0h] [rbp-150h] BYREF
_BYTE v16[80]; // [rsp+110h] [rbp-100h] BYREF
_BYTE v17[64]; // [rsp+160h] [rbp-B0h] BYREF
_OWORD v18[5]; // [rsp+1A0h] [rbp-70h] BYREF
AST::ASTTree::DSFIterator *i; // [rsp+1F0h] [rbp-20h]
SEMANTICANALYZER::ObjectDecl *v20; // [rsp+1F8h] [rbp-18h]
AST::ASTTree::DSFIterator *v21; // [rsp+200h] [rbp-10h]
SEMANTICANALYZER::AstStatementParser *v22; // [rsp+208h] [rbp-8h]
v22 = this;
v21 = a2;
v20 = a3;
for ( i = a2; ; AST::ASTTree::DSFIterator::operator++(i) )
{
v13 = i;
memset(v18, 0, sizeof(v18));
AST::ASTTree::DSFIterator::DSFIterator((AST::ASTTree::DSFIterator *)v18);
v12 = AST::ASTTree::DSFIterator::operator!=(v13, v18);
AST::ASTTree::DSFIterator::~DSFIterator((AST::ASTTree::DSFIterator *)v18);
result = v12;
if ( (v12 & 1) == 0 )
break;
v11 = AST::ASTTree::DSFIterator::operator->(i);
if ( (std::operator==<char>(v11, "SHAPE") & 1) != 0 )
{
AST::ASTTree::DSFIterator::operator++(i);
AST::ASTTree::DSFIterator::operator++((char *)this + 8);
v10 = AST::ASTTree::DSFIterator::operator->(i);
std::string::operator=(v20, v10);
}
else
{
v9 = AST::ASTTree::DSFIterator::operator->(i);
if ( (std::operator==<char>(v9, "ID") & 1) != 0 )
{
AST::ASTTree::DSFIterator::operator++(i);
AST::ASTTree::DSFIterator::operator++((char *)this + 8);
v8 = AST::ASTTree::DSFIterator::operator->(i);
std::string::operator=((char *)v20 + 32, v8);
}
else
{
v7 = AST::ASTTree::DSFIterator::operator->(i);
if ( (std::operator==<char>(v7, "property") & 1) != 0 )
{
SEMANTICANALYZER::Property::Property((SEMANTICANALYZER::Property *)v17);
v4 = AST::ASTTree::DSFIterator::get(i);
AST::ASTTree::DSFIterator::DSFIterator(v16, v4);
SEMANTICANALYZER::AstStatementParser::serializeProperty(
this,
(AST::ASTTree::DSFIterator *)v16,
(SEMANTICANALYZER::Property *)v17);
std::vector<SEMANTICANALYZER::Property>::push_back((char *)v20 + 64, v17);
while ( 1 )
{
v6 = AST::ASTTree::DSFIterator::get(i);
if ( v6 == AST::ASTTree::DSFIterator::get((SEMANTICANALYZER::AstStatementParser *)((char *)this + 8)) )
break;
AST::ASTTree::DSFIterator::operator++(i);
}
AST::ASTTree::DSFIterator::~DSFIterator((AST::ASTTree::DSFIterator *)v16);
SEMANTICANALYZER::Property::~Property((SEMANTICANALYZER::Property *)v17);
}
}
}
AST::ASTTree::DSFIterator::DSFIterator((AST::ASTTree::DSFIterator *)v15, i);
AST::ASTTree::DSFIterator::operator++(v15);
memset(v14, 0, sizeof(v14));
AST::ASTTree::DSFIterator::DSFIterator((AST::ASTTree::DSFIterator *)v14);
v5 = AST::ASTTree::DSFIterator::operator!=(v15, v14);
AST::ASTTree::DSFIterator::~DSFIterator((AST::ASTTree::DSFIterator *)v14);
if ( (v5 & 1) != 0 )
AST::ASTTree::DSFIterator::operator++((char *)this + 8);
AST::ASTTree::DSFIterator::~DSFIterator((AST::ASTTree::DSFIterator *)v15);
}
return result;
}
|
serializeObjectDec:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x210
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 qword ptr [RBP + -0x1a8],RAX
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RBP + -0x20],RAX
LAB_00145f4a:
MOV RAX,qword ptr [RBP + -0x20]
MOV qword ptr [RBP + -0x1b0],RAX
XORPS XMM0,XMM0
MOVAPS xmmword ptr [RBP + -0x30],XMM0
MOVAPS xmmword ptr [RBP + -0x40],XMM0
MOVAPS xmmword ptr [RBP + -0x50],XMM0
MOVAPS xmmword ptr [RBP + -0x60],XMM0
MOVAPS xmmword ptr [RBP + -0x70],XMM0
LAB_00145f6c:
LEA RDI,[RBP + -0x70]
CALL 0x0012f660
JMP 0x00145f77
LAB_00145f77:
MOV RDI,qword ptr [RBP + -0x1b0]
LEA RSI,[RBP + -0x70]
CALL 0x0012f500
MOV byte ptr [RBP + -0x1b1],AL
LEA RDI,[RBP + -0x70]
CALL 0x001307d0
MOV AL,byte ptr [RBP + -0x1b1]
TEST AL,0x1
JNZ 0x00145fa5
JMP 0x0014624f
LAB_00145fa5:
MOV RDI,qword ptr [RBP + -0x20]
CALL 0x0012f900
MOV qword ptr [RBP + -0x1c0],RAX
JMP 0x00145fb7
LAB_00145fb7:
MOV RDI,qword ptr [RBP + -0x1c0]
LEA RSI,[0x14d794]
CALL 0x00131710
MOV byte ptr [RBP + -0x1c1],AL
JMP 0x00145fd2
LAB_00145fd2:
MOV AL,byte ptr [RBP + -0x1c1]
TEST AL,0x1
JNZ 0x00145fde
JMP 0x00146024
LAB_00145fde:
MOV RDI,qword ptr [RBP + -0x20]
CALL 0x00130780
JMP 0x00145fe9
LAB_00145fe9:
MOV RDI,qword ptr [RBP + -0x1a8]
ADD RDI,0x8
CALL 0x00130780
JMP 0x00145ffb
LAB_00145ffb:
MOV RDI,qword ptr [RBP + -0x20]
CALL 0x0012f900
MOV qword ptr [RBP + -0x1d0],RAX
JMP 0x0014600d
LAB_0014600d:
MOV RSI,qword ptr [RBP + -0x1d0]
MOV RDI,qword ptr [RBP + -0x18]
CALL 0x0012d130
JMP 0x0014601f
LAB_0014601f:
JMP 0x0014619a
LAB_00146024:
MOV RDI,qword ptr [RBP + -0x20]
CALL 0x0012f900
MOV qword ptr [RBP + -0x1d8],RAX
JMP 0x00146036
LAB_00146036:
MOV RDI,qword ptr [RBP + -0x1d8]
LEA RSI,[0x14d79a]
CALL 0x00131710
MOV byte ptr [RBP + -0x1d9],AL
JMP 0x00146051
LAB_00146051:
MOV AL,byte ptr [RBP + -0x1d9]
TEST AL,0x1
JNZ 0x0014605d
JMP 0x001460a7
LAB_0014605d:
MOV RDI,qword ptr [RBP + -0x20]
CALL 0x00130780
JMP 0x00146068
LAB_00146068:
MOV RDI,qword ptr [RBP + -0x1a8]
ADD RDI,0x8
CALL 0x00130780
JMP 0x0014607a
LAB_0014607a:
MOV RDI,qword ptr [RBP + -0x20]
CALL 0x0012f900
MOV qword ptr [RBP + -0x1e8],RAX
JMP 0x0014608c
LAB_0014608c:
MOV RSI,qword ptr [RBP + -0x1e8]
MOV RDI,qword ptr [RBP + -0x18]
ADD RDI,0x20
CALL 0x0012d130
JMP 0x001460a2
LAB_001460a2:
JMP 0x00146198
LAB_001460a7:
MOV RDI,qword ptr [RBP + -0x20]
CALL 0x0012f900
MOV qword ptr [RBP + -0x1f0],RAX
JMP 0x001460b9
LAB_001460b9:
MOV RDI,qword ptr [RBP + -0x1f0]
LEA RSI,[0x14d79d]
CALL 0x00131710
MOV byte ptr [RBP + -0x1f1],AL
JMP 0x001460d4
LAB_001460d4:
MOV AL,byte ptr [RBP + -0x1f1]
TEST AL,0x1
JNZ 0x001460e3
JMP 0x00146196
LAB_001460e3:
LEA RDI,[RBP + -0xb0]
CALL 0x0012f480
MOV RDI,qword ptr [RBP + -0x20]
CALL 0x0012d780
MOV RSI,RAX
LEA RDI,[RBP + -0x100]
CALL 0x0012d6b0
JMP 0x00146109
LAB_00146109:
MOV RDI,qword ptr [RBP + -0x1a8]
LEA RSI,[RBP + -0x100]
LEA RDX,[RBP + -0xb0]
MOV qword ptr [RBP + -0x200],RDX
CALL 0x0012edf0
MOV RSI,qword ptr [RBP + -0x200]
MOV RDI,qword ptr [RBP + -0x18]
ADD RDI,0x40
CALL 0x0012fab0
JMP 0x00146140
LAB_00146140:
JMP 0x00146142
LAB_00146142:
MOV RDI,qword ptr [RBP + -0x20]
CALL 0x0012d780
MOV RDI,qword ptr [RBP + -0x1a8]
MOV qword ptr [RBP + -0x208],RAX
ADD RDI,0x8
CALL 0x0012d780
MOV RCX,RAX
MOV RAX,qword ptr [RBP + -0x208]
CMP RAX,RCX
JZ 0x0014617e
MOV RDI,qword ptr [RBP + -0x20]
CALL 0x00130780
JMP 0x0014617c
LAB_0014617c:
JMP 0x00146142
LAB_0014617e:
LEA RDI,[RBP + -0x100]
CALL 0x001307d0
LEA RDI,[RBP + -0xb0]
CALL 0x0012dee0
LAB_00146196:
JMP 0x00146198
LAB_00146198:
JMP 0x0014619a
LAB_0014619a:
MOV RSI,qword ptr [RBP + -0x20]
LEA RDI,[RBP + -0x150]
CALL 0x00130c90
JMP 0x001461ac
LAB_001461ac:
LEA RDI,[RBP + -0x150]
CALL 0x00130780
JMP 0x001461ba
LAB_001461ba:
XORPS XMM0,XMM0
MOVAPS xmmword ptr [RBP + -0x160],XMM0
MOVAPS xmmword ptr [RBP + -0x170],XMM0
MOVAPS xmmword ptr [RBP + -0x180],XMM0
MOVAPS xmmword ptr [RBP + -0x190],XMM0
MOVAPS xmmword ptr [RBP + -0x1a0],XMM0
LEA RDI,[RBP + -0x1a0]
CALL 0x0012f660
JMP 0x001461ee
LAB_001461ee:
LEA RDI,[RBP + -0x150]
LEA RSI,[RBP + -0x1a0]
CALL 0x0012f500
MOV byte ptr [RBP + -0x209],AL
LEA RDI,[RBP + -0x1a0]
CALL 0x001307d0
MOV AL,byte ptr [RBP + -0x209]
TEST AL,0x1
JNZ 0x0014621f
JMP 0x00146233
LAB_0014621f:
MOV RDI,qword ptr [RBP + -0x1a8]
ADD RDI,0x8
CALL 0x00130780
JMP 0x00146231
LAB_00146231:
JMP 0x00146233
LAB_00146233:
LEA RDI,[RBP + -0x150]
CALL 0x001307d0
MOV RDI,qword ptr [RBP + -0x20]
CALL 0x00130780
JMP 0x0014624a
LAB_0014624a:
JMP 0x00145f4a
LAB_0014624f:
ADD RSP,0x210
POP RBP
RET
|
/* SEMANTICANALYZER::AstStatementParser::serializeObjectDec(AST::ASTTree::DSFIterator&,
SEMANTICANALYZER::ObjectDecl&) */
void __thiscall
SEMANTICANALYZER::AstStatementParser::serializeObjectDec
(AstStatementParser *this,DSFIterator *param_1,ObjectDecl *param_2)
{
DSFIterator *this_00;
byte bVar1;
bool bVar2;
string *psVar3;
Node *pNVar4;
long lVar5;
long lVar6;
int8 local_1a8;
int8 uStack_1a0;
int8 local_198;
int8 uStack_190;
int8 local_188;
int8 uStack_180;
int8 local_178;
int8 uStack_170;
int8 local_168;
int8 uStack_160;
DSFIterator local_158 [80];
DSFIterator local_108 [80];
Property local_b8 [64];
int8 local_78;
int8 uStack_70;
int8 local_68;
int8 uStack_60;
int8 local_58;
int8 uStack_50;
int8 local_48;
int8 uStack_40;
int8 local_38;
int8 uStack_30;
DSFIterator *local_28;
ObjectDecl *local_20;
DSFIterator *local_18;
AstStatementParser *local_10;
local_28 = param_1;
local_20 = param_2;
local_18 = param_1;
local_10 = this;
while( true ) {
this_00 = local_28;
local_38 = 0;
uStack_30 = 0;
local_48 = 0;
uStack_40 = 0;
local_58 = 0;
uStack_50 = 0;
local_68 = 0;
uStack_60 = 0;
local_78 = 0;
uStack_70 = 0;
/* try { // try from 00145f6c to 00146247 has its CatchHandler @ 00146258 */
AST::ASTTree::DSFIterator::DSFIterator((DSFIterator *)&local_78);
bVar1 = AST::ASTTree::DSFIterator::operator!=(this_00,(DSFIterator *)&local_78);
AST::ASTTree::DSFIterator::~DSFIterator((DSFIterator *)&local_78);
if ((bVar1 & 1) == 0) break;
psVar3 = (string *)AST::ASTTree::DSFIterator::operator->(local_28);
bVar2 = std::operator==(psVar3,"SHAPE");
if (bVar2) {
AST::ASTTree::DSFIterator::operator++(local_28);
AST::ASTTree::DSFIterator::operator++((DSFIterator *)(this + 8));
psVar3 = (string *)AST::ASTTree::DSFIterator::operator->(local_28);
std::__cxx11::string::operator=((string *)local_20,psVar3);
}
else {
psVar3 = (string *)AST::ASTTree::DSFIterator::operator->(local_28);
bVar2 = std::operator==(psVar3,"ID");
if (bVar2) {
AST::ASTTree::DSFIterator::operator++(local_28);
AST::ASTTree::DSFIterator::operator++((DSFIterator *)(this + 8));
psVar3 = (string *)AST::ASTTree::DSFIterator::operator->(local_28);
std::__cxx11::string::operator=((string *)(local_20 + 0x20),psVar3);
}
else {
psVar3 = (string *)AST::ASTTree::DSFIterator::operator->(local_28);
bVar2 = std::operator==(psVar3,"property");
if (bVar2) {
Property::Property(local_b8);
pNVar4 = (Node *)AST::ASTTree::DSFIterator::get();
AST::ASTTree::DSFIterator::DSFIterator(local_108,pNVar4);
serializeProperty(this,local_108,local_b8);
std::vector<SEMANTICANALYZER::Property,std::allocator<SEMANTICANALYZER::Property>>::
push_back((vector<SEMANTICANALYZER::Property,std::allocator<SEMANTICANALYZER::Property>> *
)(local_20 + 0x40),local_b8);
while( true ) {
lVar5 = AST::ASTTree::DSFIterator::get();
lVar6 = AST::ASTTree::DSFIterator::get();
if (lVar5 == lVar6) break;
AST::ASTTree::DSFIterator::operator++(local_28);
}
AST::ASTTree::DSFIterator::~DSFIterator(local_108);
Property::~Property(local_b8);
}
}
}
AST::ASTTree::DSFIterator::DSFIterator(local_158,local_28);
AST::ASTTree::DSFIterator::operator++(local_158);
local_168 = 0;
uStack_160 = 0;
local_178 = 0;
uStack_170 = 0;
local_188 = 0;
uStack_180 = 0;
local_198 = 0;
uStack_190 = 0;
local_1a8 = 0;
uStack_1a0 = 0;
AST::ASTTree::DSFIterator::DSFIterator((DSFIterator *)&local_1a8);
bVar1 = AST::ASTTree::DSFIterator::operator!=(local_158,(DSFIterator *)&local_1a8);
AST::ASTTree::DSFIterator::~DSFIterator((DSFIterator *)&local_1a8);
if ((bVar1 & 1) != 0) {
AST::ASTTree::DSFIterator::operator++((DSFIterator *)(this + 8));
}
AST::ASTTree::DSFIterator::~DSFIterator(local_158);
AST::ASTTree::DSFIterator::operator++(local_28);
}
return;
}
|
|
64,324 |
SEMANTICANALYZER::AstStatementParser::serializeObjectDec(AST::ASTTree::DSFIterator&, SEMANTICANALYZER::ObjectDecl&)
|
11AgReS1SoR11[P]Graph/Common/SemanticAnalyzer/src/AstStatementParser.cpp
|
void SEMANTICANALYZER::AstStatementParser::serializeObjectDec(AST::ASTTree::DSFIterator& objectDecIter, ObjectDecl& objectDecl) noexcept
{
for(auto& it = objectDecIter; it != AST::ASTTree::DSFIterator(); ++it)
{
if(it->value == GRAMMERCONSTANTS::SHAPE)
{
++it;
++astIter;
objectDecl.shape = it->value;
}
else if(it->value == GRAMMERCONSTANTS::ID)
{
++it;
++astIter;
objectDecl.id = it->value;
}
else if(it->value == GRAMMERCONSTANTS::PROPERTY)
{
Property property;
AST::ASTTree::DSFIterator propertyIter(it.get());
serializeProperty(propertyIter, property);
objectDecl.properties.push_back(std::move(property));
while(it.get() != astIter.get()) {
++it;
}
}
auto nextIt = it;
++nextIt;
if(nextIt != AST::ASTTree::DSFIterator())
{
++astIter;
}
}
}
|
O1
|
cpp
|
SEMANTICANALYZER::AstStatementParser::serializeObjectDec(AST::ASTTree::DSFIterator&, SEMANTICANALYZER::ObjectDecl&):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xc8, %rsp
movq %rsi, %r14
leaq 0x40(%rdx), %rax
movq %rax, 0x50(%rsp)
movq %rdi, 0x58(%rsp)
leaq 0x8(%rdi), %r13
movq %rdx, 0x68(%rsp)
leaq 0x20(%rdx), %rax
movq %rax, 0x60(%rsp)
leaq 0x70(%rsp), %rbp
leaq 0x3646(%rip), %r12 # 0x17774
movq %rsp, %r15
xorps %xmm0, %xmm0
movaps %xmm0, 0xb0(%rsp)
movaps %xmm0, 0xa0(%rsp)
movaps %xmm0, 0x90(%rsp)
movaps %xmm0, 0x80(%rsp)
movaps %xmm0, 0x70(%rsp)
movq %rbp, %rdi
xorl %esi, %esi
callq 0xb600
movq %r14, %rdi
movq %rbp, %rsi
callq 0xb740
movl %eax, %ebx
movq %rbp, %rdi
callq 0xbd20
testb %bl, %bl
je 0x14350
movq %r14, %rdi
callq 0xb840
movq %rax, %rdi
movq %r12, %rsi
callq 0xb1f0
testl %eax, %eax
je 0x14256
movq %r14, %rdi
callq 0xb840
movq %rax, %rdi
leaq 0x35cd(%rip), %rsi # 0x1777a
callq 0xb1f0
testl %eax, %eax
je 0x14275
movq %r14, %rdi
callq 0xb840
movq %rax, %rdi
leaq 0x35b1(%rip), %rsi # 0x1777d
callq 0xb1f0
testl %eax, %eax
jne 0x1429a
leaq 0x10(%rsp), %rax
movq %rax, (%rsp)
xorl %ecx, %ecx
movq %rcx, 0x8(%rsp)
movb %cl, 0x10(%rsp)
leaq 0x30(%rsp), %rax
movq %rax, 0x20(%rsp)
movq %rcx, 0x28(%rsp)
movb %cl, 0x30(%rsp)
movq %r14, %rdi
callq 0xb1a0
movq %rbp, %rdi
movq %rax, %rsi
callq 0xb180
movq 0x58(%rsp), %rdi
movq %rbp, %rsi
movq %r15, %rdx
callq 0xb5a0
movq 0x50(%rsp), %rdi
movq %r15, %rsi
callq 0xbd30
movq %r14, %rdi
callq 0xb1a0
movq %rax, %rbx
movq %r13, %rdi
callq 0xb1a0
cmpq %rax, %rbx
je 0x14308
movq %r14, %rdi
callq 0xbaf0
jmp 0x14230
movq %r14, %rdi
callq 0xbaf0
movq %r13, %rdi
callq 0xbaf0
movq %r14, %rdi
callq 0xb840
movq 0x68(%rsp), %rdi
jmp 0x14292
movq %r14, %rdi
callq 0xbaf0
movq %r13, %rdi
callq 0xbaf0
movq %r14, %rdi
callq 0xb840
movq 0x60(%rsp), %rdi
movq %rax, %rsi
callq 0xb390
movq %rbp, %rdi
movq %r14, %rsi
callq 0xb660
movq %rbp, %rdi
callq 0xbaf0
xorps %xmm0, %xmm0
movaps %xmm0, 0x40(%rsp)
movaps %xmm0, 0x30(%rsp)
movaps %xmm0, 0x20(%rsp)
movaps %xmm0, 0x10(%rsp)
movaps %xmm0, (%rsp)
movq %r15, %rdi
xorl %esi, %esi
callq 0xb600
movq %rbp, %rdi
movq %r15, %rsi
callq 0xb740
movl %eax, %ebx
movq %r15, %rdi
callq 0xbd20
testb %bl, %bl
je 0x142f3
movq %r13, %rdi
callq 0xbaf0
movq %rbp, %rdi
callq 0xbd20
movq %r14, %rdi
callq 0xbaf0
jmp 0x14131
movq %rbp, %rdi
callq 0xbd20
movq 0x20(%rsp), %rdi
leaq 0x30(%rsp), %rax
cmpq %rax, %rdi
je 0x1432c
movq 0x30(%rsp), %rsi
incq %rsi
callq 0xb6a0
movq (%rsp), %rdi
leaq 0x10(%rsp), %rax
cmpq %rax, %rdi
je 0x1429a
movq 0x10(%rsp), %rsi
incq %rsi
callq 0xb6a0
jmp 0x1429a
addq $0xc8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x14364
movq %rax, %rdi
callq 0x10969
|
_ZN16SEMANTICANALYZER18AstStatementParser18serializeObjectDecERN3AST7ASTTree11DSFIteratorERNS_10ObjectDeclE:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 0C8h
mov r14, rsi
lea rax, [rdx+40h]
mov [rsp+0F8h+var_A8], rax
mov [rsp+0F8h+var_A0], rdi
lea r13, [rdi+8]
mov [rsp+0F8h+var_90], rdx
lea rax, [rdx+20h]
mov [rsp+0F8h+var_98], rax
lea rbp, [rsp+0F8h+var_88]
lea r12, aShape; "SHAPE"
mov r15, rsp
loc_14131:
xorps xmm0, xmm0
movaps [rsp+0F8h+var_48], xmm0
movaps [rsp+0F8h+var_58], xmm0
movaps [rsp+0F8h+var_68], xmm0
movaps [rsp+0F8h+var_78], xmm0
movaps [rsp+0F8h+var_88], xmm0
mov rdi, rbp
xor esi, esi
call __ZNSt11_Deque_baseIPN3AST4NodeESaIS2_EE17_M_initialize_mapEm; std::_Deque_base<AST::Node *>::_M_initialize_map(ulong)
mov rdi, r14
mov rsi, rbp
call __ZNK3AST7ASTTree11DSFIteratorneERKS1_; AST::ASTTree::DSFIterator::operator!=(AST::ASTTree::DSFIterator const&)
mov ebx, eax
mov rdi, rbp
call __ZNSt11_Deque_baseIPN3AST4NodeESaIS2_EED2Ev; std::_Deque_base<AST::Node *>::~_Deque_base()
test bl, bl
jz loc_14350
mov rdi, r14
call __ZNK3AST7ASTTree11DSFIteratorptEv; AST::ASTTree::DSFIterator::operator->(void)
mov rdi, rax
mov rsi, r12
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7compareEPKc; std::string::compare(char const*)
test eax, eax
jz loc_14256
mov rdi, r14
call __ZNK3AST7ASTTree11DSFIteratorptEv; AST::ASTTree::DSFIterator::operator->(void)
mov rdi, rax
lea rsi, aId; "ID"
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7compareEPKc; std::string::compare(char const*)
test eax, eax
jz loc_14275
mov rdi, r14
call __ZNK3AST7ASTTree11DSFIteratorptEv; AST::ASTTree::DSFIterator::operator->(void)
mov rdi, rax
lea rsi, aProperty; "property"
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7compareEPKc; std::string::compare(char const*)
test eax, eax
jnz loc_1429A
lea rax, [rsp+0F8h+var_E8]
mov [rsp+0F8h+var_F8], rax
xor ecx, ecx
mov [rsp+0F8h+var_F8+8], rcx
mov byte ptr [rsp+0F8h+var_E8], cl
lea rax, [rsp+0F8h+var_C8]
mov [rsp+0F8h+var_D8], rax
mov [rsp+0F8h+var_D8+8], rcx
mov byte ptr [rsp+0F8h+var_C8], cl
mov rdi, r14; this
call __ZNK3AST7ASTTree11DSFIterator3getEv; AST::ASTTree::DSFIterator::get(void)
mov rdi, rbp
mov rsi, rax
call __ZN3AST7ASTTree11DSFIteratorC1EPNS_4NodeE; AST::ASTTree::DSFIterator::DSFIterator(AST::Node *)
mov rdi, [rsp+0F8h+var_A0]
mov rsi, rbp
mov rdx, r15
call __ZN16SEMANTICANALYZER18AstStatementParser17serializePropertyERN3AST7ASTTree11DSFIteratorERNS_8PropertyE; SEMANTICANALYZER::AstStatementParser::serializeProperty(AST::ASTTree::DSFIterator &,SEMANTICANALYZER::Property &)
mov rdi, [rsp+0F8h+var_A8]
mov rsi, r15
call __ZNSt6vectorIN16SEMANTICANALYZER8PropertyESaIS1_EE12emplace_backIJS1_EEERS1_DpOT_; std::vector<SEMANTICANALYZER::Property>::emplace_back<SEMANTICANALYZER::Property>(SEMANTICANALYZER::Property &&)
loc_14230:
mov rdi, r14; this
call __ZNK3AST7ASTTree11DSFIterator3getEv; AST::ASTTree::DSFIterator::get(void)
mov rbx, rax
mov rdi, r13; this
call __ZNK3AST7ASTTree11DSFIterator3getEv; AST::ASTTree::DSFIterator::get(void)
cmp rbx, rax
jz loc_14308
mov rdi, r14
call __ZN3AST7ASTTree11DSFIteratorppEv; AST::ASTTree::DSFIterator::operator++(void)
jmp short loc_14230
loc_14256:
mov rdi, r14
call __ZN3AST7ASTTree11DSFIteratorppEv; AST::ASTTree::DSFIterator::operator++(void)
mov rdi, r13
call __ZN3AST7ASTTree11DSFIteratorppEv; AST::ASTTree::DSFIterator::operator++(void)
mov rdi, r14
call __ZNK3AST7ASTTree11DSFIteratorptEv; AST::ASTTree::DSFIterator::operator->(void)
mov rdi, [rsp+0F8h+var_90]
jmp short loc_14292
loc_14275:
mov rdi, r14
call __ZN3AST7ASTTree11DSFIteratorppEv; AST::ASTTree::DSFIterator::operator++(void)
mov rdi, r13
call __ZN3AST7ASTTree11DSFIteratorppEv; AST::ASTTree::DSFIterator::operator++(void)
mov rdi, r14
call __ZNK3AST7ASTTree11DSFIteratorptEv; AST::ASTTree::DSFIterator::operator->(void)
mov rdi, [rsp+0F8h+var_98]
loc_14292:
mov rsi, rax
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_assignERKS4_; std::string::_M_assign(std::string const&)
loc_1429A:
mov rdi, rbp
mov rsi, r14
call __ZNSt5dequeIPN3AST4NodeESaIS2_EEC2ERKS4_; std::deque<AST::Node *>::deque(std::deque<AST::Node *> const&)
mov rdi, rbp
call __ZN3AST7ASTTree11DSFIteratorppEv; AST::ASTTree::DSFIterator::operator++(void)
xorps xmm0, xmm0
movaps [rsp+0F8h+var_B8], xmm0
movaps [rsp+0F8h+var_C8], xmm0
movaps xmmword ptr [rsp+0F8h+var_D8], xmm0
movaps [rsp+0F8h+var_E8], xmm0
movaps xmmword ptr [rsp+0F8h+var_F8], xmm0
mov rdi, r15
xor esi, esi
call __ZNSt11_Deque_baseIPN3AST4NodeESaIS2_EE17_M_initialize_mapEm; std::_Deque_base<AST::Node *>::_M_initialize_map(ulong)
mov rdi, rbp
mov rsi, r15
call __ZNK3AST7ASTTree11DSFIteratorneERKS1_; AST::ASTTree::DSFIterator::operator!=(AST::ASTTree::DSFIterator const&)
mov ebx, eax
mov rdi, r15
call __ZNSt11_Deque_baseIPN3AST4NodeESaIS2_EED2Ev; std::_Deque_base<AST::Node *>::~_Deque_base()
test bl, bl
jz short loc_142F3
mov rdi, r13
call __ZN3AST7ASTTree11DSFIteratorppEv; AST::ASTTree::DSFIterator::operator++(void)
loc_142F3:
mov rdi, rbp
call __ZNSt11_Deque_baseIPN3AST4NodeESaIS2_EED2Ev; std::_Deque_base<AST::Node *>::~_Deque_base()
mov rdi, r14
call __ZN3AST7ASTTree11DSFIteratorppEv; AST::ASTTree::DSFIterator::operator++(void)
jmp loc_14131
loc_14308:
mov rdi, rbp
call __ZNSt11_Deque_baseIPN3AST4NodeESaIS2_EED2Ev; std::_Deque_base<AST::Node *>::~_Deque_base()
mov rdi, [rsp+0F8h+var_D8]; void *
lea rax, [rsp+0F8h+var_C8]
cmp rdi, rax
jz short loc_1432C
mov rsi, qword ptr [rsp+0F8h+var_C8]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_1432C:
mov rdi, [rsp+0F8h+var_F8]; void *
lea rax, [rsp+0F8h+var_E8]
cmp rdi, rax
jz loc_1429A
mov rsi, qword ptr [rsp+0F8h+var_E8]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp loc_1429A
loc_14350:
add rsp, 0C8h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
jmp short $+2
loc_14364:
mov rdi, rax
call __clang_call_terminate
|
long long SEMANTICANALYZER::AstStatementParser::serializeObjectDec(
long long a1,
AST::ASTTree::DSFIterator *a2,
long long a3)
{
AST::ASTTree::DSFIterator *v3; // r13
char v4; // bl
long long result; // rax
long long v6; // rax
long long v7; // rax
long long v8; // rax
long long v9; // rax
long long v10; // rbx
long long v11; // rax
long long v12; // rdi
char v13; // bl
void *v14[2]; // [rsp+0h] [rbp-F8h] BYREF
__int128 v15; // [rsp+10h] [rbp-E8h] BYREF
void *v16[2]; // [rsp+20h] [rbp-D8h]
_OWORD v17[2]; // [rsp+30h] [rbp-C8h] BYREF
long long v18; // [rsp+50h] [rbp-A8h]
long long v19; // [rsp+58h] [rbp-A0h]
long long v20; // [rsp+60h] [rbp-98h]
long long v21; // [rsp+68h] [rbp-90h]
_OWORD v22[8]; // [rsp+70h] [rbp-88h] BYREF
v18 = a3 + 64;
v19 = a1;
v3 = (AST::ASTTree::DSFIterator *)(a1 + 8);
v21 = a3;
v20 = a3 + 32;
while ( 1 )
{
memset(v22, 0, 80);
std::_Deque_base<AST::Node *>::_M_initialize_map(v22, 0LL);
v4 = AST::ASTTree::DSFIterator::operator!=(a2, v22);
result = std::_Deque_base<AST::Node *>::~_Deque_base(v22);
if ( !v4 )
return result;
v6 = AST::ASTTree::DSFIterator::operator->(a2);
if ( !(unsigned int)std::string::compare(v6, "SHAPE") )
{
AST::ASTTree::DSFIterator::operator++(a2);
AST::ASTTree::DSFIterator::operator++(v3);
v11 = AST::ASTTree::DSFIterator::operator->(a2);
v12 = v21;
LABEL_11:
std::string::_M_assign(v12, v11);
goto LABEL_12;
}
v7 = AST::ASTTree::DSFIterator::operator->(a2);
if ( !(unsigned int)std::string::compare(v7, "ID") )
{
AST::ASTTree::DSFIterator::operator++(a2);
AST::ASTTree::DSFIterator::operator++(v3);
v11 = AST::ASTTree::DSFIterator::operator->(a2);
v12 = v20;
goto LABEL_11;
}
v8 = AST::ASTTree::DSFIterator::operator->(a2);
if ( !(unsigned int)std::string::compare(v8, "property") )
{
v14[0] = &v15;
v14[1] = 0LL;
LOBYTE(v15) = 0;
v16[0] = v17;
v16[1] = 0LL;
LOBYTE(v17[0]) = 0;
v9 = AST::ASTTree::DSFIterator::get(a2);
AST::ASTTree::DSFIterator::DSFIterator(v22, v9);
SEMANTICANALYZER::AstStatementParser::serializeProperty(v19, v22, v14);
std::vector<SEMANTICANALYZER::Property>::emplace_back<SEMANTICANALYZER::Property>(v18, v14);
while ( 1 )
{
v10 = AST::ASTTree::DSFIterator::get(a2);
if ( v10 == AST::ASTTree::DSFIterator::get(v3) )
break;
AST::ASTTree::DSFIterator::operator++(a2);
}
std::_Deque_base<AST::Node *>::~_Deque_base(v22);
if ( v16[0] != v17 )
operator delete(v16[0], *(_QWORD *)&v17[0] + 1LL);
if ( v14[0] != &v15 )
operator delete(v14[0], v15 + 1);
}
LABEL_12:
std::deque<AST::Node *>::deque(v22, a2);
AST::ASTTree::DSFIterator::operator++(v22);
memset(v17, 0, sizeof(v17));
*(_OWORD *)v16 = 0LL;
v15 = 0LL;
*(_OWORD *)v14 = 0LL;
std::_Deque_base<AST::Node *>::_M_initialize_map(v14, 0LL);
v13 = AST::ASTTree::DSFIterator::operator!=(v22, v14);
std::_Deque_base<AST::Node *>::~_Deque_base(v14);
if ( v13 )
AST::ASTTree::DSFIterator::operator++(v3);
std::_Deque_base<AST::Node *>::~_Deque_base(v22);
AST::ASTTree::DSFIterator::operator++(a2);
}
}
|
serializeObjectDec:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0xc8
MOV R14,RSI
LEA RAX,[RDX + 0x40]
MOV qword ptr [RSP + 0x50],RAX
MOV qword ptr [RSP + 0x58],RDI
LEA R13,[RDI + 0x8]
MOV qword ptr [RSP + 0x68],RDX
LEA RAX,[RDX + 0x20]
MOV qword ptr [RSP + 0x60],RAX
LEA RBP,[RSP + 0x70]
LEA R12,[0x117774]
MOV R15,RSP
LAB_00114131:
XORPS XMM0,XMM0
MOVAPS xmmword ptr [RSP + 0xb0],XMM0
MOVAPS xmmword ptr [RSP + 0xa0],XMM0
MOVAPS xmmword ptr [RSP + 0x90],XMM0
MOVAPS xmmword ptr [RSP + 0x80],XMM0
MOVAPS xmmword ptr [RSP + 0x70],XMM0
LAB_00114159:
MOV RDI,RBP
XOR ESI,ESI
CALL 0x0010b600
MOV RDI,R14
MOV RSI,RBP
CALL 0x0010b740
MOV EBX,EAX
MOV RDI,RBP
CALL 0x0010bd20
TEST BL,BL
JZ 0x00114350
MOV RDI,R14
CALL 0x0010b840
MOV RDI,RAX
MOV RSI,R12
CALL 0x0010b1f0
TEST EAX,EAX
JZ 0x00114256
MOV RDI,R14
CALL 0x0010b840
MOV RDI,RAX
LEA RSI,[0x11777a]
CALL 0x0010b1f0
TEST EAX,EAX
JZ 0x00114275
MOV RDI,R14
CALL 0x0010b840
MOV RDI,RAX
LEA RSI,[0x11777d]
CALL 0x0010b1f0
TEST EAX,EAX
JNZ 0x0011429a
LEA RAX,[RSP + 0x10]
MOV qword ptr [RSP],RAX
XOR ECX,ECX
MOV qword ptr [RSP + 0x8],RCX
MOV byte ptr [RSP + 0x10],CL
LEA RAX,[RSP + 0x30]
MOV qword ptr [RSP + 0x20],RAX
MOV qword ptr [RSP + 0x28],RCX
MOV byte ptr [RSP + 0x30],CL
MOV RDI,R14
CALL 0x0010b1a0
MOV RDI,RBP
MOV RSI,RAX
CALL 0x0010b180
MOV RDI,qword ptr [RSP + 0x58]
MOV RSI,RBP
MOV RDX,R15
CALL 0x0010b5a0
MOV RDI,qword ptr [RSP + 0x50]
MOV RSI,R15
CALL 0x0010bd30
LAB_00114230:
MOV RDI,R14
CALL 0x0010b1a0
MOV RBX,RAX
MOV RDI,R13
CALL 0x0010b1a0
CMP RBX,RAX
JZ 0x00114308
LAB_0011424c:
MOV RDI,R14
CALL 0x0010baf0
JMP 0x00114230
LAB_00114256:
MOV RDI,R14
CALL 0x0010baf0
MOV RDI,R13
CALL 0x0010baf0
MOV RDI,R14
CALL 0x0010b840
MOV RDI,qword ptr [RSP + 0x68]
JMP 0x00114292
LAB_00114275:
MOV RDI,R14
CALL 0x0010baf0
MOV RDI,R13
CALL 0x0010baf0
MOV RDI,R14
CALL 0x0010b840
MOV RDI,qword ptr [RSP + 0x60]
LAB_00114292:
MOV RSI,RAX
CALL 0x0010b390
LAB_0011429a:
MOV RDI,RBP
MOV RSI,R14
CALL 0x0010b660
MOV RDI,RBP
CALL 0x0010baf0
XORPS XMM0,XMM0
MOVAPS xmmword ptr [RSP + 0x40],XMM0
MOVAPS xmmword ptr [RSP + 0x30],XMM0
MOVAPS xmmword ptr [RSP + 0x20],XMM0
MOVAPS xmmword ptr [RSP + 0x10],XMM0
MOVAPS xmmword ptr [RSP],XMM0
MOV RDI,R15
XOR ESI,ESI
CALL 0x0010b600
MOV RDI,RBP
MOV RSI,R15
CALL 0x0010b740
MOV EBX,EAX
MOV RDI,R15
CALL 0x0010bd20
TEST BL,BL
JZ 0x001142f3
MOV RDI,R13
CALL 0x0010baf0
LAB_001142f3:
MOV RDI,RBP
CALL 0x0010bd20
MOV RDI,R14
CALL 0x0010baf0
JMP 0x00114131
LAB_00114308:
MOV RDI,RBP
CALL 0x0010bd20
MOV RDI,qword ptr [RSP + 0x20]
LEA RAX,[RSP + 0x30]
CMP RDI,RAX
JZ 0x0011432c
MOV RSI,qword ptr [RSP + 0x30]
INC RSI
CALL 0x0010b6a0
LAB_0011432c:
MOV RDI,qword ptr [RSP]
LEA RAX,[RSP + 0x10]
CMP RDI,RAX
JZ 0x0011429a
MOV RSI,qword ptr [RSP + 0x10]
INC RSI
CALL 0x0010b6a0
JMP 0x0011429a
LAB_00114350:
ADD RSP,0xc8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
/* SEMANTICANALYZER::AstStatementParser::serializeObjectDec(AST::ASTTree::DSFIterator&,
SEMANTICANALYZER::ObjectDecl&) */
void __thiscall
SEMANTICANALYZER::AstStatementParser::serializeObjectDec
(AstStatementParser *this,DSFIterator *param_1,ObjectDecl *param_2)
{
DSFIterator *this_00;
char cVar1;
int iVar2;
char *pcVar3;
Node *pNVar4;
long lVar5;
long lVar6;
ObjectDecl *pOVar7;
ulong *local_f8;
int8 uStack_f0;
ulong local_e8 [2];
ulong *local_d8;
int8 uStack_d0;
ulong local_c8 [4];
ObjectDecl *local_a8;
AstStatementParser *local_a0;
ObjectDecl *local_98;
ObjectDecl *local_90;
int8 local_88;
int8 uStack_80;
int8 local_78;
int8 uStack_70;
int8 local_68;
int8 uStack_60;
int8 local_58;
int8 uStack_50;
int8 local_48;
int8 uStack_40;
local_a8 = param_2 + 0x40;
this_00 = (DSFIterator *)(this + 8);
local_98 = param_2 + 0x20;
local_a0 = this;
local_90 = param_2;
do {
local_48 = 0;
uStack_40 = 0;
local_58 = 0;
uStack_50 = 0;
local_68 = 0;
uStack_60 = 0;
local_78 = 0;
uStack_70 = 0;
local_88 = 0;
uStack_80 = 0;
/* try { // try from 00114159 to 0011422f has its CatchHandler @ 00114364 */
std::_Deque_base<AST::Node*,std::allocator<AST::Node*>>::_M_initialize_map
((_Deque_base<AST::Node*,std::allocator<AST::Node*>> *)&local_88,0);
cVar1 = AST::ASTTree::DSFIterator::operator!=(param_1,(DSFIterator *)&local_88);
std::_Deque_base<AST::Node*,std::allocator<AST::Node*>>::~_Deque_base
((_Deque_base<AST::Node*,std::allocator<AST::Node*>> *)&local_88);
if (cVar1 == '\0') {
return;
}
pcVar3 = (char *)AST::ASTTree::DSFIterator::operator->(param_1);
iVar2 = std::__cxx11::string::compare(pcVar3);
if (iVar2 == 0) {
/* try { // try from 00114256 to 00114302 has its CatchHandler @ 00114364 */
AST::ASTTree::DSFIterator::operator++(param_1);
AST::ASTTree::DSFIterator::operator++(this_00);
AST::ASTTree::DSFIterator::operator->(param_1);
pOVar7 = local_90;
LAB_00114292:
std::__cxx11::string::_M_assign((string *)pOVar7);
}
else {
pcVar3 = (char *)AST::ASTTree::DSFIterator::operator->(param_1);
iVar2 = std::__cxx11::string::compare(pcVar3);
if (iVar2 == 0) {
AST::ASTTree::DSFIterator::operator++(param_1);
AST::ASTTree::DSFIterator::operator++(this_00);
AST::ASTTree::DSFIterator::operator->(param_1);
pOVar7 = local_98;
goto LAB_00114292;
}
pcVar3 = (char *)AST::ASTTree::DSFIterator::operator->(param_1);
iVar2 = std::__cxx11::string::compare(pcVar3);
if (iVar2 == 0) {
local_f8 = local_e8;
uStack_f0 = 0;
local_e8[0] = local_e8[0] & 0xffffffffffffff00;
local_d8 = local_c8;
uStack_d0 = 0;
local_c8[0] = local_c8[0] & 0xffffffffffffff00;
pNVar4 = (Node *)AST::ASTTree::DSFIterator::get();
AST::ASTTree::DSFIterator::DSFIterator((DSFIterator *)&local_88,pNVar4);
serializeProperty(local_a0,(DSFIterator *)&local_88,(Property *)&local_f8);
std::vector<SEMANTICANALYZER::Property,std::allocator<SEMANTICANALYZER::Property>>::
emplace_back<SEMANTICANALYZER::Property>
((vector<SEMANTICANALYZER::Property,std::allocator<SEMANTICANALYZER::Property>> *)
local_a8,(Property *)&local_f8);
while( true ) {
lVar5 = AST::ASTTree::DSFIterator::get();
lVar6 = AST::ASTTree::DSFIterator::get();
if (lVar5 == lVar6) break;
/* try { // try from 0011424c to 00114253 has its CatchHandler @ 00114362 */
AST::ASTTree::DSFIterator::operator++(param_1);
}
std::_Deque_base<AST::Node*,std::allocator<AST::Node*>>::~_Deque_base
((_Deque_base<AST::Node*,std::allocator<AST::Node*>> *)&local_88);
if (local_d8 != local_c8) {
operator_delete(local_d8,local_c8[0] + 1);
}
if (local_f8 != local_e8) {
operator_delete(local_f8,local_e8[0] + 1);
}
}
}
std::deque<AST::Node*,std::allocator<AST::Node*>>::deque
((deque<AST::Node*,std::allocator<AST::Node*>> *)&local_88,(deque *)param_1);
AST::ASTTree::DSFIterator::operator++((DSFIterator *)&local_88);
local_c8[2] = 0;
local_c8[3] = 0;
local_c8[0] = 0;
local_c8[1] = 0;
local_d8 = (ulong *)0x0;
uStack_d0 = 0;
local_e8[0] = 0;
local_e8[1] = 0;
local_f8 = (ulong *)0x0;
uStack_f0 = 0;
std::_Deque_base<AST::Node*,std::allocator<AST::Node*>>::_M_initialize_map
((_Deque_base<AST::Node*,std::allocator<AST::Node*>> *)&local_f8,0);
cVar1 = AST::ASTTree::DSFIterator::operator!=((DSFIterator *)&local_88,(DSFIterator *)&local_f8)
;
std::_Deque_base<AST::Node*,std::allocator<AST::Node*>>::~_Deque_base
((_Deque_base<AST::Node*,std::allocator<AST::Node*>> *)&local_f8);
if (cVar1 != '\0') {
AST::ASTTree::DSFIterator::operator++(this_00);
}
std::_Deque_base<AST::Node*,std::allocator<AST::Node*>>::~_Deque_base
((_Deque_base<AST::Node*,std::allocator<AST::Node*>> *)&local_88);
AST::ASTTree::DSFIterator::operator++(param_1);
} while( true );
}
|
|
64,325 |
SEMANTICANALYZER::AstStatementParser::serializeObjectDec(AST::ASTTree::DSFIterator&, SEMANTICANALYZER::ObjectDecl&)
|
11AgReS1SoR11[P]Graph/Common/SemanticAnalyzer/src/AstStatementParser.cpp
|
void SEMANTICANALYZER::AstStatementParser::serializeObjectDec(AST::ASTTree::DSFIterator& objectDecIter, ObjectDecl& objectDecl) noexcept
{
for(auto& it = objectDecIter; it != AST::ASTTree::DSFIterator(); ++it)
{
if(it->value == GRAMMERCONSTANTS::SHAPE)
{
++it;
++astIter;
objectDecl.shape = it->value;
}
else if(it->value == GRAMMERCONSTANTS::ID)
{
++it;
++astIter;
objectDecl.id = it->value;
}
else if(it->value == GRAMMERCONSTANTS::PROPERTY)
{
Property property;
AST::ASTTree::DSFIterator propertyIter(it.get());
serializeProperty(propertyIter, property);
objectDecl.properties.push_back(std::move(property));
while(it.get() != astIter.get()) {
++it;
}
}
auto nextIt = it;
++nextIt;
if(nextIt != AST::ASTTree::DSFIterator())
{
++astIter;
}
}
}
|
O2
|
cpp
|
SEMANTICANALYZER::AstStatementParser::serializeObjectDec(AST::ASTTree::DSFIterator&, SEMANTICANALYZER::ObjectDecl&):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xc8, %rsp
movq %rdx, %rbx
movq %rsi, %r14
leaq 0x40(%rdx), %rax
movq %rax, 0x8(%rsp)
movq %rdi, 0x10(%rsp)
leaq 0x8(%rdi), %r13
leaq 0x20(%rdx), %rax
movq %rax, 0x18(%rsp)
leaq 0x70(%rsp), %rbp
leaq 0x20(%rsp), %r15
xorps %xmm0, %xmm0
movaps %xmm0, 0xb0(%rsp)
movaps %xmm0, 0xa0(%rsp)
movaps %xmm0, 0x90(%rsp)
movaps %xmm0, 0x80(%rsp)
movaps %xmm0, 0x70(%rsp)
movq %rbp, %rdi
callq 0x107f0
movq %r14, %rdi
movq %rbp, %rsi
callq 0x10b40
movl %eax, %r12d
movq %rbp, %rdi
callq 0x115a0
testb %r12b, %r12b
je 0x1818e
movq %r14, %rdi
callq 0x10ca0
movq %rax, %rdi
leaq 0x377b(%rip), %rsi # 0x1b780
callq 0x116e0
testb %al, %al
je 0x1802b
movq %r14, %rdi
callq 0x11200
movq %r13, %rdi
callq 0x11200
movq %r14, %rdi
callq 0x10ca0
movq %rbx, %rdi
jmp 0x18067
movq %r14, %rdi
callq 0x10ca0
movq %rax, %rdi
leaq 0x3749(%rip), %rsi # 0x1b786
callq 0x116e0
testb %al, %al
je 0x180de
movq %r14, %rdi
callq 0x11200
movq %r13, %rdi
callq 0x11200
movq %r14, %rdi
callq 0x10ca0
movq 0x18(%rsp), %rdi
movq %rax, %rsi
callq 0x105f0
movq %rbp, %rdi
movq %r14, %rsi
callq 0x10a40
movq %rbp, %rdi
callq 0x11200
xorps %xmm0, %xmm0
movaps %xmm0, 0x60(%rsp)
movaps %xmm0, 0x50(%rsp)
movaps %xmm0, 0x40(%rsp)
movaps %xmm0, 0x30(%rsp)
movaps %xmm0, 0x20(%rsp)
movq %r15, %rdi
callq 0x107f0
movq %rbp, %rdi
movq %r15, %rsi
callq 0x10b40
movl %eax, %r12d
movq %r15, %rdi
callq 0x115a0
testb %r12b, %r12b
je 0x180c9
movq %r13, %rdi
callq 0x11200
movq %rbp, %rdi
callq 0x115a0
movq %r14, %rdi
callq 0x11200
jmp 0x17fa4
movq %r14, %rdi
callq 0x10ca0
movq %rax, %rdi
leaq 0x3699(%rip), %rsi # 0x1b789
callq 0x116e0
testb %al, %al
je 0x1806f
leaq 0x30(%rsp), %rax
movq %rax, 0x20(%rsp)
andq $0x0, 0x28(%rsp)
xorl %ecx, %ecx
movb %cl, 0x30(%rsp)
leaq 0x50(%rsp), %rax
movq %rax, 0x40(%rsp)
andq $0x0, 0x48(%rsp)
movb %cl, 0x50(%rsp)
movq %r14, %rdi
callq 0x102b0
movq %rbp, %rdi
movq %rax, %rsi
callq 0x10260
movq 0x10(%rsp), %rdi
movq %rbp, %rsi
movq %r15, %rdx
callq 0x10930
movq 0x8(%rsp), %rdi
movq %r15, %rsi
callq 0x115d0
movq %r14, %rdi
callq 0x102b0
movq %rax, %r12
movq %r13, %rdi
callq 0x102b0
cmpq %rax, %r12
je 0x18179
movq %r14, %rdi
callq 0x11200
jmp 0x18157
movq %rbp, %rdi
callq 0x115a0
movq %r15, %rdi
callq 0x10520
jmp 0x1806f
addq $0xc8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x181a2
movq %rax, %rdi
callq 0x14ce1
|
_ZN16SEMANTICANALYZER18AstStatementParser18serializeObjectDecERN3AST7ASTTree11DSFIteratorERNS_10ObjectDeclE:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 0C8h
mov rbx, rdx
mov r14, rsi
lea rax, [rdx+40h]
mov [rsp+0F8h+var_F0], rax
mov [rsp+0F8h+var_E8], rdi
lea r13, [rdi+8]
lea rax, [rdx+20h]
mov [rsp+0F8h+var_E0], rax
lea rbp, [rsp+0F8h+var_88]
lea r15, [rsp+0F8h+var_D8]
loc_17FA4:
xorps xmm0, xmm0
movaps [rsp+0F8h+var_48], xmm0
movaps [rsp+0F8h+var_58], xmm0
movaps [rsp+0F8h+var_68], xmm0
movaps [rsp+0F8h+var_78], xmm0
movaps [rsp+0F8h+var_88], xmm0
mov rdi, rbp
call __ZNSt5stackIPN3AST4NodeESt5dequeIS2_SaIS2_EEEC2IS5_vEEv; std::stack<AST::Node *>::stack<std::deque<AST::Node *>,void>(void)
mov rdi, r14
mov rsi, rbp
call __ZNK3AST7ASTTree11DSFIteratorneERKS1_; AST::ASTTree::DSFIterator::operator!=(AST::ASTTree::DSFIterator const&)
mov r12d, eax
mov rdi, rbp
call __ZNSt11_Deque_baseIPN3AST4NodeESaIS2_EED2Ev; std::_Deque_base<AST::Node *>::~_Deque_base()
test r12b, r12b
jz loc_1818E
mov rdi, r14
call __ZNK3AST7ASTTree11DSFIteratorptEv; AST::ASTTree::DSFIterator::operator->(void)
mov rdi, rax
lea rsi, aShape; "SHAPE"
call __ZSteqIcSt11char_traitsIcESaIcEEbRKNSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_; std::operator==<char>(std::string const&,char const*)
test al, al
jz short loc_1802B
mov rdi, r14
call __ZN3AST7ASTTree11DSFIteratorppEv; AST::ASTTree::DSFIterator::operator++(void)
mov rdi, r13
call __ZN3AST7ASTTree11DSFIteratorppEv; AST::ASTTree::DSFIterator::operator++(void)
mov rdi, r14
call __ZNK3AST7ASTTree11DSFIteratorptEv; AST::ASTTree::DSFIterator::operator->(void)
mov rdi, rbx
jmp short loc_18067
loc_1802B:
mov rdi, r14
call __ZNK3AST7ASTTree11DSFIteratorptEv; AST::ASTTree::DSFIterator::operator->(void)
mov rdi, rax
lea rsi, aId; "ID"
call __ZSteqIcSt11char_traitsIcESaIcEEbRKNSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_; std::operator==<char>(std::string const&,char const*)
test al, al
jz loc_180DE
mov rdi, r14
call __ZN3AST7ASTTree11DSFIteratorppEv; AST::ASTTree::DSFIterator::operator++(void)
mov rdi, r13
call __ZN3AST7ASTTree11DSFIteratorppEv; AST::ASTTree::DSFIterator::operator++(void)
mov rdi, r14
call __ZNK3AST7ASTTree11DSFIteratorptEv; AST::ASTTree::DSFIterator::operator->(void)
mov rdi, [rsp+0F8h+var_E0]
loc_18067:
mov rsi, rax
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_assignERKS4_; std::string::_M_assign(std::string const&)
loc_1806F:
mov rdi, rbp
mov rsi, r14
call __ZNSt5dequeIPN3AST4NodeESaIS2_EEC2ERKS4_; std::deque<AST::Node *>::deque(std::deque<AST::Node *> const&)
mov rdi, rbp
call __ZN3AST7ASTTree11DSFIteratorppEv; AST::ASTTree::DSFIterator::operator++(void)
xorps xmm0, xmm0
movaps [rsp+0F8h+var_98], xmm0
movaps [rsp+0F8h+var_A8], xmm0
movaps [rsp+0F8h+var_B8], xmm0
movaps [rsp+0F8h+var_C8], xmm0
movaps [rsp+0F8h+var_D8], xmm0
mov rdi, r15
call __ZNSt5stackIPN3AST4NodeESt5dequeIS2_SaIS2_EEEC2IS5_vEEv; std::stack<AST::Node *>::stack<std::deque<AST::Node *>,void>(void)
mov rdi, rbp
mov rsi, r15
call __ZNK3AST7ASTTree11DSFIteratorneERKS1_; AST::ASTTree::DSFIterator::operator!=(AST::ASTTree::DSFIterator const&)
mov r12d, eax
mov rdi, r15
call __ZNSt11_Deque_baseIPN3AST4NodeESaIS2_EED2Ev; std::_Deque_base<AST::Node *>::~_Deque_base()
test r12b, r12b
jz short loc_180C9
mov rdi, r13
call __ZN3AST7ASTTree11DSFIteratorppEv; AST::ASTTree::DSFIterator::operator++(void)
loc_180C9:
mov rdi, rbp
call __ZNSt11_Deque_baseIPN3AST4NodeESaIS2_EED2Ev; std::_Deque_base<AST::Node *>::~_Deque_base()
mov rdi, r14
call __ZN3AST7ASTTree11DSFIteratorppEv; AST::ASTTree::DSFIterator::operator++(void)
jmp loc_17FA4
loc_180DE:
mov rdi, r14
call __ZNK3AST7ASTTree11DSFIteratorptEv; AST::ASTTree::DSFIterator::operator->(void)
mov rdi, rax
lea rsi, aProperty; "property"
call __ZSteqIcSt11char_traitsIcESaIcEEbRKNSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_; std::operator==<char>(std::string const&,char const*)
test al, al
jz loc_1806F
lea rax, [rsp+0F8h+var_C8]
mov qword ptr [rsp+0F8h+var_D8], rax
and qword ptr [rsp+0F8h+var_D8+8], 0
xor ecx, ecx
mov byte ptr [rsp+0F8h+var_C8], cl
lea rax, [rsp+0F8h+var_A8]
mov qword ptr [rsp+0F8h+var_B8], rax
and qword ptr [rsp+0F8h+var_B8+8], 0
mov byte ptr [rsp+0F8h+var_A8], cl
mov rdi, r14; this
call __ZNK3AST7ASTTree11DSFIterator3getEv; AST::ASTTree::DSFIterator::get(void)
mov rdi, rbp
mov rsi, rax
call __ZN3AST7ASTTree11DSFIteratorC1EPNS_4NodeE; AST::ASTTree::DSFIterator::DSFIterator(AST::Node *)
mov rdi, [rsp+0F8h+var_E8]; this
mov rsi, rbp; AST::ASTTree::DSFIterator *
mov rdx, r15; SEMANTICANALYZER::Property *
call __ZN16SEMANTICANALYZER18AstStatementParser17serializePropertyERN3AST7ASTTree11DSFIteratorERNS_8PropertyE; SEMANTICANALYZER::AstStatementParser::serializeProperty(AST::ASTTree::DSFIterator &,SEMANTICANALYZER::Property &)
mov rdi, [rsp+0F8h+var_F0]
mov rsi, r15
call __ZNSt6vectorIN16SEMANTICANALYZER8PropertyESaIS1_EE12emplace_backIJS1_EEERS1_DpOT_; std::vector<SEMANTICANALYZER::Property>::emplace_back<SEMANTICANALYZER::Property>(SEMANTICANALYZER::Property &&)
loc_18157:
mov rdi, r14; this
call __ZNK3AST7ASTTree11DSFIterator3getEv; AST::ASTTree::DSFIterator::get(void)
mov r12, rax
mov rdi, r13; this
call __ZNK3AST7ASTTree11DSFIterator3getEv; AST::ASTTree::DSFIterator::get(void)
cmp r12, rax
jz short loc_18179
mov rdi, r14
call __ZN3AST7ASTTree11DSFIteratorppEv; AST::ASTTree::DSFIterator::operator++(void)
jmp short loc_18157
loc_18179:
mov rdi, rbp
call __ZNSt11_Deque_baseIPN3AST4NodeESaIS2_EED2Ev; std::_Deque_base<AST::Node *>::~_Deque_base()
mov rdi, r15; this
call __ZN16SEMANTICANALYZER8PropertyD2Ev; SEMANTICANALYZER::Property::~Property()
jmp loc_1806F
loc_1818E:
add rsp, 0C8h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
jmp short $+2
loc_181A2:
mov rdi, rax
call __clang_call_terminate
|
long long SEMANTICANALYZER::AstStatementParser::serializeObjectDec(
SEMANTICANALYZER::AstStatementParser *this,
AST::ASTTree::DSFIterator *a2,
SEMANTICANALYZER::ObjectDecl *a3)
{
AST::ASTTree::DSFIterator *v4; // r13
char v5; // r12
long long result; // rax
long long v7; // rax
long long v8; // rax
SEMANTICANALYZER::ObjectDecl *v9; // rdi
long long v10; // rax
char v11; // r12
long long v12; // rax
long long v13; // rax
long long v14; // r12
char *v15; // [rsp+8h] [rbp-F0h]
SEMANTICANALYZER::ObjectDecl *v17; // [rsp+18h] [rbp-E0h]
__int128 v18; // [rsp+20h] [rbp-D8h] BYREF
__int128 v19; // [rsp+30h] [rbp-C8h] BYREF
__int128 v20; // [rsp+40h] [rbp-B8h]
_OWORD v21[2]; // [rsp+50h] [rbp-A8h] BYREF
_OWORD v22[8]; // [rsp+70h] [rbp-88h] BYREF
v15 = (char *)a3 + 64;
v4 = (SEMANTICANALYZER::AstStatementParser *)((char *)this + 8);
v17 = (SEMANTICANALYZER::ObjectDecl *)((char *)a3 + 32);
while ( 1 )
{
memset(v22, 0, 80);
std::stack<AST::Node *>::stack<std::deque<AST::Node *>,void>(v22);
v5 = AST::ASTTree::DSFIterator::operator!=(a2, v22);
result = std::_Deque_base<AST::Node *>::~_Deque_base(v22);
if ( !v5 )
return result;
v7 = AST::ASTTree::DSFIterator::operator->(a2);
if ( (unsigned __int8)std::operator==<char>(v7, "SHAPE") )
{
AST::ASTTree::DSFIterator::operator++(a2);
AST::ASTTree::DSFIterator::operator++(v4);
v8 = AST::ASTTree::DSFIterator::operator->(a2);
v9 = a3;
LABEL_7:
std::string::_M_assign(v9, v8);
goto LABEL_8;
}
v10 = AST::ASTTree::DSFIterator::operator->(a2);
if ( (unsigned __int8)std::operator==<char>(v10, "ID") )
{
AST::ASTTree::DSFIterator::operator++(a2);
AST::ASTTree::DSFIterator::operator++(v4);
v8 = AST::ASTTree::DSFIterator::operator->(a2);
v9 = v17;
goto LABEL_7;
}
v12 = AST::ASTTree::DSFIterator::operator->(a2);
if ( (unsigned __int8)std::operator==<char>(v12, "property") )
{
v18 = (unsigned long long)&v19;
LOBYTE(v19) = 0;
v20 = (unsigned long long)v21;
LOBYTE(v21[0]) = 0;
v13 = AST::ASTTree::DSFIterator::get(a2);
AST::ASTTree::DSFIterator::DSFIterator(v22, v13);
SEMANTICANALYZER::AstStatementParser::serializeProperty(
this,
(AST::ASTTree::DSFIterator *)v22,
(SEMANTICANALYZER::Property *)&v18);
std::vector<SEMANTICANALYZER::Property>::emplace_back<SEMANTICANALYZER::Property>(v15, &v18);
while ( 1 )
{
v14 = AST::ASTTree::DSFIterator::get(a2);
if ( v14 == AST::ASTTree::DSFIterator::get(v4) )
break;
AST::ASTTree::DSFIterator::operator++(a2);
}
std::_Deque_base<AST::Node *>::~_Deque_base(v22);
SEMANTICANALYZER::Property::~Property((SEMANTICANALYZER::Property *)&v18);
}
LABEL_8:
std::deque<AST::Node *>::deque(v22, a2);
AST::ASTTree::DSFIterator::operator++(v22);
memset(v21, 0, sizeof(v21));
v20 = 0LL;
v19 = 0LL;
v18 = 0LL;
std::stack<AST::Node *>::stack<std::deque<AST::Node *>,void>(&v18);
v11 = AST::ASTTree::DSFIterator::operator!=(v22, &v18);
std::_Deque_base<AST::Node *>::~_Deque_base(&v18);
if ( v11 )
AST::ASTTree::DSFIterator::operator++(v4);
std::_Deque_base<AST::Node *>::~_Deque_base(v22);
AST::ASTTree::DSFIterator::operator++(a2);
}
}
|
serializeObjectDec:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0xc8
MOV RBX,RDX
MOV R14,RSI
LEA RAX,[RDX + 0x40]
MOV qword ptr [RSP + 0x8],RAX
MOV qword ptr [RSP + 0x10],RDI
LEA R13,[RDI + 0x8]
LEA RAX,[RDX + 0x20]
MOV qword ptr [RSP + 0x18],RAX
LEA RBP,[RSP + 0x70]
LEA R15,[RSP + 0x20]
LAB_00117fa4:
XORPS XMM0,XMM0
MOVAPS xmmword ptr [RSP + 0xb0],XMM0
MOVAPS xmmword ptr [RSP + 0xa0],XMM0
MOVAPS xmmword ptr [RSP + 0x90],XMM0
MOVAPS xmmword ptr [RSP + 0x80],XMM0
MOVAPS xmmword ptr [RSP + 0x70],XMM0
LAB_00117fcc:
MOV RDI,RBP
CALL 0x001107f0
MOV RDI,R14
MOV RSI,RBP
CALL 0x00110b40
MOV R12D,EAX
MOV RDI,RBP
CALL 0x001115a0
TEST R12B,R12B
JZ 0x0011818e
MOV RDI,R14
CALL 0x00110ca0
MOV RDI,RAX
LEA RSI,[0x11b780]
CALL 0x001116e0
TEST AL,AL
JZ 0x0011802b
MOV RDI,R14
CALL 0x00111200
MOV RDI,R13
CALL 0x00111200
MOV RDI,R14
CALL 0x00110ca0
MOV RDI,RBX
JMP 0x00118067
LAB_0011802b:
MOV RDI,R14
CALL 0x00110ca0
MOV RDI,RAX
LEA RSI,[0x11b786]
CALL 0x001116e0
TEST AL,AL
JZ 0x001180de
MOV RDI,R14
CALL 0x00111200
MOV RDI,R13
CALL 0x00111200
MOV RDI,R14
CALL 0x00110ca0
MOV RDI,qword ptr [RSP + 0x18]
LAB_00118067:
MOV RSI,RAX
CALL 0x001105f0
LAB_0011806f:
MOV RDI,RBP
MOV RSI,R14
CALL 0x00110a40
MOV RDI,RBP
CALL 0x00111200
XORPS XMM0,XMM0
MOVAPS xmmword ptr [RSP + 0x60],XMM0
MOVAPS xmmword ptr [RSP + 0x50],XMM0
MOVAPS xmmword ptr [RSP + 0x40],XMM0
MOVAPS xmmword ptr [RSP + 0x30],XMM0
MOVAPS xmmword ptr [RSP + 0x20],XMM0
MOV RDI,R15
CALL 0x001107f0
MOV RDI,RBP
MOV RSI,R15
CALL 0x00110b40
MOV R12D,EAX
MOV RDI,R15
CALL 0x001115a0
TEST R12B,R12B
JZ 0x001180c9
MOV RDI,R13
CALL 0x00111200
LAB_001180c9:
MOV RDI,RBP
CALL 0x001115a0
MOV RDI,R14
CALL 0x00111200
JMP 0x00117fa4
LAB_001180de:
MOV RDI,R14
CALL 0x00110ca0
MOV RDI,RAX
LEA RSI,[0x11b789]
CALL 0x001116e0
TEST AL,AL
JZ 0x0011806f
LEA RAX,[RSP + 0x30]
MOV qword ptr [RSP + 0x20],RAX
AND qword ptr [RSP + 0x28],0x0
XOR ECX,ECX
MOV byte ptr [RSP + 0x30],CL
LEA RAX,[RSP + 0x50]
MOV qword ptr [RSP + 0x40],RAX
AND qword ptr [RSP + 0x48],0x0
MOV byte ptr [RSP + 0x50],CL
MOV RDI,R14
CALL 0x001102b0
MOV RDI,RBP
MOV RSI,RAX
CALL 0x00110260
MOV RDI,qword ptr [RSP + 0x10]
MOV RSI,RBP
MOV RDX,R15
CALL 0x00110930
MOV RDI,qword ptr [RSP + 0x8]
MOV RSI,R15
CALL 0x001115d0
LAB_00118157:
MOV RDI,R14
CALL 0x001102b0
MOV R12,RAX
MOV RDI,R13
CALL 0x001102b0
CMP R12,RAX
JZ 0x00118179
LAB_0011816f:
MOV RDI,R14
CALL 0x00111200
JMP 0x00118157
LAB_00118179:
MOV RDI,RBP
CALL 0x001115a0
MOV RDI,R15
CALL 0x00110520
JMP 0x0011806f
LAB_0011818e:
ADD RSP,0xc8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
/* SEMANTICANALYZER::AstStatementParser::serializeObjectDec(AST::ASTTree::DSFIterator&,
SEMANTICANALYZER::ObjectDecl&) */
void __thiscall
SEMANTICANALYZER::AstStatementParser::serializeObjectDec
(AstStatementParser *this,DSFIterator *param_1,ObjectDecl *param_2)
{
DSFIterator *this_00;
char cVar1;
bool bVar2;
string *psVar3;
Node *pNVar4;
long lVar5;
long lVar6;
ObjectDecl *pOVar7;
ulong *local_d8;
int8 uStack_d0;
ulong local_c8 [2];
ulong *local_b8;
int8 uStack_b0;
ulong local_a8 [4];
int8 local_88;
int8 uStack_80;
int8 local_78;
int8 uStack_70;
int8 local_68;
int8 uStack_60;
int8 local_58;
int8 uStack_50;
int8 local_48;
int8 uStack_40;
this_00 = (DSFIterator *)(this + 8);
do {
local_48 = 0;
uStack_40 = 0;
local_58 = 0;
uStack_50 = 0;
local_68 = 0;
uStack_60 = 0;
local_78 = 0;
uStack_70 = 0;
local_88 = 0;
uStack_80 = 0;
/* try { // try from 00117fcc to 00118156 has its CatchHandler @ 001181a2 */
std::stack<AST::Node*,std::deque<AST::Node*,std::allocator<AST::Node*>>>::
stack<std::deque<AST::Node*,std::allocator<AST::Node*>>,void>
((stack<AST::Node*,std::deque<AST::Node*,std::allocator<AST::Node*>>> *)&local_88);
cVar1 = AST::ASTTree::DSFIterator::operator!=(param_1,(DSFIterator *)&local_88);
std::_Deque_base<AST::Node*,std::allocator<AST::Node*>>::~_Deque_base
((_Deque_base<AST::Node*,std::allocator<AST::Node*>> *)&local_88);
if (cVar1 == '\0') {
return;
}
psVar3 = (string *)AST::ASTTree::DSFIterator::operator->(param_1);
bVar2 = std::operator==(psVar3,"SHAPE");
if (bVar2) {
AST::ASTTree::DSFIterator::operator++(param_1);
AST::ASTTree::DSFIterator::operator++(this_00);
AST::ASTTree::DSFIterator::operator->(param_1);
pOVar7 = param_2;
LAB_00118067:
std::__cxx11::string::_M_assign((string *)pOVar7);
}
else {
psVar3 = (string *)AST::ASTTree::DSFIterator::operator->(param_1);
bVar2 = std::operator==(psVar3,"ID");
if (bVar2) {
AST::ASTTree::DSFIterator::operator++(param_1);
AST::ASTTree::DSFIterator::operator++(this_00);
AST::ASTTree::DSFIterator::operator->(param_1);
pOVar7 = param_2 + 0x20;
goto LAB_00118067;
}
psVar3 = (string *)AST::ASTTree::DSFIterator::operator->(param_1);
bVar2 = std::operator==(psVar3,"property");
if (bVar2) {
local_d8 = local_c8;
uStack_d0 = 0;
local_c8[0] = local_c8[0] & 0xffffffffffffff00;
local_b8 = local_a8;
uStack_b0 = 0;
local_a8[0] = local_a8[0] & 0xffffffffffffff00;
pNVar4 = (Node *)AST::ASTTree::DSFIterator::get();
AST::ASTTree::DSFIterator::DSFIterator((DSFIterator *)&local_88,pNVar4);
serializeProperty(this,(DSFIterator *)&local_88,(Property *)&local_d8);
std::vector<SEMANTICANALYZER::Property,std::allocator<SEMANTICANALYZER::Property>>::
emplace_back<SEMANTICANALYZER::Property>
((vector<SEMANTICANALYZER::Property,std::allocator<SEMANTICANALYZER::Property>> *)
(param_2 + 0x40),(Property *)&local_d8);
while( true ) {
lVar5 = AST::ASTTree::DSFIterator::get();
lVar6 = AST::ASTTree::DSFIterator::get();
if (lVar5 == lVar6) break;
/* try { // try from 0011816f to 00118176 has its CatchHandler @ 001181a0 */
AST::ASTTree::DSFIterator::operator++(param_1);
}
std::_Deque_base<AST::Node*,std::allocator<AST::Node*>>::~_Deque_base
((_Deque_base<AST::Node*,std::allocator<AST::Node*>> *)&local_88);
Property::~Property((Property *)&local_d8);
}
}
std::deque<AST::Node*,std::allocator<AST::Node*>>::deque
((deque<AST::Node*,std::allocator<AST::Node*>> *)&local_88,(deque *)param_1);
AST::ASTTree::DSFIterator::operator++((DSFIterator *)&local_88);
local_a8[2] = 0;
local_a8[3] = 0;
local_a8[0] = 0;
local_a8[1] = 0;
local_b8 = (ulong *)0x0;
uStack_b0 = 0;
local_c8[0] = 0;
local_c8[1] = 0;
local_d8 = (ulong *)0x0;
uStack_d0 = 0;
std::stack<AST::Node*,std::deque<AST::Node*,std::allocator<AST::Node*>>>::
stack<std::deque<AST::Node*,std::allocator<AST::Node*>>,void>
((stack<AST::Node*,std::deque<AST::Node*,std::allocator<AST::Node*>>> *)&local_d8);
cVar1 = AST::ASTTree::DSFIterator::operator!=((DSFIterator *)&local_88,(DSFIterator *)&local_d8)
;
std::_Deque_base<AST::Node*,std::allocator<AST::Node*>>::~_Deque_base
((_Deque_base<AST::Node*,std::allocator<AST::Node*>> *)&local_d8);
if (cVar1 != '\0') {
AST::ASTTree::DSFIterator::operator++(this_00);
}
std::_Deque_base<AST::Node*,std::allocator<AST::Node*>>::~_Deque_base
((_Deque_base<AST::Node*,std::allocator<AST::Node*>> *)&local_88);
AST::ASTTree::DSFIterator::operator++(param_1);
} while( true );
}
|
|
64,326 |
SEMANTICANALYZER::AstStatementParser::serializeObjectDec(AST::ASTTree::DSFIterator&, SEMANTICANALYZER::ObjectDecl&)
|
11AgReS1SoR11[P]Graph/Common/SemanticAnalyzer/src/AstStatementParser.cpp
|
void SEMANTICANALYZER::AstStatementParser::serializeObjectDec(AST::ASTTree::DSFIterator& objectDecIter, ObjectDecl& objectDecl) noexcept
{
for(auto& it = objectDecIter; it != AST::ASTTree::DSFIterator(); ++it)
{
if(it->value == GRAMMERCONSTANTS::SHAPE)
{
++it;
++astIter;
objectDecl.shape = it->value;
}
else if(it->value == GRAMMERCONSTANTS::ID)
{
++it;
++astIter;
objectDecl.id = it->value;
}
else if(it->value == GRAMMERCONSTANTS::PROPERTY)
{
Property property;
AST::ASTTree::DSFIterator propertyIter(it.get());
serializeProperty(propertyIter, property);
objectDecl.properties.push_back(std::move(property));
while(it.get() != astIter.get()) {
++it;
}
}
auto nextIt = it;
++nextIt;
if(nextIt != AST::ASTTree::DSFIterator())
{
++astIter;
}
}
}
|
O3
|
cpp
|
SEMANTICANALYZER::AstStatementParser::serializeObjectDec(AST::ASTTree::DSFIterator&, SEMANTICANALYZER::ObjectDecl&):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xc8, %rsp
movq %rsi, %r14
leaq 0x40(%rdx), %rax
movq %rax, 0x50(%rsp)
movq %rdi, 0x58(%rsp)
leaq 0x8(%rdi), %r13
movq %rdx, 0x68(%rsp)
leaq 0x20(%rdx), %rax
movq %rax, 0x60(%rsp)
leaq 0x70(%rsp), %rbp
leaq 0x35ca(%rip), %r12 # 0x17774
movq %rsp, %r15
xorps %xmm0, %xmm0
movaps %xmm0, 0xb0(%rsp)
movaps %xmm0, 0xa0(%rsp)
movaps %xmm0, 0x90(%rsp)
movaps %xmm0, 0x80(%rsp)
movaps %xmm0, 0x70(%rsp)
movq %rbp, %rdi
xorl %esi, %esi
callq 0xb600
movq %r14, %rdi
movq %rbp, %rsi
callq 0xb740
movl %eax, %ebx
movq %rbp, %rdi
callq 0xbd20
testb %bl, %bl
je 0x143cc
movq %r14, %rdi
callq 0xb840
movq %rax, %rdi
movq %r12, %rsi
callq 0xb1f0
testl %eax, %eax
je 0x142d2
movq %r14, %rdi
callq 0xb840
movq %rax, %rdi
leaq 0x3551(%rip), %rsi # 0x1777a
callq 0xb1f0
testl %eax, %eax
je 0x142f1
movq %r14, %rdi
callq 0xb840
movq %rax, %rdi
leaq 0x3535(%rip), %rsi # 0x1777d
callq 0xb1f0
testl %eax, %eax
jne 0x14316
leaq 0x10(%rsp), %rax
movq %rax, (%rsp)
xorl %ecx, %ecx
movq %rcx, 0x8(%rsp)
movb %cl, 0x10(%rsp)
leaq 0x30(%rsp), %rax
movq %rax, 0x20(%rsp)
movq %rcx, 0x28(%rsp)
movb %cl, 0x30(%rsp)
movq %r14, %rdi
callq 0xb1a0
movq %rbp, %rdi
movq %rax, %rsi
callq 0xb180
movq 0x58(%rsp), %rdi
movq %rbp, %rsi
movq %r15, %rdx
callq 0xb5a0
movq 0x50(%rsp), %rdi
movq %r15, %rsi
callq 0xbd30
movq %r14, %rdi
callq 0xb1a0
movq %rax, %rbx
movq %r13, %rdi
callq 0xb1a0
cmpq %rax, %rbx
je 0x14384
movq %r14, %rdi
callq 0xbaf0
jmp 0x142ac
movq %r14, %rdi
callq 0xbaf0
movq %r13, %rdi
callq 0xbaf0
movq %r14, %rdi
callq 0xb840
movq 0x68(%rsp), %rdi
jmp 0x1430e
movq %r14, %rdi
callq 0xbaf0
movq %r13, %rdi
callq 0xbaf0
movq %r14, %rdi
callq 0xb840
movq 0x60(%rsp), %rdi
movq %rax, %rsi
callq 0xb390
movq %rbp, %rdi
movq %r14, %rsi
callq 0xb660
movq %rbp, %rdi
callq 0xbaf0
xorps %xmm0, %xmm0
movaps %xmm0, 0x40(%rsp)
movaps %xmm0, 0x30(%rsp)
movaps %xmm0, 0x20(%rsp)
movaps %xmm0, 0x10(%rsp)
movaps %xmm0, (%rsp)
movq %r15, %rdi
xorl %esi, %esi
callq 0xb600
movq %rbp, %rdi
movq %r15, %rsi
callq 0xb740
movl %eax, %ebx
movq %r15, %rdi
callq 0xbd20
testb %bl, %bl
je 0x1436f
movq %r13, %rdi
callq 0xbaf0
movq %rbp, %rdi
callq 0xbd20
movq %r14, %rdi
callq 0xbaf0
jmp 0x141ad
movq %rbp, %rdi
callq 0xbd20
movq 0x20(%rsp), %rdi
leaq 0x30(%rsp), %rax
cmpq %rax, %rdi
je 0x143a8
movq 0x30(%rsp), %rsi
incq %rsi
callq 0xb6a0
movq (%rsp), %rdi
leaq 0x10(%rsp), %rax
cmpq %rax, %rdi
je 0x14316
movq 0x10(%rsp), %rsi
incq %rsi
callq 0xb6a0
jmp 0x14316
addq $0xc8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x143e0
movq %rax, %rdi
callq 0x10aa5
|
_ZN16SEMANTICANALYZER18AstStatementParser18serializeObjectDecERN3AST7ASTTree11DSFIteratorERNS_10ObjectDeclE:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 0C8h
mov r14, rsi
lea rax, [rdx+40h]
mov [rsp+0F8h+var_A8], rax
mov [rsp+0F8h+var_A0], rdi
lea r13, [rdi+8]
mov [rsp+0F8h+var_90], rdx
lea rax, [rdx+20h]
mov [rsp+0F8h+var_98], rax
lea rbp, [rsp+0F8h+var_88]
lea r12, aShape; "SHAPE"
mov r15, rsp
loc_141AD:
xorps xmm0, xmm0
movaps [rsp+0F8h+var_48], xmm0
movaps [rsp+0F8h+var_58], xmm0
movaps [rsp+0F8h+var_68], xmm0
movaps [rsp+0F8h+var_78], xmm0
movaps [rsp+0F8h+var_88], xmm0
mov rdi, rbp
xor esi, esi
call __ZNSt11_Deque_baseIPN3AST4NodeESaIS2_EE17_M_initialize_mapEm; std::_Deque_base<AST::Node *>::_M_initialize_map(ulong)
mov rdi, r14
mov rsi, rbp
call __ZNK3AST7ASTTree11DSFIteratorneERKS1_; AST::ASTTree::DSFIterator::operator!=(AST::ASTTree::DSFIterator const&)
mov ebx, eax
mov rdi, rbp
call __ZNSt11_Deque_baseIPN3AST4NodeESaIS2_EED2Ev; std::_Deque_base<AST::Node *>::~_Deque_base()
test bl, bl
jz loc_143CC
mov rdi, r14
call __ZNK3AST7ASTTree11DSFIteratorptEv; AST::ASTTree::DSFIterator::operator->(void)
mov rdi, rax
mov rsi, r12
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7compareEPKc; std::string::compare(char const*)
test eax, eax
jz loc_142D2
mov rdi, r14
call __ZNK3AST7ASTTree11DSFIteratorptEv; AST::ASTTree::DSFIterator::operator->(void)
mov rdi, rax
lea rsi, aId; "ID"
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7compareEPKc; std::string::compare(char const*)
test eax, eax
jz loc_142F1
mov rdi, r14
call __ZNK3AST7ASTTree11DSFIteratorptEv; AST::ASTTree::DSFIterator::operator->(void)
mov rdi, rax
lea rsi, aProperty; "property"
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7compareEPKc; std::string::compare(char const*)
test eax, eax
jnz loc_14316
lea rax, [rsp+0F8h+var_E8]
mov [rsp+0F8h+var_F8], rax
xor ecx, ecx
mov [rsp+0F8h+var_F8+8], rcx
mov byte ptr [rsp+0F8h+var_E8], cl
lea rax, [rsp+0F8h+var_C8]
mov [rsp+0F8h+var_D8], rax
mov [rsp+0F8h+var_D8+8], rcx
mov byte ptr [rsp+0F8h+var_C8], cl
mov rdi, r14; this
call __ZNK3AST7ASTTree11DSFIterator3getEv; AST::ASTTree::DSFIterator::get(void)
mov rdi, rbp
mov rsi, rax
call __ZN3AST7ASTTree11DSFIteratorC1EPNS_4NodeE; AST::ASTTree::DSFIterator::DSFIterator(AST::Node *)
mov rdi, [rsp+0F8h+var_A0]
mov rsi, rbp
mov rdx, r15
call __ZN16SEMANTICANALYZER18AstStatementParser17serializePropertyERN3AST7ASTTree11DSFIteratorERNS_8PropertyE; SEMANTICANALYZER::AstStatementParser::serializeProperty(AST::ASTTree::DSFIterator &,SEMANTICANALYZER::Property &)
mov rdi, [rsp+0F8h+var_A8]
mov rsi, r15
call __ZNSt6vectorIN16SEMANTICANALYZER8PropertyESaIS1_EE12emplace_backIJS1_EEERS1_DpOT_; std::vector<SEMANTICANALYZER::Property>::emplace_back<SEMANTICANALYZER::Property>(SEMANTICANALYZER::Property &&)
loc_142AC:
mov rdi, r14; this
call __ZNK3AST7ASTTree11DSFIterator3getEv; AST::ASTTree::DSFIterator::get(void)
mov rbx, rax
mov rdi, r13; this
call __ZNK3AST7ASTTree11DSFIterator3getEv; AST::ASTTree::DSFIterator::get(void)
cmp rbx, rax
jz loc_14384
mov rdi, r14
call __ZN3AST7ASTTree11DSFIteratorppEv; AST::ASTTree::DSFIterator::operator++(void)
jmp short loc_142AC
loc_142D2:
mov rdi, r14
call __ZN3AST7ASTTree11DSFIteratorppEv; AST::ASTTree::DSFIterator::operator++(void)
mov rdi, r13
call __ZN3AST7ASTTree11DSFIteratorppEv; AST::ASTTree::DSFIterator::operator++(void)
mov rdi, r14
call __ZNK3AST7ASTTree11DSFIteratorptEv; AST::ASTTree::DSFIterator::operator->(void)
mov rdi, [rsp+0F8h+var_90]
jmp short loc_1430E
loc_142F1:
mov rdi, r14
call __ZN3AST7ASTTree11DSFIteratorppEv; AST::ASTTree::DSFIterator::operator++(void)
mov rdi, r13
call __ZN3AST7ASTTree11DSFIteratorppEv; AST::ASTTree::DSFIterator::operator++(void)
mov rdi, r14
call __ZNK3AST7ASTTree11DSFIteratorptEv; AST::ASTTree::DSFIterator::operator->(void)
mov rdi, [rsp+0F8h+var_98]
loc_1430E:
mov rsi, rax
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_assignERKS4_; std::string::_M_assign(std::string const&)
loc_14316:
mov rdi, rbp
mov rsi, r14
call __ZNSt5dequeIPN3AST4NodeESaIS2_EEC2ERKS4_; std::deque<AST::Node *>::deque(std::deque<AST::Node *> const&)
mov rdi, rbp
call __ZN3AST7ASTTree11DSFIteratorppEv; AST::ASTTree::DSFIterator::operator++(void)
xorps xmm0, xmm0
movaps [rsp+0F8h+var_B8], xmm0
movaps [rsp+0F8h+var_C8], xmm0
movaps xmmword ptr [rsp+0F8h+var_D8], xmm0
movaps [rsp+0F8h+var_E8], xmm0
movaps xmmword ptr [rsp+0F8h+var_F8], xmm0
mov rdi, r15
xor esi, esi
call __ZNSt11_Deque_baseIPN3AST4NodeESaIS2_EE17_M_initialize_mapEm; std::_Deque_base<AST::Node *>::_M_initialize_map(ulong)
mov rdi, rbp
mov rsi, r15
call __ZNK3AST7ASTTree11DSFIteratorneERKS1_; AST::ASTTree::DSFIterator::operator!=(AST::ASTTree::DSFIterator const&)
mov ebx, eax
mov rdi, r15
call __ZNSt11_Deque_baseIPN3AST4NodeESaIS2_EED2Ev; std::_Deque_base<AST::Node *>::~_Deque_base()
test bl, bl
jz short loc_1436F
mov rdi, r13
call __ZN3AST7ASTTree11DSFIteratorppEv; AST::ASTTree::DSFIterator::operator++(void)
loc_1436F:
mov rdi, rbp
call __ZNSt11_Deque_baseIPN3AST4NodeESaIS2_EED2Ev; std::_Deque_base<AST::Node *>::~_Deque_base()
mov rdi, r14
call __ZN3AST7ASTTree11DSFIteratorppEv; AST::ASTTree::DSFIterator::operator++(void)
jmp loc_141AD
loc_14384:
mov rdi, rbp
call __ZNSt11_Deque_baseIPN3AST4NodeESaIS2_EED2Ev; std::_Deque_base<AST::Node *>::~_Deque_base()
mov rdi, [rsp+0F8h+var_D8]; void *
lea rax, [rsp+0F8h+var_C8]
cmp rdi, rax
jz short loc_143A8
mov rsi, qword ptr [rsp+0F8h+var_C8]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_143A8:
mov rdi, [rsp+0F8h+var_F8]; void *
lea rax, [rsp+0F8h+var_E8]
cmp rdi, rax
jz loc_14316
mov rsi, qword ptr [rsp+0F8h+var_E8]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp loc_14316
loc_143CC:
add rsp, 0C8h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
jmp short $+2
loc_143E0:
mov rdi, rax
call __clang_call_terminate
|
long long SEMANTICANALYZER::AstStatementParser::serializeObjectDec(
long long a1,
AST::ASTTree::DSFIterator *a2,
long long a3)
{
AST::ASTTree::DSFIterator *v3; // r13
char v4; // bl
long long result; // rax
long long v6; // rax
long long v7; // rax
long long v8; // rax
long long v9; // rax
long long v10; // rbx
long long v11; // rax
long long v12; // rdi
char v13; // bl
void *v14[2]; // [rsp+0h] [rbp-F8h] BYREF
__int128 v15; // [rsp+10h] [rbp-E8h] BYREF
void *v16[2]; // [rsp+20h] [rbp-D8h]
_OWORD v17[2]; // [rsp+30h] [rbp-C8h] BYREF
long long v18; // [rsp+50h] [rbp-A8h]
long long v19; // [rsp+58h] [rbp-A0h]
long long v20; // [rsp+60h] [rbp-98h]
long long v21; // [rsp+68h] [rbp-90h]
_OWORD v22[8]; // [rsp+70h] [rbp-88h] BYREF
v18 = a3 + 64;
v19 = a1;
v3 = (AST::ASTTree::DSFIterator *)(a1 + 8);
v21 = a3;
v20 = a3 + 32;
while ( 1 )
{
memset(v22, 0, 80);
std::_Deque_base<AST::Node *>::_M_initialize_map(v22, 0LL);
v4 = AST::ASTTree::DSFIterator::operator!=(a2, v22);
result = std::_Deque_base<AST::Node *>::~_Deque_base(v22);
if ( !v4 )
return result;
v6 = AST::ASTTree::DSFIterator::operator->(a2);
if ( !(unsigned int)std::string::compare(v6, "SHAPE") )
{
AST::ASTTree::DSFIterator::operator++(a2);
AST::ASTTree::DSFIterator::operator++(v3);
v11 = AST::ASTTree::DSFIterator::operator->(a2);
v12 = v21;
LABEL_11:
std::string::_M_assign(v12, v11);
goto LABEL_12;
}
v7 = AST::ASTTree::DSFIterator::operator->(a2);
if ( !(unsigned int)std::string::compare(v7, "ID") )
{
AST::ASTTree::DSFIterator::operator++(a2);
AST::ASTTree::DSFIterator::operator++(v3);
v11 = AST::ASTTree::DSFIterator::operator->(a2);
v12 = v20;
goto LABEL_11;
}
v8 = AST::ASTTree::DSFIterator::operator->(a2);
if ( !(unsigned int)std::string::compare(v8, "property") )
{
v14[0] = &v15;
v14[1] = 0LL;
LOBYTE(v15) = 0;
v16[0] = v17;
v16[1] = 0LL;
LOBYTE(v17[0]) = 0;
v9 = AST::ASTTree::DSFIterator::get(a2);
AST::ASTTree::DSFIterator::DSFIterator(v22, v9);
SEMANTICANALYZER::AstStatementParser::serializeProperty(v19, v22, v14);
std::vector<SEMANTICANALYZER::Property>::emplace_back<SEMANTICANALYZER::Property>(v18, v14);
while ( 1 )
{
v10 = AST::ASTTree::DSFIterator::get(a2);
if ( v10 == AST::ASTTree::DSFIterator::get(v3) )
break;
AST::ASTTree::DSFIterator::operator++(a2);
}
std::_Deque_base<AST::Node *>::~_Deque_base(v22);
if ( v16[0] != v17 )
operator delete(v16[0], *(_QWORD *)&v17[0] + 1LL);
if ( v14[0] != &v15 )
operator delete(v14[0], v15 + 1);
}
LABEL_12:
std::deque<AST::Node *>::deque(v22, a2);
AST::ASTTree::DSFIterator::operator++(v22);
memset(v17, 0, sizeof(v17));
*(_OWORD *)v16 = 0LL;
v15 = 0LL;
*(_OWORD *)v14 = 0LL;
std::_Deque_base<AST::Node *>::_M_initialize_map(v14, 0LL);
v13 = AST::ASTTree::DSFIterator::operator!=(v22, v14);
std::_Deque_base<AST::Node *>::~_Deque_base(v14);
if ( v13 )
AST::ASTTree::DSFIterator::operator++(v3);
std::_Deque_base<AST::Node *>::~_Deque_base(v22);
AST::ASTTree::DSFIterator::operator++(a2);
}
}
|
serializeObjectDec:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0xc8
MOV R14,RSI
LEA RAX,[RDX + 0x40]
MOV qword ptr [RSP + 0x50],RAX
MOV qword ptr [RSP + 0x58],RDI
LEA R13,[RDI + 0x8]
MOV qword ptr [RSP + 0x68],RDX
LEA RAX,[RDX + 0x20]
MOV qword ptr [RSP + 0x60],RAX
LEA RBP,[RSP + 0x70]
LEA R12,[0x117774]
MOV R15,RSP
LAB_001141ad:
XORPS XMM0,XMM0
MOVAPS xmmword ptr [RSP + 0xb0],XMM0
MOVAPS xmmword ptr [RSP + 0xa0],XMM0
MOVAPS xmmword ptr [RSP + 0x90],XMM0
MOVAPS xmmword ptr [RSP + 0x80],XMM0
MOVAPS xmmword ptr [RSP + 0x70],XMM0
LAB_001141d5:
MOV RDI,RBP
XOR ESI,ESI
CALL 0x0010b600
MOV RDI,R14
MOV RSI,RBP
CALL 0x0010b740
MOV EBX,EAX
MOV RDI,RBP
CALL 0x0010bd20
TEST BL,BL
JZ 0x001143cc
MOV RDI,R14
CALL 0x0010b840
MOV RDI,RAX
MOV RSI,R12
CALL 0x0010b1f0
TEST EAX,EAX
JZ 0x001142d2
MOV RDI,R14
CALL 0x0010b840
MOV RDI,RAX
LEA RSI,[0x11777a]
CALL 0x0010b1f0
TEST EAX,EAX
JZ 0x001142f1
MOV RDI,R14
CALL 0x0010b840
MOV RDI,RAX
LEA RSI,[0x11777d]
CALL 0x0010b1f0
TEST EAX,EAX
JNZ 0x00114316
LEA RAX,[RSP + 0x10]
MOV qword ptr [RSP],RAX
XOR ECX,ECX
MOV qword ptr [RSP + 0x8],RCX
MOV byte ptr [RSP + 0x10],CL
LEA RAX,[RSP + 0x30]
MOV qword ptr [RSP + 0x20],RAX
MOV qword ptr [RSP + 0x28],RCX
MOV byte ptr [RSP + 0x30],CL
MOV RDI,R14
CALL 0x0010b1a0
MOV RDI,RBP
MOV RSI,RAX
CALL 0x0010b180
MOV RDI,qword ptr [RSP + 0x58]
MOV RSI,RBP
MOV RDX,R15
CALL 0x0010b5a0
MOV RDI,qword ptr [RSP + 0x50]
MOV RSI,R15
CALL 0x0010bd30
LAB_001142ac:
MOV RDI,R14
CALL 0x0010b1a0
MOV RBX,RAX
MOV RDI,R13
CALL 0x0010b1a0
CMP RBX,RAX
JZ 0x00114384
LAB_001142c8:
MOV RDI,R14
CALL 0x0010baf0
JMP 0x001142ac
LAB_001142d2:
MOV RDI,R14
CALL 0x0010baf0
MOV RDI,R13
CALL 0x0010baf0
MOV RDI,R14
CALL 0x0010b840
MOV RDI,qword ptr [RSP + 0x68]
JMP 0x0011430e
LAB_001142f1:
MOV RDI,R14
CALL 0x0010baf0
MOV RDI,R13
CALL 0x0010baf0
MOV RDI,R14
CALL 0x0010b840
MOV RDI,qword ptr [RSP + 0x60]
LAB_0011430e:
MOV RSI,RAX
CALL 0x0010b390
LAB_00114316:
MOV RDI,RBP
MOV RSI,R14
CALL 0x0010b660
MOV RDI,RBP
CALL 0x0010baf0
XORPS XMM0,XMM0
MOVAPS xmmword ptr [RSP + 0x40],XMM0
MOVAPS xmmword ptr [RSP + 0x30],XMM0
MOVAPS xmmword ptr [RSP + 0x20],XMM0
MOVAPS xmmword ptr [RSP + 0x10],XMM0
MOVAPS xmmword ptr [RSP],XMM0
MOV RDI,R15
XOR ESI,ESI
CALL 0x0010b600
MOV RDI,RBP
MOV RSI,R15
CALL 0x0010b740
MOV EBX,EAX
MOV RDI,R15
CALL 0x0010bd20
TEST BL,BL
JZ 0x0011436f
MOV RDI,R13
CALL 0x0010baf0
LAB_0011436f:
MOV RDI,RBP
CALL 0x0010bd20
MOV RDI,R14
CALL 0x0010baf0
JMP 0x001141ad
LAB_00114384:
MOV RDI,RBP
CALL 0x0010bd20
MOV RDI,qword ptr [RSP + 0x20]
LEA RAX,[RSP + 0x30]
CMP RDI,RAX
JZ 0x001143a8
MOV RSI,qword ptr [RSP + 0x30]
INC RSI
CALL 0x0010b6a0
LAB_001143a8:
MOV RDI,qword ptr [RSP]
LEA RAX,[RSP + 0x10]
CMP RDI,RAX
JZ 0x00114316
MOV RSI,qword ptr [RSP + 0x10]
INC RSI
CALL 0x0010b6a0
JMP 0x00114316
LAB_001143cc:
ADD RSP,0xc8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
/* SEMANTICANALYZER::AstStatementParser::serializeObjectDec(AST::ASTTree::DSFIterator&,
SEMANTICANALYZER::ObjectDecl&) */
void __thiscall
SEMANTICANALYZER::AstStatementParser::serializeObjectDec
(AstStatementParser *this,DSFIterator *param_1,ObjectDecl *param_2)
{
DSFIterator *this_00;
char cVar1;
int iVar2;
char *pcVar3;
Node *pNVar4;
long lVar5;
long lVar6;
ObjectDecl *pOVar7;
ulong *local_f8;
int8 uStack_f0;
ulong local_e8 [2];
ulong *local_d8;
int8 uStack_d0;
ulong local_c8 [4];
ObjectDecl *local_a8;
AstStatementParser *local_a0;
ObjectDecl *local_98;
ObjectDecl *local_90;
int8 local_88;
int8 uStack_80;
int8 local_78;
int8 uStack_70;
int8 local_68;
int8 uStack_60;
int8 local_58;
int8 uStack_50;
int8 local_48;
int8 uStack_40;
local_a8 = param_2 + 0x40;
this_00 = (DSFIterator *)(this + 8);
local_98 = param_2 + 0x20;
local_a0 = this;
local_90 = param_2;
do {
local_48 = 0;
uStack_40 = 0;
local_58 = 0;
uStack_50 = 0;
local_68 = 0;
uStack_60 = 0;
local_78 = 0;
uStack_70 = 0;
local_88 = 0;
uStack_80 = 0;
/* try { // try from 001141d5 to 001142ab has its CatchHandler @ 001143e0 */
std::_Deque_base<AST::Node*,std::allocator<AST::Node*>>::_M_initialize_map
((_Deque_base<AST::Node*,std::allocator<AST::Node*>> *)&local_88,0);
cVar1 = AST::ASTTree::DSFIterator::operator!=(param_1,(DSFIterator *)&local_88);
std::_Deque_base<AST::Node*,std::allocator<AST::Node*>>::~_Deque_base
((_Deque_base<AST::Node*,std::allocator<AST::Node*>> *)&local_88);
if (cVar1 == '\0') {
return;
}
pcVar3 = (char *)AST::ASTTree::DSFIterator::operator->(param_1);
iVar2 = std::__cxx11::string::compare(pcVar3);
if (iVar2 == 0) {
/* try { // try from 001142d2 to 0011437e has its CatchHandler @ 001143e0 */
AST::ASTTree::DSFIterator::operator++(param_1);
AST::ASTTree::DSFIterator::operator++(this_00);
AST::ASTTree::DSFIterator::operator->(param_1);
pOVar7 = local_90;
LAB_0011430e:
std::__cxx11::string::_M_assign((string *)pOVar7);
}
else {
pcVar3 = (char *)AST::ASTTree::DSFIterator::operator->(param_1);
iVar2 = std::__cxx11::string::compare(pcVar3);
if (iVar2 == 0) {
AST::ASTTree::DSFIterator::operator++(param_1);
AST::ASTTree::DSFIterator::operator++(this_00);
AST::ASTTree::DSFIterator::operator->(param_1);
pOVar7 = local_98;
goto LAB_0011430e;
}
pcVar3 = (char *)AST::ASTTree::DSFIterator::operator->(param_1);
iVar2 = std::__cxx11::string::compare(pcVar3);
if (iVar2 == 0) {
local_f8 = local_e8;
uStack_f0 = 0;
local_e8[0] = local_e8[0] & 0xffffffffffffff00;
local_d8 = local_c8;
uStack_d0 = 0;
local_c8[0] = local_c8[0] & 0xffffffffffffff00;
pNVar4 = (Node *)AST::ASTTree::DSFIterator::get();
AST::ASTTree::DSFIterator::DSFIterator((DSFIterator *)&local_88,pNVar4);
serializeProperty(local_a0,(DSFIterator *)&local_88,(Property *)&local_f8);
std::vector<SEMANTICANALYZER::Property,std::allocator<SEMANTICANALYZER::Property>>::
emplace_back<SEMANTICANALYZER::Property>
((vector<SEMANTICANALYZER::Property,std::allocator<SEMANTICANALYZER::Property>> *)
local_a8,(Property *)&local_f8);
while( true ) {
lVar5 = AST::ASTTree::DSFIterator::get();
lVar6 = AST::ASTTree::DSFIterator::get();
if (lVar5 == lVar6) break;
/* try { // try from 001142c8 to 001142cf has its CatchHandler @ 001143de */
AST::ASTTree::DSFIterator::operator++(param_1);
}
std::_Deque_base<AST::Node*,std::allocator<AST::Node*>>::~_Deque_base
((_Deque_base<AST::Node*,std::allocator<AST::Node*>> *)&local_88);
if (local_d8 != local_c8) {
operator_delete(local_d8,local_c8[0] + 1);
}
if (local_f8 != local_e8) {
operator_delete(local_f8,local_e8[0] + 1);
}
}
}
std::deque<AST::Node*,std::allocator<AST::Node*>>::deque
((deque<AST::Node*,std::allocator<AST::Node*>> *)&local_88,(deque *)param_1);
AST::ASTTree::DSFIterator::operator++((DSFIterator *)&local_88);
local_c8[2] = 0;
local_c8[3] = 0;
local_c8[0] = 0;
local_c8[1] = 0;
local_d8 = (ulong *)0x0;
uStack_d0 = 0;
local_e8[0] = 0;
local_e8[1] = 0;
local_f8 = (ulong *)0x0;
uStack_f0 = 0;
std::_Deque_base<AST::Node*,std::allocator<AST::Node*>>::_M_initialize_map
((_Deque_base<AST::Node*,std::allocator<AST::Node*>> *)&local_f8,0);
cVar1 = AST::ASTTree::DSFIterator::operator!=((DSFIterator *)&local_88,(DSFIterator *)&local_f8)
;
std::_Deque_base<AST::Node*,std::allocator<AST::Node*>>::~_Deque_base
((_Deque_base<AST::Node*,std::allocator<AST::Node*>> *)&local_f8);
if (cVar1 != '\0') {
AST::ASTTree::DSFIterator::operator++(this_00);
}
std::_Deque_base<AST::Node*,std::allocator<AST::Node*>>::~_Deque_base
((_Deque_base<AST::Node*,std::allocator<AST::Node*>> *)&local_88);
AST::ASTTree::DSFIterator::operator++(param_1);
} while( true );
}
|
|
64,327 |
GGUFMeta::GKV<bool>::validate_override(llama_model_kv_override_type, llama_model_kv_override const*)
|
monkey531[P]llama/src/llama-model-loader.cpp
|
static bool validate_override(const llama_model_kv_override_type expected_type, const struct llama_model_kv_override * ovrd) {
if (!ovrd) { return false; }
if (ovrd->tag == expected_type) {
LLAMA_LOG_INFO("%s: Using metadata override (%5s) '%s' = ",
__func__, override_type_to_str(ovrd->tag), ovrd->key);
switch (ovrd->tag) {
case LLAMA_KV_OVERRIDE_TYPE_BOOL: {
LLAMA_LOG_INFO("%s\n", ovrd->val_bool ? "true" : "false");
} break;
case LLAMA_KV_OVERRIDE_TYPE_INT: {
LLAMA_LOG_INFO("%" PRId64 "\n", ovrd->val_i64);
} break;
case LLAMA_KV_OVERRIDE_TYPE_FLOAT: {
LLAMA_LOG_INFO("%.6f\n", ovrd->val_f64);
} break;
case LLAMA_KV_OVERRIDE_TYPE_STR: {
LLAMA_LOG_INFO("%s\n", ovrd->val_str);
} break;
default:
// Shouldn't be possible to end up here, but just in case...
throw std::runtime_error(
format("Unsupported attempt to override %s type for metadata key %s\n",
override_type_to_str(ovrd->tag), ovrd->key));
}
return true;
}
LLAMA_LOG_WARN("%s: Warning: Bad metadata override type for key '%s', expected %s but got %s\n",
__func__, ovrd->key, override_type_to_str(expected_type), override_type_to_str(ovrd->tag));
return false;
}
|
O2
|
cpp
|
GGUFMeta::GKV<bool>::validate_override(llama_model_kv_override_type, llama_model_kv_override const*):
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x20, %rsp
testq %rsi, %rsi
je 0xeaab4
movq %rsi, %r14
cmpl %edi, (%rsi)
jne 0xeaabb
callq 0xa2060
leaq 0x4(%r14), %r15
leaq 0x5b53b(%rip), %rsi # 0x145fab
leaq 0x5b55e(%rip), %rdx # 0x145fd5
pushq $0x2
popq %rdi
movq %rax, %rcx
movq %r15, %r8
xorl %eax, %eax
callq 0xa16d0
movl (%r14), %eax
cmpq $0x3, %rax
ja 0xeab64
leaq 0x5a985(%rip), %rcx # 0x145420
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq 0x88(%r14), %rdx
leaq 0x5b535(%rip), %rsi # 0x145fe7
jmp 0xeab15
xorl %ebx, %ebx
jmp 0xeab55
leaq 0x4(%r14), %r15
callq 0xa2060
movq %rax, %r12
movl (%r14), %edi
callq 0xa2060
leaq 0x5b559(%rip), %rsi # 0x14602f
leaq 0x5b4f8(%rip), %rdx # 0x145fd5
xorl %ebx, %ebx
pushq $0x3
popq %rdi
movq %r15, %rcx
movq %r12, %r8
movq %rax, %r9
xorl %eax, %eax
callq 0xa16d0
jmp 0xeab55
leaq 0x57d92(%rip), %rax # 0x14288d
leaq 0x590d8(%rip), %rdx # 0x143bda
cmpb $0x0, 0x88(%r14)
cmovneq %rax, %rdx
leaq 0x58a57(%rip), %rsi # 0x14356c
pushq $0x2
popq %rdi
jmp 0xeab2e
addq $0x88, %r14
leaq 0x58a44(%rip), %rsi # 0x14356c
pushq $0x2
popq %rdi
movq %r14, %rdx
xorl %eax, %eax
callq 0xa16d0
movb $0x1, %bl
jmp 0xeab55
movsd 0x88(%r14), %xmm0
leaq 0x5b4a3(%rip), %rsi # 0x145fec
pushq $0x2
popq %rdi
movb $0x1, %bl
movb $0x1, %al
callq 0xa16d0
movl %ebx, %eax
addq $0x20, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
pushq $0x10
popq %rdi
callq 0x9dfd0
movq %rax, %rbx
movl (%r14), %edi
callq 0xa2060
leaq 0x5b474(%rip), %rsi # 0x145ff2
movq %rsp, %rdi
movq %rax, %rdx
movq %r15, %rcx
xorl %eax, %eax
callq 0xa7ad0
movb $0x1, %bpl
movq %rsp, %rsi
movq %rbx, %rdi
callq 0xa6270
xorl %ebp, %ebp
movq 0xaf44b(%rip), %rsi # 0x199ff0
movq 0xaf144(%rip), %rdx # 0x199cf0
movq %rbx, %rdi
callq 0xa6f50
movq %rax, %r14
movq %rsp, %rdi
callq 0xa8d48
testb %bpl, %bpl
jne 0xeabc9
jmp 0xeabd1
movq %rax, %r14
movq %rbx, %rdi
callq 0x9fc30
movq %r14, %rdi
callq 0xa7540
nop
|
_ZN8GGUFMeta3GKVINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEE17validate_overrideE28llama_model_kv_override_typePK23llama_model_kv_override:
push rbp
push r15
push r14
push r12
push rbx
sub rsp, 20h
test rsi, rsi
jz short loc_EAAB4
mov r14, rsi
cmp [rsi], edi
jnz short loc_EAABB
call __ZN8GGUFMeta3GKVINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEE20override_type_to_strE28llama_model_kv_override_type; GGUFMeta::GKV<std::string>::override_type_to_str(llama_model_kv_override_type)
lea r15, [r14+4]
lea rsi, aSUsingMetadata; "%s: Using metadata override (%5s) '%s' "...
lea rdx, aValidateOverri; "validate_override"
push 2
pop rdi
mov rcx, rax
mov r8, r15
xor eax, eax
call __Z18llama_log_internal14ggml_log_levelPKcz; llama_log_internal(ggml_log_level,char const*,...)
mov eax, [r14]
cmp rax, 3; switch 4 cases
ja def_EAAA2; jumptable 00000000000EAAA2 default case
lea rcx, jpt_EAAA2
movsxd rax, ds:(jpt_EAAA2 - 145420h)[rcx+rax*4]
add rax, rcx
jmp rax; switch jump
loc_EAAA4:
mov rdx, [r14+88h]; jumptable 00000000000EAAA2 case 0
lea rsi, aLd; "%ld\n"
jmp short loc_EAB15
loc_EAAB4:
xor ebx, ebx
jmp loc_EAB55
loc_EAABB:
lea r15, [r14+4]
call __ZN8GGUFMeta3GKVINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEE20override_type_to_strE28llama_model_kv_override_type; GGUFMeta::GKV<std::string>::override_type_to_str(llama_model_kv_override_type)
mov r12, rax
mov edi, [r14]
call __ZN8GGUFMeta3GKVINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEE20override_type_to_strE28llama_model_kv_override_type; GGUFMeta::GKV<std::string>::override_type_to_str(llama_model_kv_override_type)
lea rsi, aSWarningBadMet; "%s: Warning: Bad metadata override type"...
lea rdx, aValidateOverri; "validate_override"
xor ebx, ebx
push 3
pop rdi
mov rcx, r15
mov r8, r12
mov r9, rax
xor eax, eax
call __Z18llama_log_internal14ggml_log_levelPKcz; llama_log_internal(ggml_log_level,char const*,...)
jmp short loc_EAB55
loc_EAAF4:
lea rax, aBatchLogitsDTr+14h; jumptable 00000000000EAAA2 case 2
lea rdx, aFalse; "false"
cmp byte ptr [r14+88h], 0
cmovnz rdx, rax
lea rsi, aSErrorParsingG+1Fh; "%s\n"
loc_EAB15:
push 2
pop rdi
jmp short loc_EAB2E
loc_EAB1A:
add r14, 88h; jumptable 00000000000EAAA2 case 3
lea rsi, aSErrorParsingG+1Fh; "%s\n"
push 2
pop rdi
mov rdx, r14
loc_EAB2E:
xor eax, eax
call __Z18llama_log_internal14ggml_log_levelPKcz; llama_log_internal(ggml_log_level,char const*,...)
mov bl, 1
jmp short loc_EAB55
loc_EAB39:
movsd xmm0, qword ptr [r14+88h]; jumptable 00000000000EAAA2 case 1
lea rsi, a6f; "%.6f\n"
push 2
pop rdi
mov bl, 1
mov al, 1
call __Z18llama_log_internal14ggml_log_levelPKcz; llama_log_internal(ggml_log_level,char const*,...)
loc_EAB55:
mov eax, ebx
add rsp, 20h
pop rbx
pop r12
pop r14
pop r15
pop rbp
retn
def_EAAA2:
push 10h; jumptable 00000000000EAAA2 default case
pop rdi; thrown_size
call ___cxa_allocate_exception
mov rbx, rax
mov edi, [r14]
call __ZN8GGUFMeta3GKVINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEE20override_type_to_strE28llama_model_kv_override_type; GGUFMeta::GKV<std::string>::override_type_to_str(llama_model_kv_override_type)
lea rsi, aUnsupportedAtt; "Unsupported attempt to override %s type"...
mov rdi, rsp
mov rdx, rax
mov rcx, r15
xor eax, eax
call __Z6formatB5cxx11PKcz; format(char const*,...)
mov bpl, 1
mov rsi, rsp
mov rdi, rbx
call __ZNSt13runtime_errorC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; std::runtime_error::runtime_error(std::string const&)
xor ebp, ebp
mov rsi, cs:lptinfo; lptinfo
mov rdx, cs:_ZNSt13runtime_errorD1Ev_ptr; void (*)(void *)
mov rdi, rbx; void *
call ___cxa_throw
mov r14, rax
mov rdi, rsp; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
test bpl, bpl
jnz short loc_EABC9
jmp short loc_EABD1
mov r14, rax
loc_EABC9:
mov rdi, rbx; void *
call ___cxa_free_exception
loc_EABD1:
mov rdi, r14
call __Unwind_Resume
|
long long GGUFMeta::GKV<std::string>::validate_override(long long a1, unsigned int *a2)
{
unsigned int v2; // ebx
int v3; // r14d
int v4; // eax
int v5; // r9d
int v6; // edx
int v7; // ecx
int v8; // r8d
int v9; // r9d
char *v10; // rdx
char *v11; // rsi
int v12; // r12d
int v13; // eax
void *exception; // rbx
int v16; // eax
int v17; // r8d
int v18; // r9d
_BYTE v19[72]; // [rsp+0h] [rbp-48h] BYREF
if ( a2 )
{
v3 = (int)a2;
if ( *a2 == (_DWORD)a1 )
{
v4 = GGUFMeta::GKV<std::string>::override_type_to_str(a1);
llama_log_internal(
2,
(unsigned int)"%s: Using metadata override (%5s) '%s' = ",
(unsigned int)"validate_override",
v4,
(_DWORD)a2 + 4,
v5);
switch ( *a2 )
{
case 0u:
v10 = (char *)*((_QWORD *)a2 + 17);
v11 = "%ld\n";
goto LABEL_12;
case 1u:
LOBYTE(v2) = 1;
llama_log_internal(2, (unsigned int)"%.6f\n", v6, v7, v8, v9);
return v2;
case 2u:
v10 = "false";
if ( *((_BYTE *)a2 + 136) )
v10 = "true";
v11 = "%s\n";
goto LABEL_12;
case 3u:
v11 = "%s\n";
LODWORD(v10) = v3 + 136;
LABEL_12:
llama_log_internal(2, (_DWORD)v11, (_DWORD)v10, v7, v8, v9);
LOBYTE(v2) = 1;
break;
default:
exception = __cxa_allocate_exception(0x10uLL);
v16 = GGUFMeta::GKV<std::string>::override_type_to_str(*a2);
format[abi:cxx11](
(unsigned int)v19,
(unsigned int)"Unsupported attempt to override %s type for metadata key %s\n",
v16,
(_DWORD)a2 + 4,
v17,
v18);
std::runtime_error::runtime_error(exception, v19);
__cxa_throw(
exception,
(struct type_info *)&`typeinfo for'std::runtime_error,
(void (*)(void *))&std::runtime_error::~runtime_error);
}
}
else
{
v12 = ((long long (*)(void))GGUFMeta::GKV<std::string>::override_type_to_str)();
v13 = GGUFMeta::GKV<std::string>::override_type_to_str(*a2);
v2 = 0;
llama_log_internal(
3,
(unsigned int)"%s: Warning: Bad metadata override type for key '%s', expected %s but got %s\n",
(unsigned int)"validate_override",
(_DWORD)a2 + 4,
v12,
v13);
}
}
else
{
return 0;
}
return v2;
}
|
validate_override:
PUSH RBP
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
SUB RSP,0x20
TEST RSI,RSI
JZ 0x001eaab4
MOV R14,RSI
CMP dword ptr [RSI],EDI
JNZ 0x001eaabb
CALL 0x001a2060
LEA R15,[R14 + 0x4]
LEA RSI,[0x245fab]
LEA RDX,[0x245fd5]
PUSH 0x2
POP RDI
MOV RCX,RAX
MOV R8,R15
XOR EAX,EAX
CALL 0x001a16d0
MOV EAX,dword ptr [R14]
CMP RAX,0x3
JA 0x001eab64
LEA RCX,[0x245420]
MOVSXD RAX,dword ptr [RCX + RAX*0x4]
ADD RAX,RCX
switchD:
JMP RAX
caseD_0:
MOV RDX,qword ptr [R14 + 0x88]
LEA RSI,[0x245fe7]
JMP 0x001eab15
LAB_001eaab4:
XOR EBX,EBX
JMP 0x001eab55
LAB_001eaabb:
LEA R15,[R14 + 0x4]
CALL 0x001a2060
MOV R12,RAX
MOV EDI,dword ptr [R14]
CALL 0x001a2060
LEA RSI,[0x24602f]
LEA RDX,[0x245fd5]
XOR EBX,EBX
PUSH 0x3
POP RDI
MOV RCX,R15
MOV R8,R12
MOV R9,RAX
XOR EAX,EAX
CALL 0x001a16d0
JMP 0x001eab55
caseD_2:
LEA RAX,[0x24288d]
LEA RDX,[0x243bda]
CMP byte ptr [R14 + 0x88],0x0
CMOVNZ RDX,RAX
LEA RSI,[0x24356c]
LAB_001eab15:
PUSH 0x2
POP RDI
JMP 0x001eab2e
caseD_3:
ADD R14,0x88
LEA RSI,[0x24356c]
PUSH 0x2
POP RDI
MOV RDX,R14
LAB_001eab2e:
XOR EAX,EAX
CALL 0x001a16d0
MOV BL,0x1
JMP 0x001eab55
caseD_1:
MOVSD XMM0,qword ptr [R14 + 0x88]
LEA RSI,[0x245fec]
PUSH 0x2
POP RDI
MOV BL,0x1
MOV AL,0x1
CALL 0x001a16d0
LAB_001eab55:
MOV EAX,EBX
ADD RSP,0x20
POP RBX
POP R12
POP R14
POP R15
POP RBP
RET
default:
PUSH 0x10
POP RDI
CALL 0x0019dfd0
MOV RBX,RAX
MOV EDI,dword ptr [R14]
CALL 0x001a2060
LAB_001eab77:
LEA RSI,[0x245ff2]
MOV RDI,RSP
MOV RDX,RAX
MOV RCX,R15
XOR EAX,EAX
CALL 0x001a7ad0
MOV BPL,0x1
LAB_001eab91:
MOV RSI,RSP
MOV RDI,RBX
CALL 0x001a6270
XOR EBP,EBP
MOV RSI,qword ptr [0x00299ff0]
MOV RDX,qword ptr [0x00299cf0]
MOV RDI,RBX
CALL 0x001a6f50
|
/* GGUFMeta::GKV<std::__cxx11::string >::validate_override(llama_model_kv_override_type,
llama_model_kv_override const*) */
ulong GGUFMeta::GKV<std::__cxx11::string>::validate_override(int param_1,int *param_2)
{
int8 uVar1;
int8 uVar2;
runtime_error *this;
char *pcVar3;
int8 unaff_RBX;
int7 uVar5;
ulong uVar4;
char *pcVar6;
string asStack_48 [32];
if (param_2 == (int *)0x0) {
uVar4 = 0;
}
else if (*param_2 == param_1) {
uVar1 = override_type_to_str();
llama_log_internal(2,"%s: Using metadata override (%5s) \'%s\' = ","validate_override",uVar1,
param_2 + 1);
uVar5 = (int7)((ulong)unaff_RBX >> 8);
switch(*param_2) {
case 0:
pcVar3 = *(char **)(param_2 + 0x22);
pcVar6 = "%ld\n";
break;
case 1:
uVar4 = CONCAT71(uVar5,1);
llama_log_internal(*(int8 *)(param_2 + 0x22),2,"%.6f\n");
goto LAB_001eab55;
case 2:
pcVar3 = "false";
if ((char)param_2[0x22] != '\0') {
pcVar3 = "true";
}
pcVar6 = "%s\n";
break;
case 3:
pcVar3 = (char *)(param_2 + 0x22);
pcVar6 = "%s\n";
break;
default:
this = (runtime_error *)__cxa_allocate_exception(0x10);
uVar1 = override_type_to_str(*param_2);
/* try { // try from 001eab77 to 001eab8d has its CatchHandler @ 001eabc6 */
format_abi_cxx11_((char *)asStack_48,
"Unsupported attempt to override %s type for metadata key %s\n",uVar1,
param_2 + 1);
/* try { // try from 001eab91 to 001eabb3 has its CatchHandler @ 001eabb4 */
std::runtime_error::runtime_error(this,asStack_48);
/* WARNING: Subroutine does not return */
__cxa_throw(this,PTR_typeinfo_00299ff0,PTR__runtime_error_00299cf0);
}
llama_log_internal(2,pcVar6,pcVar3);
uVar4 = CONCAT71(uVar5,1);
}
else {
uVar1 = override_type_to_str();
uVar2 = override_type_to_str(*param_2);
uVar4 = 0;
llama_log_internal(3,
"%s: Warning: Bad metadata override type for key \'%s\', expected %s but got %s\n"
,"validate_override",param_2 + 1,uVar1,uVar2);
}
LAB_001eab55:
return uVar4 & 0xffffffff;
}
|
|
64,328 |
GGUFMeta::GKV<bool>::validate_override(llama_model_kv_override_type, llama_model_kv_override const*)
|
monkey531[P]llama/src/llama-model-loader.cpp
|
static bool validate_override(const llama_model_kv_override_type expected_type, const struct llama_model_kv_override * ovrd) {
if (!ovrd) { return false; }
if (ovrd->tag == expected_type) {
LLAMA_LOG_INFO("%s: Using metadata override (%5s) '%s' = ",
__func__, override_type_to_str(ovrd->tag), ovrd->key);
switch (ovrd->tag) {
case LLAMA_KV_OVERRIDE_TYPE_BOOL: {
LLAMA_LOG_INFO("%s\n", ovrd->val_bool ? "true" : "false");
} break;
case LLAMA_KV_OVERRIDE_TYPE_INT: {
LLAMA_LOG_INFO("%" PRId64 "\n", ovrd->val_i64);
} break;
case LLAMA_KV_OVERRIDE_TYPE_FLOAT: {
LLAMA_LOG_INFO("%.6f\n", ovrd->val_f64);
} break;
case LLAMA_KV_OVERRIDE_TYPE_STR: {
LLAMA_LOG_INFO("%s\n", ovrd->val_str);
} break;
default:
// Shouldn't be possible to end up here, but just in case...
throw std::runtime_error(
format("Unsupported attempt to override %s type for metadata key %s\n",
override_type_to_str(ovrd->tag), ovrd->key));
}
return true;
}
LLAMA_LOG_WARN("%s: Warning: Bad metadata override type for key '%s', expected %s but got %s\n",
__func__, ovrd->key, override_type_to_str(expected_type), override_type_to_str(ovrd->tag));
return false;
}
|
O3
|
cpp
|
GGUFMeta::GKV<bool>::validate_override(llama_model_kv_override_type, llama_model_kv_override const*):
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x28, %rsp
testq %rsi, %rsi
je 0xb381c
movq %rsi, %rbx
movl (%rsi), %eax
cmpl %edi, %eax
jne 0xb3823
cmpl $0x3, %edi
ja 0xb3870
movl %edi, %eax
leaq 0xa8692(%rip), %rcx # 0x15bea8
movq (%rcx,%rax,8), %rcx
jmp 0xb3877
xorl %ebp, %ebp
jmp 0xb392b
leaq 0x5fb9f(%rip), %r9 # 0x1133c9
leaq 0xa8677(%rip), %rcx # 0x15bea8
movq %r9, %r8
cmpl $0x3, %edi
ja 0xb383f
movl %edi, %edx
movq (%rcx,%rdx,8), %r8
addq $0x4, %rbx
cmpl $0x3, %eax
ja 0xb384c
movq (%rcx,%rax,8), %r9
leaq 0x642ac(%rip), %rsi # 0x117aff
leaq 0x6424b(%rip), %rdx # 0x117aa5
xorl %ebp, %ebp
movl $0x3, %edi
movq %rbx, %rcx
xorl %eax, %eax
callq 0x67d20
jmp 0xb392b
leaq 0x5fb52(%rip), %rcx # 0x1133c9
leaq 0x4(%rbx), %r15
leaq 0x641f9(%rip), %rsi # 0x117a7b
leaq 0x6421c(%rip), %rdx # 0x117aa5
movl $0x2, %edi
movq %r15, %r8
xorl %eax, %eax
callq 0x67d20
movl (%rbx), %eax
cmpq $0x3, %rax
ja 0xb3938
leaq 0x63615(%rip), %rcx # 0x116ec0
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq 0x88(%rbx), %rdx
leaq 0x641f5(%rip), %rsi # 0x117ab7
jmp 0xb38e4
leaq 0x60fda(%rip), %rax # 0x1148a5
leaq 0x62328(%rip), %rdx # 0x115bfa
cmpb $0x0, 0x88(%rbx)
cmovneq %rax, %rdx
leaq 0x61ca8(%rip), %rsi # 0x11558c
movl $0x2, %edi
jmp 0xb3901
addq $0x88, %rbx
leaq 0x61c93(%rip), %rsi # 0x11558c
movl $0x2, %edi
movq %rbx, %rdx
xorl %eax, %eax
callq 0x67d20
movb $0x1, %bpl
jmp 0xb392b
movsd 0x88(%rbx), %xmm0
leaq 0x641a0(%rip), %rsi # 0x117abc
movb $0x1, %bpl
movl $0x2, %edi
movb $0x1, %al
callq 0x67d20
movl %ebp, %eax
addq $0x28, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movl $0x10, %edi
callq 0x65cb0
movq %rax, %r14
movl (%rbx), %eax
cmpq $0x3, %rax
ja 0xb395a
leaq 0xa8554(%rip), %rcx # 0x15bea8
movq (%rcx,%rax,8), %rdx
jmp 0xb3961
leaq 0x5fa68(%rip), %rdx # 0x1133c9
leaq 0x6415a(%rip), %rsi # 0x117ac2
leaq 0x8(%rsp), %rdi
movq %r15, %rcx
xorl %eax, %eax
callq 0x6b940
movb $0x1, %bpl
leaq 0x8(%rsp), %rsi
movq %r14, %rdi
callq 0x6aa30
xorl %ebp, %ebp
movq 0xa9660(%rip), %rsi # 0x15cff0
movq 0xa9359(%rip), %rdx # 0x15ccf0
movq %r14, %rdi
callq 0x6b270
movq %rax, %rbx
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xb39bd
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x681a0
testb %bpl, %bpl
jne 0xb39c7
jmp 0xb39cf
movq %rax, %rbx
movq %r14, %rdi
callq 0x66d40
movq %rbx, %rdi
callq 0x6b5d0
nop
|
_ZN8GGUFMeta3GKVIbE17validate_overrideE28llama_model_kv_override_typePK23llama_model_kv_override:
push rbp
push r15
push r14
push rbx
sub rsp, 28h
test rsi, rsi
jz short loc_B381C
mov rbx, rsi
mov eax, [rsi]
cmp eax, edi
jnz short loc_B3823
cmp edi, 3
ja short loc_B3870
mov eax, edi
lea rcx, off_15BEA8; "int"
mov rcx, [rcx+rax*8]
jmp short loc_B3877
loc_B381C:
xor ebp, ebp
jmp loc_B392B
loc_B3823:
lea r9, aUnknown; "unknown"
lea rcx, off_15BEA8; "int"
mov r8, r9
cmp edi, 3
ja short loc_B383F
mov edx, edi
mov r8, [rcx+rdx*8]
loc_B383F:
add rbx, 4
cmp eax, 3
ja short loc_B384C
mov r9, [rcx+rax*8]
loc_B384C:
lea rsi, aSWarningBadMet; "%s: Warning: Bad metadata override type"...
lea rdx, aValidateOverri; "validate_override"
xor ebp, ebp
mov edi, 3
mov rcx, rbx
xor eax, eax
call __Z18llama_log_internal14ggml_log_levelPKcz; llama_log_internal(ggml_log_level,char const*,...)
jmp loc_B392B
loc_B3870:
lea rcx, aUnknown; "unknown"
loc_B3877:
lea r15, [rbx+4]
lea rsi, aSUsingMetadata; "%s: Using metadata override (%5s) '%s' "...
lea rdx, aValidateOverri; "validate_override"
mov edi, 2
mov r8, r15
xor eax, eax
call __Z18llama_log_internal14ggml_log_levelPKcz; llama_log_internal(ggml_log_level,char const*,...)
mov eax, [rbx]
cmp rax, 3; switch 4 cases
ja def_B38B2; jumptable 00000000000B38B2 default case
lea rcx, jpt_B38B2
movsxd rax, ds:(jpt_B38B2 - 116EC0h)[rcx+rax*4]
add rax, rcx
jmp rax; switch jump
loc_B38B4:
mov rdx, [rbx+88h]; jumptable 00000000000B38B2 case 0
lea rsi, aLd; "%ld\n"
jmp short loc_B38E4
loc_B38C4:
lea rax, aBatchLogitsDTr+14h; jumptable 00000000000B38B2 case 2
lea rdx, aFalse; "false"
cmp byte ptr [rbx+88h], 0
cmovnz rdx, rax
lea rsi, aSErrorParsingG+1Fh; "%s\n"
loc_B38E4:
mov edi, 2
jmp short loc_B3901
loc_B38EB:
add rbx, 88h; jumptable 00000000000B38B2 case 3
lea rsi, aSErrorParsingG+1Fh; "%s\n"
mov edi, 2
mov rdx, rbx
loc_B3901:
xor eax, eax
call __Z18llama_log_internal14ggml_log_levelPKcz; llama_log_internal(ggml_log_level,char const*,...)
mov bpl, 1
jmp short loc_B392B
loc_B390D:
movsd xmm0, qword ptr [rbx+88h]; jumptable 00000000000B38B2 case 1
lea rsi, a6f; "%.6f\n"
mov bpl, 1
mov edi, 2
mov al, 1
call __Z18llama_log_internal14ggml_log_levelPKcz; llama_log_internal(ggml_log_level,char const*,...)
loc_B392B:
mov eax, ebp
add rsp, 28h
pop rbx
pop r14
pop r15
pop rbp
retn
def_B38B2:
mov edi, 10h; jumptable 00000000000B38B2 default case
call ___cxa_allocate_exception
mov r14, rax
mov eax, [rbx]
cmp rax, 3
ja short loc_B395A
lea rcx, off_15BEA8; "int"
mov rdx, [rcx+rax*8]
jmp short loc_B3961
loc_B395A:
lea rdx, aUnknown; "unknown"
loc_B3961:
lea rsi, aUnsupportedAtt; "Unsupported attempt to override %s type"...
lea rdi, [rsp+48h+var_40]
mov rcx, r15
xor eax, eax
call __Z6formatB5cxx11PKcz; format(char const*,...)
mov bpl, 1
lea rsi, [rsp+48h+var_40]
mov rdi, r14
call __ZNSt13runtime_errorC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; std::runtime_error::runtime_error(std::string const&)
xor ebp, ebp
mov rsi, cs:lptinfo; lptinfo
mov rdx, cs:_ZNSt13runtime_errorD1Ev_ptr; void (*)(void *)
mov rdi, r14; void *
call ___cxa_throw
mov rbx, rax
lea rax, [rsp+48h+var_30]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_B39BD
mov rsi, [rsp+48h+var_30]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_B39BD:
test bpl, bpl
jnz short loc_B39C7
jmp short loc_B39CF
mov rbx, rax
loc_B39C7:
mov rdi, r14; void *
call ___cxa_free_exception
loc_B39CF:
mov rdi, rbx
call __Unwind_Resume
|
long long GGUFMeta::GKV<bool>::validate_override(
unsigned int a1,
unsigned int *a2,
long long a3,
long long a4,
long long a5,
int a6)
{
unsigned int v6; // ebp
int v7; // ebx
long long v8; // rax
const char *v9; // rcx
const char *v10; // r9
const char *v11; // r8
int v12; // edx
int v13; // ecx
int v14; // r8d
int v15; // r9d
char *v16; // rdx
char *v17; // rsi
int v19; // r8d
int v20; // r9d
void *exception; // r14
unsigned long long v22; // rax
const char *v23; // rdx
_BYTE v24[16]; // [rsp+8h] [rbp-40h] BYREF
if ( a2 )
{
v7 = (int)a2;
v8 = *a2;
if ( (_DWORD)v8 == a1 )
{
if ( a1 > 3 )
v9 = "unknown";
else
v9 = (const char *)*(&off_15BEA8 + a1);
llama_log_internal(
2,
(unsigned int)"%s: Using metadata override (%5s) '%s' = ",
(unsigned int)"validate_override",
(_DWORD)v9,
(_DWORD)a2 + 4,
a6);
switch ( *a2 )
{
case 0u:
v16 = (char *)*((_QWORD *)a2 + 17);
v17 = "%ld\n";
goto LABEL_19;
case 1u:
LOBYTE(v6) = 1;
llama_log_internal(2, (unsigned int)"%.6f\n", v12, v13, v14, v15);
return v6;
case 2u:
v16 = "false";
if ( *((_BYTE *)a2 + 136) )
v16 = "true";
v17 = "%s\n";
goto LABEL_19;
case 3u:
v17 = "%s\n";
LODWORD(v16) = v7 + 136;
LABEL_19:
llama_log_internal(2, (_DWORD)v17, (_DWORD)v16, v13, v14, v15);
LOBYTE(v6) = 1;
break;
default:
exception = __cxa_allocate_exception(0x10uLL);
v22 = *a2;
if ( v22 > 3 )
v23 = "unknown";
else
v23 = (const char *)*(&off_15BEA8 + v22);
format[abi:cxx11](
(unsigned int)v24,
(unsigned int)"Unsupported attempt to override %s type for metadata key %s\n",
(_DWORD)v23,
(_DWORD)a2 + 4,
v19,
v20);
std::runtime_error::runtime_error(exception, v24);
__cxa_throw(
exception,
(struct type_info *)&`typeinfo for'std::runtime_error,
(void (*)(void *))&std::runtime_error::~runtime_error);
}
}
else
{
v10 = "unknown";
v11 = "unknown";
if ( a1 <= 3 )
v11 = (const char *)*(&off_15BEA8 + a1);
if ( (unsigned int)v8 <= 3 )
v10 = (const char *)*(&off_15BEA8 + v8);
v6 = 0;
llama_log_internal(
3,
(unsigned int)"%s: Warning: Bad metadata override type for key '%s', expected %s but got %s\n",
(unsigned int)"validate_override",
(_DWORD)a2 + 4,
(_DWORD)v11,
(_DWORD)v10);
}
}
else
{
return 0;
}
return v6;
}
|
validate_override:
PUSH RBP
PUSH R15
PUSH R14
PUSH RBX
SUB RSP,0x28
TEST RSI,RSI
JZ 0x001b381c
MOV RBX,RSI
MOV EAX,dword ptr [RSI]
CMP EAX,EDI
JNZ 0x001b3823
CMP EDI,0x3
JA 0x001b3870
MOV EAX,EDI
LEA RCX,[0x25bea8]
MOV RCX,qword ptr [RCX + RAX*0x8]
JMP 0x001b3877
LAB_001b381c:
XOR EBP,EBP
JMP 0x001b392b
LAB_001b3823:
LEA R9,[0x2133c9]
LEA RCX,[0x25bea8]
MOV R8,R9
CMP EDI,0x3
JA 0x001b383f
MOV EDX,EDI
MOV R8,qword ptr [RCX + RDX*0x8]
LAB_001b383f:
ADD RBX,0x4
CMP EAX,0x3
JA 0x001b384c
MOV R9,qword ptr [RCX + RAX*0x8]
LAB_001b384c:
LEA RSI,[0x217aff]
LEA RDX,[0x217aa5]
XOR EBP,EBP
MOV EDI,0x3
MOV RCX,RBX
XOR EAX,EAX
CALL 0x00167d20
JMP 0x001b392b
LAB_001b3870:
LEA RCX,[0x2133c9]
LAB_001b3877:
LEA R15,[RBX + 0x4]
LEA RSI,[0x217a7b]
LEA RDX,[0x217aa5]
MOV EDI,0x2
MOV R8,R15
XOR EAX,EAX
CALL 0x00167d20
MOV EAX,dword ptr [RBX]
CMP RAX,0x3
JA 0x001b3938
LEA RCX,[0x216ec0]
MOVSXD RAX,dword ptr [RCX + RAX*0x4]
ADD RAX,RCX
switchD:
JMP RAX
caseD_0:
MOV RDX,qword ptr [RBX + 0x88]
LEA RSI,[0x217ab7]
JMP 0x001b38e4
caseD_2:
LEA RAX,[0x2148a5]
LEA RDX,[0x215bfa]
CMP byte ptr [RBX + 0x88],0x0
CMOVNZ RDX,RAX
LEA RSI,[0x21558c]
LAB_001b38e4:
MOV EDI,0x2
JMP 0x001b3901
caseD_3:
ADD RBX,0x88
LEA RSI,[0x21558c]
MOV EDI,0x2
MOV RDX,RBX
LAB_001b3901:
XOR EAX,EAX
CALL 0x00167d20
MOV BPL,0x1
JMP 0x001b392b
caseD_1:
MOVSD XMM0,qword ptr [RBX + 0x88]
LEA RSI,[0x217abc]
MOV BPL,0x1
MOV EDI,0x2
MOV AL,0x1
CALL 0x00167d20
LAB_001b392b:
MOV EAX,EBP
ADD RSP,0x28
POP RBX
POP R14
POP R15
POP RBP
RET
default:
MOV EDI,0x10
CALL 0x00165cb0
MOV R14,RAX
MOV EAX,dword ptr [RBX]
CMP RAX,0x3
JA 0x001b395a
LEA RCX,[0x25bea8]
MOV RDX,qword ptr [RCX + RAX*0x8]
JMP 0x001b3961
LAB_001b395a:
LEA RDX,[0x2133c9]
LAB_001b3961:
LEA RSI,[0x217ac2]
LEA RDI,[RSP + 0x8]
MOV RCX,R15
XOR EAX,EAX
CALL 0x0016b940
MOV BPL,0x1
LAB_001b397a:
LEA RSI,[RSP + 0x8]
MOV RDI,R14
CALL 0x0016aa30
XOR EBP,EBP
MOV RSI,qword ptr [0x0025cff0]
MOV RDX,qword ptr [0x0025ccf0]
MOV RDI,R14
CALL 0x0016b270
|
/* GGUFMeta::GKV<bool>::validate_override(llama_model_kv_override_type, llama_model_kv_override
const*) */
ulong GGUFMeta::GKV<bool>::validate_override(uint param_1,uint *param_2)
{
uint uVar1;
runtime_error *this;
char *pcVar2;
int8 unaff_RBP;
int7 uVar4;
ulong uVar3;
char *pcVar5;
string local_40 [32];
if (param_2 == (uint *)0x0) {
uVar3 = 0;
}
else {
uVar1 = *param_2;
if (uVar1 == param_1) {
if (param_1 < 4) {
pcVar2 = *(char **)(&DAT_0025bea8 + (ulong)param_1 * 8);
}
else {
pcVar2 = "unknown";
}
llama_log_internal(2,"%s: Using metadata override (%5s) \'%s\' = ","validate_override",pcVar2,
param_2 + 1);
uVar4 = (int7)((ulong)unaff_RBP >> 8);
switch(*param_2) {
case 0:
pcVar2 = *(char **)(param_2 + 0x22);
pcVar5 = "%ld\n";
break;
case 1:
uVar3 = CONCAT71(uVar4,1);
llama_log_internal(*(int8 *)(param_2 + 0x22),2,"%.6f\n");
goto LAB_001b392b;
case 2:
pcVar2 = "false";
if ((char)param_2[0x22] != '\0') {
pcVar2 = "true";
}
pcVar5 = "%s\n";
break;
case 3:
pcVar2 = (char *)(param_2 + 0x22);
pcVar5 = "%s\n";
break;
default:
this = (runtime_error *)__cxa_allocate_exception(0x10);
if ((ulong)*param_2 < 4) {
pcVar2 = *(char **)(&DAT_0025bea8 + (ulong)*param_2 * 8);
}
else {
pcVar2 = "unknown";
}
/* try { // try from 001b3961 to 001b3976 has its CatchHandler @ 001b39c4 */
format_abi_cxx11_((char *)local_40,
"Unsupported attempt to override %s type for metadata key %s\n",pcVar2,
param_2 + 1);
/* try { // try from 001b397a to 001b399e has its CatchHandler @ 001b399f */
std::runtime_error::runtime_error(this,local_40);
/* WARNING: Subroutine does not return */
__cxa_throw(this,PTR_typeinfo_0025cff0,PTR__runtime_error_0025ccf0);
}
llama_log_internal(2,pcVar5,pcVar2);
uVar3 = CONCAT71(uVar4,1);
}
else {
pcVar5 = "unknown";
pcVar2 = "unknown";
if (param_1 < 4) {
pcVar2 = *(char **)(&DAT_0025bea8 + (ulong)param_1 * 8);
}
if (uVar1 < 4) {
pcVar5 = *(char **)(&DAT_0025bea8 + (ulong)uVar1 * 8);
}
uVar3 = 0;
llama_log_internal(3,
"%s: Warning: Bad metadata override type for key \'%s\', expected %s but got %s\n"
,"validate_override",param_2 + 1,pcVar2,pcVar5);
}
}
LAB_001b392b:
return uVar3 & 0xffffffff;
}
|
|
64,329 |
testing::internal::OsStackTraceGetter::UponLeavingGTest()
|
AlayaLite/build_O0/_deps/googletest-src/googletest/src/gtest.cc
|
GTEST_LOCK_EXCLUDED_(mutex_) {
#ifdef GTEST_HAS_ABSL
void* caller_frame = nullptr;
if (absl::GetStackTrace(&caller_frame, 1, 3) <= 0) {
caller_frame = nullptr;
}
MutexLock lock(&mutex_);
caller_frame_ = caller_frame;
#endif // GTEST_HAS_ABSL
}
|
O0
|
cpp
|
testing::internal::OsStackTraceGetter::UponLeavingGTest():
movq %rdi, -0x8(%rsp)
retq
nopw %cs:(%rax,%rax)
|
_ZN7testing8internal18OsStackTraceGetter16UponLeavingGTestEv:
mov [rsp+var_8], rdi
retn
|
void testing::internal::OsStackTraceGetter::UponLeavingGTest(testing::internal::OsStackTraceGetter *this)
{
;
}
|
UponLeavingGTest:
MOV qword ptr [RSP + -0x8],RDI
RET
|
/* testing::internal::OsStackTraceGetter::UponLeavingGTest() */
void testing::internal::OsStackTraceGetter::UponLeavingGTest(void)
{
return;
}
|
|
64,330 |
lunasvg::SVGLineElement::SVGLineElement(lunasvg::Document*)
|
dmazzella[P]pylunasvg/lunasvg/source/svggeometryelement.cpp
|
SVGLineElement::SVGLineElement(Document* document)
: SVGGeometryElement(document, ElementID::Line)
, m_x1(PropertyID::X1, LengthDirection::Horizontal, LengthNegativeMode::Allow)
, m_y1(PropertyID::Y1, LengthDirection::Vertical, LengthNegativeMode::Allow)
, m_x2(PropertyID::X2, LengthDirection::Horizontal, LengthNegativeMode::Allow)
, m_y2(PropertyID::Y2, LengthDirection::Vertical, LengthNegativeMode::Allow)
{
addProperty(m_x1);
addProperty(m_y1);
addProperty(m_x2);
addProperty(m_y2);
}
|
O0
|
cpp
|
lunasvg::SVGLineElement::SVGLineElement(lunasvg::Document*):
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x30(%rbp)
movq -0x10(%rbp), %rsi
movl $0x8, %edx
callq 0x2d000
movq -0x30(%rbp), %rdi
leaq 0x94687(%rip), %rax # 0xc2488
movq %rax, (%rdi)
addq $0x118, %rdi # imm = 0x118
movq %rdi, -0x28(%rbp)
movl $0x4c, %esi
xorps %xmm0, %xmm0
xorl %r8d, %r8d
movl %r8d, %edx
movl %r8d, %ecx
callq 0x20d00
jmp 0x2de27
movq -0x30(%rbp), %rdi
addq $0x130, %rdi # imm = 0x130
movq %rdi, -0x38(%rbp)
movl $0x4f, %esi
movl $0x1, %edx
xorps %xmm0, %xmm0
xorl %r8d, %r8d
movl %r8d, %ecx
callq 0x20d00
jmp 0x2de50
movq -0x30(%rbp), %rdi
addq $0x148, %rdi # imm = 0x148
movq %rdi, -0x40(%rbp)
movl $0x4d, %esi
xorps %xmm0, %xmm0
xorl %r8d, %r8d
movl %r8d, %edx
movl %r8d, %ecx
callq 0x20d00
jmp 0x2de77
movq -0x30(%rbp), %rdi
addq $0x160, %rdi # imm = 0x160
movq %rdi, -0x48(%rbp)
movl $0x50, %esi
movl $0x1, %edx
xorps %xmm0, %xmm0
xorl %r8d, %r8d
movl %r8d, %ecx
callq 0x20d00
jmp 0x2dea0
movq -0x30(%rbp), %rdi
movq %rdi, %rsi
addq $0x118, %rsi # imm = 0x118
callq 0x19a70
jmp 0x2deb5
movq -0x30(%rbp), %rdi
movq %rdi, %rsi
addq $0x130, %rsi # imm = 0x130
callq 0x19a70
jmp 0x2deca
movq -0x30(%rbp), %rdi
movq %rdi, %rsi
addq $0x148, %rsi # imm = 0x148
callq 0x19a70
jmp 0x2dedf
movq -0x30(%rbp), %rdi
movq %rdi, %rsi
addq $0x160, %rsi # imm = 0x160
callq 0x19a70
jmp 0x2def4
addq $0x50, %rsp
popq %rbp
retq
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x18(%rbp)
movl %eax, -0x1c(%rbp)
jmp 0x2df62
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x18(%rbp)
movl %eax, -0x1c(%rbp)
jmp 0x2df59
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x18(%rbp)
movl %eax, -0x1c(%rbp)
jmp 0x2df50
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x18(%rbp)
movl %eax, -0x1c(%rbp)
jmp 0x2df47
movq -0x48(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x18(%rbp)
movl %eax, -0x1c(%rbp)
callq 0xfb10
movq -0x40(%rbp), %rdi
callq 0xfb10
movq -0x38(%rbp), %rdi
callq 0xfb10
movq -0x28(%rbp), %rdi
callq 0xfb10
movq -0x30(%rbp), %rdi
callq 0x24260
movq -0x18(%rbp), %rdi
callq 0xb6c0
nopw %cs:(%rax,%rax)
|
_ZN7lunasvg14SVGLineElementC2EPNS_8DocumentE:
push rbp
mov rbp, rsp
sub rsp, 50h
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov rdi, [rbp+var_8]
mov [rbp+var_30], rdi
mov rsi, [rbp+var_10]
mov edx, 8
call _ZN7lunasvg18SVGGeometryElementC2EPNS_8DocumentENS_9ElementIDE; lunasvg::SVGGeometryElement::SVGGeometryElement(lunasvg::Document *,lunasvg::ElementID)
mov rdi, [rbp+var_30]
lea rax, off_C2488
mov [rdi], rax
add rdi, 118h
mov [rbp+var_28], rdi
mov esi, 4Ch ; 'L'
xorps xmm0, xmm0
xor r8d, r8d
mov edx, r8d
mov ecx, r8d
call _ZN7lunasvg9SVGLengthC2ENS_10PropertyIDENS_15LengthDirectionENS_18LengthNegativeModeEfNS_11LengthUnitsE; lunasvg::SVGLength::SVGLength(lunasvg::PropertyID,lunasvg::LengthDirection,lunasvg::LengthNegativeMode,float,lunasvg::LengthUnits)
jmp short $+2
loc_2DE27:
mov rdi, [rbp+var_30]
add rdi, 130h
mov [rbp+var_38], rdi
mov esi, 4Fh ; 'O'
mov edx, 1
xorps xmm0, xmm0
xor r8d, r8d
mov ecx, r8d
call _ZN7lunasvg9SVGLengthC2ENS_10PropertyIDENS_15LengthDirectionENS_18LengthNegativeModeEfNS_11LengthUnitsE; lunasvg::SVGLength::SVGLength(lunasvg::PropertyID,lunasvg::LengthDirection,lunasvg::LengthNegativeMode,float,lunasvg::LengthUnits)
jmp short $+2
loc_2DE50:
mov rdi, [rbp+var_30]
add rdi, 148h
mov [rbp+var_40], rdi
mov esi, 4Dh ; 'M'
xorps xmm0, xmm0
xor r8d, r8d
mov edx, r8d
mov ecx, r8d
call _ZN7lunasvg9SVGLengthC2ENS_10PropertyIDENS_15LengthDirectionENS_18LengthNegativeModeEfNS_11LengthUnitsE; lunasvg::SVGLength::SVGLength(lunasvg::PropertyID,lunasvg::LengthDirection,lunasvg::LengthNegativeMode,float,lunasvg::LengthUnits)
jmp short $+2
loc_2DE77:
mov rdi, [rbp+var_30]
add rdi, 160h
mov [rbp+var_48], rdi
mov esi, 50h ; 'P'
mov edx, 1
xorps xmm0, xmm0
xor r8d, r8d
mov ecx, r8d
call _ZN7lunasvg9SVGLengthC2ENS_10PropertyIDENS_15LengthDirectionENS_18LengthNegativeModeEfNS_11LengthUnitsE; lunasvg::SVGLength::SVGLength(lunasvg::PropertyID,lunasvg::LengthDirection,lunasvg::LengthNegativeMode,float,lunasvg::LengthUnits)
jmp short $+2
loc_2DEA0:
mov rdi, [rbp+var_30]; this
mov rsi, rdi
add rsi, 118h; lunasvg::SVGProperty *
call _ZN7lunasvg10SVGElement11addPropertyERNS_11SVGPropertyE; lunasvg::SVGElement::addProperty(lunasvg::SVGProperty &)
jmp short $+2
loc_2DEB5:
mov rdi, [rbp+var_30]; this
mov rsi, rdi
add rsi, 130h; lunasvg::SVGProperty *
call _ZN7lunasvg10SVGElement11addPropertyERNS_11SVGPropertyE; lunasvg::SVGElement::addProperty(lunasvg::SVGProperty &)
jmp short $+2
loc_2DECA:
mov rdi, [rbp+var_30]; this
mov rsi, rdi
add rsi, 148h; lunasvg::SVGProperty *
call _ZN7lunasvg10SVGElement11addPropertyERNS_11SVGPropertyE; lunasvg::SVGElement::addProperty(lunasvg::SVGProperty &)
jmp short $+2
loc_2DEDF:
mov rdi, [rbp+var_30]; this
mov rsi, rdi
add rsi, 160h; lunasvg::SVGProperty *
call _ZN7lunasvg10SVGElement11addPropertyERNS_11SVGPropertyE; lunasvg::SVGElement::addProperty(lunasvg::SVGProperty &)
jmp short $+2
loc_2DEF4:
add rsp, 50h
pop rbp
retn
mov rcx, rax
mov eax, edx
mov [rbp+var_18], rcx
mov [rbp+var_1C], eax
jmp short loc_2DF62
mov rcx, rax
mov eax, edx
mov [rbp+var_18], rcx
mov [rbp+var_1C], eax
jmp short loc_2DF59
mov rcx, rax
mov eax, edx
mov [rbp+var_18], rcx
mov [rbp+var_1C], eax
jmp short loc_2DF50
mov rcx, rax
mov eax, edx
mov [rbp+var_18], rcx
mov [rbp+var_1C], eax
jmp short loc_2DF47
mov rdi, [rbp+var_48]; this
mov rcx, rax
mov eax, edx
mov [rbp+var_18], rcx
mov [rbp+var_1C], eax
call _ZN7lunasvg9SVGLengthD2Ev; lunasvg::SVGLength::~SVGLength()
loc_2DF47:
mov rdi, [rbp+var_40]; this
call _ZN7lunasvg9SVGLengthD2Ev; lunasvg::SVGLength::~SVGLength()
loc_2DF50:
mov rdi, [rbp+var_38]; this
call _ZN7lunasvg9SVGLengthD2Ev; lunasvg::SVGLength::~SVGLength()
loc_2DF59:
mov rdi, [rbp+var_28]; this
call _ZN7lunasvg9SVGLengthD2Ev; lunasvg::SVGLength::~SVGLength()
loc_2DF62:
mov rdi, [rbp+var_30]; this
call _ZN7lunasvg18SVGGeometryElementD2Ev; lunasvg::SVGGeometryElement::~SVGGeometryElement()
mov rdi, [rbp+var_18]
call __Unwind_Resume
|
long long lunasvg::SVGLineElement::SVGLineElement(lunasvg::SVGLineElement *this, lunasvg::Document *a2)
{
lunasvg::SVGGeometryElement::SVGGeometryElement((long long)this, a2, 8);
*(_QWORD *)this = off_C2488;
lunasvg::SVGLength::SVGLength((long long)this + 280, 0x4Cu, 0, 0, 0, 0.0);
lunasvg::SVGLength::SVGLength((long long)this + 304, 0x4Fu, 1, 0, 0, 0.0);
lunasvg::SVGLength::SVGLength((long long)this + 328, 0x4Du, 0, 0, 0, 0.0);
lunasvg::SVGLength::SVGLength((long long)this + 352, 0x50u, 1, 0, 0, 0.0);
lunasvg::SVGElement::addProperty(this, (lunasvg::SVGLineElement *)((char *)this + 280));
lunasvg::SVGElement::addProperty(this, (lunasvg::SVGLineElement *)((char *)this + 304));
lunasvg::SVGElement::addProperty(this, (lunasvg::SVGLineElement *)((char *)this + 328));
return lunasvg::SVGElement::addProperty(this, (lunasvg::SVGLineElement *)((char *)this + 352));
}
|
SVGLineElement:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x50
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV RDI,qword ptr [RBP + -0x8]
MOV qword ptr [RBP + -0x30],RDI
MOV RSI,qword ptr [RBP + -0x10]
MOV EDX,0x8
CALL 0x0012d000
MOV RDI,qword ptr [RBP + -0x30]
LEA RAX,[0x1c2488]
MOV qword ptr [RDI],RAX
ADD RDI,0x118
MOV qword ptr [RBP + -0x28],RDI
LAB_0012de0f:
MOV ESI,0x4c
XORPS XMM0,XMM0
XOR R8D,R8D
MOV EDX,R8D
MOV ECX,R8D
CALL 0x00120d00
JMP 0x0012de27
LAB_0012de27:
MOV RDI,qword ptr [RBP + -0x30]
ADD RDI,0x130
MOV qword ptr [RBP + -0x38],RDI
LAB_0012de36:
MOV ESI,0x4f
MOV EDX,0x1
XORPS XMM0,XMM0
XOR R8D,R8D
MOV ECX,R8D
CALL 0x00120d00
JMP 0x0012de50
LAB_0012de50:
MOV RDI,qword ptr [RBP + -0x30]
ADD RDI,0x148
MOV qword ptr [RBP + -0x40],RDI
LAB_0012de5f:
MOV ESI,0x4d
XORPS XMM0,XMM0
XOR R8D,R8D
MOV EDX,R8D
MOV ECX,R8D
CALL 0x00120d00
JMP 0x0012de77
LAB_0012de77:
MOV RDI,qword ptr [RBP + -0x30]
ADD RDI,0x160
MOV qword ptr [RBP + -0x48],RDI
LAB_0012de86:
MOV ESI,0x50
MOV EDX,0x1
XORPS XMM0,XMM0
XOR R8D,R8D
MOV ECX,R8D
CALL 0x00120d00
JMP 0x0012dea0
LAB_0012dea0:
MOV RDI,qword ptr [RBP + -0x30]
MOV RSI,RDI
ADD RSI,0x118
LAB_0012deae:
CALL 0x00119a70
JMP 0x0012deb5
LAB_0012deb5:
MOV RDI,qword ptr [RBP + -0x30]
MOV RSI,RDI
ADD RSI,0x130
CALL 0x00119a70
JMP 0x0012deca
LAB_0012deca:
MOV RDI,qword ptr [RBP + -0x30]
MOV RSI,RDI
ADD RSI,0x148
CALL 0x00119a70
JMP 0x0012dedf
LAB_0012dedf:
MOV RDI,qword ptr [RBP + -0x30]
MOV RSI,RDI
ADD RSI,0x160
CALL 0x00119a70
LAB_0012def2:
JMP 0x0012def4
LAB_0012def4:
ADD RSP,0x50
POP RBP
RET
|
/* lunasvg::SVGLineElement::SVGLineElement(lunasvg::Document*) */
void __thiscall lunasvg::SVGLineElement::SVGLineElement(SVGLineElement *this,Document *param_1)
{
SVGGeometryElement::SVGGeometryElement((SVGGeometryElement *)this,param_1,8);
*(int ***)this = &PTR__SVGLineElement_001c2488;
/* try { // try from 0012de0f to 0012de24 has its CatchHandler @ 0012defa */
SVGLength::SVGLength((SVGLength *)0x0,this + 0x118,0x4c,0,0);
/* try { // try from 0012de36 to 0012de4d has its CatchHandler @ 0012df08 */
SVGLength::SVGLength((SVGLength *)0x0,this + 0x130,0x4f,1,0);
/* try { // try from 0012de5f to 0012de74 has its CatchHandler @ 0012df16 */
SVGLength::SVGLength((SVGLength *)0x0,this + 0x148,0x4d,0,0);
/* try { // try from 0012de86 to 0012de9d has its CatchHandler @ 0012df24 */
SVGLength::SVGLength((SVGLength *)0x0,this + 0x160,0x50,1,0);
/* try { // try from 0012deae to 0012def1 has its CatchHandler @ 0012df32 */
SVGElement::addProperty((SVGElement *)this,(SVGProperty *)(this + 0x118));
SVGElement::addProperty((SVGElement *)this,(SVGProperty *)(this + 0x130));
SVGElement::addProperty((SVGElement *)this,(SVGProperty *)(this + 0x148));
SVGElement::addProperty((SVGElement *)this,(SVGProperty *)(this + 0x160));
return;
}
|
|
64,331 |
lunasvg::SVGLineElement::SVGLineElement(lunasvg::Document*)
|
dmazzella[P]pylunasvg/lunasvg/source/svggeometryelement.cpp
|
SVGLineElement::SVGLineElement(Document* document)
: SVGGeometryElement(document, ElementID::Line)
, m_x1(PropertyID::X1, LengthDirection::Horizontal, LengthNegativeMode::Allow)
, m_y1(PropertyID::Y1, LengthDirection::Vertical, LengthNegativeMode::Allow)
, m_x2(PropertyID::X2, LengthDirection::Horizontal, LengthNegativeMode::Allow)
, m_y2(PropertyID::Y2, LengthDirection::Vertical, LengthNegativeMode::Allow)
{
addProperty(m_x1);
addProperty(m_y1);
addProperty(m_x2);
addProperty(m_y2);
}
|
O1
|
cpp
|
lunasvg::SVGLineElement::SVGLineElement(lunasvg::Document*):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl $0x8, %edx
callq 0x102f8
leaq 0x45251(%rip), %rax # 0x593c0
movq %rax, (%rbx)
xorps %xmm0, %xmm0
movups %xmm0, 0x98(%rbx)
xorl %eax, %eax
movq %rax, 0xa8(%rbx)
movabsq $0x408000003f800000, %rcx # imm = 0x408000003F800000
movq %rcx, 0xb0(%rbx)
movl %eax, 0xb8(%rbx)
movw $0x0, 0xbc(%rbx)
movups %xmm0, 0xc0(%rbx)
movups %xmm0, 0xd0(%rbx)
leaq 0x2efbe(%rip), %rcx # 0x43178
movl (%rcx), %ecx
movl %ecx, 0xe0(%rbx)
movl %eax, 0xe4(%rbx)
movq %rax, 0xe8(%rbx)
movl %ecx, 0xf0(%rbx)
movups %xmm0, 0xf4(%rbx)
movups %xmm0, 0x102(%rbx)
leaq 0x4527e(%rip), %rax # 0x59468
movq %rax, (%rbx)
leaq 0x118(%rbx), %r14
movq %r14, %rdi
movl $0x4c, %esi
callq 0x1f3bc
leaq 0x46c08(%rip), %rbp # 0x5ae10
addq $0x10, %rbp
movq %rbp, 0x118(%rbx)
movw $0x0, 0x121(%rbx)
movl $0x0, 0x124(%rbx)
movb $0x0, 0x128(%rbx)
leaq 0x130(%rbx), %r15
movq %r15, %rdi
movl $0x4f, %esi
callq 0x1f3bc
movq %rbp, 0x130(%rbx)
movw $0x1, 0x139(%rbx)
movl $0x0, 0x13c(%rbx)
movb $0x0, 0x140(%rbx)
leaq 0x148(%rbx), %r12
movq %r12, %rdi
movl $0x4d, %esi
callq 0x1f3bc
movq %rbp, 0x148(%rbx)
movw $0x0, 0x151(%rbx)
movl $0x0, 0x154(%rbx)
movb $0x0, 0x158(%rbx)
leaq 0x160(%rbx), %r13
movq %r13, %rdi
movl $0x50, %esi
callq 0x1f3bc
movq %rbp, 0x160(%rbx)
movw $0x1, 0x169(%rbx)
movl $0x0, 0x16c(%rbx)
movb $0x0, 0x170(%rbx)
movq %rbx, %rdi
movq %r14, %rsi
callq 0xfbfe
movq %rbx, %rdi
movq %r15, %rsi
callq 0xfbfe
movq %rbx, %rdi
movq %r12, %rsi
callq 0xfbfe
movq %rbx, %rdi
movq %r13, %rsi
callq 0xfbfe
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x1430f
jmp 0x1430f
jmp 0x1430f
jmp 0x1430f
movq %rax, %r14
movq %rbx, %rdi
callq 0x15038
movq %r14, %rdi
callq 0xa5c0
|
_ZN7lunasvg14SVGLineElementC2EPNS_8DocumentE:
push rbp
push r15
push r14
push r13
push r12
push rbx
push rax
mov rbx, rdi
mov edx, 8
call _ZN7lunasvg18SVGGraphicsElementC2EPNS_8DocumentENS_9ElementIDE; lunasvg::SVGGraphicsElement::SVGGraphicsElement(lunasvg::Document *,lunasvg::ElementID)
lea rax, off_593C0
mov [rbx], rax
xorps xmm0, xmm0
movups xmmword ptr [rbx+98h], xmm0
xor eax, eax
mov [rbx+0A8h], rax
mov rcx, 408000003F800000h
mov [rbx+0B0h], rcx
mov [rbx+0B8h], eax
mov word ptr [rbx+0BCh], 0
movups xmmword ptr [rbx+0C0h], xmm0
movups xmmword ptr [rbx+0D0h], xmm0
lea rcx, _ZN7lunasvg5Color11TransparentE; lunasvg::Color::Transparent
mov ecx, [rcx]
mov [rbx+0E0h], ecx
mov [rbx+0E4h], eax
mov [rbx+0E8h], rax
mov [rbx+0F0h], ecx
movups xmmword ptr [rbx+0F4h], xmm0
movups xmmword ptr [rbx+102h], xmm0
lea rax, off_59468
mov [rbx], rax
lea r14, [rbx+118h]
mov rdi, r14
mov esi, 4Ch ; 'L'
call _ZN7lunasvg11SVGPropertyC2ENS_10PropertyIDE; lunasvg::SVGProperty::SVGProperty(lunasvg::PropertyID)
lea rbp, _ZTVN7lunasvg9SVGLengthE; `vtable for'lunasvg::SVGLength
add rbp, 10h
mov [rbx+118h], rbp
mov word ptr [rbx+121h], 0
mov dword ptr [rbx+124h], 0
mov byte ptr [rbx+128h], 0
lea r15, [rbx+130h]
mov rdi, r15
mov esi, 4Fh ; 'O'
call _ZN7lunasvg11SVGPropertyC2ENS_10PropertyIDE; lunasvg::SVGProperty::SVGProperty(lunasvg::PropertyID)
mov [rbx+130h], rbp
mov word ptr [rbx+139h], 1
mov dword ptr [rbx+13Ch], 0
mov byte ptr [rbx+140h], 0
lea r12, [rbx+148h]
mov rdi, r12
mov esi, 4Dh ; 'M'
call _ZN7lunasvg11SVGPropertyC2ENS_10PropertyIDE; lunasvg::SVGProperty::SVGProperty(lunasvg::PropertyID)
mov [rbx+148h], rbp
mov word ptr [rbx+151h], 0
mov dword ptr [rbx+154h], 0
mov byte ptr [rbx+158h], 0
lea r13, [rbx+160h]
mov rdi, r13
mov esi, 50h ; 'P'
call _ZN7lunasvg11SVGPropertyC2ENS_10PropertyIDE; lunasvg::SVGProperty::SVGProperty(lunasvg::PropertyID)
mov [rbx+160h], rbp
mov word ptr [rbx+169h], 1
mov dword ptr [rbx+16Ch], 0
mov byte ptr [rbx+170h], 0
mov rdi, rbx; this
mov rsi, r14; lunasvg::SVGProperty *
call _ZN7lunasvg10SVGElement11addPropertyERNS_11SVGPropertyE; lunasvg::SVGElement::addProperty(lunasvg::SVGProperty &)
mov rdi, rbx; this
mov rsi, r15; lunasvg::SVGProperty *
call _ZN7lunasvg10SVGElement11addPropertyERNS_11SVGPropertyE; lunasvg::SVGElement::addProperty(lunasvg::SVGProperty &)
mov rdi, rbx; this
mov rsi, r12; lunasvg::SVGProperty *
call _ZN7lunasvg10SVGElement11addPropertyERNS_11SVGPropertyE; lunasvg::SVGElement::addProperty(lunasvg::SVGProperty &)
mov rdi, rbx; this
mov rsi, r13; lunasvg::SVGProperty *
call _ZN7lunasvg10SVGElement11addPropertyERNS_11SVGPropertyE; lunasvg::SVGElement::addProperty(lunasvg::SVGProperty &)
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
jmp short loc_1430F
jmp short loc_1430F
jmp short loc_1430F
jmp short $+2
loc_1430F:
mov r14, rax
mov rdi, rbx; this
call _ZN7lunasvg18SVGGeometryElementD2Ev; lunasvg::SVGGeometryElement::~SVGGeometryElement()
mov rdi, r14
call __Unwind_Resume
|
_QWORD * lunasvg::SVGLineElement::SVGLineElement(lunasvg::SVGLineElement *this, lunasvg::Document *a2)
{
lunasvg::SVGGraphicsElement::SVGGraphicsElement((long long)this, (long long)a2, 8);
*(_QWORD *)this = &off_593C0;
*(_OWORD *)((char *)this + 152) = 0LL;
*((_QWORD *)this + 21) = 0LL;
*((_QWORD *)this + 22) = 0x408000003F800000LL;
*((_DWORD *)this + 46) = 0;
*((_WORD *)this + 94) = 0;
*((_OWORD *)this + 12) = 0LL;
*((_OWORD *)this + 13) = 0LL;
*((_DWORD *)this + 56) = lunasvg::Color::Transparent;
*((_DWORD *)this + 57) = 0;
*((_QWORD *)this + 29) = 0LL;
*((_DWORD *)this + 60) = lunasvg::Color::Transparent;
*(_OWORD *)((char *)this + 244) = 0LL;
*(_OWORD *)((char *)this + 258) = 0LL;
*(_QWORD *)this = off_59468;
lunasvg::SVGProperty::SVGProperty((char *)this + 280, 76LL);
*((_QWORD *)this + 35) = &`vtable for'lunasvg::SVGLength + 2;
*(_WORD *)((char *)this + 289) = 0;
*((_DWORD *)this + 73) = 0;
*((_BYTE *)this + 296) = 0;
lunasvg::SVGProperty::SVGProperty((char *)this + 304, 79LL);
*((_QWORD *)this + 38) = &`vtable for'lunasvg::SVGLength + 2;
*(_WORD *)((char *)this + 313) = 1;
*((_DWORD *)this + 79) = 0;
*((_BYTE *)this + 320) = 0;
lunasvg::SVGProperty::SVGProperty((char *)this + 328, 77LL);
*((_QWORD *)this + 41) = &`vtable for'lunasvg::SVGLength + 2;
*(_WORD *)((char *)this + 337) = 0;
*((_DWORD *)this + 85) = 0;
*((_BYTE *)this + 344) = 0;
lunasvg::SVGProperty::SVGProperty((char *)this + 352, 80LL);
*((_QWORD *)this + 44) = &`vtable for'lunasvg::SVGLength + 2;
*(_WORD *)((char *)this + 361) = 1;
*((_DWORD *)this + 91) = 0;
*((_BYTE *)this + 368) = 0;
lunasvg::SVGElement::addProperty(this, (lunasvg::SVGLineElement *)((char *)this + 280));
lunasvg::SVGElement::addProperty(this, (lunasvg::SVGLineElement *)((char *)this + 304));
lunasvg::SVGElement::addProperty(this, (lunasvg::SVGLineElement *)((char *)this + 328));
return lunasvg::SVGElement::addProperty(this, (lunasvg::SVGLineElement *)((char *)this + 352));
}
|
SVGLineElement:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
PUSH RAX
MOV RBX,RDI
MOV EDX,0x8
CALL 0x001102f8
LEA RAX,[0x1593c0]
MOV qword ptr [RBX],RAX
XORPS XMM0,XMM0
MOVUPS xmmword ptr [RBX + 0x98],XMM0
XOR EAX,EAX
MOV qword ptr [RBX + 0xa8],RAX
MOV RCX,0x408000003f800000
MOV qword ptr [RBX + 0xb0],RCX
MOV dword ptr [RBX + 0xb8],EAX
MOV word ptr [RBX + 0xbc],0x0
MOVUPS xmmword ptr [RBX + 0xc0],XMM0
MOVUPS xmmword ptr [RBX + 0xd0],XMM0
LEA RCX,[0x143178]
MOV ECX,dword ptr [RCX]
MOV dword ptr [RBX + 0xe0],ECX
MOV dword ptr [RBX + 0xe4],EAX
MOV qword ptr [RBX + 0xe8],RAX
MOV dword ptr [RBX + 0xf0],ECX
MOVUPS xmmword ptr [RBX + 0xf4],XMM0
MOVUPS xmmword ptr [RBX + 0x102],XMM0
LEA RAX,[0x159468]
MOV qword ptr [RBX],RAX
LEA R14,[RBX + 0x118]
LAB_001141f4:
MOV RDI,R14
MOV ESI,0x4c
CALL 0x0011f3bc
LEA RBP,[0x15ae10]
ADD RBP,0x10
MOV qword ptr [RBX + 0x118],RBP
MOV word ptr [RBX + 0x121],0x0
MOV dword ptr [RBX + 0x124],0x0
MOV byte ptr [RBX + 0x128],0x0
LEA R15,[RBX + 0x130]
LAB_00114234:
MOV RDI,R15
MOV ESI,0x4f
CALL 0x0011f3bc
MOV qword ptr [RBX + 0x130],RBP
MOV word ptr [RBX + 0x139],0x1
MOV dword ptr [RBX + 0x13c],0x0
MOV byte ptr [RBX + 0x140],0x0
LEA R12,[RBX + 0x148]
LAB_00114269:
MOV RDI,R12
MOV ESI,0x4d
CALL 0x0011f3bc
MOV qword ptr [RBX + 0x148],RBP
MOV word ptr [RBX + 0x151],0x0
MOV dword ptr [RBX + 0x154],0x0
MOV byte ptr [RBX + 0x158],0x0
LEA R13,[RBX + 0x160]
LAB_0011429e:
MOV RDI,R13
MOV ESI,0x50
CALL 0x0011f3bc
MOV qword ptr [RBX + 0x160],RBP
MOV word ptr [RBX + 0x169],0x1
MOV dword ptr [RBX + 0x16c],0x0
MOV byte ptr [RBX + 0x170],0x0
LAB_001142cc:
MOV RDI,RBX
MOV RSI,R14
CALL 0x0010fbfe
MOV RDI,RBX
MOV RSI,R15
CALL 0x0010fbfe
MOV RDI,RBX
MOV RSI,R12
CALL 0x0010fbfe
MOV RDI,RBX
MOV RSI,R13
CALL 0x0010fbfe
LAB_001142f8:
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
/* lunasvg::SVGLineElement::SVGLineElement(lunasvg::Document*) */
void __thiscall lunasvg::SVGLineElement::SVGLineElement(SVGLineElement *this,Document *param_1)
{
int4 uVar1;
SVGGraphicsElement::SVGGraphicsElement((SVGGraphicsElement *)this,param_1,8);
*(int ***)this = &PTR__SVGGeometryElement_001593c0;
*(int8 *)(this + 0x98) = 0;
*(int8 *)(this + 0xa0) = 0;
*(int8 *)(this + 0xa8) = 0;
*(int8 *)(this + 0xb0) = 0x408000003f800000;
*(int4 *)(this + 0xb8) = 0;
*(int2 *)(this + 0xbc) = 0;
*(int8 *)(this + 0xc0) = 0;
*(int8 *)(this + 200) = 0;
*(int8 *)(this + 0xd0) = 0;
*(int8 *)(this + 0xd8) = 0;
uVar1 = Color::Transparent;
*(int4 *)(this + 0xe0) = Color::Transparent;
*(int4 *)(this + 0xe4) = 0;
*(int8 *)(this + 0xe8) = 0;
*(int4 *)(this + 0xf0) = uVar1;
*(int8 *)(this + 0xf4) = 0;
*(int8 *)(this + 0xfc) = 0;
*(int8 *)(this + 0x102) = 0;
*(int8 *)(this + 0x10a) = 0;
*(int ***)this = &PTR__SVGLineElement_00159468;
/* try { // try from 001141f4 to 00114200 has its CatchHandler @ 0011430d */
SVGProperty::SVGProperty((SVGProperty *)(this + 0x118),0x4c);
*(int ***)(this + 0x118) = &PTR__SVGProperty_0015ae20;
*(int2 *)(this + 0x121) = 0;
*(int4 *)(this + 0x124) = 0;
this[0x128] = (SVGLineElement)0x0;
/* try { // try from 00114234 to 00114240 has its CatchHandler @ 0011430b */
SVGProperty::SVGProperty((SVGProperty *)(this + 0x130),0x4f);
*(int ***)(this + 0x130) = &PTR__SVGProperty_0015ae20;
*(int2 *)(this + 0x139) = 1;
*(int4 *)(this + 0x13c) = 0;
this[0x140] = (SVGLineElement)0x0;
/* try { // try from 00114269 to 00114275 has its CatchHandler @ 00114309 */
SVGProperty::SVGProperty((SVGProperty *)(this + 0x148),0x4d);
*(int ***)(this + 0x148) = &PTR__SVGProperty_0015ae20;
*(int2 *)(this + 0x151) = 0;
*(int4 *)(this + 0x154) = 0;
this[0x158] = (SVGLineElement)0x0;
/* try { // try from 0011429e to 001142aa has its CatchHandler @ 00114307 */
SVGProperty::SVGProperty((SVGProperty *)(this + 0x160),0x50);
*(int ***)(this + 0x160) = &PTR__SVGProperty_0015ae20;
*(int2 *)(this + 0x169) = 1;
*(int4 *)(this + 0x16c) = 0;
this[0x170] = (SVGLineElement)0x0;
/* try { // try from 001142cc to 001142f7 has its CatchHandler @ 0011430f */
SVGElement::addProperty((SVGElement *)this,(SVGProperty *)(this + 0x118));
SVGElement::addProperty((SVGElement *)this,(SVGProperty *)(this + 0x130));
SVGElement::addProperty((SVGElement *)this,(SVGProperty *)(this + 0x148));
SVGElement::addProperty((SVGElement *)this,(SVGProperty *)(this + 0x160));
return;
}
|
|
64,332 |
google::protobuf::internal::GetOwnedMessageInternal(google::protobuf::Arena*, google::protobuf::MessageLite*, google::protobuf::Arena*)
|
aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/generated_message_util.cc
|
MessageLite* GetOwnedMessageInternal(Arena* message_arena,
MessageLite* submessage,
Arena* submessage_arena) {
GOOGLE_DCHECK(Arena::InternalGetOwningArena(submessage) == submessage_arena);
GOOGLE_DCHECK(message_arena != submessage_arena);
GOOGLE_DCHECK_EQ(submessage_arena, nullptr);
if (message_arena != nullptr && submessage_arena == nullptr) {
message_arena->Own(submessage);
return submessage;
} else {
MessageLite* ret = submessage->New(message_arena);
ret->CheckTypeAndMergeFrom(*submessage);
return ret;
}
}
|
O3
|
cpp
|
google::protobuf::internal::GetOwnedMessageInternal(google::protobuf::Arena*, google::protobuf::MessageLite*, google::protobuf::Arena*):
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %rsi
testq %rdi, %rdi
sete %al
testq %rdx, %rdx
setne %cl
orb %al, %cl
jne 0x9cb6d
testq %rbx, %rbx
je 0x9cb8a
leaq -0x2c843(%rip), %rdx # 0x7031d
movq %rsi, %rdi
movq %rbx, %rsi
callq 0x92b90
jmp 0x9cb8c
movq (%rbx), %rax
movq %rbx, %rdi
callq *0x18(%rax)
movq %rax, %r14
movq (%rax), %rax
movq %r14, %rdi
movq %rbx, %rsi
callq *0x38(%rax)
movq %r14, %rbx
jmp 0x9cb8c
xorl %ebx, %ebx
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
nop
|
_ZN6google8protobuf8internal23GetOwnedMessageInternalEPNS0_5ArenaEPNS0_11MessageLiteES3_:
push r14
push rbx
push rax
mov rbx, rsi
mov rsi, rdi
test rdi, rdi
setz al
test rdx, rdx
setnz cl
or cl, al
jnz short loc_9CB6D
test rbx, rbx
jz short loc_9CB8A
lea rdx, _ZN6google8protobuf8internal19arena_delete_objectINS0_11MessageLiteEEEvPv; void (*)(void *)
mov rdi, rsi; this
mov rsi, rbx; void *
call _ZN6google8protobuf8internal15ThreadSafeArena10AddCleanupEPvPFvS3_E; google::protobuf::internal::ThreadSafeArena::AddCleanup(void *,void (*)(void *))
jmp short loc_9CB8C
loc_9CB6D:
mov rax, [rbx]
mov rdi, rbx
call qword ptr [rax+18h]
mov r14, rax
mov rax, [rax]
mov rdi, r14
mov rsi, rbx
call qword ptr [rax+38h]
mov rbx, r14
jmp short loc_9CB8C
loc_9CB8A:
xor ebx, ebx
loc_9CB8C:
mov rax, rbx
add rsp, 8
pop rbx
pop r14
retn
|
google::protobuf::Arena * google::protobuf::internal::GetOwnedMessageInternal(
google::protobuf::internal *this,
google::protobuf::Arena *a2,
google::protobuf::MessageLite *a3,
google::protobuf::Arena *a4)
{
google::protobuf::Arena *v4; // rbx
long long v5; // r14
v4 = a2;
if ( this == 0LL || a3 != 0LL )
{
v5 = (*(long long ( **)(google::protobuf::Arena *, google::protobuf::internal *))(*(_QWORD *)a2 + 24LL))(
a2,
this);
(*(void ( **)(long long, google::protobuf::Arena *))(*(_QWORD *)v5 + 56LL))(v5, a2);
return (google::protobuf::Arena *)v5;
}
else if ( a2 )
{
google::protobuf::internal::ThreadSafeArena::AddCleanup(
this,
a2,
google::protobuf::internal::arena_delete_object<google::protobuf::MessageLite>);
}
else
{
return 0LL;
}
return v4;
}
|
GetOwnedMessageInternal:
PUSH R14
PUSH RBX
PUSH RAX
MOV RBX,RSI
MOV RSI,RDI
TEST RDI,RDI
SETZ AL
TEST RDX,RDX
SETNZ CL
OR CL,AL
JNZ 0x0019cb6d
TEST RBX,RBX
JZ 0x0019cb8a
LEA RDX,[0x17031d]
MOV RDI,RSI
MOV RSI,RBX
CALL 0x00192b90
JMP 0x0019cb8c
LAB_0019cb6d:
MOV RAX,qword ptr [RBX]
MOV RDI,RBX
CALL qword ptr [RAX + 0x18]
MOV R14,RAX
MOV RAX,qword ptr [RAX]
MOV RDI,R14
MOV RSI,RBX
CALL qword ptr [RAX + 0x38]
MOV RBX,R14
JMP 0x0019cb8c
LAB_0019cb8a:
XOR EBX,EBX
LAB_0019cb8c:
MOV RAX,RBX
ADD RSP,0x8
POP RBX
POP R14
RET
|
/* google::protobuf::internal::GetOwnedMessageInternal(google::protobuf::Arena*,
google::protobuf::MessageLite*, google::protobuf::Arena*) */
MessageLite *
google::protobuf::internal::GetOwnedMessageInternal
(Arena *param_1,MessageLite *param_2,Arena *param_3)
{
MessageLite *pMVar1;
if (param_3 == (Arena *)0x0 && param_1 != (Arena *)0x0) {
if (param_2 == (MessageLite *)0x0) {
pMVar1 = (MessageLite *)0x0;
}
else {
ThreadSafeArena::AddCleanup
((ThreadSafeArena *)param_1,param_2,
arena_delete_object<google::protobuf::MessageLite>);
pMVar1 = param_2;
}
}
else {
pMVar1 = (MessageLite *)(**(code **)(*(long *)param_2 + 0x18))(param_2);
(**(code **)(*(long *)pMVar1 + 0x38))(pMVar1,param_2);
}
return pMVar1;
}
|
|
64,333 |
bf_const_get
|
bluesky950520[P]quickjs/libbf.c
|
static int bf_const_get(bf_t *T, limb_t prec, bf_flags_t flags,
BFConstCache *c,
void (*func)(bf_t *res, limb_t prec), int sign)
{
limb_t ziv_extra_bits, prec1;
ziv_extra_bits = 32;
for(;;) {
prec1 = prec + ziv_extra_bits;
if (c->prec < prec1) {
if (c->val.len == 0)
bf_init(T->ctx, &c->val);
func(&c->val, prec1);
c->prec = prec1;
} else {
prec1 = c->prec;
}
bf_set(T, &c->val);
T->sign = sign;
if (!bf_can_round(T, prec, flags & BF_RND_MASK, prec1)) {
/* and more precision and retry */
ziv_extra_bits = ziv_extra_bits + (ziv_extra_bits / 2);
} else {
break;
}
}
return bf_round(T, prec, flags);
}
|
O0
|
c
|
bf_const_get:
subq $0x48, %rsp
movq %rdi, 0x40(%rsp)
movq %rsi, 0x38(%rsp)
movl %edx, 0x34(%rsp)
movq %rcx, 0x28(%rsp)
movq %r8, 0x20(%rsp)
movl %r9d, 0x1c(%rsp)
movq $0x20, 0x10(%rsp)
movq 0x38(%rsp), %rax
addq 0x10(%rsp), %rax
movq %rax, 0x8(%rsp)
movq 0x28(%rsp), %rax
movq 0x28(%rax), %rax
cmpq 0x8(%rsp), %rax
jae 0xeca28
movq 0x28(%rsp), %rax
cmpq $0x0, 0x18(%rax)
jne 0xeca07
movq 0x40(%rsp), %rax
movq (%rax), %rdi
movq 0x28(%rsp), %rsi
callq 0xe4cb0
movq 0x20(%rsp), %rax
movq 0x28(%rsp), %rdi
movq 0x8(%rsp), %rsi
callq *%rax
movq 0x8(%rsp), %rcx
movq 0x28(%rsp), %rax
movq %rcx, 0x28(%rax)
jmp 0xeca36
movq 0x28(%rsp), %rax
movq 0x28(%rax), %rax
movq %rax, 0x8(%rsp)
movq 0x40(%rsp), %rdi
movq 0x28(%rsp), %rsi
callq 0xe5000
movl 0x1c(%rsp), %ecx
movq 0x40(%rsp), %rax
movl %ecx, 0x8(%rax)
movq 0x40(%rsp), %rdi
movq 0x38(%rsp), %rsi
movl 0x34(%rsp), %edx
andl $0x7, %edx
movq 0x8(%rsp), %rcx
callq 0xe5820
cmpl $0x0, %eax
jne 0xeca88
movq 0x10(%rsp), %rax
movq 0x10(%rsp), %rcx
shrq %rcx
addq %rcx, %rax
movq %rax, 0x10(%rsp)
jmp 0xeca8a
jmp 0xeca8f
jmp 0xec9ca
movq 0x40(%rsp), %rdi
movq 0x38(%rsp), %rsi
movl 0x34(%rsp), %edx
callq 0xe5a50
addq $0x48, %rsp
retq
nopw (%rax,%rax)
|
bf_const_get:
sub rsp, 48h
mov [rsp+48h+var_8], rdi
mov [rsp+48h+var_10], rsi
mov [rsp+48h+var_14], edx
mov [rsp+48h+var_20], rcx
mov [rsp+48h+var_28], r8
mov [rsp+48h+var_2C], r9d
mov [rsp+48h+var_38], 20h ; ' '
loc_EC9CA:
mov rax, [rsp+48h+var_10]
add rax, [rsp+48h+var_38]
mov [rsp+48h+var_40], rax
mov rax, [rsp+48h+var_20]
mov rax, [rax+28h]
cmp rax, [rsp+48h+var_40]
jnb short loc_ECA28
mov rax, [rsp+48h+var_20]
cmp qword ptr [rax+18h], 0
jnz short loc_ECA07
mov rax, [rsp+48h+var_8]
mov rdi, [rax]
mov rsi, [rsp+48h+var_20]
call bf_init
loc_ECA07:
mov rax, [rsp+48h+var_28]
mov rdi, [rsp+48h+var_20]
mov rsi, [rsp+48h+var_40]
call rax
mov rcx, [rsp+48h+var_40]
mov rax, [rsp+48h+var_20]
mov [rax+28h], rcx
jmp short loc_ECA36
loc_ECA28:
mov rax, [rsp+48h+var_20]
mov rax, [rax+28h]
mov [rsp+48h+var_40], rax
loc_ECA36:
mov rdi, [rsp+48h+var_8]
mov rsi, [rsp+48h+var_20]
call bf_set
mov ecx, [rsp+48h+var_2C]
mov rax, [rsp+48h+var_8]
mov [rax+8], ecx
mov rdi, [rsp+48h+var_8]
mov rsi, [rsp+48h+var_10]
mov edx, [rsp+48h+var_14]
and edx, 7
mov rcx, [rsp+48h+var_40]
call bf_can_round
cmp eax, 0
jnz short loc_ECA88
mov rax, [rsp+48h+var_38]
mov rcx, [rsp+48h+var_38]
shr rcx, 1
add rax, rcx
mov [rsp+48h+var_38], rax
jmp short loc_ECA8A
loc_ECA88:
jmp short loc_ECA8F
loc_ECA8A:
jmp loc_EC9CA
loc_ECA8F:
mov rdi, [rsp+48h+var_8]
mov rsi, [rsp+48h+var_10]
mov edx, [rsp+48h+var_14]
call bf_round
add rsp, 48h
retn
|
long long bf_const_get(
long long a1,
long long a2,
unsigned int a3,
long long a4,
void ( *a5)(long long, long long),
int a6)
{
long long v7; // [rsp+8h] [rbp-40h]
unsigned long long i; // [rsp+10h] [rbp-38h]
for ( i = 32LL; ; i += i >> 1 )
{
v7 = i + a2;
if ( *(_QWORD *)(a4 + 40) >= i + a2 )
{
v7 = *(_QWORD *)(a4 + 40);
}
else
{
if ( !*(_QWORD *)(a4 + 24) )
bf_init(*(_QWORD *)a1, a4);
a5(a4, v7);
*(_QWORD *)(a4 + 40) = v7;
}
bf_set(a1, a4);
*(_DWORD *)(a1 + 8) = a6;
if ( bf_can_round((_QWORD *)a1, a2, a3 & 7, v7) )
break;
}
return bf_round((_QWORD *)a1, a2, a3);
}
|
bf_const_get:
SUB RSP,0x48
MOV qword ptr [RSP + 0x40],RDI
MOV qword ptr [RSP + 0x38],RSI
MOV dword ptr [RSP + 0x34],EDX
MOV qword ptr [RSP + 0x28],RCX
MOV qword ptr [RSP + 0x20],R8
MOV dword ptr [RSP + 0x1c],R9D
MOV qword ptr [RSP + 0x10],0x20
LAB_001ec9ca:
MOV RAX,qword ptr [RSP + 0x38]
ADD RAX,qword ptr [RSP + 0x10]
MOV qword ptr [RSP + 0x8],RAX
MOV RAX,qword ptr [RSP + 0x28]
MOV RAX,qword ptr [RAX + 0x28]
CMP RAX,qword ptr [RSP + 0x8]
JNC 0x001eca28
MOV RAX,qword ptr [RSP + 0x28]
CMP qword ptr [RAX + 0x18],0x0
JNZ 0x001eca07
MOV RAX,qword ptr [RSP + 0x40]
MOV RDI,qword ptr [RAX]
MOV RSI,qword ptr [RSP + 0x28]
CALL 0x001e4cb0
LAB_001eca07:
MOV RAX,qword ptr [RSP + 0x20]
MOV RDI,qword ptr [RSP + 0x28]
MOV RSI,qword ptr [RSP + 0x8]
CALL RAX
MOV RCX,qword ptr [RSP + 0x8]
MOV RAX,qword ptr [RSP + 0x28]
MOV qword ptr [RAX + 0x28],RCX
JMP 0x001eca36
LAB_001eca28:
MOV RAX,qword ptr [RSP + 0x28]
MOV RAX,qword ptr [RAX + 0x28]
MOV qword ptr [RSP + 0x8],RAX
LAB_001eca36:
MOV RDI,qword ptr [RSP + 0x40]
MOV RSI,qword ptr [RSP + 0x28]
CALL 0x001e5000
MOV ECX,dword ptr [RSP + 0x1c]
MOV RAX,qword ptr [RSP + 0x40]
MOV dword ptr [RAX + 0x8],ECX
MOV RDI,qword ptr [RSP + 0x40]
MOV RSI,qword ptr [RSP + 0x38]
MOV EDX,dword ptr [RSP + 0x34]
AND EDX,0x7
MOV RCX,qword ptr [RSP + 0x8]
CALL 0x001e5820
CMP EAX,0x0
JNZ 0x001eca88
MOV RAX,qword ptr [RSP + 0x10]
MOV RCX,qword ptr [RSP + 0x10]
SHR RCX,0x1
ADD RAX,RCX
MOV qword ptr [RSP + 0x10],RAX
JMP 0x001eca8a
LAB_001eca88:
JMP 0x001eca8f
LAB_001eca8a:
JMP 0x001ec9ca
LAB_001eca8f:
MOV RDI,qword ptr [RSP + 0x40]
MOV RSI,qword ptr [RSP + 0x38]
MOV EDX,dword ptr [RSP + 0x34]
CALL 0x001e5a50
ADD RSP,0x48
RET
|
void bf_const_get(int8 *param_1,long param_2,uint param_3,long param_4,code *param_5,
int4 param_6)
{
int iVar1;
ulong local_40;
ulong local_38;
local_38 = 0x20;
while( true ) {
local_40 = param_2 + local_38;
if (*(ulong *)(param_4 + 0x28) < local_40) {
if (*(long *)(param_4 + 0x18) == 0) {
bf_init(*param_1,param_4);
}
(*param_5)(param_4,local_40);
*(ulong *)(param_4 + 0x28) = local_40;
}
else {
local_40 = *(ulong *)(param_4 + 0x28);
}
bf_set(param_1,param_4);
*(int4 *)(param_1 + 1) = param_6;
iVar1 = bf_can_round(param_1,param_2,param_3 & 7,local_40);
if (iVar1 != 0) break;
local_38 = local_38 + (local_38 >> 1);
}
bf_round(param_1,param_2,param_3);
return;
}
|
|
64,334 |
minja::Value::operator*(minja::Value const&) const
|
monkey531[P]llama/common/minja.hpp
|
Value operator*(const Value& rhs) const {
if (is_string() && rhs.is_number_integer()) {
std::ostringstream out;
for (int64_t i = 0, n = rhs.get<int64_t>(); i < n; ++i) {
out << to_str();
}
return out.str();
}
else if (is_number_integer() && rhs.is_number_integer())
return get<int64_t>() * rhs.get<int64_t>();
else
return get<double>() * rhs.get<double>();
}
|
O3
|
cpp
|
minja::Value::operator*(minja::Value const&) const:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x1a8, %rsp # imm = 0x1A8
movq %rdx, %r15
movq %rsi, %r14
movq %rdi, %rbx
movb 0x40(%rsi), %al
cmpb $0x3, %al
jne 0xa4e29
movb 0x40(%r15), %al
addb $-0x5, %al
cmpb $0x1, %al
ja 0xa4e80
leaq 0x30(%rsp), %rdi
callq 0x1bbd0
movq %r15, %rdi
callq 0x93f62
movq %rax, %r15
testq %rax, %rax
jle 0xa4dcf
leaq 0x18(%rsp), %rbp
leaq 0x8(%rsp), %r12
leaq 0x30(%rsp), %r13
movq %r12, %rdi
movq %r14, %rsi
callq 0xa47d6
movq 0x8(%rsp), %rsi
movq 0x10(%rsp), %rdx
movq %r13, %rdi
callq 0x1ba10
movq 0x8(%rsp), %rdi
cmpq %rbp, %rdi
je 0xa4dca
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x1b8f0
decq %r15
jne 0xa4d96
leaq 0x38(%rsp), %rsi
leaq 0x8(%rsp), %rdi
callq 0x1be10
leaq 0x8(%rsp), %rsi
movq %rbx, %rdi
callq 0x97f34
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xa4e06
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x1b8f0
movq 0x96163(%rip), %rsi # 0x13af70
leaq 0x30(%rsp), %rdi
callq 0x1b4b0
leaq 0xa0(%rsp), %rdi
callq 0x1b2c0
jmp 0xa4ecb
addb $-0x5, %al
cmpb $0x1, %al
ja 0xa4e80
movb 0x40(%r15), %al
addb $-0x5, %al
cmpb $0x1, %al
ja 0xa4e80
movq %r14, %rdi
callq 0x93f62
movq %rax, %r14
movq %r15, %rdi
callq 0x93f62
imulq %rax, %r14
leaq 0x40(%rbx), %r15
xorpd %xmm0, %xmm0
movupd %xmm0, (%rbx)
movupd %xmm0, 0x10(%rbx)
movupd %xmm0, 0x20(%rbx)
movupd %xmm0, 0x30(%rbx)
movupd %xmm0, 0x40(%rbx)
movq %r15, %rdi
movq %r14, %rsi
callq 0x6e388
movq %r15, %rdi
jmp 0xa4ec1
movq %r14, %rdi
callq 0x940ac
movsd %xmm0, 0x28(%rsp)
movq %r15, %rdi
callq 0x940ac
mulsd 0x28(%rsp), %xmm0
leaq 0x40(%rbx), %r14
xorps %xmm1, %xmm1
movups %xmm1, (%rbx)
movups %xmm1, 0x10(%rbx)
movups %xmm1, 0x20(%rbx)
movups %xmm1, 0x30(%rbx)
movups %xmm1, 0x40(%rbx)
movq %r14, %rdi
callq 0x6d950
movq %r14, %rdi
movl $0x1, %esi
callq 0x66666
movq %rbx, %rax
addq $0x1a8, %rsp # imm = 0x1A8
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
jne 0xa4f09
jmp 0xa4f16
jmp 0xa4ef7
jmp 0xa4ef7
movq %rax, %rbx
jmp 0xa4f16
movq %rax, %rbx
movq 0x8(%rsp), %rdi
cmpq %rbp, %rdi
je 0xa4f16
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x1b8f0
movq 0x96053(%rip), %rsi # 0x13af70
leaq 0x30(%rsp), %rdi
callq 0x1b4b0
leaq 0xa0(%rsp), %rdi
callq 0x1b2c0
movq %rbx, %rdi
callq 0x1c020
|
_ZNK5minja5ValuemlERKS0_:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 1A8h
mov r15, rdx
mov r14, rsi
mov rbx, rdi
mov al, [rsi+40h]
cmp al, 3
jnz loc_A4E29
mov al, [r15+40h]
add al, 0FBh
cmp al, 1
ja loc_A4E80
lea rdi, [rsp+1D8h+var_1A8]
call __ZNSt7__cxx1119basic_ostringstreamIcSt11char_traitsIcESaIcEEC1Ev; std::ostringstream::basic_ostringstream(void)
mov rdi, r15
call _ZNK5minja5Value3getIlEET_v; minja::Value::get<long>(void)
mov r15, rax
test rax, rax
jle short loc_A4DCF
lea rbp, [rsp+1D8h+var_1C0]
lea r12, [rsp+1D8h+var_1D0]
lea r13, [rsp+1D8h+var_1A8]
loc_A4D96:
mov rdi, r12
mov rsi, r14
call _ZNK5minja5Value6to_strB5cxx11Ev; minja::Value::to_str(void)
mov rsi, [rsp+1D8h+var_1D0]
mov rdx, [rsp+1D8h+var_1C8]
mov rdi, r13
call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long)
mov rdi, [rsp+1D8h+var_1D0]; void *
cmp rdi, rbp
jz short loc_A4DCA
mov rsi, [rsp+1D8h+var_1C0]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_A4DCA:
dec r15
jnz short loc_A4D96
loc_A4DCF:
lea rsi, [rsp+1D8h+var_1A0]
lea rdi, [rsp+1D8h+var_1D0]
call __ZNKSt7__cxx1115basic_stringbufIcSt11char_traitsIcESaIcEE3strEv; std::stringbuf::str(void)
lea rsi, [rsp+1D8h+var_1D0]
mov rdi, rbx
call _ZN5minja5ValueC2ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; minja::Value::Value(std::string const&)
lea rax, [rsp+1D8h+var_1C0]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_A4E06
mov rsi, [rsp+1D8h+var_1C0]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_A4E06:
mov rsi, cs:_ZTTNSt7__cxx1119basic_ostringstreamIcSt11char_traitsIcESaIcEEE_ptr
lea rdi, [rsp+1D8h+var_1A8]
call __ZNSt7__cxx1119basic_ostringstreamIcSt11char_traitsIcESaIcEED2Ev; std::ostringstream::~ostringstream()
lea rdi, [rsp+1D8h+var_138]; this
call __ZNSt8ios_baseD2Ev; std::ios_base::~ios_base()
jmp loc_A4ECB
loc_A4E29:
add al, 0FBh
cmp al, 1
ja short loc_A4E80
mov al, [r15+40h]
add al, 0FBh
cmp al, 1
ja short loc_A4E80
mov rdi, r14
call _ZNK5minja5Value3getIlEET_v; minja::Value::get<long>(void)
mov r14, rax
mov rdi, r15
call _ZNK5minja5Value3getIlEET_v; minja::Value::get<long>(void)
imul r14, rax
lea r15, [rbx+40h]
xorpd xmm0, xmm0
movupd xmmword ptr [rbx], xmm0
movupd xmmword ptr [rbx+10h], xmm0
movupd xmmword ptr [rbx+20h], xmm0
movupd xmmword ptr [rbx+30h], xmm0
movupd xmmword ptr [rbx+40h], xmm0
mov rdi, r15
mov rsi, r14
call _ZN8nlohmann16json_abi_v3_11_36detail20external_constructorILNS1_7value_tE5EE9constructINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES8_IhSaIhEEvEEEEvRT_NSJ_16number_integer_tE; nlohmann::json_abi_v3_11_3::detail::external_constructor<(nlohmann::json_abi_v3_11_3::detail::value_t)5>::construct<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> &,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::number_integer_t)
mov rdi, r15
jmp short loc_A4EC1
loc_A4E80:
mov rdi, r14
call _ZNK5minja5Value3getIdEET_v; minja::Value::get<double>(void)
movsd [rsp+1D8h+var_1B0], xmm0
mov rdi, r15
call _ZNK5minja5Value3getIdEET_v; minja::Value::get<double>(void)
mulsd xmm0, [rsp+1D8h+var_1B0]
lea r14, [rbx+40h]
xorps xmm1, xmm1
movups xmmword ptr [rbx], xmm1
movups xmmword ptr [rbx+10h], xmm1
movups xmmword ptr [rbx+20h], xmm1
movups xmmword ptr [rbx+30h], xmm1
movups xmmword ptr [rbx+40h], xmm1
mov rdi, r14
call _ZN8nlohmann16json_abi_v3_11_36detail20external_constructorILNS1_7value_tE7EE9constructINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES8_IhSaIhEEvEEEEvRT_NSJ_14number_float_tE; nlohmann::json_abi_v3_11_3::detail::external_constructor<(nlohmann::json_abi_v3_11_3::detail::value_t)7>::construct<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> &,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::number_float_t)
mov rdi, r14
loc_A4EC1:
mov esi, 1
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool)
loc_A4ECB:
mov rax, rbx
add rsp, 1A8h
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]
cmp rdi, rax
jnz short loc_A4F09
jmp short loc_A4F16
jmp short loc_A4EF7
jmp short $+2
loc_A4EF7:
mov rbx, rax
jmp short loc_A4F16
mov rbx, rax
mov rdi, [rsp+arg_0]; void *
cmp rdi, rbp
jz short loc_A4F16
loc_A4F09:
mov rsi, [rsp+arg_10]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_A4F16:
mov rsi, cs:_ZTTNSt7__cxx1119basic_ostringstreamIcSt11char_traitsIcESaIcEEE_ptr
lea rdi, [rsp+arg_28]
call __ZNSt7__cxx1119basic_ostringstreamIcSt11char_traitsIcESaIcEED2Ev; std::ostringstream::~ostringstream()
lea rdi, [rsp+arg_98]; this
call __ZNSt8ios_baseD2Ev; std::ios_base::~ios_base()
mov rdi, rbx
call __Unwind_Resume
|
long long minja::Value::operator*(long long a1, long long a2, long long a3)
{
char v5; // al
long long v6; // r15
long long v7; // r14
long long v8; // rax
char *v9; // rdi
double v10; // xmm0_8
void *v12[2]; // [rsp+8h] [rbp-1D0h] BYREF
_QWORD v13[2]; // [rsp+18h] [rbp-1C0h] BYREF
double v14; // [rsp+28h] [rbp-1B0h]
_BYTE v15[8]; // [rsp+30h] [rbp-1A8h] BYREF
_BYTE v16[104]; // [rsp+38h] [rbp-1A0h] BYREF
_BYTE v17[312]; // [rsp+A0h] [rbp-138h] BYREF
v5 = *(_BYTE *)(a2 + 64);
if ( v5 != 3 )
{
if ( (unsigned __int8)(v5 - 5) <= 1u && (unsigned __int8)(*(_BYTE *)(a3 + 64) - 5) <= 1u )
{
v7 = minja::Value::get<long>(a2);
v8 = minja::Value::get<long>(a3);
*(_OWORD *)a1 = 0LL;
*(_OWORD *)(a1 + 16) = 0LL;
*(_OWORD *)(a1 + 32) = 0LL;
*(_OWORD *)(a1 + 48) = 0LL;
*(_OWORD *)(a1 + 64) = 0LL;
nlohmann::json_abi_v3_11_3::detail::external_constructor<(nlohmann::json_abi_v3_11_3::detail::value_t)5>::construct<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>(
(unsigned __int8 *)(a1 + 64),
v8 * v7);
v9 = (char *)(a1 + 64);
LABEL_14:
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(v9);
return a1;
}
LABEL_13:
v14 = minja::Value::get<double>(a2);
v10 = minja::Value::get<double>(a3) * v14;
*(_OWORD *)a1 = 0LL;
*(_OWORD *)(a1 + 16) = 0LL;
*(_OWORD *)(a1 + 32) = 0LL;
*(_OWORD *)(a1 + 48) = 0LL;
*(_OWORD *)(a1 + 64) = 0LL;
nlohmann::json_abi_v3_11_3::detail::external_constructor<(nlohmann::json_abi_v3_11_3::detail::value_t)7>::construct<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>(
(unsigned __int8 *)(a1 + 64),
v10);
v9 = (char *)(a1 + 64);
goto LABEL_14;
}
if ( (unsigned __int8)(*(_BYTE *)(a3 + 64) - 5) > 1u )
goto LABEL_13;
std::ostringstream::basic_ostringstream(v15);
v6 = minja::Value::get<long>(a3);
if ( v6 > 0 )
{
do
{
minja::Value::to_str[abi:cxx11](v12, a2);
std::__ostream_insert<char,std::char_traits<char>>(v15, v12[0], v12[1]);
if ( v12[0] != v13 )
operator delete(v12[0], v13[0] + 1LL);
--v6;
}
while ( v6 );
}
std::stringbuf::str(v12, v16);
minja::Value::Value(a1, (long long)v12);
if ( v12[0] != v13 )
operator delete(v12[0], v13[0] + 1LL);
std::ostringstream::~ostringstream(v15, &`VTT for'std::ostringstream);
std::ios_base::~ios_base((std::ios_base *)v17);
return a1;
}
|
operator*:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x1a8
MOV R15,RDX
MOV R14,RSI
MOV RBX,RDI
MOV AL,byte ptr [RSI + 0x40]
CMP AL,0x3
JNZ 0x001a4e29
MOV AL,byte ptr [R15 + 0x40]
ADD AL,0xfb
CMP AL,0x1
JA 0x001a4e80
LEA RDI,[RSP + 0x30]
CALL 0x0011bbd0
LAB_001a4d77:
MOV RDI,R15
CALL 0x00193f62
MOV R15,RAX
TEST RAX,RAX
JLE 0x001a4dcf
LEA RBP,[RSP + 0x18]
LEA R12,[RSP + 0x8]
LEA R13,[RSP + 0x30]
LAB_001a4d96:
MOV RDI,R12
MOV RSI,R14
CALL 0x001a47d6
MOV RSI,qword ptr [RSP + 0x8]
MOV RDX,qword ptr [RSP + 0x10]
LAB_001a4dab:
MOV RDI,R13
CALL 0x0011ba10
MOV RDI,qword ptr [RSP + 0x8]
CMP RDI,RBP
JZ 0x001a4dca
MOV RSI,qword ptr [RSP + 0x18]
INC RSI
CALL 0x0011b8f0
LAB_001a4dca:
DEC R15
JNZ 0x001a4d96
LAB_001a4dcf:
LEA RSI,[RSP + 0x38]
LAB_001a4dd4:
LEA RDI,[RSP + 0x8]
CALL 0x0011be10
LAB_001a4dde:
LEA RSI,[RSP + 0x8]
MOV RDI,RBX
CALL 0x00197f34
LAB_001a4deb:
LEA RAX,[RSP + 0x18]
MOV RDI,qword ptr [RAX + -0x10]
CMP RDI,RAX
JZ 0x001a4e06
MOV RSI,qword ptr [RSP + 0x18]
INC RSI
CALL 0x0011b8f0
LAB_001a4e06:
MOV RSI,qword ptr [0x0023af70]
LEA RDI,[RSP + 0x30]
CALL 0x0011b4b0
LEA RDI,[RSP + 0xa0]
CALL 0x0011b2c0
JMP 0x001a4ecb
LAB_001a4e29:
ADD AL,0xfb
CMP AL,0x1
JA 0x001a4e80
MOV AL,byte ptr [R15 + 0x40]
ADD AL,0xfb
CMP AL,0x1
JA 0x001a4e80
MOV RDI,R14
CALL 0x00193f62
MOV R14,RAX
MOV RDI,R15
CALL 0x00193f62
IMUL R14,RAX
LEA R15,[RBX + 0x40]
XORPD XMM0,XMM0
MOVUPD xmmword ptr [RBX],XMM0
MOVUPD xmmword ptr [RBX + 0x10],XMM0
MOVUPD xmmword ptr [RBX + 0x20],XMM0
MOVUPD xmmword ptr [RBX + 0x30],XMM0
MOVUPD xmmword ptr [RBX + 0x40],XMM0
MOV RDI,R15
MOV RSI,R14
CALL 0x0016e388
MOV RDI,R15
JMP 0x001a4ec1
LAB_001a4e80:
MOV RDI,R14
CALL 0x001940ac
MOVSD qword ptr [RSP + 0x28],XMM0
MOV RDI,R15
CALL 0x001940ac
MULSD XMM0,qword ptr [RSP + 0x28]
LEA R14,[RBX + 0x40]
XORPS XMM1,XMM1
MOVUPS xmmword ptr [RBX],XMM1
MOVUPS xmmword ptr [RBX + 0x10],XMM1
MOVUPS xmmword ptr [RBX + 0x20],XMM1
MOVUPS xmmword ptr [RBX + 0x30],XMM1
MOVUPS xmmword ptr [RBX + 0x40],XMM1
MOV RDI,R14
CALL 0x0016d950
MOV RDI,R14
LAB_001a4ec1:
MOV ESI,0x1
CALL 0x00166666
LAB_001a4ecb:
MOV RAX,RBX
ADD RSP,0x1a8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
/* minja::Value::TEMPNAMEPLACEHOLDERVALUE(minja::Value const&) const */
Value * __thiscall minja::Value::operator*(Value *this,Value *param_1)
{
long lVar1;
long lVar2;
Value *in_RDX;
double dVar3;
long *local_1d0;
long local_1c8;
long local_1c0 [2];
double local_1b0;
ostringstream local_1a8 [112];
ios_base local_138 [264];
if (param_1[0x40] == (Value)0x3) {
if ((byte)((char)in_RDX[0x40] - 5U) < 2) {
std::__cxx11::ostringstream::ostringstream(local_1a8);
/* try { // try from 001a4d77 to 001a4d7e has its CatchHandler @ 001a4ef5 */
lVar1 = get<long>(in_RDX);
if (0 < lVar1) {
do {
/* try { // try from 001a4d96 to 001a4da0 has its CatchHandler @ 001a4ef7 */
to_str_abi_cxx11_();
/* try { // try from 001a4dab to 001a4db2 has its CatchHandler @ 001a4efc */
std::__ostream_insert<char,std::char_traits<char>>
((ostream *)local_1a8,(char *)local_1d0,local_1c8);
if (local_1d0 != local_1c0) {
operator_delete(local_1d0,local_1c0[0] + 1);
}
lVar1 = lVar1 + -1;
} while (lVar1 != 0);
}
/* try { // try from 001a4dd4 to 001a4ddd has its CatchHandler @ 001a4ef3 */
std::__cxx11::stringbuf::str();
/* try { // try from 001a4dde to 001a4dea has its CatchHandler @ 001a4ee0 */
Value(this,(string *)&local_1d0);
if (local_1d0 != local_1c0) {
operator_delete(local_1d0,local_1c0[0] + 1);
}
std::__cxx11::ostringstream::~ostringstream(local_1a8);
std::ios_base::~ios_base(local_138);
return this;
}
}
else if (((byte)((char)param_1[0x40] - 5U) < 2) && ((byte)((char)in_RDX[0x40] - 5U) < 2)) {
lVar1 = get<long>(param_1);
lVar2 = get<long>(in_RDX);
*(int8 *)this = 0;
*(int8 *)(this + 8) = 0;
*(int8 *)(this + 0x10) = 0;
*(int8 *)(this + 0x18) = 0;
*(int8 *)(this + 0x20) = 0;
*(int8 *)(this + 0x28) = 0;
*(int8 *)(this + 0x30) = 0;
*(int8 *)(this + 0x38) = 0;
*(int8 *)(this + 0x40) = 0;
*(int8 *)(this + 0x48) = 0;
nlohmann::json_abi_v3_11_3::detail::
external_constructor<(nlohmann::json_abi_v3_11_3::detail::value_t)5>::
construct<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>
(this + 0x40,lVar1 * lVar2);
goto LAB_001a4ec1;
}
local_1b0 = get<double>(param_1);
dVar3 = get<double>(in_RDX);
*(int8 *)this = 0;
*(int8 *)(this + 8) = 0;
*(int8 *)(this + 0x10) = 0;
*(int8 *)(this + 0x18) = 0;
*(int8 *)(this + 0x20) = 0;
*(int8 *)(this + 0x28) = 0;
*(int8 *)(this + 0x30) = 0;
*(int8 *)(this + 0x38) = 0;
*(int8 *)(this + 0x40) = 0;
*(int8 *)(this + 0x48) = 0;
nlohmann::json_abi_v3_11_3::detail::
external_constructor<(nlohmann::json_abi_v3_11_3::detail::value_t)7>::
construct<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>
(dVar3 * local_1b0,this + 0x40);
LAB_001a4ec1:
nlohmann::json_abi_v3_11_3::
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::assert_invariant((bool)((char)this + '@'));
return this;
}
|
|
64,335 |
LefDefParser::lefwLayerRoutingSpacingSameNet(int)
|
Efficient-TDP/thirdparty/Limbo/limbo/thirdparty/lefdef/5.8/lef/lef/lefwWriter.cpp
|
int
lefwLayerRoutingSpacingSameNet(int PGOnly)
{
if (!lefwFile)
return LEFW_UNINITIALIZED;
if (lefwState != LEFW_LAYERROUTING_START &&
lefwState != LEFW_LAYERROUTING)
return LEFW_BAD_ORDER;
if (!lefwIsRouting)
return LEFW_BAD_DATA; // only routing calls this func
if (!lefwHasLayerRoutingSpacing)
return LEFW_BAD_DATA;
if (lefwWriteEncrypt) {
if (PGOnly)
encPrint(lefwFile, (char*) " SAMENET PGONLY ");
else
encPrint(lefwFile, (char*) " SAMENET ");
} else {
if (PGOnly)
fprintf(lefwFile, " SAMENET PGONLY ");
else
fprintf(lefwFile, " SAMENET ");
}
prtSemiColon = 1;
return LEFW_OK;
}
|
O3
|
cpp
|
LefDefParser::lefwLayerRoutingSpacingSameNet(int):
leaq 0x799f6(%rip), %rax # 0x8d0f0
movq (%rax), %rcx
testq %rcx, %rcx
je 0x1374b
leaq 0x79c37(%rip), %rax # 0x8d340
movl (%rax), %edx
cmpl $0x1f, %edx
je 0x1371a
movl $0x2, %eax
cmpl $0x7, %edx
jne 0x13799
leaq 0x79c93(%rip), %rdx # 0x8d3b4
movl $0x3, %eax
cmpl $0x0, (%rdx)
je 0x13799
cmpb $0x1, 0x79cba(%rip) # 0x8d3ec
jne 0x13799
pushq %rax
cmpb $0x1, 0x79ca0(%rip) # 0x8d3dc
jne 0x13751
testl %edi, %edi
je 0x13763
leaq 0x477fb(%rip), %rsi # 0x5af44
jmp 0x1376a
movl $0x1, %eax
retq
testl %edi, %edi
je 0x13776
leaq 0x477e8(%rip), %rdi # 0x5af44
movl $0x12, %esi
jmp 0x13782
leaq 0x477ed(%rip), %rsi # 0x5af57
movq %rcx, %rdi
xorl %eax, %eax
callq 0x55afd
jmp 0x1378c
leaq 0x477da(%rip), %rdi # 0x5af57
movl $0xb, %esi
movl $0x1, %edx
callq 0x23d0
movb $0x1, 0x79c51(%rip) # 0x8d3e4
xorl %eax, %eax
addq $0x8, %rsp
retq
|
_ZN12LefDefParser30lefwLayerRoutingSpacingSameNetEi:
lea rax, _ZN12LefDefParser8lefwFileE; LefDefParser::lefwFile
mov rcx, [rax]
test rcx, rcx
jz short loc_1374B
lea rax, _ZN12LefDefParser9lefwStateE; LefDefParser::lefwState
mov edx, [rax]
cmp edx, 1Fh
jz short loc_1371A
mov eax, 2
cmp edx, 7
jnz short locret_13799
loc_1371A:
lea rdx, _ZN12LefDefParser13lefwIsRoutingE; LefDefParser::lefwIsRouting
mov eax, 3
cmp dword ptr [rdx], 0
jz short locret_13799
cmp cs:_ZN12LefDefParserL26lefwHasLayerRoutingSpacingE, 1; LefDefParser::lefwHasLayerRoutingSpacing
jnz short locret_13799
push rax
cmp cs:_ZN12LefDefParserL16lefwWriteEncryptE, 1; LefDefParser::lefwWriteEncrypt
jnz short loc_13751
test edi, edi
jz short loc_13763
lea rsi, aSamenetPgonly; " SAMENET PGONLY "
jmp short loc_1376A
loc_1374B:
mov eax, 1
retn
loc_13751:
test edi, edi
jz short loc_13776
lea rdi, aSamenetPgonly; " SAMENET PGONLY "
mov esi, 12h
jmp short loc_13782
loc_13763:
lea rsi, aSamenet; " SAMENET "
loc_1376A:
mov rdi, rcx
xor eax, eax
call _ZN12LefDefParser8encPrintEP8_IO_FILEPcz; LefDefParser::encPrint(_IO_FILE *,char *,...)
jmp short loc_1378C
loc_13776:
lea rdi, aSamenet; " SAMENET "
mov esi, 0Bh
loc_13782:
mov edx, 1
call _fwrite
loc_1378C:
mov cs:_ZN12LefDefParserL12prtSemiColonE, 1; LefDefParser::prtSemiColon
xor eax, eax
add rsp, 8
locret_13799:
retn
|
long long LefDefParser::lefwLayerRoutingSpacingSameNet(
LefDefParser *this,
int a2,
long long a3,
long long a4,
int a5,
int a6)
{
long long result; // rax
const char *v7; // rsi
const char *v8; // rdi
long long v9; // rsi
if ( !*(_QWORD *)&LefDefParser::lefwFile )
return 1LL;
if ( LefDefParser::lefwState == 31 || (result = 2LL, LefDefParser::lefwState == 7) )
{
result = 3LL;
if ( LefDefParser::lefwIsRouting )
{
if ( LefDefParser::lefwHasLayerRoutingSpacing == 1 )
{
if ( LefDefParser::lefwWriteEncrypt == 1 )
{
if ( (_DWORD)this )
v7 = " SAMENET PGONLY ";
else
v7 = " SAMENET ";
LefDefParser::encPrint(
LefDefParser::lefwFile,
(_DWORD)v7,
(unsigned int)&LefDefParser::lefwIsRouting,
LefDefParser::lefwFile,
a5,
a6);
}
else
{
if ( (_DWORD)this )
{
v8 = " SAMENET PGONLY ";
v9 = 18LL;
}
else
{
v8 = " SAMENET ";
v9 = 11LL;
}
fwrite(v8, v9, 1LL, *(_QWORD *)&LefDefParser::lefwFile);
}
LefDefParser::prtSemiColon = 1;
return 0LL;
}
}
}
return result;
}
|
lefwLayerRoutingSpacingSameNet:
LEA RAX,[0x18d0f0]
MOV RCX,qword ptr [RAX]
TEST RCX,RCX
JZ 0x0011374b
LEA RAX,[0x18d340]
MOV EDX,dword ptr [RAX]
CMP EDX,0x1f
JZ 0x0011371a
MOV EAX,0x2
CMP EDX,0x7
JNZ 0x00113799
LAB_0011371a:
LEA RDX,[0x18d3b4]
MOV EAX,0x3
CMP dword ptr [RDX],0x0
JZ 0x00113799
CMP byte ptr [0x0018d3ec],0x1
JNZ 0x00113799
PUSH RAX
CMP byte ptr [0x0018d3dc],0x1
JNZ 0x00113751
TEST EDI,EDI
JZ 0x00113763
LEA RSI,[0x15af44]
JMP 0x0011376a
LAB_0011374b:
MOV EAX,0x1
RET
LAB_00113751:
TEST EDI,EDI
JZ 0x00113776
LEA RDI,[0x15af44]
MOV ESI,0x12
JMP 0x00113782
LAB_00113763:
LEA RSI,[0x15af57]
LAB_0011376a:
MOV RDI,RCX
XOR EAX,EAX
CALL 0x00155afd
JMP 0x0011378c
LAB_00113776:
LEA RDI,[0x15af57]
MOV ESI,0xb
LAB_00113782:
MOV EDX,0x1
CALL 0x001023d0
LAB_0011378c:
MOV byte ptr [0x0018d3e4],0x1
XOR EAX,EAX
ADD RSP,0x8
LAB_00113799:
RET
|
/* LefDefParser::lefwLayerRoutingSpacingSameNet(int) */
int8 LefDefParser::lefwLayerRoutingSpacingSameNet(int param_1)
{
int8 uVar1;
char *pcVar2;
size_t __size;
if (lefwFile != (_IO_FILE *)0x0) {
if ((((lefwState == 0x1f) || (uVar1 = 2, lefwState == 7)) && (uVar1 = 3, lefwIsRouting != 0)) &&
(lefwHasLayerRoutingSpacing == '\x01')) {
if (lefwWriteEncrypt == '\x01') {
if (param_1 == 0) {
pcVar2 = " SAMENET ";
}
else {
pcVar2 = " SAMENET PGONLY ";
}
encPrint(lefwFile,pcVar2);
}
else {
if (param_1 == 0) {
pcVar2 = " SAMENET ";
__size = 0xb;
}
else {
pcVar2 = " SAMENET PGONLY ";
__size = 0x12;
}
fwrite(pcVar2,__size,1,lefwFile);
}
prtSemiColon = 1;
uVar1 = 0;
}
return uVar1;
}
return 1;
}
|
|
64,336 |
ma_send
|
eloqsql/libmariadb/plugins/pvio/pvio_socket.c
|
static ssize_t ma_send(my_socket socket, const uchar *buffer, size_t length, int flags)
{
ssize_t r;
#if !defined(MSG_NOSIGNAL) && !defined(SO_NOSIGPIPE) && !defined(_WIN32)
struct sigaction act, oldact;
act.sa_handler= SIG_IGN;
sigaction(SIGPIPE, &act, &oldact);
#endif
do {
r = send(socket, (const char *)buffer, IF_WIN((int)length,length), flags);
}
while (r == -1 && IS_SOCKET_EINTR(socket_errno));
#if !defined(MSG_NOSIGNAL) && !defined(SO_NOSIGPIPE) && !defined(_WIN32)
sigaction(SIGPIPE, &oldact, NULL);
#endif
return r;
}
|
O3
|
c
|
ma_send:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdx, %rbx
movq %rsi, %r14
movl %edi, %r15d
movl %r15d, %edi
movq %r14, %rsi
movq %rbx, %rdx
movl $0x4040, %ecx # imm = 0x4040
callq 0x131f0
movq %rax, %r12
cmpq $-0x1, %rax
jne 0x2f611
callq 0x13060
cmpl $0x4, (%rax)
je 0x2f5eb
movq %r12, %rax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
|
ma_send:
push rbp
mov rbp, rsp
push r15
push r14
push r12
push rbx
mov rbx, rdx
mov r14, rsi
mov r15d, edi
loc_2F5EB:
mov edi, r15d
mov rsi, r14
mov rdx, rbx
mov ecx, 4040h
call _send
mov r12, rax
cmp rax, 0FFFFFFFFFFFFFFFFh
jnz short loc_2F611
call ___errno_location
cmp dword ptr [rax], 4
jz short loc_2F5EB
loc_2F611:
mov rax, r12
pop rbx
pop r12
pop r14
pop r15
pop rbp
retn
|
long long ma_send(unsigned int a1, long long a2, long long a3)
{
long long v4; // r12
do
v4 = send(a1, a2, a3, 16448LL);
while ( v4 == -1 && *(_DWORD *)__errno_location(a1) == 4 );
return v4;
}
|
ma_send:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
MOV RBX,RDX
MOV R14,RSI
MOV R15D,EDI
LAB_0012f5eb:
MOV EDI,R15D
MOV RSI,R14
MOV RDX,RBX
MOV ECX,0x4040
CALL 0x001131f0
MOV R12,RAX
CMP RAX,-0x1
JNZ 0x0012f611
CALL 0x00113060
CMP dword ptr [RAX],0x4
JZ 0x0012f5eb
LAB_0012f611:
MOV RAX,R12
POP RBX
POP R12
POP R14
POP R15
POP RBP
RET
|
ssize_t ma_send(int param_1,void *param_2,size_t param_3)
{
ssize_t sVar1;
int *piVar2;
do {
sVar1 = send(param_1,param_2,param_3,0x4040);
if (sVar1 != -1) {
return sVar1;
}
piVar2 = __errno_location();
} while (*piVar2 == 4);
return -1;
}
|
|
64,337 |
LefDefParser::lefiViaRule::setName(char const*)
|
Efficient-TDP/thirdparty/Limbo/limbo/thirdparty/lefdef/5.8/lef/lef/lefiViaRule.cpp
|
void
lefiViaRule::setName(const char *name)
{
int len = strlen(name) + 1;
if (len > nameSize_) {
lefFree(name_);
name_ = (char*) lefMalloc(len);
nameSize_ = len;
}
strcpy(name_, CASE(name));
clear();
}
|
O0
|
cpp
|
LefDefParser::lefiViaRule::setName(char const*):
subq $0x28, %rsp
movq %rdi, 0x20(%rsp)
movq %rsi, 0x18(%rsp)
movq 0x20(%rsp), %rax
movq %rax, 0x8(%rsp)
movq 0x18(%rsp), %rdi
callq 0x20d0
movq 0x8(%rsp), %rcx
addq $0x1, %rax
movl %eax, 0x14(%rsp)
movl 0x14(%rsp), %eax
cmpl 0x8(%rcx), %eax
jle 0x2fb51
movq 0x8(%rsp), %rax
movq (%rax), %rdi
callq 0x38c90
movslq 0x14(%rsp), %rdi
callq 0x359d0
movq %rax, %rcx
movq 0x8(%rsp), %rax
movq %rcx, (%rax)
movl 0x14(%rsp), %ecx
movl %ecx, 0x8(%rax)
movq 0x8(%rsp), %rax
movq (%rax), %rax
movq %rax, (%rsp)
movq 0x18(%rsp), %rdi
callq 0x3f780
movq (%rsp), %rdi
movq %rax, %rsi
callq 0x2250
movq 0x8(%rsp), %rdi
callq 0x2f9b0
addq $0x28, %rsp
retq
nopw %cs:(%rax,%rax)
|
_ZN12LefDefParser11lefiViaRule7setNameEPKc:
sub rsp, 28h
mov [rsp+28h+var_8], rdi
mov [rsp+28h+var_10], rsi
mov rax, [rsp+28h+var_8]
mov [rsp+28h+var_20], rax
mov rdi, [rsp+28h+var_10]
call _strlen
mov rcx, [rsp+28h+var_20]
add rax, 1
mov [rsp+28h+var_14], eax
mov eax, [rsp+28h+var_14]
cmp eax, [rcx+8]
jle short loc_2FB51
mov rax, [rsp+28h+var_20]
mov rdi, [rax]; this
call _ZN12LefDefParser7lefFreeEPv; LefDefParser::lefFree(void *)
movsxd rdi, [rsp+28h+var_14]; this
call _ZN12LefDefParser9lefMallocEm; LefDefParser::lefMalloc(ulong)
mov rcx, rax
mov rax, [rsp+28h+var_20]
mov [rax], rcx
mov ecx, [rsp+28h+var_14]
mov [rax+8], ecx
loc_2FB51:
mov rax, [rsp+28h+var_20]
mov rax, [rax]
mov [rsp+28h+var_28], rax
mov rdi, [rsp+28h+var_10]; this
call _ZN12LefDefParser4CASEEPKc; LefDefParser::CASE(char const*)
mov rdi, [rsp+28h+var_28]
mov rsi, rax
call _strcpy
mov rdi, [rsp+28h+var_20]; this
call _ZN12LefDefParser11lefiViaRule5clearEv; LefDefParser::lefiViaRule::clear(void)
add rsp, 28h
retn
|
LefDefParser::lefiViaRule * LefDefParser::lefiViaRule::setName(LefDefParser **this, char *a2)
{
void *v2; // rsi
LefDefParser *v4; // [rsp+0h] [rbp-28h]
int v5; // [rsp+14h] [rbp-14h]
v5 = strlen(a2) + 1;
if ( v5 > *((_DWORD *)this + 2) )
{
LefDefParser::lefFree(*this, a2);
*this = (LefDefParser *)LefDefParser::lefMalloc((LefDefParser *)v5, (unsigned long long)a2);
*((_DWORD *)this + 2) = v5;
}
v4 = *this;
v2 = (void *)LefDefParser::CASE((LefDefParser *)a2, a2);
strcpy(v4, v2);
return LefDefParser::lefiViaRule::clear((LefDefParser::lefiViaRule *)this, v2);
}
|
setName:
SUB RSP,0x28
MOV qword ptr [RSP + 0x20],RDI
MOV qword ptr [RSP + 0x18],RSI
MOV RAX,qword ptr [RSP + 0x20]
MOV qword ptr [RSP + 0x8],RAX
MOV RDI,qword ptr [RSP + 0x18]
CALL 0x001020d0
MOV RCX,qword ptr [RSP + 0x8]
ADD RAX,0x1
MOV dword ptr [RSP + 0x14],EAX
MOV EAX,dword ptr [RSP + 0x14]
CMP EAX,dword ptr [RCX + 0x8]
JLE 0x0012fb51
MOV RAX,qword ptr [RSP + 0x8]
MOV RDI,qword ptr [RAX]
CALL 0x00138c90
MOVSXD RDI,dword ptr [RSP + 0x14]
CALL 0x001359d0
MOV RCX,RAX
MOV RAX,qword ptr [RSP + 0x8]
MOV qword ptr [RAX],RCX
MOV ECX,dword ptr [RSP + 0x14]
MOV dword ptr [RAX + 0x8],ECX
LAB_0012fb51:
MOV RAX,qword ptr [RSP + 0x8]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RSP],RAX
MOV RDI,qword ptr [RSP + 0x18]
CALL 0x0013f780
MOV RDI,qword ptr [RSP]
MOV RSI,RAX
CALL 0x00102250
MOV RDI,qword ptr [RSP + 0x8]
CALL 0x0012f9b0
ADD RSP,0x28
RET
|
/* LefDefParser::lefiViaRule::setName(char const*) */
void __thiscall LefDefParser::lefiViaRule::setName(lefiViaRule *this,char *param_1)
{
char *__dest;
int iVar1;
size_t sVar2;
int8 uVar3;
char *__src;
sVar2 = strlen(param_1);
iVar1 = (int)sVar2 + 1;
if (*(int *)(this + 8) < iVar1) {
lefFree(*(void **)this);
uVar3 = lefMalloc((long)iVar1);
*(int8 *)this = uVar3;
*(int *)(this + 8) = iVar1;
}
__dest = *(char **)this;
__src = (char *)CASE(param_1);
strcpy(__dest,__src);
clear(this);
return;
}
|
|
64,338 |
mbedtls_asn1_store_named_data
|
msxemulator/build_O3/_deps/pico_sdk-src/lib/mbedtls/library/asn1write.c
|
mbedtls_asn1_named_data *mbedtls_asn1_store_named_data(
mbedtls_asn1_named_data **head,
const char *oid, size_t oid_len,
const unsigned char *val,
size_t val_len)
{
mbedtls_asn1_named_data *cur;
if ((cur = asn1_find_named_data(*head, oid, oid_len)) == NULL) {
// Add new entry if not present yet based on OID
//
cur = (mbedtls_asn1_named_data *) mbedtls_calloc(1,
sizeof(mbedtls_asn1_named_data));
if (cur == NULL) {
return NULL;
}
cur->oid.len = oid_len;
cur->oid.p = mbedtls_calloc(1, oid_len);
if (cur->oid.p == NULL) {
mbedtls_free(cur);
return NULL;
}
memcpy(cur->oid.p, oid, oid_len);
cur->val.len = val_len;
if (val_len != 0) {
cur->val.p = mbedtls_calloc(1, val_len);
if (cur->val.p == NULL) {
mbedtls_free(cur->oid.p);
mbedtls_free(cur);
return NULL;
}
}
cur->next = *head;
*head = cur;
} else if (val_len == 0) {
mbedtls_free(cur->val.p);
cur->val.p = NULL;
} else if (cur->val.len != val_len) {
/*
* Enlarge existing value buffer if needed
* Preserve old data until the allocation succeeded, to leave list in
* a consistent state in case allocation fails.
*/
void *p = mbedtls_calloc(1, val_len);
if (p == NULL) {
return NULL;
}
mbedtls_free(cur->val.p);
cur->val.p = p;
cur->val.len = val_len;
}
if (val != NULL && val_len != 0) {
memcpy(cur->val.p, val, val_len);
}
return cur;
}
|
O3
|
c
|
mbedtls_asn1_store_named_data:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %r8, 0x8(%rsp)
movq %rcx, %r15
movq %rdx, %r13
movq %rsi, %rbp
movq %rdi, %r12
movq (%rdi), %r14
testq %r14, %r14
je 0x977c6
movq %r14, %rbx
cmpq %r13, 0x8(%rbx)
jne 0x977bd
movq 0x10(%rbx), %rdi
movq %rbp, %rsi
movq %r13, %rdx
callq 0xf490
testl %eax, %eax
je 0x97848
movq 0x30(%rbx), %rbx
testq %rbx, %rbx
jne 0x977a0
movl $0x1, %edi
movl $0x40, %esi
callq 0xf2f0
testq %rax, %rax
je 0x978c8
movq %rax, %rbx
movq %r15, 0x10(%rsp)
movq %r13, 0x8(%rax)
movl $0x1, %edi
movq %r13, %rsi
callq 0xf2f0
movq %rax, 0x10(%rbx)
testq %rax, %rax
je 0x978c0
movq %rax, %r15
movq %rax, %rdi
movq %rbp, %rsi
movq %r13, %rdx
callq 0xf3a0
movq 0x8(%rsp), %r13
movq %r13, 0x20(%rbx)
testq %r13, %r13
je 0x97839
movl $0x1, %edi
movq %r13, %rsi
callq 0xf2f0
movq %rax, 0x28(%rbx)
testq %rax, %rax
je 0x978b8
movq %r14, 0x30(%rbx)
movq %rbx, (%r12)
movq 0x10(%rsp), %r15
jmp 0x97884
movq 0x8(%rsp), %r13
testq %r13, %r13
je 0x978a5
cmpq %r13, 0x20(%rbx)
je 0x97884
movq %r15, %r14
movl $0x1, %edi
movq %r13, %rsi
callq 0xf2f0
testq %rax, %rax
je 0x978c8
movq %rax, %r15
movq 0x28(%rbx), %rdi
callq 0xf560
movq %r15, 0x28(%rbx)
movq %r13, 0x20(%rbx)
movq %r14, %r15
testq %r15, %r15
sete %al
testq %r13, %r13
sete %cl
orb %al, %cl
jne 0x978ca
movq 0x28(%rbx), %rdi
movq %r15, %rsi
movq %r13, %rdx
callq 0xf3a0
jmp 0x978ca
movq 0x28(%rbx), %rdi
callq 0xf560
movq $0x0, 0x28(%rbx)
jmp 0x978ca
movq %r15, %rdi
callq 0xf560
movq %rbx, %rdi
callq 0xf560
xorl %ebx, %ebx
movq %rbx, %rax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
|
mbedtls_asn1_store_named_data:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 18h
mov [rsp+48h+var_40], r8
mov r15, rcx
mov r13, rdx
mov rbp, rsi
mov r12, rdi
mov r14, [rdi]
test r14, r14
jz short loc_977C6
mov rbx, r14
loc_977A0:
cmp [rbx+8], r13
jnz short loc_977BD
mov rdi, [rbx+10h]
mov rsi, rbp
mov rdx, r13
call _bcmp
test eax, eax
jz loc_97848
loc_977BD:
mov rbx, [rbx+30h]
test rbx, rbx
jnz short loc_977A0
loc_977C6:
mov edi, 1
mov esi, 40h ; '@'
call _calloc
test rax, rax
jz loc_978C8
mov rbx, rax
mov [rsp+48h+var_38], r15
mov [rax+8], r13
mov edi, 1
mov rsi, r13
call _calloc
mov [rbx+10h], rax
test rax, rax
jz loc_978C0
mov r15, rax
mov rdi, rax
mov rsi, rbp
mov rdx, r13
call _memcpy
mov r13, [rsp+48h+var_40]
mov [rbx+20h], r13
test r13, r13
jz short loc_97839
mov edi, 1
mov rsi, r13
call _calloc
mov [rbx+28h], rax
test rax, rax
jz short loc_978B8
loc_97839:
mov [rbx+30h], r14
mov [r12], rbx
mov r15, [rsp+48h+var_38]
jmp short loc_97884
loc_97848:
mov r13, [rsp+48h+var_40]
test r13, r13
jz short loc_978A5
cmp [rbx+20h], r13
jz short loc_97884
mov r14, r15
mov edi, 1
mov rsi, r13
call _calloc
test rax, rax
jz short loc_978C8
mov r15, rax
mov rdi, [rbx+28h]
call _free
mov [rbx+28h], r15
mov [rbx+20h], r13
mov r15, r14
loc_97884:
test r15, r15
setz al
test r13, r13
setz cl
or cl, al
jnz short loc_978CA
mov rdi, [rbx+28h]
mov rsi, r15
mov rdx, r13
call _memcpy
jmp short loc_978CA
loc_978A5:
mov rdi, [rbx+28h]
call _free
mov qword ptr [rbx+28h], 0
jmp short loc_978CA
loc_978B8:
mov rdi, r15
call _free
loc_978C0:
mov rdi, rbx
call _free
loc_978C8:
xor ebx, ebx
loc_978CA:
mov rax, rbx
add rsp, 18h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
|
_QWORD * mbedtls_asn1_store_named_data(_QWORD *a1, long long a2, long long a3, long long a4, long long a5)
{
_QWORD *v7; // r14
_QWORD *v8; // rbx
long long v9; // rax
long long v10; // rax
long long v11; // r15
long long v12; // r13
long long v13; // rax
long long v14; // r14
long long v15; // rax
long long v16; // r15
long long v19; // [rsp+10h] [rbp-38h]
v7 = (_QWORD *)*a1;
if ( !*a1 )
{
LABEL_6:
v9 = calloc(1LL, 64LL);
if ( v9 )
{
v8 = (_QWORD *)v9;
v19 = a4;
*(_QWORD *)(v9 + 8) = a3;
v10 = calloc(1LL, a3);
v8[2] = v10;
if ( v10 )
{
v11 = v10;
memcpy(v10, a2, a3);
v12 = a5;
v8[4] = a5;
if ( !a5 || (v13 = calloc(1LL, a5), (v8[5] = v13) != 0LL) )
{
v8[6] = v7;
*a1 = v8;
a4 = v19;
goto LABEL_15;
}
free(v11);
}
free(v8);
}
return 0LL;
}
v8 = (_QWORD *)*a1;
while ( v8[1] != a3 || (unsigned int)bcmp(v8[2], a2, a3) )
{
v8 = (_QWORD *)v8[6];
if ( !v8 )
goto LABEL_6;
}
v12 = a5;
if ( !a5 )
{
free(v8[5]);
v8[5] = 0LL;
return v8;
}
if ( v8[4] != a5 )
{
v14 = a4;
v15 = calloc(1LL, a5);
if ( v15 )
{
v16 = v15;
free(v8[5]);
v8[5] = v16;
v8[4] = a5;
a4 = v14;
goto LABEL_15;
}
return 0LL;
}
LABEL_15:
if ( a4 != 0 && v12 != 0 )
memcpy(v8[5], a4, v12);
return v8;
}
|
mbedtls_asn1_store_named_data:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x18
MOV qword ptr [RSP + 0x8],R8
MOV R15,RCX
MOV R13,RDX
MOV RBP,RSI
MOV R12,RDI
MOV R14,qword ptr [RDI]
TEST R14,R14
JZ 0x001977c6
MOV RBX,R14
LAB_001977a0:
CMP qword ptr [RBX + 0x8],R13
JNZ 0x001977bd
MOV RDI,qword ptr [RBX + 0x10]
MOV RSI,RBP
MOV RDX,R13
CALL 0x0010f490
TEST EAX,EAX
JZ 0x00197848
LAB_001977bd:
MOV RBX,qword ptr [RBX + 0x30]
TEST RBX,RBX
JNZ 0x001977a0
LAB_001977c6:
MOV EDI,0x1
MOV ESI,0x40
CALL 0x0010f2f0
TEST RAX,RAX
JZ 0x001978c8
MOV RBX,RAX
MOV qword ptr [RSP + 0x10],R15
MOV qword ptr [RAX + 0x8],R13
MOV EDI,0x1
MOV RSI,R13
CALL 0x0010f2f0
MOV qword ptr [RBX + 0x10],RAX
TEST RAX,RAX
JZ 0x001978c0
MOV R15,RAX
MOV RDI,RAX
MOV RSI,RBP
MOV RDX,R13
CALL 0x0010f3a0
MOV R13,qword ptr [RSP + 0x8]
MOV qword ptr [RBX + 0x20],R13
TEST R13,R13
JZ 0x00197839
MOV EDI,0x1
MOV RSI,R13
CALL 0x0010f2f0
MOV qword ptr [RBX + 0x28],RAX
TEST RAX,RAX
JZ 0x001978b8
LAB_00197839:
MOV qword ptr [RBX + 0x30],R14
MOV qword ptr [R12],RBX
MOV R15,qword ptr [RSP + 0x10]
JMP 0x00197884
LAB_00197848:
MOV R13,qword ptr [RSP + 0x8]
TEST R13,R13
JZ 0x001978a5
CMP qword ptr [RBX + 0x20],R13
JZ 0x00197884
MOV R14,R15
MOV EDI,0x1
MOV RSI,R13
CALL 0x0010f2f0
TEST RAX,RAX
JZ 0x001978c8
MOV R15,RAX
MOV RDI,qword ptr [RBX + 0x28]
CALL 0x0010f560
MOV qword ptr [RBX + 0x28],R15
MOV qword ptr [RBX + 0x20],R13
MOV R15,R14
LAB_00197884:
TEST R15,R15
SETZ AL
TEST R13,R13
SETZ CL
OR CL,AL
JNZ 0x001978ca
MOV RDI,qword ptr [RBX + 0x28]
MOV RSI,R15
MOV RDX,R13
CALL 0x0010f3a0
JMP 0x001978ca
LAB_001978a5:
MOV RDI,qword ptr [RBX + 0x28]
CALL 0x0010f560
MOV qword ptr [RBX + 0x28],0x0
JMP 0x001978ca
LAB_001978b8:
MOV RDI,R15
CALL 0x0010f560
LAB_001978c0:
MOV RDI,RBX
CALL 0x0010f560
LAB_001978c8:
XOR EBX,EBX
LAB_001978ca:
MOV RAX,RBX
ADD RSP,0x18
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
void * mbedtls_asn1_store_named_data
(long *param_1,void *param_2,size_t param_3,void *param_4,size_t param_5)
{
int iVar1;
void *__ptr;
void *__dest;
void *pvVar2;
void *pvVar3;
pvVar3 = (void *)*param_1;
for (__ptr = pvVar3; __ptr != (void *)0x0; __ptr = *(void **)((long)__ptr + 0x30)) {
if ((*(size_t *)((long)__ptr + 8) == param_3) &&
(iVar1 = bcmp(*(void **)((long)__ptr + 0x10),param_2,param_3), iVar1 == 0)) {
if (param_5 == 0) {
free(*(void **)((long)__ptr + 0x28));
*(int8 *)((long)__ptr + 0x28) = 0;
return __ptr;
}
if (*(size_t *)((long)__ptr + 0x20) != param_5) {
pvVar3 = calloc(1,param_5);
if (pvVar3 == (void *)0x0) {
return (void *)0x0;
}
free(*(void **)((long)__ptr + 0x28));
*(void **)((long)__ptr + 0x28) = pvVar3;
*(size_t *)((long)__ptr + 0x20) = param_5;
}
goto LAB_00197884;
}
}
__ptr = calloc(1,0x40);
if (__ptr != (void *)0x0) {
*(size_t *)((long)__ptr + 8) = param_3;
__dest = calloc(1,param_3);
*(void **)((long)__ptr + 0x10) = __dest;
if (__dest != (void *)0x0) {
memcpy(__dest,param_2,param_3);
*(size_t *)((long)__ptr + 0x20) = param_5;
if (param_5 == 0) {
LAB_00197839:
*(void **)((long)__ptr + 0x30) = pvVar3;
*param_1 = (long)__ptr;
LAB_00197884:
if (param_5 != 0 && param_4 != (void *)0x0) {
memcpy(*(void **)((long)__ptr + 0x28),param_4,param_5);
return __ptr;
}
return __ptr;
}
pvVar2 = calloc(1,param_5);
*(void **)((long)__ptr + 0x28) = pvVar2;
if (pvVar2 != (void *)0x0) goto LAB_00197839;
free(__dest);
}
free(__ptr);
}
return (void *)0x0;
}
|
|
64,339 |
aimrt::runtime::core::executor::AsioStrandExecutor::~AsioStrandExecutor()
|
aimrt_mujoco_sim/_deps/aimrt-src/src/runtime/core/../core/executor/asio_strand_executor.h
|
~AsioStrandExecutor() override = default;
|
O3
|
c
|
aimrt::runtime::core::executor::AsioStrandExecutor::~AsioStrandExecutor():
pushq %rbx
movq %rdi, %rbx
leaq 0x1b05d9(%rip), %rax # 0x298458
movq %rax, (%rdi)
movq 0xa0(%rdi), %rsi
testq %rsi, %rsi
je 0xe7e9a
leaq 0xa0(%rbx), %rdi
callq 0x842b0
movq $0x0, 0xa0(%rbx)
movq 0x90(%rbx), %rax
testq %rax, %rax
je 0xe7ec2
leaq 0x80(%rbx), %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
movq 0x68(%rbx), %rdi
testq %rdi, %rdi
je 0xe7ed0
callq 0x81a00
movq 0x28(%rbx), %rdi
leaq 0x38(%rbx), %rax
cmpq %rax, %rdi
je 0xe7ee8
movq (%rax), %rsi
incq %rsi
callq 0x82190
movq 0x8(%rbx), %rdi
addq $0x18, %rbx
cmpq %rbx, %rdi
je 0xe7f01
movq (%rbx), %rsi
incq %rsi
popq %rbx
jmp 0x82190
popq %rbx
retq
movq %rax, %rdi
callq 0x8b40b
nop
|
_ZN5aimrt7runtime4core8executor18AsioStrandExecutorD2Ev:
push rbx
mov rbx, rdi
lea rax, off_298458
mov [rdi], rax
mov rsi, [rdi+0A0h]
test rsi, rsi
jz short loc_E7E9A
lea rdi, [rbx+0A0h]
call __ZNKSt14default_deleteIN4asio6strandINS0_10io_context19basic_executor_typeISaIvELm0EEEEEEclEPS6_; std::default_delete<asio::strand<asio::io_context::basic_executor_type<std::allocator<void>,0ul>>>::operator()(asio::strand<asio::io_context::basic_executor_type<std::allocator<void>,0ul>>*)
loc_E7E9A:
mov qword ptr [rbx+0A0h], 0
mov rax, [rbx+90h]
test rax, rax
jz short loc_E7EC2
lea rdi, [rbx+80h]
mov rsi, rdi
mov edx, 3
call rax
loc_E7EC2:
mov rdi, [rbx+68h]
test rdi, rdi
jz short loc_E7ED0
call __ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_E7ED0:
mov rdi, [rbx+28h]; void *
lea rax, [rbx+38h]
cmp rdi, rax
jz short loc_E7EE8
mov rsi, [rax]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_E7EE8:
mov rdi, [rbx+8]; void *
add rbx, 18h
cmp rdi, rbx
jz short loc_E7F01
mov rsi, [rbx]
inc rsi; unsigned __int64
pop rbx
jmp __ZdlPvm; operator delete(void *,ulong)
loc_E7F01:
pop rbx
retn
mov rdi, rax
call __clang_call_terminate
|
void aimrt::runtime::core::executor::AsioStrandExecutor::~AsioStrandExecutor(
aimrt::runtime::core::executor::AsioStrandExecutor *this)
{
void ( *v2)(char *, char *, long long); // rax
long long v3; // rdi
char *v4; // rdi
_QWORD *v5; // rdi
_QWORD *v6; // rbx
*(_QWORD *)this = off_298458;
if ( *((_QWORD *)this + 20) )
std::default_delete<asio::strand<asio::io_context::basic_executor_type<std::allocator<void>,0ul>>>::operator()((char *)this + 160);
*((_QWORD *)this + 20) = 0LL;
v2 = (void ( *)(char *, char *, long long))*((_QWORD *)this + 18);
if ( v2 )
v2((char *)this + 128, (char *)this + 128, 3LL);
v3 = *((_QWORD *)this + 13);
if ( v3 )
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v3);
v4 = (char *)*((_QWORD *)this + 5);
if ( v4 != (char *)this + 56 )
operator delete(v4, *((_QWORD *)this + 7) + 1LL);
v5 = (_QWORD *)*((_QWORD *)this + 1);
v6 = (_QWORD *)((char *)this + 24);
if ( v5 != v6 )
operator delete(v5, *v6 + 1LL);
}
|
~AsioStrandExecutor:
PUSH RBX
MOV RBX,RDI
LEA RAX,[0x398458]
MOV qword ptr [RDI],RAX
MOV RSI,qword ptr [RDI + 0xa0]
TEST RSI,RSI
JZ 0x001e7e9a
LEA RDI,[RBX + 0xa0]
CALL 0x001842b0
LAB_001e7e9a:
MOV qword ptr [RBX + 0xa0],0x0
MOV RAX,qword ptr [RBX + 0x90]
TEST RAX,RAX
JZ 0x001e7ec2
LEA RDI,[RBX + 0x80]
LAB_001e7eb8:
MOV RSI,RDI
MOV EDX,0x3
CALL RAX
LAB_001e7ec2:
MOV RDI,qword ptr [RBX + 0x68]
TEST RDI,RDI
JZ 0x001e7ed0
CALL 0x00181a00
LAB_001e7ed0:
MOV RDI,qword ptr [RBX + 0x28]
LEA RAX,[RBX + 0x38]
CMP RDI,RAX
JZ 0x001e7ee8
MOV RSI,qword ptr [RAX]
INC RSI
CALL 0x00182190
LAB_001e7ee8:
MOV RDI,qword ptr [RBX + 0x8]
ADD RBX,0x18
CMP RDI,RBX
JZ 0x001e7f01
MOV RSI,qword ptr [RBX]
INC RSI
POP RBX
JMP 0x00182190
LAB_001e7f01:
POP RBX
RET
|
/* aimrt::runtime::core::executor::AsioStrandExecutor::~AsioStrandExecutor() */
void __thiscall
aimrt::runtime::core::executor::AsioStrandExecutor::~AsioStrandExecutor(AsioStrandExecutor *this)
{
*(int ***)this = &PTR__AsioStrandExecutor_00398458;
if (*(strand **)(this + 0xa0) != (strand *)0x0) {
std::
default_delete<asio::strand<asio::io_context::basic_executor_type<std::allocator<void>,0ul>>>::
operator()((default_delete<asio::strand<asio::io_context::basic_executor_type<std::allocator<void>,0ul>>>
*)(this + 0xa0),*(strand **)(this + 0xa0));
}
*(int8 *)(this + 0xa0) = 0;
if (*(code **)(this + 0x90) != (code *)0x0) {
/* try { // try from 001e7eb8 to 001e7ec1 has its CatchHandler @ 001e7f03 */
(**(code **)(this + 0x90))(this + 0x80,this + 0x80,3);
}
if (*(_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> **)(this + 0x68) !=
(_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 + 0x68));
}
if (*(AsioStrandExecutor **)(this + 0x28) != this + 0x38) {
operator_delete(*(AsioStrandExecutor **)(this + 0x28),*(long *)(this + 0x38) + 1);
}
if (*(AsioStrandExecutor **)(this + 8) != this + 0x18) {
operator_delete(*(AsioStrandExecutor **)(this + 8),*(long *)(this + 0x18) + 1);
return;
}
return;
}
|
|
64,340 |
vemit_tap
|
eloqsql/unittest/mytap/tap.c
|
static void
vemit_tap(int pass, char const *fmt, va_list ap)
{
fprintf(tapout, "%sok %d%s",
pass ? "" : "not ",
++g_test.last,
(fmt && *fmt) ? " - " : "");
if (fmt && *fmt)
vfprintf(tapout, fmt, ap);
fflush(tapout);
}
|
O3
|
c
|
vemit_tap:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %edi, %eax
movq 0x2eb314(%rip), %r15 # 0x31bfa0
movq (%r15), %rdi
testl %eax, %eax
leaq 0x4ef0d(%rip), %rcx # 0x7fba5
leaq 0x53a98(%rip), %rax # 0x84737
cmovneq %rax, %rcx
movl 0x3625e2(%rip), %r8d # 0x39328c
incl %r8d
movl %r8d, 0x3625d8(%rip) # 0x39328c
testq %rsi, %rsi
je 0x30cfb
movq %rdx, %rbx
movq %rsi, %r14
cmpb $0x0, (%rsi)
leaq 0x4eee1(%rip), %r9 # 0x7fbaa
cmoveq %rax, %r9
leaq 0x4eec7(%rip), %rdx # 0x7fb9b
movl $0x1, %esi
xorl %eax, %eax
callq 0x265d0
cmpb $0x0, (%r14)
je 0x30d15
movq (%r15), %rdi
movl $0x1, %esi
movq %r14, %rdx
movq %rbx, %rcx
callq 0x260e0
jmp 0x30d15
leaq 0x4ee99(%rip), %rdx # 0x7fb9b
leaq 0x53a2e(%rip), %r9 # 0x84737
movl $0x1, %esi
xorl %eax, %eax
callq 0x265d0
movq (%r15), %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x263e0
|
vemit_tap:
push rbp
mov rbp, rsp
push r15
push r14
push rbx
push rax
mov eax, edi
mov r15, cs:stdout_ptr
mov rdi, [r15]
test eax, eax
lea rcx, aNot; "not "
lea rax, asc_84733+4; ""
cmovnz rcx, rax
mov r8d, cs:dword_39328C
inc r8d
mov cs:dword_39328C, r8d
test rsi, rsi
jz short loc_30CFB
mov rbx, rdx
mov r14, rsi
cmp byte ptr [rsi], 0
lea r9, asc_7FBAA; " - "
cmovz r9, rax
lea rdx, aSokDS; "%sok %d%s"
mov esi, 1
xor eax, eax
call ___fprintf_chk
cmp byte ptr [r14], 0
jz short loc_30D15
mov rdi, [r15]
mov esi, 1
mov rdx, r14
mov rcx, rbx
call ___vfprintf_chk
jmp short loc_30D15
loc_30CFB:
lea rdx, aSokDS; "%sok %d%s"
lea r9, asc_84733+4; ""
mov esi, 1
xor eax, eax
call ___fprintf_chk
loc_30D15:
mov rdi, [r15]
add rsp, 8
pop rbx
pop r14
pop r15
pop rbp
jmp _fflush
|
long long vemit_tap(int a1, _BYTE *a2, long long a3)
{
const char *v3; // rcx
int v4; // r8d
const char *v6; // r9
v3 = "not ";
if ( a1 )
v3 = "";
v4 = ++dword_39328C;
if ( a2 )
{
v6 = " - ";
if ( !*a2 )
v6 = "";
__fprintf_chk(stdout, 1LL, "%sok %d%s", v3, v4, v6);
if ( *a2 )
__vfprintf_chk(stdout, 1LL, a2, a3);
}
else
{
__fprintf_chk(stdout, 1LL, "%sok %d%s", v3, v4, "");
}
return fflush(stdout);
}
|
vemit_tap:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH RBX
PUSH RAX
MOV EAX,EDI
MOV R15,qword ptr [0x0041bfa0]
MOV RDI,qword ptr [R15]
TEST EAX,EAX
LEA RCX,[0x17fba5]
LEA RAX,[0x184737]
CMOVNZ RCX,RAX
MOV R8D,dword ptr [0x0049328c]
INC R8D
MOV dword ptr [0x0049328c],R8D
TEST RSI,RSI
JZ 0x00130cfb
MOV RBX,RDX
MOV R14,RSI
CMP byte ptr [RSI],0x0
LEA R9,[0x17fbaa]
CMOVZ R9,RAX
LEA RDX,[0x17fb9b]
MOV ESI,0x1
XOR EAX,EAX
CALL 0x001265d0
CMP byte ptr [R14],0x0
JZ 0x00130d15
MOV RDI,qword ptr [R15]
MOV ESI,0x1
MOV RDX,R14
MOV RCX,RBX
CALL 0x001260e0
JMP 0x00130d15
LAB_00130cfb:
LEA RDX,[0x17fb9b]
LEA R9,[0x184737]
MOV ESI,0x1
XOR EAX,EAX
CALL 0x001265d0
LAB_00130d15:
MOV RDI,qword ptr [R15]
ADD RSP,0x8
POP RBX
POP R14
POP R15
POP RBP
JMP 0x001263e0
|
void vemit_tap(int param_1,char *param_2,int8 param_3)
{
int *puVar1;
int *puVar2;
int *puVar3;
puVar1 = PTR_stdout_0041bfa0;
puVar2 = &DAT_0017fba5;
if (param_1 != 0) {
puVar2 = &DAT_00184737;
}
DAT_0049328c = DAT_0049328c + 1;
if (param_2 == (char *)0x0) {
__fprintf_chk(*(int8 *)PTR_stdout_0041bfa0,1,"%sok %d%s",puVar2,DAT_0049328c,&DAT_00184737
);
}
else {
puVar3 = &DAT_0017fbaa;
if (*param_2 == '\0') {
puVar3 = &DAT_00184737;
}
__fprintf_chk(*(int8 *)PTR_stdout_0041bfa0,1,"%sok %d%s",puVar2,DAT_0049328c,puVar3);
if (*param_2 != '\0') {
__vfprintf_chk(*(int8 *)puVar1,1,param_2,param_3);
}
}
fflush(*(FILE **)puVar1);
return;
}
|
|
64,341 |
nglog::tools::FindSymbol(unsigned long, int, char*, unsigned long, unsigned long, Elf64_Shdr const*, Elf64_Shdr const*)
|
ng-log[P]ng-log/src/symbolize.cc
|
static ATTRIBUTE_NOINLINE bool FindSymbol(uint64_t pc, const int fd, char* out,
size_t out_size,
uint64_t symbol_offset,
const ElfW(Shdr) * strtab,
const ElfW(Shdr) * symtab) {
if (symtab == nullptr) {
return false;
}
const size_t num_symbols = symtab->sh_size / symtab->sh_entsize;
for (unsigned i = 0; i < num_symbols;) {
size_t offset = symtab->sh_offset + i * symtab->sh_entsize;
// If we are reading Elf64_Sym's, we want to limit this array to
// 32 elements (to keep stack consumption low), otherwise we can
// have a 64 element Elf32_Sym array.
# if defined(__WORDSIZE) && __WORDSIZE == 64
const size_t NUM_SYMBOLS = 32U;
# else
const size_t NUM_SYMBOLS = 64U;
# endif
// Read at most NUM_SYMBOLS symbols at once to save read() calls.
ElfW(Sym) buf[NUM_SYMBOLS];
size_t num_symbols_to_read = std::min(NUM_SYMBOLS, num_symbols - i);
const ssize_t len =
ReadFromOffset(fd, &buf, sizeof(buf[0]) * num_symbols_to_read, offset);
NGLOG_SAFE_ASSERT(static_cast<size_t>(len) % sizeof(buf[0]) == 0);
const size_t num_symbols_in_buf = static_cast<size_t>(len) / sizeof(buf[0]);
NGLOG_SAFE_ASSERT(num_symbols_in_buf <= num_symbols_to_read);
for (unsigned j = 0; j < num_symbols_in_buf; ++j) {
const ElfW(Sym)& symbol = buf[j];
uint64_t start_address = symbol.st_value;
start_address += symbol_offset;
uint64_t end_address = start_address + symbol.st_size;
if (symbol.st_value != 0 && // Skip null value symbols.
symbol.st_shndx != 0 && // Skip undefined symbols.
start_address <= pc && pc < end_address) {
ssize_t len1 = ReadFromOffset(fd, out, out_size,
strtab->sh_offset + symbol.st_name);
if (len1 <= 0 || memchr(out, '\0', out_size) == nullptr) {
memset(out, 0, out_size);
return false;
}
return true; // Obtained the symbol name.
}
}
i += num_symbols_in_buf;
}
return false;
}
|
O3
|
cpp
|
nglog::tools::FindSymbol(unsigned long, int, char*, unsigned long, unsigned long, Elf64_Shdr const*, Elf64_Shdr const*):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x328, %rsp # imm = 0x328
movl %esi, 0x4(%rsp)
movq 0x360(%rsp), %r14
testq %r14, %r14
je 0x218ed
movq %r9, 0x8(%rsp)
movq %rdx, 0x10(%rsp)
movq %rcx, 0x18(%rsp)
movq 0x20(%r14), %rcx
movq 0x38(%r14), %rsi
xorl %r15d, %r15d
movq %rcx, %rax
xorl %edx, %edx
divq %rsi
cmpq %rcx, %rsi
jbe 0x218f5
jmp 0x21a13
xorl %r15d, %r15d
jmp 0x21a16
movq %r8, %r13
movq %rdi, %r12
movq %rax, %rbp
xorl %ecx, %ecx
movq %rbp, %rbx
subq %rcx, %rbx
imulq 0x38(%r14), %rcx
addq 0x18(%r14), %rcx
cmpq $0x20, %rbx
movl $0x20, %eax
cmovaeq %rax, %rbx
leal (,%rbx,8), %eax
leaq (%rax,%rax,2), %rdx
movl 0x4(%rsp), %edi
leaq 0x20(%rsp), %rsi
callq 0x20e19
movq %rax, %rcx
movabsq $-0x5555555555555555, %rdx # imm = 0xAAAAAAAAAAAAAAAB
mulq %rdx
rorq $0x3, %rax
movabsq $0xaaaaaaaaaaaaaab, %rsi # imm = 0xAAAAAAAAAAAAAAB
cmpq %rsi, %rax
jae 0x21a2b
shrq $0x4, %rdx
cmpq %rbx, %rdx
ja 0x21a2b
cmpq $0x18, %rcx
jb 0x219ad
movl $0x1, %eax
xorl %ecx, %ecx
leaq (%rcx,%rcx,2), %rsi
movq 0x28(%rsp,%rsi,8), %rcx
testq %rcx, %rcx
je 0x219a4
addq %r13, %rcx
cmpq %r12, %rcx
ja 0x219a4
leaq (%rsp,%rsi,8), %rsi
addq $0x20, %rsi
cmpw $0x0, 0x6(%rsi)
je 0x219a4
addq 0x10(%rsi), %rcx
cmpq %r12, %rcx
ja 0x219c4
movl %eax, %ecx
incl %eax
cmpq %rcx, %rdx
ja 0x21976
addl %edx, %r15d
movq %r15, %rcx
cmpq %r15, %rbp
ja 0x21900
xorl %r15d, %r15d
jmp 0x218e8
movl (%rsi), %ecx
movq 0x8(%rsp), %rax
addq 0x18(%rax), %rcx
movl 0x4(%rsp), %edi
movq 0x10(%rsp), %r15
movq %r15, %rsi
movq 0x18(%rsp), %r14
movq %r14, %rdx
callq 0x20e19
testq %rax, %rax
jle 0x21a01
movq %r15, %rdi
xorl %esi, %esi
movq %r14, %rdx
callq 0x75e0
movb $0x1, %bl
testq %rax, %rax
jne 0x21a10
xorl %ebx, %ebx
movq %r15, %rdi
xorl %esi, %esi
movq %r14, %rdx
callq 0x72b0
movb $0x1, %r15b
andb %bl, %r15b
movl %r15d, %eax
addq $0x328, %rsp # imm = 0x328
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0x72c0
|
_ZN5nglog5toolsL10FindSymbolEmiPcmmPK10Elf64_ShdrS4_:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 328h
mov dword ptr [rsp+358h+var_354], esi
mov r14, [rsp+358h+arg_0]
test r14, r14
jz short loc_218ED
mov [rsp+358h+var_354+4], r9
mov qword ptr [rsp+358h+var_348], rdx
mov [rsp+358h+var_340], rcx
mov rcx, [r14+20h]
mov rsi, [r14+38h]
xor r15d, r15d
mov rax, rcx
xor edx, edx
div rsi
cmp rsi, rcx
jbe short loc_218F5
loc_218E8:
jmp loc_21A13
loc_218ED:
xor r15d, r15d
jmp loc_21A16
loc_218F5:
mov r13, r8
mov r12, rdi
mov rbp, rax
xor ecx, ecx
loc_21900:
mov rbx, rbp
sub rbx, rcx
imul rcx, [r14+38h]
add rcx, [r14+18h]; unsigned __int64
cmp rbx, 20h ; ' '
mov eax, 20h ; ' '
cmovnb rbx, rax
lea eax, ds:0[rbx*8]
lea rdx, [rax+rax*2]; void *
mov edi, dword ptr [rsp+358h+var_354]; this
lea rsi, [rsp+358h+var_338]; int
call _ZN5nglog5toolsL14ReadFromOffsetEiPvmm; nglog::tools::ReadFromOffset(int,void *,ulong,ulong)
mov rcx, rax
mov rdx, 0AAAAAAAAAAAAAAABh
mul rdx
ror rax, 3
mov rsi, 0AAAAAAAAAAAAAABh
cmp rax, rsi
jnb loc_21A2B
shr rdx, 4
cmp rdx, rbx
ja loc_21A2B
cmp rcx, 18h
jb short loc_219AD
mov eax, 1
xor ecx, ecx
loc_21976:
lea rsi, [rcx+rcx*2]
mov rcx, [rsp+rsi*8+358h+var_330]
test rcx, rcx
jz short loc_219A4
add rcx, r13
cmp rcx, r12
ja short loc_219A4
lea rsi, [rsp+rsi*8+358h+var_358]
add rsi, 20h ; ' '
cmp word ptr [rsi+6], 0
jz short loc_219A4
add rcx, [rsi+10h]
cmp rcx, r12
ja short loc_219C4
loc_219A4:
mov ecx, eax
inc eax
cmp rdx, rcx
ja short loc_21976
loc_219AD:
add r15d, edx
mov rcx, r15
cmp rbp, r15
ja loc_21900
xor r15d, r15d
jmp loc_218E8
loc_219C4:
mov ecx, [rsi]
mov rax, [rsp+358h+var_354+4]
add rcx, [rax+18h]; unsigned __int64
mov edi, dword ptr [rsp+358h+var_354]; this
mov r15, qword ptr [rsp+358h+var_348]
mov rsi, r15; int
mov r14, [rsp+358h+var_340]
mov rdx, r14; void *
call _ZN5nglog5toolsL14ReadFromOffsetEiPvmm; nglog::tools::ReadFromOffset(int,void *,ulong,ulong)
test rax, rax
jle short loc_21A01
mov rdi, r15
xor esi, esi
mov rdx, r14
call _memchr
mov bl, 1
test rax, rax
jnz short loc_21A10
loc_21A01:
xor ebx, ebx
mov rdi, r15
xor esi, esi
mov rdx, r14
call _memset
loc_21A10:
mov r15b, 1
loc_21A13:
and r15b, bl
loc_21A16:
mov eax, r15d
add rsp, 328h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_21A2B:
call _abort
|
long long nglog::tools::FindSymbol(
unsigned long long a1,
unsigned int a2,
long long a3,
char *a4,
long long a5,
long long a6,
_QWORD *a7)
{
unsigned long long v7; // rbx
unsigned long long v8; // rsi
unsigned long long v9; // r15
unsigned long long v11; // rbp
unsigned long long v12; // rcx
long long v13; // rcx
unsigned long long v14; // rcx
unsigned long long v15; // rdx
unsigned int v16; // eax
unsigned long long v17; // rcx
long long v18; // rsi
long long v19; // rcx
unsigned long long v20; // rcx
int *v21; // rsi
int v27[206]; // [rsp+20h] [rbp-338h] BYREF
if ( a7 )
{
v8 = a7[7];
LODWORD(v9) = 0;
if ( v8 <= a7[4] )
{
v11 = a7[4] / v8;
v12 = 0LL;
while ( 1 )
{
v7 = v11 - v12;
v13 = a7[3] + a7[7] * v12;
if ( v7 >= 0x20 )
v7 = 32LL;
v14 = nglog::tools::ReadFromOffset(a2, (long long)v27, (char *)(3LL * (unsigned int)(8 * v7)), v13);
if ( __ROR8__(0xAAAAAAAAAAAAAAABLL * v14, 3) >= 0xAAAAAAAAAAAAAABuLL || (v15 = v14 / 0x18, v14 / 0x18 > v7) )
abort(a2);
if ( v14 >= 0x18 )
break;
LABEL_17:
v9 = (unsigned int)(v15 + v9);
v12 = v9;
if ( v11 <= v9 )
{
LODWORD(v9) = 0;
goto LABEL_23;
}
}
v16 = 1;
v17 = 0LL;
while ( 1 )
{
v18 = 3 * v17;
v19 = *(_QWORD *)&v27[6 * v17 + 2];
if ( v19 )
{
v20 = a5 + v19;
if ( v20 <= a1 )
{
v21 = &v27[2 * v18];
if ( *((_WORD *)v21 + 3) )
{
if ( *((_QWORD *)v21 + 2) + v20 > a1 )
break;
}
}
}
v17 = v16++;
if ( v15 <= v17 )
goto LABEL_17;
}
LODWORD(v9) = a3;
if ( (long long)nglog::tools::ReadFromOffset(a2, a3, a4, *(_QWORD *)(a6 + 24) + (unsigned int)*v21) <= 0
|| (LOBYTE(v7) = 1, !memchr(a3, 0LL, a4)) )
{
LOBYTE(v7) = 0;
memset(a3, 0LL, a4);
}
LOBYTE(v9) = 1;
}
LABEL_23:
LOBYTE(v9) = v7 & v9;
}
else
{
LODWORD(v9) = 0;
}
return (unsigned int)v9;
}
|
FindSymbol:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x328
MOV dword ptr [RSP + 0x4],ESI
MOV R14,qword ptr [RSP + 0x360]
TEST R14,R14
JZ 0x001218ed
MOV qword ptr [RSP + 0x8],R9
MOV qword ptr [RSP + 0x10],RDX
MOV qword ptr [RSP + 0x18],RCX
MOV RCX,qword ptr [R14 + 0x20]
MOV RSI,qword ptr [R14 + 0x38]
XOR R15D,R15D
MOV RAX,RCX
XOR EDX,EDX
DIV RSI
CMP RSI,RCX
JBE 0x001218f5
LAB_001218e8:
JMP 0x00121a13
LAB_001218ed:
XOR R15D,R15D
JMP 0x00121a16
LAB_001218f5:
MOV R13,R8
MOV R12,RDI
MOV RBP,RAX
XOR ECX,ECX
LAB_00121900:
MOV RBX,RBP
SUB RBX,RCX
IMUL RCX,qword ptr [R14 + 0x38]
ADD RCX,qword ptr [R14 + 0x18]
CMP RBX,0x20
MOV EAX,0x20
CMOVNC RBX,RAX
LEA EAX,[RBX*0x8]
LEA RDX,[RAX + RAX*0x2]
MOV EDI,dword ptr [RSP + 0x4]
LEA RSI,[RSP + 0x20]
CALL 0x00120e19
MOV RCX,RAX
MOV RDX,-0x5555555555555555
MUL RDX
ROR RAX,0x3
MOV RSI,0xaaaaaaaaaaaaaab
CMP RAX,RSI
JNC 0x00121a2b
SHR RDX,0x4
CMP RDX,RBX
JA 0x00121a2b
CMP RCX,0x18
JC 0x001219ad
MOV EAX,0x1
XOR ECX,ECX
LAB_00121976:
LEA RSI,[RCX + RCX*0x2]
MOV RCX,qword ptr [RSP + RSI*0x8 + 0x28]
TEST RCX,RCX
JZ 0x001219a4
ADD RCX,R13
CMP RCX,R12
JA 0x001219a4
LEA RSI,[RSP + RSI*0x8]
ADD RSI,0x20
CMP word ptr [RSI + 0x6],0x0
JZ 0x001219a4
ADD RCX,qword ptr [RSI + 0x10]
CMP RCX,R12
JA 0x001219c4
LAB_001219a4:
MOV ECX,EAX
INC EAX
CMP RDX,RCX
JA 0x00121976
LAB_001219ad:
ADD R15D,EDX
MOV RCX,R15
CMP RBP,R15
JA 0x00121900
XOR R15D,R15D
JMP 0x001218e8
LAB_001219c4:
MOV ECX,dword ptr [RSI]
MOV RAX,qword ptr [RSP + 0x8]
ADD RCX,qword ptr [RAX + 0x18]
MOV EDI,dword ptr [RSP + 0x4]
MOV R15,qword ptr [RSP + 0x10]
MOV RSI,R15
MOV R14,qword ptr [RSP + 0x18]
MOV RDX,R14
CALL 0x00120e19
TEST RAX,RAX
JLE 0x00121a01
MOV RDI,R15
XOR ESI,ESI
MOV RDX,R14
CALL 0x001075e0
MOV BL,0x1
TEST RAX,RAX
JNZ 0x00121a10
LAB_00121a01:
XOR EBX,EBX
MOV RDI,R15
XOR ESI,ESI
MOV RDX,R14
CALL 0x001072b0
LAB_00121a10:
MOV R15B,0x1
LAB_00121a13:
AND R15B,BL
LAB_00121a16:
MOV EAX,R15D
ADD RSP,0x328
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_00121a2b:
CALL 0x001072c0
|
/* nglog::tools::FindSymbol(unsigned long, int, char*, unsigned long, unsigned long, Elf64_Shdr
const*, Elf64_Shdr const*) */
ulong nglog::tools::FindSymbol
(ulong param_1,int param_2,char *param_3,ulong param_4,ulong param_5,
Elf64_Shdr *param_6,Elf64_Shdr *param_7)
{
int1 auVar1 [16];
uint uVar2;
ulong uVar3;
ulong uVar4;
ulong uVar5;
long lVar6;
void *pvVar7;
ulong uVar8;
byte bVar9;
ulong unaff_RBX;
byte bVar10;
ulong uVar11;
int7 uVar12;
uint local_338;
short local_332;
long alStack_330 [96];
if (param_7 == (Elf64_Shdr *)0x0) {
uVar3 = 0;
}
else {
uVar11 = 0;
uVar3 = param_7->sh_size / param_7->sh_entsize;
if (param_7->sh_entsize <= param_7->sh_size) {
do {
unaff_RBX = uVar3 - uVar11;
if (0x1f < unaff_RBX) {
unaff_RBX = 0x20;
}
uVar4 = ReadFromOffset(param_2,&local_338,(ulong)(uint)((int)unaff_RBX * 8) * 3,
uVar11 * param_7->sh_entsize + param_7->sh_offset);
auVar1._8_8_ = 0;
auVar1._0_8_ = uVar4;
uVar5 = SUB168(auVar1 * ZEXT816(0xaaaaaaaaaaaaaaab),0);
if ((0xaaaaaaaaaaaaaaa < (uVar5 >> 3 | uVar5 << 0x3d)) ||
(uVar5 = uVar4 / 0x18, unaff_RBX < uVar5)) {
/* WARNING: Subroutine does not return */
abort();
}
if (0x17 < uVar4) {
uVar2 = 1;
uVar4 = 0;
do {
if ((alStack_330[uVar4 * 3] != 0) &&
(uVar8 = alStack_330[uVar4 * 3] + param_5, uVar8 <= param_1)) {
if (((&local_332)[uVar4 * 0xc] != 0) && (param_1 < uVar8 + alStack_330[uVar4 * 3 + 1])
) {
lVar6 = ReadFromOffset(param_2,param_3,param_4,
(ulong)(&local_338)[uVar4 * 6] + param_6->sh_offset);
if (lVar6 < 1) {
LAB_00121a01:
bVar9 = 0;
memset(param_3,0,param_4);
}
else {
pvVar7 = memchr(param_3,0,param_4);
bVar9 = 1;
if (pvVar7 == (void *)0x0) goto LAB_00121a01;
}
uVar12 = (int7)((ulong)param_3 >> 8);
bVar10 = 1;
goto LAB_00121a13;
}
}
uVar4 = (ulong)uVar2;
uVar2 = uVar2 + 1;
} while (uVar4 < uVar5);
}
uVar11 = (ulong)(uint)((int)uVar11 + (int)uVar5);
} while (uVar11 < uVar3);
}
bVar10 = 0;
uVar12 = 0;
bVar9 = (byte)unaff_RBX;
LAB_00121a13:
uVar3 = CONCAT71(uVar12,bVar10 & bVar9);
}
return uVar3 & 0xffffffff;
}
|
|
64,342 |
translog_example_table_init
|
eloqsql/storage/maria/unittest/ma_loghandler_examples.c
|
void translog_example_table_init()
{
int i;
log_record_type_descriptor[LOGREC_FIXED_RECORD_0LSN_EXAMPLE]=
INIT_LOGREC_FIXED_RECORD_0LSN_EXAMPLE;
log_record_type_descriptor[LOGREC_VARIABLE_RECORD_0LSN_EXAMPLE]=
INIT_LOGREC_VARIABLE_RECORD_0LSN_EXAMPLE;
log_record_type_descriptor[LOGREC_FIXED_RECORD_1LSN_EXAMPLE]=
INIT_LOGREC_FIXED_RECORD_1LSN_EXAMPLE;
log_record_type_descriptor[LOGREC_VARIABLE_RECORD_1LSN_EXAMPLE]=
INIT_LOGREC_VARIABLE_RECORD_1LSN_EXAMPLE;
log_record_type_descriptor[LOGREC_FIXED_RECORD_2LSN_EXAMPLE]=
INIT_LOGREC_FIXED_RECORD_2LSN_EXAMPLE;
log_record_type_descriptor[LOGREC_VARIABLE_RECORD_2LSN_EXAMPLE]=
INIT_LOGREC_VARIABLE_RECORD_2LSN_EXAMPLE;
for (i= LOGREC_VARIABLE_RECORD_2LSN_EXAMPLE + 1;
i < LOGREC_NUMBER_OF_TYPES;
i++)
log_record_type_descriptor[i].rclass= LOGRECTYPE_NOT_ALLOWED;
#ifndef DBUG_OFF
check_translog_description_table(LOGREC_VARIABLE_RECORD_2LSN_EXAMPLE);
#endif
}
|
O0
|
c
|
translog_example_table_init:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
leaq 0x44c1f1(%rip), %rdi # 0x477a70
addq $0x48, %rdi
leaq 0x2917be(%rip), %rsi # 0x2bd048
movl $0x48, %edx
callq 0x2a090
leaq 0x44c1d5(%rip), %rdi # 0x477a70
addq $0x90, %rdi
leaq 0x2917e7(%rip), %rsi # 0x2bd090
movl $0x48, %edx
callq 0x2a090
leaq 0x44c1b6(%rip), %rdi # 0x477a70
addq $0xd8, %rdi
leaq 0x291810(%rip), %rsi # 0x2bd0d8
movl $0x48, %edx
callq 0x2a090
leaq 0x44c197(%rip), %rdi # 0x477a70
addq $0x120, %rdi # imm = 0x120
leaq 0x291839(%rip), %rsi # 0x2bd120
movl $0x48, %edx
callq 0x2a090
leaq 0x44c178(%rip), %rdi # 0x477a70
addq $0x168, %rdi # imm = 0x168
leaq 0x291862(%rip), %rsi # 0x2bd168
movl $0x48, %edx
callq 0x2a090
leaq 0x44c159(%rip), %rdi # 0x477a70
addq $0x1b0, %rdi # imm = 0x1B0
leaq 0x29188b(%rip), %rsi # 0x2bd1b0
movl $0x48, %edx
callq 0x2a090
movl $0x7, -0x4(%rbp)
cmpl $0x40, -0x4(%rbp)
jge 0x2b95f
movslq -0x4(%rbp), %rcx
leaq 0x44c129(%rip), %rax # 0x477a70
imulq $0x48, %rcx, %rcx
addq %rcx, %rax
movl $0x0, (%rax)
movl -0x4(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x4(%rbp)
jmp 0x2b936
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
nop
|
translog_example_table_init:
push rbp
mov rbp, rsp
sub rsp, 10h
lea rdi, log_record_type_descriptor
add rdi, 48h ; 'H'
lea rsi, INIT_LOGREC_FIXED_RECORD_0LSN_EXAMPLE
mov edx, 48h ; 'H'
call _memcpy
lea rdi, log_record_type_descriptor
add rdi, 90h
lea rsi, INIT_LOGREC_VARIABLE_RECORD_0LSN_EXAMPLE
mov edx, 48h ; 'H'
call _memcpy
lea rdi, log_record_type_descriptor
add rdi, 0D8h
lea rsi, INIT_LOGREC_FIXED_RECORD_1LSN_EXAMPLE
mov edx, 48h ; 'H'
call _memcpy
lea rdi, log_record_type_descriptor
add rdi, 120h
lea rsi, INIT_LOGREC_VARIABLE_RECORD_1LSN_EXAMPLE
mov edx, 48h ; 'H'
call _memcpy
lea rdi, log_record_type_descriptor
add rdi, 168h
lea rsi, INIT_LOGREC_FIXED_RECORD_2LSN_EXAMPLE
mov edx, 48h ; 'H'
call _memcpy
lea rdi, log_record_type_descriptor
add rdi, 1B0h
lea rsi, INIT_LOGREC_VARIABLE_RECORD_2LSN_EXAMPLE
mov edx, 48h ; 'H'
call _memcpy
mov [rbp+var_4], 7
loc_2B936:
cmp [rbp+var_4], 40h ; '@'
jge short loc_2B95F
movsxd rcx, [rbp+var_4]
lea rax, log_record_type_descriptor
imul rcx, 48h ; 'H'
add rax, rcx
mov dword ptr [rax], 0
mov eax, [rbp+var_4]
add eax, 1
mov [rbp+var_4], eax
jmp short loc_2B936
loc_2B95F:
add rsp, 10h
pop rbp
retn
|
long long translog_example_table_init()
{
long long result; // rax
int i; // [rsp+Ch] [rbp-4h]
memcpy(&log_record_type_descriptor[18], &INIT_LOGREC_FIXED_RECORD_0LSN_EXAMPLE, 72LL);
memcpy(&log_record_type_descriptor[36], &INIT_LOGREC_VARIABLE_RECORD_0LSN_EXAMPLE, 72LL);
memcpy(&log_record_type_descriptor[54], &INIT_LOGREC_FIXED_RECORD_1LSN_EXAMPLE, 72LL);
memcpy(&log_record_type_descriptor[72], &INIT_LOGREC_VARIABLE_RECORD_1LSN_EXAMPLE, 72LL);
memcpy(&log_record_type_descriptor[90], &INIT_LOGREC_FIXED_RECORD_2LSN_EXAMPLE, 72LL);
result = memcpy(&log_record_type_descriptor[108], &INIT_LOGREC_VARIABLE_RECORD_2LSN_EXAMPLE, 72LL);
for ( i = 7; i < 64; ++i )
{
log_record_type_descriptor[18 * i] = 0;
result = (unsigned int)(i + 1);
}
return result;
}
|
translog_example_table_init:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x10
LEA RDI,[0x577a70]
ADD RDI,0x48
LEA RSI,[0x3bd048]
MOV EDX,0x48
CALL 0x0012a090
LEA RDI,[0x577a70]
ADD RDI,0x90
LEA RSI,[0x3bd090]
MOV EDX,0x48
CALL 0x0012a090
LEA RDI,[0x577a70]
ADD RDI,0xd8
LEA RSI,[0x3bd0d8]
MOV EDX,0x48
CALL 0x0012a090
LEA RDI,[0x577a70]
ADD RDI,0x120
LEA RSI,[0x3bd120]
MOV EDX,0x48
CALL 0x0012a090
LEA RDI,[0x577a70]
ADD RDI,0x168
LEA RSI,[0x3bd168]
MOV EDX,0x48
CALL 0x0012a090
LEA RDI,[0x577a70]
ADD RDI,0x1b0
LEA RSI,[0x3bd1b0]
MOV EDX,0x48
CALL 0x0012a090
MOV dword ptr [RBP + -0x4],0x7
LAB_0012b936:
CMP dword ptr [RBP + -0x4],0x40
JGE 0x0012b95f
MOVSXD RCX,dword ptr [RBP + -0x4]
LEA RAX,[0x577a70]
IMUL RCX,RCX,0x48
ADD RAX,RCX
MOV dword ptr [RAX],0x0
MOV EAX,dword ptr [RBP + -0x4]
ADD EAX,0x1
MOV dword ptr [RBP + -0x4],EAX
JMP 0x0012b936
LAB_0012b95f:
ADD RSP,0x10
POP RBP
RET
|
void translog_example_table_init(void)
{
int local_c;
memcpy(log_record_type_descriptor + 0x48,INIT_LOGREC_FIXED_RECORD_0LSN_EXAMPLE,0x48);
memcpy(log_record_type_descriptor + 0x90,INIT_LOGREC_VARIABLE_RECORD_0LSN_EXAMPLE,0x48);
memcpy(log_record_type_descriptor + 0xd8,INIT_LOGREC_FIXED_RECORD_1LSN_EXAMPLE,0x48);
memcpy(log_record_type_descriptor + 0x120,INIT_LOGREC_VARIABLE_RECORD_1LSN_EXAMPLE,0x48);
memcpy(log_record_type_descriptor + 0x168,INIT_LOGREC_FIXED_RECORD_2LSN_EXAMPLE,0x48);
memcpy(log_record_type_descriptor + 0x1b0,INIT_LOGREC_VARIABLE_RECORD_2LSN_EXAMPLE,0x48);
for (local_c = 7; local_c < 0x40; local_c = local_c + 1) {
*(int4 *)(log_record_type_descriptor + (long)local_c * 0x48) = 0;
}
return;
}
|
|
64,343 |
console::pop_cursor()
|
monkey531[P]llama/common/console.cpp
|
static void pop_cursor() {
#if defined(_WIN32)
if (hConsole != NULL) {
CONSOLE_SCREEN_BUFFER_INFO bufferInfo;
GetConsoleScreenBufferInfo(hConsole, &bufferInfo);
COORD newCursorPosition = bufferInfo.dwCursorPosition;
if (newCursorPosition.X == 0) {
newCursorPosition.X = bufferInfo.dwSize.X - 1;
newCursorPosition.Y -= 1;
} else {
newCursorPosition.X -= 1;
}
SetConsoleCursorPosition(hConsole, newCursorPosition);
return;
}
#endif
putc('\b', out);
}
|
O2
|
cpp
|
console::pop_cursor():
movq 0x73813(%rip), %rsi # 0x100340
pushq $0x8
popq %rdi
jmp 0x241e0
nopl (%rax)
|
_ZN7consoleL10pop_cursorEv:
mov rsi, cs:_ZN7consoleL3outE; console::out
push 8
pop rdi
jmp _putc
|
long long console::pop_cursor(console *this)
{
return putc(8LL, console::out);
}
|
pop_cursor:
MOV RSI,qword ptr [0x00200340]
PUSH 0x8
POP RDI
JMP 0x001241e0
|
/* console::pop_cursor() */
void console::pop_cursor(void)
{
putc(8,out);
return;
}
|
|
64,344 |
translog_get_horizon
|
eloqsql/storage/maria/ma_loghandler.c
|
TRANSLOG_ADDRESS translog_get_horizon()
{
TRANSLOG_ADDRESS res;
DBUG_ASSERT(translog_status == TRANSLOG_OK ||
translog_status == TRANSLOG_READONLY);
translog_lock();
res= log_descriptor.horizon;
translog_unlock();
return res;
}
|
O0
|
c
|
translog_get_horizon:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
jmp 0x32c2a
callq 0x2e150
movq 0xc46c82(%rip), %rax # 0xc798b8
movq %rax, -0x8(%rbp)
callq 0x2e240
movq -0x8(%rbp), %rax
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax)
|
translog_get_horizon:
push rbp
mov rbp, rsp
sub rsp, 10h
jmp short $+2
loc_32C2A:
call translog_lock
mov rax, cs:qword_C798B8
mov [rbp+var_8], rax
call translog_unlock
mov rax, [rbp+var_8]
add rsp, 10h
pop rbp
retn
|
long long translog_get_horizon()
{
long long v1; // [rsp+8h] [rbp-8h]
translog_lock();
v1 = qword_C798B8;
translog_unlock();
return v1;
}
|
translog_get_horizon:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x10
JMP 0x00132c2a
LAB_00132c2a:
CALL 0x0012e150
MOV RAX,qword ptr [0x00d798b8]
MOV qword ptr [RBP + -0x8],RAX
CALL 0x0012e240
MOV RAX,qword ptr [RBP + -0x8]
ADD RSP,0x10
POP RBP
RET
|
int8 translog_get_horizon(void)
{
int8 uVar1;
translog_lock();
uVar1 = DAT_00d798b8;
translog_unlock();
return uVar1;
}
|
|
64,345 |
translog_next_LSN
|
eloqsql/storage/maria/ma_loghandler.c
|
LSN translog_next_LSN(TRANSLOG_ADDRESS addr, TRANSLOG_ADDRESS horizon)
{
TRANSLOG_SCANNER_DATA scanner;
LSN result;
DBUG_ENTER("translog_next_LSN");
if (horizon == LSN_IMPOSSIBLE)
horizon= translog_get_horizon();
if (addr == horizon)
DBUG_RETURN(LSN_IMPOSSIBLE);
translog_scanner_init(addr, 0, &scanner, 1);
/*
addr can point not to a chunk beginning but page end so next
page beginning.
*/
if (addr % TRANSLOG_PAGE_SIZE == 0)
{
/*
We are emulating the page end which cased such horizon value to
trigger translog_scanner_eop().
We can't just increase addr on page header overhead because it
can be file end so we allow translog_get_next_chunk() to skip
to the next page in correct way
*/
scanner.page_addr-= TRANSLOG_PAGE_SIZE;
scanner.page_offset= TRANSLOG_PAGE_SIZE;
#ifndef DBUG_OFF
scanner.page= NULL; /* prevent using incorrect page content */
#endif
}
/* addr can point not to a chunk beginning but to a page end */
if (translog_scanner_eop(&scanner))
{
if (translog_get_next_chunk(&scanner))
{
result= LSN_ERROR;
goto out;
}
if (scanner.page == END_OF_LOG)
{
result= LSN_IMPOSSIBLE;
goto out;
}
}
while (!translog_is_LSN_chunk(scanner.page[scanner.page_offset]) &&
scanner.page[scanner.page_offset] != TRANSLOG_FILLER)
{
if (translog_get_next_chunk(&scanner))
{
result= LSN_ERROR;
goto out;
}
if (scanner.page == END_OF_LOG)
{
result= LSN_IMPOSSIBLE;
goto out;
}
}
if (scanner.page[scanner.page_offset] == TRANSLOG_FILLER)
result= LSN_IMPOSSIBLE; /* reached page filler */
else
result= scanner.page_addr + scanner.page_offset;
out:
translog_destroy_scanner(&scanner);
DBUG_RETURN(result);
}
|
O0
|
c
|
translog_next_LSN:
pushq %rbp
movq %rsp, %rbp
subq $0x2070, %rsp # imm = 0x2070
movq %fs:0x28, %rax
movq %rax, -0x8(%rbp)
movq %rdi, -0x2048(%rbp)
movq %rsi, -0x2050(%rbp)
cmpq $0x0, -0x2050(%rbp)
jne 0x570ac
callq 0x54b90
movq %rax, -0x2050(%rbp)
movq -0x2048(%rbp), %rax
cmpq -0x2050(%rbp), %rax
jne 0x570ce
jmp 0x570be
movq $0x0, -0x2040(%rbp)
jmp 0x5722e
movq -0x2048(%rbp), %rdi
xorl %esi, %esi
leaq -0x2038(%rbp), %rdx
movl $0x1, %ecx
callq 0x52ce0
movq -0x2048(%rbp), %rax
movl $0x2000, %ecx # imm = 0x2000
cqto
idivq %rcx
cmpq $0x0, %rdx
jne 0x57114
movq -0x38(%rbp), %rax
subq $0x2000, %rax # imm = 0x2000
movq %rax, -0x38(%rbp)
movl $0x2000, -0x10(%rbp) # imm = 0x2000
leaq -0x2038(%rbp), %rdi
callq 0x57270
cmpb $0x0, %al
je 0x57163
leaq -0x2038(%rbp), %rdi
callq 0x52e30
cmpb $0x0, %al
je 0x57144
movq $0x1, -0x2058(%rbp)
jmp 0x57214
leaq 0xc23195(%rip), %rax # 0xc7a2e0
cmpq %rax, -0x20(%rbp)
jne 0x57161
movq $0x0, -0x2058(%rbp)
jmp 0x57214
jmp 0x57163
jmp 0x57165
movq -0x20(%rbp), %rax
movl -0x10(%rbp), %ecx
movzbl (%rax,%rcx), %edi
callq 0x52dd0
movb %al, %cl
xorl %eax, %eax
cmpb $0x0, %cl
movb %al, -0x2059(%rbp)
jne 0x5719d
movq -0x20(%rbp), %rax
movl -0x10(%rbp), %ecx
movzbl (%rax,%rcx), %eax
cmpl $0xff, %eax
setne %al
movb %al, -0x2059(%rbp)
movb -0x2059(%rbp), %al
testb $0x1, %al
jne 0x571a9
jmp 0x571e2
leaq -0x2038(%rbp), %rdi
callq 0x52e30
cmpb $0x0, %al
je 0x571c6
movq $0x1, -0x2058(%rbp)
jmp 0x57214
leaq 0xc23113(%rip), %rax # 0xc7a2e0
cmpq %rax, -0x20(%rbp)
jne 0x571e0
movq $0x0, -0x2058(%rbp)
jmp 0x57214
jmp 0x57165
movq -0x20(%rbp), %rax
movl -0x10(%rbp), %ecx
movzbl (%rax,%rcx), %eax
cmpl $0xff, %eax
jne 0x57201
movq $0x0, -0x2058(%rbp)
jmp 0x57212
movq -0x38(%rbp), %rax
movl -0x10(%rbp), %ecx
addq %rcx, %rax
movq %rax, -0x2058(%rbp)
jmp 0x57214
leaq -0x2038(%rbp), %rdi
callq 0x53010
movq -0x2058(%rbp), %rax
movq %rax, -0x2040(%rbp)
movq -0x2040(%rbp), %rax
movq %rax, -0x2068(%rbp)
movq %fs:0x28, %rax
movq -0x8(%rbp), %rcx
cmpq %rcx, %rax
jne 0x5725e
movq -0x2068(%rbp), %rax
addq $0x2070, %rsp # imm = 0x2070
popq %rbp
retq
callq 0x2a270
nopw %cs:(%rax,%rax)
|
translog_next_LSN:
push rbp
mov rbp, rsp
sub rsp, 2070h
mov rax, fs:28h
mov [rbp+var_8], rax
mov [rbp+var_2048], rdi
mov [rbp+var_2050], rsi
cmp [rbp+var_2050], 0
jnz short loc_570AC
call translog_get_horizon
mov [rbp+var_2050], rax
loc_570AC:
mov rax, [rbp+var_2048]
cmp rax, [rbp+var_2050]
jnz short loc_570CE
jmp short $+2
loc_570BE:
mov [rbp+var_2040], 0
jmp loc_5722E
loc_570CE:
mov rdi, [rbp+var_2048]
xor esi, esi
lea rdx, [rbp+var_2038]
mov ecx, 1
call translog_scanner_init
mov rax, [rbp+var_2048]
mov ecx, 2000h
cqo
idiv rcx
cmp rdx, 0
jnz short loc_57114
mov rax, [rbp+var_38]
sub rax, 2000h
mov [rbp+var_38], rax
mov [rbp+var_10], 2000h
loc_57114:
lea rdi, [rbp+var_2038]
call translog_scanner_eop
cmp al, 0
jz short loc_57163
lea rdi, [rbp+var_2038]
call translog_get_next_chunk
cmp al, 0
jz short loc_57144
mov [rbp+var_2058], 1
jmp loc_57214
loc_57144:
lea rax, end_of_log
cmp [rbp+var_20], rax
jnz short loc_57161
mov [rbp+var_2058], 0
jmp loc_57214
loc_57161:
jmp short $+2
loc_57163:
jmp short $+2
loc_57165:
mov rax, [rbp+var_20]
mov ecx, [rbp+var_10]
movzx edi, byte ptr [rax+rcx]
call translog_is_LSN_chunk
mov cl, al
xor eax, eax
cmp cl, 0
mov [rbp+var_2059], al
jnz short loc_5719D
mov rax, [rbp+var_20]
mov ecx, [rbp+var_10]
movzx eax, byte ptr [rax+rcx]
cmp eax, 0FFh
setnz al
mov [rbp+var_2059], al
loc_5719D:
mov al, [rbp+var_2059]
test al, 1
jnz short loc_571A9
jmp short loc_571E2
loc_571A9:
lea rdi, [rbp+var_2038]
call translog_get_next_chunk
cmp al, 0
jz short loc_571C6
mov [rbp+var_2058], 1
jmp short loc_57214
loc_571C6:
lea rax, end_of_log
cmp [rbp+var_20], rax
jnz short loc_571E0
mov [rbp+var_2058], 0
jmp short loc_57214
loc_571E0:
jmp short loc_57165
loc_571E2:
mov rax, [rbp+var_20]
mov ecx, [rbp+var_10]
movzx eax, byte ptr [rax+rcx]
cmp eax, 0FFh
jnz short loc_57201
mov [rbp+var_2058], 0
jmp short loc_57212
loc_57201:
mov rax, [rbp+var_38]
mov ecx, [rbp+var_10]
add rax, rcx
mov [rbp+var_2058], rax
loc_57212:
jmp short $+2
loc_57214:
lea rdi, [rbp+var_2038]
call translog_destroy_scanner
mov rax, [rbp+var_2058]
mov [rbp+var_2040], rax
loc_5722E:
mov rax, [rbp+var_2040]
mov [rbp+var_2068], rax
mov rax, fs:28h
mov rcx, [rbp+var_8]
cmp rax, rcx
jnz short loc_5725E
mov rax, [rbp+var_2068]
add rsp, 2070h
pop rbp
retn
loc_5725E:
call ___stack_chk_fail
|
long long translog_next_LSN(long long a1, long long a2)
{
bool v3; // [rsp+17h] [rbp-2059h]
long long v4; // [rsp+18h] [rbp-2058h]
long long horizon; // [rsp+20h] [rbp-2050h]
_BYTE v7[8192]; // [rsp+38h] [rbp-2038h] BYREF
long long v8; // [rsp+2038h] [rbp-38h]
_BYTE *v9; // [rsp+2050h] [rbp-20h]
unsigned int v10; // [rsp+2060h] [rbp-10h]
unsigned long long v11; // [rsp+2068h] [rbp-8h]
v11 = __readfsqword(0x28u);
horizon = a2;
if ( !a2 )
horizon = translog_get_horizon();
if ( a1 == horizon )
return 0LL;
translog_scanner_init(a1, 0, (long long)v7, 1);
if ( !(a1 % 0x2000) )
{
v8 -= 0x2000LL;
v10 = 0x2000;
}
if ( (unsigned __int8)translog_scanner_eop(v7) )
{
if ( translog_get_next_chunk((long long)v7) )
{
v4 = 1LL;
}
else
{
if ( v9 != (_BYTE *)&end_of_log )
goto LABEL_12;
v4 = 0LL;
}
}
else
{
while ( 1 )
{
LABEL_12:
v3 = 0;
if ( !(unsigned __int8)translog_is_LSN_chunk(v9[v10]) )
v3 = (unsigned __int8)v9[v10] != 255;
if ( !v3 )
break;
if ( translog_get_next_chunk((long long)v7) )
{
v4 = 1LL;
goto LABEL_23;
}
if ( v9 == (_BYTE *)&end_of_log )
{
v4 = 0LL;
goto LABEL_23;
}
}
if ( (unsigned __int8)v9[v10] == 255 )
v4 = 0LL;
else
v4 = v10 + v8;
}
LABEL_23:
translog_destroy_scanner((long long)v7);
return v4;
}
|
translog_next_LSN:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x2070
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x8],RAX
MOV qword ptr [RBP + -0x2048],RDI
MOV qword ptr [RBP + -0x2050],RSI
CMP qword ptr [RBP + -0x2050],0x0
JNZ 0x001570ac
CALL 0x00154b90
MOV qword ptr [RBP + -0x2050],RAX
LAB_001570ac:
MOV RAX,qword ptr [RBP + -0x2048]
CMP RAX,qword ptr [RBP + -0x2050]
JNZ 0x001570ce
JMP 0x001570be
LAB_001570be:
MOV qword ptr [RBP + -0x2040],0x0
JMP 0x0015722e
LAB_001570ce:
MOV RDI,qword ptr [RBP + -0x2048]
XOR ESI,ESI
LEA RDX,[RBP + -0x2038]
MOV ECX,0x1
CALL 0x00152ce0
MOV RAX,qword ptr [RBP + -0x2048]
MOV ECX,0x2000
CQO
IDIV RCX
CMP RDX,0x0
JNZ 0x00157114
MOV RAX,qword ptr [RBP + -0x38]
SUB RAX,0x2000
MOV qword ptr [RBP + -0x38],RAX
MOV dword ptr [RBP + -0x10],0x2000
LAB_00157114:
LEA RDI,[RBP + -0x2038]
CALL 0x00157270
CMP AL,0x0
JZ 0x00157163
LEA RDI,[RBP + -0x2038]
CALL 0x00152e30
CMP AL,0x0
JZ 0x00157144
MOV qword ptr [RBP + -0x2058],0x1
JMP 0x00157214
LAB_00157144:
LEA RAX,[0xd7a2e0]
CMP qword ptr [RBP + -0x20],RAX
JNZ 0x00157161
MOV qword ptr [RBP + -0x2058],0x0
JMP 0x00157214
LAB_00157161:
JMP 0x00157163
LAB_00157163:
JMP 0x00157165
LAB_00157165:
MOV RAX,qword ptr [RBP + -0x20]
MOV ECX,dword ptr [RBP + -0x10]
MOVZX EDI,byte ptr [RAX + RCX*0x1]
CALL 0x00152dd0
MOV CL,AL
XOR EAX,EAX
CMP CL,0x0
MOV byte ptr [RBP + -0x2059],AL
JNZ 0x0015719d
MOV RAX,qword ptr [RBP + -0x20]
MOV ECX,dword ptr [RBP + -0x10]
MOVZX EAX,byte ptr [RAX + RCX*0x1]
CMP EAX,0xff
SETNZ AL
MOV byte ptr [RBP + -0x2059],AL
LAB_0015719d:
MOV AL,byte ptr [RBP + -0x2059]
TEST AL,0x1
JNZ 0x001571a9
JMP 0x001571e2
LAB_001571a9:
LEA RDI,[RBP + -0x2038]
CALL 0x00152e30
CMP AL,0x0
JZ 0x001571c6
MOV qword ptr [RBP + -0x2058],0x1
JMP 0x00157214
LAB_001571c6:
LEA RAX,[0xd7a2e0]
CMP qword ptr [RBP + -0x20],RAX
JNZ 0x001571e0
MOV qword ptr [RBP + -0x2058],0x0
JMP 0x00157214
LAB_001571e0:
JMP 0x00157165
LAB_001571e2:
MOV RAX,qword ptr [RBP + -0x20]
MOV ECX,dword ptr [RBP + -0x10]
MOVZX EAX,byte ptr [RAX + RCX*0x1]
CMP EAX,0xff
JNZ 0x00157201
MOV qword ptr [RBP + -0x2058],0x0
JMP 0x00157212
LAB_00157201:
MOV RAX,qword ptr [RBP + -0x38]
MOV ECX,dword ptr [RBP + -0x10]
ADD RAX,RCX
MOV qword ptr [RBP + -0x2058],RAX
LAB_00157212:
JMP 0x00157214
LAB_00157214:
LEA RDI,[RBP + -0x2038]
CALL 0x00153010
MOV RAX,qword ptr [RBP + -0x2058]
MOV qword ptr [RBP + -0x2040],RAX
LAB_0015722e:
MOV RAX,qword ptr [RBP + -0x2040]
MOV qword ptr [RBP + -0x2068],RAX
MOV RAX,qword ptr FS:[0x28]
MOV RCX,qword ptr [RBP + -0x8]
CMP RAX,RCX
JNZ 0x0015725e
MOV RAX,qword ptr [RBP + -0x2068]
ADD RSP,0x2070
POP RBP
RET
LAB_0015725e:
CALL 0x0012a270
|
long translog_next_LSN(long param_1,long param_2)
{
char cVar1;
long in_FS_OFFSET;
bool bVar2;
long local_2060;
long local_2058;
long local_2048;
int1 local_2040 [8192];
long local_40;
int1 *local_28;
uint local_18;
long local_10;
local_10 = *(long *)(in_FS_OFFSET + 0x28);
local_2058 = param_2;
if (param_2 == 0) {
local_2058 = translog_get_horizon();
}
if (param_1 == local_2058) {
local_2048 = 0;
goto LAB_0015722e;
}
translog_scanner_init(param_1,0,local_2040,1);
if (param_1 % 0x2000 == 0) {
local_40 = local_40 + -0x2000;
local_18 = 0x2000;
}
cVar1 = translog_scanner_eop(local_2040);
if (cVar1 == '\0') {
LAB_00157165:
do {
cVar1 = translog_is_LSN_chunk(local_28[local_18]);
bVar2 = false;
if (cVar1 == '\0') {
bVar2 = local_28[local_18] != -1;
}
if (!bVar2) {
if (local_28[local_18] == -1) {
local_2060 = 0;
}
else {
local_2060 = local_40 + (ulong)local_18;
}
goto LAB_00157214;
}
cVar1 = translog_get_next_chunk(local_2040);
if (cVar1 != '\0') {
local_2060 = 1;
goto LAB_00157214;
}
} while (local_28 != &end_of_log);
local_2060 = 0;
}
else {
cVar1 = translog_get_next_chunk(local_2040);
if (cVar1 == '\0') {
if (local_28 != &end_of_log) goto LAB_00157165;
local_2060 = 0;
}
else {
local_2060 = 1;
}
}
LAB_00157214:
translog_destroy_scanner(local_2040);
local_2048 = local_2060;
LAB_0015722e:
if (*(long *)(in_FS_OFFSET + 0x28) != local_10) {
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
return local_2048;
}
|
|
64,346 |
is_gguf_file(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
|
7CodeWizard[P]stablediffusion/model.cpp
|
bool is_gguf_file(const std::string& file_path) {
std::ifstream file(file_path, std::ios::binary);
if (!file.is_open()) {
return false;
}
char magic[4];
file.read(magic, sizeof(magic));
if (!file) {
return false;
}
for (uint32_t i = 0; i < sizeof(magic); i++) {
if (magic[i] != GGUF_MAGIC[i]) {
return false;
}
}
return true;
}
|
O1
|
cpp
|
is_gguf_file(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&):
pushq %rbx
subq $0x210, %rsp # imm = 0x210
movq %rdi, %rsi
leaq 0x8(%rsp), %rdi
movl $0x4, %edx
callq 0xa9f0
leaq 0x80(%rsp), %rdi
callq 0xa100
testb %al, %al
je 0x6895f
leaq 0x8(%rsp), %rdi
leaq 0x4(%rsp), %rsi
movl $0x4, %edx
callq 0xa750
movq 0x8(%rsp), %rax
movq -0x18(%rax), %rax
xorl %ebx, %ebx
testb $0x5, 0x28(%rsp,%rax)
jne 0x68961
cmpb $0x47, 0x4(%rsp)
jne 0x68961
xorl %edx, %edx
leaq 0x59491(%rip), %rax # 0xc1dce
movq %rdx, %rcx
cmpq $0x3, %rdx
je 0x68956
movb 0x5(%rsp,%rcx), %sil
leaq 0x1(%rcx), %rdx
cmpb 0x1(%rcx,%rax), %sil
je 0x6893d
cmpq $0x3, %rcx
setae %bl
jmp 0x68961
xorl %ebx, %ebx
leaq 0x8(%rsp), %rdi
callq 0xa110
movl %ebx, %eax
addq $0x210, %rsp # imm = 0x210
popq %rbx
retq
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0xa110
movq %rbx, %rdi
callq 0xaae0
|
_Z12is_gguf_fileRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE:
push rbx
sub rsp, 210h
mov rsi, rdi
lea rdi, [rsp+218h+var_210]
mov edx, 4
call __ZNSt14basic_ifstreamIcSt11char_traitsIcEEC1ERKNSt7__cxx1112basic_stringIcS1_SaIcEEESt13_Ios_Openmode; std::ifstream::basic_ifstream(std::string const&,std::_Ios_Openmode)
lea rdi, [rsp+218h+var_198]
call __ZNKSt12__basic_fileIcE7is_openEv; std::__basic_file<char>::is_open(void)
test al, al
jz short loc_6895F
lea rdi, [rsp+218h+var_210]; this
lea rsi, [rsp+218h+var_214]; char *
mov edx, 4; __int64
call __ZNSi4readEPcl; std::istream::read(char *,long)
mov rax, [rsp+218h+var_210]
mov rax, [rax-18h]
xor ebx, ebx
test [rsp+rax+218h+var_1F0], 5
jnz short loc_68961
cmp [rsp+218h+var_214], 47h ; 'G'
jnz short loc_68961
xor edx, edx
lea rax, aGguf; "GGUF"
loc_6893D:
mov rcx, rdx
cmp rdx, 3
jz short loc_68956
mov sil, [rsp+rcx+218h+var_213]
lea rdx, [rcx+1]
cmp sil, [rcx+rax+1]
jz short loc_6893D
loc_68956:
cmp rcx, 3
setnb bl
jmp short loc_68961
loc_6895F:
xor ebx, ebx
loc_68961:
lea rdi, [rsp+218h+var_210]
call __ZNSt14basic_ifstreamIcSt11char_traitsIcEED1Ev; std::ifstream::~ifstream()
mov eax, ebx
add rsp, 210h
pop rbx
retn
mov rbx, rax
lea rdi, [rsp+arg_0]
call __ZNSt14basic_ifstreamIcSt11char_traitsIcEED1Ev; std::ifstream::~ifstream()
mov rdi, rbx
call __Unwind_Resume
|
long long is_gguf_file(long long a1)
{
unsigned int v1; // ebx
unsigned long long v2; // rdx
unsigned long long v3; // rcx
char v4; // si
char v6[4]; // [rsp+4h] [rbp-214h] BYREF
_QWORD v7[15]; // [rsp+8h] [rbp-210h] BYREF
_BYTE v8[408]; // [rsp+80h] [rbp-198h] BYREF
std::ifstream::basic_ifstream(v7, a1, 4LL);
if ( (unsigned __int8)std::__basic_file<char>::is_open(v8) )
{
std::istream::read((std::istream *)v7, v6, 4LL);
v1 = 0;
if ( (*((_BYTE *)&v7[4] + *(_QWORD *)(v7[0] - 24LL)) & 5) == 0 && v6[0] == 71 )
{
v2 = 0LL;
do
{
v3 = v2;
if ( v2 == 3 )
break;
v4 = v6[++v2];
}
while ( v4 == aGguf[v3 + 1] );
LOBYTE(v1) = v3 >= 3;
}
}
else
{
v1 = 0;
}
std::ifstream::~ifstream(v7);
return v1;
}
| |||
64,347 |
is_gguf_file(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
|
7CodeWizard[P]stablediffusion/model.cpp
|
bool is_gguf_file(const std::string& file_path) {
std::ifstream file(file_path, std::ios::binary);
if (!file.is_open()) {
return false;
}
char magic[4];
file.read(magic, sizeof(magic));
if (!file) {
return false;
}
for (uint32_t i = 0; i < sizeof(magic); i++) {
if (magic[i] != GGUF_MAGIC[i]) {
return false;
}
}
return true;
}
|
O2
|
cpp
|
is_gguf_file(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&):
pushq %rbx
subq $0x210, %rsp # imm = 0x210
movq %rdi, %rsi
leaq 0x8(%rsp), %rdi
pushq $0x4
popq %rdx
callq 0xa9e0
leaq 0x80(%rsp), %rdi
callq 0xa100
testb %al, %al
je 0x4735f
leaq 0x8(%rsp), %rdi
leaq 0x4(%rsp), %rsi
pushq $0x4
popq %rdx
callq 0xa760
movq 0x8(%rsp), %rax
movq -0x18(%rax), %rax
testb $0x5, 0x28(%rsp,%rax)
je 0x47376
xorl %ebx, %ebx
leaq 0x8(%rsp), %rdi
callq 0xa120
movl %ebx, %eax
addq $0x210, %rsp # imm = 0x210
popq %rbx
retq
xorl %eax, %eax
leaq 0x5695f(%rip), %rcx # 0x9dcde
cmpq $0x4, %rax
sete %bl
je 0x47361
movb 0x4(%rsp,%rax), %dl
leaq 0x1(%rax), %rsi
cmpb (%rax,%rcx), %dl
movq %rsi, %rax
je 0x4737f
jmp 0x47361
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0xa120
movq %rbx, %rdi
callq 0xaab0
|
_Z12is_gguf_fileRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE:
push rbx
sub rsp, 210h
mov rsi, rdi
lea rdi, [rsp+218h+var_210]
push 4
pop rdx
call __ZNSt14basic_ifstreamIcSt11char_traitsIcEEC1ERKNSt7__cxx1112basic_stringIcS1_SaIcEEESt13_Ios_Openmode; std::ifstream::basic_ifstream(std::string const&,std::_Ios_Openmode)
lea rdi, [rsp+218h+var_198]
call __ZNKSt12__basic_fileIcE7is_openEv; std::__basic_file<char>::is_open(void)
test al, al
jz short loc_4735F
lea rdi, [rsp+218h+var_210]; this
lea rsi, [rsp+218h+var_214]; char *
push 4
pop rdx; __int64
call __ZNSi4readEPcl; std::istream::read(char *,long)
mov rax, [rsp+218h+var_210]
mov rax, [rax-18h]
test [rsp+rax+218h+var_1F0], 5
jz short loc_47376
loc_4735F:
xor ebx, ebx
loc_47361:
lea rdi, [rsp+218h+var_210]
call __ZNSt14basic_ifstreamIcSt11char_traitsIcEED1Ev; std::ifstream::~ifstream()
mov eax, ebx
add rsp, 210h
pop rbx
retn
loc_47376:
xor eax, eax
lea rcx, aGguf; "GGUF"
loc_4737F:
cmp rax, 4
setz bl
jz short loc_47361
mov dl, [rsp+rax+218h+var_214]
lea rsi, [rax+1]
cmp dl, [rax+rcx]
mov rax, rsi
jz short loc_4737F
jmp short loc_47361
mov rbx, rax
lea rdi, [rsp+arg_0]
call __ZNSt14basic_ifstreamIcSt11char_traitsIcEED1Ev; std::ifstream::~ifstream()
mov rdi, rbx
call __Unwind_Resume
|
long long is_gguf_file(long long a1)
{
unsigned int v1; // ebx
long long v3; // rax
bool v4; // zf
char v5[4]; // [rsp+4h] [rbp-214h] BYREF
_QWORD v6[15]; // [rsp+8h] [rbp-210h] BYREF
_BYTE v7[408]; // [rsp+80h] [rbp-198h] BYREF
std::ifstream::basic_ifstream(v6, a1, 4LL);
if ( (unsigned __int8)std::__basic_file<char>::is_open(v7)
&& (std::istream::read((std::istream *)v6, v5, 4LL), (*((_BYTE *)&v6[4] + *(_QWORD *)(v6[0] - 24LL)) & 5) == 0) )
{
v3 = 0LL;
do
{
LOBYTE(v1) = v3 == 4;
if ( v3 == 4 )
break;
v4 = v5[v3] == aGguf[v3];
++v3;
}
while ( v4 );
}
else
{
v1 = 0;
}
std::ifstream::~ifstream(v6);
return v1;
}
|
is_gguf_file:
PUSH RBX
SUB RSP,0x210
MOV RSI,RDI
LEA RDI,[RSP + 0x8]
PUSH 0x4
POP RDX
CALL 0x0010a9e0
LEA RDI,[RSP + 0x80]
CALL 0x0010a100
TEST AL,AL
JZ 0x0014735f
LAB_0014733d:
LEA RDI,[RSP + 0x8]
LEA RSI,[RSP + 0x4]
PUSH 0x4
POP RDX
CALL 0x0010a760
LAB_0014734f:
MOV RAX,qword ptr [RSP + 0x8]
MOV RAX,qword ptr [RAX + -0x18]
TEST byte ptr [RSP + RAX*0x1 + 0x28],0x5
JZ 0x00147376
LAB_0014735f:
XOR EBX,EBX
LAB_00147361:
LEA RDI,[RSP + 0x8]
CALL 0x0010a120
MOV EAX,EBX
ADD RSP,0x210
POP RBX
RET
LAB_00147376:
XOR EAX,EAX
LEA RCX,[0x19dcde]
LAB_0014737f:
CMP RAX,0x4
SETZ BL
JZ 0x00147361
MOV DL,byte ptr [RSP + RAX*0x1 + 0x4]
LEA RSI,[RAX + 0x1]
CMP DL,byte ptr [RAX + RCX*0x1]
MOV RAX,RSI
JZ 0x0014737f
JMP 0x00147361
|
/* is_gguf_file(std::__cxx11::string const&) */
ulong is_gguf_file(string *param_1)
{
char *pcVar1;
char *pcVar2;
char cVar3;
long lVar4;
ulong unaff_RBX;
char local_214 [4];
long local_210 [4];
byte abStack_1f0 [488];
std::ifstream::ifstream((ifstream *)local_210,param_1,4);
cVar3 = std::__basic_file<char>::is_open();
/* try { // try from 0014733d to 0014734e has its CatchHandler @ 0014739a */
if ((cVar3 == '\0') ||
(std::istream::read((char *)local_210,(long)local_214),
(abStack_1f0[*(long *)(local_210[0] + -0x18)] & 5) != 0)) {
unaff_RBX = 0;
}
else {
lVar4 = 0;
do {
unaff_RBX = CONCAT71((int7)(unaff_RBX >> 8),lVar4 == 4);
if (lVar4 == 4) break;
pcVar2 = local_214 + lVar4;
pcVar1 = &DAT_0019dcde + lVar4;
lVar4 = lVar4 + 1;
} while (*pcVar2 == *pcVar1);
}
std::ifstream::~ifstream((ifstream *)local_210);
return unaff_RBX & 0xffffffff;
}
|
|
64,348 |
is_gguf_file(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
|
7CodeWizard[P]stablediffusion/model.cpp
|
bool is_gguf_file(const std::string& file_path) {
std::ifstream file(file_path, std::ios::binary);
if (!file.is_open()) {
return false;
}
char magic[4];
file.read(magic, sizeof(magic));
if (!file) {
return false;
}
for (uint32_t i = 0; i < sizeof(magic); i++) {
if (magic[i] != GGUF_MAGIC[i]) {
return false;
}
}
return true;
}
|
O3
|
cpp
|
is_gguf_file(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&):
pushq %rbx
subq $0x210, %rsp # imm = 0x210
movq %rdi, %rsi
leaq 0x8(%rsp), %rdi
movl $0x4, %edx
callq 0xa9e0
leaq 0x80(%rsp), %rdi
callq 0xa100
testb %al, %al
je 0x67cf1
leaq 0x8(%rsp), %rdi
leaq 0x4(%rsp), %rsi
movl $0x4, %edx
callq 0xa740
movq 0x8(%rsp), %rax
movq -0x18(%rax), %rax
testb $0x5, 0x28(%rsp,%rax)
je 0x67d08
xorl %ebx, %ebx
leaq 0x8(%rsp), %rdi
callq 0xa110
movl %ebx, %eax
addq $0x210, %rsp # imm = 0x210
popq %rbx
retq
xorl %eax, %eax
leaq 0x590cd(%rip), %rcx # 0xc0dde
movb 0x4(%rsp,%rax), %dl
cmpb (%rax,%rcx), %dl
sete %bl
jne 0x67cf3
leaq 0x1(%rax), %rdx
cmpq $0x3, %rax
movq %rdx, %rax
jne 0x67d11
jmp 0x67cf3
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0xa110
movq %rbx, %rdi
callq 0xaad0
|
_Z12is_gguf_fileRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE:
push rbx
sub rsp, 210h
mov rsi, rdi
lea rdi, [rsp+218h+var_210]
mov edx, 4
call __ZNSt14basic_ifstreamIcSt11char_traitsIcEEC1ERKNSt7__cxx1112basic_stringIcS1_SaIcEEESt13_Ios_Openmode; std::ifstream::basic_ifstream(std::string const&,std::_Ios_Openmode)
lea rdi, [rsp+218h+var_198]
call __ZNKSt12__basic_fileIcE7is_openEv; std::__basic_file<char>::is_open(void)
test al, al
jz short loc_67CF1
lea rdi, [rsp+218h+var_210]; this
lea rsi, [rsp+218h+var_214]; char *
mov edx, 4; __int64
call __ZNSi4readEPcl; std::istream::read(char *,long)
mov rax, [rsp+218h+var_210]
mov rax, [rax-18h]
test [rsp+rax+218h+var_1F0], 5
jz short loc_67D08
loc_67CF1:
xor ebx, ebx
loc_67CF3:
lea rdi, [rsp+218h+var_210]
call __ZNSt14basic_ifstreamIcSt11char_traitsIcEED1Ev; std::ifstream::~ifstream()
mov eax, ebx
add rsp, 210h
pop rbx
retn
loc_67D08:
xor eax, eax
lea rcx, aGguf; "GGUF"
loc_67D11:
mov dl, [rsp+rax+218h+var_214]
cmp dl, [rax+rcx]
setz bl
jnz short loc_67CF3
lea rdx, [rax+1]
cmp rax, 3
mov rax, rdx
jnz short loc_67D11
jmp short loc_67CF3
mov rbx, rax
lea rdi, [rsp+arg_0]
call __ZNSt14basic_ifstreamIcSt11char_traitsIcEED1Ev; std::ifstream::~ifstream()
mov rdi, rbx
call __Unwind_Resume
|
long long is_gguf_file(long long a1)
{
unsigned int v1; // ebx
long long v3; // rax
char v4; // dl
char v6[4]; // [rsp+4h] [rbp-214h] BYREF
_QWORD v7[15]; // [rsp+8h] [rbp-210h] BYREF
_BYTE v8[408]; // [rsp+80h] [rbp-198h] BYREF
std::ifstream::basic_ifstream(v7, a1, 4LL);
if ( (unsigned __int8)std::__basic_file<char>::is_open(v8)
&& (std::istream::read((std::istream *)v7, v6, 4LL), (*((_BYTE *)&v7[4] + *(_QWORD *)(v7[0] - 24LL)) & 5) == 0) )
{
v3 = 0LL;
do
{
v4 = v6[v3];
LOBYTE(v1) = v4 == aGguf[v3];
if ( v4 != aGguf[v3] )
break;
}
while ( v3++ != 3 );
}
else
{
v1 = 0;
}
std::ifstream::~ifstream(v7);
return v1;
}
| |||
64,349 |
js_number_isInteger
|
bluesky950520[P]quickjs/quickjs.c
|
static JSValue js_number_isInteger(JSContext *ctx, JSValue this_val,
int argc, JSValue *argv)
{
int ret;
ret = JS_NumberIsInteger(ctx, argv[0]);
if (ret < 0)
return JS_EXCEPTION;
else
return js_bool(ret);
}
|
O0
|
c
|
js_number_isInteger:
subq $0x48, %rsp
movq %rsi, 0x28(%rsp)
movq %rdx, 0x30(%rsp)
movq %rdi, 0x20(%rsp)
movl %ecx, 0x1c(%rsp)
movq %r8, 0x10(%rsp)
movq 0x20(%rsp), %rdi
movq 0x10(%rsp), %rax
movq (%rax), %rsi
movq 0x8(%rax), %rdx
callq 0x367f0
movl %eax, 0xc(%rsp)
cmpl $0x0, 0xc(%rsp)
jge 0xd2350
movl $0x0, 0x38(%rsp)
movq $0x6, 0x40(%rsp)
jmp 0xd2363
movl 0xc(%rsp), %edi
callq 0x57250
movq %rax, 0x38(%rsp)
movq %rdx, 0x40(%rsp)
movq 0x38(%rsp), %rax
movq 0x40(%rsp), %rdx
addq $0x48, %rsp
retq
nopw %cs:(%rax,%rax)
|
js_number_isInteger:
sub rsp, 48h
mov [rsp+48h+var_20], rsi
mov [rsp+48h+var_18], rdx
mov [rsp+48h+var_28], rdi
mov [rsp+48h+var_2C], ecx
mov [rsp+48h+var_38], r8
mov rdi, [rsp+48h+var_28]
mov rax, [rsp+48h+var_38]
mov rsi, [rax]
mov rdx, [rax+8]
call JS_NumberIsInteger
mov [rsp+48h+var_3C], eax
cmp [rsp+48h+var_3C], 0
jge short loc_D2350
mov dword ptr [rsp+48h+var_10], 0
mov [rsp+48h+var_8], 6
jmp short loc_D2363
loc_D2350:
mov edi, [rsp+48h+var_3C]
call js_bool
mov [rsp+48h+var_10], rax
mov [rsp+48h+var_8], rdx
loc_D2363:
mov rax, [rsp+48h+var_10]
mov rdx, [rsp+48h+var_8]
add rsp, 48h
retn
|
long long js_number_isInteger(long long a1, long long a2, long long a3, long long a4, long long *a5)
{
int IsInteger; // [rsp+Ch] [rbp-3Ch]
long long v7; // [rsp+38h] [rbp-10h]
IsInteger = JS_NumberIsInteger(a1, *a5, a5[1]);
if ( IsInteger >= 0 )
return js_bool(IsInteger);
LODWORD(v7) = 0;
return v7;
}
|
js_number_isInteger:
SUB RSP,0x48
MOV qword ptr [RSP + 0x28],RSI
MOV qword ptr [RSP + 0x30],RDX
MOV qword ptr [RSP + 0x20],RDI
MOV dword ptr [RSP + 0x1c],ECX
MOV qword ptr [RSP + 0x10],R8
MOV RDI,qword ptr [RSP + 0x20]
MOV RAX,qword ptr [RSP + 0x10]
MOV RSI,qword ptr [RAX]
MOV RDX,qword ptr [RAX + 0x8]
CALL 0x001367f0
MOV dword ptr [RSP + 0xc],EAX
CMP dword ptr [RSP + 0xc],0x0
JGE 0x001d2350
MOV dword ptr [RSP + 0x38],0x0
MOV qword ptr [RSP + 0x40],0x6
JMP 0x001d2363
LAB_001d2350:
MOV EDI,dword ptr [RSP + 0xc]
CALL 0x00157250
MOV qword ptr [RSP + 0x38],RAX
MOV qword ptr [RSP + 0x40],RDX
LAB_001d2363:
MOV RAX,qword ptr [RSP + 0x38]
MOV RDX,qword ptr [RSP + 0x40]
ADD RSP,0x48
RET
|
int1 [16] js_number_isInteger(int8 param_1)
{
int iVar1;
int8 *in_R8;
int1 auVar2 [16];
int4 local_10;
int4 uStack_c;
int8 local_8;
iVar1 = JS_NumberIsInteger(param_1,*in_R8,in_R8[1]);
if (iVar1 < 0) {
local_10 = 0;
local_8 = 6;
}
else {
auVar2 = js_bool(iVar1);
local_8 = auVar2._8_8_;
local_10 = auVar2._0_4_;
uStack_c = auVar2._4_4_;
}
auVar2._4_4_ = uStack_c;
auVar2._0_4_ = local_10;
auVar2._8_8_ = local_8;
return auVar2;
}
|
|
64,350 |
js_number_isInteger
|
bluesky950520[P]quickjs/quickjs.c
|
static JSValue js_number_isInteger(JSContext *ctx, JSValue this_val,
int argc, JSValue *argv)
{
int ret;
ret = JS_NumberIsInteger(ctx, argv[0]);
if (ret < 0)
return JS_EXCEPTION;
else
return js_bool(ret);
}
|
O1
|
c
|
js_number_isInteger:
pushq %rax
movq (%r8), %rsi
movq 0x8(%r8), %rdx
callq 0xfa62
xorl %ecx, %ecx
testl %eax, %eax
setg %cl
shrl $0x1f, %eax
leaq (%rax,%rax,4), %rdx
incq %rdx
movq %rcx, %rax
popq %rcx
retq
|
js_number_isInteger:
push rax
mov rsi, [r8]
mov rdx, [r8+8]
call JS_NumberIsInteger
xor ecx, ecx
test eax, eax
setnle cl
shr eax, 1Fh
lea rdx, [rax+rax*4]
inc rdx
mov rax, rcx
pop rcx
retn
|
_BOOL8 js_number_isInteger(long long a1, long long a2, long long a3, long long a4, long long *a5)
{
return (int)JS_NumberIsInteger(a1, *a5, a5[1]) > 0;
}
|
js_number_isInteger:
PUSH RAX
MOV RSI,qword ptr [R8]
MOV RDX,qword ptr [R8 + 0x8]
CALL 0x0010fa62
XOR ECX,ECX
TEST EAX,EAX
SETG CL
SHR EAX,0x1f
LEA RDX,[RAX + RAX*0x4]
INC RDX
MOV RAX,RCX
POP RCX
RET
|
bool js_number_isInteger(int8 param_1)
{
int iVar1;
int8 *in_R8;
iVar1 = JS_NumberIsInteger(param_1,*in_R8,in_R8[1]);
return 0 < iVar1;
}
|
|
64,351 |
my_mb_wc_filename
|
eloqsql/strings/ctype-utf8.c
|
static int
my_mb_wc_filename(CHARSET_INFO *cs __attribute__((unused)),
my_wc_t *pwc, const uchar *s, const uchar *e)
{
int byte1, byte2;
if (s >= e)
return MY_CS_TOOSMALL;
if (*s < 128 && filename_safe_char[*s])
{
*pwc= *s;
return 1;
}
if (*s != MY_FILENAME_ESCAPE)
return MY_CS_ILSEQ;
if (s + 3 > e)
return MY_CS_TOOSMALL3;
byte1= s[1];
if (byte1 == 0)
return MY_CS_ILSEQ; /* avoid possible out-of-bounds read */
byte2= s[2];
if (byte1 >= 0x30 && byte1 <= 0x7F &&
byte2 >= 0x30 && byte2 <= 0x7F)
{
int code= (byte1 - 0x30) * 80 + byte2 - 0x30;
if (code < 5994 && touni[code])
{
*pwc= touni[code];
return 3;
}
if (byte1 == '@' && byte2 == '@')
{
*pwc= 0;
return 3;
}
}
if (s + 4 > e)
return MY_CS_TOOSMALL4;
if ((byte1= hexlo(byte1)) >= 0 &&
(byte2= hexlo(byte2)) >= 0)
{
int byte3= hexlo(s[3]);
int byte4= hexlo(s[3] ? s[4] : 0);
if (byte3 >=0 && byte4 >=0)
{
*pwc= (byte1 << 12) + (byte2 << 8) + (byte3 << 4) + byte4;
return 5;
}
}
return MY_CS_ILSEQ;
}
|
O0
|
c
|
my_mb_wc_filename:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
movq -0x20(%rbp), %rax
cmpq -0x28(%rbp), %rax
jb 0x7437e
movl $0xffffff9b, -0x4(%rbp) # imm = 0xFFFFFF9B
jmp 0x7456e
movq -0x20(%rbp), %rax
movzbl (%rax), %eax
cmpl $0x80, %eax
jge 0x743c1
movq -0x20(%rbp), %rax
movzbl (%rax), %eax
movl %eax, %ecx
leaq 0x149194(%rip), %rax # 0x1bd530
movsbl (%rax,%rcx), %eax
cmpl $0x0, %eax
je 0x743c1
movq -0x20(%rbp), %rax
movzbl (%rax), %eax
movl %eax, %ecx
movq -0x18(%rbp), %rax
movq %rcx, (%rax)
movl $0x1, -0x4(%rbp)
jmp 0x7456e
movq -0x20(%rbp), %rax
movzbl (%rax), %eax
cmpl $0x40, %eax
je 0x743d9
movl $0x0, -0x4(%rbp)
jmp 0x7456e
movq -0x20(%rbp), %rax
addq $0x3, %rax
cmpq -0x28(%rbp), %rax
jbe 0x743f3
movl $0xffffff99, -0x4(%rbp) # imm = 0xFFFFFF99
jmp 0x7456e
movq -0x20(%rbp), %rax
movzbl 0x1(%rax), %eax
movl %eax, -0x2c(%rbp)
cmpl $0x0, -0x2c(%rbp)
jne 0x74410
movl $0x0, -0x4(%rbp)
jmp 0x7456e
movq -0x20(%rbp), %rax
movzbl 0x2(%rax), %eax
movl %eax, -0x30(%rbp)
cmpl $0x30, -0x2c(%rbp)
jl 0x744b3
cmpl $0x7f, -0x2c(%rbp)
jg 0x744b3
cmpl $0x30, -0x30(%rbp)
jl 0x744b3
cmpl $0x7f, -0x30(%rbp)
jg 0x744b3
movl -0x2c(%rbp), %eax
subl $0x30, %eax
imull $0x50, %eax, %eax
addl -0x30(%rbp), %eax
subl $0x30, %eax
movl %eax, -0x34(%rbp)
cmpl $0x176a, -0x34(%rbp) # imm = 0x176A
jge 0x7448e
movslq -0x34(%rbp), %rcx
leaq 0x14914f(%rip), %rax # 0x1bd5b0
movzwl (%rax,%rcx,2), %eax
cmpl $0x0, %eax
je 0x7448e
movslq -0x34(%rbp), %rcx
leaq 0x14913b(%rip), %rax # 0x1bd5b0
movzwl (%rax,%rcx,2), %eax
movl %eax, %ecx
movq -0x18(%rbp), %rax
movq %rcx, (%rax)
movl $0x3, -0x4(%rbp)
jmp 0x7456e
cmpl $0x40, -0x2c(%rbp)
jne 0x744b1
cmpl $0x40, -0x30(%rbp)
jne 0x744b1
movq -0x18(%rbp), %rax
movq $0x0, (%rax)
movl $0x3, -0x4(%rbp)
jmp 0x7456e
jmp 0x744b3
movq -0x20(%rbp), %rax
addq $0x4, %rax
cmpq -0x28(%rbp), %rax
jbe 0x744cd
movl $0xffffff98, -0x4(%rbp) # imm = 0xFFFFFF98
jmp 0x7456e
movl -0x2c(%rbp), %edi
callq 0x74990
movl %eax, -0x2c(%rbp)
cmpl $0x0, %eax
jl 0x74567
movl -0x30(%rbp), %edi
callq 0x74990
movl %eax, -0x30(%rbp)
cmpl $0x0, %eax
jl 0x74567
movq -0x20(%rbp), %rax
movzbl 0x3(%rax), %edi
callq 0x74990
movl %eax, -0x38(%rbp)
movq -0x20(%rbp), %rax
movzbl 0x3(%rax), %eax
cmpl $0x0, %eax
je 0x7451b
movq -0x20(%rbp), %rax
movzbl 0x4(%rax), %eax
movl %eax, -0x40(%rbp)
jmp 0x74522
xorl %eax, %eax
movl %eax, -0x40(%rbp)
jmp 0x74522
movl -0x40(%rbp), %edi
callq 0x74990
movl %eax, -0x3c(%rbp)
cmpl $0x0, -0x38(%rbp)
jl 0x74565
cmpl $0x0, -0x3c(%rbp)
jl 0x74565
movl -0x2c(%rbp), %eax
shll $0xc, %eax
movl -0x30(%rbp), %ecx
shll $0x8, %ecx
addl %ecx, %eax
movl -0x38(%rbp), %ecx
shll $0x4, %ecx
addl %ecx, %eax
addl -0x3c(%rbp), %eax
movslq %eax, %rcx
movq -0x18(%rbp), %rax
movq %rcx, (%rax)
movl $0x5, -0x4(%rbp)
jmp 0x7456e
jmp 0x74567
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x40, %rsp
popq %rbp
retq
nopw (%rax,%rax)
|
my_mb_wc_filename:
push rbp
mov rbp, rsp
sub rsp, 40h
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov [rbp+var_20], rdx
mov [rbp+var_28], rcx
mov rax, [rbp+var_20]
cmp rax, [rbp+var_28]
jb short loc_7437E
mov [rbp+var_4], 0FFFFFF9Bh
jmp loc_7456E
loc_7437E:
mov rax, [rbp+var_20]
movzx eax, byte ptr [rax]
cmp eax, 80h
jge short loc_743C1
mov rax, [rbp+var_20]
movzx eax, byte ptr [rax]
mov ecx, eax
lea rax, filename_safe_char
movsx eax, byte ptr [rax+rcx]
cmp eax, 0
jz short loc_743C1
mov rax, [rbp+var_20]
movzx eax, byte ptr [rax]
mov ecx, eax
mov rax, [rbp+var_18]
mov [rax], rcx
mov [rbp+var_4], 1
jmp loc_7456E
loc_743C1:
mov rax, [rbp+var_20]
movzx eax, byte ptr [rax]
cmp eax, 40h ; '@'
jz short loc_743D9
mov [rbp+var_4], 0
jmp loc_7456E
loc_743D9:
mov rax, [rbp+var_20]
add rax, 3
cmp rax, [rbp+var_28]
jbe short loc_743F3
mov [rbp+var_4], 0FFFFFF99h
jmp loc_7456E
loc_743F3:
mov rax, [rbp+var_20]
movzx eax, byte ptr [rax+1]
mov [rbp+var_2C], eax
cmp [rbp+var_2C], 0
jnz short loc_74410
mov [rbp+var_4], 0
jmp loc_7456E
loc_74410:
mov rax, [rbp+var_20]
movzx eax, byte ptr [rax+2]
mov [rbp+var_30], eax
cmp [rbp+var_2C], 30h ; '0'
jl loc_744B3
cmp [rbp+var_2C], 7Fh
jg loc_744B3
cmp [rbp+var_30], 30h ; '0'
jl short loc_744B3
cmp [rbp+var_30], 7Fh
jg short loc_744B3
mov eax, [rbp+var_2C]
sub eax, 30h ; '0'
imul eax, 50h ; 'P'
add eax, [rbp+var_30]
sub eax, 30h ; '0'
mov [rbp+var_34], eax
cmp [rbp+var_34], 176Ah
jge short loc_7448E
movsxd rcx, [rbp+var_34]
lea rax, touni
movzx eax, word ptr [rax+rcx*2]
cmp eax, 0
jz short loc_7448E
movsxd rcx, [rbp+var_34]
lea rax, touni
movzx eax, word ptr [rax+rcx*2]
mov ecx, eax
mov rax, [rbp+var_18]
mov [rax], rcx
mov [rbp+var_4], 3
jmp loc_7456E
loc_7448E:
cmp [rbp+var_2C], 40h ; '@'
jnz short loc_744B1
cmp [rbp+var_30], 40h ; '@'
jnz short loc_744B1
mov rax, [rbp+var_18]
mov qword ptr [rax], 0
mov [rbp+var_4], 3
jmp loc_7456E
loc_744B1:
jmp short $+2
loc_744B3:
mov rax, [rbp+var_20]
add rax, 4
cmp rax, [rbp+var_28]
jbe short loc_744CD
mov [rbp+var_4], 0FFFFFF98h
jmp loc_7456E
loc_744CD:
mov edi, [rbp+var_2C]
call hexlo
mov [rbp+var_2C], eax
cmp eax, 0
jl loc_74567
mov edi, [rbp+var_30]
call hexlo
mov [rbp+var_30], eax
cmp eax, 0
jl short loc_74567
mov rax, [rbp+var_20]
movzx edi, byte ptr [rax+3]
call hexlo
mov [rbp+var_38], eax
mov rax, [rbp+var_20]
movzx eax, byte ptr [rax+3]
cmp eax, 0
jz short loc_7451B
mov rax, [rbp+var_20]
movzx eax, byte ptr [rax+4]
mov [rbp+var_40], eax
jmp short loc_74522
loc_7451B:
xor eax, eax
mov [rbp+var_40], eax
jmp short $+2
loc_74522:
mov edi, [rbp+var_40]
call hexlo
mov [rbp+var_3C], eax
cmp [rbp+var_38], 0
jl short loc_74565
cmp [rbp+var_3C], 0
jl short loc_74565
mov eax, [rbp+var_2C]
shl eax, 0Ch
mov ecx, [rbp+var_30]
shl ecx, 8
add eax, ecx
mov ecx, [rbp+var_38]
shl ecx, 4
add eax, ecx
add eax, [rbp+var_3C]
movsxd rcx, eax
mov rax, [rbp+var_18]
mov [rax], rcx
mov [rbp+var_4], 5
jmp short loc_7456E
loc_74565:
jmp short $+2
loc_74567:
mov [rbp+var_4], 0
loc_7456E:
mov eax, [rbp+var_4]
add rsp, 40h
pop rbp
retn
|
long long my_mb_wc_filename(long long a1, _QWORD *a2, unsigned __int8 *a3, unsigned long long a4)
{
unsigned int v5; // [rsp+0h] [rbp-40h]
int v6; // [rsp+4h] [rbp-3Ch]
int v7; // [rsp+8h] [rbp-38h]
int v8; // [rsp+Ch] [rbp-34h]
unsigned int v9; // [rsp+10h] [rbp-30h]
int v10; // [rsp+10h] [rbp-30h]
int v11; // [rsp+14h] [rbp-2Ch]
int v12; // [rsp+14h] [rbp-2Ch]
if ( (unsigned long long)a3 < a4 )
{
if ( *a3 < 0x80u && filename_safe_char[*a3] )
{
*a2 = *a3;
return 1;
}
else if ( *a3 == 64 )
{
if ( (unsigned long long)(a3 + 3) <= a4 )
{
v11 = a3[1];
if ( a3[1] )
{
v9 = a3[2];
if ( a3[1] >= 0x30u && a3[1] <= 0x7Fu && a3[2] >= 0x30u && a3[2] <= 0x7Fu )
{
v8 = v9 + 80 * (v11 - 48) - 48;
if ( v8 < 5994 && touni[v8] )
{
*a2 = touni[v8];
return 3;
}
if ( v11 == 64 && v9 == 64 )
{
*a2 = 0LL;
return 3;
}
}
if ( (unsigned long long)(a3 + 4) <= a4 )
{
v12 = hexlo(a3[1]);
if ( v12 < 0 )
return 0;
v10 = hexlo(v9);
if ( v10 < 0 )
return 0;
v7 = hexlo(a3[3]);
v5 = a3[3] ? a3[4] : 0;
v6 = hexlo(v5);
if ( v7 < 0 || v6 < 0 )
{
return 0;
}
else
{
*a2 = v6 + 16 * v7 + (v10 << 8) + (v12 << 12);
return 5;
}
}
else
{
return (unsigned int)-104;
}
}
else
{
return 0;
}
}
else
{
return (unsigned int)-103;
}
}
else
{
return 0;
}
}
else
{
return (unsigned int)-101;
}
}
|
my_mb_wc_filename:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x40
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x18],RSI
MOV qword ptr [RBP + -0x20],RDX
MOV qword ptr [RBP + -0x28],RCX
MOV RAX,qword ptr [RBP + -0x20]
CMP RAX,qword ptr [RBP + -0x28]
JC 0x0017437e
MOV dword ptr [RBP + -0x4],0xffffff9b
JMP 0x0017456e
LAB_0017437e:
MOV RAX,qword ptr [RBP + -0x20]
MOVZX EAX,byte ptr [RAX]
CMP EAX,0x80
JGE 0x001743c1
MOV RAX,qword ptr [RBP + -0x20]
MOVZX EAX,byte ptr [RAX]
MOV ECX,EAX
LEA RAX,[0x2bd530]
MOVSX EAX,byte ptr [RAX + RCX*0x1]
CMP EAX,0x0
JZ 0x001743c1
MOV RAX,qword ptr [RBP + -0x20]
MOVZX EAX,byte ptr [RAX]
MOV ECX,EAX
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RAX],RCX
MOV dword ptr [RBP + -0x4],0x1
JMP 0x0017456e
LAB_001743c1:
MOV RAX,qword ptr [RBP + -0x20]
MOVZX EAX,byte ptr [RAX]
CMP EAX,0x40
JZ 0x001743d9
MOV dword ptr [RBP + -0x4],0x0
JMP 0x0017456e
LAB_001743d9:
MOV RAX,qword ptr [RBP + -0x20]
ADD RAX,0x3
CMP RAX,qword ptr [RBP + -0x28]
JBE 0x001743f3
MOV dword ptr [RBP + -0x4],0xffffff99
JMP 0x0017456e
LAB_001743f3:
MOV RAX,qword ptr [RBP + -0x20]
MOVZX EAX,byte ptr [RAX + 0x1]
MOV dword ptr [RBP + -0x2c],EAX
CMP dword ptr [RBP + -0x2c],0x0
JNZ 0x00174410
MOV dword ptr [RBP + -0x4],0x0
JMP 0x0017456e
LAB_00174410:
MOV RAX,qword ptr [RBP + -0x20]
MOVZX EAX,byte ptr [RAX + 0x2]
MOV dword ptr [RBP + -0x30],EAX
CMP dword ptr [RBP + -0x2c],0x30
JL 0x001744b3
CMP dword ptr [RBP + -0x2c],0x7f
JG 0x001744b3
CMP dword ptr [RBP + -0x30],0x30
JL 0x001744b3
CMP dword ptr [RBP + -0x30],0x7f
JG 0x001744b3
MOV EAX,dword ptr [RBP + -0x2c]
SUB EAX,0x30
IMUL EAX,EAX,0x50
ADD EAX,dword ptr [RBP + -0x30]
SUB EAX,0x30
MOV dword ptr [RBP + -0x34],EAX
CMP dword ptr [RBP + -0x34],0x176a
JGE 0x0017448e
MOVSXD RCX,dword ptr [RBP + -0x34]
LEA RAX,[0x2bd5b0]
MOVZX EAX,word ptr [RAX + RCX*0x2]
CMP EAX,0x0
JZ 0x0017448e
MOVSXD RCX,dword ptr [RBP + -0x34]
LEA RAX,[0x2bd5b0]
MOVZX EAX,word ptr [RAX + RCX*0x2]
MOV ECX,EAX
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RAX],RCX
MOV dword ptr [RBP + -0x4],0x3
JMP 0x0017456e
LAB_0017448e:
CMP dword ptr [RBP + -0x2c],0x40
JNZ 0x001744b1
CMP dword ptr [RBP + -0x30],0x40
JNZ 0x001744b1
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RAX],0x0
MOV dword ptr [RBP + -0x4],0x3
JMP 0x0017456e
LAB_001744b1:
JMP 0x001744b3
LAB_001744b3:
MOV RAX,qword ptr [RBP + -0x20]
ADD RAX,0x4
CMP RAX,qword ptr [RBP + -0x28]
JBE 0x001744cd
MOV dword ptr [RBP + -0x4],0xffffff98
JMP 0x0017456e
LAB_001744cd:
MOV EDI,dword ptr [RBP + -0x2c]
CALL 0x00174990
MOV dword ptr [RBP + -0x2c],EAX
CMP EAX,0x0
JL 0x00174567
MOV EDI,dword ptr [RBP + -0x30]
CALL 0x00174990
MOV dword ptr [RBP + -0x30],EAX
CMP EAX,0x0
JL 0x00174567
MOV RAX,qword ptr [RBP + -0x20]
MOVZX EDI,byte ptr [RAX + 0x3]
CALL 0x00174990
MOV dword ptr [RBP + -0x38],EAX
MOV RAX,qword ptr [RBP + -0x20]
MOVZX EAX,byte ptr [RAX + 0x3]
CMP EAX,0x0
JZ 0x0017451b
MOV RAX,qword ptr [RBP + -0x20]
MOVZX EAX,byte ptr [RAX + 0x4]
MOV dword ptr [RBP + -0x40],EAX
JMP 0x00174522
LAB_0017451b:
XOR EAX,EAX
MOV dword ptr [RBP + -0x40],EAX
JMP 0x00174522
LAB_00174522:
MOV EDI,dword ptr [RBP + -0x40]
CALL 0x00174990
MOV dword ptr [RBP + -0x3c],EAX
CMP dword ptr [RBP + -0x38],0x0
JL 0x00174565
CMP dword ptr [RBP + -0x3c],0x0
JL 0x00174565
MOV EAX,dword ptr [RBP + -0x2c]
SHL EAX,0xc
MOV ECX,dword ptr [RBP + -0x30]
SHL ECX,0x8
ADD EAX,ECX
MOV ECX,dword ptr [RBP + -0x38]
SHL ECX,0x4
ADD EAX,ECX
ADD EAX,dword ptr [RBP + -0x3c]
MOVSXD RCX,EAX
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RAX],RCX
MOV dword ptr [RBP + -0x4],0x5
JMP 0x0017456e
LAB_00174565:
JMP 0x00174567
LAB_00174567:
MOV dword ptr [RBP + -0x4],0x0
LAB_0017456e:
MOV EAX,dword ptr [RBP + -0x4]
ADD RSP,0x40
POP RBP
RET
|
int4 my_mb_wc_filename(int8 param_1,ulong *param_2,byte *param_3,byte *param_4)
{
byte bVar1;
uint uVar2;
uint uVar3;
int iVar4;
int iVar5;
int iVar6;
int iVar7;
int4 local_c;
if (param_3 < param_4) {
if ((*param_3 < 0x80) && (filename_safe_char[*param_3] != '\0')) {
*param_2 = (ulong)*param_3;
local_c = 1;
}
else if (*param_3 == 0x40) {
if (param_4 < param_3 + 3) {
local_c = 0xffffff99;
}
else {
uVar2 = (uint)param_3[1];
if (uVar2 == 0) {
local_c = 0;
}
else {
uVar3 = (uint)param_3[2];
if ((((0x2f < uVar2) && (uVar2 < 0x80)) && (0x2f < uVar3)) && (uVar3 < 0x80)) {
iVar4 = (uVar2 - 0x30) * 0x50 + uVar3 + -0x30;
if ((iVar4 < 0x176a) && (*(short *)(touni + (long)iVar4 * 2) != 0)) {
*param_2 = (ulong)*(ushort *)(touni + (long)iVar4 * 2);
return 3;
}
if ((uVar2 == 0x40) && (uVar3 == 0x40)) {
*param_2 = 0;
return 3;
}
}
if (param_4 < param_3 + 4) {
local_c = 0xffffff98;
}
else {
iVar4 = hexlo(uVar2);
if ((-1 < iVar4) && (iVar5 = hexlo(uVar3), -1 < iVar5)) {
iVar6 = hexlo(param_3[3]);
if (param_3[3] == 0) {
bVar1 = 0;
}
else {
bVar1 = param_3[4];
}
iVar7 = hexlo(bVar1);
if ((-1 < iVar6) && (-1 < iVar7)) {
*param_2 = (long)(iVar4 * 0x1000 + iVar5 * 0x100 + iVar6 * 0x10 + iVar7);
return 5;
}
}
local_c = 0;
}
}
}
}
else {
local_c = 0;
}
}
else {
local_c = 0xffffff9b;
}
return local_c;
}
|
|
64,352 |
my_hash_sort_utf16_nopad
|
eloqsql/strings/ctype-ucs2.c
|
static void
my_hash_sort_utf16_nopad(CHARSET_INFO *cs,
const uchar *s, size_t slen,
ulong *nr1, ulong *nr2)
{
my_wc_t wc;
my_charset_conv_mb_wc mb_wc= cs->cset->mb_wc;
int res;
const uchar *e= s + slen;
MY_UNICASE_INFO *uni_plane= cs->caseinfo;
register ulong m1= *nr1, m2= *nr2;
while ((s < e) && (res= mb_wc(cs, &wc, (uchar *) s, (uchar *) e)) > 0)
{
my_tosort_utf16(uni_plane, &wc);
MY_HASH_ADD_16(m1, m2, wc);
s+= res;
}
*nr1= m1;
*nr2= m2;
}
|
O0
|
c
|
my_hash_sort_utf16_nopad:
pushq %rbp
movq %rsp, %rbp
subq $0x70, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq %r8, -0x28(%rbp)
movq -0x8(%rbp), %rax
movq 0xb8(%rax), %rax
movq 0x28(%rax), %rax
movq %rax, -0x38(%rbp)
movq -0x10(%rbp), %rax
addq -0x18(%rbp), %rax
movq %rax, -0x48(%rbp)
movq -0x8(%rbp), %rax
movq 0x78(%rax), %rax
movq %rax, -0x50(%rbp)
movq -0x20(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x58(%rbp)
movq -0x28(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x60(%rbp)
movq -0x10(%rbp), %rcx
xorl %eax, %eax
cmpq -0x48(%rbp), %rcx
movb %al, -0x61(%rbp)
jae 0x6f1ce
movq -0x38(%rbp), %rax
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rdx
movq -0x48(%rbp), %rcx
leaq -0x30(%rbp), %rsi
callq *%rax
movl %eax, -0x3c(%rbp)
cmpl $0x0, %eax
setg %al
movb %al, -0x61(%rbp)
movb -0x61(%rbp), %al
testb $0x1, %al
jne 0x6f1da
jmp 0x6f274
movq -0x50(%rbp), %rdi
leaq -0x30(%rbp), %rsi
callq 0x6f290
jmp 0x6f1e9
movq -0x58(%rbp), %rax
andq $0x3f, %rax
addq -0x60(%rbp), %rax
movq -0x30(%rbp), %rcx
andq $0xff, %rcx
imulq %rcx, %rax
movq -0x58(%rbp), %rcx
shlq $0x8, %rcx
addq %rcx, %rax
xorq -0x58(%rbp), %rax
movq %rax, -0x58(%rbp)
movq -0x60(%rbp), %rax
addq $0x3, %rax
movq %rax, -0x60(%rbp)
jmp 0x6f225
movq -0x58(%rbp), %rax
andq $0x3f, %rax
addq -0x60(%rbp), %rax
movq -0x30(%rbp), %rcx
shrq $0x8, %rcx
imulq %rcx, %rax
movq -0x58(%rbp), %rcx
shlq $0x8, %rcx
addq %rcx, %rax
xorq -0x58(%rbp), %rax
movq %rax, -0x58(%rbp)
movq -0x60(%rbp), %rax
addq $0x3, %rax
movq %rax, -0x60(%rbp)
jmp 0x6f25e
movl -0x3c(%rbp), %ecx
movq -0x10(%rbp), %rax
movslq %ecx, %rcx
addq %rcx, %rax
movq %rax, -0x10(%rbp)
jmp 0x6f19d
movq -0x58(%rbp), %rcx
movq -0x20(%rbp), %rax
movq %rcx, (%rax)
movq -0x60(%rbp), %rcx
movq -0x28(%rbp), %rax
movq %rcx, (%rax)
addq $0x70, %rsp
popq %rbp
retq
|
my_hash_sort_utf16_nopad:
push rbp
mov rbp, rsp
sub rsp, 70h
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov [rbp+var_18], rdx
mov [rbp+var_20], rcx
mov [rbp+var_28], r8
mov rax, [rbp+var_8]
mov rax, [rax+0B8h]
mov rax, [rax+28h]
mov [rbp+var_38], rax
mov rax, [rbp+var_10]
add rax, [rbp+var_18]
mov [rbp+var_48], rax
mov rax, [rbp+var_8]
mov rax, [rax+78h]
mov [rbp+var_50], rax
mov rax, [rbp+var_20]
mov rax, [rax]
mov [rbp+var_58], rax
mov rax, [rbp+var_28]
mov rax, [rax]
mov [rbp+var_60], rax
loc_6F19D:
mov rcx, [rbp+var_10]
xor eax, eax
cmp rcx, [rbp+var_48]
mov [rbp+var_61], al
jnb short loc_6F1CE
mov rax, [rbp+var_38]
mov rdi, [rbp+var_8]
mov rdx, [rbp+var_10]
mov rcx, [rbp+var_48]
lea rsi, [rbp+var_30]
call rax
mov [rbp+var_3C], eax
cmp eax, 0
setnle al
mov [rbp+var_61], al
loc_6F1CE:
mov al, [rbp+var_61]
test al, 1
jnz short loc_6F1DA
jmp loc_6F274
loc_6F1DA:
mov rdi, [rbp+var_50]
lea rsi, [rbp+var_30]
call my_tosort_utf16
jmp short $+2
loc_6F1E9:
mov rax, [rbp+var_58]
and rax, 3Fh
add rax, [rbp+var_60]
mov rcx, [rbp+var_30]
and rcx, 0FFh
imul rax, rcx
mov rcx, [rbp+var_58]
shl rcx, 8
add rax, rcx
xor rax, [rbp+var_58]
mov [rbp+var_58], rax
mov rax, [rbp+var_60]
add rax, 3
mov [rbp+var_60], rax
jmp short $+2
loc_6F225:
mov rax, [rbp+var_58]
and rax, 3Fh
add rax, [rbp+var_60]
mov rcx, [rbp+var_30]
shr rcx, 8
imul rax, rcx
mov rcx, [rbp+var_58]
shl rcx, 8
add rax, rcx
xor rax, [rbp+var_58]
mov [rbp+var_58], rax
mov rax, [rbp+var_60]
add rax, 3
mov [rbp+var_60], rax
jmp short $+2
loc_6F25E:
mov ecx, [rbp+var_3C]
mov rax, [rbp+var_10]
movsxd rcx, ecx
add rax, rcx
mov [rbp+var_10], rax
jmp loc_6F19D
loc_6F274:
mov rcx, [rbp+var_58]
mov rax, [rbp+var_20]
mov [rax], rcx
mov rcx, [rbp+var_60]
mov rax, [rbp+var_28]
mov [rax], rcx
add rsp, 70h
pop rbp
retn
|
_QWORD * my_hash_sort_utf16_nopad(
long long a1,
unsigned long long a2,
long long a3,
unsigned long long *a4,
_QWORD *a5)
{
_QWORD *result; // rax
bool v6; // [rsp+Fh] [rbp-61h]
long long v7; // [rsp+10h] [rbp-60h]
long long v8; // [rsp+10h] [rbp-60h]
unsigned long long v9; // [rsp+18h] [rbp-58h]
long long v10; // [rsp+18h] [rbp-58h]
long long v11; // [rsp+20h] [rbp-50h]
unsigned long long v12; // [rsp+28h] [rbp-48h]
int v13; // [rsp+34h] [rbp-3Ch]
long long ( *v14)(long long, unsigned long long *, unsigned long long, unsigned long long); // [rsp+38h] [rbp-38h]
unsigned long long v15; // [rsp+40h] [rbp-30h] BYREF
_QWORD *v16; // [rsp+48h] [rbp-28h]
unsigned long long *v17; // [rsp+50h] [rbp-20h]
long long v18; // [rsp+58h] [rbp-18h]
unsigned long long v19; // [rsp+60h] [rbp-10h]
long long v20; // [rsp+68h] [rbp-8h]
v20 = a1;
v19 = a2;
v18 = a3;
v17 = a4;
v16 = a5;
v14 = *(long long ( **)(long long, unsigned long long *, unsigned long long, unsigned long long))(*(_QWORD *)(a1 + 184)
+ 40LL);
v12 = a3 + a2;
v11 = *(_QWORD *)(a1 + 120);
v9 = *a4;
v7 = *a5;
while ( 1 )
{
v6 = 0;
if ( v19 < v12 )
{
v13 = v14(v20, &v15, v19, v12);
v6 = v13 > 0;
}
if ( !v6 )
break;
my_tosort_utf16(v11, &v15);
v10 = v9 ^ ((v9 << 8) + (unsigned __int8)v15 * (v7 + (v9 & 0x3F)));
v8 = v7 + 3;
v9 = v10 ^ ((v10 << 8) + (v15 >> 8) * (v8 + (v10 & 0x3F)));
v7 = v8 + 3;
v19 += v13;
}
*v17 = v9;
result = v16;
*v16 = v7;
return result;
}
|
my_hash_sort_utf16_nopad:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x70
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV qword ptr [RBP + -0x18],RDX
MOV qword ptr [RBP + -0x20],RCX
MOV qword ptr [RBP + -0x28],R8
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX + 0xb8]
MOV RAX,qword ptr [RAX + 0x28]
MOV qword ptr [RBP + -0x38],RAX
MOV RAX,qword ptr [RBP + -0x10]
ADD RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RBP + -0x48],RAX
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX + 0x78]
MOV qword ptr [RBP + -0x50],RAX
MOV RAX,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x58],RAX
MOV RAX,qword ptr [RBP + -0x28]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x60],RAX
LAB_0016f19d:
MOV RCX,qword ptr [RBP + -0x10]
XOR EAX,EAX
CMP RCX,qword ptr [RBP + -0x48]
MOV byte ptr [RBP + -0x61],AL
JNC 0x0016f1ce
MOV RAX,qword ptr [RBP + -0x38]
MOV RDI,qword ptr [RBP + -0x8]
MOV RDX,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RBP + -0x48]
LEA RSI,[RBP + -0x30]
CALL RAX
MOV dword ptr [RBP + -0x3c],EAX
CMP EAX,0x0
SETG AL
MOV byte ptr [RBP + -0x61],AL
LAB_0016f1ce:
MOV AL,byte ptr [RBP + -0x61]
TEST AL,0x1
JNZ 0x0016f1da
JMP 0x0016f274
LAB_0016f1da:
MOV RDI,qword ptr [RBP + -0x50]
LEA RSI,[RBP + -0x30]
CALL 0x0016f290
JMP 0x0016f1e9
LAB_0016f1e9:
MOV RAX,qword ptr [RBP + -0x58]
AND RAX,0x3f
ADD RAX,qword ptr [RBP + -0x60]
MOV RCX,qword ptr [RBP + -0x30]
AND RCX,0xff
IMUL RAX,RCX
MOV RCX,qword ptr [RBP + -0x58]
SHL RCX,0x8
ADD RAX,RCX
XOR RAX,qword ptr [RBP + -0x58]
MOV qword ptr [RBP + -0x58],RAX
MOV RAX,qword ptr [RBP + -0x60]
ADD RAX,0x3
MOV qword ptr [RBP + -0x60],RAX
JMP 0x0016f225
LAB_0016f225:
MOV RAX,qword ptr [RBP + -0x58]
AND RAX,0x3f
ADD RAX,qword ptr [RBP + -0x60]
MOV RCX,qword ptr [RBP + -0x30]
SHR RCX,0x8
IMUL RAX,RCX
MOV RCX,qword ptr [RBP + -0x58]
SHL RCX,0x8
ADD RAX,RCX
XOR RAX,qword ptr [RBP + -0x58]
MOV qword ptr [RBP + -0x58],RAX
MOV RAX,qword ptr [RBP + -0x60]
ADD RAX,0x3
MOV qword ptr [RBP + -0x60],RAX
JMP 0x0016f25e
LAB_0016f25e:
MOV ECX,dword ptr [RBP + -0x3c]
MOV RAX,qword ptr [RBP + -0x10]
MOVSXD RCX,ECX
ADD RAX,RCX
MOV qword ptr [RBP + -0x10],RAX
JMP 0x0016f19d
LAB_0016f274:
MOV RCX,qword ptr [RBP + -0x58]
MOV RAX,qword ptr [RBP + -0x20]
MOV qword ptr [RAX],RCX
MOV RCX,qword ptr [RBP + -0x60]
MOV RAX,qword ptr [RBP + -0x28]
MOV qword ptr [RAX],RCX
ADD RSP,0x70
POP RBP
RET
|
void my_hash_sort_utf16_nopad(long param_1,ulong param_2,long param_3,ulong *param_4,long *param_5)
{
code *pcVar1;
int8 uVar2;
bool bVar3;
long local_68;
ulong local_60;
int local_44;
ulong local_38;
long *local_30;
ulong *local_28;
long local_20;
ulong local_18;
long local_10;
pcVar1 = *(code **)(*(long *)(param_1 + 0xb8) + 0x28);
uVar2 = *(int8 *)(param_1 + 0x78);
local_60 = *param_4;
local_68 = *param_5;
local_30 = param_5;
local_28 = param_4;
local_20 = param_3;
local_18 = param_2;
local_10 = param_1;
while( true ) {
bVar3 = false;
if (local_18 < param_2 + param_3) {
local_44 = (*pcVar1)(local_10,&local_38,local_18,param_2 + param_3);
bVar3 = 0 < local_44;
}
if (!bVar3) break;
my_tosort_utf16(uVar2,&local_38);
local_60 = ((local_60 & 0x3f) + local_68) * (local_38 & 0xff) + local_60 * 0x100 ^ local_60;
local_60 = ((local_60 & 0x3f) + local_68 + 3) * (local_38 >> 8) + local_60 * 0x100 ^ local_60;
local_68 = local_68 + 6;
local_18 = local_18 + (long)local_44;
}
*local_28 = local_60;
*local_30 = local_68;
return;
}
|
|
64,353 |
google::protobuf::compiler::java::ImmutableMessageFieldGenerator::GenerateSerializedSizeCode(google::protobuf::io::Printer*) const
|
aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/compiler/java/message_field.cc
|
void ImmutableMessageFieldGenerator::GenerateSerializedSizeCode(
io::Printer* printer) const {
printer->Print(
variables_,
"if ($is_field_present_message$) {\n"
" size += com.google.protobuf.CodedOutputStream\n"
" .compute$group_or_message$Size($number$, get$capitalized_name$());\n"
"}\n");
}
|
O3
|
cpp
|
google::protobuf::compiler::java::ImmutableMessageFieldGenerator::GenerateSerializedSizeCode(google::protobuf::io::Printer*) const:
movq %rsi, %rax
leaq 0x18(%rdi), %rsi
leaq 0xfd2e0(%rip), %rdx # 0x1da174
movq %rax, %rdi
jmp 0x16cd32
|
_ZNK6google8protobuf8compiler4java30ImmutableMessageFieldGenerator26GenerateSerializedSizeCodeEPNS0_2io7PrinterE:
mov rax, rsi
lea rsi, [rdi+18h]
lea rdx, aIfIsFieldPrese_0; "if ($is_field_present_message$) {\n si"...
mov rdi, rax; this
jmp _ZN6google8protobuf2io7Printer5PrintERKSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES9_St4lessIS9_ESaISt4pairIKS9_S9_EEEPKc; google::protobuf::io::Printer::Print(std::map<std::string,std::string> const&,char const*)
|
long long google::protobuf::compiler::java::ImmutableMessageFieldGenerator::GenerateSerializedSizeCode(
google::protobuf::compiler::java::ImmutableMessageFieldGenerator *this,
google::protobuf::io::Printer *a2,
long long a3,
long long a4,
long long a5,
long long a6,
void *a7,
int a8,
char a9,
int a10,
int a11,
int a12,
int a13,
int a14,
int a15,
void *a16,
int a17,
char a18)
{
return google::protobuf::io::Printer::Print(a2, a7, a8, a9, a10, a11, a12, a13, a14, a15, a16, a17, a18);
}
|
GenerateSerializedSizeCode:
MOV RAX,RSI
LEA RSI,[RDI + 0x18]
LEA RDX,[0x2da174]
MOV RDI,RAX
JMP 0x0026cd32
|
/* google::protobuf::compiler::java::ImmutableMessageFieldGenerator::GenerateSerializedSizeCode(google::protobuf::io::Printer*)
const */
void __thiscall
google::protobuf::compiler::java::ImmutableMessageFieldGenerator::GenerateSerializedSizeCode
(ImmutableMessageFieldGenerator *this,Printer *param_1)
{
io::Printer::Print(param_1,(map *)(this + 0x18),
"if ($is_field_present_message$) {\n size += com.google.protobuf.CodedOutputStream\n .compute$group_or_message$Size($number$, get$capitalized_name$());\n}\n"
);
return;
}
|
|
64,354 |
fmt::v10::appender fmt::v10::detail::write_char<char, fmt::v10::appender>(fmt::v10::appender, char, fmt::v10::format_specs<char> const&)
|
AlayaLite/build_O0/_deps/spdlog-src/include/spdlog/fmt/bundled/format.h
|
FMT_CONSTEXPR auto write_char(OutputIt out, Char value,
const format_specs<Char>& specs) -> OutputIt {
bool is_debug = specs.type == presentation_type::debug;
return write_padded(out, specs, 1, [=](reserve_iterator<OutputIt> it) {
if (is_debug) return write_escaped_char(it, value);
*it++ = value;
return it;
});
}
|
O0
|
c
|
fmt::v10::appender fmt::v10::detail::write_char<char, fmt::v10::appender>(fmt::v10::appender, char, fmt::v10::format_specs<char> const&):
subq $0x38, %rsp
movb %sil, %al
movq %rdi, 0x28(%rsp)
movb %al, 0x27(%rsp)
movq %rdx, 0x18(%rsp)
movq 0x18(%rsp), %rax
cmpb $0x12, 0x8(%rax)
sete %al
andb $0x1, %al
movb %al, 0x17(%rsp)
movq 0x28(%rsp), %rax
movq %rax, 0x8(%rsp)
movq 0x18(%rsp), %rsi
movb 0x17(%rsp), %al
andb $0x1, %al
movb %al, 0x6(%rsp)
movb 0x27(%rsp), %al
movb %al, 0x7(%rsp)
movq 0x8(%rsp), %rdi
movl $0x1, %edx
leaq 0x6(%rsp), %rcx
callq 0x91350
movq %rax, 0x30(%rsp)
movq 0x30(%rsp), %rax
addq $0x38, %rsp
retq
nopl (%rax,%rax)
|
_ZN3fmt3v106detail10write_charIcNS0_8appenderEEET0_S4_T_RKNS0_12format_specsIS5_EE:
sub rsp, 38h
mov al, sil
mov [rsp+38h+var_10], rdi
mov [rsp+38h+var_11], al
mov [rsp+38h+var_20], rdx
mov rax, [rsp+38h+var_20]
cmp byte ptr [rax+8], 12h
setz al
and al, 1
mov [rsp+38h+var_21], al
mov rax, [rsp+38h+var_10]
mov [rsp+38h+var_30], rax
mov rsi, [rsp+38h+var_20]
mov al, [rsp+38h+var_21]
and al, 1
mov [rsp+38h+var_32], al
mov al, [rsp+38h+var_11]
mov [rsp+38h+var_31], al
mov rdi, [rsp+38h+var_30]
mov edx, 1
lea rcx, [rsp+38h+var_32]
call _ZN3fmt3v106detail12write_paddedILNS0_5align4typeE1ENS0_8appenderEcZNS1_10write_charIcS5_EET0_S7_T_RKNS0_12format_specsIS8_EEEUlS5_E_EES7_S7_RKNS9_IT1_EEmOT2_; fmt::v10::detail::write_padded<(fmt::v10::align::type)1,fmt::v10::appender,char,fmt::v10::detail::write_char<char,fmt::v10::appender>(fmt::v10::appender,char,fmt::v10::format_specs<char> const&)::{lambda(fmt::v10::appender)#1}>(fmt::v10::appender,fmt::v10::format_specs<char> const&,ulong,fmt::v10::detail::write_char<char,fmt::v10::appender>(fmt::v10::appender,char,fmt::v10::format_specs<char> const&)::{lambda(fmt::v10::appender)#1} &&)
mov [rsp+38h+var_8], rax
mov rax, [rsp+38h+var_8]
add rsp, 38h
retn
|
long long fmt::v10::detail::write_char<char,fmt::v10::appender>(long long a1, char a2, long long a3)
{
_BYTE v4[2]; // [rsp+6h] [rbp-32h] BYREF
long long v5; // [rsp+8h] [rbp-30h]
bool v6; // [rsp+17h] [rbp-21h]
long long v7; // [rsp+18h] [rbp-20h]
char v8; // [rsp+27h] [rbp-11h]
long long v9; // [rsp+28h] [rbp-10h]
v9 = a1;
v8 = a2;
v7 = a3;
v6 = *(_BYTE *)(a3 + 8) == 18;
v5 = a1;
v4[0] = v6;
v4[1] = a2;
return fmt::v10::detail::write_padded<(fmt::v10::align::type)1,fmt::v10::appender,char,fmt::v10::appender fmt::v10::detail::write_char<char,fmt::v10::appender>(fmt::v10::appender,char,fmt::v10::format_specs<char> const&)::{lambda(fmt::v10::appender)#1}>(
a1,
a3,
1LL,
v4);
}
|
write_char<char,fmt::v10::appender>:
SUB RSP,0x38
MOV AL,SIL
MOV qword ptr [RSP + 0x28],RDI
MOV byte ptr [RSP + 0x27],AL
MOV qword ptr [RSP + 0x18],RDX
MOV RAX,qword ptr [RSP + 0x18]
CMP byte ptr [RAX + 0x8],0x12
SETZ AL
AND AL,0x1
MOV byte ptr [RSP + 0x17],AL
MOV RAX,qword ptr [RSP + 0x28]
MOV qword ptr [RSP + 0x8],RAX
MOV RSI,qword ptr [RSP + 0x18]
MOV AL,byte ptr [RSP + 0x17]
AND AL,0x1
MOV byte ptr [RSP + 0x6],AL
MOV AL,byte ptr [RSP + 0x27]
MOV byte ptr [RSP + 0x7],AL
MOV RDI,qword ptr [RSP + 0x8]
MOV EDX,0x1
LEA RCX,[RSP + 0x6]
CALL 0x00191350
MOV qword ptr [RSP + 0x30],RAX
MOV RAX,qword ptr [RSP + 0x30]
ADD RSP,0x38
RET
|
/* fmt::v10::appender fmt::v10::detail::write_char<char, fmt::v10::appender>(fmt::v10::appender,
char, fmt::v10::format_specs<char> const&) */
int8
fmt::v10::detail::write_char<char,fmt::v10::appender>
(int8 param_1,int1 param_2,long param_3)
{
int8 uVar1;
int1 local_32;
int1 local_31;
int8 local_30;
int1 local_21;
long local_20;
int1 local_11;
int8 local_10;
local_32 = *(char *)(param_3 + 8) == '\x12';
local_31 = param_2;
local_30 = param_1;
local_21 = local_32;
local_20 = param_3;
local_11 = param_2;
local_10 = param_1;
uVar1 = write_padded<(fmt::v10::align::type)1,fmt::v10::appender,char,fmt::v10::detail::write_char<char,fmt::v10::appender>(fmt::v10::appender,char,fmt::v10::format_specs<char>const&)::_lambda(fmt::v10::appender)_1_>
(param_1,param_3,1,&local_32);
return uVar1;
}
|
|
64,355 |
pow5mult
|
eloqsql/strings/dtoa.c
|
static Bigint *pow5mult(Bigint *b, int k, Stack_alloc *alloc)
{
Bigint *b1, *p5, *p51=NULL;
int i;
static int p05[3]= { 5, 25, 125 };
my_bool overflow= FALSE;
if ((i= k & 3))
b= multadd(b, p05[i-1], 0, alloc);
if (!(k>>= 2))
return b;
p5= p5_a;
for (;;)
{
if (k & 1)
{
b1= mult(b, p5, alloc);
Bfree(b, alloc);
b= b1;
}
if (!(k>>= 1))
break;
/* Calculate next power of 5 */
if (overflow)
{
p51= mult(p5, p5, alloc);
Bfree(p5, alloc);
p5= p51;
}
else if (p5 < p5_a + P5A_MAX)
++p5;
else if (p5 == p5_a + P5A_MAX)
{
p5= mult(p5, p5, alloc);
overflow= TRUE;
}
}
if (p51)
Bfree(p51, alloc);
return b;
}
|
O3
|
c
|
pow5mult:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rdx, %rbx
movl %esi, %r15d
movq %rdi, %r13
movl %esi, %eax
andl $0x3, %eax
je 0x58c81
decl %eax
leaq 0x2801ea(%rip), %rcx # 0x2d8e58
movl (%rcx,%rax,4), %esi
movq %r13, %rdi
xorl %edx, %edx
movq %rbx, %rcx
callq 0x590ce
movq %rax, %r13
cmpl $0x4, %r15d
jb 0x58d69
movq %rbx, -0x38(%rbp)
shrl $0x2, %r15d
movb $0x1, %cl
leaq 0x30cdd4(%rip), %rbx # 0x365a70
movq $0x0, -0x40(%rbp)
leaq 0x30ce55(%rip), %r12 # 0x365b00
movl %ecx, %r14d
cmpq %r12, %rbx
setb %cl
movl %ecx, -0x2c(%rbp)
testb $0x1, %r15b
je 0x58cec
movq %r13, %rdi
movq %rbx, %rsi
movq %r13, %r12
movq -0x38(%rbp), %r13
movq %r13, %rdx
callq 0x58d7b
movq %rax, -0x48(%rbp)
movq %r12, %rdi
leaq 0x30ce20(%rip), %r12 # 0x365b00
movq %r13, %rsi
callq 0x58e9d
movq -0x48(%rbp), %r13
cmpl $0x2, %r15d
jb 0x58d57
shrl %r15d
testb $0x1, %r14b
je 0x58d1c
cmpq %r12, %rbx
jb 0x58d4b
movb $0x1, %r14b
jne 0x58cb7
movq %r12, %rdi
movq %r12, %rsi
movq -0x38(%rbp), %rdx
callq 0x58d7b
movq %rax, %rbx
movl -0x2c(%rbp), %ecx
jmp 0x58cab
movq %rbx, %rdi
movq %rbx, %r14
movq %rbx, %rsi
movq -0x38(%rbp), %rbx
movq %rbx, %rdx
callq 0x58d7b
movq %rax, -0x40(%rbp)
movq %r14, %rdi
movq %rbx, %rsi
callq 0x58e9d
xorl %ecx, %ecx
movq -0x40(%rbp), %rbx
jmp 0x58cab
addq $0x18, %rbx
movl -0x2c(%rbp), %ecx
jmp 0x58cab
movq -0x40(%rbp), %rdi
testq %rdi, %rdi
je 0x58d69
movq -0x38(%rbp), %rsi
callq 0x58e9d
movq %r13, %rax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
|
pow5mult:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 28h
mov rbx, rdx
mov r15d, esi
mov r13, rdi
mov eax, esi
and eax, 3
jz short loc_58C81
dec eax
lea rcx, pow5mult_p05
mov esi, [rcx+rax*4]
mov rdi, r13
xor edx, edx
mov rcx, rbx
call multadd
mov r13, rax
loc_58C81:
cmp r15d, 4
jb loc_58D69
mov [rbp+var_38], rbx
shr r15d, 2
mov cl, 1
lea rbx, p5_a
mov [rbp+var_40], 0
lea r12, off_365B00
loc_58CAB:
mov r14d, ecx
cmp rbx, r12
setb cl
mov [rbp+var_2C], ecx
loc_58CB7:
test r15b, 1
jz short loc_58CEC
mov rdi, r13
mov rsi, rbx
mov r12, r13
mov r13, [rbp+var_38]
mov rdx, r13
call mult
mov [rbp+var_48], rax
mov rdi, r12
lea r12, off_365B00
mov rsi, r13
call Bfree
mov r13, [rbp+var_48]
loc_58CEC:
cmp r15d, 2
jb short loc_58D57
shr r15d, 1
test r14b, 1
jz short loc_58D1C
cmp rbx, r12
jb short loc_58D4B
mov r14b, 1
jnz short loc_58CB7
mov rdi, r12
mov rsi, r12
mov rdx, [rbp+var_38]
call mult
mov rbx, rax
mov ecx, [rbp+var_2C]
jmp short loc_58CAB
loc_58D1C:
mov rdi, rbx
mov r14, rbx
mov rsi, rbx
mov rbx, [rbp+var_38]
mov rdx, rbx
call mult
mov [rbp+var_40], rax
mov rdi, r14
mov rsi, rbx
call Bfree
xor ecx, ecx
mov rbx, [rbp+var_40]
jmp loc_58CAB
loc_58D4B:
add rbx, 18h
mov ecx, [rbp+var_2C]
jmp loc_58CAB
loc_58D57:
mov rdi, [rbp+var_40]
test rdi, rdi
jz short loc_58D69
mov rsi, [rbp+var_38]
call Bfree
loc_58D69:
mov rax, r13
add rsp, 28h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
|
long long pow5mult(long long a1, unsigned int a2, long long a3, int a4)
{
long long v5; // r13
unsigned int v6; // r15d
_UNKNOWN **v7; // rbx
char v8; // r14
long long v10; // [rsp+8h] [rbp-48h]
long long v11; // [rsp+10h] [rbp-40h]
long long v12; // [rsp+18h] [rbp-38h]
int v13; // [rsp+24h] [rbp-2Ch]
v5 = a1;
if ( (a2 & 3) != 0 )
v5 = multadd(a1, pow5mult_p05[(a2 & 3) - 1], 0LL, a3);
if ( a2 >= 4 )
{
v12 = a3;
v6 = a2 >> 2;
LOBYTE(a4) = 1;
v7 = &p5_a;
v11 = 0LL;
LABEL_5:
v8 = a4;
LOBYTE(a4) = v7 < &off_365B00;
v13 = a4;
while ( 1 )
{
if ( (v6 & 1) != 0 )
{
v10 = mult(v5, v7, v12);
Bfree(v5, v12);
v5 = v10;
}
if ( v6 < 2 )
break;
v6 >>= 1;
if ( (v8 & 1) == 0 )
{
v11 = mult(v7, v7, v12);
Bfree(v7, v12);
a4 = 0;
v7 = (_UNKNOWN **)v11;
goto LABEL_5;
}
if ( v7 < &off_365B00 )
{
v7 += 3;
a4 = v13;
goto LABEL_5;
}
v8 = 1;
if ( v7 == &off_365B00 )
{
v7 = (_UNKNOWN **)mult(&off_365B00, &off_365B00, v12);
a4 = v13;
goto LABEL_5;
}
}
if ( v11 )
Bfree(v11, v12);
}
return v5;
}
|
pow5mult:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x28
MOV RBX,RDX
MOV R15D,ESI
MOV R13,RDI
MOV EAX,ESI
AND EAX,0x3
JZ 0x00158c81
DEC EAX
LEA RCX,[0x3d8e58]
MOV ESI,dword ptr [RCX + RAX*0x4]
MOV RDI,R13
XOR EDX,EDX
MOV RCX,RBX
CALL 0x001590ce
MOV R13,RAX
LAB_00158c81:
CMP R15D,0x4
JC 0x00158d69
MOV qword ptr [RBP + -0x38],RBX
SHR R15D,0x2
MOV CL,0x1
LEA RBX,[0x465a70]
MOV qword ptr [RBP + -0x40],0x0
LEA R12,[0x465b00]
LAB_00158cab:
MOV R14D,ECX
CMP RBX,R12
SETC CL
MOV dword ptr [RBP + -0x2c],ECX
LAB_00158cb7:
TEST R15B,0x1
JZ 0x00158cec
MOV RDI,R13
MOV RSI,RBX
MOV R12,R13
MOV R13,qword ptr [RBP + -0x38]
MOV RDX,R13
CALL 0x00158d7b
MOV qword ptr [RBP + -0x48],RAX
MOV RDI,R12
LEA R12,[0x465b00]
MOV RSI,R13
CALL 0x00158e9d
MOV R13,qword ptr [RBP + -0x48]
LAB_00158cec:
CMP R15D,0x2
JC 0x00158d57
SHR R15D,0x1
TEST R14B,0x1
JZ 0x00158d1c
CMP RBX,R12
JC 0x00158d4b
MOV R14B,0x1
JNZ 0x00158cb7
MOV RDI,R12
MOV RSI,R12
MOV RDX,qword ptr [RBP + -0x38]
CALL 0x00158d7b
MOV RBX,RAX
MOV ECX,dword ptr [RBP + -0x2c]
JMP 0x00158cab
LAB_00158d1c:
MOV RDI,RBX
MOV R14,RBX
MOV RSI,RBX
MOV RBX,qword ptr [RBP + -0x38]
MOV RDX,RBX
CALL 0x00158d7b
MOV qword ptr [RBP + -0x40],RAX
MOV RDI,R14
MOV RSI,RBX
CALL 0x00158e9d
XOR ECX,ECX
MOV RBX,qword ptr [RBP + -0x40]
JMP 0x00158cab
LAB_00158d4b:
ADD RBX,0x18
MOV ECX,dword ptr [RBP + -0x2c]
JMP 0x00158cab
LAB_00158d57:
MOV RDI,qword ptr [RBP + -0x40]
TEST RDI,RDI
JZ 0x00158d69
MOV RSI,qword ptr [RBP + -0x38]
CALL 0x00158e9d
LAB_00158d69:
MOV RAX,R13
ADD RSP,0x28
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
int8 pow5mult(int8 param_1,uint param_2,int8 param_3)
{
int1 *puVar1;
int8 uVar2;
bool bVar3;
bool bVar4;
int1 *local_48;
if ((param_2 & 3) != 0) {
param_1 = multadd(param_1,*(int4 *)(pow5mult_p05 + (ulong)((param_2 & 3) - 1) * 4),0,
param_3);
}
if (param_2 < 4) {
return param_1;
}
param_2 = param_2 >> 2;
local_48 = (int1 *)0x0;
puVar1 = p5_a;
bVar3 = true;
LAB_00158cab:
do {
bVar4 = puVar1 < (int1 *)0x465b00;
uVar2 = param_1;
do {
param_1 = uVar2;
if ((param_2 & 1) != 0) {
param_1 = mult(uVar2,puVar1,param_3);
Bfree(uVar2,param_3);
}
if (param_2 < 2) {
if (local_48 == (int1 *)0x0) {
return param_1;
}
Bfree(local_48,param_3);
return param_1;
}
param_2 = param_2 >> 1;
if (!bVar3) {
local_48 = (int1 *)mult(puVar1,puVar1,param_3);
Bfree(puVar1,param_3);
bVar3 = false;
puVar1 = local_48;
goto LAB_00158cab;
}
if (puVar1 < (int1 *)0x465b00) {
puVar1 = puVar1 + 0x18;
bVar3 = bVar4;
goto LAB_00158cab;
}
bVar3 = true;
uVar2 = param_1;
} while (puVar1 != (int1 *)0x465b00);
puVar1 = (int1 *)mult(0x465b00,0x465b00,param_3);
bVar3 = bVar4;
} while( true );
}
|
|
64,356 |
cpu_tensor_data_access_subscript_flattened_e5m10_Test::~cpu_tensor_data_access_subscript_flattened_e5m10_Test()
|
magnetron/test/unittests/tensor/data_access.cpp
|
TEST(cpu_tensor_data_access_subscript, flattened_e5m10) {
auto ctx = context{compute_device::cpu};
for_all_shape_perms(lim, 1, [&](std::span<const std::int64_t> shape) {
tensor t {ctx, dtype::e5m10, shape};
t.fill_rand_uniform(-1.0f, 1.0f);
std::vector<mag_e8m23_t> data {t.to_vector()};
ASSERT_EQ(t.numel(), data.size());
for (std::size_t i {0}; i < data.size(); ++i) {
ASSERT_FLOAT_EQ(t(i), data[i]);
}
});
}
|
O0
|
cpp
|
cpu_tensor_data_access_subscript_flattened_e5m10_Test::~cpu_tensor_data_access_subscript_flattened_e5m10_Test():
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rdi
callq 0x9ede0
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax,%rax)
|
_ZN53cpu_tensor_data_access_subscript_flattened_e5m10_TestD2Ev:
push rbp
mov rbp, rsp
sub rsp, 10h
mov [rbp+var_8], rdi
mov rdi, [rbp+var_8]; this
call _ZN7testing4TestD2Ev; testing::Test::~Test()
add rsp, 10h
pop rbp
retn
|
void cpu_tensor_data_access_subscript_flattened_e5m10_Test::~cpu_tensor_data_access_subscript_flattened_e5m10_Test(
cpu_tensor_data_access_subscript_flattened_e5m10_Test *this)
{
testing::Test::~Test(this);
}
|
~cpu_tensor_data_access_subscript_flattened_e5m10_Test:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x10
MOV qword ptr [RBP + -0x8],RDI
MOV RDI,qword ptr [RBP + -0x8]
CALL 0x0019ede0
ADD RSP,0x10
POP RBP
RET
|
/* cpu_tensor_data_access_subscript_flattened_e5m10_Test::~cpu_tensor_data_access_subscript_flattened_e5m10_Test()
*/
void __thiscall
cpu_tensor_data_access_subscript_flattened_e5m10_Test::
~cpu_tensor_data_access_subscript_flattened_e5m10_Test
(cpu_tensor_data_access_subscript_flattened_e5m10_Test *this)
{
testing::Test::~Test((Test *)this);
return;
}
|
|
64,357 |
mi_keyseg_read
|
eloqsql/storage/myisam/mi_open.c
|
uchar *mi_keyseg_read(uchar *ptr, HA_KEYSEG *keyseg)
{
keyseg->type = *ptr++;
keyseg->language = *ptr++;
keyseg->null_bit = *ptr++;
keyseg->bit_start = *ptr++;
keyseg->language += ((uint16) (*ptr++)) << 8;
keyseg->bit_length = *ptr++;
keyseg->flag = mi_uint2korr(ptr); ptr +=2;
keyseg->length = mi_uint2korr(ptr); ptr +=2;
keyseg->start = mi_uint4korr(ptr); ptr +=4;
keyseg->null_pos = mi_uint4korr(ptr); ptr +=4;
keyseg->charset=0; /* Will be filled in later */
if (keyseg->null_bit)
/* We adjust bit_pos if null_bit is last in the byte */
keyseg->bit_pos= (uint16)(keyseg->null_pos + (keyseg->null_bit == (1 << 7)));
else
{
keyseg->bit_pos= (uint16)keyseg->null_pos;
keyseg->null_pos= 0;
}
return ptr;
}
|
O0
|
c
|
mi_keyseg_read:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x8(%rbp)
movb (%rax), %cl
movq -0x10(%rbp), %rax
movb %cl, 0x18(%rax)
movq -0x8(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x8(%rbp)
movzbl (%rax), %eax
movw %ax, %cx
movq -0x10(%rbp), %rax
movw %cx, 0x16(%rax)
movq -0x8(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x8(%rbp)
movb (%rax), %cl
movq -0x10(%rbp), %rax
movb %cl, 0x19(%rax)
movq -0x8(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x8(%rbp)
movb (%rax), %cl
movq -0x10(%rbp), %rax
movb %cl, 0x1a(%rax)
movq -0x8(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x8(%rbp)
movzbl (%rax), %eax
movzwl %ax, %edx
shll $0x8, %edx
movq -0x10(%rbp), %rax
movzwl 0x16(%rax), %ecx
addl %edx, %ecx
movw %cx, 0x16(%rax)
movq -0x8(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x8(%rbp)
movb (%rax), %cl
movq -0x10(%rbp), %rax
movb %cl, 0x1b(%rax)
movq -0x8(%rbp), %rax
movzbl 0x1(%rax), %eax
movzwl %ax, %eax
movq -0x8(%rbp), %rcx
movzbl (%rcx), %ecx
movzwl %cx, %ecx
shll $0x8, %ecx
orl %ecx, %eax
movw %ax, %cx
movq -0x10(%rbp), %rax
movw %cx, 0x12(%rax)
movq -0x8(%rbp), %rax
addq $0x2, %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
movzbl 0x1(%rax), %eax
movzwl %ax, %eax
movq -0x8(%rbp), %rcx
movzbl (%rcx), %ecx
movzwl %cx, %ecx
shll $0x8, %ecx
orl %ecx, %eax
movw %ax, %cx
movq -0x10(%rbp), %rax
movw %cx, 0x14(%rax)
movq -0x8(%rbp), %rax
addq $0x2, %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
movzbl 0x3(%rax), %ecx
movq -0x8(%rbp), %rax
movzbl 0x2(%rax), %eax
shll $0x8, %eax
orl %eax, %ecx
movq -0x8(%rbp), %rax
movzbl 0x1(%rax), %eax
shll $0x10, %eax
orl %eax, %ecx
movq -0x8(%rbp), %rax
movzbl (%rax), %eax
shll $0x18, %eax
orl %eax, %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x8(%rax)
movq -0x8(%rbp), %rax
addq $0x4, %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
movzbl 0x3(%rax), %ecx
movq -0x8(%rbp), %rax
movzbl 0x2(%rax), %eax
shll $0x8, %eax
orl %eax, %ecx
movq -0x8(%rbp), %rax
movzbl 0x1(%rax), %eax
shll $0x10, %eax
orl %eax, %ecx
movq -0x8(%rbp), %rax
movzbl (%rax), %eax
shll $0x18, %eax
orl %eax, %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0xc(%rax)
movq -0x8(%rbp), %rax
addq $0x4, %rax
movq %rax, -0x8(%rbp)
movq -0x10(%rbp), %rax
movq $0x0, (%rax)
movq -0x10(%rbp), %rax
cmpb $0x0, 0x19(%rax)
je 0xb5fc5
movq -0x10(%rbp), %rax
movl 0xc(%rax), %eax
movq -0x10(%rbp), %rcx
movzbl 0x19(%rcx), %ecx
cmpl $0x80, %ecx
sete %cl
andb $0x1, %cl
movzbl %cl, %ecx
addl %ecx, %eax
movw %ax, %cx
movq -0x10(%rbp), %rax
movw %cx, 0x10(%rax)
jmp 0xb5fe2
movq -0x10(%rbp), %rax
movl 0xc(%rax), %eax
movw %ax, %cx
movq -0x10(%rbp), %rax
movw %cx, 0x10(%rax)
movq -0x10(%rbp), %rax
movl $0x0, 0xc(%rax)
movq -0x8(%rbp), %rax
popq %rbp
retq
nopl (%rax,%rax)
|
mi_keyseg_read:
push rbp
mov rbp, rsp
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov rax, [rbp+var_8]
mov rcx, rax
add rcx, 1
mov [rbp+var_8], rcx
mov cl, [rax]
mov rax, [rbp+var_10]
mov [rax+18h], cl
mov rax, [rbp+var_8]
mov rcx, rax
add rcx, 1
mov [rbp+var_8], rcx
movzx eax, byte ptr [rax]
mov cx, ax
mov rax, [rbp+var_10]
mov [rax+16h], cx
mov rax, [rbp+var_8]
mov rcx, rax
add rcx, 1
mov [rbp+var_8], rcx
mov cl, [rax]
mov rax, [rbp+var_10]
mov [rax+19h], cl
mov rax, [rbp+var_8]
mov rcx, rax
add rcx, 1
mov [rbp+var_8], rcx
mov cl, [rax]
mov rax, [rbp+var_10]
mov [rax+1Ah], cl
mov rax, [rbp+var_8]
mov rcx, rax
add rcx, 1
mov [rbp+var_8], rcx
movzx eax, byte ptr [rax]
movzx edx, ax
shl edx, 8
mov rax, [rbp+var_10]
movzx ecx, word ptr [rax+16h]
add ecx, edx
mov [rax+16h], cx
mov rax, [rbp+var_8]
mov rcx, rax
add rcx, 1
mov [rbp+var_8], rcx
mov cl, [rax]
mov rax, [rbp+var_10]
mov [rax+1Bh], cl
mov rax, [rbp+var_8]
movzx eax, byte ptr [rax+1]
movzx eax, ax
mov rcx, [rbp+var_8]
movzx ecx, byte ptr [rcx]
movzx ecx, cx
shl ecx, 8
or eax, ecx
mov cx, ax
mov rax, [rbp+var_10]
mov [rax+12h], cx
mov rax, [rbp+var_8]
add rax, 2
mov [rbp+var_8], rax
mov rax, [rbp+var_8]
movzx eax, byte ptr [rax+1]
movzx eax, ax
mov rcx, [rbp+var_8]
movzx ecx, byte ptr [rcx]
movzx ecx, cx
shl ecx, 8
or eax, ecx
mov cx, ax
mov rax, [rbp+var_10]
mov [rax+14h], cx
mov rax, [rbp+var_8]
add rax, 2
mov [rbp+var_8], rax
mov rax, [rbp+var_8]
movzx ecx, byte ptr [rax+3]
mov rax, [rbp+var_8]
movzx eax, byte ptr [rax+2]
shl eax, 8
or ecx, eax
mov rax, [rbp+var_8]
movzx eax, byte ptr [rax+1]
shl eax, 10h
or ecx, eax
mov rax, [rbp+var_8]
movzx eax, byte ptr [rax]
shl eax, 18h
or ecx, eax
mov rax, [rbp+var_10]
mov [rax+8], ecx
mov rax, [rbp+var_8]
add rax, 4
mov [rbp+var_8], rax
mov rax, [rbp+var_8]
movzx ecx, byte ptr [rax+3]
mov rax, [rbp+var_8]
movzx eax, byte ptr [rax+2]
shl eax, 8
or ecx, eax
mov rax, [rbp+var_8]
movzx eax, byte ptr [rax+1]
shl eax, 10h
or ecx, eax
mov rax, [rbp+var_8]
movzx eax, byte ptr [rax]
shl eax, 18h
or ecx, eax
mov rax, [rbp+var_10]
mov [rax+0Ch], ecx
mov rax, [rbp+var_8]
add rax, 4
mov [rbp+var_8], rax
mov rax, [rbp+var_10]
mov qword ptr [rax], 0
mov rax, [rbp+var_10]
cmp byte ptr [rax+19h], 0
jz short loc_B5FC5
mov rax, [rbp+var_10]
mov eax, [rax+0Ch]
mov rcx, [rbp+var_10]
movzx ecx, byte ptr [rcx+19h]
cmp ecx, 80h
setz cl
and cl, 1
movzx ecx, cl
add eax, ecx
mov cx, ax
mov rax, [rbp+var_10]
mov [rax+10h], cx
jmp short loc_B5FE2
loc_B5FC5:
mov rax, [rbp+var_10]
mov eax, [rax+0Ch]
mov cx, ax
mov rax, [rbp+var_10]
mov [rax+10h], cx
mov rax, [rbp+var_10]
mov dword ptr [rax+0Ch], 0
loc_B5FE2:
mov rax, [rbp+var_8]
pop rbp
retn
|
long long mi_keyseg_read(long long a1, long long a2)
{
*(_BYTE *)(a2 + 24) = *(_BYTE *)a1;
*(_WORD *)(a2 + 22) = *(unsigned __int8 *)(a1 + 1);
*(_BYTE *)(a2 + 25) = *(_BYTE *)(a1 + 2);
*(_BYTE *)(a2 + 26) = *(_BYTE *)(a1 + 3);
*(_WORD *)(a2 + 22) += *(unsigned __int8 *)(a1 + 4) << 8;
*(_BYTE *)(a2 + 27) = *(_BYTE *)(a1 + 5);
*(_WORD *)(a2 + 18) = _byteswap_ushort(*(_WORD *)(a1 + 6));
*(_WORD *)(a2 + 20) = _byteswap_ushort(*(_WORD *)(a1 + 8));
*(_DWORD *)(a2 + 8) = _byteswap_ulong(*(_DWORD *)(a1 + 10));
*(_DWORD *)(a2 + 12) = _byteswap_ulong(*(_DWORD *)(a1 + 14));
*(_QWORD *)a2 = 0LL;
if ( *(_BYTE *)(a2 + 25) )
{
*(_WORD *)(a2 + 16) = (*(unsigned __int8 *)(a2 + 25) == 128) + (unsigned __int16)*(_DWORD *)(a2 + 12);
}
else
{
*(_WORD *)(a2 + 16) = *(_DWORD *)(a2 + 12);
*(_DWORD *)(a2 + 12) = 0;
}
return a1 + 18;
}
|
mi_keyseg_read:
PUSH RBP
MOV RBP,RSP
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV RAX,qword ptr [RBP + -0x8]
MOV RCX,RAX
ADD RCX,0x1
MOV qword ptr [RBP + -0x8],RCX
MOV CL,byte ptr [RAX]
MOV RAX,qword ptr [RBP + -0x10]
MOV byte ptr [RAX + 0x18],CL
MOV RAX,qword ptr [RBP + -0x8]
MOV RCX,RAX
ADD RCX,0x1
MOV qword ptr [RBP + -0x8],RCX
MOVZX EAX,byte ptr [RAX]
MOV CX,AX
MOV RAX,qword ptr [RBP + -0x10]
MOV word ptr [RAX + 0x16],CX
MOV RAX,qword ptr [RBP + -0x8]
MOV RCX,RAX
ADD RCX,0x1
MOV qword ptr [RBP + -0x8],RCX
MOV CL,byte ptr [RAX]
MOV RAX,qword ptr [RBP + -0x10]
MOV byte ptr [RAX + 0x19],CL
MOV RAX,qword ptr [RBP + -0x8]
MOV RCX,RAX
ADD RCX,0x1
MOV qword ptr [RBP + -0x8],RCX
MOV CL,byte ptr [RAX]
MOV RAX,qword ptr [RBP + -0x10]
MOV byte ptr [RAX + 0x1a],CL
MOV RAX,qword ptr [RBP + -0x8]
MOV RCX,RAX
ADD RCX,0x1
MOV qword ptr [RBP + -0x8],RCX
MOVZX EAX,byte ptr [RAX]
MOVZX EDX,AX
SHL EDX,0x8
MOV RAX,qword ptr [RBP + -0x10]
MOVZX ECX,word ptr [RAX + 0x16]
ADD ECX,EDX
MOV word ptr [RAX + 0x16],CX
MOV RAX,qword ptr [RBP + -0x8]
MOV RCX,RAX
ADD RCX,0x1
MOV qword ptr [RBP + -0x8],RCX
MOV CL,byte ptr [RAX]
MOV RAX,qword ptr [RBP + -0x10]
MOV byte ptr [RAX + 0x1b],CL
MOV RAX,qword ptr [RBP + -0x8]
MOVZX EAX,byte ptr [RAX + 0x1]
MOVZX EAX,AX
MOV RCX,qword ptr [RBP + -0x8]
MOVZX ECX,byte ptr [RCX]
MOVZX ECX,CX
SHL ECX,0x8
OR EAX,ECX
MOV CX,AX
MOV RAX,qword ptr [RBP + -0x10]
MOV word ptr [RAX + 0x12],CX
MOV RAX,qword ptr [RBP + -0x8]
ADD RAX,0x2
MOV qword ptr [RBP + -0x8],RAX
MOV RAX,qword ptr [RBP + -0x8]
MOVZX EAX,byte ptr [RAX + 0x1]
MOVZX EAX,AX
MOV RCX,qword ptr [RBP + -0x8]
MOVZX ECX,byte ptr [RCX]
MOVZX ECX,CX
SHL ECX,0x8
OR EAX,ECX
MOV CX,AX
MOV RAX,qword ptr [RBP + -0x10]
MOV word ptr [RAX + 0x14],CX
MOV RAX,qword ptr [RBP + -0x8]
ADD RAX,0x2
MOV qword ptr [RBP + -0x8],RAX
MOV RAX,qword ptr [RBP + -0x8]
MOVZX ECX,byte ptr [RAX + 0x3]
MOV RAX,qword ptr [RBP + -0x8]
MOVZX EAX,byte ptr [RAX + 0x2]
SHL EAX,0x8
OR ECX,EAX
MOV RAX,qword ptr [RBP + -0x8]
MOVZX EAX,byte ptr [RAX + 0x1]
SHL EAX,0x10
OR ECX,EAX
MOV RAX,qword ptr [RBP + -0x8]
MOVZX EAX,byte ptr [RAX]
SHL EAX,0x18
OR ECX,EAX
MOV RAX,qword ptr [RBP + -0x10]
MOV dword ptr [RAX + 0x8],ECX
MOV RAX,qword ptr [RBP + -0x8]
ADD RAX,0x4
MOV qword ptr [RBP + -0x8],RAX
MOV RAX,qword ptr [RBP + -0x8]
MOVZX ECX,byte ptr [RAX + 0x3]
MOV RAX,qword ptr [RBP + -0x8]
MOVZX EAX,byte ptr [RAX + 0x2]
SHL EAX,0x8
OR ECX,EAX
MOV RAX,qword ptr [RBP + -0x8]
MOVZX EAX,byte ptr [RAX + 0x1]
SHL EAX,0x10
OR ECX,EAX
MOV RAX,qword ptr [RBP + -0x8]
MOVZX EAX,byte ptr [RAX]
SHL EAX,0x18
OR ECX,EAX
MOV RAX,qword ptr [RBP + -0x10]
MOV dword ptr [RAX + 0xc],ECX
MOV RAX,qword ptr [RBP + -0x8]
ADD RAX,0x4
MOV qword ptr [RBP + -0x8],RAX
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RAX],0x0
MOV RAX,qword ptr [RBP + -0x10]
CMP byte ptr [RAX + 0x19],0x0
JZ 0x001b5fc5
MOV RAX,qword ptr [RBP + -0x10]
MOV EAX,dword ptr [RAX + 0xc]
MOV RCX,qword ptr [RBP + -0x10]
MOVZX ECX,byte ptr [RCX + 0x19]
CMP ECX,0x80
SETZ CL
AND CL,0x1
MOVZX ECX,CL
ADD EAX,ECX
MOV CX,AX
MOV RAX,qword ptr [RBP + -0x10]
MOV word ptr [RAX + 0x10],CX
JMP 0x001b5fe2
LAB_001b5fc5:
MOV RAX,qword ptr [RBP + -0x10]
MOV EAX,dword ptr [RAX + 0xc]
MOV CX,AX
MOV RAX,qword ptr [RBP + -0x10]
MOV word ptr [RAX + 0x10],CX
MOV RAX,qword ptr [RBP + -0x10]
MOV dword ptr [RAX + 0xc],0x0
LAB_001b5fe2:
MOV RAX,qword ptr [RBP + -0x8]
POP RBP
RET
|
int1 * mi_keyseg_read(int1 *param_1,int8 *param_2)
{
*(int1 *)(param_2 + 3) = *param_1;
*(ushort *)((long)param_2 + 0x16) = (ushort)(byte)param_1[1];
*(int1 *)((long)param_2 + 0x19) = param_1[2];
*(int1 *)((long)param_2 + 0x1a) = param_1[3];
*(ushort *)((long)param_2 + 0x16) =
*(short *)((long)param_2 + 0x16) + (ushort)(byte)param_1[4] * 0x100;
*(int1 *)((long)param_2 + 0x1b) = param_1[5];
*(ushort *)((long)param_2 + 0x12) = CONCAT11(param_1[6],param_1[7]);
*(ushort *)((long)param_2 + 0x14) = CONCAT11(param_1[8],param_1[9]);
*(uint *)(param_2 + 1) =
CONCAT13(param_1[10],CONCAT12(param_1[0xb],CONCAT11(param_1[0xc],param_1[0xd])));
*(uint *)((long)param_2 + 0xc) =
CONCAT13(param_1[0xe],CONCAT12(param_1[0xf],CONCAT11(param_1[0x10],param_1[0x11])));
*param_2 = 0;
if (*(char *)((long)param_2 + 0x19) == '\0') {
*(short *)(param_2 + 2) = (short)*(int4 *)((long)param_2 + 0xc);
*(int4 *)((long)param_2 + 0xc) = 0;
}
else {
*(ushort *)(param_2 + 2) =
(short)*(int4 *)((long)param_2 + 0xc) +
(ushort)(*(char *)((long)param_2 + 0x19) == -0x80);
}
return param_1 + 0x12;
}
|
|
64,358 |
my_strnncoll_win1250ch
|
eloqsql/strings/ctype-win1250ch.c
|
static int my_strnncoll_win1250ch(CHARSET_INFO *cs __attribute__((unused)),
const uchar *s1, size_t len1,
const uchar *s2, size_t len2,
my_bool s2_is_prefix)
{
int v1, v2;
const uchar *p1, * p2;
int pass1 = 0, pass2 = 0;
int diff;
if (s2_is_prefix && len1 > len2)
len1=len2;
p1 = s1; p2 = s2;
do
{
NEXT_CMP_VALUE(s1, p1, pass1, v1, (int)len1);
NEXT_CMP_VALUE(s2, p2, pass2, v2, (int)len2);
if ((diff = v1 - v2))
return diff;
} while (v1);
return 0;
}
|
O3
|
c
|
my_strnncoll_win1250ch:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
cmpq %r8, %rdx
movq %r8, %rax
cmovbq %rdx, %rax
testb %r9b, %r9b
cmoveq %rdx, %rax
movq %rax, -0x70(%rbp)
movslq %eax, %rdx
movq %r8, -0x78(%rbp)
movslq %r8d, %r9
movl $0x1, %eax
movl $0x1, %edi
subq %rsi, %rdi
movq %rdi, -0x60(%rbp)
subq %rcx, %rax
movq %rax, -0x68(%rbp)
xorl %r13d, %r13d
leaq 0x2891a2(%rip), %r14 # 0x3134b0
movq %rsi, %r15
movq %rcx, %r12
xorl %ebx, %ebx
movq %rcx, -0x48(%rbp)
movq %rsi, -0x58(%rbp)
movq %r15, %rax
subq %rsi, %rax
cmpq %rdx, %rax
jge 0x8a336
testl %r13d, %r13d
je 0x8a364
movl $0x9, %r8d
jmp 0x8a35f
testl %r13d, %r13d
sete %r8b
cmpl $0x0, -0x70(%rbp)
setg %dil
xorl %eax, %eax
testb %r8b, %dil
je 0x8a42a
movl $0x1, %r13d
movl $0x9, %r8d
movq %rsi, %r15
movq %r14, %rax
jmp 0x8a374
xorl %r13d, %r13d
movl $0x8, %r8d
leaq 0x28903c(%rip), %rax # 0x3133b0
movzbl (%r15), %edi
movb (%rax,%rdi), %al
cmpb $-0x1, %al
jne 0x8a424
movq %r8, -0x50(%rbp)
movq %r12, -0x38(%rbp)
movl %ebx, -0x2c(%rbp)
movq %r13, -0x40(%rbp)
movq %r15, %r11
subq %rsi, %r11
movq -0x60(%rbp), %rax
leaq (%rax,%r15), %rcx
xorl %edi, %edi
movq %r15, %r12
movq %rdi, %r8
shlq $0x4, %r8
leaq 0x2abded(%rip), %rax # 0x3361a0
movq (%r8,%rax), %r13
movb (%r13), %r10b
testb %r10b, %r10b
je 0x8a3eb
cmpq %rdx, %r11
jge 0x8a3eb
incq %r13
movq %rcx, %rbx
cmpb (%r15), %r10b
jne 0x8a3f0
incq %r15
movb (%r13), %r10b
testb %r10b, %r10b
je 0x8a3eb
leaq 0x1(%rbx), %rax
incq %r13
cmpq %rdx, %rbx
movq %rax, %rbx
jl 0x8a3cb
testb %r10b, %r10b
je 0x8a400
incq %rdi
cmpq $0x50, %rdi
movq %r12, %r15
jne 0x8a3a5
movb $-0x1, %al
jmp 0x8a415
leaq 0x2abd99(%rip), %rax # 0x3361a0
addq %rax, %r8
movq -0x50(%rbp), %rax
movb (%r8,%rax), %al
decq %r15
movq -0x48(%rbp), %rcx
movq -0x40(%rbp), %r13
movl -0x2c(%rbp), %ebx
movq -0x38(%rbp), %r12
movzbl %al, %eax
incq %r15
movq %r12, %rdi
subq %rcx, %rdi
cmpq %r9, %rdi
jge 0x8a441
testl %ebx, %ebx
je 0x8a46e
movl $0x9, %r10d
jmp 0x8a469
testl %ebx, %ebx
sete %dil
cmpl $0x0, -0x78(%rbp)
setg %r8b
xorl %r10d, %r10d
testb %dil, %r8b
je 0x8a568
movl $0x1, %ebx
movl $0x9, %r10d
movq %rcx, %r12
movq %r14, %r8
jmp 0x8a47d
xorl %ebx, %ebx
movl $0x8, %r10d
leaq 0x288f33(%rip), %r8 # 0x3133b0
movzbl (%r12), %edi
movb (%r8,%rdi), %dil
cmpb $-0x1, %dil
jne 0x8a561
movq %r10, -0x50(%rbp)
movq %r15, -0x38(%rbp)
movl %ebx, -0x2c(%rbp)
movq %r13, -0x40(%rbp)
movq %r12, %r14
subq %rcx, %r14
movq -0x68(%rbp), %rcx
movq %r12, %r11
leaq (%rcx,%r12), %rsi
xorl %r8d, %r8d
movq %r8, %r15
shlq $0x4, %r15
leaq 0x2abcdf(%rip), %rcx # 0x3361a0
movq (%r15,%rcx), %rbx
movb (%rbx), %r13b
testb %r13b, %r13b
je 0x8a4fc
cmpq %r9, %r14
jge 0x8a4fc
incq %rbx
movq %rsi, %rdi
movq %r11, %r10
cmpb (%r10), %r13b
jne 0x8a504
incq %r10
movb (%rbx), %r13b
testb %r13b, %r13b
je 0x8a4ff
leaq 0x1(%rdi), %r12
incq %rbx
cmpq %r9, %rdi
movq %r12, %rdi
jl 0x8a4db
jmp 0x8a4ff
movq %r11, %r10
testb %r13b, %r13b
je 0x8a52f
incq %r8
cmpq $0x50, %r8
jne 0x8a4b3
movb $-0x1, %dil
movq -0x48(%rbp), %rcx
movq -0x58(%rbp), %rsi
leaq 0x288f91(%rip), %r14 # 0x3134b0
movq -0x40(%rbp), %r13
movl -0x2c(%rbp), %ebx
movq -0x38(%rbp), %r15
movq %r11, %r12
jmp 0x8a561
leaq 0x2abc6a(%rip), %rcx # 0x3361a0
addq %rcx, %r15
movq -0x50(%rbp), %rcx
movb (%r15,%rcx), %dil
decq %r10
movq %r10, %r12
movq -0x48(%rbp), %rcx
movq -0x58(%rbp), %rsi
leaq 0x288f5a(%rip), %r14 # 0x3134b0
movq -0x40(%rbp), %r13
movl -0x2c(%rbp), %ebx
movq -0x38(%rbp), %r15
movzbl %dil, %r10d
incq %r12
testl %eax, %eax
je 0x8a575
cmpl %r10d, %eax
je 0x8a31e
subl %r10d, %eax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
|
my_strnncoll_win1250ch:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
cmp rdx, r8
mov rax, r8
cmovb rax, rdx
test r9b, r9b
cmovz rax, rdx
mov [rbp+var_70], rax
movsxd rdx, eax
mov [rbp+var_78], r8
movsxd r9, r8d
mov eax, 1
mov edi, 1
sub rdi, rsi
mov [rbp+var_60], rdi
sub rax, rcx
mov [rbp+var_68], rax
xor r13d, r13d
lea r14, _sort_order_win1250ch2
mov r15, rsi
mov r12, rcx
xor ebx, ebx
mov [rbp+var_48], rcx
mov [rbp+var_58], rsi
loc_8A31E:
mov rax, r15
sub rax, rsi
cmp rax, rdx
jge short loc_8A336
test r13d, r13d
jz short loc_8A364
mov r8d, 9
jmp short loc_8A35F
loc_8A336:
test r13d, r13d
setz r8b
cmp dword ptr [rbp+var_70], 0
setnle dil
xor eax, eax
test dil, r8b
jz loc_8A42A
mov r13d, 1
mov r8d, 9
mov r15, rsi
loc_8A35F:
mov rax, r14
jmp short loc_8A374
loc_8A364:
xor r13d, r13d
mov r8d, 8
lea rax, _sort_order_win1250ch1
loc_8A374:
movzx edi, byte ptr [r15]
mov al, [rax+rdi]
cmp al, 0FFh
jnz loc_8A424
mov [rbp+var_50], r8
mov [rbp+var_38], r12
mov [rbp+var_2C], ebx
mov [rbp+var_40], r13
mov r11, r15
sub r11, rsi
mov rax, [rbp+var_60]
lea rcx, [rax+r15]
xor edi, edi
mov r12, r15
loc_8A3A5:
mov r8, rdi
shl r8, 4
lea rax, doubles_0
mov r13, [r8+rax]
mov r10b, [r13+0]
test r10b, r10b
jz short loc_8A3EB
cmp r11, rdx
jge short loc_8A3EB
inc r13
mov rbx, rcx
loc_8A3CB:
cmp r10b, [r15]
jnz short loc_8A3F0
inc r15
mov r10b, [r13+0]
test r10b, r10b
jz short loc_8A3EB
lea rax, [rbx+1]
inc r13
cmp rbx, rdx
mov rbx, rax
jl short loc_8A3CB
loc_8A3EB:
test r10b, r10b
jz short loc_8A400
loc_8A3F0:
inc rdi
cmp rdi, 50h ; 'P'
mov r15, r12
jnz short loc_8A3A5
mov al, 0FFh
jmp short loc_8A415
loc_8A400:
lea rax, doubles_0
add r8, rax
mov rax, [rbp+var_50]
mov al, [r8+rax]
dec r15
loc_8A415:
mov rcx, [rbp+var_48]
mov r13, [rbp+var_40]
mov ebx, [rbp+var_2C]
mov r12, [rbp+var_38]
loc_8A424:
movzx eax, al
inc r15
loc_8A42A:
mov rdi, r12
sub rdi, rcx
cmp rdi, r9
jge short loc_8A441
test ebx, ebx
jz short loc_8A46E
mov r10d, 9
jmp short loc_8A469
loc_8A441:
test ebx, ebx
setz dil
cmp dword ptr [rbp+var_78], 0
setnle r8b
xor r10d, r10d
test r8b, dil
jz loc_8A568
mov ebx, 1
mov r10d, 9
mov r12, rcx
loc_8A469:
mov r8, r14
jmp short loc_8A47D
loc_8A46E:
xor ebx, ebx
mov r10d, 8
lea r8, _sort_order_win1250ch1
loc_8A47D:
movzx edi, byte ptr [r12]
mov dil, [r8+rdi]
cmp dil, 0FFh
jnz loc_8A561
mov [rbp+var_50], r10
mov [rbp+var_38], r15
mov [rbp+var_2C], ebx
mov [rbp+var_40], r13
mov r14, r12
sub r14, rcx
mov rcx, [rbp+var_68]
mov r11, r12
lea rsi, [rcx+r12]
xor r8d, r8d
loc_8A4B3:
mov r15, r8
shl r15, 4
lea rcx, doubles_0
mov rbx, [r15+rcx]
mov r13b, [rbx]
test r13b, r13b
jz short loc_8A4FC
cmp r14, r9
jge short loc_8A4FC
inc rbx
mov rdi, rsi
mov r10, r11
loc_8A4DB:
cmp r13b, [r10]
jnz short loc_8A504
inc r10
mov r13b, [rbx]
test r13b, r13b
jz short loc_8A4FF
lea r12, [rdi+1]
inc rbx
cmp rdi, r9
mov rdi, r12
jl short loc_8A4DB
jmp short loc_8A4FF
loc_8A4FC:
mov r10, r11
loc_8A4FF:
test r13b, r13b
jz short loc_8A52F
loc_8A504:
inc r8
cmp r8, 50h ; 'P'
jnz short loc_8A4B3
mov dil, 0FFh
mov rcx, [rbp+var_48]
mov rsi, [rbp+var_58]
lea r14, _sort_order_win1250ch2
mov r13, [rbp+var_40]
mov ebx, [rbp+var_2C]
mov r15, [rbp+var_38]
mov r12, r11
jmp short loc_8A561
loc_8A52F:
lea rcx, doubles_0
add r15, rcx
mov rcx, [rbp+var_50]
mov dil, [r15+rcx]
dec r10
mov r12, r10
mov rcx, [rbp+var_48]
mov rsi, [rbp+var_58]
lea r14, _sort_order_win1250ch2
mov r13, [rbp+var_40]
mov ebx, [rbp+var_2C]
mov r15, [rbp+var_38]
loc_8A561:
movzx r10d, dil
inc r12
loc_8A568:
test eax, eax
jz short loc_8A575
cmp eax, r10d
jz loc_8A31E
loc_8A575:
sub eax, r10d
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
|
long long my_strnncoll_win1250ch(
long long a1,
_BYTE *a2,
unsigned long long a3,
unsigned __int8 *a4,
unsigned long long a5,
char a6)
{
int v6; // eax
long long v7; // rdx
long long v8; // r9
long long v9; // r13
_BYTE *v10; // r15
unsigned __int8 *v11; // r12
int v12; // ebx
long long v13; // r8
_BYTE *v14; // rax
_BYTE *v15; // r11
_BYTE *v16; // rcx
long long v17; // rdi
_BYTE *v18; // r12
char *v19; // r13
char v20; // r10
char *v21; // r13
_BYTE *v22; // rbx
bool v23; // cc
long long v24; // r10
int v25; // r10d
_BYTE *v26; // r8
unsigned __int8 v27; // di
long long v28; // r8
char *v29; // rbx
char v30; // r13
char *v31; // rbx
unsigned __int8 *v32; // rdi
_BYTE *v33; // r10
int v35; // [rsp+0h] [rbp-78h]
int v36; // [rsp+8h] [rbp-70h]
long long v37; // [rsp+10h] [rbp-68h]
long long v38; // [rsp+18h] [rbp-60h]
_BYTE *v39; // [rsp+20h] [rbp-58h]
long long v40; // [rsp+28h] [rbp-50h]
unsigned __int8 *v41; // [rsp+30h] [rbp-48h]
long long v42; // [rsp+38h] [rbp-40h]
long long v43; // [rsp+38h] [rbp-40h]
unsigned __int8 *v44; // [rsp+40h] [rbp-38h]
int v45; // [rsp+4Ch] [rbp-2Ch]
int v46; // [rsp+4Ch] [rbp-2Ch]
v6 = a5;
if ( a3 < a5 )
v6 = a3;
if ( !a6 )
v6 = a3;
v36 = v6;
v7 = v6;
v35 = a5;
v8 = (int)a5;
v38 = 1LL - (_QWORD)a2;
v37 = 1LL - (_QWORD)a4;
v9 = 0LL;
v10 = a2;
v11 = a4;
v12 = 0;
v41 = a4;
v39 = a2;
do
{
if ( v10 - a2 >= v7 )
{
LODWORD(v14) = 0;
if ( (_DWORD)v9 != 0 || v36 <= 0 )
goto LABEL_27;
v9 = 1LL;
v13 = 9LL;
v10 = a2;
}
else
{
if ( !(_DWORD)v9 )
{
v9 = 0LL;
v13 = 8LL;
v14 = &sort_order_win1250ch1;
goto LABEL_13;
}
v13 = 9LL;
}
v14 = &sort_order_win1250ch2;
LABEL_13:
LOBYTE(v14) = v14[(unsigned __int8)*v10];
if ( (_BYTE)v14 != 0xFF )
goto LABEL_26;
v44 = v11;
v45 = v12;
v42 = v9;
v15 = (_BYTE *)(v10 - a2);
v16 = &v10[v38];
v17 = 0LL;
v18 = v10;
while ( 1 )
{
v19 = (char *)*(&doubles_0 + 2 * v17);
v20 = *v19;
if ( *v19 && (long long)v15 < v7 )
{
v21 = v19 + 1;
v22 = v16;
while ( v20 == *v10 )
{
++v10;
v20 = *v21;
if ( *v21 )
{
++v21;
v23 = (long long)v22++ < v7;
if ( v23 )
continue;
}
goto LABEL_21;
}
goto LABEL_22;
}
LABEL_21:
if ( !v20 )
break;
LABEL_22:
++v17;
v10 = v18;
if ( v17 == 80 )
{
LOBYTE(v14) = -1;
goto LABEL_25;
}
}
LOBYTE(v14) = *((_BYTE *)&doubles_0 + 16 * v17 + v13);
--v10;
LABEL_25:
a4 = v41;
v9 = v42;
v12 = v45;
v11 = v44;
LABEL_26:
LODWORD(v14) = (unsigned __int8)v14;
++v10;
LABEL_27:
if ( v11 - a4 >= v8 )
{
v25 = 0;
if ( v12 != 0 || v35 <= 0 )
continue;
v12 = 1;
v24 = 9LL;
v11 = a4;
LABEL_32:
v26 = &sort_order_win1250ch2;
}
else
{
if ( v12 )
{
v24 = 9LL;
goto LABEL_32;
}
v12 = 0;
v24 = 8LL;
v26 = &sort_order_win1250ch1;
}
v27 = v26[*v11];
if ( v27 != 0xFF )
goto LABEL_48;
v40 = v24;
v46 = v12;
v43 = v9;
v28 = 0LL;
while ( 2 )
{
v29 = (char *)*(&doubles_0 + 2 * v28);
v30 = *v29;
if ( *v29 && v11 - a4 < v8 )
{
v31 = v29 + 1;
v32 = &v11[v37];
v33 = v11;
while ( v30 == *v33 )
{
++v33;
v30 = *v31;
if ( *v31 )
{
++v31;
v23 = (long long)v32++ < v8;
if ( v23 )
continue;
}
goto LABEL_44;
}
goto LABEL_45;
}
v33 = v11;
LABEL_44:
if ( v30 )
{
LABEL_45:
if ( ++v28 == 80 )
{
v27 = -1;
a4 = v41;
a2 = v39;
v9 = v43;
v12 = v46;
goto LABEL_48;
}
continue;
}
break;
}
v27 = *((_BYTE *)&doubles_0 + 16 * v28 + v40);
v11 = v33 - 1;
a4 = v41;
a2 = v39;
v9 = v43;
v12 = v46;
LABEL_48:
v25 = v27;
++v11;
}
while ( (_DWORD)v14 && (_DWORD)v14 == v25 );
return (unsigned int)((_DWORD)v14 - v25);
}
|
my_strnncoll_win1250ch:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
CMP RDX,R8
MOV RAX,R8
CMOVC RAX,RDX
TEST R9B,R9B
CMOVZ RAX,RDX
MOV qword ptr [RBP + -0x70],RAX
MOVSXD RDX,EAX
MOV qword ptr [RBP + -0x78],R8
MOVSXD R9,R8D
MOV EAX,0x1
MOV EDI,0x1
SUB RDI,RSI
MOV qword ptr [RBP + -0x60],RDI
SUB RAX,RCX
MOV qword ptr [RBP + -0x68],RAX
XOR R13D,R13D
LEA R14,[0x4134b0]
MOV R15,RSI
MOV R12,RCX
XOR EBX,EBX
MOV qword ptr [RBP + -0x48],RCX
MOV qword ptr [RBP + -0x58],RSI
LAB_0018a31e:
MOV RAX,R15
SUB RAX,RSI
CMP RAX,RDX
JGE 0x0018a336
TEST R13D,R13D
JZ 0x0018a364
MOV R8D,0x9
JMP 0x0018a35f
LAB_0018a336:
TEST R13D,R13D
SETZ R8B
CMP dword ptr [RBP + -0x70],0x0
SETG DIL
XOR EAX,EAX
TEST DIL,R8B
JZ 0x0018a42a
MOV R13D,0x1
MOV R8D,0x9
MOV R15,RSI
LAB_0018a35f:
MOV RAX,R14
JMP 0x0018a374
LAB_0018a364:
XOR R13D,R13D
MOV R8D,0x8
LEA RAX,[0x4133b0]
LAB_0018a374:
MOVZX EDI,byte ptr [R15]
MOV AL,byte ptr [RAX + RDI*0x1]
CMP AL,0xff
JNZ 0x0018a424
MOV qword ptr [RBP + -0x50],R8
MOV qword ptr [RBP + -0x38],R12
MOV dword ptr [RBP + -0x2c],EBX
MOV qword ptr [RBP + -0x40],R13
MOV R11,R15
SUB R11,RSI
MOV RAX,qword ptr [RBP + -0x60]
LEA RCX,[RAX + R15*0x1]
XOR EDI,EDI
MOV R12,R15
LAB_0018a3a5:
MOV R8,RDI
SHL R8,0x4
LEA RAX,[0x4361a0]
MOV R13,qword ptr [R8 + RAX*0x1]
MOV R10B,byte ptr [R13]
TEST R10B,R10B
JZ 0x0018a3eb
CMP R11,RDX
JGE 0x0018a3eb
INC R13
MOV RBX,RCX
LAB_0018a3cb:
CMP R10B,byte ptr [R15]
JNZ 0x0018a3f0
INC R15
MOV R10B,byte ptr [R13]
TEST R10B,R10B
JZ 0x0018a3eb
LEA RAX,[RBX + 0x1]
INC R13
CMP RBX,RDX
MOV RBX,RAX
JL 0x0018a3cb
LAB_0018a3eb:
TEST R10B,R10B
JZ 0x0018a400
LAB_0018a3f0:
INC RDI
CMP RDI,0x50
MOV R15,R12
JNZ 0x0018a3a5
MOV AL,0xff
JMP 0x0018a415
LAB_0018a400:
LEA RAX,[0x4361a0]
ADD R8,RAX
MOV RAX,qword ptr [RBP + -0x50]
MOV AL,byte ptr [R8 + RAX*0x1]
DEC R15
LAB_0018a415:
MOV RCX,qword ptr [RBP + -0x48]
MOV R13,qword ptr [RBP + -0x40]
MOV EBX,dword ptr [RBP + -0x2c]
MOV R12,qword ptr [RBP + -0x38]
LAB_0018a424:
MOVZX EAX,AL
INC R15
LAB_0018a42a:
MOV RDI,R12
SUB RDI,RCX
CMP RDI,R9
JGE 0x0018a441
TEST EBX,EBX
JZ 0x0018a46e
MOV R10D,0x9
JMP 0x0018a469
LAB_0018a441:
TEST EBX,EBX
SETZ DIL
CMP dword ptr [RBP + -0x78],0x0
SETG R8B
XOR R10D,R10D
TEST R8B,DIL
JZ 0x0018a568
MOV EBX,0x1
MOV R10D,0x9
MOV R12,RCX
LAB_0018a469:
MOV R8,R14
JMP 0x0018a47d
LAB_0018a46e:
XOR EBX,EBX
MOV R10D,0x8
LEA R8,[0x4133b0]
LAB_0018a47d:
MOVZX EDI,byte ptr [R12]
MOV DIL,byte ptr [R8 + RDI*0x1]
CMP DIL,0xff
JNZ 0x0018a561
MOV qword ptr [RBP + -0x50],R10
MOV qword ptr [RBP + -0x38],R15
MOV dword ptr [RBP + -0x2c],EBX
MOV qword ptr [RBP + -0x40],R13
MOV R14,R12
SUB R14,RCX
MOV RCX,qword ptr [RBP + -0x68]
MOV R11,R12
LEA RSI,[RCX + R12*0x1]
XOR R8D,R8D
LAB_0018a4b3:
MOV R15,R8
SHL R15,0x4
LEA RCX,[0x4361a0]
MOV RBX,qword ptr [R15 + RCX*0x1]
MOV R13B,byte ptr [RBX]
TEST R13B,R13B
JZ 0x0018a4fc
CMP R14,R9
JGE 0x0018a4fc
INC RBX
MOV RDI,RSI
MOV R10,R11
LAB_0018a4db:
CMP R13B,byte ptr [R10]
JNZ 0x0018a504
INC R10
MOV R13B,byte ptr [RBX]
TEST R13B,R13B
JZ 0x0018a4ff
LEA R12,[RDI + 0x1]
INC RBX
CMP RDI,R9
MOV RDI,R12
JL 0x0018a4db
JMP 0x0018a4ff
LAB_0018a4fc:
MOV R10,R11
LAB_0018a4ff:
TEST R13B,R13B
JZ 0x0018a52f
LAB_0018a504:
INC R8
CMP R8,0x50
JNZ 0x0018a4b3
MOV DIL,0xff
MOV RCX,qword ptr [RBP + -0x48]
MOV RSI,qword ptr [RBP + -0x58]
LEA R14,[0x4134b0]
MOV R13,qword ptr [RBP + -0x40]
MOV EBX,dword ptr [RBP + -0x2c]
MOV R15,qword ptr [RBP + -0x38]
MOV R12,R11
JMP 0x0018a561
LAB_0018a52f:
LEA RCX,[0x4361a0]
ADD R15,RCX
MOV RCX,qword ptr [RBP + -0x50]
MOV DIL,byte ptr [R15 + RCX*0x1]
DEC R10
MOV R12,R10
MOV RCX,qword ptr [RBP + -0x48]
MOV RSI,qword ptr [RBP + -0x58]
LEA R14,[0x4134b0]
MOV R13,qword ptr [RBP + -0x40]
MOV EBX,dword ptr [RBP + -0x2c]
MOV R15,qword ptr [RBP + -0x38]
LAB_0018a561:
MOVZX R10D,DIL
INC R12
LAB_0018a568:
TEST EAX,EAX
JZ 0x0018a575
CMP EAX,R10D
JZ 0x0018a31e
LAB_0018a575:
SUB EAX,R10D
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
int my_strnncoll_win1250ch
(int8 param_1,byte *param_2,ulong param_3,byte *param_4,ulong param_5,
char param_6)
{
bool bVar1;
bool bVar2;
byte *pbVar3;
byte *pbVar4;
byte *pbVar5;
byte bVar6;
int iVar7;
ulong uVar9;
int1 *puVar10;
long lVar11;
int iVar12;
uint uVar13;
long lVar14;
byte *pbVar15;
byte *pbVar16;
byte *pbVar17;
byte *pbVar18;
uint uVar8;
uVar9 = param_5;
if (param_3 < param_5) {
uVar9 = param_3;
}
if (param_6 == '\0') {
uVar9 = param_3;
}
iVar7 = (int)uVar9;
iVar12 = (int)param_5;
bVar2 = false;
bVar1 = false;
pbVar15 = param_4;
pbVar18 = param_2;
do {
if ((long)pbVar18 - (long)param_2 < (long)iVar7) {
if (bVar2) {
LAB_0018a35f:
lVar14 = 9;
puVar10 = _sort_order_win1250ch2;
}
else {
bVar2 = false;
lVar14 = 8;
puVar10 = _sort_order_win1250ch1;
}
bVar6 = puVar10[*pbVar18];
if (bVar6 == 0xff) {
lVar11 = 0;
do {
pbVar16 = (&doubles)[lVar11 * 2];
bVar6 = *pbVar16;
pbVar17 = pbVar18;
pbVar5 = pbVar18 + (1 - (long)param_2);
pbVar4 = pbVar18 + -(long)param_2;
if (bVar6 != 0) {
while (pbVar3 = pbVar5, (long)pbVar4 < (long)iVar7) {
pbVar16 = pbVar16 + 1;
if (bVar6 != *pbVar17) goto LAB_0018a3f0;
pbVar17 = pbVar17 + 1;
bVar6 = *pbVar16;
if (bVar6 == 0) break;
pbVar5 = pbVar3 + 1;
pbVar4 = pbVar3;
}
}
if (bVar6 == 0) {
bVar6 = *(byte *)((long)&doubles + lVar14 + lVar11 * 0x10);
pbVar18 = pbVar17 + -1;
goto LAB_0018a424;
}
LAB_0018a3f0:
lVar11 = lVar11 + 1;
} while (lVar11 != 0x50);
bVar6 = 0xff;
}
LAB_0018a424:
uVar8 = (uint)bVar6;
pbVar18 = pbVar18 + 1;
}
else {
uVar8 = 0;
if (0 < iVar7 && !bVar2) {
bVar2 = true;
pbVar18 = param_2;
goto LAB_0018a35f;
}
}
if ((long)pbVar15 - (long)param_4 < (long)iVar12) {
if (bVar1) {
LAB_0018a469:
lVar14 = 9;
puVar10 = _sort_order_win1250ch2;
}
else {
bVar1 = false;
lVar14 = 8;
puVar10 = _sort_order_win1250ch1;
}
bVar6 = puVar10[*pbVar15];
if (bVar6 == 0xff) {
lVar11 = 0;
do {
pbVar16 = (&doubles)[lVar11 * 2];
bVar6 = *pbVar16;
pbVar17 = pbVar15;
pbVar5 = pbVar15 + (1 - (long)param_4);
pbVar4 = pbVar15 + -(long)param_4;
if (bVar6 != 0) {
while (pbVar3 = pbVar5, (long)pbVar4 < (long)iVar12) {
pbVar16 = pbVar16 + 1;
if (bVar6 != *pbVar17) goto LAB_0018a504;
pbVar17 = pbVar17 + 1;
bVar6 = *pbVar16;
if (bVar6 == 0) break;
pbVar5 = pbVar3 + 1;
pbVar4 = pbVar3;
}
}
if (bVar6 == 0) {
bVar6 = *(byte *)((long)&doubles + lVar14 + lVar11 * 0x10);
pbVar15 = pbVar17 + -1;
goto LAB_0018a561;
}
LAB_0018a504:
lVar11 = lVar11 + 1;
} while (lVar11 != 0x50);
bVar6 = 0xff;
}
LAB_0018a561:
uVar13 = (uint)bVar6;
pbVar15 = pbVar15 + 1;
}
else {
uVar13 = 0;
if (0 < iVar12 && !bVar1) {
bVar1 = true;
pbVar15 = param_4;
goto LAB_0018a469;
}
}
if ((uVar8 == 0) || (uVar8 != uVar13)) {
return uVar8 - uVar13;
}
} while( true );
}
|
|
64,359 |
create_eth_account_proof
|
corpus-core[P]colibri-stateless/src/chains/eth/proofer/proof_account.c
|
static c4_status_t create_eth_account_proof(proofer_ctx_t* ctx, json_t eth_proof, beacon_block_t* block_data, json_t address, json_t block_number) {
json_t json_code = {0};
buffer_t tmp = {0};
ssz_builder_t eth_data = {0};
ssz_builder_t eth_account_proof = ssz_builder_for_type(ETH_SSZ_VERIFY_ACCOUNT_PROOF);
// make sure we have the full code
if (strcmp(ctx->method, "eth_getCode") == 0) TRY_ASYNC(eth_get_code(ctx, address, &json_code, 0));
// build the account proof
add_dynamic_byte_list(json_get(eth_proof, "accountProof"), ð_account_proof, "accountProof");
ssz_add_bytes(ð_account_proof, "address", json_as_bytes(address, &tmp));
ssz_add_builders(ð_account_proof, "storageProof", create_storage_proof(ctx, ssz_get_def(eth_account_proof.def, "storageProof"), json_get(eth_proof, "storageProof")));
ssz_add_builders(ð_account_proof, "state_proof", eth_ssz_create_state_proof(ctx, block_number, block_data));
// build the data only if we have code
if (strcmp(ctx->method, "eth_getCode") == 0) {
eth_data.def = eth_ssz_verification_type(ETH_SSZ_DATA_BYTES);
json_as_bytes(json_code, ð_data.fixed);
}
ctx->proof = eth_create_proof_request(
ctx->chain_id,
eth_data,
eth_account_proof,
NULL_SSZ_BUILDER);
// empty sync_data
buffer_free(&tmp);
return C4_SUCCESS;
}
|
O0
|
c
|
create_eth_account_proof:
pushq %rbp
movq %rsp, %rbp
subq $0x2b0, %rsp # imm = 0x2B0
leaq 0x40(%rbp), %rax
movq %rax, -0x1e0(%rbp)
leaq 0x28(%rbp), %rax
movq %rax, -0x1d8(%rbp)
leaq 0x10(%rbp), %rax
movq %rax, -0x1d0(%rbp)
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
leaq -0x30(%rbp), %rdi
xorl %esi, %esi
movl $0x18, %edx
callq 0x5110
leaq -0x48(%rbp), %rdi
xorl %esi, %esi
movl $0x18, %edx
callq 0x5110
leaq -0x80(%rbp), %rdi
xorl %esi, %esi
movl $0x38, %edx
callq 0x5110
leaq -0xb8(%rbp), %rdi
xorl %esi, %esi
movl $0x38, %edx
callq 0x5110
movl $0x6, %edi
callq 0x166f0
movq %rax, -0xb8(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rdi
leaq 0x4b3e8(%rip), %rsi # 0x5256e
callq 0x5250
cmpl $0x0, %eax
jne 0x71e4
jmp 0x7192
movq -0x1d8(%rbp), %rax
movq -0x10(%rbp), %rdi
leaq -0x30(%rbp), %rsi
xorl %ecx, %ecx
movl %ecx, %edx
movq (%rax), %rcx
movq %rcx, (%rsp)
movq 0x8(%rax), %rcx
movq %rcx, 0x8(%rsp)
movq 0x10(%rax), %rax
movq %rax, 0x10(%rsp)
callq 0xd930
movl %eax, -0xbc(%rbp)
cmpl $0x0, -0xbc(%rbp)
je 0x71e0
movl -0xbc(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0x7544
jmp 0x71e2
jmp 0x71e4
movq -0x1d0(%rbp), %rax
leaq -0xd8(%rbp), %rdi
leaq 0x4b478(%rip), %rsi # 0x52671
movq (%rax), %rcx
movq %rcx, (%rsp)
movq 0x8(%rax), %rcx
movq %rcx, 0x8(%rsp)
movq 0x10(%rax), %rax
movq %rax, 0x10(%rsp)
callq 0x20500
leaq -0xd8(%rbp), %rax
leaq -0xb8(%rbp), %rdi
leaq 0x4b445(%rip), %rsi # 0x52671
movq (%rax), %rcx
movq %rcx, (%rsp)
movq 0x8(%rax), %rcx
movq %rcx, 0x8(%rsp)
movq 0x10(%rax), %rax
movq %rax, 0x10(%rsp)
callq 0x7570
movq -0x1d8(%rbp), %rax
leaq -0x48(%rbp), %rdi
movq (%rax), %rcx
movq %rcx, (%rsp)
movq 0x8(%rax), %rcx
movq %rcx, 0x8(%rsp)
movq 0x10(%rax), %rax
movq %rax, 0x10(%rsp)
callq 0x20a60
movl %eax, -0xe8(%rbp)
movq %rdx, -0xe0(%rbp)
movl -0xe8(%rbp), %edx
movq -0xe0(%rbp), %rcx
leaq -0xb8(%rbp), %rdi
leaq 0x4b3e3(%rip), %rsi # 0x5267e
callq 0x1e730
movq -0x10(%rbp), %rax
movq %rax, -0x1f0(%rbp)
movq -0xb8(%rbp), %rdi
leaq 0x4b3cd(%rip), %rsi # 0x52686
callq 0x1c6e0
movq %rax, %rcx
movq -0x1d0(%rbp), %rax
movq %rcx, -0x1e8(%rbp)
leaq -0x138(%rbp), %rdi
leaq 0x4b3a9(%rip), %rsi # 0x52686
movq (%rax), %rcx
movq %rcx, (%rsp)
movq 0x8(%rax), %rcx
movq %rcx, 0x8(%rsp)
movq 0x10(%rax), %rax
movq %rax, 0x10(%rsp)
callq 0x20500
movq -0x1f0(%rbp), %rsi
movq -0x1e8(%rbp), %rdx
leaq -0x120(%rbp), %rdi
leaq -0x138(%rbp), %rax
movq (%rax), %rcx
movq %rcx, (%rsp)
movq 0x8(%rax), %rcx
movq %rcx, 0x8(%rsp)
movq 0x10(%rax), %rax
movq %rax, 0x10(%rsp)
callq 0x7700
movq -0xf0(%rbp), %rcx
movq %rsp, %rax
movq %rcx, 0x30(%rax)
movups -0x120(%rbp), %xmm0
movups -0x110(%rbp), %xmm1
movups -0x100(%rbp), %xmm2
movups %xmm2, 0x20(%rax)
movups %xmm1, 0x10(%rax)
movups %xmm0, (%rax)
leaq 0x4b31c(%rip), %rsi # 0x52686
leaq -0xb8(%rbp), %rdi
callq 0x1e460
movq -0x1e0(%rbp), %rax
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
leaq -0x170(%rbp), %rdi
movq (%rax), %rcx
movq %rcx, (%rsp)
movq 0x8(%rax), %rcx
movq %rcx, 0x8(%rsp)
movq 0x10(%rax), %rax
movq %rax, 0x10(%rsp)
callq 0xe5e0
movq -0x140(%rbp), %rcx
movq %rsp, %rax
movq %rcx, 0x30(%rax)
movups -0x170(%rbp), %xmm0
movups -0x160(%rbp), %xmm1
movups -0x150(%rbp), %xmm2
movups %xmm2, 0x20(%rax)
movups %xmm1, 0x10(%rax)
movups %xmm0, (%rax)
leaq 0x4b2b4(%rip), %rsi # 0x52693
leaq -0xb8(%rbp), %rdi
callq 0x1e460
movq -0x10(%rbp), %rax
movq (%rax), %rdi
leaq 0x4b175(%rip), %rsi # 0x5256e
callq 0x5250
cmpl $0x0, %eax
jne 0x7448
movl $0x12, %edi
callq 0x166f0
movq %rax, -0x80(%rbp)
leaq -0x80(%rbp), %rdi
addq $0x8, %rdi
leaq -0x30(%rbp), %rax
movq (%rax), %rcx
movq %rcx, (%rsp)
movq 0x8(%rax), %rcx
movq %rcx, 0x8(%rsp)
movq 0x10(%rax), %rax
movq %rax, 0x10(%rsp)
callq 0x20a60
movl %eax, -0x180(%rbp)
movq %rdx, -0x178(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x1f8(%rbp)
movq -0x10(%rbp), %rax
movl 0x30(%rax), %eax
movl %eax, -0x204(%rbp)
leaq -0x1c8(%rbp), %rdi
xorl %esi, %esi
movl $0x38, %edx
callq 0x5110
movl -0x204(%rbp), %edi
movq -0x198(%rbp), %rcx
movq %rsp, %rax
movq %rax, -0x200(%rbp)
movq %rcx, 0xa0(%rax)
movups -0x1c8(%rbp), %xmm0
movups -0x1b8(%rbp), %xmm1
movups -0x1a8(%rbp), %xmm2
movups %xmm2, 0x90(%rax)
movups %xmm1, 0x80(%rax)
movups %xmm0, 0x70(%rax)
movq -0x88(%rbp), %rcx
movq %rcx, 0x68(%rax)
movups -0xb8(%rbp), %xmm0
movups -0xa8(%rbp), %xmm1
movups -0x98(%rbp), %xmm2
movups %xmm2, 0x58(%rax)
movups %xmm1, 0x48(%rax)
movups %xmm0, 0x38(%rax)
movq -0x50(%rbp), %rcx
movq %rcx, 0x30(%rax)
movups -0x80(%rbp), %xmm0
movups -0x70(%rbp), %xmm1
movups -0x60(%rbp), %xmm2
movups %xmm2, 0x20(%rax)
movups %xmm1, 0x10(%rax)
movups %xmm0, (%rax)
callq 0xe3e0
movl %eax, %ecx
movq -0x1f8(%rbp), %rax
movl %ecx, -0x190(%rbp)
movq %rdx, -0x188(%rbp)
movq -0x190(%rbp), %rcx
movq %rcx, 0x20(%rax)
movq -0x188(%rbp), %rcx
movq %rcx, 0x28(%rax)
leaq -0x48(%rbp), %rdi
callq 0x18d90
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x2b0, %rsp # imm = 0x2B0
popq %rbp
retq
|
create_eth_account_proof:
push rbp
mov rbp, rsp
sub rsp, 2B0h
lea rax, [rbp+arg_30]
mov [rbp+var_1E0], rax
lea rax, [rbp+arg_18]
mov [rbp+var_1D8], rax
lea rax, [rbp+arg_0]
mov [rbp+var_1D0], rax
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
lea rdi, [rbp+var_30]
xor esi, esi
mov edx, 18h
call _memset
lea rdi, [rbp+var_48]
xor esi, esi
mov edx, 18h
call _memset
lea rdi, [rbp+var_80]
xor esi, esi
mov edx, 38h ; '8'
call _memset
lea rdi, [rbp+var_B8]
xor esi, esi
mov edx, 38h ; '8'
call _memset
mov edi, 6
call eth_ssz_verification_type
mov qword ptr [rbp+var_B8], rax
mov rax, [rbp+var_10]
mov rdi, [rax]
lea rsi, aEthGetcode; "eth_getCode"
call _strcmp
cmp eax, 0
jnz short loc_71E4
jmp short $+2
loc_7192:
mov rax, [rbp+var_1D8]
mov rdi, [rbp+var_10]
lea rsi, [rbp+var_30]
xor ecx, ecx
mov edx, ecx
mov rcx, [rax]
mov [rsp+2B0h+var_2B0], rcx
mov rcx, [rax+8]
mov [rsp+2B0h+var_2A8], rcx
mov rax, [rax+10h]
mov [rsp+2B0h+var_2A0], rax
call eth_get_code
mov [rbp+var_BC], eax
cmp [rbp+var_BC], 0
jz short loc_71E0
mov eax, [rbp+var_BC]
mov [rbp+var_4], eax
jmp loc_7544
loc_71E0:
jmp short $+2
loc_71E2:
jmp short $+2
loc_71E4:
mov rax, [rbp+var_1D0]
lea rdi, [rbp+var_D8]
lea rsi, aAccountproof; "accountProof"
mov rcx, [rax]
mov [rsp+2B0h+var_2B0], rcx
mov rcx, [rax+8]
mov [rsp+2B0h+var_2A8], rcx
mov rax, [rax+10h]
mov [rsp+2B0h+var_2A0], rax
call json_get
lea rax, [rbp+var_D8]
lea rdi, [rbp+var_B8]
lea rsi, aAccountproof; "accountProof"
mov rcx, [rax]
mov [rsp+2B0h+var_2B0], rcx
mov rcx, [rax+8]
mov [rsp+2B0h+var_2A8], rcx
mov rax, [rax+10h]
mov [rsp+2B0h+var_2A0], rax
call add_dynamic_byte_list
mov rax, [rbp+var_1D8]
lea rdi, [rbp+var_48]
mov rcx, [rax]
mov [rsp+2B0h+var_2B0], rcx
mov rcx, [rax+8]
mov [rsp+2B0h+var_2A8], rcx
mov rax, [rax+10h]
mov [rsp+2B0h+var_2A0], rax
call json_as_bytes
mov [rbp+var_E8], eax
mov [rbp+var_E0], rdx
mov edx, [rbp+var_E8]
mov rcx, [rbp+var_E0]
lea rdi, [rbp+var_B8]
lea rsi, aAddress; "address"
call ssz_add_bytes
mov rax, [rbp+var_10]
mov [rbp+var_1F0], rax
mov rdi, qword ptr [rbp+var_B8]
lea rsi, aStorageproof; "storageProof"
call ssz_get_def
mov rcx, rax
mov rax, [rbp+var_1D0]
mov [rbp+var_1E8], rcx
lea rdi, [rbp+var_138]
lea rsi, aStorageproof; "storageProof"
mov rcx, [rax]
mov [rsp+2B0h+var_2B0], rcx
mov rcx, [rax+8]
mov [rsp+2B0h+var_2A8], rcx
mov rax, [rax+10h]
mov [rsp+2B0h+var_2A0], rax
call json_get
mov rsi, [rbp+var_1F0]
mov rdx, [rbp+var_1E8]
lea rdi, [rbp+var_120]
lea rax, [rbp+var_138]
mov rcx, [rax]
mov [rsp+2B0h+var_2B0], rcx
mov rcx, [rax+8]
mov [rsp+2B0h+var_2A8], rcx
mov rax, [rax+10h]
mov [rsp+2B0h+var_2A0], rax
call create_storage_proof
mov rcx, [rbp+var_F0]
mov rax, rsp
mov [rax+30h], rcx
movups xmm0, [rbp+var_120]
movups xmm1, [rbp+var_110]
movups xmm2, [rbp+var_100]
movups xmmword ptr [rax+20h], xmm2
movups xmmword ptr [rax+10h], xmm1
movups xmmword ptr [rax], xmm0
lea rsi, aStorageproof; "storageProof"
lea rdi, [rbp+var_B8]
call ssz_add_builders
mov rax, [rbp+var_1E0]
mov rsi, [rbp+var_10]
mov rdx, [rbp+var_18]
lea rdi, [rbp+var_170]
mov rcx, [rax]
mov [rsp+2B0h+var_2B0], rcx
mov rcx, [rax+8]
mov [rsp+2B0h+var_2A8], rcx
mov rax, [rax+10h]
mov [rsp+2B0h+var_2A0], rax
call eth_ssz_create_state_proof
mov rcx, [rbp+var_140]
mov rax, rsp
mov [rax+30h], rcx
movups xmm0, [rbp+var_170]
movups xmm1, [rbp+var_160]
movups xmm2, [rbp+var_150]
movups xmmword ptr [rax+20h], xmm2
movups xmmword ptr [rax+10h], xmm1
movups xmmword ptr [rax], xmm0
lea rsi, aStateProof; "state_proof"
lea rdi, [rbp+var_B8]
call ssz_add_builders
mov rax, [rbp+var_10]
mov rdi, [rax]
lea rsi, aEthGetcode; "eth_getCode"
call _strcmp
cmp eax, 0
jnz short loc_7448
mov edi, 12h
call eth_ssz_verification_type
mov qword ptr [rbp+var_80], rax
lea rdi, [rbp+var_80]
add rdi, 8
lea rax, [rbp+var_30]
mov rcx, [rax]
mov [rsp+2B0h+var_2B0], rcx
mov rcx, [rax+8]
mov [rsp+2B0h+var_2A8], rcx
mov rax, [rax+10h]
mov [rsp+2B0h+var_2A0], rax
call json_as_bytes
mov [rbp+var_180], eax
mov [rbp+var_178], rdx
loc_7448:
mov rax, [rbp+var_10]
mov [rbp+var_1F8], rax
mov rax, [rbp+var_10]
mov eax, [rax+30h]
mov [rbp+var_204], eax
lea rdi, [rbp+var_1C8]
xor esi, esi
mov edx, 38h ; '8'
call _memset
mov edi, [rbp+var_204]
mov rcx, [rbp+var_198]
mov rax, rsp
mov [rbp+var_200], rax
mov [rax+0A0h], rcx
movups xmm0, [rbp+var_1C8]
movups xmm1, [rbp+var_1B8]
movups xmm2, [rbp+var_1A8]
movups xmmword ptr [rax+90h], xmm2
movups xmmword ptr [rax+80h], xmm1
movups xmmword ptr [rax+70h], xmm0
mov rcx, [rbp+var_88]
mov [rax+68h], rcx
movups xmm0, [rbp+var_B8]
movups xmm1, [rbp+var_A8]
movups xmm2, [rbp+var_98]
movups xmmword ptr [rax+58h], xmm2
movups xmmword ptr [rax+48h], xmm1
movups xmmword ptr [rax+38h], xmm0
mov rcx, [rbp+var_50]
mov [rax+30h], rcx
movups xmm0, [rbp+var_80]
movups xmm1, [rbp+var_70]
movups xmm2, [rbp+var_60]
movups xmmword ptr [rax+20h], xmm2
movups xmmword ptr [rax+10h], xmm1
movups xmmword ptr [rax], xmm0
call eth_create_proof_request
mov ecx, eax
mov rax, [rbp+var_1F8]
mov dword ptr [rbp+var_190], ecx
mov [rbp+var_188], rdx
mov rcx, [rbp+var_190]
mov [rax+20h], rcx
mov rcx, [rbp+var_188]
mov [rax+28h], rcx
lea rdi, [rbp+var_48]
call buffer_free
mov [rbp+var_4], 0
loc_7544:
mov eax, [rbp+var_4]
add rsp, 2B0h
pop rbp
retn
|
long long create_eth_account_proof(
_QWORD *a1,
long long a2,
_DWORD a3,
_DWORD a4,
_DWORD a5,
_DWORD a6,
char a7,
int a8,
int a9,
char a10,
int a11,
int a12,
char a13)
{
int v13; // edx
int v14; // r8d
int v15; // r9d
int v16; // edx
int v17; // r8d
int v18; // r9d
int v19; // edx
int v20; // r8d
int v21; // r9d
long long v22; // rdx
int v23; // edx
int v24; // r8d
int v25; // r9d
int v26; // r8d
int v27; // r9d
int v28; // edx
int v29; // r8d
int v30; // r9d
int v31; // r8d
int v32; // r9d
int v33; // edx
int v34; // r8d
int v35; // r9d
int v36; // edx
int v37; // r8d
int v38; // r9d
long long v39; // rdx
int v40; // edx
int v41; // r8d
int v42; // r9d
int proof_request; // ecx
_QWORD *v44; // rax
long long v45; // rdx
long long v47; // [rsp+0h] [rbp-2B0h] BYREF
int v48; // [rsp+ACh] [rbp-204h]
long long *v49; // [rsp+B0h] [rbp-200h]
_QWORD *v50; // [rsp+B8h] [rbp-1F8h]
_QWORD *v51; // [rsp+C0h] [rbp-1F0h]
long long def; // [rsp+C8h] [rbp-1E8h]
char *v53; // [rsp+D0h] [rbp-1E0h]
char *v54; // [rsp+D8h] [rbp-1D8h]
char *v55; // [rsp+E0h] [rbp-1D0h]
_OWORD v56[3]; // [rsp+E8h] [rbp-1C8h] BYREF
long long v57; // [rsp+118h] [rbp-198h]
long long v58; // [rsp+120h] [rbp-190h]
long long v59; // [rsp+128h] [rbp-188h]
int v60; // [rsp+130h] [rbp-180h]
long long v61; // [rsp+138h] [rbp-178h]
_OWORD v62[3]; // [rsp+140h] [rbp-170h] BYREF
long long v63; // [rsp+170h] [rbp-140h]
long long v64; // [rsp+178h] [rbp-138h] BYREF
long long v65; // [rsp+180h] [rbp-130h]
long long v66; // [rsp+188h] [rbp-128h]
_OWORD v67[3]; // [rsp+190h] [rbp-120h] BYREF
long long v68; // [rsp+1C0h] [rbp-F0h]
unsigned int v69; // [rsp+1C8h] [rbp-E8h]
long long v70; // [rsp+1D0h] [rbp-E0h]
long long v71; // [rsp+1D8h] [rbp-D8h] BYREF
long long v72; // [rsp+1E0h] [rbp-D0h]
long long v73; // [rsp+1E8h] [rbp-C8h]
unsigned int code; // [rsp+1F4h] [rbp-BCh]
long long v75; // [rsp+1F8h] [rbp-B8h] BYREF
int v76; // [rsp+200h] [rbp-B0h]
int v77; // [rsp+208h] [rbp-A8h]
int v78; // [rsp+210h] [rbp-A0h]
int v79; // [rsp+218h] [rbp-98h]
int v80; // [rsp+220h] [rbp-90h]
long long v81; // [rsp+228h] [rbp-88h]
long long v82; // [rsp+230h] [rbp-80h] BYREF
_DWORD v83[10]; // [rsp+238h] [rbp-78h] BYREF
long long v84; // [rsp+260h] [rbp-50h]
_BYTE v85[24]; // [rsp+268h] [rbp-48h] BYREF
long long v86; // [rsp+280h] [rbp-30h] BYREF
long long v87; // [rsp+288h] [rbp-28h]
long long v88; // [rsp+290h] [rbp-20h]
long long v89; // [rsp+298h] [rbp-18h]
_QWORD *v90; // [rsp+2A0h] [rbp-10h]
v53 = &a13;
v54 = &a10;
v55 = &a7;
v90 = a1;
v89 = a2;
memset(&v86, 0LL, 24LL);
memset(v85, 0LL, sizeof(v85));
memset(&v82, 0LL, 56LL);
memset(&v75, 0LL, 56LL);
v75 = eth_ssz_verification_type(6LL);
if ( !(unsigned int)strcmp(*v90, "eth_getCode")
&& (code = eth_get_code(
(_DWORD)v90,
(unsigned int)&v86,
0,
*((_QWORD *)v54 + 1),
v14,
v15,
*(_QWORD *)v54,
*((_QWORD *)v54 + 1),
*((_QWORD *)v54 + 2))) != 0 )
{
return code;
}
else
{
json_get(
(unsigned int)&v71,
(unsigned int)"accountProof",
v13,
*((_QWORD *)v55 + 1),
v14,
v15,
*(_QWORD *)v55,
*((_QWORD *)v55 + 1),
*((_QWORD *)v55 + 2));
add_dynamic_byte_list((unsigned int)&v75, (unsigned int)"accountProof", v16, v72, v17, v18, v71, v72, v73);
v69 = json_as_bytes(
(unsigned int)v85,
(unsigned int)"accountProof",
v19,
*((_QWORD *)v54 + 1),
v20,
v21,
*(_QWORD *)v54,
*((_QWORD *)v54 + 1),
*((_QWORD *)v54 + 2));
v70 = v22;
ssz_add_bytes(&v75, "address", v69, v22);
v51 = v90;
def = ssz_get_def(v75, "storageProof");
json_get(
(unsigned int)&v64,
(unsigned int)"storageProof",
v23,
*((_QWORD *)v55 + 1),
v24,
v25,
*(_QWORD *)v55,
*((_QWORD *)v55 + 1),
*((_QWORD *)v55 + 2));
create_storage_proof((unsigned int)v67, (_DWORD)v51, def, v65, v26, v27, v64, v65, v66);
ssz_add_builders((unsigned int)&v75, (unsigned int)"storageProof", v28, v68, v29, v30, v67[0], v67[1], v67[2], v68);
eth_ssz_create_state_proof(
(unsigned int)v62,
(_DWORD)v90,
v89,
*((_QWORD *)v53 + 1),
v31,
v32,
*(_QWORD *)v53,
*((_QWORD *)v53 + 1),
*((_QWORD *)v53 + 2));
ssz_add_builders((unsigned int)&v75, (unsigned int)"state_proof", v33, v63, v34, v35, v62[0], v62[1], v62[2], v63);
if ( !(unsigned int)strcmp(*v90, "eth_getCode") )
{
v82 = eth_ssz_verification_type(18LL);
v60 = json_as_bytes((unsigned int)v83, (unsigned int)"eth_getCode", v36, v87, v37, v38, v86, v87, v88);
v61 = v39;
}
v50 = v90;
v48 = *((_DWORD *)v90 + 12);
memset(v56, 0LL, 56LL);
v49 = &v47;
proof_request = eth_create_proof_request(
v48,
0,
v40,
v84,
v41,
v42,
v82,
v83[0],
v83[2],
v83[4],
v83[6],
v83[8],
v84,
v75,
v76,
v77,
v78,
v79,
v80,
v81,
v56[0],
v56[1],
v56[2],
v57);
v44 = v50;
LODWORD(v58) = proof_request;
v59 = v45;
v50[4] = v58;
v44[5] = v59;
buffer_free(v85);
return 0;
}
}
|
create_eth_account_proof:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x2b0
LEA RAX,[RBP + 0x40]
MOV qword ptr [RBP + -0x1e0],RAX
LEA RAX,[RBP + 0x28]
MOV qword ptr [RBP + -0x1d8],RAX
LEA RAX,[RBP + 0x10]
MOV qword ptr [RBP + -0x1d0],RAX
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x18],RSI
LEA RDI,[RBP + -0x30]
XOR ESI,ESI
MOV EDX,0x18
CALL 0x00105110
LEA RDI,[RBP + -0x48]
XOR ESI,ESI
MOV EDX,0x18
CALL 0x00105110
LEA RDI,[RBP + -0x80]
XOR ESI,ESI
MOV EDX,0x38
CALL 0x00105110
LEA RDI,[RBP + -0xb8]
XOR ESI,ESI
MOV EDX,0x38
CALL 0x00105110
MOV EDI,0x6
CALL 0x001166f0
MOV qword ptr [RBP + -0xb8],RAX
MOV RAX,qword ptr [RBP + -0x10]
MOV RDI,qword ptr [RAX]
LEA RSI,[0x15256e]
CALL 0x00105250
CMP EAX,0x0
JNZ 0x001071e4
JMP 0x00107192
LAB_00107192:
MOV RAX,qword ptr [RBP + -0x1d8]
MOV RDI,qword ptr [RBP + -0x10]
LEA RSI,[RBP + -0x30]
XOR ECX,ECX
MOV EDX,ECX
MOV RCX,qword ptr [RAX]
MOV qword ptr [RSP],RCX
MOV RCX,qword ptr [RAX + 0x8]
MOV qword ptr [RSP + 0x8],RCX
MOV RAX,qword ptr [RAX + 0x10]
MOV qword ptr [RSP + 0x10],RAX
CALL 0x0010d930
MOV dword ptr [RBP + -0xbc],EAX
CMP dword ptr [RBP + -0xbc],0x0
JZ 0x001071e0
MOV EAX,dword ptr [RBP + -0xbc]
MOV dword ptr [RBP + -0x4],EAX
JMP 0x00107544
LAB_001071e0:
JMP 0x001071e2
LAB_001071e2:
JMP 0x001071e4
LAB_001071e4:
MOV RAX,qword ptr [RBP + -0x1d0]
LEA RDI,[RBP + -0xd8]
LEA RSI,[0x152671]
MOV RCX,qword ptr [RAX]
MOV qword ptr [RSP],RCX
MOV RCX,qword ptr [RAX + 0x8]
MOV qword ptr [RSP + 0x8],RCX
MOV RAX,qword ptr [RAX + 0x10]
MOV qword ptr [RSP + 0x10],RAX
CALL 0x00120500
LEA RAX,[RBP + -0xd8]
LEA RDI,[RBP + -0xb8]
LEA RSI,[0x152671]
MOV RCX,qword ptr [RAX]
MOV qword ptr [RSP],RCX
MOV RCX,qword ptr [RAX + 0x8]
MOV qword ptr [RSP + 0x8],RCX
MOV RAX,qword ptr [RAX + 0x10]
MOV qword ptr [RSP + 0x10],RAX
CALL 0x00107570
MOV RAX,qword ptr [RBP + -0x1d8]
LEA RDI,[RBP + -0x48]
MOV RCX,qword ptr [RAX]
MOV qword ptr [RSP],RCX
MOV RCX,qword ptr [RAX + 0x8]
MOV qword ptr [RSP + 0x8],RCX
MOV RAX,qword ptr [RAX + 0x10]
MOV qword ptr [RSP + 0x10],RAX
CALL 0x00120a60
MOV dword ptr [RBP + -0xe8],EAX
MOV qword ptr [RBP + -0xe0],RDX
MOV EDX,dword ptr [RBP + -0xe8]
MOV RCX,qword ptr [RBP + -0xe0]
LEA RDI,[RBP + -0xb8]
LEA RSI,[0x15267e]
CALL 0x0011e730
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RBP + -0x1f0],RAX
MOV RDI,qword ptr [RBP + -0xb8]
LEA RSI,[0x152686]
CALL 0x0011c6e0
MOV RCX,RAX
MOV RAX,qword ptr [RBP + -0x1d0]
MOV qword ptr [RBP + -0x1e8],RCX
LEA RDI,[RBP + -0x138]
LEA RSI,[0x152686]
MOV RCX,qword ptr [RAX]
MOV qword ptr [RSP],RCX
MOV RCX,qword ptr [RAX + 0x8]
MOV qword ptr [RSP + 0x8],RCX
MOV RAX,qword ptr [RAX + 0x10]
MOV qword ptr [RSP + 0x10],RAX
CALL 0x00120500
MOV RSI,qword ptr [RBP + -0x1f0]
MOV RDX,qword ptr [RBP + -0x1e8]
LEA RDI,[RBP + -0x120]
LEA RAX,[RBP + -0x138]
MOV RCX,qword ptr [RAX]
MOV qword ptr [RSP],RCX
MOV RCX,qword ptr [RAX + 0x8]
MOV qword ptr [RSP + 0x8],RCX
MOV RAX,qword ptr [RAX + 0x10]
MOV qword ptr [RSP + 0x10],RAX
CALL 0x00107700
MOV RCX,qword ptr [RBP + -0xf0]
MOV RAX,RSP
MOV qword ptr [RAX + 0x30],RCX
MOVUPS XMM0,xmmword ptr [RBP + -0x120]
MOVUPS XMM1,xmmword ptr [RBP + -0x110]
MOVUPS XMM2,xmmword ptr [RBP + -0x100]
MOVUPS xmmword ptr [RAX + 0x20],XMM2
MOVUPS xmmword ptr [RAX + 0x10],XMM1
MOVUPS xmmword ptr [RAX],XMM0
LEA RSI,[0x152686]
LEA RDI,[RBP + -0xb8]
CALL 0x0011e460
MOV RAX,qword ptr [RBP + -0x1e0]
MOV RSI,qword ptr [RBP + -0x10]
MOV RDX,qword ptr [RBP + -0x18]
LEA RDI,[RBP + -0x170]
MOV RCX,qword ptr [RAX]
MOV qword ptr [RSP],RCX
MOV RCX,qword ptr [RAX + 0x8]
MOV qword ptr [RSP + 0x8],RCX
MOV RAX,qword ptr [RAX + 0x10]
MOV qword ptr [RSP + 0x10],RAX
CALL 0x0010e5e0
MOV RCX,qword ptr [RBP + -0x140]
MOV RAX,RSP
MOV qword ptr [RAX + 0x30],RCX
MOVUPS XMM0,xmmword ptr [RBP + -0x170]
MOVUPS XMM1,xmmword ptr [RBP + -0x160]
MOVUPS XMM2,xmmword ptr [RBP + -0x150]
MOVUPS xmmword ptr [RAX + 0x20],XMM2
MOVUPS xmmword ptr [RAX + 0x10],XMM1
MOVUPS xmmword ptr [RAX],XMM0
LEA RSI,[0x152693]
LEA RDI,[RBP + -0xb8]
CALL 0x0011e460
MOV RAX,qword ptr [RBP + -0x10]
MOV RDI,qword ptr [RAX]
LEA RSI,[0x15256e]
CALL 0x00105250
CMP EAX,0x0
JNZ 0x00107448
MOV EDI,0x12
CALL 0x001166f0
MOV qword ptr [RBP + -0x80],RAX
LEA RDI,[RBP + -0x80]
ADD RDI,0x8
LEA RAX,[RBP + -0x30]
MOV RCX,qword ptr [RAX]
MOV qword ptr [RSP],RCX
MOV RCX,qword ptr [RAX + 0x8]
MOV qword ptr [RSP + 0x8],RCX
MOV RAX,qword ptr [RAX + 0x10]
MOV qword ptr [RSP + 0x10],RAX
CALL 0x00120a60
MOV dword ptr [RBP + -0x180],EAX
MOV qword ptr [RBP + -0x178],RDX
LAB_00107448:
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RBP + -0x1f8],RAX
MOV RAX,qword ptr [RBP + -0x10]
MOV EAX,dword ptr [RAX + 0x30]
MOV dword ptr [RBP + -0x204],EAX
LEA RDI,[RBP + -0x1c8]
XOR ESI,ESI
MOV EDX,0x38
CALL 0x00105110
MOV EDI,dword ptr [RBP + -0x204]
MOV RCX,qword ptr [RBP + -0x198]
MOV RAX,RSP
MOV qword ptr [RBP + -0x200],RAX
MOV qword ptr [RAX + 0xa0],RCX
MOVUPS XMM0,xmmword ptr [RBP + -0x1c8]
MOVUPS XMM1,xmmword ptr [RBP + -0x1b8]
MOVUPS XMM2,xmmword ptr [RBP + -0x1a8]
MOVUPS xmmword ptr [RAX + 0x90],XMM2
MOVUPS xmmword ptr [RAX + 0x80],XMM1
MOVUPS xmmword ptr [RAX + 0x70],XMM0
MOV RCX,qword ptr [RBP + -0x88]
MOV qword ptr [RAX + 0x68],RCX
MOVUPS XMM0,xmmword ptr [RBP + -0xb8]
MOVUPS XMM1,xmmword ptr [RBP + -0xa8]
MOVUPS XMM2,xmmword ptr [RBP + -0x98]
MOVUPS xmmword ptr [RAX + 0x58],XMM2
MOVUPS xmmword ptr [RAX + 0x48],XMM1
MOVUPS xmmword ptr [RAX + 0x38],XMM0
MOV RCX,qword ptr [RBP + -0x50]
MOV qword ptr [RAX + 0x30],RCX
MOVUPS XMM0,xmmword ptr [RBP + -0x80]
MOVUPS XMM1,xmmword ptr [RBP + -0x70]
MOVUPS XMM2,xmmword ptr [RBP + -0x60]
MOVUPS xmmword ptr [RAX + 0x20],XMM2
MOVUPS xmmword ptr [RAX + 0x10],XMM1
MOVUPS xmmword ptr [RAX],XMM0
CALL 0x0010e3e0
MOV ECX,EAX
MOV RAX,qword ptr [RBP + -0x1f8]
MOV dword ptr [RBP + -0x190],ECX
MOV qword ptr [RBP + -0x188],RDX
MOV RCX,qword ptr [RBP + -0x190]
MOV qword ptr [RAX + 0x20],RCX
MOV RCX,qword ptr [RBP + -0x188]
MOV qword ptr [RAX + 0x28],RCX
LEA RDI,[RBP + -0x48]
CALL 0x00118d90
MOV dword ptr [RBP + -0x4],0x0
LAB_00107544:
MOV EAX,dword ptr [RBP + -0x4]
ADD RSP,0x2b0
POP RBP
RET
|
int create_eth_account_proof(int8 *param_1,int8 param_2)
{
int iVar1;
int8 extraout_RDX;
int8 extraout_RDX_00;
int8 extraout_RDX_01;
int8 local_2b8;
int8 uStack_2b0;
int8 local_2a8;
int4 uStack_2a0;
int4 uStack_29c;
int4 local_298;
int4 uStack_294;
int4 uStack_290;
int4 uStack_28c;
int8 local_288;
int8 local_280;
int8 uStack_278;
int8 local_270;
int8 uStack_268;
int8 local_260;
int8 uStack_258;
int8 local_250;
int8 local_248;
int8 uStack_240;
int8 local_238;
int8 uStack_230;
int8 local_228;
int8 uStack_220;
int8 local_218;
int4 local_20c;
int1 *local_208;
int8 *local_200;
int8 *local_1f8;
int8 local_1f0;
int8 *local_1e8;
int8 *local_1e0;
int8 *local_1d8;
int8 local_1d0;
int8 uStack_1c8;
int8 local_1c0;
int8 uStack_1b8;
int8 local_1b0;
int8 uStack_1a8;
int8 local_1a0;
int4 local_198;
int4 uStack_194;
int8 local_190;
int4 local_188;
int8 local_180;
int4 local_178;
int4 uStack_174;
int4 uStack_170;
int4 uStack_16c;
int4 local_168;
int4 uStack_164;
int4 uStack_160;
int4 uStack_15c;
int4 local_158;
int4 uStack_154;
int4 uStack_150;
int4 uStack_14c;
int8 local_148;
int8 local_140;
int8 local_138;
int8 local_130;
int1 local_128 [24];
int4 uStack_110;
int4 uStack_10c;
int4 local_108;
int4 uStack_104;
int4 uStack_100;
int4 uStack_fc;
int8 local_f8;
int4 local_f0;
int8 local_e8;
int8 local_e0;
int8 local_d8;
int8 local_d0;
int4 local_c4;
int8 local_c0;
int8 uStack_b8;
int8 local_b0;
int8 uStack_a8;
int8 local_a0;
int8 uStack_98;
int8 local_90;
int8 local_88;
int1 auStack_80 [16];
int4 uStack_70;
int4 uStack_6c;
int4 local_68;
int4 uStack_64;
int4 uStack_60;
int4 uStack_5c;
int8 local_58;
int1 local_50 [24];
int8 local_38;
int8 local_30;
int8 local_28;
int8 local_20;
int8 *local_18;
local_1e8 = (int8 *)&stack0x00000038;
local_1e0 = (int8 *)&stack0x00000020;
local_1d8 = (int8 *)&stack0x00000008;
local_20 = param_2;
local_18 = param_1;
memset(&local_38,0,0x18);
memset(local_50,0,0x18);
memset(&local_88,0,0x38);
memset(&local_c0,0,0x38);
local_c0 = eth_ssz_verification_type(6);
iVar1 = strcmp((char *)*local_18,"eth_getCode");
if (iVar1 == 0) {
local_2b8 = *local_1e0;
uStack_2b0 = local_1e0[1];
local_2a8 = local_1e0[2];
iVar1 = eth_get_code(local_18,&local_38,0);
if (iVar1 != 0) {
return iVar1;
}
local_c4 = 0;
}
local_2b8 = *local_1d8;
uStack_2b0 = local_1d8[1];
local_2a8 = local_1d8[2];
json_get(&local_e0,"accountProof");
local_2b8 = local_e0;
uStack_2b0 = local_d8;
local_2a8 = local_d0;
add_dynamic_byte_list(&local_c0,"accountProof");
local_2b8 = *local_1e0;
uStack_2b0 = local_1e0[1];
local_2a8 = local_1e0[2];
local_f0 = json_as_bytes(local_50);
local_e8 = extraout_RDX;
ssz_add_bytes(&local_c0,"address",local_f0,extraout_RDX);
local_1f8 = local_18;
local_1f0 = ssz_get_def(local_c0,"storageProof");
local_2b8 = *local_1d8;
uStack_2b0 = local_1d8[1];
local_2a8 = local_1d8[2];
json_get(&local_140,"storageProof");
local_2b8 = local_140;
uStack_2b0 = local_138;
local_2a8 = local_130;
create_storage_proof(local_128,local_1f8,local_1f0);
local_288 = local_f8;
local_298 = local_108;
uStack_294 = uStack_104;
uStack_290 = uStack_100;
uStack_28c = uStack_fc;
uStack_2a0 = uStack_110;
uStack_29c = uStack_10c;
ssz_add_builders(&local_c0,"storageProof");
local_2b8 = *local_1e8;
uStack_2b0 = local_1e8[1];
local_2a8 = local_1e8[2];
eth_ssz_create_state_proof(&local_178,local_18,local_20);
local_288 = local_148;
local_298 = local_158;
uStack_294 = uStack_154;
uStack_290 = uStack_150;
uStack_28c = uStack_14c;
local_2a8 = CONCAT44(uStack_164,local_168);
uStack_2a0 = uStack_160;
uStack_29c = uStack_15c;
local_2b8 = CONCAT44(uStack_174,local_178);
uStack_2b0 = CONCAT44(uStack_16c,uStack_170);
ssz_add_builders(&local_c0,"state_proof");
iVar1 = strcmp((char *)*local_18,"eth_getCode");
if (iVar1 == 0) {
local_88 = eth_ssz_verification_type(0x12);
local_2b8 = local_38;
uStack_2b0 = local_30;
local_2a8 = local_28;
local_188 = json_as_bytes(auStack_80);
local_180 = extraout_RDX_00;
}
local_200 = local_18;
local_20c = *(int4 *)(local_18 + 6);
memset(&local_1d0,0,0x38);
local_218 = local_1a0;
local_228 = local_1b0;
uStack_220 = uStack_1a8;
local_238 = local_1c0;
uStack_230 = uStack_1b8;
local_248 = local_1d0;
uStack_240 = uStack_1c8;
local_250 = local_90;
local_260 = local_a0;
uStack_258 = uStack_98;
local_270 = local_b0;
uStack_268 = uStack_a8;
local_280 = local_c0;
uStack_278 = uStack_b8;
local_288 = local_58;
local_298 = local_68;
uStack_294 = uStack_64;
uStack_290 = uStack_60;
uStack_28c = uStack_5c;
uStack_2a0 = uStack_70;
uStack_29c = uStack_6c;
local_2b8 = local_88;
local_208 = (int1 *)&local_2b8;
local_198 = eth_create_proof_request(local_20c);
local_200[4] = CONCAT44(uStack_194,local_198);
local_200[5] = extraout_RDX_01;
local_190 = extraout_RDX_01;
buffer_free(local_50);
return 0;
}
|
|
64,360 |
uf_blob
|
eloqsql/storage/myisam/mi_packrec.c
|
static void uf_blob(MI_COLUMNDEF *rec, MI_BIT_BUFF *bit_buff,
uchar *to, uchar *end)
{
if (get_bit(bit_buff))
bzero((uchar*) to,(end-to));
else
{
ulong length=get_bits(bit_buff,rec->space_length_bits);
uint pack_length=(uint) (end-to)-portable_sizeof_char_ptr;
if (bit_buff->blob_pos+length > bit_buff->blob_end)
{
bit_buff->error=1;
bzero((uchar*) to,(end-to));
return;
}
decode_bytes(rec,bit_buff,bit_buff->blob_pos,bit_buff->blob_pos+length);
_mi_store_blob_length((uchar*) to,pack_length,length);
memcpy(to+pack_length, &bit_buff->blob_pos, sizeof(char*));
bit_buff->blob_pos+=length;
}
}
|
O0
|
c
|
uf_blob:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq -0x10(%rbp), %rax
cmpl $0x0, 0x4(%rax)
je 0xbd4d7
movq -0x10(%rbp), %rax
movl (%rax), %eax
movq -0x10(%rbp), %rdx
movl 0x4(%rdx), %ecx
addl $-0x1, %ecx
movl %ecx, 0x4(%rdx)
movl $0x1, %edx
shll %cl, %edx
movl %edx, %ecx
andl %ecx, %eax
cmpl $0x0, %eax
jne 0xbd4fb
jmp 0xbd516
movq -0x10(%rbp), %rdi
callq 0xbbd50
movq -0x10(%rbp), %rax
movl $0x1f, 0x4(%rax)
movq -0x10(%rbp), %rax
movl (%rax), %eax
andl $0x80000000, %eax # imm = 0x80000000
cmpl $0x0, %eax
je 0xbd516
movq -0x18(%rbp), %rdi
movq -0x20(%rbp), %rdx
movq -0x18(%rbp), %rax
subq %rax, %rdx
xorl %esi, %esi
callq 0x2a2c0
jmp 0xbd615
movq -0x10(%rbp), %rax
movl 0x4(%rax), %eax
movq -0x8(%rbp), %rcx
cmpl 0x1c(%rcx), %eax
jb 0xbd559
movq -0x10(%rbp), %rax
movl (%rax), %eax
movq -0x8(%rbp), %rcx
movl 0x1c(%rcx), %esi
movq -0x10(%rbp), %rdx
movl 0x4(%rdx), %ecx
subl %esi, %ecx
movl %ecx, 0x4(%rdx)
shrl %cl, %eax
movq -0x8(%rbp), %rcx
movl 0x1c(%rcx), %ecx
movl %ecx, %edx
leaq 0x2010ef(%rip), %rcx # 0x2be640
andl (%rcx,%rdx,4), %eax
movl %eax, -0x30(%rbp)
jmp 0xbd56c
movq -0x10(%rbp), %rdi
movq -0x8(%rbp), %rax
movl 0x1c(%rax), %esi
callq 0xba500
movl %eax, -0x30(%rbp)
movl -0x30(%rbp), %eax
movl %eax, %eax
movq %rax, -0x28(%rbp)
movq -0x20(%rbp), %rax
movq -0x18(%rbp), %rcx
subq %rcx, %rax
subl $0x8, %eax
movl %eax, -0x2c(%rbp)
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rax
addq -0x28(%rbp), %rax
movq -0x10(%rbp), %rcx
cmpq 0x20(%rcx), %rax
jbe 0xbd5bf
movq -0x10(%rbp), %rax
movl $0x1, 0x28(%rax)
movq -0x18(%rbp), %rdi
movq -0x20(%rbp), %rdx
movq -0x18(%rbp), %rax
subq %rax, %rdx
xorl %esi, %esi
callq 0x2a2c0
jmp 0xbd615
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rdx
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rcx
addq -0x28(%rbp), %rcx
callq 0xbc460
movq -0x18(%rbp), %rdi
movl -0x2c(%rbp), %esi
movq -0x28(%rbp), %rax
movl %eax, %edx
callq 0xab120
movq -0x18(%rbp), %rax
movl -0x2c(%rbp), %ecx
movq -0x10(%rbp), %rdx
movq 0x18(%rdx), %rdx
movq %rdx, (%rax,%rcx)
movq -0x28(%rbp), %rcx
movq -0x10(%rbp), %rax
addq 0x18(%rax), %rcx
movq %rcx, 0x18(%rax)
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax,%rax)
|
uf_blob_0:
push rbp
mov rbp, rsp
sub rsp, 30h
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov [rbp+var_18], rdx
mov [rbp+var_20], rcx
mov rax, [rbp+var_10]
cmp dword ptr [rax+4], 0
jz short loc_BD4D7
mov rax, [rbp+var_10]
mov eax, [rax]
mov rdx, [rbp+var_10]
mov ecx, [rdx+4]
add ecx, 0FFFFFFFFh
mov [rdx+4], ecx
mov edx, 1
shl edx, cl
mov ecx, edx
and eax, ecx
cmp eax, 0
jnz short loc_BD4FB
jmp short loc_BD516
loc_BD4D7:
mov rdi, [rbp+var_10]
call fill_buffer_0
mov rax, [rbp+var_10]
mov dword ptr [rax+4], 1Fh
mov rax, [rbp+var_10]
mov eax, [rax]
and eax, 80000000h
cmp eax, 0
jz short loc_BD516
loc_BD4FB:
mov rdi, [rbp+var_18]
mov rdx, [rbp+var_20]
mov rax, [rbp+var_18]
sub rdx, rax
xor esi, esi
call _memset
jmp loc_BD615
loc_BD516:
mov rax, [rbp+var_10]
mov eax, [rax+4]
mov rcx, [rbp+var_8]
cmp eax, [rcx+1Ch]
jb short loc_BD559
mov rax, [rbp+var_10]
mov eax, [rax]
mov rcx, [rbp+var_8]
mov esi, [rcx+1Ch]
mov rdx, [rbp+var_10]
mov ecx, [rdx+4]
sub ecx, esi
mov [rdx+4], ecx
shr eax, cl
mov rcx, [rbp+var_8]
mov ecx, [rcx+1Ch]
mov edx, ecx
lea rcx, mask_0
and eax, [rcx+rdx*4]
mov [rbp+var_30], eax
jmp short loc_BD56C
loc_BD559:
mov rdi, [rbp+var_10]
mov rax, [rbp+var_8]
mov esi, [rax+1Ch]
call fill_and_get_bits_0
mov [rbp+var_30], eax
loc_BD56C:
mov eax, [rbp+var_30]
mov eax, eax
mov [rbp+var_28], rax
mov rax, [rbp+var_20]
mov rcx, [rbp+var_18]
sub rax, rcx
sub eax, 8
mov [rbp+var_2C], eax
mov rax, [rbp+var_10]
mov rax, [rax+18h]
add rax, [rbp+var_28]
mov rcx, [rbp+var_10]
cmp rax, [rcx+20h]
jbe short loc_BD5BF
mov rax, [rbp+var_10]
mov dword ptr [rax+28h], 1
mov rdi, [rbp+var_18]
mov rdx, [rbp+var_20]
mov rax, [rbp+var_18]
sub rdx, rax
xor esi, esi
call _memset
jmp short loc_BD615
loc_BD5BF:
mov rdi, [rbp+var_8]
mov rsi, [rbp+var_10]
mov rax, [rbp+var_10]
mov rdx, [rax+18h]
mov rax, [rbp+var_10]
mov rcx, [rax+18h]
add rcx, [rbp+var_28]
call decode_bytes_0
mov rdi, [rbp+var_18]
mov esi, [rbp+var_2C]
mov rax, [rbp+var_28]
mov edx, eax
call _mi_store_blob_length
mov rax, [rbp+var_18]
mov ecx, [rbp+var_2C]
mov rdx, [rbp+var_10]
mov rdx, [rdx+18h]
mov [rax+rcx], rdx
mov rcx, [rbp+var_28]
mov rax, [rbp+var_10]
add rcx, [rax+18h]
mov [rax+18h], rcx
loc_BD615:
add rsp, 30h
pop rbp
retn
|
long long uf_blob_0(long long a1, long long a2, _BYTE *a3, long long a4)
{
int v4; // eax
int v5; // ecx
long long result; // rax
unsigned int v7; // eax
int v8; // ecx
unsigned int bits_0; // [rsp+0h] [rbp-30h]
unsigned int v10; // [rsp+4h] [rbp-2Ch]
if ( *(_DWORD *)(a2 + 4) )
{
v4 = *(_DWORD *)a2;
v5 = *(_DWORD *)(a2 + 4) - 1;
*(_DWORD *)(a2 + 4) = v5;
if ( ((1 << v5) & v4) == 0 )
goto LABEL_6;
return memset(a3, 0LL, a4 - (_QWORD)a3);
}
fill_buffer_0(a2);
*(_DWORD *)(a2 + 4) = 31;
if ( *(int *)a2 < 0 )
return memset(a3, 0LL, a4 - (_QWORD)a3);
LABEL_6:
if ( *(_DWORD *)(a2 + 4) < *(_DWORD *)(a1 + 28) )
{
bits_0 = fill_and_get_bits_0((_DWORD *)a2, *(_DWORD *)(a1 + 28));
}
else
{
v7 = *(_DWORD *)a2;
v8 = *(_DWORD *)(a2 + 4) - *(_DWORD *)(a1 + 28);
*(_DWORD *)(a2 + 4) = v8;
bits_0 = mask_0[*(unsigned int *)(a1 + 28)] & (v7 >> v8);
}
v10 = a4 - (_DWORD)a3 - 8;
if ( (unsigned long long)bits_0 + *(_QWORD *)(a2 + 24) <= *(_QWORD *)(a2 + 32) )
{
decode_bytes_0(a1, a2, *(_BYTE **)(a2 + 24), (_BYTE *)(bits_0 + *(_QWORD *)(a2 + 24)));
mi_store_blob_length(a3, v10, bits_0);
*(_QWORD *)&a3[v10] = *(_QWORD *)(a2 + 24);
result = a2;
*(_QWORD *)(a2 + 24) += bits_0;
}
else
{
*(_DWORD *)(a2 + 40) = 1;
return memset(a3, 0LL, a4 - (_QWORD)a3);
}
return result;
}
|
uf_blob:
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 qword ptr [RBP + -0x20],RCX
MOV RAX,qword ptr [RBP + -0x10]
CMP dword ptr [RAX + 0x4],0x0
JZ 0x001bd4d7
MOV RAX,qword ptr [RBP + -0x10]
MOV EAX,dword ptr [RAX]
MOV RDX,qword ptr [RBP + -0x10]
MOV ECX,dword ptr [RDX + 0x4]
ADD ECX,-0x1
MOV dword ptr [RDX + 0x4],ECX
MOV EDX,0x1
SHL EDX,CL
MOV ECX,EDX
AND EAX,ECX
CMP EAX,0x0
JNZ 0x001bd4fb
JMP 0x001bd516
LAB_001bd4d7:
MOV RDI,qword ptr [RBP + -0x10]
CALL 0x001bbd50
MOV RAX,qword ptr [RBP + -0x10]
MOV dword ptr [RAX + 0x4],0x1f
MOV RAX,qword ptr [RBP + -0x10]
MOV EAX,dword ptr [RAX]
AND EAX,0x80000000
CMP EAX,0x0
JZ 0x001bd516
LAB_001bd4fb:
MOV RDI,qword ptr [RBP + -0x18]
MOV RDX,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RBP + -0x18]
SUB RDX,RAX
XOR ESI,ESI
CALL 0x0012a2c0
JMP 0x001bd615
LAB_001bd516:
MOV RAX,qword ptr [RBP + -0x10]
MOV EAX,dword ptr [RAX + 0x4]
MOV RCX,qword ptr [RBP + -0x8]
CMP EAX,dword ptr [RCX + 0x1c]
JC 0x001bd559
MOV RAX,qword ptr [RBP + -0x10]
MOV EAX,dword ptr [RAX]
MOV RCX,qword ptr [RBP + -0x8]
MOV ESI,dword ptr [RCX + 0x1c]
MOV RDX,qword ptr [RBP + -0x10]
MOV ECX,dword ptr [RDX + 0x4]
SUB ECX,ESI
MOV dword ptr [RDX + 0x4],ECX
SHR EAX,CL
MOV RCX,qword ptr [RBP + -0x8]
MOV ECX,dword ptr [RCX + 0x1c]
MOV EDX,ECX
LEA RCX,[0x3be640]
AND EAX,dword ptr [RCX + RDX*0x4]
MOV dword ptr [RBP + -0x30],EAX
JMP 0x001bd56c
LAB_001bd559:
MOV RDI,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RBP + -0x8]
MOV ESI,dword ptr [RAX + 0x1c]
CALL 0x001ba500
MOV dword ptr [RBP + -0x30],EAX
LAB_001bd56c:
MOV EAX,dword ptr [RBP + -0x30]
MOV EAX,EAX
MOV qword ptr [RBP + -0x28],RAX
MOV RAX,qword ptr [RBP + -0x20]
MOV RCX,qword ptr [RBP + -0x18]
SUB RAX,RCX
SUB EAX,0x8
MOV dword ptr [RBP + -0x2c],EAX
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x18]
ADD RAX,qword ptr [RBP + -0x28]
MOV RCX,qword ptr [RBP + -0x10]
CMP RAX,qword ptr [RCX + 0x20]
JBE 0x001bd5bf
MOV RAX,qword ptr [RBP + -0x10]
MOV dword ptr [RAX + 0x28],0x1
MOV RDI,qword ptr [RBP + -0x18]
MOV RDX,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RBP + -0x18]
SUB RDX,RAX
XOR ESI,ESI
CALL 0x0012a2c0
JMP 0x001bd615
LAB_001bd5bf:
MOV RDI,qword ptr [RBP + -0x8]
MOV RSI,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RBP + -0x10]
MOV RDX,qword ptr [RAX + 0x18]
MOV RAX,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RAX + 0x18]
ADD RCX,qword ptr [RBP + -0x28]
CALL 0x001bc460
MOV RDI,qword ptr [RBP + -0x18]
MOV ESI,dword ptr [RBP + -0x2c]
MOV RAX,qword ptr [RBP + -0x28]
MOV EDX,EAX
CALL 0x001ab120
MOV RAX,qword ptr [RBP + -0x18]
MOV ECX,dword ptr [RBP + -0x2c]
MOV RDX,qword ptr [RBP + -0x10]
MOV RDX,qword ptr [RDX + 0x18]
MOV qword ptr [RAX + RCX*0x1],RDX
MOV RCX,qword ptr [RBP + -0x28]
MOV RAX,qword ptr [RBP + -0x10]
ADD RCX,qword ptr [RAX + 0x18]
MOV qword ptr [RAX + 0x18],RCX
LAB_001bd615:
ADD RSP,0x30
POP RBP
RET
|
void uf_blob(long param_1,uint *param_2,void *param_3,long param_4)
{
uint uVar1;
ulong uVar2;
uint local_38;
if (param_2[1] == 0) {
fill_buffer(param_2);
param_2[1] = 0x1f;
uVar1 = *param_2 & 0x80000000;
}
else {
uVar1 = param_2[1];
param_2[1] = uVar1 - 1;
uVar1 = *param_2 & 1 << ((byte)(uVar1 - 1) & 0x1f);
}
if (uVar1 == 0) {
if (param_2[1] < *(uint *)(param_1 + 0x1c)) {
local_38 = fill_and_get_bits(param_2);
}
else {
uVar1 = param_2[1] - *(int *)(param_1 + 0x1c);
param_2[1] = uVar1;
local_38 = *param_2 >> ((byte)uVar1 & 0x1f) &
*(uint *)(mask + (ulong)*(uint *)(param_1 + 0x1c) * 4);
}
uVar2 = (ulong)local_38;
uVar1 = ((int)param_4 - (int)param_3) - 8;
if (*(ulong *)(param_2 + 8) < *(long *)(param_2 + 6) + uVar2) {
param_2[10] = 1;
memset(param_3,0,param_4 - (long)param_3);
}
else {
decode_bytes(param_1,param_2,*(int8 *)(param_2 + 6),*(long *)(param_2 + 6) + uVar2);
_mi_store_blob_length(param_3,uVar1,uVar2);
*(int8 *)((long)param_3 + (ulong)uVar1) = *(int8 *)(param_2 + 6);
*(ulong *)(param_2 + 6) = uVar2 + *(long *)(param_2 + 6);
}
}
else {
memset(param_3,0,param_4 - (long)param_3);
}
return;
}
|
|
64,361 |
string_advance_index
|
bluesky950520[P]quickjs/quickjs.c
|
static int64_t string_advance_index(JSString *p, int64_t index, BOOL unicode)
{
if (!unicode || index >= p->len || !p->is_wide_char) {
index++;
} else {
int index32 = (int)index;
string_getc(p, &index32);
index = index32;
}
return index;
}
|
O0
|
c
|
string_advance_index:
subq $0x18, %rsp
movq %rdi, 0x10(%rsp)
movq %rsi, 0x8(%rsp)
movl %edx, 0x4(%rsp)
cmpl $0x0, 0x4(%rsp)
je 0x8522a
movq 0x8(%rsp), %rax
movq 0x10(%rsp), %rcx
movq 0x4(%rcx), %rcx
andq $0x7fffffff, %rcx # imm = 0x7FFFFFFF
movl %ecx, %ecx
cmpq %rcx, %rax
jge 0x8522a
movq 0x10(%rsp), %rax
movq 0x4(%rax), %rax
shrq $0x1f, %rax
andq $0x1, %rax
cmpb $0x0, %al
jne 0x8523a
movq 0x8(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x8(%rsp)
jmp 0x85258
movq 0x8(%rsp), %rax
movl %eax, (%rsp)
movq 0x10(%rsp), %rdi
movq %rsp, %rsi
callq 0x85b60
movslq (%rsp), %rax
movq %rax, 0x8(%rsp)
movq 0x8(%rsp), %rax
addq $0x18, %rsp
retq
nopw %cs:(%rax,%rax)
|
string_advance_index:
sub rsp, 18h
mov [rsp+18h+var_8], rdi
mov [rsp+18h+var_10], rsi
mov [rsp+18h+var_14], edx
cmp [rsp+18h+var_14], 0
jz short loc_8522A
mov rax, [rsp+18h+var_10]
mov rcx, [rsp+18h+var_8]
mov rcx, [rcx+4]
and rcx, 7FFFFFFFh
mov ecx, ecx
cmp rax, rcx
jge short loc_8522A
mov rax, [rsp+18h+var_8]
mov rax, [rax+4]
shr rax, 1Fh
and rax, 1
cmp al, 0
jnz short loc_8523A
loc_8522A:
mov rax, [rsp+18h+var_10]
add rax, 1
mov [rsp+18h+var_10], rax
jmp short loc_85258
loc_8523A:
mov rax, [rsp+18h+var_10]
mov [rsp+18h+var_18], eax
mov rdi, [rsp+18h+var_8]
mov rsi, rsp
call string_getc
movsxd rax, [rsp+18h+var_18]
mov [rsp+18h+var_10], rax
loc_85258:
mov rax, [rsp+18h+var_10]
add rsp, 18h
retn
|
long long string_advance_index(long long a1, long long a2, int a3)
{
_DWORD v4[2]; // [rsp+0h] [rbp-18h] BYREF
long long v5; // [rsp+8h] [rbp-10h]
long long v6; // [rsp+10h] [rbp-8h]
v6 = a1;
v5 = a2;
v4[1] = a3;
if ( a3 && v5 < (*(_QWORD *)(v6 + 4) & 0x7FFFFFFFLL) && (*(_QWORD *)(v6 + 4) & 0x80000000LL) != 0 )
{
v4[0] = v5;
string_getc(v6, v4);
return v4[0];
}
else
{
++v5;
}
return v5;
}
|
string_advance_index:
SUB RSP,0x18
MOV qword ptr [RSP + 0x10],RDI
MOV qword ptr [RSP + 0x8],RSI
MOV dword ptr [RSP + 0x4],EDX
CMP dword ptr [RSP + 0x4],0x0
JZ 0x0018522a
MOV RAX,qword ptr [RSP + 0x8]
MOV RCX,qword ptr [RSP + 0x10]
MOV RCX,qword ptr [RCX + 0x4]
AND RCX,0x7fffffff
MOV ECX,ECX
CMP RAX,RCX
JGE 0x0018522a
MOV RAX,qword ptr [RSP + 0x10]
MOV RAX,qword ptr [RAX + 0x4]
SHR RAX,0x1f
AND RAX,0x1
CMP AL,0x0
JNZ 0x0018523a
LAB_0018522a:
MOV RAX,qword ptr [RSP + 0x8]
ADD RAX,0x1
MOV qword ptr [RSP + 0x8],RAX
JMP 0x00185258
LAB_0018523a:
MOV RAX,qword ptr [RSP + 0x8]
MOV dword ptr [RSP],EAX
MOV RDI,qword ptr [RSP + 0x10]
MOV RSI,RSP
CALL 0x00185b60
MOVSXD RAX,dword ptr [RSP]
MOV qword ptr [RSP + 0x8],RAX
LAB_00185258:
MOV RAX,qword ptr [RSP + 0x8]
ADD RSP,0x18
RET
|
long string_advance_index(long param_1,long param_2,int param_3)
{
int local_18;
int local_14;
long local_10;
long local_8;
if (((param_3 == 0) || ((long)(ulong)((uint)*(int8 *)(param_1 + 4) & 0x7fffffff) <= param_2)
) || ((*(ulong *)(param_1 + 4) >> 0x1f & 1) == 0)) {
local_10 = param_2 + 1;
}
else {
local_18 = (int)param_2;
local_14 = param_3;
local_10 = param_2;
local_8 = param_1;
string_getc(param_1,&local_18);
local_10 = (long)local_18;
}
return local_10;
}
|
|
64,362 |
string_advance_index
|
bluesky950520[P]quickjs/quickjs.c
|
static int64_t string_advance_index(JSString *p, int64_t index, BOOL unicode)
{
if (!unicode || index >= p->len || !p->is_wide_char) {
index++;
} else {
int index32 = (int)index;
string_getc(p, &index32);
index = index32;
}
return index;
}
|
O1
|
c
|
string_advance_index:
movq %rsi, %rax
testl %edx, %edx
je 0x4bfbd
movq 0x4(%rdi), %rcx
movl %ecx, %edx
andl $0x7fffffff, %edx # imm = 0x7FFFFFFF
cmpq %rax, %rdx
setg %dl
testl %ecx, %ecx
sets %cl
testb %cl, %dl
jne 0x4bfc1
incq %rax
retq
pushq %rbx
subq $0x10, %rsp
leaq 0xc(%rsp), %rbx
movl %eax, (%rbx)
movq %rbx, %rsi
callq 0x4c5ad
movslq (%rbx), %rax
addq $0x10, %rsp
popq %rbx
retq
|
string_advance_index:
mov rax, rsi
test edx, edx
jz short loc_4BFBD
mov rcx, [rdi+4]
mov edx, ecx
and edx, 7FFFFFFFh
cmp rdx, rax
setnle dl
test ecx, ecx
sets cl
test dl, cl
jnz short loc_4BFC1
loc_4BFBD:
inc rax
retn
loc_4BFC1:
push rbx
sub rsp, 10h
lea rbx, [rsp+18h+var_C]
mov [rbx], eax
mov rsi, rbx
call string_getc
movsxd rax, dword ptr [rbx]
add rsp, 10h
pop rbx
retn
|
long long string_advance_index(long long a1, long long a2, int a3)
{
_DWORD v4[3]; // [rsp+0h] [rbp-Ch] BYREF
if ( !a3 || (int)*(_QWORD *)(a1 + 4) >= 0 || (*(_QWORD *)(a1 + 4) & 0x7FFFFFFFLL) <= a2 )
return a2 + 1;
v4[0] = a2;
string_getc(a1, v4);
return v4[0];
}
|
string_advance_index:
MOV RAX,RSI
TEST EDX,EDX
JZ 0x0014bfbd
MOV RCX,qword ptr [RDI + 0x4]
MOV EDX,ECX
AND EDX,0x7fffffff
CMP RDX,RAX
SETG DL
TEST ECX,ECX
SETS CL
TEST DL,CL
JNZ 0x0014bfc1
LAB_0014bfbd:
INC RAX
RET
LAB_0014bfc1:
PUSH RBX
SUB RSP,0x10
LEA RBX,[RSP + 0xc]
MOV dword ptr [RBX],EAX
MOV RSI,RBX
CALL 0x0014c5ad
MOVSXD RAX,dword ptr [RBX]
ADD RSP,0x10
POP RBX
RET
|
long string_advance_index(long param_1,long param_2,int param_3)
{
uint uVar1;
int local_c;
if (param_3 != 0) {
uVar1 = (uint)*(int8 *)(param_1 + 4);
if (param_2 < (long)(ulong)(uVar1 & 0x7fffffff) && (int)uVar1 < 0) {
local_c = (int)param_2;
string_getc(param_1,&local_c);
return (long)local_c;
}
}
return param_2 + 1;
}
|
|
64,363 |
string_advance_index
|
bluesky950520[P]quickjs/quickjs.c
|
static int64_t string_advance_index(JSString *p, int64_t index, BOOL unicode)
{
if (!unicode || index >= p->len || !p->is_wide_char) {
index++;
} else {
int index32 = (int)index;
string_getc(p, &index32);
index = index32;
}
return index;
}
|
O2
|
c
|
string_advance_index:
movq %rsi, %rax
testl %edx, %edx
je 0x41573
movq 0x4(%rdi), %rcx
movl %ecx, %edx
andl $0x7fffffff, %edx # imm = 0x7FFFFFFF
cmpq %rax, %rdx
setg %dl
testl %ecx, %ecx
sets %cl
testb %cl, %dl
jne 0x41577
incq %rax
retq
pushq %rbx
subq $0x10, %rsp
leaq 0xc(%rsp), %rbx
movl %eax, (%rbx)
movq %rbx, %rsi
callq 0x41a28
movslq (%rbx), %rax
addq $0x10, %rsp
popq %rbx
retq
|
string_advance_index:
mov rax, rsi
test edx, edx
jz short loc_41573
mov rcx, [rdi+4]
mov edx, ecx
and edx, 7FFFFFFFh
cmp rdx, rax
setnle dl
test ecx, ecx
sets cl
test dl, cl
jnz short loc_41577
loc_41573:
inc rax
retn
loc_41577:
push rbx
sub rsp, 10h
lea rbx, [rsp+18h+var_C]
mov [rbx], eax
mov rsi, rbx
call string_getc
movsxd rax, dword ptr [rbx]
add rsp, 10h
pop rbx
retn
|
long long string_advance_index(long long a1, long long a2, int a3)
{
_DWORD v4[3]; // [rsp+0h] [rbp-Ch] BYREF
if ( !a3 || (int)*(_QWORD *)(a1 + 4) >= 0 || (*(_QWORD *)(a1 + 4) & 0x7FFFFFFFLL) <= a2 )
return a2 + 1;
v4[0] = a2;
string_getc(a1, v4);
return v4[0];
}
|
string_advance_index:
MOV RAX,RSI
TEST EDX,EDX
JZ 0x00141573
MOV RCX,qword ptr [RDI + 0x4]
MOV EDX,ECX
AND EDX,0x7fffffff
CMP RDX,RAX
SETG DL
TEST ECX,ECX
SETS CL
TEST DL,CL
JNZ 0x00141577
LAB_00141573:
INC RAX
RET
LAB_00141577:
PUSH RBX
SUB RSP,0x10
LEA RBX,[RSP + 0xc]
MOV dword ptr [RBX],EAX
MOV RSI,RBX
CALL 0x00141a28
MOVSXD RAX,dword ptr [RBX]
ADD RSP,0x10
POP RBX
RET
|
long string_advance_index(long param_1,long param_2,int param_3)
{
uint uVar1;
int local_c;
if (param_3 != 0) {
uVar1 = (uint)*(int8 *)(param_1 + 4);
if (param_2 < (long)(ulong)(uVar1 & 0x7fffffff) && (int)uVar1 < 0) {
local_c = (int)param_2;
string_getc(param_1,&local_c);
return (long)local_c;
}
}
return param_2 + 1;
}
|
|
64,364 |
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 0x36415d(%rip), %rdi # 0x388a50
leaq 0x5670a(%rip), %rsi # 0x7b004
movl $0x1bb, %edx # imm = 0x1BB
callq 0x24810
movq 0x36306d(%rip), %rdi # 0x387978
movq -0x8(%rbp), %rsi
callq 0x278c0
movq %rax, 0x36305d(%rip) # 0x387978
leaq 0x36412e(%rip), %rdi # 0x388a50
callq 0x24880
movq -0x8(%rbp), %rdi
addq $0x18, %rdi
callq 0x24940
jmp 0x24936
addq $0x10, %rsp
popq %rbp
retq
nopl (%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; "/workspace/llm4binary/github2025/eloqsq"...
mov edx, 1BBh
call inline_mysql_mutex_lock
mov rdi, cs:thr_lock_thread_list
mov rsi, [rbp+var_8]
call list_delete
mov cs:thr_lock_thread_list, rax
lea rdi, THR_LOCK_lock
call inline_mysql_mutex_unlock
mov rdi, [rbp+var_8]
add rdi, 18h
call inline_mysql_mutex_destroy
jmp short $+2
loc_24936:
add rsp, 10h
pop rbp
retn
|
long long thr_lock_delete(long long a1)
{
inline_mysql_mutex_lock(
(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((long long)&THR_LOCK_lock);
return inline_mysql_mutex_destroy(a1 + 24);
}
|
thr_lock_delete:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x10
MOV qword ptr [RBP + -0x8],RDI
LEA RDI,[0x488a50]
LEA RSI,[0x17b004]
MOV EDX,0x1bb
CALL 0x00124810
MOV RDI,qword ptr [0x00487978]
MOV RSI,qword ptr [RBP + -0x8]
CALL 0x001278c0
MOV qword ptr [0x00487978],RAX
LEA RDI,[0x488a50]
CALL 0x00124880
MOV RDI,qword ptr [RBP + -0x8]
ADD RDI,0x18
CALL 0x00124940
JMP 0x00124936
LAB_00124936:
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;
}
|
|
64,365 |
my_init_mysys_psi_keys
|
eloqsql/mysys/my_init.c
|
void my_init_mysys_psi_keys()
{
const char* category= "mysys";
int count;
count= sizeof(all_mysys_mutexes)/sizeof(all_mysys_mutexes[0]);
mysql_mutex_register(category, all_mysys_mutexes, count);
count= sizeof(all_mysys_conds)/sizeof(all_mysys_conds[0]);
mysql_cond_register(category, all_mysys_conds, count);
count= sizeof(all_mysys_rwlocks)/sizeof(all_mysys_rwlocks[0]);
mysql_rwlock_register(category, all_mysys_rwlocks, count);
count= sizeof(all_mysys_threads)/sizeof(all_mysys_threads[0]);
mysql_thread_register(category, all_mysys_threads, count);
count= sizeof(all_mysys_files)/sizeof(all_mysys_files[0]);
mysql_file_register(category, all_mysys_files, count);
count= array_elements(all_mysys_stages);
mysql_stage_register(category, all_mysys_stages, count);
}
|
O3
|
c
|
my_init_mysys_psi_keys:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
leaq 0x2e7a8b(%rip), %r14 # 0x3880c0
movq (%r14), %rax
leaq 0x3d1f7(%rip), %rbx # 0xdd836
leaq 0x2e726a(%rip), %rsi # 0x3878b0
movq %rbx, %rdi
movl $0x13, %edx
callq *(%rax)
movq (%r14), %rax
leaq 0x2e7426(%rip), %rsi # 0x387a80
movq %rbx, %rdi
movl $0x7, %edx
callq *0x10(%rax)
movq (%r14), %rax
leaq 0x2e74c1(%rip), %rsi # 0x387b30
movq %rbx, %rdi
movl $0x1, %edx
callq *0x8(%rax)
movq (%r14), %rax
leaq 0x2e74cc(%rip), %rsi # 0x387b50
movq %rbx, %rdi
movl $0x1, %edx
callq *0x18(%rax)
movq (%r14), %rax
leaq 0x2e74d7(%rip), %rsi # 0x387b70
movq %rbx, %rdi
movl $0x2, %edx
callq *0x20(%rax)
movq (%r14), %rax
movq 0x28(%rax), %rax
leaq 0x2e71ee(%rip), %rsi # 0x3878a0
movq %rbx, %rdi
movl $0x1, %edx
popq %rbx
popq %r14
popq %rbp
jmpq *%rax
|
my_init_mysys_psi_keys:
push rbp
mov rbp, rsp
push r14
push rbx
lea r14, PSI_server
mov rax, [r14]
lea rbx, aMysys; "mysys"
lea rsi, all_mysys_mutexes
mov rdi, rbx
mov edx, 13h
call qword ptr [rax]
mov rax, [r14]
lea rsi, all_mysys_conds
mov rdi, rbx
mov edx, 7
call qword ptr [rax+10h]
mov rax, [r14]
lea rsi, all_mysys_rwlocks
mov rdi, rbx
mov edx, 1
call qword ptr [rax+8]
mov rax, [r14]
lea rsi, all_mysys_threads
mov rdi, rbx
mov edx, 1
call qword ptr [rax+18h]
mov rax, [r14]
lea rsi, all_mysys_files
mov rdi, rbx
mov edx, 2
call qword ptr [rax+20h]
mov rax, [r14]
mov rax, [rax+28h]
lea rsi, all_mysys_stages
mov rdi, rbx
mov edx, 1
pop rbx
pop r14
pop rbp
jmp rax
|
long long my_init_mysys_psi_keys()
{
((void ( *)(const char *, _UNKNOWN **, long long))*PSI_server)("mysys", &all_mysys_mutexes, 19LL);
((void ( *)(const char *, _UNKNOWN **, long long))PSI_server[2])("mysys", &all_mysys_conds, 7LL);
((void ( *)(const char *, _UNKNOWN **, long long))PSI_server[1])("mysys", &all_mysys_rwlocks, 1LL);
((void ( *)(const char *, _UNKNOWN **, long long))PSI_server[3])("mysys", &all_mysys_threads, 1LL);
((void ( *)(const char *, _UNKNOWN **, long long))PSI_server[4])("mysys", &all_mysys_files, 2LL);
return ((long long ( *)(const char *, _UNKNOWN **, long long))PSI_server[5])("mysys", &all_mysys_stages, 1LL);
}
|
my_init_mysys_psi_keys:
PUSH RBP
MOV RBP,RSP
PUSH R14
PUSH RBX
LEA R14,[0x4880c0]
MOV RAX,qword ptr [R14]
LEA RBX,[0x1dd836]
LEA RSI,[0x4878b0]
MOV RDI,RBX
MOV EDX,0x13
CALL qword ptr [RAX]
MOV RAX,qword ptr [R14]
LEA RSI,[0x487a80]
MOV RDI,RBX
MOV EDX,0x7
CALL qword ptr [RAX + 0x10]
MOV RAX,qword ptr [R14]
LEA RSI,[0x487b30]
MOV RDI,RBX
MOV EDX,0x1
CALL qword ptr [RAX + 0x8]
MOV RAX,qword ptr [R14]
LEA RSI,[0x487b50]
MOV RDI,RBX
MOV EDX,0x1
CALL qword ptr [RAX + 0x18]
MOV RAX,qword ptr [R14]
LEA RSI,[0x487b70]
MOV RDI,RBX
MOV EDX,0x2
CALL qword ptr [RAX + 0x20]
MOV RAX,qword ptr [R14]
MOV RAX,qword ptr [RAX + 0x28]
LEA RSI,[0x4878a0]
MOV RDI,RBX
MOV EDX,0x1
POP RBX
POP R14
POP RBP
JMP RAX
|
void my_init_mysys_psi_keys(void)
{
(**(code **)PSI_server)("mysys",all_mysys_mutexes,0x13);
(**(code **)(PSI_server + 0x10))("mysys",all_mysys_conds,7);
(**(code **)(PSI_server + 8))("mysys",all_mysys_rwlocks,1);
(**(code **)(PSI_server + 0x18))("mysys",all_mysys_threads,1);
(**(code **)(PSI_server + 0x20))("mysys",all_mysys_files,2);
/* WARNING: Could not recover jumptable at 0x001a06be. Too many branches */
/* WARNING: Treating indirect jump as call */
(**(code **)(PSI_server + 0x28))("mysys",&all_mysys_stages,1);
return;
}
|
|
64,366 |
write_hook_for_clr_end
|
eloqsql/storage/maria/ma_key_recover.c
|
my_bool write_hook_for_clr_end(enum translog_record_type type
__attribute__ ((unused)),
TRN *trn, MARIA_HA *tbl_info,
LSN *lsn __attribute__ ((unused)),
void *hook_arg)
{
MARIA_SHARE *share= tbl_info->s;
struct st_msg_to_write_hook_for_clr_end *msg=
(struct st_msg_to_write_hook_for_clr_end *)hook_arg;
my_bool error= FALSE;
DBUG_ENTER("write_hook_for_clr_end");
DBUG_ASSERT(trn->trid != 0);
trn->undo_lsn= msg->previous_undo_lsn;
switch (msg->undone_record_type) {
case LOGREC_UNDO_ROW_DELETE:
share->state.state.records++;
share->state.state.checksum+= msg->checksum_delta;
break;
case LOGREC_UNDO_ROW_INSERT:
share->state.state.records--;
share->state.state.checksum+= msg->checksum_delta;
break;
case LOGREC_UNDO_ROW_UPDATE:
share->state.state.checksum+= msg->checksum_delta;
break;
case LOGREC_UNDO_KEY_INSERT_WITH_ROOT:
case LOGREC_UNDO_KEY_DELETE_WITH_ROOT:
{
/* Update key root */
struct st_msg_to_write_hook_for_undo_key *extra_msg=
(struct st_msg_to_write_hook_for_undo_key *) msg->extra_msg;
*extra_msg->root= extra_msg->value;
break;
}
case LOGREC_UNDO_KEY_INSERT:
case LOGREC_UNDO_KEY_DELETE:
break;
case LOGREC_UNDO_BULK_INSERT:
mysql_mutex_assert_owner(&share->intern_lock);
error= (maria_enable_indexes(tbl_info) ||
/* we enabled indices, need '2' below */
_ma_state_info_write(share,
MA_STATE_INFO_WRITE_DONT_MOVE_OFFSET |
MA_STATE_INFO_WRITE_FULL_INFO));
/* no need for _ma_reset_status(): REDO_DELETE_ALL is just before us */
break;
default:
DBUG_ASSERT(0);
}
if (trn->undo_lsn == LSN_IMPOSSIBLE) /* has fully rolled back */
trn->first_undo_lsn= LSN_WITH_FLAGS_TO_FLAGS(trn->first_undo_lsn);
DBUG_RETURN(error);
}
|
O0
|
c
|
write_hook_for_clr_end:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movl %edi, -0x4(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq %r8, -0x28(%rbp)
movq -0x18(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x30(%rbp)
movq -0x28(%rbp), %rax
movq %rax, -0x38(%rbp)
movb $0x0, -0x39(%rbp)
jmp 0x42234
movq -0x38(%rbp), %rax
movq (%rax), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x98(%rax)
movq -0x38(%rbp), %rax
movl 0x8(%rax), %eax
addl $-0x12, %eax
movl %eax, %ecx
movq %rcx, -0x50(%rbp)
subl $0x15, %eax
ja 0x4232e
movq -0x50(%rbp), %rax
leaq 0x11e95e(%rip), %rcx # 0x160bc8
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq -0x30(%rbp), %rax
movq 0x18(%rax), %rcx
addq $0x1, %rcx
movq %rcx, 0x18(%rax)
movq -0x38(%rbp), %rax
movl 0xc(%rax), %ecx
movq -0x30(%rbp), %rax
addl 0x48(%rax), %ecx
movl %ecx, 0x48(%rax)
jmp 0x42334
movq -0x30(%rbp), %rax
movq 0x18(%rax), %rcx
addq $-0x1, %rcx
movq %rcx, 0x18(%rax)
movq -0x38(%rbp), %rax
movl 0xc(%rax), %ecx
movq -0x30(%rbp), %rax
addl 0x48(%rax), %ecx
movl %ecx, 0x48(%rax)
jmp 0x42334
movq -0x38(%rbp), %rax
movl 0xc(%rax), %ecx
movq -0x30(%rbp), %rax
addl 0x48(%rax), %ecx
movl %ecx, 0x48(%rax)
jmp 0x42334
movq -0x38(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x48(%rbp)
movq -0x48(%rbp), %rax
movq 0x8(%rax), %rcx
movq -0x48(%rbp), %rax
movq (%rax), %rax
movq %rcx, (%rax)
jmp 0x42334
jmp 0x42334
jmp 0x422f3
jmp 0x422f5
movq -0x18(%rbp), %rdi
callq 0x37af0
movl %eax, %ecx
movb $0x1, %al
cmpl $0x0, %ecx
movb %al, -0x51(%rbp)
jne 0x42321
movq -0x30(%rbp), %rdi
movl $0x3, %esi
callq 0x34220
cmpl $0x0, %eax
setne %al
movb %al, -0x51(%rbp)
movb -0x51(%rbp), %al
andb $0x1, %al
movzbl %al, %eax
movb %al, -0x39(%rbp)
jmp 0x42334
jmp 0x42330
jmp 0x42332
jmp 0x42334
movq -0x10(%rbp), %rax
cmpq $0x0, 0x98(%rax)
jne 0x42362
movq -0x10(%rbp), %rax
movabsq $-0x100000000000000, %rcx # imm = 0xFF00000000000000
andq 0xa0(%rax), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0xa0(%rax)
jmp 0x42364
movb -0x39(%rbp), %al
movb %al, -0x52(%rbp)
movb -0x52(%rbp), %al
addq $0x60, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
|
write_hook_for_clr_end:
push rbp
mov rbp, rsp
sub rsp, 60h
mov [rbp+var_4], edi
mov [rbp+var_10], rsi
mov [rbp+var_18], rdx
mov [rbp+var_20], rcx
mov [rbp+var_28], r8
mov rax, [rbp+var_18]
mov rax, [rax]
mov [rbp+var_30], rax
mov rax, [rbp+var_28]
mov [rbp+var_38], rax
mov [rbp+var_39], 0
jmp short $+2
loc_42234:
mov rax, [rbp+var_38]
mov rcx, [rax]
mov rax, [rbp+var_10]
mov [rax+98h], rcx
mov rax, [rbp+var_38]
mov eax, [rax+8]
add eax, 0FFFFFFEEh; switch 22 cases
mov ecx, eax
mov [rbp+var_50], rcx
sub eax, 15h
ja def_42271; jumptable 0000000000042271 default case, cases 25-38
mov rax, [rbp+var_50]
lea rcx, jpt_42271
movsxd rax, ds:(jpt_42271 - 160BC8h)[rcx+rax*4]
add rax, rcx
jmp rax; switch jump
loc_42273:
mov rax, [rbp+var_30]; jumptable 0000000000042271 case 19
mov rcx, [rax+18h]
add rcx, 1
mov [rax+18h], rcx
mov rax, [rbp+var_38]
mov ecx, [rax+0Ch]
mov rax, [rbp+var_30]
add ecx, [rax+48h]
mov [rax+48h], ecx
jmp loc_42334
loc_42299:
mov rax, [rbp+var_30]; jumptable 0000000000042271 case 18
mov rcx, [rax+18h]
add rcx, 0FFFFFFFFFFFFFFFFh
mov [rax+18h], rcx
mov rax, [rbp+var_38]
mov ecx, [rax+0Ch]
mov rax, [rbp+var_30]
add ecx, [rax+48h]
mov [rax+48h], ecx
jmp short loc_42334
loc_422BC:
mov rax, [rbp+var_38]; jumptable 0000000000042271 case 20
mov ecx, [rax+0Ch]
mov rax, [rbp+var_30]
add ecx, [rax+48h]
mov [rax+48h], ecx
jmp short loc_42334
loc_422CF:
mov rax, [rbp+var_38]; jumptable 0000000000042271 cases 22,24
mov rax, [rax+10h]
mov [rbp+var_48], rax
mov rax, [rbp+var_48]
mov rcx, [rax+8]
mov rax, [rbp+var_48]
mov rax, [rax]
mov [rax], rcx
jmp short loc_42334
loc_422EF:
jmp short loc_42334; jumptable 0000000000042271 cases 21,23
loc_422F1:
jmp short $+2; jumptable 0000000000042271 case 39
loc_422F3:
jmp short $+2
loc_422F5:
mov rdi, [rbp+var_18]
call maria_enable_indexes
mov ecx, eax
mov al, 1
cmp ecx, 0
mov [rbp+var_51], al
jnz short loc_42321
mov rdi, [rbp+var_30]
mov esi, 3
call _ma_state_info_write
cmp eax, 0
setnz al
mov [rbp+var_51], al
loc_42321:
mov al, [rbp+var_51]
and al, 1
movzx eax, al
mov [rbp+var_39], al
jmp short loc_42334
def_42271:
jmp short $+2; jumptable 0000000000042271 default case, cases 25-38
loc_42330:
jmp short $+2
loc_42332:
jmp short $+2
loc_42334:
mov rax, [rbp+var_10]
cmp qword ptr [rax+98h], 0
jnz short loc_42362
mov rax, [rbp+var_10]
mov rcx, 0FF00000000000000h
and rcx, [rax+0A0h]
mov rax, [rbp+var_10]
mov [rax+0A0h], rcx
loc_42362:
jmp short $+2
loc_42364:
mov al, [rbp+var_39]
mov [rbp+var_52], al
mov al, [rbp+var_52]
add rsp, 60h
pop rbp
retn
|
bool write_hook_for_clr_end(long long a1, long long a2, long long *a3, long long a4, long long a5)
{
bool v6; // [rsp+Fh] [rbp-51h]
bool v7; // [rsp+27h] [rbp-39h]
long long v8; // [rsp+30h] [rbp-30h]
v8 = *a3;
v7 = 0;
*(_QWORD *)(a2 + 152) = *(_QWORD *)a5;
switch ( *(_DWORD *)(a5 + 8) )
{
case 0x12:
--*(_QWORD *)(v8 + 24);
*(_DWORD *)(v8 + 72) += *(_DWORD *)(a5 + 12);
break;
case 0x13:
++*(_QWORD *)(v8 + 24);
*(_DWORD *)(v8 + 72) += *(_DWORD *)(a5 + 12);
break;
case 0x14:
*(_DWORD *)(v8 + 72) += *(_DWORD *)(a5 + 12);
break;
case 0x16:
case 0x18:
***(_QWORD ***)(a5 + 16) = *(_QWORD *)(*(_QWORD *)(a5 + 16) + 8LL);
break;
case 0x27:
v6 = 1;
if ( !(unsigned int)maria_enable_indexes(a3) )
v6 = (unsigned int)ma_state_info_write(v8, 3u) != 0;
v7 = v6;
break;
default:
break;
}
if ( !*(_QWORD *)(a2 + 152) )
*(_QWORD *)(a2 + 160) &= 0xFF00000000000000LL;
return v7;
}
|
write_hook_for_clr_end:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x60
MOV dword ptr [RBP + -0x4],EDI
MOV qword ptr [RBP + -0x10],RSI
MOV qword ptr [RBP + -0x18],RDX
MOV qword ptr [RBP + -0x20],RCX
MOV qword ptr [RBP + -0x28],R8
MOV RAX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x30],RAX
MOV RAX,qword ptr [RBP + -0x28]
MOV qword ptr [RBP + -0x38],RAX
MOV byte ptr [RBP + -0x39],0x0
JMP 0x00142234
LAB_00142234:
MOV RAX,qword ptr [RBP + -0x38]
MOV RCX,qword ptr [RAX]
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RAX + 0x98],RCX
MOV RAX,qword ptr [RBP + -0x38]
MOV EAX,dword ptr [RAX + 0x8]
ADD EAX,-0x12
MOV ECX,EAX
MOV qword ptr [RBP + -0x50],RCX
SUB EAX,0x15
JA 0x0014232e
MOV RAX,qword ptr [RBP + -0x50]
LEA RCX,[0x260bc8]
MOVSXD RAX,dword ptr [RCX + RAX*0x4]
ADD RAX,RCX
switchD:
JMP RAX
caseD_13:
MOV RAX,qword ptr [RBP + -0x30]
MOV RCX,qword ptr [RAX + 0x18]
ADD RCX,0x1
MOV qword ptr [RAX + 0x18],RCX
MOV RAX,qword ptr [RBP + -0x38]
MOV ECX,dword ptr [RAX + 0xc]
MOV RAX,qword ptr [RBP + -0x30]
ADD ECX,dword ptr [RAX + 0x48]
MOV dword ptr [RAX + 0x48],ECX
JMP 0x00142334
caseD_12:
MOV RAX,qword ptr [RBP + -0x30]
MOV RCX,qword ptr [RAX + 0x18]
ADD RCX,-0x1
MOV qword ptr [RAX + 0x18],RCX
MOV RAX,qword ptr [RBP + -0x38]
MOV ECX,dword ptr [RAX + 0xc]
MOV RAX,qword ptr [RBP + -0x30]
ADD ECX,dword ptr [RAX + 0x48]
MOV dword ptr [RAX + 0x48],ECX
JMP 0x00142334
caseD_14:
MOV RAX,qword ptr [RBP + -0x38]
MOV ECX,dword ptr [RAX + 0xc]
MOV RAX,qword ptr [RBP + -0x30]
ADD ECX,dword ptr [RAX + 0x48]
MOV dword ptr [RAX + 0x48],ECX
JMP 0x00142334
caseD_16:
MOV RAX,qword ptr [RBP + -0x38]
MOV RAX,qword ptr [RAX + 0x10]
MOV qword ptr [RBP + -0x48],RAX
MOV RAX,qword ptr [RBP + -0x48]
MOV RCX,qword ptr [RAX + 0x8]
MOV RAX,qword ptr [RBP + -0x48]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RAX],RCX
JMP 0x00142334
caseD_15:
JMP 0x00142334
caseD_27:
JMP 0x001422f3
LAB_001422f3:
JMP 0x001422f5
LAB_001422f5:
MOV RDI,qword ptr [RBP + -0x18]
CALL 0x00137af0
MOV ECX,EAX
MOV AL,0x1
CMP ECX,0x0
MOV byte ptr [RBP + -0x51],AL
JNZ 0x00142321
MOV RDI,qword ptr [RBP + -0x30]
MOV ESI,0x3
CALL 0x00134220
CMP EAX,0x0
SETNZ AL
MOV byte ptr [RBP + -0x51],AL
LAB_00142321:
MOV AL,byte ptr [RBP + -0x51]
AND AL,0x1
MOVZX EAX,AL
MOV byte ptr [RBP + -0x39],AL
JMP 0x00142334
caseD_19:
JMP 0x00142330
LAB_00142330:
JMP 0x00142332
LAB_00142332:
JMP 0x00142334
LAB_00142334:
MOV RAX,qword ptr [RBP + -0x10]
CMP qword ptr [RAX + 0x98],0x0
JNZ 0x00142362
MOV RAX,qword ptr [RBP + -0x10]
MOV RCX,-0x100000000000000
AND RCX,qword ptr [RAX + 0xa0]
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RAX + 0xa0],RCX
LAB_00142362:
JMP 0x00142364
LAB_00142364:
MOV AL,byte ptr [RBP + -0x39]
MOV byte ptr [RBP + -0x52],AL
MOV AL,byte ptr [RBP + -0x52]
ADD RSP,0x60
POP RBP
RET
|
bool write_hook_for_clr_end
(int8 param_1,long param_2,long *param_3,int8 param_4,int8 *param_5
)
{
long lVar1;
int iVar2;
bool local_59;
bool local_41;
lVar1 = *param_3;
local_41 = false;
*(int8 *)(param_2 + 0x98) = *param_5;
switch(*(int4 *)(param_5 + 1)) {
case 0x12:
*(long *)(lVar1 + 0x18) = *(long *)(lVar1 + 0x18) + -1;
*(int *)(lVar1 + 0x48) = *(int *)((long)param_5 + 0xc) + *(int *)(lVar1 + 0x48);
break;
case 0x13:
*(long *)(lVar1 + 0x18) = *(long *)(lVar1 + 0x18) + 1;
*(int *)(lVar1 + 0x48) = *(int *)((long)param_5 + 0xc) + *(int *)(lVar1 + 0x48);
break;
case 0x14:
*(int *)(lVar1 + 0x48) = *(int *)((long)param_5 + 0xc) + *(int *)(lVar1 + 0x48);
break;
case 0x15:
case 0x17:
break;
case 0x16:
case 0x18:
**(int8 **)param_5[2] = ((int8 *)param_5[2])[1];
break;
default:
break;
case 0x27:
iVar2 = maria_enable_indexes(param_3);
local_59 = true;
if (iVar2 == 0) {
iVar2 = _ma_state_info_write(lVar1,3);
local_59 = iVar2 != 0;
}
local_41 = local_59;
}
if (*(long *)(param_2 + 0x98) == 0) {
*(ulong *)(param_2 + 0xa0) = *(ulong *)(param_2 + 0xa0) & 0xff00000000000000;
}
return local_41;
}
|
|
64,367 |
check_rules
|
eloqsql/strings/ctype-uca.c
|
static int
check_rules(MY_CHARSET_LOADER *loader,
const MY_COLL_RULES *rules,
const MY_UCA_WEIGHT_LEVEL *dst, const MY_UCA_WEIGHT_LEVEL *src)
{
const MY_COLL_RULE *r, *rlast;
for (r= rules->rule, rlast= rules->rule + rules->nrules; r < rlast; r++)
{
if (r->curr[0] > dst->maxchar)
{
my_snprintf(loader->error, sizeof(loader->error),
"Shift character out of range: u%04X", (uint) r->curr[0]);
return TRUE;
}
else if (r->base[0] > src->maxchar)
{
my_snprintf(loader->error, sizeof(loader->error),
"Reset character out of range: u%04X", (uint) r->base[0]);
return TRUE;
}
}
return FALSE;
}
|
O0
|
c
|
check_rules:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
movq -0x18(%rbp), %rax
movq 0x20(%rax), %rax
movq %rax, -0x30(%rbp)
movq -0x18(%rbp), %rax
movq 0x20(%rax), %rax
movq -0x18(%rbp), %rcx
imulq $0xa0, 0x10(%rcx), %rcx
addq %rcx, %rax
movq %rax, -0x38(%rbp)
movq -0x30(%rbp), %rax
cmpq -0x38(%rbp), %rax
jae 0x5e218
movq -0x30(%rbp), %rax
movq 0x50(%rax), %rax
movq -0x20(%rbp), %rcx
cmpq (%rcx), %rax
jbe 0x5e1c8
movq -0x10(%rbp), %rdi
movq -0x30(%rbp), %rax
movq 0x50(%rax), %rax
movl %eax, %ecx
movl $0x80, %esi
leaq 0x2c37c(%rip), %rdx # 0x8a534
movb $0x0, %al
callq 0x84980
movl $0x1, -0x4(%rbp)
jmp 0x5e21f
movq -0x30(%rbp), %rax
movq (%rax), %rax
movq -0x28(%rbp), %rcx
cmpq (%rcx), %rax
jbe 0x5e201
movq -0x10(%rbp), %rdi
movq -0x30(%rbp), %rax
movq (%rax), %rax
movl %eax, %ecx
movl $0x80, %esi
leaq 0x2c367(%rip), %rdx # 0x8a558
movb $0x0, %al
callq 0x84980
movl $0x1, -0x4(%rbp)
jmp 0x5e21f
jmp 0x5e203
jmp 0x5e205
movq -0x30(%rbp), %rax
addq $0xa0, %rax
movq %rax, -0x30(%rbp)
jmp 0x5e17f
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x40, %rsp
popq %rbp
retq
nopl (%rax,%rax)
|
check_rules:
push rbp
mov rbp, rsp
sub rsp, 40h
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov [rbp+var_20], rdx
mov [rbp+var_28], rcx
mov rax, [rbp+var_18]
mov rax, [rax+20h]
mov [rbp+var_30], rax
mov rax, [rbp+var_18]
mov rax, [rax+20h]
mov rcx, [rbp+var_18]
imul rcx, [rcx+10h], 0A0h
add rax, rcx
mov [rbp+var_38], rax
loc_5E17F:
mov rax, [rbp+var_30]
cmp rax, [rbp+var_38]
jnb loc_5E218
mov rax, [rbp+var_30]
mov rax, [rax+50h]
mov rcx, [rbp+var_20]
cmp rax, [rcx]
jbe short loc_5E1C8
mov rdi, [rbp+var_10]
mov rax, [rbp+var_30]
mov rax, [rax+50h]
mov ecx, eax
mov esi, 80h
lea rdx, aShiftCharacter; "Shift character out of range: u%04X"
mov al, 0
call my_snprintf
mov [rbp+var_4], 1
jmp short loc_5E21F
loc_5E1C8:
mov rax, [rbp+var_30]
mov rax, [rax]
mov rcx, [rbp+var_28]
cmp rax, [rcx]
jbe short loc_5E201
mov rdi, [rbp+var_10]
mov rax, [rbp+var_30]
mov rax, [rax]
mov ecx, eax
mov esi, 80h
lea rdx, aResetCharacter; "Reset character out of range: u%04X"
mov al, 0
call my_snprintf
mov [rbp+var_4], 1
jmp short loc_5E21F
loc_5E201:
jmp short $+2
loc_5E203:
jmp short $+2
loc_5E205:
mov rax, [rbp+var_30]
add rax, 0A0h
mov [rbp+var_30], rax
jmp loc_5E17F
loc_5E218:
mov [rbp+var_4], 0
loc_5E21F:
mov eax, [rbp+var_4]
add rsp, 40h
pop rbp
retn
|
long long check_rules(int a1, long long a2, _QWORD *a3, _QWORD *a4, int a5, int a6)
{
_QWORD *i; // [rsp+10h] [rbp-30h]
for ( i = *(_QWORD **)(a2 + 32); (unsigned long long)i < 160LL * *(_QWORD *)(a2 + 16) + *(_QWORD *)(a2 + 32); i += 20 )
{
if ( i[10] > *a3 )
{
my_snprintf(a1, 128, (unsigned int)"Shift character out of range: u%04X", i[10], a5, a6);
return 1;
}
if ( *i > *a4 )
{
my_snprintf(a1, 128, (unsigned int)"Reset character out of range: u%04X", *i, a5, a6);
return 1;
}
}
return 0;
}
|
check_rules:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x40
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x18],RSI
MOV qword ptr [RBP + -0x20],RDX
MOV qword ptr [RBP + -0x28],RCX
MOV RAX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RAX + 0x20]
MOV qword ptr [RBP + -0x30],RAX
MOV RAX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RAX + 0x20]
MOV RCX,qword ptr [RBP + -0x18]
IMUL RCX,qword ptr [RCX + 0x10],0xa0
ADD RAX,RCX
MOV qword ptr [RBP + -0x38],RAX
LAB_0015e17f:
MOV RAX,qword ptr [RBP + -0x30]
CMP RAX,qword ptr [RBP + -0x38]
JNC 0x0015e218
MOV RAX,qword ptr [RBP + -0x30]
MOV RAX,qword ptr [RAX + 0x50]
MOV RCX,qword ptr [RBP + -0x20]
CMP RAX,qword ptr [RCX]
JBE 0x0015e1c8
MOV RDI,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RBP + -0x30]
MOV RAX,qword ptr [RAX + 0x50]
MOV ECX,EAX
MOV ESI,0x80
LEA RDX,[0x18a534]
MOV AL,0x0
CALL 0x00184980
MOV dword ptr [RBP + -0x4],0x1
JMP 0x0015e21f
LAB_0015e1c8:
MOV RAX,qword ptr [RBP + -0x30]
MOV RAX,qword ptr [RAX]
MOV RCX,qword ptr [RBP + -0x28]
CMP RAX,qword ptr [RCX]
JBE 0x0015e201
MOV RDI,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RBP + -0x30]
MOV RAX,qword ptr [RAX]
MOV ECX,EAX
MOV ESI,0x80
LEA RDX,[0x18a558]
MOV AL,0x0
CALL 0x00184980
MOV dword ptr [RBP + -0x4],0x1
JMP 0x0015e21f
LAB_0015e201:
JMP 0x0015e203
LAB_0015e203:
JMP 0x0015e205
LAB_0015e205:
MOV RAX,qword ptr [RBP + -0x30]
ADD RAX,0xa0
MOV qword ptr [RBP + -0x30],RAX
JMP 0x0015e17f
LAB_0015e218:
MOV dword ptr [RBP + -0x4],0x0
LAB_0015e21f:
MOV EAX,dword ptr [RBP + -0x4]
ADD RSP,0x40
POP RBP
RET
|
int4 check_rules(int8 param_1,long param_2,ulong *param_3,ulong *param_4)
{
ulong *local_38;
local_38 = *(ulong **)(param_2 + 0x20);
while( true ) {
if ((ulong *)(*(long *)(param_2 + 0x20) + *(long *)(param_2 + 0x10) * 0xa0) <= local_38) {
return 0;
}
if (*param_3 < local_38[10]) break;
if (*param_4 < *local_38) {
my_snprintf(param_1,0x80,"Reset character out of range: u%04X",*local_38 & 0xffffffff);
return 1;
}
local_38 = local_38 + 0x14;
}
my_snprintf(param_1,0x80,"Shift character out of range: u%04X",local_38[10] & 0xffffffff);
return 1;
}
|
|
64,368 |
my_b_write
|
eloqsql/include/my_sys.h
|
static inline int my_b_write(IO_CACHE *info, const uchar *Buffer, size_t Count)
{
MEM_CHECK_DEFINED(Buffer, Count);
if (info->write_pos + Count <= info->write_end)
{
if (Count)
{
memcpy(info->write_pos, Buffer, Count);
info->write_pos+= Count;
}
return 0;
}
return _my_b_write(info, Buffer, Count);
}
|
O0
|
c
|
my_b_write:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq -0x10(%rbp), %rax
movq 0x40(%rax), %rax
addq -0x20(%rbp), %rax
movq -0x10(%rbp), %rcx
cmpq 0x48(%rcx), %rax
ja 0x9c22f
cmpq $0x0, -0x20(%rbp)
je 0x9c226
movq -0x10(%rbp), %rax
movq 0x40(%rax), %rdi
movq -0x18(%rbp), %rsi
movq -0x20(%rbp), %rdx
callq 0x2a090
movq -0x20(%rbp), %rcx
movq -0x10(%rbp), %rax
addq 0x40(%rax), %rcx
movq %rcx, 0x40(%rax)
movl $0x0, -0x4(%rbp)
jmp 0x9c243
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x20(%rbp), %rdx
callq 0xe1b30
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
|
my_b_write_0:
push rbp
mov rbp, rsp
sub rsp, 20h
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov [rbp+var_20], rdx
mov rax, [rbp+var_10]
mov rax, [rax+40h]
add rax, [rbp+var_20]
mov rcx, [rbp+var_10]
cmp rax, [rcx+48h]
ja short loc_9C22F
cmp [rbp+var_20], 0
jz short loc_9C226
mov rax, [rbp+var_10]
mov rdi, [rax+40h]
mov rsi, [rbp+var_18]
mov rdx, [rbp+var_20]
call _memcpy
mov rcx, [rbp+var_20]
mov rax, [rbp+var_10]
add rcx, [rax+40h]
mov [rax+40h], rcx
loc_9C226:
mov [rbp+var_4], 0
jmp short loc_9C243
loc_9C22F:
mov rdi, [rbp+var_10]
mov rsi, [rbp+var_18]
mov rdx, [rbp+var_20]
call _my_b_write
mov [rbp+var_4], eax
loc_9C243:
mov eax, [rbp+var_4]
add rsp, 20h
pop rbp
retn
|
long long my_b_write_0(long long a1, long long a2, long long a3)
{
if ( (unsigned long long)(a3 + *(_QWORD *)(a1 + 64)) > *(_QWORD *)(a1 + 72) )
{
return (unsigned int)my_b_write(a1, a2, a3);
}
else
{
if ( a3 )
{
memcpy(*(_QWORD *)(a1 + 64), a2, a3);
*(_QWORD *)(a1 + 64) += a3;
}
return 0;
}
}
|
my_b_write:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x20
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 + 0x40]
ADD RAX,qword ptr [RBP + -0x20]
MOV RCX,qword ptr [RBP + -0x10]
CMP RAX,qword ptr [RCX + 0x48]
JA 0x0019c22f
CMP qword ptr [RBP + -0x20],0x0
JZ 0x0019c226
MOV RAX,qword ptr [RBP + -0x10]
MOV RDI,qword ptr [RAX + 0x40]
MOV RSI,qword ptr [RBP + -0x18]
MOV RDX,qword ptr [RBP + -0x20]
CALL 0x0012a090
MOV RCX,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RBP + -0x10]
ADD RCX,qword ptr [RAX + 0x40]
MOV qword ptr [RAX + 0x40],RCX
LAB_0019c226:
MOV dword ptr [RBP + -0x4],0x0
JMP 0x0019c243
LAB_0019c22f:
MOV RDI,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RBP + -0x18]
MOV RDX,qword ptr [RBP + -0x20]
CALL 0x001e1b30
MOV dword ptr [RBP + -0x4],EAX
LAB_0019c243:
MOV EAX,dword ptr [RBP + -0x4]
ADD RSP,0x20
POP RBP
RET
|
int4 my_b_write(long param_1,void *param_2,size_t param_3)
{
int4 local_c;
if (*(ulong *)(param_1 + 0x48) < *(long *)(param_1 + 0x40) + param_3) {
local_c = _my_b_write(param_1,param_2,param_3);
}
else {
if (param_3 != 0) {
memcpy(*(void **)(param_1 + 0x40),param_2,param_3);
*(size_t *)(param_1 + 0x40) = param_3 + *(long *)(param_1 + 0x40);
}
local_c = 0;
}
return local_c;
}
|
|
64,369 |
my_filename
|
eloqsql/mysys/my_div.c
|
char * my_filename(File fd)
{
DBUG_ENTER("my_filename");
if ((uint) fd >= (uint) my_file_limit || !my_file_info[fd].name)
DBUG_RETURN((char*) "UNKNOWN");
if (fd >= 0 && my_file_info[fd].type != UNOPEN)
{
DBUG_RETURN(my_file_info[fd].name);
}
else
DBUG_RETURN((char*) "UNOPENED"); /* Debug message */
}
|
O0
|
c
|
my_filename:
pushq %rbp
movq %rsp, %rbp
movl %edi, -0xc(%rbp)
movl -0xc(%rbp), %eax
leaq 0x1b062f(%rip), %rcx # 0x235790
cmpl (%rcx), %eax
jae 0x85180
leaq 0x1b062c(%rip), %rax # 0x235798
movq (%rax), %rax
movslq -0xc(%rbp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
cmpq $0x0, (%rax)
jne 0x8518f
jmp 0x85182
leaq 0x4c9cf(%rip), %rax # 0xd1b58
movq %rax, -0x8(%rbp)
jmp 0x851dd
cmpl $0x0, -0xc(%rbp)
jl 0x851d0
leaq 0x1b05fc(%rip), %rax # 0x235798
movq (%rax), %rax
movslq -0xc(%rbp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
cmpl $0x0, 0x8(%rax)
je 0x851d0
jmp 0x851b2
leaq 0x1b05df(%rip), %rax # 0x235798
movq (%rax), %rax
movslq -0xc(%rbp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movq (%rax), %rax
movq %rax, -0x8(%rbp)
jmp 0x851dd
jmp 0x851d2
leaq 0x4c987(%rip), %rax # 0xd1b60
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
popq %rbp
retq
nopw %cs:(%rax,%rax)
nopl (%rax)
|
my_filename:
push rbp
mov rbp, rsp
mov [rbp+var_C], edi
mov eax, [rbp+var_C]
lea rcx, my_file_limit
cmp eax, [rcx]
jnb short loc_85180
lea rax, my_file_info
mov rax, [rax]
movsxd rcx, [rbp+var_C]
shl rcx, 4
add rax, rcx
cmp qword ptr [rax], 0
jnz short loc_8518F
loc_85180:
jmp short $+2
loc_85182:
lea rax, aUnknown_0; "UNKNOWN"
mov [rbp+var_8], rax
jmp short loc_851DD
loc_8518F:
cmp [rbp+var_C], 0
jl short loc_851D0
lea rax, my_file_info
mov rax, [rax]
movsxd rcx, [rbp+var_C]
shl rcx, 4
add rax, rcx
cmp dword ptr [rax+8], 0
jz short loc_851D0
jmp short $+2
loc_851B2:
lea rax, my_file_info
mov rax, [rax]
movsxd rcx, [rbp+var_C]
shl rcx, 4
add rax, rcx
mov rax, [rax]
mov [rbp+var_8], rax
jmp short loc_851DD
loc_851D0:
jmp short $+2
loc_851D2:
lea rax, aUnopened; "UNOPENED"
mov [rbp+var_8], rax
loc_851DD:
mov rax, [rbp+var_8]
pop rbp
retn
|
const char * my_filename(int a1)
{
if ( (unsigned int)a1 >= my_file_limit || !*((_QWORD *)my_file_info + 2 * a1) )
return "UNKNOWN";
if ( a1 >= 0 && *((_DWORD *)my_file_info + 4 * a1 + 2) )
return (const char *)*((_QWORD *)my_file_info + 2 * a1);
return "UNOPENED";
}
|
my_filename:
PUSH RBP
MOV RBP,RSP
MOV dword ptr [RBP + -0xc],EDI
MOV EAX,dword ptr [RBP + -0xc]
LEA RCX,[0x335790]
CMP EAX,dword ptr [RCX]
JNC 0x00185180
LEA RAX,[0x335798]
MOV RAX,qword ptr [RAX]
MOVSXD RCX,dword ptr [RBP + -0xc]
SHL RCX,0x4
ADD RAX,RCX
CMP qword ptr [RAX],0x0
JNZ 0x0018518f
LAB_00185180:
JMP 0x00185182
LAB_00185182:
LEA RAX,[0x1d1b58]
MOV qword ptr [RBP + -0x8],RAX
JMP 0x001851dd
LAB_0018518f:
CMP dword ptr [RBP + -0xc],0x0
JL 0x001851d0
LEA RAX,[0x335798]
MOV RAX,qword ptr [RAX]
MOVSXD RCX,dword ptr [RBP + -0xc]
SHL RCX,0x4
ADD RAX,RCX
CMP dword ptr [RAX + 0x8],0x0
JZ 0x001851d0
JMP 0x001851b2
LAB_001851b2:
LEA RAX,[0x335798]
MOV RAX,qword ptr [RAX]
MOVSXD RCX,dword ptr [RBP + -0xc]
SHL RCX,0x4
ADD RAX,RCX
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x8],RAX
JMP 0x001851dd
LAB_001851d0:
JMP 0x001851d2
LAB_001851d2:
LEA RAX,[0x1d1b60]
MOV qword ptr [RBP + -0x8],RAX
LAB_001851dd:
MOV RAX,qword ptr [RBP + -0x8]
POP RBP
RET
|
char * my_filename(uint param_1)
{
char *local_10;
if ((param_1 < my_file_limit) && (*(long *)(my_file_info + (long)(int)param_1 * 0x10) != 0)) {
if (((int)param_1 < 0) || (*(int *)(my_file_info + (long)(int)param_1 * 0x10 + 8) == 0)) {
local_10 = "UNOPENED";
}
else {
local_10 = *(char **)(my_file_info + (long)(int)param_1 * 0x10);
}
}
else {
local_10 = "UNKNOWN";
}
return local_10;
}
|
|
64,370 |
bc_put_atom
|
bluesky950520[P]quickjs/quickjs.c
|
static int bc_put_atom(BCWriterState *s, JSAtom atom)
{
uint32_t v;
if (__JS_AtomIsTaggedInt(atom)) {
v = (__JS_AtomToUInt32(atom) << 1) | 1;
} else {
if (bc_atom_to_idx(s, &v, atom))
return -1;
v <<= 1;
}
bc_put_leb128(s, v);
return 0;
}
|
O0
|
c
|
bc_put_atom:
subq $0x18, %rsp
movq %rdi, 0x8(%rsp)
movl %esi, 0x4(%rsp)
movl 0x4(%rsp), %edi
callq 0x3c3b0
cmpl $0x0, %eax
je 0x7f64e
movl 0x4(%rsp), %edi
callq 0x3c3d0
shll %eax
orl $0x1, %eax
movl %eax, (%rsp)
jmp 0x7f676
movq 0x8(%rsp), %rdi
movl 0x4(%rsp), %edx
movq %rsp, %rsi
callq 0x7fb60
cmpl $0x0, %eax
je 0x7f66e
movl $0xffffffff, 0x14(%rsp) # imm = 0xFFFFFFFF
jmp 0x7f68b
movl (%rsp), %eax
shll %eax
movl %eax, (%rsp)
movq 0x8(%rsp), %rdi
movl (%rsp), %esi
callq 0x7ea20
movl $0x0, 0x14(%rsp)
movl 0x14(%rsp), %eax
addq $0x18, %rsp
retq
nopw %cs:(%rax,%rax)
|
bc_put_atom:
sub rsp, 18h
mov [rsp+18h+var_10], rdi
mov [rsp+18h+var_14], esi
mov edi, [rsp+18h+var_14]
call __JS_AtomIsTaggedInt
cmp eax, 0
jz short loc_7F64E
mov edi, [rsp+18h+var_14]
call __JS_AtomToUInt32
shl eax, 1
or eax, 1
mov [rsp+18h+var_18], eax
jmp short loc_7F676
loc_7F64E:
mov rdi, [rsp+18h+var_10]
mov edx, [rsp+18h+var_14]
mov rsi, rsp
call bc_atom_to_idx
cmp eax, 0
jz short loc_7F66E
mov [rsp+18h+var_4], 0FFFFFFFFh
jmp short loc_7F68B
loc_7F66E:
mov eax, [rsp+18h+var_18]
shl eax, 1
mov [rsp+18h+var_18], eax
loc_7F676:
mov rdi, [rsp+18h+var_10]
mov esi, [rsp+18h+var_18]
call bc_put_leb128
mov [rsp+18h+var_4], 0
loc_7F68B:
mov eax, [rsp+18h+var_4]
add rsp, 18h
retn
|
long long bc_put_atom(long long a1, int a2)
{
unsigned int v3; // [rsp+0h] [rbp-18h] BYREF
unsigned int v4; // [rsp+4h] [rbp-14h]
long long v5; // [rsp+8h] [rbp-10h]
v5 = a1;
v4 = a2;
if ( _JS_AtomIsTaggedInt(a2) )
{
v3 = (2 * _JS_AtomToUInt32(v4)) | 1;
LABEL_6:
bc_put_leb128(v5, v3);
return 0;
}
if ( !(unsigned int)bc_atom_to_idx(v5, &v3, v4) )
{
v3 *= 2;
goto LABEL_6;
}
return (unsigned int)-1;
}
|
bc_put_atom:
SUB RSP,0x18
MOV qword ptr [RSP + 0x8],RDI
MOV dword ptr [RSP + 0x4],ESI
MOV EDI,dword ptr [RSP + 0x4]
CALL 0x0013c3b0
CMP EAX,0x0
JZ 0x0017f64e
MOV EDI,dword ptr [RSP + 0x4]
CALL 0x0013c3d0
SHL EAX,0x1
OR EAX,0x1
MOV dword ptr [RSP],EAX
JMP 0x0017f676
LAB_0017f64e:
MOV RDI,qword ptr [RSP + 0x8]
MOV EDX,dword ptr [RSP + 0x4]
MOV RSI,RSP
CALL 0x0017fb60
CMP EAX,0x0
JZ 0x0017f66e
MOV dword ptr [RSP + 0x14],0xffffffff
JMP 0x0017f68b
LAB_0017f66e:
MOV EAX,dword ptr [RSP]
SHL EAX,0x1
MOV dword ptr [RSP],EAX
LAB_0017f676:
MOV RDI,qword ptr [RSP + 0x8]
MOV ESI,dword ptr [RSP]
CALL 0x0017ea20
MOV dword ptr [RSP + 0x14],0x0
LAB_0017f68b:
MOV EAX,dword ptr [RSP + 0x14]
ADD RSP,0x18
RET
|
int4 bc_put_atom(int8 param_1,int4 param_2)
{
int iVar1;
uint local_18;
int4 local_14;
int8 local_10;
local_14 = param_2;
local_10 = param_1;
iVar1 = __JS_AtomIsTaggedInt(param_2);
if (iVar1 == 0) {
iVar1 = bc_atom_to_idx(local_10,&local_18,local_14);
if (iVar1 != 0) {
return 0xffffffff;
}
local_18 = local_18 << 1;
}
else {
iVar1 = __JS_AtomToUInt32(local_14);
local_18 = iVar1 << 1 | 1;
}
bc_put_leb128(local_10,local_18);
return 0;
}
|
|
64,371 |
type_equals
|
tsotchke[P]eshkol/src/core/utils/type_comparison.c
|
bool type_equals(Type* a, Type* b) {
if (a == b) return true;
if (a == NULL || b == NULL) return false;
if (a->kind != b->kind) return false;
switch (a->kind) {
case TYPE_VOID:
case TYPE_BOOLEAN:
case TYPE_CHAR:
case TYPE_STRING:
case TYPE_SYMBOL:
case TYPE_ANY:
case TYPE_UNKNOWN:
return true;
case TYPE_INTEGER:
return a->int_size == b->int_size;
case TYPE_FLOAT:
return a->float_size == b->float_size;
case TYPE_PAIR:
return type_equals(a->function.params[0], b->function.params[0]) &&
type_equals(a->function.params[1], b->function.params[1]);
case TYPE_VECTOR:
return type_equals(a->vector.element_type, b->vector.element_type) &&
a->vector.size == b->vector.size;
case TYPE_FUNCTION:
if (a->function.param_count != b->function.param_count ||
a->function.variadic != b->function.variadic ||
!type_equals(a->function.return_type, b->function.return_type)) {
return false;
}
for (size_t i = 0; i < a->function.param_count; i++) {
if (!type_equals(a->function.params[i], b->function.params[i])) {
return false;
}
}
return true;
case TYPE_STRUCT:
if (a->structure.field_count != b->structure.field_count) {
return false;
}
for (size_t i = 0; i < a->structure.field_count; i++) {
if (strcmp(a->structure.fields[i].name, b->structure.fields[i].name) != 0 ||
!type_equals(a->structure.fields[i].type, b->structure.fields[i].type)) {
return false;
}
}
return true;
case TYPE_UNION:
if (a->union_type.variant_count != b->union_type.variant_count) {
return false;
}
// Check if all variants in a are in b
for (size_t i = 0; i < a->union_type.variant_count; i++) {
bool found = false;
for (size_t j = 0; j < b->union_type.variant_count; j++) {
if (type_equals(a->union_type.variants[i], b->union_type.variants[j])) {
found = true;
break;
}
}
if (!found) {
return false;
}
}
return true;
}
return false;
}
|
O3
|
c
|
type_equals:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
cmpq %rsi, %rdi
je 0x2f15
movq %rsi, %rbx
movq %rdi, %r14
xorl %eax, %eax
testq %r14, %r14
je 0x3058
testq %rbx, %rbx
je 0x3058
movl (%r14), %ecx
cmpl (%rbx), %ecx
jne 0x3056
cmpl $0x7, %ecx
jne 0x2ef8
movq 0x10(%r14), %r14
movq (%r14), %rdi
movq 0x10(%rbx), %rbx
movq (%rbx), %rsi
callq 0x2e94
testb %al, %al
je 0x3056
movq 0x8(%r14), %r14
movq 0x8(%rbx), %rbx
cmpq %rbx, %r14
jne 0x2eaa
jmp 0x2f15
xorl %eax, %eax
cmpl $0xd, %ecx
ja 0x3058
movl %ecx, %ecx
leaq 0x33b0(%rip), %rdx # 0x62bc
movslq (%rdx,%rcx,4), %rcx
addq %rdx, %rcx
jmpq *%rcx
movb $0x1, %al
jmp 0x3058
movl 0x8(%r14), %eax
cmpl 0x8(%rbx), %eax
sete %al
jmp 0x3058
movq 0x8(%r14), %r15
cmpq 0x8(%rbx), %r15
jne 0x3056
testq %r15, %r15
je 0x2f15
movq 0x10(%r14), %r14
movq 0x10(%rbx), %r12
xorl %r13d, %r13d
movq (%r14,%r13,8), %rbx
xorl %ebp, %ebp
movq (%r12,%rbp,8), %rsi
movq %rbx, %rdi
callq 0x2e94
testb %al, %al
jne 0x2f6e
incq %rbp
xorl %eax, %eax
cmpq %rbp, %r15
jne 0x2f4f
jmp 0x3058
incq %r13
cmpq %r15, %r13
jne 0x2f49
jmp 0x2f15
movq 0x8(%r14), %r15
cmpq 0x8(%rbx), %r15
jne 0x3056
movb 0x20(%r14), %al
cmpb 0x20(%rbx), %al
jne 0x3056
movq 0x18(%r14), %rdi
movq 0x18(%rbx), %rsi
callq 0x2e94
testb %al, %al
je 0x3056
movb $0x1, %al
testq %r15, %r15
je 0x3058
movq 0x10(%r14), %r14
movq 0x10(%rbx), %rbx
decq %r15
xorl %r12d, %r12d
movq (%r14,%r12,8), %rdi
movq (%rbx,%r12,8), %rsi
callq 0x2e94
testb %al, %al
je 0x3058
leaq 0x1(%r12), %rcx
cmpq %r12, %r15
movq %rcx, %r12
jne 0x2fc1
jmp 0x3058
movq 0x8(%r14), %rdi
movq 0x8(%rbx), %rsi
callq 0x2e94
testb %al, %al
je 0x3056
movq 0x10(%r14), %rax
cmpq 0x10(%rbx), %rax
jmp 0x2f23
movq 0x8(%r14), %r15
cmpq 0x8(%rbx), %r15
jne 0x3056
testq %r15, %r15
je 0x2f15
movq 0x10(%r14), %r14
movq 0x10(%rbx), %rbx
movl $0x8, %r12d
movq -0x8(%r14,%r12), %rdi
movq -0x8(%rbx,%r12), %rsi
callq 0x1100
testl %eax, %eax
jne 0x3056
movq (%r14,%r12), %rdi
movq (%rbx,%r12), %rsi
callq 0x2e94
testb %al, %al
je 0x3056
addq $0x10, %r12
decq %r15
jne 0x3024
jmp 0x2f15
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
|
type_equals:
push rbp
push r15
push r14
push r13
push r12
push rbx
push rax
cmp rdi, rsi
jz short loc_2F15; jumptable 0000000000002F13 cases 0,1,4-6,12,13
mov rbx, rsi
mov r14, rdi
loc_2EAA:
xor eax, eax
test r14, r14
jz def_2F13; jumptable 0000000000002F13 default case, case 7
test rbx, rbx
jz def_2F13; jumptable 0000000000002F13 default case, case 7
mov ecx, [r14]
cmp ecx, [rbx]
jnz loc_3056
cmp ecx, 7
jnz short loc_2EF8
mov r14, [r14+10h]
mov rdi, [r14]
mov rbx, [rbx+10h]
mov rsi, [rbx]
call type_equals
test al, al
jz loc_3056
mov r14, [r14+8]
mov rbx, [rbx+8]
cmp r14, rbx
jnz short loc_2EAA
jmp short loc_2F15; jumptable 0000000000002F13 cases 0,1,4-6,12,13
loc_2EF8:
xor eax, eax
cmp ecx, 0Dh; switch 14 cases
ja def_2F13; jumptable 0000000000002F13 default case, case 7
mov ecx, ecx
lea rdx, jpt_2F13
movsxd rcx, ds:(jpt_2F13 - 62BCh)[rdx+rcx*4]
add rcx, rdx
jmp rcx; switch jump
loc_2F15:
mov al, 1; jumptable 0000000000002F13 cases 0,1,4-6,12,13
jmp def_2F13; jumptable 0000000000002F13 default case, case 7
loc_2F1C:
mov eax, [r14+8]; jumptable 0000000000002F13 cases 2,3
cmp eax, [rbx+8]
loc_2F23:
setz al
jmp def_2F13; jumptable 0000000000002F13 default case, case 7
loc_2F2B:
mov r15, [r14+8]; jumptable 0000000000002F13 case 11
cmp r15, [rbx+8]
jnz loc_3056
test r15, r15
jz short loc_2F15; jumptable 0000000000002F13 cases 0,1,4-6,12,13
mov r14, [r14+10h]
mov r12, [rbx+10h]
xor r13d, r13d
loc_2F49:
mov rbx, [r14+r13*8]
xor ebp, ebp
loc_2F4F:
mov rsi, [r12+rbp*8]
mov rdi, rbx
call type_equals
test al, al
jnz short loc_2F6E
inc rbp
xor eax, eax
cmp r15, rbp
jnz short loc_2F4F
jmp def_2F13; jumptable 0000000000002F13 default case, case 7
loc_2F6E:
inc r13
cmp r13, r15
jnz short loc_2F49
jmp short loc_2F15; jumptable 0000000000002F13 cases 0,1,4-6,12,13
loc_2F78:
mov r15, [r14+8]; jumptable 0000000000002F13 case 9
cmp r15, [rbx+8]
jnz loc_3056
mov al, [r14+20h]
cmp al, [rbx+20h]
jnz loc_3056
mov rdi, [r14+18h]
mov rsi, [rbx+18h]
call type_equals
test al, al
jz loc_3056
mov al, 1
test r15, r15
jz def_2F13; jumptable 0000000000002F13 default case, case 7
mov r14, [r14+10h]
mov rbx, [rbx+10h]
dec r15
xor r12d, r12d
loc_2FC1:
mov rdi, [r14+r12*8]
mov rsi, [rbx+r12*8]
call type_equals
test al, al
jz def_2F13; jumptable 0000000000002F13 default case, case 7
lea rcx, [r12+1]
cmp r15, r12
mov r12, rcx
jnz short loc_2FC1
jmp short def_2F13; jumptable 0000000000002F13 default case, case 7
loc_2FE5:
mov rdi, [r14+8]; jumptable 0000000000002F13 case 8
mov rsi, [rbx+8]
call type_equals
test al, al
jz short loc_3056
mov rax, [r14+10h]
cmp rax, [rbx+10h]
jmp loc_2F23
loc_3003:
mov r15, [r14+8]; jumptable 0000000000002F13 case 10
cmp r15, [rbx+8]
jnz short loc_3056
test r15, r15
jz loc_2F15; jumptable 0000000000002F13 cases 0,1,4-6,12,13
mov r14, [r14+10h]
mov rbx, [rbx+10h]
mov r12d, 8
loc_3024:
mov rdi, [r14+r12-8]
mov rsi, [rbx+r12-8]
call _strcmp
test eax, eax
jnz short loc_3056
mov rdi, [r14+r12]
mov rsi, [rbx+r12]
call type_equals
test al, al
jz short loc_3056
add r12, 10h
dec r15
jnz short loc_3024
jmp loc_2F15; jumptable 0000000000002F13 cases 0,1,4-6,12,13
loc_3056:
xor eax, eax
def_2F13:
add rsp, 8; jumptable 0000000000002F13 default case, case 7
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
|
char type_equals(int *a1, int *a2)
{
int *v2; // rbx
int *v3; // r14
char result; // al
int v5; // ecx
_QWORD *v6; // r14
_QWORD *v7; // rbx
long long v9; // r15
long long v10; // r14
long long v11; // r12
long long v12; // r13
long long v13; // rbx
long long v14; // rbp
long long v15; // r15
long long v16; // r14
long long v17; // rbx
long long v18; // r15
long long v19; // r12
long long v20; // r15
long long v21; // r14
long long v22; // rbx
long long i; // r12
if ( a1 == a2 )
return 1;
v2 = a2;
v3 = a1;
while ( 1 )
{
result = 0;
if ( !v3 || !v2 )
break;
v5 = *v3;
if ( *v3 != *v2 )
return 0;
if ( v5 != 7 )
{
result = 0;
switch ( v5 )
{
case 0:
case 1:
case 4:
case 5:
case 6:
case 12:
case 13:
return 1;
case 2:
case 3:
return v3[2] == v2[2];
case 8:
if ( !(unsigned __int8)type_equals(*((_QWORD *)v3 + 1), *((_QWORD *)v2 + 1)) )
return 0;
return *((_QWORD *)v3 + 2) == *((_QWORD *)v2 + 2);
case 9:
v15 = *((_QWORD *)v3 + 1);
if ( v15 != *((_QWORD *)v2 + 1)
|| *((_BYTE *)v3 + 32) != *((_BYTE *)v2 + 32)
|| !(unsigned __int8)type_equals(*((_QWORD *)v3 + 3), *((_QWORD *)v2 + 3)) )
{
return 0;
}
result = 1;
if ( v15 )
{
v16 = *((_QWORD *)v3 + 2);
v17 = *((_QWORD *)v2 + 2);
v18 = v15 - 1;
v19 = 0LL;
do
{
result = type_equals(*(_QWORD *)(v16 + 8 * v19), *(_QWORD *)(v17 + 8 * v19));
if ( !result )
break;
}
while ( v18 != v19++ );
}
return result;
case 10:
v20 = *((_QWORD *)v3 + 1);
if ( v20 != *((_QWORD *)v2 + 1) )
return 0;
if ( !v20 )
return 1;
v21 = *((_QWORD *)v3 + 2);
v22 = *((_QWORD *)v2 + 2);
for ( i = 8LL;
!(unsigned int)strcmp(*(_QWORD *)(v21 + i - 8), *(_QWORD *)(v22 + i - 8))
&& (unsigned __int8)type_equals(*(_QWORD *)(v21 + i), *(_QWORD *)(v22 + i));
i += 16LL )
{
if ( !--v20 )
return 1;
}
return 0;
case 11:
v9 = *((_QWORD *)v3 + 1);
if ( v9 != *((_QWORD *)v2 + 1) )
return 0;
if ( !v9 )
return 1;
v10 = *((_QWORD *)v3 + 2);
v11 = *((_QWORD *)v2 + 2);
v12 = 0LL;
break;
default:
return result;
}
do
{
v13 = *(_QWORD *)(v10 + 8 * v12);
v14 = 0LL;
while ( !(unsigned __int8)type_equals(v13, *(_QWORD *)(v11 + 8 * v14)) )
{
++v14;
result = 0;
if ( v9 == v14 )
return result;
}
++v12;
}
while ( v12 != v9 );
return 1;
}
v6 = (_QWORD *)*((_QWORD *)v3 + 2);
v7 = (_QWORD *)*((_QWORD *)v2 + 2);
if ( !(unsigned __int8)type_equals(*v6, *v7) )
return 0;
v3 = (int *)v6[1];
v2 = (int *)v7[1];
if ( v3 == v2 )
return 1;
}
return result;
}
|
type_equals:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
PUSH RAX
CMP RDI,RSI
JZ 0x00102f15
MOV RBX,RSI
MOV R14,RDI
LAB_00102eaa:
XOR EAX,EAX
TEST R14,R14
JZ 0x00103058
TEST RBX,RBX
JZ 0x00103058
MOV ECX,dword ptr [R14]
CMP ECX,dword ptr [RBX]
JNZ 0x00103056
CMP ECX,0x7
JNZ 0x00102ef8
MOV R14,qword ptr [R14 + 0x10]
MOV RDI,qword ptr [R14]
MOV RBX,qword ptr [RBX + 0x10]
MOV RSI,qword ptr [RBX]
CALL 0x00102e94
TEST AL,AL
JZ 0x00103056
MOV R14,qword ptr [R14 + 0x8]
MOV RBX,qword ptr [RBX + 0x8]
CMP R14,RBX
JNZ 0x00102eaa
JMP 0x00102f15
LAB_00102ef8:
XOR EAX,EAX
CMP ECX,0xd
JA 0x00103058
MOV ECX,ECX
LEA RDX,[0x1062bc]
MOVSXD RCX,dword ptr [RDX + RCX*0x4]
ADD RCX,RDX
switchD:
JMP RCX
caseD_0:
MOV AL,0x1
JMP 0x00103058
caseD_2:
MOV EAX,dword ptr [R14 + 0x8]
CMP EAX,dword ptr [RBX + 0x8]
LAB_00102f23:
SETZ AL
JMP 0x00103058
caseD_b:
MOV R15,qword ptr [R14 + 0x8]
CMP R15,qword ptr [RBX + 0x8]
JNZ 0x00103056
TEST R15,R15
JZ 0x00102f15
MOV R14,qword ptr [R14 + 0x10]
MOV R12,qword ptr [RBX + 0x10]
XOR R13D,R13D
LAB_00102f49:
MOV RBX,qword ptr [R14 + R13*0x8]
XOR EBP,EBP
LAB_00102f4f:
MOV RSI,qword ptr [R12 + RBP*0x8]
MOV RDI,RBX
CALL 0x00102e94
TEST AL,AL
JNZ 0x00102f6e
INC RBP
XOR EAX,EAX
CMP R15,RBP
JNZ 0x00102f4f
JMP 0x00103058
LAB_00102f6e:
INC R13
CMP R13,R15
JNZ 0x00102f49
JMP 0x00102f15
caseD_9:
MOV R15,qword ptr [R14 + 0x8]
CMP R15,qword ptr [RBX + 0x8]
JNZ 0x00103056
MOV AL,byte ptr [R14 + 0x20]
CMP AL,byte ptr [RBX + 0x20]
JNZ 0x00103056
MOV RDI,qword ptr [R14 + 0x18]
MOV RSI,qword ptr [RBX + 0x18]
CALL 0x00102e94
TEST AL,AL
JZ 0x00103056
MOV AL,0x1
TEST R15,R15
JZ 0x00103058
MOV R14,qword ptr [R14 + 0x10]
MOV RBX,qword ptr [RBX + 0x10]
DEC R15
XOR R12D,R12D
LAB_00102fc1:
MOV RDI,qword ptr [R14 + R12*0x8]
MOV RSI,qword ptr [RBX + R12*0x8]
CALL 0x00102e94
TEST AL,AL
JZ 0x00103058
LEA RCX,[R12 + 0x1]
CMP R15,R12
MOV R12,RCX
JNZ 0x00102fc1
JMP 0x00103058
caseD_8:
MOV RDI,qword ptr [R14 + 0x8]
MOV RSI,qword ptr [RBX + 0x8]
CALL 0x00102e94
TEST AL,AL
JZ 0x00103056
MOV RAX,qword ptr [R14 + 0x10]
CMP RAX,qword ptr [RBX + 0x10]
JMP 0x00102f23
caseD_a:
MOV R15,qword ptr [R14 + 0x8]
CMP R15,qword ptr [RBX + 0x8]
JNZ 0x00103056
TEST R15,R15
JZ 0x00102f15
MOV R14,qword ptr [R14 + 0x10]
MOV RBX,qword ptr [RBX + 0x10]
MOV R12D,0x8
LAB_00103024:
MOV RDI,qword ptr [R14 + R12*0x1 + -0x8]
MOV RSI,qword ptr [RBX + R12*0x1 + -0x8]
CALL 0x00101100
TEST EAX,EAX
JNZ 0x00103056
MOV RDI,qword ptr [R14 + R12*0x1]
MOV RSI,qword ptr [RBX + R12*0x1]
CALL 0x00102e94
TEST AL,AL
JZ 0x00103056
ADD R12,0x10
DEC R15
JNZ 0x00103024
JMP 0x00102f15
LAB_00103056:
XOR EAX,EAX
caseD_7:
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
bool type_equals(int *param_1,int *param_2)
{
int8 *puVar1;
int8 *puVar2;
long lVar3;
long lVar4;
int8 uVar5;
char cVar6;
int iVar7;
long lVar8;
long lVar9;
long lVar10;
bool bVar11;
if (param_1 != param_2) {
do {
if (param_1 == (int *)0x0) {
return false;
}
if (param_2 == (int *)0x0) {
return false;
}
iVar7 = *param_1;
if (iVar7 != *param_2) {
return false;
}
if (iVar7 != 7) {
bVar11 = false;
switch(iVar7) {
case 0:
case 1:
case 4:
case 5:
case 6:
case 0xc:
case 0xd:
break;
case 2:
case 3:
return param_1[2] == param_2[2];
default:
goto switchD_00102f13_caseD_7;
case 8:
cVar6 = type_equals(*(int8 *)(param_1 + 2),*(int8 *)(param_2 + 2));
if (cVar6 == '\0') {
return false;
}
return *(long *)(param_1 + 4) == *(long *)(param_2 + 4);
case 9:
lVar10 = *(long *)(param_1 + 2);
if (lVar10 != *(long *)(param_2 + 2)) {
return false;
}
if ((char)param_1[8] != (char)param_2[8]) {
return false;
}
cVar6 = type_equals(*(int8 *)(param_1 + 6),*(int8 *)(param_2 + 6));
if (cVar6 == '\0') {
return false;
}
if (lVar10 != 0) {
lVar3 = *(long *)(param_1 + 4);
lVar4 = *(long *)(param_2 + 4);
lVar9 = 0;
do {
cVar6 = type_equals(*(int8 *)(lVar3 + lVar9 * 8),
*(int8 *)(lVar4 + lVar9 * 8));
if (cVar6 == '\0') {
return false;
}
bVar11 = lVar10 + -1 != lVar9;
lVar9 = lVar9 + 1;
} while (bVar11);
return (bool)cVar6;
}
return true;
case 10:
lVar10 = *(long *)(param_1 + 2);
if (lVar10 != *(long *)(param_2 + 2)) {
return false;
}
if (lVar10 != 0) {
lVar3 = *(long *)(param_1 + 4);
lVar4 = *(long *)(param_2 + 4);
lVar9 = 8;
do {
iVar7 = strcmp(*(char **)(lVar3 + -8 + lVar9),*(char **)(lVar4 + -8 + lVar9));
if ((iVar7 != 0) ||
(cVar6 = type_equals(*(int8 *)(lVar3 + lVar9),*(int8 *)(lVar4 + lVar9))
, cVar6 == '\0')) {
return false;
}
lVar9 = lVar9 + 0x10;
lVar10 = lVar10 + -1;
} while (lVar10 != 0);
}
break;
case 0xb:
lVar10 = *(long *)(param_1 + 2);
if (lVar10 != *(long *)(param_2 + 2)) {
return false;
}
if (lVar10 != 0) {
lVar3 = *(long *)(param_1 + 4);
lVar4 = *(long *)(param_2 + 4);
lVar9 = 0;
do {
uVar5 = *(int8 *)(lVar3 + lVar9 * 8);
lVar8 = 0;
while (cVar6 = type_equals(uVar5,*(int8 *)(lVar4 + lVar8 * 8)), cVar6 == '\0') {
lVar8 = lVar8 + 1;
if (lVar10 == lVar8) {
return false;
}
}
lVar9 = lVar9 + 1;
} while (lVar9 != lVar10);
}
}
break;
}
puVar1 = *(int8 **)(param_1 + 4);
puVar2 = *(int8 **)(param_2 + 4);
cVar6 = type_equals(*puVar1,*puVar2);
if (cVar6 == '\0') {
return false;
}
param_1 = (int *)puVar1[1];
param_2 = (int *)puVar2[1];
} while (param_1 != param_2);
}
bVar11 = true;
switchD_00102f13_caseD_7:
return bVar11;
}
|
|
64,372 |
SDL::OpenGL1Render::Present()
|
SDL3Lite/source/Renders/OpenGL1/OpenGL1Render.cpp
|
void OpenGL1Render::Present()
{
GL_ASSERT(glViewport(0, 0, (GLsizei)_window->GetSize().x, (GLsizei)_window->GetSize().y));
_projection = Ortho<float>(0.0f, (float)_window->GetSize().x, (float)_window->GetSize().y, 0.0f, -1.0f, 1.0f);
glMatrixMode(GL_PROJECTION);
glLoadMatrixf(_projection.Values());
glMatrixMode(GL_MODELVIEW);
glLoadMatrixf(_modelView.Values());
_window->Present();
}
|
O0
|
cpp
|
SDL::OpenGL1Render::Present():
pushq %rbp
movq %rsp, %rbp
subq $0x80, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x50(%rbp)
movq -0x50(%rbp), %rax
movq 0x17f1e(%rip), %rcx # 0x43220
movq (%rcx), %rcx
movq %rcx, -0x58(%rbp)
movq 0x10(%rax), %rdi
movq (%rdi), %rax
callq *0x28(%rax)
movq %rax, %rcx
movq -0x50(%rbp), %rax
movl (%rcx), %ecx
movl %ecx, -0x5c(%rbp)
movq 0x10(%rax), %rdi
movq (%rdi), %rax
callq *0x28(%rax)
movl -0x5c(%rbp), %edx
movq %rax, %rcx
movq -0x58(%rbp), %rax
movl 0x4(%rcx), %ecx
xorl %esi, %esi
movl %esi, %edi
callq *%rax
leaq 0xfaa8(%rip), %rdi # 0x3adeb
movl $0x39, %esi
leaq 0xfaef(%rip), %rdx # 0x3ae3e
callq 0x21cf0
movq -0x50(%rbp), %rax
movq 0x10(%rax), %rdi
movq (%rdi), %rax
callq *0x28(%rax)
movq %rax, %rcx
movq -0x50(%rbp), %rax
cvtsi2ssl (%rcx), %xmm0
movss %xmm0, -0x74(%rbp)
movq 0x10(%rax), %rdi
movq (%rdi), %rax
callq *0x28(%rax)
movss -0x74(%rbp), %xmm1
cvtsi2ssl 0x4(%rax), %xmm2
leaq -0x48(%rbp), %rdi
xorps %xmm3, %xmm3
movss 0xb0af(%rip), %xmm4 # 0x36444
movss 0xb0ab(%rip), %xmm5 # 0x36448
movaps %xmm3, %xmm0
callq 0x22180
movq -0x50(%rbp), %rdi
addq $0x1c, %rdi
leaq -0x48(%rbp), %rsi
callq 0x22360
movl $0x1701, %edi # imm = 0x1701
movq 0x191ce(%rip), %rax # 0x44590
callq *(%rax)
movq -0x50(%rbp), %rdi
movq 0x195c9(%rip), %rax # 0x44998
movq (%rax), %rax
movq %rax, -0x70(%rbp)
addq $0x1c, %rdi
callq 0x21090
movq %rax, %rdi
movq -0x70(%rbp), %rax
callq *%rax
movl $0x1700, %edi # imm = 0x1700
movq 0x1919c(%rip), %rax # 0x44590
callq *(%rax)
movq -0x50(%rbp), %rdi
movq 0x19597(%rip), %rax # 0x44998
movq (%rax), %rax
movq %rax, -0x68(%rbp)
addq $0x5c, %rdi
callq 0x21090
movq %rax, %rdi
movq -0x68(%rbp), %rax
callq *%rax
movq -0x50(%rbp), %rax
movq 0x10(%rax), %rdi
movq (%rdi), %rax
callq *0x58(%rax)
addq $0x80, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
|
_ZN3SDL13OpenGL1Render7PresentEv:
push rbp
mov rbp, rsp
sub rsp, 80h
mov [rbp+var_8], rdi
mov rax, [rbp+var_8]
mov [rbp+var_50], rax
mov rax, [rbp+var_50]
mov rcx, cs:glViewport_ptr
mov rcx, [rcx]
mov [rbp+var_58], rcx
mov rdi, [rax+10h]
mov rax, [rdi]
call qword ptr [rax+28h]
mov rcx, rax
mov rax, [rbp+var_50]
mov ecx, [rcx]
mov [rbp+var_5C], ecx
mov rdi, [rax+10h]
mov rax, [rdi]
call qword ptr [rax+28h]
mov edx, [rbp+var_5C]
mov rcx, rax
mov rax, [rbp+var_58]
mov ecx, [rcx+4]
xor esi, esi
mov edi, esi
call rax
lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/SDL3Li"...
mov esi, 39h ; '9'
lea rdx, aGlviewport00Gl; "glViewport(0, 0, (GLsizei)_window->GetS"...
call _OpenGL_Assert
mov rax, [rbp+var_50]
mov rdi, [rax+10h]
mov rax, [rdi]
call qword ptr [rax+28h]
mov rcx, rax
mov rax, [rbp+var_50]
cvtsi2ss xmm0, dword ptr [rcx]
movss [rbp+var_74], xmm0
mov rdi, [rax+10h]
mov rax, [rdi]
call qword ptr [rax+28h]
movss xmm1, [rbp+var_74]
cvtsi2ss xmm2, dword ptr [rax+4]
lea rdi, [rbp+var_48]
xorps xmm3, xmm3
movss xmm4, cs:dword_36444
movss xmm5, cs:dword_36448
movaps xmm0, xmm3
call __ZN3SDL5OrthoIfEENS_4Mat4IT_EEffffff; SDL::Ortho<float>(float,float,float,float,float,float)
mov rdi, [rbp+var_50]
add rdi, 1Ch
lea rsi, [rbp+var_48]
call __ZN3SDL4Mat4IfEaSERKS1_; SDL::Mat4<float>::operator=(SDL::Mat4<float> const&)
mov edi, 1701h
mov rax, cs:glMatrixMode_ptr
call qword ptr [rax]
mov rdi, [rbp+var_50]
mov rax, cs:glLoadMatrixf_ptr
mov rax, [rax]
mov [rbp+var_70], rax
add rdi, 1Ch
call __ZN3SDL4Mat4IfE6ValuesEv; SDL::Mat4<float>::Values(void)
mov rdi, rax
mov rax, [rbp+var_70]
call rax
mov edi, 1700h
mov rax, cs:glMatrixMode_ptr
call qword ptr [rax]
mov rdi, [rbp+var_50]
mov rax, cs:glLoadMatrixf_ptr
mov rax, [rax]
mov [rbp+var_68], rax
add rdi, 5Ch ; '\'
call __ZN3SDL4Mat4IfE6ValuesEv; SDL::Mat4<float>::Values(void)
mov rdi, rax
mov rax, [rbp+var_68]
call rax
mov rax, [rbp+var_50]
mov rdi, [rax+10h]
mov rax, [rdi]
call qword ptr [rax+58h]
add rsp, 80h
pop rbp
retn
|
long long SDL::OpenGL1Render::Present(SDL::OpenGL1Render *this)
{
long long v1; // rax
long long v2; // rax
long long v3; // rax
long long v4; // rax
float v6; // [rsp+Ch] [rbp-74h]
void ( *v7)(long long); // [rsp+10h] [rbp-70h]
void ( *v8)(long long); // [rsp+18h] [rbp-68h]
unsigned int v9; // [rsp+24h] [rbp-5Ch]
void ( *v10)(_QWORD, _QWORD, _QWORD, _QWORD); // [rsp+28h] [rbp-58h]
_BYTE v12[64]; // [rsp+38h] [rbp-48h] BYREF
SDL::OpenGL1Render *v13; // [rsp+78h] [rbp-8h]
v13 = this;
v10 = (void ( *)(_QWORD, _QWORD, _QWORD, _QWORD))glViewport;
v9 = *(_DWORD *)(*(long long ( **)(_QWORD))(**((_QWORD **)this + 2) + 40LL))(*((_QWORD *)this + 2));
v1 = (*(long long ( **)(_QWORD))(**((_QWORD **)this + 2) + 40LL))(*((_QWORD *)this + 2));
v10(0LL, 0LL, v9, *(unsigned int *)(v1 + 4));
OpenGL_Assert(
"/workspace/llm4binary/github2025/SDL3Lite/source/Renders/OpenGL1/OpenGL1Render.cpp",
57LL,
"glViewport(0, 0, (GLsizei)_window->GetSize().x, (GLsizei)_window->GetSize().y)");
v6 = (float)*(int *)(*(long long ( **)(_QWORD))(**((_QWORD **)this + 2) + 40LL))(*((_QWORD *)this + 2));
v2 = (*(long long ( **)(_QWORD))(**((_QWORD **)this + 2) + 40LL))(*((_QWORD *)this + 2));
SDL::Ortho<float>(v12, 0.0, v6, (float)*(int *)(v2 + 4), 0.0, -1.0, 1.0);
SDL::Mat4<float>::operator=((char *)this + 28, v12);
glMatrixMode(5889LL);
v7 = (void ( *)(long long))glLoadMatrixf;
v3 = SDL::Mat4<float>::Values((char *)this + 28);
v7(v3);
glMatrixMode(5888LL);
v8 = (void ( *)(long long))glLoadMatrixf;
v4 = SDL::Mat4<float>::Values((char *)this + 92);
v8(v4);
return (*(long long ( **)(_QWORD))(**((_QWORD **)this + 2) + 88LL))(*((_QWORD *)this + 2));
}
|
Present:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x80
MOV qword ptr [RBP + -0x8],RDI
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RBP + -0x50],RAX
MOV RAX,qword ptr [RBP + -0x50]
MOV RCX,qword ptr [0x00143220]
MOV RCX,qword ptr [RCX]
MOV qword ptr [RBP + -0x58],RCX
MOV RDI,qword ptr [RAX + 0x10]
MOV RAX,qword ptr [RDI]
CALL qword ptr [RAX + 0x28]
MOV RCX,RAX
MOV RAX,qword ptr [RBP + -0x50]
MOV ECX,dword ptr [RCX]
MOV dword ptr [RBP + -0x5c],ECX
MOV RDI,qword ptr [RAX + 0x10]
MOV RAX,qword ptr [RDI]
CALL qword ptr [RAX + 0x28]
MOV EDX,dword ptr [RBP + -0x5c]
MOV RCX,RAX
MOV RAX,qword ptr [RBP + -0x58]
MOV ECX,dword ptr [RCX + 0x4]
XOR ESI,ESI
MOV EDI,ESI
CALL RAX
LEA RDI,[0x13adeb]
MOV ESI,0x39
LEA RDX,[0x13ae3e]
CALL 0x00121cf0
MOV RAX,qword ptr [RBP + -0x50]
MOV RDI,qword ptr [RAX + 0x10]
MOV RAX,qword ptr [RDI]
CALL qword ptr [RAX + 0x28]
MOV RCX,RAX
MOV RAX,qword ptr [RBP + -0x50]
CVTSI2SS XMM0,dword ptr [RCX]
MOVSS dword ptr [RBP + -0x74],XMM0
MOV RDI,qword ptr [RAX + 0x10]
MOV RAX,qword ptr [RDI]
CALL qword ptr [RAX + 0x28]
MOVSS XMM1,dword ptr [RBP + -0x74]
CVTSI2SS XMM2,dword ptr [RAX + 0x4]
LEA RDI,[RBP + -0x48]
XORPS XMM3,XMM3
MOVSS XMM4,dword ptr [0x00136444]
MOVSS XMM5,dword ptr [0x00136448]
MOVAPS XMM0,XMM3
CALL 0x00122180
MOV RDI,qword ptr [RBP + -0x50]
ADD RDI,0x1c
LEA RSI,[RBP + -0x48]
CALL 0x00122360
MOV EDI,0x1701
MOV RAX,qword ptr [0x00144590]
CALL qword ptr [RAX]
MOV RDI,qword ptr [RBP + -0x50]
MOV RAX,qword ptr [0x00144998]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x70],RAX
ADD RDI,0x1c
CALL 0x00121090
MOV RDI,RAX
MOV RAX,qword ptr [RBP + -0x70]
CALL RAX
MOV EDI,0x1700
MOV RAX,qword ptr [0x00144590]
CALL qword ptr [RAX]
MOV RDI,qword ptr [RBP + -0x50]
MOV RAX,qword ptr [0x00144998]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x68],RAX
ADD RDI,0x5c
CALL 0x00121090
MOV RDI,RAX
MOV RAX,qword ptr [RBP + -0x68]
CALL RAX
MOV RAX,qword ptr [RBP + -0x50]
MOV RDI,qword ptr [RAX + 0x10]
MOV RAX,qword ptr [RDI]
CALL qword ptr [RAX + 0x58]
ADD RSP,0x80
POP RBP
RET
|
/* SDL::OpenGL1Render::Present() */
void __thiscall SDL::OpenGL1Render::Present(OpenGL1Render *this)
{
int4 uVar1;
int iVar2;
code *pcVar3;
int4 *puVar4;
long lVar5;
int *piVar6;
int8 uVar7;
SDL local_50 [64];
OpenGL1Render *local_10;
pcVar3 = *(code **)PTR_glViewport_00143220;
local_10 = this;
puVar4 = (int4 *)(**(code **)(**(long **)(this + 0x10) + 0x28))();
uVar1 = *puVar4;
lVar5 = (**(code **)(**(long **)(this + 0x10) + 0x28))();
(*pcVar3)(0,0,uVar1,*(int4 *)(lVar5 + 4));
OpenGL_Assert("/workspace/llm4binary/github2025/SDL3Lite/source/Renders/OpenGL1/OpenGL1Render.cpp"
,0x39,
"glViewport(0, 0, (GLsizei)_window->GetSize().x, (GLsizei)_window->GetSize().y)");
piVar6 = (int *)(**(code **)(**(long **)(this + 0x10) + 0x28))();
iVar2 = *piVar6;
lVar5 = (**(code **)(**(long **)(this + 0x10) + 0x28))();
Ortho<float>(local_50,0.0,(float)iVar2,(float)*(int *)(lVar5 + 4),0.0,DAT_00136444,DAT_00136448);
Mat4<float>::operator=((Mat4<float> *)(this + 0x1c),local_50);
(**(code **)PTR_glMatrixMode_00144590)(0x1701);
pcVar3 = *(code **)PTR_glLoadMatrixf_00144998;
uVar7 = Mat4<float>::Values((Mat4<float> *)(this + 0x1c));
(*pcVar3)(uVar7);
(**(code **)PTR_glMatrixMode_00144590)(0x1700);
pcVar3 = *(code **)PTR_glLoadMatrixf_00144998;
uVar7 = Mat4<float>::Values((Mat4<float> *)(this + 0x5c));
(*pcVar3)(uVar7);
(**(code **)(**(long **)(this + 0x10) + 0x58))();
return;
}
|
|
64,373 |
SDL::OpenGL1Render::Present()
|
SDL3Lite/source/Renders/OpenGL1/OpenGL1Render.cpp
|
void OpenGL1Render::Present()
{
GL_ASSERT(glViewport(0, 0, (GLsizei)_window->GetSize().x, (GLsizei)_window->GetSize().y));
_projection = Ortho<float>(0.0f, (float)_window->GetSize().x, (float)_window->GetSize().y, 0.0f, -1.0f, 1.0f);
glMatrixMode(GL_PROJECTION);
glLoadMatrixf(_projection.Values());
glMatrixMode(GL_MODELVIEW);
glLoadMatrixf(_modelView.Values());
_window->Present();
}
|
O3
|
cpp
|
SDL::OpenGL1Render::Present():
subq $0x78, %rsp
movq %rdi, 0x70(%rsp)
movq 0x70(%rsp), %rax
movq %rax, 0x28(%rsp)
movq 0x28(%rsp), %rax
movq 0x16e31(%rip), %rcx # 0x42220
movq (%rcx), %rcx
movq %rcx, 0x20(%rsp)
movq 0x10(%rax), %rdi
movq (%rdi), %rax
callq *0x28(%rax)
movq %rax, %rcx
movq 0x28(%rsp), %rax
movl (%rcx), %ecx
movl %ecx, 0x1c(%rsp)
movq 0x10(%rax), %rdi
movq (%rdi), %rax
callq *0x28(%rax)
movl 0x1c(%rsp), %edx
movq %rax, %rcx
movq 0x20(%rsp), %rax
movl 0x4(%rcx), %ecx
xorl %esi, %esi
movl %esi, %edi
callq *%rax
leaq 0xf9b6(%rip), %rdi # 0x3adeb
movl $0x39, %esi
leaq 0xf9fd(%rip), %rdx # 0x3ae3e
callq 0x21cf0
movq 0x28(%rsp), %rax
movq 0x10(%rax), %rdi
movq (%rdi), %rax
callq *0x28(%rax)
movq %rax, %rcx
movq 0x28(%rsp), %rax
cvtsi2ssl (%rcx), %xmm0
movss %xmm0, 0x4(%rsp)
movq 0x10(%rax), %rdi
movq (%rdi), %rax
callq *0x28(%rax)
movss 0x4(%rsp), %xmm1
cvtsi2ssl 0x4(%rax), %xmm2
leaq 0x30(%rsp), %rdi
xorps %xmm3, %xmm3
movss 0xafb8(%rip), %xmm4 # 0x36444
movss 0xafb4(%rip), %xmm5 # 0x36448
movaps %xmm3, %xmm0
callq 0x22180
movq 0x28(%rsp), %rdi
addq $0x1c, %rdi
leaq 0x30(%rsp), %rsi
callq 0x22360
movl $0x1701, %edi # imm = 0x1701
movq 0x180d5(%rip), %rax # 0x43590
callq *(%rax)
movq 0x28(%rsp), %rdi
movq 0x184cf(%rip), %rax # 0x43998
movq (%rax), %rax
movq %rax, 0x8(%rsp)
addq $0x1c, %rdi
callq 0x21090
movq %rax, %rdi
movq 0x8(%rsp), %rax
callq *%rax
movl $0x1700, %edi # imm = 0x1700
movq 0x180a0(%rip), %rax # 0x43590
callq *(%rax)
movq 0x28(%rsp), %rdi
movq 0x1849a(%rip), %rax # 0x43998
movq (%rax), %rax
movq %rax, 0x10(%rsp)
addq $0x5c, %rdi
callq 0x21090
movq %rax, %rdi
movq 0x10(%rsp), %rax
callq *%rax
movq 0x28(%rsp), %rax
movq 0x10(%rax), %rdi
movq (%rdi), %rax
callq *0x58(%rax)
addq $0x78, %rsp
retq
nopl (%rax)
|
_ZN3SDL13OpenGL1Render7PresentEv:
sub rsp, 78h
mov [rsp+78h+var_8], rdi
mov rax, [rsp+78h+var_8]
mov [rsp+78h+var_50], rax
mov rax, [rsp+78h+var_50]
mov rcx, cs:glViewport_ptr
mov rcx, [rcx]
mov [rsp+78h+var_58], rcx
mov rdi, [rax+10h]
mov rax, [rdi]
call qword ptr [rax+28h]
mov rcx, rax
mov rax, [rsp+78h+var_50]
mov ecx, [rcx]
mov [rsp+78h+var_5C], ecx
mov rdi, [rax+10h]
mov rax, [rdi]
call qword ptr [rax+28h]
mov edx, [rsp+78h+var_5C]
mov rcx, rax
mov rax, [rsp+78h+var_58]
mov ecx, [rcx+4]
xor esi, esi
mov edi, esi
call rax
lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/SDL3Li"...
mov esi, 39h ; '9'
lea rdx, aGlviewport00Gl; "glViewport(0, 0, (GLsizei)_window->GetS"...
call _OpenGL_Assert
mov rax, [rsp+78h+var_50]
mov rdi, [rax+10h]
mov rax, [rdi]
call qword ptr [rax+28h]
mov rcx, rax
mov rax, [rsp+78h+var_50]
cvtsi2ss xmm0, dword ptr [rcx]
movss [rsp+78h+var_74], xmm0
mov rdi, [rax+10h]
mov rax, [rdi]
call qword ptr [rax+28h]
movss xmm1, [rsp+78h+var_74]
cvtsi2ss xmm2, dword ptr [rax+4]
lea rdi, [rsp+78h+var_48]
xorps xmm3, xmm3
movss xmm4, cs:dword_36444
movss xmm5, cs:dword_36448
movaps xmm0, xmm3
call __ZN3SDL5OrthoIfEENS_4Mat4IT_EEffffff; SDL::Ortho<float>(float,float,float,float,float,float)
mov rdi, [rsp+78h+var_50]
add rdi, 1Ch
lea rsi, [rsp+78h+var_48]
call __ZN3SDL4Mat4IfEaSERKS1_; SDL::Mat4<float>::operator=(SDL::Mat4<float> const&)
mov edi, 1701h
mov rax, cs:glMatrixMode_ptr
call qword ptr [rax]
mov rdi, [rsp+78h+var_50]
mov rax, cs:glLoadMatrixf_ptr
mov rax, [rax]
mov [rsp+78h+var_70], rax
add rdi, 1Ch
call __ZN3SDL4Mat4IfE6ValuesEv; SDL::Mat4<float>::Values(void)
mov rdi, rax
mov rax, [rsp+78h+var_70]
call rax
mov edi, 1700h
mov rax, cs:glMatrixMode_ptr
call qword ptr [rax]
mov rdi, [rsp+78h+var_50]
mov rax, cs:glLoadMatrixf_ptr
mov rax, [rax]
mov [rsp+78h+var_68], rax
add rdi, 5Ch ; '\'
call __ZN3SDL4Mat4IfE6ValuesEv; SDL::Mat4<float>::Values(void)
mov rdi, rax
mov rax, [rsp+78h+var_68]
call rax
mov rax, [rsp+78h+var_50]
mov rdi, [rax+10h]
mov rax, [rdi]
call qword ptr [rax+58h]
add rsp, 78h
retn
|
long long SDL::OpenGL1Render::Present(SDL::OpenGL1Render *this)
{
long long v1; // rax
long long v2; // rax
long long v3; // rax
long long v4; // rax
float v6; // [rsp+4h] [rbp-74h]
void ( *v7)(long long); // [rsp+8h] [rbp-70h]
void ( *v8)(long long); // [rsp+10h] [rbp-68h]
unsigned int v9; // [rsp+1Ch] [rbp-5Ch]
void ( *v10)(_QWORD, _QWORD, _QWORD, _QWORD); // [rsp+20h] [rbp-58h]
_BYTE v12[64]; // [rsp+30h] [rbp-48h] BYREF
SDL::OpenGL1Render *v13; // [rsp+70h] [rbp-8h]
v13 = this;
v10 = (void ( *)(_QWORD, _QWORD, _QWORD, _QWORD))glViewport;
v9 = *(_DWORD *)(*(long long ( **)(_QWORD))(**((_QWORD **)this + 2) + 40LL))(*((_QWORD *)this + 2));
v1 = (*(long long ( **)(_QWORD))(**((_QWORD **)this + 2) + 40LL))(*((_QWORD *)this + 2));
v10(0LL, 0LL, v9, *(unsigned int *)(v1 + 4));
OpenGL_Assert(
"/workspace/llm4binary/github2025/SDL3Lite/source/Renders/OpenGL1/OpenGL1Render.cpp",
57LL,
"glViewport(0, 0, (GLsizei)_window->GetSize().x, (GLsizei)_window->GetSize().y)");
v6 = (float)*(int *)(*(long long ( **)(_QWORD))(**((_QWORD **)this + 2) + 40LL))(*((_QWORD *)this + 2));
v2 = (*(long long ( **)(_QWORD))(**((_QWORD **)this + 2) + 40LL))(*((_QWORD *)this + 2));
SDL::Ortho<float>(v12, 0.0, v6, (float)*(int *)(v2 + 4), 0.0, -1.0, 1.0);
SDL::Mat4<float>::operator=((char *)this + 28, v12);
glMatrixMode(5889LL);
v7 = (void ( *)(long long))glLoadMatrixf;
v3 = SDL::Mat4<float>::Values((char *)this + 28);
v7(v3);
glMatrixMode(5888LL);
v8 = (void ( *)(long long))glLoadMatrixf;
v4 = SDL::Mat4<float>::Values((char *)this + 92);
v8(v4);
return (*(long long ( **)(_QWORD))(**((_QWORD **)this + 2) + 88LL))(*((_QWORD *)this + 2));
}
|
Present:
SUB RSP,0x78
MOV qword ptr [RSP + 0x70],RDI
MOV RAX,qword ptr [RSP + 0x70]
MOV qword ptr [RSP + 0x28],RAX
MOV RAX,qword ptr [RSP + 0x28]
MOV RCX,qword ptr [0x00142220]
MOV RCX,qword ptr [RCX]
MOV qword ptr [RSP + 0x20],RCX
MOV RDI,qword ptr [RAX + 0x10]
MOV RAX,qword ptr [RDI]
CALL qword ptr [RAX + 0x28]
MOV RCX,RAX
MOV RAX,qword ptr [RSP + 0x28]
MOV ECX,dword ptr [RCX]
MOV dword ptr [RSP + 0x1c],ECX
MOV RDI,qword ptr [RAX + 0x10]
MOV RAX,qword ptr [RDI]
CALL qword ptr [RAX + 0x28]
MOV EDX,dword ptr [RSP + 0x1c]
MOV RCX,RAX
MOV RAX,qword ptr [RSP + 0x20]
MOV ECX,dword ptr [RCX + 0x4]
XOR ESI,ESI
MOV EDI,ESI
CALL RAX
LEA RDI,[0x13adeb]
MOV ESI,0x39
LEA RDX,[0x13ae3e]
CALL 0x00121cf0
MOV RAX,qword ptr [RSP + 0x28]
MOV RDI,qword ptr [RAX + 0x10]
MOV RAX,qword ptr [RDI]
CALL qword ptr [RAX + 0x28]
MOV RCX,RAX
MOV RAX,qword ptr [RSP + 0x28]
CVTSI2SS XMM0,dword ptr [RCX]
MOVSS dword ptr [RSP + 0x4],XMM0
MOV RDI,qword ptr [RAX + 0x10]
MOV RAX,qword ptr [RDI]
CALL qword ptr [RAX + 0x28]
MOVSS XMM1,dword ptr [RSP + 0x4]
CVTSI2SS XMM2,dword ptr [RAX + 0x4]
LEA RDI,[RSP + 0x30]
XORPS XMM3,XMM3
MOVSS XMM4,dword ptr [0x00136444]
MOVSS XMM5,dword ptr [0x00136448]
MOVAPS XMM0,XMM3
CALL 0x00122180
MOV RDI,qword ptr [RSP + 0x28]
ADD RDI,0x1c
LEA RSI,[RSP + 0x30]
CALL 0x00122360
MOV EDI,0x1701
MOV RAX,qword ptr [0x00143590]
CALL qword ptr [RAX]
MOV RDI,qword ptr [RSP + 0x28]
MOV RAX,qword ptr [0x00143998]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RSP + 0x8],RAX
ADD RDI,0x1c
CALL 0x00121090
MOV RDI,RAX
MOV RAX,qword ptr [RSP + 0x8]
CALL RAX
MOV EDI,0x1700
MOV RAX,qword ptr [0x00143590]
CALL qword ptr [RAX]
MOV RDI,qword ptr [RSP + 0x28]
MOV RAX,qword ptr [0x00143998]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RSP + 0x10],RAX
ADD RDI,0x5c
CALL 0x00121090
MOV RDI,RAX
MOV RAX,qword ptr [RSP + 0x10]
CALL RAX
MOV RAX,qword ptr [RSP + 0x28]
MOV RDI,qword ptr [RAX + 0x10]
MOV RAX,qword ptr [RDI]
CALL qword ptr [RAX + 0x58]
ADD RSP,0x78
RET
|
/* SDL::OpenGL1Render::Present() */
void __thiscall SDL::OpenGL1Render::Present(OpenGL1Render *this)
{
int4 uVar1;
int iVar2;
code *pcVar3;
int4 *puVar4;
long lVar5;
int *piVar6;
int8 uVar7;
SDL local_48 [64];
OpenGL1Render *local_8;
pcVar3 = *(code **)PTR_glViewport_00142220;
local_8 = this;
puVar4 = (int4 *)(**(code **)(**(long **)(this + 0x10) + 0x28))();
uVar1 = *puVar4;
lVar5 = (**(code **)(**(long **)(this + 0x10) + 0x28))();
(*pcVar3)(0,0,uVar1,*(int4 *)(lVar5 + 4));
OpenGL_Assert("/workspace/llm4binary/github2025/SDL3Lite/source/Renders/OpenGL1/OpenGL1Render.cpp"
,0x39,
"glViewport(0, 0, (GLsizei)_window->GetSize().x, (GLsizei)_window->GetSize().y)");
piVar6 = (int *)(**(code **)(**(long **)(this + 0x10) + 0x28))();
iVar2 = *piVar6;
lVar5 = (**(code **)(**(long **)(this + 0x10) + 0x28))();
Ortho<float>(local_48,0.0,(float)iVar2,(float)*(int *)(lVar5 + 4),0.0,DAT_00136444,DAT_00136448);
Mat4<float>::operator=((Mat4<float> *)(this + 0x1c),local_48);
(**(code **)PTR_glMatrixMode_00143590)(0x1701);
pcVar3 = *(code **)PTR_glLoadMatrixf_00143998;
uVar7 = Mat4<float>::Values((Mat4<float> *)(this + 0x1c));
(*pcVar3)(uVar7);
(**(code **)PTR_glMatrixMode_00143590)(0x1700);
pcVar3 = *(code **)PTR_glLoadMatrixf_00143998;
uVar7 = Mat4<float>::Values((Mat4<float> *)(this + 0x5c));
(*pcVar3)(uVar7);
(**(code **)(**(long **)(this + 0x10) + 0x58))();
return;
}
|
|
64,374 |
ImageDrawLineEx
|
csit-sgu[P]mit-game-2025_1/Libraries/raylib/src/rtextures.c
|
void ImageDrawLineEx(Image *dst, Vector2 start, Vector2 end, int thick, Color color)
{
// Round start and end positions to nearest integer coordinates
int x1 = (int)(start.x + 0.5f);
int y1 = (int)(start.y + 0.5f);
int x2 = (int)(end.x + 0.5f);
int y2 = (int)(end.y + 0.5f);
// Calculate differences in x and y coordinates
int dx = x2 - x1;
int dy = y2 - y1;
// Draw the main line between (x1, y1) and (x2, y2)
ImageDrawLine(dst, x1, y1, x2, y2, color);
// Determine if the line is more horizontal or vertical
if (dx != 0 && abs(dy/dx) < 1)
{
// Line is more horizontal
// Calculate half the width of the line
int wy = (thick - 1)*(int)sqrtf((float)(dx*dx + dy*dy))/(2*abs(dx));
// Draw additional lines above and below the main line
for (int i = 1; i <= wy; i++)
{
ImageDrawLine(dst, x1, y1 - i, x2, y2 - i, color); // Draw above the main line
ImageDrawLine(dst, x1, y1 + i, x2, y2 + i, color); // Draw below the main line
}
}
else if (dy != 0)
{
// Line is more vertical or perfectly horizontal
// Calculate half the width of the line
int wx = (thick - 1)*(int)sqrtf((float)(dx*dx + dy*dy))/(2*abs(dy));
// Draw additional lines to the left and right of the main line
for (int i = 1; i <= wx; i++)
{
ImageDrawLine(dst, x1 - i, y1, x2 - i, y2, color); // Draw left of the main line
ImageDrawLine(dst, x1 + i, y1, x2 + i, y2, color); // Draw right of the main line
}
}
}
|
O0
|
c
|
ImageDrawLineEx:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movlpd %xmm0, -0x8(%rbp)
movlpd %xmm1, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movq %rdi, -0x20(%rbp)
movl %esi, -0x24(%rbp)
movss 0x9c87c(%rip), %xmm0 # 0x1a40f0
addss -0x8(%rbp), %xmm0
cvttss2si %xmm0, %eax
movl %eax, -0x28(%rbp)
movss 0x9c868(%rip), %xmm0 # 0x1a40f0
addss -0x4(%rbp), %xmm0
cvttss2si %xmm0, %eax
movl %eax, -0x2c(%rbp)
movss 0x9c854(%rip), %xmm0 # 0x1a40f0
addss -0x10(%rbp), %xmm0
cvttss2si %xmm0, %eax
movl %eax, -0x30(%rbp)
movss 0x9c840(%rip), %xmm0 # 0x1a40f0
addss -0xc(%rbp), %xmm0
cvttss2si %xmm0, %eax
movl %eax, -0x34(%rbp)
movl -0x30(%rbp), %eax
subl -0x28(%rbp), %eax
movl %eax, -0x38(%rbp)
movl -0x34(%rbp), %eax
subl -0x2c(%rbp), %eax
movl %eax, -0x3c(%rbp)
movq -0x20(%rbp), %rdi
movl -0x28(%rbp), %esi
movl -0x2c(%rbp), %edx
movl -0x30(%rbp), %ecx
movl -0x34(%rbp), %r8d
movl -0x14(%rbp), %r9d
callq 0x107670
cmpl $0x0, -0x38(%rbp)
je 0x1079a8
movl -0x3c(%rbp), %eax
cltd
idivl -0x38(%rbp)
movl %eax, %ecx
negl %ecx
cmovnsl %ecx, %eax
cmpl $0x1, %eax
jge 0x1079a8
movl -0x24(%rbp), %eax
subl $0x1, %eax
movl %eax, -0x50(%rbp)
movl -0x38(%rbp), %eax
imull -0x38(%rbp), %eax
movl -0x3c(%rbp), %ecx
imull -0x3c(%rbp), %ecx
addl %ecx, %eax
cvtsi2ss %eax, %xmm0
callq 0xaa30
movl -0x50(%rbp), %eax
cvttss2si %xmm0, %ecx
imull %ecx, %eax
movl -0x38(%rbp), %ecx
movl %ecx, %edx
negl %edx
cmovnsl %edx, %ecx
shll %ecx
cltd
idivl %ecx
movl %eax, -0x40(%rbp)
movl $0x1, -0x44(%rbp)
movl -0x44(%rbp), %eax
cmpl -0x40(%rbp), %eax
jg 0x1079a3
movq -0x20(%rbp), %rdi
movl -0x28(%rbp), %esi
movl -0x2c(%rbp), %edx
subl -0x44(%rbp), %edx
movl -0x30(%rbp), %ecx
movl -0x34(%rbp), %r8d
subl -0x44(%rbp), %r8d
movl -0x14(%rbp), %r9d
callq 0x107670
movq -0x20(%rbp), %rdi
movl -0x28(%rbp), %esi
movl -0x2c(%rbp), %edx
addl -0x44(%rbp), %edx
movl -0x30(%rbp), %ecx
movl -0x34(%rbp), %r8d
addl -0x44(%rbp), %r8d
movl -0x14(%rbp), %r9d
callq 0x107670
movl -0x44(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x44(%rbp)
jmp 0x10794e
jmp 0x107a4e
cmpl $0x0, -0x3c(%rbp)
je 0x107a4c
movl -0x24(%rbp), %eax
subl $0x1, %eax
movl %eax, -0x54(%rbp)
movl -0x38(%rbp), %eax
imull -0x38(%rbp), %eax
movl -0x3c(%rbp), %ecx
imull -0x3c(%rbp), %ecx
addl %ecx, %eax
cvtsi2ss %eax, %xmm0
callq 0xaa30
movl -0x54(%rbp), %eax
cvttss2si %xmm0, %ecx
imull %ecx, %eax
movl -0x3c(%rbp), %ecx
movl %ecx, %edx
negl %edx
cmovnsl %edx, %ecx
shll %ecx
cltd
idivl %ecx
movl %eax, -0x48(%rbp)
movl $0x1, -0x4c(%rbp)
movl -0x4c(%rbp), %eax
cmpl -0x48(%rbp), %eax
jg 0x107a4a
movq -0x20(%rbp), %rdi
movl -0x28(%rbp), %esi
subl -0x4c(%rbp), %esi
movl -0x2c(%rbp), %edx
movl -0x30(%rbp), %ecx
subl -0x4c(%rbp), %ecx
movl -0x34(%rbp), %r8d
movl -0x14(%rbp), %r9d
callq 0x107670
movq -0x20(%rbp), %rdi
movl -0x28(%rbp), %esi
addl -0x4c(%rbp), %esi
movl -0x2c(%rbp), %edx
movl -0x30(%rbp), %ecx
addl -0x4c(%rbp), %ecx
movl -0x34(%rbp), %r8d
movl -0x14(%rbp), %r9d
callq 0x107670
movl -0x4c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x4c(%rbp)
jmp 0x1079f7
jmp 0x107a4c
jmp 0x107a4e
addq $0x60, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
|
ImageDrawLineEx:
push rbp
mov rbp, rsp
sub rsp, 60h
movlpd [rbp+var_8], xmm0
movlpd [rbp+var_10], xmm1
mov [rbp+var_14], edx
mov [rbp+var_20], rdi
mov [rbp+var_24], esi
movss xmm0, cs:dword_1A40F0
addss xmm0, dword ptr [rbp+var_8]
cvttss2si eax, xmm0
mov [rbp+var_28], eax
movss xmm0, cs:dword_1A40F0
addss xmm0, dword ptr [rbp+var_8+4]
cvttss2si eax, xmm0
mov [rbp+var_2C], eax
movss xmm0, cs:dword_1A40F0
addss xmm0, dword ptr [rbp+var_10]
cvttss2si eax, xmm0
mov [rbp+var_30], eax
movss xmm0, cs:dword_1A40F0
addss xmm0, dword ptr [rbp+var_10+4]
cvttss2si eax, xmm0
mov [rbp+var_34], eax
mov eax, [rbp+var_30]
sub eax, [rbp+var_28]
mov [rbp+var_38], eax
mov eax, [rbp+var_34]
sub eax, [rbp+var_2C]
mov [rbp+var_3C], eax
mov rdi, [rbp+var_20]
mov esi, [rbp+var_28]
mov edx, [rbp+var_2C]
mov ecx, [rbp+var_30]
mov r8d, [rbp+var_34]
mov r9d, [rbp+var_14]
call ImageDrawLine
cmp [rbp+var_38], 0
jz loc_1079A8
mov eax, [rbp+var_3C]
cdq
idiv [rbp+var_38]
mov ecx, eax
neg ecx
cmovns eax, ecx
cmp eax, 1
jge loc_1079A8
mov eax, [rbp+var_24]
sub eax, 1
mov [rbp+var_50], eax
mov eax, [rbp+var_38]
imul eax, [rbp+var_38]
mov ecx, [rbp+var_3C]
imul ecx, [rbp+var_3C]
add eax, ecx
cvtsi2ss xmm0, eax
call _sqrtf
mov eax, [rbp+var_50]
cvttss2si ecx, xmm0
imul eax, ecx
mov ecx, [rbp+var_38]
mov edx, ecx
neg edx
cmovns ecx, edx
shl ecx, 1
cdq
idiv ecx
mov [rbp+var_40], eax
mov [rbp+var_44], 1
loc_10794E:
mov eax, [rbp+var_44]
cmp eax, [rbp+var_40]
jg short loc_1079A3
mov rdi, [rbp+var_20]
mov esi, [rbp+var_28]
mov edx, [rbp+var_2C]
sub edx, [rbp+var_44]
mov ecx, [rbp+var_30]
mov r8d, [rbp+var_34]
sub r8d, [rbp+var_44]
mov r9d, [rbp+var_14]
call ImageDrawLine
mov rdi, [rbp+var_20]
mov esi, [rbp+var_28]
mov edx, [rbp+var_2C]
add edx, [rbp+var_44]
mov ecx, [rbp+var_30]
mov r8d, [rbp+var_34]
add r8d, [rbp+var_44]
mov r9d, [rbp+var_14]
call ImageDrawLine
mov eax, [rbp+var_44]
add eax, 1
mov [rbp+var_44], eax
jmp short loc_10794E
loc_1079A3:
jmp loc_107A4E
loc_1079A8:
cmp [rbp+var_3C], 0
jz loc_107A4C
mov eax, [rbp+var_24]
sub eax, 1
mov [rbp+var_54], eax
mov eax, [rbp+var_38]
imul eax, [rbp+var_38]
mov ecx, [rbp+var_3C]
imul ecx, [rbp+var_3C]
add eax, ecx
cvtsi2ss xmm0, eax
call _sqrtf
mov eax, [rbp+var_54]
cvttss2si ecx, xmm0
imul eax, ecx
mov ecx, [rbp+var_3C]
mov edx, ecx
neg edx
cmovns ecx, edx
shl ecx, 1
cdq
idiv ecx
mov [rbp+var_48], eax
mov [rbp+var_4C], 1
loc_1079F7:
mov eax, [rbp+var_4C]
cmp eax, [rbp+var_48]
jg short loc_107A4A
mov rdi, [rbp+var_20]
mov esi, [rbp+var_28]
sub esi, [rbp+var_4C]
mov edx, [rbp+var_2C]
mov ecx, [rbp+var_30]
sub ecx, [rbp+var_4C]
mov r8d, [rbp+var_34]
mov r9d, [rbp+var_14]
call ImageDrawLine
mov rdi, [rbp+var_20]
mov esi, [rbp+var_28]
add esi, [rbp+var_4C]
mov edx, [rbp+var_2C]
mov ecx, [rbp+var_30]
add ecx, [rbp+var_4C]
mov r8d, [rbp+var_34]
mov r9d, [rbp+var_14]
call ImageDrawLine
mov eax, [rbp+var_4C]
add eax, 1
mov [rbp+var_4C], eax
jmp short loc_1079F7
loc_107A4A:
jmp short $+2
loc_107A4C:
jmp short $+2
loc_107A4E:
add rsp, 60h
pop rbp
retn
|
long long ImageDrawLineEx(long long *a1, int a2, int a3, double a4, double a5)
{
long long result; // rax
double v6; // xmm0_8
int v7; // ecx
double v8; // xmm0_8
int v9; // ecx
int i; // [rsp+14h] [rbp-4Ch]
int v11; // [rsp+18h] [rbp-48h]
int j; // [rsp+1Ch] [rbp-44h]
int v13; // [rsp+20h] [rbp-40h]
int v14; // [rsp+24h] [rbp-3Ch]
int v15; // [rsp+28h] [rbp-38h]
int v16; // [rsp+2Ch] [rbp-34h]
int v17; // [rsp+30h] [rbp-30h]
int v18; // [rsp+34h] [rbp-2Ch]
int v19; // [rsp+38h] [rbp-28h]
v19 = (int)(float)(*(float *)&a4 + 0.5);
v18 = (int)(float)(*((float *)&a4 + 1) + 0.5);
v17 = (int)(float)(*(float *)&a5 + 0.5);
v16 = (int)(float)(*((float *)&a5 + 1) + 0.5);
v15 = v17 - v19;
v14 = v16 - v18;
result = ImageDrawLine(a1, v19, v18, v17, v16, a3);
if ( v17 == v19 )
goto LABEL_11;
result = (unsigned int)(v14 / v15);
if ( v14 / v15 <= 0 )
result = (unsigned int)-(v14 / v15);
if ( (int)result >= 1 )
{
LABEL_11:
if ( v14 )
{
v8 = sqrtf((float)(v14 * v14 + v15 * v15));
v9 = (int)(float)(*((float *)&a5 + 1) + 0.5) - v18;
if ( v14 <= 0 )
v9 = v18 - (int)(float)(*((float *)&a5 + 1) + 0.5);
v11 = (int)*(float *)&v8 * (a2 - 1) / (2 * v9);
for ( i = 1; ; ++i )
{
result = (unsigned int)i;
if ( i > v11 )
break;
ImageDrawLine(a1, v19 - i, v18, v17 - i, v16, a3);
ImageDrawLine(a1, i + v19, v18, i + v17, v16, a3);
}
}
}
else
{
v6 = sqrtf((float)(v14 * v14 + v15 * v15));
v7 = (int)(float)(*(float *)&a5 + 0.5) - v19;
if ( v15 <= 0 )
v7 = v19 - (int)(float)(*(float *)&a5 + 0.5);
v13 = (int)*(float *)&v6 * (a2 - 1) / (2 * v7);
for ( j = 1; ; ++j )
{
result = (unsigned int)j;
if ( j > v13 )
break;
ImageDrawLine(a1, v19, v18 - j, v17, v16 - j, a3);
ImageDrawLine(a1, v19, j + v18, v17, j + v16, a3);
}
}
return result;
}
| |||
64,375 |
ImageDrawLineEx
|
csit-sgu[P]mit-game-2025_1/Libraries/raylib/src/rtextures.c
|
void ImageDrawLineEx(Image *dst, Vector2 start, Vector2 end, int thick, Color color)
{
// Round start and end positions to nearest integer coordinates
int x1 = (int)(start.x + 0.5f);
int y1 = (int)(start.y + 0.5f);
int x2 = (int)(end.x + 0.5f);
int y2 = (int)(end.y + 0.5f);
// Calculate differences in x and y coordinates
int dx = x2 - x1;
int dy = y2 - y1;
// Draw the main line between (x1, y1) and (x2, y2)
ImageDrawLine(dst, x1, y1, x2, y2, color);
// Determine if the line is more horizontal or vertical
if (dx != 0 && abs(dy/dx) < 1)
{
// Line is more horizontal
// Calculate half the width of the line
int wy = (thick - 1)*(int)sqrtf((float)(dx*dx + dy*dy))/(2*abs(dx));
// Draw additional lines above and below the main line
for (int i = 1; i <= wy; i++)
{
ImageDrawLine(dst, x1, y1 - i, x2, y2 - i, color); // Draw above the main line
ImageDrawLine(dst, x1, y1 + i, x2, y2 + i, color); // Draw below the main line
}
}
else if (dy != 0)
{
// Line is more vertical or perfectly horizontal
// Calculate half the width of the line
int wx = (thick - 1)*(int)sqrtf((float)(dx*dx + dy*dy))/(2*abs(dy));
// Draw additional lines to the left and right of the main line
for (int i = 1; i <= wx; i++)
{
ImageDrawLine(dst, x1 - i, y1, x2 - i, y2, color); // Draw left of the main line
ImageDrawLine(dst, x1 + i, y1, x2 + i, y2, color); // Draw right of the main line
}
}
}
|
O2
|
c
|
ImageDrawLineEx:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movl %edx, %r9d
movl %esi, %ebp
movaps %xmm1, %xmm2
unpcklps %xmm0, %xmm2 # xmm2 = xmm2[0],xmm0[0],xmm2[1],xmm0[1]
shufps $0x55, %xmm0, %xmm0 # xmm0 = xmm0[1,1,1,1]
movss 0x342af(%rip), %xmm3 # 0xb96d8
addss %xmm3, %xmm0
cvttss2si %xmm0, %edx
addps 0x2fd18(%rip), %xmm2 # 0xb5150
cvttps2dq %xmm2, %xmm0
shufps $0x55, %xmm1, %xmm1 # xmm1 = xmm1[1,1,1,1]
addss %xmm3, %xmm1
cvttss2si %xmm1, %r8d
movd %xmm0, %r14d
pshufd $0x55, %xmm0, %xmm0 # xmm0 = xmm0[1,1,1,1]
movd %xmm0, %r15d
movl %r8d, %ebx
subl %edx, %ebx
movq %rdi, 0x30(%rsp)
movl %r15d, %esi
movq %rdx, 0x8(%rsp)
movl %r14d, %ecx
movq %r8, 0x20(%rsp)
movl %r9d, 0x1c(%rsp)
callq 0x852e3
movq %r14, 0x10(%rsp)
movl %r14d, %ecx
movq %r15, 0x28(%rsp)
subl %r15d, %ecx
je 0x8549b
movl %ebx, %eax
cltd
idivl %ecx
testl %eax, %eax
je 0x8556a
movq 0x20(%rsp), %rax
cmpl 0x8(%rsp), %eax
jne 0x854b5
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
decl %ebp
imull %ecx, %ecx
movl %ebx, %eax
imull %ebx, %eax
addl %ecx, %eax
cvtsi2ss %eax, %xmm0
sqrtss %xmm0, %xmm0
cvttss2si %xmm0, %eax
imull %ebp, %eax
movl %ebx, %ecx
negl %ecx
cmovsl %ebx, %ecx
addl %ecx, %ecx
cltd
idivl %ecx
xorl %r8d, %r8d
testl %eax, %eax
cmovgl %eax, %r8d
movq 0x28(%rsp), %r14
leal -0x1(%r14), %r15d
movq 0x10(%rsp), %rax
leal -0x1(%rax), %ecx
incl %r14d
incl %eax
movq %rax, 0x10(%rsp)
movq 0x8(%rsp), %rbp
movq 0x20(%rsp), %rbx
movl 0x1c(%rsp), %r12d
subl $0x1, %r8d
jb 0x854a6
movq 0x30(%rsp), %r13
movq %r13, %rdi
movl %r15d, %esi
movl %ebp, %edx
movl %r8d, (%rsp)
movl %ecx, 0x4(%rsp)
movl %ebx, %r8d
movl %r12d, %r9d
callq 0x852e3
movq %r13, %rdi
movl %r14d, %esi
movl %ebp, %edx
movq 0x10(%rsp), %r13
movl %r13d, %ecx
movl %ebx, %r8d
movl %r12d, %r9d
callq 0x852e3
movl 0x4(%rsp), %ecx
movl (%rsp), %r8d
decl %r15d
decl %ecx
incl %r14d
incl %r13d
movq %r13, 0x10(%rsp)
jmp 0x8550f
decl %ebp
movl %ecx, %eax
imull %ecx, %eax
imull %ebx, %ebx
addl %eax, %ebx
cvtsi2ss %ebx, %xmm0
sqrtss %xmm0, %xmm0
cvttss2si %xmm0, %eax
imull %ebp, %eax
movl %ecx, %esi
negl %esi
cmovsl %ecx, %esi
addl %esi, %esi
cltd
idivl %esi
xorl %ecx, %ecx
testl %eax, %eax
cmovgl %eax, %ecx
movq 0x8(%rsp), %rax
leal -0x1(%rax), %r15d
movq 0x20(%rsp), %rbp
leal -0x1(%rbp), %r8d
incl %eax
movq %rax, 0x8(%rsp)
incl %ebp
movq 0x28(%rsp), %r14
movq 0x10(%rsp), %r13
movl 0x1c(%rsp), %r12d
subl $0x1, %ecx
jb 0x854a6
movq 0x30(%rsp), %rbx
movq %rbx, %rdi
movl %r14d, %esi
movl %r15d, (%rsp)
movl (%rsp), %edx
movl %ecx, 0x4(%rsp)
movl %r13d, %ecx
movl %r8d, %r15d
movl %r12d, %r9d
callq 0x852e3
movq %rbx, %rdi
movl %r14d, %esi
movq 0x8(%rsp), %rbx
movl %ebx, %edx
movl %r13d, %ecx
movl %ebp, %r8d
movl %r12d, %r9d
callq 0x852e3
movl %r15d, %r8d
movl 0x4(%rsp), %ecx
movl (%rsp), %r15d
decl %r15d
decl %r8d
incl %ebx
movq %rbx, 0x8(%rsp)
incl %ebp
jmp 0x855c2
|
ImageDrawLineEx:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 38h
mov r9d, edx
mov ebp, esi
movaps xmm2, xmm1
unpcklps xmm2, xmm0
shufps xmm0, xmm0, 55h ; 'U'
movss xmm3, cs:dword_B96D8
addss xmm0, xmm3
cvttss2si edx, xmm0
addps xmm2, cs:xmmword_B5150
cvttps2dq xmm0, xmm2
shufps xmm1, xmm1, 55h ; 'U'
addss xmm1, xmm3
cvttss2si r8d, xmm1
movd r14d, xmm0
pshufd xmm0, xmm0, 55h ; 'U'
movd r15d, xmm0
mov ebx, r8d
sub ebx, edx
mov [rsp+68h+var_38], rdi
mov esi, r15d
mov [rsp+68h+var_60], rdx
mov ecx, r14d
mov [rsp+68h+var_48], r8
mov [rsp+68h+var_4C], r9d
call ImageDrawLine
mov [rsp+68h+var_58], r14
mov ecx, r14d
mov [rsp+68h+var_40], r15
sub ecx, r15d
jz short loc_8549B
mov eax, ebx
cdq
idiv ecx
test eax, eax
jz loc_8556A
loc_8549B:
mov rax, [rsp+68h+var_48]
cmp eax, dword ptr [rsp+68h+var_60]
jnz short loc_854B5
loc_854A6:
add rsp, 38h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_854B5:
dec ebp
imul ecx, ecx
mov eax, ebx
imul eax, ebx
add eax, ecx
cvtsi2ss xmm0, eax
sqrtss xmm0, xmm0
cvttss2si eax, xmm0
imul eax, ebp
mov ecx, ebx
neg ecx
cmovs ecx, ebx
add ecx, ecx
cdq
idiv ecx
xor r8d, r8d
test eax, eax
cmovg r8d, eax
mov r14, [rsp+68h+var_40]
lea r15d, [r14-1]
mov rax, [rsp+68h+var_58]
lea ecx, [rax-1]
inc r14d
inc eax
mov [rsp+68h+var_58], rax
mov rbp, [rsp+68h+var_60]
mov rbx, [rsp+68h+var_48]
mov r12d, [rsp+68h+var_4C]
loc_8550F:
sub r8d, 1
jb short loc_854A6
mov r13, [rsp+68h+var_38]
mov rdi, r13
mov esi, r15d
mov edx, ebp
mov [rsp+68h+var_68], r8d
mov [rsp+68h+var_64], ecx
mov r8d, ebx
mov r9d, r12d
call ImageDrawLine
mov rdi, r13
mov esi, r14d
mov edx, ebp
mov r13, [rsp+68h+var_58]
mov ecx, r13d
mov r8d, ebx
mov r9d, r12d
call ImageDrawLine
mov ecx, [rsp+68h+var_64]
mov r8d, [rsp+68h+var_68]
dec r15d
dec ecx
inc r14d
inc r13d
mov [rsp+68h+var_58], r13
jmp short loc_8550F
loc_8556A:
dec ebp
mov eax, ecx
imul eax, ecx
imul ebx, ebx
add ebx, eax
cvtsi2ss xmm0, ebx
sqrtss xmm0, xmm0
cvttss2si eax, xmm0
imul eax, ebp
mov esi, ecx
neg esi
cmovs esi, ecx
add esi, esi
cdq
idiv esi
xor ecx, ecx
test eax, eax
cmovg ecx, eax
mov rax, [rsp+68h+var_60]
lea r15d, [rax-1]
mov rbp, [rsp+68h+var_48]
lea r8d, [rbp-1]
inc eax
mov [rsp+68h+var_60], rax
inc ebp
mov r14, [rsp+68h+var_40]
mov r13, [rsp+68h+var_58]
mov r12d, [rsp+68h+var_4C]
loc_855C2:
sub ecx, 1
jb loc_854A6
mov rbx, [rsp+68h+var_38]
mov rdi, rbx
mov esi, r14d
mov [rsp+68h+var_68], r15d
mov edx, [rsp+68h+var_68]
mov [rsp+68h+var_64], ecx
mov ecx, r13d
mov r15d, r8d
mov r9d, r12d
call ImageDrawLine
mov rdi, rbx
mov esi, r14d
mov rbx, [rsp+68h+var_60]
mov edx, ebx
mov ecx, r13d
mov r8d, ebp
mov r9d, r12d
call ImageDrawLine
mov r8d, r15d
mov ecx, [rsp+68h+var_64]
mov r15d, [rsp+68h+var_68]
dec r15d
dec r8d
inc ebx
mov [rsp+68h+var_60], rbx
inc ebp
jmp short loc_855C2
|
char ImageDrawLineEx(long long *a1, int a2, unsigned int a3, __m128 a4, __m128 a5)
{
int v6; // edx
__m128i v7; // xmm0
int v8; // r8d
int v9; // r14d
int v10; // r15d
int v11; // ebx
int v12; // ecx
char result; // al
int v14; // eax
int v15; // ecx
int v16; // eax
int v17; // r8d
int v18; // r15d
int v19; // ecx
int v20; // r14d
bool v21; // cf
int v22; // r8d
int v23; // eax
int v24; // esi
int v25; // eax
int v26; // ecx
int v27; // r15d
int v28; // r8d
int j; // ebp
int v30; // ecx
int v31; // edx
int v32; // r15d
int v33; // r8d
int v34; // [rsp+0h] [rbp-68h]
int v35; // [rsp+0h] [rbp-68h]
int v36; // [rsp+4h] [rbp-64h]
int v37; // [rsp+4h] [rbp-64h]
int v38; // [rsp+8h] [rbp-60h]
int v39; // [rsp+8h] [rbp-60h]
int v40; // [rsp+10h] [rbp-58h]
int i; // [rsp+10h] [rbp-58h]
unsigned int v42; // [rsp+1Ch] [rbp-4Ch]
int v43; // [rsp+20h] [rbp-48h]
int v44; // [rsp+28h] [rbp-40h]
v6 = (int)(float)(_mm_shuffle_ps(a4, a4, 85).m128_f32[0] + 0.5);
v7 = _mm_cvttps_epi32(_mm_add_ps(_mm_unpacklo_ps(a5, a4), (__m128)xmmword_B5150));
v8 = (int)(float)(_mm_shuffle_ps(a5, a5, 85).m128_f32[0] + 0.5);
v9 = _mm_cvtsi128_si32(v7);
v10 = _mm_cvtsi128_si32(_mm_shuffle_epi32(v7, 85));
v11 = v8 - v6;
v38 = v6;
v43 = v8;
v42 = a3;
ImageDrawLine(a1, v10, v6, v9, v8, a3);
v40 = v9;
v44 = v10;
v12 = v9 - v10;
if ( v9 == v10 || v11 / v12 )
{
result = v43;
if ( v43 != v38 )
{
v14 = (a2 - 1) * (int)fsqrt((float)(v12 * v12 + v11 * v11));
v15 = -v11;
if ( v11 > 0 )
v15 = v11;
v16 = v14 / (2 * v15);
v17 = 0;
if ( v16 > 0 )
v17 = v16;
v18 = v10 - 1;
v19 = v9 - 1;
v20 = v44 + 1;
result = v40 + 1;
for ( i = v40 + 1; ; ++i )
{
v21 = v17 == 0;
v22 = v17 - 1;
if ( v21 )
break;
v34 = v22;
v36 = v19;
ImageDrawLine(a1, v18, v38, v19, v43, v42);
result = ImageDrawLine(a1, v20, v38, i, v43, v42);
v17 = v34;
--v18;
v19 = v36 - 1;
++v20;
}
}
}
else
{
v23 = (a2 - 1) * (int)fsqrt((float)(v12 * v12 + v11 * v11));
v24 = v10 - v9;
if ( v12 > 0 )
v24 = v9 - v10;
v25 = v23 / (2 * v24);
v26 = 0;
if ( v25 > 0 )
v26 = v25;
v27 = v38 - 1;
v28 = v43 - 1;
result = v38 + 1;
v39 = v38 + 1;
for ( j = v43 + 1; ; ++j )
{
v21 = v26 == 0;
v30 = v26 - 1;
if ( v21 )
break;
v35 = v27;
v31 = v27;
v37 = v30;
v32 = v28;
ImageDrawLine(a1, v44, v31, v9, v28, v42);
result = ImageDrawLine(a1, v44, v39, v9, j, v42);
v33 = v32;
v26 = v37;
v27 = v35 - 1;
v28 = v33 - 1;
++v39;
}
}
return result;
}
|
ImageDrawLineEx:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x38
MOV R9D,EDX
MOV EBP,ESI
MOVAPS XMM2,XMM1
UNPCKLPS XMM2,XMM0
SHUFPS XMM0,XMM0,0x55
MOVSS XMM3,dword ptr [0x001b96d8]
ADDSS XMM0,XMM3
CVTTSS2SI EDX,XMM0
ADDPS XMM2,xmmword ptr [0x001b5150]
CVTTPS2DQ XMM0,XMM2
SHUFPS XMM1,XMM1,0x55
ADDSS XMM1,XMM3
CVTTSS2SI R8D,XMM1
MOVD R14D,XMM0
PSHUFD XMM0,XMM0,0x55
MOVD R15D,XMM0
MOV EBX,R8D
SUB EBX,EDX
MOV qword ptr [RSP + 0x30],RDI
MOV ESI,R15D
MOV qword ptr [RSP + 0x8],RDX
MOV ECX,R14D
MOV qword ptr [RSP + 0x20],R8
MOV dword ptr [RSP + 0x1c],R9D
CALL 0x001852e3
MOV qword ptr [RSP + 0x10],R14
MOV ECX,R14D
MOV qword ptr [RSP + 0x28],R15
SUB ECX,R15D
JZ 0x0018549b
MOV EAX,EBX
CDQ
IDIV ECX
TEST EAX,EAX
JZ 0x0018556a
LAB_0018549b:
MOV RAX,qword ptr [RSP + 0x20]
CMP EAX,dword ptr [RSP + 0x8]
JNZ 0x001854b5
LAB_001854a6:
ADD RSP,0x38
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_001854b5:
DEC EBP
IMUL ECX,ECX
MOV EAX,EBX
IMUL EAX,EBX
ADD EAX,ECX
CVTSI2SS XMM0,EAX
SQRTSS XMM0,XMM0
CVTTSS2SI EAX,XMM0
IMUL EAX,EBP
MOV ECX,EBX
NEG ECX
CMOVS ECX,EBX
ADD ECX,ECX
CDQ
IDIV ECX
XOR R8D,R8D
TEST EAX,EAX
CMOVG R8D,EAX
MOV R14,qword ptr [RSP + 0x28]
LEA R15D,[R14 + -0x1]
MOV RAX,qword ptr [RSP + 0x10]
LEA ECX,[RAX + -0x1]
INC R14D
INC EAX
MOV qword ptr [RSP + 0x10],RAX
MOV RBP,qword ptr [RSP + 0x8]
MOV RBX,qword ptr [RSP + 0x20]
MOV R12D,dword ptr [RSP + 0x1c]
LAB_0018550f:
SUB R8D,0x1
JC 0x001854a6
MOV R13,qword ptr [RSP + 0x30]
MOV RDI,R13
MOV ESI,R15D
MOV EDX,EBP
MOV dword ptr [RSP],R8D
MOV dword ptr [RSP + 0x4],ECX
MOV R8D,EBX
MOV R9D,R12D
CALL 0x001852e3
MOV RDI,R13
MOV ESI,R14D
MOV EDX,EBP
MOV R13,qword ptr [RSP + 0x10]
MOV ECX,R13D
MOV R8D,EBX
MOV R9D,R12D
CALL 0x001852e3
MOV ECX,dword ptr [RSP + 0x4]
MOV R8D,dword ptr [RSP]
DEC R15D
DEC ECX
INC R14D
INC R13D
MOV qword ptr [RSP + 0x10],R13
JMP 0x0018550f
LAB_0018556a:
DEC EBP
MOV EAX,ECX
IMUL EAX,ECX
IMUL EBX,EBX
ADD EBX,EAX
CVTSI2SS XMM0,EBX
SQRTSS XMM0,XMM0
CVTTSS2SI EAX,XMM0
IMUL EAX,EBP
MOV ESI,ECX
NEG ESI
CMOVS ESI,ECX
ADD ESI,ESI
CDQ
IDIV ESI
XOR ECX,ECX
TEST EAX,EAX
CMOVG ECX,EAX
MOV RAX,qword ptr [RSP + 0x8]
LEA R15D,[RAX + -0x1]
MOV RBP,qword ptr [RSP + 0x20]
LEA R8D,[RBP + -0x1]
INC EAX
MOV qword ptr [RSP + 0x8],RAX
INC EBP
MOV R14,qword ptr [RSP + 0x28]
MOV R13,qword ptr [RSP + 0x10]
MOV R12D,dword ptr [RSP + 0x1c]
LAB_001855c2:
SUB ECX,0x1
JC 0x001854a6
MOV RBX,qword ptr [RSP + 0x30]
MOV RDI,RBX
MOV ESI,R14D
MOV dword ptr [RSP],R15D
MOV EDX,dword ptr [RSP]
MOV dword ptr [RSP + 0x4],ECX
MOV ECX,R13D
MOV R15D,R8D
MOV R9D,R12D
CALL 0x001852e3
MOV RDI,RBX
MOV ESI,R14D
MOV RBX,qword ptr [RSP + 0x8]
MOV EDX,EBX
MOV ECX,R13D
MOV R8D,EBP
MOV R9D,R12D
CALL 0x001852e3
MOV R8D,R15D
MOV ECX,dword ptr [RSP + 0x4]
MOV R15D,dword ptr [RSP]
DEC R15D
DEC R8D
INC EBX
MOV qword ptr [RSP + 0x8],RBX
INC EBP
JMP 0x001855c2
|
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
void ImageDrawLineEx(int8 param_1,int8 param_2,int8 param_3,int param_4,
int4 param_5)
{
ulong uVar1;
int iVar2;
int iVar3;
ulong uVar4;
int iVar5;
int iVar6;
int iVar7;
int iVar8;
int iVar9;
iVar5 = (int)((float)((ulong)param_1 >> 0x20) + DAT_001b96d8);
iVar8 = (int)((float)param_2 + _DAT_001b5150);
iVar9 = (int)((float)param_1 + _UNK_001b5154);
iVar7 = (int)((float)((ulong)param_2 >> 0x20) + DAT_001b96d8);
iVar6 = iVar7 - iVar5;
ImageDrawLine(param_3,iVar9,iVar5,iVar8);
iVar2 = iVar8 - iVar9;
if ((iVar2 == 0) || (iVar6 / iVar2 != 0)) {
if (iVar7 != iVar5) {
iVar3 = -iVar6;
if (0 < iVar6) {
iVar3 = iVar6;
}
uVar1 = (long)((int)SQRT((float)(iVar6 * iVar6 + iVar2 * iVar2)) * (param_4 + -1)) /
(long)(iVar3 * 2);
uVar4 = 0;
iVar6 = iVar9;
iVar2 = iVar8;
if (0 < (int)uVar1) {
uVar4 = uVar1 & 0xffffffff;
}
while( true ) {
iVar8 = iVar8 + -1;
iVar9 = iVar9 + -1;
if ((int)uVar4 == 0) break;
ImageDrawLine(param_3,iVar9,iVar5,iVar8,iVar7,param_5);
ImageDrawLine(param_3,iVar6 + 1,iVar5,iVar2 + 1,iVar7,param_5);
uVar4 = (ulong)((int)uVar4 - 1);
iVar6 = iVar6 + 1;
iVar2 = iVar2 + 1;
}
}
}
else {
iVar3 = -iVar2;
if (0 < iVar2) {
iVar3 = iVar2;
}
uVar1 = (long)((int)SQRT((float)(iVar6 * iVar6 + iVar2 * iVar2)) * (param_4 + -1)) /
(long)(iVar3 * 2);
uVar4 = 0;
iVar2 = iVar7;
iVar6 = iVar5;
if (0 < (int)uVar1) {
uVar4 = uVar1 & 0xffffffff;
}
while( true ) {
iVar5 = iVar5 + -1;
iVar7 = iVar7 + 1;
if ((int)uVar4 == 0) break;
ImageDrawLine(param_3,iVar9,iVar5,iVar8,iVar2 + -1,param_5);
ImageDrawLine(param_3,iVar9,iVar6 + 1,iVar8,iVar7,param_5);
uVar4 = (ulong)((int)uVar4 - 1);
iVar2 = iVar2 + -1;
iVar6 = iVar6 + 1;
}
}
return;
}
|
|
64,376 |
ImageDrawLineEx
|
csit-sgu[P]mit-game-2025_1/Libraries/raylib/src/rtextures.c
|
void ImageDrawLineEx(Image *dst, Vector2 start, Vector2 end, int thick, Color color)
{
// Round start and end positions to nearest integer coordinates
int x1 = (int)(start.x + 0.5f);
int y1 = (int)(start.y + 0.5f);
int x2 = (int)(end.x + 0.5f);
int y2 = (int)(end.y + 0.5f);
// Calculate differences in x and y coordinates
int dx = x2 - x1;
int dy = y2 - y1;
// Draw the main line between (x1, y1) and (x2, y2)
ImageDrawLine(dst, x1, y1, x2, y2, color);
// Determine if the line is more horizontal or vertical
if (dx != 0 && abs(dy/dx) < 1)
{
// Line is more horizontal
// Calculate half the width of the line
int wy = (thick - 1)*(int)sqrtf((float)(dx*dx + dy*dy))/(2*abs(dx));
// Draw additional lines above and below the main line
for (int i = 1; i <= wy; i++)
{
ImageDrawLine(dst, x1, y1 - i, x2, y2 - i, color); // Draw above the main line
ImageDrawLine(dst, x1, y1 + i, x2, y2 + i, color); // Draw below the main line
}
}
else if (dy != 0)
{
// Line is more vertical or perfectly horizontal
// Calculate half the width of the line
int wx = (thick - 1)*(int)sqrtf((float)(dx*dx + dy*dy))/(2*abs(dy));
// Draw additional lines to the left and right of the main line
for (int i = 1; i <= wx; i++)
{
ImageDrawLine(dst, x1 - i, y1, x2 - i, y2, color); // Draw left of the main line
ImageDrawLine(dst, x1 + i, y1, x2 + i, y2, color); // Draw right of the main line
}
}
}
|
O3
|
c
|
ImageDrawLineEx:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movl %edx, %r9d
movl %esi, 0x8(%rsp)
movaps %xmm1, %xmm2
unpcklps %xmm0, %xmm2 # xmm2 = xmm2[0],xmm0[0],xmm2[1],xmm0[1]
shufps $0x55, %xmm0, %xmm0 # xmm0 = xmm0[1,1,1,1]
movss 0x39da1(%rip), %xmm3 # 0xd3b58
addss %xmm3, %xmm0
cvttss2si %xmm0, %edx
addps 0x3539a(%rip), %xmm2 # 0xcf160
cvttps2dq %xmm2, %xmm0
shufps $0x55, %xmm1, %xmm1 # xmm1 = xmm1[1,1,1,1]
addss %xmm3, %xmm1
cvttss2si %xmm1, %r12d
movd %xmm0, %ebp
pshufd $0x55, %xmm0, %xmm0 # xmm0 = xmm0[1,1,1,1]
movd %xmm0, %r13d
movl %r12d, %ebx
subl %edx, %ebx
movq %rdi, %r15
movl %r13d, %esi
movq %rdx, 0x10(%rsp)
movl %ebp, %ecx
movl %r12d, %r8d
movl %r9d, %r14d
callq 0x99c40
movq %rbp, 0x18(%rsp)
movl %ebp, %ecx
subl %r13d, %ecx
je 0x99e1b
movl %ebx, %eax
cltd
idivl %ecx
testl %eax, %eax
je 0x99ed9
movq 0x10(%rsp), %r9
cmpl %r9d, %r12d
je 0x99f86
imull %ecx, %ecx
movl %ebx, %eax
imull %ebx, %eax
addl %ecx, %eax
xorps %xmm0, %xmm0
cvtsi2ss %eax, %xmm0
sqrtss %xmm0, %xmm0
cvttss2si %xmm0, %eax
movl 0x8(%rsp), %ecx
decl %ecx
imull %ecx, %eax
movl %ebx, %ecx
negl %ecx
cmovsl %ebx, %ecx
addl %ecx, %ecx
cltd
idivl %ecx
testl %eax, %eax
jle 0x99f86
movq %r12, %r8
movl %r14d, %r12d
movq %r15, %rbp
movl %eax, %ebx
movq 0x18(%rsp), %rcx
leal 0x1(%rcx), %r14d
leal 0x1(%r13), %r15d
decl %ecx
decl %r13d
movq %r13, 0x8(%rsp)
movq %rbp, %rdi
movl %r13d, %esi
movl %r9d, %edx
movq %rcx, 0x18(%rsp)
movq %r8, %r13
movl %r12d, %r9d
callq 0x99c40
movq %rbp, %rdi
movl %r15d, %esi
movq 0x10(%rsp), %rdx
movl %r14d, %ecx
movl %r13d, %r8d
movl %r12d, %r9d
callq 0x99c40
movq %r13, %r8
movq 0x18(%rsp), %rcx
movq 0x8(%rsp), %r13
movq 0x10(%rsp), %r9
incl %r14d
incl %r15d
decl %ecx
decl %r13d
decl %ebx
jne 0x99e7c
jmp 0x99f86
movl %ecx, %eax
imull %ecx, %eax
imull %ebx, %ebx
addl %eax, %ebx
xorps %xmm0, %xmm0
cvtsi2ss %ebx, %xmm0
sqrtss %xmm0, %xmm0
cvttss2si %xmm0, %eax
movl 0x8(%rsp), %edx
decl %edx
imull %edx, %eax
movl %ecx, %esi
negl %esi
cmovsl %ecx, %esi
addl %esi, %esi
cltd
idivl %esi
testl %eax, %eax
movq 0x10(%rsp), %rdx
jle 0x99f86
movl %r14d, %ebx
movq %r15, %rcx
movq %r12, %rsi
leal 0x1(%r12), %r14d
leal 0x1(%rdx), %r15d
decl %esi
decl %edx
movq 0x18(%rsp), %rbp
movq %rsi, 0x8(%rsp)
movl %eax, 0x24(%rsp)
movq %rdx, 0x10(%rsp)
movq %rcx, %r12
movq %rcx, %rdi
movl %r13d, %esi
movl %ebp, %ecx
movq 0x8(%rsp), %r8
movl %ebx, %r9d
callq 0x99c40
movq %r12, %rdi
movl %r13d, %esi
movl %r15d, %edx
movl %ebp, %ecx
movl %r14d, %r8d
movl %ebx, %r9d
callq 0x99c40
movq 0x8(%rsp), %rsi
movq %r12, %rcx
movl 0x24(%rsp), %eax
movq 0x10(%rsp), %rdx
incl %r14d
incl %r15d
decl %esi
decl %edx
decl %eax
jne 0x99f2b
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
|
ImageDrawLineEx:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 28h
mov r9d, edx
mov dword ptr [rsp+58h+var_50], esi
movaps xmm2, xmm1
unpcklps xmm2, xmm0
shufps xmm0, xmm0, 55h ; 'U'
movss xmm3, cs:dword_D3B58
addss xmm0, xmm3
cvttss2si edx, xmm0
addps xmm2, cs:xmmword_CF160
cvttps2dq xmm0, xmm2
shufps xmm1, xmm1, 55h ; 'U'
addss xmm1, xmm3
cvttss2si r12d, xmm1
movd ebp, xmm0
pshufd xmm0, xmm0, 55h ; 'U'
movd r13d, xmm0
mov ebx, r12d
sub ebx, edx
mov r15, rdi
mov esi, r13d
mov [rsp+58h+var_48], rdx
mov ecx, ebp
mov r8d, r12d
mov r14d, r9d
call ImageDrawLine
mov [rsp+58h+var_40], rbp
mov ecx, ebp
sub ecx, r13d
jz short loc_99E1B
mov eax, ebx
cdq
idiv ecx
test eax, eax
jz loc_99ED9
loc_99E1B:
mov r9, [rsp+58h+var_48]
cmp r12d, r9d
jz loc_99F86
imul ecx, ecx
mov eax, ebx
imul eax, ebx
add eax, ecx
xorps xmm0, xmm0
cvtsi2ss xmm0, eax
sqrtss xmm0, xmm0
cvttss2si eax, xmm0
mov ecx, dword ptr [rsp+58h+var_50]
dec ecx
imul eax, ecx
mov ecx, ebx
neg ecx
cmovs ecx, ebx
add ecx, ecx
cdq
idiv ecx
test eax, eax
jle loc_99F86
mov r8, r12
mov r12d, r14d
mov rbp, r15
mov ebx, eax
mov rcx, [rsp+58h+var_40]
lea r14d, [rcx+1]
lea r15d, [r13+1]
dec ecx
dec r13d
loc_99E7C:
mov [rsp+58h+var_50], r13
mov rdi, rbp
mov esi, r13d
mov edx, r9d
mov [rsp+58h+var_40], rcx
mov r13, r8
mov r9d, r12d
call ImageDrawLine
mov rdi, rbp
mov esi, r15d
mov rdx, [rsp+58h+var_48]
mov ecx, r14d
mov r8d, r13d
mov r9d, r12d
call ImageDrawLine
mov r8, r13
mov rcx, [rsp+58h+var_40]
mov r13, [rsp+58h+var_50]
mov r9, [rsp+58h+var_48]
inc r14d
inc r15d
dec ecx
dec r13d
dec ebx
jnz short loc_99E7C
jmp loc_99F86
loc_99ED9:
mov eax, ecx
imul eax, ecx
imul ebx, ebx
add ebx, eax
xorps xmm0, xmm0
cvtsi2ss xmm0, ebx
sqrtss xmm0, xmm0
cvttss2si eax, xmm0
mov edx, dword ptr [rsp+58h+var_50]
dec edx
imul eax, edx
mov esi, ecx
neg esi
cmovs esi, ecx
add esi, esi
cdq
idiv esi
test eax, eax
mov rdx, [rsp+58h+var_48]
jle short loc_99F86
mov ebx, r14d
mov rcx, r15
mov rsi, r12
lea r14d, [r12+1]
lea r15d, [rdx+1]
dec esi
dec edx
mov rbp, [rsp+58h+var_40]
loc_99F2B:
mov [rsp+58h+var_50], rsi
mov [rsp+58h+var_34], eax
mov [rsp+58h+var_48], rdx
mov r12, rcx
mov rdi, rcx
mov esi, r13d
mov ecx, ebp
mov r8, [rsp+58h+var_50]
mov r9d, ebx
call ImageDrawLine
mov rdi, r12
mov esi, r13d
mov edx, r15d
mov ecx, ebp
mov r8d, r14d
mov r9d, ebx
call ImageDrawLine
mov rsi, [rsp+58h+var_50]
mov rcx, r12
mov eax, [rsp+58h+var_34]
mov rdx, [rsp+58h+var_48]
inc r14d
inc r15d
dec esi
dec edx
dec eax
jnz short loc_99F2B
loc_99F86:
add rsp, 28h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
|
long long ImageDrawLineEx(long long *a1, int a2, unsigned int a3, __m128 a4, __m128 a5)
{
int v6; // edx
__m128i v7; // xmm0
float v8; // xmm1_4
int v9; // r12d
int v10; // ebp
unsigned int v11; // r13d
int v12; // ebx
unsigned int v13; // r14d
long long result; // rax
int v15; // ecx
int v16; // r9d
int v17; // eax
int v18; // ecx
long long v19; // r8
unsigned int v20; // r12d
int v21; // ebx
int v22; // r14d
unsigned int v23; // r15d
int v24; // ecx
unsigned int v25; // r13d
long long v26; // rsi
long long v27; // r13
int v28; // eax
unsigned int v29; // esi
unsigned int v30; // ebx
long long *v31; // rcx
int v32; // r14d
int v33; // r15d
int v34; // esi
int v35; // edx
long long *v36; // r12
unsigned int v37; // [rsp+8h] [rbp-50h]
int v38; // [rsp+10h] [rbp-48h]
int v39; // [rsp+10h] [rbp-48h]
int v40; // [rsp+18h] [rbp-40h]
int v41; // [rsp+24h] [rbp-34h]
v6 = (int)(float)(_mm_shuffle_ps(a4, a4, 85).m128_f32[0] + 0.5);
v7 = _mm_cvttps_epi32(_mm_add_ps(_mm_unpacklo_ps(a5, a4), (__m128)xmmword_CF160));
v8 = _mm_shuffle_ps(a5, a5, 85).m128_f32[0] + 0.5;
v9 = (int)v8;
v10 = _mm_cvtsi128_si32(v7);
v11 = _mm_cvtsi128_si32(_mm_shuffle_epi32(v7, 85));
v12 = (int)v8 - v6;
v38 = v6;
v13 = a3;
result = ImageDrawLine(a1, v11, v6, v10, (int)v8, a3);
v15 = v10 - v11;
if ( v10 == v11 || (result = (unsigned int)(v12 / v15), (_DWORD)result) )
{
v16 = v38;
if ( v9 != v38 )
{
v17 = (a2 - 1) * (int)fsqrt((float)(v15 * v15 + v12 * v12));
v18 = -v12;
if ( v12 > 0 )
v18 = v12;
result = (unsigned int)(v17 / (2 * v18));
if ( (int)result > 0 )
{
v19 = (unsigned int)(int)v8;
v20 = v13;
v21 = result;
v22 = v10 + 1;
v23 = v11 + 1;
v24 = v10 - 1;
v25 = v11 - 1;
do
{
v37 = v25;
v26 = v25;
v40 = v24;
v27 = v19;
ImageDrawLine(a1, v26, v16, v24, v19, v20);
result = ImageDrawLine(a1, v23, v38, v22, v27, v20);
v19 = v27;
v16 = v38;
++v22;
++v23;
v24 = v40 - 1;
v25 = v37 - 1;
--v21;
}
while ( v21 );
}
}
}
else
{
v28 = (a2 - 1) * (int)fsqrt((float)(v15 * v15 + v12 * v12));
v29 = v11 - v10;
if ( v15 > 0 )
v29 = v10 - v11;
result = (unsigned int)(v28 / (int)(2 * v29));
if ( (int)result > 0 )
{
v30 = v13;
v31 = a1;
v32 = v9 + 1;
v33 = v38 + 1;
v34 = v9 - 1;
v35 = v38 - 1;
do
{
v41 = result;
v39 = v35;
v36 = v31;
ImageDrawLine(v31, v11, v35, v10, v34, v30);
ImageDrawLine(v36, v11, v33, v10, v32, v30);
v31 = v36;
++v32;
++v33;
--v34;
v35 = v39 - 1;
result = (unsigned int)(v41 - 1);
}
while ( v41 != 1 );
}
}
return result;
}
|
ImageDrawLineEx:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x28
MOV R9D,EDX
MOV dword ptr [RSP + 0x8],ESI
MOVAPS XMM2,XMM1
UNPCKLPS XMM2,XMM0
SHUFPS XMM0,XMM0,0x55
MOVSS XMM3,dword ptr [0x001d3b58]
ADDSS XMM0,XMM3
CVTTSS2SI EDX,XMM0
ADDPS XMM2,xmmword ptr [0x001cf160]
CVTTPS2DQ XMM0,XMM2
SHUFPS XMM1,XMM1,0x55
ADDSS XMM1,XMM3
CVTTSS2SI R12D,XMM1
MOVD EBP,XMM0
PSHUFD XMM0,XMM0,0x55
MOVD R13D,XMM0
MOV EBX,R12D
SUB EBX,EDX
MOV R15,RDI
MOV ESI,R13D
MOV qword ptr [RSP + 0x10],RDX
MOV ECX,EBP
MOV R8D,R12D
MOV R14D,R9D
CALL 0x00199c40
MOV qword ptr [RSP + 0x18],RBP
MOV ECX,EBP
SUB ECX,R13D
JZ 0x00199e1b
MOV EAX,EBX
CDQ
IDIV ECX
TEST EAX,EAX
JZ 0x00199ed9
LAB_00199e1b:
MOV R9,qword ptr [RSP + 0x10]
CMP R12D,R9D
JZ 0x00199f86
IMUL ECX,ECX
MOV EAX,EBX
IMUL EAX,EBX
ADD EAX,ECX
XORPS XMM0,XMM0
CVTSI2SS XMM0,EAX
SQRTSS XMM0,XMM0
CVTTSS2SI EAX,XMM0
MOV ECX,dword ptr [RSP + 0x8]
DEC ECX
IMUL EAX,ECX
MOV ECX,EBX
NEG ECX
CMOVS ECX,EBX
ADD ECX,ECX
CDQ
IDIV ECX
TEST EAX,EAX
JLE 0x00199f86
MOV R8,R12
MOV R12D,R14D
MOV RBP,R15
MOV EBX,EAX
MOV RCX,qword ptr [RSP + 0x18]
LEA R14D,[RCX + 0x1]
LEA R15D,[R13 + 0x1]
DEC ECX
DEC R13D
LAB_00199e7c:
MOV qword ptr [RSP + 0x8],R13
MOV RDI,RBP
MOV ESI,R13D
MOV EDX,R9D
MOV qword ptr [RSP + 0x18],RCX
MOV R13,R8
MOV R9D,R12D
CALL 0x00199c40
MOV RDI,RBP
MOV ESI,R15D
MOV RDX,qword ptr [RSP + 0x10]
MOV ECX,R14D
MOV R8D,R13D
MOV R9D,R12D
CALL 0x00199c40
MOV R8,R13
MOV RCX,qword ptr [RSP + 0x18]
MOV R13,qword ptr [RSP + 0x8]
MOV R9,qword ptr [RSP + 0x10]
INC R14D
INC R15D
DEC ECX
DEC R13D
DEC EBX
JNZ 0x00199e7c
JMP 0x00199f86
LAB_00199ed9:
MOV EAX,ECX
IMUL EAX,ECX
IMUL EBX,EBX
ADD EBX,EAX
XORPS XMM0,XMM0
CVTSI2SS XMM0,EBX
SQRTSS XMM0,XMM0
CVTTSS2SI EAX,XMM0
MOV EDX,dword ptr [RSP + 0x8]
DEC EDX
IMUL EAX,EDX
MOV ESI,ECX
NEG ESI
CMOVS ESI,ECX
ADD ESI,ESI
CDQ
IDIV ESI
TEST EAX,EAX
MOV RDX,qword ptr [RSP + 0x10]
JLE 0x00199f86
MOV EBX,R14D
MOV RCX,R15
MOV RSI,R12
LEA R14D,[R12 + 0x1]
LEA R15D,[RDX + 0x1]
DEC ESI
DEC EDX
MOV RBP,qword ptr [RSP + 0x18]
LAB_00199f2b:
MOV qword ptr [RSP + 0x8],RSI
MOV dword ptr [RSP + 0x24],EAX
MOV qword ptr [RSP + 0x10],RDX
MOV R12,RCX
MOV RDI,RCX
MOV ESI,R13D
MOV ECX,EBP
MOV R8,qword ptr [RSP + 0x8]
MOV R9D,EBX
CALL 0x00199c40
MOV RDI,R12
MOV ESI,R13D
MOV EDX,R15D
MOV ECX,EBP
MOV R8D,R14D
MOV R9D,EBX
CALL 0x00199c40
MOV RSI,qword ptr [RSP + 0x8]
MOV RCX,R12
MOV EAX,dword ptr [RSP + 0x24]
MOV RDX,qword ptr [RSP + 0x10]
INC R14D
INC R15D
DEC ESI
DEC EDX
DEC EAX
JNZ 0x00199f2b
LAB_00199f86:
ADD RSP,0x28
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
void ImageDrawLineEx(int8 param_1,int8 param_2,int8 param_3,int param_4,
int4 param_5)
{
ulong uVar1;
int iVar2;
int iVar3;
int iVar4;
int iVar5;
uint uVar6;
ulong uVar7;
int iVar8;
int iVar9;
int iVar10;
iVar4 = (int)((float)((ulong)param_1 >> 0x20) + DAT_001d3b58);
iVar9 = (int)((float)param_2 + _DAT_001cf160);
iVar10 = (int)((float)param_1 + _UNK_001cf164);
iVar8 = (int)((float)((ulong)param_2 >> 0x20) + DAT_001d3b58);
iVar5 = iVar8 - iVar4;
ImageDrawLine(param_3,iVar10,iVar4,iVar9,iVar8,param_5);
iVar2 = iVar9 - iVar10;
if ((iVar2 == 0) || (iVar5 / iVar2 != 0)) {
if (iVar8 != iVar4) {
iVar3 = -iVar5;
if (0 < iVar5) {
iVar3 = iVar5;
}
uVar7 = (long)((int)SQRT((float)(iVar5 * iVar5 + iVar2 * iVar2)) * (param_4 + -1)) /
(long)(iVar3 * 2);
if (0 < (int)uVar7) {
uVar7 = uVar7 & 0xffffffff;
iVar5 = iVar9;
iVar2 = iVar10;
do {
iVar2 = iVar2 + 1;
iVar10 = iVar10 + -1;
iVar5 = iVar5 + -1;
iVar9 = iVar9 + 1;
ImageDrawLine(param_3,iVar10,iVar4,iVar5,iVar8,param_5);
ImageDrawLine(param_3,iVar2,iVar4,iVar9,iVar8,param_5);
uVar6 = (int)uVar7 - 1;
uVar7 = (ulong)uVar6;
} while (uVar6 != 0);
}
}
}
else {
iVar3 = -iVar2;
if (0 < iVar2) {
iVar3 = iVar2;
}
uVar7 = (long)((int)SQRT((float)(iVar5 * iVar5 + iVar2 * iVar2)) * (param_4 + -1)) /
(long)(iVar3 * 2);
uVar1 = uVar7 & 0xffffffff;
iVar5 = iVar4;
iVar2 = iVar8;
if (0 < (int)uVar7) {
do {
iVar4 = iVar4 + 1;
iVar8 = iVar8 + 1;
ImageDrawLine(param_3,iVar10,iVar5 + -1,iVar9,iVar2 + -1,param_5);
ImageDrawLine(param_3,iVar10,iVar4,iVar9,iVar8,param_5);
uVar6 = (int)uVar1 - 1;
uVar1 = (ulong)uVar6;
iVar5 = iVar5 + -1;
iVar2 = iVar2 + -1;
} while (uVar6 != 0);
}
}
return;
}
|
|
64,377 |
list_builtin_chat_templates[abi:cxx11]()
|
monkey531[P]llama/common/arg.cpp
|
static std::string list_builtin_chat_templates() {
std::vector<const char *> supported_tmpl;
int32_t res = llama_chat_builtin_templates(nullptr, 0);
supported_tmpl.resize(res);
res = llama_chat_builtin_templates(supported_tmpl.data(), supported_tmpl.size());
std::ostringstream msg;
for (auto & tmpl : supported_tmpl) {
msg << tmpl << (&tmpl == &supported_tmpl.back() ? "" : ", ");
}
return msg.str();
}
|
O3
|
cpp
|
list_builtin_chat_templates[abi:cxx11]():
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x198, %rsp # imm = 0x198
movq %rdi, %rbx
xorps %xmm0, %xmm0
movaps %xmm0, (%rsp)
movq $0x0, 0x10(%rsp)
xorl %edi, %edi
xorl %esi, %esi
callq 0x1a1d0
movslq %eax, %rsi
movq %rsp, %rdi
callq 0x70f2e
movq (%rsp), %rdi
movq 0x8(%rsp), %rsi
subq %rdi, %rsi
sarq $0x3, %rsi
callq 0x1a1d0
movq %rbx, 0x18(%rsp)
leaq 0x20(%rsp), %rdi
callq 0x1abb0
movq (%rsp), %r12
movq 0x8(%rsp), %r13
cmpq %r13, %r12
je 0x4e6a0
leaq 0x9dc10(%rip), %rbp # 0xec23c
leaq 0xa17a0(%rip), %rbx # 0xefdd3
leaq 0x20(%rsp), %r14
movq (%r12), %r15
testq %r15, %r15
je 0x4e659
movq %r15, %rdi
callq 0x1a3f0
movq %r14, %rdi
movq %r15, %rsi
movq %rax, %rdx
callq 0x1aa10
jmp 0x4e675
movq 0x20(%rsp), %rax
movq -0x18(%rax), %rax
leaq (%rsp,%rax), %rdi
addq $0x20, %rdi
movl 0x20(%rdi), %esi
orl $0x1, %esi
callq 0x1af10
movq 0x8(%rsp), %rax
addq $-0x8, %rax
xorl %edx, %edx
cmpq %rax, %r12
setne %dl
movq %rbx, %rsi
cmoveq %rbp, %rsi
addl %edx, %edx
movq %r14, %rdi
callq 0x1aa10
addq $0x8, %r12
cmpq %r13, %r12
jne 0x4e638
leaq 0x28(%rsp), %rsi
movq 0x18(%rsp), %rdi
callq 0x1add0
movq 0xdd8c2(%rip), %rsi # 0x12bf78
leaq 0x20(%rsp), %rdi
callq 0x1a4b0
leaq 0x90(%rsp), %rdi
callq 0x1a2c0
movq (%rsp), %rdi
testq %rdi, %rdi
je 0x4e6e3
movq 0x10(%rsp), %rsi
subq %rdi, %rsi
callq 0x1a8f0
addq $0x198, %rsp # imm = 0x198
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x4e6fe
jmp 0x4e6f9
movq %rax, %rbx
jmp 0x4e71f
movq %rax, %rbx
movq 0xdd870(%rip), %rsi # 0x12bf78
leaq 0x20(%rsp), %rdi
callq 0x1a4b0
leaq 0x90(%rsp), %rdi
callq 0x1a2c0
movq (%rsp), %rdi
testq %rdi, %rdi
je 0x4e735
movq 0x10(%rsp), %rsi
subq %rdi, %rsi
callq 0x1a8f0
movq %rbx, %rdi
callq 0x1afb0
|
_ZL27list_builtin_chat_templatesB5cxx11v:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 198h
mov rbx, rdi
xorps xmm0, xmm0
movaps xmmword ptr [rsp+1C8h+var_1C8], xmm0
mov [rsp+1C8h+var_1B8], 0
xor edi, edi
xor esi, esi
call _llama_chat_builtin_templates
movsxd rsi, eax
mov rdi, rsp
call _ZNSt6vectorIPKcSaIS1_EE6resizeEm; std::vector<char const*>::resize(ulong)
mov rdi, [rsp+1C8h+var_1C8]
mov rsi, [rsp+1C8h+var_1C8+8]
sub rsi, rdi
sar rsi, 3
call _llama_chat_builtin_templates
mov [rsp+1C8h+var_1B0], rbx
lea rdi, [rsp+1C8h+var_1A8]
call __ZNSt7__cxx1119basic_ostringstreamIcSt11char_traitsIcESaIcEEC1Ev; std::ostringstream::basic_ostringstream(void)
mov r12, [rsp+1C8h+var_1C8]
mov r13, [rsp+1C8h+var_1C8+8]
cmp r12, r13
jz short loc_4E6A0
lea rbp, aErrorWhileHand_0+34h; ""
lea rbx, aZuD+6; ", "
lea r14, [rsp+1C8h+var_1A8]
loc_4E638:
mov r15, [r12]
test r15, r15
jz short loc_4E659
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_4E675
loc_4E659:
mov rax, [rsp+1C8h+var_1A8]
mov rax, [rax-18h]
lea rdi, [rsp+rax+1C8h+var_1C8]
add rdi, 20h ; ' '
mov esi, [rdi+20h]
or esi, 1
call __ZNSt9basic_iosIcSt11char_traitsIcEE5clearESt12_Ios_Iostate; std::ios::clear(std::_Ios_Iostate)
loc_4E675:
mov rax, [rsp+1C8h+var_1C8+8]
add rax, 0FFFFFFFFFFFFFFF8h
xor edx, edx
cmp r12, rax
setnz dl
mov rsi, rbx
cmovz rsi, rbp
add edx, edx
mov rdi, r14
call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long)
add r12, 8
cmp r12, r13
jnz short loc_4E638
loc_4E6A0:
lea rsi, [rsp+1C8h+var_1A0]
mov rdi, [rsp+1C8h+var_1B0]
call __ZNKSt7__cxx1115basic_stringbufIcSt11char_traitsIcESaIcEE3strEv; std::stringbuf::str(void)
mov rsi, cs:_ZTTNSt7__cxx1119basic_ostringstreamIcSt11char_traitsIcESaIcEEE_ptr
lea rdi, [rsp+1C8h+var_1A8]
call __ZNSt7__cxx1119basic_ostringstreamIcSt11char_traitsIcESaIcEED2Ev; std::ostringstream::~ostringstream()
lea rdi, [rsp+1C8h+var_138]; this
call __ZNSt8ios_baseD2Ev; std::ios_base::~ios_base()
mov rdi, [rsp+1C8h+var_1C8]; void *
test rdi, rdi
jz short loc_4E6E3
mov rsi, [rsp+1C8h+var_1B8]
sub rsi, rdi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_4E6E3:
add rsp, 198h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
jmp short loc_4E6FE
jmp short $+2
loc_4E6F9:
mov rbx, rax
jmp short loc_4E71F
loc_4E6FE:
mov rbx, rax
mov rsi, cs:_ZTTNSt7__cxx1119basic_ostringstreamIcSt11char_traitsIcESaIcEEE_ptr
lea rdi, [rsp+arg_18]
call __ZNSt7__cxx1119basic_ostringstreamIcSt11char_traitsIcESaIcEED2Ev; std::ostringstream::~ostringstream()
lea rdi, [rsp+arg_88]; this
call __ZNSt8ios_baseD2Ev; std::ios_base::~ios_base()
loc_4E71F:
mov rdi, [rsp+0]; void *
test rdi, rdi
jz short loc_4E735
mov rsi, [rsp+arg_8]
sub rsi, rdi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_4E735:
mov rdi, rbx
call __Unwind_Resume
|
void list_builtin_chat_templates[abi:cxx11](long long a1)
{
int v1; // eax
_QWORD *v2; // r12
_QWORD *i; // r13
long long v4; // r15
long long v5; // rax
char *v6; // rsi
void *v7[2]; // [rsp+0h] [rbp-1C8h] BYREF
long long v8; // [rsp+10h] [rbp-1B8h]
long long v9; // [rsp+18h] [rbp-1B0h]
long long v10; // [rsp+20h] [rbp-1A8h] BYREF
_BYTE v11[104]; // [rsp+28h] [rbp-1A0h] BYREF
_BYTE v12[312]; // [rsp+90h] [rbp-138h] BYREF
*(_OWORD *)v7 = 0LL;
v8 = 0LL;
v1 = llama_chat_builtin_templates(0LL, 0LL);
std::vector<char const*>::resize(v7, v1);
llama_chat_builtin_templates(v7[0], ((char *)v7[1] - (char *)v7[0]) >> 3);
v9 = a1;
std::ostringstream::basic_ostringstream(&v10);
v2 = v7[0];
for ( i = v7[1]; v2 != i; ++v2 )
{
v4 = *v2;
if ( *v2 )
{
v5 = strlen(*v2);
std::__ostream_insert<char,std::char_traits<char>>(&v10, v4, v5);
}
else
{
std::ios::clear(&v11[*(_QWORD *)(v10 - 24) - 8], *(_DWORD *)&v11[*(_QWORD *)(v10 - 24) + 24] | 1u);
}
v6 = ", ";
if ( v2 == (_QWORD *)((char *)v7[1] - 8) )
v6 = "";
std::__ostream_insert<char,std::char_traits<char>>(
&v10,
v6,
2 * (unsigned int)(v2 != (_QWORD *)((char *)v7[1] - 8)));
}
std::stringbuf::str(v9, v11);
std::ostringstream::~ostringstream(&v10, &`VTT for'std::ostringstream);
std::ios_base::~ios_base((std::ios_base *)v12);
if ( v7[0] )
operator delete(v7[0], v8 - (unsigned long long)v7[0]);
}
|
list_builtin_chat_templates[abi:cxx11]:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x198
MOV RBX,RDI
XORPS XMM0,XMM0
MOVAPS xmmword ptr [RSP],XMM0
MOV qword ptr [RSP + 0x10],0x0
LAB_0014e5df:
XOR EDI,EDI
XOR ESI,ESI
CALL 0x0011a1d0
MOVSXD RSI,EAX
MOV RDI,RSP
CALL 0x00170f2e
MOV RDI,qword ptr [RSP]
MOV RSI,qword ptr [RSP + 0x8]
SUB RSI,RDI
SAR RSI,0x3
CALL 0x0011a1d0
LAB_0014e608:
MOV qword ptr [RSP + 0x18],RBX
LEA RDI,[RSP + 0x20]
CALL 0x0011abb0
MOV R12,qword ptr [RSP]
MOV R13,qword ptr [RSP + 0x8]
CMP R12,R13
JZ 0x0014e6a0
LEA RBP,[0x1ec23c]
LEA RBX,[0x1efdd3]
LEA R14,[RSP + 0x20]
LAB_0014e638:
MOV R15,qword ptr [R12]
TEST R15,R15
JZ 0x0014e659
MOV RDI,R15
CALL 0x0011a3f0
LAB_0014e649:
MOV RDI,R14
MOV RSI,R15
MOV RDX,RAX
CALL 0x0011aa10
JMP 0x0014e675
LAB_0014e659:
MOV RAX,qword ptr [RSP + 0x20]
MOV RAX,qword ptr [RAX + -0x18]
LEA RDI,[RSP + RAX*0x1]
ADD RDI,0x20
MOV ESI,dword ptr [RDI + 0x20]
OR ESI,0x1
CALL 0x0011af10
LAB_0014e675:
MOV RAX,qword ptr [RSP + 0x8]
ADD RAX,-0x8
XOR EDX,EDX
CMP R12,RAX
SETNZ DL
MOV RSI,RBX
CMOVZ RSI,RBP
ADD EDX,EDX
MOV RDI,R14
CALL 0x0011aa10
ADD R12,0x8
CMP R12,R13
JNZ 0x0014e638
LAB_0014e6a0:
LEA RSI,[RSP + 0x28]
LAB_0014e6a5:
MOV RDI,qword ptr [RSP + 0x18]
CALL 0x0011add0
LAB_0014e6af:
MOV RSI,qword ptr [0x0022bf78]
LEA RDI,[RSP + 0x20]
CALL 0x0011a4b0
LEA RDI,[RSP + 0x90]
CALL 0x0011a2c0
MOV RDI,qword ptr [RSP]
TEST RDI,RDI
JZ 0x0014e6e3
MOV RSI,qword ptr [RSP + 0x10]
SUB RSI,RDI
CALL 0x0011a8f0
LAB_0014e6e3:
ADD RSP,0x198
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
/* WARNING: Unknown calling convention -- yet parameter storage is locked */
/* list_builtin_chat_templates[abi:cxx11]() */
void list_builtin_chat_templates_abi_cxx11_(void)
{
int8 *puVar1;
int iVar2;
size_t sVar3;
char *pcVar4;
int8 *puVar5;
int8 *local_1c8;
int8 *puStack_1c0;
long local_1b8;
long local_1a8 [4];
uint auStack_188 [20];
ios_base local_138 [264];
local_1c8 = (int8 *)0x0;
puStack_1c0 = (int8 *)0x0;
local_1b8 = 0;
/* try { // try from 0014e5df to 0014e607 has its CatchHandler @ 0014e6f9 */
iVar2 = llama_chat_builtin_templates(0,0);
std::vector<char_const*,std::allocator<char_const*>>::resize
((vector<char_const*,std::allocator<char_const*>> *)&local_1c8,(long)iVar2);
llama_chat_builtin_templates(local_1c8,(long)puStack_1c0 - (long)local_1c8 >> 3);
/* try { // try from 0014e608 to 0014e616 has its CatchHandler @ 0014e6f7 */
std::__cxx11::ostringstream::ostringstream((ostringstream *)local_1a8);
puVar1 = puStack_1c0;
if (local_1c8 != puStack_1c0) {
puVar5 = local_1c8;
do {
pcVar4 = (char *)*puVar5;
if (pcVar4 == (char *)0x0) {
std::ios::clear((long)local_1a8 + *(long *)(local_1a8[0] + -0x18),
*(uint *)((long)auStack_188 + *(long *)(local_1a8[0] + -0x18)) | 1);
}
else {
sVar3 = strlen(pcVar4);
/* try { // try from 0014e649 to 0014e696 has its CatchHandler @ 0014e6fe */
std::__ostream_insert<char,std::char_traits<char>>((ostream *)local_1a8,pcVar4,sVar3);
}
pcVar4 = ", ";
if (puVar5 == puStack_1c0 + -1) {
pcVar4 = "";
}
std::__ostream_insert<char,std::char_traits<char>>
((ostream *)local_1a8,pcVar4,(ulong)((uint)(puVar5 != puStack_1c0 + -1) * 2));
puVar5 = puVar5 + 1;
} while (puVar5 != puVar1);
}
/* try { // try from 0014e6a5 to 0014e6ae has its CatchHandler @ 0014e6f5 */
std::__cxx11::stringbuf::str();
std::__cxx11::ostringstream::~ostringstream((ostringstream *)local_1a8);
std::ios_base::~ios_base(local_138);
if (local_1c8 != (int8 *)0x0) {
operator_delete(local_1c8,local_1b8 - (long)local_1c8);
}
return;
}
|
|
64,378 |
dump_datapage
|
eloqsql/storage/maria/ma_loghandler.c
|
static void dump_datapage(uchar *buffer, File handler)
{
uchar *ptr;
ulong offset;
uint32 page, file;
uint header_len;
printf(" Page: %ld File number: %ld\n",
(ulong) (page= uint3korr(buffer)),
(ulong) (file= uint3korr(buffer + 3)));
if (page == 0)
printf(" WARNING: page == 0!!!\n");
if (file == 0)
printf(" WARNING: file == 0!!!\n");
offset= page * TRANSLOG_PAGE_SIZE;
printf(" Flags (0x%x):\n", (uint) buffer[TRANSLOG_PAGE_FLAGS]);
if (buffer[TRANSLOG_PAGE_FLAGS])
{
if (buffer[TRANSLOG_PAGE_FLAGS] & TRANSLOG_PAGE_CRC)
printf(" Page CRC\n");
if (buffer[TRANSLOG_PAGE_FLAGS] & TRANSLOG_SECTOR_PROTECTION)
printf(" Sector protection\n");
if (buffer[TRANSLOG_PAGE_FLAGS] & TRANSLOG_RECORD_CRC)
printf(" Record CRC (WARNING: not yet implemented!!!)\n");
if (buffer[TRANSLOG_PAGE_FLAGS] & ~(TRANSLOG_PAGE_CRC |
TRANSLOG_SECTOR_PROTECTION |
TRANSLOG_RECORD_CRC))
{
printf(" WARNING: unknown flags (stop interpretation)!!!\n");
return;
}
}
else
printf(" No flags\n");
printf(" Page header length: %u\n",
(header_len= page_overhead[buffer[TRANSLOG_PAGE_FLAGS]]));
if (buffer[TRANSLOG_PAGE_FLAGS] & TRANSLOG_RECORD_CRC)
{
uint32 crc= uint4korr(buffer + TRANSLOG_PAGE_FLAGS + 1);
uint32 ccrc;
printf (" Page CRC 0x%04lx\n", (ulong) crc);
ccrc= translog_crc(buffer + header_len, TRANSLOG_PAGE_SIZE - header_len);
if (crc != ccrc)
printf(" WARNING: calculated CRC: 0x%04lx!!!\n", (ulong) ccrc);
}
if (buffer[TRANSLOG_PAGE_FLAGS] & TRANSLOG_SECTOR_PROTECTION)
{
TRANSLOG_FILE tfile;
{
uchar *table= buffer + header_len -
TRANSLOG_PAGE_SIZE / DISK_DRIVE_SECTOR_SIZE;
uint i;
printf(" Sector protection current value: 0x%02x\n", (uint) table[0]);
for (i= 1; i < TRANSLOG_PAGE_SIZE / DISK_DRIVE_SECTOR_SIZE; i++)
{
printf(" Sector protection in sector: 0x%02x saved value 0x%02x\n",
(uint)buffer[i * DISK_DRIVE_SECTOR_SIZE],
(uint)table[i]);
}
}
tfile.number= file;
bzero(&tfile.handler, sizeof(tfile.handler));
tfile.handler.file= handler;
tfile.was_recovered= 0;
tfile.is_sync= 1;
if (translog_check_sector_protection(buffer, &tfile))
printf(" WARNING: sector protection found problems!!!\n");
}
ptr= buffer + header_len;
while (ptr && ptr < buffer + TRANSLOG_PAGE_SIZE)
{
printf(" Chunk %d %lld:\n",
file,((longlong) (ptr - buffer)+ offset));
ptr= dump_chunk(buffer, ptr);
}
}
|
O0
|
c
|
dump_datapage:
pushq %rbp
movq %rsp, %rbp
subq $0xa0, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq -0x8(%rbp), %rax
movzbl (%rax), %eax
movq -0x8(%rbp), %rcx
movzbl 0x1(%rcx), %ecx
shll $0x8, %ecx
orl %ecx, %eax
movq -0x8(%rbp), %rcx
movzbl 0x2(%rcx), %ecx
shll $0x10, %ecx
orl %ecx, %eax
movl %eax, -0x24(%rbp)
movl %eax, %eax
movl %eax, %esi
movq -0x8(%rbp), %rax
movzbl 0x3(%rax), %eax
movq -0x8(%rbp), %rcx
movzbl 0x4(%rcx), %ecx
shll $0x8, %ecx
orl %ecx, %eax
movq -0x8(%rbp), %rcx
movzbl 0x5(%rcx), %ecx
shll $0x10, %ecx
orl %ecx, %eax
movl %eax, -0x28(%rbp)
movl %eax, %eax
movl %eax, %edx
leaq 0xcb364(%rip), %rdi # 0x15b47e
movb $0x0, %al
callq 0x2a070
cmpl $0x0, -0x24(%rbp)
jne 0x90135
leaq 0xcb36f(%rip), %rdi # 0x15b49d
movb $0x0, %al
callq 0x2a070
cmpl $0x0, -0x28(%rbp)
jne 0x90149
leaq 0xcb376(%rip), %rdi # 0x15b4b8
movb $0x0, %al
callq 0x2a070
movl -0x24(%rbp), %eax
shll $0xd, %eax
movl %eax, %eax
movq %rax, -0x20(%rbp)
movq -0x8(%rbp), %rax
movzbl 0x6(%rax), %esi
leaq 0xcb36f(%rip), %rdi # 0x15b4d3
movb $0x0, %al
callq 0x2a070
movq -0x8(%rbp), %rax
cmpb $0x0, 0x6(%rax)
je 0x901f4
movq -0x8(%rbp), %rax
movzbl 0x6(%rax), %eax
andl $0x1, %eax
cmpl $0x0, %eax
je 0x90193
leaq 0xcb358(%rip), %rdi # 0x15b4e4
movb $0x0, %al
callq 0x2a070
movq -0x8(%rbp), %rax
movzbl 0x6(%rax), %eax
andl $0x2, %eax
cmpl $0x0, %eax
je 0x901b1
leaq 0xcb348(%rip), %rdi # 0x15b4f2
movb $0x0, %al
callq 0x2a070
movq -0x8(%rbp), %rax
movzbl 0x6(%rax), %eax
andl $0x4, %eax
cmpl $0x0, %eax
je 0x901cf
leaq 0xcb341(%rip), %rdi # 0x15b509
movb $0x0, %al
callq 0x2a070
movq -0x8(%rbp), %rax
movzbl 0x6(%rax), %eax
andl $-0x8, %eax
cmpl $0x0, %eax
je 0x901f2
leaq 0xcb355(%rip), %rdi # 0x15b53b
movb $0x0, %al
callq 0x2a070
jmp 0x903eb
jmp 0x90202
leaq 0xcb375(%rip), %rdi # 0x15b570
movb $0x0, %al
callq 0x2a070
movq -0x8(%rbp), %rax
movzbl 0x6(%rax), %eax
movl %eax, %ecx
leaq 0xbf516d(%rip), %rax # 0xc85380
movl (%rax,%rcx,4), %esi
movl %esi, -0x2c(%rbp)
leaq 0xcb35e(%rip), %rdi # 0x15b57e
movb $0x0, %al
callq 0x2a070
movq -0x8(%rbp), %rax
movzbl 0x6(%rax), %eax
andl $0x4, %eax
cmpl $0x0, %eax
je 0x9028b
movq -0x8(%rbp), %rax
movl 0x7(%rax), %eax
movl %eax, -0x30(%rbp)
movl -0x30(%rbp), %eax
movl %eax, %esi
leaq 0xcb34b(%rip), %rdi # 0x15b598
movb $0x0, %al
callq 0x2a070
movq -0x8(%rbp), %rdi
movl -0x2c(%rbp), %eax
addq %rax, %rdi
movl $0x2000, %esi # imm = 0x2000
subl -0x2c(%rbp), %esi
callq 0x908a0
movl %eax, -0x34(%rbp)
movl -0x30(%rbp), %eax
cmpl -0x34(%rbp), %eax
je 0x90289
movl -0x34(%rbp), %eax
movl %eax, %esi
leaq 0xcb32a(%rip), %rdi # 0x15b5ac
movb $0x0, %al
callq 0x2a070
jmp 0x9028b
movq -0x8(%rbp), %rax
movzbl 0x6(%rax), %eax
andl $0x2, %eax
cmpl $0x0, %eax
je 0x90374
movq -0x8(%rbp), %rax
movl -0x2c(%rbp), %ecx
addq %rcx, %rax
addq $-0x10, %rax
movq %rax, -0x98(%rbp)
movq -0x98(%rbp), %rax
movzbl (%rax), %esi
leaq 0xcb310(%rip), %rdi # 0x15b5d5
movb $0x0, %al
callq 0x2a070
movl $0x1, -0x9c(%rbp)
cmpl $0x10, -0x9c(%rbp)
jae 0x90322
movq -0x8(%rbp), %rax
movl -0x9c(%rbp), %ecx
shll $0x9, %ecx
movl %ecx, %ecx
movzbl (%rax,%rcx), %esi
movq -0x98(%rbp), %rax
movl -0x9c(%rbp), %ecx
movzbl (%rax,%rcx), %edx
leaq 0xcb2f8(%rip), %rdi # 0x15b602
movb $0x0, %al
callq 0x2a070
movl -0x9c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x9c(%rbp)
jmp 0x902d6
movl -0x28(%rbp), %eax
movl %eax, -0x90(%rbp)
leaq -0x90(%rbp), %rdi
addq $0x8, %rdi
xorl %esi, %esi
movl $0x48, %edx
callq 0x2a2b0
movl -0xc(%rbp), %eax
movl %eax, -0x78(%rbp)
movb $0x0, -0x40(%rbp)
movb $0x1, -0x3f(%rbp)
movq -0x8(%rbp), %rdi
leaq -0x90(%rbp), %rsi
callq 0x908d0
cmpb $0x0, %al
je 0x90372
leaq 0xcb2d4(%rip), %rdi # 0x15b63f
movb $0x0, %al
callq 0x2a070
jmp 0x90374
movq -0x8(%rbp), %rax
movl -0x2c(%rbp), %ecx
addq %rcx, %rax
movq %rax, -0x18(%rbp)
xorl %eax, %eax
cmpq $0x0, -0x18(%rbp)
movb %al, -0x9d(%rbp)
je 0x903ac
movq -0x18(%rbp), %rax
movq -0x8(%rbp), %rcx
addq $0x2000, %rcx # imm = 0x2000
cmpq %rcx, %rax
setb %al
movb %al, -0x9d(%rbp)
movb -0x9d(%rbp), %al
testb $0x1, %al
jne 0x903b8
jmp 0x903eb
movl -0x28(%rbp), %esi
movq -0x18(%rbp), %rdx
movq -0x8(%rbp), %rax
subq %rax, %rdx
addq -0x20(%rbp), %rdx
leaq 0xcb2a0(%rip), %rdi # 0x15b671
movb $0x0, %al
callq 0x2a070
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x94ae0
movq %rax, -0x18(%rbp)
jmp 0x90382
addq $0xa0, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
|
dump_datapage:
push rbp
mov rbp, rsp
sub rsp, 0A0h
mov [rbp+var_8], rdi
mov [rbp+var_C], esi
mov rax, [rbp+var_8]
movzx eax, byte ptr [rax]
mov rcx, [rbp+var_8]
movzx ecx, byte ptr [rcx+1]
shl ecx, 8
or eax, ecx
mov rcx, [rbp+var_8]
movzx ecx, byte ptr [rcx+2]
shl ecx, 10h
or eax, ecx
mov [rbp+var_24], eax
mov eax, eax
mov esi, eax
mov rax, [rbp+var_8]
movzx eax, byte ptr [rax+3]
mov rcx, [rbp+var_8]
movzx ecx, byte ptr [rcx+4]
shl ecx, 8
or eax, ecx
mov rcx, [rbp+var_8]
movzx ecx, byte ptr [rcx+5]
shl ecx, 10h
or eax, ecx
mov [rbp+var_28], eax
mov eax, eax
mov edx, eax
lea rdi, aPageLdFileNumb; " Page: %ld File number: %ld\n"
mov al, 0
call _printf
cmp [rbp+var_24], 0
jnz short loc_90135
lea rdi, aWarningPage0; " WARNING: page == 0!!!\n"
mov al, 0
call _printf
loc_90135:
cmp [rbp+var_28], 0
jnz short loc_90149
lea rdi, aWarningFile0; " WARNING: file == 0!!!\n"
mov al, 0
call _printf
loc_90149:
mov eax, [rbp+var_24]
shl eax, 0Dh
mov eax, eax
mov [rbp+var_20], rax
mov rax, [rbp+var_8]
movzx esi, byte ptr [rax+6]
lea rdi, aFlags0xX; " Flags (0x%x):\n"
mov al, 0
call _printf
mov rax, [rbp+var_8]
cmp byte ptr [rax+6], 0
jz short loc_901F4
mov rax, [rbp+var_8]
movzx eax, byte ptr [rax+6]
and eax, 1
cmp eax, 0
jz short loc_90193
lea rdi, aPageCrc; " Page CRC\n"
mov al, 0
call _printf
loc_90193:
mov rax, [rbp+var_8]
movzx eax, byte ptr [rax+6]
and eax, 2
cmp eax, 0
jz short loc_901B1
lea rdi, aSectorProtecti; " Sector protection\n"
mov al, 0
call _printf
loc_901B1:
mov rax, [rbp+var_8]
movzx eax, byte ptr [rax+6]
and eax, 4
cmp eax, 0
jz short loc_901CF
lea rdi, aRecordCrcWarni; " Record CRC (WARNING: not yet implem"...
mov al, 0
call _printf
loc_901CF:
mov rax, [rbp+var_8]
movzx eax, byte ptr [rax+6]
and eax, 0FFFFFFF8h
cmp eax, 0
jz short loc_901F2
lea rdi, aWarningUnknown; " WARNING: unknown flags (stop interp"...
mov al, 0
call _printf
jmp loc_903EB
loc_901F2:
jmp short loc_90202
loc_901F4:
lea rdi, aNoFlags; " No flags\n"
mov al, 0
call _printf
loc_90202:
mov rax, [rbp+var_8]
movzx eax, byte ptr [rax+6]
mov ecx, eax
lea rax, page_overhead
mov esi, [rax+rcx*4]
mov [rbp+var_2C], esi
lea rdi, aPageHeaderLeng; " Page header length: %u\n"
mov al, 0
call _printf
mov rax, [rbp+var_8]
movzx eax, byte ptr [rax+6]
and eax, 4
cmp eax, 0
jz short loc_9028B
mov rax, [rbp+var_8]
mov eax, [rax+7]
mov [rbp+var_30], eax
mov eax, [rbp+var_30]
mov esi, eax
lea rdi, aPageCrc0x04lx; " Page CRC 0x%04lx\n"
mov al, 0
call _printf
mov rdi, [rbp+var_8]
mov eax, [rbp+var_2C]
add rdi, rax
mov esi, 2000h
sub esi, [rbp+var_2C]
call translog_crc
mov [rbp+var_34], eax
mov eax, [rbp+var_30]
cmp eax, [rbp+var_34]
jz short loc_90289
mov eax, [rbp+var_34]
mov esi, eax
lea rdi, aWarningCalcula; " WARNING: calculated CRC: 0x%04lx!!!"...
mov al, 0
call _printf
loc_90289:
jmp short $+2
loc_9028B:
mov rax, [rbp+var_8]
movzx eax, byte ptr [rax+6]
and eax, 2
cmp eax, 0
jz loc_90374
mov rax, [rbp+var_8]
mov ecx, [rbp+var_2C]
add rax, rcx
add rax, 0FFFFFFFFFFFFFFF0h
mov [rbp+var_98], rax
mov rax, [rbp+var_98]
movzx esi, byte ptr [rax]
lea rdi, aSectorProtecti_0; " Sector protection current value: 0x"...
mov al, 0
call _printf
mov [rbp+var_9C], 1
loc_902D6:
cmp [rbp+var_9C], 10h
jnb short loc_90322
mov rax, [rbp+var_8]
mov ecx, [rbp+var_9C]
shl ecx, 9
mov ecx, ecx
movzx esi, byte ptr [rax+rcx]
mov rax, [rbp+var_98]
mov ecx, [rbp+var_9C]
movzx edx, byte ptr [rax+rcx]
lea rdi, aSectorProtecti_1; " Sector protection in sector: 0x%02x"...
mov al, 0
call _printf
mov eax, [rbp+var_9C]
add eax, 1
mov [rbp+var_9C], eax
jmp short loc_902D6
loc_90322:
mov eax, [rbp+var_28]
mov [rbp+var_90], eax
lea rdi, [rbp+var_90]
add rdi, 8
xor esi, esi
mov edx, 48h ; 'H'
call _memset
mov eax, [rbp+var_C]
mov [rbp+var_78], eax
mov [rbp+var_40], 0
mov [rbp+var_3F], 1
mov rdi, [rbp+var_8]
lea rsi, [rbp+var_90]
call translog_check_sector_protection
cmp al, 0
jz short loc_90372
lea rdi, aWarningSectorP; " WARNING: sector protection found pr"...
mov al, 0
call _printf
loc_90372:
jmp short $+2
loc_90374:
mov rax, [rbp+var_8]
mov ecx, [rbp+var_2C]
add rax, rcx
mov [rbp+var_18], rax
loc_90382:
xor eax, eax
cmp [rbp+var_18], 0
mov [rbp+var_9D], al
jz short loc_903AC
mov rax, [rbp+var_18]
mov rcx, [rbp+var_8]
add rcx, 2000h
cmp rax, rcx
setb al
mov [rbp+var_9D], al
loc_903AC:
mov al, [rbp+var_9D]
test al, 1
jnz short loc_903B8
jmp short loc_903EB
loc_903B8:
mov esi, [rbp+var_28]
mov rdx, [rbp+var_18]
mov rax, [rbp+var_8]
sub rdx, rax
add rdx, [rbp+var_20]
lea rdi, aChunkDLld; " Chunk %d %lld:\n"
mov al, 0
call _printf
mov rdi, [rbp+var_8]
mov rsi, [rbp+var_18]
call dump_chunk
mov [rbp+var_18], rax
jmp short loc_90382
loc_903EB:
add rsp, 0A0h
pop rbp
retn
|
char dump_datapage(unsigned __int16 *a1, int a2)
{
char result; // al
bool v3; // [rsp+3h] [rbp-9Dh]
unsigned int i; // [rsp+4h] [rbp-9Ch]
unsigned int v5; // [rsp+10h] [rbp-90h] BYREF
_DWORD v6[18]; // [rsp+18h] [rbp-88h] BYREF
char v7; // [rsp+60h] [rbp-40h]
char v8; // [rsp+61h] [rbp-3Fh]
unsigned int v9; // [rsp+6Ch] [rbp-34h]
unsigned int v10; // [rsp+70h] [rbp-30h]
unsigned int v11; // [rsp+74h] [rbp-2Ch]
unsigned int v12; // [rsp+78h] [rbp-28h]
unsigned int v13; // [rsp+7Ch] [rbp-24h]
long long v14; // [rsp+80h] [rbp-20h]
unsigned long long j; // [rsp+88h] [rbp-18h]
int v16; // [rsp+94h] [rbp-Ch]
unsigned __int16 *v17; // [rsp+98h] [rbp-8h]
v17 = a1;
v16 = a2;
v13 = (*((unsigned __int8 *)a1 + 2) << 16) | *a1;
v12 = (*((unsigned __int8 *)a1 + 5) << 16) | *(unsigned __int16 *)((char *)a1 + 3);
printf(" Page: %ld File number: %ld\n", v13, v12);
if ( !v13 )
printf(" WARNING: page == 0!!!\n");
if ( !v12 )
printf(" WARNING: file == 0!!!\n");
v14 = v13 << 13;
printf(" Flags (0x%x):\n", *((unsigned __int8 *)v17 + 6));
if ( *((_BYTE *)v17 + 6) )
{
if ( (v17[3] & 1) != 0 )
printf(" Page CRC\n");
if ( (v17[3] & 2) != 0 )
printf(" Sector protection\n");
if ( (v17[3] & 4) != 0 )
printf(" Record CRC (WARNING: not yet implemented!!!)\n");
if ( (v17[3] & 0xF8) != 0 )
return printf(" WARNING: unknown flags (stop interpretation)!!!\n");
}
else
{
printf(" No flags\n");
}
v11 = page_overhead[*((unsigned __int8 *)v17 + 6)];
printf(" Page header length: %u\n", v11);
if ( (v17[3] & 4) != 0 )
{
v10 = *(_DWORD *)((char *)v17 + 7);
printf(" Page CRC 0x%04lx\n", v10);
v9 = translog_crc((char *)v17 + v11, 0x2000 - v11);
if ( v10 != v9 )
printf(" WARNING: calculated CRC: 0x%04lx!!!\n", v9);
}
if ( (v17[3] & 2) != 0 )
{
printf(" Sector protection current value: 0x%02x\n", *((unsigned __int8 *)v17 + v11 - 16));
for ( i = 1; i < 0x10; ++i )
printf(
" Sector protection in sector: 0x%02x saved value 0x%02x\n",
LOBYTE(v17[256 * i]),
*((unsigned __int8 *)v17 + v11 + i - 16));
v5 = v12;
memset(v6, 0LL, sizeof(v6));
v6[4] = v16;
v7 = 0;
v8 = 1;
if ( (unsigned __int8)translog_check_sector_protection(v17, &v5) )
printf(" WARNING: sector protection found problems!!!\n");
}
for ( j = (unsigned long long)v17 + v11; ; j = dump_chunk(v17, j) )
{
v3 = 0;
if ( j )
v3 = j < (unsigned long long)(v17 + 4096);
result = v3;
if ( !v3 )
break;
printf(" Chunk %d %lld:\n", v12, v14 + j - (_QWORD)v17);
}
return result;
}
|
dump_datapage:
PUSH RBP
MOV RBP,RSP
SUB RSP,0xa0
MOV qword ptr [RBP + -0x8],RDI
MOV dword ptr [RBP + -0xc],ESI
MOV RAX,qword ptr [RBP + -0x8]
MOVZX EAX,byte ptr [RAX]
MOV RCX,qword ptr [RBP + -0x8]
MOVZX ECX,byte ptr [RCX + 0x1]
SHL ECX,0x8
OR EAX,ECX
MOV RCX,qword ptr [RBP + -0x8]
MOVZX ECX,byte ptr [RCX + 0x2]
SHL ECX,0x10
OR EAX,ECX
MOV dword ptr [RBP + -0x24],EAX
MOV EAX,EAX
MOV ESI,EAX
MOV RAX,qword ptr [RBP + -0x8]
MOVZX EAX,byte ptr [RAX + 0x3]
MOV RCX,qword ptr [RBP + -0x8]
MOVZX ECX,byte ptr [RCX + 0x4]
SHL ECX,0x8
OR EAX,ECX
MOV RCX,qword ptr [RBP + -0x8]
MOVZX ECX,byte ptr [RCX + 0x5]
SHL ECX,0x10
OR EAX,ECX
MOV dword ptr [RBP + -0x28],EAX
MOV EAX,EAX
MOV EDX,EAX
LEA RDI,[0x25b47e]
MOV AL,0x0
CALL 0x0012a070
CMP dword ptr [RBP + -0x24],0x0
JNZ 0x00190135
LEA RDI,[0x25b49d]
MOV AL,0x0
CALL 0x0012a070
LAB_00190135:
CMP dword ptr [RBP + -0x28],0x0
JNZ 0x00190149
LEA RDI,[0x25b4b8]
MOV AL,0x0
CALL 0x0012a070
LAB_00190149:
MOV EAX,dword ptr [RBP + -0x24]
SHL EAX,0xd
MOV EAX,EAX
MOV qword ptr [RBP + -0x20],RAX
MOV RAX,qword ptr [RBP + -0x8]
MOVZX ESI,byte ptr [RAX + 0x6]
LEA RDI,[0x25b4d3]
MOV AL,0x0
CALL 0x0012a070
MOV RAX,qword ptr [RBP + -0x8]
CMP byte ptr [RAX + 0x6],0x0
JZ 0x001901f4
MOV RAX,qword ptr [RBP + -0x8]
MOVZX EAX,byte ptr [RAX + 0x6]
AND EAX,0x1
CMP EAX,0x0
JZ 0x00190193
LEA RDI,[0x25b4e4]
MOV AL,0x0
CALL 0x0012a070
LAB_00190193:
MOV RAX,qword ptr [RBP + -0x8]
MOVZX EAX,byte ptr [RAX + 0x6]
AND EAX,0x2
CMP EAX,0x0
JZ 0x001901b1
LEA RDI,[0x25b4f2]
MOV AL,0x0
CALL 0x0012a070
LAB_001901b1:
MOV RAX,qword ptr [RBP + -0x8]
MOVZX EAX,byte ptr [RAX + 0x6]
AND EAX,0x4
CMP EAX,0x0
JZ 0x001901cf
LEA RDI,[0x25b509]
MOV AL,0x0
CALL 0x0012a070
LAB_001901cf:
MOV RAX,qword ptr [RBP + -0x8]
MOVZX EAX,byte ptr [RAX + 0x6]
AND EAX,0xfffffff8
CMP EAX,0x0
JZ 0x001901f2
LEA RDI,[0x25b53b]
MOV AL,0x0
CALL 0x0012a070
JMP 0x001903eb
LAB_001901f2:
JMP 0x00190202
LAB_001901f4:
LEA RDI,[0x25b570]
MOV AL,0x0
CALL 0x0012a070
LAB_00190202:
MOV RAX,qword ptr [RBP + -0x8]
MOVZX EAX,byte ptr [RAX + 0x6]
MOV ECX,EAX
LEA RAX,[0xd85380]
MOV ESI,dword ptr [RAX + RCX*0x4]
MOV dword ptr [RBP + -0x2c],ESI
LEA RDI,[0x25b57e]
MOV AL,0x0
CALL 0x0012a070
MOV RAX,qword ptr [RBP + -0x8]
MOVZX EAX,byte ptr [RAX + 0x6]
AND EAX,0x4
CMP EAX,0x0
JZ 0x0019028b
MOV RAX,qword ptr [RBP + -0x8]
MOV EAX,dword ptr [RAX + 0x7]
MOV dword ptr [RBP + -0x30],EAX
MOV EAX,dword ptr [RBP + -0x30]
MOV ESI,EAX
LEA RDI,[0x25b598]
MOV AL,0x0
CALL 0x0012a070
MOV RDI,qword ptr [RBP + -0x8]
MOV EAX,dword ptr [RBP + -0x2c]
ADD RDI,RAX
MOV ESI,0x2000
SUB ESI,dword ptr [RBP + -0x2c]
CALL 0x001908a0
MOV dword ptr [RBP + -0x34],EAX
MOV EAX,dword ptr [RBP + -0x30]
CMP EAX,dword ptr [RBP + -0x34]
JZ 0x00190289
MOV EAX,dword ptr [RBP + -0x34]
MOV ESI,EAX
LEA RDI,[0x25b5ac]
MOV AL,0x0
CALL 0x0012a070
LAB_00190289:
JMP 0x0019028b
LAB_0019028b:
MOV RAX,qword ptr [RBP + -0x8]
MOVZX EAX,byte ptr [RAX + 0x6]
AND EAX,0x2
CMP EAX,0x0
JZ 0x00190374
MOV RAX,qword ptr [RBP + -0x8]
MOV ECX,dword ptr [RBP + -0x2c]
ADD RAX,RCX
ADD RAX,-0x10
MOV qword ptr [RBP + -0x98],RAX
MOV RAX,qword ptr [RBP + -0x98]
MOVZX ESI,byte ptr [RAX]
LEA RDI,[0x25b5d5]
MOV AL,0x0
CALL 0x0012a070
MOV dword ptr [RBP + -0x9c],0x1
LAB_001902d6:
CMP dword ptr [RBP + -0x9c],0x10
JNC 0x00190322
MOV RAX,qword ptr [RBP + -0x8]
MOV ECX,dword ptr [RBP + -0x9c]
SHL ECX,0x9
MOV ECX,ECX
MOVZX ESI,byte ptr [RAX + RCX*0x1]
MOV RAX,qword ptr [RBP + -0x98]
MOV ECX,dword ptr [RBP + -0x9c]
MOVZX EDX,byte ptr [RAX + RCX*0x1]
LEA RDI,[0x25b602]
MOV AL,0x0
CALL 0x0012a070
MOV EAX,dword ptr [RBP + -0x9c]
ADD EAX,0x1
MOV dword ptr [RBP + -0x9c],EAX
JMP 0x001902d6
LAB_00190322:
MOV EAX,dword ptr [RBP + -0x28]
MOV dword ptr [RBP + -0x90],EAX
LEA RDI,[RBP + -0x90]
ADD RDI,0x8
XOR ESI,ESI
MOV EDX,0x48
CALL 0x0012a2b0
MOV EAX,dword ptr [RBP + -0xc]
MOV dword ptr [RBP + -0x78],EAX
MOV byte ptr [RBP + -0x40],0x0
MOV byte ptr [RBP + -0x3f],0x1
MOV RDI,qword ptr [RBP + -0x8]
LEA RSI,[RBP + -0x90]
CALL 0x001908d0
CMP AL,0x0
JZ 0x00190372
LEA RDI,[0x25b63f]
MOV AL,0x0
CALL 0x0012a070
LAB_00190372:
JMP 0x00190374
LAB_00190374:
MOV RAX,qword ptr [RBP + -0x8]
MOV ECX,dword ptr [RBP + -0x2c]
ADD RAX,RCX
MOV qword ptr [RBP + -0x18],RAX
LAB_00190382:
XOR EAX,EAX
CMP qword ptr [RBP + -0x18],0x0
MOV byte ptr [RBP + -0x9d],AL
JZ 0x001903ac
MOV RAX,qword ptr [RBP + -0x18]
MOV RCX,qword ptr [RBP + -0x8]
ADD RCX,0x2000
CMP RAX,RCX
SETC AL
MOV byte ptr [RBP + -0x9d],AL
LAB_001903ac:
MOV AL,byte ptr [RBP + -0x9d]
TEST AL,0x1
JNZ 0x001903b8
JMP 0x001903eb
LAB_001903b8:
MOV ESI,dword ptr [RBP + -0x28]
MOV RDX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RBP + -0x8]
SUB RDX,RAX
ADD RDX,qword ptr [RBP + -0x20]
LEA RDI,[0x25b671]
MOV AL,0x0
CALL 0x0012a070
MOV RDI,qword ptr [RBP + -0x8]
MOV RSI,qword ptr [RBP + -0x18]
CALL 0x00194ae0
MOV qword ptr [RBP + -0x18],RAX
JMP 0x00190382
LAB_001903eb:
ADD RSP,0xa0
POP RBP
RET
|
void dump_datapage(uint3 *param_1,int4 param_2)
{
uint3 *puVar1;
char cVar2;
ulong uVar3;
uint local_a4;
uint local_98 [2];
int1 auStack_90 [16];
int4 local_80;
int1 local_48;
int1 local_47;
uint local_3c;
uint local_38;
uint local_34;
uint local_30;
uint local_2c;
ulong local_28;
uint3 *local_20;
int4 local_14;
uint3 *local_10;
local_2c = (uint)*param_1;
local_30 = (uint)*(uint3 *)((long)param_1 + 3);
local_14 = param_2;
local_10 = param_1;
printf(" Page: %ld File number: %ld\n",(ulong)local_2c,(ulong)local_30);
if (local_2c == 0) {
printf(" WARNING: page == 0!!!\n");
}
if (local_30 == 0) {
printf(" WARNING: file == 0!!!\n");
}
local_28 = (ulong)(local_2c << 0xd);
printf(" Flags (0x%x):\n",(ulong)*(byte *)((long)local_10 + 6));
if (*(char *)((long)local_10 + 6) == '\0') {
printf(" No flags\n");
}
else {
if ((*(byte *)((long)local_10 + 6) & 1) != 0) {
printf(" Page CRC\n");
}
if ((*(byte *)((long)local_10 + 6) & 2) != 0) {
printf(" Sector protection\n");
}
if ((*(byte *)((long)local_10 + 6) & 4) != 0) {
printf(" Record CRC (WARNING: not yet implemented!!!)\n");
}
if ((*(byte *)((long)local_10 + 6) & 0xf8) != 0) {
printf(" WARNING: unknown flags (stop interpretation)!!!\n");
return;
}
}
local_34 = *(uint *)(page_overhead + (ulong)*(byte *)((long)local_10 + 6) * 4);
printf(" Page header length: %u\n");
if ((*(byte *)((long)local_10 + 6) & 4) != 0) {
local_38 = *(uint *)((long)local_10 + 7);
printf(" Page CRC 0x%04lx\n",(ulong)local_38);
local_3c = translog_crc((long)local_10 + (ulong)local_34,0x2000 - local_34);
if (local_38 != local_3c) {
printf(" WARNING: calculated CRC: 0x%04lx!!!\n",(ulong)local_3c);
}
}
puVar1 = local_10;
if ((*(byte *)((long)local_10 + 6) & 2) != 0) {
uVar3 = (ulong)local_34;
printf(" Sector protection current value: 0x%02x\n");
for (local_a4 = 1; local_a4 < 0x10; local_a4 = local_a4 + 1) {
printf(" Sector protection in sector: 0x%02x saved value 0x%02x\n",
(ulong)*(byte *)((long)local_10 + (ulong)(local_a4 << 9)),
(ulong)*(byte *)((long)puVar1 + (ulong)local_a4 + (uVar3 - 0x10)));
}
local_98[0] = local_30;
memset(auStack_90,0,0x48);
local_80 = local_14;
local_48 = 0;
local_47 = 1;
cVar2 = translog_check_sector_protection(local_10,local_98);
if (cVar2 != '\0') {
printf(" WARNING: sector protection found problems!!!\n");
}
}
for (local_20 = (uint3 *)((long)local_10 + (ulong)local_34);
local_20 != (uint3 *)0x0 && local_20 < local_10 + 0x800;
local_20 = (uint3 *)dump_chunk(local_10,local_20)) {
printf(" Chunk %d %lld:\n",(ulong)local_30,(long)local_20 + (local_28 - (long)local_10));
}
return;
}
|
|
64,379 |
mysql_ping_start_internal
|
eloqsql/libmariadb/libmariadb/mariadb_async.c
|
static void
mysql_ping_start_internal(void *d)
{
MK_ASYNC_INTERNAL_BODY(
mysql_ping,
(parms->mysql),
parms->mysql,
int,
r_int)
}
|
O0
|
c
|
mysql_ping_start_internal:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq 0x480(%rax), %rax
movq 0x28(%rax), %rax
movq %rax, -0x20(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rdi
callq 0x7b430
movl %eax, -0x14(%rbp)
movl -0x14(%rbp), %ecx
movq -0x20(%rbp), %rax
movl %ecx, 0x8(%rax)
movq -0x20(%rbp), %rax
movl $0x0, (%rax)
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
|
mysql_ping_start_internal:
push rbp
mov rbp, rsp
sub rsp, 20h
mov [rbp+var_8], rdi
mov rax, [rbp+var_8]
mov [rbp+var_10], rax
mov rax, [rbp+var_10]
mov rax, [rax]
mov rax, [rax+480h]
mov rax, [rax+28h]
mov [rbp+var_20], rax
mov rax, [rbp+var_10]
mov rdi, [rax]
call mysql_ping
mov [rbp+var_14], eax
mov ecx, [rbp+var_14]
mov rax, [rbp+var_20]
mov [rax+8], ecx
mov rax, [rbp+var_20]
mov dword ptr [rax], 0
add rsp, 20h
pop rbp
retn
|
_DWORD * mysql_ping_start_internal(long long *a1)
{
_DWORD *result; // rax
_DWORD *v2; // [rsp+0h] [rbp-20h]
v2 = *(_DWORD **)(*(_QWORD *)(*a1 + 1152) + 40LL);
v2[2] = mysql_ping(*a1);
result = v2;
*v2 = 0;
return result;
}
|
mysql_ping_start_internal:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x20
MOV qword ptr [RBP + -0x8],RDI
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RBP + -0x10],RAX
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX]
MOV RAX,qword ptr [RAX + 0x480]
MOV RAX,qword ptr [RAX + 0x28]
MOV qword ptr [RBP + -0x20],RAX
MOV RAX,qword ptr [RBP + -0x10]
MOV RDI,qword ptr [RAX]
CALL 0x0017b430
MOV dword ptr [RBP + -0x14],EAX
MOV ECX,dword ptr [RBP + -0x14]
MOV RAX,qword ptr [RBP + -0x20]
MOV dword ptr [RAX + 0x8],ECX
MOV RAX,qword ptr [RBP + -0x20]
MOV dword ptr [RAX],0x0
ADD RSP,0x20
POP RBP
RET
|
void mysql_ping_start_internal(long *param_1)
{
int4 *puVar1;
int4 uVar2;
puVar1 = *(int4 **)(*(long *)(*param_1 + 0x480) + 0x28);
uVar2 = mysql_ping(*param_1);
puVar1[2] = uVar2;
*puVar1 = 0;
return;
}
|
|
64,380 |
bool 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==<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>>, nullptr>(nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>> const&) const
|
monkey531[P]llama/common/./json.hpp
|
bool operator==(const IterImpl& other) const
{
// if objects are not the same, the comparison is undefined
if (JSON_HEDLEY_UNLIKELY(m_object != other.m_object))
{
JSON_THROW(invalid_iterator::create(212, "cannot compare iterators of different containers", m_object));
}
JSON_ASSERT(m_object != nullptr);
switch (m_object->m_data.m_type)
{
case value_t::object:
return (m_it.object_iterator == other.m_it.object_iterator);
case value_t::array:
return (m_it.array_iterator == other.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:
return (m_it.primitive_iterator == other.m_it.primitive_iterator);
}
}
|
O2
|
cpp
|
bool 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==<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>>, nullptr>(nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>> const&) const:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x30, %rsp
movq %rdi, %r14
movq (%rdi), %rax
cmpq (%rsi), %rax
jne 0x36ab3
testq %rax, %rax
je 0x36b04
movzbl (%rax), %eax
cmpl $0x2, %eax
je 0x36a95
cmpl $0x1, %eax
jne 0x36a9f
movq 0x8(%r14), %rax
cmpq 0x8(%rsi), %rax
jmp 0x36aa7
movq 0x10(%r14), %rax
cmpq 0x10(%rsi), %rax
jmp 0x36aa7
movq 0x18(%r14), %rax
cmpq 0x18(%rsi), %rax
sete %al
addq $0x30, %rsp
popq %rbx
popq %r14
popq %rbp
retq
pushq $0x20
popq %rdi
callq 0x203a0
movq %rax, %rbx
leaq 0x6065c(%rip), %rsi # 0x97121
leaq 0x10(%rsp), %rdi
leaq 0xf(%rsp), %rdx
callq 0x2499e
movq (%r14), %rcx
movb $0x1, %bpl
leaq 0x10(%rsp), %rdx
movq %rbx, %rdi
movl $0xd4, %esi
callq 0x36b4c
xorl %ebp, %ebp
leaq 0xa0663(%rip), %rsi # 0xd7158
leaq -0x3108(%rip), %rdx # 0x339f4
movq %rbx, %rdi
callq 0x20b90
leaq 0x5f5e0(%rip), %rdi # 0x960eb
leaq 0x5f625(%rip), %rdx # 0x96137
leaq 0x61e63(%rip), %rcx # 0x9897c
movl $0x3422, %esi # imm = 0x3422
xorl %eax, %eax
callq 0x20b40
movq %rax, %r14
leaq 0x10(%rsp), %rdi
callq 0x20de8
testb %bpl, %bpl
jne 0x36b3c
jmp 0x36b44
movq %rax, %r14
movq %rbx, %rdi
callq 0x20530
movq %r14, %rdi
callq 0x20bf0
|
_ZNK8nlohmann16json_abi_v3_11_36detail9iter_implINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEEeqISG_TnNSt9enable_ifIXoosr3std7is_sameIT_SG_EE5valuesr3std7is_sameISJ_NS2_IKSF_EEEE5valueEDnE4typeELDn0EEEbRKSJ_:
push rbp; char
push r14; int
push rbx; int
sub rsp, 30h
mov r14, rdi
mov rax, [rdi]
cmp rax, [rsi]
jnz short loc_36AB3
test rax, rax
jz loc_36B04
movzx eax, byte ptr [rax]
cmp eax, 2
jz short loc_36A95
cmp eax, 1
jnz short loc_36A9F
mov rax, [r14+8]
cmp rax, [rsi+8]
jmp short loc_36AA7
loc_36A95:
mov rax, [r14+10h]
cmp rax, [rsi+10h]
jmp short loc_36AA7
loc_36A9F:
mov rax, [r14+18h]
cmp rax, [rsi+18h]
loc_36AA7:
setz al
add rsp, 30h
pop rbx
pop r14
pop rbp
retn
loc_36AB3:
push 20h ; ' '
pop rdi; thrown_size
call ___cxa_allocate_exception
mov rbx, rax
lea rsi, aCannotCompareI; "cannot compare iterators of different c"...
lea rdi, [rsp+48h+var_38]
lea rdx, [rsp+48h+var_39]
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&)
mov rcx, [r14]
mov bpl, 1
lea rdx, [rsp+48h+var_38]
mov rdi, rbx; this
mov esi, 0D4h; int
call _ZN8nlohmann16json_abi_v3_11_36detail16invalid_iterator6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_
xor ebp, ebp
lea rsi, _ZTIN8nlohmann16json_abi_v3_11_36detail16invalid_iteratorE; lptinfo
lea rdx, _ZN8nlohmann16json_abi_v3_11_36detail9exceptionD2Ev; void (*)(void *)
mov rdi, rbx; void *
call ___cxa_throw
loc_36B04:
lea rdi, aWorkspaceLlm4b_1; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aAnchorMObjectN+7; "m_object != nullptr"
mov esi, 3422h
xor eax, eax
call _ggml_abort
mov r14, rax
lea rdi, [rsp+48h+var_38]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
test bpl, bpl
jnz short loc_36B3C
jmp short loc_36B44
mov r14, rax
loc_36B3C:
mov rdi, rbx; void *
call ___cxa_free_exception
loc_36B44:
mov rdi, r14
call __Unwind_Resume
|
_ZNK8nlohmann16json_abi_v3_11_36detail9iter_implINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEEeqISG_TnNSt9enable_ifIXoosr3std7is_sameIT_SG_EE5valuesr3std7is_sameISJ_NS2_IKSF_EEEE5valueEDnE4typeELDn0EEEbRKSJ_:
PUSH RBP
PUSH R14
PUSH RBX
SUB RSP,0x30
MOV R14,RDI
MOV RAX,qword ptr [RDI]
CMP RAX,qword ptr [RSI]
JNZ 0x00136ab3
TEST RAX,RAX
JZ 0x00136b04
MOVZX EAX,byte ptr [RAX]
CMP EAX,0x2
JZ 0x00136a95
CMP EAX,0x1
JNZ 0x00136a9f
MOV RAX,qword ptr [R14 + 0x8]
CMP RAX,qword ptr [RSI + 0x8]
JMP 0x00136aa7
LAB_00136a95:
MOV RAX,qword ptr [R14 + 0x10]
CMP RAX,qword ptr [RSI + 0x10]
JMP 0x00136aa7
LAB_00136a9f:
MOV RAX,qword ptr [R14 + 0x18]
CMP RAX,qword ptr [RSI + 0x18]
LAB_00136aa7:
SETZ AL
ADD RSP,0x30
POP RBX
POP R14
POP RBP
RET
LAB_00136ab3:
PUSH 0x20
POP RDI
CALL 0x001203a0
MOV RBX,RAX
LAB_00136abe:
LEA RSI,[0x197121]
LEA RDI,[RSP + 0x10]
LEA RDX,[RSP + 0xf]
CALL 0x0012499e
MOV RCX,qword ptr [R14]
MOV BPL,0x1
LAB_00136ada:
LEA RDX,[RSP + 0x10]
MOV RDI,RBX
MOV ESI,0xd4
CALL 0x00136b4c
XOR EBP,EBP
LEA RSI,[0x1d7158]
LEA RDX,[0x1339f4]
MOV RDI,RBX
CALL 0x00120b90
LAB_00136b04:
LEA RDI,[0x1960eb]
LEA RDX,[0x196137]
LEA RCX,[0x19897c]
MOV ESI,0x3422
XOR EAX,EAX
CALL 0x00120b40
|
int8
_ZNK8nlohmann16json_abi_v3_11_36detail9iter_implINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEEeqISG_TnNSt9enable_ifIXoosr3std7is_sameIT_SG_EE5valuesr3std7is_sameISJ_NS2_IKSF_EEEE5valueEDnE4typeELDn0EEEbRKSJ_
(int8 *param_1,int8 *param_2)
{
char *pcVar1;
long lVar2;
int8 uVar3;
bool bVar4;
allocator local_39;
string local_38 [32];
pcVar1 = (char *)*param_1;
if (pcVar1 != (char *)*param_2) {
uVar3 = __cxa_allocate_exception(0x20);
/* try { // try from 00136abe to 00136ad3 has its CatchHandler @ 00136b39 */
std::__cxx11::string::string<std::allocator<char>>
(local_38,"cannot compare iterators of different containers",&local_39);
/* try { // try from 00136ada to 00136b03 has its CatchHandler @ 00136b25 */
_ZN8nlohmann16json_abi_v3_11_36detail16invalid_iterator6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_
(uVar3,0xd4,local_38,*param_1);
/* WARNING: Subroutine does not return */
__cxa_throw(uVar3,&nlohmann::json_abi_v3_11_3::detail::invalid_iterator::typeinfo,
nlohmann::json_abi_v3_11_3::detail::exception::~exception);
}
if (pcVar1 != (char *)0x0) {
if (*pcVar1 == '\x02') {
lVar2 = param_1[2];
bVar4 = lVar2 == param_2[2];
}
else if (*pcVar1 == '\x01') {
lVar2 = param_1[1];
bVar4 = lVar2 == param_2[1];
}
else {
lVar2 = param_1[3];
bVar4 = lVar2 == param_2[3];
}
return CONCAT71((int7)((ulong)lVar2 >> 8),bVar4);
}
/* WARNING: Subroutine does not return */
ggml_abort("/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/./json.hpp",0x3422,
"GGML_ASSERT(%s) failed","m_object != nullptr");
}
|
||
64,381 |
nglog::DoRawLog(char**, unsigned long*, char const*, ...)
|
ng-log[P]ng-log/src/raw_logging.cc
|
static bool DoRawLog(char** buf, size_t* size, const char* format, ...) {
va_list ap;
va_start(ap, format);
int n = std::vsnprintf(*buf, *size, format, ap);
va_end(ap);
if (n < 0 || static_cast<size_t>(n) > *size) return false;
*size -= static_cast<size_t>(n);
*buf += n;
return true;
}
|
O0
|
cpp
|
nglog::DoRawLog(char**, unsigned long*, char const*, ...):
pushq %rbp
movq %rsp, %rbp
subq $0x100, %rsp # imm = 0x100
testb %al, %al
je 0x4c52e
movaps %xmm0, -0xd0(%rbp)
movaps %xmm1, -0xc0(%rbp)
movaps %xmm2, -0xb0(%rbp)
movaps %xmm3, -0xa0(%rbp)
movaps %xmm4, -0x90(%rbp)
movaps %xmm5, -0x80(%rbp)
movaps %xmm6, -0x70(%rbp)
movaps %xmm7, -0x60(%rbp)
movq %r9, -0xd8(%rbp)
movq %r8, -0xe0(%rbp)
movq %rcx, -0xe8(%rbp)
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
leaq -0x40(%rbp), %rax
leaq -0x100(%rbp), %rcx
movq %rcx, 0x10(%rax)
leaq 0x10(%rbp), %rcx
movq %rcx, 0x8(%rax)
movl $0x30, 0x4(%rax)
movl $0x18, (%rax)
movq -0x10(%rbp), %rax
movq (%rax), %rdi
movq -0x18(%rbp), %rax
movq (%rax), %rsi
movq -0x20(%rbp), %rdx
leaq -0x40(%rbp), %rcx
callq 0x9470
movl %eax, -0x44(%rbp)
leaq -0x40(%rbp), %rax
cmpl $0x0, -0x44(%rbp)
jl 0x4c5a8
movslq -0x44(%rbp), %rax
movq -0x18(%rbp), %rcx
cmpq (%rcx), %rax
jbe 0x4c5ae
movb $0x0, -0x1(%rbp)
jmp 0x4c5d6
movslq -0x44(%rbp), %rdx
movq -0x18(%rbp), %rax
movq (%rax), %rcx
subq %rdx, %rcx
movq %rcx, (%rax)
movl -0x44(%rbp), %edx
movq -0x10(%rbp), %rax
movq (%rax), %rcx
movslq %edx, %rdx
addq %rdx, %rcx
movq %rcx, (%rax)
movb $0x1, -0x1(%rbp)
movb -0x1(%rbp), %al
addq $0x100, %rsp # imm = 0x100
popq %rbp
retq
nopw %cs:(%rax,%rax)
|
_ZN5nglogL8DoRawLogEPPcPmPKcz:
push rbp
mov rbp, rsp
sub rsp, 100h
test al, al
jz short loc_4C52E
movaps [rbp+var_D0], xmm0
movaps [rbp+var_C0], xmm1
movaps [rbp+var_B0], xmm2
movaps [rbp+var_A0], xmm3
movaps [rbp+var_90], xmm4
movaps [rbp+var_80], xmm5
movaps [rbp+var_70], xmm6
movaps [rbp+var_60], xmm7
loc_4C52E:
mov [rbp+var_D8], r9
mov [rbp+var_E0], r8
mov [rbp+var_E8], rcx
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov [rbp+var_20], rdx
lea rax, [rbp+var_40]
lea rcx, [rbp+var_100]
mov [rax+10h], rcx
lea rcx, [rbp+arg_0]
mov [rax+8], rcx
mov dword ptr [rax+4], 30h ; '0'
mov dword ptr [rax], 18h
mov rax, [rbp+var_10]
mov rdi, [rax]
mov rax, [rbp+var_18]
mov rsi, [rax]
mov rdx, [rbp+var_20]
lea rcx, [rbp+var_40]
call _vsnprintf
mov [rbp+var_44], eax
lea rax, [rbp+var_40]
cmp [rbp+var_44], 0
jl short loc_4C5A8
movsxd rax, [rbp+var_44]
mov rcx, [rbp+var_18]
cmp rax, [rcx]
jbe short loc_4C5AE
loc_4C5A8:
mov [rbp+var_1], 0
jmp short loc_4C5D6
loc_4C5AE:
movsxd rdx, [rbp+var_44]
mov rax, [rbp+var_18]
mov rcx, [rax]
sub rcx, rdx
mov [rax], rcx
mov edx, [rbp+var_44]
mov rax, [rbp+var_10]
mov rcx, [rax]
movsxd rdx, edx
add rcx, rdx
mov [rax], rcx
mov [rbp+var_1], 1
loc_4C5D6:
mov al, [rbp+var_1]
add rsp, 100h
pop rbp
retn
|
char nglog::DoRawLog(
nglog *this,
char **a2,
unsigned long long *a3,
const char *a4,
long long a5,
long long a6,
__m128 a7,
__m128 a8,
__m128 a9,
__m128 a10,
__m128 a11,
__m128 a12,
__m128 a13,
__m128 a14,
char a15)
{
char v16; // [rsp+0h] [rbp-100h] BYREF
const char *v17; // [rsp+18h] [rbp-E8h]
long long v18; // [rsp+20h] [rbp-E0h]
long long v19; // [rsp+28h] [rbp-D8h]
__m128 v20; // [rsp+30h] [rbp-D0h]
__m128 v21; // [rsp+40h] [rbp-C0h]
__m128 v22; // [rsp+50h] [rbp-B0h]
__m128 v23; // [rsp+60h] [rbp-A0h]
__m128 v24; // [rsp+70h] [rbp-90h]
__m128 v25; // [rsp+80h] [rbp-80h]
__m128 v26; // [rsp+90h] [rbp-70h]
__m128 v27; // [rsp+A0h] [rbp-60h]
int v28; // [rsp+BCh] [rbp-44h]
_DWORD v29[2]; // [rsp+C0h] [rbp-40h] BYREF
char *v30; // [rsp+C8h] [rbp-38h]
char *v31; // [rsp+D0h] [rbp-30h]
unsigned long long *v32; // [rsp+E0h] [rbp-20h]
char **v33; // [rsp+E8h] [rbp-18h]
nglog *v34; // [rsp+F0h] [rbp-10h]
v20 = a7;
v21 = a8;
v22 = a9;
v23 = a10;
v24 = a11;
v25 = a12;
v26 = a13;
v27 = a14;
v19 = a6;
v18 = a5;
v17 = a4;
v34 = this;
v33 = a2;
v32 = a3;
v31 = &v16;
v30 = &a15;
v29[1] = 48;
v29[0] = 24;
v28 = vsnprintf(*(_QWORD *)this, *a2, a3, v29);
if ( v28 < 0 || v28 > (unsigned long long)*v33 )
return 0;
*v33 -= v28;
*(_QWORD *)v34 += v28;
return 1;
}
|
DoRawLog:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x100
TEST AL,AL
JZ 0x0014c52e
MOVAPS xmmword ptr [RBP + -0xd0],XMM0
MOVAPS xmmword ptr [RBP + -0xc0],XMM1
MOVAPS xmmword ptr [RBP + -0xb0],XMM2
MOVAPS xmmword ptr [RBP + -0xa0],XMM3
MOVAPS xmmword ptr [RBP + -0x90],XMM4
MOVAPS xmmword ptr [RBP + -0x80],XMM5
MOVAPS xmmword ptr [RBP + -0x70],XMM6
MOVAPS xmmword ptr [RBP + -0x60],XMM7
LAB_0014c52e:
MOV qword ptr [RBP + -0xd8],R9
MOV qword ptr [RBP + -0xe0],R8
MOV qword ptr [RBP + -0xe8],RCX
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x18],RSI
MOV qword ptr [RBP + -0x20],RDX
LEA RAX,[RBP + -0x40]
LEA RCX,[RBP + -0x100]
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],0x18
MOV RAX,qword ptr [RBP + -0x10]
MOV RDI,qword ptr [RAX]
MOV RAX,qword ptr [RBP + -0x18]
MOV RSI,qword ptr [RAX]
MOV RDX,qword ptr [RBP + -0x20]
LEA RCX,[RBP + -0x40]
CALL 0x00109470
MOV dword ptr [RBP + -0x44],EAX
LEA RAX,[RBP + -0x40]
CMP dword ptr [RBP + -0x44],0x0
JL 0x0014c5a8
MOVSXD RAX,dword ptr [RBP + -0x44]
MOV RCX,qword ptr [RBP + -0x18]
CMP RAX,qword ptr [RCX]
JBE 0x0014c5ae
LAB_0014c5a8:
MOV byte ptr [RBP + -0x1],0x0
JMP 0x0014c5d6
LAB_0014c5ae:
MOVSXD RDX,dword ptr [RBP + -0x44]
MOV RAX,qword ptr [RBP + -0x18]
MOV RCX,qword ptr [RAX]
SUB RCX,RDX
MOV qword ptr [RAX],RCX
MOV EDX,dword ptr [RBP + -0x44]
MOV RAX,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RAX]
MOVSXD RDX,EDX
ADD RCX,RDX
MOV qword ptr [RAX],RCX
MOV byte ptr [RBP + -0x1],0x1
LAB_0014c5d6:
MOV AL,byte ptr [RBP + -0x1]
ADD RSP,0x100
POP RBP
RET
|
/* nglog::DoRawLog(char**, unsigned long*, char const*, ...) */
int1 nglog::DoRawLog(char **param_1,ulong *param_2,char *param_3,...)
{
char in_AL;
int iVar1;
int8 in_RCX;
int8 in_R8;
int8 in_R9;
int8 in_XMM0_Qa;
int8 in_XMM1_Qa;
int8 in_XMM2_Qa;
int8 in_XMM3_Qa;
int8 in_XMM4_Qa;
int8 in_XMM5_Qa;
int8 in_XMM6_Qa;
int8 in_XMM7_Qa;
int1 local_108 [24];
int8 local_f0;
int8 local_e8;
int8 local_e0;
int8 local_d8;
int8 local_c8;
int8 local_b8;
int8 local_a8;
int8 local_98;
int8 local_88;
int8 local_78;
int8 local_68;
int4 local_48;
int4 local_44;
int1 *local_40;
int1 *local_38;
char *local_28;
ulong *local_20;
char **local_18;
int1 local_9;
if (in_AL != '\0') {
local_d8 = in_XMM0_Qa;
local_c8 = in_XMM1_Qa;
local_b8 = in_XMM2_Qa;
local_a8 = in_XMM3_Qa;
local_98 = in_XMM4_Qa;
local_88 = in_XMM5_Qa;
local_78 = in_XMM6_Qa;
local_68 = in_XMM7_Qa;
}
local_38 = local_108;
local_40 = &stack0x00000008;
local_44 = 0x30;
local_48 = 0x18;
local_f0 = in_RCX;
local_e8 = in_R8;
local_e0 = in_R9;
local_28 = param_3;
local_20 = param_2;
local_18 = param_1;
iVar1 = vsnprintf(*param_1,*param_2,param_3,&local_48);
if ((iVar1 < 0) || (*local_20 < (ulong)(long)iVar1)) {
local_9 = 0;
}
else {
*local_20 = *local_20 - (long)iVar1;
*local_18 = *local_18 + iVar1;
local_9 = 1;
}
return local_9;
}
|
|
64,382 |
mi_kpointer
|
eloqsql/storage/myisam/mi_search.c
|
void _mi_kpointer(register MI_INFO *info, register uchar *buff, my_off_t pos)
{
pos/=MI_MIN_KEY_BLOCK_LENGTH;
switch (info->s->base.key_reflength) {
#if SIZEOF_OFF_T > 4
case 7: mi_int7store(buff,pos); break;
case 6: mi_int6store(buff,pos); break;
case 5: mi_int5store(buff,pos); break;
#else
case 7: *buff++=0;
/* fall through */
case 6: *buff++=0;
/* fall through */
case 5: *buff++=0;
/* fall through */
#endif
case 4: mi_int4store(buff,pos); break;
case 3: mi_int3store(buff,pos); break;
case 2: mi_int2store(buff,(uint) pos); break;
case 1: buff[0]= (uchar) pos; break;
default: abort(); /* impossible */
}
}
|
O3
|
c
|
mi_kpointer:
movq (%rdi), %rax
movl 0x17c(%rax), %ecx
decl %ecx
cmpl $0x6, %ecx
ja 0x852b7
movq %rdx, %rax
shrq $0xa, %rax
leaq 0x5c94d(%rip), %rdi # 0xe1b2c
movslq (%rdi,%rcx,4), %rcx
addq %rdi, %rcx
jmpq *%rcx
movb %al, 0x1(%rsi)
shrq $0x12, %rdx
jmp 0x852b1
movb %al, 0x4(%rsi)
movq %rdx, %rax
shrq $0x2a, %rax
movl %edx, %ecx
shrl $0x12, %ecx
movb %cl, 0x3(%rsi)
movq %rdx, %rcx
shrq $0x1a, %rcx
movb %cl, 0x2(%rsi)
shrq $0x22, %rdx
movb %dl, 0x1(%rsi)
jmp 0x852b4
movb %al, 0x2(%rsi)
movl %edx, %eax
shrl $0x12, %eax
movb %al, 0x1(%rsi)
shrq $0x1a, %rdx
jmp 0x852b1
movb %al, 0x3(%rsi)
movl %edx, %eax
shrl $0x12, %eax
movb %al, 0x2(%rsi)
movq %rdx, %rax
shrq $0x1a, %rax
movb %al, 0x1(%rsi)
shrq $0x22, %rdx
jmp 0x852b1
movq %rdx, %rcx
shrq $0x2a, %rcx
movb %al, 0x5(%rsi)
movl %edx, %eax
shrl $0x12, %eax
movb %al, 0x4(%rsi)
movq %rdx, %rax
shrq $0x1a, %rax
movb %al, 0x3(%rsi)
movq %rdx, %rax
shrq $0x22, %rax
movb %al, 0x2(%rsi)
movb %cl, 0x1(%rsi)
shrq $0x32, %rdx
jmp 0x852b1
movq %rdx, %rcx
shrq $0x2a, %rcx
movb %al, 0x6(%rsi)
movl %edx, %eax
shrl $0x12, %eax
movb %al, 0x5(%rsi)
movq %rdx, %rax
shrq $0x1a, %rax
movb %al, 0x4(%rsi)
movq %rdx, %rax
shrq $0x22, %rax
movb %al, 0x3(%rsi)
movb %cl, 0x2(%rsi)
movq %rdx, %rax
shrq $0x32, %rax
movb %al, 0x1(%rsi)
shrq $0x3a, %rdx
movq %rdx, %rax
movb %al, (%rsi)
retq
pushq %rbp
movq %rsp, %rbp
callq 0x29610
|
_mi_kpointer:
mov rax, [rdi]
mov ecx, [rax+17Ch]
dec ecx; switch 7 cases
cmp ecx, 6
ja def_851E6; jumptable 00000000000851E6 default case
mov rax, rdx
shr rax, 0Ah
lea rdi, jpt_851E6
movsxd rcx, ds:(jpt_851E6 - 0E1B2Ch)[rdi+rcx*4]
add rcx, rdi
jmp rcx; switch jump
loc_851E8:
mov [rsi+1], al; jumptable 00000000000851E6 case 2
shr rdx, 12h
jmp loc_852B1
loc_851F4:
mov [rsi+4], al; jumptable 00000000000851E6 case 5
mov rax, rdx
shr rax, 2Ah
mov ecx, edx
shr ecx, 12h
mov [rsi+3], cl
mov rcx, rdx
shr rcx, 1Ah
mov [rsi+2], cl
shr rdx, 22h
mov [rsi+1], dl
jmp loc_852B4; jumptable 00000000000851E6 case 1
loc_8521C:
mov [rsi+2], al; jumptable 00000000000851E6 case 3
mov eax, edx
shr eax, 12h
mov [rsi+1], al
shr rdx, 1Ah
jmp loc_852B1
loc_85230:
mov [rsi+3], al; jumptable 00000000000851E6 case 4
mov eax, edx
shr eax, 12h
mov [rsi+2], al
mov rax, rdx
shr rax, 1Ah
mov [rsi+1], al
shr rdx, 22h
jmp short loc_852B1
loc_8524B:
mov rcx, rdx; jumptable 00000000000851E6 case 6
shr rcx, 2Ah
mov [rsi+5], al
mov eax, edx
shr eax, 12h
mov [rsi+4], al
mov rax, rdx
shr rax, 1Ah
mov [rsi+3], al
mov rax, rdx
shr rax, 22h
mov [rsi+2], al
mov [rsi+1], cl
shr rdx, 32h
jmp short loc_852B1
loc_8527A:
mov rcx, rdx; jumptable 00000000000851E6 case 7
shr rcx, 2Ah
mov [rsi+6], al
mov eax, edx
shr eax, 12h
mov [rsi+5], al
mov rax, rdx
shr rax, 1Ah
mov [rsi+4], al
mov rax, rdx
shr rax, 22h
mov [rsi+3], al
mov [rsi+2], cl
mov rax, rdx
shr rax, 32h
mov [rsi+1], al
shr rdx, 3Ah
loc_852B1:
mov rax, rdx
loc_852B4:
mov [rsi], al; jumptable 00000000000851E6 case 1
retn
def_851E6:
push rbp; jumptable 00000000000851E6 default case
mov rbp, rsp
call _abort
|
unsigned long long mi_kpointer(long long a1, _BYTE *a2, unsigned long long a3)
{
unsigned long long result; // rax
unsigned long long v4; // rdx
result = a3 >> 10;
switch ( *(_DWORD *)(*(_QWORD *)a1 + 380LL) )
{
case 1:
goto LABEL_9;
case 2:
a2[1] = result;
v4 = a3 >> 18;
goto LABEL_8;
case 3:
a2[2] = result;
a2[1] = (unsigned int)a3 >> 18;
v4 = a3 >> 26;
goto LABEL_8;
case 4:
a2[3] = result;
a2[2] = (unsigned int)a3 >> 18;
a2[1] = a3 >> 26;
v4 = a3 >> 34;
goto LABEL_8;
case 5:
a2[4] = result;
result = a3 >> 42;
a2[3] = (unsigned int)a3 >> 18;
a2[2] = a3 >> 26;
a2[1] = a3 >> 34;
goto LABEL_9;
case 6:
a2[5] = result;
a2[4] = (unsigned int)a3 >> 18;
a2[3] = a3 >> 26;
a2[2] = a3 >> 34;
a2[1] = a3 >> 42;
v4 = a3 >> 50;
goto LABEL_8;
case 7:
a2[6] = result;
a2[5] = (unsigned int)a3 >> 18;
a2[4] = a3 >> 26;
a2[3] = a3 >> 34;
a2[2] = a3 >> 42;
a2[1] = a3 >> 50;
v4 = a3 >> 58;
LABEL_8:
result = v4;
LABEL_9:
*a2 = result;
return result;
default:
abort(a1, a2, a3);
}
}
|
_mi_kpointer:
MOV RAX,qword ptr [RDI]
MOV ECX,dword ptr [RAX + 0x17c]
DEC ECX
CMP ECX,0x6
JA 0x001852b7
MOV RAX,RDX
SHR RAX,0xa
LEA RDI,[0x1e1b2c]
MOVSXD RCX,dword ptr [RDI + RCX*0x4]
ADD RCX,RDI
switchD:
JMP RCX
caseD_2:
MOV byte ptr [RSI + 0x1],AL
SHR RDX,0x12
JMP 0x001852b1
caseD_5:
MOV byte ptr [RSI + 0x4],AL
MOV RAX,RDX
SHR RAX,0x2a
MOV ECX,EDX
SHR ECX,0x12
MOV byte ptr [RSI + 0x3],CL
MOV RCX,RDX
SHR RCX,0x1a
MOV byte ptr [RSI + 0x2],CL
SHR RDX,0x22
MOV byte ptr [RSI + 0x1],DL
JMP 0x001852b4
caseD_3:
MOV byte ptr [RSI + 0x2],AL
MOV EAX,EDX
SHR EAX,0x12
MOV byte ptr [RSI + 0x1],AL
SHR RDX,0x1a
JMP 0x001852b1
caseD_4:
MOV byte ptr [RSI + 0x3],AL
MOV EAX,EDX
SHR EAX,0x12
MOV byte ptr [RSI + 0x2],AL
MOV RAX,RDX
SHR RAX,0x1a
MOV byte ptr [RSI + 0x1],AL
SHR RDX,0x22
JMP 0x001852b1
caseD_6:
MOV RCX,RDX
SHR RCX,0x2a
MOV byte ptr [RSI + 0x5],AL
MOV EAX,EDX
SHR EAX,0x12
MOV byte ptr [RSI + 0x4],AL
MOV RAX,RDX
SHR RAX,0x1a
MOV byte ptr [RSI + 0x3],AL
MOV RAX,RDX
SHR RAX,0x22
MOV byte ptr [RSI + 0x2],AL
MOV byte ptr [RSI + 0x1],CL
SHR RDX,0x32
JMP 0x001852b1
caseD_7:
MOV RCX,RDX
SHR RCX,0x2a
MOV byte ptr [RSI + 0x6],AL
MOV EAX,EDX
SHR EAX,0x12
MOV byte ptr [RSI + 0x5],AL
MOV RAX,RDX
SHR RAX,0x1a
MOV byte ptr [RSI + 0x4],AL
MOV RAX,RDX
SHR RAX,0x22
MOV byte ptr [RSI + 0x3],AL
MOV byte ptr [RSI + 0x2],CL
MOV RAX,RDX
SHR RAX,0x32
MOV byte ptr [RSI + 0x1],AL
SHR RDX,0x3a
LAB_001852b1:
MOV RAX,RDX
caseD_1:
MOV byte ptr [RSI],AL
RET
default:
PUSH RBP
MOV RBP,RSP
CALL 0x00129610
|
void _mi_kpointer(long *param_1,byte *param_2,ulong param_3)
{
byte bVar1;
bVar1 = (byte)(param_3 >> 10);
switch(*(int4 *)(*param_1 + 0x17c)) {
case 1:
break;
case 2:
param_2[1] = bVar1;
bVar1 = (byte)(param_3 >> 0x12);
break;
case 3:
param_2[2] = bVar1;
param_2[1] = (byte)(param_3 >> 0x12);
bVar1 = (byte)(param_3 >> 0x1a);
break;
case 4:
param_2[3] = bVar1;
param_2[2] = (byte)(param_3 >> 0x12);
param_2[1] = (byte)(param_3 >> 0x1a);
bVar1 = (byte)(param_3 >> 0x22);
break;
case 5:
param_2[4] = bVar1;
bVar1 = (byte)(param_3 >> 0x2a);
param_2[3] = (byte)(param_3 >> 0x12);
param_2[2] = (byte)(param_3 >> 0x1a);
param_2[1] = (byte)(param_3 >> 0x22);
break;
case 6:
param_2[5] = bVar1;
param_2[4] = (byte)(param_3 >> 0x12);
param_2[3] = (byte)(param_3 >> 0x1a);
param_2[2] = (byte)(param_3 >> 0x22);
param_2[1] = (byte)(param_3 >> 0x2a);
bVar1 = (byte)(param_3 >> 0x32);
break;
case 7:
param_2[6] = bVar1;
param_2[5] = (byte)(param_3 >> 0x12);
param_2[4] = (byte)(param_3 >> 0x1a);
param_2[3] = (byte)(param_3 >> 0x22);
param_2[2] = (byte)(param_3 >> 0x2a);
param_2[1] = (byte)(param_3 >> 0x32);
bVar1 = (byte)(param_3 >> 0x3a);
break;
default:
/* WARNING: Subroutine does not return */
abort();
}
*param_2 = bVar1;
return;
}
|
|
64,383 |
Value::leakyRelu(double)
|
deependujha[P]DeepTensor/csrc/value.cc
|
std::shared_ptr<Value> Value::leakyRelu(double alpha) {
// Forward pass: compute LeakyReLU(x)
double leakyReluData = this->data > 0 ? this->data : alpha * this->data;
std::unordered_set<std::shared_ptr<Value>> prev = {shared_from_this()};
std::shared_ptr<Value> newVal =
std::make_shared<Value>(leakyReluData, std::move(prev), 'l');
// Backward pass: gradient of LeakyReLU(x)
std::function<void()> add_backward = [this, alpha, newVal]() {
double gradFactor = this->data > 0 ? 1.0 : alpha;
this->grad += gradFactor * newVal->grad;
};
newVal->setBackWardMethod(add_backward);
return newVal;
}
|
O2
|
cpp
|
Value::leakyRelu(double):
pushq %r15
pushq %r14
pushq %rbx
subq $0xc0, %rsp
movapd %xmm0, %xmm3
movq %rsi, %r14
movq %rdi, %rbx
movsd 0x30(%rsi), %xmm0
xorpd %xmm1, %xmm1
cmpltsd %xmm0, %xmm1
movapd %xmm1, %xmm2
andpd %xmm0, %xmm1
movsd %xmm3, 0x38(%rsp)
mulsd %xmm3, %xmm0
andnpd %xmm0, %xmm2
orpd %xmm2, %xmm1
movlpd %xmm1, 0x40(%rsp)
leaq 0x10(%rsp), %rdi
callq 0x208ee
leaq 0x20(%rsp), %rdx
leaq 0xe(%rsp), %rax
movq %rax, (%rsp)
leaq 0x88(%rsp), %rdi
leaq 0x10(%rsp), %rsi
leaq 0x68(%rsp), %r8
leaq 0xf(%rsp), %r9
xorl %ecx, %ecx
callq 0x20914
leaq 0x18(%rsp), %r15
movq %r15, %rdi
callq 0x11278
movb $0x6c, -0x8(%r15)
leaq 0x40(%rsp), %rsi
leaq 0x88(%rsp), %rdx
leaq 0x10(%rsp), %rcx
movq %rbx, %rdi
callq 0x2022e
leaq 0x78(%rsp), %rdi
movq %r14, -0x10(%rdi)
movsd 0x38(%rsp), %xmm0
movsd %xmm0, -0x8(%rdi)
movq %rbx, %rsi
callq 0x11244
xorpd %xmm0, %xmm0
movapd %xmm0, 0x20(%rsp)
movapd %xmm0, 0x10(%rsp)
pushq $0x20
popq %rdi
callq 0xb530
leaq 0x80(%rsp), %rdi
movupd -0x18(%rdi), %xmm0
movupd -0x8(%rdi), %xmm1
andq $0x0, (%rdi)
andq $0x0, -0x8(%rdi)
movupd %xmm0, (%rax)
movupd %xmm1, 0x10(%rax)
leaq 0x10(%rsp), %r15
movq %rax, (%r15)
leaq 0xd5d(%rip), %rax # 0x2003a
movq %rax, 0x18(%r15)
leaq 0xd90(%rip), %rax # 0x20078
movq %rax, 0x10(%r15)
callq 0x11278
movq (%rbx), %r14
leaq 0x48(%rsp), %rdi
movq %r15, %rsi
callq 0x20252
addq $0x10, %r14
leaq 0x48(%rsp), %rsi
movq %r14, %rdi
callq 0x202e0
leaq 0x48(%rsp), %rdi
callq 0x116e2
leaq 0x10(%rsp), %rdi
callq 0x116e2
leaq 0x88(%rsp), %rdi
callq 0x117aa
movq %rbx, %rax
addq $0xc0, %rsp
popq %rbx
popq %r14
popq %r15
retq
movq %rax, %r14
leaq 0x48(%rsp), %rdi
callq 0x116e2
jmp 0x1f355
movq %rax, %r14
leaq 0x10(%rsp), %rdi
callq 0x116e2
jmp 0x1f37b
movq %rax, %r14
leaq 0x10(%rsp), %rdi
callq 0x116e2
leaq 0x80(%rsp), %rdi
callq 0x11278
addq $0x8, %rbx
movq %rbx, %rdi
callq 0x11278
jmp 0x1f38c
movq %rax, %r14
leaq 0x88(%rsp), %rdi
callq 0x117aa
jmp 0x1f3ad
movq %rax, %r14
leaq 0x18(%rsp), %rdi
callq 0x11278
jmp 0x1f3ad
movq %rax, %r14
movq %r14, %rdi
callq 0xba20
nop
|
_ZN5Value9leakyReluEd:
push r15
push r14
push rbx
sub rsp, 0C0h
movapd xmm3, xmm0
mov r14, rsi
mov rbx, rdi
movsd xmm0, qword ptr [rsi+30h]
xorpd xmm1, xmm1
cmpltsd xmm1, xmm0
movapd xmm2, xmm1
andpd xmm1, xmm0
movsd [rsp+0D8h+var_A0], xmm3
mulsd xmm0, xmm3
andnpd xmm2, xmm0
orpd xmm1, xmm2
movlpd [rsp+0D8h+var_98], xmm1
lea rdi, [rsp+0D8h+var_C8]
call _ZNSt12__shared_ptrI5ValueLN9__gnu_cxx12_Lock_policyE2EEC2IS0_vEERKSt10__weak_ptrIT_LS2_2EE; std::__shared_ptr<Value,(__gnu_cxx::_Lock_policy)2>::__shared_ptr<Value,void>(std::__weak_ptr<Value,(__gnu_cxx::_Lock_policy)2> const&)
lea rdx, [rsp+0D8h+var_B8]
lea rax, [rsp+0D8h+var_CA]
mov [rsp+0D8h+var_D8], rax
lea rdi, [rsp+0D8h+var_50]
lea rsi, [rsp+0D8h+var_C8]
lea r8, [rsp+0D8h+var_70]
lea r9, [rsp+0D8h+var_C9]
xor ecx, ecx
call _ZNSt10_HashtableISt10shared_ptrI5ValueES2_SaIS2_ENSt8__detail9_IdentityESt8equal_toIS2_ESt4hashIS2_ENS4_18_Mod_range_hashingENS4_20_Default_ranged_hashENS4_20_Prime_rehash_policyENS4_17_Hashtable_traitsILb0ELb1ELb1EEEEC2IPKS2_EET_SJ_mRKS9_RKS7_RKS3_St17integral_constantIbLb1EE; std::_Hashtable<std::shared_ptr<Value>,std::shared_ptr<Value>,std::allocator<std::shared_ptr<Value>>,std::__detail::_Identity,std::equal_to<std::shared_ptr<Value>>,std::hash<std::shared_ptr<Value>>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<false,true,true>>::_Hashtable<std::shared_ptr<Value> const*>(std::shared_ptr<Value> const*,std::shared_ptr<Value> const*,ulong,std::hash<std::shared_ptr<Value>> const&,std::equal_to<std::shared_ptr<Value>> const&,std::allocator<std::shared_ptr<Value>> const&,std::integral_constant<bool,true>)
lea r15, [rsp+0D8h+var_C8+8]
mov rdi, r15
call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count()
mov byte ptr [r15-8], 6Ch ; 'l'
lea rsi, [rsp+0D8h+var_98]
lea rdx, [rsp+0D8h+var_50]
lea rcx, [rsp+0D8h+var_C8]
mov rdi, rbx
call _ZSt11make_sharedI5ValueJRdSt13unordered_setISt10shared_ptrIS0_ESt4hashIS4_ESt8equal_toIS4_ESaIS4_EEcEES3_IT_EDpOT0_; std::make_shared<Value,double &,std::unordered_set<std::shared_ptr<Value>>,char>(double &,std::unordered_set<std::shared_ptr<Value>>,char &&)
lea rdi, [rsp+0D8h+var_60]
mov [rdi-10h], r14
movsd xmm0, [rsp+0D8h+var_A0]
movsd qword ptr [rdi-8], xmm0
mov rsi, rbx
call _ZNSt12__shared_ptrI5ValueLN9__gnu_cxx12_Lock_policyE2EEC2ERKS3_; std::__shared_ptr<Value,(__gnu_cxx::_Lock_policy)2>::__shared_ptr(std::__shared_ptr<Value,(__gnu_cxx::_Lock_policy)2> const&)
xorpd xmm0, xmm0
movapd [rsp+0D8h+var_B8], xmm0
movapd [rsp+0D8h+var_C8], xmm0
push 20h ; ' '
pop rdi; unsigned __int64
call __Znwm; operator new(ulong)
lea rdi, [rsp+0D8h+var_58]
movupd xmm0, xmmword ptr [rdi-18h]
movupd xmm1, xmmword ptr [rdi-8]
and qword ptr [rdi], 0
and qword ptr [rdi-8], 0
movupd xmmword ptr [rax], xmm0
movupd xmmword ptr [rax+10h], xmm1
lea r15, [rsp+0D8h+var_C8]
mov [r15], rax
lea rax, _ZNSt17_Function_handlerIFvvEZN5Value9leakyReluEdE3$_0E9_M_invokeERKSt9_Any_data; std::_Function_handler<void ()(void),Value::leakyRelu(double)::$_0>::_M_invoke(std::_Any_data const&)
mov [r15+18h], rax
lea rax, _ZNSt17_Function_handlerIFvvEZN5Value9leakyReluEdE3$_0E10_M_managerERSt9_Any_dataRKS4_St18_Manager_operation; std::_Function_handler<void ()(void),Value::leakyRelu(double)::$_0>::_M_manager(std::_Any_data &,std::_Any_data const&,std::_Manager_operation)
mov [r15+10h], rax
call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count()
mov r14, [rbx]
lea rdi, [rsp+0D8h+var_90]
mov rsi, r15
call _ZNSt8functionIFvvEEC2ERKS1_; std::function<void ()(void)>::function(std::function<void ()(void)> const&)
add r14, 10h
lea rsi, [rsp+0D8h+var_90]
mov rdi, r14
call _ZNSt8functionIFvvEEaSERKS1_; std::function<void ()(void)>::operator=(std::function<void ()(void)> const&)
lea rdi, [rsp+0D8h+var_90]; this
call _ZNSt14_Function_baseD2Ev; std::_Function_base::~_Function_base()
lea rdi, [rsp+0D8h+var_C8]; this
call _ZNSt14_Function_baseD2Ev; std::_Function_base::~_Function_base()
lea rdi, [rsp+0D8h+var_50]
call _ZNSt10_HashtableISt10shared_ptrI5ValueES2_SaIS2_ENSt8__detail9_IdentityESt8equal_toIS2_ESt4hashIS2_ENS4_18_Mod_range_hashingENS4_20_Default_ranged_hashENS4_20_Prime_rehash_policyENS4_17_Hashtable_traitsILb0ELb1ELb1EEEED2Ev; std::_Hashtable<std::shared_ptr<Value>,std::shared_ptr<Value>,std::allocator<std::shared_ptr<Value>>,std::__detail::_Identity,std::equal_to<std::shared_ptr<Value>>,std::hash<std::shared_ptr<Value>>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<false,true,true>>::~_Hashtable()
mov rax, rbx
add rsp, 0C0h
pop rbx
pop r14
pop r15
retn
mov r14, rax
lea rdi, [rsp+arg_40]; this
call _ZNSt14_Function_baseD2Ev; std::_Function_base::~_Function_base()
jmp short loc_1F355
mov r14, rax
loc_1F355:
lea rdi, [rsp+arg_8]; this
call _ZNSt14_Function_baseD2Ev; std::_Function_base::~_Function_base()
jmp short loc_1F37B
mov r14, rax
lea rdi, [rsp+arg_8]; this
call _ZNSt14_Function_baseD2Ev; std::_Function_base::~_Function_base()
lea rdi, [rsp+arg_78]
call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count()
loc_1F37B:
add rbx, 8
mov rdi, rbx
call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count()
jmp short loc_1F38C
mov r14, rax
loc_1F38C:
lea rdi, [rsp+arg_80]
call _ZNSt10_HashtableISt10shared_ptrI5ValueES2_SaIS2_ENSt8__detail9_IdentityESt8equal_toIS2_ESt4hashIS2_ENS4_18_Mod_range_hashingENS4_20_Default_ranged_hashENS4_20_Prime_rehash_policyENS4_17_Hashtable_traitsILb0ELb1ELb1EEEED2Ev; std::_Hashtable<std::shared_ptr<Value>,std::shared_ptr<Value>,std::allocator<std::shared_ptr<Value>>,std::__detail::_Identity,std::equal_to<std::shared_ptr<Value>>,std::hash<std::shared_ptr<Value>>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<false,true,true>>::~_Hashtable()
jmp short loc_1F3AD
mov r14, rax
lea rdi, [rsp+arg_10]
call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count()
jmp short loc_1F3AD
mov r14, rax
loc_1F3AD:
mov rdi, r14
call __Unwind_Resume
|
Value * Value::leakyRelu(Value *this, double a2, long long a3)
{
__m128d v4; // xmm0
double v5; // xmm2_8
_OWORD *v6; // rax
__int128 v7; // xmm1
long long v8; // r14
char v10; // [rsp+Eh] [rbp-CAh] BYREF
char v11; // [rsp+Fh] [rbp-C9h] BYREF
__int128 v12; // [rsp+10h] [rbp-C8h] BYREF
__int128 v13; // [rsp+20h] [rbp-B8h] BYREF
double v14; // [rsp+38h] [rbp-A0h]
unsigned long long v15; // [rsp+40h] [rbp-98h] BYREF
_BYTE v16[32]; // [rsp+48h] [rbp-90h] BYREF
__int128 v17; // [rsp+68h] [rbp-70h] BYREF
__int128 v18; // [rsp+78h] [rbp-60h] BYREF
_QWORD v19[10]; // [rsp+88h] [rbp-50h] BYREF
v4.m128d_f64[0] = *(double *)(a3 + 48);
v5 = _mm_cmplt_sd((__m128d)0LL, v4).m128d_f64[0];
v14 = a2;
v15 = *(_QWORD *)&v5 & *(_QWORD *)&v4.m128d_f64[0] | ~*(_QWORD *)&v5 & COERCE_UNSIGNED_INT64(v4.m128d_f64[0] * a2);
std::__shared_ptr<Value,(__gnu_cxx::_Lock_policy)2>::__shared_ptr<Value,void>(&v12, a3);
std::_Hashtable<std::shared_ptr<Value>,std::shared_ptr<Value>,std::allocator<std::shared_ptr<Value>>,std::__detail::_Identity,std::equal_to<std::shared_ptr<Value>>,std::hash<std::shared_ptr<Value>>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<false,true,true>>::_Hashtable<std::shared_ptr<Value> const*>(
(unsigned int)v19,
(unsigned int)&v12,
(unsigned int)&v13,
0,
(unsigned int)&v17,
(unsigned int)&v11,
(long long)&v10);
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count((_QWORD *)&v12 + 1);
LOBYTE(v12) = 108;
std::make_shared<Value,double &,std::unordered_set<std::shared_ptr<Value>>,char>(this, &v15, v19, &v12);
*(_QWORD *)&v17 = a3;
*((double *)&v17 + 1) = v14;
std::__shared_ptr<Value,(__gnu_cxx::_Lock_policy)2>::__shared_ptr(&v18, this);
v13 = 0LL;
v12 = 0LL;
v6 = (_OWORD *)operator new(0x20uLL);
v7 = v18;
v18 = 0uLL;
*v6 = v17;
v6[1] = v7;
*(_QWORD *)&v12 = v6;
*((_QWORD *)&v13 + 1) = std::_Function_handler<void ()(void),Value::leakyRelu(double)::$_0>::_M_invoke;
*(_QWORD *)&v13 = std::_Function_handler<void ()(void),Value::leakyRelu(double)::$_0>::_M_manager;
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count((_QWORD *)&v18 + 1);
v8 = *(_QWORD *)this;
std::function<void ()(void)>::function(v16, &v12);
std::function<void ()(void)>::operator=(v8 + 16, v16);
std::_Function_base::~_Function_base((std::_Function_base *)v16);
std::_Function_base::~_Function_base((std::_Function_base *)&v12);
std::_Hashtable<std::shared_ptr<Value>,std::shared_ptr<Value>,std::allocator<std::shared_ptr<Value>>,std::__detail::_Identity,std::equal_to<std::shared_ptr<Value>>,std::hash<std::shared_ptr<Value>>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<false,true,true>>::~_Hashtable(v19);
return this;
}
|
leakyRelu:
PUSH R15
PUSH R14
PUSH RBX
SUB RSP,0xc0
MOVAPD XMM3,XMM0
MOV R14,RSI
MOV RBX,RDI
MOVSD XMM0,qword ptr [RSI + 0x30]
XORPD XMM1,XMM1
CMPLTSD XMM1,XMM0
MOVAPD XMM2,XMM1
ANDPD XMM1,XMM0
MOVSD qword ptr [RSP + 0x38],XMM3
MULSD XMM0,XMM3
ANDNPD XMM2,XMM0
ORPD XMM1,XMM2
MOVLPD qword ptr [RSP + 0x40],XMM1
LAB_0011f214:
LEA RDI,[RSP + 0x10]
CALL 0x001208ee
LEA RDX,[RSP + 0x20]
LAB_0011f223:
LEA RAX,[RSP + 0xe]
MOV qword ptr [RSP],RAX
LEA RDI,[RSP + 0x88]
LEA RSI,[RSP + 0x10]
LEA R8,[RSP + 0x68]
LEA R9,[RSP + 0xf]
XOR ECX,ECX
CALL 0x00120914
LEA R15,[RSP + 0x18]
MOV RDI,R15
CALL 0x00111278
MOV byte ptr [R15 + -0x8],0x6c
LAB_0011f25c:
LEA RSI,[RSP + 0x40]
LEA RDX,[RSP + 0x88]
LEA RCX,[RSP + 0x10]
MOV RDI,RBX
CALL 0x0012022e
LEA RDI,[RSP + 0x78]
MOV qword ptr [RDI + -0x10],R14
MOVSD XMM0,qword ptr [RSP + 0x38]
MOVSD qword ptr [RDI + -0x8],XMM0
MOV RSI,RBX
CALL 0x00111244
XORPD XMM0,XMM0
MOVAPD xmmword ptr [RSP + 0x20],XMM0
MOVAPD xmmword ptr [RSP + 0x10],XMM0
LAB_0011f2a2:
PUSH 0x20
POP RDI
CALL 0x0010b530
LEA RDI,[RSP + 0x80]
MOVUPD XMM0,xmmword ptr [RDI + -0x18]
MOVUPD XMM1,xmmword ptr [RDI + -0x8]
AND qword ptr [RDI],0x0
AND qword ptr [RDI + -0x8],0x0
MOVUPD xmmword ptr [RAX],XMM0
MOVUPD xmmword ptr [RAX + 0x10],XMM1
LEA R15,[RSP + 0x10]
MOV qword ptr [R15],RAX
LEA RAX,[0x12003a]
MOV qword ptr [R15 + 0x18],RAX
LEA RAX,[0x120078]
MOV qword ptr [R15 + 0x10],RAX
CALL 0x00111278
MOV R14,qword ptr [RBX]
LAB_0011f2f4:
LEA RDI,[RSP + 0x48]
MOV RSI,R15
CALL 0x00120252
ADD R14,0x10
LAB_0011f305:
LEA RSI,[RSP + 0x48]
MOV RDI,R14
CALL 0x001202e0
LAB_0011f312:
LEA RDI,[RSP + 0x48]
CALL 0x001116e2
LEA RDI,[RSP + 0x10]
CALL 0x001116e2
LEA RDI,[RSP + 0x88]
CALL 0x001117aa
MOV RAX,RBX
ADD RSP,0xc0
POP RBX
POP R14
POP R15
RET
|
/* Value::leakyRelu(double) */
void Value::leakyRelu(double param_1)
{
double dVar1;
long lVar2;
int8 uVar3;
int8 uVar4;
__weak_ptr *in_RSI;
__shared_ptr *in_RDI;
int1 local_ca;
int1 local_c9;
int8 *local_c8;
int8 uStack_c0;
code *local_b8;
code *pcStack_b0;
double local_a0;
ulong local_98;
function<void()> local_90 [32];
__weak_ptr *local_70;
double dStack_68;
int8 local_60;
int8 uStack_58;
_Hashtable<std::shared_ptr<Value>,std::shared_ptr<Value>,std::allocator<std::shared_ptr<Value>>,std::__detail::_Identity,std::equal_to<std::shared_ptr<Value>>,std::hash<std::shared_ptr<Value>>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<false,true,true>>
local_50 [56];
dVar1 = *(double *)(in_RSI + 0x30);
local_98 = -(ulong)(0.0 < dVar1) & (ulong)dVar1 |
~-(ulong)(0.0 < dVar1) & (ulong)(dVar1 * param_1);
/* try { // try from 0011f214 to 0011f21d has its CatchHandler @ 0011f3aa */
local_a0 = param_1;
std::__shared_ptr<Value,(__gnu_cxx::_Lock_policy)2>::__shared_ptr<Value,void>
((__shared_ptr<Value,(__gnu_cxx::_Lock_policy)2> *)&local_c8,in_RSI);
/* try { // try from 0011f223 to 0011f249 has its CatchHandler @ 0011f39b */
std::
_Hashtable<std::shared_ptr<Value>,std::shared_ptr<Value>,std::allocator<std::shared_ptr<Value>>,std::__detail::_Identity,std::equal_to<std::shared_ptr<Value>>,std::hash<std::shared_ptr<Value>>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<false,true,true>>
::_Hashtable<std::shared_ptr<Value>const*>
(local_50,&local_c8,&local_b8,0,&local_70,&local_c9,&local_ca);
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count
((__shared_count<(__gnu_cxx::_Lock_policy)2> *)&uStack_c0);
local_c8 = (int8 *)CONCAT71(local_c8._1_7_,0x6c);
/* try { // try from 0011f25c to 0011f275 has its CatchHandler @ 0011f389 */
std::
make_shared<Value,double&,std::unordered_set<std::shared_ptr<Value>,std::hash<std::shared_ptr<Value>>,std::equal_to<std::shared_ptr<Value>>,std::allocator<std::shared_ptr<Value>>>,char>
((double *)in_RDI,(unordered_set *)&local_98,(char *)local_50);
dStack_68 = local_a0;
local_70 = in_RSI;
std::__shared_ptr<Value,(__gnu_cxx::_Lock_policy)2>::__shared_ptr
((__shared_ptr<Value,(__gnu_cxx::_Lock_policy)2> *)&local_60,in_RDI);
local_b8 = (code *)0x0;
pcStack_b0 = (code *)0x0;
local_c8 = (int8 *)0x0;
uStack_c0 = 0;
/* try { // try from 0011f2a2 to 0011f2a9 has its CatchHandler @ 0011f361 */
local_c8 = (int8 *)operator_new(0x20);
uVar4 = uStack_58;
uVar3 = local_60;
uStack_58 = 0;
local_60 = 0;
*local_c8 = local_70;
local_c8[1] = dStack_68;
local_c8[2] = uVar3;
local_c8[3] = uVar4;
pcStack_b0 = std::_Function_handler<void(),Value::leakyRelu(double)::$_0>::_M_invoke;
local_b8 = std::_Function_handler<void(),Value::leakyRelu(double)::$_0>::_M_manager;
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count
((__shared_count<(__gnu_cxx::_Lock_policy)2> *)&uStack_58);
lVar2 = *(long *)in_RDI;
/* try { // try from 0011f2f4 to 0011f300 has its CatchHandler @ 0011f352 */
std::function<void()>::function(local_90,(function *)&local_c8);
/* try { // try from 0011f305 to 0011f311 has its CatchHandler @ 0011f343 */
std::function<void()>::operator=((function<void()> *)(lVar2 + 0x10),(function *)local_90);
std::_Function_base::~_Function_base((_Function_base *)local_90);
std::_Function_base::~_Function_base((_Function_base *)&local_c8);
std::
_Hashtable<std::shared_ptr<Value>,std::shared_ptr<Value>,std::allocator<std::shared_ptr<Value>>,std::__detail::_Identity,std::equal_to<std::shared_ptr<Value>>,std::hash<std::shared_ptr<Value>>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<false,true,true>>
::~_Hashtable(local_50);
return;
}
|
|
64,384 |
google::protobuf::compiler::java::ImmutableStringOneofFieldGenerator::ImmutableStringOneofFieldGenerator(google::protobuf::FieldDescriptor const*, int, int, google::protobuf::compiler::java::Context*)
|
aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/compiler/java/string_field.cc
|
ImmutableStringOneofFieldGenerator::ImmutableStringOneofFieldGenerator(
const FieldDescriptor* descriptor, int messageBitIndex, int builderBitIndex,
Context* context)
: ImmutableStringFieldGenerator(descriptor, messageBitIndex,
builderBitIndex, context) {
const OneofGeneratorInfo* info =
context->GetOneofGeneratorInfo(descriptor->containing_oneof());
SetCommonOneofVariables(descriptor, info, &variables_);
}
|
O3
|
cpp
|
google::protobuf::compiler::java::ImmutableStringOneofFieldGenerator::ImmutableStringOneofFieldGenerator(google::protobuf::FieldDescriptor const*, int, int, google::protobuf::compiler::java::Context*):
pushq %r15
pushq %r14
pushq %rbx
movq %r8, %r15
movq %rsi, %r14
movq %rdi, %rbx
callq 0xe5f8c
leaq 0x19247a(%rip), %rax # 0x27a328
movq %rax, (%rbx)
testb $0x10, 0x1(%r14)
je 0xe7ebe
movq 0x28(%r14), %rsi
jmp 0xe7ec0
xorl %esi, %esi
movq %r15, %rdi
callq 0xcef84
leaq 0x18(%rbx), %rdx
movq %r14, %rdi
movq %rax, %rsi
callq 0xd55f7
popq %rbx
popq %r14
popq %r15
retq
movq %rax, %r14
leaq 0x192381(%rip), %rax # 0x27a268
movq %rax, (%rbx)
leaq 0x18(%rbx), %rdi
callq 0x2e5e0
movq %rbx, %rdi
callq 0xd464c
movq %r14, %rdi
callq 0x1f860
nop
|
_ZN6google8protobuf8compiler4java34ImmutableStringOneofFieldGeneratorC2EPKNS0_15FieldDescriptorEiiPNS2_7ContextE:
push r15; int
push r14; int
push rbx; void *
mov r15, r8
mov r14, rsi
mov rbx, rdi
call _ZN6google8protobuf8compiler4java29ImmutableStringFieldGeneratorC2EPKNS0_15FieldDescriptorEiiPNS2_7ContextE; google::protobuf::compiler::java::ImmutableStringFieldGenerator::ImmutableStringFieldGenerator(google::protobuf::FieldDescriptor const*,int,int,google::protobuf::compiler::java::Context *)
lea rax, off_27A328
mov [rbx], rax
test byte ptr [r14+1], 10h
jz short loc_E7EBE
mov rsi, [r14+28h]
jmp short loc_E7EC0
loc_E7EBE:
xor esi, esi
loc_E7EC0:
mov rdi, r15
call _ZNK6google8protobuf8compiler4java7Context21GetOneofGeneratorInfoEPKNS0_15OneofDescriptorE; google::protobuf::compiler::java::Context::GetOneofGeneratorInfo(google::protobuf::OneofDescriptor const*)
lea rdx, [rbx+18h]; int
mov rdi, r14; int
mov rsi, rax; int
call _ZN6google8protobuf8compiler4java23SetCommonOneofVariablesEPKNS0_15FieldDescriptorEPKNS2_18OneofGeneratorInfoEPSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESF_St4lessISF_ESaISt4pairIKSF_SF_EEE; google::protobuf::compiler::java::SetCommonOneofVariables(google::protobuf::FieldDescriptor const*,google::protobuf::compiler::java::OneofGeneratorInfo const*,std::map<std::string,std::string> *)
pop rbx
pop r14
pop r15
retn
mov r14, rax
lea rax, off_27A268
mov [rbx], rax
lea rdi, [rbx+18h]
call _ZNSt8_Rb_treeINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_S5_ESt10_Select1stIS8_ESt4lessIS5_ESaIS8_EED2Ev; std::_Rb_tree<std::string,std::pair<std::string const,std::string>,std::_Select1st<std::pair<std::string const,std::string>>,std::less<std::string>,std::allocator<std::pair<std::string const,std::string>>>::~_Rb_tree()
mov rdi, rbx; this
call _ZN6google8protobuf8compiler4java23ImmutableFieldGeneratorD2Ev; google::protobuf::compiler::java::ImmutableFieldGenerator::~ImmutableFieldGenerator()
mov rdi, r14
call __Unwind_Resume
|
void google::protobuf::compiler::java::ImmutableStringOneofFieldGenerator::ImmutableStringOneofFieldGenerator(
google::protobuf::compiler::java::ImmutableStringOneofFieldGenerator *this,
const google::protobuf::OneofDescriptor **a2,
int a3,
int a4,
google::protobuf::compiler::java::Context *a5)
{
const google::protobuf::OneofDescriptor *v7; // rsi
char *OneofGeneratorInfo; // rax
google::protobuf::compiler::java::ImmutableStringFieldGenerator::ImmutableStringFieldGenerator(
this,
(const google::protobuf::FieldDescriptor *)a2,
a3,
a4,
a5);
*(_QWORD *)this = off_27A328;
if ( (*((_BYTE *)a2 + 1) & 0x10) != 0 )
v7 = a2[5];
else
v7 = 0LL;
OneofGeneratorInfo = google::protobuf::compiler::java::Context::GetOneofGeneratorInfo(a5, v7);
google::protobuf::compiler::java::SetCommonOneofVariables(
(long long)a2,
(_BYTE **)OneofGeneratorInfo,
(long long)this + 24);
}
|
ImmutableStringOneofFieldGenerator:
PUSH R15
PUSH R14
PUSH RBX
MOV R15,R8
MOV R14,RSI
MOV RBX,RDI
CALL 0x001e5f8c
LEA RAX,[0x37a328]
MOV qword ptr [RBX],RAX
TEST byte ptr [R14 + 0x1],0x10
JZ 0x001e7ebe
MOV RSI,qword ptr [R14 + 0x28]
JMP 0x001e7ec0
LAB_001e7ebe:
XOR ESI,ESI
LAB_001e7ec0:
MOV RDI,R15
CALL 0x001cef84
LEA RDX,[RBX + 0x18]
MOV RDI,R14
MOV RSI,RAX
CALL 0x001d55f7
LAB_001e7ed7:
POP RBX
POP R14
POP R15
RET
|
/* google::protobuf::compiler::java::ImmutableStringOneofFieldGenerator::ImmutableStringOneofFieldGenerator(google::protobuf::FieldDescriptor
const*, int, int, google::protobuf::compiler::java::Context*) */
void __thiscall
google::protobuf::compiler::java::ImmutableStringOneofFieldGenerator::
ImmutableStringOneofFieldGenerator
(ImmutableStringOneofFieldGenerator *this,FieldDescriptor *param_1,int param_2,int param_3
,Context *param_4)
{
OneofGeneratorInfo *pOVar1;
OneofDescriptor *pOVar2;
ImmutableStringFieldGenerator::ImmutableStringFieldGenerator
((ImmutableStringFieldGenerator *)this,param_1,param_2,param_3,param_4);
*(int ***)this = &PTR__ImmutableStringOneofFieldGenerator_0037a328;
if (((byte)param_1[1] & 0x10) == 0) {
pOVar2 = (OneofDescriptor *)0x0;
}
else {
pOVar2 = *(OneofDescriptor **)(param_1 + 0x28);
}
/* try { // try from 001e7ec0 to 001e7ed6 has its CatchHandler @ 001e7edd */
pOVar1 = (OneofGeneratorInfo *)Context::GetOneofGeneratorInfo(param_4,pOVar2);
SetCommonOneofVariables(param_1,pOVar1,(map *)(this + 0x18));
return;
}
|
|
64,385 |
void nlohmann::json_abi_v3_11_3::detail::get_arithmetic_value<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>, long, 0>(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const&, long&)
|
monkey531[P]llama/common/./json.hpp
|
void get_arithmetic_value(const BasicJsonType& j, ArithmeticType& val)
{
switch (static_cast<value_t>(j))
{
case value_t::number_unsigned:
{
val = static_cast<ArithmeticType>(*j.template get_ptr<const typename BasicJsonType::number_unsigned_t*>());
break;
}
case value_t::number_integer:
{
val = static_cast<ArithmeticType>(*j.template get_ptr<const typename BasicJsonType::number_integer_t*>());
break;
}
case value_t::number_float:
{
val = static_cast<ArithmeticType>(*j.template get_ptr<const typename BasicJsonType::number_float_t*>());
break;
}
case value_t::null:
case value_t::object:
case value_t::array:
case value_t::string:
case value_t::boolean:
case value_t::binary:
case value_t::discarded:
default:
JSON_THROW(type_error::create(302, concat("type must be number, but is ", j.type_name()), &j));
}
}
|
O2
|
cpp
|
void nlohmann::json_abi_v3_11_3::detail::get_arithmetic_value<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>, long, 0>(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const&, long&):
pushq %rbp
pushq %r14
pushq %rbx
subq $0x30, %rsp
movq %rdi, %r14
movzbl (%rdi), %eax
cmpl $0x5, %eax
je 0x3b6ca
cmpl $0x7, %eax
je 0x3b6d0
cmpl $0x6, %eax
jne 0x3b6e2
movq 0x8(%r14), %rax
jmp 0x3b6d6
cvttsd2si 0x8(%r14), %rax
movq %rax, (%rsi)
addq $0x30, %rsp
popq %rbx
popq %r14
popq %rbp
retq
pushq $0x20
popq %rdi
callq 0x20390
movq %rax, %rbx
movq %r14, %rdi
callq 0x3b8b2
leaq 0x8(%rsp), %rdx
movq %rax, (%rdx)
leaq 0x5ea17(%rip), %rsi # 0x9a11b
leaq 0x10(%rsp), %rdi
callq 0x3b853
movb $0x1, %bpl
leaq 0x10(%rsp), %rdx
movq %rbx, %rdi
movl $0x12e, %esi # imm = 0x12E
movq %r14, %rcx
callq 0x3b766
xorl %ebp, %ebp
leaq 0xa4b89(%rip), %rsi # 0xe02b8
leaq 0xb8ac(%rip), %rdx # 0x46fe2
movq %rbx, %rdi
callq 0x20b30
movq %rax, %r14
leaq 0x10(%rsp), %rdi
callq 0x20d78
testb %bpl, %bpl
jne 0x3b755
jmp 0x3b75d
movq %rax, %r14
movq %rbx, %rdi
callq 0x20520
movq %r14, %rdi
callq 0x20b90
nop
|
_ZN8nlohmann16json_abi_v3_11_36detail20get_arithmetic_valueINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEElTnNSt9enable_ifIXaasr3std13is_arithmeticIT0_EE5valuentsr3std7is_sameISH_NT_9boolean_tEEE5valueEiE4typeELi0EEEvRKSI_RSH_:
push rbp; char
push r14; int
push rbx; int
sub rsp, 30h
mov r14, rdi
movzx eax, byte ptr [rdi]
cmp eax, 5
jz short loc_3B6CA
cmp eax, 7
jz short loc_3B6D0
cmp eax, 6
jnz short loc_3B6E2
loc_3B6CA:
mov rax, [r14+8]
jmp short loc_3B6D6
loc_3B6D0:
cvttsd2si rax, qword ptr [r14+8]
loc_3B6D6:
mov [rsi], rax
add rsp, 30h
pop rbx
pop r14
pop rbp
retn
loc_3B6E2:
push 20h ; ' '
pop rdi; thrown_size
call ___cxa_allocate_exception
mov rbx, rax
mov rdi, r14
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE9type_nameEv; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::type_name(void)
lea rdx, [rsp+48h+var_40]
mov [rdx], rax
lea rsi, aTypeMustBeNumb; "type must be number, but is "
lea rdi, [rsp+48h+var_38]
call _ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJRA29_KcPS9_EEET_DpOT0_; nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[29],char const*>(char const(&)[29],char const* &&)
mov bpl, 1
lea rdx, [rsp+48h+var_38]
mov rdi, rbx; this
mov esi, 12Eh; int
mov rcx, r14
call _ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_
xor ebp, ebp
lea rsi, _ZTIN8nlohmann16json_abi_v3_11_36detail10type_errorE; lptinfo
lea rdx, _ZN8nlohmann16json_abi_v3_11_36detail9exceptionD2Ev; void (*)(void *)
mov rdi, rbx; void *
call ___cxa_throw
mov r14, rax
lea rdi, [rsp+48h+var_38]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
test bpl, bpl
jnz short loc_3B755
jmp short loc_3B75D
mov r14, rax
loc_3B755:
mov rdi, rbx; void *
call ___cxa_free_exception
loc_3B75D:
mov rdi, r14
call __Unwind_Resume
| ||||
64,386 |
void nlohmann::json_abi_v3_11_3::detail::get_arithmetic_value<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>, long, 0>(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const&, long&)
|
monkey531[P]llama/common/./json.hpp
|
void get_arithmetic_value(const BasicJsonType& j, ArithmeticType& val)
{
switch (static_cast<value_t>(j))
{
case value_t::number_unsigned:
{
val = static_cast<ArithmeticType>(*j.template get_ptr<const typename BasicJsonType::number_unsigned_t*>());
break;
}
case value_t::number_integer:
{
val = static_cast<ArithmeticType>(*j.template get_ptr<const typename BasicJsonType::number_integer_t*>());
break;
}
case value_t::number_float:
{
val = static_cast<ArithmeticType>(*j.template get_ptr<const typename BasicJsonType::number_float_t*>());
break;
}
case value_t::null:
case value_t::object:
case value_t::array:
case value_t::string:
case value_t::boolean:
case value_t::binary:
case value_t::discarded:
default:
JSON_THROW(type_error::create(302, concat("type must be number, but is ", j.type_name()), &j));
}
}
|
O3
|
cpp
|
void nlohmann::json_abi_v3_11_3::detail::get_arithmetic_value<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>, long, 0>(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const&, long&):
pushq %rbp
pushq %r14
pushq %rbx
subq $0x30, %rsp
movq %rdi, %r14
movzbl (%rdi), %eax
cmpl $0x5, %eax
je 0x3dd94
cmpl $0x7, %eax
je 0x3dd9a
cmpl $0x6, %eax
jne 0x3ddac
movq 0x8(%r14), %rax
jmp 0x3dda0
cvttsd2si 0x8(%r14), %rax
movq %rax, (%rsi)
addq $0x30, %rsp
popq %rbx
popq %r14
popq %rbp
retq
movl $0x20, %edi
callq 0x18360
movq %rax, %rbx
movq %r14, %rdi
callq 0x3e096
leaq 0x8(%rsp), %rdx
movq %rax, (%rdx)
leaq 0x791c3(%rip), %rsi # 0xb6f93
leaq 0x10(%rsp), %rdi
callq 0x3e00d
movb $0x1, %bpl
leaq 0x10(%rsp), %rdx
movq %rbx, %rdi
movl $0x12e, %esi # imm = 0x12E
movq %r14, %rcx
callq 0x3de42
xorl %ebp, %ebp
leaq 0xb04bd(%rip), %rsi # 0xee2b8
leaq 0xe5ae(%rip), %rdx # 0x4c3b0
movq %rbx, %rdi
callq 0x18b30
movq %rax, %r14
leaq 0x20(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x3de28
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x186a0
testb %bpl, %bpl
jne 0x3de32
jmp 0x3de3a
movq %rax, %r14
movq %rbx, %rdi
callq 0x18500
movq %r14, %rdi
callq 0x18b90
|
_ZN8nlohmann16json_abi_v3_11_36detail20get_arithmetic_valueINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEElTnNSt9enable_ifIXaasr3std13is_arithmeticIT0_EE5valuentsr3std7is_sameISH_NT_9boolean_tEEE5valueEiE4typeELi0EEEvRKSI_RSH_:
push rbp; char
push r14; int
push rbx; __int64
sub rsp, 30h
mov r14, rdi
movzx eax, byte ptr [rdi]
cmp eax, 5
jz short loc_3DD94
cmp eax, 7
jz short loc_3DD9A
cmp eax, 6
jnz short loc_3DDAC
loc_3DD94:
mov rax, [r14+8]
jmp short loc_3DDA0
loc_3DD9A:
cvttsd2si rax, qword ptr [r14+8]
loc_3DDA0:
mov [rsi], rax
add rsp, 30h
pop rbx
pop r14
pop rbp
retn
loc_3DDAC:
mov edi, 20h ; ' '; thrown_size
call ___cxa_allocate_exception
mov rbx, rax
mov rdi, r14
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE9type_nameEv; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::type_name(void)
lea rdx, [rsp+48h+var_40]
mov [rdx], rax
lea rsi, aTypeMustBeNumb; "type must be number, but is "
lea rdi, [rsp+48h+var_38]
call _ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJRA29_KcPS9_EEET_DpOT0_; nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[29],char const*>(char const(&)[29],char const* &&)
mov bpl, 1
lea rdx, [rsp+48h+var_38]
mov rdi, rbx; this
mov esi, 12Eh; int
mov rcx, r14
call _ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_
xor ebp, ebp
lea rsi, _ZTIN8nlohmann16json_abi_v3_11_36detail10type_errorE; lptinfo
lea rdx, _ZN8nlohmann16json_abi_v3_11_36detail9exceptionD2Ev; void (*)(void *)
mov rdi, rbx; void *
call ___cxa_throw
mov r14, rax
lea rax, [rsp+48h+var_28]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_3DE28
mov rsi, [rsp+48h+var_28]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_3DE28:
test bpl, bpl
jnz short loc_3DE32
jmp short loc_3DE3A
mov r14, rax
loc_3DE32:
mov rdi, rbx; void *
call ___cxa_free_exception
loc_3DE3A:
mov rdi, r14
call __Unwind_Resume
|
_ZN8nlohmann16json_abi_v3_11_36detail20get_arithmetic_valueINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEElTnNSt9enable_ifIXaasr3std13is_arithmeticIT0_EE5valuentsr3std7is_sameISH_NT_9boolean_tEEE5valueEiE4typeELi0EEEvRKSI_RSH_:
PUSH RBP
PUSH R14
PUSH RBX
SUB RSP,0x30
MOV R14,RDI
MOVZX EAX,byte ptr [RDI]
CMP EAX,0x5
JZ 0x0013dd94
CMP EAX,0x7
JZ 0x0013dd9a
CMP EAX,0x6
JNZ 0x0013ddac
LAB_0013dd94:
MOV RAX,qword ptr [R14 + 0x8]
JMP 0x0013dda0
LAB_0013dd9a:
CVTTSD2SI RAX,qword ptr [R14 + 0x8]
LAB_0013dda0:
MOV qword ptr [RSI],RAX
ADD RSP,0x30
POP RBX
POP R14
POP RBP
RET
LAB_0013ddac:
MOV EDI,0x20
CALL 0x00118360
MOV RBX,RAX
MOV RDI,R14
CALL 0x0013e096
LEA RDX,[RSP + 0x8]
MOV qword ptr [RDX],RAX
LAB_0013ddc9:
LEA RSI,[0x1b6f93]
LEA RDI,[RSP + 0x10]
CALL 0x0013e00d
MOV BPL,0x1
LAB_0013dddd:
LEA RDX,[RSP + 0x10]
MOV RDI,RBX
MOV ESI,0x12e
MOV RCX,R14
CALL 0x0013de42
XOR EBP,EBP
LEA RSI,[0x1ee2b8]
LEA RDX,[0x14c3b0]
MOV RDI,RBX
CALL 0x00118b30
|
void _ZN8nlohmann16json_abi_v3_11_36detail20get_arithmetic_valueINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEElTnNSt9enable_ifIXaasr3std13is_arithmeticIT0_EE5valuentsr3std7is_sameISH_NT_9boolean_tEEE5valueEiE4typeELi0EEEvRKSI_RSH_
(basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
*param_1,long *param_2)
{
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
bVar1;
long lVar2;
int8 uVar3;
char *local_40;
detail local_38 [32];
bVar1 = *param_1;
if (bVar1 != (basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
)0x5) {
if (bVar1 == (basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
)0x7) {
lVar2 = (long)*(double *)(param_1 + 8);
goto LAB_0013dda0;
}
if (bVar1 != (basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
)0x6) {
uVar3 = __cxa_allocate_exception(0x20);
local_40 = (char *)nlohmann::json_abi_v3_11_3::
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::type_name(param_1);
/* try { // try from 0013ddc9 to 0013ddd9 has its CatchHandler @ 0013de2f */
nlohmann::json_abi_v3_11_3::detail::concat<std::__cxx11::string,char_const(&)[29],char_const*>
(local_38,"type must be number, but is ",&local_40);
/* try { // try from 0013dddd to 0013de09 has its CatchHandler @ 0013de0a */
_ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_
(uVar3,0x12e,local_38,param_1);
/* WARNING: Subroutine does not return */
__cxa_throw(uVar3,&nlohmann::json_abi_v3_11_3::detail::type_error::typeinfo,
nlohmann::json_abi_v3_11_3::detail::exception::~exception);
}
}
lVar2 = *(long *)(param_1 + 8);
LAB_0013dda0:
*param_2 = lVar2;
return;
}
|
||
64,387 |
translog_buffer_next
|
eloqsql/storage/maria/ma_loghandler.c
|
static my_bool translog_buffer_next(TRANSLOG_ADDRESS *horizon,
struct st_buffer_cursor *cursor,
my_bool new_file)
{
uint old_buffer_no= cursor->buffer_no;
uint new_buffer_no= (old_buffer_no + 1) % TRANSLOG_BUFFERS_NO;
struct st_translog_buffer *new_buffer= log_descriptor.buffers + new_buffer_no;
my_bool chasing= cursor->chaser;
DBUG_ENTER("translog_buffer_next");
DBUG_PRINT("info", ("horizon: " LSN_FMT " chasing: %d",
LSN_IN_PARTS(log_descriptor.horizon), chasing));
DBUG_ASSERT(cmp_translog_addr(log_descriptor.horizon, *horizon) >= 0);
translog_finish_page(horizon, cursor);
if (!chasing)
{
translog_buffer_lock(new_buffer);
#ifndef DBUG_OFF
{
TRANSLOG_ADDRESS offset= new_buffer->offset;
TRANSLOG_FILE *file= new_buffer->file;
uint8 ver= new_buffer->ver;
translog_lock_assert_owner();
#endif
translog_wait_for_buffer_free(new_buffer);
#ifndef DBUG_OFF
/* We keep the handler locked so nobody can start this new buffer */
DBUG_ASSERT(offset == new_buffer->offset && new_buffer->file == NULL &&
(file == NULL ? ver : (uint8)(ver + 1)) == new_buffer->ver);
}
#endif
}
else
DBUG_ASSERT(new_buffer->file != NULL);
if (new_file)
{
/* move the horizon to the next file and its header page */
(*horizon)+= LSN_ONE_FILE;
(*horizon)= LSN_REPLACE_OFFSET(*horizon, TRANSLOG_PAGE_SIZE);
if (!chasing && translog_create_new_file())
{
DBUG_RETURN(1);
}
}
/* prepare next page */
if (chasing)
translog_cursor_init(cursor, new_buffer, new_buffer_no);
else
{
translog_lock_assert_owner();
translog_start_buffer(new_buffer, cursor, new_buffer_no);
new_buffer->prev_buffer_offset=
log_descriptor.buffers[old_buffer_no].offset;
new_buffer->prev_last_lsn=
BUFFER_MAX_LSN(log_descriptor.buffers + old_buffer_no);
}
log_descriptor.buffers[old_buffer_no].next_buffer_offset= new_buffer->offset;
DBUG_PRINT("info", ("prev_last_lsn set to " LSN_FMT " buffer:%p",
LSN_IN_PARTS(new_buffer->prev_last_lsn),
new_buffer));
translog_new_page_header(horizon, cursor);
DBUG_RETURN(0);
}
|
O0
|
c
|
translog_buffer_next:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movb %dl, %al
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movb %al, -0x19(%rbp)
movq -0x18(%rbp), %rax
movzbl 0x36(%rax), %eax
movl %eax, -0x20(%rbp)
movl -0x20(%rbp), %eax
addl $0x1, %eax
andl $0x7, %eax
movl %eax, -0x24(%rbp)
movl -0x24(%rbp), %eax
movl %eax, %ecx
leaq 0x3efb48(%rip), %rax # 0x484550
addq $0x2f8, %rax # imm = 0x2F8
imulq $0x100120, %rcx, %rcx # imm = 0x100120
addq %rcx, %rax
movq %rax, -0x30(%rbp)
movq -0x18(%rbp), %rax
movb 0x37(%rax), %al
movb %al, -0x31(%rbp)
jmp 0x94a28
jmp 0x94a2a
jmp 0x94a2c
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x90800
cmpb $0x0, -0x31(%rbp)
jne 0x94a53
movq -0x30(%rbp), %rdi
callq 0x8cd90
movq -0x30(%rbp), %rdi
callq 0x98ae0
jmp 0x94a59
jmp 0x94a55
jmp 0x94a57
jmp 0x94a59
cmpb $0x0, -0x19(%rbp)
je 0x94ab2
movq -0x10(%rbp), %rax
movabsq $0x100000000, %rcx # imm = 0x100000000
addq (%rax), %rcx
movq %rcx, (%rax)
movq -0x10(%rbp), %rax
movabsq $0xffffff00000000, %rcx # imm = 0xFFFFFF00000000
andq (%rax), %rcx
orq $0x2000, %rcx # imm = 0x2000
movq -0x10(%rbp), %rax
movq %rcx, (%rax)
cmpb $0x0, -0x31(%rbp)
jne 0x94ab0
callq 0x96150
movsbl %al, %eax
cmpl $0x0, %eax
je 0x94ab0
jmp 0x94aa7
movb $0x1, -0x1(%rbp)
jmp 0x94bd4
jmp 0x94ab2
cmpb $0x0, -0x31(%rbp)
je 0x94ad0
movq -0x18(%rbp), %rdi
movq -0x30(%rbp), %rsi
movl -0x24(%rbp), %eax
movzbl %al, %edx
callq 0x95560
jmp 0x94b93
movq -0x30(%rbp), %rdi
movq -0x18(%rbp), %rsi
movl -0x24(%rbp), %edx
callq 0x8e610
movl -0x20(%rbp), %eax
movl %eax, %ecx
leaq 0x3efa64(%rip), %rax # 0x484550
addq $0x2f8, %rax # imm = 0x2F8
imulq $0x100120, %rcx, %rcx # imm = 0x100120
addq %rcx, %rax
movq 0x100010(%rax), %rcx
movq -0x30(%rbp), %rax
movq %rcx, 0x100020(%rax)
movl -0x20(%rbp), %eax
movl %eax, %ecx
leaq 0x3efa36(%rip), %rax # 0x484550
addq $0x2f8, %rax # imm = 0x2F8
imulq $0x100120, %rcx, %rcx # imm = 0x100120
addq %rcx, %rax
cmpq $0x0, 0x100000(%rax)
jne 0x94b5d
movl -0x20(%rbp), %eax
movl %eax, %ecx
leaq 0x3efa10(%rip), %rax # 0x484550
addq $0x2f8, %rax # imm = 0x2F8
imulq $0x100120, %rcx, %rcx # imm = 0x100120
addq %rcx, %rax
movq 0x100008(%rax), %rax
movq %rax, -0x40(%rbp)
jmp 0x94b84
movl -0x20(%rbp), %eax
movl %eax, %ecx
leaq 0x3ef9e7(%rip), %rax # 0x484550
addq $0x2f8, %rax # imm = 0x2F8
imulq $0x100120, %rcx, %rcx # imm = 0x100120
addq %rcx, %rax
movq 0x100000(%rax), %rax
movq %rax, -0x40(%rbp)
movq -0x40(%rbp), %rcx
movq -0x30(%rbp), %rax
movq %rcx, 0x100008(%rax)
movq -0x30(%rbp), %rax
movq 0x100010(%rax), %rcx
movl -0x20(%rbp), %eax
movl %eax, %edx
leaq 0x3ef9a6(%rip), %rax # 0x484550
addq $0x2f8, %rax # imm = 0x2F8
imulq $0x100120, %rdx, %rdx # imm = 0x100120
addq %rdx, %rax
movq %rcx, 0x100018(%rax)
jmp 0x94bc3
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x8f770
movb $0x0, -0x1(%rbp)
movb -0x1(%rbp), %al
addq $0x40, %rsp
popq %rbp
retq
nopl (%rax)
|
translog_buffer_next:
push rbp
mov rbp, rsp
sub rsp, 40h
mov al, dl
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov [rbp+var_19], al
mov rax, [rbp+var_18]
movzx eax, byte ptr [rax+36h]
mov [rbp+var_20], eax
mov eax, [rbp+var_20]
add eax, 1
and eax, 7
mov [rbp+var_24], eax
mov eax, [rbp+var_24]
mov ecx, eax
lea rax, log_descriptor
add rax, 2F8h
imul rcx, 100120h
add rax, rcx
mov [rbp+var_30], rax
mov rax, [rbp+var_18]
mov al, [rax+37h]
mov [rbp+var_31], al
jmp short $+2
loc_94A28:
jmp short $+2
loc_94A2A:
jmp short $+2
loc_94A2C:
mov rdi, [rbp+var_10]
mov rsi, [rbp+var_18]
call translog_finish_page
cmp [rbp+var_31], 0
jnz short loc_94A53
mov rdi, [rbp+var_30]
call translog_buffer_lock
mov rdi, [rbp+var_30]
call translog_wait_for_buffer_free
jmp short loc_94A59
loc_94A53:
jmp short $+2
loc_94A55:
jmp short $+2
loc_94A57:
jmp short $+2
loc_94A59:
cmp [rbp+var_19], 0
jz short loc_94AB2
mov rax, [rbp+var_10]
mov rcx, 100000000h
add rcx, [rax]
mov [rax], rcx
mov rax, [rbp+var_10]
mov rcx, 0FFFFFF00000000h
and rcx, [rax]
or rcx, 2000h
mov rax, [rbp+var_10]
mov [rax], rcx
cmp [rbp+var_31], 0
jnz short loc_94AB0
call translog_create_new_file
movsx eax, al
cmp eax, 0
jz short loc_94AB0
jmp short $+2
loc_94AA7:
mov [rbp+var_1], 1
jmp loc_94BD4
loc_94AB0:
jmp short $+2
loc_94AB2:
cmp [rbp+var_31], 0
jz short loc_94AD0
mov rdi, [rbp+var_18]
mov rsi, [rbp+var_30]
mov eax, [rbp+var_24]
movzx edx, al
call translog_cursor_init
jmp loc_94B93
loc_94AD0:
mov rdi, [rbp+var_30]
mov rsi, [rbp+var_18]
mov edx, [rbp+var_24]
call translog_start_buffer
mov eax, [rbp+var_20]
mov ecx, eax
lea rax, log_descriptor
add rax, 2F8h
imul rcx, 100120h
add rax, rcx
mov rcx, [rax+100010h]
mov rax, [rbp+var_30]
mov qword ptr ds:loc_100020[rax], rcx
mov eax, [rbp+var_20]
mov ecx, eax
lea rax, log_descriptor
add rax, 2F8h
imul rcx, 100120h
add rax, rcx
cmp qword ptr [rax+100000h], 0
jnz short loc_94B5D
mov eax, [rbp+var_20]
mov ecx, eax
lea rax, log_descriptor
add rax, 2F8h
imul rcx, 100120h
add rax, rcx
mov rax, [rax+100008h]
mov [rbp+var_40], rax
jmp short loc_94B84
loc_94B5D:
mov eax, [rbp+var_20]
mov ecx, eax
lea rax, log_descriptor
add rax, 2F8h
imul rcx, 100120h
add rax, rcx
mov rax, [rax+100000h]
mov [rbp+var_40], rax
loc_94B84:
mov rcx, [rbp+var_40]
mov rax, [rbp+var_30]
mov [rax+100008h], rcx
loc_94B93:
mov rax, [rbp+var_30]
mov rcx, [rax+100010h]
mov eax, [rbp+var_20]
mov edx, eax
lea rax, log_descriptor
add rax, 2F8h
imul rdx, 100120h
add rax, rdx
mov qword ptr ds:loc_100018[rax], rcx
jmp short $+2
loc_94BC3:
mov rdi, [rbp+var_10]
mov rsi, [rbp+var_18]
call translog_new_page_header
mov [rbp+var_1], 0
loc_94BD4:
mov al, [rbp+var_1]
add rsp, 40h
pop rbp
retn
|
char translog_buffer_next(long long *a1, long long a2, char a3)
{
long long v4; // [rsp+0h] [rbp-40h]
char v5; // [rsp+Fh] [rbp-31h]
long long *v6; // [rsp+10h] [rbp-30h]
unsigned __int8 v7; // [rsp+1Ch] [rbp-24h]
unsigned int v8; // [rsp+20h] [rbp-20h]
v8 = *(unsigned __int8 *)(a2 + 54);
v7 = (v8 + 1) & 7;
v6 = &log_descriptor[131108 * v7 + 95];
v5 = *(_BYTE *)(a2 + 55);
translog_finish_page(a1, a2);
if ( !v5 )
{
translog_buffer_lock((long long)v6);
translog_wait_for_buffer_free(v6);
}
if ( a3 )
{
*a1 += 0x100000000LL;
*a1 = *a1 & 0xFFFFFF00000000LL | 0x2000;
if ( !v5 )
{
if ( (unsigned __int8)translog_create_new_file() )
return 1;
}
}
if ( v5 )
{
translog_cursor_init(a2, v6, v7);
}
else
{
translog_start_buffer((long long)v6, a2, v7);
*(_QWORD *)((char *)&loc_100020 + (_QWORD)v6) = log_descriptor[131108 * v8 + 131169];
if ( log_descriptor[131108 * v8 + 131167] )
v4 = log_descriptor[131108 * v8 + 131167];
else
v4 = log_descriptor[131108 * v8 + 131168];
v6[131073] = v4;
}
*(_QWORD *)((char *)&loc_100018 + (_QWORD)&log_descriptor[131108 * v8 + 95]) = v6[131074];
translog_new_page_header(a1, a2);
return 0;
}
|
translog_buffer_next:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x40
MOV AL,DL
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x18],RSI
MOV byte ptr [RBP + -0x19],AL
MOV RAX,qword ptr [RBP + -0x18]
MOVZX EAX,byte ptr [RAX + 0x36]
MOV dword ptr [RBP + -0x20],EAX
MOV EAX,dword ptr [RBP + -0x20]
ADD EAX,0x1
AND EAX,0x7
MOV dword ptr [RBP + -0x24],EAX
MOV EAX,dword ptr [RBP + -0x24]
MOV ECX,EAX
LEA RAX,[0x584550]
ADD RAX,0x2f8
IMUL RCX,RCX,0x100120
ADD RAX,RCX
MOV qword ptr [RBP + -0x30],RAX
MOV RAX,qword ptr [RBP + -0x18]
MOV AL,byte ptr [RAX + 0x37]
MOV byte ptr [RBP + -0x31],AL
JMP 0x00194a28
LAB_00194a28:
JMP 0x00194a2a
LAB_00194a2a:
JMP 0x00194a2c
LAB_00194a2c:
MOV RDI,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RBP + -0x18]
CALL 0x00190800
CMP byte ptr [RBP + -0x31],0x0
JNZ 0x00194a53
MOV RDI,qword ptr [RBP + -0x30]
CALL 0x0018cd90
MOV RDI,qword ptr [RBP + -0x30]
CALL 0x00198ae0
JMP 0x00194a59
LAB_00194a53:
JMP 0x00194a55
LAB_00194a55:
JMP 0x00194a57
LAB_00194a57:
JMP 0x00194a59
LAB_00194a59:
CMP byte ptr [RBP + -0x19],0x0
JZ 0x00194ab2
MOV RAX,qword ptr [RBP + -0x10]
MOV RCX,0x100000000
ADD RCX,qword ptr [RAX]
MOV qword ptr [RAX],RCX
MOV RAX,qword ptr [RBP + -0x10]
MOV RCX,0xffffff00000000
AND RCX,qword ptr [RAX]
OR RCX,0x2000
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RAX],RCX
CMP byte ptr [RBP + -0x31],0x0
JNZ 0x00194ab0
CALL 0x00196150
MOVSX EAX,AL
CMP EAX,0x0
JZ 0x00194ab0
JMP 0x00194aa7
LAB_00194aa7:
MOV byte ptr [RBP + -0x1],0x1
JMP 0x00194bd4
LAB_00194ab0:
JMP 0x00194ab2
LAB_00194ab2:
CMP byte ptr [RBP + -0x31],0x0
JZ 0x00194ad0
MOV RDI,qword ptr [RBP + -0x18]
MOV RSI,qword ptr [RBP + -0x30]
MOV EAX,dword ptr [RBP + -0x24]
MOVZX EDX,AL
CALL 0x00195560
JMP 0x00194b93
LAB_00194ad0:
MOV RDI,qword ptr [RBP + -0x30]
MOV RSI,qword ptr [RBP + -0x18]
MOV EDX,dword ptr [RBP + -0x24]
CALL 0x0018e610
MOV EAX,dword ptr [RBP + -0x20]
MOV ECX,EAX
LEA RAX,[0x584550]
ADD RAX,0x2f8
IMUL RCX,RCX,0x100120
ADD RAX,RCX
MOV RCX,qword ptr [RAX + 0x100010]
MOV RAX,qword ptr [RBP + -0x30]
MOV qword ptr [RAX + 0x100020],RCX
MOV EAX,dword ptr [RBP + -0x20]
MOV ECX,EAX
LEA RAX,[0x584550]
ADD RAX,0x2f8
IMUL RCX,RCX,0x100120
ADD RAX,RCX
CMP qword ptr [RAX + 0x100000],0x0
JNZ 0x00194b5d
MOV EAX,dword ptr [RBP + -0x20]
MOV ECX,EAX
LEA RAX,[0x584550]
ADD RAX,0x2f8
IMUL RCX,RCX,0x100120
ADD RAX,RCX
MOV RAX,qword ptr [RAX + 0x100008]
MOV qword ptr [RBP + -0x40],RAX
JMP 0x00194b84
LAB_00194b5d:
MOV EAX,dword ptr [RBP + -0x20]
MOV ECX,EAX
LEA RAX,[0x584550]
ADD RAX,0x2f8
IMUL RCX,RCX,0x100120
ADD RAX,RCX
MOV RAX,qword ptr [RAX + 0x100000]
MOV qword ptr [RBP + -0x40],RAX
LAB_00194b84:
MOV RCX,qword ptr [RBP + -0x40]
MOV RAX,qword ptr [RBP + -0x30]
MOV qword ptr [RAX + 0x100008],RCX
LAB_00194b93:
MOV RAX,qword ptr [RBP + -0x30]
MOV RCX,qword ptr [RAX + 0x100010]
MOV EAX,dword ptr [RBP + -0x20]
MOV EDX,EAX
LEA RAX,[0x584550]
ADD RAX,0x2f8
IMUL RDX,RDX,0x100120
ADD RAX,RDX
MOV qword ptr [RAX + 0x100018],RCX
JMP 0x00194bc3
LAB_00194bc3:
MOV RDI,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RBP + -0x18]
CALL 0x0018f770
MOV byte ptr [RBP + -0x1],0x0
LAB_00194bd4:
MOV AL,byte ptr [RBP + -0x1]
ADD RSP,0x40
POP RBP
RET
|
int1 translog_buffer_next(ulong *param_1,long param_2,char param_3)
{
char cVar1;
char cVar2;
uint uVar3;
uint uVar4;
int *puVar5;
long lVar6;
int8 local_48;
uVar3 = (uint)*(byte *)(param_2 + 0x36);
uVar4 = uVar3 + 1 & 7;
lVar6 = (ulong)uVar4 * 0x100120;
puVar5 = &DAT_00584848 + lVar6;
cVar1 = *(char *)(param_2 + 0x37);
translog_finish_page(param_1,param_2);
if (cVar1 == '\0') {
translog_buffer_lock(puVar5);
translog_wait_for_buffer_free(puVar5);
}
if (param_3 != '\0') {
*param_1 = *param_1 + 0x100000000;
*param_1 = *param_1 & 0xffffff00000000 | 0x2000;
if ((cVar1 == '\0') && (cVar2 = translog_create_new_file(), cVar2 != '\0')) {
return 1;
}
}
if (cVar1 == '\0') {
translog_start_buffer(puVar5,param_2,uVar4);
*(int8 *)(&DAT_00684868 + lVar6) =
*(int8 *)(&DAT_00684858 + (ulong)uVar3 * 0x100120);
if (*(long *)(&DAT_00684848 + (ulong)uVar3 * 0x100120) == 0) {
local_48 = *(int8 *)(&DAT_00684850 + (ulong)uVar3 * 0x100120);
}
else {
local_48 = *(int8 *)(&DAT_00684848 + (ulong)uVar3 * 0x100120);
}
*(int8 *)(&DAT_00684850 + lVar6) = local_48;
}
else {
translog_cursor_init(param_2,puVar5,uVar4);
}
*(int8 *)(&DAT_00684860 + (ulong)uVar3 * 0x100120) = *(int8 *)(&DAT_00684858 + lVar6);
translog_new_page_header(param_1,param_2);
return 0;
}
|
|
64,388 |
my_wc_mb_utf8mb4
|
eloqsql/strings/ctype-utf8.c
|
static int
my_wc_mb_utf8mb4(CHARSET_INFO *cs __attribute__((unused)),
my_wc_t wc, uchar *r, uchar *e)
{
int count;
if (r >= e)
return MY_CS_TOOSMALL;
if (wc < 0x80)
count= 1;
else if (wc < 0x800)
count= 2;
else if (wc < 0x10000)
count= 3;
else if (wc < 0x200000)
count= 4;
else return MY_CS_ILUNI;
if (r + count > e)
return MY_CS_TOOSMALLN(count);
switch (count) {
case 4: r[3] = (uchar) (0x80 | (wc & 0x3f)); wc = wc >> 6; wc |= 0x10000;
/* fall through */
case 3: r[2] = (uchar) (0x80 | (wc & 0x3f)); wc = wc >> 6; wc |= 0x800;
/* fall through */
case 2: r[1] = (uchar) (0x80 | (wc & 0x3f)); wc = wc >> 6; wc |= 0xc0;
/* fall through */
case 1: r[0] = (uchar) wc;
}
return count;
}
|
O3
|
c
|
my_wc_mb_utf8mb4:
pushq %rbp
movq %rsp, %rbp
movl $0xffffff9b, %eax # imm = 0xFFFFFF9B
cmpq %rcx, %rdx
jae 0x5099c
movl $0x1, %edi
cmpq $0x80, %rsi
jb 0x50935
movl $0x2, %edi
cmpq $0x800, %rsi # imm = 0x800
jb 0x50935
movl $0x3, %edi
cmpq $0x10000, %rsi # imm = 0x10000
jb 0x50935
xorl %eax, %eax
movl $0x4, %edi
cmpq $0x1fffff, %rsi # imm = 0x1FFFFF
ja 0x5099c
movl %edi, %eax
addq %rdx, %rax
cmpq %rcx, %rax
jbe 0x50948
movl $0xffffff9c, %eax # imm = 0xFFFFFF9C
subl %edi, %eax
jmp 0x5099c
leal -0x1(%rdi), %eax
leaq 0x28477e(%rip), %rcx # 0x2d50d0
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movl %esi, %eax
andb $0x3f, %al
orb $-0x80, %al
movb %al, 0x3(%rdx)
shrq $0x6, %rsi
orq $0x10000, %rsi # imm = 0x10000
movl %esi, %eax
andb $0x3f, %al
orb $-0x80, %al
movb %al, 0x2(%rdx)
shrq $0x6, %rsi
orq $0x800, %rsi # imm = 0x800
movl %esi, %eax
andb $0x3f, %al
orb $-0x80, %al
movb %al, 0x1(%rdx)
shrq $0x6, %rsi
orq $0xc0, %rsi
movb %sil, (%rdx)
movl %edi, %eax
popq %rbp
retq
|
my_wc_mb_utf8mb4:
push rbp
mov rbp, rsp
mov eax, 0FFFFFF9Bh
cmp rdx, rcx
jnb loc_5099C
mov edi, 1
cmp rsi, 80h
jb short loc_50935
mov edi, 2
cmp rsi, 800h
jb short loc_50935
mov edi, 3
cmp rsi, 10000h
jb short loc_50935
xor eax, eax
mov edi, 4
cmp rsi, offset unk_1FFFFF
ja short loc_5099C
loc_50935:
mov eax, edi
add rax, rdx
cmp rax, rcx
jbe short loc_50948
mov eax, 0FFFFFF9Ch
sub eax, edi
jmp short loc_5099C
loc_50948:
lea eax, [rdi-1]
lea rcx, jpt_50959
movsxd rax, ds:(jpt_50959 - 2D50D0h)[rcx+rax*4]; switch 4 cases
add rax, rcx
jmp rax; switch jump
loc_5095B:
mov eax, esi; jumptable 0000000000050959 case 3
and al, 3Fh
or al, 80h
mov [rdx+3], al
shr rsi, 6
or rsi, 10000h
loc_5096F:
mov eax, esi; jumptable 0000000000050959 case 2
and al, 3Fh
or al, 80h
mov [rdx+2], al
shr rsi, 6
or rsi, 800h
loc_50983:
mov eax, esi; jumptable 0000000000050959 case 1
and al, 3Fh
or al, 80h
mov [rdx+1], al
shr rsi, 6
or rsi, 0C0h
loc_50997:
mov [rdx], sil; jumptable 0000000000050959 case 0
mov eax, edi
loc_5099C:
pop rbp
retn
|
long long my_wc_mb_utf8mb4(long long a1, unsigned long long a2, _BYTE *a3, unsigned long long a4)
{
long long result; // rax
unsigned int v5; // edi
result = 4294967195LL;
if ( (unsigned long long)a3 < a4 )
{
v5 = 1;
if ( a2 < 0x80
|| (v5 = 2, a2 < 0x800)
|| (v5 = 3, a2 < 0x10000)
|| (result = 0LL, v5 = 4, a2 <= (unsigned long long)&unk_1FFFFF) )
{
if ( (unsigned long long)&a3[v5] <= a4 )
{
switch ( v5 )
{
case 1u:
goto LABEL_12;
case 2u:
goto LABEL_11;
case 3u:
goto LABEL_10;
case 4u:
a3[3] = a2 & 0x3F | 0x80;
a2 = (a2 >> 6) | 0x10000;
LABEL_10:
a3[2] = a2 & 0x3F | 0x80;
a2 = (a2 >> 6) | 0x800;
LABEL_11:
a3[1] = a2 & 0x3F | 0x80;
a2 = (a2 >> 6) | 0xC0;
LABEL_12:
*a3 = a2;
result = v5;
break;
}
}
else
{
return -100 - v5;
}
}
}
return result;
}
|
my_wc_mb_utf8mb4:
PUSH RBP
MOV RBP,RSP
MOV EAX,0xffffff9b
CMP RDX,RCX
JNC 0x0015099c
MOV EDI,0x1
CMP RSI,0x80
JC 0x00150935
MOV EDI,0x2
CMP RSI,0x800
JC 0x00150935
MOV EDI,0x3
CMP RSI,0x10000
JC 0x00150935
XOR EAX,EAX
MOV EDI,0x4
CMP RSI,0x1fffff
JA 0x0015099c
LAB_00150935:
MOV EAX,EDI
ADD RAX,RDX
CMP RAX,RCX
JBE 0x00150948
MOV EAX,0xffffff9c
SUB EAX,EDI
JMP 0x0015099c
LAB_00150948:
LEA EAX,[RDI + -0x1]
LEA RCX,[0x3d50d0]
MOVSXD RAX,dword ptr [RCX + RAX*0x4]
ADD RAX,RCX
JMP RAX
LAB_0015099c:
POP RBP
RET
|
ulong my_wc_mb_utf8mb4(int8 param_1,ulong param_2,ulong param_3,ulong param_4)
{
ulong uVar1;
long lVar2;
uVar1 = 0xffffff9b;
if (param_3 < param_4) {
lVar2 = 1;
if ((((0x7f < param_2) && (lVar2 = 2, 0x7ff < param_2)) && (lVar2 = 3, 0xffff < param_2)) &&
(lVar2 = 4, 0x1fffff < param_2)) {
return 0;
}
if (lVar2 + param_3 <= param_4) {
/* WARNING: Could not recover jumptable at 0x00150959. Too many branches */
/* WARNING: Treating indirect jump as call */
uVar1 = (*(code *)(&DAT_003d50d0 + *(int *)(&DAT_003d50d0 + (ulong)((int)lVar2 - 1) * 4)))();
return uVar1;
}
uVar1 = (ulong)(-(int)lVar2 - 100);
}
return uVar1;
}
|
|
64,389 |
Binary_string::append(st_io_cache*, unsigned int)
|
eloqsql/sql/sql_string.cc
|
bool Binary_string::append(IO_CACHE* file, uint32 arg_length)
{
if (realloc_with_extra_if_needed(str_length+arg_length))
return TRUE;
if (my_b_read(file, (uchar*) Ptr + str_length, arg_length))
{
shrink(str_length ? str_length : 1);
return TRUE;
}
str_length+=arg_length;
return FALSE;
}
|
O3
|
cpp
|
Binary_string::append(st_io_cache*, unsigned int):
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl %edx, %r14d
movq %rsi, %r15
movq %rdi, %rbx
movl 0x8(%rdi), %esi
addl %edx, %esi
cmpl %esi, 0xc(%rdi)
jbe 0x71ffb
movq (%rbx), %rax
movb $0x0, (%rax,%rsi)
jmp 0x7200b
movq %rbx, %rdi
callq 0x71334
movl %eax, %ecx
movb $0x1, %al
testb %cl, %cl
jne 0x7205e
movl 0x8(%rbx), %eax
addq (%rbx), %rax
movl %r14d, %r12d
movq 0x10(%r15), %rsi
leaq (%rsi,%r12), %rcx
cmpq 0x18(%r15), %rcx
jbe 0x72049
movq %r15, %rdi
movq %rax, %rsi
movq %r12, %rdx
callq 0x95baa
testl %eax, %eax
je 0x72058
movl 0x8(%rbx), %esi
cmpl $0x1, %esi
adcl $0x0, %esi
movq %rbx, %rdi
callq 0x72068
movb $0x1, %al
jmp 0x7205e
movq %rax, %rdi
movq %r12, %rdx
callq 0x5f0e0
addq %r12, 0x10(%r15)
addl %r14d, 0x8(%rbx)
xorl %eax, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
nop
|
_ZN13Binary_string6appendEP11st_io_cachej:
push rbp
mov rbp, rsp
push r15
push r14
push r12
push rbx
mov r14d, edx
mov r15, rsi
mov rbx, rdi
mov esi, [rdi+8]
add esi, edx; unsigned __int64
cmp [rdi+0Ch], esi
jbe short loc_71FFB
mov rax, [rbx]
mov byte ptr [rax+rsi], 0
jmp short loc_7200B
loc_71FFB:
mov rdi, rbx; this
call _ZN13Binary_string18realloc_with_extraEm; Binary_string::realloc_with_extra(ulong)
mov ecx, eax
mov al, 1
test cl, cl
jnz short loc_7205E
loc_7200B:
mov eax, [rbx+8]
add rax, [rbx]
mov r12d, r14d
mov rsi, [r15+10h]
lea rcx, [rsi+r12]
cmp rcx, [r15+18h]
jbe short loc_72049
mov rdi, r15
mov rsi, rax
mov rdx, r12
call _my_b_read
test eax, eax
jz short loc_72058
mov esi, [rbx+8]
cmp esi, 1
adc esi, 0; unsigned __int64
mov rdi, rbx; this
call _ZN13Binary_string6shrinkEm; Binary_string::shrink(ulong)
mov al, 1
jmp short loc_7205E
loc_72049:
mov rdi, rax
mov rdx, r12
call _memcpy
add [r15+10h], r12
loc_72058:
add [rbx+8], r14d
xor eax, eax
loc_7205E:
pop rbx
pop r12
pop r14
pop r15
pop rbp
retn
|
char Binary_string::append(Binary_string *this, long long a2, unsigned int a3)
{
long long v5; // rsi
char v6; // cl
char result; // al
long long v8; // rsi
v5 = a3 + *((_DWORD *)this + 2);
if ( *((_DWORD *)this + 3) <= (unsigned int)v5 )
{
v6 = Binary_string::realloc_with_extra(this, v5);
result = 1;
if ( v6 )
return result;
}
else
{
*(_BYTE *)(*(_QWORD *)this + v5) = 0;
}
v8 = *(_QWORD *)(a2 + 16);
if ( v8 + (unsigned long long)a3 <= *(_QWORD *)(a2 + 24) )
{
memcpy(*(_QWORD *)this + *((unsigned int *)this + 2), v8, a3);
*(_QWORD *)(a2 + 16) += a3;
}
else if ( (unsigned int)my_b_read(a2, *(_QWORD *)this + *((unsigned int *)this + 2), a3) )
{
Binary_string::shrink(this, (unsigned int)(*((_DWORD *)this + 2) == 0) + *((_DWORD *)this + 2));
return 1;
}
*((_DWORD *)this + 2) += a3;
return 0;
}
|
append:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
MOV R14D,EDX
MOV R15,RSI
MOV RBX,RDI
MOV ESI,dword ptr [RDI + 0x8]
ADD ESI,EDX
CMP dword ptr [RDI + 0xc],ESI
JBE 0x00171ffb
MOV RAX,qword ptr [RBX]
MOV byte ptr [RAX + RSI*0x1],0x0
JMP 0x0017200b
LAB_00171ffb:
MOV RDI,RBX
CALL 0x00171334
MOV ECX,EAX
MOV AL,0x1
TEST CL,CL
JNZ 0x0017205e
LAB_0017200b:
MOV EAX,dword ptr [RBX + 0x8]
ADD RAX,qword ptr [RBX]
MOV R12D,R14D
MOV RSI,qword ptr [R15 + 0x10]
LEA RCX,[RSI + R12*0x1]
CMP RCX,qword ptr [R15 + 0x18]
JBE 0x00172049
MOV RDI,R15
MOV RSI,RAX
MOV RDX,R12
CALL 0x00195baa
TEST EAX,EAX
JZ 0x00172058
MOV ESI,dword ptr [RBX + 0x8]
CMP ESI,0x1
ADC ESI,0x0
MOV RDI,RBX
CALL 0x00172068
MOV AL,0x1
JMP 0x0017205e
LAB_00172049:
MOV RDI,RAX
MOV RDX,R12
CALL 0x0015f0e0
ADD qword ptr [R15 + 0x10],R12
LAB_00172058:
ADD dword ptr [RBX + 0x8],R14D
XOR EAX,EAX
LAB_0017205e:
POP RBX
POP R12
POP R14
POP R15
POP RBP
RET
|
/* Binary_string::append(st_io_cache*, unsigned int) */
int8 __thiscall Binary_string::append(Binary_string *this,st_io_cache *param_1,uint param_2)
{
char cVar1;
int iVar2;
uint uVar3;
ulong __n;
uVar3 = *(int *)(this + 8) + param_2;
if (uVar3 < *(uint *)(this + 0xc)) {
*(int1 *)(*(long *)this + (ulong)uVar3) = 0;
}
else {
cVar1 = realloc_with_extra(this,(ulong)uVar3);
if (cVar1 != '\0') {
return 1;
}
}
__n = (ulong)param_2;
if (*(ulong *)(param_1 + 0x18) < (long)*(void **)(param_1 + 0x10) + __n) {
iVar2 = _my_b_read(param_1,(void *)((ulong)*(uint *)(this + 8) + *(long *)this),__n);
if (iVar2 != 0) {
shrink(this,(ulong)(*(int *)(this + 8) + (uint)(*(int *)(this + 8) == 0)));
return 1;
}
}
else {
memcpy((void *)((ulong)*(uint *)(this + 8) + *(long *)this),*(void **)(param_1 + 0x10),__n);
*(ulong *)(param_1 + 0x10) = *(long *)(param_1 + 0x10) + __n;
}
*(uint *)(this + 8) = *(int *)(this + 8) + param_2;
return 0;
}
|
|
64,390 |
std::map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, google::protobuf::FileDescriptorProto const*, std::less<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, google::protobuf::FileDescriptorProto const*>>>::const_iterator google::protobuf::(anonymous namespace)::FindLastLessOrEqual<std::map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, google::protobuf::FileDescriptorProto const*, std::less<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, google::protobuf::FileDescriptorProto const*>>>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>(std::map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, google::protobuf::FileDescriptorProto const*, std::less<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, google::protobuf::FileDescriptorProto const*>>> const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
|
aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/descriptor_database.cc
|
typename Container::const_iterator FindLastLessOrEqual(
const Container* container, const Key& key) {
auto iter = container->upper_bound(key);
if (iter != container->begin()) --iter;
return iter;
}
|
O3
|
cpp
|
std::map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, google::protobuf::FileDescriptorProto const*, std::less<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, google::protobuf::FileDescriptorProto const*>>>::const_iterator google::protobuf::(anonymous namespace)::FindLastLessOrEqual<std::map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, google::protobuf::FileDescriptorProto const*, std::less<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, google::protobuf::FileDescriptorProto const*>>>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>(std::map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, google::protobuf::FileDescriptorProto const*, std::less<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, google::protobuf::FileDescriptorProto const*>>> const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&):
pushq %rbx
movq %rsi, %rcx
movq %rdi, %rbx
movq 0x10(%rdi), %rsi
leaq 0x8(%rdi), %rdx
callq 0x5dd1c
cmpq 0x18(%rbx), %rax
je 0x5c002
movq %rax, %rdi
popq %rbx
jmp 0xf200
popq %rbx
retq
|
_ZN6google8protobuf12_GLOBAL__N_119FindLastLessOrEqualISt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEPKNS0_19FileDescriptorProtoESt4lessIS9_ESaISt4pairIKS9_SC_EEES9_EENT_14const_iteratorEPKSK_RKT0_:
push rbx
mov rcx, rsi
mov rbx, rdi
mov rsi, [rdi+10h]
lea rdx, [rdi+8]
call _ZNKSt8_Rb_treeINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_PKN6google8protobuf19FileDescriptorProtoEESt10_Select1stISD_ESt4lessIS5_ESaISD_EE14_M_upper_boundEPKSt13_Rb_tree_nodeISD_EPKSt18_Rb_tree_node_baseRS7_; std::_Rb_tree<std::string,std::pair<std::string const,google::protobuf::FileDescriptorProto const*>,std::_Select1st<std::pair<std::string const,google::protobuf::FileDescriptorProto const*>>,std::less<std::string>,std::allocator<std::pair<std::string const,google::protobuf::FileDescriptorProto const*>>>::_M_upper_bound(std::_Rb_tree_node<std::pair<std::string const,google::protobuf::FileDescriptorProto const*>> const*,std::_Rb_tree_node_base const*,std::string const&)
cmp rax, [rbx+18h]
jz short loc_5C002
mov rdi, rax
pop rbx
jmp __ZSt18_Rb_tree_decrementPKSt18_Rb_tree_node_base; std::_Rb_tree_decrement(std::_Rb_tree_node_base const*)
loc_5C002:
pop rbx
retn
|
long long google::protobuf::`anonymous namespace'::FindLastLessOrEqual<std::map<std::string,google::protobuf::FileDescriptorProto const*>,std::string>(
long long a1,
long long a2)
{
long long result; // rax
result = std::_Rb_tree<std::string,std::pair<std::string const,google::protobuf::FileDescriptorProto const*>,std::_Select1st<std::pair<std::string const,google::protobuf::FileDescriptorProto const*>>,std::less<std::string>,std::allocator<std::pair<std::string const,google::protobuf::FileDescriptorProto const*>>>::_M_upper_bound(
a1,
*(_QWORD *)(a1 + 16),
a1 + 8,
a2);
if ( result != *(_QWORD *)(a1 + 24) )
return std::_Rb_tree_decrement(result);
return result;
}
|
FindLastLessOrEqual<std::map<std::__cxx11::string,google::protobuf::FileDescriptorProto_const*,std::less<std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string_const,google::protobuf::FileDescriptorProto_const*>>>,std::__cxx11::string>:
PUSH RBX
MOV RCX,RSI
MOV RBX,RDI
MOV RSI,qword ptr [RDI + 0x10]
LEA RDX,[RDI + 0x8]
CALL 0x0015dd1c
CMP RAX,qword ptr [RBX + 0x18]
JZ 0x0015c002
MOV RDI,RAX
POP RBX
JMP 0x0010f200
LAB_0015c002:
POP RBX
RET
|
/* std::map<std::__cxx11::string, google::protobuf::FileDescriptorProto const*,
std::less<std::__cxx11::string >, std::allocator<std::pair<std::__cxx11::string const,
google::protobuf::FileDescriptorProto const*> > >::const_iterator google::protobuf::(anonymous
namespace)::FindLastLessOrEqual<std::map<std::__cxx11::string,
google::protobuf::FileDescriptorProto const*, std::less<std::__cxx11::string >,
std::allocator<std::pair<std::__cxx11::string const, google::protobuf::FileDescriptorProto
const*> > >, std::__cxx11::string >(std::map<std::__cxx11::string,
google::protobuf::FileDescriptorProto const*, std::less<std::__cxx11::string >,
std::allocator<std::pair<std::__cxx11::string const, google::protobuf::FileDescriptorProto
const*> > > const*, std::__cxx11::string const&) */
void google::protobuf::(anonymous_namespace)::
FindLastLessOrEqual<std::map<std::__cxx11::string,google::protobuf::FileDescriptorProto_const*,std::less<std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string_const,google::protobuf::FileDescriptorProto_const*>>>,std::__cxx11::string>
(map *param_1,string *param_2)
{
_Rb_tree_node_base *p_Var1;
p_Var1 = (_Rb_tree_node_base *)
std::
_Rb_tree<std::__cxx11::string,std::pair<std::__cxx11::string_const,google::protobuf::FileDescriptorProto_const*>,std::_Select1st<std::pair<std::__cxx11::string_const,google::protobuf::FileDescriptorProto_const*>>,std::less<std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string_const,google::protobuf::FileDescriptorProto_const*>>>
::_M_upper_bound((_Rb_tree<std::__cxx11::string,std::pair<std::__cxx11::string_const,google::protobuf::FileDescriptorProto_const*>,std::_Select1st<std::pair<std::__cxx11::string_const,google::protobuf::FileDescriptorProto_const*>>,std::less<std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string_const,google::protobuf::FileDescriptorProto_const*>>>
*)param_1,*(_Rb_tree_node **)(param_1 + 0x10),
(_Rb_tree_node_base *)(param_1 + 8),param_2);
if (p_Var1 != *(_Rb_tree_node_base **)(param_1 + 0x18)) {
std::_Rb_tree_decrement(p_Var1);
return;
}
return;
}
|
|
64,391 |
my_strnncollsp_8bit_bin
|
eloqsql/strings/ctype-bin.c
|
static int my_strnncollsp_8bit_bin(CHARSET_INFO * cs __attribute__((unused)),
const uchar *a, size_t a_length,
const uchar *b, size_t b_length)
{
const uchar *end;
size_t length;
end= a + (length= MY_MIN(a_length, b_length));
while (a < end)
{
if (*a++ != *b++)
return ((int) a[-1] - (int) b[-1]);
}
return a_length == b_length ? 0 :
a_length < b_length ?
-my_strnncollsp_padspace_bin(b, b_length - length) :
my_strnncollsp_padspace_bin(a, a_length - length);
}
|
O3
|
c
|
my_strnncollsp_8bit_bin:
pushq %rbp
movq %rsp, %rbp
cmpq %r8, %rdx
movq %r8, %rdi
cmovbq %rdx, %rdi
leaq (%rsi,%rdi), %r9
cmpq %r9, %rsi
jae 0xac415
movzbl (%rsi), %eax
incq %rsi
movzbl (%rcx), %r10d
incq %rcx
cmpb %r10b, %al
je 0xac3f9
subl %r10d, %eax
jmp 0xac41c
xorl %eax, %eax
cmpq %r8, %rdx
jne 0xac41e
popq %rbp
retq
jae 0xac43b
subq %rdi, %r8
je 0xac41c
xorl %edx, %edx
xorl %eax, %eax
cmpb $0x20, (%rcx,%rdx)
jb 0xac456
jne 0xac45d
incq %rdx
cmpq %rdx, %r8
jne 0xac429
jmp 0xac41c
subq %rdi, %rdx
je 0xac41c
xorl %ecx, %ecx
xorl %eax, %eax
cmpb $0x20, (%rsi,%rcx)
jb 0xac45d
jne 0xac456
incq %rcx
cmpq %rcx, %rdx
jne 0xac444
jmp 0xac41c
movl $0x1, %eax
jmp 0xac41c
movl $0xffffffff, %eax # imm = 0xFFFFFFFF
jmp 0xac41c
|
my_strnncollsp_8bit_bin:
push rbp
mov rbp, rsp
cmp rdx, r8
mov rdi, r8
cmovb rdi, rdx
lea r9, [rsi+rdi]
loc_AC3F9:
cmp rsi, r9
jnb short loc_AC415
movzx eax, byte ptr [rsi]
inc rsi
movzx r10d, byte ptr [rcx]
inc rcx
cmp al, r10b
jz short loc_AC3F9
sub eax, r10d
jmp short loc_AC41C
loc_AC415:
xor eax, eax
cmp rdx, r8
jnz short loc_AC41E
loc_AC41C:
pop rbp
retn
loc_AC41E:
jnb short loc_AC43B
sub r8, rdi
jz short loc_AC41C
xor edx, edx
xor eax, eax
loc_AC429:
cmp byte ptr [rcx+rdx], 20h ; ' '
jb short loc_AC456
jnz short loc_AC45D
inc rdx
cmp r8, rdx
jnz short loc_AC429
jmp short loc_AC41C
loc_AC43B:
sub rdx, rdi
jz short loc_AC41C
xor ecx, ecx
xor eax, eax
loc_AC444:
cmp byte ptr [rsi+rcx], 20h ; ' '
jb short loc_AC45D
jnz short loc_AC456
inc rcx
cmp rdx, rcx
jnz short loc_AC444
jmp short loc_AC41C
loc_AC456:
mov eax, 1
jmp short loc_AC41C
loc_AC45D:
mov eax, 0FFFFFFFFh
jmp short loc_AC41C
|
long long my_strnncollsp_8bit_bin(
long long a1,
unsigned __int8 *a2,
unsigned long long a3,
unsigned __int8 *a4,
unsigned long long a5)
{
unsigned long long v5; // rdi
unsigned __int8 *v6; // r9
int v7; // eax
int v8; // r10d
long long result; // rax
unsigned long long v10; // r8
long long v11; // rdx
unsigned long long v12; // rdx
long long v13; // rcx
v5 = a5;
if ( a3 < a5 )
v5 = a3;
v6 = &a2[v5];
while ( a2 < v6 )
{
v7 = *a2++;
v8 = *a4++;
if ( (_BYTE)v7 != (_BYTE)v8 )
return (unsigned int)(v7 - v8);
}
result = 0LL;
if ( a3 != a5 )
{
if ( a3 >= a5 )
{
v12 = a3 - v5;
if ( v12 )
{
v13 = 0LL;
result = 0LL;
while ( a2[v13] >= 0x20u )
{
if ( a2[v13] != 32 )
return 1LL;
if ( v12 == ++v13 )
return result;
}
return 0xFFFFFFFFLL;
}
}
else
{
v10 = a5 - v5;
if ( v10 )
{
v11 = 0LL;
result = 0LL;
while ( a4[v11] >= 0x20u )
{
if ( a4[v11] != 32 )
return 0xFFFFFFFFLL;
if ( v10 == ++v11 )
return result;
}
return 1LL;
}
}
}
return result;
}
|
my_strnncollsp_8bit_bin:
PUSH RBP
MOV RBP,RSP
CMP RDX,R8
MOV RDI,R8
CMOVC RDI,RDX
LEA R9,[RSI + RDI*0x1]
LAB_001ac3f9:
CMP RSI,R9
JNC 0x001ac415
MOVZX EAX,byte ptr [RSI]
INC RSI
MOVZX R10D,byte ptr [RCX]
INC RCX
CMP AL,R10B
JZ 0x001ac3f9
SUB EAX,R10D
JMP 0x001ac41c
LAB_001ac415:
XOR EAX,EAX
CMP RDX,R8
JNZ 0x001ac41e
LAB_001ac41c:
POP RBP
RET
LAB_001ac41e:
JNC 0x001ac43b
SUB R8,RDI
JZ 0x001ac41c
XOR EDX,EDX
XOR EAX,EAX
LAB_001ac429:
CMP byte ptr [RCX + RDX*0x1],0x20
JC 0x001ac456
JNZ 0x001ac45d
INC RDX
CMP R8,RDX
JNZ 0x001ac429
JMP 0x001ac41c
LAB_001ac43b:
SUB RDX,RDI
JZ 0x001ac41c
XOR ECX,ECX
XOR EAX,EAX
LAB_001ac444:
CMP byte ptr [RSI + RCX*0x1],0x20
JC 0x001ac45d
JNZ 0x001ac456
INC RCX
CMP RDX,RCX
JNZ 0x001ac444
JMP 0x001ac41c
LAB_001ac456:
MOV EAX,0x1
JMP 0x001ac41c
LAB_001ac45d:
MOV EAX,0xffffffff
JMP 0x001ac41c
|
int my_strnncollsp_8bit_bin
(int8 param_1,byte *param_2,ulong param_3,byte *param_4,ulong param_5)
{
byte *pbVar1;
byte bVar2;
byte bVar3;
long lVar4;
ulong uVar5;
uVar5 = param_5;
if (param_3 < param_5) {
uVar5 = param_3;
}
pbVar1 = param_2 + uVar5;
while (param_2 < pbVar1) {
bVar2 = *param_2;
param_2 = param_2 + 1;
bVar3 = *param_4;
param_4 = param_4 + 1;
if (bVar2 != bVar3) {
return (uint)bVar2 - (uint)bVar3;
}
}
if (param_3 == param_5) {
return 0;
}
if (param_3 < param_5) {
if (param_5 == uVar5) {
return 0;
}
lVar4 = 0;
while( true ) {
if (param_4[lVar4] < 0x20) {
return 1;
}
if (param_4[lVar4] != 0x20) break;
lVar4 = lVar4 + 1;
if (param_5 - uVar5 == lVar4) {
return 0;
}
}
return -1;
}
if (param_3 != uVar5) {
lVar4 = 0;
while( true ) {
if (param_2[lVar4] < 0x20) {
return -1;
}
if (param_2[lVar4] != 0x20) break;
lVar4 = lVar4 + 1;
if (param_3 - uVar5 == lVar4) {
return 0;
}
}
return 1;
}
return 0;
}
|
|
64,392 |
bf_pow_int
|
bluesky950520[P]quickjs/libbf.c
|
static int bf_pow_int(bf_t *r, const bf_t *x, limb_t prec, void *opaque)
{
bf_context_t *s = r->ctx;
const bf_t *y = opaque;
bf_t T_s, *T = &T_s;
limb_t prec1;
int ret;
slimb_t y1;
bf_get_limb(&y1, y, 0);
if (y1 < 0)
y1 = -y1;
/* XXX: proof for the added precision */
prec1 = prec + ceil_log2(y1) * 2 + 8;
ret = bf_pow_ui(r, x, y1 < 0 ? -y1 : y1, prec1, BF_RNDN | BF_FLAG_EXT_EXP);
if (y->sign) {
bf_init(s, T);
bf_set_ui(T, 1);
ret |= bf_div(r, T, r, prec1, BF_RNDN | BF_FLAG_EXT_EXP);
bf_delete(T);
}
return ret;
}
|
O2
|
c
|
bf_pow_int:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %rcx, %r14
movq %rdx, %r12
movq %rsi, %r15
movq %rdi, %rbx
movq (%rdi), %rax
movq %rax, (%rsp)
leaq 0x8(%rsp), %r13
movq %r13, %rdi
movq %rcx, %rsi
xorl %edx, %edx
callq 0x76253
movq (%r13), %rax
movq %rax, %rdx
negq %rdx
cmovsq %rax, %rdx
movq %rdx, %rax
decq %rax
je 0x79098
bsrq %rax, %rax
xorq $0x3f, %rax
jmp 0x7909b
pushq $0x40
popq %rax
addq %rax, %rax
movl $0x80, %ecx
subq %rax, %rcx
xorl %eax, %eax
cmpq $0x2, %rdx
cmovaeq %rcx, %rax
addq %rax, %r12
addq $0x8, %r12
movq %rbx, %rdi
movq %r15, %rsi
movq %r12, %rcx
movl $0x7e0, %r8d # imm = 0x7E0
callq 0x78f8d
movl %eax, %ebp
cmpl $0x0, 0x8(%r14)
je 0x79127
leaq 0x10(%rsp), %r14
movq (%rsp), %rax
movq %rax, (%r14)
andl $0x0, 0x8(%r14)
movabsq $-0x8000000000000000, %rax # imm = 0x8000000000000000
movq %rax, 0x10(%r14)
xorps %xmm0, %xmm0
movups %xmm0, 0x18(%r14)
pushq $0x1
popq %rsi
movq %r14, %rdi
callq 0x73106
movq %rbx, %rdi
movq %r14, %rsi
movq %rbx, %rdx
movq %r12, %rcx
movl $0x7e0, %r8d # imm = 0x7E0
callq 0x758a2
orl %eax, %ebp
movq %r14, %rdi
callq 0x7500e
movl %ebp, %eax
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
|
bf_pow_int:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 38h
mov r14, rcx
mov r12, rdx
mov r15, rsi
mov rbx, rdi
mov rax, [rdi]
mov [rsp+68h+var_68], rax
lea r13, [rsp+68h+var_60]
mov rdi, r13
mov rsi, rcx
xor edx, edx
call bf_get_int64
mov rax, [r13+0]
mov rdx, rax
neg rdx
cmovs rdx, rax
mov rax, rdx
dec rax
jz short loc_79098
bsr rax, rax
xor rax, 3Fh
jmp short loc_7909B
loc_79098:
push 40h ; '@'
pop rax
loc_7909B:
add rax, rax
mov ecx, 80h
sub rcx, rax
xor eax, eax
cmp rdx, 2
cmovnb rax, rcx
add r12, rax
add r12, 8
mov rdi, rbx
mov rsi, r15
mov rcx, r12
mov r8d, 7E0h
call bf_pow_ui
mov ebp, eax
cmp dword ptr [r14+8], 0
jz short loc_79127
lea r14, [rsp+68h+var_58]
mov rax, [rsp+68h+var_68]
mov [r14], rax
and dword ptr [r14+8], 0
mov rax, 8000000000000000h
mov [r14+10h], rax
xorps xmm0, xmm0
movups xmmword ptr [r14+18h], xmm0
push 1
pop rsi
mov rdi, r14
call bf_set_ui
mov rdi, rbx
mov rsi, r14
mov rdx, rbx
mov rcx, r12
mov r8d, 7E0h
call bf_div
or ebp, eax
mov rdi, r14
call bf_delete_0
loc_79127:
mov eax, ebp
add rsp, 38h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
|
long long bf_pow_int(long long *a1, long long *a2, long long a3, long long a4)
{
unsigned long long v6; // rdx
unsigned long long v7; // rax
unsigned long long v8; // rax
long long v9; // rcx
long long v10; // rax
long long v11; // r12
unsigned int v12; // ebp
long long v14; // [rsp+0h] [rbp-68h]
long long v15; // [rsp+8h] [rbp-60h] BYREF
__int128 v16; // [rsp+10h] [rbp-58h] BYREF
unsigned long long v17; // [rsp+20h] [rbp-48h]
__int128 v18; // [rsp+28h] [rbp-40h]
v14 = *a1;
bf_get_int64(&v15, a4, 0);
v6 = -v15;
if ( v15 > 0 )
v6 = v15;
if ( v6 == 1 )
{
v8 = 64LL;
}
else
{
_BitScanReverse64(&v7, v6 - 1);
v8 = v7 ^ 0x3F;
}
v9 = 128 - 2 * v8;
v10 = 0LL;
if ( v6 >= 2 )
v10 = v9;
v11 = v10 + a3 + 8;
v12 = bf_pow_ui(a1, a2, v6, v11, 0x7E0u);
if ( *(_DWORD *)(a4 + 8) )
{
*(_QWORD *)&v16 = v14;
DWORD2(v16) = 0;
v17 = 0x8000000000000000LL;
v18 = 0LL;
bf_set_ui((long long)&v16, 1uLL);
v12 |= bf_div((__int128 *)a1, &v16, (__int128 *)a1, v11, 2016LL);
bf_delete_0((long long *)&v16);
}
return v12;
}
|
bf_pow_int:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x38
MOV R14,RCX
MOV R12,RDX
MOV R15,RSI
MOV RBX,RDI
MOV RAX,qword ptr [RDI]
MOV qword ptr [RSP],RAX
LEA R13,[RSP + 0x8]
MOV RDI,R13
MOV RSI,RCX
XOR EDX,EDX
CALL 0x00176253
MOV RAX,qword ptr [R13]
MOV RDX,RAX
NEG RDX
CMOVS RDX,RAX
MOV RAX,RDX
DEC RAX
JZ 0x00179098
BSR RAX,RAX
XOR RAX,0x3f
JMP 0x0017909b
LAB_00179098:
PUSH 0x40
POP RAX
LAB_0017909b:
ADD RAX,RAX
MOV ECX,0x80
SUB RCX,RAX
XOR EAX,EAX
CMP RDX,0x2
CMOVNC RAX,RCX
ADD R12,RAX
ADD R12,0x8
MOV RDI,RBX
MOV RSI,R15
MOV RCX,R12
MOV R8D,0x7e0
CALL 0x00178f8d
MOV EBP,EAX
CMP dword ptr [R14 + 0x8],0x0
JZ 0x00179127
LEA R14,[RSP + 0x10]
MOV RAX,qword ptr [RSP]
MOV qword ptr [R14],RAX
AND dword ptr [R14 + 0x8],0x0
MOV RAX,-0x8000000000000000
MOV qword ptr [R14 + 0x10],RAX
XORPS XMM0,XMM0
MOVUPS xmmword ptr [R14 + 0x18],XMM0
PUSH 0x1
POP RSI
MOV RDI,R14
CALL 0x00173106
MOV RDI,RBX
MOV RSI,R14
MOV RDX,RBX
MOV RCX,R12
MOV R8D,0x7e0
CALL 0x001758a2
OR EBP,EAX
MOV RDI,R14
CALL 0x0017500e
LAB_00179127:
MOV EAX,EBP
ADD RSP,0x38
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
uint bf_pow_int(int8 *param_1,int8 param_2,long param_3,long param_4)
{
int8 uVar1;
uint uVar2;
uint uVar3;
ulong uVar4;
ulong uVar5;
ulong uVar6;
long lVar7;
ulong local_60;
int8 uStack_58;
int4 uStack_50;
int8 uStack_48;
int8 uStack_40;
int8 uStack_38;
uVar1 = *param_1;
bf_get_int64(&local_60,param_4,0);
uVar6 = -local_60;
if (0 < (long)local_60) {
uVar6 = local_60;
}
uVar4 = uVar6 - 1;
if (uVar4 == 0) {
uVar5 = 0x40;
}
else {
uVar5 = 0x3f;
if (uVar4 != 0) {
for (; uVar4 >> uVar5 == 0; uVar5 = uVar5 - 1) {
}
}
uVar5 = uVar5 ^ 0x3f;
}
lVar7 = 0;
if (1 < uVar6) {
lVar7 = uVar5 * -2 + 0x80;
}
lVar7 = param_3 + lVar7 + 8;
uVar2 = bf_pow_ui(param_1,param_2,uVar6,lVar7,0x7e0);
if (*(int *)(param_4 + 8) != 0) {
uStack_50 = 0;
uStack_48 = 0x8000000000000000;
uStack_40 = 0;
uStack_38 = 0;
uStack_58 = uVar1;
bf_set_ui(&uStack_58,1);
uVar3 = bf_div(param_1,&uStack_58,param_1,lVar7,0x7e0);
uVar2 = uVar2 | uVar3;
bf_delete(&uStack_58);
}
return uVar2;
}
|
|
64,393 |
get_collation_number
|
eloqsql/mysys/charset.c
|
uint get_collation_number(const char *name, myf flags)
{
uint id;
char alias[64];
my_pthread_once(&charsets_initialized, init_available_charsets);
if ((id= get_collation_number_internal(name)))
return id;
if ((name= get_collation_name_alias(name, alias, sizeof(alias),flags)))
return get_collation_number_internal(name);
return 0;
}
|
O3
|
c
|
get_collation_number:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x50, %rsp
movq %rsi, %r14
movq %rdi, %rbx
movq %fs:0x28, %rax
movq %rax, -0x18(%rbp)
leaq 0x36578c(%rip), %rdi # 0x3b5c30
leaq 0x80(%rip), %rsi # 0x5052b
callq 0x28350
movq %rbx, %rdi
callq 0x506ab
testl %eax, %eax
jne 0x5050e
leaq 0x45fe1(%rip), %rsi # 0x964a4
movl $0x5, %edx
movq %rbx, %rdi
callq 0x284f0
movl %eax, %ecx
xorl %eax, %eax
testl %ecx, %ecx
jne 0x5050e
btl $0xa, %r14d
movl $0x33, %ecx
sbbl $-0x1, %ecx
addq $0x5, %rbx
leaq 0x45fba(%rip), %rdx # 0x964aa
leaq -0x60(%rbp), %r14
movl $0x40, %esi
movq %r14, %rdi
movq %rbx, %r8
xorl %eax, %eax
callq 0x9201a
movq %r14, %rdi
callq 0x506ab
movq %fs:0x28, %rcx
cmpq -0x18(%rbp), %rcx
jne 0x50526
addq $0x50, %rsp
popq %rbx
popq %r14
popq %rbp
retq
callq 0x28400
|
get_collation_number:
push rbp
mov rbp, rsp
push r14
push rbx
sub rsp, 50h
mov r14, rsi
mov rbx, rdi
mov rax, fs:28h
mov [rbp+var_18], rax
lea rdi, charsets_initialized
lea rsi, init_available_charsets
call _pthread_once
mov rdi, rbx
call get_collation_number_internal
test eax, eax
jnz short loc_5050E
lea rsi, aUtf8_0; "utf8_"
mov edx, 5
mov rdi, rbx
call _strncasecmp
mov ecx, eax
xor eax, eax
test ecx, ecx
jnz short loc_5050E
bt r14d, 0Ah
mov ecx, 33h ; '3'
sbb ecx, 0FFFFFFFFh
add rbx, 5
lea rdx, aUtf8mbCS; "utf8mb%c_%s"
lea r14, [rbp+var_60]
mov esi, 40h ; '@'
mov rdi, r14
mov r8, rbx
xor eax, eax
call my_snprintf
mov rdi, r14
call get_collation_number_internal
loc_5050E:
mov rcx, fs:28h
cmp rcx, [rbp+var_18]
jnz short loc_50526
add rsp, 50h
pop rbx
pop r14
pop rbp
retn
loc_50526:
call ___stack_chk_fail
|
long long get_collation_number(long long a1, __int16 a2)
{
long long result; // rax
int v3; // ecx
int v4; // r9d
char v5[72]; // [rsp+0h] [rbp-60h] BYREF
unsigned long long v6; // [rsp+48h] [rbp-18h]
v6 = __readfsqword(0x28u);
pthread_once(&charsets_initialized, init_available_charsets);
result = get_collation_number_internal(a1);
if ( !(_DWORD)result )
{
v3 = strncasecmp(a1, "utf8_", 5LL);
result = 0LL;
if ( !v3 )
{
my_snprintf((unsigned int)v5, 64, (unsigned int)"utf8mb%c_%s", 51 - (((a2 & 0x400) != 0) - 1), a1 + 5, v4, v5[0]);
return get_collation_number_internal(v5);
}
}
return result;
}
|
get_collation_number:
PUSH RBP
MOV RBP,RSP
PUSH R14
PUSH RBX
SUB RSP,0x50
MOV R14,RSI
MOV RBX,RDI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x18],RAX
LEA RDI,[0x4b5c30]
LEA RSI,[0x15052b]
CALL 0x00128350
MOV RDI,RBX
CALL 0x001506ab
TEST EAX,EAX
JNZ 0x0015050e
LEA RSI,[0x1964a4]
MOV EDX,0x5
MOV RDI,RBX
CALL 0x001284f0
MOV ECX,EAX
XOR EAX,EAX
TEST ECX,ECX
JNZ 0x0015050e
BT R14D,0xa
MOV ECX,0x33
SBB ECX,-0x1
ADD RBX,0x5
LEA RDX,[0x1964aa]
LEA R14,[RBP + -0x60]
MOV ESI,0x40
MOV RDI,R14
MOV R8,RBX
XOR EAX,EAX
CALL 0x0019201a
MOV RDI,R14
CALL 0x001506ab
LAB_0015050e:
MOV RCX,qword ptr FS:[0x28]
CMP RCX,qword ptr [RBP + -0x18]
JNZ 0x00150526
ADD RSP,0x50
POP RBX
POP R14
POP RBP
RET
LAB_00150526:
CALL 0x00128400
|
int8 get_collation_number(char *param_1,uint param_2)
{
int iVar1;
int8 uVar2;
long in_FS_OFFSET;
int1 local_68 [72];
long local_20;
local_20 = *(long *)(in_FS_OFFSET + 0x28);
pthread_once(&charsets_initialized,init_available_charsets);
uVar2 = get_collation_number_internal(param_1);
if ((int)uVar2 == 0) {
iVar1 = strncasecmp(param_1,"utf8_",5);
uVar2 = 0;
if (iVar1 == 0) {
my_snprintf(local_68,0x40,"utf8mb%c_%s",0x34 - (uint)((param_2 >> 10 & 1) != 0),param_1 + 5);
uVar2 = get_collation_number_internal(local_68);
}
}
if (*(long *)(in_FS_OFFSET + 0x28) == local_20) {
return uVar2;
}
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
|
|
64,394 |
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>::cend() const
|
monkey531[P]llama/common/json.hpp
|
const_iterator cend() const noexcept
{
const_iterator result(this);
result.set_end();
return result;
}
|
O1
|
cpp
|
nlohmann::json_abi_v3_11_3::basic_json<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>::cend() const:
pushq %rbx
movq %rdi, %rbx
movabsq $-0x8000000000000000, %rax # imm = 0x8000000000000000
movq %rsi, (%rdi)
xorps %xmm0, %xmm0
movups %xmm0, 0x8(%rdi)
movq %rax, 0x18(%rdi)
movzbl (%rsi), %ecx
cmpl $0x2, %ecx
je 0x8ef24
cmpl $0x1, %ecx
jne 0x8ef2e
leaq 0x8(%rbx), %rax
movq $0x0, (%rax)
jmp 0x8ef32
movq $0x0, 0x10(%rbx)
jmp 0x8ef32
movq %rax, 0x18(%rbx)
movq %rbx, %rdi
callq 0x8ef40
movq %rbx, %rax
popq %rbx
retq
nop
|
_ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4cendEv:
push rbx
mov rbx, rdi
mov rax, 8000000000000000h
mov [rdi], rsi
xorps xmm0, xmm0
movups xmmword ptr [rdi+8], xmm0
mov [rdi+18h], rax
movzx ecx, byte ptr [rsi]
cmp ecx, 2
jz short loc_8EF24
cmp ecx, 1
jnz short loc_8EF2E
lea rax, [rbx+8]
mov qword ptr [rax], 0
jmp short loc_8EF32
loc_8EF24:
mov qword ptr [rbx+10h], 0
jmp short loc_8EF32
loc_8EF2E:
mov [rbx+18h], rax
loc_8EF32:
mov rdi, rbx
call _ZN8nlohmann16json_abi_v3_11_36detail9iter_implIKNS0_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> const>::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>::cend(
long long a1,
unsigned __int8 *a2)
{
int v2; // ecx
*(_QWORD *)a1 = a2;
*(_OWORD *)(a1 + 8) = 0LL;
*(_QWORD *)(a1 + 24) = 0x8000000000000000LL;
v2 = *a2;
if ( v2 == 2 )
{
*(_QWORD *)(a1 + 16) = 0LL;
}
else if ( v2 == 1 )
{
*(_QWORD *)(a1 + 8) = 0LL;
}
else
{
*(_QWORD *)(a1 + 24) = 0x8000000000000000LL;
}
nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> const>::set_end(a1);
return a1;
}
|
cend:
PUSH RBX
MOV RBX,RDI
MOV RAX,-0x8000000000000000
MOV qword ptr [RDI],RSI
XORPS XMM0,XMM0
MOVUPS xmmword ptr [RDI + 0x8],XMM0
MOV qword ptr [RDI + 0x18],RAX
MOVZX ECX,byte ptr [RSI]
CMP ECX,0x2
JZ 0x0018ef24
CMP ECX,0x1
JNZ 0x0018ef2e
LEA RAX,[RBX + 0x8]
MOV qword ptr [RAX],0x0
JMP 0x0018ef32
LAB_0018ef24:
MOV qword ptr [RBX + 0x10],0x0
JMP 0x0018ef32
LAB_0018ef2e:
MOV qword ptr [RBX + 0x18],RAX
LAB_0018ef32:
MOV RDI,RBX
CALL 0x0018ef40
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>::cend() const */
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>
::cend(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>const>
*in_RDI;
*(char **)in_RDI = in_RSI;
*(int8 *)(in_RDI + 8) = 0;
*(int8 *)(in_RDI + 0x10) = 0;
*(int8 *)(in_RDI + 0x18) = 0x8000000000000000;
if (*in_RSI == '\x02') {
*(int8 *)(in_RDI + 0x10) = 0;
}
else if (*in_RSI == '\x01') {
*(int8 *)(in_RDI + 8) = 0;
}
else {
*(int8 *)(in_RDI + 0x18) = 0x8000000000000000;
}
detail::
iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const>
::set_end(in_RDI);
return;
}
|
|
64,395 |
nibbles_to_path
|
corpus-core[P]colibri-stateless/src/chains/eth/verifier/patricia_trie.c
|
static bytes_t nibbles_to_path(nibbles_t nibbles, bool is_leaf) {
uint8_t* path = safe_calloc((nibbles.len >> 1) + 1, 1);
path[0] = ((is_leaf << 1) + (nibbles.len & 1)) << 4;
int pos = (nibbles.len & 1) ? 1 : 2;
for (int i = 0; i < nibbles.len; i++, pos++)
path[pos >> 1] |= pos % 2 ? nibbles.data[i] : (nibbles.data[i] << 4);
return bytes(path, (nibbles.len >> 1) + 1);
}
|
O2
|
c
|
nibbles_to_path:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movl %edx, %r15d
movq %rsi, %rbx
movl %edi, %r12d
movl %edi, %r14d
shrl %r14d
incl %r14d
pushq $0x1
popq %rsi
movq %r14, %rdi
callq 0x4af39
movq %rax, %rdx
movl %r12d, %eax
andl $0x1, %r12d
leal (%r12,%r15,2), %ecx
shlb $0x4, %cl
movb %cl, (%rdx)
pushq $0x2
popq %rcx
subl %r12d, %ecx
xorl %esi, %esi
cmpq %rsi, %rax
je 0x2d4ca
leaq (%rcx,%rsi), %rdi
movzbl (%rbx,%rsi), %r8d
movl %r8d, %r9d
shlb $0x4, %r9b
testb $0x1, %dil
movzbl %r9b, %r9d
cmovnel %r8d, %r9d
shrl %edi
orb %r9b, (%rdx,%rdi)
incq %rsi
jmp 0x2d49e
movl %r14d, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
|
nibbles_to_path:
push r15
push r14
push r12
push rbx
push rax
mov r15d, edx
mov rbx, rsi
mov r12d, edi
mov r14d, edi
shr r14d, 1
inc r14d
push 1
pop rsi
mov rdi, r14
call safe_calloc
mov rdx, rax
mov eax, r12d
and r12d, 1
lea ecx, [r12+r15*2]
shl cl, 4
mov [rdx], cl
push 2
pop rcx
sub ecx, r12d
xor esi, esi
loc_2D49E:
cmp rax, rsi
jz short loc_2D4CA
lea rdi, [rcx+rsi]
movzx r8d, byte ptr [rbx+rsi]
mov r9d, r8d
shl r9b, 4
test dil, 1
movzx r9d, r9b
cmovnz r9d, r8d
shr edi, 1
or [rdx+rdi], r9b
inc rsi
jmp short loc_2D49E
loc_2D4CA:
mov eax, r14d
add rsp, 8
pop rbx
pop r12
pop r14
pop r15
retn
|
long long nibbles_to_path(unsigned int a1, long long a2, char a3)
{
_BYTE *v5; // rdx
long long i; // rsi
char v7; // r9
v5 = (_BYTE *)safe_calloc((a1 >> 1) + 1, 1LL);
*v5 = 16 * ((a1 & 1) + 2 * a3);
for ( i = 0LL; a1 != i; ++i )
{
v7 = 16 * *(_BYTE *)(a2 + i);
if ( ((2 - (a1 & 1) + (_BYTE)i) & 1) != 0 )
v7 = *(_BYTE *)(a2 + i);
v5[(2 - (a1 & 1) + (unsigned int)i) >> 1] |= v7;
}
return (a1 >> 1) + 1;
}
|
nibbles_to_path:
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
PUSH RAX
MOV R15D,EDX
MOV RBX,RSI
MOV R12D,EDI
MOV R14D,EDI
SHR R14D,0x1
INC R14D
PUSH 0x1
POP RSI
MOV RDI,R14
CALL 0x0014af39
MOV RDX,RAX
MOV EAX,R12D
AND R12D,0x1
LEA ECX,[R12 + R15*0x2]
SHL CL,0x4
MOV byte ptr [RDX],CL
PUSH 0x2
POP RCX
SUB ECX,R12D
XOR ESI,ESI
LAB_0012d49e:
CMP RAX,RSI
JZ 0x0012d4ca
LEA RDI,[RCX + RSI*0x1]
MOVZX R8D,byte ptr [RBX + RSI*0x1]
MOV R9D,R8D
SHL R9B,0x4
TEST DIL,0x1
MOVZX R9D,R9B
CMOVNZ R9D,R8D
SHR EDI,0x1
OR byte ptr [RDX + RDI*0x1],R9B
INC RSI
JMP 0x0012d49e
LAB_0012d4ca:
MOV EAX,R14D
ADD RSP,0x8
POP RBX
POP R12
POP R14
POP R15
RET
|
int nibbles_to_path(uint param_1,long param_2,char param_3)
{
ulong uVar1;
char *pcVar2;
ulong uVar3;
byte bVar4;
int iVar5;
iVar5 = (param_1 >> 1) + 1;
pcVar2 = (char *)safe_calloc(iVar5);
*pcVar2 = ((char)(param_1 & 1) + param_3 * '\x02') * '\x10';
for (uVar3 = 0; param_1 != uVar3; uVar3 = uVar3 + 1) {
uVar1 = (2 - (param_1 & 1)) + uVar3;
bVar4 = *(byte *)(param_2 + uVar3) << 4;
if ((uVar1 & 1) != 0) {
bVar4 = *(byte *)(param_2 + uVar3);
}
pcVar2[uVar1 >> 1 & 0x7fffffff] = pcVar2[uVar1 >> 1 & 0x7fffffff] | bVar4;
}
return iVar5;
}
|
|
64,396 |
my_xml_attr_ensure_space
|
eloqsql/strings/xml.c
|
static int my_xml_attr_ensure_space(MY_XML_PARSER *st, size_t len)
{
size_t ofs= st->attr.end - st->attr.start;
len++; // Add terminating zero.
if (ofs + len > st->attr.buffer_size)
{
st->attr.buffer_size= (SIZE_T_MAX - len) / 2 > st->attr.buffer_size ?
st->attr.buffer_size * 2 + len : SIZE_T_MAX;
if (!st->attr.buffer)
{
st->attr.buffer= (char *) my_malloc(PSI_INSTRUMENT_ME, st->attr.buffer_size, MYF(0));
if (st->attr.buffer)
memcpy(st->attr.buffer, st->attr.static_buffer, ofs + 1 /*term. zero */);
}
else
st->attr.buffer= (char *) my_realloc(PSI_INSTRUMENT_ME, st->attr.buffer,
st->attr.buffer_size, MYF(0));
st->attr.start= st->attr.buffer;
st->attr.end= st->attr.start + ofs;
return st->attr.buffer ? MY_XML_OK : MY_XML_ERROR;
}
return MY_XML_OK;
}
|
O0
|
c
|
my_xml_attr_ensure_space:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq 0x120(%rax), %rax
movq -0x10(%rbp), %rcx
movq 0x118(%rcx), %rcx
subq %rcx, %rax
movq %rax, -0x20(%rbp)
movq -0x18(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x18(%rbp)
movq -0x20(%rbp), %rax
addq -0x18(%rbp), %rax
movq -0x10(%rbp), %rcx
cmpq 0x110(%rcx), %rax
jbe 0xaf973
movq $-0x1, %rax
subq -0x18(%rbp), %rax
shrq %rax
movq -0x10(%rbp), %rcx
cmpq 0x110(%rcx), %rax
jbe 0xaf875
movq -0x10(%rbp), %rax
movq 0x110(%rax), %rax
shlq %rax
addq -0x18(%rbp), %rax
movq %rax, -0x28(%rbp)
jmp 0xaf882
movq $-0x1, %rax
movq %rax, -0x28(%rbp)
jmp 0xaf882
movq -0x28(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x110(%rax)
movq -0x10(%rbp), %rax
cmpq $0x0, 0x108(%rax)
jne 0xaf8f6
movq -0x10(%rbp), %rax
movq 0x110(%rax), %rsi
xorl %edi, %edi
xorl %eax, %eax
movl %eax, %edx
callq 0x5b130
movq %rax, %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x108(%rax)
movq -0x10(%rbp), %rax
cmpq $0x0, 0x108(%rax)
je 0xaf8f4
movq -0x10(%rbp), %rax
movq 0x108(%rax), %rdi
movq -0x10(%rbp), %rsi
addq $0x88, %rsi
movq -0x20(%rbp), %rdx
addq $0x1, %rdx
callq 0x26280
jmp 0xaf925
movq -0x10(%rbp), %rax
movq 0x108(%rax), %rsi
movq -0x10(%rbp), %rax
movq 0x110(%rax), %rdx
xorl %edi, %edi
xorl %eax, %eax
movl %eax, %ecx
callq 0x5b300
movq %rax, %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x108(%rax)
movq -0x10(%rbp), %rax
movq 0x108(%rax), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x118(%rax)
movq -0x10(%rbp), %rax
movq 0x118(%rax), %rcx
addq -0x20(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x120(%rax)
movq -0x10(%rbp), %rax
movq 0x108(%rax), %rdx
movl $0x1, %eax
xorl %ecx, %ecx
cmpq $0x0, %rdx
cmovnel %ecx, %eax
movl %eax, -0x4(%rbp)
jmp 0xaf97a
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
nopl (%rax)
|
my_xml_attr_ensure_space:
push rbp
mov rbp, rsp
sub rsp, 30h
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov rax, [rbp+var_10]
mov rax, [rax+120h]
mov rcx, [rbp+var_10]
mov rcx, [rcx+118h]
sub rax, rcx
mov [rbp+var_20], rax
mov rax, [rbp+var_18]
add rax, 1
mov [rbp+var_18], rax
mov rax, [rbp+var_20]
add rax, [rbp+var_18]
mov rcx, [rbp+var_10]
cmp rax, [rcx+110h]
jbe loc_AF973
mov rax, 0FFFFFFFFFFFFFFFFh
sub rax, [rbp+var_18]
shr rax, 1
mov rcx, [rbp+var_10]
cmp rax, [rcx+110h]
jbe short loc_AF875
mov rax, [rbp+var_10]
mov rax, [rax+110h]
shl rax, 1
add rax, [rbp+var_18]
mov [rbp+var_28], rax
jmp short loc_AF882
loc_AF875:
mov rax, 0FFFFFFFFFFFFFFFFh
mov [rbp+var_28], rax
jmp short $+2
loc_AF882:
mov rcx, [rbp+var_28]
mov rax, [rbp+var_10]
mov [rax+110h], rcx
mov rax, [rbp+var_10]
cmp qword ptr [rax+108h], 0
jnz short loc_AF8F6
mov rax, [rbp+var_10]
mov rsi, [rax+110h]
xor edi, edi
xor eax, eax
mov edx, eax
call my_malloc
mov rcx, rax
mov rax, [rbp+var_10]
mov [rax+108h], rcx
mov rax, [rbp+var_10]
cmp qword ptr [rax+108h], 0
jz short loc_AF8F4
mov rax, [rbp+var_10]
mov rdi, [rax+108h]
mov rsi, [rbp+var_10]
add rsi, 88h
mov rdx, [rbp+var_20]
add rdx, 1
call _memcpy
loc_AF8F4:
jmp short loc_AF925
loc_AF8F6:
mov rax, [rbp+var_10]
mov rsi, [rax+108h]
mov rax, [rbp+var_10]
mov rdx, [rax+110h]
xor edi, edi
xor eax, eax
mov ecx, eax
call my_realloc
mov rcx, rax
mov rax, [rbp+var_10]
mov [rax+108h], rcx
loc_AF925:
mov rax, [rbp+var_10]
mov rcx, [rax+108h]
mov rax, [rbp+var_10]
mov [rax+118h], rcx
mov rax, [rbp+var_10]
mov rcx, [rax+118h]
add rcx, [rbp+var_20]
mov rax, [rbp+var_10]
mov [rax+120h], rcx
mov rax, [rbp+var_10]
mov rdx, [rax+108h]
mov eax, 1
xor ecx, ecx
cmp rdx, 0
cmovnz eax, ecx
mov [rbp+var_4], eax
jmp short loc_AF97A
loc_AF973:
mov [rbp+var_4], 0
loc_AF97A:
mov eax, [rbp+var_4]
add rsp, 30h
pop rbp
retn
|
_BOOL8 my_xml_attr_ensure_space(_QWORD *a1, long long a2)
{
long long v3; // [rsp+8h] [rbp-28h]
long long v4; // [rsp+10h] [rbp-20h]
long long v5; // [rsp+18h] [rbp-18h]
v4 = a1[36] - a1[35];
v5 = a2 + 1;
if ( (unsigned long long)(a2 + 1 + v4) <= a1[34] )
{
return 0;
}
else
{
if ( (unsigned long long)(-1 - v5) >> 1 <= a1[34] )
v3 = -1LL;
else
v3 = v5 + 2LL * a1[34];
a1[34] = v3;
if ( a1[33] )
{
a1[33] = my_realloc(0, a1[33], a1[34], 0);
}
else
{
a1[33] = my_malloc(0, a1[34], 0);
if ( a1[33] )
memcpy(a1[33], a1 + 17, v4 + 1);
}
a1[35] = a1[33];
a1[36] = v4 + a1[35];
return a1[33] == 0LL;
}
}
|
my_xml_attr_ensure_space:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x30
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x18],RSI
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x120]
MOV RCX,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RCX + 0x118]
SUB RAX,RCX
MOV qword ptr [RBP + -0x20],RAX
MOV RAX,qword ptr [RBP + -0x18]
ADD RAX,0x1
MOV qword ptr [RBP + -0x18],RAX
MOV RAX,qword ptr [RBP + -0x20]
ADD RAX,qword ptr [RBP + -0x18]
MOV RCX,qword ptr [RBP + -0x10]
CMP RAX,qword ptr [RCX + 0x110]
JBE 0x001af973
MOV RAX,-0x1
SUB RAX,qword ptr [RBP + -0x18]
SHR RAX,0x1
MOV RCX,qword ptr [RBP + -0x10]
CMP RAX,qword ptr [RCX + 0x110]
JBE 0x001af875
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x110]
SHL RAX,0x1
ADD RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RBP + -0x28],RAX
JMP 0x001af882
LAB_001af875:
MOV RAX,-0x1
MOV qword ptr [RBP + -0x28],RAX
JMP 0x001af882
LAB_001af882:
MOV RCX,qword ptr [RBP + -0x28]
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RAX + 0x110],RCX
MOV RAX,qword ptr [RBP + -0x10]
CMP qword ptr [RAX + 0x108],0x0
JNZ 0x001af8f6
MOV RAX,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RAX + 0x110]
XOR EDI,EDI
XOR EAX,EAX
MOV EDX,EAX
CALL 0x0015b130
MOV RCX,RAX
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RAX + 0x108],RCX
MOV RAX,qword ptr [RBP + -0x10]
CMP qword ptr [RAX + 0x108],0x0
JZ 0x001af8f4
MOV RAX,qword ptr [RBP + -0x10]
MOV RDI,qword ptr [RAX + 0x108]
MOV RSI,qword ptr [RBP + -0x10]
ADD RSI,0x88
MOV RDX,qword ptr [RBP + -0x20]
ADD RDX,0x1
CALL 0x00126280
LAB_001af8f4:
JMP 0x001af925
LAB_001af8f6:
MOV RAX,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RAX + 0x108]
MOV RAX,qword ptr [RBP + -0x10]
MOV RDX,qword ptr [RAX + 0x110]
XOR EDI,EDI
XOR EAX,EAX
MOV ECX,EAX
CALL 0x0015b300
MOV RCX,RAX
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RAX + 0x108],RCX
LAB_001af925:
MOV RAX,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RAX + 0x108]
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RAX + 0x118],RCX
MOV RAX,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RAX + 0x118]
ADD RCX,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RAX + 0x120],RCX
MOV RAX,qword ptr [RBP + -0x10]
MOV RDX,qword ptr [RAX + 0x108]
MOV EAX,0x1
XOR ECX,ECX
CMP RDX,0x0
CMOVNZ EAX,ECX
MOV dword ptr [RBP + -0x4],EAX
JMP 0x001af97a
LAB_001af973:
MOV dword ptr [RBP + -0x4],0x0
LAB_001af97a:
MOV EAX,dword ptr [RBP + -0x4]
ADD RSP,0x30
POP RBP
RET
|
bool my_xml_attr_ensure_space(long param_1,long param_2)
{
long lVar1;
int8 uVar2;
bool bVar3;
long local_30;
lVar1 = *(long *)(param_1 + 0x120) - *(long *)(param_1 + 0x118);
param_2 = param_2 + 1;
if (*(ulong *)(param_1 + 0x110) < (ulong)(lVar1 + param_2)) {
if (*(ulong *)(param_1 + 0x110) < -param_2 - 1U >> 1) {
local_30 = *(long *)(param_1 + 0x110) * 2 + param_2;
}
else {
local_30 = -1;
}
*(long *)(param_1 + 0x110) = local_30;
if (*(long *)(param_1 + 0x108) == 0) {
uVar2 = my_malloc(0,*(int8 *)(param_1 + 0x110),0);
*(int8 *)(param_1 + 0x108) = uVar2;
if (*(long *)(param_1 + 0x108) != 0) {
memcpy(*(void **)(param_1 + 0x108),(void *)(param_1 + 0x88),lVar1 + 1);
}
}
else {
uVar2 = my_realloc(0,*(int8 *)(param_1 + 0x108),*(int8 *)(param_1 + 0x110),0);
*(int8 *)(param_1 + 0x108) = uVar2;
}
*(int8 *)(param_1 + 0x118) = *(int8 *)(param_1 + 0x108);
*(long *)(param_1 + 0x120) = *(long *)(param_1 + 0x118) + lVar1;
bVar3 = *(long *)(param_1 + 0x108) == 0;
}
else {
bVar3 = false;
}
return bVar3;
}
|
|
64,397 |
js_sab_free
|
bluesky950520[P]quickjs/quickjs-libc.c
|
static void js_sab_free(void *opaque, void *ptr)
{
JSSABHeader *sab;
int ref_count;
sab = (JSSABHeader *)((uint8_t *)ptr - sizeof(JSSABHeader));
ref_count = atomic_add_int(&sab->ref_count, -1);
assert(ref_count >= 0);
if (ref_count == 0) {
free(sab);
}
}
|
O0
|
c
|
js_sab_free:
subq $0x28, %rsp
movq %rdi, 0x20(%rsp)
movq %rsi, 0x18(%rsp)
movq 0x18(%rsp), %rax
addq $-0x8, %rax
movq %rax, 0x10(%rsp)
movq 0x10(%rsp), %rdi
movl $0xffffffff, %esi # imm = 0xFFFFFFFF
callq 0x177c0
movl %eax, 0xc(%rsp)
cmpl $0x0, 0xc(%rsp)
jne 0x11430
movq 0x10(%rsp), %rdi
callq 0xe060
addq $0x28, %rsp
retq
nopw %cs:(%rax,%rax)
|
js_sab_free:
sub rsp, 28h
mov [rsp+28h+var_8], rdi
mov [rsp+28h+var_10], rsi
mov rax, [rsp+28h+var_10]
add rax, 0FFFFFFFFFFFFFFF8h
mov [rsp+28h+var_18], rax
mov rdi, [rsp+28h+var_18]
mov esi, 0FFFFFFFFh
call atomic_add_int
mov [rsp+28h+var_1C], eax
cmp [rsp+28h+var_1C], 0
jnz short loc_11430
mov rdi, [rsp+28h+var_18]
call _free
loc_11430:
add rsp, 28h
retn
|
long long js_sab_free(long long a1, long long a2)
{
long long result; // rax
result = atomic_add_int(a2 - 8, 0xFFFFFFFFLL);
if ( !(_DWORD)result )
return free(a2 - 8);
return result;
}
|
js_sab_free:
SUB RSP,0x28
MOV qword ptr [RSP + 0x20],RDI
MOV qword ptr [RSP + 0x18],RSI
MOV RAX,qword ptr [RSP + 0x18]
ADD RAX,-0x8
MOV qword ptr [RSP + 0x10],RAX
MOV RDI,qword ptr [RSP + 0x10]
MOV ESI,0xffffffff
CALL 0x001177c0
MOV dword ptr [RSP + 0xc],EAX
CMP dword ptr [RSP + 0xc],0x0
JNZ 0x00111430
MOV RDI,qword ptr [RSP + 0x10]
CALL 0x0010e060
LAB_00111430:
ADD RSP,0x28
RET
|
void js_sab_free(int8 param_1,long param_2)
{
int iVar1;
iVar1 = atomic_add_int((void *)(param_2 + -8),0xffffffff);
if (iVar1 == 0) {
free((void *)(param_2 + -8));
}
return;
}
|
|
64,398 |
CLI::ConversionError::~ConversionError()
|
MikePodsytnik[P]TCRtrie/build_O3/_deps/cli11-src/include/CLI/Error.hpp
|
ConversionError(std::string member, std::string name)
: ConversionError("The value " + member + " is not an allowed value for " + name) {}
|
O3
|
cpp
|
CLI::ConversionError::~ConversionError():
pushq %rbx
movq %rdi, %rbx
leaq 0x248d3(%rip), %rax # 0x49358
movq %rax, (%rdi)
movq 0x18(%rdi), %rdi
leaq 0x28(%rbx), %rax
cmpq %rax, %rdi
je 0x24aa0
movq (%rax), %rsi
incq %rsi
callq 0x7430
movq %rbx, %rdi
callq 0x7490
movl $0x38, %esi
movq %rbx, %rdi
popq %rbx
jmp 0x7430
|
_ZN3CLI15ConversionErrorD0Ev:
push rbx
mov rbx, rdi
lea rax, off_49358
mov [rdi], rax
mov rdi, [rdi+18h]; void *
lea rax, [rbx+28h]
cmp rdi, rax
jz short loc_24AA0
mov rsi, [rax]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_24AA0:
mov rdi, rbx; this
call __ZNSt13runtime_errorD2Ev; std::runtime_error::~runtime_error()
mov esi, 38h ; '8'; unsigned __int64
mov rdi, rbx; void *
pop rbx
jmp __ZdlPvm; operator delete(void *,ulong)
|
void CLI::ConversionError::~ConversionError(CLI::ConversionError *this)
{
char *v2; // rdi
*(_QWORD *)this = off_49358;
v2 = (char *)*((_QWORD *)this + 3);
if ( v2 != (char *)this + 40 )
operator delete(v2, *((_QWORD *)this + 5) + 1LL);
std::runtime_error::~runtime_error(this);
operator delete(this, 0x38uLL);
}
|
~ConversionError:
PUSH RBX
MOV RBX,RDI
LEA RAX,[0x149358]
MOV qword ptr [RDI],RAX
MOV RDI,qword ptr [RDI + 0x18]
LEA RAX,[RBX + 0x28]
CMP RDI,RAX
JZ 0x00124aa0
MOV RSI,qword ptr [RAX]
INC RSI
CALL 0x00107430
LAB_00124aa0:
MOV RDI,RBX
CALL 0x00107490
MOV ESI,0x38
MOV RDI,RBX
POP RBX
JMP 0x00107430
|
/* CLI::ConversionError::~ConversionError() */
void __thiscall CLI::ConversionError::~ConversionError(ConversionError *this)
{
*(int ***)this = &PTR__Error_00149358;
if (*(ConversionError **)(this + 0x18) != this + 0x28) {
operator_delete(*(ConversionError **)(this + 0x18),*(long *)(this + 0x28) + 1);
}
std::runtime_error::~runtime_error((runtime_error *)this);
operator_delete(this,0x38);
return;
}
|
|
64,399 |
my_utf16_uni
|
eloqsql/strings/ctype-ucs2.c
|
int
my_utf16_uni(CHARSET_INFO *cs __attribute__((unused)),
my_wc_t *pwc, const uchar *s, const uchar *e)
{
return my_mb_wc_utf16_quick(pwc, s, e);
}
|
O3
|
c
|
my_utf16_uni:
pushq %rbp
movq %rsp, %rbp
leaq 0x2(%rdx), %r8
movl $0xffffff9a, %eax # imm = 0xFFFFFF9A
cmpq %rcx, %r8
ja 0x47344
movzbl (%rdx), %edi
movl %edi, %r9d
andl $-0x4, %r9d
xorl %eax, %eax
cmpl $0xdc, %r9d
je 0x47344
cmpl $0xd8, %r9d
jne 0x47331
leaq 0x4(%rdx), %r9
movl $0xffffff98, %eax # imm = 0xFFFFFF98
cmpq %rcx, %r9
ja 0x47344
movzbl (%r8), %ecx
movl %ecx, %r8d
andl $-0x4, %r8d
movl $0x0, %eax
cmpl $0xdc, %r8d
jne 0x47344
shll $0x12, %edi
shll $0x8, %ecx
orl %edi, %ecx
movzbl 0x1(%rdx), %eax
shll $0xa, %eax
movzbl 0x3(%rdx), %edx
andl $0xc0300, %ecx # imm = 0xC0300
orl %edx, %ecx
addl %eax, %ecx
addl $0x10000, %ecx # imm = 0x10000
movl $0x4, %eax
jmp 0x4733f
shll $0x8, %edi
movzbl 0x1(%rdx), %ecx
orl %edi, %ecx
movl $0x2, %eax
movl %ecx, %ecx
movq %rcx, (%rsi)
popq %rbp
retq
|
my_utf16_uni:
push rbp
mov rbp, rsp
lea r8, [rdx+2]
mov eax, 0FFFFFF9Ah
cmp r8, rcx
ja loc_47344
movzx edi, byte ptr [rdx]
mov r9d, edi
and r9d, 0FFFFFFFCh
xor eax, eax
cmp r9d, 0DCh
jz short loc_47344
cmp r9d, 0D8h
jnz short loc_47331
lea r9, [rdx+4]
mov eax, 0FFFFFF98h
cmp r9, rcx
ja short loc_47344
movzx ecx, byte ptr [r8]
mov r8d, ecx
and r8d, 0FFFFFFFCh
mov eax, 0
cmp r8d, 0DCh
jnz short loc_47344
shl edi, 12h
shl ecx, 8
or ecx, edi
movzx eax, byte ptr [rdx+1]
shl eax, 0Ah
movzx edx, byte ptr [rdx+3]
and ecx, 0C0300h
or ecx, edx
add ecx, eax
add ecx, 10000h
mov eax, 4
jmp short loc_4733F
loc_47331:
shl edi, 8
movzx ecx, byte ptr [rdx+1]
or ecx, edi
mov eax, 2
loc_4733F:
mov ecx, ecx
mov [rsi], rcx
loc_47344:
pop rbp
retn
|
long long my_utf16_uni(long long a1, _QWORD *a2, unsigned __int8 *a3, unsigned long long a4)
{
_BYTE *v4; // r8
long long result; // rax
int v6; // edi
int v7; // r9d
unsigned int v8; // ecx
v4 = a3 + 2;
result = 4294967194LL;
if ( (unsigned long long)(a3 + 2) <= a4 )
{
v6 = *a3;
v7 = v6 & 0xFC;
result = 0LL;
if ( v7 != 220 )
{
if ( v7 != 216 )
{
v8 = (v6 << 8) | a3[1];
result = 2LL;
goto LABEL_8;
}
result = 4294967192LL;
if ( (unsigned long long)(a3 + 4) <= a4 )
{
result = 0LL;
if ( (*v4 & 0xFC) == 0xDC )
{
v8 = (a3[1] << 10) + (a3[3] | ((v6 << 18) | ((unsigned __int8)*v4 << 8)) & 0xC0300) + 0x10000;
result = 4LL;
LABEL_8:
*a2 = v8;
}
}
}
}
return result;
}
|
my_utf16_uni:
PUSH RBP
MOV RBP,RSP
LEA R8,[RDX + 0x2]
MOV EAX,0xffffff9a
CMP R8,RCX
JA 0x00147344
MOVZX EDI,byte ptr [RDX]
MOV R9D,EDI
AND R9D,0xfffffffc
XOR EAX,EAX
CMP R9D,0xdc
JZ 0x00147344
CMP R9D,0xd8
JNZ 0x00147331
LEA R9,[RDX + 0x4]
MOV EAX,0xffffff98
CMP R9,RCX
JA 0x00147344
MOVZX ECX,byte ptr [R8]
MOV R8D,ECX
AND R8D,0xfffffffc
MOV EAX,0x0
CMP R8D,0xdc
JNZ 0x00147344
SHL EDI,0x12
SHL ECX,0x8
OR ECX,EDI
MOVZX EAX,byte ptr [RDX + 0x1]
SHL EAX,0xa
MOVZX EDX,byte ptr [RDX + 0x3]
AND ECX,0xc0300
OR ECX,EDX
ADD ECX,EAX
ADD ECX,0x10000
MOV EAX,0x4
JMP 0x0014733f
LAB_00147331:
SHL EDI,0x8
MOVZX ECX,byte ptr [RDX + 0x1]
OR ECX,EDI
MOV EAX,0x2
LAB_0014733f:
MOV ECX,ECX
MOV qword ptr [RSI],RCX
LAB_00147344:
POP RBP
RET
|
int8 my_utf16_uni(int8 param_1,ulong *param_2,byte *param_3,byte *param_4)
{
byte bVar1;
byte bVar2;
int8 uVar3;
uint uVar4;
uVar3 = 0xffffff9a;
if (param_3 + 2 <= param_4) {
bVar1 = *param_3;
uVar3 = 0;
if ((bVar1 & 0xfc) != 0xdc) {
if ((bVar1 & 0xfc) == 0xd8) {
if (param_4 < param_3 + 4) {
return 0xffffff98;
}
bVar2 = param_3[2];
if ((bVar2 & 0xfc) != 0xdc) {
return 0;
}
uVar4 = (((uint)bVar2 << 8 | (uint)bVar1 << 0x12) & 0xc0300 | (uint)param_3[3]) +
(uint)param_3[1] * 0x400 + 0x10000;
uVar3 = 4;
}
else {
uVar4 = (uint)CONCAT11(bVar1,param_3[1]);
uVar3 = 2;
}
*param_2 = (ulong)uVar4;
}
}
return uVar3;
}
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.