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
|
---|---|---|---|---|---|---|---|---|---|---|---|
9,300 |
get_loc_or_ref
|
bluesky950520[P]quickjs/quickjs.c
|
static void get_loc_or_ref(DynBuf *bc, BOOL is_ref, int idx)
{
/* if the field is not initialized, the error is catched when
accessing it */
if (is_ref)
dbuf_putc(bc, OP_get_var_ref);
else
dbuf_putc(bc, OP_get_loc);
dbuf_put_u16(bc, idx);
}
|
O0
|
c
|
get_loc_or_ref:
subq $0x18, %rsp
movq %rdi, 0x10(%rsp)
movl %esi, 0xc(%rsp)
movl %edx, 0x8(%rsp)
cmpl $0x0, 0xc(%rsp)
je 0xc29d9
movq 0x10(%rsp), %rdi
movl $0x5e, %esi
callq 0x249c0
jmp 0xc29e8
movq 0x10(%rsp), %rdi
movl $0x58, %esi
callq 0x249c0
movq 0x10(%rsp), %rdi
movl 0x8(%rsp), %eax
movzwl %ax, %esi
callq 0x7f860
addq $0x18, %rsp
retq
nop
|
get_loc_or_ref:
sub rsp, 18h
mov [rsp+18h+var_8], rdi
mov [rsp+18h+var_C], esi
mov [rsp+18h+var_10], edx
cmp [rsp+18h+var_C], 0
jz short loc_C29D9
mov rdi, [rsp+18h+var_8]
mov esi, 5Eh ; '^'
call dbuf_putc
jmp short loc_C29E8
loc_C29D9:
mov rdi, [rsp+18h+var_8]
mov esi, 58h ; 'X'
call dbuf_putc
loc_C29E8:
mov rdi, [rsp+18h+var_8]
mov eax, [rsp+18h+var_10]
movzx esi, ax
call dbuf_put_u16
add rsp, 18h
retn
|
long long get_loc_or_ref(_QWORD *a1, int a2, __int16 a3)
{
if ( a2 )
dbuf_putc(a1, 94);
else
dbuf_putc(a1, 88);
return dbuf_put_u16(a1, a3);
}
|
get_loc_or_ref:
SUB RSP,0x18
MOV qword ptr [RSP + 0x10],RDI
MOV dword ptr [RSP + 0xc],ESI
MOV dword ptr [RSP + 0x8],EDX
CMP dword ptr [RSP + 0xc],0x0
JZ 0x001c29d9
MOV RDI,qword ptr [RSP + 0x10]
MOV ESI,0x5e
CALL 0x001249c0
JMP 0x001c29e8
LAB_001c29d9:
MOV RDI,qword ptr [RSP + 0x10]
MOV ESI,0x58
CALL 0x001249c0
LAB_001c29e8:
MOV RDI,qword ptr [RSP + 0x10]
MOV EAX,dword ptr [RSP + 0x8]
MOVZX ESI,AX
CALL 0x0017f860
ADD RSP,0x18
RET
|
void get_loc_or_ref(int8 param_1,int param_2,int2 param_3)
{
if (param_2 == 0) {
dbuf_putc(param_1,0x58);
}
else {
dbuf_putc(param_1,0x5e);
}
dbuf_put_u16(param_1,param_3);
return;
}
|
|
9,301 |
get_loc_or_ref
|
bluesky950520[P]quickjs/quickjs.c
|
static void get_loc_or_ref(DynBuf *bc, BOOL is_ref, int idx)
{
/* if the field is not initialized, the error is catched when
accessing it */
if (is_ref)
dbuf_putc(bc, OP_get_var_ref);
else
dbuf_putc(bc, OP_get_loc);
dbuf_put_u16(bc, idx);
}
|
O2
|
c
|
get_loc_or_ref:
pushq %r14
pushq %rbx
pushq %rax
movl %edx, %ebx
movq %rdi, %r14
testl %esi, %esi
pushq $0x58
popq %rax
pushq $0x5e
popq %rsi
cmovel %eax, %esi
callq 0x198e3
movzwl %bx, %esi
movq %r14, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x40b78
|
get_loc_or_ref:
push r14
push rbx
push rax
mov ebx, edx
mov r14, rdi
test esi, esi
push 58h ; 'X'
pop rax
push 5Eh ; '^'
pop rsi
cmovz esi, eax
call dbuf_putc
movzx esi, bx
mov rdi, r14
add rsp, 8
pop rbx
pop r14
jmp dbuf_put_u16
|
long long get_loc_or_ref(_QWORD *a1, int a2, __int16 a3)
{
bool v4; // zf
char v5; // si
v4 = a2 == 0;
v5 = 94;
if ( v4 )
v5 = 88;
dbuf_putc(a1, v5);
return dbuf_put_u16(a1, a3);
}
|
get_loc_or_ref:
PUSH R14
PUSH RBX
PUSH RAX
MOV EBX,EDX
MOV R14,RDI
TEST ESI,ESI
PUSH 0x58
POP RAX
PUSH 0x5e
POP RSI
CMOVZ ESI,EAX
CALL 0x001198e3
MOVZX ESI,BX
MOV RDI,R14
ADD RSP,0x8
POP RBX
POP R14
JMP 0x00140b78
|
void get_loc_or_ref(int8 param_1,int param_2,int2 param_3)
{
int8 uVar1;
uVar1 = 0x5e;
if (param_2 == 0) {
uVar1 = 0x58;
}
dbuf_putc(param_1,uVar1);
dbuf_put_u16(param_1,param_3);
return;
}
|
|
9,302 |
nlohmann::json_abi_v3_11_3::ordered_map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>, std::less<void>, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>>>::emplace(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>&&)
|
monkey531[P]llama/common/./json.hpp
|
std::pair<iterator, bool> emplace(const key_type& key, T&& t)
{
for (auto it = this->begin(); it != this->end(); ++it)
{
if (m_compare(it->first, key))
{
return {it, false};
}
}
Container::emplace_back(key, std::forward<T>(t));
return {std::prev(this->end()), true};
}
|
O0
|
cpp
|
nlohmann::json_abi_v3_11_3::ordered_map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>, std::less<void>, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>>>::emplace(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>&&):
subq $0x68, %rsp
movq %rdi, 0x50(%rsp)
movq %rsi, 0x48(%rsp)
movq %rdx, 0x40(%rsp)
movq 0x50(%rsp), %rdi
movq %rdi, 0x8(%rsp)
callq 0xa2a90
movq %rax, 0x38(%rsp)
movq 0x8(%rsp), %rdi
callq 0xa2ac0
movq %rax, 0x30(%rsp)
leaq 0x38(%rsp), %rdi
leaq 0x30(%rsp), %rsi
callq 0xa2af0
testb $0x1, %al
jne 0xbdb4b
jmp 0xbdba2
movq 0x8(%rsp), %rax
addq $0x18, %rax
movq %rax, (%rsp)
leaq 0x38(%rsp), %rdi
callq 0xbbbe0
movq (%rsp), %rdi
movq %rax, %rsi
movq 0x48(%rsp), %rdx
callq 0xbdc00
testb $0x1, %al
jne 0xbdb79
jmp 0xbdb94
movb $0x0, 0x2f(%rsp)
leaq 0x58(%rsp), %rdi
leaq 0x38(%rsp), %rsi
leaq 0x2f(%rsp), %rdx
callq 0xbdc30
jmp 0xbdbf2
jmp 0xbdb96
leaq 0x38(%rsp), %rdi
callq 0xa2b70
jmp 0xbdb27
movq 0x8(%rsp), %rdi
movq 0x48(%rsp), %rsi
movq 0x40(%rsp), %rdx
callq 0xbdc60
movq 0x8(%rsp), %rdi
callq 0xa2ac0
movq %rax, 0x18(%rsp)
movq 0x18(%rsp), %rdi
movl $0x1, %esi
callq 0xbdcf0
movq %rax, 0x20(%rsp)
movb $0x1, 0x17(%rsp)
leaq 0x58(%rsp), %rdi
leaq 0x20(%rsp), %rsi
leaq 0x17(%rsp), %rdx
callq 0xbdd30
movq 0x58(%rsp), %rax
movb 0x60(%rsp), %dl
addq $0x68, %rsp
retq
|
_ZN8nlohmann16json_abi_v3_11_311ordered_mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS0_10basic_jsonIS1_St6vectorS7_blmdSaNS0_14adl_serializerES9_IhSaIhEEvEESt4lessIvESaISt4pairIKS7_SD_EEE7emplaceERSH_OSD_:
sub rsp, 68h
mov [rsp+68h+var_18], rdi
mov [rsp+68h+var_20], rsi
mov [rsp+68h+var_28], rdx
mov rdi, [rsp+68h+var_18]
mov [rsp+68h+var_60], rdi
call _ZNSt6vectorISt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN8nlohmann16json_abi_v3_11_310basic_jsonINS9_11ordered_mapES_S6_blmdSaNS9_14adl_serializerES_IhSaIhEEvEEESaISG_EE5beginEv; std::vector<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>>::begin(void)
mov [rsp+68h+var_30], rax
loc_BDB27:
mov rdi, [rsp+68h+var_60]
call _ZNSt6vectorISt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN8nlohmann16json_abi_v3_11_310basic_jsonINS9_11ordered_mapES_S6_blmdSaNS9_14adl_serializerES_IhSaIhEEvEEESaISG_EE3endEv; std::vector<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>>::end(void)
mov [rsp+68h+var_38], rax
lea rdi, [rsp+68h+var_30]
lea rsi, [rsp+68h+var_38]
call _ZN9__gnu_cxxneIPSt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN8nlohmann16json_abi_v3_11_310basic_jsonINSA_11ordered_mapESt6vectorS7_blmdSaNSA_14adl_serializerESD_IhSaIhEEvEEESD_ISI_SaISI_EEEEbRKNS_17__normal_iteratorIT_T0_EESR_; __gnu_cxx::operator!=<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>> *,std::vector<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>>>(__gnu_cxx::__normal_iterator<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>> *,std::vector<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>>> const&,__gnu_cxx::__normal_iterator<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>> *,std::vector<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>>> const&)
test al, 1
jnz short loc_BDB4B
jmp short loc_BDBA2
loc_BDB4B:
mov rax, [rsp+68h+var_60]
add rax, 18h
mov [rsp+68h+var_68], rax
lea rdi, [rsp+68h+var_30]
call _ZNK9__gnu_cxx17__normal_iteratorIPSt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN8nlohmann16json_abi_v3_11_310basic_jsonINSA_11ordered_mapESt6vectorS7_blmdSaNSA_14adl_serializerESD_IhSaIhEEvEEESD_ISI_SaISI_EEEptEv; __gnu_cxx::__normal_iterator<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>> *,std::vector<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>>>::operator->(void)
mov rdi, [rsp+68h+var_68]
mov rsi, rax
mov rdx, [rsp+68h+var_20]
call _ZNKSt8equal_toIvEclIRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES9_EEDTeqclsr3stdE7forwardIT_Efp_Eclsr3stdE7forwardIT0_Efp0_EEOSA_OSB_
test al, 1
jnz short loc_BDB79
jmp short loc_BDB94
loc_BDB79:
mov [rsp+68h+var_39], 0
lea rdi, [rsp+68h+var_10]
lea rsi, [rsp+68h+var_30]
lea rdx, [rsp+68h+var_39]
call _ZNSt4pairIN9__gnu_cxx17__normal_iteratorIPS_IKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN8nlohmann16json_abi_v3_11_310basic_jsonINSA_11ordered_mapESt6vectorS7_blmdSaNSA_14adl_serializerESD_IhSaIhEEvEEESD_ISI_SaISI_EEEEbEC2IRSM_bTnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairISR_SS_EEEbE4typeELb1EEEOSR_OSS_
jmp short loc_BDBF2
loc_BDB94:
jmp short $+2
loc_BDB96:
lea rdi, [rsp+68h+var_30]
call _ZN9__gnu_cxx17__normal_iteratorIPSt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN8nlohmann16json_abi_v3_11_310basic_jsonINSA_11ordered_mapESt6vectorS7_blmdSaNSA_14adl_serializerESD_IhSaIhEEvEEESD_ISI_SaISI_EEEppEv; __gnu_cxx::__normal_iterator<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>> *,std::vector<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>>>::operator++(void)
jmp short loc_BDB27
loc_BDBA2:
mov rdi, [rsp+68h+var_60]
mov rsi, [rsp+68h+var_20]
mov rdx, [rsp+68h+var_28]
call _ZNSt6vectorISt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN8nlohmann16json_abi_v3_11_310basic_jsonINS9_11ordered_mapES_S6_blmdSaNS9_14adl_serializerES_IhSaIhEEvEEESaISG_EE12emplace_backIJRS7_SF_EEERSG_DpOT_; std::vector<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>>::emplace_back<std::string const&,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>(std::string const&,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> &&)
mov rdi, [rsp+68h+var_60]
call _ZNSt6vectorISt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN8nlohmann16json_abi_v3_11_310basic_jsonINS9_11ordered_mapES_S6_blmdSaNS9_14adl_serializerES_IhSaIhEEvEEESaISG_EE3endEv; std::vector<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>>::end(void)
mov [rsp+68h+var_50], rax
mov rdi, [rsp+68h+var_50]
mov esi, 1
call _ZSt4prevIN9__gnu_cxx17__normal_iteratorIPSt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN8nlohmann16json_abi_v3_11_310basic_jsonINSB_11ordered_mapESt6vectorS8_blmdSaNSB_14adl_serializerESE_IhSaIhEEvEEESE_ISJ_SaISJ_EEEEET_SO_NSt15iterator_traitsISO_E15difference_typeE; std::prev<__gnu_cxx::__normal_iterator<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>> *,std::vector<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>>>>(__gnu_cxx::__normal_iterator<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>> *,std::vector<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>>>,std::iterator_traits<__gnu_cxx::__normal_iterator<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>> *,std::vector<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>>>>::difference_type)
mov [rsp+68h+var_48], rax
mov [rsp+68h+var_51], 1
lea rdi, [rsp+68h+var_10]
lea rsi, [rsp+68h+var_48]
lea rdx, [rsp+68h+var_51]
call _ZNSt4pairIN9__gnu_cxx17__normal_iteratorIPS_IKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN8nlohmann16json_abi_v3_11_310basic_jsonINSA_11ordered_mapESt6vectorS7_blmdSaNSA_14adl_serializerESD_IhSaIhEEvEEESD_ISI_SaISI_EEEEbEC2ISM_bTnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairISQ_SR_EEEbE4typeELb1EEEOSQ_OSR_
loc_BDBF2:
mov rax, [rsp+68h+var_10]
mov dl, [rsp+68h+var_8]
add rsp, 68h
retn
|
long long nlohmann::json_abi_v3_11_3::ordered_map<std::string,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,std::less<void>,std::allocator<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>>>::emplace(
long long a1,
long long a2,
long long a3)
{
long long v3; // rax
char v5; // [rsp+17h] [rbp-51h] BYREF
long long v6; // [rsp+18h] [rbp-50h]
long long v7; // [rsp+20h] [rbp-48h] BYREF
char v8; // [rsp+2Fh] [rbp-39h] BYREF
long long v9; // [rsp+30h] [rbp-38h] BYREF
long long i; // [rsp+38h] [rbp-30h] BYREF
long long v11; // [rsp+40h] [rbp-28h]
long long v12; // [rsp+48h] [rbp-20h]
long long v13; // [rsp+50h] [rbp-18h]
long long v14; // [rsp+58h] [rbp-10h] BYREF
v13 = a1;
v12 = a2;
v11 = a3;
for ( i = std::vector<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>>::begin(a1);
;
__gnu_cxx::__normal_iterator<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>> *,std::vector<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>>>::operator++(&i) )
{
v9 = std::vector<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>>::end(a1);
if ( !__gnu_cxx::operator!=<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>> *,std::vector<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>>>(
(long long)&i,
(long long)&v9) )
break;
v3 = __gnu_cxx::__normal_iterator<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>> *,std::vector<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>>>::operator->((long long)&i);
if ( (std::equal_to<void>::operator()<std::string const&,std::string const&>(a1 + 24, v3, v12) & 1) != 0 )
{
v8 = 0;
ZNSt4pairIN9__gnu_cxx17__normal_iteratorIPS_IKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN8nlohmann16json_abi_v3_11_310basic_jsonINSA_11ordered_mapESt6vectorS7_blmdSaNSA_14adl_serializerESD_IhSaIhEEvEEESD_ISI_SaISI_EEEEbEC2IRSM_bTnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairISR_SS_EEEbE4typeELb1EEEOSR_OSS_(
&v14,
&i,
&v8);
return v14;
}
}
std::vector<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>>::emplace_back<std::string const&,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>(
a1,
v12,
v11);
v6 = std::vector<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>>::end(a1);
v7 = std::prev<__gnu_cxx::__normal_iterator<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>> *,std::vector<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>>>>(
v6,
1LL);
v5 = 1;
ZNSt4pairIN9__gnu_cxx17__normal_iteratorIPS_IKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN8nlohmann16json_abi_v3_11_310basic_jsonINSA_11ordered_mapESt6vectorS7_blmdSaNSA_14adl_serializerESD_IhSaIhEEvEEESD_ISI_SaISI_EEEEbEC2ISM_bTnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairISQ_SR_EEEbE4typeELb1EEEOSQ_OSR_(
&v14,
&v7,
&v5);
return v14;
}
|
emplace:
SUB RSP,0x68
MOV qword ptr [RSP + 0x50],RDI
MOV qword ptr [RSP + 0x48],RSI
MOV qword ptr [RSP + 0x40],RDX
MOV RDI,qword ptr [RSP + 0x50]
MOV qword ptr [RSP + 0x8],RDI
CALL 0x001a2a90
MOV qword ptr [RSP + 0x38],RAX
LAB_001bdb27:
MOV RDI,qword ptr [RSP + 0x8]
CALL 0x001a2ac0
MOV qword ptr [RSP + 0x30],RAX
LEA RDI,[RSP + 0x38]
LEA RSI,[RSP + 0x30]
CALL 0x001a2af0
TEST AL,0x1
JNZ 0x001bdb4b
JMP 0x001bdba2
LAB_001bdb4b:
MOV RAX,qword ptr [RSP + 0x8]
ADD RAX,0x18
MOV qword ptr [RSP],RAX
LEA RDI,[RSP + 0x38]
CALL 0x001bbbe0
MOV RDI,qword ptr [RSP]
MOV RSI,RAX
MOV RDX,qword ptr [RSP + 0x48]
CALL 0x001bdc00
TEST AL,0x1
JNZ 0x001bdb79
JMP 0x001bdb94
LAB_001bdb79:
MOV byte ptr [RSP + 0x2f],0x0
LEA RDI,[RSP + 0x58]
LEA RSI,[RSP + 0x38]
LEA RDX,[RSP + 0x2f]
CALL 0x001bdc30
JMP 0x001bdbf2
LAB_001bdb94:
JMP 0x001bdb96
LAB_001bdb96:
LEA RDI,[RSP + 0x38]
CALL 0x001a2b70
JMP 0x001bdb27
LAB_001bdba2:
MOV RDI,qword ptr [RSP + 0x8]
MOV RSI,qword ptr [RSP + 0x48]
MOV RDX,qword ptr [RSP + 0x40]
CALL 0x001bdc60
MOV RDI,qword ptr [RSP + 0x8]
CALL 0x001a2ac0
MOV qword ptr [RSP + 0x18],RAX
MOV RDI,qword ptr [RSP + 0x18]
MOV ESI,0x1
CALL 0x001bdcf0
MOV qword ptr [RSP + 0x20],RAX
MOV byte ptr [RSP + 0x17],0x1
LEA RDI,[RSP + 0x58]
LEA RSI,[RSP + 0x20]
LEA RDX,[RSP + 0x17]
CALL 0x001bdd30
LAB_001bdbf2:
MOV RAX,qword ptr [RSP + 0x58]
MOV DL,byte ptr [RSP + 0x60]
ADD RSP,0x68
RET
|
/* nlohmann::json_abi_v3_11_3::ordered_map<std::__cxx11::string,
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector,
std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void>, std::less<void>, std::allocator<std::pair<std::__cxx11::string const,
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector,
std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void> > > >::emplace(std::__cxx11::string const&,
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector,
std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void>&&) */
int1 [16] __thiscall
nlohmann::json_abi_v3_11_3::
ordered_map<std::__cxx11::string,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,std::less<void>,std::allocator<std::pair<std::__cxx11::string_const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>>
::emplace(ordered_map<std::__cxx11::string,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,std::less<void>,std::allocator<std::pair<std::__cxx11::string_const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>>
*this,string *param_1,basic_json *param_2)
{
bool bVar1;
string *psVar2;
ulong uVar3;
int8 extraout_RDX;
int8 extraout_RDX_00;
int8 uVar4;
int1 auVar5 [16];
int1 local_51;
int8 local_50;
int8 local_48;
int1 local_39;
int8 local_38;
int8 local_30;
basic_json *local_28;
string *local_20;
ordered_map<std::__cxx11::string,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,std::less<void>,std::allocator<std::pair<std::__cxx11::string_const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>>
*local_18;
int8 local_10;
int1 local_8;
local_28 = param_2;
local_20 = param_1;
local_18 = this;
local_30 = std::
vector<std::pair<std::__cxx11::string_const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>,std::allocator<std::pair<std::__cxx11::string_const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>>
::begin((vector<std::pair<std::__cxx11::string_const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>,std::allocator<std::pair<std::__cxx11::string_const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>>
*)this);
do {
local_38 = std::
vector<std::pair<std::__cxx11::string_const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>,std::allocator<std::pair<std::__cxx11::string_const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>>
::end((vector<std::pair<std::__cxx11::string_const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>,std::allocator<std::pair<std::__cxx11::string_const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>>
*)this);
bVar1 = __gnu_cxx::operator!=((__normal_iterator *)&local_30,(__normal_iterator *)&local_38);
if (!bVar1) {
std::
vector<std::pair<std::__cxx11::string_const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>,std::allocator<std::pair<std::__cxx11::string_const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>>
::
emplace_back<std::__cxx11::string_const&,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>
((vector<std::pair<std::__cxx11::string_const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>,std::allocator<std::pair<std::__cxx11::string_const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>>
*)this,local_20,local_28);
local_50 = std::
vector<std::pair<std::__cxx11::string_const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>,std::allocator<std::pair<std::__cxx11::string_const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>>
::end((vector<std::pair<std::__cxx11::string_const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>,std::allocator<std::pair<std::__cxx11::string_const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>>
*)this);
local_48 = std::
prev<__gnu_cxx::__normal_iterator<std::pair<std::__cxx11::string_const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>*,std::vector<std::pair<std::__cxx11::string_const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>,std::allocator<std::pair<std::__cxx11::string_const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>>>>
(local_50,1);
local_51 = 1;
_ZNSt4pairIN9__gnu_cxx17__normal_iteratorIPS_IKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN8nlohmann16json_abi_v3_11_310basic_jsonINSA_11ordered_mapESt6vectorS7_blmdSaNSA_14adl_serializerESD_IhSaIhEEvEEESD_ISI_SaISI_EEEEbEC2ISM_bTnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairISQ_SR_EEEbE4typeELb1EEEOSQ_OSR_
(&local_10,&local_48,&local_51);
uVar4 = extraout_RDX_00;
LAB_001bdbf2:
auVar5._9_7_ = (int7)((ulong)uVar4 >> 8);
auVar5[8] = local_8;
auVar5._0_8_ = local_10;
return auVar5;
}
psVar2 = (string *)
__gnu_cxx::
__normal_iterator<std::pair<std::__cxx11::string_const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>*,std::vector<std::pair<std::__cxx11::string_const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>,std::allocator<std::pair<std::__cxx11::string_const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>>>
::operator->((__normal_iterator<std::pair<std::__cxx11::string_const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>*,std::vector<std::pair<std::__cxx11::string_const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>,std::allocator<std::pair<std::__cxx11::string_const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>>>
*)&local_30);
uVar3 = std::equal_to<void>::operator()((equal_to<void> *)(this + 0x18),psVar2,local_20);
if ((uVar3 & 1) != 0) {
local_39 = 0;
_ZNSt4pairIN9__gnu_cxx17__normal_iteratorIPS_IKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN8nlohmann16json_abi_v3_11_310basic_jsonINSA_11ordered_mapESt6vectorS7_blmdSaNSA_14adl_serializerESD_IhSaIhEEvEEESD_ISI_SaISI_EEEEbEC2IRSM_bTnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairISR_SS_EEEbE4typeELb1EEEOSR_OSS_
(&local_10,&local_30,&local_39);
uVar4 = extraout_RDX;
goto LAB_001bdbf2;
}
__gnu_cxx::
__normal_iterator<std::pair<std::__cxx11::string_const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>*,std::vector<std::pair<std::__cxx11::string_const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>,std::allocator<std::pair<std::__cxx11::string_const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>>>
::operator++((__normal_iterator<std::pair<std::__cxx11::string_const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>*,std::vector<std::pair<std::__cxx11::string_const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>,std::allocator<std::pair<std::__cxx11::string_const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>>>
*)&local_30);
} while( true );
}
|
|
9,303 |
nlohmann::json_abi_v3_11_3::ordered_map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>, std::less<void>, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>>>::emplace(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>&&)
|
monkey531[P]llama/common/./json.hpp
|
std::pair<iterator, bool> emplace(const key_type& key, T&& t)
{
for (auto it = this->begin(); it != this->end(); ++it)
{
if (m_compare(it->first, key))
{
return {it, false};
}
}
Container::emplace_back(key, std::forward<T>(t));
return {std::prev(this->end()), true};
}
|
O1
|
cpp
|
nlohmann::json_abi_v3_11_3::ordered_map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>, std::less<void>, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>>>::emplace(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>&&):
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdx, %r15
movq %rsi, %r12
movq %rdi, %r14
movq (%rdi), %rbx
cmpq 0x8(%rdi), %rbx
sete %bpl
je 0x51dda
movq %rbx, %rdi
movq %r12, %rsi
callq 0x50121
testb %al, %al
jne 0x51dd5
addq $0x60, %rbx
cmpq 0x8(%r14), %rbx
jmp 0x51db6
testb %bpl, %bpl
je 0x51df4
movq %r14, %rdi
movq %r12, %rsi
movq %r15, %rdx
callq 0x51e02
movq 0x8(%r14), %rbx
addq $-0x60, %rbx
movb $0x1, %dl
jmp 0x51df6
xorl %edx, %edx
movq %rbx, %rax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
|
_ZN8nlohmann16json_abi_v3_11_311ordered_mapINS0_10basic_jsonIS1_St6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEEN5minja5ValueESt4lessISD_ESaISt4pairIKSD_SF_EEE7emplaceERSJ_OSF_:
push rbp
push r15
push r14
push r12
push rbx
mov r15, rdx
mov r12, rsi
mov r14, rdi
mov rbx, [rdi]
cmp rbx, [rdi+8]
loc_51DB6:
setz bpl
jz short loc_51DDA
mov rdi, rbx
mov rsi, r12
call _ZN8nlohmann16json_abi_v3_11_3eqERKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEESF_; nlohmann::json_abi_v3_11_3::operator==(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const&,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const&)
test al, al
jnz short loc_51DD5
add rbx, 60h ; '`'
cmp rbx, [r14+8]
jmp short loc_51DB6
loc_51DD5:
test bpl, bpl
jz short loc_51DF4
loc_51DDA:
mov rdi, r14
mov rsi, r12
mov rdx, r15
call _ZNSt6vectorISt4pairIKN8nlohmann16json_abi_v3_11_310basic_jsonINS2_11ordered_mapES_NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS2_14adl_serializerES_IhSaIhEEvEEN5minja5ValueEESaISI_EE12emplace_backIJRSF_SH_EEERSI_DpOT_; std::vector<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const,minja::Value>>::emplace_back<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const&,minja::Value>(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const&,minja::Value &&)
mov rbx, [r14+8]
add rbx, 0FFFFFFFFFFFFFFA0h
mov dl, 1
jmp short loc_51DF6
loc_51DF4:
xor edx, edx
loc_51DF6:
mov rax, rbx
pop rbx
pop r12
pop r14
pop r15
pop rbp
retn
|
long long nlohmann::json_abi_v3_11_3::ordered_map<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,minja::Value,std::less<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>,std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> const,minja::Value>>>::emplace(
long long a1,
unsigned __int8 *a2,
long long a3,
__m128d a4)
{
unsigned __int8 *v5; // rbx
bool i; // zf
bool v7; // bp
v5 = *(unsigned __int8 **)a1;
for ( i = *(_QWORD *)a1 == *(_QWORD *)(a1 + 8); ; i = v5 == *(unsigned __int8 **)(a1 + 8) )
{
v7 = i;
if ( i )
break;
if ( (unsigned __int8)nlohmann::json_abi_v3_11_3::operator==(v5, a2, a4) )
{
if ( !v7 )
return (long long)v5;
break;
}
v5 += 96;
}
std::vector<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> const,minja::Value>>::emplace_back<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> const&,minja::Value>(
a1,
a2,
a3);
return *(_QWORD *)(a1 + 8) - 96LL;
}
|
emplace:
PUSH RBP
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
MOV R15,RDX
MOV R12,RSI
MOV R14,RDI
MOV RBX,qword ptr [RDI]
CMP RBX,qword ptr [RDI + 0x8]
LAB_00151db6:
SETZ BPL
JZ 0x00151dda
MOV RDI,RBX
MOV RSI,R12
CALL 0x00150121
TEST AL,AL
JNZ 0x00151dd5
ADD RBX,0x60
CMP RBX,qword ptr [R14 + 0x8]
JMP 0x00151db6
LAB_00151dd5:
TEST BPL,BPL
JZ 0x00151df4
LAB_00151dda:
MOV RDI,R14
MOV RSI,R12
MOV RDX,R15
CALL 0x00151e02
MOV RBX,qword ptr [R14 + 0x8]
ADD RBX,-0x60
MOV DL,0x1
JMP 0x00151df6
LAB_00151df4:
XOR EDX,EDX
LAB_00151df6:
MOV RAX,RBX
POP RBX
POP R12
POP R14
POP R15
POP RBP
RET
|
/* nlohmann::json_abi_v3_11_3::ordered_map<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,
std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void>, minja::Value,
std::less<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,
std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void> >,
std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,
std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void> const, minja::Value> >
>::emplace(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,
std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void> const&, minja::Value&&) */
int1 [16] __thiscall
nlohmann::json_abi_v3_11_3::
ordered_map<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,minja::Value,std::less<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>,std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const,minja::Value>>>
::emplace(ordered_map<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,minja::Value,std::less<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>,std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const,minja::Value>>>
*this,basic_json *param_1,Value *param_2)
{
char cVar1;
int8 extraout_RDX;
int8 uVar2;
basic_json *pbVar3;
bool bVar4;
int1 auVar5 [16];
pbVar3 = *(basic_json **)this;
bVar4 = pbVar3 == *(basic_json **)(this + 8);
do {
if (bVar4) {
LAB_00151dda:
std::
vector<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const,minja::Value>,std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const,minja::Value>>>
::
emplace_back<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const&,minja::Value>
((vector<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const,minja::Value>,std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const,minja::Value>>>
*)this,param_1,param_2);
pbVar3 = (basic_json *)(*(long *)(this + 8) + -0x60);
uVar2 = CONCAT71((int7)((ulong)extraout_RDX >> 8),1);
LAB_00151df6:
auVar5._8_8_ = uVar2;
auVar5._0_8_ = pbVar3;
return auVar5;
}
cVar1 = operator==(pbVar3,param_1);
if (cVar1 != '\0') {
if (!bVar4) {
uVar2 = 0;
goto LAB_00151df6;
}
goto LAB_00151dda;
}
pbVar3 = pbVar3 + 0x60;
bVar4 = pbVar3 == *(basic_json **)(this + 8);
} while( true );
}
|
|
9,304 |
nlohmann::json_abi_v3_11_3::ordered_map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>, std::less<void>, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>>>::emplace(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>&&)
|
monkey531[P]llama/common/./json.hpp
|
std::pair<iterator, bool> emplace(const key_type& key, T&& t)
{
for (auto it = this->begin(); it != this->end(); ++it)
{
if (m_compare(it->first, key))
{
return {it, false};
}
}
Container::emplace_back(key, std::forward<T>(t));
return {std::prev(this->end()), true};
}
|
O2
|
cpp
|
nlohmann::json_abi_v3_11_3::ordered_map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>, std::less<void>, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>>>::emplace(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>&&):
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %r15
movq %rsi, %r12
movq %rdi, %r14
movq (%rdi), %rbx
cmpq 0x8(%r14), %rbx
je 0x45735
movq %rbx, %rdi
movq %r12, %rsi
callq 0x263d8
testb %al, %al
jne 0x4574f
addq $0x30, %rbx
jmp 0x4571a
movq %r14, %rdi
movq %r12, %rsi
movq %r15, %rdx
callq 0x45760
movq 0x8(%r14), %rbx
addq $-0x30, %rbx
movb $0x1, %dl
jmp 0x45751
xorl %edx, %edx
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
|
_ZN8nlohmann16json_abi_v3_11_311ordered_mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS0_10basic_jsonIS1_St6vectorS7_blmdSaNS0_14adl_serializerES9_IhSaIhEEvEESt4lessIvESaISt4pairIKS7_SD_EEE7emplaceERSH_OSD_:
push r15
push r14
push r12
push rbx
push rax
mov r15, rdx
mov r12, rsi
mov r14, rdi
mov rbx, [rdi]
loc_4571A:
cmp rbx, [r14+8]
jz short loc_45735
mov rdi, rbx
mov rsi, r12
call _ZSteqIcEN9__gnu_cxx11__enable_ifIXsr9__is_charIT_EE7__valueEbE6__typeERKNSt7__cxx1112basic_stringIS2_St11char_traitsIS2_ESaIS2_EEESC_
test al, al
jnz short loc_4574F
add rbx, 30h ; '0'
jmp short loc_4571A
loc_45735:
mov rdi, r14
mov rsi, r12
mov rdx, r15
call _ZNSt6vectorISt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN8nlohmann16json_abi_v3_11_310basic_jsonINS9_11ordered_mapES_S6_blmdSaNS9_14adl_serializerES_IhSaIhEEvEEESaISG_EE12emplace_backIJRS7_SF_EEERSG_DpOT_; std::vector<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>>::emplace_back<std::string const&,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>(std::string const&,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> &&)
mov rbx, [r14+8]
add rbx, 0FFFFFFFFFFFFFFD0h
mov dl, 1
jmp short loc_45751
loc_4574F:
xor edx, edx
loc_45751:
mov rax, rbx
add rsp, 8
pop rbx
pop r12
pop r14
pop r15
retn
|
long long nlohmann::json_abi_v3_11_3::ordered_map<std::string,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,std::less<void>,std::allocator<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>>>::emplace(
_QWORD **a1,
_QWORD *a2,
long long a3)
{
_QWORD *i; // rbx
for ( i = *a1; i != a1[1]; i += 6 )
{
if ( std::operator==<char>(i, a2) )
return (long long)i;
}
std::vector<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>>::emplace_back<std::string const&,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>(
a1,
a2,
a3);
return (long long)(a1[1] - 6);
}
|
emplace:
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
PUSH RAX
MOV R15,RDX
MOV R12,RSI
MOV R14,RDI
MOV RBX,qword ptr [RDI]
LAB_0014571a:
CMP RBX,qword ptr [R14 + 0x8]
JZ 0x00145735
MOV RDI,RBX
MOV RSI,R12
CALL 0x001263d8
TEST AL,AL
JNZ 0x0014574f
ADD RBX,0x30
JMP 0x0014571a
LAB_00145735:
MOV RDI,R14
MOV RSI,R12
MOV RDX,R15
CALL 0x00145760
MOV RBX,qword ptr [R14 + 0x8]
ADD RBX,-0x30
MOV DL,0x1
JMP 0x00145751
LAB_0014574f:
XOR EDX,EDX
LAB_00145751:
MOV RAX,RBX
ADD RSP,0x8
POP RBX
POP R12
POP R14
POP R15
RET
|
/* nlohmann::json_abi_v3_11_3::ordered_map<std::__cxx11::string,
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector,
std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void>, std::less<void>, std::allocator<std::pair<std::__cxx11::string const,
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector,
std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void> > > >::emplace(std::__cxx11::string const&,
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector,
std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void>&&) */
int1 [16] __thiscall
nlohmann::json_abi_v3_11_3::
ordered_map<std::__cxx11::string,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,std::less<void>,std::allocator<std::pair<std::__cxx11::string_const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>>
::emplace(ordered_map<std::__cxx11::string,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,std::less<void>,std::allocator<std::pair<std::__cxx11::string_const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>>
*this,string *param_1,basic_json *param_2)
{
char cVar1;
int8 extraout_RDX;
int8 uVar2;
string *psVar3;
int1 auVar4 [16];
psVar3 = *(string **)this;
do {
if (psVar3 == *(string **)(this + 8)) {
std::
vector<std::pair<std::__cxx11::string_const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>,std::allocator<std::pair<std::__cxx11::string_const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>>
::
emplace_back<std::__cxx11::string_const&,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>
((vector<std::pair<std::__cxx11::string_const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>,std::allocator<std::pair<std::__cxx11::string_const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>>
*)this,param_1,param_2);
psVar3 = (string *)(*(long *)(this + 8) + -0x30);
uVar2 = CONCAT71((int7)((ulong)extraout_RDX >> 8),1);
LAB_00145751:
auVar4._8_8_ = uVar2;
auVar4._0_8_ = psVar3;
return auVar4;
}
cVar1 = std::operator==(psVar3,param_1);
if (cVar1 != '\0') {
uVar2 = 0;
goto LAB_00145751;
}
psVar3 = psVar3 + 0x30;
} while( true );
}
|
|
9,305 |
nlohmann::json_abi_v3_11_3::ordered_map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>, std::less<void>, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>>>::emplace(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>&&)
|
monkey531[P]llama/common/./json.hpp
|
std::pair<iterator, bool> emplace(const key_type& key, T&& t)
{
for (auto it = this->begin(); it != this->end(); ++it)
{
if (m_compare(it->first, key))
{
return {it, false};
}
}
Container::emplace_back(key, std::forward<T>(t));
return {std::prev(this->end()), true};
}
|
O3
|
cpp
|
nlohmann::json_abi_v3_11_3::ordered_map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>, std::less<void>, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>>>::emplace(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>&&):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, (%rsp)
movq %rsi, %r12
movq %rdi, %r14
movq (%rdi), %rbx
movq 0x8(%rdi), %r15
cmpq %r15, %rbx
je 0x4a6b4
movq (%r12), %r13
movq 0x8(%r12), %rbp
cmpq %rbp, 0x8(%rbx)
jne 0x4a6ab
testq %rbp, %rbp
je 0x4a6cf
movq (%rbx), %rdi
movq %r13, %rsi
movq %rbp, %rdx
callq 0x186e0
testl %eax, %eax
je 0x4a6cf
addq $0x30, %rbx
cmpq %r15, %rbx
jne 0x4a68e
movq %r14, %rdi
movq %r12, %rsi
movq (%rsp), %rdx
callq 0x4a6e4
movq 0x8(%r14), %rbx
addq $-0x30, %rbx
movb $0x1, %dl
jmp 0x4a6d1
xorl %edx, %edx
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
|
_ZN8nlohmann16json_abi_v3_11_311ordered_mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS0_10basic_jsonIS1_St6vectorS7_blmdSaNS0_14adl_serializerES9_IhSaIhEEvEESt4lessIvESaISt4pairIKS7_SD_EEE7emplaceERSH_OSD_:
push rbp
push r15
push r14
push r13
push r12
push rbx
push rax
mov [rsp+38h+var_38], rdx
mov r12, rsi
mov r14, rdi
mov rbx, [rdi]
mov r15, [rdi+8]
cmp rbx, r15
jz short loc_4A6B4
mov r13, [r12]
mov rbp, [r12+8]
loc_4A68E:
cmp [rbx+8], rbp
jnz short loc_4A6AB
test rbp, rbp
jz short loc_4A6CF
mov rdi, [rbx]
mov rsi, r13
mov rdx, rbp
call _bcmp
test eax, eax
jz short loc_4A6CF
loc_4A6AB:
add rbx, 30h ; '0'
cmp rbx, r15
jnz short loc_4A68E
loc_4A6B4:
mov rdi, r14
mov rsi, r12
mov rdx, [rsp+38h+var_38]
call _ZNSt6vectorISt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN8nlohmann16json_abi_v3_11_310basic_jsonINS9_11ordered_mapES_S6_blmdSaNS9_14adl_serializerES_IhSaIhEEvEEESaISG_EE12emplace_backIJRS7_SF_EEERSG_DpOT_; std::vector<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>>::emplace_back<std::string const&,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>(std::string const&,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> &&)
mov rbx, [r14+8]
add rbx, 0FFFFFFFFFFFFFFD0h
mov dl, 1
jmp short loc_4A6D1
loc_4A6CF:
xor edx, edx
loc_4A6D1:
mov rax, rbx
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
|
long long nlohmann::json_abi_v3_11_3::ordered_map<std::string,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,std::less<void>,std::allocator<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>>>::emplace(
_QWORD *a1,
long long *a2,
long long a3)
{
_QWORD *v3; // rbx
_QWORD *v4; // r15
long long v5; // r13
long long v6; // rbp
v3 = (_QWORD *)*a1;
v4 = (_QWORD *)a1[1];
if ( (_QWORD *)*a1 == v4 )
{
LABEL_7:
std::vector<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>>::emplace_back<std::string const&,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>(
a1,
a2,
a3);
return a1[1] - 48LL;
}
else
{
v5 = *a2;
v6 = a2[1];
while ( v3[1] != v6 || v6 && (unsigned int)bcmp(*v3, v5) )
{
v3 += 6;
if ( v3 == v4 )
goto LABEL_7;
}
}
return (long long)v3;
}
|
emplace:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
PUSH RAX
MOV qword ptr [RSP],RDX
MOV R12,RSI
MOV R14,RDI
MOV RBX,qword ptr [RDI]
MOV R15,qword ptr [RDI + 0x8]
CMP RBX,R15
JZ 0x0014a6b4
MOV R13,qword ptr [R12]
MOV RBP,qword ptr [R12 + 0x8]
LAB_0014a68e:
CMP qword ptr [RBX + 0x8],RBP
JNZ 0x0014a6ab
TEST RBP,RBP
JZ 0x0014a6cf
MOV RDI,qword ptr [RBX]
MOV RSI,R13
MOV RDX,RBP
CALL 0x001186e0
TEST EAX,EAX
JZ 0x0014a6cf
LAB_0014a6ab:
ADD RBX,0x30
CMP RBX,R15
JNZ 0x0014a68e
LAB_0014a6b4:
MOV RDI,R14
MOV RSI,R12
MOV RDX,qword ptr [RSP]
CALL 0x0014a6e4
MOV RBX,qword ptr [R14 + 0x8]
ADD RBX,-0x30
MOV DL,0x1
JMP 0x0014a6d1
LAB_0014a6cf:
XOR EDX,EDX
LAB_0014a6d1:
MOV RAX,RBX
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
/* nlohmann::json_abi_v3_11_3::ordered_map<std::__cxx11::string,
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector,
std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void>, std::less<void>, std::allocator<std::pair<std::__cxx11::string const,
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector,
std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void> > > >::emplace(std::__cxx11::string const&,
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector,
std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void>&&) */
int1 [16] __thiscall
nlohmann::json_abi_v3_11_3::
ordered_map<std::__cxx11::string,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,std::less<void>,std::allocator<std::pair<std::__cxx11::string_const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>>
::emplace(ordered_map<std::__cxx11::string,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,std::less<void>,std::allocator<std::pair<std::__cxx11::string_const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>>
*this,string *param_1,basic_json *param_2)
{
int8 *puVar1;
void *__s2;
size_t __n;
int iVar2;
int8 extraout_RDX;
int8 uVar3;
int8 *puVar4;
int1 auVar5 [16];
puVar4 = *(int8 **)this;
puVar1 = *(int8 **)(this + 8);
if (puVar4 != puVar1) {
__s2 = *(void **)param_1;
__n = *(size_t *)(param_1 + 8);
do {
if (puVar4[1] == __n) {
if (__n != 0) {
iVar2 = bcmp((void *)*puVar4,__s2,__n);
if (iVar2 != 0) goto LAB_0014a6ab;
}
uVar3 = 0;
goto LAB_0014a6d1;
}
LAB_0014a6ab:
puVar4 = puVar4 + 6;
} while (puVar4 != puVar1);
}
std::
vector<std::pair<std::__cxx11::string_const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>,std::allocator<std::pair<std::__cxx11::string_const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>>
::
emplace_back<std::__cxx11::string_const&,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>
((vector<std::pair<std::__cxx11::string_const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>,std::allocator<std::pair<std::__cxx11::string_const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>>
*)this,param_1,param_2);
puVar4 = (int8 *)(*(long *)(this + 8) + -0x30);
uVar3 = CONCAT71((int7)((ulong)extraout_RDX >> 8),1);
LAB_0014a6d1:
auVar5._8_8_ = uVar3;
auVar5._0_8_ = puVar4;
return auVar5;
}
|
|
9,306 |
my_sync_dir_by_file
|
eloqsql/mysys/my_sync.c
|
int my_sync_dir_by_file(const char *file_name __attribute__((unused)),
myf my_flags __attribute__((unused)))
{
#ifdef NEED_EXPLICIT_SYNC_DIR
char dir_name[FN_REFLEN];
size_t dir_name_length;
dirname_part(dir_name, file_name, &dir_name_length);
return my_sync_dir(dir_name, my_flags & ~MY_NOSYMLINKS);
#else
return 0;
#endif
}
|
O0
|
c
|
my_sync_dir_by_file:
pushq %rbp
movq %rsp, %rbp
subq $0x240, %rsp # imm = 0x240
movq %fs:0x28, %rax
movq %rax, -0x8(%rbp)
movq %rdi, -0x218(%rbp)
movq %rsi, -0x220(%rbp)
movq -0x218(%rbp), %rsi
leaq -0x210(%rbp), %rdi
movq %rdi, -0x238(%rbp)
leaq -0x228(%rbp), %rdx
callq 0x5a6c0
movq -0x238(%rbp), %rdi
movq -0x220(%rbp), %rax
andl $0xfffffdff, %eax # imm = 0xFFFFFDFF
movl %eax, %esi
callq 0x5c230
movl %eax, -0x22c(%rbp)
movq %fs:0x28, %rax
movq -0x8(%rbp), %rcx
cmpq %rcx, %rax
jne 0x5c368
movl -0x22c(%rbp), %eax
addq $0x240, %rsp # imm = 0x240
popq %rbp
retq
callq 0x26370
nopl (%rax)
|
my_sync_dir_by_file:
push rbp
mov rbp, rsp
sub rsp, 240h
mov rax, fs:28h
mov [rbp+var_8], rax
mov [rbp+var_218], rdi
mov [rbp+var_220], rsi
mov rsi, [rbp+var_218]
lea rdi, [rbp+var_210]
mov [rbp+var_238], rdi
lea rdx, [rbp+var_228]
call dirname_part
mov rdi, [rbp+var_238]
mov rax, [rbp+var_220]
and eax, 0FFFFFDFFh
mov esi, eax
call my_sync_dir
mov [rbp+var_22C], eax
mov rax, fs:28h
mov rcx, [rbp+var_8]
cmp rax, rcx
jnz short loc_5C368
mov eax, [rbp+var_22C]
add rsp, 240h
pop rbp
retn
loc_5C368:
call ___stack_chk_fail
|
long long my_sync_dir_by_file(_BYTE *a1, long long a2)
{
long long v3; // [rsp+18h] [rbp-228h] BYREF
long long v4; // [rsp+20h] [rbp-220h]
_BYTE *v5; // [rsp+28h] [rbp-218h]
char v6[520]; // [rsp+30h] [rbp-210h] BYREF
unsigned long long v7; // [rsp+238h] [rbp-8h]
v7 = __readfsqword(0x28u);
v5 = a1;
v4 = a2;
dirname_part((long long)v6, a1, &v3);
return (unsigned int)my_sync_dir(v6, (unsigned int)v4 & 0xFFFFFDFF);
}
|
my_sync_dir_by_file:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x240
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x8],RAX
MOV qword ptr [RBP + -0x218],RDI
MOV qword ptr [RBP + -0x220],RSI
MOV RSI,qword ptr [RBP + -0x218]
LEA RDI,[RBP + -0x210]
MOV qword ptr [RBP + -0x238],RDI
LEA RDX,[RBP + -0x228]
CALL 0x0015a6c0
MOV RDI,qword ptr [RBP + -0x238]
MOV RAX,qword ptr [RBP + -0x220]
AND EAX,0xfffffdff
MOV ESI,EAX
CALL 0x0015c230
MOV dword ptr [RBP + -0x22c],EAX
MOV RAX,qword ptr FS:[0x28]
MOV RCX,qword ptr [RBP + -0x8]
CMP RAX,RCX
JNZ 0x0015c368
MOV EAX,dword ptr [RBP + -0x22c]
ADD RSP,0x240
POP RBP
RET
LAB_0015c368:
CALL 0x00126370
|
int4 my_sync_dir_by_file(int8 param_1,int8 param_2)
{
int4 uVar1;
long in_FS_OFFSET;
int1 local_230 [8];
int8 local_228;
int8 local_220;
int1 local_218 [520];
long local_10;
local_10 = *(long *)(in_FS_OFFSET + 0x28);
local_228 = param_2;
local_220 = param_1;
dirname_part(local_218,param_1,local_230);
uVar1 = my_sync_dir(local_218,(uint)local_228 & 0xfffffdff);
if (*(long *)(in_FS_OFFSET + 0x28) == local_10) {
return uVar1;
}
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
|
|
9,307 |
nglog::ColoredWriteToStderrOrStdout(_IO_FILE*, nglog::LogSeverity, char const*, unsigned long)
|
ng-log[P]ng-log/src/logging.cc
|
static void ColoredWriteToStderrOrStdout(FILE* output, LogSeverity severity,
const char* message, size_t len) {
bool is_stdout = (output == stdout);
const GLogColor color = (LogDestination::terminal_supports_color() &&
((!is_stdout && FLAGS_colorlogtostderr) ||
(is_stdout && FLAGS_colorlogtostdout)))
? SeverityToColor(severity)
: COLOR_DEFAULT;
// Avoid using cerr from this module since we may get called during
// exit code, and cerr may be partially or fully destroyed by then.
if (COLOR_DEFAULT == color) {
fwrite(message, len, 1, output);
return;
}
#ifdef NGLOG_OS_WINDOWS
const HANDLE output_handle =
GetStdHandle(is_stdout ? STD_OUTPUT_HANDLE : STD_ERROR_HANDLE);
// Gets the current text color.
CONSOLE_SCREEN_BUFFER_INFO buffer_info;
GetConsoleScreenBufferInfo(output_handle, &buffer_info);
const WORD old_color_attrs = buffer_info.wAttributes;
// We need to flush the stream buffers into the console before each
// SetConsoleTextAttribute call lest it affect the text that is already
// printed but has not yet reached the console.
fflush(output);
SetConsoleTextAttribute(output_handle,
GetColorAttribute(color) | FOREGROUND_INTENSITY);
fwrite(message, len, 1, output);
fflush(output);
// Restores the text color.
SetConsoleTextAttribute(output_handle, old_color_attrs);
#else
fprintf(output, "\033[0;3%sm", GetAnsiColorCode(color));
fwrite(message, len, 1, output);
fprintf(output, "\033[m"); // Resets the terminal to default.
#endif // NGLOG_OS_WINDOWS
}
|
O0
|
cpp
|
nglog::ColoredWriteToStderrOrStdout(_IO_FILE*, nglog::LogSeverity, char const*, unsigned long):
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq -0x8(%rbp), %rax
movq 0x59bee(%rip), %rcx # 0x71f30
cmpq (%rcx), %rax
sete %al
andb $0x1, %al
movb %al, -0x21(%rbp)
callq 0x1dc70
testb $0x1, (%rax)
je 0x18388
testb $0x1, -0x21(%rbp)
jne 0x18369
leaq 0x5a9ca(%rip), %rax # 0x72d2e
testb $0x1, (%rax)
jne 0x1837b
testb $0x1, -0x21(%rbp)
je 0x18388
leaq 0x5a9ba(%rip), %rax # 0x72d30
testb $0x1, (%rax)
je 0x18388
movl -0xc(%rbp), %edi
callq 0x18410
movl %eax, -0x2c(%rbp)
jmp 0x1838f
xorl %eax, %eax
movl %eax, -0x2c(%rbp)
jmp 0x1838f
movl -0x2c(%rbp), %eax
movl %eax, -0x28(%rbp)
xorl %eax, %eax
cmpl -0x28(%rbp), %eax
jne 0x183b4
movq -0x18(%rbp), %rdi
movq -0x20(%rbp), %rsi
movq -0x8(%rbp), %rcx
movl $0x1, %edx
callq 0x9db0
jmp 0x18401
movq -0x8(%rbp), %rax
movq %rax, -0x38(%rbp)
movl -0x28(%rbp), %edi
callq 0x18490
movq -0x38(%rbp), %rdi
movq %rax, %rdx
leaq 0x36889(%rip), %rsi # 0x4ec5b
movb $0x0, %al
callq 0x9a80
movq -0x18(%rbp), %rdi
movq -0x20(%rbp), %rsi
movq -0x8(%rbp), %rcx
movl $0x1, %edx
callq 0x9db0
movq -0x8(%rbp), %rdi
leaq 0x3686a(%rip), %rsi # 0x4ec64
movb $0x0, %al
callq 0x9a80
addq $0x40, %rsp
popq %rbp
retq
nopw (%rax,%rax)
|
_ZN5nglogL28ColoredWriteToStderrOrStdoutEP8_IO_FILENS_11LogSeverityEPKcm:
push rbp
mov rbp, rsp
sub rsp, 40h
mov [rbp+var_8], rdi
mov [rbp+var_C], esi
mov [rbp+var_18], rdx
mov [rbp+var_20], rcx
mov rax, [rbp+var_8]
mov rcx, cs:stdout_ptr
cmp rax, [rcx]
setz al
and al, 1
mov [rbp+var_21], al
call _ZN5nglog14LogDestination23terminal_supports_colorEv; nglog::LogDestination::terminal_supports_color(void)
test byte ptr [rax], 1
jz short loc_18388
test [rbp+var_21], 1
jnz short loc_18369
lea rax, _ZN3fLB22FLAGS_colorlogtostderrE; fLB::FLAGS_colorlogtostderr
test byte ptr [rax], 1
jnz short loc_1837B
loc_18369:
test [rbp+var_21], 1
jz short loc_18388
lea rax, _ZN3fLB22FLAGS_colorlogtostdoutE; fLB::FLAGS_colorlogtostdout
test byte ptr [rax], 1
jz short loc_18388
loc_1837B:
mov edi, [rbp+var_C]
call _ZN5nglogL15SeverityToColorENS_11LogSeverityE; nglog::SeverityToColor(nglog::LogSeverity)
mov [rbp+var_2C], eax
jmp short loc_1838F
loc_18388:
xor eax, eax
mov [rbp+var_2C], eax
jmp short $+2
loc_1838F:
mov eax, [rbp+var_2C]
mov [rbp+var_28], eax
xor eax, eax
cmp eax, [rbp+var_28]
jnz short loc_183B4
mov rdi, [rbp+var_18]
mov rsi, [rbp+var_20]
mov rcx, [rbp+var_8]
mov edx, 1
call _fwrite
jmp short loc_18401
loc_183B4:
mov rax, [rbp+var_8]
mov [rbp+var_38], rax
mov edi, [rbp+var_28]
call _ZN5nglogL16GetAnsiColorCodeENS_9GLogColorE; nglog::GetAnsiColorCode(nglog::GLogColor)
mov rdi, [rbp+var_38]
mov rdx, rax
lea rsi, a03Sm; "\x1B[0;3%sm"
mov al, 0
call _fprintf
mov rdi, [rbp+var_18]
mov rsi, [rbp+var_20]
mov rcx, [rbp+var_8]
mov edx, 1
call _fwrite
mov rdi, [rbp+var_8]
lea rsi, aM; "\x1B[m"
mov al, 0
call _fprintf
loc_18401:
add rsp, 40h
pop rbp
retn
|
long long nglog::ColoredWriteToStderrOrStdout(
nglog::LogDestination *a1,
unsigned int a2,
long long a3,
long long a4)
{
const char *AnsiColorCode; // rax
unsigned int v6; // [rsp+14h] [rbp-2Ch]
bool v7; // [rsp+1Fh] [rbp-21h]
v7 = a1 == (nglog::LogDestination *)stdout;
if ( (*(_BYTE *)nglog::LogDestination::terminal_supports_color(a1) & 1) != 0
&& (!v7 && (fLB::FLAGS_colorlogtostderr & 1) != 0 || v7 && (fLB::FLAGS_colorlogtostdout & 1) != 0) )
{
v6 = nglog::SeverityToColor(a2);
}
else
{
v6 = 0;
}
if ( !v6 )
return fwrite(a3, a4, 1LL, a1);
AnsiColorCode = (const char *)nglog::GetAnsiColorCode(v6);
fprintf(a1, "\x1B[0;3%sm", AnsiColorCode);
fwrite(a3, a4, 1LL, a1);
return fprintf(a1, "\x1B[m");
}
|
ColoredWriteToStderrOrStdout:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x40
MOV qword ptr [RBP + -0x8],RDI
MOV dword ptr [RBP + -0xc],ESI
MOV qword ptr [RBP + -0x18],RDX
MOV qword ptr [RBP + -0x20],RCX
MOV RAX,qword ptr [RBP + -0x8]
MOV RCX,qword ptr [0x00171f30]
CMP RAX,qword ptr [RCX]
SETZ AL
AND AL,0x1
MOV byte ptr [RBP + -0x21],AL
CALL 0x0011dc70
TEST byte ptr [RAX],0x1
JZ 0x00118388
TEST byte ptr [RBP + -0x21],0x1
JNZ 0x00118369
LEA RAX,[0x172d2e]
TEST byte ptr [RAX],0x1
JNZ 0x0011837b
LAB_00118369:
TEST byte ptr [RBP + -0x21],0x1
JZ 0x00118388
LEA RAX,[0x172d30]
TEST byte ptr [RAX],0x1
JZ 0x00118388
LAB_0011837b:
MOV EDI,dword ptr [RBP + -0xc]
CALL 0x00118410
MOV dword ptr [RBP + -0x2c],EAX
JMP 0x0011838f
LAB_00118388:
XOR EAX,EAX
MOV dword ptr [RBP + -0x2c],EAX
JMP 0x0011838f
LAB_0011838f:
MOV EAX,dword ptr [RBP + -0x2c]
MOV dword ptr [RBP + -0x28],EAX
XOR EAX,EAX
CMP EAX,dword ptr [RBP + -0x28]
JNZ 0x001183b4
MOV RDI,qword ptr [RBP + -0x18]
MOV RSI,qword ptr [RBP + -0x20]
MOV RCX,qword ptr [RBP + -0x8]
MOV EDX,0x1
CALL 0x00109db0
JMP 0x00118401
LAB_001183b4:
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RBP + -0x38],RAX
MOV EDI,dword ptr [RBP + -0x28]
CALL 0x00118490
MOV RDI,qword ptr [RBP + -0x38]
MOV RDX,RAX
LEA RSI,[0x14ec5b]
MOV AL,0x0
CALL 0x00109a80
MOV RDI,qword ptr [RBP + -0x18]
MOV RSI,qword ptr [RBP + -0x20]
MOV RCX,qword ptr [RBP + -0x8]
MOV EDX,0x1
CALL 0x00109db0
MOV RDI,qword ptr [RBP + -0x8]
LEA RSI,[0x14ec64]
MOV AL,0x0
CALL 0x00109a80
LAB_00118401:
ADD RSP,0x40
POP RBP
RET
|
/* nglog::ColoredWriteToStderrOrStdout(_IO_FILE*, nglog::LogSeverity, char const*, unsigned long) */
void nglog::ColoredWriteToStderrOrStdout
(FILE *param_1,int4 param_2,void *param_3,size_t param_4)
{
FILE *pFVar1;
byte *pbVar2;
int8 uVar3;
int local_34;
pFVar1 = *(FILE **)PTR_stdout_00171f30;
pbVar2 = (byte *)LogDestination::terminal_supports_color();
if (((*pbVar2 & 1) == 0) ||
(((param_1 == pFVar1 || ((fLB::FLAGS_colorlogtostderr & 1) == 0)) &&
((param_1 != pFVar1 || ((fLB::FLAGS_colorlogtostdout & 1) == 0)))))) {
local_34 = 0;
}
else {
local_34 = SeverityToColor(param_2);
}
if (local_34 == 0) {
fwrite(param_3,param_4,1,param_1);
}
else {
uVar3 = GetAnsiColorCode(local_34);
fprintf(param_1,"\x1b[0;3%sm",uVar3);
fwrite(param_3,param_4,1,param_1);
fprintf(param_1,"\x1b[m");
}
return;
}
|
|
9,308 |
testing::internal::GTestFlagSaver::GTestFlagSaver()
|
giladroyz[P]FindPeaks/build_O3/_deps/googletest-src/googletest/src/gtest-internal-inl.h
|
GTestFlagSaver() {
also_run_disabled_tests_ = GTEST_FLAG_GET(also_run_disabled_tests);
break_on_failure_ = GTEST_FLAG_GET(break_on_failure);
catch_exceptions_ = GTEST_FLAG_GET(catch_exceptions);
color_ = GTEST_FLAG_GET(color);
death_test_style_ = GTEST_FLAG_GET(death_test_style);
death_test_use_fork_ = GTEST_FLAG_GET(death_test_use_fork);
fail_fast_ = GTEST_FLAG_GET(fail_fast);
filter_ = GTEST_FLAG_GET(filter);
internal_run_death_test_ = GTEST_FLAG_GET(internal_run_death_test);
list_tests_ = GTEST_FLAG_GET(list_tests);
output_ = GTEST_FLAG_GET(output);
brief_ = GTEST_FLAG_GET(brief);
print_time_ = GTEST_FLAG_GET(print_time);
print_utf8_ = GTEST_FLAG_GET(print_utf8);
random_seed_ = GTEST_FLAG_GET(random_seed);
repeat_ = GTEST_FLAG_GET(repeat);
recreate_environments_when_repeating_ =
GTEST_FLAG_GET(recreate_environments_when_repeating);
shuffle_ = GTEST_FLAG_GET(shuffle);
stack_trace_depth_ = GTEST_FLAG_GET(stack_trace_depth);
stream_result_to_ = GTEST_FLAG_GET(stream_result_to);
throw_on_failure_ = GTEST_FLAG_GET(throw_on_failure);
}
|
O3
|
c
|
testing::internal::GTestFlagSaver::GTestFlagSaver():
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %rdi, %r13
addq $0x8, %rdi
leaq 0x18(%r13), %rax
movq %rax, 0x18(%rsp)
movq %rax, 0x8(%r13)
xorl %eax, %eax
movq %rax, 0x10(%r13)
movb %al, 0x18(%r13)
leaq 0x28(%r13), %rcx
movq %rcx, 0x28(%rsp)
leaq 0x38(%r13), %rcx
movq %rcx, 0x10(%rsp)
movq %rcx, 0x28(%r13)
movq %rax, 0x30(%r13)
movb %al, 0x38(%r13)
leaq 0x50(%r13), %rcx
movq %rcx, 0x20(%rsp)
leaq 0x60(%r13), %rcx
movq %rcx, 0x8(%rsp)
movq %rcx, 0x50(%r13)
movq %rax, 0x58(%r13)
movb %al, 0x60(%r13)
leaq 0x70(%r13), %r12
leaq 0x80(%r13), %rcx
movq %rcx, (%rsp)
movq %rcx, 0x70(%r13)
movq %rax, 0x78(%r13)
movb %al, 0x80(%r13)
leaq 0x98(%r13), %rbp
leaq 0xa8(%r13), %r15
movq %r15, 0x98(%r13)
movq %rax, 0xa0(%r13)
movb %al, 0xa8(%r13)
leaq 0xd0(%r13), %rbx
leaq 0xe0(%r13), %r14
movq %r14, 0xd0(%r13)
movq %rax, 0xd8(%r13)
movb %al, 0xe0(%r13)
movb 0x2583f(%rip), %al # 0x59683
movb %al, (%r13)
movb 0x25836(%rip), %al # 0x59684
movb %al, 0x1(%r13)
movb 0x2582d(%rip), %al # 0x59685
movb %al, 0x2(%r13)
leaq 0x25825(%rip), %rsi # 0x59688
movq %rdi, 0x30(%rsp)
callq 0x8290
leaq 0x25784(%rip), %rsi # 0x595f8
movq 0x28(%rsp), %rdi
callq 0x8290
movb 0x25794(%rip), %al # 0x59618
movb %al, 0x48(%r13)
movb 0x257f4(%rip), %al # 0x59682
movb %al, 0x49(%r13)
leaq 0x2580f(%rip), %rsi # 0x596a8
movq 0x20(%rsp), %rdi
callq 0x8290
leaq 0x25776(%rip), %rsi # 0x59620
movq %r12, %rdi
callq 0x8290
movb 0x25811(%rip), %al # 0x596c9
movb %al, 0x90(%r13)
leaq 0x2580a(%rip), %rsi # 0x596d0
movq %rbp, %rdi
callq 0x8290
movb 0x2581c(%rip), %al # 0x596f0
movb %al, 0xb8(%r13)
movb 0x25810(%rip), %al # 0x596f1
movb %al, 0xb9(%r13)
movb 0x25792(%rip), %al # 0x59680
movb %al, 0xba(%r13)
movl 0x257f9(%rip), %eax # 0x596f4
movl %eax, 0xbc(%r13)
movl 0x257f0(%rip), %eax # 0x596f8
movl %eax, 0xc0(%r13)
movb 0x257e7(%rip), %al # 0x596fc
movb %al, 0xc4(%r13)
movb 0x257dc(%rip), %al # 0x596fe
movb %al, 0xc5(%r13)
movl 0x257d1(%rip), %eax # 0x59700
movl %eax, 0xc8(%r13)
leaq 0x257cb(%rip), %rsi # 0x59708
movq %rbx, %rdi
callq 0x8290
movb 0x257dd(%rip), %al # 0x59728
movb %al, 0xf0(%r13)
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r13
movq (%rbx), %rdi
cmpq %r14, %rdi
je 0x33f77
movq (%r14), %rsi
incq %rsi
callq 0x84e0
movq (%rbp), %rdi
cmpq %r15, %rdi
je 0x33f8b
movq (%r15), %rsi
incq %rsi
callq 0x84e0
movq (%r12), %rdi
cmpq (%rsp), %rdi
je 0x33fa4
movq (%rsp), %rax
movq (%rax), %rsi
incq %rsi
callq 0x84e0
movq 0x20(%rsp), %rax
movq (%rax), %rdi
cmpq 0x8(%rsp), %rdi
je 0x33fc3
movq 0x8(%rsp), %rax
movq (%rax), %rsi
incq %rsi
callq 0x84e0
movq 0x28(%rsp), %rax
movq (%rax), %rdi
cmpq 0x10(%rsp), %rdi
je 0x33fe2
movq 0x10(%rsp), %rax
movq (%rax), %rsi
incq %rsi
callq 0x84e0
movq 0x30(%rsp), %rax
movq (%rax), %rdi
cmpq 0x18(%rsp), %rdi
je 0x34001
movq 0x18(%rsp), %rax
movq (%rax), %rsi
incq %rsi
callq 0x84e0
movq %r13, %rdi
callq 0x8990
nop
|
_ZN7testing8internal14GTestFlagSaverC2Ev:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 38h
mov r13, rdi
add rdi, 8
lea rax, [r13+18h]
mov [rsp+68h+var_50], rax
mov [r13+8], rax
xor eax, eax
mov [r13+10h], rax
mov [r13+18h], al
lea rcx, [r13+28h]
mov [rsp+68h+var_40], rcx
lea rcx, [r13+38h]
mov [rsp+68h+var_58], rcx
mov [r13+28h], rcx
mov [r13+30h], rax
mov [r13+38h], al
lea rcx, [r13+50h]
mov [rsp+68h+var_48], rcx
lea rcx, [r13+60h]
mov [rsp+68h+var_60], rcx
mov [r13+50h], rcx
mov [r13+58h], rax
mov [r13+60h], al
lea r12, [r13+70h]
lea rcx, [r13+80h]
mov [rsp+68h+var_68], rcx
mov [r13+70h], rcx
mov [r13+78h], rax
mov [r13+80h], al
lea rbp, [r13+98h]
lea r15, [r13+0A8h]
mov [r13+98h], r15
mov [r13+0A0h], rax
mov [r13+0A8h], al
lea rbx, [r13+0D0h]
lea r14, [r13+0E0h]
mov [r13+0D0h], r14
mov [r13+0D8h], rax
mov [r13+0E0h], al
mov al, cs:_ZN7testing35FLAGS_gtest_also_run_disabled_testsE; testing::FLAGS_gtest_also_run_disabled_tests
mov [r13+0], al
mov al, cs:_ZN7testing28FLAGS_gtest_break_on_failureE; testing::FLAGS_gtest_break_on_failure
mov [r13+1], al
mov al, cs:_ZN7testing28FLAGS_gtest_catch_exceptionsE; testing::FLAGS_gtest_catch_exceptions
mov [r13+2], al
lea rsi, _ZN7testing17FLAGS_gtest_colorB5cxx11E; testing::FLAGS_gtest_color
mov [rsp+68h+var_38], rdi
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_assignERKS4_; std::string::_M_assign(std::string const&)
lea rsi, _ZN7testing28FLAGS_gtest_death_test_styleB5cxx11E; testing::FLAGS_gtest_death_test_style
mov rdi, [rsp+68h+var_40]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_assignERKS4_; std::string::_M_assign(std::string const&)
mov al, cs:_ZN7testing31FLAGS_gtest_death_test_use_forkE; testing::FLAGS_gtest_death_test_use_fork
mov [r13+48h], al
mov al, cs:_ZN7testing21FLAGS_gtest_fail_fastE; testing::FLAGS_gtest_fail_fast
mov [r13+49h], al
lea rsi, _ZN7testing18FLAGS_gtest_filterB5cxx11E; testing::FLAGS_gtest_filter
mov rdi, [rsp+68h+var_48]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_assignERKS4_; std::string::_M_assign(std::string const&)
lea rsi, _ZN7testing35FLAGS_gtest_internal_run_death_testB5cxx11E; testing::FLAGS_gtest_internal_run_death_test
mov rdi, r12
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_assignERKS4_; std::string::_M_assign(std::string const&)
mov al, cs:_ZN7testing22FLAGS_gtest_list_testsE; testing::FLAGS_gtest_list_tests
mov [r13+90h], al
lea rsi, _ZN7testing18FLAGS_gtest_outputB5cxx11E; testing::FLAGS_gtest_output
mov rdi, rbp
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_assignERKS4_; std::string::_M_assign(std::string const&)
mov al, cs:_ZN7testing17FLAGS_gtest_briefE; testing::FLAGS_gtest_brief
mov [r13+0B8h], al
mov al, cs:_ZN7testing22FLAGS_gtest_print_timeE; testing::FLAGS_gtest_print_time
mov [r13+0B9h], al
mov al, cs:_ZN7testing22FLAGS_gtest_print_utf8E; testing::FLAGS_gtest_print_utf8
mov [r13+0BAh], al
mov eax, cs:_ZN7testing23FLAGS_gtest_random_seedE; testing::FLAGS_gtest_random_seed
mov [r13+0BCh], eax
mov eax, cs:_ZN7testing18FLAGS_gtest_repeatE; testing::FLAGS_gtest_repeat
mov [r13+0C0h], eax
mov al, cs:_ZN7testing48FLAGS_gtest_recreate_environments_when_repeatingE; testing::FLAGS_gtest_recreate_environments_when_repeating
mov [r13+0C4h], al
mov al, cs:_ZN7testing19FLAGS_gtest_shuffleE; testing::FLAGS_gtest_shuffle
mov [r13+0C5h], al
mov eax, cs:_ZN7testing29FLAGS_gtest_stack_trace_depthE; testing::FLAGS_gtest_stack_trace_depth
mov [r13+0C8h], eax
lea rsi, _ZN7testing28FLAGS_gtest_stream_result_toB5cxx11E; testing::FLAGS_gtest_stream_result_to
mov rdi, rbx
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_assignERKS4_; std::string::_M_assign(std::string const&)
mov al, cs:_ZN7testing28FLAGS_gtest_throw_on_failureE; testing::FLAGS_gtest_throw_on_failure
mov [r13+0F0h], al
add rsp, 38h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
mov r13, rax
mov rdi, [rbx]; void *
cmp rdi, r14
jz short loc_33F77
mov rsi, [r14]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_33F77:
mov rdi, [rbp+0]; void *
cmp rdi, r15
jz short loc_33F8B
mov rsi, [r15]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_33F8B:
mov rdi, [r12]; void *
cmp rdi, [rsp+0]
jz short loc_33FA4
mov rax, [rsp+0]
mov rsi, [rax]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_33FA4:
mov rax, [rsp+arg_18]
mov rdi, [rax]; void *
cmp rdi, [rsp+arg_0]
jz short loc_33FC3
mov rax, [rsp+arg_0]
mov rsi, [rax]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_33FC3:
mov rax, [rsp+arg_20]
mov rdi, [rax]; void *
cmp rdi, [rsp+arg_8]
jz short loc_33FE2
mov rax, [rsp+arg_8]
mov rsi, [rax]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_33FE2:
mov rax, [rsp+arg_28]
mov rdi, [rax]; void *
cmp rdi, [rsp+arg_10]
jz short loc_34001
mov rax, [rsp+arg_10]
mov rsi, [rax]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_34001:
mov rdi, r13
call __Unwind_Resume
|
char testing::internal::GTestFlagSaver::GTestFlagSaver(testing::internal::GTestFlagSaver *this)
{
char result; // al
*((_QWORD *)this + 1) = (char *)this + 24;
*((_QWORD *)this + 2) = 0LL;
*((_BYTE *)this + 24) = 0;
*((_QWORD *)this + 5) = (char *)this + 56;
*((_QWORD *)this + 6) = 0LL;
*((_BYTE *)this + 56) = 0;
*((_QWORD *)this + 10) = (char *)this + 96;
*((_QWORD *)this + 11) = 0LL;
*((_BYTE *)this + 96) = 0;
*((_QWORD *)this + 14) = (char *)this + 128;
*((_QWORD *)this + 15) = 0LL;
*((_BYTE *)this + 128) = 0;
*((_QWORD *)this + 19) = (char *)this + 168;
*((_QWORD *)this + 20) = 0LL;
*((_BYTE *)this + 168) = 0;
*((_QWORD *)this + 26) = (char *)this + 224;
*((_QWORD *)this + 27) = 0LL;
*((_BYTE *)this + 224) = 0;
*(_BYTE *)this = testing::FLAGS_gtest_also_run_disabled_tests;
*((_BYTE *)this + 1) = testing::FLAGS_gtest_break_on_failure;
*((_BYTE *)this + 2) = testing::FLAGS_gtest_catch_exceptions;
std::string::_M_assign((char *)this + 8, &testing::FLAGS_gtest_color[abi:cxx11]);
std::string::_M_assign((char *)this + 40, &testing::FLAGS_gtest_death_test_style[abi:cxx11]);
*((_BYTE *)this + 72) = testing::FLAGS_gtest_death_test_use_fork;
*((_BYTE *)this + 73) = testing::FLAGS_gtest_fail_fast;
std::string::_M_assign((char *)this + 80, &testing::FLAGS_gtest_filter[abi:cxx11]);
std::string::_M_assign((char *)this + 112, &testing::FLAGS_gtest_internal_run_death_test[abi:cxx11]);
*((_BYTE *)this + 144) = testing::FLAGS_gtest_list_tests;
std::string::_M_assign((char *)this + 152, &testing::FLAGS_gtest_output[abi:cxx11]);
*((_BYTE *)this + 184) = testing::FLAGS_gtest_brief;
*((_BYTE *)this + 185) = testing::FLAGS_gtest_print_time;
*((_BYTE *)this + 186) = testing::FLAGS_gtest_print_utf8;
*((_DWORD *)this + 47) = testing::FLAGS_gtest_random_seed;
*((_DWORD *)this + 48) = testing::FLAGS_gtest_repeat;
*((_BYTE *)this + 196) = testing::FLAGS_gtest_recreate_environments_when_repeating;
*((_BYTE *)this + 197) = testing::FLAGS_gtest_shuffle;
*((_DWORD *)this + 50) = testing::FLAGS_gtest_stack_trace_depth;
std::string::_M_assign((char *)this + 208, &testing::FLAGS_gtest_stream_result_to[abi:cxx11]);
result = testing::FLAGS_gtest_throw_on_failure;
*((_BYTE *)this + 240) = testing::FLAGS_gtest_throw_on_failure;
return result;
}
|
GTestFlagSaver:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x38
MOV R13,RDI
ADD RDI,0x8
LEA RAX,[R13 + 0x18]
MOV qword ptr [RSP + 0x18],RAX
MOV qword ptr [R13 + 0x8],RAX
XOR EAX,EAX
MOV qword ptr [R13 + 0x10],RAX
MOV byte ptr [R13 + 0x18],AL
LEA RCX,[R13 + 0x28]
MOV qword ptr [RSP + 0x28],RCX
LEA RCX,[R13 + 0x38]
MOV qword ptr [RSP + 0x10],RCX
MOV qword ptr [R13 + 0x28],RCX
MOV qword ptr [R13 + 0x30],RAX
MOV byte ptr [R13 + 0x38],AL
LEA RCX,[R13 + 0x50]
MOV qword ptr [RSP + 0x20],RCX
LEA RCX,[R13 + 0x60]
MOV qword ptr [RSP + 0x8],RCX
MOV qword ptr [R13 + 0x50],RCX
MOV qword ptr [R13 + 0x58],RAX
MOV byte ptr [R13 + 0x60],AL
LEA R12,[R13 + 0x70]
LEA RCX,[R13 + 0x80]
MOV qword ptr [RSP],RCX
MOV qword ptr [R13 + 0x70],RCX
MOV qword ptr [R13 + 0x78],RAX
MOV byte ptr [R13 + 0x80],AL
LEA RBP,[R13 + 0x98]
LEA R15,[R13 + 0xa8]
MOV qword ptr [R13 + 0x98],R15
MOV qword ptr [R13 + 0xa0],RAX
MOV byte ptr [R13 + 0xa8],AL
LEA RBX,[R13 + 0xd0]
LEA R14,[R13 + 0xe0]
MOV qword ptr [R13 + 0xd0],R14
MOV qword ptr [R13 + 0xd8],RAX
MOV byte ptr [R13 + 0xe0],AL
MOV AL,byte ptr [0x00159683]
MOV byte ptr [R13],AL
MOV AL,byte ptr [0x00159684]
MOV byte ptr [R13 + 0x1],AL
MOV AL,byte ptr [0x00159685]
MOV byte ptr [R13 + 0x2],AL
LAB_00133e5c:
LEA RSI,[0x159688]
MOV qword ptr [RSP + 0x30],RDI
CALL 0x00108290
LEA RSI,[0x1595f8]
MOV RDI,qword ptr [RSP + 0x28]
CALL 0x00108290
MOV AL,byte ptr [0x00159618]
MOV byte ptr [R13 + 0x48],AL
MOV AL,byte ptr [0x00159682]
MOV byte ptr [R13 + 0x49],AL
LEA RSI,[0x1596a8]
MOV RDI,qword ptr [RSP + 0x20]
CALL 0x00108290
LEA RSI,[0x159620]
MOV RDI,R12
CALL 0x00108290
MOV AL,byte ptr [0x001596c9]
MOV byte ptr [R13 + 0x90],AL
LEA RSI,[0x1596d0]
MOV RDI,RBP
CALL 0x00108290
MOV AL,byte ptr [0x001596f0]
MOV byte ptr [R13 + 0xb8],AL
MOV AL,byte ptr [0x001596f1]
MOV byte ptr [R13 + 0xb9],AL
MOV AL,byte ptr [0x00159680]
MOV byte ptr [R13 + 0xba],AL
MOV EAX,dword ptr [0x001596f4]
MOV dword ptr [R13 + 0xbc],EAX
MOV EAX,dword ptr [0x001596f8]
MOV dword ptr [R13 + 0xc0],EAX
MOV AL,byte ptr [0x001596fc]
MOV byte ptr [R13 + 0xc4],AL
MOV AL,byte ptr [0x001596fe]
MOV byte ptr [R13 + 0xc5],AL
MOV EAX,dword ptr [0x00159700]
MOV dword ptr [R13 + 0xc8],EAX
LEA RSI,[0x159708]
MOV RDI,RBX
CALL 0x00108290
LAB_00133f45:
MOV AL,byte ptr [0x00159728]
MOV byte ptr [R13 + 0xf0],AL
ADD RSP,0x38
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
/* testing::internal::GTestFlagSaver::GTestFlagSaver() */
void __thiscall testing::internal::GTestFlagSaver::GTestFlagSaver(GTestFlagSaver *this)
{
*(GTestFlagSaver **)(this + 8) = this + 0x18;
*(int8 *)(this + 0x10) = 0;
this[0x18] = (GTestFlagSaver)0x0;
*(GTestFlagSaver **)(this + 0x28) = this + 0x38;
*(int8 *)(this + 0x30) = 0;
this[0x38] = (GTestFlagSaver)0x0;
*(GTestFlagSaver **)(this + 0x50) = this + 0x60;
*(int8 *)(this + 0x58) = 0;
this[0x60] = (GTestFlagSaver)0x0;
*(GTestFlagSaver **)(this + 0x70) = this + 0x80;
*(int8 *)(this + 0x78) = 0;
this[0x80] = (GTestFlagSaver)0x0;
*(GTestFlagSaver **)(this + 0x98) = this + 0xa8;
*(int8 *)(this + 0xa0) = 0;
this[0xa8] = (GTestFlagSaver)0x0;
*(GTestFlagSaver **)(this + 0xd0) = this + 0xe0;
*(int8 *)(this + 0xd8) = 0;
this[0xe0] = (GTestFlagSaver)0x0;
*this = FLAGS_gtest_also_run_disabled_tests;
this[1] = FLAGS_gtest_break_on_failure;
this[2] = FLAGS_gtest_catch_exceptions;
/* try { // try from 00133e5c to 00133f44 has its CatchHandler @ 00133f61 */
std::__cxx11::string::_M_assign((string *)(this + 8));
std::__cxx11::string::_M_assign((string *)(this + 0x28));
this[0x48] = FLAGS_gtest_death_test_use_fork;
this[0x49] = FLAGS_gtest_fail_fast;
std::__cxx11::string::_M_assign((string *)(this + 0x50));
std::__cxx11::string::_M_assign((string *)(this + 0x70));
this[0x90] = FLAGS_gtest_list_tests;
std::__cxx11::string::_M_assign((string *)(this + 0x98));
this[0xb8] = FLAGS_gtest_brief;
this[0xb9] = FLAGS_gtest_print_time;
this[0xba] = FLAGS_gtest_print_utf8;
*(int4 *)(this + 0xbc) = FLAGS_gtest_random_seed;
*(int4 *)(this + 0xc0) = FLAGS_gtest_repeat;
this[0xc4] = FLAGS_gtest_recreate_environments_when_repeating;
this[0xc5] = FLAGS_gtest_shuffle;
*(int4 *)(this + 200) = FLAGS_gtest_stack_trace_depth;
std::__cxx11::string::_M_assign((string *)(this + 0xd0));
this[0xf0] = FLAGS_gtest_throw_on_failure;
return;
}
|
|
9,309 |
mi_recinfo_write
|
eloqsql/storage/myisam/mi_open.c
|
uint mi_recinfo_write(File file, MI_COLUMNDEF *recinfo)
{
uchar buff[MI_COLUMNDEF_SIZE];
uchar *ptr=buff;
mi_int2store(ptr,recinfo->type); ptr +=2;
mi_int2store(ptr,recinfo->length); ptr +=2;
*ptr++ = recinfo->null_bit;
mi_int2store(ptr,recinfo->null_pos); ptr+= 2;
return mysql_file_write(file, buff, (size_t) (ptr-buff), MYF(MY_NABP)) != 0;
}
|
O3
|
c
|
mi_recinfo_write:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x60, %rsp
movq %fs:0x28, %rax
movq %rax, -0x18(%rbp)
movzwl (%rsi), %eax
rolw $0x8, %ax
movw %ax, -0x1f(%rbp)
movzwl 0x4(%rsi), %eax
rolw $0x8, %ax
movw %ax, -0x1d(%rbp)
movb 0xc(%rsi), %al
movb %al, -0x1b(%rbp)
movzwl 0xe(%rsi), %eax
rolw $0x8, %ax
movl %edi, %ebx
movw %ax, -0x1a(%rbp)
leaq 0x306a59(%rip), %rax # 0x3880c0
movq (%rax), %rax
leaq -0x70(%rbp), %rdi
movl %ebx, %esi
movl $0x7, %edx
callq *0x158(%rax)
testq %rax, %rax
jne 0x816ba
leaq -0x1f(%rbp), %rsi
movl $0x7, %edx
movl $0x4, %ecx
movl %ebx, %edi
callq 0x2f004
movq %rax, %rcx
xorl %eax, %eax
testq %rcx, %rcx
setne %cl
movq %fs:0x28, %rdx
cmpq -0x18(%rbp), %rdx
jne 0x816d4
movb %cl, %al
addq $0x60, %rsp
popq %rbx
popq %r14
popq %rbp
retq
leaq -0x1f(%rbp), %rdx
leaq -0x28(%rbp), %r14
movq %rax, %rdi
movl %ebx, %esi
movq %r14, %rcx
callq 0x2e37e
movq (%r14), %rcx
jmp 0x81698
callq 0x29270
|
mi_recinfo_write:
push rbp
mov rbp, rsp
push r14
push rbx
sub rsp, 60h
mov rax, fs:28h
mov [rbp+var_18], rax
movzx eax, word ptr [rsi]
rol ax, 8
mov [rbp+var_1F], ax
movzx eax, word ptr [rsi+4]
rol ax, 8
mov [rbp+var_1D], ax
mov al, [rsi+0Ch]
mov [rbp+var_1B], al
movzx eax, word ptr [rsi+0Eh]
rol ax, 8
mov ebx, edi
mov [rbp+var_1A], ax
lea rax, PSI_server
mov rax, [rax]
lea rdi, [rbp+var_70]
mov esi, ebx
mov edx, 7
call qword ptr [rax+158h]
test rax, rax
jnz short loc_816BA
lea rsi, [rbp+var_1F]
mov edx, 7
mov ecx, 4
mov edi, ebx
call my_write
mov rcx, rax
loc_81698:
xor eax, eax
test rcx, rcx
setnz cl
mov rdx, fs:28h
cmp rdx, [rbp+var_18]
jnz short loc_816D4
mov al, cl
add rsp, 60h
pop rbx
pop r14
pop rbp
retn
loc_816BA:
lea rdx, [rbp+var_1F]
lea r14, [rbp+var_28]
mov rdi, rax
mov esi, ebx
mov rcx, r14
call mi_recinfo_write_cold_1
mov rcx, [r14]
jmp short loc_81698
loc_816D4:
call ___stack_chk_fail
|
bool mi_recinfo_write(unsigned int a1, long long a2)
{
long long v2; // rax
long long v3; // rcx
_BYTE v6[72]; // [rsp+0h] [rbp-70h] BYREF
long long v7; // [rsp+48h] [rbp-28h] BYREF
_WORD v8[2]; // [rsp+51h] [rbp-1Fh] BYREF
char v9; // [rsp+55h] [rbp-1Bh]
__int16 v10; // [rsp+56h] [rbp-1Ah]
unsigned long long v11; // [rsp+58h] [rbp-18h]
v11 = __readfsqword(0x28u);
v8[0] = __ROL2__(*(_WORD *)a2, 8);
v8[1] = __ROL2__(*(_WORD *)(a2 + 4), 8);
v9 = *(_BYTE *)(a2 + 12);
v10 = __ROL2__(*(_WORD *)(a2 + 14), 8);
v2 = ((long long ( *)(_BYTE *, _QWORD, long long))PSI_server[43])(v6, a1, 7LL);
if ( v2 )
{
mi_recinfo_write_cold_1(v2, a1, (long long)v8, &v7);
v3 = v7;
}
else
{
v3 = my_write(a1, (long long)v8, 7LL, 4LL);
}
return v3 != 0;
}
|
mi_recinfo_write:
PUSH RBP
MOV RBP,RSP
PUSH R14
PUSH RBX
SUB RSP,0x60
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x18],RAX
MOVZX EAX,word ptr [RSI]
ROL AX,0x8
MOV word ptr [RBP + -0x1f],AX
MOVZX EAX,word ptr [RSI + 0x4]
ROL AX,0x8
MOV word ptr [RBP + -0x1d],AX
MOV AL,byte ptr [RSI + 0xc]
MOV byte ptr [RBP + -0x1b],AL
MOVZX EAX,word ptr [RSI + 0xe]
ROL AX,0x8
MOV EBX,EDI
MOV word ptr [RBP + -0x1a],AX
LEA RAX,[0x4880c0]
MOV RAX,qword ptr [RAX]
LEA RDI,[RBP + -0x70]
MOV ESI,EBX
MOV EDX,0x7
CALL qword ptr [RAX + 0x158]
TEST RAX,RAX
JNZ 0x001816ba
LEA RSI,[RBP + -0x1f]
MOV EDX,0x7
MOV ECX,0x4
MOV EDI,EBX
CALL 0x0012f004
MOV RCX,RAX
LAB_00181698:
XOR EAX,EAX
TEST RCX,RCX
SETNZ CL
MOV RDX,qword ptr FS:[0x28]
CMP RDX,qword ptr [RBP + -0x18]
JNZ 0x001816d4
MOV AL,CL
ADD RSP,0x60
POP RBX
POP R14
POP RBP
RET
LAB_001816ba:
LEA RDX,[RBP + -0x1f]
LEA R14,[RBP + -0x28]
MOV RDI,RAX
MOV ESI,EBX
MOV RCX,R14
CALL 0x0012e37e
MOV RCX,qword ptr [R14]
JMP 0x00181698
LAB_001816d4:
CALL 0x00129270
|
bool mi_recinfo_write(int4 param_1,ushort *param_2)
{
long lVar1;
long in_FS_OFFSET;
int1 local_78 [72];
long local_30;
ushort local_27;
ushort local_25;
int1 local_23;
ushort local_22;
long local_20;
local_20 = *(long *)(in_FS_OFFSET + 0x28);
local_27 = *param_2 << 8 | *param_2 >> 8;
local_25 = param_2[2] << 8 | param_2[2] >> 8;
local_23 = (int1)param_2[6];
local_22 = param_2[7] << 8 | param_2[7] >> 8;
lVar1 = (**(code **)(PSI_server + 0x158))(local_78,param_1,7);
if (lVar1 == 0) {
local_30 = my_write(param_1,&local_27,7,4);
}
else {
mi_recinfo_write_cold_1(lVar1,param_1,&local_27,&local_30);
}
if (*(long *)(in_FS_OFFSET + 0x28) == local_20) {
return local_30 != 0;
}
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
|
|
9,310 |
my_uni_ucs2
|
eloqsql/strings/ctype-ucs2.c
|
static int my_uni_ucs2(CHARSET_INFO *cs __attribute__((unused)) ,
my_wc_t wc, uchar *r, uchar *e)
{
if ( r+2 > e )
return MY_CS_TOOSMALL2;
if (wc > 0xFFFF) /* UCS2 does not support characters outside BMP */
return MY_CS_ILUNI;
r[0]= (uchar) (wc >> 8);
r[1]= (uchar) (wc & 0xFF);
return 2;
}
|
O0
|
c
|
my_uni_ucs2:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
movq -0x20(%rbp), %rax
addq $0x2, %rax
cmpq -0x28(%rbp), %rax
jbe 0x53d0b
movl $0xffffff9a, -0x4(%rbp) # imm = 0xFFFFFF9A
jmp 0x53d48
cmpq $0xffff, -0x18(%rbp) # imm = 0xFFFF
jbe 0x53d1e
movl $0x0, -0x4(%rbp)
jmp 0x53d48
movq -0x18(%rbp), %rax
shrq $0x8, %rax
movb %al, %cl
movq -0x20(%rbp), %rax
movb %cl, (%rax)
movq -0x18(%rbp), %rax
andq $0xff, %rax
movb %al, %cl
movq -0x20(%rbp), %rax
movb %cl, 0x1(%rax)
movl $0x2, -0x4(%rbp)
movl -0x4(%rbp), %eax
popq %rbp
retq
nopl (%rax)
|
my_uni_ucs2:
push rbp
mov rbp, rsp
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov [rbp+var_20], rdx
mov [rbp+var_28], rcx
mov rax, [rbp+var_20]
add rax, 2
cmp rax, [rbp+var_28]
jbe short loc_53D0B
mov [rbp+var_4], 0FFFFFF9Ah
jmp short loc_53D48
loc_53D0B:
cmp [rbp+var_18], 0FFFFh
jbe short loc_53D1E
mov [rbp+var_4], 0
jmp short loc_53D48
loc_53D1E:
mov rax, [rbp+var_18]
shr rax, 8
mov cl, al
mov rax, [rbp+var_20]
mov [rax], cl
mov rax, [rbp+var_18]
and rax, 0FFh
mov cl, al
mov rax, [rbp+var_20]
mov [rax+1], cl
mov [rbp+var_4], 2
loc_53D48:
mov eax, [rbp+var_4]
pop rbp
retn
|
long long my_uni_ucs2(long long a1, unsigned long long a2, _BYTE *a3, unsigned long long a4)
{
if ( (unsigned long long)(a3 + 2) <= a4 )
{
if ( a2 <= 0xFFFF )
{
*a3 = BYTE1(a2);
a3[1] = a2;
return 2;
}
else
{
return 0;
}
}
else
{
return (unsigned int)-102;
}
}
|
my_uni_ucs2:
PUSH RBP
MOV RBP,RSP
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x18],RSI
MOV qword ptr [RBP + -0x20],RDX
MOV qword ptr [RBP + -0x28],RCX
MOV RAX,qword ptr [RBP + -0x20]
ADD RAX,0x2
CMP RAX,qword ptr [RBP + -0x28]
JBE 0x00153d0b
MOV dword ptr [RBP + -0x4],0xffffff9a
JMP 0x00153d48
LAB_00153d0b:
CMP qword ptr [RBP + -0x18],0xffff
JBE 0x00153d1e
MOV dword ptr [RBP + -0x4],0x0
JMP 0x00153d48
LAB_00153d1e:
MOV RAX,qword ptr [RBP + -0x18]
SHR RAX,0x8
MOV CL,AL
MOV RAX,qword ptr [RBP + -0x20]
MOV byte ptr [RAX],CL
MOV RAX,qword ptr [RBP + -0x18]
AND RAX,0xff
MOV CL,AL
MOV RAX,qword ptr [RBP + -0x20]
MOV byte ptr [RAX + 0x1],CL
MOV dword ptr [RBP + -0x4],0x2
LAB_00153d48:
MOV EAX,dword ptr [RBP + -0x4]
POP RBP
RET
|
int4 my_uni_ucs2(int8 param_1,ulong param_2,int1 *param_3,int1 *param_4)
{
int4 local_c;
if (param_4 < param_3 + 2) {
local_c = 0xffffff9a;
}
else if (param_2 < 0x10000) {
*param_3 = (char)(param_2 >> 8);
param_3[1] = (char)param_2;
local_c = 2;
}
else {
local_c = 0;
}
return local_c;
}
|
|
9,311 |
my_uni_ucs2
|
eloqsql/strings/ctype-ucs2.c
|
static int my_uni_ucs2(CHARSET_INFO *cs __attribute__((unused)) ,
my_wc_t wc, uchar *r, uchar *e)
{
if ( r+2 > e )
return MY_CS_TOOSMALL2;
if (wc > 0xFFFF) /* UCS2 does not support characters outside BMP */
return MY_CS_ILUNI;
r[0]= (uchar) (wc >> 8);
r[1]= (uchar) (wc & 0xFF);
return 2;
}
|
O3
|
c
|
my_uni_ucs2:
pushq %rbp
movq %rsp, %rbp
leaq 0x2(%rdx), %rdi
movl $0xffffff9a, %eax # imm = 0xFFFFFF9A
cmpq %rcx, %rdi
ja 0x46874
xorl %eax, %eax
cmpq $0xffff, %rsi # imm = 0xFFFF
ja 0x46874
rolw $0x8, %si
movw %si, (%rdx)
movl $0x2, %eax
popq %rbp
retq
|
my_uni_ucs2:
push rbp
mov rbp, rsp
lea rdi, [rdx+2]
mov eax, 0FFFFFF9Ah
cmp rdi, rcx
ja short loc_46874
xor eax, eax
cmp rsi, 0FFFFh
ja short loc_46874
rol si, 8
mov [rdx], si
mov eax, 2
loc_46874:
pop rbp
retn
|
long long my_uni_ucs2(long long a1, unsigned long long a2, _WORD *a3, unsigned long long a4)
{
long long result; // rax
result = 4294967194LL;
if ( (unsigned long long)(a3 + 1) <= a4 )
{
result = 0LL;
if ( a2 <= 0xFFFF )
{
*a3 = __ROL2__(a2, 8);
return 2LL;
}
}
return result;
}
|
my_uni_ucs2:
PUSH RBP
MOV RBP,RSP
LEA RDI,[RDX + 0x2]
MOV EAX,0xffffff9a
CMP RDI,RCX
JA 0x00146874
XOR EAX,EAX
CMP RSI,0xffff
JA 0x00146874
ROL SI,0x8
MOV word ptr [RDX],SI
MOV EAX,0x2
LAB_00146874:
POP RBP
RET
|
int8 my_uni_ucs2(int8 param_1,ulong param_2,ushort *param_3,ushort *param_4)
{
int8 uVar1;
uVar1 = 0xffffff9a;
if ((param_3 + 1 <= param_4) && (uVar1 = 0, param_2 < 0x10000)) {
*param_3 = (ushort)param_2 << 8 | (ushort)param_2 >> 8;
uVar1 = 2;
}
return uVar1;
}
|
|
9,312 |
LefDefParser::defiComponent::addNet(char const*)
|
Efficient-TDP/thirdparty/Limbo/limbo/thirdparty/lefdef/5.8/def/def/defiComponent.cpp
|
void defiComponent::addNet(const char* net) {
int len = strlen(net) + 1;
if (numNets_ == netsAllocated_)
bumpNets(numNets_ * 2);
nets_[numNets_] = (char*)malloc(len);
strcpy(nets_[numNets_], defData->DEFCASE(net));
(numNets_)++;
}
|
O3
|
cpp
|
LefDefParser::defiComponent::addNet(char const*):
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
movq %rsi, %rdi
callq 0x70d0
movq %rax, %r15
movl 0x7c(%rbx), %ebp
cmpl 0x80(%rbx), %ebp
jne 0x13964
addl %ebp, %ebp
movq %rbx, %rdi
movl %ebp, %esi
callq 0x12660
movl 0x7c(%rbx), %ebp
incl %r15d
movslq %r15d, %rdi
callq 0x7270
movq 0x88(%rbx), %rcx
movslq %ebp, %rdx
movq %rax, (%rcx,%rdx,8)
movq 0x88(%rbx), %rax
movq 0x150(%rbx), %rdi
movq (%rax,%rdx,8), %r15
movq %r14, %rsi
callq 0x1b638
movq %r15, %rdi
movq %rax, %rsi
callq 0x7190
incl 0x7c(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
|
_ZN12LefDefParser13defiComponent6addNetEPKc:
push rbp
push r15
push r14
push rbx
push rax
mov r14, rsi
mov rbx, rdi
mov rdi, rsi
call _strlen
mov r15, rax
mov ebp, [rbx+7Ch]
cmp ebp, [rbx+80h]
jnz short loc_13964
add ebp, ebp
mov rdi, rbx; this
mov esi, ebp; int
call _ZN12LefDefParser13defiComponent8bumpNetsEi; LefDefParser::defiComponent::bumpNets(int)
mov ebp, [rbx+7Ch]
loc_13964:
inc r15d
movsxd rdi, r15d
call _malloc
mov rcx, [rbx+88h]
movsxd rdx, ebp
mov [rcx+rdx*8], rax
mov rax, [rbx+88h]
mov rdi, [rbx+150h]; this
mov r15, [rax+rdx*8]
mov rsi, r14; char *
call _ZN12LefDefParser8defrData7DEFCASEEPKc; LefDefParser::defrData::DEFCASE(char const*)
mov rdi, r15
mov rsi, rax
call _strcpy
inc dword ptr [rbx+7Ch]
add rsp, 8
pop rbx
pop r14
pop r15
pop rbp
retn
|
long long LefDefParser::defiComponent::addNet(LefDefParser::defiComponent *this, const char *a2)
{
int v2; // r15d
int v3; // ebp
long long v4; // r15
long long v5; // rax
long long result; // rax
v2 = strlen(a2);
v3 = *((_DWORD *)this + 31);
if ( v3 == *((_DWORD *)this + 32) )
{
LefDefParser::defiComponent::bumpNets(this, 2 * v3);
v3 = *((_DWORD *)this + 31);
}
*(_QWORD *)(*((_QWORD *)this + 17) + 8LL * v3) = malloc(v2 + 1);
v4 = *(_QWORD *)(*((_QWORD *)this + 17) + 8LL * v3);
v5 = LefDefParser::defrData::DEFCASE(*((LefDefParser::defrData **)this + 42), a2);
result = strcpy(v4, v5);
++*((_DWORD *)this + 31);
return result;
}
|
addNet:
PUSH RBP
PUSH R15
PUSH R14
PUSH RBX
PUSH RAX
MOV R14,RSI
MOV RBX,RDI
MOV RDI,RSI
CALL 0x001070d0
MOV R15,RAX
MOV EBP,dword ptr [RBX + 0x7c]
CMP EBP,dword ptr [RBX + 0x80]
JNZ 0x00113964
ADD EBP,EBP
MOV RDI,RBX
MOV ESI,EBP
CALL 0x00112660
MOV EBP,dword ptr [RBX + 0x7c]
LAB_00113964:
INC R15D
MOVSXD RDI,R15D
CALL 0x00107270
MOV RCX,qword ptr [RBX + 0x88]
MOVSXD RDX,EBP
MOV qword ptr [RCX + RDX*0x8],RAX
MOV RAX,qword ptr [RBX + 0x88]
MOV RDI,qword ptr [RBX + 0x150]
MOV R15,qword ptr [RAX + RDX*0x8]
MOV RSI,R14
CALL 0x0011b638
MOV RDI,R15
MOV RSI,RAX
CALL 0x00107190
INC dword ptr [RBX + 0x7c]
ADD RSP,0x8
POP RBX
POP R14
POP R15
POP RBP
RET
|
/* LefDefParser::defiComponent::addNet(char const*) */
void __thiscall LefDefParser::defiComponent::addNet(defiComponent *this,char *param_1)
{
char *__dest;
size_t sVar1;
void *pvVar2;
char *__src;
int iVar3;
sVar1 = strlen(param_1);
iVar3 = *(int *)(this + 0x7c);
if (iVar3 == *(int *)(this + 0x80)) {
bumpNets(this,iVar3 * 2);
iVar3 = *(int *)(this + 0x7c);
}
pvVar2 = malloc((long)((int)sVar1 + 1));
*(void **)(*(long *)(this + 0x88) + (long)iVar3 * 8) = pvVar2;
__dest = *(char **)(*(long *)(this + 0x88) + (long)iVar3 * 8);
__src = (char *)defrData::DEFCASE(*(defrData **)(this + 0x150),param_1);
strcpy(__dest,__src);
*(int *)(this + 0x7c) = *(int *)(this + 0x7c) + 1;
return;
}
|
|
9,313 |
nlohmann::json_abi_v3_11_3::detail::iteration_proxy_value<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>>::~iteration_proxy_value()
|
monkey531[P]llama/common/json.hpp
|
~iteration_proxy_value() = default;
|
O1
|
cpp
|
nlohmann::json_abi_v3_11_3::detail::iteration_proxy_value<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>>::~iteration_proxy_value():
pushq %rbx
movq %rdi, %rbx
movq 0x50(%rdi), %rdi
leaq 0x60(%rbx), %rax
cmpq %rax, %rdi
je 0xcfb36
movq (%rax), %rsi
incq %rsi
callq 0x1dc40
movq 0x30(%rbx), %rdi
addq $0x40, %rbx
cmpq %rbx, %rdi
je 0xcfb4f
movq (%rbx), %rsi
incq %rsi
popq %rbx
jmp 0x1dc40
popq %rbx
retq
nop
|
_ZN8nlohmann16json_abi_v3_11_36detail21iteration_proxy_valueINS1_9iter_implIKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEEEEED2Ev:
push rbx
mov rbx, rdi
mov rdi, [rdi+50h]; void *
lea rax, [rbx+60h]
cmp rdi, rax
jz short loc_CFB36
mov rsi, [rax]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_CFB36:
mov rdi, [rbx+30h]; void *
add rbx, 40h ; '@'
cmp rdi, rbx
jz short loc_CFB4F
mov rsi, [rbx]
inc rsi; unsigned __int64
pop rbx
jmp __ZdlPvm; operator delete(void *,ulong)
loc_CFB4F:
pop rbx
retn
|
void nlohmann::json_abi_v3_11_3::detail::iteration_proxy_value<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>>::~iteration_proxy_value(
_QWORD *a1)
{
_QWORD *v2; // rdi
_QWORD *v3; // rdi
_QWORD *v4; // rbx
v2 = (_QWORD *)a1[10];
if ( v2 != a1 + 12 )
operator delete(v2, a1[12] + 1LL);
v3 = (_QWORD *)a1[6];
v4 = a1 + 8;
if ( v3 != v4 )
operator delete(v3, *v4 + 1LL);
}
|
~iteration_proxy_value:
PUSH RBX
MOV RBX,RDI
MOV RDI,qword ptr [RDI + 0x50]
LEA RAX,[RBX + 0x60]
CMP RDI,RAX
JZ 0x001cfb36
MOV RSI,qword ptr [RAX]
INC RSI
CALL 0x0011dc40
LAB_001cfb36:
MOV RDI,qword ptr [RBX + 0x30]
ADD RBX,0x40
CMP RDI,RBX
JZ 0x001cfb4f
MOV RSI,qword ptr [RBX]
INC RSI
POP RBX
JMP 0x0011dc40
LAB_001cfb4f:
POP RBX
RET
|
/* nlohmann::json_abi_v3_11_3::detail::iteration_proxy_value<nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,
std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void> const> >::~iteration_proxy_value() */
void __thiscall
nlohmann::json_abi_v3_11_3::detail::
iteration_proxy_value<nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const>>
::~iteration_proxy_value
(iteration_proxy_value<nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const>>
*this)
{
if (*(iteration_proxy_value<nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const>>
**)(this + 0x50) != this + 0x60) {
operator_delete(*(iteration_proxy_value<nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const>>
**)(this + 0x50),*(long *)(this + 0x60) + 1);
}
if (*(iteration_proxy_value<nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const>>
**)(this + 0x30) != this + 0x40) {
operator_delete(*(iteration_proxy_value<nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const>>
**)(this + 0x30),*(long *)(this + 0x40) + 1);
return;
}
return;
}
|
|
9,314 |
common_batch_add(llama_batch&, int, int, std::vector<int, std::allocator<int>> const&, bool)
|
monkey531[P]llama/common/common.cpp
|
void common_batch_add(
struct llama_batch & batch,
llama_token id,
llama_pos pos,
const std::vector<llama_seq_id> & seq_ids,
bool logits) {
GGML_ASSERT(batch.seq_id[batch.n_tokens] && "llama_batch size exceeded");
batch.token [batch.n_tokens] = id;
batch.pos [batch.n_tokens] = pos;
batch.n_seq_id[batch.n_tokens] = seq_ids.size();
for (size_t i = 0; i < seq_ids.size(); ++i) {
batch.seq_id[batch.n_tokens][i] = seq_ids[i];
}
batch.logits [batch.n_tokens] = logits;
batch.n_tokens++;
}
|
O1
|
cpp
|
common_batch_add(llama_batch&, int, int, std::vector<int, std::allocator<int>> const&, bool):
pushq %rax
movq 0x28(%rdi), %rax
movslq (%rdi), %r9
cmpq $0x0, (%rax,%r9,8)
je 0x5b2a4
movq 0x8(%rdi), %r10
movl %esi, (%r10,%r9,4)
movq 0x18(%rdi), %rsi
movslq (%rdi), %r9
movl %edx, (%rsi,%r9,4)
movq (%rcx), %rdx
movq 0x8(%rcx), %rsi
movq %rsi, %rcx
subq %rdx, %rcx
sarq $0x2, %rcx
movq 0x20(%rdi), %r9
movslq (%rdi), %r10
movl %ecx, (%r9,%r10,4)
cmpq %rdx, %rsi
je 0x5b295
cmpq $0x1, %rcx
adcq $0x0, %rcx
xorl %esi, %esi
movl (%rdx,%rsi,4), %r9d
movslq (%rdi), %r10
movq (%rax,%r10,8), %r10
movl %r9d, (%r10,%rsi,4)
incq %rsi
cmpq %rsi, %rcx
jne 0x5b27e
movq 0x30(%rdi), %rax
movslq (%rdi), %rcx
movb %r8b, (%rax,%rcx)
incl (%rdi)
popq %rax
retq
leaq 0x61c06(%rip), %rdi # 0xbceb1
leaq 0x5ab18(%rip), %rdx # 0xb5dca
leaq 0x6223f(%rip), %rcx # 0xbd4f8
movl $0x655, %esi # imm = 0x655
xorl %eax, %eax
callq 0x19b10
|
_Z16common_batch_addR11llama_batchiiRKSt6vectorIiSaIiEEb:
push rax
mov rax, [rdi+28h]
movsxd r9, dword ptr [rdi]
cmp qword ptr [rax+r9*8], 0
jz short loc_5B2A4
mov r10, [rdi+8]
mov [r10+r9*4], esi
mov rsi, [rdi+18h]
movsxd r9, dword ptr [rdi]
mov [rsi+r9*4], edx
mov rdx, [rcx]
mov rsi, [rcx+8]
mov rcx, rsi
sub rcx, rdx
sar rcx, 2
mov r9, [rdi+20h]
movsxd r10, dword ptr [rdi]
mov [r9+r10*4], ecx
cmp rsi, rdx
jz short loc_5B295
cmp rcx, 1
adc rcx, 0
xor esi, esi
loc_5B27E:
mov r9d, [rdx+rsi*4]
movsxd r10, dword ptr [rdi]
mov r10, [rax+r10*8]
mov [r10+rsi*4], r9d
inc rsi
cmp rcx, rsi
jnz short loc_5B27E
loc_5B295:
mov rax, [rdi+30h]
movsxd rcx, dword ptr [rdi]
mov [rax+rcx], r8b
inc dword ptr [rdi]
pop rax
retn
loc_5B2A4:
lea rdi, aWorkspaceLlm4b_3; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aBatchSeqIdBatc; "batch.seq_id[batch.n_tokens] && \"llama"...
mov esi, 655h
xor eax, eax
call _ggml_abort
|
long long common_batch_add(int *a1, int a2, int a3, long long *a4, char a5)
{
long long v5; // rax
long long v6; // rax
long long v7; // r9
long long v8; // rdx
long long v9; // rsi
long long v10; // rcx
long long v11; // rcx
long long v12; // rsi
double v14; // xmm0_8
long long v15; // [rsp-8h] [rbp-8h]
v15 = v5;
v6 = *((_QWORD *)a1 + 5);
v7 = *a1;
if ( *(_QWORD *)(v6 + 8 * v7) )
{
*(_DWORD *)(*((_QWORD *)a1 + 1) + 4 * v7) = a2;
*(_DWORD *)(*((_QWORD *)a1 + 3) + 4LL * *a1) = a3;
v8 = *a4;
v9 = a4[1];
v10 = (v9 - *a4) >> 2;
*(_DWORD *)(*((_QWORD *)a1 + 4) + 4LL * *a1) = v10;
if ( v9 != v8 )
{
v11 = (v10 == 0) + v10;
v12 = 0LL;
do
{
*(_DWORD *)(*(_QWORD *)(v6 + 8LL * *a1) + 4 * v12) = *(_DWORD *)(v8 + 4 * v12);
++v12;
}
while ( v11 != v12 );
}
*(_BYTE *)(*((_QWORD *)a1 + 6) + (*a1)++) = a5;
return v15;
}
else
{
v14 = ggml_abort(
"/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/common.cpp",
1621LL,
"GGML_ASSERT(%s) failed",
"batch.seq_id[batch.n_tokens] && \"llama_batch size exceeded\"");
return common_lcp(v14);
}
}
|
common_batch_add:
PUSH RAX
MOV RAX,qword ptr [RDI + 0x28]
MOVSXD R9,dword ptr [RDI]
CMP qword ptr [RAX + R9*0x8],0x0
JZ 0x0015b2a4
MOV R10,qword ptr [RDI + 0x8]
MOV dword ptr [R10 + R9*0x4],ESI
MOV RSI,qword ptr [RDI + 0x18]
MOVSXD R9,dword ptr [RDI]
MOV dword ptr [RSI + R9*0x4],EDX
MOV RDX,qword ptr [RCX]
MOV RSI,qword ptr [RCX + 0x8]
MOV RCX,RSI
SUB RCX,RDX
SAR RCX,0x2
MOV R9,qword ptr [RDI + 0x20]
MOVSXD R10,dword ptr [RDI]
MOV dword ptr [R9 + R10*0x4],ECX
CMP RSI,RDX
JZ 0x0015b295
CMP RCX,0x1
ADC RCX,0x0
XOR ESI,ESI
LAB_0015b27e:
MOV R9D,dword ptr [RDX + RSI*0x4]
MOVSXD R10,dword ptr [RDI]
MOV R10,qword ptr [RAX + R10*0x8]
MOV dword ptr [R10 + RSI*0x4],R9D
INC RSI
CMP RCX,RSI
JNZ 0x0015b27e
LAB_0015b295:
MOV RAX,qword ptr [RDI + 0x30]
MOVSXD RCX,dword ptr [RDI]
MOV byte ptr [RAX + RCX*0x1],R8B
INC dword ptr [RDI]
POP RAX
RET
LAB_0015b2a4:
LEA RDI,[0x1bceb1]
LEA RDX,[0x1b5dca]
LEA RCX,[0x1bd4f8]
MOV ESI,0x655
XOR EAX,EAX
CALL 0x00119b10
|
/* common_batch_add(llama_batch&, int, int, std::vector<int, std::allocator<int> > const&, bool) */
int8
common_batch_add(llama_batch *param_1,int param_2,int param_3,vector *param_4,bool param_5)
{
long lVar1;
long lVar2;
int8 in_RAX;
long lVar3;
long lVar4;
lVar1 = *(long *)(param_1 + 0x28);
if (*(long *)(lVar1 + (long)*(int *)param_1 * 8) != 0) {
*(int *)(*(long *)(param_1 + 8) + (long)*(int *)param_1 * 4) = param_2;
*(int *)(*(long *)(param_1 + 0x18) + (long)*(int *)param_1 * 4) = param_3;
lVar2 = *(long *)param_4;
lVar4 = *(long *)(param_4 + 8);
lVar3 = lVar4 - lVar2 >> 2;
*(int *)(*(long *)(param_1 + 0x20) + (long)*(int *)param_1 * 4) = (int)lVar3;
if (lVar4 != lVar2) {
lVar4 = 0;
do {
*(int4 *)(*(long *)(lVar1 + (long)*(int *)param_1 * 8) + lVar4 * 4) =
*(int4 *)(lVar2 + lVar4 * 4);
lVar4 = lVar4 + 1;
} while (lVar3 + (ulong)(lVar3 == 0) != lVar4);
}
*(bool *)(*(long *)(param_1 + 0x30) + (long)*(int *)param_1) = param_5;
*(int *)param_1 = *(int *)param_1 + 1;
return in_RAX;
}
/* WARNING: Subroutine does not return */
ggml_abort("/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/common.cpp",0x655,
"GGML_ASSERT(%s) failed",
"batch.seq_id[batch.n_tokens] && \"llama_batch size exceeded\"");
}
|
|
9,315 |
common_batch_add(llama_batch&, int, int, std::vector<int, std::allocator<int>> const&, bool)
|
monkey531[P]llama/common/common.cpp
|
void common_batch_add(
struct llama_batch & batch,
llama_token id,
llama_pos pos,
const std::vector<llama_seq_id> & seq_ids,
bool logits) {
GGML_ASSERT(batch.seq_id[batch.n_tokens] && "llama_batch size exceeded");
batch.token [batch.n_tokens] = id;
batch.pos [batch.n_tokens] = pos;
batch.n_seq_id[batch.n_tokens] = seq_ids.size();
for (size_t i = 0; i < seq_ids.size(); ++i) {
batch.seq_id[batch.n_tokens][i] = seq_ids[i];
}
batch.logits [batch.n_tokens] = logits;
batch.n_tokens++;
}
|
O2
|
cpp
|
common_batch_add(llama_batch&, int, int, std::vector<int, std::allocator<int>> const&, bool):
pushq %rax
movq 0x28(%rdi), %rax
movslq (%rdi), %r9
cmpq $0x0, (%rax,%r9,8)
je 0x532e9
movq 0x8(%rdi), %r10
movl %esi, (%r10,%r9,4)
movq 0x18(%rdi), %rsi
movslq (%rdi), %r9
movl %edx, (%rsi,%r9,4)
movq (%rcx), %rdx
movq 0x8(%rcx), %rcx
subq %rdx, %rcx
sarq $0x2, %rcx
movq 0x20(%rdi), %rsi
movslq (%rdi), %r9
movl %ecx, (%rsi,%r9,4)
xorl %esi, %esi
cmpq %rsi, %rcx
je 0x532da
movl (%rdx,%rsi,4), %r9d
movslq (%rdi), %r10
movq (%rax,%r10,8), %r10
movl %r9d, (%r10,%rsi,4)
incq %rsi
jmp 0x532c1
movq 0x30(%rdi), %rax
movslq (%rdi), %rcx
movb %r8b, (%rax,%rcx)
incl (%rdi)
popq %rax
retq
leaq 0x48c01(%rip), %rdi # 0x9bef1
leaq 0x41ad3(%rip), %rdx # 0x94dca
leaq 0x4923a(%rip), %rcx # 0x9c538
movl $0x655, %esi # imm = 0x655
xorl %eax, %eax
callq 0x21b30
|
_Z16common_batch_addR11llama_batchiiRKSt6vectorIiSaIiEEb:
push rax
mov rax, [rdi+28h]
movsxd r9, dword ptr [rdi]
cmp qword ptr [rax+r9*8], 0
jz short loc_532E9
mov r10, [rdi+8]
mov [r10+r9*4], esi
mov rsi, [rdi+18h]
movsxd r9, dword ptr [rdi]
mov [rsi+r9*4], edx
mov rdx, [rcx]
mov rcx, [rcx+8]
sub rcx, rdx
sar rcx, 2
mov rsi, [rdi+20h]
movsxd r9, dword ptr [rdi]
mov [rsi+r9*4], ecx
xor esi, esi
loc_532C1:
cmp rcx, rsi
jz short loc_532DA
mov r9d, [rdx+rsi*4]
movsxd r10, dword ptr [rdi]
mov r10, [rax+r10*8]
mov [r10+rsi*4], r9d
inc rsi
jmp short loc_532C1
loc_532DA:
mov rax, [rdi+30h]
movsxd rcx, dword ptr [rdi]
mov [rax+rcx], r8b
inc dword ptr [rdi]
pop rax
retn
loc_532E9:
lea rdi, aWorkspaceLlm4b_3; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aBatchSeqIdBatc; "batch.seq_id[batch.n_tokens] && \"llama"...
mov esi, 655h
xor eax, eax
call _ggml_abort
|
long long common_batch_add(int *a1, int a2, int a3, long long *a4, char a5)
{
long long v5; // rax
long long v6; // rax
long long v7; // r9
long long v8; // rdx
long long v9; // rcx
long long i; // rsi
long long v12; // [rsp-8h] [rbp-8h]
v12 = v5;
v6 = *((_QWORD *)a1 + 5);
v7 = *a1;
if ( *(_QWORD *)(v6 + 8 * v7) )
{
*(_DWORD *)(*((_QWORD *)a1 + 1) + 4 * v7) = a2;
*(_DWORD *)(*((_QWORD *)a1 + 3) + 4LL * *a1) = a3;
v8 = *a4;
v9 = (a4[1] - *a4) >> 2;
*(_DWORD *)(*((_QWORD *)a1 + 4) + 4LL * *a1) = v9;
for ( i = 0LL; v9 != i; ++i )
*(_DWORD *)(*(_QWORD *)(v6 + 8LL * *a1) + 4 * i) = *(_DWORD *)(v8 + 4 * i);
*(_BYTE *)(*((_QWORD *)a1 + 6) + (*a1)++) = a5;
return v12;
}
else
{
ggml_abort(
"/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/common.cpp",
1621LL,
"GGML_ASSERT(%s) failed",
"batch.seq_id[batch.n_tokens] && \"llama_batch size exceeded\"");
return common_lcp();
}
}
|
common_batch_add:
PUSH RAX
MOV RAX,qword ptr [RDI + 0x28]
MOVSXD R9,dword ptr [RDI]
CMP qword ptr [RAX + R9*0x8],0x0
JZ 0x001532e9
MOV R10,qword ptr [RDI + 0x8]
MOV dword ptr [R10 + R9*0x4],ESI
MOV RSI,qword ptr [RDI + 0x18]
MOVSXD R9,dword ptr [RDI]
MOV dword ptr [RSI + R9*0x4],EDX
MOV RDX,qword ptr [RCX]
MOV RCX,qword ptr [RCX + 0x8]
SUB RCX,RDX
SAR RCX,0x2
MOV RSI,qword ptr [RDI + 0x20]
MOVSXD R9,dword ptr [RDI]
MOV dword ptr [RSI + R9*0x4],ECX
XOR ESI,ESI
LAB_001532c1:
CMP RCX,RSI
JZ 0x001532da
MOV R9D,dword ptr [RDX + RSI*0x4]
MOVSXD R10,dword ptr [RDI]
MOV R10,qword ptr [RAX + R10*0x8]
MOV dword ptr [R10 + RSI*0x4],R9D
INC RSI
JMP 0x001532c1
LAB_001532da:
MOV RAX,qword ptr [RDI + 0x30]
MOVSXD RCX,dword ptr [RDI]
MOV byte ptr [RAX + RCX*0x1],R8B
INC dword ptr [RDI]
POP RAX
RET
LAB_001532e9:
LEA RDI,[0x19bef1]
LEA RDX,[0x194dca]
LEA RCX,[0x19c538]
MOV ESI,0x655
XOR EAX,EAX
CALL 0x00121b30
|
/* common_batch_add(llama_batch&, int, int, std::vector<int, std::allocator<int> > const&, bool) */
int8
common_batch_add(llama_batch *param_1,int param_2,int param_3,vector *param_4,bool param_5)
{
long lVar1;
long lVar2;
int8 in_RAX;
long lVar3;
long lVar4;
lVar1 = *(long *)(param_1 + 0x28);
if (*(long *)(lVar1 + (long)*(int *)param_1 * 8) != 0) {
*(int *)(*(long *)(param_1 + 8) + (long)*(int *)param_1 * 4) = param_2;
*(int *)(*(long *)(param_1 + 0x18) + (long)*(int *)param_1 * 4) = param_3;
lVar2 = *(long *)param_4;
lVar3 = *(long *)(param_4 + 8) - lVar2 >> 2;
*(int *)(*(long *)(param_1 + 0x20) + (long)*(int *)param_1 * 4) = (int)lVar3;
for (lVar4 = 0; lVar3 != lVar4; lVar4 = lVar4 + 1) {
*(int4 *)(*(long *)(lVar1 + (long)*(int *)param_1 * 8) + lVar4 * 4) =
*(int4 *)(lVar2 + lVar4 * 4);
}
*(bool *)(*(long *)(param_1 + 0x30) + (long)*(int *)param_1) = param_5;
*(int *)param_1 = *(int *)param_1 + 1;
return in_RAX;
}
/* WARNING: Subroutine does not return */
ggml_abort("/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/common.cpp",0x655,
"GGML_ASSERT(%s) failed",
"batch.seq_id[batch.n_tokens] && \"llama_batch size exceeded\"");
}
|
|
9,316 |
common_batch_add(llama_batch&, int, int, std::vector<int, std::allocator<int>> const&, bool)
|
monkey531[P]llama/common/common.cpp
|
void common_batch_add(
struct llama_batch & batch,
llama_token id,
llama_pos pos,
const std::vector<llama_seq_id> & seq_ids,
bool logits) {
GGML_ASSERT(batch.seq_id[batch.n_tokens] && "llama_batch size exceeded");
batch.token [batch.n_tokens] = id;
batch.pos [batch.n_tokens] = pos;
batch.n_seq_id[batch.n_tokens] = seq_ids.size();
for (size_t i = 0; i < seq_ids.size(); ++i) {
batch.seq_id[batch.n_tokens][i] = seq_ids[i];
}
batch.logits [batch.n_tokens] = logits;
batch.n_tokens++;
}
|
O3
|
cpp
|
common_batch_add(llama_batch&, int, int, std::vector<int, std::allocator<int>> const&, bool):
pushq %rax
movq 0x28(%rdi), %rax
movslq (%rdi), %r9
cmpq $0x0, (%rax,%r9,8)
je 0x5a0a3
movq 0x8(%rdi), %r10
movl %esi, (%r10,%r9,4)
movq 0x18(%rdi), %rsi
movslq (%rdi), %r9
movl %edx, (%rsi,%r9,4)
movq (%rcx), %rdx
movq 0x8(%rcx), %rsi
movq %rsi, %rcx
subq %rdx, %rcx
sarq $0x2, %rcx
movq 0x20(%rdi), %r9
movslq (%rdi), %r10
movl %ecx, (%r9,%r10,4)
cmpq %rdx, %rsi
je 0x5a094
cmpq $0x1, %rcx
adcq $0x0, %rcx
xorl %esi, %esi
movl (%rdx,%rsi,4), %r9d
movslq (%rdi), %r10
movq (%rax,%r10,8), %r10
movl %r9d, (%r10,%rsi,4)
incq %rsi
cmpq %rsi, %rcx
jne 0x5a07d
movq 0x30(%rdi), %rax
movslq (%rdi), %rcx
movb %r8b, (%rax,%rcx)
incl (%rdi)
popq %rax
retq
leaq 0x5fdf7(%rip), %rdi # 0xb9ea1
leaq 0x58d29(%rip), %rdx # 0xb2dda
leaq 0x60430(%rip), %rcx # 0xba4e8
movl $0x655, %esi # imm = 0x655
xorl %eax, %eax
callq 0x19b10
|
_Z16common_batch_addR11llama_batchiiRKSt6vectorIiSaIiEEb:
push rax
mov rax, [rdi+28h]
movsxd r9, dword ptr [rdi]
cmp qword ptr [rax+r9*8], 0
jz short loc_5A0A3
mov r10, [rdi+8]
mov [r10+r9*4], esi
mov rsi, [rdi+18h]
movsxd r9, dword ptr [rdi]
mov [rsi+r9*4], edx
mov rdx, [rcx]
mov rsi, [rcx+8]
mov rcx, rsi
sub rcx, rdx
sar rcx, 2
mov r9, [rdi+20h]
movsxd r10, dword ptr [rdi]
mov [r9+r10*4], ecx
cmp rsi, rdx
jz short loc_5A094
cmp rcx, 1
adc rcx, 0
xor esi, esi
loc_5A07D:
mov r9d, [rdx+rsi*4]
movsxd r10, dword ptr [rdi]
mov r10, [rax+r10*8]
mov [r10+rsi*4], r9d
inc rsi
cmp rcx, rsi
jnz short loc_5A07D
loc_5A094:
mov rax, [rdi+30h]
movsxd rcx, dword ptr [rdi]
mov [rax+rcx], r8b
inc dword ptr [rdi]
pop rax
retn
loc_5A0A3:
lea rdi, aWorkspaceLlm4b_3; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aBatchSeqIdBatc; "batch.seq_id[batch.n_tokens] && \"llama"...
mov esi, 655h
xor eax, eax
call _ggml_abort
|
long long common_batch_add(int *a1, int a2, int a3, long long *a4, char a5)
{
long long v5; // rax
long long v6; // rax
long long v7; // r9
long long v8; // rdx
long long v9; // rsi
long long v10; // rcx
long long v11; // rcx
long long v12; // rsi
double v14; // xmm0_8
long long v15; // [rsp-8h] [rbp-8h]
v15 = v5;
v6 = *((_QWORD *)a1 + 5);
v7 = *a1;
if ( *(_QWORD *)(v6 + 8 * v7) )
{
*(_DWORD *)(*((_QWORD *)a1 + 1) + 4 * v7) = a2;
*(_DWORD *)(*((_QWORD *)a1 + 3) + 4LL * *a1) = a3;
v8 = *a4;
v9 = a4[1];
v10 = (v9 - *a4) >> 2;
*(_DWORD *)(*((_QWORD *)a1 + 4) + 4LL * *a1) = v10;
if ( v9 != v8 )
{
v11 = (v10 == 0) + v10;
v12 = 0LL;
do
{
*(_DWORD *)(*(_QWORD *)(v6 + 8LL * *a1) + 4 * v12) = *(_DWORD *)(v8 + 4 * v12);
++v12;
}
while ( v11 != v12 );
}
*(_BYTE *)(*((_QWORD *)a1 + 6) + (*a1)++) = a5;
return v15;
}
else
{
v14 = ggml_abort(
"/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/common.cpp",
1621LL,
"GGML_ASSERT(%s) failed",
"batch.seq_id[batch.n_tokens] && \"llama_batch size exceeded\"");
return common_lcp(v14);
}
}
|
common_batch_add:
PUSH RAX
MOV RAX,qword ptr [RDI + 0x28]
MOVSXD R9,dword ptr [RDI]
CMP qword ptr [RAX + R9*0x8],0x0
JZ 0x0015a0a3
MOV R10,qword ptr [RDI + 0x8]
MOV dword ptr [R10 + R9*0x4],ESI
MOV RSI,qword ptr [RDI + 0x18]
MOVSXD R9,dword ptr [RDI]
MOV dword ptr [RSI + R9*0x4],EDX
MOV RDX,qword ptr [RCX]
MOV RSI,qword ptr [RCX + 0x8]
MOV RCX,RSI
SUB RCX,RDX
SAR RCX,0x2
MOV R9,qword ptr [RDI + 0x20]
MOVSXD R10,dword ptr [RDI]
MOV dword ptr [R9 + R10*0x4],ECX
CMP RSI,RDX
JZ 0x0015a094
CMP RCX,0x1
ADC RCX,0x0
XOR ESI,ESI
LAB_0015a07d:
MOV R9D,dword ptr [RDX + RSI*0x4]
MOVSXD R10,dword ptr [RDI]
MOV R10,qword ptr [RAX + R10*0x8]
MOV dword ptr [R10 + RSI*0x4],R9D
INC RSI
CMP RCX,RSI
JNZ 0x0015a07d
LAB_0015a094:
MOV RAX,qword ptr [RDI + 0x30]
MOVSXD RCX,dword ptr [RDI]
MOV byte ptr [RAX + RCX*0x1],R8B
INC dword ptr [RDI]
POP RAX
RET
LAB_0015a0a3:
LEA RDI,[0x1b9ea1]
LEA RDX,[0x1b2dda]
LEA RCX,[0x1ba4e8]
MOV ESI,0x655
XOR EAX,EAX
CALL 0x00119b10
|
/* common_batch_add(llama_batch&, int, int, std::vector<int, std::allocator<int> > const&, bool) */
int8
common_batch_add(llama_batch *param_1,int param_2,int param_3,vector *param_4,bool param_5)
{
long lVar1;
long lVar2;
int8 in_RAX;
long lVar3;
long lVar4;
lVar1 = *(long *)(param_1 + 0x28);
if (*(long *)(lVar1 + (long)*(int *)param_1 * 8) != 0) {
*(int *)(*(long *)(param_1 + 8) + (long)*(int *)param_1 * 4) = param_2;
*(int *)(*(long *)(param_1 + 0x18) + (long)*(int *)param_1 * 4) = param_3;
lVar2 = *(long *)param_4;
lVar4 = *(long *)(param_4 + 8);
lVar3 = lVar4 - lVar2 >> 2;
*(int *)(*(long *)(param_1 + 0x20) + (long)*(int *)param_1 * 4) = (int)lVar3;
if (lVar4 != lVar2) {
lVar4 = 0;
do {
*(int4 *)(*(long *)(lVar1 + (long)*(int *)param_1 * 8) + lVar4 * 4) =
*(int4 *)(lVar2 + lVar4 * 4);
lVar4 = lVar4 + 1;
} while (lVar3 + (ulong)(lVar3 == 0) != lVar4);
}
*(bool *)(*(long *)(param_1 + 0x30) + (long)*(int *)param_1) = param_5;
*(int *)param_1 = *(int *)param_1 + 1;
return in_RAX;
}
/* WARNING: Subroutine does not return */
ggml_abort("/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/common.cpp",0x655,
"GGML_ASSERT(%s) failed",
"batch.seq_id[batch.n_tokens] && \"llama_batch size exceeded\"");
}
|
|
9,317 |
js_cmp_doubles
|
bluesky950520[P]quickjs/quickjs.c
|
static int js_cmp_doubles(double x, double y)
{
if (isnan(x)) return isnan(y) ? 0 : +1;
if (isnan(y)) return -1;
if (x < y) return -1;
if (x > y) return 1;
if (x != 0) return 0;
if (signbit(x)) return signbit(y) ? 0 : -1;
else return signbit(y) ? 1 : 0;
}
|
O2
|
c
|
js_cmp_doubles:
ucomisd %xmm0, %xmm0
jp 0x71c91
ucomisd %xmm1, %xmm1
pushq $-0x1
popq %rax
jp 0x71c6f
ucomisd %xmm0, %xmm1
ja 0x71c6f
ucomisd %xmm1, %xmm0
jbe 0x71c61
pushq $0x1
popq %rax
retq
xorl %eax, %eax
xorpd %xmm2, %xmm2
ucomisd %xmm2, %xmm0
jne 0x71c6f
jnp 0x71c70
retq
movq %xmm0, %rax
movq %xmm1, %rcx
testq %rax, %rax
js 0x71c86
shrq $0x3f, %rcx
movl %ecx, %eax
retq
xorl %eax, %eax
testq %rcx, %rcx
setns %al
negl %eax
retq
xorl %eax, %eax
ucomisd %xmm1, %xmm1
setnp %al
retq
|
js_cmp_doubles:
ucomisd xmm0, xmm0
jp short loc_71C91
ucomisd xmm1, xmm1
push 0FFFFFFFFFFFFFFFFh
pop rax
jp short locret_71C6F
ucomisd xmm1, xmm0
ja short locret_71C6F
ucomisd xmm0, xmm1
jbe short loc_71C61
push 1
pop rax
retn
loc_71C61:
xor eax, eax
xorpd xmm2, xmm2
ucomisd xmm0, xmm2
jnz short locret_71C6F
jnp short loc_71C70
locret_71C6F:
retn
loc_71C70:
movq rax, xmm0
movq rcx, xmm1
test rax, rax
js short loc_71C86
shr rcx, 3Fh
mov eax, ecx
retn
loc_71C86:
xor eax, eax
test rcx, rcx
setns al
neg eax
retn
loc_71C91:
xor eax, eax
ucomisd xmm1, xmm1
setnp al
retn
|
long long js_cmp_doubles(double a1, double a2)
{
long long result; // rax
result = -1LL;
if ( a2 <= a1 )
{
if ( a1 <= a2 )
{
result = 0LL;
if ( a1 == 0.0 )
{
if ( a1 < 0.0 )
return (unsigned int)-(a2 >= 0.0);
else
return *(_QWORD *)&a2 >> 63;
}
}
else
{
return 1LL;
}
}
return result;
}
|
js_cmp_doubles:
UCOMISD XMM0,XMM0
JP 0x00171c91
UCOMISD XMM1,XMM1
PUSH -0x1
POP RAX
JP 0x00171c6f
UCOMISD XMM1,XMM0
JA 0x00171c6f
UCOMISD XMM0,XMM1
JBE 0x00171c61
PUSH 0x1
POP RAX
RET
LAB_00171c61:
XOR EAX,EAX
XORPD XMM2,XMM2
UCOMISD XMM0,XMM2
JNZ 0x00171c6f
JNP 0x00171c70
LAB_00171c6f:
RET
LAB_00171c70:
MOVQ RAX,XMM0
MOVQ RCX,XMM1
TEST RAX,RAX
JS 0x00171c86
SHR RCX,0x3f
MOV EAX,ECX
RET
LAB_00171c86:
XOR EAX,EAX
TEST RCX,RCX
SETNS AL
NEG EAX
RET
LAB_00171c91:
XOR EAX,EAX
UCOMISD XMM1,XMM1
SETNP AL
RET
|
ulong js_cmp_doubles(double param_1,double param_2)
{
ulong uVar1;
if (NAN(param_1)) {
return (ulong)!NAN(param_2);
}
uVar1 = 0xffffffffffffffff;
if (param_2 <= param_1) {
if (param_2 < param_1) {
return 1;
}
uVar1 = 0;
if ((param_1 == 0.0) && (uVar1 = 0, !NAN(param_1))) {
if ((long)param_1 < 0) {
return (ulong)-(uint)(-1 < (long)param_2);
}
return (ulong)param_2 >> 0x3f;
}
}
return uVar1;
}
|
|
9,318 |
skip
|
eloqsql/libmariadb/unittest/mytap/tap.c
|
void
skip(int how_many, char const *const fmt, ...)
{
char reason[80];
if (fmt && *fmt)
{
va_list ap;
va_start(ap, fmt);
vsnprintf(reason, sizeof(reason), fmt, ap);
va_end(ap);
}
else
reason[0] = '\0';
while (how_many-- > 0)
{
va_list ap;
memset((char*) &ap, 0, sizeof(ap)); /* Keep compiler happy */
vemit_tap(1, NULL, ap);
emit_dir("skip", reason);
emit_endl();
}
}
|
O0
|
c
|
skip:
pushq %rbp
movq %rsp, %rbp
subq $0x160, %rsp # imm = 0x160
testb %al, %al
je 0x1bfe7
movaps %xmm0, -0x130(%rbp)
movaps %xmm1, -0x120(%rbp)
movaps %xmm2, -0x110(%rbp)
movaps %xmm3, -0x100(%rbp)
movaps %xmm4, -0xf0(%rbp)
movaps %xmm5, -0xe0(%rbp)
movaps %xmm6, -0xd0(%rbp)
movaps %xmm7, -0xc0(%rbp)
movq %r9, -0x138(%rbp)
movq %r8, -0x140(%rbp)
movq %rcx, -0x148(%rbp)
movq %rdx, -0x150(%rbp)
movq %fs:0x28, %rax
movq %rax, -0x8(%rbp)
movl %edi, -0x64(%rbp)
movq %rsi, -0x70(%rbp)
cmpq $0x0, -0x70(%rbp)
je 0x1c073
movq -0x70(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x0, %eax
je 0x1c073
leaq -0x90(%rbp), %rax
leaq -0x160(%rbp), %rcx
movq %rcx, 0x10(%rax)
leaq 0x10(%rbp), %rcx
movq %rcx, 0x8(%rax)
movl $0x30, 0x4(%rax)
movl $0x10, (%rax)
leaq -0x60(%rbp), %rdi
movq -0x70(%rbp), %rdx
leaq -0x90(%rbp), %rcx
movl $0x50, %esi
callq 0x132b0
leaq -0x90(%rbp), %rax
jmp 0x1c077
movb $0x0, -0x60(%rbp)
jmp 0x1c079
movl -0x64(%rbp), %eax
movl %eax, %ecx
addl $-0x1, %ecx
movl %ecx, -0x64(%rbp)
cmpl $0x0, %eax
jle 0x1c0c8
leaq -0xb0(%rbp), %rdi
xorl %esi, %esi
movl $0x18, %edx
callq 0x13260
leaq -0xb0(%rbp), %rdx
movl $0x1, %edi
xorl %eax, %eax
movl %eax, %esi
callq 0x1be90
leaq -0x60(%rbp), %rsi
leaq 0x36dbd(%rip), %rdi # 0x52e79
callq 0x1bf60
callq 0x1c250
jmp 0x1c079
movq %fs:0x28, %rax
movq -0x8(%rbp), %rcx
cmpq %rcx, %rax
jne 0x1c0e3
addq $0x160, %rsp # imm = 0x160
popq %rbp
retq
callq 0x134c0
nopl (%rax,%rax)
|
skip:
push rbp
mov rbp, rsp
sub rsp, 160h
test al, al
jz short loc_1BFE7
movaps [rbp+var_130], xmm0
movaps [rbp+var_120], xmm1
movaps [rbp+var_110], xmm2
movaps [rbp+var_100], xmm3
movaps [rbp+var_F0], xmm4
movaps [rbp+var_E0], xmm5
movaps [rbp+var_D0], xmm6
movaps [rbp+var_C0], xmm7
loc_1BFE7:
mov [rbp+var_138], r9
mov [rbp+var_140], r8
mov [rbp+var_148], rcx
mov [rbp+var_150], rdx
mov rax, fs:28h
mov [rbp+var_8], rax
mov [rbp+var_64], edi
mov [rbp+var_70], rsi
cmp [rbp+var_70], 0
jz short loc_1C073
mov rax, [rbp+var_70]
movsx eax, byte ptr [rax]
cmp eax, 0
jz short loc_1C073
lea rax, [rbp+var_90]
lea rcx, [rbp+var_160]
mov [rax+10h], rcx
lea rcx, [rbp+arg_0]
mov [rax+8], rcx
mov dword ptr [rax+4], 30h ; '0'
mov dword ptr [rax], 10h
lea rdi, [rbp+var_60]
mov rdx, [rbp+var_70]
lea rcx, [rbp+var_90]
mov esi, 50h ; 'P'
call _vsnprintf
lea rax, [rbp+var_90]
jmp short loc_1C077
loc_1C073:
mov [rbp+var_60], 0
loc_1C077:
jmp short $+2
loc_1C079:
mov eax, [rbp+var_64]
mov ecx, eax
add ecx, 0FFFFFFFFh
mov [rbp+var_64], ecx
cmp eax, 0
jle short loc_1C0C8
lea rdi, [rbp+var_B0]
xor esi, esi
mov edx, 18h
call _memset
lea rdx, [rbp+var_B0]
mov edi, 1
xor eax, eax
mov esi, eax
call vemit_tap
lea rsi, [rbp+var_60]
lea rdi, aSkip; "skip"
call emit_dir
call emit_endl
jmp short loc_1C079
loc_1C0C8:
mov rax, fs:28h
mov rcx, [rbp+var_8]
cmp rax, rcx
jnz short loc_1C0E3
add rsp, 160h
pop rbp
retn
loc_1C0E3:
call ___stack_chk_fail
|
unsigned long long skip(int a1, _BYTE *a2, ...)
{
int v2; // eax
_BYTE v4[32]; // [rsp+B0h] [rbp-B0h] BYREF
va_list va; // [rsp+D0h] [rbp-90h] BYREF
_BYTE *v6; // [rsp+F0h] [rbp-70h]
int v7; // [rsp+FCh] [rbp-64h]
char v8[88]; // [rsp+100h] [rbp-60h] BYREF
unsigned long long v9; // [rsp+158h] [rbp-8h]
v9 = __readfsqword(0x28u);
v7 = a1;
v6 = a2;
if ( a2 && *v6 )
{
va_start(va, a2);
vsnprintf(v8, 80LL, v6, va);
}
else
{
v8[0] = 0;
}
while ( 1 )
{
v2 = v7--;
if ( v2 <= 0 )
break;
memset(v4, 0LL, 24LL);
vemit_tap(1, 0LL, (long long)v4);
emit_dir("skip", v8);
emit_endl();
}
return __readfsqword(0x28u);
}
|
skip:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x160
TEST AL,AL
JZ 0x0011bfe7
MOVAPS xmmword ptr [RBP + -0x130],XMM0
MOVAPS xmmword ptr [RBP + -0x120],XMM1
MOVAPS xmmword ptr [RBP + -0x110],XMM2
MOVAPS xmmword ptr [RBP + -0x100],XMM3
MOVAPS xmmword ptr [RBP + -0xf0],XMM4
MOVAPS xmmword ptr [RBP + -0xe0],XMM5
MOVAPS xmmword ptr [RBP + -0xd0],XMM6
MOVAPS xmmword ptr [RBP + -0xc0],XMM7
LAB_0011bfe7:
MOV qword ptr [RBP + -0x138],R9
MOV qword ptr [RBP + -0x140],R8
MOV qword ptr [RBP + -0x148],RCX
MOV qword ptr [RBP + -0x150],RDX
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x8],RAX
MOV dword ptr [RBP + -0x64],EDI
MOV qword ptr [RBP + -0x70],RSI
CMP qword ptr [RBP + -0x70],0x0
JZ 0x0011c073
MOV RAX,qword ptr [RBP + -0x70]
MOVSX EAX,byte ptr [RAX]
CMP EAX,0x0
JZ 0x0011c073
LEA RAX,[RBP + -0x90]
LEA RCX,[RBP + -0x160]
MOV qword ptr [RAX + 0x10],RCX
LEA RCX,[RBP + 0x10]
MOV qword ptr [RAX + 0x8],RCX
MOV dword ptr [RAX + 0x4],0x30
MOV dword ptr [RAX],0x10
LEA RDI,[RBP + -0x60]
MOV RDX,qword ptr [RBP + -0x70]
LEA RCX,[RBP + -0x90]
MOV ESI,0x50
CALL 0x001132b0
LEA RAX,[RBP + -0x90]
JMP 0x0011c077
LAB_0011c073:
MOV byte ptr [RBP + -0x60],0x0
LAB_0011c077:
JMP 0x0011c079
LAB_0011c079:
MOV EAX,dword ptr [RBP + -0x64]
MOV ECX,EAX
ADD ECX,-0x1
MOV dword ptr [RBP + -0x64],ECX
CMP EAX,0x0
JLE 0x0011c0c8
LEA RDI,[RBP + -0xb0]
XOR ESI,ESI
MOV EDX,0x18
CALL 0x00113260
LEA RDX,[RBP + -0xb0]
MOV EDI,0x1
XOR EAX,EAX
MOV ESI,EAX
CALL 0x0011be90
LEA RSI,[RBP + -0x60]
LEA RDI,[0x152e79]
CALL 0x0011bf60
CALL 0x0011c250
JMP 0x0011c079
LAB_0011c0c8:
MOV RAX,qword ptr FS:[0x28]
MOV RCX,qword ptr [RBP + -0x8]
CMP RAX,RCX
JNZ 0x0011c0e3
ADD RSP,0x160
POP RBP
RET
LAB_0011c0e3:
CALL 0x001134c0
|
void skip(int8 param_1,int8 param_2,int8 param_3,int8 param_4,
int8 param_5,int8 param_6,int8 param_7,int8 param_8,int param_9,
char *param_10,int8 param_11,int8 param_12,int8 param_13,
int8 param_14)
{
char in_AL;
long in_FS_OFFSET;
int1 local_168 [16];
int8 local_158;
int8 local_150;
int8 local_148;
int8 local_140;
int8 local_138;
int8 local_128;
int8 local_118;
int8 local_108;
int8 local_f8;
int8 local_e8;
int8 local_d8;
int8 local_c8;
int1 local_b8 [32];
int4 local_98;
int4 local_94;
int1 *local_90;
int1 *local_88;
char *local_78;
int local_6c;
char local_68 [88];
long local_10;
if (in_AL != '\0') {
local_138 = param_1;
local_128 = param_2;
local_118 = param_3;
local_108 = param_4;
local_f8 = param_5;
local_e8 = param_6;
local_d8 = param_7;
local_c8 = param_8;
}
local_10 = *(long *)(in_FS_OFFSET + 0x28);
local_158 = param_11;
local_150 = param_12;
local_148 = param_13;
local_140 = param_14;
local_78 = param_10;
local_6c = param_9;
if ((param_10 == (char *)0x0) || (*param_10 == '\0')) {
local_68[0] = '\0';
}
else {
local_88 = local_168;
local_90 = &stack0x00000008;
local_94 = 0x30;
local_98 = 0x10;
vsnprintf(local_68,0x50,param_10,&local_98);
}
while (0 < local_6c) {
local_6c = local_6c + -1;
memset(local_b8,0,0x18);
vemit_tap(1,0,local_b8);
emit_dir(&DAT_00152e79);
emit_endl();
}
if (*(long *)(in_FS_OFFSET + 0x28) != local_10) {
local_6c = local_6c + -1;
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
return;
}
|
|
9,319 |
ggml_easy::ctx::build_graph(std::function<void (ggml_context*, ggml_cgraph*, ggml_easy::ctx::build_utils&)>)
|
ngxson[P]ggml-easy/ggml-easy.h
|
void build_graph(std::function<void(ggml_context *, ggml_cgraph *, build_utils &)> builder_fn) {
ggml_free(ctx_gf);
struct ggml_init_params params = {
/*.mem_size =*/ buf_compute_meta.size(),
/*.mem_buffer =*/ buf_compute_meta.data(),
/*.no_alloc =*/ true,
};
ctx_gf = ggml_init(params);
ggml_backend_sched_reset(sched.get());
gf = ggml_new_graph_custom(ctx_gf, max_nodes, false);
build_utils utils(ctx_gf, gf);
builder_fn(ctx_gf, gf, utils);
ggml_backend_sched_alloc_graph(sched.get(), gf);
dbg_printed_tensors = std::move(utils.printed_tensors);
}
|
O0
|
c
|
ggml_easy::ctx::build_graph(std::function<void (ggml_context*, ggml_cgraph*, ggml_easy::ctx::build_utils&)>):
subq $0xb8, %rsp
movq %rsi, 0x28(%rsp)
movq %rdi, 0xb0(%rsp)
movq %rsi, 0xa8(%rsp)
movq 0xb0(%rsp), %rax
movq %rax, 0x20(%rsp)
movq 0x48(%rax), %rdi
callq 0x80c0
movq 0x20(%rsp), %rdi
addq $0x50, %rdi
movq %rdi, 0x18(%rsp)
callq 0xef80
movq 0x18(%rsp), %rdi
movq %rax, 0x90(%rsp)
callq 0xc340
movq %rax, 0x98(%rsp)
movb $0x1, 0xa0(%rsp)
movq 0xa0(%rsp), %rax
movq %rax, 0x80(%rsp)
movups 0x90(%rsp), %xmm0
movaps %xmm0, 0x70(%rsp)
movq 0x80(%rsp), %rcx
movq %rsp, %rax
movq %rcx, 0x10(%rax)
movaps 0x70(%rsp), %xmm0
movups %xmm0, (%rax)
callq 0x8330
movq 0x20(%rsp), %rdi
movq %rax, 0x48(%rdi)
addq $0xb8, %rdi
callq 0x10730
movq %rax, %rdi
callq 0x8280
movq 0x20(%rsp), %rax
movq 0x48(%rax), %rdi
movslq 0x68(%rax), %rsi
xorl %edx, %edx
callq 0x8600
movq %rax, %rcx
movq 0x20(%rsp), %rax
movq %rcx, 0x40(%rax)
movq 0x40(%rax), %rdx
movq 0x48(%rax), %rsi
leaq 0x48(%rsp), %rdi
movq %rdi, 0x30(%rsp)
callq 0x10760
movq 0x20(%rsp), %rax
movq 0x28(%rsp), %rdi
movq 0x30(%rsp), %rcx
movq 0x40(%rax), %rdx
movq 0x48(%rax), %rsi
callq 0x107a0
jmp 0xbcb2
movq 0x20(%rsp), %rdi
addq $0xb8, %rdi
callq 0x10730
movq %rax, %rdi
movq 0x20(%rsp), %rax
movq 0x40(%rax), %rsi
callq 0x80f0
jmp 0xbcd6
movq 0x20(%rsp), %rdi
leaq 0x48(%rsp), %rsi
addq $0x10, %rsi
addq $0xd8, %rdi
callq 0x107f0
leaq 0x48(%rsp), %rdi
callq 0x10830
addq $0xb8, %rsp
retq
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x40(%rsp)
movl %eax, 0x3c(%rsp)
leaq 0x48(%rsp), %rdi
callq 0x10830
movq 0x40(%rsp), %rdi
callq 0x8620
nopw %cs:(%rax,%rax)
nop
|
_ZN9ggml_easy3ctx11build_graphESt8functionIFvP12ggml_contextP11ggml_cgraphRNS0_11build_utilsEEE:
sub rsp, 0B8h
mov [rsp+0B8h+var_90], rsi
mov [rsp+0B8h+var_8], rdi
mov [rsp+0B8h+var_10], rsi
mov rax, [rsp+0B8h+var_8]
mov [rsp+0B8h+var_98], rax
mov rdi, [rax+48h]
call _ggml_free
mov rdi, [rsp+0B8h+var_98]
add rdi, 50h ; 'P'
mov [rsp+0B8h+var_A0], rdi
call _ZNKSt6vectorIhSaIhEE4sizeEv; std::vector<uchar>::size(void)
mov rdi, [rsp+0B8h+var_A0]
mov qword ptr [rsp+0B8h+var_28], rax
call _ZNSt6vectorIhSaIhEE4dataEv; std::vector<uchar>::data(void)
mov qword ptr [rsp+0B8h+var_28+8], rax
mov byte ptr [rsp+0B8h+var_18], 1
mov rax, [rsp+0B8h+var_18]
mov [rsp+0B8h+var_38], rax
movups xmm0, [rsp+0B8h+var_28]
movaps [rsp+0B8h+var_48], xmm0
mov rcx, [rsp+0B8h+var_38]
mov rax, rsp
mov [rax+10h], rcx
movaps xmm0, [rsp+0B8h+var_48]
movups xmmword ptr [rax], xmm0
call _ggml_init
mov rdi, [rsp+0B8h+var_98]
mov [rdi+48h], rax
add rdi, 0B8h
call _ZNKSt10unique_ptrI18ggml_backend_sched26ggml_backend_sched_deleterE3getEv; std::unique_ptr<ggml_backend_sched,ggml_backend_sched_deleter>::get(void)
mov rdi, rax
call _ggml_backend_sched_reset
mov rax, [rsp+0B8h+var_98]
mov rdi, [rax+48h]
movsxd rsi, dword ptr [rax+68h]
xor edx, edx
call _ggml_new_graph_custom
mov rcx, rax
mov rax, [rsp+0B8h+var_98]
mov [rax+40h], rcx
mov rdx, [rax+40h]
mov rsi, [rax+48h]
lea rdi, [rsp+0B8h+var_70]
mov [rsp+0B8h+var_88], rdi
call _ZN9ggml_easy3ctx11build_utilsC2EP12ggml_contextP11ggml_cgraph; ggml_easy::ctx::build_utils::build_utils(ggml_context *,ggml_cgraph *)
mov rax, [rsp+0B8h+var_98]
mov rdi, [rsp+0B8h+var_90]
mov rcx, [rsp+0B8h+var_88]
mov rdx, [rax+40h]
mov rsi, [rax+48h]
call _ZNKSt8functionIFvP12ggml_contextP11ggml_cgraphRN9ggml_easy3ctx11build_utilsEEEclES1_S3_S7_; std::function<void ()(ggml_context *,ggml_cgraph *,ggml_easy::ctx::build_utils &)>::operator()(ggml_context *,ggml_cgraph *,ggml_easy::ctx::build_utils &)
jmp short $+2
loc_BCB2:
mov rdi, [rsp+0B8h+var_98]
add rdi, 0B8h
call _ZNKSt10unique_ptrI18ggml_backend_sched26ggml_backend_sched_deleterE3getEv; std::unique_ptr<ggml_backend_sched,ggml_backend_sched_deleter>::get(void)
mov rdi, rax
mov rax, [rsp+0B8h+var_98]
mov rsi, [rax+40h]
call _ggml_backend_sched_alloc_graph
jmp short $+2
loc_BCD6:
mov rdi, [rsp+0B8h+var_98]
lea rsi, [rsp+0B8h+var_70]
add rsi, 10h
add rdi, 0D8h
call _ZNSt6vectorIN9ggml_easy3ctx14printed_tensorESaIS2_EEaSEOS4_; std::vector<ggml_easy::ctx::printed_tensor>::operator=(std::vector<ggml_easy::ctx::printed_tensor>&&)
lea rdi, [rsp+0B8h+var_70]; this
call _ZN9ggml_easy3ctx11build_utilsD2Ev; ggml_easy::ctx::build_utils::~build_utils()
add rsp, 0B8h
retn
mov rcx, rax
mov eax, edx
mov [rsp+arg_38], rcx
mov [rsp+arg_34], eax
lea rdi, [rsp+arg_40]; this
call _ZN9ggml_easy3ctx11build_utilsD2Ev; ggml_easy::ctx::build_utils::~build_utils()
mov rdi, [rsp+arg_38]
call __Unwind_Resume
|
void ggml_easy::ctx::build_graph(long long a1, long long a2)
{
long long v2; // rdx
long long v3; // rax
long long v4; // rax
_BYTE v5[16]; // [rsp+48h] [rbp-70h] BYREF
_BYTE v6[40]; // [rsp+58h] [rbp-60h] BYREF
long long v7; // [rsp+80h] [rbp-38h]
__int128 v8; // [rsp+90h] [rbp-28h]
long long v9; // [rsp+A0h] [rbp-18h]
long long v10; // [rsp+A8h] [rbp-10h]
long long v11; // [rsp+B0h] [rbp-8h]
v11 = a1;
v10 = a2;
ggml_free(*(_QWORD *)(a1 + 72));
*(_QWORD *)&v8 = std::vector<unsigned char>::size();
*((_QWORD *)&v8 + 1) = std::vector<unsigned char>::data(a1 + 80);
LOBYTE(v9) = 1;
v7 = v9;
*(_OWORD *)&v6[24] = v8;
*(_QWORD *)(a1 + 72) = ggml_init(a1 + 80, a2, v2);
v3 = std::unique_ptr<ggml_backend_sched,ggml_backend_sched_deleter>::get(a1 + 184);
ggml_backend_sched_reset(v3);
*(_QWORD *)(a1 + 64) = ggml_new_graph_custom(*(_QWORD *)(a1 + 72), *(int *)(a1 + 104), 0LL);
ggml_easy::ctx::build_utils::build_utils(v5, *(_QWORD *)(a1 + 72), *(_QWORD *)(a1 + 64));
std::function<void ()(ggml_context *,ggml_cgraph *,ggml_easy::ctx::build_utils &)>::operator()(
a2,
*(_QWORD *)(a1 + 72),
*(_QWORD *)(a1 + 64),
v5);
v4 = std::unique_ptr<ggml_backend_sched,ggml_backend_sched_deleter>::get(a1 + 184);
ggml_backend_sched_alloc_graph(v4, *(_QWORD *)(a1 + 64));
std::vector<ggml_easy::ctx::printed_tensor>::operator=(a1 + 216, v6);
ggml_easy::ctx::build_utils::~build_utils((ggml_easy::ctx::build_utils *)v5);
}
|
build_graph:
SUB RSP,0xb8
MOV qword ptr [RSP + 0x28],RSI
MOV qword ptr [RSP + 0xb0],RDI
MOV qword ptr [RSP + 0xa8],RSI
MOV RAX,qword ptr [RSP + 0xb0]
MOV qword ptr [RSP + 0x20],RAX
MOV RDI,qword ptr [RAX + 0x48]
CALL 0x001080c0
MOV RDI,qword ptr [RSP + 0x20]
ADD RDI,0x50
MOV qword ptr [RSP + 0x18],RDI
CALL 0x0010ef80
MOV RDI,qword ptr [RSP + 0x18]
MOV qword ptr [RSP + 0x90],RAX
CALL 0x0010c340
MOV qword ptr [RSP + 0x98],RAX
MOV byte ptr [RSP + 0xa0],0x1
MOV RAX,qword ptr [RSP + 0xa0]
MOV qword ptr [RSP + 0x80],RAX
MOVUPS XMM0,xmmword ptr [RSP + 0x90]
MOVAPS xmmword ptr [RSP + 0x70],XMM0
MOV RCX,qword ptr [RSP + 0x80]
MOV RAX,RSP
MOV qword ptr [RAX + 0x10],RCX
MOVAPS XMM0,xmmword ptr [RSP + 0x70]
MOVUPS xmmword ptr [RAX],XMM0
CALL 0x00108330
MOV RDI,qword ptr [RSP + 0x20]
MOV qword ptr [RDI + 0x48],RAX
ADD RDI,0xb8
CALL 0x00110730
MOV RDI,RAX
CALL 0x00108280
MOV RAX,qword ptr [RSP + 0x20]
MOV RDI,qword ptr [RAX + 0x48]
MOVSXD RSI,dword ptr [RAX + 0x68]
XOR EDX,EDX
CALL 0x00108600
MOV RCX,RAX
MOV RAX,qword ptr [RSP + 0x20]
MOV qword ptr [RAX + 0x40],RCX
MOV RDX,qword ptr [RAX + 0x40]
MOV RSI,qword ptr [RAX + 0x48]
LEA RDI,[RSP + 0x48]
MOV qword ptr [RSP + 0x30],RDI
CALL 0x00110760
MOV RAX,qword ptr [RSP + 0x20]
MOV RDI,qword ptr [RSP + 0x28]
MOV RCX,qword ptr [RSP + 0x30]
MOV RDX,qword ptr [RAX + 0x40]
MOV RSI,qword ptr [RAX + 0x48]
LAB_0010bcab:
CALL 0x001107a0
JMP 0x0010bcb2
LAB_0010bcb2:
MOV RDI,qword ptr [RSP + 0x20]
ADD RDI,0xb8
CALL 0x00110730
MOV RDI,RAX
MOV RAX,qword ptr [RSP + 0x20]
MOV RSI,qword ptr [RAX + 0x40]
CALL 0x001080f0
LAB_0010bcd4:
JMP 0x0010bcd6
LAB_0010bcd6:
MOV RDI,qword ptr [RSP + 0x20]
LEA RSI,[RSP + 0x48]
ADD RSI,0x10
ADD RDI,0xd8
CALL 0x001107f0
LEA RDI,[RSP + 0x48]
CALL 0x00110830
ADD RSP,0xb8
RET
|
/* ggml_easy::ctx::build_graph(std::function<void (ggml_context*, ggml_cgraph*,
ggml_easy::ctx::build_utils&)>) */
void __thiscall
ggml_easy::ctx::build_graph
(ctx *this,
function<void(ggml_context*,ggml_cgraph*,ggml_easy::ctx::build_utils&)> *param_2)
{
int8 uVar1;
build_utils local_70 [16];
vector avStack_60 [24];
int8 local_48;
int8 uStack_40;
int8 local_38;
int8 local_28;
int8 uStack_20;
int1 local_18;
int7 uStack_17;
function<void(ggml_context*,ggml_cgraph*,ggml_easy::ctx::build_utils&)> *local_10;
ctx *local_8;
local_10 = param_2;
local_8 = this;
ggml_free(*(int8 *)(this + 0x48));
local_28 = std::vector<unsigned_char,std::allocator<unsigned_char>>::size
((vector<unsigned_char,std::allocator<unsigned_char>> *)(this + 0x50));
uStack_40 = std::vector<unsigned_char,std::allocator<unsigned_char>>::data
((vector<unsigned_char,std::allocator<unsigned_char>> *)(this + 0x50));
local_18 = 1;
local_38 = CONCAT71(uStack_17,1);
local_48 = local_28;
uStack_20 = uStack_40;
uVar1 = ggml_init();
*(int8 *)(this + 0x48) = uVar1;
uVar1 = std::unique_ptr<ggml_backend_sched,ggml_backend_sched_deleter>::get
((unique_ptr<ggml_backend_sched,ggml_backend_sched_deleter> *)(this + 0xb8));
ggml_backend_sched_reset(uVar1);
uVar1 = ggml_new_graph_custom(*(int8 *)(this + 0x48),(long)*(int *)(this + 0x68),0);
*(int8 *)(this + 0x40) = uVar1;
build_utils::build_utils(local_70,*(ggml_context **)(this + 0x48),*(ggml_cgraph **)(this + 0x40));
/* try { // try from 0010bcab to 0010bcd3 has its CatchHandler @ 0010bd02 */
std::function<void(ggml_context*,ggml_cgraph*,ggml_easy::ctx::build_utils&)>::operator()
(param_2,*(ggml_context **)(this + 0x48),*(ggml_cgraph **)(this + 0x40),local_70);
uVar1 = std::unique_ptr<ggml_backend_sched,ggml_backend_sched_deleter>::get
((unique_ptr<ggml_backend_sched,ggml_backend_sched_deleter> *)(this + 0xb8));
ggml_backend_sched_alloc_graph(uVar1,*(int8 *)(this + 0x40));
std::vector<ggml_easy::ctx::printed_tensor,std::allocator<ggml_easy::ctx::printed_tensor>>::
operator=((vector<ggml_easy::ctx::printed_tensor,std::allocator<ggml_easy::ctx::printed_tensor>> *
)(this + 0xd8),avStack_60);
build_utils::~build_utils(local_70);
return;
}
|
|
9,320 |
google::protobuf::internal::WireFormatLite::WriteSFixed64(int, long, google::protobuf::io::CodedOutputStream*)
|
aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/wire_format_lite.cc
|
void WireFormatLite::WriteSFixed64(int field_number, int64_t value,
io::CodedOutputStream* output) {
WriteTag(field_number, WIRETYPE_FIXED64, output);
WriteSFixed64NoTag(value, output);
}
|
O3
|
cpp
|
google::protobuf::internal::WireFormatLite::WriteSFixed64(int, long, google::protobuf::io::CodedOutputStream*):
pushq %rbp
pushq %r14
pushq %rbx
movq %rdx, %rbx
movq %rsi, %r14
movl %edi, %ebp
shll $0x3, %ebp
movq 0x40(%rdx), %rsi
cmpq %rsi, (%rdx)
jbe 0xa9924
movq %rsi, 0x40(%rbx)
movl %ebp, %eax
orb $0x1, %al
movb %al, (%rsi)
cmpl $0x7f, %ebp
ja 0xa98cf
incq %rsi
movq %rsi, %rax
jmp 0xa990b
movl %ebp, %eax
orb $-0x7f, %al
movb %al, (%rsi)
movl %ebp, %ecx
shrl $0x7, %ecx
movb %cl, 0x1(%rsi)
leaq 0x2(%rsi), %rax
cmpl $0x4000, %ebp # imm = 0x4000
jb 0xa990b
movb 0x1(%rsi), %sil
movl %ecx, %edx
orb $-0x80, %sil
movb %sil, -0x1(%rax)
shrl $0x7, %edx
movb %dl, (%rax)
incq %rax
movl %edx, %esi
cmpl $0x3fff, %ecx # imm = 0x3FFF
movl %edx, %ecx
ja 0xa98ef
movq %rax, 0x40(%rbx)
cmpq %rax, (%rbx)
jbe 0xa9931
movq %r14, (%rax)
addq $0x8, %rax
movq %rax, 0x40(%rbx)
popq %rbx
popq %r14
popq %rbp
retq
movq %rbx, %rdi
callq 0xf7ee
movq %rax, %rsi
jmp 0xa98b8
movq %rbx, %rdi
movq %rax, %rsi
callq 0xf7ee
jmp 0xa9914
|
_ZN6google8protobuf8internal14WireFormatLite13WriteSFixed64EilPNS0_2io17CodedOutputStreamE:
push rbp
push r14
push rbx
mov rbx, rdx
mov r14, rsi
mov ebp, edi
shl ebp, 3
mov rsi, [rdx+40h]; unsigned __int8 *
cmp [rdx], rsi
jbe short loc_A9924
loc_A98B8:
mov [rbx+40h], rsi
mov eax, ebp
or al, 1
mov [rsi], al
cmp ebp, 7Fh
ja short loc_A98CF
inc rsi
mov rax, rsi
jmp short loc_A990B
loc_A98CF:
mov eax, ebp
or al, 81h
mov [rsi], al
mov ecx, ebp
shr ecx, 7
mov [rsi+1], cl
lea rax, [rsi+2]
cmp ebp, 4000h
jb short loc_A990B
mov sil, [rsi+1]
mov edx, ecx
loc_A98EF:
or sil, 80h
mov [rax-1], sil
shr edx, 7
mov [rax], dl
inc rax
mov esi, edx
cmp ecx, 3FFFh
mov ecx, edx
ja short loc_A98EF
loc_A990B:
mov [rbx+40h], rax
cmp [rbx], rax
jbe short loc_A9931
loc_A9914:
mov [rax], r14
add rax, 8
mov [rbx+40h], rax
pop rbx
pop r14
pop rbp
retn
loc_A9924:
mov rdi, rbx; this
call _ZN6google8protobuf2io19EpsCopyOutputStream19EnsureSpaceFallbackEPh; google::protobuf::io::EpsCopyOutputStream::EnsureSpaceFallback(uchar *)
mov rsi, rax
jmp short loc_A98B8
loc_A9931:
mov rdi, rbx; this
mov rsi, rax; unsigned __int8 *
call _ZN6google8protobuf2io19EpsCopyOutputStream19EnsureSpaceFallbackEPh; google::protobuf::io::EpsCopyOutputStream::EnsureSpaceFallback(uchar *)
jmp short loc_A9914
|
unsigned __int8 * google::protobuf::internal::WireFormatLite::WriteSFixed64(
google::protobuf::internal::WireFormatLite *this,
long long a2,
google::protobuf::io::EpsCopyOutputStream *a3,
google::protobuf::io::CodedOutputStream *a4)
{
unsigned int v6; // ebp
unsigned __int8 *v7; // rsi
unsigned __int8 *v8; // rax
unsigned int v9; // ecx
unsigned __int8 v10; // si
unsigned int v11; // edx
bool v12; // cc
unsigned __int8 *result; // rax
v6 = 8 * (_DWORD)this;
v7 = (unsigned __int8 *)*((_QWORD *)a3 + 8);
if ( *(_QWORD *)a3 <= (unsigned long long)v7 )
v7 = (unsigned __int8 *)google::protobuf::io::EpsCopyOutputStream::EnsureSpaceFallback(a3, v7);
*((_QWORD *)a3 + 8) = v7;
*v7 = v6 | 1;
if ( v6 > 0x7F )
{
*v7 = v6 | 0x81;
v9 = v6 >> 7;
v7[1] = v6 >> 7;
v8 = v7 + 2;
if ( v6 >= 0x4000 )
{
v10 = v7[1];
v11 = v6 >> 7;
do
{
*(v8 - 1) = v10 | 0x80;
v11 >>= 7;
*v8++ = v11;
v10 = v11;
v12 = v9 <= 0x3FFF;
v9 = v11;
}
while ( !v12 );
}
}
else
{
v8 = v7 + 1;
}
*((_QWORD *)a3 + 8) = v8;
if ( *(_QWORD *)a3 <= (unsigned long long)v8 )
v8 = (unsigned __int8 *)google::protobuf::io::EpsCopyOutputStream::EnsureSpaceFallback(a3, v8);
*(_QWORD *)v8 = a2;
result = v8 + 8;
*((_QWORD *)a3 + 8) = result;
return result;
}
|
WriteSFixed64:
PUSH RBP
PUSH R14
PUSH RBX
MOV RBX,RDX
MOV R14,RSI
MOV EBP,EDI
SHL EBP,0x3
MOV RSI,qword ptr [RDX + 0x40]
CMP qword ptr [RDX],RSI
JBE 0x001a9924
LAB_001a98b8:
MOV qword ptr [RBX + 0x40],RSI
MOV EAX,EBP
OR AL,0x1
MOV byte ptr [RSI],AL
CMP EBP,0x7f
JA 0x001a98cf
INC RSI
MOV RAX,RSI
JMP 0x001a990b
LAB_001a98cf:
MOV EAX,EBP
OR AL,0x81
MOV byte ptr [RSI],AL
MOV ECX,EBP
SHR ECX,0x7
MOV byte ptr [RSI + 0x1],CL
LEA RAX,[RSI + 0x2]
CMP EBP,0x4000
JC 0x001a990b
MOV SIL,byte ptr [RSI + 0x1]
MOV EDX,ECX
LAB_001a98ef:
OR SIL,0x80
MOV byte ptr [RAX + -0x1],SIL
SHR EDX,0x7
MOV byte ptr [RAX],DL
INC RAX
MOV ESI,EDX
CMP ECX,0x3fff
MOV ECX,EDX
JA 0x001a98ef
LAB_001a990b:
MOV qword ptr [RBX + 0x40],RAX
CMP qword ptr [RBX],RAX
JBE 0x001a9931
LAB_001a9914:
MOV qword ptr [RAX],R14
ADD RAX,0x8
MOV qword ptr [RBX + 0x40],RAX
POP RBX
POP R14
POP RBP
RET
LAB_001a9924:
MOV RDI,RBX
CALL 0x0010f7ee
MOV RSI,RAX
JMP 0x001a98b8
LAB_001a9931:
MOV RDI,RBX
MOV RSI,RAX
CALL 0x0010f7ee
JMP 0x001a9914
|
/* google::protobuf::internal::WireFormatLite::WriteSFixed64(int, long,
google::protobuf::io::CodedOutputStream*) */
void google::protobuf::internal::WireFormatLite::WriteSFixed64
(int param_1,long param_2,CodedOutputStream *param_3)
{
bool bVar1;
byte *pbVar2;
uint uVar3;
uint uVar4;
byte *pbVar5;
uVar4 = param_1 << 3;
pbVar2 = *(byte **)(param_3 + 0x40);
if (*(byte **)param_3 <= pbVar2) {
pbVar2 = (byte *)io::EpsCopyOutputStream::EnsureSpaceFallback
((EpsCopyOutputStream *)param_3,pbVar2);
}
*(byte **)(param_3 + 0x40) = pbVar2;
*pbVar2 = (byte)uVar4 | 1;
if (uVar4 < 0x80) {
pbVar5 = pbVar2 + 1;
}
else {
*pbVar2 = (byte)uVar4 | 0x81;
pbVar2[1] = (byte)(uVar4 >> 7);
pbVar5 = pbVar2 + 2;
if (0x3fff < uVar4) {
uVar3 = (uint)pbVar2[1];
uVar4 = uVar4 >> 7;
do {
pbVar5[-1] = (byte)uVar3 | 0x80;
uVar3 = uVar4 >> 7;
*pbVar5 = (byte)uVar3;
pbVar5 = pbVar5 + 1;
bVar1 = 0x3fff < uVar4;
uVar4 = uVar3;
} while (bVar1);
}
}
*(byte **)(param_3 + 0x40) = pbVar5;
if (*(byte **)param_3 <= pbVar5) {
pbVar5 = (byte *)io::EpsCopyOutputStream::EnsureSpaceFallback
((EpsCopyOutputStream *)param_3,pbVar5);
}
*(long *)pbVar5 = param_2;
*(byte **)(param_3 + 0x40) = pbVar5 + 8;
return;
}
|
|
9,321 |
my_uca_alloc_contractions
|
eloqsql/strings/ctype-uca.c
|
static my_bool
my_uca_alloc_contractions(MY_CONTRACTIONS *contractions,
MY_CHARSET_LOADER *loader, size_t n)
{
size_t size= n * sizeof(MY_CONTRACTION);
if (!(contractions->item= (loader->once_alloc)(size)) ||
!(contractions->flags= (char *) (loader->once_alloc)(MY_UCA_CNT_FLAG_SIZE)))
return 1;
memset(contractions->item, 0, size);
memset(contractions->flags, 0, MY_UCA_CNT_FLAG_SIZE);
return 0;
}
|
O0
|
c
|
my_uca_alloc_contractions:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
imulq $0x58, -0x20(%rbp), %rax
movq %rax, -0x28(%rbp)
movq -0x18(%rbp), %rax
movq 0x80(%rax), %rax
movq -0x28(%rbp), %rdi
callq *%rax
movq -0x10(%rbp), %rcx
movq %rax, 0x8(%rcx)
cmpq $0x0, %rax
je 0x62039
movq -0x18(%rbp), %rax
movl $0x1000, %edi # imm = 0x1000
callq *0x80(%rax)
movq -0x10(%rbp), %rcx
movq %rax, 0x10(%rcx)
cmpq $0x0, %rax
jne 0x6203f
movb $0x1, -0x1(%rbp)
jmp 0x6206a
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rdi
movq -0x28(%rbp), %rdx
xorl %esi, %esi
callq 0x251c0
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rdi
xorl %esi, %esi
movl $0x1000, %edx # imm = 0x1000
callq 0x251c0
movb $0x0, -0x1(%rbp)
movb -0x1(%rbp), %al
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
|
my_uca_alloc_contractions:
push rbp
mov rbp, rsp
sub rsp, 30h
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov [rbp+var_20], rdx
imul rax, [rbp+var_20], 58h ; 'X'
mov [rbp+var_28], rax
mov rax, [rbp+var_18]
mov rax, [rax+80h]
mov rdi, [rbp+var_28]
call rax
mov rcx, [rbp+var_10]
mov [rcx+8], rax
cmp rax, 0
jz short loc_62039
mov rax, [rbp+var_18]
mov edi, 1000h
call qword ptr [rax+80h]
mov rcx, [rbp+var_10]
mov [rcx+10h], rax
cmp rax, 0
jnz short loc_6203F
loc_62039:
mov [rbp+var_1], 1
jmp short loc_6206A
loc_6203F:
mov rax, [rbp+var_10]
mov rdi, [rax+8]
mov rdx, [rbp+var_28]
xor esi, esi
call _memset
mov rax, [rbp+var_10]
mov rdi, [rax+10h]
xor esi, esi
mov edx, 1000h
call _memset
mov [rbp+var_1], 0
loc_6206A:
mov al, [rbp+var_1]
add rsp, 30h
pop rbp
retn
|
char my_uca_alloc_contractions(long long a1, long long a2, long long a3)
{
long long v3; // rax
long long v4; // rax
long long v6; // [rsp+8h] [rbp-28h]
v6 = 88 * a3;
v3 = (*(long long ( **)(long long))(a2 + 128))(88 * a3);
*(_QWORD *)(a1 + 8) = v3;
if ( !v3 )
return 1;
v4 = (*(long long ( **)(long long))(a2 + 128))(4096LL);
*(_QWORD *)(a1 + 16) = v4;
if ( !v4 )
return 1;
memset(*(_QWORD *)(a1 + 8), 0LL, v6);
memset(*(_QWORD *)(a1 + 16), 0LL, 4096LL);
return 0;
}
|
my_uca_alloc_contractions:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x30
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x18],RSI
MOV qword ptr [RBP + -0x20],RDX
IMUL RAX,qword ptr [RBP + -0x20],0x58
MOV qword ptr [RBP + -0x28],RAX
MOV RAX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RAX + 0x80]
MOV RDI,qword ptr [RBP + -0x28]
CALL RAX
MOV RCX,qword ptr [RBP + -0x10]
MOV qword ptr [RCX + 0x8],RAX
CMP RAX,0x0
JZ 0x00162039
MOV RAX,qword ptr [RBP + -0x18]
MOV EDI,0x1000
CALL qword ptr [RAX + 0x80]
MOV RCX,qword ptr [RBP + -0x10]
MOV qword ptr [RCX + 0x10],RAX
CMP RAX,0x0
JNZ 0x0016203f
LAB_00162039:
MOV byte ptr [RBP + -0x1],0x1
JMP 0x0016206a
LAB_0016203f:
MOV RAX,qword ptr [RBP + -0x10]
MOV RDI,qword ptr [RAX + 0x8]
MOV RDX,qword ptr [RBP + -0x28]
XOR ESI,ESI
CALL 0x001251c0
MOV RAX,qword ptr [RBP + -0x10]
MOV RDI,qword ptr [RAX + 0x10]
XOR ESI,ESI
MOV EDX,0x1000
CALL 0x001251c0
MOV byte ptr [RBP + -0x1],0x0
LAB_0016206a:
MOV AL,byte ptr [RBP + -0x1]
ADD RSP,0x30
POP RBP
RET
|
int1 my_uca_alloc_contractions(long param_1,long param_2,long param_3)
{
long lVar1;
lVar1 = (**(code **)(param_2 + 0x80))(param_3 * 0x58);
*(long *)(param_1 + 8) = lVar1;
if (lVar1 != 0) {
lVar1 = (**(code **)(param_2 + 0x80))(0x1000);
*(long *)(param_1 + 0x10) = lVar1;
if (lVar1 != 0) {
memset(*(void **)(param_1 + 8),0,param_3 * 0x58);
memset(*(void **)(param_1 + 0x10),0,0x1000);
return 0;
}
}
return 1;
}
|
|
9,322 |
my_charpos_utf16
|
eloqsql/strings/ctype-ucs2.c
|
static size_t
my_charpos_utf16(CHARSET_INFO *cs,
const char *b, const char *e, size_t pos)
{
const char *b0= b;
uint charlen;
for ( ; pos; b+= charlen, pos--)
{
if (!(charlen= my_ismbchar(cs, b, e)))
return (e + 2 - b0); /* Error, return pos outside the string */
}
return (size_t) (pos ? (e + 2 - b0) : (b - b0));
}
|
O0
|
c
|
my_charpos_utf16:
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 %rax, -0x30(%rbp)
cmpq $0x0, -0x28(%rbp)
je 0x91f65
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x20(%rbp), %rdx
callq 0x95600
movl %eax, -0x34(%rbp)
cmpl $0x0, %eax
jne 0x91f45
movq -0x20(%rbp), %rax
addq $0x2, %rax
movq -0x30(%rbp), %rcx
subq %rcx, %rax
movq %rax, -0x8(%rbp)
jmp 0x91f98
jmp 0x91f47
movl -0x34(%rbp), %ecx
movq -0x18(%rbp), %rax
movl %ecx, %ecx
addq %rcx, %rax
movq %rax, -0x18(%rbp)
movq -0x28(%rbp), %rax
addq $-0x1, %rax
movq %rax, -0x28(%rbp)
jmp 0x91f10
cmpq $0x0, -0x28(%rbp)
je 0x91f81
movq -0x20(%rbp), %rax
addq $0x2, %rax
movq -0x30(%rbp), %rcx
subq %rcx, %rax
movq %rax, -0x40(%rbp)
jmp 0x91f90
movq -0x18(%rbp), %rax
movq -0x30(%rbp), %rcx
subq %rcx, %rax
movq %rax, -0x40(%rbp)
movq -0x40(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
|
my_charpos_utf16:
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 [rbp+var_30], rax
loc_91F10:
cmp [rbp+var_28], 0
jz short loc_91F65
mov rdi, [rbp+var_10]
mov rsi, [rbp+var_18]
mov rdx, [rbp+var_20]
call my_ismbchar_1
mov [rbp+var_34], eax
cmp eax, 0
jnz short loc_91F45
mov rax, [rbp+var_20]
add rax, 2
mov rcx, [rbp+var_30]
sub rax, rcx
mov [rbp+var_8], rax
jmp short loc_91F98
loc_91F45:
jmp short $+2
loc_91F47:
mov ecx, [rbp+var_34]
mov rax, [rbp+var_18]
mov ecx, ecx
add rax, rcx
mov [rbp+var_18], rax
mov rax, [rbp+var_28]
add rax, 0FFFFFFFFFFFFFFFFh
mov [rbp+var_28], rax
jmp short loc_91F10
loc_91F65:
cmp [rbp+var_28], 0
jz short loc_91F81
mov rax, [rbp+var_20]
add rax, 2
mov rcx, [rbp+var_30]
sub rax, rcx
mov [rbp+var_40], rax
jmp short loc_91F90
loc_91F81:
mov rax, [rbp+var_18]
mov rcx, [rbp+var_30]
sub rax, rcx
mov [rbp+var_40], rax
loc_91F90:
mov rax, [rbp+var_40]
mov [rbp+var_8], rax
loc_91F98:
mov rax, [rbp+var_8]
add rsp, 40h
pop rbp
retn
|
long long my_charpos_utf16(long long a1, long long a2, long long a3, long long a4)
{
unsigned int v5; // [rsp+Ch] [rbp-34h]
long long v8; // [rsp+28h] [rbp-18h]
v8 = a2;
while ( a4 )
{
v5 = my_ismbchar_1(a1, v8, a3);
if ( !v5 )
return a3 + 2 - a2;
v8 += v5;
--a4;
}
return v8 - a2;
}
|
my_charpos_utf16:
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 qword ptr [RBP + -0x30],RAX
LAB_00191f10:
CMP qword ptr [RBP + -0x28],0x0
JZ 0x00191f65
MOV RDI,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RBP + -0x18]
MOV RDX,qword ptr [RBP + -0x20]
CALL 0x00195600
MOV dword ptr [RBP + -0x34],EAX
CMP EAX,0x0
JNZ 0x00191f45
MOV RAX,qword ptr [RBP + -0x20]
ADD RAX,0x2
MOV RCX,qword ptr [RBP + -0x30]
SUB RAX,RCX
MOV qword ptr [RBP + -0x8],RAX
JMP 0x00191f98
LAB_00191f45:
JMP 0x00191f47
LAB_00191f47:
MOV ECX,dword ptr [RBP + -0x34]
MOV RAX,qword ptr [RBP + -0x18]
MOV ECX,ECX
ADD RAX,RCX
MOV qword ptr [RBP + -0x18],RAX
MOV RAX,qword ptr [RBP + -0x28]
ADD RAX,-0x1
MOV qword ptr [RBP + -0x28],RAX
JMP 0x00191f10
LAB_00191f65:
CMP qword ptr [RBP + -0x28],0x0
JZ 0x00191f81
MOV RAX,qword ptr [RBP + -0x20]
ADD RAX,0x2
MOV RCX,qword ptr [RBP + -0x30]
SUB RAX,RCX
MOV qword ptr [RBP + -0x40],RAX
JMP 0x00191f90
LAB_00191f81:
MOV RAX,qword ptr [RBP + -0x18]
MOV RCX,qword ptr [RBP + -0x30]
SUB RAX,RCX
MOV qword ptr [RBP + -0x40],RAX
LAB_00191f90:
MOV RAX,qword ptr [RBP + -0x40]
MOV qword ptr [RBP + -0x8],RAX
LAB_00191f98:
MOV RAX,qword ptr [RBP + -0x8]
ADD RSP,0x40
POP RBP
RET
|
/* WARNING: Removing unreachable block (ram,0x00191f6c) */
long my_charpos_utf16(int8 param_1,long param_2,long param_3,long param_4)
{
uint uVar1;
long local_30;
long local_20;
local_30 = param_4;
local_20 = param_2;
while( true ) {
if (local_30 == 0) {
return local_20 - param_2;
}
uVar1 = my_ismbchar(param_1,local_20,param_3);
if (uVar1 == 0) break;
local_20 = local_20 + (ulong)uVar1;
local_30 = local_30 + -1;
}
return (param_3 + 2) - param_2;
}
|
|
9,323 |
my_hash_sort_simple
|
eloqsql/strings/ctype-simple.c
|
void my_hash_sort_simple(CHARSET_INFO *cs,
const uchar *key, size_t len,
ulong *nr1, ulong *nr2)
{
register const uchar *sort_order=cs->sort_order;
const uchar *end;
uint16 space_weight= sort_order[' '];
/*
Remove all trailing characters that are equal to space.
We have to do this to be able to compare 'A ' and 'A' as identical.
If the key is long enough, cut the trailing spaces (0x20) using an
optimized function implemented in skip_trailing_spaces().
"len > 16" is just some heuristic here.
Calling skip_triling_space() for short values is not desirable,
because its initialization block may be more expensive than the
performance gained.
*/
end= len > 16 ? skip_trailing_space(key, len) : key + len;
/*
We removed all trailing characters that are binary equal to space 0x20.
Now remove all trailing characters that have weights equal to space.
Some 8bit simple collations may have such characters:
- cp1250_general_ci 0xA0 NO-BREAK SPACE == 0x20 SPACE
- cp1251_ukrainian_ci 0x60 GRAVE ACCENT == 0x20 SPACE
- koi8u_general_ci 0x60 GRAVE ACCENT == 0x20 SPACE
*/
for ( ; key < end ; )
{
if (sort_order[*--end] != space_weight)
{
end++;
break;
}
}
my_hash_sort_simple_nopad(cs, key, end - key, nr1, nr2);
}
|
O3
|
c
|
my_hash_sort_simple:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
movq 0x58(%rdi), %rax
leaq (%rsi,%rdx), %rdi
cmpq $0x11, %rdx
jb 0x38761
cmpq $0x15, %rdx
jb 0x3874c
movq %rdi, %r10
andq $-0x4, %r10
cmpq %rsi, %r10
jbe 0x3874c
leaq 0x3(%rsi), %r9
andq $-0x4, %r9
movq %rdi, %rdx
movb -0x1(%rdi), %r11b
cmpq %r10, %rdi
jbe 0x387cc
leaq -0x1(%rdx), %rdi
cmpb $0x20, %r11b
je 0x38730
jmp 0x3874f
movq %rdi, %rdx
movq %rdx, %rdi
cmpq %rsi, %rdx
jbe 0x38761
leaq -0x1(%rdi), %rdx
cmpb $0x20, -0x1(%rdi)
je 0x3874f
movb 0x20(%rax), %r9b
movq %rdi, %r11
subq %rsi, %r11
movq %rdi, %rdx
movq %r11, %r10
cmpq %rsi, %rdi
jbe 0x38788
leaq -0x1(%rdx), %rdi
movzbl -0x1(%rdx), %ebx
leaq -0x1(%r10), %r11
cmpb %r9b, (%rax,%rbx)
je 0x3876b
movq (%rcx), %rdi
movq (%r8), %r9
testq %r10, %r10
jle 0x387c3
movl %edi, %r10d
andl $0x3f, %r10d
addq %r9, %r10
movzbl (%rsi), %r11d
movzbl (%rax,%r11), %r11d
imulq %r10, %r11
movq %rdi, %r10
shlq $0x8, %r10
addq %r11, %r10
xorq %r10, %rdi
addq $0x3, %r9
incq %rsi
cmpq %rdx, %rsi
jb 0x38793
movq %rdi, (%rcx)
movq %r9, (%r8)
popq %rbx
popq %rbp
retq
cmpb $0x20, %r11b
setne %dil
cmpq %r10, %r9
setae %r10b
orb %dil, %r10b
jne 0x3874f
movq %rdx, %rdi
movq %rdi, %rdx
cmpq %r9, %rdi
jbe 0x3874f
leaq -0x4(%rdx), %rdi
cmpl $0x20202020, -0x4(%rdx) # imm = 0x20202020
je 0x387e7
jmp 0x3874f
|
my_hash_sort_simple:
push rbp
mov rbp, rsp
push rbx
mov rax, [rdi+58h]
lea rdi, [rsi+rdx]
cmp rdx, 11h
jb short loc_38761
cmp rdx, 15h
jb short loc_3874C
mov r10, rdi
and r10, 0FFFFFFFFFFFFFFFCh
cmp r10, rsi
jbe short loc_3874C
lea r9, [rsi+3]
and r9, 0FFFFFFFFFFFFFFFCh
loc_38730:
mov rdx, rdi
mov r11b, [rdi-1]
cmp rdi, r10
jbe loc_387CC
lea rdi, [rdx-1]
cmp r11b, 20h ; ' '
jz short loc_38730
jmp short loc_3874F
loc_3874C:
mov rdx, rdi
loc_3874F:
mov rdi, rdx
cmp rdx, rsi
jbe short loc_38761
lea rdx, [rdi-1]
cmp byte ptr [rdi-1], 20h ; ' '
jz short loc_3874F
loc_38761:
mov r9b, [rax+20h]
mov r11, rdi
sub r11, rsi
loc_3876B:
mov rdx, rdi
mov r10, r11
cmp rdi, rsi
jbe short loc_38788
lea rdi, [rdx-1]
movzx ebx, byte ptr [rdx-1]
lea r11, [r10-1]
cmp [rax+rbx], r9b
jz short loc_3876B
loc_38788:
mov rdi, [rcx]
mov r9, [r8]
test r10, r10
jle short loc_387C3
loc_38793:
mov r10d, edi
and r10d, 3Fh
add r10, r9
movzx r11d, byte ptr [rsi]
movzx r11d, byte ptr [rax+r11]
imul r11, r10
mov r10, rdi
shl r10, 8
add r10, r11
xor rdi, r10
add r9, 3
inc rsi
cmp rsi, rdx
jb short loc_38793
loc_387C3:
mov [rcx], rdi
mov [r8], r9
pop rbx
pop rbp
retn
loc_387CC:
cmp r11b, 20h ; ' '
setnz dil
cmp r9, r10
setnb r10b
or r10b, dil
jnz loc_3874F
mov rdi, rdx
loc_387E7:
mov rdx, rdi
cmp rdi, r9
jbe loc_3874F
lea rdi, [rdx-4]
cmp dword ptr [rdx-4], 20202020h
jz short loc_387E7
jmp loc_3874F
|
long long my_hash_sort_simple(long long a1, unsigned __int8 *a2, unsigned long long a3, long long *a4, long long *a5)
{
long long result; // rax
unsigned long long v6; // rdi
unsigned long long v7; // r10
unsigned long long v8; // r9
unsigned __int8 *v9; // rdx
char v10; // r11
long long v11; // r11
unsigned long long v12; // rdx
long long v13; // r10
long long v14; // rdi
long long v15; // r9
result = *(_QWORD *)(a1 + 88);
v6 = (unsigned long long)&a2[a3];
if ( a3 >= 0x11 )
{
if ( a3 < 0x15 || (v7 = v6 & 0xFFFFFFFFFFFFFFFCLL, (v6 & 0xFFFFFFFFFFFFFFFCLL) <= (unsigned long long)a2) )
{
v9 = &a2[a3];
}
else
{
v8 = (unsigned long long)(a2 + 3) & 0xFFFFFFFFFFFFFFFCLL;
while ( 1 )
{
v9 = (unsigned __int8 *)v6;
v10 = *(_BYTE *)(v6 - 1);
if ( v6 <= v7 )
break;
--v6;
if ( v10 != 32 )
goto LABEL_9;
}
if ( v10 == 32 && v8 < v7 )
{
do
{
v9 = (unsigned __int8 *)v6;
if ( v6 <= v8 )
break;
v6 -= 4LL;
}
while ( *((_DWORD *)v9 - 1) == 538976288 );
}
}
do
{
LABEL_9:
v6 = (unsigned long long)v9;
if ( v9 <= a2 )
break;
--v9;
}
while ( *(_BYTE *)(v6 - 1) == 32 );
}
v11 = v6 - (_QWORD)a2;
do
{
v12 = v6;
v13 = v11;
if ( v6 <= (unsigned long long)a2 )
break;
--v6;
--v11;
}
while ( *(_BYTE *)(result + *(unsigned __int8 *)(v12 - 1)) == *(_BYTE *)(result + 32) );
v14 = *a4;
v15 = *a5;
if ( v13 > 0 )
{
do
{
v14 ^= (v15 + (v14 & 0x3F)) * *(unsigned __int8 *)(result + *a2) + (v14 << 8);
v15 += 3LL;
++a2;
}
while ( (unsigned long long)a2 < v12 );
}
*a4 = v14;
*a5 = v15;
return result;
}
|
my_hash_sort_simple:
PUSH RBP
MOV RBP,RSP
PUSH RBX
MOV RAX,qword ptr [RDI + 0x58]
LEA RDI,[RSI + RDX*0x1]
CMP RDX,0x11
JC 0x00138761
CMP RDX,0x15
JC 0x0013874c
MOV R10,RDI
AND R10,-0x4
CMP R10,RSI
JBE 0x0013874c
LEA R9,[RSI + 0x3]
AND R9,-0x4
LAB_00138730:
MOV RDX,RDI
MOV R11B,byte ptr [RDI + -0x1]
CMP RDI,R10
JBE 0x001387cc
LEA RDI,[RDX + -0x1]
CMP R11B,0x20
JZ 0x00138730
JMP 0x0013874f
LAB_0013874c:
MOV RDX,RDI
LAB_0013874f:
MOV RDI,RDX
CMP RDX,RSI
JBE 0x00138761
LEA RDX,[RDI + -0x1]
CMP byte ptr [RDI + -0x1],0x20
JZ 0x0013874f
LAB_00138761:
MOV R9B,byte ptr [RAX + 0x20]
MOV R11,RDI
SUB R11,RSI
LAB_0013876b:
MOV RDX,RDI
MOV R10,R11
CMP RDI,RSI
JBE 0x00138788
LEA RDI,[RDX + -0x1]
MOVZX EBX,byte ptr [RDX + -0x1]
LEA R11,[R10 + -0x1]
CMP byte ptr [RAX + RBX*0x1],R9B
JZ 0x0013876b
LAB_00138788:
MOV RDI,qword ptr [RCX]
MOV R9,qword ptr [R8]
TEST R10,R10
JLE 0x001387c3
LAB_00138793:
MOV R10D,EDI
AND R10D,0x3f
ADD R10,R9
MOVZX R11D,byte ptr [RSI]
MOVZX R11D,byte ptr [RAX + R11*0x1]
IMUL R11,R10
MOV R10,RDI
SHL R10,0x8
ADD R10,R11
XOR RDI,R10
ADD R9,0x3
INC RSI
CMP RSI,RDX
JC 0x00138793
LAB_001387c3:
MOV qword ptr [RCX],RDI
MOV qword ptr [R8],R9
POP RBX
POP RBP
RET
LAB_001387cc:
CMP R11B,0x20
SETNZ DIL
CMP R9,R10
SETNC R10B
OR R10B,DIL
JNZ 0x0013874f
MOV RDI,RDX
LAB_001387e7:
MOV RDX,RDI
CMP RDI,R9
JBE 0x0013874f
LEA RDI,[RDX + -0x4]
CMP dword ptr [RDX + -0x4],0x20202020
JZ 0x001387e7
JMP 0x0013874f
|
void my_hash_sort_simple(long param_1,byte *param_2,ulong param_3,ulong *param_4,long *param_5)
{
byte *pbVar1;
long lVar2;
byte *pbVar3;
ulong uVar4;
byte *pbVar5;
long lVar6;
byte *pbVar7;
long lVar8;
lVar2 = *(long *)(param_1 + 0x58);
pbVar5 = param_2 + param_3;
if (param_3 < 0x11) goto LAB_00138761;
pbVar3 = pbVar5;
if ((0x14 < param_3) && (pbVar7 = (byte *)((ulong)pbVar5 & 0xfffffffffffffffc), param_2 < pbVar7))
{
do {
pbVar1 = pbVar5 + -1;
pbVar3 = pbVar5;
if (pbVar5 <= pbVar7) {
if ((byte *)((ulong)(param_2 + 3) & 0xfffffffffffffffc) < pbVar7 && *pbVar1 == 0x20)
goto LAB_001387e7;
break;
}
pbVar5 = pbVar5 + -1;
} while (*pbVar1 == 0x20);
}
goto LAB_0013874f;
while (pbVar7 = pbVar5 + -4, pbVar5 = pbVar5 + -4, *(int *)pbVar7 == 0x20202020) {
LAB_001387e7:
pbVar3 = pbVar5;
if (pbVar5 <= (byte *)((ulong)(param_2 + 3) & 0xfffffffffffffffc)) break;
}
LAB_0013874f:
do {
pbVar5 = pbVar3;
if (pbVar5 <= param_2) break;
pbVar3 = pbVar5 + -1;
} while (pbVar5[-1] == 0x20);
LAB_00138761:
lVar6 = (long)pbVar5 - (long)param_2;
do {
lVar8 = lVar6;
pbVar3 = pbVar5;
if (pbVar3 <= param_2) break;
pbVar5 = pbVar3 + -1;
lVar6 = lVar8 + -1;
} while (*(char *)(lVar2 + (ulong)pbVar3[-1]) == *(char *)(lVar2 + 0x20));
uVar4 = *param_4;
lVar6 = *param_5;
if (0 < lVar8) {
do {
uVar4 = uVar4 ^ uVar4 * 0x100 +
(ulong)*(byte *)(lVar2 + (ulong)*param_2) *
((ulong)((uint)uVar4 & 0x3f) + lVar6);
lVar6 = lVar6 + 3;
param_2 = param_2 + 1;
} while (param_2 < pbVar3);
}
*param_4 = uVar4;
*param_5 = lVar6;
return;
}
|
|
9,324 |
my_uca_charcmp
|
eloqsql/strings/ctype-uca.c
|
static int my_uca_charcmp(CHARSET_INFO *cs, my_wc_t wc1, my_wc_t wc2)
{
uint num_level= cs->levels_for_order;
int ret;
uint i;
for (i= 0; i != num_level; i++)
{
ret= my_uca_charcmp_onelevel(cs, wc1, wc2, i);
if (ret) {
return ret;
}
}
return 0;
}
|
O0
|
c
|
my_uca_charcmp:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq -0x10(%rbp), %rax
movzbl 0xb2(%rax), %eax
movl %eax, -0x24(%rbp)
movl $0x0, -0x2c(%rbp)
movl -0x2c(%rbp), %eax
cmpl -0x24(%rbp), %eax
je 0x4d243
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x20(%rbp), %rdx
movl -0x2c(%rbp), %ecx
callq 0x4d260
movl %eax, -0x28(%rbp)
cmpl $0x0, -0x28(%rbp)
je 0x4d236
movl -0x28(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0x4d24a
jmp 0x4d238
movl -0x2c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x2c(%rbp)
jmp 0x4d209
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
|
my_uca_charcmp:
push rbp
mov rbp, rsp
sub rsp, 30h
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov [rbp+var_20], rdx
mov rax, [rbp+var_10]
movzx eax, byte ptr [rax+0B2h]
mov [rbp+var_24], eax
mov [rbp+var_2C], 0
loc_4D209:
mov eax, [rbp+var_2C]
cmp eax, [rbp+var_24]
jz short loc_4D243
mov rdi, [rbp+var_10]
mov rsi, [rbp+var_18]
mov rdx, [rbp+var_20]
mov ecx, [rbp+var_2C]
call my_uca_charcmp_onelevel
mov [rbp+var_28], eax
cmp [rbp+var_28], 0
jz short loc_4D236
mov eax, [rbp+var_28]
mov [rbp+var_4], eax
jmp short loc_4D24A
loc_4D236:
jmp short $+2
loc_4D238:
mov eax, [rbp+var_2C]
add eax, 1
mov [rbp+var_2C], eax
jmp short loc_4D209
loc_4D243:
mov [rbp+var_4], 0
loc_4D24A:
mov eax, [rbp+var_4]
add rsp, 30h
pop rbp
retn
|
long long my_uca_charcmp(long long a1, long long a2, long long a3)
{
unsigned int i; // [rsp+4h] [rbp-2Ch]
unsigned int v5; // [rsp+8h] [rbp-28h]
int v6; // [rsp+Ch] [rbp-24h]
v6 = *(unsigned __int8 *)(a1 + 178);
for ( i = 0; i != v6; ++i )
{
v5 = my_uca_charcmp_onelevel(a1, a2, a3, i);
if ( v5 )
return v5;
}
return 0;
}
|
my_uca_charcmp:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x30
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x18],RSI
MOV qword ptr [RBP + -0x20],RDX
MOV RAX,qword ptr [RBP + -0x10]
MOVZX EAX,byte ptr [RAX + 0xb2]
MOV dword ptr [RBP + -0x24],EAX
MOV dword ptr [RBP + -0x2c],0x0
LAB_0014d209:
MOV EAX,dword ptr [RBP + -0x2c]
CMP EAX,dword ptr [RBP + -0x24]
JZ 0x0014d243
MOV RDI,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RBP + -0x18]
MOV RDX,qword ptr [RBP + -0x20]
MOV ECX,dword ptr [RBP + -0x2c]
CALL 0x0014d260
MOV dword ptr [RBP + -0x28],EAX
CMP dword ptr [RBP + -0x28],0x0
JZ 0x0014d236
MOV EAX,dword ptr [RBP + -0x28]
MOV dword ptr [RBP + -0x4],EAX
JMP 0x0014d24a
LAB_0014d236:
JMP 0x0014d238
LAB_0014d238:
MOV EAX,dword ptr [RBP + -0x2c]
ADD EAX,0x1
MOV dword ptr [RBP + -0x2c],EAX
JMP 0x0014d209
LAB_0014d243:
MOV dword ptr [RBP + -0x4],0x0
LAB_0014d24a:
MOV EAX,dword ptr [RBP + -0x4]
ADD RSP,0x30
POP RBP
RET
|
int my_uca_charcmp(long param_1,int8 param_2,int8 param_3)
{
byte bVar1;
int iVar2;
uint local_34;
bVar1 = *(byte *)(param_1 + 0xb2);
local_34 = 0;
while( true ) {
if (local_34 == bVar1) {
return 0;
}
iVar2 = my_uca_charcmp_onelevel(param_1,param_2,param_3,local_34);
if (iVar2 != 0) break;
local_34 = local_34 + 1;
}
return iVar2;
}
|
|
9,325 |
ma_read_rnd_static_record
|
eloqsql/storage/maria/ma_statrec.c
|
int _ma_read_rnd_static_record(MARIA_HA *info, uchar *buf,
MARIA_RECORD_POS filepos,
my_bool skip_deleted_blocks)
{
int locked,error,cache_read;
uint cache_length;
MARIA_SHARE *share= info->s;
DBUG_ENTER("_ma_read_rnd_static_record");
cache_read=0;
cache_length=0;
if (info->opt_flag & READ_CACHE_USED)
{ /* Cache in use */
if (filepos == my_b_tell(&info->rec_cache) &&
(skip_deleted_blocks || !filepos))
{
cache_read=1; /* Read record using cache */
cache_length= (uint) (info->rec_cache.read_end -
info->rec_cache.read_pos);
}
else
info->rec_cache.seek_not_done=1; /* Filepos is changed */
}
locked=0;
if (info->lock_type == F_UNLCK)
{
if (filepos >= info->state->data_file_length)
{ /* Test if new records */
if (_ma_readinfo(info,F_RDLCK,0))
DBUG_RETURN(my_errno);
locked=1;
}
else
{ /* We don't nead new info */
#ifndef UNSAFE_LOCKING
if ((! cache_read || share->base.reclength > cache_length) &&
share->tot_locks == 0)
{ /* record not in cache */
locked=1;
}
#else
info->tmp_lock_type=F_RDLCK;
#endif
}
}
if (filepos >= info->state->data_file_length)
{
DBUG_PRINT("test",("filepos: %ld (%ld) records: %ld del: %ld",
(long) filepos/share->base.reclength, (long) filepos,
(long) info->state->records, (long) info->state->del));
fast_ma_writeinfo(info);
DBUG_RETURN(my_errno=HA_ERR_END_OF_FILE);
}
info->cur_row.lastpos= filepos;
info->cur_row.nextpos= filepos+share->base.pack_reclength;
if (! cache_read) /* No cacheing */
{
error= _ma_read_static_record(info, buf, filepos);
DBUG_RETURN(error);
}
/* Read record with cacheing */
error=my_b_read(&info->rec_cache, buf, share->base.reclength);
if (info->s->base.pack_reclength != info->s->base.reclength && !error)
{
uchar tmp[8]; /* Skill fill bytes */
error=my_b_read(&info->rec_cache, tmp,
info->s->base.pack_reclength - info->s->base.reclength);
}
if (locked)
_ma_writeinfo(info,0); /* Unlock keyfile */
if (!error)
{
if (!buf[0])
{ /* Record is removed */
DBUG_RETURN(my_errno=HA_ERR_RECORD_DELETED);
}
/* Found and may be updated */
info->update|= HA_STATE_AKTIV | HA_STATE_KEY_CHANGED;
DBUG_RETURN(0);
}
/* my_errno should be set if rec_cache.error == -1 */
if (info->rec_cache.error != -1 || my_errno == 0)
_ma_set_fatal_error(info, HA_ERR_WRONG_IN_RECORD);
DBUG_RETURN(my_errno); /* Something wrong (EOF?) */
}
|
O0
|
c
|
ma_read_rnd_static_record:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movb %cl, %al
movq %fs:0x28, %rcx
movq %rcx, -0x8(%rbp)
movq %rdi, -0x20(%rbp)
movq %rsi, -0x28(%rbp)
movq %rdx, -0x30(%rbp)
movb %al, -0x31(%rbp)
movq -0x20(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x50(%rbp)
movl $0x0, -0x40(%rbp)
movl $0x0, -0x44(%rbp)
movq -0x20(%rbp), %rax
movl 0x61c(%rax), %eax
andl $0x2, %eax
cmpl $0x0, %eax
je 0x9b42a
movq -0x30(%rbp), %rax
movq %rax, -0x58(%rbp)
movq -0x20(%rbp), %rdi
addq $0x4b8, %rdi # imm = 0x4B8
callq 0x9b670
movq %rax, %rcx
movq -0x58(%rbp), %rax
cmpq %rcx, %rax
jne 0x9b41a
movsbl -0x31(%rbp), %eax
cmpl $0x0, %eax
jne 0x9b3f5
cmpq $0x0, -0x30(%rbp)
jne 0x9b41a
movl $0x1, -0x40(%rbp)
movq -0x20(%rbp), %rax
movq 0x4d0(%rax), %rax
movq -0x20(%rbp), %rcx
movq 0x4c8(%rcx), %rcx
subq %rcx, %rax
movl %eax, -0x44(%rbp)
jmp 0x9b428
movq -0x20(%rbp), %rax
movl $0x1, 0x598(%rax)
jmp 0x9b42a
movl $0x0, -0x38(%rbp)
movq -0x20(%rbp), %rax
cmpl $0x2, 0x664(%rax)
jne 0x9b4ad
movq -0x30(%rbp), %rax
movq -0x20(%rbp), %rcx
movq 0x20(%rcx), %rcx
cmpq 0x28(%rcx), %rax
jb 0x9b47c
movq -0x20(%rbp), %rdi
xorl %edx, %edx
movl %edx, %esi
callq 0x47100
cmpl $0x0, %eax
je 0x9b473
jmp 0x9b464
callq 0xfc1b0
movl (%rax), %eax
movl %eax, -0x14(%rbp)
jmp 0x9b644
movl $0x1, -0x38(%rbp)
jmp 0x9b4ab
cmpl $0x0, -0x40(%rbp)
je 0x9b495
movq -0x50(%rbp), %rax
movq 0x398(%rax), %rax
movl -0x44(%rbp), %ecx
cmpq %rcx, %rax
jbe 0x9b4a9
movq -0x50(%rbp), %rax
cmpl $0x0, 0x7b8(%rax)
jne 0x9b4a9
movl $0x1, -0x38(%rbp)
jmp 0x9b4ab
jmp 0x9b4ad
movq -0x30(%rbp), %rax
movq -0x20(%rbp), %rcx
movq 0x20(%rcx), %rcx
cmpq 0x28(%rcx), %rax
jb 0x9b4f7
jmp 0x9b4c1
jmp 0x9b4c3
movq -0x20(%rbp), %rax
movq (%rax), %rax
cmpl $0x0, 0x7b8(%rax)
jne 0x9b4de
movq -0x20(%rbp), %rdi
xorl %esi, %esi
callq 0x47120
jmp 0x9b4e0
callq 0xfc1b0
movl $0x89, (%rax)
movl $0x89, -0x14(%rbp)
jmp 0x9b644
movq -0x30(%rbp), %rcx
movq -0x20(%rbp), %rax
movq %rcx, 0x98(%rax)
movq -0x30(%rbp), %rcx
movq -0x50(%rbp), %rax
addq 0x3a0(%rax), %rcx
movq -0x20(%rbp), %rax
movq %rcx, 0xa0(%rax)
cmpl $0x0, -0x40(%rbp)
jne 0x9b545
movq -0x20(%rbp), %rdi
movq -0x28(%rbp), %rsi
movq -0x30(%rbp), %rdx
callq 0x9b230
movl %eax, -0x3c(%rbp)
movl -0x3c(%rbp), %eax
movl %eax, -0x14(%rbp)
jmp 0x9b644
movq -0x20(%rbp), %rdi
addq $0x4b8, %rdi # imm = 0x4B8
movq -0x28(%rbp), %rsi
movq -0x50(%rbp), %rax
movq 0x398(%rax), %rdx
callq 0x9b6d0
movl %eax, -0x3c(%rbp)
movq -0x20(%rbp), %rax
movq (%rax), %rax
movq 0x3a0(%rax), %rax
movq -0x20(%rbp), %rcx
movq (%rcx), %rcx
cmpq 0x398(%rcx), %rax
je 0x9b5be
cmpl $0x0, -0x3c(%rbp)
jne 0x9b5be
movq -0x20(%rbp), %rdi
addq $0x4b8, %rdi # imm = 0x4B8
leaq -0x10(%rbp), %rsi
movq -0x20(%rbp), %rax
movq (%rax), %rax
movq 0x3a0(%rax), %rdx
movq -0x20(%rbp), %rax
movq (%rax), %rax
subq 0x398(%rax), %rdx
callq 0x9b6d0
movl %eax, -0x3c(%rbp)
cmpl $0x0, -0x38(%rbp)
je 0x9b5cf
movq -0x20(%rbp), %rdi
xorl %esi, %esi
callq 0x47120
cmpl $0x0, -0x3c(%rbp)
jne 0x9b613
movq -0x28(%rbp), %rax
cmpb $0x0, (%rax)
jne 0x9b5f4
jmp 0x9b5e0
callq 0xfc1b0
movl $0x86, (%rax)
movl $0x86, -0x14(%rbp)
jmp 0x9b644
movq -0x20(%rbp), %rax
movl 0x624(%rax), %ecx
orl $0x82, %ecx
movl %ecx, 0x624(%rax)
movl $0x0, -0x14(%rbp)
jmp 0x9b644
movq -0x20(%rbp), %rax
cmpl $-0x1, 0x59c(%rax)
jne 0x9b62a
callq 0xfc1b0
cmpl $0x0, (%rax)
jne 0x9b638
movq -0x20(%rbp), %rdi
movl $0x7f, %esi
callq 0x42200
jmp 0x9b63a
callq 0xfc1b0
movl (%rax), %eax
movl %eax, -0x14(%rbp)
movl -0x14(%rbp), %eax
movl %eax, -0x5c(%rbp)
movq %fs:0x28, %rax
movq -0x8(%rbp), %rcx
cmpq %rcx, %rax
jne 0x9b665
movl -0x5c(%rbp), %eax
addq $0x60, %rsp
popq %rbp
retq
callq 0x2a250
nopw (%rax,%rax)
|
_ma_read_rnd_static_record:
push rbp
mov rbp, rsp
sub rsp, 60h
mov al, cl
mov rcx, fs:28h
mov [rbp+var_8], rcx
mov [rbp+var_20], rdi
mov [rbp+var_28], rsi
mov [rbp+var_30], rdx
mov [rbp+var_31], al
mov rax, [rbp+var_20]
mov rax, [rax]
mov [rbp+var_50], rax
mov [rbp+var_40], 0
mov [rbp+var_44], 0
mov rax, [rbp+var_20]
mov eax, [rax+61Ch]
and eax, 2
cmp eax, 0
jz short loc_9B42A
mov rax, [rbp+var_30]
mov [rbp+var_58], rax
mov rdi, [rbp+var_20]
add rdi, 4B8h
call my_b_tell
mov rcx, rax
mov rax, [rbp+var_58]
cmp rax, rcx
jnz short loc_9B41A
movsx eax, [rbp+var_31]
cmp eax, 0
jnz short loc_9B3F5
cmp [rbp+var_30], 0
jnz short loc_9B41A
loc_9B3F5:
mov [rbp+var_40], 1
mov rax, [rbp+var_20]
mov rax, [rax+4D0h]
mov rcx, [rbp+var_20]
mov rcx, [rcx+4C8h]
sub rax, rcx
mov [rbp+var_44], eax
jmp short loc_9B428
loc_9B41A:
mov rax, [rbp+var_20]
mov dword ptr [rax+598h], 1
loc_9B428:
jmp short $+2
loc_9B42A:
mov [rbp+var_38], 0
mov rax, [rbp+var_20]
cmp dword ptr [rax+664h], 2
jnz short loc_9B4AD
mov rax, [rbp+var_30]
mov rcx, [rbp+var_20]
mov rcx, [rcx+20h]
cmp rax, [rcx+28h]
jb short loc_9B47C
mov rdi, [rbp+var_20]
xor edx, edx
mov esi, edx
call _ma_readinfo
cmp eax, 0
jz short loc_9B473
jmp short $+2
loc_9B464:
call _my_thread_var
mov eax, [rax]
mov [rbp+var_14], eax
jmp loc_9B644
loc_9B473:
mov [rbp+var_38], 1
jmp short loc_9B4AB
loc_9B47C:
cmp [rbp+var_40], 0
jz short loc_9B495
mov rax, [rbp+var_50]
mov rax, [rax+398h]
mov ecx, [rbp+var_44]
cmp rax, rcx
jbe short loc_9B4A9
loc_9B495:
mov rax, [rbp+var_50]
cmp dword ptr [rax+7B8h], 0
jnz short loc_9B4A9
mov [rbp+var_38], 1
loc_9B4A9:
jmp short $+2
loc_9B4AB:
jmp short $+2
loc_9B4AD:
mov rax, [rbp+var_30]
mov rcx, [rbp+var_20]
mov rcx, [rcx+20h]
cmp rax, [rcx+28h]
jb short loc_9B4F7
jmp short $+2
loc_9B4C1:
jmp short $+2
loc_9B4C3:
mov rax, [rbp+var_20]
mov rax, [rax]
cmp dword ptr [rax+7B8h], 0
jnz short loc_9B4DE
mov rdi, [rbp+var_20]
xor esi, esi
call _ma_writeinfo
loc_9B4DE:
jmp short $+2
loc_9B4E0:
call _my_thread_var
mov dword ptr [rax], 89h
mov [rbp+var_14], 89h
jmp loc_9B644
loc_9B4F7:
mov rcx, [rbp+var_30]
mov rax, [rbp+var_20]
mov [rax+98h], rcx
mov rcx, [rbp+var_30]
mov rax, [rbp+var_50]
add rcx, [rax+3A0h]
mov rax, [rbp+var_20]
mov [rax+0A0h], rcx
cmp [rbp+var_40], 0
jnz short loc_9B545
mov rdi, [rbp+var_20]
mov rsi, [rbp+var_28]
mov rdx, [rbp+var_30]
call _ma_read_static_record
mov [rbp+var_3C], eax
mov eax, [rbp+var_3C]
mov [rbp+var_14], eax
jmp loc_9B644
loc_9B545:
mov rdi, [rbp+var_20]
add rdi, 4B8h
mov rsi, [rbp+var_28]
mov rax, [rbp+var_50]
mov rdx, [rax+398h]
call my_b_read
mov [rbp+var_3C], eax
mov rax, [rbp+var_20]
mov rax, [rax]
mov rax, [rax+3A0h]
mov rcx, [rbp+var_20]
mov rcx, [rcx]
cmp rax, [rcx+398h]
jz short loc_9B5BE
cmp [rbp+var_3C], 0
jnz short loc_9B5BE
mov rdi, [rbp+var_20]
add rdi, 4B8h
lea rsi, [rbp+var_10]
mov rax, [rbp+var_20]
mov rax, [rax]
mov rdx, [rax+3A0h]
mov rax, [rbp+var_20]
mov rax, [rax]
sub rdx, [rax+398h]
call my_b_read
mov [rbp+var_3C], eax
loc_9B5BE:
cmp [rbp+var_38], 0
jz short loc_9B5CF
mov rdi, [rbp+var_20]
xor esi, esi
call _ma_writeinfo
loc_9B5CF:
cmp [rbp+var_3C], 0
jnz short loc_9B613
mov rax, [rbp+var_28]
cmp byte ptr [rax], 0
jnz short loc_9B5F4
jmp short $+2
loc_9B5E0:
call _my_thread_var
mov dword ptr [rax], 86h
mov [rbp+var_14], 86h
jmp short loc_9B644
loc_9B5F4:
mov rax, [rbp+var_20]
mov ecx, [rax+624h]
or ecx, 82h
mov [rax+624h], ecx
mov [rbp+var_14], 0
jmp short loc_9B644
loc_9B613:
mov rax, [rbp+var_20]
cmp dword ptr [rax+59Ch], 0FFFFFFFFh
jnz short loc_9B62A
call _my_thread_var
cmp dword ptr [rax], 0
jnz short loc_9B638
loc_9B62A:
mov rdi, [rbp+var_20]
mov esi, 7Fh
call _ma_set_fatal_error
loc_9B638:
jmp short $+2
loc_9B63A:
call _my_thread_var
mov eax, [rax]
mov [rbp+var_14], eax
loc_9B644:
mov eax, [rbp+var_14]
mov [rbp+var_5C], eax
mov rax, fs:28h
mov rcx, [rbp+var_8]
cmp rax, rcx
jnz short loc_9B665
mov eax, [rbp+var_5C]
add rsp, 60h
pop rbp
retn
loc_9B665:
call ___stack_chk_fail
|
long long ma_read_rnd_static_record(long long a1, const char *a2, unsigned long long a3, char a4)
{
long long v4; // rdi
const char *v5; // rsi
long long v6; // rdx
long long v7; // r8
int v8; // r9d
long long v9; // rcx
long long v11; // [rsp+10h] [rbp-50h]
unsigned int v12; // [rsp+1Ch] [rbp-44h]
int v13; // [rsp+20h] [rbp-40h]
int v14; // [rsp+24h] [rbp-3Ch]
int v15; // [rsp+28h] [rbp-38h]
const char *v18; // [rsp+38h] [rbp-28h]
long long v19; // [rsp+40h] [rbp-20h]
_BYTE v21[8]; // [rsp+50h] [rbp-10h] BYREF
unsigned long long v22; // [rsp+58h] [rbp-8h]
v22 = __readfsqword(0x28u);
v19 = a1;
v18 = a2;
v11 = *(_QWORD *)a1;
v13 = 0;
v12 = 0;
if ( (*(_DWORD *)(a1 + 1564) & 2) != 0 )
{
a1 += 1208LL;
if ( a3 == my_b_tell(v19 + 1208) && (a4 || !a3) )
{
v13 = 1;
v12 = *(_QWORD *)(v19 + 1232) - *(_QWORD *)(v19 + 1224);
}
else
{
*(_DWORD *)(v19 + 1432) = 1;
}
}
v15 = 0;
if ( *(_DWORD *)(v19 + 1636) == 2 )
{
if ( a3 < *(_QWORD *)(*(_QWORD *)(v19 + 32) + 40LL) )
{
if ( (!v13 || *(_QWORD *)(v11 + 920) > (unsigned long long)v12) && !*(_DWORD *)(v11 + 1976) )
v15 = 1;
}
else
{
a1 = v19;
a2 = 0LL;
if ( (unsigned int)ma_readinfo() )
return *(unsigned int *)my_thread_var(v19, 0LL);
v15 = 1;
}
}
if ( a3 < *(_QWORD *)(*(_QWORD *)(v19 + 32) + 40LL) )
{
*(_QWORD *)(v19 + 152) = a3;
*(_QWORD *)(v19 + 160) = *(_QWORD *)(v11 + 928) + a3;
if ( v13 )
{
v4 = v19 + 1208;
v5 = v18;
v14 = my_b_read(v19 + 1208, v18, *(_QWORD *)(v11 + 920));
v9 = *(_QWORD *)v19;
if ( *(_QWORD *)(*(_QWORD *)v19 + 928LL) != *(_QWORD *)(*(_QWORD *)v19 + 920LL) && !v14 )
{
v4 = v19 + 1208;
v5 = v21;
v14 = my_b_read(v19 + 1208, v21, *(_QWORD *)(*(_QWORD *)v19 + 928LL) - *(_QWORD *)(*(_QWORD *)v19 + 920LL));
}
if ( v15 )
{
v4 = v19;
v5 = 0LL;
ma_writeinfo((long long *)v19, 0);
}
if ( v14 )
{
if ( *(_DWORD *)(v19 + 1436) != -1 || !*(_DWORD *)my_thread_var(v4, v5) )
{
v4 = v19;
v5 = (_BYTE *)(&dword_7C + 3);
ma_set_fatal_error((_DWORD *)v19, 127, v6, v9, v7, v8);
}
return *(unsigned int *)my_thread_var(v4, v5);
}
else if ( *v18 )
{
*(_DWORD *)(v19 + 1572) |= 0x82u;
return 0;
}
else
{
*(_DWORD *)my_thread_var(v4, v5) = 134;
return 134;
}
}
else
{
return (unsigned int)ma_read_static_record(v19, v18, a3);
}
}
else
{
if ( !*(_DWORD *)(*(_QWORD *)v19 + 1976LL) )
{
a1 = v19;
a2 = 0LL;
ma_writeinfo((long long *)v19, 0);
}
*(_DWORD *)my_thread_var(a1, a2) = 137;
return 137;
}
}
|
_ma_read_rnd_static_record:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x60
MOV AL,CL
MOV RCX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x8],RCX
MOV qword ptr [RBP + -0x20],RDI
MOV qword ptr [RBP + -0x28],RSI
MOV qword ptr [RBP + -0x30],RDX
MOV byte ptr [RBP + -0x31],AL
MOV RAX,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x50],RAX
MOV dword ptr [RBP + -0x40],0x0
MOV dword ptr [RBP + -0x44],0x0
MOV RAX,qword ptr [RBP + -0x20]
MOV EAX,dword ptr [RAX + 0x61c]
AND EAX,0x2
CMP EAX,0x0
JZ 0x0019b42a
MOV RAX,qword ptr [RBP + -0x30]
MOV qword ptr [RBP + -0x58],RAX
MOV RDI,qword ptr [RBP + -0x20]
ADD RDI,0x4b8
CALL 0x0019b670
MOV RCX,RAX
MOV RAX,qword ptr [RBP + -0x58]
CMP RAX,RCX
JNZ 0x0019b41a
MOVSX EAX,byte ptr [RBP + -0x31]
CMP EAX,0x0
JNZ 0x0019b3f5
CMP qword ptr [RBP + -0x30],0x0
JNZ 0x0019b41a
LAB_0019b3f5:
MOV dword ptr [RBP + -0x40],0x1
MOV RAX,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RAX + 0x4d0]
MOV RCX,qword ptr [RBP + -0x20]
MOV RCX,qword ptr [RCX + 0x4c8]
SUB RAX,RCX
MOV dword ptr [RBP + -0x44],EAX
JMP 0x0019b428
LAB_0019b41a:
MOV RAX,qword ptr [RBP + -0x20]
MOV dword ptr [RAX + 0x598],0x1
LAB_0019b428:
JMP 0x0019b42a
LAB_0019b42a:
MOV dword ptr [RBP + -0x38],0x0
MOV RAX,qword ptr [RBP + -0x20]
CMP dword ptr [RAX + 0x664],0x2
JNZ 0x0019b4ad
MOV RAX,qword ptr [RBP + -0x30]
MOV RCX,qword ptr [RBP + -0x20]
MOV RCX,qword ptr [RCX + 0x20]
CMP RAX,qword ptr [RCX + 0x28]
JC 0x0019b47c
MOV RDI,qword ptr [RBP + -0x20]
XOR EDX,EDX
MOV ESI,EDX
CALL 0x00147100
CMP EAX,0x0
JZ 0x0019b473
JMP 0x0019b464
LAB_0019b464:
CALL 0x001fc1b0
MOV EAX,dword ptr [RAX]
MOV dword ptr [RBP + -0x14],EAX
JMP 0x0019b644
LAB_0019b473:
MOV dword ptr [RBP + -0x38],0x1
JMP 0x0019b4ab
LAB_0019b47c:
CMP dword ptr [RBP + -0x40],0x0
JZ 0x0019b495
MOV RAX,qword ptr [RBP + -0x50]
MOV RAX,qword ptr [RAX + 0x398]
MOV ECX,dword ptr [RBP + -0x44]
CMP RAX,RCX
JBE 0x0019b4a9
LAB_0019b495:
MOV RAX,qword ptr [RBP + -0x50]
CMP dword ptr [RAX + 0x7b8],0x0
JNZ 0x0019b4a9
MOV dword ptr [RBP + -0x38],0x1
LAB_0019b4a9:
JMP 0x0019b4ab
LAB_0019b4ab:
JMP 0x0019b4ad
LAB_0019b4ad:
MOV RAX,qword ptr [RBP + -0x30]
MOV RCX,qword ptr [RBP + -0x20]
MOV RCX,qword ptr [RCX + 0x20]
CMP RAX,qword ptr [RCX + 0x28]
JC 0x0019b4f7
JMP 0x0019b4c1
LAB_0019b4c1:
JMP 0x0019b4c3
LAB_0019b4c3:
MOV RAX,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RAX]
CMP dword ptr [RAX + 0x7b8],0x0
JNZ 0x0019b4de
MOV RDI,qword ptr [RBP + -0x20]
XOR ESI,ESI
CALL 0x00147120
LAB_0019b4de:
JMP 0x0019b4e0
LAB_0019b4e0:
CALL 0x001fc1b0
MOV dword ptr [RAX],0x89
MOV dword ptr [RBP + -0x14],0x89
JMP 0x0019b644
LAB_0019b4f7:
MOV RCX,qword ptr [RBP + -0x30]
MOV RAX,qword ptr [RBP + -0x20]
MOV qword ptr [RAX + 0x98],RCX
MOV RCX,qword ptr [RBP + -0x30]
MOV RAX,qword ptr [RBP + -0x50]
ADD RCX,qword ptr [RAX + 0x3a0]
MOV RAX,qword ptr [RBP + -0x20]
MOV qword ptr [RAX + 0xa0],RCX
CMP dword ptr [RBP + -0x40],0x0
JNZ 0x0019b545
MOV RDI,qword ptr [RBP + -0x20]
MOV RSI,qword ptr [RBP + -0x28]
MOV RDX,qword ptr [RBP + -0x30]
CALL 0x0019b230
MOV dword ptr [RBP + -0x3c],EAX
MOV EAX,dword ptr [RBP + -0x3c]
MOV dword ptr [RBP + -0x14],EAX
JMP 0x0019b644
LAB_0019b545:
MOV RDI,qword ptr [RBP + -0x20]
ADD RDI,0x4b8
MOV RSI,qword ptr [RBP + -0x28]
MOV RAX,qword ptr [RBP + -0x50]
MOV RDX,qword ptr [RAX + 0x398]
CALL 0x0019b6d0
MOV dword ptr [RBP + -0x3c],EAX
MOV RAX,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RAX]
MOV RAX,qword ptr [RAX + 0x3a0]
MOV RCX,qword ptr [RBP + -0x20]
MOV RCX,qword ptr [RCX]
CMP RAX,qword ptr [RCX + 0x398]
JZ 0x0019b5be
CMP dword ptr [RBP + -0x3c],0x0
JNZ 0x0019b5be
MOV RDI,qword ptr [RBP + -0x20]
ADD RDI,0x4b8
LEA RSI,[RBP + -0x10]
MOV RAX,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RAX]
MOV RDX,qword ptr [RAX + 0x3a0]
MOV RAX,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RAX]
SUB RDX,qword ptr [RAX + 0x398]
CALL 0x0019b6d0
MOV dword ptr [RBP + -0x3c],EAX
LAB_0019b5be:
CMP dword ptr [RBP + -0x38],0x0
JZ 0x0019b5cf
MOV RDI,qword ptr [RBP + -0x20]
XOR ESI,ESI
CALL 0x00147120
LAB_0019b5cf:
CMP dword ptr [RBP + -0x3c],0x0
JNZ 0x0019b613
MOV RAX,qword ptr [RBP + -0x28]
CMP byte ptr [RAX],0x0
JNZ 0x0019b5f4
JMP 0x0019b5e0
LAB_0019b5e0:
CALL 0x001fc1b0
MOV dword ptr [RAX],0x86
MOV dword ptr [RBP + -0x14],0x86
JMP 0x0019b644
LAB_0019b5f4:
MOV RAX,qword ptr [RBP + -0x20]
MOV ECX,dword ptr [RAX + 0x624]
OR ECX,0x82
MOV dword ptr [RAX + 0x624],ECX
MOV dword ptr [RBP + -0x14],0x0
JMP 0x0019b644
LAB_0019b613:
MOV RAX,qword ptr [RBP + -0x20]
CMP dword ptr [RAX + 0x59c],-0x1
JNZ 0x0019b62a
CALL 0x001fc1b0
CMP dword ptr [RAX],0x0
JNZ 0x0019b638
LAB_0019b62a:
MOV RDI,qword ptr [RBP + -0x20]
MOV ESI,0x7f
CALL 0x00142200
LAB_0019b638:
JMP 0x0019b63a
LAB_0019b63a:
CALL 0x001fc1b0
MOV EAX,dword ptr [RAX]
MOV dword ptr [RBP + -0x14],EAX
LAB_0019b644:
MOV EAX,dword ptr [RBP + -0x14]
MOV dword ptr [RBP + -0x5c],EAX
MOV RAX,qword ptr FS:[0x28]
MOV RCX,qword ptr [RBP + -0x8]
CMP RAX,RCX
JNZ 0x0019b665
MOV EAX,dword ptr [RBP + -0x5c]
ADD RSP,0x60
POP RBP
RET
LAB_0019b665:
CALL 0x0012a250
|
int4 _ma_read_rnd_static_record(long *param_1,char *param_2,ulong param_3,char param_4)
{
long lVar1;
bool bVar2;
bool bVar3;
int iVar4;
ulong uVar5;
int4 *puVar6;
int *piVar7;
long in_FS_OFFSET;
uint local_4c;
int local_44;
int4 local_1c;
int1 local_18 [8];
long local_10;
local_10 = *(long *)(in_FS_OFFSET + 0x28);
lVar1 = *param_1;
bVar3 = false;
local_4c = 0;
if ((*(uint *)((long)param_1 + 0x61c) & 2) != 0) {
uVar5 = my_b_tell(param_1 + 0x97);
if ((param_3 == uVar5) && ((param_4 != '\0' || (param_3 == 0)))) {
bVar3 = true;
local_4c = (int)param_1[0x9a] - (int)param_1[0x99];
}
else {
*(int4 *)(param_1 + 0xb3) = 1;
}
}
bVar2 = false;
if (*(int *)((long)param_1 + 0x664) == 2) {
if (param_3 < *(ulong *)(param_1[4] + 0x28)) {
if (((!bVar3) || ((ulong)local_4c < *(ulong *)(lVar1 + 0x398))) &&
(*(int *)(lVar1 + 0x7b8) == 0)) {
bVar2 = true;
}
}
else {
iVar4 = _ma_readinfo(param_1,0);
if (iVar4 != 0) {
puVar6 = (int4 *)_my_thread_var();
local_1c = *puVar6;
goto LAB_0019b644;
}
bVar2 = true;
}
}
if (param_3 < *(ulong *)(param_1[4] + 0x28)) {
param_1[0x13] = param_3;
param_1[0x14] = param_3 + *(long *)(lVar1 + 0x3a0);
if (bVar3) {
local_44 = my_b_read(param_1 + 0x97,param_2,*(int8 *)(lVar1 + 0x398));
if ((*(long *)(*param_1 + 0x3a0) != *(long *)(*param_1 + 0x398)) && (local_44 == 0)) {
local_44 = my_b_read(param_1 + 0x97,local_18,
*(long *)(*param_1 + 0x3a0) - *(long *)(*param_1 + 0x398));
}
if (bVar2) {
_ma_writeinfo(param_1,0);
}
if (local_44 == 0) {
if (*param_2 == '\0') {
puVar6 = (int4 *)_my_thread_var();
*puVar6 = 0x86;
local_1c = 0x86;
}
else {
*(uint *)((long)param_1 + 0x624) = *(uint *)((long)param_1 + 0x624) | 0x82;
local_1c = 0;
}
}
else {
if ((*(int *)((long)param_1 + 0x59c) != -1) ||
(piVar7 = (int *)_my_thread_var(), *piVar7 == 0)) {
_ma_set_fatal_error(param_1,0x7f);
}
puVar6 = (int4 *)_my_thread_var();
local_1c = *puVar6;
}
}
else {
local_1c = _ma_read_static_record(param_1,param_2,param_3);
}
}
else {
if (*(int *)(*param_1 + 0x7b8) == 0) {
_ma_writeinfo(param_1,0);
}
puVar6 = (int4 *)_my_thread_var();
*puVar6 = 0x89;
local_1c = 0x89;
}
LAB_0019b644:
if (*(long *)(in_FS_OFFSET + 0x28) != local_10) {
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
return local_1c;
}
|
|
9,326 |
ma_read_rnd_static_record
|
eloqsql/storage/maria/ma_statrec.c
|
int _ma_read_rnd_static_record(MARIA_HA *info, uchar *buf,
MARIA_RECORD_POS filepos,
my_bool skip_deleted_blocks)
{
int locked,error,cache_read;
uint cache_length;
MARIA_SHARE *share= info->s;
DBUG_ENTER("_ma_read_rnd_static_record");
cache_read=0;
cache_length=0;
if (info->opt_flag & READ_CACHE_USED)
{ /* Cache in use */
if (filepos == my_b_tell(&info->rec_cache) &&
(skip_deleted_blocks || !filepos))
{
cache_read=1; /* Read record using cache */
cache_length= (uint) (info->rec_cache.read_end -
info->rec_cache.read_pos);
}
else
info->rec_cache.seek_not_done=1; /* Filepos is changed */
}
locked=0;
if (info->lock_type == F_UNLCK)
{
if (filepos >= info->state->data_file_length)
{ /* Test if new records */
if (_ma_readinfo(info,F_RDLCK,0))
DBUG_RETURN(my_errno);
locked=1;
}
else
{ /* We don't nead new info */
#ifndef UNSAFE_LOCKING
if ((! cache_read || share->base.reclength > cache_length) &&
share->tot_locks == 0)
{ /* record not in cache */
locked=1;
}
#else
info->tmp_lock_type=F_RDLCK;
#endif
}
}
if (filepos >= info->state->data_file_length)
{
DBUG_PRINT("test",("filepos: %ld (%ld) records: %ld del: %ld",
(long) filepos/share->base.reclength, (long) filepos,
(long) info->state->records, (long) info->state->del));
fast_ma_writeinfo(info);
DBUG_RETURN(my_errno=HA_ERR_END_OF_FILE);
}
info->cur_row.lastpos= filepos;
info->cur_row.nextpos= filepos+share->base.pack_reclength;
if (! cache_read) /* No cacheing */
{
error= _ma_read_static_record(info, buf, filepos);
DBUG_RETURN(error);
}
/* Read record with cacheing */
error=my_b_read(&info->rec_cache, buf, share->base.reclength);
if (info->s->base.pack_reclength != info->s->base.reclength && !error)
{
uchar tmp[8]; /* Skill fill bytes */
error=my_b_read(&info->rec_cache, tmp,
info->s->base.pack_reclength - info->s->base.reclength);
}
if (locked)
_ma_writeinfo(info,0); /* Unlock keyfile */
if (!error)
{
if (!buf[0])
{ /* Record is removed */
DBUG_RETURN(my_errno=HA_ERR_RECORD_DELETED);
}
/* Found and may be updated */
info->update|= HA_STATE_AKTIV | HA_STATE_KEY_CHANGED;
DBUG_RETURN(0);
}
/* my_errno should be set if rec_cache.error == -1 */
if (info->rec_cache.error != -1 || my_errno == 0)
_ma_set_fatal_error(info, HA_ERR_WRONG_IN_RECORD);
DBUG_RETURN(my_errno); /* Something wrong (EOF?) */
}
|
O3
|
c
|
ma_read_rnd_static_record:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdx, %r15
movq %rsi, %r8
movq %rdi, %rbx
movq %fs:0x28, %rax
movq %rax, -0x30(%rbp)
movb $0x1, %r13b
testb $0x2, 0x61c(%rdi)
je 0x71c47
leaq 0x4c8(%rbx), %rax
leaq 0x4f8(%rbx), %rdx
cmpl $0x2, 0x568(%rbx)
movq 0x4b8(%rbx), %rsi
cmoveq %rdx, %rax
subq 0x4e0(%rbx), %rsi
addq (%rax), %rsi
cmpq %r15, %rsi
jne 0x71c3d
testb %cl, %cl
sete %al
testq %r15, %r15
setne %cl
testb %al, %cl
je 0x71d54
movl $0x1, 0x598(%rbx)
xorl %eax, %eax
movb $0x1, %r12b
movq (%rbx), %r14
cmpl $0x2, 0x664(%rbx)
jne 0x71c9b
movq 0x20(%rbx), %rcx
cmpq %r15, 0x28(%rcx)
jbe 0x71c7e
testb %r12b, %r12b
jne 0x71c70
cmpq %rax, 0x398(%r14)
jbe 0x71c9b
cmpl $0x0, 0x7b8(%r14)
setne %r13b
jmp 0x71c9b
movq %r8, %r13
movq %rbx, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x4307e
testl %eax, %eax
jne 0x71e24
movq %r13, %r8
xorl %r13d, %r13d
movq 0x20(%rbx), %rax
cmpq %r15, 0x28(%rax)
jbe 0x71cf1
movq %r15, 0x98(%rbx)
movq 0x3a0(%r14), %rax
addq %r15, %rax
movq %rax, 0xa0(%rbx)
testb %r12b, %r12b
je 0x71d1c
movq %fs:0x28, %rax
cmpq -0x30(%rbp), %rax
jne 0x71e5b
movq %rbx, %rdi
movq %r8, %rsi
movq %r15, %rdx
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x71afa
movq (%rbx), %rax
cmpl $0x0, 0x7b8(%rax)
jne 0x71d07
movq %rbx, %rdi
xorl %esi, %esi
callq 0x43086
callq 0xa63fe
movl $0x89, (%rax)
movl $0x89, %eax
jmp 0x71e2b
leaq 0x4b8(%rbx), %r15
movq 0x398(%r14), %r12
movq 0x4c8(%rbx), %rsi
leaq (%rsi,%r12), %rax
cmpq 0x4d0(%rbx), %rax
jbe 0x71d68
movq %r15, %rdi
movq %r8, %r14
movq %r8, %rsi
movq %r12, %rdx
callq 0x976da
movl %eax, %r12d
jmp 0x71d80
movl 0x4d0(%rbx), %eax
subl 0x4c8(%rbx), %eax
xorl %r12d, %r12d
jmp 0x71c4c
movq %r8, %r14
movq %r8, %rdi
movq %r12, %rdx
callq 0x2a0a0
addq %r12, 0x4c8(%rbx)
xorl %r12d, %r12d
movq (%rbx), %rax
movq 0x3a0(%rax), %rdx
subq 0x398(%rax), %rdx
je 0x71ddd
testl %r12d, %r12d
jne 0x71ddd
movq %r14, -0x40(%rbp)
movq 0x4c8(%rbx), %rsi
leaq (%rsi,%rdx), %r14
cmpq 0x4d0(%rbx), %r14
jbe 0x71dc1
leaq -0x38(%rbp), %rsi
movq %r15, %rdi
callq 0x976da
movl %eax, %r12d
jmp 0x71dd9
leaq -0x38(%rbp), %rdi
movl $0x8, %ecx
callq 0x2a400
movq %r14, 0x4c8(%rbx)
xorl %r12d, %r12d
movq -0x40(%rbp), %r14
testb %r13b, %r13b
jne 0x71dec
movq %rbx, %rdi
xorl %esi, %esi
callq 0x43086
testl %r12d, %r12d
je 0x71e09
cmpl $-0x1, 0x59c(%rbx)
je 0x71e1a
movq %rbx, %rdi
movl $0x7f, %esi
callq 0x4056c
jmp 0x71e24
cmpb $0x0, (%r14)
je 0x71e49
orb $-0x7e, 0x624(%rbx)
xorl %eax, %eax
jmp 0x71e2b
callq 0xa63fe
cmpl $0x0, (%rax)
je 0x71dfa
callq 0xa63fe
movl (%rax), %eax
movq %fs:0x28, %rcx
cmpq -0x30(%rbp), %rcx
jne 0x71e5b
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0xa63fe
movl $0x86, (%rax)
movl $0x86, %eax
jmp 0x71e2b
callq 0x2a240
|
_ma_read_rnd_static_record:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 18h
mov r15, rdx
mov r8, rsi
mov rbx, rdi
mov rax, fs:28h
mov [rbp+var_30], rax
mov r13b, 1
test byte ptr [rdi+61Ch], 2
jz short loc_71C47
lea rax, [rbx+4C8h]
lea rdx, [rbx+4F8h]
cmp dword ptr [rbx+568h], 2
mov rsi, [rbx+4B8h]
cmovz rax, rdx
sub rsi, [rbx+4E0h]
add rsi, [rax]
cmp rsi, r15
jnz short loc_71C3D
test cl, cl
setz al
test r15, r15
setnz cl
test cl, al
jz loc_71D54
loc_71C3D:
mov dword ptr [rbx+598h], 1
loc_71C47:
xor eax, eax
mov r12b, 1
loc_71C4C:
mov r14, [rbx]
cmp dword ptr [rbx+664h], 2
jnz short loc_71C9B
mov rcx, [rbx+20h]
cmp [rcx+28h], r15
jbe short loc_71C7E
test r12b, r12b
jnz short loc_71C70
cmp [r14+398h], rax
jbe short loc_71C9B
loc_71C70:
cmp dword ptr [r14+7B8h], 0
setnz r13b
jmp short loc_71C9B
loc_71C7E:
mov r13, r8
mov rdi, rbx
xor esi, esi
xor edx, edx
call _ma_readinfo
test eax, eax
jnz loc_71E24
mov r8, r13
xor r13d, r13d
loc_71C9B:
mov rax, [rbx+20h]
cmp [rax+28h], r15
jbe short loc_71CF1
mov [rbx+98h], r15
mov rax, [r14+3A0h]
add rax, r15
mov [rbx+0A0h], rax
test r12b, r12b
jz short loc_71D1C
mov rax, fs:28h
cmp rax, [rbp+var_30]
jnz loc_71E5B
mov rdi, rbx
mov rsi, r8
mov rdx, r15
add rsp, 18h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
jmp _ma_read_static_record
loc_71CF1:
mov rax, [rbx]
cmp dword ptr [rax+7B8h], 0
jnz short loc_71D07
mov rdi, rbx
xor esi, esi
call _ma_writeinfo
loc_71D07:
call _my_thread_var
mov dword ptr [rax], 89h
mov eax, 89h
jmp loc_71E2B
loc_71D1C:
lea r15, [rbx+4B8h]
mov r12, [r14+398h]
mov rsi, [rbx+4C8h]
lea rax, [rsi+r12]
cmp rax, [rbx+4D0h]
jbe short loc_71D68
mov rdi, r15
mov r14, r8
mov rsi, r8
mov rdx, r12
call _my_b_read
mov r12d, eax
jmp short loc_71D80
loc_71D54:
mov eax, [rbx+4D0h]
sub eax, [rbx+4C8h]
xor r12d, r12d
jmp loc_71C4C
loc_71D68:
mov r14, r8
mov rdi, r8
mov rdx, r12
call _memcpy
add [rbx+4C8h], r12
xor r12d, r12d
loc_71D80:
mov rax, [rbx]
mov rdx, [rax+3A0h]
sub rdx, [rax+398h]
jz short loc_71DDD
test r12d, r12d
jnz short loc_71DDD
mov [rbp+var_40], r14
mov rsi, [rbx+4C8h]
lea r14, [rsi+rdx]
cmp r14, [rbx+4D0h]
jbe short loc_71DC1
lea rsi, [rbp+var_38]
mov rdi, r15
call _my_b_read
mov r12d, eax
jmp short loc_71DD9
loc_71DC1:
lea rdi, [rbp+var_38]
mov ecx, 8
call ___memcpy_chk
mov [rbx+4C8h], r14
xor r12d, r12d
loc_71DD9:
mov r14, [rbp+var_40]
loc_71DDD:
test r13b, r13b
jnz short loc_71DEC
mov rdi, rbx
xor esi, esi
call _ma_writeinfo
loc_71DEC:
test r12d, r12d
jz short loc_71E09
cmp dword ptr [rbx+59Ch], 0FFFFFFFFh
jz short loc_71E1A
loc_71DFA:
mov rdi, rbx
mov esi, 7Fh
call _ma_set_fatal_error
jmp short loc_71E24
loc_71E09:
cmp byte ptr [r14], 0
jz short loc_71E49
or byte ptr [rbx+624h], 82h
xor eax, eax
jmp short loc_71E2B
loc_71E1A:
call _my_thread_var
cmp dword ptr [rax], 0
jz short loc_71DFA
loc_71E24:
call _my_thread_var
mov eax, [rax]
loc_71E2B:
mov rcx, fs:28h
cmp rcx, [rbp+var_30]
jnz short loc_71E5B
add rsp, 18h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_71E49:
call _my_thread_var
mov dword ptr [rax], 86h
mov eax, 86h
jmp short loc_71E2B
loc_71E5B:
call ___stack_chk_fail
|
long long ma_read_rnd_static_record(char *a1, const char *a2, long long a3, long long a4)
{
unsigned long long v4; // r15
const char *v5; // r8
char *v6; // rbx
bool v7; // r13
_QWORD *v8; // rax
bool v9; // al
unsigned long long v10; // rax
char v11; // r12
long long v12; // r14
const char *v13; // r13
long long v15; // r12
const char *v16; // r14
long long v17; // rcx
long long v18; // r8
int v19; // r9d
int v20; // r12d
long long v21; // rdx
const char *v22; // r14
const char *v23; // [rsp+0h] [rbp-40h]
char v24[8]; // [rsp+8h] [rbp-38h] BYREF
unsigned long long v25; // [rsp+10h] [rbp-30h]
v4 = a3;
v5 = a2;
v6 = a1;
v25 = __readfsqword(0x28u);
v7 = 1;
if ( (a1[1564] & 2) == 0 )
goto LABEL_7;
v8 = a1 + 1224;
a3 = (long long)(a1 + 1272);
if ( *((_DWORD *)a1 + 346) == 2 )
v8 = a1 + 1272;
a2 = (const char *)(*v8 + *((_QWORD *)a1 + 151) - *((_QWORD *)a1 + 156));
if ( a2 != (const char *)v4 || (v9 = (_BYTE)a4 == 0, LOBYTE(a4) = v4 != 0, v9 && v4 != 0) )
{
*((_DWORD *)a1 + 358) = 1;
LABEL_7:
v10 = 0LL;
v11 = 1;
goto LABEL_8;
}
v10 = (unsigned int)(*((_DWORD *)a1 + 308) - *((_DWORD *)a1 + 306));
v11 = 0;
LABEL_8:
v12 = *(_QWORD *)a1;
if ( *((_DWORD *)a1 + 409) == 2 )
{
a4 = *((_QWORD *)a1 + 4);
if ( *(_QWORD *)(a4 + 40) <= v4 )
{
v13 = v5;
a2 = 0LL;
if ( (unsigned int)ma_readinfo() )
return *(unsigned int *)my_thread_var(a1, a2);
v5 = v13;
v7 = 0;
}
else if ( v11 || *(_QWORD *)(v12 + 920) > v10 )
{
v7 = *(_DWORD *)(v12 + 1976) != 0;
}
}
if ( *(_QWORD *)(*((_QWORD *)a1 + 4) + 40LL) <= v4 )
{
if ( !*(_DWORD *)(*(_QWORD *)a1 + 1976LL) )
{
a2 = 0LL;
ma_writeinfo((long long *)a1, 0LL, a3, a4, (long long)v5);
}
*(_DWORD *)my_thread_var(a1, a2, a3, a4, v5) = 137;
return 137LL;
}
else
{
*((_QWORD *)a1 + 19) = v4;
*((_QWORD *)a1 + 20) = v4 + *(_QWORD *)(v12 + 928);
if ( v11 )
return ma_read_static_record((long long)a1, v5, v4, a4, (long long)v5);
v15 = *(_QWORD *)(v12 + 920);
a2 = (const char *)*((_QWORD *)a1 + 153);
if ( (unsigned long long)&a2[v15] <= *((_QWORD *)a1 + 154) )
{
v16 = v5;
a1 = (char *)v5;
memcpy(v5, a2, v15);
*((_QWORD *)v6 + 153) += v15;
v20 = 0;
}
else
{
a1 += 1208;
v16 = v5;
a2 = v5;
v20 = my_b_read(a1, v5, v15);
}
v21 = *(_QWORD *)(*(_QWORD *)v6 + 928LL) - *(_QWORD *)(*(_QWORD *)v6 + 920LL);
if ( v21 && !v20 )
{
v23 = v16;
a2 = (const char *)*((_QWORD *)v6 + 153);
v22 = &a2[v21];
if ( (unsigned long long)&a2[v21] <= *((_QWORD *)v6 + 154) )
{
a1 = v24;
__memcpy_chk(v24, a2, v21, 8LL);
*((_QWORD *)v6 + 153) = v22;
v20 = 0;
}
else
{
a2 = v24;
a1 = v6 + 1208;
v20 = my_b_read(v6 + 1208, v24, v21);
}
v16 = v23;
}
if ( !v7 )
{
a1 = v6;
a2 = 0LL;
ma_writeinfo((long long *)v6, 0LL, v21, v17, v18);
}
if ( v20 )
{
if ( *((_DWORD *)v6 + 359) != -1 || !*(_DWORD *)my_thread_var(a1, a2) )
{
a1 = v6;
a2 = (_BYTE *)(&dword_7C + 3);
ma_set_fatal_error(v6, 127LL, v21, v17, v18, v19);
}
return *(unsigned int *)my_thread_var(a1, a2);
}
if ( *v16 )
{
v6[1572] |= 0x82u;
return 0LL;
}
else
{
*(_DWORD *)my_thread_var(a1, a2) = 134;
return 134LL;
}
}
}
|
_ma_read_rnd_static_record:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x18
MOV R15,RDX
MOV R8,RSI
MOV RBX,RDI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x30],RAX
MOV R13B,0x1
TEST byte ptr [RDI + 0x61c],0x2
JZ 0x00171c47
LEA RAX,[RBX + 0x4c8]
LEA RDX,[RBX + 0x4f8]
CMP dword ptr [RBX + 0x568],0x2
MOV RSI,qword ptr [RBX + 0x4b8]
CMOVZ RAX,RDX
SUB RSI,qword ptr [RBX + 0x4e0]
ADD RSI,qword ptr [RAX]
CMP RSI,R15
JNZ 0x00171c3d
TEST CL,CL
SETZ AL
TEST R15,R15
SETNZ CL
TEST CL,AL
JZ 0x00171d54
LAB_00171c3d:
MOV dword ptr [RBX + 0x598],0x1
LAB_00171c47:
XOR EAX,EAX
MOV R12B,0x1
LAB_00171c4c:
MOV R14,qword ptr [RBX]
CMP dword ptr [RBX + 0x664],0x2
JNZ 0x00171c9b
MOV RCX,qword ptr [RBX + 0x20]
CMP qword ptr [RCX + 0x28],R15
JBE 0x00171c7e
TEST R12B,R12B
JNZ 0x00171c70
CMP qword ptr [R14 + 0x398],RAX
JBE 0x00171c9b
LAB_00171c70:
CMP dword ptr [R14 + 0x7b8],0x0
SETNZ R13B
JMP 0x00171c9b
LAB_00171c7e:
MOV R13,R8
MOV RDI,RBX
XOR ESI,ESI
XOR EDX,EDX
CALL 0x0014307e
TEST EAX,EAX
JNZ 0x00171e24
MOV R8,R13
XOR R13D,R13D
LAB_00171c9b:
MOV RAX,qword ptr [RBX + 0x20]
CMP qword ptr [RAX + 0x28],R15
JBE 0x00171cf1
MOV qword ptr [RBX + 0x98],R15
MOV RAX,qword ptr [R14 + 0x3a0]
ADD RAX,R15
MOV qword ptr [RBX + 0xa0],RAX
TEST R12B,R12B
JZ 0x00171d1c
MOV RAX,qword ptr FS:[0x28]
CMP RAX,qword ptr [RBP + -0x30]
JNZ 0x00171e5b
MOV RDI,RBX
MOV RSI,R8
MOV RDX,R15
ADD RSP,0x18
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
JMP 0x00171afa
LAB_00171cf1:
MOV RAX,qword ptr [RBX]
CMP dword ptr [RAX + 0x7b8],0x0
JNZ 0x00171d07
MOV RDI,RBX
XOR ESI,ESI
CALL 0x00143086
LAB_00171d07:
CALL 0x001a63fe
MOV dword ptr [RAX],0x89
MOV EAX,0x89
JMP 0x00171e2b
LAB_00171d1c:
LEA R15,[RBX + 0x4b8]
MOV R12,qword ptr [R14 + 0x398]
MOV RSI,qword ptr [RBX + 0x4c8]
LEA RAX,[RSI + R12*0x1]
CMP RAX,qword ptr [RBX + 0x4d0]
JBE 0x00171d68
MOV RDI,R15
MOV R14,R8
MOV RSI,R8
MOV RDX,R12
CALL 0x001976da
MOV R12D,EAX
JMP 0x00171d80
LAB_00171d54:
MOV EAX,dword ptr [RBX + 0x4d0]
SUB EAX,dword ptr [RBX + 0x4c8]
XOR R12D,R12D
JMP 0x00171c4c
LAB_00171d68:
MOV R14,R8
MOV RDI,R8
MOV RDX,R12
CALL 0x0012a0a0
ADD qword ptr [RBX + 0x4c8],R12
XOR R12D,R12D
LAB_00171d80:
MOV RAX,qword ptr [RBX]
MOV RDX,qword ptr [RAX + 0x3a0]
SUB RDX,qword ptr [RAX + 0x398]
JZ 0x00171ddd
TEST R12D,R12D
JNZ 0x00171ddd
MOV qword ptr [RBP + -0x40],R14
MOV RSI,qword ptr [RBX + 0x4c8]
LEA R14,[RSI + RDX*0x1]
CMP R14,qword ptr [RBX + 0x4d0]
JBE 0x00171dc1
LEA RSI,[RBP + -0x38]
MOV RDI,R15
CALL 0x001976da
MOV R12D,EAX
JMP 0x00171dd9
LAB_00171dc1:
LEA RDI,[RBP + -0x38]
MOV ECX,0x8
CALL 0x0012a400
MOV qword ptr [RBX + 0x4c8],R14
XOR R12D,R12D
LAB_00171dd9:
MOV R14,qword ptr [RBP + -0x40]
LAB_00171ddd:
TEST R13B,R13B
JNZ 0x00171dec
MOV RDI,RBX
XOR ESI,ESI
CALL 0x00143086
LAB_00171dec:
TEST R12D,R12D
JZ 0x00171e09
CMP dword ptr [RBX + 0x59c],-0x1
JZ 0x00171e1a
LAB_00171dfa:
MOV RDI,RBX
MOV ESI,0x7f
CALL 0x0014056c
JMP 0x00171e24
LAB_00171e09:
CMP byte ptr [R14],0x0
JZ 0x00171e49
OR byte ptr [RBX + 0x624],0x82
XOR EAX,EAX
JMP 0x00171e2b
LAB_00171e1a:
CALL 0x001a63fe
CMP dword ptr [RAX],0x0
JZ 0x00171dfa
LAB_00171e24:
CALL 0x001a63fe
MOV EAX,dword ptr [RAX]
LAB_00171e2b:
MOV RCX,qword ptr FS:[0x28]
CMP RCX,qword ptr [RBP + -0x30]
JNZ 0x00171e5b
ADD RSP,0x18
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_00171e49:
CALL 0x001a63fe
MOV dword ptr [RAX],0x86
MOV EAX,0x86
JMP 0x00171e2b
LAB_00171e5b:
CALL 0x0012a240
|
ulong _ma_read_rnd_static_record(long *param_1,char *param_2,ulong param_3,char param_4)
{
size_t __n;
bool bVar1;
int iVar2;
long *plVar3;
ulong uVar4;
int *piVar5;
uint *puVar6;
int4 *puVar7;
long lVar8;
long in_FS_OFFSET;
bool bVar9;
int1 local_40 [8];
long local_38;
local_38 = *(long *)(in_FS_OFFSET + 0x28);
bVar9 = true;
if ((*(byte *)((long)param_1 + 0x61c) & 2) == 0) {
LAB_00171c47:
uVar4 = 0;
bVar1 = true;
}
else {
plVar3 = param_1 + 0x99;
if ((int)param_1[0xad] == 2) {
plVar3 = param_1 + 0x9f;
}
if (((param_1[0x97] - param_1[0x9c]) + *plVar3 != param_3) || (param_3 != 0 && param_4 == '\0'))
{
*(int4 *)(param_1 + 0xb3) = 1;
goto LAB_00171c47;
}
uVar4 = (ulong)(uint)((int)param_1[0x9a] - (int)param_1[0x99]);
bVar1 = false;
}
lVar8 = *param_1;
if (*(int *)((long)param_1 + 0x664) == 2) {
if (param_3 < *(ulong *)(param_1[4] + 0x28)) {
if ((bVar1) || (uVar4 < *(ulong *)(lVar8 + 0x398))) {
bVar9 = *(int *)(lVar8 + 0x7b8) != 0;
}
goto LAB_00171c9b;
}
iVar2 = _ma_readinfo(param_1,0,0);
if (iVar2 == 0) {
bVar9 = false;
goto LAB_00171c9b;
}
LAB_00171e24:
puVar6 = (uint *)_my_thread_var();
uVar4 = (ulong)*puVar6;
}
else {
LAB_00171c9b:
if (param_3 < *(ulong *)(param_1[4] + 0x28)) {
param_1[0x13] = param_3;
param_1[0x14] = *(long *)(lVar8 + 0x3a0) + param_3;
if (bVar1) {
if (*(long *)(in_FS_OFFSET + 0x28) == local_38) {
uVar4 = _ma_read_static_record(param_1,param_2,param_3);
return uVar4;
}
goto LAB_00171e5b;
}
__n = *(size_t *)(lVar8 + 0x398);
if ((ulong)param_1[0x9a] < param_1[0x99] + __n) {
iVar2 = _my_b_read(param_1 + 0x97,param_2,__n);
}
else {
memcpy(param_2,(void *)param_1[0x99],__n);
param_1[0x99] = param_1[0x99] + __n;
iVar2 = 0;
}
lVar8 = *(long *)(*param_1 + 0x3a0) - *(long *)(*param_1 + 0x398);
if ((lVar8 != 0) && (iVar2 == 0)) {
uVar4 = param_1[0x99] + lVar8;
if ((ulong)param_1[0x9a] < uVar4) {
iVar2 = _my_b_read(param_1 + 0x97,local_40);
}
else {
__memcpy_chk(local_40,param_1[0x99],lVar8,8);
param_1[0x99] = uVar4;
iVar2 = 0;
}
}
if (!bVar9) {
_ma_writeinfo(param_1,0);
}
if (iVar2 != 0) {
if ((*(int *)((long)param_1 + 0x59c) != -1) ||
(piVar5 = (int *)_my_thread_var(), *piVar5 == 0)) {
_ma_set_fatal_error(param_1,0x7f);
}
goto LAB_00171e24;
}
if (*param_2 == '\0') {
puVar7 = (int4 *)_my_thread_var();
*puVar7 = 0x86;
uVar4 = 0x86;
}
else {
*(byte *)((long)param_1 + 0x624) = *(byte *)((long)param_1 + 0x624) | 0x82;
uVar4 = 0;
}
}
else {
if (*(int *)(*param_1 + 0x7b8) == 0) {
_ma_writeinfo(param_1,0);
}
puVar7 = (int4 *)_my_thread_var();
*puVar7 = 0x89;
uVar4 = 0x89;
}
}
if (*(long *)(in_FS_OFFSET + 0x28) == local_38) {
return uVar4;
}
LAB_00171e5b:
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
|
|
9,327 |
my_strnxfrm_win1250ch
|
eloqsql/strings/ctype-win1250ch.c
|
static size_t
my_strnxfrm_win1250ch(CHARSET_INFO *cs __attribute__((unused)),
uchar *dest, size_t len,
uint nweights_arg __attribute__((unused)),
const uchar *src, size_t srclen, uint flags)
{
int value;
const uchar *p;
int pass = 0;
size_t totlen = 0;
p = src;
if (!(flags & 0x0F)) /* All levels by default */
flags|= 0x0F;
while (totlen < len)
{
NEXT_CMP_VALUE(src, p, pass, value, (int)srclen);
if (!value)
break;
if ((1 << pass) & flags)
dest[totlen++] = value;
}
if ((flags & MY_STRXFRM_PAD_TO_MAXLEN) && len > totlen)
{
memset(dest + totlen, 0x00, len - totlen);
totlen= len;
}
return totlen;
}
|
O3
|
c
|
my_strnxfrm_win1250ch:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %rdx, %rbx
movq %rsi, -0x50(%rbp)
movl 0x10(%rbp), %eax
movl %eax, %edx
orl $0xf, %edx
testb $0xf, %al
cmovnel %eax, %edx
xorl %r10d, %r10d
testq %rbx, %rbx
je 0x59fd8
movslq %r9d, %rdi
movl $0x1, %eax
subq %r8, %rax
movq %rax, -0x60(%rbp)
leaq 0x284e15(%rip), %r14 # 0x2dec90
leaq 0x29b69e(%rip), %r15 # 0x2f5520
xorl %eax, %eax
movq %r8, %r11
movq %rbx, -0x48(%rbp)
movq %r9, -0x40(%rbp)
movq %r8, -0x38(%rbp)
movl %edx, -0x2c(%rbp)
movq %r11, %rsi
subq %r8, %rsi
cmpq %rdi, %rsi
jge 0x59eb2
testl %r10d, %r10d
je 0x59f74
movl $0x9, %r12d
jmp 0x59ed3
testl %r9d, %r9d
jle 0x59fdc
testl %r10d, %r10d
jne 0x59fdc
movl $0x1, %r10d
movl $0x9, %r12d
movq %r8, %r11
movq %r14, %rsi
movzbl (%r11), %ecx
movb (%rsi,%rcx), %sil
cmpb $-0x1, %sil
jne 0x59fb4
movq %r12, -0x68(%rbp)
movq %r10, -0x58(%rbp)
movq %r11, %rdx
subq %r8, %rdx
movq -0x60(%rbp), %rcx
leaq (%rcx,%r11), %r13
xorl %r10d, %r10d
movq %r10, %rbx
shlq $0x4, %rbx
movq (%rbx,%r15), %rsi
movb (%rsi), %r9b
testb %r9b, %r9b
je 0x59f44
cmpq %rdi, %rdx
jge 0x59f44
incq %rsi
movq %r13, %r14
movq %r11, %r12
cmpb (%r12), %r9b
jne 0x59f4c
incq %r12
movb (%rsi), %r9b
testb %r9b, %r9b
je 0x59f47
leaq 0x1(%r14), %rcx
incq %rsi
cmpq %rdi, %r14
movq %rcx, %r14
jl 0x59f22
jmp 0x59f47
movq %r11, %r12
testb %r9b, %r9b
je 0x59f89
incq %r10
cmpq $0x50, %r10
jne 0x59f01
movb $-0x1, %sil
movq -0x48(%rbp), %rbx
movq -0x40(%rbp), %r9
movq -0x38(%rbp), %r8
movl -0x2c(%rbp), %edx
movq -0x58(%rbp), %r10
leaq 0x284d1e(%rip), %r14 # 0x2dec90
jmp 0x59fb9
xorl %r10d, %r10d
movl $0x8, %r12d
leaq 0x284c0c(%rip), %rsi # 0x2deb90
jmp 0x59ed6
addq %r15, %rbx
movq -0x68(%rbp), %rcx
movb (%rbx,%rcx), %sil
decq %r12
movq %r12, %r11
movq -0x48(%rbp), %rbx
movq -0x40(%rbp), %r9
movq -0x38(%rbp), %r8
movl -0x2c(%rbp), %edx
movq -0x58(%rbp), %r10
leaq 0x284cdc(%rip), %r14 # 0x2dec90
testb %sil, %sil
je 0x59fdc
btl %r10d, %edx
jae 0x59fca
movq -0x50(%rbp), %rcx
movb %sil, (%rcx,%rax)
incq %rax
incq %r11
cmpq %rbx, %rax
jb 0x59e96
jmp 0x59ff7
xorl %eax, %eax
jmp 0x59ff7
testb %dl, %dl
jns 0x59ff7
movq -0x50(%rbp), %rdi
addq %rax, %rdi
movq %rbx, %rdx
subq %rax, %rdx
xorl %esi, %esi
callq 0x24170
movq %rbx, %rax
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
|
my_strnxfrm_win1250ch:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 48h
mov rbx, rdx
mov [rbp+var_50], rsi
mov eax, [rbp+arg_0]
mov edx, eax
or edx, 0Fh
test al, 0Fh
cmovnz edx, eax
xor r10d, r10d
test rbx, rbx
jz loc_59FD8
movsxd rdi, r9d
mov eax, 1
sub rax, r8
mov [rbp+var_60], rax
lea r14, _sort_order_win1250ch2
lea r15, doubles_0
xor eax, eax
mov r11, r8
mov [rbp+var_48], rbx
mov [rbp+var_40], r9
mov [rbp+var_38], r8
mov [rbp+var_2C], edx
loc_59E96:
mov rsi, r11
sub rsi, r8
cmp rsi, rdi
jge short loc_59EB2
test r10d, r10d
jz loc_59F74
mov r12d, 9
jmp short loc_59ED3
loc_59EB2:
test r9d, r9d
jle loc_59FDC
test r10d, r10d
jnz loc_59FDC
mov r10d, 1
mov r12d, 9
mov r11, r8
loc_59ED3:
mov rsi, r14
loc_59ED6:
movzx ecx, byte ptr [r11]
mov sil, [rsi+rcx]
cmp sil, 0FFh
jnz loc_59FB4
mov [rbp+var_68], r12
mov [rbp+var_58], r10
mov rdx, r11
sub rdx, r8
mov rcx, [rbp+var_60]
lea r13, [rcx+r11]
xor r10d, r10d
loc_59F01:
mov rbx, r10
shl rbx, 4
mov rsi, [rbx+r15]
mov r9b, [rsi]
test r9b, r9b
jz short loc_59F44
cmp rdx, rdi
jge short loc_59F44
inc rsi
mov r14, r13
mov r12, r11
loc_59F22:
cmp r9b, [r12]
jnz short loc_59F4C
inc r12
mov r9b, [rsi]
test r9b, r9b
jz short loc_59F47
lea rcx, [r14+1]
inc rsi
cmp r14, rdi
mov r14, rcx
jl short loc_59F22
jmp short loc_59F47
loc_59F44:
mov r12, r11
loc_59F47:
test r9b, r9b
jz short loc_59F89
loc_59F4C:
inc r10
cmp r10, 50h ; 'P'
jnz short loc_59F01
mov sil, 0FFh
mov rbx, [rbp+var_48]
mov r9, [rbp+var_40]
mov r8, [rbp+var_38]
mov edx, [rbp+var_2C]
mov r10, [rbp+var_58]
lea r14, _sort_order_win1250ch2
jmp short loc_59FB9
loc_59F74:
xor r10d, r10d
mov r12d, 8
lea rsi, _sort_order_win1250ch1
jmp loc_59ED6
loc_59F89:
add rbx, r15
mov rcx, [rbp+var_68]
mov sil, [rbx+rcx]
dec r12
mov r11, r12
mov rbx, [rbp+var_48]
mov r9, [rbp+var_40]
mov r8, [rbp+var_38]
mov edx, [rbp+var_2C]
mov r10, [rbp+var_58]
lea r14, _sort_order_win1250ch2
loc_59FB4:
test sil, sil
jz short loc_59FDC
loc_59FB9:
bt edx, r10d
jnb short loc_59FCA
mov rcx, [rbp+var_50]
mov [rcx+rax], sil
inc rax
loc_59FCA:
inc r11
cmp rax, rbx
jb loc_59E96
jmp short loc_59FF7
loc_59FD8:
xor eax, eax
jmp short loc_59FF7
loc_59FDC:
test dl, dl
jns short loc_59FF7
mov rdi, [rbp+var_50]
add rdi, rax
mov rdx, rbx
sub rdx, rax
xor esi, esi
call _memset
mov rax, rbx
loc_59FF7:
add rsp, 48h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
|
unsigned long long my_strnxfrm_win1250ch(
long long a1,
long long a2,
unsigned long long a3,
long long a4,
unsigned __int8 *a5,
int a6,
int a7)
{
int v8; // edx
long long v9; // r10
long long v10; // rdi
unsigned long long result; // rax
unsigned __int8 *v12; // r11
long long v13; // r12
_BYTE *v14; // rsi
char v15; // si
long long v16; // r10
char *v17; // rsi
char v18; // r9
char *v19; // rsi
unsigned __int8 *v20; // r14
_BYTE *v21; // r12
long long v23; // [rsp+8h] [rbp-68h]
long long v24; // [rsp+10h] [rbp-60h]
long long v25; // [rsp+18h] [rbp-58h]
unsigned long long v27; // [rsp+28h] [rbp-48h]
int v28; // [rsp+30h] [rbp-40h]
unsigned __int8 *v29; // [rsp+38h] [rbp-38h]
int v30; // [rsp+44h] [rbp-2Ch]
v8 = a7 | 0xF;
if ( (a7 & 0xF) != 0 )
v8 = a7;
v9 = 0LL;
if ( !a3 )
return 0LL;
v10 = a6;
v24 = 1LL - (_QWORD)a5;
result = 0LL;
v12 = a5;
v27 = a3;
v28 = a6;
v29 = a5;
v30 = v8;
while ( 2 )
{
if ( v12 - a5 >= v10 )
{
if ( a6 <= 0 || (_DWORD)v9 )
break;
v9 = 1LL;
v13 = 9LL;
v12 = a5;
}
else
{
if ( !(_DWORD)v9 )
{
v9 = 0LL;
v13 = 8LL;
v14 = &sort_order_win1250ch1;
goto LABEL_12;
}
v13 = 9LL;
}
v14 = &sort_order_win1250ch2;
LABEL_12:
v15 = v14[*v12];
if ( v15 != -1 )
goto LABEL_27;
v23 = v13;
v25 = v9;
v16 = 0LL;
while ( 1 )
{
v17 = (char *)*(&doubles_0 + 2 * v16);
v18 = *v17;
if ( !*v17 || v12 - a5 >= v10 )
break;
v19 = v17 + 1;
v20 = &v12[v24];
v21 = v12;
while ( v18 == *v21 )
{
++v21;
v18 = *v19;
if ( *v19 )
{
++v19;
if ( (long long)v20++ < v10 )
continue;
}
goto LABEL_22;
}
LABEL_23:
if ( ++v16 == 80 )
{
v15 = -1;
a3 = v27;
a6 = v28;
a5 = v29;
v8 = v30;
v9 = v25;
goto LABEL_28;
}
}
v21 = v12;
LABEL_22:
if ( v18 )
goto LABEL_23;
v15 = *((_BYTE *)&doubles_0 + 16 * v16 + v23);
v12 = v21 - 1;
a3 = v27;
a6 = v28;
a5 = v29;
v8 = v30;
v9 = v25;
LABEL_27:
if ( v15 )
{
LABEL_28:
if ( _bittest(&v8, v9) )
*(_BYTE *)(a2 + result++) = v15;
++v12;
if ( result >= a3 )
return result;
continue;
}
break;
}
if ( (v8 & 0x80u) != 0 )
{
memset(result + a2, 0LL, a3 - result);
return a3;
}
return result;
}
|
my_strnxfrm_win1250ch:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x48
MOV RBX,RDX
MOV qword ptr [RBP + -0x50],RSI
MOV EAX,dword ptr [RBP + 0x10]
MOV EDX,EAX
OR EDX,0xf
TEST AL,0xf
CMOVNZ EDX,EAX
XOR R10D,R10D
TEST RBX,RBX
JZ 0x00159fd8
MOVSXD RDI,R9D
MOV EAX,0x1
SUB RAX,R8
MOV qword ptr [RBP + -0x60],RAX
LEA R14,[0x3dec90]
LEA R15,[0x3f5520]
XOR EAX,EAX
MOV R11,R8
MOV qword ptr [RBP + -0x48],RBX
MOV qword ptr [RBP + -0x40],R9
MOV qword ptr [RBP + -0x38],R8
MOV dword ptr [RBP + -0x2c],EDX
LAB_00159e96:
MOV RSI,R11
SUB RSI,R8
CMP RSI,RDI
JGE 0x00159eb2
TEST R10D,R10D
JZ 0x00159f74
MOV R12D,0x9
JMP 0x00159ed3
LAB_00159eb2:
TEST R9D,R9D
JLE 0x00159fdc
TEST R10D,R10D
JNZ 0x00159fdc
MOV R10D,0x1
MOV R12D,0x9
MOV R11,R8
LAB_00159ed3:
MOV RSI,R14
LAB_00159ed6:
MOVZX ECX,byte ptr [R11]
MOV SIL,byte ptr [RSI + RCX*0x1]
CMP SIL,0xff
JNZ 0x00159fb4
MOV qword ptr [RBP + -0x68],R12
MOV qword ptr [RBP + -0x58],R10
MOV RDX,R11
SUB RDX,R8
MOV RCX,qword ptr [RBP + -0x60]
LEA R13,[RCX + R11*0x1]
XOR R10D,R10D
LAB_00159f01:
MOV RBX,R10
SHL RBX,0x4
MOV RSI,qword ptr [RBX + R15*0x1]
MOV R9B,byte ptr [RSI]
TEST R9B,R9B
JZ 0x00159f44
CMP RDX,RDI
JGE 0x00159f44
INC RSI
MOV R14,R13
MOV R12,R11
LAB_00159f22:
CMP R9B,byte ptr [R12]
JNZ 0x00159f4c
INC R12
MOV R9B,byte ptr [RSI]
TEST R9B,R9B
JZ 0x00159f47
LEA RCX,[R14 + 0x1]
INC RSI
CMP R14,RDI
MOV R14,RCX
JL 0x00159f22
JMP 0x00159f47
LAB_00159f44:
MOV R12,R11
LAB_00159f47:
TEST R9B,R9B
JZ 0x00159f89
LAB_00159f4c:
INC R10
CMP R10,0x50
JNZ 0x00159f01
MOV SIL,0xff
MOV RBX,qword ptr [RBP + -0x48]
MOV R9,qword ptr [RBP + -0x40]
MOV R8,qword ptr [RBP + -0x38]
MOV EDX,dword ptr [RBP + -0x2c]
MOV R10,qword ptr [RBP + -0x58]
LEA R14,[0x3dec90]
JMP 0x00159fb9
LAB_00159f74:
XOR R10D,R10D
MOV R12D,0x8
LEA RSI,[0x3deb90]
JMP 0x00159ed6
LAB_00159f89:
ADD RBX,R15
MOV RCX,qword ptr [RBP + -0x68]
MOV SIL,byte ptr [RBX + RCX*0x1]
DEC R12
MOV R11,R12
MOV RBX,qword ptr [RBP + -0x48]
MOV R9,qword ptr [RBP + -0x40]
MOV R8,qword ptr [RBP + -0x38]
MOV EDX,dword ptr [RBP + -0x2c]
MOV R10,qword ptr [RBP + -0x58]
LEA R14,[0x3dec90]
LAB_00159fb4:
TEST SIL,SIL
JZ 0x00159fdc
LAB_00159fb9:
BT EDX,R10D
JNC 0x00159fca
MOV RCX,qword ptr [RBP + -0x50]
MOV byte ptr [RCX + RAX*0x1],SIL
INC RAX
LAB_00159fca:
INC R11
CMP RAX,RBX
JC 0x00159e96
JMP 0x00159ff7
LAB_00159fd8:
XOR EAX,EAX
JMP 0x00159ff7
LAB_00159fdc:
TEST DL,DL
JNS 0x00159ff7
MOV RDI,qword ptr [RBP + -0x50]
ADD RDI,RAX
MOV RDX,RBX
SUB RDX,RAX
XOR ESI,ESI
CALL 0x00124170
MOV RAX,RBX
LAB_00159ff7:
ADD RSP,0x48
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
ulong my_strnxfrm_win1250ch
(int8 param_1,long param_2,ulong param_3,int8 param_4,byte *param_5,
int param_6,uint param_7)
{
uint uVar1;
byte *pbVar2;
byte *pbVar3;
byte *pbVar4;
ulong uVar5;
char cVar6;
int1 *puVar7;
byte *pbVar8;
byte bVar9;
int iVar10;
long lVar11;
byte *pbVar12;
byte *pbVar13;
long lVar14;
uVar1 = param_7 | 0xf;
if ((param_7 & 0xf) != 0) {
uVar1 = param_7;
}
iVar10 = 0;
if (param_3 == 0) {
uVar5 = 0;
}
else {
uVar5 = 0;
pbVar12 = param_5;
do {
if ((long)pbVar12 - (long)param_5 < (long)param_6) {
if (iVar10 != 0) goto LAB_00159ed3;
iVar10 = 0;
lVar14 = 8;
puVar7 = _sort_order_win1250ch1;
}
else {
if ((param_6 < 1) || (iVar10 != 0)) goto LAB_00159fdc;
iVar10 = 1;
pbVar12 = param_5;
LAB_00159ed3:
lVar14 = 9;
puVar7 = _sort_order_win1250ch2;
}
cVar6 = puVar7[*pbVar12];
if (cVar6 == -1) {
lVar11 = 0;
do {
pbVar8 = (&doubles)[lVar11 * 2];
bVar9 = *pbVar8;
pbVar13 = pbVar12;
pbVar4 = pbVar12 + (1 - (long)param_5);
pbVar3 = pbVar12 + -(long)param_5;
if (bVar9 != 0) {
while (pbVar2 = pbVar4, (long)pbVar3 < (long)param_6) {
pbVar8 = pbVar8 + 1;
if (bVar9 != *pbVar13) goto LAB_00159f4c;
pbVar13 = pbVar13 + 1;
bVar9 = *pbVar8;
if (bVar9 == 0) break;
pbVar4 = pbVar2 + 1;
pbVar3 = pbVar2;
}
}
if (bVar9 == 0) {
cVar6 = *(char *)((long)&doubles + lVar14 + lVar11 * 0x10);
pbVar12 = pbVar13 + -1;
goto LAB_00159fb4;
}
LAB_00159f4c:
lVar11 = lVar11 + 1;
} while (lVar11 != 0x50);
cVar6 = -1;
}
else {
LAB_00159fb4:
if (cVar6 == '\0') {
LAB_00159fdc:
if (-1 < (char)uVar1) {
return uVar5;
}
memset((void *)(param_2 + uVar5),0,param_3 - uVar5);
return param_3;
}
}
if ((uVar1 >> iVar10 & 1) != 0) {
*(char *)(param_2 + uVar5) = cVar6;
uVar5 = uVar5 + 1;
}
pbVar12 = pbVar12 + 1;
} while (uVar5 < param_3);
}
return uVar5;
}
|
|
9,328 |
my_wc_mb_gb2312
|
eloqsql/strings/ctype-gb2312.c
|
static int
my_wc_mb_gb2312(CHARSET_INFO *cs __attribute__((unused)),
my_wc_t wc, uchar *s, uchar *e)
{
int code;
if (s >= e)
return MY_CS_TOOSMALL;
if ((uint) wc < 0x80)
{
s[0]= (uchar) wc;
return 1;
}
if (!(code=func_uni_gb2312_onechar(wc)))
return MY_CS_ILUNI;
if (s+2>e)
return MY_CS_TOOSMALL2;
code|=0x8080;
s[0]=code>>8;
s[1]=code&0xFF;
return 2;
}
|
O0
|
c
|
my_wc_mb_gb2312:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
movq -0x20(%rbp), %rax
cmpq -0x28(%rbp), %rax
jb 0x8c1be
movl $0xffffff9b, -0x4(%rbp) # imm = 0xFFFFFF9B
jmp 0x8c242
movq -0x18(%rbp), %rax
cmpl $0x80, %eax
jae 0x8c1de
movq -0x18(%rbp), %rax
movb %al, %cl
movq -0x20(%rbp), %rax
movb %cl, (%rax)
movl $0x1, -0x4(%rbp)
jmp 0x8c242
movq -0x18(%rbp), %rax
movl %eax, %edi
callq 0x8c530
movl %eax, -0x2c(%rbp)
cmpl $0x0, %eax
jne 0x8c1fa
movl $0x0, -0x4(%rbp)
jmp 0x8c242
movq -0x20(%rbp), %rax
addq $0x2, %rax
cmpq -0x28(%rbp), %rax
jbe 0x8c211
movl $0xffffff9a, -0x4(%rbp) # imm = 0xFFFFFF9A
jmp 0x8c242
movl -0x2c(%rbp), %eax
orl $0x8080, %eax # imm = 0x8080
movl %eax, -0x2c(%rbp)
movl -0x2c(%rbp), %eax
sarl $0x8, %eax
movb %al, %cl
movq -0x20(%rbp), %rax
movb %cl, (%rax)
movl -0x2c(%rbp), %eax
andl $0xff, %eax
movb %al, %cl
movq -0x20(%rbp), %rax
movb %cl, 0x1(%rax)
movl $0x2, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax,%rax)
|
my_wc_mb_gb2312:
push rbp
mov rbp, rsp
sub rsp, 30h
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov [rbp+var_20], rdx
mov [rbp+var_28], rcx
mov rax, [rbp+var_20]
cmp rax, [rbp+var_28]
jb short loc_8C1BE
mov [rbp+var_4], 0FFFFFF9Bh
jmp loc_8C242
loc_8C1BE:
mov rax, [rbp+var_18]
cmp eax, 80h
jnb short loc_8C1DE
mov rax, [rbp+var_18]
mov cl, al
mov rax, [rbp+var_20]
mov [rax], cl
mov [rbp+var_4], 1
jmp short loc_8C242
loc_8C1DE:
mov rax, [rbp+var_18]
mov edi, eax
call func_uni_gb2312_onechar
mov [rbp+var_2C], eax
cmp eax, 0
jnz short loc_8C1FA
mov [rbp+var_4], 0
jmp short loc_8C242
loc_8C1FA:
mov rax, [rbp+var_20]
add rax, 2
cmp rax, [rbp+var_28]
jbe short loc_8C211
mov [rbp+var_4], 0FFFFFF9Ah
jmp short loc_8C242
loc_8C211:
mov eax, [rbp+var_2C]
or eax, 8080h
mov [rbp+var_2C], eax
mov eax, [rbp+var_2C]
sar eax, 8
mov cl, al
mov rax, [rbp+var_20]
mov [rax], cl
mov eax, [rbp+var_2C]
and eax, 0FFh
mov cl, al
mov rax, [rbp+var_20]
mov [rax+1], cl
mov [rbp+var_4], 2
loc_8C242:
mov eax, [rbp+var_4]
add rsp, 30h
pop rbp
retn
|
long long my_wc_mb_gb2312(long long a1, unsigned int a2, _BYTE *a3, unsigned long long a4)
{
int v5; // [rsp+4h] [rbp-2Ch]
__int16 v6; // [rsp+4h] [rbp-2Ch]
if ( (unsigned long long)a3 < a4 )
{
if ( a2 >= 0x80 )
{
v5 = func_uni_gb2312_onechar(a2);
if ( v5 )
{
if ( (unsigned long long)(a3 + 2) <= a4 )
{
v6 = v5 | 0x8080;
*a3 = HIBYTE(v6);
a3[1] = v6;
return 2;
}
else
{
return (unsigned int)-102;
}
}
else
{
return 0;
}
}
else
{
*a3 = a2;
return 1;
}
}
else
{
return (unsigned int)-101;
}
}
|
my_wc_mb_gb2312:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x30
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x18],RSI
MOV qword ptr [RBP + -0x20],RDX
MOV qword ptr [RBP + -0x28],RCX
MOV RAX,qword ptr [RBP + -0x20]
CMP RAX,qword ptr [RBP + -0x28]
JC 0x0018c1be
MOV dword ptr [RBP + -0x4],0xffffff9b
JMP 0x0018c242
LAB_0018c1be:
MOV RAX,qword ptr [RBP + -0x18]
CMP EAX,0x80
JNC 0x0018c1de
MOV RAX,qword ptr [RBP + -0x18]
MOV CL,AL
MOV RAX,qword ptr [RBP + -0x20]
MOV byte ptr [RAX],CL
MOV dword ptr [RBP + -0x4],0x1
JMP 0x0018c242
LAB_0018c1de:
MOV RAX,qword ptr [RBP + -0x18]
MOV EDI,EAX
CALL 0x0018c530
MOV dword ptr [RBP + -0x2c],EAX
CMP EAX,0x0
JNZ 0x0018c1fa
MOV dword ptr [RBP + -0x4],0x0
JMP 0x0018c242
LAB_0018c1fa:
MOV RAX,qword ptr [RBP + -0x20]
ADD RAX,0x2
CMP RAX,qword ptr [RBP + -0x28]
JBE 0x0018c211
MOV dword ptr [RBP + -0x4],0xffffff9a
JMP 0x0018c242
LAB_0018c211:
MOV EAX,dword ptr [RBP + -0x2c]
OR EAX,0x8080
MOV dword ptr [RBP + -0x2c],EAX
MOV EAX,dword ptr [RBP + -0x2c]
SAR EAX,0x8
MOV CL,AL
MOV RAX,qword ptr [RBP + -0x20]
MOV byte ptr [RAX],CL
MOV EAX,dword ptr [RBP + -0x2c]
AND EAX,0xff
MOV CL,AL
MOV RAX,qword ptr [RBP + -0x20]
MOV byte ptr [RAX + 0x1],CL
MOV dword ptr [RBP + -0x4],0x2
LAB_0018c242:
MOV EAX,dword ptr [RBP + -0x4]
ADD RSP,0x30
POP RBP
RET
|
int4 my_wc_mb_gb2312(int8 param_1,uint param_2,int1 *param_3,int1 *param_4)
{
uint uVar1;
int4 local_c;
if (param_3 < param_4) {
if (param_2 < 0x80) {
*param_3 = (char)param_2;
local_c = 1;
}
else {
uVar1 = func_uni_gb2312_onechar(param_2);
if (uVar1 == 0) {
local_c = 0;
}
else if (param_4 < param_3 + 2) {
local_c = 0xffffff9a;
}
else {
*param_3 = (char)((uVar1 | 0x8080) >> 8);
param_3[1] = (char)(uVar1 | 0x8080);
local_c = 2;
}
}
}
else {
local_c = 0xffffff9b;
}
return local_c;
}
|
|
9,329 |
inline_mysql_file_close
|
eloqsql/include/mysql/psi/mysql_file.h
|
static inline int
inline_mysql_file_close(
#ifdef HAVE_PSI_FILE_INTERFACE
const char *src_file, uint src_line,
#endif
File file, myf flags)
{
int result;
#ifdef HAVE_PSI_FILE_INTERFACE
struct PSI_file_locker *locker;
PSI_file_locker_state state;
locker= PSI_FILE_CALL(get_thread_file_descriptor_locker)(&state, file, PSI_FILE_CLOSE);
if (psi_likely(locker != NULL))
{
PSI_FILE_CALL(start_file_close_wait)(locker, src_file, src_line);
result= my_close(file, flags);
PSI_FILE_CALL(end_file_close_wait)(locker, result);
return result;
}
#endif
result= my_close(file, flags);
return result;
}
|
O0
|
c
|
inline_mysql_file_close:
pushq %rbp
movq %rsp, %rbp
subq $0x80, %rsp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movl %edx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
leaq 0x1cbac8(%rip), %rax # 0x24a5f8
movq (%rax), %rax
movq 0x158(%rax), %rax
movl -0x18(%rbp), %esi
leaq -0x78(%rbp), %rdi
movl $0x4, %edx
callq *%rax
movq %rax, -0x30(%rbp)
cmpq $0x0, -0x30(%rbp)
setne %al
andb $0x1, %al
movzbl %al, %eax
cmpl $0x0, %eax
setne %al
andb $0x1, %al
movzbl %al, %eax
cltq
cmpq $0x0, %rax
je 0x7ebbb
leaq 0x1cba85(%rip), %rax # 0x24a5f8
movq (%rax), %rax
movq 0x220(%rax), %rax
movq -0x30(%rbp), %rdi
movq -0x10(%rbp), %rsi
movl -0x14(%rbp), %edx
callq *%rax
movl -0x18(%rbp), %edi
movq -0x20(%rbp), %rsi
callq 0x8bad0
movl %eax, -0x24(%rbp)
leaq 0x1cba58(%rip), %rax # 0x24a5f8
movq (%rax), %rax
movq 0x228(%rax), %rax
movq -0x30(%rbp), %rdi
movl -0x24(%rbp), %esi
callq *%rax
movl -0x24(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0x7ebd0
movl -0x18(%rbp), %edi
movq -0x20(%rbp), %rsi
callq 0x8bad0
movl %eax, -0x24(%rbp)
movl -0x24(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x80, %rsp
popq %rbp
retq
nopl (%rax)
|
inline_mysql_file_close:
push rbp
mov rbp, rsp
sub rsp, 80h
mov [rbp+var_10], rdi
mov [rbp+var_14], esi
mov [rbp+var_18], edx
mov [rbp+var_20], rcx
lea rax, PSI_server
mov rax, [rax]
mov rax, [rax+158h]
mov esi, [rbp+var_18]
lea rdi, [rbp+var_78]
mov edx, 4
call rax
mov [rbp+var_30], rax
cmp [rbp+var_30], 0
setnz al
and al, 1
movzx eax, al
cmp eax, 0
setnz al
and al, 1
movzx eax, al
cdqe
cmp rax, 0
jz short loc_7EBBB
lea rax, PSI_server
mov rax, [rax]
mov rax, [rax+220h]
mov rdi, [rbp+var_30]
mov rsi, [rbp+var_10]
mov edx, [rbp+var_14]
call rax
mov edi, [rbp+var_18]
mov rsi, [rbp+var_20]
call my_close
mov [rbp+var_24], eax
lea rax, PSI_server
mov rax, [rax]
mov rax, [rax+228h]
mov rdi, [rbp+var_30]
mov esi, [rbp+var_24]
call rax
mov eax, [rbp+var_24]
mov [rbp+var_4], eax
jmp short loc_7EBD0
loc_7EBBB:
mov edi, [rbp+var_18]
mov rsi, [rbp+var_20]
call my_close
mov [rbp+var_24], eax
mov eax, [rbp+var_24]
mov [rbp+var_4], eax
loc_7EBD0:
mov eax, [rbp+var_4]
add rsp, 80h
pop rbp
retn
|
long long inline_mysql_file_close(long long a1, unsigned int a2, unsigned int a3, long long a4)
{
_BYTE v5[72]; // [rsp+8h] [rbp-78h] BYREF
long long v6; // [rsp+50h] [rbp-30h]
unsigned int v7; // [rsp+5Ch] [rbp-24h]
long long v8; // [rsp+60h] [rbp-20h]
unsigned int v9; // [rsp+68h] [rbp-18h]
unsigned int v10; // [rsp+6Ch] [rbp-14h]
long long v11; // [rsp+70h] [rbp-10h]
v11 = a1;
v10 = a2;
v9 = a3;
v8 = a4;
v6 = (*((long long ( **)(_BYTE *, _QWORD, long long))PSI_server + 43))(v5, a3, 4LL);
if ( v6 )
{
(*((void ( **)(long long, long long, _QWORD))PSI_server + 68))(v6, v11, v10);
v7 = my_close(v9, v8);
(*((void ( **)(long long, _QWORD))PSI_server + 69))(v6, v7);
}
else
{
return (unsigned int)my_close(v9, v8);
}
return v7;
}
|
inline_mysql_file_close:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x80
MOV qword ptr [RBP + -0x10],RDI
MOV dword ptr [RBP + -0x14],ESI
MOV dword ptr [RBP + -0x18],EDX
MOV qword ptr [RBP + -0x20],RCX
LEA RAX,[0x34a5f8]
MOV RAX,qword ptr [RAX]
MOV RAX,qword ptr [RAX + 0x158]
MOV ESI,dword ptr [RBP + -0x18]
LEA RDI,[RBP + -0x78]
MOV EDX,0x4
CALL RAX
MOV qword ptr [RBP + -0x30],RAX
CMP qword ptr [RBP + -0x30],0x0
SETNZ AL
AND AL,0x1
MOVZX EAX,AL
CMP EAX,0x0
SETNZ AL
AND AL,0x1
MOVZX EAX,AL
CDQE
CMP RAX,0x0
JZ 0x0017ebbb
LEA RAX,[0x34a5f8]
MOV RAX,qword ptr [RAX]
MOV RAX,qword ptr [RAX + 0x220]
MOV RDI,qword ptr [RBP + -0x30]
MOV RSI,qword ptr [RBP + -0x10]
MOV EDX,dword ptr [RBP + -0x14]
CALL RAX
MOV EDI,dword ptr [RBP + -0x18]
MOV RSI,qword ptr [RBP + -0x20]
CALL 0x0018bad0
MOV dword ptr [RBP + -0x24],EAX
LEA RAX,[0x34a5f8]
MOV RAX,qword ptr [RAX]
MOV RAX,qword ptr [RAX + 0x228]
MOV RDI,qword ptr [RBP + -0x30]
MOV ESI,dword ptr [RBP + -0x24]
CALL RAX
MOV EAX,dword ptr [RBP + -0x24]
MOV dword ptr [RBP + -0x4],EAX
JMP 0x0017ebd0
LAB_0017ebbb:
MOV EDI,dword ptr [RBP + -0x18]
MOV RSI,qword ptr [RBP + -0x20]
CALL 0x0018bad0
MOV dword ptr [RBP + -0x24],EAX
MOV EAX,dword ptr [RBP + -0x24]
MOV dword ptr [RBP + -0x4],EAX
LAB_0017ebd0:
MOV EAX,dword ptr [RBP + -0x4]
ADD RSP,0x80
POP RBP
RET
|
int4
inline_mysql_file_close(int8 param_1,int4 param_2,int4 param_3,int8 param_4)
{
int1 local_80 [72];
long local_38;
int4 local_2c;
int8 local_28;
int4 local_20;
int4 local_1c;
int8 local_18;
int4 local_c;
local_28 = param_4;
local_20 = param_3;
local_1c = param_2;
local_18 = param_1;
local_38 = (**(code **)(PSI_server + 0x158))(local_80,param_3,4);
if (local_38 == 0) {
local_c = my_close(local_20,local_28);
}
else {
(**(code **)(PSI_server + 0x220))(local_38,local_18,local_1c);
local_2c = my_close(local_20,local_28);
(**(code **)(PSI_server + 0x228))(local_38,local_2c);
local_c = local_2c;
}
return local_c;
}
|
|
9,330 |
my_strnxfrm_tis620
|
eloqsql/strings/ctype-tis620.c
|
static size_t
my_strnxfrm_tis620(CHARSET_INFO *cs,
uchar *dst, size_t dstlen, uint nweights,
const uchar *src, size_t srclen, uint flags)
{
size_t len, dstlen0= dstlen;
len= MY_MIN(dstlen, srclen);
memcpy(dst, src, len);
len= thai2sortable(dst, len);
set_if_smaller(dstlen, nweights);
set_if_smaller(len, dstlen);
len= my_strxfrm_pad_desc_and_reverse(cs, dst, dst + len, dst + dstlen,
(uint)(dstlen - len), flags, 0);
if ((flags & MY_STRXFRM_PAD_TO_MAXLEN) && len < dstlen0)
{
size_t fill_length= dstlen0 - len;
my_ci_fill(cs, (char*) dst + len, fill_length, cs->pad_char);
len= dstlen0;
}
return len;
}
|
O0
|
c
|
my_strnxfrm_tis620:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movl 0x10(%rbp), %eax
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movl %ecx, -0x1c(%rbp)
movq %r8, -0x28(%rbp)
movq %r9, -0x30(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0x40(%rbp)
movq -0x18(%rbp), %rax
cmpq -0x30(%rbp), %rax
jae 0x4a61e
movq -0x18(%rbp), %rax
movq %rax, -0x50(%rbp)
jmp 0x4a626
movq -0x30(%rbp), %rax
movq %rax, -0x50(%rbp)
movq -0x50(%rbp), %rax
movq %rax, -0x38(%rbp)
movq -0x10(%rbp), %rdi
movq -0x28(%rbp), %rsi
movq -0x38(%rbp), %rdx
callq 0x24230
movq -0x10(%rbp), %rdi
movq -0x38(%rbp), %rsi
callq 0x4a710
movq %rax, -0x38(%rbp)
movq -0x18(%rbp), %rax
movl -0x1c(%rbp), %ecx
cmpq %rcx, %rax
jbe 0x4a663
movl -0x1c(%rbp), %eax
movq %rax, -0x18(%rbp)
jmp 0x4a665
jmp 0x4a667
movq -0x38(%rbp), %rax
cmpq -0x18(%rbp), %rax
jbe 0x4a679
movq -0x18(%rbp), %rax
movq %rax, -0x38(%rbp)
jmp 0x4a67b
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x10(%rbp), %rdx
addq -0x38(%rbp), %rdx
movq -0x10(%rbp), %rcx
addq -0x18(%rbp), %rcx
movq -0x18(%rbp), %rax
subq -0x38(%rbp), %rax
movl %eax, %r8d
movl 0x10(%rbp), %r9d
xorl %eax, %eax
movl $0x0, (%rsp)
callq 0x44cd0
movq %rax, -0x38(%rbp)
movl 0x10(%rbp), %eax
andl $0x80, %eax
cmpl $0x0, %eax
je 0x4a6ff
movq -0x38(%rbp), %rax
cmpq -0x40(%rbp), %rax
jae 0x4a6ff
movq -0x40(%rbp), %rax
subq -0x38(%rbp), %rax
movq %rax, -0x48(%rbp)
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
addq -0x38(%rbp), %rsi
movq -0x48(%rbp), %rdx
movq -0x8(%rbp), %rax
movzbl 0xb0(%rax), %ecx
callq 0x4a8b0
movq -0x40(%rbp), %rax
movq %rax, -0x38(%rbp)
movq -0x38(%rbp), %rax
addq $0x60, %rsp
popq %rbp
retq
nopl (%rax)
|
my_strnxfrm_tis620:
push rbp
mov rbp, rsp
sub rsp, 60h
mov eax, [rbp+arg_0]
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov [rbp+var_18], rdx
mov [rbp+var_1C], ecx
mov [rbp+var_28], r8
mov [rbp+var_30], r9
mov rax, [rbp+var_18]
mov [rbp+var_40], rax
mov rax, [rbp+var_18]
cmp rax, [rbp+var_30]
jnb short loc_4A61E
mov rax, [rbp+var_18]
mov [rbp+var_50], rax
jmp short loc_4A626
loc_4A61E:
mov rax, [rbp+var_30]
mov [rbp+var_50], rax
loc_4A626:
mov rax, [rbp+var_50]
mov [rbp+var_38], rax
mov rdi, [rbp+var_10]
mov rsi, [rbp+var_28]
mov rdx, [rbp+var_38]
call _memcpy
mov rdi, [rbp+var_10]
mov rsi, [rbp+var_38]
call thai2sortable
mov [rbp+var_38], rax
mov rax, [rbp+var_18]
mov ecx, [rbp+var_1C]
cmp rax, rcx
jbe short loc_4A663
mov eax, [rbp+var_1C]
mov [rbp+var_18], rax
loc_4A663:
jmp short $+2
loc_4A665:
jmp short $+2
loc_4A667:
mov rax, [rbp+var_38]
cmp rax, [rbp+var_18]
jbe short loc_4A679
mov rax, [rbp+var_18]
mov [rbp+var_38], rax
loc_4A679:
jmp short $+2
loc_4A67B:
mov rdi, [rbp+var_8]
mov rsi, [rbp+var_10]
mov rdx, [rbp+var_10]
add rdx, [rbp+var_38]
mov rcx, [rbp+var_10]
add rcx, [rbp+var_18]
mov rax, [rbp+var_18]
sub rax, [rbp+var_38]
mov r8d, eax
mov r9d, [rbp+arg_0]
xor eax, eax
mov [rsp+60h+var_60], 0
call my_strxfrm_pad_desc_and_reverse
mov [rbp+var_38], rax
mov eax, [rbp+arg_0]
and eax, 80h
cmp eax, 0
jz short loc_4A6FF
mov rax, [rbp+var_38]
cmp rax, [rbp+var_40]
jnb short loc_4A6FF
mov rax, [rbp+var_40]
sub rax, [rbp+var_38]
mov [rbp+var_48], rax
mov rdi, [rbp+var_8]
mov rsi, [rbp+var_10]
add rsi, [rbp+var_38]
mov rdx, [rbp+var_48]
mov rax, [rbp+var_8]
movzx ecx, byte ptr [rax+0B0h]
call my_ci_fill_1
mov rax, [rbp+var_40]
mov [rbp+var_38], rax
loc_4A6FF:
mov rax, [rbp+var_38]
add rsp, 60h
pop rbp
retn
|
unsigned long long my_strnxfrm_tis620(
long long a1,
long long a2,
unsigned long long a3,
unsigned int a4,
long long a5,
unsigned long long a6,
unsigned int a7)
{
unsigned long long v8; // [rsp+10h] [rbp-50h]
unsigned long long v10; // [rsp+28h] [rbp-38h]
unsigned long long v11; // [rsp+28h] [rbp-38h]
unsigned long long v13; // [rsp+48h] [rbp-18h]
v13 = a3;
if ( a3 >= a6 )
v8 = a6;
else
v8 = a3;
memcpy(a2, a5, v8);
v10 = thai2sortable(a2, v8);
if ( v13 > a4 )
v13 = a4;
if ( v10 > v13 )
v10 = v13;
v11 = my_strxfrm_pad_desc_and_reverse(a1, a2, v10 + a2, v13 + a2, (int)v13 - (int)v10, a7, 0);
if ( (a7 & 0x80) != 0 && v11 < a3 )
{
my_ci_fill_1(a1, v11 + a2, a3 - v11, *(unsigned __int8 *)(a1 + 176));
return a3;
}
return v11;
}
|
my_strnxfrm_tis620:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x60
MOV EAX,dword ptr [RBP + 0x10]
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV qword ptr [RBP + -0x18],RDX
MOV dword ptr [RBP + -0x1c],ECX
MOV qword ptr [RBP + -0x28],R8
MOV qword ptr [RBP + -0x30],R9
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RBP + -0x40],RAX
MOV RAX,qword ptr [RBP + -0x18]
CMP RAX,qword ptr [RBP + -0x30]
JNC 0x0014a61e
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RBP + -0x50],RAX
JMP 0x0014a626
LAB_0014a61e:
MOV RAX,qword ptr [RBP + -0x30]
MOV qword ptr [RBP + -0x50],RAX
LAB_0014a626:
MOV RAX,qword ptr [RBP + -0x50]
MOV qword ptr [RBP + -0x38],RAX
MOV RDI,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RBP + -0x28]
MOV RDX,qword ptr [RBP + -0x38]
CALL 0x00124230
MOV RDI,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RBP + -0x38]
CALL 0x0014a710
MOV qword ptr [RBP + -0x38],RAX
MOV RAX,qword ptr [RBP + -0x18]
MOV ECX,dword ptr [RBP + -0x1c]
CMP RAX,RCX
JBE 0x0014a663
MOV EAX,dword ptr [RBP + -0x1c]
MOV qword ptr [RBP + -0x18],RAX
LAB_0014a663:
JMP 0x0014a665
LAB_0014a665:
JMP 0x0014a667
LAB_0014a667:
MOV RAX,qword ptr [RBP + -0x38]
CMP RAX,qword ptr [RBP + -0x18]
JBE 0x0014a679
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RBP + -0x38],RAX
LAB_0014a679:
JMP 0x0014a67b
LAB_0014a67b:
MOV RDI,qword ptr [RBP + -0x8]
MOV RSI,qword ptr [RBP + -0x10]
MOV RDX,qword ptr [RBP + -0x10]
ADD RDX,qword ptr [RBP + -0x38]
MOV RCX,qword ptr [RBP + -0x10]
ADD RCX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RBP + -0x18]
SUB RAX,qword ptr [RBP + -0x38]
MOV R8D,EAX
MOV R9D,dword ptr [RBP + 0x10]
XOR EAX,EAX
MOV dword ptr [RSP],0x0
CALL 0x00144cd0
MOV qword ptr [RBP + -0x38],RAX
MOV EAX,dword ptr [RBP + 0x10]
AND EAX,0x80
CMP EAX,0x0
JZ 0x0014a6ff
MOV RAX,qword ptr [RBP + -0x38]
CMP RAX,qword ptr [RBP + -0x40]
JNC 0x0014a6ff
MOV RAX,qword ptr [RBP + -0x40]
SUB RAX,qword ptr [RBP + -0x38]
MOV qword ptr [RBP + -0x48],RAX
MOV RDI,qword ptr [RBP + -0x8]
MOV RSI,qword ptr [RBP + -0x10]
ADD RSI,qword ptr [RBP + -0x38]
MOV RDX,qword ptr [RBP + -0x48]
MOV RAX,qword ptr [RBP + -0x8]
MOVZX ECX,byte ptr [RAX + 0xb0]
CALL 0x0014a8b0
MOV RAX,qword ptr [RBP + -0x40]
MOV qword ptr [RBP + -0x38],RAX
LAB_0014a6ff:
MOV RAX,qword ptr [RBP + -0x38]
ADD RSP,0x60
POP RBP
RET
|
ulong my_strnxfrm_tis620(long param_1,void *param_2,ulong param_3,uint param_4,void *param_5,
ulong param_6,uint param_7)
{
size_t local_58;
ulong local_40;
ulong local_20;
local_58 = param_6;
if (param_3 < param_6) {
local_58 = param_3;
}
memcpy(param_2,param_5,local_58);
local_40 = thai2sortable(param_2,local_58);
local_20 = param_3;
if (param_4 < param_3) {
local_20 = (ulong)param_4;
}
if (local_20 < local_40) {
local_40 = local_20;
}
local_40 = my_strxfrm_pad_desc_and_reverse
(param_1,param_2,(long)param_2 + local_40,(long)param_2 + local_20,
(int)local_20 - (int)local_40,param_7,0);
if (((param_7 & 0x80) != 0) && (local_40 < param_3)) {
my_ci_fill(param_1,(long)param_2 + local_40,param_3 - local_40,*(int1 *)(param_1 + 0xb0));
local_40 = param_3;
}
return local_40;
}
|
|
9,331 |
c4_eth_get_method_type
|
corpus-core[P]colibri-stateless/src/chains/eth/verifier/eth_verify.c
|
method_type_t c4_eth_get_method_type(chain_id_t chain_id, char* method) {
if (chain_id != C4_CHAIN_MAINNET) return METHOD_UNDEFINED;
for (int i = 0; i < sizeof(proofable_methods) / sizeof(proofable_methods[0]); i++) {
if (strcmp(method, proofable_methods[i]) == 0) return METHOD_PROOFABLE;
}
for (int i = 0; i < sizeof(local_methods) / sizeof(local_methods[0]); i++) {
if (strcmp(method, local_methods[i]) == 0) return METHOD_LOCAL;
}
for (int i = 0; i < sizeof(not_verifieable_yet_methods) / sizeof(not_verifieable_yet_methods[0]); i++) {
if (strcmp(method, not_verifieable_yet_methods[i]) == 0) return METHOD_UNPROOFABLE;
}
return METHOD_UNDEFINED;
}
|
O2
|
c
|
c4_eth_get_method_type:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
xorl %ebx, %ebx
cmpl $0x1, %edi
jne 0x25728
movq %rsi, %r14
xorl %r15d, %r15d
leaq 0x4f004(%rip), %r12 # 0x746b0
pushq $0x1
popq %rbx
cmpq $0x34, %r15
je 0x256ce
movslq (%r15,%r12), %rsi
addq %r12, %rsi
movq %r14, %rdi
callq 0x22400
addq $0x4, %r15
testl %eax, %eax
jne 0x256af
jmp 0x25728
xorl %r15d, %r15d
leaq 0x4f00c(%rip), %r12 # 0x746e4
pushq $0x4
popq %rbx
cmpq $0x14, %r15
je 0x256fa
movslq (%r15,%r12), %rsi
addq %r12, %rsi
movq %r14, %rdi
callq 0x22400
addq $0x4, %r15
testl %eax, %eax
jne 0x256db
jmp 0x25728
xorl %ebx, %ebx
leaq 0x4eff5(%rip), %r15 # 0x746f8
pushq $0x2
popq %rbp
xorl %r12d, %r12d
cmpq $0x64, %r12
je 0x25728
movslq (%r12,%r15), %rsi
addq %r15, %rsi
movq %r14, %rdi
callq 0x22400
addq $0x4, %r12
testl %eax, %eax
jne 0x25709
movl %ebp, %ebx
movl %ebx, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
|
c4_eth_get_method_type:
push rbp
push r15
push r14
push r12
push rbx
xor ebx, ebx
cmp edi, 1
jnz loc_25728
mov r14, rsi
xor r15d, r15d
lea r12, proofable_methods_rel
push 1
pop rbx
loc_256AF:
cmp r15, 34h ; '4'
jz short loc_256CE
movsxd rsi, dword ptr [r15+r12]
add rsi, r12
mov rdi, r14
call _strcmp
add r15, 4
test eax, eax
jnz short loc_256AF
jmp short loc_25728
loc_256CE:
xor r15d, r15d
lea r12, local_methods_rel
push 4
pop rbx
loc_256DB:
cmp r15, 14h
jz short loc_256FA
movsxd rsi, dword ptr [r15+r12]
add rsi, r12
mov rdi, r14
call _strcmp
add r15, 4
test eax, eax
jnz short loc_256DB
jmp short loc_25728
loc_256FA:
xor ebx, ebx
lea r15, not_verifieable_yet_methods_rel
push 2
pop rbp
xor r12d, r12d
loc_25709:
cmp r12, 64h ; 'd'
jz short loc_25728
movsxd rsi, dword ptr [r12+r15]
add rsi, r15
mov rdi, r14
call _strcmp
add r12, 4
test eax, eax
jnz short loc_25709
mov ebx, ebp
loc_25728:
mov eax, ebx
pop rbx
pop r12
pop r14
pop r15
pop rbp
retn
|
long long c4_eth_get_method_type(int a1, long long a2)
{
unsigned int v2; // ebx
long long v3; // r15
int v4; // eax
long long v5; // r15
int v6; // eax
long long i; // r12
v2 = 0;
if ( a1 == 1 )
{
v3 = 0LL;
v2 = 1;
while ( v3 != 52 )
{
v4 = strcmp(a2, (char *)&proofable_methods_rel + *(int *)((char *)&proofable_methods_rel + v3));
v3 += 4LL;
if ( !v4 )
return v2;
}
v5 = 0LL;
v2 = 4;
while ( v5 != 20 )
{
v6 = strcmp(a2, (char *)&local_methods_rel + *(int *)((char *)&local_methods_rel + v5));
v5 += 4LL;
if ( !v6 )
return v2;
}
v2 = 0;
for ( i = 0LL; i != 100; i += 4LL )
{
if ( !(unsigned int)strcmp(
a2,
(char *)¬_verifieable_yet_methods_rel
+ *(int *)((char *)¬_verifieable_yet_methods_rel + i)) )
return 2;
}
}
return v2;
}
|
c4_eth_get_method_type:
PUSH RBP
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
XOR EBX,EBX
CMP EDI,0x1
JNZ 0x00125728
MOV R14,RSI
XOR R15D,R15D
LEA R12,[0x1746b0]
PUSH 0x1
POP RBX
LAB_001256af:
CMP R15,0x34
JZ 0x001256ce
MOVSXD RSI,dword ptr [R15 + R12*0x1]
ADD RSI,R12
MOV RDI,R14
CALL 0x00122400
ADD R15,0x4
TEST EAX,EAX
JNZ 0x001256af
JMP 0x00125728
LAB_001256ce:
XOR R15D,R15D
LEA R12,[0x1746e4]
PUSH 0x4
POP RBX
LAB_001256db:
CMP R15,0x14
JZ 0x001256fa
MOVSXD RSI,dword ptr [R15 + R12*0x1]
ADD RSI,R12
MOV RDI,R14
CALL 0x00122400
ADD R15,0x4
TEST EAX,EAX
JNZ 0x001256db
JMP 0x00125728
LAB_001256fa:
XOR EBX,EBX
LEA R15,[0x1746f8]
PUSH 0x2
POP RBP
XOR R12D,R12D
LAB_00125709:
CMP R12,0x64
JZ 0x00125728
MOVSXD RSI,dword ptr [R12 + R15*0x1]
ADD RSI,R15
MOV RDI,R14
CALL 0x00122400
ADD R12,0x4
TEST EAX,EAX
JNZ 0x00125709
MOV EBX,EBP
LAB_00125728:
MOV EAX,EBX
POP RBX
POP R12
POP R14
POP R15
POP RBP
RET
|
int8 c4_eth_get_method_type(int param_1,char *param_2)
{
int iVar1;
long lVar2;
if (param_1 != 1) {
return 0;
}
lVar2 = 0;
do {
if (lVar2 == 0x34) {
lVar2 = 0;
do {
if (lVar2 == 0x14) {
lVar2 = 0;
do {
if (lVar2 == 100) {
return 0;
}
iVar1 = strcmp(param_2,(char *)((long)¬_verifieable_yet_methods_rel +
(long)*(int *)((long)¬_verifieable_yet_methods_rel +
lVar2)));
lVar2 = lVar2 + 4;
} while (iVar1 != 0);
return 2;
}
iVar1 = strcmp(param_2,(char *)((long)&local_methods_rel +
(long)*(int *)((long)&local_methods_rel + lVar2)));
lVar2 = lVar2 + 4;
} while (iVar1 != 0);
return 4;
}
iVar1 = strcmp(param_2,(char *)((long)&proofable_methods_rel +
(long)*(int *)((long)&proofable_methods_rel + lVar2)));
lVar2 = lVar2 + 4;
} while (iVar1 != 0);
return 1;
}
|
|
9,332 |
map_hash_resize
|
bluesky950520[P]quickjs/quickjs.c
|
static void map_hash_resize(JSContext *ctx, JSMapState *s)
{
uint32_t new_hash_size, i, h;
size_t slack;
struct list_head *new_hash_table, *el;
JSMapRecord *mr;
/* XXX: no reporting of memory allocation failure */
if (s->hash_size == 1)
new_hash_size = 4;
else
new_hash_size = s->hash_size * 2;
new_hash_table = js_realloc2(ctx, s->hash_table,
sizeof(new_hash_table[0]) * new_hash_size, &slack);
if (!new_hash_table)
return;
new_hash_size += slack / sizeof(*new_hash_table);
for(i = 0; i < new_hash_size; i++)
init_list_head(&new_hash_table[i]);
list_for_each(el, &s->records) {
mr = list_entry(el, JSMapRecord, link);
if (!mr->empty) {
h = map_hash_key(ctx, mr->key) & (new_hash_size - 1);
list_add_tail(&mr->hash_link, &new_hash_table[h]);
}
}
s->hash_table = new_hash_table;
s->hash_size = new_hash_size;
s->record_count_threshold = new_hash_size * 2;
}
|
O0
|
c
|
map_hash_resize:
subq $0x48, %rsp
movq %rdi, 0x40(%rsp)
movq %rsi, 0x38(%rsp)
movq 0x38(%rsp), %rax
cmpl $0x1, 0x28(%rax)
jne 0x843c3
movl $0x4, 0x34(%rsp)
jmp 0x843d1
movq 0x38(%rsp), %rax
movl 0x28(%rax), %eax
shll %eax
movl %eax, 0x34(%rsp)
movq 0x40(%rsp), %rdi
movq 0x38(%rsp), %rax
movq 0x20(%rax), %rsi
movl 0x34(%rsp), %eax
movl %eax, %edx
shlq $0x4, %rdx
leaq 0x20(%rsp), %rcx
callq 0x28170
movq %rax, 0x18(%rsp)
cmpq $0x0, 0x18(%rsp)
jne 0x84405
jmp 0x84503
movq 0x20(%rsp), %rcx
shrq $0x4, %rcx
movl 0x34(%rsp), %eax
addq %rcx, %rax
movl %eax, 0x34(%rsp)
movl $0x0, 0x30(%rsp)
movl 0x30(%rsp), %eax
cmpl 0x34(%rsp), %eax
jae 0x8444d
movq 0x18(%rsp), %rdi
movl 0x30(%rsp), %eax
shlq $0x4, %rax
addq %rax, %rdi
callq 0x28680
movl 0x30(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x30(%rsp)
jmp 0x84421
movq 0x38(%rsp), %rax
movq 0x10(%rax), %rax
movq %rax, 0x10(%rsp)
movq 0x10(%rsp), %rax
movq 0x38(%rsp), %rcx
addq $0x8, %rcx
cmpq %rcx, %rax
je 0x844db
movq 0x10(%rsp), %rax
addq $-0x10, %rax
movq %rax, 0x8(%rsp)
movq 0x8(%rsp), %rax
cmpl $0x0, 0x4(%rax)
jne 0x844c9
movq 0x40(%rsp), %rdi
movq 0x8(%rsp), %rax
movq 0x30(%rax), %rsi
movq 0x38(%rax), %rdx
callq 0x84200
movl 0x34(%rsp), %ecx
subl $0x1, %ecx
andl %ecx, %eax
movl %eax, 0x2c(%rsp)
movq 0x8(%rsp), %rdi
addq $0x20, %rdi
movq 0x18(%rsp), %rsi
movl 0x2c(%rsp), %eax
shlq $0x4, %rax
addq %rax, %rsi
callq 0x29d40
jmp 0x844cb
movq 0x10(%rsp), %rax
movq 0x8(%rax), %rax
movq %rax, 0x10(%rsp)
jmp 0x8445b
movq 0x18(%rsp), %rcx
movq 0x38(%rsp), %rax
movq %rcx, 0x20(%rax)
movl 0x34(%rsp), %ecx
movq 0x38(%rsp), %rax
movl %ecx, 0x28(%rax)
movl 0x34(%rsp), %ecx
shll %ecx
movq 0x38(%rsp), %rax
movl %ecx, 0x2c(%rax)
addq $0x48, %rsp
retq
nopl (%rax,%rax)
|
map_hash_resize:
sub rsp, 48h
mov [rsp+48h+var_8], rdi
mov [rsp+48h+var_10], rsi
mov rax, [rsp+48h+var_10]
cmp dword ptr [rax+28h], 1
jnz short loc_843C3
mov [rsp+48h+var_14], 4
jmp short loc_843D1
loc_843C3:
mov rax, [rsp+48h+var_10]
mov eax, [rax+28h]
shl eax, 1
mov [rsp+48h+var_14], eax
loc_843D1:
mov rdi, [rsp+48h+var_8]
mov rax, [rsp+48h+var_10]
mov rsi, [rax+20h]
mov eax, [rsp+48h+var_14]
mov edx, eax
shl rdx, 4
lea rcx, [rsp+48h+var_28]
call js_realloc2
mov [rsp+48h+var_30], rax
cmp [rsp+48h+var_30], 0
jnz short loc_84405
jmp loc_84503
loc_84405:
mov rcx, [rsp+48h+var_28]
shr rcx, 4
mov eax, [rsp+48h+var_14]
add rax, rcx
mov [rsp+48h+var_14], eax
mov [rsp+48h+var_18], 0
loc_84421:
mov eax, [rsp+48h+var_18]
cmp eax, [rsp+48h+var_14]
jnb short loc_8444D
mov rdi, [rsp+48h+var_30]
mov eax, [rsp+48h+var_18]
shl rax, 4
add rdi, rax
call init_list_head_1
mov eax, [rsp+48h+var_18]
add eax, 1
mov [rsp+48h+var_18], eax
jmp short loc_84421
loc_8444D:
mov rax, [rsp+48h+var_10]
mov rax, [rax+10h]
mov [rsp+48h+var_38], rax
loc_8445B:
mov rax, [rsp+48h+var_38]
mov rcx, [rsp+48h+var_10]
add rcx, 8
cmp rax, rcx
jz short loc_844DB
mov rax, [rsp+48h+var_38]
add rax, 0FFFFFFFFFFFFFFF0h
mov [rsp+48h+var_40], rax
mov rax, [rsp+48h+var_40]
cmp dword ptr [rax+4], 0
jnz short loc_844C9
mov rdi, [rsp+48h+var_8]
mov rax, [rsp+48h+var_40]
mov rsi, [rax+30h]
mov rdx, [rax+38h]
call map_hash_key
mov ecx, [rsp+48h+var_14]
sub ecx, 1
and eax, ecx
mov [rsp+48h+var_1C], eax
mov rdi, [rsp+48h+var_40]
add rdi, 20h ; ' '
mov rsi, [rsp+48h+var_30]
mov eax, [rsp+48h+var_1C]
shl rax, 4
add rsi, rax
call list_add_tail_1
loc_844C9:
jmp short $+2
loc_844CB:
mov rax, [rsp+48h+var_38]
mov rax, [rax+8]
mov [rsp+48h+var_38], rax
jmp short loc_8445B
loc_844DB:
mov rcx, [rsp+48h+var_30]
mov rax, [rsp+48h+var_10]
mov [rax+20h], rcx
mov ecx, [rsp+48h+var_14]
mov rax, [rsp+48h+var_10]
mov [rax+28h], ecx
mov ecx, [rsp+48h+var_14]
shl ecx, 1
mov rax, [rsp+48h+var_10]
mov [rax+2Ch], ecx
loc_84503:
add rsp, 48h
retn
|
long long map_hash_resize(long long a1, long long a2)
{
long long result; // rax
int v3; // eax
long long v4; // [rsp+8h] [rbp-40h]
long long j; // [rsp+10h] [rbp-38h]
long long v6; // [rsp+18h] [rbp-30h]
unsigned long long v7; // [rsp+20h] [rbp-28h] BYREF
unsigned int v8; // [rsp+2Ch] [rbp-1Ch]
unsigned int i; // [rsp+30h] [rbp-18h]
unsigned int v10; // [rsp+34h] [rbp-14h]
long long v11; // [rsp+38h] [rbp-10h]
long long v12; // [rsp+40h] [rbp-8h]
v12 = a1;
v11 = a2;
if ( *(_DWORD *)(a2 + 40) == 1 )
v10 = 4;
else
v10 = 2 * *(_DWORD *)(v11 + 40);
result = js_realloc2(v12, *(_QWORD *)(v11 + 32), 16LL * v10, &v7);
v6 = result;
if ( result )
{
v10 += v7 >> 4;
for ( i = 0; i < v10; ++i )
init_list_head_1((_QWORD *)(16LL * i + v6));
for ( j = *(_QWORD *)(v11 + 16); j != v11 + 8; j = *(_QWORD *)(j + 8) )
{
v4 = j - 16;
if ( !*(_DWORD *)(j - 16 + 4) )
{
v3 = map_hash_key(v12, *(_QWORD *)(v4 + 48), *(_QWORD *)(v4 + 56));
v8 = (v10 - 1) & v3;
list_add_tail_1(v4 + 32, (_QWORD *)(16LL * v8 + v6));
}
}
*(_QWORD *)(v11 + 32) = v6;
*(_DWORD *)(v11 + 40) = v10;
result = v11;
*(_DWORD *)(v11 + 44) = 2 * v10;
}
return result;
}
|
map_hash_resize:
SUB RSP,0x48
MOV qword ptr [RSP + 0x40],RDI
MOV qword ptr [RSP + 0x38],RSI
MOV RAX,qword ptr [RSP + 0x38]
CMP dword ptr [RAX + 0x28],0x1
JNZ 0x001843c3
MOV dword ptr [RSP + 0x34],0x4
JMP 0x001843d1
LAB_001843c3:
MOV RAX,qword ptr [RSP + 0x38]
MOV EAX,dword ptr [RAX + 0x28]
SHL EAX,0x1
MOV dword ptr [RSP + 0x34],EAX
LAB_001843d1:
MOV RDI,qword ptr [RSP + 0x40]
MOV RAX,qword ptr [RSP + 0x38]
MOV RSI,qword ptr [RAX + 0x20]
MOV EAX,dword ptr [RSP + 0x34]
MOV EDX,EAX
SHL RDX,0x4
LEA RCX,[RSP + 0x20]
CALL 0x00128170
MOV qword ptr [RSP + 0x18],RAX
CMP qword ptr [RSP + 0x18],0x0
JNZ 0x00184405
JMP 0x00184503
LAB_00184405:
MOV RCX,qword ptr [RSP + 0x20]
SHR RCX,0x4
MOV EAX,dword ptr [RSP + 0x34]
ADD RAX,RCX
MOV dword ptr [RSP + 0x34],EAX
MOV dword ptr [RSP + 0x30],0x0
LAB_00184421:
MOV EAX,dword ptr [RSP + 0x30]
CMP EAX,dword ptr [RSP + 0x34]
JNC 0x0018444d
MOV RDI,qword ptr [RSP + 0x18]
MOV EAX,dword ptr [RSP + 0x30]
SHL RAX,0x4
ADD RDI,RAX
CALL 0x00128680
MOV EAX,dword ptr [RSP + 0x30]
ADD EAX,0x1
MOV dword ptr [RSP + 0x30],EAX
JMP 0x00184421
LAB_0018444d:
MOV RAX,qword ptr [RSP + 0x38]
MOV RAX,qword ptr [RAX + 0x10]
MOV qword ptr [RSP + 0x10],RAX
LAB_0018445b:
MOV RAX,qword ptr [RSP + 0x10]
MOV RCX,qword ptr [RSP + 0x38]
ADD RCX,0x8
CMP RAX,RCX
JZ 0x001844db
MOV RAX,qword ptr [RSP + 0x10]
ADD RAX,-0x10
MOV qword ptr [RSP + 0x8],RAX
MOV RAX,qword ptr [RSP + 0x8]
CMP dword ptr [RAX + 0x4],0x0
JNZ 0x001844c9
MOV RDI,qword ptr [RSP + 0x40]
MOV RAX,qword ptr [RSP + 0x8]
MOV RSI,qword ptr [RAX + 0x30]
MOV RDX,qword ptr [RAX + 0x38]
CALL 0x00184200
MOV ECX,dword ptr [RSP + 0x34]
SUB ECX,0x1
AND EAX,ECX
MOV dword ptr [RSP + 0x2c],EAX
MOV RDI,qword ptr [RSP + 0x8]
ADD RDI,0x20
MOV RSI,qword ptr [RSP + 0x18]
MOV EAX,dword ptr [RSP + 0x2c]
SHL RAX,0x4
ADD RSI,RAX
CALL 0x00129d40
LAB_001844c9:
JMP 0x001844cb
LAB_001844cb:
MOV RAX,qword ptr [RSP + 0x10]
MOV RAX,qword ptr [RAX + 0x8]
MOV qword ptr [RSP + 0x10],RAX
JMP 0x0018445b
LAB_001844db:
MOV RCX,qword ptr [RSP + 0x18]
MOV RAX,qword ptr [RSP + 0x38]
MOV qword ptr [RAX + 0x20],RCX
MOV ECX,dword ptr [RSP + 0x34]
MOV RAX,qword ptr [RSP + 0x38]
MOV dword ptr [RAX + 0x28],ECX
MOV ECX,dword ptr [RSP + 0x34]
SHL ECX,0x1
MOV RAX,qword ptr [RSP + 0x38]
MOV dword ptr [RAX + 0x2c],ECX
LAB_00184503:
ADD RSP,0x48
RET
|
void map_hash_resize(int8 param_1,long param_2)
{
long lVar1;
long local_38;
ulong local_28;
uint local_1c;
uint local_18;
uint local_14;
long local_10;
int8 local_8;
if (*(int *)(param_2 + 0x28) == 1) {
local_14 = 4;
}
else {
local_14 = *(int *)(param_2 + 0x28) << 1;
}
local_10 = param_2;
local_8 = param_1;
lVar1 = js_realloc2(param_1,*(int8 *)(param_2 + 0x20),(ulong)local_14 << 4,&local_28);
if (lVar1 != 0) {
local_14 = local_14 + (int)(local_28 >> 4);
for (local_18 = 0; local_18 < local_14; local_18 = local_18 + 1) {
init_list_head(lVar1 + (ulong)local_18 * 0x10);
}
for (local_38 = *(long *)(local_10 + 0x10); local_38 != local_10 + 8;
local_38 = *(long *)(local_38 + 8)) {
if (*(int *)(local_38 + -0xc) == 0) {
local_1c = map_hash_key(local_8,*(int8 *)(local_38 + 0x20),
*(int8 *)(local_38 + 0x28));
local_1c = local_1c & local_14 - 1;
list_add_tail(local_38 + 0x10,lVar1 + (ulong)local_1c * 0x10);
}
}
*(long *)(local_10 + 0x20) = lVar1;
*(uint *)(local_10 + 0x28) = local_14;
*(uint *)(local_10 + 0x2c) = local_14 << 1;
}
return;
}
|
|
9,333 |
my_uca_implicit_weight_put
|
eloqsql/strings/ctype-uca.c
|
static inline void
my_uca_implicit_weight_put(uint16 *to, my_wc_t code, uint level)
{
switch (level) {
case 1: to[0]= 0x0020; to[1]= 0; break; /* Secondary level */
case 2: to[0]= 0x0002; to[1]= 0; break; /* Tertiary level */
case 3: to[0]= 0x0001; to[1]= 0; break; /* Quaternary level */
default:
DBUG_ASSERT(0);
case 0:
break;
}
/* Primary level */
to[0]= (uint16)(code >> 15) + my_uca_implicit_weight_base(code);
to[1]= (code & 0x7FFF) | 0x8000;
to[2]= 0;
}
|
O0
|
c
|
my_uca_implicit_weight_put:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movl -0x14(%rbp), %eax
movq %rax, -0x20(%rbp)
subq $0x3, %rax
ja 0xe5f33
movq -0x20(%rbp), %rax
leaq 0xfc0c1(%rip), %rcx # 0x1e1fac
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq -0x8(%rbp), %rax
movw $0x20, (%rax)
movq -0x8(%rbp), %rax
movw $0x0, 0x2(%rax)
jmp 0xe5f3b
movq -0x8(%rbp), %rax
movw $0x2, (%rax)
movq -0x8(%rbp), %rax
movw $0x0, 0x2(%rax)
jmp 0xe5f3b
movq -0x8(%rbp), %rax
movw $0x1, (%rax)
movq -0x8(%rbp), %rax
movw $0x0, 0x2(%rax)
jmp 0xe5f3b
jmp 0xe5f35
jmp 0xe5f37
jmp 0xe5f39
jmp 0xe5f3b
movq -0x10(%rbp), %rax
shrq $0xf, %rax
movzwl %ax, %eax
movl %eax, -0x24(%rbp)
movq -0x10(%rbp), %rdi
callq 0xe5fa0
movw %ax, %cx
movl -0x24(%rbp), %eax
movzwl %cx, %ecx
addl %ecx, %eax
movw %ax, %cx
movq -0x8(%rbp), %rax
movw %cx, (%rax)
movq -0x10(%rbp), %rax
andq $0x7fff, %rax # imm = 0x7FFF
orq $0x8000, %rax # imm = 0x8000
movw %ax, %cx
movq -0x8(%rbp), %rax
movw %cx, 0x2(%rax)
movq -0x8(%rbp), %rax
movw $0x0, 0x4(%rax)
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
|
my_uca_implicit_weight_put:
push rbp
mov rbp, rsp
sub rsp, 30h
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov [rbp+var_14], edx
mov eax, [rbp+var_14]
mov [rbp+var_20], rax
sub rax, 3; switch 4 cases
ja short def_E5EF2; jumptable 00000000000E5EF2 default case
mov rax, [rbp+var_20]
lea rcx, jpt_E5EF2
movsxd rax, ds:(jpt_E5EF2 - 1E1FACh)[rcx+rax*4]
add rax, rcx
jmp rax; switch jump
loc_E5EF4:
mov rax, [rbp+var_8]; jumptable 00000000000E5EF2 case 1
mov word ptr [rax], 20h ; ' '
mov rax, [rbp+var_8]
mov word ptr [rax+2], 0
jmp short loc_E5F3B
loc_E5F09:
mov rax, [rbp+var_8]; jumptable 00000000000E5EF2 case 2
mov word ptr [rax], 2
mov rax, [rbp+var_8]
mov word ptr [rax+2], 0
jmp short loc_E5F3B
loc_E5F1E:
mov rax, [rbp+var_8]; jumptable 00000000000E5EF2 case 3
mov word ptr [rax], 1
mov rax, [rbp+var_8]
mov word ptr [rax+2], 0
jmp short loc_E5F3B
def_E5EF2:
jmp short $+2; jumptable 00000000000E5EF2 default case
loc_E5F35:
jmp short $+2
loc_E5F37:
jmp short $+2; jumptable 00000000000E5EF2 case 0
loc_E5F39:
jmp short $+2; jumptable 00000000000E5EF2 case 0
loc_E5F3B:
mov rax, [rbp+var_10]
shr rax, 0Fh
movzx eax, ax
mov [rbp+var_24], eax
mov rdi, [rbp+var_10]
call my_uca_implicit_weight_base
mov cx, ax
mov eax, [rbp+var_24]
movzx ecx, cx
add eax, ecx
mov cx, ax
mov rax, [rbp+var_8]
mov [rax], cx
mov rax, [rbp+var_10]
and rax, 7FFFh
or rax, 8000h
mov cx, ax
mov rax, [rbp+var_8]
mov [rax+2], cx
mov rax, [rbp+var_8]
mov word ptr [rax+4], 0
add rsp, 30h
pop rbp
retn
|
_WORD * my_uca_implicit_weight_put(_WORD *a1, unsigned long long a2, int a3)
{
_WORD *result; // rax
switch ( a3 )
{
case 1:
*a1 = 32;
a1[1] = 0;
break;
case 2:
*a1 = 2;
a1[1] = 0;
break;
case 3:
*a1 = 1;
a1[1] = 0;
break;
default:
break;
}
*a1 = my_uca_implicit_weight_base(a2) + (a2 >> 15);
a1[1] = a2 & 0x7FFF | 0x8000;
result = a1;
a1[2] = 0;
return result;
}
|
my_uca_implicit_weight_put:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x30
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV dword ptr [RBP + -0x14],EDX
MOV EAX,dword ptr [RBP + -0x14]
MOV qword ptr [RBP + -0x20],RAX
SUB RAX,0x3
JA 0x001e5f33
MOV RAX,qword ptr [RBP + -0x20]
LEA RCX,[0x2e1fac]
MOVSXD RAX,dword ptr [RCX + RAX*0x4]
ADD RAX,RCX
switchD:
JMP RAX
caseD_1:
MOV RAX,qword ptr [RBP + -0x8]
MOV word ptr [RAX],0x20
MOV RAX,qword ptr [RBP + -0x8]
MOV word ptr [RAX + 0x2],0x0
JMP 0x001e5f3b
caseD_2:
MOV RAX,qword ptr [RBP + -0x8]
MOV word ptr [RAX],0x2
MOV RAX,qword ptr [RBP + -0x8]
MOV word ptr [RAX + 0x2],0x0
JMP 0x001e5f3b
caseD_3:
MOV RAX,qword ptr [RBP + -0x8]
MOV word ptr [RAX],0x1
MOV RAX,qword ptr [RBP + -0x8]
MOV word ptr [RAX + 0x2],0x0
JMP 0x001e5f3b
LAB_001e5f33:
JMP 0x001e5f35
LAB_001e5f35:
JMP 0x001e5f37
LAB_001e5f37:
JMP 0x001e5f39
caseD_0:
JMP 0x001e5f3b
LAB_001e5f3b:
MOV RAX,qword ptr [RBP + -0x10]
SHR RAX,0xf
MOVZX EAX,AX
MOV dword ptr [RBP + -0x24],EAX
MOV RDI,qword ptr [RBP + -0x10]
CALL 0x001e5fa0
MOV CX,AX
MOV EAX,dword ptr [RBP + -0x24]
MOVZX ECX,CX
ADD EAX,ECX
MOV CX,AX
MOV RAX,qword ptr [RBP + -0x8]
MOV word ptr [RAX],CX
MOV RAX,qword ptr [RBP + -0x10]
AND RAX,0x7fff
OR RAX,0x8000
MOV CX,AX
MOV RAX,qword ptr [RBP + -0x8]
MOV word ptr [RAX + 0x2],CX
MOV RAX,qword ptr [RBP + -0x8]
MOV word ptr [RAX + 0x4],0x0
ADD RSP,0x30
POP RBP
RET
|
void my_uca_implicit_weight_put(short *param_1,ulong param_2,int4 param_3)
{
short sVar1;
switch(param_3) {
default:
break;
case 1:
*param_1 = 0x20;
param_1[1] = 0;
break;
case 2:
*param_1 = 2;
param_1[1] = 0;
break;
case 3:
*param_1 = 1;
param_1[1] = 0;
}
sVar1 = my_uca_implicit_weight_base(param_2);
*param_1 = (short)(param_2 >> 0xf) + sVar1;
param_1[1] = (ushort)param_2 & 0x7fff | 0x8000;
param_1[2] = 0;
return;
}
|
|
9,334 |
nglog::LogMessage::WriteToStringAndLog()
|
ng-log[P]ng-log/src/logging.cc
|
EXCLUSIVE_LOCKS_REQUIRED(log_mutex) {
if (data_->message_ != nullptr) {
RAW_DCHECK(data_->num_chars_to_log_ > 0 &&
data_->message_text_[data_->num_chars_to_log_ - 1] == '\n',
"");
// Omit prefix of message and trailing newline when writing to message_.
const char* start = data_->message_text_ + data_->num_prefix_chars_;
size_t len = data_->num_chars_to_log_ - data_->num_prefix_chars_ - 1;
data_->message_->assign(start, len);
}
SendToLog();
}
|
O2
|
cpp
|
nglog::LogMessage::WriteToStringAndLog():
pushq %rbx
movq %rdi, %rbx
movq 0x8(%rdi), %rax
movq 0x76b0(%rax), %rdi
testq %rdi, %rdi
je 0x17860
movq 0x76c0(%rax), %rcx
testq %rcx, %rcx
je 0x17809
cmpb $0xa, 0x3(%rcx,%rax)
je 0x17846
leaq 0x13d1a(%rip), %rsi # 0x2b52a
leaq 0x13d5a(%rip), %rcx # 0x2b571
leaq 0x13d67(%rip), %r8 # 0x2b585
leaq 0x14290(%rip), %r9 # 0x2bab5
pushq $0x3
popq %rdi
movl $0x78c, %edx # imm = 0x78C
xorl %eax, %eax
callq 0x15080
movq 0x8(%rbx), %rax
movq 0x76b0(%rax), %rdi
movq 0x76c0(%rax), %rcx
movq 0x76b8(%rax), %rdx
leaq (%rax,%rdx), %rsi
addq $0x4, %rsi
notq %rdx
addq %rcx, %rdx
callq 0x14fe0
movq %rbx, %rdi
popq %rbx
jmp 0x158a0
nop
|
_ZN5nglog10LogMessage19WriteToStringAndLogEv:
push rbx
mov rbx, rdi
mov rax, [rdi+8]
mov rdi, [rax+76B0h]
test rdi, rdi
jz short loc_17860
mov rcx, [rax+76C0h]
test rcx, rcx
jz short loc_17809
cmp byte ptr [rcx+rax+3], 0Ah
jz short loc_17846
loc_17809:
lea rsi, aWorkspaceLlm4b; "/workspace/llm4binary/github/2025_star3"...
lea rcx, aCheckSFailedS; "Check %s failed: %s"
lea r8, aDataNumCharsTo; "data_->num_chars_to_log_ > 0 && data_->"...
lea r9, asc_2BAB3+2; ""
push 3
pop rdi
mov edx, 78Ch
xor eax, eax
call __ZN5nglog6RawLogENS_11LogSeverityEPKciS2_z; nglog::RawLog(nglog::LogSeverity,char const*,int,char const*,...)
mov rax, [rbx+8]
mov rdi, [rax+76B0h]
mov rcx, [rax+76C0h]
loc_17846:
mov rdx, [rax+76B8h]
lea rsi, [rax+rdx]
add rsi, 4
not rdx
add rdx, rcx
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6assignEPKcm; std::string::assign(char const*,ulong)
loc_17860:
mov rdi, rbx; this
pop rbx
jmp j__ZN5nglog10LogMessage9SendToLogEv; nglog::LogMessage::SendToLog(void)
|
long long nglog::LogMessage::WriteToStringAndLog(nglog::LogMessage *this)
{
_QWORD *v2; // rax
long long v3; // rdi
long long v4; // rcx
v2 = (_QWORD *)*((_QWORD *)this + 1);
v3 = v2[3798];
if ( v3 )
{
v4 = v2[3800];
if ( !v4 || *((_BYTE *)v2 + v4 + 3) != 10 )
{
nglog::RawLog(
3LL,
"/workspace/llm4binary/github/2025_star3/ng-log[P]ng-log/src/logging.cc",
1932LL,
"Check %s failed: %s",
"data_->num_chars_to_log_ > 0 && data_->message_text_[data_->num_chars_to_log_ - 1] == '\\n'",
"");
v2 = (_QWORD *)*((_QWORD *)this + 1);
v3 = v2[3798];
v4 = v2[3800];
}
std::string::assign(v3, (char *)v2 + v2[3799] + 4, v4 + ~v2[3799]);
}
return nglog::LogMessage::SendToLog(this);
}
|
WriteToStringAndLog:
PUSH RBX
MOV RBX,RDI
MOV RAX,qword ptr [RDI + 0x8]
MOV RDI,qword ptr [RAX + 0x76b0]
TEST RDI,RDI
JZ 0x00117860
MOV RCX,qword ptr [RAX + 0x76c0]
TEST RCX,RCX
JZ 0x00117809
CMP byte ptr [RCX + RAX*0x1 + 0x3],0xa
JZ 0x00117846
LAB_00117809:
LEA RSI,[0x12b52a]
LEA RCX,[0x12b571]
LEA R8,[0x12b585]
LEA R9,[0x12bab5]
PUSH 0x3
POP RDI
MOV EDX,0x78c
XOR EAX,EAX
CALL 0x00115080
MOV RAX,qword ptr [RBX + 0x8]
MOV RDI,qword ptr [RAX + 0x76b0]
MOV RCX,qword ptr [RAX + 0x76c0]
LAB_00117846:
MOV RDX,qword ptr [RAX + 0x76b8]
LEA RSI,[RAX + RDX*0x1]
ADD RSI,0x4
NOT RDX
ADD RDX,RCX
CALL 0x00114fe0
LAB_00117860:
MOV RDI,RBX
POP RBX
JMP 0x001158a0
|
/* nglog::LogMessage::WriteToStringAndLog() */
void __thiscall nglog::LogMessage::WriteToStringAndLog(LogMessage *this)
{
long lVar1;
char *pcVar2;
lVar1 = *(long *)(this + 8);
pcVar2 = *(char **)(lVar1 + 0x76b0);
if (pcVar2 != (char *)0x0) {
if ((*(long *)(lVar1 + 0x76c0) == 0) ||
(*(char *)(*(long *)(lVar1 + 0x76c0) + 3 + lVar1) != '\n')) {
RawLog(3,"/workspace/llm4binary/github/2025_star3/ng-log[P]ng-log/src/logging.cc",0x78c,
"Check %s failed: %s",
"data_->num_chars_to_log_ > 0 && data_->message_text_[data_->num_chars_to_log_ - 1] == \'\\n\'"
,&DAT_0012bab5);
lVar1 = *(long *)(this + 8);
pcVar2 = *(char **)(lVar1 + 0x76b0);
}
std::__cxx11::string::assign(pcVar2,lVar1 + *(long *)(lVar1 + 0x76b8) + 4);
}
SendToLog(this);
return;
}
|
|
9,335 |
strlength
|
eloqsql/mysys/mf_format.c
|
size_t strlength(const char *str)
{
reg1 const char * pos;
reg2 const char * found;
DBUG_ENTER("strlength");
pos= found= str;
while (*pos)
{
if (*pos != ' ')
{
while (*++pos && *pos != ' ') {};
if (!*pos)
{
found=pos; /* String ends here */
break;
}
}
found=pos;
while (*++pos == ' ') {};
}
DBUG_RETURN((size_t) (found - str));
}
|
O0
|
c
|
strlength:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x18(%rbp)
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rax
cmpb $0x0, (%rax)
je 0x2f063
movq -0x10(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x20, %eax
je 0x2f03c
jmp 0x2efef
movq -0x10(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x10(%rbp)
movsbl 0x1(%rax), %ecx
xorl %eax, %eax
cmpl $0x0, %ecx
movb %al, -0x19(%rbp)
je 0x2f01c
movq -0x10(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x20, %eax
setne %al
movb %al, -0x19(%rbp)
movb -0x19(%rbp), %al
testb $0x1, %al
jne 0x2f025
jmp 0x2f027
jmp 0x2efef
movq -0x10(%rbp), %rax
cmpb $0x0, (%rax)
jne 0x2f03a
movq -0x10(%rbp), %rax
movq %rax, -0x18(%rbp)
jmp 0x2f063
jmp 0x2f03c
movq -0x10(%rbp), %rax
movq %rax, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x10(%rbp)
movsbl 0x1(%rax), %eax
cmpl $0x20, %eax
jne 0x2f05e
jmp 0x2f044
jmp 0x2efd4
jmp 0x2f065
movq -0x18(%rbp), %rax
movq -0x8(%rbp), %rcx
subq %rcx, %rax
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
popq %rbp
retq
nopw (%rax,%rax)
|
strlength:
push rbp
mov rbp, rsp
mov [rbp+var_8], rdi
mov rax, [rbp+var_8]
mov [rbp+var_18], rax
mov [rbp+var_10], rax
loc_2EFD4:
mov rax, [rbp+var_10]
cmp byte ptr [rax], 0
jz loc_2F063
mov rax, [rbp+var_10]
movsx eax, byte ptr [rax]
cmp eax, 20h ; ' '
jz short loc_2F03C
jmp short $+2
loc_2EFEF:
mov rax, [rbp+var_10]
mov rcx, rax
add rcx, 1
mov [rbp+var_10], rcx
movsx ecx, byte ptr [rax+1]
xor eax, eax
cmp ecx, 0
mov [rbp+var_19], al
jz short loc_2F01C
mov rax, [rbp+var_10]
movsx eax, byte ptr [rax]
cmp eax, 20h ; ' '
setnz al
mov [rbp+var_19], al
loc_2F01C:
mov al, [rbp+var_19]
test al, 1
jnz short loc_2F025
jmp short loc_2F027
loc_2F025:
jmp short loc_2EFEF
loc_2F027:
mov rax, [rbp+var_10]
cmp byte ptr [rax], 0
jnz short loc_2F03A
mov rax, [rbp+var_10]
mov [rbp+var_18], rax
jmp short loc_2F063
loc_2F03A:
jmp short $+2
loc_2F03C:
mov rax, [rbp+var_10]
mov [rbp+var_18], rax
loc_2F044:
mov rax, [rbp+var_10]
mov rcx, rax
add rcx, 1
mov [rbp+var_10], rcx
movsx eax, byte ptr [rax+1]
cmp eax, 20h ; ' '
jnz short loc_2F05E
jmp short loc_2F044
loc_2F05E:
jmp loc_2EFD4
loc_2F063:
jmp short $+2
loc_2F065:
mov rax, [rbp+var_18]
mov rcx, [rbp+var_8]
sub rax, rcx
mov [rbp+var_28], rax
mov rax, [rbp+var_28]
pop rbp
retn
|
long long strlength(_BYTE *a1)
{
_BYTE *v1; // rax
_BYTE *v2; // rax
bool v4; // [rsp+Fh] [rbp-19h]
_BYTE *v5; // [rsp+10h] [rbp-18h]
_BYTE *v6; // [rsp+18h] [rbp-10h]
v5 = a1;
v6 = a1;
while ( *v6 )
{
if ( *v6 != 32 )
{
do
{
v1 = v6++;
v4 = 0;
if ( v1[1] )
v4 = *v6 != 32;
}
while ( v4 );
if ( !*v6 )
{
v5 = v6;
return v5 - a1;
}
}
v5 = v6;
do
v2 = v6++;
while ( v2[1] == 32 );
}
return v5 - a1;
}
|
strlength:
PUSH RBP
MOV RBP,RSP
MOV qword ptr [RBP + -0x8],RDI
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RBP + -0x18],RAX
MOV qword ptr [RBP + -0x10],RAX
LAB_0012efd4:
MOV RAX,qword ptr [RBP + -0x10]
CMP byte ptr [RAX],0x0
JZ 0x0012f063
MOV RAX,qword ptr [RBP + -0x10]
MOVSX EAX,byte ptr [RAX]
CMP EAX,0x20
JZ 0x0012f03c
JMP 0x0012efef
LAB_0012efef:
MOV RAX,qword ptr [RBP + -0x10]
MOV RCX,RAX
ADD RCX,0x1
MOV qword ptr [RBP + -0x10],RCX
MOVSX ECX,byte ptr [RAX + 0x1]
XOR EAX,EAX
CMP ECX,0x0
MOV byte ptr [RBP + -0x19],AL
JZ 0x0012f01c
MOV RAX,qword ptr [RBP + -0x10]
MOVSX EAX,byte ptr [RAX]
CMP EAX,0x20
SETNZ AL
MOV byte ptr [RBP + -0x19],AL
LAB_0012f01c:
MOV AL,byte ptr [RBP + -0x19]
TEST AL,0x1
JNZ 0x0012f025
JMP 0x0012f027
LAB_0012f025:
JMP 0x0012efef
LAB_0012f027:
MOV RAX,qword ptr [RBP + -0x10]
CMP byte ptr [RAX],0x0
JNZ 0x0012f03a
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RBP + -0x18],RAX
JMP 0x0012f063
LAB_0012f03a:
JMP 0x0012f03c
LAB_0012f03c:
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RBP + -0x18],RAX
LAB_0012f044:
MOV RAX,qword ptr [RBP + -0x10]
MOV RCX,RAX
ADD RCX,0x1
MOV qword ptr [RBP + -0x10],RCX
MOVSX EAX,byte ptr [RAX + 0x1]
CMP EAX,0x20
JNZ 0x0012f05e
JMP 0x0012f044
LAB_0012f05e:
JMP 0x0012efd4
LAB_0012f063:
JMP 0x0012f065
LAB_0012f065:
MOV RAX,qword ptr [RBP + -0x18]
MOV RCX,qword ptr [RBP + -0x8]
SUB RAX,RCX
MOV qword ptr [RBP + -0x28],RAX
MOV RAX,qword ptr [RBP + -0x28]
POP RBP
RET
|
long strlength(char *param_1)
{
char *pcVar1;
char *pcVar2;
bool bVar3;
char *local_20;
char *local_18;
local_20 = param_1;
local_18 = param_1;
while (*local_18 != '\0') {
if (*local_18 != ' ') {
do {
local_20 = local_18 + 1;
bVar3 = false;
if (local_18[1] != '\0') {
bVar3 = *local_20 != ' ';
}
local_18 = local_20;
} while (bVar3);
if (*local_20 == '\0') break;
}
local_20 = local_18;
do {
pcVar2 = local_18 + 1;
pcVar1 = local_18 + 1;
local_18 = pcVar2;
} while (*pcVar1 == ' ');
}
return (long)local_20 - (long)param_1;
}
|
|
9,336 |
ggml_easy::ctx::get_tensor_data(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
|
ngxson[P]ggml-easy/ggml-easy.h
|
std::pair<ggml_tensor *, std::vector<uint8_t>> get_tensor_data(const std::string & name) {
ggml_tensor * t = ggml_get_tensor(ctx_gf, name.c_str());
if (!t) {
throw std::runtime_error(string_format("tensor not found: %s", name.c_str()));
}
std::vector<uint8_t> data(ggml_nbytes(t));
ggml_backend_tensor_get(t, data.data(), 0, ggml_nbytes(t));
return std::make_pair(t, data);
}
|
O0
|
c
|
ggml_easy::ctx::get_tensor_data(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&):
subq $0xb8, %rsp
movq %rdi, 0x30(%rsp)
movq %rdi, %rax
movq %rax, 0x38(%rsp)
movq %rdi, 0xb0(%rsp)
movq %rsi, 0xa8(%rsp)
movq %rdx, 0xa0(%rsp)
movq 0xa8(%rsp), %rax
movq 0x48(%rax), %rax
movq %rax, 0x40(%rsp)
movq 0xa0(%rsp), %rdi
callq 0x8160
movq 0x40(%rsp), %rdi
movq %rax, %rsi
callq 0x8470
movq %rax, 0x98(%rsp)
cmpq $0x0, 0x98(%rsp)
jne 0xc24a
movb $0x1, 0x6b(%rsp)
movl $0x10, %edi
callq 0x81d0
movq %rax, 0x28(%rsp)
movq 0xa0(%rsp), %rdi
callq 0x8160
movq %rax, %rdx
leaq 0x817b(%rip), %rsi # 0x14344
xorl %eax, %eax
leaq 0x78(%rsp), %rdi
callq 0x9c50
jmp 0xc1d7
movq 0x28(%rsp), %rdi
leaq 0x78(%rsp), %rsi
callq 0x8550
jmp 0xc1e8
movq 0x28(%rsp), %rdi
movb $0x0, 0x6b(%rsp)
movq 0xedf7(%rip), %rsi # 0x1aff0
movq 0xedb8(%rip), %rdx # 0x1afb8
callq 0x85d0
jmp 0xc33f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x70(%rsp)
movl %eax, 0x6c(%rsp)
jmp 0xc232
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x70(%rsp)
movl %eax, 0x6c(%rsp)
leaq 0x78(%rsp), %rdi
callq 0x8260
testb $0x1, 0x6b(%rsp)
jne 0xc23b
jmp 0xc245
movq 0x28(%rsp), %rdi
callq 0x82d0
jmp 0xc335
movq 0x98(%rsp), %rdi
callq 0x8090
movq %rax, 0x18(%rsp)
leaq 0x4f(%rsp), %rdi
movq %rdi, 0x20(%rsp)
callq 0x10cb0
movq 0x18(%rsp), %rsi
movq 0x20(%rsp), %rdx
leaq 0x50(%rsp), %rdi
callq 0x10cc0
jmp 0xc281
leaq 0x4f(%rsp), %rdi
callq 0x10d40
movq 0x98(%rsp), %rax
movq %rax, (%rsp)
leaq 0x50(%rsp), %rdi
callq 0xc340
movq %rax, 0x8(%rsp)
movq 0x98(%rsp), %rdi
callq 0x8090
movq %rax, 0x10(%rsp)
jmp 0xc2ba
movq 0x10(%rsp), %rcx
movq 0x8(%rsp), %rsi
movq (%rsp), %rdi
xorl %eax, %eax
movl %eax, %edx
callq 0x83e0
jmp 0xc2d3
movq 0x30(%rsp), %rdi
leaq 0x98(%rsp), %rsi
leaq 0x50(%rsp), %rdx
callq 0x10f80
jmp 0xc2ec
leaq 0x50(%rsp), %rdi
callq 0xd7c0
movq 0x38(%rsp), %rax
addq $0xb8, %rsp
retq
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x70(%rsp)
movl %eax, 0x6c(%rsp)
leaq 0x4f(%rsp), %rdi
callq 0x10d40
jmp 0xc335
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x70(%rsp)
movl %eax, 0x6c(%rsp)
leaq 0x50(%rsp), %rdi
callq 0xd7c0
movq 0x70(%rsp), %rdi
callq 0x8620
nop
|
_ZN9ggml_easy3ctx15get_tensor_dataERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE:
sub rsp, 0B8h
mov [rsp+0B8h+var_88], rdi
mov rax, rdi
mov [rsp+0B8h+var_80], rax
mov [rsp+0B8h+var_8], rdi
mov [rsp+0B8h+var_10], rsi
mov [rsp+0B8h+var_18], rdx
mov rax, [rsp+0B8h+var_10]
mov rax, [rax+48h]
mov [rsp+0B8h+var_78], rax
mov rdi, [rsp+0B8h+var_18]
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5c_strEv; std::string::c_str(void)
mov rdi, [rsp+0B8h+var_78]
mov rsi, rax
call _ggml_get_tensor
mov [rsp+0B8h+var_20], rax
cmp [rsp+0B8h+var_20], 0
jnz loc_C24A
mov [rsp+0B8h+var_4D], 1
mov edi, 10h; thrown_size
call ___cxa_allocate_exception
mov [rsp+0B8h+var_90], rax
mov rdi, [rsp+0B8h+var_18]
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5c_strEv; std::string::c_str(void)
mov rdx, rax
lea rsi, aTensorNotFound; "tensor not found: %s"
xor eax, eax
lea rdi, [rsp+0B8h+var_40]
call _ZN9ggml_easy13string_formatB5cxx11EPKcz; ggml_easy::string_format(char const*,...)
jmp short $+2
loc_C1D7:
mov rdi, [rsp+0B8h+var_90]
lea rsi, [rsp+0B8h+var_40]
call __ZNSt13runtime_errorC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; std::runtime_error::runtime_error(std::string const&)
jmp short $+2
loc_C1E8:
mov rdi, [rsp+0B8h+var_90]; void *
mov [rsp+0B8h+var_4D], 0
mov rsi, cs:lptinfo; lptinfo
mov rdx, cs:_ZNSt13runtime_errorD1Ev_ptr; void (*)(void *)
call ___cxa_throw
jmp loc_C33F
mov rcx, rax
mov eax, edx
mov [rsp+arg_68], rcx
mov [rsp+arg_64], eax
jmp short loc_C232
mov rcx, rax
mov eax, edx
mov [rsp+arg_68], rcx
mov [rsp+arg_64], eax
lea rdi, [rsp+arg_70]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
loc_C232:
test [rsp+arg_63], 1
jnz short loc_C23B
jmp short loc_C245
loc_C23B:
mov rdi, [rsp+arg_20]; void *
call ___cxa_free_exception
loc_C245:
jmp loc_C335
loc_C24A:
mov rdi, [rsp+0B8h+var_20]
call _ggml_nbytes
mov [rsp+0B8h+var_A0], rax
lea rdi, [rsp+0B8h+var_69]
mov [rsp+0B8h+var_98], rdi
call _ZNSaIhEC2Ev; std::allocator<uchar>::allocator(void)
mov rsi, [rsp+0B8h+var_A0]
mov rdx, [rsp+0B8h+var_98]
lea rdi, [rsp+0B8h+var_68]
call _ZNSt6vectorIhSaIhEEC2EmRKS0_; std::vector<uchar>::vector(ulong,std::allocator<uchar> const&)
jmp short $+2
loc_C281:
lea rdi, [rsp+0B8h+var_69]
call _ZNSaIhED2Ev; std::allocator<uchar>::~allocator()
mov rax, [rsp+0B8h+var_20]
mov [rsp+0B8h+var_B8], rax
lea rdi, [rsp+0B8h+var_68]
call _ZNSt6vectorIhSaIhEE4dataEv; std::vector<uchar>::data(void)
mov [rsp+0B8h+var_B0], rax
mov rdi, [rsp+0B8h+var_20]
call _ggml_nbytes
mov [rsp+0B8h+var_A8], rax
jmp short $+2
loc_C2BA:
mov rcx, [rsp+0B8h+var_A8]
mov rsi, [rsp+0B8h+var_B0]
mov rdi, [rsp+0B8h+var_B8]
xor eax, eax
mov edx, eax
call _ggml_backend_tensor_get
jmp short $+2
loc_C2D3:
mov rdi, [rsp+0B8h+var_88]
lea rsi, [rsp+0B8h+var_20]
lea rdx, [rsp+0B8h+var_68]
call _ZSt9make_pairIRP11ggml_tensorRSt6vectorIhSaIhEEESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS8_INS9_IT0_E4typeEE6__typeEEOSA_OSF_; std::make_pair<ggml_tensor *&,std::vector<uchar> &>(ggml_tensor *&&&,std::vector<uchar> &&&)
jmp short $+2
loc_C2EC:
lea rdi, [rsp+0B8h+var_68]
call _ZNSt6vectorIhSaIhEED2Ev; std::vector<uchar>::~vector()
mov rax, [rsp+0B8h+var_80]
add rsp, 0B8h
retn
mov rcx, rax
mov eax, edx
mov [rsp+arg_68], rcx
mov [rsp+arg_64], eax
lea rdi, [rsp+arg_47]
call _ZNSaIhED2Ev; std::allocator<uchar>::~allocator()
jmp short loc_C335
mov rcx, rax
mov eax, edx
mov [rsp+arg_68], rcx
mov [rsp+arg_64], eax
lea rdi, [rsp+arg_48]
call _ZNSt6vectorIhSaIhEED2Ev; std::vector<uchar>::~vector()
loc_C335:
mov rdi, [rsp+arg_68]
call __Unwind_Resume
loc_C33F:
nop
|
long long ggml_easy::ctx::get_tensor_data(
long long a1,
long long a2,
long long a3,
__m128 a4,
__m128 a5,
__m128 a6,
__m128 a7,
double a8,
double a9,
__m128 a10,
__m128 a11)
{
long long v11; // rsi
long long v12; // rax
long long v13; // rcx
long long v14; // r8
long long v15; // r9
__m128 v16; // xmm4
__m128 v17; // xmm5
int v18; // ecx
int v19; // r8d
int v20; // r9d
char v22; // [rsp+0h] [rbp-B8h]
long long v23; // [rsp+0h] [rbp-B8h]
long long v24; // [rsp+8h] [rbp-B0h]
long long v25; // [rsp+10h] [rbp-A8h]
int v26; // [rsp+18h] [rbp-A0h]
void *exception; // [rsp+28h] [rbp-90h]
long long v28; // [rsp+40h] [rbp-78h]
char v29; // [rsp+4Fh] [rbp-69h] BYREF
_BYTE v30[40]; // [rsp+50h] [rbp-68h] BYREF
_BYTE v31[32]; // [rsp+78h] [rbp-40h] BYREF
long long tensor; // [rsp+98h] [rbp-20h] BYREF
long long v33; // [rsp+A0h] [rbp-18h]
long long v34; // [rsp+A8h] [rbp-10h]
long long v35; // [rsp+B0h] [rbp-8h]
v35 = a1;
v34 = a2;
v33 = a3;
v28 = *(_QWORD *)(a2 + 72);
v11 = std::string::c_str(a3);
tensor = ggml_get_tensor(v28, v11);
if ( !tensor )
{
exception = __cxa_allocate_exception(0x10uLL);
v12 = std::string::c_str(v33);
ggml_easy::string_format[abi:cxx11](
(long long)v31,
(long long)"tensor not found: %s",
v12,
v13,
v14,
v15,
a4,
a5,
a6,
a7,
v16,
v17,
a10,
a11,
v22);
std::runtime_error::runtime_error(exception, v31);
v30[27] = 0;
__cxa_throw(
exception,
(struct type_info *)&`typeinfo for'std::runtime_error,
(void (*)(void *))&std::runtime_error::~runtime_error);
}
v26 = ggml_nbytes(tensor);
std::allocator<unsigned char>::allocator();
std::vector<unsigned char>::vector((unsigned int)v30, v26, (unsigned int)&v29, v18, v19, v20);
std::allocator<unsigned char>::~allocator(&v29);
v23 = tensor;
v24 = std::vector<unsigned char>::data(v30);
v25 = ggml_nbytes(tensor);
ggml_backend_tensor_get(v23, v24, 0LL, v25);
std::make_pair<ggml_tensor *&,std::vector<unsigned char> &>(a1, &tensor, v30);
std::vector<unsigned char>::~vector(v30);
return a1;
}
|
get_tensor_data:
SUB RSP,0xb8
MOV qword ptr [RSP + 0x30],RDI
MOV RAX,RDI
MOV qword ptr [RSP + 0x38],RAX
MOV qword ptr [RSP + 0xb0],RDI
MOV qword ptr [RSP + 0xa8],RSI
MOV qword ptr [RSP + 0xa0],RDX
MOV RAX,qword ptr [RSP + 0xa8]
MOV RAX,qword ptr [RAX + 0x48]
MOV qword ptr [RSP + 0x40],RAX
MOV RDI,qword ptr [RSP + 0xa0]
CALL 0x00108160
MOV RDI,qword ptr [RSP + 0x40]
MOV RSI,RAX
CALL 0x00108470
MOV qword ptr [RSP + 0x98],RAX
CMP qword ptr [RSP + 0x98],0x0
JNZ 0x0010c24a
MOV byte ptr [RSP + 0x6b],0x1
MOV EDI,0x10
CALL 0x001081d0
MOV qword ptr [RSP + 0x28],RAX
MOV RDI,qword ptr [RSP + 0xa0]
CALL 0x00108160
MOV RDX,RAX
LAB_0010c1c2:
LEA RSI,[0x114344]
XOR EAX,EAX
LEA RDI,[RSP + 0x78]
CALL 0x00109c50
JMP 0x0010c1d7
LAB_0010c1d7:
MOV RDI,qword ptr [RSP + 0x28]
LEA RSI,[RSP + 0x78]
CALL 0x00108550
JMP 0x0010c1e8
LAB_0010c1e8:
MOV RDI,qword ptr [RSP + 0x28]
MOV byte ptr [RSP + 0x6b],0x0
MOV RSI,qword ptr [0x0011aff0]
MOV RDX,qword ptr [0x0011afb8]
CALL 0x001085d0
LAB_0010c24a:
MOV RDI,qword ptr [RSP + 0x98]
CALL 0x00108090
MOV qword ptr [RSP + 0x18],RAX
LEA RDI,[RSP + 0x4f]
MOV qword ptr [RSP + 0x20],RDI
CALL 0x00110cb0
MOV RSI,qword ptr [RSP + 0x18]
MOV RDX,qword ptr [RSP + 0x20]
LAB_0010c275:
LEA RDI,[RSP + 0x50]
CALL 0x00110cc0
JMP 0x0010c281
LAB_0010c281:
LEA RDI,[RSP + 0x4f]
CALL 0x00110d40
MOV RAX,qword ptr [RSP + 0x98]
MOV qword ptr [RSP],RAX
LEA RDI,[RSP + 0x50]
CALL 0x0010c340
MOV qword ptr [RSP + 0x8],RAX
MOV RDI,qword ptr [RSP + 0x98]
LAB_0010c2ae:
CALL 0x00108090
MOV qword ptr [RSP + 0x10],RAX
JMP 0x0010c2ba
LAB_0010c2ba:
MOV RCX,qword ptr [RSP + 0x10]
MOV RSI,qword ptr [RSP + 0x8]
MOV RDI,qword ptr [RSP]
XOR EAX,EAX
MOV EDX,EAX
CALL 0x001083e0
JMP 0x0010c2d3
LAB_0010c2d3:
MOV RDI,qword ptr [RSP + 0x30]
LEA RSI,[RSP + 0x98]
LEA RDX,[RSP + 0x50]
CALL 0x00110f80
LAB_0010c2ea:
JMP 0x0010c2ec
LAB_0010c2ec:
LEA RDI,[RSP + 0x50]
CALL 0x0010d7c0
MOV RAX,qword ptr [RSP + 0x38]
ADD RSP,0xb8
RET
|
/* ggml_easy::ctx::get_tensor_data(std::__cxx11::string const&) */
string * ggml_easy::ctx::get_tensor_data(string *param_1)
{
long lVar1;
int8 uVar2;
runtime_error *this;
int8 uVar3;
ulong uVar4;
long in_RSI;
allocator<unsigned_char> local_69;
vector<unsigned_char,std::allocator<unsigned_char>> local_68 [27];
int1 local_4d;
string local_40 [32];
long local_20 [3];
string *local_8;
uVar3 = *(int8 *)(in_RSI + 0x48);
local_8 = param_1;
uVar2 = std::__cxx11::string::c_str();
local_20[0] = ggml_get_tensor(uVar3,uVar2);
if (local_20[0] == 0) {
local_4d = 1;
this = (runtime_error *)__cxa_allocate_exception(0x10);
uVar3 = std::__cxx11::string::c_str();
/* try { // try from 0010c1c2 to 0010c1d4 has its CatchHandler @ 0010c20a */
string_format_abi_cxx11_((char *)local_40,"tensor not found: %s",uVar3);
/* try { // try from 0010c1d7 to 0010c204 has its CatchHandler @ 0010c21a */
std::runtime_error::runtime_error(this,local_40);
local_4d = 0;
/* WARNING: Subroutine does not return */
__cxa_throw(this,PTR_typeinfo_0011aff0,PTR__runtime_error_0011afb8);
}
uVar4 = ggml_nbytes(local_20[0]);
std::allocator<unsigned_char>::allocator(&local_69);
/* try { // try from 0010c275 to 0010c27e has its CatchHandler @ 0010c303 */
std::vector<unsigned_char,std::allocator<unsigned_char>>::vector
(local_68,uVar4,(allocator *)&local_69);
std::allocator<unsigned_char>::~allocator(&local_69);
lVar1 = local_20[0];
uVar3 = std::vector<unsigned_char,std::allocator<unsigned_char>>::data(local_68);
/* try { // try from 0010c2ae to 0010c2e9 has its CatchHandler @ 0010c31d */
uVar2 = ggml_nbytes(local_20[0]);
ggml_backend_tensor_get(lVar1,uVar3,0,uVar2);
std::make_pair<ggml_tensor*&,std::vector<unsigned_char,std::allocator<unsigned_char>>&>
((ggml_tensor **)param_1,(vector *)local_20);
std::vector<unsigned_char,std::allocator<unsigned_char>>::~vector(local_68);
return param_1;
}
|
|
9,337 |
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);
}
}
|
O3
|
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 %r15
pushq %r14
pushq %rbx
subq $0x28, %rsp
movq %rdi, %r14
movq (%rdi), %rax
cmpq (%rsi), %rax
jne 0x5ea79
testq %rax, %rax
je 0x5ead7
movzbl (%rax), %eax
cmpl $0x2, %eax
je 0x5ea59
cmpl $0x1, %eax
jne 0x5ea63
movq 0x8(%r14), %rax
cmpq 0x8(%rsi), %rax
jmp 0x5ea6b
movq 0x10(%r14), %rax
cmpq 0x10(%rsi), %rax
jmp 0x5ea6b
movq 0x18(%r14), %rax
cmpq 0x18(%rsi), %rax
sete %al
addq $0x28, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movl $0x20, %edi
callq 0x1a450
movq %rax, %rbx
leaq 0x18(%rsp), %r15
movq %r15, -0x10(%r15)
leaq 0x8ead8(%rip), %rsi # 0xed56e
leaq 0x8eb01(%rip), %rdx # 0xed59e
leaq 0x8(%rsp), %rdi
callq 0x22338
movq (%r14), %rcx
movb $0x1, %bpl
leaq 0x8(%rsp), %rdx
movq %rbx, %rdi
movl $0xd4, %esi
callq 0x5eb2c
xorl %ebp, %ebp
leaq 0xcb450(%rip), %rsi # 0x129f18
leaq -0x38ad(%rip), %rdx # 0x5b222
movq %rbx, %rdi
callq 0x1af30
leaq 0x8da6b(%rip), %rdi # 0xec549
leaq 0x8daae(%rip), %rdx # 0xec593
leaq 0x92d31(%rip), %rcx # 0xf181d
movl $0x3422, %esi # imm = 0x3422
xorl %eax, %eax
callq 0x1aeb0
movq %rax, %r14
movq 0x8(%rsp), %rdi
cmpq %r15, %rdi
je 0x5eb12
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x1a8f0
testb %bpl, %bpl
jne 0x5eb1c
jmp 0x5eb24
movq %rax, %r14
movq %rbx, %rdi
callq 0x1a690
movq %r14, %rdi
callq 0x1afb0
|
_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 r15; int
push r14; __int64
push rbx; int
sub rsp, 28h
mov r14, rdi
mov rax, [rdi]
cmp rax, [rsi]
jnz short loc_5EA79
test rax, rax
jz loc_5EAD7
movzx eax, byte ptr [rax]
cmp eax, 2
jz short loc_5EA59
cmp eax, 1
jnz short loc_5EA63
mov rax, [r14+8]
cmp rax, [rsi+8]
jmp short loc_5EA6B
loc_5EA59:
mov rax, [r14+10h]
cmp rax, [rsi+10h]
jmp short loc_5EA6B
loc_5EA63:
mov rax, [r14+18h]
cmp rax, [rsi+18h]
loc_5EA6B:
setz al
add rsp, 28h
pop rbx
pop r14
pop r15
pop rbp
retn
loc_5EA79:
mov edi, 20h ; ' '; thrown_size
call ___cxa_allocate_exception
mov rbx, rax
lea r15, [rsp+48h+var_30]
mov [r15-10h], r15
lea rsi, aCannotCompareI; "cannot compare iterators of different c"...
lea rdx, aCannotCompareI+30h; ""
lea rdi, [rsp+48h+var_40]
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag; std::string::_M_construct<char const*>(char const*,char const*,std::forward_iterator_tag)
mov rcx, [r14]
mov bpl, 1
lea rdx, [rsp+48h+var_40]
mov rdi, rbx; this
mov esi, 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_5EAD7:
lea rdi, aWorkspaceLlm4b_0; "/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
mov rdi, [rsp+48h+var_40]; void *
cmp rdi, r15
jz short loc_5EB12
mov rsi, [rsp+48h+var_30]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_5EB12:
test bpl, bpl
jnz short loc_5EB1C
jmp short loc_5EB24
mov r14, rax
loc_5EB1C:
mov rdi, rbx; void *
call ___cxa_free_exception
loc_5EB24:
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 R15
PUSH R14
PUSH RBX
SUB RSP,0x28
MOV R14,RDI
MOV RAX,qword ptr [RDI]
CMP RAX,qword ptr [RSI]
JNZ 0x0015ea79
TEST RAX,RAX
JZ 0x0015ead7
MOVZX EAX,byte ptr [RAX]
CMP EAX,0x2
JZ 0x0015ea59
CMP EAX,0x1
JNZ 0x0015ea63
MOV RAX,qword ptr [R14 + 0x8]
CMP RAX,qword ptr [RSI + 0x8]
JMP 0x0015ea6b
LAB_0015ea59:
MOV RAX,qword ptr [R14 + 0x10]
CMP RAX,qword ptr [RSI + 0x10]
JMP 0x0015ea6b
LAB_0015ea63:
MOV RAX,qword ptr [R14 + 0x18]
CMP RAX,qword ptr [RSI + 0x18]
LAB_0015ea6b:
SETZ AL
ADD RSP,0x28
POP RBX
POP R14
POP R15
POP RBP
RET
LAB_0015ea79:
MOV EDI,0x20
CALL 0x0011a450
MOV RBX,RAX
LEA R15,[RSP + 0x18]
MOV qword ptr [R15 + -0x10],R15
LAB_0015ea8f:
LEA RSI,[0x1ed56e]
LEA RDX,[0x1ed59e]
LEA RDI,[RSP + 0x8]
CALL 0x00122338
MOV RCX,qword ptr [R14]
MOV BPL,0x1
LAB_0015eaad:
LEA RDX,[RSP + 0x8]
MOV RDI,RBX
MOV ESI,0xd4
CALL 0x0015eb2c
XOR EBP,EBP
LEA RSI,[0x229f18]
LEA RDX,[0x15b222]
MOV RDI,RBX
CALL 0x0011af30
LAB_0015ead7:
LEA RDI,[0x1ec549]
LEA RDX,[0x1ec593]
LEA RCX,[0x1f181d]
MOV ESI,0x3422
XOR EAX,EAX
CALL 0x0011aeb0
|
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;
int1 *local_40 [2];
int1 local_30 [16];
pcVar1 = (char *)*param_1;
if (pcVar1 != (char *)*param_2) {
uVar3 = __cxa_allocate_exception(0x20);
local_40[0] = local_30;
/* try { // try from 0015ea8f to 0015eaa6 has its CatchHandler @ 0015eb19 */
std::__cxx11::string::_M_construct<char_const*>
(local_40,"cannot compare iterators of different containers","");
/* try { // try from 0015eaad to 0015ead6 has its CatchHandler @ 0015eaf8 */
_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_40,*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");
}
|
||
9,338 |
get_defaults_options
|
eloqsql/mysys/my_default.c
|
int get_defaults_options(char **argv)
{
static char file_buffer[FN_REFLEN];
static char extra_file_buffer[FN_REFLEN];
char **orig_argv= argv;
argv++; /* Skip program name */
my_defaults_file= my_defaults_group_suffix= my_defaults_extra_file= 0;
my_no_defaults= my_print_defaults= FALSE;
if (*argv && !strcmp(*argv, "--no-defaults"))
{
my_no_defaults= 1;
argv++;
}
else
for(; *argv; argv++)
{
if (!my_defaults_file && is_prefix(*argv, "--defaults-file="))
my_defaults_file= *argv + sizeof("--defaults-file=")-1;
else
if (!my_defaults_extra_file && is_prefix(*argv, "--defaults-extra-file="))
my_defaults_extra_file= *argv + sizeof("--defaults-extra-file=")-1;
else
if (!my_defaults_group_suffix && is_prefix(*argv, "--defaults-group-suffix="))
my_defaults_group_suffix= *argv + sizeof("--defaults-group-suffix=")-1;
else
break;
}
if (*argv && !strcmp(*argv, "--print-defaults"))
{
my_print_defaults= 1;
my_defaults_mark_files= FALSE;
argv++;
}
if (! my_defaults_group_suffix)
my_defaults_group_suffix= getenv("MYSQL_GROUP_SUFFIX");
if (my_defaults_extra_file && my_defaults_extra_file != extra_file_buffer)
{
my_realpath(extra_file_buffer, my_defaults_extra_file, MYF(0));
my_defaults_extra_file= extra_file_buffer;
}
if (my_defaults_file && my_defaults_file != file_buffer)
{
my_realpath(file_buffer, my_defaults_file, MYF(0));
my_defaults_file= file_buffer;
}
return (int)(argv - orig_argv);
}
|
O0
|
c
|
get_defaults_options:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x10(%rbp)
movq -0x8(%rbp), %rax
addq $0x8, %rax
movq %rax, -0x8(%rbp)
leaq 0xbb67d1(%rip), %rax # 0xcb7bd8
movq $0x0, (%rax)
leaq 0xbb67bb(%rip), %rax # 0xcb7bd0
movq $0x0, (%rax)
leaq 0xbb67a5(%rip), %rax # 0xcb7bc8
movq $0x0, (%rax)
leaq 0xbb6791(%rip), %rax # 0xcb7bc2
movb $0x0, (%rax)
leaq 0xbb6786(%rip), %rax # 0xcb7bc1
movb $0x0, (%rax)
movq -0x8(%rbp), %rax
cmpq $0x0, (%rax)
je 0x10147b
movq -0x8(%rbp), %rax
movq (%rax), %rdi
leaq 0x83260(%rip), %rsi # 0x1846b6
callq 0x2a710
cmpl $0x0, %eax
jne 0x10147b
leaq 0xbb675a(%rip), %rax # 0xcb7bc1
movb $0x1, (%rax)
movq -0x8(%rbp), %rax
addq $0x8, %rax
movq %rax, -0x8(%rbp)
jmp 0x101569
jmp 0x10147d
movq -0x8(%rbp), %rax
cmpq $0x0, (%rax)
je 0x101567
leaq 0xbb6736(%rip), %rax # 0xcb7bc8
cmpq $0x0, (%rax)
jne 0x1014ce
movq -0x8(%rbp), %rax
movq (%rax), %rdi
leaq 0x8321e(%rip), %rsi # 0x1846c4
callq 0x176e90
cmpl $0x0, %eax
je 0x1014ce
movq -0x8(%rbp), %rax
movq (%rax), %rcx
addq $0x11, %rcx
addq $-0x1, %rcx
leaq 0xbb6702(%rip), %rax # 0xcb7bc8
movq %rcx, (%rax)
jmp 0x101554
leaq 0xbb6703(%rip), %rax # 0xcb7bd8
cmpq $0x0, (%rax)
jne 0x10150e
movq -0x8(%rbp), %rax
movq (%rax), %rdi
leaq 0x831ec(%rip), %rsi # 0x1846d5
callq 0x176e90
cmpl $0x0, %eax
je 0x10150e
movq -0x8(%rbp), %rax
movq (%rax), %rcx
addq $0x17, %rcx
addq $-0x1, %rcx
leaq 0xbb66cf(%rip), %rax # 0xcb7bd8
movq %rcx, (%rax)
jmp 0x101552
leaq 0xbb66bb(%rip), %rax # 0xcb7bd0
cmpq $0x0, (%rax)
jne 0x10154e
movq -0x8(%rbp), %rax
movq (%rax), %rdi
leaq 0x831c3(%rip), %rsi # 0x1846ec
callq 0x176e90
cmpl $0x0, %eax
je 0x10154e
movq -0x8(%rbp), %rax
movq (%rax), %rcx
addq $0x19, %rcx
addq $-0x1, %rcx
leaq 0xbb6687(%rip), %rax # 0xcb7bd0
movq %rcx, (%rax)
jmp 0x101550
jmp 0x101567
jmp 0x101552
jmp 0x101554
jmp 0x101556
movq -0x8(%rbp), %rax
addq $0x8, %rax
movq %rax, -0x8(%rbp)
jmp 0x10147d
jmp 0x101569
movq -0x8(%rbp), %rax
cmpq $0x0, (%rax)
je 0x1015ab
movq -0x8(%rbp), %rax
movq (%rax), %rdi
leaq 0x83184(%rip), %rsi # 0x184705
callq 0x2a710
cmpl $0x0, %eax
jne 0x1015ab
leaq 0xbb6630(%rip), %rax # 0xcb7bc2
movb $0x1, (%rax)
leaq 0xbb6624(%rip), %rax # 0xcb7bc0
movb $0x0, (%rax)
movq -0x8(%rbp), %rax
addq $0x8, %rax
movq %rax, -0x8(%rbp)
leaq 0xbb661e(%rip), %rax # 0xcb7bd0
cmpq $0x0, (%rax)
jne 0x1015d1
leaq 0x83157(%rip), %rdi # 0x184716
callq 0x2a670
movq %rax, %rcx
leaq 0xbb6602(%rip), %rax # 0xcb7bd0
movq %rcx, (%rax)
leaq 0xbb6600(%rip), %rax # 0xcb7bd8
cmpq $0x0, (%rax)
je 0x10161c
leaq 0xbb67fb(%rip), %rcx # 0xcb7de0
leaq 0xbb65ec(%rip), %rax # 0xcb7bd8
cmpq %rcx, (%rax)
je 0x10161c
leaq 0xbb65e0(%rip), %rax # 0xcb7bd8
movq (%rax), %rsi
leaq 0xbb67de(%rip), %rdi # 0xcb7de0
xorl %eax, %eax
movl %eax, %edx
callq 0x1214e0
leaq 0xbb65c6(%rip), %rax # 0xcb7bd8
leaq 0xbb67c7(%rip), %rcx # 0xcb7de0
movq %rcx, (%rax)
leaq 0xbb65a5(%rip), %rax # 0xcb7bc8
cmpq $0x0, (%rax)
je 0x101667
leaq 0xbb65b0(%rip), %rcx # 0xcb7be0
leaq 0xbb6591(%rip), %rax # 0xcb7bc8
cmpq %rcx, (%rax)
je 0x101667
leaq 0xbb6585(%rip), %rax # 0xcb7bc8
movq (%rax), %rsi
leaq 0xbb6593(%rip), %rdi # 0xcb7be0
xorl %eax, %eax
movl %eax, %edx
callq 0x1214e0
leaq 0xbb656b(%rip), %rax # 0xcb7bc8
leaq 0xbb657c(%rip), %rcx # 0xcb7be0
movq %rcx, (%rax)
movq -0x8(%rbp), %rax
movq -0x10(%rbp), %rcx
subq %rcx, %rax
sarq $0x3, %rax
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax)
|
get_defaults_options:
push rbp
mov rbp, rsp
sub rsp, 10h
mov [rbp+var_8], rdi
mov rax, [rbp+var_8]
mov [rbp+var_10], rax
mov rax, [rbp+var_8]
add rax, 8
mov [rbp+var_8], rax
lea rax, my_defaults_extra_file
mov qword ptr [rax], 0
lea rax, my_defaults_group_suffix
mov qword ptr [rax], 0
lea rax, my_defaults_file
mov qword ptr [rax], 0
lea rax, my_print_defaults
mov byte ptr [rax], 0
lea rax, my_no_defaults
mov byte ptr [rax], 0
mov rax, [rbp+var_8]
cmp qword ptr [rax], 0
jz short loc_10147B
mov rax, [rbp+var_8]
mov rdi, [rax]
lea rsi, aNoDefaults; "--no-defaults"
call _strcmp
cmp eax, 0
jnz short loc_10147B
lea rax, my_no_defaults
mov byte ptr [rax], 1
mov rax, [rbp+var_8]
add rax, 8
mov [rbp+var_8], rax
jmp loc_101569
loc_10147B:
jmp short $+2
loc_10147D:
mov rax, [rbp+var_8]
cmp qword ptr [rax], 0
jz loc_101567
lea rax, my_defaults_file
cmp qword ptr [rax], 0
jnz short loc_1014CE
mov rax, [rbp+var_8]
mov rdi, [rax]
lea rsi, aDefaultsFile; "--defaults-file="
call is_prefix
cmp eax, 0
jz short loc_1014CE
mov rax, [rbp+var_8]
mov rcx, [rax]
add rcx, 11h
add rcx, 0FFFFFFFFFFFFFFFFh
lea rax, my_defaults_file
mov [rax], rcx
jmp loc_101554
loc_1014CE:
lea rax, my_defaults_extra_file
cmp qword ptr [rax], 0
jnz short loc_10150E
mov rax, [rbp+var_8]
mov rdi, [rax]
lea rsi, aDefaultsExtraF; "--defaults-extra-file="
call is_prefix
cmp eax, 0
jz short loc_10150E
mov rax, [rbp+var_8]
mov rcx, [rax]
add rcx, 17h
add rcx, 0FFFFFFFFFFFFFFFFh
lea rax, my_defaults_extra_file
mov [rax], rcx
jmp short loc_101552
loc_10150E:
lea rax, my_defaults_group_suffix
cmp qword ptr [rax], 0
jnz short loc_10154E
mov rax, [rbp+var_8]
mov rdi, [rax]
lea rsi, aDefaultsGroupS; "--defaults-group-suffix="
call is_prefix
cmp eax, 0
jz short loc_10154E
mov rax, [rbp+var_8]
mov rcx, [rax]
add rcx, 19h
add rcx, 0FFFFFFFFFFFFFFFFh
lea rax, my_defaults_group_suffix
mov [rax], rcx
jmp short loc_101550
loc_10154E:
jmp short loc_101567
loc_101550:
jmp short $+2
loc_101552:
jmp short $+2
loc_101554:
jmp short $+2
loc_101556:
mov rax, [rbp+var_8]
add rax, 8
mov [rbp+var_8], rax
jmp loc_10147D
loc_101567:
jmp short $+2
loc_101569:
mov rax, [rbp+var_8]
cmp qword ptr [rax], 0
jz short loc_1015AB
mov rax, [rbp+var_8]
mov rdi, [rax]
lea rsi, aPrintDefaults; "--print-defaults"
call _strcmp
cmp eax, 0
jnz short loc_1015AB
lea rax, my_print_defaults
mov byte ptr [rax], 1
lea rax, my_defaults_mark_files
mov byte ptr [rax], 0
mov rax, [rbp+var_8]
add rax, 8
mov [rbp+var_8], rax
loc_1015AB:
lea rax, my_defaults_group_suffix
cmp qword ptr [rax], 0
jnz short loc_1015D1
lea rdi, aMysqlGroupSuff; "MYSQL_GROUP_SUFFIX"
call _getenv
mov rcx, rax
lea rax, my_defaults_group_suffix
mov [rax], rcx
loc_1015D1:
lea rax, my_defaults_extra_file
cmp qword ptr [rax], 0
jz short loc_10161C
lea rcx, get_defaults_options_extra_file_buffer
lea rax, my_defaults_extra_file
cmp [rax], rcx
jz short loc_10161C
lea rax, my_defaults_extra_file
mov rsi, [rax]
lea rdi, get_defaults_options_extra_file_buffer
xor eax, eax
mov edx, eax
call my_realpath
lea rax, my_defaults_extra_file
lea rcx, get_defaults_options_extra_file_buffer
mov [rax], rcx
loc_10161C:
lea rax, my_defaults_file
cmp qword ptr [rax], 0
jz short loc_101667
lea rcx, get_defaults_options_file_buffer
lea rax, my_defaults_file
cmp [rax], rcx
jz short loc_101667
lea rax, my_defaults_file
mov rsi, [rax]
lea rdi, get_defaults_options_file_buffer
xor eax, eax
mov edx, eax
call my_realpath
lea rax, my_defaults_file
lea rcx, get_defaults_options_file_buffer
mov [rax], rcx
loc_101667:
mov rax, [rbp+var_8]
mov rcx, [rbp+var_10]
sub rax, rcx
sar rax, 3
add rsp, 10h
pop rbp
retn
|
long long get_defaults_options(long long a1)
{
_QWORD *v2; // [rsp+8h] [rbp-8h]
v2 = (_QWORD *)(a1 + 8);
my_defaults_extra_file = 0LL;
my_defaults_group_suffix = 0LL;
my_defaults_file = 0LL;
my_print_defaults = 0;
my_no_defaults = 0;
if ( *(_QWORD *)(a1 + 8) && !(unsigned int)strcmp(*v2, "--no-defaults") )
{
my_no_defaults = 1;
v2 = (_QWORD *)(a1 + 16);
}
else
{
while ( *v2 )
{
if ( my_defaults_file || !(unsigned int)is_prefix(*v2, "--defaults-file=") )
{
if ( my_defaults_extra_file || !(unsigned int)is_prefix(*v2, "--defaults-extra-file=") )
{
if ( my_defaults_group_suffix || !(unsigned int)is_prefix(*v2, "--defaults-group-suffix=") )
break;
my_defaults_group_suffix = *v2 + 24LL;
}
else
{
my_defaults_extra_file = *v2 + 22LL;
}
}
else
{
my_defaults_file = *v2 + 16LL;
}
++v2;
}
}
if ( *v2 && !(unsigned int)strcmp(*v2, "--print-defaults") )
{
my_print_defaults = 1;
my_defaults_mark_files = 0;
++v2;
}
if ( !my_defaults_group_suffix )
my_defaults_group_suffix = getenv("MYSQL_GROUP_SUFFIX");
if ( my_defaults_extra_file && (_UNKNOWN *)my_defaults_extra_file != &get_defaults_options_extra_file_buffer )
{
my_realpath(&get_defaults_options_extra_file_buffer, my_defaults_extra_file, 0LL);
my_defaults_extra_file = &get_defaults_options_extra_file_buffer;
}
if ( my_defaults_file && (_UNKNOWN *)my_defaults_file != &get_defaults_options_file_buffer )
{
my_realpath(&get_defaults_options_file_buffer, my_defaults_file, 0LL);
my_defaults_file = &get_defaults_options_file_buffer;
}
return ((long long)v2 - a1) >> 3;
}
| |||
9,339 |
get_defaults_options
|
eloqsql/mysys/my_default.c
|
int get_defaults_options(char **argv)
{
static char file_buffer[FN_REFLEN];
static char extra_file_buffer[FN_REFLEN];
char **orig_argv= argv;
argv++; /* Skip program name */
my_defaults_file= my_defaults_group_suffix= my_defaults_extra_file= 0;
my_no_defaults= my_print_defaults= FALSE;
if (*argv && !strcmp(*argv, "--no-defaults"))
{
my_no_defaults= 1;
argv++;
}
else
for(; *argv; argv++)
{
if (!my_defaults_file && is_prefix(*argv, "--defaults-file="))
my_defaults_file= *argv + sizeof("--defaults-file=")-1;
else
if (!my_defaults_extra_file && is_prefix(*argv, "--defaults-extra-file="))
my_defaults_extra_file= *argv + sizeof("--defaults-extra-file=")-1;
else
if (!my_defaults_group_suffix && is_prefix(*argv, "--defaults-group-suffix="))
my_defaults_group_suffix= *argv + sizeof("--defaults-group-suffix=")-1;
else
break;
}
if (*argv && !strcmp(*argv, "--print-defaults"))
{
my_print_defaults= 1;
my_defaults_mark_files= FALSE;
argv++;
}
if (! my_defaults_group_suffix)
my_defaults_group_suffix= getenv("MYSQL_GROUP_SUFFIX");
if (my_defaults_extra_file && my_defaults_extra_file != extra_file_buffer)
{
my_realpath(extra_file_buffer, my_defaults_extra_file, MYF(0));
my_defaults_extra_file= extra_file_buffer;
}
if (my_defaults_file && my_defaults_file != file_buffer)
{
my_realpath(file_buffer, my_defaults_file, MYF(0));
my_defaults_file= file_buffer;
}
return (int)(argv - orig_argv);
}
|
O3
|
c
|
get_defaults_options:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
leaq 0x8(%rdi), %rbx
leaq 0xb81a1b(%rip), %r15 # 0xc30048
xorl %eax, %eax
movq %rax, (%r15)
leaq 0xb81a07(%rip), %r14 # 0xc30040
movq %rax, (%r14)
leaq 0xb819f5(%rip), %r13 # 0xc30038
movq %rax, (%r13)
leaq 0xb819e4(%rip), %rcx # 0xc30032
movb %al, (%rcx)
leaq 0xb819da(%rip), %rcx # 0xc30031
movb %al, (%rcx)
movq %rdi, -0x30(%rbp)
movq 0x8(%rdi), %r12
testq %r12, %r12
je 0xae73c
leaq 0x50fe9(%rip), %rsi # 0xff65a
movq %r12, %rdi
callq 0x2a750
testl %eax, %eax
je 0xae6fa
cmpq $0x0, (%r13)
je 0xae6ad
cmpq $0x0, (%r15)
je 0xae6ca
cmpq $0x0, (%r14)
jne 0xae70c
movq (%rbx), %rdi
leaq 0x50ff6(%rip), %rsi # 0xff690
callq 0xf5514
movl $0x18, %ecx
movq %r14, %rdx
testl %eax, %eax
jne 0xae6e5
jmp 0xae70c
movq %r12, %rdi
leaq 0x50fb1(%rip), %rsi # 0xff668
callq 0xf5514
movl $0x10, %ecx
movq %r13, %rdx
testl %eax, %eax
jne 0xae6e5
jmp 0xae684
movq (%rbx), %rdi
leaq 0x50fa5(%rip), %rsi # 0xff679
callq 0xf5514
movl $0x16, %ecx
movq %r15, %rdx
testl %eax, %eax
je 0xae68a
addq (%rbx), %rcx
movq %rcx, (%rdx)
movq 0x8(%rbx), %r12
addq $0x8, %rbx
testq %r12, %r12
jne 0xae67d
jmp 0xae73c
leaq 0xb81930(%rip), %rax # 0xc30031
movb $0x1, (%rax)
movq -0x30(%rbp), %rax
leaq 0x10(%rax), %rbx
movq (%rbx), %rdi
testq %rdi, %rdi
je 0xae73c
leaq 0x50f8e(%rip), %rsi # 0xff6a9
callq 0x2a750
testl %eax, %eax
jne 0xae73c
leaq 0xb81907(%rip), %rax # 0xc30032
movb $0x1, (%rax)
leaq 0xb818fb(%rip), %rax # 0xc30030
movb $0x0, (%rax)
addq $0x8, %rbx
leaq 0xb818fd(%rip), %r14 # 0xc30040
cmpq $0x0, (%r14)
jne 0xae758
leaq 0x50f6a(%rip), %rdi # 0xff6ba
callq 0x2a6b0
movq %rax, (%r14)
leaq 0xb818e9(%rip), %r14 # 0xc30048
movq (%r14), %rsi
testq %rsi, %rsi
sete %al
leaq 0xb81ae1(%rip), %r15 # 0xc30250
cmpq %r15, %rsi
sete %cl
orb %al, %cl
jne 0xae786
movq %r15, %rdi
xorl %edx, %edx
callq 0xc07f1
movq %r15, (%r14)
leaq 0xb818ab(%rip), %r14 # 0xc30038
movq (%r14), %rsi
testq %rsi, %rsi
sete %al
leaq 0xb818b3(%rip), %r15 # 0xc30050
cmpq %r15, %rsi
sete %cl
orb %al, %cl
jne 0xae7b4
movq %r15, %rdi
xorl %edx, %edx
callq 0xc07f1
movq %r15, (%r14)
subq -0x30(%rbp), %rbx
shrq $0x3, %rbx
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
|
get_defaults_options:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
push rax
lea rbx, [rdi+8]
lea r15, my_defaults_extra_file
xor eax, eax
mov [r15], rax
lea r14, my_defaults_group_suffix
mov [r14], rax
lea r13, my_defaults_file
mov [r13+0], rax
lea rcx, my_print_defaults
mov [rcx], al
lea rcx, my_no_defaults
mov [rcx], al
mov [rbp+var_30], rdi
mov r12, [rdi+8]
test r12, r12
jz loc_AE73C
lea rsi, aNoDefaults; "--no-defaults"
mov rdi, r12
call _strcmp
test eax, eax
jz short loc_AE6FA
loc_AE67D:
cmp qword ptr [r13+0], 0
jz short loc_AE6AD
loc_AE684:
cmp qword ptr [r15], 0
jz short loc_AE6CA
loc_AE68A:
cmp qword ptr [r14], 0
jnz short loc_AE70C
mov rdi, [rbx]
lea rsi, aDefaultsGroupS; "--defaults-group-suffix="
call is_prefix
mov ecx, 18h
mov rdx, r14
test eax, eax
jnz short loc_AE6E5
jmp short loc_AE70C
loc_AE6AD:
mov rdi, r12
lea rsi, aDefaultsFile; "--defaults-file="
call is_prefix
mov ecx, 10h
mov rdx, r13
test eax, eax
jnz short loc_AE6E5
jmp short loc_AE684
loc_AE6CA:
mov rdi, [rbx]
lea rsi, aDefaultsExtraF; "--defaults-extra-file="
call is_prefix
mov ecx, 16h
mov rdx, r15
test eax, eax
jz short loc_AE68A
loc_AE6E5:
add rcx, [rbx]
mov [rdx], rcx
mov r12, [rbx+8]
add rbx, 8
test r12, r12
jnz short loc_AE67D
jmp short loc_AE73C
loc_AE6FA:
lea rax, my_no_defaults
mov byte ptr [rax], 1
mov rax, [rbp+var_30]
lea rbx, [rax+10h]
loc_AE70C:
mov rdi, [rbx]
test rdi, rdi
jz short loc_AE73C
lea rsi, aPrintDefaults; "--print-defaults"
call _strcmp
test eax, eax
jnz short loc_AE73C
lea rax, my_print_defaults
mov byte ptr [rax], 1
lea rax, my_defaults_mark_files
mov byte ptr [rax], 0
add rbx, 8
loc_AE73C:
lea r14, my_defaults_group_suffix
cmp qword ptr [r14], 0
jnz short loc_AE758
lea rdi, aMysqlGroupSuff; "MYSQL_GROUP_SUFFIX"
call _getenv
mov [r14], rax
loc_AE758:
lea r14, my_defaults_extra_file
mov rsi, [r14]
test rsi, rsi
setz al
lea r15, get_defaults_options_extra_file_buffer
cmp rsi, r15
setz cl
or cl, al
jnz short loc_AE786
mov rdi, r15
xor edx, edx
call my_realpath
mov [r14], r15
loc_AE786:
lea r14, my_defaults_file
mov rsi, [r14]
test rsi, rsi
setz al
lea r15, get_defaults_options_file_buffer
cmp rsi, r15
setz cl
or cl, al
jnz short loc_AE7B4
mov rdi, r15
xor edx, edx
call my_realpath
mov [r14], r15
loc_AE7B4:
sub rbx, [rbp+var_30]
shr rbx, 3
mov eax, ebx
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
|
long long get_defaults_options(long long a1)
{
_QWORD *v1; // rbx
long long v2; // r12
int v3; // eax
long long v4; // rcx
_QWORD *v5; // rdx
int v6; // eax
int v7; // eax
v1 = (_QWORD *)(a1 + 8);
my_defaults_extra_file = 0LL;
my_defaults_group_suffix = 0LL;
my_defaults_file = 0LL;
my_print_defaults = 0;
my_no_defaults = 0;
v2 = *(_QWORD *)(a1 + 8);
if ( v2 )
{
if ( !(unsigned int)strcmp(*(_QWORD *)(a1 + 8), "--no-defaults") )
{
my_no_defaults = 1;
v1 = (_QWORD *)(a1 + 16);
}
else
{
while ( 1 )
{
if ( my_defaults_file || (v6 = is_prefix(v2, "--defaults-file="), v4 = 16LL, v5 = &my_defaults_file, !v6) )
{
if ( my_defaults_extra_file
|| (v7 = is_prefix(*v1, "--defaults-extra-file="), v4 = 22LL, v5 = &my_defaults_extra_file, !v7) )
{
if ( my_defaults_group_suffix )
break;
v3 = is_prefix(*v1, "--defaults-group-suffix=");
v4 = 24LL;
v5 = &my_defaults_group_suffix;
if ( !v3 )
break;
}
}
*v5 = *v1 + v4;
v2 = v1[1];
++v1;
if ( !v2 )
goto LABEL_17;
}
}
if ( *v1 && !(unsigned int)strcmp(*v1, "--print-defaults") )
{
my_print_defaults = 1;
my_defaults_mark_files = 0;
++v1;
}
}
LABEL_17:
if ( !my_defaults_group_suffix )
my_defaults_group_suffix = getenv("MYSQL_GROUP_SUFFIX");
if ( my_defaults_extra_file != 0LL && my_defaults_extra_file != (_QWORD)&get_defaults_options_extra_file_buffer )
{
my_realpath(&get_defaults_options_extra_file_buffer, my_defaults_extra_file, 0LL);
my_defaults_extra_file = &get_defaults_options_extra_file_buffer;
}
if ( my_defaults_file != 0LL && my_defaults_file != (_QWORD)&get_defaults_options_file_buffer )
{
my_realpath(&get_defaults_options_file_buffer, my_defaults_file, 0LL);
my_defaults_file = &get_defaults_options_file_buffer;
}
return (unsigned int)(((unsigned long long)v1 - a1) >> 3);
}
|
get_defaults_options:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
PUSH RAX
LEA RBX,[RDI + 0x8]
LEA R15,[0xd30048]
XOR EAX,EAX
MOV qword ptr [R15],RAX
LEA R14,[0xd30040]
MOV qword ptr [R14],RAX
LEA R13,[0xd30038]
MOV qword ptr [R13],RAX
LEA RCX,[0xd30032]
MOV byte ptr [RCX],AL
LEA RCX,[0xd30031]
MOV byte ptr [RCX],AL
MOV qword ptr [RBP + -0x30],RDI
MOV R12,qword ptr [RDI + 0x8]
TEST R12,R12
JZ 0x001ae73c
LEA RSI,[0x1ff65a]
MOV RDI,R12
CALL 0x0012a750
TEST EAX,EAX
JZ 0x001ae6fa
LAB_001ae67d:
CMP qword ptr [R13],0x0
JZ 0x001ae6ad
LAB_001ae684:
CMP qword ptr [R15],0x0
JZ 0x001ae6ca
LAB_001ae68a:
CMP qword ptr [R14],0x0
JNZ 0x001ae70c
MOV RDI,qword ptr [RBX]
LEA RSI,[0x1ff690]
CALL 0x001f5514
MOV ECX,0x18
MOV RDX,R14
TEST EAX,EAX
JNZ 0x001ae6e5
JMP 0x001ae70c
LAB_001ae6ad:
MOV RDI,R12
LEA RSI,[0x1ff668]
CALL 0x001f5514
MOV ECX,0x10
MOV RDX,R13
TEST EAX,EAX
JNZ 0x001ae6e5
JMP 0x001ae684
LAB_001ae6ca:
MOV RDI,qword ptr [RBX]
LEA RSI,[0x1ff679]
CALL 0x001f5514
MOV ECX,0x16
MOV RDX,R15
TEST EAX,EAX
JZ 0x001ae68a
LAB_001ae6e5:
ADD RCX,qword ptr [RBX]
MOV qword ptr [RDX],RCX
MOV R12,qword ptr [RBX + 0x8]
ADD RBX,0x8
TEST R12,R12
JNZ 0x001ae67d
JMP 0x001ae73c
LAB_001ae6fa:
LEA RAX,[0xd30031]
MOV byte ptr [RAX],0x1
MOV RAX,qword ptr [RBP + -0x30]
LEA RBX,[RAX + 0x10]
LAB_001ae70c:
MOV RDI,qword ptr [RBX]
TEST RDI,RDI
JZ 0x001ae73c
LEA RSI,[0x1ff6a9]
CALL 0x0012a750
TEST EAX,EAX
JNZ 0x001ae73c
LEA RAX,[0xd30032]
MOV byte ptr [RAX],0x1
LEA RAX,[0xd30030]
MOV byte ptr [RAX],0x0
ADD RBX,0x8
LAB_001ae73c:
LEA R14,[0xd30040]
CMP qword ptr [R14],0x0
JNZ 0x001ae758
LEA RDI,[0x1ff6ba]
CALL 0x0012a6b0
MOV qword ptr [R14],RAX
LAB_001ae758:
LEA R14,[0xd30048]
MOV RSI,qword ptr [R14]
TEST RSI,RSI
SETZ AL
LEA R15,[0xd30250]
CMP RSI,R15
SETZ CL
OR CL,AL
JNZ 0x001ae786
MOV RDI,R15
XOR EDX,EDX
CALL 0x001c07f1
MOV qword ptr [R14],R15
LAB_001ae786:
LEA R14,[0xd30038]
MOV RSI,qword ptr [R14]
TEST RSI,RSI
SETZ AL
LEA R15,[0xd30050]
CMP RSI,R15
SETZ CL
OR CL,AL
JNZ 0x001ae7b4
MOV RDI,R15
XOR EDX,EDX
CALL 0x001c07f1
MOV qword ptr [R14],R15
LAB_001ae7b4:
SUB RBX,qword ptr [RBP + -0x30]
SHR RBX,0x3
MOV EAX,EBX
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
ulong get_defaults_options(long param_1)
{
int iVar1;
long lVar2;
long *plVar3;
long *plVar4;
char *__s1;
plVar4 = (long *)(param_1 + 8);
my_defaults_extra_file = (int1 *)0x0;
my_defaults_group_suffix = (char *)0x0;
my_defaults_file = (int1 *)0x0;
my_print_defaults = 0;
my_no_defaults = 0;
__s1 = *(char **)(param_1 + 8);
if (__s1 != (char *)0x0) {
iVar1 = strcmp(__s1,"--no-defaults");
if (iVar1 == 0) {
my_no_defaults = 1;
plVar4 = (long *)(param_1 + 0x10);
LAB_001ae70c:
if (((char *)*plVar4 != (char *)0x0) &&
(iVar1 = strcmp((char *)*plVar4,"--print-defaults"), iVar1 == 0)) {
my_print_defaults = 1;
my_defaults_mark_files = 0;
plVar4 = plVar4 + 1;
}
}
else {
do {
if (my_defaults_file == (int1 *)0x0) {
iVar1 = is_prefix(__s1,"--defaults-file=");
lVar2 = 0x10;
plVar3 = (long *)&my_defaults_file;
if (iVar1 == 0) goto LAB_001ae684;
}
else {
LAB_001ae684:
if (my_defaults_extra_file == (int1 *)0x0) {
iVar1 = is_prefix(*plVar4,"--defaults-extra-file=");
lVar2 = 0x16;
plVar3 = (long *)&my_defaults_extra_file;
if (iVar1 != 0) goto LAB_001ae6e5;
}
if (my_defaults_group_suffix != (char *)0x0) goto LAB_001ae70c;
iVar1 = is_prefix(*plVar4,"--defaults-group-suffix=");
lVar2 = 0x18;
plVar3 = (long *)&my_defaults_group_suffix;
if (iVar1 == 0) goto LAB_001ae70c;
}
LAB_001ae6e5:
*plVar3 = lVar2 + *plVar4;
__s1 = (char *)plVar4[1];
plVar4 = plVar4 + 1;
} while (__s1 != (char *)0x0);
}
}
if (my_defaults_group_suffix == (char *)0x0) {
my_defaults_group_suffix = getenv("MYSQL_GROUP_SUFFIX");
}
if (my_defaults_extra_file != get_defaults_options_extra_file_buffer &&
my_defaults_extra_file != (int1 *)0x0) {
my_realpath(get_defaults_options_extra_file_buffer,my_defaults_extra_file,0);
my_defaults_extra_file = get_defaults_options_extra_file_buffer;
}
if (my_defaults_file != get_defaults_options_file_buffer && my_defaults_file != (int1 *)0x0)
{
my_realpath(get_defaults_options_file_buffer,my_defaults_file,0);
my_defaults_file = get_defaults_options_file_buffer;
}
return (ulong)((long)plVar4 - param_1) >> 3 & 0xffffffff;
}
|
|
9,340 |
nglog::ShutdownLogging()
|
ng-log[P]ng-log/src/logging.cc
|
void ShutdownLogging() {
ShutdownLoggingUtilities();
LogDestination::DeleteLogDestinations();
logging_directories_list = nullptr;
g_prefix_formatter = nullptr;
}
|
O3
|
cpp
|
nglog::ShutdownLogging():
pushq %rax
callq 0x20ff7
callq 0x96c6
leaq 0x30bfb(%rip), %rdi # 0x3ec00
xorl %esi, %esi
callq 0x1ebe8
movq 0x21add(%rip), %rdi # 0x2faf0
movq $0x0, 0x21ad2(%rip) # 0x2faf0
testq %rdi, %rdi
je 0xe02e
movl $0x18, %esi
popq %rax
jmp 0x7540
popq %rax
retq
|
_ZN5nglog15ShutdownLoggingEv:
push rax
call _ZN5nglog5tools24ShutdownLoggingUtilitiesEv; nglog::tools::ShutdownLoggingUtilities(void)
call _ZN5nglog14LogDestination21DeleteLogDestinationsEv; nglog::LogDestination::DeleteLogDestinations(void)
lea rdi, _ZN5nglogL24logging_directories_listB5cxx11E; nglog::logging_directories_list
xor esi, esi
call _ZNSt15__uniq_ptr_implISt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS6_EESt14default_deleteIS8_EE5resetEPS8_; std::__uniq_ptr_impl<std::vector<std::string>,std::default_delete<std::vector<std::string>>>::reset(std::vector<std::string>*)
mov rdi, cs:_ZN5nglog12_GLOBAL__N_118g_prefix_formatterE; void *
mov cs:_ZN5nglog12_GLOBAL__N_118g_prefix_formatterE, 0; nglog::`anonymous namespace'::g_prefix_formatter
test rdi, rdi
jz short loc_E02E
mov esi, 18h; unsigned __int64
pop rax
jmp __ZdlPvm; operator delete(void *,ulong)
loc_E02E:
pop rax
retn
|
void nglog::ShutdownLogging(nglog *this)
{
void *v1; // rdi
nglog::tools::ShutdownLoggingUtilities(this);
nglog::LogDestination::DeleteLogDestinations(this);
std::__uniq_ptr_impl<std::vector<std::string>,std::default_delete<std::vector<std::string>>>::reset(
&nglog::logging_directories_list[abi:cxx11],
0LL);
v1 = nglog::`anonymous namespace'::g_prefix_formatter;
nglog::`anonymous namespace'::g_prefix_formatter = 0LL;
if ( v1 )
operator delete(v1, 0x18uLL);
}
|
ShutdownLogging:
PUSH RAX
CALL 0x00120ff7
CALL 0x001096c6
LEA RDI,[0x13ec00]
XOR ESI,ESI
CALL 0x0011ebe8
MOV RDI,qword ptr [0x0012faf0]
MOV qword ptr [0x0012faf0],0x0
TEST RDI,RDI
JZ 0x0010e02e
MOV ESI,0x18
POP RAX
JMP 0x00107540
LAB_0010e02e:
POP RAX
RET
|
/* nglog::ShutdownLogging() */
int8 nglog::ShutdownLogging(void)
{
void *pvVar1;
int8 in_RAX;
int8 extraout_RAX;
tools::ShutdownLoggingUtilities();
LogDestination::DeleteLogDestinations();
std::
__uniq_ptr_impl<std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>,std::default_delete<std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>>>
::reset((__uniq_ptr_impl<std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>,std::default_delete<std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>>>
*)&logging_directories_list_abi_cxx11_,(vector *)0x0);
pvVar1 = (anonymous_namespace)::g_prefix_formatter;
(anonymous_namespace)::g_prefix_formatter = (void *)0x0;
if (pvVar1 != (void *)0x0) {
operator_delete(pvVar1,0x18);
return extraout_RAX;
}
return in_RAX;
}
|
|
9,341 |
unifex::_inline_sched::_op<unifex::_seq::_predecessor_receiver<unifex::_inline_sched::scheduler::schedule_task&&, unifex::_with_query_value::_sender<unifex::_get_scheduler::_fn, unifex::_inline_sched::scheduler, unifex::_task::_task<void>::type>::type, unifex::_async_scope::_receiver<unifex::_seq::_sender<unifex::_inline_sched::scheduler::schedule_task, unifex::_with_query_value::_sender<unifex::_get_scheduler::_fn, unifex::_inline_sched::scheduler, unifex::_task::_task<void>::type>::type>::type>::type>::type>::type::type<unifex::_seq::_predecessor_receiver<unifex::_inline_sched::scheduler::schedule_task&&, unifex::_with_query_value::_sender<unifex::_get_scheduler::_fn, unifex::_inline_sched::scheduler, unifex::_task::_task<void>::type>::type, unifex::_async_scope::_receiver<unifex::_seq::_sender<unifex::_inline_sched::scheduler::schedule_task, unifex::_with_query_value::_sender<unifex::_get_scheduler::_fn, unifex::_inline_sched::scheduler, unifex::_task::_task<void>::type>::type>::type>::type>::type>(T&&)
|
aimrt_mujoco_sim/_deps/libunifex-src/include/unifex/inline_scheduler.hpp
|
void start() noexcept {
UNIFEX_TRY {
if constexpr (is_stop_never_possible_v<stop_token_type>) {
unifex::set_value((Receiver &&) receiver_);
} else {
if (get_stop_token(receiver_).stop_requested()) {
unifex::set_done((Receiver &&) receiver_);
} else {
unifex::set_value((Receiver &&) receiver_);
}
}
} UNIFEX_CATCH (...) {
unifex::set_error((Receiver &&) receiver_, std::current_exception());
}
}
|
O0
|
cpp
|
unifex::_inline_sched::_op<unifex::_seq::_predecessor_receiver<unifex::_inline_sched::scheduler::schedule_task&&, unifex::_with_query_value::_sender<unifex::_get_scheduler::_fn, unifex::_inline_sched::scheduler, unifex::_task::_task<void>::type>::type, unifex::_async_scope::_receiver<unifex::_seq::_sender<unifex::_inline_sched::scheduler::schedule_task, unifex::_with_query_value::_sender<unifex::_get_scheduler::_fn, unifex::_inline_sched::scheduler, unifex::_task::_task<void>::type>::type>::type>::type>::type>::type::type<unifex::_seq::_predecessor_receiver<unifex::_inline_sched::scheduler::schedule_task&&, unifex::_with_query_value::_sender<unifex::_get_scheduler::_fn, unifex::_inline_sched::scheduler, unifex::_task::_task<void>::type>::type, unifex::_async_scope::_receiver<unifex::_seq::_sender<unifex::_inline_sched::scheduler::schedule_task, unifex::_with_query_value::_sender<unifex::_get_scheduler::_fn, unifex::_inline_sched::scheduler, unifex::_task::_task<void>::type>::type>::type>::type>::type>(T&&):
subq $0x18, %rsp
movq %rdi, 0x10(%rsp)
movq %rsi, 0x8(%rsp)
movq 0x10(%rsp), %rdi
movq 0x8(%rsp), %rsi
callq 0xf0d40
addq $0x18, %rsp
retq
nopw %cs:(%rax,%rax)
nopl (%rax)
|
_ZN6unifex13_inline_sched3_opINS_4_seq21_predecessor_receiverIONS0_9scheduler13schedule_taskENS_17_with_query_value7_senderINS_14_get_scheduler3_fnES4_NS_5_task5_taskIvE4typeEE4typeENS_12_async_scope9_receiverINS2_7_senderIS5_SG_E4typeEE4typeEE4typeEE4typeC2ISP_Q18constructible_fromIT_TL0__EEEOST_:
sub rsp, 18h
mov [rsp+18h+var_8], rdi
mov [rsp+18h+var_10], rsi
mov rdi, [rsp+18h+var_8]
mov rsi, [rsp+18h+var_10]
call _ZN6unifex4_seq21_predecessor_receiverIONS_13_inline_sched9scheduler13schedule_taskENS_17_with_query_value7_senderINS_14_get_scheduler3_fnES3_NS_5_task5_taskIvE4typeEE4typeENS_12_async_scope9_receiverINS0_7_senderIS4_SF_E4typeEE4typeEE4typeC2EOSO_; unifex::_seq::_predecessor_receiver<unifex::_inline_sched::scheduler::schedule_task &&,unifex::_with_query_value::_sender<unifex::_get_scheduler::_fn,unifex::_inline_sched::scheduler,unifex::_task::_task<void>::type>::type,unifex::_async_scope::_receiver<unifex::_seq::_sender<unifex::_inline_sched::scheduler::schedule_task,unifex::_with_query_value::_sender<unifex::_get_scheduler::_fn,unifex::_inline_sched::scheduler,unifex::_task::_task<void>::type>>::type>::type>::type::type(unifex::_seq::_predecessor_receiver<unifex::_inline_sched::scheduler::schedule_task &&,unifex::_with_query_value::_sender<unifex::_get_scheduler::_fn,unifex::_inline_sched::scheduler,unifex::_task::_task<void>::type>::type,unifex::_async_scope::_receiver<unifex::_seq::_sender<unifex::_inline_sched::scheduler::schedule_task,unifex::_with_query_value::_sender<unifex::_get_scheduler::_fn,unifex::_inline_sched::scheduler,unifex::_task::_task<void>::type>>::type>::type>&&)
add rsp, 18h
retn
|
long long ZN6unifex13_inline_sched3_opINS_4_seq21_predecessor_receiverIONS0_9scheduler13schedule_taskENS_17_with_query_value7_senderINS_14_get_scheduler3_fnES4_NS_5_task5_taskIvE4typeEE4typeENS_12_async_scope9_receiverINS2_7_senderIS5_SG_E4typeEE4typeEE4typeEE4typeC2ISP_Q18constructible_fromIT_TL0__EEEOST_(
long long a1,
long long a2)
{
return unifex::_seq::_predecessor_receiver<unifex::_inline_sched::scheduler::schedule_task &&,unifex::_with_query_value::_sender<unifex::_get_scheduler::_fn,unifex::_inline_sched::scheduler,unifex::_task::_task<void>::type>::type,unifex::_async_scope::_receiver<unifex::_seq::_sender<unifex::_inline_sched::scheduler::schedule_task,unifex::_with_query_value::_sender<unifex::_get_scheduler::_fn,unifex::_inline_sched::scheduler,unifex::_task::_task<void>::type>>::type>::type>::type::type(
a1,
a2);
}
|
_ZN6unifex13_inline_sched3_opINS_4_seq21_predecessor_receiverIONS0_9scheduler13schedule_taskENS_17_with_query_value7_senderINS_14_get_scheduler3_fnES4_NS_5_task5_taskIvE4typeEE4typeENS_12_async_scope9_receiverINS2_7_senderIS5_SG_E4typeEE4typeEE4typeEE4typeC2ISP_Q18constructible_fromIT_TL0__EEEOST_:
SUB RSP,0x18
MOV qword ptr [RSP + 0x10],RDI
MOV qword ptr [RSP + 0x8],RSI
MOV RDI,qword ptr [RSP + 0x10]
MOV RSI,qword ptr [RSP + 0x8]
CALL 0x001f0d40
ADD RSP,0x18
RET
|
void _ZN6unifex13_inline_sched3_opINS_4_seq21_predecessor_receiverIONS0_9scheduler13schedule_taskENS_17_with_query_value7_senderINS_14_get_scheduler3_fnES4_NS_5_task5_taskIvE4typeEE4typeENS_12_async_scope9_receiverINS2_7_senderIS5_SG_E4typeEE4typeEE4typeEE4typeC2ISP_Q18constructible_fromIT_TL0__EEEOST_
(type *param_1,type *param_2)
{
unifex::_seq::
_predecessor_receiver<unifex::_inline_sched::scheduler::schedule_task&&,unifex::_with_query_value::_sender<unifex::_get_scheduler::_fn,unifex::_inline_sched::scheduler,unifex::_task::_task<void>::type>::type,unifex::_async_scope::_receiver<unifex::_seq::_sender<unifex::_inline_sched::scheduler::schedule_task,unifex::_with_query_value::_sender<unifex::_get_scheduler::_fn,unifex::_inline_sched::scheduler,unifex::_task::_task<void>::type>::type>::type>::type>
::type::type(param_1,param_2);
return;
}
|
|
9,342 |
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>& nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>::at<char const (&) [5], 0>(char const (&) [5])
|
monkey531[P]llama/common/json.hpp
|
reference at(KeyType && key)
{
// at only works for objects
if (JSON_HEDLEY_UNLIKELY(!is_object()))
{
JSON_THROW(type_error::create(304, detail::concat("cannot use at() with ", type_name()), this));
}
auto it = m_data.m_value.object->find(std::forward<KeyType>(key));
if (it == m_data.m_value.object->end())
{
JSON_THROW(out_of_range::create(403, detail::concat("key '", string_t(std::forward<KeyType>(key)), "' not found"), this));
}
return set_parent(it->second);
}
|
O2
|
cpp
|
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>& 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>::at<char const (&) [5], 0>(char const (&) [5]):
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x48, %rsp
movq %rdi, %r14
cmpb $0x1, (%rdi)
jne 0x7a111
movq %rsi, %r15
movq 0x8(%r14), %rdi
callq 0x7df54
movq 0x8(%r14), %rcx
cmpq 0x8(%rcx), %rax
je 0x7a16f
addq $0x20, %rax
addq $0x48, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
pushq $0x20
popq %rdi
callq 0x23480
movq %rax, %rbx
movq %r14, %rdi
callq 0x4320e
leaq 0x28(%rsp), %rdx
movq %rax, (%rdx)
leaq 0x3adcf(%rip), %rsi # 0xb4f02
leaq 0x8(%rsp), %rdi
callq 0x7d9b5
movb $0x1, %bpl
leaq 0x8(%rsp), %rdx
movq %rbx, %rdi
movl $0x130, %esi # imm = 0x130
movq %r14, %rcx
callq 0x430c2
xorl %ebp, %ebp
leaq 0x81dea(%rip), %rsi # 0xfbf48
leaq -0x3a3c7(%rip), %rdx # 0x3fd9e
movq %rbx, %rdi
callq 0x23f30
jmp 0x7a1d9
pushq $0x20
popq %rdi
callq 0x23480
movq %rax, %rbx
leaq 0x28(%rsp), %rdi
leaq 0x7(%rsp), %rdx
movq %r15, %rsi
callq 0x275c8
leaq 0x3ad9f(%rip), %rsi # 0xb4f32
leaq 0x3ad9e(%rip), %rcx # 0xb4f38
leaq 0x8(%rsp), %rdi
leaq 0x28(%rsp), %rdx
callq 0x7dfbf
movb $0x1, %bpl
leaq 0x8(%rsp), %rdx
movq %rbx, %rdi
movl $0x193, %esi # imm = 0x193
movq %r14, %rcx
callq 0x4196e
xorl %ebp, %ebp
leaq 0x81cfe(%rip), %rsi # 0xfbec8
leaq -0x3a433(%rip), %rdx # 0x3fd9e
movq %rbx, %rdi
callq 0x23f30
movq %rax, %r14
leaq 0x8(%rsp), %rdi
callq 0x24208
jmp 0x7a1ee
movq %rax, %r14
movb $0x1, %bpl
leaq 0x28(%rsp), %rdi
jmp 0x7a1ff
jmp 0x7a20b
movq %rax, %r14
leaq 0x8(%rsp), %rdi
callq 0x24208
testb %bpl, %bpl
jne 0x7a20e
jmp 0x7a216
movq %rax, %r14
movq %rbx, %rdi
callq 0x236b0
movq %r14, %rdi
callq 0x23fd0
|
_ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE2atIRA5_KcTnNSt9enable_ifIXsr6detail32is_usable_as_basic_json_key_typeISD_T_EE5valueEiE4typeELi0EEERSD_OSJ_:
push rbp; char
push r15; int
push r14; int
push rbx; int
sub rsp, 48h
mov r14, rdi
cmp byte ptr [rdi], 1
jnz short loc_7A111
mov r15, rsi
mov rdi, [r14+8]
call _ZN8nlohmann16json_abi_v3_11_311ordered_mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS0_10basic_jsonIS1_St6vectorS7_blmdSaNS0_14adl_serializerES9_IhSaIhEEvEESt4lessIvESaISt4pairIKS7_SD_EEE4findIRA5_KcTnNSt9enable_ifIXsr6detail21is_usable_as_key_typeISt8equal_toIvES7_T_EE5valueEiE4typeELi0EEEN9__gnu_cxx17__normal_iteratorIPSI_S9_ISI_SJ_EEEOSS_
mov rcx, [r14+8]
cmp rax, [rcx+8]
jz short loc_7A16F
add rax, 20h ; ' '
add rsp, 48h
pop rbx
pop r14
pop r15
pop rbp
retn
loc_7A111:
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+68h+var_40]
mov [rdx], rax
lea rsi, aCannotUseAtWit; "cannot use at() with "
lea rdi, [rsp+68h+var_60]
call _ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJRA22_KcPS9_EEET_DpOT0_; nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[22],char const*>(char const(&)[22],char const* &&)
mov bpl, 1
lea rdx, [rsp+68h+var_60]
mov rdi, rbx; this
mov esi, 130h; int
mov rcx, r14
call _ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_
xor ebp, ebp
lea rsi, _ZTIN8nlohmann16json_abi_v3_11_36detail10type_errorE; lptinfo
lea rdx, _ZN8nlohmann16json_abi_v3_11_36detail9exceptionD2Ev; void (*)(void *)
mov rdi, rbx; void *
call ___cxa_throw
jmp short loc_7A1D9
loc_7A16F:
push 20h ; ' '
pop rdi; thrown_size
call ___cxa_allocate_exception
mov rbx, rax
lea rdi, [rsp+68h+var_40]
lea rdx, [rsp+68h+var_61]
mov rsi, r15
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&)
lea rsi, aKey; "key '"
lea rcx, aNotFound; "' not found"
lea rdi, [rsp+68h+var_60]
lea rdx, [rsp+68h+var_40]
call _ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJRA6_KcS8_RA12_S9_EEET_DpOT0_; nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[6],std::string,char const(&)[12]>(char const(&)[6],std::string,char const(&)[12] &&)
mov bpl, 1
lea rdx, [rsp+68h+var_60]
mov rdi, rbx; this
mov esi, 193h; int
mov rcx, r14
call _ZN8nlohmann16json_abi_v3_11_36detail12out_of_range6createIPNS0_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_36detail12out_of_rangeE; lptinfo
lea rdx, _ZN8nlohmann16json_abi_v3_11_36detail9exceptionD2Ev; void (*)(void *)
mov rdi, rbx; void *
call ___cxa_throw
loc_7A1D9:
mov r14, rax
lea rdi, [rsp+68h+var_60]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
jmp short loc_7A1EE
mov r14, rax
mov bpl, 1
loc_7A1EE:
lea rdi, [rsp+68h+var_40]
jmp short loc_7A1FF
jmp short loc_7A20B
mov r14, rax
lea rdi, [rsp+68h+var_60]; void *
loc_7A1FF:
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
test bpl, bpl
jnz short loc_7A20E
jmp short loc_7A216
loc_7A20B:
mov r14, rax
loc_7A20E:
mov rdi, rbx; void *
call ___cxa_free_exception
loc_7A216:
mov rdi, r14
call __Unwind_Resume
|
long long ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE2atIRA5_KcTnNSt9enable_ifIXsr6detail32is_usable_as_basic_json_key_typeISD_T_EE5valueEiE4typeELi0EEERSD_OSJ_(
long long a1,
long long a2)
{
long long v2; // rax
nlohmann::json_abi_v3_11_3::detail::type_error *exception; // rbx
nlohmann::json_abi_v3_11_3::detail::out_of_range *v5; // rbx
_BYTE v6[32]; // [rsp+8h] [rbp-60h] BYREF
_QWORD v7[8]; // [rsp+28h] [rbp-40h] BYREF
if ( *(_BYTE *)a1 != 1 )
{
exception = (nlohmann::json_abi_v3_11_3::detail::type_error *)__cxa_allocate_exception(0x20uLL);
v7[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>::type_name((unsigned __int8 *)a1);
nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[22],char const*>(v6, "cannot use at() with ");
ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_(
exception,
304,
(long long)v6);
__cxa_throw(
exception,
(struct type_info *)&`typeinfo for'nlohmann::json_abi_v3_11_3::detail::type_error,
(void (*)(void *))nlohmann::json_abi_v3_11_3::detail::exception::~exception);
}
v2 = ZN8nlohmann16json_abi_v3_11_311ordered_mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS0_10basic_jsonIS1_St6vectorS7_blmdSaNS0_14adl_serializerES9_IhSaIhEEvEESt4lessIvESaISt4pairIKS7_SD_EEE4findIRA5_KcTnNSt9enable_ifIXsr6detail21is_usable_as_key_typeISt8equal_toIvES7_T_EE5valueEiE4typeELi0EEEN9__gnu_cxx17__normal_iteratorIPSI_S9_ISI_SJ_EEEOSS_(*(_QWORD *)(a1 + 8));
if ( v2 == *(_QWORD *)(*(_QWORD *)(a1 + 8) + 8LL) )
{
v5 = (nlohmann::json_abi_v3_11_3::detail::out_of_range *)__cxa_allocate_exception(0x20uLL);
std::string::basic_string<std::allocator<char>>(v7, a2);
nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[6],std::string,char const(&)[12]>(
v6,
"key '",
v7,
"' not found");
ZN8nlohmann16json_abi_v3_11_36detail12out_of_range6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_(
v5,
403,
(long long)v6,
a1);
__cxa_throw(
v5,
(struct type_info *)&`typeinfo for'nlohmann::json_abi_v3_11_3::detail::out_of_range,
(void (*)(void *))nlohmann::json_abi_v3_11_3::detail::exception::~exception);
}
return v2 + 32;
}
|
_ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE2atIRA5_KcTnNSt9enable_ifIXsr6detail32is_usable_as_basic_json_key_typeISD_T_EE5valueEiE4typeELi0EEERSD_OSJ_:
PUSH RBP
PUSH R15
PUSH R14
PUSH RBX
SUB RSP,0x48
MOV R14,RDI
CMP byte ptr [RDI],0x1
JNZ 0x0017a111
MOV R15,RSI
MOV RDI,qword ptr [R14 + 0x8]
CALL 0x0017df54
MOV RCX,qword ptr [R14 + 0x8]
CMP RAX,qword ptr [RCX + 0x8]
JZ 0x0017a16f
ADD RAX,0x20
ADD RSP,0x48
POP RBX
POP R14
POP R15
POP RBP
RET
LAB_0017a111:
PUSH 0x20
POP RDI
CALL 0x00123480
MOV RBX,RAX
MOV RDI,R14
CALL 0x0014320e
LEA RDX,[RSP + 0x28]
MOV qword ptr [RDX],RAX
LAB_0017a12c:
LEA RSI,[0x1b4f02]
LEA RDI,[RSP + 0x8]
CALL 0x0017d9b5
MOV BPL,0x1
LAB_0017a140:
LEA RDX,[RSP + 0x8]
MOV RDI,RBX
MOV ESI,0x130
MOV RCX,R14
CALL 0x001430c2
XOR EBP,EBP
LEA RSI,[0x1fbf48]
LEA RDX,[0x13fd9e]
MOV RDI,RBX
CALL 0x00123f30
LAB_0017a16f:
PUSH 0x20
POP RDI
CALL 0x00123480
MOV RBX,RAX
LAB_0017a17a:
LEA RDI,[RSP + 0x28]
LEA RDX,[RSP + 0x7]
MOV RSI,R15
CALL 0x001275c8
LAB_0017a18c:
LEA RSI,[0x1b4f32]
LEA RCX,[0x1b4f38]
LEA RDI,[RSP + 0x8]
LEA RDX,[RSP + 0x28]
CALL 0x0017dfbf
MOV BPL,0x1
LAB_0017a1ac:
LEA RDX,[RSP + 0x8]
MOV RDI,RBX
MOV ESI,0x193
MOV RCX,R14
CALL 0x0014196e
XOR EBP,EBP
LEA RSI,[0x1fbec8]
LEA RDX,[0x13fd9e]
MOV RDI,RBX
CALL 0x00123f30
|
long _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE2atIRA5_KcTnNSt9enable_ifIXsr6detail32is_usable_as_basic_json_key_typeISD_T_EE5valueEiE4typeELi0EEERSD_OSJ_
(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,char *param_2)
{
long lVar1;
int8 uVar2;
allocator local_61;
detail local_60 [32];
char *local_40 [4];
if (*param_1 !=
(basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
)0x1) {
uVar2 = __cxa_allocate_exception(0x20);
local_40[0] = (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 0017a12c to 0017a13c has its CatchHandler @ 0017a20b */
nlohmann::json_abi_v3_11_3::detail::concat<std::__cxx11::string,char_const(&)[22],char_const*>
(local_60,"cannot use at() with ",local_40);
/* try { // try from 0017a140 to 0017a16c has its CatchHandler @ 0017a1f7 */
_ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_
(uVar2,0x130,local_60,param_1);
/* WARNING: Subroutine does not return */
__cxa_throw(uVar2,&nlohmann::json_abi_v3_11_3::detail::type_error::typeinfo,
nlohmann::json_abi_v3_11_3::detail::exception::~exception);
}
lVar1 = _ZN8nlohmann16json_abi_v3_11_311ordered_mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS0_10basic_jsonIS1_St6vectorS7_blmdSaNS0_14adl_serializerES9_IhSaIhEEvEESt4lessIvESaISt4pairIKS7_SD_EEE4findIRA5_KcTnNSt9enable_ifIXsr6detail21is_usable_as_key_typeISt8equal_toIvES7_T_EE5valueEiE4typeELi0EEEN9__gnu_cxx17__normal_iteratorIPSI_S9_ISI_SJ_EEEOSS_
(*(int8 *)(param_1 + 8));
if (lVar1 != *(long *)(*(long *)(param_1 + 8) + 8)) {
return lVar1 + 0x20;
}
uVar2 = __cxa_allocate_exception(0x20);
/* try { // try from 0017a17a to 0017a18b has its CatchHandler @ 0017a1f5 */
std::__cxx11::string::string<std::allocator<char>>((string *)local_40,param_2,&local_61);
/* try { // try from 0017a18c to 0017a1a8 has its CatchHandler @ 0017a1e8 */
nlohmann::json_abi_v3_11_3::detail::
concat<std::__cxx11::string,char_const(&)[6],std::__cxx11::string,char_const(&)[12]>
(local_60,"key \'",(string *)local_40,"\' not found");
/* try { // try from 0017a1ac to 0017a1d8 has its CatchHandler @ 0017a1d9 */
_ZN8nlohmann16json_abi_v3_11_36detail12out_of_range6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_
(uVar2,0x193,local_60,param_1);
/* WARNING: Subroutine does not return */
__cxa_throw(uVar2,&nlohmann::json_abi_v3_11_3::detail::out_of_range::typeinfo,
nlohmann::json_abi_v3_11_3::detail::exception::~exception);
}
|
|
9,343 |
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>& nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>::at<char const (&) [5], 0>(char const (&) [5])
|
monkey531[P]llama/common/json.hpp
|
reference at(KeyType && key)
{
// at only works for objects
if (JSON_HEDLEY_UNLIKELY(!is_object()))
{
JSON_THROW(type_error::create(304, detail::concat("cannot use at() with ", type_name()), this));
}
auto it = m_data.m_value.object->find(std::forward<KeyType>(key));
if (it == m_data.m_value.object->end())
{
JSON_THROW(out_of_range::create(403, detail::concat("key '", string_t(std::forward<KeyType>(key)), "' not found"), this));
}
return set_parent(it->second);
}
|
O3
|
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>& 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>::at<char const (&) [5], 0>(char const (&) [5]):
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x40, %rsp
movq %rdi, %r14
cmpb $0x1, (%rdi)
jne 0xa45d3
movq %rsi, %r15
movq 0x8(%r14), %r12
movq (%r12), %rbx
movq 0x8(%r12), %rax
cmpq %rax, %rbx
je 0xa45bd
movq %rbx, %rdi
movq %r15, %rsi
callq 0x1a230
testl %eax, %eax
je 0xa45b2
addq $0x30, %rbx
movq 0x8(%r12), %rax
cmpq %rax, %rbx
jne 0xa4593
jmp 0xa45b5
movq %rbx, %rax
movq 0x8(%r14), %rcx
movq 0x8(%rcx), %rbx
cmpq %rbx, %rax
je 0xa4631
addq $0x20, %rax
addq $0x40, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movl $0x20, %edi
callq 0x1a460
movq %rax, %rbx
movq %r14, %rdi
callq 0x5e9cc
movq %rsp, %rdx
movq %rax, (%rdx)
leaq 0x4c90d(%rip), %rsi # 0xf0f02
leaq 0x20(%rsp), %rdi
callq 0xaa855
movb $0x1, %bpl
leaq 0x20(%rsp), %rdx
movq %rbx, %rdi
movl $0x130, %esi # imm = 0x130
movq %r14, %rcx
callq 0x5e774
xorl %ebp, %ebp
leaq 0x85938(%rip), %rsi # 0x129f58
leaq -0x49a25(%rip), %rdx # 0x5ac02
movq %rbx, %rdi
callq 0x1af30
jmp 0xa46aa
movl $0x20, %edi
callq 0x1a460
movq %rax, %rbx
leaq 0x10(%rsp), %r12
movq %r12, -0x10(%r12)
movq %r15, %rdi
callq 0x1a400
leaq (%rax,%r15), %rdx
movq %rsp, %rdi
movq %r15, %rsi
callq 0x21af4
leaq 0x4c8cc(%rip), %rsi # 0xf0f32
leaq 0x4c8cb(%rip), %rcx # 0xf0f38
leaq 0x20(%rsp), %rdi
movq %rsp, %rdx
callq 0xaae32
movb $0x1, %bpl
leaq 0x20(%rsp), %rdx
movq %rbx, %rdi
movl $0x193, %esi # imm = 0x193
movq %r14, %rcx
callq 0x5cd64
xorl %ebp, %ebp
leaq 0x8583d(%rip), %rsi # 0x129ed8
leaq -0x49aa0(%rip), %rdx # 0x5ac02
movq %rbx, %rdi
callq 0x1af30
movq %rax, %r14
leaq 0x30(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xa46c8
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x1a8f0
movq (%rsp), %rdi
cmpq %r12, %rdi
je 0xa4713
movq 0x10(%rsp), %rsi
jmp 0xa470b
movq %rax, %r14
movq (%rsp), %rdi
cmpq %r12, %rdi
je 0xa471d
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x1a8f0
jmp 0xa471d
jmp 0xa471a
movq %rax, %r14
leaq 0x30(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xa4713
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x1a8f0
testb %bpl, %bpl
jne 0xa471d
jmp 0xa4725
movq %rax, %r14
movq %rbx, %rdi
callq 0x1a690
movq %r14, %rdi
callq 0x1afd0
nop
|
_ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE2atIRA9_KcTnNSt9enable_ifIXsr6detail32is_usable_as_basic_json_key_typeISD_T_EE5valueEiE4typeELi0EEERSD_OSJ_:
push rbp; char
push r15; int
push r14; int
push r12; int
push rbx; char
sub rsp, 40h
mov r14, rdi
cmp byte ptr [rdi], 1
jnz short loc_A45D3
mov r15, rsi
mov r12, [r14+8]
mov rbx, [r12]
mov rax, [r12+8]
cmp rbx, rax
jz short loc_A45BD
loc_A4593:
mov rdi, rbx
mov rsi, r15
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7compareEPKc; std::string::compare(char const*)
test eax, eax
jz short loc_A45B2
add rbx, 30h ; '0'
mov rax, [r12+8]
cmp rbx, rax
jnz short loc_A4593
jmp short loc_A45B5
loc_A45B2:
mov rax, rbx
loc_A45B5:
mov rcx, [r14+8]
mov rbx, [rcx+8]
loc_A45BD:
cmp rax, rbx
jz short loc_A4631
add rax, 20h ; ' '
add rsp, 40h
pop rbx
pop r12
pop r14
pop r15
pop rbp
retn
loc_A45D3:
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)
mov rdx, rsp
mov [rdx], rax
lea rsi, aCannotUseAtWit; "cannot use at() with "
lea rdi, [rsp+68h+var_48]
call _ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJRA22_KcPS9_EEET_DpOT0_; nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[22],char const*>(char const(&)[22],char const* &&)
mov bpl, 1
lea rdx, [rsp+68h+var_48]
mov rdi, rbx; this
mov esi, 130h; int
mov rcx, r14
call _ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_
xor ebp, ebp
lea rsi, _ZTIN8nlohmann16json_abi_v3_11_36detail10type_errorE; lptinfo
lea rdx, _ZN8nlohmann16json_abi_v3_11_36detail9exceptionD2Ev; void (*)(void *)
mov rdi, rbx; void *
call ___cxa_throw
jmp short loc_A46AA
loc_A4631:
mov edi, 20h ; ' '; thrown_size
call ___cxa_allocate_exception
mov rbx, rax
lea r12, [rsp+68h+var_58]
mov [r12-10h], r12
mov rdi, r15
call _strlen
lea rdx, [rax+r15]
mov rdi, rsp
mov rsi, r15
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag; std::string::_M_construct<char const*>(char const*,char const*,std::forward_iterator_tag)
lea rsi, aKey; "key '"
lea rcx, aNotFound; "' not found"
lea rdi, [rsp+68h+var_48]
mov rdx, rsp
call _ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJRA6_KcS8_RA12_S9_EEET_DpOT0_; nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[6],std::string,char const(&)[12]>(char const(&)[6],std::string,char const(&)[12] &&)
mov bpl, 1
lea rdx, [rsp+68h+var_48]
mov rdi, rbx; this
mov esi, 193h; int
mov rcx, r14
call _ZN8nlohmann16json_abi_v3_11_36detail12out_of_range6createIPNS0_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_36detail12out_of_rangeE; lptinfo
lea rdx, _ZN8nlohmann16json_abi_v3_11_36detail9exceptionD2Ev; void (*)(void *)
mov rdi, rbx; void *
call ___cxa_throw
loc_A46AA:
mov r14, rax
lea rax, [rsp+68h+var_38]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_A46C8
mov rsi, [rsp+68h+var_38]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_A46C8:
mov rdi, [rsp+68h+var_68]
cmp rdi, r12
jz short loc_A4713
mov rsi, [rsp+68h+var_58]
jmp short loc_A470B
mov r14, rax
mov rdi, [rsp+68h+var_68]; void *
cmp rdi, r12
jz short loc_A471D
mov rsi, [rsp+68h+var_58]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_A471D
jmp short loc_A471A
mov r14, rax
lea rax, [rsp+68h+var_38]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_A4713
mov rsi, [rsp+68h+var_38]
loc_A470B:
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_A4713:
test bpl, bpl
jnz short loc_A471D
jmp short loc_A4725
loc_A471A:
mov r14, rax
loc_A471D:
mov rdi, rbx; void *
call ___cxa_free_exception
loc_A4725:
mov rdi, r14
call __Unwind_Resume
|
long long ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE2atIRA9_KcTnNSt9enable_ifIXsr6detail32is_usable_as_basic_json_key_typeISD_T_EE5valueEiE4typeELi0EEERSD_OSJ_(
long long a1,
_BYTE *a2)
{
long long *v2; // r12
long long v3; // rbx
long long v4; // rax
nlohmann::json_abi_v3_11_3::detail::exception *exception; // rbx
nlohmann::json_abi_v3_11_3::detail::exception *v7; // rbx
long long v8; // rax
void *v9[2]; // [rsp+0h] [rbp-68h] BYREF
long long v10; // [rsp+10h] [rbp-58h] BYREF
_QWORD v11[2]; // [rsp+20h] [rbp-48h] BYREF
if ( *(_BYTE *)a1 != 1 )
{
exception = (nlohmann::json_abi_v3_11_3::detail::exception *)__cxa_allocate_exception(0x20uLL);
v9[0] = (void *)nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::type_name((unsigned __int8 *)a1);
nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[22],char const*>(v11, "cannot use at() with ");
ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_(
exception,
304,
v11);
__cxa_throw(
exception,
(struct type_info *)&`typeinfo for'nlohmann::json_abi_v3_11_3::detail::type_error,
(void (*)(void *))nlohmann::json_abi_v3_11_3::detail::exception::~exception);
}
v2 = *(long long **)(a1 + 8);
v3 = *v2;
v4 = v2[1];
if ( *v2 != v4 )
{
while ( (unsigned int)std::string::compare(v3, a2) )
{
v3 += 48LL;
v4 = v2[1];
if ( v3 == v4 )
goto LABEL_7;
}
v4 = v3;
LABEL_7:
v3 = *(_QWORD *)(*(_QWORD *)(a1 + 8) + 8LL);
}
if ( v4 == v3 )
{
v7 = (nlohmann::json_abi_v3_11_3::detail::exception *)__cxa_allocate_exception(0x20uLL);
v9[0] = &v10;
v8 = strlen(a2);
std::string::_M_construct<char const*>((long long)v9, a2, (long long)&a2[v8]);
nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[6],std::string,char const(&)[12]>(
v11,
"key '",
v9,
"' not found");
ZN8nlohmann16json_abi_v3_11_36detail12out_of_range6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_(
v7,
403,
v11);
__cxa_throw(
v7,
(struct type_info *)&`typeinfo for'nlohmann::json_abi_v3_11_3::detail::out_of_range,
(void (*)(void *))nlohmann::json_abi_v3_11_3::detail::exception::~exception);
}
return v4 + 32;
}
|
_ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE2atIRA9_KcTnNSt9enable_ifIXsr6detail32is_usable_as_basic_json_key_typeISD_T_EE5valueEiE4typeELi0EEERSD_OSJ_:
PUSH RBP
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
SUB RSP,0x40
MOV R14,RDI
CMP byte ptr [RDI],0x1
JNZ 0x001a45d3
MOV R15,RSI
MOV R12,qword ptr [R14 + 0x8]
MOV RBX,qword ptr [R12]
MOV RAX,qword ptr [R12 + 0x8]
CMP RBX,RAX
JZ 0x001a45bd
LAB_001a4593:
MOV RDI,RBX
MOV RSI,R15
CALL 0x0011a230
TEST EAX,EAX
JZ 0x001a45b2
ADD RBX,0x30
MOV RAX,qword ptr [R12 + 0x8]
CMP RBX,RAX
JNZ 0x001a4593
JMP 0x001a45b5
LAB_001a45b2:
MOV RAX,RBX
LAB_001a45b5:
MOV RCX,qword ptr [R14 + 0x8]
MOV RBX,qword ptr [RCX + 0x8]
LAB_001a45bd:
CMP RAX,RBX
JZ 0x001a4631
ADD RAX,0x20
ADD RSP,0x40
POP RBX
POP R12
POP R14
POP R15
POP RBP
RET
LAB_001a45d3:
MOV EDI,0x20
CALL 0x0011a460
MOV RBX,RAX
MOV RDI,R14
CALL 0x0015e9cc
MOV RDX,RSP
MOV qword ptr [RDX],RAX
LAB_001a45ee:
LEA RSI,[0x1f0f02]
LEA RDI,[RSP + 0x20]
CALL 0x001aa855
MOV BPL,0x1
LAB_001a4602:
LEA RDX,[RSP + 0x20]
MOV RDI,RBX
MOV ESI,0x130
MOV RCX,R14
CALL 0x0015e774
XOR EBP,EBP
LEA RSI,[0x229f58]
LEA RDX,[0x15ac02]
MOV RDI,RBX
CALL 0x0011af30
LAB_001a4631:
MOV EDI,0x20
CALL 0x0011a460
MOV RBX,RAX
LEA R12,[RSP + 0x10]
MOV qword ptr [R12 + -0x10],R12
MOV RDI,R15
CALL 0x0011a400
LEA RDX,[RAX + R15*0x1]
LAB_001a4654:
MOV RDI,RSP
MOV RSI,R15
CALL 0x00121af4
LAB_001a465f:
LEA RSI,[0x1f0f32]
LEA RCX,[0x1f0f38]
LEA RDI,[RSP + 0x20]
MOV RDX,RSP
CALL 0x001aae32
MOV BPL,0x1
LAB_001a467d:
LEA RDX,[RSP + 0x20]
MOV RDI,RBX
MOV ESI,0x193
MOV RCX,R14
CALL 0x0015cd64
XOR EBP,EBP
LEA RSI,[0x229ed8]
LEA RDX,[0x15ac02]
MOV RDI,RBX
CALL 0x0011af30
|
char * _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE2atIRA9_KcTnNSt9enable_ifIXsr6detail32is_usable_as_basic_json_key_typeISD_T_EE5valueEiE4typeELi0EEERSD_OSJ_
(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,char *param_2)
{
long *plVar1;
int iVar2;
char *pcVar3;
int8 uVar4;
size_t sVar5;
char *pcVar6;
char *local_68 [2];
char local_58 [16];
detail local_48 [32];
if (*param_1 !=
(basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
)0x1) {
uVar4 = __cxa_allocate_exception(0x20);
local_68[0] = (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 001a45ee to 001a45fe has its CatchHandler @ 001a471a */
nlohmann::json_abi_v3_11_3::detail::concat<std::__cxx11::string,char_const(&)[22],char_const*>
(local_48,"cannot use at() with ",local_68);
/* try { // try from 001a4602 to 001a462e has its CatchHandler @ 001a46f5 */
_ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_
(uVar4,0x130,local_48,param_1);
/* WARNING: Subroutine does not return */
__cxa_throw(uVar4,&nlohmann::json_abi_v3_11_3::detail::type_error::typeinfo,
nlohmann::json_abi_v3_11_3::detail::exception::~exception);
}
plVar1 = *(long **)(param_1 + 8);
pcVar6 = (char *)*plVar1;
pcVar3 = (char *)plVar1[1];
if (pcVar6 != pcVar3) {
do {
pcVar3 = pcVar6;
iVar2 = std::__cxx11::string::compare(pcVar3);
if (iVar2 == 0) break;
pcVar6 = pcVar3 + 0x30;
pcVar3 = (char *)plVar1[1];
} while (pcVar6 != pcVar3);
pcVar6 = *(char **)(*(long *)(param_1 + 8) + 8);
}
if (pcVar3 == pcVar6) {
uVar4 = __cxa_allocate_exception(0x20);
local_68[0] = local_58;
sVar5 = strlen(param_2);
/* try { // try from 001a4654 to 001a465e has its CatchHandler @ 001a46f3 */
std::__cxx11::string::_M_construct<char_const*>(local_68,param_2,param_2 + sVar5);
/* try { // try from 001a465f to 001a4679 has its CatchHandler @ 001a46d8 */
nlohmann::json_abi_v3_11_3::detail::
concat<std::__cxx11::string,char_const(&)[6],std::__cxx11::string,char_const(&)[12]>
(local_48,"key \'",(string *)local_68,"\' not found");
/* try { // try from 001a467d to 001a46a9 has its CatchHandler @ 001a46aa */
_ZN8nlohmann16json_abi_v3_11_36detail12out_of_range6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_
(uVar4,0x193,local_48,param_1);
/* WARNING: Subroutine does not return */
__cxa_throw(uVar4,&nlohmann::json_abi_v3_11_3::detail::out_of_range::typeinfo,
nlohmann::json_abi_v3_11_3::detail::exception::~exception);
}
return pcVar3 + 0x20;
}
|
|
9,344 |
httplib::Server::bind_internal(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, int, int)
|
nickolajgrishuk[P]metricz-cpp/build_O3/_deps/httplib-src/httplib.h
|
inline int Server::bind_internal(const std::string &host, int port,
int socket_flags) {
if (!is_valid()) { return -1; }
svr_sock_ = create_server_socket(host, port, socket_flags, socket_options_);
if (svr_sock_ == INVALID_SOCKET) { return -1; }
if (port == 0) {
struct sockaddr_storage addr;
socklen_t addr_len = sizeof(addr);
if (getsockname(svr_sock_, reinterpret_cast<struct sockaddr *>(&addr),
&addr_len) == -1) {
return -1;
}
if (addr.ss_family == AF_INET) {
return ntohs(reinterpret_cast<struct sockaddr_in *>(&addr)->sin_port);
} else if (addr.ss_family == AF_INET6) {
return ntohs(reinterpret_cast<struct sockaddr_in6 *>(&addr)->sin6_port);
} else {
return -1;
}
} else {
return port;
}
}
|
O3
|
c
|
httplib::Server::bind_internal(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, int, int):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xa8, %rsp
movl %ecx, %r15d
movl %edx, %ebp
movq %rsi, %r12
movq %rdi, %r14
movq (%rdi), %rax
callq *0x10(%rax)
movl $0xffffffff, %ebx # imm = 0xFFFFFFFF
testb %al, %al
je 0x1759e
leaq 0x2a0(%r14), %rsi
leaq 0x8(%rsp), %r13
movq %r13, %rdi
callq 0x17710
movq %r14, %rdi
movq %r12, %rsi
movl %ebp, %edx
movl %r15d, %ecx
movq %r13, %r8
callq 0x17620
xchgl %eax, 0x28(%r14)
movq 0x18(%rsp), %rax
testq %rax, %rax
je 0x1758f
leaq 0x8(%rsp), %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
movl 0x28(%r14), %eax
cmpl $-0x1, %eax
je 0x1759e
movl %ebp, %ebx
testl %ebp, %ebp
je 0x175b2
movl %ebx, %eax
addq $0xa8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x4(%rsp), %rdx
movl $0x80, (%rdx)
movl 0x28(%r14), %edi
leaq 0x28(%rsp), %rsi
callq 0x8500
movl $0xffffffff, %ebx # imm = 0xFFFFFFFF
cmpl $-0x1, %eax
je 0x1759e
movzwl 0x28(%rsp), %eax
cmpl $0xa, %eax
je 0x175e4
cmpl $0x2, %eax
jne 0x1759e
movzwl 0x2a(%rsp), %eax
rolw $0x8, %ax
movzwl %ax, %ebx
jmp 0x1759e
jmp 0x17618
movq %rax, %rbx
movq 0x18(%rsp), %rax
testq %rax, %rax
je 0x17610
leaq 0x8(%rsp), %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
movq %rbx, %rdi
callq 0x8980
movq %rax, %rdi
callq 0x9339
|
_ZN7httplib6Server13bind_internalERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEii:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 0A8h
mov r15d, ecx
mov ebp, edx
mov r12, rsi
mov r14, rdi
mov rax, [rdi]
call qword ptr [rax+10h]
mov ebx, 0FFFFFFFFh
test al, al
jz short loc_1759E
lea rsi, [r14+2A0h]
lea r13, [rsp+0D8h+var_D0]
mov rdi, r13
call _ZNSt8functionIFviEEC2ERKS1_; std::function<void ()(int)>::function(std::function<void ()(int)> const&)
mov rdi, r14
mov rsi, r12
mov edx, ebp
mov ecx, r15d
mov r8, r13
call _ZNK7httplib6Server20create_server_socketERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEiiSt8functionIFviEE; httplib::Server::create_server_socket(std::string const&,int,int,std::function<void ()(int)>)
xchg eax, [r14+28h]
mov rax, [rsp+0D8h+var_C0]
test rax, rax
jz short loc_1758F
lea rdi, [rsp+0D8h+var_D0]
mov rsi, rdi
mov edx, 3
call rax
loc_1758F:
mov eax, [r14+28h]
cmp eax, 0FFFFFFFFh
jz short loc_1759E
mov ebx, ebp
test ebp, ebp
jz short loc_175B2
loc_1759E:
mov eax, ebx
add rsp, 0A8h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_175B2:
lea rdx, [rsp+0D8h+var_D4]
mov dword ptr [rdx], 80h
mov edi, [r14+28h]
lea rsi, [rsp+0D8h+var_B0]
call _getsockname
mov ebx, 0FFFFFFFFh
cmp eax, 0FFFFFFFFh
jz short loc_1759E
movzx eax, [rsp+0D8h+var_B0]
cmp eax, 0Ah
jz short loc_175E4
cmp eax, 2
jnz short loc_1759E
loc_175E4:
movzx eax, [rsp+0D8h+var_AE]
rol ax, 8
movzx ebx, ax
jmp short loc_1759E
jmp short loc_17618
mov rbx, rax
mov rax, [rsp+0D8h+var_C0]
test rax, rax
jz short loc_17610
lea rdi, [rsp+0D8h+var_D0]
mov rsi, rdi
mov edx, 3
call rax
loc_17610:
mov rdi, rbx
call __Unwind_Resume
loc_17618:
mov rdi, rax
call __clang_call_terminate
|
long long httplib::Server::bind_internal(volatile __int32 *a1, long long a2, unsigned int a3, unsigned int a4)
{
unsigned int v6; // ebx
int v8; // [rsp+4h] [rbp-D4h] BYREF
_BYTE v9[16]; // [rsp+8h] [rbp-D0h] BYREF
void ( *v10)(_BYTE *, _BYTE *, long long); // [rsp+18h] [rbp-C0h]
_WORD v11[88]; // [rsp+28h] [rbp-B0h] BYREF
v6 = -1;
if ( (*(unsigned __int8 ( **)(volatile __int32 *))(*(_QWORD *)a1 + 16LL))(a1) )
{
std::function<void ()(int)>::function(v9, a1 + 168);
_InterlockedExchange(a1 + 10, httplib::Server::create_server_socket(a1, a2, a3, a4, v9));
if ( v10 )
v10(v9, v9, 3LL);
if ( *((_DWORD *)a1 + 10) != -1 )
{
v6 = a3;
if ( !a3 )
{
v8 = 128;
v6 = -1;
if ( (unsigned int)getsockname(*((unsigned int *)a1 + 10), v11, &v8) != -1 && (v11[0] == 10 || v11[0] == 2) )
return (unsigned __int16)__ROL2__(v11[1], 8);
}
}
}
return v6;
}
|
bind_internal:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0xa8
MOV R15D,ECX
MOV EBP,EDX
MOV R12,RSI
MOV R14,RDI
MOV RAX,qword ptr [RDI]
CALL qword ptr [RAX + 0x10]
MOV EBX,0xffffffff
TEST AL,AL
JZ 0x0011759e
LEA RSI,[R14 + 0x2a0]
LEA R13,[RSP + 0x8]
MOV RDI,R13
CALL 0x00117710
LAB_0011755f:
MOV RDI,R14
MOV RSI,R12
MOV EDX,EBP
MOV ECX,R15D
MOV R8,R13
CALL 0x00117620
XCHG dword ptr [R14 + 0x28],EAX
MOV RAX,qword ptr [RSP + 0x18]
TEST RAX,RAX
JZ 0x0011758f
LAB_00117580:
LEA RDI,[RSP + 0x8]
MOV RSI,RDI
MOV EDX,0x3
CALL RAX
LAB_0011758f:
MOV EAX,dword ptr [R14 + 0x28]
CMP EAX,-0x1
JZ 0x0011759e
MOV EBX,EBP
TEST EBP,EBP
JZ 0x001175b2
LAB_0011759e:
MOV EAX,EBX
ADD RSP,0xa8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_001175b2:
LEA RDX,[RSP + 0x4]
MOV dword ptr [RDX],0x80
MOV EDI,dword ptr [R14 + 0x28]
LEA RSI,[RSP + 0x28]
CALL 0x00108500
MOV EBX,0xffffffff
CMP EAX,-0x1
JZ 0x0011759e
MOVZX EAX,word ptr [RSP + 0x28]
CMP EAX,0xa
JZ 0x001175e4
CMP EAX,0x2
JNZ 0x0011759e
LAB_001175e4:
MOVZX EAX,word ptr [RSP + 0x2a]
ROL AX,0x8
MOVZX EBX,AX
JMP 0x0011759e
|
/* httplib::Server::bind_internal(std::__cxx11::string const&, int, int) */
uint __thiscall httplib::Server::bind_internal(Server *this,string *param_1,int param_2,int param_3)
{
char cVar1;
int4 uVar2;
int iVar3;
uint uVar4;
socklen_t local_d4;
function<void(int)> local_d0 [16];
code *local_c0;
sockaddr local_b0 [8];
cVar1 = (**(code **)(*(long *)this + 0x10))();
uVar4 = 0xffffffff;
if (cVar1 != '\0') {
std::function<void(int)>::function(local_d0,this + 0x2a0);
/* try { // try from 0011755f to 00117571 has its CatchHandler @ 001175f4 */
uVar2 = create_server_socket(this,param_1,param_2,param_3,local_d0);
LOCK();
*(int4 *)(this + 0x28) = uVar2;
UNLOCK();
if (local_c0 != (code *)0x0) {
/* try { // try from 00117580 to 0011758e has its CatchHandler @ 001175f2 */
(*local_c0)(local_d0,local_d0,3);
}
if ((*(int *)(this + 0x28) != -1) && (uVar4 = param_2, param_2 == 0)) {
local_d4 = 0x80;
iVar3 = getsockname(*(int *)(this + 0x28),local_b0,&local_d4);
uVar4 = 0xffffffff;
if ((iVar3 != -1) && ((local_b0[0].sa_family == 10 || (local_b0[0].sa_family == 2)))) {
uVar4 = (uint)(ushort)(local_b0[0].sa_data._0_2_ << 8 |
(ushort)local_b0[0].sa_data._0_2_ >> 8);
}
}
}
return uVar4;
}
|
|
9,345 |
evmone::baseline::execute(evmone::VM&, evmc_host_interface const&, evmc_host_context*, evmc_revision, evmc_message const&, evmone::baseline::CodeAnalysis const&)
|
corpus-core[P]colibri-stateless/build_O0/_deps/evmone_external-src/lib/evmone/baseline_execution.cpp
|
evmc_result execute(VM& vm, const evmc_host_interface& host, evmc_host_context* ctx,
evmc_revision rev, const evmc_message& msg, const CodeAnalysis& analysis) noexcept
{
const auto code = analysis.executable_code();
const auto code_begin = code.data();
auto gas = msg.gas;
auto& state = vm.get_execution_state(static_cast<size_t>(msg.depth));
state.reset(msg, rev, host, ctx, analysis.raw_code());
state.analysis.baseline = &analysis; // Assign code analysis for instruction implementations.
const auto& cost_table = get_baseline_cost_table(state.rev, analysis.eof_header().version);
auto* tracer = vm.get_tracer();
if (INTX_UNLIKELY(tracer != nullptr))
{
tracer->notify_execution_start(state.rev, *state.msg, code);
gas = dispatch<true>(cost_table, state, gas, code_begin, tracer);
}
else
{
#if EVMONE_CGOTO_SUPPORTED
if (vm.cgoto)
gas = dispatch_cgoto(cost_table, state, gas, code_begin);
else
#endif
gas = dispatch<false>(cost_table, state, gas, code_begin);
}
const auto gas_left = (state.status == EVMC_SUCCESS || state.status == EVMC_REVERT) ? gas : 0;
const auto gas_refund = (state.status == EVMC_SUCCESS) ? state.gas_refund : 0;
assert(state.output_size != 0 || state.output_offset == 0);
const auto result =
(state.deploy_container.has_value() ?
evmc::make_result(state.status, gas_left, gas_refund,
state.deploy_container->data(), state.deploy_container->size()) :
evmc::make_result(state.status, gas_left, gas_refund,
state.output_size != 0 ? &state.memory[state.output_offset] : nullptr,
state.output_size));
if (INTX_UNLIKELY(tracer != nullptr))
tracer->notify_execution_end(result);
return result;
}
|
O0
|
cpp
|
evmone::baseline::execute(evmone::VM&, evmc_host_interface const&, evmc_host_context*, evmc_revision, evmc_message const&, evmone::baseline::CodeAnalysis const&):
pushq %rbp
movq %rsp, %rbp
subq $0x130, %rsp # imm = 0x130
movq %rdi, -0xc8(%rbp)
movq %rdi, -0xc0(%rbp)
movq 0x10(%rbp), %rax
movq %rsi, -0x8(%rbp)
movq %rdx, -0x10(%rbp)
movq %rcx, -0x18(%rbp)
movl %r8d, -0x1c(%rbp)
movq %r9, -0x28(%rbp)
movq 0x10(%rbp), %rdi
callq 0x5e710
movq %rax, -0x38(%rbp)
movq %rdx, -0x30(%rbp)
leaq -0x38(%rbp), %rdi
callq 0x5e730
movq %rax, -0x40(%rbp)
movq -0x28(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x48(%rbp)
movq -0x8(%rbp), %rdi
movq -0x28(%rbp), %rax
movslq 0x8(%rax), %rsi
callq 0x37540
movq %rax, -0x50(%rbp)
movq -0x50(%rbp), %rax
movq %rax, -0xb8(%rbp)
movq -0x28(%rbp), %rax
movq %rax, -0xb0(%rbp)
movl -0x1c(%rbp), %eax
movl %eax, -0x98(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0xa8(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0xa0(%rbp)
movq 0x10(%rbp), %rdi
callq 0x5e950
movq -0xb8(%rbp), %rdi
movq -0xb0(%rbp), %rsi
movq -0xa8(%rbp), %rcx
movq -0xa0(%rbp), %r8
movq %rax, %r9
movq %rdx, %rax
movl -0x98(%rbp), %edx
movq %r9, -0x60(%rbp)
movq %rax, -0x58(%rbp)
leaq -0x60(%rbp), %rax
movq (%rax), %r9
movq %r9, (%rsp)
movq 0x8(%rax), %rax
movq %rax, 0x8(%rsp)
callq 0x5e750
movq 0x10(%rbp), %rcx
movq -0x50(%rbp), %rax
movq %rcx, 0x1f8(%rax)
movq -0x50(%rbp), %rax
movl 0x40(%rax), %eax
movl %eax, -0x94(%rbp)
movq 0x10(%rbp), %rdi
callq 0x5e970
movl -0x94(%rbp), %edi
movzbl (%rax), %esi
callq 0x70980
movq %rax, -0x68(%rbp)
movq -0x8(%rbp), %rdi
callq 0x5e990
movq %rax, -0x70(%rbp)
cmpq $0x0, -0x70(%rbp)
je 0x3eb81
movq -0x70(%rbp), %rdi
movq -0x50(%rbp), %rax
movl 0x40(%rax), %esi
movq -0x50(%rbp), %rax
movq 0x20(%rax), %rdx
movq -0x38(%rbp), %rax
movq %rax, -0x80(%rbp)
movq -0x30(%rbp), %rax
movq %rax, -0x78(%rbp)
movq -0x80(%rbp), %rcx
movq -0x78(%rbp), %r8
callq 0x5e9b0
movq -0x68(%rbp), %rdi
movq -0x50(%rbp), %rsi
movq -0x48(%rbp), %rdx
movq -0x40(%rbp), %rcx
movq -0x70(%rbp), %r8
callq 0x3ee00
movq %rax, -0x48(%rbp)
jmp 0x3ebc6
movq -0x8(%rbp), %rax
testb $0x1, 0x38(%rax)
je 0x3eba6
movq -0x68(%rbp), %rdi
movq -0x50(%rbp), %rsi
movq -0x48(%rbp), %rdx
movq -0x40(%rbp), %rcx
callq 0x43ec0
movq %rax, -0x48(%rbp)
jmp 0x3ebc4
movq -0x68(%rbp), %rdi
movq -0x50(%rbp), %rsi
movq -0x48(%rbp), %rdx
movq -0x40(%rbp), %rcx
xorl %eax, %eax
movl %eax, %r8d
callq 0x4a0c0
movq %rax, -0x48(%rbp)
jmp 0x3ebc6
movq -0x50(%rbp), %rax
cmpl $0x0, 0x78(%rax)
je 0x3ebda
movq -0x50(%rbp), %rax
cmpl $0x2, 0x78(%rax)
jne 0x3ebe7
movq -0x48(%rbp), %rax
movq %rax, -0xd0(%rbp)
jmp 0x3ebf2
xorl %eax, %eax
movq %rax, -0xd0(%rbp)
jmp 0x3ebf2
movq -0xd0(%rbp), %rax
movq %rax, -0x88(%rbp)
movq -0x50(%rbp), %rax
cmpl $0x0, 0x78(%rax)
jne 0x3ec1a
movq -0x50(%rbp), %rax
movq (%rax), %rax
movq %rax, -0xd8(%rbp)
jmp 0x3ec25
xorl %eax, %eax
movq %rax, -0xd8(%rbp)
jmp 0x3ec25
movq -0xd8(%rbp), %rax
movq %rax, -0x90(%rbp)
movq -0x50(%rbp), %rcx
movb $0x1, %al
cmpq $0x0, 0x88(%rcx)
movb %al, -0xd9(%rbp)
jne 0x3ec5e
movq -0x50(%rbp), %rax
cmpq $0x0, 0x80(%rax)
sete %al
movb %al, -0xd9(%rbp)
movb -0xd9(%rbp), %al
testb $0x1, %al
jne 0x3ec6a
jmp 0x3ec6c
jmp 0x3ec8b
leaq 0x9d27d(%rip), %rdi # 0xdbef0
leaq 0x9e06a(%rip), %rsi # 0xdcce4
movl $0x144, %edx # imm = 0x144
leaq 0x9e0eb(%rip), %rcx # 0xdcd71
callq 0x23160
movq -0x50(%rbp), %rdi
addq $0x90, %rdi
callq 0x5ea50
testb $0x1, %al
jne 0x3eca4
jmp 0x3ed31
movq -0x50(%rbp), %rdi
movl 0x78(%rdi), %eax
movl %eax, -0xfc(%rbp)
movq -0x88(%rbp), %rax
movq %rax, -0xf8(%rbp)
movq -0x90(%rbp), %rax
movq %rax, -0xf0(%rbp)
addq $0x90, %rdi
callq 0x5ea70
movq %rax, %rdi
callq 0x5ea90
movq %rax, -0xe8(%rbp)
movq -0x50(%rbp), %rdi
addq $0x90, %rdi
callq 0x5ea70
movq %rax, %rdi
callq 0x5eab0
movq -0xc8(%rbp), %rdi
movl -0xfc(%rbp), %esi
movq -0xf8(%rbp), %rdx
movq -0xf0(%rbp), %rcx
movq -0xe8(%rbp), %r8
movq %rax, %r9
callq 0x4f120
jmp 0x3ed2c
jmp 0x3edca
movq -0x50(%rbp), %rax
movl 0x78(%rax), %eax
movl %eax, -0x114(%rbp)
movq -0x88(%rbp), %rax
movq %rax, -0x110(%rbp)
movq -0x90(%rbp), %rax
movq %rax, -0x108(%rbp)
movq -0x50(%rbp), %rax
cmpq $0x0, 0x88(%rax)
je 0x3ed89
movq -0x50(%rbp), %rdi
addq $0x8, %rdi
movq -0x50(%rbp), %rax
movq 0x80(%rax), %rsi
callq 0x5ead0
movq %rax, -0x120(%rbp)
jmp 0x3ed94
xorl %eax, %eax
movq %rax, -0x120(%rbp)
jmp 0x3ed94
movq -0x108(%rbp), %rcx
movq -0x110(%rbp), %rdx
movl -0x114(%rbp), %esi
movq -0xc8(%rbp), %rdi
movq -0x120(%rbp), %r8
movq -0x50(%rbp), %rax
movq 0x88(%rax), %r9
callq 0x4f120
jmp 0x3edc8
jmp 0x3edca
cmpq $0x0, -0x70(%rbp)
je 0x3ede1
movq -0xc8(%rbp), %rsi
movq -0x70(%rbp), %rdi
callq 0x5eb00
movq -0xc0(%rbp), %rax
addq $0x130, %rsp # imm = 0x130
popq %rbp
retq
movq %rax, %rdi
callq 0x36420
nopl (%rax)
|
_ZN6evmone8baseline7executeERNS_2VMERK19evmc_host_interfaceP17evmc_host_context13evmc_revisionRK12evmc_messageRKNS0_12CodeAnalysisE:
push rbp
mov rbp, rsp
sub rsp, 130h
mov [rbp+var_C8], rdi
mov [rbp+var_C0], rdi
mov rax, [rbp+arg_0]
mov [rbp+var_8], rsi
mov [rbp+var_10], rdx
mov [rbp+var_18], rcx
mov [rbp+var_1C], r8d
mov [rbp+var_28], r9
mov rdi, [rbp+arg_0]; this
call _ZNK6evmone8baseline12CodeAnalysis15executable_codeEv; evmone::baseline::CodeAnalysis::executable_code(void)
mov [rbp+var_38], rax
mov [rbp+var_30], rdx
lea rdi, [rbp+var_38]
call _ZNKSt17basic_string_viewIhN4evmc11byte_traitsIhEEE4dataEv; std::basic_string_view<uchar,evmc::byte_traits<uchar>>::data(void)
mov [rbp+var_40], rax
mov rax, [rbp+var_28]
mov rax, [rax+10h]
mov [rbp+var_48], rax
mov rdi, [rbp+var_8]; this
mov rax, [rbp+var_28]
movsxd rsi, dword ptr [rax+8]; unsigned __int64
call _ZN6evmone2VM19get_execution_stateEm; evmone::VM::get_execution_state(ulong)
mov [rbp+var_50], rax
mov rax, [rbp+var_50]
mov [rbp+var_B8], rax
mov rax, [rbp+var_28]
mov [rbp+var_B0], rax
mov eax, [rbp+var_1C]
mov [rbp+var_98], eax
mov rax, [rbp+var_10]
mov [rbp+var_A8], rax
mov rax, [rbp+var_18]
mov [rbp+var_A0], rax
mov rdi, [rbp+arg_0]; this
call _ZNK6evmone8baseline12CodeAnalysis8raw_codeEv; evmone::baseline::CodeAnalysis::raw_code(void)
mov rdi, [rbp+var_B8]
mov rsi, [rbp+var_B0]
mov rcx, [rbp+var_A8]
mov r8, [rbp+var_A0]
mov r9, rax
mov rax, rdx
mov edx, [rbp+var_98]
mov [rbp+var_60], r9
mov [rbp+var_58], rax
lea rax, [rbp+var_60]
mov r9, [rax]
mov [rsp+130h+var_130], r9
mov rax, [rax+8]
mov [rsp+130h+var_128], rax
call _ZN6evmone14ExecutionState5resetERK12evmc_message13evmc_revisionRK19evmc_host_interfaceP17evmc_host_contextSt17basic_string_viewIhN4evmc11byte_traitsIhEEE; evmone::ExecutionState::reset(evmc_message const&,evmc_revision,evmc_host_interface const&,evmc_host_context *,std::basic_string_view<uchar,evmc::byte_traits<uchar>>)
mov rcx, [rbp+arg_0]
mov rax, [rbp+var_50]
mov [rax+1F8h], rcx
mov rax, [rbp+var_50]
mov eax, [rax+40h]
mov [rbp+var_94], eax
mov rdi, [rbp+arg_0]; this
call _ZNK6evmone8baseline12CodeAnalysis10eof_headerEv; evmone::baseline::CodeAnalysis::eof_header(void)
mov edi, [rbp+var_94]
movzx esi, byte ptr [rax]
call _ZN6evmone8baseline23get_baseline_cost_tableE13evmc_revisionh; evmone::baseline::get_baseline_cost_table(evmc_revision,uchar)
mov [rbp+var_68], rax
mov rdi, [rbp+var_8]; this
call _ZNK6evmone2VM10get_tracerEv; evmone::VM::get_tracer(void)
mov [rbp+var_70], rax
cmp [rbp+var_70], 0
jz short loc_3EB81
mov rdi, [rbp+var_70]
mov rax, [rbp+var_50]
mov esi, [rax+40h]
mov rax, [rbp+var_50]
mov rdx, [rax+20h]
mov rax, [rbp+var_38]
mov [rbp+var_80], rax
mov rax, [rbp+var_30]
mov [rbp+var_78], rax
mov rcx, [rbp+var_80]
mov r8, [rbp+var_78]
call _ZN6evmone6Tracer22notify_execution_startE13evmc_revisionRK12evmc_messageSt17basic_string_viewIhN4evmc11byte_traitsIhEEE; evmone::Tracer::notify_execution_start(evmc_revision,evmc_message const&,std::basic_string_view<uchar,evmc::byte_traits<uchar>>)
mov rdi, [rbp+var_68]
mov rsi, [rbp+var_50]
mov rdx, [rbp+var_48]
mov rcx, [rbp+var_40]
mov r8, [rbp+var_70]
call _ZN6evmone8baseline12_GLOBAL__N_18dispatchILb1EEElRKSt5arrayIsLm256EERNS_14ExecutionStateElPKhPNS_6TracerE; evmone::baseline::`anonymous namespace'::dispatch<true>(std::array<short,256ul> const&,evmone::ExecutionState &,long,uchar const*,evmone::Tracer *)
mov [rbp+var_48], rax
jmp short loc_3EBC6
loc_3EB81:
mov rax, [rbp+var_8]
test byte ptr [rax+38h], 1
jz short loc_3EBA6
mov rdi, [rbp+var_68]
mov rsi, [rbp+var_50]
mov rdx, [rbp+var_48]
mov rcx, [rbp+var_40]
call _ZN6evmone8baseline12_GLOBAL__N_114dispatch_cgotoERKSt5arrayIsLm256EERNS_14ExecutionStateElPKh; evmone::baseline::`anonymous namespace'::dispatch_cgoto(std::array<short,256ul> const&,evmone::ExecutionState &,long,uchar const*)
mov [rbp+var_48], rax
jmp short loc_3EBC4
loc_3EBA6:
mov rdi, [rbp+var_68]
mov rsi, [rbp+var_50]
mov rdx, [rbp+var_48]
mov rcx, [rbp+var_40]
xor eax, eax
mov r8d, eax
call _ZN6evmone8baseline12_GLOBAL__N_18dispatchILb0EEElRKSt5arrayIsLm256EERNS_14ExecutionStateElPKhPNS_6TracerE; evmone::baseline::`anonymous namespace'::dispatch<false>(std::array<short,256ul> const&,evmone::ExecutionState &,long,uchar const*,evmone::Tracer *)
mov [rbp+var_48], rax
loc_3EBC4:
jmp short $+2
loc_3EBC6:
mov rax, [rbp+var_50]
cmp dword ptr [rax+78h], 0
jz short loc_3EBDA
mov rax, [rbp+var_50]
cmp dword ptr [rax+78h], 2
jnz short loc_3EBE7
loc_3EBDA:
mov rax, [rbp+var_48]
mov [rbp+var_D0], rax
jmp short loc_3EBF2
loc_3EBE7:
xor eax, eax
mov [rbp+var_D0], rax
jmp short $+2
loc_3EBF2:
mov rax, [rbp+var_D0]
mov [rbp+var_88], rax
mov rax, [rbp+var_50]
cmp dword ptr [rax+78h], 0
jnz short loc_3EC1A
mov rax, [rbp+var_50]
mov rax, [rax]
mov [rbp+var_D8], rax
jmp short loc_3EC25
loc_3EC1A:
xor eax, eax
mov [rbp+var_D8], rax
jmp short $+2
loc_3EC25:
mov rax, [rbp+var_D8]
mov [rbp+var_90], rax
mov rcx, [rbp+var_50]
mov al, 1
cmp qword ptr [rcx+88h], 0
mov [rbp+var_D9], al
jnz short loc_3EC5E
mov rax, [rbp+var_50]
cmp qword ptr [rax+80h], 0
setz al
mov [rbp+var_D9], al
loc_3EC5E:
mov al, [rbp+var_D9]
test al, 1
jnz short loc_3EC6A
jmp short loc_3EC6C
loc_3EC6A:
jmp short loc_3EC8B
loc_3EC6C:
lea rdi, aStateOutputSiz; "state.output_size != 0 || state.output_"...
lea rsi, aWorkspaceLlm4b_2; "/workspace/llm4binary/github/2025_star3"...
mov edx, 144h
lea rcx, aEvmcResultEvmo_0; "evmc_result evmone::baseline::execute(V"...
call ___assert_fail
loc_3EC8B:
mov rdi, [rbp+var_50]
add rdi, 90h
call _ZNKSt8optionalINSt7__cxx1112basic_stringIhN4evmc11byte_traitsIhEESaIhEEEE9has_valueEv; std::optional<std::basic_string<uchar,evmc::byte_traits<uchar>,std::allocator<uchar>>>::has_value(void)
test al, 1
jnz short loc_3ECA4
jmp loc_3ED31
loc_3ECA4:
mov rdi, [rbp+var_50]
mov eax, [rdi+78h]
mov [rbp+var_FC], eax
mov rax, [rbp+var_88]
mov [rbp+var_F8], rax
mov rax, [rbp+var_90]
mov [rbp+var_F0], rax
add rdi, 90h
call _ZNSt8optionalINSt7__cxx1112basic_stringIhN4evmc11byte_traitsIhEESaIhEEEEptEv; std::optional<std::basic_string<uchar,evmc::byte_traits<uchar>,std::allocator<uchar>>>::operator->(void)
mov rdi, rax
call _ZNSt7__cxx1112basic_stringIhN4evmc11byte_traitsIhEESaIhEE4dataEv; std::basic_string<uchar,evmc::byte_traits<uchar>,std::allocator<uchar>>::data(void)
mov [rbp+var_E8], rax
mov rdi, [rbp+var_50]
add rdi, 90h
call _ZNSt8optionalINSt7__cxx1112basic_stringIhN4evmc11byte_traitsIhEESaIhEEEEptEv; std::optional<std::basic_string<uchar,evmc::byte_traits<uchar>,std::allocator<uchar>>>::operator->(void)
mov rdi, rax
call _ZNKSt7__cxx1112basic_stringIhN4evmc11byte_traitsIhEESaIhEE4sizeEv; std::basic_string<uchar,evmc::byte_traits<uchar>,std::allocator<uchar>>::size(void)
mov rdi, [rbp+var_C8]
mov esi, [rbp+var_FC]
mov rdx, [rbp+var_F8]
mov rcx, [rbp+var_F0]
mov r8, [rbp+var_E8]
mov r9, rax
call _ZL16evmc_make_result16evmc_status_codellPKhm_1; evmc_make_result(evmc_status_code,long,long,uchar const*,ulong)
jmp short $+2
loc_3ED2C:
jmp loc_3EDCA
loc_3ED31:
mov rax, [rbp+var_50]
mov eax, [rax+78h]
mov [rbp+var_114], eax
mov rax, [rbp+var_88]
mov [rbp+var_110], rax
mov rax, [rbp+var_90]
mov [rbp+var_108], rax
mov rax, [rbp+var_50]
cmp qword ptr [rax+88h], 0
jz short loc_3ED89
mov rdi, [rbp+var_50]
add rdi, 8
mov rax, [rbp+var_50]
mov rsi, [rax+80h]
call _ZN6evmone6MemoryixEm; evmone::Memory::operator[](ulong)
mov [rbp+var_120], rax
jmp short loc_3ED94
loc_3ED89:
xor eax, eax
mov [rbp+var_120], rax
jmp short $+2
loc_3ED94:
mov rcx, [rbp+var_108]
mov rdx, [rbp+var_110]
mov esi, [rbp+var_114]
mov rdi, [rbp+var_C8]
mov r8, [rbp+var_120]
mov rax, [rbp+var_50]
mov r9, [rax+88h]
call _ZL16evmc_make_result16evmc_status_codellPKhm_1; evmc_make_result(evmc_status_code,long,long,uchar const*,ulong)
jmp short $+2
loc_3EDC8:
jmp short $+2
loc_3EDCA:
cmp [rbp+var_70], 0
jz short loc_3EDE1
mov rsi, [rbp+var_C8]
mov rdi, [rbp+var_70]
call _ZN6evmone6Tracer20notify_execution_endERK11evmc_result; evmone::Tracer::notify_execution_end(evmc_result const&)
loc_3EDE1:
mov rax, [rbp+var_C0]
add rsp, 130h
pop rbp
retn
mov rdi, rax
call __clang_call_terminate
|
long long evmone::baseline::execute(
long long a1,
evmone::VM *a2,
long long a3,
long long a4,
int a5,
long long a6,
evmone::baseline::CodeAnalysis *a7)
{
long long v7; // rdx
long long v8; // rdx
unsigned __int8 *v9; // rax
char has_value; // al
long long v11; // rax
long long v12; // rax
long long v13; // rax
long long v15; // [rsp+10h] [rbp-120h]
unsigned int v16; // [rsp+1Ch] [rbp-114h]
unsigned int v17; // [rsp+34h] [rbp-FCh]
long long v18; // [rsp+48h] [rbp-E8h]
bool v19; // [rsp+57h] [rbp-D9h]
long long v20; // [rsp+58h] [rbp-D8h]
long long v21; // [rsp+60h] [rbp-D0h]
int v22; // [rsp+80h] [rbp-B0h]
int v23; // [rsp+88h] [rbp-A8h]
int v24; // [rsp+90h] [rbp-A0h]
int v25; // [rsp+98h] [rbp-98h]
unsigned int v26; // [rsp+9Ch] [rbp-94h]
long long tracer; // [rsp+C0h] [rbp-70h]
long long baseline_cost_table; // [rsp+C8h] [rbp-68h]
long long v29; // [rsp+D0h] [rbp-60h]
long long execution_state; // [rsp+E0h] [rbp-50h]
long long v31; // [rsp+E8h] [rbp-48h]
long long v32; // [rsp+E8h] [rbp-48h]
long long v33; // [rsp+F0h] [rbp-40h]
long long v34; // [rsp+F8h] [rbp-38h] BYREF
long long v35; // [rsp+100h] [rbp-30h]
long long v36; // [rsp+108h] [rbp-28h]
int v37; // [rsp+114h] [rbp-1Ch]
long long v38; // [rsp+118h] [rbp-18h]
long long v39; // [rsp+120h] [rbp-10h]
evmone::VM *v40; // [rsp+128h] [rbp-8h]
v40 = a2;
v39 = a3;
v38 = a4;
v37 = a5;
v36 = a6;
v34 = evmone::baseline::CodeAnalysis::executable_code(a7);
v35 = v7;
v33 = std::basic_string_view<unsigned char,evmc::byte_traits<unsigned char>>::data(&v34);
v31 = *(_QWORD *)(v36 + 16);
execution_state = evmone::VM::get_execution_state(v40, *(int *)(v36 + 8));
v22 = v36;
v25 = v37;
v23 = v39;
v24 = v38;
v29 = evmone::baseline::CodeAnalysis::raw_code(a7);
evmone::ExecutionState::reset(execution_state, v22, v25, v23, v24, v29, v29, v8);
*(_QWORD *)(execution_state + 504) = a7;
v26 = *(_DWORD *)(execution_state + 64);
v9 = (unsigned __int8 *)evmone::baseline::CodeAnalysis::eof_header(a7);
baseline_cost_table = evmone::baseline::get_baseline_cost_table(v26, *v9);
tracer = evmone::VM::get_tracer(v40);
if ( tracer )
{
evmone::Tracer::notify_execution_start(
tracer,
*(unsigned int *)(execution_state + 64),
*(_QWORD *)(execution_state + 32),
v34,
v35);
v32 = evmone::baseline::`anonymous namespace'::dispatch<true>(
baseline_cost_table,
execution_state,
v31,
v33,
tracer);
}
else if ( (*((_BYTE *)v40 + 56) & 1) != 0 )
{
v32 = evmone::baseline::`anonymous namespace'::dispatch_cgoto(baseline_cost_table, execution_state, v31, v33);
}
else
{
v32 = evmone::baseline::`anonymous namespace'::dispatch<false>(baseline_cost_table, execution_state, v31, v33, 0LL);
}
if ( *(_DWORD *)(execution_state + 120) && *(_DWORD *)(execution_state + 120) != 2 )
v21 = 0LL;
else
v21 = v32;
if ( *(_DWORD *)(execution_state + 120) )
v20 = 0LL;
else
v20 = *(_QWORD *)execution_state;
v19 = 1;
if ( !*(_QWORD *)(execution_state + 136) )
v19 = *(_QWORD *)(execution_state + 128) == 0LL;
if ( !v19 )
__assert_fail(
"state.output_size != 0 || state.output_offset == 0",
"/workspace/llm4binary/github/2025_star3/corpus-core[P]colibri-stateless/build_O0/_deps/evmone_external-src/lib/evm"
"one/baseline_execution.cpp",
324LL,
"evmc_result evmone::baseline::execute(VM &, const evmc_host_interface &, evmc_host_context *, evmc_revision, const"
" evmc_message &, const CodeAnalysis &)");
has_value = std::optional<std::basic_string<unsigned char,evmc::byte_traits<unsigned char>,std::allocator<unsigned char>>>::has_value(execution_state + 144);
if ( (has_value & 1) != 0 )
{
v17 = *(_DWORD *)(execution_state + 120);
v11 = std::optional<std::basic_string<unsigned char,evmc::byte_traits<unsigned char>,std::allocator<unsigned char>>>::operator->(execution_state + 144);
v18 = std::basic_string<unsigned char,evmc::byte_traits<unsigned char>,std::allocator<unsigned char>>::data(v11);
v12 = std::optional<std::basic_string<unsigned char,evmc::byte_traits<unsigned char>,std::allocator<unsigned char>>>::operator->(execution_state + 144);
v13 = std::basic_string<unsigned char,evmc::byte_traits<unsigned char>,std::allocator<unsigned char>>::size(v12);
evmc_make_result(a1, v17, v21, v20, v18, v13);
}
else
{
v16 = *(_DWORD *)(execution_state + 120);
if ( *(_QWORD *)(execution_state + 136) )
{
v15 = evmone::Memory::operator[](execution_state + 8, *(_QWORD *)(execution_state + 128));
evmc_make_result(a1, v16, v21, v20, v15, *(_QWORD *)(execution_state + 136));
}
else
{
evmc_make_result(a1, v16, v21, v20, 0LL, *(_QWORD *)(execution_state + 136));
}
}
if ( tracer )
evmone::Tracer::notify_execution_end(tracer, a1);
return a1;
}
|
execute:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x130
MOV qword ptr [RBP + -0xc8],RDI
MOV qword ptr [RBP + -0xc0],RDI
MOV RAX,qword ptr [RBP + 0x10]
MOV qword ptr [RBP + -0x8],RSI
MOV qword ptr [RBP + -0x10],RDX
MOV qword ptr [RBP + -0x18],RCX
MOV dword ptr [RBP + -0x1c],R8D
MOV qword ptr [RBP + -0x28],R9
MOV RDI,qword ptr [RBP + 0x10]
CALL 0x0015e710
MOV qword ptr [RBP + -0x38],RAX
MOV qword ptr [RBP + -0x30],RDX
LEA RDI,[RBP + -0x38]
CALL 0x0015e730
MOV qword ptr [RBP + -0x40],RAX
MOV RAX,qword ptr [RBP + -0x28]
MOV RAX,qword ptr [RAX + 0x10]
MOV qword ptr [RBP + -0x48],RAX
MOV RDI,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RBP + -0x28]
MOVSXD RSI,dword ptr [RAX + 0x8]
CALL 0x00137540
MOV qword ptr [RBP + -0x50],RAX
MOV RAX,qword ptr [RBP + -0x50]
MOV qword ptr [RBP + -0xb8],RAX
MOV RAX,qword ptr [RBP + -0x28]
MOV qword ptr [RBP + -0xb0],RAX
MOV EAX,dword ptr [RBP + -0x1c]
MOV dword ptr [RBP + -0x98],EAX
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RBP + -0xa8],RAX
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RBP + -0xa0],RAX
MOV RDI,qword ptr [RBP + 0x10]
CALL 0x0015e950
MOV RDI,qword ptr [RBP + -0xb8]
MOV RSI,qword ptr [RBP + -0xb0]
MOV RCX,qword ptr [RBP + -0xa8]
MOV R8,qword ptr [RBP + -0xa0]
MOV R9,RAX
MOV RAX,RDX
MOV EDX,dword ptr [RBP + -0x98]
MOV qword ptr [RBP + -0x60],R9
MOV qword ptr [RBP + -0x58],RAX
LEA RAX,[RBP + -0x60]
MOV R9,qword ptr [RAX]
MOV qword ptr [RSP],R9
MOV RAX,qword ptr [RAX + 0x8]
MOV qword ptr [RSP + 0x8],RAX
CALL 0x0015e750
MOV RCX,qword ptr [RBP + 0x10]
MOV RAX,qword ptr [RBP + -0x50]
MOV qword ptr [RAX + 0x1f8],RCX
MOV RAX,qword ptr [RBP + -0x50]
MOV EAX,dword ptr [RAX + 0x40]
MOV dword ptr [RBP + -0x94],EAX
MOV RDI,qword ptr [RBP + 0x10]
CALL 0x0015e970
MOV EDI,dword ptr [RBP + -0x94]
MOVZX ESI,byte ptr [RAX]
CALL 0x00170980
MOV qword ptr [RBP + -0x68],RAX
MOV RDI,qword ptr [RBP + -0x8]
CALL 0x0015e990
MOV qword ptr [RBP + -0x70],RAX
CMP qword ptr [RBP + -0x70],0x0
JZ 0x0013eb81
MOV RDI,qword ptr [RBP + -0x70]
MOV RAX,qword ptr [RBP + -0x50]
MOV ESI,dword ptr [RAX + 0x40]
MOV RAX,qword ptr [RBP + -0x50]
MOV RDX,qword ptr [RAX + 0x20]
MOV RAX,qword ptr [RBP + -0x38]
MOV qword ptr [RBP + -0x80],RAX
MOV RAX,qword ptr [RBP + -0x30]
MOV qword ptr [RBP + -0x78],RAX
MOV RCX,qword ptr [RBP + -0x80]
MOV R8,qword ptr [RBP + -0x78]
CALL 0x0015e9b0
MOV RDI,qword ptr [RBP + -0x68]
MOV RSI,qword ptr [RBP + -0x50]
MOV RDX,qword ptr [RBP + -0x48]
MOV RCX,qword ptr [RBP + -0x40]
MOV R8,qword ptr [RBP + -0x70]
CALL 0x0013ee00
MOV qword ptr [RBP + -0x48],RAX
JMP 0x0013ebc6
LAB_0013eb81:
MOV RAX,qword ptr [RBP + -0x8]
TEST byte ptr [RAX + 0x38],0x1
JZ 0x0013eba6
MOV RDI,qword ptr [RBP + -0x68]
MOV RSI,qword ptr [RBP + -0x50]
MOV RDX,qword ptr [RBP + -0x48]
MOV RCX,qword ptr [RBP + -0x40]
CALL 0x00143ec0
MOV qword ptr [RBP + -0x48],RAX
JMP 0x0013ebc4
LAB_0013eba6:
MOV RDI,qword ptr [RBP + -0x68]
MOV RSI,qword ptr [RBP + -0x50]
MOV RDX,qword ptr [RBP + -0x48]
MOV RCX,qword ptr [RBP + -0x40]
XOR EAX,EAX
MOV R8D,EAX
CALL 0x0014a0c0
MOV qword ptr [RBP + -0x48],RAX
LAB_0013ebc4:
JMP 0x0013ebc6
LAB_0013ebc6:
MOV RAX,qword ptr [RBP + -0x50]
CMP dword ptr [RAX + 0x78],0x0
JZ 0x0013ebda
MOV RAX,qword ptr [RBP + -0x50]
CMP dword ptr [RAX + 0x78],0x2
JNZ 0x0013ebe7
LAB_0013ebda:
MOV RAX,qword ptr [RBP + -0x48]
MOV qword ptr [RBP + -0xd0],RAX
JMP 0x0013ebf2
LAB_0013ebe7:
XOR EAX,EAX
MOV qword ptr [RBP + -0xd0],RAX
JMP 0x0013ebf2
LAB_0013ebf2:
MOV RAX,qword ptr [RBP + -0xd0]
MOV qword ptr [RBP + -0x88],RAX
MOV RAX,qword ptr [RBP + -0x50]
CMP dword ptr [RAX + 0x78],0x0
JNZ 0x0013ec1a
MOV RAX,qword ptr [RBP + -0x50]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0xd8],RAX
JMP 0x0013ec25
LAB_0013ec1a:
XOR EAX,EAX
MOV qword ptr [RBP + -0xd8],RAX
JMP 0x0013ec25
LAB_0013ec25:
MOV RAX,qword ptr [RBP + -0xd8]
MOV qword ptr [RBP + -0x90],RAX
MOV RCX,qword ptr [RBP + -0x50]
MOV AL,0x1
CMP qword ptr [RCX + 0x88],0x0
MOV byte ptr [RBP + -0xd9],AL
JNZ 0x0013ec5e
MOV RAX,qword ptr [RBP + -0x50]
CMP qword ptr [RAX + 0x80],0x0
SETZ AL
MOV byte ptr [RBP + -0xd9],AL
LAB_0013ec5e:
MOV AL,byte ptr [RBP + -0xd9]
TEST AL,0x1
JNZ 0x0013ec6a
JMP 0x0013ec6c
LAB_0013ec6a:
JMP 0x0013ec8b
LAB_0013ec6c:
LEA RDI,[0x1dbef0]
LEA RSI,[0x1dcce4]
MOV EDX,0x144
LEA RCX,[0x1dcd71]
CALL 0x00123160
LAB_0013ec8b:
MOV RDI,qword ptr [RBP + -0x50]
ADD RDI,0x90
CALL 0x0015ea50
TEST AL,0x1
JNZ 0x0013eca4
JMP 0x0013ed31
LAB_0013eca4:
MOV RDI,qword ptr [RBP + -0x50]
MOV EAX,dword ptr [RDI + 0x78]
MOV dword ptr [RBP + -0xfc],EAX
MOV RAX,qword ptr [RBP + -0x88]
MOV qword ptr [RBP + -0xf8],RAX
MOV RAX,qword ptr [RBP + -0x90]
MOV qword ptr [RBP + -0xf0],RAX
ADD RDI,0x90
CALL 0x0015ea70
MOV RDI,RAX
CALL 0x0015ea90
MOV qword ptr [RBP + -0xe8],RAX
MOV RDI,qword ptr [RBP + -0x50]
ADD RDI,0x90
CALL 0x0015ea70
MOV RDI,RAX
CALL 0x0015eab0
MOV RDI,qword ptr [RBP + -0xc8]
MOV ESI,dword ptr [RBP + -0xfc]
MOV RDX,qword ptr [RBP + -0xf8]
MOV RCX,qword ptr [RBP + -0xf0]
MOV R8,qword ptr [RBP + -0xe8]
MOV R9,RAX
LAB_0013ed25:
CALL 0x0014f120
JMP 0x0013ed2c
LAB_0013ed2c:
JMP 0x0013edca
LAB_0013ed31:
MOV RAX,qword ptr [RBP + -0x50]
MOV EAX,dword ptr [RAX + 0x78]
MOV dword ptr [RBP + -0x114],EAX
MOV RAX,qword ptr [RBP + -0x88]
MOV qword ptr [RBP + -0x110],RAX
MOV RAX,qword ptr [RBP + -0x90]
MOV qword ptr [RBP + -0x108],RAX
MOV RAX,qword ptr [RBP + -0x50]
CMP qword ptr [RAX + 0x88],0x0
JZ 0x0013ed89
MOV RDI,qword ptr [RBP + -0x50]
ADD RDI,0x8
MOV RAX,qword ptr [RBP + -0x50]
MOV RSI,qword ptr [RAX + 0x80]
CALL 0x0015ead0
MOV qword ptr [RBP + -0x120],RAX
JMP 0x0013ed94
LAB_0013ed89:
XOR EAX,EAX
MOV qword ptr [RBP + -0x120],RAX
JMP 0x0013ed94
LAB_0013ed94:
MOV RCX,qword ptr [RBP + -0x108]
MOV RDX,qword ptr [RBP + -0x110]
MOV ESI,dword ptr [RBP + -0x114]
MOV RDI,qword ptr [RBP + -0xc8]
MOV R8,qword ptr [RBP + -0x120]
MOV RAX,qword ptr [RBP + -0x50]
MOV R9,qword ptr [RAX + 0x88]
CALL 0x0014f120
JMP 0x0013edc8
LAB_0013edc8:
JMP 0x0013edca
LAB_0013edca:
CMP qword ptr [RBP + -0x70],0x0
JZ 0x0013ede1
MOV RSI,qword ptr [RBP + -0xc8]
MOV RDI,qword ptr [RBP + -0x70]
CALL 0x0015eb00
LAB_0013ede1:
MOV RAX,qword ptr [RBP + -0xc0]
ADD RSP,0x130
POP RBP
RET
|
/* evmone::baseline::execute(evmone::VM&, evmc_host_interface const&, evmc_host_context*,
evmc_revision, evmc_message const&, evmone::baseline::CodeAnalysis const&) */
baseline * __thiscall
evmone::baseline::execute
(baseline *this,VM *param_1,int8 param_2,int8 param_3,int4 param_5,
long param_6,CodeAnalysis *param_7)
{
int4 uVar1;
long lVar2;
long lVar3;
uchar *puVar4;
ExecutionState *pEVar5;
int1 *puVar6;
array *paVar7;
Tracer *this_00;
ulong uVar8;
basic_string<unsigned_char,evmc::byte_traits<unsigned_char>,std::allocator<unsigned_char>> *pbVar9
;
int8 uVar10;
int8 uVar11;
bool bVar12;
int1 auVar13 [16];
int8 local_128;
int8 local_e0;
long local_d8;
long local_50;
int1 local_40 [16];
long local_30;
int4 local_24;
int8 local_20;
int8 local_18;
VM *local_10;
local_30 = param_6;
local_24 = param_5;
local_20 = param_3;
local_18 = param_2;
local_10 = param_1;
local_40 = CodeAnalysis::executable_code(param_7);
puVar4 = (uchar *)std::basic_string_view<unsigned_char,evmc::byte_traits<unsigned_char>>::data
((basic_string_view<unsigned_char,evmc::byte_traits<unsigned_char>> *)
local_40);
lVar2 = *(long *)(local_30 + 0x10);
pEVar5 = (ExecutionState *)VM::get_execution_state(local_10,(long)*(int *)(local_30 + 8));
uVar11 = local_18;
uVar10 = local_20;
uVar1 = local_24;
lVar3 = local_30;
auVar13 = CodeAnalysis::raw_code(param_7);
ExecutionState::reset(pEVar5,lVar3,uVar1,uVar11,uVar10,auVar13._0_8_,auVar13);
*(CodeAnalysis **)(pEVar5 + 0x1f8) = param_7;
uVar1 = *(int4 *)(pEVar5 + 0x40);
puVar6 = (int1 *)CodeAnalysis::eof_header(param_7);
paVar7 = (array *)get_baseline_cost_table(uVar1,*puVar6);
this_00 = (Tracer *)VM::get_tracer(local_10);
if (this_00 == (Tracer *)0x0) {
if (((byte)local_10[0x38] & 1) == 0) {
local_50 = (anonymous_namespace)::dispatch<false>(paVar7,pEVar5,lVar2,puVar4,(Tracer *)0x0);
}
else {
local_50 = (anonymous_namespace)::dispatch_cgoto(paVar7,pEVar5,lVar2,puVar4);
}
}
else {
Tracer::notify_execution_start
(this_00,*(int4 *)(pEVar5 + 0x40),*(int8 *)(pEVar5 + 0x20),local_40._0_8_,
local_40._8_8_);
local_50 = (anonymous_namespace)::dispatch<true>(paVar7,pEVar5,lVar2,puVar4,this_00);
}
if ((*(int *)(pEVar5 + 0x78) == 0) || (*(int *)(pEVar5 + 0x78) == 2)) {
local_d8 = local_50;
}
else {
local_d8 = 0;
}
if (*(int *)(pEVar5 + 0x78) == 0) {
local_e0 = *(int8 *)pEVar5;
}
else {
local_e0 = 0;
}
bVar12 = true;
if (*(long *)(pEVar5 + 0x88) == 0) {
bVar12 = *(long *)(pEVar5 + 0x80) == 0;
}
if (bVar12) {
uVar8 = std::
optional<std::__cxx11::basic_string<unsigned_char,evmc::byte_traits<unsigned_char>,std::allocator<unsigned_char>>>
::has_value((optional<std::__cxx11::basic_string<unsigned_char,evmc::byte_traits<unsigned_char>,std::allocator<unsigned_char>>>
*)(pEVar5 + 0x90));
if ((uVar8 & 1) == 0) {
uVar1 = *(int4 *)(pEVar5 + 0x78);
if (*(long *)(pEVar5 + 0x88) == 0) {
local_128 = 0;
}
else {
local_128 = Memory::operator[]((Memory *)(pEVar5 + 8),*(ulong *)(pEVar5 + 0x80));
}
evmc_make_result(this,uVar1,local_d8,local_e0,local_128,*(int8 *)(pEVar5 + 0x88));
}
else {
uVar1 = *(int4 *)(pEVar5 + 0x78);
pbVar9 = (basic_string<unsigned_char,evmc::byte_traits<unsigned_char>,std::allocator<unsigned_char>>
*)std::
optional<std::__cxx11::basic_string<unsigned_char,evmc::byte_traits<unsigned_char>,std::allocator<unsigned_char>>>
::operator->((optional<std::__cxx11::basic_string<unsigned_char,evmc::byte_traits<unsigned_char>,std::allocator<unsigned_char>>>
*)(pEVar5 + 0x90));
uVar10 = std::__cxx11::
basic_string<unsigned_char,evmc::byte_traits<unsigned_char>,std::allocator<unsigned_char>>
::data(pbVar9);
pbVar9 = (basic_string<unsigned_char,evmc::byte_traits<unsigned_char>,std::allocator<unsigned_char>>
*)std::
optional<std::__cxx11::basic_string<unsigned_char,evmc::byte_traits<unsigned_char>,std::allocator<unsigned_char>>>
::operator->((optional<std::__cxx11::basic_string<unsigned_char,evmc::byte_traits<unsigned_char>,std::allocator<unsigned_char>>>
*)(pEVar5 + 0x90));
uVar11 = std::__cxx11::
basic_string<unsigned_char,evmc::byte_traits<unsigned_char>,std::allocator<unsigned_char>>
::size(pbVar9);
/* try { // try from 0013ed25 to 0013edc5 has its CatchHandler @ 0013edf1 */
evmc_make_result(this,uVar1,local_d8,local_e0,uVar10,uVar11);
}
if (this_00 != (Tracer *)0x0) {
Tracer::notify_execution_end(this_00,(evmc_result *)this);
}
return this;
}
/* WARNING: Subroutine does not return */
__assert_fail("state.output_size != 0 || state.output_offset == 0",
"/workspace/llm4binary/github/2025_star3/corpus-core[P]colibri-stateless/build_O0/_deps/evmone_external-src/lib/evmone/baseline_execution.cpp"
,0x144,
"evmc_result evmone::baseline::execute(VM &, const evmc_host_interface &, evmc_host_context *, evmc_revision, const evmc_message &, const CodeAnalysis &)"
);
}
|
|
9,346 |
ggml_win_part
|
7CodeWizard[P]stablediffusion/ggml/src/ggml.c
|
struct ggml_tensor * ggml_win_part(
struct ggml_context * ctx,
struct ggml_tensor * a,
int w) {
GGML_ASSERT(a->ne[3] == 1);
GGML_ASSERT(a->type == GGML_TYPE_F32);
bool is_node = false;
if (a->grad) {
GGML_ASSERT(false); // TODO: implement backward
is_node = true;
}
// padding
const int px = (w - a->ne[1]%w)%w;
const int py = (w - a->ne[2]%w)%w;
const int npx = (px + a->ne[1])/w;
const int npy = (py + a->ne[2])/w;
const int np = npx*npy;
const int64_t ne[4] = { a->ne[0], w, w, np, };
struct ggml_tensor * result = ggml_new_tensor(ctx, GGML_TYPE_F32, 4, ne);
int32_t params[] = { npx, npy, w };
ggml_set_op_params(result, params, sizeof(params));
result->op = GGML_OP_WIN_PART;
result->grad = is_node ? ggml_dup_tensor(ctx, result) : NULL;
result->src[0] = a;
return result;
}
|
O0
|
c
|
ggml_win_part:
subq $0x88, %rsp
movq %rdi, 0x80(%rsp)
movq %rsi, 0x78(%rsp)
movl %edx, 0x74(%rsp)
movq 0x78(%rsp), %rax
cmpq $0x1, 0x28(%rax)
je 0x127298
movq 0xb0ccd(%rip), %rax # 0x1d7f28
movq (%rax), %rdi
callq 0xb8e0
movq 0xb0d3e(%rip), %rax # 0x1d7fa8
movq (%rax), %rdi
leaq 0x589a6(%rip), %rsi # 0x17fc1a
leaq 0x623f3(%rip), %rdx # 0x18966e
movl $0x1686, %ecx # imm = 0x1686
leaq 0x62bff(%rip), %r8 # 0x189e86
movb $0x0, %al
callq 0xbae0
callq 0x11a4f0
callq 0xb3a0
jmp 0x12729a
jmp 0x12729c
movq 0x78(%rsp), %rax
cmpl $0x0, (%rax)
je 0x1272ea
movq 0xb0c7b(%rip), %rax # 0x1d7f28
movq (%rax), %rdi
callq 0xb8e0
movq 0xb0cec(%rip), %rax # 0x1d7fa8
movq (%rax), %rdi
leaq 0x58954(%rip), %rsi # 0x17fc1a
leaq 0x623a1(%rip), %rdx # 0x18966e
movl $0x1687, %ecx # imm = 0x1687
leaq 0x62d23(%rip), %r8 # 0x189ffc
movb $0x0, %al
callq 0xbae0
callq 0x11a4f0
callq 0xb3a0
jmp 0x1272ec
movb $0x0, 0x73(%rsp)
movq 0x78(%rsp), %rax
cmpq $0x0, 0x98(%rax)
je 0x127346
jmp 0x127302
movq 0xb0c1f(%rip), %rax # 0x1d7f28
movq (%rax), %rdi
callq 0xb8e0
movq 0xb0c90(%rip), %rax # 0x1d7fa8
movq (%rax), %rdi
leaq 0x588f8(%rip), %rsi # 0x17fc1a
leaq 0x62345(%rip), %rdx # 0x18966e
movl $0x168c, %ecx # imm = 0x168C
leaq 0x566b0(%rip), %r8 # 0x17d9e5
movb $0x0, %al
callq 0xbae0
callq 0x11a4f0
callq 0xb3a0
movslq 0x74(%rsp), %rax
movq %rax, 0x8(%rsp)
movq 0x78(%rsp), %rax
movq 0x18(%rax), %rax
movslq 0x74(%rsp), %rcx
cqto
idivq %rcx
movq 0x8(%rsp), %rax
subq %rdx, %rax
movslq 0x74(%rsp), %rcx
cqto
idivq %rcx
movl %edx, %eax
movl %eax, 0x6c(%rsp)
movslq 0x74(%rsp), %rax
movq %rax, 0x10(%rsp)
movq 0x78(%rsp), %rax
movq 0x20(%rax), %rax
movslq 0x74(%rsp), %rcx
cqto
idivq %rcx
movq 0x10(%rsp), %rax
subq %rdx, %rax
movslq 0x74(%rsp), %rcx
cqto
idivq %rcx
movl %edx, %eax
movl %eax, 0x68(%rsp)
movslq 0x6c(%rsp), %rax
movq 0x78(%rsp), %rcx
addq 0x18(%rcx), %rax
movslq 0x74(%rsp), %rcx
cqto
idivq %rcx
movl %eax, 0x64(%rsp)
movslq 0x68(%rsp), %rax
movq 0x78(%rsp), %rcx
addq 0x20(%rcx), %rax
movslq 0x74(%rsp), %rcx
cqto
idivq %rcx
movl %eax, 0x60(%rsp)
movl 0x64(%rsp), %eax
imull 0x60(%rsp), %eax
movl %eax, 0x5c(%rsp)
movq 0x78(%rsp), %rax
movq 0x10(%rax), %rax
movq %rax, 0x30(%rsp)
movslq 0x74(%rsp), %rax
movq %rax, 0x38(%rsp)
movslq 0x74(%rsp), %rax
movq %rax, 0x40(%rsp)
movslq 0x5c(%rsp), %rax
movq %rax, 0x48(%rsp)
movq 0x80(%rsp), %rdi
leaq 0x30(%rsp), %rcx
xorl %esi, %esi
movl $0x4, %edx
callq 0x11c2c0
movq %rax, 0x28(%rsp)
movl 0x64(%rsp), %eax
movl %eax, 0x1c(%rsp)
movl 0x60(%rsp), %eax
movl %eax, 0x20(%rsp)
movl 0x74(%rsp), %eax
movl %eax, 0x24(%rsp)
movq 0x28(%rsp), %rdi
leaq 0x1c(%rsp), %rsi
movl $0xc, %edx
callq 0x120a30
movq 0x28(%rsp), %rax
movl $0x39, 0x50(%rax)
testb $0x1, 0x73(%rsp)
je 0x127496
movq 0x80(%rsp), %rdi
movq 0x28(%rsp), %rsi
callq 0x11cfc0
movq %rax, (%rsp)
jmp 0x12749e
xorl %eax, %eax
movq %rax, (%rsp)
jmp 0x12749e
movq (%rsp), %rcx
movq 0x28(%rsp), %rax
movq %rcx, 0x98(%rax)
movq 0x78(%rsp), %rcx
movq 0x28(%rsp), %rax
movq %rcx, 0xa0(%rax)
movq 0x28(%rsp), %rax
addq $0x88, %rsp
retq
nopl (%rax)
|
ggml_win_part:
sub rsp, 88h
mov [rsp+88h+var_8], rdi
mov [rsp+88h+var_10], rsi
mov [rsp+88h+var_14], edx
mov rax, [rsp+88h+var_10]
cmp qword ptr [rax+28h], 1
jz short loc_127298
mov rax, cs:stdout_ptr
mov rdi, [rax]
call _fflush
mov rax, cs:stderr_ptr
mov rdi, [rax]
lea rsi, aGgmlAssertSDS; "GGML_ASSERT: %s:%d: %s\n"
lea rdx, aWorkspaceLlm4b_7; "/workspace/llm4binary/github/2025_star3"...
mov ecx, 1686h
lea r8, aANe31; "a->ne[3] == 1"
mov al, 0
call _fprintf
call ggml_print_backtrace
call _abort
loc_127298:
jmp short $+2
loc_12729A:
jmp short $+2
loc_12729C:
mov rax, [rsp+88h+var_10]
cmp dword ptr [rax], 0
jz short loc_1272EA
mov rax, cs:stdout_ptr
mov rdi, [rax]
call _fflush
mov rax, cs:stderr_ptr
mov rdi, [rax]
lea rsi, aGgmlAssertSDS; "GGML_ASSERT: %s:%d: %s\n"
lea rdx, aWorkspaceLlm4b_7; "/workspace/llm4binary/github/2025_star3"...
mov ecx, 1687h
lea r8, aATypeGgmlTypeF; "a->type == GGML_TYPE_F32"
mov al, 0
call _fprintf
call ggml_print_backtrace
call _abort
loc_1272EA:
jmp short $+2
loc_1272EC:
mov [rsp+88h+var_15], 0
mov rax, [rsp+88h+var_10]
cmp qword ptr [rax+98h], 0
jz short loc_127346
jmp short $+2
loc_127302:
mov rax, cs:stdout_ptr
mov rdi, [rax]
call _fflush
mov rax, cs:stderr_ptr
mov rdi, [rax]
lea rsi, aGgmlAssertSDS; "GGML_ASSERT: %s:%d: %s\n"
lea rdx, aWorkspaceLlm4b_7; "/workspace/llm4binary/github/2025_star3"...
mov ecx, 168Ch
lea r8, aFalse; "false"
mov al, 0
call _fprintf
call ggml_print_backtrace
call _abort
loc_127346:
movsxd rax, [rsp+88h+var_14]
mov [rsp+88h+var_80], rax
mov rax, [rsp+88h+var_10]
mov rax, [rax+18h]
movsxd rcx, [rsp+88h+var_14]
cqo
idiv rcx
mov rax, [rsp+88h+var_80]
sub rax, rdx
movsxd rcx, [rsp+88h+var_14]
cqo
idiv rcx
mov eax, edx
mov [rsp+88h+var_1C], eax
movsxd rax, [rsp+88h+var_14]
mov [rsp+88h+var_78], rax
mov rax, [rsp+88h+var_10]
mov rax, [rax+20h]
movsxd rcx, [rsp+88h+var_14]
cqo
idiv rcx
mov rax, [rsp+88h+var_78]
sub rax, rdx
movsxd rcx, [rsp+88h+var_14]
cqo
idiv rcx
mov eax, edx
mov [rsp+88h+var_20], eax
movsxd rax, [rsp+88h+var_1C]
mov rcx, [rsp+88h+var_10]
add rax, [rcx+18h]
movsxd rcx, [rsp+88h+var_14]
cqo
idiv rcx
mov [rsp+88h+var_24], eax
movsxd rax, [rsp+88h+var_20]
mov rcx, [rsp+88h+var_10]
add rax, [rcx+20h]
movsxd rcx, [rsp+88h+var_14]
cqo
idiv rcx
mov [rsp+88h+var_28], eax
mov eax, [rsp+88h+var_24]
imul eax, [rsp+88h+var_28]
mov [rsp+88h+var_2C], eax
mov rax, [rsp+88h+var_10]
mov rax, [rax+10h]
mov [rsp+88h+var_58], rax
movsxd rax, [rsp+88h+var_14]
mov [rsp+88h+var_50], rax
movsxd rax, [rsp+88h+var_14]
mov [rsp+88h+var_48], rax
movsxd rax, [rsp+88h+var_2C]
mov [rsp+88h+var_40], rax
mov rdi, [rsp+88h+var_8]
lea rcx, [rsp+88h+var_58]
xor esi, esi
mov edx, 4
call ggml_new_tensor
mov [rsp+88h+var_60], rax
mov eax, [rsp+88h+var_24]
mov [rsp+88h+var_6C], eax
mov eax, [rsp+88h+var_28]
mov [rsp+88h+var_68], eax
mov eax, [rsp+88h+var_14]
mov [rsp+88h+var_64], eax
mov rdi, [rsp+88h+var_60]
lea rsi, [rsp+88h+var_6C]
mov edx, 0Ch
call ggml_set_op_params
mov rax, [rsp+88h+var_60]
mov dword ptr [rax+50h], 39h ; '9'
test [rsp+88h+var_15], 1
jz short loc_127496
mov rdi, [rsp+88h+var_8]
mov rsi, [rsp+88h+var_60]
call ggml_dup_tensor
mov [rsp+88h+var_88], rax
jmp short loc_12749E
loc_127496:
xor eax, eax
mov [rsp+88h+var_88], rax
jmp short $+2
loc_12749E:
mov rcx, [rsp+88h+var_88]
mov rax, [rsp+88h+var_60]
mov [rax+98h], rcx
mov rcx, [rsp+88h+var_10]
mov rax, [rsp+88h+var_60]
mov [rax+0A0h], rcx
mov rax, [rsp+88h+var_60]
add rsp, 88h
retn
|
unsigned int * ggml_win_part(long long a1, long long a2, int a3)
{
long long v3; // rdi
long long v4; // rdi
long long v5; // rdi
long long v7; // [rsp+0h] [rbp-88h]
_DWORD v8[3]; // [rsp+1Ch] [rbp-6Ch] BYREF
unsigned int *v9; // [rsp+28h] [rbp-60h]
_QWORD v10[5]; // [rsp+30h] [rbp-58h] BYREF
int v11; // [rsp+5Ch] [rbp-2Ch]
int v12; // [rsp+60h] [rbp-28h]
int v13; // [rsp+64h] [rbp-24h]
int v14; // [rsp+68h] [rbp-20h]
int v15; // [rsp+6Ch] [rbp-1Ch]
char v16; // [rsp+73h] [rbp-15h]
int v17; // [rsp+74h] [rbp-14h]
long long v18; // [rsp+78h] [rbp-10h]
long long v19; // [rsp+80h] [rbp-8h]
v19 = a1;
v18 = a2;
v17 = a3;
if ( *(_QWORD *)(a2 + 40) != 1LL )
{
fflush(stdout);
v3 = stderr;
fprintf(
stderr,
"GGML_ASSERT: %s:%d: %s\n",
"/workspace/llm4binary/github/2025_star3/7CodeWizard[P]stablediffusion/ggml/src/ggml.c",
5766,
"a->ne[3] == 1");
ggml_print_backtrace();
abort(v3);
}
if ( *(_DWORD *)v18 )
{
fflush(stdout);
v4 = stderr;
fprintf(
stderr,
"GGML_ASSERT: %s:%d: %s\n",
"/workspace/llm4binary/github/2025_star3/7CodeWizard[P]stablediffusion/ggml/src/ggml.c",
5767,
"a->type == GGML_TYPE_F32");
ggml_print_backtrace();
abort(v4);
}
v16 = 0;
if ( *(_QWORD *)(v18 + 152) )
{
fflush(stdout);
v5 = stderr;
fprintf(
stderr,
"GGML_ASSERT: %s:%d: %s\n",
"/workspace/llm4binary/github/2025_star3/7CodeWizard[P]stablediffusion/ggml/src/ggml.c",
5772,
"false");
ggml_print_backtrace();
abort(v5);
}
v15 = (v17 - *(_QWORD *)(v18 + 24) % v17) % v17;
v14 = (v17 - *(_QWORD *)(v18 + 32) % v17) % v17;
v13 = (*(_QWORD *)(v18 + 24) + v15) / v17;
v12 = (*(_QWORD *)(v18 + 32) + v14) / v17;
v11 = v12 * v13;
v10[0] = *(_QWORD *)(v18 + 16);
v10[1] = v17;
v10[2] = v17;
v10[3] = v12 * v13;
v9 = (unsigned int *)ggml_new_tensor(v19, 0, 4u, (long long)v10);
v8[0] = v13;
v8[1] = v12;
v8[2] = v17;
ggml_set_op_params((long long)v9, (long long)v8, 12LL);
v9[20] = 57;
if ( (v16 & 1) != 0 )
v7 = ggml_dup_tensor(v19, v9);
else
v7 = 0LL;
*((_QWORD *)v9 + 19) = v7;
*((_QWORD *)v9 + 20) = v18;
return v9;
}
| |||
9,347 |
ggml_win_part
|
7CodeWizard[P]stablediffusion/ggml/src/ggml.c
|
struct ggml_tensor * ggml_win_part(
struct ggml_context * ctx,
struct ggml_tensor * a,
int w) {
GGML_ASSERT(a->ne[3] == 1);
GGML_ASSERT(a->type == GGML_TYPE_F32);
bool is_node = false;
if (a->grad) {
GGML_ASSERT(false); // TODO: implement backward
is_node = true;
}
// padding
const int px = (w - a->ne[1]%w)%w;
const int py = (w - a->ne[2]%w)%w;
const int npx = (px + a->ne[1])/w;
const int npy = (py + a->ne[2])/w;
const int np = npx*npy;
const int64_t ne[4] = { a->ne[0], w, w, np, };
struct ggml_tensor * result = ggml_new_tensor(ctx, GGML_TYPE_F32, 4, ne);
int32_t params[] = { npx, npy, w };
ggml_set_op_params(result, params, sizeof(params));
result->op = GGML_OP_WIN_PART;
result->grad = is_node ? ggml_dup_tensor(ctx, result) : NULL;
result->src[0] = a;
return result;
}
|
O1
|
c
|
ggml_win_part:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x30, %rsp
cmpq $0x1, 0x28(%rsi)
jne 0x94fc0
movq %rsi, %rbx
cmpl $0x0, (%rsi)
jne 0x94fc5
cmpq $0x0, 0x98(%rbx)
jne 0x94fca
movslq %edx, %r13
movq 0x18(%rbx), %rsi
movq 0x20(%rbx), %rcx
movq %rsi, %rax
cqto
idivq %r13
movq %r13, %rax
subq %rdx, %rax
cqto
idivq %r13
movq %rdx, %r8
movq %rcx, %rax
cqto
idivq %r13
movq %r13, %rax
subq %rdx, %rax
cqto
idivq %r13
movq %rdx, %r9
addq %rsi, %r8
movq %r8, %rax
cqto
idivq %r13
movq %rax, %r14
addq %rcx, %r9
movq %r9, %rax
cqto
idivq %r13
movq %rax, %r15
movq 0x10(%rbx), %rax
leaq 0x10(%rsp), %rcx
movq %rax, (%rcx)
movq %r13, 0x8(%rcx)
movq %r13, 0x10(%rcx)
movl %r14d, %eax
imull %r15d, %eax
cltq
movq %rax, 0x18(%rcx)
xorl %esi, %esi
movl $0x4, %edx
xorl %r8d, %r8d
xorl %r9d, %r9d
callq 0x8e8b7
movq %rax, %r12
leaq 0x4(%rsp), %rsi
movl %r14d, (%rsi)
movl %r15d, 0x4(%rsi)
movl %r13d, 0x8(%rsi)
movl $0xc, %edx
movq %rax, %rdi
callq 0x91e91
movl $0x39, 0x50(%r12)
movq $0x0, 0x98(%r12)
movq %rbx, 0xa0(%r12)
movq %r12, %rax
addq $0x30, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
callq 0xe9c3
callq 0xea08
callq 0xea4d
|
ggml_win_part:
push r15
push r14
push r13
push r12
push rbx
sub rsp, 30h
cmp qword ptr [rsi+28h], 1
jnz loc_94FC0
mov rbx, rsi
cmp dword ptr [rsi], 0
jnz loc_94FC5
cmp qword ptr [rbx+98h], 0
jnz loc_94FCA
movsxd r13, edx
mov rsi, [rbx+18h]
mov rcx, [rbx+20h]
mov rax, rsi
cqo
idiv r13
mov rax, r13
sub rax, rdx
cqo
idiv r13
mov r8, rdx
mov rax, rcx
cqo
idiv r13
mov rax, r13
sub rax, rdx
cqo
idiv r13
mov r9, rdx
add r8, rsi
mov rax, r8
cqo
idiv r13
mov r14, rax
add r9, rcx
mov rax, r9
cqo
idiv r13
mov r15, rax
mov rax, [rbx+10h]
lea rcx, [rsp+58h+var_48]
mov [rcx], rax
mov [rcx+8], r13
mov [rcx+10h], r13
mov eax, r14d
imul eax, r15d
cdqe
mov [rcx+18h], rax
xor esi, esi
mov edx, 4
xor r8d, r8d
xor r9d, r9d
call ggml_new_tensor_impl
mov r12, rax
lea rsi, [rsp+58h+var_54]
mov [rsi], r14d
mov [rsi+4], r15d
mov [rsi+8], r13d
mov edx, 0Ch
mov rdi, rax
call ggml_set_op_params
mov dword ptr [r12+50h], 39h ; '9'
mov qword ptr [r12+98h], 0
mov [r12+0A0h], rbx
mov rax, r12
add rsp, 30h
pop rbx
pop r12
pop r13
pop r14
pop r15
retn
loc_94FC0:
call ggml_win_part_cold_1
loc_94FC5:
call ggml_win_part_cold_2
loc_94FCA:
call ggml_win_part_cold_3
|
long long ggml_win_part(long long a1, long long a2, int a3, __m128 a4, __m128 a5)
{
long long v5; // r13
long long v6; // r14
long long v7; // r15
long long v8; // r12
_DWORD v10[3]; // [rsp+4h] [rbp-54h] BYREF
_QWORD v11[9]; // [rsp+10h] [rbp-48h] BYREF
if ( *(_QWORD *)(a2 + 40) != 1LL )
ggml_win_part_cold_1();
if ( *(_DWORD *)a2 )
ggml_win_part_cold_2();
if ( *(_QWORD *)(a2 + 152) )
ggml_win_part_cold_3();
v5 = a3;
v6 = (*(_QWORD *)(a2 + 24) + (a3 - *(_QWORD *)(a2 + 24) % a3) % v5) / v5;
v7 = (*(_QWORD *)(a2 + 32) + (v5 - *(_QWORD *)(a2 + 32) % v5) % v5) / v5;
v11[0] = *(_QWORD *)(a2 + 16);
v11[1] = a3;
v11[2] = a3;
v11[3] = (int)v7 * (int)v6;
v8 = ggml_new_tensor_impl(a1, 0, 4, v11, 0LL, 0LL, a4, a5);
v10[0] = v6;
v10[1] = v7;
v10[2] = v5;
ggml_set_op_params(v8, (long long)v10, 12LL);
*(_DWORD *)(v8 + 80) = 57;
*(_QWORD *)(v8 + 152) = 0LL;
*(_QWORD *)(v8 + 160) = a2;
return v8;
}
| |||
9,348 |
ggml_win_part
|
7CodeWizard[P]stablediffusion/ggml/src/ggml.c
|
struct ggml_tensor * ggml_win_part(
struct ggml_context * ctx,
struct ggml_tensor * a,
int w) {
GGML_ASSERT(a->ne[3] == 1);
GGML_ASSERT(a->type == GGML_TYPE_F32);
bool is_node = false;
if (a->grad) {
GGML_ASSERT(false); // TODO: implement backward
is_node = true;
}
// padding
const int px = (w - a->ne[1]%w)%w;
const int py = (w - a->ne[2]%w)%w;
const int npx = (px + a->ne[1])/w;
const int npy = (py + a->ne[2])/w;
const int np = npx*npy;
const int64_t ne[4] = { a->ne[0], w, w, np, };
struct ggml_tensor * result = ggml_new_tensor(ctx, GGML_TYPE_F32, 4, ne);
int32_t params[] = { npx, npy, w };
ggml_set_op_params(result, params, sizeof(params));
result->op = GGML_OP_WIN_PART;
result->grad = is_node ? ggml_dup_tensor(ctx, result) : NULL;
result->src[0] = a;
return result;
}
|
O2
|
c
|
ggml_win_part:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x30, %rsp
cmpq $0x1, 0x28(%rsi)
jne 0x6e80f
movq %rsi, %rbx
cmpl $0x0, (%rsi)
jne 0x6e844
cmpq $0x0, 0x98(%rbx)
jne 0x6e879
movslq %edx, %r13
movq 0x18(%rbx), %rsi
movq 0x20(%rbx), %rcx
movq %rsi, %rax
cqto
idivq %r13
movq %r13, %rax
subq %rdx, %rax
cqto
idivq %r13
movq %rdx, %r8
movq %rcx, %rax
cqto
idivq %r13
movq %r13, %rax
subq %rdx, %rax
cqto
idivq %r13
movq %rdx, %r9
addq %rsi, %r8
movq %r8, %rax
cqto
idivq %r13
movq %rax, %r14
addq %rcx, %r9
movq %r9, %rax
cqto
idivq %r13
movq %rax, %r15
movq 0x10(%rbx), %rax
leaq 0x10(%rsp), %rcx
movq %rax, (%rcx)
movq %r13, 0x8(%rcx)
movq %r13, 0x10(%rcx)
movl %r14d, %eax
imull %r15d, %eax
cltq
movq %rax, 0x18(%rcx)
pushq $0x4
popq %rdx
xorl %esi, %esi
callq 0x6835b
movq %rax, %r12
leaq 0x4(%rsp), %rsi
movl %r14d, (%rsi)
movl %r15d, 0x4(%rsi)
movl %r13d, 0x8(%rsi)
pushq $0xc
popq %rdx
movq %rax, %rdi
callq 0x6ab3d
movl $0x39, 0x50(%r12)
andq $0x0, 0x98(%r12)
movq %rbx, 0xa0(%r12)
movq %r12, %rax
addq $0x30, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
movq 0x67732(%rip), %rax # 0xd5f48
movq (%rax), %rdi
callq 0xa6f0
movq 0x67783(%rip), %rax # 0xd5fa8
movq (%rax), %rdi
leaq 0x2b9ef(%rip), %rsi # 0x9a21e
leaq 0x33048(%rip), %rdx # 0xa187e
leaq 0x337c5(%rip), %r8 # 0xa2002
movl $0x1686, %ecx # imm = 0x1686
jmp 0x6e8ac
movq 0x676fd(%rip), %rax # 0xd5f48
movq (%rax), %rdi
callq 0xa6f0
movq 0x6774e(%rip), %rax # 0xd5fa8
movq (%rax), %rdi
leaq 0x2b9ba(%rip), %rsi # 0x9a21e
leaq 0x33013(%rip), %rdx # 0xa187e
leaq 0x338f4(%rip), %r8 # 0xa2166
movl $0x1687, %ecx # imm = 0x1687
jmp 0x6e8ac
movq 0x676c8(%rip), %rax # 0xd5f48
movq (%rax), %rdi
callq 0xa6f0
movq 0x67719(%rip), %rax # 0xd5fa8
movq (%rax), %rdi
leaq 0x2b985(%rip), %rsi # 0x9a21e
leaq 0x32fde(%rip), %rdx # 0xa187e
leaq 0x29798(%rip), %r8 # 0x9803f
movl $0x168c, %ecx # imm = 0x168C
xorl %eax, %eax
callq 0xa8b0
callq 0x67550
callq 0xa300
|
ggml_win_part:
push r15
push r14
push r13
push r12
push rbx
sub rsp, 30h
cmp qword ptr [rsi+28h], 1
jnz loc_6E80F
mov rbx, rsi
cmp dword ptr [rsi], 0
jnz loc_6E844
cmp qword ptr [rbx+98h], 0
jnz loc_6E879
movsxd r13, edx
mov rsi, [rbx+18h]
mov rcx, [rbx+20h]
mov rax, rsi
cqo
idiv r13
mov rax, r13
sub rax, rdx
cqo
idiv r13
mov r8, rdx
mov rax, rcx
cqo
idiv r13
mov rax, r13
sub rax, rdx
cqo
idiv r13
mov r9, rdx
add r8, rsi
mov rax, r8
cqo
idiv r13
mov r14, rax
add r9, rcx
mov rax, r9
cqo
idiv r13
mov r15, rax
mov rax, [rbx+10h]
lea rcx, [rsp+58h+var_48]
mov [rcx], rax
mov [rcx+8], r13
mov [rcx+10h], r13
mov eax, r14d
imul eax, r15d
cdqe
mov [rcx+18h], rax
push 4
pop rdx
xor esi, esi
call ggml_new_tensor
mov r12, rax
lea rsi, [rsp+58h+var_54]
mov [rsi], r14d
mov [rsi+4], r15d
mov [rsi+8], r13d
push 0Ch
pop rdx
mov rdi, rax
call ggml_set_op_params
mov dword ptr [r12+50h], 39h ; '9'
and qword ptr [r12+98h], 0
mov [r12+0A0h], rbx
mov rax, r12
add rsp, 30h
pop rbx
pop r12
pop r13
pop r14
pop r15
retn
loc_6E80F:
mov rax, cs:stdout_ptr
mov rdi, [rax]
call _fflush
mov rax, cs:stderr_ptr
mov rdi, [rax]
lea rsi, aGgmlAssertSDS; "GGML_ASSERT: %s:%d: %s\n"
lea rdx, aWorkspaceLlm4b_7; "/workspace/llm4binary/github/2025_star3"...
lea r8, aANe31; "a->ne[3] == 1"
mov ecx, 1686h
jmp short loc_6E8AC
loc_6E844:
mov rax, cs:stdout_ptr
mov rdi, [rax]
call _fflush
mov rax, cs:stderr_ptr
mov rdi, [rax]
lea rsi, aGgmlAssertSDS; "GGML_ASSERT: %s:%d: %s\n"
lea rdx, aWorkspaceLlm4b_7; "/workspace/llm4binary/github/2025_star3"...
lea r8, aATypeGgmlTypeF; "a->type == GGML_TYPE_F32"
mov ecx, 1687h
jmp short loc_6E8AC
loc_6E879:
mov rax, cs:stdout_ptr
mov rdi, [rax]
call _fflush
mov rax, cs:stderr_ptr
mov rdi, [rax]
lea rsi, aGgmlAssertSDS; "GGML_ASSERT: %s:%d: %s\n"
lea rdx, aWorkspaceLlm4b_7; "/workspace/llm4binary/github/2025_star3"...
lea r8, aFalse; "false"
mov ecx, 168Ch
loc_6E8AC:
xor eax, eax
call _fprintf
call ggml_print_backtrace
call _abort
|
long long ggml_win_part(long long a1, long long a2, int a3)
{
long long v3; // r13
long long v4; // r14
long long v5; // r15
long long v6; // r12
long long v8; // rdi
_DWORD v9[3]; // [rsp+4h] [rbp-54h] BYREF
_QWORD v10[9]; // [rsp+10h] [rbp-48h] BYREF
if ( *(_QWORD *)(a2 + 40) != 1LL )
{
fflush(stdout);
v8 = stderr;
fprintf(
stderr,
"GGML_ASSERT: %s:%d: %s\n",
"/workspace/llm4binary/github/2025_star3/7CodeWizard[P]stablediffusion/ggml/src/ggml.c",
5766LL,
"a->ne[3] == 1");
goto LABEL_8;
}
if ( *(_DWORD *)a2 )
{
fflush(stdout);
v8 = stderr;
fprintf(
stderr,
"GGML_ASSERT: %s:%d: %s\n",
"/workspace/llm4binary/github/2025_star3/7CodeWizard[P]stablediffusion/ggml/src/ggml.c",
5767LL,
"a->type == GGML_TYPE_F32");
goto LABEL_8;
}
if ( *(_QWORD *)(a2 + 152) )
{
fflush(stdout);
v8 = stderr;
fprintf(
stderr,
"GGML_ASSERT: %s:%d: %s\n",
"/workspace/llm4binary/github/2025_star3/7CodeWizard[P]stablediffusion/ggml/src/ggml.c",
5772LL,
"false");
LABEL_8:
ggml_print_backtrace();
abort(v8);
}
v3 = a3;
v4 = (*(_QWORD *)(a2 + 24) + (a3 - *(_QWORD *)(a2 + 24) % a3) % v3) / v3;
v5 = (*(_QWORD *)(a2 + 32) + (v3 - *(_QWORD *)(a2 + 32) % v3) % v3) / v3;
v10[0] = *(_QWORD *)(a2 + 16);
v10[1] = a3;
v10[2] = a3;
v10[3] = (int)v5 * (int)v4;
v6 = ggml_new_tensor(a1, 0LL, 4LL, (long long)v10);
v9[0] = v4;
v9[1] = v5;
v9[2] = v3;
ggml_set_op_params(v6, (long long)v9, 12LL);
*(_DWORD *)(v6 + 80) = 57;
*(_QWORD *)(v6 + 152) = 0LL;
*(_QWORD *)(v6 + 160) = a2;
return v6;
}
|
ggml_win_part:
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x30
CMP qword ptr [RSI + 0x28],0x1
JNZ 0x0016e80f
MOV RBX,RSI
CMP dword ptr [RSI],0x0
JNZ 0x0016e844
CMP qword ptr [RBX + 0x98],0x0
JNZ 0x0016e879
MOVSXD R13,EDX
MOV RSI,qword ptr [RBX + 0x18]
MOV RCX,qword ptr [RBX + 0x20]
MOV RAX,RSI
CQO
IDIV R13
MOV RAX,R13
SUB RAX,RDX
CQO
IDIV R13
MOV R8,RDX
MOV RAX,RCX
CQO
IDIV R13
MOV RAX,R13
SUB RAX,RDX
CQO
IDIV R13
MOV R9,RDX
ADD R8,RSI
MOV RAX,R8
CQO
IDIV R13
MOV R14,RAX
ADD R9,RCX
MOV RAX,R9
CQO
IDIV R13
MOV R15,RAX
MOV RAX,qword ptr [RBX + 0x10]
LEA RCX,[RSP + 0x10]
MOV qword ptr [RCX],RAX
MOV qword ptr [RCX + 0x8],R13
MOV qword ptr [RCX + 0x10],R13
MOV EAX,R14D
IMUL EAX,R15D
CDQE
MOV qword ptr [RCX + 0x18],RAX
PUSH 0x4
POP RDX
XOR ESI,ESI
CALL 0x0016835b
MOV R12,RAX
LEA RSI,[RSP + 0x4]
MOV dword ptr [RSI],R14D
MOV dword ptr [RSI + 0x4],R15D
MOV dword ptr [RSI + 0x8],R13D
PUSH 0xc
POP RDX
MOV RDI,RAX
CALL 0x0016ab3d
MOV dword ptr [R12 + 0x50],0x39
AND qword ptr [R12 + 0x98],0x0
MOV qword ptr [R12 + 0xa0],RBX
MOV RAX,R12
ADD RSP,0x30
POP RBX
POP R12
POP R13
POP R14
POP R15
RET
LAB_0016e80f:
MOV RAX,qword ptr [0x001d5f48]
MOV RDI,qword ptr [RAX]
CALL 0x0010a6f0
MOV RAX,qword ptr [0x001d5fa8]
MOV RDI,qword ptr [RAX]
LEA RSI,[0x19a21e]
LEA RDX,[0x1a187e]
LEA R8,[0x1a2002]
MOV ECX,0x1686
JMP 0x0016e8ac
LAB_0016e844:
MOV RAX,qword ptr [0x001d5f48]
MOV RDI,qword ptr [RAX]
CALL 0x0010a6f0
MOV RAX,qword ptr [0x001d5fa8]
MOV RDI,qword ptr [RAX]
LEA RSI,[0x19a21e]
LEA RDX,[0x1a187e]
LEA R8,[0x1a2166]
MOV ECX,0x1687
JMP 0x0016e8ac
LAB_0016e879:
MOV RAX,qword ptr [0x001d5f48]
MOV RDI,qword ptr [RAX]
CALL 0x0010a6f0
MOV RAX,qword ptr [0x001d5fa8]
MOV RDI,qword ptr [RAX]
LEA RSI,[0x19a21e]
LEA RDX,[0x1a187e]
LEA R8,[0x19803f]
MOV ECX,0x168c
LAB_0016e8ac:
XOR EAX,EAX
CALL 0x0010a8b0
CALL 0x00167550
CALL 0x0010a300
|
long ggml_win_part(int8 param_1,int *param_2,int param_3)
{
long lVar1;
int8 uVar2;
FILE *__stream;
char *pcVar3;
int iVar4;
int iVar5;
int local_54;
int local_50;
int local_4c;
int8 local_48;
long local_40;
long local_38;
long local_30;
if (*(long *)(param_2 + 10) == 1) {
if (*param_2 == 0) {
if (*(long *)(param_2 + 0x26) == 0) {
local_40 = (long)param_3;
local_48 = *(int8 *)(param_2 + 4);
iVar4 = (int)(((local_40 - *(long *)(param_2 + 6) % local_40) % local_40 +
*(long *)(param_2 + 6)) / local_40);
iVar5 = (int)(((local_40 - *(long *)(param_2 + 8) % local_40) % local_40 +
*(long *)(param_2 + 8)) / local_40);
local_30 = (long)(iVar4 * iVar5);
local_38 = local_40;
lVar1 = ggml_new_tensor(param_1,0,4);
local_54 = iVar4;
local_50 = iVar5;
local_4c = param_3;
ggml_set_op_params(lVar1,&local_54,0xc);
*(int4 *)(lVar1 + 0x50) = 0x39;
*(int8 *)(lVar1 + 0x98) = 0;
*(int **)(lVar1 + 0xa0) = param_2;
return lVar1;
}
fflush(*(FILE **)PTR_stdout_001d5f48);
__stream = *(FILE **)PTR_stderr_001d5fa8;
pcVar3 = "false";
uVar2 = 0x168c;
}
else {
fflush(*(FILE **)PTR_stdout_001d5f48);
__stream = *(FILE **)PTR_stderr_001d5fa8;
pcVar3 = "a->type == GGML_TYPE_F32";
uVar2 = 0x1687;
}
}
else {
fflush(*(FILE **)PTR_stdout_001d5f48);
__stream = *(FILE **)PTR_stderr_001d5fa8;
pcVar3 = "a->ne[3] == 1";
uVar2 = 0x1686;
}
fprintf(__stream,"GGML_ASSERT: %s:%d: %s\n",
"/workspace/llm4binary/github/2025_star3/7CodeWizard[P]stablediffusion/ggml/src/ggml.c",
uVar2,pcVar3);
ggml_print_backtrace();
/* WARNING: Subroutine does not return */
abort();
}
|
|
9,349 |
MainWindow::setstairs(QVBoxLayout*, int)
|
LeafBlue[P]myElevetor/mainwindow.cpp
|
void MainWindow::setstairs(QVBoxLayout *p_layout,int place)
{
QWidget *big_stair = new QWidget();
p_layout->addWidget(big_stair);
initele(big_stair,place);
for (int i = 0; i < 12; ++i) {
QWidget *stair_widget = new QWidget(big_stair);
stair_widget->move(0,60 * i);
stair_widget->resize(190,60);
stair_widget->setStyleSheet("border:2px solid grey;");
}
}
|
O1
|
cpp
|
MainWindow::setstairs(QVBoxLayout*, int):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movl %edx, %r12d
movq %rsi, %r15
movq %rdi, %r14
movl $0x28, %edi
callq 0x4380
movq %rax, %rbx
xorl %ebp, %ebp
movq %rax, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x44e0
movq %r15, %rdi
movq %rbx, %rsi
xorl %edx, %edx
xorl %ecx, %ecx
callq 0x4390
movq %r14, %rdi
movq %rbx, %rsi
movl %r12d, %edx
callq 0x6428
leaq 0x20(%rsp), %r14
leaq 0x58e7(%rip), %r15 # 0xb45c
movq %rsp, %r12
movl $0x28, %edi
callq 0x4380
movq %rax, %r13
movq %rax, %rdi
movq %rbx, %rsi
xorl %edx, %edx
callq 0x44e0
movl $0x0, 0x20(%rsp)
movl %ebp, 0x24(%rsp)
movq %r13, %rdi
movq %r14, %rsi
callq 0x4400
movabsq $0x3c000000be, %rax # imm = 0x3C000000BE
movq %rax, 0x20(%rsp)
movq %r13, %rdi
movq %r14, %rsi
callq 0x4550
movl $0x16, %esi
movq %r14, %rdi
movq %r15, %rdx
callq 0x42b0
movups 0x20(%rsp), %xmm0
movaps %xmm0, (%rsp)
movq 0x30(%rsp), %rax
movq %rax, 0x10(%rsp)
movq %r13, %rdi
movq %r12, %rsi
callq 0x4030
movq (%rsp), %rax
testq %rax, %rax
je 0x5c12
lock
decl (%rax)
jne 0x5c12
movq (%rsp), %rdi
movl $0x2, %esi
movl $0x8, %edx
callq 0x4250
addl $0x3c, %ebp
cmpl $0x2d0, %ebp # imm = 0x2D0
jne 0x5b78
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r14
movl $0x28, %esi
movq %rbx, %rdi
jmp 0x5c48
movq %rax, %r14
movl $0x28, %esi
movq %r13, %rdi
callq 0x4070
jmp 0x5c63
movq %rax, %r14
movq (%rsp), %rdi
testq %rdi, %rdi
je 0x5c63
movq %rsp, %rsi
callq 0x465f
movq %r14, %rdi
callq 0x41d0
nop
|
_ZN10MainWindow9setstairsEP11QVBoxLayouti:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 38h
mov r12d, edx
mov r15, rsi
mov r14, rdi
mov edi, 28h ; '('; unsigned __int64
call __Znwm; operator new(ulong)
mov rbx, rax
xor ebp, ebp
mov rdi, rax
xor esi, esi
xor edx, edx
call __ZN7QWidgetC1EPS_6QFlagsIN2Qt10WindowTypeEE; QWidget::QWidget(QWidget*,QFlags<Qt::WindowType>)
mov rdi, r15
mov rsi, rbx
xor edx, edx
xor ecx, ecx
call __ZN10QBoxLayout9addWidgetEP7QWidgeti6QFlagsIN2Qt13AlignmentFlagEE; QBoxLayout::addWidget(QWidget *,int,QFlags<Qt::AlignmentFlag>)
mov rdi, r14; this
mov rsi, rbx; QWidget *
mov edx, r12d; int
call _ZN10MainWindow7initeleEP7QWidgeti; MainWindow::initele(QWidget *,int)
lea r14, [rsp+68h+var_48]
lea r15, aBorder2pxSolid; "border:2px solid grey;"
mov r12, rsp
loc_5B78:
mov edi, 28h ; '('; unsigned __int64
call __Znwm; operator new(ulong)
mov r13, rax
mov rdi, rax
mov rsi, rbx
xor edx, edx
call __ZN7QWidgetC1EPS_6QFlagsIN2Qt10WindowTypeEE; QWidget::QWidget(QWidget*,QFlags<Qt::WindowType>)
mov dword ptr [rsp+68h+var_48], 0
mov dword ptr [rsp+68h+var_48+4], ebp
mov rdi, r13
mov rsi, r14
call __ZN7QWidget4moveERK6QPoint; QWidget::move(QPoint const&)
mov rax, 3C000000BEh
mov qword ptr [rsp+68h+var_48], rax
mov rdi, r13
mov rsi, r14
call __ZN7QWidget6resizeERK5QSize; QWidget::resize(QSize const&)
mov esi, 16h
mov rdi, r14
mov rdx, r15
call __ZN7QString8fromUtf8E14QByteArrayView; QString::fromUtf8(QByteArrayView)
movups xmm0, [rsp+68h+var_48]
movaps [rsp+68h+var_68], xmm0
mov rax, [rsp+68h+var_38]
mov [rsp+68h+var_58], rax
mov rdi, r13; this
mov rsi, r12; QString *
call __ZN7QWidget13setStyleSheetERK7QString; QWidget::setStyleSheet(QString const&)
mov rax, qword ptr [rsp+68h+var_68]
test rax, rax
jz short loc_5C12
lock dec dword ptr [rax]
jnz short loc_5C12
mov rdi, qword ptr [rsp+68h+var_68]
mov esi, 2
mov edx, 8
call __ZN10QArrayData10deallocateEPS_xx; QArrayData::deallocate(QArrayData*,long long,long long)
loc_5C12:
add ebp, 3Ch ; '<'
cmp ebp, 2D0h
jnz loc_5B78
add rsp, 38h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
mov r14, rax
mov esi, 28h ; '('
mov rdi, rbx
jmp short loc_5C48
mov r14, rax
mov esi, 28h ; '('; unsigned __int64
mov rdi, r13; void *
loc_5C48:
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_5C63
mov r14, rax
mov rdi, [rsp+0]
test rdi, rdi
jz short loc_5C63
mov rsi, rsp
call _ZN10MainWindow9setstairsEP11QVBoxLayouti_cold_1; MainWindow::setstairs(QVBoxLayout *,int) [clone]
loc_5C63:
mov rdi, r14
call __Unwind_Resume
|
long long MainWindow::setstairs(MainWindow *this, QVBoxLayout *a2, int a3)
{
QWidget *v4; // rbx
int v5; // ebp
QWidget *v6; // r13
long long result; // rax
__int128 v8; // [rsp+0h] [rbp-68h] BYREF
long long v9; // [rsp+10h] [rbp-58h]
__int128 v10; // [rsp+20h] [rbp-48h] BYREF
long long v11; // [rsp+30h] [rbp-38h]
v4 = (QWidget *)operator new(0x28uLL);
v5 = 0;
QWidget::QWidget(v4, 0LL, 0LL);
QBoxLayout::addWidget(a2, v4, 0LL, 0LL);
MainWindow::initele(this, v4, a3);
do
{
v6 = (QWidget *)operator new(0x28uLL);
QWidget::QWidget(v6, v4, 0LL);
LODWORD(v10) = 0;
DWORD1(v10) = v5;
QWidget::move(v6, &v10);
*(_QWORD *)&v10 = 0x3C000000BELL;
QWidget::resize(v6, &v10);
QString::fromUtf8(&v10, 22LL, "border:2px solid grey;");
v8 = v10;
v9 = v11;
QWidget::setStyleSheet(v6, (const QString *)&v8);
result = v8;
if ( (_QWORD)v8 )
{
if ( !_InterlockedDecrement((volatile signed __int32 *)v8) )
result = QArrayData::deallocate(v8, 2LL, 8LL);
}
v5 += 60;
}
while ( v5 != 720 );
return result;
}
|
setstairs:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x38
MOV R12D,EDX
MOV R15,RSI
MOV R14,RDI
MOV EDI,0x28
CALL 0x00104380
MOV RBX,RAX
LAB_00105b3e:
XOR EBP,EBP
MOV RDI,RAX
XOR ESI,ESI
XOR EDX,EDX
CALL 0x001044e0
LAB_00105b4c:
MOV RDI,R15
MOV RSI,RBX
XOR EDX,EDX
XOR ECX,ECX
CALL 0x00104390
MOV RDI,R14
MOV RSI,RBX
MOV EDX,R12D
CALL 0x00106428
LEA R14,[RSP + 0x20]
LEA R15,[0x10b45c]
MOV R12,RSP
LAB_00105b78:
MOV EDI,0x28
CALL 0x00104380
MOV R13,RAX
LAB_00105b85:
MOV RDI,RAX
MOV RSI,RBX
XOR EDX,EDX
CALL 0x001044e0
LAB_00105b92:
MOV dword ptr [RSP + 0x20],0x0
MOV dword ptr [RSP + 0x24],EBP
MOV RDI,R13
MOV RSI,R14
CALL 0x00104400
MOV RAX,0x3c000000be
MOV qword ptr [RSP + 0x20],RAX
MOV RDI,R13
MOV RSI,R14
CALL 0x00104550
MOV ESI,0x16
MOV RDI,R14
MOV RDX,R15
CALL 0x001042b0
MOVUPS XMM0,xmmword ptr [RSP + 0x20]
MOVAPS xmmword ptr [RSP],XMM0
MOV RAX,qword ptr [RSP + 0x30]
MOV qword ptr [RSP + 0x10],RAX
LAB_00105be6:
MOV RDI,R13
MOV RSI,R12
CALL 0x00104030
LAB_00105bf1:
MOV RAX,qword ptr [RSP]
TEST RAX,RAX
JZ 0x00105c12
DEC.LOCK dword ptr [RAX]
JNZ 0x00105c12
MOV RDI,qword ptr [RSP]
MOV ESI,0x2
MOV EDX,0x8
CALL 0x00104250
LAB_00105c12:
ADD EBP,0x3c
CMP EBP,0x2d0
JNZ 0x00105b78
ADD RSP,0x38
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
/* MainWindow::setstairs(QVBoxLayout*, int) */
void __thiscall MainWindow::setstairs(MainWindow *this,QVBoxLayout *param_1,int param_2)
{
QArrayData *pQVar1;
QWidget *pQVar2;
QPoint *pQVar3;
uint uVar4;
QArrayData *local_48 [3];
pQVar2 = (QWidget *)operator_new(0x28);
/* try { // try from 00105b3e to 00105b4b has its CatchHandler @ 00105c30 */
uVar4 = 0;
QWidget::QWidget(pQVar2,0,0);
QBoxLayout::addWidget(param_1,pQVar2,0,0);
initele(this,pQVar2,param_2);
do {
pQVar3 = (QPoint *)operator_new(0x28);
/* try { // try from 00105b85 to 00105b91 has its CatchHandler @ 00105c3d */
QWidget::QWidget((QWidget *)pQVar3,pQVar2,0);
local_48[0] = (QArrayData *)((ulong)uVar4 << 0x20);
QWidget::move(pQVar3);
local_48[0] = (QArrayData *)&DAT_3c000000be;
QWidget::resize((QSize *)pQVar3);
QString::fromUtf8(local_48,0x16,"border:2px solid grey;");
pQVar1 = local_48[0];
/* try { // try from 00105be6 to 00105bf0 has its CatchHandler @ 00105c4f */
QWidget::setStyleSheet((QString *)pQVar3);
if (pQVar1 != (QArrayData *)0x0) {
LOCK();
*(int *)pQVar1 = *(int *)pQVar1 + -1;
UNLOCK();
if (*(int *)pQVar1 == 0) {
QArrayData::deallocate(pQVar1,2,8);
}
}
uVar4 = uVar4 + 0x3c;
} while (uVar4 != 0x2d0);
return;
}
|
|
9,350 |
MainWindow::setstairs(QVBoxLayout*, int)
|
LeafBlue[P]myElevetor/mainwindow.cpp
|
void MainWindow::setstairs(QVBoxLayout *p_layout,int place)
{
QWidget *big_stair = new QWidget();
p_layout->addWidget(big_stair);
initele(big_stair,place);
for (int i = 0; i < 12; ++i) {
QWidget *stair_widget = new QWidget(big_stair);
stair_widget->move(0,60 * i);
stair_widget->resize(190,60);
stair_widget->setStyleSheet("border:2px solid grey;");
}
}
|
O3
|
cpp
|
MainWindow::setstairs(QVBoxLayout*, int):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movl %edx, %r12d
movq %rsi, %r15
movq %rdi, %r14
movl $0x28, %edi
callq 0x4380
movq %rax, %rbx
xorl %ebp, %ebp
movq %rax, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x44e0
movq %r15, %rdi
movq %rbx, %rsi
xorl %edx, %edx
xorl %ecx, %ecx
callq 0x4390
movq %r14, %rdi
movq %rbx, %rsi
movl %r12d, %edx
callq 0x640c
leaq 0x20(%rsp), %r14
leaq 0x4903(%rip), %r15 # 0xa45c
movq %rsp, %r12
movl $0x28, %edi
callq 0x4380
movq %rax, %r13
movq %rax, %rdi
movq %rbx, %rsi
xorl %edx, %edx
callq 0x44e0
movl $0x0, 0x20(%rsp)
movl %ebp, 0x24(%rsp)
movq %r13, %rdi
movq %r14, %rsi
callq 0x4400
movabsq $0x3c000000be, %rax # imm = 0x3C000000BE
movq %rax, 0x20(%rsp)
movq %r13, %rdi
movq %r14, %rsi
callq 0x4550
movl $0x16, %esi
movq %r14, %rdi
movq %r15, %rdx
callq 0x42b0
movaps 0x20(%rsp), %xmm0
movaps %xmm0, (%rsp)
movq 0x30(%rsp), %rax
movq %rax, 0x10(%rsp)
movq %r13, %rdi
movq %r12, %rsi
callq 0x4030
movq (%rsp), %rax
testq %rax, %rax
je 0x5bf6
lock
decl (%rax)
jne 0x5bf6
movq (%rsp), %rdi
movl $0x2, %esi
movl $0x8, %edx
callq 0x4250
addl $0x3c, %ebp
cmpl $0x2d0, %ebp # imm = 0x2D0
jne 0x5b5c
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r14
movl $0x28, %esi
movq %rbx, %rdi
jmp 0x5c2c
movq %rax, %r14
movl $0x28, %esi
movq %r13, %rdi
callq 0x4070
jmp 0x5c47
movq %rax, %r14
movq (%rsp), %rdi
testq %rdi, %rdi
je 0x5c47
movq %rsp, %rsi
callq 0x465f
movq %r14, %rdi
callq 0x41d0
nop
|
_ZN10MainWindow9setstairsEP11QVBoxLayouti:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 38h
mov r12d, edx
mov r15, rsi
mov r14, rdi
mov edi, 28h ; '('; unsigned __int64
call __Znwm; operator new(ulong)
mov rbx, rax
xor ebp, ebp
mov rdi, rax
xor esi, esi
xor edx, edx
call __ZN7QWidgetC1EPS_6QFlagsIN2Qt10WindowTypeEE; QWidget::QWidget(QWidget*,QFlags<Qt::WindowType>)
mov rdi, r15
mov rsi, rbx
xor edx, edx
xor ecx, ecx
call __ZN10QBoxLayout9addWidgetEP7QWidgeti6QFlagsIN2Qt13AlignmentFlagEE; QBoxLayout::addWidget(QWidget *,int,QFlags<Qt::AlignmentFlag>)
mov rdi, r14; this
mov rsi, rbx; QWidget *
mov edx, r12d; int
call _ZN10MainWindow7initeleEP7QWidgeti; MainWindow::initele(QWidget *,int)
lea r14, [rsp+68h+var_48]
lea r15, aBorder2pxSolid; "border:2px solid grey;"
mov r12, rsp
loc_5B5C:
mov edi, 28h ; '('; unsigned __int64
call __Znwm; operator new(ulong)
mov r13, rax
mov rdi, rax
mov rsi, rbx
xor edx, edx
call __ZN7QWidgetC1EPS_6QFlagsIN2Qt10WindowTypeEE; QWidget::QWidget(QWidget*,QFlags<Qt::WindowType>)
mov dword ptr [rsp+68h+var_48], 0
mov dword ptr [rsp+68h+var_48+4], ebp
mov rdi, r13
mov rsi, r14
call __ZN7QWidget4moveERK6QPoint; QWidget::move(QPoint const&)
mov rax, 3C000000BEh
mov qword ptr [rsp+68h+var_48], rax
mov rdi, r13
mov rsi, r14
call __ZN7QWidget6resizeERK5QSize; QWidget::resize(QSize const&)
mov esi, 16h
mov rdi, r14
mov rdx, r15
call __ZN7QString8fromUtf8E14QByteArrayView; QString::fromUtf8(QByteArrayView)
movaps xmm0, [rsp+68h+var_48]
movaps [rsp+68h+var_68], xmm0
mov rax, [rsp+68h+var_38]
mov [rsp+68h+var_58], rax
mov rdi, r13; this
mov rsi, r12; QString *
call __ZN7QWidget13setStyleSheetERK7QString; QWidget::setStyleSheet(QString const&)
mov rax, qword ptr [rsp+68h+var_68]
test rax, rax
jz short loc_5BF6
lock dec dword ptr [rax]
jnz short loc_5BF6
mov rdi, qword ptr [rsp+68h+var_68]
mov esi, 2
mov edx, 8
call __ZN10QArrayData10deallocateEPS_xx; QArrayData::deallocate(QArrayData*,long long,long long)
loc_5BF6:
add ebp, 3Ch ; '<'
cmp ebp, 2D0h
jnz loc_5B5C
add rsp, 38h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
mov r14, rax
mov esi, 28h ; '('
mov rdi, rbx
jmp short loc_5C2C
mov r14, rax
mov esi, 28h ; '('; unsigned __int64
mov rdi, r13; void *
loc_5C2C:
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_5C47
mov r14, rax
mov rdi, [rsp+0]
test rdi, rdi
jz short loc_5C47
mov rsi, rsp
call _ZN10MainWindow9setstairsEP11QVBoxLayouti_cold_1; MainWindow::setstairs(QVBoxLayout *,int) [clone]
loc_5C47:
mov rdi, r14
call __Unwind_Resume
|
long long MainWindow::setstairs(MainWindow *this, QVBoxLayout *a2, int a3)
{
QWidget *v4; // rbx
int v5; // ebp
QWidget *v6; // r13
long long result; // rax
__int128 v8; // [rsp+0h] [rbp-68h] BYREF
long long v9; // [rsp+10h] [rbp-58h]
__int128 v10; // [rsp+20h] [rbp-48h] BYREF
long long v11; // [rsp+30h] [rbp-38h]
v4 = (QWidget *)operator new(0x28uLL);
v5 = 0;
QWidget::QWidget(v4, 0LL, 0LL);
QBoxLayout::addWidget(a2, v4, 0LL, 0LL);
MainWindow::initele(this, v4, a3);
do
{
v6 = (QWidget *)operator new(0x28uLL);
QWidget::QWidget(v6, v4, 0LL);
LODWORD(v10) = 0;
DWORD1(v10) = v5;
QWidget::move(v6, &v10);
*(_QWORD *)&v10 = 0x3C000000BELL;
QWidget::resize(v6, &v10);
QString::fromUtf8(&v10, 22LL, "border:2px solid grey;");
v8 = v10;
v9 = v11;
QWidget::setStyleSheet(v6, (const QString *)&v8);
result = v8;
if ( (_QWORD)v8 )
{
if ( !_InterlockedDecrement((volatile signed __int32 *)v8) )
result = QArrayData::deallocate(v8, 2LL, 8LL);
}
v5 += 60;
}
while ( v5 != 720 );
return result;
}
|
setstairs:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x38
MOV R12D,EDX
MOV R15,RSI
MOV R14,RDI
MOV EDI,0x28
CALL 0x00104380
MOV RBX,RAX
LAB_00105b22:
XOR EBP,EBP
MOV RDI,RAX
XOR ESI,ESI
XOR EDX,EDX
CALL 0x001044e0
LAB_00105b30:
MOV RDI,R15
MOV RSI,RBX
XOR EDX,EDX
XOR ECX,ECX
CALL 0x00104390
MOV RDI,R14
MOV RSI,RBX
MOV EDX,R12D
CALL 0x0010640c
LEA R14,[RSP + 0x20]
LEA R15,[0x10a45c]
MOV R12,RSP
LAB_00105b5c:
MOV EDI,0x28
CALL 0x00104380
MOV R13,RAX
LAB_00105b69:
MOV RDI,RAX
MOV RSI,RBX
XOR EDX,EDX
CALL 0x001044e0
LAB_00105b76:
MOV dword ptr [RSP + 0x20],0x0
MOV dword ptr [RSP + 0x24],EBP
MOV RDI,R13
MOV RSI,R14
CALL 0x00104400
MOV RAX,0x3c000000be
MOV qword ptr [RSP + 0x20],RAX
MOV RDI,R13
MOV RSI,R14
CALL 0x00104550
MOV ESI,0x16
MOV RDI,R14
MOV RDX,R15
CALL 0x001042b0
MOVAPS XMM0,xmmword ptr [RSP + 0x20]
MOVAPS xmmword ptr [RSP],XMM0
MOV RAX,qword ptr [RSP + 0x30]
MOV qword ptr [RSP + 0x10],RAX
LAB_00105bca:
MOV RDI,R13
MOV RSI,R12
CALL 0x00104030
LAB_00105bd5:
MOV RAX,qword ptr [RSP]
TEST RAX,RAX
JZ 0x00105bf6
DEC.LOCK dword ptr [RAX]
JNZ 0x00105bf6
MOV RDI,qword ptr [RSP]
MOV ESI,0x2
MOV EDX,0x8
CALL 0x00104250
LAB_00105bf6:
ADD EBP,0x3c
CMP EBP,0x2d0
JNZ 0x00105b5c
ADD RSP,0x38
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
/* MainWindow::setstairs(QVBoxLayout*, int) */
void __thiscall MainWindow::setstairs(MainWindow *this,QVBoxLayout *param_1,int param_2)
{
QArrayData *pQVar1;
QWidget *pQVar2;
QPoint *pQVar3;
uint uVar4;
QArrayData *local_48 [3];
pQVar2 = (QWidget *)operator_new(0x28);
/* try { // try from 00105b22 to 00105b2f has its CatchHandler @ 00105c14 */
uVar4 = 0;
QWidget::QWidget(pQVar2,0,0);
QBoxLayout::addWidget(param_1,pQVar2,0,0);
initele(this,pQVar2,param_2);
do {
pQVar3 = (QPoint *)operator_new(0x28);
/* try { // try from 00105b69 to 00105b75 has its CatchHandler @ 00105c21 */
QWidget::QWidget((QWidget *)pQVar3,pQVar2,0);
local_48[0] = (QArrayData *)((ulong)uVar4 << 0x20);
QWidget::move(pQVar3);
local_48[0] = (QArrayData *)&DAT_3c000000be;
QWidget::resize((QSize *)pQVar3);
QString::fromUtf8(local_48,0x16,"border:2px solid grey;");
pQVar1 = local_48[0];
/* try { // try from 00105bca to 00105bd4 has its CatchHandler @ 00105c33 */
QWidget::setStyleSheet((QString *)pQVar3);
if (pQVar1 != (QArrayData *)0x0) {
LOCK();
*(int *)pQVar1 = *(int *)pQVar1 + -1;
UNLOCK();
if (*(int *)pQVar1 == 0) {
QArrayData::deallocate(pQVar1,2,8);
}
}
uVar4 = uVar4 + 0x3c;
} while (uVar4 != 0x2d0);
return;
}
|
|
9,351 |
JS_ReadFunctionBytecode
|
bluesky950520[P]quickjs/quickjs.c
|
static int JS_ReadFunctionBytecode(BCReaderState *s, JSFunctionBytecode *b,
int byte_code_offset, uint32_t bc_len)
{
uint8_t *bc_buf;
int pos, len, op;
JSAtom atom;
uint32_t idx;
bc_buf = (uint8_t*)b + byte_code_offset;
if (bc_get_buf(s, bc_buf, bc_len))
return -1;
b->byte_code_buf = bc_buf;
if (is_be())
bc_byte_swap(bc_buf, bc_len);
pos = 0;
while (pos < bc_len) {
op = bc_buf[pos];
len = short_opcode_info(op).size;
switch(short_opcode_info(op).fmt) {
case OP_FMT_atom:
case OP_FMT_atom_u8:
case OP_FMT_atom_u16:
case OP_FMT_atom_label_u8:
case OP_FMT_atom_label_u16:
idx = get_u32(bc_buf + pos + 1);
if (bc_idx_to_atom(s, &atom, idx)) {
/* Note: the atoms will be freed up to this position */
b->byte_code_len = pos;
return -1;
}
put_u32(bc_buf + pos + 1, atom);
break;
default:
assert(!is_ic_op(op)); // should not end up in serialized bytecode
break;
}
#ifdef DUMP_READ_OBJECT
if (check_dump_flag(s->ctx->rt, DUMP_READ_OBJECT)) {
const uint8_t *save_ptr = s->ptr;
s->ptr = s->ptr_last + len;
s->level -= 4;
bc_read_trace(s, "%s", ""); // hex dump + indent
dump_single_byte_code(s->ctx, bc_buf + pos, b,
s->ptr - s->buf_start - len);
s->level += 4;
s->ptr = save_ptr;
}
#endif
pos += len;
}
return 0;
}
|
O3
|
c
|
JS_ReadFunctionBytecode:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movl %ecx, %ebx
movq %rsi, %r14
movq %rdi, %r15
movslq %edx, %r12
addq %rsi, %r12
movq %r12, %rsi
movl %ecx, %edx
callq 0x4cbda
movl $0xffffffff, %ecx # imm = 0xFFFFFFFF
testl %eax, %eax
jne 0x4cbc9
movq %r12, 0x20(%r14)
testl %ebx, %ebx
je 0x4cbb7
movq %r15, 0x10(%rsp)
movq %r14, 0x8(%rsp)
xorl %r13d, %r13d
leaq 0x58795(%rip), %rbp # 0xa5300
movl %r13d, %r14d
movzbl (%r12,%r14), %eax
leal 0x12(%rax), %ecx
cmpl $0xb3, %eax
cmovbl %eax, %ecx
movzbl (%rbp,%rcx,4), %r15d
movb 0x3(%rbp,%rcx,4), %al
addb $-0x18, %al
cmpb $0x4, %al
ja 0x4cbaf
movl 0x1(%r12,%r14), %edx
movq 0x10(%rsp), %rdi
leaq 0x4(%rsp), %rsi
callq 0x4cc29
testl %eax, %eax
jne 0x4cbbb
movl 0x4(%rsp), %eax
movl %eax, 0x1(%r12,%r14)
addl %r15d, %r13d
cmpl %ebx, %r13d
jb 0x4cb6b
xorl %ecx, %ecx
jmp 0x4cbc9
movq 0x8(%rsp), %rax
movl %r13d, 0x28(%rax)
movl $0xffffffff, %ecx # imm = 0xFFFFFFFF
movl %ecx, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
|
JS_ReadFunctionBytecode:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 18h
mov ebx, ecx
mov r14, rsi
mov r15, rdi
movsxd r12, edx
add r12, rsi
mov rsi, r12
mov edx, ecx
call bc_get_buf
mov ecx, 0FFFFFFFFh
test eax, eax
jnz short loc_4CBC9
mov [r14+20h], r12
test ebx, ebx
jz short loc_4CBB7
mov [rsp+48h+var_38], r15
mov [rsp+48h+var_40], r14
xor r13d, r13d
lea rbp, opcode_info
loc_4CB6B:
mov r14d, r13d
movzx eax, byte ptr [r12+r14]
lea ecx, [rax+12h]
cmp eax, 0B3h
cmovb ecx, eax
movzx r15d, byte ptr [rbp+rcx*4+0]
mov al, [rbp+rcx*4+3]
add al, 0E8h
cmp al, 4
ja short loc_4CBAF
mov edx, [r12+r14+1]
mov rdi, [rsp+48h+var_38]
lea rsi, [rsp+48h+var_44]
call bc_idx_to_atom
test eax, eax
jnz short loc_4CBBB
mov eax, [rsp+48h+var_44]
mov [r12+r14+1], eax
loc_4CBAF:
add r13d, r15d
cmp r13d, ebx
jb short loc_4CB6B
loc_4CBB7:
xor ecx, ecx
jmp short loc_4CBC9
loc_4CBBB:
mov rax, [rsp+48h+var_40]
mov [rax+28h], r13d
mov ecx, 0FFFFFFFFh
loc_4CBC9:
mov eax, ecx
add rsp, 18h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
|
long long JS_ReadFunctionBytecode(long long a1, long long a2, int a3, unsigned int a4)
{
long long v5; // r12
int buf; // eax
unsigned int v7; // ecx
unsigned int i; // r13d
unsigned int v9; // eax
long long v10; // rcx
int v11; // r15d
int v13; // [rsp+4h] [rbp-44h] BYREF
long long v14; // [rsp+8h] [rbp-40h]
long long v15; // [rsp+10h] [rbp-38h]
v5 = a2 + a3;
buf = bc_get_buf(a1, v5, a4);
v7 = -1;
if ( !buf )
{
*(_QWORD *)(a2 + 32) = v5;
if ( a4 )
{
v15 = a1;
v14 = a2;
for ( i = 0; i < a4; i += v11 )
{
v9 = *(unsigned __int8 *)(v5 + i);
v10 = v9 + 18;
if ( v9 < 0xB3 )
v10 = *(unsigned __int8 *)(v5 + i);
v11 = opcode_info[4 * v10];
if ( (unsigned __int8)(opcode_info[4 * v10 + 3] - 24) <= 4u )
{
if ( (unsigned int)bc_idx_to_atom(v15, &v13, *(unsigned int *)(v5 + i + 1)) )
{
*(_DWORD *)(v14 + 40) = i;
return (unsigned int)-1;
}
*(_DWORD *)(v5 + i + 1) = v13;
}
}
}
return 0;
}
return v7;
}
|
JS_ReadFunctionBytecode:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x18
MOV EBX,ECX
MOV R14,RSI
MOV R15,RDI
MOVSXD R12,EDX
ADD R12,RSI
MOV RSI,R12
MOV EDX,ECX
CALL 0x0014cbda
MOV ECX,0xffffffff
TEST EAX,EAX
JNZ 0x0014cbc9
MOV qword ptr [R14 + 0x20],R12
TEST EBX,EBX
JZ 0x0014cbb7
MOV qword ptr [RSP + 0x10],R15
MOV qword ptr [RSP + 0x8],R14
XOR R13D,R13D
LEA RBP,[0x1a5300]
LAB_0014cb6b:
MOV R14D,R13D
MOVZX EAX,byte ptr [R12 + R14*0x1]
LEA ECX,[RAX + 0x12]
CMP EAX,0xb3
CMOVC ECX,EAX
MOVZX R15D,byte ptr [RBP + RCX*0x4]
MOV AL,byte ptr [RBP + RCX*0x4 + 0x3]
ADD AL,0xe8
CMP AL,0x4
JA 0x0014cbaf
MOV EDX,dword ptr [R12 + R14*0x1 + 0x1]
MOV RDI,qword ptr [RSP + 0x10]
LEA RSI,[RSP + 0x4]
CALL 0x0014cc29
TEST EAX,EAX
JNZ 0x0014cbbb
MOV EAX,dword ptr [RSP + 0x4]
MOV dword ptr [R12 + R14*0x1 + 0x1],EAX
LAB_0014cbaf:
ADD R13D,R15D
CMP R13D,EBX
JC 0x0014cb6b
LAB_0014cbb7:
XOR ECX,ECX
JMP 0x0014cbc9
LAB_0014cbbb:
MOV RAX,qword ptr [RSP + 0x8]
MOV dword ptr [RAX + 0x28],R13D
MOV ECX,0xffffffff
LAB_0014cbc9:
MOV EAX,ECX
ADD RSP,0x18
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
int8 JS_ReadFunctionBytecode(int8 param_1,long param_2,int param_3,uint param_4)
{
byte bVar1;
uint uVar2;
int iVar3;
int8 uVar4;
long lVar5;
uint uVar6;
ulong uVar7;
int4 local_44;
long local_40;
int8 local_38;
lVar5 = param_3 + param_2;
iVar3 = bc_get_buf(param_1,lVar5,param_4);
uVar4 = 0xffffffff;
if (iVar3 == 0) {
*(long *)(param_2 + 0x20) = lVar5;
if (param_4 != 0) {
uVar6 = 0;
local_40 = param_2;
local_38 = param_1;
do {
uVar7 = (ulong)uVar6;
bVar1 = *(byte *)(lVar5 + uVar7);
uVar2 = bVar1 + 0x12;
if (bVar1 < 0xb3) {
uVar2 = (uint)bVar1;
}
bVar1 = opcode_info[(ulong)uVar2 * 4];
if ((byte)(opcode_info[(ulong)uVar2 * 4 + 3] - 0x18) < 5) {
iVar3 = bc_idx_to_atom(local_38,&local_44,*(int4 *)(lVar5 + 1 + uVar7));
if (iVar3 != 0) {
*(uint *)(local_40 + 0x28) = uVar6;
return 0xffffffff;
}
*(int4 *)(lVar5 + 1 + uVar7) = local_44;
}
uVar6 = uVar6 + bVar1;
} while (uVar6 < param_4);
}
uVar4 = 0;
}
return uVar4;
}
|
|
9,352 |
dirname_part
|
eloqsql/mysys/mf_dirname.c
|
size_t dirname_part(char *to, const char *name, size_t *to_res_length)
{
size_t length;
DBUG_ENTER("dirname_part");
DBUG_PRINT("enter",("'%s'",name));
length=dirname_length(name);
*to_res_length= (size_t) (convert_dirname(to, name, name+length) - to);
DBUG_RETURN(length);
}
|
O0
|
c
|
dirname_part:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
jmp 0xe1546
movq -0x10(%rbp), %rdi
callq 0xe14b0
movq %rax, -0x20(%rbp)
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x10(%rbp), %rdx
addq -0x20(%rbp), %rdx
callq 0xe1590
movq %rax, %rcx
movq -0x8(%rbp), %rax
subq %rax, %rcx
movq -0x18(%rbp), %rax
movq %rcx, (%rax)
movq -0x20(%rbp), %rax
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax,%rax)
|
dirname_part:
push rbp
mov rbp, rsp
sub rsp, 30h
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov [rbp+var_18], rdx
jmp short $+2
loc_E1546:
mov rdi, [rbp+var_10]
call dirname_length
mov [rbp+var_20], rax
mov rdi, [rbp+var_8]
mov rsi, [rbp+var_10]
mov rdx, [rbp+var_10]
add rdx, [rbp+var_20]
call convert_dirname
mov rcx, rax
mov rax, [rbp+var_8]
sub rcx, rax
mov rax, [rbp+var_18]
mov [rax], rcx
mov rax, [rbp+var_20]
mov [rbp+var_28], rax
mov rax, [rbp+var_28]
add rsp, 30h
pop rbp
retn
|
long long dirname_part(long long a1, _BYTE *a2, _QWORD *a3)
{
long long v4; // [rsp+10h] [rbp-20h]
v4 = dirname_length(a2);
*a3 = convert_dirname(a1, a2, &a2[v4]) - a1;
return v4;
}
|
dirname_part:
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
JMP 0x001e1546
LAB_001e1546:
MOV RDI,qword ptr [RBP + -0x10]
CALL 0x001e14b0
MOV qword ptr [RBP + -0x20],RAX
MOV RDI,qword ptr [RBP + -0x8]
MOV RSI,qword ptr [RBP + -0x10]
MOV RDX,qword ptr [RBP + -0x10]
ADD RDX,qword ptr [RBP + -0x20]
CALL 0x001e1590
MOV RCX,RAX
MOV RAX,qword ptr [RBP + -0x8]
SUB RCX,RAX
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RAX],RCX
MOV RAX,qword ptr [RBP + -0x20]
MOV qword ptr [RBP + -0x28],RAX
MOV RAX,qword ptr [RBP + -0x28]
ADD RSP,0x30
POP RBP
RET
|
long dirname_part(long param_1,long param_2,long *param_3)
{
long lVar1;
long lVar2;
lVar1 = dirname_length(param_2);
lVar2 = convert_dirname(param_1,param_2,param_2 + lVar1);
*param_3 = lVar2 - param_1;
return lVar1;
}
|
|
9,353 |
inline_mysql_mutex_init
|
eloqsql/include/mysql/psi/mysql_thread.h
|
static inline int inline_mysql_mutex_init(
#ifdef HAVE_PSI_MUTEX_INTERFACE
PSI_mutex_key key,
#endif
mysql_mutex_t *that,
const pthread_mutexattr_t *attr
#ifdef SAFE_MUTEX
, const char *src_name, const char *src_file, uint src_line
#endif
)
{
#ifdef HAVE_PSI_MUTEX_INTERFACE
that->m_psi= PSI_MUTEX_CALL(init_mutex)(key, &that->m_mutex);
#else
that->m_psi= NULL;
#endif
#ifdef COROUTINE_ENABLED
that->l.data= that;
that->l.prev= that->l.next= NULL;
#endif
#ifdef SAFE_MUTEX
return safe_mutex_init(&that->m_mutex, attr, src_name, src_file, src_line);
#else
return pthread_mutex_init(&that->m_mutex, attr);
#endif
}
|
O0
|
c
|
inline_mysql_mutex_init:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movl %edi, -0x4(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
leaq 0x1db06e(%rip), %rax # 0x28e618
movq (%rax), %rax
movq 0x40(%rax), %rax
movl -0x4(%rbp), %edi
movq -0x10(%rbp), %rsi
callq *%rax
movq %rax, %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x40(%rax)
movq -0x10(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x38(%rax)
movq -0x10(%rbp), %rax
movq $0x0, 0x30(%rax)
movq -0x10(%rbp), %rax
movq $0x0, 0x28(%rax)
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x3b490
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
|
inline_mysql_mutex_init_1:
push rbp
mov rbp, rsp
sub rsp, 20h
mov [rbp+var_4], edi
mov [rbp+var_10], rsi
mov [rbp+var_18], rdx
lea rax, PSI_server
mov rax, [rax]
mov rax, [rax+40h]
mov edi, [rbp+var_4]
mov rsi, [rbp+var_10]
call rax
mov rcx, rax
mov rax, [rbp+var_10]
mov [rax+40h], rcx
mov rcx, [rbp+var_10]
mov rax, [rbp+var_10]
mov [rax+38h], rcx
mov rax, [rbp+var_10]
mov qword ptr [rax+30h], 0
mov rax, [rbp+var_10]
mov qword ptr [rax+28h], 0
mov rdi, [rbp+var_10]
mov rsi, [rbp+var_18]
call _pthread_mutex_init
add rsp, 20h
pop rbp
retn
|
long long inline_mysql_mutex_init_1(unsigned int a1, _QWORD *a2, long long a3)
{
a2[8] = (*((long long ( **)(_QWORD, _QWORD *))PSI_server + 8))(a1, a2);
a2[7] = a2;
a2[6] = 0LL;
a2[5] = 0LL;
return pthread_mutex_init(a2, a3);
}
|
inline_mysql_mutex_init:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x20
MOV dword ptr [RBP + -0x4],EDI
MOV qword ptr [RBP + -0x10],RSI
MOV qword ptr [RBP + -0x18],RDX
LEA RAX,[0x38e618]
MOV RAX,qword ptr [RAX]
MOV RAX,qword ptr [RAX + 0x40]
MOV EDI,dword ptr [RBP + -0x4]
MOV RSI,qword ptr [RBP + -0x10]
CALL RAX
MOV RCX,RAX
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RAX + 0x40],RCX
MOV RCX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RAX + 0x38],RCX
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RAX + 0x30],0x0
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RAX + 0x28],0x0
MOV RDI,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RBP + -0x18]
CALL 0x0013b490
ADD RSP,0x20
POP RBP
RET
|
void inline_mysql_mutex_init
(int4 param_1,pthread_mutex_t *param_2,pthread_mutexattr_t *param_3)
{
int8 uVar1;
uVar1 = (**(code **)(PSI_server + 0x40))(param_1,param_2);
*(int8 *)((long)param_2 + 0x40) = uVar1;
*(pthread_mutex_t **)((long)param_2 + 0x38) = param_2;
*(int8 *)((long)param_2 + 0x30) = 0;
param_2[1].__align = 0;
pthread_mutex_init(param_2,param_3);
return;
}
|
|
9,354 |
stbi__get8(stbi__context*)
|
monkey531[P]llama/examples/llava/../../common/stb_image.h
|
stbi_inline static stbi_uc stbi__get8(stbi__context *s)
{
if (s->img_buffer < s->img_buffer_end)
return *s->img_buffer++;
if (s->read_from_callbacks) {
stbi__refill_buffer(s);
return *s->img_buffer++;
}
return 0;
}
|
O0
|
c
|
stbi__get8(stbi__context*):
subq $0x18, %rsp
movq %rdi, 0x8(%rsp)
movq 0x8(%rsp), %rax
movq 0xc0(%rax), %rax
movq 0x8(%rsp), %rcx
cmpq 0xc8(%rcx), %rax
jae 0x8ed05
movq 0x8(%rsp), %rcx
movq 0xc0(%rcx), %rax
movq %rax, %rdx
addq $0x1, %rdx
movq %rdx, 0xc0(%rcx)
movb (%rax), %al
movb %al, 0x17(%rsp)
jmp 0x8ed41
movq 0x8(%rsp), %rax
cmpl $0x0, 0x30(%rax)
je 0x8ed3c
movq 0x8(%rsp), %rdi
callq 0x8ed50
movq 0x8(%rsp), %rcx
movq 0xc0(%rcx), %rax
movq %rax, %rdx
addq $0x1, %rdx
movq %rdx, 0xc0(%rcx)
movb (%rax), %al
movb %al, 0x17(%rsp)
jmp 0x8ed41
movb $0x0, 0x17(%rsp)
movb 0x17(%rsp), %al
addq $0x18, %rsp
retq
nopw (%rax,%rax)
|
_ZL10stbi__get8P13stbi__context:
sub rsp, 18h
mov [rsp+18h+var_10], rdi
mov rax, [rsp+18h+var_10]
mov rax, [rax+0C0h]
mov rcx, [rsp+18h+var_10]
cmp rax, [rcx+0C8h]
jnb short loc_8ED05
mov rcx, [rsp+18h+var_10]
mov rax, [rcx+0C0h]
mov rdx, rax
add rdx, 1
mov [rcx+0C0h], rdx
mov al, [rax]
mov [rsp+18h+var_1], al
jmp short loc_8ED41
loc_8ED05:
mov rax, [rsp+18h+var_10]
cmp dword ptr [rax+30h], 0
jz short loc_8ED3C
mov rdi, [rsp+18h+var_10]
call _ZL19stbi__refill_bufferP13stbi__context; stbi__refill_buffer(stbi__context *)
mov rcx, [rsp+18h+var_10]
mov rax, [rcx+0C0h]
mov rdx, rax
add rdx, 1
mov [rcx+0C0h], rdx
mov al, [rax]
mov [rsp+18h+var_1], al
jmp short loc_8ED41
loc_8ED3C:
mov [rsp+18h+var_1], 0
loc_8ED41:
mov al, [rsp+18h+var_1]
add rsp, 18h
retn
|
char stbi__get8(long long a1)
{
long long v1; // rax
long long v2; // rax
if ( *(_QWORD *)(a1 + 192) >= *(_QWORD *)(a1 + 200) )
{
if ( *(_DWORD *)(a1 + 48) )
{
stbi__refill_buffer(a1);
v2 = *(_QWORD *)(a1 + 192);
*(_QWORD *)(a1 + 192) = v2 + 1;
return *(_BYTE *)v2;
}
else
{
return 0;
}
}
else
{
v1 = *(_QWORD *)(a1 + 192);
*(_QWORD *)(a1 + 192) = v1 + 1;
return *(_BYTE *)v1;
}
}
|
stbi__get8:
SUB RSP,0x18
MOV qword ptr [RSP + 0x8],RDI
MOV RAX,qword ptr [RSP + 0x8]
MOV RAX,qword ptr [RAX + 0xc0]
MOV RCX,qword ptr [RSP + 0x8]
CMP RAX,qword ptr [RCX + 0xc8]
JNC 0x0018ed05
MOV RCX,qword ptr [RSP + 0x8]
MOV RAX,qword ptr [RCX + 0xc0]
MOV RDX,RAX
ADD RDX,0x1
MOV qword ptr [RCX + 0xc0],RDX
MOV AL,byte ptr [RAX]
MOV byte ptr [RSP + 0x17],AL
JMP 0x0018ed41
LAB_0018ed05:
MOV RAX,qword ptr [RSP + 0x8]
CMP dword ptr [RAX + 0x30],0x0
JZ 0x0018ed3c
MOV RDI,qword ptr [RSP + 0x8]
CALL 0x0018ed50
MOV RCX,qword ptr [RSP + 0x8]
MOV RAX,qword ptr [RCX + 0xc0]
MOV RDX,RAX
ADD RDX,0x1
MOV qword ptr [RCX + 0xc0],RDX
MOV AL,byte ptr [RAX]
MOV byte ptr [RSP + 0x17],AL
JMP 0x0018ed41
LAB_0018ed3c:
MOV byte ptr [RSP + 0x17],0x0
LAB_0018ed41:
MOV AL,byte ptr [RSP + 0x17]
ADD RSP,0x18
RET
|
/* stbi__get8(stbi__context*) */
int1 stbi__get8(stbi__context *param_1)
{
int1 *puVar1;
int1 local_1;
if (*(ulong *)(param_1 + 0xc0) < *(ulong *)(param_1 + 200)) {
puVar1 = *(int1 **)(param_1 + 0xc0);
*(int1 **)(param_1 + 0xc0) = puVar1 + 1;
local_1 = *puVar1;
}
else if (*(int *)(param_1 + 0x30) == 0) {
local_1 = 0;
}
else {
stbi__refill_buffer(param_1);
puVar1 = *(int1 **)(param_1 + 0xc0);
*(int1 **)(param_1 + 0xc0) = puVar1 + 1;
local_1 = *puVar1;
}
return local_1;
}
|
|
9,355 |
nglog::LogMessage::SendToSyslogAndLog()
|
ng-log[P]ng-log/src/logging.cc
|
void LogMessage::SendToSyslogAndLog() {
#ifdef HAVE_SYSLOG_H
// Before any calls to syslog(), make a single call to openlog()
static bool openlog_already_called = false;
if (!openlog_already_called) {
openlog(tools::ProgramInvocationShortName(),
LOG_CONS | LOG_NDELAY | LOG_PID, LOG_USER);
openlog_already_called = true;
}
// This array maps Google severity levels to syslog levels
const int SEVERITY_TO_LEVEL[] = {LOG_INFO, LOG_WARNING, LOG_ERR, LOG_EMERG};
syslog(LOG_USER | SEVERITY_TO_LEVEL[static_cast<int>(data_->severity_)],
"%.*s", static_cast<int>(data_->num_chars_to_syslog_),
data_->message_text_ + data_->num_prefix_chars_);
SendToLog();
#else
LOG(ERROR) << "No syslog support: message=" << data_->message_text_;
#endif
}
|
O1
|
cpp
|
nglog::LogMessage::SendToSyslogAndLog():
pushq %rbx
movq %rdi, %rbx
cmpb $0x0, 0x34be4(%rip) # 0x4a089
jne 0x154c5
callq 0x2b7bf
movq %rax, %rdi
movl $0xb, %esi
movl $0x8, %edx
callq 0x117d0
movb $0x1, 0x34bc4(%rip) # 0x4a089
movq 0x8(%rbx), %rax
movslq 0x7698(%rax), %rcx
leaq 0x190d9(%rip), %rdx # 0x2e5b0
movl (%rdx,%rcx,4), %edi
orl $0x8, %edi
movl 0x76c8(%rax), %edx
movq 0x76b8(%rax), %rcx
addq %rax, %rcx
addq $0x4, %rcx
leaq 0x18100(%rip), %rsi # 0x2d5f8
xorl %eax, %eax
callq 0x110e0
movq %rbx, %rdi
popq %rbx
jmp 0x123b8
|
_ZN5nglog10LogMessage18SendToSyslogAndLogEv:
push rbx
mov rbx, rdi
cmp cs:_ZZN5nglog10LogMessage18SendToSyslogAndLogEvE22openlog_already_called, 0; nglog::LogMessage::SendToSyslogAndLog(void)::openlog_already_called
jnz short loc_154C5
call _ZN5nglog5tools26ProgramInvocationShortNameEv; nglog::tools::ProgramInvocationShortName(void)
mov rdi, rax
mov esi, 0Bh
mov edx, 8
call _openlog
mov cs:_ZZN5nglog10LogMessage18SendToSyslogAndLogEvE22openlog_already_called, 1; nglog::LogMessage::SendToSyslogAndLog(void)::openlog_already_called
loc_154C5:
mov rax, [rbx+8]
movsxd rcx, dword ptr [rax+7698h]
lea rdx, unk_2E5B0
mov edi, [rdx+rcx*4]
or edi, 8
mov edx, [rax+76C8h]
mov rcx, [rax+76B8h]
add rcx, rax
add rcx, 4
lea rsi, aS; "%.*s"
xor eax, eax
call _syslog
mov rdi, rbx; this
pop rbx
jmp j__ZN5nglog10LogMessage9SendToLogEv; nglog::LogMessage::SendToLog(void)
|
long long nglog::LogMessage::SendToSyslogAndLog(nglog::LogMessage *this)
{
long long v1; // rax
if ( !nglog::LogMessage::SendToSyslogAndLog(void)::openlog_already_called )
{
v1 = nglog::tools::ProgramInvocationShortName(this);
openlog(v1, 11LL, 8LL);
nglog::LogMessage::SendToSyslogAndLog(void)::openlog_already_called = 1;
}
syslog(
dword_2E5B0[*(int *)(*((_QWORD *)this + 1) + 30360LL)] | 8u,
"%.*s",
*(_DWORD *)(*((_QWORD *)this + 1) + 30408LL),
(const char *)(*((_QWORD *)this + 1) + *(_QWORD *)(*((_QWORD *)this + 1) + 30392LL) + 4LL));
return nglog::LogMessage::SendToLog(this);
}
|
SendToSyslogAndLog:
PUSH RBX
MOV RBX,RDI
CMP byte ptr [0x0014a089],0x0
JNZ 0x001154c5
CALL 0x0012b7bf
MOV RDI,RAX
MOV ESI,0xb
MOV EDX,0x8
CALL 0x001117d0
MOV byte ptr [0x0014a089],0x1
LAB_001154c5:
MOV RAX,qword ptr [RBX + 0x8]
MOVSXD RCX,dword ptr [RAX + 0x7698]
LEA RDX,[0x12e5b0]
MOV EDI,dword ptr [RDX + RCX*0x4]
OR EDI,0x8
MOV EDX,dword ptr [RAX + 0x76c8]
MOV RCX,qword ptr [RAX + 0x76b8]
ADD RCX,RAX
ADD RCX,0x4
LEA RSI,[0x12d5f8]
XOR EAX,EAX
CALL 0x001110e0
MOV RDI,RBX
POP RBX
JMP 0x001123b8
|
/* nglog::LogMessage::SendToSyslogAndLog() */
void __thiscall nglog::LogMessage::SendToSyslogAndLog(LogMessage *this)
{
long lVar1;
char *__ident;
if (SendToSyslogAndLog()::openlog_already_called == '\0') {
__ident = (char *)tools::ProgramInvocationShortName();
openlog(__ident,0xb,8);
SendToSyslogAndLog()::openlog_already_called = '\x01';
}
lVar1 = *(long *)(this + 8);
syslog(*(uint *)(&DAT_0012e5b0 + (long)*(int *)(lVar1 + 0x7698) * 4) | 8,"%.*s",
(ulong)*(uint *)(lVar1 + 0x76c8),*(long *)(lVar1 + 0x76b8) + lVar1 + 4);
SendToLog(this);
return;
}
|
|
9,356 |
nglog::LogMessage::SendToSyslogAndLog()
|
ng-log[P]ng-log/src/logging.cc
|
void LogMessage::SendToSyslogAndLog() {
#ifdef HAVE_SYSLOG_H
// Before any calls to syslog(), make a single call to openlog()
static bool openlog_already_called = false;
if (!openlog_already_called) {
openlog(tools::ProgramInvocationShortName(),
LOG_CONS | LOG_NDELAY | LOG_PID, LOG_USER);
openlog_already_called = true;
}
// This array maps Google severity levels to syslog levels
const int SEVERITY_TO_LEVEL[] = {LOG_INFO, LOG_WARNING, LOG_ERR, LOG_EMERG};
syslog(LOG_USER | SEVERITY_TO_LEVEL[static_cast<int>(data_->severity_)],
"%.*s", static_cast<int>(data_->num_chars_to_syslog_),
data_->message_text_ + data_->num_prefix_chars_);
SendToLog();
#else
LOG(ERROR) << "No syslog support: message=" << data_->message_text_;
#endif
}
|
O2
|
cpp
|
nglog::LogMessage::SendToSyslogAndLog():
pushq %rbx
movq %rdi, %rbx
cmpb $0x0, 0x335c0(%rip) # 0x4b2f9
jne 0x17d55
callq 0x2a285
pushq $0xb
popq %rsi
pushq $0x8
popq %rdx
movq %rax, %rdi
callq 0x14a30
movb $0x1, 0x335a4(%rip) # 0x4b2f9
movq 0x8(%rbx), %rax
movslq 0x7698(%rax), %rcx
leaq 0x14839(%rip), %rdx # 0x2c5a0
movl (%rdx,%rcx,4), %edi
orl $0x8, %edi
movl 0x76c8(%rax), %edx
movq 0x76b8(%rax), %rcx
addq %rax, %rcx
addq $0x4, %rcx
leaq 0x13858(%rip), %rsi # 0x2b5e0
xorl %eax, %eax
callq 0x140e0
movq %rbx, %rdi
popq %rbx
jmp 0x158a0
|
_ZN5nglog10LogMessage18SendToSyslogAndLogEv:
push rbx
mov rbx, rdi
cmp cs:_ZZN5nglog10LogMessage18SendToSyslogAndLogEvE22openlog_already_called, 0; nglog::LogMessage::SendToSyslogAndLog(void)::openlog_already_called
jnz short loc_17D55
call _ZN5nglog5tools26ProgramInvocationShortNameEv; nglog::tools::ProgramInvocationShortName(void)
push 0Bh
pop rsi
push 8
pop rdx
mov rdi, rax
call _openlog
mov cs:_ZZN5nglog10LogMessage18SendToSyslogAndLogEvE22openlog_already_called, 1; nglog::LogMessage::SendToSyslogAndLog(void)::openlog_already_called
loc_17D55:
mov rax, [rbx+8]
movsxd rcx, dword ptr [rax+7698h]
lea rdx, unk_2C5A0
mov edi, [rdx+rcx*4]
or edi, 8
mov edx, [rax+76C8h]
mov rcx, [rax+76B8h]
add rcx, rax
add rcx, 4
lea rsi, aS; "%.*s"
xor eax, eax
call _syslog
mov rdi, rbx; this
pop rbx
jmp j__ZN5nglog10LogMessage9SendToLogEv; nglog::LogMessage::SendToLog(void)
|
long long nglog::LogMessage::SendToSyslogAndLog(nglog::LogMessage *this)
{
long long v1; // rax
if ( !nglog::LogMessage::SendToSyslogAndLog(void)::openlog_already_called )
{
v1 = nglog::tools::ProgramInvocationShortName(this);
openlog(v1, 11LL, 8LL);
nglog::LogMessage::SendToSyslogAndLog(void)::openlog_already_called = 1;
}
syslog(
dword_2C5A0[*(int *)(*((_QWORD *)this + 1) + 30360LL)] | 8u,
"%.*s",
*(_DWORD *)(*((_QWORD *)this + 1) + 30408LL),
(const char *)(*((_QWORD *)this + 1) + *(_QWORD *)(*((_QWORD *)this + 1) + 30392LL) + 4LL));
return nglog::LogMessage::SendToLog(this);
}
|
SendToSyslogAndLog:
PUSH RBX
MOV RBX,RDI
CMP byte ptr [0x0014b2f9],0x0
JNZ 0x00117d55
CALL 0x0012a285
PUSH 0xb
POP RSI
PUSH 0x8
POP RDX
MOV RDI,RAX
CALL 0x00114a30
MOV byte ptr [0x0014b2f9],0x1
LAB_00117d55:
MOV RAX,qword ptr [RBX + 0x8]
MOVSXD RCX,dword ptr [RAX + 0x7698]
LEA RDX,[0x12c5a0]
MOV EDI,dword ptr [RDX + RCX*0x4]
OR EDI,0x8
MOV EDX,dword ptr [RAX + 0x76c8]
MOV RCX,qword ptr [RAX + 0x76b8]
ADD RCX,RAX
ADD RCX,0x4
LEA RSI,[0x12b5e0]
XOR EAX,EAX
CALL 0x001140e0
MOV RDI,RBX
POP RBX
JMP 0x001158a0
|
/* nglog::LogMessage::SendToSyslogAndLog() */
void __thiscall nglog::LogMessage::SendToSyslogAndLog(LogMessage *this)
{
long lVar1;
char *__ident;
if (SendToSyslogAndLog()::openlog_already_called == '\0') {
__ident = (char *)tools::ProgramInvocationShortName();
openlog(__ident,0xb,8);
SendToSyslogAndLog()::openlog_already_called = '\x01';
}
lVar1 = *(long *)(this + 8);
syslog(*(uint *)(&DAT_0012c5a0 + (long)*(int *)(lVar1 + 0x7698) * 4) | 8,"%.*s",
(ulong)*(uint *)(lVar1 + 0x76c8),*(long *)(lVar1 + 0x76b8) + lVar1 + 4);
SendToLog(this);
return;
}
|
|
9,357 |
my_hash_free
|
eloqsql/mysys/hash.c
|
void my_hash_free(HASH *hash)
{
DBUG_ENTER("my_hash_free");
DBUG_PRINT("enter",("hash:%p elements: %ld",
hash, hash->records));
my_hash_free_elements(hash);
hash->free= 0;
delete_dynamic(&hash->array);
hash->blength= 0;
DBUG_VOID_RETURN;
}
|
O0
|
c
|
my_hash_free:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
jmp 0xdd55e
movq -0x8(%rbp), %rdi
callq 0xdd5a0
movq -0x8(%rbp), %rax
movq $0x0, 0x60(%rax)
movq -0x8(%rbp), %rdi
addq $0x28, %rdi
callq 0xda3d0
movq -0x8(%rbp), %rax
movq $0x0, 0x10(%rax)
jmp 0xdd58e
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
|
my_hash_free:
push rbp
mov rbp, rsp
sub rsp, 10h
mov [rbp+var_8], rdi
jmp short $+2
loc_DD55E:
mov rdi, [rbp+var_8]
call my_hash_free_elements
mov rax, [rbp+var_8]
mov qword ptr [rax+60h], 0
mov rdi, [rbp+var_8]
add rdi, 28h ; '('
call delete_dynamic
mov rax, [rbp+var_8]
mov qword ptr [rax+10h], 0
jmp short $+2
loc_DD58E:
add rsp, 10h
pop rbp
retn
|
long long my_hash_free(long long a1)
{
double v1; // xmm0_8
long long result; // rax
v1 = my_hash_free_elements(a1);
*(_QWORD *)(a1 + 96) = 0LL;
delete_dynamic(a1 + 40, v1);
result = a1;
*(_QWORD *)(a1 + 16) = 0LL;
return result;
}
|
my_hash_free:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x10
MOV qword ptr [RBP + -0x8],RDI
JMP 0x001dd55e
LAB_001dd55e:
MOV RDI,qword ptr [RBP + -0x8]
CALL 0x001dd5a0
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RAX + 0x60],0x0
MOV RDI,qword ptr [RBP + -0x8]
ADD RDI,0x28
CALL 0x001da3d0
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RAX + 0x10],0x0
JMP 0x001dd58e
LAB_001dd58e:
ADD RSP,0x10
POP RBP
RET
|
void my_hash_free(long param_1)
{
my_hash_free_elements(param_1);
*(int8 *)(param_1 + 0x60) = 0;
delete_dynamic(param_1 + 0x28);
*(int8 *)(param_1 + 0x10) = 0;
return;
}
|
|
9,358 |
LefDefParser::defiNonDefault::layerSpacingVal(int) const
|
Efficient-TDP/thirdparty/Limbo/limbo/thirdparty/lefdef/5.8/def/def/defiNonDefault.cpp
|
int defiNonDefault::layerSpacingVal(int index) const {
char msg[160];
if (index < 0 || index >= numLayers_) {
sprintf (msg, "ERROR (DEFPARS-6090): The index number %d specified for the NONDEFAULT LAYER is invalid.\nValid index is from 0 to %d. Specify a valid index number and then try again.",
index, numLayers_);
defiError(0, 6090, msg, defData);
return 0;
}
return (int)spacing_[index];
}
|
O0
|
cpp
|
LefDefParser::defiNonDefault::layerSpacingVal(int) const:
subq $0xc8, %rsp
movq %rdi, 0xb8(%rsp)
movl %esi, 0xb4(%rsp)
movq 0xb8(%rsp), %rax
movq %rax, 0x8(%rsp)
cmpl $0x0, 0xb4(%rsp)
jl 0x4544e
movq 0x8(%rsp), %rcx
movl 0xb4(%rsp), %eax
cmpl 0xc(%rcx), %eax
jl 0x4549a
movq 0x8(%rsp), %rax
leaq 0x10(%rsp), %rdi
movl 0xb4(%rsp), %edx
movl 0xc(%rax), %ecx
leaq 0x2d101(%rip), %rsi # 0x7256a
movb $0x0, %al
callq 0x7060
movq 0x8(%rsp), %rax
leaq 0x10(%rsp), %rdx
movq 0xb8(%rax), %rcx
xorl %edi, %edi
movl $0x17ca, %esi # imm = 0x17CA
callq 0x277e0
movl $0x0, 0xc4(%rsp)
jmp 0x454b7
movq 0x8(%rsp), %rax
movq 0x40(%rax), %rax
movslq 0xb4(%rsp), %rcx
cvttsd2si (%rax,%rcx,8), %eax
movl %eax, 0xc4(%rsp)
movl 0xc4(%rsp), %eax
addq $0xc8, %rsp
retq
nopw %cs:(%rax,%rax)
|
_ZNK12LefDefParser14defiNonDefault15layerSpacingValEi:
sub rsp, 0C8h
mov [rsp+0C8h+var_10], rdi
mov [rsp+0C8h+var_14], esi
mov rax, [rsp+0C8h+var_10]
mov [rsp+0C8h+var_C0], rax
cmp [rsp+0C8h+var_14], 0
jl short loc_4544E
mov rcx, [rsp+0C8h+var_C0]
mov eax, [rsp+0C8h+var_14]
cmp eax, [rcx+0Ch]
jl short loc_4549A
loc_4544E:
mov rax, [rsp+0C8h+var_C0]
lea rdi, [rsp+0C8h+var_B8]
mov edx, [rsp+0C8h+var_14]
mov ecx, [rax+0Ch]
lea rsi, aErrorDefpars60_8; "ERROR (DEFPARS-6090): The index number "...
mov al, 0
call _sprintf
mov rax, [rsp+0C8h+var_C0]
lea rdx, [rsp+0C8h+var_B8]; int
mov rcx, [rax+0B8h]; char *
xor edi, edi; this
mov esi, 17CAh; int
call _ZN12LefDefParser9defiErrorEiiPKcPNS_8defrDataE; LefDefParser::defiError(int,int,char const*,LefDefParser::defrData *)
mov [rsp+0C8h+var_4], 0
jmp short loc_454B7
loc_4549A:
mov rax, [rsp+0C8h+var_C0]
mov rax, [rax+40h]
movsxd rcx, [rsp+0C8h+var_14]
cvttsd2si eax, qword ptr [rax+rcx*8]
mov [rsp+0C8h+var_4], eax
loc_454B7:
mov eax, [rsp+0C8h+var_4]
add rsp, 0C8h
retn
|
long long LefDefParser::defiNonDefault::layerSpacingVal(LefDefParser::defrData **this, int a2)
{
LefDefParser::defrData *v2; // r8
char v4[164]; // [rsp+10h] [rbp-B8h] BYREF
int v5; // [rsp+B4h] [rbp-14h]
LefDefParser::defiNonDefault *v6; // [rsp+B8h] [rbp-10h]
v6 = (LefDefParser::defiNonDefault *)this;
v5 = a2;
if ( a2 >= 0 && v5 < *((_DWORD *)this + 3) )
{
return (unsigned int)(int)*((double *)this[8] + v5);
}
else
{
sprintf(
v4,
"ERROR (DEFPARS-6090): The index number %d specified for the NONDEFAULT LAYER is invalid.\n"
"Valid index is from 0 to %d. Specify a valid index number and then try again.",
v5,
*((_DWORD *)this + 3));
LefDefParser::defiError(0LL, 6090, v4, this[23], v2);
return 0;
}
}
|
layerSpacingVal:
SUB RSP,0xc8
MOV qword ptr [RSP + 0xb8],RDI
MOV dword ptr [RSP + 0xb4],ESI
MOV RAX,qword ptr [RSP + 0xb8]
MOV qword ptr [RSP + 0x8],RAX
CMP dword ptr [RSP + 0xb4],0x0
JL 0x0014544e
MOV RCX,qword ptr [RSP + 0x8]
MOV EAX,dword ptr [RSP + 0xb4]
CMP EAX,dword ptr [RCX + 0xc]
JL 0x0014549a
LAB_0014544e:
MOV RAX,qword ptr [RSP + 0x8]
LEA RDI,[RSP + 0x10]
MOV EDX,dword ptr [RSP + 0xb4]
MOV ECX,dword ptr [RAX + 0xc]
LEA RSI,[0x17256a]
MOV AL,0x0
CALL 0x00107060
MOV RAX,qword ptr [RSP + 0x8]
LEA RDX,[RSP + 0x10]
MOV RCX,qword ptr [RAX + 0xb8]
XOR EDI,EDI
MOV ESI,0x17ca
CALL 0x001277e0
MOV dword ptr [RSP + 0xc4],0x0
JMP 0x001454b7
LAB_0014549a:
MOV RAX,qword ptr [RSP + 0x8]
MOV RAX,qword ptr [RAX + 0x40]
MOVSXD RCX,dword ptr [RSP + 0xb4]
CVTTSD2SI EAX,qword ptr [RAX + RCX*0x8]
MOV dword ptr [RSP + 0xc4],EAX
LAB_001454b7:
MOV EAX,dword ptr [RSP + 0xc4]
ADD RSP,0xc8
RET
|
/* LefDefParser::defiNonDefault::layerSpacingVal(int) const */
int __thiscall LefDefParser::defiNonDefault::layerSpacingVal(defiNonDefault *this,int param_1)
{
char local_b8 [164];
int local_14;
defiNonDefault *local_10;
int local_4;
if ((param_1 < 0) || (*(int *)(this + 0xc) <= param_1)) {
local_14 = param_1;
local_10 = this;
sprintf(local_b8,
"ERROR (DEFPARS-6090): The index number %d specified for the NONDEFAULT LAYER is invalid.\nValid index is from 0 to %d. Specify a valid index number and then try again."
,(ulong)(uint)param_1,(ulong)*(uint *)(this + 0xc));
defiError(0,0x17ca,local_b8,*(defrData **)(this + 0xb8));
local_4 = 0;
}
else {
local_4 = (int)*(double *)(*(long *)(this + 0x40) + (long)param_1 * 8);
}
return local_4;
}
|
|
9,359 |
LefDefParser::defiNonDefault::layerSpacingVal(int) const
|
Efficient-TDP/thirdparty/Limbo/limbo/thirdparty/lefdef/5.8/def/def/defiNonDefault.cpp
|
int defiNonDefault::layerSpacingVal(int index) const {
char msg[160];
if (index < 0 || index >= numLayers_) {
sprintf (msg, "ERROR (DEFPARS-6090): The index number %d specified for the NONDEFAULT LAYER is invalid.\nValid index is from 0 to %d. Specify a valid index number and then try again.",
index, numLayers_);
defiError(0, 6090, msg, defData);
return 0;
}
return (int)spacing_[index];
}
|
O3
|
cpp
|
LefDefParser::defiNonDefault::layerSpacingVal(int) const:
pushq %rbp
pushq %r14
pushq %rbx
subq $0xa0, %rsp
movl %esi, %edx
movq %rdi, %rbx
testl %esi, %esi
setns %al
movl 0xc(%rdi), %ecx
cmpl %esi, %ecx
setg %sil
testb %sil, %al
je 0x29266
movq 0x40(%rbx), %rax
movl %edx, %ecx
cvttsd2si (%rax,%rcx,8), %ebp
jmp 0x29292
leaq 0x1a37e(%rip), %rsi # 0x435eb
xorl %ebp, %ebp
movq %rsp, %r14
movq %r14, %rdi
xorl %eax, %eax
callq 0x6060
movq 0xb8(%rbx), %rcx
xorl %edi, %edi
movl $0x17ca, %esi # imm = 0x17CA
movq %r14, %rdx
callq 0x18f80
movl %ebp, %eax
addq $0xa0, %rsp
popq %rbx
popq %r14
popq %rbp
retq
|
_ZNK12LefDefParser14defiNonDefault15layerSpacingValEi:
push rbp
push r14
push rbx
sub rsp, 0A0h
mov edx, esi
mov rbx, rdi
test esi, esi
setns al
mov ecx, [rdi+0Ch]
cmp ecx, esi
setnle sil
test al, sil
jz short loc_29266
mov rax, [rbx+40h]
mov ecx, edx
cvttsd2si ebp, qword ptr [rax+rcx*8]
jmp short loc_29292
loc_29266:
lea rsi, aErrorDefpars60_8; "ERROR (DEFPARS-6090): The index number "...
xor ebp, ebp
mov r14, rsp
mov rdi, r14
xor eax, eax
call _sprintf
mov rcx, [rbx+0B8h]; LefDefParser::defrData *
xor edi, edi; this
mov esi, 17CAh; int
mov rdx, r14; char *
call _ZN12LefDefParser9defiErrorEiiPKcPNS_8defrDataE; LefDefParser::defiError(int,int,char const*,LefDefParser::defrData *)
loc_29292:
mov eax, ebp
add rsp, 0A0h
pop rbx
pop r14
pop rbp
retn
|
long long LefDefParser::defiNonDefault::layerSpacingVal(LefDefParser::defiNonDefault *this, signed int a2)
{
int v2; // ecx
unsigned int v3; // ebp
LefDefParser::defrData *v4; // r8
char v6[184]; // [rsp+0h] [rbp-B8h] BYREF
v2 = *((_DWORD *)this + 3);
if ( v2 > a2 && a2 >= 0 )
{
return (unsigned int)(int)*(double *)(*((_QWORD *)this + 8) + 8LL * (unsigned int)a2);
}
else
{
v3 = 0;
sprintf(
v6,
"ERROR (DEFPARS-6090): The index number %d specified for the NONDEFAULT LAYER is invalid.\n"
"Valid index is from 0 to %d. Specify a valid index number and then try again.",
a2,
v2);
LefDefParser::defiError(0LL, 6090, v6, *((LefDefParser::defrData **)this + 23), v4);
}
return v3;
}
|
layerSpacingVal:
PUSH RBP
PUSH R14
PUSH RBX
SUB RSP,0xa0
MOV EDX,ESI
MOV RBX,RDI
TEST ESI,ESI
SETNS AL
MOV ECX,dword ptr [RDI + 0xc]
CMP ECX,ESI
SETG SIL
TEST AL,SIL
JZ 0x00129266
MOV RAX,qword ptr [RBX + 0x40]
MOV ECX,EDX
CVTTSD2SI EBP,qword ptr [RAX + RCX*0x8]
JMP 0x00129292
LAB_00129266:
LEA RSI,[0x1435eb]
XOR EBP,EBP
MOV R14,RSP
MOV RDI,R14
XOR EAX,EAX
CALL 0x00106060
MOV RCX,qword ptr [RBX + 0xb8]
XOR EDI,EDI
MOV ESI,0x17ca
MOV RDX,R14
CALL 0x00118f80
LAB_00129292:
MOV EAX,EBP
ADD RSP,0xa0
POP RBX
POP R14
POP RBP
RET
|
/* LefDefParser::defiNonDefault::layerSpacingVal(int) const */
int __thiscall LefDefParser::defiNonDefault::layerSpacingVal(defiNonDefault *this,int param_1)
{
int iVar1;
char acStack_b8 [160];
if (param_1 < 0 || *(int *)(this + 0xc) <= param_1) {
iVar1 = 0;
sprintf(acStack_b8,
"ERROR (DEFPARS-6090): The index number %d specified for the NONDEFAULT LAYER is invalid.\nValid index is from 0 to %d. Specify a valid index number and then try again."
);
defiError(0,0x17ca,acStack_b8,*(defrData **)(this + 0xb8));
}
else {
iVar1 = (int)*(double *)(*(long *)(this + 0x40) + (ulong)(uint)param_1 * 8);
}
return iVar1;
}
|
|
9,360 |
test_conc443
|
eloqsql/libmariadb/unittest/libmariadb/connection.c
|
static int test_conc443(MYSQL *my __attribute__((unused)))
{
my_bool x= 1;
unsigned long thread_id= 0;
char query[128];
MYSQL_RES *result;
MYSQL_ROW row;
int rc;
MYSQL *mysql= mysql_init(NULL);
SKIP_MAXSCALE;
mysql_options(mysql, MYSQL_INIT_COMMAND, "set @a:=3");
mysql_options(mysql, MYSQL_OPT_RECONNECT, &x);
if (!my_test_connect(mysql, hostname, username, password, schema, port, socketname, CLIENT_REMEMBER_OPTIONS))
{
diag("Connection failed. Error: %s", mysql_error(mysql));
mysql_close(mysql);
}
thread_id= mysql_thread_id(mysql);
sprintf(query, "KILL %lu", thread_id);
rc= mysql_query(mysql, query);
sleep(3);
rc= mysql_ping(mysql);
check_mysql_rc(rc, mysql);
rc= mysql_query(mysql, "SELECT @a");
check_mysql_rc(rc, mysql);
FAIL_IF(mysql_thread_id(mysql) == thread_id, "Expected different thread id");
result= mysql_store_result(mysql);
if (!result)
return FAIL;
row= mysql_fetch_row(result);
FAIL_IF(strcmp(row[0],"3"), "Wrong result");
mysql_free_result(result);
mysql_close(mysql);
return OK;
}
|
O3
|
c
|
test_conc443:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0xa0, %rsp
movq %fs:0x28, %rax
movq %rax, -0x28(%rbp)
movb $0x1, -0xb1(%rbp)
xorl %edi, %edi
callq 0x1efb5
movq %rax, %rbx
movq 0x3b939(%rip), %rdi # 0x52500
testq %rdi, %rdi
je 0x16be9
callq 0x22aa2
leaq 0x2499d(%rip), %rsi # 0x3b575
movq %rax, %rdi
callq 0x13100
testq %rax, %rax
jne 0x16d3f
leaq 0x24852(%rip), %rdi # 0x3b442
callq 0x135c0
testq %rax, %rax
je 0x16c2b
movq %rax, %r14
leaq 0x24997(%rip), %rsi # 0x3b59b
movq %rax, %rdi
callq 0x13670
testl %eax, %eax
je 0x16d3f
leaq 0x24963(%rip), %rsi # 0x3b57e
movq %r14, %rdi
callq 0x13670
testl %eax, %eax
je 0x16d3f
leaq 0x2547a(%rip), %rdx # 0x3c0ac
movq %rbx, %rdi
movl $0x3, %esi
callq 0x23221
leaq -0xb1(%rbp), %rdx
movq %rbx, %rdi
movl $0x14, %esi
callq 0x23221
movq 0x3b9e6(%rip), %rsi # 0x52640
movq 0x3b9e7(%rip), %rdx # 0x52648
movq 0x3b9e8(%rip), %rcx # 0x52650
movq 0x3b9e9(%rip), %r8 # 0x52658
movl 0x3b9ea(%rip), %r9d # 0x52660
movl $0x80000000, %eax # imm = 0x80000000
movq %rbx, %rdi
pushq %rax
pushq 0x3b9e3(%rip) # 0x52668
callq 0x1422d
addq $0x10, %rsp
testq %rax, %rax
jne 0x16cb4
movq %rbx, %rdi
callq 0x23312
leaq 0x253d7(%rip), %rdi # 0x3c079
movq %rax, %rsi
xorl %eax, %eax
callq 0x1bb8f
movq %rbx, %rdi
callq 0x20d0c
movq %rbx, %rdi
callq 0x2334b
movq %rax, %r15
leaq 0x253f0(%rip), %rcx # 0x3c0b6
leaq -0xb0(%rbp), %r12
movl $0x1, %r14d
movl $0x80, %edx
movq %r12, %rdi
movl $0x1, %esi
movq %rax, %r8
xorl %eax, %eax
callq 0x132a0
movq %rbx, %rdi
movq %r12, %rsi
callq 0x21299
movl $0x3, %edi
callq 0x13320
movq %rbx, %rdi
callq 0x22a41
testl %eax, %eax
je 0x16d55
movl %eax, %r12d
movq %rbx, %rdi
callq 0x23312
movq %rax, %r15
movq %rbx, %rdi
callq 0x232fd
leaq 0x24425(%rip), %rdi # 0x3b14d
leaq 0x24886(%rip), %r8 # 0x3b5b5
movl %r12d, %esi
movq %r15, %rdx
movl %eax, %ecx
movl $0x716, %r9d # imm = 0x716
jmp 0x16d9a
leaq 0x24842(%rip), %rdi # 0x3b588
xorl %eax, %eax
callq 0x1bb8f
movl $0xffffffff, %r14d # imm = 0xFFFFFFFF
jmp 0x16da1
leaq 0x25363(%rip), %rsi # 0x3c0bf
movq %rbx, %rdi
callq 0x21299
testl %eax, %eax
je 0x16dc7
movl %eax, %r12d
movq %rbx, %rdi
callq 0x23312
movq %rax, %r15
movq %rbx, %rdi
callq 0x232fd
leaq 0x243c8(%rip), %rdi # 0x3b14d
leaq 0x24829(%rip), %r8 # 0x3b5b5
movl %r12d, %esi
movq %r15, %rdx
movl %eax, %ecx
movl $0x719, %r9d # imm = 0x719
xorl %eax, %eax
callq 0x1bb8f
movq %fs:0x28, %rax
cmpq -0x28(%rbp), %rax
jne 0x16e54
movl %r14d, %eax
addq $0xa0, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq %rbx, %rdi
callq 0x2334b
cmpq %r15, %rax
jne 0x16df0
leaq 0x2422d(%rip), %rdi # 0x3b008
leaq 0x252e7(%rip), %rsi # 0x3c0c9
leaq 0x247cc(%rip), %rdx # 0x3b5b5
movl $0x71b, %ecx # imm = 0x71B
jmp 0x16e30
movq %rbx, %rdi
callq 0x22191
testq %rax, %rax
je 0x16da1
movq %rax, %r15
movq %rax, %rdi
callq 0x22394
movq (%rax), %rax
cmpb $0x33, (%rax)
jne 0x16e16
cmpb $0x0, 0x1(%rax)
je 0x16e3c
leaq 0x241eb(%rip), %rdi # 0x3b008
leaq 0x252c2(%rip), %rsi # 0x3c0e6
leaq 0x2478a(%rip), %rdx # 0x3b5b5
movl $0x721, %ecx # imm = 0x721
xorl %eax, %eax
callq 0x1bb8f
jmp 0x16da1
movq %r15, %rdi
callq 0x1cf46
movq %rbx, %rdi
callq 0x20d0c
xorl %r14d, %r14d
jmp 0x16da1
callq 0x13530
|
test_conc443:
push rbp
mov rbp, rsp
push r15
push r14
push r12
push rbx
sub rsp, 0A0h
mov rax, fs:28h
mov [rbp+var_28], rax
mov [rbp+var_B1], 1
xor edi, edi
call mysql_init
mov rbx, rax
mov rdi, cs:mysql_default
test rdi, rdi
jz short loc_16BE9
call mysql_get_server_info
lea rsi, aMaxscale; "maxScale"
mov rdi, rax
call _strstr
test rax, rax
jnz loc_16D3F
loc_16BE9:
lea rdi, aSrv; "srv"
call _getenv
test rax, rax
jz short loc_16C2B
mov r14, rax
lea rsi, aTestDisabledWi+13h; "maxscale"
mov rdi, rax
call _strcmp
test eax, eax
jz loc_16D3F
lea rsi, aSkysqlHa; "skysql-ha"
mov rdi, r14
call _strcmp
test eax, eax
jz loc_16D3F
loc_16C2B:
lea rdx, aSetA3; "set @a:=3"
mov rdi, rbx
mov esi, 3
call mysql_options
lea rdx, [rbp+var_B1]
mov rdi, rbx
mov esi, 14h
call mysql_options
mov rsi, cs:hostname
mov rdx, cs:username
mov rcx, cs:password
mov r8, cs:schema
mov r9d, cs:port
mov eax, 80000000h
mov rdi, rbx
push rax
push cs:socketname
call my_test_connect
add rsp, 10h
test rax, rax
jnz short loc_16CB4
mov rdi, rbx
call mysql_error
lea rdi, aConnectionFail; "Connection failed. Error: %s"
mov rsi, rax
xor eax, eax
call diag
mov rdi, rbx
call mysql_close
loc_16CB4:
mov rdi, rbx
call mysql_thread_id
mov r15, rax
lea rcx, aKillLu; "KILL %lu"
lea r12, [rbp+var_B0]
mov r14d, 1
mov edx, 80h
mov rdi, r12
mov esi, 1
mov r8, rax
xor eax, eax
call ___sprintf_chk
mov rdi, rbx
mov rsi, r12
call mysql_query
mov edi, 3
call _sleep
mov rdi, rbx
call mysql_ping
test eax, eax
jz short loc_16D55
mov r12d, eax
mov rdi, rbx
call mysql_error
mov r15, rax
mov rdi, rbx
call mysql_errno
lea rdi, aErrorDSDInSLin; "Error (%d): %s (%d) in %s line %d"
lea r8, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/eloqsq"...
mov esi, r12d
mov rdx, r15
mov ecx, eax
mov r9d, 716h
jmp short loc_16D9A
loc_16D3F:
lea rdi, aTestDisabledWi; "test disabled with maxscale"
xor eax, eax
call diag
mov r14d, 0FFFFFFFFh
jmp short loc_16DA1
loc_16D55:
lea rsi, aSelectA; "SELECT @a"
mov rdi, rbx
call mysql_query
test eax, eax
jz short loc_16DC7
mov r12d, eax
mov rdi, rbx
call mysql_error
mov r15, rax
mov rdi, rbx
call mysql_errno
lea rdi, aErrorDSDInSLin; "Error (%d): %s (%d) in %s line %d"
lea r8, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/eloqsq"...
mov esi, r12d
mov rdx, r15
mov ecx, eax
mov r9d, 719h
loc_16D9A:
xor eax, eax
call diag
loc_16DA1:
mov rax, fs:28h
cmp rax, [rbp+var_28]
jnz loc_16E54
mov eax, r14d
add rsp, 0A0h
pop rbx
pop r12
pop r14
pop r15
pop rbp
retn
loc_16DC7:
mov rdi, rbx
call mysql_thread_id
cmp rax, r15
jnz short loc_16DF0
lea rdi, aErrorSSD; "Error: %s (%s: %d)"
lea rsi, aExpectedDiffer; "Expected different thread id"
lea rdx, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/eloqsq"...
mov ecx, 71Bh
jmp short loc_16E30
loc_16DF0:
mov rdi, rbx
call mysql_store_result
test rax, rax
jz short loc_16DA1
mov r15, rax
mov rdi, rax
call mysql_fetch_row
mov rax, [rax]
cmp byte ptr [rax], 33h ; '3'
jnz short loc_16E16
cmp byte ptr [rax+1], 0
jz short loc_16E3C
loc_16E16:
lea rdi, aErrorSSD; "Error: %s (%s: %d)"
lea rsi, aWrongResult; "Wrong result"
lea rdx, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/eloqsq"...
mov ecx, 721h
loc_16E30:
xor eax, eax
call diag
jmp loc_16DA1
loc_16E3C:
mov rdi, r15
call mysql_free_result
mov rdi, rbx
call mysql_close
xor r14d, r14d
jmp loc_16DA1
loc_16E54:
call ___stack_chk_fail
|
long long test_conc443()
{
long long v0; // rbx
long long server_info; // rax
char *v2; // rsi
int v3; // edx
int v4; // ecx
int v5; // r8d
int v6; // r9d
long long v7; // rax
long long v8; // r14
int v9; // eax
int v10; // edx
int v11; // ecx
int v12; // r8d
int v13; // r9d
long long v14; // r15
unsigned int v15; // r14d
int v16; // eax
int v17; // r12d
int v18; // r15d
int v19; // eax
const char *v20; // rdi
const char *v21; // r8
const char *v22; // rsi
const char *v23; // rdx
int v24; // ecx
int v25; // r9d
int v26; // eax
int v27; // r12d
int v28; // r15d
int v29; // eax
long long v31; // rax
long long v32; // r15
_BYTE *v33; // rax
char v34; // [rsp+Fh] [rbp-B1h] BYREF
char v35[136]; // [rsp+10h] [rbp-B0h] BYREF
unsigned long long v36; // [rsp+98h] [rbp-28h]
v36 = __readfsqword(0x28u);
v34 = 1;
v0 = mysql_init(0LL);
if ( mysql_default
&& (server_info = mysql_get_server_info(mysql_default), v2 = "maxScale", strstr(server_info, "maxScale"))
|| (v7 = getenv("srv")) != 0
&& ((v8 = v7, v2 = "maxscale", !(unsigned int)strcmp(v7, "maxscale"))
|| (v2 = "skysql-ha", !(unsigned int)strcmp(v8, "skysql-ha"))) )
{
diag((unsigned int)"test disabled with maxscale", (_DWORD)v2, v3, v4, v5, v6);
return (unsigned int)-1;
}
else
{
mysql_options(v0, 3LL, "set @a:=3");
mysql_options(v0, 20LL, &v34);
if ( !my_test_connect(v0, hostname, username, password, schema, port, socketname, 0x80000000LL) )
{
v9 = mysql_error(v0);
diag((unsigned int)"Connection failed. Error: %s", v9, v10, v11, v12, v13);
mysql_close(v0);
}
v14 = mysql_thread_id(v0);
v15 = 1;
__sprintf_chk(v35, 1LL, 128LL, "KILL %lu", v14);
mysql_query(v0, v35);
sleep(3LL);
v16 = mysql_ping(v0);
if ( v16 )
{
v17 = v16;
v18 = mysql_error(v0);
v19 = mysql_errno(v0);
v20 = "Error (%d): %s (%d) in %s line %d";
v21 = "/workspace/llm4binary/github2025/eloqsql/libmariadb/unittest/libmariadb/connection.c";
LODWORD(v22) = v17;
LODWORD(v23) = v18;
v24 = v19;
v25 = 1814;
}
else
{
v26 = mysql_query(v0, "SELECT @a");
if ( v26 )
{
v27 = v26;
v28 = mysql_error(v0);
v29 = mysql_errno(v0);
v20 = "Error (%d): %s (%d) in %s line %d";
v21 = "/workspace/llm4binary/github2025/eloqsql/libmariadb/unittest/libmariadb/connection.c";
LODWORD(v22) = v27;
LODWORD(v23) = v28;
v24 = v29;
v25 = 1817;
}
else if ( mysql_thread_id(v0) == v14 )
{
v20 = "Error: %s (%s: %d)";
v22 = "Expected different thread id";
v23 = "/workspace/llm4binary/github2025/eloqsql/libmariadb/unittest/libmariadb/connection.c";
v24 = 1819;
}
else
{
v31 = mysql_store_result(v0);
if ( !v31 )
return v15;
v32 = v31;
v33 = *(_BYTE **)mysql_fetch_row(v31);
if ( *v33 == 51 && !v33[1] )
{
mysql_free_result(v32);
mysql_close(v0);
return 0;
}
v20 = "Error: %s (%s: %d)";
v22 = "Wrong result";
v23 = "/workspace/llm4binary/github2025/eloqsql/libmariadb/unittest/libmariadb/connection.c";
v24 = 1825;
}
}
diag((_DWORD)v20, (_DWORD)v22, (_DWORD)v23, v24, (_DWORD)v21, v25);
}
return v15;
}
|
test_conc443:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
SUB RSP,0xa0
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x28],RAX
MOV byte ptr [RBP + -0xb1],0x1
XOR EDI,EDI
CALL 0x0011efb5
MOV RBX,RAX
MOV RDI,qword ptr [0x00152500]
TEST RDI,RDI
JZ 0x00116be9
CALL 0x00122aa2
LEA RSI,[0x13b575]
MOV RDI,RAX
CALL 0x00113100
TEST RAX,RAX
JNZ 0x00116d3f
LAB_00116be9:
LEA RDI,[0x13b442]
CALL 0x001135c0
TEST RAX,RAX
JZ 0x00116c2b
MOV R14,RAX
LEA RSI,[0x13b59b]
MOV RDI,RAX
CALL 0x00113670
TEST EAX,EAX
JZ 0x00116d3f
LEA RSI,[0x13b57e]
MOV RDI,R14
CALL 0x00113670
TEST EAX,EAX
JZ 0x00116d3f
LAB_00116c2b:
LEA RDX,[0x13c0ac]
MOV RDI,RBX
MOV ESI,0x3
CALL 0x00123221
LEA RDX,[RBP + -0xb1]
MOV RDI,RBX
MOV ESI,0x14
CALL 0x00123221
MOV RSI,qword ptr [0x00152640]
MOV RDX,qword ptr [0x00152648]
MOV RCX,qword ptr [0x00152650]
MOV R8,qword ptr [0x00152658]
MOV R9D,dword ptr [0x00152660]
MOV EAX,0x80000000
MOV RDI,RBX
PUSH RAX
PUSH qword ptr [0x00152668]
CALL 0x0011422d
ADD RSP,0x10
TEST RAX,RAX
JNZ 0x00116cb4
MOV RDI,RBX
CALL 0x00123312
LEA RDI,[0x13c079]
MOV RSI,RAX
XOR EAX,EAX
CALL 0x0011bb8f
MOV RDI,RBX
CALL 0x00120d0c
LAB_00116cb4:
MOV RDI,RBX
CALL 0x0012334b
MOV R15,RAX
LEA RCX,[0x13c0b6]
LEA R12,[RBP + -0xb0]
MOV R14D,0x1
MOV EDX,0x80
MOV RDI,R12
MOV ESI,0x1
MOV R8,RAX
XOR EAX,EAX
CALL 0x001132a0
MOV RDI,RBX
MOV RSI,R12
CALL 0x00121299
MOV EDI,0x3
CALL 0x00113320
MOV RDI,RBX
CALL 0x00122a41
TEST EAX,EAX
JZ 0x00116d55
MOV R12D,EAX
MOV RDI,RBX
CALL 0x00123312
MOV R15,RAX
MOV RDI,RBX
CALL 0x001232fd
LEA RDI,[0x13b14d]
LEA R8,[0x13b5b5]
MOV ESI,R12D
MOV RDX,R15
MOV ECX,EAX
MOV R9D,0x716
JMP 0x00116d9a
LAB_00116d3f:
LEA RDI,[0x13b588]
XOR EAX,EAX
CALL 0x0011bb8f
MOV R14D,0xffffffff
JMP 0x00116da1
LAB_00116d55:
LEA RSI,[0x13c0bf]
MOV RDI,RBX
CALL 0x00121299
TEST EAX,EAX
JZ 0x00116dc7
MOV R12D,EAX
MOV RDI,RBX
CALL 0x00123312
MOV R15,RAX
MOV RDI,RBX
CALL 0x001232fd
LEA RDI,[0x13b14d]
LEA R8,[0x13b5b5]
MOV ESI,R12D
MOV RDX,R15
MOV ECX,EAX
MOV R9D,0x719
LAB_00116d9a:
XOR EAX,EAX
CALL 0x0011bb8f
LAB_00116da1:
MOV RAX,qword ptr FS:[0x28]
CMP RAX,qword ptr [RBP + -0x28]
JNZ 0x00116e54
MOV EAX,R14D
ADD RSP,0xa0
POP RBX
POP R12
POP R14
POP R15
POP RBP
RET
LAB_00116dc7:
MOV RDI,RBX
CALL 0x0012334b
CMP RAX,R15
JNZ 0x00116df0
LEA RDI,[0x13b008]
LEA RSI,[0x13c0c9]
LEA RDX,[0x13b5b5]
MOV ECX,0x71b
JMP 0x00116e30
LAB_00116df0:
MOV RDI,RBX
CALL 0x00122191
TEST RAX,RAX
JZ 0x00116da1
MOV R15,RAX
MOV RDI,RAX
CALL 0x00122394
MOV RAX,qword ptr [RAX]
CMP byte ptr [RAX],0x33
JNZ 0x00116e16
CMP byte ptr [RAX + 0x1],0x0
JZ 0x00116e3c
LAB_00116e16:
LEA RDI,[0x13b008]
LEA RSI,[0x13c0e6]
LEA RDX,[0x13b5b5]
MOV ECX,0x721
LAB_00116e30:
XOR EAX,EAX
CALL 0x0011bb8f
JMP 0x00116da1
LAB_00116e3c:
MOV RDI,R15
CALL 0x0011cf46
MOV RDI,RBX
CALL 0x00120d0c
XOR R14D,R14D
JMP 0x00116da1
LAB_00116e54:
CALL 0x00113530
|
int8 test_conc443(void)
{
int iVar1;
int4 uVar2;
int8 uVar3;
char *pcVar4;
long lVar5;
int8 uVar6;
int8 uVar7;
long lVar8;
int8 *puVar9;
long in_FS_OFFSET;
int1 local_b9;
int1 local_b8 [136];
long local_30;
local_30 = *(long *)(in_FS_OFFSET + 0x28);
local_b9 = 1;
uVar3 = mysql_init(0);
if (mysql_default == 0) {
LAB_00116be9:
pcVar4 = getenv("srv");
if (pcVar4 == (char *)0x0) {
LAB_00116c2b:
mysql_options(uVar3,3,"set @a:=3");
mysql_options(uVar3,0x14,&local_b9);
lVar5 = my_test_connect(uVar3,hostname,username,password,schema,port,socketname,0x80000000);
if (lVar5 == 0) {
uVar6 = mysql_error(uVar3);
diag("Connection failed. Error: %s",uVar6);
mysql_close(uVar3);
}
lVar5 = mysql_thread_id(uVar3);
uVar6 = 1;
__sprintf_chk(local_b8,1,0x80,"KILL %lu",lVar5);
mysql_query(uVar3,local_b8);
sleep(3);
iVar1 = mysql_ping(uVar3);
if (iVar1 == 0) {
iVar1 = mysql_query(uVar3,"SELECT @a");
if (iVar1 == 0) {
lVar8 = mysql_thread_id(uVar3);
if (lVar8 == lVar5) {
pcVar4 = "Expected different thread id";
uVar3 = 0x71b;
}
else {
lVar5 = mysql_store_result(uVar3);
if (lVar5 == 0) goto LAB_00116da1;
puVar9 = (int8 *)mysql_fetch_row(lVar5);
if ((*(char *)*puVar9 == '3') && (((char *)*puVar9)[1] == '\0')) {
mysql_free_result(lVar5);
mysql_close(uVar3);
uVar6 = 0;
goto LAB_00116da1;
}
pcVar4 = "Wrong result";
uVar3 = 0x721;
}
diag("Error: %s (%s: %d)",pcVar4,
"/workspace/llm4binary/github2025/eloqsql/libmariadb/unittest/libmariadb/connection.c"
,uVar3);
goto LAB_00116da1;
}
uVar7 = mysql_error(uVar3);
uVar2 = mysql_errno(uVar3);
uVar3 = 0x719;
}
else {
uVar7 = mysql_error(uVar3);
uVar2 = mysql_errno(uVar3);
uVar3 = 0x716;
}
diag("Error (%d): %s (%d) in %s line %d",iVar1,uVar7,uVar2,
"/workspace/llm4binary/github2025/eloqsql/libmariadb/unittest/libmariadb/connection.c",
uVar3);
goto LAB_00116da1;
}
iVar1 = strcmp(pcVar4,"maxscale");
if (iVar1 != 0) {
iVar1 = strcmp(pcVar4,"skysql-ha");
if (iVar1 != 0) goto LAB_00116c2b;
}
}
else {
pcVar4 = (char *)mysql_get_server_info();
pcVar4 = strstr(pcVar4,"maxScale");
if (pcVar4 == (char *)0x0) goto LAB_00116be9;
}
diag("test disabled with maxscale");
uVar6 = 0xffffffff;
LAB_00116da1:
if (*(long *)(in_FS_OFFSET + 0x28) == local_30) {
return uVar6;
}
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
|
|
9,361 |
main
|
eloqsql/storage/maria/aria_s3_copy.cc
|
int main(int argc, char** argv)
{
MY_INIT(argv[0]);
get_options(&argc,(char***) &argv);
size_t block_size= opt_block_size;
s3_init_library();
if (!(global_s3_client= ms3_init(opt_s3_access_key,
opt_s3_secret_key,
opt_s3_region, opt_s3_host_name)))
{
fprintf(stderr, "Can't open connection to S3, error: %d %s", errno,
ms3_error(errno));
my_exit(1);
}
ms3_set_option(global_s3_client, MS3_OPT_BUFFER_CHUNK_SIZE, &block_size);
if (opt_protocol_version)
{
uint8_t protocol_version= (uint8_t) opt_protocol_version;
ms3_set_option(global_s3_client, MS3_OPT_FORCE_PROTOCOL_VERSION,
&protocol_version);
}
if (opt_s3_port)
{
int port= (int) opt_s3_port;
ms3_set_option(global_s3_client, MS3_OPT_PORT_NUMBER, &port);
}
if (opt_s3_use_http)
ms3_set_option(global_s3_client, MS3_OPT_USE_HTTP, NULL);
for (; *argv ; argv++)
{
char database[FN_REFLEN], table_name[FN_REFLEN], *path;
const char *db;
path= *argv;
fn_format(table_name, path, "", "", MY_REPLACE_DIR | MY_REPLACE_EXT);
/* Get database from option, path or current directory */
if (!(db= opt_database))
{
if (get_database_from_path(database, sizeof(database), path))
{
fprintf(stderr, "Aborting copying of %s\n", path);
my_exit(-1);
}
db= database;
}
switch (opt_operation) {
case 0:
/* Don't copy .frm file for partioned table */
if (aria_copy_to_s3(global_s3_client, opt_s3_bucket, path,
db, table_name, opt_block_size, opt_compression,
opt_force, opt_verbose, !strstr(table_name, "#P#")))
{
fprintf(stderr, "Aborting copying of %s\n", path);
my_exit(-1);
}
break;
case 1:
if (aria_copy_from_s3(global_s3_client, opt_s3_bucket, path,
db, opt_compression, opt_force, opt_verbose))
{
fprintf(stderr, "Aborting copying of %s\n", path);
my_exit(-1);
}
break;
case 2:
if (aria_delete_from_s3(global_s3_client, opt_s3_bucket, db,
table_name, opt_verbose))
{
fprintf(stderr, "Aborting copying of %s\n", path);
my_exit(-1);
}
break;
}
}
my_exit(0);
return 0;
}
|
O0
|
cpp
|
main:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
subq $0x4a8, %rsp # imm = 0x4A8
movq %fs:0x28, %rax
movq %rax, -0x10(%rbp)
movl $0x0, -0x414(%rbp)
movl %edi, -0x418(%rbp)
movq %rsi, -0x420(%rbp)
movq -0x420(%rbp), %rax
movq (%rax), %rcx
leaq 0xc2380f(%rip), %rax # 0xc4b6c0
movq %rcx, (%rax)
callq 0xbd4e0
leaq -0x418(%rbp), %rdi
leaq -0x420(%rbp), %rsi
callq 0x28370
movq 0x418315(%rip), %rax # 0x4401e8
movq %rax, -0x428(%rbp)
callq 0x28a30
movq 0x41830a(%rip), %rdi # 0x4401f0
movq 0x41830b(%rip), %rsi # 0x4401f8
movq 0x25f11c(%rip), %rdx # 0x287010
movq 0x25f11d(%rip), %rcx # 0x287018
callq 0x2c4b0
movq %rax, 0x4182f9(%rip) # 0x440200
cmpq $0x0, %rax
jne 0x27f76
movq 0x25f0c4(%rip), %rax # 0x286fd8
movq (%rax), %rax
movq %rax, -0x450(%rbp)
callq 0x27910
movl (%rax), %eax
movl %eax, -0x444(%rbp)
callq 0x27910
movzbl (%rax), %edi
callq 0x2ce00
movq -0x450(%rbp), %rdi
movl -0x444(%rbp), %edx
movq %rax, %rcx
leaq 0xf50b9(%rip), %rsi # 0x11d008
xorl %eax, %eax
callq 0x271d0
movq %fs:0x28, %rax
movq -0x10(%rbp), %rcx
cmpq %rcx, %rax
jne 0x28363
movl $0x1, %edi
callq 0x27da0
movq 0x418283(%rip), %rdi # 0x440200
movl $0x2, %esi
leaq -0x428(%rbp), %rdx
callq 0x2d3f0
cmpq $0x0, 0x25f08a(%rip) # 0x287020
je 0x27fbd
movq 0x25f081(%rip), %rax # 0x287020
movb %al, -0x429(%rbp)
movq 0x418254(%rip), %rdi # 0x440200
movl $0x4, %esi
leaq -0x429(%rbp), %rdx
callq 0x2d3f0
cmpq $0x0, 0x418243(%rip) # 0x440208
je 0x27fec
movq 0x41823a(%rip), %rax # 0x440208
movl %eax, -0x430(%rbp)
movq 0x418225(%rip), %rdi # 0x440200
movl $0x5, %esi
leaq -0x430(%rbp), %rdx
callq 0x2d3f0
cmpb $0x0, 0x41821d(%rip) # 0x440210
je 0x28007
movq 0x418204(%rip), %rdi # 0x440200
xorl %esi, %esi
xorl %eax, %eax
movl %eax, %edx
callq 0x2d3f0
jmp 0x28009
movq -0x420(%rbp), %rax
cmpq $0x0, (%rax)
je 0x2834a
movq -0x420(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x438(%rbp)
leaq -0x410(%rbp), %rdi
movq -0x438(%rbp), %rsi
leaq 0xf6315(%rip), %rcx # 0x11e355
movl $0x3, %r8d
movq %rcx, %rdx
callq 0xae980
movq 0x4181c3(%rip), %rax # 0x440218
movq %rax, -0x440(%rbp)
cmpq $0x0, %rax
jne 0x280cd
leaq -0x210(%rbp), %rdi
movq -0x438(%rbp), %rdx
movl $0x200, %esi # imm = 0x200
callq 0x284c0
testb $0x1, %al
jne 0x28080
jmp 0x280bf
movq 0x25ef51(%rip), %rax # 0x286fd8
movq (%rax), %rdi
movq -0x438(%rbp), %rdx
leaq 0xf4f9a(%rip), %rsi # 0x11d032
xorl %eax, %eax
callq 0x271d0
movq %fs:0x28, %rax
movq -0x10(%rbp), %rcx
cmpq %rcx, %rax
jne 0x28363
movl $0xffffffff, %edi # imm = 0xFFFFFFFF
callq 0x27da0
leaq -0x210(%rbp), %rax
movq %rax, -0x440(%rbp)
movq 0x25ef54(%rip), %rax # 0x287028
movq %rax, -0x458(%rbp)
testq %rax, %rax
je 0x2810b
jmp 0x280e2
movq -0x458(%rbp), %rax
subq $0x1, %rax
je 0x28240
jmp 0x280f5
movq -0x458(%rbp), %rax
subq $0x2, %rax
je 0x282c6
jmp 0x28331
movq 0x4180ee(%rip), %rax # 0x440200
movq %rax, -0x490(%rbp)
movq 0x25ef10(%rip), %rax # 0x287030
movq %rax, -0x488(%rbp)
movq -0x438(%rbp), %rax
movq %rax, -0x480(%rbp)
movq -0x440(%rbp), %rax
movq %rax, -0x478(%rbp)
leaq -0x410(%rbp), %rax
movq %rax, -0x470(%rbp)
movq 0x418090(%rip), %rax # 0x4401e8
movq %rax, -0x468(%rbp)
movb 0x4180bb(%rip), %bl # 0x440220
movb 0x4180b6(%rip), %al # 0x440221
movb %al, -0x45a(%rbp)
movb 0x4180ab(%rip), %al # 0x440222
movb %al, -0x459(%rbp)
leaq -0x410(%rbp), %rdi
leaq 0xf4ebf(%rip), %rsi # 0x11d04a
callq 0x27450
movq -0x490(%rbp), %rdi
movq -0x488(%rbp), %rsi
movq -0x480(%rbp), %rdx
movq -0x478(%rbp), %rcx
movq -0x470(%rbp), %r8
movq -0x468(%rbp), %r9
movb -0x45a(%rbp), %r11b
movb -0x459(%rbp), %r10b
cmpq $0x0, %rax
setne %al
xorb $-0x1, %al
andb $0x1, %al
movsbl %bl, %ebx
movl %ebx, (%rsp)
movsbl %r11b, %r11d
movl %r11d, 0x8(%rsp)
movsbl %r10b, %r10d
movl %r10d, 0x10(%rsp)
movsbl %al, %eax
movl %eax, 0x18(%rsp)
callq 0x28ef0
cmpl $0x0, %eax
je 0x2823b
movq 0x25edd5(%rip), %rax # 0x286fd8
movq (%rax), %rdi
movq -0x438(%rbp), %rdx
leaq 0xf4e1e(%rip), %rsi # 0x11d032
xorl %eax, %eax
callq 0x271d0
movq %fs:0x28, %rax
movq -0x10(%rbp), %rcx
cmpq %rcx, %rax
jne 0x28363
movl $0xffffffff, %edi # imm = 0xFFFFFFFF
callq 0x27da0
jmp 0x28331
movq 0x417fb9(%rip), %rdi # 0x440200
movq 0x25ede2(%rip), %rsi # 0x287030
movq -0x438(%rbp), %rdx
movq -0x440(%rbp), %rcx
movb 0x417fbd(%rip), %r8b # 0x440220
movb 0x417fb8(%rip), %al # 0x440221
movsbl %r8b, %r8d
movsbl %al, %r9d
movsbl 0x417faa(%rip), %eax # 0x440222
movl %eax, (%rsp)
callq 0x29f50
cmpl $0x0, %eax
je 0x282c4
movq 0x25ed4c(%rip), %rax # 0x286fd8
movq (%rax), %rdi
movq -0x438(%rbp), %rdx
leaq 0xf4d95(%rip), %rsi # 0x11d032
xorl %eax, %eax
callq 0x271d0
movq %fs:0x28, %rax
movq -0x10(%rbp), %rcx
cmpq %rcx, %rax
jne 0x28363
movl $0xffffffff, %edi # imm = 0xFFFFFFFF
callq 0x27da0
jmp 0x28331
movq 0x417f33(%rip), %rdi # 0x440200
movq 0x25ed5c(%rip), %rsi # 0x287030
movq -0x440(%rbp), %rdx
leaq -0x410(%rbp), %rcx
movsbl 0x417f38(%rip), %r8d # 0x440222
callq 0x29630
cmpl $0x0, %eax
je 0x2832f
movq 0x25ecdd(%rip), %rax # 0x286fd8
movq (%rax), %rdi
movq -0x438(%rbp), %rdx
leaq 0xf4d26(%rip), %rsi # 0x11d032
xorl %eax, %eax
callq 0x271d0
movq %fs:0x28, %rax
movq -0x10(%rbp), %rcx
cmpq %rcx, %rax
jne 0x28363
movl $0xffffffff, %edi # imm = 0xFFFFFFFF
callq 0x27da0
jmp 0x28331
jmp 0x28333
movq -0x420(%rbp), %rax
addq $0x8, %rax
movq %rax, -0x420(%rbp)
jmp 0x28009
movq %fs:0x28, %rax
movq -0x10(%rbp), %rcx
cmpq %rcx, %rax
jne 0x28363
xorl %edi, %edi
callq 0x27da0
callq 0x272b0
nopl (%rax,%rax)
|
main:
push rbp
mov rbp, rsp
push rbx
sub rsp, 4A8h
mov rax, fs:28h
mov [rbp+var_10], rax
mov [rbp+var_414], 0
mov [rbp+var_418], edi
mov [rbp+var_420], rsi
mov rax, [rbp+var_420]
mov rcx, [rax]
lea rax, my_progname
mov [rax], rcx
call my_init
lea rdi, [rbp+var_418]; int *
lea rsi, [rbp+var_420]; char ***
call _ZL11get_optionsPiPPPc; get_options(int *,char ***)
mov rax, cs:_ZL14opt_block_size; opt_block_size
mov [rbp+var_428], rax
call s3_init_library
mov rdi, cs:_ZL17opt_s3_access_key; opt_s3_access_key
mov rsi, cs:_ZL17opt_s3_secret_key; opt_s3_secret_key
mov rdx, cs:_ZL13opt_s3_region; opt_s3_region
mov rcx, cs:_ZL16opt_s3_host_name; opt_s3_host_name
call ms3_init
mov cs:_ZL16global_s3_client, rax; global_s3_client
cmp rax, 0
jnz short loc_27F76
mov rax, cs:stderr_ptr
mov rax, [rax]
mov [rbp+var_450], rax
call ___errno_location
mov eax, [rax]
mov [rbp+var_444], eax
call ___errno_location
movzx edi, byte ptr [rax]
call ms3_error
mov rdi, [rbp+var_450]
mov edx, [rbp+var_444]
mov rcx, rax
lea rsi, aCanTOpenConnec; "Can't open connection to S3, error: %d "...
xor eax, eax
call _fprintf
mov rax, fs:28h
mov rcx, [rbp+var_10]
cmp rax, rcx
jnz loc_28363
mov edi, 1; int
call _ZL7my_exiti; my_exit(int)
loc_27F76:
mov rdi, cs:_ZL16global_s3_client; global_s3_client
mov esi, 2
lea rdx, [rbp+var_428]
call ms3_set_option
cmp cs:_ZL20opt_protocol_version, 0; opt_protocol_version
jz short loc_27FBD
mov rax, cs:_ZL20opt_protocol_version; opt_protocol_version
mov [rbp+var_429], al
mov rdi, cs:_ZL16global_s3_client; global_s3_client
mov esi, 4
lea rdx, [rbp+var_429]
call ms3_set_option
loc_27FBD:
cmp cs:_ZL11opt_s3_port, 0; opt_s3_port
jz short loc_27FEC
mov rax, cs:_ZL11opt_s3_port; opt_s3_port
mov [rbp+var_430], eax
mov rdi, cs:_ZL16global_s3_client; global_s3_client
mov esi, 5
lea rdx, [rbp+var_430]
call ms3_set_option
loc_27FEC:
cmp cs:_ZL15opt_s3_use_http, 0; opt_s3_use_http
jz short loc_28007
mov rdi, cs:_ZL16global_s3_client; global_s3_client
xor esi, esi
xor eax, eax
mov edx, eax
call ms3_set_option
loc_28007:
jmp short $+2
loc_28009:
mov rax, [rbp+var_420]
cmp qword ptr [rax], 0
jz loc_2834A
mov rax, [rbp+var_420]
mov rax, [rax]
mov [rbp+var_438], rax
lea rdi, [rbp+var_410]
mov rsi, [rbp+var_438]
lea rcx, aLibmarias3SDS+19h; ""
mov r8d, 3
mov rdx, rcx
call fn_format
mov rax, cs:_ZL12opt_database; opt_database
mov [rbp+var_440], rax
cmp rax, 0
jnz short loc_280CD
lea rdi, [rbp+var_210]; char *
mov rdx, [rbp+var_438]; char *
mov esi, 200h; unsigned __int64
call _ZL22get_database_from_pathPcmPKc; get_database_from_path(char *,ulong,char const*)
test al, 1
jnz short loc_28080
jmp short loc_280BF
loc_28080:
mov rax, cs:stderr_ptr
mov rdi, [rax]
mov rdx, [rbp+var_438]
lea rsi, aAbortingCopyin; "Aborting copying of %s\n"
xor eax, eax
call _fprintf
mov rax, fs:28h
mov rcx, [rbp+var_10]
cmp rax, rcx
jnz loc_28363
mov edi, 0FFFFFFFFh; int
call _ZL7my_exiti; my_exit(int)
loc_280BF:
lea rax, [rbp+var_210]
mov [rbp+var_440], rax
loc_280CD:
mov rax, cs:_ZL13opt_operation; opt_operation
mov [rbp+var_458], rax
test rax, rax
jz short loc_2810B
jmp short $+2
loc_280E2:
mov rax, [rbp+var_458]
sub rax, 1
jz loc_28240
jmp short $+2
loc_280F5:
mov rax, [rbp+var_458]
sub rax, 2
jz loc_282C6
jmp loc_28331
loc_2810B:
mov rax, cs:_ZL16global_s3_client; global_s3_client
mov [rbp+var_490], rax
mov rax, cs:_ZL13opt_s3_bucket; opt_s3_bucket
mov [rbp+var_488], rax
mov rax, [rbp+var_438]
mov [rbp+var_480], rax
mov rax, [rbp+var_440]
mov [rbp+var_478], rax
lea rax, [rbp+var_410]
mov [rbp+var_470], rax
mov rax, cs:_ZL14opt_block_size; opt_block_size
mov [rbp+var_468], rax
mov bl, cs:_ZL15opt_compression; opt_compression
mov al, cs:_ZL9opt_force; opt_force
mov [rbp+var_45A], al
mov al, cs:_ZL11opt_verbose; opt_verbose
mov [rbp+var_459], al
lea rdi, [rbp+var_410]
lea rsi, aP; "#P#"
call _strstr
mov rdi, [rbp+var_490]
mov rsi, [rbp+var_488]
mov rdx, [rbp+var_480]
mov rcx, [rbp+var_478]
mov r8, [rbp+var_470]
mov r9, [rbp+var_468]
mov r11b, [rbp+var_45A]
mov r10b, [rbp+var_459]
cmp rax, 0
setnz al
xor al, 0FFh
and al, 1
movsx ebx, bl
mov [rsp+4B0h+var_4B0], ebx
movsx r11d, r11b
mov [rsp+4B0h+var_4A8], r11d
movsx r10d, r10b
mov [rsp+4B0h+var_4A0], r10d
movsx eax, al
mov [rsp+4B0h+var_498], eax
call aria_copy_to_s3
cmp eax, 0
jz short loc_2823B
mov rax, cs:stderr_ptr
mov rdi, [rax]
mov rdx, [rbp+var_438]
lea rsi, aAbortingCopyin; "Aborting copying of %s\n"
xor eax, eax
call _fprintf
mov rax, fs:28h
mov rcx, [rbp+var_10]
cmp rax, rcx
jnz loc_28363
mov edi, 0FFFFFFFFh; int
call _ZL7my_exiti; my_exit(int)
loc_2823B:
jmp loc_28331
loc_28240:
mov rdi, cs:_ZL16global_s3_client; global_s3_client
mov rsi, cs:_ZL13opt_s3_bucket; opt_s3_bucket
mov rdx, [rbp+var_438]
mov rcx, [rbp+var_440]
mov r8b, cs:_ZL15opt_compression; opt_compression
mov al, cs:_ZL9opt_force; opt_force
movsx r8d, r8b
movsx r9d, al
movsx eax, cs:_ZL11opt_verbose; opt_verbose
mov [rsp+4B0h+var_4B0], eax
call aria_copy_from_s3
cmp eax, 0
jz short loc_282C4
mov rax, cs:stderr_ptr
mov rdi, [rax]
mov rdx, [rbp+var_438]
lea rsi, aAbortingCopyin; "Aborting copying of %s\n"
xor eax, eax
call _fprintf
mov rax, fs:28h
mov rcx, [rbp+var_10]
cmp rax, rcx
jnz loc_28363
mov edi, 0FFFFFFFFh; int
call _ZL7my_exiti; my_exit(int)
loc_282C4:
jmp short loc_28331
loc_282C6:
mov rdi, cs:_ZL16global_s3_client; global_s3_client
mov rsi, cs:_ZL13opt_s3_bucket; opt_s3_bucket
mov rdx, [rbp+var_440]
lea rcx, [rbp+var_410]
movsx r8d, cs:_ZL11opt_verbose; opt_verbose
call aria_delete_from_s3
cmp eax, 0
jz short loc_2832F
mov rax, cs:stderr_ptr
mov rdi, [rax]
mov rdx, [rbp+var_438]
lea rsi, aAbortingCopyin; "Aborting copying of %s\n"
xor eax, eax
call _fprintf
mov rax, fs:28h
mov rcx, [rbp+var_10]
cmp rax, rcx
jnz short loc_28363
mov edi, 0FFFFFFFFh; int
call _ZL7my_exiti; my_exit(int)
loc_2832F:
jmp short $+2
loc_28331:
jmp short $+2
loc_28333:
mov rax, [rbp+var_420]
add rax, 8
mov [rbp+var_420], rax
jmp loc_28009
loc_2834A:
mov rax, fs:28h
mov rcx, [rbp+var_10]
cmp rax, rcx
jnz short loc_28363
xor edi, edi; int
call _ZL7my_exiti; my_exit(int)
loc_28363:
call ___stack_chk_fail
|
int __noreturn main(int argc, const char **argv, const char **envp)
{
unsigned __int8 *v3; // rax
const char *v4; // rax
char v5; // bl
long long v6; // rax
int v7; // [rsp+20h] [rbp-490h]
int v8; // [rsp+28h] [rbp-488h]
int v9; // [rsp+48h] [rbp-468h]
char v10; // [rsp+56h] [rbp-45Ah]
char v11; // [rsp+57h] [rbp-459h]
long long v12; // [rsp+60h] [rbp-450h]
int v13; // [rsp+6Ch] [rbp-444h]
char *v14; // [rsp+70h] [rbp-440h]
const char *v15; // [rsp+78h] [rbp-438h]
int v16; // [rsp+80h] [rbp-430h] BYREF
char v17; // [rsp+87h] [rbp-429h] BYREF
long long v18; // [rsp+88h] [rbp-428h] BYREF
char **v19; // [rsp+90h] [rbp-420h] BYREF
int v20[2]; // [rsp+98h] [rbp-418h] BYREF
char v21[512]; // [rsp+A0h] [rbp-410h] BYREF
char v22[512]; // [rsp+2A0h] [rbp-210h] BYREF
unsigned long long v23; // [rsp+4A0h] [rbp-10h]
v23 = __readfsqword(0x28u);
v20[1] = 0;
v20[0] = argc;
v19 = (char **)argv;
my_progname = *argv;
my_init(argc, argv, envp);
get_options(v20, &v19);
v18 = opt_block_size;
s3_init_library();
global_s3_client = ms3_init(opt_s3_access_key, opt_s3_secret_key, opt_s3_region[0], opt_s3_host_name);
if ( !global_s3_client )
{
v12 = stderr;
v13 = *(_DWORD *)__errno_location();
v3 = (unsigned __int8 *)__errno_location();
v4 = (const char *)ms3_error(*v3);
fprintf(v12, "Can't open connection to S3, error: %d %s", v13, v4);
my_exit(1u);
}
ms3_set_option(global_s3_client, 2LL, &v18);
if ( opt_protocol_version )
{
v17 = opt_protocol_version;
ms3_set_option(global_s3_client, 4LL, &v17);
}
if ( opt_s3_port )
{
v16 = opt_s3_port;
ms3_set_option(global_s3_client, 5LL, &v16);
}
if ( opt_s3_use_http )
ms3_set_option(global_s3_client, 0LL, 0LL);
while ( *v19 )
{
v15 = *v19;
fn_format(v21, *v19, "", "", 3LL);
v14 = (char *)opt_database;
if ( !opt_database )
{
if ( (get_database_from_path(v22, 0x200uLL, v15) & 1) != 0 )
{
fprintf(stderr, "Aborting copying of %s\n", v15);
my_exit(0xFFFFFFFF);
}
v14 = v22;
}
if ( opt_operation )
{
if ( opt_operation == 1 )
{
if ( (unsigned int)aria_copy_from_s3(
global_s3_client,
(_DWORD)opt_s3_bucket,
(_DWORD)v15,
(_DWORD)v14,
opt_compression,
opt_force,
opt_verbose) )
{
fprintf(stderr, "Aborting copying of %s\n", v15);
my_exit(0xFFFFFFFF);
}
}
else if ( opt_operation == 2 )
{
if ( (unsigned int)aria_delete_from_s3(global_s3_client, opt_s3_bucket, v14, v21, (unsigned int)opt_verbose) )
{
fprintf(stderr, "Aborting copying of %s\n", v15);
my_exit(0xFFFFFFFF);
}
}
}
else
{
v7 = global_s3_client;
v8 = (int)opt_s3_bucket;
v9 = opt_block_size;
v5 = opt_compression;
v10 = opt_force;
v11 = opt_verbose;
v6 = strstr(v21, "#P#");
if ( (unsigned int)aria_copy_to_s3(v7, v8, (_DWORD)v15, (_DWORD)v14, (unsigned int)v21, v9, v5, v10, v11, v6 == 0) )
{
fprintf(stderr, "Aborting copying of %s\n", v15);
my_exit(0xFFFFFFFF);
}
}
++v19;
}
my_exit(0);
}
|
main:
PUSH RBP
MOV RBP,RSP
PUSH RBX
SUB RSP,0x4a8
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x10],RAX
MOV dword ptr [RBP + -0x414],0x0
MOV dword ptr [RBP + -0x418],EDI
MOV qword ptr [RBP + -0x420],RSI
MOV RAX,qword ptr [RBP + -0x420]
MOV RCX,qword ptr [RAX]
LEA RAX,[0xd4b6c0]
MOV qword ptr [RAX],RCX
CALL 0x001bd4e0
LEA RDI,[RBP + -0x418]
LEA RSI,[RBP + -0x420]
CALL 0x00128370
MOV RAX,qword ptr [0x005401e8]
MOV qword ptr [RBP + -0x428],RAX
CALL 0x00128a30
MOV RDI,qword ptr [0x005401f0]
MOV RSI,qword ptr [0x005401f8]
MOV RDX,qword ptr [0x00387010]
MOV RCX,qword ptr [0x00387018]
CALL 0x0012c4b0
MOV qword ptr [0x00540200],RAX
CMP RAX,0x0
JNZ 0x00127f76
MOV RAX,qword ptr [0x00386fd8]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x450],RAX
CALL 0x00127910
MOV EAX,dword ptr [RAX]
MOV dword ptr [RBP + -0x444],EAX
CALL 0x00127910
MOVZX EDI,byte ptr [RAX]
CALL 0x0012ce00
MOV RDI,qword ptr [RBP + -0x450]
MOV EDX,dword ptr [RBP + -0x444]
MOV RCX,RAX
LEA RSI,[0x21d008]
XOR EAX,EAX
CALL 0x001271d0
MOV RAX,qword ptr FS:[0x28]
MOV RCX,qword ptr [RBP + -0x10]
CMP RAX,RCX
JNZ 0x00128363
MOV EDI,0x1
CALL 0x00127da0
LAB_00127f76:
MOV RDI,qword ptr [0x00540200]
MOV ESI,0x2
LEA RDX,[RBP + -0x428]
CALL 0x0012d3f0
CMP qword ptr [0x00387020],0x0
JZ 0x00127fbd
MOV RAX,qword ptr [0x00387020]
MOV byte ptr [RBP + -0x429],AL
MOV RDI,qword ptr [0x00540200]
MOV ESI,0x4
LEA RDX,[RBP + -0x429]
CALL 0x0012d3f0
LAB_00127fbd:
CMP qword ptr [0x00540208],0x0
JZ 0x00127fec
MOV RAX,qword ptr [0x00540208]
MOV dword ptr [RBP + -0x430],EAX
MOV RDI,qword ptr [0x00540200]
MOV ESI,0x5
LEA RDX,[RBP + -0x430]
CALL 0x0012d3f0
LAB_00127fec:
CMP byte ptr [0x00540210],0x0
JZ 0x00128007
MOV RDI,qword ptr [0x00540200]
XOR ESI,ESI
XOR EAX,EAX
MOV EDX,EAX
CALL 0x0012d3f0
LAB_00128007:
JMP 0x00128009
LAB_00128009:
MOV RAX,qword ptr [RBP + -0x420]
CMP qword ptr [RAX],0x0
JZ 0x0012834a
MOV RAX,qword ptr [RBP + -0x420]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x438],RAX
LEA RDI,[RBP + -0x410]
MOV RSI,qword ptr [RBP + -0x438]
LEA RCX,[0x21e355]
MOV R8D,0x3
MOV RDX,RCX
CALL 0x001ae980
MOV RAX,qword ptr [0x00540218]
MOV qword ptr [RBP + -0x440],RAX
CMP RAX,0x0
JNZ 0x001280cd
LEA RDI,[RBP + -0x210]
MOV RDX,qword ptr [RBP + -0x438]
MOV ESI,0x200
CALL 0x001284c0
TEST AL,0x1
JNZ 0x00128080
JMP 0x001280bf
LAB_00128080:
MOV RAX,qword ptr [0x00386fd8]
MOV RDI,qword ptr [RAX]
MOV RDX,qword ptr [RBP + -0x438]
LEA RSI,[0x21d032]
XOR EAX,EAX
CALL 0x001271d0
MOV RAX,qword ptr FS:[0x28]
MOV RCX,qword ptr [RBP + -0x10]
CMP RAX,RCX
JNZ 0x00128363
MOV EDI,0xffffffff
CALL 0x00127da0
LAB_001280bf:
LEA RAX,[RBP + -0x210]
MOV qword ptr [RBP + -0x440],RAX
LAB_001280cd:
MOV RAX,qword ptr [0x00387028]
MOV qword ptr [RBP + -0x458],RAX
TEST RAX,RAX
JZ 0x0012810b
JMP 0x001280e2
LAB_001280e2:
MOV RAX,qword ptr [RBP + -0x458]
SUB RAX,0x1
JZ 0x00128240
JMP 0x001280f5
LAB_001280f5:
MOV RAX,qword ptr [RBP + -0x458]
SUB RAX,0x2
JZ 0x001282c6
JMP 0x00128331
LAB_0012810b:
MOV RAX,qword ptr [0x00540200]
MOV qword ptr [RBP + -0x490],RAX
MOV RAX,qword ptr [0x00387030]
MOV qword ptr [RBP + -0x488],RAX
MOV RAX,qword ptr [RBP + -0x438]
MOV qword ptr [RBP + -0x480],RAX
MOV RAX,qword ptr [RBP + -0x440]
MOV qword ptr [RBP + -0x478],RAX
LEA RAX,[RBP + -0x410]
MOV qword ptr [RBP + -0x470],RAX
MOV RAX,qword ptr [0x005401e8]
MOV qword ptr [RBP + -0x468],RAX
MOV BL,byte ptr [0x00540220]
MOV AL,byte ptr [0x00540221]
MOV byte ptr [RBP + -0x45a],AL
MOV AL,byte ptr [0x00540222]
MOV byte ptr [RBP + -0x459],AL
LEA RDI,[RBP + -0x410]
LEA RSI,[0x21d04a]
CALL 0x00127450
MOV RDI,qword ptr [RBP + -0x490]
MOV RSI,qword ptr [RBP + -0x488]
MOV RDX,qword ptr [RBP + -0x480]
MOV RCX,qword ptr [RBP + -0x478]
MOV R8,qword ptr [RBP + -0x470]
MOV R9,qword ptr [RBP + -0x468]
MOV R11B,byte ptr [RBP + -0x45a]
MOV R10B,byte ptr [RBP + -0x459]
CMP RAX,0x0
SETNZ AL
XOR AL,0xff
AND AL,0x1
MOVSX EBX,BL
MOV dword ptr [RSP],EBX
MOVSX R11D,R11B
MOV dword ptr [RSP + 0x8],R11D
MOVSX R10D,R10B
MOV dword ptr [RSP + 0x10],R10D
MOVSX EAX,AL
MOV dword ptr [RSP + 0x18],EAX
CALL 0x00128ef0
CMP EAX,0x0
JZ 0x0012823b
MOV RAX,qword ptr [0x00386fd8]
MOV RDI,qword ptr [RAX]
MOV RDX,qword ptr [RBP + -0x438]
LEA RSI,[0x21d032]
XOR EAX,EAX
CALL 0x001271d0
MOV RAX,qword ptr FS:[0x28]
MOV RCX,qword ptr [RBP + -0x10]
CMP RAX,RCX
JNZ 0x00128363
MOV EDI,0xffffffff
CALL 0x00127da0
LAB_0012823b:
JMP 0x00128331
LAB_00128240:
MOV RDI,qword ptr [0x00540200]
MOV RSI,qword ptr [0x00387030]
MOV RDX,qword ptr [RBP + -0x438]
MOV RCX,qword ptr [RBP + -0x440]
MOV R8B,byte ptr [0x00540220]
MOV AL,byte ptr [0x00540221]
MOVSX R8D,R8B
MOVSX R9D,AL
MOVSX EAX,byte ptr [0x00540222]
MOV dword ptr [RSP],EAX
CALL 0x00129f50
CMP EAX,0x0
JZ 0x001282c4
MOV RAX,qword ptr [0x00386fd8]
MOV RDI,qword ptr [RAX]
MOV RDX,qword ptr [RBP + -0x438]
LEA RSI,[0x21d032]
XOR EAX,EAX
CALL 0x001271d0
MOV RAX,qword ptr FS:[0x28]
MOV RCX,qword ptr [RBP + -0x10]
CMP RAX,RCX
JNZ 0x00128363
MOV EDI,0xffffffff
CALL 0x00127da0
LAB_001282c4:
JMP 0x00128331
LAB_001282c6:
MOV RDI,qword ptr [0x00540200]
MOV RSI,qword ptr [0x00387030]
MOV RDX,qword ptr [RBP + -0x440]
LEA RCX,[RBP + -0x410]
MOVSX R8D,byte ptr [0x00540222]
CALL 0x00129630
CMP EAX,0x0
JZ 0x0012832f
MOV RAX,qword ptr [0x00386fd8]
MOV RDI,qword ptr [RAX]
MOV RDX,qword ptr [RBP + -0x438]
LEA RSI,[0x21d032]
XOR EAX,EAX
CALL 0x001271d0
MOV RAX,qword ptr FS:[0x28]
MOV RCX,qword ptr [RBP + -0x10]
CMP RAX,RCX
JNZ 0x00128363
MOV EDI,0xffffffff
CALL 0x00127da0
LAB_0012832f:
JMP 0x00128331
LAB_00128331:
JMP 0x00128333
LAB_00128333:
MOV RAX,qword ptr [RBP + -0x420]
ADD RAX,0x8
MOV qword ptr [RBP + -0x420],RAX
JMP 0x00128009
LAB_0012834a:
MOV RAX,qword ptr FS:[0x28]
MOV RCX,qword ptr [RBP + -0x10]
CMP RAX,RCX
JNZ 0x00128363
XOR EDI,EDI
CALL 0x00127da0
LAB_00128363:
CALL 0x001272b0
|
void main(int param_1,char **param_2)
{
uint uVar1;
FILE *__stream;
char *pcVar2;
int *puVar3;
char cVar4;
char cVar5;
char cVar6;
int iVar7;
uint *puVar8;
int *piVar9;
int8 uVar10;
ulong uVar11;
char *pcVar12;
long in_FS_OFFSET;
long lVar13;
char *local_448;
int4 local_438;
int1 local_431;
int8 local_430;
char **local_428;
int local_420 [2];
char local_418 [512];
char local_218 [512];
long local_18;
local_18 = *(long *)(in_FS_OFFSET + 0x28);
local_420[1] = 0;
my_progname = *param_2;
local_428 = param_2;
local_420[0] = param_1;
my_init();
get_options(local_420,&local_428);
local_430 = opt_block_size;
s3_init_library();
global_s3_client = ms3_init(opt_s3_access_key,opt_s3_secret_key,opt_s3_region,opt_s3_host_name);
if (global_s3_client == 0) {
__stream = *(FILE **)PTR_stderr_00386fd8;
puVar8 = (uint *)__errno_location();
uVar1 = *puVar8;
piVar9 = __errno_location();
uVar10 = ms3_error((char)*piVar9);
fprintf(__stream,"Can\'t open connection to S3, error: %d %s",(ulong)uVar1,uVar10);
if (*(long *)(in_FS_OFFSET + 0x28) != local_18) goto LAB_00128363;
my_exit(1);
}
ms3_set_option(global_s3_client,2,&local_430);
if (opt_protocol_version != 0) {
local_431 = (int1)opt_protocol_version;
ms3_set_option(global_s3_client,4,&local_431);
}
if (opt_s3_port != 0) {
local_438 = (int4)opt_s3_port;
ms3_set_option(global_s3_client,5,&local_438);
}
if (opt_s3_use_http != '\0') {
ms3_set_option(global_s3_client,0,0);
}
for (; *local_428 != (char *)0x0; local_428 = local_428 + 1) {
pcVar2 = *local_428;
fn_format(local_418,pcVar2,"","",3);
local_448 = opt_database;
if (opt_database == (char *)0x0) {
uVar11 = get_database_from_path(local_218,0x200,pcVar2);
if ((uVar11 & 1) != 0) {
fprintf(*(FILE **)PTR_stderr_00386fd8,"Aborting copying of %s\n",pcVar2);
if (*(long *)(in_FS_OFFSET + 0x28) != local_18) goto LAB_00128363;
my_exit(-1);
}
local_448 = local_218;
}
cVar6 = opt_verbose;
cVar5 = opt_force;
cVar4 = opt_compression;
uVar10 = opt_block_size;
puVar3 = opt_s3_bucket;
if (opt_operation == 0) {
lVar13 = global_s3_client;
pcVar12 = strstr(local_418,"#P#");
iVar7 = aria_copy_to_s3(lVar13,puVar3,pcVar2,local_448,local_418,uVar10,(int)cVar4,(int)cVar5,
(int)cVar6,(pcVar12 != (char *)0x0 ^ 0xffU) & 1,lVar13);
if (iVar7 != 0) {
fprintf(*(FILE **)PTR_stderr_00386fd8,"Aborting copying of %s\n",pcVar2);
if (*(long *)(in_FS_OFFSET + 0x28) != local_18) goto LAB_00128363;
my_exit(-1);
}
}
else if (opt_operation == 1) {
iVar7 = aria_copy_from_s3(global_s3_client,opt_s3_bucket,pcVar2,local_448,(int)opt_compression
,(int)opt_force,(int)opt_verbose);
if (iVar7 != 0) {
fprintf(*(FILE **)PTR_stderr_00386fd8,"Aborting copying of %s\n",pcVar2);
if (*(long *)(in_FS_OFFSET + 0x28) != local_18) goto LAB_00128363;
my_exit(-1);
}
}
else if ((opt_operation == 2) &&
(iVar7 = aria_delete_from_s3(global_s3_client,opt_s3_bucket,local_448,local_418,
(int)opt_verbose), iVar7 != 0)) {
fprintf(*(FILE **)PTR_stderr_00386fd8,"Aborting copying of %s\n",pcVar2);
if (*(long *)(in_FS_OFFSET + 0x28) != local_18) goto LAB_00128363;
my_exit(-1);
}
}
if (*(long *)(in_FS_OFFSET + 0x28) == local_18) {
my_exit(0);
}
LAB_00128363:
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
|
|
9,362 |
JS_CheckDefineGlobalVar
|
bluesky950520[P]quickjs/quickjs.c
|
static int JS_CheckDefineGlobalVar(JSContext *ctx, JSAtom prop, int flags)
{
JSObject *p;
JSShapeProperty *prs;
p = JS_VALUE_GET_OBJ(ctx->global_obj);
prs = find_own_property1(p, prop);
/* XXX: should handle JS_PROP_AUTOINIT */
if (flags & DEFINE_GLOBAL_LEX_VAR) {
if (prs && !(prs->flags & JS_PROP_CONFIGURABLE))
goto fail_redeclaration;
} else {
if (!prs && !p->extensible)
goto define_error;
if (flags & DEFINE_GLOBAL_FUNC_VAR) {
if (prs) {
if (!(prs->flags & JS_PROP_CONFIGURABLE) &&
((prs->flags & JS_PROP_TMASK) == JS_PROP_GETSET ||
((prs->flags & (JS_PROP_WRITABLE | JS_PROP_ENUMERABLE)) !=
(JS_PROP_WRITABLE | JS_PROP_ENUMERABLE)))) {
define_error:
JS_ThrowTypeErrorAtom(ctx, "cannot define variable '%s'",
prop);
return -1;
}
}
}
}
/* check if there already is a lexical declaration */
p = JS_VALUE_GET_OBJ(ctx->global_var_obj);
prs = find_own_property1(p, prop);
if (prs) {
fail_redeclaration:
JS_ThrowSyntaxErrorVarRedeclaration(ctx, prop);
return -1;
}
return 0;
}
|
O0
|
c
|
JS_CheckDefineGlobalVar:
subq $0xb8, %rsp
movq %rdi, 0x38(%rsp)
movl %esi, 0x34(%rsp)
movl %edx, 0x30(%rsp)
movq 0x38(%rsp), %rax
movq 0x1a0(%rax), %rax
movq %rax, 0x28(%rsp)
movq 0x28(%rsp), %rcx
movl 0x34(%rsp), %eax
movq %rcx, 0xa8(%rsp)
movl %eax, 0xa4(%rsp)
movq 0xa8(%rsp), %rax
movq 0x18(%rax), %rax
movq %rax, 0x98(%rsp)
movl 0xa4(%rsp), %eax
movq 0x98(%rsp), %rcx
movl 0x20(%rcx), %ecx
andq %rcx, %rax
movq %rax, 0x80(%rsp)
movq 0x98(%rsp), %rdi
callq 0x63ba0
xorl %ecx, %ecx
subq 0x80(%rsp), %rcx
subq $0x1, %rcx
movl (%rax,%rcx,4), %eax
movq %rax, 0x80(%rsp)
movq 0x98(%rsp), %rdi
callq 0x32570
movq %rax, 0x88(%rsp)
cmpq $0x0, 0x80(%rsp)
je 0x6ccef
movq 0x88(%rsp), %rax
movq 0x80(%rsp), %rcx
subq $0x1, %rcx
shlq $0x3, %rcx
addq %rcx, %rax
movq %rax, 0x90(%rsp)
movq 0x90(%rsp), %rax
movl 0x4(%rax), %eax
cmpl 0xa4(%rsp), %eax
sete %al
testb $0x1, %al
jne 0x6ccc2
jmp 0x6ccd4
movq 0x90(%rsp), %rax
movq %rax, 0xb0(%rsp)
jmp 0x6ccfb
movq 0x90(%rsp), %rax
movl (%rax), %eax
andl $0x3ffffff, %eax # imm = 0x3FFFFFF
movl %eax, %eax
movq %rax, 0x80(%rsp)
jmp 0x6cc79
movq $0x0, 0xb0(%rsp)
movq 0xb0(%rsp), %rax
movq %rax, 0x20(%rsp)
movl 0x30(%rsp), %eax
andl $0x80, %eax
cmpl $0x0, %eax
je 0x6cd3a
cmpq $0x0, 0x20(%rsp)
je 0x6cd35
movq 0x20(%rsp), %rax
movl (%rax), %eax
shrl $0x1a, %eax
andl $0x1, %eax
cmpl $0x0, %eax
jne 0x6cd35
jmp 0x6cebf
jmp 0x6cdd9
cmpq $0x0, 0x20(%rsp)
jne 0x6cd52
movq 0x28(%rsp), %rax
movb 0x5(%rax), %al
andb $0x1, %al
cmpb $0x0, %al
jne 0x6cd52
jmp 0x6cd9e
movl 0x30(%rsp), %eax
andl $0x40, %eax
cmpl $0x0, %eax
je 0x6cdd7
cmpq $0x0, 0x20(%rsp)
je 0x6cdd5
movq 0x20(%rsp), %rax
movl (%rax), %eax
shrl $0x1a, %eax
andl $0x1, %eax
cmpl $0x0, %eax
jne 0x6cdd3
movq 0x20(%rsp), %rax
movl (%rax), %eax
shrl $0x1a, %eax
andl $0x30, %eax
cmpl $0x10, %eax
je 0x6cd9c
movq 0x20(%rsp), %rax
movl (%rax), %eax
shrl $0x1a, %eax
andl $0x6, %eax
cmpl $0x6, %eax
je 0x6cdd3
jmp 0x6cd9e
movq 0x38(%rsp), %rdi
movl 0x34(%rsp), %esi
leaq 0xa794e(%rip), %rdx # 0x1146fc
leaq 0xa29fa(%rip), %rcx # 0x10f7af
movb $0x0, %al
callq 0x666d0
movq %rax, 0x10(%rsp)
movq %rdx, 0x18(%rsp)
movl $0xffffffff, 0x44(%rsp) # imm = 0xFFFFFFFF
jmp 0x6cee8
jmp 0x6cdd5
jmp 0x6cdd7
jmp 0x6cdd9
movq 0x38(%rsp), %rax
movq 0x1b0(%rax), %rax
movq %rax, 0x28(%rsp)
movq 0x28(%rsp), %rcx
movl 0x34(%rsp), %eax
movq %rcx, 0x70(%rsp)
movl %eax, 0x6c(%rsp)
movq 0x70(%rsp), %rax
movq 0x18(%rax), %rax
movq %rax, 0x60(%rsp)
movl 0x6c(%rsp), %eax
movq 0x60(%rsp), %rcx
movl 0x20(%rcx), %ecx
andq %rcx, %rax
movq %rax, 0x48(%rsp)
movq 0x60(%rsp), %rdi
callq 0x63ba0
xorl %ecx, %ecx
subq 0x48(%rsp), %rcx
subq $0x1, %rcx
movl (%rax,%rcx,4), %eax
movq %rax, 0x48(%rsp)
movq 0x60(%rsp), %rdi
callq 0x32570
movq %rax, 0x50(%rsp)
cmpq $0x0, 0x48(%rsp)
je 0x6cea2
movq 0x50(%rsp), %rax
movq 0x48(%rsp), %rcx
subq $0x1, %rcx
shlq $0x3, %rcx
addq %rcx, %rax
movq %rax, 0x58(%rsp)
movq 0x58(%rsp), %rax
movl 0x4(%rax), %eax
cmpl 0x6c(%rsp), %eax
sete %al
testb $0x1, %al
jne 0x6ce81
jmp 0x6ce8d
movq 0x58(%rsp), %rax
movq %rax, 0x78(%rsp)
jmp 0x6ceab
movq 0x58(%rsp), %rax
movl (%rax), %eax
andl $0x3ffffff, %eax # imm = 0x3FFFFFF
movl %eax, %eax
movq %rax, 0x48(%rsp)
jmp 0x6ce4a
movq $0x0, 0x78(%rsp)
movq 0x78(%rsp), %rax
movq %rax, 0x20(%rsp)
cmpq $0x0, 0x20(%rsp)
je 0x6cee0
jmp 0x6cebf
movq 0x38(%rsp), %rdi
movl 0x34(%rsp), %esi
callq 0x6bc90
movq %rax, (%rsp)
movq %rdx, 0x8(%rsp)
movl $0xffffffff, 0x44(%rsp) # imm = 0xFFFFFFFF
jmp 0x6cee8
movl $0x0, 0x44(%rsp)
movl 0x44(%rsp), %eax
addq $0xb8, %rsp
retq
nopw %cs:(%rax,%rax)
|
JS_CheckDefineGlobalVar:
sub rsp, 0B8h
mov [rsp+0B8h+var_80], rdi
mov [rsp+0B8h+var_84], esi
mov [rsp+0B8h+var_88], edx
mov rax, [rsp+0B8h+var_80]
mov rax, [rax+1A0h]
mov [rsp+0B8h+var_90], rax
mov rcx, [rsp+0B8h+var_90]
mov eax, [rsp+0B8h+var_84]
mov [rsp+0B8h+var_10], rcx
mov [rsp+0B8h+var_14], eax
mov rax, [rsp+0B8h+var_10]
mov rax, [rax+18h]
mov [rsp+0B8h+var_20], rax
mov eax, [rsp+0B8h+var_14]
mov rcx, [rsp+0B8h+var_20]
mov ecx, [rcx+20h]
and rax, rcx
mov [rsp+0B8h+var_38], rax
mov rdi, [rsp+0B8h+var_20]
call prop_hash_end
xor ecx, ecx
sub rcx, [rsp+0B8h+var_38]
sub rcx, 1
mov eax, [rax+rcx*4]
mov [rsp+0B8h+var_38], rax
mov rdi, [rsp+0B8h+var_20]
call get_shape_prop
mov [rsp+0B8h+var_30], rax
loc_6CC79:
cmp [rsp+0B8h+var_38], 0
jz short loc_6CCEF
mov rax, [rsp+0B8h+var_30]
mov rcx, [rsp+0B8h+var_38]
sub rcx, 1
shl rcx, 3
add rax, rcx
mov [rsp+0B8h+var_28], rax
mov rax, [rsp+0B8h+var_28]
mov eax, [rax+4]
cmp eax, [rsp+0B8h+var_14]
setz al
test al, 1
jnz short loc_6CCC2
jmp short loc_6CCD4
loc_6CCC2:
mov rax, [rsp+0B8h+var_28]
mov [rsp+0B8h+var_8], rax
jmp short loc_6CCFB
loc_6CCD4:
mov rax, [rsp+0B8h+var_28]
mov eax, [rax]
and eax, 3FFFFFFh
mov eax, eax
mov [rsp+0B8h+var_38], rax
jmp short loc_6CC79
loc_6CCEF:
mov [rsp+0B8h+var_8], 0
loc_6CCFB:
mov rax, [rsp+0B8h+var_8]
mov [rsp+0B8h+var_98], rax
mov eax, [rsp+0B8h+var_88]
and eax, 80h
cmp eax, 0
jz short loc_6CD3A
cmp [rsp+0B8h+var_98], 0
jz short loc_6CD35
mov rax, [rsp+0B8h+var_98]
mov eax, [rax]
shr eax, 1Ah
and eax, 1
cmp eax, 0
jnz short loc_6CD35
jmp loc_6CEBF
loc_6CD35:
jmp loc_6CDD9
loc_6CD3A:
cmp [rsp+0B8h+var_98], 0
jnz short loc_6CD52
mov rax, [rsp+0B8h+var_90]
mov al, [rax+5]
and al, 1
cmp al, 0
jnz short loc_6CD52
jmp short loc_6CD9E
loc_6CD52:
mov eax, [rsp+0B8h+var_88]
and eax, 40h
cmp eax, 0
jz short loc_6CDD7
cmp [rsp+0B8h+var_98], 0
jz short loc_6CDD5
mov rax, [rsp+0B8h+var_98]
mov eax, [rax]
shr eax, 1Ah
and eax, 1
cmp eax, 0
jnz short loc_6CDD3
mov rax, [rsp+0B8h+var_98]
mov eax, [rax]
shr eax, 1Ah
and eax, 30h
cmp eax, 10h
jz short loc_6CD9C
mov rax, [rsp+0B8h+var_98]
mov eax, [rax]
shr eax, 1Ah
and eax, 6
cmp eax, 6
jz short loc_6CDD3
loc_6CD9C:
jmp short $+2
loc_6CD9E:
mov rdi, [rsp+0B8h+var_80]
mov esi, [rsp+0B8h+var_84]
lea rdx, aCannotDefineVa; "cannot define variable '%s'"
lea rcx, aMaximumMemoryS+24h; ""
mov al, 0
call __JS_ThrowTypeErrorAtom
mov [rsp+0B8h+var_A8], rax
mov [rsp+0B8h+var_A0], rdx
mov [rsp+0B8h+var_74], 0FFFFFFFFh
jmp loc_6CEE8
loc_6CDD3:
jmp short $+2
loc_6CDD5:
jmp short $+2
loc_6CDD7:
jmp short $+2
loc_6CDD9:
mov rax, [rsp+0B8h+var_80]
mov rax, [rax+1B0h]
mov [rsp+0B8h+var_90], rax
mov rcx, [rsp+0B8h+var_90]
mov eax, [rsp+0B8h+var_84]
mov [rsp+0B8h+var_48], rcx
mov [rsp+0B8h+var_4C], eax
mov rax, [rsp+0B8h+var_48]
mov rax, [rax+18h]
mov [rsp+0B8h+var_58], rax
mov eax, [rsp+0B8h+var_4C]
mov rcx, [rsp+0B8h+var_58]
mov ecx, [rcx+20h]
and rax, rcx
mov [rsp+0B8h+var_70], rax
mov rdi, [rsp+0B8h+var_58]
call prop_hash_end
xor ecx, ecx
sub rcx, [rsp+0B8h+var_70]
sub rcx, 1
mov eax, [rax+rcx*4]
mov [rsp+0B8h+var_70], rax
mov rdi, [rsp+0B8h+var_58]
call get_shape_prop
mov [rsp+0B8h+var_68], rax
loc_6CE4A:
cmp [rsp+0B8h+var_70], 0
jz short loc_6CEA2
mov rax, [rsp+0B8h+var_68]
mov rcx, [rsp+0B8h+var_70]
sub rcx, 1
shl rcx, 3
add rax, rcx
mov [rsp+0B8h+var_60], rax
mov rax, [rsp+0B8h+var_60]
mov eax, [rax+4]
cmp eax, [rsp+0B8h+var_4C]
setz al
test al, 1
jnz short loc_6CE81
jmp short loc_6CE8D
loc_6CE81:
mov rax, [rsp+0B8h+var_60]
mov [rsp+0B8h+var_40], rax
jmp short loc_6CEAB
loc_6CE8D:
mov rax, [rsp+0B8h+var_60]
mov eax, [rax]
and eax, 3FFFFFFh
mov eax, eax
mov [rsp+0B8h+var_70], rax
jmp short loc_6CE4A
loc_6CEA2:
mov [rsp+0B8h+var_40], 0
loc_6CEAB:
mov rax, [rsp+0B8h+var_40]
mov [rsp+0B8h+var_98], rax
cmp [rsp+0B8h+var_98], 0
jz short loc_6CEE0
jmp short $+2
loc_6CEBF:
mov rdi, [rsp+0B8h+var_80]
mov esi, [rsp+0B8h+var_84]
call JS_ThrowSyntaxErrorVarRedeclaration
mov [rsp+0B8h+var_B8], rax
mov [rsp+0B8h+var_B0], rdx
mov [rsp+0B8h+var_74], 0FFFFFFFFh
jmp short loc_6CEE8
loc_6CEE0:
mov [rsp+0B8h+var_74], 0
loc_6CEE8:
mov eax, [rsp+0B8h+var_74]
add rsp, 0B8h
retn
|
long long JS_CheckDefineGlobalVar(
long long a1,
unsigned int a2,
char a3,
__m128 a4,
__m128 a5,
__m128 a6,
__m128 a7,
double a8,
double a9,
__m128 a10,
__m128 a11)
{
double v11; // xmm4_8
double v12; // xmm5_8
long long v14; // [rsp+28h] [rbp-90h]
long long v17; // [rsp+48h] [rbp-70h]
long long v18; // [rsp+48h] [rbp-70h]
long long v19; // [rsp+50h] [rbp-68h]
_DWORD *v20; // [rsp+58h] [rbp-60h]
long long v21; // [rsp+60h] [rbp-58h]
long long v22; // [rsp+78h] [rbp-40h]
long long v23; // [rsp+80h] [rbp-38h]
long long v24; // [rsp+80h] [rbp-38h]
long long shape_prop; // [rsp+88h] [rbp-30h]
_DWORD *v26; // [rsp+90h] [rbp-28h]
long long v27; // [rsp+98h] [rbp-20h]
_DWORD *v28; // [rsp+B0h] [rbp-8h]
v14 = *(_QWORD *)(a1 + 416);
v27 = *(_QWORD *)(v14 + 24);
v23 = *(_DWORD *)(v27 + 32) & a2;
v24 = *(unsigned int *)(prop_hash_end(v27) + 4 * (-v23 - 1));
shape_prop = get_shape_prop(v27);
while ( v24 )
{
v26 = (_DWORD *)(8 * (v24 - 1) + shape_prop);
if ( v26[1] == a2 )
{
v28 = (_DWORD *)(8 * (v24 - 1) + shape_prop);
goto LABEL_7;
}
v24 = *v26 & 0x3FFFFFF;
}
v28 = 0LL;
LABEL_7:
if ( a3 < 0 )
{
if ( v28 && ((*v28 >> 26) & 1) == 0 )
{
LABEL_26:
JS_ThrowSyntaxErrorVarRedeclaration(a1, a2);
return (unsigned int)-1;
}
LABEL_19:
v21 = *(_QWORD *)(*(_QWORD *)(a1 + 432) + 24LL);
v17 = *(_DWORD *)(v21 + 32) & a2;
v18 = *(unsigned int *)(prop_hash_end(v21) + 4 * (-v17 - 1));
v19 = get_shape_prop(v21);
while ( v18 )
{
v20 = (_DWORD *)(8 * (v18 - 1) + v19);
if ( v20[1] == a2 )
{
v22 = 8 * (v18 - 1) + v19;
goto LABEL_25;
}
v18 = *v20 & 0x3FFFFFF;
}
v22 = 0LL;
LABEL_25:
if ( !v22 )
return 0;
goto LABEL_26;
}
if ( (v28 || (*(_BYTE *)(v14 + 5) & 1) != 0)
&& ((a3 & 0x40) == 0 || !v28 || ((*v28 >> 26) & 1) != 0 || ((*v28 >> 26) & 0x30) != 0x10 && ((*v28 >> 26) & 6) == 6) )
{
goto LABEL_19;
}
_JS_ThrowTypeErrorAtom(a1, a2, "cannot define variable '%s'", a4, a5, a6, a7, v11, v12, a10, a11);
return (unsigned int)-1;
}
|
JS_CheckDefineGlobalVar:
SUB RSP,0xb8
MOV qword ptr [RSP + 0x38],RDI
MOV dword ptr [RSP + 0x34],ESI
MOV dword ptr [RSP + 0x30],EDX
MOV RAX,qword ptr [RSP + 0x38]
MOV RAX,qword ptr [RAX + 0x1a0]
MOV qword ptr [RSP + 0x28],RAX
MOV RCX,qword ptr [RSP + 0x28]
MOV EAX,dword ptr [RSP + 0x34]
MOV qword ptr [RSP + 0xa8],RCX
MOV dword ptr [RSP + 0xa4],EAX
MOV RAX,qword ptr [RSP + 0xa8]
MOV RAX,qword ptr [RAX + 0x18]
MOV qword ptr [RSP + 0x98],RAX
MOV EAX,dword ptr [RSP + 0xa4]
MOV RCX,qword ptr [RSP + 0x98]
MOV ECX,dword ptr [RCX + 0x20]
AND RAX,RCX
MOV qword ptr [RSP + 0x80],RAX
MOV RDI,qword ptr [RSP + 0x98]
CALL 0x00163ba0
XOR ECX,ECX
SUB RCX,qword ptr [RSP + 0x80]
SUB RCX,0x1
MOV EAX,dword ptr [RAX + RCX*0x4]
MOV qword ptr [RSP + 0x80],RAX
MOV RDI,qword ptr [RSP + 0x98]
CALL 0x00132570
MOV qword ptr [RSP + 0x88],RAX
LAB_0016cc79:
CMP qword ptr [RSP + 0x80],0x0
JZ 0x0016ccef
MOV RAX,qword ptr [RSP + 0x88]
MOV RCX,qword ptr [RSP + 0x80]
SUB RCX,0x1
SHL RCX,0x3
ADD RAX,RCX
MOV qword ptr [RSP + 0x90],RAX
MOV RAX,qword ptr [RSP + 0x90]
MOV EAX,dword ptr [RAX + 0x4]
CMP EAX,dword ptr [RSP + 0xa4]
SETZ AL
TEST AL,0x1
JNZ 0x0016ccc2
JMP 0x0016ccd4
LAB_0016ccc2:
MOV RAX,qword ptr [RSP + 0x90]
MOV qword ptr [RSP + 0xb0],RAX
JMP 0x0016ccfb
LAB_0016ccd4:
MOV RAX,qword ptr [RSP + 0x90]
MOV EAX,dword ptr [RAX]
AND EAX,0x3ffffff
MOV EAX,EAX
MOV qword ptr [RSP + 0x80],RAX
JMP 0x0016cc79
LAB_0016ccef:
MOV qword ptr [RSP + 0xb0],0x0
LAB_0016ccfb:
MOV RAX,qword ptr [RSP + 0xb0]
MOV qword ptr [RSP + 0x20],RAX
MOV EAX,dword ptr [RSP + 0x30]
AND EAX,0x80
CMP EAX,0x0
JZ 0x0016cd3a
CMP qword ptr [RSP + 0x20],0x0
JZ 0x0016cd35
MOV RAX,qword ptr [RSP + 0x20]
MOV EAX,dword ptr [RAX]
SHR EAX,0x1a
AND EAX,0x1
CMP EAX,0x0
JNZ 0x0016cd35
JMP 0x0016cebf
LAB_0016cd35:
JMP 0x0016cdd9
LAB_0016cd3a:
CMP qword ptr [RSP + 0x20],0x0
JNZ 0x0016cd52
MOV RAX,qword ptr [RSP + 0x28]
MOV AL,byte ptr [RAX + 0x5]
AND AL,0x1
CMP AL,0x0
JNZ 0x0016cd52
JMP 0x0016cd9e
LAB_0016cd52:
MOV EAX,dword ptr [RSP + 0x30]
AND EAX,0x40
CMP EAX,0x0
JZ 0x0016cdd7
CMP qword ptr [RSP + 0x20],0x0
JZ 0x0016cdd5
MOV RAX,qword ptr [RSP + 0x20]
MOV EAX,dword ptr [RAX]
SHR EAX,0x1a
AND EAX,0x1
CMP EAX,0x0
JNZ 0x0016cdd3
MOV RAX,qword ptr [RSP + 0x20]
MOV EAX,dword ptr [RAX]
SHR EAX,0x1a
AND EAX,0x30
CMP EAX,0x10
JZ 0x0016cd9c
MOV RAX,qword ptr [RSP + 0x20]
MOV EAX,dword ptr [RAX]
SHR EAX,0x1a
AND EAX,0x6
CMP EAX,0x6
JZ 0x0016cdd3
LAB_0016cd9c:
JMP 0x0016cd9e
LAB_0016cd9e:
MOV RDI,qword ptr [RSP + 0x38]
MOV ESI,dword ptr [RSP + 0x34]
LEA RDX,[0x2146fc]
LEA RCX,[0x20f7af]
MOV AL,0x0
CALL 0x001666d0
MOV qword ptr [RSP + 0x10],RAX
MOV qword ptr [RSP + 0x18],RDX
MOV dword ptr [RSP + 0x44],0xffffffff
JMP 0x0016cee8
LAB_0016cdd3:
JMP 0x0016cdd5
LAB_0016cdd5:
JMP 0x0016cdd7
LAB_0016cdd7:
JMP 0x0016cdd9
LAB_0016cdd9:
MOV RAX,qword ptr [RSP + 0x38]
MOV RAX,qword ptr [RAX + 0x1b0]
MOV qword ptr [RSP + 0x28],RAX
MOV RCX,qword ptr [RSP + 0x28]
MOV EAX,dword ptr [RSP + 0x34]
MOV qword ptr [RSP + 0x70],RCX
MOV dword ptr [RSP + 0x6c],EAX
MOV RAX,qword ptr [RSP + 0x70]
MOV RAX,qword ptr [RAX + 0x18]
MOV qword ptr [RSP + 0x60],RAX
MOV EAX,dword ptr [RSP + 0x6c]
MOV RCX,qword ptr [RSP + 0x60]
MOV ECX,dword ptr [RCX + 0x20]
AND RAX,RCX
MOV qword ptr [RSP + 0x48],RAX
MOV RDI,qword ptr [RSP + 0x60]
CALL 0x00163ba0
XOR ECX,ECX
SUB RCX,qword ptr [RSP + 0x48]
SUB RCX,0x1
MOV EAX,dword ptr [RAX + RCX*0x4]
MOV qword ptr [RSP + 0x48],RAX
MOV RDI,qword ptr [RSP + 0x60]
CALL 0x00132570
MOV qword ptr [RSP + 0x50],RAX
LAB_0016ce4a:
CMP qword ptr [RSP + 0x48],0x0
JZ 0x0016cea2
MOV RAX,qword ptr [RSP + 0x50]
MOV RCX,qword ptr [RSP + 0x48]
SUB RCX,0x1
SHL RCX,0x3
ADD RAX,RCX
MOV qword ptr [RSP + 0x58],RAX
MOV RAX,qword ptr [RSP + 0x58]
MOV EAX,dword ptr [RAX + 0x4]
CMP EAX,dword ptr [RSP + 0x6c]
SETZ AL
TEST AL,0x1
JNZ 0x0016ce81
JMP 0x0016ce8d
LAB_0016ce81:
MOV RAX,qword ptr [RSP + 0x58]
MOV qword ptr [RSP + 0x78],RAX
JMP 0x0016ceab
LAB_0016ce8d:
MOV RAX,qword ptr [RSP + 0x58]
MOV EAX,dword ptr [RAX]
AND EAX,0x3ffffff
MOV EAX,EAX
MOV qword ptr [RSP + 0x48],RAX
JMP 0x0016ce4a
LAB_0016cea2:
MOV qword ptr [RSP + 0x78],0x0
LAB_0016ceab:
MOV RAX,qword ptr [RSP + 0x78]
MOV qword ptr [RSP + 0x20],RAX
CMP qword ptr [RSP + 0x20],0x0
JZ 0x0016cee0
JMP 0x0016cebf
LAB_0016cebf:
MOV RDI,qword ptr [RSP + 0x38]
MOV ESI,dword ptr [RSP + 0x34]
CALL 0x0016bc90
MOV qword ptr [RSP],RAX
MOV qword ptr [RSP + 0x8],RDX
MOV dword ptr [RSP + 0x44],0xffffffff
JMP 0x0016cee8
LAB_0016cee0:
MOV dword ptr [RSP + 0x44],0x0
LAB_0016cee8:
MOV EAX,dword ptr [RSP + 0x44]
ADD RSP,0xb8
RET
|
int4 JS_CheckDefineGlobalVar(long param_1,uint param_2,uint param_3)
{
uint uVar1;
long lVar2;
long lVar3;
long lVar4;
ulong local_70;
uint *local_40;
ulong local_38;
uint *local_8;
lVar4 = *(long *)(param_1 + 0x1a0);
lVar3 = *(long *)(lVar4 + 0x18);
uVar1 = *(uint *)(lVar3 + 0x20);
lVar2 = prop_hash_end(lVar3);
uVar1 = *(uint *)(lVar2 + (-1 - (ulong)(param_2 & uVar1)) * 4);
lVar3 = get_shape_prop(lVar3);
while (local_38 = (ulong)uVar1, local_38 != 0) {
local_8 = (uint *)(lVar3 + (local_38 - 1) * 8);
if (local_8[1] == param_2) goto LAB_0016ccfb;
uVar1 = *local_8 & 0x3ffffff;
}
local_8 = (uint *)0x0;
LAB_0016ccfb:
if ((param_3 & 0x80) == 0) {
if (((local_8 == (uint *)0x0) && ((*(byte *)(lVar4 + 5) & 1) == 0)) ||
((((param_3 & 0x40) != 0 && ((local_8 != (uint *)0x0 && ((*local_8 >> 0x1a & 1) == 0)))) &&
(((*local_8 >> 0x1a & 0x30) == 0x10 || ((*local_8 >> 0x1a & 6) != 6)))))) {
__JS_ThrowTypeErrorAtom(param_1,param_2,"cannot define variable \'%s\'","");
return 0xffffffff;
}
}
else if ((local_8 != (uint *)0x0) && ((*local_8 >> 0x1a & 1) == 0)) goto LAB_0016cebf;
lVar4 = *(long *)(*(long *)(param_1 + 0x1b0) + 0x18);
uVar1 = *(uint *)(lVar4 + 0x20);
lVar3 = prop_hash_end(lVar4);
uVar1 = *(uint *)(lVar3 + (-1 - (ulong)(param_2 & uVar1)) * 4);
lVar4 = get_shape_prop(lVar4);
while (local_70 = (ulong)uVar1, local_70 != 0) {
local_40 = (uint *)(lVar4 + (local_70 - 1) * 8);
if (local_40[1] == param_2) goto LAB_0016ceab;
uVar1 = *local_40 & 0x3ffffff;
}
local_40 = (uint *)0x0;
LAB_0016ceab:
if (local_40 == (uint *)0x0) {
return 0;
}
LAB_0016cebf:
JS_ThrowSyntaxErrorVarRedeclaration(param_1,param_2);
return 0xffffffff;
}
|
|
9,363 |
gguf_add_tensor
|
monkey531[P]llama/ggml/src/gguf.cpp
|
void gguf_add_tensor(
struct gguf_context * ctx,
const struct ggml_tensor * tensor) {
GGML_ASSERT(tensor);
if (gguf_find_tensor(ctx, tensor->name) != -1) {
GGML_ABORT("duplicate tensor name: %s", tensor->name);
}
struct gguf_tensor_info ti;
ti.t = *tensor;
ti.offset = ctx->info.empty() ? 0 :
ctx->info.back().offset + GGML_PAD(ggml_nbytes(&ctx->info.back().t), ctx->alignment);
ctx->info.push_back(ti);
}
|
O2
|
cpp
|
gguf_add_tensor:
pushq %r15
pushq %r14
pushq %rbx
subq $0x160, %rsp # imm = 0x160
testq %rsi, %rsi
je 0x405d3
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x100(%rsi), %r15
movq %r15, %rsi
callq 0x1d8b0
cmpq $-0x1, %rax
jne 0x405ef
leaq 0x8(%rsp), %rdi
movl $0x150, %edx # imm = 0x150
movq %r14, %rsi
callq 0x1d270
leaq 0x20(%rbx), %r14
movq 0x28(%rbx), %rdi
cmpq %rdi, 0x20(%rbx)
je 0x405b0
movq -0x8(%rdi), %r15
addq $-0x158, %rdi # imm = 0xFEA8
callq 0x1c2d0
movq 0x38(%rbx), %rcx
addq %rcx, %rax
decq %rax
negq %rcx
andq %rax, %rcx
addq %r15, %rcx
jmp 0x405b2
xorl %ecx, %ecx
leaq 0x8(%rsp), %rsi
movq %rcx, 0x150(%rsi)
movq %r14, %rdi
callq 0x1d500
addq $0x160, %rsp # imm = 0x160
popq %rbx
popq %r14
popq %r15
retq
leaq 0x1a22b(%rip), %rdi # 0x5a805
leaq 0xafec(%rip), %rdx # 0x4b5cd
leaq 0xd346(%rip), %rcx # 0x4d92e
movl $0x446, %esi # imm = 0x446
jmp 0x40605
leaq 0x1a20f(%rip), %rdi # 0x5a805
leaq 0x1a7c3(%rip), %rdx # 0x5adc0
movl $0x448, %esi # imm = 0x448
movq %r15, %rcx
xorl %eax, %eax
callq 0x1e760
|
gguf_add_tensor:
push r15
push r14
push rbx
sub rsp, 160h
test rsi, rsi
jz loc_405D3
mov r14, rsi
mov rbx, rdi
lea r15, [rsi+100h]
mov rsi, r15
call _gguf_find_tensor
cmp rax, 0FFFFFFFFFFFFFFFFh
jnz loc_405EF
lea rdi, [rsp+178h+var_170]
mov edx, 150h
mov rsi, r14
call _memcpy
lea r14, [rbx+20h]
mov rdi, [rbx+28h]
cmp [rbx+20h], rdi
jz short loc_405B0
mov r15, [rdi-8]
add rdi, 0FFFFFFFFFFFFFEA8h
call _ggml_nbytes
mov rcx, [rbx+38h]
add rax, rcx
dec rax
neg rcx
and rcx, rax
add rcx, r15
jmp short loc_405B2
loc_405B0:
xor ecx, ecx
loc_405B2:
lea rsi, [rsp+178h+var_170]
mov [rsi+150h], rcx
mov rdi, r14
call __ZNSt6vectorI16gguf_tensor_infoSaIS0_EE9push_backERKS0_; std::vector<gguf_tensor_info>::push_back(gguf_tensor_info const&)
add rsp, 160h
pop rbx
pop r14
pop r15
retn
loc_405D3:
lea rdi, aWorkspaceLlm4b_5; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aCgraphNodesCgr+26h; "tensor"
mov esi, 446h
jmp short loc_40605
loc_405EF:
lea rdi, aWorkspaceLlm4b_5; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aDuplicateTenso; "duplicate tensor name: %s"
mov esi, 448h
mov rcx, r15
loc_40605:
xor eax, eax
call _ggml_abort
|
long long gguf_add_tensor(
_QWORD *a1,
long long a2,
__m128 a3,
__m128 a4,
__m128 a5,
__m128 a6,
__m128 a7,
__m128 a8,
__m128 a9,
__m128 a10,
long long a11,
long long a12,
long long a13,
long long a14)
{
char *v15; // r15
long long v16; // rdi
long long v17; // r15
long long v18; // rcx
const char *v20; // rdx
char *v21; // rcx
int v22; // esi
char v23; // [rsp+0h] [rbp-178h]
_BYTE v24[336]; // [rsp+8h] [rbp-170h] BYREF
long long v25; // [rsp+158h] [rbp-20h]
if ( !a2 )
{
v20 = "GGML_ASSERT(%s) failed";
v21 = "tensor";
v22 = 1094;
goto LABEL_9;
}
v15 = (char *)(a2 + 256);
if ( gguf_find_tensor((long long)a1, a2 + 256) != -1 )
{
v20 = "duplicate tensor name: %s";
v22 = 1096;
v21 = v15;
LABEL_9:
ggml_abort(
"/workspace/llm4binary/github/2025_star3/monkey531[P]llama/ggml/src/gguf.cpp",
v22,
(long long)v20,
(long long)v21,
a13,
a14,
a3,
a4,
a5,
a6,
a7,
a8,
a9,
a10,
v23);
}
memcpy(v24, a2, sizeof(v24));
v16 = a1[5];
if ( a1[4] == v16 )
{
v18 = 0LL;
}
else
{
v17 = *(_QWORD *)(v16 - 8);
v18 = v17 + ((a1[7] + ggml_nbytes((unsigned int *)(v16 - 344)) - 1) & -a1[7]);
}
v25 = v18;
return std::vector<gguf_tensor_info>::push_back(a1 + 4, v24);
}
|
gguf_add_tensor:
PUSH R15
PUSH R14
PUSH RBX
SUB RSP,0x160
TEST RSI,RSI
JZ 0x001405d3
MOV R14,RSI
MOV RBX,RDI
LEA R15,[RSI + 0x100]
MOV RSI,R15
CALL 0x0011d8b0
CMP RAX,-0x1
JNZ 0x001405ef
LEA RDI,[RSP + 0x8]
MOV EDX,0x150
MOV RSI,R14
CALL 0x0011d270
LEA R14,[RBX + 0x20]
MOV RDI,qword ptr [RBX + 0x28]
CMP qword ptr [RBX + 0x20],RDI
JZ 0x001405b0
MOV R15,qword ptr [RDI + -0x8]
ADD RDI,-0x158
CALL 0x0011c2d0
MOV RCX,qword ptr [RBX + 0x38]
ADD RAX,RCX
DEC RAX
NEG RCX
AND RCX,RAX
ADD RCX,R15
JMP 0x001405b2
LAB_001405b0:
XOR ECX,ECX
LAB_001405b2:
LEA RSI,[RSP + 0x8]
MOV qword ptr [RSI + 0x150],RCX
MOV RDI,R14
CALL 0x0011d500
ADD RSP,0x160
POP RBX
POP R14
POP R15
RET
LAB_001405d3:
LEA RDI,[0x15a805]
LEA RDX,[0x14b5cd]
LEA RCX,[0x14d92e]
MOV ESI,0x446
JMP 0x00140605
LAB_001405ef:
LEA RDI,[0x15a805]
LEA RDX,[0x15adc0]
MOV ESI,0x448
MOV RCX,R15
LAB_00140605:
XOR EAX,EAX
CALL 0x0011e760
|
void gguf_add_tensor(long param_1,void *param_2)
{
long lVar1;
long lVar2;
char *pcVar3;
char *pcVar4;
int8 uVar5;
gguf_tensor_info local_170 [336];
long local_20;
if (param_2 == (void *)0x0) {
pcVar4 = "GGML_ASSERT(%s) failed";
pcVar3 = "tensor";
uVar5 = 0x446;
}
else {
pcVar3 = (char *)((long)param_2 + 0x100);
lVar2 = gguf_find_tensor(param_1,pcVar3);
if (lVar2 == -1) {
memcpy(local_170,param_2,0x150);
lVar2 = *(long *)(param_1 + 0x28);
if (*(long *)(param_1 + 0x20) == lVar2) {
local_20 = 0;
}
else {
lVar1 = *(long *)(lVar2 + -8);
lVar2 = ggml_nbytes(lVar2 + -0x158);
local_20 = (-*(long *)(param_1 + 0x38) & (lVar2 + *(long *)(param_1 + 0x38)) - 1U) + lVar1;
}
std::vector<gguf_tensor_info,std::allocator<gguf_tensor_info>>::push_back
((vector<gguf_tensor_info,std::allocator<gguf_tensor_info>> *)(param_1 + 0x20),
local_170);
return;
}
pcVar4 = "duplicate tensor name: %s";
uVar5 = 0x448;
}
/* WARNING: Subroutine does not return */
ggml_abort("/workspace/llm4binary/github/2025_star3/monkey531[P]llama/ggml/src/gguf.cpp",uVar5,
pcVar4,pcVar3);
}
|
|
9,364 |
js_string_substr
|
bluesky950520[P]quickjs/quickjs.c
|
static JSValue js_string_substr(JSContext *ctx, JSValue this_val,
int argc, JSValue *argv)
{
JSValue str, ret;
int a, len, n;
JSString *p;
str = JS_ToStringCheckObject(ctx, this_val);
if (JS_IsException(str))
return str;
p = JS_VALUE_GET_STRING(str);
len = p->len;
if (JS_ToInt32Clamp(ctx, &a, argv[0], 0, len, len)) {
JS_FreeValue(ctx, str);
return JS_EXCEPTION;
}
n = len - a;
if (!JS_IsUndefined(argv[1])) {
if (JS_ToInt32Clamp(ctx, &n, argv[1], 0, len - a, 0)) {
JS_FreeValue(ctx, str);
return JS_EXCEPTION;
}
}
ret = js_sub_string(ctx, p, a, a + n);
JS_FreeValue(ctx, str);
return ret;
}
|
O0
|
c
|
js_string_substr:
subq $0x98, %rsp
movq %rsi, 0x78(%rsp)
movq %rdx, 0x80(%rsp)
movq %rdi, 0x70(%rsp)
movl %ecx, 0x6c(%rsp)
movq %r8, 0x60(%rsp)
movq 0x70(%rsp), %rdi
movq 0x78(%rsp), %rsi
movq 0x80(%rsp), %rdx
callq 0x707d0
movq %rax, 0x18(%rsp)
movq %rdx, 0x20(%rsp)
movq 0x18(%rsp), %rax
movq %rax, 0x50(%rsp)
movq 0x20(%rsp), %rax
movq %rax, 0x58(%rsp)
movq 0x50(%rsp), %rdi
movq 0x58(%rsp), %rsi
callq 0x23cc0
cmpl $0x0, %eax
je 0xd521a
movq 0x50(%rsp), %rax
movq %rax, 0x88(%rsp)
movq 0x58(%rsp), %rax
movq %rax, 0x90(%rsp)
jmp 0xd5384
movq 0x50(%rsp), %rax
movq %rax, 0x28(%rsp)
movq 0x28(%rsp), %rax
movq 0x4(%rax), %rax
andq $0x7fffffff, %rax # imm = 0x7FFFFFFF
movl %eax, 0x38(%rsp)
movq 0x70(%rsp), %rdi
movq 0x60(%rsp), %rcx
movl 0x38(%rsp), %r9d
movl 0x38(%rsp), %eax
movq (%rcx), %rdx
movq 0x8(%rcx), %rcx
leaq 0x3c(%rsp), %rsi
xorl %r8d, %r8d
movl %eax, (%rsp)
callq 0x38850
cmpl $0x0, %eax
je 0xd5296
movq 0x70(%rsp), %rdi
movq 0x50(%rsp), %rsi
movq 0x58(%rsp), %rdx
callq 0x23c90
movl $0x0, 0x88(%rsp)
movq $0x6, 0x90(%rsp)
jmp 0xd5384
movl 0x38(%rsp), %eax
subl 0x3c(%rsp), %eax
movl %eax, 0x34(%rsp)
movq 0x60(%rsp), %rax
movq 0x10(%rax), %rdi
movq 0x18(%rax), %rsi
callq 0x2e260
cmpl $0x0, %eax
jne 0xd531d
movq 0x70(%rsp), %rdi
movq 0x60(%rsp), %rax
movl 0x38(%rsp), %r9d
subl 0x3c(%rsp), %r9d
movq 0x10(%rax), %rdx
movq 0x18(%rax), %rcx
leaq 0x34(%rsp), %rsi
xorl %r8d, %r8d
movl $0x0, (%rsp)
callq 0x38850
cmpl $0x0, %eax
je 0xd531b
movq 0x70(%rsp), %rdi
movq 0x50(%rsp), %rsi
movq 0x58(%rsp), %rdx
callq 0x23c90
movl $0x0, 0x88(%rsp)
movq $0x6, 0x90(%rsp)
jmp 0xd5384
jmp 0xd531d
movq 0x70(%rsp), %rdi
movq 0x28(%rsp), %rsi
movl 0x3c(%rsp), %edx
movl 0x3c(%rsp), %ecx
addl 0x34(%rsp), %ecx
callq 0x50af0
movq %rax, 0x8(%rsp)
movq %rdx, 0x10(%rsp)
movq 0x8(%rsp), %rax
movq %rax, 0x40(%rsp)
movq 0x10(%rsp), %rax
movq %rax, 0x48(%rsp)
movq 0x70(%rsp), %rdi
movq 0x50(%rsp), %rsi
movq 0x58(%rsp), %rdx
callq 0x23c90
movq 0x40(%rsp), %rax
movq %rax, 0x88(%rsp)
movq 0x48(%rsp), %rax
movq %rax, 0x90(%rsp)
movq 0x88(%rsp), %rax
movq 0x90(%rsp), %rdx
addq $0x98, %rsp
retq
nopl (%rax)
|
js_string_substr:
sub rsp, 98h
mov [rsp+98h+var_20], rsi
mov [rsp+98h+var_18], rdx
mov [rsp+98h+var_28], rdi
mov [rsp+98h+var_2C], ecx
mov [rsp+98h+var_38], r8
mov rdi, [rsp+98h+var_28]
mov rsi, [rsp+98h+var_20]
mov rdx, [rsp+98h+var_18]
call JS_ToStringCheckObject
mov [rsp+98h+var_80], rax
mov [rsp+98h+var_78], rdx
mov rax, [rsp+98h+var_80]
mov [rsp+98h+var_48], rax
mov rax, [rsp+98h+var_78]
mov [rsp+98h+var_40], rax
mov rdi, [rsp+98h+var_48]
mov rsi, [rsp+98h+var_40]
call JS_IsException_1
cmp eax, 0
jz short loc_D521A
mov rax, [rsp+98h+var_48]
mov [rsp+98h+var_10], rax
mov rax, [rsp+98h+var_40]
mov [rsp+98h+var_8], rax
jmp loc_D5384
loc_D521A:
mov rax, [rsp+98h+var_48]
mov [rsp+98h+var_70], rax
mov rax, [rsp+98h+var_70]
mov rax, [rax+4]
and rax, 7FFFFFFFh
mov [rsp+98h+var_60], eax
mov rdi, [rsp+98h+var_28]
mov rcx, [rsp+98h+var_38]
mov r9d, [rsp+98h+var_60]
mov eax, [rsp+98h+var_60]
mov rdx, [rcx]
mov rcx, [rcx+8]
lea rsi, [rsp+98h+var_5C]
xor r8d, r8d
mov [rsp+98h+var_98], eax
call JS_ToInt32Clamp
cmp eax, 0
jz short loc_D5296
mov rdi, [rsp+98h+var_28]
mov rsi, [rsp+98h+var_48]
mov rdx, [rsp+98h+var_40]
call JS_FreeValue
mov dword ptr [rsp+98h+var_10], 0
mov [rsp+98h+var_8], 6
jmp loc_D5384
loc_D5296:
mov eax, [rsp+98h+var_60]
sub eax, [rsp+98h+var_5C]
mov [rsp+98h+var_64], eax
mov rax, [rsp+98h+var_38]
mov rdi, [rax+10h]
mov rsi, [rax+18h]
call JS_IsUndefined_0
cmp eax, 0
jnz short loc_D531D
mov rdi, [rsp+98h+var_28]
mov rax, [rsp+98h+var_38]
mov r9d, [rsp+98h+var_60]
sub r9d, [rsp+98h+var_5C]
mov rdx, [rax+10h]
mov rcx, [rax+18h]
lea rsi, [rsp+98h+var_64]
xor r8d, r8d
mov [rsp+98h+var_98], 0
call JS_ToInt32Clamp
cmp eax, 0
jz short loc_D531B
mov rdi, [rsp+98h+var_28]
mov rsi, [rsp+98h+var_48]
mov rdx, [rsp+98h+var_40]
call JS_FreeValue
mov dword ptr [rsp+98h+var_10], 0
mov [rsp+98h+var_8], 6
jmp short loc_D5384
loc_D531B:
jmp short $+2
loc_D531D:
mov rdi, [rsp+98h+var_28]
mov rsi, [rsp+98h+var_70]
mov edx, [rsp+98h+var_5C]
mov ecx, [rsp+98h+var_5C]
add ecx, [rsp+98h+var_64]
call js_sub_string
mov [rsp+98h+var_90], rax
mov [rsp+98h+var_88], rdx
mov rax, [rsp+98h+var_90]
mov [rsp+98h+var_58], rax
mov rax, [rsp+98h+var_88]
mov [rsp+98h+var_50], rax
mov rdi, [rsp+98h+var_28]
mov rsi, [rsp+98h+var_48]
mov rdx, [rsp+98h+var_40]
call JS_FreeValue
mov rax, [rsp+98h+var_58]
mov [rsp+98h+var_10], rax
mov rax, [rsp+98h+var_50]
mov [rsp+98h+var_8], rax
loc_D5384:
mov rax, [rsp+98h+var_10]
mov rdx, [rsp+98h+var_8]
add rsp, 98h
retn
|
long long js_string_substr(
long long a1,
long long a2,
long long a3,
long long a4,
long long a5,
long long a6,
__m128 a7,
__m128 a8,
__m128 a9,
__m128 a10,
__m128 a11,
__m128 a12,
__m128 a13,
__m128 a14)
{
long long v14; // rdx
long long v15; // rdx
_DWORD *v17; // [rsp+28h] [rbp-70h]
int v18; // [rsp+34h] [rbp-64h] BYREF
int v19; // [rsp+38h] [rbp-60h]
int v20; // [rsp+3Ch] [rbp-5Ch] BYREF
_DWORD *v21; // [rsp+40h] [rbp-58h]
long long v22; // [rsp+48h] [rbp-50h]
long long v23; // [rsp+50h] [rbp-48h]
long long v24; // [rsp+58h] [rbp-40h]
long long v25; // [rsp+60h] [rbp-38h]
int v26; // [rsp+6Ch] [rbp-2Ch]
long long v27; // [rsp+70h] [rbp-28h]
long long v28; // [rsp+78h] [rbp-20h]
long long v29; // [rsp+80h] [rbp-18h]
long long v30; // [rsp+88h] [rbp-10h]
long long v31; // [rsp+90h] [rbp-8h]
v28 = a2;
v29 = a3;
v27 = a1;
v26 = a4;
v25 = a5;
v23 = JS_ToStringCheckObject(a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14);
v24 = v14;
if ( JS_IsException_1(v23, v14) )
{
v30 = v23;
v31 = v24;
}
else
{
v17 = (_DWORD *)v23;
v19 = *(_QWORD *)(v23 + 4) & 0x7FFFFFFF;
if ( (unsigned int)JS_ToInt32Clamp(v27, &v20, *(_DWORD **)v25, *(_QWORD *)(v25 + 8), 0, v19, v19) )
{
JS_FreeValue(v27, v23, v24);
LODWORD(v30) = 0;
v31 = 6LL;
}
else
{
v18 = v19 - v20;
if ( JS_IsUndefined_0(*(_QWORD *)(v25 + 16), *(_QWORD *)(v25 + 24))
|| !(unsigned int)JS_ToInt32Clamp(v27, &v18, *(_DWORD **)(v25 + 16), *(_QWORD *)(v25 + 24), 0, v19 - v20, 0) )
{
v21 = js_sub_string(v27, v17, v20, v18 + v20);
v22 = v15;
JS_FreeValue(v27, v23, v24);
v30 = (long long)v21;
v31 = v22;
}
else
{
JS_FreeValue(v27, v23, v24);
LODWORD(v30) = 0;
v31 = 6LL;
}
}
}
return v30;
}
|
js_string_substr:
SUB RSP,0x98
MOV qword ptr [RSP + 0x78],RSI
MOV qword ptr [RSP + 0x80],RDX
MOV qword ptr [RSP + 0x70],RDI
MOV dword ptr [RSP + 0x6c],ECX
MOV qword ptr [RSP + 0x60],R8
MOV RDI,qword ptr [RSP + 0x70]
MOV RSI,qword ptr [RSP + 0x78]
MOV RDX,qword ptr [RSP + 0x80]
CALL 0x001707d0
MOV qword ptr [RSP + 0x18],RAX
MOV qword ptr [RSP + 0x20],RDX
MOV RAX,qword ptr [RSP + 0x18]
MOV qword ptr [RSP + 0x50],RAX
MOV RAX,qword ptr [RSP + 0x20]
MOV qword ptr [RSP + 0x58],RAX
MOV RDI,qword ptr [RSP + 0x50]
MOV RSI,qword ptr [RSP + 0x58]
CALL 0x00123cc0
CMP EAX,0x0
JZ 0x001d521a
MOV RAX,qword ptr [RSP + 0x50]
MOV qword ptr [RSP + 0x88],RAX
MOV RAX,qword ptr [RSP + 0x58]
MOV qword ptr [RSP + 0x90],RAX
JMP 0x001d5384
LAB_001d521a:
MOV RAX,qword ptr [RSP + 0x50]
MOV qword ptr [RSP + 0x28],RAX
MOV RAX,qword ptr [RSP + 0x28]
MOV RAX,qword ptr [RAX + 0x4]
AND RAX,0x7fffffff
MOV dword ptr [RSP + 0x38],EAX
MOV RDI,qword ptr [RSP + 0x70]
MOV RCX,qword ptr [RSP + 0x60]
MOV R9D,dword ptr [RSP + 0x38]
MOV EAX,dword ptr [RSP + 0x38]
MOV RDX,qword ptr [RCX]
MOV RCX,qword ptr [RCX + 0x8]
LEA RSI,[RSP + 0x3c]
XOR R8D,R8D
MOV dword ptr [RSP],EAX
CALL 0x00138850
CMP EAX,0x0
JZ 0x001d5296
MOV RDI,qword ptr [RSP + 0x70]
MOV RSI,qword ptr [RSP + 0x50]
MOV RDX,qword ptr [RSP + 0x58]
CALL 0x00123c90
MOV dword ptr [RSP + 0x88],0x0
MOV qword ptr [RSP + 0x90],0x6
JMP 0x001d5384
LAB_001d5296:
MOV EAX,dword ptr [RSP + 0x38]
SUB EAX,dword ptr [RSP + 0x3c]
MOV dword ptr [RSP + 0x34],EAX
MOV RAX,qword ptr [RSP + 0x60]
MOV RDI,qword ptr [RAX + 0x10]
MOV RSI,qword ptr [RAX + 0x18]
CALL 0x0012e260
CMP EAX,0x0
JNZ 0x001d531d
MOV RDI,qword ptr [RSP + 0x70]
MOV RAX,qword ptr [RSP + 0x60]
MOV R9D,dword ptr [RSP + 0x38]
SUB R9D,dword ptr [RSP + 0x3c]
MOV RDX,qword ptr [RAX + 0x10]
MOV RCX,qword ptr [RAX + 0x18]
LEA RSI,[RSP + 0x34]
XOR R8D,R8D
MOV dword ptr [RSP],0x0
CALL 0x00138850
CMP EAX,0x0
JZ 0x001d531b
MOV RDI,qword ptr [RSP + 0x70]
MOV RSI,qword ptr [RSP + 0x50]
MOV RDX,qword ptr [RSP + 0x58]
CALL 0x00123c90
MOV dword ptr [RSP + 0x88],0x0
MOV qword ptr [RSP + 0x90],0x6
JMP 0x001d5384
LAB_001d531b:
JMP 0x001d531d
LAB_001d531d:
MOV RDI,qword ptr [RSP + 0x70]
MOV RSI,qword ptr [RSP + 0x28]
MOV EDX,dword ptr [RSP + 0x3c]
MOV ECX,dword ptr [RSP + 0x3c]
ADD ECX,dword ptr [RSP + 0x34]
CALL 0x00150af0
MOV qword ptr [RSP + 0x8],RAX
MOV qword ptr [RSP + 0x10],RDX
MOV RAX,qword ptr [RSP + 0x8]
MOV qword ptr [RSP + 0x40],RAX
MOV RAX,qword ptr [RSP + 0x10]
MOV qword ptr [RSP + 0x48],RAX
MOV RDI,qword ptr [RSP + 0x70]
MOV RSI,qword ptr [RSP + 0x50]
MOV RDX,qword ptr [RSP + 0x58]
CALL 0x00123c90
MOV RAX,qword ptr [RSP + 0x40]
MOV qword ptr [RSP + 0x88],RAX
MOV RAX,qword ptr [RSP + 0x48]
MOV qword ptr [RSP + 0x90],RAX
LAB_001d5384:
MOV RAX,qword ptr [RSP + 0x88]
MOV RDX,qword ptr [RSP + 0x90]
ADD RSP,0x98
RET
|
int1 [16]
js_string_substr(int8 param_1,int8 param_2,int8 param_3,int4 param_4,
int8 *param_5)
{
int1 auVar1 [16];
int8 uVar2;
int iVar3;
int local_64;
uint local_60;
int local_5c;
int1 local_58 [16];
int1 local_48 [16];
int8 *local_38;
int4 local_2c;
int8 local_28;
int8 local_20;
int8 local_18;
int4 local_10;
int4 uStack_c;
int8 local_8;
local_38 = param_5;
local_2c = param_4;
local_28 = param_1;
local_20 = param_2;
local_18 = param_3;
local_48 = JS_ToStringCheckObject(param_1,param_2,param_3);
iVar3 = JS_IsException(local_48._0_8_,local_48._8_8_);
uVar2 = local_48._0_8_;
if (iVar3 == 0) {
local_60 = (uint)*(int8 *)(local_48._0_8_ + 4) & 0x7fffffff;
iVar3 = JS_ToInt32Clamp(local_28,&local_5c,*local_38,local_38[1],0,local_60,local_60);
if (iVar3 == 0) {
local_64 = local_60 - local_5c;
iVar3 = JS_IsUndefined(local_38[2],local_38[3]);
if (iVar3 == 0) {
iVar3 = JS_ToInt32Clamp(local_28,&local_64,local_38[2],local_38[3],0,local_60 - local_5c,0);
if (iVar3 != 0) {
JS_FreeValue(local_28,local_48._0_8_,local_48._8_8_);
local_10 = 0;
local_8 = 6;
goto LAB_001d5384;
}
}
local_58 = js_sub_string(local_28,uVar2,local_5c,local_5c + local_64);
JS_FreeValue(local_28,local_48._0_8_,local_48._8_8_);
local_10 = local_58._0_4_;
uStack_c = local_58._4_4_;
local_8 = local_58._8_8_;
}
else {
JS_FreeValue(local_28,local_48._0_8_,local_48._8_8_);
local_10 = 0;
local_8 = 6;
}
}
else {
local_10 = local_48._0_4_;
uStack_c = local_48._4_4_;
local_8 = local_48._8_8_;
}
LAB_001d5384:
auVar1._4_4_ = uStack_c;
auVar1._0_4_ = local_10;
auVar1._8_8_ = local_8;
return auVar1;
}
|
|
9,365 |
js_string_substr
|
bluesky950520[P]quickjs/quickjs.c
|
static JSValue js_string_substr(JSContext *ctx, JSValue this_val,
int argc, JSValue *argv)
{
JSValue str, ret;
int a, len, n;
JSString *p;
str = JS_ToStringCheckObject(ctx, this_val);
if (JS_IsException(str))
return str;
p = JS_VALUE_GET_STRING(str);
len = p->len;
if (JS_ToInt32Clamp(ctx, &a, argv[0], 0, len, len)) {
JS_FreeValue(ctx, str);
return JS_EXCEPTION;
}
n = len - a;
if (!JS_IsUndefined(argv[1])) {
if (JS_ToInt32Clamp(ctx, &n, argv[1], 0, len - a, 0)) {
JS_FreeValue(ctx, str);
return JS_EXCEPTION;
}
}
ret = js_sub_string(ctx, p, a, a + n);
JS_FreeValue(ctx, str);
return ret;
}
|
O2
|
c
|
js_string_substr:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %r8, %r13
movq %rdi, %r15
callq 0x3a290
movq %rax, %rbx
movq %rdx, %r14
cmpl $0x6, %r14d
je 0x68401
movl $0x7fffffff, %ebp # imm = 0x7FFFFFFF
andl 0x4(%rbx), %ebp
movq (%r13), %rdx
movq 0x8(%r13), %rcx
movl %ebp, (%rsp)
leaq 0x14(%rsp), %rsi
xorl %r12d, %r12d
movq %r15, %rdi
xorl %r8d, %r8d
movl %ebp, %r9d
callq 0x213d5
testl %eax, %eax
je 0x68397
pushq $0x6
popq %r13
jmp 0x683ed
movl 0x14(%rsp), %edx
subl %edx, %ebp
movl %ebp, 0xc(%rsp)
movq 0x18(%r13), %rcx
cmpl $0x3, %ecx
je 0x683d8
movl %edx, 0x10(%rsp)
movq 0x10(%r13), %rdx
andl $0x0, (%rsp)
leaq 0xc(%rsp), %rsi
xorl %r12d, %r12d
movq %r15, %rdi
xorl %r8d, %r8d
movl %ebp, %r9d
callq 0x213d5
testl %eax, %eax
jne 0x68391
movl 0xc(%rsp), %ebp
movl 0x10(%rsp), %edx
addl %edx, %ebp
movq %r15, %rdi
movq %rbx, %rsi
movl %ebp, %ecx
callq 0x2e21d
movq %rax, %r12
movq %rdx, %r13
movq %r15, %rdi
movq %rbx, %rsi
movq %r14, %rdx
callq 0x1801e
movq %r12, %rbx
movq %r13, %r14
movq %rbx, %rax
movq %r14, %rdx
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
|
js_string_substr:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 18h
mov r13, r8
mov r15, rdi
call JS_ToStringCheckObject
mov rbx, rax
mov r14, rdx
cmp r14d, 6
jz loc_68401
mov ebp, 7FFFFFFFh
and ebp, [rbx+4]
mov rdx, [r13+0]
mov rcx, [r13+8]
mov [rsp+48h+var_48], ebp
lea rsi, [rsp+48h+var_34]
xor r12d, r12d
mov rdi, r15
xor r8d, r8d
mov r9d, ebp
call JS_ToInt32Clamp
test eax, eax
jz short loc_68397
loc_68391:
push 6
pop r13
jmp short loc_683ED
loc_68397:
mov edx, [rsp+48h+var_34]
sub ebp, edx
mov [rsp+48h+var_3C], ebp
mov rcx, [r13+18h]
cmp ecx, 3
jz short loc_683D8
mov [rsp+48h+var_38], edx
mov rdx, [r13+10h]
and [rsp+48h+var_48], 0
lea rsi, [rsp+48h+var_3C]
xor r12d, r12d
mov rdi, r15
xor r8d, r8d
mov r9d, ebp
call JS_ToInt32Clamp
test eax, eax
jnz short loc_68391
mov ebp, [rsp+48h+var_3C]
mov edx, [rsp+48h+var_38]
loc_683D8:
add ebp, edx
mov rdi, r15
mov rsi, rbx
mov ecx, ebp
call js_sub_string
mov r12, rax
mov r13, rdx
loc_683ED:
mov rdi, r15
mov rsi, rbx
mov rdx, r14
call JS_FreeValue
mov rbx, r12
mov r14, r13
loc_68401:
mov rax, rbx
mov rdx, r14
add rsp, 18h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
|
_DWORD * js_string_substr(
long long a1,
long long a2,
long long a3,
long long a4,
long long a5,
long long a6,
__m128 a7,
__m128 a8,
__m128 a9,
__m128 a10,
__m128 a11,
__m128 a12,
__m128 a13,
__m128 a14)
{
long long v15; // rax
_DWORD *v16; // rbx
long long v17; // rdx
long long v18; // r14
int v19; // ebp
long long v20; // r12
long long v21; // rdx
int v22; // ebp
long long v23; // rcx
int v25; // [rsp+Ch] [rbp-3Ch] BYREF
unsigned int v26; // [rsp+10h] [rbp-38h]
unsigned int v27[13]; // [rsp+14h] [rbp-34h] BYREF
v15 = JS_ToStringCheckObject(a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14);
v16 = (_DWORD *)v15;
v18 = v17;
if ( (_DWORD)v17 != 6 )
{
v19 = *(_DWORD *)(v15 + 4) & 0x7FFFFFFF;
v20 = 0LL;
if ( !(unsigned int)JS_ToInt32Clamp(a1, (int *)v27, *(_DWORD **)a5, *(_QWORD *)(a5 + 8), 0, v19, v19) )
{
v21 = v27[0];
v22 = v19 - v27[0];
v25 = v22;
v23 = *(_QWORD *)(a5 + 24);
if ( (_DWORD)v23 != 3 )
{
v26 = v27[0];
v20 = 0LL;
if ( (unsigned int)JS_ToInt32Clamp(a1, &v25, *(_DWORD **)(a5 + 16), v23, 0, v22, 0) )
goto LABEL_8;
v22 = v25;
v21 = v26;
}
v20 = js_sub_string(a1, v16, v21, (int)v21 + v22);
}
LABEL_8:
JS_FreeValue(a1, (long long)v16, v18);
return (_DWORD *)v20;
}
return v16;
}
|
js_string_substr:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x18
MOV R13,R8
MOV R15,RDI
CALL 0x0013a290
MOV RBX,RAX
MOV R14,RDX
CMP R14D,0x6
JZ 0x00168401
MOV EBP,0x7fffffff
AND EBP,dword ptr [RBX + 0x4]
MOV RDX,qword ptr [R13]
MOV RCX,qword ptr [R13 + 0x8]
MOV dword ptr [RSP],EBP
LEA RSI,[RSP + 0x14]
XOR R12D,R12D
MOV RDI,R15
XOR R8D,R8D
MOV R9D,EBP
CALL 0x001213d5
TEST EAX,EAX
JZ 0x00168397
LAB_00168391:
PUSH 0x6
POP R13
JMP 0x001683ed
LAB_00168397:
MOV EDX,dword ptr [RSP + 0x14]
SUB EBP,EDX
MOV dword ptr [RSP + 0xc],EBP
MOV RCX,qword ptr [R13 + 0x18]
CMP ECX,0x3
JZ 0x001683d8
MOV dword ptr [RSP + 0x10],EDX
MOV RDX,qword ptr [R13 + 0x10]
AND dword ptr [RSP],0x0
LEA RSI,[RSP + 0xc]
XOR R12D,R12D
MOV RDI,R15
XOR R8D,R8D
MOV R9D,EBP
CALL 0x001213d5
TEST EAX,EAX
JNZ 0x00168391
MOV EBP,dword ptr [RSP + 0xc]
MOV EDX,dword ptr [RSP + 0x10]
LAB_001683d8:
ADD EBP,EDX
MOV RDI,R15
MOV RSI,RBX
MOV ECX,EBP
CALL 0x0012e21d
MOV R12,RAX
MOV R13,RDX
LAB_001683ed:
MOV RDI,R15
MOV RSI,RBX
MOV RDX,R14
CALL 0x0011801e
MOV RBX,R12
MOV R14,R13
LAB_00168401:
MOV RAX,RBX
MOV RDX,R14
ADD RSP,0x18
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
int1 [16] js_string_substr(int8 param_1)
{
int iVar1;
long lVar2;
uint uVar3;
int8 *in_R8;
int1 auVar4 [16];
int1 auVar5 [16];
int local_3c;
int local_38;
int local_34;
auVar4 = JS_ToStringCheckObject();
lVar2 = auVar4._0_8_;
if (auVar4._8_4_ == 6) {
return auVar4;
}
uVar3 = *(uint *)(lVar2 + 4) & 0x7fffffff;
iVar1 = JS_ToInt32Clamp(param_1,&local_34,*in_R8,in_R8[1],0,uVar3,uVar3);
if (iVar1 == 0) {
local_3c = uVar3 - local_34;
if ((int)in_R8[3] != 3) {
local_38 = local_34;
iVar1 = JS_ToInt32Clamp(param_1,&local_3c,in_R8[2],in_R8[3],0,local_3c,0);
local_34 = local_38;
if (iVar1 != 0) goto LAB_00168391;
}
auVar5 = js_sub_string(param_1,lVar2,local_34,local_3c + local_34);
}
else {
LAB_00168391:
auVar5 = ZEXT816(6) << 0x40;
}
JS_FreeValue(param_1,lVar2,auVar4._8_8_);
return auVar5;
}
|
|
9,366 |
ggml_visit_parents
|
7CodeWizard[P]stablediffusion/ggml/src/ggml.c
|
static void ggml_visit_parents(struct ggml_cgraph * cgraph, struct ggml_tensor * node) {
if (node->grad == NULL) {
// this usually happens when we generate intermediate nodes from constants in the backward pass
// it can also happen during forward pass, if the user performs computations with constants
if (node->op != GGML_OP_NONE) {
//GGML_PRINT_DEBUG("%s: warning: node %p has no grad, but op %d\n", __func__, (void *) node, node->op);
}
}
// check if already visited
if (ggml_hash_insert(cgraph->visited_hash_table, node) == GGML_HASHTABLE_ALREADY_EXISTS) {
return;
}
for (int i = 0; i < GGML_MAX_SRC; ++i) {
const int k =
(cgraph->order == GGML_CGRAPH_EVAL_ORDER_LEFT_TO_RIGHT) ? i :
(cgraph->order == GGML_CGRAPH_EVAL_ORDER_RIGHT_TO_LEFT) ? (GGML_MAX_SRC-1-i) :
/* unknown order, just fall back to using i*/ i;
if (node->src[k]) {
ggml_visit_parents(cgraph, node->src[k]);
}
}
if (node->op == GGML_OP_NONE && node->grad == NULL) {
// reached a leaf node, not part of the gradient graph (e.g. a constant)
GGML_ASSERT(cgraph->n_leafs < cgraph->size);
if (strlen(node->name) == 0) {
ggml_format_name(node, "leaf_%d", cgraph->n_leafs);
}
cgraph->leafs[cgraph->n_leafs] = node;
cgraph->n_leafs++;
} else {
GGML_ASSERT(cgraph->n_nodes < cgraph->size);
if (strlen(node->name) == 0) {
ggml_format_name(node, "node_%d", cgraph->n_nodes);
}
cgraph->nodes[cgraph->n_nodes] = node;
if (cgraph->grads) {
cgraph->grads[cgraph->n_nodes] = node->grad;
}
cgraph->n_nodes++;
}
}
|
O1
|
c
|
ggml_visit_parents:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
movq 0x28(%rdi), %rdi
movq 0x30(%rbx), %rsi
movq %r14, %rdx
callq 0x9600a
cmpq $-0x2, %rax
je 0x9f0e0
xorl %ebp, %ebp
movl $0x9, %r15d
movl 0x38(%rbx), %eax
cmpl $0x1, %eax
movl %ebp, %ecx
cmovel %r15d, %ecx
testl %eax, %eax
cmovel %ebp, %ecx
movq 0xa0(%r14,%rcx,8), %rsi
testq %rsi, %rsi
je 0x9f07c
movq %rbx, %rdi
callq 0x9f027
incl %ebp
addl $-0x1, %r15d
jb 0x9f056
cmpl $0x0, 0x50(%r14)
jne 0x9f095
cmpq $0x0, 0x98(%r14)
je 0x9f0eb
movl 0x4(%rbx), %edx
cmpl (%rbx), %edx
jge 0x9f121
cmpb $0x0, 0x120(%r14)
jne 0x9f0bb
leaq 0x28915(%rip), %rsi # 0xc79c6
movq %r14, %rdi
xorl %eax, %eax
callq 0x90a74
movq 0x10(%rbx), %rcx
movslq 0x4(%rbx), %rax
movq %r14, (%rcx,%rax,8)
movq 0x18(%rbx), %rcx
testq %rcx, %rcx
je 0x9f0db
movq 0x98(%r14), %rdx
movq %rdx, (%rcx,%rax,8)
incl %eax
movl %eax, 0x4(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movl 0x8(%rbx), %edx
cmpl (%rbx), %edx
jge 0x9f126
cmpb $0x0, 0x120(%r14)
jne 0x9f10d
leaq 0x2889c(%rip), %rsi # 0xc799f
movq %r14, %rdi
xorl %eax, %eax
callq 0x90a74
movq 0x20(%rbx), %rax
movslq 0x8(%rbx), %rcx
movq %r14, (%rax,%rcx,8)
leal 0x1(%rcx), %eax
movl %eax, 0x8(%rbx)
jmp 0x9f0e0
callq 0x116f2
callq 0x11737
|
ggml_visit_parents:
push rbp
push r15
push r14
push rbx
push rax
mov r14, rsi
mov rbx, rdi
mov rdi, [rdi+28h]
mov rsi, [rbx+30h]
mov rdx, r14
call ggml_hash_insert
cmp rax, 0FFFFFFFFFFFFFFFEh
jz loc_9F0E0
xor ebp, ebp
mov r15d, 9
loc_9F056:
mov eax, [rbx+38h]
cmp eax, 1
mov ecx, ebp
cmovz ecx, r15d
test eax, eax
cmovz ecx, ebp
mov rsi, [r14+rcx*8+0A0h]
test rsi, rsi
jz short loc_9F07C
mov rdi, rbx
call ggml_visit_parents
loc_9F07C:
inc ebp
add r15d, 0FFFFFFFFh
jb short loc_9F056
cmp dword ptr [r14+50h], 0
jnz short loc_9F095
cmp qword ptr [r14+98h], 0
jz short loc_9F0EB
loc_9F095:
mov edx, [rbx+4]
cmp edx, [rbx]
jge loc_9F121
cmp byte ptr [r14+120h], 0
jnz short loc_9F0BB
lea rsi, aNodeD; "node_%d"
mov rdi, r14
xor eax, eax
call ggml_format_name
loc_9F0BB:
mov rcx, [rbx+10h]
movsxd rax, dword ptr [rbx+4]
mov [rcx+rax*8], r14
mov rcx, [rbx+18h]
test rcx, rcx
jz short loc_9F0DB
mov rdx, [r14+98h]
mov [rcx+rax*8], rdx
loc_9F0DB:
inc eax
mov [rbx+4], eax
loc_9F0E0:
add rsp, 8
pop rbx
pop r14
pop r15
pop rbp
retn
loc_9F0EB:
mov edx, [rbx+8]
cmp edx, [rbx]
jge short loc_9F126
cmp byte ptr [r14+120h], 0
jnz short loc_9F10D
lea rsi, aLeafD; "leaf_%d"
mov rdi, r14
xor eax, eax
call ggml_format_name
loc_9F10D:
mov rax, [rbx+20h]
movsxd rcx, dword ptr [rbx+8]
mov [rax+rcx*8], r14
lea eax, [rcx+1]
mov [rbx+8], eax
jmp short loc_9F0E0
loc_9F121:
call ggml_visit_parents_cold_1
loc_9F126:
call ggml_visit_parents_cold_2
|
long long ggml_visit_parents(
unsigned long long a1,
unsigned long long a2,
__m128 a3,
__m128 a4,
__m128 a5,
__m128 a6,
double a7,
double a8,
__m128 a9,
__m128 a10)
{
char v10; // al
unsigned long long v12; // rdi
long long result; // rax
long long v14; // r8
long long v15; // r9
__m128 v16; // xmm4
__m128 v17; // xmm5
unsigned int v18; // ebp
unsigned int v19; // r15d
int v20; // eax
long long v21; // rcx
long long v23; // rdx
long long v24; // rax
long long v25; // rcx
long long v26; // rdx
long long v27; // rcx
char v28; // [rsp-8h] [rbp-28h]
v28 = v10;
v12 = *(_QWORD *)(a1 + 40);
result = ggml_hash_insert(v12, *(_QWORD *)(a1 + 48), a2);
if ( result != -2 )
{
v18 = 0;
v19 = 9;
do
{
v20 = *(_DWORD *)(a1 + 56);
v21 = v18;
if ( v20 == 1 )
v21 = v19;
if ( !v20 )
v21 = v18;
if ( *(_QWORD *)(a2 + 8 * v21 + 160) )
{
v12 = a1;
ggml_visit_parents(a1);
}
++v18;
}
while ( v19-- != 0 );
if ( *(_DWORD *)(a2 + 80) || *(_QWORD *)(a2 + 152) )
{
v23 = *(unsigned int *)(a1 + 4);
if ( (int)v23 >= *(_DWORD *)a1 )
ggml_visit_parents_cold_1(v12);
if ( !*(_BYTE *)(a2 + 288) )
ggml_format_name(a2, (long long)"node_%d", v23, v21, v14, v15, a3, a4, a5, a6, v16, v17, a9, a10, v28);
v24 = *(int *)(a1 + 4);
*(_QWORD *)(*(_QWORD *)(a1 + 16) + 8 * v24) = a2;
v25 = *(_QWORD *)(a1 + 24);
if ( v25 )
*(_QWORD *)(v25 + 8 * v24) = *(_QWORD *)(a2 + 152);
result = (unsigned int)(v24 + 1);
*(_DWORD *)(a1 + 4) = result;
}
else
{
v26 = *(unsigned int *)(a1 + 8);
if ( (int)v26 >= *(_DWORD *)a1 )
ggml_visit_parents_cold_2(v12);
if ( !*(_BYTE *)(a2 + 288) )
ggml_format_name(a2, (long long)"leaf_%d", v26, v21, v14, v15, a3, a4, a5, a6, v16, v17, a9, a10, v28);
v27 = *(int *)(a1 + 8);
*(_QWORD *)(*(_QWORD *)(a1 + 32) + 8 * v27) = a2;
result = (unsigned int)(v27 + 1);
*(_DWORD *)(a1 + 8) = result;
}
}
return result;
}
| |||
9,367 |
ggml_visit_parents
|
7CodeWizard[P]stablediffusion/ggml/src/ggml.c
|
static void ggml_visit_parents(struct ggml_cgraph * cgraph, struct ggml_tensor * node) {
if (node->grad == NULL) {
// this usually happens when we generate intermediate nodes from constants in the backward pass
// it can also happen during forward pass, if the user performs computations with constants
if (node->op != GGML_OP_NONE) {
//GGML_PRINT_DEBUG("%s: warning: node %p has no grad, but op %d\n", __func__, (void *) node, node->op);
}
}
// check if already visited
if (ggml_hash_insert(cgraph->visited_hash_table, node) == GGML_HASHTABLE_ALREADY_EXISTS) {
return;
}
for (int i = 0; i < GGML_MAX_SRC; ++i) {
const int k =
(cgraph->order == GGML_CGRAPH_EVAL_ORDER_LEFT_TO_RIGHT) ? i :
(cgraph->order == GGML_CGRAPH_EVAL_ORDER_RIGHT_TO_LEFT) ? (GGML_MAX_SRC-1-i) :
/* unknown order, just fall back to using i*/ i;
if (node->src[k]) {
ggml_visit_parents(cgraph, node->src[k]);
}
}
if (node->op == GGML_OP_NONE && node->grad == NULL) {
// reached a leaf node, not part of the gradient graph (e.g. a constant)
GGML_ASSERT(cgraph->n_leafs < cgraph->size);
if (strlen(node->name) == 0) {
ggml_format_name(node, "leaf_%d", cgraph->n_leafs);
}
cgraph->leafs[cgraph->n_leafs] = node;
cgraph->n_leafs++;
} else {
GGML_ASSERT(cgraph->n_nodes < cgraph->size);
if (strlen(node->name) == 0) {
ggml_format_name(node, "node_%d", cgraph->n_nodes);
}
cgraph->nodes[cgraph->n_nodes] = node;
if (cgraph->grads) {
cgraph->grads[cgraph->n_nodes] = node->grad;
}
cgraph->n_nodes++;
}
}
|
O2
|
c
|
ggml_visit_parents:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
movq 0x28(%rdi), %rdi
movq 0x30(%rbx), %rsi
movq %r14, %rdx
callq 0x6f9cd
cmpq $-0x2, %rax
je 0x7930e
xorl %ebp, %ebp
pushq $0x9
popq %r15
cmpl $0xa, %ebp
je 0x792b0
movl 0x38(%rbx), %eax
cmpl $0x1, %eax
movl %ebp, %ecx
cmovel %r15d, %ecx
testl %eax, %eax
cmovel %ebp, %ecx
movq 0xa0(%r14,%rcx,8), %rsi
testq %rsi, %rsi
je 0x792a9
movq %rbx, %rdi
callq 0x79251
incl %ebp
decl %r15d
jmp 0x7927e
cmpl $0x0, 0x50(%r14)
jne 0x792c1
cmpq $0x0, 0x98(%r14)
je 0x79319
movl 0x4(%rbx), %edx
cmpl (%rbx), %edx
jge 0x79350
cmpb $0x0, 0x120(%r14)
jne 0x792ea
leaq 0x2a4b8(%rip), %rsi # 0xa3795
movq %r14, %rdi
xorl %eax, %eax
callq 0x6987c
movl 0x4(%rbx), %edx
movq 0x10(%rbx), %rcx
movslq %edx, %rax
movq %r14, (%rcx,%rax,8)
movq 0x18(%rbx), %rcx
testq %rcx, %rcx
je 0x79309
movq 0x98(%r14), %rsi
movq %rsi, (%rcx,%rax,8)
incl %edx
movl %edx, 0x4(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movl 0x8(%rbx), %edx
cmpl (%rbx), %edx
jge 0x79394
cmpb $0x0, 0x120(%r14)
jne 0x7933e
leaq 0x2a43d(%rip), %rsi # 0xa376e
movq %r14, %rdi
xorl %eax, %eax
callq 0x6987c
movl 0x8(%rbx), %edx
movq 0x20(%rbx), %rax
movslq %edx, %rcx
movq %r14, (%rax,%rcx,8)
incl %ecx
movl %ecx, 0x8(%rbx)
jmp 0x7930e
movq 0x5cbf1(%rip), %rax # 0xd5f48
movq (%rax), %rdi
callq 0xa6f0
movq 0x5cc42(%rip), %rax # 0xd5fa8
movq (%rax), %rdi
leaq 0x20eae(%rip), %rsi # 0x9a21e
leaq 0x28507(%rip), %rdx # 0xa187e
leaq 0x2a3f8(%rip), %r8 # 0xa3776
movl $0x3dfe, %ecx # imm = 0x3DFE
xorl %eax, %eax
callq 0xa8b0
callq 0x67550
callq 0xa300
movq 0x5cbad(%rip), %rax # 0xd5f48
movq (%rax), %rdi
callq 0xa6f0
movq 0x5cbfe(%rip), %rax # 0xd5fa8
movq (%rax), %rdi
leaq 0x20e6a(%rip), %rsi # 0x9a21e
leaq 0x284c3(%rip), %rdx # 0xa187e
leaq 0x2a38d(%rip), %r8 # 0xa374f
movl $0x3df5, %ecx # imm = 0x3DF5
jmp 0x79383
|
ggml_visit_parents:
push rbp
push r15
push r14
push rbx
push rax
mov r14, rsi
mov rbx, rdi
mov rdi, [rdi+28h]
mov rsi, [rbx+30h]
mov rdx, r14
call ggml_hash_insert
cmp rax, 0FFFFFFFFFFFFFFFEh
jz loc_7930E
xor ebp, ebp
push 9
pop r15
loc_7927E:
cmp ebp, 0Ah
jz short loc_792B0
mov eax, [rbx+38h]
cmp eax, 1
mov ecx, ebp
cmovz ecx, r15d
test eax, eax
cmovz ecx, ebp
mov rsi, [r14+rcx*8+0A0h]
test rsi, rsi
jz short loc_792A9
mov rdi, rbx
call ggml_visit_parents
loc_792A9:
inc ebp
dec r15d
jmp short loc_7927E
loc_792B0:
cmp dword ptr [r14+50h], 0
jnz short loc_792C1
cmp qword ptr [r14+98h], 0
jz short loc_79319
loc_792C1:
mov edx, [rbx+4]
cmp edx, [rbx]
jge loc_79350
cmp byte ptr [r14+120h], 0
jnz short loc_792EA
lea rsi, aNodeD; "node_%d"
mov rdi, r14
xor eax, eax
call ggml_format_name
mov edx, [rbx+4]
loc_792EA:
mov rcx, [rbx+10h]
movsxd rax, edx
mov [rcx+rax*8], r14
mov rcx, [rbx+18h]
test rcx, rcx
jz short loc_79309
mov rsi, [r14+98h]
mov [rcx+rax*8], rsi
loc_79309:
inc edx
mov [rbx+4], edx
loc_7930E:
add rsp, 8
pop rbx
pop r14
pop r15
pop rbp
retn
loc_79319:
mov edx, [rbx+8]
cmp edx, [rbx]
jge short loc_79394
cmp byte ptr [r14+120h], 0
jnz short loc_7933E
lea rsi, aLeafD; "leaf_%d"
mov rdi, r14
xor eax, eax
call ggml_format_name
mov edx, [rbx+8]
loc_7933E:
mov rax, [rbx+20h]
movsxd rcx, edx
mov [rax+rcx*8], r14
inc ecx
mov [rbx+8], ecx
jmp short loc_7930E
loc_79350:
mov rax, cs:stdout_ptr
mov rdi, [rax]
call _fflush
mov rax, cs:stderr_ptr
mov rdi, [rax]
lea rsi, aGgmlAssertSDS; "GGML_ASSERT: %s:%d: %s\n"
lea rdx, aWorkspaceLlm4b_7; "/workspace/llm4binary/github/2025_star3"...
lea r8, aCgraphNNodesCg; "cgraph->n_nodes < cgraph->size"
mov ecx, 3DFEh
loc_79383:
xor eax, eax
call _fprintf
call ggml_print_backtrace
call _abort
loc_79394:
mov rax, cs:stdout_ptr
mov rdi, [rax]
call _fflush
mov rax, cs:stderr_ptr
mov rdi, [rax]
lea rsi, aGgmlAssertSDS; "GGML_ASSERT: %s:%d: %s\n"
lea rdx, aWorkspaceLlm4b_7; "/workspace/llm4binary/github/2025_star3"...
lea r8, aCgraphNLeafsCg; "cgraph->n_leafs < cgraph->size"
mov ecx, 3DF5h
jmp short loc_79383
|
long long ggml_visit_parents(
long long a1,
unsigned long long a2,
__m128 a3,
__m128 a4,
__m128 a5,
__m128 a6,
double a7,
double a8,
__m128 a9,
__m128 a10)
{
char v10; // al
long long result; // rax
long long v12; // rcx
long long v13; // r8
long long v14; // r9
__m128 v15; // xmm4
__m128 v16; // xmm5
unsigned int v17; // ebp
unsigned int v18; // r15d
int v19; // eax
long long v20; // rdx
long long v21; // rcx
long long v22; // rdx
long long v23; // rdi
char v24; // [rsp-8h] [rbp-28h]
v24 = v10;
result = ggml_hash_insert(*(_QWORD *)(a1 + 40), *(_QWORD *)(a1 + 48), a2);
if ( result == -2 )
return result;
v17 = 0;
v18 = 9;
while ( v17 != 10 )
{
v19 = *(_DWORD *)(a1 + 56);
v12 = v17;
if ( v19 == 1 )
v12 = v18;
if ( !v19 )
v12 = v17;
if ( *(_QWORD *)(a2 + 8 * v12 + 160) )
ggml_visit_parents(a1);
++v17;
--v18;
}
if ( *(_DWORD *)(a2 + 80) || *(_QWORD *)(a2 + 152) )
{
v20 = *(unsigned int *)(a1 + 4);
if ( (int)v20 < *(_DWORD *)a1 )
{
if ( !*(_BYTE *)(a2 + 288) )
{
ggml_format_name(a2, (long long)"node_%d", v20, v12, v13, v14, a3, a4, a5, a6, v15, v16, a9, a10, v24);
LODWORD(v20) = *(_DWORD *)(a1 + 4);
}
result = (int)v20;
*(_QWORD *)(*(_QWORD *)(a1 + 16) + 8LL * (int)v20) = a2;
v21 = *(_QWORD *)(a1 + 24);
if ( v21 )
*(_QWORD *)(v21 + 8LL * (int)v20) = *(_QWORD *)(a2 + 152);
*(_DWORD *)(a1 + 4) = v20 + 1;
return result;
}
fflush(stdout);
v23 = stderr;
fprintf(
stderr,
"GGML_ASSERT: %s:%d: %s\n",
"/workspace/llm4binary/github/2025_star3/7CodeWizard[P]stablediffusion/ggml/src/ggml.c",
15870LL,
"cgraph->n_nodes < cgraph->size");
LABEL_25:
ggml_print_backtrace();
abort(v23);
}
v22 = *(unsigned int *)(a1 + 8);
if ( (int)v22 >= *(_DWORD *)a1 )
{
fflush(stdout);
v23 = stderr;
fprintf(
stderr,
"GGML_ASSERT: %s:%d: %s\n",
"/workspace/llm4binary/github/2025_star3/7CodeWizard[P]stablediffusion/ggml/src/ggml.c",
15861LL,
"cgraph->n_leafs < cgraph->size");
goto LABEL_25;
}
if ( !*(_BYTE *)(a2 + 288) )
{
ggml_format_name(a2, (long long)"leaf_%d", v22, v12, v13, v14, a3, a4, a5, a6, v15, v16, a9, a10, v24);
LODWORD(v22) = *(_DWORD *)(a1 + 8);
}
result = *(_QWORD *)(a1 + 32);
*(_QWORD *)(result + 8LL * (int)v22) = a2;
*(_DWORD *)(a1 + 8) = v22 + 1;
return result;
}
|
ggml_visit_parents:
PUSH RBP
PUSH R15
PUSH R14
PUSH RBX
PUSH RAX
MOV R14,RSI
MOV RBX,RDI
MOV RDI,qword ptr [RDI + 0x28]
MOV RSI,qword ptr [RBX + 0x30]
MOV RDX,R14
CALL 0x0016f9cd
CMP RAX,-0x2
JZ 0x0017930e
XOR EBP,EBP
PUSH 0x9
POP R15
LAB_0017927e:
CMP EBP,0xa
JZ 0x001792b0
MOV EAX,dword ptr [RBX + 0x38]
CMP EAX,0x1
MOV ECX,EBP
CMOVZ ECX,R15D
TEST EAX,EAX
CMOVZ ECX,EBP
MOV RSI,qword ptr [R14 + RCX*0x8 + 0xa0]
TEST RSI,RSI
JZ 0x001792a9
MOV RDI,RBX
CALL 0x00179251
LAB_001792a9:
INC EBP
DEC R15D
JMP 0x0017927e
LAB_001792b0:
CMP dword ptr [R14 + 0x50],0x0
JNZ 0x001792c1
CMP qword ptr [R14 + 0x98],0x0
JZ 0x00179319
LAB_001792c1:
MOV EDX,dword ptr [RBX + 0x4]
CMP EDX,dword ptr [RBX]
JGE 0x00179350
CMP byte ptr [R14 + 0x120],0x0
JNZ 0x001792ea
LEA RSI,[0x1a3795]
MOV RDI,R14
XOR EAX,EAX
CALL 0x0016987c
MOV EDX,dword ptr [RBX + 0x4]
LAB_001792ea:
MOV RCX,qword ptr [RBX + 0x10]
MOVSXD RAX,EDX
MOV qword ptr [RCX + RAX*0x8],R14
MOV RCX,qword ptr [RBX + 0x18]
TEST RCX,RCX
JZ 0x00179309
MOV RSI,qword ptr [R14 + 0x98]
MOV qword ptr [RCX + RAX*0x8],RSI
LAB_00179309:
INC EDX
MOV dword ptr [RBX + 0x4],EDX
LAB_0017930e:
ADD RSP,0x8
POP RBX
POP R14
POP R15
POP RBP
RET
LAB_00179319:
MOV EDX,dword ptr [RBX + 0x8]
CMP EDX,dword ptr [RBX]
JGE 0x00179394
CMP byte ptr [R14 + 0x120],0x0
JNZ 0x0017933e
LEA RSI,[0x1a376e]
MOV RDI,R14
XOR EAX,EAX
CALL 0x0016987c
MOV EDX,dword ptr [RBX + 0x8]
LAB_0017933e:
MOV RAX,qword ptr [RBX + 0x20]
MOVSXD RCX,EDX
MOV qword ptr [RAX + RCX*0x8],R14
INC ECX
MOV dword ptr [RBX + 0x8],ECX
JMP 0x0017930e
LAB_00179350:
MOV RAX,qword ptr [0x001d5f48]
MOV RDI,qword ptr [RAX]
CALL 0x0010a6f0
MOV RAX,qword ptr [0x001d5fa8]
MOV RDI,qword ptr [RAX]
LEA RSI,[0x19a21e]
LEA RDX,[0x1a187e]
LEA R8,[0x1a3776]
MOV ECX,0x3dfe
LAB_00179383:
XOR EAX,EAX
CALL 0x0010a8b0
CALL 0x00167550
CALL 0x0010a300
LAB_00179394:
MOV RAX,qword ptr [0x001d5f48]
MOV RDI,qword ptr [RAX]
CALL 0x0010a6f0
MOV RAX,qword ptr [0x001d5fa8]
MOV RDI,qword ptr [RAX]
LEA RSI,[0x19a21e]
LEA RDX,[0x1a187e]
LEA R8,[0x1a374f]
MOV ECX,0x3df5
JMP 0x00179383
|
void ggml_visit_parents(int *param_1,long param_2)
{
long lVar1;
ulong uVar2;
int8 uVar3;
int iVar4;
uint uVar5;
FILE *__stream;
char *pcVar6;
ulong uVar7;
lVar1 = ggml_hash_insert(*(int8 *)(param_1 + 10),*(int8 *)(param_1 + 0xc),param_2);
if (lVar1 != -2) {
uVar7 = 9;
for (uVar5 = 0; uVar5 != 10; uVar5 = uVar5 + 1) {
uVar2 = (ulong)uVar5;
if (param_1[0xe] == 1) {
uVar2 = uVar7;
}
if (param_1[0xe] == 0) {
uVar2 = (ulong)uVar5;
}
if (*(long *)(param_2 + 0xa0 + uVar2 * 8) != 0) {
ggml_visit_parents(param_1);
}
uVar7 = (ulong)((int)uVar7 - 1);
}
if ((*(int *)(param_2 + 0x50) == 0) && (*(long *)(param_2 + 0x98) == 0)) {
iVar4 = param_1[2];
if (*param_1 <= iVar4) {
fflush(*(FILE **)PTR_stdout_001d5f48);
__stream = *(FILE **)PTR_stderr_001d5fa8;
pcVar6 = "cgraph->n_leafs < cgraph->size";
uVar3 = 0x3df5;
goto LAB_00179383;
}
if (*(char *)(param_2 + 0x120) == '\0') {
ggml_format_name(param_2,"leaf_%d");
iVar4 = param_1[2];
}
*(long *)(*(long *)(param_1 + 8) + (long)iVar4 * 8) = param_2;
param_1[2] = iVar4 + 1;
}
else {
iVar4 = param_1[1];
if (*param_1 <= iVar4) {
fflush(*(FILE **)PTR_stdout_001d5f48);
__stream = *(FILE **)PTR_stderr_001d5fa8;
pcVar6 = "cgraph->n_nodes < cgraph->size";
uVar3 = 0x3dfe;
LAB_00179383:
fprintf(__stream,"GGML_ASSERT: %s:%d: %s\n",
"/workspace/llm4binary/github/2025_star3/7CodeWizard[P]stablediffusion/ggml/src/ggml.c"
,uVar3,pcVar6);
ggml_print_backtrace();
/* WARNING: Subroutine does not return */
abort();
}
if (*(char *)(param_2 + 0x120) == '\0') {
ggml_format_name(param_2,"node_%d");
iVar4 = param_1[1];
}
*(long *)(*(long *)(param_1 + 4) + (long)iVar4 * 8) = param_2;
if (*(long *)(param_1 + 6) != 0) {
*(int8 *)(*(long *)(param_1 + 6) + (long)iVar4 * 8) = *(int8 *)(param_2 + 0x98);
}
param_1[1] = iVar4 + 1;
}
}
return;
}
|
|
9,368 |
ggml_visit_parents
|
7CodeWizard[P]stablediffusion/ggml/src/ggml.c
|
static void ggml_visit_parents(struct ggml_cgraph * cgraph, struct ggml_tensor * node) {
if (node->grad == NULL) {
// this usually happens when we generate intermediate nodes from constants in the backward pass
// it can also happen during forward pass, if the user performs computations with constants
if (node->op != GGML_OP_NONE) {
//GGML_PRINT_DEBUG("%s: warning: node %p has no grad, but op %d\n", __func__, (void *) node, node->op);
}
}
// check if already visited
if (ggml_hash_insert(cgraph->visited_hash_table, node) == GGML_HASHTABLE_ALREADY_EXISTS) {
return;
}
for (int i = 0; i < GGML_MAX_SRC; ++i) {
const int k =
(cgraph->order == GGML_CGRAPH_EVAL_ORDER_LEFT_TO_RIGHT) ? i :
(cgraph->order == GGML_CGRAPH_EVAL_ORDER_RIGHT_TO_LEFT) ? (GGML_MAX_SRC-1-i) :
/* unknown order, just fall back to using i*/ i;
if (node->src[k]) {
ggml_visit_parents(cgraph, node->src[k]);
}
}
if (node->op == GGML_OP_NONE && node->grad == NULL) {
// reached a leaf node, not part of the gradient graph (e.g. a constant)
GGML_ASSERT(cgraph->n_leafs < cgraph->size);
if (strlen(node->name) == 0) {
ggml_format_name(node, "leaf_%d", cgraph->n_leafs);
}
cgraph->leafs[cgraph->n_leafs] = node;
cgraph->n_leafs++;
} else {
GGML_ASSERT(cgraph->n_nodes < cgraph->size);
if (strlen(node->name) == 0) {
ggml_format_name(node, "node_%d", cgraph->n_nodes);
}
cgraph->nodes[cgraph->n_nodes] = node;
if (cgraph->grads) {
cgraph->grads[cgraph->n_nodes] = node->grad;
}
cgraph->n_nodes++;
}
}
|
O3
|
c
|
ggml_visit_parents:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
movq 0x28(%rdi), %rdi
movq 0x30(%rbx), %rsi
movq %r14, %rdx
callq 0x94eee
cmpq $-0x2, %rax
je 0x9de7f
xorl %ebp, %ebp
movl $0x9, %r15d
movl 0x38(%rbx), %eax
cmpl $0x1, %eax
movl %ebp, %ecx
cmovel %r15d, %ecx
testl %eax, %eax
cmovel %ebp, %ecx
movq 0xa0(%r14,%rcx,8), %rsi
testq %rsi, %rsi
je 0x9de19
movq %rbx, %rdi
callq 0x9ddc4
incl %ebp
addl $-0x1, %r15d
jb 0x9ddf3
cmpl $0x0, 0x50(%r14)
jne 0x9de32
cmpq $0x0, 0x98(%r14)
je 0x9de8a
movl 0x4(%rbx), %edx
cmpl (%rbx), %edx
jge 0x9dec1
cmpb $0x0, 0x120(%r14)
jne 0x9de5b
leaq 0x28b74(%rip), %rsi # 0xc69c2
movq %r14, %rdi
xorl %eax, %eax
callq 0x8f7da
movl 0x4(%rbx), %edx
movq 0x10(%rbx), %rcx
movslq %edx, %rax
movq %r14, (%rcx,%rax,8)
movq 0x18(%rbx), %rcx
testq %rcx, %rcx
je 0x9de7a
movq 0x98(%r14), %rsi
movq %rsi, (%rcx,%rax,8)
incl %edx
movl %edx, 0x4(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movl 0x8(%rbx), %edx
cmpl (%rbx), %edx
jge 0x9dec6
cmpb $0x0, 0x120(%r14)
jne 0x9deaf
leaq 0x28af9(%rip), %rsi # 0xc699b
movq %r14, %rdi
xorl %eax, %eax
callq 0x8f7da
movl 0x8(%rbx), %edx
movq 0x20(%rbx), %rax
movslq %edx, %rcx
movq %r14, (%rax,%rcx,8)
incl %ecx
movl %ecx, 0x8(%rbx)
jmp 0x9de7f
callq 0x115ca
callq 0x1160f
|
ggml_visit_parents:
push rbp
push r15
push r14
push rbx
push rax
mov r14, rsi
mov rbx, rdi
mov rdi, [rdi+28h]
mov rsi, [rbx+30h]
mov rdx, r14
call ggml_hash_insert
cmp rax, 0FFFFFFFFFFFFFFFEh
jz loc_9DE7F
xor ebp, ebp
mov r15d, 9
loc_9DDF3:
mov eax, [rbx+38h]
cmp eax, 1
mov ecx, ebp
cmovz ecx, r15d
test eax, eax
cmovz ecx, ebp
mov rsi, [r14+rcx*8+0A0h]
test rsi, rsi
jz short loc_9DE19
mov rdi, rbx
call ggml_visit_parents
loc_9DE19:
inc ebp
add r15d, 0FFFFFFFFh
jb short loc_9DDF3
cmp dword ptr [r14+50h], 0
jnz short loc_9DE32
cmp qword ptr [r14+98h], 0
jz short loc_9DE8A
loc_9DE32:
mov edx, [rbx+4]
cmp edx, [rbx]
jge loc_9DEC1
cmp byte ptr [r14+120h], 0
jnz short loc_9DE5B
lea rsi, aNodeD; "node_%d"
mov rdi, r14
xor eax, eax
call ggml_format_name
mov edx, [rbx+4]
loc_9DE5B:
mov rcx, [rbx+10h]
movsxd rax, edx
mov [rcx+rax*8], r14
mov rcx, [rbx+18h]
test rcx, rcx
jz short loc_9DE7A
mov rsi, [r14+98h]
mov [rcx+rax*8], rsi
loc_9DE7A:
inc edx
mov [rbx+4], edx
loc_9DE7F:
add rsp, 8
pop rbx
pop r14
pop r15
pop rbp
retn
loc_9DE8A:
mov edx, [rbx+8]
cmp edx, [rbx]
jge short loc_9DEC6
cmp byte ptr [r14+120h], 0
jnz short loc_9DEAF
lea rsi, aLeafD; "leaf_%d"
mov rdi, r14
xor eax, eax
call ggml_format_name
mov edx, [rbx+8]
loc_9DEAF:
mov rax, [rbx+20h]
movsxd rcx, edx
mov [rax+rcx*8], r14
inc ecx
mov [rbx+8], ecx
jmp short loc_9DE7F
loc_9DEC1:
call ggml_visit_parents_cold_1
loc_9DEC6:
call ggml_visit_parents_cold_2
|
long long ggml_visit_parents(
unsigned long long a1,
unsigned long long a2,
__m128 a3,
__m128 a4,
__m128 a5,
__m128 a6,
double a7,
double a8,
__m128 a9,
__m128 a10)
{
char v10; // al
unsigned long long v12; // rdi
long long result; // rax
long long v14; // r8
long long v15; // r9
__m128 v16; // xmm4
__m128 v17; // xmm5
unsigned int v18; // ebp
unsigned int v19; // r15d
int v20; // eax
long long v21; // rcx
long long v23; // rdx
long long v24; // rcx
long long v25; // rdx
char v26; // [rsp-8h] [rbp-28h]
v26 = v10;
v12 = *(_QWORD *)(a1 + 40);
result = ggml_hash_insert(v12, *(_QWORD *)(a1 + 48), a2);
if ( result != -2 )
{
v18 = 0;
v19 = 9;
do
{
v20 = *(_DWORD *)(a1 + 56);
v21 = v18;
if ( v20 == 1 )
v21 = v19;
if ( !v20 )
v21 = v18;
if ( *(_QWORD *)(a2 + 8 * v21 + 160) )
{
v12 = a1;
ggml_visit_parents(a1);
}
++v18;
}
while ( v19-- != 0 );
if ( *(_DWORD *)(a2 + 80) || *(_QWORD *)(a2 + 152) )
{
v23 = *(unsigned int *)(a1 + 4);
if ( (int)v23 >= *(_DWORD *)a1 )
ggml_visit_parents_cold_1(v12);
if ( !*(_BYTE *)(a2 + 288) )
{
ggml_format_name(a2, (long long)"node_%d", v23, v21, v14, v15, a3, a4, a5, a6, v16, v17, a9, a10, v26);
LODWORD(v23) = *(_DWORD *)(a1 + 4);
}
result = (int)v23;
*(_QWORD *)(*(_QWORD *)(a1 + 16) + 8LL * (int)v23) = a2;
v24 = *(_QWORD *)(a1 + 24);
if ( v24 )
*(_QWORD *)(v24 + 8LL * (int)v23) = *(_QWORD *)(a2 + 152);
*(_DWORD *)(a1 + 4) = v23 + 1;
}
else
{
v25 = *(unsigned int *)(a1 + 8);
if ( (int)v25 >= *(_DWORD *)a1 )
ggml_visit_parents_cold_2(v12);
if ( !*(_BYTE *)(a2 + 288) )
{
ggml_format_name(a2, (long long)"leaf_%d", v25, v21, v14, v15, a3, a4, a5, a6, v16, v17, a9, a10, v26);
LODWORD(v25) = *(_DWORD *)(a1 + 8);
}
result = *(_QWORD *)(a1 + 32);
*(_QWORD *)(result + 8LL * (int)v25) = a2;
*(_DWORD *)(a1 + 8) = v25 + 1;
}
}
return result;
}
| |||
9,369 |
JS_GetOpaque
|
bluesky950520[P]quickjs/quickjs.c
|
void *JS_GetOpaque(JSValue obj, JSClassID class_id)
{
JSObject *p;
if (JS_VALUE_GET_TAG(obj) != JS_TAG_OBJECT)
return NULL;
p = JS_VALUE_GET_OBJ(obj);
if (p->class_id != class_id)
return NULL;
return p->u.opaque;
}
|
O0
|
c
|
JS_GetOpaque:
movq %rdi, -0x18(%rsp)
movq %rsi, -0x10(%rsp)
movl %edx, -0x1c(%rsp)
movq -0x10(%rsp), %rax
cmpl $-0x1, %eax
je 0x38373
movq $0x0, -0x8(%rsp)
jmp 0x383a5
movq -0x18(%rsp), %rax
movq %rax, -0x28(%rsp)
movq -0x28(%rsp), %rax
movzwl 0x6(%rax), %eax
cmpl -0x1c(%rsp), %eax
je 0x38397
movq $0x0, -0x8(%rsp)
jmp 0x383a5
movq -0x28(%rsp), %rax
movq 0x30(%rax), %rax
movq %rax, -0x8(%rsp)
movq -0x8(%rsp), %rax
retq
nopl (%rax,%rax)
|
JS_GetOpaque:
mov [rsp+var_18], rdi
mov [rsp+var_10], rsi
mov [rsp+var_1C], edx
mov rax, [rsp+var_10]
cmp eax, 0FFFFFFFFh
jz short loc_38373
mov [rsp+var_8], 0
jmp short loc_383A5
loc_38373:
mov rax, [rsp+var_18]
mov [rsp+var_28], rax
mov rax, [rsp+var_28]
movzx eax, word ptr [rax+6]
cmp eax, [rsp+var_1C]
jz short loc_38397
mov [rsp+var_8], 0
jmp short loc_383A5
loc_38397:
mov rax, [rsp+var_28]
mov rax, [rax+30h]
mov [rsp+var_8], rax
loc_383A5:
mov rax, [rsp+var_8]
retn
|
long long JS_GetOpaque(long long a1, int a2, int a3)
{
if ( a2 != -1 )
return 0LL;
if ( *(unsigned __int16 *)(a1 + 6) == a3 )
return *(_QWORD *)(a1 + 48);
return 0LL;
}
|
JS_GetOpaque:
MOV qword ptr [RSP + -0x18],RDI
MOV qword ptr [RSP + -0x10],RSI
MOV dword ptr [RSP + -0x1c],EDX
MOV RAX,qword ptr [RSP + -0x10]
CMP EAX,-0x1
JZ 0x00138373
MOV qword ptr [RSP + -0x8],0x0
JMP 0x001383a5
LAB_00138373:
MOV RAX,qword ptr [RSP + -0x18]
MOV qword ptr [RSP + -0x28],RAX
MOV RAX,qword ptr [RSP + -0x28]
MOVZX EAX,word ptr [RAX + 0x6]
CMP EAX,dword ptr [RSP + -0x1c]
JZ 0x00138397
MOV qword ptr [RSP + -0x8],0x0
JMP 0x001383a5
LAB_00138397:
MOV RAX,qword ptr [RSP + -0x28]
MOV RAX,qword ptr [RAX + 0x30]
MOV qword ptr [RSP + -0x8],RAX
LAB_001383a5:
MOV RAX,qword ptr [RSP + -0x8]
RET
|
int8 JS_GetOpaque(long param_1,int param_2,uint param_3)
{
int8 local_8;
if (param_2 == -1) {
if (*(ushort *)(param_1 + 6) == param_3) {
local_8 = *(int8 *)(param_1 + 0x30);
}
else {
local_8 = 0;
}
}
else {
local_8 = 0;
}
return local_8;
}
|
|
9,370 |
JS_GetOpaque
|
bluesky950520[P]quickjs/quickjs.c
|
void *JS_GetOpaque(JSValue obj, JSClassID class_id)
{
JSObject *p;
if (JS_VALUE_GET_TAG(obj) != JS_TAG_OBJECT)
return NULL;
p = JS_VALUE_GET_OBJ(obj);
if (p->class_id != class_id)
return NULL;
return p->u.opaque;
}
|
O2
|
c
|
JS_GetOpaque:
cmpl $-0x1, %edx
jne 0x46e78
cmpw $0x39, 0x6(%rsi)
jne 0x46e78
movq 0x30(%rsi), %rsi
testq %rsi, %rsi
jne 0x46fd4
retq
|
js_async_generator_finalizer:
cmp edx, 0FFFFFFFFh
jnz short locret_46E78
cmp word ptr [rsi+6], 39h ; '9'
jnz short locret_46E78
mov rsi, [rsi+30h]
test rsi, rsi
jnz js_async_generator_free
locret_46E78:
retn
|
long long js_async_generator_finalizer(long long a1, long long a2, long long a3)
{
long long v3; // rsi
long long result; // rax
if ( (_DWORD)a3 == -1 && *(_WORD *)(a2 + 6) == 57 )
{
v3 = *(_QWORD *)(a2 + 48);
if ( v3 )
return js_async_generator_free(a1, v3, a3);
}
return result;
}
|
js_async_generator_finalizer:
CMP EDX,-0x1
JNZ 0x00146e78
CMP word ptr [RSI + 0x6],0x39
JNZ 0x00146e78
MOV RSI,qword ptr [RSI + 0x30]
TEST RSI,RSI
JNZ 0x00146fd4
LAB_00146e78:
RET
|
void js_async_generator_finalizer(int8 param_1,long param_2,int param_3)
{
long lVar1;
long lVar2;
long lVar3;
if (((param_3 == -1) && (*(short *)(param_2 + 6) == 0x39)) &&
(lVar1 = *(long *)(param_2 + 0x30), lVar1 != 0)) {
lVar3 = *(long *)(lVar1 + 0x80);
while (lVar3 != lVar1 + 0x78) {
lVar2 = *(long *)(lVar3 + 8);
JS_FreeValueRT(param_1,*(int8 *)(lVar3 + 0x18),*(int8 *)(lVar3 + 0x20));
JS_FreeValueRT(param_1,*(int8 *)(lVar3 + 0x28),*(int8 *)(lVar3 + 0x30));
JS_FreeValueRT(param_1,*(int8 *)(lVar3 + 0x38),*(int8 *)(lVar3 + 0x40));
JS_FreeValueRT(param_1,*(int8 *)(lVar3 + 0x48),*(int8 *)(lVar3 + 0x50));
js_free_rt(param_1,lVar3);
lVar3 = lVar2;
}
if ((*(uint *)(lVar1 + 8) & 0xfffffffe) != 4) {
async_func_free(param_1,lVar1 + 0x10);
}
js_free_rt(param_1,lVar1);
return;
}
return;
}
|
|
9,371 |
nlohmann::json_abi_v3_11_3::basic_json<std::map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>& nlohmann::json_abi_v3_11_3::basic_json<std::map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>::at<char const (&) [4], 0>(char const (&) [4])
|
llama.cpp/common/json.hpp
|
reference at(KeyType && key)
{
// at only works for objects
if (JSON_HEDLEY_UNLIKELY(!is_object()))
{
JSON_THROW(type_error::create(304, detail::concat("cannot use at() with ", type_name()), this));
}
auto it = m_data.m_value.object->find(std::forward<KeyType>(key));
if (it == m_data.m_value.object->end())
{
JSON_THROW(out_of_range::create(403, detail::concat("key '", string_t(std::forward<KeyType>(key)), "' not found"), this));
}
return set_parent(it->second);
}
|
O3
|
cpp
|
nlohmann::json_abi_v3_11_3::basic_json<std::map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>& nlohmann::json_abi_v3_11_3::basic_json<std::map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>::at<char const (&) [4], 0>(char const (&) [4]):
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x40, %rsp
movq %rdi, %r14
cmpb $0x1, (%rdi)
jne 0xdbfcb
movq %rsi, %r15
movq 0x8(%r14), %r12
movq (%r12), %rbx
movq 0x8(%r12), %rax
cmpq %rax, %rbx
je 0xdbfb5
movq %rbx, %rdi
movq %r15, %rsi
callq 0x244e0
testl %eax, %eax
je 0xdbfaa
addq $0x30, %rbx
movq 0x8(%r12), %rax
cmpq %rax, %rbx
jne 0xdbf8b
jmp 0xdbfad
movq %rbx, %rax
movq 0x8(%r14), %rcx
movq 0x8(%rcx), %rbx
cmpq %rbx, %rax
je 0xdc029
addq $0x20, %rax
addq $0x40, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movl $0x20, %edi
callq 0x23850
movq %rax, %rbx
movq %r14, %rdi
callq 0xafc76
movq %rsp, %rdx
movq %rax, (%rdx)
leaq 0x66963(%rip), %rsi # 0x142950
leaq 0x20(%rsp), %rdi
callq 0xa51f5
movb $0x1, %bpl
leaq 0x20(%rsp), %rdx
movq %rbx, %rdi
movl $0x130, %esi # imm = 0x130
movq %r14, %rcx
callq 0xafa9e
xorl %ebp, %ebp
leaq 0xb1028(%rip), %rsi # 0x18d040
leaq -0x4049f(%rip), %rdx # 0x9bb80
movq %rbx, %rdi
callq 0x23e00
jmp 0xdc0a2
movl $0x20, %edi
callq 0x23850
movq %rax, %rbx
leaq 0x10(%rsp), %r12
movq %r12, -0x10(%r12)
movq %r15, %rdi
callq 0x23890
leaq (%rax,%r15), %rdx
movq %rsp, %rdi
movq %r15, %rsi
callq 0x2cd14
leaq 0x66908(%rip), %rsi # 0x142966
leaq 0x66907(%rip), %rcx # 0x14296c
leaq 0x20(%rsp), %rdi
movq %rsp, %rdx
callq 0xa527d
movb $0x1, %bpl
leaq 0x20(%rsp), %rdx
movq %rbx, %rdi
movl $0x193, %esi # imm = 0x193
movq %r14, %rcx
callq 0xae202
xorl %ebp, %ebp
leaq 0xb0f2d(%rip), %rsi # 0x18cfc0
leaq -0x4051a(%rip), %rdx # 0x9bb80
movq %rbx, %rdi
callq 0x23e00
movq %rax, %r14
leaq 0x30(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xdc0c0
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x231f0
movq (%rsp), %rdi
cmpq %r12, %rdi
je 0xdc10b
movq 0x10(%rsp), %rsi
jmp 0xdc103
movq %rax, %r14
movq (%rsp), %rdi
cmpq %r12, %rdi
je 0xdc115
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x231f0
jmp 0xdc115
jmp 0xdc112
movq %rax, %r14
leaq 0x30(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xdc10b
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x231f0
testb %bpl, %bpl
jne 0xdc115
jmp 0xdc11d
movq %rax, %r14
movq %rbx, %rdi
callq 0x24440
movq %r14, %rdi
callq 0x23ee0
nop
|
_ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE2atIRA8_KcTnNSt9enable_ifIXsr6detail32is_usable_as_basic_json_key_typeISD_T_EE5valueEiE4typeELi0EEERSD_OSJ_:
push rbp; void *
push r15; int
push r14; __int64
push r12; int
push rbx; void *
sub rsp, 40h
mov r14, rdi
cmp byte ptr [rdi], 1
jnz short loc_DBFCB
mov r15, rsi
mov r12, [r14+8]
mov rbx, [r12]
mov rax, [r12+8]
cmp rbx, rax
jz short loc_DBFB5
loc_DBF8B:
mov rdi, rbx
mov rsi, r15
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7compareEPKc; std::string::compare(char const*)
test eax, eax
jz short loc_DBFAA
add rbx, 30h ; '0'
mov rax, [r12+8]
cmp rbx, rax
jnz short loc_DBF8B
jmp short loc_DBFAD
loc_DBFAA:
mov rax, rbx
loc_DBFAD:
mov rcx, [r14+8]
mov rbx, [rcx+8]
loc_DBFB5:
cmp rax, rbx
jz short loc_DC029
add rax, 20h ; ' '
add rsp, 40h
pop rbx
pop r12
pop r14
pop r15
pop rbp
retn
loc_DBFCB:
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)
mov rdx, rsp
mov [rdx], rax
lea rsi, aCannotUseAtWit; "cannot use at() with "
lea rdi, [rsp+68h+var_48]
call _ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJRA22_KcPS9_EEET_DpOT0_; nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[22],char const*>(char const(&)[22],char const* &&)
mov bpl, 1
lea rdx, [rsp+68h+var_48]
mov rdi, rbx; this
mov esi, 130h; int
mov rcx, r14
call _ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_
xor ebp, ebp
lea rsi, _ZTIN8nlohmann16json_abi_v3_11_36detail10type_errorE; lptinfo
lea rdx, _ZN8nlohmann16json_abi_v3_11_36detail9exceptionD2Ev; void (*)(void *)
mov rdi, rbx; void *
call ___cxa_throw
jmp short loc_DC0A2
loc_DC029:
mov edi, 20h ; ' '; thrown_size
call ___cxa_allocate_exception
mov rbx, rax
lea r12, [rsp+68h+var_58]
mov [r12-10h], r12
mov rdi, r15
call _strlen
lea rdx, [rax+r15]
mov rdi, rsp
mov rsi, r15
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag; std::string::_M_construct<char const*>(char const*,char const*,std::forward_iterator_tag)
lea rsi, aKey; "key '"
lea rcx, aNotFound; "' not found"
lea rdi, [rsp+68h+var_48]
mov rdx, rsp
call _ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJRA6_KcS8_RA12_S9_EEET_DpOT0_; nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[6],std::string,char const(&)[12]>(char const(&)[6],std::string,char const(&)[12] &&)
mov bpl, 1
lea rdx, [rsp+68h+var_48]
mov rdi, rbx; this
mov esi, 193h; int
mov rcx, r14
call _ZN8nlohmann16json_abi_v3_11_36detail12out_of_range6createIPNS0_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_36detail12out_of_rangeE; lptinfo
lea rdx, _ZN8nlohmann16json_abi_v3_11_36detail9exceptionD2Ev; void (*)(void *)
mov rdi, rbx; void *
call ___cxa_throw
loc_DC0A2:
mov r14, rax
lea rax, [rsp+68h+var_38]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_DC0C0
mov rsi, [rsp+68h+var_38]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_DC0C0:
mov rdi, [rsp+68h+var_68]
cmp rdi, r12
jz short loc_DC10B
mov rsi, [rsp+68h+var_58]
jmp short loc_DC103
mov r14, rax
mov rdi, [rsp+68h+var_68]; void *
cmp rdi, r12
jz short loc_DC115
mov rsi, [rsp+68h+var_58]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_DC115
jmp short loc_DC112
mov r14, rax
lea rax, [rsp+68h+var_38]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_DC10B
mov rsi, [rsp+68h+var_38]
loc_DC103:
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_DC10B:
test bpl, bpl
jnz short loc_DC115
jmp short loc_DC11D
loc_DC112:
mov r14, rax
loc_DC115:
mov rdi, rbx; void *
call ___cxa_free_exception
loc_DC11D:
mov rdi, r14
call __Unwind_Resume
|
long long ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE2atIRA8_KcTnNSt9enable_ifIXsr6detail32is_usable_as_basic_json_key_typeISD_T_EE5valueEiE4typeELi0EEERSD_OSJ_(
long long a1,
_BYTE *a2)
{
long long *v2; // r12
long long v3; // rbx
long long v4; // rax
nlohmann::json_abi_v3_11_3::detail::exception *exception; // rbx
nlohmann::json_abi_v3_11_3::detail::exception *v7; // rbx
long long v8; // rax
void *v9[2]; // [rsp+0h] [rbp-68h] BYREF
long long v10; // [rsp+10h] [rbp-58h] BYREF
_QWORD v11[2]; // [rsp+20h] [rbp-48h] BYREF
if ( *(_BYTE *)a1 != 1 )
{
exception = (nlohmann::json_abi_v3_11_3::detail::exception *)__cxa_allocate_exception(0x20uLL);
v9[0] = (void *)nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::type_name((unsigned __int8 *)a1);
nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[22],char const*>(
(long long)v11,
(long long)"cannot use at() with ",
v9);
ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_(
exception,
304,
v11);
__cxa_throw(
exception,
(struct type_info *)&`typeinfo for'nlohmann::json_abi_v3_11_3::detail::type_error,
(void (*)(void *))nlohmann::json_abi_v3_11_3::detail::exception::~exception);
}
v2 = *(long long **)(a1 + 8);
v3 = *v2;
v4 = v2[1];
if ( *v2 != v4 )
{
while ( (unsigned int)std::string::compare(v3, a2) )
{
v3 += 48LL;
v4 = v2[1];
if ( v3 == v4 )
goto LABEL_7;
}
v4 = v3;
LABEL_7:
v3 = *(_QWORD *)(*(_QWORD *)(a1 + 8) + 8LL);
}
if ( v4 == v3 )
{
v7 = (nlohmann::json_abi_v3_11_3::detail::exception *)__cxa_allocate_exception(0x20uLL);
v9[0] = &v10;
v8 = strlen(a2);
std::string::_M_construct<char const*>((long long)v9, a2, (long long)&a2[v8]);
nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[6],std::string,char const(&)[12]>(
(long long)v11,
(long long)"key '",
v9,
(long long)"' not found");
ZN8nlohmann16json_abi_v3_11_36detail12out_of_range6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_(
v7,
403,
v11);
__cxa_throw(
v7,
(struct type_info *)&`typeinfo for'nlohmann::json_abi_v3_11_3::detail::out_of_range,
(void (*)(void *))nlohmann::json_abi_v3_11_3::detail::exception::~exception);
}
return v4 + 32;
}
|
_ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE2atIRA8_KcTnNSt9enable_ifIXsr6detail32is_usable_as_basic_json_key_typeISD_T_EE5valueEiE4typeELi0EEERSD_OSJ_:
PUSH RBP
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
SUB RSP,0x40
MOV R14,RDI
CMP byte ptr [RDI],0x1
JNZ 0x001dbfcb
MOV R15,RSI
MOV R12,qword ptr [R14 + 0x8]
MOV RBX,qword ptr [R12]
MOV RAX,qword ptr [R12 + 0x8]
CMP RBX,RAX
JZ 0x001dbfb5
LAB_001dbf8b:
MOV RDI,RBX
MOV RSI,R15
CALL 0x001244e0
TEST EAX,EAX
JZ 0x001dbfaa
ADD RBX,0x30
MOV RAX,qword ptr [R12 + 0x8]
CMP RBX,RAX
JNZ 0x001dbf8b
JMP 0x001dbfad
LAB_001dbfaa:
MOV RAX,RBX
LAB_001dbfad:
MOV RCX,qword ptr [R14 + 0x8]
MOV RBX,qword ptr [RCX + 0x8]
LAB_001dbfb5:
CMP RAX,RBX
JZ 0x001dc029
ADD RAX,0x20
ADD RSP,0x40
POP RBX
POP R12
POP R14
POP R15
POP RBP
RET
LAB_001dbfcb:
MOV EDI,0x20
CALL 0x00123850
MOV RBX,RAX
MOV RDI,R14
CALL 0x001afc76
MOV RDX,RSP
MOV qword ptr [RDX],RAX
LAB_001dbfe6:
LEA RSI,[0x242950]
LEA RDI,[RSP + 0x20]
CALL 0x001a51f5
MOV BPL,0x1
LAB_001dbffa:
LEA RDX,[RSP + 0x20]
MOV RDI,RBX
MOV ESI,0x130
MOV RCX,R14
CALL 0x001afa9e
XOR EBP,EBP
LEA RSI,[0x28d040]
LEA RDX,[0x19bb80]
MOV RDI,RBX
CALL 0x00123e00
LAB_001dc029:
MOV EDI,0x20
CALL 0x00123850
MOV RBX,RAX
LEA R12,[RSP + 0x10]
MOV qword ptr [R12 + -0x10],R12
MOV RDI,R15
CALL 0x00123890
LEA RDX,[RAX + R15*0x1]
LAB_001dc04c:
MOV RDI,RSP
MOV RSI,R15
CALL 0x0012cd14
LAB_001dc057:
LEA RSI,[0x242966]
LEA RCX,[0x24296c]
LEA RDI,[RSP + 0x20]
MOV RDX,RSP
CALL 0x001a527d
MOV BPL,0x1
LAB_001dc075:
LEA RDX,[RSP + 0x20]
MOV RDI,RBX
MOV ESI,0x193
MOV RCX,R14
CALL 0x001ae202
XOR EBP,EBP
LEA RSI,[0x28cfc0]
LEA RDX,[0x19bb80]
MOV RDI,RBX
CALL 0x00123e00
|
char * _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE2atIRA8_KcTnNSt9enable_ifIXsr6detail32is_usable_as_basic_json_key_typeISD_T_EE5valueEiE4typeELi0EEERSD_OSJ_
(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,char *param_2)
{
long *plVar1;
int iVar2;
char *pcVar3;
int8 uVar4;
size_t sVar5;
char *pcVar6;
char *local_68 [2];
char local_58 [16];
detail local_48 [32];
if (*param_1 !=
(basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
)0x1) {
uVar4 = __cxa_allocate_exception(0x20);
local_68[0] = (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 001dbfe6 to 001dbff6 has its CatchHandler @ 001dc112 */
nlohmann::json_abi_v3_11_3::detail::concat<std::__cxx11::string,char_const(&)[22],char_const*>
(local_48,"cannot use at() with ",local_68);
/* try { // try from 001dbffa to 001dc026 has its CatchHandler @ 001dc0ed */
_ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_
(uVar4,0x130,local_48,param_1);
/* WARNING: Subroutine does not return */
__cxa_throw(uVar4,&nlohmann::json_abi_v3_11_3::detail::type_error::typeinfo,
nlohmann::json_abi_v3_11_3::detail::exception::~exception);
}
plVar1 = *(long **)(param_1 + 8);
pcVar6 = (char *)*plVar1;
pcVar3 = (char *)plVar1[1];
if (pcVar6 != pcVar3) {
do {
pcVar3 = pcVar6;
iVar2 = std::__cxx11::string::compare(pcVar3);
if (iVar2 == 0) break;
pcVar6 = pcVar3 + 0x30;
pcVar3 = (char *)plVar1[1];
} while (pcVar6 != pcVar3);
pcVar6 = *(char **)(*(long *)(param_1 + 8) + 8);
}
if (pcVar3 == pcVar6) {
uVar4 = __cxa_allocate_exception(0x20);
local_68[0] = local_58;
sVar5 = strlen(param_2);
/* try { // try from 001dc04c to 001dc056 has its CatchHandler @ 001dc0eb */
std::__cxx11::string::_M_construct<char_const*>(local_68,param_2,param_2 + sVar5);
/* try { // try from 001dc057 to 001dc071 has its CatchHandler @ 001dc0d0 */
nlohmann::json_abi_v3_11_3::detail::
concat<std::__cxx11::string,char_const(&)[6],std::__cxx11::string,char_const(&)[12]>
(local_48,"key \'",(string *)local_68,"\' not found");
/* try { // try from 001dc075 to 001dc0a1 has its CatchHandler @ 001dc0a2 */
_ZN8nlohmann16json_abi_v3_11_36detail12out_of_range6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_
(uVar4,0x193,local_48,param_1);
/* WARNING: Subroutine does not return */
__cxa_throw(uVar4,&nlohmann::json_abi_v3_11_3::detail::out_of_range::typeinfo,
nlohmann::json_abi_v3_11_3::detail::exception::~exception);
}
return pcVar3 + 0x20;
}
|
|
9,372 |
usage
|
eloqsql/extra/mysql_waitpid.c
|
void usage(void)
{
printf("%s version %s by Jani Tolonen\n\n", progname, VER);
printf("usage: %s [options] #pid #time\n\n", progname);
printf("Description: Waits for a program, which program id is #pid, to\n");
printf("terminate within #time seconds. If the program terminates within\n");
printf("this time, or if the #pid no longer exists, value 0 is returned.\n");
printf("Otherwise 1 is returned. Both #pid and #time must be positive\n");
printf("integer arguments.\n\n");
printf("Options:\n");
my_print_help(my_long_options);
}
|
O0
|
c
|
usage:
pushq %rbp
movq %rsp, %rbp
movq 0x36812d(%rip), %rsi # 0x38ca18
movq 0x1b094e(%rip), %rdx # 0x1d5240
leaq 0x5a744(%rip), %rdi # 0x7f03d
movb $0x0, %al
callq 0x24050
movq 0x368111(%rip), %rsi # 0x38ca18
leaq 0x5a74f(%rip), %rdi # 0x7f05d
movb $0x0, %al
callq 0x24050
leaq 0x5a762(%rip), %rdi # 0x7f07e
movb $0x0, %al
callq 0x24050
leaq 0x5a794(%rip), %rdi # 0x7f0be
movb $0x0, %al
callq 0x24050
leaq 0x5a7c8(%rip), %rdi # 0x7f100
movb $0x0, %al
callq 0x24050
leaq 0x5a7fc(%rip), %rdi # 0x7f142
movb $0x0, %al
callq 0x24050
leaq 0x5a82d(%rip), %rdi # 0x7f181
movb $0x0, %al
callq 0x24050
leaq 0x5a834(%rip), %rdi # 0x7f196
movb $0x0, %al
callq 0x24050
leaq 0x1b06a0(%rip), %rdi # 0x1d5010
callq 0x26ee0
popq %rbp
retq
nopw (%rax,%rax)
|
usage:
push rbp
mov rbp, rsp
mov rsi, cs:progname
mov rdx, cs:VER
lea rdi, aSVersionSByJan_0; "%s version %s by Jani Tolonen\n\n"
mov al, 0
call _printf
mov rsi, cs:progname
lea rdi, aUsageSOptionsP; "usage: %s [options] #pid #time\n\n"
mov al, 0
call _printf
lea rdi, aDescriptionWai; "Description: Waits for a program, which"...
mov al, 0
call _printf
lea rdi, aTerminateWithi; "terminate within #time seconds. If the "...
mov al, 0
call _printf
lea rdi, aThisTimeOrIfTh; "this time, or if the #pid no longer exi"...
mov al, 0
call _printf
lea rdi, aOtherwise1IsRe; "Otherwise 1 is returned. Both #pid and "...
mov al, 0
call _printf
lea rdi, aIntegerArgumen; "integer arguments.\n\n"
mov al, 0
call _printf
lea rdi, aOptions; "Options:\n"
mov al, 0
call _printf
lea rdi, my_long_options
call my_print_help
pop rbp
retn
|
long long usage()
{
printf("%s version %s by Jani Tolonen\n\n", (const char *)progname, VER);
printf("usage: %s [options] #pid #time\n\n", (const char *)progname);
printf("Description: Waits for a program, which program id is #pid, to\n");
printf("terminate within #time seconds. If the program terminates within\n");
printf("this time, or if the #pid no longer exists, value 0 is returned.\n");
printf("Otherwise 1 is returned. Both #pid and #time must be positive\n");
printf("integer arguments.\n\n");
printf("Options:\n");
return my_print_help(&my_long_options);
}
|
usage:
PUSH RBP
MOV RBP,RSP
MOV RSI,qword ptr [0x0048ca18]
MOV RDX,qword ptr [0x002d5240]
LEA RDI,[0x17f03d]
MOV AL,0x0
CALL 0x00124050
MOV RSI,qword ptr [0x0048ca18]
LEA RDI,[0x17f05d]
MOV AL,0x0
CALL 0x00124050
LEA RDI,[0x17f07e]
MOV AL,0x0
CALL 0x00124050
LEA RDI,[0x17f0be]
MOV AL,0x0
CALL 0x00124050
LEA RDI,[0x17f100]
MOV AL,0x0
CALL 0x00124050
LEA RDI,[0x17f142]
MOV AL,0x0
CALL 0x00124050
LEA RDI,[0x17f181]
MOV AL,0x0
CALL 0x00124050
LEA RDI,[0x17f196]
MOV AL,0x0
CALL 0x00124050
LEA RDI,[0x2d5010]
CALL 0x00126ee0
POP RBP
RET
|
void usage(void)
{
printf("%s version %s by Jani Tolonen\n\n",progname,VER);
printf("usage: %s [options] #pid #time\n\n",progname);
printf("Description: Waits for a program, which program id is #pid, to\n");
printf("terminate within #time seconds. If the program terminates within\n");
printf("this time, or if the #pid no longer exists, value 0 is returned.\n");
printf("Otherwise 1 is returned. Both #pid and #time must be positive\n");
printf("integer arguments.\n\n");
printf("Options:\n");
my_print_help(my_long_options);
return;
}
|
|
9,373 |
my_wc_mb_gbk
|
eloqsql/strings/ctype-gbk.c
|
static int
my_wc_mb_gbk(CHARSET_INFO *cs __attribute__((unused)),
my_wc_t wc, uchar *s, uchar *e)
{
int code;
if (s >= e)
return MY_CS_TOOSMALL;
if ((uint) wc < 0x80)
{
s[0]= (uchar) wc;
return 1;
}
if (!(code=func_uni_gbk_onechar(wc)))
return MY_CS_ILUNI;
if (s+2>e)
return MY_CS_TOOSMALL2;
s[0]=code>>8;
s[1]=code&0xFF;
return 2;
}
|
O0
|
c
|
my_wc_mb_gbk:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
movq -0x20(%rbp), %rax
cmpq -0x28(%rbp), %rax
jb 0x43a7b
movl $0xffffff9b, -0x4(%rbp) # imm = 0xFFFFFF9B
jmp 0x43af4
movq -0x18(%rbp), %rax
cmpl $0x80, %eax
jae 0x43a9b
movq -0x18(%rbp), %rax
movb %al, %cl
movq -0x20(%rbp), %rax
movb %cl, (%rax)
movl $0x1, -0x4(%rbp)
jmp 0x43af4
movq -0x18(%rbp), %rax
movl %eax, %edi
callq 0x43dc0
movl %eax, -0x2c(%rbp)
cmpl $0x0, %eax
jne 0x43ab7
movl $0x0, -0x4(%rbp)
jmp 0x43af4
movq -0x20(%rbp), %rax
addq $0x2, %rax
cmpq -0x28(%rbp), %rax
jbe 0x43ace
movl $0xffffff9a, -0x4(%rbp) # imm = 0xFFFFFF9A
jmp 0x43af4
movl -0x2c(%rbp), %eax
sarl $0x8, %eax
movb %al, %cl
movq -0x20(%rbp), %rax
movb %cl, (%rax)
movl -0x2c(%rbp), %eax
andl $0xff, %eax
movb %al, %cl
movq -0x20(%rbp), %rax
movb %cl, 0x1(%rax)
movl $0x2, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax)
|
my_wc_mb_gbk:
push rbp
mov rbp, rsp
sub rsp, 30h
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov [rbp+var_20], rdx
mov [rbp+var_28], rcx
mov rax, [rbp+var_20]
cmp rax, [rbp+var_28]
jb short loc_43A7B
mov [rbp+var_4], 0FFFFFF9Bh
jmp short loc_43AF4
loc_43A7B:
mov rax, [rbp+var_18]
cmp eax, 80h
jnb short loc_43A9B
mov rax, [rbp+var_18]
mov cl, al
mov rax, [rbp+var_20]
mov [rax], cl
mov [rbp+var_4], 1
jmp short loc_43AF4
loc_43A9B:
mov rax, [rbp+var_18]
mov edi, eax
call func_uni_gbk_onechar
mov [rbp+var_2C], eax
cmp eax, 0
jnz short loc_43AB7
mov [rbp+var_4], 0
jmp short loc_43AF4
loc_43AB7:
mov rax, [rbp+var_20]
add rax, 2
cmp rax, [rbp+var_28]
jbe short loc_43ACE
mov [rbp+var_4], 0FFFFFF9Ah
jmp short loc_43AF4
loc_43ACE:
mov eax, [rbp+var_2C]
sar eax, 8
mov cl, al
mov rax, [rbp+var_20]
mov [rax], cl
mov eax, [rbp+var_2C]
and eax, 0FFh
mov cl, al
mov rax, [rbp+var_20]
mov [rax+1], cl
mov [rbp+var_4], 2
loc_43AF4:
mov eax, [rbp+var_4]
add rsp, 30h
pop rbp
retn
|
long long my_wc_mb_gbk(long long a1, unsigned int a2, _BYTE *a3, unsigned long long a4)
{
int v5; // [rsp+4h] [rbp-2Ch]
if ( (unsigned long long)a3 < a4 )
{
if ( a2 >= 0x80 )
{
v5 = func_uni_gbk_onechar(a2);
if ( v5 )
{
if ( (unsigned long long)(a3 + 2) <= a4 )
{
*a3 = BYTE1(v5);
a3[1] = v5;
return 2;
}
else
{
return (unsigned int)-102;
}
}
else
{
return 0;
}
}
else
{
*a3 = a2;
return 1;
}
}
else
{
return (unsigned int)-101;
}
}
|
my_wc_mb_gbk:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x30
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x18],RSI
MOV qword ptr [RBP + -0x20],RDX
MOV qword ptr [RBP + -0x28],RCX
MOV RAX,qword ptr [RBP + -0x20]
CMP RAX,qword ptr [RBP + -0x28]
JC 0x00143a7b
MOV dword ptr [RBP + -0x4],0xffffff9b
JMP 0x00143af4
LAB_00143a7b:
MOV RAX,qword ptr [RBP + -0x18]
CMP EAX,0x80
JNC 0x00143a9b
MOV RAX,qword ptr [RBP + -0x18]
MOV CL,AL
MOV RAX,qword ptr [RBP + -0x20]
MOV byte ptr [RAX],CL
MOV dword ptr [RBP + -0x4],0x1
JMP 0x00143af4
LAB_00143a9b:
MOV RAX,qword ptr [RBP + -0x18]
MOV EDI,EAX
CALL 0x00143dc0
MOV dword ptr [RBP + -0x2c],EAX
CMP EAX,0x0
JNZ 0x00143ab7
MOV dword ptr [RBP + -0x4],0x0
JMP 0x00143af4
LAB_00143ab7:
MOV RAX,qword ptr [RBP + -0x20]
ADD RAX,0x2
CMP RAX,qword ptr [RBP + -0x28]
JBE 0x00143ace
MOV dword ptr [RBP + -0x4],0xffffff9a
JMP 0x00143af4
LAB_00143ace:
MOV EAX,dword ptr [RBP + -0x2c]
SAR EAX,0x8
MOV CL,AL
MOV RAX,qword ptr [RBP + -0x20]
MOV byte ptr [RAX],CL
MOV EAX,dword ptr [RBP + -0x2c]
AND EAX,0xff
MOV CL,AL
MOV RAX,qword ptr [RBP + -0x20]
MOV byte ptr [RAX + 0x1],CL
MOV dword ptr [RBP + -0x4],0x2
LAB_00143af4:
MOV EAX,dword ptr [RBP + -0x4]
ADD RSP,0x30
POP RBP
RET
|
int4 my_wc_mb_gbk(int8 param_1,uint param_2,int1 *param_3,int1 *param_4)
{
int iVar1;
int4 local_c;
if (param_3 < param_4) {
if (param_2 < 0x80) {
*param_3 = (char)param_2;
local_c = 1;
}
else {
iVar1 = func_uni_gbk_onechar(param_2);
if (iVar1 == 0) {
local_c = 0;
}
else if (param_4 < param_3 + 2) {
local_c = 0xffffff9a;
}
else {
*param_3 = (char)((uint)iVar1 >> 8);
param_3[1] = (char)iVar1;
local_c = 2;
}
}
}
else {
local_c = 0xffffff9b;
}
return local_c;
}
|
|
9,374 |
my_well_formed_char_length_ucs2
|
eloqsql/strings/ctype-ucs2.c
|
static size_t
my_well_formed_char_length_ucs2(CHARSET_INFO *cs __attribute__((unused)),
const char *b, const char *e,
size_t nchars, MY_STRCOPY_STATUS *status)
{
size_t length= e - b;
if (nchars * 2 <= length)
{
status->m_well_formed_error_pos= NULL;
status->m_source_end_pos= b + (nchars * 2);
return nchars;
}
if (length % 2)
{
status->m_well_formed_error_pos= status->m_source_end_pos= e - 1;
}
else
{
status->m_well_formed_error_pos= NULL;
status->m_source_end_pos= e;
}
return length / 2;
}
|
O0
|
c
|
my_well_formed_char_length_ucs2:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
movq %r8, -0x30(%rbp)
movq -0x20(%rbp), %rax
movq -0x18(%rbp), %rcx
subq %rcx, %rax
movq %rax, -0x38(%rbp)
movq -0x28(%rbp), %rax
shlq %rax
cmpq -0x38(%rbp), %rax
ja 0xdb56f
movq -0x30(%rbp), %rax
movq $0x0, 0x8(%rax)
movq -0x18(%rbp), %rcx
movq -0x28(%rbp), %rax
shlq %rax
addq %rax, %rcx
movq -0x30(%rbp), %rax
movq %rcx, (%rax)
movq -0x28(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0xdb5b8
movq -0x38(%rbp), %rax
andq $0x1, %rax
cmpq $0x0, %rax
je 0xdb596
movq -0x20(%rbp), %rcx
addq $-0x1, %rcx
movq -0x30(%rbp), %rax
movq %rcx, (%rax)
movq -0x30(%rbp), %rax
movq %rcx, 0x8(%rax)
jmp 0xdb5ad
movq -0x30(%rbp), %rax
movq $0x0, 0x8(%rax)
movq -0x20(%rbp), %rcx
movq -0x30(%rbp), %rax
movq %rcx, (%rax)
movq -0x38(%rbp), %rax
shrq %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
popq %rbp
retq
nop
|
my_well_formed_char_length_ucs2:
push rbp
mov rbp, rsp
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov [rbp+var_20], rdx
mov [rbp+var_28], rcx
mov [rbp+var_30], r8
mov rax, [rbp+var_20]
mov rcx, [rbp+var_18]
sub rax, rcx
mov [rbp+var_38], rax
mov rax, [rbp+var_28]
shl rax, 1
cmp rax, [rbp+var_38]
ja short loc_DB56F
mov rax, [rbp+var_30]
mov qword ptr [rax+8], 0
mov rcx, [rbp+var_18]
mov rax, [rbp+var_28]
shl rax, 1
add rcx, rax
mov rax, [rbp+var_30]
mov [rax], rcx
mov rax, [rbp+var_28]
mov [rbp+var_8], rax
jmp short loc_DB5B8
loc_DB56F:
mov rax, [rbp+var_38]
and rax, 1
cmp rax, 0
jz short loc_DB596
mov rcx, [rbp+var_20]
add rcx, 0FFFFFFFFFFFFFFFFh
mov rax, [rbp+var_30]
mov [rax], rcx
mov rax, [rbp+var_30]
mov [rax+8], rcx
jmp short loc_DB5AD
loc_DB596:
mov rax, [rbp+var_30]
mov qword ptr [rax+8], 0
mov rcx, [rbp+var_20]
mov rax, [rbp+var_30]
mov [rax], rcx
loc_DB5AD:
mov rax, [rbp+var_38]
shr rax, 1
mov [rbp+var_8], rax
loc_DB5B8:
mov rax, [rbp+var_8]
pop rbp
retn
|
unsigned long long my_well_formed_char_length_ucs2(long long a1, long long a2, long long a3, long long a4, _QWORD *a5)
{
unsigned long long v6; // [rsp+0h] [rbp-38h]
v6 = a3 - a2;
if ( 2 * a4 > (unsigned long long)(a3 - a2) )
{
if ( (v6 & 1) != 0 )
{
*a5 = a3 - 1;
a5[1] = a3 - 1;
}
else
{
a5[1] = 0LL;
*a5 = a3;
}
return v6 >> 1;
}
else
{
a5[1] = 0LL;
*a5 = 2 * a4 + a2;
return a4;
}
}
|
my_well_formed_char_length_ucs2:
PUSH RBP
MOV RBP,RSP
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x18],RSI
MOV qword ptr [RBP + -0x20],RDX
MOV qword ptr [RBP + -0x28],RCX
MOV qword ptr [RBP + -0x30],R8
MOV RAX,qword ptr [RBP + -0x20]
MOV RCX,qword ptr [RBP + -0x18]
SUB RAX,RCX
MOV qword ptr [RBP + -0x38],RAX
MOV RAX,qword ptr [RBP + -0x28]
SHL RAX,0x1
CMP RAX,qword ptr [RBP + -0x38]
JA 0x001db56f
MOV RAX,qword ptr [RBP + -0x30]
MOV qword ptr [RAX + 0x8],0x0
MOV RCX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RBP + -0x28]
SHL RAX,0x1
ADD RCX,RAX
MOV RAX,qword ptr [RBP + -0x30]
MOV qword ptr [RAX],RCX
MOV RAX,qword ptr [RBP + -0x28]
MOV qword ptr [RBP + -0x8],RAX
JMP 0x001db5b8
LAB_001db56f:
MOV RAX,qword ptr [RBP + -0x38]
AND RAX,0x1
CMP RAX,0x0
JZ 0x001db596
MOV RCX,qword ptr [RBP + -0x20]
ADD RCX,-0x1
MOV RAX,qword ptr [RBP + -0x30]
MOV qword ptr [RAX],RCX
MOV RAX,qword ptr [RBP + -0x30]
MOV qword ptr [RAX + 0x8],RCX
JMP 0x001db5ad
LAB_001db596:
MOV RAX,qword ptr [RBP + -0x30]
MOV qword ptr [RAX + 0x8],0x0
MOV RCX,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RBP + -0x30]
MOV qword ptr [RAX],RCX
LAB_001db5ad:
MOV RAX,qword ptr [RBP + -0x38]
SHR RAX,0x1
MOV qword ptr [RBP + -0x8],RAX
LAB_001db5b8:
MOV RAX,qword ptr [RBP + -0x8]
POP RBP
RET
|
ulong my_well_formed_char_length_ucs2
(int8 param_1,long param_2,long param_3,ulong param_4,long *param_5)
{
ulong local_10;
local_10 = param_3 - param_2;
if (param_4 * 2 < local_10 || param_4 * 2 - local_10 == 0) {
param_5[1] = 0;
*param_5 = param_2 + param_4 * 2;
local_10 = param_4;
}
else {
if ((local_10 & 1) == 0) {
param_5[1] = 0;
*param_5 = param_3;
}
else {
*param_5 = param_3 + -1;
param_5[1] = param_3 + -1;
}
local_10 = local_10 >> 1;
}
return local_10;
}
|
|
9,375 |
void nlohmann::json_abi_v3_11_3::detail::int_to_string<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&, unsigned long)
|
monkey531[P]llama/common/json.hpp
|
void int_to_string( string_type& target, std::size_t value )
{
// For ADL
using std::to_string;
target = to_string(value);
}
|
O1
|
cpp
|
void nlohmann::json_abi_v3_11_3::detail::int_to_string<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&, unsigned long):
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rsi, %r14
movq %rdi, %rbx
movl $0x1, %esi
cmpq $0xa, %r14
jb 0xad014
movl $0x4, %esi
movabsq $0x346dc5d63886594b, %rdi # imm = 0x346DC5D63886594B
movq %r14, %rcx
cmpq $0x63, %rcx
jbe 0xad00d
cmpq $0x3e7, %rcx # imm = 0x3E7
jbe 0xad012
cmpq $0x2710, %rcx # imm = 0x2710
jb 0xad014
movq %rcx, %rax
mulq %rdi
shrq $0xb, %rdx
addl $0x4, %esi
cmpq $0x1869f, %rcx # imm = 0x1869F
movq %rdx, %rcx
ja 0xacfd7
addl $-0x3, %esi
jmp 0xad014
addl $-0x2, %esi
jmp 0xad014
decl %esi
movl %esi, %esi
leaq 0x18(%rsp), %r12
movq %r12, -0x10(%r12)
leaq 0x8(%rsp), %r15
movq %r15, %rdi
xorl %edx, %edx
callq 0x1a9d0
movq (%r15), %rdi
movl 0x8(%r15), %esi
movq %r14, %rdx
callq 0x5c143
movq %rbx, %rdi
movq %r15, %rsi
callq 0x1aa50
movq (%r15), %rdi
cmpq %r12, %rdi
je 0xad05e
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x1a890
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
|
_ZN8nlohmann16json_abi_v3_11_36detail13int_to_stringINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEEvRT_m:
push r15
push r14
push r12
push rbx
sub rsp, 28h
mov r14, rsi
mov rbx, rdi
mov esi, 1
cmp r14, 0Ah
jb short loc_AD014
mov esi, 4
mov rdi, 346DC5D63886594Bh
mov rcx, r14
loc_ACFD7:
cmp rcx, 63h ; 'c'
jbe short loc_AD00D
cmp rcx, 3E7h
jbe short loc_AD012
cmp rcx, 2710h
jb short loc_AD014
mov rax, rcx
mul rdi
shr rdx, 0Bh
add esi, 4
cmp rcx, 1869Fh
mov rcx, rdx
ja short loc_ACFD7
add esi, 0FFFFFFFDh
jmp short loc_AD014
loc_AD00D:
add esi, 0FFFFFFFEh
jmp short loc_AD014
loc_AD012:
dec esi
loc_AD014:
mov esi, esi
lea r12, [rsp+48h+var_30]
mov [r12-10h], r12
lea r15, [rsp+48h+var_40]
mov rdi, r15
xor edx, edx
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructEmc; std::string::_M_construct(ulong,char)
mov rdi, [r15]
mov esi, [r15+8]
mov rdx, r14
call _ZNSt8__detail18__to_chars_10_implImEEvPcjT_; std::__detail::__to_chars_10_impl<ulong>(char *,uint,ulong)
mov rdi, rbx
mov rsi, r15
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEOS4_; std::string::operator=(std::string&&)
mov rdi, [r15]; void *
cmp rdi, r12
jz short loc_AD05E
mov rsi, [rsp+48h+var_30]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_AD05E:
add rsp, 28h
pop rbx
pop r12
pop r14
pop r15
retn
|
void nlohmann::json_abi_v3_11_3::detail::int_to_string<std::string>(long long a1, unsigned long long a2)
{
unsigned int v3; // esi
unsigned long long v4; // rcx
bool v5; // cc
char *v6; // [rsp+8h] [rbp-40h] BYREF
int v7; // [rsp+10h] [rbp-38h]
_QWORD v8[6]; // [rsp+18h] [rbp-30h] BYREF
v3 = 1;
if ( a2 >= 0xA )
{
v3 = 4;
v4 = a2;
while ( 1 )
{
if ( v4 <= 0x63 )
{
v3 -= 2;
goto LABEL_10;
}
if ( v4 <= 0x3E7 )
break;
if ( v4 < 0x2710 )
goto LABEL_10;
v3 += 4;
v5 = v4 <= 0x1869F;
v4 /= 0x2710uLL;
if ( v5 )
{
v3 -= 3;
goto LABEL_10;
}
}
--v3;
}
LABEL_10:
v6 = (char *)v8;
std::string::_M_construct(&v6, v3, 0LL);
std::__detail::__to_chars_10_impl<unsigned long>(v6, v7, a2);
std::string::operator=(a1, &v6);
if ( v6 != (char *)v8 )
operator delete(v6, v8[0] + 1LL);
}
|
int_to_string<std::__cxx11::string>:
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
SUB RSP,0x28
MOV R14,RSI
MOV RBX,RDI
MOV ESI,0x1
CMP R14,0xa
JC 0x001ad014
MOV ESI,0x4
MOV RDI,0x346dc5d63886594b
MOV RCX,R14
LAB_001acfd7:
CMP RCX,0x63
JBE 0x001ad00d
CMP RCX,0x3e7
JBE 0x001ad012
CMP RCX,0x2710
JC 0x001ad014
MOV RAX,RCX
MUL RDI
SHR RDX,0xb
ADD ESI,0x4
CMP RCX,0x1869f
MOV RCX,RDX
JA 0x001acfd7
ADD ESI,-0x3
JMP 0x001ad014
LAB_001ad00d:
ADD ESI,-0x2
JMP 0x001ad014
LAB_001ad012:
DEC ESI
LAB_001ad014:
MOV ESI,ESI
LEA R12,[RSP + 0x18]
MOV qword ptr [R12 + -0x10],R12
LEA R15,[RSP + 0x8]
MOV RDI,R15
XOR EDX,EDX
CALL 0x0011a9d0
MOV RDI,qword ptr [R15]
MOV ESI,dword ptr [R15 + 0x8]
MOV RDX,R14
CALL 0x0015c143
MOV RDI,RBX
MOV RSI,R15
CALL 0x0011aa50
MOV RDI,qword ptr [R15]
CMP RDI,R12
JZ 0x001ad05e
MOV RSI,qword ptr [RSP + 0x18]
INC RSI
CALL 0x0011a890
LAB_001ad05e:
ADD RSP,0x28
POP RBX
POP R12
POP R14
POP R15
RET
|
/* void nlohmann::json_abi_v3_11_3::detail::int_to_string<std::__cxx11::string
>(std::__cxx11::string&, unsigned long) */
void nlohmann::json_abi_v3_11_3::detail::int_to_string<std::__cxx11::string>
(string *param_1,ulong param_2)
{
bool bVar1;
char cVar2;
ulong uVar3;
char cVar4;
long *local_40;
uint local_38;
long local_30 [2];
cVar4 = '\x01';
if (9 < param_2) {
uVar3 = param_2;
cVar2 = '\x04';
do {
cVar4 = cVar2;
if (uVar3 < 100) {
cVar4 = cVar4 + -2;
goto LAB_001ad014;
}
if (uVar3 < 1000) {
cVar4 = cVar4 + -1;
goto LAB_001ad014;
}
if (uVar3 < 10000) goto LAB_001ad014;
bVar1 = 99999 < uVar3;
uVar3 = uVar3 / 10000;
cVar2 = cVar4 + '\x04';
} while (bVar1);
cVar4 = cVar4 + '\x01';
}
LAB_001ad014:
local_40 = local_30;
std::__cxx11::string::_M_construct((ulong)&local_40,cVar4);
std::__detail::__to_chars_10_impl<unsigned_long>((char *)local_40,local_38,param_2);
std::__cxx11::string::operator=(param_1,(string *)&local_40);
if (local_40 != local_30) {
operator_delete(local_40,local_30[0] + 1);
}
return;
}
|
|
9,376 |
mbedtls_ccm_star_encrypt_and_tag
|
msxemulator/build_O3/_deps/pico_sdk-src/lib/mbedtls/library/ccm.c
|
int mbedtls_ccm_star_encrypt_and_tag(mbedtls_ccm_context *ctx, size_t length,
const unsigned char *iv, size_t iv_len,
const unsigned char *add, size_t add_len,
const unsigned char *input, unsigned char *output,
unsigned char *tag, size_t tag_len)
{
CCM_VALIDATE_RET(ctx != NULL);
CCM_VALIDATE_RET(iv != NULL);
CCM_VALIDATE_RET(add_len == 0 || add != NULL);
CCM_VALIDATE_RET(length == 0 || input != NULL);
CCM_VALIDATE_RET(length == 0 || output != NULL);
CCM_VALIDATE_RET(tag_len == 0 || tag != NULL);
return ccm_auth_crypt(ctx, CCM_ENCRYPT, length, iv, iv_len,
add, add_len, input, output, tag, tag_len);
}
|
O3
|
c
|
mbedtls_ccm_star_encrypt_and_tag:
subq $0x28, %rsp
movq %r8, %rax
movq %rcx, %r8
movq %rdx, %rcx
movq %rsi, %rdx
movaps 0x30(%rsp), %xmm0
movaps 0x40(%rsp), %xmm1
movups %xmm1, 0x18(%rsp)
movups %xmm0, 0x8(%rsp)
movq %r9, (%rsp)
xorl %esi, %esi
movq %rax, %r9
callq 0x9f306
addq $0x28, %rsp
retq
|
mbedtls_ccm_star_encrypt_and_tag:
sub rsp, 28h
mov rax, r8
mov r8, rcx
mov rcx, rdx
mov rdx, rsi
movaps xmm0, [rsp+28h+arg_0]
movaps xmm1, [rsp+28h+arg_10]
movups [rsp+28h+var_10], xmm1
movups [rsp+28h+var_20], xmm0
mov [rsp+28h+var_28], r9
xor esi, esi
mov r9, rax
call ccm_auth_crypt
add rsp, 28h
retn
|
long long mbedtls_ccm_star_encrypt_and_tag(
int a1,
int a2,
int a3,
int a4,
int a5,
long long a6,
__int128 a7,
__int128 a8)
{
return ccm_auth_crypt(a1, 0, a2, a3, a4, a5, a6, a7, *((long long *)&a7 + 1), a8, *((long long *)&a8 + 1));
}
|
mbedtls_ccm_star_encrypt_and_tag:
SUB RSP,0x28
MOV RAX,R8
MOV R8,RCX
MOV RCX,RDX
MOV RDX,RSI
MOVAPS XMM0,xmmword ptr [RSP + 0x30]
MOVAPS XMM1,xmmword ptr [RSP + 0x40]
MOVUPS xmmword ptr [RSP + 0x18],XMM1
MOVUPS xmmword ptr [RSP + 0x8],XMM0
MOV qword ptr [RSP],R9
XOR ESI,ESI
MOV R9,RAX
CALL 0x0019f306
ADD RSP,0x28
RET
|
void mbedtls_ccm_star_encrypt_and_tag
(int8 param_1,int8 param_2,int8 param_3,int8 param_4,
int8 param_5,int8 param_6,int4 param_7,int4 param_8,
int4 param_9,int4 param_10)
{
ccm_auth_crypt(param_1,0,param_2,param_3,param_4,param_5,param_6,param_7,param_8,param_9,param_10)
;
return;
}
|
|
9,377 |
my_strntod_mb2_or_mb4
|
eloqsql/strings/ctype-ucs2.c
|
static double
my_strntod_mb2_or_mb4(CHARSET_INFO *cs,
char *nptr, size_t length,
char **endptr, int *err)
{
char buf[256];
double res;
register char *b= buf;
register const uchar *s= (const uchar*) nptr;
const uchar *end;
my_wc_t wc;
my_charset_conv_mb_wc mb_wc= cs->cset->mb_wc;
int cnv;
*err= 0;
/* Cut too long strings */
if (length >= sizeof(buf))
length= sizeof(buf) - 1;
end= s + length;
while ((cnv= mb_wc(cs, &wc, s, end)) > 0)
{
s+= cnv;
if (wc > (int) (uchar) 'e' || !wc)
break; /* Can't be part of double */
*b++= (char) wc;
}
*endptr= b;
res= my_strtod(buf, endptr, err);
*endptr= nptr + cs->mbminlen * (size_t) (*endptr - buf);
return res;
}
|
O0
|
c
|
my_strntod_mb2_or_mb4:
pushq %rbp
movq %rsp, %rbp
subq $0x180, %rsp # imm = 0x180
movq %fs:0x28, %rax
movq %rax, -0x8(%rbp)
movq %rdi, -0x118(%rbp)
movq %rsi, -0x120(%rbp)
movq %rdx, -0x128(%rbp)
movq %rcx, -0x130(%rbp)
movq %r8, -0x138(%rbp)
leaq -0x110(%rbp), %rax
movq %rax, -0x148(%rbp)
movq -0x120(%rbp), %rax
movq %rax, -0x150(%rbp)
movq -0x118(%rbp), %rax
movq 0xb8(%rax), %rax
movq 0x28(%rax), %rax
movq %rax, -0x168(%rbp)
movq -0x138(%rbp), %rax
movl $0x0, (%rax)
cmpq $0x100, -0x128(%rbp) # imm = 0x100
jb 0x935f5
movq $0xff, -0x128(%rbp)
movq -0x150(%rbp), %rax
addq -0x128(%rbp), %rax
movq %rax, -0x158(%rbp)
movq -0x168(%rbp), %rax
movq -0x118(%rbp), %rdi
movq -0x150(%rbp), %rdx
movq -0x158(%rbp), %rcx
leaq -0x160(%rbp), %rsi
callq *%rax
movl %eax, -0x16c(%rbp)
cmpl $0x0, %eax
jle 0x9368f
movl -0x16c(%rbp), %ecx
movq -0x150(%rbp), %rax
movslq %ecx, %rcx
addq %rcx, %rax
movq %rax, -0x150(%rbp)
cmpq $0x65, -0x160(%rbp)
ja 0x93668
cmpq $0x0, -0x160(%rbp)
jne 0x9366a
jmp 0x9368f
movq -0x160(%rbp), %rax
movb %al, %cl
movq -0x148(%rbp), %rax
movq %rax, %rdx
addq $0x1, %rdx
movq %rdx, -0x148(%rbp)
movb %cl, (%rax)
jmp 0x9360a
movq -0x148(%rbp), %rcx
movq -0x130(%rbp), %rax
movq %rcx, (%rax)
movq -0x130(%rbp), %rsi
movq -0x138(%rbp), %rdx
leaq -0x110(%rbp), %rdi
movq %rdi, -0x180(%rbp)
callq 0xa9b50
movq -0x180(%rbp), %rdi
movsd %xmm0, -0x140(%rbp)
movq -0x120(%rbp), %rcx
movq -0x118(%rbp), %rax
movl 0x98(%rax), %eax
movl %eax, %edx
movq -0x130(%rbp), %rax
movq (%rax), %rsi
subq %rdi, %rsi
imulq %rsi, %rdx
addq %rdx, %rcx
movq %rcx, (%rax)
movsd -0x140(%rbp), %xmm0
movsd %xmm0, -0x178(%rbp)
movq %fs:0x28, %rax
movq -0x8(%rbp), %rcx
cmpq %rcx, %rax
jne 0x93730
movsd -0x178(%rbp), %xmm0
addq $0x180, %rsp # imm = 0x180
popq %rbp
retq
callq 0x26360
nopw %cs:(%rax,%rax)
|
my_strntod_mb2_or_mb4:
push rbp
mov rbp, rsp
sub rsp, 180h
mov rax, fs:28h
mov [rbp+var_8], rax
mov [rbp+var_118], rdi
mov [rbp+var_120], rsi
mov [rbp+var_128], rdx
mov [rbp+var_130], rcx
mov [rbp+var_138], r8
lea rax, [rbp+var_110]
mov [rbp+var_148], rax
mov rax, [rbp+var_120]
mov [rbp+var_150], rax
mov rax, [rbp+var_118]
mov rax, [rax+0B8h]
mov rax, [rax+28h]
mov [rbp+var_168], rax
mov rax, [rbp+var_138]
mov dword ptr [rax], 0
cmp [rbp+var_128], 100h
jb short loc_935F5
mov [rbp+var_128], 0FFh
loc_935F5:
mov rax, [rbp+var_150]
add rax, [rbp+var_128]
mov [rbp+var_158], rax
loc_9360A:
mov rax, [rbp+var_168]
mov rdi, [rbp+var_118]
mov rdx, [rbp+var_150]
mov rcx, [rbp+var_158]
lea rsi, [rbp+var_160]
call rax
mov [rbp+var_16C], eax
cmp eax, 0
jle short loc_9368F
mov ecx, [rbp+var_16C]
mov rax, [rbp+var_150]
movsxd rcx, ecx
add rax, rcx
mov [rbp+var_150], rax
cmp [rbp+var_160], 65h ; 'e'
ja short loc_93668
cmp [rbp+var_160], 0
jnz short loc_9366A
loc_93668:
jmp short loc_9368F
loc_9366A:
mov rax, [rbp+var_160]
mov cl, al
mov rax, [rbp+var_148]
mov rdx, rax
add rdx, 1
mov [rbp+var_148], rdx
mov [rax], cl
jmp loc_9360A
loc_9368F:
mov rcx, [rbp+var_148]
mov rax, [rbp+var_130]
mov [rax], rcx
mov rsi, [rbp+var_130]
mov rdx, [rbp+var_138]
lea rdi, [rbp+var_110]
mov [rbp+var_180], rdi
call my_strtod
mov rdi, [rbp+var_180]
movsd [rbp+var_140], xmm0
mov rcx, [rbp+var_120]
mov rax, [rbp+var_118]
mov eax, [rax+98h]
mov edx, eax
mov rax, [rbp+var_130]
mov rsi, [rax]
sub rsi, rdi
imul rdx, rsi
add rcx, rdx
mov [rax], rcx
movsd xmm0, [rbp+var_140]
movsd [rbp+var_178], xmm0
mov rax, fs:28h
mov rcx, [rbp+var_8]
cmp rax, rcx
jnz short loc_93730
movsd xmm0, [rbp+var_178]
add rsp, 180h
pop rbp
retn
loc_93730:
call ___stack_chk_fail
|
double my_strntod_mb2_or_mb4(long long a1, long long a2, unsigned long long a3, _QWORD *a4, _DWORD *a5)
{
_BYTE *v5; // rax
int v7; // [rsp+14h] [rbp-16Ch]
long long ( *v8)(long long, unsigned long long *, long long, long long); // [rsp+18h] [rbp-168h]
unsigned long long v9; // [rsp+20h] [rbp-160h] BYREF
long long v10; // [rsp+28h] [rbp-158h]
long long v11; // [rsp+30h] [rbp-150h]
_BYTE *v12; // [rsp+38h] [rbp-148h]
double v13; // [rsp+40h] [rbp-140h]
_DWORD *v14; // [rsp+48h] [rbp-138h]
_QWORD *v15; // [rsp+50h] [rbp-130h]
unsigned long long v16; // [rsp+58h] [rbp-128h]
long long v17; // [rsp+60h] [rbp-120h]
long long v18; // [rsp+68h] [rbp-118h]
_BYTE v19[264]; // [rsp+70h] [rbp-110h] BYREF
unsigned long long v20; // [rsp+178h] [rbp-8h]
v20 = __readfsqword(0x28u);
v18 = a1;
v17 = a2;
v16 = a3;
v15 = a4;
v14 = a5;
v12 = v19;
v11 = a2;
v8 = *(long long ( **)(long long, unsigned long long *, long long, long long))(*(_QWORD *)(a1 + 184) + 40LL);
*a5 = 0;
if ( v16 >= 0x100 )
v16 = 255LL;
v10 = v16 + v11;
while ( 1 )
{
v7 = v8(v18, &v9, v11, v10);
if ( v7 <= 0 )
break;
v11 += v7;
if ( v9 > 0x65 || !v9 )
break;
v5 = v12++;
*v5 = v9;
}
*v15 = v12;
v13 = my_strtod(v19, v15, v14);
*v15 = (*v15 - (_QWORD)v19) * *(unsigned int *)(v18 + 152) + v17;
return v13;
}
|
my_strntod_mb2_or_mb4:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x180
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x8],RAX
MOV qword ptr [RBP + -0x118],RDI
MOV qword ptr [RBP + -0x120],RSI
MOV qword ptr [RBP + -0x128],RDX
MOV qword ptr [RBP + -0x130],RCX
MOV qword ptr [RBP + -0x138],R8
LEA RAX,[RBP + -0x110]
MOV qword ptr [RBP + -0x148],RAX
MOV RAX,qword ptr [RBP + -0x120]
MOV qword ptr [RBP + -0x150],RAX
MOV RAX,qword ptr [RBP + -0x118]
MOV RAX,qword ptr [RAX + 0xb8]
MOV RAX,qword ptr [RAX + 0x28]
MOV qword ptr [RBP + -0x168],RAX
MOV RAX,qword ptr [RBP + -0x138]
MOV dword ptr [RAX],0x0
CMP qword ptr [RBP + -0x128],0x100
JC 0x001935f5
MOV qword ptr [RBP + -0x128],0xff
LAB_001935f5:
MOV RAX,qword ptr [RBP + -0x150]
ADD RAX,qword ptr [RBP + -0x128]
MOV qword ptr [RBP + -0x158],RAX
LAB_0019360a:
MOV RAX,qword ptr [RBP + -0x168]
MOV RDI,qword ptr [RBP + -0x118]
MOV RDX,qword ptr [RBP + -0x150]
MOV RCX,qword ptr [RBP + -0x158]
LEA RSI,[RBP + -0x160]
CALL RAX
MOV dword ptr [RBP + -0x16c],EAX
CMP EAX,0x0
JLE 0x0019368f
MOV ECX,dword ptr [RBP + -0x16c]
MOV RAX,qword ptr [RBP + -0x150]
MOVSXD RCX,ECX
ADD RAX,RCX
MOV qword ptr [RBP + -0x150],RAX
CMP qword ptr [RBP + -0x160],0x65
JA 0x00193668
CMP qword ptr [RBP + -0x160],0x0
JNZ 0x0019366a
LAB_00193668:
JMP 0x0019368f
LAB_0019366a:
MOV RAX,qword ptr [RBP + -0x160]
MOV CL,AL
MOV RAX,qword ptr [RBP + -0x148]
MOV RDX,RAX
ADD RDX,0x1
MOV qword ptr [RBP + -0x148],RDX
MOV byte ptr [RAX],CL
JMP 0x0019360a
LAB_0019368f:
MOV RCX,qword ptr [RBP + -0x148]
MOV RAX,qword ptr [RBP + -0x130]
MOV qword ptr [RAX],RCX
MOV RSI,qword ptr [RBP + -0x130]
MOV RDX,qword ptr [RBP + -0x138]
LEA RDI,[RBP + -0x110]
MOV qword ptr [RBP + -0x180],RDI
CALL 0x001a9b50
MOV RDI,qword ptr [RBP + -0x180]
MOVSD qword ptr [RBP + -0x140],XMM0
MOV RCX,qword ptr [RBP + -0x120]
MOV RAX,qword ptr [RBP + -0x118]
MOV EAX,dword ptr [RAX + 0x98]
MOV EDX,EAX
MOV RAX,qword ptr [RBP + -0x130]
MOV RSI,qword ptr [RAX]
SUB RSI,RDI
IMUL RDX,RSI
ADD RCX,RDX
MOV qword ptr [RAX],RCX
MOVSD XMM0,qword ptr [RBP + -0x140]
MOVSD qword ptr [RBP + -0x178],XMM0
MOV RAX,qword ptr FS:[0x28]
MOV RCX,qword ptr [RBP + -0x8]
CMP RAX,RCX
JNZ 0x00193730
MOVSD XMM0,qword ptr [RBP + -0x178]
ADD RSP,0x180
POP RBP
RET
LAB_00193730:
CALL 0x00126360
|
int8
my_strntod_mb2_or_mb4(long param_1,long param_2,ulong param_3,long *param_4,int4 *param_5)
{
code *pcVar1;
int iVar2;
long in_FS_OFFSET;
ulong local_168;
long local_160;
long local_158;
int1 *local_150;
int8 local_148;
int4 *local_140;
long *local_138;
ulong local_130;
long local_128;
long local_120;
int1 local_118 [264];
long local_10;
local_10 = *(long *)(in_FS_OFFSET + 0x28);
pcVar1 = *(code **)(*(long *)(param_1 + 0xb8) + 0x28);
*param_5 = 0;
local_130 = param_3;
if (0xff < param_3) {
local_130 = 0xff;
}
local_160 = param_2 + local_130;
local_158 = param_2;
local_150 = local_118;
local_140 = param_5;
local_138 = param_4;
local_128 = param_2;
local_120 = param_1;
while (((iVar2 = (*pcVar1)(local_120,&local_168,local_158,local_160), 0 < iVar2 &&
(local_158 = local_158 + iVar2, local_168 < 0x66)) && (local_168 != 0))) {
*local_150 = (char)local_168;
local_150 = local_150 + 1;
}
*local_138 = (long)local_150;
local_148 = my_strtod(local_118,local_138,local_140);
*local_138 = local_128 + (ulong)*(uint *)(local_120 + 0x98) * (*local_138 - (long)local_118);
if (*(long *)(in_FS_OFFSET + 0x28) != local_10) {
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
return local_148;
}
|
|
9,378 |
my_strntod_mb2_or_mb4
|
eloqsql/strings/ctype-ucs2.c
|
static double
my_strntod_mb2_or_mb4(CHARSET_INFO *cs,
char *nptr, size_t length,
char **endptr, int *err)
{
char buf[256];
double res;
register char *b= buf;
register const uchar *s= (const uchar*) nptr;
const uchar *end;
my_wc_t wc;
my_charset_conv_mb_wc mb_wc= cs->cset->mb_wc;
int cnv;
*err= 0;
/* Cut too long strings */
if (length >= sizeof(buf))
length= sizeof(buf) - 1;
end= s + length;
while ((cnv= mb_wc(cs, &wc, s, end)) > 0)
{
s+= cnv;
if (wc > (int) (uchar) 'e' || !wc)
break; /* Can't be part of double */
*b++= (char) wc;
}
*endptr= b;
res= my_strtod(buf, endptr, err);
*endptr= nptr + cs->mbminlen * (size_t) (*endptr - buf);
return res;
}
|
O3
|
c
|
my_strntod_mb2_or_mb4:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x128, %rsp # imm = 0x128
movq %rcx, -0x150(%rbp)
movq %rsi, %rcx
movq %rdi, %r15
movq %fs:0x28, %rax
movq %rax, -0x30(%rbp)
movq 0xb8(%rdi), %rax
movq 0x28(%rax), %rbx
movq %r8, -0x148(%rbp)
movl $0x0, (%r8)
movl $0xff, %r13d
cmpq %r13, %rdx
cmovbq %rdx, %r13
addq %rsi, %r13
leaq -0x140(%rbp), %rsi
movq %rcx, -0x138(%rbp)
movq %rcx, %rdx
movq %r13, %rcx
callq *%rbx
leaq -0x130(%rbp), %r12
testl %eax, %eax
jle 0x6a101
movq -0x138(%rbp), %r14
movq -0x140(%rbp), %rcx
leaq -0x1(%rcx), %rdx
cmpq $0x64, %rdx
ja 0x6a101
movl %eax, %eax
addq %rax, %r14
movb %cl, (%r12)
incq %r12
movq %r15, %rdi
leaq -0x140(%rbp), %rsi
movq %r14, %rdx
movq %r13, %rcx
callq *%rbx
testl %eax, %eax
jg 0x6a0ce
movq -0x150(%rbp), %rbx
movq %r12, (%rbx)
leaq -0x130(%rbp), %r14
movq %r14, %rdi
movq %rbx, %rsi
movq -0x148(%rbp), %rdx
callq 0x79c7c
movl 0x98(%r15), %eax
movq (%rbx), %rcx
subq %r14, %rcx
imulq %rax, %rcx
movq -0x138(%rbp), %rax
addq %rcx, %rax
movq %rax, (%rbx)
movq %fs:0x28, %rax
cmpq -0x30(%rbp), %rax
jne 0x6a163
addq $0x128, %rsp # imm = 0x128
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0x263a0
|
my_strntod_mb2_or_mb4:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 128h
mov [rbp+var_150], rcx
mov rcx, rsi
mov r15, rdi
mov rax, fs:28h
mov [rbp+var_30], rax
mov rax, [rdi+0B8h]
mov rbx, [rax+28h]
mov [rbp+var_148], r8
mov dword ptr [r8], 0
mov r13d, 0FFh
cmp rdx, r13
cmovb r13, rdx
add r13, rsi
lea rsi, [rbp+var_140]
mov [rbp+var_138], rcx
mov rdx, rcx
mov rcx, r13
call rbx
lea r12, [rbp+var_130]
test eax, eax
jle short loc_6A101
mov r14, [rbp+var_138]
loc_6A0CE:
mov rcx, [rbp+var_140]
lea rdx, [rcx-1]
cmp rdx, 64h ; 'd'
ja short loc_6A101
mov eax, eax
add r14, rax
mov [r12], cl
inc r12
mov rdi, r15
lea rsi, [rbp+var_140]
mov rdx, r14
mov rcx, r13
call rbx
test eax, eax
jg short loc_6A0CE
loc_6A101:
mov rbx, [rbp+var_150]
mov [rbx], r12
lea r14, [rbp+var_130]
mov rdi, r14
mov rsi, rbx
mov rdx, [rbp+var_148]
call my_strtod
mov eax, [r15+98h]
mov rcx, [rbx]
sub rcx, r14
imul rcx, rax
mov rax, [rbp+var_138]
add rax, rcx
mov [rbx], rax
mov rax, fs:28h
cmp rax, [rbp+var_30]
jnz short loc_6A163
add rsp, 128h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_6A163:
call ___stack_chk_fail
|
unsigned long long my_strntod_mb2_or_mb4(long long a1, long long a2, unsigned long long a3, _QWORD *a4, _DWORD *a5)
{
long long ( *v5)(long long, long long *, long long, long long); // rbx
long long v6; // r13
long long v7; // r13
int v8; // eax
_BYTE *v9; // r12
long long v10; // r14
long long v14; // [rsp+10h] [rbp-140h] BYREF
long long v15; // [rsp+18h] [rbp-138h]
_BYTE v16[256]; // [rsp+20h] [rbp-130h] BYREF
unsigned long long v17; // [rsp+120h] [rbp-30h]
v17 = __readfsqword(0x28u);
v5 = *(long long ( **)(long long, long long *, long long, long long))(*(_QWORD *)(a1 + 184) + 40LL);
*a5 = 0;
v6 = 255LL;
if ( a3 < 0xFF )
v6 = a3;
v7 = a2 + v6;
v15 = a2;
v8 = v5(a1, &v14, a2, v7);
v9 = v16;
if ( v8 > 0 )
{
v10 = v15;
do
{
if ( (unsigned long long)(v14 - 1) > 0x64 )
break;
v10 += (unsigned int)v8;
*v9++ = v14;
v8 = v5(a1, &v14, v10, v7);
}
while ( v8 > 0 );
}
*a4 = v9;
my_strtod(v16, a4, a5);
*a4 = *(unsigned int *)(a1 + 152) * (*a4 - (_QWORD)v16) + v15;
return __readfsqword(0x28u);
}
|
my_strntod_mb2_or_mb4:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x128
MOV qword ptr [RBP + -0x150],RCX
MOV RCX,RSI
MOV R15,RDI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x30],RAX
MOV RAX,qword ptr [RDI + 0xb8]
MOV RBX,qword ptr [RAX + 0x28]
MOV qword ptr [RBP + -0x148],R8
MOV dword ptr [R8],0x0
MOV R13D,0xff
CMP RDX,R13
CMOVC R13,RDX
ADD R13,RSI
LEA RSI,[RBP + -0x140]
MOV qword ptr [RBP + -0x138],RCX
MOV RDX,RCX
MOV RCX,R13
CALL RBX
LEA R12,[RBP + -0x130]
TEST EAX,EAX
JLE 0x0016a101
MOV R14,qword ptr [RBP + -0x138]
LAB_0016a0ce:
MOV RCX,qword ptr [RBP + -0x140]
LEA RDX,[RCX + -0x1]
CMP RDX,0x64
JA 0x0016a101
MOV EAX,EAX
ADD R14,RAX
MOV byte ptr [R12],CL
INC R12
MOV RDI,R15
LEA RSI,[RBP + -0x140]
MOV RDX,R14
MOV RCX,R13
CALL RBX
TEST EAX,EAX
JG 0x0016a0ce
LAB_0016a101:
MOV RBX,qword ptr [RBP + -0x150]
MOV qword ptr [RBX],R12
LEA R14,[RBP + -0x130]
MOV RDI,R14
MOV RSI,RBX
MOV RDX,qword ptr [RBP + -0x148]
CALL 0x00179c7c
MOV EAX,dword ptr [R15 + 0x98]
MOV RCX,qword ptr [RBX]
SUB RCX,R14
IMUL RCX,RAX
MOV RAX,qword ptr [RBP + -0x138]
ADD RAX,RCX
MOV qword ptr [RBX],RAX
MOV RAX,qword ptr FS:[0x28]
CMP RAX,qword ptr [RBP + -0x30]
JNZ 0x0016a163
ADD RSP,0x128
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_0016a163:
CALL 0x001263a0
|
void my_strntod_mb2_or_mb4
(long param_1,long param_2,ulong param_3,long *param_4,int4 *param_5)
{
code *pcVar1;
uint uVar2;
int1 *puVar3;
ulong uVar4;
long lVar5;
long in_FS_OFFSET;
long local_148;
long local_140;
int1 local_138 [256];
long local_38;
local_38 = *(long *)(in_FS_OFFSET + 0x28);
pcVar1 = *(code **)(*(long *)(param_1 + 0xb8) + 0x28);
*param_5 = 0;
uVar4 = 0xff;
if (param_3 < 0xff) {
uVar4 = param_3;
}
local_140 = param_2;
uVar2 = (*pcVar1)(param_1,&local_148,param_2,uVar4 + param_2);
puVar3 = local_138;
lVar5 = local_140;
while ((0 < (int)uVar2 && (local_148 - 1U < 0x65))) {
lVar5 = lVar5 + (ulong)uVar2;
*puVar3 = (char)local_148;
puVar3 = puVar3 + 1;
uVar2 = (*pcVar1)(param_1,&local_148,lVar5,uVar4 + param_2);
}
*param_4 = (long)puVar3;
my_strtod(local_138,param_4,param_5);
*param_4 = local_140 + (*param_4 - (long)local_138) * (ulong)*(uint *)(param_1 + 0x98);
if (*(long *)(in_FS_OFFSET + 0x28) == local_38) {
return;
}
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
|
|
9,379 |
keygen
|
corpus-core[P]colibri-stateless/build_O0/_deps/blst-src/src/keygen.c
|
static void keygen(pow256 SK, const void *IKM, size_t IKM_len,
const void *salt, size_t salt_len,
const void *info, size_t info_len,
int version)
{
struct {
HMAC_SHA256_CTX ctx;
unsigned char PRK[32], OKM[48];
vec512 key;
} scratch;
unsigned char salt_prime[32] = "BLS-SIG-KEYGEN-SALT-";
if (IKM_len < 32 || (version > 4 && salt == NULL)) {
vec_zero(SK, sizeof(pow256));
return;
}
/*
* Vet |info| since some callers were caught to be sloppy, e.g.
* SWIG-4.0-generated Python wrapper...
*/
info_len = info==NULL ? 0 : info_len;
if (salt == NULL) {
salt = salt_prime;
salt_len = 20;
}
if (version == 4) {
/* salt = H(salt) */
sha256_init(&scratch.ctx.ctx);
sha256_update(&scratch.ctx.ctx, salt, salt_len);
sha256_final(salt_prime, &scratch.ctx.ctx);
salt = salt_prime;
salt_len = sizeof(salt_prime);
}
while (1) {
/* PRK = HKDF-Extract(salt, IKM || I2OSP(0, 1)) */
HKDF_Extract(scratch.PRK, salt, salt_len,
IKM, IKM_len, 1, &scratch.ctx);
/* OKM = HKDF-Expand(PRK, key_info || I2OSP(L, 2), L) */
HKDF_Expand(scratch.OKM, sizeof(scratch.OKM), scratch.PRK,
info, info_len, 1, &scratch.ctx);
/* SK = OS2IP(OKM) mod r */
vec_zero(scratch.key, sizeof(scratch.key));
limbs_from_be_bytes(scratch.key, scratch.OKM, sizeof(scratch.OKM));
redc_mont_256(scratch.key, scratch.key, BLS12_381_r, r0);
/*
* Given that mul_mont_sparse_256 has special boundary conditions
* it's appropriate to mention that redc_mont_256 output is fully
* reduced at this point. Because we started with 384-bit input,
* one with most significant half smaller than the modulus.
*/
mul_mont_sparse_256(scratch.key, scratch.key, BLS12_381_rRR,
BLS12_381_r, r0);
if (version < 4 || !vec_is_zero(scratch.key, sizeof(vec256)))
break;
/* salt = H(salt) */
sha256_init(&scratch.ctx.ctx);
sha256_update(&scratch.ctx.ctx, salt, salt_len);
sha256_final(salt_prime, &scratch.ctx.ctx);
salt = salt_prime;
salt_len = sizeof(salt_prime);
}
le_bytes_from_limbs(SK, scratch.key, sizeof(pow256));
/*
* scrub the stack just in case next callee inadvertently flashes
* a fragment across application boundary...
*/
vec_zero(&scratch, sizeof(scratch));
}
|
O0
|
c
|
keygen:
pushq %rbp
movq %rsp, %rbp
subq $0x1e0, %rsp # imm = 0x1E0
movl 0x18(%rbp), %eax
movq 0x10(%rbp), %rax
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq %r8, -0x28(%rbp)
movq %r9, -0x30(%rbp)
movq 0x40c9f(%rip), %rax # 0xe8750
movq %rax, -0x1d0(%rbp)
movq 0x40c99(%rip), %rax # 0xe8758
movq %rax, -0x1c8(%rbp)
movq 0x40c93(%rip), %rax # 0xe8760
movq %rax, -0x1c0(%rbp)
movq 0x40c8d(%rip), %rax # 0xe8768
movq %rax, -0x1b8(%rbp)
cmpq $0x20, -0x18(%rbp)
jb 0xa7af6
cmpl $0x4, 0x18(%rbp)
jle 0xa7b09
cmpq $0x0, -0x20(%rbp)
jne 0xa7b09
movq -0x8(%rbp), %rdi
movl $0x20, %esi
callq 0xa87c0
jmp 0xa7d53
cmpq $0x0, -0x30(%rbp)
jne 0xa7b1b
xorl %eax, %eax
movq %rax, -0x1d8(%rbp)
jmp 0xa7b26
movq 0x10(%rbp), %rax
movq %rax, -0x1d8(%rbp)
movq -0x1d8(%rbp), %rax
movq %rax, 0x10(%rbp)
cmpq $0x0, -0x20(%rbp)
jne 0xa7b4b
leaq -0x1d0(%rbp), %rax
movq %rax, -0x20(%rbp)
movq $0x14, -0x28(%rbp)
cmpl $0x4, 0x18(%rbp)
jne 0xa7b97
leaq -0x1b0(%rbp), %rdi
callq 0xb7140
leaq -0x1b0(%rbp), %rdi
movq -0x20(%rbp), %rsi
movq -0x28(%rbp), %rdx
callq 0xb7190
leaq -0x1d0(%rbp), %rdi
leaq -0x1b0(%rbp), %rsi
callq 0xb7320
leaq -0x1d0(%rbp), %rax
movq %rax, -0x20(%rbp)
movq $0x20, -0x28(%rbp)
jmp 0xa7b99
leaq -0x1b0(%rbp), %rdi
addq $0xf0, %rdi
movq -0x20(%rbp), %rsi
movq -0x28(%rbp), %rdx
movq -0x10(%rbp), %rcx
movq -0x18(%rbp), %r8
leaq -0x1b0(%rbp), %rax
movl $0x1, %r9d
movq %rax, (%rsp)
callq 0xb7cd0
leaq -0x1b0(%rbp), %rdi
addq $0x110, %rdi # imm = 0x110
leaq -0x1b0(%rbp), %rdx
addq $0xf0, %rdx
movq -0x30(%rbp), %rcx
movq 0x10(%rbp), %r8
leaq -0x1b0(%rbp), %rax
movl $0x30, %esi
movl $0x1, %r9d
movq %rax, (%rsp)
callq 0xb7d80
leaq -0x1b0(%rbp), %rdi
addq $0x140, %rdi # imm = 0x140
movl $0x40, %esi
callq 0xa87c0
leaq -0x1b0(%rbp), %rdi
addq $0x140, %rdi # imm = 0x140
leaq -0x1b0(%rbp), %rsi
addq $0x110, %rsi # imm = 0x110
movl $0x30, %edx
callq 0xb6350
leaq -0x1b0(%rbp), %rdi
addq $0x140, %rdi # imm = 0x140
leaq -0x1b0(%rbp), %rsi
addq $0x140, %rsi # imm = 0x140
leaq 0x405a3(%rip), %rdx # 0xe8210
movabsq $-0x100000001, %rcx # imm = 0xFFFFFFFEFFFFFFFF
callq 0xccb80
leaq -0x1b0(%rbp), %rdi
addq $0x140, %rdi # imm = 0x140
leaq -0x1b0(%rbp), %rsi
addq $0x140, %rsi # imm = 0x140
leaq 0x40a81(%rip), %rdx # 0xe8720
leaq 0x4056a(%rip), %rcx # 0xe8210
movabsq $-0x100000001, %r8 # imm = 0xFFFFFFFEFFFFFFFF
callq 0xcc6c0
cmpl $0x4, 0x18(%rbp)
jl 0xa7cd9
leaq -0x1b0(%rbp), %rdi
addq $0x140, %rdi # imm = 0x140
movl $0x20, %esi
callq 0xa8cd0
cmpq $0x0, %rax
jne 0xa7cdb
jmp 0xa7d26
leaq -0x1b0(%rbp), %rdi
callq 0xb7140
leaq -0x1b0(%rbp), %rdi
movq -0x20(%rbp), %rsi
movq -0x28(%rbp), %rdx
callq 0xb7190
leaq -0x1d0(%rbp), %rdi
leaq -0x1b0(%rbp), %rsi
callq 0xb7320
leaq -0x1d0(%rbp), %rax
movq %rax, -0x20(%rbp)
movq $0x20, -0x28(%rbp)
jmp 0xa7b99
movq -0x8(%rbp), %rdi
leaq -0x1b0(%rbp), %rsi
addq $0x140, %rsi # imm = 0x140
movl $0x20, %edx
callq 0xb59f0
leaq -0x1b0(%rbp), %rdi
movl $0x180, %esi # imm = 0x180
callq 0xa87c0
addq $0x1e0, %rsp # imm = 0x1E0
popq %rbp
retq
nopl (%rax)
|
keygen:
push rbp
mov rbp, rsp
sub rsp, 1E0h
mov eax, [rbp+arg_8]
mov rax, [rbp+arg_0]
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov [rbp+var_18], rdx
mov [rbp+var_20], rcx
mov [rbp+var_28], r8
mov [rbp+var_30], r9
mov rax, cs:qword_E8750
mov [rbp+var_1D0], rax
mov rax, cs:qword_E8758
mov [rbp+var_1C8], rax
mov rax, cs:qword_E8760
mov [rbp+var_1C0], rax
mov rax, cs:qword_E8768
mov [rbp+var_1B8], rax
cmp [rbp+var_18], 20h ; ' '
jb short loc_A7AF6
cmp [rbp+arg_8], 4
jle short loc_A7B09
cmp [rbp+var_20], 0
jnz short loc_A7B09
loc_A7AF6:
mov rdi, [rbp+var_8]
mov esi, 20h ; ' '
call vec_zero
jmp loc_A7D53
loc_A7B09:
cmp [rbp+var_30], 0
jnz short loc_A7B1B
xor eax, eax
mov [rbp+var_1D8], rax
jmp short loc_A7B26
loc_A7B1B:
mov rax, [rbp+arg_0]
mov [rbp+var_1D8], rax
loc_A7B26:
mov rax, [rbp+var_1D8]
mov [rbp+arg_0], rax
cmp [rbp+var_20], 0
jnz short loc_A7B4B
lea rax, [rbp+var_1D0]
mov [rbp+var_20], rax
mov [rbp+var_28], 14h
loc_A7B4B:
cmp [rbp+arg_8], 4
jnz short loc_A7B97
lea rdi, [rbp+var_1B0]
call sha256_init
lea rdi, [rbp+var_1B0]
mov rsi, [rbp+var_20]
mov rdx, [rbp+var_28]
call sha256_update
lea rdi, [rbp+var_1D0]
lea rsi, [rbp+var_1B0]
call sha256_final
lea rax, [rbp+var_1D0]
mov [rbp+var_20], rax
mov [rbp+var_28], 20h ; ' '
loc_A7B97:
jmp short $+2
loc_A7B99:
lea rdi, [rbp+var_1B0]
add rdi, 0F0h
mov rsi, [rbp+var_20]
mov rdx, [rbp+var_28]
mov rcx, [rbp+var_10]
mov r8, [rbp+var_18]
lea rax, [rbp+var_1B0]
mov r9d, 1
mov [rsp+1E0h+var_1E0], rax
call HKDF_Extract
lea rdi, [rbp+var_1B0]
add rdi, 110h
lea rdx, [rbp+var_1B0]
add rdx, 0F0h
mov rcx, [rbp+var_30]
mov r8, [rbp+arg_0]
lea rax, [rbp+var_1B0]
mov esi, 30h ; '0'
mov r9d, 1
mov [rsp+1E0h+var_1E0], rax
call HKDF_Expand
lea rdi, [rbp+var_1B0]
add rdi, 140h
mov esi, 40h ; '@'
call vec_zero
lea rdi, [rbp+var_1B0]
add rdi, 140h
lea rsi, [rbp+var_1B0]
add rsi, 110h
mov edx, 30h ; '0'
call limbs_from_be_bytes
lea rdi, [rbp+var_1B0]
add rdi, 140h
lea rsi, [rbp+var_1B0]
add rsi, 140h
lea rdx, BLS12_381_r
mov rcx, 0FFFFFFFEFFFFFFFFh
call redc_mont_256
lea rdi, [rbp+var_1B0]
add rdi, 140h
lea rsi, [rbp+var_1B0]
add rsi, 140h
lea rdx, BLS12_381_rRR
lea rcx, BLS12_381_r
mov r8, 0FFFFFFFEFFFFFFFFh
call mul_mont_sparse_256
cmp [rbp+arg_8], 4
jl short loc_A7CD9
lea rdi, [rbp+var_1B0]
add rdi, 140h
mov esi, 20h ; ' '
call vec_is_zero
cmp rax, 0
jnz short loc_A7CDB
loc_A7CD9:
jmp short loc_A7D26
loc_A7CDB:
lea rdi, [rbp+var_1B0]
call sha256_init
lea rdi, [rbp+var_1B0]
mov rsi, [rbp+var_20]
mov rdx, [rbp+var_28]
call sha256_update
lea rdi, [rbp+var_1D0]
lea rsi, [rbp+var_1B0]
call sha256_final
lea rax, [rbp+var_1D0]
mov [rbp+var_20], rax
mov [rbp+var_28], 20h ; ' '
jmp loc_A7B99
loc_A7D26:
mov rdi, [rbp+var_8]
lea rsi, [rbp+var_1B0]
add rsi, 140h
mov edx, 20h ; ' '
call le_bytes_from_limbs
lea rdi, [rbp+var_1B0]
mov esi, 180h
call vec_zero
loc_A7D53:
add rsp, 1E0h
pop rbp
retn
|
long long keygen(
long long a1,
long long a2,
unsigned long long a3,
_WORD *a4,
long long a5,
long long a6,
long long a7,
int a8)
{
int v9; // [rsp+8h] [rbp-1D8h]
_WORD v10[12]; // [rsp+10h] [rbp-1D0h] BYREF
long long v11; // [rsp+28h] [rbp-1B8h]
_BYTE v12[240]; // [rsp+30h] [rbp-1B0h] BYREF
_BYTE v13[32]; // [rsp+120h] [rbp-C0h] BYREF
_BYTE v14[48]; // [rsp+140h] [rbp-A0h] BYREF
_BYTE v15[64]; // [rsp+170h] [rbp-70h] BYREF
long long v16; // [rsp+1B0h] [rbp-30h]
long long v17; // [rsp+1B8h] [rbp-28h]
_WORD *v18; // [rsp+1C0h] [rbp-20h]
unsigned long long v19; // [rsp+1C8h] [rbp-18h]
long long v20; // [rsp+1D0h] [rbp-10h]
long long v21; // [rsp+1D8h] [rbp-8h]
v21 = a1;
v20 = a2;
v19 = a3;
v18 = a4;
v17 = a5;
v16 = a6;
strcpy((char *)v10, "BLS-SIG-KEYGEN-SALT-");
HIBYTE(v10[10]) = 0;
v10[11] = 0;
v11 = 0LL;
if ( a3 < 0x20 || a8 > 4 && !v18 )
return vec_zero(v21, 32LL);
if ( v16 )
v9 = a7;
else
v9 = 0;
if ( !v18 )
{
v18 = v10;
v17 = 20LL;
}
if ( a8 != 4 )
goto LABEL_12;
do
{
sha256_init(v12);
sha256_update(v12, v18, v17);
sha256_final(v10, v12);
v18 = v10;
v17 = 32LL;
LABEL_12:
HKDF_Extract((unsigned int)v13, (_DWORD)v18, v17, v20, v19, 1, (long long)v12);
HKDF_Expand((unsigned int)v14, 48, (unsigned int)v13, v16, v9, 1, (long long)v12);
vec_zero(v15, 64LL);
limbs_from_be_bytes(v15, v14, 48LL);
redc_mont_256(v15, v15, &BLS12_381_r, 0xFFFFFFFEFFFFFFFFLL);
mul_mont_sparse_256(v15, v15, &BLS12_381_rRR, &BLS12_381_r, 0xFFFFFFFEFFFFFFFFLL);
}
while ( a8 >= 4 && vec_is_zero(v15, 32LL) );
le_bytes_from_limbs(v21, v15, 32LL);
return vec_zero(v12, 384LL);
}
|
keygen:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x1e0
MOV EAX,dword ptr [RBP + 0x18]
MOV RAX,qword ptr [RBP + 0x10]
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV qword ptr [RBP + -0x18],RDX
MOV qword ptr [RBP + -0x20],RCX
MOV qword ptr [RBP + -0x28],R8
MOV qword ptr [RBP + -0x30],R9
MOV RAX,qword ptr [0x001e8750]
MOV qword ptr [RBP + -0x1d0],RAX
MOV RAX,qword ptr [0x001e8758]
MOV qword ptr [RBP + -0x1c8],RAX
MOV RAX,qword ptr [0x001e8760]
MOV qword ptr [RBP + -0x1c0],RAX
MOV RAX,qword ptr [0x001e8768]
MOV qword ptr [RBP + -0x1b8],RAX
CMP qword ptr [RBP + -0x18],0x20
JC 0x001a7af6
CMP dword ptr [RBP + 0x18],0x4
JLE 0x001a7b09
CMP qword ptr [RBP + -0x20],0x0
JNZ 0x001a7b09
LAB_001a7af6:
MOV RDI,qword ptr [RBP + -0x8]
MOV ESI,0x20
CALL 0x001a87c0
JMP 0x001a7d53
LAB_001a7b09:
CMP qword ptr [RBP + -0x30],0x0
JNZ 0x001a7b1b
XOR EAX,EAX
MOV qword ptr [RBP + -0x1d8],RAX
JMP 0x001a7b26
LAB_001a7b1b:
MOV RAX,qword ptr [RBP + 0x10]
MOV qword ptr [RBP + -0x1d8],RAX
LAB_001a7b26:
MOV RAX,qword ptr [RBP + -0x1d8]
MOV qword ptr [RBP + 0x10],RAX
CMP qword ptr [RBP + -0x20],0x0
JNZ 0x001a7b4b
LEA RAX,[RBP + -0x1d0]
MOV qword ptr [RBP + -0x20],RAX
MOV qword ptr [RBP + -0x28],0x14
LAB_001a7b4b:
CMP dword ptr [RBP + 0x18],0x4
JNZ 0x001a7b97
LEA RDI,[RBP + -0x1b0]
CALL 0x001b7140
LEA RDI,[RBP + -0x1b0]
MOV RSI,qword ptr [RBP + -0x20]
MOV RDX,qword ptr [RBP + -0x28]
CALL 0x001b7190
LEA RDI,[RBP + -0x1d0]
LEA RSI,[RBP + -0x1b0]
CALL 0x001b7320
LEA RAX,[RBP + -0x1d0]
MOV qword ptr [RBP + -0x20],RAX
MOV qword ptr [RBP + -0x28],0x20
LAB_001a7b97:
JMP 0x001a7b99
LAB_001a7b99:
LEA RDI,[RBP + -0x1b0]
ADD RDI,0xf0
MOV RSI,qword ptr [RBP + -0x20]
MOV RDX,qword ptr [RBP + -0x28]
MOV RCX,qword ptr [RBP + -0x10]
MOV R8,qword ptr [RBP + -0x18]
LEA RAX,[RBP + -0x1b0]
MOV R9D,0x1
MOV qword ptr [RSP],RAX
CALL 0x001b7cd0
LEA RDI,[RBP + -0x1b0]
ADD RDI,0x110
LEA RDX,[RBP + -0x1b0]
ADD RDX,0xf0
MOV RCX,qword ptr [RBP + -0x30]
MOV R8,qword ptr [RBP + 0x10]
LEA RAX,[RBP + -0x1b0]
MOV ESI,0x30
MOV R9D,0x1
MOV qword ptr [RSP],RAX
CALL 0x001b7d80
LEA RDI,[RBP + -0x1b0]
ADD RDI,0x140
MOV ESI,0x40
CALL 0x001a87c0
LEA RDI,[RBP + -0x1b0]
ADD RDI,0x140
LEA RSI,[RBP + -0x1b0]
ADD RSI,0x110
MOV EDX,0x30
CALL 0x001b6350
LEA RDI,[RBP + -0x1b0]
ADD RDI,0x140
LEA RSI,[RBP + -0x1b0]
ADD RSI,0x140
LEA RDX,[0x1e8210]
MOV RCX,-0x100000001
CALL 0x001ccb80
LEA RDI,[RBP + -0x1b0]
ADD RDI,0x140
LEA RSI,[RBP + -0x1b0]
ADD RSI,0x140
LEA RDX,[0x1e8720]
LEA RCX,[0x1e8210]
MOV R8,-0x100000001
CALL 0x001cc6c0
CMP dword ptr [RBP + 0x18],0x4
JL 0x001a7cd9
LEA RDI,[RBP + -0x1b0]
ADD RDI,0x140
MOV ESI,0x20
CALL 0x001a8cd0
CMP RAX,0x0
JNZ 0x001a7cdb
LAB_001a7cd9:
JMP 0x001a7d26
LAB_001a7cdb:
LEA RDI,[RBP + -0x1b0]
CALL 0x001b7140
LEA RDI,[RBP + -0x1b0]
MOV RSI,qword ptr [RBP + -0x20]
MOV RDX,qword ptr [RBP + -0x28]
CALL 0x001b7190
LEA RDI,[RBP + -0x1d0]
LEA RSI,[RBP + -0x1b0]
CALL 0x001b7320
LEA RAX,[RBP + -0x1d0]
MOV qword ptr [RBP + -0x20],RAX
MOV qword ptr [RBP + -0x28],0x20
JMP 0x001a7b99
LAB_001a7d26:
MOV RDI,qword ptr [RBP + -0x8]
LEA RSI,[RBP + -0x1b0]
ADD RSI,0x140
MOV EDX,0x20
CALL 0x001b59f0
LEA RDI,[RBP + -0x1b0]
MOV ESI,0x180
CALL 0x001a87c0
LAB_001a7d53:
ADD RSP,0x1e0
POP RBP
RET
|
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
int keygen(EVP_PKEY_CTX *ctx,EVP_PKEY *pkey)
{
int iVar1;
long lVar2;
char *in_RCX;
ulong in_RDX;
int8 in_R8;
long in_R9;
int8 in_stack_00000008;
int in_stack_00000010;
int8 local_1e0;
char local_1d8 [8];
char local_1d0 [8];
int8 local_1c8;
int8 local_1c0;
int1 local_1b8 [240];
int1 auStack_c8 [32];
int1 auStack_a8 [48];
int1 auStack_78 [64];
long local_38;
int8 local_30;
char *local_28;
ulong local_20;
EVP_PKEY *local_18;
EVP_PKEY_CTX *local_10;
local_1d8 = (char [8])s_BLS_SIG_KEYGEN_SALT__001e8750._0_8_;
local_1d0 = (char [8])s_BLS_SIG_KEYGEN_SALT__001e8750._8_8_;
local_1c8 = ram0x001e8760;
local_1c0 = DAT_001e8768;
local_18 = pkey;
local_10 = ctx;
if ((in_RDX < 0x20) || ((4 < in_stack_00000010 && (in_RCX == (char *)0x0)))) {
iVar1 = vec_zero(ctx,0x20);
}
else {
if (in_R9 == 0) {
local_1e0 = 0;
}
else {
local_1e0 = in_stack_00000008;
}
local_30 = in_R8;
local_28 = in_RCX;
if (in_RCX == (char *)0x0) {
local_28 = local_1d8;
local_30 = 0x14;
}
local_38 = in_R9;
local_20 = in_RDX;
if (in_stack_00000010 == 4) {
sha256_init(local_1b8);
sha256_update(local_1b8,local_28,local_30);
sha256_final(local_1d8,local_1b8);
local_28 = local_1d8;
local_30 = 0x20;
}
while( true ) {
HKDF_Extract(auStack_c8,local_28,local_30,local_18,local_20,1,local_1b8);
HKDF_Expand(auStack_a8,0x30,auStack_c8,local_38,local_1e0,1,local_1b8);
vec_zero(auStack_78,0x40);
limbs_from_be_bytes(auStack_78,auStack_a8,0x30);
redc_mont_256(auStack_78,auStack_78,BLS12_381_r,0xfffffffeffffffff);
mul_mont_sparse_256(auStack_78,auStack_78,BLS12_381_rRR,BLS12_381_r,0xfffffffeffffffff);
if ((in_stack_00000010 < 4) || (lVar2 = vec_is_zero(auStack_78,0x20), lVar2 == 0)) break;
sha256_init(local_1b8);
sha256_update(local_1b8,local_28,local_30);
sha256_final(local_1d8,local_1b8);
local_28 = local_1d8;
local_30 = 0x20;
}
le_bytes_from_limbs(local_10,auStack_78,0x20);
iVar1 = vec_zero(local_1b8,0x180);
}
return iVar1;
}
|
|
9,380 |
js_proxy_finalizer
|
bluesky950520[P]quickjs/quickjs.c
|
static void js_proxy_finalizer(JSRuntime *rt, JSValue val)
{
JSProxyData *s = JS_GetOpaque(val, JS_CLASS_PROXY);
if (s) {
JS_FreeValueRT(rt, s->target);
JS_FreeValueRT(rt, s->handler);
js_free_rt(rt, s);
}
}
|
O1
|
c
|
js_proxy_finalizer:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq %rsi, (%rsp)
cmpl $-0x1, %edx
jne 0x4e0ab
movq (%rsp), %rax
cmpw $0x30, 0x6(%rax)
jne 0x4e0ab
movq 0x30(%rax), %r14
jmp 0x4e0ae
xorl %r14d, %r14d
testq %r14, %r14
je 0x4e0ff
movq (%r14), %rsi
movq 0x8(%r14), %rdx
movq %rbx, %rdi
callq 0x1d8c6
movq 0x10(%r14), %rsi
movq 0x18(%r14), %rdx
movq %rbx, %rdi
callq 0x1d8c6
decq 0x28(%rbx)
movq %r14, %rdi
callq *0x20(%rbx)
movq 0x10(%rbx), %rcx
movq 0x30(%rbx), %rdx
subq %rax, %rdx
addq $-0x8, %rdx
movq %rdx, 0x30(%rbx)
movq 0x40(%rbx), %rdi
movq %r14, %rsi
addq $0x8, %rsp
popq %rbx
popq %r14
jmpq *%rcx
addq $0x8, %rsp
popq %rbx
popq %r14
retq
|
js_proxy_finalizer:
push r14
push rbx
push rax
mov rbx, rdi
mov [rsp+18h+var_18], rsi
cmp edx, 0FFFFFFFFh
jnz short loc_4E0AB
mov rax, [rsp+18h+var_18]
cmp word ptr [rax+6], 30h ; '0'
jnz short loc_4E0AB
mov r14, [rax+30h]
jmp short loc_4E0AE
loc_4E0AB:
xor r14d, r14d
loc_4E0AE:
test r14, r14
jz short loc_4E0FF
mov rsi, [r14]
mov rdx, [r14+8]
mov rdi, rbx
call JS_FreeValueRT
mov rsi, [r14+10h]
mov rdx, [r14+18h]
mov rdi, rbx
call JS_FreeValueRT
dec qword ptr [rbx+28h]
mov rdi, r14
call qword ptr [rbx+20h]
mov rcx, [rbx+10h]
mov rdx, [rbx+30h]
sub rdx, rax
add rdx, 0FFFFFFFFFFFFFFF8h
mov [rbx+30h], rdx
mov rdi, [rbx+40h]
mov rsi, r14
add rsp, 8
pop rbx
pop r14
jmp rcx
loc_4E0FF:
add rsp, 8
pop rbx
pop r14
retn
|
void js_proxy_finalizer(long long a1, long long a2, int a3)
{
long long v3; // r14
long long v4; // rax
void ( *v5)(_QWORD, long long); // rcx
if ( a3 == -1 && *(_WORD *)(a2 + 6) == 48 )
v3 = *(_QWORD *)(a2 + 48);
else
v3 = 0LL;
if ( v3 )
{
JS_FreeValueRT(a1, *(_DWORD **)v3, *(_QWORD *)(v3 + 8));
JS_FreeValueRT(a1, *(_DWORD **)(v3 + 16), *(_QWORD *)(v3 + 24));
--*(_QWORD *)(a1 + 40);
v4 = (*(long long ( **)(long long))(a1 + 32))(v3);
v5 = *(void ( **)(_QWORD, long long))(a1 + 16);
*(_QWORD *)(a1 + 48) = *(_QWORD *)(a1 + 48) - v4 - 8;
v5(*(_QWORD *)(a1 + 64), v3);
}
}
|
js_proxy_finalizer:
PUSH R14
PUSH RBX
PUSH RAX
MOV RBX,RDI
MOV qword ptr [RSP],RSI
CMP EDX,-0x1
JNZ 0x0014e0ab
MOV RAX,qword ptr [RSP]
CMP word ptr [RAX + 0x6],0x30
JNZ 0x0014e0ab
MOV R14,qword ptr [RAX + 0x30]
JMP 0x0014e0ae
LAB_0014e0ab:
XOR R14D,R14D
LAB_0014e0ae:
TEST R14,R14
JZ 0x0014e0ff
MOV RSI,qword ptr [R14]
MOV RDX,qword ptr [R14 + 0x8]
MOV RDI,RBX
CALL 0x0011d8c6
MOV RSI,qword ptr [R14 + 0x10]
MOV RDX,qword ptr [R14 + 0x18]
MOV RDI,RBX
CALL 0x0011d8c6
DEC qword ptr [RBX + 0x28]
MOV RDI,R14
CALL qword ptr [RBX + 0x20]
MOV RCX,qword ptr [RBX + 0x10]
MOV RDX,qword ptr [RBX + 0x30]
SUB RDX,RAX
ADD RDX,-0x8
MOV qword ptr [RBX + 0x30],RDX
MOV RDI,qword ptr [RBX + 0x40]
MOV RSI,R14
ADD RSP,0x8
POP RBX
POP R14
JMP RCX
LAB_0014e0ff:
ADD RSP,0x8
POP RBX
POP R14
RET
|
void js_proxy_finalizer(long param_1,long param_2,int param_3)
{
long lVar1;
int8 *puVar2;
if ((param_3 == -1) && (*(short *)(param_2 + 6) == 0x30)) {
puVar2 = *(int8 **)(param_2 + 0x30);
}
else {
puVar2 = (int8 *)0x0;
}
if (puVar2 != (int8 *)0x0) {
JS_FreeValueRT(param_1,*puVar2,puVar2[1]);
JS_FreeValueRT(param_1,puVar2[2],puVar2[3]);
*(long *)(param_1 + 0x28) = *(long *)(param_1 + 0x28) + -1;
lVar1 = (**(code **)(param_1 + 0x20))(puVar2);
lVar1 = (*(long *)(param_1 + 0x30) - lVar1) + -8;
*(long *)(param_1 + 0x30) = lVar1;
/* WARNING: Could not recover jumptable at 0x0014e0fd. Too many branches */
/* WARNING: Treating indirect jump as call */
(**(code **)(param_1 + 0x10))
(*(int8 *)(param_1 + 0x40),puVar2,lVar1,*(code **)(param_1 + 0x10));
return;
}
return;
}
|
|
9,381 |
js_proxy_finalizer
|
bluesky950520[P]quickjs/quickjs.c
|
static void js_proxy_finalizer(JSRuntime *rt, JSValue val)
{
JSProxyData *s = JS_GetOpaque(val, JS_CLASS_PROXY);
if (s) {
JS_FreeValueRT(rt, s->target);
JS_FreeValueRT(rt, s->handler);
js_free_rt(rt, s);
}
}
|
O2
|
c
|
js_proxy_finalizer:
pushq %r14
pushq %rbx
pushq %rax
cmpl $-0x1, %edx
jne 0x42ec5
cmpw $0x30, 0x6(%rsi)
jne 0x42ec5
movq 0x30(%rsi), %r14
testq %r14, %r14
je 0x42ec5
movq %rdi, %rbx
movq (%r14), %rsi
movq 0x8(%r14), %rdx
callq 0x18031
movq 0x10(%r14), %rsi
movq 0x18(%r14), %rdx
movq %rbx, %rdi
callq 0x18031
movq %rbx, %rdi
movq %r14, %rsi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x170cb
addq $0x8, %rsp
popq %rbx
popq %r14
retq
|
js_proxy_finalizer:
push r14
push rbx
push rax
cmp edx, 0FFFFFFFFh
jnz short loc_42EC5
cmp word ptr [rsi+6], 30h ; '0'
jnz short loc_42EC5
mov r14, [rsi+30h]
test r14, r14
jz short loc_42EC5
mov rbx, rdi
mov rsi, [r14]
mov rdx, [r14+8]
call JS_FreeValueRT
mov rsi, [r14+10h]
mov rdx, [r14+18h]
mov rdi, rbx
call JS_FreeValueRT
mov rdi, rbx
mov rsi, r14
add rsp, 8
pop rbx
pop r14
jmp js_free_rt
loc_42EC5:
add rsp, 8
pop rbx
pop r14
retn
|
long long js_proxy_finalizer(long long a1, long long a2, int a3)
{
long long v3; // r14
long long result; // rax
if ( a3 == -1 && *(_WORD *)(a2 + 6) == 48 )
{
v3 = *(_QWORD *)(a2 + 48);
if ( v3 )
{
JS_FreeValueRT(a1, *(unsigned int **)v3, *(_QWORD *)(v3 + 8));
JS_FreeValueRT(a1, *(unsigned int **)(v3 + 16), *(_QWORD *)(v3 + 24));
return js_free_rt(a1, v3);
}
}
return result;
}
|
js_proxy_finalizer:
PUSH R14
PUSH RBX
PUSH RAX
CMP EDX,-0x1
JNZ 0x00142ec5
CMP word ptr [RSI + 0x6],0x30
JNZ 0x00142ec5
MOV R14,qword ptr [RSI + 0x30]
TEST R14,R14
JZ 0x00142ec5
MOV RBX,RDI
MOV RSI,qword ptr [R14]
MOV RDX,qword ptr [R14 + 0x8]
CALL 0x00118031
MOV RSI,qword ptr [R14 + 0x10]
MOV RDX,qword ptr [R14 + 0x18]
MOV RDI,RBX
CALL 0x00118031
MOV RDI,RBX
MOV RSI,R14
ADD RSP,0x8
POP RBX
POP R14
JMP 0x001170cb
LAB_00142ec5:
ADD RSP,0x8
POP RBX
POP R14
RET
|
void js_proxy_finalizer(int8 param_1,long param_2,int param_3)
{
int8 *puVar1;
if (((param_3 == -1) && (*(short *)(param_2 + 6) == 0x30)) &&
(puVar1 = *(int8 **)(param_2 + 0x30), puVar1 != (int8 *)0x0)) {
JS_FreeValueRT(param_1,*puVar1,puVar1[1]);
JS_FreeValueRT(param_1,puVar1[2],puVar1[3]);
js_free_rt(param_1,puVar1);
return;
}
return;
}
|
|
9,382 |
common_sampler_prev_str[abi:cxx11](common_sampler*, llama_context*, int)
|
monkey531[P]llama/common/sampling.cpp
|
std::string common_sampler_prev_str(common_sampler * gsmpl, llama_context * ctx_main, int n) {
n = std::min(n, (int) gsmpl->prev.size());
if (n <= 0) {
return "";
}
std::string result;
result.reserve(8*n); // 8 is the average length of a token [citation needed], TODO: compute this from the vocab
for (int i = n - 1; i >= 0; i--) {
const llama_token id = gsmpl->prev.rat(i);
GGML_ASSERT(id != LLAMA_TOKEN_NULL && "null token in the sampling history - should not happen");
result += common_token_to_piece(ctx_main, id);
}
return result;
}
|
O3
|
cpp
|
common_sampler_prev_str[abi:cxx11](common_sampler*, llama_context*, int):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movl %ecx, %r12d
movl 0x150(%rsi), %eax
cmpl %ecx, %eax
cmovll %eax, %r12d
movq %rdi, %rbx
leaq 0x10(%rdi), %rax
movq %rax, (%rdi)
testl %r12d, %r12d
jle 0xd0a69
movq %rdx, %r14
movq %rsi, %r15
movq %rax, (%rsp)
movq $0x0, 0x8(%rbx)
movb $0x0, 0x10(%rbx)
leal (,%r12,8), %esi
movq %rbx, %rdi
callq 0x1bfa0
addq $0x148, %r15 # imm = 0x148
leaq 0x18(%rsp), %rbp
movl %r12d, %r13d
incq %r13
leaq 0x8(%rsp), %r12
leaq -0x2(%r13), %rsi
movq %r15, %rdi
callq 0xd1594
movl (%rax), %edx
cmpl $-0x1, %edx
je 0xd0a8d
movq %r12, %rdi
movq %r14, %rsi
movl $0x1, %ecx
callq 0x757e9
movq 0x8(%rsp), %rsi
movq 0x10(%rsp), %rdx
movq %rbx, %rdi
callq 0x1b2a0
movq 0x8(%rsp), %rdi
cmpq %rbp, %rdi
je 0xd0a5e
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x1ba20
decq %r13
cmpq $0x1, %r13
ja 0xd0a12
jmp 0xd0a7b
leaq 0x1d33c(%rip), %rdx # 0xeddac
movq %rbx, %rdi
movq %rdx, %rsi
callq 0x22b0c
movq %rbx, %rax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x269fd(%rip), %rdi # 0xf7491
leaq 0x1d668(%rip), %rdx # 0xee103
leaq 0x26bca(%rip), %rcx # 0xf766c
movl $0x1a1, %esi # imm = 0x1A1
xorl %eax, %eax
callq 0x1c0c0
jmp 0xd0ad0
jmp 0xd0ad0
jmp 0xd0ad0
movq %rax, %r14
movq 0x8(%rsp), %rdi
cmpq %rbp, %rdi
je 0xd0ad3
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x1ba20
jmp 0xd0ad3
movq %rax, %r14
movq (%rbx), %rdi
cmpq (%rsp), %rdi
je 0xd0aeb
movq (%rsp), %rax
movq (%rax), %rsi
incq %rsi
callq 0x1ba20
movq %r14, %rdi
callq 0x1c1e0
|
_Z23common_sampler_prev_strB5cxx11P14common_samplerP13llama_contexti:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 28h
mov r12d, ecx
mov eax, [rsi+150h]
cmp eax, ecx
cmovl r12d, eax
mov rbx, rdi
lea rax, [rdi+10h]
mov [rdi], rax
test r12d, r12d
jle loc_D0A69
mov r14, rdx
mov r15, rsi
mov [rsp+58h+var_58], rax
mov qword ptr [rbx+8], 0
mov byte ptr [rbx+10h], 0
lea esi, ds:0[r12*8]
mov rdi, rbx
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7reserveEm; std::string::reserve(ulong)
add r15, 148h
lea rbp, [rsp+58h+var_40]
mov r13d, r12d
inc r13
lea r12, [rsp+58h+var_50]
loc_D0A12:
lea rsi, [r13-2]
mov rdi, r15
call _ZNK11ring_bufferIiE3ratEm; ring_buffer<int>::rat(ulong)
mov edx, [rax]
cmp edx, 0FFFFFFFFh
jz short loc_D0A8D
mov rdi, r12
mov rsi, r14
mov ecx, 1
call _Z21common_token_to_pieceB5cxx11PK13llama_contextib; common_token_to_piece(llama_context const*,int,bool)
mov rsi, [rsp+58h+var_50]
mov rdx, [rsp+58h+var_48]
mov rdi, rbx
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_appendEPKcm; std::string::_M_append(char const*,ulong)
mov rdi, [rsp+58h+var_50]; void *
cmp rdi, rbp
jz short loc_D0A5E
mov rsi, [rsp+58h+var_40]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_D0A5E:
dec r13
cmp r13, 1
ja short loc_D0A12
jmp short loc_D0A7B
loc_D0A69:
lea rdx, aErrorWhileHand_0+34h; ""
mov rdi, rbx
mov rsi, rdx
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag; std::string::_M_construct<char const*>(char const*,char const*,std::forward_iterator_tag)
loc_D0A7B:
mov rax, rbx
add rsp, 28h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_D0A8D:
lea rdi, aWorkspaceLlm4b_2; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aIdLlamaTokenNu; "id != LLAMA_TOKEN_NULL && \"null token "...
mov esi, 1A1h
xor eax, eax
call _ggml_abort
jmp short loc_D0AD0
jmp short loc_D0AD0
jmp short loc_D0AD0
mov r14, rax
mov rdi, [rsp+58h+var_50]; void *
cmp rdi, rbp
jz short loc_D0AD3
mov rsi, [rsp+58h+var_40]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_D0AD3
loc_D0AD0:
mov r14, rax
loc_D0AD3:
mov rdi, [rbx]; void *
cmp rdi, [rsp+58h+var_58]
jz short loc_D0AEB
mov rax, [rsp+58h+var_58]
mov rsi, [rax]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_D0AEB:
mov rdi, r14
call __Unwind_Resume
|
long long common_sampler_prev_str[abi:cxx11](long long a1, long long a2, long long a3, int a4)
{
int v4; // r12d
long long v6; // r13
unsigned int v7; // edx
bool v8; // cf
long long v10; // rax
long long v11; // r14
_QWORD *v12; // [rsp+0h] [rbp-58h]
void *v13[2]; // [rsp+8h] [rbp-50h] BYREF
long long v14; // [rsp+18h] [rbp-40h] BYREF
v4 = a4;
if ( *(_DWORD *)(a2 + 336) < a4 )
v4 = *(_DWORD *)(a2 + 336);
*(_QWORD *)a1 = a1 + 16;
if ( v4 <= 0 )
{
std::string::_M_construct<char const*>(a1, "", (long long)"");
}
else
{
v12 = (_QWORD *)(a1 + 16);
*(_QWORD *)(a1 + 8) = 0LL;
*(_BYTE *)(a1 + 16) = 0;
std::string::reserve(a1, (unsigned int)(8 * v4));
v6 = (unsigned int)v4 + 1LL;
do
{
v7 = *(_DWORD *)ring_buffer<int>::rat(a2 + 328, v6 - 2);
if ( v7 == -1 )
{
ggml_abort(
"/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/sampling.cpp",
417LL,
"GGML_ASSERT(%s) failed",
"id != LLAMA_TOKEN_NULL && \"null token in the sampling history - should not happen\"");
v11 = v10;
if ( *(_QWORD **)a1 != v12 )
operator delete(*(void **)a1, *v12 + 1LL);
_Unwind_Resume(v11);
}
common_token_to_piece[abi:cxx11]((long long)v13, a3, v7, 1u);
std::string::_M_append(a1, v13[0], v13[1]);
if ( v13[0] != &v14 )
operator delete(v13[0], v14 + 1);
v8 = v6-- == 1;
}
while ( !v8 && v6 != 1 );
}
return a1;
}
|
common_sampler_prev_str[abi:cxx11]:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x28
MOV R12D,ECX
MOV EAX,dword ptr [RSI + 0x150]
CMP EAX,ECX
CMOVL R12D,EAX
MOV RBX,RDI
LEA RAX,[RDI + 0x10]
MOV qword ptr [RDI],RAX
TEST R12D,R12D
JLE 0x001d0a69
MOV R14,RDX
MOV R15,RSI
MOV qword ptr [RSP],RAX
MOV qword ptr [RBX + 0x8],0x0
MOV byte ptr [RBX + 0x10],0x0
LEA ESI,[R12*0x8]
LAB_001d09f3:
MOV RDI,RBX
CALL 0x0011bfa0
ADD R15,0x148
LEA RBP,[RSP + 0x18]
MOV R13D,R12D
INC R13
LEA R12,[RSP + 0x8]
LAB_001d0a12:
LEA RSI,[R13 + -0x2]
LAB_001d0a16:
MOV RDI,R15
CALL 0x001d1594
MOV EDX,dword ptr [RAX]
CMP EDX,-0x1
JZ 0x001d0a8d
LAB_001d0a25:
MOV RDI,R12
MOV RSI,R14
MOV ECX,0x1
CALL 0x001757e9
MOV RSI,qword ptr [RSP + 0x8]
MOV RDX,qword ptr [RSP + 0x10]
LAB_001d0a3f:
MOV RDI,RBX
CALL 0x0011b2a0
LAB_001d0a47:
MOV RDI,qword ptr [RSP + 0x8]
CMP RDI,RBP
JZ 0x001d0a5e
MOV RSI,qword ptr [RSP + 0x18]
INC RSI
CALL 0x0011ba20
LAB_001d0a5e:
DEC R13
CMP R13,0x1
JA 0x001d0a12
JMP 0x001d0a7b
LAB_001d0a69:
LEA RDX,[0x1eddac]
MOV RDI,RBX
MOV RSI,RDX
CALL 0x00122b0c
LAB_001d0a7b:
MOV RAX,RBX
ADD RSP,0x28
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_001d0a8d:
LEA RDI,[0x1f7491]
LEA RDX,[0x1ee103]
LEA RCX,[0x1f766c]
MOV ESI,0x1a1
XOR EAX,EAX
CALL 0x0011c0c0
|
/* common_sampler_prev_str[abi:cxx11](common_sampler*, llama_context*, int) */
common_sampler *
common_sampler_prev_str_abi_cxx11_(common_sampler *param_1,llama_context *param_2,int param_3)
{
int *piVar1;
uint in_ECX;
int8 in_R8;
int8 in_R9;
ulong uVar2;
common_sampler *pcVar3;
long *local_50 [2];
long local_40 [2];
if ((int)*(uint *)(param_2 + 0x150) < (int)in_ECX) {
in_ECX = *(uint *)(param_2 + 0x150);
}
pcVar3 = param_1 + 0x10;
*(common_sampler **)param_1 = pcVar3;
if ((int)in_ECX < 1) {
std::__cxx11::string::_M_construct<char_const*>(param_1,"");
}
else {
*(int8 *)(param_1 + 8) = 0;
param_1[0x10] = (common_sampler)0x0;
/* try { // try from 001d09f3 to 001d09fa has its CatchHandler @ 001d0aae */
std::__cxx11::string::reserve((ulong)param_1);
uVar2 = (ulong)in_ECX + 1;
do {
/* try { // try from 001d0a16 to 001d0a1d has its CatchHandler @ 001d0ab0 */
piVar1 = (int *)ring_buffer<int>::rat((ring_buffer<int> *)(param_2 + 0x148),uVar2 - 2);
if (*piVar1 == -1) {
/* try { // try from 001d0a8d to 001d0aad has its CatchHandler @ 001d0ad0 */
/* WARNING: Subroutine does not return */
ggml_abort("/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/sampling.cpp",
0x1a1,"GGML_ASSERT(%s) failed",
"id != LLAMA_TOKEN_NULL && \"null token in the sampling history - should not happen\""
,in_R8,in_R9,pcVar3);
}
/* try { // try from 001d0a25 to 001d0a34 has its CatchHandler @ 001d0ab2 */
common_token_to_piece_abi_cxx11_((llama_context *)local_50,param_3,SUB41(*piVar1,0));
/* try { // try from 001d0a3f to 001d0a46 has its CatchHandler @ 001d0ab4 */
std::__cxx11::string::_M_append((char *)param_1,(ulong)local_50[0]);
if (local_50[0] != local_40) {
operator_delete(local_50[0],local_40[0] + 1);
}
uVar2 = uVar2 - 1;
} while (1 < uVar2);
}
return param_1;
}
|
|
9,383 |
dns_create_reply
|
xtate/src/proto/proto-dns.c
|
bool dns_create_reply(uint8_t *buffer, size_t *len, char *name,
dns_record_type type, uint16_t id, dns_rcode code) {
int result = dns_question_create(buffer, name, type, id);
if (result < DNS_PACKET_MINIMUM_SIZE) {
return false;
}
*len = (size_t)result;
dns_buf_set_qr(buffer, true);
dns_buf_set_rcode(buffer, code);
return true;
}
|
O3
|
c
|
dns_create_reply:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %r9d, %ebx
movl %r8d, %r13d
movl %ecx, %ebp
movq %rsi, %r15
movq %rdi, %r14
leaq 0xc(%rdi), %r12
movq %rdx, %rdi
movq %r12, %rsi
callq 0x31298
testl %eax, %eax
js 0x31ae4
movl %eax, %eax
addq %rax, %r12
rolw $0x8, %r13w
movq %r12, 0x172311(%rip) # 0x1a3dc0
movw %r13w, (%r14)
rolw $0x8, %bp
movw $0x0, 0x2(%r14)
movw %bp, 0xc(%r14,%rax)
movw $0x100, %cx # imm = 0x100
movw %cx, 0xe(%r14,%rax)
movw %cx, 0x4(%r14)
subq %r14, %r12
addq $0x4, %r12
cmpl $0x11, %r12d
jae 0x31aeb
xorl %eax, %eax
jmp 0x31b04
movq $-0x1, %r12
movslq %r12d, %rax
movq %rax, (%r15)
orb $-0x80, 0x2(%r14)
movb 0x3(%r14), %al
andb $-0x10, %al
orb %bl, %al
movb %al, 0x3(%r14)
movb $0x1, %al
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
|
dns_create_reply:
push rbp
push r15
push r14
push r13
push r12
push rbx
push rax
mov ebx, r9d
mov r13d, r8d
mov ebp, ecx
mov r15, rsi
mov r14, rdi
lea r12, [rdi+0Ch]
mov rdi, rdx
mov rsi, r12
call dns_str2namebuf
test eax, eax
js short loc_31AE4
mov eax, eax
add r12, rax
rol r13w, 8
mov cs:dns_question_create_aftername, r12
mov [r14], r13w
rol bp, 8
mov word ptr [r14+2], 0
mov [r14+rax+0Ch], bp
mov cx, 100h
mov [r14+rax+0Eh], cx
mov [r14+4], cx
sub r12, r14
add r12, 4
cmp r12d, 11h
jnb short loc_31AEB
xor eax, eax
jmp short loc_31B04
loc_31AE4:
mov r12, 0FFFFFFFFFFFFFFFFh
loc_31AEB:
movsxd rax, r12d
mov [r15], rax
or byte ptr [r14+2], 80h
mov al, [r14+3]
and al, 0F0h
or al, bl
mov [r14+3], al
mov al, 1
loc_31B04:
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
|
char dns_create_reply(long long a1, _QWORD *a2, long long a3, __int16 a4, __int16 a5, char a6)
{
unsigned int v9; // eax
int v10; // r12d
v9 = dns_str2namebuf(a3, (unsigned __int8 *)(a1 + 12));
if ( (v9 & 0x80000000) != 0 )
{
v10 = -1;
}
else
{
dns_question_create_aftername = v9 + a1 + 12;
*(_WORD *)a1 = __ROL2__(a5, 8);
*(_WORD *)(a1 + 2) = 0;
*(_WORD *)(a1 + v9 + 12) = __ROL2__(a4, 8);
*(_WORD *)(a1 + v9 + 14) = 256;
*(_WORD *)(a1 + 4) = 256;
v10 = v9 + 16;
if ( v9 + 16 < 0x11 )
return 0;
}
*a2 = v10;
*(_BYTE *)(a1 + 2) |= 0x80u;
*(_BYTE *)(a1 + 3) = a6 | *(_BYTE *)(a1 + 3) & 0xF0;
return 1;
}
|
dns_create_reply:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
PUSH RAX
MOV EBX,R9D
MOV R13D,R8D
MOV EBP,ECX
MOV R15,RSI
MOV R14,RDI
LEA R12,[RDI + 0xc]
MOV RDI,RDX
MOV RSI,R12
CALL 0x00131298
TEST EAX,EAX
JS 0x00131ae4
MOV EAX,EAX
ADD R12,RAX
ROL R13W,0x8
MOV qword ptr [0x002a3dc0],R12
MOV word ptr [R14],R13W
ROL BP,0x8
MOV word ptr [R14 + 0x2],0x0
MOV word ptr [R14 + RAX*0x1 + 0xc],BP
MOV CX,0x100
MOV word ptr [R14 + RAX*0x1 + 0xe],CX
MOV word ptr [R14 + 0x4],CX
SUB R12,R14
ADD R12,0x4
CMP R12D,0x11
JNC 0x00131aeb
XOR EAX,EAX
JMP 0x00131b04
LAB_00131ae4:
MOV R12,-0x1
LAB_00131aeb:
MOVSXD RAX,R12D
MOV qword ptr [R15],RAX
OR byte ptr [R14 + 0x2],0x80
MOV AL,byte ptr [R14 + 0x3]
AND AL,0xf0
OR AL,BL
MOV byte ptr [R14 + 0x3],AL
MOV AL,0x1
LAB_00131b04:
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
int8
dns_create_reply(ushort *param_1,long *param_2,int8 param_3,ushort param_4,ushort param_5,
byte param_6)
{
uint uVar1;
ulong uVar2;
long lVar3;
uVar1 = dns_str2namebuf(param_3,param_1 + 6);
if ((int)uVar1 < 0) {
uVar1 = 0xffffffff;
}
else {
uVar2 = (ulong)uVar1;
lVar3 = (long)(param_1 + 6) + uVar2;
dns_question_create_aftername = lVar3;
*param_1 = param_5 << 8 | param_5 >> 8;
param_1[1] = 0;
*(ushort *)((long)param_1 + uVar2 + 0xc) = param_4 << 8 | param_4 >> 8;
*(int2 *)((long)param_1 + uVar2 + 0xe) = 0x100;
param_1[2] = 0x100;
uVar1 = ((int)lVar3 - (int)param_1) + 4;
if (uVar1 < 0x11) {
return 0;
}
}
*param_2 = (long)(int)uVar1;
*(byte *)(param_1 + 1) = (byte)param_1[1] | 0x80;
uVar2 = CONCAT71((int7)(int3)(uVar1 >> 8),*(int1 *)((long)param_1 + 3)) & 0xfffffffffffffff0
;
*(byte *)((long)param_1 + 3) = (byte)uVar2 | param_6;
return CONCAT71((int7)(uVar2 >> 8),1);
}
|
|
9,384 |
mult
|
eloqsql/strings/dtoa.c
|
static Bigint *mult(Bigint *a, Bigint *b, Stack_alloc *alloc)
{
Bigint *c;
int k, wa, wb, wc;
ULong *x, *xa, *xae, *xb, *xbe, *xc, *xc0;
ULong y;
ULLong carry, z;
if (a->wds < b->wds)
{
c= a;
a= b;
b= c;
}
k= a->k;
wa= a->wds;
wb= b->wds;
wc= wa + wb;
if (wc > a->maxwds)
k++;
c= Balloc(k, alloc);
for (x= c->p.x, xa= x + wc; x < xa; x++)
*x= 0;
xa= a->p.x;
xae= xa + wa;
xb= b->p.x;
xbe= xb + wb;
xc0= c->p.x;
for (; xb < xbe; xc0++)
{
if ((y= *xb++))
{
x= xa;
xc= xc0;
carry= 0;
do
{
z= *x++ * (ULLong)y + *xc + carry;
carry= z >> 32;
*xc++= (ULong) (z & FFFFFFFF);
}
while (x < xae);
*xc= (ULong) carry;
}
}
for (xc0= c->p.x, xc= xc0 + wc; wc > 0 && !*--xc; --wc) ;
c->wds= wc;
return c;
}
|
O3
|
c
|
mult:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %r14
movl 0x14(%rdi), %eax
cmpl 0x14(%rsi), %eax
movq %rsi, %r12
cmovlq %rdi, %r12
cmovlq %rsi, %r14
movslq 0x14(%r14), %rax
movslq 0x14(%r12), %r13
movq %rax, -0x30(%rbp)
leaq (%rax,%r13), %r15
xorl %edi, %edi
cmpl 0xc(%r14), %r15d
setg %dil
addl 0x8(%r14), %edi
movq %rdx, %rsi
callq 0xd4f2c
movq %rax, %rbx
movq (%rax), %rdi
testl %r15d, %r15d
jle 0xd5281
leaq (%rdi,%r15,4), %rax
leaq 0x4(%rdi), %rcx
cmpq %rcx, %rax
cmovaq %rax, %rcx
movq %rdi, %rdx
notq %rdx
addq %rcx, %rdx
andq $-0x4, %rdx
addq $0x4, %rdx
xorl %esi, %esi
callq 0x292a0
movq (%rbx), %rdi
testl %r13d, %r13d
jle 0xd52e9
movq (%r14), %rax
movq -0x30(%rbp), %rcx
leaq (%rax,%rcx,4), %rcx
movq (%r12), %rdx
leaq (%rdx,%r13,4), %rsi
movl (%rdx), %r8d
testq %r8, %r8
je 0xd52d9
xorl %r9d, %r9d
xorl %r10d, %r10d
leaq (%rax,%r9), %r11
addq $0x4, %r11
movl -0x4(%r11), %r14d
imulq %r8, %r14
movl (%rdi,%r9), %r12d
addq %r10, %r12
addq %r14, %r12
movq %r12, %r10
shrq $0x20, %r10
movl %r12d, (%rdi,%r9)
addq $0x4, %r9
cmpq %rcx, %r11
jb 0xd52a7
movl %r10d, (%rdi,%r9)
addq $0x4, %rdx
addq $0x4, %rdi
cmpq %rsi, %rdx
jb 0xd5299
movq (%rbx), %rdi
testl %r15d, %r15d
jle 0xd530f
leaq (%rdi,%r15,4), %rax
addq $-0x4, %rax
cmpl $0x0, (%rax)
jne 0xd530f
leal -0x1(%r15), %ecx
addq $-0x4, %rax
cmpl $0x1, %r15d
movl %ecx, %r15d
jg 0xd52f6
xorl %r15d, %r15d
movl %r15d, 0x14(%rbx)
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
|
mult:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
push rax
mov r14, rdi
mov eax, [rdi+14h]
cmp eax, [rsi+14h]
mov r12, rsi
cmovl r12, rdi
cmovl r14, rsi
movsxd rax, dword ptr [r14+14h]
movsxd r13, dword ptr [r12+14h]
mov [rbp+var_30], rax
lea r15, [rax+r13]
xor edi, edi
cmp r15d, [r14+0Ch]
setnle dil
add edi, [r14+8]
mov rsi, rdx
call Balloc
mov rbx, rax
mov rdi, [rax]
test r15d, r15d
jle short loc_D5281
lea rax, [rdi+r15*4]
lea rcx, [rdi+4]
cmp rax, rcx
cmova rcx, rax
mov rdx, rdi
not rdx
add rdx, rcx
and rdx, 0FFFFFFFFFFFFFFFCh
add rdx, 4
xor esi, esi
call _memset
mov rdi, [rbx]
loc_D5281:
test r13d, r13d
jle short loc_D52E9
mov rax, [r14]
mov rcx, [rbp+var_30]
lea rcx, [rax+rcx*4]
mov rdx, [r12]
lea rsi, [rdx+r13*4]
loc_D5299:
mov r8d, [rdx]
test r8, r8
jz short loc_D52D9
xor r9d, r9d
xor r10d, r10d
loc_D52A7:
lea r11, [rax+r9]
add r11, 4
mov r14d, [r11-4]
imul r14, r8
mov r12d, [rdi+r9]
add r12, r10
add r12, r14
mov r10, r12
shr r10, 20h
mov [rdi+r9], r12d
add r9, 4
cmp r11, rcx
jb short loc_D52A7
mov [rdi+r9], r10d
loc_D52D9:
add rdx, 4
add rdi, 4
cmp rdx, rsi
jb short loc_D5299
mov rdi, [rbx]
loc_D52E9:
test r15d, r15d
jle short loc_D530F
lea rax, [rdi+r15*4]
add rax, 0FFFFFFFFFFFFFFFCh
loc_D52F6:
cmp dword ptr [rax], 0
jnz short loc_D530F
lea ecx, [r15-1]
add rax, 0FFFFFFFFFFFFFFFCh
cmp r15d, 1
mov r15d, ecx
jg short loc_D52F6
xor r15d, r15d
loc_D530F:
mov [rbx+14h], r15d
mov rax, rbx
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
|
long long mult(long long *a1, long long *a2, long long a3)
{
long long *v3; // r14
long long *v4; // r12
long long v5; // r13
long long v6; // r15
long long v7; // rbx
long long v8; // rdi
long long v9; // rcx
long long v10; // rax
unsigned long long v11; // rcx
_DWORD *v12; // rdx
unsigned long long v13; // rsi
long long v14; // r8
long long v15; // r9
unsigned long long v16; // r10
unsigned long long v17; // r11
unsigned long long v18; // r12
_DWORD *v19; // rax
bool v20; // cc
long long v22; // [rsp+0h] [rbp-30h]
v3 = a1;
v4 = a2;
if ( *((_DWORD *)a1 + 5) < *((_DWORD *)a2 + 5) )
{
v4 = a1;
v3 = a2;
}
v5 = *((int *)v4 + 5);
v22 = *((int *)v3 + 5);
v6 = v22 + v5;
v7 = Balloc(*((_DWORD *)v3 + 2) + (unsigned int)((int)v22 + (int)v5 > *((_DWORD *)v3 + 3)), a3);
v8 = *(_QWORD *)v7;
if ( (int)v22 + (int)v5 > 0 )
{
v9 = v8 + 4;
if ( v8 + 4 * v6 > (unsigned long long)(v8 + 4) )
v9 = v8 + 4 * v6;
memset(v8, 0LL, ((v9 + ~v8) & 0xFFFFFFFFFFFFFFFCLL) + 4);
v8 = *(_QWORD *)v7;
}
if ( (int)v5 > 0 )
{
v10 = *v3;
v11 = *v3 + 4 * v22;
v12 = (_DWORD *)*v4;
v13 = *v4 + 4 * v5;
do
{
v14 = (unsigned int)*v12;
if ( *v12 )
{
v15 = 0LL;
v16 = 0LL;
do
{
v17 = v10 + v15 + 4;
v18 = v14 * *(unsigned int *)(v10 + v15) + v16 + *(unsigned int *)(v8 + v15);
v16 = HIDWORD(v18);
*(_DWORD *)(v8 + v15) = v18;
v15 += 4LL;
}
while ( v17 < v11 );
*(_DWORD *)(v8 + v15) = HIDWORD(v18);
}
++v12;
v8 += 4LL;
}
while ( (unsigned long long)v12 < v13 );
v8 = *(_QWORD *)v7;
}
if ( (int)v6 > 0 )
{
v19 = (_DWORD *)(v8 + 4 * v6 - 4);
while ( !*v19 )
{
--v19;
v20 = (int)v6 <= 1;
LODWORD(v6) = v6 - 1;
if ( v20 )
{
LODWORD(v6) = 0;
break;
}
}
}
*(_DWORD *)(v7 + 20) = v6;
return v7;
}
|
mult:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
PUSH RAX
MOV R14,RDI
MOV EAX,dword ptr [RDI + 0x14]
CMP EAX,dword ptr [RSI + 0x14]
MOV R12,RSI
CMOVL R12,RDI
CMOVL R14,RSI
MOVSXD RAX,dword ptr [R14 + 0x14]
MOVSXD R13,dword ptr [R12 + 0x14]
MOV qword ptr [RBP + -0x30],RAX
LEA R15,[RAX + R13*0x1]
XOR EDI,EDI
CMP R15D,dword ptr [R14 + 0xc]
SETG DIL
ADD EDI,dword ptr [R14 + 0x8]
MOV RSI,RDX
CALL 0x001d4f2c
MOV RBX,RAX
MOV RDI,qword ptr [RAX]
TEST R15D,R15D
JLE 0x001d5281
LEA RAX,[RDI + R15*0x4]
LEA RCX,[RDI + 0x4]
CMP RAX,RCX
CMOVA RCX,RAX
MOV RDX,RDI
NOT RDX
ADD RDX,RCX
AND RDX,-0x4
ADD RDX,0x4
XOR ESI,ESI
CALL 0x001292a0
MOV RDI,qword ptr [RBX]
LAB_001d5281:
TEST R13D,R13D
JLE 0x001d52e9
MOV RAX,qword ptr [R14]
MOV RCX,qword ptr [RBP + -0x30]
LEA RCX,[RAX + RCX*0x4]
MOV RDX,qword ptr [R12]
LEA RSI,[RDX + R13*0x4]
LAB_001d5299:
MOV R8D,dword ptr [RDX]
TEST R8,R8
JZ 0x001d52d9
XOR R9D,R9D
XOR R10D,R10D
LAB_001d52a7:
LEA R11,[RAX + R9*0x1]
ADD R11,0x4
MOV R14D,dword ptr [R11 + -0x4]
IMUL R14,R8
MOV R12D,dword ptr [RDI + R9*0x1]
ADD R12,R10
ADD R12,R14
MOV R10,R12
SHR R10,0x20
MOV dword ptr [RDI + R9*0x1],R12D
ADD R9,0x4
CMP R11,RCX
JC 0x001d52a7
MOV dword ptr [RDI + R9*0x1],R10D
LAB_001d52d9:
ADD RDX,0x4
ADD RDI,0x4
CMP RDX,RSI
JC 0x001d5299
MOV RDI,qword ptr [RBX]
LAB_001d52e9:
TEST R15D,R15D
JLE 0x001d530f
LEA RAX,[RDI + R15*0x4]
ADD RAX,-0x4
LAB_001d52f6:
CMP dword ptr [RAX],0x0
JNZ 0x001d530f
LEA ECX,[R15 + -0x1]
ADD RAX,-0x4
CMP R15D,0x1
MOV R15D,ECX
JG 0x001d52f6
XOR R15D,R15D
LAB_001d530f:
MOV dword ptr [RBX + 0x14],R15D
MOV RAX,RBX
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
int8 * mult(long *param_1,long *param_2)
{
void *pvVar1;
uint *puVar2;
uint *puVar3;
int iVar4;
int iVar5;
uint uVar6;
long lVar7;
int8 *puVar8;
int *piVar9;
void *pvVar10;
uint *puVar11;
void *__s;
long lVar12;
ulong uVar13;
ulong uVar14;
long *plVar15;
int iVar16;
ulong uVar17;
plVar15 = param_1;
if (*(int *)((long)param_1 + 0x14) < *(int *)((long)param_2 + 0x14)) {
plVar15 = param_2;
param_2 = param_1;
}
iVar4 = *(int *)((long)plVar15 + 0x14);
iVar5 = *(int *)((long)param_2 + 0x14);
uVar17 = (long)iVar4 + (long)iVar5;
iVar16 = (int)uVar17;
puVar8 = (int8 *)Balloc((uint)(*(int *)((long)plVar15 + 0xc) < iVar16) + (int)plVar15[1]);
__s = (void *)*puVar8;
if (0 < iVar16) {
pvVar1 = (void *)((long)__s + uVar17 * 4);
pvVar10 = (void *)((long)__s + 4U);
if ((void *)((long)__s + 4U) < pvVar1) {
pvVar10 = pvVar1;
}
memset(__s,0,(~(ulong)__s + (long)pvVar10 & 0xfffffffffffffffc) + 4);
__s = (void *)*puVar8;
}
if (0 < iVar5) {
lVar7 = *plVar15;
puVar11 = (uint *)*param_2;
puVar2 = puVar11 + iVar5;
do {
uVar6 = *puVar11;
if ((ulong)uVar6 != 0) {
lVar12 = 0;
uVar13 = 0;
do {
puVar3 = (uint *)(lVar7 + lVar12);
uVar14 = *(uint *)((long)__s + lVar12) + uVar13 + (ulong)*puVar3 * (ulong)uVar6;
uVar13 = uVar14 >> 0x20;
*(int *)((long)__s + lVar12) = (int)uVar14;
lVar12 = lVar12 + 4;
} while (puVar3 + 1 < (uint *)(lVar7 + (long)iVar4 * 4));
*(int *)((long)__s + lVar12) = (int)(uVar14 >> 0x20);
}
puVar11 = puVar11 + 1;
__s = (void *)((long)__s + 4);
} while (puVar11 < puVar2);
__s = (void *)*puVar8;
}
if (0 < iVar16) {
piVar9 = (int *)((long)__s + uVar17 * 4);
do {
piVar9 = piVar9 + -1;
if (*piVar9 != 0) goto LAB_001d530f;
iVar4 = (int)uVar17;
uVar17 = (ulong)(iVar4 - 1);
} while (1 < iVar4);
uVar17 = 0;
}
LAB_001d530f:
*(int *)((long)puVar8 + 0x14) = (int)uVar17;
return puVar8;
}
|
|
9,385 |
testing::internal::StreamingListener::OnTestStart(testing::TestInfo const&)
|
AlayaLite/build_O3/_deps/googletest-src/googletest/src/gtest-internal-inl.h
|
void OnTestStart(const TestInfo& test_info) override {
SendLn(std::string("event=TestStart&name=") + test_info.name());
}
|
O3
|
c
|
testing::internal::StreamingListener::OnTestStart(testing::TestInfo const&):
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x38(%rsp), %r12
movq %r12, -0x10(%r12)
leaq 0xeb2b(%rip), %rsi # 0x88671
leaq 0xeb39(%rip), %rdx # 0x88686
leaq 0x28(%rsp), %r15
movq %r15, %rdi
callq 0x19014
movq 0x20(%r14), %rsi
movq %r15, %rdi
callq 0x25290
leaq 0x18(%rsp), %r14
movq %r14, -0x10(%r14)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x79b8d
movq %rdx, 0x8(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x18(%rsp)
jmp 0x79b94
movups (%rcx), %xmm0
movups %xmm0, (%r14)
movq 0x8(%rax), %rdx
leaq 0x8(%rsp), %rsi
movq %rdx, 0x8(%rsi)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movq 0x8(%rbx), %rdi
callq 0x7afe6
movq 0x8(%rsp), %rdi
cmpq %r14, %rdi
je 0x79bd0
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x11120
movq 0x28(%rsp), %rdi
cmpq %r12, %rdi
je 0x79be7
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x11120
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq %rax, %rbx
movq 0x8(%rsp), %rdi
cmpq %r14, %rdi
je 0x79c12
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x11120
jmp 0x79c12
movq %rax, %rbx
movq 0x28(%rsp), %rdi
cmpq %r12, %rdi
je 0x79c29
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x11120
movq %rbx, %rdi
callq 0x11760
nop
|
_ZN7testing8internal17StreamingListener11OnTestStartERKNS_8TestInfoE:
push r15
push r14
push r12
push rbx
sub rsp, 48h
mov r14, rsi
mov rbx, rdi
lea r12, [rsp+68h+var_30]
mov [r12-10h], r12
lea rsi, aEventTeststart; "event=TestStart&name="
lea rdx, aEventTeststart+15h; ""
lea r15, [rsp+68h+var_40]
mov rdi, r15
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag; std::string::_M_construct<char const*>(char const*,char const*,std::forward_iterator_tag)
mov rsi, [r14+20h]
mov rdi, r15
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendEPKc; std::string::append(char const*)
lea r14, [rsp+68h+var_50]
mov [r14-10h], r14
mov rdx, [rax]
mov rcx, rax
add rcx, 10h
cmp rdx, rcx
jz short loc_79B8D
mov [rsp+68h+var_60], rdx
mov rdx, [rcx]
mov [rsp+68h+var_50], rdx
jmp short loc_79B94
loc_79B8D:
movups xmm0, xmmword ptr [rcx]
movups xmmword ptr [r14], xmm0
loc_79B94:
mov rdx, [rax+8]
lea rsi, [rsp+68h+var_60]
mov [rsi+8], rdx
mov [rax], rcx
mov qword ptr [rax+8], 0
mov byte ptr [rax+10h], 0
mov rdi, [rbx+8]
call _ZN7testing8internal17StreamingListener20AbstractSocketWriter6SendLnERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; testing::internal::StreamingListener::AbstractSocketWriter::SendLn(std::string const&)
mov rdi, [rsp+68h+var_60]; void *
cmp rdi, r14
jz short loc_79BD0
mov rsi, [rsp+68h+var_50]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_79BD0:
mov rdi, [rsp+68h+var_40]; void *
cmp rdi, r12
jz short loc_79BE7
mov rsi, [rsp+68h+var_30]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_79BE7:
add rsp, 48h
pop rbx
pop r12
pop r14
pop r15
retn
mov rbx, rax
mov rdi, [rsp+arg_0]; void *
cmp rdi, r14
jz short loc_79C12
mov rsi, [rsp+arg_10]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_79C12
mov rbx, rax
loc_79C12:
mov rdi, [rsp+arg_20]; void *
cmp rdi, r12
jz short loc_79C29
mov rsi, [rsp+arg_30]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_79C29:
mov rdi, rbx
call __Unwind_Resume
|
void testing::internal::StreamingListener::OnTestStart(long long a1, long long a2)
{
long long v2; // rax
int v3; // r8d
int v4; // r9d
__int128 *v5; // rcx
int v6; // edx
void *v7; // [rsp+8h] [rbp-60h] BYREF
long long v8; // [rsp+10h] [rbp-58h]
__int128 v9; // [rsp+18h] [rbp-50h] BYREF
void *v10[2]; // [rsp+28h] [rbp-40h] BYREF
_QWORD v11[6]; // [rsp+38h] [rbp-30h] BYREF
v10[0] = v11;
std::string::_M_construct<char const*>(v10, "event=TestStart&name=", (long long)"");
v2 = std::string::append((long long)v10, *(_QWORD *)(a2 + 32));
v7 = &v9;
v5 = (__int128 *)(v2 + 16);
if ( *(_QWORD *)v2 == v2 + 16 )
{
v9 = *v5;
}
else
{
v7 = *(void **)v2;
*(_QWORD *)&v9 = *(_QWORD *)v5;
}
v8 = *(_QWORD *)(v2 + 8);
v6 = v8;
*(_QWORD *)v2 = v5;
*(_QWORD *)(v2 + 8) = 0LL;
*(_BYTE *)(v2 + 16) = 0;
testing::internal::StreamingListener::AbstractSocketWriter::SendLn(
*(_QWORD *)(a1 + 8),
(unsigned int)&v7,
v6,
(_DWORD)v5,
v3,
v4);
if ( v7 != &v9 )
operator delete(v7, v9 + 1);
if ( v10[0] != v11 )
operator delete(v10[0], v11[0] + 1LL);
}
|
OnTestStart:
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
SUB RSP,0x48
MOV R14,RSI
MOV RBX,RDI
LEA R12,[RSP + 0x38]
MOV qword ptr [R12 + -0x10],R12
LEA RSI,[0x188671]
LEA RDX,[0x188686]
LEA R15,[RSP + 0x28]
MOV RDI,R15
CALL 0x00119014
MOV RSI,qword ptr [R14 + 0x20]
LAB_00179b5e:
MOV RDI,R15
CALL 0x00125290
LEA R14,[RSP + 0x18]
MOV qword ptr [R14 + -0x10],R14
MOV RDX,qword ptr [RAX]
MOV RCX,RAX
ADD RCX,0x10
CMP RDX,RCX
JZ 0x00179b8d
MOV qword ptr [RSP + 0x8],RDX
MOV RDX,qword ptr [RCX]
MOV qword ptr [RSP + 0x18],RDX
JMP 0x00179b94
LAB_00179b8d:
MOVUPS XMM0,xmmword ptr [RCX]
MOVUPS xmmword ptr [R14],XMM0
LAB_00179b94:
MOV RDX,qword ptr [RAX + 0x8]
LEA RSI,[RSP + 0x8]
MOV qword ptr [RSI + 0x8],RDX
MOV qword ptr [RAX],RCX
MOV qword ptr [RAX + 0x8],0x0
MOV byte ptr [RAX + 0x10],0x0
MOV RDI,qword ptr [RBX + 0x8]
LAB_00179bb4:
CALL 0x0017afe6
LAB_00179bb9:
MOV RDI,qword ptr [RSP + 0x8]
CMP RDI,R14
JZ 0x00179bd0
MOV RSI,qword ptr [RSP + 0x18]
INC RSI
CALL 0x00111120
LAB_00179bd0:
MOV RDI,qword ptr [RSP + 0x28]
CMP RDI,R12
JZ 0x00179be7
MOV RSI,qword ptr [RSP + 0x38]
INC RSI
CALL 0x00111120
LAB_00179be7:
ADD RSP,0x48
POP RBX
POP R12
POP R14
POP R15
RET
|
/* testing::internal::StreamingListener::OnTestStart(testing::TestInfo const&) */
void __thiscall
testing::internal::StreamingListener::OnTestStart(StreamingListener *this,TestInfo *param_1)
{
long *plVar1;
long *plVar2;
long *local_60;
long local_58;
long local_50;
long lStack_48;
long *local_40 [2];
long local_30 [2];
local_40[0] = local_30;
std::__cxx11::string::_M_construct<char_const*>((string *)local_40,"event=TestStart&name=","");
/* try { // try from 00179b5e to 00179b65 has its CatchHandler @ 00179c0f */
plVar1 = (long *)std::__cxx11::string::append((string *)local_40,*(char **)(param_1 + 0x20));
plVar2 = plVar1 + 2;
if ((long *)*plVar1 == plVar2) {
local_50 = *plVar2;
lStack_48 = plVar1[3];
local_60 = &local_50;
}
else {
local_50 = *plVar2;
local_60 = (long *)*plVar1;
}
local_58 = plVar1[1];
*plVar1 = (long)plVar2;
plVar1[1] = 0;
*(int1 *)(plVar1 + 2) = 0;
/* try { // try from 00179bb4 to 00179bb8 has its CatchHandler @ 00179bf3 */
AbstractSocketWriter::SendLn(*(AbstractSocketWriter **)(this + 8),(string *)&local_60);
if (local_60 != &local_50) {
operator_delete(local_60,local_50 + 1);
}
if (local_40[0] != local_30) {
operator_delete(local_40[0],local_30[0] + 1);
}
return;
}
|
|
9,386 |
blst_fr_from_uint64
|
corpus-core[P]colibri-stateless/build_O3/_deps/blst-src/src/exports.c
|
void blst_fr_from_uint64(vec256 ret, const unsigned long long a[4])
{
const union {
long one;
char little;
} is_endian = { 1 };
if (sizeof(limb_t) == 4 && !is_endian.little) {
int i;
for (i = 0; i < 4; i++) {
unsigned long long limb = a[i];
ret[2*i] = (limb_t)limb;
ret[2*i+1] = (limb_t)(limb >> 32);
}
a = (const unsigned long long *)ret;
}
mul_mont_sparse_256(ret, (const limb_t *)a, BLS12_381_rRR, BLS12_381_r, r0);
}
|
O3
|
c
|
blst_fr_from_uint64:
pushq %rbp
movq %rsp, %rbp
leaq 0x27061(%rip), %rdx # 0x8abc0
leaq 0x26b4a(%rip), %rcx # 0x8a6b0
movabsq $-0x100000001, %r8 # imm = 0xFFFFFFFEFFFFFFFF
popq %rbp
jmp 0x74000
|
blst_fr_from_uint64:
push rbp
mov rbp, rsp
lea rdx, BLS12_381_rRR
lea rcx, BLS12_381_r
mov r8, 0FFFFFFFEFFFFFFFFh
pop rbp
jmp mul_mont_sparse_256
|
long long blst_fr_from_uint64(long long a1, long long a2)
{
return mul_mont_sparse_256(a1, a2, &BLS12_381_rRR, &BLS12_381_r, 0xFFFFFFFEFFFFFFFFLL);
}
|
blst_fr_from_uint64:
PUSH RBP
MOV RBP,RSP
LEA RDX,[0x18abc0]
LEA RCX,[0x18a6b0]
MOV R8,-0x100000001
POP RBP
JMP 0x00174000
|
void blst_fr_from_uint64(int8 param_1,int8 param_2)
{
mul_mont_sparse_256(param_1,param_2,BLS12_381_rRR,BLS12_381_r,0xfffffffeffffffff);
return;
}
|
|
9,387 |
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>::at<char const (&) [11], 0>(char const (&) [11]) const
|
monkey531[P]llama/common/./json.hpp
|
const_reference at(KeyType && key) const
{
// at only works for objects
if (JSON_HEDLEY_UNLIKELY(!is_object()))
{
JSON_THROW(type_error::create(304, detail::concat("cannot use at() with ", type_name()), this));
}
auto it = m_data.m_value.object->find(std::forward<KeyType>(key));
if (it == m_data.m_value.object->end())
{
JSON_THROW(out_of_range::create(403, detail::concat("key '", string_t(std::forward<KeyType>(key)), "' not found"), this));
}
return it->second;
}
|
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> 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>::at<char const (&) [11], 0>(char const (&) [11]) const:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x40, %rsp
movq %rdi, %r14
cmpb $0x1, (%rdi)
jne 0x9743a
movq %rsi, %r15
movq 0x8(%r14), %r12
movq (%r12), %rbx
movq 0x8(%r12), %rax
cmpq %rax, %rbx
je 0x9741f
movq %rbx, %rdi
movq %r15, %rsi
callq 0x18190
testl %eax, %eax
je 0x9741c
addq $0x30, %rbx
jmp 0x973fd
movq %rbx, %rax
movq 0x8(%r14), %rcx
cmpq 0x8(%rcx), %rax
je 0x97496
addq $0x20, %rax
addq $0x40, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movl $0x20, %edi
callq 0x18350
movq %rax, %rbx
movq %r14, %rdi
callq 0x3e11c
leaq 0x20(%rsp), %rdx
movq %rax, (%rdx)
leaq 0x167d7(%rip), %rsi # 0xadc35
movq %rsp, %rdi
callq 0x6efb7
movb $0x1, %bpl
movq %rsp, %rdx
movq %rbx, %rdi
movl $0x130, %esi # imm = 0x130
movq %r14, %rcx
callq 0x3dec4
xorl %ebp, %ebp
leaq 0x44e43(%rip), %rsi # 0xdc2c8
leaq -0x4ad08(%rip), %rdx # 0x4c784
movq %rbx, %rdi
callq 0x18b30
jmp 0x9750f
movl $0x20, %edi
callq 0x18350
movq %rax, %rbx
leaq 0x30(%rsp), %r12
movq %r12, -0x10(%r12)
movq %r15, %rdi
callq 0x18300
leaq (%rax,%r15), %rdx
leaq 0x20(%rsp), %rdi
movq %r15, %rsi
callq 0x1c80a
leaq 0x16798(%rip), %rsi # 0xadc65
leaq 0x16797(%rip), %rcx # 0xadc6b
movq %rsp, %rdi
leaq 0x20(%rsp), %rdx
callq 0x6f5c0
movb $0x1, %bpl
movq %rsp, %rdx
movq %rbx, %rdi
movl $0x193, %esi # imm = 0x193
movq %r14, %rcx
callq 0x6f93a
xorl %ebp, %ebp
leaq 0x44eb0(%rip), %rsi # 0xdc3b0
leaq -0x4ad83(%rip), %rdx # 0x4c784
movq %rbx, %rdi
callq 0x18b30
movq %rax, %r14
leaq 0x10(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x97535
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x186a0
jmp 0x97535
movq %rax, %r14
movb $0x1, %bpl
movq 0x20(%rsp), %rdi
cmpq %r12, %rdi
je 0x9756e
movq 0x30(%rsp), %rsi
jmp 0x9755e
jmp 0x97568
movq %rax, %r14
leaq 0x10(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x9756e
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x186a0
jmp 0x9756e
movq %rax, %r14
movb $0x1, %bpl
testb %bpl, %bpl
je 0x9757b
movq %rbx, %rdi
callq 0x184f0
movq %r14, %rdi
callq 0x18ba0
nop
|
_ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE2atIRA11_KcTnNSt9enable_ifIXsr6detail32is_usable_as_basic_json_key_typeISD_T_EE5valueEiE4typeELi0EEERKSD_OSJ_:
push rbp; char
push r15; int
push r14; int
push r12; int
push rbx; char
sub rsp, 40h
mov r14, rdi
cmp byte ptr [rdi], 1
jnz short loc_9743A
mov r15, rsi
mov r12, [r14+8]
mov rbx, [r12]
loc_973FD:
mov rax, [r12+8]
cmp rbx, rax
jz short loc_9741F
mov rdi, rbx
mov rsi, r15
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7compareEPKc; std::string::compare(char const*)
test eax, eax
jz short loc_9741C
add rbx, 30h ; '0'
jmp short loc_973FD
loc_9741C:
mov rax, rbx
loc_9741F:
mov rcx, [r14+8]
cmp rax, [rcx+8]
jz short loc_97496
add rax, 20h ; ' '
add rsp, 40h
pop rbx
pop r12
pop r14
pop r15
pop rbp
retn
loc_9743A:
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+68h+var_48]
mov [rdx], rax
lea rsi, aCannotUseAtWit; "cannot use at() with "
mov rdi, rsp
call _ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJRA22_KcPS9_EEET_DpOT0_; nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[22],char const*>(char const(&)[22],char const* &&)
mov bpl, 1
mov rdx, rsp
mov rdi, rbx; this
mov esi, 130h; 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
jmp short loc_9750F
loc_97496:
mov edi, 20h ; ' '; thrown_size
call ___cxa_allocate_exception
mov rbx, rax
lea r12, [rsp+68h+var_38]
mov [r12-10h], r12
mov rdi, r15
call _strlen
lea rdx, [rax+r15]
lea rdi, [rsp+68h+var_48]
mov rsi, r15
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag; std::string::_M_construct<char const*>(char const*,char const*,std::forward_iterator_tag)
lea rsi, aKey; "key '"
lea rcx, aNotFound; "' not found"
mov rdi, rsp
lea rdx, [rsp+68h+var_48]
call _ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJRA6_KcS8_RA12_S9_EEET_DpOT0_; nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[6],std::string,char const(&)[12]>(char const(&)[6],std::string,char const(&)[12] &&)
mov bpl, 1
mov rdx, rsp
mov rdi, rbx; this
mov esi, 193h; int
mov rcx, r14
call _ZN8nlohmann16json_abi_v3_11_36detail12out_of_range6createIPKNS0_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_36detail12out_of_rangeE; lptinfo
lea rdx, _ZN8nlohmann16json_abi_v3_11_36detail9exceptionD2Ev; void (*)(void *)
mov rdi, rbx; void *
call ___cxa_throw
loc_9750F:
mov r14, rax
lea rax, [rsp+68h+var_58]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_97535
mov rsi, [rsp+68h+var_58]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_97535
mov r14, rax
mov bpl, 1
loc_97535:
mov rdi, [rsp+68h+var_48]
cmp rdi, r12
jz short loc_9756E
mov rsi, [rsp+68h+var_38]
jmp short loc_9755E
jmp short loc_97568
mov r14, rax
lea rax, [rsp+68h+var_58]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_9756E
mov rsi, [rsp+68h+var_58]
loc_9755E:
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_9756E
loc_97568:
mov r14, rax
mov bpl, 1
loc_9756E:
test bpl, bpl
jz short loc_9757B
mov rdi, rbx; void *
call ___cxa_free_exception
loc_9757B:
mov rdi, r14
call __Unwind_Resume
|
long long ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE2atIRA11_KcTnNSt9enable_ifIXsr6detail32is_usable_as_basic_json_key_typeISD_T_EE5valueEiE4typeELi0EEERKSD_OSJ_(
long long a1,
_BYTE *a2)
{
long long *v2; // r12
long long i; // rbx
long long v4; // rax
nlohmann::json_abi_v3_11_3::detail::exception *exception; // rbx
nlohmann::json_abi_v3_11_3::detail::exception *v7; // rbx
long long v8; // rax
_QWORD v9[2]; // [rsp+0h] [rbp-68h] BYREF
_QWORD v10[2]; // [rsp+20h] [rbp-48h] BYREF
long long v11; // [rsp+30h] [rbp-38h] BYREF
if ( *(_BYTE *)a1 != 1 )
{
exception = (nlohmann::json_abi_v3_11_3::detail::exception *)__cxa_allocate_exception(0x20uLL);
v10[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>::type_name((unsigned __int8 *)a1);
nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[22],char const*>(
(long long)v9,
(long long)"cannot use at() with ",
v10);
ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_(
exception,
304,
v9);
__cxa_throw(
exception,
(struct type_info *)&`typeinfo for'nlohmann::json_abi_v3_11_3::detail::type_error,
(void (*)(void *))nlohmann::json_abi_v3_11_3::detail::exception::~exception);
}
v2 = *(long long **)(a1 + 8);
for ( i = *v2; ; i += 48LL )
{
v4 = v2[1];
if ( i == v4 )
break;
if ( !(unsigned int)std::string::compare(i, a2) )
{
v4 = i;
break;
}
}
if ( v4 == *(_QWORD *)(*(_QWORD *)(a1 + 8) + 8LL) )
{
v7 = (nlohmann::json_abi_v3_11_3::detail::exception *)__cxa_allocate_exception(0x20uLL);
v10[0] = &v11;
v8 = strlen(a2);
std::string::_M_construct<char const*>(v10, a2, (long long)&a2[v8]);
nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[6],std::string,char const(&)[12]>(
(long long)v9,
(long long)"key '",
v10,
(long long)"' not found");
ZN8nlohmann16json_abi_v3_11_36detail12out_of_range6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_(
v7,
403,
v9);
__cxa_throw(
v7,
(struct type_info *)&`typeinfo for'nlohmann::json_abi_v3_11_3::detail::out_of_range,
(void (*)(void *))nlohmann::json_abi_v3_11_3::detail::exception::~exception);
}
return v4 + 32;
}
|
_ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE2atIRA11_KcTnNSt9enable_ifIXsr6detail32is_usable_as_basic_json_key_typeISD_T_EE5valueEiE4typeELi0EEERKSD_OSJ_:
PUSH RBP
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
SUB RSP,0x40
MOV R14,RDI
CMP byte ptr [RDI],0x1
JNZ 0x0019743a
MOV R15,RSI
MOV R12,qword ptr [R14 + 0x8]
MOV RBX,qword ptr [R12]
LAB_001973fd:
MOV RAX,qword ptr [R12 + 0x8]
CMP RBX,RAX
JZ 0x0019741f
MOV RDI,RBX
MOV RSI,R15
CALL 0x00118190
TEST EAX,EAX
JZ 0x0019741c
ADD RBX,0x30
JMP 0x001973fd
LAB_0019741c:
MOV RAX,RBX
LAB_0019741f:
MOV RCX,qword ptr [R14 + 0x8]
CMP RAX,qword ptr [RCX + 0x8]
JZ 0x00197496
ADD RAX,0x20
ADD RSP,0x40
POP RBX
POP R12
POP R14
POP R15
POP RBP
RET
LAB_0019743a:
MOV EDI,0x20
CALL 0x00118350
MOV RBX,RAX
MOV RDI,R14
CALL 0x0013e11c
LEA RDX,[RSP + 0x20]
MOV qword ptr [RDX],RAX
LAB_00197457:
LEA RSI,[0x1adc35]
MOV RDI,RSP
CALL 0x0016efb7
MOV BPL,0x1
LAB_00197469:
MOV RDX,RSP
MOV RDI,RBX
MOV ESI,0x130
MOV RCX,R14
CALL 0x0013dec4
XOR EBP,EBP
LEA RSI,[0x1dc2c8]
LEA RDX,[0x14c784]
MOV RDI,RBX
CALL 0x00118b30
LAB_00197496:
MOV EDI,0x20
CALL 0x00118350
MOV RBX,RAX
LEA R12,[RSP + 0x30]
MOV qword ptr [R12 + -0x10],R12
MOV RDI,R15
CALL 0x00118300
LEA RDX,[RAX + R15*0x1]
LAB_001974b9:
LEA RDI,[RSP + 0x20]
MOV RSI,R15
CALL 0x0011c80a
LAB_001974c6:
LEA RSI,[0x1adc65]
LEA RCX,[0x1adc6b]
MOV RDI,RSP
LEA RDX,[RSP + 0x20]
CALL 0x0016f5c0
MOV BPL,0x1
LAB_001974e4:
MOV RDX,RSP
MOV RDI,RBX
MOV ESI,0x193
MOV RCX,R14
CALL 0x0016f93a
XOR EBP,EBP
LEA RSI,[0x1dc3b0]
LEA RDX,[0x14c784]
MOV RDI,RBX
CALL 0x00118b30
|
char * _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE2atIRA11_KcTnNSt9enable_ifIXsr6detail32is_usable_as_basic_json_key_typeISD_T_EE5valueEiE4typeELi0EEERKSD_OSJ_
(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,char *param_2)
{
int8 *puVar1;
int iVar2;
char *pcVar3;
int8 uVar4;
size_t sVar5;
char *pcVar6;
detail adStack_68 [32];
char *local_48 [2];
char local_38 [16];
if (*param_1 !=
(basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
)0x1) {
uVar4 = __cxa_allocate_exception(0x20);
local_48[0] = (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 00197457 to 00197465 has its CatchHandler @ 00197568 */
nlohmann::json_abi_v3_11_3::detail::concat<std::__cxx11::string,char_const(&)[22],char_const*>
(adStack_68,"cannot use at() with ",local_48);
/* try { // try from 00197469 to 00197493 has its CatchHandler @ 00197548 */
_ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_
(uVar4,0x130,adStack_68,param_1);
/* WARNING: Subroutine does not return */
__cxa_throw(uVar4,&nlohmann::json_abi_v3_11_3::detail::type_error::typeinfo,
nlohmann::json_abi_v3_11_3::detail::exception::~exception);
}
puVar1 = *(int8 **)(param_1 + 8);
pcVar6 = (char *)*puVar1;
while ((pcVar3 = (char *)puVar1[1], pcVar6 != pcVar3 &&
(iVar2 = std::__cxx11::string::compare(pcVar6), pcVar3 = pcVar6, iVar2 != 0))) {
pcVar6 = pcVar6 + 0x30;
}
if (pcVar3 == *(char **)(*(long *)(param_1 + 8) + 8)) {
uVar4 = __cxa_allocate_exception(0x20);
local_48[0] = local_38;
sVar5 = strlen(param_2);
/* try { // try from 001974b9 to 001974c5 has its CatchHandler @ 00197546 */
std::__cxx11::string::_M_construct<char_const*>(local_48,param_2,param_2 + sVar5);
/* try { // try from 001974c6 to 001974e0 has its CatchHandler @ 0019752f */
nlohmann::json_abi_v3_11_3::detail::
concat<std::__cxx11::string,char_const(&)[6],std::__cxx11::string,char_const(&)[12]>
(adStack_68,"key \'",(string *)local_48,"\' not found");
/* try { // try from 001974e4 to 0019750e has its CatchHandler @ 0019750f */
_ZN8nlohmann16json_abi_v3_11_36detail12out_of_range6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_
(uVar4,0x193,adStack_68,param_1);
/* WARNING: Subroutine does not return */
__cxa_throw(uVar4,&nlohmann::json_abi_v3_11_3::detail::out_of_range::typeinfo,
nlohmann::json_abi_v3_11_3::detail::exception::~exception);
}
return pcVar3 + 0x20;
}
|
|
9,388 |
JS_NewObjectFromShape
|
bluesky950520[P]quickjs/quickjs.c
|
static JSValue JS_NewObjectFromShape(JSContext *ctx, JSShape *sh, JSClassID class_id)
{
JSObject *p;
js_trigger_gc(ctx->rt, sizeof(JSObject));
p = js_malloc(ctx, sizeof(JSObject));
if (unlikely(!p))
goto fail;
p->class_id = class_id;
p->extensible = TRUE;
p->free_mark = 0;
p->is_exotic = 0;
p->fast_array = 0;
p->is_constructor = 0;
p->is_uncatchable_error = 0;
p->tmp_mark = 0;
p->is_HTMLDDA = 0;
p->first_weak_ref = NULL;
p->u.opaque = NULL;
p->shape = sh;
p->prop = js_malloc(ctx, sizeof(JSProperty) * sh->prop_size);
if (unlikely(!p->prop)) {
js_free(ctx, p);
fail:
js_free_shape(ctx->rt, sh);
return JS_EXCEPTION;
}
switch(class_id) {
case JS_CLASS_OBJECT:
break;
case JS_CLASS_ARRAY:
{
JSProperty *pr;
p->is_exotic = 1;
p->fast_array = 1;
p->u.array.u.values = NULL;
p->u.array.count = 0;
p->u.array.u1.size = 0;
/* the length property is always the first one */
if (likely(sh == ctx->array_shape)) {
pr = &p->prop[0];
} else {
/* only used for the first array */
/* cannot fail */
pr = add_property(ctx, p, JS_ATOM_length,
JS_PROP_WRITABLE | JS_PROP_LENGTH);
}
pr->u.value = js_int32(0);
}
break;
case JS_CLASS_C_FUNCTION:
p->prop[0].u.value = JS_UNDEFINED;
break;
case JS_CLASS_ARGUMENTS:
case JS_CLASS_UINT8C_ARRAY:
case JS_CLASS_INT8_ARRAY:
case JS_CLASS_UINT8_ARRAY:
case JS_CLASS_INT16_ARRAY:
case JS_CLASS_UINT16_ARRAY:
case JS_CLASS_INT32_ARRAY:
case JS_CLASS_UINT32_ARRAY:
case JS_CLASS_BIG_INT64_ARRAY:
case JS_CLASS_BIG_UINT64_ARRAY:
case JS_CLASS_FLOAT16_ARRAY:
case JS_CLASS_FLOAT32_ARRAY:
case JS_CLASS_FLOAT64_ARRAY:
p->is_exotic = 1;
p->fast_array = 1;
p->u.array.u.ptr = NULL;
p->u.array.count = 0;
break;
case JS_CLASS_DATAVIEW:
p->u.array.u.ptr = NULL;
p->u.array.count = 0;
break;
case JS_CLASS_NUMBER:
case JS_CLASS_STRING:
case JS_CLASS_BOOLEAN:
case JS_CLASS_SYMBOL:
case JS_CLASS_DATE:
case JS_CLASS_BIG_INT:
p->u.object_data = JS_UNDEFINED;
goto set_exotic;
case JS_CLASS_REGEXP:
p->u.regexp.pattern = NULL;
p->u.regexp.bytecode = NULL;
goto set_exotic;
default:
set_exotic:
if (ctx->rt->class_array[class_id].exotic) {
p->is_exotic = 1;
}
break;
}
p->header.ref_count = 1;
add_gc_object(ctx->rt, &p->header, JS_GC_OBJ_TYPE_JS_OBJECT);
return JS_MKPTR(JS_TAG_OBJECT, p);
}
|
O0
|
c
|
JS_NewObjectFromShape:
subq $0x78, %rsp
movq %rdi, 0x60(%rsp)
movq %rsi, 0x58(%rsp)
movl %edx, 0x54(%rsp)
movq 0x60(%rsp), %rax
movq 0x18(%rax), %rdi
movl $0x48, %esi
callq 0x5dcd0
movq 0x60(%rsp), %rdi
movl $0x48, %esi
callq 0x21cb0
movq %rax, 0x48(%rsp)
cmpq $0x0, 0x48(%rsp)
setne %al
xorb $-0x1, %al
xorb $-0x1, %al
xorb $-0x1, %al
andb $0x1, %al
movzbl %al, %eax
cltq
cmpq $0x0, %rax
je 0x2a0fa
jmp 0x2a20c
movl 0x54(%rsp), %eax
movw %ax, %cx
movq 0x48(%rsp), %rax
movw %cx, 0x6(%rax)
movq 0x48(%rsp), %rax
movb 0x5(%rax), %cl
andb $-0x2, %cl
orb $0x1, %cl
movb %cl, 0x5(%rax)
movq 0x48(%rsp), %rax
movb 0x5(%rax), %cl
andb $-0x3, %cl
orb $0x0, %cl
movb %cl, 0x5(%rax)
movq 0x48(%rsp), %rax
movb 0x5(%rax), %cl
andb $-0x5, %cl
orb $0x0, %cl
movb %cl, 0x5(%rax)
movq 0x48(%rsp), %rax
movb 0x5(%rax), %cl
andb $-0x9, %cl
orb $0x0, %cl
movb %cl, 0x5(%rax)
movq 0x48(%rsp), %rax
movb 0x5(%rax), %cl
andb $-0x11, %cl
orb $0x0, %cl
movb %cl, 0x5(%rax)
movq 0x48(%rsp), %rax
movb 0x5(%rax), %cl
andb $-0x21, %cl
orb $0x0, %cl
movb %cl, 0x5(%rax)
movq 0x48(%rsp), %rax
movb 0x5(%rax), %cl
andb $-0x41, %cl
orb $0x0, %cl
movb %cl, 0x5(%rax)
movq 0x48(%rsp), %rax
movb 0x5(%rax), %cl
andb $0x7f, %cl
orb $0x0, %cl
movb %cl, 0x5(%rax)
movq 0x48(%rsp), %rax
movq $0x0, 0x28(%rax)
movq 0x48(%rsp), %rax
movq $0x0, 0x30(%rax)
movq 0x58(%rsp), %rcx
movq 0x48(%rsp), %rax
movq %rcx, 0x18(%rax)
movq 0x60(%rsp), %rdi
movq 0x58(%rsp), %rax
movslq 0x24(%rax), %rsi
shlq $0x4, %rsi
callq 0x21cb0
movq %rax, %rcx
movq 0x48(%rsp), %rax
movq %rcx, 0x20(%rax)
movq 0x48(%rsp), %rax
cmpq $0x0, 0x20(%rax)
setne %al
xorb $-0x1, %al
xorb $-0x1, %al
xorb $-0x1, %al
andb $0x1, %al
movzbl %al, %eax
cltq
cmpq $0x0, %rax
je 0x2a235
movq 0x60(%rsp), %rdi
movq 0x48(%rsp), %rsi
callq 0x21db0
movq 0x60(%rsp), %rax
movq 0x18(%rax), %rdi
movq 0x58(%rsp), %rsi
callq 0x5d690
movl $0x0, 0x68(%rsp)
movq $0x6, 0x70(%rsp)
jmp 0x2a46e
movl 0x54(%rsp), %eax
decl %eax
movl %eax, %ecx
movq %rcx, 0x8(%rsp)
subl $0x21, %eax
ja 0x2a404
movq 0x8(%rsp), %rax
leaq 0xe028d(%rip), %rcx # 0x10a4e4
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
jmp 0x2a43b
movq 0x48(%rsp), %rax
movb 0x5(%rax), %cl
andb $-0x5, %cl
orb $0x4, %cl
movb %cl, 0x5(%rax)
movq 0x48(%rsp), %rax
movb 0x5(%rax), %cl
andb $-0x9, %cl
orb $0x8, %cl
movb %cl, 0x5(%rax)
movq 0x48(%rsp), %rax
movq $0x0, 0x38(%rax)
movq 0x48(%rsp), %rax
movl $0x0, 0x40(%rax)
movq 0x48(%rsp), %rax
movl $0x0, 0x30(%rax)
movq 0x58(%rsp), %rax
movq 0x60(%rsp), %rcx
cmpq 0x38(%rcx), %rax
sete %al
xorb $-0x1, %al
xorb $-0x1, %al
andb $0x1, %al
movzbl %al, %eax
cltq
cmpq $0x0, %rax
je 0x2a2de
movq 0x48(%rsp), %rax
movq 0x20(%rax), %rax
movq %rax, 0x40(%rsp)
jmp 0x2a2fc
movq 0x60(%rsp), %rdi
movq 0x48(%rsp), %rsi
movl $0x32, %edx
movl $0xa, %ecx
callq 0x5dd40
movq %rax, 0x40(%rsp)
movq 0x40(%rsp), %rax
movq %rax, (%rsp)
xorl %edi, %edi
callq 0x33cc0
movq %rax, %rcx
movq (%rsp), %rax
movq %rcx, 0x30(%rsp)
movq %rdx, 0x38(%rsp)
movq 0x30(%rsp), %rcx
movq %rcx, (%rax)
movq 0x38(%rsp), %rcx
movq %rcx, 0x8(%rax)
jmp 0x2a43b
movq 0x48(%rsp), %rax
movq 0x20(%rax), %rax
movl $0x0, 0x20(%rsp)
movq $0x3, 0x28(%rsp)
movq 0x20(%rsp), %rcx
movq %rcx, (%rax)
movq 0x28(%rsp), %rcx
movq %rcx, 0x8(%rax)
jmp 0x2a43b
movq 0x48(%rsp), %rax
movb 0x5(%rax), %cl
andb $-0x5, %cl
orb $0x4, %cl
movb %cl, 0x5(%rax)
movq 0x48(%rsp), %rax
movb 0x5(%rax), %cl
andb $-0x9, %cl
orb $0x8, %cl
movb %cl, 0x5(%rax)
movq 0x48(%rsp), %rax
movq $0x0, 0x38(%rax)
movq 0x48(%rsp), %rax
movl $0x0, 0x40(%rax)
jmp 0x2a43b
movq 0x48(%rsp), %rax
movq $0x0, 0x38(%rax)
movq 0x48(%rsp), %rax
movl $0x0, 0x40(%rax)
jmp 0x2a43b
movq 0x48(%rsp), %rax
movl $0x0, 0x10(%rsp)
movq $0x3, 0x18(%rsp)
movq 0x10(%rsp), %rcx
movq %rcx, 0x30(%rax)
movq 0x18(%rsp), %rcx
movq %rcx, 0x38(%rax)
jmp 0x2a406
movq 0x48(%rsp), %rax
movq $0x0, 0x30(%rax)
movq 0x48(%rsp), %rax
movq $0x0, 0x38(%rax)
jmp 0x2a406
jmp 0x2a406
movq 0x60(%rsp), %rax
movq 0x18(%rax), %rax
movq 0x80(%rax), %rax
movl 0x54(%rsp), %ecx
imulq $0x28, %rcx, %rcx
addq %rcx, %rax
cmpq $0x0, 0x20(%rax)
je 0x2a439
movq 0x48(%rsp), %rax
movb 0x5(%rax), %cl
andb $-0x5, %cl
orb $0x4, %cl
movb %cl, 0x5(%rax)
jmp 0x2a43b
movq 0x48(%rsp), %rax
movl $0x1, (%rax)
movq 0x60(%rsp), %rax
movq 0x18(%rax), %rdi
movq 0x48(%rsp), %rsi
xorl %edx, %edx
callq 0x240d0
movq 0x48(%rsp), %rax
movq %rax, 0x68(%rsp)
movq $-0x1, 0x70(%rsp)
movq 0x68(%rsp), %rax
movq 0x70(%rsp), %rdx
addq $0x78, %rsp
retq
nopl (%rax)
|
JS_NewObjectFromShape:
sub rsp, 78h
mov [rsp+78h+var_18], rdi
mov [rsp+78h+var_20], rsi
mov [rsp+78h+var_24], edx
mov rax, [rsp+78h+var_18]
mov rdi, [rax+18h]
mov esi, 48h ; 'H'
call js_trigger_gc
mov rdi, [rsp+78h+var_18]
mov esi, 48h ; 'H'
call js_malloc
mov [rsp+78h+var_30], rax
cmp [rsp+78h+var_30], 0
setnz al
xor al, 0FFh
xor al, 0FFh
xor al, 0FFh
and al, 1
movzx eax, al
cdqe
cmp rax, 0
jz short loc_2A0FA
jmp loc_2A20C
loc_2A0FA:
mov eax, [rsp+78h+var_24]
mov cx, ax
mov rax, [rsp+78h+var_30]
mov [rax+6], cx
mov rax, [rsp+78h+var_30]
mov cl, [rax+5]
and cl, 0FEh
or cl, 1
mov [rax+5], cl
mov rax, [rsp+78h+var_30]
mov cl, [rax+5]
and cl, 0FDh
or cl, 0
mov [rax+5], cl
mov rax, [rsp+78h+var_30]
mov cl, [rax+5]
and cl, 0FBh
or cl, 0
mov [rax+5], cl
mov rax, [rsp+78h+var_30]
mov cl, [rax+5]
and cl, 0F7h
or cl, 0
mov [rax+5], cl
mov rax, [rsp+78h+var_30]
mov cl, [rax+5]
and cl, 0EFh
or cl, 0
mov [rax+5], cl
mov rax, [rsp+78h+var_30]
mov cl, [rax+5]
and cl, 0DFh
or cl, 0
mov [rax+5], cl
mov rax, [rsp+78h+var_30]
mov cl, [rax+5]
and cl, 0BFh
or cl, 0
mov [rax+5], cl
mov rax, [rsp+78h+var_30]
mov cl, [rax+5]
and cl, 7Fh
or cl, 0
mov [rax+5], cl
mov rax, [rsp+78h+var_30]
mov qword ptr [rax+28h], 0
mov rax, [rsp+78h+var_30]
mov qword ptr [rax+30h], 0
mov rcx, [rsp+78h+var_20]
mov rax, [rsp+78h+var_30]
mov [rax+18h], rcx
mov rdi, [rsp+78h+var_18]
mov rax, [rsp+78h+var_20]
movsxd rsi, dword ptr [rax+24h]
shl rsi, 4
call js_malloc
mov rcx, rax
mov rax, [rsp+78h+var_30]
mov [rax+20h], rcx
mov rax, [rsp+78h+var_30]
cmp qword ptr [rax+20h], 0
setnz al
xor al, 0FFh
xor al, 0FFh
xor al, 0FFh
and al, 1
movzx eax, al
cdqe
cmp rax, 0
jz short loc_2A235
mov rdi, [rsp+78h+var_18]
mov rsi, [rsp+78h+var_30]
call js_free
loc_2A20C:
mov rax, [rsp+78h+var_18]
mov rdi, [rax+18h]
mov rsi, [rsp+78h+var_20]
call js_free_shape
mov dword ptr [rsp+78h+var_10], 0
mov [rsp+78h+var_8], 6
jmp loc_2A46E
loc_2A235:
mov eax, [rsp+78h+var_24]
dec eax; switch 34 cases
mov ecx, eax
mov [rsp+78h+var_70], rcx
sub eax, 21h
ja def_2A25E; jumptable 000000000002A25E default case, cases 3,9,11,13-17,19,20
mov rax, [rsp+78h+var_70]
lea rcx, jpt_2A25E
movsxd rax, ds:(jpt_2A25E - 10A4E4h)[rcx+rax*4]
add rax, rcx
jmp rax; switch jump
loc_2A260:
jmp loc_2A43B; jumptable 000000000002A25E case 1
loc_2A265:
mov rax, [rsp+78h+var_30]; jumptable 000000000002A25E case 2
mov cl, [rax+5]
and cl, 0FBh
or cl, 4
mov [rax+5], cl
mov rax, [rsp+78h+var_30]
mov cl, [rax+5]
and cl, 0F7h
or cl, 8
mov [rax+5], cl
mov rax, [rsp+78h+var_30]
mov qword ptr [rax+38h], 0
mov rax, [rsp+78h+var_30]
mov dword ptr [rax+40h], 0
mov rax, [rsp+78h+var_30]
mov dword ptr [rax+30h], 0
mov rax, [rsp+78h+var_20]
mov rcx, [rsp+78h+var_18]
cmp rax, [rcx+38h]
setz al
xor al, 0FFh
xor al, 0FFh
and al, 1
movzx eax, al
cdqe
cmp rax, 0
jz short loc_2A2DE
mov rax, [rsp+78h+var_30]
mov rax, [rax+20h]
mov [rsp+78h+var_38], rax
jmp short loc_2A2FC
loc_2A2DE:
mov rdi, [rsp+78h+var_18]
mov rsi, [rsp+78h+var_30]
mov edx, 32h ; '2'
mov ecx, 0Ah
call add_property
mov [rsp+78h+var_38], rax
loc_2A2FC:
mov rax, [rsp+78h+var_38]
mov [rsp+78h+var_78], rax
xor edi, edi
call js_int32
mov rcx, rax
mov rax, [rsp+78h+var_78]
mov [rsp+78h+var_48], rcx
mov [rsp+78h+var_40], rdx
mov rcx, [rsp+78h+var_48]
mov [rax], rcx
mov rcx, [rsp+78h+var_40]
mov [rax+8], rcx
jmp loc_2A43B
loc_2A333:
mov rax, [rsp+78h+var_30]; jumptable 000000000002A25E case 12
mov rax, [rax+20h]
mov dword ptr [rsp+78h+var_58], 0
mov [rsp+78h+var_50], 3
mov rcx, [rsp+78h+var_58]
mov [rax], rcx
mov rcx, [rsp+78h+var_50]
mov [rax+8], rcx
jmp loc_2A43B
loc_2A363:
mov rax, [rsp+78h+var_30]; jumptable 000000000002A25E cases 8,21-32
mov cl, [rax+5]
and cl, 0FBh
or cl, 4
mov [rax+5], cl
mov rax, [rsp+78h+var_30]
mov cl, [rax+5]
and cl, 0F7h
or cl, 8
mov [rax+5], cl
mov rax, [rsp+78h+var_30]
mov qword ptr [rax+38h], 0
mov rax, [rsp+78h+var_30]
mov dword ptr [rax+40h], 0
jmp loc_2A43B
loc_2A3A3:
mov rax, [rsp+78h+var_30]; jumptable 000000000002A25E case 33
mov qword ptr [rax+38h], 0
mov rax, [rsp+78h+var_30]
mov dword ptr [rax+40h], 0
jmp short loc_2A43B
loc_2A3BE:
mov rax, [rsp+78h+var_30]; jumptable 000000000002A25E cases 4-7,10,34
mov dword ptr [rsp+78h+var_68], 0
mov [rsp+78h+var_60], 3
mov rcx, [rsp+78h+var_68]
mov [rax+30h], rcx
mov rcx, [rsp+78h+var_60]
mov [rax+38h], rcx
jmp short loc_2A406
loc_2A3E8:
mov rax, [rsp+78h+var_30]; jumptable 000000000002A25E case 18
mov qword ptr [rax+30h], 0
mov rax, [rsp+78h+var_30]
mov qword ptr [rax+38h], 0
jmp short loc_2A406
def_2A25E:
jmp short $+2; jumptable 000000000002A25E default case, cases 3,9,11,13-17,19,20
loc_2A406:
mov rax, [rsp+78h+var_18]
mov rax, [rax+18h]
mov rax, [rax+80h]
mov ecx, [rsp+78h+var_24]
imul rcx, 28h ; '('
add rax, rcx
cmp qword ptr [rax+20h], 0
jz short loc_2A439
mov rax, [rsp+78h+var_30]
mov cl, [rax+5]
and cl, 0FBh
or cl, 4
mov [rax+5], cl
loc_2A439:
jmp short $+2
loc_2A43B:
mov rax, [rsp+78h+var_30]
mov dword ptr [rax], 1
mov rax, [rsp+78h+var_18]
mov rdi, [rax+18h]
mov rsi, [rsp+78h+var_30]
xor edx, edx
call add_gc_object
mov rax, [rsp+78h+var_30]
mov [rsp+78h+var_10], rax
mov [rsp+78h+var_8], 0FFFFFFFFFFFFFFFFh
loc_2A46E:
mov rax, [rsp+78h+var_10]
mov rdx, [rsp+78h+var_8]
add rsp, 78h
retn
|
long long JS_NewObjectFromShape(long long a1, long long a2, unsigned int a3)
{
long long v3; // rdx
_QWORD *v4; // rax
long long v6; // [rsp+10h] [rbp-68h]
long long v7; // [rsp+20h] [rbp-58h]
_QWORD *v8; // [rsp+40h] [rbp-38h]
long long v9; // [rsp+48h] [rbp-30h]
long long v11; // [rsp+68h] [rbp-10h]
js_trigger_gc(*(_QWORD *)(a1 + 24), 72LL);
v9 = js_malloc(a1, 72LL);
if ( !v9 )
goto LABEL_4;
*(_WORD *)(v9 + 6) = a3;
*(_BYTE *)(v9 + 5) = *(_BYTE *)(v9 + 5) & 0xFE | 1;
*(_BYTE *)(v9 + 5) &= ~2u;
*(_BYTE *)(v9 + 5) &= ~4u;
*(_BYTE *)(v9 + 5) &= ~8u;
*(_BYTE *)(v9 + 5) &= ~0x10u;
*(_BYTE *)(v9 + 5) &= ~0x20u;
*(_BYTE *)(v9 + 5) &= ~0x40u;
*(_BYTE *)(v9 + 5) &= ~0x80u;
*(_QWORD *)(v9 + 40) = 0LL;
*(_QWORD *)(v9 + 48) = 0LL;
*(_QWORD *)(v9 + 24) = a2;
*(_QWORD *)(v9 + 32) = js_malloc(a1, 16LL * *(int *)(a2 + 36));
if ( !*(_QWORD *)(v9 + 32) )
{
js_free(a1, v9);
LABEL_4:
js_free_shape(*(_QWORD *)(a1 + 24), a2);
LODWORD(v11) = 0;
return v11;
}
switch ( a3 )
{
case 1u:
goto LABEL_17;
case 2u:
*(_BYTE *)(v9 + 5) = *(_BYTE *)(v9 + 5) & 0xFB | 4;
*(_BYTE *)(v9 + 5) = *(_BYTE *)(v9 + 5) & 0xF7 | 8;
*(_QWORD *)(v9 + 56) = 0LL;
*(_DWORD *)(v9 + 64) = 0;
*(_DWORD *)(v9 + 48) = 0;
if ( a2 == *(_QWORD *)(a1 + 56) )
v8 = *(_QWORD **)(v9 + 32);
else
v8 = (_QWORD *)add_property(a1, v9, 50LL, 10LL);
*v8 = js_int32(0LL);
v8[1] = v3;
goto LABEL_17;
case 4u:
case 5u:
case 6u:
case 7u:
case 0xAu:
case 0x22u:
LODWORD(v6) = 0;
*(_QWORD *)(v9 + 48) = v6;
*(_QWORD *)(v9 + 56) = 3LL;
goto LABEL_15;
case 8u:
case 0x15u:
case 0x16u:
case 0x17u:
case 0x18u:
case 0x19u:
case 0x1Au:
case 0x1Bu:
case 0x1Cu:
case 0x1Du:
case 0x1Eu:
case 0x1Fu:
case 0x20u:
*(_BYTE *)(v9 + 5) = *(_BYTE *)(v9 + 5) & 0xFB | 4;
*(_BYTE *)(v9 + 5) = *(_BYTE *)(v9 + 5) & 0xF7 | 8;
*(_QWORD *)(v9 + 56) = 0LL;
*(_DWORD *)(v9 + 64) = 0;
goto LABEL_17;
case 0xCu:
v4 = *(_QWORD **)(v9 + 32);
LODWORD(v7) = 0;
*v4 = v7;
v4[1] = 3LL;
goto LABEL_17;
case 0x12u:
*(_QWORD *)(v9 + 48) = 0LL;
*(_QWORD *)(v9 + 56) = 0LL;
goto LABEL_15;
case 0x21u:
*(_QWORD *)(v9 + 56) = 0LL;
*(_DWORD *)(v9 + 64) = 0;
goto LABEL_17;
default:
LABEL_15:
if ( *(_QWORD *)(40LL * a3 + *(_QWORD *)(*(_QWORD *)(a1 + 24) + 128LL) + 32) )
*(_BYTE *)(v9 + 5) = *(_BYTE *)(v9 + 5) & 0xFB | 4;
LABEL_17:
*(_DWORD *)v9 = 1;
add_gc_object(*(_QWORD *)(a1 + 24), v9, 0);
v11 = v9;
break;
}
return v11;
}
|
JS_NewObjectFromShape:
SUB RSP,0x78
MOV qword ptr [RSP + 0x60],RDI
MOV qword ptr [RSP + 0x58],RSI
MOV dword ptr [RSP + 0x54],EDX
MOV RAX,qword ptr [RSP + 0x60]
MOV RDI,qword ptr [RAX + 0x18]
MOV ESI,0x48
CALL 0x0015dcd0
MOV RDI,qword ptr [RSP + 0x60]
MOV ESI,0x48
CALL 0x00121cb0
MOV qword ptr [RSP + 0x48],RAX
CMP qword ptr [RSP + 0x48],0x0
SETNZ AL
XOR AL,0xff
XOR AL,0xff
XOR AL,0xff
AND AL,0x1
MOVZX EAX,AL
CDQE
CMP RAX,0x0
JZ 0x0012a0fa
JMP 0x0012a20c
LAB_0012a0fa:
MOV EAX,dword ptr [RSP + 0x54]
MOV CX,AX
MOV RAX,qword ptr [RSP + 0x48]
MOV word ptr [RAX + 0x6],CX
MOV RAX,qword ptr [RSP + 0x48]
MOV CL,byte ptr [RAX + 0x5]
AND CL,0xfe
OR CL,0x1
MOV byte ptr [RAX + 0x5],CL
MOV RAX,qword ptr [RSP + 0x48]
MOV CL,byte ptr [RAX + 0x5]
AND CL,0xfd
OR CL,0x0
MOV byte ptr [RAX + 0x5],CL
MOV RAX,qword ptr [RSP + 0x48]
MOV CL,byte ptr [RAX + 0x5]
AND CL,0xfb
OR CL,0x0
MOV byte ptr [RAX + 0x5],CL
MOV RAX,qword ptr [RSP + 0x48]
MOV CL,byte ptr [RAX + 0x5]
AND CL,0xf7
OR CL,0x0
MOV byte ptr [RAX + 0x5],CL
MOV RAX,qword ptr [RSP + 0x48]
MOV CL,byte ptr [RAX + 0x5]
AND CL,0xef
OR CL,0x0
MOV byte ptr [RAX + 0x5],CL
MOV RAX,qword ptr [RSP + 0x48]
MOV CL,byte ptr [RAX + 0x5]
AND CL,0xdf
OR CL,0x0
MOV byte ptr [RAX + 0x5],CL
MOV RAX,qword ptr [RSP + 0x48]
MOV CL,byte ptr [RAX + 0x5]
AND CL,0xbf
OR CL,0x0
MOV byte ptr [RAX + 0x5],CL
MOV RAX,qword ptr [RSP + 0x48]
MOV CL,byte ptr [RAX + 0x5]
AND CL,0x7f
OR CL,0x0
MOV byte ptr [RAX + 0x5],CL
MOV RAX,qword ptr [RSP + 0x48]
MOV qword ptr [RAX + 0x28],0x0
MOV RAX,qword ptr [RSP + 0x48]
MOV qword ptr [RAX + 0x30],0x0
MOV RCX,qword ptr [RSP + 0x58]
MOV RAX,qword ptr [RSP + 0x48]
MOV qword ptr [RAX + 0x18],RCX
MOV RDI,qword ptr [RSP + 0x60]
MOV RAX,qword ptr [RSP + 0x58]
MOVSXD RSI,dword ptr [RAX + 0x24]
SHL RSI,0x4
CALL 0x00121cb0
MOV RCX,RAX
MOV RAX,qword ptr [RSP + 0x48]
MOV qword ptr [RAX + 0x20],RCX
MOV RAX,qword ptr [RSP + 0x48]
CMP qword ptr [RAX + 0x20],0x0
SETNZ AL
XOR AL,0xff
XOR AL,0xff
XOR AL,0xff
AND AL,0x1
MOVZX EAX,AL
CDQE
CMP RAX,0x0
JZ 0x0012a235
MOV RDI,qword ptr [RSP + 0x60]
MOV RSI,qword ptr [RSP + 0x48]
CALL 0x00121db0
LAB_0012a20c:
MOV RAX,qword ptr [RSP + 0x60]
MOV RDI,qword ptr [RAX + 0x18]
MOV RSI,qword ptr [RSP + 0x58]
CALL 0x0015d690
MOV dword ptr [RSP + 0x68],0x0
MOV qword ptr [RSP + 0x70],0x6
JMP 0x0012a46e
LAB_0012a235:
MOV EAX,dword ptr [RSP + 0x54]
DEC EAX
MOV ECX,EAX
MOV qword ptr [RSP + 0x8],RCX
SUB EAX,0x21
JA 0x0012a404
MOV RAX,qword ptr [RSP + 0x8]
LEA RCX,[0x20a4e4]
MOVSXD RAX,dword ptr [RCX + RAX*0x4]
ADD RAX,RCX
switchD:
JMP RAX
caseD_1:
JMP 0x0012a43b
caseD_2:
MOV RAX,qword ptr [RSP + 0x48]
MOV CL,byte ptr [RAX + 0x5]
AND CL,0xfb
OR CL,0x4
MOV byte ptr [RAX + 0x5],CL
MOV RAX,qword ptr [RSP + 0x48]
MOV CL,byte ptr [RAX + 0x5]
AND CL,0xf7
OR CL,0x8
MOV byte ptr [RAX + 0x5],CL
MOV RAX,qword ptr [RSP + 0x48]
MOV qword ptr [RAX + 0x38],0x0
MOV RAX,qword ptr [RSP + 0x48]
MOV dword ptr [RAX + 0x40],0x0
MOV RAX,qword ptr [RSP + 0x48]
MOV dword ptr [RAX + 0x30],0x0
MOV RAX,qword ptr [RSP + 0x58]
MOV RCX,qword ptr [RSP + 0x60]
CMP RAX,qword ptr [RCX + 0x38]
SETZ AL
XOR AL,0xff
XOR AL,0xff
AND AL,0x1
MOVZX EAX,AL
CDQE
CMP RAX,0x0
JZ 0x0012a2de
MOV RAX,qword ptr [RSP + 0x48]
MOV RAX,qword ptr [RAX + 0x20]
MOV qword ptr [RSP + 0x40],RAX
JMP 0x0012a2fc
LAB_0012a2de:
MOV RDI,qword ptr [RSP + 0x60]
MOV RSI,qword ptr [RSP + 0x48]
MOV EDX,0x32
MOV ECX,0xa
CALL 0x0015dd40
MOV qword ptr [RSP + 0x40],RAX
LAB_0012a2fc:
MOV RAX,qword ptr [RSP + 0x40]
MOV qword ptr [RSP],RAX
XOR EDI,EDI
CALL 0x00133cc0
MOV RCX,RAX
MOV RAX,qword ptr [RSP]
MOV qword ptr [RSP + 0x30],RCX
MOV qword ptr [RSP + 0x38],RDX
MOV RCX,qword ptr [RSP + 0x30]
MOV qword ptr [RAX],RCX
MOV RCX,qword ptr [RSP + 0x38]
MOV qword ptr [RAX + 0x8],RCX
JMP 0x0012a43b
caseD_c:
MOV RAX,qword ptr [RSP + 0x48]
MOV RAX,qword ptr [RAX + 0x20]
MOV dword ptr [RSP + 0x20],0x0
MOV qword ptr [RSP + 0x28],0x3
MOV RCX,qword ptr [RSP + 0x20]
MOV qword ptr [RAX],RCX
MOV RCX,qword ptr [RSP + 0x28]
MOV qword ptr [RAX + 0x8],RCX
JMP 0x0012a43b
caseD_8:
MOV RAX,qword ptr [RSP + 0x48]
MOV CL,byte ptr [RAX + 0x5]
AND CL,0xfb
OR CL,0x4
MOV byte ptr [RAX + 0x5],CL
MOV RAX,qword ptr [RSP + 0x48]
MOV CL,byte ptr [RAX + 0x5]
AND CL,0xf7
OR CL,0x8
MOV byte ptr [RAX + 0x5],CL
MOV RAX,qword ptr [RSP + 0x48]
MOV qword ptr [RAX + 0x38],0x0
MOV RAX,qword ptr [RSP + 0x48]
MOV dword ptr [RAX + 0x40],0x0
JMP 0x0012a43b
caseD_21:
MOV RAX,qword ptr [RSP + 0x48]
MOV qword ptr [RAX + 0x38],0x0
MOV RAX,qword ptr [RSP + 0x48]
MOV dword ptr [RAX + 0x40],0x0
JMP 0x0012a43b
caseD_4:
MOV RAX,qword ptr [RSP + 0x48]
MOV dword ptr [RSP + 0x10],0x0
MOV qword ptr [RSP + 0x18],0x3
MOV RCX,qword ptr [RSP + 0x10]
MOV qword ptr [RAX + 0x30],RCX
MOV RCX,qword ptr [RSP + 0x18]
MOV qword ptr [RAX + 0x38],RCX
JMP 0x0012a406
caseD_12:
MOV RAX,qword ptr [RSP + 0x48]
MOV qword ptr [RAX + 0x30],0x0
MOV RAX,qword ptr [RSP + 0x48]
MOV qword ptr [RAX + 0x38],0x0
JMP 0x0012a406
caseD_3:
JMP 0x0012a406
LAB_0012a406:
MOV RAX,qword ptr [RSP + 0x60]
MOV RAX,qword ptr [RAX + 0x18]
MOV RAX,qword ptr [RAX + 0x80]
MOV ECX,dword ptr [RSP + 0x54]
IMUL RCX,RCX,0x28
ADD RAX,RCX
CMP qword ptr [RAX + 0x20],0x0
JZ 0x0012a439
MOV RAX,qword ptr [RSP + 0x48]
MOV CL,byte ptr [RAX + 0x5]
AND CL,0xfb
OR CL,0x4
MOV byte ptr [RAX + 0x5],CL
LAB_0012a439:
JMP 0x0012a43b
LAB_0012a43b:
MOV RAX,qword ptr [RSP + 0x48]
MOV dword ptr [RAX],0x1
MOV RAX,qword ptr [RSP + 0x60]
MOV RDI,qword ptr [RAX + 0x18]
MOV RSI,qword ptr [RSP + 0x48]
XOR EDX,EDX
CALL 0x001240d0
MOV RAX,qword ptr [RSP + 0x48]
MOV qword ptr [RSP + 0x68],RAX
MOV qword ptr [RSP + 0x70],-0x1
LAB_0012a46e:
MOV RAX,qword ptr [RSP + 0x68]
MOV RDX,qword ptr [RSP + 0x70]
ADD RSP,0x78
RET
|
int1 [16] JS_NewObjectFromShape(long param_1,long param_2,uint param_3)
{
long *plVar1;
int4 *puVar2;
int8 uVar3;
int1 auVar4 [16];
uint uStack_64;
uint uStack_54;
int1 (*local_38) [16];
int4 local_10;
int4 uStack_c;
int8 local_8;
js_trigger_gc(*(int8 *)(param_1 + 0x18),0x48);
puVar2 = (int4 *)js_malloc(param_1,0x48);
if (puVar2 == (int4 *)0x0) {
LAB_0012a20c:
js_free_shape(*(int8 *)(param_1 + 0x18),param_2);
local_10 = 0;
local_8 = 6;
goto LAB_0012a46e;
}
*(short *)((long)puVar2 + 6) = (short)param_3;
*(byte *)((long)puVar2 + 5) = *(byte *)((long)puVar2 + 5) & 0xfe | 1;
*(byte *)((long)puVar2 + 5) = *(byte *)((long)puVar2 + 5) & 0xfd;
*(byte *)((long)puVar2 + 5) = *(byte *)((long)puVar2 + 5) & 0xfb;
*(byte *)((long)puVar2 + 5) = *(byte *)((long)puVar2 + 5) & 0xf7;
*(byte *)((long)puVar2 + 5) = *(byte *)((long)puVar2 + 5) & 0xef;
*(byte *)((long)puVar2 + 5) = *(byte *)((long)puVar2 + 5) & 0xdf;
*(byte *)((long)puVar2 + 5) = *(byte *)((long)puVar2 + 5) & 0xbf;
*(byte *)((long)puVar2 + 5) = *(byte *)((long)puVar2 + 5) & 0x7f;
*(int8 *)(puVar2 + 10) = 0;
*(int8 *)(puVar2 + 0xc) = 0;
*(long *)(puVar2 + 6) = param_2;
uVar3 = js_malloc(param_1,(long)*(int *)(param_2 + 0x24) << 4);
*(int8 *)(puVar2 + 8) = uVar3;
if (*(long *)(puVar2 + 8) == 0) {
js_free(param_1,puVar2);
goto LAB_0012a20c;
}
switch(param_3) {
case 1:
break;
case 2:
*(byte *)((long)puVar2 + 5) = *(byte *)((long)puVar2 + 5) & 0xfb | 4;
*(byte *)((long)puVar2 + 5) = *(byte *)((long)puVar2 + 5) & 0xf7 | 8;
*(int8 *)(puVar2 + 0xe) = 0;
puVar2[0x10] = 0;
puVar2[0xc] = 0;
if (param_2 == *(long *)(param_1 + 0x38)) {
local_38 = *(int1 (**) [16])(puVar2 + 8);
}
else {
local_38 = (int1 (*) [16])add_property(param_1,puVar2,0x32,10);
}
auVar4 = js_int32(0);
*local_38 = auVar4;
break;
default:
goto LAB_0012a406;
case 4:
case 5:
case 6:
case 7:
case 10:
case 0x22:
*(ulong *)(puVar2 + 0xc) = (ulong)uStack_64 << 0x20;
*(int8 *)(puVar2 + 0xe) = 3;
goto LAB_0012a406;
case 8:
case 0x15:
case 0x16:
case 0x17:
case 0x18:
case 0x19:
case 0x1a:
case 0x1b:
case 0x1c:
case 0x1d:
case 0x1e:
case 0x1f:
case 0x20:
*(byte *)((long)puVar2 + 5) = *(byte *)((long)puVar2 + 5) & 0xfb | 4;
*(byte *)((long)puVar2 + 5) = *(byte *)((long)puVar2 + 5) & 0xf7 | 8;
*(int8 *)(puVar2 + 0xe) = 0;
puVar2[0x10] = 0;
break;
case 0xc:
plVar1 = *(long **)(puVar2 + 8);
*plVar1 = (ulong)uStack_54 << 0x20;
plVar1[1] = 3;
break;
case 0x12:
*(int8 *)(puVar2 + 0xc) = 0;
*(int8 *)(puVar2 + 0xe) = 0;
LAB_0012a406:
if (*(long *)(*(long *)(*(long *)(param_1 + 0x18) + 0x80) + (ulong)param_3 * 0x28 + 0x20) != 0)
{
*(byte *)((long)puVar2 + 5) = *(byte *)((long)puVar2 + 5) & 0xfb | 4;
}
break;
case 0x21:
*(int8 *)(puVar2 + 0xe) = 0;
puVar2[0x10] = 0;
}
*puVar2 = 1;
add_gc_object(*(int8 *)(param_1 + 0x18),puVar2,0);
local_10 = SUB84(puVar2,0);
uStack_c = (int4)((ulong)puVar2 >> 0x20);
local_8 = 0xffffffffffffffff;
LAB_0012a46e:
auVar4._4_4_ = uStack_c;
auVar4._0_4_ = local_10;
auVar4._8_8_ = local_8;
return auVar4;
}
|
|
9,389 |
JS_NewObjectFromShape
|
bluesky950520[P]quickjs/quickjs.c
|
static JSValue JS_NewObjectFromShape(JSContext *ctx, JSShape *sh, JSClassID class_id)
{
JSObject *p;
js_trigger_gc(ctx->rt, sizeof(JSObject));
p = js_malloc(ctx, sizeof(JSObject));
if (unlikely(!p))
goto fail;
p->class_id = class_id;
p->extensible = TRUE;
p->free_mark = 0;
p->is_exotic = 0;
p->fast_array = 0;
p->is_constructor = 0;
p->is_uncatchable_error = 0;
p->tmp_mark = 0;
p->is_HTMLDDA = 0;
p->first_weak_ref = NULL;
p->u.opaque = NULL;
p->shape = sh;
p->prop = js_malloc(ctx, sizeof(JSProperty) * sh->prop_size);
if (unlikely(!p->prop)) {
js_free(ctx, p);
fail:
js_free_shape(ctx->rt, sh);
return JS_EXCEPTION;
}
switch(class_id) {
case JS_CLASS_OBJECT:
break;
case JS_CLASS_ARRAY:
{
JSProperty *pr;
p->is_exotic = 1;
p->fast_array = 1;
p->u.array.u.values = NULL;
p->u.array.count = 0;
p->u.array.u1.size = 0;
/* the length property is always the first one */
if (likely(sh == ctx->array_shape)) {
pr = &p->prop[0];
} else {
/* only used for the first array */
/* cannot fail */
pr = add_property(ctx, p, JS_ATOM_length,
JS_PROP_WRITABLE | JS_PROP_LENGTH);
}
pr->u.value = js_int32(0);
}
break;
case JS_CLASS_C_FUNCTION:
p->prop[0].u.value = JS_UNDEFINED;
break;
case JS_CLASS_ARGUMENTS:
case JS_CLASS_UINT8C_ARRAY:
case JS_CLASS_INT8_ARRAY:
case JS_CLASS_UINT8_ARRAY:
case JS_CLASS_INT16_ARRAY:
case JS_CLASS_UINT16_ARRAY:
case JS_CLASS_INT32_ARRAY:
case JS_CLASS_UINT32_ARRAY:
case JS_CLASS_BIG_INT64_ARRAY:
case JS_CLASS_BIG_UINT64_ARRAY:
case JS_CLASS_FLOAT16_ARRAY:
case JS_CLASS_FLOAT32_ARRAY:
case JS_CLASS_FLOAT64_ARRAY:
p->is_exotic = 1;
p->fast_array = 1;
p->u.array.u.ptr = NULL;
p->u.array.count = 0;
break;
case JS_CLASS_DATAVIEW:
p->u.array.u.ptr = NULL;
p->u.array.count = 0;
break;
case JS_CLASS_NUMBER:
case JS_CLASS_STRING:
case JS_CLASS_BOOLEAN:
case JS_CLASS_SYMBOL:
case JS_CLASS_DATE:
case JS_CLASS_BIG_INT:
p->u.object_data = JS_UNDEFINED;
goto set_exotic;
case JS_CLASS_REGEXP:
p->u.regexp.pattern = NULL;
p->u.regexp.bytecode = NULL;
goto set_exotic;
default:
set_exotic:
if (ctx->rt->class_array[class_id].exotic) {
p->is_exotic = 1;
}
break;
}
p->header.ref_count = 1;
add_gc_object(ctx->rt, &p->header, JS_GC_OBJ_TYPE_JS_OBJECT);
return JS_MKPTR(JS_TAG_OBJECT, p);
}
|
O1
|
c
|
JS_NewObjectFromShape:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movl %edx, %r12d
movq %rsi, %r15
movq %rdi, %rbx
movq 0x18(%rdi), %r14
movq 0x30(%r14), %rax
addq $0x48, %rax
cmpq 0xd0(%r14), %rax
jbe 0xf558
movq %r14, %rdi
callq 0x1d8ec
movq 0x30(%r14), %rax
movq %rax, %rcx
shrq %rcx
addq %rax, %rcx
movq %rcx, 0xd0(%r14)
pushq $0x48
popq %rsi
movq %rbx, %rdi
callq 0xede6
testq %rax, %rax
je 0xf6b3
movq %rax, %r14
movw %r12w, 0x6(%rax)
movb $0x1, 0x5(%rax)
xorps %xmm0, %xmm0
movups %xmm0, 0x28(%rax)
movq %r15, 0x18(%rax)
movslq 0x24(%r15), %rsi
shlq $0x4, %rsi
movq %rbx, %rdi
callq 0xede6
movq %rax, 0x20(%r14)
testq %rax, %rax
je 0xf684
leal -0x1(%r12), %ecx
cmpl $0x21, %ecx
ja 0xf5d8
leaq 0x8ce53(%rip), %rdx # 0x9c404
movslq (%rdx,%rcx,4), %rcx
addq %rdx, %rcx
jmpq *%rcx
orb $0xc, 0x5(%r14)
andq $0x0, 0x38(%r14)
andl $0x0, 0x40(%r14)
jmp 0xf5f7
andl $0x0, 0x30(%r14)
movq $0x3, 0x38(%r14)
movq 0x18(%rbx), %rax
movq 0x80(%rax), %rax
movl %r12d, %ecx
imulq $0x28, %rcx, %rcx
cmpq $0x0, 0x20(%rax,%rcx)
je 0xf5f7
orb $0x4, 0x5(%r14)
movl $0x1, (%r14)
movq 0x18(%rbx), %rax
movb $0x0, 0x4(%r14)
movq %r14, %rcx
addq $0x8, %rcx
leaq 0x98(%rax), %rdx
movq 0x98(%rax), %rsi
movq %rcx, 0x8(%rsi)
movq %rsi, 0x8(%r14)
movq %rdx, 0x10(%r14)
movq %rcx, 0x98(%rax)
movq %r14, (%rsp)
pushq $-0x1
popq %rdx
movq (%rsp), %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
leaq 0x30(%r14), %rax
xorps %xmm0, %xmm0
movups %xmm0, (%rax)
jmp 0xf5d8
andl $0x0, (%rax)
movq $0x3, 0x8(%rax)
jmp 0xf5f7
orb $0xc, 0x5(%r14)
andq $0x0, 0x38(%r14)
andl $0x0, 0x40(%r14)
andl $0x0, 0x30(%r14)
cmpq %r15, 0x38(%rbx)
jne 0xf6d0
xorps %xmm0, %xmm0
movups %xmm0, (%rax)
jmp 0xf5f7
movq 0x18(%rbx), %r12
decq 0x28(%r12)
movq %r14, %rdi
callq *0x20(%r12)
movq 0x30(%r12), %rcx
movq 0x40(%r12), %rdi
subq %rax, %rcx
addq $-0x8, %rcx
movq %rcx, 0x30(%r12)
movq %r14, %rsi
callq *0x10(%r12)
movq 0x18(%rbx), %rdi
movl (%r15), %eax
leal -0x1(%rax), %ecx
movl %ecx, (%r15)
cmpl $0x1, %eax
jle 0xf6e3
andl $0x0, (%rsp)
pushq $0x6
jmp 0xf635
pushq $0x32
popq %rdx
pushq $0xa
popq %rcx
movq %rbx, %rdi
movq %r14, %rsi
callq 0x3bf45
jmp 0xf679
movq %r15, %rsi
callq 0x3bc6e
jmp 0xf6c5
|
JS_NewObjectFromShape:
push r15
push r14
push r12
push rbx
push rax
mov r12d, edx
mov r15, rsi
mov rbx, rdi
mov r14, [rdi+18h]
mov rax, [r14+30h]
add rax, 48h ; 'H'
cmp rax, [r14+0D0h]
jbe short loc_F558
mov rdi, r14
call JS_RunGC
mov rax, [r14+30h]
mov rcx, rax
shr rcx, 1
add rcx, rax
mov [r14+0D0h], rcx
loc_F558:
push 48h ; 'H'
pop rsi
mov rdi, rbx
call js_malloc
test rax, rax
jz loc_F6B3
mov r14, rax
mov [rax+6], r12w
mov byte ptr [rax+5], 1
xorps xmm0, xmm0
movups xmmword ptr [rax+28h], xmm0
mov [rax+18h], r15
movsxd rsi, dword ptr [r15+24h]
shl rsi, 4
mov rdi, rbx
call js_malloc
mov [r14+20h], rax
test rax, rax
jz loc_F684
lea ecx, [r12-1]; switch 34 cases
cmp ecx, 21h
ja short def_F5B8; jumptable 000000000000F5B8 default case, cases 3,9,11,13-17,19,20
lea rdx, jpt_F5B8
movsxd rcx, ds:(jpt_F5B8 - 9C404h)[rdx+rcx*4]
add rcx, rdx
jmp rcx; switch jump
loc_F5BA:
or byte ptr [r14+5], 0Ch; jumptable 000000000000F5B8 cases 8,21-32
loc_F5BF:
and qword ptr [r14+38h], 0; jumptable 000000000000F5B8 case 33
and dword ptr [r14+40h], 0
jmp short loc_F5F7; jumptable 000000000000F5B8 case 1
loc_F5CB:
and dword ptr [r14+30h], 0; jumptable 000000000000F5B8 cases 4-7,10,34
mov qword ptr [r14+38h], 3
def_F5B8:
mov rax, [rbx+18h]; jumptable 000000000000F5B8 default case, cases 3,9,11,13-17,19,20
mov rax, [rax+80h]
mov ecx, r12d
imul rcx, 28h ; '('
cmp qword ptr [rax+rcx+20h], 0
jz short loc_F5F7; jumptable 000000000000F5B8 case 1
or byte ptr [r14+5], 4
loc_F5F7:
mov dword ptr [r14], 1; jumptable 000000000000F5B8 case 1
mov rax, [rbx+18h]
mov byte ptr [r14+4], 0
mov rcx, r14
add rcx, 8
lea rdx, [rax+98h]
mov rsi, [rax+98h]
mov [rsi+8], rcx
mov [r14+8], rsi
mov [r14+10h], rdx
mov [rax+98h], rcx
mov [rsp+28h+var_28], r14
push 0FFFFFFFFFFFFFFFFh
loc_F635:
pop rdx
mov rax, [rsp+28h+var_28]
add rsp, 8
pop rbx
pop r12
pop r14
pop r15
retn
loc_F646:
lea rax, [r14+30h]; jumptable 000000000000F5B8 case 18
xorps xmm0, xmm0
movups xmmword ptr [rax], xmm0
jmp short def_F5B8; jumptable 000000000000F5B8 default case, cases 3,9,11,13-17,19,20
loc_F652:
and dword ptr [rax], 0; jumptable 000000000000F5B8 case 12
mov qword ptr [rax+8], 3
jmp short loc_F5F7; jumptable 000000000000F5B8 case 1
loc_F65F:
or byte ptr [r14+5], 0Ch; jumptable 000000000000F5B8 case 2
and qword ptr [r14+38h], 0
and dword ptr [r14+40h], 0
and dword ptr [r14+30h], 0
cmp [rbx+38h], r15
jnz short loc_F6D0
loc_F679:
xorps xmm0, xmm0
movups xmmword ptr [rax], xmm0
jmp loc_F5F7; jumptable 000000000000F5B8 case 1
loc_F684:
mov r12, [rbx+18h]
dec qword ptr [r12+28h]
mov rdi, r14
call qword ptr [r12+20h]
mov rcx, [r12+30h]
mov rdi, [r12+40h]
sub rcx, rax
add rcx, 0FFFFFFFFFFFFFFF8h
mov [r12+30h], rcx
mov rsi, r14
call qword ptr [r12+10h]
loc_F6B3:
mov rdi, [rbx+18h]
mov eax, [r15]
lea ecx, [rax-1]
mov [r15], ecx
cmp eax, 1
jle short loc_F6E3
loc_F6C5:
and dword ptr [rsp+28h+var_28], 0
push 6
jmp loc_F635
loc_F6D0:
push 32h ; '2'
pop rdx
push 0Ah
pop rcx
mov rdi, rbx
mov rsi, r14
call add_property
jmp short loc_F679
loc_F6E3:
mov rsi, r15
call js_free_shape0
jmp short loc_F6C5
|
long long JS_NewObjectFromShape(long long a1, _DWORD *a2, unsigned int a3)
{
long long v3; // rax
long long v6; // r14
long long v7; // rax
long long v8; // r14
long long v9; // rax
long long v10; // rax
long long v11; // rsi
long long v13; // r12
long long v14; // rax
long long v15; // rdi
long long v16; // rdi
int v17; // eax
long long v18; // [rsp+0h] [rbp-28h]
HIDWORD(v18) = HIDWORD(v3);
v6 = *(_QWORD *)(a1 + 24);
if ( (unsigned long long)(*(_QWORD *)(v6 + 48) + 72LL) > *(_QWORD *)(v6 + 208) )
{
JS_RunGC(*(_QWORD *)(a1 + 24));
*(_QWORD *)(v6 + 208) = *(_QWORD *)(v6 + 48) + (*(_QWORD *)(v6 + 48) >> 1);
}
v7 = js_malloc(a1, 72LL);
if ( v7 )
{
v8 = v7;
*(_WORD *)(v7 + 6) = a3;
*(_BYTE *)(v7 + 5) = 1;
*(_OWORD *)(v7 + 40) = 0LL;
*(_QWORD *)(v7 + 24) = a2;
v9 = js_malloc(a1, 16LL * (int)a2[9]);
*(_QWORD *)(v8 + 32) = v9;
if ( v9 )
{
switch ( a3 )
{
case 1u:
break;
case 2u:
*(_BYTE *)(v8 + 5) |= 0xCu;
*(_QWORD *)(v8 + 56) = 0LL;
*(_DWORD *)(v8 + 64) = 0;
*(_DWORD *)(v8 + 48) = 0;
if ( *(_DWORD **)(a1 + 56) != a2 )
v9 = add_property(a1, v8, 50LL, 10LL);
*(_OWORD *)v9 = 0LL;
break;
case 4u:
case 5u:
case 6u:
case 7u:
case 0xAu:
case 0x22u:
*(_DWORD *)(v8 + 48) = 0;
*(_QWORD *)(v8 + 56) = 3LL;
goto LABEL_9;
case 8u:
case 0x15u:
case 0x16u:
case 0x17u:
case 0x18u:
case 0x19u:
case 0x1Au:
case 0x1Bu:
case 0x1Cu:
case 0x1Du:
case 0x1Eu:
case 0x1Fu:
case 0x20u:
*(_BYTE *)(v8 + 5) |= 0xCu;
goto LABEL_7;
case 0xCu:
*(_DWORD *)v9 = 0;
*(_QWORD *)(v9 + 8) = 3LL;
break;
case 0x12u:
*(_OWORD *)(v8 + 48) = 0LL;
goto LABEL_9;
case 0x21u:
LABEL_7:
*(_QWORD *)(v8 + 56) = 0LL;
*(_DWORD *)(v8 + 64) = 0;
break;
default:
LABEL_9:
if ( *(_QWORD *)(*(_QWORD *)(*(_QWORD *)(a1 + 24) + 128LL) + 40LL * a3 + 32) )
*(_BYTE *)(v8 + 5) |= 4u;
break;
}
*(_DWORD *)v8 = 1;
v10 = *(_QWORD *)(a1 + 24);
*(_BYTE *)(v8 + 4) = 0;
v11 = *(_QWORD *)(v10 + 152);
*(_QWORD *)(v11 + 8) = v8 + 8;
*(_QWORD *)(v8 + 8) = v11;
*(_QWORD *)(v8 + 16) = v10 + 152;
*(_QWORD *)(v10 + 152) = v8 + 8;
return v8;
}
v13 = *(_QWORD *)(a1 + 24);
--*(_QWORD *)(v13 + 40);
v14 = (*(long long ( **)(long long))(v13 + 32))(v8);
v15 = *(_QWORD *)(v13 + 64);
*(_QWORD *)(v13 + 48) = *(_QWORD *)(v13 + 48) - v14 - 8;
(*(void ( **)(long long, long long))(v13 + 16))(v15, v8);
}
v16 = *(_QWORD *)(a1 + 24);
v17 = (*a2)--;
if ( v17 <= 1 )
js_free_shape0(v16, a2);
LODWORD(v18) = 0;
return v18;
}
| |||
9,390 |
JS_NewObjectFromShape
|
bluesky950520[P]quickjs/quickjs.c
|
static JSValue JS_NewObjectFromShape(JSContext *ctx, JSShape *sh, JSClassID class_id)
{
JSObject *p;
js_trigger_gc(ctx->rt, sizeof(JSObject));
p = js_malloc(ctx, sizeof(JSObject));
if (unlikely(!p))
goto fail;
p->class_id = class_id;
p->extensible = TRUE;
p->free_mark = 0;
p->is_exotic = 0;
p->fast_array = 0;
p->is_constructor = 0;
p->is_uncatchable_error = 0;
p->tmp_mark = 0;
p->is_HTMLDDA = 0;
p->first_weak_ref = NULL;
p->u.opaque = NULL;
p->shape = sh;
p->prop = js_malloc(ctx, sizeof(JSProperty) * sh->prop_size);
if (unlikely(!p->prop)) {
js_free(ctx, p);
fail:
js_free_shape(ctx->rt, sh);
return JS_EXCEPTION;
}
switch(class_id) {
case JS_CLASS_OBJECT:
break;
case JS_CLASS_ARRAY:
{
JSProperty *pr;
p->is_exotic = 1;
p->fast_array = 1;
p->u.array.u.values = NULL;
p->u.array.count = 0;
p->u.array.u1.size = 0;
/* the length property is always the first one */
if (likely(sh == ctx->array_shape)) {
pr = &p->prop[0];
} else {
/* only used for the first array */
/* cannot fail */
pr = add_property(ctx, p, JS_ATOM_length,
JS_PROP_WRITABLE | JS_PROP_LENGTH);
}
pr->u.value = js_int32(0);
}
break;
case JS_CLASS_C_FUNCTION:
p->prop[0].u.value = JS_UNDEFINED;
break;
case JS_CLASS_ARGUMENTS:
case JS_CLASS_UINT8C_ARRAY:
case JS_CLASS_INT8_ARRAY:
case JS_CLASS_UINT8_ARRAY:
case JS_CLASS_INT16_ARRAY:
case JS_CLASS_UINT16_ARRAY:
case JS_CLASS_INT32_ARRAY:
case JS_CLASS_UINT32_ARRAY:
case JS_CLASS_BIG_INT64_ARRAY:
case JS_CLASS_BIG_UINT64_ARRAY:
case JS_CLASS_FLOAT16_ARRAY:
case JS_CLASS_FLOAT32_ARRAY:
case JS_CLASS_FLOAT64_ARRAY:
p->is_exotic = 1;
p->fast_array = 1;
p->u.array.u.ptr = NULL;
p->u.array.count = 0;
break;
case JS_CLASS_DATAVIEW:
p->u.array.u.ptr = NULL;
p->u.array.count = 0;
break;
case JS_CLASS_NUMBER:
case JS_CLASS_STRING:
case JS_CLASS_BOOLEAN:
case JS_CLASS_SYMBOL:
case JS_CLASS_DATE:
case JS_CLASS_BIG_INT:
p->u.object_data = JS_UNDEFINED;
goto set_exotic;
case JS_CLASS_REGEXP:
p->u.regexp.pattern = NULL;
p->u.regexp.bytecode = NULL;
goto set_exotic;
default:
set_exotic:
if (ctx->rt->class_array[class_id].exotic) {
p->is_exotic = 1;
}
break;
}
p->header.ref_count = 1;
add_gc_object(ctx->rt, &p->header, JS_GC_OBJ_TYPE_JS_OBJECT);
return JS_MKPTR(JS_TAG_OBJECT, p);
}
|
O2
|
c
|
JS_NewObjectFromShape:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movl %edx, %r12d
movq %rsi, %r15
movq %rdi, %rbx
movq 0x18(%rdi), %r14
movq 0x30(%r14), %rax
addq $0x48, %rax
cmpq 0xd0(%r14), %rax
jbe 0x1b13e
movq %r14, %rdi
callq 0x1813d
movq 0x30(%r14), %rax
movq %rax, %rcx
shrq %rcx
addq %rax, %rcx
movq %rcx, 0xd0(%r14)
pushq $0x48
popq %rsi
movq %rbx, %rdi
callq 0x17214
testq %rax, %rax
je 0x1b270
movq %rax, %r14
movw %r12w, 0x6(%rax)
movb $0x1, 0x5(%rax)
xorps %xmm0, %xmm0
movups %xmm0, 0x28(%rax)
movq %r15, 0x18(%rax)
movslq 0x24(%r15), %rsi
shlq $0x4, %rsi
movq %rbx, %rdi
callq 0x17214
movq %rax, 0x20(%r14)
testq %rax, %rax
je 0x1b265
leal -0x1(%r12), %ecx
cmpl $0x21, %ecx
ja 0x1b1be
leaq 0x681f1(%rip), %rdx # 0x83388
movslq (%rdx,%rcx,4), %rcx
addq %rdx, %rcx
jmpq *%rcx
orb $0xc, 0x5(%r14)
andq $0x0, 0x38(%r14)
andl $0x0, 0x40(%r14)
jmp 0x1b1dd
andl $0x0, 0x30(%r14)
movq $0x3, 0x38(%r14)
movq 0x18(%rbx), %rax
movq 0x80(%rax), %rax
movl %r12d, %ecx
imulq $0x28, %rcx, %rcx
cmpq $0x0, 0x20(%rax,%rcx)
je 0x1b1dd
orb $0x4, 0x5(%r14)
movl $0x1, (%r14)
movq 0x18(%rbx), %rax
movb $0x0, 0x4(%r14)
movq %r14, %rcx
addq $0x8, %rcx
leaq 0x98(%rax), %rdx
movq 0x98(%rax), %rsi
movq %rcx, 0x8(%rsi)
movq %rsi, 0x8(%r14)
movq %rdx, 0x10(%r14)
movq %rcx, 0x98(%rax)
pushq $-0x1
popq %rdx
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
leaq 0x30(%r14), %rax
xorps %xmm0, %xmm0
movups %xmm0, (%rax)
jmp 0x1b1be
andl $0x0, (%rax)
movq $0x3, 0x8(%rax)
jmp 0x1b1dd
orb $0xc, 0x5(%r14)
andq $0x0, 0x38(%r14)
andl $0x0, 0x40(%r14)
andl $0x0, 0x30(%r14)
cmpq %r15, 0x38(%rbx)
jne 0x1b284
xorps %xmm0, %xmm0
movups %xmm0, (%rax)
jmp 0x1b1dd
movq %rbx, %rdi
movq %r14, %rsi
callq 0x1726e
movq 0x18(%rbx), %rdi
movq %r15, %rsi
callq 0x34aa8
pushq $0x6
popq %rdx
xorl %r14d, %r14d
jmp 0x1b218
pushq $0x32
popq %rdx
pushq $0xa
popq %rcx
movq %rbx, %rdi
movq %r14, %rsi
callq 0x34d1a
jmp 0x1b25a
|
JS_NewObjectFromShape:
push r15
push r14
push r12
push rbx
push rax
mov r12d, edx
mov r15, rsi
mov rbx, rdi
mov r14, [rdi+18h]
mov rax, [r14+30h]
add rax, 48h ; 'H'
cmp rax, [r14+0D0h]
jbe short loc_1B13E
mov rdi, r14
call JS_RunGC
mov rax, [r14+30h]
mov rcx, rax
shr rcx, 1
add rcx, rax
mov [r14+0D0h], rcx
loc_1B13E:
push 48h ; 'H'
pop rsi
mov rdi, rbx
call js_malloc
test rax, rax
jz loc_1B270
mov r14, rax
mov [rax+6], r12w
mov byte ptr [rax+5], 1
xorps xmm0, xmm0
movups xmmword ptr [rax+28h], xmm0
mov [rax+18h], r15
movsxd rsi, dword ptr [r15+24h]
shl rsi, 4
mov rdi, rbx
call js_malloc
mov [r14+20h], rax
test rax, rax
jz loc_1B265
lea ecx, [r12-1]; switch 34 cases
cmp ecx, 21h
ja short def_1B19E; jumptable 000000000001B19E default case, cases 3,9,11,13-17,19,20
lea rdx, jpt_1B19E
movsxd rcx, ds:(jpt_1B19E - 83388h)[rdx+rcx*4]
add rcx, rdx
jmp rcx; switch jump
loc_1B1A0:
or byte ptr [r14+5], 0Ch; jumptable 000000000001B19E cases 8,21-32
loc_1B1A5:
and qword ptr [r14+38h], 0; jumptable 000000000001B19E case 33
and dword ptr [r14+40h], 0
jmp short loc_1B1DD; jumptable 000000000001B19E case 1
loc_1B1B1:
and dword ptr [r14+30h], 0; jumptable 000000000001B19E cases 4-7,10,34
mov qword ptr [r14+38h], 3
def_1B19E:
mov rax, [rbx+18h]; jumptable 000000000001B19E default case, cases 3,9,11,13-17,19,20
mov rax, [rax+80h]
mov ecx, r12d
imul rcx, 28h ; '('
cmp qword ptr [rax+rcx+20h], 0
jz short loc_1B1DD; jumptable 000000000001B19E case 1
or byte ptr [r14+5], 4
loc_1B1DD:
mov dword ptr [r14], 1; jumptable 000000000001B19E case 1
mov rax, [rbx+18h]
mov byte ptr [r14+4], 0
mov rcx, r14
add rcx, 8
lea rdx, [rax+98h]
mov rsi, [rax+98h]
mov [rsi+8], rcx
mov [r14+8], rsi
mov [r14+10h], rdx
mov [rax+98h], rcx
push 0FFFFFFFFFFFFFFFFh
pop rdx
loc_1B218:
mov rax, r14
add rsp, 8
pop rbx
pop r12
pop r14
pop r15
retn
loc_1B227:
lea rax, [r14+30h]; jumptable 000000000001B19E case 18
xorps xmm0, xmm0
movups xmmword ptr [rax], xmm0
jmp short def_1B19E; jumptable 000000000001B19E default case, cases 3,9,11,13-17,19,20
loc_1B233:
and dword ptr [rax], 0; jumptable 000000000001B19E case 12
mov qword ptr [rax+8], 3
jmp short loc_1B1DD; jumptable 000000000001B19E case 1
loc_1B240:
or byte ptr [r14+5], 0Ch; jumptable 000000000001B19E case 2
and qword ptr [r14+38h], 0
and dword ptr [r14+40h], 0
and dword ptr [r14+30h], 0
cmp [rbx+38h], r15
jnz short loc_1B284
loc_1B25A:
xorps xmm0, xmm0
movups xmmword ptr [rax], xmm0
jmp loc_1B1DD; jumptable 000000000001B19E case 1
loc_1B265:
mov rdi, rbx
mov rsi, r14
call js_free
loc_1B270:
mov rdi, [rbx+18h]
mov rsi, r15
call js_free_shape
push 6
pop rdx
xor r14d, r14d
jmp short loc_1B218
loc_1B284:
push 32h ; '2'
pop rdx
push 0Ah
pop rcx
mov rdi, rbx
mov rsi, r14
call add_property
jmp short loc_1B25A
|
long long JS_NewObjectFromShape(long long a1, long long a2, unsigned int a3)
{
long long v4; // r14
long long v5; // rax
long long v6; // r14
long long v7; // rax
long long v8; // rax
long long v9; // rsi
v4 = *(_QWORD *)(a1 + 24);
if ( (unsigned long long)(*(_QWORD *)(v4 + 48) + 72LL) > *(_QWORD *)(v4 + 208) )
{
JS_RunGC(*(_QWORD *)(a1 + 24));
*(_QWORD *)(v4 + 208) = *(_QWORD *)(v4 + 48) + (*(_QWORD *)(v4 + 48) >> 1);
}
v5 = js_malloc(a1, 72LL);
if ( !v5 )
goto LABEL_19;
v6 = v5;
*(_WORD *)(v5 + 6) = a3;
*(_BYTE *)(v5 + 5) = 1;
*(_OWORD *)(v5 + 40) = 0LL;
*(_QWORD *)(v5 + 24) = a2;
v7 = js_malloc(a1, 16LL * *(int *)(a2 + 36));
*(_QWORD *)(v6 + 32) = v7;
if ( !v7 )
{
js_free(a1, v6);
LABEL_19:
js_free_shape(*(_QWORD *)(a1 + 24), a2);
return 0LL;
}
switch ( a3 )
{
case 1u:
break;
case 2u:
*(_BYTE *)(v6 + 5) |= 0xCu;
*(_QWORD *)(v6 + 56) = 0LL;
*(_DWORD *)(v6 + 64) = 0;
*(_DWORD *)(v6 + 48) = 0;
if ( *(_QWORD *)(a1 + 56) != a2 )
v7 = add_property(a1, v6, 50LL, 10LL);
*(_OWORD *)v7 = 0LL;
break;
case 4u:
case 5u:
case 6u:
case 7u:
case 0xAu:
case 0x22u:
*(_DWORD *)(v6 + 48) = 0;
*(_QWORD *)(v6 + 56) = 3LL;
goto LABEL_9;
case 8u:
case 0x15u:
case 0x16u:
case 0x17u:
case 0x18u:
case 0x19u:
case 0x1Au:
case 0x1Bu:
case 0x1Cu:
case 0x1Du:
case 0x1Eu:
case 0x1Fu:
case 0x20u:
*(_BYTE *)(v6 + 5) |= 0xCu;
goto LABEL_7;
case 0xCu:
*(_DWORD *)v7 = 0;
*(_QWORD *)(v7 + 8) = 3LL;
break;
case 0x12u:
*(_OWORD *)(v6 + 48) = 0LL;
goto LABEL_9;
case 0x21u:
LABEL_7:
*(_QWORD *)(v6 + 56) = 0LL;
*(_DWORD *)(v6 + 64) = 0;
break;
default:
LABEL_9:
if ( *(_QWORD *)(*(_QWORD *)(*(_QWORD *)(a1 + 24) + 128LL) + 40LL * a3 + 32) )
*(_BYTE *)(v6 + 5) |= 4u;
break;
}
*(_DWORD *)v6 = 1;
v8 = *(_QWORD *)(a1 + 24);
*(_BYTE *)(v6 + 4) = 0;
v9 = *(_QWORD *)(v8 + 152);
*(_QWORD *)(v9 + 8) = v6 + 8;
*(_QWORD *)(v6 + 8) = v9;
*(_QWORD *)(v6 + 16) = v8 + 152;
*(_QWORD *)(v8 + 152) = v6 + 8;
return v6;
}
|
JS_NewObjectFromShape:
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
PUSH RAX
MOV R12D,EDX
MOV R15,RSI
MOV RBX,RDI
MOV R14,qword ptr [RDI + 0x18]
MOV RAX,qword ptr [R14 + 0x30]
ADD RAX,0x48
CMP RAX,qword ptr [R14 + 0xd0]
JBE 0x0011b13e
MOV RDI,R14
CALL 0x0011813d
MOV RAX,qword ptr [R14 + 0x30]
MOV RCX,RAX
SHR RCX,0x1
ADD RCX,RAX
MOV qword ptr [R14 + 0xd0],RCX
LAB_0011b13e:
PUSH 0x48
POP RSI
MOV RDI,RBX
CALL 0x00117214
TEST RAX,RAX
JZ 0x0011b270
MOV R14,RAX
MOV word ptr [RAX + 0x6],R12W
MOV byte ptr [RAX + 0x5],0x1
XORPS XMM0,XMM0
MOVUPS xmmword ptr [RAX + 0x28],XMM0
MOV qword ptr [RAX + 0x18],R15
MOVSXD RSI,dword ptr [R15 + 0x24]
SHL RSI,0x4
MOV RDI,RBX
CALL 0x00117214
MOV qword ptr [R14 + 0x20],RAX
TEST RAX,RAX
JZ 0x0011b265
LEA ECX,[R12 + -0x1]
CMP ECX,0x21
JA 0x0011b1be
LEA RDX,[0x183388]
MOVSXD RCX,dword ptr [RDX + RCX*0x4]
ADD RCX,RDX
switchD:
JMP RCX
caseD_8:
OR byte ptr [R14 + 0x5],0xc
caseD_21:
AND qword ptr [R14 + 0x38],0x0
AND dword ptr [R14 + 0x40],0x0
JMP 0x0011b1dd
caseD_4:
AND dword ptr [R14 + 0x30],0x0
MOV qword ptr [R14 + 0x38],0x3
caseD_3:
MOV RAX,qword ptr [RBX + 0x18]
MOV RAX,qword ptr [RAX + 0x80]
MOV ECX,R12D
IMUL RCX,RCX,0x28
CMP qword ptr [RAX + RCX*0x1 + 0x20],0x0
JZ 0x0011b1dd
OR byte ptr [R14 + 0x5],0x4
caseD_1:
MOV dword ptr [R14],0x1
MOV RAX,qword ptr [RBX + 0x18]
MOV byte ptr [R14 + 0x4],0x0
MOV RCX,R14
ADD RCX,0x8
LEA RDX,[RAX + 0x98]
MOV RSI,qword ptr [RAX + 0x98]
MOV qword ptr [RSI + 0x8],RCX
MOV qword ptr [R14 + 0x8],RSI
MOV qword ptr [R14 + 0x10],RDX
MOV qword ptr [RAX + 0x98],RCX
PUSH -0x1
POP RDX
LAB_0011b218:
MOV RAX,R14
ADD RSP,0x8
POP RBX
POP R12
POP R14
POP R15
RET
caseD_12:
LEA RAX,[R14 + 0x30]
XORPS XMM0,XMM0
MOVUPS xmmword ptr [RAX],XMM0
JMP 0x0011b1be
caseD_c:
AND dword ptr [RAX],0x0
MOV qword ptr [RAX + 0x8],0x3
JMP 0x0011b1dd
caseD_2:
OR byte ptr [R14 + 0x5],0xc
AND qword ptr [R14 + 0x38],0x0
AND dword ptr [R14 + 0x40],0x0
AND dword ptr [R14 + 0x30],0x0
CMP qword ptr [RBX + 0x38],R15
JNZ 0x0011b284
LAB_0011b25a:
XORPS XMM0,XMM0
MOVUPS xmmword ptr [RAX],XMM0
JMP 0x0011b1dd
LAB_0011b265:
MOV RDI,RBX
MOV RSI,R14
CALL 0x0011726e
LAB_0011b270:
MOV RDI,qword ptr [RBX + 0x18]
MOV RSI,R15
CALL 0x00134aa8
PUSH 0x6
POP RDX
XOR R14D,R14D
JMP 0x0011b218
LAB_0011b284:
PUSH 0x32
POP RDX
PUSH 0xa
POP RCX
MOV RDI,RBX
MOV RSI,R14
CALL 0x00134d1a
JMP 0x0011b25a
|
int1 [16] JS_NewObjectFromShape(long param_1,long param_2,uint param_3)
{
long lVar1;
long lVar2;
int4 *puVar3;
int8 *puVar4;
int1 auVar5 [16];
int8 uStack_30;
lVar1 = *(long *)(param_1 + 0x18);
if (*(ulong *)(lVar1 + 0xd0) < *(long *)(lVar1 + 0x30) + 0x48U) {
JS_RunGC(lVar1);
*(ulong *)(lVar1 + 0xd0) = (*(ulong *)(lVar1 + 0x30) >> 1) + *(ulong *)(lVar1 + 0x30);
}
puVar3 = (int4 *)js_malloc(param_1,0x48);
if (puVar3 == (int4 *)0x0) {
LAB_0011b270:
js_free_shape(*(int8 *)(param_1 + 0x18),param_2);
uStack_30 = 6;
puVar3 = (int4 *)0x0;
goto LAB_0011b218;
}
*(short *)((long)puVar3 + 6) = (short)param_3;
*(int1 *)((long)puVar3 + 5) = 1;
*(int8 *)(puVar3 + 10) = 0;
*(int8 *)(puVar3 + 0xc) = 0;
*(long *)(puVar3 + 6) = param_2;
puVar4 = (int8 *)js_malloc(param_1,(long)*(int *)(param_2 + 0x24) << 4);
*(int8 **)(puVar3 + 8) = puVar4;
if (puVar4 == (int8 *)0x0) {
js_free(param_1,puVar3);
goto LAB_0011b270;
}
switch(param_3) {
case 1:
break;
case 2:
*(byte *)((long)puVar3 + 5) = *(byte *)((long)puVar3 + 5) | 0xc;
*(int8 *)(puVar3 + 0xe) = 0;
puVar3[0x10] = 0;
puVar3[0xc] = 0;
if (*(long *)(param_1 + 0x38) != param_2) {
puVar4 = (int8 *)add_property(param_1,puVar3,0x32,10);
}
*puVar4 = 0;
puVar4[1] = 0;
break;
default:
goto switchD_0011b19e_caseD_3;
case 4:
case 5:
case 6:
case 7:
case 10:
case 0x22:
puVar3[0xc] = 0;
*(int8 *)(puVar3 + 0xe) = 3;
goto switchD_0011b19e_caseD_3;
case 8:
case 0x15:
case 0x16:
case 0x17:
case 0x18:
case 0x19:
case 0x1a:
case 0x1b:
case 0x1c:
case 0x1d:
case 0x1e:
case 0x1f:
case 0x20:
*(byte *)((long)puVar3 + 5) = *(byte *)((long)puVar3 + 5) | 0xc;
case 0x21:
*(int8 *)(puVar3 + 0xe) = 0;
puVar3[0x10] = 0;
break;
case 0xc:
*(int4 *)puVar4 = 0;
puVar4[1] = 3;
break;
case 0x12:
*(int8 *)(puVar3 + 0xc) = 0;
*(int8 *)(puVar3 + 0xe) = 0;
switchD_0011b19e_caseD_3:
if (*(long *)(*(long *)(*(long *)(param_1 + 0x18) + 0x80) + 0x20 + (ulong)param_3 * 0x28) != 0)
{
*(byte *)((long)puVar3 + 5) = *(byte *)((long)puVar3 + 5) | 4;
}
}
*puVar3 = 1;
lVar1 = *(long *)(param_1 + 0x18);
*(int1 *)(puVar3 + 1) = 0;
lVar2 = *(long *)(lVar1 + 0x98);
*(int4 **)(lVar2 + 8) = puVar3 + 2;
*(long *)(puVar3 + 2) = lVar2;
*(long *)(puVar3 + 4) = lVar1 + 0x98;
*(int4 **)(lVar1 + 0x98) = puVar3 + 2;
uStack_30 = 0xffffffffffffffff;
LAB_0011b218:
auVar5._8_8_ = uStack_30;
auVar5._0_8_ = puVar3;
return auVar5;
}
|
|
9,391 |
nglog::SeverityToColor(nglog::LogSeverity)
|
ng-log[P]ng-log/src/logging.cc
|
static GLogColor SeverityToColor(LogSeverity severity) {
switch (severity) {
case NGLOG_INFO:
return COLOR_DEFAULT;
case NGLOG_WARNING:
return COLOR_YELLOW;
case NGLOG_ERROR:
case NGLOG_FATAL:
return COLOR_RED;
}
// should never get here.
NGLOG_UNREACHABLE;
}
|
O0
|
cpp
|
nglog::SeverityToColor(nglog::LogSeverity):
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movl %edi, -0x8(%rbp)
movl -0x8(%rbp), %eax
movl %eax, -0xc(%rbp)
testl %eax, %eax
je 0x15fee
jmp 0x15fd7
movl -0xc(%rbp), %eax
subl $0x1, %eax
je 0x15ff7
jmp 0x15fe1
movl -0xc(%rbp), %eax
addl $-0x2, %eax
subl $0x2, %eax
jb 0x16000
jmp 0x16009
movl $0x0, -0x4(%rbp)
jmp 0x16028
movl $0x3, -0x4(%rbp)
jmp 0x16028
movl $0x1, -0x4(%rbp)
jmp 0x16028
leaq 0x37bb9(%rip), %rdi # 0x4dbc9
leaq 0x37673(%rip), %rsi # 0x4d68a
movl $0xeb, %edx
leaq 0x37bac(%rip), %rcx # 0x4dbcf
callq 0x94a0
movl -0x4(%rbp), %eax
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
|
_ZN5nglogL15SeverityToColorENS_11LogSeverityE:
push rbp
mov rbp, rsp
sub rsp, 10h
mov [rbp+var_8], edi
mov eax, [rbp+var_8]
mov [rbp+var_C], eax
test eax, eax
jz short loc_15FEE
jmp short $+2
loc_15FD7:
mov eax, [rbp+var_C]
sub eax, 1
jz short loc_15FF7
jmp short $+2
loc_15FE1:
mov eax, [rbp+var_C]
add eax, 0FFFFFFFEh
sub eax, 2
jb short loc_16000
jmp short loc_16009
loc_15FEE:
mov [rbp+var_4], 0
jmp short loc_16028
loc_15FF7:
mov [rbp+var_4], 3
jmp short loc_16028
loc_16000:
mov [rbp+var_4], 1
jmp short loc_16028
loc_16009:
lea rdi, aFalse; "false"
lea rsi, aWorkspaceLlm4b; "/workspace/llm4binary/github/2025_star3"...
mov edx, 0EBh
lea rcx, aGlogcolorNglog; "GLogColor nglog::SeverityToColor(LogSev"...
call ___assert_fail
loc_16028:
mov eax, [rbp+var_4]
add rsp, 10h
pop rbp
retn
|
long long nglog::SeverityToColor(int a1)
{
if ( a1 )
{
if ( a1 == 1 )
{
return 3;
}
else
{
if ( (unsigned int)(a1 - 2) >= 2 )
__assert_fail(
"false",
"/workspace/llm4binary/github/2025_star3/ng-log[P]ng-log/src/logging.cc",
235LL,
"GLogColor nglog::SeverityToColor(LogSeverity)");
return 1;
}
}
else
{
return 0;
}
}
|
SeverityToColor:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x10
MOV dword ptr [RBP + -0x8],EDI
MOV EAX,dword ptr [RBP + -0x8]
MOV dword ptr [RBP + -0xc],EAX
TEST EAX,EAX
JZ 0x00115fee
JMP 0x00115fd7
LAB_00115fd7:
MOV EAX,dword ptr [RBP + -0xc]
SUB EAX,0x1
JZ 0x00115ff7
JMP 0x00115fe1
LAB_00115fe1:
MOV EAX,dword ptr [RBP + -0xc]
ADD EAX,-0x2
SUB EAX,0x2
JC 0x00116000
JMP 0x00116009
LAB_00115fee:
MOV dword ptr [RBP + -0x4],0x0
JMP 0x00116028
LAB_00115ff7:
MOV dword ptr [RBP + -0x4],0x3
JMP 0x00116028
LAB_00116000:
MOV dword ptr [RBP + -0x4],0x1
JMP 0x00116028
LAB_00116009:
LEA RDI,[0x14dbc9]
LEA RSI,[0x14d68a]
MOV EDX,0xeb
LEA RCX,[0x14dbcf]
CALL 0x001094a0
LAB_00116028:
MOV EAX,dword ptr [RBP + -0x4]
ADD RSP,0x10
POP RBP
RET
|
/* nglog::SeverityToColor(nglog::LogSeverity) */
int4 nglog::SeverityToColor(int param_1)
{
int4 local_c;
if (param_1 == 0) {
local_c = 0;
}
else if (param_1 == 1) {
local_c = 3;
}
else {
if (1 < param_1 - 2U) {
/* WARNING: Subroutine does not return */
__assert_fail("false","/workspace/llm4binary/github/2025_star3/ng-log[P]ng-log/src/logging.cc"
,0xeb,"GLogColor nglog::SeverityToColor(LogSeverity)");
}
local_c = 1;
}
return local_c;
}
|
|
9,392 |
common_embd_similarity_cos(float const*, float const*, int)
|
llama.cpp/common/common.cpp
|
float common_embd_similarity_cos(const float * embd1, const float * embd2, int n){
double sum = 0.0;
double sum1 = 0.0;
double sum2 = 0.0;
for (int i = 0; i < n; i++) {
sum += embd1[i] * embd2[i];
sum1 += embd1[i] * embd1[i];
sum2 += embd2[i] * embd2[i];
}
// Handle the case where one or both vectors are zero vectors
if (sum1 == 0.0 || sum2 == 0.0) {
if (sum1 == 0.0 && sum2 == 0.0) {
return 1.0f; // two zero vectors are similar
}
return 0.0f;
}
return sum / (sqrt(sum1) * sqrt(sum2));
}
|
O3
|
cpp
|
common_embd_similarity_cos(float const*, float const*, int):
subq $0x28, %rsp
testl %edx, %edx
jle 0xfd1b7
movl %edx, %eax
xorpd %xmm0, %xmm0
xorpd %xmm4, %xmm4
xorl %ecx, %ecx
movss (%rsi,%rcx,4), %xmm3
movss (%rdi,%rcx,4), %xmm1
movaps %xmm1, %xmm2
shufps $0x0, %xmm1, %xmm2 # xmm2 = xmm2[0,0],xmm1[0,0]
unpcklps %xmm3, %xmm1 # xmm1 = xmm1[0],xmm3[0],xmm1[1],xmm3[1]
mulps %xmm2, %xmm1
cvtps2pd %xmm1, %xmm1
addpd %xmm1, %xmm0
mulss %xmm3, %xmm3
xorps %xmm1, %xmm1
cvtss2sd %xmm3, %xmm1
addsd %xmm1, %xmm4
incq %rcx
cmpq %rcx, %rax
jne 0xfd134
xorps %xmm2, %xmm2
movapd %xmm0, %xmm1
cmpeqsd %xmm2, %xmm1
movq %xmm1, %rax
andl $0x1, %eax
movapd %xmm4, %xmm1
cmpeqsd %xmm2, %xmm1
movq %xmm1, %rcx
andl $0x1, %ecx
ucomisd %xmm2, %xmm0
jne 0xfd196
jnp 0xfd1bb
ucomisd %xmm2, %xmm4
jne 0xfd19e
jnp 0xfd1bb
xorpd %xmm1, %xmm1
ucomisd %xmm1, %xmm0
movapd %xmm0, 0x10(%rsp)
jb 0xfd1cf
xorps %xmm2, %xmm2
sqrtsd %xmm0, %xmm2
jmp 0xfd1e8
movb $0x1, %cl
movb $0x1, %al
testb %cl, %al
jne 0xfd1c5
xorpd %xmm0, %xmm0
jmp 0xfd225
movss 0x16f13(%rip), %xmm0 # 0x1140e0
jmp 0xfd225
movsd %xmm4, 0x8(%rsp)
callq 0x21900
xorpd %xmm1, %xmm1
movsd 0x8(%rsp), %xmm4
movapd %xmm0, %xmm2
ucomisd %xmm1, %xmm4
jb 0xfd1f7
xorps %xmm0, %xmm0
sqrtsd %xmm4, %xmm0
jmp 0xfd20c
movapd %xmm4, %xmm0
movsd %xmm2, 0x8(%rsp)
callq 0x21900
movsd 0x8(%rsp), %xmm2
movapd 0x10(%rsp), %xmm1
mulsd %xmm0, %xmm2
unpckhpd %xmm1, %xmm1 # xmm1 = xmm1[1,1]
divsd %xmm2, %xmm1
xorps %xmm0, %xmm0
cvtsd2ss %xmm1, %xmm0
addq $0x28, %rsp
retq
|
_Z26common_embd_similarity_cosPKfS0_i:
sub rsp, 28h
test edx, edx
jle loc_FD1B7
mov eax, edx
xorpd xmm0, xmm0
xorpd xmm4, xmm4
xor ecx, ecx
loc_FD134:
movss xmm3, dword ptr [rsi+rcx*4]
movss xmm1, dword ptr [rdi+rcx*4]
movaps xmm2, xmm1
shufps xmm2, xmm1, 0
unpcklps xmm1, xmm3
mulps xmm1, xmm2
cvtps2pd xmm1, xmm1
addpd xmm0, xmm1
mulss xmm3, xmm3
xorps xmm1, xmm1
cvtss2sd xmm1, xmm3
addsd xmm4, xmm1
inc rcx
cmp rax, rcx
jnz short loc_FD134
xorps xmm2, xmm2
movapd xmm1, xmm0
cmpeqsd xmm1, xmm2
movq rax, xmm1
and eax, 1
movapd xmm1, xmm4
cmpeqsd xmm1, xmm2
movq rcx, xmm1
and ecx, 1
ucomisd xmm0, xmm2
jnz short loc_FD196
jnp short loc_FD1BB
loc_FD196:
ucomisd xmm4, xmm2
jnz short loc_FD19E
jnp short loc_FD1BB
loc_FD19E:
xorpd xmm1, xmm1
ucomisd xmm0, xmm1
movapd [rsp+28h+var_18], xmm0
jb short loc_FD1CF
xorps xmm2, xmm2
sqrtsd xmm2, xmm0
jmp short loc_FD1E8
loc_FD1B7:
mov cl, 1
mov al, 1
loc_FD1BB:
test al, cl
jnz short loc_FD1C5
xorpd xmm0, xmm0
jmp short loc_FD225
loc_FD1C5:
movss xmm0, cs:dword_1140E0
jmp short loc_FD225
loc_FD1CF:
movsd [rsp+28h+var_20], xmm4
call _sqrt
xorpd xmm1, xmm1
movsd xmm4, [rsp+28h+var_20]
movapd xmm2, xmm0
loc_FD1E8:
ucomisd xmm4, xmm1
jb short loc_FD1F7
xorps xmm0, xmm0
sqrtsd xmm0, xmm4
jmp short loc_FD20C
loc_FD1F7:
movapd xmm0, xmm4
movsd [rsp+28h+var_20], xmm2
call _sqrt
movsd xmm2, [rsp+28h+var_20]
loc_FD20C:
movapd xmm1, [rsp+28h+var_18]
mulsd xmm2, xmm0
unpckhpd xmm1, xmm1
divsd xmm1, xmm2
xorps xmm0, xmm0
cvtsd2ss xmm0, xmm1
loc_FD225:
add rsp, 28h
retn
|
float common_embd_similarity_cos(const float *a1, const float *a2, int a3)
{
__m128d v3; // xmm0
__m128d v4; // xmm4
long long i; // rcx
__m128 v6; // xmm3
char v7; // al
char v8; // cl
double v9; // xmm2_8
double v11; // xmm0_8
double v12; // xmm0_8
double v13; // [rsp+8h] [rbp-20h]
__m128d v14; // [rsp+10h] [rbp-18h]
if ( a3 <= 0 )
{
v8 = 1;
v7 = 1;
LABEL_9:
if ( ((unsigned __int8)v8 & (unsigned __int8)v7) != 0 )
return 1.0;
else
return 0.0;
}
v3 = 0LL;
v4 = 0LL;
for ( i = 0LL; i != a3; ++i )
{
v6 = (__m128)LODWORD(a2[i]);
v3 = _mm_add_pd(
v3,
_mm_cvtps_pd(
_mm_mul_ps(
_mm_unpacklo_ps((__m128)LODWORD(a1[i]), v6),
_mm_shuffle_ps((__m128)LODWORD(a1[i]), (__m128)LODWORD(a1[i]), 0))));
v4.m128d_f64[0] = v4.m128d_f64[0] + (float)(v6.m128_f32[0] * v6.m128_f32[0]);
}
v7 = *(_OWORD *)&_mm_cmpeq_sd(v3, (__m128d)0LL) & 1;
v8 = *(_OWORD *)&_mm_cmpeq_sd(v4, (__m128d)0LL) & 1;
if ( v3.m128d_f64[0] == 0.0 || v4.m128d_f64[0] == 0.0 )
goto LABEL_9;
v14 = v3;
if ( v3.m128d_f64[0] < 0.0 )
{
v13 = v4.m128d_f64[0];
v11 = sqrt(v3.m128d_f64[0]);
v4.m128d_f64[0] = v13;
v9 = v11;
}
else
{
v9 = sqrt(v3.m128d_f64[0]);
}
if ( v4.m128d_f64[0] < 0.0 )
v12 = sqrt(v4.m128d_f64[0]);
else
v12 = sqrt(v4.m128d_f64[0]);
return _mm_unpackhi_pd(v14, v14).m128d_f64[0] / (v9 * v12);
}
|
common_embd_similarity_cos:
SUB RSP,0x28
TEST EDX,EDX
JLE 0x001fd1b7
MOV EAX,EDX
XORPD XMM0,XMM0
XORPD XMM4,XMM4
XOR ECX,ECX
LAB_001fd134:
MOVSS XMM3,dword ptr [RSI + RCX*0x4]
MOVSS XMM1,dword ptr [RDI + RCX*0x4]
MOVAPS XMM2,XMM1
SHUFPS XMM2,XMM1,0x0
UNPCKLPS XMM1,XMM3
MULPS XMM1,XMM2
CVTPS2PD XMM1,XMM1
ADDPD XMM0,XMM1
MULSS XMM3,XMM3
XORPS XMM1,XMM1
CVTSS2SD XMM1,XMM3
ADDSD XMM4,XMM1
INC RCX
CMP RAX,RCX
JNZ 0x001fd134
XORPS XMM2,XMM2
MOVAPD XMM1,XMM0
CMPEQSD XMM1,XMM2
MOVQ RAX,XMM1
AND EAX,0x1
MOVAPD XMM1,XMM4
CMPEQSD XMM1,XMM2
MOVQ RCX,XMM1
AND ECX,0x1
UCOMISD XMM0,XMM2
JNZ 0x001fd196
JNP 0x001fd1bb
LAB_001fd196:
UCOMISD XMM4,XMM2
JNZ 0x001fd19e
JNP 0x001fd1bb
LAB_001fd19e:
XORPD XMM1,XMM1
UCOMISD XMM0,XMM1
MOVAPD xmmword ptr [RSP + 0x10],XMM0
JC 0x001fd1cf
XORPS XMM2,XMM2
SQRTSD XMM2,XMM0
JMP 0x001fd1e8
LAB_001fd1b7:
MOV CL,0x1
MOV AL,0x1
LAB_001fd1bb:
TEST AL,CL
JNZ 0x001fd1c5
XORPD XMM0,XMM0
JMP 0x001fd225
LAB_001fd1c5:
MOVSS XMM0,dword ptr [0x002140e0]
JMP 0x001fd225
LAB_001fd1cf:
MOVSD qword ptr [RSP + 0x8],XMM4
CALL 0x00121900
XORPD XMM1,XMM1
MOVSD XMM4,qword ptr [RSP + 0x8]
MOVAPD XMM2,XMM0
LAB_001fd1e8:
UCOMISD XMM4,XMM1
JC 0x001fd1f7
XORPS XMM0,XMM0
SQRTSD XMM0,XMM4
JMP 0x001fd20c
LAB_001fd1f7:
MOVAPD XMM0,XMM4
MOVSD qword ptr [RSP + 0x8],XMM2
CALL 0x00121900
MOVSD XMM2,qword ptr [RSP + 0x8]
LAB_001fd20c:
MOVAPD XMM1,xmmword ptr [RSP + 0x10]
MULSD XMM2,XMM0
UNPCKHPD XMM1,XMM1
DIVSD XMM1,XMM2
XORPS XMM0,XMM0
CVTSD2SS XMM0,XMM1
LAB_001fd225:
ADD RSP,0x28
RET
|
/* common_embd_similarity_cos(float const*, float const*, int) */
float common_embd_similarity_cos(float *param_1,float *param_2,int param_3)
{
float fVar1;
int1 auVar2 [16];
double dVar3;
bool bVar4;
bool bVar5;
ulong uVar6;
float fVar7;
double dVar8;
double dVar9;
double dStack_10;
if (param_3 < 1) {
bVar5 = true;
bVar4 = true;
}
else {
dVar8 = 0.0;
dVar3 = 0.0;
dVar9 = 0.0;
uVar6 = 0;
do {
fVar7 = param_2[uVar6];
fVar1 = param_1[uVar6];
dVar8 = dVar8 + (double)(fVar1 * fVar1);
dVar3 = dVar3 + (double)(fVar7 * fVar1);
dVar9 = dVar9 + (double)(fVar7 * fVar7);
uVar6 = uVar6 + 1;
} while ((uint)param_3 != uVar6);
bVar4 = dVar8 == 0.0;
bVar5 = dVar9 == 0.0;
if (((dVar8 != 0.0) || (NAN(dVar8))) && ((dVar9 != 0.0 || (NAN(dVar9))))) {
auVar2._8_4_ = SUB84(dVar3,0);
auVar2._0_8_ = dVar8;
auVar2._12_4_ = (int)((ulong)dVar3 >> 0x20);
dStack_10 = auVar2._8_8_;
if (dVar8 < 0.0) {
dVar8 = sqrt(dVar8);
}
else {
dVar8 = SQRT(dVar8);
}
if (dVar9 < 0.0) {
dVar9 = sqrt(dVar9);
}
else {
dVar9 = SQRT(dVar9);
}
return (float)(dStack_10 / (dVar8 * dVar9));
}
}
fVar7 = DAT_002140e0;
if (!(bool)(bVar4 & bVar5)) {
fVar7 = 0.0;
}
return fVar7;
}
|
|
9,393 |
rak_array_deinit
|
fabiosvm[P]rak/src/array.c
|
void rak_array_deinit(RakArray *arr)
{
release_elements(arr);
rak_slice_deinit(&arr->slice);
}
|
O3
|
c
|
rak_array_deinit:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
movslq 0xc(%rdi), %r14
testq %r14, %r14
jle 0x2386
shlq $0x4, %r14
xorl %r15d, %r15d
movq 0x10(%rbx), %rax
movq (%rax,%r15), %rdi
movq 0x8(%rax,%r15), %rsi
callq 0x8235
addq $0x10, %r15
cmpq %r15, %r14
jne 0x236b
movq 0x10(%rbx), %rdi
popq %rbx
popq %r14
popq %r15
jmp 0x7504
|
rak_array_deinit:
push r15
push r14
push rbx
mov rbx, rdi
movsxd r14, dword ptr [rdi+0Ch]
test r14, r14
jle short loc_2386
shl r14, 4
xor r15d, r15d
loc_236B:
mov rax, [rbx+10h]
mov rdi, [rax+r15]
mov rsi, [rax+r15+8]
call rak_value_release
add r15, 10h
cmp r14, r15
jnz short loc_236B
loc_2386:
mov rdi, [rbx+10h]
pop rbx
pop r14
pop r15
jmp rak_memory_free
|
long long rak_array_deinit(long long a1)
{
long long v1; // r14
long long v2; // r14
long long v3; // r15
v1 = *(int *)(a1 + 12);
if ( v1 > 0 )
{
v2 = 16 * v1;
v3 = 0LL;
do
{
rak_value_release(*(_QWORD *)(*(_QWORD *)(a1 + 16) + v3), *(_QWORD *)(*(_QWORD *)(a1 + 16) + v3 + 8));
v3 += 16LL;
}
while ( v2 != v3 );
}
return rak_memory_free(*(_QWORD *)(a1 + 16));
}
|
rak_array_deinit:
PUSH R15
PUSH R14
PUSH RBX
MOV RBX,RDI
MOVSXD R14,dword ptr [RDI + 0xc]
TEST R14,R14
JLE 0x00102386
SHL R14,0x4
XOR R15D,R15D
LAB_0010236b:
MOV RAX,qword ptr [RBX + 0x10]
MOV RDI,qword ptr [RAX + R15*0x1]
MOV RSI,qword ptr [RAX + R15*0x1 + 0x8]
CALL 0x00108235
ADD R15,0x10
CMP R14,R15
JNZ 0x0010236b
LAB_00102386:
MOV RDI,qword ptr [RBX + 0x10]
POP RBX
POP R14
POP R15
JMP 0x00107504
|
void rak_array_deinit(long param_1)
{
int iVar1;
long lVar2;
iVar1 = *(int *)(param_1 + 0xc);
if (0 < (long)iVar1) {
lVar2 = 0;
do {
rak_value_release(*(int8 *)(*(long *)(param_1 + 0x10) + lVar2),
*(int8 *)(*(long *)(param_1 + 0x10) + 8 + lVar2));
lVar2 = lVar2 + 0x10;
} while ((long)iVar1 * 0x10 != lVar2);
}
rak_memory_free(*(void **)(param_1 + 0x10));
return;
}
|
|
9,394 |
flush_partitioned_key_cache_blocks
|
eloqsql/mysys/mf_keycache.c
|
static
int flush_partitioned_key_cache_blocks(PARTITIONED_KEY_CACHE_CB *keycache,
File file, void *file_extra,
enum flush_type type)
{
uint i;
uint partitions= keycache->partitions;
int err= 0;
ulonglong *dirty_part_map= (ulonglong *) file_extra;
DBUG_ENTER("partitioned_flush_key_blocks");
DBUG_PRINT("enter", ("keycache: %p", keycache));
for (i= 0; i < partitions; i++)
{
SIMPLE_KEY_CACHE_CB *partition= keycache->partition_array[i];
if ((type == FLUSH_KEEP || type == FLUSH_FORCE_WRITE) &&
!((*dirty_part_map) & ((ulonglong) 1 << i)))
continue;
err|= MY_TEST(flush_simple_key_cache_blocks(partition, file, 0, type));
}
*dirty_part_map= 0;
DBUG_RETURN(err);
}
|
O0
|
c
|
flush_partitioned_key_cache_blocks:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq %rdx, -0x18(%rbp)
movl %ecx, -0x1c(%rbp)
movq -0x8(%rbp), %rax
movl 0x1c(%rax), %eax
movl %eax, -0x24(%rbp)
movl $0x0, -0x28(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0x30(%rbp)
jmp 0x7c5e1
movl $0x0, -0x20(%rbp)
movl -0x20(%rbp), %eax
cmpl -0x24(%rbp), %eax
jae 0x7c662
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rax
movl -0x20(%rbp), %ecx
movq (%rax,%rcx,8), %rax
movq %rax, -0x38(%rbp)
cmpl $0x0, -0x1c(%rbp)
je 0x7c60f
cmpl $0x3, -0x1c(%rbp)
jne 0x7c62f
movq -0x30(%rbp), %rax
movq (%rax), %rax
movl -0x20(%rbp), %ecx
movl $0x1, %edx
shlq %cl, %rdx
movq %rdx, %rcx
andq %rcx, %rax
cmpq $0x0, %rax
jne 0x7c62f
jmp 0x7c657
movq -0x38(%rbp), %rdi
movl -0xc(%rbp), %esi
movl -0x1c(%rbp), %ecx
xorl %eax, %eax
movl %eax, %edx
callq 0x7aba0
movl %eax, %edx
xorl %eax, %eax
movl $0x1, %ecx
cmpl $0x0, %edx
cmovnel %ecx, %eax
orl -0x28(%rbp), %eax
movl %eax, -0x28(%rbp)
movl -0x20(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x20(%rbp)
jmp 0x7c5e8
movq -0x30(%rbp), %rax
movq $0x0, (%rax)
movl -0x28(%rbp), %eax
movl %eax, -0x3c(%rbp)
movl -0x3c(%rbp), %eax
addq $0x40, %rsp
popq %rbp
retq
nopl (%rax)
|
flush_partitioned_key_cache_blocks:
push rbp
mov rbp, rsp
sub rsp, 40h
mov [rbp+var_8], rdi
mov [rbp+var_C], esi
mov [rbp+var_18], rdx
mov [rbp+var_1C], ecx
mov rax, [rbp+var_8]
mov eax, [rax+1Ch]
mov [rbp+var_24], eax
mov [rbp+var_28], 0
mov rax, [rbp+var_18]
mov [rbp+var_30], rax
jmp short $+2
loc_7C5E1:
mov [rbp+var_20], 0
loc_7C5E8:
mov eax, [rbp+var_20]
cmp eax, [rbp+var_24]
jnb short loc_7C662
mov rax, [rbp+var_8]
mov rax, [rax+8]
mov ecx, [rbp+var_20]
mov rax, [rax+rcx*8]
mov [rbp+var_38], rax
cmp [rbp+var_1C], 0
jz short loc_7C60F
cmp [rbp+var_1C], 3
jnz short loc_7C62F
loc_7C60F:
mov rax, [rbp+var_30]
mov rax, [rax]
mov ecx, [rbp+var_20]
mov edx, 1
shl rdx, cl
mov rcx, rdx
and rax, rcx
cmp rax, 0
jnz short loc_7C62F
jmp short loc_7C657
loc_7C62F:
mov rdi, [rbp+var_38]
mov esi, [rbp+var_C]
mov ecx, [rbp+var_1C]
xor eax, eax
mov edx, eax
call flush_simple_key_cache_blocks
mov edx, eax
xor eax, eax
mov ecx, 1
cmp edx, 0
cmovnz eax, ecx
or eax, [rbp+var_28]
mov [rbp+var_28], eax
loc_7C657:
mov eax, [rbp+var_20]
add eax, 1
mov [rbp+var_20], eax
jmp short loc_7C5E8
loc_7C662:
mov rax, [rbp+var_30]
mov qword ptr [rax], 0
mov eax, [rbp+var_28]
mov [rbp+var_3C], eax
mov eax, [rbp+var_3C]
add rsp, 40h
pop rbp
retn
|
long long flush_partitioned_key_cache_blocks(long long a1, unsigned int a2, _QWORD *a3, unsigned int a4)
{
unsigned int v6; // [rsp+18h] [rbp-28h]
unsigned int v7; // [rsp+1Ch] [rbp-24h]
unsigned int i; // [rsp+20h] [rbp-20h]
v7 = *(_DWORD *)(a1 + 28);
v6 = 0;
for ( i = 0; i < v7; ++i )
{
if ( a4 && a4 != 3 || ((1LL << i) & *a3) != 0 )
v6 |= (unsigned int)flush_simple_key_cache_blocks(*(_QWORD *)(*(_QWORD *)(a1 + 8) + 8LL * i), a2, 0LL, a4) != 0;
}
*a3 = 0LL;
return v6;
}
|
flush_partitioned_key_cache_blocks:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x40
MOV qword ptr [RBP + -0x8],RDI
MOV dword ptr [RBP + -0xc],ESI
MOV qword ptr [RBP + -0x18],RDX
MOV dword ptr [RBP + -0x1c],ECX
MOV RAX,qword ptr [RBP + -0x8]
MOV EAX,dword ptr [RAX + 0x1c]
MOV dword ptr [RBP + -0x24],EAX
MOV dword ptr [RBP + -0x28],0x0
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RBP + -0x30],RAX
JMP 0x0017c5e1
LAB_0017c5e1:
MOV dword ptr [RBP + -0x20],0x0
LAB_0017c5e8:
MOV EAX,dword ptr [RBP + -0x20]
CMP EAX,dword ptr [RBP + -0x24]
JNC 0x0017c662
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX + 0x8]
MOV ECX,dword ptr [RBP + -0x20]
MOV RAX,qword ptr [RAX + RCX*0x8]
MOV qword ptr [RBP + -0x38],RAX
CMP dword ptr [RBP + -0x1c],0x0
JZ 0x0017c60f
CMP dword ptr [RBP + -0x1c],0x3
JNZ 0x0017c62f
LAB_0017c60f:
MOV RAX,qword ptr [RBP + -0x30]
MOV RAX,qword ptr [RAX]
MOV ECX,dword ptr [RBP + -0x20]
MOV EDX,0x1
SHL RDX,CL
MOV RCX,RDX
AND RAX,RCX
CMP RAX,0x0
JNZ 0x0017c62f
JMP 0x0017c657
LAB_0017c62f:
MOV RDI,qword ptr [RBP + -0x38]
MOV ESI,dword ptr [RBP + -0xc]
MOV ECX,dword ptr [RBP + -0x1c]
XOR EAX,EAX
MOV EDX,EAX
CALL 0x0017aba0
MOV EDX,EAX
XOR EAX,EAX
MOV ECX,0x1
CMP EDX,0x0
CMOVNZ EAX,ECX
OR EAX,dword ptr [RBP + -0x28]
MOV dword ptr [RBP + -0x28],EAX
LAB_0017c657:
MOV EAX,dword ptr [RBP + -0x20]
ADD EAX,0x1
MOV dword ptr [RBP + -0x20],EAX
JMP 0x0017c5e8
LAB_0017c662:
MOV RAX,qword ptr [RBP + -0x30]
MOV qword ptr [RAX],0x0
MOV EAX,dword ptr [RBP + -0x28]
MOV dword ptr [RBP + -0x3c],EAX
MOV EAX,dword ptr [RBP + -0x3c]
ADD RSP,0x40
POP RBP
RET
|
byte flush_partitioned_key_cache_blocks(long param_1,int4 param_2,ulong *param_3,int param_4)
{
uint uVar1;
byte bVar2;
int iVar3;
uint local_28;
uVar1 = *(uint *)(param_1 + 0x1c);
bVar2 = 0;
for (local_28 = 0; local_28 < uVar1; local_28 = local_28 + 1) {
if (((param_4 != 0) && (param_4 != 3)) || ((*param_3 & 1L << ((byte)local_28 & 0x3f)) != 0)) {
iVar3 = flush_simple_key_cache_blocks
(*(int8 *)(*(long *)(param_1 + 8) + (ulong)local_28 * 8),param_2,0,
param_4);
bVar2 = iVar3 != 0 | bVar2;
}
}
*param_3 = 0;
return bVar2;
}
|
|
9,395 |
my_strxfrm_pad_nweights_unicode
|
eloqsql/strings/ctype-utf8.c
|
size_t
my_strxfrm_pad_nweights_unicode(uchar *str, uchar *strend, size_t nweights)
{
uchar *str0;
DBUG_ASSERT(str && str <= strend);
for (str0= str; str < strend && nweights; nweights--)
{
*str++= 0x00;
if (str < strend)
*str++= 0x20;
}
return str - str0;
}
|
O0
|
c
|
my_strxfrm_pad_nweights_unicode:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
jmp 0x64682
movq -0x8(%rbp), %rax
movq %rax, -0x20(%rbp)
movq -0x8(%rbp), %rcx
xorl %eax, %eax
cmpq -0x10(%rbp), %rcx
movb %al, -0x21(%rbp)
jae 0x646a4
cmpq $0x0, -0x18(%rbp)
setne %al
movb %al, -0x21(%rbp)
movb -0x21(%rbp), %al
testb $0x1, %al
jne 0x646ad
jmp 0x646eb
movq -0x8(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x8(%rbp)
movb $0x0, (%rax)
movq -0x8(%rbp), %rax
cmpq -0x10(%rbp), %rax
jae 0x646db
movq -0x8(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x8(%rbp)
movb $0x20, (%rax)
jmp 0x646dd
movq -0x18(%rbp), %rax
addq $-0x1, %rax
movq %rax, -0x18(%rbp)
jmp 0x6468a
movq -0x8(%rbp), %rax
movq -0x20(%rbp), %rcx
subq %rcx, %rax
popq %rbp
retq
nopl (%rax,%rax)
|
my_strxfrm_pad_nweights_unicode:
push rbp
mov rbp, rsp
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov [rbp+var_18], rdx
jmp short $+2
loc_64682:
mov rax, [rbp+var_8]
mov [rbp+var_20], rax
loc_6468A:
mov rcx, [rbp+var_8]
xor eax, eax
cmp rcx, [rbp+var_10]
mov [rbp+var_21], al
jnb short loc_646A4
cmp [rbp+var_18], 0
setnz al
mov [rbp+var_21], al
loc_646A4:
mov al, [rbp+var_21]
test al, 1
jnz short loc_646AD
jmp short loc_646EB
loc_646AD:
mov rax, [rbp+var_8]
mov rcx, rax
add rcx, 1
mov [rbp+var_8], rcx
mov byte ptr [rax], 0
mov rax, [rbp+var_8]
cmp rax, [rbp+var_10]
jnb short loc_646DB
mov rax, [rbp+var_8]
mov rcx, rax
add rcx, 1
mov [rbp+var_8], rcx
mov byte ptr [rax], 20h ; ' '
loc_646DB:
jmp short $+2
loc_646DD:
mov rax, [rbp+var_18]
add rax, 0FFFFFFFFFFFFFFFFh
mov [rbp+var_18], rax
jmp short loc_6468A
loc_646EB:
mov rax, [rbp+var_8]
mov rcx, [rbp+var_20]
sub rax, rcx
pop rbp
retn
|
_BYTE * my_strxfrm_pad_nweights_unicode(_BYTE *a1, unsigned long long a2, long long a3)
{
_BYTE *v3; // rax
_BYTE *v4; // rax
bool v6; // [rsp+1h] [rbp-21h]
_BYTE *v8; // [rsp+1Ah] [rbp-8h]
v8 = a1;
while ( 1 )
{
v6 = 0;
if ( (unsigned long long)v8 < a2 )
v6 = a3 != 0;
if ( !v6 )
break;
v3 = v8++;
*v3 = 0;
if ( (unsigned long long)v8 < a2 )
{
v4 = v8++;
*v4 = 32;
}
--a3;
}
return (_BYTE *)(v8 - a1);
}
|
my_strxfrm_pad_nweights_unicode:
PUSH RBP
MOV RBP,RSP
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV qword ptr [RBP + -0x18],RDX
JMP 0x00164682
LAB_00164682:
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RBP + -0x20],RAX
LAB_0016468a:
MOV RCX,qword ptr [RBP + -0x8]
XOR EAX,EAX
CMP RCX,qword ptr [RBP + -0x10]
MOV byte ptr [RBP + -0x21],AL
JNC 0x001646a4
CMP qword ptr [RBP + -0x18],0x0
SETNZ AL
MOV byte ptr [RBP + -0x21],AL
LAB_001646a4:
MOV AL,byte ptr [RBP + -0x21]
TEST AL,0x1
JNZ 0x001646ad
JMP 0x001646eb
LAB_001646ad:
MOV RAX,qword ptr [RBP + -0x8]
MOV RCX,RAX
ADD RCX,0x1
MOV qword ptr [RBP + -0x8],RCX
MOV byte ptr [RAX],0x0
MOV RAX,qword ptr [RBP + -0x8]
CMP RAX,qword ptr [RBP + -0x10]
JNC 0x001646db
MOV RAX,qword ptr [RBP + -0x8]
MOV RCX,RAX
ADD RCX,0x1
MOV qword ptr [RBP + -0x8],RCX
MOV byte ptr [RAX],0x20
LAB_001646db:
JMP 0x001646dd
LAB_001646dd:
MOV RAX,qword ptr [RBP + -0x18]
ADD RAX,-0x1
MOV qword ptr [RBP + -0x18],RAX
JMP 0x0016468a
LAB_001646eb:
MOV RAX,qword ptr [RBP + -0x8]
MOV RCX,qword ptr [RBP + -0x20]
SUB RAX,RCX
POP RBP
RET
|
long my_strxfrm_pad_nweights_unicode(int1 *param_1,int1 *param_2,long param_3)
{
int1 *puVar1;
long local_20;
int1 *local_10;
local_10 = param_1;
for (local_20 = param_3; local_10 < param_2 && local_20 != 0; local_20 = local_20 + -1) {
puVar1 = local_10 + 1;
*local_10 = 0;
if (puVar1 < param_2) {
*puVar1 = 0x20;
puVar1 = local_10 + 2;
}
local_10 = puVar1;
}
return (long)local_10 - (long)param_1;
}
|
|
9,396 |
check_hex
|
corpus-core[P]colibri-stateless/src/util/json_validate.c
|
static const char* check_hex(json_t val, int len, bool isuint, const char* error_prefix) {
if (val.type != JSON_TYPE_STRING) ERROR("%sExpected hex string", error_prefix);
if (val.start[1] != '0' && val.start[2] != 'x') ERROR("%sExpected hex prefixed (0x) string", error_prefix);
int l = 0;
for (int i = 3; i < val.len - 1; i++, l++) {
if (!isxdigit(val.start[i])) ERROR("%sExpected hex string", error_prefix);
}
if (len > 0 && (l % 2 || l / 2 != len)) ERROR("%sExpected hex string with fixed size (%d) but got %d bytes", error_prefix, len, l / 2);
if (isuint && (l == 0 || (val.start[3] == '0' && l > 1)))
ERROR("%sno leading zeros allowed for uint", error_prefix);
if (isuint && l / 2 > 32) ERROR("%sexpected uint with max 32 bytes length, but got %d bytes ", error_prefix, l / 2);
if (len < 0 && l / 2 > (-len)) ERROR("%sexpected uint with max %d bytes length, but got %d bytes ", error_prefix, -len, l / 2);
return NULL;
}
|
O0
|
c
|
check_hex:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movb %sil, %cl
leaq 0x10(%rbp), %rax
movq %rax, -0x28(%rbp)
movl %edi, -0xc(%rbp)
andb $0x1, %cl
movb %cl, -0xd(%rbp)
movq %rdx, -0x18(%rbp)
cmpl $0x1, 0x10(%rax)
je 0xa6fb5
movq -0x18(%rbp), %rdx
xorl %eax, %eax
movl %eax, %edi
leaq 0x40fac(%rip), %rsi # 0xe7f51
movb $0x0, %al
callq 0x9ebf0
movq %rax, -0x8(%rbp)
jmp 0xa71b3
movq -0x28(%rbp), %rax
movq (%rax), %rax
movsbl 0x1(%rax), %eax
cmpl $0x30, %eax
je 0xa6ff4
movq -0x28(%rbp), %rax
movq (%rax), %rax
movsbl 0x2(%rax), %eax
cmpl $0x78, %eax
je 0xa6ff4
movq -0x18(%rbp), %rdx
xorl %eax, %eax
movl %eax, %edi
leaq 0x40f83(%rip), %rsi # 0xe7f67
movb $0x0, %al
callq 0x9ebf0
movq %rax, -0x8(%rbp)
jmp 0xa71b3
movl $0x0, -0x1c(%rbp)
movl $0x3, -0x20(%rbp)
movq -0x28(%rbp), %rcx
movslq -0x20(%rbp), %rax
movq 0x8(%rcx), %rcx
subq $0x1, %rcx
cmpq %rcx, %rax
jae 0xa7074
callq 0x230f0
movq -0x28(%rbp), %rcx
movq (%rax), %rax
movq (%rcx), %rcx
movslq -0x20(%rbp), %rdx
movsbl (%rcx,%rdx), %ecx
movslq %ecx, %rcx
movzwl (%rax,%rcx,2), %eax
andl $0x1000, %eax # imm = 0x1000
cmpl $0x0, %eax
jne 0xa705e
movq -0x18(%rbp), %rdx
xorl %eax, %eax
movl %eax, %edi
leaq 0x40f03(%rip), %rsi # 0xe7f51
movb $0x0, %al
callq 0x9ebf0
movq %rax, -0x8(%rbp)
jmp 0xa71b3
jmp 0xa7060
movl -0x20(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x20(%rbp)
movl -0x1c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1c(%rbp)
jmp 0xa7002
cmpl $0x0, -0xc(%rbp)
jle 0xa70d2
movl -0x1c(%rbp), %eax
movl $0x2, %ecx
cltd
idivl %ecx
cmpl $0x0, %edx
jne 0xa709a
movl -0x1c(%rbp), %eax
movl $0x2, %ecx
cltd
idivl %ecx
cmpl -0xc(%rbp), %eax
je 0xa70d2
movq -0x18(%rbp), %rax
movq %rax, -0x30(%rbp)
movl -0xc(%rbp), %ecx
movl -0x1c(%rbp), %eax
movl $0x2, %esi
cltd
idivl %esi
movq -0x30(%rbp), %rdx
movl %eax, %r8d
xorl %eax, %eax
movl %eax, %edi
leaq 0x40ec9(%rip), %rsi # 0xe7f8b
movb $0x0, %al
callq 0x9ebf0
movq %rax, -0x8(%rbp)
jmp 0xa71b3
testb $0x1, -0xd(%rbp)
je 0xa7113
cmpl $0x0, -0x1c(%rbp)
je 0xa70f4
movq -0x28(%rbp), %rax
movq (%rax), %rax
movsbl 0x3(%rax), %eax
cmpl $0x30, %eax
jne 0xa7113
cmpl $0x1, -0x1c(%rbp)
jle 0xa7113
movq -0x18(%rbp), %rdx
xorl %eax, %eax
movl %eax, %edi
leaq 0x40ec4(%rip), %rsi # 0xe7fc7
movb $0x0, %al
callq 0x9ebf0
movq %rax, -0x8(%rbp)
jmp 0xa71b3
testb $0x1, -0xd(%rbp)
je 0xa715a
movl -0x1c(%rbp), %eax
movl $0x2, %ecx
cltd
idivl %ecx
cmpl $0x20, %eax
jle 0xa715a
movq -0x18(%rbp), %rax
movq %rax, -0x38(%rbp)
movl -0x1c(%rbp), %eax
movl $0x2, %ecx
cltd
idivl %ecx
movq -0x38(%rbp), %rdx
movl %eax, %ecx
xorl %eax, %eax
movl %eax, %edi
leaq 0x40e9e(%rip), %rsi # 0xe7feb
movb $0x0, %al
callq 0x9ebf0
movq %rax, -0x8(%rbp)
jmp 0xa71b3
cmpl $0x0, -0xc(%rbp)
jge 0xa71ab
movl -0x1c(%rbp), %eax
movl $0x2, %ecx
cltd
idivl %ecx
xorl %ecx, %ecx
subl -0xc(%rbp), %ecx
cmpl %ecx, %eax
jle 0xa71ab
movq -0x18(%rbp), %rax
movq %rax, -0x40(%rbp)
xorl %ecx, %ecx
subl -0xc(%rbp), %ecx
movl -0x1c(%rbp), %eax
movl $0x2, %esi
cltd
idivl %esi
movq -0x40(%rbp), %rdx
movl %eax, %r8d
xorl %eax, %eax
movl %eax, %edi
leaq 0x40e89(%rip), %rsi # 0xe8027
movb $0x0, %al
callq 0x9ebf0
movq %rax, -0x8(%rbp)
jmp 0xa71b3
movq $0x0, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x40, %rsp
popq %rbp
retq
nopl (%rax)
|
check_hex:
push rbp
mov rbp, rsp
sub rsp, 40h
mov cl, sil
lea rax, [rbp+arg_0]
mov [rbp+var_28], rax
mov [rbp+var_C], edi
and cl, 1
mov [rbp+var_D], cl
mov [rbp+var_18], rdx
cmp dword ptr [rax+10h], 1
jz short loc_A6FB5
mov rdx, [rbp+var_18]
xor eax, eax
mov edi, eax
lea rsi, aSexpectedHexSt; "%sExpected hex string"
mov al, 0
call bprintf
mov [rbp+var_8], rax
jmp loc_A71B3
loc_A6FB5:
mov rax, [rbp+var_28]
mov rax, [rax]
movsx eax, byte ptr [rax+1]
cmp eax, 30h ; '0'
jz short loc_A6FF4
mov rax, [rbp+var_28]
mov rax, [rax]
movsx eax, byte ptr [rax+2]
cmp eax, 78h ; 'x'
jz short loc_A6FF4
mov rdx, [rbp+var_18]
xor eax, eax
mov edi, eax
lea rsi, aSexpectedHexPr; "%sExpected hex prefixed (0x) string"
mov al, 0
call bprintf
mov [rbp+var_8], rax
jmp loc_A71B3
loc_A6FF4:
mov [rbp+var_1C], 0
mov [rbp+var_20], 3
loc_A7002:
mov rcx, [rbp+var_28]
movsxd rax, [rbp+var_20]
mov rcx, [rcx+8]
sub rcx, 1
cmp rax, rcx
jnb short loc_A7074
call ___ctype_b_loc
mov rcx, [rbp+var_28]
mov rax, [rax]
mov rcx, [rcx]
movsxd rdx, [rbp+var_20]
movsx ecx, byte ptr [rcx+rdx]
movsxd rcx, ecx
movzx eax, word ptr [rax+rcx*2]
and eax, 1000h
cmp eax, 0
jnz short loc_A705E
mov rdx, [rbp+var_18]
xor eax, eax
mov edi, eax
lea rsi, aSexpectedHexSt; "%sExpected hex string"
mov al, 0
call bprintf
mov [rbp+var_8], rax
jmp loc_A71B3
loc_A705E:
jmp short $+2
loc_A7060:
mov eax, [rbp+var_20]
add eax, 1
mov [rbp+var_20], eax
mov eax, [rbp+var_1C]
add eax, 1
mov [rbp+var_1C], eax
jmp short loc_A7002
loc_A7074:
cmp [rbp+var_C], 0
jle short loc_A70D2
mov eax, [rbp+var_1C]
mov ecx, 2
cdq
idiv ecx
cmp edx, 0
jnz short loc_A709A
mov eax, [rbp+var_1C]
mov ecx, 2
cdq
idiv ecx
cmp eax, [rbp+var_C]
jz short loc_A70D2
loc_A709A:
mov rax, [rbp+var_18]
mov [rbp+var_30], rax
mov ecx, [rbp+var_C]
mov eax, [rbp+var_1C]
mov esi, 2
cdq
idiv esi
mov rdx, [rbp+var_30]
mov r8d, eax
xor eax, eax
mov edi, eax
lea rsi, aSexpectedHexSt_0; "%sExpected hex string with fixed size ("...
mov al, 0
call bprintf
mov [rbp+var_8], rax
jmp loc_A71B3
loc_A70D2:
test [rbp+var_D], 1
jz short loc_A7113
cmp [rbp+var_1C], 0
jz short loc_A70F4
mov rax, [rbp+var_28]
mov rax, [rax]
movsx eax, byte ptr [rax+3]
cmp eax, 30h ; '0'
jnz short loc_A7113
cmp [rbp+var_1C], 1
jle short loc_A7113
loc_A70F4:
mov rdx, [rbp+var_18]
xor eax, eax
mov edi, eax
lea rsi, aSnoLeadingZero; "%sno leading zeros allowed for uint"
mov al, 0
call bprintf
mov [rbp+var_8], rax
jmp loc_A71B3
loc_A7113:
test [rbp+var_D], 1
jz short loc_A715A
mov eax, [rbp+var_1C]
mov ecx, 2
cdq
idiv ecx
cmp eax, 20h ; ' '
jle short loc_A715A
mov rax, [rbp+var_18]
mov [rbp+var_38], rax
mov eax, [rbp+var_1C]
mov ecx, 2
cdq
idiv ecx
mov rdx, [rbp+var_38]
mov ecx, eax
xor eax, eax
mov edi, eax
lea rsi, aSexpectedUintW; "%sexpected uint with max 32 bytes lengt"...
mov al, 0
call bprintf
mov [rbp+var_8], rax
jmp short loc_A71B3
loc_A715A:
cmp [rbp+var_C], 0
jge short loc_A71AB
mov eax, [rbp+var_1C]
mov ecx, 2
cdq
idiv ecx
xor ecx, ecx
sub ecx, [rbp+var_C]
cmp eax, ecx
jle short loc_A71AB
mov rax, [rbp+var_18]
mov [rbp+var_40], rax
xor ecx, ecx
sub ecx, [rbp+var_C]
mov eax, [rbp+var_1C]
mov esi, 2
cdq
idiv esi
mov rdx, [rbp+var_40]
mov r8d, eax
xor eax, eax
mov edi, eax
lea rsi, aSexpectedUintW_0; "%sexpected uint with max %d bytes lengt"...
mov al, 0
call bprintf
mov [rbp+var_8], rax
jmp short loc_A71B3
loc_A71AB:
mov [rbp+var_8], 0
loc_A71B3:
mov rax, [rbp+var_8]
add rsp, 40h
pop rbp
retn
|
long long check_hex(
int a1,
char a2,
long long a3,
long long a4,
long long a5,
long long a6,
__m128 a7,
__m128 a8,
__m128 a9,
__m128 a10,
__m128 a11,
__m128 a12,
__m128 a13,
__m128 a14,
_BYTE *a15,
long long a16,
int a17)
{
long long v17; // rcx
_QWORD *v18; // rax
char v20; // [rsp+0h] [rbp-40h]
int i; // [rsp+20h] [rbp-20h]
int v22; // [rsp+24h] [rbp-1Ch]
LOBYTE(a4) = a2 & 1;
if ( a17 != 1 )
return bprintf(0LL, (long long)"%sExpected hex string", a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, v20);
if ( a15[1] != 48 && a15[2] != 120 )
return bprintf(
0LL,
(long long)"%sExpected hex prefixed (0x) string",
a3,
a4,
a5,
a6,
a7,
a8,
a9,
a10,
a11,
a12,
a13,
a14,
v20);
v22 = 0;
for ( i = 3; ; ++i )
{
v17 = a16 - 1;
if ( i >= (unsigned long long)(a16 - 1) )
break;
v18 = (_QWORD *)__ctype_b_loc();
a4 = (char)a15[i];
if ( (*(_WORD *)(*v18 + 2 * a4) & 0x1000) == 0 )
return bprintf(0LL, (long long)"%sExpected hex string", a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, v20);
++v22;
}
if ( a1 > 0 )
{
if ( v22 % 2 )
return bprintf(
0LL,
(long long)"%sExpected hex string with fixed size (%d) but got %d bytes",
a3,
(unsigned int)a1,
(unsigned int)(v22 / 2),
a6,
a7,
a8,
a9,
a10,
a11,
a12,
a13,
a14,
v20);
v17 = 2LL;
if ( v22 / 2 != a1 )
return bprintf(
0LL,
(long long)"%sExpected hex string with fixed size (%d) but got %d bytes",
a3,
(unsigned int)a1,
(unsigned int)(v22 / 2),
a6,
a7,
a8,
a9,
a10,
a11,
a12,
a13,
a14,
v20);
}
if ( (a2 & 1) != 0 && (!v22 || a15[3] == 48 && v22 > 1) )
return bprintf(
0LL,
(long long)"%sno leading zeros allowed for uint",
a3,
v17,
a5,
a6,
a7,
a8,
a9,
a10,
a11,
a12,
a13,
a14,
v20);
if ( (a2 & 1) != 0 && v22 / 2 > 32 )
return bprintf(
0LL,
(long long)"%sexpected uint with max 32 bytes length, but got %d bytes ",
a3,
(unsigned int)(v22 / 2),
a5,
a6,
a7,
a8,
a9,
a10,
a11,
a12,
a13,
a14,
v20);
if ( a1 >= 0 || v22 / 2 <= -a1 )
return 0LL;
return bprintf(
0LL,
(long long)"%sexpected uint with max %d bytes length, but got %d bytes ",
a3,
(unsigned int)-a1,
(unsigned int)(v22 / 2),
a6,
a7,
a8,
a9,
a10,
a11,
a12,
a13,
a14,
a3);
}
|
check_hex:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x40
MOV CL,SIL
LEA RAX,[RBP + 0x10]
MOV qword ptr [RBP + -0x28],RAX
MOV dword ptr [RBP + -0xc],EDI
AND CL,0x1
MOV byte ptr [RBP + -0xd],CL
MOV qword ptr [RBP + -0x18],RDX
CMP dword ptr [RAX + 0x10],0x1
JZ 0x001a6fb5
MOV RDX,qword ptr [RBP + -0x18]
XOR EAX,EAX
MOV EDI,EAX
LEA RSI,[0x1e7f51]
MOV AL,0x0
CALL 0x0019ebf0
MOV qword ptr [RBP + -0x8],RAX
JMP 0x001a71b3
LAB_001a6fb5:
MOV RAX,qword ptr [RBP + -0x28]
MOV RAX,qword ptr [RAX]
MOVSX EAX,byte ptr [RAX + 0x1]
CMP EAX,0x30
JZ 0x001a6ff4
MOV RAX,qword ptr [RBP + -0x28]
MOV RAX,qword ptr [RAX]
MOVSX EAX,byte ptr [RAX + 0x2]
CMP EAX,0x78
JZ 0x001a6ff4
MOV RDX,qword ptr [RBP + -0x18]
XOR EAX,EAX
MOV EDI,EAX
LEA RSI,[0x1e7f67]
MOV AL,0x0
CALL 0x0019ebf0
MOV qword ptr [RBP + -0x8],RAX
JMP 0x001a71b3
LAB_001a6ff4:
MOV dword ptr [RBP + -0x1c],0x0
MOV dword ptr [RBP + -0x20],0x3
LAB_001a7002:
MOV RCX,qword ptr [RBP + -0x28]
MOVSXD RAX,dword ptr [RBP + -0x20]
MOV RCX,qword ptr [RCX + 0x8]
SUB RCX,0x1
CMP RAX,RCX
JNC 0x001a7074
CALL 0x001230f0
MOV RCX,qword ptr [RBP + -0x28]
MOV RAX,qword ptr [RAX]
MOV RCX,qword ptr [RCX]
MOVSXD RDX,dword ptr [RBP + -0x20]
MOVSX ECX,byte ptr [RCX + RDX*0x1]
MOVSXD RCX,ECX
MOVZX EAX,word ptr [RAX + RCX*0x2]
AND EAX,0x1000
CMP EAX,0x0
JNZ 0x001a705e
MOV RDX,qword ptr [RBP + -0x18]
XOR EAX,EAX
MOV EDI,EAX
LEA RSI,[0x1e7f51]
MOV AL,0x0
CALL 0x0019ebf0
MOV qword ptr [RBP + -0x8],RAX
JMP 0x001a71b3
LAB_001a705e:
JMP 0x001a7060
LAB_001a7060:
MOV EAX,dword ptr [RBP + -0x20]
ADD EAX,0x1
MOV dword ptr [RBP + -0x20],EAX
MOV EAX,dword ptr [RBP + -0x1c]
ADD EAX,0x1
MOV dword ptr [RBP + -0x1c],EAX
JMP 0x001a7002
LAB_001a7074:
CMP dword ptr [RBP + -0xc],0x0
JLE 0x001a70d2
MOV EAX,dword ptr [RBP + -0x1c]
MOV ECX,0x2
CDQ
IDIV ECX
CMP EDX,0x0
JNZ 0x001a709a
MOV EAX,dword ptr [RBP + -0x1c]
MOV ECX,0x2
CDQ
IDIV ECX
CMP EAX,dword ptr [RBP + -0xc]
JZ 0x001a70d2
LAB_001a709a:
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RBP + -0x30],RAX
MOV ECX,dword ptr [RBP + -0xc]
MOV EAX,dword ptr [RBP + -0x1c]
MOV ESI,0x2
CDQ
IDIV ESI
MOV RDX,qword ptr [RBP + -0x30]
MOV R8D,EAX
XOR EAX,EAX
MOV EDI,EAX
LEA RSI,[0x1e7f8b]
MOV AL,0x0
CALL 0x0019ebf0
MOV qword ptr [RBP + -0x8],RAX
JMP 0x001a71b3
LAB_001a70d2:
TEST byte ptr [RBP + -0xd],0x1
JZ 0x001a7113
CMP dword ptr [RBP + -0x1c],0x0
JZ 0x001a70f4
MOV RAX,qword ptr [RBP + -0x28]
MOV RAX,qword ptr [RAX]
MOVSX EAX,byte ptr [RAX + 0x3]
CMP EAX,0x30
JNZ 0x001a7113
CMP dword ptr [RBP + -0x1c],0x1
JLE 0x001a7113
LAB_001a70f4:
MOV RDX,qword ptr [RBP + -0x18]
XOR EAX,EAX
MOV EDI,EAX
LEA RSI,[0x1e7fc7]
MOV AL,0x0
CALL 0x0019ebf0
MOV qword ptr [RBP + -0x8],RAX
JMP 0x001a71b3
LAB_001a7113:
TEST byte ptr [RBP + -0xd],0x1
JZ 0x001a715a
MOV EAX,dword ptr [RBP + -0x1c]
MOV ECX,0x2
CDQ
IDIV ECX
CMP EAX,0x20
JLE 0x001a715a
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RBP + -0x38],RAX
MOV EAX,dword ptr [RBP + -0x1c]
MOV ECX,0x2
CDQ
IDIV ECX
MOV RDX,qword ptr [RBP + -0x38]
MOV ECX,EAX
XOR EAX,EAX
MOV EDI,EAX
LEA RSI,[0x1e7feb]
MOV AL,0x0
CALL 0x0019ebf0
MOV qword ptr [RBP + -0x8],RAX
JMP 0x001a71b3
LAB_001a715a:
CMP dword ptr [RBP + -0xc],0x0
JGE 0x001a71ab
MOV EAX,dword ptr [RBP + -0x1c]
MOV ECX,0x2
CDQ
IDIV ECX
XOR ECX,ECX
SUB ECX,dword ptr [RBP + -0xc]
CMP EAX,ECX
JLE 0x001a71ab
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RBP + -0x40],RAX
XOR ECX,ECX
SUB ECX,dword ptr [RBP + -0xc]
MOV EAX,dword ptr [RBP + -0x1c]
MOV ESI,0x2
CDQ
IDIV ESI
MOV RDX,qword ptr [RBP + -0x40]
MOV R8D,EAX
XOR EAX,EAX
MOV EDI,EAX
LEA RSI,[0x1e8027]
MOV AL,0x0
CALL 0x0019ebf0
MOV qword ptr [RBP + -0x8],RAX
JMP 0x001a71b3
LAB_001a71ab:
MOV qword ptr [RBP + -0x8],0x0
LAB_001a71b3:
MOV RAX,qword ptr [RBP + -0x8]
ADD RSP,0x40
POP RBP
RET
|
int8 check_hex(int param_1,byte param_2,int8 param_3)
{
ushort **ppuVar1;
int8 uVar2;
long in_stack_00000008;
long in_stack_00000010;
int in_stack_00000018;
int local_28;
int local_24;
int8 local_10;
if (in_stack_00000018 == 1) {
if ((*(char *)(in_stack_00000008 + 1) == '0') || (*(char *)(in_stack_00000008 + 2) == 'x')) {
local_24 = 0;
for (local_28 = 3; (ulong)(long)local_28 < in_stack_00000010 - 1U; local_28 = local_28 + 1) {
ppuVar1 = __ctype_b_loc();
if (((*ppuVar1)[(int)*(char *)(in_stack_00000008 + local_28)] & 0x1000) == 0) {
uVar2 = bprintf(0,"%sExpected hex string",param_3);
return uVar2;
}
local_24 = local_24 + 1;
}
if ((param_1 < 1) || ((local_24 % 2 == 0 && (local_24 / 2 == param_1)))) {
if (((param_2 & 1) == 0) ||
((local_24 != 0 && ((*(char *)(in_stack_00000008 + 3) != '0' || (local_24 < 2)))))) {
if (((param_2 & 1) == 0) || (local_24 / 2 < 0x21)) {
if ((param_1 < 0) && (-param_1 < local_24 / 2)) {
local_10 = bprintf(0,"%sexpected uint with max %d bytes length, but got %d bytes ",
param_3,-param_1,(long)local_24 / 2 & 0xffffffff);
}
else {
local_10 = 0;
}
}
else {
local_10 = bprintf(0,"%sexpected uint with max 32 bytes length, but got %d bytes ",
param_3,(long)local_24 / 2 & 0xffffffff);
}
}
else {
local_10 = bprintf(0,"%sno leading zeros allowed for uint",param_3);
}
}
else {
local_10 = bprintf(0,"%sExpected hex string with fixed size (%d) but got %d bytes",param_3,
param_1,(long)local_24 / 2 & 0xffffffff);
}
}
else {
local_10 = bprintf(0,"%sExpected hex prefixed (0x) string",param_3);
}
}
else {
local_10 = bprintf(0,"%sExpected hex string",param_3);
}
return local_10;
}
|
|
9,397 |
check_hex
|
corpus-core[P]colibri-stateless/src/util/json_validate.c
|
static const char* check_hex(json_t val, int len, bool isuint, const char* error_prefix) {
if (val.type != JSON_TYPE_STRING) ERROR("%sExpected hex string", error_prefix);
if (val.start[1] != '0' && val.start[2] != 'x') ERROR("%sExpected hex prefixed (0x) string", error_prefix);
int l = 0;
for (int i = 3; i < val.len - 1; i++, l++) {
if (!isxdigit(val.start[i])) ERROR("%sExpected hex string", error_prefix);
}
if (len > 0 && (l % 2 || l / 2 != len)) ERROR("%sExpected hex string with fixed size (%d) but got %d bytes", error_prefix, len, l / 2);
if (isuint && (l == 0 || (val.start[3] == '0' && l > 1)))
ERROR("%sno leading zeros allowed for uint", error_prefix);
if (isuint && l / 2 > 32) ERROR("%sexpected uint with max 32 bytes length, but got %d bytes ", error_prefix, l / 2);
if (len < 0 && l / 2 > (-len)) ERROR("%sexpected uint with max %d bytes length, but got %d bytes ", error_prefix, -len, l / 2);
return NULL;
}
|
O3
|
c
|
check_hex:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdx, %rbx
cmpl $0x1, 0x40(%rsp)
jne 0x58550
movl %esi, %r14d
movl %edi, %ebp
leaq 0x30(%rsp), %rax
movq (%rax), %r15
cmpb $0x30, 0x1(%r15)
je 0x584db
cmpb $0x78, 0x2(%r15)
jne 0x5856b
movq 0x8(%rax), %r12
leaq -0x1(%r12), %rax
xorl %r8d, %r8d
cmpq $0x4, %rax
jb 0x58515
callq 0x220e0
movq (%rax), %rax
leal -0x4(%r12), %r8d
addq $-0x4, %r12
xorl %ecx, %ecx
movsbq 0x3(%r15,%rcx), %rdx
testb $0x10, 0x1(%rax,%rdx,2)
je 0x58550
incq %rcx
cmpq %rcx, %r12
jne 0x58500
testl %ebp, %ebp
jle 0x5852c
movl %r8d, %ecx
andl $0x1, %ecx
movl %r8d, %eax
shrl %eax
movl %eax, %edx
xorl %ebp, %edx
orl %ecx, %edx
jne 0x58574
testb %r14b, %r14b
je 0x585bb
testl %r8d, %r8d
je 0x58547
cmpb $0x30, 0x3(%r15)
jne 0x58594
cmpl $0x1, %r8d
je 0x58594
leaq 0x34260(%rip), %rsi # 0x8c7ae
jmp 0x58557
leaq 0x341e1(%rip), %rsi # 0x8c738
xorl %edi, %edi
movq %rbx, %rdx
xorl %eax, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x53780
leaq 0x341dc(%rip), %rsi # 0x8c74e
jmp 0x58557
leaq 0x341f7(%rip), %rsi # 0x8c772
xorl %edi, %edi
movq %rbx, %rdx
movl %ebp, %ecx
movl %eax, %r8d
xorl %eax, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x53780
cmpl $0x42, %r8d
jb 0x585bb
shrl %r8d
leaq 0x3422e(%rip), %rsi # 0x8c7d2
xorl %edi, %edi
movq %rbx, %rdx
movl %r8d, %ecx
xorl %eax, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x53780
testl %ebp, %ebp
jns 0x585d9
shrl %r8d
negl %ebp
cmpl %ebp, %r8d
jbe 0x585d9
leaq 0x3423e(%rip), %rsi # 0x8c80e
xorl %edi, %edi
movq %rbx, %rdx
movl %ebp, %ecx
jmp 0x58585
xorl %eax, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
|
check_hex:
push rbp
push r15
push r14
push r12
push rbx
mov rbx, rdx
cmp [rsp+28h+arg_10], 1
jnz loc_58550
mov r14d, esi
mov ebp, edi
lea rax, [rsp+28h+arg_0]
mov r15, [rax]
cmp byte ptr [r15+1], 30h ; '0'
jz short loc_584DB
cmp byte ptr [r15+2], 78h ; 'x'
jnz loc_5856B
loc_584DB:
mov r12, [rax+8]
lea rax, [r12-1]
xor r8d, r8d
cmp rax, 4
jb short loc_58515
call ___ctype_b_loc
mov rax, [rax]
lea r8d, [r12-4]
add r12, 0FFFFFFFFFFFFFFFCh
xor ecx, ecx
loc_58500:
movsx rdx, byte ptr [r15+rcx+3]
test byte ptr [rax+rdx*2+1], 10h
jz short loc_58550
inc rcx
cmp r12, rcx
jnz short loc_58500
loc_58515:
test ebp, ebp
jle short loc_5852C
mov ecx, r8d
and ecx, 1
mov eax, r8d
shr eax, 1
mov edx, eax
xor edx, ebp
or edx, ecx
jnz short loc_58574
loc_5852C:
test r14b, r14b
jz loc_585BB
test r8d, r8d
jz short loc_58547
cmp byte ptr [r15+3], 30h ; '0'
jnz short loc_58594
cmp r8d, 1
jz short loc_58594
loc_58547:
lea rsi, aSnoLeadingZero; "%sno leading zeros allowed for uint"
jmp short loc_58557
loc_58550:
lea rsi, aSexpectedHexSt; "%sExpected hex string"
loc_58557:
xor edi, edi
mov rdx, rbx
xor eax, eax
pop rbx
pop r12
pop r14
pop r15
pop rbp
jmp bprintf
loc_5856B:
lea rsi, aSexpectedHexPr; "%sExpected hex prefixed (0x) string"
jmp short loc_58557
loc_58574:
lea rsi, aSexpectedHexSt_0; "%sExpected hex string with fixed size ("...
xor edi, edi
mov rdx, rbx
mov ecx, ebp
mov r8d, eax
loc_58585:
xor eax, eax
pop rbx
pop r12
pop r14
pop r15
pop rbp
jmp bprintf
loc_58594:
cmp r8d, 42h ; 'B'
jb short loc_585BB
shr r8d, 1
lea rsi, aSexpectedUintW; "%sexpected uint with max 32 bytes lengt"...
xor edi, edi
mov rdx, rbx
mov ecx, r8d
xor eax, eax
pop rbx
pop r12
pop r14
pop r15
pop rbp
jmp bprintf
loc_585BB:
test ebp, ebp
jns short loc_585D9
shr r8d, 1
neg ebp
cmp r8d, ebp
jbe short loc_585D9
lea rsi, aSexpectedUintW_0; "%sexpected uint with max %d bytes lengt"...
xor edi, edi
mov rdx, rbx
mov ecx, ebp
jmp short loc_58585
loc_585D9:
xor eax, eax
pop rbx
pop r12
pop r14
pop r15
pop rbp
retn
|
long long check_hex(
long long a1,
char a2,
long long a3,
long long a4,
long long a5,
long long a6,
_BYTE *a7,
long long a8,
int a9)
{
long long v10; // rax
char *v11; // rsi
char *v13; // rsi
long long v14; // rdx
long long v15; // rcx
long long v16; // r8
if ( a9 != 1 )
{
LABEL_15:
v11 = "%sExpected hex string";
return bprintf(0LL, v11, a3, a4, a5, a6);
}
if ( a7[1] != 48 && a7[2] != 120 )
{
v11 = "%sExpected hex prefixed (0x) string";
return bprintf(0LL, v11, a3, a4, a5, a6);
}
a5 = 0LL;
if ( (unsigned long long)(a8 - 1) >= 4 )
{
v10 = *(_QWORD *)__ctype_b_loc(a1);
a5 = (unsigned int)(a8 - 4);
a4 = 0LL;
while ( (*(_BYTE *)(v10 + 2LL * (char)a7[a4 + 3] + 1) & 0x10) != 0 )
{
if ( a8 - 4 == ++a4 )
goto LABEL_8;
}
goto LABEL_15;
}
LABEL_8:
if ( (int)a1 > 0 )
{
a4 = a5 & 1;
if ( (unsigned int)a4 | (unsigned int)a1 ^ ((unsigned int)a5 >> 1) )
{
v13 = "%sExpected hex string with fixed size (%d) but got %d bytes";
v14 = a3;
v15 = (unsigned int)a1;
v16 = (unsigned int)a5 >> 1;
return bprintf(0LL, v13, v14, v15, v16, a6);
}
}
if ( a2 )
{
if ( !(_DWORD)a5 || a7[3] == 48 && (_DWORD)a5 != 1 )
{
v11 = "%sno leading zeros allowed for uint";
return bprintf(0LL, v11, a3, a4, a5, a6);
}
if ( (unsigned int)a5 >= 0x42 )
return bprintf(
0LL,
"%sexpected uint with max 32 bytes length, but got %d bytes ",
a3,
(unsigned int)a5 >> 1,
(unsigned int)a5 >> 1,
a6);
}
if ( (int)a1 < 0 )
{
v16 = (unsigned int)a5 >> 1;
if ( (unsigned int)v16 > -(int)a1 )
{
v13 = "%sexpected uint with max %d bytes length, but got %d bytes ";
v14 = a3;
v15 = (unsigned int)-(int)a1;
return bprintf(0LL, v13, v14, v15, v16, a6);
}
}
return 0LL;
}
|
check_hex:
PUSH RBP
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
MOV RBX,RDX
CMP dword ptr [RSP + 0x40],0x1
JNZ 0x00158550
MOV R14D,ESI
MOV EBP,EDI
LEA RAX,[RSP + 0x30]
MOV R15,qword ptr [RAX]
CMP byte ptr [R15 + 0x1],0x30
JZ 0x001584db
CMP byte ptr [R15 + 0x2],0x78
JNZ 0x0015856b
LAB_001584db:
MOV R12,qword ptr [RAX + 0x8]
LEA RAX,[R12 + -0x1]
XOR R8D,R8D
CMP RAX,0x4
JC 0x00158515
CALL 0x001220e0
MOV RAX,qword ptr [RAX]
LEA R8D,[R12 + -0x4]
ADD R12,-0x4
XOR ECX,ECX
LAB_00158500:
MOVSX RDX,byte ptr [R15 + RCX*0x1 + 0x3]
TEST byte ptr [RAX + RDX*0x2 + 0x1],0x10
JZ 0x00158550
INC RCX
CMP R12,RCX
JNZ 0x00158500
LAB_00158515:
TEST EBP,EBP
JLE 0x0015852c
MOV ECX,R8D
AND ECX,0x1
MOV EAX,R8D
SHR EAX,0x1
MOV EDX,EAX
XOR EDX,EBP
OR EDX,ECX
JNZ 0x00158574
LAB_0015852c:
TEST R14B,R14B
JZ 0x001585bb
TEST R8D,R8D
JZ 0x00158547
CMP byte ptr [R15 + 0x3],0x30
JNZ 0x00158594
CMP R8D,0x1
JZ 0x00158594
LAB_00158547:
LEA RSI,[0x18c7ae]
JMP 0x00158557
LAB_00158550:
LEA RSI,[0x18c738]
LAB_00158557:
XOR EDI,EDI
MOV RDX,RBX
XOR EAX,EAX
POP RBX
POP R12
POP R14
POP R15
POP RBP
JMP 0x00153780
LAB_0015856b:
LEA RSI,[0x18c74e]
JMP 0x00158557
LAB_00158574:
LEA RSI,[0x18c772]
XOR EDI,EDI
MOV RDX,RBX
MOV ECX,EBP
MOV R8D,EAX
LAB_00158585:
XOR EAX,EAX
POP RBX
POP R12
POP R14
POP R15
POP RBP
JMP 0x00153780
LAB_00158594:
CMP R8D,0x42
JC 0x001585bb
SHR R8D,0x1
LEA RSI,[0x18c7d2]
XOR EDI,EDI
MOV RDX,RBX
MOV ECX,R8D
XOR EAX,EAX
POP RBX
POP R12
POP R14
POP R15
POP RBP
JMP 0x00153780
LAB_001585bb:
TEST EBP,EBP
JNS 0x001585d9
SHR R8D,0x1
NEG EBP
CMP R8D,EBP
JBE 0x001585d9
LEA RSI,[0x18c80e]
XOR EDI,EDI
MOV RDX,RBX
MOV ECX,EBP
JMP 0x00158585
LAB_001585d9:
XOR EAX,EAX
POP RBX
POP R12
POP R14
POP R15
POP RBP
RET
|
int8 check_hex(uint param_1,char param_2,int8 param_3)
{
ushort **ppuVar1;
int8 uVar2;
long lVar3;
char *pcVar4;
uint uVar5;
ulong uVar6;
ulong uVar7;
long in_stack_00000008;
long in_stack_00000010;
int in_stack_00000018;
if (in_stack_00000018 != 1) {
LAB_00158550:
pcVar4 = "%sExpected hex string";
LAB_00158557:
uVar2 = bprintf(0,pcVar4,param_3);
return uVar2;
}
if ((*(char *)(in_stack_00000008 + 1) != '0') && (*(char *)(in_stack_00000008 + 2) != 'x')) {
pcVar4 = "%sExpected hex prefixed (0x) string";
goto LAB_00158557;
}
uVar6 = 0;
if (3 < in_stack_00000010 - 1U) {
ppuVar1 = __ctype_b_loc();
uVar6 = (ulong)((int)in_stack_00000010 - 4);
lVar3 = 0;
do {
if ((*(byte *)((long)*ppuVar1 + (long)*(char *)(in_stack_00000008 + 3 + lVar3) * 2 + 1) & 0x10
) == 0) goto LAB_00158550;
lVar3 = lVar3 + 1;
} while (in_stack_00000010 + -4 != lVar3);
}
uVar5 = (uint)uVar6;
if (0 < (int)param_1) {
uVar7 = uVar6 >> 1;
if ((uint)uVar7 != param_1 || (uVar6 & 1) != 0) {
pcVar4 = "%sExpected hex string with fixed size (%d) but got %d bytes";
goto LAB_00158585;
}
}
if (param_2 != '\0') {
if ((uVar5 == 0) || ((*(char *)(in_stack_00000008 + 3) == '0' && (uVar5 != 1)))) {
pcVar4 = "%sno leading zeros allowed for uint";
goto LAB_00158557;
}
if (0x41 < uVar5) {
uVar2 = bprintf(0,"%sexpected uint with max 32 bytes length, but got %d bytes ",param_3,
uVar5 >> 1);
return uVar2;
}
}
if ((int)param_1 < 0) {
uVar7 = (ulong)(uVar5 >> 1);
param_1 = -param_1;
if (param_1 < uVar5 >> 1) {
pcVar4 = "%sexpected uint with max %d bytes length, but got %d bytes ";
LAB_00158585:
uVar2 = bprintf(0,pcVar4,param_3,param_1,uVar7);
return uVar2;
}
}
return 0;
}
|
|
9,398 |
reaction::ObserverGraph::hasCycle(std::shared_ptr<reaction::ObserverDataNode>, std::shared_ptr<reaction::ObserverDataNode>)
|
reaction/include/reaction/observerNode.h
|
bool hasCycle(DataNodePtr source, DataNodePtr target) {
m_dataDependents[source].insert(target);
m_dataObservers[target].insert({source, [](bool) {}});
std::unordered_set<DataNodePtr> visited;
std::unordered_set<DataNodePtr> recursionStack;
bool hasCycle = dfs(source, visited, recursionStack);
m_dataDependents[source].erase(target);
m_dataObservers[target].erase(source);
return hasCycle;
}
|
O3
|
c
|
reaction::ObserverGraph::hasCycle(std::shared_ptr<reaction::ObserverDataNode>, std::shared_ptr<reaction::ObserverDataNode>):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x88, %rsp
movq %rdx, %r14
movq %rsi, %rbx
movq %rdi, %r12
callq 0x705e
leaq 0x18(%rsp), %r13
movq %rax, (%r13)
movq %rax, %rdi
movq %r14, %rsi
movq %r13, %rdx
callq 0x8e46
leaq 0x38(%r12), %r15
movq %r15, %rdi
movq %r14, %rsi
callq 0x7202
movq (%rbx), %rcx
movq %rcx, (%r13)
movq 0x8(%rbx), %rcx
movq %rcx, 0x8(%r13)
testq %rcx, %rcx
je 0x759d
movq 0xba31(%rip), %rdx # 0x12fc0
cmpb $0x0, (%rdx)
je 0x7599
incl 0x8(%rcx)
jmp 0x759d
lock
incl 0x8(%rcx)
xorps %xmm0, %xmm0
leaq 0x18(%rsp), %rsi
movups %xmm0, 0x10(%rsi)
leaq 0xe90(%rip), %rcx # 0x8440
movq %rcx, 0x28(%rsi)
leaq 0xe87(%rip), %rcx # 0x8442
movq %rcx, 0x20(%rsi)
movq %rax, %rdi
callq 0x90fa
movq 0x38(%rsp), %rax
testq %rax, %rax
je 0x75e0
leaq 0x28(%rsp), %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
movq 0x20(%rsp), %rdi
testq %rdi, %rdi
je 0x75ef
callq 0x592e
leaq 0x48(%rsp), %rax
movq %rax, -0x30(%rax)
movl $0x1, %ecx
movq %rcx, -0x28(%rax)
xorps %xmm0, %xmm0
movups %xmm0, -0x20(%rax)
movl $0x3f800000, %edx # imm = 0x3F800000
movl %edx, -0x10(%rax)
movups %xmm0, -0x8(%rax)
leaq 0x80(%rsp), %rax
movq %rax, -0x30(%rax)
movq %rcx, -0x28(%rax)
movups %xmm0, -0x20(%rax)
movl %edx, -0x10(%rax)
movups %xmm0, -0x8(%rax)
movq (%rbx), %rax
movq %rax, 0x8(%rsp)
movq 0x8(%rbx), %rax
movq %rax, 0x10(%rsp)
testq %rax, %rax
je 0x765a
movq 0xb974(%rip), %rcx # 0x12fc0
cmpb $0x0, (%rcx)
je 0x7656
incl 0x8(%rax)
jmp 0x765a
lock
incl 0x8(%rax)
leaq 0x8(%rsp), %rsi
leaq 0x18(%rsp), %rdx
leaq 0x50(%rsp), %rcx
movq %r12, %rdi
callq 0x82d0
movl %eax, %ebp
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0x7682
callq 0x592e
movq %r12, %rdi
movq %rbx, %rsi
callq 0x705e
movq %rax, %rdi
movq %r14, %rsi
callq 0x84b0
movq %r15, %rdi
movq %r14, %rsi
callq 0x7202
movq %rax, %rdi
movq %rbx, %rsi
callq 0x73a6
leaq 0x50(%rsp), %rdi
callq 0x589a
leaq 0x18(%rsp), %rdi
callq 0x589a
movl %ebp, %eax
addq $0x88, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rdi
callq 0x4fe0
movq %rax, %rbx
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0x7704
callq 0x592e
jmp 0x7704
movq %rax, %rbx
leaq 0x18(%rsp), %rdi
callq 0x5cb2
jmp 0x7718
movq %rax, %rbx
leaq 0x50(%rsp), %rdi
callq 0x589a
leaq 0x18(%rsp), %rdi
callq 0x589a
movq %rbx, %rdi
callq 0x2270
|
_ZN8reaction13ObserverGraph8hasCycleESt10shared_ptrINS_16ObserverDataNodeEES3_:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 88h
mov r14, rdx
mov rbx, rsi
mov r12, rdi
call _ZNSt8__detail9_Map_baseISt10shared_ptrIN8reaction16ObserverDataNodeEESt4pairIKS4_St13unordered_setIS4_St4hashIS4_ESt8equal_toIS4_ESaIS4_EEESaISE_ENS_10_Select1stESB_S9_NS_18_Mod_range_hashingENS_20_Default_ranged_hashENS_20_Prime_rehash_policyENS_17_Hashtable_traitsILb0ELb0ELb1EEELb1EEixERS6_; std::__detail::_Map_base<std::shared_ptr<reaction::ObserverDataNode>,std::pair<std::shared_ptr<reaction::ObserverDataNode> const,std::unordered_set<std::shared_ptr<reaction::ObserverDataNode>>>,std::allocator<std::pair<std::shared_ptr<reaction::ObserverDataNode> const,std::unordered_set<std::shared_ptr<reaction::ObserverDataNode>>>>,std::__detail::_Select1st,std::equal_to<std::shared_ptr<reaction::ObserverDataNode>>,std::hash<std::shared_ptr<reaction::ObserverDataNode>>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<false,false,true>,true>::operator[](std::shared_ptr<reaction::ObserverDataNode> const&)
lea r13, [rsp+0B8h+var_A0]
mov [r13+0], rax
mov rdi, rax
mov rsi, r14
mov rdx, r13
call _ZNSt10_HashtableISt10shared_ptrIN8reaction16ObserverDataNodeEES3_SaIS3_ENSt8__detail9_IdentityESt8equal_toIS3_ESt4hashIS3_ENS5_18_Mod_range_hashingENS5_20_Default_ranged_hashENS5_20_Prime_rehash_policyENS5_17_Hashtable_traitsILb0ELb1ELb1EEEE9_M_insertIRKS3_NS5_10_AllocNodeISaINS5_10_Hash_nodeIS3_Lb0EEEEEEEESt4pairINS5_14_Node_iteratorIS3_Lb1ELb0EEEbEOT_RKT0_St17integral_constantIbLb1EE; std::_Hashtable<std::shared_ptr<reaction::ObserverDataNode>,std::shared_ptr<reaction::ObserverDataNode>,std::allocator<std::shared_ptr<reaction::ObserverDataNode>>,std::__detail::_Identity,std::equal_to<std::shared_ptr<reaction::ObserverDataNode>>,std::hash<std::shared_ptr<reaction::ObserverDataNode>>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<false,true,true>>::_M_insert<std::shared_ptr<reaction::ObserverDataNode> const&,std::__detail::_AllocNode<std::allocator<std::__detail::_Hash_node<std::shared_ptr<reaction::ObserverDataNode>,false>>>>(std::shared_ptr<reaction::ObserverDataNode> const&,std::__detail::_AllocNode<std::allocator<std::__detail::_Hash_node<std::shared_ptr<reaction::ObserverDataNode>,false>>> const&,std::integral_constant<bool,true>)
lea r15, [r12+38h]
mov rdi, r15
mov rsi, r14
call _ZNSt8__detail9_Map_baseISt10shared_ptrIN8reaction16ObserverDataNodeEESt4pairIKS4_St13unordered_mapIS4_St8functionIFvbEESt4hashIS4_ESt8equal_toIS4_ESaIS5_IS6_SA_EEEESaISI_ENS_10_Select1stESE_SC_NS_18_Mod_range_hashingENS_20_Default_ranged_hashENS_20_Prime_rehash_policyENS_17_Hashtable_traitsILb0ELb0ELb1EEELb1EEixERS6_; std::__detail::_Map_base<std::shared_ptr<reaction::ObserverDataNode>,std::pair<std::shared_ptr<reaction::ObserverDataNode> const,std::unordered_map<std::shared_ptr<reaction::ObserverDataNode>,std::function<void ()(bool)>>>,std::allocator<std::pair<std::shared_ptr<reaction::ObserverDataNode> const,std::unordered_map<std::shared_ptr<reaction::ObserverDataNode>,std::function<void ()(bool)>>>>,std::__detail::_Select1st,std::equal_to<std::shared_ptr<reaction::ObserverDataNode>>,std::hash<std::shared_ptr<reaction::ObserverDataNode>>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<false,false,true>,true>::operator[](std::shared_ptr<reaction::ObserverDataNode> const&)
mov rcx, [rbx]
mov [r13+0], rcx
mov rcx, [rbx+8]
mov [r13+8], rcx
test rcx, rcx
jz short loc_759D
mov rdx, cs:__libc_single_threaded_ptr
cmp byte ptr [rdx], 0
jz short loc_7599
inc dword ptr [rcx+8]
jmp short loc_759D
loc_7599:
lock inc dword ptr [rcx+8]
loc_759D:
xorps xmm0, xmm0
lea rsi, [rsp+0B8h+var_A0]
movups xmmword ptr [rsi+10h], xmm0
lea rcx, _ZNSt17_Function_handlerIFvbEZN8reaction13ObserverGraph8hasCycleESt10shared_ptrINS1_16ObserverDataNodeEES5_EUlbE_E9_M_invokeERKSt9_Any_dataOb; std::_Function_handler<void ()(bool),reaction::ObserverGraph::hasCycle(std::shared_ptr<reaction::ObserverDataNode>,std::shared_ptr<reaction::ObserverDataNode>)::{lambda(bool)#1}>::_M_invoke(std::_Any_data const&,bool &&)
mov [rsi+28h], rcx
lea rcx, _ZNSt17_Function_handlerIFvbEZN8reaction13ObserverGraph8hasCycleESt10shared_ptrINS1_16ObserverDataNodeEES5_EUlbE_E10_M_managerERSt9_Any_dataRKS8_St18_Manager_operation; std::_Function_handler<void ()(bool),reaction::ObserverGraph::hasCycle(std::shared_ptr<reaction::ObserverDataNode>,std::shared_ptr<reaction::ObserverDataNode>)::{lambda(bool)#1}>::_M_manager(std::_Any_data &,std::_Any_data const&,std::_Manager_operation)
mov [rsi+20h], rcx
mov rdi, rax
call _ZNSt10_HashtableISt10shared_ptrIN8reaction16ObserverDataNodeEESt4pairIKS3_St8functionIFvbEEESaIS9_ENSt8__detail10_Select1stESt8equal_toIS3_ESt4hashIS3_ENSB_18_Mod_range_hashingENSB_20_Default_ranged_hashENSB_20_Prime_rehash_policyENSB_17_Hashtable_traitsILb0ELb0ELb1EEEE10_M_emplaceIJS9_EEES4_INSB_14_Node_iteratorIS9_Lb0ELb0EEEbESt17integral_constantIbLb1EEDpOT_; std::_Hashtable<std::shared_ptr<reaction::ObserverDataNode>,std::pair<std::shared_ptr<reaction::ObserverDataNode> const,std::function<void ()(bool)>>,std::allocator<std::pair<std::shared_ptr<reaction::ObserverDataNode> const,std::function<void ()(bool)>>>,std::__detail::_Select1st,std::equal_to<std::shared_ptr<reaction::ObserverDataNode>>,std::hash<std::shared_ptr<reaction::ObserverDataNode>>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<false,false,true>>::_M_emplace<std::pair<std::shared_ptr<reaction::ObserverDataNode> const,std::function<void ()(bool)>>>(std::integral_constant<bool,true>,std::pair<std::shared_ptr<reaction::ObserverDataNode> const,std::function<void ()(bool)>> &&)
mov rax, [rsp+0B8h+var_80]
test rax, rax
jz short loc_75E0
lea rdi, [rsp+0B8h+var_90]
mov rsi, rdi
mov edx, 3
call rax
loc_75E0:
mov rdi, [rsp+0B8h+var_98]
test rdi, rdi
jz short loc_75EF
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_75EF:
lea rax, [rsp+0B8h+var_70]
mov [rax-30h], rax
mov ecx, 1
mov [rax-28h], rcx
xorps xmm0, xmm0
movups xmmword ptr [rax-20h], xmm0
mov edx, 3F800000h
mov [rax-10h], edx
movups xmmword ptr [rax-8], xmm0
lea rax, [rsp+0B8h+var_38]
mov [rax-30h], rax
mov [rax-28h], rcx
movups xmmword ptr [rax-20h], xmm0
mov [rax-10h], edx
movups xmmword ptr [rax-8], xmm0
mov rax, [rbx]
mov [rsp+0B8h+var_B0], rax
mov rax, [rbx+8]
mov [rsp+0B8h+var_A8], rax
test rax, rax
jz short loc_765A
mov rcx, cs:__libc_single_threaded_ptr
cmp byte ptr [rcx], 0
jz short loc_7656
inc dword ptr [rax+8]
jmp short loc_765A
loc_7656:
lock inc dword ptr [rax+8]
loc_765A:
lea rsi, [rsp+0B8h+var_B0]
lea rdx, [rsp+0B8h+var_A0]
lea rcx, [rsp+0B8h+var_68]
mov rdi, r12
call _ZN8reaction13ObserverGraph3dfsESt10shared_ptrINS_16ObserverDataNodeEERSt13unordered_setIS3_St4hashIS3_ESt8equal_toIS3_ESaIS3_EESB_; reaction::ObserverGraph::dfs(std::shared_ptr<reaction::ObserverDataNode>,std::unordered_set<std::shared_ptr<reaction::ObserverDataNode>> &,std::unordered_set<std::shared_ptr<reaction::ObserverDataNode>> &)
mov ebp, eax
mov rdi, [rsp+0B8h+var_A8]
test rdi, rdi
jz short loc_7682
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_7682:
mov rdi, r12
mov rsi, rbx
call _ZNSt8__detail9_Map_baseISt10shared_ptrIN8reaction16ObserverDataNodeEESt4pairIKS4_St13unordered_setIS4_St4hashIS4_ESt8equal_toIS4_ESaIS4_EEESaISE_ENS_10_Select1stESB_S9_NS_18_Mod_range_hashingENS_20_Default_ranged_hashENS_20_Prime_rehash_policyENS_17_Hashtable_traitsILb0ELb0ELb1EEELb1EEixERS6_; std::__detail::_Map_base<std::shared_ptr<reaction::ObserverDataNode>,std::pair<std::shared_ptr<reaction::ObserverDataNode> const,std::unordered_set<std::shared_ptr<reaction::ObserverDataNode>>>,std::allocator<std::pair<std::shared_ptr<reaction::ObserverDataNode> const,std::unordered_set<std::shared_ptr<reaction::ObserverDataNode>>>>,std::__detail::_Select1st,std::equal_to<std::shared_ptr<reaction::ObserverDataNode>>,std::hash<std::shared_ptr<reaction::ObserverDataNode>>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<false,false,true>,true>::operator[](std::shared_ptr<reaction::ObserverDataNode> const&)
mov rdi, rax
mov rsi, r14
call _ZNSt10_HashtableISt10shared_ptrIN8reaction16ObserverDataNodeEES3_SaIS3_ENSt8__detail9_IdentityESt8equal_toIS3_ESt4hashIS3_ENS5_18_Mod_range_hashingENS5_20_Default_ranged_hashENS5_20_Prime_rehash_policyENS5_17_Hashtable_traitsILb0ELb1ELb1EEEE8_M_eraseESt17integral_constantIbLb1EERKS3_; std::_Hashtable<std::shared_ptr<reaction::ObserverDataNode>,std::shared_ptr<reaction::ObserverDataNode>,std::allocator<std::shared_ptr<reaction::ObserverDataNode>>,std::__detail::_Identity,std::equal_to<std::shared_ptr<reaction::ObserverDataNode>>,std::hash<std::shared_ptr<reaction::ObserverDataNode>>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<false,true,true>>::_M_erase(std::integral_constant<bool,true>,std::shared_ptr<reaction::ObserverDataNode> const&)
mov rdi, r15
mov rsi, r14
call _ZNSt8__detail9_Map_baseISt10shared_ptrIN8reaction16ObserverDataNodeEESt4pairIKS4_St13unordered_mapIS4_St8functionIFvbEESt4hashIS4_ESt8equal_toIS4_ESaIS5_IS6_SA_EEEESaISI_ENS_10_Select1stESE_SC_NS_18_Mod_range_hashingENS_20_Default_ranged_hashENS_20_Prime_rehash_policyENS_17_Hashtable_traitsILb0ELb0ELb1EEELb1EEixERS6_; std::__detail::_Map_base<std::shared_ptr<reaction::ObserverDataNode>,std::pair<std::shared_ptr<reaction::ObserverDataNode> const,std::unordered_map<std::shared_ptr<reaction::ObserverDataNode>,std::function<void ()(bool)>>>,std::allocator<std::pair<std::shared_ptr<reaction::ObserverDataNode> const,std::unordered_map<std::shared_ptr<reaction::ObserverDataNode>,std::function<void ()(bool)>>>>,std::__detail::_Select1st,std::equal_to<std::shared_ptr<reaction::ObserverDataNode>>,std::hash<std::shared_ptr<reaction::ObserverDataNode>>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<false,false,true>,true>::operator[](std::shared_ptr<reaction::ObserverDataNode> const&)
mov rdi, rax
mov rsi, rbx
call _ZNSt10_HashtableISt10shared_ptrIN8reaction16ObserverDataNodeEESt4pairIKS3_St8functionIFvbEEESaIS9_ENSt8__detail10_Select1stESt8equal_toIS3_ESt4hashIS3_ENSB_18_Mod_range_hashingENSB_20_Default_ranged_hashENSB_20_Prime_rehash_policyENSB_17_Hashtable_traitsILb0ELb0ELb1EEEE8_M_eraseESt17integral_constantIbLb1EERS5_; std::_Hashtable<std::shared_ptr<reaction::ObserverDataNode>,std::pair<std::shared_ptr<reaction::ObserverDataNode> const,std::function<void ()(bool)>>,std::allocator<std::pair<std::shared_ptr<reaction::ObserverDataNode> const,std::function<void ()(bool)>>>,std::__detail::_Select1st,std::equal_to<std::shared_ptr<reaction::ObserverDataNode>>,std::hash<std::shared_ptr<reaction::ObserverDataNode>>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<false,false,true>>::_M_erase(std::integral_constant<bool,true>,std::shared_ptr<reaction::ObserverDataNode> const&)
lea rdi, [rsp+0B8h+var_68]
call _ZNSt10_HashtableISt10shared_ptrIN8reaction16ObserverDataNodeEES3_SaIS3_ENSt8__detail9_IdentityESt8equal_toIS3_ESt4hashIS3_ENS5_18_Mod_range_hashingENS5_20_Default_ranged_hashENS5_20_Prime_rehash_policyENS5_17_Hashtable_traitsILb0ELb1ELb1EEEED2Ev; std::_Hashtable<std::shared_ptr<reaction::ObserverDataNode>,std::shared_ptr<reaction::ObserverDataNode>,std::allocator<std::shared_ptr<reaction::ObserverDataNode>>,std::__detail::_Identity,std::equal_to<std::shared_ptr<reaction::ObserverDataNode>>,std::hash<std::shared_ptr<reaction::ObserverDataNode>>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<false,true,true>>::~_Hashtable()
lea rdi, [rsp+0B8h+var_A0]
call _ZNSt10_HashtableISt10shared_ptrIN8reaction16ObserverDataNodeEES3_SaIS3_ENSt8__detail9_IdentityESt8equal_toIS3_ESt4hashIS3_ENS5_18_Mod_range_hashingENS5_20_Default_ranged_hashENS5_20_Prime_rehash_policyENS5_17_Hashtable_traitsILb0ELb1ELb1EEEED2Ev; std::_Hashtable<std::shared_ptr<reaction::ObserverDataNode>,std::shared_ptr<reaction::ObserverDataNode>,std::allocator<std::shared_ptr<reaction::ObserverDataNode>>,std::__detail::_Identity,std::equal_to<std::shared_ptr<reaction::ObserverDataNode>>,std::hash<std::shared_ptr<reaction::ObserverDataNode>>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<false,true,true>>::~_Hashtable()
mov eax, ebp
add rsp, 88h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
mov rdi, rax
call __clang_call_terminate
mov rbx, rax
mov rdi, [rsp+0B8h+var_A8]
test rdi, rdi
jz short loc_7704
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
jmp short loc_7704
mov rbx, rax
lea rdi, [rsp+0B8h+var_A0]
call _ZNSt4pairIKSt10shared_ptrIN8reaction16ObserverDataNodeEESt8functionIFvbEEED2Ev; std::pair<std::shared_ptr<reaction::ObserverDataNode> const,std::function<void ()(bool)>>::~pair()
jmp short loc_7718
mov rbx, rax
loc_7704:
lea rdi, [rsp+0B8h+var_68]
call _ZNSt10_HashtableISt10shared_ptrIN8reaction16ObserverDataNodeEES3_SaIS3_ENSt8__detail9_IdentityESt8equal_toIS3_ESt4hashIS3_ENS5_18_Mod_range_hashingENS5_20_Default_ranged_hashENS5_20_Prime_rehash_policyENS5_17_Hashtable_traitsILb0ELb1ELb1EEEED2Ev; std::_Hashtable<std::shared_ptr<reaction::ObserverDataNode>,std::shared_ptr<reaction::ObserverDataNode>,std::allocator<std::shared_ptr<reaction::ObserverDataNode>>,std::__detail::_Identity,std::equal_to<std::shared_ptr<reaction::ObserverDataNode>>,std::hash<std::shared_ptr<reaction::ObserverDataNode>>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<false,true,true>>::~_Hashtable()
lea rdi, [rsp+0B8h+var_A0]
call _ZNSt10_HashtableISt10shared_ptrIN8reaction16ObserverDataNodeEES3_SaIS3_ENSt8__detail9_IdentityESt8equal_toIS3_ESt4hashIS3_ENS5_18_Mod_range_hashingENS5_20_Default_ranged_hashENS5_20_Prime_rehash_policyENS5_17_Hashtable_traitsILb0ELb1ELb1EEEED2Ev; std::_Hashtable<std::shared_ptr<reaction::ObserverDataNode>,std::shared_ptr<reaction::ObserverDataNode>,std::allocator<std::shared_ptr<reaction::ObserverDataNode>>,std::__detail::_Identity,std::equal_to<std::shared_ptr<reaction::ObserverDataNode>>,std::hash<std::shared_ptr<reaction::ObserverDataNode>>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<false,true,true>>::~_Hashtable()
loc_7718:
mov rdi, rbx
call __Unwind_Resume
|
long long reaction::ObserverGraph::hasCycle(unsigned long long *a1, unsigned long long *a2, unsigned long long *a3)
{
int v4; // ecx
int v5; // r8d
int v6; // r9d
_QWORD *v7; // rax
volatile signed __int32 *v8; // rcx
int v9; // r8d
int v10; // r9d
volatile signed __int32 *v11; // rax
unsigned int v12; // ebp
_QWORD *v13; // rax
_QWORD *v14; // rax
unsigned long long v16; // [rsp+8h] [rbp-B0h] BYREF
volatile signed __int32 *v17; // [rsp+10h] [rbp-A8h]
_QWORD *v18; // [rsp+18h] [rbp-A0h] BYREF
volatile signed __int32 *v19; // [rsp+20h] [rbp-98h]
__int128 v20; // [rsp+28h] [rbp-90h] BYREF
long long ( *v21)(); // [rsp+38h] [rbp-80h]
__int128 v22; // [rsp+40h] [rbp-78h] BYREF
_QWORD v23[2]; // [rsp+50h] [rbp-68h] BYREF
__int128 v24; // [rsp+60h] [rbp-58h]
int v25; // [rsp+70h] [rbp-48h]
__int128 v26; // [rsp+78h] [rbp-40h] BYREF
v18 = std::__detail::_Map_base<std::shared_ptr<reaction::ObserverDataNode>,std::pair<std::shared_ptr<reaction::ObserverDataNode> const,std::unordered_set<std::shared_ptr<reaction::ObserverDataNode>>>,std::allocator<std::pair<std::shared_ptr<reaction::ObserverDataNode> const,std::unordered_set<std::shared_ptr<reaction::ObserverDataNode>>>>,std::__detail::_Select1st,std::equal_to<std::shared_ptr<reaction::ObserverDataNode>>,std::hash<std::shared_ptr<reaction::ObserverDataNode>>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<false,false,true>,true>::operator[](
a1,
a2);
std::_Hashtable<std::shared_ptr<reaction::ObserverDataNode>,std::shared_ptr<reaction::ObserverDataNode>,std::allocator<std::shared_ptr<reaction::ObserverDataNode>>,std::__detail::_Identity,std::equal_to<std::shared_ptr<reaction::ObserverDataNode>>,std::hash<std::shared_ptr<reaction::ObserverDataNode>>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<false,true,true>>::_M_insert<std::shared_ptr<reaction::ObserverDataNode> const&,std::__detail::_AllocNode<std::allocator<std::__detail::_Hash_node<std::shared_ptr<reaction::ObserverDataNode>,false>>>>(
(_DWORD)v18,
(_DWORD)a3,
(unsigned int)&v18,
v4,
v5,
v6);
v7 = std::__detail::_Map_base<std::shared_ptr<reaction::ObserverDataNode>,std::pair<std::shared_ptr<reaction::ObserverDataNode> const,std::unordered_map<std::shared_ptr<reaction::ObserverDataNode>,std::function<void ()(bool)>>>,std::allocator<std::pair<std::shared_ptr<reaction::ObserverDataNode> const,std::unordered_map<std::shared_ptr<reaction::ObserverDataNode>,std::function<void ()(bool)>>>>,std::__detail::_Select1st,std::equal_to<std::shared_ptr<reaction::ObserverDataNode>>,std::hash<std::shared_ptr<reaction::ObserverDataNode>>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<false,false,true>,true>::operator[](
a1 + 7,
a3);
v18 = (_QWORD *)*a2;
v8 = (volatile signed __int32 *)a2[1];
v19 = v8;
if ( v8 )
{
if ( _libc_single_threaded )
++*((_DWORD *)v8 + 2);
else
_InterlockedIncrement(v8 + 2);
}
v20 = 0LL;
*(_QWORD *)&v22 = std::_Function_handler<void ()(bool),reaction::ObserverGraph::hasCycle(std::shared_ptr<reaction::ObserverDataNode>,std::shared_ptr<reaction::ObserverDataNode>)::{lambda(bool)#1}>::_M_invoke;
v21 = std::_Function_handler<void ()(bool),reaction::ObserverGraph::hasCycle(std::shared_ptr<reaction::ObserverDataNode>,std::shared_ptr<reaction::ObserverDataNode>)::{lambda(bool)#1}>::_M_manager;
std::_Hashtable<std::shared_ptr<reaction::ObserverDataNode>,std::pair<std::shared_ptr<reaction::ObserverDataNode> const,std::function<void ()(bool)>>,std::allocator<std::pair<std::shared_ptr<reaction::ObserverDataNode> const,std::function<void ()(bool)>>>,std::__detail::_Select1st,std::equal_to<std::shared_ptr<reaction::ObserverDataNode>>,std::hash<std::shared_ptr<reaction::ObserverDataNode>>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<false,false,true>>::_M_emplace<std::pair<std::shared_ptr<reaction::ObserverDataNode> const,std::function<void ()(bool)>>>(
v7,
&v18);
if ( v21 )
((void ( *)(__int128 *, __int128 *, long long))v21)(&v20, &v20, 3LL);
if ( v19 )
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v19);
v18 = (_QWORD *)&v22 + 1;
v19 = &dword_0 + 1;
v20 = 0LL;
LODWORD(v21) = 1065353216;
v22 = 0LL;
v23[0] = (char *)&v26 + 8;
v23[1] = 1LL;
v24 = 0LL;
v25 = 1065353216;
v26 = 0LL;
v16 = *a2;
v11 = (volatile signed __int32 *)a2[1];
v17 = v11;
if ( v11 )
{
if ( _libc_single_threaded )
++*((_DWORD *)v11 + 2);
else
_InterlockedIncrement(v11 + 2);
}
v12 = reaction::ObserverGraph::dfs((_DWORD)a1, (unsigned int)&v16, (unsigned int)&v18, (unsigned int)v23, v9, v10);
if ( v17 )
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v17);
v13 = std::__detail::_Map_base<std::shared_ptr<reaction::ObserverDataNode>,std::pair<std::shared_ptr<reaction::ObserverDataNode> const,std::unordered_set<std::shared_ptr<reaction::ObserverDataNode>>>,std::allocator<std::pair<std::shared_ptr<reaction::ObserverDataNode> const,std::unordered_set<std::shared_ptr<reaction::ObserverDataNode>>>>,std::__detail::_Select1st,std::equal_to<std::shared_ptr<reaction::ObserverDataNode>>,std::hash<std::shared_ptr<reaction::ObserverDataNode>>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<false,false,true>,true>::operator[](
a1,
a2);
std::_Hashtable<std::shared_ptr<reaction::ObserverDataNode>,std::shared_ptr<reaction::ObserverDataNode>,std::allocator<std::shared_ptr<reaction::ObserverDataNode>>,std::__detail::_Identity,std::equal_to<std::shared_ptr<reaction::ObserverDataNode>>,std::hash<std::shared_ptr<reaction::ObserverDataNode>>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<false,true,true>>::_M_erase(
v13,
a3);
v14 = std::__detail::_Map_base<std::shared_ptr<reaction::ObserverDataNode>,std::pair<std::shared_ptr<reaction::ObserverDataNode> const,std::unordered_map<std::shared_ptr<reaction::ObserverDataNode>,std::function<void ()(bool)>>>,std::allocator<std::pair<std::shared_ptr<reaction::ObserverDataNode> const,std::unordered_map<std::shared_ptr<reaction::ObserverDataNode>,std::function<void ()(bool)>>>>,std::__detail::_Select1st,std::equal_to<std::shared_ptr<reaction::ObserverDataNode>>,std::hash<std::shared_ptr<reaction::ObserverDataNode>>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<false,false,true>,true>::operator[](
a1 + 7,
a3);
std::_Hashtable<std::shared_ptr<reaction::ObserverDataNode>,std::pair<std::shared_ptr<reaction::ObserverDataNode> const,std::function<void ()(bool)>>,std::allocator<std::pair<std::shared_ptr<reaction::ObserverDataNode> const,std::function<void ()(bool)>>>,std::__detail::_Select1st,std::equal_to<std::shared_ptr<reaction::ObserverDataNode>>,std::hash<std::shared_ptr<reaction::ObserverDataNode>>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<false,false,true>>::_M_erase(
v14,
(long long *)a2);
std::_Hashtable<std::shared_ptr<reaction::ObserverDataNode>,std::shared_ptr<reaction::ObserverDataNode>,std::allocator<std::shared_ptr<reaction::ObserverDataNode>>,std::__detail::_Identity,std::equal_to<std::shared_ptr<reaction::ObserverDataNode>>,std::hash<std::shared_ptr<reaction::ObserverDataNode>>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<false,true,true>>::~_Hashtable((long long)v23);
std::_Hashtable<std::shared_ptr<reaction::ObserverDataNode>,std::shared_ptr<reaction::ObserverDataNode>,std::allocator<std::shared_ptr<reaction::ObserverDataNode>>,std::__detail::_Identity,std::equal_to<std::shared_ptr<reaction::ObserverDataNode>>,std::hash<std::shared_ptr<reaction::ObserverDataNode>>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<false,true,true>>::~_Hashtable((long long)&v18);
return v12;
}
|
hasCycle:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x88
MOV R14,RDX
MOV RBX,RSI
MOV R12,RDI
CALL 0x0010705e
LEA R13,[RSP + 0x18]
MOV qword ptr [R13],RAX
MOV RDI,RAX
MOV RSI,R14
MOV RDX,R13
CALL 0x00108e46
LEA R15,[R12 + 0x38]
MOV RDI,R15
MOV RSI,R14
CALL 0x00107202
MOV RCX,qword ptr [RBX]
MOV qword ptr [R13],RCX
MOV RCX,qword ptr [RBX + 0x8]
MOV qword ptr [R13 + 0x8],RCX
TEST RCX,RCX
JZ 0x0010759d
MOV RDX,qword ptr [0x00112fc0]
CMP byte ptr [RDX],0x0
JZ 0x00107599
INC dword ptr [RCX + 0x8]
JMP 0x0010759d
LAB_00107599:
INC.LOCK dword ptr [RCX + 0x8]
LAB_0010759d:
XORPS XMM0,XMM0
LEA RSI,[RSP + 0x18]
MOVUPS xmmword ptr [RSI + 0x10],XMM0
LEA RCX,[0x108440]
MOV qword ptr [RSI + 0x28],RCX
LEA RCX,[0x108442]
MOV qword ptr [RSI + 0x20],RCX
LAB_001075bf:
MOV RDI,RAX
CALL 0x001090fa
MOV RAX,qword ptr [RSP + 0x38]
TEST RAX,RAX
JZ 0x001075e0
LEA RDI,[RSP + 0x28]
LAB_001075d6:
MOV RSI,RDI
MOV EDX,0x3
CALL RAX
LAB_001075e0:
MOV RDI,qword ptr [RSP + 0x20]
TEST RDI,RDI
JZ 0x001075ef
CALL 0x0010592e
LAB_001075ef:
LEA RAX,[RSP + 0x48]
MOV qword ptr [RAX + -0x30],RAX
MOV ECX,0x1
MOV qword ptr [RAX + -0x28],RCX
XORPS XMM0,XMM0
MOVUPS xmmword ptr [RAX + -0x20],XMM0
MOV EDX,0x3f800000
MOV dword ptr [RAX + -0x10],EDX
MOVUPS xmmword ptr [RAX + -0x8],XMM0
LEA RAX,[RSP + 0x80]
MOV qword ptr [RAX + -0x30],RAX
MOV qword ptr [RAX + -0x28],RCX
MOVUPS xmmword ptr [RAX + -0x20],XMM0
MOV dword ptr [RAX + -0x10],EDX
MOVUPS xmmword ptr [RAX + -0x8],XMM0
MOV RAX,qword ptr [RBX]
MOV qword ptr [RSP + 0x8],RAX
MOV RAX,qword ptr [RBX + 0x8]
MOV qword ptr [RSP + 0x10],RAX
TEST RAX,RAX
JZ 0x0010765a
MOV RCX,qword ptr [0x00112fc0]
CMP byte ptr [RCX],0x0
JZ 0x00107656
INC dword ptr [RAX + 0x8]
JMP 0x0010765a
LAB_00107656:
INC.LOCK dword ptr [RAX + 0x8]
LAB_0010765a:
LEA RSI,[RSP + 0x8]
LEA RDX,[RSP + 0x18]
LEA RCX,[RSP + 0x50]
MOV RDI,R12
CALL 0x001082d0
MOV EBP,EAX
MOV RDI,qword ptr [RSP + 0x10]
TEST RDI,RDI
JZ 0x00107682
CALL 0x0010592e
LAB_00107682:
MOV RDI,R12
MOV RSI,RBX
CALL 0x0010705e
MOV RDI,RAX
MOV RSI,R14
CALL 0x001084b0
MOV RDI,R15
MOV RSI,R14
CALL 0x00107202
MOV RDI,RAX
MOV RSI,RBX
CALL 0x001073a6
LAB_001076ae:
LEA RDI,[RSP + 0x50]
CALL 0x0010589a
LEA RDI,[RSP + 0x18]
CALL 0x0010589a
MOV EAX,EBP
ADD RSP,0x88
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
/* reaction::ObserverGraph::hasCycle(std::shared_ptr<reaction::ObserverDataNode>,
std::shared_ptr<reaction::ObserverDataNode>) */
int4 __thiscall
reaction::ObserverGraph::hasCycle(ObserverGraph *this,int8 *param_2,shared_ptr *param_3)
{
int4 uVar1;
int8 uVar2;
int8 local_b0;
_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *local_a8;
int8 *local_a0;
_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *local_98;
int8 local_90;
int8 uStack_88;
code *local_80;
code *local_78;
int8 uStack_70;
int8 *local_68;
int8 local_60;
int8 local_58;
int8 uStack_50;
int4 local_48;
int8 local_40;
int8 uStack_38;
local_a0 = (int8 *)
std::__detail::
_Map_base<std::shared_ptr<reaction::ObserverDataNode>,std::pair<std::shared_ptr<reaction::ObserverDataNode>const,std::unordered_set<std::shared_ptr<reaction::ObserverDataNode>,std::hash<std::shared_ptr<reaction::ObserverDataNode>>,std::equal_to<std::shared_ptr<reaction::ObserverDataNode>>,std::allocator<std::shared_ptr<reaction::ObserverDataNode>>>>,std::allocator<std::pair<std::shared_ptr<reaction::ObserverDataNode>const,std::unordered_set<std::shared_ptr<reaction::ObserverDataNode>,std::hash<std::shared_ptr<reaction::ObserverDataNode>>,std::equal_to<std::shared_ptr<reaction::ObserverDataNode>>,std::allocator<std::shared_ptr<reaction::ObserverDataNode>>>>>,std::__detail::_Select1st,std::equal_to<std::shared_ptr<reaction::ObserverDataNode>>,std::hash<std::shared_ptr<reaction::ObserverDataNode>>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<false,false,true>,true>
::operator[]((_Map_base<std::shared_ptr<reaction::ObserverDataNode>,std::pair<std::shared_ptr<reaction::ObserverDataNode>const,std::unordered_set<std::shared_ptr<reaction::ObserverDataNode>,std::hash<std::shared_ptr<reaction::ObserverDataNode>>,std::equal_to<std::shared_ptr<reaction::ObserverDataNode>>,std::allocator<std::shared_ptr<reaction::ObserverDataNode>>>>,std::allocator<std::pair<std::shared_ptr<reaction::ObserverDataNode>const,std::unordered_set<std::shared_ptr<reaction::ObserverDataNode>,std::hash<std::shared_ptr<reaction::ObserverDataNode>>,std::equal_to<std::shared_ptr<reaction::ObserverDataNode>>,std::allocator<std::shared_ptr<reaction::ObserverDataNode>>>>>,std::__detail::_Select1st,std::equal_to<std::shared_ptr<reaction::ObserverDataNode>>,std::hash<std::shared_ptr<reaction::ObserverDataNode>>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<false,false,true>,true>
*)this,(shared_ptr *)param_2);
std::
_Hashtable<std::shared_ptr<reaction::ObserverDataNode>,std::shared_ptr<reaction::ObserverDataNode>,std::allocator<std::shared_ptr<reaction::ObserverDataNode>>,std::__detail::_Identity,std::equal_to<std::shared_ptr<reaction::ObserverDataNode>>,std::hash<std::shared_ptr<reaction::ObserverDataNode>>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<false,true,true>>
::
_M_insert<std::shared_ptr<reaction::ObserverDataNode>const&,std::__detail::_AllocNode<std::allocator<std::__detail::_Hash_node<std::shared_ptr<reaction::ObserverDataNode>,false>>>>
(local_a0,param_3,&local_a0);
uVar2 = std::__detail::
_Map_base<std::shared_ptr<reaction::ObserverDataNode>,std::pair<std::shared_ptr<reaction::ObserverDataNode>const,std::unordered_map<std::shared_ptr<reaction::ObserverDataNode>,std::function<void(bool)>,std::hash<std::shared_ptr<reaction::ObserverDataNode>>,std::equal_to<std::shared_ptr<reaction::ObserverDataNode>>,std::allocator<std::pair<std::shared_ptr<reaction::ObserverDataNode>const,std::function<void(bool)>>>>>,std::allocator<std::pair<std::shared_ptr<reaction::ObserverDataNode>const,std::unordered_map<std::shared_ptr<reaction::ObserverDataNode>,std::function<void(bool)>,std::hash<std::shared_ptr<reaction::ObserverDataNode>>,std::equal_to<std::shared_ptr<reaction::ObserverDataNode>>,std::allocator<std::pair<std::shared_ptr<reaction::ObserverDataNode>const,std::function<void(bool)>>>>>>,std::__detail::_Select1st,std::equal_to<std::shared_ptr<reaction::ObserverDataNode>>,std::hash<std::shared_ptr<reaction::ObserverDataNode>>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<false,false,true>,true>
::operator[]((_Map_base<std::shared_ptr<reaction::ObserverDataNode>,std::pair<std::shared_ptr<reaction::ObserverDataNode>const,std::unordered_map<std::shared_ptr<reaction::ObserverDataNode>,std::function<void(bool)>,std::hash<std::shared_ptr<reaction::ObserverDataNode>>,std::equal_to<std::shared_ptr<reaction::ObserverDataNode>>,std::allocator<std::pair<std::shared_ptr<reaction::ObserverDataNode>const,std::function<void(bool)>>>>>,std::allocator<std::pair<std::shared_ptr<reaction::ObserverDataNode>const,std::unordered_map<std::shared_ptr<reaction::ObserverDataNode>,std::function<void(bool)>,std::hash<std::shared_ptr<reaction::ObserverDataNode>>,std::equal_to<std::shared_ptr<reaction::ObserverDataNode>>,std::allocator<std::pair<std::shared_ptr<reaction::ObserverDataNode>const,std::function<void(bool)>>>>>>,std::__detail::_Select1st,std::equal_to<std::shared_ptr<reaction::ObserverDataNode>>,std::hash<std::shared_ptr<reaction::ObserverDataNode>>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<false,false,true>,true>
*)(this + 0x38),param_3);
local_a0 = (int8 *)*param_2;
local_98 = (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)param_2[1];
if (local_98 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) {
if (*PTR___libc_single_threaded_00112fc0 == '\0') {
LOCK();
*(int *)(local_98 + 8) = *(int *)(local_98 + 8) + 1;
UNLOCK();
}
else {
*(int *)(local_98 + 8) = *(int *)(local_98 + 8) + 1;
}
}
local_90 = 0;
uStack_88 = 0;
local_78 = std::
_Function_handler<void(bool),reaction::ObserverGraph::hasCycle(std::shared_ptr<reaction::ObserverDataNode>,std::shared_ptr<reaction::ObserverDataNode>)::{lambda(bool)#1}>
::_M_invoke;
local_80 = std::
_Function_handler<void(bool),reaction::ObserverGraph::hasCycle(std::shared_ptr<reaction::ObserverDataNode>,std::shared_ptr<reaction::ObserverDataNode>)::{lambda(bool)#1}>
::_M_manager;
/* try { // try from 001075bf to 001075c6 has its CatchHandler @ 001076f2 */
std::
_Hashtable<std::shared_ptr<reaction::ObserverDataNode>,std::pair<std::shared_ptr<reaction::ObserverDataNode>const,std::function<void(bool)>>,std::allocator<std::pair<std::shared_ptr<reaction::ObserverDataNode>const,std::function<void(bool)>>>,std::__detail::_Select1st,std::equal_to<std::shared_ptr<reaction::ObserverDataNode>>,std::hash<std::shared_ptr<reaction::ObserverDataNode>>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<false,false,true>>
::
_M_emplace<std::pair<std::shared_ptr<reaction::ObserverDataNode>const,std::function<void(bool)>>>
(uVar2);
if (local_80 != (code *)0x0) {
/* try { // try from 001075d6 to 001075df has its CatchHandler @ 001076d6 */
(*local_80)(&local_90,&local_90,3);
}
if (local_98 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) {
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(local_98);
}
local_a0 = &uStack_70;
local_98 = (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x1;
local_90 = 0;
uStack_88 = 0;
local_80 = (code *)CONCAT44(local_80._4_4_,0x3f800000);
local_78 = (code *)0x0;
uStack_70 = 0;
local_68 = &uStack_38;
local_60 = 1;
local_58 = 0;
uStack_50 = 0;
local_48 = 0x3f800000;
local_40 = 0;
uStack_38 = 0;
local_b0 = *param_2;
local_a8 = (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)param_2[1];
if (local_a8 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) {
if (*PTR___libc_single_threaded_00112fc0 == '\0') {
LOCK();
*(int *)(local_a8 + 8) = *(int *)(local_a8 + 8) + 1;
UNLOCK();
}
else {
*(int *)(local_a8 + 8) = *(int *)(local_a8 + 8) + 1;
}
}
/* try { // try from 0010765a to 00107670 has its CatchHandler @ 001076de */
uVar1 = dfs(this,&local_b0,&local_a0,&local_68);
if (local_a8 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) {
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(local_a8);
}
/* try { // try from 00107682 to 001076ad has its CatchHandler @ 00107701 */
uVar2 = std::__detail::
_Map_base<std::shared_ptr<reaction::ObserverDataNode>,std::pair<std::shared_ptr<reaction::ObserverDataNode>const,std::unordered_set<std::shared_ptr<reaction::ObserverDataNode>,std::hash<std::shared_ptr<reaction::ObserverDataNode>>,std::equal_to<std::shared_ptr<reaction::ObserverDataNode>>,std::allocator<std::shared_ptr<reaction::ObserverDataNode>>>>,std::allocator<std::pair<std::shared_ptr<reaction::ObserverDataNode>const,std::unordered_set<std::shared_ptr<reaction::ObserverDataNode>,std::hash<std::shared_ptr<reaction::ObserverDataNode>>,std::equal_to<std::shared_ptr<reaction::ObserverDataNode>>,std::allocator<std::shared_ptr<reaction::ObserverDataNode>>>>>,std::__detail::_Select1st,std::equal_to<std::shared_ptr<reaction::ObserverDataNode>>,std::hash<std::shared_ptr<reaction::ObserverDataNode>>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<false,false,true>,true>
::operator[]((_Map_base<std::shared_ptr<reaction::ObserverDataNode>,std::pair<std::shared_ptr<reaction::ObserverDataNode>const,std::unordered_set<std::shared_ptr<reaction::ObserverDataNode>,std::hash<std::shared_ptr<reaction::ObserverDataNode>>,std::equal_to<std::shared_ptr<reaction::ObserverDataNode>>,std::allocator<std::shared_ptr<reaction::ObserverDataNode>>>>,std::allocator<std::pair<std::shared_ptr<reaction::ObserverDataNode>const,std::unordered_set<std::shared_ptr<reaction::ObserverDataNode>,std::hash<std::shared_ptr<reaction::ObserverDataNode>>,std::equal_to<std::shared_ptr<reaction::ObserverDataNode>>,std::allocator<std::shared_ptr<reaction::ObserverDataNode>>>>>,std::__detail::_Select1st,std::equal_to<std::shared_ptr<reaction::ObserverDataNode>>,std::hash<std::shared_ptr<reaction::ObserverDataNode>>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<false,false,true>,true>
*)this,(shared_ptr *)param_2);
std::
_Hashtable<std::shared_ptr<reaction::ObserverDataNode>,std::shared_ptr<reaction::ObserverDataNode>,std::allocator<std::shared_ptr<reaction::ObserverDataNode>>,std::__detail::_Identity,std::equal_to<std::shared_ptr<reaction::ObserverDataNode>>,std::hash<std::shared_ptr<reaction::ObserverDataNode>>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<false,true,true>>
::_M_erase(uVar2,param_3);
uVar2 = std::__detail::
_Map_base<std::shared_ptr<reaction::ObserverDataNode>,std::pair<std::shared_ptr<reaction::ObserverDataNode>const,std::unordered_map<std::shared_ptr<reaction::ObserverDataNode>,std::function<void(bool)>,std::hash<std::shared_ptr<reaction::ObserverDataNode>>,std::equal_to<std::shared_ptr<reaction::ObserverDataNode>>,std::allocator<std::pair<std::shared_ptr<reaction::ObserverDataNode>const,std::function<void(bool)>>>>>,std::allocator<std::pair<std::shared_ptr<reaction::ObserverDataNode>const,std::unordered_map<std::shared_ptr<reaction::ObserverDataNode>,std::function<void(bool)>,std::hash<std::shared_ptr<reaction::ObserverDataNode>>,std::equal_to<std::shared_ptr<reaction::ObserverDataNode>>,std::allocator<std::pair<std::shared_ptr<reaction::ObserverDataNode>const,std::function<void(bool)>>>>>>,std::__detail::_Select1st,std::equal_to<std::shared_ptr<reaction::ObserverDataNode>>,std::hash<std::shared_ptr<reaction::ObserverDataNode>>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<false,false,true>,true>
::operator[]((_Map_base<std::shared_ptr<reaction::ObserverDataNode>,std::pair<std::shared_ptr<reaction::ObserverDataNode>const,std::unordered_map<std::shared_ptr<reaction::ObserverDataNode>,std::function<void(bool)>,std::hash<std::shared_ptr<reaction::ObserverDataNode>>,std::equal_to<std::shared_ptr<reaction::ObserverDataNode>>,std::allocator<std::pair<std::shared_ptr<reaction::ObserverDataNode>const,std::function<void(bool)>>>>>,std::allocator<std::pair<std::shared_ptr<reaction::ObserverDataNode>const,std::unordered_map<std::shared_ptr<reaction::ObserverDataNode>,std::function<void(bool)>,std::hash<std::shared_ptr<reaction::ObserverDataNode>>,std::equal_to<std::shared_ptr<reaction::ObserverDataNode>>,std::allocator<std::pair<std::shared_ptr<reaction::ObserverDataNode>const,std::function<void(bool)>>>>>>,std::__detail::_Select1st,std::equal_to<std::shared_ptr<reaction::ObserverDataNode>>,std::hash<std::shared_ptr<reaction::ObserverDataNode>>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<false,false,true>,true>
*)(this + 0x38),param_3);
std::
_Hashtable<std::shared_ptr<reaction::ObserverDataNode>,std::pair<std::shared_ptr<reaction::ObserverDataNode>const,std::function<void(bool)>>,std::allocator<std::pair<std::shared_ptr<reaction::ObserverDataNode>const,std::function<void(bool)>>>,std::__detail::_Select1st,std::equal_to<std::shared_ptr<reaction::ObserverDataNode>>,std::hash<std::shared_ptr<reaction::ObserverDataNode>>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<false,false,true>>
::_M_erase(uVar2,param_2);
std::
_Hashtable<std::shared_ptr<reaction::ObserverDataNode>,std::shared_ptr<reaction::ObserverDataNode>,std::allocator<std::shared_ptr<reaction::ObserverDataNode>>,std::__detail::_Identity,std::equal_to<std::shared_ptr<reaction::ObserverDataNode>>,std::hash<std::shared_ptr<reaction::ObserverDataNode>>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<false,true,true>>
::~_Hashtable((_Hashtable<std::shared_ptr<reaction::ObserverDataNode>,std::shared_ptr<reaction::ObserverDataNode>,std::allocator<std::shared_ptr<reaction::ObserverDataNode>>,std::__detail::_Identity,std::equal_to<std::shared_ptr<reaction::ObserverDataNode>>,std::hash<std::shared_ptr<reaction::ObserverDataNode>>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<false,true,true>>
*)&local_68);
std::
_Hashtable<std::shared_ptr<reaction::ObserverDataNode>,std::shared_ptr<reaction::ObserverDataNode>,std::allocator<std::shared_ptr<reaction::ObserverDataNode>>,std::__detail::_Identity,std::equal_to<std::shared_ptr<reaction::ObserverDataNode>>,std::hash<std::shared_ptr<reaction::ObserverDataNode>>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<false,true,true>>
::~_Hashtable((_Hashtable<std::shared_ptr<reaction::ObserverDataNode>,std::shared_ptr<reaction::ObserverDataNode>,std::allocator<std::shared_ptr<reaction::ObserverDataNode>>,std::__detail::_Identity,std::equal_to<std::shared_ptr<reaction::ObserverDataNode>>,std::hash<std::shared_ptr<reaction::ObserverDataNode>>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<false,true,true>>
*)&local_a0);
return uVar1;
}
|
|
9,399 |
OpenSubdiv::v3_6_0::Far::PatchTableBuilder::findDescendantPatches(int, int, int)
|
NVIDIA-RTX[P]OSD-Lite/opensubdiv/far/patchTableFactory.cpp
|
inline void
PatchTableBuilder::findDescendantPatches(int levelIndex, Index faceIndex, int targetLevel) {
//
// If we have reached the target level or a leaf, append the patch (if
// the face qualifies), otherwise recursively search the children:
//
if ((levelIndex == targetLevel) || _patchBuilder->IsFaceALeaf(levelIndex, faceIndex)) {
if (_patchBuilder->IsFaceAPatch(levelIndex, faceIndex)) {
appendPatch(levelIndex, faceIndex);
}
} else {
TopologyLevel const & level = _refiner.GetLevel(levelIndex);
ConstIndexArray childFaces = level.GetFaceChildFaces(faceIndex);
for (int i = 0; i < childFaces.size(); ++i) {
if (Vtr::IndexIsValid(childFaces[i])) {
findDescendantPatches(levelIndex + 1, childFaces[i], targetLevel);
}
}
}
}
|
O3
|
cpp
|
OpenSubdiv::v3_6_0::Far::PatchTableBuilder::findDescendantPatches(int, int, int):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %edx, %r15d
movl %esi, %ebx
movq %rdi, %r14
cmpl %ecx, %esi
je 0x705af
movl %ecx, %ebp
movq 0x38(%r14), %rdi
movl %ebx, %esi
movl %r15d, %edx
callq 0x3a500
testb %al, %al
je 0x705f7
movq 0x38(%r14), %rdi
movl %ebx, %esi
movl %r15d, %edx
callq 0x3a8a0
testb %al, %al
je 0x70678
leaq 0x58(%r14), %rdi
movq %rsp, %rsi
movl %r15d, (%rsi)
movl %ebx, 0x4(%rsi)
callq 0x38830
movq 0x38(%r14), %rdi
movl %ebx, %esi
movl %r15d, %edx
movl $0xffffffff, %ecx # imm = 0xFFFFFFFF
callq 0x396e0
testb %al, %al
je 0x70659
incl 0x70(%r14)
jmp 0x70678
movq (%r14), %rax
movslq %ebx, %rcx
movq 0x60(%rax), %rax
leaq (%rcx,%rcx,2), %rcx
movq 0x10(%rax,%rcx,8), %rax
leal (%r15,%r15), %edx
movq 0x58(%rax), %rcx
movslq %edx, %rdx
movslq (%rcx,%rdx,4), %r12
testq %r12, %r12
jle 0x70678
leal 0x1(,%r15,2), %edx
movslq %edx, %rdx
movslq (%rcx,%rdx,4), %r15
shlq $0x2, %r15
addq 0x78(%rax), %r15
incl %ebx
xorl %r13d, %r13d
movl (%r15,%r13,4), %edx
cmpl $-0x1, %edx
je 0x7064f
movq %r14, %rdi
movl %ebx, %esi
movl %ebp, %ecx
callq 0x389e0
incq %r13
cmpq %r13, %r12
jne 0x7063a
jmp 0x70678
incl 0x74(%r14)
cmpb $0x1, 0xc0(%r14)
jne 0x70678
movq 0xc8(%r14), %rdi
movl %ebx, %esi
movl %r15d, %edx
callq 0x3a590
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
|
_ZN10OpenSubdiv6v3_6_03Far17PatchTableBuilder21findDescendantPatchesEiii:
push rbp
push r15
push r14
push r13
push r12
push rbx
push rax
mov r15d, edx
mov ebx, esi
mov r14, rdi
cmp esi, ecx
jz short loc_705AF
mov ebp, ecx
mov rdi, [r14+38h]; this
mov esi, ebx; int
mov edx, r15d; int
call __ZNK10OpenSubdiv6v3_6_03Far12PatchBuilder11IsFaceALeafEii; OpenSubdiv::v3_6_0::Far::PatchBuilder::IsFaceALeaf(int,int)
test al, al
jz short loc_705F7
loc_705AF:
mov rdi, [r14+38h]; this
mov esi, ebx; int
mov edx, r15d; int
call __ZNK10OpenSubdiv6v3_6_03Far12PatchBuilder12IsFaceAPatchEii; OpenSubdiv::v3_6_0::Far::PatchBuilder::IsFaceAPatch(int,int)
test al, al
jz loc_70678
lea rdi, [r14+58h]
mov rsi, rsp
mov [rsi], r15d
mov [rsi+4], ebx
call __ZNSt6vectorIN10OpenSubdiv6v3_6_03Far17PatchTableBuilder10PatchTupleESaIS4_EE12emplace_backIJS4_EEERS4_DpOT_; std::vector<OpenSubdiv::v3_6_0::Far::PatchTableBuilder::PatchTuple>::emplace_back<OpenSubdiv::v3_6_0::Far::PatchTableBuilder::PatchTuple>(OpenSubdiv::v3_6_0::Far::PatchTableBuilder::PatchTuple &&)
mov rdi, [r14+38h]; this
mov esi, ebx; int
mov edx, r15d; int
mov ecx, 0FFFFFFFFh; int
call __ZNK10OpenSubdiv6v3_6_03Far12PatchBuilder14IsPatchRegularEiii; OpenSubdiv::v3_6_0::Far::PatchBuilder::IsPatchRegular(int,int,int)
test al, al
jz short loc_70659
inc dword ptr [r14+70h]
jmp loc_70678
loc_705F7:
mov rax, [r14]
movsxd rcx, ebx
mov rax, [rax+60h]
lea rcx, [rcx+rcx*2]
mov rax, [rax+rcx*8+10h]
lea edx, [r15+r15]
mov rcx, [rax+58h]
movsxd rdx, edx
movsxd r12, dword ptr [rcx+rdx*4]
test r12, r12
jle short loc_70678
lea edx, ds:1[r15*2]
movsxd rdx, edx
movsxd r15, dword ptr [rcx+rdx*4]
shl r15, 2
add r15, [rax+78h]
inc ebx
xor r13d, r13d
loc_7063A:
mov edx, [r15+r13*4]; int
cmp edx, 0FFFFFFFFh
jz short loc_7064F
mov rdi, r14; this
mov esi, ebx; int
mov ecx, ebp; int
call __ZN10OpenSubdiv6v3_6_03Far17PatchTableBuilder21findDescendantPatchesEiii; OpenSubdiv::v3_6_0::Far::PatchTableBuilder::findDescendantPatches(int,int,int)
loc_7064F:
inc r13
cmp r12, r13
jnz short loc_7063A
jmp short loc_70678
loc_70659:
inc dword ptr [r14+74h]
cmp byte ptr [r14+0C0h], 1
jnz short loc_70678
mov rdi, [r14+0C8h]; this
mov esi, ebx; int
mov edx, r15d; int
call __ZN10OpenSubdiv6v3_6_03Far17PatchTableBuilder19LegacyGregoryHelper12AddPatchFaceEii; OpenSubdiv::v3_6_0::Far::PatchTableBuilder::LegacyGregoryHelper::AddPatchFace(int,int)
loc_70678:
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
|
long long OpenSubdiv::v3_6_0::Far::PatchTableBuilder::findDescendantPatches(
OpenSubdiv::v3_6_0::Far::PatchBuilder **this,
int a2,
int a3,
int a4)
{
unsigned long long v4; // rax
long long result; // rax
long long v8; // rcx
long long v9; // r12
long long v10; // r15
long long i; // r13
int v12; // edx
unsigned long long v13; // [rsp-8h] [rbp-38h] BYREF
v13 = v4;
if ( a2 == a4 || (unsigned __int8)OpenSubdiv::v3_6_0::Far::PatchBuilder::IsFaceALeaf(this[7], a2, a3) )
{
result = OpenSubdiv::v3_6_0::Far::PatchBuilder::IsFaceAPatch(this[7], a2, a3);
if ( (_BYTE)result )
{
v13 = __PAIR64__(a2, a3);
std::vector<OpenSubdiv::v3_6_0::Far::PatchTableBuilder::PatchTuple>::emplace_back<OpenSubdiv::v3_6_0::Far::PatchTableBuilder::PatchTuple>(
this + 11,
&v13);
result = OpenSubdiv::v3_6_0::Far::PatchBuilder::IsPatchRegular(this[7], a2, a3, -1);
if ( (_BYTE)result )
{
++*((_DWORD *)this + 28);
}
else
{
++*((_DWORD *)this + 29);
if ( *((_BYTE *)this + 192) == 1 )
return OpenSubdiv::v3_6_0::Far::PatchTableBuilder::LegacyGregoryHelper::AddPatchFace(this[25], a2, a3);
}
}
}
else
{
result = *(_QWORD *)(*((_QWORD *)*this + 12) + 24LL * a2 + 16);
v8 = *(_QWORD *)(result + 88);
v9 = *(int *)(v8 + 8LL * a3);
if ( v9 > 0 )
{
v10 = *(_QWORD *)(result + 120) + 4LL * *(int *)(v8 + 4LL * (2 * a3 + 1));
for ( i = 0LL; i != v9; ++i )
{
v12 = *(_DWORD *)(v10 + 4 * i);
if ( v12 != -1 )
result = OpenSubdiv::v3_6_0::Far::PatchTableBuilder::findDescendantPatches(
(OpenSubdiv::v3_6_0::Far::PatchTableBuilder *)this,
a2 + 1,
v12,
a4);
}
}
}
return result;
}
|
findDescendantPatches:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
PUSH RAX
MOV R15D,EDX
MOV EBX,ESI
MOV R14,RDI
CMP ESI,ECX
JZ 0x001705af
MOV EBP,ECX
MOV RDI,qword ptr [R14 + 0x38]
MOV ESI,EBX
MOV EDX,R15D
CALL 0x0013a500
TEST AL,AL
JZ 0x001705f7
LAB_001705af:
MOV RDI,qword ptr [R14 + 0x38]
MOV ESI,EBX
MOV EDX,R15D
CALL 0x0013a8a0
TEST AL,AL
JZ 0x00170678
LEA RDI,[R14 + 0x58]
MOV RSI,RSP
MOV dword ptr [RSI],R15D
MOV dword ptr [RSI + 0x4],EBX
CALL 0x00138830
MOV RDI,qword ptr [R14 + 0x38]
MOV ESI,EBX
MOV EDX,R15D
MOV ECX,0xffffffff
CALL 0x001396e0
TEST AL,AL
JZ 0x00170659
INC dword ptr [R14 + 0x70]
JMP 0x00170678
LAB_001705f7:
MOV RAX,qword ptr [R14]
MOVSXD RCX,EBX
MOV RAX,qword ptr [RAX + 0x60]
LEA RCX,[RCX + RCX*0x2]
MOV RAX,qword ptr [RAX + RCX*0x8 + 0x10]
LEA EDX,[R15 + R15*0x1]
MOV RCX,qword ptr [RAX + 0x58]
MOVSXD RDX,EDX
MOVSXD R12,dword ptr [RCX + RDX*0x4]
TEST R12,R12
JLE 0x00170678
LEA EDX,[0x1 + R15*0x2]
MOVSXD RDX,EDX
MOVSXD R15,dword ptr [RCX + RDX*0x4]
SHL R15,0x2
ADD R15,qword ptr [RAX + 0x78]
INC EBX
XOR R13D,R13D
LAB_0017063a:
MOV EDX,dword ptr [R15 + R13*0x4]
CMP EDX,-0x1
JZ 0x0017064f
MOV RDI,R14
MOV ESI,EBX
MOV ECX,EBP
CALL 0x001389e0
LAB_0017064f:
INC R13
CMP R12,R13
JNZ 0x0017063a
JMP 0x00170678
LAB_00170659:
INC dword ptr [R14 + 0x74]
CMP byte ptr [R14 + 0xc0],0x1
JNZ 0x00170678
MOV RDI,qword ptr [R14 + 0xc8]
MOV ESI,EBX
MOV EDX,R15D
CALL 0x0013a590
LAB_00170678:
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
/* OpenSubdiv::v3_6_0::Far::PatchTableBuilder::findDescendantPatches(int, int, int) */
void __thiscall
OpenSubdiv::v3_6_0::Far::PatchTableBuilder::findDescendantPatches
(PatchTableBuilder *this,int param_1,int param_2,int param_3)
{
int iVar1;
int iVar2;
long lVar3;
char cVar4;
long lVar5;
long lVar6;
int local_38;
int local_34;
if ((param_1 == param_3) ||
(cVar4 = PatchBuilder::IsFaceALeaf(*(PatchBuilder **)(this + 0x38),param_1,param_2),
cVar4 != '\0')) {
cVar4 = PatchBuilder::IsFaceAPatch(*(PatchBuilder **)(this + 0x38),param_1,param_2);
if (cVar4 != '\0') {
_local_38 = CONCAT44(param_1,param_2);
std::
vector<OpenSubdiv::v3_6_0::Far::PatchTableBuilder::PatchTuple,std::allocator<OpenSubdiv::v3_6_0::Far::PatchTableBuilder::PatchTuple>>
::emplace_back<OpenSubdiv::v3_6_0::Far::PatchTableBuilder::PatchTuple>
((vector<OpenSubdiv::v3_6_0::Far::PatchTableBuilder::PatchTuple,std::allocator<OpenSubdiv::v3_6_0::Far::PatchTableBuilder::PatchTuple>>
*)(this + 0x58),(PatchTuple *)&local_38);
cVar4 = PatchBuilder::IsPatchRegular(*(PatchBuilder **)(this + 0x38),param_1,param_2,-1);
if (cVar4 == '\0') {
*(int *)(this + 0x74) = *(int *)(this + 0x74) + 1;
if (this[0xc0] == (PatchTableBuilder)0x1) {
LegacyGregoryHelper::AddPatchFace(*(LegacyGregoryHelper **)(this + 200),param_1,param_2);
}
}
else {
*(int *)(this + 0x70) = *(int *)(this + 0x70) + 1;
}
}
}
else {
lVar3 = *(long *)(*(long *)(*(long *)this + 0x60) + 0x10 + (long)param_1 * 0x18);
lVar6 = *(long *)(lVar3 + 0x58);
lVar5 = (long)*(int *)(lVar6 + (long)(param_2 * 2) * 4);
if (0 < lVar5) {
iVar1 = *(int *)(lVar6 + (long)(param_2 * 2 + 1) * 4);
lVar3 = *(long *)(lVar3 + 0x78);
lVar6 = 0;
do {
iVar2 = *(int *)((long)iVar1 * 4 + lVar3 + lVar6 * 4);
if (iVar2 != -1) {
findDescendantPatches(this,param_1 + 1,iVar2,param_3);
}
lVar6 = lVar6 + 1;
} while (lVar5 != lVar6);
}
}
return;
}
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.