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
|
---|---|---|---|---|---|---|---|---|---|---|---|
61,800 |
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 (&) [8], 0>(char const (&) [8]) 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 (&) [8], 0>(char const (&) [8]) const:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x40, %rsp
movq %rdi, %r14
cmpb $0x1, (%rdi)
jne 0xaceb0
movq %rsi, %r15
movq 0x8(%r14), %r12
movq (%r12), %rbx
movq 0x8(%r12), %rax
cmpq %rax, %rbx
je 0xace95
movq %rbx, %rdi
movq %r15, %rsi
callq 0x1b220
testl %eax, %eax
je 0xace92
addq $0x30, %rbx
jmp 0xace73
movq %rbx, %rax
movq 0x8(%r14), %rcx
cmpq 0x8(%rcx), %rax
je 0xacf0c
addq $0x20, %rax
addq $0x40, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movl $0x20, %edi
callq 0x1b440
movq %rax, %rbx
movq %r14, %rdi
callq 0x5eed4
leaq 0x20(%rsp), %rdx
movq %rax, (%rdx)
leaq 0x47ede(%rip), %rsi # 0xf4db2
movq %rsp, %rdi
callq 0xabd57
movb $0x1, %bpl
movq %rsp, %rdx
movq %rbx, %rdi
movl $0x130, %esi # imm = 0x130
movq %r14, %rcx
callq 0x87292
xorl %ebp, %ebp
leaq 0x80ffd(%rip), %rsi # 0x12def8
leaq -0x51eec(%rip), %rdx # 0x5b016
movq %rbx, %rdi
callq 0x1bf00
jmp 0xacf85
movl $0x20, %edi
callq 0x1b440
movq %rax, %rbx
leaq 0x30(%rsp), %r12
movq %r12, -0x10(%r12)
movq %r15, %rdi
callq 0x1b3e0
leaq (%rax,%r15), %rdx
leaq 0x20(%rsp), %rdi
movq %r15, %rsi
callq 0x22630
leaq 0x47e9f(%rip), %rsi # 0xf4de2
leaq 0x47e9e(%rip), %rcx # 0xf4de8
movq %rsp, %rdi
leaq 0x20(%rsp), %rdx
callq 0xac360
movb $0x1, %bpl
movq %rsp, %rdx
movq %rbx, %rdi
movl $0x193, %esi # imm = 0x193
movq %r14, %rcx
callq 0xac6da
xorl %ebp, %ebp
leaq 0x80f02(%rip), %rsi # 0x12de78
leaq -0x51f67(%rip), %rdx # 0x5b016
movq %rbx, %rdi
callq 0x1bf00
movq %rax, %r14
leaq 0x10(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xacfab
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x1b8c0
jmp 0xacfab
movq %rax, %r14
movb $0x1, %bpl
movq 0x20(%rsp), %rdi
cmpq %r12, %rdi
je 0xacfe4
movq 0x30(%rsp), %rsi
jmp 0xacfd4
jmp 0xacfde
movq %rax, %r14
leaq 0x10(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xacfe4
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x1b8c0
jmp 0xacfe4
movq %rax, %r14
movb $0x1, %bpl
testb %bpl, %bpl
je 0xacff1
movq %rbx, %rdi
callq 0x1b660
movq %r14, %rdi
callq 0x1bf90
nop
|
_ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE2atIRA8_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_ACEB0
mov r15, rsi
mov r12, [r14+8]
mov rbx, [r12]
loc_ACE73:
mov rax, [r12+8]
cmp rbx, rax
jz short loc_ACE95
mov rdi, rbx
mov rsi, r15
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7compareEPKc; std::string::compare(char const*)
test eax, eax
jz short loc_ACE92
add rbx, 30h ; '0'
jmp short loc_ACE73
loc_ACE92:
mov rax, rbx
loc_ACE95:
mov rcx, [r14+8]
cmp rax, [rcx+8]
jz short loc_ACF0C
add rax, 20h ; ' '
add rsp, 40h
pop rbx
pop r12
pop r14
pop r15
pop rbp
retn
loc_ACEB0:
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_ACF85
loc_ACF0C:
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_ACF85:
mov r14, rax
lea rax, [rsp+68h+var_58]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_ACFAB
mov rsi, [rsp+68h+var_58]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_ACFAB
mov r14, rax
mov bpl, 1
loc_ACFAB:
mov rdi, [rsp+68h+var_48]
cmp rdi, r12
jz short loc_ACFE4
mov rsi, [rsp+68h+var_38]
jmp short loc_ACFD4
jmp short loc_ACFDE
mov r14, rax
lea rax, [rsp+68h+var_58]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_ACFE4
mov rsi, [rsp+68h+var_58]
loc_ACFD4:
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_ACFE4
loc_ACFDE:
mov r14, rax
mov bpl, 1
loc_ACFE4:
test bpl, bpl
jz short loc_ACFF1
mov rdi, rbx; void *
call ___cxa_free_exception
loc_ACFF1:
mov rdi, r14
call __Unwind_Resume
|
long long ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE2atIRA8_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_IhSaIhEEvE2atIRA8_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 0x001aceb0
MOV R15,RSI
MOV R12,qword ptr [R14 + 0x8]
MOV RBX,qword ptr [R12]
LAB_001ace73:
MOV RAX,qword ptr [R12 + 0x8]
CMP RBX,RAX
JZ 0x001ace95
MOV RDI,RBX
MOV RSI,R15
CALL 0x0011b220
TEST EAX,EAX
JZ 0x001ace92
ADD RBX,0x30
JMP 0x001ace73
LAB_001ace92:
MOV RAX,RBX
LAB_001ace95:
MOV RCX,qword ptr [R14 + 0x8]
CMP RAX,qword ptr [RCX + 0x8]
JZ 0x001acf0c
ADD RAX,0x20
ADD RSP,0x40
POP RBX
POP R12
POP R14
POP R15
POP RBP
RET
LAB_001aceb0:
MOV EDI,0x20
CALL 0x0011b440
MOV RBX,RAX
MOV RDI,R14
CALL 0x0015eed4
LEA RDX,[RSP + 0x20]
MOV qword ptr [RDX],RAX
LAB_001acecd:
LEA RSI,[0x1f4db2]
MOV RDI,RSP
CALL 0x001abd57
MOV BPL,0x1
LAB_001acedf:
MOV RDX,RSP
MOV RDI,RBX
MOV ESI,0x130
MOV RCX,R14
CALL 0x00187292
XOR EBP,EBP
LEA RSI,[0x22def8]
LEA RDX,[0x15b016]
MOV RDI,RBX
CALL 0x0011bf00
LAB_001acf0c:
MOV EDI,0x20
CALL 0x0011b440
MOV RBX,RAX
LEA R12,[RSP + 0x30]
MOV qword ptr [R12 + -0x10],R12
MOV RDI,R15
CALL 0x0011b3e0
LEA RDX,[RAX + R15*0x1]
LAB_001acf2f:
LEA RDI,[RSP + 0x20]
MOV RSI,R15
CALL 0x00122630
LAB_001acf3c:
LEA RSI,[0x1f4de2]
LEA RCX,[0x1f4de8]
MOV RDI,RSP
LEA RDX,[RSP + 0x20]
CALL 0x001ac360
MOV BPL,0x1
LAB_001acf5a:
MOV RDX,RSP
MOV RDI,RBX
MOV ESI,0x193
MOV RCX,R14
CALL 0x001ac6da
XOR EBP,EBP
LEA RSI,[0x22de78]
LEA RDX,[0x15b016]
MOV RDI,RBX
CALL 0x0011bf00
|
char * _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE2atIRA8_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 001acecd to 001acedb has its CatchHandler @ 001acfde */
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 001acedf to 001acf09 has its CatchHandler @ 001acfbe */
_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 001acf2f to 001acf3b has its CatchHandler @ 001acfbc */
std::__cxx11::string::_M_construct<char_const*>(local_48,param_2,param_2 + sVar5);
/* try { // try from 001acf3c to 001acf56 has its CatchHandler @ 001acfa5 */
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 001acf5a to 001acf84 has its CatchHandler @ 001acf85 */
_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;
}
|
|
61,801 |
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 (&) [8], 0>(char const (&) [8]) 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;
}
|
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> 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 (&) [8], 0>(char const (&) [8]) const:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x40, %rsp
movq %rdi, %r14
cmpb $0x1, (%rdi)
jne 0xac5b9
movq %rsi, %r15
movq 0x8(%r14), %r12
movq (%r12), %rbx
movq 0x8(%r12), %rax
cmpq %rax, %rbx
je 0xac5a3
movq %rbx, %rdi
movq %r15, %rsi
callq 0x1b220
testl %eax, %eax
je 0xac598
addq $0x30, %rbx
movq 0x8(%r12), %rax
cmpq %rax, %rbx
jne 0xac579
jmp 0xac59b
movq %rbx, %rax
movq 0x8(%r14), %rcx
movq 0x8(%rcx), %rbx
cmpq %rbx, %rax
je 0xac617
addq $0x20, %rax
addq $0x40, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movl $0x20, %edi
callq 0x1b440
movq %rax, %rbx
movq %r14, %rdi
callq 0x5f5fc
movq %rsp, %rdx
movq %rax, (%rdx)
leaq 0x467c7(%rip), %rsi # 0xf2da2
leaq 0x20(%rsp), %rdi
callq 0xab485
movb $0x1, %bpl
leaq 0x20(%rsp), %rdx
movq %rbx, %rdi
movl $0x130, %esi # imm = 0x130
movq %r14, %rcx
callq 0x86dea
xorl %ebp, %ebp
leaq 0x7f932(%rip), %rsi # 0x12bf38
leaq -0x50ddb(%rip), %rdx # 0x5b832
movq %rbx, %rdi
callq 0x1bf00
jmp 0xac690
movl $0x20, %edi
callq 0x1b440
movq %rax, %rbx
leaq 0x10(%rsp), %r12
movq %r12, -0x10(%r12)
movq %r15, %rdi
callq 0x1b3e0
leaq (%rax,%r15), %rdx
movq %rsp, %rdi
movq %r15, %rsi
callq 0x225b4
leaq 0x46786(%rip), %rsi # 0xf2dd2
leaq 0x46785(%rip), %rcx # 0xf2dd8
leaq 0x20(%rsp), %rdi
movq %rsp, %rdx
callq 0xaba62
movb $0x1, %bpl
leaq 0x20(%rsp), %rdx
movq %rbx, %rdi
movl $0x193, %esi # imm = 0x193
movq %r14, %rcx
callq 0xabdda
xorl %ebp, %ebp
leaq 0x7f837(%rip), %rsi # 0x12beb8
leaq -0x50e56(%rip), %rdx # 0x5b832
movq %rbx, %rdi
callq 0x1bf00
movq %rax, %r14
leaq 0x30(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xac6ae
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x1b8c0
movq (%rsp), %rdi
cmpq %r12, %rdi
je 0xac6f9
movq 0x10(%rsp), %rsi
jmp 0xac6f1
movq %rax, %r14
movq (%rsp), %rdi
cmpq %r12, %rdi
je 0xac703
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x1b8c0
jmp 0xac703
jmp 0xac700
movq %rax, %r14
leaq 0x30(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xac6f9
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x1b8c0
testb %bpl, %bpl
jne 0xac703
jmp 0xac70b
movq %rax, %r14
movq %rbx, %rdi
callq 0x1b660
movq %r14, %rdi
callq 0x1bf90
nop
|
_ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE2atIRA8_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_AC5B9
mov r15, rsi
mov r12, [r14+8]
mov rbx, [r12]
mov rax, [r12+8]
cmp rbx, rax
jz short loc_AC5A3
loc_AC579:
mov rdi, rbx
mov rsi, r15
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7compareEPKc; std::string::compare(char const*)
test eax, eax
jz short loc_AC598
add rbx, 30h ; '0'
mov rax, [r12+8]
cmp rbx, rax
jnz short loc_AC579
jmp short loc_AC59B
loc_AC598:
mov rax, rbx
loc_AC59B:
mov rcx, [r14+8]
mov rbx, [rcx+8]
loc_AC5A3:
cmp rax, rbx
jz short loc_AC617
add rax, 20h ; ' '
add rsp, 40h
pop rbx
pop r12
pop r14
pop r15
pop rbp
retn
loc_AC5B9:
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_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_AC690
loc_AC617:
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_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_AC690:
mov r14, rax
lea rax, [rsp+68h+var_38]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_AC6AE
mov rsi, [rsp+68h+var_38]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_AC6AE:
mov rdi, [rsp+68h+var_68]
cmp rdi, r12
jz short loc_AC6F9
mov rsi, [rsp+68h+var_58]
jmp short loc_AC6F1
mov r14, rax
mov rdi, [rsp+68h+var_68]; void *
cmp rdi, r12
jz short loc_AC703
mov rsi, [rsp+68h+var_58]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_AC703
jmp short loc_AC700
mov r14, rax
lea rax, [rsp+68h+var_38]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_AC6F9
mov rsi, [rsp+68h+var_38]
loc_AC6F1:
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_AC6F9:
test bpl, bpl
jnz short loc_AC703
jmp short loc_AC70B
loc_AC700:
mov r14, rax
loc_AC703:
mov rdi, rbx; void *
call ___cxa_free_exception
loc_AC70B:
mov rdi, r14
call __Unwind_Resume
|
long long ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE2atIRA8_KcTnNSt9enable_ifIXsr6detail32is_usable_as_basic_json_key_typeISD_T_EE5valueEiE4typeELi0EEERKSD_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_error6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_(
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_range6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_(
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;
}
|
_ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE2atIRA8_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 0x001ac5b9
MOV R15,RSI
MOV R12,qword ptr [R14 + 0x8]
MOV RBX,qword ptr [R12]
MOV RAX,qword ptr [R12 + 0x8]
CMP RBX,RAX
JZ 0x001ac5a3
LAB_001ac579:
MOV RDI,RBX
MOV RSI,R15
CALL 0x0011b220
TEST EAX,EAX
JZ 0x001ac598
ADD RBX,0x30
MOV RAX,qword ptr [R12 + 0x8]
CMP RBX,RAX
JNZ 0x001ac579
JMP 0x001ac59b
LAB_001ac598:
MOV RAX,RBX
LAB_001ac59b:
MOV RCX,qword ptr [R14 + 0x8]
MOV RBX,qword ptr [RCX + 0x8]
LAB_001ac5a3:
CMP RAX,RBX
JZ 0x001ac617
ADD RAX,0x20
ADD RSP,0x40
POP RBX
POP R12
POP R14
POP R15
POP RBP
RET
LAB_001ac5b9:
MOV EDI,0x20
CALL 0x0011b440
MOV RBX,RAX
MOV RDI,R14
CALL 0x0015f5fc
MOV RDX,RSP
MOV qword ptr [RDX],RAX
LAB_001ac5d4:
LEA RSI,[0x1f2da2]
LEA RDI,[RSP + 0x20]
CALL 0x001ab485
MOV BPL,0x1
LAB_001ac5e8:
LEA RDX,[RSP + 0x20]
MOV RDI,RBX
MOV ESI,0x130
MOV RCX,R14
CALL 0x00186dea
XOR EBP,EBP
LEA RSI,[0x22bf38]
LEA RDX,[0x15b832]
MOV RDI,RBX
CALL 0x0011bf00
LAB_001ac617:
MOV EDI,0x20
CALL 0x0011b440
MOV RBX,RAX
LEA R12,[RSP + 0x10]
MOV qword ptr [R12 + -0x10],R12
MOV RDI,R15
CALL 0x0011b3e0
LEA RDX,[RAX + R15*0x1]
LAB_001ac63a:
MOV RDI,RSP
MOV RSI,R15
CALL 0x001225b4
LAB_001ac645:
LEA RSI,[0x1f2dd2]
LEA RCX,[0x1f2dd8]
LEA RDI,[RSP + 0x20]
MOV RDX,RSP
CALL 0x001aba62
MOV BPL,0x1
LAB_001ac663:
LEA RDX,[RSP + 0x20]
MOV RDI,RBX
MOV ESI,0x193
MOV RCX,R14
CALL 0x001abdda
XOR EBP,EBP
LEA RSI,[0x22beb8]
LEA RDX,[0x15b832]
MOV RDI,RBX
CALL 0x0011bf00
|
char * _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE2atIRA8_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)
{
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 001ac5d4 to 001ac5e4 has its CatchHandler @ 001ac700 */
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 001ac5e8 to 001ac614 has its CatchHandler @ 001ac6db */
_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,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 001ac63a to 001ac644 has its CatchHandler @ 001ac6d9 */
std::__cxx11::string::_M_construct<char_const*>(local_68,param_2,param_2 + sVar5);
/* try { // try from 001ac645 to 001ac65f has its CatchHandler @ 001ac6be */
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 001ac663 to 001ac68f has its CatchHandler @ 001ac690 */
_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,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;
}
|
|
61,802 |
File::ScanDirectoryTree(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool)
|
Dolphin-anty/Source/Core/Common/FileUtil.cpp
|
FSTEntry ScanDirectoryTree(std::string directory, bool recursive)
{
DEBUG_LOG_FMT(COMMON, "{}: directory {}", __func__, directory);
#ifdef ANDROID
if (IsPathAndroidContent(directory))
return ScanDirectoryTreeAndroidContent(directory, recursive);
#endif
auto path_to_physical_name = [](const fs::path& path) {
#ifdef _WIN32
// TODO Ideally this would not be needed - dolphin really should not have code directly mucking
// about with directory separators (for host paths - emulated paths may require it) and instead
// use fs::path to interact with them.
auto wpath = path.wstring();
std::ranges::replace(wpath, L'\\', L'/');
return WStringToUTF8(wpath);
#else
return PathToString(path);
#endif
};
auto dirent_to_fstent = [&](const fs::directory_entry& entry) {
return FSTEntry{
.isDirectory = entry.is_directory(),
.size = entry.is_directory() || entry.is_fifo() ? 0 : entry.file_size(),
.physicalName = path_to_physical_name(entry.path()),
.virtualName = PathToString(entry.path().filename()),
};
};
auto calc_dir_size = [](FSTEntry* dir) {
dir->size += dir->children.size();
for (auto& child : dir->children)
if (child.isDirectory)
dir->size += child.size;
};
const auto directory_path = StringToPath(directory);
FSTEntry parent_entry;
parent_entry.physicalName = path_to_physical_name(directory_path);
parent_entry.isDirectory = fs::is_directory(directory_path);
parent_entry.size = 0;
std::error_code error;
if (recursive)
{
int prev_depth = 0;
std::stack<FSTEntry*> dir_fsts;
dir_fsts.push(&parent_entry);
for (auto it = fs::recursive_directory_iterator(directory_path, error);
it != fs::recursive_directory_iterator(); it.increment(error))
{
const int cur_depth = it.depth();
if (cur_depth > prev_depth)
{
dir_fsts.push(&dir_fsts.top()->children.back());
}
else if (cur_depth < prev_depth)
{
while (dir_fsts.size() != static_cast<size_t>(cur_depth) + 1u)
{
calc_dir_size(dir_fsts.top());
dir_fsts.pop();
}
}
dir_fsts.top()->children.emplace_back(dirent_to_fstent(*it));
prev_depth = cur_depth;
}
while (dir_fsts.size())
{
calc_dir_size(dir_fsts.top());
dir_fsts.pop();
}
}
else
{
for (auto it = fs::directory_iterator(directory_path, error); it != fs::directory_iterator();
it.increment(error))
{
parent_entry.children.emplace_back(dirent_to_fstent(*it));
}
calc_dir_size(&parent_entry);
}
if (error)
{
// NOTE Possibly partial file list still returned
ERROR_LOG_FMT(COMMON, "{} error on {}: {}", __func__, directory, error.message());
}
return parent_entry;
}
|
O0
|
cpp
|
File::ScanDirectoryTree(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool):
subq $0x298, %rsp # imm = 0x298
movq %rsi, 0x38(%rsp)
movq %rdi, 0x40(%rsp)
movb %dl, %al
movq %rdi, %rcx
movq %rcx, 0x48(%rsp)
movq %rdi, 0x290(%rsp)
movq %rsi, 0x288(%rsp)
andb $0x1, %al
movb %al, 0x287(%rsp)
jmp 0x433f6
jmp 0x433f8
jmp 0x433fa
movq 0x38(%rsp), %rdi
movb 0x5cc73(%rip), %al # 0xa0078
movb %al, 0x286(%rsp)
leaq 0x286(%rsp), %rax
movq %rax, 0x278(%rsp)
movb 0x5cc57(%rip), %al # 0xa0079
movb %al, 0x277(%rsp)
callq 0x129c0
movq %rax, 0x238(%rsp)
movq %rdx, 0x240(%rsp)
movq 0x238(%rsp), %rsi
movq 0x240(%rsp), %rdx
leaq 0x248(%rsp), %rdi
callq 0x28f70
movq 0x40(%rsp), %rdi
movb $0x0, 0x237(%rsp)
callq 0x47780
leaq 0x210(%rsp), %rdi
leaq 0x286(%rsp), %rsi
leaq 0x248(%rsp), %rdx
callq 0x438f0
movq 0x40(%rsp), %rdi
addq $0x10, %rdi
leaq 0x210(%rsp), %rsi
callq 0x1a3d0
leaq 0x210(%rsp), %rdi
callq 0x12a10
leaq 0x248(%rsp), %rdi
callq 0x477d0
movb %al, %cl
movq 0x40(%rsp), %rax
andb $0x1, %cl
movb %cl, (%rax)
movq $0x0, 0x8(%rax)
leaq 0x200(%rsp), %rdi
callq 0x475a0
testb $0x1, 0x287(%rsp)
je 0x43735
movl $0x0, 0x1fc(%rsp)
leaq 0x1a8(%rsp), %rdi
callq 0x47800
movq 0x40(%rsp), %rax
movq %rax, 0x1a0(%rsp)
leaq 0x1a8(%rsp), %rdi
leaq 0x1a0(%rsp), %rsi
callq 0x47830
leaq 0x190(%rsp), %rdi
leaq 0x248(%rsp), %rsi
leaq 0x200(%rsp), %rdx
callq 0x47860
leaq 0x180(%rsp), %rdi
xorl %esi, %esi
movl $0x10, %edx
callq 0x90b0
leaq 0x180(%rsp), %rdi
callq 0x478c0
leaq 0x190(%rsp), %rdi
leaq 0x180(%rsp), %rsi
callq 0x47890
movb %al, 0x37(%rsp)
leaq 0x180(%rsp), %rdi
callq 0x91a0
movb 0x37(%rsp), %al
testb $0x1, %al
jne 0x435a1
leaq 0x190(%rsp), %rdi
callq 0x91a0
jmp 0x436e2
leaq 0x190(%rsp), %rdi
callq 0x96a0
movl %eax, 0x17c(%rsp)
movl 0x17c(%rsp), %eax
cmpl 0x1fc(%rsp), %eax
jle 0x435fd
leaq 0x1a8(%rsp), %rdi
callq 0x478d0
movq (%rax), %rdi
addq $0x50, %rdi
callq 0x478e0
movq %rax, 0x170(%rsp)
leaq 0x1a8(%rsp), %rdi
leaq 0x170(%rsp), %rsi
callq 0x47830
jmp 0x4365d
movl 0x17c(%rsp), %eax
cmpl 0x1fc(%rsp), %eax
jge 0x4365b
jmp 0x4360f
leaq 0x1a8(%rsp), %rdi
callq 0x47920
movslq 0x17c(%rsp), %rcx
addq $0x1, %rcx
cmpq %rcx, %rax
je 0x43659
leaq 0x1a8(%rsp), %rdi
callq 0x478d0
movq (%rax), %rsi
leaq 0x277(%rsp), %rdi
callq 0x43920
leaq 0x1a8(%rsp), %rdi
callq 0x47930
jmp 0x4360f
jmp 0x4365b
jmp 0x4365d
leaq 0x1a8(%rsp), %rdi
callq 0x478d0
movq (%rax), %rax
addq $0x50, %rax
movq %rax, 0x28(%rsp)
leaq 0x190(%rsp), %rdi
callq 0x9c80
movq %rax, %rdx
leaq 0x108(%rsp), %rdi
leaq 0x278(%rsp), %rsi
callq 0x439e0
movq 0x28(%rsp), %rdi
leaq 0x108(%rsp), %rsi
callq 0x47940
leaq 0x108(%rsp), %rdi
callq 0x479c0
movl 0x17c(%rsp), %eax
movl %eax, 0x1fc(%rsp)
leaq 0x190(%rsp), %rdi
leaq 0x200(%rsp), %rsi
callq 0x9bb0
jmp 0x43540
jmp 0x436e4
leaq 0x1a8(%rsp), %rdi
callq 0x47920
cmpq $0x0, %rax
je 0x43723
leaq 0x1a8(%rsp), %rdi
callq 0x478d0
movq (%rax), %rsi
leaq 0x277(%rsp), %rdi
callq 0x43920
leaq 0x1a8(%rsp), %rdi
callq 0x47930
jmp 0x436e4
leaq 0x1a8(%rsp), %rdi
callq 0x47a00
jmp 0x4382e
leaq 0xf8(%rsp), %rdi
leaq 0x248(%rsp), %rsi
leaq 0x200(%rsp), %rdx
callq 0x47a10
leaq 0xe8(%rsp), %rdi
xorl %esi, %esi
movl $0x10, %edx
callq 0x90b0
leaq 0xe8(%rsp), %rdi
callq 0x47a70
leaq 0xf8(%rsp), %rdi
leaq 0xe8(%rsp), %rsi
callq 0x47a40
movb %al, 0x27(%rsp)
leaq 0xe8(%rsp), %rdi
callq 0x47a80
movb 0x27(%rsp), %al
testb $0x1, %al
jne 0x437b0
leaq 0xf8(%rsp), %rdi
callq 0x47a80
jmp 0x4381c
movq 0x40(%rsp), %rax
addq $0x50, %rax
movq %rax, 0x18(%rsp)
leaq 0xf8(%rsp), %rdi
callq 0x9870
movq %rax, %rdx
leaq 0x80(%rsp), %rdi
leaq 0x278(%rsp), %rsi
callq 0x439e0
movq 0x18(%rsp), %rdi
leaq 0x80(%rsp), %rsi
callq 0x47940
leaq 0x80(%rsp), %rdi
callq 0x479c0
leaq 0xf8(%rsp), %rdi
leaq 0x200(%rsp), %rsi
callq 0x9650
jmp 0x43752
movq 0x40(%rsp), %rsi
leaq 0x277(%rsp), %rdi
callq 0x43920
leaq 0x200(%rsp), %rdi
callq 0x475d0
testb $0x1, %al
jne 0x43841
jmp 0x438b6
jmp 0x43843
jmp 0x43845
movq $0x3, 0x78(%rsp)
leaq 0x76(%rsp), %rdi
callq 0x43c80
leaq 0x50(%rsp), %rdi
leaq 0x200(%rsp), %rsi
callq 0x47690
movq 0x38(%rsp), %r10
movl $0x2, %edi
movl $0x6, %esi
leaq 0x5c7fa(%rip), %rdx # 0xa007a
movl $0x20b, %ecx # imm = 0x20B
leaq 0x77(%rsp), %r8
leaq 0x5c886(%rip), %r9 # 0xa0117
leaq 0x50(%rsp), %rax
movq %r10, (%rsp)
movq %rax, 0x8(%rsp)
callq 0x43b20
leaq 0x50(%rsp), %rdi
callq 0x12a10
jmp 0x438b0
jmp 0x438b2
jmp 0x438b4
jmp 0x438b6
movb $0x1, 0x237(%rsp)
testb $0x1, 0x237(%rsp)
jne 0x438d2
movq 0x40(%rsp), %rdi
callq 0x479c0
leaq 0x248(%rsp), %rdi
callq 0x47640
movq 0x48(%rsp), %rax
addq $0x298, %rsp # imm = 0x298
retq
nopl (%rax)
|
_ZN4File17ScanDirectoryTreeENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEb:
sub rsp, 298h
mov [rsp+298h+var_260], rsi
mov [rsp+298h+var_258], rdi
mov al, dl
mov rcx, rdi
mov [rsp+298h+var_250], rcx
mov [rsp+298h+var_8], rdi
mov [rsp+298h+var_10], rsi
and al, 1
mov [rsp+298h+var_11], al
jmp short $+2
loc_433F6:
jmp short $+2
loc_433F8:
jmp short $+2
loc_433FA:
mov rdi, [rsp+298h+var_260]
mov al, cs:byte_A0078
mov [rsp+298h+var_12], al
lea rax, [rsp+298h+var_12]
mov [rsp+298h+var_20], rax
mov al, cs:byte_A0079
mov [rsp+298h+var_21], al
call _ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEcvSt17basic_string_viewIcS2_EEv; std::string::operator std::string_view(void)
mov [rsp+298h+var_60], rax
mov [rsp+298h+var_58], rdx
mov rsi, [rsp+298h+var_60]
mov rdx, [rsp+298h+var_58]
lea rdi, [rsp+298h+var_50]
call _Z12StringToPathB5cxx11St17basic_string_viewIcSt11char_traitsIcEE; StringToPath(std::string_view)
mov rdi, [rsp+298h+var_258]; this
mov [rsp+298h+var_61], 0
call _ZN4File8FSTEntryC2Ev; File::FSTEntry::FSTEntry(void)
lea rdi, [rsp+298h+var_88]
lea rsi, [rsp+298h+var_12]
lea rdx, [rsp+298h+var_50]
call _ZZN4File17ScanDirectoryTreeENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEbENK3$_2clERKNSt10filesystem7__cxx114pathE; File::ScanDirectoryTree(std::string,bool)::$_2::operator()(std::filesystem::__cxx11::path const&)
mov rdi, [rsp+298h+var_258]
add rdi, 10h
lea rsi, [rsp+298h+var_88]; std::filesystem::__cxx11::path *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEOS4_; std::string::operator=(std::string&&)
lea rdi, [rsp+298h+var_88]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
lea rdi, [rsp+298h+var_50]; this
call _ZNSt10filesystem12is_directoryERKNS_7__cxx114pathE; std::filesystem::is_directory(std::filesystem::__cxx11::path const&)
mov cl, al
mov rax, [rsp+298h+var_258]
and cl, 1
mov [rax], cl
mov qword ptr [rax+8], 0
lea rdi, [rsp+298h+var_98]; this
call _ZNSt10error_codeC2Ev; std::error_code::error_code(void)
test [rsp+298h+var_11], 1
jz loc_43735
mov [rsp+298h+var_9C], 0
lea rdi, [rsp+298h+var_F0]
call _ZNSt5stackIPN4File8FSTEntryESt5dequeIS2_SaIS2_EEEC2IS5_vEEv; std::stack<File::FSTEntry *>::stack<std::deque<File::FSTEntry *>,void>(void)
mov rax, [rsp+298h+var_258]
mov [rsp+298h+var_F8], rax
lea rdi, [rsp+298h+var_F0]
lea rsi, [rsp+298h+var_F8]
call _ZNSt5stackIPN4File8FSTEntryESt5dequeIS2_SaIS2_EEE4pushEOS2_; std::stack<File::FSTEntry *>::push(File::FSTEntry *&&)
lea rdi, [rsp+298h+var_108]; this
lea rsi, [rsp+298h+var_50]; std::filesystem::__cxx11::path *
lea rdx, [rsp+298h+var_98]; std::error_code *
call _ZNSt10filesystem7__cxx1128recursive_directory_iteratorC2ERKNS0_4pathERSt10error_code; std::filesystem::__cxx11::recursive_directory_iterator::recursive_directory_iterator(std::filesystem::__cxx11::path const&,std::error_code &)
loc_43540:
lea rdi, [rsp+298h+var_118]
xor esi, esi
mov edx, 10h
call _memset
lea rdi, [rsp+298h+var_118]; this
call _ZNSt10filesystem7__cxx1128recursive_directory_iteratorC2Ev; std::filesystem::__cxx11::recursive_directory_iterator::recursive_directory_iterator(void)
lea rdi, [rsp+298h+var_108]
lea rsi, [rsp+298h+var_118]
call _ZNSt10filesystem7__cxx11neERKNS0_28recursive_directory_iteratorES3_; std::filesystem::__cxx11::operator!=(std::filesystem::__cxx11::recursive_directory_iterator const&,std::filesystem::__cxx11::recursive_directory_iterator const&)
mov [rsp+298h+var_261], al
lea rdi, [rsp+298h+var_118]; this
call __ZNSt10filesystem7__cxx1128recursive_directory_iteratorD1Ev; std::filesystem::__cxx11::recursive_directory_iterator::~recursive_directory_iterator()
mov al, [rsp+298h+var_261]
test al, 1
jnz short loc_435A1
lea rdi, [rsp+298h+var_108]; this
call __ZNSt10filesystem7__cxx1128recursive_directory_iteratorD1Ev; std::filesystem::__cxx11::recursive_directory_iterator::~recursive_directory_iterator()
jmp loc_436E2
loc_435A1:
lea rdi, [rsp+298h+var_108]; this
call __ZNKSt10filesystem7__cxx1128recursive_directory_iterator5depthEv; std::filesystem::__cxx11::recursive_directory_iterator::depth(void)
mov [rsp+298h+var_11C], eax
mov eax, [rsp+298h+var_11C]
cmp eax, [rsp+298h+var_9C]
jle short loc_435FD
lea rdi, [rsp+298h+var_F0]
call _ZNSt5stackIPN4File8FSTEntryESt5dequeIS2_SaIS2_EEE3topEv; std::stack<File::FSTEntry *>::top(void)
mov rdi, [rax]
add rdi, 50h ; 'P'
call _ZNSt6vectorIN4File8FSTEntryESaIS1_EE4backEv; std::vector<File::FSTEntry>::back(void)
mov [rsp+298h+var_128], rax
lea rdi, [rsp+298h+var_F0]
lea rsi, [rsp+298h+var_128]
call _ZNSt5stackIPN4File8FSTEntryESt5dequeIS2_SaIS2_EEE4pushEOS2_; std::stack<File::FSTEntry *>::push(File::FSTEntry *&&)
jmp short loc_4365D
loc_435FD:
mov eax, [rsp+298h+var_11C]
cmp eax, [rsp+298h+var_9C]
jge short loc_4365B
jmp short $+2
loc_4360F:
lea rdi, [rsp+298h+var_F0]
call _ZNKSt5stackIPN4File8FSTEntryESt5dequeIS2_SaIS2_EEE4sizeEv; std::stack<File::FSTEntry *>::size(void)
movsxd rcx, [rsp+298h+var_11C]
add rcx, 1
cmp rax, rcx
jz short loc_43659
lea rdi, [rsp+298h+var_F0]
call _ZNSt5stackIPN4File8FSTEntryESt5dequeIS2_SaIS2_EEE3topEv; std::stack<File::FSTEntry *>::top(void)
mov rsi, [rax]
lea rdi, [rsp+298h+var_21]
call _ZZN4File17ScanDirectoryTreeENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEbENK3$_3clEPNS_8FSTEntryE; File::ScanDirectoryTree(std::string,bool)::$_3::operator()(File::FSTEntry *)
lea rdi, [rsp+298h+var_F0]
call _ZNSt5stackIPN4File8FSTEntryESt5dequeIS2_SaIS2_EEE3popEv; std::stack<File::FSTEntry *>::pop(void)
jmp short loc_4360F
loc_43659:
jmp short $+2
loc_4365B:
jmp short $+2
loc_4365D:
lea rdi, [rsp+298h+var_F0]
call _ZNSt5stackIPN4File8FSTEntryESt5dequeIS2_SaIS2_EEE3topEv; std::stack<File::FSTEntry *>::top(void)
mov rax, [rax]
add rax, 50h ; 'P'
mov [rsp+298h+var_270], rax
lea rdi, [rsp+298h+var_108]
call __ZNKSt10filesystem7__cxx1128recursive_directory_iteratordeEv; std::filesystem::__cxx11::recursive_directory_iterator::operator*(void)
mov rdx, rax
lea rdi, [rsp+298h+var_190]
lea rsi, [rsp+298h+var_20]
call _ZZN4File17ScanDirectoryTreeENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEbENK3$_4clERKNSt10filesystem7__cxx1115directory_entryE; File::ScanDirectoryTree(std::string,bool)::$_4::operator()(std::filesystem::__cxx11::directory_entry const&)
mov rdi, [rsp+298h+var_270]
lea rsi, [rsp+298h+var_190]
call _ZNSt6vectorIN4File8FSTEntryESaIS1_EE12emplace_backIJS1_EEERS1_DpOT_; std::vector<File::FSTEntry>::emplace_back<File::FSTEntry>(File::FSTEntry &&)
lea rdi, [rsp+298h+var_190]; this
call _ZN4File8FSTEntryD2Ev; File::FSTEntry::~FSTEntry()
mov eax, [rsp+298h+var_11C]
mov [rsp+298h+var_9C], eax
lea rdi, [rsp+298h+var_108]; this
lea rsi, [rsp+298h+var_98]; std::error_code *
call __ZNSt10filesystem7__cxx1128recursive_directory_iterator9incrementERSt10error_code; std::filesystem::__cxx11::recursive_directory_iterator::increment(std::error_code &)
jmp loc_43540
loc_436E2:
jmp short $+2
loc_436E4:
lea rdi, [rsp+298h+var_F0]
call _ZNKSt5stackIPN4File8FSTEntryESt5dequeIS2_SaIS2_EEE4sizeEv; std::stack<File::FSTEntry *>::size(void)
cmp rax, 0
jz short loc_43723
lea rdi, [rsp+298h+var_F0]
call _ZNSt5stackIPN4File8FSTEntryESt5dequeIS2_SaIS2_EEE3topEv; std::stack<File::FSTEntry *>::top(void)
mov rsi, [rax]
lea rdi, [rsp+298h+var_21]
call _ZZN4File17ScanDirectoryTreeENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEbENK3$_3clEPNS_8FSTEntryE; File::ScanDirectoryTree(std::string,bool)::$_3::operator()(File::FSTEntry *)
lea rdi, [rsp+298h+var_F0]
call _ZNSt5stackIPN4File8FSTEntryESt5dequeIS2_SaIS2_EEE3popEv; std::stack<File::FSTEntry *>::pop(void)
jmp short loc_436E4
loc_43723:
lea rdi, [rsp+298h+var_F0]
call _ZNSt5stackIPN4File8FSTEntryESt5dequeIS2_SaIS2_EEED2Ev; std::stack<File::FSTEntry *>::~stack()
jmp loc_4382E
loc_43735:
lea rdi, [rsp+298h+var_1A0]; this
lea rsi, [rsp+298h+var_50]; std::filesystem::__cxx11::path *
lea rdx, [rsp+298h+var_98]; std::error_code *
call _ZNSt10filesystem7__cxx1118directory_iteratorC2ERKNS0_4pathERSt10error_code; std::filesystem::__cxx11::directory_iterator::directory_iterator(std::filesystem::__cxx11::path const&,std::error_code &)
loc_43752:
lea rdi, [rsp+298h+var_1B0]
xor esi, esi
mov edx, 10h
call _memset
lea rdi, [rsp+298h+var_1B0]; this
call _ZNSt10filesystem7__cxx1118directory_iteratorC2Ev; std::filesystem::__cxx11::directory_iterator::directory_iterator(void)
lea rdi, [rsp+298h+var_1A0]
lea rsi, [rsp+298h+var_1B0]
call _ZNSt10filesystem7__cxx11neERKNS0_18directory_iteratorES3_; std::filesystem::__cxx11::operator!=(std::filesystem::__cxx11::directory_iterator const&,std::filesystem::__cxx11::directory_iterator const&)
mov [rsp+298h+var_271], al
lea rdi, [rsp+298h+var_1B0]; this
call _ZNSt10filesystem7__cxx1118directory_iteratorD2Ev; std::filesystem::__cxx11::directory_iterator::~directory_iterator()
mov al, [rsp+298h+var_271]
test al, 1
jnz short loc_437B0
lea rdi, [rsp+298h+var_1A0]; this
call _ZNSt10filesystem7__cxx1118directory_iteratorD2Ev; std::filesystem::__cxx11::directory_iterator::~directory_iterator()
jmp short loc_4381C
loc_437B0:
mov rax, [rsp+298h+var_258]
add rax, 50h ; 'P'
mov [rsp+298h+var_280], rax
lea rdi, [rsp+298h+var_1A0]
call __ZNKSt10filesystem7__cxx1118directory_iteratordeEv; std::filesystem::__cxx11::directory_iterator::operator*(void)
mov rdx, rax
lea rdi, [rsp+298h+var_218]
lea rsi, [rsp+298h+var_20]
call _ZZN4File17ScanDirectoryTreeENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEbENK3$_4clERKNSt10filesystem7__cxx1115directory_entryE; File::ScanDirectoryTree(std::string,bool)::$_4::operator()(std::filesystem::__cxx11::directory_entry const&)
mov rdi, [rsp+298h+var_280]
lea rsi, [rsp+298h+var_218]
call _ZNSt6vectorIN4File8FSTEntryESaIS1_EE12emplace_backIJS1_EEERS1_DpOT_; std::vector<File::FSTEntry>::emplace_back<File::FSTEntry>(File::FSTEntry &&)
lea rdi, [rsp+298h+var_218]; this
call _ZN4File8FSTEntryD2Ev; File::FSTEntry::~FSTEntry()
lea rdi, [rsp+298h+var_1A0]; this
lea rsi, [rsp+298h+var_98]; std::error_code *
call __ZNSt10filesystem7__cxx1118directory_iterator9incrementERSt10error_code; std::filesystem::__cxx11::directory_iterator::increment(std::error_code &)
jmp loc_43752
loc_4381C:
mov rsi, [rsp+298h+var_258]
lea rdi, [rsp+298h+var_21]
call _ZZN4File17ScanDirectoryTreeENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEbENK3$_3clEPNS_8FSTEntryE; File::ScanDirectoryTree(std::string,bool)::$_3::operator()(File::FSTEntry *)
loc_4382E:
lea rdi, [rsp+298h+var_98]
call _ZNKSt10error_codecvbEv; std::error_code::operator bool(void)
test al, 1
jnz short loc_43841
jmp short loc_438B6
loc_43841:
jmp short $+2
loc_43843:
jmp short $+2
loc_43845:
mov [rsp+298h+var_220], 3
lea rdi, [rsp+298h+var_222]
call _ZZN4File17ScanDirectoryTreeENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEbENK3$_1clEv; File::ScanDirectoryTree(std::string,bool)::$_1::operator()(void)
lea rdi, [rsp+298h+var_248]
lea rsi, [rsp+298h+var_98]
call _ZNKSt10error_code7messageB5cxx11Ev; std::error_code::message(void)
mov r10, [rsp+298h+var_260]
mov edi, 2
mov esi, 6
lea rdx, aWorkspaceLlm4b_3; "/workspace/llm4binary/github2025/Dolphi"...
mov ecx, 20Bh
lea r8, [rsp+298h+var_221]
lea r9, aScandirectoryt; "ScanDirectoryTree"
lea rax, [rsp+298h+var_248]
mov [rsp+298h+var_298], r10
mov [rsp+298h+var_290], rax
call _ZN6Common3Log13GenericLogFmtILm3EZZN4File17ScanDirectoryTreeENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEbENK3$_1clEvE18FMT_COMPILE_STRINGJA18_cS8_S8_EEEvNS0_8LogLevelENS0_7LogTypeEPKciRKT0_DpRKT1_; Common::Log::GenericLogFmt<3ul,File::ScanDirectoryTree(std::string,bool)::$_1::operator() const(void)::FMT_COMPILE_STRING,char [18],std::string,std::string>(Common::Log::LogLevel,Common::Log::LogType,char const*,int,File::ScanDirectoryTree(std::string,bool)::$_1::operator() const(void)::FMT_COMPILE_STRING const&,char [18],std::string,std::string const&)
lea rdi, [rsp+298h+var_248]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
jmp short $+2
loc_438B0:
jmp short $+2
loc_438B2:
jmp short $+2
loc_438B4:
jmp short $+2
loc_438B6:
mov [rsp+298h+var_61], 1
test [rsp+298h+var_61], 1
jnz short loc_438D2
mov rdi, [rsp+298h+var_258]; this
call _ZN4File8FSTEntryD2Ev; File::FSTEntry::~FSTEntry()
loc_438D2:
lea rdi, [rsp+298h+var_50]; this
call _ZNSt10filesystem7__cxx114pathD2Ev; std::filesystem::__cxx11::path::~path()
mov rax, [rsp+298h+var_250]
add rsp, 298h
retn
|
File::FSTEntry * File::ScanDirectoryTree(File::FSTEntry *a1, long long a2, char a3)
{
long long v3; // rdx
_QWORD *v4; // rax
long long v5; // rax
_QWORD *v6; // rax
long long v7; // rax
_QWORD *v8; // rax
long long v9; // rax
char v11; // [rsp+27h] [rbp-271h]
long long v12; // [rsp+28h] [rbp-270h]
char v13; // [rsp+37h] [rbp-261h]
_BYTE v14[38]; // [rsp+50h] [rbp-248h] BYREF
char v15; // [rsp+76h] [rbp-222h] BYREF
char v16; // [rsp+77h] [rbp-221h] BYREF
long long v17; // [rsp+78h] [rbp-220h]
_BYTE v18[104]; // [rsp+80h] [rbp-218h] BYREF
_BYTE v19[16]; // [rsp+E8h] [rbp-1B0h] BYREF
_BYTE v20[16]; // [rsp+F8h] [rbp-1A0h] BYREF
_BYTE v21[104]; // [rsp+108h] [rbp-190h] BYREF
long long v22; // [rsp+170h] [rbp-128h] BYREF
int v23; // [rsp+17Ch] [rbp-11Ch]
_BYTE v24[16]; // [rsp+180h] [rbp-118h] BYREF
_BYTE v25[16]; // [rsp+190h] [rbp-108h] BYREF
File::FSTEntry *v26; // [rsp+1A0h] [rbp-F8h] BYREF
_BYTE v27[84]; // [rsp+1A8h] [rbp-F0h] BYREF
int v28; // [rsp+1FCh] [rbp-9Ch]
_BYTE v29[16]; // [rsp+200h] [rbp-98h] BYREF
_QWORD v30[4]; // [rsp+210h] [rbp-88h] BYREF
char v31; // [rsp+237h] [rbp-61h]
long long v32; // [rsp+238h] [rbp-60h]
long long v33; // [rsp+240h] [rbp-58h]
_BYTE v34[47]; // [rsp+248h] [rbp-50h] BYREF
char v35; // [rsp+277h] [rbp-21h] BYREF
char *v36; // [rsp+278h] [rbp-20h] BYREF
char v37; // [rsp+286h] [rbp-12h] BYREF
char v38; // [rsp+287h] [rbp-11h]
long long v39; // [rsp+288h] [rbp-10h]
File::FSTEntry *v40; // [rsp+290h] [rbp-8h]
v40 = a1;
v39 = a2;
v38 = a3 & 1;
v37 = 0;
v36 = &v37;
v35 = 0;
v32 = std::string::operator std::string_view(a2);
v33 = v3;
StringToPath[abi:cxx11]((long long)v34, v32, v3);
v31 = 0;
File::FSTEntry::FSTEntry(a1);
File::ScanDirectoryTree(std::string,bool)::$_2::operator()(v30, &v37, v34);
std::string::operator=((_QWORD *)a1 + 2, v30);
std::string::~string(v30);
*(_BYTE *)a1 = std::filesystem::is_directory((std::filesystem *)v34, (const std::filesystem::__cxx11::path *)v30) & 1;
*((_QWORD *)a1 + 1) = 0LL;
std::error_code::error_code((std::error_code *)v29);
if ( (v38 & 1) != 0 )
{
v28 = 0;
std::stack<File::FSTEntry *>::stack<std::deque<File::FSTEntry *>,void>(v27);
v26 = a1;
std::stack<File::FSTEntry *>::push(v27, &v26);
std::filesystem::__cxx11::recursive_directory_iterator::recursive_directory_iterator(
(std::filesystem::__cxx11::recursive_directory_iterator *)v25,
(const std::filesystem::__cxx11::path *)v34,
(std::error_code *)v29);
while ( 1 )
{
memset(v24, 0LL, sizeof(v24));
std::filesystem::__cxx11::recursive_directory_iterator::recursive_directory_iterator((std::filesystem::__cxx11::recursive_directory_iterator *)v24);
v13 = std::filesystem::__cxx11::operator!=(v25, v24);
std::filesystem::__cxx11::recursive_directory_iterator::~recursive_directory_iterator((std::filesystem::__cxx11::recursive_directory_iterator *)v24);
if ( (v13 & 1) == 0 )
break;
v23 = std::filesystem::__cxx11::recursive_directory_iterator::depth((std::filesystem::__cxx11::recursive_directory_iterator *)v25);
if ( v23 <= v28 )
{
if ( v23 < v28 )
{
while ( 1 )
{
v5 = std::stack<File::FSTEntry *>::size(v27);
if ( v5 == v23 + 1LL )
break;
v6 = (_QWORD *)std::stack<File::FSTEntry *>::top(v27);
File::ScanDirectoryTree(std::string,bool)::$_3::operator()(&v35, *v6);
std::stack<File::FSTEntry *>::pop(v27);
}
}
}
else
{
v4 = (_QWORD *)std::stack<File::FSTEntry *>::top(v27);
v22 = std::vector<File::FSTEntry>::back(*v4 + 80LL);
std::stack<File::FSTEntry *>::push(v27, &v22);
}
v12 = *(_QWORD *)std::stack<File::FSTEntry *>::top(v27) + 80LL;
v7 = std::filesystem::__cxx11::recursive_directory_iterator::operator*(v25);
File::ScanDirectoryTree(std::string,bool)::$_4::operator()(v21, &v36, v7);
std::vector<File::FSTEntry>::emplace_back<File::FSTEntry>(v12, v21);
File::FSTEntry::~FSTEntry((File::FSTEntry *)v21);
v28 = v23;
std::filesystem::__cxx11::recursive_directory_iterator::increment(
(std::filesystem::__cxx11::recursive_directory_iterator *)v25,
(std::error_code *)v29);
}
std::filesystem::__cxx11::recursive_directory_iterator::~recursive_directory_iterator((std::filesystem::__cxx11::recursive_directory_iterator *)v25);
while ( std::stack<File::FSTEntry *>::size(v27) )
{
v8 = (_QWORD *)std::stack<File::FSTEntry *>::top(v27);
File::ScanDirectoryTree(std::string,bool)::$_3::operator()(&v35, *v8);
std::stack<File::FSTEntry *>::pop(v27);
}
std::stack<File::FSTEntry *>::~stack(v27);
}
else
{
std::filesystem::__cxx11::directory_iterator::directory_iterator(
(std::filesystem::__cxx11::directory_iterator *)v20,
(const std::filesystem::__cxx11::path *)v34,
(std::error_code *)v29);
while ( 1 )
{
memset(v19, 0LL, sizeof(v19));
std::filesystem::__cxx11::directory_iterator::directory_iterator((std::filesystem::__cxx11::directory_iterator *)v19);
v11 = std::filesystem::__cxx11::operator!=(v20, v19);
std::filesystem::__cxx11::directory_iterator::~directory_iterator((std::filesystem::__cxx11::directory_iterator *)v19);
if ( (v11 & 1) == 0 )
break;
v9 = std::filesystem::__cxx11::directory_iterator::operator*(v20);
File::ScanDirectoryTree(std::string,bool)::$_4::operator()(v18, &v36, v9);
std::vector<File::FSTEntry>::emplace_back<File::FSTEntry>((char *)a1 + 80, v18);
File::FSTEntry::~FSTEntry((File::FSTEntry *)v18);
std::filesystem::__cxx11::directory_iterator::increment(
(std::filesystem::__cxx11::directory_iterator *)v20,
(std::error_code *)v29);
}
std::filesystem::__cxx11::directory_iterator::~directory_iterator((std::filesystem::__cxx11::directory_iterator *)v20);
File::ScanDirectoryTree(std::string,bool)::$_3::operator()(&v35, a1);
}
if ( (std::error_code::operator bool(v29) & 1) != 0 )
{
v17 = 3LL;
File::ScanDirectoryTree(std::string,bool)::$_1::operator()(&v15);
std::error_code::message[abi:cxx11](v14, v29);
Common::Log::GenericLogFmt<3ul,File::ScanDirectoryTree(std::string,bool)::$_1::operator() const(void)::FMT_COMPILE_STRING,char [18],std::string,std::string>(
2,
6,
(unsigned int)"/workspace/llm4binary/github2025/Dolphin-anty/Source/Core/Common/FileUtil.cpp",
523,
(unsigned int)&v16,
(unsigned int)"ScanDirectoryTree",
a2,
(long long)v14);
std::string::~string(v14);
}
v31 = 1;
std::filesystem::__cxx11::path::~path((std::filesystem::__cxx11::path *)v34);
return a1;
}
|
ScanDirectoryTree:
SUB RSP,0x298
MOV qword ptr [RSP + 0x38],RSI
MOV qword ptr [RSP + 0x40],RDI
MOV AL,DL
MOV RCX,RDI
MOV qword ptr [RSP + 0x48],RCX
MOV qword ptr [RSP + 0x290],RDI
MOV qword ptr [RSP + 0x288],RSI
AND AL,0x1
MOV byte ptr [RSP + 0x287],AL
JMP 0x001433f6
LAB_001433f6:
JMP 0x001433f8
LAB_001433f8:
JMP 0x001433fa
LAB_001433fa:
MOV RDI,qword ptr [RSP + 0x38]
MOV AL,byte ptr [0x001a0078]
MOV byte ptr [RSP + 0x286],AL
LEA RAX,[RSP + 0x286]
MOV qword ptr [RSP + 0x278],RAX
MOV AL,byte ptr [0x001a0079]
MOV byte ptr [RSP + 0x277],AL
CALL 0x001129c0
MOV qword ptr [RSP + 0x238],RAX
MOV qword ptr [RSP + 0x240],RDX
MOV RSI,qword ptr [RSP + 0x238]
MOV RDX,qword ptr [RSP + 0x240]
LEA RDI,[RSP + 0x248]
CALL 0x00128f70
MOV RDI,qword ptr [RSP + 0x40]
MOV byte ptr [RSP + 0x237],0x0
CALL 0x00147780
LEA RDI,[RSP + 0x210]
LEA RSI,[RSP + 0x286]
LEA RDX,[RSP + 0x248]
CALL 0x001438f0
MOV RDI,qword ptr [RSP + 0x40]
ADD RDI,0x10
LEA RSI,[RSP + 0x210]
CALL 0x0011a3d0
LEA RDI,[RSP + 0x210]
CALL 0x00112a10
LEA RDI,[RSP + 0x248]
CALL 0x001477d0
MOV CL,AL
MOV RAX,qword ptr [RSP + 0x40]
AND CL,0x1
MOV byte ptr [RAX],CL
MOV qword ptr [RAX + 0x8],0x0
LEA RDI,[RSP + 0x200]
CALL 0x001475a0
TEST byte ptr [RSP + 0x287],0x1
JZ 0x00143735
MOV dword ptr [RSP + 0x1fc],0x0
LEA RDI,[RSP + 0x1a8]
CALL 0x00147800
MOV RAX,qword ptr [RSP + 0x40]
MOV qword ptr [RSP + 0x1a0],RAX
LEA RDI,[RSP + 0x1a8]
LEA RSI,[RSP + 0x1a0]
CALL 0x00147830
LEA RDI,[RSP + 0x190]
LEA RSI,[RSP + 0x248]
LEA RDX,[RSP + 0x200]
CALL 0x00147860
LAB_00143540:
LEA RDI,[RSP + 0x180]
XOR ESI,ESI
MOV EDX,0x10
CALL 0x001090b0
LEA RDI,[RSP + 0x180]
CALL 0x001478c0
LEA RDI,[RSP + 0x190]
LEA RSI,[RSP + 0x180]
CALL 0x00147890
MOV byte ptr [RSP + 0x37],AL
LEA RDI,[RSP + 0x180]
CALL 0x001091a0
MOV AL,byte ptr [RSP + 0x37]
TEST AL,0x1
JNZ 0x001435a1
LEA RDI,[RSP + 0x190]
CALL 0x001091a0
JMP 0x001436e2
LAB_001435a1:
LEA RDI,[RSP + 0x190]
CALL 0x001096a0
MOV dword ptr [RSP + 0x17c],EAX
MOV EAX,dword ptr [RSP + 0x17c]
CMP EAX,dword ptr [RSP + 0x1fc]
JLE 0x001435fd
LEA RDI,[RSP + 0x1a8]
CALL 0x001478d0
MOV RDI,qword ptr [RAX]
ADD RDI,0x50
CALL 0x001478e0
MOV qword ptr [RSP + 0x170],RAX
LEA RDI,[RSP + 0x1a8]
LEA RSI,[RSP + 0x170]
CALL 0x00147830
JMP 0x0014365d
LAB_001435fd:
MOV EAX,dword ptr [RSP + 0x17c]
CMP EAX,dword ptr [RSP + 0x1fc]
JGE 0x0014365b
JMP 0x0014360f
LAB_0014360f:
LEA RDI,[RSP + 0x1a8]
CALL 0x00147920
MOVSXD RCX,dword ptr [RSP + 0x17c]
ADD RCX,0x1
CMP RAX,RCX
JZ 0x00143659
LEA RDI,[RSP + 0x1a8]
CALL 0x001478d0
MOV RSI,qword ptr [RAX]
LEA RDI,[RSP + 0x277]
CALL 0x00143920
LEA RDI,[RSP + 0x1a8]
CALL 0x00147930
JMP 0x0014360f
LAB_00143659:
JMP 0x0014365b
LAB_0014365b:
JMP 0x0014365d
LAB_0014365d:
LEA RDI,[RSP + 0x1a8]
CALL 0x001478d0
MOV RAX,qword ptr [RAX]
ADD RAX,0x50
MOV qword ptr [RSP + 0x28],RAX
LEA RDI,[RSP + 0x190]
CALL 0x00109c80
MOV RDX,RAX
LEA RDI,[RSP + 0x108]
LEA RSI,[RSP + 0x278]
CALL 0x001439e0
MOV RDI,qword ptr [RSP + 0x28]
LEA RSI,[RSP + 0x108]
CALL 0x00147940
LEA RDI,[RSP + 0x108]
CALL 0x001479c0
MOV EAX,dword ptr [RSP + 0x17c]
MOV dword ptr [RSP + 0x1fc],EAX
LEA RDI,[RSP + 0x190]
LEA RSI,[RSP + 0x200]
CALL 0x00109bb0
JMP 0x00143540
LAB_001436e2:
JMP 0x001436e4
LAB_001436e4:
LEA RDI,[RSP + 0x1a8]
CALL 0x00147920
CMP RAX,0x0
JZ 0x00143723
LEA RDI,[RSP + 0x1a8]
CALL 0x001478d0
MOV RSI,qword ptr [RAX]
LEA RDI,[RSP + 0x277]
CALL 0x00143920
LEA RDI,[RSP + 0x1a8]
CALL 0x00147930
JMP 0x001436e4
LAB_00143723:
LEA RDI,[RSP + 0x1a8]
CALL 0x00147a00
JMP 0x0014382e
LAB_00143735:
LEA RDI,[RSP + 0xf8]
LEA RSI,[RSP + 0x248]
LEA RDX,[RSP + 0x200]
CALL 0x00147a10
LAB_00143752:
LEA RDI,[RSP + 0xe8]
XOR ESI,ESI
MOV EDX,0x10
CALL 0x001090b0
LEA RDI,[RSP + 0xe8]
CALL 0x00147a70
LEA RDI,[RSP + 0xf8]
LEA RSI,[RSP + 0xe8]
CALL 0x00147a40
MOV byte ptr [RSP + 0x27],AL
LEA RDI,[RSP + 0xe8]
CALL 0x00147a80
MOV AL,byte ptr [RSP + 0x27]
TEST AL,0x1
JNZ 0x001437b0
LEA RDI,[RSP + 0xf8]
CALL 0x00147a80
JMP 0x0014381c
LAB_001437b0:
MOV RAX,qword ptr [RSP + 0x40]
ADD RAX,0x50
MOV qword ptr [RSP + 0x18],RAX
LEA RDI,[RSP + 0xf8]
CALL 0x00109870
MOV RDX,RAX
LEA RDI,[RSP + 0x80]
LEA RSI,[RSP + 0x278]
CALL 0x001439e0
MOV RDI,qword ptr [RSP + 0x18]
LEA RSI,[RSP + 0x80]
CALL 0x00147940
LEA RDI,[RSP + 0x80]
CALL 0x001479c0
LEA RDI,[RSP + 0xf8]
LEA RSI,[RSP + 0x200]
CALL 0x00109650
JMP 0x00143752
LAB_0014381c:
MOV RSI,qword ptr [RSP + 0x40]
LEA RDI,[RSP + 0x277]
CALL 0x00143920
LAB_0014382e:
LEA RDI,[RSP + 0x200]
CALL 0x001475d0
TEST AL,0x1
JNZ 0x00143841
JMP 0x001438b6
LAB_00143841:
JMP 0x00143843
LAB_00143843:
JMP 0x00143845
LAB_00143845:
MOV qword ptr [RSP + 0x78],0x3
LEA RDI,[RSP + 0x76]
CALL 0x00143c80
LEA RDI,[RSP + 0x50]
LEA RSI,[RSP + 0x200]
CALL 0x00147690
MOV R10,qword ptr [RSP + 0x38]
MOV EDI,0x2
MOV ESI,0x6
LEA RDX,[0x1a007a]
MOV ECX,0x20b
LEA R8,[RSP + 0x77]
LEA R9,[0x1a0117]
LEA RAX,[RSP + 0x50]
MOV qword ptr [RSP],R10
MOV qword ptr [RSP + 0x8],RAX
CALL 0x00143b20
LEA RDI,[RSP + 0x50]
CALL 0x00112a10
JMP 0x001438b0
LAB_001438b0:
JMP 0x001438b2
LAB_001438b2:
JMP 0x001438b4
LAB_001438b4:
JMP 0x001438b6
LAB_001438b6:
MOV byte ptr [RSP + 0x237],0x1
TEST byte ptr [RSP + 0x237],0x1
JNZ 0x001438d2
MOV RDI,qword ptr [RSP + 0x40]
CALL 0x001479c0
LAB_001438d2:
LEA RDI,[RSP + 0x248]
CALL 0x00147640
MOV RAX,qword ptr [RSP + 0x48]
ADD RSP,0x298
RET
|
/* WARNING: Removing unreachable block (ram,0x001438c8) */
/* File::ScanDirectoryTree(std::__cxx11::string, bool) */
File * __thiscall File::ScanDirectoryTree(File *this,string *param_2,byte param_3)
{
byte bVar1;
bool bVar2;
long *plVar3;
long lVar4;
int8 *puVar5;
string local_248 [38];
__1 local_222;
int1 local_221;
int8 local_220;
__4 local_218 [104];
directory_iterator local_1b0 [16];
directory_iterator local_1a0 [16];
__4 local_190 [104];
FSTEntry *local_128;
int local_11c;
recursive_directory_iterator local_118 [16];
recursive_directory_iterator local_108 [16];
File *local_f8;
stack<File::FSTEntry*,std::deque<File::FSTEntry*,std::allocator<File::FSTEntry*>>> local_f0 [84];
int local_9c;
error_code local_98 [16];
__2 local_88 [39];
int1 local_61;
int1 local_60 [16];
path local_50 [47];
__3 local_21;
path *local_20;
path local_12;
byte local_11;
string *local_10;
File *local_8;
local_11 = param_3 & 1;
local_12 = DAT_001a0078;
local_20 = &local_12;
local_21 = DAT_001a0079;
local_10 = param_2;
local_8 = this;
local_60 = std::__cxx11::string::operator_cast_to_basic_string_view(param_2);
StringToPath_abi_cxx11_(local_50,local_60._0_8_,local_60._8_8_);
local_61 = 0;
FSTEntry::FSTEntry((FSTEntry *)this);
ScanDirectoryTree(std::__cxx11::string,bool)::$_2::operator()(local_88,&local_12);
std::__cxx11::string::operator=((string *)(this + 0x10),(string *)local_88);
std::__cxx11::string::~string((string *)local_88);
bVar1 = std::filesystem::is_directory(local_50);
*this = (File)(bVar1 & 1);
*(int8 *)(this + 8) = 0;
std::error_code::error_code(local_98);
if ((local_11 & 1) == 0) {
std::filesystem::__cxx11::directory_iterator::directory_iterator(local_1a0,local_50,local_98);
while( true ) {
memset(local_1b0,0,0x10);
std::filesystem::__cxx11::directory_iterator::directory_iterator(local_1b0);
bVar1 = std::filesystem::__cxx11::operator!=(local_1a0,local_1b0);
std::filesystem::__cxx11::directory_iterator::~directory_iterator(local_1b0);
if ((bVar1 & 1) == 0) break;
std::filesystem::__cxx11::directory_iterator::operator*(local_1a0);
ScanDirectoryTree(std::__cxx11::string,bool)::$_4::operator()
(local_218,(directory_entry *)&local_20);
std::vector<File::FSTEntry,std::allocator<File::FSTEntry>>::emplace_back<File::FSTEntry>
((vector<File::FSTEntry,std::allocator<File::FSTEntry>> *)(this + 0x50),
(FSTEntry *)local_218);
FSTEntry::~FSTEntry((FSTEntry *)local_218);
std::filesystem::__cxx11::directory_iterator::increment((error_code *)local_1a0);
}
std::filesystem::__cxx11::directory_iterator::~directory_iterator(local_1a0);
ScanDirectoryTree(std::__cxx11::string,bool)::$_3::operator()(&local_21,(FSTEntry *)this);
}
else {
local_9c = 0;
std::stack<File::FSTEntry*,std::deque<File::FSTEntry*,std::allocator<File::FSTEntry*>>>::
stack<std::deque<File::FSTEntry*,std::allocator<File::FSTEntry*>>,void>(local_f0);
local_f8 = this;
std::stack<File::FSTEntry*,std::deque<File::FSTEntry*,std::allocator<File::FSTEntry*>>>::push
(local_f0,(FSTEntry **)&local_f8);
std::filesystem::__cxx11::recursive_directory_iterator::recursive_directory_iterator
(local_108,local_50,local_98);
while( true ) {
memset(local_118,0,0x10);
std::filesystem::__cxx11::recursive_directory_iterator::recursive_directory_iterator
(local_118);
bVar1 = std::filesystem::__cxx11::operator!=(local_108,local_118);
std::filesystem::__cxx11::recursive_directory_iterator::~recursive_directory_iterator
(local_118);
if ((bVar1 & 1) == 0) break;
local_11c = std::filesystem::__cxx11::recursive_directory_iterator::depth();
if (local_9c < local_11c) {
plVar3 = (long *)std::
stack<File::FSTEntry*,std::deque<File::FSTEntry*,std::allocator<File::FSTEntry*>>>
::top(local_f0);
local_128 = (FSTEntry *)
std::vector<File::FSTEntry,std::allocator<File::FSTEntry>>::back
((vector<File::FSTEntry,std::allocator<File::FSTEntry>> *)
(*plVar3 + 0x50));
std::stack<File::FSTEntry*,std::deque<File::FSTEntry*,std::allocator<File::FSTEntry*>>>::
push(local_f0,&local_128);
}
else if (local_11c < local_9c) {
while( true ) {
lVar4 = std::
stack<File::FSTEntry*,std::deque<File::FSTEntry*,std::allocator<File::FSTEntry*>>>
::size(local_f0);
if (lVar4 == (long)local_11c + 1) break;
puVar5 = (int8 *)
std::
stack<File::FSTEntry*,std::deque<File::FSTEntry*,std::allocator<File::FSTEntry*>>>
::top(local_f0);
ScanDirectoryTree(std::__cxx11::string,bool)::$_3::operator()
(&local_21,(FSTEntry *)*puVar5);
std::stack<File::FSTEntry*,std::deque<File::FSTEntry*,std::allocator<File::FSTEntry*>>>::
pop(local_f0);
}
}
plVar3 = (long *)std::
stack<File::FSTEntry*,std::deque<File::FSTEntry*,std::allocator<File::FSTEntry*>>>
::top(local_f0);
lVar4 = *plVar3;
std::filesystem::__cxx11::recursive_directory_iterator::operator*(local_108);
ScanDirectoryTree(std::__cxx11::string,bool)::$_4::operator()
(local_190,(directory_entry *)&local_20);
std::vector<File::FSTEntry,std::allocator<File::FSTEntry>>::emplace_back<File::FSTEntry>
((vector<File::FSTEntry,std::allocator<File::FSTEntry>> *)(lVar4 + 0x50),
(FSTEntry *)local_190);
FSTEntry::~FSTEntry((FSTEntry *)local_190);
local_9c = local_11c;
std::filesystem::__cxx11::recursive_directory_iterator::increment((error_code *)local_108);
}
std::filesystem::__cxx11::recursive_directory_iterator::~recursive_directory_iterator(local_108)
;
while( true ) {
lVar4 = std::
stack<File::FSTEntry*,std::deque<File::FSTEntry*,std::allocator<File::FSTEntry*>>>::
size(local_f0);
if (lVar4 == 0) break;
puVar5 = (int8 *)
std::
stack<File::FSTEntry*,std::deque<File::FSTEntry*,std::allocator<File::FSTEntry*>>>::
top(local_f0);
ScanDirectoryTree(std::__cxx11::string,bool)::$_3::operator()(&local_21,(FSTEntry *)*puVar5);
std::stack<File::FSTEntry*,std::deque<File::FSTEntry*,std::allocator<File::FSTEntry*>>>::pop
(local_f0);
}
std::stack<File::FSTEntry*,std::deque<File::FSTEntry*,std::allocator<File::FSTEntry*>>>::~stack
(local_f0);
}
bVar2 = std::error_code::operator_cast_to_bool(local_98);
if (bVar2) {
local_220 = 3;
ScanDirectoryTree(std::__cxx11::string,bool)::$_1::operator()(&local_222);
std::error_code::message_abi_cxx11_();
Common::Log::operator()
(2,6,"/workspace/llm4binary/github2025/Dolphin-anty/Source/Core/Common/FileUtil.cpp",
0x20b,&local_221,"ScanDirectoryTree",param_2,local_248);
std::__cxx11::string::~string(local_248);
}
local_61 = 1;
std::filesystem::__cxx11::path::~path(local_50);
return this;
}
|
|
61,803 |
js_map_iterator_next
|
bluesky950520[P]quickjs/quickjs.c
|
static JSValue js_map_iterator_next(JSContext *ctx, JSValue this_val,
int argc, JSValue *argv,
BOOL *pdone, int magic)
{
JSMapIteratorData *it;
JSMapState *s;
JSMapRecord *mr;
struct list_head *el;
it = JS_GetOpaque2(ctx, this_val, JS_CLASS_MAP_ITERATOR + magic);
if (!it) {
*pdone = FALSE;
return JS_EXCEPTION;
}
if (JS_IsUndefined(it->obj))
goto done;
s = JS_GetOpaque(it->obj, JS_CLASS_MAP + magic);
assert(s != NULL);
if (!it->cur_record) {
el = s->records.next;
} else {
mr = it->cur_record;
el = mr->link.next;
map_decref_record(ctx->rt, mr); /* the record can be freed here */
}
for(;;) {
if (el == &s->records) {
/* no more record */
it->cur_record = NULL;
JS_FreeValue(ctx, it->obj);
it->obj = JS_UNDEFINED;
done:
/* end of enumeration */
*pdone = TRUE;
return JS_UNDEFINED;
}
mr = list_entry(el, JSMapRecord, link);
if (!mr->empty)
break;
/* get the next record */
el = mr->link.next;
}
/* lock the record so that it won't be freed */
mr->ref_count++;
it->cur_record = mr;
*pdone = FALSE;
if (it->kind == JS_ITERATOR_KIND_KEY) {
return js_dup(mr->key);
} else {
JSValue args[2];
args[0] = mr->key;
if (magic)
args[1] = mr->key;
else
args[1] = mr->value;
if (it->kind == JS_ITERATOR_KIND_VALUE) {
return js_dup(args[1]);
} else {
return js_create_array(ctx, 2, args);
}
}
}
|
O2
|
c
|
js_map_iterator_next:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %r9, %r14
movq %rdi, %rbx
movl 0x60(%rsp), %r12d
leal 0x2a(%r12), %ecx
callq 0x21207
testq %rax, %rax
je 0x46630
movq %rax, %r15
movl 0x8(%rax), %eax
cmpq $0x3, %rax
je 0x4668c
cmpl $-0x1, %eax
jne 0x46638
movq (%r15), %rax
leal 0x23(%r12), %ecx
movzwl 0x6(%rax), %edx
cmpl %edx, %ecx
jne 0x46638
movq 0x30(%rax), %rbp
jmp 0x4663a
andl $0x0, (%r14)
pushq $0x6
jmp 0x46695
xorl %ebp, %ebp
movq 0x18(%r15), %rsi
testq %rsi, %rsi
je 0x46652
movq 0x18(%rsi), %r13
movq 0x18(%rbx), %rdi
callq 0x34237
jmp 0x46656
movq 0x10(%rbp), %r13
addq $0x8, %rbp
cmpq %rbp, %r13
je 0x4666c
cmpl $0x0, -0xc(%r13)
je 0x466af
movq 0x8(%r13), %r13
jmp 0x4665a
andq $0x0, 0x18(%r15)
movq (%r15), %rsi
movq 0x8(%r15), %rdx
movq %rbx, %rdi
callq 0x1801e
andl $0x0, (%r15)
movq $0x3, 0x8(%r15)
movl $0x1, (%r14)
pushq $0x3
popq %rdx
xorl %eax, %eax
xorl %r14d, %r14d
movl %eax, %eax
orq %r14, %rax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq -0x10(%r13), %rax
incl -0x10(%r13)
movq %rax, 0x18(%r15)
andl $0x0, (%r14)
movabsq $-0x100000000, %r14 # imm = 0xFFFFFFFF00000000
movl 0x10(%r15), %eax
testl %eax, %eax
je 0x46704
leaq 0x20(%r13), %rcx
movups 0x20(%r13), %xmm0
addq $0x30, %r13
testl %r12d, %r12d
cmovneq %rcx, %r13
movaps %xmm0, (%rsp)
movups (%r13), %xmm0
movaps %xmm0, 0x10(%rsp)
cmpl $0x1, %eax
jne 0x46715
movq 0x10(%rsp), %rax
movq 0x18(%rsp), %rdx
jmp 0x4670c
movq 0x20(%r13), %rax
movq 0x28(%r13), %rdx
cmpl $-0x9, %edx
jb 0x46723
incl (%rax)
jmp 0x46723
pushq $0x2
popq %rsi
movq %rsp, %rdx
movq %rbx, %rdi
callq 0x3a2bd
andq %rax, %r14
jmp 0x4669b
|
js_map_iterator_next:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 28h
mov r14, r9
mov rbx, rdi
mov r12d, [rsp+58h+arg_0]
lea ecx, [r12+2Ah]
call JS_GetOpaque2
test rax, rax
jz short loc_46630
mov r15, rax
mov eax, [rax+8]
cmp rax, 3
jz short loc_4668C
cmp eax, 0FFFFFFFFh
jnz short loc_46638
mov rax, [r15]
lea ecx, [r12+23h]
movzx edx, word ptr [rax+6]
cmp ecx, edx
jnz short loc_46638
mov rbp, [rax+30h]
jmp short loc_4663A
loc_46630:
and dword ptr [r14], 0
push 6
jmp short loc_46695
loc_46638:
xor ebp, ebp
loc_4663A:
mov rsi, [r15+18h]
test rsi, rsi
jz short loc_46652
mov r13, [rsi+18h]
mov rdi, [rbx+18h]
call map_decref_record
jmp short loc_46656
loc_46652:
mov r13, [rbp+10h]
loc_46656:
add rbp, 8
loc_4665A:
cmp r13, rbp
jz short loc_4666C
cmp dword ptr [r13-0Ch], 0
jz short loc_466AF
mov r13, [r13+8]
jmp short loc_4665A
loc_4666C:
and qword ptr [r15+18h], 0
mov rsi, [r15]
mov rdx, [r15+8]
mov rdi, rbx
call JS_FreeValue
and dword ptr [r15], 0
mov qword ptr [r15+8], 3
loc_4668C:
mov dword ptr [r14], 1
push 3
loc_46695:
pop rdx
xor eax, eax
xor r14d, r14d
loc_4669B:
mov eax, eax
or rax, r14
add rsp, 28h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_466AF:
lea rax, [r13-10h]
inc dword ptr [r13-10h]
mov [r15+18h], rax
and dword ptr [r14], 0
mov r14, 0FFFFFFFF00000000h
mov eax, [r15+10h]
test eax, eax
jz short loc_46704
lea rcx, [r13+20h]
movups xmm0, xmmword ptr [r13+20h]
add r13, 30h ; '0'
test r12d, r12d
cmovnz r13, rcx
movaps [rsp+58h+var_58], xmm0
movups xmm0, xmmword ptr [r13+0]
movaps [rsp+58h+var_48], xmm0
cmp eax, 1
jnz short loc_46715
mov rax, qword ptr [rsp+58h+var_48]
mov rdx, qword ptr [rsp+58h+var_48+8]
jmp short loc_4670C
loc_46704:
mov rax, [r13+20h]
mov rdx, [r13+28h]
loc_4670C:
cmp edx, 0FFFFFFF7h
jb short loc_46723
inc dword ptr [rax]
jmp short loc_46723
loc_46715:
push 2
pop rsi
mov rdx, rsp
mov rdi, rbx
call js_create_array
loc_46723:
and r14, rax
jmp loc_4669B
|
unsigned long long js_map_iterator_next(
long long a1,
long long a2,
int a3,
long long a4,
long long a5,
_DWORD *a6,
int a7)
{
long long Opaque2; // rax
long long *v9; // r15
long long v10; // rax
long long v11; // rbp
long long v12; // rsi
long long v13; // r13
long long v14; // rbp
__int128 v15; // rax
unsigned long long v16; // r14
int v18; // eax
__int128 *v19; // rcx
__int128 v20; // xmm0
__int128 *v21; // r13
__int128 v22; // [rsp+0h] [rbp-58h] BYREF
__int128 v23; // [rsp+10h] [rbp-48h]
Opaque2 = JS_GetOpaque2(a1, a2, a3, a7 + 42);
if ( Opaque2 )
{
v9 = (long long *)Opaque2;
v10 = *(unsigned int *)(Opaque2 + 8);
if ( v10 != 3 )
{
if ( (_DWORD)v10 == -1 && a7 + 35 == *(unsigned __int16 *)(*v9 + 6) )
v11 = *(_QWORD *)(*v9 + 48);
else
v11 = 0LL;
v12 = v9[3];
if ( v12 )
{
v13 = *(_QWORD *)(v12 + 24);
map_decref_record(*(_QWORD *)(a1 + 24), v12);
}
else
{
v13 = *(_QWORD *)(v11 + 16);
}
v14 = v11 + 8;
while ( 1 )
{
if ( v13 == v14 )
{
v9[3] = 0LL;
JS_FreeValue(a1, *v9, v9[1]);
*(_DWORD *)v9 = 0;
v9[1] = 3LL;
goto LABEL_16;
}
if ( !*(_DWORD *)(v13 - 12) )
break;
v13 = *(_QWORD *)(v13 + 8);
}
++*(_DWORD *)(v13 - 16);
v9[3] = v13 - 16;
*a6 = 0;
v18 = *((_DWORD *)v9 + 4);
if ( v18 )
{
v19 = (__int128 *)(v13 + 32);
v20 = *(_OWORD *)(v13 + 32);
v21 = (__int128 *)(v13 + 48);
if ( a7 )
v21 = v19;
v22 = v20;
v23 = *v21;
if ( v18 != 1 )
{
*(_QWORD *)&v15 = js_create_array(a1, 2, (long long)&v22);
LABEL_28:
v16 = v15 & 0xFFFFFFFF00000000LL;
return v16 | (unsigned int)v15;
}
v15 = v23;
}
else
{
v15 = *(_OWORD *)(v13 + 32);
}
if ( DWORD2(v15) >= 0xFFFFFFF7 )
++*(_DWORD *)v15;
goto LABEL_28;
}
LABEL_16:
*a6 = 1;
}
else
{
*a6 = 0;
}
LODWORD(v15) = 0;
v16 = 0LL;
return v16 | (unsigned int)v15;
}
|
js_map_iterator_next:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x28
MOV R14,R9
MOV RBX,RDI
MOV R12D,dword ptr [RSP + 0x60]
LEA ECX,[R12 + 0x2a]
CALL 0x00121207
TEST RAX,RAX
JZ 0x00146630
MOV R15,RAX
MOV EAX,dword ptr [RAX + 0x8]
CMP RAX,0x3
JZ 0x0014668c
CMP EAX,-0x1
JNZ 0x00146638
MOV RAX,qword ptr [R15]
LEA ECX,[R12 + 0x23]
MOVZX EDX,word ptr [RAX + 0x6]
CMP ECX,EDX
JNZ 0x00146638
MOV RBP,qword ptr [RAX + 0x30]
JMP 0x0014663a
LAB_00146630:
AND dword ptr [R14],0x0
PUSH 0x6
JMP 0x00146695
LAB_00146638:
XOR EBP,EBP
LAB_0014663a:
MOV RSI,qword ptr [R15 + 0x18]
TEST RSI,RSI
JZ 0x00146652
MOV R13,qword ptr [RSI + 0x18]
MOV RDI,qword ptr [RBX + 0x18]
CALL 0x00134237
JMP 0x00146656
LAB_00146652:
MOV R13,qword ptr [RBP + 0x10]
LAB_00146656:
ADD RBP,0x8
LAB_0014665a:
CMP R13,RBP
JZ 0x0014666c
CMP dword ptr [R13 + -0xc],0x0
JZ 0x001466af
MOV R13,qword ptr [R13 + 0x8]
JMP 0x0014665a
LAB_0014666c:
AND qword ptr [R15 + 0x18],0x0
MOV RSI,qword ptr [R15]
MOV RDX,qword ptr [R15 + 0x8]
MOV RDI,RBX
CALL 0x0011801e
AND dword ptr [R15],0x0
MOV qword ptr [R15 + 0x8],0x3
LAB_0014668c:
MOV dword ptr [R14],0x1
PUSH 0x3
LAB_00146695:
POP RDX
XOR EAX,EAX
XOR R14D,R14D
LAB_0014669b:
MOV EAX,EAX
OR RAX,R14
ADD RSP,0x28
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_001466af:
LEA RAX,[R13 + -0x10]
INC dword ptr [R13 + -0x10]
MOV qword ptr [R15 + 0x18],RAX
AND dword ptr [R14],0x0
MOV R14,-0x100000000
MOV EAX,dword ptr [R15 + 0x10]
TEST EAX,EAX
JZ 0x00146704
LEA RCX,[R13 + 0x20]
MOVUPS XMM0,xmmword ptr [R13 + 0x20]
ADD R13,0x30
TEST R12D,R12D
CMOVNZ R13,RCX
MOVAPS xmmword ptr [RSP],XMM0
MOVUPS XMM0,xmmword ptr [R13]
MOVAPS xmmword ptr [RSP + 0x10],XMM0
CMP EAX,0x1
JNZ 0x00146715
MOV RAX,qword ptr [RSP + 0x10]
MOV RDX,qword ptr [RSP + 0x18]
JMP 0x0014670c
LAB_00146704:
MOV RAX,qword ptr [R13 + 0x20]
MOV RDX,qword ptr [R13 + 0x28]
LAB_0014670c:
CMP EDX,-0x9
JC 0x00146723
INC dword ptr [RAX]
JMP 0x00146723
LAB_00146715:
PUSH 0x2
POP RSI
MOV RDX,RSP
MOV RDI,RBX
CALL 0x0013a2bd
LAB_00146723:
AND R14,RAX
JMP 0x0014669b
|
ulong js_map_iterator_next(long param_1)
{
long *plVar1;
int *piVar2;
long lVar3;
int4 *in_R9;
long lVar4;
int8 *puVar5;
ulong uVar6;
int in_stack_00000008;
int8 local_58;
int8 uStack_50;
int4 local_48;
int4 uStack_44;
uint uStack_40;
int4 uStack_3c;
plVar1 = (long *)JS_GetOpaque2();
if (plVar1 == (long *)0x0) {
*in_R9 = 0;
}
else {
if ((int)plVar1[1] != 3) {
if (((int)plVar1[1] == -1) && (in_stack_00000008 + 0x23U == (uint)*(ushort *)(*plVar1 + 6))) {
lVar3 = *(long *)(*plVar1 + 0x30);
}
else {
lVar3 = 0;
}
if (plVar1[3] == 0) {
lVar4 = *(long *)(lVar3 + 0x10);
}
else {
lVar4 = *(long *)(plVar1[3] + 0x18);
map_decref_record(*(int8 *)(param_1 + 0x18));
}
for (; lVar4 != lVar3 + 8; lVar4 = *(long *)(lVar4 + 8)) {
if (*(int *)(lVar4 + -0xc) == 0) {
*(int *)(lVar4 + -0x10) = *(int *)(lVar4 + -0x10) + 1;
plVar1[3] = lVar4 + -0x10;
*in_R9 = 0;
if ((int)plVar1[2] == 0) {
piVar2 = *(int **)(lVar4 + 0x20);
uStack_40 = (uint)*(int8 *)(lVar4 + 0x28);
LAB_0014670c:
if (0xfffffff6 < uStack_40) {
*piVar2 = *piVar2 + 1;
}
}
else {
local_58 = *(int8 *)(lVar4 + 0x20);
uStack_50 = *(int8 *)(lVar4 + 0x28);
puVar5 = (int8 *)(lVar4 + 0x30);
if (in_stack_00000008 != 0) {
puVar5 = (int8 *)(lVar4 + 0x20);
}
local_48 = *(int4 *)puVar5;
uStack_44 = *(int4 *)((long)puVar5 + 4);
piVar2 = (int *)*puVar5;
uStack_40 = *(uint *)(puVar5 + 1);
uStack_3c = *(int4 *)((long)puVar5 + 0xc);
if ((int)plVar1[2] == 1) goto LAB_0014670c;
piVar2 = (int *)js_create_array(param_1,2,&local_58);
}
uVar6 = (ulong)piVar2 & 0xffffffff00000000;
goto LAB_0014669b;
}
}
plVar1[3] = 0;
JS_FreeValue(param_1,*plVar1,plVar1[1]);
*(int4 *)plVar1 = 0;
plVar1[1] = 3;
}
*in_R9 = 1;
}
piVar2 = (int *)0x0;
uVar6 = 0;
LAB_0014669b:
return (ulong)piVar2 & 0xffffffff | uVar6;
}
|
|
61,804 |
my_hash_sort_utf8mb3
|
eloqsql/strings/ctype-utf8.c
|
static void my_hash_sort_utf8mb3(CHARSET_INFO *cs, const uchar *s, size_t slen,
ulong *nr1, ulong *nr2)
{
/*
Remove end space. We have to do this to be able to compare
'A ' and 'A' as identical
*/
const uchar *e= skip_trailing_space(s, slen);
my_hash_sort_utf8mb3_nopad(cs, s, e - s, nr1, nr2);
}
|
O3
|
c
|
my_hash_sort_utf8mb3:
pushq %rbp
movq %rsp, %rbp
leaq (%rsi,%rdx), %r10
cmpq $0x15, %rdx
jb 0xd1d6f
movq %r10, %r9
andq $-0x4, %r9
cmpq %rsi, %r9
jbe 0xd1d6f
leaq 0x3(%rsi), %rdx
andq $-0x4, %rdx
movq %r10, %rax
movb -0x1(%r10), %r11b
cmpq %r9, %r10
jbe 0xd1d94
leaq -0x1(%rax), %r10
cmpb $0x20, %r11b
je 0xd1d57
jmp 0xd1d72
movq %r10, %rax
movq %rax, %r9
subq %rsi, %r9
movq %r9, %rdx
cmpq %rsi, %rax
jbe 0xd1d8e
cmpb $0x20, -0x1(%rax)
leaq -0x1(%rax), %rax
leaq -0x1(%rdx), %r9
je 0xd1d78
popq %rbp
jmp 0xd1f79
cmpb $0x20, %r11b
setne %r10b
cmpq %r9, %rdx
setae %r9b
orb %r10b, %r9b
jne 0xd1d72
movq %rax, %r9
movq %r9, %rax
cmpq %rdx, %r9
jbe 0xd1d72
leaq -0x4(%rax), %r9
cmpl $0x20202020, -0x4(%rax) # imm = 0x20202020
je 0xd1dab
jmp 0xd1d72
|
my_hash_sort_utf8mb3:
push rbp
mov rbp, rsp
lea r10, [rsi+rdx]
cmp rdx, 15h
jb short loc_D1D6F
mov r9, r10
and r9, 0FFFFFFFFFFFFFFFCh
cmp r9, rsi
jbe short loc_D1D6F
lea rdx, [rsi+3]
and rdx, 0FFFFFFFFFFFFFFFCh
loc_D1D57:
mov rax, r10
mov r11b, [r10-1]
cmp r10, r9
jbe short loc_D1D94
lea r10, [rax-1]
cmp r11b, 20h ; ' '
jz short loc_D1D57
jmp short loc_D1D72
loc_D1D6F:
mov rax, r10
loc_D1D72:
mov r9, rax
sub r9, rsi
loc_D1D78:
mov rdx, r9
cmp rax, rsi
jbe short loc_D1D8E
cmp byte ptr [rax-1], 20h ; ' '
lea rax, [rax-1]
lea r9, [rdx-1]
jz short loc_D1D78
loc_D1D8E:
pop rbp
jmp my_hash_sort_utf8mb3_nopad
loc_D1D94:
cmp r11b, 20h ; ' '
setnz r10b
cmp rdx, r9
setnb r9b
or r9b, r10b
jnz short loc_D1D72
mov r9, rax
loc_D1DAB:
mov rax, r9
cmp r9, rdx
jbe short loc_D1D72
lea r9, [rax-4]
cmp dword ptr [rax-4], 20202020h
jz short loc_D1DAB
jmp short loc_D1D72
|
long long my_hash_sort_utf8mb3(long long a1, unsigned long long a2, unsigned long long a3, long long a4, long long a5)
{
unsigned long long v5; // r10
unsigned long long v6; // r9
unsigned long long v7; // rdx
unsigned long long v8; // rax
char v9; // r11
unsigned long long v10; // r9
unsigned long long v11; // rdx
bool v12; // zf
unsigned long long v14; // r9
v5 = a2 + a3;
if ( a3 < 0x15 || (v6 = v5 & 0xFFFFFFFFFFFFFFFCLL, (v5 & 0xFFFFFFFFFFFFFFFCLL) <= a2) )
{
v8 = a2 + a3;
}
else
{
v7 = (a2 + 3) & 0xFFFFFFFFFFFFFFFCLL;
while ( 1 )
{
v8 = v5;
v9 = *(_BYTE *)(v5 - 1);
if ( v5 <= v6 )
break;
--v5;
if ( v9 != 32 )
goto LABEL_8;
}
if ( v9 == 32 && v7 < v6 )
{
v14 = v5;
do
{
v8 = v14;
if ( v14 <= v7 )
break;
v14 -= 4LL;
}
while ( *(_DWORD *)(v8 - 4) == 538976288 );
}
}
LABEL_8:
v10 = v8 - a2;
do
{
v11 = v10;
if ( v8 <= a2 )
break;
v12 = *(_BYTE *)--v8 == 32;
--v10;
}
while ( v12 );
return my_hash_sort_utf8mb3_nopad(a1, a2, v11, a4, a5, v10);
}
|
my_hash_sort_utf8mb3:
PUSH RBP
MOV RBP,RSP
LEA R10,[RSI + RDX*0x1]
CMP RDX,0x15
JC 0x001d1d6f
MOV R9,R10
AND R9,-0x4
CMP R9,RSI
JBE 0x001d1d6f
LEA RDX,[RSI + 0x3]
AND RDX,-0x4
LAB_001d1d57:
MOV RAX,R10
MOV R11B,byte ptr [R10 + -0x1]
CMP R10,R9
JBE 0x001d1d94
LEA R10,[RAX + -0x1]
CMP R11B,0x20
JZ 0x001d1d57
JMP 0x001d1d72
LAB_001d1d6f:
MOV RAX,R10
LAB_001d1d72:
MOV R9,RAX
SUB R9,RSI
LAB_001d1d78:
MOV RDX,R9
CMP RAX,RSI
JBE 0x001d1d8e
CMP byte ptr [RAX + -0x1],0x20
LEA RAX,[RAX + -0x1]
LEA R9,[RDX + -0x1]
JZ 0x001d1d78
LAB_001d1d8e:
POP RBP
JMP 0x001d1f79
LAB_001d1d94:
CMP R11B,0x20
SETNZ R10B
CMP RDX,R9
SETNC R9B
OR R9B,R10B
JNZ 0x001d1d72
MOV R9,RAX
LAB_001d1dab:
MOV RAX,R9
CMP R9,RDX
JBE 0x001d1d72
LEA R9,[RAX + -0x4]
CMP dword ptr [RAX + -0x4],0x20202020
JZ 0x001d1dab
JMP 0x001d1d72
|
void my_hash_sort_utf8mb3(int8 param_1,ulong param_2,ulong param_3)
{
char *pcVar1;
ulong uVar2;
ulong uVar3;
ulong uVar4;
ulong uVar5;
uVar3 = param_2 + param_3;
if ((0x14 < param_3) && (uVar5 = uVar3 & 0xfffffffffffffffc, param_2 < uVar5)) {
uVar4 = param_2 + 3 & 0xfffffffffffffffc;
uVar2 = uVar3;
do {
uVar3 = uVar2;
if (uVar3 <= uVar5) {
uVar2 = uVar3;
if (uVar4 < uVar5 && *(char *)(uVar3 - 1) == ' ') goto LAB_001d1dab;
break;
}
uVar2 = uVar3 - 1;
} while (*(char *)(uVar3 - 1) == ' ');
}
goto LAB_001d1d78;
while (uVar2 = uVar3 - 4, *(int *)(uVar3 - 4) == 0x20202020) {
LAB_001d1dab:
uVar3 = uVar2;
if (uVar3 <= uVar4) break;
}
LAB_001d1d78:
do {
if (uVar3 <= param_2) break;
pcVar1 = (char *)(uVar3 - 1);
uVar3 = uVar3 - 1;
} while (*pcVar1 == ' ');
my_hash_sort_utf8mb3_nopad();
return;
}
|
|
61,805 |
my_uca_init_one_contraction
|
eloqsql/strings/ctype-uca.c
|
static uint16 *
my_uca_init_one_contraction(MY_CONTRACTIONS *contractions,
my_wc_t *str, uint length, my_bool with_context)
{
int flag;
uint i;
my_uca_add_contraction_flag(contractions, str[0],
with_context ?
MY_UCA_PREVIOUS_CONTEXT_HEAD :
MY_UCA_CNT_HEAD);
for (i= 1, flag= MY_UCA_CNT_MID1; i < length - 1; i++, flag<<= 1)
my_uca_add_contraction_flag(contractions, str[i], flag);
my_uca_add_contraction_flag(contractions, str[i],
with_context ?
MY_UCA_PREVIOUS_CONTEXT_TAIL :
MY_UCA_CNT_TAIL);
/* Add new contraction to the contraction list */
return my_uca_add_contraction(contractions, str, length,
with_context)->weight;
}
|
O0
|
c
|
my_uca_init_one_contraction:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movb %cl, %al
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movb %al, -0x15(%rbp)
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rax
movq (%rax), %rsi
movsbl -0x15(%rbp), %ecx
movl $0x1, %edx
movl $0x40, %eax
cmpl $0x0, %ecx
cmovnel %eax, %edx
callq 0x5ff80
movl $0x1, -0x20(%rbp)
movl $0x4, -0x1c(%rbp)
movl -0x20(%rbp), %eax
movl -0x14(%rbp), %ecx
subl $0x1, %ecx
cmpl %ecx, %eax
jae 0x5f4e1
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rax
movl -0x20(%rbp), %ecx
movq (%rax,%rcx,8), %rsi
movl -0x1c(%rbp), %edx
callq 0x5ff80
movl -0x20(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x20(%rbp)
movl -0x1c(%rbp), %eax
shll %eax
movl %eax, -0x1c(%rbp)
jmp 0x5f4aa
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rax
movl -0x20(%rbp), %ecx
movq (%rax,%rcx,8), %rsi
movsbl -0x15(%rbp), %ecx
movl $0x2, %edx
movl $0x80, %eax
cmpl $0x0, %ecx
cmovnel %eax, %edx
callq 0x5ff80
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movl -0x14(%rbp), %eax
movl %eax, %edx
movsbl -0x15(%rbp), %ecx
callq 0x5ffb0
addq $0x30, %rax
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
|
my_uca_init_one_contraction:
push rbp
mov rbp, rsp
sub rsp, 20h
mov al, cl
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov [rbp+var_14], edx
mov [rbp+var_15], al
mov rdi, [rbp+var_8]
mov rax, [rbp+var_10]
mov rsi, [rax]
movsx ecx, [rbp+var_15]
mov edx, 1
mov eax, 40h ; '@'
cmp ecx, 0
cmovnz edx, eax
call my_uca_add_contraction_flag
mov [rbp+var_20], 1
mov [rbp+var_1C], 4
loc_5F4AA:
mov eax, [rbp+var_20]
mov ecx, [rbp+var_14]
sub ecx, 1
cmp eax, ecx
jnb short loc_5F4E1
mov rdi, [rbp+var_8]
mov rax, [rbp+var_10]
mov ecx, [rbp+var_20]
mov rsi, [rax+rcx*8]
mov edx, [rbp+var_1C]
call my_uca_add_contraction_flag
mov eax, [rbp+var_20]
add eax, 1
mov [rbp+var_20], eax
mov eax, [rbp+var_1C]
shl eax, 1
mov [rbp+var_1C], eax
jmp short loc_5F4AA
loc_5F4E1:
mov rdi, [rbp+var_8]
mov rax, [rbp+var_10]
mov ecx, [rbp+var_20]
mov rsi, [rax+rcx*8]
movsx ecx, [rbp+var_15]
mov edx, 2
mov eax, 80h
cmp ecx, 0
cmovnz edx, eax
call my_uca_add_contraction_flag
mov rdi, [rbp+var_8]
mov rsi, [rbp+var_10]
mov eax, [rbp+var_14]
mov edx, eax
movsx ecx, [rbp+var_15]
call my_uca_add_contraction
add rax, 30h ; '0'
add rsp, 20h
pop rbp
retn
|
long long my_uca_init_one_contraction(long long a1, long long *a2, unsigned int a3, char a4)
{
long long v4; // rsi
long long v5; // rdx
long long v6; // rdx
unsigned int v8; // [rsp+0h] [rbp-20h]
unsigned int v9; // [rsp+4h] [rbp-1Ch]
v4 = *a2;
v5 = 1LL;
if ( a4 )
v5 = 64LL;
my_uca_add_contraction_flag(a1, v4, v5);
v8 = 1;
v9 = 4;
while ( v8 < a3 - 1 )
{
my_uca_add_contraction_flag(a1, a2[v8++], v9);
v9 *= 2;
}
v6 = 2LL;
if ( a4 )
v6 = 128LL;
my_uca_add_contraction_flag(a1, a2[v8], v6);
return my_uca_add_contraction(a1, a2, a3, (unsigned int)a4) + 48;
}
|
my_uca_init_one_contraction:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x20
MOV AL,CL
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV dword ptr [RBP + -0x14],EDX
MOV byte ptr [RBP + -0x15],AL
MOV RDI,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RAX]
MOVSX ECX,byte ptr [RBP + -0x15]
MOV EDX,0x1
MOV EAX,0x40
CMP ECX,0x0
CMOVNZ EDX,EAX
CALL 0x0015ff80
MOV dword ptr [RBP + -0x20],0x1
MOV dword ptr [RBP + -0x1c],0x4
LAB_0015f4aa:
MOV EAX,dword ptr [RBP + -0x20]
MOV ECX,dword ptr [RBP + -0x14]
SUB ECX,0x1
CMP EAX,ECX
JNC 0x0015f4e1
MOV RDI,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RBP + -0x10]
MOV ECX,dword ptr [RBP + -0x20]
MOV RSI,qword ptr [RAX + RCX*0x8]
MOV EDX,dword ptr [RBP + -0x1c]
CALL 0x0015ff80
MOV EAX,dword ptr [RBP + -0x20]
ADD EAX,0x1
MOV dword ptr [RBP + -0x20],EAX
MOV EAX,dword ptr [RBP + -0x1c]
SHL EAX,0x1
MOV dword ptr [RBP + -0x1c],EAX
JMP 0x0015f4aa
LAB_0015f4e1:
MOV RDI,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RBP + -0x10]
MOV ECX,dword ptr [RBP + -0x20]
MOV RSI,qword ptr [RAX + RCX*0x8]
MOVSX ECX,byte ptr [RBP + -0x15]
MOV EDX,0x2
MOV EAX,0x80
CMP ECX,0x0
CMOVNZ EDX,EAX
CALL 0x0015ff80
MOV RDI,qword ptr [RBP + -0x8]
MOV RSI,qword ptr [RBP + -0x10]
MOV EAX,dword ptr [RBP + -0x14]
MOV EDX,EAX
MOVSX ECX,byte ptr [RBP + -0x15]
CALL 0x0015ffb0
ADD RAX,0x30
ADD RSP,0x20
POP RBP
RET
|
long my_uca_init_one_contraction(int8 param_1,int8 *param_2,int param_3,char param_4)
{
long lVar1;
int8 uVar2;
uint local_28;
int local_24;
uVar2 = 1;
if (param_4 != '\0') {
uVar2 = 0x40;
}
my_uca_add_contraction_flag(param_1,*param_2,uVar2);
local_24 = 4;
for (local_28 = 1; local_28 < param_3 - 1U; local_28 = local_28 + 1) {
my_uca_add_contraction_flag(param_1,param_2[local_28],local_24);
local_24 = local_24 << 1;
}
uVar2 = 2;
if (param_4 != '\0') {
uVar2 = 0x80;
}
my_uca_add_contraction_flag(param_1,param_2[local_28],uVar2);
lVar1 = my_uca_add_contraction(param_1,param_2,param_3,(int)param_4);
return lVar1 + 0x30;
}
|
|
61,806 |
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>::size() const
|
monkey531[P]llama/common/json.hpp
|
size_type size() const noexcept
{
switch (m_data.m_type)
{
case value_t::null:
{
// null values are empty
return 0;
}
case value_t::array:
{
// delegate call to array_t::size()
return m_data.m_value.array->size();
}
case value_t::object:
{
// delegate call to object_t::size()
return m_data.m_value.object->size();
}
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:
{
// all other types have size 1
return 1;
}
}
}
|
O0
|
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>::size() const:
subq $0x28, %rsp
movq %rdi, 0x18(%rsp)
movq 0x18(%rsp), %rax
movq %rax, 0x8(%rsp)
movzbl (%rax), %eax
movq %rax, 0x10(%rsp)
subq $0x9, %rax
ja 0xc905d
movq 0x10(%rsp), %rax
leaq 0xfadb7(%rip), %rcx # 0x1c3dd4
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq $0x0, 0x20(%rsp)
jmp 0xc9066
movq 0x8(%rsp), %rax
movq 0x8(%rax), %rdi
callq 0xb15d0
movq %rax, 0x20(%rsp)
jmp 0xc9066
movq 0x8(%rsp), %rax
movq 0x8(%rax), %rdi
callq 0xb16f0
movq %rax, 0x20(%rsp)
jmp 0xc9066
jmp 0xc905d
movq $0x1, 0x20(%rsp)
movq 0x20(%rsp), %rax
addq $0x28, %rsp
retq
|
_ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4sizeEv:
sub rsp, 28h
mov [rsp+28h+var_10], rdi
mov rax, [rsp+28h+var_10]
mov [rsp+28h+var_20], rax
movzx eax, byte ptr [rax]
mov [rsp+28h+var_18], rax
sub rax, 9; switch 10 cases
ja short def_C9024; jumptable 00000000000C9024 default case
mov rax, [rsp+28h+var_18]
lea rcx, jpt_C9024
movsxd rax, ds:(jpt_C9024 - 1C3DD4h)[rcx+rax*4]
add rax, rcx
jmp rax; switch jump
loc_C9026:
mov [rsp+28h+var_8], 0; jumptable 00000000000C9024 case 0
jmp short loc_C9066
loc_C9031:
mov rax, [rsp+28h+var_20]; jumptable 00000000000C9024 case 2
mov rdi, [rax+8]
call _ZNKSt6vectorIN8nlohmann16json_abi_v3_11_310basic_jsonINS1_11ordered_mapES_NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES_IhSaIhEEvEESaISD_EE4sizeEv; std::vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>::size(void)
mov [rsp+28h+var_8], rax
jmp short loc_C9066
loc_C9046:
mov rax, [rsp+28h+var_20]; jumptable 00000000000C9024 case 1
mov rdi, [rax+8]
call _ZNKSt6vectorISt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN8nlohmann16json_abi_v3_11_310basic_jsonINS9_11ordered_mapES_S6_blmdSaNS9_14adl_serializerES_IhSaIhEEvEEESaISG_EE4sizeEv; 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>>>::size(void)
mov [rsp+28h+var_8], rax
jmp short loc_C9066
loc_C905B:
jmp short $+2; jumptable 00000000000C9024 cases 3-9
def_C9024:
mov [rsp+28h+var_8], 1; jumptable 00000000000C9024 default case
loc_C9066:
mov rax, [rsp+28h+var_8]
add rsp, 28h
retn
|
long long nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::size(
long long a1)
{
long long v2; // [rsp+20h] [rbp-8h]
switch ( *(_BYTE *)a1 )
{
case 0:
v2 = 0LL;
break;
case 1:
v2 = 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>>>::size(*(_QWORD **)(a1 + 8));
break;
case 2:
v2 = std::vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>::size(*(_QWORD **)(a1 + 8));
break;
default:
v2 = 1LL;
break;
}
return v2;
}
|
size:
SUB RSP,0x28
MOV qword ptr [RSP + 0x18],RDI
MOV RAX,qword ptr [RSP + 0x18]
MOV qword ptr [RSP + 0x8],RAX
MOVZX EAX,byte ptr [RAX]
MOV qword ptr [RSP + 0x10],RAX
SUB RAX,0x9
JA 0x001c905d
MOV RAX,qword ptr [RSP + 0x10]
LEA RCX,[0x2c3dd4]
MOVSXD RAX,dword ptr [RCX + RAX*0x4]
ADD RAX,RCX
switchD:
JMP RAX
caseD_0:
MOV qword ptr [RSP + 0x20],0x0
JMP 0x001c9066
caseD_2:
MOV RAX,qword ptr [RSP + 0x8]
MOV RDI,qword ptr [RAX + 0x8]
CALL 0x001b15d0
MOV qword ptr [RSP + 0x20],RAX
JMP 0x001c9066
caseD_1:
MOV RAX,qword ptr [RSP + 0x8]
MOV RDI,qword ptr [RAX + 0x8]
CALL 0x001b16f0
MOV qword ptr [RSP + 0x20],RAX
JMP 0x001c9066
caseD_3:
JMP 0x001c905d
default:
MOV qword ptr [RSP + 0x20],0x1
LAB_001c9066:
MOV RAX,qword ptr [RSP + 0x20]
ADD RSP,0x28
RET
|
/* nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector,
std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void>::size() const */
int8 __thiscall
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>
::size(basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
*this)
{
int8 local_8;
switch(*this) {
case (basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
)0x0:
local_8 = 0;
break;
case (basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
)0x1:
local_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>>>>
::size(*(vector<std::pair<std::__cxx11::string_const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>,std::allocator<std::pair<std::__cxx11::string_const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>>
**)(this + 8));
break;
case (basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
)0x2:
local_8 = std::
vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>
::size(*(vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>
**)(this + 8));
break;
case (basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
)0x3:
case (basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
)0x4:
case (basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
)0x5:
case (basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
)0x6:
case (basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
)0x7:
case (basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
)0x8:
case (basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
)0x9:
default:
local_8 = 1;
}
return local_8;
}
|
|
61,807 |
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>::size() const
|
monkey531[P]llama/common/json.hpp
|
size_type size() const noexcept
{
switch (m_data.m_type)
{
case value_t::null:
{
// null values are empty
return 0;
}
case value_t::array:
{
// delegate call to array_t::size()
return m_data.m_value.array->size();
}
case value_t::object:
{
// delegate call to object_t::size()
return m_data.m_value.object->size();
}
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:
{
// all other types have size 1
return 1;
}
}
}
|
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>::size() const:
movzbl (%rdi), %eax
testl %eax, %eax
je 0x4e142
cmpl $0x1, %eax
je 0x4e11f
cmpl $0x2, %eax
jne 0x4e13d
movq 0x8(%rdi), %rcx
movq 0x8(%rcx), %rax
subq (%rcx), %rax
sarq $0x4, %rax
retq
movq 0x8(%rdi), %rax
movq 0x8(%rax), %rcx
subq (%rax), %rcx
sarq $0x4, %rcx
movabsq $-0x5555555555555555, %rax # imm = 0xAAAAAAAAAAAAAAAB
imulq %rcx, %rax
retq
movl $0x1, %eax
retq
nop
|
_ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4sizeEv:
movzx eax, byte ptr [rdi]
test eax, eax
jz short locret_4E142
cmp eax, 1
jz short loc_4E11F
cmp eax, 2
jnz short loc_4E13D
mov rcx, [rdi+8]
mov rax, [rcx+8]
sub rax, [rcx]
sar rax, 4
retn
loc_4E11F:
mov rax, [rdi+8]
mov rcx, [rax+8]
sub rcx, [rax]
sar rcx, 4
mov rax, 0AAAAAAAAAAAAAAABh
imul rax, rcx
retn
loc_4E13D:
mov eax, 1
locret_4E142:
retn
|
long long nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::size(
unsigned __int8 *a1)
{
long long result; // rax
result = *a1;
if ( *a1 )
{
if ( (_DWORD)result == 1 )
{
return 0xAAAAAAAAAAAAAAABLL * ((long long)(*(_QWORD *)(*((_QWORD *)a1 + 1) + 8LL) - **((_QWORD **)a1 + 1)) >> 4);
}
else if ( (_DWORD)result == 2 )
{
return (long long)(*(_QWORD *)(*((_QWORD *)a1 + 1) + 8LL) - **((_QWORD **)a1 + 1)) >> 4;
}
else
{
return 1LL;
}
}
return result;
}
|
size:
MOVZX EAX,byte ptr [RDI]
TEST EAX,EAX
JZ 0x0014e142
CMP EAX,0x1
JZ 0x0014e11f
CMP EAX,0x2
JNZ 0x0014e13d
MOV RCX,qword ptr [RDI + 0x8]
MOV RAX,qword ptr [RCX + 0x8]
SUB RAX,qword ptr [RCX]
SAR RAX,0x4
RET
LAB_0014e11f:
MOV RAX,qword ptr [RDI + 0x8]
MOV RCX,qword ptr [RAX + 0x8]
SUB RCX,qword ptr [RAX]
SAR RCX,0x4
MOV RAX,-0x5555555555555555
IMUL RAX,RCX
RET
LAB_0014e13d:
MOV EAX,0x1
LAB_0014e142:
RET
|
/* nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector,
std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void>::size() const */
ulong __thiscall
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>
::size(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)
{
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
bVar1;
ulong uVar2;
bVar1 = *this;
uVar2 = (ulong)(byte)bVar1;
if (bVar1 != (basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
)0x0) {
if (bVar1 == (basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
)0x1) {
return ((*(long **)(this + 8))[1] - **(long **)(this + 8) >> 4) * -0x5555555555555555;
}
if (bVar1 == (basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
)0x2) {
return (*(long **)(this + 8))[1] - **(long **)(this + 8) >> 4;
}
uVar2 = 1;
}
return uVar2;
}
|
|
61,808 |
ma_insert_dynamic
|
eloqsql/libmariadb/libmariadb/ma_array.c
|
my_bool ma_insert_dynamic(DYNAMIC_ARRAY *array, void *element)
{
void *buffer;
if (array->elements == array->max_element)
{ /* Call only when necessary */
if (!(buffer=ma_alloc_dynamic(array)))
return TRUE;
}
else
{
buffer=array->buffer+(array->elements * array->size_of_element);
array->elements++;
}
memcpy(buffer,element,(size_t) array->size_of_element);
return FALSE;
}
|
O0
|
c
|
ma_insert_dynamic:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rax
movl 0x8(%rax), %eax
movq -0x10(%rbp), %rcx
cmpl 0xc(%rcx), %eax
jne 0x6699b
movq -0x10(%rbp), %rdi
callq 0x669f0
movq %rax, -0x20(%rbp)
cmpq $0x0, %rax
jne 0x66999
movb $0x1, -0x1(%rbp)
jmp 0x669e1
jmp 0x669c7
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq -0x10(%rbp), %rcx
movl 0x8(%rcx), %ecx
movq -0x10(%rbp), %rdx
imull 0x14(%rdx), %ecx
movl %ecx, %ecx
addq %rcx, %rax
movq %rax, -0x20(%rbp)
movq -0x10(%rbp), %rax
movl 0x8(%rax), %ecx
addl $0x1, %ecx
movl %ecx, 0x8(%rax)
movq -0x20(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x10(%rbp), %rax
movl 0x14(%rax), %eax
movl %eax, %edx
callq 0x360b0
movb $0x0, -0x1(%rbp)
movb -0x1(%rbp), %al
addq $0x20, %rsp
popq %rbp
retq
nopw (%rax,%rax)
|
ma_insert_dynamic:
push rbp
mov rbp, rsp
sub rsp, 20h
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov rax, [rbp+var_10]
mov eax, [rax+8]
mov rcx, [rbp+var_10]
cmp eax, [rcx+0Ch]
jnz short loc_6699B
mov rdi, [rbp+var_10]
call ma_alloc_dynamic
mov [rbp+var_20], rax
cmp rax, 0
jnz short loc_66999
mov [rbp+var_1], 1
jmp short loc_669E1
loc_66999:
jmp short loc_669C7
loc_6699B:
mov rax, [rbp+var_10]
mov rax, [rax]
mov rcx, [rbp+var_10]
mov ecx, [rcx+8]
mov rdx, [rbp+var_10]
imul ecx, [rdx+14h]
mov ecx, ecx
add rax, rcx
mov [rbp+var_20], rax
mov rax, [rbp+var_10]
mov ecx, [rax+8]
add ecx, 1
mov [rax+8], ecx
loc_669C7:
mov rdi, [rbp+var_20]
mov rsi, [rbp+var_18]
mov rax, [rbp+var_10]
mov eax, [rax+14h]
mov edx, eax
call _memcpy
mov [rbp+var_1], 0
loc_669E1:
mov al, [rbp+var_1]
add rsp, 20h
pop rbp
retn
|
char ma_insert_dynamic(long long a1, long long a2)
{
long long v3; // [rsp+0h] [rbp-20h]
if ( *(_DWORD *)(a1 + 8) != *(_DWORD *)(a1 + 12) )
{
v3 = (unsigned int)(*(_DWORD *)(a1 + 20) * (*(_DWORD *)(a1 + 8))++) + *(_QWORD *)a1;
LABEL_6:
memcpy(v3, a2, *(unsigned int *)(a1 + 20));
return 0;
}
v3 = ma_alloc_dynamic(a1);
if ( v3 )
goto LABEL_6;
return 1;
}
|
ma_insert_dynamic:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x20
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x18],RSI
MOV RAX,qword ptr [RBP + -0x10]
MOV EAX,dword ptr [RAX + 0x8]
MOV RCX,qword ptr [RBP + -0x10]
CMP EAX,dword ptr [RCX + 0xc]
JNZ 0x0016699b
MOV RDI,qword ptr [RBP + -0x10]
CALL 0x001669f0
MOV qword ptr [RBP + -0x20],RAX
CMP RAX,0x0
JNZ 0x00166999
MOV byte ptr [RBP + -0x1],0x1
JMP 0x001669e1
LAB_00166999:
JMP 0x001669c7
LAB_0016699b:
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX]
MOV RCX,qword ptr [RBP + -0x10]
MOV ECX,dword ptr [RCX + 0x8]
MOV RDX,qword ptr [RBP + -0x10]
IMUL ECX,dword ptr [RDX + 0x14]
MOV ECX,ECX
ADD RAX,RCX
MOV qword ptr [RBP + -0x20],RAX
MOV RAX,qword ptr [RBP + -0x10]
MOV ECX,dword ptr [RAX + 0x8]
ADD ECX,0x1
MOV dword ptr [RAX + 0x8],ECX
LAB_001669c7:
MOV RDI,qword ptr [RBP + -0x20]
MOV RSI,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RBP + -0x10]
MOV EAX,dword ptr [RAX + 0x14]
MOV EDX,EAX
CALL 0x001360b0
MOV byte ptr [RBP + -0x1],0x0
LAB_001669e1:
MOV AL,byte ptr [RBP + -0x1]
ADD RSP,0x20
POP RBP
RET
|
int1 ma_insert_dynamic(long *param_1,void *param_2)
{
void *local_28;
if ((int)param_1[1] == *(int *)((long)param_1 + 0xc)) {
local_28 = (void *)ma_alloc_dynamic(param_1);
if (local_28 == (void *)0x0) {
return 1;
}
}
else {
local_28 = (void *)(*param_1 + (ulong)(uint)((int)param_1[1] * *(int *)((long)param_1 + 0x14)));
*(int *)(param_1 + 1) = (int)param_1[1] + 1;
}
memcpy(local_28,param_2,(ulong)*(uint *)((long)param_1 + 0x14));
return 0;
}
|
|
61,809 |
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;
}
|
O3
|
c
|
my_well_formed_char_length_ucs2:
pushq %rbp
movq %rsp, %rbp
movq %rcx, %rax
movq %rdx, %rcx
subq %rsi, %rcx
leaq (%rax,%rax), %rdi
cmpq %rcx, %rdi
jbe 0xc5553
movl %ecx, %eax
andl $0x1, %eax
movq %rax, %rsi
negq %rsi
leaq -0x1(%rdx), %rdi
andq %rdi, %rsi
testq %rax, %rax
cmoveq %rdx, %rdi
movq %rsi, 0x8(%r8)
movq %rdi, (%r8)
shrq %rcx
movq %rcx, %rax
jmp 0xc5561
movq $0x0, 0x8(%r8)
addq %rdi, %rsi
movq %rsi, (%r8)
popq %rbp
retq
|
my_well_formed_char_length_ucs2:
push rbp
mov rbp, rsp
mov rax, rcx
mov rcx, rdx
sub rcx, rsi
lea rdi, [rax+rax]
cmp rdi, rcx
jbe short loc_C5553
mov eax, ecx
and eax, 1
mov rsi, rax
neg rsi
lea rdi, [rdx-1]
and rsi, rdi
test rax, rax
cmovz rdi, rdx
mov [r8+8], rsi
mov [r8], rdi
shr rcx, 1
mov rax, rcx
jmp short loc_C5561
loc_C5553:
mov qword ptr [r8+8], 0
add rsi, rdi
mov [r8], rsi
loc_C5561:
pop rbp
retn
|
unsigned long long my_well_formed_char_length_ucs2(
long long a1,
long long a2,
long long a3,
unsigned long long a4,
_QWORD *a5)
{
unsigned long long result; // rax
unsigned long long v6; // rcx
long long v7; // rdi
result = a4;
v6 = a3 - a2;
if ( 2 * result <= a3 - a2 )
{
a5[1] = 0LL;
*a5 = 2 * result + a2;
}
else
{
v7 = a3 - 1;
if ( (v6 & 1) == 0 )
v7 = a3;
a5[1] = (a3 - 1) & -(long long)(v6 & 1);
*a5 = v7;
return v6 >> 1;
}
return result;
}
|
my_well_formed_char_length_ucs2:
PUSH RBP
MOV RBP,RSP
MOV RAX,RCX
MOV RCX,RDX
SUB RCX,RSI
LEA RDI,[RAX + RAX*0x1]
CMP RDI,RCX
JBE 0x001c5553
MOV EAX,ECX
AND EAX,0x1
MOV RSI,RAX
NEG RSI
LEA RDI,[RDX + -0x1]
AND RSI,RDI
TEST RAX,RAX
CMOVZ RDI,RDX
MOV qword ptr [R8 + 0x8],RSI
MOV qword ptr [R8],RDI
SHR RCX,0x1
MOV RAX,RCX
JMP 0x001c5561
LAB_001c5553:
MOV qword ptr [R8 + 0x8],0x0
ADD RSI,RDI
MOV qword ptr [R8],RSI
LAB_001c5561:
POP RBP
RET
|
ulong my_well_formed_char_length_ucs2
(int8 param_1,long param_2,ulong param_3,ulong param_4,ulong *param_5)
{
ulong uVar1;
ulong uVar2;
ulong uVar3;
uVar2 = param_3 - param_2;
if (uVar2 < param_4 * 2) {
uVar1 = (ulong)((uint)uVar2 & 1);
uVar3 = param_3 - 1;
if (uVar1 == 0) {
uVar3 = param_3;
}
param_5[1] = -uVar1 & param_3 - 1;
*param_5 = uVar3;
param_4 = uVar2 >> 1;
}
else {
param_5[1] = 0;
*param_5 = param_2 + param_4 * 2;
}
return param_4;
}
|
|
61,810 |
json_at
|
corpus-core[P]colibri-stateless/src/util/json.c
|
json_t json_at(json_t parent, size_t index) {
if (parent.type != JSON_TYPE_ARRAY) return json(JSON_TYPE_INVALID, parent.start, 0);
size_t i = 0;
json_for_each_value(parent, val) {
if (index == i++) return val;
}
return json(JSON_TYPE_NOT_FOUND, parent.start, 0);
}
|
O0
|
c
|
json_at:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movq %rdi, -0x40(%rbp)
movq %rdi, -0x38(%rbp)
leaq 0x10(%rbp), %rax
movq %rax, -0x30(%rbp)
movq %rsi, -0x8(%rbp)
cmpl $0x4, 0x10(%rax)
je 0xa5b54
movq -0x40(%rbp), %rax
movq -0x30(%rbp), %rcx
movq (%rcx), %rcx
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movl $0x0, 0x10(%rax)
jmp 0xa5c36
movq -0x30(%rbp), %rax
movq -0x40(%rbp), %rdi
movq $0x0, -0x10(%rbp)
xorl %ecx, %ecx
movl %ecx, %esi
xorl %edx, %edx
movq (%rax), %rcx
movq %rcx, (%rsp)
movq 0x8(%rax), %rcx
movq %rcx, 0x8(%rsp)
movq 0x10(%rax), %rax
movq %rax, 0x10(%rsp)
callq 0xa5740
movq -0x40(%rbp), %rcx
xorl %eax, %eax
cmpl $-0x1, 0x10(%rcx)
movb %al, -0x41(%rbp)
je 0xa5ba5
movq -0x40(%rbp), %rax
cmpl $0x0, 0x10(%rax)
setne %al
movb %al, -0x41(%rbp)
movb -0x41(%rbp), %al
testb $0x1, %al
jne 0xa5bae
jmp 0xa5c19
movq -0x8(%rbp), %rax
movq -0x10(%rbp), %rcx
movq %rcx, %rdx
addq $0x1, %rdx
movq %rdx, -0x10(%rbp)
cmpq %rcx, %rax
jne 0xa5bc8
jmp 0xa5c36
jmp 0xa5bca
movq -0x40(%rbp), %rax
leaq -0x28(%rbp), %rdi
xorl %ecx, %ecx
movl %ecx, %esi
movl $0x2, %edx
movq (%rax), %rcx
movq %rcx, (%rsp)
movq 0x8(%rax), %rcx
movq %rcx, 0x8(%rsp)
movq 0x10(%rax), %rax
movq %rax, 0x10(%rsp)
callq 0xa5740
movq -0x40(%rbp), %rax
movq -0x28(%rbp), %rcx
movq %rcx, (%rax)
movq -0x20(%rbp), %rcx
movq %rcx, 0x8(%rax)
movq -0x18(%rbp), %rcx
movq %rcx, 0x10(%rax)
jmp 0xa5b88
movq -0x40(%rbp), %rax
movq -0x30(%rbp), %rcx
movq (%rcx), %rcx
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movl $0xffffffff, 0x10(%rax) # imm = 0xFFFFFFFF
movq -0x38(%rbp), %rax
addq $0x60, %rsp
popq %rbp
retq
|
json_at:
push rbp
mov rbp, rsp
sub rsp, 60h
mov [rbp+var_40], rdi
mov [rbp+var_38], rdi
lea rax, [rbp+arg_0]
mov [rbp+var_30], rax
mov [rbp+var_8], rsi
cmp dword ptr [rax+10h], 4
jz short loc_A5B54
mov rax, [rbp+var_40]
mov rcx, [rbp+var_30]
mov rcx, [rcx]
mov [rax], rcx
mov qword ptr [rax+8], 0
mov dword ptr [rax+10h], 0
jmp loc_A5C36
loc_A5B54:
mov rax, [rbp+var_30]
mov rdi, [rbp+var_40]
mov [rbp+var_10], 0
xor ecx, ecx
mov esi, ecx
xor edx, edx
mov rcx, [rax]
mov [rsp+60h+var_60], rcx
mov rcx, [rax+8]
mov [rsp+60h+var_58], rcx
mov rax, [rax+10h]
mov [rsp+60h+var_50], rax
call json_next_value
loc_A5B88:
mov rcx, [rbp+var_40]
xor eax, eax
cmp dword ptr [rcx+10h], 0FFFFFFFFh
mov [rbp+var_41], al
jz short loc_A5BA5
mov rax, [rbp+var_40]
cmp dword ptr [rax+10h], 0
setnz al
mov [rbp+var_41], al
loc_A5BA5:
mov al, [rbp+var_41]
test al, 1
jnz short loc_A5BAE
jmp short loc_A5C19
loc_A5BAE:
mov rax, [rbp+var_8]
mov rcx, [rbp+var_10]
mov rdx, rcx
add rdx, 1
mov [rbp+var_10], rdx
cmp rax, rcx
jnz short loc_A5BC8
jmp short loc_A5C36
loc_A5BC8:
jmp short $+2
loc_A5BCA:
mov rax, [rbp+var_40]
lea rdi, [rbp+var_28]
xor ecx, ecx
mov esi, ecx
mov edx, 2
mov rcx, [rax]
mov [rsp+60h+var_60], rcx
mov rcx, [rax+8]
mov [rsp+60h+var_58], rcx
mov rax, [rax+10h]
mov [rsp+60h+var_50], rax
call json_next_value
mov rax, [rbp+var_40]
mov rcx, [rbp+var_28]
mov [rax], rcx
mov rcx, [rbp+var_20]
mov [rax+8], rcx
mov rcx, [rbp+var_18]
mov [rax+10h], rcx
jmp loc_A5B88
loc_A5C19:
mov rax, [rbp+var_40]
mov rcx, [rbp+var_30]
mov rcx, [rcx]
mov [rax], rcx
mov qword ptr [rax+8], 0
mov dword ptr [rax+10h], 0FFFFFFFFh
loc_A5C36:
mov rax, [rbp+var_38]
add rsp, 60h
pop rbp
retn
|
long long * json_at(
long long *a1,
long long a2,
_DWORD a3,
_DWORD a4,
int a5,
int a6,
long long a7,
long long a8,
long long a9)
{
int v9; // r8d
int v10; // r9d
long long v11; // rcx
bool v13; // [rsp+1Fh] [rbp-41h]
_QWORD v14[3]; // [rsp+38h] [rbp-28h] BYREF
long long v15; // [rsp+50h] [rbp-10h]
long long v16; // [rsp+58h] [rbp-8h]
v16 = a2;
if ( (_DWORD)a9 == 4 )
{
v15 = 0LL;
json_next_value((long long)a1, 0LL, 0, a8, a5, a6, a7, a8, a9);
while ( 1 )
{
v13 = 0;
if ( *((_DWORD *)a1 + 4) != -1 )
v13 = *((_DWORD *)a1 + 4) != 0;
if ( !v13 )
break;
v11 = v15++;
if ( v16 == v11 )
return a1;
json_next_value((long long)v14, 0LL, 2, a1[1], v9, v10, *a1, a1[1], a1[2]);
*a1 = v14[0];
a1[1] = v14[1];
a1[2] = v14[2];
}
*a1 = a7;
a1[1] = 0LL;
*((_DWORD *)a1 + 4) = -1;
}
else
{
*a1 = a7;
a1[1] = 0LL;
*((_DWORD *)a1 + 4) = 0;
}
return a1;
}
|
json_at:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x60
MOV qword ptr [RBP + -0x40],RDI
MOV qword ptr [RBP + -0x38],RDI
LEA RAX,[RBP + 0x10]
MOV qword ptr [RBP + -0x30],RAX
MOV qword ptr [RBP + -0x8],RSI
CMP dword ptr [RAX + 0x10],0x4
JZ 0x001a5b54
MOV RAX,qword ptr [RBP + -0x40]
MOV RCX,qword ptr [RBP + -0x30]
MOV RCX,qword ptr [RCX]
MOV qword ptr [RAX],RCX
MOV qword ptr [RAX + 0x8],0x0
MOV dword ptr [RAX + 0x10],0x0
JMP 0x001a5c36
LAB_001a5b54:
MOV RAX,qword ptr [RBP + -0x30]
MOV RDI,qword ptr [RBP + -0x40]
MOV qword ptr [RBP + -0x10],0x0
XOR ECX,ECX
MOV ESI,ECX
XOR EDX,EDX
MOV RCX,qword ptr [RAX]
MOV qword ptr [RSP],RCX
MOV RCX,qword ptr [RAX + 0x8]
MOV qword ptr [RSP + 0x8],RCX
MOV RAX,qword ptr [RAX + 0x10]
MOV qword ptr [RSP + 0x10],RAX
CALL 0x001a5740
LAB_001a5b88:
MOV RCX,qword ptr [RBP + -0x40]
XOR EAX,EAX
CMP dword ptr [RCX + 0x10],-0x1
MOV byte ptr [RBP + -0x41],AL
JZ 0x001a5ba5
MOV RAX,qword ptr [RBP + -0x40]
CMP dword ptr [RAX + 0x10],0x0
SETNZ AL
MOV byte ptr [RBP + -0x41],AL
LAB_001a5ba5:
MOV AL,byte ptr [RBP + -0x41]
TEST AL,0x1
JNZ 0x001a5bae
JMP 0x001a5c19
LAB_001a5bae:
MOV RAX,qword ptr [RBP + -0x8]
MOV RCX,qword ptr [RBP + -0x10]
MOV RDX,RCX
ADD RDX,0x1
MOV qword ptr [RBP + -0x10],RDX
CMP RAX,RCX
JNZ 0x001a5bc8
JMP 0x001a5c36
LAB_001a5bc8:
JMP 0x001a5bca
LAB_001a5bca:
MOV RAX,qword ptr [RBP + -0x40]
LEA RDI,[RBP + -0x28]
XOR ECX,ECX
MOV ESI,ECX
MOV EDX,0x2
MOV RCX,qword ptr [RAX]
MOV qword ptr [RSP],RCX
MOV RCX,qword ptr [RAX + 0x8]
MOV qword ptr [RSP + 0x8],RCX
MOV RAX,qword ptr [RAX + 0x10]
MOV qword ptr [RSP + 0x10],RAX
CALL 0x001a5740
MOV RAX,qword ptr [RBP + -0x40]
MOV RCX,qword ptr [RBP + -0x28]
MOV qword ptr [RAX],RCX
MOV RCX,qword ptr [RBP + -0x20]
MOV qword ptr [RAX + 0x8],RCX
MOV RCX,qword ptr [RBP + -0x18]
MOV qword ptr [RAX + 0x10],RCX
JMP 0x001a5b88
LAB_001a5c19:
MOV RAX,qword ptr [RBP + -0x40]
MOV RCX,qword ptr [RBP + -0x30]
MOV RCX,qword ptr [RCX]
MOV qword ptr [RAX],RCX
MOV qword ptr [RAX + 0x8],0x0
MOV dword ptr [RAX + 0x10],0xffffffff
LAB_001a5c36:
MOV RAX,qword ptr [RBP + -0x38]
ADD RSP,0x60
POP RBP
RET
|
int8 * json_at(int8 *param_1,long param_2)
{
bool bVar1;
int8 in_stack_00000008;
int in_stack_00000018;
int8 local_30;
int8 local_28;
int8 local_20;
long local_18;
long local_10;
if (in_stack_00000018 == 4) {
local_18 = 0;
local_10 = param_2;
json_next_value(param_1,0,0);
while( true ) {
bVar1 = false;
if (*(int *)(param_1 + 2) != -1) {
bVar1 = *(int *)(param_1 + 2) != 0;
}
if (!bVar1) break;
if (local_10 == local_18) {
return param_1;
}
local_18 = local_18 + 1;
json_next_value(&local_30,0,2);
*param_1 = local_30;
param_1[1] = local_28;
param_1[2] = local_20;
}
*param_1 = in_stack_00000008;
param_1[1] = 0;
*(int4 *)(param_1 + 2) = 0xffffffff;
}
else {
*param_1 = in_stack_00000008;
param_1[1] = 0;
*(int4 *)(param_1 + 2) = 0;
}
return param_1;
}
|
|
61,811 |
json_at
|
corpus-core[P]colibri-stateless/src/util/json.c
|
json_t json_at(json_t parent, size_t index) {
if (parent.type != JSON_TYPE_ARRAY) return json(JSON_TYPE_INVALID, parent.start, 0);
size_t i = 0;
json_for_each_value(parent, val) {
if (index == i++) return val;
}
return json(JSON_TYPE_NOT_FOUND, parent.start, 0);
}
|
O2
|
c
|
json_at:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x30, %rsp
movq %rdi, %rbx
leaq 0x60(%rsp), %r12
cmpl $0x4, 0x10(%r12)
jne 0x4f6cb
movq %rsi, %r14
movq 0x10(%r12), %rax
movq %rax, 0x10(%rsp)
movups (%r12), %xmm0
movups %xmm0, (%rsp)
movq %rbx, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x4f40c
leaq 0x18(%rsp), %r15
pushq $0x2
popq %rbp
movl 0x10(%rbx), %eax
decl %eax
cmpl $-0x3, %eax
ja 0x4f6dd
subq $0x1, %r14
jb 0x4f6ed
movq 0x10(%rbx), %rax
movq %rax, 0x10(%rsp)
movups (%rbx), %xmm0
movups %xmm0, (%rsp)
movq %r15, %rdi
xorl %esi, %esi
movl %ebp, %edx
callq 0x4f40c
movq 0x28(%rsp), %rax
movq %rax, 0x10(%rbx)
movups 0x18(%rsp), %xmm0
movups %xmm0, (%rbx)
jmp 0x4f68c
movq (%r12), %rax
movq %rax, (%rbx)
andq $0x0, 0x8(%rbx)
andl $0x0, 0x10(%rbx)
jmp 0x4f6ed
movq (%r12), %rax
movq %rax, (%rbx)
andq $0x0, 0x8(%rbx)
orl $-0x1, 0x10(%rbx)
movq %rbx, %rax
addq $0x30, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
|
json_at:
push rbp
push r15
push r14
push r12
push rbx
sub rsp, 30h
mov rbx, rdi
lea r12, [rsp+58h+arg_0]
cmp dword ptr [r12+10h], 4
jnz short loc_4F6CB
mov r14, rsi
mov rax, [r12+10h]
mov [rsp+58h+var_48], rax
movups xmm0, xmmword ptr [r12]
movups [rsp+58h+var_58], xmm0
mov rdi, rbx
xor esi, esi
xor edx, edx
call json_next_value
lea r15, [rsp+58h+var_40]
push 2
pop rbp
loc_4F68C:
mov eax, [rbx+10h]
dec eax
cmp eax, 0FFFFFFFDh
ja short loc_4F6DD
sub r14, 1
jb short loc_4F6ED
mov rax, [rbx+10h]
mov [rsp+58h+var_48], rax
movups xmm0, xmmword ptr [rbx]
movups [rsp+58h+var_58], xmm0
mov rdi, r15
xor esi, esi
mov edx, ebp
call json_next_value
mov rax, [rsp+58h+var_30]
mov [rbx+10h], rax
movups xmm0, [rsp+58h+var_40]
movups xmmword ptr [rbx], xmm0
jmp short loc_4F68C
loc_4F6CB:
mov rax, [r12]
mov [rbx], rax
and qword ptr [rbx+8], 0
and dword ptr [rbx+10h], 0
jmp short loc_4F6ED
loc_4F6DD:
mov rax, [r12]
mov [rbx], rax
and qword ptr [rbx+8], 0
or dword ptr [rbx+10h], 0FFFFFFFFh
loc_4F6ED:
mov rax, rbx
add rsp, 30h
pop rbx
pop r12
pop r14
pop r15
pop rbp
retn
|
long long json_at(long long a1, long long a2, _DWORD a3, int a4, int a5, int a6, __int128 a7, long long a8)
{
int v9; // ecx
int v10; // r8d
int v11; // r9d
__int128 v14; // [rsp+18h] [rbp-40h] BYREF
long long v15; // [rsp+28h] [rbp-30h]
if ( (_DWORD)a8 == 4 )
{
json_next_value(a1, 0LL, 0, a4, a5, a6, a7, a8);
while ( (unsigned int)(*(_DWORD *)(a1 + 16) - 1) <= 0xFFFFFFFD )
{
if ( a2-- == 0 )
return a1;
json_next_value((long long)&v14, 0LL, 2, v9, v10, v11, *(_OWORD *)a1, *(_QWORD *)(a1 + 16));
*(_QWORD *)(a1 + 16) = v15;
*(_OWORD *)a1 = v14;
}
*(_QWORD *)a1 = a7;
*(_QWORD *)(a1 + 8) = 0LL;
*(_DWORD *)(a1 + 16) = -1;
}
else
{
*(_QWORD *)a1 = a7;
*(_QWORD *)(a1 + 8) = 0LL;
*(_DWORD *)(a1 + 16) = 0;
}
return a1;
}
|
json_at:
PUSH RBP
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
SUB RSP,0x30
MOV RBX,RDI
LEA R12,[RSP + 0x60]
CMP dword ptr [R12 + 0x10],0x4
JNZ 0x0014f6cb
MOV R14,RSI
MOV RAX,qword ptr [R12 + 0x10]
MOV qword ptr [RSP + 0x10],RAX
MOVUPS XMM0,xmmword ptr [R12]
MOVUPS xmmword ptr [RSP],XMM0
MOV RDI,RBX
XOR ESI,ESI
XOR EDX,EDX
CALL 0x0014f40c
LEA R15,[RSP + 0x18]
PUSH 0x2
POP RBP
LAB_0014f68c:
MOV EAX,dword ptr [RBX + 0x10]
DEC EAX
CMP EAX,-0x3
JA 0x0014f6dd
SUB R14,0x1
JC 0x0014f6ed
MOV RAX,qword ptr [RBX + 0x10]
MOV qword ptr [RSP + 0x10],RAX
MOVUPS XMM0,xmmword ptr [RBX]
MOVUPS xmmword ptr [RSP],XMM0
MOV RDI,R15
XOR ESI,ESI
MOV EDX,EBP
CALL 0x0014f40c
MOV RAX,qword ptr [RSP + 0x28]
MOV qword ptr [RBX + 0x10],RAX
MOVUPS XMM0,xmmword ptr [RSP + 0x18]
MOVUPS xmmword ptr [RBX],XMM0
JMP 0x0014f68c
LAB_0014f6cb:
MOV RAX,qword ptr [R12]
MOV qword ptr [RBX],RAX
AND qword ptr [RBX + 0x8],0x0
AND dword ptr [RBX + 0x10],0x0
JMP 0x0014f6ed
LAB_0014f6dd:
MOV RAX,qword ptr [R12]
MOV qword ptr [RBX],RAX
AND qword ptr [RBX + 0x8],0x0
OR dword ptr [RBX + 0x10],0xffffffff
LAB_0014f6ed:
MOV RAX,RBX
ADD RSP,0x30
POP RBX
POP R12
POP R14
POP R15
POP RBP
RET
|
int8 * json_at(int8 *param_1,long param_2)
{
bool bVar1;
int8 in_stack_00000008;
int in_stack_00000018;
int8 local_40;
int8 uStack_38;
int8 local_30;
if (in_stack_00000018 == 4) {
json_next_value(param_1,0,0);
while (*(int *)(param_1 + 2) - 1U < 0xfffffffe) {
bVar1 = param_2 == 0;
param_2 = param_2 + -1;
if (bVar1) {
return param_1;
}
json_next_value(&local_40,0,2);
param_1[2] = local_30;
*param_1 = local_40;
param_1[1] = uStack_38;
}
*param_1 = in_stack_00000008;
param_1[1] = 0;
*(int4 *)(param_1 + 2) = 0xffffffff;
}
else {
*param_1 = in_stack_00000008;
param_1[1] = 0;
*(int4 *)(param_1 + 2) = 0;
}
return param_1;
}
|
|
61,812 |
json_at
|
corpus-core[P]colibri-stateless/src/util/json.c
|
json_t json_at(json_t parent, size_t index) {
if (parent.type != JSON_TYPE_ARRAY) return json(JSON_TYPE_INVALID, parent.start, 0);
size_t i = 0;
json_for_each_value(parent, val) {
if (index == i++) return val;
}
return json(JSON_TYPE_NOT_FOUND, parent.start, 0);
}
|
O3
|
c
|
json_at:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %rdi, %rbx
leaq 0x60(%rsp), %r12
cmpl $0x4, 0x10(%r12)
jne 0x578f1
movq %rsi, %r14
movq 0x10(%r12), %rax
movq %rax, 0x10(%rsp)
movups (%r12), %xmm0
movups %xmm0, (%rsp)
movq %rbx, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x575eb
movl 0x10(%rbx), %eax
decl %eax
cmpl $-0x3, %eax
ja 0x578d9
incq %r14
leaq 0x20(%rsp), %r15
decq %r14
je 0x57907
movq 0x10(%rbx), %rax
movq %rax, 0x10(%rsp)
movups (%rbx), %xmm0
movups %xmm0, (%rsp)
movq %r15, %rdi
xorl %esi, %esi
movl $0x2, %edx
callq 0x575eb
movq 0x30(%rsp), %rax
movq %rax, 0x10(%rbx)
movups 0x20(%rsp), %xmm0
movups %xmm0, (%rbx)
movl 0x10(%rbx), %eax
decl %eax
cmpl $-0x2, %eax
jb 0x5789a
movq (%r12), %rax
movq %rax, (%rbx)
movq $0x0, 0x8(%rbx)
movl $0xffffffff, 0x10(%rbx) # imm = 0xFFFFFFFF
jmp 0x57907
movq (%r12), %rax
movq %rax, (%rbx)
movq $0x0, 0x8(%rbx)
movl $0x0, 0x10(%rbx)
movq %rbx, %rax
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
|
json_at:
push r15
push r14
push r12
push rbx
sub rsp, 38h
mov rbx, rdi
lea r12, [rsp+58h+arg_0]
cmp dword ptr [r12+10h], 4
jnz loc_578F1
mov r14, rsi
mov rax, [r12+10h]
mov [rsp+58h+var_48], rax
movups xmm0, xmmword ptr [r12]
movups [rsp+58h+var_58], xmm0
mov rdi, rbx
xor esi, esi
xor edx, edx
call json_next_value
mov eax, [rbx+10h]
dec eax
cmp eax, 0FFFFFFFDh
ja short loc_578D9
inc r14
lea r15, [rsp+58h+var_38]
loc_5789A:
dec r14
jz short loc_57907
mov rax, [rbx+10h]
mov [rsp+58h+var_48], rax
movups xmm0, xmmword ptr [rbx]
movups [rsp+58h+var_58], xmm0
mov rdi, r15
xor esi, esi
mov edx, 2
call json_next_value
mov rax, [rsp+58h+var_28]
mov [rbx+10h], rax
movups xmm0, [rsp+58h+var_38]
movups xmmword ptr [rbx], xmm0
mov eax, [rbx+10h]
dec eax
cmp eax, 0FFFFFFFEh
jb short loc_5789A
loc_578D9:
mov rax, [r12]
mov [rbx], rax
mov qword ptr [rbx+8], 0
mov dword ptr [rbx+10h], 0FFFFFFFFh
jmp short loc_57907
loc_578F1:
mov rax, [r12]
mov [rbx], rax
mov qword ptr [rbx+8], 0
mov dword ptr [rbx+10h], 0
loc_57907:
mov rax, rbx
add rsp, 38h
pop rbx
pop r12
pop r14
pop r15
retn
|
long long json_at(long long a1, long long a2, _DWORD a3, int a4, int a5, int a6, __int128 a7, long long a8)
{
int v8; // ecx
int v9; // r8d
int v10; // r9d
long long v11; // r14
__int128 v13; // [rsp+20h] [rbp-38h] BYREF
long long v14; // [rsp+30h] [rbp-28h]
if ( (_DWORD)a8 == 4 )
{
json_next_value(a1, 0LL, 0, a4, a5, a6, a7, a8);
if ( (unsigned int)(*(_DWORD *)(a1 + 16) - 1) > 0xFFFFFFFD )
{
LABEL_6:
*(_QWORD *)a1 = a7;
*(_QWORD *)(a1 + 8) = 0LL;
*(_DWORD *)(a1 + 16) = -1;
}
else
{
v11 = a2 + 1;
while ( --v11 )
{
json_next_value((long long)&v13, 0LL, 2, v8, v9, v10, *(_OWORD *)a1, *(_QWORD *)(a1 + 16));
*(_QWORD *)(a1 + 16) = v14;
*(_OWORD *)a1 = v13;
if ( (unsigned int)(*(_DWORD *)(a1 + 16) - 1) >= 0xFFFFFFFE )
goto LABEL_6;
}
}
}
else
{
*(_QWORD *)a1 = a7;
*(_QWORD *)(a1 + 8) = 0LL;
*(_DWORD *)(a1 + 16) = 0;
}
return a1;
}
|
json_at:
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
SUB RSP,0x38
MOV RBX,RDI
LEA R12,[RSP + 0x60]
CMP dword ptr [R12 + 0x10],0x4
JNZ 0x001578f1
MOV R14,RSI
MOV RAX,qword ptr [R12 + 0x10]
MOV qword ptr [RSP + 0x10],RAX
MOVUPS XMM0,xmmword ptr [R12]
MOVUPS xmmword ptr [RSP],XMM0
MOV RDI,RBX
XOR ESI,ESI
XOR EDX,EDX
CALL 0x001575eb
MOV EAX,dword ptr [RBX + 0x10]
DEC EAX
CMP EAX,-0x3
JA 0x001578d9
INC R14
LEA R15,[RSP + 0x20]
LAB_0015789a:
DEC R14
JZ 0x00157907
MOV RAX,qword ptr [RBX + 0x10]
MOV qword ptr [RSP + 0x10],RAX
MOVUPS XMM0,xmmword ptr [RBX]
MOVUPS xmmword ptr [RSP],XMM0
MOV RDI,R15
XOR ESI,ESI
MOV EDX,0x2
CALL 0x001575eb
MOV RAX,qword ptr [RSP + 0x30]
MOV qword ptr [RBX + 0x10],RAX
MOVUPS XMM0,xmmword ptr [RSP + 0x20]
MOVUPS xmmword ptr [RBX],XMM0
MOV EAX,dword ptr [RBX + 0x10]
DEC EAX
CMP EAX,-0x2
JC 0x0015789a
LAB_001578d9:
MOV RAX,qword ptr [R12]
MOV qword ptr [RBX],RAX
MOV qword ptr [RBX + 0x8],0x0
MOV dword ptr [RBX + 0x10],0xffffffff
JMP 0x00157907
LAB_001578f1:
MOV RAX,qword ptr [R12]
MOV qword ptr [RBX],RAX
MOV qword ptr [RBX + 0x8],0x0
MOV dword ptr [RBX + 0x10],0x0
LAB_00157907:
MOV RAX,RBX
ADD RSP,0x38
POP RBX
POP R12
POP R14
POP R15
RET
|
int8 * json_at(int8 *param_1,long param_2)
{
int8 in_stack_00000008;
int in_stack_00000018;
int8 local_38;
int8 uStack_30;
int8 local_28;
if (in_stack_00000018 == 4) {
json_next_value(param_1,0,0);
if (*(int *)(param_1 + 2) - 1U < 0xfffffffe) {
param_2 = param_2 + 1;
do {
param_2 = param_2 + -1;
if (param_2 == 0) {
return param_1;
}
json_next_value(&local_38,0,2);
param_1[2] = local_28;
*param_1 = local_38;
param_1[1] = uStack_30;
} while (*(int *)(param_1 + 2) - 1U < 0xfffffffe);
}
*param_1 = in_stack_00000008;
param_1[1] = 0;
*(int4 *)(param_1 + 2) = 0xffffffff;
}
else {
*param_1 = in_stack_00000008;
param_1[1] = 0;
*(int4 *)(param_1 + 2) = 0;
}
return param_1;
}
|
|
61,813 |
nlohmann::json_abi_v3_11_3::detail::lexer<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::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>>::lexer(nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>&&, bool)
|
monkey531[P]llama/common/./json.hpp
|
explicit lexer(InputAdapterType&& adapter, bool ignore_comments_ = false) noexcept
: ia(std::move(adapter))
, ignore_comments(ignore_comments_)
, decimal_point_char(static_cast<char_int_type>(get_decimal_point()))
{}
|
O1
|
cpp
|
nlohmann::json_abi_v3_11_3::detail::lexer<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::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>>::lexer(nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>&&, bool):
pushq %rbx
movq %rdi, %rbx
movups (%rsi), %xmm0
movups %xmm0, (%rdi)
movb %dl, 0x10(%rdi)
movl $0xffffffff, 0x14(%rdi) # imm = 0xFFFFFFFF
xorl %eax, %eax
movb %al, 0x18(%rdi)
leaq 0x60(%rdi), %rcx
xorps %xmm0, %xmm0
movups %xmm0, 0x20(%rdi)
movups %xmm0, 0x30(%rdi)
movups %xmm0, 0x40(%rdi)
movq %rcx, 0x50(%rdi)
movq %rax, 0x58(%rdi)
movb %al, 0x60(%rdi)
leaq 0x1bcf(%rip), %rcx # 0xe9381
movq %rcx, 0x70(%rdi)
movups %xmm0, 0x78(%rdi)
movq %rax, 0x88(%rdi)
callq 0x1c130
movq (%rax), %rax
testq %rax, %rax
je 0xe77d3
movsbl (%rax), %eax
jmp 0xe77d8
movl $0x2e, %eax
movl %eax, 0x90(%rbx)
popq %rbx
retq
|
_ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEEC2EOSM_b:
push rbx
mov rbx, rdi
movups xmm0, xmmword ptr [rsi]
movups xmmword ptr [rdi], xmm0
mov [rdi+10h], dl
mov dword ptr [rdi+14h], 0FFFFFFFFh
xor eax, eax
mov [rdi+18h], al
lea rcx, [rdi+60h]
xorps xmm0, xmm0
movups xmmword ptr [rdi+20h], xmm0
movups xmmword ptr [rdi+30h], xmm0
movups xmmword ptr [rdi+40h], xmm0
mov [rdi+50h], rcx
mov [rdi+58h], rax
mov [rdi+60h], al
lea rcx, aTarget+9; ""
mov [rdi+70h], rcx
movups xmmword ptr [rdi+78h], xmm0
mov [rdi+88h], rax
call _localeconv
mov rax, [rax]
test rax, rax
jz short loc_E77D3
movsx eax, byte ptr [rax]
jmp short loc_E77D8
loc_E77D3:
mov eax, 2Eh ; '.'
loc_E77D8:
mov [rbx+90h], eax
pop rbx
retn
|
long long nlohmann::json_abi_v3_11_3::detail::lexer<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>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::lexer(
long long a1,
_OWORD *a2,
char a3)
{
char *v3; // rax
long long result; // rax
*(_OWORD *)a1 = *a2;
*(_BYTE *)(a1 + 16) = a3;
*(_DWORD *)(a1 + 20) = -1;
*(_BYTE *)(a1 + 24) = 0;
*(_OWORD *)(a1 + 32) = 0LL;
*(_OWORD *)(a1 + 48) = 0LL;
*(_OWORD *)(a1 + 64) = 0LL;
*(_QWORD *)(a1 + 80) = a1 + 96;
*(_QWORD *)(a1 + 88) = 0LL;
*(_BYTE *)(a1 + 96) = 0;
*(_QWORD *)(a1 + 112) = "";
*(_OWORD *)(a1 + 120) = 0LL;
*(_QWORD *)(a1 + 136) = 0LL;
v3 = *(char **)localeconv(a1);
if ( v3 )
result = (unsigned int)*v3;
else
result = 46LL;
*(_DWORD *)(a1 + 144) = result;
return result;
}
|
lexer:
PUSH RBX
MOV RBX,RDI
MOVUPS XMM0,xmmword ptr [RSI]
MOVUPS xmmword ptr [RDI],XMM0
MOV byte ptr [RDI + 0x10],DL
MOV dword ptr [RDI + 0x14],0xffffffff
XOR EAX,EAX
MOV byte ptr [RDI + 0x18],AL
LEA RCX,[RDI + 0x60]
XORPS XMM0,XMM0
MOVUPS xmmword ptr [RDI + 0x20],XMM0
MOVUPS xmmword ptr [RDI + 0x30],XMM0
MOVUPS xmmword ptr [RDI + 0x40],XMM0
MOV qword ptr [RDI + 0x50],RCX
MOV qword ptr [RDI + 0x58],RAX
MOV byte ptr [RDI + 0x60],AL
LEA RCX,[0x1e9381]
MOV qword ptr [RDI + 0x70],RCX
MOVUPS xmmword ptr [RDI + 0x78],XMM0
MOV qword ptr [RDI + 0x88],RAX
CALL 0x0011c130
MOV RAX,qword ptr [RAX]
TEST RAX,RAX
JZ 0x001e77d3
MOVSX EAX,byte ptr [RAX]
JMP 0x001e77d8
LAB_001e77d3:
MOV EAX,0x2e
LAB_001e77d8:
MOV dword ptr [RBX + 0x90],EAX
POP RBX
RET
|
/* nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,
std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void>,
nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char
const*, std::__cxx11::string > >
>::lexer(nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char
const*, std::__cxx11::string > >&&, bool) */
void __thiscall
nlohmann::json_abi_v3_11_3::detail::
lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>>
::lexer(lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>>
*this,iterator_input_adapter *param_1,bool param_2)
{
int8 uVar1;
int iVar2;
lconv *plVar3;
uVar1 = *(int8 *)(param_1 + 8);
*(int8 *)this = *(int8 *)param_1;
*(int8 *)(this + 8) = uVar1;
this[0x10] = (lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>>
)param_2;
*(int4 *)(this + 0x14) = 0xffffffff;
this[0x18] = (lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>>
)0x0;
*(int8 *)(this + 0x20) = 0;
*(int8 *)(this + 0x28) = 0;
*(int8 *)(this + 0x30) = 0;
*(int8 *)(this + 0x38) = 0;
*(int8 *)(this + 0x40) = 0;
*(int8 *)(this + 0x48) = 0;
*(lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>>
**)(this + 0x50) = this + 0x60;
*(int8 *)(this + 0x58) = 0;
this[0x60] = (lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>>
)0x0;
*(char **)(this + 0x70) = "";
*(int8 *)(this + 0x78) = 0;
*(int8 *)(this + 0x80) = 0;
*(int8 *)(this + 0x88) = 0;
plVar3 = localeconv();
if (plVar3->decimal_point == (char *)0x0) {
iVar2 = 0x2e;
}
else {
iVar2 = (int)*plVar3->decimal_point;
}
*(int *)(this + 0x90) = iVar2;
return;
}
|
|
61,814 |
nlohmann::json_abi_v3_11_3::detail::lexer<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::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>>::lexer(nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>&&, bool)
|
monkey531[P]llama/common/./json.hpp
|
explicit lexer(InputAdapterType&& adapter, bool ignore_comments_ = false) noexcept
: ia(std::move(adapter))
, ignore_comments(ignore_comments_)
, decimal_point_char(static_cast<char_int_type>(get_decimal_point()))
{}
|
O3
|
cpp
|
nlohmann::json_abi_v3_11_3::detail::lexer<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::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>>::lexer(nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>&&, bool):
pushq %rbx
movq %rdi, %rbx
movups (%rsi), %xmm0
movups %xmm0, (%rdi)
movb %dl, 0x10(%rdi)
movl $0xffffffff, 0x14(%rdi) # imm = 0xFFFFFFFF
xorl %eax, %eax
movb %al, 0x18(%rdi)
leaq 0x60(%rdi), %rcx
xorps %xmm0, %xmm0
movups %xmm0, 0x20(%rdi)
movups %xmm0, 0x30(%rdi)
movups %xmm0, 0x40(%rdi)
movq %rcx, 0x50(%rdi)
movq %rax, 0x58(%rdi)
movb %al, 0x60(%rdi)
leaq 0x1d3d(%rip), %rcx # 0xe6381
movq %rcx, 0x70(%rdi)
movups %xmm0, 0x78(%rdi)
movq %rax, 0x88(%rdi)
callq 0x1b130
movq (%rax), %rax
testq %rax, %rax
je 0xe4665
movsbl (%rax), %eax
jmp 0xe466a
movl $0x2e, %eax
movl %eax, 0x90(%rbx)
popq %rbx
retq
|
_ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEEC2EOSM_b:
push rbx
mov rbx, rdi
movups xmm0, xmmword ptr [rsi]
movups xmmword ptr [rdi], xmm0
mov [rdi+10h], dl
mov dword ptr [rdi+14h], 0FFFFFFFFh
xor eax, eax
mov [rdi+18h], al
lea rcx, [rdi+60h]
xorps xmm0, xmm0
movups xmmword ptr [rdi+20h], xmm0
movups xmmword ptr [rdi+30h], xmm0
movups xmmword ptr [rdi+40h], xmm0
mov [rdi+50h], rcx
mov [rdi+58h], rax
mov [rdi+60h], al
lea rcx, aTarget+9; ""
mov [rdi+70h], rcx
movups xmmword ptr [rdi+78h], xmm0
mov [rdi+88h], rax
call _localeconv
mov rax, [rax]
test rax, rax
jz short loc_E4665
movsx eax, byte ptr [rax]
jmp short loc_E466A
loc_E4665:
mov eax, 2Eh ; '.'
loc_E466A:
mov [rbx+90h], eax
pop rbx
retn
|
long long nlohmann::json_abi_v3_11_3::detail::lexer<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>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::lexer(
long long a1,
_OWORD *a2,
char a3)
{
char *v3; // rax
long long result; // rax
*(_OWORD *)a1 = *a2;
*(_BYTE *)(a1 + 16) = a3;
*(_DWORD *)(a1 + 20) = -1;
*(_BYTE *)(a1 + 24) = 0;
*(_OWORD *)(a1 + 32) = 0LL;
*(_OWORD *)(a1 + 48) = 0LL;
*(_OWORD *)(a1 + 64) = 0LL;
*(_QWORD *)(a1 + 80) = a1 + 96;
*(_QWORD *)(a1 + 88) = 0LL;
*(_BYTE *)(a1 + 96) = 0;
*(_QWORD *)(a1 + 112) = "";
*(_OWORD *)(a1 + 120) = 0LL;
*(_QWORD *)(a1 + 136) = 0LL;
v3 = *(char **)localeconv(a1);
if ( v3 )
result = (unsigned int)*v3;
else
result = 46LL;
*(_DWORD *)(a1 + 144) = result;
return result;
}
|
lexer:
PUSH RBX
MOV RBX,RDI
MOVUPS XMM0,xmmword ptr [RSI]
MOVUPS xmmword ptr [RDI],XMM0
MOV byte ptr [RDI + 0x10],DL
MOV dword ptr [RDI + 0x14],0xffffffff
XOR EAX,EAX
MOV byte ptr [RDI + 0x18],AL
LEA RCX,[RDI + 0x60]
XORPS XMM0,XMM0
MOVUPS xmmword ptr [RDI + 0x20],XMM0
MOVUPS xmmword ptr [RDI + 0x30],XMM0
MOVUPS xmmword ptr [RDI + 0x40],XMM0
MOV qword ptr [RDI + 0x50],RCX
MOV qword ptr [RDI + 0x58],RAX
MOV byte ptr [RDI + 0x60],AL
LEA RCX,[0x1e6381]
MOV qword ptr [RDI + 0x70],RCX
MOVUPS xmmword ptr [RDI + 0x78],XMM0
MOV qword ptr [RDI + 0x88],RAX
CALL 0x0011b130
MOV RAX,qword ptr [RAX]
TEST RAX,RAX
JZ 0x001e4665
MOVSX EAX,byte ptr [RAX]
JMP 0x001e466a
LAB_001e4665:
MOV EAX,0x2e
LAB_001e466a:
MOV dword ptr [RBX + 0x90],EAX
POP RBX
RET
|
/* nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,
std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void>,
nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char
const*, std::__cxx11::string > >
>::lexer(nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char
const*, std::__cxx11::string > >&&, bool) */
void __thiscall
nlohmann::json_abi_v3_11_3::detail::
lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>>
::lexer(lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>>
*this,iterator_input_adapter *param_1,bool param_2)
{
int8 uVar1;
int iVar2;
lconv *plVar3;
uVar1 = *(int8 *)(param_1 + 8);
*(int8 *)this = *(int8 *)param_1;
*(int8 *)(this + 8) = uVar1;
this[0x10] = (lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>>
)param_2;
*(int4 *)(this + 0x14) = 0xffffffff;
this[0x18] = (lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>>
)0x0;
*(int8 *)(this + 0x20) = 0;
*(int8 *)(this + 0x28) = 0;
*(int8 *)(this + 0x30) = 0;
*(int8 *)(this + 0x38) = 0;
*(int8 *)(this + 0x40) = 0;
*(int8 *)(this + 0x48) = 0;
*(lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>>
**)(this + 0x50) = this + 0x60;
*(int8 *)(this + 0x58) = 0;
this[0x60] = (lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>>
)0x0;
*(char **)(this + 0x70) = "";
*(int8 *)(this + 0x78) = 0;
*(int8 *)(this + 0x80) = 0;
*(int8 *)(this + 0x88) = 0;
plVar3 = localeconv();
if (plVar3->decimal_point == (char *)0x0) {
iVar2 = 0x2e;
}
else {
iVar2 = (int)*plVar3->decimal_point;
}
*(int *)(this + 0x90) = iVar2;
return;
}
|
|
61,815 |
ha_innobase::position(unsigned char const*)
|
eloqsql/storage/innobase/handler/ha_innodb.cc
|
void
ha_innobase::position(
/*==================*/
const uchar* record) /*!< in: row in MySQL format */
{
uint len;
ut_a(m_prebuilt->trx == thd_to_trx(ha_thd()));
if (m_prebuilt->clust_index_was_generated) {
/* No primary key was defined for the table and we
generated the clustered index from row id: the
row reference will be the row id, not any key value
that MySQL knows of */
len = DATA_ROW_ID_LEN;
memcpy(ref, m_prebuilt->row_id, len);
} else {
/* Copy primary key as the row reference */
KEY* key_info = table->key_info + m_primary_key;
key_copy(ref, (uchar*)record, key_info, key_info->key_length);
len = key_info->key_length;
}
ut_ad(len == ref_length);
}
|
O0
|
cpp
|
ha_innobase::position(unsigned char const*):
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rdi
movq 0x7a0(%rdi), %rax
movq 0x18(%rax), %rax
movq %rax, -0x30(%rbp)
callq 0xd0e7c0
movq %rax, %rdi
callq 0x10a1610
movq %rax, %rcx
movq -0x30(%rbp), %rax
cmpq %rcx, %rax
sete %al
xorb $-0x1, %al
testb $0x1, %al
jne 0x10ae89d
jmp 0x10ae8b5
leaq 0x3d237b(%rip), %rdi # 0x1480c1f
leaq 0x3d1de5(%rip), %rsi # 0x1480690
movl $0x28a7, %edx # imm = 0x28A7
callq 0x1229220
jmp 0x10ae8b7
movq -0x28(%rbp), %rax
movq 0x7a0(%rax), %rax
movl 0x20(%rax), %eax
shrl %eax
andl $0x1, %eax
cmpl $0x0, %eax
je 0x10ae8f8
movq -0x28(%rbp), %rax
movl $0x6, -0x14(%rbp)
movq 0x38(%rax), %rdi
movq 0x7a0(%rax), %rsi
addq $0x98, %rsi
movl -0x14(%rbp), %eax
movl %eax, %edx
callq 0x776440
jmp 0x10ae93e
movq -0x28(%rbp), %rax
movq 0x10(%rax), %rcx
movq 0xa8(%rcx), %rcx
movl 0x7c8(%rax), %edx
imulq $0xc0, %rdx, %rdx
addq %rdx, %rcx
movq %rcx, -0x20(%rbp)
movq 0x38(%rax), %rdi
movq -0x10(%rbp), %rsi
movq -0x20(%rbp), %rdx
movq -0x20(%rbp), %rax
movl (%rax), %ecx
xorl %r8d, %r8d
callq 0xe15d60
movq -0x20(%rbp), %rax
movl (%rax), %eax
movl %eax, -0x14(%rbp)
jmp 0x10ae940
jmp 0x10ae942
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax,%rax)
|
_ZN11ha_innobase8positionEPKh:
push rbp
mov rbp, rsp
sub rsp, 30h
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov rax, [rbp+var_8]
mov [rbp+var_28], rax
mov rdi, [rbp+var_28]; this
mov rax, [rdi+7A0h]
mov rax, [rax+18h]
mov [rbp+var_30], rax
call _ZNK7handler6ha_thdEv; handler::ha_thd(void)
mov rdi, rax; THD *
call _ZL10thd_to_trxP3THD; thd_to_trx(THD *)
mov rcx, rax
mov rax, [rbp+var_30]
cmp rax, rcx
setz al
xor al, 0FFh
test al, 1
jnz short loc_10AE89D
jmp short loc_10AE8B5
loc_10AE89D:
lea rdi, aMPrebuiltTrxTh_0; "m_prebuilt->trx == thd_to_trx(ha_thd())"
lea rsi, aWorkspaceLlm4b_240; "/workspace/llm4binary/github2025/eloqsq"...
mov edx, 28A7h; unsigned int
call _Z23ut_dbg_assertion_failedPKcS0_j; ut_dbg_assertion_failed(char const*,char const*,uint)
loc_10AE8B5:
jmp short $+2
loc_10AE8B7:
mov rax, [rbp+var_28]
mov rax, [rax+7A0h]
mov eax, [rax+20h]
shr eax, 1
and eax, 1
cmp eax, 0
jz short loc_10AE8F8
mov rax, [rbp+var_28]
mov [rbp+var_14], 6
mov rdi, [rax+38h]
mov rsi, [rax+7A0h]
add rsi, 98h
mov eax, [rbp+var_14]
mov edx, eax
call _memcpy
jmp short loc_10AE93E
loc_10AE8F8:
mov rax, [rbp+var_28]
mov rcx, [rax+10h]
mov rcx, [rcx+0A8h]
mov edx, [rax+7C8h]
imul rdx, 0C0h
add rcx, rdx
mov [rbp+var_20], rcx
mov rdi, [rax+38h]; unsigned __int8 *
mov rsi, [rbp+var_10]; unsigned __int8 *
mov rdx, [rbp+var_20]; st_key *
mov rax, [rbp+var_20]
mov ecx, [rax]; unsigned int
xor r8d, r8d; bool
call _Z8key_copyPhPKhPK6st_keyjb; key_copy(uchar *,uchar const*,st_key const*,uint,bool)
mov rax, [rbp+var_20]
mov eax, [rax]
mov [rbp+var_14], eax
loc_10AE93E:
jmp short $+2
loc_10AE940:
jmp short $+2
loc_10AE942:
add rsp, 30h
pop rbp
retn
|
long long ha_innobase::position(ha_innobase *this, const unsigned __int8 *a2)
{
THD *v2; // rax
long long v4; // [rsp+0h] [rbp-30h]
st_key *v5; // [rsp+10h] [rbp-20h]
v4 = *(_QWORD *)(*((_QWORD *)this + 244) + 24LL);
v2 = (THD *)handler::ha_thd(this);
if ( v4 != thd_to_trx(v2) )
ut_dbg_assertion_failed(
"m_prebuilt->trx == thd_to_trx(ha_thd())",
"/workspace/llm4binary/github2025/eloqsql/storage/innobase/handler/ha_innodb.cc",
0x28A7u);
if ( ((*(_DWORD *)(*((_QWORD *)this + 244) + 32LL) >> 1) & 1) != 0 )
return memcpy(*((_QWORD *)this + 7), *((_QWORD *)this + 244) + 152LL, 6LL);
v5 = (st_key *)(192LL * *((unsigned int *)this + 498) + *(_QWORD *)(*((_QWORD *)this + 2) + 168LL));
key_copy(*((unsigned __int8 **)this + 7), a2, v5, *(_DWORD *)v5, 0);
return *(unsigned int *)v5;
}
|
read_row_values:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x80
MOV AL,R8B
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x18],RSI
MOV qword ptr [RBP + -0x20],RDX
MOV qword ptr [RBP + -0x28],RCX
AND AL,0x1
MOV byte ptr [RBP + -0x29],AL
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RBP + -0x68],RAX
MOV qword ptr [RBP + -0x40],0x0
MOV qword ptr [RBP + -0x48],0x0
MOV AL,byte ptr [RAX + 0x3e0]
XOR AL,0xff
AND AL,0x1
MOVZX EAX,AL
CMP EAX,0x0
JZ 0x010ae8a9
MOV dword ptr [RBP + -0x4],0x86
JMP 0x010aed06
LAB_010ae8a9:
MOV RAX,qword ptr [RBP + -0x20]
MOV byte ptr [RAX],0x0
MOV RAX,qword ptr [RBP + -0x20]
MOV byte ptr [RAX + 0x1],0x0
LAB_010ae8b8:
MOV RAX,qword ptr [RBP + -0x28]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x38],RAX
CMP RAX,0x0
JZ 0x010aecff
TEST byte ptr [RBP + -0x29],0x1
JNZ 0x010ae8f7
MOV RAX,qword ptr [RBP + -0x18]
MOV RDI,qword ptr [RAX + 0x1f0]
MOV RAX,qword ptr [RBP + -0x38]
MOVZX ESI,word ptr [RAX + 0x8c]
CALL 0x010aed20
CMP EAX,0x0
JZ 0x010aecec
LAB_010ae8f7:
MOV RAX,qword ptr [RBP + -0x38]
MOVZX EAX,word ptr [RAX + 0x8c]
MOV qword ptr [RBP + -0x70],RAX
SUB RAX,0x10
JA 0x010aece8
MOV RAX,qword ptr [RBP + -0x70]
LEA RCX,[0x16e4620]
MOVSXD RAX,dword ptr [RCX + RAX*0x4]
ADD RAX,RCX
switchD:
JMP RAX
caseD_0:
MOV RAX,qword ptr [RBP + -0x68]
MOV RDI,qword ptr [RBP + -0x38]
MOV RSI,qword ptr [RAX + 0x30]
CALL 0x01064000
JMP 0x010aecea
caseD_1:
MOV RAX,qword ptr [RBP + -0x68]
MOV RDI,qword ptr [RBP + -0x38]
MOV RSI,qword ptr [RAX + 0x40]
MOV EDX,dword ptr [RAX + 0x48]
CALL 0x010640c0
JMP 0x010aecea
caseD_2:
MOV RAX,qword ptr [RBP + -0x68]
CMP qword ptr [RAX + 0x38],0x0
JZ 0x010ae975
MOV RDI,qword ptr [RBP + -0x38]
LEA RSI,[0x156db4d]
MOV EDX,0xa
CALL 0x010640c0
JMP 0x010ae98a
LAB_010ae975:
MOV RDI,qword ptr [RBP + -0x38]
LEA RSI,[0x156db58]
MOV EDX,0xa
CALL 0x010640c0
LAB_010ae98a:
JMP 0x010aecea
caseD_3:
MOV RAX,qword ptr [RBP + -0x68]
CMP qword ptr [RAX + 0x38],0x0
JZ 0x010ae9ad
MOV RAX,qword ptr [RBP + -0x68]
MOV RDI,qword ptr [RBP + -0x38]
MOV RSI,qword ptr [RAX + 0x38]
CALL 0x01064000
JMP 0x010ae9ba
LAB_010ae9ad:
MOV RDI,qword ptr [RBP + -0x38]
XOR EAX,EAX
MOV ESI,EAX
CALL 0x0097fef0
LAB_010ae9ba:
JMP 0x010aecea
caseD_4:
MOV RAX,qword ptr [RBP + -0x68]
CMP dword ptr [RAX + 0x1cc],0x0
JBE 0x010ae9ec
MOV RAX,qword ptr [RBP + -0x68]
MOV RDI,qword ptr [RBP + -0x38]
MOV RSI,RAX
ADD RSI,0x30
ADD RSI,0x1c
MOV EDX,dword ptr [RAX + 0x1cc]
CALL 0x010640c0
JMP 0x010ae9f9
LAB_010ae9ec:
MOV RDI,qword ptr [RBP + -0x38]
XOR EAX,EAX
MOV ESI,EAX
CALL 0x0097fef0
LAB_010ae9f9:
JMP 0x010aecea
caseD_5:
MOV RAX,qword ptr [RBP + -0x68]
CMP dword ptr [RAX + 0x2d0],0x0
JBE 0x010aea2e
MOV RAX,qword ptr [RBP + -0x68]
MOV RDI,qword ptr [RBP + -0x38]
MOV RSI,RAX
ADD RSI,0x30
ADD RSI,0x1a0
MOV EDX,dword ptr [RAX + 0x2d0]
CALL 0x010640c0
JMP 0x010aea3b
LAB_010aea2e:
MOV RDI,qword ptr [RBP + -0x38]
XOR EAX,EAX
MOV ESI,EAX
CALL 0x0097fef0
LAB_010aea3b:
JMP 0x010aecea
caseD_6:
MOV RAX,qword ptr [RBP + -0x68]
CMP dword ptr [RAX + 0x394],0x0
JBE 0x010aea70
MOV RAX,qword ptr [RBP + -0x68]
MOV RDI,qword ptr [RBP + -0x38]
MOV RSI,RAX
ADD RSI,0x30
ADD RSI,0x2a4
MOV EDX,dword ptr [RAX + 0x394]
CALL 0x010640c0
JMP 0x010aea7d
LAB_010aea70:
MOV RDI,qword ptr [RBP + -0x38]
XOR EAX,EAX
MOV ESI,EAX
CALL 0x0097fef0
LAB_010aea7d:
JMP 0x010aecea
caseD_7:
MOV RAX,qword ptr [RBP + -0x68]
CMP qword ptr [RAX + 0x38],0x0
JZ 0x010aeacf
MOV RAX,qword ptr [RBP + -0x68]
MOV RDI,qword ptr [RBP + -0x38]
MOVSXD RDX,dword ptr [RAX + 0x398]
LEA RCX,[0x1afde00]
SHL RDX,0x4
ADD RCX,RDX
MOV RSI,qword ptr [RCX]
MOVSXD RCX,dword ptr [RAX + 0x398]
LEA RAX,[0x1afde00]
SHL RCX,0x4
ADD RAX,RCX
MOV RAX,qword ptr [RAX + 0x8]
MOV EDX,EAX
CALL 0x010640c0
JMP 0x010aeadc
LAB_010aeacf:
MOV RDI,qword ptr [RBP + -0x38]
XOR EAX,EAX
MOV ESI,EAX
CALL 0x0097fef0
LAB_010aeadc:
JMP 0x010aecea
caseD_8:
MOV RAX,qword ptr [RBP + -0x68]
CMP qword ptr [RAX + 0x3a0],0x0
JZ 0x010aeb4f
CALL 0x01420b20
MOV RCX,qword ptr [RBP + -0x68]
MOV qword ptr [RBP + -0x58],RAX
MOV RAX,qword ptr [RBP + -0x58]
MOV ESI,0xf4240
XOR EDX,EDX
DIV RSI
MOV qword ptr [RBP + -0x50],RAX
MOV RAX,qword ptr [RBP + -0x50]
CMP RAX,qword ptr [RCX + 0x3a0]
JLE 0x010aeb30
MOV RCX,qword ptr [RBP + -0x68]
MOV RAX,qword ptr [RBP + -0x50]
SUB RAX,qword ptr [RCX + 0x3a0]
MOV qword ptr [RBP + -0x78],RAX
JMP 0x010aeb38
LAB_010aeb30:
XOR EAX,EAX
MOV qword ptr [RBP + -0x78],RAX
JMP 0x010aeb38
LAB_010aeb38:
MOV RAX,qword ptr [RBP + -0x78]
MOV qword ptr [RBP + -0x60],RAX
MOV RDI,qword ptr [RBP + -0x38]
MOV RSI,qword ptr [RBP + -0x60]
CALL 0x01064000
JMP 0x010aeb5c
LAB_010aeb4f:
MOV RDI,qword ptr [RBP + -0x38]
XOR EAX,EAX
MOV ESI,EAX
CALL 0x0097fef0
LAB_010aeb5c:
JMP 0x010aecea
caseD_9:
MOV RAX,qword ptr [RBP + -0x68]
CMP dword ptr [RAX + 0x3b0],0x0
JBE 0x010aeb8a
MOV RAX,qword ptr [RBP + -0x68]
MOV RDI,qword ptr [RBP + -0x38]
MOV RSI,qword ptr [RAX + 0x3a8]
MOV EDX,dword ptr [RAX + 0x3b0]
CALL 0x010640c0
JMP 0x010aeb97
LAB_010aeb8a:
MOV RDI,qword ptr [RBP + -0x38]
XOR EAX,EAX
MOV ESI,EAX
CALL 0x0097fef0
LAB_010aeb97:
JMP 0x010aecea
caseD_a:
MOV RAX,qword ptr [RBP + -0x68]
CMP dword ptr [RAX + 0x3c0],0x0
JBE 0x010aebc5
MOV RAX,qword ptr [RBP + -0x68]
MOV RDI,qword ptr [RBP + -0x38]
MOV RSI,qword ptr [RAX + 0x3b8]
MOV EDX,dword ptr [RAX + 0x3c0]
CALL 0x01064100
JMP 0x010aebd2
LAB_010aebc5:
MOV RDI,qword ptr [RBP + -0x38]
XOR EAX,EAX
MOV ESI,EAX
CALL 0x0097fef0
LAB_010aebd2:
JMP 0x010aecea
caseD_b:
MOV RAX,qword ptr [RBP + -0x68]
CMP qword ptr [RAX + 0x3d0],0x0
JZ 0x010aebfb
MOV RAX,qword ptr [RBP + -0x68]
MOV RDI,qword ptr [RBP + -0x38]
MOV RSI,qword ptr [RAX + 0x3d0]
CALL 0x01064000
JMP 0x010aec08
LAB_010aebfb:
MOV RDI,qword ptr [RBP + -0x38]
XOR EAX,EAX
MOV ESI,EAX
CALL 0x0097fef0
LAB_010aec08:
JMP 0x010aecea
caseD_c:
MOV RDI,qword ptr [RBP + -0x38]
XOR EAX,EAX
MOV ESI,EAX
CALL 0x0097fef0
JMP 0x010aecea
caseD_d:
MOV RAX,qword ptr [RBP + -0x68]
MOV RDI,qword ptr [RBP + -0x38]
MOV DL,byte ptr [RAX + 0x3c4]
MOV EAX,0x2
MOV ECX,0x1
TEST DL,0x1
CMOVNZ EAX,ECX
MOV EAX,EAX
MOV ESI,EAX
CALL 0x01064180
JMP 0x010aecea
caseD_e:
MOV RAX,qword ptr [RBP + -0x68]
MOV RDI,qword ptr [RBP + -0x38]
MOV DL,byte ptr [RAX + 0x3c5]
MOV EAX,0x2
MOV ECX,0x1
TEST DL,0x1
CMOVNZ EAX,ECX
MOV EAX,EAX
MOV ESI,EAX
CALL 0x01064180
JMP 0x010aecea
caseD_f:
MOV RAX,qword ptr [RBP + -0x68]
MOV EDI,dword ptr [RAX + 0x3d8]
LEA RSI,[RBP + -0x48]
CALL 0x00f57f20
MOV qword ptr [RBP + -0x40],RAX
CMP qword ptr [RBP + -0x48],0x0
JBE 0x010aeca7
MOV RDI,qword ptr [RBP + -0x38]
MOV RSI,qword ptr [RBP + -0x40]
MOV RAX,qword ptr [RBP + -0x48]
MOV EDX,EAX
CALL 0x010640c0
JMP 0x010aecb4
LAB_010aeca7:
MOV RDI,qword ptr [RBP + -0x38]
XOR EAX,EAX
MOV ESI,EAX
CALL 0x0097fef0
LAB_010aecb4:
JMP 0x010aecea
caseD_10:
MOV RAX,qword ptr [RBP + -0x68]
CMP dword ptr [RAX + 0x3dc],0x0
JLE 0x010aecd9
MOV RAX,qword ptr [RBP + -0x68]
MOV RDI,qword ptr [RBP + -0x38]
MOVSXD RSI,dword ptr [RAX + 0x3dc]
CALL 0x01064000
JMP 0x010aece6
LAB_010aecd9:
MOV RDI,qword ptr [RBP + -0x38]
XOR EAX,EAX
MOV ESI,EAX
CALL 0x0097fef0
LAB_010aece6:
JMP 0x010aecea
LAB_010aece8:
JMP 0x010aecea
LAB_010aecea:
JMP 0x010aecec
default:
JMP 0x010aecee
LAB_010aecee:
MOV RAX,qword ptr [RBP + -0x28]
ADD RAX,0x8
MOV qword ptr [RBP + -0x28],RAX
JMP 0x010ae8b8
LAB_010aecff:
MOV dword ptr [RBP + -0x4],0x0
LAB_010aed06:
MOV EAX,dword ptr [RBP + -0x4]
ADD RSP,0x80
POP RBP
RET
|
/* table_threads::read_row_values(TABLE*, unsigned char*, Field**, bool) */
int4 __thiscall
table_threads::read_row_values
(table_threads *this,TABLE *param_1,uchar *param_2,Field **param_3,bool param_4)
{
int iVar1;
uint uVar2;
ulong uVar3;
ulonglong local_80;
long local_50;
char *local_48;
Field *local_40;
byte local_31;
Field **local_30;
uchar *local_28;
TABLE *local_20;
table_threads *local_18;
int4 local_c;
local_48 = (char *)0x0;
local_50 = 0;
if ((((byte)this[0x3e0] ^ 0xff) & 1) == 0) {
*param_2 = '\0';
param_2[1] = '\0';
local_31 = param_4;
local_28 = param_2;
local_20 = param_1;
local_18 = this;
for (local_30 = param_3; local_40 = *local_30, local_40 != (Field *)0x0; local_30 = local_30 + 1
) {
if (((local_31 & 1) != 0) ||
(iVar1 = ::bitmap_is_set(*(st_bitmap **)(local_20 + 0x1f0),
(uint)*(ushort *)(local_40 + 0x8c)), iVar1 != 0)) {
switch(*(int2 *)(local_40 + 0x8c)) {
case 0:
PFS_engine_table::set_field_ulonglong(local_40,*(ulonglong *)(this + 0x30));
break;
case 1:
PFS_engine_table::set_field_varchar_utf8
(local_40,*(char **)(this + 0x40),*(uint *)(this + 0x48));
break;
case 2:
if (*(long *)(this + 0x38) == 0) {
PFS_engine_table::set_field_varchar_utf8(local_40,"BACKGROUND",10);
}
else {
PFS_engine_table::set_field_varchar_utf8(local_40,"FOREGROUND",10);
}
break;
case 3:
if (*(long *)(this + 0x38) == 0) {
Field::set_null(local_40,0);
}
else {
PFS_engine_table::set_field_ulonglong(local_40,*(ulonglong *)(this + 0x38));
}
break;
case 4:
if (*(int *)(this + 0x1cc) == 0) {
Field::set_null(local_40,0);
}
else {
PFS_engine_table::set_field_varchar_utf8
(local_40,(char *)(this + 0x4c),*(uint *)(this + 0x1cc));
}
break;
case 5:
if (*(int *)(this + 0x2d0) == 0) {
Field::set_null(local_40,0);
}
else {
PFS_engine_table::set_field_varchar_utf8
(local_40,(char *)(this + 0x1d0),*(uint *)(this + 0x2d0));
}
break;
case 6:
if (*(int *)(this + 0x394) == 0) {
Field::set_null(local_40,0);
}
else {
PFS_engine_table::set_field_varchar_utf8
(local_40,(char *)(this + 0x2d4),*(uint *)(this + 0x394));
}
break;
case 7:
if (*(long *)(this + 0x38) == 0) {
Field::set_null(local_40,0);
}
else {
PFS_engine_table::set_field_varchar_utf8
(local_40,*(char **)(command_name + (long)*(int *)(this + 0x398) * 0x10),
(uint)*(int8 *)(command_name + (long)*(int *)(this + 0x398) * 0x10 + 8)
);
}
break;
case 8:
if (*(long *)(this + 0x3a0) == 0) {
Field::set_null(local_40,0);
}
else {
uVar3 = my_hrtime();
if (*(long *)(this + 0x3a0) < (long)(uVar3 / 1000000)) {
local_80 = uVar3 / 1000000 - *(long *)(this + 0x3a0);
}
else {
local_80 = 0;
}
PFS_engine_table::set_field_ulonglong(local_40,local_80);
}
break;
case 9:
if (*(int *)(this + 0x3b0) == 0) {
Field::set_null(local_40,0);
}
else {
PFS_engine_table::set_field_varchar_utf8
(local_40,*(char **)(this + 0x3a8),*(uint *)(this + 0x3b0));
}
break;
case 10:
if (*(int *)(this + 0x3c0) == 0) {
Field::set_null(local_40,0);
}
else {
PFS_engine_table::set_field_longtext_utf8
(local_40,*(char **)(this + 0x3b8),*(uint *)(this + 0x3c0));
}
break;
case 0xb:
if (*(long *)(this + 0x3d0) == 0) {
Field::set_null(local_40,0);
}
else {
PFS_engine_table::set_field_ulonglong(local_40,*(ulonglong *)(this + 0x3d0));
}
break;
case 0xc:
Field::set_null(local_40,0);
break;
case 0xd:
uVar2 = 2;
if (((byte)this[0x3c4] & 1) != 0) {
uVar2 = 1;
}
PFS_engine_table::set_field_enum(local_40,(ulong)uVar2);
break;
case 0xe:
uVar2 = 2;
if (((byte)this[0x3c5] & 1) != 0) {
uVar2 = 1;
}
PFS_engine_table::set_field_enum(local_40,(ulong)uVar2);
break;
case 0xf:
local_48 = (char *)vio_type_name(*(int4 *)(this + 0x3d8),&local_50);
if (local_50 == 0) {
Field::set_null(local_40,0);
}
else {
PFS_engine_table::set_field_varchar_utf8(local_40,local_48,(uint)local_50);
}
break;
case 0x10:
if (*(int *)(this + 0x3dc) < 1) {
Field::set_null(local_40,0);
}
else {
PFS_engine_table::set_field_ulonglong(local_40,(long)*(int *)(this + 0x3dc));
}
}
}
}
local_c = 0;
}
else {
local_c = 0x86;
}
return local_c;
}
|
|
61,816 |
corofx::task<int>::operator()() && requires effect_types::empty
|
corofx/include/corofx/task.hpp
|
[[nodiscard]]
auto operator()() && noexcept -> T
requires(effect_types::empty)
{
if constexpr (std::is_void_v<T>) {
call_unchecked();
} else {
auto output = std::optional<T>{};
call_unchecked(output);
return std::move(*output);
}
}
|
O3
|
cpp
|
corofx::task<int>::operator()() && requires effect_types::empty:
endbr64
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %fs:0x28, %rax
movq %rax, -0x8(%rbp)
leaq -0x10(%rbp), %rax
movb $0x0, 0x4(%rax)
movq (%rdi), %rdi
movq %rax, 0x18(%rdi)
callq *(%rdi)
cmpb $0x0, -0xc(%rbp)
je 0x1ad4
movl -0x10(%rbp), %eax
movq %fs:0x28, %rcx
cmpq -0x8(%rbp), %rcx
jne 0x1ad9
addq $0x10, %rsp
popq %rbp
retq
callq 0x1269
callq 0x11b0
endbr64
movq %rax, %rdi
callq 0x1aea
|
_ZNO6corofx4taskIiJEEclEvQsr12effect_typesE5empty:
endbr64
push rbp
mov rbp, rsp
sub rsp, 10h
mov rax, fs:28h
mov [rbp+var_8], rax
lea rax, [rbp+var_10]
mov byte ptr [rax+4], 0
mov rdi, [rdi]
mov [rdi+18h], rax
call qword ptr [rdi]
cmp [rbp+var_C], 0
jz short loc_1AD4
mov eax, [rbp+var_10]
mov rcx, fs:28h
cmp rcx, [rbp+var_8]
jnz short loc_1AD9
add rsp, 10h
pop rbp
retn
loc_1AD4:
call _ZNO6corofx4taskIiJEEclEvQsr12effect_typesE5empty_cold_1
loc_1AD9:
call ___stack_chk_fail
endbr64
mov rdi, rax
call $+5
|
long long corofx::task<int>::operator()(long long *a1)
{
long long v1; // rdi
unsigned int v3; // [rsp+0h] [rbp-10h] BYREF
char v4; // [rsp+4h] [rbp-Ch]
unsigned long long v5; // [rsp+8h] [rbp-8h]
v5 = __readfsqword(0x28u);
v4 = 0;
v1 = *a1;
*(_QWORD *)(v1 + 24) = &v3;
(*(void (**)(void))v1)();
if ( !v4 )
corofx::task<int>::operator()();
return v3;
}
|
_ZNO6corofx4taskIiJEEclEvQsr12effect_typesE5empty:
ENDBR64
PUSH RBP
MOV RBP,RSP
SUB RSP,0x10
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x8],RAX
LEA RAX,[RBP + -0x10]
MOV byte ptr [RAX + 0x4],0x0
MOV RDI,qword ptr [RDI]
MOV qword ptr [RDI + 0x18],RAX
LAB_00101ab4:
CALL qword ptr [RDI]
LAB_00101ab6:
CMP byte ptr [RBP + -0xc],0x0
JZ 0x00101ad4
MOV EAX,dword ptr [RBP + -0x10]
MOV RCX,qword ptr FS:[0x28]
CMP RCX,qword ptr [RBP + -0x8]
JNZ 0x00101ad9
ADD RSP,0x10
POP RBP
RET
LAB_00101ad4:
CALL 0x00101269
LAB_00101ad9:
CALL 0x001011b0
|
int4 _ZNO6corofx4taskIiJEEclEvQsr12effect_typesE5empty(long *param_1)
{
int8 *puVar1;
long in_FS_OFFSET;
int4 local_18;
char local_14;
long local_10;
local_10 = *(long *)(in_FS_OFFSET + 0x28);
local_14 = '\0';
puVar1 = (int8 *)*param_1;
puVar1[3] = &local_18;
/* try { // try from 00101ab4 to 00101ab5 has its CatchHandler @ 00101ade */
(*(code *)*puVar1)();
if (local_14 == '\0') {
_ZNO6corofx4taskIiJEEclEvQsr12effect_typesE5empty_cold_1();
}
else if (*(long *)(in_FS_OFFSET + 0x28) == local_10) {
return local_18;
}
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
|
|
61,817 |
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 0x1cfd9e(%rip), %rax # 0x2b3618
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 0x3a3f0
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
|
inline_mysql_mutex_init:
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(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,[0x3b3618]
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 0x0013a3f0
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;
}
|
|
61,818 |
ma_ft_segiterator
|
eloqsql/storage/maria/ma_ft_update.c
|
uint _ma_ft_segiterator(register FT_SEG_ITERATOR *ftsi)
{
DBUG_ENTER("_ma_ft_segiterator");
if (!ftsi->num)
DBUG_RETURN(0);
ftsi->num--;
if (!ftsi->seg)
DBUG_RETURN(1);
ftsi->seg--;
if (ftsi->seg->null_bit &&
(ftsi->rec[ftsi->seg->null_pos] & ftsi->seg->null_bit))
{
ftsi->pos=0;
DBUG_RETURN(1);
}
ftsi->pos= ftsi->rec+ftsi->seg->start;
if (ftsi->seg->flag & HA_VAR_LENGTH_PART)
{
uint pack_length= (ftsi->seg->bit_start);
ftsi->len= (pack_length == 1 ? (uint) * ftsi->pos :
uint2korr(ftsi->pos));
ftsi->pos+= pack_length; /* Skip VARCHAR length */
DBUG_RETURN(1);
}
if (ftsi->seg->flag & HA_BLOB_PART)
{
ftsi->len= _ma_calc_blob_length(ftsi->seg->bit_start,ftsi->pos);
memcpy((char**) &ftsi->pos, ftsi->pos+ftsi->seg->bit_start, sizeof(char*));
DBUG_RETURN(1);
}
ftsi->len=ftsi->seg->length;
DBUG_RETURN(1);
}
|
O3
|
c
|
ma_ft_segiterator:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movl (%rdi), %eax
testl %eax, %eax
je 0x5fe62
movq %rdi, %r14
decl %eax
movl %eax, (%rdi)
movq 0x8(%rdi), %rax
movl $0x1, %ebx
testq %rax, %rax
je 0x5fec8
leaq -0x20(%rax), %rcx
movq %rcx, 0x8(%r14)
movb -0x7(%rax), %cl
movq 0x10(%r14), %rsi
testb %cl, %cl
je 0x5fe66
movl -0x14(%rax), %edx
testb %cl, (%rsi,%rdx)
je 0x5fe66
movq $0x0, 0x18(%r14)
jmp 0x5fec8
xorl %ebx, %ebx
jmp 0x5fec8
movl -0x18(%rax), %ecx
addq %rcx, %rsi
movq %rsi, 0x18(%r14)
movzwl -0xe(%rax), %ecx
testb $0x8, %cl
jne 0x5fe88
testb $0x20, %cl
jne 0x5fe97
movzwl -0xc(%rax), %eax
movl %eax, 0x4(%r14)
jmp 0x5fec8
movzbl -0x6(%rax), %eax
cmpq $0x1, %rax
jne 0x5feba
movzbl (%rsi), %ecx
jmp 0x5febd
movzbl -0x6(%rax), %edi
callq 0x4798b
movl %eax, 0x4(%r14)
movq 0x8(%r14), %rax
movq 0x18(%r14), %rcx
movzbl 0x1a(%rax), %eax
movq (%rcx,%rax), %rax
movq %rax, 0x18(%r14)
jmp 0x5fec8
movzwl (%rsi), %ecx
movl %ecx, 0x4(%r14)
addq %rax, %rsi
movq %rsi, 0x18(%r14)
movl %ebx, %eax
popq %rbx
popq %r14
popq %rbp
retq
|
_ma_ft_segiterator:
push rbp
mov rbp, rsp
push r14
push rbx
mov eax, [rdi]
test eax, eax
jz short loc_5FE62
mov r14, rdi
dec eax
mov [rdi], eax
mov rax, [rdi+8]
mov ebx, 1
test rax, rax
jz loc_5FEC8
lea rcx, [rax-20h]
mov [r14+8], rcx
mov cl, [rax-7]
mov rsi, [r14+10h]
test cl, cl
jz short loc_5FE66
mov edx, [rax-14h]
test [rsi+rdx], cl
jz short loc_5FE66
mov qword ptr [r14+18h], 0
jmp short loc_5FEC8
loc_5FE62:
xor ebx, ebx
jmp short loc_5FEC8
loc_5FE66:
mov ecx, [rax-18h]
add rsi, rcx
mov [r14+18h], rsi
movzx ecx, word ptr [rax-0Eh]
test cl, 8
jnz short loc_5FE88
test cl, 20h
jnz short loc_5FE97
movzx eax, word ptr [rax-0Ch]
mov [r14+4], eax
jmp short loc_5FEC8
loc_5FE88:
movzx eax, byte ptr [rax-6]
cmp rax, 1
jnz short loc_5FEBA
movzx ecx, byte ptr [rsi]
jmp short loc_5FEBD
loc_5FE97:
movzx edi, byte ptr [rax-6]
call _ma_calc_blob_length
mov [r14+4], eax
mov rax, [r14+8]
mov rcx, [r14+18h]
movzx eax, byte ptr [rax+1Ah]
mov rax, [rcx+rax]
mov [r14+18h], rax
jmp short loc_5FEC8
loc_5FEBA:
movzx ecx, word ptr [rsi]
loc_5FEBD:
mov [r14+4], ecx
add rsi, rax
mov [r14+18h], rsi
loc_5FEC8:
mov eax, ebx
pop rbx
pop r14
pop rbp
retn
|
long long ma_ft_segiterator(long long a1)
{
long long v1; // rax
unsigned int v2; // ebx
unsigned __int8 v3; // cl
long long v4; // rsi
unsigned __int8 *v5; // rsi
__int16 v6; // cx
long long v7; // rax
int v8; // ecx
if ( *(_DWORD *)a1 )
{
--*(_DWORD *)a1;
v1 = *(_QWORD *)(a1 + 8);
v2 = 1;
if ( v1 )
{
*(_QWORD *)(a1 + 8) = v1 - 32;
v3 = *(_BYTE *)(v1 - 7);
v4 = *(_QWORD *)(a1 + 16);
if ( v3 && (v3 & *(_BYTE *)(v4 + *(unsigned int *)(v1 - 20))) != 0 )
{
*(_QWORD *)(a1 + 24) = 0LL;
}
else
{
v5 = (unsigned __int8 *)(*(unsigned int *)(v1 - 24) + v4);
*(_QWORD *)(a1 + 24) = v5;
v6 = *(_WORD *)(v1 - 14);
if ( (v6 & 8) != 0 )
{
v7 = *(unsigned __int8 *)(v1 - 6);
if ( v7 == 1 )
v8 = *v5;
else
v8 = *(unsigned __int16 *)v5;
*(_DWORD *)(a1 + 4) = v8;
*(_QWORD *)(a1 + 24) = &v5[v7];
}
else if ( (v6 & 0x20) != 0 )
{
*(_DWORD *)(a1 + 4) = ma_calc_blob_length(*(unsigned __int8 *)(v1 - 6), v5);
*(_QWORD *)(a1 + 24) = *(_QWORD *)(*(_QWORD *)(a1 + 24) + *(unsigned __int8 *)(*(_QWORD *)(a1 + 8) + 26LL));
}
else
{
*(_DWORD *)(a1 + 4) = *(unsigned __int16 *)(v1 - 12);
}
}
}
}
else
{
return 0;
}
return v2;
}
|
_ma_ft_segiterator:
PUSH RBP
MOV RBP,RSP
PUSH R14
PUSH RBX
MOV EAX,dword ptr [RDI]
TEST EAX,EAX
JZ 0x0015fe62
MOV R14,RDI
DEC EAX
MOV dword ptr [RDI],EAX
MOV RAX,qword ptr [RDI + 0x8]
MOV EBX,0x1
TEST RAX,RAX
JZ 0x0015fec8
LEA RCX,[RAX + -0x20]
MOV qword ptr [R14 + 0x8],RCX
MOV CL,byte ptr [RAX + -0x7]
MOV RSI,qword ptr [R14 + 0x10]
TEST CL,CL
JZ 0x0015fe66
MOV EDX,dword ptr [RAX + -0x14]
TEST byte ptr [RSI + RDX*0x1],CL
JZ 0x0015fe66
MOV qword ptr [R14 + 0x18],0x0
JMP 0x0015fec8
LAB_0015fe62:
XOR EBX,EBX
JMP 0x0015fec8
LAB_0015fe66:
MOV ECX,dword ptr [RAX + -0x18]
ADD RSI,RCX
MOV qword ptr [R14 + 0x18],RSI
MOVZX ECX,word ptr [RAX + -0xe]
TEST CL,0x8
JNZ 0x0015fe88
TEST CL,0x20
JNZ 0x0015fe97
MOVZX EAX,word ptr [RAX + -0xc]
MOV dword ptr [R14 + 0x4],EAX
JMP 0x0015fec8
LAB_0015fe88:
MOVZX EAX,byte ptr [RAX + -0x6]
CMP RAX,0x1
JNZ 0x0015feba
MOVZX ECX,byte ptr [RSI]
JMP 0x0015febd
LAB_0015fe97:
MOVZX EDI,byte ptr [RAX + -0x6]
CALL 0x0014798b
MOV dword ptr [R14 + 0x4],EAX
MOV RAX,qword ptr [R14 + 0x8]
MOV RCX,qword ptr [R14 + 0x18]
MOVZX EAX,byte ptr [RAX + 0x1a]
MOV RAX,qword ptr [RCX + RAX*0x1]
MOV qword ptr [R14 + 0x18],RAX
JMP 0x0015fec8
LAB_0015feba:
MOVZX ECX,word ptr [RSI]
LAB_0015febd:
MOV dword ptr [R14 + 0x4],ECX
ADD RSI,RAX
MOV qword ptr [R14 + 0x18],RSI
LAB_0015fec8:
MOV EAX,EBX
POP RBX
POP R14
POP RBP
RET
|
int8 _ma_ft_segiterator(int *param_1)
{
byte bVar1;
long lVar2;
int iVar3;
uint uVar4;
int8 uVar5;
ushort *puVar6;
if (*param_1 == 0) {
uVar5 = 0;
}
else {
*param_1 = *param_1 + -1;
lVar2 = *(long *)(param_1 + 2);
uVar5 = 1;
if (lVar2 != 0) {
*(long *)(param_1 + 2) = lVar2 + -0x20;
if ((*(byte *)(lVar2 + -7) == 0) ||
((*(byte *)(*(long *)(param_1 + 4) + (ulong)*(uint *)(lVar2 + -0x14)) &
*(byte *)(lVar2 + -7)) == 0)) {
puVar6 = (ushort *)(*(long *)(param_1 + 4) + (ulong)*(uint *)(lVar2 + -0x18));
*(ushort **)(param_1 + 6) = puVar6;
if ((*(ushort *)(lVar2 + -0xe) & 8) == 0) {
if ((*(ushort *)(lVar2 + -0xe) & 0x20) == 0) {
param_1[1] = (uint)*(ushort *)(lVar2 + -0xc);
}
else {
iVar3 = _ma_calc_blob_length(*(int1 *)(lVar2 + -6));
param_1[1] = iVar3;
*(int8 *)(param_1 + 6) =
*(int8 *)
(*(long *)(param_1 + 6) + (ulong)*(byte *)(*(long *)(param_1 + 2) + 0x1a));
}
}
else {
bVar1 = *(byte *)(lVar2 + -6);
if ((ulong)bVar1 == 1) {
uVar4 = (uint)(byte)*puVar6;
}
else {
uVar4 = (uint)*puVar6;
}
param_1[1] = uVar4;
*(byte **)(param_1 + 6) = (byte *)((long)puVar6 + (ulong)bVar1);
}
}
else {
param_1[6] = 0;
param_1[7] = 0;
}
}
}
return uVar5;
}
|
|
61,819 |
core_tensor_logic_ref_count_clone_Test::~core_tensor_logic_ref_count_clone_Test()
|
magnetron/test/unittests/tensor/core_logic.cpp
|
TEST(core_tensor_logic, ref_count_clone) {
context ctx {compute_device::cpu};
tensor a {ctx, dtype::e8m23, 10};
ASSERT_EQ(a.refcount(), 1);
{
tensor b = a.clone();
ASSERT_EQ(a.refcount(), 2);
ASSERT_EQ(b.refcount(), 1);
{
tensor c = b.clone();
ASSERT_EQ(a.refcount(), 2);
ASSERT_EQ(b.refcount(), 2);
ASSERT_EQ(c.refcount(), 1);
}
ASSERT_EQ(a.refcount(), 2);
ASSERT_EQ(b.refcount(), 1);
}
ASSERT_EQ(a.refcount(), 1);
}
|
O0
|
cpp
|
core_tensor_logic_ref_count_clone_Test::~core_tensor_logic_ref_count_clone_Test():
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x10(%rbp)
callq 0x82690
movq -0x10(%rbp), %rdi
movl $0x10, %esi
callq 0x13700
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax)
|
_ZN38core_tensor_logic_ref_count_clone_TestD0Ev:
push rbp
mov rbp, rsp
sub rsp, 10h
mov [rbp+var_8], rdi
mov rdi, [rbp+var_8]; this
mov [rbp+var_10], rdi
call _ZN38core_tensor_logic_ref_count_clone_TestD2Ev; core_tensor_logic_ref_count_clone_Test::~core_tensor_logic_ref_count_clone_Test()
mov rdi, [rbp+var_10]; void *
mov esi, 10h; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
add rsp, 10h
pop rbp
retn
|
void core_tensor_logic_ref_count_clone_Test::~core_tensor_logic_ref_count_clone_Test(
core_tensor_logic_ref_count_clone_Test *this)
{
core_tensor_logic_ref_count_clone_Test::~core_tensor_logic_ref_count_clone_Test(this);
operator delete(this, 0x10uLL);
}
|
~core_tensor_logic_ref_count_clone_Test:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x10
MOV qword ptr [RBP + -0x8],RDI
MOV RDI,qword ptr [RBP + -0x8]
MOV qword ptr [RBP + -0x10],RDI
CALL 0x00182690
MOV RDI,qword ptr [RBP + -0x10]
MOV ESI,0x10
CALL 0x00113700
ADD RSP,0x10
POP RBP
RET
|
/* core_tensor_logic_ref_count_clone_Test::~core_tensor_logic_ref_count_clone_Test() */
void __thiscall
core_tensor_logic_ref_count_clone_Test::~core_tensor_logic_ref_count_clone_Test
(core_tensor_logic_ref_count_clone_Test *this)
{
~core_tensor_logic_ref_count_clone_Test(this);
operator_delete(this,0x10);
return;
}
|
|
61,820 |
trnman_can_read_from
|
eloqsql/storage/maria/trnman.c
|
int trnman_can_read_from(TRN *trn, TrID trid)
{
TRN **found;
my_bool can;
if (trid < trn->min_read_from)
return 1; /* Row is visible by all transactions in the system */
if (trid >= trn->trid)
{
/*
We have now two cases
trid > trn->trid, in which case the row is from a new transaction
and not visible, in which case we should return 0.
trid == trn->trid in which case the row is from the current transaction
and we should return 1
*/
return trid == trn->trid;
}
found= lf_hash_search(&trid_to_trn, trn->pins, &trid, sizeof(trid));
if (found == NULL)
return 0; /* not in the hash of transactions = cannot read */
if (found == MY_ERRPTR)
return -1;
can= (*found)->commit_trid < trn->trid;
lf_hash_search_unpin(trn->pins);
return can;
}
|
O0
|
c
|
trnman_can_read_from:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x18(%rbp), %rax
movq -0x10(%rbp), %rcx
cmpq 0x80(%rcx), %rax
jae 0x7570d
movl $0x1, -0x4(%rbp)
jmp 0x757be
movq -0x18(%rbp), %rax
movq -0x10(%rbp), %rcx
cmpq 0x78(%rcx), %rax
jb 0x75737
movq -0x18(%rbp), %rax
movq -0x10(%rbp), %rcx
cmpq 0x78(%rcx), %rax
sete %al
andb $0x1, %al
movzbl %al, %eax
movl %eax, -0x4(%rbp)
jmp 0x757be
movq -0x10(%rbp), %rax
movq (%rax), %rsi
leaq 0x40d9e3(%rip), %rdi # 0x483128
leaq -0x18(%rbp), %rdx
movl $0x8, %ecx
callq 0x1057d0
movq %rax, -0x20(%rbp)
cmpq $0x0, -0x20(%rbp)
jne 0x75767
movl $0x0, -0x4(%rbp)
jmp 0x757be
movl $0x1, %eax
cmpq %rax, -0x20(%rbp)
jne 0x7577b
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x757be
movq -0x20(%rbp), %rax
movq (%rax), %rax
movq 0x88(%rax), %rax
movq -0x10(%rbp), %rcx
cmpq 0x78(%rcx), %rax
setb %al
andb $0x1, %al
movzbl %al, %eax
movb %al, -0x21(%rbp)
jmp 0x7579e
jmp 0x757a0
movq -0x10(%rbp), %rax
movq (%rax), %rcx
movq $0x0, -0x30(%rbp)
movq -0x30(%rbp), %rax
xchgq %rax, 0x10(%rcx)
movsbl -0x21(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopw (%rax,%rax)
|
trnman_can_read_from:
push rbp
mov rbp, rsp
sub rsp, 30h
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov rax, [rbp+var_18]
mov rcx, [rbp+var_10]
cmp rax, [rcx+80h]
jnb short loc_7570D
mov [rbp+var_4], 1
jmp loc_757BE
loc_7570D:
mov rax, [rbp+var_18]
mov rcx, [rbp+var_10]
cmp rax, [rcx+78h]
jb short loc_75737
mov rax, [rbp+var_18]
mov rcx, [rbp+var_10]
cmp rax, [rcx+78h]
setz al
and al, 1
movzx eax, al
mov [rbp+var_4], eax
jmp loc_757BE
loc_75737:
mov rax, [rbp+var_10]
mov rsi, [rax]
lea rdi, trid_to_trn
lea rdx, [rbp+var_18]
mov ecx, 8
call lf_hash_search
mov [rbp+var_20], rax
cmp [rbp+var_20], 0
jnz short loc_75767
mov [rbp+var_4], 0
jmp short loc_757BE
loc_75767:
mov eax, 1
cmp [rbp+var_20], rax
jnz short loc_7577B
mov [rbp+var_4], 0FFFFFFFFh
jmp short loc_757BE
loc_7577B:
mov rax, [rbp+var_20]
mov rax, [rax]
mov rax, [rax+88h]
mov rcx, [rbp+var_10]
cmp rax, [rcx+78h]
setb al
and al, 1
movzx eax, al
mov [rbp+var_21], al
jmp short $+2
loc_7579E:
jmp short $+2
loc_757A0:
mov rax, [rbp+var_10]
mov rcx, [rax]
mov [rbp+var_30], 0
mov rax, [rbp+var_30]
xchg rax, [rcx+10h]
movsx eax, [rbp+var_21]
mov [rbp+var_4], eax
loc_757BE:
mov eax, [rbp+var_4]
add rsp, 30h
pop rbp
retn
|
long long trnman_can_read_from(_QWORD *a1, unsigned long long a2)
{
bool v3; // [rsp+Fh] [rbp-21h]
long long v4; // [rsp+10h] [rbp-20h]
unsigned long long v5; // [rsp+18h] [rbp-18h] BYREF
_QWORD *v6; // [rsp+20h] [rbp-10h]
v6 = a1;
v5 = a2;
if ( a2 >= a1[16] )
{
if ( v5 < v6[15] )
{
v4 = lf_hash_search(&trid_to_trn, *v6, &v5, 8LL);
if ( v4 )
{
if ( v4 == 1 )
{
return (unsigned int)-1;
}
else
{
v3 = *(_QWORD *)(*(_QWORD *)v4 + 136LL) < v6[15];
_InterlockedExchange64((volatile long long *)(*v6 + 16LL), 0LL);
return v3;
}
}
else
{
return 0;
}
}
else
{
return v5 == v6[15];
}
}
else
{
return 1;
}
}
|
trnman_can_read_from:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x30
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x18],RSI
MOV RAX,qword ptr [RBP + -0x18]
MOV RCX,qword ptr [RBP + -0x10]
CMP RAX,qword ptr [RCX + 0x80]
JNC 0x0017570d
MOV dword ptr [RBP + -0x4],0x1
JMP 0x001757be
LAB_0017570d:
MOV RAX,qword ptr [RBP + -0x18]
MOV RCX,qword ptr [RBP + -0x10]
CMP RAX,qword ptr [RCX + 0x78]
JC 0x00175737
MOV RAX,qword ptr [RBP + -0x18]
MOV RCX,qword ptr [RBP + -0x10]
CMP RAX,qword ptr [RCX + 0x78]
SETZ AL
AND AL,0x1
MOVZX EAX,AL
MOV dword ptr [RBP + -0x4],EAX
JMP 0x001757be
LAB_00175737:
MOV RAX,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RAX]
LEA RDI,[0x583128]
LEA RDX,[RBP + -0x18]
MOV ECX,0x8
CALL 0x002057d0
MOV qword ptr [RBP + -0x20],RAX
CMP qword ptr [RBP + -0x20],0x0
JNZ 0x00175767
MOV dword ptr [RBP + -0x4],0x0
JMP 0x001757be
LAB_00175767:
MOV EAX,0x1
CMP qword ptr [RBP + -0x20],RAX
JNZ 0x0017577b
MOV dword ptr [RBP + -0x4],0xffffffff
JMP 0x001757be
LAB_0017577b:
MOV RAX,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RAX]
MOV RAX,qword ptr [RAX + 0x88]
MOV RCX,qword ptr [RBP + -0x10]
CMP RAX,qword ptr [RCX + 0x78]
SETC AL
AND AL,0x1
MOVZX EAX,AL
MOV byte ptr [RBP + -0x21],AL
JMP 0x0017579e
LAB_0017579e:
JMP 0x001757a0
LAB_001757a0:
MOV RAX,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RAX]
MOV qword ptr [RBP + -0x30],0x0
MOV RAX,qword ptr [RBP + -0x30]
XCHG qword ptr [RCX + 0x10],RAX
MOVSX EAX,byte ptr [RBP + -0x21]
MOV dword ptr [RBP + -0x4],EAX
LAB_001757be:
MOV EAX,dword ptr [RBP + -0x4]
ADD RSP,0x30
POP RBP
RET
|
uint trnman_can_read_from(long *param_1,ulong param_2)
{
ulong uVar1;
ulong uVar2;
long *plVar3;
ulong local_20;
long *local_18;
uint local_c;
if (param_2 < (ulong)param_1[0x10]) {
local_c = 1;
}
else if (param_2 < (ulong)param_1[0xf]) {
local_20 = param_2;
local_18 = param_1;
plVar3 = (long *)lf_hash_search(trid_to_trn,*param_1,&local_20,8);
if (plVar3 == (long *)0x0) {
local_c = 0;
}
else if (plVar3 == (long *)0x1) {
local_c = 0xffffffff;
}
else {
uVar1 = *(ulong *)(*plVar3 + 0x88);
uVar2 = local_18[0xf];
LOCK();
*(int8 *)(*local_18 + 0x10) = 0;
UNLOCK();
local_c = (uint)(uVar1 < uVar2);
}
}
else {
local_c = (uint)(param_2 == param_1[0xf]);
}
return local_c;
}
|
|
61,821 |
mysql_stmt_fetch_column
|
eloqsql/libmariadb/libmariadb/mariadb_stmt.c
|
int STDCALL mysql_stmt_fetch_column(MYSQL_STMT *stmt, MYSQL_BIND *bind, unsigned int column, unsigned long offset)
{
if (stmt->state < MYSQL_STMT_USER_FETCHING || column >= stmt->field_count ||
stmt->state == MYSQL_STMT_FETCH_DONE) {
SET_CLIENT_STMT_ERROR(stmt, CR_NO_DATA, SQLSTATE_UNKNOWN, 0);
return(1);
}
if (!stmt->bind[column].u.row_ptr)
{
/* we set row_ptr only for columns which contain data, so this must be a NULL column */
if (bind[0].is_null)
*bind[0].is_null= 1;
}
else
{
unsigned char *save_ptr;
if (bind[0].length)
*bind[0].length= *stmt->bind[column].length;
else
bind[0].length= &stmt->bind[column].length_value;
if (bind[0].is_null)
*bind[0].is_null= 0;
else
bind[0].is_null= &bind[0].is_null_value;
if (!bind[0].error)
bind[0].error= &bind[0].error_value;
*bind[0].error= 0;
bind[0].offset= offset;
save_ptr= stmt->bind[column].u.row_ptr;
mysql_ps_fetch_functions[stmt->fields[column].type].func(&bind[0], &stmt->fields[column], &stmt->bind[column].u.row_ptr);
stmt->bind[column].u.row_ptr= save_ptr;
}
return(0);
}
|
O3
|
c
|
mysql_stmt_fetch_column:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl 0x50(%rdi), %eax
cmpl $0x5, %eax
jae 0x4f65c
movl $0x803, 0x108(%rbx) # imm = 0x803
leaq 0x30d(%rbx), %rdi
leaq 0x2fdf71(%rip), %rax # 0x34d580
movq (%rax), %rsi
movl $0x5, %edx
callq 0x37130
xorl %r14d, %r14d
movb %r14b, 0x312(%rbx)
leaq 0x10c(%rbx), %rdi
leaq 0x2fdf5c(%rip), %rax # 0x34d590
movq 0x198(%rax), %rsi
movl $0x200, %edx # imm = 0x200
callq 0x37130
movb %r14b, 0x30b(%rbx)
movl $0x1, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
cmpl $0x6, %eax
je 0x4f5f7
cmpl %edx, 0x60(%rbx)
jbe 0x4f5f7
movq 0x78(%rbx), %rax
movl %edx, %edi
imulq $0x70, %rdi, %r14
cmpq $0x0, 0x20(%rax,%r14)
je 0x4f68e
addq %r14, %rax
movq (%rsi), %rdx
testq %rdx, %rdx
je 0x4f69e
movq (%rax), %rax
movq (%rax), %rax
movq %rax, (%rdx)
jmp 0x4f6a5
movq 0x8(%rsi), %rcx
xorl %eax, %eax
testq %rcx, %rcx
je 0x4f651
movb $0x1, (%rcx)
jmp 0x4f651
addq $0x50, %rax
movq %rax, (%rsi)
movq 0x8(%rsi), %rax
testq %rax, %rax
je 0x4f6b3
movb $0x0, (%rax)
jmp 0x4f6bb
leaq 0x67(%rsi), %rax
movq %rax, 0x8(%rsi)
movq 0x18(%rsi), %rax
testq %rax, %rax
jne 0x4f6cc
leaq 0x64(%rsi), %rax
movq %rax, 0x18(%rsi)
movb $0x0, (%rax)
movq %rcx, 0x48(%rsi)
movq 0x58(%rbx), %rcx
movq 0x78(%rbx), %rax
leaq (%rax,%r14), %rdx
addq $0x20, %rdx
movq (%rdx), %r15
shlq $0x7, %rdi
leaq (%rcx,%rdi), %rax
movl 0x70(%rcx,%rdi), %ecx
leaq (%rcx,%rcx,2), %rcx
leaq 0x3763a3(%rip), %r8 # 0x3c5aa0
movq %rsi, %rdi
movq %rax, %rsi
callq *(%r8,%rcx,8)
movq 0x78(%rbx), %rax
movq %r15, 0x20(%rax,%r14)
xorl %eax, %eax
jmp 0x4f651
|
mysql_stmt_fetch_column:
push rbp
mov rbp, rsp
push r15
push r14
push rbx
push rax
mov rbx, rdi
mov eax, [rdi+50h]
cmp eax, 5
jnb short loc_4F65C
loc_4F5F7:
mov dword ptr [rbx+108h], 803h
lea rdi, [rbx+30Dh]
lea rax, SQLSTATE_UNKNOWN
mov rsi, [rax]
mov edx, 5
call _strncpy
xor r14d, r14d
mov [rbx+312h], r14b
lea rdi, [rbx+10Ch]
lea rax, client_errors
mov rsi, [rax+198h]
mov edx, 200h
call _strncpy
mov [rbx+30Bh], r14b
mov eax, 1
loc_4F651:
add rsp, 8
pop rbx
pop r14
pop r15
pop rbp
retn
loc_4F65C:
cmp eax, 6
jz short loc_4F5F7
cmp [rbx+60h], edx
jbe short loc_4F5F7
mov rax, [rbx+78h]
mov edi, edx
imul r14, rdi, 70h ; 'p'
cmp qword ptr [rax+r14+20h], 0
jz short loc_4F68E
add rax, r14
mov rdx, [rsi]
test rdx, rdx
jz short loc_4F69E
mov rax, [rax]
mov rax, [rax]
mov [rdx], rax
jmp short loc_4F6A5
loc_4F68E:
mov rcx, [rsi+8]
xor eax, eax
test rcx, rcx
jz short loc_4F651
mov byte ptr [rcx], 1
jmp short loc_4F651
loc_4F69E:
add rax, 50h ; 'P'
mov [rsi], rax
loc_4F6A5:
mov rax, [rsi+8]
test rax, rax
jz short loc_4F6B3
mov byte ptr [rax], 0
jmp short loc_4F6BB
loc_4F6B3:
lea rax, [rsi+67h]
mov [rsi+8], rax
loc_4F6BB:
mov rax, [rsi+18h]
test rax, rax
jnz short loc_4F6CC
lea rax, [rsi+64h]
mov [rsi+18h], rax
loc_4F6CC:
mov byte ptr [rax], 0
mov [rsi+48h], rcx
mov rcx, [rbx+58h]
mov rax, [rbx+78h]
lea rdx, [rax+r14]
add rdx, 20h ; ' '
mov r15, [rdx]
shl rdi, 7
lea rax, [rcx+rdi]
mov ecx, [rcx+rdi+70h]
lea rcx, [rcx+rcx*2]
lea r8, mysql_ps_fetch_functions
mov rdi, rsi
mov rsi, rax
call qword ptr [r8+rcx*8]
mov rax, [rbx+78h]
mov [rax+r14+20h], r15
xor eax, eax
jmp loc_4F651
|
long long mysql_stmt_fetch_column(long long a1, long long a2, unsigned int a3, long long a4)
{
unsigned int v4; // eax
long long result; // rax
long long v6; // rax
long long v7; // r14
_QWORD **v8; // rax
_BYTE *v9; // rcx
_BYTE *v10; // rax
_BYTE *v11; // rax
long long v12; // r15
v4 = *(_DWORD *)(a1 + 80);
if ( v4 < 5 || v4 == 6 || *(_DWORD *)(a1 + 96) <= a3 )
{
*(_DWORD *)(a1 + 264) = 2051;
strncpy(a1 + 781, SQLSTATE_UNKNOWN, 5LL);
*(_BYTE *)(a1 + 786) = 0;
strncpy(a1 + 268, client_errors[51], 512LL);
*(_BYTE *)(a1 + 779) = 0;
return 1LL;
}
else
{
v6 = *(_QWORD *)(a1 + 120);
v7 = 112LL * a3;
if ( *(_QWORD *)(v6 + v7 + 32) )
{
v8 = (_QWORD **)(v7 + v6);
if ( *(_QWORD *)a2 )
**(_QWORD **)a2 = **v8;
else
*(_QWORD *)a2 = v8 + 10;
v10 = *(_BYTE **)(a2 + 8);
if ( v10 )
*v10 = 0;
else
*(_QWORD *)(a2 + 8) = a2 + 103;
v11 = *(_BYTE **)(a2 + 24);
if ( !v11 )
{
v11 = (_BYTE *)(a2 + 100);
*(_QWORD *)(a2 + 24) = a2 + 100;
}
*v11 = 0;
*(_QWORD *)(a2 + 72) = a4;
v12 = *(_QWORD *)(*(_QWORD *)(a1 + 120) + v7 + 32);
(*(void ( **)(long long, unsigned long long))&mysql_ps_fetch_functions[6
* *(unsigned int *)(*(_QWORD *)(a1 + 88) + ((unsigned long long)a3 << 7) + 112)])(
a2,
*(_QWORD *)(a1 + 88) + ((unsigned long long)a3 << 7));
*(_QWORD *)(*(_QWORD *)(a1 + 120) + v7 + 32) = v12;
return 0LL;
}
else
{
v9 = *(_BYTE **)(a2 + 8);
result = 0LL;
if ( v9 )
*v9 = 1;
}
}
return result;
}
|
mysql_stmt_fetch_column:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH RBX
PUSH RAX
MOV RBX,RDI
MOV EAX,dword ptr [RDI + 0x50]
CMP EAX,0x5
JNC 0x0014f65c
LAB_0014f5f7:
MOV dword ptr [RBX + 0x108],0x803
LEA RDI,[RBX + 0x30d]
LEA RAX,[0x44d580]
MOV RSI,qword ptr [RAX]
MOV EDX,0x5
CALL 0x00137130
XOR R14D,R14D
MOV byte ptr [RBX + 0x312],R14B
LEA RDI,[RBX + 0x10c]
LEA RAX,[0x44d590]
MOV RSI,qword ptr [RAX + 0x198]
MOV EDX,0x200
CALL 0x00137130
MOV byte ptr [RBX + 0x30b],R14B
MOV EAX,0x1
LAB_0014f651:
ADD RSP,0x8
POP RBX
POP R14
POP R15
POP RBP
RET
LAB_0014f65c:
CMP EAX,0x6
JZ 0x0014f5f7
CMP dword ptr [RBX + 0x60],EDX
JBE 0x0014f5f7
MOV RAX,qword ptr [RBX + 0x78]
MOV EDI,EDX
IMUL R14,RDI,0x70
CMP qword ptr [RAX + R14*0x1 + 0x20],0x0
JZ 0x0014f68e
ADD RAX,R14
MOV RDX,qword ptr [RSI]
TEST RDX,RDX
JZ 0x0014f69e
MOV RAX,qword ptr [RAX]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RDX],RAX
JMP 0x0014f6a5
LAB_0014f68e:
MOV RCX,qword ptr [RSI + 0x8]
XOR EAX,EAX
TEST RCX,RCX
JZ 0x0014f651
MOV byte ptr [RCX],0x1
JMP 0x0014f651
LAB_0014f69e:
ADD RAX,0x50
MOV qword ptr [RSI],RAX
LAB_0014f6a5:
MOV RAX,qword ptr [RSI + 0x8]
TEST RAX,RAX
JZ 0x0014f6b3
MOV byte ptr [RAX],0x0
JMP 0x0014f6bb
LAB_0014f6b3:
LEA RAX,[RSI + 0x67]
MOV qword ptr [RSI + 0x8],RAX
LAB_0014f6bb:
MOV RAX,qword ptr [RSI + 0x18]
TEST RAX,RAX
JNZ 0x0014f6cc
LEA RAX,[RSI + 0x64]
MOV qword ptr [RSI + 0x18],RAX
LAB_0014f6cc:
MOV byte ptr [RAX],0x0
MOV qword ptr [RSI + 0x48],RCX
MOV RCX,qword ptr [RBX + 0x58]
MOV RAX,qword ptr [RBX + 0x78]
LEA RDX,[RAX + R14*0x1]
ADD RDX,0x20
MOV R15,qword ptr [RDX]
SHL RDI,0x7
LEA RAX,[RCX + RDI*0x1]
MOV ECX,dword ptr [RCX + RDI*0x1 + 0x70]
LEA RCX,[RCX + RCX*0x2]
LEA R8,[0x4c5aa0]
MOV RDI,RSI
MOV RSI,RAX
CALL qword ptr [R8 + RCX*0x8]
MOV RAX,qword ptr [RBX + 0x78]
MOV qword ptr [RAX + R14*0x1 + 0x20],R15
XOR EAX,EAX
JMP 0x0014f651
|
int8 mysql_stmt_fetch_column(long param_1,long *param_2,uint param_3,long param_4)
{
int8 uVar1;
int8 *puVar2;
int1 *puVar3;
long lVar4;
long lVar5;
if (((*(uint *)(param_1 + 0x50) < 5) || (*(uint *)(param_1 + 0x50) == 6)) ||
(*(uint *)(param_1 + 0x60) <= param_3)) {
*(int4 *)(param_1 + 0x108) = 0x803;
strncpy((char *)(param_1 + 0x30d),SQLSTATE_UNKNOWN,5);
*(int1 *)(param_1 + 0x312) = 0;
strncpy((char *)(param_1 + 0x10c),PTR_DAT_0044d728,0x200);
*(int1 *)(param_1 + 0x30b) = 0;
uVar1 = 1;
}
else {
lVar5 = (ulong)param_3 * 0x70;
if (*(long *)(*(long *)(param_1 + 0x78) + 0x20 + lVar5) == 0) {
uVar1 = 0;
if ((int1 *)param_2[1] != (int1 *)0x0) {
*(int1 *)param_2[1] = 1;
}
}
else {
puVar2 = (int8 *)(*(long *)(param_1 + 0x78) + lVar5);
if ((int8 *)*param_2 == (int8 *)0x0) {
*param_2 = (long)(puVar2 + 10);
}
else {
*(int8 *)*param_2 = *(int8 *)*puVar2;
}
if ((int1 *)param_2[1] == (int1 *)0x0) {
param_2[1] = (long)param_2 + 0x67;
}
else {
*(int1 *)param_2[1] = 0;
}
puVar3 = (int1 *)param_2[3];
if (puVar3 == (int1 *)0x0) {
puVar3 = (int1 *)((long)param_2 + 100);
param_2[3] = (long)puVar3;
}
*puVar3 = 0;
param_2[9] = param_4;
uVar1 = *(int8 *)(*(long *)(param_1 + 0x78) + lVar5 + 0x20);
lVar4 = (ulong)param_3 * 0x80;
(*(code *)(&mysql_ps_fetch_functions)
[(ulong)*(uint *)(*(long *)(param_1 + 0x58) + 0x70 + lVar4) * 3])
(param_2,*(long *)(param_1 + 0x58) + lVar4);
*(int8 *)(*(long *)(param_1 + 0x78) + 0x20 + lVar5) = uVar1;
uVar1 = 0;
}
}
return uVar1;
}
|
|
61,822 |
minja::LoopControlException::LoopControlException(minja::LoopControlType)
|
monkey531[P]llama/common/minja.hpp
|
LoopControlException(LoopControlType control_type)
: std::runtime_error((control_type == LoopControlType::Continue ? "continue" : "break") + std::string(" outside of a loop")),
control_type(control_type) {}
|
O1
|
cpp
|
minja::LoopControlException::LoopControlException(minja::LoopControlType):
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x48, %rsp
movl %esi, %ebx
movq %rdi, %r14
leaq 0x38(%rsp), %r12
movq %r12, -0x10(%r12)
leaq 0x49690(%rip), %rsi # 0xb391d
leaq 0x4969b(%rip), %rdx # 0xb392f
leaq 0x28(%rsp), %r15
movq %r15, %rdi
callq 0x2175a
xorl %eax, %eax
cmpl $0x1, %ebx
sete %al
leaq 0x46829(%rip), %rdx # 0xb0ad9
leaq 0x4681c(%rip), %rcx # 0xb0ad3
cmoveq %rdx, %rcx
leaq (%rax,%rax,2), %r8
addq $0x5, %r8
movq %r15, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x197a0
leaq 0x18(%rsp), %r15
movq %r15, -0x10(%r15)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x6a2f6
movq %rdx, 0x8(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x18(%rsp)
jmp 0x6a2fd
movups (%rcx), %xmm0
movups %xmm0, (%r15)
movq 0x8(%rax), %rdx
leaq 0x8(%rsp), %rsi
movq %rdx, 0x8(%rsi)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movq %r14, %rdi
callq 0x19880
movq 0x8(%rsp), %rdi
cmpq %r15, %rdi
je 0x6a338
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x196e0
movq 0x28(%rsp), %rdi
cmpq %r12, %rdi
je 0x6a34f
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x196e0
leaq 0x79cd2(%rip), %rax # 0xe4028
addq $0x10, %rax
movq %rax, (%r14)
movl %ebx, 0x10(%r14)
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq %rax, %rbx
movq 0x8(%rsp), %rdi
cmpq %r15, %rdi
je 0x6a38c
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x196e0
jmp 0x6a38c
movq %rax, %rbx
movq 0x28(%rsp), %rdi
cmpq %r12, %rdi
je 0x6a3a3
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x196e0
movq %rbx, %rdi
callq 0x19c10
nop
|
_ZN5minja20LoopControlExceptionC2ENS_15LoopControlTypeE:
push r15
push r14
push r12
push rbx
sub rsp, 48h
mov ebx, esi
mov r14, rdi
lea r12, [rsp+68h+var_30]
mov [r12-10h], r12
lea rsi, aOutsideOfALoop; " outside of a loop"
lea rdx, aOutsideOfALoop+12h; ""
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)
xor eax, eax
cmp ebx, 1
setz al
lea rdx, aContinue; "continue"
lea rcx, aBreak; "break"
cmovz rcx, rdx
lea r8, [rax+rax*2]
add r8, 5
mov rdi, r15
xor esi, esi
xor edx, edx
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7replaceEmmPKcm; std::string::replace(ulong,ulong,char const*,ulong)
lea r15, [rsp+68h+var_50]
mov [r15-10h], r15
mov rdx, [rax]
mov rcx, rax
add rcx, 10h
cmp rdx, rcx
jz short loc_6A2F6
mov [rsp+68h+var_60], rdx
mov rdx, [rcx]
mov [rsp+68h+var_50], rdx
jmp short loc_6A2FD
loc_6A2F6:
movups xmm0, xmmword ptr [rcx]
movups xmmword ptr [r15], xmm0
loc_6A2FD:
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, r14
call __ZNSt13runtime_errorC2ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; std::runtime_error::runtime_error(std::string const&)
mov rdi, [rsp+68h+var_60]; void *
cmp rdi, r15
jz short loc_6A338
mov rsi, [rsp+68h+var_50]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_6A338:
mov rdi, [rsp+68h+var_40]; void *
cmp rdi, r12
jz short loc_6A34F
mov rsi, [rsp+68h+var_30]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_6A34F:
lea rax, _ZTVN5minja20LoopControlExceptionE; `vtable for'minja::LoopControlException
add rax, 10h
mov [r14], rax
mov [r14+10h], ebx
add rsp, 48h
pop rbx
pop r12
pop r14
pop r15
retn
mov rbx, rax
mov rdi, [rsp+arg_0]; void *
cmp rdi, r15
jz short loc_6A38C
mov rsi, [rsp+arg_10]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_6A38C
mov rbx, rax
loc_6A38C:
mov rdi, [rsp+arg_20]; void *
cmp rdi, r12
jz short loc_6A3A3
mov rsi, [rsp+arg_30]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_6A3A3:
mov rdi, rbx
call __Unwind_Resume
|
long long * minja::LoopControlException::LoopControlException(long long a1, int a2)
{
const char *v2; // rcx
long long v3; // rax
__int128 *v4; // rcx
long long *result; // rax
void *v6[2]; // [rsp+8h] [rbp-60h] BYREF
__int128 v7; // [rsp+18h] [rbp-50h] BYREF
void *v8[2]; // [rsp+28h] [rbp-40h] BYREF
_QWORD v9[6]; // [rsp+38h] [rbp-30h] BYREF
v8[0] = v9;
std::string::_M_construct<char const*>(v8, " outside of a loop", (long long)"");
v2 = "break";
if ( a2 == 1 )
v2 = "continue";
v3 = std::string::replace(v8, 0LL, 0LL, v2, 3LL * (a2 == 1) + 5);
v6[0] = &v7;
v4 = (__int128 *)(v3 + 16);
if ( *(_QWORD *)v3 == v3 + 16 )
{
v7 = *v4;
}
else
{
v6[0] = *(void **)v3;
*(_QWORD *)&v7 = *(_QWORD *)v4;
}
v6[1] = *(void **)(v3 + 8);
*(_QWORD *)v3 = v4;
*(_QWORD *)(v3 + 8) = 0LL;
*(_BYTE *)(v3 + 16) = 0;
std::runtime_error::runtime_error(a1, v6);
if ( v6[0] != &v7 )
operator delete(v6[0], v7 + 1);
if ( v8[0] != v9 )
operator delete(v8[0], v9[0] + 1LL);
result = &`vtable for'minja::LoopControlException + 2;
*(_QWORD *)a1 = &`vtable for'minja::LoopControlException + 2;
*(_DWORD *)(a1 + 16) = a2;
return result;
}
|
LoopControlException:
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
SUB RSP,0x48
MOV EBX,ESI
MOV R14,RDI
LEA R12,[RSP + 0x38]
MOV qword ptr [R12 + -0x10],R12
LEA RSI,[0x1b391d]
LEA RDX,[0x1b392f]
LEA R15,[RSP + 0x28]
MOV RDI,R15
CALL 0x0012175a
XOR EAX,EAX
CMP EBX,0x1
SETZ AL
LEA RDX,[0x1b0ad9]
LEA RCX,[0x1b0ad3]
CMOVZ RCX,RDX
LEA R8,[RAX + RAX*0x2]
ADD R8,0x5
LAB_0016a2c3:
MOV RDI,R15
XOR ESI,ESI
XOR EDX,EDX
CALL 0x001197a0
LEA R15,[RSP + 0x18]
MOV qword ptr [R15 + -0x10],R15
MOV RDX,qword ptr [RAX]
MOV RCX,RAX
ADD RCX,0x10
CMP RDX,RCX
JZ 0x0016a2f6
MOV qword ptr [RSP + 0x8],RDX
MOV RDX,qword ptr [RCX]
MOV qword ptr [RSP + 0x18],RDX
JMP 0x0016a2fd
LAB_0016a2f6:
MOVUPS XMM0,xmmword ptr [RCX]
MOVUPS xmmword ptr [R15],XMM0
LAB_0016a2fd:
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
LAB_0016a319:
MOV RDI,R14
CALL 0x00119880
LAB_0016a321:
MOV RDI,qword ptr [RSP + 0x8]
CMP RDI,R15
JZ 0x0016a338
MOV RSI,qword ptr [RSP + 0x18]
INC RSI
CALL 0x001196e0
LAB_0016a338:
MOV RDI,qword ptr [RSP + 0x28]
CMP RDI,R12
JZ 0x0016a34f
MOV RSI,qword ptr [RSP + 0x38]
INC RSI
CALL 0x001196e0
LAB_0016a34f:
LEA RAX,[0x1e4028]
ADD RAX,0x10
MOV qword ptr [R14],RAX
MOV dword ptr [R14 + 0x10],EBX
ADD RSP,0x48
POP RBX
POP R12
POP R14
POP R15
RET
|
/* minja::LoopControlException::LoopControlException(minja::LoopControlType) */
void __thiscall
minja::LoopControlException::LoopControlException(LoopControlException *this,int param_2)
{
long *plVar1;
char *pcVar2;
long *plVar3;
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*>(local_40," outside of a loop","");
pcVar2 = "break";
if (param_2 == 1) {
pcVar2 = "continue";
}
/* try { // try from 0016a2c3 to 0016a2ce has its CatchHandler @ 0016a389 */
plVar1 = (long *)std::__cxx11::string::replace((ulong)local_40,0,(char *)0x0,(ulong)pcVar2);
plVar3 = plVar1 + 2;
if ((long *)*plVar1 == plVar3) {
local_50 = *plVar3;
lStack_48 = plVar1[3];
local_60 = &local_50;
}
else {
local_50 = *plVar3;
local_60 = (long *)*plVar1;
}
local_58 = plVar1[1];
*plVar1 = (long)plVar3;
plVar1[1] = 0;
*(int1 *)(plVar1 + 2) = 0;
/* try { // try from 0016a319 to 0016a320 has its CatchHandler @ 0016a36d */
std::runtime_error::runtime_error((runtime_error *)this,(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);
}
*(int ***)this = &PTR__runtime_error_001e4038;
*(int *)(this + 0x10) = param_2;
return;
}
|
|
61,823 |
nglog::FlushLogFilesUnsafe(nglog::LogSeverity)
|
ng-log[P]ng-log/src/logging.cc
|
inline void LogDestination::FlushLogFilesUnsafe(int min_severity) {
// assume we have the log_mutex or we simply don't care
// about it
std::for_each(std::next(std::begin(log_destinations_), min_severity),
std::end(log_destinations_),
[now = std::chrono::system_clock::now()](
std::unique_ptr<LogDestination>& log) {
if (log != nullptr) {
// Flush the base fileobject_ logger directly instead of
// going through any wrappers to reduce chance of deadlock.
log->fileobject_.FlushUnlocked(now);
}
});
}
|
O3
|
cpp
|
nglog::FlushLogFilesUnsafe(nglog::LogSeverity):
pushq %rbx
movslq %edi, %rax
leaq 0x24a10(%rip), %rcx # 0x2fba0
leaq (%rcx,%rax,8), %rbx
callq 0x7070
leaq 0x24a20(%rip), %rsi # 0x2fbc0
movq %rbx, %rdi
movq %rax, %rdx
popq %rbx
jmp 0x117fe
|
_ZN5nglog19FlushLogFilesUnsafeENS_11LogSeverityE:
push rbx
movsxd rax, edi
lea rcx, _ZN5nglog14LogDestination17log_destinations_E; nglog::LogDestination::log_destinations_
lea rbx, [rcx+rax*8]
call __ZNSt6chrono3_V212system_clock3nowEv; std::chrono::_V2::system_clock::now(void)
lea rsi, _ZN5nglog12_GLOBAL__N_125g_application_fingerprintB5cxx11E; nglog::`anonymous namespace'::g_application_fingerprint
mov rdi, rbx
mov rdx, rax
pop rbx
jmp _ZSt8for_eachIPSt10unique_ptrIN5nglog14LogDestinationESt14default_deleteIS2_EEZNS2_19FlushLogFilesUnsafeEiEUlRS5_E_ET0_T_SA_S9_; std::for_each<std::unique_ptr<nglog::LogDestination> *,nglog::LogDestination::FlushLogFilesUnsafe(int)::{lambda(std::unique_ptr<nglog::LogDestination>&)#1}>(std::unique_ptr<nglog::LogDestination> *,std::unique_ptr<nglog::LogDestination> *,nglog::LogDestination::FlushLogFilesUnsafe(int)::{lambda(std::unique_ptr<nglog::LogDestination>&)#1})
|
long long nglog::FlushLogFilesUnsafe(std::chrono::_V2::system_clock *a1)
{
long long v1; // rax
v1 = std::chrono::_V2::system_clock::now(a1);
return std::for_each<std::unique_ptr<nglog::LogDestination> *,nglog::LogDestination::FlushLogFilesUnsafe(int)::{lambda(std::unique_ptr<nglog::LogDestination>&)#1}>(
&nglog::LogDestination::log_destinations_[(int)a1],
&nglog::`anonymous namespace'::g_application_fingerprint[abi:cxx11],
v1);
}
|
FlushLogFilesUnsafe:
PUSH RBX
MOVSXD RAX,EDI
LEA RCX,[0x12fba0]
LEA RBX,[RCX + RAX*0x8]
CALL 0x00107070
LEA RSI,[0x12fbc0]
MOV RDI,RBX
MOV RDX,RAX
POP RBX
JMP 0x001117fe
|
/* nglog::FlushLogFilesUnsafe(nglog::LogSeverity) */
void nglog::FlushLogFilesUnsafe(int param_1)
{
int8 uVar1;
uVar1 = std::chrono::_V2::system_clock::now();
std::
for_each<std::unique_ptr<nglog::LogDestination,std::default_delete<nglog::LogDestination>>*,nglog::LogDestination::FlushLogFilesUnsafe(int)::_lambda(std::unique_ptr<nglog::LogDestination,std::default_delete<nglog::LogDestination>>&)_1_>
(&LogDestination::log_destinations_ + param_1,
&(anonymous_namespace)::g_application_fingerprint_abi_cxx11_,uVar1);
return;
}
|
|
61,824 |
httplib::detail::BufferStream::~BufferStream()
|
nickolajgrishuk[P]metricz-cpp/build_O3/_deps/httplib-src/httplib.h
|
~BufferStream() override = default;
|
O3
|
c
|
httplib::detail::BufferStream::~BufferStream():
pushq %rbx
movq %rdi, %rbx
leaq 0x34a0b(%rip), %rax # 0x3f390
movq %rax, (%rdi)
movq 0x8(%rdi), %rdi
leaq 0x18(%rbx), %rax
cmpq %rax, %rdi
je 0xa99a
callq 0x8520
movq %rbx, %rdi
popq %rbx
jmp 0x8520
nop
|
_ZN7httplib6detail12BufferStreamD0Ev:
push rbx
mov rbx, rdi
lea rax, off_3F390
mov [rdi], rax
mov rdi, [rdi+8]; void *
lea rax, [rbx+18h]
cmp rdi, rax
jz short loc_A99A
call __ZdlPv; operator delete(void *)
loc_A99A:
mov rdi, rbx; void *
pop rbx
jmp __ZdlPv; operator delete(void *)
|
void httplib::detail::BufferStream::~BufferStream(httplib::detail::BufferStream *this)
{
char *v2; // rdi
*(_QWORD *)this = off_3F390;
v2 = (char *)*((_QWORD *)this + 1);
if ( v2 != (char *)this + 24 )
operator delete(v2);
operator delete(this);
}
|
~BufferStream:
PUSH RBX
MOV RBX,RDI
LEA RAX,[0x13f390]
MOV qword ptr [RDI],RAX
MOV RDI,qword ptr [RDI + 0x8]
LEA RAX,[RBX + 0x18]
CMP RDI,RAX
JZ 0x0010a99a
CALL 0x00108520
LAB_0010a99a:
MOV RDI,RBX
POP RBX
JMP 0x00108520
|
/* httplib::detail::BufferStream::~BufferStream() */
void __thiscall httplib::detail::BufferStream::~BufferStream(BufferStream *this)
{
*(int ***)this = &PTR__BufferStream_0013f390;
if (*(BufferStream **)(this + 8) != this + 0x18) {
operator_delete(*(BufferStream **)(this + 8));
}
operator_delete(this);
return;
}
|
|
61,825 |
Catch::Optional<Catch::AssertionResult>::operator=(Catch::AssertionResult const&)
|
AlayaLite/build_O3/_deps/libcoro-src/test/catch_amalgamated.hpp
|
Optional& operator = ( T const& _value ) {
reset();
nullableValue = new( storage ) T( _value );
return *this;
}
|
O3
|
cpp
|
Catch::Optional<Catch::AssertionResult>::operator=(Catch::AssertionResult const&):
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
callq 0x87248
movq 0x30(%r14), %rax
movq %rax, 0x38(%rbx)
movups (%r14), %xmm0
movups 0x10(%r14), %xmm1
movups 0x20(%r14), %xmm2
movups %xmm2, 0x28(%rbx)
movups %xmm1, 0x18(%rbx)
movups %xmm0, 0x8(%rbx)
leaq 0x40(%rbx), %r15
leaq 0x50(%rbx), %r12
movq %r12, 0x40(%rbx)
movq 0x38(%r14), %rsi
movq 0x40(%r14), %rdx
addq %rsi, %rdx
movq %r15, %rdi
callq 0x251d8
leaq 0x60(%rbx), %rdi
leaq 0x70(%rbx), %rax
movq %rax, 0x60(%rbx)
movq 0x58(%r14), %rsi
movq 0x60(%r14), %rdx
addq %rsi, %rdx
callq 0x251d8
leaq 0x8(%rbx), %rax
movl 0x88(%r14), %ecx
movl %ecx, 0x90(%rbx)
movups 0x78(%r14), %xmm0
movups %xmm0, 0x80(%rbx)
movq %rax, (%rbx)
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq %rax, %rbx
movq (%r15), %rdi
cmpq %r12, %rdi
je 0x78808
movq (%r12), %rsi
incq %rsi
callq 0x17150
movq %rbx, %rdi
callq 0x17740
|
_ZN5Catch8OptionalINS_15AssertionResultEEaSERKS1_:
push r15
push r14
push r12
push rbx
push rax
mov r14, rsi
mov rbx, rdi
call _ZN5Catch8OptionalINS_15AssertionResultEE5resetEv; Catch::Optional<Catch::AssertionResult>::reset(void)
mov rax, [r14+30h]
mov [rbx+38h], rax
movups xmm0, xmmword ptr [r14]
movups xmm1, xmmword ptr [r14+10h]
movups xmm2, xmmword ptr [r14+20h]
movups xmmword ptr [rbx+28h], xmm2
movups xmmword ptr [rbx+18h], xmm1
movups xmmword ptr [rbx+8], xmm0
lea r15, [rbx+40h]
lea r12, [rbx+50h]
mov [rbx+40h], r12
mov rsi, [r14+38h]
mov rdx, [r14+40h]
add rdx, rsi
mov rdi, r15
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPcEEvT_S7_St20forward_iterator_tag; std::string::_M_construct<char *>(char *,char *,std::forward_iterator_tag)
lea rdi, [rbx+60h]
lea rax, [rbx+70h]
mov [rbx+60h], rax
mov rsi, [r14+58h]
mov rdx, [r14+60h]
add rdx, rsi
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPcEEvT_S7_St20forward_iterator_tag; std::string::_M_construct<char *>(char *,char *,std::forward_iterator_tag)
lea rax, [rbx+8]
mov ecx, [r14+88h]
mov [rbx+90h], ecx
movups xmm0, xmmword ptr [r14+78h]
movups xmmword ptr [rbx+80h], xmm0
mov [rbx], rax
mov rax, rbx
add rsp, 8
pop rbx
pop r12
pop r14
pop r15
retn
mov rbx, rax
mov rdi, [r15]; void *
cmp rdi, r12
jz short loc_78808
mov rsi, [r12]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_78808:
mov rdi, rbx
call __Unwind_Resume
|
long long Catch::Optional<Catch::AssertionResult>::operator=(long long a1, __int128 *a2)
{
__int128 v2; // xmm0
__int128 v3; // xmm1
Catch::Optional<Catch::AssertionResult>::reset(a1);
*(_QWORD *)(a1 + 56) = *((_QWORD *)a2 + 6);
v2 = *a2;
v3 = a2[1];
*(_OWORD *)(a1 + 40) = a2[2];
*(_OWORD *)(a1 + 24) = v3;
*(_OWORD *)(a1 + 8) = v2;
*(_QWORD *)(a1 + 64) = a1 + 80;
std::string::_M_construct<char *>((_QWORD *)(a1 + 64), *((_BYTE **)a2 + 7), *((_QWORD *)a2 + 7) + *((_QWORD *)a2 + 8));
*(_QWORD *)(a1 + 96) = a1 + 112;
std::string::_M_construct<char *>(
(_QWORD *)(a1 + 96),
*((_BYTE **)a2 + 11),
*((_QWORD *)a2 + 11) + *((_QWORD *)a2 + 12));
*(_DWORD *)(a1 + 144) = *((_DWORD *)a2 + 34);
*(_OWORD *)(a1 + 128) = *(__int128 *)((char *)a2 + 120);
*(_QWORD *)a1 = a1 + 8;
return a1;
}
|
operator=:
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
PUSH RAX
MOV R14,RSI
MOV RBX,RDI
CALL 0x00187248
MOV RAX,qword ptr [R14 + 0x30]
MOV qword ptr [RBX + 0x38],RAX
MOVUPS XMM0,xmmword ptr [R14]
MOVUPS XMM1,xmmword ptr [R14 + 0x10]
MOVUPS XMM2,xmmword ptr [R14 + 0x20]
MOVUPS xmmword ptr [RBX + 0x28],XMM2
MOVUPS xmmword ptr [RBX + 0x18],XMM1
MOVUPS xmmword ptr [RBX + 0x8],XMM0
LEA R15,[RBX + 0x40]
LEA R12,[RBX + 0x50]
MOV qword ptr [RBX + 0x40],R12
MOV RSI,qword ptr [R14 + 0x38]
MOV RDX,qword ptr [R14 + 0x40]
ADD RDX,RSI
MOV RDI,R15
CALL 0x001251d8
LEA RDI,[RBX + 0x60]
LEA RAX,[RBX + 0x70]
MOV qword ptr [RBX + 0x60],RAX
MOV RSI,qword ptr [R14 + 0x58]
MOV RDX,qword ptr [R14 + 0x60]
ADD RDX,RSI
LAB_001787bd:
CALL 0x001251d8
LAB_001787c2:
LEA RAX,[RBX + 0x8]
MOV ECX,dword ptr [R14 + 0x88]
MOV dword ptr [RBX + 0x90],ECX
MOVUPS XMM0,xmmword ptr [R14 + 0x78]
MOVUPS xmmword ptr [RBX + 0x80],XMM0
MOV qword ptr [RBX],RAX
MOV RAX,RBX
ADD RSP,0x8
POP RBX
POP R12
POP R14
POP R15
RET
|
/* Catch::Optional<Catch::AssertionResult>::TEMPNAMEPLACEHOLDERVALUE(Catch::AssertionResult const&)
*/
Optional<Catch::AssertionResult> * __thiscall
Catch::Optional<Catch::AssertionResult>::operator=
(Optional<Catch::AssertionResult> *this,AssertionResult *param_1)
{
int4 uVar1;
int4 uVar2;
int4 uVar3;
int4 uVar4;
int4 uVar5;
int4 uVar6;
int4 uVar7;
int4 uVar8;
int4 uVar9;
int4 uVar10;
int4 uVar11;
int8 uVar12;
reset(this);
*(int8 *)(this + 0x38) = *(int8 *)(param_1 + 0x30);
uVar1 = *(int4 *)param_1;
uVar2 = *(int4 *)(param_1 + 4);
uVar3 = *(int4 *)(param_1 + 8);
uVar4 = *(int4 *)(param_1 + 0xc);
uVar5 = *(int4 *)(param_1 + 0x10);
uVar6 = *(int4 *)(param_1 + 0x14);
uVar7 = *(int4 *)(param_1 + 0x18);
uVar8 = *(int4 *)(param_1 + 0x1c);
uVar9 = *(int4 *)(param_1 + 0x24);
uVar10 = *(int4 *)(param_1 + 0x28);
uVar11 = *(int4 *)(param_1 + 0x2c);
*(int4 *)(this + 0x28) = *(int4 *)(param_1 + 0x20);
*(int4 *)(this + 0x2c) = uVar9;
*(int4 *)(this + 0x30) = uVar10;
*(int4 *)(this + 0x34) = uVar11;
*(int4 *)(this + 0x18) = uVar5;
*(int4 *)(this + 0x1c) = uVar6;
*(int4 *)(this + 0x20) = uVar7;
*(int4 *)(this + 0x24) = uVar8;
*(int4 *)(this + 8) = uVar1;
*(int4 *)(this + 0xc) = uVar2;
*(int4 *)(this + 0x10) = uVar3;
*(int4 *)(this + 0x14) = uVar4;
*(Optional<Catch::AssertionResult> **)(this + 0x40) = this + 0x50;
std::__cxx11::string::_M_construct<char*>
(this + 0x40,*(long *)(param_1 + 0x38),
*(long *)(param_1 + 0x40) + *(long *)(param_1 + 0x38));
*(Optional<Catch::AssertionResult> **)(this + 0x60) = this + 0x70;
/* try { // try from 001787bd to 001787c1 has its CatchHandler @ 001787f1 */
std::__cxx11::string::_M_construct<char*>
(this + 0x60,*(long *)(param_1 + 0x58),
*(long *)(param_1 + 0x60) + *(long *)(param_1 + 0x58));
*(int4 *)(this + 0x90) = *(int4 *)(param_1 + 0x88);
uVar12 = *(int8 *)(param_1 + 0x80);
*(int8 *)(this + 0x80) = *(int8 *)(param_1 + 0x78);
*(int8 *)(this + 0x88) = uVar12;
*(Optional<Catch::AssertionResult> **)this = this + 8;
return this;
}
|
|
61,826 |
ModbusSerialPortPrivate::create(bool)
|
serhmarch[P]ModbusBridge/modbus/src/unix/ModbusSerialPort_unix.cpp
|
ModbusSerialPortPrivate *ModbusSerialPortPrivate::create(bool blocking)
{
return new ModbusSerialPortPrivateUnix(blocking);
}
|
O3
|
cpp
|
ModbusSerialPortPrivate::create(bool):
pushq %rbp
pushq %r14
pushq %rbx
movl %edi, %ebp
movl $0xb0, %edi
callq 0x5300
movq %rax, %rbx
movq %rax, %rdi
movl %ebp, %esi
callq 0x1664c
leaq 0xcb2a(%rip), %rax # 0x21cd8
movq %rax, (%rbx)
movl $0xffffffff, %eax # imm = 0xFFFFFFFF
movq %rax, 0x84(%rbx)
leaq -0x1bb8(%rip), %rax # 0x1360c
leaq -0x11b7(%rip), %rcx # 0x14014
testb %bpl, %bpl
cmovneq %rax, %rcx
leaq -0x16c5(%rip), %rax # 0x13b14
leaq -0xc68(%rip), %rdx # 0x14578
cmovneq %rax, %rdx
movq %rcx, 0x90(%rbx)
xorl %eax, %eax
movq %rax, 0x98(%rbx)
movq %rdx, 0xa0(%rbx)
movq %rax, 0xa8(%rbx)
movq %rbx, %rax
popq %rbx
popq %r14
popq %rbp
retq
movq %rax, %r14
movl $0xb0, %esi
movq %rbx, %rdi
callq 0x5310
movq %r14, %rdi
callq 0x5550
|
_ZN23ModbusSerialPortPrivate6createEb:
push rbp
push r14
push rbx
mov ebp, edi
mov edi, 0B0h; unsigned __int64
call __Znwm; operator new(ulong)
mov rbx, rax
mov rdi, rax; this
mov esi, ebp; bool
call _ZN23ModbusSerialPortPrivateC2Eb; ModbusSerialPortPrivate::ModbusSerialPortPrivate(bool)
lea rax, off_21CD8
mov [rbx], rax
mov eax, 0FFFFFFFFh
mov [rbx+84h], rax
lea rax, _ZN27ModbusSerialPortPrivateUnix13blockingWriteEv; ModbusSerialPortPrivateUnix::blockingWrite(void)
lea rcx, _ZN27ModbusSerialPortPrivateUnix16nonBlockingWriteEv; ModbusSerialPortPrivateUnix::nonBlockingWrite(void)
test bpl, bpl
cmovnz rcx, rax
lea rax, _ZN27ModbusSerialPortPrivateUnix12blockingReadEv; ModbusSerialPortPrivateUnix::blockingRead(void)
lea rdx, _ZN27ModbusSerialPortPrivateUnix15nonBlockingReadEv; ModbusSerialPortPrivateUnix::nonBlockingRead(void)
cmovnz rdx, rax
mov [rbx+90h], rcx
xor eax, eax
mov [rbx+98h], rax
mov [rbx+0A0h], rdx
mov [rbx+0A8h], rax
mov rax, rbx
pop rbx
pop r14
pop rbp
retn
mov r14, rax
mov esi, 0B0h; unsigned __int64
mov rdi, rbx; void *
call __ZdlPvm; operator delete(void *,ulong)
mov rdi, r14
call __Unwind_Resume
|
_QWORD * ModbusSerialPortPrivate::create(ModbusSerialPortPrivate *this)
{
_QWORD *v1; // rbx
long long ( *v2)(ModbusSerialPortPrivateUnix *); // rcx
long long ( *v3)(ModbusSerialPortPrivateUnix *); // rdx
v1 = (_QWORD *)operator new(0xB0uLL);
ModbusSerialPortPrivate::ModbusSerialPortPrivate((ModbusSerialPortPrivate *)v1, (bool)this);
*v1 = off_21CD8;
*(_QWORD *)((char *)v1 + 132) = 0xFFFFFFFFLL;
v2 = ModbusSerialPortPrivateUnix::nonBlockingWrite;
if ( (_BYTE)this )
v2 = ModbusSerialPortPrivateUnix::blockingWrite;
v3 = ModbusSerialPortPrivateUnix::nonBlockingRead;
if ( (_BYTE)this )
v3 = ModbusSerialPortPrivateUnix::blockingRead;
v1[18] = v2;
v1[19] = 0LL;
v1[20] = v3;
v1[21] = 0LL;
return v1;
}
|
create:
PUSH RBP
PUSH R14
PUSH RBX
MOV EBP,EDI
MOV EDI,0xb0
CALL 0x00105300
MOV RBX,RAX
LAB_0011519d:
MOV RDI,RAX
MOV ESI,EBP
CALL 0x0011664c
LAB_001151a7:
LEA RAX,[0x121cd8]
MOV qword ptr [RBX],RAX
MOV EAX,0xffffffff
MOV qword ptr [RBX + 0x84],RAX
LEA RAX,[0x11360c]
LEA RCX,[0x114014]
TEST BPL,BPL
CMOVNZ RCX,RAX
LEA RAX,[0x113b14]
LEA RDX,[0x114578]
CMOVNZ RDX,RAX
MOV qword ptr [RBX + 0x90],RCX
XOR EAX,EAX
MOV qword ptr [RBX + 0x98],RAX
MOV qword ptr [RBX + 0xa0],RDX
MOV qword ptr [RBX + 0xa8],RAX
MOV RAX,RBX
POP RBX
POP R14
POP RBP
RET
|
/* ModbusSerialPortPrivate::create(bool) */
ModbusSerialPortPrivate * ModbusSerialPortPrivate::create(bool param_1)
{
ModbusSerialPortPrivate *this;
code *pcVar1;
code *pcVar2;
this = (ModbusSerialPortPrivate *)operator_new(0xb0);
/* try { // try from 0011519d to 001151a6 has its CatchHandler @ 0011520a */
ModbusSerialPortPrivate(this,param_1);
*(int ***)this = &PTR__ModbusSerialPortPrivate_00121cd8;
*(int8 *)(this + 0x84) = 0xffffffff;
pcVar1 = ModbusSerialPortPrivateUnix::nonBlockingWrite;
if (param_1) {
pcVar1 = ModbusSerialPortPrivateUnix::blockingWrite;
}
pcVar2 = ModbusSerialPortPrivateUnix::nonBlockingRead;
if (param_1) {
pcVar2 = ModbusSerialPortPrivateUnix::blockingRead;
}
*(code **)(this + 0x90) = pcVar1;
*(int8 *)(this + 0x98) = 0;
*(code **)(this + 0xa0) = pcVar2;
*(int8 *)(this + 0xa8) = 0;
return this;
}
|
|
61,827 |
ImPlot3D::PushStyleVar(int, float)
|
zkingston[P]unknot/build_O0/_deps/implot3d-src/implot3d.cpp
|
void PushStyleVar(ImPlot3DStyleVar idx, float val) {
ImPlot3DContext& gp = *GImPlot3D;
const ImPlot3DStyleVarInfo* var_info = GetPlotStyleVarInfo(idx);
if (var_info->Type == ImGuiDataType_Float && var_info->Count == 1) {
float* pvar = (float*)var_info->GetVarPtr(&gp.Style);
gp.StyleModifiers.push_back(ImGuiStyleMod((ImGuiStyleVar)idx, *pvar));
*pvar = val;
return;
}
IM_ASSERT(0 && "Called PushStyleVar() float variant but variable is not a float!");
}
|
O0
|
cpp
|
ImPlot3D::PushStyleVar(int, float):
subq $0x38, %rsp
movl %edi, 0x34(%rsp)
movss %xmm0, 0x30(%rsp)
movq 0x5b9343(%rip), %rax # 0x68f638
movq %rax, 0x28(%rsp)
movl 0x34(%rsp), %edi
callq 0xd6380
movq %rax, 0x20(%rsp)
movq 0x20(%rsp), %rax
cmpl $0x8, (%rax)
jne 0xd637b
movq 0x20(%rsp), %rax
cmpl $0x1, 0x4(%rax)
jne 0xd637b
movq 0x20(%rsp), %rdi
movq 0x28(%rsp), %rsi
addq $0x94, %rsi
callq 0xd9b60
movq %rax, 0x18(%rsp)
movq 0x28(%rsp), %rax
addq $0x1e8, %rax # imm = 0x1E8
movq %rax, (%rsp)
movl 0x34(%rsp), %esi
movq 0x18(%rsp), %rax
movss (%rax), %xmm0
leaq 0xc(%rsp), %rdi
callq 0xd9bf0
movq (%rsp), %rdi
leaq 0xc(%rsp), %rsi
callq 0xd9b80
movss 0x30(%rsp), %xmm0
movq 0x18(%rsp), %rax
movss %xmm0, (%rax)
addq $0x38, %rsp
retq
|
_ZN8ImPlot3D12PushStyleVarEif:
sub rsp, 38h
mov [rsp+38h+var_4], edi
movss [rsp+38h+var_8], xmm0
mov rax, cs:_ZN8ImPlot3D9GImPlot3DE; ImPlot3D::GImPlot3D
mov [rsp+38h+var_10], rax
mov edi, [rsp+38h+var_4]; this
call _ZN8ImPlot3DL19GetPlotStyleVarInfoEi; ImPlot3D::GetPlotStyleVarInfo(int)
mov [rsp+38h+var_18], rax
mov rax, [rsp+38h+var_18]
cmp dword ptr [rax], 8
jnz short loc_D637B
mov rax, [rsp+38h+var_18]
cmp dword ptr [rax+4], 1
jnz short loc_D637B
mov rdi, [rsp+38h+var_18]
mov rsi, [rsp+38h+var_10]
add rsi, 94h
call _ZNK8ImPlot3D20ImPlot3DStyleVarInfo9GetVarPtrEP13ImPlot3DStyle; ImPlot3D::ImPlot3DStyleVarInfo::GetVarPtr(ImPlot3DStyle *)
mov [rsp+38h+var_20], rax
mov rax, [rsp+38h+var_10]
add rax, 1E8h
mov [rsp+38h+var_38], rax
mov esi, [rsp+38h+var_4]; int
mov rax, [rsp+38h+var_20]
movss xmm0, dword ptr [rax]; float
lea rdi, [rsp+38h+var_2C]; this
call _ZN13ImGuiStyleModC2Eif; ImGuiStyleMod::ImGuiStyleMod(int,float)
mov rdi, [rsp+38h+var_38]
lea rsi, [rsp+38h+var_2C]
call _ZN8ImVectorI13ImGuiStyleModE9push_backERKS0_; ImVector<ImGuiStyleMod>::push_back(ImGuiStyleMod const&)
movss xmm0, [rsp+38h+var_8]
mov rax, [rsp+38h+var_20]
movss dword ptr [rax], xmm0
loc_D637B:
add rsp, 38h
retn
|
ImPlot3D::ImPlot3DStyleVarInfo * ImPlot3D::PushStyleVar(ImPlot3D *this, int a2, float a3)
{
ImPlot3D::ImPlot3DStyleVarInfo *result; // rax
long long v4; // [rsp+0h] [rbp-38h]
_BYTE v5[12]; // [rsp+Ch] [rbp-2Ch] BYREF
float *VarPtr; // [rsp+18h] [rbp-20h]
ImPlot3D::ImPlot3DStyleVarInfo *v7; // [rsp+20h] [rbp-18h]
long long v8; // [rsp+28h] [rbp-10h]
float v9; // [rsp+30h] [rbp-8h]
int v10; // [rsp+34h] [rbp-4h]
v10 = (int)this;
v9 = a3;
v8 = ImPlot3D::GImPlot3D;
result = (ImPlot3D::ImPlot3DStyleVarInfo *)ImPlot3D::GetPlotStyleVarInfo((ImPlot3D *)(unsigned int)this, a2);
v7 = result;
if ( *(_DWORD *)result == 8 )
{
result = v7;
if ( *((_DWORD *)v7 + 1) == 1 )
{
VarPtr = (float *)ImPlot3D::ImPlot3DStyleVarInfo::GetVarPtr(v7, (ImPlot3DStyle *)(v8 + 148));
v4 = v8 + 488;
ImGuiStyleMod::ImGuiStyleMod((ImGuiStyleMod *)v5, v10, *VarPtr);
ImVector<ImGuiStyleMod>::push_back(v4, v5);
result = (ImPlot3D::ImPlot3DStyleVarInfo *)VarPtr;
*VarPtr = v9;
}
}
return result;
}
|
PushStyleVar:
SUB RSP,0x38
MOV dword ptr [RSP + 0x34],EDI
MOVSS dword ptr [RSP + 0x30],XMM0
MOV RAX,qword ptr [0x0078f638]
MOV qword ptr [RSP + 0x28],RAX
MOV EDI,dword ptr [RSP + 0x34]
CALL 0x001d6380
MOV qword ptr [RSP + 0x20],RAX
MOV RAX,qword ptr [RSP + 0x20]
CMP dword ptr [RAX],0x8
JNZ 0x001d637b
MOV RAX,qword ptr [RSP + 0x20]
CMP dword ptr [RAX + 0x4],0x1
JNZ 0x001d637b
MOV RDI,qword ptr [RSP + 0x20]
MOV RSI,qword ptr [RSP + 0x28]
ADD RSI,0x94
CALL 0x001d9b60
MOV qword ptr [RSP + 0x18],RAX
MOV RAX,qword ptr [RSP + 0x28]
ADD RAX,0x1e8
MOV qword ptr [RSP],RAX
MOV ESI,dword ptr [RSP + 0x34]
MOV RAX,qword ptr [RSP + 0x18]
MOVSS XMM0,dword ptr [RAX]
LEA RDI,[RSP + 0xc]
CALL 0x001d9bf0
MOV RDI,qword ptr [RSP]
LEA RSI,[RSP + 0xc]
CALL 0x001d9b80
MOVSS XMM0,dword ptr [RSP + 0x30]
MOV RAX,qword ptr [RSP + 0x18]
MOVSS dword ptr [RAX],XMM0
LAB_001d637b:
ADD RSP,0x38
RET
|
/* ImPlot3D::PushStyleVar(int, float) */
void ImPlot3D::PushStyleVar(int param_1,float param_2)
{
ImVector<ImGuiStyleMod> *this;
ImGuiStyleMod local_2c [12];
float *local_20;
ImPlot3DStyleVarInfo *local_18;
long local_10;
float local_8;
int local_4;
local_10 = GImPlot3D;
local_8 = param_2;
local_4 = param_1;
local_18 = (ImPlot3DStyleVarInfo *)GetPlotStyleVarInfo(param_1);
if ((*(int *)local_18 == 8) && (*(int *)(local_18 + 4) == 1)) {
local_20 = (float *)ImPlot3DStyleVarInfo::GetVarPtr(local_18,(ImPlot3DStyle *)(local_10 + 0x94))
;
this = (ImVector<ImGuiStyleMod> *)(local_10 + 0x1e8);
ImGuiStyleMod::ImGuiStyleMod(local_2c,local_4,*local_20);
ImVector<ImGuiStyleMod>::push_back(this,local_2c);
*local_20 = local_8;
}
return;
}
|
|
61,828 |
std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> nlohmann::json_abi_v3_11_2::detail::concat<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, char const (&) [29], char const*>(char const (&) [29], char const*&&)
|
7CodeWizard[P]stablediffusion/thirdparty/json.hpp
|
inline OutStringType concat(Args && ... args)
{
OutStringType str;
str.reserve(concat_length(std::forward<Args>(args)...));
concat_into(str, std::forward<Args>(args)...);
return str;
}
|
O1
|
cpp
|
std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> nlohmann::json_abi_v3_11_2::detail::concat<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, char const (&) [29], char const*>(char const (&) [29], char const*&&):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %r8, %r14
movq %rcx, %r15
movq %rdx, %r12
movq %rsi, %r13
movq %rdi, %rbx
leaq 0x10(%rdi), %rax
movq %rax, (%rsp)
movq %rax, (%rdi)
movq $0x0, 0x8(%rdi)
movb $0x0, 0x10(%rdi)
movq (%rsi), %rdi
callq 0xa240
movq %rax, %rbp
movq %r12, %rdi
callq 0xa240
movq 0x8(%r15), %rcx
addq %rbp, %rax
leaq (%rcx,%rax), %rsi
incq %rsi
movq %rbx, %rdi
callq 0xa990
movq (%r13), %rsi
movq %rbx, %rdi
callq 0xabf0
movq %rbx, %rdi
movq %r12, %rsi
callq 0xabf0
movq (%r15), %rsi
movq 0x8(%r15), %rdx
movq %rbx, %rdi
callq 0xa180
movsbl (%r14), %esi
movq %rbx, %rdi
callq 0xa4f0
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r14
movq (%rbx), %rdi
cmpq (%rsp), %rdi
je 0x77391
movq (%rsp), %rax
movq (%rax), %rsi
incq %rsi
callq 0xa5e0
movq %r14, %rdi
callq 0xaae0
nop
|
_ZN8nlohmann16json_abi_v3_11_26detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJPKcRA15_S9_S8_cEEET_DpOT0_:
push rbp
push r15
push r14
push r13
push r12
push rbx
push rax
mov r14, r8
mov r15, rcx
mov r12, rdx
mov r13, rsi
mov rbx, rdi
lea rax, [rdi+10h]
mov [rsp+38h+var_38], rax
mov [rdi], rax
mov qword ptr [rdi+8], 0
mov byte ptr [rdi+10h], 0
mov rdi, [rsi]
call _strlen
mov rbp, rax
mov rdi, r12
call _strlen
mov rcx, [r15+8]
add rax, rbp
lea rsi, [rcx+rax]
inc rsi
mov rdi, rbx
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7reserveEm; std::string::reserve(ulong)
mov rsi, [r13+0]
mov rdi, rbx
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendEPKc; std::string::append(char const*)
mov rdi, rbx
mov rsi, r12
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendEPKc; std::string::append(char const*)
mov rsi, [r15]
mov rdx, [r15+8]
mov rdi, rbx
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_appendEPKcm; std::string::_M_append(char const*,ulong)
movsx esi, byte ptr [r14]
mov rdi, rbx
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9push_backEc; std::string::push_back(char)
mov rax, rbx
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
mov r14, rax
mov rdi, [rbx]; void *
cmp rdi, [rsp+0]
jz short loc_77391
mov rax, [rsp+0]
mov rsi, [rax]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_77391:
mov rdi, r14
call __Unwind_Resume
|
long long nlohmann::json_abi_v3_11_2::detail::concat<std::string,char const*,char const(&)[15],std::string,char>(
long long a1,
_QWORD *a2,
long long a3,
_QWORD *a4,
char *a5)
{
long long v8; // rbp
long long v9; // rax
*(_QWORD *)a1 = a1 + 16;
*(_QWORD *)(a1 + 8) = 0LL;
*(_BYTE *)(a1 + 16) = 0;
v8 = strlen(*a2);
v9 = strlen(a3);
std::string::reserve(a1, a4[1] + v8 + v9 + 1);
std::string::append(a1, *a2);
std::string::append(a1, a3);
std::string::_M_append(a1, *a4, a4[1]);
std::string::push_back(a1, (unsigned int)*a5);
return a1;
}
| |||
61,829 |
std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> nlohmann::json_abi_v3_11_2::detail::concat<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, char const (&) [29], char const*>(char const (&) [29], char const*&&)
|
7CodeWizard[P]stablediffusion/thirdparty/json.hpp
|
inline OutStringType concat(Args && ... args)
{
OutStringType str;
str.reserve(concat_length(std::forward<Args>(args)...));
concat_into(str, std::forward<Args>(args)...);
return str;
}
|
O2
|
cpp
|
std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> nlohmann::json_abi_v3_11_2::detail::concat<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, char const (&) [29], char const*>(char const (&) [29], char const*&&):
pushq %r15
pushq %r14
pushq %rbx
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %rbx
leaq 0x10(%rdi), %rax
movq %rax, (%rdi)
andq $0x0, 0x8(%rdi)
movb $0x0, 0x10(%rdi)
movq %rsi, %rdi
movq %rdx, %rsi
callq 0x4bf35
movq %rbx, %rdi
movq %rax, %rsi
callq 0xa980
movq %rbx, %rdi
movq %r15, %rsi
movq %r14, %rdx
callq 0x551be
movq %rbx, %rax
popq %rbx
popq %r14
popq %r15
retq
movq %rax, %r14
movq %rbx, %rdi
callq 0xac60
movq %r14, %rdi
callq 0xaab0
|
_ZN8nlohmann16json_abi_v3_11_26detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJRA52_KcPS9_EEET_DpOT0_:
push r15
push r14
push rbx
mov r14, rdx
mov r15, rsi
mov rbx, rdi
lea rax, [rdi+10h]
mov [rdi], rax
and qword ptr [rdi+8], 0
mov byte ptr [rdi+10h], 0
mov rdi, rsi
mov rsi, rdx
call _ZN8nlohmann16json_abi_v3_11_26detail13concat_lengthIJPKcEEEmS4_DpOT_; nlohmann::json_abi_v3_11_2::detail::concat_length<char const*>(char const*,char const* &&)
mov rdi, rbx
mov rsi, rax
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7reserveEm; std::string::reserve(ulong)
mov rdi, rbx
mov rsi, r15
mov rdx, r14
call _ZN8nlohmann16json_abi_v3_11_26detail11concat_intoINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERA52_KcJPS9_ETnNSt9enable_ifIXsr24detect_string_can_appendIT_T0_EE5valueEiE4typeELi0EEEvRSE_OSF_DpOT1_
mov rax, rbx
pop rbx
pop r14
pop r15
retn
mov r14, rax
mov rdi, rbx; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
mov rdi, r14
call __Unwind_Resume
|
long long nlohmann::json_abi_v3_11_2::detail::concat<std::string,char const(&)[52],char const*>(
long long a1,
long long a2,
_QWORD *a3)
{
long long v4; // rax
*(_QWORD *)a1 = a1 + 16;
*(_QWORD *)(a1 + 8) = 0LL;
*(_BYTE *)(a1 + 16) = 0;
v4 = nlohmann::json_abi_v3_11_2::detail::concat_length<char const*>(a2, a3);
std::string::reserve(a1, v4);
ZN8nlohmann16json_abi_v3_11_26detail11concat_intoINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERA52_KcJPS9_ETnNSt9enable_ifIXsr24detect_string_can_appendIT_T0_EE5valueEiE4typeELi0EEEvRSE_OSF_DpOT1_(
a1,
a2,
a3);
return a1;
}
|
concat<std::__cxx11::string,char_const(&)[52],char_const*>:
PUSH R15
PUSH R14
PUSH RBX
MOV R14,RDX
MOV R15,RSI
MOV RBX,RDI
LEA RAX,[RDI + 0x10]
MOV qword ptr [RDI],RAX
AND qword ptr [RDI + 0x8],0x0
MOV byte ptr [RDI + 0x10],0x0
MOV RDI,RSI
MOV RSI,RDX
CALL 0x0014bf35
LAB_00155069:
MOV RDI,RBX
MOV RSI,RAX
CALL 0x0010a980
MOV RDI,RBX
MOV RSI,R15
MOV RDX,R14
CALL 0x001551be
LAB_00155082:
MOV RAX,RBX
POP RBX
POP R14
POP R15
RET
|
/* std::__cxx11::string nlohmann::json_abi_v3_11_2::detail::concat<std::__cxx11::string, char const
(&) [52], char const*>(char const (&) [52], char const*&&) */
detail * __thiscall
nlohmann::json_abi_v3_11_2::detail::concat<std::__cxx11::string,char_const(&)[52],char_const*>
(detail *this,char *param_1,char **param_2)
{
*(detail **)this = this + 0x10;
*(int8 *)(this + 8) = 0;
this[0x10] = (detail)0x0;
concat_length<char_const*>(param_1,param_2);
/* try { // try from 00155069 to 00155081 has its CatchHandler @ 0015508b */
std::__cxx11::string::reserve((ulong)this);
_ZN8nlohmann16json_abi_v3_11_26detail11concat_intoINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERA52_KcJPS9_ETnNSt9enable_ifIXsr24detect_string_can_appendIT_T0_EE5valueEiE4typeELi0EEEvRSE_OSF_DpOT1_
(this,param_1,param_2);
return this;
}
|
|
61,830 |
std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> nlohmann::json_abi_v3_11_2::detail::concat<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, char const (&) [29], char const*>(char const (&) [29], char const*&&)
|
7CodeWizard[P]stablediffusion/thirdparty/json.hpp
|
inline OutStringType concat(Args && ... args)
{
OutStringType str;
str.reserve(concat_length(std::forward<Args>(args)...));
concat_into(str, std::forward<Args>(args)...);
return str;
}
|
O3
|
cpp
|
std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> nlohmann::json_abi_v3_11_2::detail::concat<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, char const (&) [29], char const*>(char const (&) [29], char const*&&):
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %rbx
leaq 0x10(%rdi), %r13
movq %r13, (%rdi)
movq $0x0, 0x8(%rdi)
movb $0x0, 0x10(%rdi)
movq %rsi, %rdi
callq 0xa240
movq %rax, %r12
movq (%r14), %rdi
callq 0xa240
addq %rax, %r12
movq %rbx, %rdi
movq %r12, %rsi
callq 0xa980
movq %rbx, %rdi
movq %r15, %rsi
callq 0xabe0
movq (%r14), %rsi
movq %rbx, %rdi
callq 0xabe0
movq %rbx, %rax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
movq %rax, %r14
movq (%rbx), %rdi
cmpq %r13, %rdi
je 0x781ae
movq (%r13), %rsi
incq %rsi
callq 0xa5d0
movq %r14, %rdi
callq 0xaad0
|
_ZN8nlohmann16json_abi_v3_11_26detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJRA52_KcPS9_EEET_DpOT0_:
push r15
push r14
push r13
push r12
push rbx
mov r14, rdx
mov r15, rsi
mov rbx, rdi
lea r13, [rdi+10h]
mov [rdi], r13
mov qword ptr [rdi+8], 0
mov byte ptr [rdi+10h], 0
mov rdi, rsi
call _strlen
mov r12, rax
mov rdi, [r14]
call _strlen
add r12, rax
mov rdi, rbx
mov rsi, r12
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7reserveEm; std::string::reserve(ulong)
mov rdi, rbx
mov rsi, r15
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendEPKc; std::string::append(char const*)
mov rsi, [r14]
mov rdi, rbx
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendEPKc; std::string::append(char const*)
mov rax, rbx
pop rbx
pop r12
pop r13
pop r14
pop r15
retn
mov r14, rax
mov rdi, [rbx]; void *
cmp rdi, r13
jz short loc_781AE
mov rsi, [r13+0]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_781AE:
mov rdi, r14
call __Unwind_Resume
|
long long nlohmann::json_abi_v3_11_2::detail::concat<std::string,char const(&)[52],char const*>(
long long a1,
long long a2,
_QWORD *a3)
{
long long v4; // r12
long long v5; // rax
*(_QWORD *)a1 = a1 + 16;
*(_QWORD *)(a1 + 8) = 0LL;
*(_BYTE *)(a1 + 16) = 0;
v4 = strlen(a2);
v5 = strlen(*a3);
std::string::reserve(a1, v5 + v4);
std::string::append(a1, a2);
std::string::append(a1, *a3);
return a1;
}
| |||
61,831 |
Ship::hitAt(unsigned long, unsigned long)
|
666mxvbee[P]BattleShip/lib/Ship/Ship.cpp
|
bool Ship::hitAt(uint64_t shotX, uint64_t shotY) {
if (orientation == 'h') {
if (shotY == y && shotX >= x && shotX < x + len) {
hits[ shotX - x ] = true;
std::cout << "Ship::hitAt(): Hit at(" << shotX << ", " << shotY << ")." << std::endl;
return true;
}
} else if (orientation == 'v') {
if (shotX == x && shotY >= y && shotY < y + len) {
hits[ shotY - y ] = true;
std::cout << "Ship::hitAt(): Hit at(" << shotX << ", " << shotY << ")." << std::endl;
return true;
}
}
return false;
}
|
O0
|
cpp
|
Ship::hitAt(unsigned long, unsigned long):
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x48(%rbp)
movsbl 0x4(%rax), %eax
cmpl $0x68, %eax
jne 0x3824c
movq -0x48(%rbp), %rcx
movq -0x20(%rbp), %rax
cmpq 0x10(%rcx), %rax
jne 0x38247
movq -0x48(%rbp), %rcx
movq -0x18(%rbp), %rax
cmpq 0x8(%rcx), %rax
jb 0x38247
movq -0x48(%rbp), %rdx
movq -0x18(%rbp), %rax
movq 0x8(%rdx), %rcx
movslq (%rdx), %rdx
addq %rdx, %rcx
cmpq %rcx, %rax
jae 0x38247
movq -0x48(%rbp), %rax
movq %rax, %rdi
addq $0x18, %rdi
movq -0x18(%rbp), %rsi
subq 0x8(%rax), %rsi
callq 0x384e0
movq %rax, -0x30(%rbp)
movq %rdx, -0x28(%rbp)
leaq -0x30(%rbp), %rdi
movl $0x1, %esi
callq 0x371a0
movq 0x25da3(%rip), %rdi # 0x5df90
leaq 0x91bb(%rip), %rsi # 0x413af
callq 0x7380
movq %rax, %rdi
movq -0x18(%rbp), %rsi
callq 0x70a0
movq %rax, %rdi
leaq 0x919d(%rip), %rsi # 0x413ac
callq 0x7380
movq %rax, %rdi
movq -0x20(%rbp), %rsi
callq 0x70a0
movq %rax, %rdi
leaq 0x919c(%rip), %rsi # 0x413c6
callq 0x7380
movq %rax, %rdi
movq 0x25d27(%rip), %rsi # 0x5df60
callq 0x73c0
movb $0x1, -0x1(%rbp)
jmp 0x38330
jmp 0x3832c
movq -0x48(%rbp), %rax
movsbl 0x4(%rax), %eax
cmpl $0x76, %eax
jne 0x3832a
movq -0x48(%rbp), %rcx
movq -0x18(%rbp), %rax
cmpq 0x8(%rcx), %rax
jne 0x38328
movq -0x48(%rbp), %rcx
movq -0x20(%rbp), %rax
cmpq 0x10(%rcx), %rax
jb 0x38328
movq -0x48(%rbp), %rdx
movq -0x20(%rbp), %rax
movq 0x10(%rdx), %rcx
movslq (%rdx), %rdx
addq %rdx, %rcx
cmpq %rcx, %rax
jae 0x38328
movq -0x48(%rbp), %rax
movq %rax, %rdi
addq $0x18, %rdi
movq -0x20(%rbp), %rsi
subq 0x10(%rax), %rsi
callq 0x384e0
movq %rax, -0x40(%rbp)
movq %rdx, -0x38(%rbp)
leaq -0x40(%rbp), %rdi
movl $0x1, %esi
callq 0x371a0
movq 0x25cbf(%rip), %rdi # 0x5df90
leaq 0x90d7(%rip), %rsi # 0x413af
callq 0x7380
movq %rax, %rdi
movq -0x18(%rbp), %rsi
callq 0x70a0
movq %rax, %rdi
leaq 0x90b9(%rip), %rsi # 0x413ac
callq 0x7380
movq %rax, %rdi
movq -0x20(%rbp), %rsi
callq 0x70a0
movq %rax, %rdi
leaq 0x90b8(%rip), %rsi # 0x413c6
callq 0x7380
movq %rax, %rdi
movq 0x25c43(%rip), %rsi # 0x5df60
callq 0x73c0
movb $0x1, -0x1(%rbp)
jmp 0x38330
jmp 0x3832a
jmp 0x3832c
movb $0x0, -0x1(%rbp)
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0x50, %rsp
popq %rbp
retq
nopl (%rax,%rax)
|
_ZN4Ship5hitAtEmm:
push rbp
mov rbp, rsp
sub rsp, 50h
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov [rbp+var_20], rdx
mov rax, [rbp+var_10]
mov [rbp+var_48], rax
movsx eax, byte ptr [rax+4]
cmp eax, 68h ; 'h'
jnz loc_3824C
mov rcx, [rbp+var_48]
mov rax, [rbp+var_20]
cmp rax, [rcx+10h]
jnz loc_38247
mov rcx, [rbp+var_48]
mov rax, [rbp+var_18]
cmp rax, [rcx+8]
jb loc_38247
mov rdx, [rbp+var_48]
mov rax, [rbp+var_18]
mov rcx, [rdx+8]
movsxd rdx, dword ptr [rdx]
add rcx, rdx
cmp rax, rcx
jnb loc_38247
mov rax, [rbp+var_48]
mov rdi, rax
add rdi, 18h
mov rsi, [rbp+var_18]
sub rsi, [rax+8]
call _ZNSt6vectorIbSaIbEEixEm; std::vector<bool>::operator[](ulong)
mov [rbp+var_30], rax
mov [rbp+var_28], rdx
lea rdi, [rbp+var_30]
mov esi, 1
call _ZNSt14_Bit_referenceaSEb; std::_Bit_reference::operator=(bool)
mov rdi, cs:_ZSt4cout_ptr
lea rsi, aShipHitatHitAt; "Ship::hitAt(): Hit at("
call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*)
mov rdi, rax
mov rsi, [rbp+var_18]
call __ZNSolsEm; std::ostream::operator<<(ulong)
mov rdi, rax
lea rsi, asc_413AC; ", "
call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*)
mov rdi, rax
mov rsi, [rbp+var_20]
call __ZNSolsEm; std::ostream::operator<<(ulong)
mov rdi, rax
lea rsi, asc_413C6; ")."
call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*)
mov rdi, rax
mov rsi, cs:_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6__ptr
call __ZNSolsEPFRSoS_E; std::ostream::operator<<(std::ostream & (*)(std::ostream &))
mov [rbp+var_1], 1
jmp loc_38330
loc_38247:
jmp loc_3832C
loc_3824C:
mov rax, [rbp+var_48]
movsx eax, byte ptr [rax+4]
cmp eax, 76h ; 'v'
jnz loc_3832A
mov rcx, [rbp+var_48]
mov rax, [rbp+var_18]
cmp rax, [rcx+8]
jnz loc_38328
mov rcx, [rbp+var_48]
mov rax, [rbp+var_20]
cmp rax, [rcx+10h]
jb loc_38328
mov rdx, [rbp+var_48]
mov rax, [rbp+var_20]
mov rcx, [rdx+10h]
movsxd rdx, dword ptr [rdx]
add rcx, rdx
cmp rax, rcx
jnb loc_38328
mov rax, [rbp+var_48]
mov rdi, rax
add rdi, 18h
mov rsi, [rbp+var_20]
sub rsi, [rax+10h]
call _ZNSt6vectorIbSaIbEEixEm; std::vector<bool>::operator[](ulong)
mov [rbp+var_40], rax
mov [rbp+var_38], rdx
lea rdi, [rbp+var_40]
mov esi, 1
call _ZNSt14_Bit_referenceaSEb; std::_Bit_reference::operator=(bool)
mov rdi, cs:_ZSt4cout_ptr
lea rsi, aShipHitatHitAt; "Ship::hitAt(): Hit at("
call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*)
mov rdi, rax
mov rsi, [rbp+var_18]
call __ZNSolsEm; std::ostream::operator<<(ulong)
mov rdi, rax
lea rsi, asc_413AC; ", "
call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*)
mov rdi, rax
mov rsi, [rbp+var_20]
call __ZNSolsEm; std::ostream::operator<<(ulong)
mov rdi, rax
lea rsi, asc_413C6; ")."
call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*)
mov rdi, rax
mov rsi, cs:_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6__ptr
call __ZNSolsEPFRSoS_E; std::ostream::operator<<(std::ostream & (*)(std::ostream &))
mov [rbp+var_1], 1
jmp short loc_38330
loc_38328:
jmp short $+2
loc_3832A:
jmp short $+2
loc_3832C:
mov [rbp+var_1], 0
loc_38330:
mov al, [rbp+var_1]
and al, 1
add rsp, 50h
pop rbp
retn
|
char Ship::hitAt(Ship *this, unsigned long long a2, unsigned long long a3)
{
long long v3; // rdx
long long v4; // rax
long long v5; // rax
long long v6; // rax
long long v7; // rax
long long v8; // rax
long long v9; // rdx
long long v10; // rax
long long v11; // rax
long long v12; // rax
long long v13; // rax
long long v14; // rax
_QWORD v16[2]; // [rsp+10h] [rbp-40h] BYREF
_QWORD v17[2]; // [rsp+20h] [rbp-30h] BYREF
unsigned long long v18; // [rsp+30h] [rbp-20h]
unsigned long long v19; // [rsp+38h] [rbp-18h]
Ship *v20; // [rsp+40h] [rbp-10h]
v20 = this;
v19 = a2;
v18 = a3;
if ( *((_BYTE *)this + 4) != 104 )
{
if ( *((_BYTE *)this + 4) == 118
&& v19 == *((_QWORD *)this + 1)
&& v18 >= *((_QWORD *)this + 2)
&& v18 < *(int *)this + *((_QWORD *)this + 2) )
{
v16[0] = std::vector<bool>::operator[]((char *)this + 24, v18 - *((_QWORD *)this + 2));
v16[1] = v9;
std::_Bit_reference::operator=((long long)v16, 1);
v10 = std::operator<<<std::char_traits<char>>(&std::cout, "Ship::hitAt(): Hit at(");
v11 = std::ostream::operator<<(v10, v19);
v12 = std::operator<<<std::char_traits<char>>(v11, ", ");
v13 = std::ostream::operator<<(v12, v18);
v14 = std::operator<<<std::char_traits<char>>(v13, ").");
std::ostream::operator<<(v14, &std::endl<char,std::char_traits<char>>);
return 1;
}
return 0;
}
if ( v18 != *((_QWORD *)this + 2) || v19 < *((_QWORD *)this + 1) || v19 >= *(int *)this + *((_QWORD *)this + 1) )
return 0;
v17[0] = std::vector<bool>::operator[]((char *)this + 24, v19 - *((_QWORD *)this + 1));
v17[1] = v3;
std::_Bit_reference::operator=((long long)v17, 1);
v4 = std::operator<<<std::char_traits<char>>(&std::cout, "Ship::hitAt(): Hit at(");
v5 = std::ostream::operator<<(v4, v19);
v6 = std::operator<<<std::char_traits<char>>(v5, ", ");
v7 = std::ostream::operator<<(v6, v18);
v8 = std::operator<<<std::char_traits<char>>(v7, ").");
std::ostream::operator<<(v8, &std::endl<char,std::char_traits<char>>);
return 1;
}
|
hitAt:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x50
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x18],RSI
MOV qword ptr [RBP + -0x20],RDX
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RBP + -0x48],RAX
MOVSX EAX,byte ptr [RAX + 0x4]
CMP EAX,0x68
JNZ 0x0013824c
MOV RCX,qword ptr [RBP + -0x48]
MOV RAX,qword ptr [RBP + -0x20]
CMP RAX,qword ptr [RCX + 0x10]
JNZ 0x00138247
MOV RCX,qword ptr [RBP + -0x48]
MOV RAX,qword ptr [RBP + -0x18]
CMP RAX,qword ptr [RCX + 0x8]
JC 0x00138247
MOV RDX,qword ptr [RBP + -0x48]
MOV RAX,qword ptr [RBP + -0x18]
MOV RCX,qword ptr [RDX + 0x8]
MOVSXD RDX,dword ptr [RDX]
ADD RCX,RDX
CMP RAX,RCX
JNC 0x00138247
MOV RAX,qword ptr [RBP + -0x48]
MOV RDI,RAX
ADD RDI,0x18
MOV RSI,qword ptr [RBP + -0x18]
SUB RSI,qword ptr [RAX + 0x8]
CALL 0x001384e0
MOV qword ptr [RBP + -0x30],RAX
MOV qword ptr [RBP + -0x28],RDX
LEA RDI,[RBP + -0x30]
MOV ESI,0x1
CALL 0x001371a0
MOV RDI,qword ptr [0x0015df90]
LEA RSI,[0x1413af]
CALL 0x00107380
MOV RDI,RAX
MOV RSI,qword ptr [RBP + -0x18]
CALL 0x001070a0
MOV RDI,RAX
LEA RSI,[0x1413ac]
CALL 0x00107380
MOV RDI,RAX
MOV RSI,qword ptr [RBP + -0x20]
CALL 0x001070a0
MOV RDI,RAX
LEA RSI,[0x1413c6]
CALL 0x00107380
MOV RDI,RAX
MOV RSI,qword ptr [0x0015df60]
CALL 0x001073c0
MOV byte ptr [RBP + -0x1],0x1
JMP 0x00138330
LAB_00138247:
JMP 0x0013832c
LAB_0013824c:
MOV RAX,qword ptr [RBP + -0x48]
MOVSX EAX,byte ptr [RAX + 0x4]
CMP EAX,0x76
JNZ 0x0013832a
MOV RCX,qword ptr [RBP + -0x48]
MOV RAX,qword ptr [RBP + -0x18]
CMP RAX,qword ptr [RCX + 0x8]
JNZ 0x00138328
MOV RCX,qword ptr [RBP + -0x48]
MOV RAX,qword ptr [RBP + -0x20]
CMP RAX,qword ptr [RCX + 0x10]
JC 0x00138328
MOV RDX,qword ptr [RBP + -0x48]
MOV RAX,qword ptr [RBP + -0x20]
MOV RCX,qword ptr [RDX + 0x10]
MOVSXD RDX,dword ptr [RDX]
ADD RCX,RDX
CMP RAX,RCX
JNC 0x00138328
MOV RAX,qword ptr [RBP + -0x48]
MOV RDI,RAX
ADD RDI,0x18
MOV RSI,qword ptr [RBP + -0x20]
SUB RSI,qword ptr [RAX + 0x10]
CALL 0x001384e0
MOV qword ptr [RBP + -0x40],RAX
MOV qword ptr [RBP + -0x38],RDX
LEA RDI,[RBP + -0x40]
MOV ESI,0x1
CALL 0x001371a0
MOV RDI,qword ptr [0x0015df90]
LEA RSI,[0x1413af]
CALL 0x00107380
MOV RDI,RAX
MOV RSI,qword ptr [RBP + -0x18]
CALL 0x001070a0
MOV RDI,RAX
LEA RSI,[0x1413ac]
CALL 0x00107380
MOV RDI,RAX
MOV RSI,qword ptr [RBP + -0x20]
CALL 0x001070a0
MOV RDI,RAX
LEA RSI,[0x1413c6]
CALL 0x00107380
MOV RDI,RAX
MOV RSI,qword ptr [0x0015df60]
CALL 0x001073c0
MOV byte ptr [RBP + -0x1],0x1
JMP 0x00138330
LAB_00138328:
JMP 0x0013832a
LAB_0013832a:
JMP 0x0013832c
LAB_0013832c:
MOV byte ptr [RBP + -0x1],0x0
LAB_00138330:
MOV AL,byte ptr [RBP + -0x1]
AND AL,0x1
ADD RSP,0x50
POP RBP
RET
|
/* Ship::hitAt(unsigned long, unsigned long) */
int1 __thiscall Ship::hitAt(Ship *this,ulong param_1,ulong param_2)
{
ostream *poVar1;
_Bit_reference local_48 [16];
_Bit_reference local_38 [16];
ulong local_28;
ulong local_20;
Ship *local_18;
local_28 = param_2;
local_20 = param_1;
local_18 = this;
if (this[4] == (Ship)0x68) {
if (((param_2 == *(ulong *)(this + 0x10)) && (*(ulong *)(this + 8) <= param_1)) &&
(param_1 < (ulong)(*(long *)(this + 8) + (long)*(int *)this))) {
local_38 = (_Bit_reference [16])
std::vector<bool,std::allocator<bool>>::operator[]
((vector<bool,std::allocator<bool>> *)(this + 0x18),
param_1 - *(long *)(this + 8));
std::_Bit_reference::operator=(local_38,true);
poVar1 = std::operator<<((ostream *)PTR_cout_0015df90,"Ship::hitAt(): Hit at(");
poVar1 = (ostream *)std::ostream::operator<<(poVar1,local_20);
poVar1 = std::operator<<(poVar1,", ");
poVar1 = (ostream *)std::ostream::operator<<(poVar1,local_28);
poVar1 = std::operator<<(poVar1,").");
std::ostream::operator<<
(poVar1,(_func_ostream_ptr_ostream_ptr *)
PTR_endl<char,std_char_traits<char>>_0015df60);
return 1;
}
}
else if ((((this[4] == (Ship)0x76) && (param_1 == *(ulong *)(this + 8))) &&
(*(ulong *)(this + 0x10) <= param_2)) &&
(param_2 < (ulong)(*(long *)(this + 0x10) + (long)*(int *)this))) {
local_48 = (_Bit_reference [16])
std::vector<bool,std::allocator<bool>>::operator[]
((vector<bool,std::allocator<bool>> *)(this + 0x18),
param_2 - *(long *)(this + 0x10));
std::_Bit_reference::operator=(local_48,true);
poVar1 = std::operator<<((ostream *)PTR_cout_0015df90,"Ship::hitAt(): Hit at(");
poVar1 = (ostream *)std::ostream::operator<<(poVar1,local_20);
poVar1 = std::operator<<(poVar1,", ");
poVar1 = (ostream *)std::ostream::operator<<(poVar1,local_28);
poVar1 = std::operator<<(poVar1,").");
std::ostream::operator<<
(poVar1,(_func_ostream_ptr_ostream_ptr *)PTR_endl<char,std_char_traits<char>>_0015df60
);
return 1;
}
return 0;
}
|
|
61,832 |
Ship::hitAt(unsigned long, unsigned long)
|
666mxvbee[P]BattleShip/lib/Ship/Ship.cpp
|
bool Ship::hitAt(uint64_t shotX, uint64_t shotY) {
if (orientation == 'h') {
if (shotY == y && shotX >= x && shotX < x + len) {
hits[ shotX - x ] = true;
std::cout << "Ship::hitAt(): Hit at(" << shotX << ", " << shotY << ")." << std::endl;
return true;
}
} else if (orientation == 'v') {
if (shotX == x && shotY >= y && shotY < y + len) {
hits[ shotY - y ] = true;
std::cout << "Ship::hitAt(): Hit at(" << shotX << ", " << shotY << ")." << std::endl;
return true;
}
}
return false;
}
|
O1
|
cpp
|
Ship::hitAt(unsigned long, unsigned long):
pushq %r15
pushq %r14
pushq %rbx
movq %rdx, %rbx
movq %rsi, %r14
movzbl 0x4(%rdi), %eax
cmpl $0x76, %eax
je 0x155a9
cmpl $0x68, %eax
jne 0x1569a
cmpq %rbx, 0x10(%rdi)
jne 0x1569a
movq 0x8(%rdi), %rax
movq %r14, %rcx
subq %rax, %rcx
jb 0x1569a
movslq (%rdi), %rdx
addq %rdx, %rax
cmpq %r14, %rax
ja 0x155d2
jmp 0x1569a
cmpq %r14, 0x8(%rdi)
jne 0x1569a
movq 0x10(%rdi), %rax
movq %rbx, %rcx
subq %rax, %rcx
jb 0x1569a
movslq (%rdi), %rdx
addq %rdx, %rax
cmpq %rbx, %rax
jbe 0x1569a
leaq 0x3f(%rcx), %rax
testq %rcx, %rcx
cmovnsq %rcx, %rax
sarq $0x6, %rax
shlq $0x3, %rax
addq 0x18(%rdi), %rax
movabsq $-0x8000000000000000, %rdx # imm = 0x8000000000000000
leaq 0x3f(%rdx), %rsi
andq %rcx, %rsi
xorl %edi, %edi
cmpq %rdx, %rsi
setbe %dil
movl $0x1, %edx
shlq %cl, %rdx
orq %rdx, -0x8(%rax,%rdi,8)
movq 0xf989(%rip), %r15 # 0x24fa0
leaq 0x5cbf(%rip), %rsi # 0x1b2dd
movl $0x16, %edx
movq %r15, %rdi
callq 0x5420
movq %r15, %rdi
movq %r14, %rsi
callq 0x5270
movq %rax, %r14
leaq 0x5c9a(%rip), %rsi # 0x1b2da
movl $0x2, %edx
movq %rax, %rdi
callq 0x5420
movq %r14, %rdi
movq %rbx, %rsi
callq 0x5270
movq %rax, %rbx
leaq 0x5c92(%rip), %rsi # 0x1b2f4
movl $0x2, %edx
movq %rax, %rdi
callq 0x5420
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x5370
movsbl %al, %esi
movq %rbx, %rdi
callq 0x5040
movq %rax, %rdi
callq 0x5280
movb $0x1, %al
jmp 0x1569c
xorl %eax, %eax
popq %rbx
popq %r14
popq %r15
retq
|
_ZN4Ship5hitAtEmm:
push r15
push r14
push rbx
mov rbx, rdx
mov r14, rsi
movzx eax, byte ptr [rdi+4]
cmp eax, 76h ; 'v'
jz short loc_155A9
cmp eax, 68h ; 'h'
jnz loc_1569A
cmp [rdi+10h], rbx
jnz loc_1569A
mov rax, [rdi+8]
mov rcx, r14
sub rcx, rax
jb loc_1569A
movsxd rdx, dword ptr [rdi]
add rax, rdx
cmp rax, r14
ja short loc_155D2
jmp loc_1569A
loc_155A9:
cmp [rdi+8], r14
jnz loc_1569A
mov rax, [rdi+10h]
mov rcx, rbx
sub rcx, rax
jb loc_1569A
movsxd rdx, dword ptr [rdi]
add rax, rdx
cmp rax, rbx
jbe loc_1569A
loc_155D2:
lea rax, [rcx+3Fh]
test rcx, rcx
cmovns rax, rcx
sar rax, 6
shl rax, 3
add rax, [rdi+18h]
mov rdx, 8000000000000000h
lea rsi, [rdx+3Fh]
and rsi, rcx
xor edi, edi
cmp rsi, rdx
setbe dil
mov edx, 1
shl rdx, cl
or [rax+rdi*8-8], rdx
mov r15, cs:_ZSt4cout_ptr
lea rsi, aShipHitatHitAt; "Ship::hitAt(): Hit at("
mov edx, 16h
mov rdi, r15
call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long)
mov rdi, r15
mov rsi, r14
call __ZNSo9_M_insertImEERSoT_; std::ostream::_M_insert<ulong>(ulong)
mov r14, rax
lea rsi, asc_1B2DA; ", "
mov edx, 2
mov rdi, rax
call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long)
mov rdi, r14
mov rsi, rbx
call __ZNSo9_M_insertImEERSoT_; std::ostream::_M_insert<ulong>(ulong)
mov rbx, rax
lea rsi, asc_1B2F4; ")."
mov edx, 2
mov rdi, rax
call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long)
mov rax, [rbx]
mov rdi, [rax-18h]
add rdi, rbx
mov esi, 0Ah
call __ZNKSt9basic_iosIcSt11char_traitsIcEE5widenEc; std::ios::widen(char)
movsx esi, al; char
mov rdi, rbx; this
call __ZNSo3putEc; std::ostream::put(char)
mov rdi, rax; this
call __ZNSo5flushEv; std::ostream::flush(void)
mov al, 1
jmp short loc_1569C
loc_1569A:
xor eax, eax
loc_1569C:
pop rbx
pop r14
pop r15
retn
|
char Ship::hitAt(Ship *this, unsigned long long a2, unsigned long long a3)
{
int v4; // eax
unsigned long long v5; // rax
long long v6; // rcx
unsigned long long v7; // rax
long long v8; // rax
long long v9; // r14
std::ostream *v10; // rbx
char v11; // al
std::ostream *v12; // rax
v4 = *((unsigned __int8 *)this + 4);
if ( v4 == 118 )
{
if ( *((_QWORD *)this + 1) != a2 )
return 0;
v7 = *((_QWORD *)this + 2);
v6 = a3 - v7;
if ( a3 < v7 || *(int *)this + v7 <= a3 )
return 0;
LABEL_10:
v8 = *((_QWORD *)this + 3) + 8 * (v6 / 64);
*(_QWORD *)(v8 + 8LL * ((v6 & 0x800000000000003FLL) <= 0x8000000000000000LL) - 8) |= 1LL << v6;
std::__ostream_insert<char,std::char_traits<char>>(&std::cout, "Ship::hitAt(): Hit at(", 22LL);
v9 = std::ostream::_M_insert<unsigned long>(&std::cout, a2);
std::__ostream_insert<char,std::char_traits<char>>(v9, ", ", 2LL);
v10 = (std::ostream *)std::ostream::_M_insert<unsigned long>(v9, a3);
std::__ostream_insert<char,std::char_traits<char>>(v10, ").", 2LL);
v11 = std::ios::widen((char *)v10 + *(_QWORD *)(*(_QWORD *)v10 - 24LL), 10LL);
v12 = (std::ostream *)std::ostream::put(v10, v11);
std::ostream::flush(v12);
return 1;
}
if ( v4 == 104 && *((_QWORD *)this + 2) == a3 )
{
v5 = *((_QWORD *)this + 1);
v6 = a2 - v5;
if ( a2 >= v5 && *(int *)this + v5 > a2 )
goto LABEL_10;
}
return 0;
}
|
hitAt:
PUSH R15
PUSH R14
PUSH RBX
MOV RBX,RDX
MOV R14,RSI
MOVZX EAX,byte ptr [RDI + 0x4]
CMP EAX,0x76
JZ 0x001155a9
CMP EAX,0x68
JNZ 0x0011569a
CMP qword ptr [RDI + 0x10],RBX
JNZ 0x0011569a
MOV RAX,qword ptr [RDI + 0x8]
MOV RCX,R14
SUB RCX,RAX
JC 0x0011569a
MOVSXD RDX,dword ptr [RDI]
ADD RAX,RDX
CMP RAX,R14
JA 0x001155d2
JMP 0x0011569a
LAB_001155a9:
CMP qword ptr [RDI + 0x8],R14
JNZ 0x0011569a
MOV RAX,qword ptr [RDI + 0x10]
MOV RCX,RBX
SUB RCX,RAX
JC 0x0011569a
MOVSXD RDX,dword ptr [RDI]
ADD RAX,RDX
CMP RAX,RBX
JBE 0x0011569a
LAB_001155d2:
LEA RAX,[RCX + 0x3f]
TEST RCX,RCX
CMOVNS RAX,RCX
SAR RAX,0x6
SHL RAX,0x3
ADD RAX,qword ptr [RDI + 0x18]
MOV RDX,-0x8000000000000000
LEA RSI,[RDX + 0x3f]
AND RSI,RCX
XOR EDI,EDI
CMP RSI,RDX
SETBE DIL
MOV EDX,0x1
SHL RDX,CL
OR qword ptr [RAX + RDI*0x8 + -0x8],RDX
MOV R15,qword ptr [0x00124fa0]
LEA RSI,[0x11b2dd]
MOV EDX,0x16
MOV RDI,R15
CALL 0x00105420
MOV RDI,R15
MOV RSI,R14
CALL 0x00105270
MOV R14,RAX
LEA RSI,[0x11b2da]
MOV EDX,0x2
MOV RDI,RAX
CALL 0x00105420
MOV RDI,R14
MOV RSI,RBX
CALL 0x00105270
MOV RBX,RAX
LEA RSI,[0x11b2f4]
MOV EDX,0x2
MOV RDI,RAX
CALL 0x00105420
MOV RAX,qword ptr [RBX]
MOV RDI,qword ptr [RAX + -0x18]
ADD RDI,RBX
MOV ESI,0xa
CALL 0x00105370
MOVSX ESI,AL
MOV RDI,RBX
CALL 0x00105040
MOV RDI,RAX
CALL 0x00105280
MOV AL,0x1
JMP 0x0011569c
LAB_0011569a:
XOR EAX,EAX
LAB_0011569c:
POP RBX
POP R14
POP R15
RET
|
/* Ship::hitAt(unsigned long, unsigned long) */
int8 __thiscall Ship::hitAt(Ship *this,ulong param_1,ulong param_2)
{
ulong *puVar1;
int *puVar2;
ulong uVar3;
ostream *poVar4;
ulong uVar5;
if (this[4] == (Ship)0x76) {
if (*(ulong *)(this + 8) == param_1) {
uVar3 = *(ulong *)(this + 0x10);
uVar5 = param_2 - uVar3;
if ((uVar3 <= param_2) && (param_2 < uVar3 + (long)*(int *)this)) goto LAB_001155d2;
}
}
else if ((this[4] == (Ship)0x68) && (*(ulong *)(this + 0x10) == param_2)) {
uVar3 = *(ulong *)(this + 8);
uVar5 = param_1 - uVar3;
if ((uVar3 <= param_1) && (param_1 < uVar3 + (long)*(int *)this)) {
LAB_001155d2:
uVar3 = uVar5 + 0x3f;
if (-1 < (long)uVar5) {
uVar3 = uVar5;
}
puVar1 = (ulong *)(((long)uVar3 >> 6) * 8 + *(long *)(this + 0x18) + -8 +
(ulong)((uVar5 & 0x800000000000003f) < 0x8000000000000001) * 8);
*puVar1 = *puVar1 | 1L << ((byte)uVar5 & 0x3f);
puVar2 = PTR_cout_00124fa0;
std::__ostream_insert<char,std::char_traits<char>>
((ostream *)PTR_cout_00124fa0,"Ship::hitAt(): Hit at(",0x16);
poVar4 = std::ostream::_M_insert<unsigned_long>((ulong)puVar2);
std::__ostream_insert<char,std::char_traits<char>>(poVar4,", ",2);
poVar4 = std::ostream::_M_insert<unsigned_long>((ulong)poVar4);
std::__ostream_insert<char,std::char_traits<char>>(poVar4,").",2);
std::ios::widen((char)*(int8 *)(*(long *)poVar4 + -0x18) + (char)poVar4);
std::ostream::put((char)poVar4);
std::ostream::flush();
return 1;
}
}
return 0;
}
|
|
61,833 |
Ship::hitAt(unsigned long, unsigned long)
|
666mxvbee[P]BattleShip/lib/Ship/Ship.cpp
|
bool Ship::hitAt(uint64_t shotX, uint64_t shotY) {
if (orientation == 'h') {
if (shotY == y && shotX >= x && shotX < x + len) {
hits[ shotX - x ] = true;
std::cout << "Ship::hitAt(): Hit at(" << shotX << ", " << shotY << ")." << std::endl;
return true;
}
} else if (orientation == 'v') {
if (shotX == x && shotY >= y && shotY < y + len) {
hits[ shotY - y ] = true;
std::cout << "Ship::hitAt(): Hit at(" << shotX << ", " << shotY << ")." << std::endl;
return true;
}
}
return false;
}
|
O2
|
cpp
|
Ship::hitAt(unsigned long, unsigned long):
pushq %r14
pushq %rbx
pushq %rax
movq %rdx, %rbx
movq %rsi, %r14
movzbl 0x4(%rdi), %eax
cmpl $0x76, %eax
je 0x13579
cmpl $0x68, %eax
jne 0x135f5
cmpq %rbx, 0x10(%rdi)
jne 0x135f5
movq 0x8(%rdi), %rax
movq %r14, %rsi
subq %rax, %rsi
jb 0x135f5
movslq (%rdi), %rcx
addq %rcx, %rax
cmpq %r14, %rax
ja 0x13596
jmp 0x135f5
cmpq %r14, 0x8(%rdi)
jne 0x135f5
movq 0x10(%rdi), %rax
movq %rbx, %rsi
subq %rax, %rsi
jb 0x135f5
movslq (%rdi), %rcx
addq %rcx, %rax
cmpq %rbx, %rax
jbe 0x135f5
addq $0x18, %rdi
callq 0x136a4
orq %rdx, (%rax)
movq 0x119ef(%rip), %rdi # 0x24f98
leaq 0x4d7d(%rip), %rsi # 0x1832d
callq 0x5360
movq %rax, %rdi
movq %r14, %rsi
callq 0x5270
leaq 0x4d63(%rip), %rsi # 0x1832a
movq %rax, %rdi
callq 0x5360
movq %rax, %rdi
movq %rbx, %rsi
callq 0x5270
leaq 0x4d63(%rip), %rsi # 0x18344
movq %rax, %rdi
callq 0x5360
movq %rax, %rdi
callq 0x5190
movb $0x1, %al
jmp 0x135f7
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
nop
|
_ZN4Ship5hitAtEmm:
push r14
push rbx
push rax
mov rbx, rdx
mov r14, rsi
movzx eax, byte ptr [rdi+4]
cmp eax, 76h ; 'v'
jz short loc_13579
cmp eax, 68h ; 'h'
jnz loc_135F5
cmp [rdi+10h], rbx
jnz loc_135F5
mov rax, [rdi+8]
mov rsi, r14
sub rsi, rax
jb loc_135F5
movsxd rcx, dword ptr [rdi]
add rax, rcx
cmp rax, r14
ja short loc_13596
jmp short loc_135F5
loc_13579:
cmp [rdi+8], r14
jnz short loc_135F5
mov rax, [rdi+10h]
mov rsi, rbx
sub rsi, rax
jb short loc_135F5
movsxd rcx, dword ptr [rdi]
add rax, rcx
cmp rax, rbx
jbe short loc_135F5
loc_13596:
add rdi, 18h
call _ZNSt6vectorIbSaIbEEixEm; std::vector<bool>::operator[](ulong)
or [rax], rdx
mov rdi, cs:_ZSt4cout_ptr
lea rsi, aShipHitatHitAt; "Ship::hitAt(): Hit at("
call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*)
mov rdi, rax
mov rsi, r14
call __ZNSo9_M_insertImEERSoT_; std::ostream::_M_insert<ulong>(ulong)
lea rsi, asc_1832A; ", "
mov rdi, rax
call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*)
mov rdi, rax
mov rsi, rbx
call __ZNSo9_M_insertImEERSoT_; std::ostream::_M_insert<ulong>(ulong)
lea rsi, asc_18344; ")."
mov rdi, rax
call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*)
mov rdi, rax
call __ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_; std::endl<char,std::char_traits<char>>(std::ostream &)
mov al, 1
jmp short loc_135F7
loc_135F5:
xor eax, eax
loc_135F7:
add rsp, 8
pop rbx
pop r14
retn
|
char Ship::hitAt(Ship *this, unsigned long long a2, unsigned long long a3)
{
int v5; // eax
unsigned long long v6; // rax
long long v7; // rsi
unsigned long long v8; // rax
_QWORD *v9; // rax
long long v10; // rdx
long long v11; // rax
long long v12; // rax
long long v13; // rax
long long v14; // rax
long long v15; // rax
v5 = *((unsigned __int8 *)this + 4);
if ( v5 == 118 )
{
if ( *((_QWORD *)this + 1) != a2 )
return 0;
v8 = *((_QWORD *)this + 2);
v7 = a3 - v8;
if ( a3 < v8 || *(int *)this + v8 <= a3 )
return 0;
LABEL_10:
v9 = (_QWORD *)std::vector<bool>::operator[]((char *)this + 24, v7);
*v9 |= v10;
v11 = std::operator<<<std::char_traits<char>>(&std::cout, "Ship::hitAt(): Hit at(");
v12 = std::ostream::_M_insert<unsigned long>(v11, a2);
v13 = std::operator<<<std::char_traits<char>>(v12, ", ");
v14 = std::ostream::_M_insert<unsigned long>(v13, a3);
v15 = std::operator<<<std::char_traits<char>>(v14, ").");
std::endl<char,std::char_traits<char>>(v15);
return 1;
}
if ( v5 == 104 && *((_QWORD *)this + 2) == a3 )
{
v6 = *((_QWORD *)this + 1);
v7 = a2 - v6;
if ( a2 >= v6 && *(int *)this + v6 > a2 )
goto LABEL_10;
}
return 0;
}
|
hitAt:
PUSH R14
PUSH RBX
PUSH RAX
MOV RBX,RDX
MOV R14,RSI
MOVZX EAX,byte ptr [RDI + 0x4]
CMP EAX,0x76
JZ 0x00113579
CMP EAX,0x68
JNZ 0x001135f5
CMP qword ptr [RDI + 0x10],RBX
JNZ 0x001135f5
MOV RAX,qword ptr [RDI + 0x8]
MOV RSI,R14
SUB RSI,RAX
JC 0x001135f5
MOVSXD RCX,dword ptr [RDI]
ADD RAX,RCX
CMP RAX,R14
JA 0x00113596
JMP 0x001135f5
LAB_00113579:
CMP qword ptr [RDI + 0x8],R14
JNZ 0x001135f5
MOV RAX,qword ptr [RDI + 0x10]
MOV RSI,RBX
SUB RSI,RAX
JC 0x001135f5
MOVSXD RCX,dword ptr [RDI]
ADD RAX,RCX
CMP RAX,RBX
JBE 0x001135f5
LAB_00113596:
ADD RDI,0x18
CALL 0x001136a4
OR qword ptr [RAX],RDX
MOV RDI,qword ptr [0x00124f98]
LEA RSI,[0x11832d]
CALL 0x00105360
MOV RDI,RAX
MOV RSI,R14
CALL 0x00105270
LEA RSI,[0x11832a]
MOV RDI,RAX
CALL 0x00105360
MOV RDI,RAX
MOV RSI,RBX
CALL 0x00105270
LEA RSI,[0x118344]
MOV RDI,RAX
CALL 0x00105360
MOV RDI,RAX
CALL 0x00105190
MOV AL,0x1
JMP 0x001135f7
LAB_001135f5:
XOR EAX,EAX
LAB_001135f7:
ADD RSP,0x8
POP RBX
POP R14
RET
|
/* Ship::hitAt(unsigned long, unsigned long) */
int8 __thiscall Ship::hitAt(Ship *this,ulong param_1,ulong param_2)
{
ulong uVar1;
ostream *poVar2;
ulong uVar3;
int1 auVar4 [16];
if (this[4] == (Ship)0x76) {
if (*(ulong *)(this + 8) == param_1) {
uVar1 = *(ulong *)(this + 0x10);
uVar3 = param_2 - uVar1;
if ((uVar1 <= param_2) && (param_2 < uVar1 + (long)*(int *)this)) goto LAB_00113596;
}
}
else if ((this[4] == (Ship)0x68) && (*(ulong *)(this + 0x10) == param_2)) {
uVar1 = *(ulong *)(this + 8);
uVar3 = param_1 - uVar1;
if ((uVar1 <= param_1) && (param_1 < uVar1 + (long)*(int *)this)) {
LAB_00113596:
auVar4 = std::vector<bool,std::allocator<bool>>::operator[]
((vector<bool,std::allocator<bool>> *)(this + 0x18),uVar3);
*auVar4._0_8_ = *auVar4._0_8_ | auVar4._8_8_;
poVar2 = std::operator<<((ostream *)PTR_cout_00124f98,"Ship::hitAt(): Hit at(");
poVar2 = std::ostream::_M_insert<unsigned_long>((ulong)poVar2);
poVar2 = std::operator<<(poVar2,", ");
poVar2 = std::ostream::_M_insert<unsigned_long>((ulong)poVar2);
poVar2 = std::operator<<(poVar2,").");
std::endl<char,std::char_traits<char>>(poVar2);
return 1;
}
}
return 0;
}
|
|
61,834 |
diagnostic_context_print
|
eshkol/src/core/diagnostics/diagnostics.c
|
void diagnostic_context_print(DiagnosticContext* context) {
assert(context != NULL);
const char* reset_color = "\033[0m";
// Print verbosity level in debug mode
if (context->verbosity == VERBOSITY_DEBUG) {
printf("Diagnostic verbosity: DEBUG\n");
}
// Print each diagnostic
for (size_t i = 0; i < context->diagnostics.count; i++) {
const Diagnostic* diagnostic = &context->diagnostics.items[i];
// Skip info messages in normal mode
if (diagnostic->severity == DIAGNOSTIC_INFO && context->verbosity == VERBOSITY_NORMAL) {
continue;
}
// Get severity name and color
const char* severity_name = get_severity_name(diagnostic->severity);
const char* severity_color = get_severity_color(diagnostic->severity);
// Print location
if (diagnostic->location.file) {
printf("%s:%d:%d: ", diagnostic->location.file, diagnostic->location.line, diagnostic->location.column);
}
// Print severity
printf("%s%s%s", severity_color, severity_name, reset_color);
// Print error code
if (diagnostic->code) {
printf("[%s]: ", diagnostic->code);
} else {
printf(": ");
}
// Print message
printf("%s\n", diagnostic->message);
// In debug mode, print additional information about the diagnostic
if (context->verbosity == VERBOSITY_DEBUG) {
printf(" - Severity: %d\n", diagnostic->severity);
printf(" - Location: file=%s, line=%d, column=%d, length=%d\n",
diagnostic->location.file ? diagnostic->location.file : "(null)",
diagnostic->location.line,
diagnostic->location.column,
diagnostic->location.length);
}
}
// Print summary in verbose or debug mode
if (context->verbosity >= VERBOSITY_VERBOSE) {
printf("\nDiagnostic summary:\n");
printf(" - Total messages: %zu\n", context->diagnostics.count);
printf(" - Error messages: %zu\n", context->error_count);
}
}
|
O3
|
c
|
diagnostic_context_print:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
testq %rdi, %rdi
je 0x3e6b
cmpl $0x2, 0x28(%rdi)
movq %rdi, -0x30(%rbp)
jne 0x3cc1
leaq 0x7be2(%rip), %rdi # 0xb89a
callq 0x1050
movq -0x30(%rbp), %rdi
cmpq $0x0, 0x10(%rdi)
je 0x3e15
xorl %r12d, %r12d
xorl %r15d, %r15d
movq 0x8(%rdi), %rbx
movl (%rbx,%r12), %eax
cmpq $0x3, %rax
ja 0x3d37
leaq 0x772d(%rip), %rcx # 0xb414
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
leaq 0x7b71(%rip), %r13 # 0xb866
leaq 0x7b8c(%rip), %r14 # 0xb888
jmpq *%rax
cmpl $0x0, 0x28(%rdi)
leaq 0x7b58(%rip), %r13 # 0xb861
leaq 0x7b72(%rip), %r14 # 0xb882
jne 0x3d45
jmp 0x3e04
leaq 0x7b50(%rip), %r13 # 0xb86e
leaq 0x7b69(%rip), %r14 # 0xb88e
jmp 0x3d45
leaq 0x7b46(%rip), %r13 # 0xb874
leaq 0x7b5f(%rip), %r14 # 0xb894
jmp 0x3d45
leaq 0x7b3c(%rip), %r13 # 0xb87a
leaq 0x791b(%rip), %r14 # 0xb660
movq 0x8(%rbx,%r12), %rsi
testq %rsi, %rsi
je 0x3d67
movl 0x10(%rbx,%r12), %edx
movl 0x14(%rbx,%r12), %ecx
leaq 0x7905(%rip), %rdi # 0xb665
xorl %eax, %eax
callq 0x1090
leaq 0x7902(%rip), %rdi # 0xb670
movq %r14, %rsi
movq %r13, %rdx
leaq 0x78e5(%rip), %rcx # 0xb660
xorl %eax, %eax
callq 0x1090
movq 0x28(%rbx,%r12), %rsi
testq %rsi, %rsi
je 0x3d9c
leaq 0x78e4(%rip), %rdi # 0xb677
xorl %eax, %eax
callq 0x1090
jmp 0x3daa
leaq 0x78d8(%rip), %rdi # 0xb67b
xorl %eax, %eax
callq 0x1090
movq 0x20(%rbx,%r12), %rdi
callq 0x1050
movq -0x30(%rbp), %rdi
cmpl $0x2, 0x28(%rdi)
jne 0x3e04
movl (%rbx,%r12), %esi
leaq 0x78b5(%rip), %rdi # 0xb67e
xorl %eax, %eax
callq 0x1090
movq 0x8(%rbx,%r12), %rsi
testq %rsi, %rsi
leaq 0x78e7(%rip), %rax # 0xb6c6
cmoveq %rax, %rsi
movl 0x10(%rbx,%r12), %edx
movl 0x14(%rbx,%r12), %ecx
movl 0x18(%rbx,%r12), %r8d
leaq 0x7897(%rip), %rdi # 0xb690
xorl %eax, %eax
callq 0x1090
movq -0x30(%rbp), %rdi
incq %r15
addq $0x30, %r12
cmpq 0x10(%rdi), %r15
jb 0x3cd2
cmpl $0x0, 0x28(%rdi)
je 0x3e5c
movq %rdi, %rbx
leaq 0x7a91(%rip), %rdi # 0xb8b6
callq 0x1050
movq 0x10(%rbx), %rsi
leaq 0x7898(%rip), %rdi # 0xb6cd
xorl %eax, %eax
callq 0x1090
movq 0x20(%rbx), %rsi
leaq 0x789f(%rip), %rdi # 0xb6e6
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x1090
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x7633(%rip), %rdi # 0xb4a5
leaq 0x75ab(%rip), %rsi # 0xb424
leaq 0x77ad(%rip), %rcx # 0xb62d
movl $0xa1, %edx
callq 0x10b0
|
diagnostic_context_print:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
push rax
test rdi, rdi
jz loc_3E6B
cmp dword ptr [rdi+28h], 2
mov [rbp+var_30], rdi
jnz short loc_3CC1
lea rdi, aDiagnosticVerb; "Diagnostic verbosity: DEBUG"
call _puts
mov rdi, [rbp+var_30]
loc_3CC1:
cmp qword ptr [rdi+10h], 0
jz loc_3E15
xor r12d, r12d
xor r15d, r15d
loc_3CD2:
mov rbx, [rdi+8]
mov eax, [rbx+r12]
cmp rax, 3; switch 4 cases
ja short def_3CFC; jumptable 0000000000003CFC default case
lea rcx, jpt_3CFC
movsxd rax, ds:(jpt_3CFC - 0B414h)[rcx+rax*4]
add rax, rcx
lea r13, aWarning; "warning"
lea r14, a33m; "\x1B[33m"
jmp rax; switch jump
loc_3CFE:
cmp dword ptr [rdi+28h], 0; jumptable 0000000000003CFC case 0
lea r13, aInfo; "info"
lea r14, a36m; "\x1B[36m"
jnz short loc_3D45; jumptable 0000000000003CFC case 1
jmp loc_3E04
loc_3D17:
lea r13, aError; jumptable 0000000000003CFC case 2
lea r14, a31m; "\x1B[31m"
jmp short loc_3D45; jumptable 0000000000003CFC case 1
loc_3D27:
lea r13, aFatal; jumptable 0000000000003CFC case 3
lea r14, a35m; "\x1B[35m"
jmp short loc_3D45; jumptable 0000000000003CFC case 1
def_3CFC:
lea r13, aUnknown; jumptable 0000000000003CFC default case
lea r14, a0m; "\x1B[0m"
loc_3D45:
mov rsi, [rbx+r12+8]; jumptable 0000000000003CFC case 1
test rsi, rsi
jz short loc_3D67
mov edx, [rbx+r12+10h]
mov ecx, [rbx+r12+14h]
lea rdi, aSDD; "%s:%d:%d: "
xor eax, eax
call _printf
loc_3D67:
lea rdi, aSSS; "%s%s%s"
mov rsi, r14
mov rdx, r13
lea rcx, a0m; "\x1B[0m"
xor eax, eax
call _printf
mov rsi, [rbx+r12+28h]
test rsi, rsi
jz short loc_3D9C
lea rdi, aS; "[%s]: "
xor eax, eax
call _printf
jmp short loc_3DAA
loc_3D9C:
lea rdi, aS+4; ": "
xor eax, eax
call _printf
loc_3DAA:
mov rdi, [rbx+r12+20h]
call _puts
mov rdi, [rbp+var_30]
cmp dword ptr [rdi+28h], 2
jnz short loc_3E04
mov esi, [rbx+r12]
lea rdi, aSeverityD; " - Severity: %d\n"
xor eax, eax
call _printf
mov rsi, [rbx+r12+8]
test rsi, rsi
lea rax, aNull; "(null)"
cmovz rsi, rax
mov edx, [rbx+r12+10h]
mov ecx, [rbx+r12+14h]
mov r8d, [rbx+r12+18h]
lea rdi, aLocationFileSL; " - Location: file=%s, line=%d, column="...
xor eax, eax
call _printf
mov rdi, [rbp+var_30]
loc_3E04:
inc r15
add r12, 30h ; '0'
cmp r15, [rdi+10h]
jb loc_3CD2
loc_3E15:
cmp dword ptr [rdi+28h], 0
jz short loc_3E5C
mov rbx, rdi
lea rdi, aDiagnosticSumm; "\nDiagnostic summary:"
call _puts
mov rsi, [rbx+10h]
lea rdi, aTotalMessagesZ; " - Total messages: %zu\n"
xor eax, eax
call _printf
mov rsi, [rbx+20h]
lea rdi, aErrorMessagesZ; " - Error messages: %zu\n"
xor eax, eax
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
jmp _printf
loc_3E5C:
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_3E6B:
lea rdi, aContextNull; "context != NULL"
lea rsi, aWorkspaceLlm4b_2; "/workspace/llm4binary/github2025/eshkol"...
lea rcx, aVoidDiagnostic_0; "void diagnostic_context_print(Diagnosti"...
mov edx, 0A1h
call ___assert_fail
|
long long diagnostic_context_print(long long a1, const char *a2, long long a3)
{
long long result; // rax
long long v4; // r12
unsigned long long v5; // r15
long long v6; // rbx
const char *v7; // r13
const char *v8; // r14
const char *v9; // rsi
long long v10; // rdx
long long v11; // [rsp+0h] [rbp-30h]
if ( !a1 )
__assert_fail(
"context != NULL",
"/workspace/llm4binary/github2025/eshkol/src/core/diagnostics/diagnostics.c",
161LL,
"void diagnostic_context_print(DiagnosticContext *)");
v11 = a1;
if ( *(_DWORD *)(a1 + 40) == 2 )
result = puts("Diagnostic verbosity: DEBUG", a2, a3);
if ( *(_QWORD *)(a1 + 16) )
{
v4 = 0LL;
v5 = 0LL;
while ( 2 )
{
v6 = *(_QWORD *)(a1 + 8);
result = *(unsigned int *)(v6 + v4);
v7 = "warning";
v8 = "\x1B[33m";
switch ( *(_DWORD *)(v6 + v4) )
{
case 0:
v7 = "info";
v8 = "\x1B[36m";
if ( *(_DWORD *)(a1 + 40) )
goto LABEL_12;
goto LABEL_21;
case 1:
goto LABEL_12;
case 2:
v7 = "error";
v8 = "\x1B[31m";
goto LABEL_12;
case 3:
v7 = "fatal";
v8 = "\x1B[35m";
goto LABEL_12;
default:
v7 = "unknown";
v8 = "\x1B[0m";
LABEL_12:
v9 = *(const char **)(v6 + v4 + 8);
if ( v9 )
printf("%s:%d:%d: ", v9, *(_DWORD *)(v6 + v4 + 16), *(_DWORD *)(v6 + v4 + 20));
printf("%s%s%s", v8, v7, "\x1B[0m");
a2 = *(const char **)(v6 + v4 + 40);
if ( a2 )
printf("[%s]: ", a2);
else
printf(": ");
result = puts(*(_QWORD *)(v6 + v4 + 32), a2, v10);
a1 = v11;
if ( *(_DWORD *)(v11 + 40) == 2 )
{
printf(" - Severity: %d\n", *(_DWORD *)(v6 + v4));
a2 = *(const char **)(v6 + v4 + 8);
if ( !a2 )
a2 = "(null)";
result = printf(
" - Location: file=%s, line=%d, column=%d, length=%d\n",
a2,
*(_DWORD *)(v6 + v4 + 16),
*(_DWORD *)(v6 + v4 + 20),
*(_DWORD *)(v6 + v4 + 24));
a1 = v11;
}
LABEL_21:
++v5;
v4 += 48LL;
if ( v5 >= *(_QWORD *)(a1 + 16) )
break;
continue;
}
break;
}
}
if ( *(_DWORD *)(a1 + 40) )
{
puts("\nDiagnostic summary:", a2, a3);
printf(" - Total messages: %zu\n", *(_QWORD *)(a1 + 16));
return printf(" - Error messages: %zu\n", *(_QWORD *)(a1 + 32));
}
return result;
}
|
diagnostic_context_print:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
PUSH RAX
TEST RDI,RDI
JZ 0x00103e6b
CMP dword ptr [RDI + 0x28],0x2
MOV qword ptr [RBP + -0x30],RDI
JNZ 0x00103cc1
LEA RDI,[0x10b89a]
CALL 0x00101050
MOV RDI,qword ptr [RBP + -0x30]
LAB_00103cc1:
CMP qword ptr [RDI + 0x10],0x0
JZ 0x00103e15
XOR R12D,R12D
XOR R15D,R15D
LAB_00103cd2:
MOV RBX,qword ptr [RDI + 0x8]
MOV EAX,dword ptr [RBX + R12*0x1]
CMP RAX,0x3
JA 0x00103d37
LEA RCX,[0x10b414]
MOVSXD RAX,dword ptr [RCX + RAX*0x4]
ADD RAX,RCX
LEA R13,[0x10b866]
LEA R14,[0x10b888]
switchD:
JMP RAX
caseD_0:
CMP dword ptr [RDI + 0x28],0x0
LEA R13,[0x10b861]
LEA R14,[0x10b882]
JNZ 0x00103d45
JMP 0x00103e04
caseD_2:
LEA R13,[0x10b86e]
LEA R14,[0x10b88e]
JMP 0x00103d45
caseD_3:
LEA R13,[0x10b874]
LEA R14,[0x10b894]
JMP 0x00103d45
default:
LEA R13,[0x10b87a]
LEA R14,[0x10b660]
caseD_1:
MOV RSI,qword ptr [RBX + R12*0x1 + 0x8]
TEST RSI,RSI
JZ 0x00103d67
MOV EDX,dword ptr [RBX + R12*0x1 + 0x10]
MOV ECX,dword ptr [RBX + R12*0x1 + 0x14]
LEA RDI,[0x10b665]
XOR EAX,EAX
CALL 0x00101090
LAB_00103d67:
LEA RDI,[0x10b670]
MOV RSI,R14
MOV RDX,R13
LEA RCX,[0x10b660]
XOR EAX,EAX
CALL 0x00101090
MOV RSI,qword ptr [RBX + R12*0x1 + 0x28]
TEST RSI,RSI
JZ 0x00103d9c
LEA RDI,[0x10b677]
XOR EAX,EAX
CALL 0x00101090
JMP 0x00103daa
LAB_00103d9c:
LEA RDI,[0x10b67b]
XOR EAX,EAX
CALL 0x00101090
LAB_00103daa:
MOV RDI,qword ptr [RBX + R12*0x1 + 0x20]
CALL 0x00101050
MOV RDI,qword ptr [RBP + -0x30]
CMP dword ptr [RDI + 0x28],0x2
JNZ 0x00103e04
MOV ESI,dword ptr [RBX + R12*0x1]
LEA RDI,[0x10b67e]
XOR EAX,EAX
CALL 0x00101090
MOV RSI,qword ptr [RBX + R12*0x1 + 0x8]
TEST RSI,RSI
LEA RAX,[0x10b6c6]
CMOVZ RSI,RAX
MOV EDX,dword ptr [RBX + R12*0x1 + 0x10]
MOV ECX,dword ptr [RBX + R12*0x1 + 0x14]
MOV R8D,dword ptr [RBX + R12*0x1 + 0x18]
LEA RDI,[0x10b690]
XOR EAX,EAX
CALL 0x00101090
MOV RDI,qword ptr [RBP + -0x30]
LAB_00103e04:
INC R15
ADD R12,0x30
CMP R15,qword ptr [RDI + 0x10]
JC 0x00103cd2
LAB_00103e15:
CMP dword ptr [RDI + 0x28],0x0
JZ 0x00103e5c
MOV RBX,RDI
LEA RDI,[0x10b8b6]
CALL 0x00101050
MOV RSI,qword ptr [RBX + 0x10]
LEA RDI,[0x10b6cd]
XOR EAX,EAX
CALL 0x00101090
MOV RSI,qword ptr [RBX + 0x20]
LEA RDI,[0x10b6e6]
XOR EAX,EAX
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
JMP 0x00101090
LAB_00103e5c:
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_00103e6b:
LEA RDI,[0x10b4a5]
LEA RSI,[0x10b424]
LEA RCX,[0x10b62d]
MOV EDX,0xa1
CALL 0x001010b0
|
void diagnostic_context_print(long param_1)
{
long lVar1;
long lVar2;
long lVar3;
char *pcVar4;
int *puVar5;
ulong uVar6;
if (param_1 == 0) {
/* WARNING: Subroutine does not return */
__assert_fail("context != NULL",
"/workspace/llm4binary/github2025/eshkol/src/core/diagnostics/diagnostics.c",0xa1,
"void diagnostic_context_print(DiagnosticContext *)");
}
if (*(int *)(param_1 + 0x28) == 2) {
puts("Diagnostic verbosity: DEBUG");
}
if (*(long *)(param_1 + 0x10) != 0) {
lVar3 = 0;
uVar6 = 0;
do {
lVar1 = *(long *)(param_1 + 8);
pcVar4 = "warning";
puVar5 = &DAT_0010b888;
switch(*(int4 *)(lVar1 + lVar3)) {
case 0:
pcVar4 = "info";
puVar5 = &DAT_0010b882;
if (*(int *)(param_1 + 0x28) != 0) break;
goto LAB_00103e04;
case 1:
break;
case 2:
pcVar4 = "error";
puVar5 = &DAT_0010b88e;
break;
case 3:
pcVar4 = "fatal";
puVar5 = &DAT_0010b894;
break;
default:
pcVar4 = "unknown";
puVar5 = &DAT_0010b660;
}
lVar2 = *(long *)(lVar1 + 8 + lVar3);
if (lVar2 != 0) {
printf("%s:%d:%d: ",lVar2,(ulong)*(uint *)(lVar1 + 0x10 + lVar3),
(ulong)*(uint *)(lVar1 + 0x14 + lVar3));
}
printf("%s%s%s",puVar5,pcVar4,&DAT_0010b660);
if (*(long *)(lVar1 + 0x28 + lVar3) == 0) {
printf(": ");
}
else {
printf("[%s]: ");
}
puts(*(char **)(lVar1 + 0x20 + lVar3));
if (*(int *)(param_1 + 0x28) == 2) {
printf(" - Severity: %d\n",(ulong)*(uint *)(lVar1 + lVar3));
pcVar4 = *(char **)(lVar1 + 8 + lVar3);
if (pcVar4 == (char *)0x0) {
pcVar4 = "(null)";
}
printf(" - Location: file=%s, line=%d, column=%d, length=%d\n",pcVar4,
(ulong)*(uint *)(lVar1 + 0x10 + lVar3),(ulong)*(uint *)(lVar1 + 0x14 + lVar3),
(ulong)*(uint *)(lVar1 + 0x18 + lVar3));
}
LAB_00103e04:
uVar6 = uVar6 + 1;
lVar3 = lVar3 + 0x30;
} while (uVar6 < *(ulong *)(param_1 + 0x10));
}
if (*(int *)(param_1 + 0x28) == 0) {
return;
}
puts("\nDiagnostic summary:");
printf(" - Total messages: %zu\n",*(int8 *)(param_1 + 0x10));
printf(" - Error messages: %zu\n",*(int8 *)(param_1 + 0x20));
return;
}
|
|
61,835 |
ma_log_key_middle
|
eloqsql/storage/maria/ma_write.c
|
static my_bool _ma_log_key_middle(MARIA_PAGE *ma_page,
uint new_length,
uint data_added_first,
uint data_changed_first,
uint data_deleted_last,
const uchar *key_pos,
uint key_length, int move_length)
{
LSN lsn;
uchar log_data[FILEID_STORE_SIZE + PAGE_STORE_SIZE + 2 + 2 + 3+5+3+3+3 + 7];
uchar *log_pos;
LEX_CUSTRING log_array[TRANSLOG_INTERNAL_PARTS + 6];
uint key_offset;
uint translog_parts, extra_length;
MARIA_HA *info= ma_page->info;
my_off_t page= ma_page->pos / info->s->block_size;
DBUG_ENTER("_ma_log_key_middle");
DBUG_PRINT("enter", ("page: %lu", (ulong) page));
DBUG_ASSERT(ma_page->size == new_length);
/* new place of key after changes */
key_pos+= data_added_first;
key_offset= (uint) (key_pos - ma_page->buff);
if (key_offset < new_length)
{
/* key is on page; Calculate how much of the key is there */
uint max_key_length= new_length - key_offset;
if (max_key_length < key_length)
{
/* Key is last on page */
key_length= max_key_length;
move_length= 0;
}
/*
Take into account that new data was added as part of original key
that also needs to be removed from page
*/
data_deleted_last+= move_length;
}
/* First log changes to page */
log_pos= log_data + FILEID_STORE_SIZE;
page_store(log_pos, page);
log_pos+= PAGE_STORE_SIZE;
#ifdef EXTRA_DEBUG_KEY_CHANGES
*log_pos++= KEY_OP_DEBUG;
*log_pos++= KEY_OP_DEBUG_LOG_MIDDLE;
#endif
/* Store keypage_flag */
*log_pos++= KEY_OP_SET_PAGEFLAG;
*log_pos++= _ma_get_keypage_flag(info->s, ma_page->buff);
log_pos[0]= KEY_OP_DEL_SUFFIX;
int2store(log_pos+1, data_deleted_last);
log_pos+= 3;
log_pos[0]= KEY_OP_ADD_PREFIX;
int2store(log_pos+1, data_added_first);
int2store(log_pos+3, data_changed_first);
log_pos+= 5;
log_array[TRANSLOG_INTERNAL_PARTS + 0].str= log_data;
log_array[TRANSLOG_INTERNAL_PARTS + 0].length= (uint) (log_pos -
log_data);
log_array[TRANSLOG_INTERNAL_PARTS + 1].str= (ma_page->buff +
info->s->keypage_header);
log_array[TRANSLOG_INTERNAL_PARTS + 1].length= data_changed_first;
translog_parts= 2;
extra_length= data_changed_first;
/* If changed key is on page, log those changes too */
if (key_offset < new_length)
{
uchar *start_log_pos= log_pos;
log_pos[0]= KEY_OP_OFFSET;
int2store(log_pos+1, key_offset);
log_pos+= 3;
if (move_length)
{
log_pos[0]= KEY_OP_SHIFT;
int2store(log_pos+1, move_length);
log_pos+= 3;
}
log_pos[0]= KEY_OP_CHANGE;
int2store(log_pos+1, key_length);
log_pos+= 3;
log_array[TRANSLOG_INTERNAL_PARTS + 2].str= start_log_pos;
log_array[TRANSLOG_INTERNAL_PARTS + 2].length= (uint) (log_pos -
start_log_pos);
log_array[TRANSLOG_INTERNAL_PARTS + 3].str= key_pos;
log_array[TRANSLOG_INTERNAL_PARTS + 3].length= key_length;
translog_parts+=2;
extra_length+= (uint) (log_array[TRANSLOG_INTERNAL_PARTS + 2].length +
key_length);
}
_ma_log_key_changes(ma_page,
log_array + TRANSLOG_INTERNAL_PARTS + translog_parts,
log_pos, &extra_length, &translog_parts);
/* Remember new page length for future log entires for same page */
ma_page->org_size= ma_page->size;
DBUG_RETURN(translog_write_record(&lsn, LOGREC_REDO_INDEX,
info->trn, info,
(translog_size_t)
(log_array[TRANSLOG_INTERNAL_PARTS +
0].length + extra_length),
TRANSLOG_INTERNAL_PARTS + translog_parts,
log_array, log_data, NULL));
}
|
O0
|
c
|
ma_log_key_middle:
pushq %rbp
movq %rsp, %rbp
subq $0x170, %rsp # imm = 0x170
movl 0x18(%rbp), %eax
movl 0x10(%rbp), %eax
movq %fs:0x28, %rax
movq %rax, -0x8(%rbp)
movq %rdi, -0x38(%rbp)
movl %esi, -0x3c(%rbp)
movl %edx, -0x40(%rbp)
movl %ecx, -0x44(%rbp)
movl %r8d, -0x48(%rbp)
movq %r9, -0x50(%rbp)
movq -0x38(%rbp), %rax
movq (%rax), %rax
movq %rax, -0xf8(%rbp)
movq -0x38(%rbp), %rax
movq 0x18(%rax), %rax
movq -0xf8(%rbp), %rcx
movq (%rcx), %rcx
movl 0x7bc(%rcx), %ecx
xorl %edx, %edx
divq %rcx
movq %rax, -0x100(%rbp)
jmp 0x88267
jmp 0x88269
jmp 0x8826b
movl -0x40(%rbp), %ecx
movq -0x50(%rbp), %rax
movl %ecx, %ecx
addq %rcx, %rax
movq %rax, -0x50(%rbp)
movq -0x50(%rbp), %rax
movq -0x38(%rbp), %rcx
movq 0x10(%rcx), %rcx
subq %rcx, %rax
movl %eax, -0xe4(%rbp)
movl -0xe4(%rbp), %eax
cmpl -0x3c(%rbp), %eax
jae 0x882ce
movl -0x3c(%rbp), %eax
subl -0xe4(%rbp), %eax
movl %eax, -0x104(%rbp)
movl -0x104(%rbp), %eax
cmpl 0x10(%rbp), %eax
jae 0x882c5
movl -0x104(%rbp), %eax
movl %eax, 0x10(%rbp)
movl $0x0, 0x18(%rbp)
movl 0x18(%rbp), %eax
addl -0x48(%rbp), %eax
movl %eax, -0x48(%rbp)
leaq -0x30(%rbp), %rax
addq $0x2, %rax
movq %rax, -0x60(%rbp)
movq -0x60(%rbp), %rax
movq %rax, -0x110(%rbp)
movq -0x100(%rbp), %rax
movl %eax, %ecx
movq -0x110(%rbp), %rax
movl %ecx, (%rax)
movq -0x100(%rbp), %rax
shrq $0x20, %rax
movb %al, %cl
movq -0x110(%rbp), %rax
movb %cl, 0x4(%rax)
movq -0x60(%rbp), %rax
addq $0x5, %rax
movq %rax, -0x60(%rbp)
movq -0x60(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x60(%rbp)
movb $0xa, (%rax)
movq -0x38(%rbp), %rax
movq 0x10(%rax), %rax
movq -0xf8(%rbp), %rcx
movq (%rcx), %rcx
movl 0x744(%rcx), %ecx
subl $0x2, %ecx
subl $0x1, %ecx
movl %ecx, %ecx
movb (%rax,%rcx), %cl
movq -0x60(%rbp), %rax
movq %rax, %rdx
addq $0x1, %rdx
movq %rdx, -0x60(%rbp)
movb %cl, (%rax)
movq -0x60(%rbp), %rax
movb $0x7, (%rax)
movq -0x60(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x118(%rbp)
movl -0x48(%rbp), %eax
movw %ax, %cx
movq -0x118(%rbp), %rax
movw %cx, (%rax)
movq -0x60(%rbp), %rax
addq $0x3, %rax
movq %rax, -0x60(%rbp)
movq -0x60(%rbp), %rax
movb $0x4, (%rax)
movq -0x60(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x120(%rbp)
movl -0x40(%rbp), %eax
movw %ax, %cx
movq -0x120(%rbp), %rax
movw %cx, (%rax)
jmp 0x883ba
movq -0x60(%rbp), %rax
addq $0x3, %rax
movq %rax, -0x128(%rbp)
movl -0x44(%rbp), %eax
movw %ax, %cx
movq -0x128(%rbp), %rax
movw %cx, (%rax)
movq -0x60(%rbp), %rax
addq $0x5, %rax
movq %rax, -0x60(%rbp)
leaq -0x30(%rbp), %rax
movq %rax, -0xc0(%rbp)
movq -0x60(%rbp), %rax
leaq -0x30(%rbp), %rcx
subq %rcx, %rax
movl %eax, %eax
movq %rax, -0xb8(%rbp)
movq -0x38(%rbp), %rax
movq 0x10(%rax), %rax
movq -0xf8(%rbp), %rcx
movq (%rcx), %rcx
movl 0x744(%rcx), %ecx
addq %rcx, %rax
movq %rax, -0xb0(%rbp)
movl -0x44(%rbp), %eax
movq %rax, -0xa8(%rbp)
movl $0x2, -0xe8(%rbp)
movl -0x44(%rbp), %eax
movl %eax, -0xec(%rbp)
movl -0xe4(%rbp), %eax
cmpl -0x3c(%rbp), %eax
jae 0x8855e
movq -0x60(%rbp), %rax
movq %rax, -0x130(%rbp)
movq -0x60(%rbp), %rax
movb $0x1, (%rax)
movq -0x60(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x138(%rbp)
movl -0xe4(%rbp), %eax
movw %ax, %cx
movq -0x138(%rbp), %rax
movw %cx, (%rax)
movq -0x60(%rbp), %rax
addq $0x3, %rax
movq %rax, -0x60(%rbp)
cmpl $0x0, 0x18(%rbp)
je 0x884ca
movq -0x60(%rbp), %rax
movb $0x2, (%rax)
movq -0x60(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x140(%rbp)
movl 0x18(%rbp), %eax
movw %ax, %cx
movq -0x140(%rbp), %rax
movw %cx, (%rax)
movq -0x60(%rbp), %rax
addq $0x3, %rax
movq %rax, -0x60(%rbp)
movq -0x60(%rbp), %rax
movb $0x3, (%rax)
movq -0x60(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x148(%rbp)
movl 0x10(%rbp), %eax
movw %ax, %cx
movq -0x148(%rbp), %rax
movw %cx, (%rax)
movq -0x60(%rbp), %rax
addq $0x3, %rax
movq %rax, -0x60(%rbp)
movq -0x130(%rbp), %rax
movq %rax, -0xa0(%rbp)
movq -0x60(%rbp), %rax
movq -0x130(%rbp), %rcx
subq %rcx, %rax
movl %eax, %eax
movq %rax, -0x98(%rbp)
movq -0x50(%rbp), %rax
movq %rax, -0x90(%rbp)
movl 0x10(%rbp), %eax
movq %rax, -0x88(%rbp)
movl -0xe8(%rbp), %eax
addl $0x2, %eax
movl %eax, -0xe8(%rbp)
movq -0x98(%rbp), %rax
movl 0x10(%rbp), %ecx
addq %rcx, %rax
addl -0xec(%rbp), %eax
movl %eax, -0xec(%rbp)
movq -0x38(%rbp), %rax
movl 0x20(%rax), %ecx
movq -0x38(%rbp), %rax
movl %ecx, 0x24(%rax)
movq -0xf8(%rbp), %rax
movq 0x8(%rax), %rdx
movq -0xf8(%rbp), %rcx
movq -0xb8(%rbp), %rax
movl -0xec(%rbp), %esi
addq %rsi, %rax
movl %eax, %r8d
movl -0xe8(%rbp), %r9d
addl $0x2, %r9d
leaq -0xe0(%rbp), %r10
leaq -0x30(%rbp), %rax
leaq -0x58(%rbp), %rdi
movl $0xc, %esi
xorl %r11d, %r11d
movq %r10, (%rsp)
movq %rax, 0x8(%rsp)
movq $0x0, 0x10(%rsp)
callq 0x4f4f0
movb %al, -0x149(%rbp)
movq %fs:0x28, %rax
movq -0x8(%rbp), %rcx
cmpq %rcx, %rax
jne 0x885f1
movb -0x149(%rbp), %al
addq $0x170, %rsp # imm = 0x170
popq %rbp
retq
callq 0x2a270
nopw %cs:(%rax,%rax)
|
_ma_log_key_middle:
push rbp
mov rbp, rsp
sub rsp, 170h
mov eax, [rbp+arg_8]
mov eax, [rbp+arg_0]
mov rax, fs:28h
mov [rbp+var_8], rax
mov [rbp+var_38], rdi
mov [rbp+var_3C], esi
mov [rbp+var_40], edx
mov [rbp+var_44], ecx
mov [rbp+var_48], r8d
mov [rbp+var_50], r9
mov rax, [rbp+var_38]
mov rax, [rax]
mov [rbp+var_F8], rax
mov rax, [rbp+var_38]
mov rax, [rax+18h]
mov rcx, [rbp+var_F8]
mov rcx, [rcx]
mov ecx, [rcx+7BCh]
xor edx, edx
div rcx
mov [rbp+var_100], rax
jmp short $+2
loc_88267:
jmp short $+2
loc_88269:
jmp short $+2
loc_8826B:
mov ecx, [rbp+var_40]
mov rax, [rbp+var_50]
mov ecx, ecx
add rax, rcx
mov [rbp+var_50], rax
mov rax, [rbp+var_50]
mov rcx, [rbp+var_38]
mov rcx, [rcx+10h]
sub rax, rcx
mov [rbp+var_E4], eax
mov eax, [rbp+var_E4]
cmp eax, [rbp+var_3C]
jnb short loc_882CE
mov eax, [rbp+var_3C]
sub eax, [rbp+var_E4]
mov [rbp+var_104], eax
mov eax, [rbp+var_104]
cmp eax, [rbp+arg_0]
jnb short loc_882C5
mov eax, [rbp+var_104]
mov [rbp+arg_0], eax
mov [rbp+arg_8], 0
loc_882C5:
mov eax, [rbp+arg_8]
add eax, [rbp+var_48]
mov [rbp+var_48], eax
loc_882CE:
lea rax, [rbp+var_30]
add rax, 2
mov [rbp+var_60], rax
mov rax, [rbp+var_60]
mov [rbp+var_110], rax
mov rax, [rbp+var_100]
mov ecx, eax
mov rax, [rbp+var_110]
mov [rax], ecx
mov rax, [rbp+var_100]
shr rax, 20h
mov cl, al
mov rax, [rbp+var_110]
mov [rax+4], cl
mov rax, [rbp+var_60]
add rax, 5
mov [rbp+var_60], rax
mov rax, [rbp+var_60]
mov rcx, rax
add rcx, 1
mov [rbp+var_60], rcx
mov byte ptr [rax], 0Ah
mov rax, [rbp+var_38]
mov rax, [rax+10h]
mov rcx, [rbp+var_F8]
mov rcx, [rcx]
mov ecx, [rcx+744h]
sub ecx, 2
sub ecx, 1
mov ecx, ecx
mov cl, [rax+rcx]
mov rax, [rbp+var_60]
mov rdx, rax
add rdx, 1
mov [rbp+var_60], rdx
mov [rax], cl
mov rax, [rbp+var_60]
mov byte ptr [rax], 7
mov rax, [rbp+var_60]
add rax, 1
mov [rbp+var_118], rax
mov eax, [rbp+var_48]
mov cx, ax
mov rax, [rbp+var_118]
mov [rax], cx
mov rax, [rbp+var_60]
add rax, 3
mov [rbp+var_60], rax
mov rax, [rbp+var_60]
mov byte ptr [rax], 4
mov rax, [rbp+var_60]
add rax, 1
mov [rbp+var_120], rax
mov eax, [rbp+var_40]
mov cx, ax
mov rax, [rbp+var_120]
mov [rax], cx
jmp short $+2
loc_883BA:
mov rax, [rbp+var_60]
add rax, 3
mov [rbp+var_128], rax
mov eax, [rbp+var_44]
mov cx, ax
mov rax, [rbp+var_128]
mov [rax], cx
mov rax, [rbp+var_60]
add rax, 5
mov [rbp+var_60], rax
lea rax, [rbp+var_30]
mov [rbp+var_C0], rax
mov rax, [rbp+var_60]
lea rcx, [rbp+var_30]
sub rax, rcx
mov eax, eax
mov [rbp+var_B8], rax
mov rax, [rbp+var_38]
mov rax, [rax+10h]
mov rcx, [rbp+var_F8]
mov rcx, [rcx]
mov ecx, [rcx+744h]
add rax, rcx
mov [rbp+var_B0], rax
mov eax, [rbp+var_44]
mov [rbp+var_A8], rax
mov [rbp+var_E8], 2
mov eax, [rbp+var_44]
mov [rbp+var_EC], eax
mov eax, [rbp+var_E4]
cmp eax, [rbp+var_3C]
jnb loc_8855E
mov rax, [rbp+var_60]
mov [rbp+var_130], rax
mov rax, [rbp+var_60]
mov byte ptr [rax], 1
mov rax, [rbp+var_60]
add rax, 1
mov [rbp+var_138], rax
mov eax, [rbp+var_E4]
mov cx, ax
mov rax, [rbp+var_138]
mov [rax], cx
mov rax, [rbp+var_60]
add rax, 3
mov [rbp+var_60], rax
cmp [rbp+arg_8], 0
jz short loc_884CA
mov rax, [rbp+var_60]
mov byte ptr [rax], 2
mov rax, [rbp+var_60]
add rax, 1
mov [rbp+var_140], rax
mov eax, [rbp+arg_8]
mov cx, ax
mov rax, [rbp+var_140]
mov [rax], cx
mov rax, [rbp+var_60]
add rax, 3
mov [rbp+var_60], rax
loc_884CA:
mov rax, [rbp+var_60]
mov byte ptr [rax], 3
mov rax, [rbp+var_60]
add rax, 1
mov [rbp+var_148], rax
mov eax, [rbp+arg_0]
mov cx, ax
mov rax, [rbp+var_148]
mov [rax], cx
mov rax, [rbp+var_60]
add rax, 3
mov [rbp+var_60], rax
mov rax, [rbp+var_130]
mov [rbp+var_A0], rax
mov rax, [rbp+var_60]
mov rcx, [rbp+var_130]
sub rax, rcx
mov eax, eax
mov [rbp+var_98], rax
mov rax, [rbp+var_50]
mov [rbp+var_90], rax
mov eax, [rbp+arg_0]
mov [rbp+var_88], rax
mov eax, [rbp+var_E8]
add eax, 2
mov [rbp+var_E8], eax
mov rax, [rbp+var_98]
mov ecx, [rbp+arg_0]
add rax, rcx
add eax, [rbp+var_EC]
mov [rbp+var_EC], eax
loc_8855E:
mov rax, [rbp+var_38]
mov ecx, [rax+20h]
mov rax, [rbp+var_38]
mov [rax+24h], ecx
mov rax, [rbp+var_F8]
mov rdx, [rax+8]
mov rcx, [rbp+var_F8]
mov rax, [rbp+var_B8]
mov esi, [rbp+var_EC]
add rax, rsi
mov r8d, eax
mov r9d, [rbp+var_E8]
add r9d, 2
lea r10, [rbp+var_E0]
lea rax, [rbp+var_30]
lea rdi, [rbp+var_58]
mov esi, 0Ch
xor r11d, r11d
mov [rsp+170h+var_170], r10
mov [rsp+170h+var_168], rax
mov [rsp+170h+var_160], 0
call translog_write_record
mov [rbp+var_149], al
mov rax, fs:28h
mov rcx, [rbp+var_8]
cmp rax, rcx
jnz short loc_885F1
mov al, [rbp+var_149]
add rsp, 170h
pop rbp
retn
loc_885F1:
call ___stack_chk_fail
|
char ma_log_key_middle(
long long **a1,
unsigned int a2,
unsigned int a3,
unsigned int a4,
int a5,
long long a6,
unsigned int a7,
int a8)
{
_BYTE *v9; // [rsp+40h] [rbp-130h]
unsigned long long v10; // [rsp+70h] [rbp-100h]
long long *v11; // [rsp+78h] [rbp-F8h]
unsigned int v12; // [rsp+84h] [rbp-ECh]
int v13; // [rsp+88h] [rbp-E8h]
unsigned int v14; // [rsp+8Ch] [rbp-E4h]
_QWORD v15[5]; // [rsp+90h] [rbp-E0h] BYREF
long long v16; // [rsp+B8h] [rbp-B8h]
char *v17; // [rsp+C0h] [rbp-B0h]
long long v18; // [rsp+C8h] [rbp-A8h]
_BYTE *v19; // [rsp+D0h] [rbp-A0h]
long long v20; // [rsp+D8h] [rbp-98h]
long long v21; // [rsp+E0h] [rbp-90h]
long long v22; // [rsp+E8h] [rbp-88h]
_BYTE *v23; // [rsp+110h] [rbp-60h]
char v24[8]; // [rsp+118h] [rbp-58h] BYREF
long long v25; // [rsp+120h] [rbp-50h]
int v26; // [rsp+128h] [rbp-48h]
unsigned int v27; // [rsp+12Ch] [rbp-44h]
unsigned int v28; // [rsp+130h] [rbp-40h]
unsigned int v29; // [rsp+134h] [rbp-3Ch]
long long **v30; // [rsp+138h] [rbp-38h]
__int16 v31; // [rsp+140h] [rbp-30h] BYREF
int v32; // [rsp+142h] [rbp-2Eh]
char v33; // [rsp+146h] [rbp-2Ah]
char v34; // [rsp+147h] [rbp-29h]
_BYTE v35[2]; // [rsp+148h] [rbp-28h] BYREF
__int16 v36; // [rsp+14Ah] [rbp-26h]
char v37; // [rsp+14Ch] [rbp-24h]
__int16 v38; // [rsp+14Dh] [rbp-23h]
__int16 v39; // [rsp+14Fh] [rbp-21h]
_BYTE v40[31]; // [rsp+151h] [rbp-1Fh] BYREF
long long savedregs; // [rsp+170h] [rbp+0h] BYREF
*(_QWORD *)&v40[23] = __readfsqword(0x28u);
v30 = a1;
v29 = a2;
v28 = a3;
v27 = a4;
v26 = a5;
v25 = a6;
v11 = *a1;
v10 = (unsigned long long)a1[3] / *(unsigned int *)(**a1 + 1980);
v25 = a3 + a6;
v14 = v25 - (unsigned int)a1[2];
if ( v14 < a2 )
{
if ( v29 - v14 < a7 )
{
a7 = v29 - v14;
a8 = 0;
}
v26 += a8;
}
v32 = v10;
v33 = BYTE4(v10);
v23 = v35;
v34 = 10;
v35[0] = *((_BYTE *)v30[2] + (unsigned int)(*(_DWORD *)(*v11 + 1860) - 3));
v35[1] = 7;
v36 = v26;
v37 = 4;
v38 = v28;
v39 = v27;
v23 = v40;
v15[4] = &v31;
v16 = (unsigned int)v40 - ((unsigned int)&savedregs - 48);
v17 = (char *)v30[2] + *(unsigned int *)(*v11 + 1860);
v18 = v27;
v13 = 2;
v12 = v27;
if ( v14 < v29 )
{
v9 = v23;
*v23 = 1;
*(_WORD *)(v23 + 1) = v14;
v23 += 3;
if ( a8 )
{
*v23 = 2;
*(_WORD *)(v23 + 1) = a8;
v23 += 3;
}
*v23 = 3;
*(_WORD *)(v23 + 1) = a7;
v23 += 3;
v19 = v9;
v20 = (unsigned int)((_DWORD)v23 - (_DWORD)v9);
v21 = v25;
v22 = a7;
v13 = 4;
v12 += a7 + (_DWORD)v23 - (_DWORD)v9;
}
*((_DWORD *)v30 + 9) = *((_DWORD *)v30 + 8);
return translog_write_record((long long)v24, 0xCu, v11[1], v11, v12 + v16, v13 + 2, v15, &v31, 0LL);
}
|
_ma_log_key_middle:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x170
MOV EAX,dword ptr [RBP + 0x18]
MOV EAX,dword ptr [RBP + 0x10]
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x8],RAX
MOV qword ptr [RBP + -0x38],RDI
MOV dword ptr [RBP + -0x3c],ESI
MOV dword ptr [RBP + -0x40],EDX
MOV dword ptr [RBP + -0x44],ECX
MOV dword ptr [RBP + -0x48],R8D
MOV qword ptr [RBP + -0x50],R9
MOV RAX,qword ptr [RBP + -0x38]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0xf8],RAX
MOV RAX,qword ptr [RBP + -0x38]
MOV RAX,qword ptr [RAX + 0x18]
MOV RCX,qword ptr [RBP + -0xf8]
MOV RCX,qword ptr [RCX]
MOV ECX,dword ptr [RCX + 0x7bc]
XOR EDX,EDX
DIV RCX
MOV qword ptr [RBP + -0x100],RAX
JMP 0x00188267
LAB_00188267:
JMP 0x00188269
LAB_00188269:
JMP 0x0018826b
LAB_0018826b:
MOV ECX,dword ptr [RBP + -0x40]
MOV RAX,qword ptr [RBP + -0x50]
MOV ECX,ECX
ADD RAX,RCX
MOV qword ptr [RBP + -0x50],RAX
MOV RAX,qword ptr [RBP + -0x50]
MOV RCX,qword ptr [RBP + -0x38]
MOV RCX,qword ptr [RCX + 0x10]
SUB RAX,RCX
MOV dword ptr [RBP + -0xe4],EAX
MOV EAX,dword ptr [RBP + -0xe4]
CMP EAX,dword ptr [RBP + -0x3c]
JNC 0x001882ce
MOV EAX,dword ptr [RBP + -0x3c]
SUB EAX,dword ptr [RBP + -0xe4]
MOV dword ptr [RBP + -0x104],EAX
MOV EAX,dword ptr [RBP + -0x104]
CMP EAX,dword ptr [RBP + 0x10]
JNC 0x001882c5
MOV EAX,dword ptr [RBP + -0x104]
MOV dword ptr [RBP + 0x10],EAX
MOV dword ptr [RBP + 0x18],0x0
LAB_001882c5:
MOV EAX,dword ptr [RBP + 0x18]
ADD EAX,dword ptr [RBP + -0x48]
MOV dword ptr [RBP + -0x48],EAX
LAB_001882ce:
LEA RAX,[RBP + -0x30]
ADD RAX,0x2
MOV qword ptr [RBP + -0x60],RAX
MOV RAX,qword ptr [RBP + -0x60]
MOV qword ptr [RBP + -0x110],RAX
MOV RAX,qword ptr [RBP + -0x100]
MOV ECX,EAX
MOV RAX,qword ptr [RBP + -0x110]
MOV dword ptr [RAX],ECX
MOV RAX,qword ptr [RBP + -0x100]
SHR RAX,0x20
MOV CL,AL
MOV RAX,qword ptr [RBP + -0x110]
MOV byte ptr [RAX + 0x4],CL
MOV RAX,qword ptr [RBP + -0x60]
ADD RAX,0x5
MOV qword ptr [RBP + -0x60],RAX
MOV RAX,qword ptr [RBP + -0x60]
MOV RCX,RAX
ADD RCX,0x1
MOV qword ptr [RBP + -0x60],RCX
MOV byte ptr [RAX],0xa
MOV RAX,qword ptr [RBP + -0x38]
MOV RAX,qword ptr [RAX + 0x10]
MOV RCX,qword ptr [RBP + -0xf8]
MOV RCX,qword ptr [RCX]
MOV ECX,dword ptr [RCX + 0x744]
SUB ECX,0x2
SUB ECX,0x1
MOV ECX,ECX
MOV CL,byte ptr [RAX + RCX*0x1]
MOV RAX,qword ptr [RBP + -0x60]
MOV RDX,RAX
ADD RDX,0x1
MOV qword ptr [RBP + -0x60],RDX
MOV byte ptr [RAX],CL
MOV RAX,qword ptr [RBP + -0x60]
MOV byte ptr [RAX],0x7
MOV RAX,qword ptr [RBP + -0x60]
ADD RAX,0x1
MOV qword ptr [RBP + -0x118],RAX
MOV EAX,dword ptr [RBP + -0x48]
MOV CX,AX
MOV RAX,qword ptr [RBP + -0x118]
MOV word ptr [RAX],CX
MOV RAX,qword ptr [RBP + -0x60]
ADD RAX,0x3
MOV qword ptr [RBP + -0x60],RAX
MOV RAX,qword ptr [RBP + -0x60]
MOV byte ptr [RAX],0x4
MOV RAX,qword ptr [RBP + -0x60]
ADD RAX,0x1
MOV qword ptr [RBP + -0x120],RAX
MOV EAX,dword ptr [RBP + -0x40]
MOV CX,AX
MOV RAX,qword ptr [RBP + -0x120]
MOV word ptr [RAX],CX
JMP 0x001883ba
LAB_001883ba:
MOV RAX,qword ptr [RBP + -0x60]
ADD RAX,0x3
MOV qword ptr [RBP + -0x128],RAX
MOV EAX,dword ptr [RBP + -0x44]
MOV CX,AX
MOV RAX,qword ptr [RBP + -0x128]
MOV word ptr [RAX],CX
MOV RAX,qword ptr [RBP + -0x60]
ADD RAX,0x5
MOV qword ptr [RBP + -0x60],RAX
LEA RAX,[RBP + -0x30]
MOV qword ptr [RBP + -0xc0],RAX
MOV RAX,qword ptr [RBP + -0x60]
LEA RCX,[RBP + -0x30]
SUB RAX,RCX
MOV EAX,EAX
MOV qword ptr [RBP + -0xb8],RAX
MOV RAX,qword ptr [RBP + -0x38]
MOV RAX,qword ptr [RAX + 0x10]
MOV RCX,qword ptr [RBP + -0xf8]
MOV RCX,qword ptr [RCX]
MOV ECX,dword ptr [RCX + 0x744]
ADD RAX,RCX
MOV qword ptr [RBP + -0xb0],RAX
MOV EAX,dword ptr [RBP + -0x44]
MOV qword ptr [RBP + -0xa8],RAX
MOV dword ptr [RBP + -0xe8],0x2
MOV EAX,dword ptr [RBP + -0x44]
MOV dword ptr [RBP + -0xec],EAX
MOV EAX,dword ptr [RBP + -0xe4]
CMP EAX,dword ptr [RBP + -0x3c]
JNC 0x0018855e
MOV RAX,qword ptr [RBP + -0x60]
MOV qword ptr [RBP + -0x130],RAX
MOV RAX,qword ptr [RBP + -0x60]
MOV byte ptr [RAX],0x1
MOV RAX,qword ptr [RBP + -0x60]
ADD RAX,0x1
MOV qword ptr [RBP + -0x138],RAX
MOV EAX,dword ptr [RBP + -0xe4]
MOV CX,AX
MOV RAX,qword ptr [RBP + -0x138]
MOV word ptr [RAX],CX
MOV RAX,qword ptr [RBP + -0x60]
ADD RAX,0x3
MOV qword ptr [RBP + -0x60],RAX
CMP dword ptr [RBP + 0x18],0x0
JZ 0x001884ca
MOV RAX,qword ptr [RBP + -0x60]
MOV byte ptr [RAX],0x2
MOV RAX,qword ptr [RBP + -0x60]
ADD RAX,0x1
MOV qword ptr [RBP + -0x140],RAX
MOV EAX,dword ptr [RBP + 0x18]
MOV CX,AX
MOV RAX,qword ptr [RBP + -0x140]
MOV word ptr [RAX],CX
MOV RAX,qword ptr [RBP + -0x60]
ADD RAX,0x3
MOV qword ptr [RBP + -0x60],RAX
LAB_001884ca:
MOV RAX,qword ptr [RBP + -0x60]
MOV byte ptr [RAX],0x3
MOV RAX,qword ptr [RBP + -0x60]
ADD RAX,0x1
MOV qword ptr [RBP + -0x148],RAX
MOV EAX,dword ptr [RBP + 0x10]
MOV CX,AX
MOV RAX,qword ptr [RBP + -0x148]
MOV word ptr [RAX],CX
MOV RAX,qword ptr [RBP + -0x60]
ADD RAX,0x3
MOV qword ptr [RBP + -0x60],RAX
MOV RAX,qword ptr [RBP + -0x130]
MOV qword ptr [RBP + -0xa0],RAX
MOV RAX,qword ptr [RBP + -0x60]
MOV RCX,qword ptr [RBP + -0x130]
SUB RAX,RCX
MOV EAX,EAX
MOV qword ptr [RBP + -0x98],RAX
MOV RAX,qword ptr [RBP + -0x50]
MOV qword ptr [RBP + -0x90],RAX
MOV EAX,dword ptr [RBP + 0x10]
MOV qword ptr [RBP + -0x88],RAX
MOV EAX,dword ptr [RBP + -0xe8]
ADD EAX,0x2
MOV dword ptr [RBP + -0xe8],EAX
MOV RAX,qword ptr [RBP + -0x98]
MOV ECX,dword ptr [RBP + 0x10]
ADD RAX,RCX
ADD EAX,dword ptr [RBP + -0xec]
MOV dword ptr [RBP + -0xec],EAX
LAB_0018855e:
MOV RAX,qword ptr [RBP + -0x38]
MOV ECX,dword ptr [RAX + 0x20]
MOV RAX,qword ptr [RBP + -0x38]
MOV dword ptr [RAX + 0x24],ECX
MOV RAX,qword ptr [RBP + -0xf8]
MOV RDX,qword ptr [RAX + 0x8]
MOV RCX,qword ptr [RBP + -0xf8]
MOV RAX,qword ptr [RBP + -0xb8]
MOV ESI,dword ptr [RBP + -0xec]
ADD RAX,RSI
MOV R8D,EAX
MOV R9D,dword ptr [RBP + -0xe8]
ADD R9D,0x2
LEA R10,[RBP + -0xe0]
LEA RAX,[RBP + -0x30]
LEA RDI,[RBP + -0x58]
MOV ESI,0xc
XOR R11D,R11D
MOV qword ptr [RSP],R10
MOV qword ptr [RSP + 0x8],RAX
MOV qword ptr [RSP + 0x10],0x0
CALL 0x0014f4f0
MOV byte ptr [RBP + -0x149],AL
MOV RAX,qword ptr FS:[0x28]
MOV RCX,qword ptr [RBP + -0x8]
CMP RAX,RCX
JNZ 0x001885f1
MOV AL,byte ptr [RBP + -0x149]
ADD RSP,0x170
POP RBP
RET
LAB_001885f1:
CALL 0x0012a270
|
int8
_ma_log_key_middle(long *param_1,uint param_2,uint param_3,uint param_4,int param_5,long param_6,
uint param_7,int param_8)
{
long *plVar1;
int iVar2;
int1 uVar3;
uint uVar4;
uint uVar5;
ulong uVar6;
long in_FS_OFFSET;
uint local_f4;
int local_f0;
int1 local_e8 [32];
int1 *local_c8;
ulong local_c0;
long local_b8;
ulong local_b0;
int1 *local_a8;
ulong local_a0;
long local_98;
ulong local_90;
int1 *local_68;
int1 local_60 [8];
long local_58;
int local_50;
uint local_4c;
uint local_48;
uint local_44;
long *local_40;
int1 local_38 [2];
int4 local_36;
int1 local_32;
int1 local_31;
int1 local_30;
int1 local_2f;
int2 local_2e;
int1 local_2c;
int2 local_2b;
int2 local_29;
int1 local_27;
int2 local_26;
int1 local_24;
int2 local_23;
int1 local_21 [17];
long local_10;
local_10 = *(long *)(in_FS_OFFSET + 0x28);
plVar1 = (long *)*param_1;
uVar6 = (ulong)param_1[3] / (ulong)*(uint *)(*plVar1 + 0x7bc);
local_58 = param_6 + (ulong)param_3;
uVar4 = (int)local_58 - (int)param_1[2];
local_50 = param_5;
if (uVar4 < param_2) {
if (param_2 - uVar4 < param_7) {
param_8 = 0;
param_7 = param_2 - uVar4;
}
local_50 = param_8 + param_5;
}
local_36 = (int4)uVar6;
local_32 = (int1)(uVar6 >> 0x20);
local_31 = 10;
local_30 = *(int1 *)(param_1[2] + (ulong)(*(int *)(*plVar1 + 0x744) - 3));
local_2f = 7;
local_2e = (int2)local_50;
local_2c = 4;
local_2b = (int2)param_3;
local_29 = (int2)param_4;
local_c8 = local_38;
iVar2 = (int)&local_27;
uVar5 = iVar2 - (int)local_38;
local_c0 = (ulong)uVar5;
local_b8 = param_1[2] + (ulong)*(uint *)(*plVar1 + 0x744);
local_b0 = (ulong)param_4;
local_f0 = 2;
local_f4 = param_4;
local_68 = &local_27;
if (uVar4 < param_2) {
local_27 = 1;
local_26 = (int2)uVar4;
local_68 = &local_24;
if (param_8 != 0) {
local_24 = 2;
local_23 = (int2)param_8;
local_68 = local_21;
}
*local_68 = 3;
*(short *)(local_68 + 1) = (short)param_7;
local_68 = local_68 + 3;
uVar4 = (int)local_68 - iVar2;
local_a0 = (ulong)uVar4;
local_90 = (ulong)param_7;
local_f0 = 4;
local_f4 = uVar4 + param_7 + param_4;
local_a8 = &local_27;
local_98 = local_58;
}
*(int *)((long)param_1 + 0x24) = (int)param_1[4];
local_4c = param_4;
local_48 = param_3;
local_44 = param_2;
local_40 = param_1;
uVar3 = translog_write_record
(local_60,0xc,plVar1[1],plVar1,uVar5 + local_f4,local_f0 + 2,local_e8,local_38,0
);
if (*(long *)(in_FS_OFFSET + 0x28) == local_10) {
return CONCAT71((int7)((ulong)*(long *)(in_FS_OFFSET + 0x28) >> 8),uVar3);
}
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
|
|
61,836 |
extend_area_on_page
|
eloqsql/storage/maria/ma_blockrec.c
|
static my_bool extend_area_on_page(MARIA_HA *info,
uchar *buff, uchar *dir,
uint rownr,
uint request_length,
uint *empty_space, uint *ret_offset,
uint *ret_length,
my_bool head_page)
{
uint rec_offset, length, org_rec_length;
uint max_entry= (uint) buff[DIR_COUNT_OFFSET];
MARIA_SHARE *share= info->s;
uint block_size= share->block_size;
DBUG_ENTER("extend_area_on_page");
/*
We can't check for min length here as we may have called
extend_directory() to create a new (empty) entry just before
*/
check_directory(share, buff, block_size, 0, *empty_space);
rec_offset= uint2korr(dir);
if (rec_offset)
{
/* Extending old row; Mark current space as 'free' */
length= org_rec_length= uint2korr(dir + 2);
DBUG_PRINT("info", ("rec_offset: %u length: %u request_length: %u "
"empty_space: %u",
rec_offset, org_rec_length, request_length,
*empty_space));
*empty_space+= org_rec_length;
}
else
{
/* Reusing free directory entry; Free it from the directory list */
if (dir[2] == END_OF_DIR_FREE_LIST)
buff[DIR_FREE_OFFSET]= dir[3];
else
{
uchar *prev_dir= dir_entry_pos(buff, block_size, (uint) dir[2]);
DBUG_ASSERT(uint2korr(prev_dir) == 0 && prev_dir[3] == (uchar) rownr);
prev_dir[3]= dir[3];
}
if (dir[3] != END_OF_DIR_FREE_LIST)
{
uchar *next_dir= dir_entry_pos(buff, block_size, (uint) dir[3]);
DBUG_ASSERT(uint2korr(next_dir) == 0 && next_dir[2] == (uchar) rownr);
next_dir[2]= dir[2];
}
rec_offset= start_of_next_entry(dir);
length= 0;
}
if (length < request_length)
{
uint old_rec_offset;
/*
New data did not fit in old position.
Find first possible position where to put new data.
*/
old_rec_offset= rec_offset;
rec_offset= end_of_previous_entry(share,
dir, buff + block_size -
PAGE_SUFFIX_SIZE);
length+= (uint) (old_rec_offset - rec_offset);
DBUG_ASSERT(old_rec_offset);
/*
'length' is 0 if we are doing an insert into a not allocated block.
This can only happen during "REDO of INSERT" or "UNDO of DELETE."
*/
if (length < request_length)
{
/*
Did not fit in current block + empty space. Extend with
empty space after block.
*/
if (rownr == max_entry - 1)
{
/* Last entry; Everything is free between this and directory */
length= ((block_size - PAGE_SUFFIX_SIZE - DIR_ENTRY_SIZE * max_entry) -
rec_offset);
}
else
length= start_of_next_entry(dir) - rec_offset;
DBUG_ASSERT((int) length >= 0);
if (length < request_length)
{
/* Not enough continuous space, compact page to get more */
int2store(dir, rec_offset);
/* Reset length, as this may be a deleted block */
int2store(dir+2, 0);
_ma_compact_block_page(share,
buff, rownr, 1,
head_page ? info->trn->min_read_from: 0,
head_page ? share->base.min_block_length : 0);
rec_offset= uint2korr(dir);
length= uint2korr(dir+2);
if (length < request_length)
{
DBUG_PRINT("error", ("Not enough space: "
"length: %u request_length: %u",
length, request_length));
_ma_set_fatal_error(info, HA_ERR_WRONG_IN_RECORD);
DBUG_RETURN(1); /* Error in block */
}
*empty_space= length; /* All space is here */
}
}
}
int2store(dir, rec_offset);
int2store(dir + 2, length);
*ret_offset= rec_offset;
*ret_length= length;
check_directory(share,
buff, block_size,
head_page ? share->base.min_block_length : 0,
*empty_space - length);
DBUG_RETURN(0);
}
|
O0
|
c
|
extend_area_on_page:
pushq %rbp
movq %rsp, %rbp
subq $0xc0, %rsp
movb 0x20(%rbp), %al
movq 0x18(%rbp), %rax
movq 0x10(%rbp), %rax
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movl %ecx, -0x24(%rbp)
movl %r8d, -0x28(%rbp)
movq %r9, -0x30(%rbp)
movq -0x18(%rbp), %rax
movzbl 0x8(%rax), %eax
movl %eax, -0x40(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x48(%rbp)
movq -0x48(%rbp), %rax
movl 0x7bc(%rax), %eax
movl %eax, -0x4c(%rbp)
movq -0x20(%rbp), %rax
movzwl (%rax), %eax
movl %eax, -0x34(%rbp)
cmpl $0x0, -0x34(%rbp)
je 0x55a70
movq -0x20(%rbp), %rax
movzwl 0x2(%rax), %eax
movl %eax, -0x3c(%rbp)
movl %eax, -0x38(%rbp)
jmp 0x55a60
movl -0x3c(%rbp), %ecx
movq -0x30(%rbp), %rax
addl (%rax), %ecx
movl %ecx, (%rax)
jmp 0x55b01
movq -0x20(%rbp), %rax
movzbl 0x2(%rax), %eax
cmpl $0xff, %eax
jne 0x55a8f
movq -0x20(%rbp), %rax
movb 0x3(%rax), %cl
movq -0x18(%rbp), %rax
movb %cl, 0x9(%rax)
jmp 0x55ab7
movq -0x18(%rbp), %rdi
movl -0x4c(%rbp), %esi
movq -0x20(%rbp), %rax
movzbl 0x2(%rax), %edx
callq 0x506b0
movq %rax, -0x58(%rbp)
jmp 0x55aa9
movq -0x20(%rbp), %rax
movb 0x3(%rax), %cl
movq -0x58(%rbp), %rax
movb %cl, 0x3(%rax)
movq -0x20(%rbp), %rax
movzbl 0x3(%rax), %eax
cmpl $0xff, %eax
je 0x55aee
movq -0x18(%rbp), %rdi
movl -0x4c(%rbp), %esi
movq -0x20(%rbp), %rax
movzbl 0x3(%rax), %edx
callq 0x506b0
movq %rax, -0x60(%rbp)
jmp 0x55ae0
movq -0x20(%rbp), %rax
movb 0x2(%rax), %cl
movq -0x60(%rbp), %rax
movb %cl, 0x2(%rax)
movq -0x20(%rbp), %rdi
callq 0x5b8f0
movl %eax, -0x34(%rbp)
movl $0x0, -0x38(%rbp)
movl -0x38(%rbp), %eax
cmpl -0x28(%rbp), %eax
jae 0x55cad
movl -0x34(%rbp), %eax
movl %eax, -0x64(%rbp)
movq -0x48(%rbp), %rdi
movq -0x20(%rbp), %rsi
movq -0x18(%rbp), %rdx
movl -0x4c(%rbp), %eax
addq %rax, %rdx
addq $-0x4, %rdx
callq 0x5b880
movl %eax, -0x34(%rbp)
movl -0x64(%rbp), %eax
subl -0x34(%rbp), %eax
addl -0x38(%rbp), %eax
movl %eax, -0x38(%rbp)
jmp 0x55b3f
movl -0x38(%rbp), %eax
cmpl -0x28(%rbp), %eax
jae 0x55cab
movl -0x24(%rbp), %eax
movl -0x40(%rbp), %ecx
subl $0x1, %ecx
cmpl %ecx, %eax
jne 0x55b6e
movl -0x4c(%rbp), %eax
subl $0x4, %eax
movl -0x40(%rbp), %ecx
shll $0x2, %ecx
subl %ecx, %eax
subl -0x34(%rbp), %eax
movl %eax, -0x38(%rbp)
jmp 0x55b7d
movq -0x20(%rbp), %rdi
callq 0x5b8f0
subl -0x34(%rbp), %eax
movl %eax, -0x38(%rbp)
jmp 0x55b7f
jmp 0x55b81
movl -0x38(%rbp), %eax
cmpl -0x28(%rbp), %eax
jae 0x55ca9
jmp 0x55b8f
movq -0x20(%rbp), %rax
movq %rax, -0x70(%rbp)
movl -0x34(%rbp), %eax
movw %ax, %cx
movq -0x70(%rbp), %rax
movw %cx, (%rax)
jmp 0x55ba6
movq -0x20(%rbp), %rax
addq $0x2, %rax
movq %rax, -0x78(%rbp)
movq -0x78(%rbp), %rax
movw $0x0, (%rax)
movq -0x48(%rbp), %rax
movq %rax, -0xa0(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0x98(%rbp)
movl -0x24(%rbp), %eax
movl %eax, -0x8c(%rbp)
movsbl 0x20(%rbp), %eax
cmpl $0x0, %eax
je 0x55bfb
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movq 0x80(%rax), %rax
movq %rax, -0xa8(%rbp)
jmp 0x55c06
xorl %eax, %eax
movq %rax, -0xa8(%rbp)
jmp 0x55c06
movq -0xa8(%rbp), %rax
movq %rax, -0xb0(%rbp)
movsbl 0x20(%rbp), %eax
cmpl $0x0, %eax
je 0x55c31
movq -0x48(%rbp), %rax
movq 0x3b8(%rax), %rax
movq %rax, -0xb8(%rbp)
jmp 0x55c3c
xorl %eax, %eax
movq %rax, -0xb8(%rbp)
jmp 0x55c3c
movq -0xb0(%rbp), %r8
movl -0x8c(%rbp), %edx
movq -0x98(%rbp), %rsi
movq -0xa0(%rbp), %rdi
movq -0xb8(%rbp), %rax
movl %eax, %r9d
movl $0x1, %ecx
callq 0x4ff80
movq -0x20(%rbp), %rax
movzwl (%rax), %eax
movl %eax, -0x34(%rbp)
movq -0x20(%rbp), %rax
movzwl 0x2(%rax), %eax
movl %eax, -0x38(%rbp)
movl -0x38(%rbp), %eax
cmpl -0x28(%rbp), %eax
jae 0x55ca0
jmp 0x55c8a
jmp 0x55c8c
movq -0x10(%rbp), %rdi
movl $0x7f, %esi
callq 0x37090
movb $0x1, -0x1(%rbp)
jmp 0x55cfb
movl -0x38(%rbp), %ecx
movq -0x30(%rbp), %rax
movl %ecx, (%rax)
jmp 0x55cab
jmp 0x55cad
jmp 0x55caf
movq -0x20(%rbp), %rax
movq %rax, -0x80(%rbp)
movl -0x34(%rbp), %eax
movw %ax, %cx
movq -0x80(%rbp), %rax
movw %cx, (%rax)
jmp 0x55cc6
movq -0x20(%rbp), %rax
addq $0x2, %rax
movq %rax, -0x88(%rbp)
movl -0x38(%rbp), %eax
movw %ax, %cx
movq -0x88(%rbp), %rax
movw %cx, (%rax)
movl -0x34(%rbp), %ecx
movq 0x10(%rbp), %rax
movl %ecx, (%rax)
movl -0x38(%rbp), %ecx
movq 0x18(%rbp), %rax
movl %ecx, (%rax)
movb $0x0, -0x1(%rbp)
movb -0x1(%rbp), %al
addq $0xc0, %rsp
popq %rbp
retq
nopw (%rax,%rax)
|
extend_area_on_page:
push rbp
mov rbp, rsp
sub rsp, 0C0h
mov al, [rbp+arg_10]
mov rax, [rbp+arg_8]
mov rax, [rbp+arg_0]
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov [rbp+var_20], rdx
mov [rbp+var_24], ecx
mov [rbp+var_28], r8d
mov [rbp+var_30], r9
mov rax, [rbp+var_18]
movzx eax, byte ptr [rax+8]
mov [rbp+var_40], eax
mov rax, [rbp+var_10]
mov rax, [rax]
mov [rbp+var_48], rax
mov rax, [rbp+var_48]
mov eax, [rax+7BCh]
mov [rbp+var_4C], eax
mov rax, [rbp+var_20]
movzx eax, word ptr [rax]
mov [rbp+var_34], eax
cmp [rbp+var_34], 0
jz short loc_55A70
mov rax, [rbp+var_20]
movzx eax, word ptr [rax+2]
mov [rbp+var_3C], eax
mov [rbp+var_38], eax
jmp short $+2
loc_55A60:
mov ecx, [rbp+var_3C]
mov rax, [rbp+var_30]
add ecx, [rax]
mov [rax], ecx
jmp loc_55B01
loc_55A70:
mov rax, [rbp+var_20]
movzx eax, byte ptr [rax+2]
cmp eax, 0FFh
jnz short loc_55A8F
mov rax, [rbp+var_20]
mov cl, [rax+3]
mov rax, [rbp+var_18]
mov [rax+9], cl
jmp short loc_55AB7
loc_55A8F:
mov rdi, [rbp+var_18]
mov esi, [rbp+var_4C]
mov rax, [rbp+var_20]
movzx edx, byte ptr [rax+2]
call dir_entry_pos
mov [rbp+var_58], rax
jmp short $+2
loc_55AA9:
mov rax, [rbp+var_20]
mov cl, [rax+3]
mov rax, [rbp+var_58]
mov [rax+3], cl
loc_55AB7:
mov rax, [rbp+var_20]
movzx eax, byte ptr [rax+3]
cmp eax, 0FFh
jz short loc_55AEE
mov rdi, [rbp+var_18]
mov esi, [rbp+var_4C]
mov rax, [rbp+var_20]
movzx edx, byte ptr [rax+3]
call dir_entry_pos
mov [rbp+var_60], rax
jmp short $+2
loc_55AE0:
mov rax, [rbp+var_20]
mov cl, [rax+2]
mov rax, [rbp+var_60]
mov [rax+2], cl
loc_55AEE:
mov rdi, [rbp+var_20]
call start_of_next_entry
mov [rbp+var_34], eax
mov [rbp+var_38], 0
loc_55B01:
mov eax, [rbp+var_38]
cmp eax, [rbp+var_28]
jnb loc_55CAD
mov eax, [rbp+var_34]
mov [rbp+var_64], eax
mov rdi, [rbp+var_48]
mov rsi, [rbp+var_20]
mov rdx, [rbp+var_18]
mov eax, [rbp+var_4C]
add rdx, rax
add rdx, 0FFFFFFFFFFFFFFFCh
call end_of_previous_entry
mov [rbp+var_34], eax
mov eax, [rbp+var_64]
sub eax, [rbp+var_34]
add eax, [rbp+var_38]
mov [rbp+var_38], eax
jmp short $+2
loc_55B3F:
mov eax, [rbp+var_38]
cmp eax, [rbp+var_28]
jnb loc_55CAB
mov eax, [rbp+var_24]
mov ecx, [rbp+var_40]
sub ecx, 1
cmp eax, ecx
jnz short loc_55B6E
mov eax, [rbp+var_4C]
sub eax, 4
mov ecx, [rbp+var_40]
shl ecx, 2
sub eax, ecx
sub eax, [rbp+var_34]
mov [rbp+var_38], eax
jmp short loc_55B7D
loc_55B6E:
mov rdi, [rbp+var_20]
call start_of_next_entry
sub eax, [rbp+var_34]
mov [rbp+var_38], eax
loc_55B7D:
jmp short $+2
loc_55B7F:
jmp short $+2
loc_55B81:
mov eax, [rbp+var_38]
cmp eax, [rbp+var_28]
jnb loc_55CA9
jmp short $+2
loc_55B8F:
mov rax, [rbp+var_20]
mov [rbp+var_70], rax
mov eax, [rbp+var_34]
mov cx, ax
mov rax, [rbp+var_70]
mov [rax], cx
jmp short $+2
loc_55BA6:
mov rax, [rbp+var_20]
add rax, 2
mov [rbp+var_78], rax
mov rax, [rbp+var_78]
mov word ptr [rax], 0
mov rax, [rbp+var_48]
mov [rbp+var_A0], rax
mov rax, [rbp+var_18]
mov [rbp+var_98], rax
mov eax, [rbp+var_24]
mov [rbp+var_8C], eax
movsx eax, [rbp+arg_10]
cmp eax, 0
jz short loc_55BFB
mov rax, [rbp+var_10]
mov rax, [rax+8]
mov rax, [rax+80h]
mov [rbp+var_A8], rax
jmp short loc_55C06
loc_55BFB:
xor eax, eax
mov [rbp+var_A8], rax
jmp short $+2
loc_55C06:
mov rax, [rbp+var_A8]
mov [rbp+var_B0], rax
movsx eax, [rbp+arg_10]
cmp eax, 0
jz short loc_55C31
mov rax, [rbp+var_48]
mov rax, [rax+3B8h]
mov [rbp+var_B8], rax
jmp short loc_55C3C
loc_55C31:
xor eax, eax
mov [rbp+var_B8], rax
jmp short $+2
loc_55C3C:
mov r8, [rbp+var_B0]
mov edx, [rbp+var_8C]
mov rsi, [rbp+var_98]
mov rdi, [rbp+var_A0]
mov rax, [rbp+var_B8]
mov r9d, eax
mov ecx, 1
call _ma_compact_block_page
mov rax, [rbp+var_20]
movzx eax, word ptr [rax]
mov [rbp+var_34], eax
mov rax, [rbp+var_20]
movzx eax, word ptr [rax+2]
mov [rbp+var_38], eax
mov eax, [rbp+var_38]
cmp eax, [rbp+var_28]
jnb short loc_55CA0
jmp short $+2
loc_55C8A:
jmp short $+2
loc_55C8C:
mov rdi, [rbp+var_10]
mov esi, 7Fh
call _ma_set_fatal_error
mov [rbp+var_1], 1
jmp short loc_55CFB
loc_55CA0:
mov ecx, [rbp+var_38]
mov rax, [rbp+var_30]
mov [rax], ecx
loc_55CA9:
jmp short $+2
loc_55CAB:
jmp short $+2
loc_55CAD:
jmp short $+2
loc_55CAF:
mov rax, [rbp+var_20]
mov [rbp+var_80], rax
mov eax, [rbp+var_34]
mov cx, ax
mov rax, [rbp+var_80]
mov [rax], cx
jmp short $+2
loc_55CC6:
mov rax, [rbp+var_20]
add rax, 2
mov [rbp+var_88], rax
mov eax, [rbp+var_38]
mov cx, ax
mov rax, [rbp+var_88]
mov [rax], cx
mov ecx, [rbp+var_34]
mov rax, [rbp+arg_0]
mov [rax], ecx
mov ecx, [rbp+var_38]
mov rax, [rbp+arg_8]
mov [rax], ecx
mov [rbp+var_1], 0
loc_55CFB:
mov al, [rbp+var_1]
add rsp, 0C0h
pop rbp
retn
|
char extend_area_on_page(
long long *a1,
long long a2,
unsigned __int16 *a3,
unsigned int a4,
unsigned int a5,
unsigned int *a6,
_DWORD *a7,
unsigned int *a8,
char a9)
{
long long v9; // rdx
long long v10; // rcx
long long v11; // r8
int v12; // r9d
unsigned long long v14; // [rsp+18h] [rbp-A8h]
int v15; // [rsp+5Ch] [rbp-64h]
unsigned int v16; // [rsp+74h] [rbp-4Ch]
long long v17; // [rsp+78h] [rbp-48h]
int v18; // [rsp+80h] [rbp-40h]
unsigned int v19; // [rsp+88h] [rbp-38h]
int entry; // [rsp+8Ch] [rbp-34h]
v18 = *(unsigned __int8 *)(a2 + 8);
v17 = *a1;
v16 = *(_DWORD *)(*a1 + 1980);
entry = *a3;
if ( *a3 )
{
v19 = a3[1];
*a6 += v19;
}
else
{
if ( *((unsigned __int8 *)a3 + 2) == 255 )
*(_BYTE *)(a2 + 9) = *((_BYTE *)a3 + 3);
else
*(_BYTE *)(dir_entry_pos(a2, v16, *((unsigned __int8 *)a3 + 2)) + 3) = *((_BYTE *)a3 + 3);
if ( *((unsigned __int8 *)a3 + 3) != 255 )
*(_BYTE *)(dir_entry_pos(a2, v16, *((unsigned __int8 *)a3 + 3)) + 2) = *((_BYTE *)a3 + 2);
entry = start_of_next_entry(a3);
v19 = 0;
}
if ( v19 >= a5 )
goto LABEL_24;
v15 = entry;
entry = end_of_previous_entry(v17, a3, v16 + a2 - 4);
v19 += v15 - entry;
if ( v19 >= a5 )
goto LABEL_24;
v19 = a4 == v18 - 1 ? v16 - 4 - 4 * v18 - entry : start_of_next_entry(a3) - entry;
if ( v19 >= a5 )
goto LABEL_24;
*a3 = entry;
a3[1] = 0;
if ( a9 )
v14 = *(_QWORD *)(a1[1] + 128);
else
v14 = 0LL;
if ( a9 )
ma_compact_block_page(v17, a2, a4, 1, v14, *(_QWORD *)(v17 + 952));
else
ma_compact_block_page(v17, a2, a4, 1, v14, 0);
entry = *a3;
v19 = a3[1];
if ( v19 >= a5 )
{
*a6 = v19;
LABEL_24:
*a3 = entry;
a3[1] = v19;
*a7 = entry;
*a8 = v19;
return 0;
}
ma_set_fatal_error(a1, 0x7Fu, v9, v10, v11, v12);
return 1;
}
|
extend_area_on_page:
PUSH RBP
MOV RBP,RSP
SUB RSP,0xc0
MOV AL,byte ptr [RBP + 0x20]
MOV RAX,qword ptr [RBP + 0x18]
MOV RAX,qword ptr [RBP + 0x10]
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x18],RSI
MOV qword ptr [RBP + -0x20],RDX
MOV dword ptr [RBP + -0x24],ECX
MOV dword ptr [RBP + -0x28],R8D
MOV qword ptr [RBP + -0x30],R9
MOV RAX,qword ptr [RBP + -0x18]
MOVZX EAX,byte ptr [RAX + 0x8]
MOV dword ptr [RBP + -0x40],EAX
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x48],RAX
MOV RAX,qword ptr [RBP + -0x48]
MOV EAX,dword ptr [RAX + 0x7bc]
MOV dword ptr [RBP + -0x4c],EAX
MOV RAX,qword ptr [RBP + -0x20]
MOVZX EAX,word ptr [RAX]
MOV dword ptr [RBP + -0x34],EAX
CMP dword ptr [RBP + -0x34],0x0
JZ 0x00155a70
MOV RAX,qword ptr [RBP + -0x20]
MOVZX EAX,word ptr [RAX + 0x2]
MOV dword ptr [RBP + -0x3c],EAX
MOV dword ptr [RBP + -0x38],EAX
JMP 0x00155a60
LAB_00155a60:
MOV ECX,dword ptr [RBP + -0x3c]
MOV RAX,qword ptr [RBP + -0x30]
ADD ECX,dword ptr [RAX]
MOV dword ptr [RAX],ECX
JMP 0x00155b01
LAB_00155a70:
MOV RAX,qword ptr [RBP + -0x20]
MOVZX EAX,byte ptr [RAX + 0x2]
CMP EAX,0xff
JNZ 0x00155a8f
MOV RAX,qword ptr [RBP + -0x20]
MOV CL,byte ptr [RAX + 0x3]
MOV RAX,qword ptr [RBP + -0x18]
MOV byte ptr [RAX + 0x9],CL
JMP 0x00155ab7
LAB_00155a8f:
MOV RDI,qword ptr [RBP + -0x18]
MOV ESI,dword ptr [RBP + -0x4c]
MOV RAX,qword ptr [RBP + -0x20]
MOVZX EDX,byte ptr [RAX + 0x2]
CALL 0x001506b0
MOV qword ptr [RBP + -0x58],RAX
JMP 0x00155aa9
LAB_00155aa9:
MOV RAX,qword ptr [RBP + -0x20]
MOV CL,byte ptr [RAX + 0x3]
MOV RAX,qword ptr [RBP + -0x58]
MOV byte ptr [RAX + 0x3],CL
LAB_00155ab7:
MOV RAX,qword ptr [RBP + -0x20]
MOVZX EAX,byte ptr [RAX + 0x3]
CMP EAX,0xff
JZ 0x00155aee
MOV RDI,qword ptr [RBP + -0x18]
MOV ESI,dword ptr [RBP + -0x4c]
MOV RAX,qword ptr [RBP + -0x20]
MOVZX EDX,byte ptr [RAX + 0x3]
CALL 0x001506b0
MOV qword ptr [RBP + -0x60],RAX
JMP 0x00155ae0
LAB_00155ae0:
MOV RAX,qword ptr [RBP + -0x20]
MOV CL,byte ptr [RAX + 0x2]
MOV RAX,qword ptr [RBP + -0x60]
MOV byte ptr [RAX + 0x2],CL
LAB_00155aee:
MOV RDI,qword ptr [RBP + -0x20]
CALL 0x0015b8f0
MOV dword ptr [RBP + -0x34],EAX
MOV dword ptr [RBP + -0x38],0x0
LAB_00155b01:
MOV EAX,dword ptr [RBP + -0x38]
CMP EAX,dword ptr [RBP + -0x28]
JNC 0x00155cad
MOV EAX,dword ptr [RBP + -0x34]
MOV dword ptr [RBP + -0x64],EAX
MOV RDI,qword ptr [RBP + -0x48]
MOV RSI,qword ptr [RBP + -0x20]
MOV RDX,qword ptr [RBP + -0x18]
MOV EAX,dword ptr [RBP + -0x4c]
ADD RDX,RAX
ADD RDX,-0x4
CALL 0x0015b880
MOV dword ptr [RBP + -0x34],EAX
MOV EAX,dword ptr [RBP + -0x64]
SUB EAX,dword ptr [RBP + -0x34]
ADD EAX,dword ptr [RBP + -0x38]
MOV dword ptr [RBP + -0x38],EAX
JMP 0x00155b3f
LAB_00155b3f:
MOV EAX,dword ptr [RBP + -0x38]
CMP EAX,dword ptr [RBP + -0x28]
JNC 0x00155cab
MOV EAX,dword ptr [RBP + -0x24]
MOV ECX,dword ptr [RBP + -0x40]
SUB ECX,0x1
CMP EAX,ECX
JNZ 0x00155b6e
MOV EAX,dword ptr [RBP + -0x4c]
SUB EAX,0x4
MOV ECX,dword ptr [RBP + -0x40]
SHL ECX,0x2
SUB EAX,ECX
SUB EAX,dword ptr [RBP + -0x34]
MOV dword ptr [RBP + -0x38],EAX
JMP 0x00155b7d
LAB_00155b6e:
MOV RDI,qword ptr [RBP + -0x20]
CALL 0x0015b8f0
SUB EAX,dword ptr [RBP + -0x34]
MOV dword ptr [RBP + -0x38],EAX
LAB_00155b7d:
JMP 0x00155b7f
LAB_00155b7f:
JMP 0x00155b81
LAB_00155b81:
MOV EAX,dword ptr [RBP + -0x38]
CMP EAX,dword ptr [RBP + -0x28]
JNC 0x00155ca9
JMP 0x00155b8f
LAB_00155b8f:
MOV RAX,qword ptr [RBP + -0x20]
MOV qword ptr [RBP + -0x70],RAX
MOV EAX,dword ptr [RBP + -0x34]
MOV CX,AX
MOV RAX,qword ptr [RBP + -0x70]
MOV word ptr [RAX],CX
JMP 0x00155ba6
LAB_00155ba6:
MOV RAX,qword ptr [RBP + -0x20]
ADD RAX,0x2
MOV qword ptr [RBP + -0x78],RAX
MOV RAX,qword ptr [RBP + -0x78]
MOV word ptr [RAX],0x0
MOV RAX,qword ptr [RBP + -0x48]
MOV qword ptr [RBP + -0xa0],RAX
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RBP + -0x98],RAX
MOV EAX,dword ptr [RBP + -0x24]
MOV dword ptr [RBP + -0x8c],EAX
MOVSX EAX,byte ptr [RBP + 0x20]
CMP EAX,0x0
JZ 0x00155bfb
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x8]
MOV RAX,qword ptr [RAX + 0x80]
MOV qword ptr [RBP + -0xa8],RAX
JMP 0x00155c06
LAB_00155bfb:
XOR EAX,EAX
MOV qword ptr [RBP + -0xa8],RAX
JMP 0x00155c06
LAB_00155c06:
MOV RAX,qword ptr [RBP + -0xa8]
MOV qword ptr [RBP + -0xb0],RAX
MOVSX EAX,byte ptr [RBP + 0x20]
CMP EAX,0x0
JZ 0x00155c31
MOV RAX,qword ptr [RBP + -0x48]
MOV RAX,qword ptr [RAX + 0x3b8]
MOV qword ptr [RBP + -0xb8],RAX
JMP 0x00155c3c
LAB_00155c31:
XOR EAX,EAX
MOV qword ptr [RBP + -0xb8],RAX
JMP 0x00155c3c
LAB_00155c3c:
MOV R8,qword ptr [RBP + -0xb0]
MOV EDX,dword ptr [RBP + -0x8c]
MOV RSI,qword ptr [RBP + -0x98]
MOV RDI,qword ptr [RBP + -0xa0]
MOV RAX,qword ptr [RBP + -0xb8]
MOV R9D,EAX
MOV ECX,0x1
CALL 0x0014ff80
MOV RAX,qword ptr [RBP + -0x20]
MOVZX EAX,word ptr [RAX]
MOV dword ptr [RBP + -0x34],EAX
MOV RAX,qword ptr [RBP + -0x20]
MOVZX EAX,word ptr [RAX + 0x2]
MOV dword ptr [RBP + -0x38],EAX
MOV EAX,dword ptr [RBP + -0x38]
CMP EAX,dword ptr [RBP + -0x28]
JNC 0x00155ca0
JMP 0x00155c8a
LAB_00155c8a:
JMP 0x00155c8c
LAB_00155c8c:
MOV RDI,qword ptr [RBP + -0x10]
MOV ESI,0x7f
CALL 0x00137090
MOV byte ptr [RBP + -0x1],0x1
JMP 0x00155cfb
LAB_00155ca0:
MOV ECX,dword ptr [RBP + -0x38]
MOV RAX,qword ptr [RBP + -0x30]
MOV dword ptr [RAX],ECX
LAB_00155ca9:
JMP 0x00155cab
LAB_00155cab:
JMP 0x00155cad
LAB_00155cad:
JMP 0x00155caf
LAB_00155caf:
MOV RAX,qword ptr [RBP + -0x20]
MOV qword ptr [RBP + -0x80],RAX
MOV EAX,dword ptr [RBP + -0x34]
MOV CX,AX
MOV RAX,qword ptr [RBP + -0x80]
MOV word ptr [RAX],CX
JMP 0x00155cc6
LAB_00155cc6:
MOV RAX,qword ptr [RBP + -0x20]
ADD RAX,0x2
MOV qword ptr [RBP + -0x88],RAX
MOV EAX,dword ptr [RBP + -0x38]
MOV CX,AX
MOV RAX,qword ptr [RBP + -0x88]
MOV word ptr [RAX],CX
MOV ECX,dword ptr [RBP + -0x34]
MOV RAX,qword ptr [RBP + 0x10]
MOV dword ptr [RAX],ECX
MOV ECX,dword ptr [RBP + -0x38]
MOV RAX,qword ptr [RBP + 0x18]
MOV dword ptr [RAX],ECX
MOV byte ptr [RBP + -0x1],0x0
LAB_00155cfb:
MOV AL,byte ptr [RBP + -0x1]
ADD RSP,0xc0
POP RBP
RET
|
int1
extend_area_on_page(long *param_1,long param_2,ushort *param_3,int param_4,uint param_5,
uint *param_6,uint *param_7,uint *param_8,char param_9)
{
byte bVar1;
uint uVar2;
long lVar3;
uint uVar4;
int iVar5;
long lVar6;
ulong local_c0;
int8 local_b0;
uint local_40;
uint local_3c;
bVar1 = *(byte *)(param_2 + 8);
lVar3 = *param_1;
uVar2 = *(uint *)(lVar3 + 0x7bc);
local_3c = (uint)*param_3;
if (local_3c == 0) {
if ((char)param_3[1] == -1) {
*(int1 *)(param_2 + 9) = *(int1 *)((long)param_3 + 3);
}
else {
lVar6 = dir_entry_pos(param_2,uVar2,(char)param_3[1]);
*(int1 *)(lVar6 + 3) = *(int1 *)((long)param_3 + 3);
}
if (*(char *)((long)param_3 + 3) != -1) {
lVar6 = dir_entry_pos(param_2,uVar2,*(int1 *)((long)param_3 + 3));
*(char *)(lVar6 + 2) = (char)param_3[1];
}
local_3c = start_of_next_entry(param_3);
local_40 = 0;
}
else {
local_40 = (uint)param_3[1];
*param_6 = local_40 + *param_6;
}
if (local_40 < param_5) {
uVar4 = end_of_previous_entry(lVar3,param_3,param_2 + (ulong)uVar2 + -4);
local_40 = (local_3c - uVar4) + local_40;
local_3c = uVar4;
if (local_40 < param_5) {
if (param_4 == bVar1 - 1) {
local_40 = ((uVar2 - 4) + (uint)bVar1 * -4) - uVar4;
}
else {
iVar5 = start_of_next_entry(param_3);
local_40 = iVar5 - uVar4;
}
if (local_40 < param_5) {
*param_3 = (ushort)uVar4;
param_3[1] = 0;
if (param_9 == '\0') {
local_b0 = 0;
local_c0 = 0;
}
else {
local_b0 = *(int8 *)(param_1[1] + 0x80);
local_c0 = *(ulong *)(lVar3 + 0x3b8);
}
_ma_compact_block_page(lVar3,param_2,param_4,1,local_b0,local_c0 & 0xffffffff);
local_3c = (uint)*param_3;
local_40 = (uint)param_3[1];
if (local_40 < param_5) {
_ma_set_fatal_error(param_1,0x7f);
return 1;
}
*param_6 = local_40;
}
}
}
*param_3 = (ushort)local_3c;
param_3[1] = (ushort)local_40;
*param_7 = local_3c;
*param_8 = local_40;
return 0;
}
|
|
61,837 |
extend_area_on_page
|
eloqsql/storage/maria/ma_blockrec.c
|
static my_bool extend_area_on_page(MARIA_HA *info,
uchar *buff, uchar *dir,
uint rownr,
uint request_length,
uint *empty_space, uint *ret_offset,
uint *ret_length,
my_bool head_page)
{
uint rec_offset, length, org_rec_length;
uint max_entry= (uint) buff[DIR_COUNT_OFFSET];
MARIA_SHARE *share= info->s;
uint block_size= share->block_size;
DBUG_ENTER("extend_area_on_page");
/*
We can't check for min length here as we may have called
extend_directory() to create a new (empty) entry just before
*/
check_directory(share, buff, block_size, 0, *empty_space);
rec_offset= uint2korr(dir);
if (rec_offset)
{
/* Extending old row; Mark current space as 'free' */
length= org_rec_length= uint2korr(dir + 2);
DBUG_PRINT("info", ("rec_offset: %u length: %u request_length: %u "
"empty_space: %u",
rec_offset, org_rec_length, request_length,
*empty_space));
*empty_space+= org_rec_length;
}
else
{
/* Reusing free directory entry; Free it from the directory list */
if (dir[2] == END_OF_DIR_FREE_LIST)
buff[DIR_FREE_OFFSET]= dir[3];
else
{
uchar *prev_dir= dir_entry_pos(buff, block_size, (uint) dir[2]);
DBUG_ASSERT(uint2korr(prev_dir) == 0 && prev_dir[3] == (uchar) rownr);
prev_dir[3]= dir[3];
}
if (dir[3] != END_OF_DIR_FREE_LIST)
{
uchar *next_dir= dir_entry_pos(buff, block_size, (uint) dir[3]);
DBUG_ASSERT(uint2korr(next_dir) == 0 && next_dir[2] == (uchar) rownr);
next_dir[2]= dir[2];
}
rec_offset= start_of_next_entry(dir);
length= 0;
}
if (length < request_length)
{
uint old_rec_offset;
/*
New data did not fit in old position.
Find first possible position where to put new data.
*/
old_rec_offset= rec_offset;
rec_offset= end_of_previous_entry(share,
dir, buff + block_size -
PAGE_SUFFIX_SIZE);
length+= (uint) (old_rec_offset - rec_offset);
DBUG_ASSERT(old_rec_offset);
/*
'length' is 0 if we are doing an insert into a not allocated block.
This can only happen during "REDO of INSERT" or "UNDO of DELETE."
*/
if (length < request_length)
{
/*
Did not fit in current block + empty space. Extend with
empty space after block.
*/
if (rownr == max_entry - 1)
{
/* Last entry; Everything is free between this and directory */
length= ((block_size - PAGE_SUFFIX_SIZE - DIR_ENTRY_SIZE * max_entry) -
rec_offset);
}
else
length= start_of_next_entry(dir) - rec_offset;
DBUG_ASSERT((int) length >= 0);
if (length < request_length)
{
/* Not enough continuous space, compact page to get more */
int2store(dir, rec_offset);
/* Reset length, as this may be a deleted block */
int2store(dir+2, 0);
_ma_compact_block_page(share,
buff, rownr, 1,
head_page ? info->trn->min_read_from: 0,
head_page ? share->base.min_block_length : 0);
rec_offset= uint2korr(dir);
length= uint2korr(dir+2);
if (length < request_length)
{
DBUG_PRINT("error", ("Not enough space: "
"length: %u request_length: %u",
length, request_length));
_ma_set_fatal_error(info, HA_ERR_WRONG_IN_RECORD);
DBUG_RETURN(1); /* Error in block */
}
*empty_space= length; /* All space is here */
}
}
}
int2store(dir, rec_offset);
int2store(dir + 2, length);
*ret_offset= rec_offset;
*ret_length= length;
check_directory(share,
buff, block_size,
head_page ? share->base.min_block_length : 0,
*empty_space - length);
DBUG_RETURN(0);
}
|
O3
|
c
|
extend_area_on_page:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %r9, %r14
movl %r8d, %r12d
movq %rdx, %rbx
movq %rdi, %r15
movzbl 0x8(%rsi), %edx
movq (%rdi), %rdi
movl 0x7bc(%rdi), %eax
movzwl (%rbx), %r9d
testw %r9w, %r9w
je 0x49529
movzwl 0x2(%rbx), %r8d
addl %r8d, (%r14)
jmp 0x49591
movzbl 0x2(%rbx), %r8d
cmpq $0xff, %r8
je 0x4954c
leaq (%rsi,%rax), %r9
shll $0x2, %r8d
subq %r8, %r9
movb 0x3(%rbx), %r8b
movb %r8b, -0x5(%r9)
jmp 0x49554
movb 0x3(%rbx), %r8b
movb %r8b, 0x9(%rsi)
cmpb $-0x1, %r8b
je 0x49571
leaq (%rsi,%rax), %r9
movzbl %r8b, %r8d
shll $0x2, %r8d
subq %r8, %r9
movb 0x2(%rbx), %r8b
movb %r8b, -0x6(%r9)
leaq -0x3(%rbx), %r9
movq %r9, %r8
cmpb $0x0, -0x1(%r9)
jne 0x49589
leaq -0x4(%r8), %r9
cmpb $0x0, (%r8)
je 0x49575
movzwl -0x1(%r8), %r9d
xorl %r8d, %r8d
movzwl %r9w, %r11d
cmpl %r12d, %r8d
jae 0x4963d
leaq (%rsi,%rax), %r13
addq $-0x4, %r13
leaq 0x4(%rbx), %r10
cmpq %r13, %r10
jae 0x495c6
movzwl (%r10), %r9d
addq $0x4, %r10
testl %r9d, %r9d
je 0x495aa
movzwl -0x2(%r10), %r10d
addl %r9d, %r10d
jmp 0x495d1
movl 0xc18(%rdi), %r10d
addl $0xc, %r10d
subl %r10d, %r11d
addl %r11d, %r8d
cmpl %r12d, %r8d
jae 0x4963a
leal -0x1(%rdx), %r8d
cmpl %ecx, %r8d
jne 0x495f3
leal (%r10,%rdx,4), %edx
subl %edx, %eax
addl $-0x4, %eax
movl %eax, %r8d
jmp 0x49611
leaq -0x3(%rbx), %rdx
movq %rdx, %rax
cmpb $0x0, -0x1(%rdx)
jne 0x49609
leaq -0x4(%rax), %rdx
cmpb $0x0, (%rax)
je 0x495f7
movzwl -0x1(%rax), %r8d
subl %r10d, %r8d
cmpl %r12d, %r8d
jae 0x4963a
movw %r10w, (%rbx)
movw $0x0, 0x2(%rbx)
cmpb $0x0, 0x20(%rbp)
je 0x49665
movq 0x8(%r15), %rax
movq 0x80(%rax), %r8
movl 0x3b8(%rdi), %r9d
jmp 0x4966b
movl %r10d, %r11d
movq 0x18(%rbp), %rax
movq 0x10(%rbp), %rcx
movw %r11w, (%rbx)
movw %r8w, 0x2(%rbx)
movl %r11d, (%rcx)
movl %r8d, (%rax)
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
xorl %r8d, %r8d
xorl %r9d, %r9d
movl %ecx, %edx
movl $0x1, %ecx
callq 0x45f80
movzwl 0x2(%rbx), %r8d
cmpl %r12d, %r8d
jae 0x49692
movq %r15, %rdi
movl $0x7f, %esi
callq 0x37328
movb $0x1, %al
jmp 0x49656
movzwl (%rbx), %r11d
movl %r8d, (%r14)
jmp 0x4963d
|
extend_area_on_page:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
push rax
mov r14, r9
mov r12d, r8d
mov rbx, rdx
mov r15, rdi
movzx edx, byte ptr [rsi+8]
mov rdi, [rdi]
mov eax, [rdi+7BCh]
movzx r9d, word ptr [rbx]
test r9w, r9w
jz short loc_49529
movzx r8d, word ptr [rbx+2]
add [r14], r8d
jmp short loc_49591
loc_49529:
movzx r8d, byte ptr [rbx+2]
cmp r8, 0FFh
jz short loc_4954C
lea r9, [rsi+rax]
shl r8d, 2
sub r9, r8
mov r8b, [rbx+3]
mov [r9-5], r8b
jmp short loc_49554
loc_4954C:
mov r8b, [rbx+3]
mov [rsi+9], r8b
loc_49554:
cmp r8b, 0FFh
jz short loc_49571
lea r9, [rsi+rax]
movzx r8d, r8b
shl r8d, 2
sub r9, r8
mov r8b, [rbx+2]
mov [r9-6], r8b
loc_49571:
lea r9, [rbx-3]
loc_49575:
mov r8, r9
cmp byte ptr [r9-1], 0
jnz short loc_49589
lea r9, [r8-4]
cmp byte ptr [r8], 0
jz short loc_49575
loc_49589:
movzx r9d, word ptr [r8-1]
xor r8d, r8d
loc_49591:
movzx r11d, r9w
cmp r8d, r12d
jnb loc_4963D
lea r13, [rsi+rax]
add r13, 0FFFFFFFFFFFFFFFCh
lea r10, [rbx+4]
loc_495AA:
cmp r10, r13
jnb short loc_495C6
movzx r9d, word ptr [r10]
add r10, 4
test r9d, r9d
jz short loc_495AA
movzx r10d, word ptr [r10-2]
add r10d, r9d
jmp short loc_495D1
loc_495C6:
mov r10d, [rdi+0C18h]
add r10d, 0Ch
loc_495D1:
sub r11d, r10d
add r8d, r11d
cmp r8d, r12d
jnb short loc_4963A
lea r8d, [rdx-1]
cmp r8d, ecx
jnz short loc_495F3
lea edx, [r10+rdx*4]
sub eax, edx
add eax, 0FFFFFFFCh
mov r8d, eax
jmp short loc_49611
loc_495F3:
lea rdx, [rbx-3]
loc_495F7:
mov rax, rdx
cmp byte ptr [rdx-1], 0
jnz short loc_49609
lea rdx, [rax-4]
cmp byte ptr [rax], 0
jz short loc_495F7
loc_49609:
movzx r8d, word ptr [rax-1]
sub r8d, r10d
loc_49611:
cmp r8d, r12d
jnb short loc_4963A
mov [rbx], r10w
mov word ptr [rbx+2], 0
cmp [rbp+arg_10], 0
jz short loc_49665
mov rax, [r15+8]
mov r8, [rax+80h]
mov r9d, [rdi+3B8h]
jmp short loc_4966B
loc_4963A:
mov r11d, r10d
loc_4963D:
mov rax, [rbp+arg_8]
mov rcx, [rbp+arg_0]
mov [rbx], r11w
mov [rbx+2], r8w
mov [rcx], r11d
mov [rax], r8d
xor eax, eax
loc_49656:
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_49665:
xor r8d, r8d
xor r9d, r9d
loc_4966B:
mov edx, ecx
mov ecx, 1
call _ma_compact_block_page
movzx r8d, word ptr [rbx+2]
cmp r8d, r12d
jnb short loc_49692
mov rdi, r15
mov esi, 7Fh
call _ma_set_fatal_error
mov al, 1
jmp short loc_49656
loc_49692:
movzx r11d, word ptr [rbx]
mov [r14], r8d
jmp short loc_4963D
|
char extend_area_on_page(
long long a1,
long long a2,
unsigned __int16 *a3,
int a4,
unsigned int a5,
_DWORD *a6,
_DWORD *a7,
_DWORD *a8,
char a9)
{
int v13; // edx
_DWORD *v14; // rdi
long long v15; // rax
unsigned __int16 v16; // r9
long long v17; // r8
long long v18; // r8
long long v19; // r9
unsigned __int8 v20; // r8
char *v21; // r9
int v22; // r11d
unsigned __int16 *v23; // r10
int v24; // r9d
int v25; // r10d
_BYTE *v26; // rdx
_BYTE *v27; // rax
unsigned long long v28; // r8
unsigned int v29; // r9d
long long v31; // rdx
long long v32; // rcx
int v33; // r9d
v13 = *(unsigned __int8 *)(a2 + 8);
v14 = *(_DWORD **)a1;
v15 = (unsigned int)v14[495];
v16 = *a3;
if ( *a3 )
{
LODWORD(v17) = a3[1];
*a6 += v17;
}
else
{
v18 = *((unsigned __int8 *)a3 + 2);
if ( v18 == 255 )
{
v20 = *((_BYTE *)a3 + 3);
*(_BYTE *)(a2 + 9) = v20;
}
else
{
v19 = a2 + v15 - (unsigned int)(4 * v18);
v20 = *((_BYTE *)a3 + 3);
*(_BYTE *)(v19 - 5) = v20;
}
if ( v20 != 0xFF )
*(_BYTE *)(a2 + v15 - 4 * (unsigned int)v20 - 6) = *((_BYTE *)a3 + 2);
v21 = (char *)a3 - 3;
do
{
v17 = (long long)v21;
if ( *(v21 - 1) )
break;
v21 -= 4;
}
while ( !*(_BYTE *)v17 );
v16 = *(_WORD *)(v17 - 1);
LODWORD(v17) = 0;
}
v22 = v16;
if ( (unsigned int)v17 < a5 )
{
v23 = a3 + 2;
while ( (unsigned long long)v23 < a2 + v15 - 4 )
{
v24 = *v23;
v23 += 2;
if ( v24 )
{
v25 = v24 + *(v23 - 1);
goto LABEL_18;
}
}
v25 = v14[774] + 12;
LABEL_18:
LODWORD(v17) = v22 - v25 + v17;
if ( (unsigned int)v17 >= a5 )
goto LABEL_28;
if ( v13 - 1 == a4 )
{
LODWORD(v17) = v15 - (v25 + 4 * v13) - 4;
}
else
{
v26 = (char *)a3 - 3;
do
{
v27 = v26;
if ( *(v26 - 1) )
break;
v26 -= 4;
}
while ( !*v27 );
LODWORD(v17) = *(unsigned __int16 *)(v27 - 1) - v25;
}
if ( (unsigned int)v17 >= a5 )
{
LABEL_28:
v22 = v25;
}
else
{
*a3 = v25;
a3[1] = 0;
if ( a9 )
{
v28 = *(_QWORD *)(*(_QWORD *)(a1 + 8) + 128LL);
v29 = v14[238];
}
else
{
v28 = 0LL;
v29 = 0;
}
ma_compact_block_page((long long)v14, a2, a4, 1, v28, v29);
v17 = a3[1];
if ( (unsigned int)v17 < a5 )
{
ma_set_fatal_error((_DWORD *)a1, 127, v31, v32, v17, v33);
return 1;
}
v22 = *a3;
*a6 = v17;
}
}
*a3 = v22;
a3[1] = v17;
*a7 = v22;
*a8 = v17;
return 0;
}
|
extend_area_on_page:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
PUSH RAX
MOV R14,R9
MOV R12D,R8D
MOV RBX,RDX
MOV R15,RDI
MOVZX EDX,byte ptr [RSI + 0x8]
MOV RDI,qword ptr [RDI]
MOV EAX,dword ptr [RDI + 0x7bc]
MOVZX R9D,word ptr [RBX]
TEST R9W,R9W
JZ 0x00149529
MOVZX R8D,word ptr [RBX + 0x2]
ADD dword ptr [R14],R8D
JMP 0x00149591
LAB_00149529:
MOVZX R8D,byte ptr [RBX + 0x2]
CMP R8,0xff
JZ 0x0014954c
LEA R9,[RSI + RAX*0x1]
SHL R8D,0x2
SUB R9,R8
MOV R8B,byte ptr [RBX + 0x3]
MOV byte ptr [R9 + -0x5],R8B
JMP 0x00149554
LAB_0014954c:
MOV R8B,byte ptr [RBX + 0x3]
MOV byte ptr [RSI + 0x9],R8B
LAB_00149554:
CMP R8B,0xff
JZ 0x00149571
LEA R9,[RSI + RAX*0x1]
MOVZX R8D,R8B
SHL R8D,0x2
SUB R9,R8
MOV R8B,byte ptr [RBX + 0x2]
MOV byte ptr [R9 + -0x6],R8B
LAB_00149571:
LEA R9,[RBX + -0x3]
LAB_00149575:
MOV R8,R9
CMP byte ptr [R9 + -0x1],0x0
JNZ 0x00149589
LEA R9,[R8 + -0x4]
CMP byte ptr [R8],0x0
JZ 0x00149575
LAB_00149589:
MOVZX R9D,word ptr [R8 + -0x1]
XOR R8D,R8D
LAB_00149591:
MOVZX R11D,R9W
CMP R8D,R12D
JNC 0x0014963d
LEA R13,[RSI + RAX*0x1]
ADD R13,-0x4
LEA R10,[RBX + 0x4]
LAB_001495aa:
CMP R10,R13
JNC 0x001495c6
MOVZX R9D,word ptr [R10]
ADD R10,0x4
TEST R9D,R9D
JZ 0x001495aa
MOVZX R10D,word ptr [R10 + -0x2]
ADD R10D,R9D
JMP 0x001495d1
LAB_001495c6:
MOV R10D,dword ptr [RDI + 0xc18]
ADD R10D,0xc
LAB_001495d1:
SUB R11D,R10D
ADD R8D,R11D
CMP R8D,R12D
JNC 0x0014963a
LEA R8D,[RDX + -0x1]
CMP R8D,ECX
JNZ 0x001495f3
LEA EDX,[R10 + RDX*0x4]
SUB EAX,EDX
ADD EAX,-0x4
MOV R8D,EAX
JMP 0x00149611
LAB_001495f3:
LEA RDX,[RBX + -0x3]
LAB_001495f7:
MOV RAX,RDX
CMP byte ptr [RDX + -0x1],0x0
JNZ 0x00149609
LEA RDX,[RAX + -0x4]
CMP byte ptr [RAX],0x0
JZ 0x001495f7
LAB_00149609:
MOVZX R8D,word ptr [RAX + -0x1]
SUB R8D,R10D
LAB_00149611:
CMP R8D,R12D
JNC 0x0014963a
MOV word ptr [RBX],R10W
MOV word ptr [RBX + 0x2],0x0
CMP byte ptr [RBP + 0x20],0x0
JZ 0x00149665
MOV RAX,qword ptr [R15 + 0x8]
MOV R8,qword ptr [RAX + 0x80]
MOV R9D,dword ptr [RDI + 0x3b8]
JMP 0x0014966b
LAB_0014963a:
MOV R11D,R10D
LAB_0014963d:
MOV RAX,qword ptr [RBP + 0x18]
MOV RCX,qword ptr [RBP + 0x10]
MOV word ptr [RBX],R11W
MOV word ptr [RBX + 0x2],R8W
MOV dword ptr [RCX],R11D
MOV dword ptr [RAX],R8D
XOR EAX,EAX
LAB_00149656:
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_00149665:
XOR R8D,R8D
XOR R9D,R9D
LAB_0014966b:
MOV EDX,ECX
MOV ECX,0x1
CALL 0x00145f80
MOVZX R8D,word ptr [RBX + 0x2]
CMP R8D,R12D
JNC 0x00149692
MOV RDI,R15
MOV ESI,0x7f
CALL 0x00137328
MOV AL,0x1
JMP 0x00149656
LAB_00149692:
MOVZX R11D,word ptr [RBX]
MOV dword ptr [R14],R8D
JMP 0x0014963d
|
int8
extend_area_on_page(long *param_1,long param_2,ushort *param_3,int param_4,uint param_5,
uint *param_6,uint *param_7,uint *param_8,char param_9)
{
byte bVar1;
ushort uVar2;
uint uVar3;
long lVar4;
char *pcVar5;
ushort *puVar6;
ulong uVar7;
char *pcVar8;
byte bVar9;
uint uVar10;
int8 uVar11;
int4 uVar12;
uint uVar13;
ushort *puVar14;
bVar1 = *(byte *)(param_2 + 8);
lVar4 = *param_1;
uVar3 = *(uint *)(lVar4 + 0x7bc);
uVar7 = (ulong)uVar3;
uVar2 = *param_3;
if (uVar2 == 0) {
if ((byte)param_3[1] == 0xff) {
bVar9 = *(byte *)((long)param_3 + 3);
*(byte *)(param_2 + 9) = bVar9;
}
else {
bVar9 = *(byte *)((long)param_3 + 3);
*(byte *)(param_2 + uVar7 + (ulong)(byte)param_3[1] * -4 + -5) = bVar9;
}
if (bVar9 != 0xff) {
*(char *)(param_2 + uVar7 + (ulong)bVar9 * -4 + -6) = (char)param_3[1];
}
pcVar5 = (char *)((long)param_3 + -3);
do {
pcVar8 = pcVar5;
if (pcVar8[-1] != '\0') break;
pcVar5 = pcVar8 + -4;
} while (*pcVar8 == '\0');
uVar2 = *(ushort *)(pcVar8 + -1);
uVar10 = 0;
}
else {
uVar10 = (uint)param_3[1];
*param_6 = *param_6 + (uint)param_3[1];
}
uVar13 = (uint)uVar2;
if (uVar10 < param_5) {
puVar6 = param_3 + 2;
do {
puVar14 = puVar6;
if ((ushort *)(param_2 + uVar7 + -4) <= puVar14) {
uVar13 = *(int *)(lVar4 + 0xc18) + 0xc;
goto LAB_001495d1;
}
puVar6 = puVar14 + 2;
} while (*puVar14 == 0);
uVar13 = (uint)puVar14[1] + (uint)*puVar14;
LAB_001495d1:
uVar10 = uVar10 + (uVar2 - uVar13);
if (uVar10 < param_5) {
if (bVar1 - 1 == param_4) {
uVar10 = (uVar3 - (uVar13 + (uint)bVar1 * 4)) - 4;
}
else {
pcVar5 = (char *)((long)param_3 + -3);
do {
pcVar8 = pcVar5;
if (pcVar8[-1] != '\0') break;
pcVar5 = pcVar8 + -4;
} while (*pcVar8 == '\0');
uVar10 = *(ushort *)(pcVar8 + -1) - uVar13;
}
if (uVar10 < param_5) {
*param_3 = (ushort)uVar13;
param_3[1] = 0;
if (param_9 == '\0') {
uVar11 = 0;
uVar12 = 0;
}
else {
uVar11 = *(int8 *)(param_1[1] + 0x80);
uVar12 = *(int4 *)(lVar4 + 0x3b8);
}
_ma_compact_block_page(lVar4,param_2,param_4,1,uVar11,uVar12);
uVar10 = (uint)param_3[1];
if (uVar10 < param_5) {
_ma_set_fatal_error(param_1,0x7f);
return 1;
}
uVar13 = (uint)*param_3;
*param_6 = uVar10;
}
}
}
*param_3 = (ushort)uVar13;
param_3[1] = (ushort)uVar10;
*param_7 = uVar13;
*param_8 = uVar10;
return 0;
}
|
|
61,838 |
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;
}
|
O2
|
c
|
stbi__get8(stbi__context*):
pushq %rbx
movq %rdi, %rbx
movq 0xc0(%rdi), %rax
cmpq 0xc8(%rdi), %rax
jb 0x3d235
cmpl $0x0, 0x30(%rbx)
je 0x3d244
movq %rbx, %rdi
callq 0x3d248
movq 0xc0(%rbx), %rax
leaq 0x1(%rax), %rcx
movq %rcx, 0xc0(%rbx)
movb (%rax), %al
popq %rbx
retq
xorl %eax, %eax
jmp 0x3d242
|
_ZL10stbi__get8P13stbi__context:
push rbx
mov rbx, rdi
mov rax, [rdi+0C0h]
cmp rax, [rdi+0C8h]
jb short loc_3D235
cmp dword ptr [rbx+30h], 0
jz short loc_3D244
mov rdi, rbx
call _ZL19stbi__refill_bufferP13stbi__context; stbi__refill_buffer(stbi__context *)
mov rax, [rbx+0C0h]
loc_3D235:
lea rcx, [rax+1]
mov [rbx+0C0h], rcx
mov al, [rax]
loc_3D242:
pop rbx
retn
loc_3D244:
xor eax, eax
jmp short loc_3D242
|
char stbi__get8(long long a1)
{
unsigned long long v1; // rax
v1 = *(_QWORD *)(a1 + 192);
if ( v1 < *(_QWORD *)(a1 + 200) )
goto LABEL_4;
if ( *(_DWORD *)(a1 + 48) )
{
stbi__refill_buffer(a1);
v1 = *(_QWORD *)(a1 + 192);
LABEL_4:
*(_QWORD *)(a1 + 192) = v1 + 1;
return *(_BYTE *)v1;
}
return 0;
}
|
stbi__get8:
PUSH RBX
MOV RBX,RDI
MOV RAX,qword ptr [RDI + 0xc0]
CMP RAX,qword ptr [RDI + 0xc8]
JC 0x0013d235
CMP dword ptr [RBX + 0x30],0x0
JZ 0x0013d244
MOV RDI,RBX
CALL 0x0013d248
MOV RAX,qword ptr [RBX + 0xc0]
LAB_0013d235:
LEA RCX,[RAX + 0x1]
MOV qword ptr [RBX + 0xc0],RCX
MOV AL,byte ptr [RAX]
LAB_0013d242:
POP RBX
RET
LAB_0013d244:
XOR EAX,EAX
JMP 0x0013d242
|
/* stbi__get8(stbi__context*) */
int8 stbi__get8(stbi__context *param_1)
{
int1 *puVar1;
puVar1 = *(int1 **)(param_1 + 0xc0);
if (*(int1 **)(param_1 + 200) <= puVar1) {
if (*(int *)(param_1 + 0x30) == 0) {
return 0;
}
stbi__refill_buffer(param_1);
puVar1 = *(int1 **)(param_1 + 0xc0);
}
*(int1 **)(param_1 + 0xc0) = puVar1 + 1;
return CONCAT71((int7)((ulong)puVar1 >> 8),*puVar1);
}
|
|
61,839 |
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;
}
|
O3
|
c
|
stbi__get8(stbi__context*):
pushq %rbx
movq %rdi, %rbx
movq 0xc0(%rdi), %rax
cmpq 0xc8(%rdi), %rax
jb 0x3c5ec
cmpl $0x0, 0x30(%rbx)
je 0x3c5fb
movq %rbx, %rdi
callq 0x3c5ff
movq 0xc0(%rbx), %rax
leaq 0x1(%rax), %rcx
movq %rcx, 0xc0(%rbx)
movb (%rax), %al
popq %rbx
retq
xorl %eax, %eax
jmp 0x3c5f9
|
_ZL10stbi__get8P13stbi__context:
push rbx
mov rbx, rdi
mov rax, [rdi+0C0h]
cmp rax, [rdi+0C8h]
jb short loc_3C5EC
cmp dword ptr [rbx+30h], 0
jz short loc_3C5FB
mov rdi, rbx
call _ZL19stbi__refill_bufferP13stbi__context; stbi__refill_buffer(stbi__context *)
mov rax, [rbx+0C0h]
loc_3C5EC:
lea rcx, [rax+1]
mov [rbx+0C0h], rcx
mov al, [rax]
loc_3C5F9:
pop rbx
retn
loc_3C5FB:
xor eax, eax
jmp short loc_3C5F9
|
char stbi__get8(long long a1)
{
unsigned long long v1; // rax
v1 = *(_QWORD *)(a1 + 192);
if ( v1 < *(_QWORD *)(a1 + 200) )
goto LABEL_4;
if ( *(_DWORD *)(a1 + 48) )
{
stbi__refill_buffer(a1);
v1 = *(_QWORD *)(a1 + 192);
LABEL_4:
*(_QWORD *)(a1 + 192) = v1 + 1;
return *(_BYTE *)v1;
}
return 0;
}
|
stbi__get8:
PUSH RBX
MOV RBX,RDI
MOV RAX,qword ptr [RDI + 0xc0]
CMP RAX,qword ptr [RDI + 0xc8]
JC 0x0013c5ec
CMP dword ptr [RBX + 0x30],0x0
JZ 0x0013c5fb
MOV RDI,RBX
CALL 0x0013c5ff
MOV RAX,qword ptr [RBX + 0xc0]
LAB_0013c5ec:
LEA RCX,[RAX + 0x1]
MOV qword ptr [RBX + 0xc0],RCX
MOV AL,byte ptr [RAX]
LAB_0013c5f9:
POP RBX
RET
LAB_0013c5fb:
XOR EAX,EAX
JMP 0x0013c5f9
|
/* stbi__get8(stbi__context*) */
int8 stbi__get8(stbi__context *param_1)
{
int1 *puVar1;
puVar1 = *(int1 **)(param_1 + 0xc0);
if (*(int1 **)(param_1 + 200) <= puVar1) {
if (*(int *)(param_1 + 0x30) == 0) {
return 0;
}
stbi__refill_buffer(param_1);
puVar1 = *(int1 **)(param_1 + 0xc0);
}
*(int1 **)(param_1 + 0xc0) = puVar1 + 1;
return CONCAT71((int7)((ulong)puVar1 >> 8),*puVar1);
}
|
|
61,840 |
minja::Parser::parseIdentifier()
|
monkey531[P]llama/common/minja.hpp
|
std::shared_ptr<VariableExpr> parseIdentifier() {
static std::regex ident_regex(R"((?!(?:not|is|and|or|del)\b)[a-zA-Z_]\w*)");
auto location = get_location();
auto ident = consumeToken(ident_regex);
if (ident.empty())
return nullptr;
return std::make_shared<VariableExpr>(location, ident);
}
|
O1
|
cpp
|
minja::Parser::parseIdentifier():
pushq %r14
pushq %rbx
subq $0x48, %rsp
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x8b802(%rip), %rax # 0xec1b8
movb (%rax), %al
testb %al, %al
je 0x60a78
movq (%r14), %rax
movq %rax, 0x10(%rsp)
movq 0x8(%r14), %rax
movq %rax, 0x18(%rsp)
testq %rax, %rax
je 0x609eb
movq 0x8a5b3(%rip), %rcx # 0xeaf90
cmpb $0x0, (%rcx)
je 0x609e7
incl 0x8(%rax)
jmp 0x609eb
lock
incl 0x8(%rax)
movq 0x20(%r14), %rax
subq 0x10(%r14), %rax
movq %rax, 0x20(%rsp)
leaq 0x8b799(%rip), %rdx # 0xec198
leaq 0x28(%rsp), %rdi
movq %r14, %rsi
movl $0x1, %ecx
callq 0x602f8
cmpq $0x0, 0x30(%rsp)
je 0x60a3d
movq $0x0, (%rbx)
leaq 0x8(%rbx), %rdi
leaq 0xf(%rsp), %rdx
leaq 0x10(%rsp), %rcx
leaq 0x28(%rsp), %r8
movq %rbx, %rsi
callq 0x7afa6
jmp 0x60a43
xorps %xmm0, %xmm0
movups %xmm0, (%rbx)
leaq 0x38(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x60a5e
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x197a0
movq 0x18(%rsp), %rdi
testq %rdi, %rdi
je 0x60a6d
callq 0x34304
movq %rbx, %rax
addq $0x48, %rsp
popq %rbx
popq %r14
retq
leaq 0x8b739(%rip), %rdi # 0xec1b8
callq 0x19e60
testl %eax, %eax
je 0x609c0
leaq 0x8b705(%rip), %rdi # 0xec198
leaq 0x58833(%rip), %rsi # 0xb92cd
movl $0x10, %edx
callq 0x5fe3e
leaq -0xc05(%rip), %rdi # 0x5fea6
leaq 0x8b6e6(%rip), %rsi # 0xec198
leaq 0x8ad3f(%rip), %rdx # 0xeb7f8
callq 0x19670
leaq 0x8b6f3(%rip), %rdi # 0xec1b8
callq 0x194c0
jmp 0x609c0
movq %rax, %rbx
leaq 0x8b6df(%rip), %rdi # 0xec1b8
callq 0x194b0
jmp 0x60b12
movq %rax, %rbx
leaq 0x38(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x60b03
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x197a0
jmp 0x60b03
movq %rax, %rbx
movq 0x18(%rsp), %rdi
testq %rdi, %rdi
je 0x60b12
callq 0x34304
movq %rbx, %rdi
callq 0x19e00
|
_ZN5minja6Parser15parseIdentifierEv:
push r14
push rbx
sub rsp, 48h
mov r14, rsi
mov rbx, rdi
lea rax, _ZGVZN5minja6Parser15parseIdentifierEvE11ident_regexB5cxx11; `guard variable for'minja::Parser::parseIdentifier(void)::ident_regex
mov al, [rax]
test al, al
jz loc_60A78
loc_609C0:
mov rax, [r14]
mov [rsp+58h+var_48], rax
mov rax, [r14+8]
mov [rsp+58h+var_40], rax
test rax, rax
jz short loc_609EB
mov rcx, cs:__libc_single_threaded_ptr
cmp byte ptr [rcx], 0
jz short loc_609E7
inc dword ptr [rax+8]
jmp short loc_609EB
loc_609E7:
lock inc dword ptr [rax+8]
loc_609EB:
mov rax, [r14+20h]
sub rax, [r14+10h]
mov [rsp+58h+var_38], rax
lea rdx, _ZZN5minja6Parser15parseIdentifierEvE11ident_regexB5cxx11; minja::Parser::parseIdentifier(void)::ident_regex
lea rdi, [rsp+58h+var_30]
mov rsi, r14
mov ecx, 1
call _ZN5minja6Parser12consumeTokenERKNSt7__cxx1111basic_regexIcNS1_12regex_traitsIcEEEENS_13SpaceHandlingE; minja::Parser::consumeToken(std::basic_regex<char,std::regex_traits<char>> const&,minja::SpaceHandling)
cmp [rsp+58h+var_28], 0
jz short loc_60A3D
mov qword ptr [rbx], 0
lea rdi, [rbx+8]
lea rdx, [rsp+58h+var_49]
lea rcx, [rsp+58h+var_48]
lea r8, [rsp+58h+var_30]
mov rsi, rbx
call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EEC2IN5minja12VariableExprESaIS5_EJRNS4_8LocationERNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEEERPT_St20_Sp_alloc_shared_tagIT0_EDpOT1_; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::__shared_count<minja::VariableExpr,std::allocator<minja::VariableExpr>,minja::Location &,std::string &>(minja::VariableExpr *&,std::_Sp_alloc_shared_tag<std::allocator<minja::VariableExpr>>,minja::Location &,std::string &)
jmp short loc_60A43
loc_60A3D:
xorps xmm0, xmm0
movups xmmword ptr [rbx], xmm0
loc_60A43:
lea rax, [rsp+58h+var_20]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_60A5E
mov rsi, [rsp+58h+var_20]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_60A5E:
mov rdi, [rsp+58h+var_40]
test rdi, rdi
jz short loc_60A6D
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_60A6D:
mov rax, rbx
add rsp, 48h
pop rbx
pop r14
retn
loc_60A78:
lea rdi, _ZGVZN5minja6Parser15parseIdentifierEvE11ident_regexB5cxx11; __guard *
call ___cxa_guard_acquire
test eax, eax
jz loc_609C0
lea rdi, _ZZN5minja6Parser15parseIdentifierEvE11ident_regexB5cxx11; minja::Parser::parseIdentifier(void)::ident_regex
lea rsi, aNotIsAndOrDelB; "(?!(?:not|is|and|or|del)\\b)[a-zA-Z_]\\"...
mov edx, 10h
call _ZNSt7__cxx1111basic_regexIcNS_12regex_traitsIcEEEC2EPKcNSt15regex_constants18syntax_option_typeE; std::basic_regex<char,std::regex_traits<char>>::basic_regex(char const*,std::regex_constants::syntax_option_type)
lea rdi, _ZNSt7__cxx1111basic_regexIcNS_12regex_traitsIcEEED2Ev; lpfunc
lea rsi, _ZZN5minja6Parser15parseIdentifierEvE11ident_regexB5cxx11; obj
lea rdx, __dso_handle; lpdso_handle
call ___cxa_atexit
lea rdi, _ZGVZN5minja6Parser15parseIdentifierEvE11ident_regexB5cxx11; __guard *
call ___cxa_guard_release
jmp loc_609C0
mov rbx, rax
lea rdi, _ZGVZN5minja6Parser15parseIdentifierEvE11ident_regexB5cxx11; __guard *
call ___cxa_guard_abort
jmp short loc_60B12
mov rbx, rax
lea rax, [rsp+arg_30]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_60B03
mov rsi, [rsp+arg_30]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_60B03
mov rbx, rax
loc_60B03:
mov rdi, [rsp+arg_10]
test rdi, rdi
jz short loc_60B12
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_60B12:
mov rdi, rbx
call __Unwind_Resume
|
minja::Parser * minja::Parser::parseIdentifier(minja::Parser *this, long long *a2)
{
volatile signed __int32 *v2; // rax
char v4; // [rsp+Fh] [rbp-49h] BYREF
long long v5; // [rsp+10h] [rbp-48h] BYREF
volatile signed __int32 *v6; // [rsp+18h] [rbp-40h]
long long v7; // [rsp+20h] [rbp-38h]
void *v8[2]; // [rsp+28h] [rbp-30h] BYREF
long long v9; // [rsp+38h] [rbp-20h] BYREF
if ( !(_BYTE)`guard variable for'minja::Parser::parseIdentifier(void)::ident_regex[abi:cxx11]
&& __cxa_guard_acquire(&`guard variable for'minja::Parser::parseIdentifier(void)::ident_regex[abi:cxx11]) )
{
std::basic_regex<char,std::regex_traits<char>>::basic_regex(
(long long)&minja::Parser::parseIdentifier(void)::ident_regex[abi:cxx11],
"(?!(?:not|is|and|or|del)\\b)[a-zA-Z_]\\w*",
0x10u);
__cxa_atexit(
(void (*)(void *))std::basic_regex<char,std::regex_traits<char>>::~basic_regex,
&minja::Parser::parseIdentifier(void)::ident_regex[abi:cxx11],
&_dso_handle);
__cxa_guard_release(&`guard variable for'minja::Parser::parseIdentifier(void)::ident_regex[abi:cxx11]);
}
v5 = *a2;
v2 = (volatile signed __int32 *)a2[1];
v6 = v2;
if ( v2 )
{
if ( _libc_single_threaded )
++*((_DWORD *)v2 + 2);
else
_InterlockedIncrement(v2 + 2);
}
v7 = a2[4] - a2[2];
minja::Parser::consumeToken(
(long long)v8,
(long long)a2,
(long long)&minja::Parser::parseIdentifier(void)::ident_regex[abi:cxx11],
1u);
if ( v8[1] )
{
*(_QWORD *)this = 0LL;
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::__shared_count<minja::VariableExpr,std::allocator<minja::VariableExpr>,minja::Location &,std::string &>(
(char *)this + 8,
this,
&v4,
&v5,
v8);
}
else
{
*(_OWORD *)this = 0LL;
}
if ( v8[0] != &v9 )
operator delete(v8[0], v9 + 1);
if ( v6 )
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v6);
return this;
}
|
parseIdentifier:
PUSH R14
PUSH RBX
SUB RSP,0x48
MOV R14,RSI
MOV RBX,RDI
LEA RAX,[0x1ec1b8]
MOV AL,byte ptr [RAX]
TEST AL,AL
JZ 0x00160a78
LAB_001609c0:
MOV RAX,qword ptr [R14]
MOV qword ptr [RSP + 0x10],RAX
MOV RAX,qword ptr [R14 + 0x8]
MOV qword ptr [RSP + 0x18],RAX
TEST RAX,RAX
JZ 0x001609eb
MOV RCX,qword ptr [0x001eaf90]
CMP byte ptr [RCX],0x0
JZ 0x001609e7
INC dword ptr [RAX + 0x8]
JMP 0x001609eb
LAB_001609e7:
INC.LOCK dword ptr [RAX + 0x8]
LAB_001609eb:
MOV RAX,qword ptr [R14 + 0x20]
SUB RAX,qword ptr [R14 + 0x10]
MOV qword ptr [RSP + 0x20],RAX
LAB_001609f8:
LEA RDX,[0x1ec198]
LEA RDI,[RSP + 0x28]
MOV RSI,R14
MOV ECX,0x1
CALL 0x001602f8
CMP qword ptr [RSP + 0x30],0x0
JZ 0x00160a3d
MOV qword ptr [RBX],0x0
LEA RDI,[RBX + 0x8]
LAB_00160a24:
LEA RDX,[RSP + 0xf]
LEA RCX,[RSP + 0x10]
LEA R8,[RSP + 0x28]
MOV RSI,RBX
CALL 0x0017afa6
JMP 0x00160a43
LAB_00160a3d:
XORPS XMM0,XMM0
MOVUPS xmmword ptr [RBX],XMM0
LAB_00160a43:
LEA RAX,[RSP + 0x38]
MOV RDI,qword ptr [RAX + -0x10]
CMP RDI,RAX
JZ 0x00160a5e
MOV RSI,qword ptr [RSP + 0x38]
INC RSI
CALL 0x001197a0
LAB_00160a5e:
MOV RDI,qword ptr [RSP + 0x18]
TEST RDI,RDI
JZ 0x00160a6d
CALL 0x00134304
LAB_00160a6d:
MOV RAX,RBX
ADD RSP,0x48
POP RBX
POP R14
RET
LAB_00160a78:
LEA RDI,[0x1ec1b8]
CALL 0x00119e60
TEST EAX,EAX
JZ 0x001609c0
LAB_00160a8c:
LEA RDI,[0x1ec198]
LEA RSI,[0x1b92cd]
MOV EDX,0x10
CALL 0x0015fe3e
LAB_00160aa4:
LEA RDI,[0x15fea6]
LEA RSI,[0x1ec198]
LEA RDX,[0x1eb7f8]
CALL 0x00119670
LEA RDI,[0x1ec1b8]
CALL 0x001194c0
JMP 0x001609c0
|
/* minja::Parser::parseIdentifier() */
void minja::Parser::parseIdentifier(void)
{
_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *this;
int iVar1;
long in_RSI;
int8 *in_RDI;
long *local_30;
long local_28;
long local_20 [2];
if (parseIdentifier()::ident_regex_abi_cxx11_ == '\0') {
iVar1 = __cxa_guard_acquire(&parseIdentifier()::ident_regex_abi_cxx11_);
if (iVar1 != 0) {
/* try { // try from 00160a8c to 00160aa3 has its CatchHandler @ 00160acf */
std::__cxx11::basic_regex<char,std::__cxx11::regex_traits<char>>::basic_regex
((basic_regex<char,std::__cxx11::regex_traits<char>> *)
parseIdentifier()::ident_regex_abi_cxx11_,
"(?!(?:not|is|and|or|del)\\b)[a-zA-Z_]\\w*",0x10);
__cxa_atexit(std::__cxx11::basic_regex<char,std::__cxx11::regex_traits<char>>::~basic_regex,
parseIdentifier()::ident_regex_abi_cxx11_,&__dso_handle);
__cxa_guard_release(&parseIdentifier()::ident_regex_abi_cxx11_);
}
}
this = *(_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> **)(in_RSI + 8);
if (this != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) {
if (*PTR___libc_single_threaded_001eaf90 == '\0') {
LOCK();
*(int *)(this + 8) = *(int *)(this + 8) + 1;
UNLOCK();
}
else {
*(int *)(this + 8) = *(int *)(this + 8) + 1;
}
}
/* try { // try from 001609f8 to 00160a10 has its CatchHandler @ 00160b00 */
consumeToken(&local_30);
if (local_28 == 0) {
*in_RDI = 0;
in_RDI[1] = 0;
}
else {
*in_RDI = 0;
/* try { // try from 00160a24 to 00160a3a has its CatchHandler @ 00160ae0 */
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::
__shared_count<minja::VariableExpr,std::allocator<minja::VariableExpr>,minja::Location&,std::__cxx11::string&>
((__shared_count<(__gnu_cxx::_Lock_policy)2> *)(in_RDI + 1));
}
if (local_30 != local_20) {
operator_delete(local_30,local_20[0] + 1);
}
if (this != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) {
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(this);
}
return;
}
|
|
61,841 |
my_hash_sort_utf8mb4_nopad
|
eloqsql/strings/ctype-utf8.c
|
static void
my_hash_sort_utf8mb4_nopad(CHARSET_INFO *cs, const uchar *s, size_t slen,
ulong *nr1, ulong *nr2)
{
my_wc_t wc;
int res;
const uchar *e= s + slen;
MY_UNICASE_INFO *uni_plane= cs->caseinfo;
register ulong m1= *nr1, m2= *nr2;
while ((res= my_mb_wc_utf8mb4(cs, &wc, (uchar*) s, (uchar*) e)) > 0)
{
my_tosort_unicode(uni_plane, &wc, cs->state);
MY_HASH_ADD_16(m1, m2, (uint) (wc & 0xFFFF));
if (wc > 0xFFFF)
{
/*
Put the highest byte only if it is non-zero,
to make hash functions for utf8mb3 and utf8mb4
compatible for BMP characters.
This is useful to keep order of records in
test results, e.g. for "SHOW GRANTS".
*/
MY_HASH_ADD(m1, m2, (uint) ((wc >> 16) & 0xFF));
}
s+= res;
}
*nr1= m1;
*nr2= m2;
}
|
O3
|
c
|
my_hash_sort_utf8mb4_nopad:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %rdx, %r15
movq %rsi, %r12
addq %rsi, %r15
movq %rdi, -0x30(%rbp)
movq 0x78(%rdi), %r14
movq %rcx, -0x48(%rbp)
movq (%rcx), %r13
movq %r8, -0x50(%rbp)
movq (%r8), %rbx
leaq -0x38(%rbp), %rdi
movq %r15, %rdx
callq 0x338fa
testl %eax, %eax
jle 0x343fe
movq -0x30(%rbp), %rcx
movl 0xc(%rcx), %ecx
movl %ecx, -0x3c(%rbp)
movq %r14, -0x58(%rbp)
movq (%r14), %rcx
movq %rcx, -0x30(%rbp)
movq -0x38(%rbp), %rcx
movl $0xfffd, %esi # imm = 0xFFFD
cmpq -0x30(%rbp), %rcx
ja 0x34355
movq -0x58(%rbp), %rdx
movq 0x8(%rdx), %rsi
movq %rcx, %rdx
shrq $0x8, %rdx
movq (%rsi,%rdx,8), %rsi
testq %rsi, %rsi
je 0x34361
xorl %edx, %edx
cmpw $0x0, -0x3c(%rbp)
setns %dl
movzbl %cl, %ecx
leaq (%rcx,%rcx,2), %rcx
leaq (%rsi,%rcx,4), %rcx
movl 0x4(%rcx,%rdx,4), %esi
movq %rsi, -0x38(%rbp)
movl %esi, %edx
shrl $0x8, %edx
movq %rsi, %rcx
movl %r13d, %esi
andl $0x3f, %esi
addq %rbx, %rsi
movq %rcx, %rdi
movl $0xff, %r8d
andq %r8, %rdi
imulq %rsi, %rdi
movq %r13, %rsi
shlq $0x8, %rsi
addq %rdi, %rsi
xorq %r13, %rsi
movl %esi, %edi
andl $0x3f, %edi
addq %rbx, %rdi
addq $0x3, %rdi
andq %r8, %rdx
imulq %rdi, %rdx
movq %rsi, %r13
shlq $0x8, %r13
addq %rdx, %r13
xorq %rsi, %r13
leaq 0x6(%rbx), %r14
cmpq $0x10000, %rcx # imm = 0x10000
jb 0x343dd
movl %r13d, %edx
andl $0x3f, %edx
addq %r14, %rdx
shrl $0x10, %ecx
movzbl %cl, %ecx
imulq %rdx, %rcx
movq %r13, %rdx
shlq $0x8, %rdx
addq %rcx, %rdx
xorq %rdx, %r13
addq $0x9, %rbx
movq %rbx, %r14
jmp 0x343e0
movq %r14, %rbx
movl %eax, %eax
addq %rax, %r12
leaq -0x38(%rbp), %rdi
movq %r12, %rsi
movq %r15, %rdx
callq 0x338fa
testl %eax, %eax
jg 0x34315
jmp 0x34401
movq %rbx, %r14
movq -0x48(%rbp), %rax
movq %r13, (%rax)
movq -0x50(%rbp), %rax
movq %r14, (%rax)
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
|
my_hash_sort_utf8mb4_nopad:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 38h
mov r15, rdx
mov r12, rsi
add r15, rsi
mov [rbp+var_30], rdi
mov r14, [rdi+78h]
mov [rbp+var_48], rcx
mov r13, [rcx]
mov [rbp+var_50], r8
mov rbx, [r8]
lea rdi, [rbp+var_38]
mov rdx, r15
call my_mb_wc_utf8mb4_quick
test eax, eax
jle loc_343FE
mov rcx, [rbp+var_30]
mov ecx, [rcx+0Ch]
mov [rbp+var_3C], ecx
mov [rbp+var_58], r14
mov rcx, [r14]
mov [rbp+var_30], rcx
loc_34315:
mov rcx, [rbp+var_38]
mov esi, 0FFFDh
cmp rcx, [rbp+var_30]
ja short loc_34355
mov rdx, [rbp+var_58]
mov rsi, [rdx+8]
mov rdx, rcx
shr rdx, 8
mov rsi, [rsi+rdx*8]
test rsi, rsi
jz short loc_34361
xor edx, edx
cmp word ptr [rbp+var_3C], 0
setns dl
movzx ecx, cl
lea rcx, [rcx+rcx*2]
lea rcx, [rsi+rcx*4]
mov esi, [rcx+rdx*4+4]
loc_34355:
mov [rbp+var_38], rsi
mov edx, esi
shr edx, 8
mov rcx, rsi
loc_34361:
mov esi, r13d
and esi, 3Fh
add rsi, rbx
mov rdi, rcx
mov r8d, 0FFh
and rdi, r8
imul rdi, rsi
mov rsi, r13
shl rsi, 8
add rsi, rdi
xor rsi, r13
mov edi, esi
and edi, 3Fh
add rdi, rbx
add rdi, 3
and rdx, r8
imul rdx, rdi
mov r13, rsi
shl r13, 8
add r13, rdx
xor r13, rsi
lea r14, [rbx+6]
cmp rcx, 10000h
jb short loc_343DD
mov edx, r13d
and edx, 3Fh
add rdx, r14
shr ecx, 10h
movzx ecx, cl
imul rcx, rdx
mov rdx, r13
shl rdx, 8
add rdx, rcx
xor r13, rdx
add rbx, 9
mov r14, rbx
jmp short loc_343E0
loc_343DD:
mov rbx, r14
loc_343E0:
mov eax, eax
add r12, rax
lea rdi, [rbp+var_38]
mov rsi, r12
mov rdx, r15
call my_mb_wc_utf8mb4_quick
test eax, eax
jg loc_34315
jmp short loc_34401
loc_343FE:
mov r14, rbx
loc_34401:
mov rax, [rbp+var_48]
mov [rax], r13
mov rax, [rbp+var_50]
mov [rax], r14
add rsp, 38h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
|
_QWORD * my_hash_sort_utf8mb4_nopad(
unsigned long long a1,
unsigned __int8 *a2,
long long a3,
long long *a4,
_QWORD *a5)
{
unsigned __int8 *v5; // r12
unsigned long long v6; // r15
unsigned long long *v7; // r14
long long v8; // r13
long long v9; // rbx
int v10; // eax
unsigned long long v11; // rcx
long long v12; // rsi
unsigned long long v13; // rdx
long long v14; // rsi
long long v15; // r14
_QWORD *result; // rax
unsigned long long *v17; // [rsp+8h] [rbp-58h]
int v20; // [rsp+24h] [rbp-3Ch]
unsigned long long v21; // [rsp+28h] [rbp-38h] BYREF
unsigned long long v22; // [rsp+30h] [rbp-30h]
v5 = a2;
v6 = (unsigned long long)&a2[a3];
v22 = a1;
v7 = *(unsigned long long **)(a1 + 120);
v8 = *a4;
v9 = *a5;
v10 = my_mb_wc_utf8mb4_quick(&v21, a2, (unsigned long long)&a2[a3]);
if ( v10 > 0 )
{
v20 = *(_DWORD *)(v22 + 12);
v17 = v7;
v22 = *v7;
while ( 1 )
{
v11 = v21;
v12 = 65533LL;
if ( v21 > v22 )
goto LABEL_6;
v13 = v21 >> 8;
v14 = *(_QWORD *)(v17[1] + 8 * (v21 >> 8));
if ( v14 )
break;
LABEL_7:
v8 ^= ((v9 + (v8 & 0x3F)) * (unsigned __int8)v11 + (v8 << 8)) ^ ((v9
+ (((unsigned __int8)v8 ^ (unsigned __int8)((v9 + (v8 & 0x3F)) * v11)) & 0x3F)
+ 3)
* (unsigned __int8)v13
+ ((v8 ^ ((v9 + (v8 & 0x3F)) * (unsigned __int8)v11
+ (v8 << 8))) << 8));
v15 = v9 + 6;
if ( v11 < 0x10000 )
{
v9 += 6LL;
}
else
{
v8 ^= (v15 + (v8 & 0x3F)) * BYTE2(v11) + (v8 << 8);
v9 += 9LL;
v15 = v9;
}
v5 += (unsigned int)v10;
v10 = my_mb_wc_utf8mb4_quick(&v21, v5, v6);
if ( v10 <= 0 )
goto LABEL_13;
}
v12 = *(unsigned int *)(v14 + 12LL * (unsigned __int8)v21 + 4LL * ((v20 & 0x8000u) == 0) + 4);
LABEL_6:
v21 = v12;
LODWORD(v13) = (unsigned int)v12 >> 8;
v11 = v12;
goto LABEL_7;
}
v15 = v9;
LABEL_13:
*a4 = v8;
result = a5;
*a5 = v15;
return result;
}
|
my_hash_sort_utf8mb4_nopad:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x38
MOV R15,RDX
MOV R12,RSI
ADD R15,RSI
MOV qword ptr [RBP + -0x30],RDI
MOV R14,qword ptr [RDI + 0x78]
MOV qword ptr [RBP + -0x48],RCX
MOV R13,qword ptr [RCX]
MOV qword ptr [RBP + -0x50],R8
MOV RBX,qword ptr [R8]
LEA RDI,[RBP + -0x38]
MOV RDX,R15
CALL 0x001338fa
TEST EAX,EAX
JLE 0x001343fe
MOV RCX,qword ptr [RBP + -0x30]
MOV ECX,dword ptr [RCX + 0xc]
MOV dword ptr [RBP + -0x3c],ECX
MOV qword ptr [RBP + -0x58],R14
MOV RCX,qword ptr [R14]
MOV qword ptr [RBP + -0x30],RCX
LAB_00134315:
MOV RCX,qword ptr [RBP + -0x38]
MOV ESI,0xfffd
CMP RCX,qword ptr [RBP + -0x30]
JA 0x00134355
MOV RDX,qword ptr [RBP + -0x58]
MOV RSI,qword ptr [RDX + 0x8]
MOV RDX,RCX
SHR RDX,0x8
MOV RSI,qword ptr [RSI + RDX*0x8]
TEST RSI,RSI
JZ 0x00134361
XOR EDX,EDX
CMP word ptr [RBP + -0x3c],0x0
SETNS DL
MOVZX ECX,CL
LEA RCX,[RCX + RCX*0x2]
LEA RCX,[RSI + RCX*0x4]
MOV ESI,dword ptr [RCX + RDX*0x4 + 0x4]
LAB_00134355:
MOV qword ptr [RBP + -0x38],RSI
MOV EDX,ESI
SHR EDX,0x8
MOV RCX,RSI
LAB_00134361:
MOV ESI,R13D
AND ESI,0x3f
ADD RSI,RBX
MOV RDI,RCX
MOV R8D,0xff
AND RDI,R8
IMUL RDI,RSI
MOV RSI,R13
SHL RSI,0x8
ADD RSI,RDI
XOR RSI,R13
MOV EDI,ESI
AND EDI,0x3f
ADD RDI,RBX
ADD RDI,0x3
AND RDX,R8
IMUL RDX,RDI
MOV R13,RSI
SHL R13,0x8
ADD R13,RDX
XOR R13,RSI
LEA R14,[RBX + 0x6]
CMP RCX,0x10000
JC 0x001343dd
MOV EDX,R13D
AND EDX,0x3f
ADD RDX,R14
SHR ECX,0x10
MOVZX ECX,CL
IMUL RCX,RDX
MOV RDX,R13
SHL RDX,0x8
ADD RDX,RCX
XOR R13,RDX
ADD RBX,0x9
MOV R14,RBX
JMP 0x001343e0
LAB_001343dd:
MOV RBX,R14
LAB_001343e0:
MOV EAX,EAX
ADD R12,RAX
LEA RDI,[RBP + -0x38]
MOV RSI,R12
MOV RDX,R15
CALL 0x001338fa
TEST EAX,EAX
JG 0x00134315
JMP 0x00134401
LAB_001343fe:
MOV R14,RBX
LAB_00134401:
MOV RAX,qword ptr [RBP + -0x48]
MOV qword ptr [RAX],R13
MOV RAX,qword ptr [RBP + -0x50]
MOV qword ptr [RAX],R14
ADD RSP,0x38
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
void my_hash_sort_utf8mb4_nopad(long param_1,long param_2,long param_3,ulong *param_4,long *param_5)
{
int4 uVar1;
ulong *puVar2;
uint uVar3;
ulong uVar4;
long lVar5;
long lVar6;
ulong uVar7;
ulong uVar8;
short local_44;
ulong local_40;
ulong local_38;
param_3 = param_3 + param_2;
puVar2 = *(ulong **)(param_1 + 0x78);
uVar8 = *param_4;
lVar6 = *param_5;
local_38 = param_1;
uVar3 = my_mb_wc_utf8mb4_quick(&local_40,param_2,param_3);
if (0 < (int)uVar3) {
uVar1 = *(int4 *)(local_38 + 0xc);
local_38 = *puVar2;
lVar5 = lVar6;
do {
uVar7 = 0xfffd;
if (local_38 < local_40) {
LAB_00134355:
uVar4 = uVar7 >> 8;
local_40 = uVar7;
}
else {
uVar4 = local_40 >> 8;
lVar6 = *(long *)(puVar2[1] + uVar4 * 8);
if (lVar6 != 0) {
local_44 = (short)uVar1;
uVar7 = (ulong)*(uint *)(lVar6 + (local_40 & 0xff) * 0xc + 4 + (ulong)(-1 < local_44) * 4)
;
goto LAB_00134355;
}
}
uVar8 = uVar8 * 0x100 + (local_40 & 0xff) * ((ulong)((uint)uVar8 & 0x3f) + lVar5) ^ uVar8;
uVar8 = uVar8 * 0x100 + (uVar4 & 0xff) * ((ulong)((uint)uVar8 & 0x3f) + lVar5 + 3) ^ uVar8;
lVar6 = lVar5 + 6;
if (0xffff < local_40) {
uVar8 = uVar8 ^ uVar8 * 0x100 +
(local_40 >> 0x10 & 0xff) * ((ulong)((uint)uVar8 & 0x3f) + lVar6);
lVar6 = lVar5 + 9;
}
param_2 = param_2 + (ulong)uVar3;
uVar3 = my_mb_wc_utf8mb4_quick(&local_40,param_2,param_3);
lVar5 = lVar6;
} while (0 < (int)uVar3);
}
*param_4 = uVar8;
*param_5 = lVar6;
return;
}
|
|
61,842 |
parse_pk_with_prefix(std::vector<std::pair<unsigned int, unsigned int>, std::allocator<std::pair<unsigned int, unsigned int>>>&, unsigned char*, unsigned int)
|
eloqsql/sql/log_event.cc
|
static void parse_pk_with_prefix(std::vector<Table_map_log_event::
Optional_metadata_fields::uint_pair> &vec,
unsigned char *field, unsigned int length)
{
unsigned char* p= field;
while (p < field + length)
{
unsigned int col_index= net_field_length(&p);
unsigned int col_prefix= net_field_length(&p);
vec.push_back(std::make_pair(col_index, col_prefix));
}
}
|
O0
|
cpp
|
parse_pk_with_prefix(std::vector<std::pair<unsigned int, unsigned int>, std::allocator<std::pair<unsigned int, unsigned int>>>&, unsigned char*, unsigned int):
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
movq -0x10(%rbp), %rcx
movl -0x14(%rbp), %edx
addq %rdx, %rcx
cmpq %rcx, %rax
jae 0x51fde
leaq -0x20(%rbp), %rdi
callq 0x70ff0
movl %eax, -0x24(%rbp)
leaq -0x20(%rbp), %rdi
callq 0x70ff0
movl %eax, -0x28(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x38(%rbp)
leaq -0x24(%rbp), %rdi
leaq -0x28(%rbp), %rsi
callq 0x6bbe0
movq -0x38(%rbp), %rdi
movq %rax, -0x30(%rbp)
leaq -0x30(%rbp), %rsi
callq 0x6bbb0
jmp 0x51f8b
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
|
_ZL20parse_pk_with_prefixRSt6vectorISt4pairIjjESaIS1_EEPhj:
push rbp
mov rbp, rsp
sub rsp, 40h
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov [rbp+var_14], edx
mov rax, [rbp+var_10]
mov [rbp+var_20], rax
loc_51F8B:
mov rax, [rbp+var_20]
mov rcx, [rbp+var_10]
mov edx, [rbp+var_14]
add rcx, rdx
cmp rax, rcx
jnb short loc_51FDE
lea rdi, [rbp+var_20]
call net_field_length
mov [rbp+var_24], eax
lea rdi, [rbp+var_20]
call net_field_length
mov [rbp+var_28], eax
mov rax, [rbp+var_8]
mov [rbp+var_38], rax
lea rdi, [rbp+var_24]
lea rsi, [rbp+var_28]
call _ZSt9make_pairIRjS0_ESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS2_INS3_IT0_E4typeEE6__typeEEOS4_OS9_; std::make_pair<uint &,uint &>(uint &&&,uint &&&)
mov rdi, [rbp+var_38]
mov [rbp+var_30], rax
lea rsi, [rbp+var_30]
call _ZNSt6vectorISt4pairIjjESaIS1_EE9push_backEOS1_; std::vector<std::pair<uint,uint>>::push_back(std::pair<uint,uint>&&)
jmp short loc_51F8B
loc_51FDE:
add rsp, 40h
pop rbp
retn
|
long long * parse_pk_with_prefix(long long a1, long long *a2, unsigned int a3)
{
long long *result; // rax
long long v4; // [rsp+8h] [rbp-38h]
long long v5; // [rsp+10h] [rbp-30h] BYREF
int v6; // [rsp+18h] [rbp-28h] BYREF
int v7; // [rsp+1Ch] [rbp-24h] BYREF
long long *v8; // [rsp+20h] [rbp-20h] BYREF
unsigned int v9; // [rsp+2Ch] [rbp-14h]
long long *v10; // [rsp+30h] [rbp-10h]
long long v11; // [rsp+38h] [rbp-8h]
v11 = a1;
v10 = a2;
v9 = a3;
v8 = a2;
while ( 1 )
{
result = v8;
if ( v8 >= (long long *)((char *)v10 + v9) )
break;
v7 = net_field_length(&v8, a2);
v6 = net_field_length(&v8, a2);
v4 = v11;
v5 = std::make_pair<unsigned int &,unsigned int &>(&v7, &v6);
a2 = &v5;
std::vector<std::pair<unsigned int,unsigned int>>::push_back(v4, &v5);
}
return result;
}
|
parse_pk_with_prefix:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x40
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV dword ptr [RBP + -0x14],EDX
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RBP + -0x20],RAX
LAB_00151f8b:
MOV RAX,qword ptr [RBP + -0x20]
MOV RCX,qword ptr [RBP + -0x10]
MOV EDX,dword ptr [RBP + -0x14]
ADD RCX,RDX
CMP RAX,RCX
JNC 0x00151fde
LEA RDI,[RBP + -0x20]
CALL 0x00170ff0
MOV dword ptr [RBP + -0x24],EAX
LEA RDI,[RBP + -0x20]
CALL 0x00170ff0
MOV dword ptr [RBP + -0x28],EAX
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RBP + -0x38],RAX
LEA RDI,[RBP + -0x24]
LEA RSI,[RBP + -0x28]
CALL 0x0016bbe0
MOV RDI,qword ptr [RBP + -0x38]
MOV qword ptr [RBP + -0x30],RAX
LEA RSI,[RBP + -0x30]
CALL 0x0016bbb0
JMP 0x00151f8b
LAB_00151fde:
ADD RSP,0x40
POP RBP
RET
|
/* parse_pk_with_prefix(std::vector<std::pair<unsigned int, unsigned int>,
std::allocator<std::pair<unsigned int, unsigned int> > >&, unsigned char*, unsigned int) */
void parse_pk_with_prefix(vector *param_1,uchar *param_2,uint param_3)
{
vector *this;
int8 local_38;
uint local_30;
uint local_2c;
uchar *local_28;
uint local_1c;
uchar *local_18;
vector *local_10;
local_28 = param_2;
local_1c = param_3;
local_18 = param_2;
local_10 = param_1;
while( true ) {
if (local_18 + local_1c <= local_28) break;
local_2c = net_field_length(&local_28);
local_30 = net_field_length(&local_28);
this = local_10;
local_38 = std::make_pair<unsigned_int&,unsigned_int&>(&local_2c,&local_30);
std::
vector<std::pair<unsigned_int,unsigned_int>,std::allocator<std::pair<unsigned_int,unsigned_int>>>
::push_back((vector<std::pair<unsigned_int,unsigned_int>,std::allocator<std::pair<unsigned_int,unsigned_int>>>
*)this,(pair *)&local_38);
}
return;
}
|
|
61,843 |
stmt_cursor_fetch
|
eloqsql/libmariadb/libmariadb/mariadb_stmt.c
|
static int stmt_cursor_fetch(MYSQL_STMT *stmt, uchar **row)
{
uchar buf[STMT_ID_LENGTH + 4];
MYSQL_DATA *result= &stmt->result;
if (stmt->state < MYSQL_STMT_USE_OR_STORE_CALLED)
{
SET_CLIENT_STMT_ERROR(stmt, CR_COMMANDS_OUT_OF_SYNC, SQLSTATE_UNKNOWN, 0);
return(1);
}
/* do we have some prefetched rows available ? */
if (stmt->result_cursor)
return(stmt_buffered_fetch(stmt, row));
if (stmt->upsert_status.server_status & SERVER_STATUS_LAST_ROW_SENT)
stmt->upsert_status.server_status&= ~SERVER_STATUS_LAST_ROW_SENT;
else
{
int4store(buf, stmt->stmt_id);
int4store(buf + STMT_ID_LENGTH, stmt->prefetch_rows);
if (stmt->mysql->methods->db_command(stmt->mysql, COM_STMT_FETCH, (char *)buf, sizeof(buf), 1, stmt))
{
UPDATE_STMT_ERROR(stmt);
return(1);
}
/* free previously allocated buffer */
ma_free_root(&result->alloc, MYF(MY_KEEP_PREALLOC));
result->data= 0;
result->rows= 0;
if (!stmt->mysql->options.extension->skip_read_response)
{
if (stmt->mysql->methods->db_stmt_read_all_rows(stmt))
return(1);
return(stmt_buffered_fetch(stmt, row));
}
}
/* no more cursor data available */
*row= NULL;
return(MYSQL_NO_DATA);
}
|
O0
|
c
|
stmt_cursor_fetch:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %fs:0x28, %rax
movq %rax, -0x8(%rbp)
movq %rdi, -0x20(%rbp)
movq %rsi, -0x28(%rbp)
movq -0x20(%rbp), %rax
addq $0x80, %rax
movq %rax, -0x30(%rbp)
movq -0x20(%rbp), %rax
cmpl $0x4, 0x50(%rax)
jae 0x58076
jmp 0x58007
movq -0x20(%rbp), %rax
movl $0x7de, 0x108(%rax) # imm = 0x7DE
movq -0x20(%rbp), %rdi
addq $0x30d, %rdi # imm = 0x30D
leaq 0x1f19a9(%rip), %rax # 0x2499d0
movq (%rax), %rsi
movl $0x5, %edx
callq 0x38140
movq -0x20(%rbp), %rax
movb $0x0, 0x312(%rax)
movq -0x20(%rbp), %rdi
addq $0x10c, %rdi # imm = 0x10C
leaq 0x1f198f(%rip), %rax # 0x2499e0
movq 0x70(%rax), %rsi
movl $0x200, %edx # imm = 0x200
callq 0x38140
movq -0x20(%rbp), %rax
movb $0x0, 0x30b(%rax)
movl $0x1, -0x14(%rbp)
jmp 0x582e2
movq -0x20(%rbp), %rax
cmpq $0x0, 0xe0(%rax)
je 0x58099
movq -0x20(%rbp), %rdi
movq -0x28(%rbp), %rsi
callq 0x5ce90
movl %eax, -0x14(%rbp)
jmp 0x582e2
movq -0x20(%rbp), %rax
movl 0xf4(%rax), %eax
andl $0x80, %eax
cmpl $0x0, %eax
je 0x580c8
movq -0x20(%rbp), %rax
movl 0xf4(%rax), %ecx
andl $0xffffff7f, %ecx # imm = 0xFFFFFF7F
movl %ecx, 0xf4(%rax)
jmp 0x582d0
jmp 0x580ca
movq -0x20(%rbp), %rax
movq 0x40(%rax), %rax
movb %al, -0x10(%rbp)
movq -0x20(%rbp), %rax
movq 0x40(%rax), %rax
shrq $0x8, %rax
movb %al, -0xf(%rbp)
movq -0x20(%rbp), %rax
movq 0x40(%rax), %rax
shrq $0x10, %rax
movb %al, -0xe(%rbp)
movq -0x20(%rbp), %rax
movq 0x40(%rax), %rax
shrq $0x18, %rax
movb %al, -0xd(%rbp)
jmp 0x58104
movq -0x20(%rbp), %rax
movq 0x318(%rax), %rax
movb %al, -0xc(%rbp)
movq -0x20(%rbp), %rax
movq 0x318(%rax), %rax
shrq $0x8, %rax
movb %al, -0xb(%rbp)
movq -0x20(%rbp), %rax
movq 0x318(%rax), %rax
shrq $0x10, %rax
movb %al, -0xa(%rbp)
movq -0x20(%rbp), %rax
movq 0x318(%rax), %rax
shrq $0x18, %rax
movb %al, -0x9(%rbp)
movq -0x20(%rbp), %rax
movq 0x38(%rax), %rax
movq 0x4d0(%rax), %rax
movq 0x10(%rax), %rax
movq -0x20(%rbp), %rcx
movq 0x38(%rcx), %rdi
leaq -0x10(%rbp), %rdx
movq -0x20(%rbp), %r9
movl $0x1c, %esi
movl $0x8, %ecx
movl $0x1, %r8d
callq *%rax
cmpl $0x0, %eax
je 0x58254
jmp 0x58188
movq -0x20(%rbp), %rax
movq 0x38(%rax), %rax
movl 0x90(%rax), %ecx
movq -0x20(%rbp), %rax
movl %ecx, 0x108(%rax)
movq -0x20(%rbp), %rdi
addq $0x30d, %rdi # imm = 0x30D
movq -0x20(%rbp), %rax
movq 0x38(%rax), %rsi
addq $0x297, %rsi # imm = 0x297
movl $0x5, %edx
callq 0x38140
movq -0x20(%rbp), %rax
movb $0x0, 0x312(%rax)
movq -0x20(%rbp), %rax
addq $0x10c, %rax # imm = 0x10C
movq %rax, -0x38(%rbp)
movq -0x20(%rbp), %rax
movq 0x38(%rax), %rax
addq $0x97, %rax
cmpq $0x0, %rax
je 0x58205
movq -0x20(%rbp), %rax
movq 0x38(%rax), %rax
addq $0x97, %rax
movq %rax, -0x40(%rbp)
jmp 0x5822b
movq -0x20(%rbp), %rax
movq 0x38(%rax), %rax
movl 0x90(%rax), %eax
subl $0x7d0, %eax # imm = 0x7D0
movl %eax, %eax
movl %eax, %ecx
leaq 0x1f17bd(%rip), %rax # 0x2499e0
movq (%rax,%rcx,8), %rax
movq %rax, -0x40(%rbp)
movq -0x38(%rbp), %rdi
movq -0x40(%rbp), %rsi
movl $0x200, %edx # imm = 0x200
callq 0x38140
movq -0x20(%rbp), %rax
movb $0x0, 0x30b(%rax)
movl $0x1, -0x14(%rbp)
jmp 0x582e2
movq -0x30(%rbp), %rdi
addq $0x10, %rdi
movl $0x1, %esi
callq 0x56820
movq -0x30(%rbp), %rax
movq $0x0, (%rax)
movq -0x30(%rbp), %rax
movq $0x0, 0x48(%rax)
movq -0x20(%rbp), %rax
movq 0x38(%rax), %rax
movq 0x480(%rax), %rax
cmpb $0x0, 0x148(%rax)
jne 0x582ce
movq -0x20(%rbp), %rax
movq 0x38(%rax), %rax
movq 0x4d0(%rax), %rax
movq 0x60(%rax), %rax
movq -0x20(%rbp), %rdi
callq *%rax
cmpl $0x0, %eax
je 0x582bc
movl $0x1, -0x14(%rbp)
jmp 0x582e2
movq -0x20(%rbp), %rdi
movq -0x28(%rbp), %rsi
callq 0x5ce90
movl %eax, -0x14(%rbp)
jmp 0x582e2
jmp 0x582d0
movq -0x28(%rbp), %rax
movq $0x0, (%rax)
movl $0x64, -0x14(%rbp)
movl -0x14(%rbp), %eax
movl %eax, -0x44(%rbp)
movq %fs:0x28, %rax
movq -0x8(%rbp), %rcx
cmpq %rcx, %rax
jne 0x58303
movl -0x44(%rbp), %eax
addq $0x50, %rsp
popq %rbp
retq
callq 0x382c0
nopl (%rax,%rax)
|
stmt_cursor_fetch:
push rbp
mov rbp, rsp
sub rsp, 50h
mov rax, fs:28h
mov [rbp+var_8], rax
mov [rbp+var_20], rdi
mov [rbp+var_28], rsi
mov rax, [rbp+var_20]
add rax, 80h
mov [rbp+var_30], rax
mov rax, [rbp+var_20]
cmp dword ptr [rax+50h], 4
jnb short loc_58076
jmp short $+2
loc_58007:
mov rax, [rbp+var_20]
mov dword ptr [rax+108h], 7DEh
mov rdi, [rbp+var_20]
add rdi, 30Dh
lea rax, SQLSTATE_UNKNOWN
mov rsi, [rax]
mov edx, 5
call _strncpy
mov rax, [rbp+var_20]
mov byte ptr [rax+312h], 0
mov rdi, [rbp+var_20]
add rdi, 10Ch
lea rax, client_errors
mov rsi, [rax+70h]
mov edx, 200h
call _strncpy
mov rax, [rbp+var_20]
mov byte ptr [rax+30Bh], 0
mov [rbp+var_14], 1
jmp loc_582E2
loc_58076:
mov rax, [rbp+var_20]
cmp qword ptr [rax+0E0h], 0
jz short loc_58099
mov rdi, [rbp+var_20]
mov rsi, [rbp+var_28]
call stmt_buffered_fetch
mov [rbp+var_14], eax
jmp loc_582E2
loc_58099:
mov rax, [rbp+var_20]
mov eax, [rax+0F4h]
and eax, 80h
cmp eax, 0
jz short loc_580C8
mov rax, [rbp+var_20]
mov ecx, [rax+0F4h]
and ecx, 0FFFFFF7Fh
mov [rax+0F4h], ecx
jmp loc_582D0
loc_580C8:
jmp short $+2
loc_580CA:
mov rax, [rbp+var_20]
mov rax, [rax+40h]
mov [rbp+var_10], al
mov rax, [rbp+var_20]
mov rax, [rax+40h]
shr rax, 8
mov [rbp+var_F], al
mov rax, [rbp+var_20]
mov rax, [rax+40h]
shr rax, 10h
mov [rbp+var_E], al
mov rax, [rbp+var_20]
mov rax, [rax+40h]
shr rax, 18h
mov [rbp+var_D], al
jmp short $+2
loc_58104:
mov rax, [rbp+var_20]
mov rax, [rax+318h]
mov [rbp+var_C], al
mov rax, [rbp+var_20]
mov rax, [rax+318h]
shr rax, 8
mov [rbp+var_B], al
mov rax, [rbp+var_20]
mov rax, [rax+318h]
shr rax, 10h
mov [rbp+var_A], al
mov rax, [rbp+var_20]
mov rax, [rax+318h]
shr rax, 18h
mov [rbp+var_9], al
mov rax, [rbp+var_20]
mov rax, [rax+38h]
mov rax, [rax+4D0h]
mov rax, [rax+10h]
mov rcx, [rbp+var_20]
mov rdi, [rcx+38h]
lea rdx, [rbp+var_10]
mov r9, [rbp+var_20]
mov esi, 1Ch
mov ecx, 8
mov r8d, 1
call rax
cmp eax, 0
jz loc_58254
jmp short $+2
loc_58188:
mov rax, [rbp+var_20]
mov rax, [rax+38h]
mov ecx, [rax+90h]
mov rax, [rbp+var_20]
mov [rax+108h], ecx
mov rdi, [rbp+var_20]
add rdi, 30Dh
mov rax, [rbp+var_20]
mov rsi, [rax+38h]
add rsi, 297h
mov edx, 5
call _strncpy
mov rax, [rbp+var_20]
mov byte ptr [rax+312h], 0
mov rax, [rbp+var_20]
add rax, 10Ch
mov [rbp+var_38], rax
mov rax, [rbp+var_20]
mov rax, [rax+38h]
add rax, 97h
cmp rax, 0
jz short loc_58205
mov rax, [rbp+var_20]
mov rax, [rax+38h]
add rax, 97h
mov [rbp+var_40], rax
jmp short loc_5822B
loc_58205:
mov rax, [rbp+var_20]
mov rax, [rax+38h]
mov eax, [rax+90h]
sub eax, 7D0h
mov eax, eax
mov ecx, eax
lea rax, client_errors
mov rax, [rax+rcx*8]
mov [rbp+var_40], rax
loc_5822B:
mov rdi, [rbp+var_38]
mov rsi, [rbp+var_40]
mov edx, 200h
call _strncpy
mov rax, [rbp+var_20]
mov byte ptr [rax+30Bh], 0
mov [rbp+var_14], 1
jmp loc_582E2
loc_58254:
mov rdi, [rbp+var_30]
add rdi, 10h
mov esi, 1
call ma_free_root
mov rax, [rbp+var_30]
mov qword ptr [rax], 0
mov rax, [rbp+var_30]
mov qword ptr [rax+48h], 0
mov rax, [rbp+var_20]
mov rax, [rax+38h]
mov rax, [rax+480h]
cmp byte ptr [rax+148h], 0
jnz short loc_582CE
mov rax, [rbp+var_20]
mov rax, [rax+38h]
mov rax, [rax+4D0h]
mov rax, [rax+60h]
mov rdi, [rbp+var_20]
call rax
cmp eax, 0
jz short loc_582BC
mov [rbp+var_14], 1
jmp short loc_582E2
loc_582BC:
mov rdi, [rbp+var_20]
mov rsi, [rbp+var_28]
call stmt_buffered_fetch
mov [rbp+var_14], eax
jmp short loc_582E2
loc_582CE:
jmp short $+2
loc_582D0:
mov rax, [rbp+var_28]
mov qword ptr [rax], 0
mov [rbp+var_14], 64h ; 'd'
loc_582E2:
mov eax, [rbp+var_14]
mov [rbp+var_44], eax
mov rax, fs:28h
mov rcx, [rbp+var_8]
cmp rax, rcx
jnz short loc_58303
mov eax, [rbp+var_44]
add rsp, 50h
pop rbp
retn
loc_58303:
call ___stack_chk_fail
|
long long stmt_cursor_fetch(long long a1, _QWORD *a2)
{
char *v2; // rax
_BYTE v5[8]; // [rsp+40h] [rbp-10h] BYREF
unsigned long long v6; // [rsp+48h] [rbp-8h]
v6 = __readfsqword(0x28u);
if ( *(_DWORD *)(a1 + 80) < 4u )
{
*(_DWORD *)(a1 + 264) = 2014;
strncpy(a1 + 781, SQLSTATE_UNKNOWN, 5LL);
*(_BYTE *)(a1 + 786) = 0;
strncpy(a1 + 268, client_errors[14], 512LL);
*(_BYTE *)(a1 + 779) = 0;
return 1;
}
if ( *(_QWORD *)(a1 + 224) )
return (unsigned int)stmt_buffered_fetch(a1, a2);
if ( (*(_DWORD *)(a1 + 244) & 0x80) != 0 )
{
*(_DWORD *)(a1 + 244) &= ~0x80u;
LABEL_16:
*a2 = 0LL;
return 100;
}
v5[0] = *(_QWORD *)(a1 + 64);
v5[1] = BYTE1(*(_QWORD *)(a1 + 64));
v5[2] = BYTE2(*(_QWORD *)(a1 + 64));
v5[3] = BYTE3(*(_QWORD *)(a1 + 64));
v5[4] = *(_QWORD *)(a1 + 792);
v5[5] = BYTE1(*(_QWORD *)(a1 + 792));
v5[6] = BYTE2(*(_QWORD *)(a1 + 792));
v5[7] = BYTE3(*(_QWORD *)(a1 + 792));
if ( (*(unsigned int ( **)(_QWORD, long long, _BYTE *, long long, long long, long long))(*(_QWORD *)(*(_QWORD *)(a1 + 56) + 1232LL)
+ 16LL))(
*(_QWORD *)(a1 + 56),
28LL,
v5,
8LL,
1LL,
a1) )
{
*(_DWORD *)(a1 + 264) = *(_DWORD *)(*(_QWORD *)(a1 + 56) + 144LL);
strncpy(a1 + 781, *(_QWORD *)(a1 + 56) + 663LL, 5LL);
*(_BYTE *)(a1 + 786) = 0;
if ( *(_QWORD *)(a1 + 56) == -151LL )
v2 = client_errors[*(_DWORD *)(*(_QWORD *)(a1 + 56) + 144LL) - 2000];
else
v2 = (char *)(*(_QWORD *)(a1 + 56) + 151LL);
strncpy(a1 + 268, v2, 512LL);
*(_BYTE *)(a1 + 779) = 0;
return 1;
}
else
{
ma_free_root((_QWORD *)(a1 + 144), 1);
*(_QWORD *)(a1 + 128) = 0LL;
*(_QWORD *)(a1 + 200) = 0LL;
if ( *(_BYTE *)(*(_QWORD *)(*(_QWORD *)(a1 + 56) + 1152LL) + 328LL) )
goto LABEL_16;
if ( (*(unsigned int ( **)(long long))(*(_QWORD *)(*(_QWORD *)(a1 + 56) + 1232LL) + 96LL))(a1) )
return 1;
else
return (unsigned int)stmt_buffered_fetch(a1, a2);
}
}
|
stmt_cursor_fetch:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x50
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x8],RAX
MOV qword ptr [RBP + -0x20],RDI
MOV qword ptr [RBP + -0x28],RSI
MOV RAX,qword ptr [RBP + -0x20]
ADD RAX,0x80
MOV qword ptr [RBP + -0x30],RAX
MOV RAX,qword ptr [RBP + -0x20]
CMP dword ptr [RAX + 0x50],0x4
JNC 0x00158076
JMP 0x00158007
LAB_00158007:
MOV RAX,qword ptr [RBP + -0x20]
MOV dword ptr [RAX + 0x108],0x7de
MOV RDI,qword ptr [RBP + -0x20]
ADD RDI,0x30d
LEA RAX,[0x3499d0]
MOV RSI,qword ptr [RAX]
MOV EDX,0x5
CALL 0x00138140
MOV RAX,qword ptr [RBP + -0x20]
MOV byte ptr [RAX + 0x312],0x0
MOV RDI,qword ptr [RBP + -0x20]
ADD RDI,0x10c
LEA RAX,[0x3499e0]
MOV RSI,qword ptr [RAX + 0x70]
MOV EDX,0x200
CALL 0x00138140
MOV RAX,qword ptr [RBP + -0x20]
MOV byte ptr [RAX + 0x30b],0x0
MOV dword ptr [RBP + -0x14],0x1
JMP 0x001582e2
LAB_00158076:
MOV RAX,qword ptr [RBP + -0x20]
CMP qword ptr [RAX + 0xe0],0x0
JZ 0x00158099
MOV RDI,qword ptr [RBP + -0x20]
MOV RSI,qword ptr [RBP + -0x28]
CALL 0x0015ce90
MOV dword ptr [RBP + -0x14],EAX
JMP 0x001582e2
LAB_00158099:
MOV RAX,qword ptr [RBP + -0x20]
MOV EAX,dword ptr [RAX + 0xf4]
AND EAX,0x80
CMP EAX,0x0
JZ 0x001580c8
MOV RAX,qword ptr [RBP + -0x20]
MOV ECX,dword ptr [RAX + 0xf4]
AND ECX,0xffffff7f
MOV dword ptr [RAX + 0xf4],ECX
JMP 0x001582d0
LAB_001580c8:
JMP 0x001580ca
LAB_001580ca:
MOV RAX,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RAX + 0x40]
MOV byte ptr [RBP + -0x10],AL
MOV RAX,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RAX + 0x40]
SHR RAX,0x8
MOV byte ptr [RBP + -0xf],AL
MOV RAX,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RAX + 0x40]
SHR RAX,0x10
MOV byte ptr [RBP + -0xe],AL
MOV RAX,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RAX + 0x40]
SHR RAX,0x18
MOV byte ptr [RBP + -0xd],AL
JMP 0x00158104
LAB_00158104:
MOV RAX,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RAX + 0x318]
MOV byte ptr [RBP + -0xc],AL
MOV RAX,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RAX + 0x318]
SHR RAX,0x8
MOV byte ptr [RBP + -0xb],AL
MOV RAX,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RAX + 0x318]
SHR RAX,0x10
MOV byte ptr [RBP + -0xa],AL
MOV RAX,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RAX + 0x318]
SHR RAX,0x18
MOV byte ptr [RBP + -0x9],AL
MOV RAX,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RAX + 0x38]
MOV RAX,qword ptr [RAX + 0x4d0]
MOV RAX,qword ptr [RAX + 0x10]
MOV RCX,qword ptr [RBP + -0x20]
MOV RDI,qword ptr [RCX + 0x38]
LEA RDX,[RBP + -0x10]
MOV R9,qword ptr [RBP + -0x20]
MOV ESI,0x1c
MOV ECX,0x8
MOV R8D,0x1
CALL RAX
CMP EAX,0x0
JZ 0x00158254
JMP 0x00158188
LAB_00158188:
MOV RAX,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RAX + 0x38]
MOV ECX,dword ptr [RAX + 0x90]
MOV RAX,qword ptr [RBP + -0x20]
MOV dword ptr [RAX + 0x108],ECX
MOV RDI,qword ptr [RBP + -0x20]
ADD RDI,0x30d
MOV RAX,qword ptr [RBP + -0x20]
MOV RSI,qword ptr [RAX + 0x38]
ADD RSI,0x297
MOV EDX,0x5
CALL 0x00138140
MOV RAX,qword ptr [RBP + -0x20]
MOV byte ptr [RAX + 0x312],0x0
MOV RAX,qword ptr [RBP + -0x20]
ADD RAX,0x10c
MOV qword ptr [RBP + -0x38],RAX
MOV RAX,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RAX + 0x38]
ADD RAX,0x97
CMP RAX,0x0
JZ 0x00158205
MOV RAX,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RAX + 0x38]
ADD RAX,0x97
MOV qword ptr [RBP + -0x40],RAX
JMP 0x0015822b
LAB_00158205:
MOV RAX,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RAX + 0x38]
MOV EAX,dword ptr [RAX + 0x90]
SUB EAX,0x7d0
MOV EAX,EAX
MOV ECX,EAX
LEA RAX,[0x3499e0]
MOV RAX,qword ptr [RAX + RCX*0x8]
MOV qword ptr [RBP + -0x40],RAX
LAB_0015822b:
MOV RDI,qword ptr [RBP + -0x38]
MOV RSI,qword ptr [RBP + -0x40]
MOV EDX,0x200
CALL 0x00138140
MOV RAX,qword ptr [RBP + -0x20]
MOV byte ptr [RAX + 0x30b],0x0
MOV dword ptr [RBP + -0x14],0x1
JMP 0x001582e2
LAB_00158254:
MOV RDI,qword ptr [RBP + -0x30]
ADD RDI,0x10
MOV ESI,0x1
CALL 0x00156820
MOV RAX,qword ptr [RBP + -0x30]
MOV qword ptr [RAX],0x0
MOV RAX,qword ptr [RBP + -0x30]
MOV qword ptr [RAX + 0x48],0x0
MOV RAX,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RAX + 0x38]
MOV RAX,qword ptr [RAX + 0x480]
CMP byte ptr [RAX + 0x148],0x0
JNZ 0x001582ce
MOV RAX,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RAX + 0x38]
MOV RAX,qword ptr [RAX + 0x4d0]
MOV RAX,qword ptr [RAX + 0x60]
MOV RDI,qword ptr [RBP + -0x20]
CALL RAX
CMP EAX,0x0
JZ 0x001582bc
MOV dword ptr [RBP + -0x14],0x1
JMP 0x001582e2
LAB_001582bc:
MOV RDI,qword ptr [RBP + -0x20]
MOV RSI,qword ptr [RBP + -0x28]
CALL 0x0015ce90
MOV dword ptr [RBP + -0x14],EAX
JMP 0x001582e2
LAB_001582ce:
JMP 0x001582d0
LAB_001582d0:
MOV RAX,qword ptr [RBP + -0x28]
MOV qword ptr [RAX],0x0
MOV dword ptr [RBP + -0x14],0x64
LAB_001582e2:
MOV EAX,dword ptr [RBP + -0x14]
MOV dword ptr [RBP + -0x44],EAX
MOV RAX,qword ptr FS:[0x28]
MOV RCX,qword ptr [RBP + -0x8]
CMP RAX,RCX
JNZ 0x00158303
MOV EAX,dword ptr [RBP + -0x44]
ADD RSP,0x50
POP RBP
RET
LAB_00158303:
CALL 0x001382c0
|
int4 stmt_cursor_fetch(long param_1,int8 *param_2)
{
int iVar1;
long in_FS_OFFSET;
char *local_48;
int4 local_1c;
int1 local_18;
int1 local_17;
int1 local_16;
int1 local_15;
int1 local_14;
int1 local_13;
int1 local_12;
int1 local_11;
long local_10;
local_10 = *(long *)(in_FS_OFFSET + 0x28);
if (*(uint *)(param_1 + 0x50) < 4) {
*(int4 *)(param_1 + 0x108) = 0x7de;
strncpy((char *)(param_1 + 0x30d),SQLSTATE_UNKNOWN,5);
*(int1 *)(param_1 + 0x312) = 0;
strncpy((char *)(param_1 + 0x10c),PTR_s_Commands_out_of_sync__you_can_t_r_00349a50,0x200);
*(int1 *)(param_1 + 0x30b) = 0;
local_1c = 1;
}
else if (*(long *)(param_1 + 0xe0) == 0) {
if ((*(uint *)(param_1 + 0xf4) & 0x80) == 0) {
local_18 = (int1)*(int8 *)(param_1 + 0x40);
local_17 = (int1)((ulong)*(int8 *)(param_1 + 0x40) >> 8);
local_16 = (int1)((ulong)*(int8 *)(param_1 + 0x40) >> 0x10);
local_15 = (int1)((ulong)*(int8 *)(param_1 + 0x40) >> 0x18);
local_14 = (int1)*(int8 *)(param_1 + 0x318);
local_13 = (int1)((ulong)*(int8 *)(param_1 + 0x318) >> 8);
local_12 = (int1)((ulong)*(int8 *)(param_1 + 0x318) >> 0x10);
local_11 = (int1)((ulong)*(int8 *)(param_1 + 0x318) >> 0x18);
iVar1 = (**(code **)(*(long *)(*(long *)(param_1 + 0x38) + 0x4d0) + 0x10))
(*(int8 *)(param_1 + 0x38),0x1c,&local_18,8,1,param_1);
if (iVar1 != 0) {
*(int4 *)(param_1 + 0x108) = *(int4 *)(*(long *)(param_1 + 0x38) + 0x90);
strncpy((char *)(param_1 + 0x30d),(char *)(*(long *)(param_1 + 0x38) + 0x297),5);
*(int1 *)(param_1 + 0x312) = 0;
if (*(long *)(param_1 + 0x38) == -0x97) {
local_48 = (&client_errors)[*(int *)(*(long *)(param_1 + 0x38) + 0x90) - 2000];
}
else {
local_48 = (char *)(*(long *)(param_1 + 0x38) + 0x97);
}
strncpy((char *)(param_1 + 0x10c),local_48,0x200);
*(int1 *)(param_1 + 0x30b) = 0;
local_1c = 1;
goto LAB_001582e2;
}
ma_free_root(param_1 + 0x90,1);
*(int8 *)(param_1 + 0x80) = 0;
*(int8 *)(param_1 + 200) = 0;
if (*(char *)(*(long *)(*(long *)(param_1 + 0x38) + 0x480) + 0x148) == '\0') {
iVar1 = (**(code **)(*(long *)(*(long *)(param_1 + 0x38) + 0x4d0) + 0x60))(param_1);
if (iVar1 == 0) {
local_1c = stmt_buffered_fetch(param_1,param_2);
}
else {
local_1c = 1;
}
goto LAB_001582e2;
}
}
else {
*(uint *)(param_1 + 0xf4) = *(uint *)(param_1 + 0xf4) & 0xffffff7f;
}
*param_2 = 0;
local_1c = 100;
}
else {
local_1c = stmt_buffered_fetch(param_1,param_2);
}
LAB_001582e2:
if (*(long *)(in_FS_OFFSET + 0x28) != local_10) {
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
return local_1c;
}
|
|
61,844 |
ImPlot::IsLegendEntryHovered(char const*)
|
zkingston[P]unknot/build_O1/_deps/implot-src/implot.cpp
|
bool IsLegendEntryHovered(const char* label_id) {
ImPlotContext& gp = *GImPlot;
IM_ASSERT_USER_ERROR(gp.CurrentItems != nullptr, "IsPlotItemHighlight() needs to be called within an itemized context!");
SetupLock();
ImGuiID id = ImGui::GetIDWithSeed(label_id, nullptr, gp.CurrentItems->ID);
ImPlotItem* item = gp.CurrentItems->GetItem(id);
return item && item->LegendHovered;
}
|
O1
|
cpp
|
ImPlot::IsLegendEntryHovered(char const*):
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %r14
movq 0x2743b3(%rip), %r15 # 0x336ca0
cmpq $0x0, 0x60(%r15)
jne 0xc2900
leaq 0x1d8415(%rip), %rdi # 0x29ad10
callq 0x2161f4
movq 0x274399(%rip), %rbx # 0x336ca0
movq 0x50(%rbx), %rax
cmpb $0x0, 0x9de(%rax)
jne 0xc2919
callq 0xb930f
movq 0x50(%rbx), %rax
movb $0x1, 0x9de(%rax)
movq 0x60(%r15), %rax
movl (%rax), %edx
xorl %ebx, %ebx
movq %r14, %rdi
xorl %esi, %esi
callq 0x22a8b1
movq 0x60(%r15), %r14
leaq 0x60(%r14), %rdi
movl %eax, %esi
movl $0xffffffff, %edx # imm = 0xFFFFFFFF
callq 0x213fc4
cmpl $-0x1, %eax
sete %dl
movq 0x58(%r14), %rcx
testq %rcx, %rcx
sete %sil
orb %dl, %sil
jne 0xc296a
cltq
shlq $0x5, %rax
movb 0x1d(%rcx,%rax), %bl
movl %ebx, %eax
popq %rbx
popq %r14
popq %r15
retq
|
_ZN6ImPlot20IsLegendEntryHoveredEPKc:
push r15
push r14
push rbx
mov r14, rdi
mov r15, cs:GImPlot
cmp qword ptr [r15+60h], 0
jnz short loc_C2900
lea rdi, aIsplotitemhigh; "IsPlotItemHighlight() needs to be calle"...
call _ZN5ImGui8ErrorLogEPKc; ImGui::ErrorLog(char const*)
loc_C2900:
mov rbx, cs:GImPlot
mov rax, [rbx+50h]
cmp byte ptr [rax+9DEh], 0
jnz short loc_C2919
call _ZN6ImPlot11SetupFinishEv; ImPlot::SetupFinish(void)
loc_C2919:
mov rax, [rbx+50h]
mov byte ptr [rax+9DEh], 1
mov rax, [r15+60h]
mov edx, [rax]; char *
xor ebx, ebx
mov rdi, r14; this
xor esi, esi; char *
call _ZN5ImGui13GetIDWithSeedEPKcS1_j; ImGui::GetIDWithSeed(char const*,char const*,uint)
mov r14, [r15+60h]
lea rdi, [r14+60h]; this
mov esi, eax; unsigned int
mov edx, 0FFFFFFFFh; int
call _ZNK12ImGuiStorage6GetIntEji; ImGuiStorage::GetInt(uint,int)
cmp eax, 0FFFFFFFFh
setz dl
mov rcx, [r14+58h]
test rcx, rcx
setz sil
or sil, dl
jnz short loc_C296A
cdqe
shl rax, 5
mov bl, [rcx+rax+1Dh]
loc_C296A:
mov eax, ebx
pop rbx
pop r14
pop r15
retn
|
long long ImPlot::IsLegendEntryHovered(ImPlot *this, const char *a2, long long a3, unsigned int a4)
{
ImGui *v4; // r14
ImGui *v5; // r15
ImGui *v6; // rbx
unsigned int v7; // ebx
unsigned int IDWithSeed; // eax
long long v9; // r14
int Int; // eax
long long v11; // rcx
v4 = this;
v5 = GImPlot;
if ( !*((_QWORD *)GImPlot + 12) )
{
this = (ImPlot *)"IsPlotItemHighlight() needs to be called within an itemized context!";
ImGui::ErrorLog((ImGui *)"IsPlotItemHighlight() needs to be called within an itemized context!", a2);
}
v6 = GImPlot;
if ( !*(_BYTE *)(*((_QWORD *)GImPlot + 10) + 2526LL) )
ImPlot::SetupFinish(this, a2);
*(_BYTE *)(*((_QWORD *)v6 + 10) + 2526LL) = 1;
v7 = 0;
IDWithSeed = ImGui::GetIDWithSeed(v4, 0LL, (const char *)**((unsigned int **)v5 + 12), a4);
v9 = *((_QWORD *)v5 + 12);
Int = ImGuiStorage::GetInt((ImGuiStorage *)(v9 + 96), IDWithSeed, -1);
v11 = *(_QWORD *)(v9 + 88);
if ( Int != -1 && v11 != 0 )
LOBYTE(v7) = *(_BYTE *)(v11 + 32LL * Int + 29);
return v7;
}
|
IsLegendEntryHovered:
PUSH R15
PUSH R14
PUSH RBX
MOV R14,RDI
MOV R15,qword ptr [0x00436ca0]
CMP qword ptr [R15 + 0x60],0x0
JNZ 0x001c2900
LEA RDI,[0x39ad10]
CALL 0x003161f4
LAB_001c2900:
MOV RBX,qword ptr [0x00436ca0]
MOV RAX,qword ptr [RBX + 0x50]
CMP byte ptr [RAX + 0x9de],0x0
JNZ 0x001c2919
CALL 0x001b930f
LAB_001c2919:
MOV RAX,qword ptr [RBX + 0x50]
MOV byte ptr [RAX + 0x9de],0x1
MOV RAX,qword ptr [R15 + 0x60]
MOV EDX,dword ptr [RAX]
XOR EBX,EBX
MOV RDI,R14
XOR ESI,ESI
CALL 0x0032a8b1
MOV R14,qword ptr [R15 + 0x60]
LEA RDI,[R14 + 0x60]
MOV ESI,EAX
MOV EDX,0xffffffff
CALL 0x00313fc4
CMP EAX,-0x1
SETZ DL
MOV RCX,qword ptr [R14 + 0x58]
TEST RCX,RCX
SETZ SIL
OR SIL,DL
JNZ 0x001c296a
CDQE
SHL RAX,0x5
MOV BL,byte ptr [RCX + RAX*0x1 + 0x1d]
LAB_001c296a:
MOV EAX,EBX
POP RBX
POP R14
POP R15
RET
|
/* ImPlot::IsLegendEntryHovered(char const*) */
int1 ImPlot::IsLegendEntryHovered(char *param_1)
{
long lVar1;
long lVar2;
uint uVar3;
int iVar4;
int1 uVar5;
lVar1 = GImPlot;
if (*(long *)(GImPlot + 0x60) == 0) {
ImGui::ErrorLog("IsPlotItemHighlight() needs to be called within an itemized context!");
}
lVar2 = GImPlot;
if (*(char *)(*(long *)(GImPlot + 0x50) + 0x9de) == '\0') {
SetupFinish();
}
*(int1 *)(*(long *)(lVar2 + 0x50) + 0x9de) = 1;
uVar5 = 0;
uVar3 = ImGui::GetIDWithSeed(param_1,(char *)0x0,**(uint **)(lVar1 + 0x60));
lVar1 = *(long *)(lVar1 + 0x60);
iVar4 = ImGuiStorage::GetInt((ImGuiStorage *)(lVar1 + 0x60),uVar3,-1);
lVar1 = *(long *)(lVar1 + 0x58);
if (lVar1 != 0 && iVar4 != -1) {
uVar5 = *(int1 *)(lVar1 + 0x1d + (long)iVar4 * 0x20);
}
return uVar5;
}
|
|
61,845 |
nglog::tools::GetHex(char const*, char const*, unsigned long*)
|
ng-log[P]ng-log/src/symbolize.cc
|
static char* GetHex(const char* start, const char* end, uint64_t* hex) {
*hex = 0;
const char* p;
for (p = start; p < end; ++p) {
int ch = *p;
if ((ch >= '0' && ch <= '9') || (ch >= 'A' && ch <= 'F') ||
(ch >= 'a' && ch <= 'f')) {
*hex = (*hex << 4U) |
(ch < 'A' ? static_cast<uint64_t>(ch - '0') : (ch & 0xF) + 9U);
} else { // Encountered the first non-hex character.
break;
}
}
NGLOG_SAFE_ASSERT(p <= end);
return const_cast<char*>(p);
}
|
O0
|
cpp
|
nglog::tools::GetHex(char const*, char const*, unsigned long*):
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x18(%rbp), %rax
movq $0x0, (%rax)
movq -0x8(%rbp), %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
cmpq -0x10(%rbp), %rax
jae 0x4ef8e
movq -0x20(%rbp), %rax
movsbl (%rax), %eax
movl %eax, -0x24(%rbp)
cmpl $0x30, -0x24(%rbp)
jl 0x4ef1b
cmpl $0x39, -0x24(%rbp)
jle 0x4ef33
cmpl $0x41, -0x24(%rbp)
jl 0x4ef27
cmpl $0x46, -0x24(%rbp)
jle 0x4ef33
cmpl $0x61, -0x24(%rbp)
jl 0x4ef79
cmpl $0x66, -0x24(%rbp)
jg 0x4ef79
movq -0x18(%rbp), %rax
movq (%rax), %rax
shlq $0x4, %rax
movq %rax, -0x30(%rbp)
cmpl $0x41, -0x24(%rbp)
jge 0x4ef56
movl -0x24(%rbp), %eax
subl $0x30, %eax
cltq
movq %rax, -0x38(%rbp)
jmp 0x4ef65
movl -0x24(%rbp), %eax
andl $0xf, %eax
addl $0x9, %eax
movl %eax, %eax
movq %rax, -0x38(%rbp)
movq -0x30(%rbp), %rcx
movq -0x38(%rbp), %rax
orq %rax, %rcx
movq -0x18(%rbp), %rax
movq %rcx, (%rax)
jmp 0x4ef7b
jmp 0x4ef8e
jmp 0x4ef7d
movq -0x20(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x20(%rbp)
jmp 0x4eef7
movq -0x20(%rbp), %rax
cmpq -0x10(%rbp), %rax
ja 0x4ef9a
jmp 0x4ef9f
callq 0x93a0
movq -0x20(%rbp), %rax
addq $0x40, %rsp
popq %rbp
retq
nopl (%rax)
|
_ZN5nglog5toolsL6GetHexEPKcS2_Pm:
push rbp
mov rbp, rsp
sub rsp, 40h
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov [rbp+var_18], rdx
mov rax, [rbp+var_18]
mov qword ptr [rax], 0
mov rax, [rbp+var_8]
mov [rbp+var_20], rax
loc_4EEF7:
mov rax, [rbp+var_20]
cmp rax, [rbp+var_10]
jnb loc_4EF8E
mov rax, [rbp+var_20]
movsx eax, byte ptr [rax]
mov [rbp+var_24], eax
cmp [rbp+var_24], 30h ; '0'
jl short loc_4EF1B
cmp [rbp+var_24], 39h ; '9'
jle short loc_4EF33
loc_4EF1B:
cmp [rbp+var_24], 41h ; 'A'
jl short loc_4EF27
cmp [rbp+var_24], 46h ; 'F'
jle short loc_4EF33
loc_4EF27:
cmp [rbp+var_24], 61h ; 'a'
jl short loc_4EF79
cmp [rbp+var_24], 66h ; 'f'
jg short loc_4EF79
loc_4EF33:
mov rax, [rbp+var_18]
mov rax, [rax]
shl rax, 4
mov [rbp+var_30], rax
cmp [rbp+var_24], 41h ; 'A'
jge short loc_4EF56
mov eax, [rbp+var_24]
sub eax, 30h ; '0'
cdqe
mov [rbp+var_38], rax
jmp short loc_4EF65
loc_4EF56:
mov eax, [rbp+var_24]
and eax, 0Fh
add eax, 9
mov eax, eax
mov [rbp+var_38], rax
loc_4EF65:
mov rcx, [rbp+var_30]
mov rax, [rbp+var_38]
or rcx, rax
mov rax, [rbp+var_18]
mov [rax], rcx
jmp short loc_4EF7B
loc_4EF79:
jmp short loc_4EF8E
loc_4EF7B:
jmp short $+2
loc_4EF7D:
mov rax, [rbp+var_20]
add rax, 1
mov [rbp+var_20], rax
jmp loc_4EEF7
loc_4EF8E:
mov rax, [rbp+var_20]
cmp rax, [rbp+var_10]
ja short loc_4EF9A
jmp short loc_4EF9F
loc_4EF9A:
call _abort
loc_4EF9F:
mov rax, [rbp+var_20]
add rsp, 40h
pop rbp
retn
|
nglog::tools * nglog::tools::GetHex(nglog::tools *this, nglog::tools *a2, char *a3, unsigned long long *a4)
{
long long v5; // [rsp+8h] [rbp-38h]
int v6; // [rsp+1Ch] [rbp-24h]
nglog::tools *i; // [rsp+20h] [rbp-20h]
*(_QWORD *)a3 = 0LL;
for ( i = this; i < a2; i = (nglog::tools *)((char *)i + 1) )
{
v6 = *(char *)i;
if ( (v6 < 48 || v6 > 57) && (v6 < 65 || v6 > 70) && (v6 < 97 || v6 > 102) )
break;
if ( v6 >= 65 )
v5 = (v6 & 0xFu) + 9;
else
v5 = v6 - 48;
*(_QWORD *)a3 = v5 | (16LL * *(_QWORD *)a3);
}
if ( i > a2 )
abort(this, a2);
return i;
}
|
GetHex:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x40
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV qword ptr [RBP + -0x18],RDX
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RAX],0x0
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RBP + -0x20],RAX
LAB_0014eef7:
MOV RAX,qword ptr [RBP + -0x20]
CMP RAX,qword ptr [RBP + -0x10]
JNC 0x0014ef8e
MOV RAX,qword ptr [RBP + -0x20]
MOVSX EAX,byte ptr [RAX]
MOV dword ptr [RBP + -0x24],EAX
CMP dword ptr [RBP + -0x24],0x30
JL 0x0014ef1b
CMP dword ptr [RBP + -0x24],0x39
JLE 0x0014ef33
LAB_0014ef1b:
CMP dword ptr [RBP + -0x24],0x41
JL 0x0014ef27
CMP dword ptr [RBP + -0x24],0x46
JLE 0x0014ef33
LAB_0014ef27:
CMP dword ptr [RBP + -0x24],0x61
JL 0x0014ef79
CMP dword ptr [RBP + -0x24],0x66
JG 0x0014ef79
LAB_0014ef33:
MOV RAX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RAX]
SHL RAX,0x4
MOV qword ptr [RBP + -0x30],RAX
CMP dword ptr [RBP + -0x24],0x41
JGE 0x0014ef56
MOV EAX,dword ptr [RBP + -0x24]
SUB EAX,0x30
CDQE
MOV qword ptr [RBP + -0x38],RAX
JMP 0x0014ef65
LAB_0014ef56:
MOV EAX,dword ptr [RBP + -0x24]
AND EAX,0xf
ADD EAX,0x9
MOV EAX,EAX
MOV qword ptr [RBP + -0x38],RAX
LAB_0014ef65:
MOV RCX,qword ptr [RBP + -0x30]
MOV RAX,qword ptr [RBP + -0x38]
OR RCX,RAX
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RAX],RCX
JMP 0x0014ef7b
LAB_0014ef79:
JMP 0x0014ef8e
LAB_0014ef7b:
JMP 0x0014ef7d
LAB_0014ef7d:
MOV RAX,qword ptr [RBP + -0x20]
ADD RAX,0x1
MOV qword ptr [RBP + -0x20],RAX
JMP 0x0014eef7
LAB_0014ef8e:
MOV RAX,qword ptr [RBP + -0x20]
CMP RAX,qword ptr [RBP + -0x10]
JA 0x0014ef9a
JMP 0x0014ef9f
LAB_0014ef9a:
CALL 0x001093a0
LAB_0014ef9f:
MOV RAX,qword ptr [RBP + -0x20]
ADD RSP,0x40
POP RBP
RET
|
/* nglog::tools::GetHex(char const*, char const*, unsigned long*) */
char * nglog::tools::GetHex(char *param_1,char *param_2,ulong *param_3)
{
uint uVar1;
ulong local_40;
char *local_28;
*param_3 = 0;
for (local_28 = param_1;
(local_28 < param_2 &&
((((uVar1 = (uint)*local_28, 0x2f < (int)uVar1 && ((int)uVar1 < 0x3a)) ||
((0x40 < (int)uVar1 && ((int)uVar1 < 0x47)))) ||
((0x60 < (int)uVar1 && ((int)uVar1 < 0x67)))))); local_28 = local_28 + 1) {
if ((int)uVar1 < 0x41) {
local_40 = (ulong)(int)(uVar1 - 0x30);
}
else {
local_40 = (ulong)((uVar1 & 0xf) + 9);
}
*param_3 = *param_3 << 4 | local_40;
}
if (param_2 < local_28) {
/* WARNING: Subroutine does not return */
abort();
}
return local_28;
}
|
|
61,846 |
nglog::tools::GetHex(char const*, char const*, unsigned long*)
|
ng-log[P]ng-log/src/symbolize.cc
|
static char* GetHex(const char* start, const char* end, uint64_t* hex) {
*hex = 0;
const char* p;
for (p = start; p < end; ++p) {
int ch = *p;
if ((ch >= '0' && ch <= '9') || (ch >= 'A' && ch <= 'F') ||
(ch >= 'a' && ch <= 'f')) {
*hex = (*hex << 4U) |
(ch < 'A' ? static_cast<uint64_t>(ch - '0') : (ch & 0xF) + 9U);
} else { // Encountered the first non-hex character.
break;
}
}
NGLOG_SAFE_ASSERT(p <= end);
return const_cast<char*>(p);
}
|
O3
|
cpp
|
nglog::tools::GetHex(char const*, char const*, unsigned long*):
pushq %rax
movq $0x0, (%rdx)
cmpq %rsi, %rdi
jae 0x21c5d
xorl %eax, %eax
movabsq $0x3f0000003f, %rcx # imm = 0x3F0000003F
movb (%rdi), %r8b
leal -0x30(%r8), %r9d
cmpb $0xa, %r9b
jb 0x21c2d
movzbl %r8b, %r9d
addl $-0x41, %r9d
cmpl $0x25, %r9d
ja 0x21c5d
btq %r9, %rcx
jae 0x21c5d
movsbl %r8b, %r9d
shlq $0x4, %rax
leal -0x30(%r9), %r10d
andl $0xf, %r9d
addl $0x9, %r9d
cmpb $0x41, %r8b
movslq %r10d, %r8
cmovbq %r8, %r9
orq %r9, %rax
movq %rax, (%rdx)
incq %rdi
cmpq %rsi, %rdi
jne 0x21c0c
movq %rsi, %rdi
cmpq %rsi, %rdi
ja 0x21c67
movq %rdi, %rax
popq %rcx
retq
callq 0x72b0
|
_ZN5nglog5toolsL6GetHexEPKcS2_Pm:
push rax
mov qword ptr [rdx], 0
cmp rdi, rsi
jnb short loc_21C5D
xor eax, eax
mov rcx, 3F0000003Fh
loc_21C0C:
mov r8b, [rdi]
lea r9d, [r8-30h]
cmp r9b, 0Ah
jb short loc_21C2D
movzx r9d, r8b
add r9d, 0FFFFFFBFh
cmp r9d, 25h ; '%'
ja short loc_21C5D
bt rcx, r9
jnb short loc_21C5D
loc_21C2D:
movsx r9d, r8b
shl rax, 4
lea r10d, [r9-30h]
and r9d, 0Fh
add r9d, 9
cmp r8b, 41h ; 'A'
movsxd r8, r10d
cmovb r9, r8
or rax, r9
mov [rdx], rax
inc rdi
cmp rdi, rsi
jnz short loc_21C0C
mov rdi, rsi
loc_21C5D:
cmp rdi, rsi
ja short loc_21C67
mov rax, rdi
pop rcx
retn
loc_21C67:
call _abort
|
nglog::tools * nglog::tools::GetHex(nglog::tools *this, nglog::tools *a2, char *a3, unsigned long long *a4)
{
long long v4; // rax
long long v5; // rcx
unsigned __int8 v6; // r8
unsigned long long v7; // r9
long long v8; // rax
long long v9; // r9
*(_QWORD *)a3 = 0LL;
if ( this < a2 )
{
v4 = 0LL;
v5 = 0x3F0000003FLL;
while ( 1 )
{
v6 = *(_BYTE *)this;
if ( (unsigned __int8)(*(_BYTE *)this - 48) >= 0xAu )
{
v7 = (unsigned int)v6 - 65;
if ( (unsigned int)v7 > 0x25 || !_bittest64(&v5, v7) )
break;
}
v8 = 16 * v4;
v9 = ((char)v6 & 0xFu) + 9;
if ( v6 < 0x41u )
v9 = (char)v6 - 48;
v4 = v9 | v8;
*(_QWORD *)a3 = v4;
this = (nglog::tools *)((char *)this + 1);
if ( this == a2 )
{
this = a2;
break;
}
}
}
if ( this > a2 )
abort(this);
return this;
}
|
GetHex:
PUSH RAX
MOV qword ptr [RDX],0x0
CMP RDI,RSI
JNC 0x00121c5d
XOR EAX,EAX
MOV RCX,0x3f0000003f
LAB_00121c0c:
MOV R8B,byte ptr [RDI]
LEA R9D,[R8 + -0x30]
CMP R9B,0xa
JC 0x00121c2d
MOVZX R9D,R8B
ADD R9D,-0x41
CMP R9D,0x25
JA 0x00121c5d
BT RCX,R9
JNC 0x00121c5d
LAB_00121c2d:
MOVSX R9D,R8B
SHL RAX,0x4
LEA R10D,[R9 + -0x30]
AND R9D,0xf
ADD R9D,0x9
CMP R8B,0x41
MOVSXD R8,R10D
CMOVC R9,R8
OR RAX,R9
MOV qword ptr [RDX],RAX
INC RDI
CMP RDI,RSI
JNZ 0x00121c0c
MOV RDI,RSI
LAB_00121c5d:
CMP RDI,RSI
JA 0x00121c67
MOV RAX,RDI
POP RCX
RET
LAB_00121c67:
CALL 0x001072b0
|
/* nglog::tools::GetHex(char const*, char const*, unsigned long*) */
byte * nglog::tools::GetHex(char *param_1,char *param_2,ulong *param_3)
{
byte bVar1;
ulong uVar2;
byte *pbVar3;
ulong uVar4;
*param_3 = 0;
if (param_1 < param_2) {
uVar2 = 0;
pbVar3 = (byte *)param_1;
do {
param_1 = (char *)pbVar3;
bVar1 = *param_1;
if ((9 < (byte)(bVar1 - 0x30)) &&
((0x25 < bVar1 - 0x41 || ((0x3f0000003fU >> ((ulong)(bVar1 - 0x41) & 0x3f) & 1) == 0))))
break;
uVar4 = (ulong)(((int)(char)bVar1 & 0xfU) + 9);
if (bVar1 < 0x41) {
uVar4 = (long)(int)((int)(char)bVar1 - 0x30);
}
uVar2 = uVar2 << 4 | uVar4;
*param_3 = uVar2;
pbVar3 = (byte *)param_1 + 1;
param_1 = param_2;
} while (pbVar3 != (byte *)param_2);
}
if (param_2 < param_1) {
/* WARNING: Subroutine does not return */
abort();
}
return (byte *)param_1;
}
|
|
61,847 |
my_delete
|
eloqsql/mysys/my_delete.c
|
int my_delete(const char *name, myf MyFlags)
{
int err;
DBUG_ENTER("my_delete");
DBUG_PRINT("my",("name %s MyFlags %lu", name, MyFlags));
#ifdef _WIN32
err = my_win_unlink(name);
#else
if (MyFlags & MY_NOSYMLINKS)
err= unlink_nosymlinks(name);
else
err= unlink(name);
#endif
if ((MyFlags & MY_IGNORE_ENOENT) && errno == ENOENT)
DBUG_RETURN(0);
if (err)
{
my_errno= errno;
if (MyFlags & (MY_FAE+MY_WME))
my_error(EE_DELETE, MYF(ME_BELL), name, errno);
}
else if ((MyFlags & MY_SYNC_DIR) && my_sync_dir_by_file(name, MyFlags))
err= -1;
DBUG_RETURN(err);
}
|
O0
|
c
|
my_delete:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
jmp 0xf0b12
movq -0x18(%rbp), %rax
andq $0x200, %rax # imm = 0x200
cmpq $0x0, %rax
je 0xf0b30
movq -0x10(%rbp), %rdi
callq 0xf0bf0
movl %eax, -0x1c(%rbp)
jmp 0xf0b3c
movq -0x10(%rbp), %rdi
callq 0x2a1d0
movl %eax, -0x1c(%rbp)
movq -0x18(%rbp), %rax
andq $0x20, %rax
cmpq $0x0, %rax
je 0xf0b62
callq 0x2a760
cmpl $0x2, (%rax)
jne 0xf0b62
jmp 0xf0b56
movl $0x0, -0x4(%rbp)
jmp 0xf0be3
cmpl $0x0, -0x1c(%rbp)
je 0xf0bb0
callq 0x2a760
movl (%rax), %eax
movl %eax, -0x20(%rbp)
callq 0xf7440
movl -0x20(%rbp), %ecx
movl %ecx, (%rax)
movq -0x18(%rbp), %rax
andq $0x18, %rax
cmpq $0x0, %rax
je 0xf0bae
movq -0x10(%rbp), %rax
movq %rax, -0x28(%rbp)
callq 0x2a760
movq -0x28(%rbp), %rdx
movl (%rax), %ecx
movl $0x6, %edi
movl $0x4, %esi
movb $0x0, %al
callq 0xf0ef0
jmp 0xf0bdb
movq -0x18(%rbp), %rax
andq $0x8000, %rax # imm = 0x8000
cmpq $0x0, %rax
je 0xf0bd9
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0xf70e0
cmpl $0x0, %eax
je 0xf0bd9
movl $0xffffffff, -0x1c(%rbp) # imm = 0xFFFFFFFF
jmp 0xf0bdb
jmp 0xf0bdd
movl -0x1c(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax)
|
my_delete:
push rbp
mov rbp, rsp
sub rsp, 30h
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
jmp short $+2
loc_F0B12:
mov rax, [rbp+var_18]
and rax, 200h
cmp rax, 0
jz short loc_F0B30
mov rdi, [rbp+var_10]
call unlink_nosymlinks
mov [rbp+var_1C], eax
jmp short loc_F0B3C
loc_F0B30:
mov rdi, [rbp+var_10]
call _unlink
mov [rbp+var_1C], eax
loc_F0B3C:
mov rax, [rbp+var_18]
and rax, 20h
cmp rax, 0
jz short loc_F0B62
call ___errno_location
cmp dword ptr [rax], 2
jnz short loc_F0B62
jmp short $+2
loc_F0B56:
mov [rbp+var_4], 0
jmp loc_F0BE3
loc_F0B62:
cmp [rbp+var_1C], 0
jz short loc_F0BB0
call ___errno_location
mov eax, [rax]
mov [rbp+var_20], eax
call _my_thread_var
mov ecx, [rbp+var_20]
mov [rax], ecx
mov rax, [rbp+var_18]
and rax, 18h
cmp rax, 0
jz short loc_F0BAE
mov rax, [rbp+var_10]
mov [rbp+var_28], rax
call ___errno_location
mov rdx, [rbp+var_28]
mov ecx, [rax]
mov edi, 6
mov esi, 4
mov al, 0
call my_error
loc_F0BAE:
jmp short loc_F0BDB
loc_F0BB0:
mov rax, [rbp+var_18]
and rax, 8000h
cmp rax, 0
jz short loc_F0BD9
mov rdi, [rbp+var_10]
mov rsi, [rbp+var_18]
call my_sync_dir_by_file
cmp eax, 0
jz short loc_F0BD9
mov [rbp+var_1C], 0FFFFFFFFh
loc_F0BD9:
jmp short $+2
loc_F0BDB:
jmp short $+2
loc_F0BDD:
mov eax, [rbp+var_1C]
mov [rbp+var_4], eax
loc_F0BE3:
mov eax, [rbp+var_4]
add rsp, 30h
pop rbp
retn
|
long long my_delete(long long a1, const char *a2)
{
_DWORD *v2; // rax
int v3; // r8d
int v4; // r9d
int v6; // [rsp+10h] [rbp-20h]
unsigned int v7; // [rsp+14h] [rbp-1Ch]
if ( ((unsigned __int16)a2 & 0x200) != 0 )
v7 = unlink_nosymlinks(a1);
else
v7 = unlink(a1);
if ( ((unsigned __int8)a2 & 0x20) != 0 && *(_DWORD *)__errno_location() == 2 )
{
return 0;
}
else
{
if ( v7 )
{
v6 = *(_DWORD *)__errno_location();
*(_DWORD *)my_thread_var(a1, a2) = v6;
if ( ((unsigned __int8)a2 & 0x18) != 0 )
{
v2 = (_DWORD *)__errno_location();
my_error(6, 4, a1, *v2, v3, v4);
}
}
else if ( ((unsigned __int16)a2 & 0x8000) != 0 && (unsigned int)my_sync_dir_by_file(a1, a2) )
{
return (unsigned int)-1;
}
return v7;
}
}
|
my_delete:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x30
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x18],RSI
JMP 0x001f0b12
LAB_001f0b12:
MOV RAX,qword ptr [RBP + -0x18]
AND RAX,0x200
CMP RAX,0x0
JZ 0x001f0b30
MOV RDI,qword ptr [RBP + -0x10]
CALL 0x001f0bf0
MOV dword ptr [RBP + -0x1c],EAX
JMP 0x001f0b3c
LAB_001f0b30:
MOV RDI,qword ptr [RBP + -0x10]
CALL 0x0012a1d0
MOV dword ptr [RBP + -0x1c],EAX
LAB_001f0b3c:
MOV RAX,qword ptr [RBP + -0x18]
AND RAX,0x20
CMP RAX,0x0
JZ 0x001f0b62
CALL 0x0012a760
CMP dword ptr [RAX],0x2
JNZ 0x001f0b62
JMP 0x001f0b56
LAB_001f0b56:
MOV dword ptr [RBP + -0x4],0x0
JMP 0x001f0be3
LAB_001f0b62:
CMP dword ptr [RBP + -0x1c],0x0
JZ 0x001f0bb0
CALL 0x0012a760
MOV EAX,dword ptr [RAX]
MOV dword ptr [RBP + -0x20],EAX
CALL 0x001f7440
MOV ECX,dword ptr [RBP + -0x20]
MOV dword ptr [RAX],ECX
MOV RAX,qword ptr [RBP + -0x18]
AND RAX,0x18
CMP RAX,0x0
JZ 0x001f0bae
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RBP + -0x28],RAX
CALL 0x0012a760
MOV RDX,qword ptr [RBP + -0x28]
MOV ECX,dword ptr [RAX]
MOV EDI,0x6
MOV ESI,0x4
MOV AL,0x0
CALL 0x001f0ef0
LAB_001f0bae:
JMP 0x001f0bdb
LAB_001f0bb0:
MOV RAX,qword ptr [RBP + -0x18]
AND RAX,0x8000
CMP RAX,0x0
JZ 0x001f0bd9
MOV RDI,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RBP + -0x18]
CALL 0x001f70e0
CMP EAX,0x0
JZ 0x001f0bd9
MOV dword ptr [RBP + -0x1c],0xffffffff
LAB_001f0bd9:
JMP 0x001f0bdb
LAB_001f0bdb:
JMP 0x001f0bdd
LAB_001f0bdd:
MOV EAX,dword ptr [RBP + -0x1c]
MOV dword ptr [RBP + -0x4],EAX
LAB_001f0be3:
MOV EAX,dword ptr [RBP + -0x4]
ADD RSP,0x30
POP RBP
RET
|
int my_delete(char *param_1,ulong param_2)
{
int iVar1;
int *piVar2;
int local_24;
int local_c;
if ((param_2 & 0x200) == 0) {
local_24 = unlink(param_1);
}
else {
local_24 = unlink_nosymlinks(param_1);
}
if (((param_2 & 0x20) == 0) || (piVar2 = __errno_location(), *piVar2 != 2)) {
if (local_24 == 0) {
if (((param_2 & 0x8000) != 0) && (iVar1 = my_sync_dir_by_file(param_1,param_2), iVar1 != 0)) {
local_24 = -1;
}
}
else {
piVar2 = __errno_location();
iVar1 = *piVar2;
piVar2 = (int *)_my_thread_var();
*piVar2 = iVar1;
if ((param_2 & 0x18) != 0) {
piVar2 = __errno_location();
my_error(6,4,param_1,*piVar2);
}
}
local_c = local_24;
}
else {
local_c = 0;
}
return local_c;
}
|
|
61,848 |
coro::detail::when_all_task<void> coro::detail::make_when_all_task<coro::task<void>, void>(coro::task<void>) (.destroy)
|
AlayaLite/build_O3/_deps/libcoro-src/include/coro/when_all.hpp
|
static auto make_when_all_task(awaitable a) -> when_all_task<return_type>
{
if constexpr (std::is_void_v<return_type>)
{
co_await static_cast<awaitable&&>(a);
co_return;
}
else
{
co_yield co_await static_cast<awaitable&&>(a);
}
}
|
O3
|
cpp
|
coro::detail::when_all_task<void> coro::detail::make_when_all_task<coro::task<void>, void>(coro::task<void>) (.destroy):
pushq %rbx
movq %rdi, %rbx
cmpq $0x0, 0x18(%rdi)
je 0x3b9c
leaq 0x18(%rbx), %rdi
callq 0x3270
movq 0x28(%rbx), %rdi
testq %rdi, %rdi
je 0x3ba8
callq *0x8(%rdi)
movl $0x38, %esi
movq %rbx, %rdi
popq %rbx
jmp 0x32c0
movq %rax, %rdi
callq 0x45a6
|
_ZN4coro6detailL18make_when_all_taskITkNS_8concepts9awaitableENS_4taskIvEEvEENS0_13when_all_taskIT0_EET__destroy:
push rbx
mov rbx, rdi
cmp qword ptr [rdi+18h], 0
jz short loc_3B9C
lea rdi, [rbx+18h]; this
call __ZNSt15__exception_ptr13exception_ptr10_M_releaseEv; std::__exception_ptr::exception_ptr::_M_release(void)
loc_3B9C:
mov rdi, [rbx+28h]
test rdi, rdi
jz short loc_3BA8
call qword ptr [rdi+8]
loc_3BA8:
mov esi, 38h ; '8'; unsigned __int64
mov rdi, rbx; void *
pop rbx
jmp __ZdlPvm; operator delete(void *,ulong)
mov rdi, rax
call __clang_call_terminate
|
void ZN4coro6detailL18make_when_all_taskITkNS_8concepts9awaitableENS_4taskIvEEvEENS0_13when_all_taskIT0_EET__destroy(
_QWORD *a1)
{
long long v2; // rdi
if ( a1[3] )
std::__exception_ptr::exception_ptr::_M_release((std::__exception_ptr::exception_ptr *)(a1 + 3));
v2 = a1[5];
if ( v2 )
(*(void (**)(void))(v2 + 8))();
operator delete(a1, 0x38uLL);
}
|
_ZN4coro6detailL18make_when_all_taskITkNS_8concepts9awaitableENS_4taskIvEEvEENS0_13when_all_taskIT0_EET_.destroy:
PUSH RBX
MOV RBX,RDI
CMP qword ptr [RDI + 0x18],0x0
JZ 0x00103b9c
LEA RDI,[RBX + 0x18]
CALL 0x00103270
LAB_00103b9c:
MOV RDI,qword ptr [RBX + 0x28]
TEST RDI,RDI
JZ 0x00103ba8
LAB_00103ba5:
CALL qword ptr [RDI + 0x8]
LAB_00103ba8:
MOV ESI,0x38
MOV RDI,RBX
POP RBX
JMP 0x001032c0
|
void _ZN4coro6detailL18make_when_all_taskITkNS_8concepts9awaitableENS_4taskIvEEvEENS0_13when_all_taskIT0_EET__destroy
(void *param_1)
{
if (*(long *)((long)param_1 + 0x18) != 0) {
std::__exception_ptr::exception_ptr::_M_release();
}
if (*(long *)((long)param_1 + 0x28) != 0) {
/* try { // try from 00103ba5 to 00103ba7 has its CatchHandler @ 00103bb6 */
(**(code **)(*(long *)((long)param_1 + 0x28) + 8))();
}
operator_delete(param_1,0x38);
return;
}
|
|
61,849 |
ma_bitmap_create_missing_into_pagecache
|
eloqsql/storage/maria/ma_bitmap.c
|
static my_bool
_ma_bitmap_create_missing_into_pagecache(MARIA_SHARE *share,
MARIA_FILE_BITMAP *bitmap,
pgcache_page_no_t from,
pgcache_page_no_t to,
uchar *zeroes)
{
pgcache_page_no_t i;
/*
We do not use my_chsize() because there can be a race between when it
reads the physical size and when it writes (assume data_file_length is 10,
physical length is 8 and two data pages are in cache, and here we do a
my_chsize: my_chsize sees physical length is 8, then the two data pages go
to disk then my_chsize writes from page 8 and so overwrites the two data
pages, wrongly).
We instead rely on the filesystem filling gaps with zeroes.
*/
for (i= from; i <= to; i+= bitmap->pages_covered)
{
/**
No need to keep them pinned, they are new so flushable.
@todo but we may want to keep them pinned, as an optimization: if they
are not pinned they may go to disk before the data pages go (so, the
physical pages would be in non-ascending "sparse" order on disk), or the
filesystem may fill gaps with zeroes physically which is a waste of
time.
*/
if (pagecache_write(share->pagecache,
&bitmap->file, i, 0,
zeroes, PAGECACHE_PLAIN_PAGE,
PAGECACHE_LOCK_LEFT_UNLOCKED,
PAGECACHE_PIN_LEFT_UNPINNED,
PAGECACHE_WRITE_DELAY, 0, LSN_IMPOSSIBLE))
goto err;
}
/*
Data pages after data_file_length are full of zeroes but that is allowed
as they are marked empty in the bitmap.
*/
return FALSE;
err:
_ma_set_fatal_error_with_share(share, my_errno);
return TRUE;
}
|
O0
|
c
|
ma_bitmap_create_missing_into_pagecache:
pushq %rbp
movq %rsp, %rbp
subq $0x80, %rsp
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 %rax, -0x38(%rbp)
movq -0x38(%rbp), %rax
cmpq -0x28(%rbp), %rax
ja 0x61056
movq -0x10(%rbp), %rax
movq 0x600(%rax), %rdi
movq -0x18(%rbp), %rsi
addq $0x40, %rsi
movq -0x38(%rbp), %rdx
movq -0x30(%rbp), %r8
movq -0x10(%rbp), %rax
movq 0x600(%rax), %rax
movl 0x80(%rax), %eax
xorl %ecx, %ecx
movl $0x1, %r9d
xorl %r10d, %r10d
movl $0x0, (%rsp)
movl $0x1, 0x8(%rsp)
movl $0x0, 0x10(%rsp)
movq $0x0, 0x18(%rsp)
movq $0x0, 0x20(%rsp)
movl $0x0, 0x28(%rsp)
movl %eax, 0x30(%rsp)
callq 0x99510
cmpb $0x0, %al
je 0x6103c
jmp 0x6105c
jmp 0x6103e
movq -0x18(%rbp), %rax
movq 0x138(%rax), %rax
addq -0x38(%rbp), %rax
movq %rax, -0x38(%rbp)
jmp 0x60fb7
movb $0x0, -0x1(%rbp)
jmp 0x61078
movq -0x10(%rbp), %rax
movq %rax, -0x40(%rbp)
callq 0xf9990
movq -0x40(%rbp), %rdi
movl (%rax), %esi
callq 0x373d0
movb $0x1, -0x1(%rbp)
movb -0x1(%rbp), %al
addq $0x80, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
|
_ma_bitmap_create_missing_into_pagecache:
push rbp
mov rbp, rsp
sub rsp, 80h
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 [rbp+var_38], rax
loc_60FB7:
mov rax, [rbp+var_38]
cmp rax, [rbp+var_28]
ja loc_61056
mov rax, [rbp+var_10]
mov rdi, [rax+600h]
mov rsi, [rbp+var_18]
add rsi, 40h ; '@'
mov rdx, [rbp+var_38]
mov r8, [rbp+var_30]
mov rax, [rbp+var_10]
mov rax, [rax+600h]
mov eax, [rax+80h]
xor ecx, ecx
mov r9d, 1
xor r10d, r10d
mov [rsp+80h+var_80], 0
mov [rsp+80h+var_78], 1
mov [rsp+80h+var_70], 0
mov [rsp+80h+var_68], 0
mov [rsp+80h+var_60], 0
mov [rsp+80h+var_58], 0
mov [rsp+80h+var_50], eax
call pagecache_write_part
cmp al, 0
jz short loc_6103C
jmp short loc_6105C
loc_6103C:
jmp short $+2
loc_6103E:
mov rax, [rbp+var_18]
mov rax, [rax+138h]
add rax, [rbp+var_38]
mov [rbp+var_38], rax
jmp loc_60FB7
loc_61056:
mov [rbp+var_1], 0
jmp short loc_61078
loc_6105C:
mov rax, [rbp+var_10]
mov [rbp+var_40], rax
call _my_thread_var
mov rdi, [rbp+var_40]
mov esi, [rax]
call _ma_set_fatal_error_with_share
mov [rbp+var_1], 1
loc_61078:
mov al, [rbp+var_1]
add rsp, 80h
pop rbp
retn
|
char ma_bitmap_create_missing_into_pagecache(
long long a1,
long long a2,
unsigned long long a3,
unsigned long long a4,
int a5)
{
long long v5; // rdi
int *v6; // rax
long long v7; // rdx
long long v8; // rcx
long long v9; // r8
int v10; // r9d
while ( 1 )
{
if ( a3 > a4 )
return 0;
v5 = *(_QWORD *)(a1 + 1536);
if ( (unsigned __int8)pagecache_write_part(
v5,
(int)a2 + 64,
a3,
0,
a5,
1,
0,
1,
0,
0LL,
0LL,
0,
*(_DWORD *)(v5 + 128)) )
break;
a3 += *(_QWORD *)(a2 + 312);
}
v6 = (int *)my_thread_var(v5, (const char *)(a2 + 64));
ma_set_fatal_error_with_share(a1, *v6, v7, v8, v9, v10);
return 1;
}
|
_ma_bitmap_create_missing_into_pagecache:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x80
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 qword ptr [RBP + -0x38],RAX
LAB_00160fb7:
MOV RAX,qword ptr [RBP + -0x38]
CMP RAX,qword ptr [RBP + -0x28]
JA 0x00161056
MOV RAX,qword ptr [RBP + -0x10]
MOV RDI,qword ptr [RAX + 0x600]
MOV RSI,qword ptr [RBP + -0x18]
ADD RSI,0x40
MOV RDX,qword ptr [RBP + -0x38]
MOV R8,qword ptr [RBP + -0x30]
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x600]
MOV EAX,dword ptr [RAX + 0x80]
XOR ECX,ECX
MOV R9D,0x1
XOR R10D,R10D
MOV dword ptr [RSP],0x0
MOV dword ptr [RSP + 0x8],0x1
MOV dword ptr [RSP + 0x10],0x0
MOV qword ptr [RSP + 0x18],0x0
MOV qword ptr [RSP + 0x20],0x0
MOV dword ptr [RSP + 0x28],0x0
MOV dword ptr [RSP + 0x30],EAX
CALL 0x00199510
CMP AL,0x0
JZ 0x0016103c
JMP 0x0016105c
LAB_0016103c:
JMP 0x0016103e
LAB_0016103e:
MOV RAX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RAX + 0x138]
ADD RAX,qword ptr [RBP + -0x38]
MOV qword ptr [RBP + -0x38],RAX
JMP 0x00160fb7
LAB_00161056:
MOV byte ptr [RBP + -0x1],0x0
JMP 0x00161078
LAB_0016105c:
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RBP + -0x40],RAX
CALL 0x001f9990
MOV RDI,qword ptr [RBP + -0x40]
MOV ESI,dword ptr [RAX]
CALL 0x001373d0
MOV byte ptr [RBP + -0x1],0x1
LAB_00161078:
MOV AL,byte ptr [RBP + -0x1]
ADD RSP,0x80
POP RBP
RET
|
int1
_ma_bitmap_create_missing_into_pagecache
(long param_1,long param_2,ulong param_3,ulong param_4,int8 param_5)
{
char cVar1;
int4 *puVar2;
ulong local_40;
local_40 = param_3;
while( true ) {
if (param_4 < local_40) {
return 0;
}
cVar1 = pagecache_write_part
(*(int8 *)(param_1 + 0x600),param_2 + 0x40,local_40,0,param_5,1,0,1,0,0,
0,0,*(int4 *)(*(long *)(param_1 + 0x600) + 0x80));
if (cVar1 != '\0') break;
local_40 = *(long *)(param_2 + 0x138) + local_40;
}
puVar2 = (int4 *)_my_thread_var();
_ma_set_fatal_error_with_share(param_1,*puVar2);
return 1;
}
|
|
61,850 |
js_std_unsetenv
|
bluesky950520[P]quickjs/quickjs-libc.c
|
static JSValue js_std_unsetenv(JSContext *ctx, JSValue this_val,
int argc, JSValue *argv)
{
const char *name;
name = JS_ToCString(ctx, argv[0]);
if (!name)
return JS_EXCEPTION;
unsetenv(name);
JS_FreeCString(ctx, name);
return JS_UNDEFINED;
}
|
O0
|
c
|
js_std_unsetenv:
subq $0x48, %rsp
movq %rsi, 0x28(%rsp)
movq %rdx, 0x30(%rsp)
movq %rdi, 0x20(%rsp)
movl %ecx, 0x1c(%rsp)
movq %r8, 0x10(%rsp)
movq 0x20(%rsp), %rdi
movq 0x10(%rsp), %rax
movq (%rax), %rsi
movq 0x8(%rax), %rdx
callq 0x147e0
movq %rax, 0x8(%rsp)
cmpq $0x0, 0x8(%rsp)
jne 0x151d2
movl $0x0, 0x38(%rsp)
movq $0x6, 0x40(%rsp)
jmp 0x151fc
movq 0x8(%rsp), %rdi
callq 0xe820
movq 0x20(%rsp), %rdi
movq 0x8(%rsp), %rsi
callq 0x29e50
movl $0x0, 0x38(%rsp)
movq $0x3, 0x40(%rsp)
movq 0x38(%rsp), %rax
movq 0x40(%rsp), %rdx
addq $0x48, %rsp
retq
nopl (%rax,%rax)
|
js_std_unsetenv:
sub rsp, 48h
mov [rsp+48h+var_20], rsi
mov [rsp+48h+var_18], rdx
mov [rsp+48h+var_28], rdi
mov [rsp+48h+var_2C], ecx
mov [rsp+48h+var_38], r8
mov rdi, [rsp+48h+var_28]
mov rax, [rsp+48h+var_38]
mov rsi, [rax]
mov rdx, [rax+8]
call JS_ToCString
mov [rsp+48h+var_40], rax
cmp [rsp+48h+var_40], 0
jnz short loc_151D2
mov dword ptr [rsp+48h+var_10], 0
mov [rsp+48h+var_8], 6
jmp short loc_151FC
loc_151D2:
mov rdi, [rsp+48h+var_40]
call _unsetenv
mov rdi, [rsp+48h+var_28]
mov rsi, [rsp+48h+var_40]
call JS_FreeCString
mov dword ptr [rsp+48h+var_10], 0
mov [rsp+48h+var_8], 3
loc_151FC:
mov rax, [rsp+48h+var_10]
mov rdx, [rsp+48h+var_8]
add rsp, 48h
retn
|
long long js_std_unsetenv(long long a1, long long a2, long long a3, long long a4, long long *a5)
{
long long v6; // [rsp+8h] [rbp-40h]
long long v7; // [rsp+38h] [rbp-10h]
v6 = JS_ToCString(a1, *a5, a5[1]);
if ( v6 )
{
unsetenv(v6);
JS_FreeCString(a1, v6);
}
LODWORD(v7) = 0;
return v7;
}
|
js_std_unsetenv:
SUB RSP,0x48
MOV qword ptr [RSP + 0x28],RSI
MOV qword ptr [RSP + 0x30],RDX
MOV qword ptr [RSP + 0x20],RDI
MOV dword ptr [RSP + 0x1c],ECX
MOV qword ptr [RSP + 0x10],R8
MOV RDI,qword ptr [RSP + 0x20]
MOV RAX,qword ptr [RSP + 0x10]
MOV RSI,qword ptr [RAX]
MOV RDX,qword ptr [RAX + 0x8]
CALL 0x001147e0
MOV qword ptr [RSP + 0x8],RAX
CMP qword ptr [RSP + 0x8],0x0
JNZ 0x001151d2
MOV dword ptr [RSP + 0x38],0x0
MOV qword ptr [RSP + 0x40],0x6
JMP 0x001151fc
LAB_001151d2:
MOV RDI,qword ptr [RSP + 0x8]
CALL 0x0010e820
MOV RDI,qword ptr [RSP + 0x20]
MOV RSI,qword ptr [RSP + 0x8]
CALL 0x00129e50
MOV dword ptr [RSP + 0x38],0x0
MOV qword ptr [RSP + 0x40],0x3
LAB_001151fc:
MOV RAX,qword ptr [RSP + 0x38]
MOV RDX,qword ptr [RSP + 0x40]
ADD RSP,0x48
RET
|
int1 [16] js_std_unsetenv(int8 param_1)
{
int1 auVar1 [16];
char *__name;
int8 *in_R8;
int4 uStack_c;
int8 local_8;
__name = (char *)JS_ToCString(param_1,*in_R8,in_R8[1]);
if (__name == (char *)0x0) {
local_8 = 6;
}
else {
unsetenv(__name);
JS_FreeCString(param_1,__name);
local_8 = 3;
}
auVar1._4_8_ = local_8;
auVar1._0_4_ = uStack_c;
auVar1._12_4_ = 0;
return auVar1 << 0x20;
}
|
|
61,851 |
js_std_unsetenv
|
bluesky950520[P]quickjs/quickjs-libc.c
|
static JSValue js_std_unsetenv(JSContext *ctx, JSValue this_val,
int argc, JSValue *argv)
{
const char *name;
name = JS_ToCString(ctx, argv[0]);
if (!name)
return JS_EXCEPTION;
unsetenv(name);
JS_FreeCString(ctx, name);
return JS_UNDEFINED;
}
|
O1
|
c
|
js_std_unsetenv:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq (%r8), %rdx
movq 0x8(%r8), %rcx
xorl %esi, %esi
xorl %r8d, %r8d
callq 0x20bf7
testq %rax, %rax
je 0x171ba
movq %rax, %r14
movq %rax, %rdi
callq 0xe830
movq %rbx, %rdi
movq %r14, %rsi
callq 0x20edd
movl $0x3, %edx
jmp 0x171bf
movl $0x6, %edx
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
|
js_std_unsetenv:
push r14
push rbx
push rax
mov rbx, rdi
mov rdx, [r8]
mov rcx, [r8+8]
xor esi, esi
xor r8d, r8d
call JS_ToCStringLen2
test rax, rax
jz short loc_171BA
mov r14, rax
mov rdi, rax
call _unsetenv
mov rdi, rbx
mov rsi, r14
call JS_FreeCString
mov edx, 3
jmp short loc_171BF
loc_171BA:
mov edx, 6
loc_171BF:
xor eax, eax
add rsp, 8
pop rbx
pop r14
retn
|
long long js_std_unsetenv(long long a1, long long a2, long long a3, long long a4, _QWORD *a5)
{
long long v5; // rax
long long v6; // r14
v5 = JS_ToCStringLen2(a1, 0LL, *a5, a5[1], 0LL);
if ( v5 )
{
v6 = v5;
unsetenv(v5);
JS_FreeCString(a1, v6);
}
return 0LL;
}
|
js_std_unsetenv:
PUSH R14
PUSH RBX
PUSH RAX
MOV RBX,RDI
MOV RDX,qword ptr [R8]
MOV RCX,qword ptr [R8 + 0x8]
XOR ESI,ESI
XOR R8D,R8D
CALL 0x00120bf7
TEST RAX,RAX
JZ 0x001171ba
MOV R14,RAX
MOV RDI,RAX
CALL 0x0010e830
MOV RDI,RBX
MOV RSI,R14
CALL 0x00120edd
MOV EDX,0x3
JMP 0x001171bf
LAB_001171ba:
MOV EDX,0x6
LAB_001171bf:
XOR EAX,EAX
ADD RSP,0x8
POP RBX
POP R14
RET
|
int1 [16] js_std_unsetenv(int8 param_1)
{
int1 auVar1 [16];
char *__name;
ulong uVar2;
int8 *in_R8;
__name = (char *)JS_ToCStringLen2(param_1,0,*in_R8,in_R8[1],0);
if (__name == (char *)0x0) {
uVar2 = 6;
}
else {
unsetenv(__name);
JS_FreeCString(param_1,__name);
uVar2 = 3;
}
auVar1._8_8_ = 0;
auVar1._0_8_ = uVar2;
return auVar1 << 0x40;
}
|
|
61,852 |
OpenSubdiv::v3_6_0::Vtr::internal::StackBuffer<double, 16u, false>::allocate(unsigned int)
|
NVIDIA-RTX[P]OSD-Lite/opensubdiv/far/../far/../vtr/stackBuffer.h
|
inline void
StackBuffer<TYPE,SIZE,POD_TYPE>::allocate(size_type capacity) {
// Again, is alignment an issue here? C++ spec says new will return pointer
// "suitably aligned" for conversion to pointers of other types, which implies
// at least an alignment of 16.
_dynamicData = static_cast<char*>(::operator new(capacity * sizeof(TYPE)));
_data = reinterpret_cast<TYPE*>(_dynamicData);
_capacity = capacity;
}
|
O0
|
c
|
OpenSubdiv::v3_6_0::Vtr::internal::StackBuffer<double, 16u, false>::allocate(unsigned int):
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x18(%rbp)
movl -0xc(%rbp), %eax
movl %eax, %edi
shlq $0x3, %rdi
callq 0xcd100
movq %rax, %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x50(%rax)
movq 0x50(%rax), %rcx
movq %rcx, (%rax)
movl -0xc(%rbp), %ecx
movl %ecx, 0xc(%rax)
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
nopl (%rax)
|
_ZN10OpenSubdiv6v3_6_03Vtr8internal11StackBufferIdLj8ELb0EE8allocateEj:
push rbp
mov rbp, rsp
sub rsp, 20h
mov [rbp+var_8], rdi
mov [rbp+var_C], esi
mov rax, [rbp+var_8]
mov [rbp+var_18], rax
mov eax, [rbp+var_C]
mov edi, eax
shl rdi, 3; unsigned __int64
call __Znwm; operator new(ulong)
mov rcx, rax
mov rax, [rbp+var_18]
mov [rax+50h], rcx
mov rcx, [rax+50h]
mov [rax], rcx
mov ecx, [rbp+var_C]
mov [rax+0Ch], ecx
add rsp, 20h
pop rbp
retn
|
long long OpenSubdiv::v3_6_0::Vtr::internal::StackBuffer<double,8u,false>::allocate(
long long a1,
unsigned int a2)
{
long long v2; // rcx
long long result; // rax
v2 = operator new(8LL * a2);
result = a1;
*(_QWORD *)(a1 + 80) = v2;
*(_QWORD *)a1 = *(_QWORD *)(a1 + 80);
*(_DWORD *)(a1 + 12) = a2;
return result;
}
| |||
61,853 |
OpenSubdiv::v3_6_0::Vtr::internal::StackBuffer<double, 16u, false>::allocate(unsigned int)
|
NVIDIA-RTX[P]OSD-Lite/opensubdiv/far/../far/../vtr/stackBuffer.h
|
inline void
StackBuffer<TYPE,SIZE,POD_TYPE>::allocate(size_type capacity) {
// Again, is alignment an issue here? C++ spec says new will return pointer
// "suitably aligned" for conversion to pointers of other types, which implies
// at least an alignment of 16.
_dynamicData = static_cast<char*>(::operator new(capacity * sizeof(TYPE)));
_data = reinterpret_cast<TYPE*>(_dynamicData);
_capacity = capacity;
}
|
O2
|
c
|
OpenSubdiv::v3_6_0::Vtr::internal::StackBuffer<double, 16u, false>::allocate(unsigned int):
pushq %r14
pushq %rbx
pushq %rax
movl %esi, %ebx
movq %rdi, %r14
movl %esi, %edi
shlq $0x3, %rdi
callq 0x52790
movq %rax, 0x110(%r14)
movq %rax, (%r14)
movl %ebx, 0xc(%r14)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
|
_ZN10OpenSubdiv6v3_6_03Vtr8internal11StackBufferIdLj32ELb0EE8allocateEj:
push r14
push rbx
push rax
mov ebx, esi
mov r14, rdi
mov edi, esi
shl rdi, 3; unsigned __int64
call __Znwm; operator new(ulong)
mov [r14+110h], rax
mov [r14], rax
mov [r14+0Ch], ebx
add rsp, 8
pop rbx
pop r14
retn
|
long long OpenSubdiv::v3_6_0::Vtr::internal::StackBuffer<double,32u,false>::allocate(
long long a1,
unsigned int a2)
{
long long result; // rax
result = operator new(8LL * a2);
*(_QWORD *)(a1 + 272) = result;
*(_QWORD *)a1 = result;
*(_DWORD *)(a1 + 12) = a2;
return result;
}
|
allocate:
PUSH R14
PUSH RBX
PUSH RAX
MOV EBX,ESI
MOV R14,RDI
MOV EDI,ESI
SHL RDI,0x3
CALL 0x00152790
MOV qword ptr [R14 + 0x110],RAX
MOV qword ptr [R14],RAX
MOV dword ptr [R14 + 0xc],EBX
ADD RSP,0x8
POP RBX
POP R14
RET
|
/* OpenSubdiv::v3_6_0::Vtr::internal::StackBuffer<double, 32u, false>::allocate(unsigned int) */
void __thiscall
OpenSubdiv::v3_6_0::Vtr::internal::StackBuffer<double,32u,false>::allocate
(StackBuffer<double,32u,false> *this,uint param_1)
{
void *pvVar1;
pvVar1 = operator_new((ulong)param_1 << 3);
*(void **)(this + 0x110) = pvVar1;
*(void **)this = pvVar1;
*(uint *)(this + 0xc) = param_1;
return;
}
|
|
61,854 |
google::protobuf::DescriptorBuilder::AddRecursiveImportError(google::protobuf::FileDescriptorProto const&, int)
|
aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/descriptor.cc
|
void DescriptorBuilder::AddRecursiveImportError(
const FileDescriptorProto& proto, int from_here) {
std::string error_message("File recursively imports itself: ");
for (size_t i = from_here; i < tables_->pending_files_.size(); i++) {
error_message.append(tables_->pending_files_[i]);
error_message.append(" -> ");
}
error_message.append(proto.name());
if (static_cast<size_t>(from_here) < tables_->pending_files_.size() - 1) {
AddError(tables_->pending_files_[from_here + 1], proto,
DescriptorPool::ErrorCollector::IMPORT, error_message);
} else {
AddError(proto.name(), proto, DescriptorPool::ErrorCollector::IMPORT,
error_message);
}
}
|
O3
|
cpp
|
google::protobuf::DescriptorBuilder::AddRecursiveImportError(google::protobuf::FileDescriptorProto const&, int):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movl %edx, %ebp
movq %rsi, 0x20(%rsp)
movq %rdi, %r14
leaq 0x10(%rsp), %rax
movq %rax, -0x10(%rax)
leaq 0x9f426(%rip), %rsi # 0x16c5de
leaq 0x9f440(%rip), %rdx # 0x16c5ff
movq %rsp, %rdi
callq 0x2c610
movslq %ebp, %rbx
movq 0x8(%r14), %rcx
movq (%rcx), %rax
movq 0x8(%rcx), %rcx
subq %rax, %rcx
sarq $0x5, %rcx
cmpq %rbx, %rcx
jbe 0xcd233
movq %rbx, %rbp
shlq $0x5, %rbp
orq $0x8, %rbp
movq %rsp, %r15
leaq 0x9f40a(%rip), %r12 # 0x16c600
movq %rbx, %r13
movq -0x8(%rax,%rbp), %rsi
movq (%rax,%rbp), %rdx
movq %r15, %rdi
callq 0x2e460
movq %r15, %rdi
movq %r12, %rsi
callq 0x2e5a0
incq %r13
movq 0x8(%r14), %rcx
movq (%rcx), %rax
movq 0x8(%rcx), %rcx
subq %rax, %rcx
sarq $0x5, %rcx
addq $0x20, %rbp
cmpq %rcx, %r13
jb 0xcd1f9
movq 0x20(%rsp), %r15
movq 0xb0(%r15), %rax
andq $-0x4, %rax
movq (%rax), %rsi
movq 0x8(%rax), %rdx
movq %rsp, %rdi
callq 0x2e460
movq 0x8(%r14), %rax
movq (%rax), %rcx
movq 0x8(%rax), %rax
subq %rcx, %rax
sarq $0x5, %rax
decq %rax
movq 0xb0(%r15), %rdx
andq $-0x4, %rdx
movq %rbx, %rsi
shlq $0x5, %rsi
cmpq %rbx, %rax
leaq 0x20(%rcx,%rsi), %rsi
cmovbeq %rdx, %rsi
movq %rsp, %r8
movq %r14, %rdi
movq %r15, %rdx
movl $0x9, %ecx
callq 0xc9ee0
movq (%rsp), %rdi
leaq 0x10(%rsp), %rax
cmpq %rax, %rdi
je 0xcd2ab
callq 0x2d160
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0xcd2bc
movq %rax, %rbx
movq (%rsp), %rdi
leaq 0x10(%rsp), %rax
cmpq %rax, %rdi
je 0xcd2d2
callq 0x2d160
movq %rbx, %rdi
callq 0x2e220
|
_ZN6google8protobuf17DescriptorBuilder23AddRecursiveImportErrorERKNS0_19FileDescriptorProtoEi:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 28h
mov ebp, edx
mov [rsp+58h+var_38], rsi
mov r14, rdi
lea rax, [rsp+58h+var_48]
mov [rax-10h], rax
lea rsi, aFileRecursivel; "File recursively imports itself: "
lea rdx, aFileRecursivel+21h; ""
mov rdi, rsp
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)
movsxd rbx, ebp
mov rcx, [r14+8]
mov rax, [rcx]
mov rcx, [rcx+8]
sub rcx, rax
sar rcx, 5
cmp rcx, rbx
jbe short loc_CD233
mov rbp, rbx
shl rbp, 5
or rbp, 8
mov r15, rsp
lea r12, asc_16C600; " -> "
mov r13, rbx
loc_CD1F9:
mov rsi, [rax+rbp-8]
mov rdx, [rax+rbp]
mov rdi, r15
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_appendEPKcm; std::string::_M_append(char const*,ulong)
mov rdi, r15
mov rsi, r12
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendEPKc; std::string::append(char const*)
inc r13
mov rcx, [r14+8]
mov rax, [rcx]
mov rcx, [rcx+8]
sub rcx, rax
sar rcx, 5
add rbp, 20h ; ' '
cmp r13, rcx
jb short loc_CD1F9
loc_CD233:
mov r15, [rsp+58h+var_38]
mov rax, [r15+0B0h]
and rax, 0FFFFFFFFFFFFFFFCh
mov rsi, [rax]
mov rdx, [rax+8]
mov rdi, rsp
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_appendEPKcm; std::string::_M_append(char const*,ulong)
mov rax, [r14+8]
mov rcx, [rax]
mov rax, [rax+8]
sub rax, rcx
sar rax, 5
dec rax
mov rdx, [r15+0B0h]
and rdx, 0FFFFFFFFFFFFFFFCh
mov rsi, rbx
shl rsi, 5
cmp rax, rbx
lea rsi, [rcx+rsi+20h]
cmovbe rsi, rdx
mov r8, rsp
mov rdi, r14
mov rdx, r15
mov ecx, 9
call _ZN6google8protobuf17DescriptorBuilder8AddErrorERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKNS0_7MessageENS0_14DescriptorPool14ErrorCollector13ErrorLocationES9_; google::protobuf::DescriptorBuilder::AddError(std::string const&,google::protobuf::Message const&,google::protobuf::DescriptorPool::ErrorCollector::ErrorLocation,std::string const&)
mov rdi, [rsp+58h+var_58]; void *
lea rax, [rsp+58h+var_48]
cmp rdi, rax
jz short loc_CD2AB
call __ZdlPv; operator delete(void *)
loc_CD2AB:
add rsp, 28h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
jmp short $+2
loc_CD2BC:
mov rbx, rax
mov rdi, [rsp+0]; void *
lea rax, [rsp+arg_8]
cmp rdi, rax
jz short loc_CD2D2
call __ZdlPv; operator delete(void *)
loc_CD2D2:
mov rdi, rbx
call __Unwind_Resume
|
void google::protobuf::DescriptorBuilder::AddRecursiveImportError(
google::protobuf::DescriptorBuilder *this,
const google::protobuf::FileDescriptorProto *a2,
int a3)
{
unsigned long long v4; // rbx
long long *v5; // rcx
long long v6; // rax
long long v7; // rbp
unsigned long long v8; // r13
long long *v9; // rcx
long long v10; // r15
_QWORD *v11; // rax
_QWORD *v12; // rsi
void *v13[2]; // [rsp+0h] [rbp-58h] BYREF
_BYTE v14[16]; // [rsp+10h] [rbp-48h] BYREF
const google::protobuf::FileDescriptorProto *v15; // [rsp+20h] [rbp-38h]
v15 = a2;
v13[0] = v14;
std::string::_M_construct<char const*>(v13, "File recursively imports itself: ", "");
v4 = a3;
v5 = (long long *)*((_QWORD *)this + 1);
v6 = *v5;
if ( (v5[1] - *v5) >> 5 > (unsigned long long)a3 )
{
v7 = (32LL * a3) | 8;
v8 = v4;
do
{
std::string::_M_append(v13, *(_QWORD *)(v6 + v7 - 8), *(_QWORD *)(v6 + v7));
std::string::append(v13, " -> ");
++v8;
v9 = (long long *)*((_QWORD *)this + 1);
v6 = *v9;
v7 += 32LL;
}
while ( v8 < (v9[1] - *v9) >> 5 );
}
v10 = (long long)v15;
std::string::_M_append(
v13,
*(_QWORD *)(*((_QWORD *)v15 + 22) & 0xFFFFFFFFFFFFFFFCLL),
*(_QWORD *)((*((_QWORD *)v15 + 22) & 0xFFFFFFFFFFFFFFFCLL) + 8));
v11 = (_QWORD *)*((_QWORD *)this + 1);
v12 = (_QWORD *)(*v11 + 32 * v4 + 32);
if ( ((long long)(v11[1] - *v11) >> 5) - 1 <= v4 )
v12 = (_QWORD *)(*(_QWORD *)(v10 + 176) & 0xFFFFFFFFFFFFFFFCLL);
google::protobuf::DescriptorBuilder::AddError((long long)this, v12, v10, 9u, v13);
if ( v13[0] != v14 )
operator delete(v13[0]);
}
|
AddRecursiveImportError:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x28
MOV EBP,EDX
MOV qword ptr [RSP + 0x20],RSI
MOV R14,RDI
LEA RAX,[RSP + 0x10]
MOV qword ptr [RAX + -0x10],RAX
LEA RSI,[0x26c5de]
LEA RDX,[0x26c5ff]
MOV RDI,RSP
CALL 0x0012c610
MOVSXD RBX,EBP
MOV RCX,qword ptr [R14 + 0x8]
MOV RAX,qword ptr [RCX]
MOV RCX,qword ptr [RCX + 0x8]
SUB RCX,RAX
SAR RCX,0x5
CMP RCX,RBX
JBE 0x001cd233
MOV RBP,RBX
SHL RBP,0x5
OR RBP,0x8
MOV R15,RSP
LEA R12,[0x26c600]
MOV R13,RBX
LAB_001cd1f9:
MOV RSI,qword ptr [RAX + RBP*0x1 + -0x8]
MOV RDX,qword ptr [RAX + RBP*0x1]
LAB_001cd202:
MOV RDI,R15
CALL 0x0012e460
MOV RDI,R15
MOV RSI,R12
CALL 0x0012e5a0
INC R13
MOV RCX,qword ptr [R14 + 0x8]
MOV RAX,qword ptr [RCX]
MOV RCX,qword ptr [RCX + 0x8]
SUB RCX,RAX
SAR RCX,0x5
ADD RBP,0x20
CMP R13,RCX
JC 0x001cd1f9
LAB_001cd233:
MOV R15,qword ptr [RSP + 0x20]
MOV RAX,qword ptr [R15 + 0xb0]
AND RAX,-0x4
MOV RSI,qword ptr [RAX]
MOV RDX,qword ptr [RAX + 0x8]
LAB_001cd24a:
MOV RDI,RSP
CALL 0x0012e460
MOV RAX,qword ptr [R14 + 0x8]
MOV RCX,qword ptr [RAX]
MOV RAX,qword ptr [RAX + 0x8]
SUB RAX,RCX
SAR RAX,0x5
DEC RAX
MOV RDX,qword ptr [R15 + 0xb0]
AND RDX,-0x4
MOV RSI,RBX
SHL RSI,0x5
CMP RAX,RBX
LEA RSI,[RCX + RSI*0x1 + 0x20]
CMOVBE RSI,RDX
MOV R8,RSP
MOV RDI,R14
MOV RDX,R15
MOV ECX,0x9
CALL 0x001c9ee0
LAB_001cd298:
MOV RDI,qword ptr [RSP]
LEA RAX,[RSP + 0x10]
CMP RDI,RAX
JZ 0x001cd2ab
CALL 0x0012d160
LAB_001cd2ab:
ADD RSP,0x28
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
/* google::protobuf::DescriptorBuilder::AddRecursiveImportError(google::protobuf::FileDescriptorProto
const&, int) */
void __thiscall
google::protobuf::DescriptorBuilder::AddRecursiveImportError
(DescriptorBuilder *this,FileDescriptorProto *param_1,int param_2)
{
FileDescriptorProto *pFVar1;
long lVar2;
ulong uVar3;
ulong uVar4;
ulong uVar5;
int1 *local_58 [2];
int1 local_48 [16];
FileDescriptorProto *local_38;
local_58[0] = local_48;
local_38 = param_1;
std::__cxx11::string::_M_construct<char_const*>(local_58,"File recursively imports itself: ","");
uVar3 = (ulong)param_2;
lVar2 = **(long **)(this + 8);
if (uVar3 < (ulong)((*(long **)(this + 8))[1] - lVar2 >> 5)) {
uVar4 = uVar3 << 5 | 8;
uVar5 = uVar3;
do {
/* try { // try from 001cd202 to 001cd214 has its CatchHandler @ 001cd2bc */
std::__cxx11::string::_M_append
((string *)local_58,*(char **)(lVar2 + -8 + uVar4),*(ulong *)(lVar2 + uVar4));
std::__cxx11::string::append((string *)local_58," -> ");
uVar5 = uVar5 + 1;
lVar2 = **(long **)(this + 8);
uVar4 = uVar4 + 0x20;
} while (uVar5 < (ulong)((*(long **)(this + 8))[1] - lVar2 >> 5));
}
pFVar1 = local_38;
/* try { // try from 001cd24a to 001cd297 has its CatchHandler @ 001cd2ba */
std::__cxx11::string::_M_append
((string *)local_58,*(char **)(*(ulong *)(local_38 + 0xb0) & 0xfffffffffffffffc),
((int8 *)(*(ulong *)(local_38 + 0xb0) & 0xfffffffffffffffc))[1]);
lVar2 = **(long **)(this + 8);
uVar5 = lVar2 + 0x20 + uVar3 * 0x20;
if (((*(long **)(this + 8))[1] - lVar2 >> 5) - 1U <= uVar3) {
uVar5 = *(ulong *)(pFVar1 + 0xb0) & 0xfffffffffffffffc;
}
AddError(this,uVar5,pFVar1,9,local_58);
if (local_58[0] != local_48) {
operator_delete(local_58[0]);
}
return;
}
|
|
61,855 |
Sort_param::init_for_filesort(unsigned int, TABLE*, unsigned long long, Filesort*)
|
eloqsql/sql/filesort.cc
|
void Sort_param::init_for_filesort(uint sortlen, TABLE *table,
ha_rows maxrows, Filesort *filesort)
{
DBUG_ASSERT(addon_fields == NULL);
sort_length= sortlen;
ref_length= table->file->ref_length;
accepted_rows= filesort->accepted_rows;
if (!(table->file->ha_table_flags() & HA_FAST_KEY_READ) &&
!table->fulltext_searched && !filesort->sort_positions)
{
/*
Get the descriptors of all fields whose values are appended
to sorted fields and get its total length in addon_buf.length
*/
addon_fields= get_addon_fields(table, sort_length, &addon_length,
&m_packable_length);
}
if (using_addon_fields())
{
DBUG_ASSERT(addon_length < UINT_MAX32);
res_length= addon_length;
}
else
{
res_length= ref_length;
/*
The reference to the record is considered
as an additional sorted field
*/
sort_length+= ref_length;
}
rec_length= sort_length + addon_length;
max_rows= maxrows;
}
|
O0
|
cpp
|
Sort_param::init_for_filesort(unsigned int, TABLE*, unsigned long long, Filesort*):
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq %r8, -0x28(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x30(%rbp)
jmp 0x8d03a5
movq -0x30(%rbp), %rax
movl -0xc(%rbp), %ecx
movl %ecx, 0x4(%rax)
movq -0x18(%rbp), %rcx
movq 0x8(%rcx), %rcx
movl 0x1a4(%rcx), %ecx
movl %ecx, 0x8(%rax)
movq -0x28(%rbp), %rcx
movq 0x18(%rcx), %rcx
movq %rcx, 0x58(%rax)
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rdi
callq 0x530060
andq $0x20, %rax
cmpq $0x0, %rax
jne 0x8d0423
movq -0x18(%rbp), %rax
testb $0x1, 0x2b4(%rax)
jne 0x8d0423
movq -0x28(%rbp), %rax
testb $0x1, 0x2a(%rax)
jne 0x8d0423
movq -0x30(%rbp), %rcx
movq -0x18(%rbp), %rdi
movl 0x4(%rcx), %esi
movq %rcx, %rdx
addq $0xc, %rdx
addq $0xb8, %rcx
callq 0x8d0470
movq %rax, %rcx
movq -0x30(%rbp), %rax
movq %rcx, 0x48(%rax)
movq -0x30(%rbp), %rdi
callq 0x8d7430
testb $0x1, %al
jne 0x8d0432
jmp 0x8d0442
jmp 0x8d0434
jmp 0x8d0436
movq -0x30(%rbp), %rax
movl 0xc(%rax), %ecx
movl %ecx, 0x10(%rax)
jmp 0x8d0455
movq -0x30(%rbp), %rax
movl 0x8(%rax), %ecx
movl %ecx, 0x10(%rax)
movl 0x8(%rax), %ecx
addl 0x4(%rax), %ecx
movl %ecx, 0x4(%rax)
movq -0x30(%rbp), %rax
movl 0x4(%rax), %ecx
addl 0xc(%rax), %ecx
movl %ecx, (%rax)
movq -0x20(%rbp), %rcx
movq %rcx, 0x20(%rax)
addq $0x30, %rsp
popq %rbp
retq
nop
|
_ZN10Sort_param17init_for_filesortEjP5TABLEyP8Filesort:
push rbp
mov rbp, rsp
sub rsp, 30h
mov [rbp+var_8], rdi
mov [rbp+var_C], esi
mov [rbp+var_18], rdx
mov [rbp+var_20], rcx
mov [rbp+var_28], r8
mov rax, [rbp+var_8]
mov [rbp+var_30], rax
jmp short $+2
loc_8D03A5:
mov rax, [rbp+var_30]
mov ecx, [rbp+var_C]
mov [rax+4], ecx
mov rcx, [rbp+var_18]
mov rcx, [rcx+8]
mov ecx, [rcx+1A4h]
mov [rax+8], ecx
mov rcx, [rbp+var_28]
mov rcx, [rcx+18h]
mov [rax+58h], rcx
mov rax, [rbp+var_18]
mov rdi, [rax+8]; this
call _ZNK7handler14ha_table_flagsEv; handler::ha_table_flags(void)
and rax, 20h
cmp rax, 0
jnz short loc_8D0423
mov rax, [rbp+var_18]
test byte ptr [rax+2B4h], 1
jnz short loc_8D0423
mov rax, [rbp+var_28]
test byte ptr [rax+2Ah], 1
jnz short loc_8D0423
mov rcx, [rbp+var_30]
mov rdi, [rbp+var_18]; TABLE *
mov esi, [rcx+4]; unsigned int
mov rdx, rcx
add rdx, 0Ch; unsigned int *
add rcx, 0B8h; unsigned int *
call _ZL16get_addon_fieldsP5TABLEjPjS1_; get_addon_fields(TABLE *,uint,uint *,uint *)
mov rcx, rax
mov rax, [rbp+var_30]
mov [rax+48h], rcx
loc_8D0423:
mov rdi, [rbp+var_30]; this
call _ZNK10Sort_param18using_addon_fieldsEv; Sort_param::using_addon_fields(void)
test al, 1
jnz short loc_8D0432
jmp short loc_8D0442
loc_8D0432:
jmp short $+2
loc_8D0434:
jmp short $+2
loc_8D0436:
mov rax, [rbp+var_30]
mov ecx, [rax+0Ch]
mov [rax+10h], ecx
jmp short loc_8D0455
loc_8D0442:
mov rax, [rbp+var_30]
mov ecx, [rax+8]
mov [rax+10h], ecx
mov ecx, [rax+8]
add ecx, [rax+4]
mov [rax+4], ecx
loc_8D0455:
mov rax, [rbp+var_30]
mov ecx, [rax+4]
add ecx, [rax+0Ch]
mov [rax], ecx
mov rcx, [rbp+var_20]
mov [rax+20h], rcx
add rsp, 30h
pop rbp
retn
|
Sort_param * Sort_param::init_for_filesort(Sort_param *this, int a2, TABLE *a3, long long a4, Filesort *a5)
{
Sort_param *result; // rax
*((_DWORD *)this + 1) = a2;
*((_DWORD *)this + 2) = *(_DWORD *)(*((_QWORD *)a3 + 1) + 420LL);
*((_QWORD *)this + 11) = *((_QWORD *)a5 + 3);
if ( (handler::ha_table_flags(*((handler **)a3 + 1)) & 0x20) == 0
&& (*((_BYTE *)a3 + 692) & 1) == 0
&& (*((_BYTE *)a5 + 42) & 1) == 0 )
{
*((_QWORD *)this + 9) = get_addon_fields(
a3,
*((_DWORD *)this + 1),
(unsigned int *)this + 3,
(unsigned int *)this + 46);
}
if ( (Sort_param::using_addon_fields(this) & 1) != 0 )
{
*((_DWORD *)this + 4) = *((_DWORD *)this + 3);
}
else
{
*((_DWORD *)this + 4) = *((_DWORD *)this + 2);
*((_DWORD *)this + 1) += *((_DWORD *)this + 2);
}
result = this;
*(_DWORD *)this = *((_DWORD *)this + 3) + *((_DWORD *)this + 1);
*((_QWORD *)this + 4) = a4;
return result;
}
|
need_parentheses_in_default:
PUSH RBP
MOV RBP,RSP
MOV qword ptr [RBP + -0x8],RDI
MOV AL,0x1
AND AL,0x1
POP RBP
RET
|
/* Item_real_typecast::need_parentheses_in_default() */
int1 Item_real_typecast::need_parentheses_in_default(void)
{
return 1;
}
|
|
61,856 |
mi_put_key_in_record
|
eloqsql/storage/myisam/mi_key.c
|
static int _mi_put_key_in_record(register MI_INFO *info, uint keynr,
my_bool unpack_blobs, uchar *record)
{
reg2 uchar *key;
uchar *pos,*key_end;
reg1 HA_KEYSEG *keyseg;
uchar *blob_ptr;
DBUG_ENTER("_mi_put_key_in_record");
blob_ptr= (uchar*) info->lastkey2; /* Place to put blob parts */
key=(uchar*) info->lastkey; /* KEy that was read */
key_end=key+info->lastkey_length;
for (keyseg=info->s->keyinfo[keynr].seg ; keyseg->type ;keyseg++)
{
if (keyseg->null_bit)
{
if (!*key++)
{
record[keyseg->null_pos]|= keyseg->null_bit;
continue;
}
record[keyseg->null_pos]&= ~keyseg->null_bit;
}
if (keyseg->type == HA_KEYTYPE_BIT)
{
uint length= keyseg->length;
if (keyseg->bit_length)
{
uchar bits= *key++;
set_rec_bits(bits, record + keyseg->bit_pos, keyseg->bit_start,
keyseg->bit_length);
length--;
}
else
{
clr_rec_bits(record + keyseg->bit_pos, keyseg->bit_start,
keyseg->bit_length);
}
memcpy(record + keyseg->start, (uchar*) key, length);
key+= length;
continue;
}
if (keyseg->flag & HA_SPACE_PACK)
{
uint length;
get_key_length(length,key);
#ifdef CHECK_KEYS
if (length > keyseg->length || key+length > key_end)
goto err;
#endif
pos= record+keyseg->start;
if (keyseg->type != (int) HA_KEYTYPE_NUM)
{
memcpy(pos,key,(size_t) length);
my_ci_fill(keyseg->charset, (char*) pos + length,
keyseg->length - length,
' ');
}
else
{
bfill(pos,keyseg->length-length,' ');
memcpy(pos+keyseg->length-length,key,(size_t) length);
}
key+=length;
continue;
}
if (keyseg->flag & HA_VAR_LENGTH_PART)
{
uint length;
get_key_length(length,key);
#ifdef CHECK_KEYS
if (length > keyseg->length || key+length > key_end)
goto err;
#endif
/* Store key length */
if (keyseg->bit_start == 1)
*(uchar*) (record+keyseg->start)= (uchar) length;
else
int2store(record+keyseg->start, length);
/* And key data */
memcpy(record+keyseg->start + keyseg->bit_start, (uchar*) key, length);
key+= length;
}
else if (keyseg->flag & HA_BLOB_PART)
{
uint length;
get_key_length(length,key);
#ifdef CHECK_KEYS
if (length > keyseg->length || key+length > key_end)
goto err;
#endif
if (unpack_blobs)
{
memcpy(record+keyseg->start+keyseg->bit_start,
&blob_ptr, sizeof(char *));
memcpy(blob_ptr,key,length);
blob_ptr+=length;
/* The above changed info->lastkey2. Inform mi_rnext_same(). */
info->update&= ~HA_STATE_RNEXT_SAME;
_mi_store_blob_length(record+keyseg->start,
(uint) keyseg->bit_start,length);
}
key+=length;
}
else if (keyseg->flag & HA_SWAP_KEY)
{
uchar *to= record+keyseg->start+keyseg->length;
uchar *end= key+keyseg->length;
#ifdef CHECK_KEYS
if (end > key_end)
goto err;
#endif
do
{
*--to= *key++;
} while (key != end);
continue;
}
else
{
#ifdef CHECK_KEYS
if (key+keyseg->length > key_end)
goto err;
#endif
memcpy(record+keyseg->start,(uchar*) key,
(size_t) keyseg->length);
key+= keyseg->length;
}
}
DBUG_RETURN(0);
err:
DBUG_RETURN(1); /* Crashed row */
}
|
O3
|
c
|
mi_put_key_in_record:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %rcx, %r12
movl %edx, -0x44(%rbp)
movq (%rdi), %rax
movq 0x218(%rax), %rax
movl %esi, %ecx
imulq $0x70, %rcx, %rcx
movq 0x28(%rax,%rcx), %r15
movb 0x18(%r15), %cl
testb %cl, %cl
je 0x36806
movq 0x108(%rdi), %r13
movl 0x1d8(%rdi), %eax
addq %r13, %rax
movq %rax, -0x40(%rbp)
leaq 0x18(%r15), %rax
movq %rdi, -0x60(%rbp)
movq 0x110(%rdi), %rdx
movq %rdx, -0x50(%rbp)
leaq -0x1(%r12), %rdx
movq %rdx, -0x58(%rbp)
movq %r12, -0x30(%rbp)
movb 0x19(%r15), %dl
testb %dl, %dl
je 0x364b8
leaq 0x1(%r13), %rbx
cmpb $0x0, (%r13)
je 0x3658a
notb %dl
movl 0xc(%r15), %ecx
andb %dl, (%r12,%rcx)
movb (%rax), %cl
movq %rbx, %r13
cmpb $0x13, %cl
jne 0x3653a
movzwl 0x14(%r15), %esi
movzbl 0x1b(%r15), %eax
testl %eax, %eax
je 0x365ab
movzbl (%r13), %edi
movzwl 0x10(%r15), %r8d
movzbl 0x1a(%r15), %edx
movl $0xffffffff, %r9d # imm = 0xFFFFFFFF
movl %eax, %ecx
shll %cl, %r9d
notl %r9d
movl %edx, %ecx
shll %cl, %r9d
movzbl (%r12,%r8), %ecx
notl %r9d
andl %ecx, %r9d
movl %edi, %r10d
movl %edx, %ecx
shll %cl, %r10d
orl %r9d, %r10d
movb %r10b, (%r12,%r8)
addl %edx, %eax
cmpl $0x9, %eax
jb 0x36530
movzbl 0x1(%r12,%r8), %r9d
addb $-0x8, %al
movl %eax, %ecx
shrl %cl, %r9d
shll %cl, %r9d
movb $0x8, %cl
subb %dl, %cl
shrl %cl, %edi
orl %r9d, %edi
movb %dil, 0x1(%r12,%r8)
incq %r13
decl %esi
jmp 0x365c9
movzwl 0x12(%r15), %eax
testb $0x1, %al
jne 0x36597
testb $0x8, %al
jne 0x365e9
testb $0x20, %al
jne 0x366a7
movzwl 0x14(%r15), %edx
leaq (%rdx,%r13), %rcx
testb $0x40, %al
jne 0x36736
cmpq -0x40(%rbp), %rcx
ja 0x36817
movl 0x8(%r15), %edi
addq %r12, %rdi
movq %r13, %rsi
callq 0x282c0
movzwl 0x14(%r15), %ebx
addq %r13, %rbx
jmp 0x367e9
movl 0xc(%r15), %eax
orb %dl, (%r12,%rax)
jmp 0x367e9
movzbl (%r13), %edi
cmpl $0xff, %edi
je 0x36604
movl $0x1, %esi
jmp 0x36615
movzbl 0x1a(%r15), %ecx
cmpl $0x9, %ecx
jb 0x365c9
addb $-0x8, %cl
movl $0xffffffff, %eax # imm = 0xFFFFFFFF
shll %cl, %eax
movzwl 0x10(%r15), %ecx
andb %al, 0x1(%r12,%rcx)
movl 0x8(%r15), %edi
addq %r12, %rdi
movl %esi, %r14d
movq %r13, %rsi
movq %r14, %rdx
callq 0x282c0
addq %r14, %r13
movq %r13, %rbx
jmp 0x367e9
movzbl (%r13), %ecx
cmpl $0xff, %ecx
je 0x366c2
movl $0x1, %edx
jmp 0x366d3
movzwl 0x1(%r13), %eax
rolw $0x8, %ax
movzwl %ax, %edi
movl $0x3, %esi
movzwl 0x14(%r15), %edx
movl $0x1, %eax
subl %edi, %edx
jb 0x36808
addq %rsi, %r13
movl %edi, %r14d
leaq (%r14,%r13), %rbx
cmpq -0x40(%rbp), %rbx
ja 0x36808
movl 0x8(%r15), %r12d
addq -0x30(%rbp), %r12
cmpb $0x7, %cl
jne 0x3666d
movq %r12, %rdi
movl $0x20, %esi
callq 0x281d0
movzwl 0x14(%r15), %edi
addq %r12, %rdi
subq %r14, %rdi
movq %r13, %rsi
movq %r14, %rdx
callq 0x282c0
jmp 0x3669e
movl %edi, -0x34(%rbp)
movq %r12, %rdi
movq %r13, %rsi
movq %r14, %rdx
callq 0x282c0
movq (%r15), %rdi
addq %r14, %r12
movzwl 0x14(%r15), %edx
subl -0x34(%rbp), %edx
movq 0xb8(%rdi), %rax
movq %r12, %rsi
movl $0x20, %ecx
callq *0x78(%rax)
movq -0x30(%rbp), %r12
jmp 0x367e9
movzbl (%r13), %esi
cmpl $0xff, %esi
je 0x3675c
movl $0x1, %ecx
jmp 0x3676d
movzwl 0x1(%r13), %eax
rolw $0x8, %ax
movzwl %ax, %ecx
movl $0x3, %edx
movzwl 0x14(%r15), %esi
movl $0x1, %eax
cmpl %esi, %ecx
ja 0x36808
addq %rdx, %r13
movl %ecx, %edx
leaq (%rdx,%r13), %rbx
cmpq -0x40(%rbp), %rbx
ja 0x36808
cmpb $0x1, 0x1a(%r15)
jne 0x3670d
movl 0x8(%r15), %eax
movq -0x30(%rbp), %r12
movb %cl, (%r12,%rax)
jmp 0x3671a
movl 0x8(%r15), %eax
movq -0x30(%rbp), %r12
movw %cx, (%r12,%rax)
movl 0x8(%r15), %eax
addq %r12, %rax
movzbl 0x1a(%r15), %edi
addq %rax, %rdi
movq %r13, %rsi
callq 0x282c0
jmp 0x367e9
cmpq -0x40(%rbp), %rcx
ja 0x36817
movl 0x8(%r15), %eax
addq -0x58(%rbp), %rax
movb (%r13), %cl
incq %r13
movb %cl, (%rax,%rdx)
decq %rdx
jne 0x36748
jmp 0x365e1
movzwl 0x1(%r13), %eax
rolw $0x8, %ax
movzwl %ax, %esi
movl $0x3, %ecx
movzwl 0x14(%r15), %edx
movl $0x1, %eax
cmpl %edx, %esi
ja 0x36808
addq %rcx, %r13
movl %esi, %r12d
leaq (%r12,%r13), %rbx
cmpq -0x40(%rbp), %rbx
ja 0x36808
cmpb $0x0, -0x44(%rbp)
je 0x3669e
movl 0x8(%r15), %eax
addq -0x30(%rbp), %rax
movzbl 0x1a(%r15), %ecx
movq -0x50(%rbp), %r14
movq %r14, (%rcx,%rax)
movq %r14, %rdi
movl %esi, -0x34(%rbp)
movq %r13, %rsi
movq %r12, %rdx
callq 0x282c0
movq -0x60(%rbp), %rax
andb $-0x11, 0x1d1(%rax)
addq %r12, %r14
movq %r14, -0x50(%rbp)
movq -0x30(%rbp), %r12
movl 0x8(%r15), %edi
addq %r12, %rdi
movzbl 0x1a(%r15), %esi
movl -0x34(%rbp), %edx
callq 0x33d37
leaq 0x20(%r15), %rdx
movb 0x38(%r15), %cl
addq $0x38, %r15
movq %r15, %rax
movq %rbx, %r13
movq %rdx, %r15
testb %cl, %cl
jne 0x36492
xorl %eax, %eax
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl $0x1, %eax
jmp 0x36808
|
_mi_put_key_in_record:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 38h
mov r12, rcx
mov [rbp+var_44], edx
mov rax, [rdi]
mov rax, [rax+218h]
mov ecx, esi
imul rcx, 70h ; 'p'
mov r15, [rax+rcx+28h]
mov cl, [r15+18h]
test cl, cl
jz loc_36806
mov r13, [rdi+108h]
mov eax, [rdi+1D8h]
add rax, r13
mov [rbp+var_40], rax
lea rax, [r15+18h]
mov [rbp+var_60], rdi
mov rdx, [rdi+110h]
mov [rbp+var_50], rdx
lea rdx, [r12-1]
mov [rbp+var_58], rdx
mov [rbp+var_30], r12
loc_36492:
mov dl, [r15+19h]
test dl, dl
jz short loc_364B8
lea rbx, [r13+1]
cmp byte ptr [r13+0], 0
jz loc_3658A
not dl
mov ecx, [r15+0Ch]
and [r12+rcx], dl
mov cl, [rax]
mov r13, rbx
loc_364B8:
cmp cl, 13h
jnz short loc_3653A
movzx esi, word ptr [r15+14h]
movzx eax, byte ptr [r15+1Bh]
test eax, eax
jz loc_365AB
movzx edi, byte ptr [r13+0]
movzx r8d, word ptr [r15+10h]
movzx edx, byte ptr [r15+1Ah]
mov r9d, 0FFFFFFFFh
mov ecx, eax
shl r9d, cl
not r9d
mov ecx, edx
shl r9d, cl
movzx ecx, byte ptr [r12+r8]
not r9d
and r9d, ecx
mov r10d, edi
mov ecx, edx
shl r10d, cl
or r10d, r9d
mov [r12+r8], r10b
add eax, edx
cmp eax, 9
jb short loc_36530
movzx r9d, byte ptr [r12+r8+1]
add al, 0F8h
mov ecx, eax
shr r9d, cl
shl r9d, cl
mov cl, 8
sub cl, dl
shr edi, cl
or edi, r9d
mov [r12+r8+1], dil
loc_36530:
inc r13
dec esi
jmp loc_365C9
loc_3653A:
movzx eax, word ptr [r15+12h]
test al, 1
jnz short loc_36597
test al, 8
jnz loc_365E9
test al, 20h
jnz loc_366A7
movzx edx, word ptr [r15+14h]
lea rcx, [rdx+r13]
test al, 40h
jnz loc_36736
cmp rcx, [rbp+var_40]
ja loc_36817
mov edi, [r15+8]
add rdi, r12
mov rsi, r13
call _memcpy
movzx ebx, word ptr [r15+14h]
add rbx, r13
jmp loc_367E9
loc_3658A:
mov eax, [r15+0Ch]
or [r12+rax], dl
jmp loc_367E9
loc_36597:
movzx edi, byte ptr [r13+0]
cmp edi, 0FFh
jz short loc_36604
mov esi, 1
jmp short loc_36615
loc_365AB:
movzx ecx, byte ptr [r15+1Ah]
cmp ecx, 9
jb short loc_365C9
add cl, 0F8h
mov eax, 0FFFFFFFFh
shl eax, cl
movzx ecx, word ptr [r15+10h]
and [r12+rcx+1], al
loc_365C9:
mov edi, [r15+8]
add rdi, r12
mov r14d, esi
mov rsi, r13
mov rdx, r14
call _memcpy
add r13, r14
loc_365E1:
mov rbx, r13
jmp loc_367E9
loc_365E9:
movzx ecx, byte ptr [r13+0]
cmp ecx, 0FFh
jz loc_366C2
mov edx, 1
jmp loc_366D3
loc_36604:
movzx eax, word ptr [r13+1]
rol ax, 8
movzx edi, ax
mov esi, 3
loc_36615:
movzx edx, word ptr [r15+14h]
mov eax, 1
sub edx, edi
jb loc_36808
add r13, rsi
mov r14d, edi
lea rbx, [r14+r13]
cmp rbx, [rbp+var_40]
ja loc_36808
mov r12d, [r15+8]
add r12, [rbp+var_30]
cmp cl, 7
jnz short loc_3666D
mov rdi, r12
mov esi, 20h ; ' '
call _memset
movzx edi, word ptr [r15+14h]
add rdi, r12
sub rdi, r14
mov rsi, r13
mov rdx, r14
call _memcpy
jmp short loc_3669E
loc_3666D:
mov [rbp+var_34], edi
mov rdi, r12
mov rsi, r13
mov rdx, r14
call _memcpy
mov rdi, [r15]
add r12, r14
movzx edx, word ptr [r15+14h]
sub edx, [rbp+var_34]
mov rax, [rdi+0B8h]
mov rsi, r12
mov ecx, 20h ; ' '
call qword ptr [rax+78h]
loc_3669E:
mov r12, [rbp+var_30]
jmp loc_367E9
loc_366A7:
movzx esi, byte ptr [r13+0]
cmp esi, 0FFh
jz loc_3675C
mov ecx, 1
jmp loc_3676D
loc_366C2:
movzx eax, word ptr [r13+1]
rol ax, 8
movzx ecx, ax
mov edx, 3
loc_366D3:
movzx esi, word ptr [r15+14h]
mov eax, 1
cmp ecx, esi
ja loc_36808
add r13, rdx
mov edx, ecx
lea rbx, [rdx+r13]
cmp rbx, [rbp+var_40]
ja loc_36808
cmp byte ptr [r15+1Ah], 1
jnz short loc_3670D
mov eax, [r15+8]
mov r12, [rbp+var_30]
mov [r12+rax], cl
jmp short loc_3671A
loc_3670D:
mov eax, [r15+8]
mov r12, [rbp+var_30]
mov [r12+rax], cx
loc_3671A:
mov eax, [r15+8]
add rax, r12
movzx edi, byte ptr [r15+1Ah]
add rdi, rax
mov rsi, r13
call _memcpy
jmp loc_367E9
loc_36736:
cmp rcx, [rbp+var_40]
ja loc_36817
mov eax, [r15+8]
add rax, [rbp+var_58]
loc_36748:
mov cl, [r13+0]
inc r13
mov [rax+rdx], cl
dec rdx
jnz short loc_36748
jmp loc_365E1
loc_3675C:
movzx eax, word ptr [r13+1]
rol ax, 8
movzx esi, ax
mov ecx, 3
loc_3676D:
movzx edx, word ptr [r15+14h]
mov eax, 1
cmp esi, edx
ja loc_36808
add r13, rcx
mov r12d, esi
lea rbx, [r12+r13]
cmp rbx, [rbp+var_40]
ja short loc_36808
cmp byte ptr [rbp+var_44], 0
jz loc_3669E
mov eax, [r15+8]
add rax, [rbp+var_30]
movzx ecx, byte ptr [r15+1Ah]
mov r14, [rbp+var_50]
mov [rcx+rax], r14
mov rdi, r14
mov [rbp+var_34], esi
mov rsi, r13
mov rdx, r12
call _memcpy
mov rax, [rbp+var_60]
and byte ptr [rax+1D1h], 0EFh
add r14, r12
mov [rbp+var_50], r14
mov r12, [rbp+var_30]
mov edi, [r15+8]
add rdi, r12
movzx esi, byte ptr [r15+1Ah]
mov edx, [rbp+var_34]
call _mi_store_blob_length
loc_367E9:
lea rdx, [r15+20h]
mov cl, [r15+38h]
add r15, 38h ; '8'
mov rax, r15
mov r13, rbx
mov r15, rdx
test cl, cl
jnz loc_36492
loc_36806:
xor eax, eax
loc_36808:
add rsp, 38h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_36817:
mov eax, 1
jmp short loc_36808
|
long long mi_put_key_in_record(long long a1, unsigned int a2, char a3, long long a4)
{
_QWORD *v5; // r15
char v6; // cl
unsigned __int8 *v7; // r13
char *v8; // rax
char v9; // dl
unsigned __int8 *v10; // rbx
unsigned int v11; // esi
int v12; // eax
unsigned int v13; // edi
long long v14; // r8
int v15; // edx
unsigned int v16; // eax
__int16 v17; // ax
long long v18; // rdx
unsigned __int8 *v19; // rcx
unsigned int v20; // edi
long long v21; // rsi
unsigned int v22; // ecx
unsigned int v23; // ecx
long long v24; // rdx
unsigned int v25; // edx
long long result; // rax
bool v27; // cf
long long v28; // rdx
unsigned __int8 *v29; // r13
long long v30; // r12
unsigned int v31; // esi
long long v32; // rcx
unsigned __int8 *v33; // r13
long long v34; // rax
char v35; // cl
unsigned __int8 *v36; // r13
long long v38; // [rsp+8h] [rbp-58h]
long long v39; // [rsp+10h] [rbp-50h]
unsigned __int8 *v41; // [rsp+20h] [rbp-40h]
long long v42; // [rsp+30h] [rbp-30h]
v5 = *(_QWORD **)(*(_QWORD *)(*(_QWORD *)a1 + 536LL) + 112LL * a2 + 40);
v6 = *((_BYTE *)v5 + 24);
if ( v6 )
{
v7 = *(unsigned __int8 **)(a1 + 264);
v41 = &v7[*(unsigned int *)(a1 + 472)];
v8 = (char *)(v5 + 3);
v39 = *(_QWORD *)(a1 + 272);
v38 = a4 - 1;
v42 = a4;
do
{
v9 = *((_BYTE *)v5 + 25);
if ( v9 )
{
v10 = v7 + 1;
if ( !*v7 )
{
*(_BYTE *)(a4 + *((unsigned int *)v5 + 3)) |= v9;
goto LABEL_51;
}
*(_BYTE *)(a4 + *((unsigned int *)v5 + 3)) &= ~v9;
v6 = *v8;
++v7;
}
if ( v6 == 19 )
{
v11 = *((unsigned __int16 *)v5 + 10);
v12 = *((unsigned __int8 *)v5 + 27);
if ( *((_BYTE *)v5 + 27) )
{
v13 = *v7;
v14 = *((unsigned __int16 *)v5 + 8);
v15 = *((unsigned __int8 *)v5 + 26);
*(_BYTE *)(a4 + v14) = *(_BYTE *)(a4 + v14) & ~(~(-1 << v12) << *((_BYTE *)v5 + 26)) | (*v7 << *((_BYTE *)v5 + 26));
v16 = v15 + v12;
if ( v16 >= 9 )
*(_BYTE *)(a4 + v14 + 1) = (*(unsigned __int8 *)(a4 + v14 + 1) >> (v16 - 8) << (v16 - 8)) | (v13 >> (8 - v15));
++v7;
--v11;
}
else
{
v22 = *((unsigned __int8 *)v5 + 26);
if ( v22 >= 9 )
*(_BYTE *)(a4 + *((unsigned __int16 *)v5 + 8) + 1) &= -1 << (v22 - 8);
}
memcpy(a4 + *((unsigned int *)v5 + 2), v7, v11);
v7 += v11;
LABEL_23:
v10 = v7;
goto LABEL_51;
}
v17 = *((_WORD *)v5 + 9);
if ( (v17 & 1) != 0 )
{
v20 = *v7;
if ( v20 == 255 )
{
v20 = (unsigned __int16)__ROL2__(*(_WORD *)(v7 + 1), 8);
v21 = 3LL;
}
else
{
v21 = 1LL;
}
v25 = *((unsigned __int16 *)v5 + 10);
result = 1LL;
v27 = v25 < v20;
v28 = v25 - v20;
if ( v27 )
return result;
v29 = &v7[v21];
v10 = &v29[v20];
if ( v10 > v41 )
return result;
v30 = v42 + *((unsigned int *)v5 + 2);
if ( v6 == 7 )
{
memset(v42 + *((unsigned int *)v5 + 2), 32LL, v28);
memcpy(v30 + *((unsigned __int16 *)v5 + 10) - v20, v29, v20);
}
else
{
memcpy(v30, v29, v20);
(*(void ( **)(_QWORD, long long, _QWORD, long long))(*(_QWORD *)(*v5 + 184LL) + 120LL))(
*v5,
v20 + v30,
*((unsigned __int16 *)v5 + 10) - v20,
32LL);
}
LABEL_32:
a4 = v42;
goto LABEL_51;
}
if ( (v17 & 8) != 0 )
{
v23 = *v7;
if ( v23 == 255 )
{
v23 = (unsigned __int16)__ROL2__(*(_WORD *)(v7 + 1), 8);
v24 = 3LL;
}
else
{
v24 = 1LL;
}
result = 1LL;
if ( v23 > *((unsigned __int16 *)v5 + 10) )
return result;
v33 = &v7[v24];
v10 = &v33[v23];
if ( v10 > v41 )
return result;
a4 = v42;
if ( *((_BYTE *)v5 + 26) == 1 )
*(_BYTE *)(v42 + *((unsigned int *)v5 + 2)) = v23;
else
*(_WORD *)(v42 + *((unsigned int *)v5 + 2)) = v23;
memcpy(v42 + *((unsigned int *)v5 + 2) + *((unsigned __int8 *)v5 + 26), v33, v23);
}
else
{
if ( (v17 & 0x20) != 0 )
{
v31 = *v7;
if ( v31 == 255 )
{
v31 = (unsigned __int16)__ROL2__(*(_WORD *)(v7 + 1), 8);
v32 = 3LL;
}
else
{
v32 = 1LL;
}
result = 1LL;
if ( v31 > *((unsigned __int16 *)v5 + 10) )
return result;
v36 = &v7[v32];
v10 = &v36[v31];
if ( v10 > v41 )
return result;
if ( a3 )
{
*(_QWORD *)(*((unsigned __int8 *)v5 + 26) + v42 + *((unsigned int *)v5 + 2)) = v39;
memcpy(v39, v36, v31);
*(_BYTE *)(a1 + 465) &= ~0x10u;
v39 += v31;
a4 = v42;
mi_store_blob_length((_BYTE *)(v42 + *((unsigned int *)v5 + 2)), *((unsigned __int8 *)v5 + 26), v31);
goto LABEL_51;
}
goto LABEL_32;
}
v18 = *((unsigned __int16 *)v5 + 10);
v19 = &v7[v18];
if ( (v17 & 0x40) != 0 )
{
if ( v19 > v41 )
return 1LL;
v34 = v38 + *((unsigned int *)v5 + 2);
do
{
v35 = *v7++;
*(_BYTE *)(v34 + v18--) = v35;
}
while ( v18 );
goto LABEL_23;
}
if ( v19 > v41 )
return 1LL;
memcpy(a4 + *((unsigned int *)v5 + 2), v7, v18);
v10 = &v7[*((unsigned __int16 *)v5 + 10)];
}
LABEL_51:
v6 = *((_BYTE *)v5 + 56);
v8 = (char *)(v5 + 7);
v7 = v10;
v5 += 4;
}
while ( v6 );
}
return 0LL;
}
|
_mi_put_key_in_record:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x38
MOV R12,RCX
MOV dword ptr [RBP + -0x44],EDX
MOV RAX,qword ptr [RDI]
MOV RAX,qword ptr [RAX + 0x218]
MOV ECX,ESI
IMUL RCX,RCX,0x70
MOV R15,qword ptr [RAX + RCX*0x1 + 0x28]
MOV CL,byte ptr [R15 + 0x18]
TEST CL,CL
JZ 0x00136806
MOV R13,qword ptr [RDI + 0x108]
MOV EAX,dword ptr [RDI + 0x1d8]
ADD RAX,R13
MOV qword ptr [RBP + -0x40],RAX
LEA RAX,[R15 + 0x18]
MOV qword ptr [RBP + -0x60],RDI
MOV RDX,qword ptr [RDI + 0x110]
MOV qword ptr [RBP + -0x50],RDX
LEA RDX,[R12 + -0x1]
MOV qword ptr [RBP + -0x58],RDX
MOV qword ptr [RBP + -0x30],R12
LAB_00136492:
MOV DL,byte ptr [R15 + 0x19]
TEST DL,DL
JZ 0x001364b8
LEA RBX,[R13 + 0x1]
CMP byte ptr [R13],0x0
JZ 0x0013658a
NOT DL
MOV ECX,dword ptr [R15 + 0xc]
AND byte ptr [R12 + RCX*0x1],DL
MOV CL,byte ptr [RAX]
MOV R13,RBX
LAB_001364b8:
CMP CL,0x13
JNZ 0x0013653a
MOVZX ESI,word ptr [R15 + 0x14]
MOVZX EAX,byte ptr [R15 + 0x1b]
TEST EAX,EAX
JZ 0x001365ab
MOVZX EDI,byte ptr [R13]
MOVZX R8D,word ptr [R15 + 0x10]
MOVZX EDX,byte ptr [R15 + 0x1a]
MOV R9D,0xffffffff
MOV ECX,EAX
SHL R9D,CL
NOT R9D
MOV ECX,EDX
SHL R9D,CL
MOVZX ECX,byte ptr [R12 + R8*0x1]
NOT R9D
AND R9D,ECX
MOV R10D,EDI
MOV ECX,EDX
SHL R10D,CL
OR R10D,R9D
MOV byte ptr [R12 + R8*0x1],R10B
ADD EAX,EDX
CMP EAX,0x9
JC 0x00136530
MOVZX R9D,byte ptr [R12 + R8*0x1 + 0x1]
ADD AL,0xf8
MOV ECX,EAX
SHR R9D,CL
SHL R9D,CL
MOV CL,0x8
SUB CL,DL
SHR EDI,CL
OR EDI,R9D
MOV byte ptr [R12 + R8*0x1 + 0x1],DIL
LAB_00136530:
INC R13
DEC ESI
JMP 0x001365c9
LAB_0013653a:
MOVZX EAX,word ptr [R15 + 0x12]
TEST AL,0x1
JNZ 0x00136597
TEST AL,0x8
JNZ 0x001365e9
TEST AL,0x20
JNZ 0x001366a7
MOVZX EDX,word ptr [R15 + 0x14]
LEA RCX,[RDX + R13*0x1]
TEST AL,0x40
JNZ 0x00136736
CMP RCX,qword ptr [RBP + -0x40]
JA 0x00136817
MOV EDI,dword ptr [R15 + 0x8]
ADD RDI,R12
MOV RSI,R13
CALL 0x001282c0
MOVZX EBX,word ptr [R15 + 0x14]
ADD RBX,R13
JMP 0x001367e9
LAB_0013658a:
MOV EAX,dword ptr [R15 + 0xc]
OR byte ptr [R12 + RAX*0x1],DL
JMP 0x001367e9
LAB_00136597:
MOVZX EDI,byte ptr [R13]
CMP EDI,0xff
JZ 0x00136604
MOV ESI,0x1
JMP 0x00136615
LAB_001365ab:
MOVZX ECX,byte ptr [R15 + 0x1a]
CMP ECX,0x9
JC 0x001365c9
ADD CL,0xf8
MOV EAX,0xffffffff
SHL EAX,CL
MOVZX ECX,word ptr [R15 + 0x10]
AND byte ptr [R12 + RCX*0x1 + 0x1],AL
LAB_001365c9:
MOV EDI,dword ptr [R15 + 0x8]
ADD RDI,R12
MOV R14D,ESI
MOV RSI,R13
MOV RDX,R14
CALL 0x001282c0
ADD R13,R14
LAB_001365e1:
MOV RBX,R13
JMP 0x001367e9
LAB_001365e9:
MOVZX ECX,byte ptr [R13]
CMP ECX,0xff
JZ 0x001366c2
MOV EDX,0x1
JMP 0x001366d3
LAB_00136604:
MOVZX EAX,word ptr [R13 + 0x1]
ROL AX,0x8
MOVZX EDI,AX
MOV ESI,0x3
LAB_00136615:
MOVZX EDX,word ptr [R15 + 0x14]
MOV EAX,0x1
SUB EDX,EDI
JC 0x00136808
ADD R13,RSI
MOV R14D,EDI
LEA RBX,[R14 + R13*0x1]
CMP RBX,qword ptr [RBP + -0x40]
JA 0x00136808
MOV R12D,dword ptr [R15 + 0x8]
ADD R12,qword ptr [RBP + -0x30]
CMP CL,0x7
JNZ 0x0013666d
MOV RDI,R12
MOV ESI,0x20
CALL 0x001281d0
MOVZX EDI,word ptr [R15 + 0x14]
ADD RDI,R12
SUB RDI,R14
MOV RSI,R13
MOV RDX,R14
CALL 0x001282c0
JMP 0x0013669e
LAB_0013666d:
MOV dword ptr [RBP + -0x34],EDI
MOV RDI,R12
MOV RSI,R13
MOV RDX,R14
CALL 0x001282c0
MOV RDI,qword ptr [R15]
ADD R12,R14
MOVZX EDX,word ptr [R15 + 0x14]
SUB EDX,dword ptr [RBP + -0x34]
MOV RAX,qword ptr [RDI + 0xb8]
MOV RSI,R12
MOV ECX,0x20
CALL qword ptr [RAX + 0x78]
LAB_0013669e:
MOV R12,qword ptr [RBP + -0x30]
JMP 0x001367e9
LAB_001366a7:
MOVZX ESI,byte ptr [R13]
CMP ESI,0xff
JZ 0x0013675c
MOV ECX,0x1
JMP 0x0013676d
LAB_001366c2:
MOVZX EAX,word ptr [R13 + 0x1]
ROL AX,0x8
MOVZX ECX,AX
MOV EDX,0x3
LAB_001366d3:
MOVZX ESI,word ptr [R15 + 0x14]
MOV EAX,0x1
CMP ECX,ESI
JA 0x00136808
ADD R13,RDX
MOV EDX,ECX
LEA RBX,[RDX + R13*0x1]
CMP RBX,qword ptr [RBP + -0x40]
JA 0x00136808
CMP byte ptr [R15 + 0x1a],0x1
JNZ 0x0013670d
MOV EAX,dword ptr [R15 + 0x8]
MOV R12,qword ptr [RBP + -0x30]
MOV byte ptr [R12 + RAX*0x1],CL
JMP 0x0013671a
LAB_0013670d:
MOV EAX,dword ptr [R15 + 0x8]
MOV R12,qword ptr [RBP + -0x30]
MOV word ptr [R12 + RAX*0x1],CX
LAB_0013671a:
MOV EAX,dword ptr [R15 + 0x8]
ADD RAX,R12
MOVZX EDI,byte ptr [R15 + 0x1a]
ADD RDI,RAX
MOV RSI,R13
CALL 0x001282c0
JMP 0x001367e9
LAB_00136736:
CMP RCX,qword ptr [RBP + -0x40]
JA 0x00136817
MOV EAX,dword ptr [R15 + 0x8]
ADD RAX,qword ptr [RBP + -0x58]
LAB_00136748:
MOV CL,byte ptr [R13]
INC R13
MOV byte ptr [RAX + RDX*0x1],CL
DEC RDX
JNZ 0x00136748
JMP 0x001365e1
LAB_0013675c:
MOVZX EAX,word ptr [R13 + 0x1]
ROL AX,0x8
MOVZX ESI,AX
MOV ECX,0x3
LAB_0013676d:
MOVZX EDX,word ptr [R15 + 0x14]
MOV EAX,0x1
CMP ESI,EDX
JA 0x00136808
ADD R13,RCX
MOV R12D,ESI
LEA RBX,[R12 + R13*0x1]
CMP RBX,qword ptr [RBP + -0x40]
JA 0x00136808
CMP byte ptr [RBP + -0x44],0x0
JZ 0x0013669e
MOV EAX,dword ptr [R15 + 0x8]
ADD RAX,qword ptr [RBP + -0x30]
MOVZX ECX,byte ptr [R15 + 0x1a]
MOV R14,qword ptr [RBP + -0x50]
MOV qword ptr [RCX + RAX*0x1],R14
MOV RDI,R14
MOV dword ptr [RBP + -0x34],ESI
MOV RSI,R13
MOV RDX,R12
CALL 0x001282c0
MOV RAX,qword ptr [RBP + -0x60]
AND byte ptr [RAX + 0x1d1],0xef
ADD R14,R12
MOV qword ptr [RBP + -0x50],R14
MOV R12,qword ptr [RBP + -0x30]
MOV EDI,dword ptr [R15 + 0x8]
ADD RDI,R12
MOVZX ESI,byte ptr [R15 + 0x1a]
MOV EDX,dword ptr [RBP + -0x34]
CALL 0x00133d37
LAB_001367e9:
LEA RDX,[R15 + 0x20]
MOV CL,byte ptr [R15 + 0x38]
ADD R15,0x38
MOV RAX,R15
MOV R13,RBX
MOV R15,RDX
TEST CL,CL
JNZ 0x00136492
LAB_00136806:
XOR EAX,EAX
LAB_00136808:
ADD RSP,0x38
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_00136817:
MOV EAX,0x1
JMP 0x00136808
|
int8 _mi_put_key_in_record(long *param_1,ulong param_2,char param_3,long param_4)
{
byte bVar1;
byte bVar2;
ushort uVar3;
byte bVar4;
byte *pbVar5;
long *plVar6;
char cVar7;
long lVar8;
ulong uVar9;
uint uVar10;
void *__dest;
byte *__src;
byte *pbVar11;
long *plVar12;
void *local_58;
plVar12 = *(long **)(*(long *)(*param_1 + 0x218) + 0x28 + (param_2 & 0xffffffff) * 0x70);
cVar7 = (char)plVar12[3];
if (cVar7 != '\0') {
pbVar5 = (byte *)param_1[0x21] + *(uint *)(param_1 + 0x3b);
plVar6 = plVar12 + 3;
local_58 = (void *)param_1[0x22];
pbVar11 = (byte *)param_1[0x21];
do {
bVar4 = *(byte *)((long)plVar12 + 0x19);
__src = pbVar11;
if (bVar4 == 0) {
LAB_001364b8:
if (cVar7 == '\x13') {
uVar3 = *(ushort *)((long)plVar12 + 0x14);
uVar10 = (uint)uVar3;
bVar4 = *(byte *)((long)plVar12 + 0x1b);
if (bVar4 == 0) {
if (8 < *(byte *)((long)plVar12 + 0x1a)) {
pbVar11 = (byte *)(param_4 + 1 + (ulong)*(ushort *)(plVar12 + 2));
*pbVar11 = *pbVar11 & (byte)(-1 << (*(byte *)((long)plVar12 + 0x1a) - 8 & 0x1f));
}
}
else {
bVar1 = *__src;
uVar9 = (ulong)*(ushort *)(plVar12 + 2);
bVar2 = *(byte *)((long)plVar12 + 0x1a);
*(byte *)(param_4 + uVar9) =
bVar1 << (bVar2 & 0x1f) |
~(byte)(~(-1 << (bVar4 & 0x1f)) << (bVar2 & 0x1f)) & *(byte *)(param_4 + uVar9);
if (8 < (uint)bVar4 + (uint)bVar2) {
bVar4 = (char)((uint)bVar4 + (uint)bVar2) - 8;
*(byte *)(param_4 + 1 + uVar9) =
bVar1 >> (8 - bVar2 & 0x1f) |
(*(byte *)(param_4 + 1 + uVar9) >> (bVar4 & 0x1f)) << (bVar4 & 0x1f);
}
__src = __src + 1;
uVar10 = uVar3 - 1;
}
memcpy((void *)((ulong)*(uint *)(plVar12 + 1) + param_4),__src,(ulong)uVar10);
__src = __src + uVar10;
}
else {
uVar3 = *(ushort *)((long)plVar12 + 0x12);
if ((uVar3 & 1) == 0) {
if ((uVar3 & 8) == 0) {
if ((uVar3 & 0x20) == 0) {
uVar9 = (ulong)*(ushort *)((long)plVar12 + 0x14);
if ((uVar3 & 0x40) == 0) {
if (pbVar5 < __src + uVar9) {
return 1;
}
memcpy((void *)((ulong)*(uint *)(plVar12 + 1) + param_4),__src,uVar9);
__src = __src + *(ushort *)((long)plVar12 + 0x14);
}
else {
if (pbVar5 < __src + uVar9) {
return 1;
}
uVar10 = *(uint *)(plVar12 + 1);
do {
bVar4 = *__src;
__src = __src + 1;
*(byte *)((ulong)uVar10 + param_4 + -1 + uVar9) = bVar4;
uVar9 = uVar9 - 1;
} while (uVar9 != 0);
}
}
else {
uVar10 = (uint)*__src;
if (*__src == 0xff) {
uVar10 = (uint)(ushort)(*(ushort *)(__src + 1) << 8 | *(ushort *)(__src + 1) >> 8)
;
lVar8 = 3;
}
else {
lVar8 = 1;
}
if (*(ushort *)((long)plVar12 + 0x14) < uVar10) {
return 1;
}
pbVar11 = __src + lVar8;
uVar9 = (ulong)uVar10;
__src = pbVar11 + uVar9;
if (pbVar5 < __src) {
return 1;
}
if (param_3 != '\0') {
*(void **)((ulong)*(byte *)((long)plVar12 + 0x1a) +
(ulong)*(uint *)(plVar12 + 1) + param_4) = local_58;
memcpy(local_58,pbVar11,uVar9);
*(byte *)((long)param_1 + 0x1d1) = *(byte *)((long)param_1 + 0x1d1) & 0xef;
local_58 = (void *)((long)local_58 + uVar9);
_mi_store_blob_length
((ulong)*(uint *)(plVar12 + 1) + param_4,
*(int1 *)((long)plVar12 + 0x1a),uVar10);
}
}
}
else {
uVar10 = (uint)*__src;
if (*__src == 0xff) {
uVar10 = (uint)(ushort)(*(ushort *)(__src + 1) << 8 | *(ushort *)(__src + 1) >> 8);
lVar8 = 3;
}
else {
lVar8 = 1;
}
if (*(ushort *)((long)plVar12 + 0x14) < uVar10) {
return 1;
}
pbVar11 = __src + lVar8;
__src = pbVar11 + uVar10;
if (pbVar5 < __src) {
return 1;
}
if (*(char *)((long)plVar12 + 0x1a) == '\x01') {
*(char *)(param_4 + (ulong)*(uint *)(plVar12 + 1)) = (char)uVar10;
}
else {
*(short *)(param_4 + (ulong)*(uint *)(plVar12 + 1)) = (short)uVar10;
}
memcpy((void *)((ulong)*(byte *)((long)plVar12 + 0x1a) +
(ulong)*(uint *)(plVar12 + 1) + param_4),pbVar11,(ulong)uVar10);
}
}
else {
uVar10 = (uint)*__src;
if (*__src == 0xff) {
uVar10 = (uint)(ushort)(*(ushort *)(__src + 1) << 8 | *(ushort *)(__src + 1) >> 8);
lVar8 = 3;
}
else {
lVar8 = 1;
}
if (*(ushort *)((long)plVar12 + 0x14) < uVar10) {
return 1;
}
pbVar11 = __src + lVar8;
uVar9 = (ulong)uVar10;
__src = pbVar11 + uVar9;
if (pbVar5 < __src) {
return 1;
}
__dest = (void *)((ulong)*(uint *)(plVar12 + 1) + param_4);
if (cVar7 == '\a') {
memset(__dest,0x20,(ulong)(*(ushort *)((long)plVar12 + 0x14) - uVar10));
memcpy((void *)((long)__dest + (*(ushort *)((long)plVar12 + 0x14) - uVar9)),pbVar11,
uVar9);
}
else {
memcpy(__dest,pbVar11,uVar9);
(**(code **)(*(long *)(*plVar12 + 0xb8) + 0x78))
(*plVar12,(long)__dest + uVar9,*(ushort *)((long)plVar12 + 0x14) - uVar10,
0x20);
}
}
}
}
else {
__src = pbVar11 + 1;
if (*pbVar11 != 0) {
pbVar11 = (byte *)(param_4 + (ulong)*(uint *)((long)plVar12 + 0xc));
*pbVar11 = *pbVar11 & ~bVar4;
cVar7 = (char)*plVar6;
goto LAB_001364b8;
}
pbVar11 = (byte *)(param_4 + (ulong)*(uint *)((long)plVar12 + 0xc));
*pbVar11 = *pbVar11 | bVar4;
}
cVar7 = (char)plVar12[7];
plVar6 = plVar12 + 7;
pbVar11 = __src;
plVar12 = plVar12 + 4;
} while (cVar7 != '\0');
}
return 0;
}
|
|
61,857 |
compile_stmt
|
fabiosvm[P]rak/src/compiler.c
|
static inline void compile_stmt(RakCompiler *comp, RakError *err)
{
if (match(comp, RAK_TOKEN_KIND_LBRACE))
{
compile_block(comp, err);
return;
}
if (match(comp, RAK_TOKEN_KIND_LET_KW))
{
compile_let_decl(comp, err);
return;
}
if (match(comp, RAK_TOKEN_KIND_AMP))
{
compile_assign_stmt(comp, err);
return;
}
if (match(comp, RAK_TOKEN_KIND_IF_KW))
{
compile_if_stmt(comp, NULL, err);
return;
}
if (match(comp, RAK_TOKEN_KIND_LOOP_KW))
{
compile_loop_stmt(comp, err);
return;
}
if (match(comp, RAK_TOKEN_KIND_WHILE_KW))
{
compile_while_stmt(comp, err);
return;
}
if (match(comp, RAK_TOKEN_KIND_DO_KW))
{
compile_do_while_stmt(comp, err);
return;
}
if (match(comp, RAK_TOKEN_KIND_BREAK_KW))
{
compile_break_stmt(comp, err);
return;
}
if (match(comp, RAK_TOKEN_KIND_CONTINUE_KW))
{
compile_continue_stmt(comp, err);
return;
}
compile_expr_stmt(comp, err);
}
|
O0
|
c
|
compile_stmt:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
cmpl $0x8, 0x2810(%rax)
jne 0x4aff
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0x4c00
jmp 0x4bf9
movq -0x8(%rbp), %rax
cmpl $0x29, 0x2810(%rax)
jne 0x4b1e
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0x4ca0
jmp 0x4bf9
movq -0x8(%rbp), %rax
cmpl $0xc, 0x2810(%rax)
jne 0x4b3d
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0x4f10
jmp 0x4bf9
movq -0x8(%rbp), %rax
cmpl $0x28, 0x2810(%rax)
jne 0x4b60
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rdx
xorl %eax, %eax
movl %eax, %esi
callq 0x52d0
jmp 0x4bf9
movq -0x8(%rbp), %rax
cmpl $0x2a, 0x2810(%rax)
jne 0x4b7c
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0x54d0
jmp 0x4bf9
movq -0x8(%rbp), %rax
cmpl $0x2d, 0x2810(%rax)
jne 0x4b98
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0x55d0
jmp 0x4bf9
movq -0x8(%rbp), %rax
cmpl $0x25, 0x2810(%rax)
jne 0x4bb4
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0x5780
jmp 0x4bf9
movq -0x8(%rbp), %rax
cmpl $0x23, 0x2810(%rax)
jne 0x4bd0
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0x5a10
jmp 0x4bf9
movq -0x8(%rbp), %rax
cmpl $0x24, 0x2810(%rax)
jne 0x4bec
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0x5b50
jmp 0x4bf9
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0x5c40
addq $0x10, %rsp
popq %rbp
retq
nop
|
compile_stmt:
push rbp
mov rbp, rsp
sub rsp, 10h
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov rax, [rbp+var_8]
cmp dword ptr [rax+2810h], 8
jnz short loc_4AFF
mov rdi, [rbp+var_8]
mov rsi, [rbp+var_10]
call compile_block
jmp loc_4BF9
loc_4AFF:
mov rax, [rbp+var_8]
cmp dword ptr [rax+2810h], 29h ; ')'
jnz short loc_4B1E
mov rdi, [rbp+var_8]
mov rsi, [rbp+var_10]
call compile_let_decl
jmp loc_4BF9
loc_4B1E:
mov rax, [rbp+var_8]
cmp dword ptr [rax+2810h], 0Ch
jnz short loc_4B3D
mov rdi, [rbp+var_8]
mov rsi, [rbp+var_10]
call compile_assign_stmt
jmp loc_4BF9
loc_4B3D:
mov rax, [rbp+var_8]
cmp dword ptr [rax+2810h], 28h ; '('
jnz short loc_4B60
mov rdi, [rbp+var_8]
mov rdx, [rbp+var_10]
xor eax, eax
mov esi, eax
call compile_if_stmt
jmp loc_4BF9
loc_4B60:
mov rax, [rbp+var_8]
cmp dword ptr [rax+2810h], 2Ah ; '*'
jnz short loc_4B7C
mov rdi, [rbp+var_8]
mov rsi, [rbp+var_10]
call compile_loop_stmt
jmp short loc_4BF9
loc_4B7C:
mov rax, [rbp+var_8]
cmp dword ptr [rax+2810h], 2Dh ; '-'
jnz short loc_4B98
mov rdi, [rbp+var_8]
mov rsi, [rbp+var_10]
call compile_while_stmt
jmp short loc_4BF9
loc_4B98:
mov rax, [rbp+var_8]
cmp dword ptr [rax+2810h], 25h ; '%'
jnz short loc_4BB4
mov rdi, [rbp+var_8]
mov rsi, [rbp+var_10]
call compile_do_while_stmt
jmp short loc_4BF9
loc_4BB4:
mov rax, [rbp+var_8]
cmp dword ptr [rax+2810h], 23h ; '#'
jnz short loc_4BD0
mov rdi, [rbp+var_8]
mov rsi, [rbp+var_10]
call compile_break_stmt
jmp short loc_4BF9
loc_4BD0:
mov rax, [rbp+var_8]
cmp dword ptr [rax+2810h], 24h ; '$'
jnz short loc_4BEC
mov rdi, [rbp+var_8]
mov rsi, [rbp+var_10]
call compile_continue_stmt
jmp short loc_4BF9
loc_4BEC:
mov rdi, [rbp+var_8]
mov rsi, [rbp+var_10]
call compile_expr_stmt
loc_4BF9:
add rsp, 10h
pop rbp
retn
|
long long compile_stmt(long long a1, long long a2)
{
switch ( *(_DWORD *)(a1 + 10256) )
{
case 8:
return compile_block(a1, a2);
case 0x29:
return compile_let_decl(a1, a2);
case 0xC:
return compile_assign_stmt(a1, a2);
case 0x28:
return compile_if_stmt(a1, 0LL, a2);
case 0x2A:
return compile_loop_stmt(a1, a2);
case 0x2D:
return compile_while_stmt(a1, a2);
case 0x25:
return compile_do_while_stmt(a1, a2);
case 0x23:
return compile_break_stmt(a1, a2);
case 0x24:
return compile_continue_stmt(a1, a2);
}
return compile_expr_stmt(a1, a2);
}
|
compile_stmt:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x10
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV RAX,qword ptr [RBP + -0x8]
CMP dword ptr [RAX + 0x2810],0x8
JNZ 0x00104aff
MOV RDI,qword ptr [RBP + -0x8]
MOV RSI,qword ptr [RBP + -0x10]
CALL 0x00104c00
JMP 0x00104bf9
LAB_00104aff:
MOV RAX,qword ptr [RBP + -0x8]
CMP dword ptr [RAX + 0x2810],0x29
JNZ 0x00104b1e
MOV RDI,qword ptr [RBP + -0x8]
MOV RSI,qword ptr [RBP + -0x10]
CALL 0x00104ca0
JMP 0x00104bf9
LAB_00104b1e:
MOV RAX,qword ptr [RBP + -0x8]
CMP dword ptr [RAX + 0x2810],0xc
JNZ 0x00104b3d
MOV RDI,qword ptr [RBP + -0x8]
MOV RSI,qword ptr [RBP + -0x10]
CALL 0x00104f10
JMP 0x00104bf9
LAB_00104b3d:
MOV RAX,qword ptr [RBP + -0x8]
CMP dword ptr [RAX + 0x2810],0x28
JNZ 0x00104b60
MOV RDI,qword ptr [RBP + -0x8]
MOV RDX,qword ptr [RBP + -0x10]
XOR EAX,EAX
MOV ESI,EAX
CALL 0x001052d0
JMP 0x00104bf9
LAB_00104b60:
MOV RAX,qword ptr [RBP + -0x8]
CMP dword ptr [RAX + 0x2810],0x2a
JNZ 0x00104b7c
MOV RDI,qword ptr [RBP + -0x8]
MOV RSI,qword ptr [RBP + -0x10]
CALL 0x001054d0
JMP 0x00104bf9
LAB_00104b7c:
MOV RAX,qword ptr [RBP + -0x8]
CMP dword ptr [RAX + 0x2810],0x2d
JNZ 0x00104b98
MOV RDI,qword ptr [RBP + -0x8]
MOV RSI,qword ptr [RBP + -0x10]
CALL 0x001055d0
JMP 0x00104bf9
LAB_00104b98:
MOV RAX,qword ptr [RBP + -0x8]
CMP dword ptr [RAX + 0x2810],0x25
JNZ 0x00104bb4
MOV RDI,qword ptr [RBP + -0x8]
MOV RSI,qword ptr [RBP + -0x10]
CALL 0x00105780
JMP 0x00104bf9
LAB_00104bb4:
MOV RAX,qword ptr [RBP + -0x8]
CMP dword ptr [RAX + 0x2810],0x23
JNZ 0x00104bd0
MOV RDI,qword ptr [RBP + -0x8]
MOV RSI,qword ptr [RBP + -0x10]
CALL 0x00105a10
JMP 0x00104bf9
LAB_00104bd0:
MOV RAX,qword ptr [RBP + -0x8]
CMP dword ptr [RAX + 0x2810],0x24
JNZ 0x00104bec
MOV RDI,qword ptr [RBP + -0x8]
MOV RSI,qword ptr [RBP + -0x10]
CALL 0x00105b50
JMP 0x00104bf9
LAB_00104bec:
MOV RDI,qword ptr [RBP + -0x8]
MOV RSI,qword ptr [RBP + -0x10]
CALL 0x00105c40
LAB_00104bf9:
ADD RSP,0x10
POP RBP
RET
|
void compile_stmt(long param_1,int8 param_2)
{
if (*(int *)(param_1 + 0x2810) == 8) {
compile_block(param_1,param_2);
}
else if (*(int *)(param_1 + 0x2810) == 0x29) {
compile_let_decl(param_1,param_2);
}
else if (*(int *)(param_1 + 0x2810) == 0xc) {
compile_assign_stmt(param_1,param_2);
}
else if (*(int *)(param_1 + 0x2810) == 0x28) {
compile_if_stmt(param_1,0,param_2);
}
else if (*(int *)(param_1 + 0x2810) == 0x2a) {
compile_loop_stmt(param_1,param_2);
}
else if (*(int *)(param_1 + 0x2810) == 0x2d) {
compile_while_stmt(param_1,param_2);
}
else if (*(int *)(param_1 + 0x2810) == 0x25) {
compile_do_while_stmt(param_1,param_2);
}
else if (*(int *)(param_1 + 0x2810) == 0x23) {
compile_break_stmt(param_1,param_2);
}
else if (*(int *)(param_1 + 0x2810) == 0x24) {
compile_continue_stmt(param_1,param_2);
}
else {
compile_expr_stmt(param_1,param_2);
}
return;
}
|
|
61,858 |
parse_prefixed_json_tool_call_array(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, unsigned long)
|
monkey531[P]llama/common/chat.cpp
|
static common_chat_msg parse_prefixed_json_tool_call_array(const std::string& input, const std::string & prefix, size_t rstrip_prefix = 0) {
auto content_end = input.find(prefix);
size_t tc_start = std::string::npos;
common_chat_msg result;
result.role = "assistant";
const auto process_tool_calls = [&](const json & tool_calls) {
for (const auto & tool_call : tool_calls) {
const auto & arguments = tool_call["arguments"];
result.tool_calls.push_back({
tool_call["name"],
arguments.is_string() ? arguments.get<std::string>() : arguments.dump(),
tool_call.contains("id") ? tool_call["id"] : "",
});
}
};
if (content_end == std::string::npos) {
result.content = input;
} else {
tc_start = content_end + prefix.size() - rstrip_prefix;
result.content = input.substr(0, content_end);
auto tool_calls = json::parse(input.substr(tc_start));
process_tool_calls(tool_calls);
}
return result;
}
|
O3
|
cpp
|
parse_prefixed_json_tool_call_array(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, unsigned long):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xf8, %rsp
movq %rcx, %rbx
movq %rdx, %r12
movq %rsi, %r14
movq %rdi, %rbp
movq (%rdx), %rsi
movq 0x8(%rdx), %rcx
xorl %r13d, %r13d
movq %r14, %rdi
xorl %edx, %edx
callq 0x1af70
movq %rax, %r15
leaq 0x10(%rbp), %rax
movq %rax, (%rbp)
movq %r13, 0x8(%rbp)
movb %r13b, 0x10(%rbp)
leaq 0x30(%rbp), %rax
movq %rax, 0x20(%rbp)
movq %r13, 0x28(%rbp)
movb %r13b, 0x30(%rbp)
xorps %xmm0, %xmm0
movups %xmm0, 0x40(%rbp)
movq %r13, 0x50(%rbp)
leaq 0x68(%rbp), %rax
movq %rax, 0x58(%rbp)
movq %r13, 0x60(%rbp)
movb %r13b, 0x68(%rbp)
leaq 0xcb44(%rip), %rcx # 0xef373
movl $0x9, %r8d
movq %rbp, %rdi
xorl %esi, %esi
xorl %edx, %edx
movq %rbp, 0x48(%rsp)
callq 0x1ad90
leaq 0x20(%rbp), %r13
cmpq $-0x1, %r15
je 0xe2973
movq 0x8(%r12), %r12
leaq 0x60(%rsp), %rdi
movq %r14, %rsi
xorl %edx, %edx
movq %r15, %rcx
callq 0x1a940
subq %rbx, %r15
addq %r12, %r15
leaq 0x60(%rsp), %rbx
movq %r13, %rdi
movq %rbx, %rsi
callq 0x1aac0
movq (%rbx), %rdi
leaq 0x70(%rsp), %rax
cmpq %rax, %rdi
je 0xe289b
movq 0x70(%rsp), %rsi
incq %rsi
callq 0x1a8f0
leaq 0x60(%rsp), %rdi
movq %r14, %rsi
movq %r15, %rdx
movq $-0x1, %rcx
callq 0x1a940
xorps %xmm0, %xmm0
leaq 0xd0(%rsp), %rdx
movaps %xmm0, 0x10(%rdx)
movaps %xmm0, (%rdx)
leaq 0x50(%rsp), %rbx
leaq 0x60(%rsp), %rsi
movq %rbx, %rdi
movl $0x1, %ecx
xorl %r8d, %r8d
callq 0xa48f2
movq 0xe0(%rsp), %rax
testq %rax, %rax
je 0xe28fd
leaq 0xd0(%rsp), %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
movq 0x60(%rsp), %rdi
leaq 0x70(%rsp), %rax
cmpq %rax, %rdi
je 0xe2919
movq 0x70(%rsp), %rsi
incq %rsi
callq 0x1a8f0
movabsq $-0x8000000000000000, %rax # imm = 0x8000000000000000
movq %rbx, 0x28(%rsp)
xorps %xmm0, %xmm0
movups %xmm0, 0x30(%rsp)
movq %rax, 0x40(%rsp)
movzbl 0x50(%rsp), %ecx
testl %ecx, %ecx
je 0xe29ae
cmpl $0x2, %ecx
je 0xe2983
cmpl $0x1, %ecx
jne 0xe29b9
movq 0x58(%rsp), %rcx
movq (%rcx), %rdx
movq %rdx, 0x30(%rsp)
movq %rbx, 0x8(%rsp)
movq $0x0, 0x18(%rsp)
movq %rax, 0x20(%rsp)
movq 0x8(%rcx), %rax
movq %rax, 0x10(%rsp)
jmp 0xe29d5
movq %r13, %rdi
movq %r14, %rsi
callq 0x1a4d0
jmp 0xe2b83
movq 0x58(%rsp), %rcx
movq (%rcx), %rdx
movq %rdx, 0x38(%rsp)
movq %rbx, 0x8(%rsp)
movq $0x0, 0x10(%rsp)
movq %rax, 0x20(%rsp)
movq 0x8(%rcx), %rax
movq %rax, 0x18(%rsp)
jmp 0xe29d5
movq $0x1, 0x40(%rsp)
jmp 0xe29c2
movq $0x0, 0x40(%rsp)
movq %rbx, 0x8(%rsp)
movups %xmm0, 0x10(%rsp)
movq $0x1, 0x20(%rsp)
leaq 0x28(%rsp), %rdi
leaq 0x8(%rsp), %rsi
callq 0x8c8f8
testb %al, %al
jne 0xe2b79
movq 0x48(%rsp), %rax
leaq 0x40(%rax), %r14
leaq 0x28(%rsp), %r13
leaq 0x60(%rsp), %r12
leaq 0xc0(%rsp), %r15
movq %r13, %rdi
callq 0x8c58c
movq %rax, %rbx
movq %rax, %rdi
leaq 0xdd0c(%rip), %rsi # 0xf0728
callq 0xa51e0
movq %rax, %rbp
movq %rbx, %rdi
leaq 0xe296(%rip), %rsi # 0xf0cc4
callq 0xa51e0
movq %r12, %rdi
movq %rax, %rsi
callq 0x87184
cmpb $0x3, (%rbp)
jne 0xe2a56
leaq 0x80(%rsp), %rdi
movq %rbp, %rsi
callq 0x87184
jmp 0xe2a76
leaq 0x80(%rsp), %rdi
movq %rbp, %rsi
movl $0xffffffff, %edx # imm = 0xFFFFFFFF
movl $0x20, %ecx
xorl %r8d, %r8d
xorl %r9d, %r9d
callq 0x7f47a
movq %rbx, %rdi
leaq 0xcd52(%rip), %rsi # 0xef7d2
callq 0xa517e
testb %al, %al
je 0xe2aa5
movq %rbx, %rdi
leaq 0xcd3f(%rip), %rsi # 0xef7d2
callq 0xa51e0
movq %r15, %rdi
movq %rax, %rsi
callq 0x5d4a6
jmp 0xe2ab4
movq %r15, %rdi
leaq 0x38d2(%rip), %rsi # 0xe6381
callq 0xb7f7a
leaq 0xa0(%rsp), %rdi
movq %r15, %rsi
callq 0x87184
movq %r14, %rdi
movq %r12, %rsi
callq 0xe56de
movq 0xa0(%rsp), %rdi
leaq 0xb0(%rsp), %rax
cmpq %rax, %rdi
je 0xe2af4
movq 0xb0(%rsp), %rsi
incq %rsi
callq 0x1a8f0
movq 0x80(%rsp), %rdi
leaq 0x90(%rsp), %rax
cmpq %rax, %rdi
je 0xe2b19
movq 0x90(%rsp), %rsi
incq %rsi
callq 0x1a8f0
movq 0x60(%rsp), %rdi
leaq 0x70(%rsp), %rax
cmpq %rax, %rdi
je 0xe2b35
movq 0x70(%rsp), %rsi
incq %rsi
callq 0x1a8f0
movq %r15, %rdi
callq 0x5d972
movq 0x28(%rsp), %rax
movzbl (%rax), %eax
cmpl $0x2, %eax
je 0xe2b57
cmpl $0x1, %eax
jne 0xe2b5f
addq $0x30, 0x30(%rsp)
jmp 0xe2b64
addq $0x10, 0x38(%rsp)
jmp 0xe2b64
incq 0x40(%rsp)
movq %r13, %rdi
leaq 0x8(%rsp), %rsi
callq 0x8c8f8
testb %al, %al
je 0xe2a07
leaq 0x50(%rsp), %rdi
callq 0x5d972
addq $0xf8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0xe2bf1
jmp 0xe2be5
jmp 0xe2c72
movq %rax, %r14
movq 0xe0(%rsp), %rax
testq %rax, %rax
je 0xe2bc0
leaq 0xd0(%rsp), %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
movq 0x60(%rsp), %rdi
leaq 0x70(%rsp), %rax
cmpq %rax, %rdi
je 0xe2c7f
movq 0x70(%rsp), %rsi
incq %rsi
callq 0x1a8f0
jmp 0xe2c7f
movq %rax, %rdi
callq 0x218f5
jmp 0xe2bf1
jmp 0xe2bf1
movq %rax, %r14
jmp 0xe2c7f
movq %rax, %r14
jmp 0xe2c54
movq %rax, %r14
leaq 0xc0(%rsp), %rdi
callq 0x5d972
jmp 0xe2c2f
movq %rax, %r14
leaq 0x60(%rsp), %rdi
callq 0xe55fe
leaq 0xc0(%rsp), %rdi
callq 0x5d972
jmp 0xe2c75
movq %rax, %r14
movq 0x80(%rsp), %rdi
leaq 0x90(%rsp), %rax
cmpq %rax, %rdi
je 0xe2c54
movq 0x90(%rsp), %rsi
incq %rsi
callq 0x1a8f0
movq 0x60(%rsp), %rdi
leaq 0x70(%rsp), %rax
cmpq %rax, %rdi
je 0xe2c75
movq 0x70(%rsp), %rsi
incq %rsi
callq 0x1a8f0
jmp 0xe2c75
movq %rax, %r14
leaq 0x50(%rsp), %rdi
callq 0x5d972
movq 0x48(%rsp), %rdi
callq 0x7e5c8
movq %r14, %rdi
callq 0x1afd0
|
_ZL35parse_prefixed_json_tool_call_arrayRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES6_m:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 0F8h
mov rbx, rcx
mov r12, rdx
mov r14, rsi
mov rbp, rdi
mov rsi, [rdx]
mov rcx, [rdx+8]
xor r13d, r13d
mov rdi, r14
xor edx, edx
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE4findEPKcmm; std::string::find(char const*,ulong,ulong)
mov r15, rax
lea rax, [rbp+10h]
mov [rbp+0], rax
mov [rbp+8], r13
mov [rbp+10h], r13b
lea rax, [rbp+30h]
mov [rbp+20h], rax
mov [rbp+28h], r13
mov [rbp+30h], r13b
xorps xmm0, xmm0
movups xmmword ptr [rbp+40h], xmm0
mov [rbp+50h], r13
lea rax, [rbp+68h]
mov [rbp+58h], rax
mov [rbp+60h], r13
mov [rbp+68h], r13b
lea rcx, aYouAreAHelpful+12h; "assistant"
mov r8d, 9
mov rdi, rbp
xor esi, esi
xor edx, edx
mov [rsp+128h+var_E0], rbp
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE10_M_replaceEmmPKcm; std::string::_M_replace(ulong,ulong,char const*,ulong)
lea r13, [rbp+20h]
cmp r15, 0FFFFFFFFFFFFFFFFh
jz loc_E2973
mov r12, [r12+8]
lea rdi, [rsp+128h+var_C8]
mov rsi, r14
xor edx, edx
mov rcx, r15
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6substrEmm; std::string::substr(ulong,ulong)
sub r15, rbx
add r15, r12
lea rbx, [rsp+128h+var_C8]
mov rdi, r13
mov rsi, rbx
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEOS4_; std::string::operator=(std::string&&)
mov rdi, [rbx]; void *
lea rax, [rsp+128h+var_B8]
cmp rdi, rax
jz short loc_E289B
mov rsi, [rsp+128h+var_B8]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_E289B:
lea rdi, [rsp+128h+var_C8]
mov rsi, r14
mov rdx, r15
mov rcx, 0FFFFFFFFFFFFFFFFh
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6substrEmm; std::string::substr(ulong,ulong)
xorps xmm0, xmm0
lea rdx, [rsp+128h+var_58]
movaps xmmword ptr [rdx+10h], xmm0
movaps xmmword ptr [rdx], xmm0
lea rbx, [rsp+128h+var_D8]
lea rsi, [rsp+128h+var_C8]
mov rdi, rbx
mov ecx, 1
xor r8d, r8d
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE5parseIS9_EESD_OT_St8functionIFbiNS0_6detail13parse_event_tERSD_EEbb; 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>::parse<std::string>(std::string &&,std::function<bool ()(int,nlohmann::json_abi_v3_11_3::detail::parse_event_t,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>&)>,bool,bool)
mov rax, [rsp+128h+var_48]
test rax, rax
jz short loc_E28FD
lea rdi, [rsp+128h+var_58]
mov rsi, rdi
mov edx, 3
call rax
loc_E28FD:
mov rdi, [rsp+128h+var_C8]; void *
lea rax, [rsp+128h+var_B8]
cmp rdi, rax
jz short loc_E2919
mov rsi, [rsp+128h+var_B8]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_E2919:
mov rax, 8000000000000000h
mov [rsp+128h+var_100], rbx
xorps xmm0, xmm0
movups [rsp+128h+var_F8], xmm0
mov [rsp+128h+var_E8], rax
movzx ecx, [rsp+128h+var_D8]
test ecx, ecx
jz short loc_E29AE
cmp ecx, 2
jz short loc_E2983
cmp ecx, 1
jnz short loc_E29B9
mov rcx, [rsp+128h+var_D0]
mov rdx, [rcx]
mov qword ptr [rsp+128h+var_F8], rdx
mov [rsp+128h+var_120], rbx
mov qword ptr [rsp+128h+var_118+8], 0
mov [rsp+128h+var_108], rax
mov rax, [rcx+8]
mov qword ptr [rsp+128h+var_118], rax
jmp short loc_E29D5
loc_E2973:
mov rdi, r13
mov rsi, r14
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_assignERKS4_; std::string::_M_assign(std::string const&)
jmp loc_E2B83
loc_E2983:
mov rcx, [rsp+128h+var_D0]
mov rdx, [rcx]
mov qword ptr [rsp+128h+var_F8+8], rdx
mov [rsp+128h+var_120], rbx
mov qword ptr [rsp+128h+var_118], 0
mov [rsp+128h+var_108], rax
mov rax, [rcx+8]
mov qword ptr [rsp+128h+var_118+8], rax
jmp short loc_E29D5
loc_E29AE:
mov [rsp+128h+var_E8], 1
jmp short loc_E29C2
loc_E29B9:
mov [rsp+128h+var_E8], 0
loc_E29C2:
mov [rsp+128h+var_120], rbx
movups [rsp+128h+var_118], xmm0
mov [rsp+128h+var_108], 1
loc_E29D5:
lea rdi, [rsp+128h+var_100]
lea rsi, [rsp+128h+var_120]
call _ZNK8nlohmann16json_abi_v3_11_36detail9iter_implIKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEEeqISH_TnNSt9enable_ifIXoosr3std7is_sameIT_SH_EE5valuesr3std7is_sameISK_NS2_ISF_EEEE5valueEDnE4typeELDn0EEEbRKSK_
test al, al
jnz loc_E2B79
mov rax, [rsp+128h+var_E0]
lea r14, [rax+40h]
lea r13, [rsp+128h+var_100]
lea r12, [rsp+128h+var_C8]
lea r15, [rsp+128h+var_68]
loc_E2A07:
mov rdi, r13
call _ZNK8nlohmann16json_abi_v3_11_36detail9iter_implIKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEEdeEv; nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const>::operator*(void)
mov rbx, rax
mov rdi, rax
lea rsi, aKeywordArgumen+9; "arguments"
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEixIKcEERKSD_PT_; 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[]<char const>(char const *)
mov rbp, rax
mov rdi, rbx
lea rsi, aNamespacedSetO+2Fh; "name"
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEixIKcEERKSD_PT_; 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[]<char const>(char const *)
mov rdi, r12
mov rsi, rax
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE8get_implIS9_TnNSt9enable_ifIXaasr6detail24is_default_constructibleIT_EE5valuesr6detail13has_from_jsonISD_SG_EE5valueEiE4typeELi0EEESG_NS0_6detail12priority_tagILj0EEE
cmp byte ptr [rbp+0], 3
jnz short loc_E2A56
lea rdi, [rsp+128h+var_A8]
mov rsi, rbp
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE8get_implIS9_TnNSt9enable_ifIXaasr6detail24is_default_constructibleIT_EE5valuesr6detail13has_from_jsonISD_SG_EE5valueEiE4typeELi0EEESG_NS0_6detail12priority_tagILj0EEE
jmp short loc_E2A76
loc_E2A56:
lea rdi, [rsp+128h+var_A8]
mov rsi, rbp
mov edx, 0FFFFFFFFh
mov ecx, 20h ; ' '
xor r8d, r8d
xor r9d, r9d
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dumpEicbNS0_6detail15error_handler_tE; 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>::dump(int,char,bool,nlohmann::json_abi_v3_11_3::detail::error_handler_t)
loc_E2A76:
mov rdi, rbx
lea rsi, aToolCallId+0Ah; "id"
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE8containsIRA3_KcTnNSt9enable_ifIXsr6detail32is_usable_as_basic_json_key_typeISD_T_EE5valueEiE4typeELi0EEEbOSJ_
test al, al
jz short loc_E2AA5
mov rdi, rbx
lea rsi, aToolCallId+0Ah; "id"
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEixIKcEERKSD_PT_; 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[]<char const>(char const *)
mov rdi, r15
mov rsi, rax
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEC2ERKSD_; 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>::basic_json(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&)
jmp short loc_E2AB4
loc_E2AA5:
mov rdi, r15
lea rsi, aTarget+9; ""
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEC2IRA1_KcA1_cTnNSt9enable_ifIXaantsr6detail13is_basic_jsonIT0_EE5valuesr6detail18is_compatible_typeISD_SK_EE5valueEiE4typeELi0EEEOT_
loc_E2AB4:
lea rdi, [rsp+128h+var_88]
mov rsi, r15
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE8get_implIS9_TnNSt9enable_ifIXaasr6detail24is_default_constructibleIT_EE5valuesr6detail13has_from_jsonISD_SG_EE5valueEiE4typeELi0EEESG_NS0_6detail12priority_tagILj0EEE
mov rdi, r14
mov rsi, r12
call _ZNSt6vectorI16common_tool_callSaIS0_EE12emplace_backIJS0_EEERS0_DpOT_; std::vector<common_tool_call>::emplace_back<common_tool_call>(common_tool_call &&)
mov rdi, [rsp+128h+var_88]; void *
lea rax, [rsp+128h+var_78]
cmp rdi, rax
jz short loc_E2AF4
mov rsi, [rsp+128h+var_78]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_E2AF4:
mov rdi, [rsp+128h+var_A8]; void *
lea rax, [rsp+128h+var_98]
cmp rdi, rax
jz short loc_E2B19
mov rsi, [rsp+128h+var_98]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_E2B19:
mov rdi, [rsp+128h+var_C8]; void *
lea rax, [rsp+128h+var_B8]
cmp rdi, rax
jz short loc_E2B35
mov rsi, [rsp+128h+var_B8]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_E2B35:
mov rdi, r15
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::data::~data()
mov rax, [rsp+128h+var_100]
movzx eax, byte ptr [rax]
cmp eax, 2
jz short loc_E2B57
cmp eax, 1
jnz short loc_E2B5F
add qword ptr [rsp+128h+var_F8], 30h ; '0'
jmp short loc_E2B64
loc_E2B57:
add qword ptr [rsp+128h+var_F8+8], 10h
jmp short loc_E2B64
loc_E2B5F:
inc [rsp+128h+var_E8]
loc_E2B64:
mov rdi, r13
lea rsi, [rsp+128h+var_120]
call _ZNK8nlohmann16json_abi_v3_11_36detail9iter_implIKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEEeqISH_TnNSt9enable_ifIXoosr3std7is_sameIT_SH_EE5valuesr3std7is_sameISK_NS2_ISF_EEEE5valueEDnE4typeELDn0EEEbRKSK_
test al, al
jz loc_E2A07
loc_E2B79:
lea rdi, [rsp+128h+var_D8]
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::data::~data()
loc_E2B83:
add rsp, 0F8h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
jmp short loc_E2BF1
jmp short loc_E2BE5
jmp loc_E2C72
mov r14, rax
mov rax, [rsp+128h+var_48]
test rax, rax
jz short loc_E2BC0
lea rdi, [rsp+128h+var_58]
mov rsi, rdi
mov edx, 3
call rax
loc_E2BC0:
mov rdi, [rsp+128h+var_C8]; void *
lea rax, [rsp+128h+var_B8]
cmp rdi, rax
jz loc_E2C7F
mov rsi, [rsp+128h+var_B8]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp loc_E2C7F
loc_E2BE5:
mov rdi, rax
call __clang_call_terminate
jmp short loc_E2BF1
jmp short $+2
loc_E2BF1:
mov r14, rax
jmp loc_E2C7F
mov r14, rax
jmp short loc_E2C54
mov r14, rax
lea rdi, [rsp+128h+var_68]
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::data::~data()
jmp short loc_E2C2F
mov r14, rax
lea rdi, [rsp+128h+var_C8]; this
call _ZN16common_tool_callD2Ev; common_tool_call::~common_tool_call()
lea rdi, [rsp+128h+var_68]
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::data::~data()
jmp short loc_E2C75
mov r14, rax
loc_E2C2F:
mov rdi, [rsp+128h+var_A8]; void *
lea rax, [rsp+128h+var_98]
cmp rdi, rax
jz short loc_E2C54
mov rsi, [rsp+128h+var_98]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_E2C54:
mov rdi, [rsp+128h+var_C8]; void *
lea rax, [rsp+128h+var_B8]
cmp rdi, rax
jz short loc_E2C75
mov rsi, [rsp+128h+var_B8]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_E2C75
loc_E2C72:
mov r14, rax
loc_E2C75:
lea rdi, [rsp+128h+var_D8]
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::data::~data()
loc_E2C7F:
mov rdi, [rsp+128h+var_E0]; this
call _ZN15common_chat_msgD2Ev; common_chat_msg::~common_chat_msg()
mov rdi, r14
call __Unwind_Resume
|
long long parse_prefixed_json_tool_call_array(long long a1, long long a2, _QWORD *a3, long long a4)
{
long long v6; // r15
long long v7; // r12
long long v8; // r15
char *v10; // r14
long long v11; // rbx
_BYTE *v12; // rbp
long long v13; // rax
unsigned __int8 *v14; // rax
int v15; // eax
_BYTE *v16; // [rsp+8h] [rbp-120h] BYREF
__int128 v17; // [rsp+10h] [rbp-118h]
long long v18; // [rsp+20h] [rbp-108h]
unsigned __int8 *v19; // [rsp+28h] [rbp-100h] BYREF
__int128 v20; // [rsp+30h] [rbp-F8h]
long long v21; // [rsp+40h] [rbp-E8h]
common_chat_msg *v22; // [rsp+48h] [rbp-E0h]
_BYTE v23[8]; // [rsp+50h] [rbp-D8h] BYREF
_QWORD *v24; // [rsp+58h] [rbp-D0h]
void *v25[2]; // [rsp+60h] [rbp-C8h] BYREF
_QWORD v26[2]; // [rsp+70h] [rbp-B8h] BYREF
void *v27[2]; // [rsp+80h] [rbp-A8h] BYREF
long long v28; // [rsp+90h] [rbp-98h] BYREF
void *v29; // [rsp+A0h] [rbp-88h] BYREF
long long v30; // [rsp+B0h] [rbp-78h] BYREF
unsigned __int8 v31[16]; // [rsp+C0h] [rbp-68h] BYREF
__int128 v32; // [rsp+D0h] [rbp-58h] BYREF
__int128 v33; // [rsp+E0h] [rbp-48h]
v6 = std::string::find(a2, *a3, 0LL, a3[1]);
*(_QWORD *)a1 = a1 + 16;
*(_QWORD *)(a1 + 8) = 0LL;
*(_BYTE *)(a1 + 16) = 0;
*(_QWORD *)(a1 + 32) = a1 + 48;
*(_QWORD *)(a1 + 40) = 0LL;
*(_BYTE *)(a1 + 48) = 0;
*(_OWORD *)(a1 + 64) = 0LL;
*(_QWORD *)(a1 + 80) = 0LL;
*(_QWORD *)(a1 + 88) = a1 + 104;
*(_QWORD *)(a1 + 96) = 0LL;
*(_BYTE *)(a1 + 104) = 0;
v22 = (common_chat_msg *)a1;
std::string::_M_replace(a1, 0LL, 0LL, "assistant", 9LL);
if ( v6 == -1 )
return std::string::_M_assign(a1 + 32, a2);
v7 = a3[1];
std::string::substr(v25, a2, 0LL, v6);
v8 = v7 + v6 - a4;
std::string::operator=(a1 + 32, v25);
if ( v25[0] != v26 )
operator delete(v25[0], v26[0] + 1LL);
std::string::substr(v25, a2, v8, -1LL);
v33 = 0LL;
v32 = 0LL;
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::parse<std::string>(
(long long)v23,
(long long *)v25,
(long long)&v32,
1u,
0);
if ( (_QWORD)v33 )
((void ( *)(__int128 *, __int128 *, long long))v33)(&v32, &v32, 3LL);
if ( v25[0] != v26 )
operator delete(v25[0], v26[0] + 1LL);
v19 = v23;
v20 = 0LL;
v21 = 0x8000000000000000LL;
if ( !v23[0] )
{
v21 = 1LL;
LABEL_16:
v16 = v23;
v17 = 0LL;
v18 = 1LL;
goto LABEL_17;
}
if ( v23[0] == 2 )
{
*((_QWORD *)&v20 + 1) = *v24;
v16 = v23;
*(_QWORD *)&v17 = 0LL;
v18 = 0x8000000000000000LL;
*((_QWORD *)&v17 + 1) = v24[1];
goto LABEL_17;
}
if ( v23[0] != 1 )
{
v21 = 0LL;
goto LABEL_16;
}
*(_QWORD *)&v20 = *v24;
v16 = v23;
*((_QWORD *)&v17 + 1) = 0LL;
v18 = 0x8000000000000000LL;
*(_QWORD *)&v17 = v24[1];
LABEL_17:
if ( !(unsigned __int8)ZNK8nlohmann16json_abi_v3_11_36detail9iter_implIKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEEeqISH_TnNSt9enable_ifIXoosr3std7is_sameIT_SH_EE5valuesr3std7is_sameISK_NS2_ISF_EEEE5valueEDnE4typeELDn0EEEbRKSK_(
&v19,
&v16) )
{
v10 = (char *)v22 + 64;
do
{
v11 = 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>::operator*(&v19);
v12 = (_BYTE *)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[]<char const>(
v11,
"arguments");
v13 = 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[]<char const>(
v11,
"name");
ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE8get_implIS9_TnNSt9enable_ifIXaasr6detail24is_default_constructibleIT_EE5valuesr6detail13has_from_jsonISD_SG_EE5valueEiE4typeELi0EEESG_NS0_6detail12priority_tagILj0EEE(
(long long)v25,
v13);
if ( *v12 == 3 )
ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE8get_implIS9_TnNSt9enable_ifIXaasr6detail24is_default_constructibleIT_EE5valuesr6detail13has_from_jsonISD_SG_EE5valueEiE4typeELi0EEESG_NS0_6detail12priority_tagILj0EEE(
(long long)v27,
(long long)v12);
else
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>::dump(
(long long)v27,
(long long)v12,
-1,
32,
0,
0);
if ( ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE8containsIRA3_KcTnNSt9enable_ifIXsr6detail32is_usable_as_basic_json_key_typeISD_T_EE5valueEiE4typeELi0EEEbOSJ_(
v11,
(long long)"id") )
{
v14 = (unsigned __int8 *)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[]<char const>(
v11,
"id");
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>::basic_json(
v31,
v14);
}
else
{
ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEC2IRA1_KcA1_cTnNSt9enable_ifIXaantsr6detail13is_basic_jsonIT0_EE5valuesr6detail18is_compatible_typeISD_SK_EE5valueEiE4typeELi0EEEOT_((char *)v31);
}
ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE8get_implIS9_TnNSt9enable_ifIXaasr6detail24is_default_constructibleIT_EE5valuesr6detail13has_from_jsonISD_SG_EE5valueEiE4typeELi0EEESG_NS0_6detail12priority_tagILj0EEE(
(long long)&v29,
(long long)v31);
std::vector<common_tool_call>::emplace_back<common_tool_call>(v10, v25);
if ( v29 != &v30 )
operator delete(v29, v30 + 1);
if ( v27[0] != &v28 )
operator delete(v27[0], v28 + 1);
if ( v25[0] != v26 )
operator delete(v25[0], v26[0] + 1LL);
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::data::~data(v31);
v15 = *v19;
if ( v15 == 2 )
{
*((_QWORD *)&v20 + 1) += 16LL;
}
else if ( v15 == 1 )
{
*(_QWORD *)&v20 = v20 + 48;
}
else
{
++v21;
}
}
while ( !(unsigned __int8)ZNK8nlohmann16json_abi_v3_11_36detail9iter_implIKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEEeqISH_TnNSt9enable_ifIXoosr3std7is_sameIT_SH_EE5valuesr3std7is_sameISK_NS2_ISF_EEEE5valueEDnE4typeELDn0EEEbRKSK_(
&v19,
&v16) );
}
return nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::data::~data(v23);
}
|
parse_prefixed_json_tool_call_array:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0xf8
MOV RBX,RCX
MOV R12,RDX
MOV R14,RSI
MOV RBP,RDI
MOV RSI,qword ptr [RDX]
MOV RCX,qword ptr [RDX + 0x8]
XOR R13D,R13D
MOV RDI,R14
XOR EDX,EDX
CALL 0x0011af70
MOV R15,RAX
LEA RAX,[RBP + 0x10]
MOV qword ptr [RBP],RAX
MOV qword ptr [RBP + 0x8],R13
MOV byte ptr [RBP + 0x10],R13B
LEA RAX,[RBP + 0x30]
MOV qword ptr [RBP + 0x20],RAX
MOV qword ptr [RBP + 0x28],R13
MOV byte ptr [RBP + 0x30],R13B
XORPS XMM0,XMM0
MOVUPS xmmword ptr [RBP + 0x40],XMM0
MOV qword ptr [RBP + 0x50],R13
LEA RAX,[RBP + 0x68]
MOV qword ptr [RBP + 0x58],RAX
MOV qword ptr [RBP + 0x60],R13
MOV byte ptr [RBP + 0x68],R13B
LAB_001e2828:
LEA RCX,[0x1ef373]
MOV R8D,0x9
MOV RDI,RBP
XOR ESI,ESI
XOR EDX,EDX
MOV qword ptr [RSP + 0x48],RBP
CALL 0x0011ad90
LEA R13,[RBP + 0x20]
CMP R15,-0x1
JZ 0x001e2973
MOV R12,qword ptr [R12 + 0x8]
LAB_001e2859:
LEA RDI,[RSP + 0x60]
MOV RSI,R14
XOR EDX,EDX
MOV RCX,R15
CALL 0x0011a940
SUB R15,RBX
ADD R15,R12
LEA RBX,[RSP + 0x60]
MOV RDI,R13
MOV RSI,RBX
CALL 0x0011aac0
MOV RDI,qword ptr [RBX]
LEA RAX,[RSP + 0x70]
CMP RDI,RAX
JZ 0x001e289b
MOV RSI,qword ptr [RSP + 0x70]
INC RSI
CALL 0x0011a8f0
LAB_001e289b:
LEA RDI,[RSP + 0x60]
MOV RSI,R14
MOV RDX,R15
MOV RCX,-0x1
CALL 0x0011a940
XORPS XMM0,XMM0
LEA RDX,[RSP + 0xd0]
MOVAPS xmmword ptr [RDX + 0x10],XMM0
MOVAPS xmmword ptr [RDX],XMM0
LAB_001e28c4:
LEA RBX,[RSP + 0x50]
LEA RSI,[RSP + 0x60]
MOV RDI,RBX
MOV ECX,0x1
XOR R8D,R8D
CALL 0x001a48f2
MOV RAX,qword ptr [RSP + 0xe0]
TEST RAX,RAX
JZ 0x001e28fd
LAB_001e28eb:
LEA RDI,[RSP + 0xd0]
MOV RSI,RDI
MOV EDX,0x3
CALL RAX
LAB_001e28fd:
MOV RDI,qword ptr [RSP + 0x60]
LEA RAX,[RSP + 0x70]
CMP RDI,RAX
JZ 0x001e2919
MOV RSI,qword ptr [RSP + 0x70]
INC RSI
CALL 0x0011a8f0
LAB_001e2919:
MOV RAX,-0x8000000000000000
MOV qword ptr [RSP + 0x28],RBX
XORPS XMM0,XMM0
MOVUPS xmmword ptr [RSP + 0x30],XMM0
MOV qword ptr [RSP + 0x40],RAX
MOVZX ECX,byte ptr [RSP + 0x50]
TEST ECX,ECX
JZ 0x001e29ae
CMP ECX,0x2
JZ 0x001e2983
CMP ECX,0x1
JNZ 0x001e29b9
MOV RCX,qword ptr [RSP + 0x58]
MOV RDX,qword ptr [RCX]
MOV qword ptr [RSP + 0x30],RDX
MOV qword ptr [RSP + 0x8],RBX
MOV qword ptr [RSP + 0x18],0x0
MOV qword ptr [RSP + 0x20],RAX
MOV RAX,qword ptr [RCX + 0x8]
MOV qword ptr [RSP + 0x10],RAX
JMP 0x001e29d5
LAB_001e2973:
MOV RDI,R13
MOV RSI,R14
CALL 0x0011a4d0
JMP 0x001e2b83
LAB_001e2983:
MOV RCX,qword ptr [RSP + 0x58]
MOV RDX,qword ptr [RCX]
MOV qword ptr [RSP + 0x38],RDX
MOV qword ptr [RSP + 0x8],RBX
MOV qword ptr [RSP + 0x10],0x0
MOV qword ptr [RSP + 0x20],RAX
MOV RAX,qword ptr [RCX + 0x8]
MOV qword ptr [RSP + 0x18],RAX
JMP 0x001e29d5
LAB_001e29ae:
MOV qword ptr [RSP + 0x40],0x1
JMP 0x001e29c2
LAB_001e29b9:
MOV qword ptr [RSP + 0x40],0x0
LAB_001e29c2:
MOV qword ptr [RSP + 0x8],RBX
MOVUPS xmmword ptr [RSP + 0x10],XMM0
MOV qword ptr [RSP + 0x20],0x1
LAB_001e29d5:
LEA RDI,[RSP + 0x28]
LEA RSI,[RSP + 0x8]
CALL 0x0018c8f8
TEST AL,AL
JNZ 0x001e2b79
MOV RAX,qword ptr [RSP + 0x48]
LEA R14,[RAX + 0x40]
LEA R13,[RSP + 0x28]
LEA R12,[RSP + 0x60]
LEA R15,[RSP + 0xc0]
LAB_001e2a07:
MOV RDI,R13
CALL 0x0018c58c
MOV RBX,RAX
MOV RDI,RAX
LEA RSI,[0x1f0728]
CALL 0x001a51e0
MOV RBP,RAX
MOV RDI,RBX
LEA RSI,[0x1f0cc4]
CALL 0x001a51e0
MOV RDI,R12
MOV RSI,RAX
CALL 0x00187184
CMP byte ptr [RBP],0x3
JNZ 0x001e2a56
LAB_001e2a44:
LEA RDI,[RSP + 0x80]
MOV RSI,RBP
CALL 0x00187184
JMP 0x001e2a76
LAB_001e2a56:
LEA RDI,[RSP + 0x80]
MOV RSI,RBP
MOV EDX,0xffffffff
MOV ECX,0x20
XOR R8D,R8D
XOR R9D,R9D
CALL 0x0017f47a
LAB_001e2a76:
MOV RDI,RBX
LEA RSI,[0x1ef7d2]
CALL 0x001a517e
TEST AL,AL
JZ 0x001e2aa5
MOV RDI,RBX
LEA RSI,[0x1ef7d2]
CALL 0x001a51e0
MOV RDI,R15
MOV RSI,RAX
CALL 0x0015d4a6
JMP 0x001e2ab4
LAB_001e2aa5:
MOV RDI,R15
LEA RSI,[0x1e6381]
CALL 0x001b7f7a
LAB_001e2ab4:
LEA RDI,[RSP + 0xa0]
MOV RSI,R15
CALL 0x00187184
LAB_001e2ac4:
MOV RDI,R14
MOV RSI,R12
CALL 0x001e56de
MOV RDI,qword ptr [RSP + 0xa0]
LEA RAX,[RSP + 0xb0]
CMP RDI,RAX
JZ 0x001e2af4
MOV RSI,qword ptr [RSP + 0xb0]
INC RSI
CALL 0x0011a8f0
LAB_001e2af4:
MOV RDI,qword ptr [RSP + 0x80]
LEA RAX,[RSP + 0x90]
CMP RDI,RAX
JZ 0x001e2b19
MOV RSI,qword ptr [RSP + 0x90]
INC RSI
CALL 0x0011a8f0
LAB_001e2b19:
MOV RDI,qword ptr [RSP + 0x60]
LEA RAX,[RSP + 0x70]
CMP RDI,RAX
JZ 0x001e2b35
MOV RSI,qword ptr [RSP + 0x70]
INC RSI
CALL 0x0011a8f0
LAB_001e2b35:
MOV RDI,R15
CALL 0x0015d972
MOV RAX,qword ptr [RSP + 0x28]
MOVZX EAX,byte ptr [RAX]
CMP EAX,0x2
JZ 0x001e2b57
CMP EAX,0x1
JNZ 0x001e2b5f
ADD qword ptr [RSP + 0x30],0x30
JMP 0x001e2b64
LAB_001e2b57:
ADD qword ptr [RSP + 0x38],0x10
JMP 0x001e2b64
LAB_001e2b5f:
INC qword ptr [RSP + 0x40]
LAB_001e2b64:
MOV RDI,R13
LEA RSI,[RSP + 0x8]
CALL 0x0018c8f8
TEST AL,AL
JZ 0x001e2a07
LAB_001e2b79:
LEA RDI,[RSP + 0x50]
CALL 0x0015d972
LAB_001e2b83:
ADD RSP,0xf8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
/* parse_prefixed_json_tool_call_array(std::__cxx11::string const&, std::__cxx11::string const&,
unsigned long) */
void parse_prefixed_json_tool_call_array(string *param_1,string *param_2,ulong param_3)
{
vector<common_tool_call,std::allocator<common_tool_call>> *this;
char cVar1;
long lVar2;
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_00;
basic_json *pbVar3;
basic_json *pbVar4;
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_120;
long local_118;
long lStack_110;
int8 local_108;
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_100;
long local_f8;
long lStack_f0;
long local_e8;
string *local_e0;
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_d8 [8];
long *local_d0;
long *local_c8 [2];
long local_b8 [2];
long *local_a8 [2];
long local_98 [2];
long *local_88 [2];
long local_78 [2];
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
local_68 [16];
int8 local_58;
int8 uStack_50;
code *local_48;
int8 uStack_40;
lVar2 = std::__cxx11::string::find((char *)param_2,*(ulong *)param_3,0);
*(string **)param_1 = param_1 + 0x10;
*(int8 *)(param_1 + 8) = 0;
param_1[0x10] = (string)0x0;
*(string **)(param_1 + 0x20) = param_1 + 0x30;
*(int8 *)(param_1 + 0x28) = 0;
param_1[0x30] = (string)0x0;
*(int8 *)(param_1 + 0x40) = 0;
*(int8 *)(param_1 + 0x48) = 0;
*(int8 *)(param_1 + 0x50) = 0;
*(string **)(param_1 + 0x58) = param_1 + 0x68;
*(int8 *)(param_1 + 0x60) = 0;
param_1[0x68] = (string)0x0;
local_e0 = param_1;
/* try { // try from 001e2828 to 001e2845 has its CatchHandler @ 001e2bf1 */
std::__cxx11::string::_M_replace((ulong)param_1,0,(char *)0x0,0x1ef373);
if (lVar2 == -1) {
/* try { // try from 001e2973 to 001e297d has its CatchHandler @ 001e2b95 */
std::__cxx11::string::_M_assign(param_1 + 0x20);
return;
}
/* try { // try from 001e2859 to 001e286a has its CatchHandler @ 001e2bef */
std::__cxx11::string::substr((ulong)local_c8,(ulong)param_2);
std::__cxx11::string::operator=(param_1 + 0x20,(string *)local_c8);
if (local_c8[0] != local_b8) {
operator_delete(local_c8[0],local_b8[0] + 1);
}
/* try { // try from 001e289b to 001e28b1 has its CatchHandler @ 001e2bed */
std::__cxx11::string::substr((ulong)local_c8,(ulong)param_2);
local_48 = (code *)0x0;
uStack_40 = 0;
local_58 = 0;
uStack_50 = 0;
/* try { // try from 001e28c4 to 001e28dd has its CatchHandler @ 001e2b9e */
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>
::parse<std::__cxx11::string>(local_d8,local_c8,&local_58,1,0);
if (local_48 != (code *)0x0) {
/* try { // try from 001e28eb to 001e28fc has its CatchHandler @ 001e2b97 */
(*local_48)(&local_58,&local_58,3);
}
if (local_c8[0] != local_b8) {
operator_delete(local_c8[0],local_b8[0] + 1);
}
local_f8 = 0;
lStack_f0 = 0;
local_e8 = -0x8000000000000000;
if (local_d8[0] ==
(basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
)0x0) {
local_e8 = 1;
}
else {
if (local_d8[0] ==
(basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
)0x2) {
lStack_f0 = *local_d0;
local_118 = 0;
local_108 = 0x8000000000000000;
lStack_110 = local_d0[1];
goto LAB_001e29d5;
}
if (local_d8[0] ==
(basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
)0x1) {
local_f8 = *local_d0;
lStack_110 = 0;
local_108 = 0x8000000000000000;
local_118 = local_d0[1];
goto LAB_001e29d5;
}
local_e8 = 0;
}
local_118 = 0;
lStack_110 = 0;
local_108 = 1;
LAB_001e29d5:
/* try { // try from 001e29d5 to 001e29e3 has its CatchHandler @ 001e2b99 */
local_120 = local_d8;
local_100 = local_d8;
cVar1 = _ZNK8nlohmann16json_abi_v3_11_36detail9iter_implIKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEEeqISH_TnNSt9enable_ifIXoosr3std7is_sameIT_SH_EE5valuesr3std7is_sameISK_NS2_ISF_EEEE5valueEDnE4typeELDn0EEEbRKSK_
(&local_100,&local_120);
if (cVar1 == '\0') {
this = (vector<common_tool_call,std::allocator<common_tool_call>> *)(local_e0 + 0x40);
do {
/* try { // try from 001e2a07 to 001e2a3d has its CatchHandler @ 001e2c72 */
this_00 = (basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
*)nlohmann::json_abi_v3_11_3::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>
::operator*((iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const>
*)&local_100);
pbVar3 = 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[]<char_const>(this_00,"arguments");
pbVar4 = 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[]<char_const>(this_00,"name");
_ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE8get_implIS9_TnNSt9enable_ifIXaasr6detail24is_default_constructibleIT_EE5valuesr6detail13has_from_jsonISD_SG_EE5valueEiE4typeELi0EEESG_NS0_6detail12priority_tagILj0EEE
((common_tool_call *)local_c8,pbVar4);
if (*pbVar3 == (basic_json)0x3) {
/* try { // try from 001e2a44 to 001e2a75 has its CatchHandler @ 001e2bf9 */
_ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE8get_implIS9_TnNSt9enable_ifIXaasr6detail24is_default_constructibleIT_EE5valuesr6detail13has_from_jsonISD_SG_EE5valueEiE4typeELi0EEESG_NS0_6detail12priority_tagILj0EEE
(local_a8,pbVar3);
}
else {
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>
::dump(local_a8,pbVar3,0xffffffff,0x20,0,0);
}
/* try { // try from 001e2a76 to 001e2ab3 has its CatchHandler @ 001e2c2c */
cVar1 = _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE8containsIRA3_KcTnNSt9enable_ifIXsr6detail32is_usable_as_basic_json_key_typeISD_T_EE5valueEiE4typeELi0EEEbOSJ_
(this_00,"id");
if (cVar1 == '\0') {
_ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEC2IRA1_KcA1_cTnNSt9enable_ifIXaantsr6detail13is_basic_jsonIT0_EE5valuesr6detail18is_compatible_typeISD_SK_EE5valueEiE4typeELi0EEEOT_
(local_68,"");
}
else {
pbVar3 = 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[]<char_const>(this_00,"id");
nlohmann::json_abi_v3_11_3::
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::basic_json(local_68,pbVar3);
}
/* try { // try from 001e2ab4 to 001e2ac3 has its CatchHandler @ 001e2bfe */
_ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE8get_implIS9_TnNSt9enable_ifIXaasr6detail24is_default_constructibleIT_EE5valuesr6detail13has_from_jsonISD_SG_EE5valueEiE4typeELi0EEESG_NS0_6detail12priority_tagILj0EEE
(local_88,local_68);
/* try { // try from 001e2ac4 to 001e2ace has its CatchHandler @ 001e2c10 */
std::vector<common_tool_call,std::allocator<common_tool_call>>::emplace_back<common_tool_call>
(this,(common_tool_call *)local_c8);
if (local_88[0] != local_78) {
operator_delete(local_88[0],local_78[0] + 1);
}
if (local_a8[0] != local_98) {
operator_delete(local_a8[0],local_98[0] + 1);
}
if (local_c8[0] != local_b8) {
operator_delete(local_c8[0],local_b8[0] + 1);
}
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>
::data::~data((data *)local_68);
if (*local_100 ==
(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>
)0x2) {
lStack_f0 = lStack_f0 + 0x10;
}
else if (*local_100 ==
(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) {
local_f8 = local_f8 + 0x30;
}
else {
local_e8 = local_e8 + 1;
}
/* try { // try from 001e2b64 to 001e2b70 has its CatchHandler @ 001e2c72 */
cVar1 = _ZNK8nlohmann16json_abi_v3_11_36detail9iter_implIKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEEeqISH_TnNSt9enable_ifIXoosr3std7is_sameIT_SH_EE5valuesr3std7is_sameISK_NS2_ISF_EEEE5valueEDnE4typeELDn0EEEbRKSK_
((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>
*)&local_100,&local_120);
} while (cVar1 == '\0');
}
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>
::data::~data((data *)local_d8);
return;
}
|
|
61,859 |
trnman_trid_to_trn
|
eloqsql/storage/maria/trnman.c
|
TRN *trnman_trid_to_trn(TRN *trn, TrID trid)
{
TRN **found;
if (trid < trn->min_read_from)
return 0; /* it's committed eons ago */
found= lf_hash_search(&trid_to_trn, trn->pins, &trid, sizeof(trid));
if (found == NULL || found == MY_ERRPTR)
return 0; /* no luck */
/* we've found something */
mysql_mutex_lock(&(*found)->state_lock);
if ((*found)->short_id == 0)
{
mysql_mutex_unlock(&(*found)->state_lock);
lf_hash_search_unpin(trn->pins);
return 0; /* but it was a ghost */
}
lf_hash_search_unpin(trn->pins);
/* Gotcha! */
return *found;
}
|
O3
|
c
|
trnman_trid_to_trn:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, -0x20(%rbp)
cmpq %rsi, 0x80(%rdi)
ja 0x417a1
movq %rdi, %rbx
movq (%rdi), %rsi
leaq 0x3e40bb(%rip), %rdi # 0x425848
leaq -0x20(%rbp), %rdx
movl $0x8, %ecx
callq 0x323ba
cmpq $0x2, %rax
jae 0x417ae
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r14
movq (%rax), %rax
leaq 0x10(%rax), %rdi
cmpq $0x0, 0x50(%rax)
jne 0x41802
callq 0x2a230
movq (%r14), %r15
cmpw $0x0, 0xac(%r15)
je 0x417e0
movq (%rbx), %rax
xorl %ecx, %ecx
xchgq %rcx, 0x10(%rax)
movq (%r14), %rax
jmp 0x417a3
movq 0x50(%r15), %rdi
addq $0x10, %r15
testq %rdi, %rdi
jne 0x41815
movq %r15, %rdi
callq 0x2a1f0
movq (%rbx), %rcx
xorl %eax, %eax
xorl %edx, %edx
xchgq %rdx, 0x10(%rcx)
jmp 0x417a3
leaq 0xb763e(%rip), %rsi # 0xf8e47
movl $0x285, %edx # imm = 0x285
callq 0x312ea
jmp 0x417c4
leaq 0x36d1fc(%rip), %rax # 0x3aea18
movq (%rax), %rax
callq *0x160(%rax)
jmp 0x417ed
|
trnman_trid_to_trn:
push rbp
mov rbp, rsp
push r15
push r14
push rbx
push rax
mov [rbp+var_20], rsi
cmp [rdi+80h], rsi
ja short loc_417A1
mov rbx, rdi
mov rsi, [rdi]
lea rdi, trid_to_trn
lea rdx, [rbp+var_20]
mov ecx, 8
call lf_hash_search
cmp rax, 2
jnb short loc_417AE
loc_417A1:
xor eax, eax
loc_417A3:
add rsp, 8
pop rbx
pop r14
pop r15
pop rbp
retn
loc_417AE:
mov r14, rax
mov rax, [rax]
lea rdi, [rax+10h]
cmp qword ptr [rax+50h], 0
jnz short loc_41802
call _pthread_mutex_lock
loc_417C4:
mov r15, [r14]
cmp word ptr [r15+0ACh], 0
jz short loc_417E0
mov rax, [rbx]
xor ecx, ecx
xchg rcx, [rax+10h]
mov rax, [r14]
jmp short loc_417A3
loc_417E0:
mov rdi, [r15+50h]
add r15, 10h
test rdi, rdi
jnz short loc_41815
loc_417ED:
mov rdi, r15
call _pthread_mutex_unlock
mov rcx, [rbx]
xor eax, eax
xor edx, edx
xchg rdx, [rcx+10h]
jmp short loc_417A3
loc_41802:
lea rsi, aWorkspaceLlm4b_3; "/workspace/llm4binary/github2025/eloqsq"...
mov edx, 285h
call psi_mutex_lock
jmp short loc_417C4
loc_41815:
lea rax, PSI_server
mov rax, [rax]
call qword ptr [rax+160h]
jmp short loc_417ED
|
long long trnman_trid_to_trn(long long a1, unsigned long long a2)
{
_QWORD *v3; // rax
long long result; // rax
_QWORD *v5; // r14
long long v6; // rax
long long v7; // rdi
long long v8; // r15
long long v9; // rdi
long long v10; // r15
_QWORD v11[4]; // [rsp+0h] [rbp-20h] BYREF
v11[0] = a2;
if ( *(_QWORD *)(a1 + 128) > a2 )
return 0LL;
v3 = (_QWORD *)lf_hash_search((long long)&trid_to_trn, *(volatile long long **)a1, (long long)v11, 8u);
if ( (unsigned long long)v3 < 2 )
return 0LL;
v5 = v3;
v6 = *v3;
v7 = v6 + 16;
if ( *(_QWORD *)(v6 + 80) )
psi_mutex_lock(v7, (long long)"/workspace/llm4binary/github2025/eloqsql/storage/maria/trnman.c", 0x285u);
else
pthread_mutex_lock(v7);
v8 = *v5;
if ( *(_WORD *)(*v5 + 172LL) )
{
_InterlockedExchange64((volatile long long *)(*(_QWORD *)a1 + 16LL), 0LL);
return *v5;
}
else
{
v9 = *(_QWORD *)(v8 + 80);
v10 = v8 + 16;
if ( v9 )
((void ( *)(long long))PSI_server[44])(v9);
pthread_mutex_unlock(v10);
result = 0LL;
_InterlockedExchange64((volatile long long *)(*(_QWORD *)a1 + 16LL), 0LL);
}
return result;
}
|
trnman_trid_to_trn:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH RBX
PUSH RAX
MOV qword ptr [RBP + -0x20],RSI
CMP qword ptr [RDI + 0x80],RSI
JA 0x001417a1
MOV RBX,RDI
MOV RSI,qword ptr [RDI]
LEA RDI,[0x525848]
LEA RDX,[RBP + -0x20]
MOV ECX,0x8
CALL 0x001323ba
CMP RAX,0x2
JNC 0x001417ae
LAB_001417a1:
XOR EAX,EAX
LAB_001417a3:
ADD RSP,0x8
POP RBX
POP R14
POP R15
POP RBP
RET
LAB_001417ae:
MOV R14,RAX
MOV RAX,qword ptr [RAX]
LEA RDI,[RAX + 0x10]
CMP qword ptr [RAX + 0x50],0x0
JNZ 0x00141802
CALL 0x0012a230
LAB_001417c4:
MOV R15,qword ptr [R14]
CMP word ptr [R15 + 0xac],0x0
JZ 0x001417e0
MOV RAX,qword ptr [RBX]
XOR ECX,ECX
XCHG qword ptr [RAX + 0x10],RCX
MOV RAX,qword ptr [R14]
JMP 0x001417a3
LAB_001417e0:
MOV RDI,qword ptr [R15 + 0x50]
ADD R15,0x10
TEST RDI,RDI
JNZ 0x00141815
LAB_001417ed:
MOV RDI,R15
CALL 0x0012a1f0
MOV RCX,qword ptr [RBX]
XOR EAX,EAX
XOR EDX,EDX
XCHG qword ptr [RCX + 0x10],RDX
JMP 0x001417a3
LAB_00141802:
LEA RSI,[0x1f8e47]
MOV EDX,0x285
CALL 0x001312ea
JMP 0x001417c4
LAB_00141815:
LEA RAX,[0x4aea18]
MOV RAX,qword ptr [RAX]
CALL qword ptr [RAX + 0x160]
JMP 0x001417ed
|
long trnman_trid_to_trn(long *param_1,ulong param_2)
{
pthread_mutex_t *__mutex;
long lVar1;
long *plVar2;
ulong local_28;
if ((param_2 < (ulong)param_1[0x10]) ||
(local_28 = param_2, plVar2 = (long *)lf_hash_search(trid_to_trn,*param_1,&local_28),
plVar2 < (long *)0x2)) {
return 0;
}
__mutex = (pthread_mutex_t *)(*plVar2 + 0x10);
if (*(long *)(*plVar2 + 0x50) == 0) {
pthread_mutex_lock(__mutex);
}
else {
psi_mutex_lock(__mutex,"/workspace/llm4binary/github2025/eloqsql/storage/maria/trnman.c",0x285);
}
lVar1 = *plVar2;
if (*(short *)(lVar1 + 0xac) != 0) {
LOCK();
*(int8 *)(*param_1 + 0x10) = 0;
UNLOCK();
return *plVar2;
}
if (*(long *)(lVar1 + 0x50) != 0) {
(**(code **)(PSI_server + 0x160))();
}
pthread_mutex_unlock((pthread_mutex_t *)(lVar1 + 0x10));
LOCK();
*(int8 *)(*param_1 + 0x10) = 0;
UNLOCK();
return 0;
}
|
|
61,860 |
nglog::LogDestination::AddLogSink(nglog::LogSink*)
|
ng-log[P]ng-log/src/logging.cc
|
inline void LogDestination::AddLogSink(LogSink* destination) {
// Prevent any subtle race conditions by wrapping a mutex lock around
// all this stuff.
SinkLock l{sink_mutex_};
if (sinks_ == nullptr) sinks_ = std::make_unique<std::vector<LogSink*>>();
sinks_->push_back(destination);
}
|
O2
|
cpp
|
nglog::LogDestination::AddLogSink(nglog::LogSink*):
pushq %rbx
subq $0x10, %rsp
movq %rdi, 0x8(%rsp)
leaq 0x26947(%rip), %rdi # 0x43228
callq 0x28b5e
movq 0x26933(%rip), %rdi # 0x43220
testq %rdi, %rdi
jne 0x1c91f
movq %rsp, %rdi
callq 0x1d30e
movq %rsp, %rbx
movq (%rbx), %rsi
andq $0x0, (%rbx)
leaq 0x26915(%rip), %rdi # 0x43220
callq 0x1d34c
movq %rbx, %rdi
callq 0x1c14a
movq 0x26901(%rip), %rdi # 0x43220
leaq 0x8(%rsp), %rsi
callq 0x1d32e
leaq 0x268f8(%rip), %rdi # 0x43228
callq 0x88d0
addq $0x10, %rsp
popq %rbx
retq
jmp 0x1c93d
movq %rax, %rbx
leaq 0x268e1(%rip), %rdi # 0x43228
callq 0x88d0
movq %rbx, %rdi
callq 0x8c30
|
_ZN5nglog14LogDestination10AddLogSinkEPNS_7LogSinkE:
push rbx
sub rsp, 10h
mov [rsp+18h+var_10], rdi
lea rdi, _ZN5nglog14LogDestination11sink_mutex_E; this
call _ZNSt22__shared_mutex_pthread4lockEv; std::__shared_mutex_pthread::lock(void)
mov rdi, cs:_ZN5nglog14LogDestination6sinks_E; nglog::LogDestination::sinks_
test rdi, rdi
jnz short loc_1C91F
mov rdi, rsp
call _ZSt11make_uniqueISt6vectorIPN5nglog7LogSinkESaIS3_EEJEENSt9_MakeUniqIT_E15__single_objectEDpOT0_; std::make_unique<std::vector<nglog::LogSink *>>()
mov rbx, rsp
mov rsi, [rbx]
and qword ptr [rbx], 0
lea rdi, _ZN5nglog14LogDestination6sinks_E; nglog::LogDestination::sinks_
call _ZNSt15__uniq_ptr_implISt6vectorIPN5nglog7LogSinkESaIS3_EESt14default_deleteIS5_EE5resetEPS5_; std::__uniq_ptr_impl<std::vector<nglog::LogSink *>,std::default_delete<std::vector<nglog::LogSink *>>>::reset(std::vector<nglog::LogSink *>*)
mov rdi, rbx; void *
call _ZNSt10unique_ptrISt6vectorIPN5nglog7LogSinkESaIS3_EESt14default_deleteIS5_EED2Ev; std::unique_ptr<std::vector<nglog::LogSink *>>::~unique_ptr()
mov rdi, cs:_ZN5nglog14LogDestination6sinks_E; nglog::LogDestination::sinks_
loc_1C91F:
lea rsi, [rsp+18h+var_10]
call _ZNSt6vectorIPN5nglog7LogSinkESaIS2_EE9push_backERKS2_; std::vector<nglog::LogSink *>::push_back(nglog::LogSink * const&)
lea rdi, _ZN5nglog14LogDestination11sink_mutex_E; nglog::LogDestination::sink_mutex_
call _pthread_rwlock_unlock
add rsp, 10h
pop rbx
retn
jmp short $+2
loc_1C93D:
mov rbx, rax
lea rdi, _ZN5nglog14LogDestination11sink_mutex_E; nglog::LogDestination::sink_mutex_
call _pthread_rwlock_unlock
mov rdi, rbx
call __Unwind_Resume
|
long long nglog::LogDestination::AddLogSink(nglog::LogDestination *this, nglog::LogSink *a2)
{
long long v2; // rdi
long long v3; // rsi
long long v5; // [rsp+0h] [rbp-18h] BYREF
nglog::LogDestination *v6; // [rsp+8h] [rbp-10h] BYREF
v6 = this;
std::__shared_mutex_pthread::lock((std::__shared_mutex_pthread *)&nglog::LogDestination::sink_mutex_);
v2 = nglog::LogDestination::sinks_;
if ( !nglog::LogDestination::sinks_ )
{
std::make_unique<std::vector<nglog::LogSink *>>(&v5, a2);
v3 = v5;
v5 = 0LL;
std::__uniq_ptr_impl<std::vector<nglog::LogSink *>,std::default_delete<std::vector<nglog::LogSink *>>>::reset(
&nglog::LogDestination::sinks_,
v3);
std::unique_ptr<std::vector<nglog::LogSink *>>::~unique_ptr(&v5);
v2 = nglog::LogDestination::sinks_;
}
std::vector<nglog::LogSink *>::push_back(v2, &v6);
return pthread_rwlock_unlock(&nglog::LogDestination::sink_mutex_);
}
|
AddLogSink:
PUSH RBX
SUB RSP,0x10
MOV qword ptr [RSP + 0x8],RDI
LEA RDI,[0x143228]
CALL 0x00128b5e
MOV RDI,qword ptr [0x00143220]
TEST RDI,RDI
JNZ 0x0011c91f
LAB_0011c8f2:
MOV RDI,RSP
CALL 0x0011d30e
MOV RBX,RSP
MOV RSI,qword ptr [RBX]
AND qword ptr [RBX],0x0
LEA RDI,[0x143220]
CALL 0x0011d34c
MOV RDI,RBX
CALL 0x0011c14a
MOV RDI,qword ptr [0x00143220]
LAB_0011c91f:
LEA RSI,[RSP + 0x8]
CALL 0x0011d32e
LAB_0011c929:
LEA RDI,[0x143228]
CALL 0x001088d0
ADD RSP,0x10
POP RBX
RET
|
/* nglog::LogDestination::AddLogSink(nglog::LogSink*) */
void nglog::LogDestination::AddLogSink(LogSink *param_1)
{
vector *pvVar1;
vector *local_18;
LogSink *local_10;
local_10 = param_1;
std::__shared_mutex_pthread::lock((__shared_mutex_pthread *)sink_mutex_);
if (sinks_ == (vector<nglog::LogSink*,std::allocator<nglog::LogSink*>> *)0x0) {
/* try { // try from 0011c8f2 to 0011c8f9 has its CatchHandler @ 0011c93b */
std::make_unique<std::vector<nglog::LogSink*,std::allocator<nglog::LogSink*>>>();
pvVar1 = local_18;
local_18 = (vector *)0x0;
std::
__uniq_ptr_impl<std::vector<nglog::LogSink*,std::allocator<nglog::LogSink*>>,std::default_delete<std::vector<nglog::LogSink*,std::allocator<nglog::LogSink*>>>>
::reset((__uniq_ptr_impl<std::vector<nglog::LogSink*,std::allocator<nglog::LogSink*>>,std::default_delete<std::vector<nglog::LogSink*,std::allocator<nglog::LogSink*>>>>
*)&sinks_,pvVar1);
std::
unique_ptr<std::vector<nglog::LogSink*,std::allocator<nglog::LogSink*>>,std::default_delete<std::vector<nglog::LogSink*,std::allocator<nglog::LogSink*>>>>
::~unique_ptr((unique_ptr<std::vector<nglog::LogSink*,std::allocator<nglog::LogSink*>>,std::default_delete<std::vector<nglog::LogSink*,std::allocator<nglog::LogSink*>>>>
*)&local_18);
}
/* try { // try from 0011c91f to 0011c928 has its CatchHandler @ 0011c93d */
std::vector<nglog::LogSink*,std::allocator<nglog::LogSink*>>::push_back(sinks_,&local_10);
pthread_rwlock_unlock((pthread_rwlock_t *)sink_mutex_);
return;
}
|
|
61,861 |
free_full_pages
|
eloqsql/storage/maria/ma_blockrec.c
|
static my_bool free_full_pages(MARIA_HA *info, MARIA_ROW *row)
{
uchar log_data[FILEID_STORE_SIZE + PAGERANGE_STORE_SIZE];
LEX_CUSTRING log_array[TRANSLOG_INTERNAL_PARTS + 2];
LSN lsn;
size_t extents_length;
uchar *extents= row->extents;
DBUG_ENTER("free_full_pages");
if (info->s->now_transactional)
{
/* Compact events by removing filler and tail events */
uchar *new_block= 0;
uchar *end, *to, *compact_extent_info;
my_bool res, buff_alloced;
uint extents_count;
alloc_on_stack(*info->stack_end_ptr, compact_extent_info, buff_alloced,
row->extents_count * ROW_EXTENT_SIZE);
if (!compact_extent_info)
DBUG_RETURN(1);
to= compact_extent_info;
for (end= extents + row->extents_count * ROW_EXTENT_SIZE ;
extents < end ;
extents+= ROW_EXTENT_SIZE)
{
uint page_count= uint2korr(extents + ROW_EXTENT_PAGE_SIZE);
page_count&= ~START_EXTENT_BIT;
if (! (page_count & TAIL_BIT) && page_count != 0)
{
/* Found correct extent */
if (!new_block)
new_block= extents; /* First extent in range */
continue;
}
/* Found extent to remove, copy everything found so far */
if (new_block)
{
size_t length= (size_t) (extents - new_block);
memcpy(to, new_block, length);
to+= length;
new_block= 0;
}
}
if (new_block)
{
size_t length= (size_t) (extents - new_block);
memcpy(to, new_block, length);
to+= length;
}
if (!unlikely(extents_length= (uint) (to - compact_extent_info)))
{
/*
No ranges. This happens in the rear case when we have a allocated
place for a blob on a tail page but it did fit into the main page.
*/
stack_alloc_free(compact_extent_info, buff_alloced);
DBUG_RETURN(0);
}
extents_count= (uint) (extents_length / ROW_EXTENT_SIZE);
pagerange_store(log_data + FILEID_STORE_SIZE, extents_count);
log_array[TRANSLOG_INTERNAL_PARTS + 0].str= log_data;
log_array[TRANSLOG_INTERNAL_PARTS + 0].length= sizeof(log_data);
log_array[TRANSLOG_INTERNAL_PARTS + 1].str= compact_extent_info;
log_array[TRANSLOG_INTERNAL_PARTS + 1].length= extents_length;
res= translog_write_record(&lsn, LOGREC_REDO_FREE_BLOCKS, info->trn,
info,
(translog_size_t) (sizeof(log_data) +
extents_length),
TRANSLOG_INTERNAL_PARTS + 2, log_array,
log_data, NULL);
stack_alloc_free(compact_extent_info, buff_alloced);
if (res)
DBUG_RETURN(1);
}
DBUG_RETURN(_ma_bitmap_free_full_pages(info, row->extents,
row->extents_count));
}
|
O3
|
c
|
free_full_pages:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x78, %rsp
movq %rsi, %r15
movq %rdi, %rbx
movq %fs:0x28, %rax
movq %rax, -0x30(%rbp)
movq 0x10(%rsi), %r14
movq (%rdi), %rax
cmpb $0x0, 0x7e7(%rax)
je 0x484c4
movl 0xac(%r15), %eax
leal (,%rax,8), %r13d
subl %eax, %r13d
leaq -0xa0(%rbp), %r12
movq %r13, (%r12)
movq 0x78(%rbx), %rcx
movq (%rcx), %rcx
subq %r12, %rcx
subq %r13, %rcx
jbe 0x48353
cmpq $0x10000, %rcx # imm = 0x10000
ja 0x48336
cmpl $0x1000, %r13d # imm = 0x1000
jb 0x48353
cmpq $0x8001, %rcx # imm = 0x8001
jb 0x48353
movq %r15, -0x48(%rbp)
movq %rbx, -0x40(%rbp)
movq %rsp, %rdi
leaq 0xf(%r13), %rcx
andq $-0x10, %rcx
subq %rcx, %rdi
movq %rdi, %rsp
movb $0x1, %bl
jmp 0x4838a
movl $0x10010, %edx # imm = 0x10010
xorl %edi, %edi
movq %r13, %rsi
callq 0xa2c71
testq %rax, %rax
je 0x4842c
movq %rax, %rdi
movq %rbx, -0x40(%rbp)
movq %r15, -0x48(%rbp)
movl 0xac(%r15), %eax
leal (,%rax,8), %r13d
subl %eax, %r13d
xorl %ebx, %ebx
movq %rdi, %r15
testl %eax, %eax
je 0x4840f
movl %ebx, -0x38(%rbp)
addq %r14, %r13
xorl %esi, %esi
movq %r14, %r12
movq %rdi, -0x50(%rbp)
movq %rdi, %r15
movzwl 0x5(%r14), %eax
testw %ax, %ax
sets %cl
testl $0xbfff, %eax # imm = 0xBFFF
sete %al
orb %cl, %al
jne 0x483c3
testq %rsi, %rsi
cmoveq %r14, %rsi
jmp 0x483de
testq %rsi, %rsi
je 0x483dc
movq %r12, %rbx
subq %rsi, %rbx
movq %r15, %rdi
movq %rbx, %rdx
callq 0x29080
addq %rbx, %r15
xorl %esi, %esi
addq $0x7, %r14
addq $0x7, %r12
cmpq %r13, %r14
jb 0x483a3
testq %rsi, %rsi
je 0x48401
subq %rsi, %r12
movq %r15, %rdi
movq %r12, %rdx
callq 0x29080
addq %r12, %r15
leaq -0xa0(%rbp), %r12
movq -0x50(%rbp), %rdi
movl -0x38(%rbp), %ebx
subq %rdi, %r15
movl $0xffffffff, %eax # imm = 0xFFFFFFFF
andq %r15, %rax
jne 0x48433
testb %bl, %bl
jne 0x48425
callq 0xa2e9e
xorl %eax, %eax
jmp 0x484d6
movb $0x1, %al
jmp 0x484d6
movq %rdi, %r13
movl %r15d, %ecx
imulq $0x24924925, %rcx, %rcx # imm = 0x24924925
shrq $0x20, %rcx
movl %r15d, %edx
subl %ecx, %edx
shrl %edx
addl %ecx, %edx
shrl $0x2, %edx
leaq -0x34(%rbp), %r10
movw %dx, 0x2(%r10)
movq %r10, -0x80(%rbp)
movq $0x4, -0x78(%rbp)
movq %rdi, -0x70(%rbp)
movq %rax, -0x68(%rbp)
movq -0x40(%rbp), %rcx
movq 0x8(%rcx), %rdx
addl $0x4, %r15d
subq $0x8, %rsp
leaq -0x58(%rbp), %rdi
movl $0x8, %esi
movq %rcx, -0x40(%rbp)
movl %r15d, %r8d
movl $0x4, %r9d
pushq $0x0
pushq %r10
pushq %r12
callq 0x2ad29
addq $0x20, %rsp
movl %eax, %r14d
testb %bl, %bl
jne 0x484b1
movq %r13, %rdi
callq 0xa2e9e
movb $0x1, %al
testb %r14b, %r14b
jne 0x484d6
movq -0x48(%rbp), %r15
movq 0x10(%r15), %r14
movq -0x40(%rbp), %rbx
movl 0xac(%r15), %edx
movq %rbx, %rdi
movq %r14, %rsi
callq 0x50c13
movq %fs:0x28, %rcx
cmpq -0x30(%rbp), %rcx
jne 0x484f4
leaq -0x28(%rbp), %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0x29220
|
free_full_pages:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 78h
mov r15, rsi
mov rbx, rdi
mov rax, fs:28h
mov [rbp+var_30], rax
mov r14, [rsi+10h]
mov rax, [rdi]
cmp byte ptr [rax+7E7h], 0
jz loc_484C4
mov eax, [r15+0ACh]
lea r13d, ds:0[rax*8]
sub r13d, eax
lea r12, [rbp+var_A0]
mov [r12], r13
mov rcx, [rbx+78h]
mov rcx, [rcx]
sub rcx, r12
sub rcx, r13
jbe short loc_48353
cmp rcx, 10000h
ja short loc_48336
cmp r13d, 1000h
jb short loc_48353
cmp rcx, 8001h
jb short loc_48353
loc_48336:
mov [rbp+var_48], r15
mov [rbp+var_40], rbx
mov rdi, rsp
lea rcx, [r13+0Fh]
and rcx, 0FFFFFFFFFFFFFFF0h
sub rdi, rcx
mov rsp, rdi
mov bl, 1
jmp short loc_4838A
loc_48353:
mov edx, 10010h
xor edi, edi
mov rsi, r13
call my_malloc
test rax, rax
jz loc_4842C
mov rdi, rax
mov [rbp+var_40], rbx
mov [rbp+var_48], r15
mov eax, [r15+0ACh]
lea r13d, ds:0[rax*8]
sub r13d, eax
xor ebx, ebx
loc_4838A:
mov r15, rdi
test eax, eax
jz short loc_4840F
mov [rbp+var_38], ebx
add r13, r14
xor esi, esi
mov r12, r14
mov [rbp+var_50], rdi
mov r15, rdi
loc_483A3:
movzx eax, word ptr [r14+5]
test ax, ax
sets cl
test eax, 0BFFFh
setz al
or al, cl
jnz short loc_483C3
test rsi, rsi
cmovz rsi, r14
jmp short loc_483DE
loc_483C3:
test rsi, rsi
jz short loc_483DC
mov rbx, r12
sub rbx, rsi
mov rdi, r15
mov rdx, rbx
call _memcpy
add r15, rbx
loc_483DC:
xor esi, esi
loc_483DE:
add r14, 7
add r12, 7
cmp r14, r13
jb short loc_483A3
test rsi, rsi
jz short loc_48401
sub r12, rsi
mov rdi, r15
mov rdx, r12
call _memcpy
add r15, r12
loc_48401:
lea r12, [rbp+var_A0]
mov rdi, [rbp+var_50]
mov ebx, [rbp+var_38]
loc_4840F:
sub r15, rdi
mov eax, 0FFFFFFFFh
and rax, r15
jnz short loc_48433
test bl, bl
jnz short loc_48425
call my_free
loc_48425:
xor eax, eax
jmp loc_484D6
loc_4842C:
mov al, 1
jmp loc_484D6
loc_48433:
mov r13, rdi
mov ecx, r15d
imul rcx, 24924925h
shr rcx, 20h
mov edx, r15d
sub edx, ecx
shr edx, 1
add edx, ecx
shr edx, 2
lea r10, [rbp+var_34]
mov [r10+2], dx
mov [rbp+var_80], r10
mov [rbp+var_78], 4
mov [rbp+var_70], rdi
mov [rbp+var_68], rax
mov rcx, [rbp+var_40]
mov rdx, [rcx+8]
add r15d, 4
sub rsp, 8
lea rdi, [rbp+var_58]
mov esi, 8
mov [rbp+var_40], rcx
mov r8d, r15d
mov r9d, 4
push 0
push r10
push r12
call translog_write_record
add rsp, 20h
mov r14d, eax
test bl, bl
jnz short loc_484B1
mov rdi, r13
call my_free
loc_484B1:
mov al, 1
test r14b, r14b
jnz short loc_484D6
mov r15, [rbp+var_48]
mov r14, [r15+10h]
mov rbx, [rbp+var_40]
loc_484C4:
mov edx, [r15+0ACh]
mov rdi, rbx
mov rsi, r14
call _ma_bitmap_free_full_pages
loc_484D6:
mov rcx, fs:28h
cmp rcx, [rbp+var_30]
jnz short loc_484F4
lea rsp, [rbp-28h]
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_484F4:
call ___stack_chk_fail
|
char free_full_pages(_QWORD *a1, long long a2)
{
long long v2; // r15
_QWORD *v3; // rbx
unsigned long long v4; // r14
int v5; // eax
unsigned long long v6; // r13
unsigned long long v7; // rcx
bool v8; // cc
unsigned long long v9; // rcx
char *v10; // rdi
long long v11; // rax
char *v12; // r15
unsigned long long v13; // r13
unsigned long long v14; // rsi
unsigned long long v15; // r12
unsigned long long v16; // r12
unsigned int v17; // r15d
char result; // al
char v19; // r14
_OWORD v20[2]; // [rsp+0h] [rbp-A0h] BYREF
_WORD *v21; // [rsp+20h] [rbp-80h]
long long v22; // [rsp+28h] [rbp-78h]
char *v23; // [rsp+30h] [rbp-70h]
long long v24; // [rsp+38h] [rbp-68h]
char v25[8]; // [rsp+48h] [rbp-58h] BYREF
char *v26; // [rsp+50h] [rbp-50h]
long long v27; // [rsp+58h] [rbp-48h]
_QWORD *v28; // [rsp+60h] [rbp-40h]
int v29; // [rsp+68h] [rbp-38h]
_WORD v30[2]; // [rsp+6Ch] [rbp-34h] BYREF
unsigned long long v31; // [rsp+70h] [rbp-30h]
v2 = a2;
v3 = a1;
v31 = __readfsqword(0x28u);
v4 = *(_QWORD *)(a2 + 16);
if ( !*(_BYTE *)(*a1 + 2023LL) )
return ma_bitmap_free_full_pages(v3, v4, *(unsigned int *)(v2 + 172));
v5 = *(_DWORD *)(a2 + 172);
v6 = (unsigned int)(7 * v5);
*(_QWORD *)&v20[0] = v6;
v7 = *(_QWORD *)a1[15] - (_QWORD)v20;
v8 = v7 <= v6;
v9 = v7 - v6;
if ( v8 || v9 <= 0x10000 && ((unsigned int)v6 < 0x1000 || v9 < 0x8001) )
{
v11 = my_malloc(0LL, (unsigned int)(7 * v5), 65552LL);
if ( !v11 )
return 1;
v10 = (char *)v11;
v28 = v3;
v27 = a2;
v5 = *(_DWORD *)(a2 + 172);
v6 = (unsigned int)(7 * v5);
LODWORD(v3) = 0;
}
else
{
v27 = a2;
v28 = a1;
v10 = (char *)v20 - ((v6 + 15) & 0xFFFFFFFFFFFFFFF0LL);
LOBYTE(v3) = 1;
}
LODWORD(v12) = (_DWORD)v10;
if ( v5 )
{
v29 = (int)v3;
v13 = v4 + v6;
v14 = 0LL;
v15 = v4;
v26 = v10;
v12 = v10;
do
{
if ( *(__int16 *)(v4 + 5) < 0 || (*(_WORD *)(v4 + 5) & 0xBFFF) == 0 )
{
if ( v14 )
{
memcpy(v12, v14, v15 - v14);
v12 += v15 - v14;
}
v14 = 0LL;
}
else if ( !v14 )
{
v14 = v4;
}
v4 += 7LL;
v15 += 7LL;
}
while ( v4 < v13 );
if ( v14 )
{
v16 = v15 - v14;
memcpy(v12, v14, v16);
LODWORD(v12) = v16 + (_DWORD)v12;
}
v10 = v26;
LOBYTE(v3) = v29;
}
v17 = (_DWORD)v12 - (_DWORD)v10;
if ( !v17 )
{
if ( !(_BYTE)v3 )
my_free(v10);
return 0;
}
v30[1] = v17 / 7;
v21 = v30;
v22 = 4LL;
v23 = v10;
v24 = v17;
v19 = translog_write_record((unsigned long long)v25, &byte_8, v28[1], v28, v17 + 4, 4, v20, v30, 0LL);
if ( !(_BYTE)v3 )
my_free(v10);
result = 1;
if ( !v19 )
{
v2 = v27;
v4 = *(_QWORD *)(v27 + 16);
v3 = v28;
return ma_bitmap_free_full_pages(v3, v4, *(unsigned int *)(v2 + 172));
}
return result;
}
|
free_full_pages:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x78
MOV R15,RSI
MOV RBX,RDI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x30],RAX
MOV R14,qword ptr [RSI + 0x10]
MOV RAX,qword ptr [RDI]
CMP byte ptr [RAX + 0x7e7],0x0
JZ 0x001484c4
MOV EAX,dword ptr [R15 + 0xac]
LEA R13D,[RAX*0x8]
SUB R13D,EAX
LEA R12,[RBP + -0xa0]
MOV qword ptr [R12],R13
MOV RCX,qword ptr [RBX + 0x78]
MOV RCX,qword ptr [RCX]
SUB RCX,R12
SUB RCX,R13
JBE 0x00148353
CMP RCX,0x10000
JA 0x00148336
CMP R13D,0x1000
JC 0x00148353
CMP RCX,0x8001
JC 0x00148353
LAB_00148336:
MOV qword ptr [RBP + -0x48],R15
MOV qword ptr [RBP + -0x40],RBX
MOV RDI,RSP
LEA RCX,[R13 + 0xf]
AND RCX,-0x10
SUB RDI,RCX
MOV RSP,RDI
MOV BL,0x1
JMP 0x0014838a
LAB_00148353:
MOV EDX,0x10010
XOR EDI,EDI
MOV RSI,R13
CALL 0x001a2c71
TEST RAX,RAX
JZ 0x0014842c
MOV RDI,RAX
MOV qword ptr [RBP + -0x40],RBX
MOV qword ptr [RBP + -0x48],R15
MOV EAX,dword ptr [R15 + 0xac]
LEA R13D,[RAX*0x8]
SUB R13D,EAX
XOR EBX,EBX
LAB_0014838a:
MOV R15,RDI
TEST EAX,EAX
JZ 0x0014840f
MOV dword ptr [RBP + -0x38],EBX
ADD R13,R14
XOR ESI,ESI
MOV R12,R14
MOV qword ptr [RBP + -0x50],RDI
MOV R15,RDI
LAB_001483a3:
MOVZX EAX,word ptr [R14 + 0x5]
TEST AX,AX
SETS CL
TEST EAX,0xbfff
SETZ AL
OR AL,CL
JNZ 0x001483c3
TEST RSI,RSI
CMOVZ RSI,R14
JMP 0x001483de
LAB_001483c3:
TEST RSI,RSI
JZ 0x001483dc
MOV RBX,R12
SUB RBX,RSI
MOV RDI,R15
MOV RDX,RBX
CALL 0x00129080
ADD R15,RBX
LAB_001483dc:
XOR ESI,ESI
LAB_001483de:
ADD R14,0x7
ADD R12,0x7
CMP R14,R13
JC 0x001483a3
TEST RSI,RSI
JZ 0x00148401
SUB R12,RSI
MOV RDI,R15
MOV RDX,R12
CALL 0x00129080
ADD R15,R12
LAB_00148401:
LEA R12,[RBP + -0xa0]
MOV RDI,qword ptr [RBP + -0x50]
MOV EBX,dword ptr [RBP + -0x38]
LAB_0014840f:
SUB R15,RDI
MOV EAX,0xffffffff
AND RAX,R15
JNZ 0x00148433
TEST BL,BL
JNZ 0x00148425
CALL 0x001a2e9e
LAB_00148425:
XOR EAX,EAX
JMP 0x001484d6
LAB_0014842c:
MOV AL,0x1
JMP 0x001484d6
LAB_00148433:
MOV R13,RDI
MOV ECX,R15D
IMUL RCX,RCX,0x24924925
SHR RCX,0x20
MOV EDX,R15D
SUB EDX,ECX
SHR EDX,0x1
ADD EDX,ECX
SHR EDX,0x2
LEA R10,[RBP + -0x34]
MOV word ptr [R10 + 0x2],DX
MOV qword ptr [RBP + -0x80],R10
MOV qword ptr [RBP + -0x78],0x4
MOV qword ptr [RBP + -0x70],RDI
MOV qword ptr [RBP + -0x68],RAX
MOV RCX,qword ptr [RBP + -0x40]
MOV RDX,qword ptr [RCX + 0x8]
ADD R15D,0x4
SUB RSP,0x8
LEA RDI,[RBP + -0x58]
MOV ESI,0x8
MOV qword ptr [RBP + -0x40],RCX
MOV R8D,R15D
MOV R9D,0x4
PUSH 0x0
PUSH R10
PUSH R12
CALL 0x0012ad29
ADD RSP,0x20
MOV R14D,EAX
TEST BL,BL
JNZ 0x001484b1
MOV RDI,R13
CALL 0x001a2e9e
LAB_001484b1:
MOV AL,0x1
TEST R14B,R14B
JNZ 0x001484d6
MOV R15,qword ptr [RBP + -0x48]
MOV R14,qword ptr [R15 + 0x10]
MOV RBX,qword ptr [RBP + -0x40]
LAB_001484c4:
MOV EDX,dword ptr [R15 + 0xac]
MOV RDI,RBX
MOV RSI,R14
CALL 0x00150c13
LAB_001484d6:
MOV RCX,qword ptr FS:[0x28]
CMP RCX,qword ptr [RBP + -0x30]
JNZ 0x001484f4
LEA RSP,[RBP + -0x28]
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_001484f4:
CALL 0x00129220
|
int8 free_full_pages(long *param_1,long param_2)
{
int4 uVar1;
long lVar2;
long *plVar3;
ulong *puVar4;
char cVar5;
int8 uVar6;
int iVar7;
ulong uVar8;
ulong *puVar9;
void *__src;
int1 *puVar10;
void *pvVar11;
void *pvVar12;
void *pvVar13;
int1 *__dest;
ulong uVar14;
long in_FS_OFFSET;
ulong local_a8 [4];
int1 *local_88;
int8 local_80;
int1 *local_78;
ulong local_70;
int1 local_60 [8];
int1 *local_58;
long local_50;
long *local_48;
uint local_40;
int1 local_3c [2];
int2 local_3a;
long local_38;
puVar9 = local_a8;
local_38 = *(long *)(in_FS_OFFSET + 0x28);
pvVar11 = *(void **)(param_2 + 0x10);
puVar4 = local_a8;
if (*(char *)(*param_1 + 0x7e7) != '\0') {
iVar7 = *(int *)(param_2 + 0xac);
uVar14 = (ulong)(uint)(iVar7 * 7);
uVar8 = (*(long *)param_1[0xf] - (long)local_a8) - uVar14;
local_a8[0] = uVar14;
if ((uVar14 < (ulong)(*(long *)param_1[0xf] - (long)local_a8)) &&
((0x10000 < uVar8 || ((0xfff < (uint)(iVar7 * 7) && (0x8000 < uVar8)))))) {
__dest = (int1 *)((long)local_a8 - (uVar14 + 0xf & 0xfffffffffffffff0));
uVar8 = CONCAT71((int7)((ulong)param_1 >> 8),1);
puVar9 = (ulong *)__dest;
}
else {
__dest = (int1 *)my_malloc(0,uVar14,0x10010);
if (__dest == (int1 *)0x0) {
uVar6 = 1;
goto LAB_001484d6;
}
iVar7 = *(int *)(param_2 + 0xac);
uVar14 = (ulong)(uint)(iVar7 * 7);
uVar8 = 0;
puVar9 = local_a8;
}
puVar10 = __dest;
local_50 = param_2;
local_48 = param_1;
if (iVar7 != 0) {
local_40 = (uint)uVar8;
pvVar12 = (void *)(uVar14 + (long)pvVar11);
__src = (void *)0x0;
pvVar13 = pvVar11;
local_58 = __dest;
do {
if ((*(ushort *)((long)pvVar13 + 5) & 0xbfff) == 0 ||
(short)*(ushort *)((long)pvVar13 + 5) < 0) {
if (__src != (void *)0x0) {
*(int8 *)((long)puVar9 + -8) = 0x1483d9;
memcpy(__dest,__src,(long)pvVar11 - (long)__src);
__dest = __dest + ((long)pvVar11 - (long)__src);
}
__src = (void *)0x0;
}
else if (__src == (void *)0x0) {
__src = pvVar13;
}
pvVar13 = (void *)((long)pvVar13 + 7);
pvVar11 = (void *)((long)pvVar11 + 7);
} while (pvVar13 < pvVar12);
if (__src != (void *)0x0) {
*(int8 *)((long)puVar9 + -8) = 0x1483fe;
memcpy(__dest,__src,(long)pvVar11 - (long)__src);
__dest = __dest + ((long)pvVar11 - (long)__src);
}
uVar8 = (ulong)local_40;
puVar10 = local_58;
}
plVar3 = local_48;
uVar14 = (long)__dest - (long)puVar10;
if ((uVar14 & 0xffffffff) == 0) {
if ((char)uVar8 == '\0') {
*(int8 *)((long)puVar9 + -8) = 0x148425;
my_free();
}
uVar6 = 0;
goto LAB_001484d6;
}
iVar7 = (int)((uVar14 & 0xffffffff) * 0x24924925 >> 0x20);
local_3a = (int2)(((uint)((int)uVar14 - iVar7) >> 1) + iVar7 >> 2);
local_80 = 4;
lVar2 = local_48[1];
local_88 = local_3c;
local_78 = puVar10;
local_70 = uVar14 & 0xffffffff;
*(int8 *)((long)puVar9 + -0x10) = 0;
*(int1 **)((long)puVar9 + -0x18) = local_3c;
*(ulong **)((long)puVar9 + -0x20) = local_a8;
*(int8 *)((long)puVar9 + -0x28) = 0x14849e;
cVar5 = translog_write_record(local_60,8,lVar2,plVar3,(int)uVar14 + 4,4);
if ((char)uVar8 == '\0') {
*(int8 *)((long)puVar9 + -8) = 0x1484b1;
my_free(puVar10);
}
uVar6 = 1;
if (cVar5 != '\0') goto LAB_001484d6;
pvVar11 = *(void **)(local_50 + 0x10);
param_1 = local_48;
puVar4 = puVar9;
param_2 = local_50;
}
puVar9 = puVar4;
uVar1 = *(int4 *)(param_2 + 0xac);
*(int8 *)((long)puVar9 + -8) = 0x1484d6;
uVar6 = _ma_bitmap_free_full_pages(param_1,pvVar11,uVar1);
LAB_001484d6:
if (*(long *)(in_FS_OFFSET + 0x28) != local_38) {
/* WARNING: Subroutine does not return */
*(code **)((long)puVar9 + -8) = _ma_read_block_record2;
__stack_chk_fail();
}
return uVar6;
}
|
|
61,862 |
void nlohmann::json_abi_v3_11_3::detail::from_json<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const&, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>::string_t&)
|
hkr04[P]cpp-mcp/common/json.hpp
|
inline void from_json(const BasicJsonType& j, typename BasicJsonType::string_t& s)
{
if (JSON_HEDLEY_UNLIKELY(!j.is_string()))
{
JSON_THROW(type_error::create(302, concat("type must be string, but is ", j.type_name()), &j));
}
s = *j.template get_ptr<const typename BasicJsonType::string_t*>();
}
|
O2
|
cpp
|
void nlohmann::json_abi_v3_11_3::detail::from_json<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const&, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>::string_t&):
pushq %rbp
pushq %r14
pushq %rbx
subq $0x30, %rsp
movq %rdi, %r14
cmpb $0x3, (%rdi)
jne 0xad6f
movq 0x8(%r14), %rax
movq %rsi, %rdi
movq %rax, %rsi
addq $0x30, %rsp
popq %rbx
popq %r14
popq %rbp
jmp 0x5250
pushq $0x20
popq %rdi
callq 0x5220
movq %rax, %rbx
movq %r14, %rdi
callq 0x7c14
leaq 0x8(%rsp), %rdx
movq %rax, (%rdx)
leaq 0x10757(%rip), %rsi # 0x1b4e8
leaq 0x10(%rsp), %rdi
callq 0xadf2
movb $0x1, %bpl
leaq 0x10(%rsp), %rdx
movq %rbx, %rdi
movl $0x12e, %esi # imm = 0x12E
movq %r14, %rcx
callq 0x7ac8
xorl %ebp, %ebp
leaq 0x20ab4(%rip), %rsi # 0x2b870
leaq -0x2b89(%rip), %rdx # 0x823a
movq %rbx, %rdi
callq 0x5730
movq %rax, %r14
leaq 0x10(%rsp), %rdi
callq 0x51d0
testb %bpl, %bpl
jne 0xade2
jmp 0xadea
movq %rax, %r14
movq %rbx, %rdi
callq 0x5330
movq %r14, %rdi
callq 0x5750
|
_ZN8nlohmann16json_abi_v3_11_36detail9from_jsonINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEEEvRKT_RNSG_8string_tE:
push rbp; char
push r14; int
push rbx; int
sub rsp, 30h
mov r14, rdi
cmp byte ptr [rdi], 3
jnz short loc_AD6F
mov rax, [r14+8]
mov rdi, rsi
mov rsi, rax
add rsp, 30h
pop rbx
pop r14
pop rbp
jmp __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_assignERKS4_; std::string::_M_assign(std::string const&)
loc_AD6F:
push 20h ; ' '
pop rdi; thrown_size
call ___cxa_allocate_exception
mov rbx, rax
mov rdi, r14
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE9type_nameEv; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::type_name(void)
lea rdx, [rsp+48h+var_40]
mov [rdx], rax
lea rsi, aTypeMustBeStri; "type must be string, but is "
lea rdi, [rsp+48h+var_38]
call _ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJRA29_KcPS9_EEET_DpOT0_; nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[29],char const*>(char const(&)[29],char const* &&)
mov bpl, 1
lea rdx, [rsp+48h+var_38]
mov rdi, rbx; this
mov esi, 12Eh; int
mov rcx, r14
call _ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_
xor ebp, ebp
lea rsi, _ZTIN8nlohmann16json_abi_v3_11_36detail10type_errorE; lptinfo
lea rdx, _ZN8nlohmann16json_abi_v3_11_36detail9exceptionD2Ev; void (*)(void *)
mov rdi, rbx; void *
call ___cxa_throw
mov r14, rax
lea rdi, [rsp+48h+var_38]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
test bpl, bpl
jnz short loc_ADE2
jmp short loc_ADEA
mov r14, rax
loc_ADE2:
mov rdi, rbx; void *
call ___cxa_free_exception
loc_ADEA:
mov rdi, r14
call __Unwind_Resume
|
long long nlohmann::json_abi_v3_11_3::detail::from_json<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>(
long long a1,
long long a2)
{
nlohmann::json_abi_v3_11_3::detail::type_error *exception; // rbx
_BYTE v4[56]; // [rsp+10h] [rbp-38h] BYREF
if ( *(_BYTE *)a1 != 3 )
{
exception = (nlohmann::json_abi_v3_11_3::detail::type_error *)__cxa_allocate_exception(0x20uLL);
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::type_name((unsigned __int8 *)a1);
nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[29],char const*>(
v4,
"type must be string, but is ");
ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_(
exception,
0x12Eu,
(long long)v4,
a1);
__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);
}
return std::string::_M_assign(a2, *(_QWORD *)(a1 + 8));
}
|
from_json<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>:
PUSH RBP
PUSH R14
PUSH RBX
SUB RSP,0x30
MOV R14,RDI
CMP byte ptr [RDI],0x3
JNZ 0x0010ad6f
MOV RAX,qword ptr [R14 + 0x8]
MOV RDI,RSI
MOV RSI,RAX
ADD RSP,0x30
POP RBX
POP R14
POP RBP
JMP 0x00105250
LAB_0010ad6f:
PUSH 0x20
POP RDI
CALL 0x00105220
MOV RBX,RAX
MOV RDI,R14
CALL 0x00107c14
LEA RDX,[RSP + 0x8]
MOV qword ptr [RDX],RAX
LAB_0010ad8a:
LEA RSI,[0x11b4e8]
LEA RDI,[RSP + 0x10]
CALL 0x0010adf2
MOV BPL,0x1
LAB_0010ad9e:
LEA RDX,[RSP + 0x10]
MOV RDI,RBX
MOV ESI,0x12e
MOV RCX,R14
CALL 0x00107ac8
XOR EBP,EBP
LEA RSI,[0x12b870]
LEA RDX,[0x10823a]
MOV RDI,RBX
CALL 0x00105730
|
/* void
nlohmann::json_abi_v3_11_3::detail::from_json<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,
std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void> >(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,
std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void> const&,
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector,
std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void>::string_t&) */
void nlohmann::json_abi_v3_11_3::detail::
from_json<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>
(basic_json *param_1,string_t *param_2)
{
int8 uVar1;
char *local_40;
detail local_38 [32];
if (*param_1 == (basic_json)0x3) {
std::__cxx11::string::_M_assign((string *)param_2);
return;
}
uVar1 = __cxa_allocate_exception(0x20);
local_40 = (char *)basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::type_name((basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
*)param_1);
/* try { // try from 0010ad8a to 0010ad9a has its CatchHandler @ 0010addf */
concat<std::__cxx11::string,char_const(&)[29],char_const*>
(local_38,"type must be string, but is ",&local_40);
/* try { // try from 0010ad9e to 0010adca has its CatchHandler @ 0010adcb */
_ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_
(uVar1,0x12e,local_38,param_1);
/* WARNING: Subroutine does not return */
__cxa_throw(uVar1,&type_error::typeinfo,exception::~exception);
}
|
|
61,863 |
nglog::(anonymous namespace)::LogFileObject::LogSize()
|
ng-log[P]ng-log/src/logging.cc
|
uint32 LogSize() override {
std::lock_guard<std::mutex> l{mutex_};
return file_length_;
}
|
O1
|
cpp
|
nglog::(anonymous namespace)::LogFileObject::LogSize():
pushq %rbp
pushq %r14
pushq %rbx
movq %rdi, %r14
leaq 0x8(%rdi), %rbx
movq %rbx, %rdi
callq 0x77e0
testl %eax, %eax
jne 0xfb8d
movl 0xac(%r14), %ebp
movq %rbx, %rdi
callq 0x73d0
movl %ebp, %eax
popq %rbx
popq %r14
popq %rbp
retq
movl %eax, %edi
callq 0x7340
|
_ZN5nglog12_GLOBAL__N_113LogFileObject7LogSizeEv:
push rbp
push r14
push rbx
mov r14, rdi
lea rbx, [rdi+8]
mov rdi, rbx
call _pthread_mutex_lock
test eax, eax
jnz short loc_FB8D
mov ebp, [r14+0ACh]
mov rdi, rbx
call _pthread_mutex_unlock
mov eax, ebp
pop rbx
pop r14
pop rbp
retn
loc_FB8D:
mov edi, eax; int
call __ZSt20__throw_system_errori; std::__throw_system_error(int)
|
long long nglog::`anonymous namespace'::LogFileObject::LogSize(
nglog::_anonymous_namespace_::LogFileObject *this)
{
int v1; // eax
unsigned int v2; // ebp
v1 = pthread_mutex_lock((char *)this + 8);
if ( v1 )
std::__throw_system_error(v1);
v2 = *((_DWORD *)this + 43);
pthread_mutex_unlock((char *)this + 8);
return v2;
}
|
LogSize:
PUSH RBP
PUSH R14
PUSH RBX
MOV R14,RDI
LEA RBX,[RDI + 0x8]
MOV RDI,RBX
CALL 0x001077e0
TEST EAX,EAX
JNZ 0x0010fb8d
MOV EBP,dword ptr [R14 + 0xac]
MOV RDI,RBX
CALL 0x001073d0
MOV EAX,EBP
POP RBX
POP R14
POP RBP
RET
LAB_0010fb8d:
MOV EDI,EAX
CALL 0x00107340
|
/* nglog::(anonymous namespace)::LogFileObject::LogSize() */
int4 __thiscall nglog::(anonymous_namespace)::LogFileObject::LogSize(LogFileObject *this)
{
int4 uVar1;
int iVar2;
iVar2 = pthread_mutex_lock((pthread_mutex_t *)(this + 8));
if (iVar2 == 0) {
uVar1 = *(int4 *)(this + 0xac);
pthread_mutex_unlock((pthread_mutex_t *)(this + 8));
return uVar1;
}
/* WARNING: Subroutine does not return */
std::__throw_system_error(iVar2);
}
|
|
61,864 |
testing::internal::UnitTestImpl::ConfigureXmlOutput()
|
AlayaLite/build_O0/_deps/googletest-src/googletest/src/gtest.cc
|
void UnitTestImpl::ConfigureXmlOutput() {
const std::string& output_format = UnitTestOptions::GetOutputFormat();
#if GTEST_HAS_FILE_SYSTEM
if (output_format == "xml") {
listeners()->SetDefaultXmlGenerator(new XmlUnitTestResultPrinter(
UnitTestOptions::GetAbsolutePathToOutputFile().c_str()));
} else if (output_format == "json") {
listeners()->SetDefaultXmlGenerator(new JsonUnitTestResultPrinter(
UnitTestOptions::GetAbsolutePathToOutputFile().c_str()));
} else if (!output_format.empty()) {
GTEST_LOG_(WARNING) << "WARNING: unrecognized output format \""
<< output_format << "\" ignored.";
}
#else
if (!output_format.empty()) {
GTEST_LOG_(ERROR) << "ERROR: alternative output formats require "
<< "GTEST_HAS_FILE_SYSTEM to be enabled";
}
#endif // GTEST_HAS_FILE_SYSTEM
}
|
O0
|
cpp
|
testing::internal::UnitTestImpl::ConfigureXmlOutput():
subq $0xe8, %rsp
movq %rdi, 0xe0(%rsp)
movq 0xe0(%rsp), %rax
movq %rax, 0x40(%rsp)
leaq 0xb8(%rsp), %rdi
movq %rdi, 0x48(%rsp)
callq 0xbdfa0
movq 0x48(%rsp), %rax
movq %rax, 0xd8(%rsp)
movq 0xd8(%rsp), %rdi
leaq 0x39a1b(%rip), %rsi # 0x113fe5
callq 0x307e0
movb %al, 0x57(%rsp)
jmp 0xda5d5
movb 0x57(%rsp), %al
testb $0x1, %al
jne 0xda5e2
jmp 0xda6d2
movq 0x40(%rsp), %rdi
callq 0xe2d50
movq %rax, 0x38(%rsp)
jmp 0xda5f3
movl $0x28, %edi
callq 0x146c0
movq %rax, 0x30(%rsp)
jmp 0xda604
movb $0x1, 0x87(%rsp)
leaq 0x88(%rsp), %rdi
callq 0xbe120
jmp 0xda61b
leaq 0x88(%rsp), %rdi
callq 0x1acc0
movq 0x30(%rsp), %rdi
movq %rax, %rsi
callq 0xcae80
jmp 0xda637
movq 0x30(%rsp), %rsi
movq 0x38(%rsp), %rdi
movb $0x0, 0x87(%rsp)
callq 0xd8eb0
jmp 0xda650
leaq 0x88(%rsp), %rdi
callq 0x1aac0
jmp 0xda870
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xb0(%rsp)
movl %eax, 0xac(%rsp)
jmp 0xda885
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xb0(%rsp)
movl %eax, 0xac(%rsp)
jmp 0xda6b2
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xb0(%rsp)
movl %eax, 0xac(%rsp)
leaq 0x88(%rsp), %rdi
callq 0x1aac0
testb $0x1, 0x87(%rsp)
jne 0xda6be
jmp 0xda6cd
movq 0x30(%rsp), %rdi
movl $0x28, %esi
callq 0x146e0
jmp 0xda885
movq 0xd8(%rsp), %rdi
leaq 0x39908(%rip), %rsi # 0x113fe9
callq 0x307e0
movb %al, 0x2f(%rsp)
jmp 0xda6ec
movb 0x2f(%rsp), %al
testb $0x1, %al
jne 0xda6f9
jmp 0xda7bb
movq 0x40(%rsp), %rdi
callq 0xe2d50
movq %rax, 0x20(%rsp)
jmp 0xda70a
movl $0x28, %edi
callq 0x146c0
movq %rax, 0x18(%rsp)
jmp 0xda71b
movb $0x1, 0x5f(%rsp)
leaq 0x60(%rsp), %rdi
callq 0xbe120
jmp 0xda72c
leaq 0x60(%rsp), %rdi
callq 0x1acc0
movq 0x18(%rsp), %rdi
movq %rax, %rsi
callq 0xd1bb0
jmp 0xda745
movq 0x18(%rsp), %rsi
movq 0x20(%rsp), %rdi
movb $0x0, 0x5f(%rsp)
callq 0xd8eb0
jmp 0xda75b
leaq 0x60(%rsp), %rdi
callq 0x1aac0
jmp 0xda86e
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xb0(%rsp)
movl %eax, 0xac(%rsp)
jmp 0xda79e
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xb0(%rsp)
movl %eax, 0xac(%rsp)
leaq 0x60(%rsp), %rdi
callq 0x1aac0
testb $0x1, 0x5f(%rsp)
jne 0xda7a7
jmp 0xda7b6
movq 0x18(%rsp), %rdi
movl $0x28, %esi
callq 0x146e0
jmp 0xda885
movq 0xd8(%rsp), %rdi
callq 0x39260
testb $0x1, %al
jne 0xda86c
leaq 0x386cf(%rip), %rdx # 0x112ea6
leaq 0x58(%rsp), %rdi
movl $0x1, %esi
movl $0x1644, %ecx # imm = 0x1644
callq 0xb9070
jmp 0xda7ed
leaq 0x58(%rsp), %rdi
callq 0x1ea10
movq %rax, 0x10(%rsp)
jmp 0xda7fe
movq 0x10(%rsp), %rdi
leaq 0x397e4(%rip), %rsi # 0x113fee
callq 0x146a0
movq %rax, 0x8(%rsp)
jmp 0xda816
movq 0x8(%rsp), %rdi
movq 0xd8(%rsp), %rsi
callq 0x145e0
movq %rax, (%rsp)
jmp 0xda82e
movq (%rsp), %rdi
leaq 0x397db(%rip), %rsi # 0x114014
callq 0x146a0
jmp 0xda840
leaq 0x58(%rsp), %rdi
callq 0xb91e0
jmp 0xda86c
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xb0(%rsp)
movl %eax, 0xac(%rsp)
leaq 0x58(%rsp), %rdi
callq 0xb91e0
jmp 0xda885
jmp 0xda86e
jmp 0xda870
leaq 0xb8(%rsp), %rdi
callq 0x1aac0
addq $0xe8, %rsp
retq
leaq 0xb8(%rsp), %rdi
callq 0x1aac0
movq 0xb0(%rsp), %rdi
callq 0x14c80
nop
|
_ZN7testing8internal12UnitTestImpl18ConfigureXmlOutputEv:
sub rsp, 0E8h
mov [rsp+0E8h+var_8], rdi
mov rax, [rsp+0E8h+var_8]
mov [rsp+0E8h+var_A8], rax; __int64
lea rdi, [rsp+0E8h+var_30]
mov qword ptr [rsp+0E8h+var_A0], rdi; char
call _ZN7testing8internal15UnitTestOptions15GetOutputFormatB5cxx11Ev; testing::internal::UnitTestOptions::GetOutputFormat(void)
mov rax, qword ptr [rsp+0E8h+var_A0]
mov [rsp+0E8h+var_10], rax
mov rdi, [rsp+0E8h+var_10]
lea rsi, aXml_0; "xml"
call _ZSteqIcSt11char_traitsIcESaIcEEbRKNSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_; std::operator==<char>(std::string const&,char const*)
mov [rsp+0E8h+var_91], al
jmp short $+2
loc_DA5D5:
mov al, [rsp+0E8h+var_91]
test al, 1
jnz short loc_DA5E2
jmp loc_DA6D2
loc_DA5E2:
mov rdi, [rsp+0E8h+var_A8]; this
call _ZN7testing8internal12UnitTestImpl9listenersEv; testing::internal::UnitTestImpl::listeners(void)
mov [rsp+0E8h+var_B0], rax
jmp short $+2
loc_DA5F3:
mov edi, 28h ; '('; unsigned __int64
call __Znwm; operator new(ulong)
mov [rsp+0E8h+var_B8], rax
jmp short $+2
loc_DA604:
mov [rsp+0E8h+var_61], 1
lea rdi, [rsp+0E8h+var_60]
call _ZN7testing8internal15UnitTestOptions27GetAbsolutePathToOutputFileB5cxx11Ev; testing::internal::UnitTestOptions::GetAbsolutePathToOutputFile(void)
jmp short $+2
loc_DA61B:
lea rdi, [rsp+0E8h+var_60]
call _ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5c_strEv; std::string::c_str(void)
mov rdi, [rsp+0E8h+var_B8]; this
mov rsi, rax; char *
call _ZN7testing8internal24XmlUnitTestResultPrinterC2EPKc; testing::internal::XmlUnitTestResultPrinter::XmlUnitTestResultPrinter(char const*)
jmp short $+2
loc_DA637:
mov rsi, [rsp+0E8h+var_B8]; testing::TestEventListener *
mov rdi, [rsp+0E8h+var_B0]; this
mov [rsp+0E8h+var_61], 0
call _ZN7testing18TestEventListeners22SetDefaultXmlGeneratorEPNS_17TestEventListenerE; testing::TestEventListeners::SetDefaultXmlGenerator(testing::TestEventListener *)
jmp short $+2
loc_DA650:
lea rdi, [rsp+0E8h+var_60]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
jmp loc_DA870
mov rcx, rax
mov eax, edx
mov [rsp+arg_A8], rcx
mov [rsp+arg_A4], eax
jmp loc_DA885
mov rcx, rax
mov eax, edx
mov [rsp+arg_A8], rcx
mov [rsp+arg_A4], eax
jmp short loc_DA6B2
mov rcx, rax
mov eax, edx
mov [rsp+arg_A8], rcx
mov [rsp+arg_A4], eax
lea rdi, [rsp+arg_80]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
loc_DA6B2:
test [rsp+arg_7F], 1
jnz short loc_DA6BE
jmp short loc_DA6CD
loc_DA6BE:
mov rdi, [rsp+arg_28]; void *
mov esi, 28h ; '('; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_DA6CD:
jmp loc_DA885
loc_DA6D2:
mov rdi, [rsp+0E8h+var_10]
lea rsi, aJson; "json"
call _ZSteqIcSt11char_traitsIcESaIcEEbRKNSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_; std::operator==<char>(std::string const&,char const*)
mov [rsp+0E8h+var_B9], al
jmp short $+2
loc_DA6EC:
mov al, [rsp+0E8h+var_B9]
test al, 1
jnz short loc_DA6F9
jmp loc_DA7BB
loc_DA6F9:
mov rdi, [rsp+0E8h+var_A8]; this
call _ZN7testing8internal12UnitTestImpl9listenersEv; testing::internal::UnitTestImpl::listeners(void)
mov [rsp+0E8h+var_C8], rax
jmp short $+2
loc_DA70A:
mov edi, 28h ; '('; unsigned __int64
call __Znwm; operator new(ulong)
mov [rsp+0E8h+var_D0], rax
jmp short $+2
loc_DA71B:
mov [rsp+0E8h+var_89], 1
lea rdi, [rsp+0E8h+var_88]
call _ZN7testing8internal15UnitTestOptions27GetAbsolutePathToOutputFileB5cxx11Ev; testing::internal::UnitTestOptions::GetAbsolutePathToOutputFile(void)
jmp short $+2
loc_DA72C:
lea rdi, [rsp+0E8h+var_88]
call _ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5c_strEv; std::string::c_str(void)
mov rdi, [rsp+0E8h+var_D0]; this
mov rsi, rax; char *
call _ZN7testing8internal25JsonUnitTestResultPrinterC2EPKc; testing::internal::JsonUnitTestResultPrinter::JsonUnitTestResultPrinter(char const*)
jmp short $+2
loc_DA745:
mov rsi, [rsp+0E8h+var_D0]; testing::TestEventListener *
mov rdi, [rsp+0E8h+var_C8]; this
mov [rsp+0E8h+var_89], 0
call _ZN7testing18TestEventListeners22SetDefaultXmlGeneratorEPNS_17TestEventListenerE; testing::TestEventListeners::SetDefaultXmlGenerator(testing::TestEventListener *)
jmp short $+2
loc_DA75B:
lea rdi, [rsp+0E8h+var_88]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
jmp loc_DA86E
mov rcx, rax
mov eax, edx
mov [rsp+arg_A8], rcx
mov [rsp+arg_A4], eax
jmp short loc_DA79E
mov rcx, rax
mov eax, edx
mov [rsp+arg_A8], rcx
mov [rsp+arg_A4], eax
lea rdi, [rsp+arg_58]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
loc_DA79E:
test [rsp+arg_57], 1
jnz short loc_DA7A7
jmp short loc_DA7B6
loc_DA7A7:
mov rdi, [rsp+arg_10]; void *
mov esi, 28h ; '('; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_DA7B6:
jmp loc_DA885
loc_DA7BB:
mov rdi, [rsp+0E8h+var_10]
call _ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5emptyEv; std::string::empty(void)
test al, 1
jnz loc_DA86C
lea rdx, aWorkspaceLlm4b_9; "/workspace/llm4binary/github2025/AlayaL"...
lea rdi, [rsp+0E8h+var_90]; int
mov esi, 1
mov ecx, 1644h
call _ZN7testing8internal8GTestLogC2ENS0_16GTestLogSeverityEPKci; testing::internal::GTestLog::GTestLog(testing::internal::GTestLogSeverity,char const*,int)
jmp short $+2
loc_DA7ED:
lea rdi, [rsp+0E8h+var_90]; this
call _ZN7testing8internal8GTestLog9GetStreamEv; testing::internal::GTestLog::GetStream(void)
mov [rsp+0E8h+var_D8], rax
jmp short $+2
loc_DA7FE:
mov rdi, [rsp+0E8h+var_D8]
lea rsi, aWarningUnrecog; "WARNING: unrecognized output format \""
call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*)
mov [rsp+0E8h+var_E0], rax
jmp short $+2
loc_DA816:
mov rdi, [rsp+0E8h+var_E0]
mov rsi, [rsp+0E8h+var_10]
call __ZStlsIcSt11char_traitsIcESaIcEERSt13basic_ostreamIT_T0_ES7_RKNSt7__cxx1112basic_stringIS4_S5_T1_EE; std::operator<<<char>(std::ostream &,std::string const&)
mov [rsp+0E8h+var_E8], rax
jmp short $+2
loc_DA82E:
mov rdi, [rsp+0E8h+var_E8]
lea rsi, aIgnored; "\" ignored."
call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*)
jmp short $+2
loc_DA840:
lea rdi, [rsp+0E8h+var_90]; this
call _ZN7testing8internal8GTestLogD2Ev; testing::internal::GTestLog::~GTestLog()
jmp short loc_DA86C
mov rcx, rax
mov eax, edx
mov [rsp+arg_A8], rcx
mov [rsp+arg_A4], eax
lea rdi, [rsp+arg_50]; this
call _ZN7testing8internal8GTestLogD2Ev; testing::internal::GTestLog::~GTestLog()
jmp short loc_DA885
loc_DA86C:
jmp short $+2
loc_DA86E:
jmp short $+2
loc_DA870:
lea rdi, [rsp+0E8h+var_30]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
add rsp, 0E8h
retn
loc_DA885:
lea rdi, [rsp+arg_B0]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
mov rdi, [rsp+arg_A8]
call __Unwind_Resume
|
void testing::internal::UnitTestImpl::ConfigureXmlOutput(testing::internal::UnitTestImpl *this)
{
const char *v1; // rax
const char *v2; // rax
long long v3; // [rsp+0h] [rbp-E8h]
long long v4; // [rsp+8h] [rbp-E0h]
void *Stream; // [rsp+10h] [rbp-D8h]
testing::TestEventListener *v6; // [rsp+18h] [rbp-D0h]
testing::TestEventListeners *v7; // [rsp+20h] [rbp-C8h]
testing::internal::XmlUnitTestResultPrinter *v8; // [rsp+30h] [rbp-B8h]
testing::TestEventListeners *v9; // [rsp+38h] [rbp-B0h]
int v10; // [rsp+58h] [rbp-90h] BYREF
char v11; // [rsp+5Fh] [rbp-89h]
_QWORD v12[4]; // [rsp+60h] [rbp-88h] BYREF
char v13; // [rsp+87h] [rbp-61h]
_QWORD v14[6]; // [rsp+88h] [rbp-60h] BYREF
_QWORD v15[4]; // [rsp+B8h] [rbp-30h] BYREF
char *v16; // [rsp+D8h] [rbp-10h]
long long v17; // [rsp+E0h] [rbp-8h]
v17 = (long long)this;
testing::internal::UnitTestOptions::GetOutputFormat[abi:cxx11](v15);
v16 = (char *)v15;
if ( std::operator==<char>((long long)v15, (long long)"xml") )
{
v9 = (testing::TestEventListeners *)testing::internal::UnitTestImpl::listeners(this);
v8 = (testing::internal::XmlUnitTestResultPrinter *)operator new(0x28uLL);
testing::internal::UnitTestOptions::GetAbsolutePathToOutputFile[abi:cxx11](v14);
v1 = (const char *)std::string::c_str((long long)v14);
testing::internal::XmlUnitTestResultPrinter::XmlUnitTestResultPrinter(v8, v1);
v13 = 0;
testing::TestEventListeners::SetDefaultXmlGenerator(v9, v8);
std::string::~string(v14);
}
else if ( std::operator==<char>((long long)v16, (long long)"json") )
{
v7 = (testing::TestEventListeners *)testing::internal::UnitTestImpl::listeners(this);
v6 = (testing::TestEventListener *)operator new(0x28uLL);
testing::internal::UnitTestOptions::GetAbsolutePathToOutputFile[abi:cxx11](v12);
v2 = (const char *)std::string::c_str((long long)v12);
testing::internal::JsonUnitTestResultPrinter::JsonUnitTestResultPrinter(v6, v2);
v11 = 0;
testing::TestEventListeners::SetDefaultXmlGenerator(v7, v6);
std::string::~string(v12);
}
else if ( !std::string::empty((long long)v16) )
{
testing::internal::GTestLog::GTestLog(
(testing::internal::GTestLog *)&v10,
1,
(long long)"/workspace/llm4binary/github2025/AlayaLite/build_O0/_deps/googletest-src/googletest/src/gtest.cc",
5700);
Stream = testing::internal::GTestLog::GetStream((testing::internal::GTestLog *)&v10);
v4 = std::operator<<<std::char_traits<char>>(Stream, "WARNING: unrecognized output format \"");
v3 = std::operator<<<char>(v4, v16);
std::operator<<<std::char_traits<char>>(v3, "\" ignored.");
testing::internal::GTestLog::~GTestLog((testing::internal::GTestLog *)&v10);
}
std::string::~string(v15);
}
|
ConfigureXmlOutput:
SUB RSP,0xe8
MOV qword ptr [RSP + 0xe0],RDI
MOV RAX,qword ptr [RSP + 0xe0]
MOV qword ptr [RSP + 0x40],RAX
LEA RDI,[RSP + 0xb8]
MOV qword ptr [RSP + 0x48],RDI
CALL 0x001bdfa0
MOV RAX,qword ptr [RSP + 0x48]
MOV qword ptr [RSP + 0xd8],RAX
MOV RDI,qword ptr [RSP + 0xd8]
LAB_001da5c3:
LEA RSI,[0x213fe5]
CALL 0x001307e0
MOV byte ptr [RSP + 0x57],AL
JMP 0x001da5d5
LAB_001da5d5:
MOV AL,byte ptr [RSP + 0x57]
TEST AL,0x1
JNZ 0x001da5e2
JMP 0x001da6d2
LAB_001da5e2:
MOV RDI,qword ptr [RSP + 0x40]
CALL 0x001e2d50
MOV qword ptr [RSP + 0x38],RAX
JMP 0x001da5f3
LAB_001da5f3:
MOV EDI,0x28
CALL 0x001146c0
MOV qword ptr [RSP + 0x30],RAX
JMP 0x001da604
LAB_001da604:
MOV byte ptr [RSP + 0x87],0x1
LAB_001da60c:
LEA RDI,[RSP + 0x88]
CALL 0x001be120
JMP 0x001da61b
LAB_001da61b:
LEA RDI,[RSP + 0x88]
CALL 0x0011acc0
MOV RDI,qword ptr [RSP + 0x30]
MOV RSI,RAX
LAB_001da630:
CALL 0x001cae80
JMP 0x001da637
LAB_001da637:
MOV RSI,qword ptr [RSP + 0x30]
MOV RDI,qword ptr [RSP + 0x38]
MOV byte ptr [RSP + 0x87],0x0
CALL 0x001d8eb0
JMP 0x001da650
LAB_001da650:
LEA RDI,[RSP + 0x88]
CALL 0x0011aac0
JMP 0x001da870
LAB_001da6d2:
MOV RDI,qword ptr [RSP + 0xd8]
LAB_001da6da:
LEA RSI,[0x213fe9]
CALL 0x001307e0
MOV byte ptr [RSP + 0x2f],AL
JMP 0x001da6ec
LAB_001da6ec:
MOV AL,byte ptr [RSP + 0x2f]
TEST AL,0x1
JNZ 0x001da6f9
JMP 0x001da7bb
LAB_001da6f9:
MOV RDI,qword ptr [RSP + 0x40]
CALL 0x001e2d50
MOV qword ptr [RSP + 0x20],RAX
JMP 0x001da70a
LAB_001da70a:
MOV EDI,0x28
CALL 0x001146c0
MOV qword ptr [RSP + 0x18],RAX
JMP 0x001da71b
LAB_001da71b:
MOV byte ptr [RSP + 0x5f],0x1
LAB_001da720:
LEA RDI,[RSP + 0x60]
CALL 0x001be120
JMP 0x001da72c
LAB_001da72c:
LEA RDI,[RSP + 0x60]
CALL 0x0011acc0
MOV RDI,qword ptr [RSP + 0x18]
MOV RSI,RAX
LAB_001da73e:
CALL 0x001d1bb0
JMP 0x001da745
LAB_001da745:
MOV RSI,qword ptr [RSP + 0x18]
MOV RDI,qword ptr [RSP + 0x20]
MOV byte ptr [RSP + 0x5f],0x0
CALL 0x001d8eb0
JMP 0x001da75b
LAB_001da75b:
LEA RDI,[RSP + 0x60]
CALL 0x0011aac0
JMP 0x001da86e
LAB_001da7bb:
MOV RDI,qword ptr [RSP + 0xd8]
CALL 0x00139260
TEST AL,0x1
JNZ 0x001da86c
LAB_001da7d0:
LEA RDX,[0x212ea6]
LEA RDI,[RSP + 0x58]
MOV ESI,0x1
MOV ECX,0x1644
CALL 0x001b9070
JMP 0x001da7ed
LAB_001da7ed:
LEA RDI,[RSP + 0x58]
CALL 0x0011ea10
MOV qword ptr [RSP + 0x10],RAX
JMP 0x001da7fe
LAB_001da7fe:
MOV RDI,qword ptr [RSP + 0x10]
LEA RSI,[0x213fee]
CALL 0x001146a0
MOV qword ptr [RSP + 0x8],RAX
JMP 0x001da816
LAB_001da816:
MOV RDI,qword ptr [RSP + 0x8]
MOV RSI,qword ptr [RSP + 0xd8]
CALL 0x001145e0
MOV qword ptr [RSP],RAX
JMP 0x001da82e
LAB_001da82e:
MOV RDI,qword ptr [RSP]
LEA RSI,[0x214014]
CALL 0x001146a0
LAB_001da83e:
JMP 0x001da840
LAB_001da840:
LEA RDI,[RSP + 0x58]
CALL 0x001b91e0
JMP 0x001da86c
LAB_001da86c:
JMP 0x001da86e
LAB_001da86e:
JMP 0x001da870
LAB_001da870:
LEA RDI,[RSP + 0xb8]
CALL 0x0011aac0
ADD RSP,0xe8
RET
|
/* testing::internal::UnitTestImpl::ConfigureXmlOutput() */
void __thiscall testing::internal::UnitTestImpl::ConfigureXmlOutput(UnitTestImpl *this)
{
bool bVar1;
XmlUnitTestResultPrinter *this_00;
TestEventListeners *pTVar2;
JsonUnitTestResultPrinter *this_01;
char *pcVar3;
ulong uVar4;
ostream *poVar5;
GTestLog local_90 [7];
int1 local_89;
UnitTestOptions local_88 [39];
int1 local_61;
UnitTestOptions local_60 [48];
UnitTestOptions local_30 [32];
string *local_10;
UnitTestImpl *local_8;
local_8 = this;
UnitTestOptions::GetOutputFormat_abi_cxx11_(local_30);
local_10 = (string *)local_30;
/* try { // try from 001da5c3 to 001da5fc has its CatchHandler @ 001da662 */
bVar1 = std::operator==((string *)local_30,"xml");
if (bVar1) {
pTVar2 = (TestEventListeners *)listeners(this);
this_00 = (XmlUnitTestResultPrinter *)operator_new(0x28);
local_61 = 1;
/* try { // try from 001da60c to 001da618 has its CatchHandler @ 001da67b */
UnitTestOptions::GetAbsolutePathToOutputFile_abi_cxx11_(local_60);
pcVar3 = (char *)std::__cxx11::string::c_str((string *)local_60);
/* try { // try from 001da630 to 001da64d has its CatchHandler @ 001da691 */
XmlUnitTestResultPrinter::XmlUnitTestResultPrinter(this_00,pcVar3);
local_61 = 0;
TestEventListeners::SetDefaultXmlGenerator(pTVar2,(TestEventListener *)this_00);
std::__cxx11::string::~string((string *)local_60);
}
else {
/* try { // try from 001da6da to 001da713 has its CatchHandler @ 001da662 */
bVar1 = std::operator==(local_10,"json");
if (bVar1) {
pTVar2 = (TestEventListeners *)listeners(this);
this_01 = (JsonUnitTestResultPrinter *)operator_new(0x28);
local_89 = 1;
/* try { // try from 001da720 to 001da729 has its CatchHandler @ 001da76a */
UnitTestOptions::GetAbsolutePathToOutputFile_abi_cxx11_(local_88);
pcVar3 = (char *)std::__cxx11::string::c_str((string *)local_88);
/* try { // try from 001da73e to 001da758 has its CatchHandler @ 001da780 */
JsonUnitTestResultPrinter::JsonUnitTestResultPrinter(this_01,pcVar3);
local_89 = 0;
TestEventListeners::SetDefaultXmlGenerator(pTVar2,(TestEventListener *)this_01);
std::__cxx11::string::~string((string *)local_88);
}
else {
uVar4 = std::__cxx11::string::empty(local_10);
if ((uVar4 & 1) == 0) {
/* try { // try from 001da7d0 to 001da7ea has its CatchHandler @ 001da662 */
GTestLog::GTestLog(local_90,1,
"/workspace/llm4binary/github2025/AlayaLite/build_O0/_deps/googletest-src/googletest/src/gtest.cc"
,0x1644);
/* try { // try from 001da7ed to 001da83d has its CatchHandler @ 001da84c */
poVar5 = (ostream *)GTestLog::GetStream();
poVar5 = std::operator<<(poVar5,"WARNING: unrecognized output format \"");
poVar5 = std::operator<<(poVar5,local_10);
std::operator<<(poVar5,"\" ignored.");
GTestLog::~GTestLog(local_90);
}
}
}
std::__cxx11::string::~string((string *)local_30);
return;
}
|
|
61,865 |
SafeQueue<std::shared_ptr<cv::Mat>>::dequeue_latest()
|
Depths-CPP/src/camera_depth_estimation.cpp
|
std::optional<T> dequeue_latest() {
std::unique_lock<std::mutex> lock(mutex_);
if (queue_.empty())
return std::nullopt;
// Directly get the last item without popping everything
T result = std::move(queue_.back());
// Clear the queue
std::queue<T> empty;
std::swap(queue_, empty);
return result;
}
|
O3
|
cpp
|
SafeQueue<std::shared_ptr<cv::Mat>>::dequeue_latest():
pushq %r15
pushq %r14
pushq %rbx
subq $0x80, %rsp
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x50(%rsi), %rax
leaq 0x10(%rsp), %r15
movq %rax, (%r15)
movb $0x0, 0x8(%r15)
movq %r15, %rdi
callq 0xf128
movb $0x1, 0x8(%r15)
movq 0x30(%r14), %rax
cmpq 0x10(%r14), %rax
je 0xfde1
cmpq 0x38(%r14), %rax
jne 0xfd47
movq 0x48(%r14), %rcx
movl $0x200, %eax # imm = 0x200
addq -0x8(%rcx), %rax
vmovups -0x10(%rax), %xmm0
vmovaps %xmm0, (%rsp)
vxorps %xmm0, %xmm0, %xmm0
vmovups %xmm0, -0x10(%rax)
vxorps %xmm0, %xmm0, %xmm0
leaq 0x30(%rsp), %rdi
vmovups %ymm0, 0x30(%rdi)
vmovups %ymm0, 0x20(%rdi)
vmovups %ymm0, (%rdi)
xorl %esi, %esi
vzeroupper
callq 0xef7c
vmovups (%r14), %xmm0
vmovaps %xmm0, 0x20(%rsp)
vmovups 0x10(%r14), %ymm0
vmovups 0x30(%r14), %ymm1
leaq 0x30(%rsp), %rdi
vmovups (%rdi), %ymm2
vmovups 0x20(%rdi), %ymm3
vmovups 0x30(%rdi), %ymm4
vmovups %ymm4, 0x30(%r14)
vmovups %ymm3, 0x20(%r14)
vmovups %ymm2, (%r14)
vmovaps 0x20(%rsp), %xmm2
vmovaps %xmm2, (%rdi)
vmovups %ymm0, 0x10(%rdi)
vmovups %ymm1, 0x30(%rdi)
vmovaps (%rsp), %xmm0
vmovups %xmm0, (%rbx)
movb $0x1, 0x10(%rbx)
vzeroupper
callq 0xd754
jmp 0xfde5
movb $0x0, 0x10(%rbx)
leaq 0x10(%rsp), %rdi
callq 0xf112
movq %rbx, %rax
addq $0x80, %rsp
popq %rbx
popq %r14
popq %r15
retq
movq %rax, %rbx
vmovdqa (%rsp), %xmm0
vpextrq $0x1, %xmm0, %rdi
testq %rdi, %rdi
je 0xfe17
callq 0xd8aa
leaq 0x10(%rsp), %rdi
callq 0xf112
movq %rbx, %rdi
callq 0x73a0
nop
|
_ZN9SafeQueueISt10shared_ptrIN2cv3MatEEE14dequeue_latestEv:
push r15
push r14
push rbx
sub rsp, 80h
mov r14, rsi
mov rbx, rdi
lea rax, [rsi+50h]
lea r15, [rsp+98h+var_88]
mov [r15], rax
mov byte ptr [r15+8], 0
mov rdi, r15
call _ZNSt11unique_lockISt5mutexE4lockEv; std::unique_lock<std::mutex>::lock(void)
mov byte ptr [r15+8], 1
mov rax, [r14+30h]
cmp rax, [r14+10h]
jz loc_FDE1
cmp rax, [r14+38h]
jnz short loc_FD47
mov rcx, [r14+48h]
mov eax, 200h
add rax, [rcx-8]
loc_FD47:
vmovups xmm0, xmmword ptr [rax-10h]
vmovaps [rsp+98h+var_98], xmm0
vxorps xmm0, xmm0, xmm0
vmovups xmmword ptr [rax-10h], xmm0
vxorps xmm0, xmm0, xmm0
lea rdi, [rsp+98h+var_68]
vmovups ymmword ptr [rdi+30h], ymm0
vmovups ymmword ptr [rdi+20h], ymm0
vmovups ymmword ptr [rdi], ymm0
xor esi, esi
vzeroupper
call _ZNSt11_Deque_baseISt10shared_ptrIN2cv3MatEESaIS3_EE17_M_initialize_mapEm; std::_Deque_base<std::shared_ptr<cv::Mat>>::_M_initialize_map(ulong)
vmovups xmm0, xmmword ptr [r14]
vmovaps [rsp+98h+var_78], xmm0
vmovups ymm0, ymmword ptr [r14+10h]
vmovups ymm1, ymmword ptr [r14+30h]
lea rdi, [rsp+98h+var_68]
vmovups ymm2, ymmword ptr [rdi]
vmovups ymm3, ymmword ptr [rdi+20h]
vmovups ymm4, ymmword ptr [rdi+30h]
vmovups ymmword ptr [r14+30h], ymm4
vmovups ymmword ptr [r14+20h], ymm3
vmovups ymmword ptr [r14], ymm2
vmovaps xmm2, [rsp+98h+var_78]
vmovaps xmmword ptr [rdi], xmm2
vmovups ymmword ptr [rdi+10h], ymm0
vmovups ymmword ptr [rdi+30h], ymm1
vmovaps xmm0, [rsp+98h+var_98]
vmovups xmmword ptr [rbx], xmm0
mov byte ptr [rbx+10h], 1
vzeroupper
call _ZNSt5dequeISt10shared_ptrIN2cv3MatEESaIS3_EED2Ev; std::deque<std::shared_ptr<cv::Mat>>::~deque()
jmp short loc_FDE5
loc_FDE1:
mov byte ptr [rbx+10h], 0
loc_FDE5:
lea rdi, [rsp+98h+var_88]
call _ZNSt11unique_lockISt5mutexED2Ev; std::unique_lock<std::mutex>::~unique_lock()
mov rax, rbx
add rsp, 80h
pop rbx
pop r14
pop r15
retn
mov rbx, rax
vmovdqa xmm0, xmmword ptr [rsp+0]
vpextrq rdi, xmm0, 1
test rdi, rdi
jz short loc_FE17
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_FE17:
lea rdi, [rsp+arg_8]
call _ZNSt11unique_lockISt5mutexED2Ev; std::unique_lock<std::mutex>::~unique_lock()
mov rdi, rbx
call __Unwind_Resume
|
long long SafeQueue<std::shared_ptr<cv::Mat>>::dequeue_latest(long long a1, _QWORD *a2)
{
_QWORD *v21; // [rsp+10h] [rbp-88h] BYREF
char v22; // [rsp+18h] [rbp-80h]
long long v24[13]; // [rsp+30h] [rbp-68h] BYREF
_R14 = a2;
_RBX = a1;
v21 = a2 + 10;
v22 = 0;
std::unique_lock<std::mutex>::lock((long long)&v21);
v22 = 1;
_RAX = a2[6];
if ( _RAX == a2[2] )
{
*(_BYTE *)(a1 + 16) = 0;
}
else
{
if ( _RAX == a2[7] )
_RAX = *(_QWORD *)(a2[9] - 8LL) + 512LL;
__asm
{
vmovups xmm0, xmmword ptr [rax-10h]
vmovaps [rsp+98h+var_98], xmm0
vxorps xmm0, xmm0, xmm0
vmovups xmmword ptr [rax-10h], xmm0
vxorps xmm0, xmm0, xmm0
}
_RDI = v24;
__asm
{
vmovups ymmword ptr [rdi+30h], ymm0
vmovups ymmword ptr [rdi+20h], ymm0
vmovups ymmword ptr [rdi], ymm0
vzeroupper
}
std::_Deque_base<std::shared_ptr<cv::Mat>>::_M_initialize_map(v24, 0LL);
__asm
{
vmovups xmm0, xmmword ptr [r14]
vmovaps [rsp+98h+var_78], xmm0
vmovups ymm0, ymmword ptr [r14+10h]
vmovups ymm1, ymmword ptr [r14+30h]
}
_RDI = v24;
__asm
{
vmovups ymm2, ymmword ptr [rdi]
vmovups ymm3, ymmword ptr [rdi+20h]
vmovups ymm4, ymmword ptr [rdi+30h]
vmovups ymmword ptr [r14+30h], ymm4
vmovups ymmword ptr [r14+20h], ymm3
vmovups ymmword ptr [r14], ymm2
vmovaps xmm2, [rsp+98h+var_78]
vmovaps xmmword ptr [rdi], xmm2
vmovups ymmword ptr [rdi+10h], ymm0
vmovups ymmword ptr [rdi+30h], ymm1
vmovaps xmm0, [rsp+98h+var_98]
vmovups xmmword ptr [rbx], xmm0
}
*(_BYTE *)(_RBX + 16) = 1;
__asm { vzeroupper }
std::deque<std::shared_ptr<cv::Mat>>::~deque((long long)v24);
}
std::unique_lock<std::mutex>::~unique_lock((long long)&v21);
return _RBX;
}
|
dequeue_latest:
PUSH R15
PUSH R14
PUSH RBX
SUB RSP,0x80
MOV R14,RSI
MOV RBX,RDI
LEA RAX,[RSI + 0x50]
LEA R15,[RSP + 0x10]
MOV qword ptr [R15],RAX
MOV byte ptr [R15 + 0x8],0x0
MOV RDI,R15
CALL 0x0010f128
MOV byte ptr [R15 + 0x8],0x1
MOV RAX,qword ptr [R14 + 0x30]
CMP RAX,qword ptr [R14 + 0x10]
JZ 0x0010fde1
CMP RAX,qword ptr [R14 + 0x38]
JNZ 0x0010fd47
MOV RCX,qword ptr [R14 + 0x48]
MOV EAX,0x200
ADD RAX,qword ptr [RCX + -0x8]
LAB_0010fd47:
VMOVUPS XMM0,xmmword ptr [RAX + -0x10]
VMOVAPS xmmword ptr [RSP],XMM0
VXORPS XMM0,XMM0,XMM0
VMOVUPS xmmword ptr [RAX + -0x10],XMM0
VXORPS XMM0,XMM0,XMM0
LEA RDI,[RSP + 0x30]
VMOVUPS ymmword ptr [RDI + 0x30],YMM0
VMOVUPS ymmword ptr [RDI + 0x20],YMM0
VMOVUPS ymmword ptr [RDI],YMM0
LAB_0010fd71:
XOR ESI,ESI
VZEROUPPER
CALL 0x0010ef7c
LAB_0010fd7b:
VMOVUPS XMM0,xmmword ptr [R14]
VMOVAPS xmmword ptr [RSP + 0x20],XMM0
VMOVUPS YMM0,ymmword ptr [R14 + 0x10]
VMOVUPS YMM1,ymmword ptr [R14 + 0x30]
LEA RDI,[RSP + 0x30]
VMOVUPS YMM2,ymmword ptr [RDI]
VMOVUPS YMM3,ymmword ptr [RDI + 0x20]
VMOVUPS YMM4,ymmword ptr [RDI + 0x30]
VMOVUPS ymmword ptr [R14 + 0x30],YMM4
VMOVUPS ymmword ptr [R14 + 0x20],YMM3
VMOVUPS ymmword ptr [R14],YMM2
VMOVAPS XMM2,xmmword ptr [RSP + 0x20]
VMOVAPS xmmword ptr [RDI],XMM2
VMOVUPS ymmword ptr [RDI + 0x10],YMM0
VMOVUPS ymmword ptr [RDI + 0x30],YMM1
VMOVAPS XMM0,xmmword ptr [RSP]
VMOVUPS xmmword ptr [RBX],XMM0
MOV byte ptr [RBX + 0x10],0x1
VZEROUPPER
CALL 0x0010d754
JMP 0x0010fde5
LAB_0010fde1:
MOV byte ptr [RBX + 0x10],0x0
LAB_0010fde5:
LEA RDI,[RSP + 0x10]
CALL 0x0010f112
MOV RAX,RBX
ADD RSP,0x80
POP RBX
POP R14
POP R15
RET
|
/* SafeQueue<std::shared_ptr<cv::Mat> >::dequeue_latest() */
void SafeQueue<std::shared_ptr<cv::Mat>>::dequeue_latest(void)
{
int8 uVar1;
int8 uVar2;
int8 uVar3;
int8 uVar4;
int8 uVar5;
int8 uVar6;
int8 uVar7;
int8 uVar8;
int1 auVar9 [32];
long lVar10;
int1 (*in_RSI) [32];
int8 *in_RDI;
int1 *local_88;
int1 local_80;
int8 local_78;
int8 uStack_70;
int1 local_68 [32];
int8 uStack_48;
int8 uStack_40;
int8 local_38;
int8 uStack_30;
int8 uStack_28;
int8 uStack_20;
local_88 = in_RSI[2] + 0x10;
local_80 = 0;
std::unique_lock<std::mutex>::lock((unique_lock<std::mutex> *)&local_88);
local_80 = 1;
lVar10 = *(long *)(in_RSI[1] + 0x10);
if (lVar10 == *(long *)(*in_RSI + 0x10)) {
*(int1 *)(in_RDI + 2) = 0;
}
else {
if (lVar10 == *(long *)(in_RSI[1] + 0x18)) {
lVar10 = *(long *)(*(long *)(in_RSI[2] + 8) + -8) + 0x200;
}
uVar1 = *(int8 *)(lVar10 + -0x10);
uVar2 = *(int8 *)(lVar10 + -8);
*(int1 (*) [16])(lVar10 + -0x10) = ZEXT816(0) << 0x20;
uStack_48 = 0;
uStack_28 = 0;
uStack_20 = 0;
uStack_40 = SUB328(ZEXT832(0),4);
local_68 = ZEXT832(0) << 0x20;
local_38 = uStack_28;
uStack_30 = uStack_20;
/* try { // try from 0010fd71 to 0010fd7a has its CatchHandler @ 0010fdff */
std::_Deque_base<std::shared_ptr<cv::Mat>,std::allocator<std::shared_ptr<cv::Mat>>>::
_M_initialize_map((_Deque_base<std::shared_ptr<cv::Mat>,std::allocator<std::shared_ptr<cv::Mat>>>
*)local_68,0);
local_78 = *(int8 *)*in_RSI;
uStack_70 = *(int8 *)(*in_RSI + 8);
auVar9 = *in_RSI;
uVar3 = *(int8 *)in_RSI[1];
uVar4 = *(int8 *)(in_RSI[1] + 8);
uVar5 = *(int8 *)(in_RSI[1] + 0x10);
uVar6 = *(int8 *)(in_RSI[1] + 0x18);
uVar7 = *(int8 *)in_RSI[2];
uVar8 = *(int8 *)(in_RSI[2] + 8);
*(int8 *)(in_RSI[1] + 0x10) = local_38;
*(int8 *)(in_RSI[1] + 0x18) = uStack_30;
*(int8 *)in_RSI[2] = uStack_28;
*(int8 *)(in_RSI[2] + 8) = uStack_20;
*(int8 *)in_RSI[1] = uStack_48;
*(int8 *)(in_RSI[1] + 8) = uStack_40;
*(int8 *)(in_RSI[1] + 0x10) = local_38;
*(int8 *)(in_RSI[1] + 0x18) = uStack_30;
*(int8 *)*in_RSI = local_68._0_8_;
*(int8 *)(*in_RSI + 8) = local_68._8_8_;
*(int8 *)(*in_RSI + 0x10) = local_68._16_8_;
*(int8 *)(*in_RSI + 0x18) = local_68._24_8_;
*in_RDI = uVar1;
in_RDI[1] = uVar2;
*(int1 *)(in_RDI + 2) = 1;
local_68 = auVar9;
uStack_48 = uVar3;
uStack_40 = uVar4;
local_38 = uVar5;
uStack_30 = uVar6;
uStack_28 = uVar7;
uStack_20 = uVar8;
std::deque<std::shared_ptr<cv::Mat>,std::allocator<std::shared_ptr<cv::Mat>>>::~deque
((deque<std::shared_ptr<cv::Mat>,std::allocator<std::shared_ptr<cv::Mat>>> *)local_68)
;
}
std::unique_lock<std::mutex>::~unique_lock((unique_lock<std::mutex> *)&local_88);
return;
}
|
|
61,866 |
ma_writeinfo
|
eloqsql/storage/maria/ma_locking.c
|
int _ma_writeinfo(register MARIA_HA *info, uint operation)
{
int error,olderror;
MARIA_SHARE *share= info->s;
DBUG_ENTER("_ma_writeinfo");
DBUG_PRINT("info",("operation: %u tot_locks: %u", operation,
share->tot_locks));
error=0;
if (share->tot_locks == 0 && !share->base.born_transactional)
{
/* transactional tables flush their state at Checkpoint */
if (operation)
{ /* Two threads can't be here */
CRASH_IF_S3_TABLE(info->s); /* S3 readonly doesn't come here */
olderror= my_errno; /* Remember last error */
#ifdef MARIA_EXTERNAL_LOCKING
/*
The following only makes sense if we want to be allow two different
processes access the same table at the same time
*/
share->state.process= share->last_process= share->this_process;
share->state.unique= info->last_unique= info->this_unique;
share->state.update_count= info->last_loop= ++info->this_loop;
#endif
if ((error=
_ma_state_info_write_sub(share->kfile.file,
&share->state,
MA_STATE_INFO_WRITE_DONT_MOVE_OFFSET)))
olderror=my_errno;
#ifdef _WIN32
if (maria_flush)
{
_commit(share->kfile.file);
_commit(info->dfile.file);
}
#endif
my_errno=olderror;
}
}
else if (operation)
share->changed= 1; /* Mark keyfile changed */
DBUG_RETURN(error);
}
|
O0
|
c
|
ma_writeinfo:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq -0x8(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x20(%rbp)
jmp 0x35c5c
movl $0x0, -0x10(%rbp)
movq -0x20(%rbp), %rax
cmpl $0x0, 0x7b8(%rax)
jne 0x35ccd
movq -0x20(%rbp), %rax
cmpb $0x0, 0x44c(%rax)
jne 0x35ccd
cmpl $0x0, -0xc(%rbp)
je 0x35ccb
jmp 0x35c85
jmp 0x35c87
callq 0xf6090
movl (%rax), %eax
movl %eax, -0x14(%rbp)
movq -0x20(%rbp), %rax
movl 0x760(%rax), %edi
movq -0x20(%rbp), %rsi
movl $0x1, %edx
callq 0x65680
movl %eax, -0x10(%rbp)
cmpl $0x0, %eax
je 0x35cbb
callq 0xf6090
movl (%rax), %eax
movl %eax, -0x14(%rbp)
movl -0x14(%rbp), %eax
movl %eax, -0x24(%rbp)
callq 0xf6090
movl -0x24(%rbp), %ecx
movl %ecx, (%rax)
jmp 0x35ce0
cmpl $0x0, -0xc(%rbp)
je 0x35cde
movq -0x20(%rbp), %rax
movb $0x1, 0x7de(%rax)
jmp 0x35ce0
jmp 0x35ce2
movl -0x10(%rbp), %eax
movl %eax, -0x28(%rbp)
movl -0x28(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
|
_ma_writeinfo:
push rbp
mov rbp, rsp
sub rsp, 30h
mov [rbp+var_8], rdi
mov [rbp+var_C], esi
mov rax, [rbp+var_8]
mov rax, [rax]
mov [rbp+var_20], rax
jmp short $+2
loc_35C5C:
mov [rbp+var_10], 0
mov rax, [rbp+var_20]
cmp dword ptr [rax+7B8h], 0
jnz short loc_35CCD
mov rax, [rbp+var_20]
cmp byte ptr [rax+44Ch], 0
jnz short loc_35CCD
cmp [rbp+var_C], 0
jz short loc_35CCB
jmp short $+2
loc_35C85:
jmp short $+2
loc_35C87:
call _my_thread_var
mov eax, [rax]
mov [rbp+var_14], eax
mov rax, [rbp+var_20]
mov edi, [rax+760h]
mov rsi, [rbp+var_20]
mov edx, 1
call _ma_state_info_write_sub
mov [rbp+var_10], eax
cmp eax, 0
jz short loc_35CBB
call _my_thread_var
mov eax, [rax]
mov [rbp+var_14], eax
loc_35CBB:
mov eax, [rbp+var_14]
mov [rbp+var_24], eax
call _my_thread_var
mov ecx, [rbp+var_24]
mov [rax], ecx
loc_35CCB:
jmp short loc_35CE0
loc_35CCD:
cmp [rbp+var_C], 0
jz short loc_35CDE
mov rax, [rbp+var_20]
mov byte ptr [rax+7DEh], 1
loc_35CDE:
jmp short $+2
loc_35CE0:
jmp short $+2
loc_35CE2:
mov eax, [rbp+var_10]
mov [rbp+var_28], eax
mov eax, [rbp+var_28]
add rsp, 30h
pop rbp
retn
|
long long ma_writeinfo(long long *a1, int a2)
{
long long v3; // [rsp+10h] [rbp-20h]
int v4; // [rsp+1Ch] [rbp-14h]
unsigned int v5; // [rsp+20h] [rbp-10h]
v3 = *a1;
v5 = 0;
if ( *(_DWORD *)(*a1 + 1976) || *(_BYTE *)(v3 + 1100) )
{
if ( a2 )
*(_BYTE *)(v3 + 2014) = 1;
}
else if ( a2 )
{
v4 = *(_DWORD *)my_thread_var();
v5 = ma_state_info_write_sub(*(unsigned int *)(v3 + 1888), v3, 1LL);
if ( v5 )
v4 = *(_DWORD *)my_thread_var();
*(_DWORD *)my_thread_var() = v4;
}
return v5;
}
|
_ma_writeinfo:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x30
MOV qword ptr [RBP + -0x8],RDI
MOV dword ptr [RBP + -0xc],ESI
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x20],RAX
JMP 0x00135c5c
LAB_00135c5c:
MOV dword ptr [RBP + -0x10],0x0
MOV RAX,qword ptr [RBP + -0x20]
CMP dword ptr [RAX + 0x7b8],0x0
JNZ 0x00135ccd
MOV RAX,qword ptr [RBP + -0x20]
CMP byte ptr [RAX + 0x44c],0x0
JNZ 0x00135ccd
CMP dword ptr [RBP + -0xc],0x0
JZ 0x00135ccb
JMP 0x00135c85
LAB_00135c85:
JMP 0x00135c87
LAB_00135c87:
CALL 0x001f6090
MOV EAX,dword ptr [RAX]
MOV dword ptr [RBP + -0x14],EAX
MOV RAX,qword ptr [RBP + -0x20]
MOV EDI,dword ptr [RAX + 0x760]
MOV RSI,qword ptr [RBP + -0x20]
MOV EDX,0x1
CALL 0x00165680
MOV dword ptr [RBP + -0x10],EAX
CMP EAX,0x0
JZ 0x00135cbb
CALL 0x001f6090
MOV EAX,dword ptr [RAX]
MOV dword ptr [RBP + -0x14],EAX
LAB_00135cbb:
MOV EAX,dword ptr [RBP + -0x14]
MOV dword ptr [RBP + -0x24],EAX
CALL 0x001f6090
MOV ECX,dword ptr [RBP + -0x24]
MOV dword ptr [RAX],ECX
LAB_00135ccb:
JMP 0x00135ce0
LAB_00135ccd:
CMP dword ptr [RBP + -0xc],0x0
JZ 0x00135cde
MOV RAX,qword ptr [RBP + -0x20]
MOV byte ptr [RAX + 0x7de],0x1
LAB_00135cde:
JMP 0x00135ce0
LAB_00135ce0:
JMP 0x00135ce2
LAB_00135ce2:
MOV EAX,dword ptr [RBP + -0x10]
MOV dword ptr [RBP + -0x28],EAX
MOV EAX,dword ptr [RBP + -0x28]
ADD RSP,0x30
POP RBP
RET
|
int _ma_writeinfo(long *param_1,int param_2)
{
long lVar1;
int4 *puVar2;
int4 local_1c;
int4 local_18;
lVar1 = *param_1;
local_18 = 0;
if ((*(int *)(lVar1 + 0x7b8) == 0) && (*(char *)(lVar1 + 0x44c) == '\0')) {
if (param_2 != 0) {
puVar2 = (int4 *)_my_thread_var();
local_1c = *puVar2;
local_18 = _ma_state_info_write_sub(*(int4 *)(lVar1 + 0x760),lVar1,1);
if (local_18 != 0) {
puVar2 = (int4 *)_my_thread_var();
local_1c = *puVar2;
}
puVar2 = (int4 *)_my_thread_var();
*puVar2 = local_1c;
}
}
else if (param_2 != 0) {
*(int1 *)(lVar1 + 0x7de) = 1;
}
return local_18;
}
|
|
61,867 |
write_hook_for_undo
|
eloqsql/storage/maria/ma_blockrec.c
|
my_bool write_hook_for_undo(enum translog_record_type type
__attribute__ ((unused)),
TRN *trn, MARIA_HA *tbl_info
__attribute__ ((unused)),
LSN *lsn, void *hook_arg
__attribute__ ((unused)))
{
DBUG_ASSERT(trn->trid != 0);
trn->undo_lsn= *lsn;
if (unlikely(LSN_WITH_FLAGS_TO_LSN(trn->first_undo_lsn) == 0))
trn->first_undo_lsn=
trn->undo_lsn | LSN_WITH_FLAGS_TO_FLAGS(trn->first_undo_lsn);
return 0;
/*
when we implement purging, we will specialize this hook: UNDO_PURGE
records will additionally set trn->undo_purge_lsn
*/
}
|
O3
|
c
|
write_hook_for_undo:
pushq %rbp
movq %rsp, %rbp
movq (%rcx), %rax
movq %rax, 0x98(%rsi)
movq 0xa0(%rsi), %rcx
movq %rcx, %rdx
shlq $0x8, %rdx
je 0x5ecfe
xorl %eax, %eax
popq %rbp
retq
orq %rax, %rcx
movq %rcx, 0xa0(%rsi)
jmp 0x5ecfa
|
write_hook_for_undo:
push rbp
mov rbp, rsp
mov rax, [rcx]
mov [rsi+98h], rax
mov rcx, [rsi+0A0h]
mov rdx, rcx
shl rdx, 8
jz short loc_5ECFE
loc_5ECFA:
xor eax, eax
pop rbp
retn
loc_5ECFE:
or rcx, rax
mov [rsi+0A0h], rcx
jmp short loc_5ECFA
|
long long write_hook_for_undo(long long a1, long long a2, long long a3, long long *a4)
{
long long v4; // rax
v4 = *a4;
*(_QWORD *)(a2 + 152) = *a4;
if ( !(*(_QWORD *)(a2 + 160) << 8) )
*(_QWORD *)(a2 + 160) |= v4;
return 0LL;
}
|
write_hook_for_undo:
PUSH RBP
MOV RBP,RSP
MOV RAX,qword ptr [RCX]
MOV qword ptr [RSI + 0x98],RAX
MOV RCX,qword ptr [RSI + 0xa0]
MOV RDX,RCX
SHL RDX,0x8
JZ 0x0015ecfe
LAB_0015ecfa:
XOR EAX,EAX
POP RBP
RET
LAB_0015ecfe:
OR RCX,RAX
MOV qword ptr [RSI + 0xa0],RCX
JMP 0x0015ecfa
|
int8 write_hook_for_undo(int8 param_1,long param_2,int8 param_3,ulong *param_4)
{
ulong uVar1;
uVar1 = *param_4;
*(ulong *)(param_2 + 0x98) = uVar1;
if ((*(ulong *)(param_2 + 0xa0) & 0xffffffffffffff) == 0) {
*(ulong *)(param_2 + 0xa0) = *(ulong *)(param_2 + 0xa0) | uVar1;
}
return 0;
}
|
|
61,868 |
inline_mysql_cond_broadcast
|
eloqsql/include/mysql/psi/mysql_thread.h
|
static inline int inline_mysql_cond_broadcast(
mysql_cond_t *that)
{
int result;
#ifdef HAVE_PSI_COND_INTERFACE
if (psi_likely(that->m_psi != NULL))
PSI_COND_CALL(broadcast_cond)(that->m_psi);
#endif
result= pthread_cond_broadcast(&that->m_cond);
return result;
}
|
O0
|
c
|
inline_mysql_cond_broadcast:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
cmpq $0x0, 0x30(%rax)
setne %al
andb $0x1, %al
movzbl %al, %eax
cmpl $0x0, %eax
setne %al
andb $0x1, %al
movzbl %al, %eax
cltq
cmpq $0x0, %rax
je 0xe300b
leaq 0x1df241(%rip), %rax # 0x2c2238
movq (%rax), %rax
movq 0x178(%rax), %rax
movq -0x8(%rbp), %rcx
movq 0x30(%rcx), %rdi
callq *%rax
movq -0x8(%rbp), %rdi
callq 0x2a690
movl %eax, -0xc(%rbp)
movl -0xc(%rbp), %eax
addq $0x10, %rsp
popq %rbp
retq
|
inline_mysql_cond_broadcast_2:
push rbp
mov rbp, rsp
sub rsp, 10h
mov [rbp+var_8], rdi
mov rax, [rbp+var_8]
cmp qword ptr [rax+30h], 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_E300B
lea rax, PSI_server
mov rax, [rax]
mov rax, [rax+178h]
mov rcx, [rbp+var_8]
mov rdi, [rcx+30h]
call rax
loc_E300B:
mov rdi, [rbp+var_8]
call _pthread_cond_broadcast
mov [rbp+var_C], eax
mov eax, [rbp+var_C]
add rsp, 10h
pop rbp
retn
|
long long inline_mysql_cond_broadcast_2(long long a1)
{
if ( *(_QWORD *)(a1 + 48) )
((void ( *)(_QWORD))PSI_server[47])(*(_QWORD *)(a1 + 48));
return (unsigned int)pthread_cond_broadcast(a1);
}
|
inline_mysql_cond_broadcast:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x10
MOV qword ptr [RBP + -0x8],RDI
MOV RAX,qword ptr [RBP + -0x8]
CMP qword ptr [RAX + 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 0x001e300b
LEA RAX,[0x3c2238]
MOV RAX,qword ptr [RAX]
MOV RAX,qword ptr [RAX + 0x178]
MOV RCX,qword ptr [RBP + -0x8]
MOV RDI,qword ptr [RCX + 0x30]
CALL RAX
LAB_001e300b:
MOV RDI,qword ptr [RBP + -0x8]
CALL 0x0012a690
MOV dword ptr [RBP + -0xc],EAX
MOV EAX,dword ptr [RBP + -0xc]
ADD RSP,0x10
POP RBP
RET
|
int inline_mysql_cond_broadcast(pthread_cond_t *param_1)
{
int iVar1;
if (param_1[1].__align != 0) {
(**(code **)(PSI_server + 0x178))(param_1[1].__align);
}
iVar1 = pthread_cond_broadcast(param_1);
return iVar1;
}
|
|
61,869 |
ftxui::dim(std::shared_ptr<ftxui::Node>)
|
Andrewchistyakov[P]flashcards_lyc/build_O2/_deps/ftxui-src/src/ftxui/dom/dim.cpp
|
Element dim(Element child) {
return std::make_shared<Dim>(std::move(child));
}
|
O2
|
cpp
|
ftxui::dim(std::shared_ptr<ftxui::Node>):
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x40, %rsp
movq %rsi, %r13
movq %rdi, %rbx
pushq $0x70
popq %rdi
callq 0xc450
movq %rax, %r14
leaq 0xf(%rsp), %rax
movq %rax, 0x10(%rsp)
movq %r14, 0x18(%rsp)
movabsq $0x100000001, %rax # imm = 0x100000001
movq %rax, 0x8(%r14)
leaq 0x230fa(%rip), %rax # 0x51850
movq %rax, (%r14)
leaq 0x10(%r14), %r15
leaq 0x28(%rsp), %r12
movups (%r13), %xmm0
andq $0x0, 0x8(%r13)
movaps %xmm0, -0x8(%r12)
andq $0x0, (%r13)
leaq 0x20(%rsp), %rsi
movq %r15, %rdi
callq 0x1dfca
leaq 0x38(%rsp), %r13
leaq 0x23110(%rip), %rax # 0x518a0
movq %rax, 0x10(%r14)
movq %r12, %rdi
callq 0x13452
leaq 0x10(%rsp), %rdi
andq $0x0, 0x8(%rdi)
callq 0x2e7f2
movq %r15, (%rbx)
andq $0x0, (%r13)
movq %r14, 0x8(%rbx)
andq $0x0, -0x8(%r13)
movq %r13, %rdi
callq 0x13452
movq %rbx, %rax
addq $0x40, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
movq %rax, %rbx
movq %r12, %rdi
callq 0x13452
leaq 0x10(%rsp), %rdi
callq 0x2e7f2
movq %rbx, %rdi
callq 0xc7f0
|
_ZN5ftxui3dimESt10shared_ptrINS_4NodeEE:
push r15
push r14
push r13
push r12
push rbx
sub rsp, 40h
mov r13, rsi
mov rbx, rdi
push 70h ; 'p'
pop rdi; unsigned __int64
call __Znwm; operator new(ulong)
mov r14, rax
lea rax, [rsp+68h+var_59]
mov [rsp+68h+var_58], rax
mov [rsp+68h+var_50], r14
mov rax, 100000001h
mov [r14+8], rax
lea rax, off_51850
mov [r14], rax
lea r15, [r14+10h]
lea r12, [rsp+68h+var_40]
movups xmm0, xmmword ptr [r13+0]
and qword ptr [r13+8], 0
movaps xmmword ptr [r12-8], xmm0
and qword ptr [r13+0], 0
lea rsi, [rsp+68h+var_48]
mov rdi, r15
call _ZN5ftxui13NodeDecoratorC2ESt10shared_ptrINS_4NodeEE; ftxui::NodeDecorator::NodeDecorator(std::shared_ptr<ftxui::Node>)
lea r13, [rsp+68h+var_30]
lea rax, off_518A0
mov [r14+10h], rax
mov rdi, r12
call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count()
lea rdi, [rsp+68h+var_58]
and qword ptr [rdi+8], 0
call _ZNSt15__allocated_ptrISaISt23_Sp_counted_ptr_inplaceIN5ftxui12_GLOBAL__N_13DimESaIS3_ELN9__gnu_cxx12_Lock_policyE2EEEED2Ev; std::__allocated_ptr<std::allocator<std::_Sp_counted_ptr_inplace<ftxui::`anonymous namespace'::Dim,std::allocator<ftxui::`anonymous namespace'::Dim>,(__gnu_cxx::_Lock_policy)2>>>::~__allocated_ptr()
mov [rbx], r15
and qword ptr [r13+0], 0
mov [rbx+8], r14
and qword ptr [r13-8], 0
mov rdi, r13
call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count()
mov rax, rbx
add rsp, 40h
pop rbx
pop r12
pop r13
pop r14
pop r15
retn
mov rbx, rax
mov rdi, r12
call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count()
lea rdi, [rsp+arg_8]
call _ZNSt15__allocated_ptrISaISt23_Sp_counted_ptr_inplaceIN5ftxui12_GLOBAL__N_13DimESaIS3_ELN9__gnu_cxx12_Lock_policyE2EEEED2Ev; std::__allocated_ptr<std::allocator<std::_Sp_counted_ptr_inplace<ftxui::`anonymous namespace'::Dim,std::allocator<ftxui::`anonymous namespace'::Dim>,(__gnu_cxx::_Lock_policy)2>>>::~__allocated_ptr()
mov rdi, rbx
call __Unwind_Resume
|
_QWORD * ftxui::dim(_QWORD *a1, long long a2)
{
_QWORD *v2; // r14
__int128 v3; // xmm0
char v5; // [rsp+Fh] [rbp-59h] BYREF
char *v6; // [rsp+10h] [rbp-58h]
_QWORD *v7; // [rsp+18h] [rbp-50h]
__int128 v8; // [rsp+20h] [rbp-48h] BYREF
long long v9; // [rsp+30h] [rbp-38h]
_QWORD v10[6]; // [rsp+38h] [rbp-30h] BYREF
v2 = (_QWORD *)operator new(0x70uLL);
v6 = &v5;
v7 = v2;
v2[1] = 0x100000001LL;
*v2 = off_51850;
v3 = *(_OWORD *)a2;
*(_QWORD *)(a2 + 8) = 0LL;
v8 = v3;
*(_QWORD *)a2 = 0LL;
ftxui::NodeDecorator::NodeDecorator(v2 + 2, &v8);
v2[2] = off_518A0;
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count((_QWORD *)&v8 + 1);
v7 = 0LL;
std::__allocated_ptr<std::allocator<std::_Sp_counted_ptr_inplace<ftxui::`anonymous namespace'::Dim,std::allocator<ftxui::`anonymous namespace'::Dim>,(__gnu_cxx::_Lock_policy)2>>>::~__allocated_ptr();
*a1 = v2 + 2;
v10[0] = 0LL;
a1[1] = v2;
v9 = 0LL;
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(v10);
return a1;
}
|
dim:
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x40
MOV R13,RSI
MOV RBX,RDI
PUSH 0x70
POP RDI
CALL 0x0010c450
MOV R14,RAX
LEA RAX,[RSP + 0xf]
MOV qword ptr [RSP + 0x10],RAX
MOV qword ptr [RSP + 0x18],R14
MOV RAX,0x100000001
MOV qword ptr [R14 + 0x8],RAX
LEA RAX,[0x151850]
MOV qword ptr [R14],RAX
LEA R15,[R14 + 0x10]
LEA R12,[RSP + 0x28]
MOVUPS XMM0,xmmword ptr [R13]
AND qword ptr [R13 + 0x8],0x0
MOVAPS xmmword ptr [R12 + -0x8],XMM0
AND qword ptr [R13],0x0
LAB_0012e777:
LEA RSI,[RSP + 0x20]
MOV RDI,R15
CALL 0x0011dfca
LAB_0012e784:
LEA R13,[RSP + 0x38]
LEA RAX,[0x1518a0]
MOV qword ptr [R14 + 0x10],RAX
MOV RDI,R12
CALL 0x00113452
LEA RDI,[RSP + 0x10]
AND qword ptr [RDI + 0x8],0x0
CALL 0x0012e7f2
MOV qword ptr [RBX],R15
AND qword ptr [R13],0x0
MOV qword ptr [RBX + 0x8],R14
AND qword ptr [R13 + -0x8],0x0
MOV RDI,R13
CALL 0x00113452
MOV RAX,RBX
ADD RSP,0x40
POP RBX
POP R12
POP R13
POP R14
POP R15
RET
|
/* ftxui::dim(std::shared_ptr<ftxui::Node>) */
ftxui * __thiscall ftxui::dim(ftxui *this,int8 *param_2)
{
int8 *puVar1;
int1 local_59;
int1 *local_58;
int8 *local_50;
int4 local_48;
int4 uStack_44;
int4 uStack_40;
int4 uStack_3c;
int8 local_38;
int8 local_30;
puVar1 = (int8 *)operator_new(0x70);
local_58 = &local_59;
puVar1[1] = 0x100000001;
*puVar1 = &PTR___Sp_counted_ptr_inplace_00151850;
local_48 = *(int4 *)param_2;
uStack_44 = *(int4 *)((long)param_2 + 4);
uStack_40 = *(int4 *)(param_2 + 1);
uStack_3c = *(int4 *)((long)param_2 + 0xc);
param_2[1] = 0;
*param_2 = 0;
/* try { // try from 0012e777 to 0012e783 has its CatchHandler @ 0012e7d5 */
local_50 = puVar1;
NodeDecorator::NodeDecorator((NodeDecorator *)(puVar1 + 2),&local_48);
puVar1[2] = &PTR__Node_001518a0;
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count
((__shared_count<(__gnu_cxx::_Lock_policy)2> *)&uStack_40);
local_50 = (int8 *)0x0;
std::
__allocated_ptr<std::allocator<std::_Sp_counted_ptr_inplace<ftxui::(anonymous_namespace)::Dim,std::allocator<ftxui::(anonymous_namespace)::Dim>,(__gnu_cxx::_Lock_policy)2>>>
::~__allocated_ptr((__allocated_ptr<std::allocator<std::_Sp_counted_ptr_inplace<ftxui::(anonymous_namespace)::Dim,std::allocator<ftxui::(anonymous_namespace)::Dim>,(__gnu_cxx::_Lock_policy)2>>>
*)&local_58);
*(NodeDecorator **)this = (NodeDecorator *)(puVar1 + 2);
local_30 = 0;
*(int8 **)(this + 8) = puVar1;
local_38 = 0;
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count
((__shared_count<(__gnu_cxx::_Lock_policy)2> *)&local_30);
return this;
}
|
|
61,870 |
inline_mysql_file_write
|
eloqsql/include/mysql/psi/mysql_file.h
|
static inline size_t
inline_mysql_file_write(
#ifdef HAVE_PSI_FILE_INTERFACE
const char *src_file, uint src_line,
#endif
File file, const uchar *buffer, size_t count, myf flags)
{
size_t result;
#ifdef HAVE_PSI_FILE_INTERFACE
struct PSI_file_locker *locker;
PSI_file_locker_state state;
size_t bytes_written;
locker= PSI_FILE_CALL(get_thread_file_descriptor_locker)(&state, file, PSI_FILE_WRITE);
if (psi_likely(locker != NULL))
{
PSI_FILE_CALL(start_file_wait)(locker, count, src_file, src_line);
result= my_write(file, buffer, count, flags);
if (flags & (MY_NABP | MY_FNABP))
bytes_written= (result == 0) ? count : 0;
else
bytes_written= (result != MY_FILE_ERROR) ? result : 0;
PSI_FILE_CALL(end_file_wait)(locker, bytes_written);
return result;
}
#endif
result= my_write(file, buffer, count, flags);
return result;
}
|
O0
|
c
|
inline_mysql_file_write:
pushq %rbp
movq %rsp, %rbp
subq $0xa0, %rsp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movl %edx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq %r8, -0x28(%rbp)
movq %r9, -0x30(%rbp)
leaq 0x258c50(%rip), %rax # 0x2c00b8
movq (%rax), %rax
movq 0x158(%rax), %rax
movl -0x18(%rbp), %esi
leaq -0x88(%rbp), %rdi
movl $0x7, %edx
callq *%rax
movq %rax, -0x40(%rbp)
cmpq $0x0, -0x40(%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 0x67577
leaq 0x258c06(%rip), %rax # 0x2c00b8
movq (%rax), %rax
movq 0x210(%rax), %rax
movq -0x40(%rbp), %rdi
movq -0x28(%rbp), %rsi
movq -0x10(%rbp), %rdx
movl -0x14(%rbp), %ecx
callq *%rax
movl -0x18(%rbp), %edi
movq -0x20(%rbp), %rsi
movq -0x28(%rbp), %rdx
movq -0x30(%rbp), %rcx
callq 0xf6d60
movq %rax, -0x38(%rbp)
movq -0x30(%rbp), %rax
andq $0x6, %rax
cmpq $0x0, %rax
je 0x67522
cmpq $0x0, -0x38(%rbp)
jne 0x67507
movq -0x28(%rbp), %rax
movq %rax, -0x98(%rbp)
jmp 0x67512
xorl %eax, %eax
movq %rax, -0x98(%rbp)
jmp 0x67512
movq -0x98(%rbp), %rax
movq %rax, -0x90(%rbp)
jmp 0x6754f
cmpq $-0x1, -0x38(%rbp)
je 0x67536
movq -0x38(%rbp), %rax
movq %rax, -0xa0(%rbp)
jmp 0x67541
xorl %eax, %eax
movq %rax, -0xa0(%rbp)
jmp 0x67541
movq -0xa0(%rbp), %rax
movq %rax, -0x90(%rbp)
leaq 0x258b62(%rip), %rax # 0x2c00b8
movq (%rax), %rax
movq 0x218(%rax), %rax
movq -0x40(%rbp), %rdi
movq -0x90(%rbp), %rsi
callq *%rax
movq -0x38(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x67597
movl -0x18(%rbp), %edi
movq -0x20(%rbp), %rsi
movq -0x28(%rbp), %rdx
movq -0x30(%rbp), %rcx
callq 0xf6d60
movq %rax, -0x38(%rbp)
movq -0x38(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0xa0, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
|
inline_mysql_file_write_0:
push rbp
mov rbp, rsp
sub rsp, 0A0h
mov [rbp+var_10], rdi
mov [rbp+var_14], esi
mov [rbp+var_18], edx
mov [rbp+var_20], rcx
mov [rbp+var_28], r8
mov [rbp+var_30], r9
lea rax, PSI_server
mov rax, [rax]
mov rax, [rax+158h]
mov esi, [rbp+var_18]
lea rdi, [rbp+var_88]
mov edx, 7
call rax
mov [rbp+var_40], rax
cmp [rbp+var_40], 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 loc_67577
lea rax, PSI_server
mov rax, [rax]
mov rax, [rax+210h]
mov rdi, [rbp+var_40]
mov rsi, [rbp+var_28]
mov rdx, [rbp+var_10]
mov ecx, [rbp+var_14]
call rax
mov edi, [rbp+var_18]
mov rsi, [rbp+var_20]
mov rdx, [rbp+var_28]
mov rcx, [rbp+var_30]
call my_write
mov [rbp+var_38], rax
mov rax, [rbp+var_30]
and rax, 6
cmp rax, 0
jz short loc_67522
cmp [rbp+var_38], 0
jnz short loc_67507
mov rax, [rbp+var_28]
mov [rbp+var_98], rax
jmp short loc_67512
loc_67507:
xor eax, eax
mov [rbp+var_98], rax
jmp short $+2
loc_67512:
mov rax, [rbp+var_98]
mov [rbp+var_90], rax
jmp short loc_6754F
loc_67522:
cmp [rbp+var_38], 0FFFFFFFFFFFFFFFFh
jz short loc_67536
mov rax, [rbp+var_38]
mov [rbp+var_A0], rax
jmp short loc_67541
loc_67536:
xor eax, eax
mov [rbp+var_A0], rax
jmp short $+2
loc_67541:
mov rax, [rbp+var_A0]
mov [rbp+var_90], rax
loc_6754F:
lea rax, PSI_server
mov rax, [rax]
mov rax, [rax+218h]
mov rdi, [rbp+var_40]
mov rsi, [rbp+var_90]
call rax
mov rax, [rbp+var_38]
mov [rbp+var_8], rax
jmp short loc_67597
loc_67577:
mov edi, [rbp+var_18]
mov rsi, [rbp+var_20]
mov rdx, [rbp+var_28]
mov rcx, [rbp+var_30]
call my_write
mov [rbp+var_38], rax
mov rax, [rbp+var_38]
mov [rbp+var_8], rax
loc_67597:
mov rax, [rbp+var_8]
add rsp, 0A0h
pop rbp
retn
|
long long inline_mysql_file_write_0(
long long a1,
unsigned int a2,
unsigned int a3,
long long a4,
long long a5,
long long a6)
{
long long v7; // [rsp+0h] [rbp-A0h]
long long v8; // [rsp+8h] [rbp-98h]
_BYTE v9[72]; // [rsp+18h] [rbp-88h] BYREF
long long v10; // [rsp+60h] [rbp-40h]
long long v11; // [rsp+68h] [rbp-38h]
long long v12; // [rsp+70h] [rbp-30h]
long long v13; // [rsp+78h] [rbp-28h]
long long v14; // [rsp+80h] [rbp-20h]
unsigned int v15; // [rsp+88h] [rbp-18h]
unsigned int v16; // [rsp+8Ch] [rbp-14h]
long long v17; // [rsp+90h] [rbp-10h]
v17 = a1;
v16 = a2;
v15 = a3;
v14 = a4;
v13 = a5;
v12 = a6;
v10 = ((long long ( *)(_BYTE *, _QWORD, long long))PSI_server[43])(v9, a3, 7LL);
if ( v10 )
{
((void ( *)(long long, long long, long long, _QWORD))PSI_server[66])(v10, v13, v17, v16);
v11 = my_write(v15, v14, v13, v12);
if ( (v12 & 6) != 0 )
{
if ( v11 )
v8 = 0LL;
else
v8 = v13;
((void ( *)(long long, long long))PSI_server[67])(v10, v8);
}
else
{
if ( v11 == -1 )
v7 = 0LL;
else
v7 = v11;
((void ( *)(long long, long long))PSI_server[67])(v10, v7);
}
return v11;
}
else
{
return my_write(v15, v14, v13, v12);
}
}
|
inline_mysql_file_write:
PUSH RBP
MOV RBP,RSP
SUB RSP,0xa0
MOV qword ptr [RBP + -0x10],RDI
MOV dword ptr [RBP + -0x14],ESI
MOV dword ptr [RBP + -0x18],EDX
MOV qword ptr [RBP + -0x20],RCX
MOV qword ptr [RBP + -0x28],R8
MOV qword ptr [RBP + -0x30],R9
LEA RAX,[0x3c00b8]
MOV RAX,qword ptr [RAX]
MOV RAX,qword ptr [RAX + 0x158]
MOV ESI,dword ptr [RBP + -0x18]
LEA RDI,[RBP + -0x88]
MOV EDX,0x7
CALL RAX
MOV qword ptr [RBP + -0x40],RAX
CMP qword ptr [RBP + -0x40],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 0x00167577
LEA RAX,[0x3c00b8]
MOV RAX,qword ptr [RAX]
MOV RAX,qword ptr [RAX + 0x210]
MOV RDI,qword ptr [RBP + -0x40]
MOV RSI,qword ptr [RBP + -0x28]
MOV RDX,qword ptr [RBP + -0x10]
MOV ECX,dword ptr [RBP + -0x14]
CALL RAX
MOV EDI,dword ptr [RBP + -0x18]
MOV RSI,qword ptr [RBP + -0x20]
MOV RDX,qword ptr [RBP + -0x28]
MOV RCX,qword ptr [RBP + -0x30]
CALL 0x001f6d60
MOV qword ptr [RBP + -0x38],RAX
MOV RAX,qword ptr [RBP + -0x30]
AND RAX,0x6
CMP RAX,0x0
JZ 0x00167522
CMP qword ptr [RBP + -0x38],0x0
JNZ 0x00167507
MOV RAX,qword ptr [RBP + -0x28]
MOV qword ptr [RBP + -0x98],RAX
JMP 0x00167512
LAB_00167507:
XOR EAX,EAX
MOV qword ptr [RBP + -0x98],RAX
JMP 0x00167512
LAB_00167512:
MOV RAX,qword ptr [RBP + -0x98]
MOV qword ptr [RBP + -0x90],RAX
JMP 0x0016754f
LAB_00167522:
CMP qword ptr [RBP + -0x38],-0x1
JZ 0x00167536
MOV RAX,qword ptr [RBP + -0x38]
MOV qword ptr [RBP + -0xa0],RAX
JMP 0x00167541
LAB_00167536:
XOR EAX,EAX
MOV qword ptr [RBP + -0xa0],RAX
JMP 0x00167541
LAB_00167541:
MOV RAX,qword ptr [RBP + -0xa0]
MOV qword ptr [RBP + -0x90],RAX
LAB_0016754f:
LEA RAX,[0x3c00b8]
MOV RAX,qword ptr [RAX]
MOV RAX,qword ptr [RAX + 0x218]
MOV RDI,qword ptr [RBP + -0x40]
MOV RSI,qword ptr [RBP + -0x90]
CALL RAX
MOV RAX,qword ptr [RBP + -0x38]
MOV qword ptr [RBP + -0x8],RAX
JMP 0x00167597
LAB_00167577:
MOV EDI,dword ptr [RBP + -0x18]
MOV RSI,qword ptr [RBP + -0x20]
MOV RDX,qword ptr [RBP + -0x28]
MOV RCX,qword ptr [RBP + -0x30]
CALL 0x001f6d60
MOV qword ptr [RBP + -0x38],RAX
MOV RAX,qword ptr [RBP + -0x38]
MOV qword ptr [RBP + -0x8],RAX
LAB_00167597:
MOV RAX,qword ptr [RBP + -0x8]
ADD RSP,0xa0
POP RBP
RET
|
long inline_mysql_file_write
(int8 param_1,int4 param_2,int4 param_3,int8 param_4,
long param_5,ulong param_6)
{
long local_a8;
long local_a0;
long local_98;
int1 local_90 [72];
long local_48;
long local_40;
ulong local_38;
long local_30;
int8 local_28;
int4 local_20;
int4 local_1c;
int8 local_18;
long local_10;
local_38 = param_6;
local_30 = param_5;
local_28 = param_4;
local_20 = param_3;
local_1c = param_2;
local_18 = param_1;
local_48 = (**(code **)(PSI_server + 0x158))(local_90,param_3,7);
if (local_48 == 0) {
local_10 = my_write(local_20,local_28,local_30,local_38);
}
else {
(**(code **)(PSI_server + 0x210))(local_48,local_30,local_18,local_1c);
local_40 = my_write(local_20,local_28,local_30,local_38);
if ((local_38 & 6) == 0) {
local_a8 = local_40;
if (local_40 == -1) {
local_a8 = 0;
}
local_98 = local_a8;
}
else {
if (local_40 == 0) {
local_a0 = local_30;
}
else {
local_a0 = 0;
}
local_98 = local_a0;
}
(**(code **)(PSI_server + 0x218))(local_48,local_98);
local_10 = local_40;
}
return local_10;
}
|
|
61,871 |
bf_set_si
|
bluesky950520[P]quickjs/libbf.c
|
int bf_set_si(bf_t *r, int64_t a)
{
int ret;
if (a < 0) {
ret = bf_set_ui(r, -a);
r->sign = 1;
} else {
ret = bf_set_ui(r, a);
}
return ret;
}
|
O0
|
c
|
bf_set_si:
subq $0x18, %rsp
movq %rdi, 0x10(%rsp)
movq %rsi, 0x8(%rsp)
cmpq $0x0, 0x8(%rsp)
jge 0xec50b
movq 0x10(%rsp), %rdi
xorl %eax, %eax
movl %eax, %esi
subq 0x8(%rsp), %rsi
callq 0xec390
movl %eax, 0x4(%rsp)
movq 0x10(%rsp), %rax
movl $0x1, 0x8(%rax)
jmp 0xec51e
movq 0x10(%rsp), %rdi
movq 0x8(%rsp), %rsi
callq 0xec390
movl %eax, 0x4(%rsp)
movl 0x4(%rsp), %eax
addq $0x18, %rsp
retq
nopw (%rax,%rax)
|
bf_set_si:
sub rsp, 18h
mov [rsp+18h+var_8], rdi
mov [rsp+18h+var_10], rsi
cmp [rsp+18h+var_10], 0
jge short loc_EC50B
mov rdi, [rsp+18h+var_8]
xor eax, eax
mov esi, eax
sub rsi, [rsp+18h+var_10]
call bf_set_ui
mov [rsp+18h+var_14], eax
mov rax, [rsp+18h+var_8]
mov dword ptr [rax+8], 1
jmp short loc_EC51E
loc_EC50B:
mov rdi, [rsp+18h+var_8]
mov rsi, [rsp+18h+var_10]
call bf_set_ui
mov [rsp+18h+var_14], eax
loc_EC51E:
mov eax, [rsp+18h+var_14]
add rsp, 18h
retn
|
long long bf_set_si(long long a1, long long a2)
{
unsigned int v3; // [rsp+4h] [rbp-14h]
if ( a2 >= 0 )
{
return (unsigned int)bf_set_ui(a1, a2);
}
else
{
v3 = bf_set_ui(a1, -a2);
*(_DWORD *)(a1 + 8) = 1;
}
return v3;
}
|
bf_set_si:
SUB RSP,0x18
MOV qword ptr [RSP + 0x10],RDI
MOV qword ptr [RSP + 0x8],RSI
CMP qword ptr [RSP + 0x8],0x0
JGE 0x001ec50b
MOV RDI,qword ptr [RSP + 0x10]
XOR EAX,EAX
MOV ESI,EAX
SUB RSI,qword ptr [RSP + 0x8]
CALL 0x001ec390
MOV dword ptr [RSP + 0x4],EAX
MOV RAX,qword ptr [RSP + 0x10]
MOV dword ptr [RAX + 0x8],0x1
JMP 0x001ec51e
LAB_001ec50b:
MOV RDI,qword ptr [RSP + 0x10]
MOV RSI,qword ptr [RSP + 0x8]
CALL 0x001ec390
MOV dword ptr [RSP + 0x4],EAX
LAB_001ec51e:
MOV EAX,dword ptr [RSP + 0x4]
ADD RSP,0x18
RET
|
int4 bf_set_si(long param_1,long param_2)
{
int4 local_14;
if (param_2 < 0) {
local_14 = bf_set_ui(param_1,-param_2);
*(int4 *)(param_1 + 8) = 1;
}
else {
local_14 = bf_set_ui(param_1,param_2);
}
return local_14;
}
|
|
61,872 |
bf_set_si
|
bluesky950520[P]quickjs/libbf.c
|
int bf_set_si(bf_t *r, int64_t a)
{
int ret;
if (a < 0) {
ret = bf_set_ui(r, -a);
r->sign = 1;
} else {
ret = bf_set_ui(r, a);
}
return ret;
}
|
O2
|
c
|
bf_set_si:
pushq %rbx
movq %rdi, %rbx
testq %rsi, %rsi
js 0x731ae
movq %rbx, %rdi
popq %rbx
jmp 0x73106
negq %rsi
movq %rbx, %rdi
callq 0x73106
movl $0x1, 0x8(%rbx)
popq %rbx
retq
|
bf_set_si:
push rbx
mov rbx, rdi
test rsi, rsi
js short loc_731AE
mov rdi, rbx
pop rbx
jmp bf_set_ui
loc_731AE:
neg rsi
mov rdi, rbx
call bf_set_ui
mov dword ptr [rbx+8], 1
pop rbx
retn
|
long long bf_set_si(long long a1, signed long long a2)
{
long long result; // rax
if ( a2 >= 0 )
return bf_set_ui(a1, a2);
result = bf_set_ui(a1, -a2);
*(_DWORD *)(a1 + 8) = 1;
return result;
}
|
bf_set_si:
PUSH RBX
MOV RBX,RDI
TEST RSI,RSI
JS 0x001731ae
MOV RDI,RBX
POP RBX
JMP 0x00173106
LAB_001731ae:
NEG RSI
MOV RDI,RBX
CALL 0x00173106
MOV dword ptr [RBX + 0x8],0x1
POP RBX
RET
|
void bf_set_si(long param_1,long param_2)
{
if (-1 < param_2) {
bf_set_ui(param_1);
return;
}
bf_set_ui(param_1,-param_2);
*(int4 *)(param_1 + 8) = 1;
return;
}
|
|
61,873 |
eth_get_storage_value
|
corpus-core[P]colibri-stateless/src/chains/eth/verifier/eth_account.c
|
bool eth_get_storage_value(ssz_ob_t storage, bytes32_t value) {
bytes_t last_value = get_last_value(ssz_get(&storage, "proof"));
if (!last_value.data) return false;
if (rlp_decode(&last_value, 0, &last_value) != RLP_ITEM) return false;
if (last_value.len > 32) return false;
memcpy(value + 32 - last_value.len, last_value.data, last_value.len);
return true;
}
|
O3
|
c
|
eth_get_storage_value:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x40, %rsp
movq %rdi, %rbx
leaq 0x301f7(%rip), %rdx # 0x3f378
leaq 0x28(%rsp), %r14
leaq 0x60(%rsp), %rsi
movq %r14, %rdi
callq 0x14885
movq 0x10(%r14), %rax
movq %rax, 0x10(%rsp)
movups (%r14), %xmm0
movups %xmm0, (%rsp)
callq 0xf1fd
movl %eax, 0x18(%rsp)
movq %rdx, 0x20(%rsp)
testq %rdx, %rdx
je 0xf1d7
xorl %ebp, %ebp
leaq 0x18(%rsp), %rdi
xorl %esi, %esi
movq %rdi, %rdx
callq 0x10c40
cmpl $0x1, %eax
jne 0xf1f2
movl 0x18(%rsp), %edx
cmpq $0x20, %rdx
jbe 0xf1db
xorl %ebp, %ebp
jmp 0xf1f2
subq %rdx, %rbx
addq $0x20, %rbx
movq 0x20(%rsp), %rsi
movq %rbx, %rdi
callq 0x5060
movb $0x1, %bpl
movl %ebp, %eax
addq $0x40, %rsp
popq %rbx
popq %r14
popq %rbp
retq
|
eth_get_storage_value:
push rbp
push r14
push rbx
sub rsp, 40h
mov rbx, rdi
lea rdx, aMerkleProof+7; "proof"
lea r14, [rsp+58h+var_30]
lea rsi, [rsp+58h+arg_0]
mov rdi, r14
call ssz_get
mov rax, [r14+10h]
mov [rsp+58h+var_48], rax
movups xmm0, xmmword ptr [r14]
movups [rsp+58h+var_58], xmm0
call get_last_value
mov [rsp+58h+var_40], eax
mov [rsp+58h+var_38], rdx
test rdx, rdx
jz short loc_F1D7
xor ebp, ebp
lea rdi, [rsp+58h+var_40]
xor esi, esi
mov rdx, rdi
call rlp_decode
cmp eax, 1
jnz short loc_F1F2
mov edx, [rsp+58h+var_40]
cmp rdx, 20h ; ' '
jbe short loc_F1DB
loc_F1D7:
xor ebp, ebp
jmp short loc_F1F2
loc_F1DB:
sub rbx, rdx
add rbx, 20h ; ' '
mov rsi, [rsp+58h+var_38]
mov rdi, rbx
call _memcpy
mov bpl, 1
loc_F1F2:
mov eax, ebp
add rsp, 40h
pop rbx
pop r14
pop rbp
retn
|
long long eth_get_storage_value(
long long a1,
long long a2,
long long a3,
long long a4,
long long a5,
long long a6,
char a7)
{
int v7; // edx
int v8; // ecx
int v9; // r8d
int v10; // r9d
long long v11; // rdx
unsigned int v12; // ebp
unsigned int last_value; // [rsp+18h] [rbp-40h] BYREF
long long v15; // [rsp+20h] [rbp-38h]
__int128 v16; // [rsp+28h] [rbp-30h] BYREF
long long v17; // [rsp+38h] [rbp-20h]
ssz_get(&v16, &a7, "proof");
last_value = get_last_value((unsigned int)&v16, (unsigned int)&a7, v7, v8, v9, v10, v16, v17);
v15 = v11;
if ( !v11 )
return 0;
v12 = 0;
if ( (unsigned int)rlp_decode(&last_value, 0LL, &last_value) == 1 )
{
if ( last_value <= 0x20uLL )
{
memcpy(a1 - last_value + 32, v15, last_value);
LOBYTE(v12) = 1;
return v12;
}
return 0;
}
return v12;
}
|
eth_get_storage_value:
PUSH RBP
PUSH R14
PUSH RBX
SUB RSP,0x40
MOV RBX,RDI
LEA RDX,[0x13f378]
LEA R14,[RSP + 0x28]
LEA RSI,[RSP + 0x60]
MOV RDI,R14
CALL 0x00114885
MOV RAX,qword ptr [R14 + 0x10]
MOV qword ptr [RSP + 0x10],RAX
MOVUPS XMM0,xmmword ptr [R14]
MOVUPS xmmword ptr [RSP],XMM0
CALL 0x0010f1fd
MOV dword ptr [RSP + 0x18],EAX
MOV qword ptr [RSP + 0x20],RDX
TEST RDX,RDX
JZ 0x0010f1d7
XOR EBP,EBP
LEA RDI,[RSP + 0x18]
XOR ESI,ESI
MOV RDX,RDI
CALL 0x00110c40
CMP EAX,0x1
JNZ 0x0010f1f2
MOV EDX,dword ptr [RSP + 0x18]
CMP RDX,0x20
JBE 0x0010f1db
LAB_0010f1d7:
XOR EBP,EBP
JMP 0x0010f1f2
LAB_0010f1db:
SUB RBX,RDX
ADD RBX,0x20
MOV RSI,qword ptr [RSP + 0x20]
MOV RDI,RBX
CALL 0x00105060
MOV BPL,0x1
LAB_0010f1f2:
MOV EAX,EBP
ADD RSP,0x40
POP RBX
POP R14
POP RBP
RET
|
int8 eth_get_storage_value(long param_1)
{
int iVar1;
void *extraout_RDX;
ulong __n;
uint local_40 [2];
void *local_38;
int1 local_30 [24];
ssz_get(local_30,&stack0x00000008,"proof");
local_40[0] = get_last_value();
if (extraout_RDX != (void *)0x0) {
local_38 = extraout_RDX;
iVar1 = rlp_decode(local_40,0,local_40);
if (iVar1 != 1) {
return 0;
}
__n = (ulong)local_40[0];
if (__n < 0x21) {
memcpy((void *)((param_1 - __n) + 0x20),local_38,__n);
return 1;
}
}
return 0;
}
|
|
61,874 |
close_lexical_var
|
bluesky950520[P]quickjs/quickjs.c
|
static void close_lexical_var(JSContext *ctx, JSStackFrame *sf, int var_idx)
{
struct list_head *el, *el1;
JSVarRef *var_ref;
list_for_each_safe(el, el1, &sf->var_ref_list) {
var_ref = list_entry(el, JSVarRef, header.link);
if (var_idx == var_ref->var_idx && !var_ref->is_arg) {
var_ref->value = js_dup(sf->var_buf[var_idx]);
var_ref->pvalue = &var_ref->value;
list_del(&var_ref->header.link);
/* the reference is no longer to a local variable */
var_ref->is_detached = TRUE;
add_gc_object(ctx->rt, &var_ref->header, JS_GC_OBJ_TYPE_VAR_REF);
}
}
}
|
O0
|
c
|
close_lexical_var:
subq $0x48, %rsp
movq %rdi, 0x40(%rsp)
movq %rsi, 0x38(%rsp)
movl %edx, 0x34(%rsp)
movq 0x38(%rsp), %rax
movq 0x30(%rax), %rax
movq %rax, 0x28(%rsp)
movq 0x28(%rsp), %rax
movq 0x8(%rax), %rax
movq %rax, 0x20(%rsp)
movq 0x28(%rsp), %rax
movq 0x38(%rsp), %rcx
addq $0x28, %rcx
cmpq %rcx, %rax
je 0x67261
movq 0x28(%rsp), %rax
addq $-0x8, %rax
movq %rax, 0x18(%rsp)
movl 0x34(%rsp), %eax
movq 0x18(%rsp), %rcx
movzwl 0x6(%rcx), %ecx
cmpl %ecx, %eax
jne 0x67242
movq 0x18(%rsp), %rax
movb 0x5(%rax), %al
shrb %al
andb $0x1, %al
cmpb $0x0, %al
jne 0x67242
movq 0x18(%rsp), %rax
movq %rax, (%rsp)
movq 0x38(%rsp), %rax
movq 0x20(%rax), %rax
movslq 0x34(%rsp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movq (%rax), %rdi
movq 0x8(%rax), %rsi
callq 0x216d0
movq %rax, %rcx
movq (%rsp), %rax
movq %rcx, 0x8(%rsp)
movq %rdx, 0x10(%rsp)
movq 0x8(%rsp), %rcx
movq %rcx, 0x20(%rax)
movq 0x10(%rsp), %rcx
movq %rcx, 0x28(%rax)
movq 0x18(%rsp), %rcx
addq $0x20, %rcx
movq 0x18(%rsp), %rax
movq %rcx, 0x18(%rax)
movq 0x18(%rsp), %rdi
addq $0x8, %rdi
callq 0x23c30
movq 0x18(%rsp), %rax
movb 0x5(%rax), %cl
andb $-0x2, %cl
orb $0x1, %cl
movb %cl, 0x5(%rax)
movq 0x40(%rsp), %rax
movq 0x18(%rax), %rdi
movq 0x18(%rsp), %rsi
movl $0x3, %edx
callq 0x240d0
jmp 0x67244
movq 0x20(%rsp), %rax
movq %rax, 0x28(%rsp)
movq 0x28(%rsp), %rax
movq 0x8(%rax), %rax
movq %rax, 0x20(%rsp)
jmp 0x6715e
addq $0x48, %rsp
retq
nopw %cs:(%rax,%rax)
|
close_lexical_var:
sub rsp, 48h
mov [rsp+48h+var_8], rdi
mov [rsp+48h+var_10], rsi
mov [rsp+48h+var_14], edx
mov rax, [rsp+48h+var_10]
mov rax, [rax+30h]
mov [rsp+48h+var_20], rax
mov rax, [rsp+48h+var_20]
mov rax, [rax+8]
mov [rsp+48h+var_28], rax
loc_6715E:
mov rax, [rsp+48h+var_20]
mov rcx, [rsp+48h+var_10]
add rcx, 28h ; '('
cmp rax, rcx
jz loc_67261
mov rax, [rsp+48h+var_20]
add rax, 0FFFFFFFFFFFFFFF8h
mov [rsp+48h+var_30], rax
mov eax, [rsp+48h+var_14]
mov rcx, [rsp+48h+var_30]
movzx ecx, word ptr [rcx+6]
cmp eax, ecx
jnz loc_67242
mov rax, [rsp+48h+var_30]
mov al, [rax+5]
shr al, 1
and al, 1
cmp al, 0
jnz loc_67242
mov rax, [rsp+48h+var_30]
mov [rsp+48h+var_48], rax
mov rax, [rsp+48h+var_10]
mov rax, [rax+20h]
movsxd rcx, [rsp+48h+var_14]
shl rcx, 4
add rax, rcx
mov rdi, [rax]
mov rsi, [rax+8]
call js_dup
mov rcx, rax
mov rax, [rsp+48h+var_48]
mov [rsp+48h+var_40], rcx
mov [rsp+48h+var_38], rdx
mov rcx, [rsp+48h+var_40]
mov [rax+20h], rcx
mov rcx, [rsp+48h+var_38]
mov [rax+28h], rcx
mov rcx, [rsp+48h+var_30]
add rcx, 20h ; ' '
mov rax, [rsp+48h+var_30]
mov [rax+18h], rcx
mov rdi, [rsp+48h+var_30]
add rdi, 8
call list_del_0
mov rax, [rsp+48h+var_30]
mov cl, [rax+5]
and cl, 0FEh
or cl, 1
mov [rax+5], cl
mov rax, [rsp+48h+var_8]
mov rdi, [rax+18h]
mov rsi, [rsp+48h+var_30]
mov edx, 3
call add_gc_object
loc_67242:
jmp short $+2
loc_67244:
mov rax, [rsp+48h+var_28]
mov [rsp+48h+var_20], rax
mov rax, [rsp+48h+var_20]
mov rax, [rax+8]
mov [rsp+48h+var_28], rax
jmp loc_6715E
loc_67261:
add rsp, 48h
retn
|
_QWORD * close_lexical_var(long long a1, _QWORD *a2, int a3)
{
_QWORD *result; // rax
long long v4; // rax
long long v5; // rdx
long long v6; // [rsp+18h] [rbp-30h]
_QWORD *i; // [rsp+20h] [rbp-28h]
_QWORD *v8; // [rsp+28h] [rbp-20h]
v8 = (_QWORD *)a2[6];
for ( i = (_QWORD *)v8[1]; ; i = (_QWORD *)i[1] )
{
result = v8;
if ( v8 == a2 + 5 )
break;
v6 = (long long)(v8 - 1);
if ( a3 == *((unsigned __int16 *)v8 - 1) && (*(_BYTE *)(v6 + 5) & 2) == 0 )
{
v4 = 16LL * a3 + a2[4];
*(_QWORD *)(v6 + 32) = js_dup(*(_DWORD **)v4, *(_QWORD *)(v4 + 8));
*(_QWORD *)(v6 + 40) = v5;
*(_QWORD *)(v6 + 24) = v6 + 32;
list_del_0(v8);
*(_BYTE *)(v6 + 5) = *(_BYTE *)(v6 + 5) & 0xFE | 1;
add_gc_object(*(_QWORD *)(a1 + 24), v6, 3);
}
v8 = i;
}
return result;
}
|
close_lexical_var:
SUB RSP,0x48
MOV qword ptr [RSP + 0x40],RDI
MOV qword ptr [RSP + 0x38],RSI
MOV dword ptr [RSP + 0x34],EDX
MOV RAX,qword ptr [RSP + 0x38]
MOV RAX,qword ptr [RAX + 0x30]
MOV qword ptr [RSP + 0x28],RAX
MOV RAX,qword ptr [RSP + 0x28]
MOV RAX,qword ptr [RAX + 0x8]
MOV qword ptr [RSP + 0x20],RAX
LAB_0016715e:
MOV RAX,qword ptr [RSP + 0x28]
MOV RCX,qword ptr [RSP + 0x38]
ADD RCX,0x28
CMP RAX,RCX
JZ 0x00167261
MOV RAX,qword ptr [RSP + 0x28]
ADD RAX,-0x8
MOV qword ptr [RSP + 0x18],RAX
MOV EAX,dword ptr [RSP + 0x34]
MOV RCX,qword ptr [RSP + 0x18]
MOVZX ECX,word ptr [RCX + 0x6]
CMP EAX,ECX
JNZ 0x00167242
MOV RAX,qword ptr [RSP + 0x18]
MOV AL,byte ptr [RAX + 0x5]
SHR AL,0x1
AND AL,0x1
CMP AL,0x0
JNZ 0x00167242
MOV RAX,qword ptr [RSP + 0x18]
MOV qword ptr [RSP],RAX
MOV RAX,qword ptr [RSP + 0x38]
MOV RAX,qword ptr [RAX + 0x20]
MOVSXD RCX,dword ptr [RSP + 0x34]
SHL RCX,0x4
ADD RAX,RCX
MOV RDI,qword ptr [RAX]
MOV RSI,qword ptr [RAX + 0x8]
CALL 0x001216d0
MOV RCX,RAX
MOV RAX,qword ptr [RSP]
MOV qword ptr [RSP + 0x8],RCX
MOV qword ptr [RSP + 0x10],RDX
MOV RCX,qword ptr [RSP + 0x8]
MOV qword ptr [RAX + 0x20],RCX
MOV RCX,qword ptr [RSP + 0x10]
MOV qword ptr [RAX + 0x28],RCX
MOV RCX,qword ptr [RSP + 0x18]
ADD RCX,0x20
MOV RAX,qword ptr [RSP + 0x18]
MOV qword ptr [RAX + 0x18],RCX
MOV RDI,qword ptr [RSP + 0x18]
ADD RDI,0x8
CALL 0x00123c30
MOV RAX,qword ptr [RSP + 0x18]
MOV CL,byte ptr [RAX + 0x5]
AND CL,0xfe
OR CL,0x1
MOV byte ptr [RAX + 0x5],CL
MOV RAX,qword ptr [RSP + 0x40]
MOV RDI,qword ptr [RAX + 0x18]
MOV RSI,qword ptr [RSP + 0x18]
MOV EDX,0x3
CALL 0x001240d0
LAB_00167242:
JMP 0x00167244
LAB_00167244:
MOV RAX,qword ptr [RSP + 0x20]
MOV qword ptr [RSP + 0x28],RAX
MOV RAX,qword ptr [RSP + 0x28]
MOV RAX,qword ptr [RAX + 0x8]
MOV qword ptr [RSP + 0x20],RAX
JMP 0x0016715e
LAB_00167261:
ADD RSP,0x48
RET
|
void close_lexical_var(long param_1,long param_2,uint param_3)
{
int8 *puVar1;
int1 auVar2 [16];
long local_28;
long local_20;
local_20 = *(long *)(param_2 + 0x30);
local_28 = *(long *)(local_20 + 8);
while (local_20 != param_2 + 0x28) {
if ((param_3 == *(ushort *)(local_20 + -2)) && ((*(byte *)(local_20 + -3) >> 1 & 1) == 0)) {
puVar1 = (int8 *)(*(long *)(param_2 + 0x20) + (long)(int)param_3 * 0x10);
auVar2 = js_dup(*puVar1,puVar1[1]);
*(int1 (*) [16])(local_20 + 0x18) = auVar2;
*(long *)(local_20 + 0x10) = local_20 + 0x18;
list_del(local_20);
*(byte *)(local_20 + -3) = *(byte *)(local_20 + -3) & 0xfe | 1;
add_gc_object(*(int8 *)(param_1 + 0x18),local_20 + -8,3);
}
local_20 = local_28;
local_28 = *(long *)(local_28 + 8);
}
return;
}
|
|
61,875 |
int rapidcsv::Document::GetCell<int>(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, unsigned long) const
|
Andrewchistyakov[P]flashcards_lyc/src/rapidcsv.h
|
T GetCell(const std::string& pColumnName, const size_t pRowIdx) const
{
const int columnIdx = GetColumnIdx(pColumnName);
if (columnIdx < 0)
{
throw std::out_of_range("column not found: " + pColumnName);
}
return GetCell<T>(static_cast<size_t>(columnIdx), pRowIdx);
}
|
O1
|
c
|
int rapidcsv::Document::GetCell<int>(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, unsigned long) const:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x28, %rsp
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
callq 0x1f310
testl %eax, %eax
js 0x1d143
movl %eax, %esi
movq %r15, %rdi
movq %rbx, %rdx
addq $0x28, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x1fc18
movl $0x10, %edi
callq 0xb1b0
movq %rax, %rbx
leaq 0x20a8b(%rip), %rsi # 0x3dbe2
leaq 0x8(%rsp), %rdi
movq %r14, %rdx
callq 0x15023
movb $0x1, %bpl
leaq 0x8(%rsp), %rsi
movq %rbx, %rdi
callq 0xb660
xorl %ebp, %ebp
movq 0x3ce4b(%rip), %rsi # 0x59fc8
movq 0x3ce3c(%rip), %rdx # 0x59fc0
movq %rbx, %rdi
callq 0xb740
movq %rax, %r14
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x1d1b2
movq 0x18(%rsp), %rsi
incq %rsi
callq 0xb400
jmp 0x1d1b2
movq %rax, %r14
movb $0x1, %bpl
testb %bpl, %bpl
je 0x1d1bf
movq %rbx, %rdi
callq 0xb2d0
movq %r14, %rdi
callq 0xb780
nop
|
_ZNK8rapidcsv8Document7GetCellIiEET_RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEm:
push rbp
push r15
push r14
push rbx
sub rsp, 28h
mov rbx, rdx
mov r14, rsi
mov r15, rdi
call _ZNK8rapidcsv8Document12GetColumnIdxERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; rapidcsv::Document::GetColumnIdx(std::string const&)
test eax, eax
js short loc_1D143
mov esi, eax
mov rdi, r15
mov rdx, rbx
add rsp, 28h
pop rbx
pop r14
pop r15
pop rbp
jmp _ZNK8rapidcsv8Document7GetCellIiEET_mm; rapidcsv::Document::GetCell<int>(ulong,ulong)
loc_1D143:
mov edi, 10h; thrown_size
call ___cxa_allocate_exception
mov rbx, rax
lea rsi, aColumnNotFound; "column not found: "
lea rdi, [rsp+48h+var_40]
mov rdx, r14
call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_RKS8_; std::operator+<char>(char const*,std::string const&)
mov bpl, 1
lea rsi, [rsp+48h+var_40]
mov rdi, rbx
call __ZNSt12out_of_rangeC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; std::out_of_range::out_of_range(std::string const&)
xor ebp, ebp
mov rsi, cs:lptinfo; lptinfo
mov rdx, cs:_ZNSt12out_of_rangeD1Ev_ptr; void (*)(void *)
mov rdi, rbx; void *
call ___cxa_throw
mov r14, rax
lea rax, [rsp+48h+var_30]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_1D1B2
mov rsi, [rsp+48h+var_30]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_1D1B2
mov r14, rax
mov bpl, 1
loc_1D1B2:
test bpl, bpl
jz short loc_1D1BF
mov rdi, rbx; void *
call ___cxa_free_exception
loc_1D1BF:
mov rdi, r14
call __Unwind_Resume
|
long long rapidcsv::Document::GetCell<int>(long long a1, _QWORD *a2, long long a3)
{
int ColumnIdx; // eax
void *exception; // rbx
_BYTE v7[16]; // [rsp+8h] [rbp-40h] BYREF
ColumnIdx = rapidcsv::Document::GetColumnIdx(a1, a2);
if ( ColumnIdx < 0 )
{
exception = __cxa_allocate_exception(0x10uLL);
std::operator+<char>((long long)v7, (long long)"column not found: ", a2);
std::out_of_range::out_of_range(exception, v7);
__cxa_throw(
exception,
(struct type_info *)&`typeinfo for'std::out_of_range,
(void (*)(void *))&std::out_of_range::~out_of_range);
}
return rapidcsv::Document::GetCell<int>(a1, (unsigned int)ColumnIdx, a3);
}
|
GetCell<int>:
PUSH RBP
PUSH R15
PUSH R14
PUSH RBX
SUB RSP,0x28
MOV RBX,RDX
MOV R14,RSI
MOV R15,RDI
CALL 0x0011f310
TEST EAX,EAX
JS 0x0011d143
MOV ESI,EAX
MOV RDI,R15
MOV RDX,RBX
ADD RSP,0x28
POP RBX
POP R14
POP R15
POP RBP
JMP 0x0011fc18
LAB_0011d143:
MOV EDI,0x10
CALL 0x0010b1b0
MOV RBX,RAX
LAB_0011d150:
LEA RSI,[0x13dbe2]
LEA RDI,[RSP + 0x8]
MOV RDX,R14
CALL 0x00115023
MOV BPL,0x1
LAB_0011d167:
LEA RSI,[RSP + 0x8]
MOV RDI,RBX
CALL 0x0010b660
XOR EBP,EBP
MOV RSI,qword ptr [0x00159fc8]
MOV RDX,qword ptr [0x00159fc0]
MOV RDI,RBX
CALL 0x0010b740
|
/* int rapidcsv::Document::GetCell<int>(std::__cxx11::string const&, unsigned long) const */
int __thiscall rapidcsv::Document::GetCell<int>(Document *this,string *param_1,ulong param_2)
{
out_of_range *this_00;
uint uVar1;
int iVar2;
string local_40 [32];
uVar1 = GetColumnIdx(this,param_1);
if (-1 < (int)uVar1) {
iVar2 = GetCell<int>(this,(ulong)uVar1,param_2);
return iVar2;
}
this_00 = (out_of_range *)__cxa_allocate_exception(0x10);
/* try { // try from 0011d150 to 0011d163 has its CatchHandler @ 0011d1ac */
std::operator+((char *)local_40,(string *)"column not found: ");
/* try { // try from 0011d167 to 0011d18b has its CatchHandler @ 0011d18c */
std::out_of_range::out_of_range(this_00,local_40);
/* WARNING: Subroutine does not return */
__cxa_throw(this_00,PTR_typeinfo_00159fc8,PTR__out_of_range_00159fc0);
}
|
|
61,876 |
int rapidcsv::Document::GetCell<int>(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, unsigned long) const
|
Andrewchistyakov[P]flashcards_lyc/src/rapidcsv.h
|
T GetCell(const std::string& pColumnName, const size_t pRowIdx) const
{
const int columnIdx = GetColumnIdx(pColumnName);
if (columnIdx < 0)
{
throw std::out_of_range("column not found: " + pColumnName);
}
return GetCell<T>(static_cast<size_t>(columnIdx), pRowIdx);
}
|
O3
|
c
|
int rapidcsv::Document::GetCell<int>(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, unsigned long) const:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x28, %rsp
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
callq 0x1f1fa
testl %eax, %eax
js 0x1cfd9
movl %eax, %esi
movq %r15, %rdi
movq %rbx, %rdx
addq $0x28, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x1fb08
movl $0x10, %edi
callq 0xb1b0
movq %rax, %rbx
leaq 0x1fc25(%rip), %rsi # 0x3cc12
leaq 0x8(%rsp), %rdi
movq %r14, %rdx
callq 0x14eb7
movb $0x1, %bpl
leaq 0x8(%rsp), %rsi
movq %rbx, %rdi
callq 0xb660
xorl %ebp, %ebp
movq 0x3bfb5(%rip), %rsi # 0x58fc8
movq 0x3bfa6(%rip), %rdx # 0x58fc0
movq %rbx, %rdi
callq 0xb740
movq %rax, %r14
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x1d040
movq 0x18(%rsp), %rsi
incq %rsi
callq 0xb400
testb %bpl, %bpl
jne 0x1d04a
jmp 0x1d052
movq %rax, %r14
movq %rbx, %rdi
callq 0xb2d0
movq %r14, %rdi
callq 0xb780
|
_ZNK8rapidcsv8Document7GetCellIiEET_RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEm:
push rbp
push r15
push r14
push rbx
sub rsp, 28h
mov rbx, rdx
mov r14, rsi
mov r15, rdi
call _ZNK8rapidcsv8Document12GetColumnIdxERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; rapidcsv::Document::GetColumnIdx(std::string const&)
test eax, eax
js short loc_1CFD9
mov esi, eax
mov rdi, r15
mov rdx, rbx
add rsp, 28h
pop rbx
pop r14
pop r15
pop rbp
jmp _ZNK8rapidcsv8Document7GetCellIiEET_mm; rapidcsv::Document::GetCell<int>(ulong,ulong)
loc_1CFD9:
mov edi, 10h; thrown_size
call ___cxa_allocate_exception
mov rbx, rax
lea rsi, aColumnNotFound; "column not found: "
lea rdi, [rsp+48h+var_40]
mov rdx, r14
call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_RKS8_; std::operator+<char>(char const*,std::string const&)
mov bpl, 1
lea rsi, [rsp+48h+var_40]
mov rdi, rbx
call __ZNSt12out_of_rangeC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; std::out_of_range::out_of_range(std::string const&)
xor ebp, ebp
mov rsi, cs:lptinfo; lptinfo
mov rdx, cs:_ZNSt12out_of_rangeD1Ev_ptr; void (*)(void *)
mov rdi, rbx; void *
call ___cxa_throw
mov r14, rax
lea rax, [rsp+48h+var_30]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_1D040
mov rsi, [rsp+48h+var_30]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_1D040:
test bpl, bpl
jnz short loc_1D04A
jmp short loc_1D052
mov r14, rax
loc_1D04A:
mov rdi, rbx; void *
call ___cxa_free_exception
loc_1D052:
mov rdi, r14
call __Unwind_Resume
|
long long rapidcsv::Document::GetCell<int>(long long a1, _QWORD *a2, long long a3)
{
int ColumnIdx; // eax
void *exception; // rbx
_BYTE v7[16]; // [rsp+8h] [rbp-40h] BYREF
ColumnIdx = rapidcsv::Document::GetColumnIdx(a1, a2);
if ( ColumnIdx < 0 )
{
exception = __cxa_allocate_exception(0x10uLL);
std::operator+<char>((long long)v7, (long long)"column not found: ", a2);
std::out_of_range::out_of_range(exception, v7);
__cxa_throw(
exception,
(struct type_info *)&`typeinfo for'std::out_of_range,
(void (*)(void *))&std::out_of_range::~out_of_range);
}
return rapidcsv::Document::GetCell<int>(a1, (unsigned int)ColumnIdx, a3);
}
|
GetCell<int>:
PUSH RBP
PUSH R15
PUSH R14
PUSH RBX
SUB RSP,0x28
MOV RBX,RDX
MOV R14,RSI
MOV R15,RDI
CALL 0x0011f1fa
TEST EAX,EAX
JS 0x0011cfd9
MOV ESI,EAX
MOV RDI,R15
MOV RDX,RBX
ADD RSP,0x28
POP RBX
POP R14
POP R15
POP RBP
JMP 0x0011fb08
LAB_0011cfd9:
MOV EDI,0x10
CALL 0x0010b1b0
MOV RBX,RAX
LAB_0011cfe6:
LEA RSI,[0x13cc12]
LEA RDI,[RSP + 0x8]
MOV RDX,R14
CALL 0x00114eb7
MOV BPL,0x1
LAB_0011cffd:
LEA RSI,[RSP + 0x8]
MOV RDI,RBX
CALL 0x0010b660
XOR EBP,EBP
MOV RSI,qword ptr [0x00158fc8]
MOV RDX,qword ptr [0x00158fc0]
MOV RDI,RBX
CALL 0x0010b740
|
/* int rapidcsv::Document::GetCell<int>(std::__cxx11::string const&, unsigned long) const */
int __thiscall rapidcsv::Document::GetCell<int>(Document *this,string *param_1,ulong param_2)
{
out_of_range *this_00;
uint uVar1;
int iVar2;
string local_40 [32];
uVar1 = GetColumnIdx(this,param_1);
if (-1 < (int)uVar1) {
iVar2 = GetCell<int>(this,(ulong)uVar1,param_2);
return iVar2;
}
this_00 = (out_of_range *)__cxa_allocate_exception(0x10);
/* try { // try from 0011cfe6 to 0011cff9 has its CatchHandler @ 0011d047 */
std::operator+((char *)local_40,(string *)"column not found: ");
/* try { // try from 0011cffd to 0011d021 has its CatchHandler @ 0011d022 */
std::out_of_range::out_of_range(this_00,local_40);
/* WARNING: Subroutine does not return */
__cxa_throw(this_00,PTR_typeinfo_00158fc8,PTR__out_of_range_00158fc0);
}
|
|
61,877 |
open_logfile_by_number_no_cache
|
eloqsql/storage/maria/ma_loghandler.c
|
static File open_logfile_by_number_no_cache(uint32 file_no)
{
File file;
char path[FN_REFLEN];
DBUG_ENTER("open_logfile_by_number_no_cache");
/* TODO: add O_DIRECT to open flags (when buffer is aligned) */
/* TODO: use mysql_file_create() */
if ((file= mysql_file_open(key_file_translog,
translog_filename_by_fileno(file_no, path),
log_descriptor.open_flags | O_CLOEXEC,
MYF(MY_WME))) < 0)
{
DBUG_PRINT("error", ("Error %d during opening file '%s'", errno, path));
DBUG_RETURN(-1);
}
DBUG_PRINT("info", ("File: '%s' handler: %d", path, file));
DBUG_RETURN(file);
}
|
O0
|
c
|
open_logfile_by_number_no_cache:
pushq %rbp
movq %rsp, %rbp
subq $0x230, %rsp # imm = 0x230
movq %fs:0x28, %rax
movq %rax, -0x8(%rbp)
movl %edi, -0x218(%rbp)
leaq 0x46772f(%rip), %rax # 0x4ad094
movl (%rax), %eax
movl %eax, -0x220(%rbp)
movl -0x218(%rbp), %edi
leaq -0x210(%rbp), %rsi
callq 0x45370
movl -0x220(%rbp), %edi
movq %rax, %rcx
movl 0x468dbd(%rip), %r8d # 0x4ae74c
orl $0x80000, %r8d # imm = 0x80000
leaq 0x1389ab(%rip), %rsi # 0x17e348
movl $0x406, %edx # imm = 0x406
movl $0x10, %r9d
callq 0x4e3a0
movl %eax, -0x21c(%rbp)
cmpl $0x0, %eax
jge 0x459ca
jmp 0x459ba
jmp 0x459bc
jmp 0x459be
movl $0xffffffff, -0x214(%rbp) # imm = 0xFFFFFFFF
jmp 0x459dc
jmp 0x459cc
jmp 0x459ce
jmp 0x459d0
movl -0x21c(%rbp), %eax
movl %eax, -0x214(%rbp)
movl -0x214(%rbp), %eax
movl %eax, -0x224(%rbp)
movq %fs:0x28, %rax
movq -0x8(%rbp), %rcx
cmpq %rcx, %rax
jne 0x45a09
movl -0x224(%rbp), %eax
addq $0x230, %rsp # imm = 0x230
popq %rbp
retq
callq 0x2a290
nop
|
open_logfile_by_number_no_cache:
push rbp
mov rbp, rsp
sub rsp, 230h
mov rax, fs:28h
mov [rbp+var_8], rax
mov [rbp+var_218], edi
lea rax, key_file_translog
mov eax, [rax]
mov [rbp+var_220], eax
mov edi, [rbp+var_218]
lea rsi, [rbp+var_210]
call translog_filename_by_fileno
mov edi, [rbp+var_220]
mov rcx, rax
mov r8d, cs:dword_4AE74C
or r8d, 80000h
lea rsi, aWorkspaceLlm4b_7; "/workspace/llm4binary/github2025/eloqsq"...
mov edx, 406h
mov r9d, 10h
call inline_mysql_file_open_0
mov [rbp+var_21C], eax
cmp eax, 0
jge short loc_459CA
jmp short $+2
loc_459BA:
jmp short $+2
loc_459BC:
jmp short $+2
loc_459BE:
mov [rbp+var_214], 0FFFFFFFFh
jmp short loc_459DC
loc_459CA:
jmp short $+2
loc_459CC:
jmp short $+2
loc_459CE:
jmp short $+2
loc_459D0:
mov eax, [rbp+var_21C]
mov [rbp+var_214], eax
loc_459DC:
mov eax, [rbp+var_214]
mov [rbp+var_224], eax
mov rax, fs:28h
mov rcx, [rbp+var_8]
cmp rax, rcx
jnz short loc_45A09
mov eax, [rbp+var_224]
add rsp, 230h
pop rbp
retn
loc_45A09:
call ___stack_chk_fail
|
long long open_logfile_by_number_no_cache(unsigned int a1, long long a2, long long a3, long long a4, int a5, int a6)
{
long long v6; // rax
unsigned int v8; // [rsp+10h] [rbp-220h]
int v9; // [rsp+14h] [rbp-21Ch]
_BYTE v11[520]; // [rsp+20h] [rbp-210h] BYREF
unsigned long long v12; // [rsp+228h] [rbp-8h]
v12 = __readfsqword(0x28u);
v8 = key_file_translog;
v6 = translog_filename_by_fileno(a1, (long long)v11, a3, a4, a5, a6);
v9 = inline_mysql_file_open_0(
v8,
"/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_loghandler.c",
1030LL,
v6,
dword_4AE74C | 0x80000u,
16LL);
if ( v9 >= 0 )
return (unsigned int)v9;
else
return (unsigned int)-1;
}
|
open_logfile_by_number_no_cache:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x230
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x8],RAX
MOV dword ptr [RBP + -0x218],EDI
LEA RAX,[0x5ad094]
MOV EAX,dword ptr [RAX]
MOV dword ptr [RBP + -0x220],EAX
MOV EDI,dword ptr [RBP + -0x218]
LEA RSI,[RBP + -0x210]
CALL 0x00145370
MOV EDI,dword ptr [RBP + -0x220]
MOV RCX,RAX
MOV R8D,dword ptr [0x005ae74c]
OR R8D,0x80000
LEA RSI,[0x27e348]
MOV EDX,0x406
MOV R9D,0x10
CALL 0x0014e3a0
MOV dword ptr [RBP + -0x21c],EAX
CMP EAX,0x0
JGE 0x001459ca
JMP 0x001459ba
LAB_001459ba:
JMP 0x001459bc
LAB_001459bc:
JMP 0x001459be
LAB_001459be:
MOV dword ptr [RBP + -0x214],0xffffffff
JMP 0x001459dc
LAB_001459ca:
JMP 0x001459cc
LAB_001459cc:
JMP 0x001459ce
LAB_001459ce:
JMP 0x001459d0
LAB_001459d0:
MOV EAX,dword ptr [RBP + -0x21c]
MOV dword ptr [RBP + -0x214],EAX
LAB_001459dc:
MOV EAX,dword ptr [RBP + -0x214]
MOV dword ptr [RBP + -0x224],EAX
MOV RAX,qword ptr FS:[0x28]
MOV RCX,qword ptr [RBP + -0x8]
CMP RAX,RCX
JNZ 0x00145a09
MOV EAX,dword ptr [RBP + -0x224]
ADD RSP,0x230
POP RBP
RET
LAB_00145a09:
CALL 0x0012a290
|
int open_logfile_by_number_no_cache(int4 param_1)
{
int4 uVar1;
int8 uVar2;
long in_FS_OFFSET;
int local_21c;
int1 local_218 [520];
long local_10;
uVar1 = key_file_translog;
local_10 = *(long *)(in_FS_OFFSET + 0x28);
uVar2 = translog_filename_by_fileno(param_1,local_218);
local_21c = inline_mysql_file_open
(uVar1,
"/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_loghandler.c",
0x406,uVar2,DAT_005ae74c | 0x80000,0x10);
if (local_21c < 0) {
local_21c = -1;
}
if (*(long *)(in_FS_OFFSET + 0x28) != local_10) {
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
return local_21c;
}
|
|
61,878 |
open_logfile_by_number_no_cache
|
eloqsql/storage/maria/ma_loghandler.c
|
static File open_logfile_by_number_no_cache(uint32 file_no)
{
File file;
char path[FN_REFLEN];
DBUG_ENTER("open_logfile_by_number_no_cache");
/* TODO: add O_DIRECT to open flags (when buffer is aligned) */
/* TODO: use mysql_file_create() */
if ((file= mysql_file_open(key_file_translog,
translog_filename_by_fileno(file_no, path),
log_descriptor.open_flags | O_CLOEXEC,
MYF(MY_WME))) < 0)
{
DBUG_PRINT("error", ("Error %d during opening file '%s'", errno, path));
DBUG_RETURN(-1);
}
DBUG_PRINT("info", ("File: '%s' handler: %d", path, file));
DBUG_RETURN(file);
}
|
O3
|
c
|
open_logfile_by_number_no_cache:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x258, %rsp # imm = 0x258
movq %fs:0x28, %rax
movq %rax, -0x30(%rbp)
leaq 0x3e2066(%rip), %rax # 0x425504
movl (%rax), %r14d
leaq -0x230(%rbp), %r15
movq %r15, %rsi
callq 0x4314d
movl $0x80000, %ebx # imm = 0x80000
orl 0x3e3701(%rip), %ebx # 0x426bbc
leaq 0x36b556(%rip), %r13 # 0x3aea18
movq (%r13), %rax
leaq -0x280(%rbp), %rdi
leaq -0x238(%rbp), %r12
movl %r14d, %esi
movl $0x2, %edx
movq %r15, %rcx
movq %r12, %r8
callq *0x148(%rax)
movq %rax, (%r12)
testq %rax, %rax
jne 0x43531
leaq -0x230(%rbp), %rdi
movl $0x10, %edx
movl %ebx, %esi
callq 0xbf950
movl %eax, %ebx
testl %ebx, %ebx
movl $0xffffffff, %eax # imm = 0xFFFFFFFF
cmovnsl %ebx, %eax
movq %fs:0x28, %rcx
cmpq -0x30(%rbp), %rcx
jne 0x43574
addq $0x258, %rsp # imm = 0x258
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq (%r13), %rcx
leaq 0xb5dac(%rip), %rsi # 0xf92e8
movq %rax, %rdi
movl $0x406, %edx # imm = 0x406
callq *0x1f0(%rcx)
leaq -0x230(%rbp), %rdi
movl $0x10, %edx
movl %ebx, %esi
callq 0xbf950
movl %eax, %ebx
movq (%r13), %rax
movq -0x238(%rbp), %rdi
movl %ebx, %esi
callq *0x200(%rax)
jmp 0x43506
callq 0x2a280
|
open_logfile_by_number_no_cache:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 258h
mov rax, fs:28h
mov [rbp+var_30], rax
lea rax, key_file_translog
mov r14d, [rax]
lea r15, [rbp+var_230]
mov rsi, r15
call translog_filename_by_fileno
mov ebx, 80000h
or ebx, cs:dword_426BBC
lea r13, PSI_server
mov rax, [r13+0]
lea rdi, [rbp+var_280]
lea r12, [rbp+var_238]
mov esi, r14d
mov edx, 2
mov rcx, r15
mov r8, r12
call qword ptr [rax+148h]
mov [r12], rax
test rax, rax
jnz short loc_43531
lea rdi, [rbp+var_230]
mov edx, 10h
mov esi, ebx
call my_open
mov ebx, eax
loc_43506:
test ebx, ebx
mov eax, 0FFFFFFFFh
cmovns eax, ebx
mov rcx, fs:28h
cmp rcx, [rbp+var_30]
jnz short loc_43574
add rsp, 258h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_43531:
mov rcx, [r13+0]
lea rsi, aWorkspaceLlm4b_5; "/workspace/llm4binary/github2025/eloqsq"...
mov rdi, rax
mov edx, 406h
call qword ptr [rcx+1F0h]
lea rdi, [rbp+var_230]
mov edx, 10h
mov esi, ebx
call my_open
mov ebx, eax
mov rax, [r13+0]
mov rdi, [rbp+var_238]
mov esi, ebx
call qword ptr [rax+200h]
jmp short loc_43506
loc_43574:
call ___stack_chk_fail
|
long long open_logfile_by_number_no_cache(unsigned int a1, long long a2, long long a3, long long a4, int a5, int a6)
{
unsigned int v6; // r14d
unsigned int v7; // ebx
long long v8; // rax
long long v9; // rbx
long long result; // rax
_BYTE v11[72]; // [rsp+0h] [rbp-280h] BYREF
long long v12; // [rsp+48h] [rbp-238h] BYREF
_BYTE v13[512]; // [rsp+50h] [rbp-230h] BYREF
unsigned long long v14; // [rsp+250h] [rbp-30h]
v14 = __readfsqword(0x28u);
v6 = key_file_translog;
translog_filename_by_fileno(a1, (long long)v13, a3, a4, a5, a6);
v7 = dword_426BBC | 0x80000;
v8 = ((long long ( *)(_BYTE *, _QWORD, long long, _BYTE *, long long *))PSI_server[41])(v11, v6, 2LL, v13, &v12);
v12 = v8;
if ( v8 )
{
((void ( *)(long long, const char *, long long))PSI_server[62])(
v8,
"/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_loghandler.c",
1030LL);
v9 = (unsigned int)my_open(v13, v7, 16LL);
((void ( *)(long long, long long))PSI_server[64])(v12, v9);
}
else
{
LODWORD(v9) = my_open(v13, v7, 16LL);
}
result = 0xFFFFFFFFLL;
if ( (int)v9 >= 0 )
return (unsigned int)v9;
return result;
}
|
open_logfile_by_number_no_cache:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x258
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x30],RAX
LEA RAX,[0x525504]
MOV R14D,dword ptr [RAX]
LEA R15,[RBP + -0x230]
MOV RSI,R15
CALL 0x0014314d
MOV EBX,0x80000
OR EBX,dword ptr [0x00526bbc]
LEA R13,[0x4aea18]
MOV RAX,qword ptr [R13]
LEA RDI,[RBP + -0x280]
LEA R12,[RBP + -0x238]
MOV ESI,R14D
MOV EDX,0x2
MOV RCX,R15
MOV R8,R12
CALL qword ptr [RAX + 0x148]
MOV qword ptr [R12],RAX
TEST RAX,RAX
JNZ 0x00143531
LEA RDI,[RBP + -0x230]
MOV EDX,0x10
MOV ESI,EBX
CALL 0x001bf950
MOV EBX,EAX
LAB_00143506:
TEST EBX,EBX
MOV EAX,0xffffffff
CMOVNS EAX,EBX
MOV RCX,qword ptr FS:[0x28]
CMP RCX,qword ptr [RBP + -0x30]
JNZ 0x00143574
ADD RSP,0x258
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_00143531:
MOV RCX,qword ptr [R13]
LEA RSI,[0x1f92e8]
MOV RDI,RAX
MOV EDX,0x406
CALL qword ptr [RCX + 0x1f0]
LEA RDI,[RBP + -0x230]
MOV EDX,0x10
MOV ESI,EBX
CALL 0x001bf950
MOV EBX,EAX
MOV RAX,qword ptr [R13]
MOV RDI,qword ptr [RBP + -0x238]
MOV ESI,EBX
CALL qword ptr [RAX + 0x200]
JMP 0x00143506
LAB_00143574:
CALL 0x0012a280
|
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
int open_logfile_by_number_no_cache(int8 param_1)
{
int4 uVar1;
int iVar2;
int iVar3;
uint uVar4;
long in_FS_OFFSET;
int1 local_288 [72];
long local_240;
int1 local_238 [512];
long local_38;
uVar1 = key_file_translog;
local_38 = *(long *)(in_FS_OFFSET + 0x28);
translog_filename_by_fileno(param_1,local_238);
uVar4 = _DAT_00526bbc | 0x80000;
local_240 = (**(code **)(PSI_server + 0x148))(local_288,uVar1,2,local_238,&local_240);
if (local_240 == 0) {
iVar2 = my_open(local_238,uVar4,0x10);
}
else {
(**(code **)(PSI_server + 0x1f0))
(local_240,"/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_loghandler.c",
0x406);
iVar2 = my_open(local_238,uVar4,0x10);
(**(code **)(PSI_server + 0x200))(local_240,iVar2);
}
iVar3 = -1;
if (-1 < iVar2) {
iVar3 = iVar2;
}
if (*(long *)(in_FS_OFFSET + 0x28) == local_38) {
return iVar3;
}
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
|
|
61,879 |
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;
}
|
O3
|
c
|
my_well_formed_char_length_ucs2:
pushq %rbp
movq %rsp, %rbp
movq %rcx, %rax
movq %rdx, %rcx
subq %rsi, %rcx
leaq (%rax,%rax), %rdi
cmpq %rcx, %rdi
jbe 0x7f0a3
movl %ecx, %eax
andl $0x1, %eax
movq %rax, %rsi
negq %rsi
leaq -0x1(%rdx), %rdi
andq %rdi, %rsi
testq %rax, %rax
cmoveq %rdx, %rdi
movq %rsi, 0x8(%r8)
movq %rdi, (%r8)
shrq %rcx
movq %rcx, %rax
jmp 0x7f0b1
movq $0x0, 0x8(%r8)
addq %rdi, %rsi
movq %rsi, (%r8)
popq %rbp
retq
|
my_well_formed_char_length_ucs2:
push rbp
mov rbp, rsp
mov rax, rcx
mov rcx, rdx
sub rcx, rsi
lea rdi, [rax+rax]
cmp rdi, rcx
jbe short loc_7F0A3
mov eax, ecx
and eax, 1
mov rsi, rax
neg rsi
lea rdi, [rdx-1]
and rsi, rdi
test rax, rax
cmovz rdi, rdx
mov [r8+8], rsi
mov [r8], rdi
shr rcx, 1
mov rax, rcx
jmp short loc_7F0B1
loc_7F0A3:
mov qword ptr [r8+8], 0
add rsi, rdi
mov [r8], rsi
loc_7F0B1:
pop rbp
retn
|
unsigned long long my_well_formed_char_length_ucs2(
long long a1,
long long a2,
long long a3,
unsigned long long a4,
_QWORD *a5)
{
unsigned long long result; // rax
unsigned long long v6; // rcx
long long v7; // rdi
result = a4;
v6 = a3 - a2;
if ( 2 * result <= a3 - a2 )
{
a5[1] = 0LL;
*a5 = 2 * result + a2;
}
else
{
v7 = a3 - 1;
if ( (v6 & 1) == 0 )
v7 = a3;
a5[1] = (a3 - 1) & -(long long)(v6 & 1);
*a5 = v7;
return v6 >> 1;
}
return result;
}
|
my_well_formed_char_length_ucs2:
PUSH RBP
MOV RBP,RSP
MOV RAX,RCX
MOV RCX,RDX
SUB RCX,RSI
LEA RDI,[RAX + RAX*0x1]
CMP RDI,RCX
JBE 0x0017f0a3
MOV EAX,ECX
AND EAX,0x1
MOV RSI,RAX
NEG RSI
LEA RDI,[RDX + -0x1]
AND RSI,RDI
TEST RAX,RAX
CMOVZ RDI,RDX
MOV qword ptr [R8 + 0x8],RSI
MOV qword ptr [R8],RDI
SHR RCX,0x1
MOV RAX,RCX
JMP 0x0017f0b1
LAB_0017f0a3:
MOV qword ptr [R8 + 0x8],0x0
ADD RSI,RDI
MOV qword ptr [R8],RSI
LAB_0017f0b1:
POP RBP
RET
|
ulong my_well_formed_char_length_ucs2
(int8 param_1,long param_2,ulong param_3,ulong param_4,ulong *param_5)
{
ulong uVar1;
ulong uVar2;
ulong uVar3;
uVar2 = param_3 - param_2;
if (uVar2 < param_4 * 2) {
uVar1 = (ulong)((uint)uVar2 & 1);
uVar3 = param_3 - 1;
if (uVar1 == 0) {
uVar3 = param_3;
}
param_5[1] = -uVar1 & param_3 - 1;
*param_5 = uVar3;
param_4 = uVar2 >> 1;
}
else {
param_5[1] = 0;
*param_5 = param_2 + param_4 * 2;
}
return param_4;
}
|
|
61,880 |
stbi__refill_buffer(stbi__context*)
|
mnn-tts/MNN/3rd_party/imageHelper/stb_image.h
|
static void stbi__refill_buffer(stbi__context *s)
{
int n = (s->io.read)(s->io_user_data,(char*)s->buffer_start,s->buflen);
if (n == 0) {
// at end of file, treat same as if from memory, but need to handle case
// where s->img_buffer isn't pointing to safe memory, e.g. 0-byte file
s->read_from_callbacks = 0;
s->img_buffer = s->buffer_start;
s->img_buffer_end = s->buffer_start+1;
*s->img_buffer = 0;
} else {
s->img_buffer = s->buffer_start;
s->img_buffer_end = s->buffer_start + n;
}
}
|
O0
|
c
|
stbi__refill_buffer(stbi__context*):
subq $0x18, %rsp
movq %rdi, 0x10(%rsp)
movq 0x10(%rsp), %rax
movq 0x10(%rax), %rax
movq 0x10(%rsp), %rcx
movq 0x28(%rcx), %rdi
movq 0x10(%rsp), %rsi
addq $0x38, %rsi
movq 0x10(%rsp), %rcx
movl 0x34(%rcx), %edx
callq *%rax
movl %eax, 0xc(%rsp)
cmpl $0x0, 0xc(%rsp)
jne 0x11114
movq 0x10(%rsp), %rax
movl $0x0, 0x30(%rax)
movq 0x10(%rsp), %rcx
addq $0x38, %rcx
movq 0x10(%rsp), %rax
movq %rcx, 0xb8(%rax)
movq 0x10(%rsp), %rcx
addq $0x38, %rcx
addq $0x1, %rcx
movq 0x10(%rsp), %rax
movq %rcx, 0xc0(%rax)
movq 0x10(%rsp), %rax
movq 0xb8(%rax), %rax
movb $0x0, (%rax)
jmp 0x11146
movq 0x10(%rsp), %rcx
addq $0x38, %rcx
movq 0x10(%rsp), %rax
movq %rcx, 0xb8(%rax)
movq 0x10(%rsp), %rcx
addq $0x38, %rcx
movslq 0xc(%rsp), %rax
addq %rax, %rcx
movq 0x10(%rsp), %rax
movq %rcx, 0xc0(%rax)
addq $0x18, %rsp
retq
nopl (%rax,%rax)
|
_ZL19stbi__refill_bufferP13stbi__context:
sub rsp, 18h
mov [rsp+18h+var_8], rdi
mov rax, [rsp+18h+var_8]
mov rax, [rax+10h]
mov rcx, [rsp+18h+var_8]
mov rdi, [rcx+28h]
mov rsi, [rsp+18h+var_8]
add rsi, 38h ; '8'
mov rcx, [rsp+18h+var_8]
mov edx, [rcx+34h]
call rax
mov [rsp+18h+var_C], eax
cmp [rsp+18h+var_C], 0
jnz short loc_11114
mov rax, [rsp+18h+var_8]
mov dword ptr [rax+30h], 0
mov rcx, [rsp+18h+var_8]
add rcx, 38h ; '8'
mov rax, [rsp+18h+var_8]
mov [rax+0B8h], rcx
mov rcx, [rsp+18h+var_8]
add rcx, 38h ; '8'
add rcx, 1
mov rax, [rsp+18h+var_8]
mov [rax+0C0h], rcx
mov rax, [rsp+18h+var_8]
mov rax, [rax+0B8h]
mov byte ptr [rax], 0
jmp short loc_11146
loc_11114:
mov rcx, [rsp+18h+var_8]
add rcx, 38h ; '8'
mov rax, [rsp+18h+var_8]
mov [rax+0B8h], rcx
mov rcx, [rsp+18h+var_8]
add rcx, 38h ; '8'
movsxd rax, [rsp+18h+var_C]
add rcx, rax
mov rax, [rsp+18h+var_8]
mov [rax+0C0h], rcx
loc_11146:
add rsp, 18h
retn
|
_BYTE * stbi__refill_buffer(long long a1)
{
_BYTE *result; // rax
int v2; // [rsp+Ch] [rbp-Ch]
v2 = (*(long long ( **)(_QWORD, long long, _QWORD))(a1 + 16))(
*(_QWORD *)(a1 + 40),
a1 + 56,
*(unsigned int *)(a1 + 52));
if ( v2 )
{
*(_QWORD *)(a1 + 184) = a1 + 56;
result = (_BYTE *)a1;
*(_QWORD *)(a1 + 192) = v2 + a1 + 56;
}
else
{
*(_DWORD *)(a1 + 48) = 0;
*(_QWORD *)(a1 + 184) = a1 + 56;
*(_QWORD *)(a1 + 192) = a1 + 57;
result = *(_BYTE **)(a1 + 184);
*result = 0;
}
return result;
}
|
stbi__refill_buffer:
SUB RSP,0x18
MOV qword ptr [RSP + 0x10],RDI
MOV RAX,qword ptr [RSP + 0x10]
MOV RAX,qword ptr [RAX + 0x10]
MOV RCX,qword ptr [RSP + 0x10]
MOV RDI,qword ptr [RCX + 0x28]
MOV RSI,qword ptr [RSP + 0x10]
ADD RSI,0x38
MOV RCX,qword ptr [RSP + 0x10]
MOV EDX,dword ptr [RCX + 0x34]
CALL RAX
MOV dword ptr [RSP + 0xc],EAX
CMP dword ptr [RSP + 0xc],0x0
JNZ 0x00111114
MOV RAX,qword ptr [RSP + 0x10]
MOV dword ptr [RAX + 0x30],0x0
MOV RCX,qword ptr [RSP + 0x10]
ADD RCX,0x38
MOV RAX,qword ptr [RSP + 0x10]
MOV qword ptr [RAX + 0xb8],RCX
MOV RCX,qword ptr [RSP + 0x10]
ADD RCX,0x38
ADD RCX,0x1
MOV RAX,qword ptr [RSP + 0x10]
MOV qword ptr [RAX + 0xc0],RCX
MOV RAX,qword ptr [RSP + 0x10]
MOV RAX,qword ptr [RAX + 0xb8]
MOV byte ptr [RAX],0x0
JMP 0x00111146
LAB_00111114:
MOV RCX,qword ptr [RSP + 0x10]
ADD RCX,0x38
MOV RAX,qword ptr [RSP + 0x10]
MOV qword ptr [RAX + 0xb8],RCX
MOV RCX,qword ptr [RSP + 0x10]
ADD RCX,0x38
MOVSXD RAX,dword ptr [RSP + 0xc]
ADD RCX,RAX
MOV RAX,qword ptr [RSP + 0x10]
MOV qword ptr [RAX + 0xc0],RCX
LAB_00111146:
ADD RSP,0x18
RET
|
/* stbi__refill_buffer(stbi__context*) */
void stbi__refill_buffer(stbi__context *param_1)
{
int iVar1;
iVar1 = (**(code **)(param_1 + 0x10))
(*(int8 *)(param_1 + 0x28),param_1 + 0x38,*(int4 *)(param_1 + 0x34))
;
if (iVar1 == 0) {
*(int4 *)(param_1 + 0x30) = 0;
*(stbi__context **)(param_1 + 0xb8) = param_1 + 0x38;
*(stbi__context **)(param_1 + 0xc0) = param_1 + 0x39;
**(int1 **)(param_1 + 0xb8) = 0;
}
else {
*(stbi__context **)(param_1 + 0xb8) = param_1 + 0x38;
*(stbi__context **)(param_1 + 0xc0) = param_1 + (long)iVar1 + 0x38;
}
return;
}
|
|
61,881 |
pvio_socket_async_write
|
eloqsql/libmariadb/plugins/pvio/pvio_socket.c
|
ssize_t pvio_socket_async_write(MARIADB_PVIO *pvio, const uchar *buffer, size_t length)
{
ssize_t r= -1;
struct st_pvio_socket *csock= NULL;
#ifndef _WIN32
int write_flags= MSG_DONTWAIT;
#ifdef MSG_NOSIGNAL
write_flags|= MSG_NOSIGNAL;
#endif
#endif
if (!pvio || !pvio->data)
return -1;
csock= (struct st_pvio_socket *)pvio->data;
#ifndef WIN32
r= ma_send(csock->socket, buffer, length, write_flags);
#else
/* Windows doesn't support MSG_DONTWAIT, so we need to set
socket to non blocking */
pvio_socket_blocking(pvio, 0, 0);
r= send(csock->socket, (const char *)buffer, (int)length, 0);
#endif
return r;
}
|
O0
|
c
|
pvio_socket_async_write:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq $-0x1, -0x28(%rbp)
movq $0x0, -0x30(%rbp)
movl $0x40, -0x34(%rbp)
movl -0x34(%rbp), %eax
orl $0x4000, %eax # imm = 0x4000
movl %eax, -0x34(%rbp)
cmpq $0x0, -0x10(%rbp)
je 0x41077
movq -0x10(%rbp), %rax
cmpq $0x0, (%rax)
jne 0x41081
movq $-0x1, -0x8(%rbp)
jmp 0x410ae
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rax
movl (%rax), %edi
movq -0x18(%rbp), %rsi
movq -0x20(%rbp), %rdx
movl -0x34(%rbp), %ecx
callq 0x424f0
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x40, %rsp
popq %rbp
retq
nopl (%rax,%rax)
|
pvio_socket_async_write:
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], 0FFFFFFFFFFFFFFFFh
mov [rbp+var_30], 0
mov [rbp+var_34], 40h ; '@'
mov eax, [rbp+var_34]
or eax, 4000h
mov [rbp+var_34], eax
cmp [rbp+var_10], 0
jz short loc_41077
mov rax, [rbp+var_10]
cmp qword ptr [rax], 0
jnz short loc_41081
loc_41077:
mov [rbp+var_8], 0FFFFFFFFFFFFFFFFh
jmp short loc_410AE
loc_41081:
mov rax, [rbp+var_10]
mov rax, [rax]
mov [rbp+var_30], rax
mov rax, [rbp+var_30]
mov edi, [rax]
mov rsi, [rbp+var_18]
mov rdx, [rbp+var_20]
mov ecx, [rbp+var_34]
call ma_send
mov [rbp+var_28], rax
mov rax, [rbp+var_28]
mov [rbp+var_8], rax
loc_410AE:
mov rax, [rbp+var_8]
add rsp, 40h
pop rbp
retn
|
long long pvio_socket_async_write(_QWORD *a1, long long a2, long long a3)
{
if ( a1 && *a1 )
return ma_send(*(unsigned int *)*a1, a2, a3, 16448LL);
else
return -1LL;
}
|
pvio_socket_async_write:
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],-0x1
MOV qword ptr [RBP + -0x30],0x0
MOV dword ptr [RBP + -0x34],0x40
MOV EAX,dword ptr [RBP + -0x34]
OR EAX,0x4000
MOV dword ptr [RBP + -0x34],EAX
CMP qword ptr [RBP + -0x10],0x0
JZ 0x00141077
MOV RAX,qword ptr [RBP + -0x10]
CMP qword ptr [RAX],0x0
JNZ 0x00141081
LAB_00141077:
MOV qword ptr [RBP + -0x8],-0x1
JMP 0x001410ae
LAB_00141081:
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x30],RAX
MOV RAX,qword ptr [RBP + -0x30]
MOV EDI,dword ptr [RAX]
MOV RSI,qword ptr [RBP + -0x18]
MOV RDX,qword ptr [RBP + -0x20]
MOV ECX,dword ptr [RBP + -0x34]
CALL 0x001424f0
MOV qword ptr [RBP + -0x28],RAX
MOV RAX,qword ptr [RBP + -0x28]
MOV qword ptr [RBP + -0x8],RAX
LAB_001410ae:
MOV RAX,qword ptr [RBP + -0x8]
ADD RSP,0x40
POP RBP
RET
|
int8 pvio_socket_async_write(long *param_1,int8 param_2,int8 param_3)
{
int8 local_10;
if ((param_1 == (long *)0x0) || (*param_1 == 0)) {
local_10 = 0xffffffffffffffff;
}
else {
local_10 = ma_send(*(int4 *)*param_1,param_2,param_3,0x4040);
}
return local_10;
}
|
|
61,882 |
common_tokenize(llama_vocab const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, bool, bool)
|
llama.cpp/common/common.cpp
|
std::vector<llama_token> common_tokenize(
const struct llama_vocab * vocab,
const std::string & text,
bool add_special,
bool parse_special) {
// upper limit for the number of tokens
int n_tokens = text.length() + 2 * add_special;
std::vector<llama_token> result(n_tokens);
n_tokens = llama_tokenize(vocab, text.data(), text.length(), result.data(), result.size(), add_special, parse_special);
if (n_tokens < 0) {
result.resize(-n_tokens);
int check = llama_tokenize(vocab, text.data(), text.length(), result.data(), result.size(), add_special, parse_special);
GGML_ASSERT(check == -n_tokens);
} else {
result.resize(n_tokens);
}
return result;
}
|
O3
|
cpp
|
common_tokenize(llama_vocab const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, bool, bool):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movl %r8d, %ebp
movl %ecx, %r14d
movq %rdx, %r12
movq %rsi, %r15
movq %rdi, %rbx
leal (%r14,%r14), %eax
addl 0x8(%rdx), %eax
movslq %eax, %rsi
leaq 0x17(%rsp), %rdx
callq 0xfaab6
movq (%r12), %rsi
movl 0x8(%r12), %edx
movq (%rbx), %rcx
movq 0x8(%rbx), %r8
subq %rcx, %r8
shrq $0x2, %r8
movl %ebp, (%rsp)
movq %r15, %rdi
movl %r14d, %r9d
callq 0x213f0
movl %eax, %r13d
testl %eax, %eax
js 0xf9f9a
movl %r13d, %esi
movq %rbx, %rdi
callq 0xfab42
jmp 0xf9fd7
negl %r13d
movq %rbx, %rdi
movq %r13, %rsi
callq 0xfab42
movq (%r12), %rsi
movl 0x8(%r12), %edx
movq (%rbx), %rcx
movq 0x8(%rbx), %r8
subq %rcx, %r8
shrq $0x2, %r8
movzbl %bpl, %eax
movl %eax, (%rsp)
movzbl %r14b, %r9d
movq %r15, %rdi
callq 0x213f0
cmpl %r13d, %eax
jne 0xf9fe9
movq %rbx, %rax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x2aa15(%rip), %rdi # 0x124a05
leaq 0x1fecc(%rip), %rdx # 0x119ec3
leaq 0x2b016(%rip), %rcx # 0x125014
movl $0x4db, %esi # imm = 0x4DB
xorl %eax, %eax
callq 0x20e70
jmp 0xfa00c
movq %rax, %r14
movq (%rbx), %rdi
testq %rdi, %rdi
je 0xfa023
movq 0x10(%rbx), %rsi
subq %rdi, %rsi
callq 0x20180
movq %r14, %rdi
callq 0x20b00
|
_Z15common_tokenizePK11llama_vocabRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEbb:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 18h
mov ebp, r8d
mov r14d, ecx
mov r12, rdx
mov r15, rsi
mov rbx, rdi
lea eax, [r14+r14]
add eax, [rdx+8]
movsxd rsi, eax
lea rdx, [rsp+48h+var_31]
call _ZNSt6vectorIiSaIiEEC2EmRKS0_; std::vector<int>::vector(ulong,std::allocator<int> const&)
mov rsi, [r12]
mov edx, [r12+8]
mov rcx, [rbx]
mov r8, [rbx+8]
sub r8, rcx
shr r8, 2
mov [rsp+48h+var_48], ebp
mov rdi, r15
mov r9d, r14d
call _llama_tokenize
mov r13d, eax
test eax, eax
js short loc_F9F9A
mov esi, r13d
mov rdi, rbx
call _ZNSt6vectorIiSaIiEE6resizeEm; std::vector<int>::resize(ulong)
jmp short loc_F9FD7
loc_F9F9A:
neg r13d
mov rdi, rbx
mov rsi, r13
call _ZNSt6vectorIiSaIiEE6resizeEm; std::vector<int>::resize(ulong)
mov rsi, [r12]
mov edx, [r12+8]
mov rcx, [rbx]
mov r8, [rbx+8]
sub r8, rcx
shr r8, 2
movzx eax, bpl
mov [rsp+48h+var_48], eax
movzx r9d, r14b
mov rdi, r15
call _llama_tokenize
cmp eax, r13d
jnz short loc_F9FE9
loc_F9FD7:
mov rax, rbx
add rsp, 18h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_F9FE9:
lea rdi, aWorkspaceLlm4b_2; "/workspace/llm4binary/github2025/llama."...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aCheckNTokens; "check == -n_tokens"
mov esi, 4DBh
xor eax, eax
call _ggml_abort
jmp short $+2
loc_FA00C:
mov r14, rax
mov rdi, [rbx]; void *
test rdi, rdi
jz short loc_FA023
mov rsi, [rbx+10h]
sub rsi, rdi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_FA023:
mov rdi, r14
call __Unwind_Resume
|
_QWORD * common_tokenize(_QWORD *a1, long long a2, _QWORD *a3, unsigned int a4, int a5)
{
int v8; // eax
int v9; // r13d
long long v11; // rax
long long v12; // r14
_BYTE v13[49]; // [rsp+17h] [rbp-31h] BYREF
std::vector<int>::vector(a1, (int)(*((_DWORD *)a3 + 2) + 2 * a4), v13);
v8 = llama_tokenize(a2, *a3, *((unsigned int *)a3 + 2), *a1, (a1[1] - *a1) >> 2, a4, a5);
if ( v8 < 0 )
{
v9 = -v8;
std::vector<int>::resize(a1, (unsigned int)-v8);
if ( (unsigned int)llama_tokenize(
a2,
*a3,
*((unsigned int *)a3 + 2),
*a1,
(a1[1] - *a1) >> 2,
(unsigned __int8)a4,
(unsigned __int8)a5) != v9 )
{
ggml_abort(
"/workspace/llm4binary/github2025/llama.cpp/common/common.cpp",
1243LL,
"GGML_ASSERT(%s) failed",
"check == -n_tokens");
v12 = v11;
if ( *a1 )
operator delete((void *)*a1, a1[2] - *a1);
_Unwind_Resume(v12);
}
}
else
{
std::vector<int>::resize(a1, (unsigned int)v8);
}
return a1;
}
|
common_tokenize:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x18
MOV EBP,R8D
MOV R14D,ECX
MOV R12,RDX
MOV R15,RSI
MOV RBX,RDI
LEA EAX,[R14 + R14*0x1]
ADD EAX,dword ptr [RDX + 0x8]
MOVSXD RSI,EAX
LEA RDX,[RSP + 0x17]
CALL 0x001faab6
MOV RSI,qword ptr [R12]
MOV EDX,dword ptr [R12 + 0x8]
MOV RCX,qword ptr [RBX]
MOV R8,qword ptr [RBX + 0x8]
SUB R8,RCX
SHR R8,0x2
LAB_001f9f78:
MOV dword ptr [RSP],EBP
MOV RDI,R15
MOV R9D,R14D
CALL 0x001213f0
MOV R13D,EAX
TEST EAX,EAX
JS 0x001f9f9a
MOV ESI,R13D
MOV RDI,RBX
CALL 0x001fab42
JMP 0x001f9fd7
LAB_001f9f9a:
NEG R13D
MOV RDI,RBX
MOV RSI,R13
CALL 0x001fab42
MOV RSI,qword ptr [R12]
MOV EDX,dword ptr [R12 + 0x8]
MOV RCX,qword ptr [RBX]
MOV R8,qword ptr [RBX + 0x8]
SUB R8,RCX
SHR R8,0x2
LAB_001f9fbf:
MOVZX EAX,BPL
MOV dword ptr [RSP],EAX
MOVZX R9D,R14B
MOV RDI,R15
CALL 0x001213f0
CMP EAX,R13D
JNZ 0x001f9fe9
LAB_001f9fd7:
MOV RAX,RBX
ADD RSP,0x18
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_001f9fe9:
LEA RDI,[0x224a05]
LEA RDX,[0x219ec3]
LEA RCX,[0x225014]
MOV ESI,0x4db
XOR EAX,EAX
CALL 0x00120e70
|
/* common_tokenize(llama_vocab const*, std::__cxx11::string const&, bool, bool) */
llama_vocab * common_tokenize(llama_vocab *param_1,string *param_2,bool param_3,bool param_4)
{
uint uVar1;
uint uVar2;
int7 in_register_00000009;
int7 in_register_00000011;
int8 *puVar3;
uint in_R8D;
puVar3 = (int8 *)CONCAT71(in_register_00000011,param_3);
std::vector<int,std::allocator<int>>::vector
((ulong)param_1,
(allocator *)
(long)((int)CONCAT71(in_register_00000009,param_4) * 2 + *(int *)(puVar3 + 1)));
/* try { // try from 001f9f78 to 001f9fa7 has its CatchHandler @ 001fa00c */
uVar1 = llama_tokenize(param_2,*puVar3,*(int4 *)(puVar3 + 1),*(long *)param_1,
(ulong)(*(long *)(param_1 + 8) - *(long *)param_1) >> 2,
CONCAT71(in_register_00000009,param_4) & 0xffffffff,in_R8D);
if ((int)uVar1 < 0) {
std::vector<int,std::allocator<int>>::resize
((vector<int,std::allocator<int>> *)param_1,(ulong)-uVar1);
/* try { // try from 001f9fbf to 001fa009 has its CatchHandler @ 001fa00a */
uVar2 = llama_tokenize(param_2,*puVar3,*(int4 *)(puVar3 + 1),*(long *)param_1,
(ulong)(*(long *)(param_1 + 8) - *(long *)param_1) >> 2,param_4,
in_R8D & 0xff);
if (uVar2 != -uVar1) {
/* WARNING: Subroutine does not return */
ggml_abort("/workspace/llm4binary/github2025/llama.cpp/common/common.cpp",0x4db,
"GGML_ASSERT(%s) failed","check == -n_tokens");
}
}
else {
std::vector<int,std::allocator<int>>::resize
((vector<int,std::allocator<int>> *)param_1,(ulong)uVar1);
}
return param_1;
}
|
|
61,883 |
testing::Message::~Message()
|
yoga-mod/tests/build_O0/_deps/googletest-src/googletest/include/gtest/gtest-message.h
|
class GTEST_API_ Message {
private:
// The type of basic IO manipulators (endl, ends, and flush) for
// narrow streams.
typedef std::ostream& (*BasicNarrowIoManip)(std::ostream&);
public:
// Constructs an empty Message.
Message();
// Copy constructor.
Message(const Message& msg) : ss_(new ::std::stringstream) { // NOLINT
*ss_ << msg.GetString();
}
// Constructs a Message from a C-string.
explicit Message(const char* str) : ss_(new ::std::stringstream) {
*ss_ << str;
}
// Streams a non-pointer value to this object.
template <typename T>
inline Message& operator<<(const T& val) {
// Some libraries overload << for STL containers. These
// overloads are defined in the global namespace instead of ::std.
//
// C++'s symbol lookup rule (i.e. Koenig lookup) says that these
// overloads are visible in either the std namespace or the global
// namespace, but not other namespaces, including the testing
// namespace which Google Test's Message class is in.
//
// To allow STL containers (and other types that has a << operator
// defined in the global namespace) to be used in Google Test
// assertions, testing::Message must access the custom << operator
// from the global namespace. With this using declaration,
// overloads of << defined in the global namespace and those
// visible via Koenig lookup are both exposed in this function.
using ::operator<<;
*ss_ << val;
return *this;
}
// Streams a pointer value to this object.
//
// This function is an overload of the previous one. When you
// stream a pointer to a Message, this definition will be used as it
// is more specialized. (The C++ Standard, section
// [temp.func.order].) If you stream a non-pointer, then the
// previous definition will be used.
//
// The reason for this overload is that streaming a NULL pointer to
// ostream is undefined behavior. Depending on the compiler, you
// may get "0", "(nil)", "(null)", or an access violation. To
// ensure consistent result across compilers, we always treat NULL
// as "(null)".
template <typename T>
inline Message& operator<<(T* const& pointer) { // NOLINT
if (pointer == nullptr) {
*ss_ << "(null)";
} else {
*ss_ << pointer;
}
return *this;
}
// Since the basic IO manipulators are overloaded for both narrow
// and wide streams, we have to provide this specialized definition
// of operator <<, even though its body is the same as the
// templatized version above. Without this definition, streaming
// endl or other basic IO manipulators to Message will confuse the
// compiler.
Message& operator<<(BasicNarrowIoManip val) {
*ss_ << val;
return *this;
}
// Instead of 1/0, we want to see true/false for bool values.
Message& operator<<(bool b) { return *this << (b ? "true" : "false"); }
// These two overloads allow streaming a wide C string to a Message
// using the UTF-8 encoding.
Message& operator<<(const wchar_t* wide_c_str);
Message& operator<<(wchar_t* wide_c_str);
#if GTEST_HAS_STD_WSTRING
// Converts the given wide string to a narrow string using the UTF-8
// encoding, and streams the result to this Message object.
Message& operator<<(const ::std::wstring& wstr);
#endif // GTEST_HAS_STD_WSTRING
// Gets the text streamed to this object so far as an std::string.
// Each '\0' character in the buffer is replaced with "\\0".
//
// INTERNAL IMPLEMENTATION - DO NOT USE IN A USER PROGRAM.
std::string GetString() const;
private:
// We'll hold the text streamed to this object here.
const std::unique_ptr< ::std::stringstream> ss_;
// We declare (but don't implement) this to prevent the compiler
// from implementing the assignment operator.
void operator=(const Message&);
}
|
O0
|
c
|
testing::Message::~Message():
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rdi
callq 0x93870
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax,%rax)
|
_ZN7testing7MessageD2Ev:
push rbp
mov rbp, rsp
sub rsp, 10h
mov [rbp+var_8], rdi
mov rdi, [rbp+var_8]
call _ZNSt10unique_ptrINSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEEESt14default_deleteIS5_EED2Ev; std::unique_ptr<std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>>::~unique_ptr()
add rsp, 10h
pop rbp
retn
|
void testing::Message::~Message(testing::Message *this)
{
std::unique_ptr<std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>>::~unique_ptr(this);
}
|
~Message:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x10
MOV qword ptr [RBP + -0x8],RDI
MOV RDI,qword ptr [RBP + -0x8]
CALL 0x00193870
ADD RSP,0x10
POP RBP
RET
|
/* testing::Message::~Message() */
void __thiscall testing::Message::~Message(Message *this)
{
std::unique_ptr<std::__cxx11::stringstream,std::default_delete<std::__cxx11::stringstream>>::
~unique_ptr((unique_ptr<std::__cxx11::stringstream,std::default_delete<std::__cxx11::stringstream>>
*)this);
return;
}
|
|
61,884 |
maria_page_crc_check
|
eloqsql/storage/maria/ma_pagecrc.c
|
my_bool maria_page_crc_check(uchar *page,
pgcache_page_no_t page_no,
MARIA_SHARE *share,
uint32 no_crc_val,
int data_length)
{
uint32 crc= uint4korr(page + share->block_size - CRC_SIZE), new_crc;
my_bool res;
DBUG_ENTER("maria_page_crc_check");
DBUG_ASSERT((uint)data_length <= share->block_size - CRC_SIZE);
/* we need this assert to get following comparison working */
compile_time_assert(MARIA_NO_CRC_BITMAP_PAGE ==
MARIA_NO_CRC_NORMAL_PAGE - 1 &&
MARIA_NO_CRC_NORMAL_PAGE == 0xffffffff);
/*
If crc is no_crc_val then
the page has no crc, so there is nothing to check.
*/
if (crc >= MARIA_NO_CRC_BITMAP_PAGE)
{
DBUG_PRINT("info", ("No crc: %lu crc: %lu page: %lu ",
(ulong) no_crc_val, (ulong) crc, (ulong) page_no));
if (crc != no_crc_val)
{
my_errno= HA_ERR_WRONG_CRC;
DBUG_PRINT("error", ("Wrong no CRC value"));
DBUG_RETURN(1);
}
DBUG_RETURN(0);
}
new_crc= maria_page_crc((uint32) page_no, page, data_length);
DBUG_ASSERT(new_crc != no_crc_val);
res= MY_TEST(new_crc != crc);
if (res)
{
/*
Bitmap pages may be totally zero filled in some cases.
This happens when we get a crash after the pagecache has written
out a page that is on a newly created bitmap page and we get
a crash before the bitmap page is written out.
We handle this case with the following logic:
When reading, approve of bitmap pages where all bytes are zero
(This is after all a bitmap pages where no data is reserved and
the CRC will be corrected at next write)
*/
if (no_crc_val == MARIA_NO_CRC_BITMAP_PAGE &&
crc == 0 && _ma_check_if_zero(page, data_length))
{
DBUG_PRINT("warning", ("Found bitmap page that was not initialized"));
DBUG_RETURN(0);
}
DBUG_PRINT("error", ("Page: %lu crc: %lu calculated crc: %lu",
(ulong) page_no, (ulong) crc, (ulong) new_crc));
my_errno= HA_ERR_WRONG_CRC;
}
DBUG_RETURN(res);
}
|
O3
|
c
|
maria_page_crc_check:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl %ecx, %r15d
movl 0x7bc(%rdx), %eax
movl -0x4(%rdi,%rax), %r12d
cmpl $-0x2, %r12d
jb 0x74ba3
cmpl %r15d, %r12d
je 0x74be0
callq 0xa8ec2
movl $0xb0, (%rax)
movb $0x1, %al
jmp 0x74be2
movl %r8d, %ebx
movq %rdi, %r14
movl %r8d, %edx
movl %esi, %edi
movq %r14, %rsi
callq 0xaf954
cmpl $-0x3, %eax
movl $0xfffffffd, %ecx # imm = 0xFFFFFFFD
cmovbl %eax, %ecx
cmpl %r12d, %ecx
je 0x74be0
cmpl $-0x2, %r15d
jne 0x74b94
testl %r12d, %r12d
jne 0x74b94
movslq %ebx, %rsi
movq %r14, %rdi
callq 0x4070c
testb %al, %al
je 0x74b94
xorl %eax, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
|
maria_page_crc_check:
push rbp
mov rbp, rsp
push r15
push r14
push r12
push rbx
mov r15d, ecx
mov eax, [rdx+7BCh]
mov r12d, [rdi+rax-4]
cmp r12d, 0FFFFFFFEh
jb short loc_74BA3
cmp r12d, r15d
jz short loc_74BE0
loc_74B94:
call _my_thread_var
mov dword ptr [rax], 0B0h
mov al, 1
jmp short loc_74BE2
loc_74BA3:
mov ebx, r8d
mov r14, rdi
mov edx, r8d
mov edi, esi
mov rsi, r14
call my_checksum
cmp eax, 0FFFFFFFDh
mov ecx, 0FFFFFFFDh
cmovb ecx, eax
cmp ecx, r12d
jz short loc_74BE0
cmp r15d, 0FFFFFFFEh
jnz short loc_74B94
test r12d, r12d
jnz short loc_74B94
movsxd rsi, ebx
mov rdi, r14
call _ma_check_if_zero
test al, al
jz short loc_74B94
loc_74BE0:
xor eax, eax
loc_74BE2:
pop rbx
pop r12
pop r14
pop r15
pop rbp
retn
|
char maria_page_crc_check(long long a1, unsigned int a2, long long a3, int a4, int a5)
{
unsigned int v6; // r12d
long long v9; // r14
unsigned int v10; // eax
int v11; // ecx
v6 = *(_DWORD *)(a1 + *(unsigned int *)(a3 + 1980) - 4);
if ( v6 < 0xFFFFFFFE )
{
v9 = a1;
a1 = a2;
v10 = my_checksum(a2, v9);
v11 = -3;
if ( v10 < 0xFFFFFFFD )
v11 = v10;
if ( v11 != v6 )
{
if ( a4 != -2 )
goto LABEL_3;
if ( v6 )
goto LABEL_3;
a1 = v9;
if ( !ma_check_if_zero(v9, a5) )
goto LABEL_3;
}
}
else if ( v6 != a4 )
{
LABEL_3:
*(_DWORD *)my_thread_var(a1) = 176;
return 1;
}
return 0;
}
|
maria_page_crc_check:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
MOV R15D,ECX
MOV EAX,dword ptr [RDX + 0x7bc]
MOV R12D,dword ptr [RDI + RAX*0x1 + -0x4]
CMP R12D,-0x2
JC 0x00174ba3
CMP R12D,R15D
JZ 0x00174be0
LAB_00174b94:
CALL 0x001a8ec2
MOV dword ptr [RAX],0xb0
MOV AL,0x1
JMP 0x00174be2
LAB_00174ba3:
MOV EBX,R8D
MOV R14,RDI
MOV EDX,R8D
MOV EDI,ESI
MOV RSI,R14
CALL 0x001af954
CMP EAX,-0x3
MOV ECX,0xfffffffd
CMOVC ECX,EAX
CMP ECX,R12D
JZ 0x00174be0
CMP R15D,-0x2
JNZ 0x00174b94
TEST R12D,R12D
JNZ 0x00174b94
MOVSXD RSI,EBX
MOV RDI,R14
CALL 0x0014070c
TEST AL,AL
JZ 0x00174b94
LAB_00174be0:
XOR EAX,EAX
LAB_00174be2:
POP RBX
POP R12
POP R14
POP R15
POP RBP
RET
|
int8
maria_page_crc_check(long param_1,int4 param_2,long param_3,uint param_4,int param_5)
{
uint uVar1;
char cVar2;
uint uVar3;
int4 *puVar4;
uint uVar5;
uVar1 = *(uint *)(param_1 + -4 + (ulong)*(uint *)(param_3 + 0x7bc));
if (uVar1 < 0xfffffffe) {
uVar3 = my_checksum(param_2,param_1,param_5);
uVar5 = 0xfffffffd;
if (uVar3 < 0xfffffffd) {
uVar5 = uVar3;
}
if ((uVar5 != uVar1) &&
(((param_4 != 0xfffffffe || (uVar1 != 0)) ||
(cVar2 = _ma_check_if_zero(param_1,(long)param_5), cVar2 == '\0')))) goto LAB_00174b94;
}
else if (uVar1 != param_4) {
LAB_00174b94:
puVar4 = (int4 *)_my_thread_var();
*puVar4 = 0xb0;
return 1;
}
return 0;
}
|
|
61,885 |
void OpenSubdiv::v3_6_0::Far::(anonymous namespace)::_removeValence2Duplicates<double>(OpenSubdiv::v3_6_0::Far::SparseMatrix<double>&)
|
NVIDIA-RTX[P]OSD-Lite/opensubdiv/far/loopPatchBuilder.cpp
|
void _removeValence2Duplicates(SparseMatrix<REAL> & M) {
// This will later be determined by the PatchBuilder member:
int regFaceSize = 4;
SparseMatrix<REAL> T;
T.Resize(M.GetNumRows(), M.GetNumColumns(), M.GetNumElements());
int nRows = M.GetNumRows();
for (int row = 0; row < nRows; ++row) {
int srcRowSize = M.GetRowSize(row);
int const * srcIndices = M.GetRowColumns(row).begin();
REAL const * srcWeights = M.GetRowElements(row).begin();
// Scan the entries to see if there are duplicates -- copy
// the row if not, otherwise, need to compress it:
bool cornerUsed[4] = { false, false, false, false };
int srcDupCount = 0;
for (int i = 0; i < srcRowSize; ++i) {
int srcIndex = srcIndices[i];
if (srcIndex < regFaceSize) {
srcDupCount += (int) cornerUsed[srcIndex];
cornerUsed[srcIndex] = true;
}
}
// Size this row for the destination and copy or compress:
T.SetRowSize(row, srcRowSize - srcDupCount);
int* dstIndices = T.SetRowColumns(row).begin();
REAL* dstWeights = T.SetRowElements(row).begin();
if (srcDupCount) {
REAL * cornerDstPtr[4] = { 0, 0, 0, 0 };
for (int i = 0; i < srcRowSize; ++i) {
int srcIndex = *srcIndices++;
REAL srcWeight = *srcWeights++;
if (srcIndex < regFaceSize) {
if (cornerDstPtr[srcIndex]) {
*cornerDstPtr[srcIndex] += srcWeight;
continue;
} else {
cornerDstPtr[srcIndex] = dstWeights;
}
}
*dstIndices++ = srcIndex;
*dstWeights++ = srcWeight;
}
} else {
std::memcpy(&dstIndices[0], &srcIndices[0], srcRowSize * sizeof(Index));
std::memcpy(&dstWeights[0], &srcWeights[0], srcRowSize * sizeof(REAL));
}
}
M.Swap(T);
}
|
O0
|
cpp
|
void OpenSubdiv::v3_6_0::Far::(anonymous namespace)::_removeValence2Duplicates<double>(OpenSubdiv::v3_6_0::Far::SparseMatrix<double>&):
pushq %rbp
movq %rsp, %rbp
subq $0x1c0, %rsp # imm = 0x1C0
movq %rdi, -0x8(%rbp)
movl $0x4, -0xc(%rbp)
leaq -0x68(%rbp), %rdi
callq 0xc8ad0
movq -0x8(%rbp), %rdi
callq 0xd3550
movl %eax, -0x164(%rbp)
jmp 0x11c250
movq -0x8(%rbp), %rdi
callq 0xcc410
movl %eax, -0x16c(%rbp)
movq -0x8(%rbp), %rdi
callq 0xc8c40
movl %eax, -0x168(%rbp)
jmp 0x11c270
movl -0x168(%rbp), %ecx
movl -0x16c(%rbp), %edx
movl -0x164(%rbp), %esi
leaq -0x68(%rbp), %rdi
callq 0xc3ca0
jmp 0x11c28d
movq -0x8(%rbp), %rdi
callq 0xd3550
movl %eax, -0x170(%rbp)
jmp 0x11c29e
movl -0x170(%rbp), %eax
movl %eax, -0x78(%rbp)
movl $0x0, -0x7c(%rbp)
movl -0x7c(%rbp), %eax
cmpl -0x78(%rbp), %eax
jge 0x11c6a9
movq -0x8(%rbp), %rdi
movl -0x7c(%rbp), %esi
callq 0xd4cc0
movl %eax, -0x80(%rbp)
movq -0x8(%rbp), %rdi
movl -0x7c(%rbp), %esi
callq 0xcef00
movl %edx, -0x17c(%rbp)
movq %rax, -0x178(%rbp)
jmp 0x11c2e4
movl -0x17c(%rbp), %eax
movq -0x178(%rbp), %rcx
movq %rcx, -0xa8(%rbp)
movl %eax, -0xa0(%rbp)
movl -0xa0(%rbp), %eax
movl %eax, -0x90(%rbp)
movq -0xa8(%rbp), %rax
movq %rax, -0x98(%rbp)
leaq -0x98(%rbp), %rdi
callq 0xd0760
movq %rax, -0x88(%rbp)
movq -0x8(%rbp), %rdi
movl -0x7c(%rbp), %esi
callq 0xcf810
movl %edx, -0x18c(%rbp)
movq %rax, -0x188(%rbp)
jmp 0x11c346
movl -0x18c(%rbp), %eax
movq -0x188(%rbp), %rcx
movq %rcx, -0xd0(%rbp)
movl %eax, -0xc8(%rbp)
movl -0xc8(%rbp), %eax
movl %eax, -0xb8(%rbp)
movq -0xd0(%rbp), %rax
movq %rax, -0xc0(%rbp)
leaq -0xc0(%rbp), %rdi
callq 0xcd0f0
movq %rax, -0x198(%rbp)
jmp 0x11c38f
movq -0x198(%rbp), %rax
movq %rax, -0xb0(%rbp)
leaq -0xd4(%rbp), %rdi
xorl %esi, %esi
movl $0x4, %edx
callq 0xc8170
movl $0x0, -0xd8(%rbp)
movl $0x0, -0xdc(%rbp)
movl -0xdc(%rbp), %eax
cmpl -0x80(%rbp), %eax
jge 0x11c455
movq -0x88(%rbp), %rax
movslq -0xdc(%rbp), %rcx
movl (%rax,%rcx,4), %eax
movl %eax, -0xe0(%rbp)
movl -0xe0(%rbp), %eax
cmpl -0xc(%rbp), %eax
jge 0x11c43f
movslq -0xe0(%rbp), %rax
movb -0xd4(%rbp,%rax), %al
andb $0x1, %al
movzbl %al, %eax
addl -0xd8(%rbp), %eax
movl %eax, -0xd8(%rbp)
movslq -0xe0(%rbp), %rax
movb $0x1, -0xd4(%rbp,%rax)
jmp 0x11c43f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x70(%rbp)
movl %eax, -0x74(%rbp)
leaq -0x68(%rbp), %rdi
callq 0xc7880
jmp 0x11c6ca
jmp 0x11c441
movl -0xdc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xdc(%rbp)
jmp 0x11c3c4
movl -0x7c(%rbp), %esi
movl -0x80(%rbp), %edx
movl -0xd8(%rbp), %eax
subl %eax, %edx
leaq -0x68(%rbp), %rdi
callq 0xcd3f0
jmp 0x11c46e
movl -0x7c(%rbp), %esi
leaq -0x68(%rbp), %rdi
callq 0xc4990
movl %edx, -0x1a4(%rbp)
movq %rax, -0x1a0(%rbp)
jmp 0x11c489
movl -0x1a4(%rbp), %eax
movq -0x1a0(%rbp), %rcx
movq %rcx, -0x108(%rbp)
movl %eax, -0x100(%rbp)
movl -0x100(%rbp), %eax
movl %eax, -0xf0(%rbp)
movq -0x108(%rbp), %rax
movq %rax, -0xf8(%rbp)
leaq -0xf8(%rbp), %rdi
callq 0xcda70
movq %rax, -0xe8(%rbp)
movl -0x7c(%rbp), %esi
leaq -0x68(%rbp), %rdi
callq 0xd2d00
movl %edx, -0x1b4(%rbp)
movq %rax, -0x1b0(%rbp)
jmp 0x11c4eb
movl -0x1b4(%rbp), %eax
movq -0x1b0(%rbp), %rcx
movq %rcx, -0x130(%rbp)
movl %eax, -0x128(%rbp)
movl -0x128(%rbp), %eax
movl %eax, -0x118(%rbp)
movq -0x130(%rbp), %rax
movq %rax, -0x120(%rbp)
leaq -0x120(%rbp), %rdi
callq 0xc55f0
movq %rax, -0x1c0(%rbp)
jmp 0x11c534
movq -0x1c0(%rbp), %rax
movq %rax, -0x110(%rbp)
cmpl $0x0, -0xd8(%rbp)
je 0x11c663
leaq -0x150(%rbp), %rdi
xorl %esi, %esi
movl $0x20, %edx
callq 0xc8170
movl $0x0, -0x154(%rbp)
movl -0x154(%rbp), %eax
cmpl -0x80(%rbp), %eax
jge 0x11c661
movq -0x88(%rbp), %rax
movq %rax, %rcx
addq $0x4, %rcx
movq %rcx, -0x88(%rbp)
movl (%rax), %eax
movl %eax, -0x158(%rbp)
movq -0xb0(%rbp), %rax
movq %rax, %rcx
addq $0x8, %rcx
movq %rcx, -0xb0(%rbp)
movsd (%rax), %xmm0
movsd %xmm0, -0x160(%rbp)
movl -0x158(%rbp), %eax
cmpl -0xc(%rbp), %eax
jge 0x11c60f
movslq -0x158(%rbp), %rax
cmpq $0x0, -0x150(%rbp,%rax,8)
je 0x11c5f7
movsd -0x160(%rbp), %xmm0
movslq -0x158(%rbp), %rax
movq -0x150(%rbp,%rax,8), %rax
addsd (%rax), %xmm0
movsd %xmm0, (%rax)
jmp 0x11c64d
movq -0x110(%rbp), %rcx
movslq -0x158(%rbp), %rax
movq %rcx, -0x150(%rbp,%rax,8)
jmp 0x11c60f
movl -0x158(%rbp), %ecx
movq -0xe8(%rbp), %rax
movq %rax, %rdx
addq $0x4, %rdx
movq %rdx, -0xe8(%rbp)
movl %ecx, (%rax)
movsd -0x160(%rbp), %xmm0
movq -0x110(%rbp), %rax
movq %rax, %rcx
addq $0x8, %rcx
movq %rcx, -0x110(%rbp)
movsd %xmm0, (%rax)
movl -0x154(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x154(%rbp)
jmp 0x11c56c
jmp 0x11c699
movq -0xe8(%rbp), %rdi
movq -0x88(%rbp), %rsi
movslq -0x80(%rbp), %rdx
shlq $0x2, %rdx
callq 0xcb1d0
movq -0x110(%rbp), %rdi
movq -0xb0(%rbp), %rsi
movslq -0x80(%rbp), %rdx
shlq $0x3, %rdx
callq 0xcb1d0
jmp 0x11c69b
movl -0x7c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x7c(%rbp)
jmp 0x11c2ae
movq -0x8(%rbp), %rdi
leaq -0x68(%rbp), %rsi
callq 0xc3940
jmp 0x11c6b8
leaq -0x68(%rbp), %rdi
callq 0xc7880
addq $0x1c0, %rsp # imm = 0x1C0
popq %rbp
retq
movq -0x70(%rbp), %rdi
callq 0xd58b0
nopw %cs:(%rax,%rax)
|
_ZN10OpenSubdiv6v3_6_03Far12_GLOBAL__N_125_removeValence2DuplicatesIdEEvRNS1_12SparseMatrixIT_EE_0:
push rbp
mov rbp, rsp
sub rsp, 1C0h
mov [rbp+var_8], rdi
mov [rbp+var_C], 4
lea rdi, [rbp+var_68]
call __ZN10OpenSubdiv6v3_6_03Far12SparseMatrixIdEC2Ev; OpenSubdiv::v3_6_0::Far::SparseMatrix<double>::SparseMatrix(void)
mov rdi, [rbp+var_8]
call __ZNK10OpenSubdiv6v3_6_03Far12SparseMatrixIdE10GetNumRowsEv; OpenSubdiv::v3_6_0::Far::SparseMatrix<double>::GetNumRows(void)
mov [rbp+var_164], eax
jmp short $+2
loc_11C250:
mov rdi, [rbp+var_8]
call __ZNK10OpenSubdiv6v3_6_03Far12SparseMatrixIdE13GetNumColumnsEv; OpenSubdiv::v3_6_0::Far::SparseMatrix<double>::GetNumColumns(void)
mov [rbp+var_16C], eax
mov rdi, [rbp+var_8]
call __ZNK10OpenSubdiv6v3_6_03Far12SparseMatrixIdE14GetNumElementsEv; OpenSubdiv::v3_6_0::Far::SparseMatrix<double>::GetNumElements(void)
mov [rbp+var_168], eax
jmp short $+2
loc_11C270:
mov ecx, [rbp+var_168]
mov edx, [rbp+var_16C]
mov esi, [rbp+var_164]
lea rdi, [rbp+var_68]
call __ZN10OpenSubdiv6v3_6_03Far12SparseMatrixIdE6ResizeEiii; OpenSubdiv::v3_6_0::Far::SparseMatrix<double>::Resize(int,int,int)
jmp short $+2
loc_11C28D:
mov rdi, [rbp+var_8]
call __ZNK10OpenSubdiv6v3_6_03Far12SparseMatrixIdE10GetNumRowsEv; OpenSubdiv::v3_6_0::Far::SparseMatrix<double>::GetNumRows(void)
mov [rbp+var_170], eax
jmp short $+2
loc_11C29E:
mov eax, [rbp+var_170]
mov [rbp+var_78], eax
mov [rbp+var_7C], 0
loc_11C2AE:
mov eax, [rbp+var_7C]
cmp eax, [rbp+var_78]
jge loc_11C6A9
mov rdi, [rbp+var_8]
mov esi, [rbp+var_7C]
call __ZNK10OpenSubdiv6v3_6_03Far12SparseMatrixIdE10GetRowSizeEi; OpenSubdiv::v3_6_0::Far::SparseMatrix<double>::GetRowSize(int)
mov [rbp+var_80], eax
mov rdi, [rbp+var_8]
mov esi, [rbp+var_7C]
call __ZNK10OpenSubdiv6v3_6_03Far12SparseMatrixIdE13GetRowColumnsEi; OpenSubdiv::v3_6_0::Far::SparseMatrix<double>::GetRowColumns(int)
mov [rbp+var_17C], edx
mov [rbp+var_178], rax
jmp short $+2
loc_11C2E4:
mov eax, [rbp+var_17C]
mov rcx, [rbp+var_178]
mov [rbp+var_A8], rcx
mov [rbp+var_A0], eax
mov eax, [rbp+var_A0]
mov [rbp+var_90], eax
mov rax, [rbp+var_A8]
mov [rbp+var_98], rax
lea rdi, [rbp+var_98]
call __ZNK10OpenSubdiv6v3_6_03Vtr10ConstArrayIiE5beginEv; OpenSubdiv::v3_6_0::Vtr::ConstArray<int>::begin(void)
mov [rbp+var_88], rax
mov rdi, [rbp+var_8]
mov esi, [rbp+var_7C]
call __ZNK10OpenSubdiv6v3_6_03Far12SparseMatrixIdE14GetRowElementsEi; OpenSubdiv::v3_6_0::Far::SparseMatrix<double>::GetRowElements(int)
mov [rbp+var_18C], edx
mov [rbp+var_188], rax
jmp short $+2
loc_11C346:
mov eax, [rbp+var_18C]
mov rcx, [rbp+var_188]
mov [rbp+var_D0], rcx
mov [rbp+var_C8], eax
mov eax, [rbp+var_C8]
mov [rbp+var_B8], eax
mov rax, [rbp+var_D0]
mov [rbp+var_C0], rax
lea rdi, [rbp+var_C0]
call __ZNK10OpenSubdiv6v3_6_03Vtr10ConstArrayIdE5beginEv; OpenSubdiv::v3_6_0::Vtr::ConstArray<double>::begin(void)
mov [rbp+var_198], rax
jmp short $+2
loc_11C38F:
mov rax, [rbp+var_198]
mov [rbp+var_B0], rax
lea rdi, [rbp+var_D4]
xor esi, esi
mov edx, 4
call _memset
mov [rbp+var_D8], 0
mov [rbp+var_DC], 0
loc_11C3C4:
mov eax, [rbp+var_DC]
cmp eax, [rbp+var_80]
jge loc_11C455
mov rax, [rbp+var_88]
movsxd rcx, [rbp+var_DC]
mov eax, [rax+rcx*4]
mov [rbp+var_E0], eax
mov eax, [rbp+var_E0]
cmp eax, [rbp+var_C]
jge short loc_11C43F
movsxd rax, [rbp+var_E0]
mov al, [rbp+rax+var_D4]
and al, 1
movzx eax, al
add eax, [rbp+var_D8]
mov [rbp+var_D8], eax
movsxd rax, [rbp+var_E0]
mov [rbp+rax+var_D4], 1
jmp short loc_11C43F
mov rcx, rax
mov eax, edx
mov [rbp+var_70], rcx
mov [rbp+var_74], eax
lea rdi, [rbp+var_68]
call __ZN10OpenSubdiv6v3_6_03Far12SparseMatrixIdED2Ev; OpenSubdiv::v3_6_0::Far::SparseMatrix<double>::~SparseMatrix()
jmp loc_11C6CA
loc_11C43F:
jmp short $+2
loc_11C441:
mov eax, [rbp+var_DC]
add eax, 1
mov [rbp+var_DC], eax
jmp loc_11C3C4
loc_11C455:
mov esi, [rbp+var_7C]
mov edx, [rbp+var_80]
mov eax, [rbp+var_D8]
sub edx, eax
lea rdi, [rbp+var_68]
call __ZN10OpenSubdiv6v3_6_03Far12SparseMatrixIdE10SetRowSizeEii; OpenSubdiv::v3_6_0::Far::SparseMatrix<double>::SetRowSize(int,int)
jmp short $+2
loc_11C46E:
mov esi, [rbp+var_7C]
lea rdi, [rbp+var_68]
call __ZN10OpenSubdiv6v3_6_03Far12SparseMatrixIdE13SetRowColumnsEi; OpenSubdiv::v3_6_0::Far::SparseMatrix<double>::SetRowColumns(int)
mov [rbp+var_1A4], edx
mov [rbp+var_1A0], rax
jmp short $+2
loc_11C489:
mov eax, [rbp+var_1A4]
mov rcx, [rbp+var_1A0]
mov [rbp+var_108], rcx
mov [rbp+var_100], eax
mov eax, [rbp+var_100]
mov [rbp+var_F0], eax
mov rax, [rbp+var_108]
mov [rbp+var_F8], rax
lea rdi, [rbp+var_F8]
call __ZN10OpenSubdiv6v3_6_03Vtr5ArrayIiE5beginEv; OpenSubdiv::v3_6_0::Vtr::Array<int>::begin(void)
mov [rbp+var_E8], rax
mov esi, [rbp+var_7C]
lea rdi, [rbp+var_68]
call __ZN10OpenSubdiv6v3_6_03Far12SparseMatrixIdE14SetRowElementsEi; OpenSubdiv::v3_6_0::Far::SparseMatrix<double>::SetRowElements(int)
mov [rbp+var_1B4], edx
mov [rbp+var_1B0], rax
jmp short $+2
loc_11C4EB:
mov eax, [rbp+var_1B4]
mov rcx, [rbp+var_1B0]
mov [rbp+var_130], rcx
mov [rbp+var_128], eax
mov eax, [rbp+var_128]
mov [rbp+var_118], eax
mov rax, [rbp+var_130]
mov [rbp+var_120], rax
lea rdi, [rbp+var_120]
call __ZN10OpenSubdiv6v3_6_03Vtr5ArrayIdE5beginEv; OpenSubdiv::v3_6_0::Vtr::Array<double>::begin(void)
mov [rbp+var_1C0], rax
jmp short $+2
loc_11C534:
mov rax, [rbp+var_1C0]
mov [rbp+var_110], rax
cmp [rbp+var_D8], 0
jz loc_11C663
lea rdi, [rbp+var_150]
xor esi, esi
mov edx, 20h ; ' '
call _memset
mov [rbp+var_154], 0
loc_11C56C:
mov eax, [rbp+var_154]
cmp eax, [rbp+var_80]
jge loc_11C661
mov rax, [rbp+var_88]
mov rcx, rax
add rcx, 4
mov [rbp+var_88], rcx
mov eax, [rax]
mov [rbp+var_158], eax
mov rax, [rbp+var_B0]
mov rcx, rax
add rcx, 8
mov [rbp+var_B0], rcx
movsd xmm0, qword ptr [rax]
movsd [rbp+var_160], xmm0
mov eax, [rbp+var_158]
cmp eax, [rbp+var_C]
jge short loc_11C60F
movsxd rax, [rbp+var_158]
cmp [rbp+rax*8+var_150], 0
jz short loc_11C5F7
movsd xmm0, [rbp+var_160]
movsxd rax, [rbp+var_158]
mov rax, [rbp+rax*8+var_150]
addsd xmm0, qword ptr [rax]
movsd qword ptr [rax], xmm0
jmp short loc_11C64D
loc_11C5F7:
mov rcx, [rbp+var_110]
movsxd rax, [rbp+var_158]
mov [rbp+rax*8+var_150], rcx
jmp short $+2
loc_11C60F:
mov ecx, [rbp+var_158]
mov rax, [rbp+var_E8]
mov rdx, rax
add rdx, 4
mov [rbp+var_E8], rdx
mov [rax], ecx
movsd xmm0, [rbp+var_160]
mov rax, [rbp+var_110]
mov rcx, rax
add rcx, 8
mov [rbp+var_110], rcx
movsd qword ptr [rax], xmm0
loc_11C64D:
mov eax, [rbp+var_154]
add eax, 1
mov [rbp+var_154], eax
jmp loc_11C56C
loc_11C661:
jmp short loc_11C699
loc_11C663:
mov rdi, [rbp+var_E8]
mov rsi, [rbp+var_88]
movsxd rdx, [rbp+var_80]
shl rdx, 2
call _memcpy
mov rdi, [rbp+var_110]
mov rsi, [rbp+var_B0]
movsxd rdx, [rbp+var_80]
shl rdx, 3
call _memcpy
loc_11C699:
jmp short $+2
loc_11C69B:
mov eax, [rbp+var_7C]
add eax, 1
mov [rbp+var_7C], eax
jmp loc_11C2AE
loc_11C6A9:
mov rdi, [rbp+var_8]
lea rsi, [rbp+var_68]
call __ZN10OpenSubdiv6v3_6_03Far12SparseMatrixIdE4SwapERS3_; OpenSubdiv::v3_6_0::Far::SparseMatrix<double>::Swap(OpenSubdiv::v3_6_0::Far::SparseMatrix<double>&)
jmp short $+2
loc_11C6B8:
lea rdi, [rbp+var_68]
call __ZN10OpenSubdiv6v3_6_03Far12SparseMatrixIdED2Ev; OpenSubdiv::v3_6_0::Far::SparseMatrix<double>::~SparseMatrix()
add rsp, 1C0h
pop rbp
retn
loc_11C6CA:
mov rdi, [rbp+var_70]
call __Unwind_Resume
|
long long OpenSubdiv::v3_6_0::Far::`anonymous namespace'::_removeValence2Duplicates<double>(long long a1)
{
int v1; // edx
int v2; // edx
int v3; // edx
int v4; // edx
int *v5; // rax
double *v6; // rax
_DWORD *v7; // rax
double *v8; // rax
unsigned int NumColumns; // [rsp+54h] [rbp-16Ch]
unsigned int NumElements; // [rsp+58h] [rbp-168h]
unsigned int NumRows; // [rsp+5Ch] [rbp-164h]
double v13; // [rsp+60h] [rbp-160h]
int v14; // [rsp+68h] [rbp-158h]
int k; // [rsp+6Ch] [rbp-154h]
_QWORD v16[4]; // [rsp+70h] [rbp-150h] BYREF
long long v17; // [rsp+90h] [rbp-130h]
int v18; // [rsp+98h] [rbp-128h]
long long v19; // [rsp+A0h] [rbp-120h] BYREF
int v20; // [rsp+A8h] [rbp-118h]
long long v21; // [rsp+B0h] [rbp-110h]
long long v22; // [rsp+B8h] [rbp-108h]
int v23; // [rsp+C0h] [rbp-100h]
long long v24; // [rsp+C8h] [rbp-F8h] BYREF
int v25; // [rsp+D0h] [rbp-F0h]
long long v26; // [rsp+D8h] [rbp-E8h]
int v27; // [rsp+E0h] [rbp-E0h]
int j; // [rsp+E4h] [rbp-DCh]
int v29; // [rsp+E8h] [rbp-D8h]
_BYTE v30[4]; // [rsp+ECh] [rbp-D4h] BYREF
long long RowElements; // [rsp+F0h] [rbp-D0h]
int v32; // [rsp+F8h] [rbp-C8h]
long long v33; // [rsp+100h] [rbp-C0h] BYREF
int v34; // [rsp+108h] [rbp-B8h]
long long v35; // [rsp+110h] [rbp-B0h]
long long RowColumns; // [rsp+118h] [rbp-A8h]
int v37; // [rsp+120h] [rbp-A0h]
long long v38; // [rsp+128h] [rbp-98h] BYREF
int v39; // [rsp+130h] [rbp-90h]
long long v40; // [rsp+138h] [rbp-88h]
int RowSize; // [rsp+140h] [rbp-80h]
unsigned int i; // [rsp+144h] [rbp-7Ch]
int v43; // [rsp+148h] [rbp-78h]
_BYTE v44[92]; // [rsp+158h] [rbp-68h] BYREF
int v45; // [rsp+1B4h] [rbp-Ch]
long long v46; // [rsp+1B8h] [rbp-8h]
v46 = a1;
v45 = 4;
OpenSubdiv::v3_6_0::Far::SparseMatrix<double>::SparseMatrix(v44);
NumRows = OpenSubdiv::v3_6_0::Far::SparseMatrix<double>::GetNumRows(v46);
NumColumns = OpenSubdiv::v3_6_0::Far::SparseMatrix<double>::GetNumColumns(v46);
NumElements = OpenSubdiv::v3_6_0::Far::SparseMatrix<double>::GetNumElements(v46);
OpenSubdiv::v3_6_0::Far::SparseMatrix<double>::Resize(v44, NumRows, NumColumns, NumElements);
v43 = OpenSubdiv::v3_6_0::Far::SparseMatrix<double>::GetNumRows(v46);
for ( i = 0; (int)i < v43; ++i )
{
RowSize = OpenSubdiv::v3_6_0::Far::SparseMatrix<double>::GetRowSize(v46, i);
RowColumns = OpenSubdiv::v3_6_0::Far::SparseMatrix<double>::GetRowColumns(v46, i);
v37 = v1;
v39 = v1;
v38 = RowColumns;
v40 = OpenSubdiv::v3_6_0::Vtr::ConstArray<int>::begin(&v38);
RowElements = OpenSubdiv::v3_6_0::Far::SparseMatrix<double>::GetRowElements(v46, i);
v32 = v2;
v34 = v2;
v33 = RowElements;
v35 = OpenSubdiv::v3_6_0::Vtr::ConstArray<double>::begin(&v33);
memset(v30, 0LL, sizeof(v30));
v29 = 0;
for ( j = 0; j < RowSize; ++j )
{
v27 = *(_DWORD *)(v40 + 4LL * j);
if ( v27 < v45 )
{
v29 += v30[v27] & 1;
v30[v27] = 1;
}
}
OpenSubdiv::v3_6_0::Far::SparseMatrix<double>::SetRowSize(v44, i, (unsigned int)(RowSize - v29));
v22 = OpenSubdiv::v3_6_0::Far::SparseMatrix<double>::SetRowColumns(v44, i);
v23 = v3;
v25 = v3;
v24 = v22;
v26 = OpenSubdiv::v3_6_0::Vtr::Array<int>::begin(&v24);
v17 = OpenSubdiv::v3_6_0::Far::SparseMatrix<double>::SetRowElements(v44, i);
v18 = v4;
v20 = v4;
v19 = v17;
v21 = OpenSubdiv::v3_6_0::Vtr::Array<double>::begin(&v19);
if ( v29 )
{
memset(v16, 0LL, sizeof(v16));
for ( k = 0; ; ++k )
{
if ( k >= RowSize )
goto LABEL_19;
v5 = (int *)v40;
v40 += 4LL;
v14 = *v5;
v6 = (double *)v35;
v35 += 8LL;
v13 = *v6;
if ( v14 < v45 )
{
if ( v16[v14] )
{
*(double *)v16[v14] = v13 + *(double *)v16[v14];
continue;
}
v16[v14] = v21;
}
v7 = (_DWORD *)v26;
v26 += 4LL;
*v7 = v14;
v8 = (double *)v21;
v21 += 8LL;
*v8 = v13;
}
}
memcpy(v26, v40, 4LL * RowSize);
memcpy(v21, v35, 8LL * RowSize);
LABEL_19:
;
}
OpenSubdiv::v3_6_0::Far::SparseMatrix<double>::Swap(v46, v44);
return OpenSubdiv::v3_6_0::Far::SparseMatrix<double>::~SparseMatrix(v44);
}
| |||
61,886 |
void OpenSubdiv::v3_6_0::Far::(anonymous namespace)::_removeValence2Duplicates<double>(OpenSubdiv::v3_6_0::Far::SparseMatrix<double>&)
|
NVIDIA-RTX[P]OSD-Lite/opensubdiv/far/loopPatchBuilder.cpp
|
void _removeValence2Duplicates(SparseMatrix<REAL> & M) {
// This will later be determined by the PatchBuilder member:
int regFaceSize = 4;
SparseMatrix<REAL> T;
T.Resize(M.GetNumRows(), M.GetNumColumns(), M.GetNumElements());
int nRows = M.GetNumRows();
for (int row = 0; row < nRows; ++row) {
int srcRowSize = M.GetRowSize(row);
int const * srcIndices = M.GetRowColumns(row).begin();
REAL const * srcWeights = M.GetRowElements(row).begin();
// Scan the entries to see if there are duplicates -- copy
// the row if not, otherwise, need to compress it:
bool cornerUsed[4] = { false, false, false, false };
int srcDupCount = 0;
for (int i = 0; i < srcRowSize; ++i) {
int srcIndex = srcIndices[i];
if (srcIndex < regFaceSize) {
srcDupCount += (int) cornerUsed[srcIndex];
cornerUsed[srcIndex] = true;
}
}
// Size this row for the destination and copy or compress:
T.SetRowSize(row, srcRowSize - srcDupCount);
int* dstIndices = T.SetRowColumns(row).begin();
REAL* dstWeights = T.SetRowElements(row).begin();
if (srcDupCount) {
REAL * cornerDstPtr[4] = { 0, 0, 0, 0 };
for (int i = 0; i < srcRowSize; ++i) {
int srcIndex = *srcIndices++;
REAL srcWeight = *srcWeights++;
if (srcIndex < regFaceSize) {
if (cornerDstPtr[srcIndex]) {
*cornerDstPtr[srcIndex] += srcWeight;
continue;
} else {
cornerDstPtr[srcIndex] = dstWeights;
}
}
*dstIndices++ = srcIndex;
*dstWeights++ = srcWeight;
}
} else {
std::memcpy(&dstIndices[0], &srcIndices[0], srcRowSize * sizeof(Index));
std::memcpy(&dstWeights[0], &srcWeights[0], srcRowSize * sizeof(REAL));
}
}
M.Swap(T);
}
|
O1
|
cpp
|
void OpenSubdiv::v3_6_0::Far::(anonymous namespace)::_removeValence2Duplicates<double>(OpenSubdiv::v3_6_0::Far::SparseMatrix<double>&):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xa8, %rsp
xorl %eax, %eax
leaq 0x28(%rsp), %r14
movq %rax, -0x10(%r14)
movl %eax, -0x8(%r14)
xorps %xmm0, %xmm0
movups %xmm0, (%r14)
movups %xmm0, 0x10(%r14)
movups %xmm0, 0x20(%r14)
movups %xmm0, 0x30(%r14)
movq %rax, 0x40(%r14)
movq (%rdi), %rcx
movq %rdi, 0x10(%rsp)
movslq 0x8(%rdi), %r15
movq %rcx, -0x10(%r14)
movl %eax, -0x8(%r14)
movq %r14, %rdi
xorl %esi, %esi
callq 0x39690
movslq 0x18(%rsp), %rsi
incq %rsi
leaq 0x80(%rsp), %rdx
movl $0xffffffff, (%rdx) # imm = 0xFFFFFFFF
movq %r14, %rdi
callq 0x38f90
leaq 0x58(%rsp), %rcx
movq -0x30(%rcx), %rax
movl $0x0, (%rax)
movq 0x8(%rcx), %rax
subq (%rcx), %rax
shrq $0x2, %rax
cmpl %eax, %r15d
jle 0x54700
leaq 0x40(%rsp), %rdi
movq %r15, %rsi
callq 0x39690
leaq 0x58(%rsp), %rdi
movq %r15, %rsi
callq 0x39a00
movq 0x10(%rsp), %rax
movslq (%rax), %rax
movq %rax, 0x78(%rsp)
testq %rax, %rax
jle 0x5487c
xorl %r14d, %r14d
movq 0x10(%rsp), %rcx
movq 0x10(%rcx), %rax
movslq 0x4(%rax,%r14,4), %rsi
movslq (%rax,%r14,4), %r12
subq %r12, %rsi
shlq $0x2, %r12
movq 0x28(%rcx), %r13
addq %r12, %r13
addq 0x40(%rcx), %r12
movl $0x0, 0xc(%rsp)
movl %esi, %ebx
movl $0x0, %ebp
testl %esi, %esi
jle 0x54773
xorl %eax, %eax
xorl %ebp, %ebp
movslq (%r13,%rax,4), %rcx
cmpq $0x3, %rcx
jg 0x5476b
movzbl 0xc(%rsp,%rcx), %edx
addl %edx, %ebp
movb $0x1, 0xc(%rsp,%rcx)
incq %rax
cmpq %rax, %rbx
jne 0x54754
movq 0x28(%rsp), %r15
movl (%r15,%r14,4), %eax
cmpl 0x20(%rsp), %eax
jne 0x54986
movq %rsi, 0x70(%rsp)
movl %esi, %ecx
subl %ebp, %ecx
addl %ecx, %eax
movl %eax, 0x4(%r15,%r14,4)
movl %eax, 0x20(%rsp)
movslq 0x4(%r15,%r14,4), %rsi
movq 0x60(%rsp), %rax
subq 0x58(%rsp), %rax
shrq $0x2, %rax
cmpl %eax, %esi
jle 0x547ca
leaq 0x40(%rsp), %rdi
callq 0x39690
movslq 0x4(%r15,%r14,4), %rsi
leaq 0x58(%rsp), %rdi
callq 0x39a00
movq 0x28(%rsp), %rax
movslq (%rax,%r14,4), %r15
shlq $0x2, %r15
movq 0x40(%rsp), %rdi
addq %r15, %rdi
addq 0x58(%rsp), %r15
testl %ebp, %ebp
je 0x5484c
xorps %xmm0, %xmm0
movaps %xmm0, 0x90(%rsp)
movaps %xmm0, 0x80(%rsp)
cmpl $0x0, 0x70(%rsp)
jle 0x5486e
xorl %eax, %eax
movslq (%r13,%rax,4), %rcx
movss (%r12,%rax,4), %xmm0
cmpq $0x3, %rcx
jg 0x54834
movq 0x80(%rsp,%rcx,8), %rdx
testq %rdx, %rdx
je 0x5482c
addss (%rdx), %xmm0
movss %xmm0, (%rdx)
jmp 0x54843
movq %r15, 0x80(%rsp,%rcx,8)
movl %ecx, (%rdi)
addq $0x4, %rdi
movss %xmm0, (%r15)
addq $0x4, %r15
incq %rax
cmpl %eax, %ebx
jne 0x54804
jmp 0x5486e
movq 0x70(%rsp), %rbx
shlq $0x2, %rbx
movq %r13, %rsi
movq %rbx, %rdx
callq 0x39ad0
movq %r15, %rdi
movq %r12, %rsi
movq %rbx, %rdx
callq 0x39ad0
incq %r14
cmpq 0x78(%rsp), %r14
jne 0x54719
movq 0x10(%rsp), %rdx
movl (%rdx), %eax
movl 0x18(%rsp), %ecx
movl %ecx, (%rdx)
movl %eax, 0x18(%rsp)
movl 0x4(%rdx), %eax
movl 0x1c(%rsp), %ecx
movl %ecx, 0x4(%rdx)
movl %eax, 0x1c(%rsp)
movl 0x8(%rdx), %eax
movl 0x20(%rsp), %ecx
movl %ecx, 0x8(%rdx)
movl %eax, 0x20(%rsp)
movups 0x10(%rdx), %xmm0
movq 0x20(%rdx), %rax
movq 0x28(%rsp), %rcx
movq %rcx, 0x10(%rdx)
movq 0x30(%rsp), %rcx
movq %rcx, 0x18(%rdx)
movq 0x38(%rsp), %rcx
movq %rcx, 0x20(%rdx)
movups %xmm0, 0x28(%rsp)
movq %rax, 0x38(%rsp)
movups 0x28(%rdx), %xmm0
movq 0x38(%rdx), %rax
movq 0x40(%rsp), %rcx
movq %rcx, 0x28(%rdx)
movq 0x48(%rsp), %rcx
movq %rcx, 0x30(%rdx)
movq 0x50(%rsp), %rcx
movq %rcx, 0x38(%rdx)
movups %xmm0, 0x40(%rsp)
movq %rax, 0x50(%rsp)
movq 0x40(%rdx), %rdi
movq 0x48(%rdx), %rax
movq 0x50(%rdx), %rsi
movq 0x58(%rsp), %rcx
movq %rcx, 0x40(%rdx)
movq 0x60(%rsp), %rcx
movq %rcx, 0x48(%rdx)
movq 0x68(%rsp), %rcx
movq %rcx, 0x50(%rdx)
movq %rdi, 0x58(%rsp)
movq %rax, 0x60(%rsp)
movq %rsi, 0x68(%rsp)
testq %rdi, %rdi
je 0x54946
subq %rdi, %rsi
callq 0x3a2d0
movq 0x40(%rsp), %rdi
testq %rdi, %rdi
je 0x5495d
movq 0x50(%rsp), %rsi
subq %rdi, %rsi
callq 0x3a2d0
movq 0x28(%rsp), %rdi
testq %rdi, %rdi
je 0x54974
movq 0x38(%rsp), %rsi
subq %rdi, %rsi
callq 0x3a2d0
addq $0xa8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x5fe4e(%rip), %rdi # 0xb47db
leaq 0x5fe6d(%rip), %rsi # 0xb4801
leaq 0x5fed7(%rip), %rcx # 0xb4872
movl $0x98, %edx
callq 0x39560
jmp 0x549a7
movq %rax, %rbx
leaq 0x18(%rsp), %rdi
callq 0x3a3b0
movq %rbx, %rdi
callq 0x3bd70
|
_ZN10OpenSubdiv6v3_6_03Far12_GLOBAL__N_125_removeValence2DuplicatesIfEEvRNS1_12SparseMatrixIT_EE_0:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 0A8h
xor eax, eax
lea r14, [rsp+0D8h+var_B0]
mov [r14-10h], rax
mov [r14-8], eax
xorps xmm0, xmm0
movups xmmword ptr [r14], xmm0
movups xmmword ptr [r14+10h], xmm0
movups xmmword ptr [r14+20h], xmm0
movups xmmword ptr [r14+30h], xmm0
mov [r14+40h], rax
mov rcx, [rdi]
mov [rsp+0D8h+var_C8], rdi
movsxd r15, dword ptr [rdi+8]
mov [r14-10h], rcx
mov [r14-8], eax
mov rdi, r14
xor esi, esi
call __ZNSt6vectorIiSaIiEE6resizeEm; std::vector<int>::resize(ulong)
movsxd rsi, [rsp+0D8h+var_C0]
inc rsi
lea rdx, [rsp+0D8h+var_58]
mov dword ptr [rdx], 0FFFFFFFFh
mov rdi, r14
call __ZNSt6vectorIiSaIiEE6resizeEmRKi; std::vector<int>::resize(ulong,int const&)
lea rcx, [rsp+0D8h+var_80]
mov rax, [rcx-30h]
mov dword ptr [rax], 0
mov rax, [rcx+8]
sub rax, [rcx]
shr rax, 2
cmp r15d, eax
jle short loc_54700
lea rdi, [rsp+0D8h+var_98]
mov rsi, r15
call __ZNSt6vectorIiSaIiEE6resizeEm; std::vector<int>::resize(ulong)
lea rdi, [rsp+0D8h+var_80]
mov rsi, r15
call __ZNSt6vectorIfSaIfEE6resizeEm; std::vector<float>::resize(ulong)
loc_54700:
mov rax, [rsp+0D8h+var_C8]
movsxd rax, dword ptr [rax]
mov [rsp+0D8h+var_60], rax
test rax, rax
jle loc_5487C
xor r14d, r14d
loc_54719:
mov rcx, [rsp+0D8h+var_C8]
mov rax, [rcx+10h]
movsxd rsi, dword ptr [rax+r14*4+4]
movsxd r12, dword ptr [rax+r14*4]
sub rsi, r12
shl r12, 2
mov r13, [rcx+28h]
add r13, r12
add r12, [rcx+40h]
mov [rsp+0D8h+var_CC], 0
mov ebx, esi
mov ebp, 0
test esi, esi
jle short loc_54773
xor eax, eax
xor ebp, ebp
loc_54754:
movsxd rcx, dword ptr [r13+rax*4+0]
cmp rcx, 3
jg short loc_5476B
movzx edx, byte ptr [rsp+rcx+0D8h+var_CC]
add ebp, edx
mov byte ptr [rsp+rcx+0D8h+var_CC], 1
loc_5476B:
inc rax
cmp rbx, rax
jnz short loc_54754
loc_54773:
mov r15, [rsp+0D8h+var_B0]
mov eax, [r15+r14*4]
cmp eax, [rsp+0D8h+var_B8]
jnz loc_54986
mov [rsp+0D8h+var_68], rsi
mov ecx, esi
sub ecx, ebp
add eax, ecx
mov [r15+r14*4+4], eax
mov [rsp+0D8h+var_B8], eax
movsxd rsi, dword ptr [r15+r14*4+4]
mov rax, [rsp+0D8h+var_78]
sub rax, [rsp+0D8h+var_80]
shr rax, 2
cmp esi, eax
jle short loc_547CA
lea rdi, [rsp+0D8h+var_98]
call __ZNSt6vectorIiSaIiEE6resizeEm; std::vector<int>::resize(ulong)
movsxd rsi, dword ptr [r15+r14*4+4]
lea rdi, [rsp+0D8h+var_80]
call __ZNSt6vectorIfSaIfEE6resizeEm; std::vector<float>::resize(ulong)
loc_547CA:
mov rax, [rsp+0D8h+var_B0]
movsxd r15, dword ptr [rax+r14*4]
shl r15, 2
mov rdi, [rsp+0D8h+var_98]
add rdi, r15
add r15, [rsp+0D8h+var_80]
test ebp, ebp
jz short loc_5484C
xorps xmm0, xmm0
movaps [rsp+0D8h+var_48], xmm0
movaps [rsp+0D8h+var_58], xmm0
cmp dword ptr [rsp+0D8h+var_68], 0
jle short loc_5486E
xor eax, eax
loc_54804:
movsxd rcx, dword ptr [r13+rax*4+0]
movss xmm0, dword ptr [r12+rax*4]
cmp rcx, 3
jg short loc_54834
mov rdx, qword ptr [rsp+rcx*8+0D8h+var_58]
test rdx, rdx
jz short loc_5482C
addss xmm0, dword ptr [rdx]
movss dword ptr [rdx], xmm0
jmp short loc_54843
loc_5482C:
mov qword ptr [rsp+rcx*8+0D8h+var_58], r15
loc_54834:
mov [rdi], ecx
add rdi, 4
movss dword ptr [r15], xmm0
add r15, 4
loc_54843:
inc rax
cmp ebx, eax
jnz short loc_54804
jmp short loc_5486E
loc_5484C:
mov rbx, [rsp+0D8h+var_68]
shl rbx, 2
mov rsi, r13
mov rdx, rbx
call _memcpy
mov rdi, r15
mov rsi, r12
mov rdx, rbx
call _memcpy
loc_5486E:
inc r14
cmp r14, [rsp+0D8h+var_60]
jnz loc_54719
loc_5487C:
mov rdx, [rsp+0D8h+var_C8]
mov eax, [rdx]
mov ecx, [rsp+0D8h+var_C0]
mov [rdx], ecx
mov [rsp+0D8h+var_C0], eax
mov eax, [rdx+4]
mov ecx, [rsp+0D8h+var_BC]
mov [rdx+4], ecx
mov [rsp+0D8h+var_BC], eax
mov eax, [rdx+8]
mov ecx, [rsp+0D8h+var_B8]
mov [rdx+8], ecx
mov [rsp+0D8h+var_B8], eax
movups xmm0, xmmword ptr [rdx+10h]
mov rax, [rdx+20h]
mov rcx, [rsp+0D8h+var_B0]
mov [rdx+10h], rcx
mov rcx, [rsp+0D8h+var_B0+8]
mov [rdx+18h], rcx
mov rcx, [rsp+0D8h+var_A0]
mov [rdx+20h], rcx
movups xmmword ptr [rsp+0D8h+var_B0], xmm0
mov [rsp+0D8h+var_A0], rax
movups xmm0, xmmword ptr [rdx+28h]
mov rax, [rdx+38h]
mov rcx, [rsp+0D8h+var_98]
mov [rdx+28h], rcx
mov rcx, [rsp+0D8h+var_98+8]
mov [rdx+30h], rcx
mov rcx, [rsp+0D8h+var_88]
mov [rdx+38h], rcx
movups xmmword ptr [rsp+0D8h+var_98], xmm0
mov [rsp+0D8h+var_88], rax
mov rdi, [rdx+40h]; void *
mov rax, [rdx+48h]
mov rsi, [rdx+50h]
mov rcx, [rsp+0D8h+var_80]
mov [rdx+40h], rcx
mov rcx, [rsp+0D8h+var_78]
mov [rdx+48h], rcx
mov rcx, [rsp+0D8h+var_70]
mov [rdx+50h], rcx
mov [rsp+0D8h+var_80], rdi
mov [rsp+0D8h+var_78], rax
mov [rsp+0D8h+var_70], rsi
test rdi, rdi
jz short loc_54946
sub rsi, rdi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_54946:
mov rdi, [rsp+0D8h+var_98]; void *
test rdi, rdi
jz short loc_5495D
mov rsi, [rsp+0D8h+var_88]
sub rsi, rdi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_5495D:
mov rdi, [rsp+0D8h+var_B0]; void *
test rdi, rdi
jz short loc_54974
mov rsi, [rsp+0D8h+var_A0]
sub rsi, rdi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_54974:
add rsp, 0A8h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_54986:
lea rdi, aRowoffsetsRowi; "_rowOffsets[rowIndex] == _numElements"
lea rsi, aWorkspaceLlm4b_8; "/workspace/llm4binary/github/2025_star3"...
lea rcx, aVoidOpensubdiv_15; "void OpenSubdiv::v3_6_0::Far::SparseMat"...
mov edx, 98h
call ___assert_fail
jmp short $+2
loc_549A7:
mov rbx, rax
lea rdi, [rsp+0D8h+var_C0]
call __ZN10OpenSubdiv6v3_6_03Far12SparseMatrixIfED2Ev; OpenSubdiv::v3_6_0::Far::SparseMatrix<float>::~SparseMatrix()
mov rdi, rbx
call __Unwind_Resume
|
void OpenSubdiv::v3_6_0::Far::`anonymous namespace'::_removeValence2Duplicates<float>(int *a1)
{
long long v1; // rcx
long long v2; // r15
long long v3; // r8
long long v4; // r9
long long i; // r14
long long v6; // rax
long long v7; // r12
long long v8; // rsi
long long v9; // r13
long long v10; // r12
int v11; // ebx
int v12; // ebp
long long v13; // rax
long long v14; // rcx
int *v15; // r15
int v16; // eax
long long v17; // rcx
int v18; // eax
long long v19; // rsi
long long v20; // r15
_DWORD *v21; // rdi
float *v22; // r15
long long v23; // rax
long long v24; // rcx
float v25; // xmm0_4
float *v26; // rdx
long long v27; // rbx
long long v28; // rcx
long long v29; // r8
long long v30; // r9
int *v31; // rdx
int v32; // eax
int v33; // eax
int v34; // eax
__int128 v35; // xmm0
long long v36; // rax
__int128 v37; // xmm0
long long v38; // rax
void *v39; // rdi
long long v40; // rax
long long v41; // rsi
int v42; // [rsp+Ch] [rbp-CCh]
int *v43; // [rsp+10h] [rbp-C8h]
long long v44; // [rsp+18h] [rbp-C0h]
int v45; // [rsp+20h] [rbp-B8h]
void *v46[2]; // [rsp+28h] [rbp-B0h] BYREF
_QWORD v47[4]; // [rsp+38h] [rbp-A0h] BYREF
__int128 v48; // [rsp+58h] [rbp-80h] BYREF
long long v49; // [rsp+68h] [rbp-70h]
long long v50; // [rsp+70h] [rbp-68h]
long long v51; // [rsp+78h] [rbp-60h]
_OWORD v52[5]; // [rsp+80h] [rbp-58h] BYREF
v44 = 0LL;
v45 = 0;
*(_OWORD *)v46 = 0LL;
memset(v47, 0, sizeof(v47));
v48 = 0LL;
v49 = 0LL;
v1 = *(_QWORD *)a1;
v43 = a1;
v2 = a1[2];
v44 = v1;
v45 = 0;
std::vector<int>::resize(v46, 0LL);
LODWORD(v52[0]) = -1;
std::vector<int>::resize(v46, (int)v44 + 1LL, v52);
*(_DWORD *)v46[0] = 0;
if ( (int)v2 > (int)((*((_QWORD *)&v48 + 1) - (_QWORD)v48) >> 2) )
{
std::vector<int>::resize(&v47[1], v2);
std::vector<float>::resize(&v48, v2);
}
v51 = *v43;
if ( v51 > 0 )
{
for ( i = 0LL; i != v51; ++i )
{
v6 = *((_QWORD *)v43 + 2);
v7 = *(int *)(v6 + 4 * i);
v8 = *(int *)(v6 + 4 * i + 4) - v7;
v7 *= 4LL;
v9 = v7 + *((_QWORD *)v43 + 5);
v10 = *((_QWORD *)v43 + 8) + v7;
v42 = 0;
v11 = v8;
v12 = 0;
if ( (int)v8 > 0 )
{
v13 = 0LL;
v12 = 0;
do
{
v14 = *(int *)(v9 + 4 * v13);
if ( v14 <= 3 )
{
v12 += *((unsigned __int8 *)&v42 + v14);
*((_BYTE *)&v42 + v14) = 1;
}
++v13;
}
while ( (unsigned int)v8 != v13 );
}
v15 = (int *)v46[0];
v16 = *((_DWORD *)v46[0] + i);
if ( v16 != v45 )
__assert_fail(
"_rowOffsets[rowIndex] == _numElements",
"/workspace/llm4binary/github/2025_star3/NVIDIA-RTX[P]OSD-Lite/opensubdiv/far/../far/../far/../far/sparseMatrix.h",
152LL,
"void OpenSubdiv::v3_6_0::Far::SparseMatrix<float>::SetRowSize(int, int) [REAL = float]");
v50 = v8;
v17 = (unsigned int)(v8 - v12);
v18 = v17 + v16;
*((_DWORD *)v46[0] + i + 1) = v18;
v45 = v18;
v19 = v15[i + 1];
if ( (int)v19 > (int)((*((_QWORD *)&v48 + 1) - (_QWORD)v48) >> 2) )
{
std::vector<int>::resize(&v47[1], v19);
std::vector<float>::resize(&v48, v15[i + 1]);
}
v20 = 4LL * *((int *)v46[0] + i);
v21 = (_DWORD *)(v20 + v47[1]);
v22 = (float *)(v48 + v20);
if ( v12 )
{
memset(v52, 0, 32);
if ( (int)v50 > 0 )
{
v23 = 0LL;
while ( 1 )
{
v24 = *(int *)(v9 + 4 * v23);
v25 = *(float *)(v10 + 4 * v23);
if ( v24 > 3 )
goto LABEL_20;
v26 = (float *)*((_QWORD *)v52 + v24);
if ( !v26 )
break;
*v26 = v25 + *v26;
LABEL_21:
if ( v11 == (_DWORD)++v23 )
goto LABEL_24;
}
*((_QWORD *)v52 + v24) = v22;
LABEL_20:
*v21++ = v24;
*v22++ = v25;
goto LABEL_21;
}
}
else
{
v27 = 4 * v50;
memcpy(v21, v9, 4 * v50, v17, v3, v4);
memcpy(v22, v10, v27, v28, v29, v30);
}
LABEL_24:
;
}
}
v31 = v43;
v32 = *v43;
*v43 = v44;
LODWORD(v44) = v32;
v33 = v31[1];
v31[1] = HIDWORD(v44);
HIDWORD(v44) = v33;
v34 = v31[2];
v31[2] = v45;
v45 = v34;
v35 = *((_OWORD *)v31 + 1);
v36 = *((_QWORD *)v31 + 4);
*((void **)v31 + 2) = v46[0];
*((void **)v31 + 3) = v46[1];
*((_QWORD *)v31 + 4) = v47[0];
*(_OWORD *)v46 = v35;
v47[0] = v36;
v37 = *(_OWORD *)(v31 + 10);
v38 = *((_QWORD *)v31 + 7);
*(_OWORD *)(v31 + 10) = *(_OWORD *)&v47[1];
*((_QWORD *)v31 + 7) = v47[3];
*(_OWORD *)&v47[1] = v37;
v47[3] = v38;
v39 = (void *)*((_QWORD *)v31 + 8);
v40 = *((_QWORD *)v31 + 9);
v41 = *((_QWORD *)v31 + 10);
*((_OWORD *)v31 + 4) = v48;
*((_QWORD *)v31 + 10) = v49;
*(_QWORD *)&v48 = v39;
*((_QWORD *)&v48 + 1) = v40;
v49 = v41;
if ( v39 )
operator delete(v39, v41 - (_QWORD)v39);
if ( v47[1] )
operator delete((void *)v47[1], v47[3] - v47[1]);
if ( v46[0] )
operator delete(v46[0], v47[0] - (unsigned long long)v46[0]);
}
|
_removeValence2Duplicates<float>:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0xa8
XOR EAX,EAX
LEA R14,[RSP + 0x28]
MOV qword ptr [R14 + -0x10],RAX
MOV dword ptr [R14 + -0x8],EAX
XORPS XMM0,XMM0
MOVUPS xmmword ptr [R14],XMM0
MOVUPS xmmword ptr [R14 + 0x10],XMM0
MOVUPS xmmword ptr [R14 + 0x20],XMM0
MOVUPS xmmword ptr [R14 + 0x30],XMM0
MOV qword ptr [R14 + 0x40],RAX
MOV RCX,qword ptr [RDI]
MOV qword ptr [RSP + 0x10],RDI
MOVSXD R15,dword ptr [RDI + 0x8]
MOV qword ptr [R14 + -0x10],RCX
MOV dword ptr [R14 + -0x8],EAX
LAB_0015469f:
MOV RDI,R14
XOR ESI,ESI
CALL 0x00139690
MOVSXD RSI,dword ptr [RSP + 0x18]
INC RSI
LEA RDX,[RSP + 0x80]
MOV dword ptr [RDX],0xffffffff
MOV RDI,R14
CALL 0x00138f90
LEA RCX,[RSP + 0x58]
MOV RAX,qword ptr [RCX + -0x30]
MOV dword ptr [RAX],0x0
MOV RAX,qword ptr [RCX + 0x8]
SUB RAX,qword ptr [RCX]
SHR RAX,0x2
CMP R15D,EAX
JLE 0x00154700
LEA RDI,[RSP + 0x40]
MOV RSI,R15
CALL 0x00139690
LEA RDI,[RSP + 0x58]
MOV RSI,R15
CALL 0x00139a00
LAB_00154700:
MOV RAX,qword ptr [RSP + 0x10]
MOVSXD RAX,dword ptr [RAX]
MOV qword ptr [RSP + 0x78],RAX
TEST RAX,RAX
JLE 0x0015487c
XOR R14D,R14D
LAB_00154719:
MOV RCX,qword ptr [RSP + 0x10]
MOV RAX,qword ptr [RCX + 0x10]
MOVSXD RSI,dword ptr [RAX + R14*0x4 + 0x4]
MOVSXD R12,dword ptr [RAX + R14*0x4]
SUB RSI,R12
SHL R12,0x2
MOV R13,qword ptr [RCX + 0x28]
ADD R13,R12
ADD R12,qword ptr [RCX + 0x40]
MOV dword ptr [RSP + 0xc],0x0
MOV EBX,ESI
MOV EBP,0x0
TEST ESI,ESI
JLE 0x00154773
XOR EAX,EAX
XOR EBP,EBP
LAB_00154754:
MOVSXD RCX,dword ptr [R13 + RAX*0x4]
CMP RCX,0x3
JG 0x0015476b
MOVZX EDX,byte ptr [RSP + RCX*0x1 + 0xc]
ADD EBP,EDX
MOV byte ptr [RSP + RCX*0x1 + 0xc],0x1
LAB_0015476b:
INC RAX
CMP RBX,RAX
JNZ 0x00154754
LAB_00154773:
MOV R15,qword ptr [RSP + 0x28]
MOV EAX,dword ptr [R15 + R14*0x4]
CMP EAX,dword ptr [RSP + 0x20]
JNZ 0x00154986
MOV qword ptr [RSP + 0x70],RSI
MOV ECX,ESI
SUB ECX,EBP
ADD EAX,ECX
MOV dword ptr [R15 + R14*0x4 + 0x4],EAX
MOV dword ptr [RSP + 0x20],EAX
MOVSXD RSI,dword ptr [R15 + R14*0x4 + 0x4]
MOV RAX,qword ptr [RSP + 0x60]
SUB RAX,qword ptr [RSP + 0x58]
SHR RAX,0x2
CMP ESI,EAX
JLE 0x001547ca
LAB_001547b1:
LEA RDI,[RSP + 0x40]
CALL 0x00139690
MOVSXD RSI,dword ptr [R15 + R14*0x4 + 0x4]
LEA RDI,[RSP + 0x58]
CALL 0x00139a00
LAB_001547ca:
MOV RAX,qword ptr [RSP + 0x28]
MOVSXD R15,dword ptr [RAX + R14*0x4]
SHL R15,0x2
MOV RDI,qword ptr [RSP + 0x40]
ADD RDI,R15
ADD R15,qword ptr [RSP + 0x58]
TEST EBP,EBP
JZ 0x0015484c
XORPS XMM0,XMM0
MOVAPS xmmword ptr [RSP + 0x90],XMM0
MOVAPS xmmword ptr [RSP + 0x80],XMM0
CMP dword ptr [RSP + 0x70],0x0
JLE 0x0015486e
XOR EAX,EAX
LAB_00154804:
MOVSXD RCX,dword ptr [R13 + RAX*0x4]
MOVSS XMM0,dword ptr [R12 + RAX*0x4]
CMP RCX,0x3
JG 0x00154834
MOV RDX,qword ptr [RSP + RCX*0x8 + 0x80]
TEST RDX,RDX
JZ 0x0015482c
ADDSS XMM0,dword ptr [RDX]
MOVSS dword ptr [RDX],XMM0
JMP 0x00154843
LAB_0015482c:
MOV qword ptr [RSP + RCX*0x8 + 0x80],R15
LAB_00154834:
MOV dword ptr [RDI],ECX
ADD RDI,0x4
MOVSS dword ptr [R15],XMM0
ADD R15,0x4
LAB_00154843:
INC RAX
CMP EBX,EAX
JNZ 0x00154804
JMP 0x0015486e
LAB_0015484c:
MOV RBX,qword ptr [RSP + 0x70]
SHL RBX,0x2
MOV RSI,R13
MOV RDX,RBX
CALL 0x00139ad0
MOV RDI,R15
MOV RSI,R12
MOV RDX,RBX
CALL 0x00139ad0
LAB_0015486e:
INC R14
CMP R14,qword ptr [RSP + 0x78]
JNZ 0x00154719
LAB_0015487c:
MOV RDX,qword ptr [RSP + 0x10]
MOV EAX,dword ptr [RDX]
MOV ECX,dword ptr [RSP + 0x18]
MOV dword ptr [RDX],ECX
MOV dword ptr [RSP + 0x18],EAX
MOV EAX,dword ptr [RDX + 0x4]
MOV ECX,dword ptr [RSP + 0x1c]
MOV dword ptr [RDX + 0x4],ECX
MOV dword ptr [RSP + 0x1c],EAX
MOV EAX,dword ptr [RDX + 0x8]
MOV ECX,dword ptr [RSP + 0x20]
MOV dword ptr [RDX + 0x8],ECX
MOV dword ptr [RSP + 0x20],EAX
MOVUPS XMM0,xmmword ptr [RDX + 0x10]
MOV RAX,qword ptr [RDX + 0x20]
MOV RCX,qword ptr [RSP + 0x28]
MOV qword ptr [RDX + 0x10],RCX
MOV RCX,qword ptr [RSP + 0x30]
MOV qword ptr [RDX + 0x18],RCX
MOV RCX,qword ptr [RSP + 0x38]
MOV qword ptr [RDX + 0x20],RCX
MOVUPS xmmword ptr [RSP + 0x28],XMM0
MOV qword ptr [RSP + 0x38],RAX
MOVUPS XMM0,xmmword ptr [RDX + 0x28]
MOV RAX,qword ptr [RDX + 0x38]
MOV RCX,qword ptr [RSP + 0x40]
MOV qword ptr [RDX + 0x28],RCX
MOV RCX,qword ptr [RSP + 0x48]
MOV qword ptr [RDX + 0x30],RCX
MOV RCX,qword ptr [RSP + 0x50]
MOV qword ptr [RDX + 0x38],RCX
MOVUPS xmmword ptr [RSP + 0x40],XMM0
MOV qword ptr [RSP + 0x50],RAX
MOV RDI,qword ptr [RDX + 0x40]
MOV RAX,qword ptr [RDX + 0x48]
MOV RSI,qword ptr [RDX + 0x50]
MOV RCX,qword ptr [RSP + 0x58]
MOV qword ptr [RDX + 0x40],RCX
MOV RCX,qword ptr [RSP + 0x60]
MOV qword ptr [RDX + 0x48],RCX
MOV RCX,qword ptr [RSP + 0x68]
MOV qword ptr [RDX + 0x50],RCX
MOV qword ptr [RSP + 0x58],RDI
MOV qword ptr [RSP + 0x60],RAX
MOV qword ptr [RSP + 0x68],RSI
TEST RDI,RDI
JZ 0x00154946
SUB RSI,RDI
CALL 0x0013a2d0
LAB_00154946:
MOV RDI,qword ptr [RSP + 0x40]
TEST RDI,RDI
JZ 0x0015495d
MOV RSI,qword ptr [RSP + 0x50]
SUB RSI,RDI
CALL 0x0013a2d0
LAB_0015495d:
MOV RDI,qword ptr [RSP + 0x28]
TEST RDI,RDI
JZ 0x00154974
MOV RSI,qword ptr [RSP + 0x38]
SUB RSI,RDI
CALL 0x0013a2d0
LAB_00154974:
ADD RSP,0xa8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_00154986:
LEA RDI,[0x1b47db]
LEA RSI,[0x1b4801]
LEA RCX,[0x1b4872]
MOV EDX,0x98
CALL 0x00139560
|
/* void OpenSubdiv::v3_6_0::Far::(anonymous
namespace)::_removeValence2Duplicates<float>(OpenSubdiv::v3_6_0::Far::SparseMatrix<float>&) */
void OpenSubdiv::v3_6_0::Far::(anonymous_namespace)::_removeValence2Duplicates<float>
(SparseMatrix *param_1)
{
float fVar1;
float *pfVar2;
int8 uVar3;
int8 uVar4;
void *pvVar5;
int8 uVar6;
int4 *puVar7;
ulong uVar8;
long lVar9;
size_t __n;
int iVar10;
int iVar11;
ulong uVar12;
int *__dest;
long lVar13;
void *pvVar14;
void *pvVar15;
long lVar16;
float *__dest_00;
byte local_cc [4];
SparseMatrix *local_c8;
int8 local_c0;
int local_b8;
int4 *local_b0;
int8 uStack_a8;
long local_a0;
void *pvStack_98;
int8 local_90;
long lStack_88;
void *local_80;
long lStack_78;
long local_70;
ulong local_68;
long local_60;
int local_58 [10];
local_b0 = (int4 *)0x0;
uStack_a8 = 0;
local_a0 = 0;
pvStack_98 = (void *)0x0;
local_90 = 0;
lStack_88 = 0;
local_80 = (void *)0x0;
lStack_78 = 0;
local_70 = 0;
local_c0 = *(int8 *)param_1;
iVar10 = *(int *)(param_1 + 8);
local_b8 = 0;
local_c8 = param_1;
/* try { // try from 0015469f to 001546ff has its CatchHandler @ 001549a5 */
std::vector<int,std::allocator<int>>::resize((vector<int,std::allocator<int>> *)&local_b0,0);
local_58[0] = 0xffffffff;
std::vector<int,std::allocator<int>>::resize
((vector<int,std::allocator<int>> *)&local_b0,(long)(int)local_c0 + 1,local_58);
*local_b0 = 0;
if ((int)((ulong)(lStack_78 - (long)local_80) >> 2) < iVar10) {
std::vector<int,std::allocator<int>>::resize
((vector<int,std::allocator<int>> *)&pvStack_98,(long)iVar10);
std::vector<float,std::allocator<float>>::resize
((vector<float,std::allocator<float>> *)&local_80,(long)iVar10);
}
local_60 = (long)*(int *)local_c8;
if (0 < (long)*(int *)local_c8) {
lVar16 = 0;
do {
lVar13 = (long)*(int *)(*(long *)(local_c8 + 0x10) + lVar16 * 4);
uVar12 = *(int *)(*(long *)(local_c8 + 0x10) + 4 + lVar16 * 4) - lVar13;
lVar13 = lVar13 * 4;
pvVar15 = (void *)(*(long *)(local_c8 + 0x28) + lVar13);
pvVar14 = (void *)(lVar13 + *(long *)(local_c8 + 0x40));
local_cc[0] = 0;
local_cc[1] = 0;
local_cc[2] = 0;
local_cc[3] = 0;
iVar11 = (int)uVar12;
iVar10 = 0;
if (0 < iVar11) {
uVar8 = 0;
iVar10 = 0;
do {
lVar13 = (long)*(int *)((long)pvVar15 + uVar8 * 4);
if (lVar13 < 4) {
iVar10 = iVar10 + (uint)local_cc[lVar13];
local_cc[lVar13] = 1;
}
uVar8 = uVar8 + 1;
} while ((uVar12 & 0xffffffff) != uVar8);
}
puVar7 = local_b0;
if (local_b0[lVar16] != local_b8) {
/* WARNING: Subroutine does not return */
__assert_fail("_rowOffsets[rowIndex] == _numElements",
"/workspace/llm4binary/github/2025_star3/NVIDIA-RTX[P]OSD-Lite/opensubdiv/far/../far/../far/../far/sparseMatrix.h"
,0x98,
"void OpenSubdiv::v3_6_0::Far::SparseMatrix<float>::SetRowSize(int, int) [REAL = float]"
);
}
local_68 = uVar12;
local_b8 = local_b0[lVar16] + (iVar11 - iVar10);
local_b0[lVar16 + 1] = local_b8;
if ((int)((ulong)(lStack_78 - (long)local_80) >> 2) < (int)local_b0[lVar16 + 1]) {
/* try { // try from 001547b1 to 001547c9 has its CatchHandler @ 001549a7 */
std::vector<int,std::allocator<int>>::resize
((vector<int,std::allocator<int>> *)&pvStack_98,(long)(int)local_b0[lVar16 + 1]);
std::vector<float,std::allocator<float>>::resize
((vector<float,std::allocator<float>> *)&local_80,(long)(int)puVar7[lVar16 + 1]);
}
__dest = (int *)((long)pvStack_98 + (long)(int)local_b0[lVar16] * 4);
__dest_00 = (float *)((long)(int)local_b0[lVar16] * 4 + (long)local_80);
if (iVar10 == 0) {
__n = local_68 << 2;
memcpy(__dest,pvVar15,__n);
memcpy(__dest_00,pvVar14,__n);
}
else {
local_58[4] = 0;
local_58[5] = 0;
local_58[6] = 0;
local_58[7] = 0;
local_58[0] = 0;
local_58[1] = 0;
local_58[2] = 0;
local_58[3] = 0;
if (0 < (int)local_68) {
lVar13 = 0;
do {
iVar10 = *(int *)((long)pvVar15 + lVar13 * 4);
lVar9 = (long)iVar10;
fVar1 = *(float *)((long)pvVar14 + lVar13 * 4);
if (lVar9 < 4) {
pfVar2 = *(float **)(local_58 + lVar9 * 2);
if (pfVar2 == (float *)0x0) {
*(float **)(local_58 + lVar9 * 2) = __dest_00;
goto LAB_00154834;
}
*pfVar2 = fVar1 + *pfVar2;
}
else {
LAB_00154834:
*__dest = iVar10;
__dest = __dest + 1;
*__dest_00 = fVar1;
__dest_00 = __dest_00 + 1;
}
lVar13 = lVar13 + 1;
} while (iVar11 != (int)lVar13);
}
}
lVar16 = lVar16 + 1;
} while (lVar16 != local_60);
}
iVar10 = *(int *)local_c8;
*(int *)local_c8 = (int)local_c0;
iVar11 = *(int *)(local_c8 + 4);
*(int *)(local_c8 + 4) = local_c0._4_4_;
local_c0 = CONCAT44(iVar11,iVar10);
iVar10 = *(int *)(local_c8 + 8);
*(int *)(local_c8 + 8) = local_b8;
pvVar15 = *(void **)(local_c8 + 0x10);
uVar4 = *(int8 *)(local_c8 + 0x18);
lVar16 = *(long *)(local_c8 + 0x20);
*(int4 **)(local_c8 + 0x10) = local_b0;
*(int8 *)(local_c8 + 0x18) = uStack_a8;
*(long *)(local_c8 + 0x20) = local_a0;
pvVar5 = *(void **)(local_c8 + 0x28);
uVar6 = *(int8 *)(local_c8 + 0x30);
lVar13 = *(long *)(local_c8 + 0x38);
*(void **)(local_c8 + 0x28) = pvStack_98;
*(int8 *)(local_c8 + 0x30) = local_90;
*(long *)(local_c8 + 0x38) = lStack_88;
pvVar14 = *(void **)(local_c8 + 0x40);
uVar3 = *(int8 *)(local_c8 + 0x48);
lVar9 = *(long *)(local_c8 + 0x50);
*(void **)(local_c8 + 0x40) = local_80;
*(long *)(local_c8 + 0x48) = lStack_78;
*(long *)(local_c8 + 0x50) = local_70;
local_b8 = iVar10;
local_b0 = (int4 *)pvVar15;
uStack_a8 = uVar4;
local_a0 = lVar16;
pvStack_98 = pvVar5;
local_90 = uVar6;
lStack_88 = lVar13;
local_80 = pvVar14;
lStack_78 = uVar3;
local_70 = lVar9;
if (pvVar14 != (void *)0x0) {
operator_delete(pvVar14,lVar9 - (long)pvVar14);
}
if (pvStack_98 != (void *)0x0) {
operator_delete(pvStack_98,lStack_88 - (long)pvStack_98);
}
if (local_b0 != (int4 *)0x0) {
operator_delete(local_b0,local_a0 - (long)local_b0);
}
return;
}
|
|
61,887 |
void OpenSubdiv::v3_6_0::Far::(anonymous namespace)::_removeValence2Duplicates<double>(OpenSubdiv::v3_6_0::Far::SparseMatrix<double>&)
|
NVIDIA-RTX[P]OSD-Lite/opensubdiv/far/loopPatchBuilder.cpp
|
void _removeValence2Duplicates(SparseMatrix<REAL> & M) {
// This will later be determined by the PatchBuilder member:
int regFaceSize = 4;
SparseMatrix<REAL> T;
T.Resize(M.GetNumRows(), M.GetNumColumns(), M.GetNumElements());
int nRows = M.GetNumRows();
for (int row = 0; row < nRows; ++row) {
int srcRowSize = M.GetRowSize(row);
int const * srcIndices = M.GetRowColumns(row).begin();
REAL const * srcWeights = M.GetRowElements(row).begin();
// Scan the entries to see if there are duplicates -- copy
// the row if not, otherwise, need to compress it:
bool cornerUsed[4] = { false, false, false, false };
int srcDupCount = 0;
for (int i = 0; i < srcRowSize; ++i) {
int srcIndex = srcIndices[i];
if (srcIndex < regFaceSize) {
srcDupCount += (int) cornerUsed[srcIndex];
cornerUsed[srcIndex] = true;
}
}
// Size this row for the destination and copy or compress:
T.SetRowSize(row, srcRowSize - srcDupCount);
int* dstIndices = T.SetRowColumns(row).begin();
REAL* dstWeights = T.SetRowElements(row).begin();
if (srcDupCount) {
REAL * cornerDstPtr[4] = { 0, 0, 0, 0 };
for (int i = 0; i < srcRowSize; ++i) {
int srcIndex = *srcIndices++;
REAL srcWeight = *srcWeights++;
if (srcIndex < regFaceSize) {
if (cornerDstPtr[srcIndex]) {
*cornerDstPtr[srcIndex] += srcWeight;
continue;
} else {
cornerDstPtr[srcIndex] = dstWeights;
}
}
*dstIndices++ = srcIndex;
*dstWeights++ = srcWeight;
}
} else {
std::memcpy(&dstIndices[0], &srcIndices[0], srcRowSize * sizeof(Index));
std::memcpy(&dstWeights[0], &srcWeights[0], srcRowSize * sizeof(REAL));
}
}
M.Swap(T);
}
|
O2
|
cpp
|
void OpenSubdiv::v3_6_0::Far::(anonymous namespace)::_removeValence2Duplicates<double>(OpenSubdiv::v3_6_0::Far::SparseMatrix<double>&):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x98, %rsp
leaq 0x40(%rsp), %rax
andq $0x0, (%rax)
andl $0x0, 0x8(%rax)
movq %rdi, %rbx
xorpd %xmm0, %xmm0
movupd %xmm0, 0x10(%rax)
movupd %xmm0, 0x20(%rax)
movupd %xmm0, 0x30(%rax)
andq $0x0, 0x50(%rax)
movupd %xmm0, 0x40(%rax)
movl (%rdi), %esi
movl 0x4(%rdi), %edx
movl 0x8(%rdi), %ecx
movq %rax, %rdi
callq 0x4f420
movl (%rbx), %eax
xorl %r15d, %r15d
testl %eax, %eax
cmovlel %r15d, %eax
movq %rax, 0x10(%rsp)
movq %rbx, 0x8(%rsp)
cmpq 0x10(%rsp), %r15
je 0x6b904
movq 0x10(%rbx), %rax
movq 0x40(%rbx), %r13
movslq (%rax,%r15,4), %rbp
leaq (,%rbp,4), %r12
addq 0x28(%rbx), %r12
movslq 0x4(%rax,%r15,4), %rsi
andl $0x0, 0x4(%rsp)
subq %rbp, %rsi
xorl %eax, %eax
testl %esi, %esi
movl $0x0, %ebx
cmovgl %esi, %ebx
xorl %r14d, %r14d
cmpq %rax, %rbx
je 0x6b839
movslq (%r12,%rax,4), %rcx
cmpq $0x3, %rcx
jg 0x6b834
movzbl 0x4(%rsp,%rcx), %edx
addl %edx, %r14d
movb $0x1, 0x4(%rsp,%rcx)
incq %rax
jmp 0x6b818
movq %rsi, 0x18(%rsp)
movl %esi, %edx
subl %r14d, %edx
leaq 0x40(%rsp), %rdi
movl %r15d, %esi
callq 0x528c0
leaq (%r13,%rbp,8), %r13
movq 0x50(%rsp), %rax
movslq (%rax,%r15,4), %rbp
leaq (,%rbp,4), %rdi
addq 0x68(%rsp), %rdi
shlq $0x3, %rbp
addq 0x80(%rsp), %rbp
testl %r14d, %r14d
je 0x6b8d0
xorpd %xmm0, %xmm0
movapd %xmm0, 0x30(%rsp)
movapd %xmm0, 0x20(%rsp)
xorl %eax, %eax
cmpl %eax, %ebx
je 0x6b8f7
movslq (%r12,%rax,4), %rcx
movsd (%r13,%rax,8), %xmm0
cmpq $0x3, %rcx
jg 0x6b8bc
movq 0x20(%rsp,%rcx,8), %rdx
testq %rdx, %rdx
je 0x6b8b7
addsd (%rdx), %xmm0
movsd %xmm0, (%rdx)
jmp 0x6b8cb
movq %rbp, 0x20(%rsp,%rcx,8)
movl %ecx, (%rdi)
addq $0x4, %rdi
movsd %xmm0, (%rbp)
addq $0x8, %rbp
incq %rax
jmp 0x6b88e
movq 0x18(%rsp), %rbx
leaq (,%rbx,4), %rdx
movq %r12, %rsi
callq 0x51bd0
shlq $0x3, %rbx
movq %rbp, %rdi
movq %r13, %rsi
movq %rbx, %rdx
callq 0x51bd0
incq %r15
movq 0x8(%rsp), %rbx
jmp 0x6b7d9
leaq 0x40(%rsp), %r14
movq %rbx, %rdi
movq %r14, %rsi
callq 0x4f350
movq %r14, %rdi
callq 0x508b0
addq $0x98, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x6b930
movq %rax, %rbx
leaq 0x40(%rsp), %rdi
callq 0x508b0
movq %rbx, %rdi
callq 0x55300
|
_ZN10OpenSubdiv6v3_6_03Far12_GLOBAL__N_125_removeValence2DuplicatesIdEEvRNS1_12SparseMatrixIT_EE_0:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 98h
lea rax, [rsp+0C8h+var_88]
and qword ptr [rax], 0
and dword ptr [rax+8], 0
mov rbx, rdi
xorpd xmm0, xmm0
movupd xmmword ptr [rax+10h], xmm0
movupd xmmword ptr [rax+20h], xmm0
movupd xmmword ptr [rax+30h], xmm0
and qword ptr [rax+50h], 0
movupd xmmword ptr [rax+40h], xmm0
mov esi, [rdi]
mov edx, [rdi+4]
mov ecx, [rdi+8]
mov rdi, rax
call __ZN10OpenSubdiv6v3_6_03Far12SparseMatrixIdE6ResizeEiii; OpenSubdiv::v3_6_0::Far::SparseMatrix<double>::Resize(int,int,int)
mov eax, [rbx]
xor r15d, r15d
test eax, eax
cmovle eax, r15d
mov [rsp+0C8h+var_B8], rax
mov [rsp+0C8h+var_C0], rbx
loc_6B7D9:
cmp r15, [rsp+0C8h+var_B8]
jz loc_6B904
mov rax, [rbx+10h]
mov r13, [rbx+40h]
movsxd rbp, dword ptr [rax+r15*4]
lea r12, ds:0[rbp*4]
add r12, [rbx+28h]
movsxd rsi, dword ptr [rax+r15*4+4]
and [rsp+0C8h+var_C4], 0
sub rsi, rbp
xor eax, eax
test esi, esi
mov ebx, 0
cmovg ebx, esi
xor r14d, r14d
loc_6B818:
cmp rbx, rax
jz short loc_6B839
movsxd rcx, dword ptr [r12+rax*4]
cmp rcx, 3
jg short loc_6B834
movzx edx, byte ptr [rsp+rcx+0C8h+var_C4]
add r14d, edx
mov byte ptr [rsp+rcx+0C8h+var_C4], 1
loc_6B834:
inc rax
jmp short loc_6B818
loc_6B839:
mov [rsp+0C8h+var_B0], rsi
mov edx, esi
sub edx, r14d
lea rdi, [rsp+0C8h+var_88]
mov esi, r15d
call __ZN10OpenSubdiv6v3_6_03Far12SparseMatrixIdE10SetRowSizeEii; OpenSubdiv::v3_6_0::Far::SparseMatrix<double>::SetRowSize(int,int)
lea r13, [r13+rbp*8+0]
mov rax, [rsp+0C8h+var_78]
movsxd rbp, dword ptr [rax+r15*4]
lea rdi, ds:0[rbp*4]
add rdi, [rsp+0C8h+var_60]
shl rbp, 3
add rbp, [rsp+0C8h+var_48]
test r14d, r14d
jz short loc_6B8D0
xorpd xmm0, xmm0
movapd [rsp+0C8h+var_98], xmm0
movapd [rsp+0C8h+var_A8], xmm0
xor eax, eax
loc_6B88E:
cmp ebx, eax
jz short loc_6B8F7
movsxd rcx, dword ptr [r12+rax*4]
movsd xmm0, qword ptr [r13+rax*8+0]
cmp rcx, 3
jg short loc_6B8BC
mov rdx, qword ptr [rsp+rcx*8+0C8h+var_A8]
test rdx, rdx
jz short loc_6B8B7
addsd xmm0, qword ptr [rdx]
movsd qword ptr [rdx], xmm0
jmp short loc_6B8CB
loc_6B8B7:
mov qword ptr [rsp+rcx*8+0C8h+var_A8], rbp
loc_6B8BC:
mov [rdi], ecx
add rdi, 4
movsd qword ptr [rbp+0], xmm0
add rbp, 8
loc_6B8CB:
inc rax
jmp short loc_6B88E
loc_6B8D0:
mov rbx, [rsp+0C8h+var_B0]
lea rdx, ds:0[rbx*4]
mov rsi, r12
call _memcpy
shl rbx, 3
mov rdi, rbp
mov rsi, r13
mov rdx, rbx
call _memcpy
loc_6B8F7:
inc r15
mov rbx, [rsp+0C8h+var_C0]
jmp loc_6B7D9
loc_6B904:
lea r14, [rsp+0C8h+var_88]
mov rdi, rbx
mov rsi, r14
call __ZN10OpenSubdiv6v3_6_03Far12SparseMatrixIdE4SwapERS3_; OpenSubdiv::v3_6_0::Far::SparseMatrix<double>::Swap(OpenSubdiv::v3_6_0::Far::SparseMatrix<double>&)
mov rdi, r14
call __ZN10OpenSubdiv6v3_6_03Far12SparseMatrixIdED2Ev; OpenSubdiv::v3_6_0::Far::SparseMatrix<double>::~SparseMatrix()
add rsp, 98h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
jmp short $+2
loc_6B930:
mov rbx, rax
lea rdi, [rsp+arg_38]
call __ZN10OpenSubdiv6v3_6_03Far12SparseMatrixIdED2Ev; OpenSubdiv::v3_6_0::Far::SparseMatrix<double>::~SparseMatrix()
mov rdi, rbx
call __Unwind_Resume
|
long long OpenSubdiv::v3_6_0::Far::`anonymous namespace'::_removeValence2Duplicates<double>(unsigned int *a1)
{
_QWORD *v1; // rbx
long long v2; // rax
long long v3; // r15
long long v4; // rax
long long v5; // r13
long long v6; // rbp
long long v7; // r12
long long v8; // rsi
long long v9; // rsi
long long v10; // rax
long long v11; // rbx
int v12; // r14d
long long v13; // rcx
long long v14; // rcx
long long v15; // r8
long long v16; // r9
long long v17; // r13
long long v18; // rbp
_DWORD *v19; // rdi
double *v20; // rbp
long long i; // rax
long long v22; // rcx
double v23; // xmm0_8
double *v24; // rdx
long long v25; // rbx
long long v26; // rcx
long long v27; // r8
long long v28; // r9
int v30; // [rsp+4h] [rbp-C4h]
_QWORD *v31; // [rsp+8h] [rbp-C0h]
long long v32; // [rsp+10h] [rbp-B8h]
long long v33; // [rsp+18h] [rbp-B0h]
_OWORD v34[2]; // [rsp+20h] [rbp-A8h] BYREF
long long v35; // [rsp+40h] [rbp-88h] BYREF
int v36; // [rsp+48h] [rbp-80h]
__int128 v37; // [rsp+50h] [rbp-78h]
__int128 v38; // [rsp+60h] [rbp-68h]
__int128 v39; // [rsp+70h] [rbp-58h]
__int128 v40; // [rsp+80h] [rbp-48h]
long long v41; // [rsp+90h] [rbp-38h]
v35 = 0LL;
v36 = 0;
v1 = a1;
v37 = 0LL;
v38 = 0LL;
v39 = 0LL;
v41 = 0LL;
v40 = 0LL;
OpenSubdiv::v3_6_0::Far::SparseMatrix<double>::Resize(&v35, *a1, a1[1], a1[2]);
v2 = *a1;
v3 = 0LL;
if ( (int)v2 <= 0 )
v2 = 0LL;
v32 = v2;
v31 = a1;
while ( v3 != v32 )
{
v4 = v1[2];
v5 = v1[8];
v6 = *(int *)(v4 + 4 * v3);
v7 = v1[5] + 4 * v6;
v8 = *(int *)(v4 + 4 * v3 + 4);
v30 = 0;
v9 = v8 - v6;
v10 = 0LL;
v11 = 0LL;
if ( (int)v9 > 0 )
v11 = (unsigned int)v9;
v12 = 0;
while ( v11 != v10 )
{
v13 = *(int *)(v7 + 4 * v10);
if ( v13 <= 3 )
{
v12 += *((unsigned __int8 *)&v30 + v13);
*((_BYTE *)&v30 + v13) = 1;
}
++v10;
}
v33 = v9;
OpenSubdiv::v3_6_0::Far::SparseMatrix<double>::SetRowSize(&v35, (unsigned int)v3, (unsigned int)(v9 - v12));
v17 = v5 + 8 * v6;
v18 = *(int *)(v37 + 4 * v3);
v19 = (_DWORD *)(*((_QWORD *)&v38 + 1) + 4 * v18);
v20 = (double *)(v40 + 8 * v18);
if ( v12 )
{
memset(v34, 0, sizeof(v34));
for ( i = 0LL; ; ++i )
{
if ( (_DWORD)v11 == (_DWORD)i )
goto LABEL_22;
v22 = *(int *)(v7 + 4 * i);
v23 = *(double *)(v17 + 8 * i);
if ( v22 <= 3 )
{
v24 = (double *)*((_QWORD *)v34 + v22);
if ( v24 )
{
*v24 = v23 + *v24;
continue;
}
*((_QWORD *)v34 + v22) = v20;
}
*v19++ = v22;
*v20++ = v23;
}
}
v25 = v33;
memcpy(v19, v7, 4 * v33, v14, v15, v16);
memcpy(v20, v17, 8 * v25, v26, v27, v28);
LABEL_22:
++v3;
v1 = v31;
}
OpenSubdiv::v3_6_0::Far::SparseMatrix<double>::Swap(v1, &v35);
return OpenSubdiv::v3_6_0::Far::SparseMatrix<double>::~SparseMatrix(&v35);
}
|
_removeValence2Duplicates<double>:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x98
LEA RAX,[RSP + 0x40]
AND qword ptr [RAX],0x0
AND dword ptr [RAX + 0x8],0x0
MOV RBX,RDI
XORPD XMM0,XMM0
MOVUPD xmmword ptr [RAX + 0x10],XMM0
MOVUPD xmmword ptr [RAX + 0x20],XMM0
MOVUPD xmmword ptr [RAX + 0x30],XMM0
AND qword ptr [RAX + 0x50],0x0
MOVUPD xmmword ptr [RAX + 0x40],XMM0
MOV ESI,dword ptr [RDI]
MOV EDX,dword ptr [RDI + 0x4]
MOV ECX,dword ptr [RDI + 0x8]
LAB_0016b7bc:
MOV RDI,RAX
CALL 0x0014f420
MOV EAX,dword ptr [RBX]
XOR R15D,R15D
TEST EAX,EAX
CMOVLE EAX,R15D
MOV qword ptr [RSP + 0x10],RAX
MOV qword ptr [RSP + 0x8],RBX
LAB_0016b7d9:
CMP R15,qword ptr [RSP + 0x10]
JZ 0x0016b904
MOV RAX,qword ptr [RBX + 0x10]
MOV R13,qword ptr [RBX + 0x40]
MOVSXD RBP,dword ptr [RAX + R15*0x4]
LEA R12,[RBP*0x4]
ADD R12,qword ptr [RBX + 0x28]
MOVSXD RSI,dword ptr [RAX + R15*0x4 + 0x4]
AND dword ptr [RSP + 0x4],0x0
SUB RSI,RBP
XOR EAX,EAX
TEST ESI,ESI
MOV EBX,0x0
CMOVG EBX,ESI
XOR R14D,R14D
LAB_0016b818:
CMP RBX,RAX
JZ 0x0016b839
MOVSXD RCX,dword ptr [R12 + RAX*0x4]
CMP RCX,0x3
JG 0x0016b834
MOVZX EDX,byte ptr [RSP + RCX*0x1 + 0x4]
ADD R14D,EDX
MOV byte ptr [RSP + RCX*0x1 + 0x4],0x1
LAB_0016b834:
INC RAX
JMP 0x0016b818
LAB_0016b839:
MOV qword ptr [RSP + 0x18],RSI
MOV EDX,ESI
SUB EDX,R14D
LAB_0016b843:
LEA RDI,[RSP + 0x40]
MOV ESI,R15D
CALL 0x001528c0
LAB_0016b850:
LEA R13,[R13 + RBP*0x8]
MOV RAX,qword ptr [RSP + 0x50]
MOVSXD RBP,dword ptr [RAX + R15*0x4]
LEA RDI,[RBP*0x4]
ADD RDI,qword ptr [RSP + 0x68]
SHL RBP,0x3
ADD RBP,qword ptr [RSP + 0x80]
TEST R14D,R14D
JZ 0x0016b8d0
XORPD XMM0,XMM0
MOVAPD xmmword ptr [RSP + 0x30],XMM0
MOVAPD xmmword ptr [RSP + 0x20],XMM0
XOR EAX,EAX
LAB_0016b88e:
CMP EBX,EAX
JZ 0x0016b8f7
MOVSXD RCX,dword ptr [R12 + RAX*0x4]
MOVSD XMM0,qword ptr [R13 + RAX*0x8]
CMP RCX,0x3
JG 0x0016b8bc
MOV RDX,qword ptr [RSP + RCX*0x8 + 0x20]
TEST RDX,RDX
JZ 0x0016b8b7
ADDSD XMM0,qword ptr [RDX]
MOVSD qword ptr [RDX],XMM0
JMP 0x0016b8cb
LAB_0016b8b7:
MOV qword ptr [RSP + RCX*0x8 + 0x20],RBP
LAB_0016b8bc:
MOV dword ptr [RDI],ECX
ADD RDI,0x4
MOVSD qword ptr [RBP],XMM0
ADD RBP,0x8
LAB_0016b8cb:
INC RAX
JMP 0x0016b88e
LAB_0016b8d0:
MOV RBX,qword ptr [RSP + 0x18]
LEA RDX,[RBX*0x4]
MOV RSI,R12
CALL 0x00151bd0
SHL RBX,0x3
MOV RDI,RBP
MOV RSI,R13
MOV RDX,RBX
CALL 0x00151bd0
LAB_0016b8f7:
INC R15
MOV RBX,qword ptr [RSP + 0x8]
JMP 0x0016b7d9
LAB_0016b904:
LEA R14,[RSP + 0x40]
MOV RDI,RBX
MOV RSI,R14
CALL 0x0014f350
MOV RDI,R14
CALL 0x001508b0
ADD RSP,0x98
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
/* void OpenSubdiv::v3_6_0::Far::(anonymous
namespace)::_removeValence2Duplicates<double>(OpenSubdiv::v3_6_0::Far::SparseMatrix<double>&) */
void OpenSubdiv::v3_6_0::Far::(anonymous_namespace)::_removeValence2Duplicates<double>
(SparseMatrix *param_1)
{
void *__src;
double dVar1;
double *pdVar2;
ulong uVar3;
long lVar4;
ulong uVar5;
long lVar6;
long lVar7;
double *__dest;
ulong uVar8;
int *__dest_00;
void *__src_00;
int iVar9;
ulong uVar10;
byte local_c4 [4];
SparseMatrix *local_c0;
ulong local_b8;
ulong local_b0;
int8 local_a8 [4];
int8 local_88;
int4 local_80;
long local_78;
int8 uStack_70;
int8 local_68;
long lStack_60;
int8 local_58;
int8 uStack_50;
long local_48;
int8 uStack_40;
int8 local_38;
local_88 = 0;
local_80 = 0;
local_78 = 0;
uStack_70 = 0;
local_68 = 0;
lStack_60 = 0;
local_58 = 0;
uStack_50 = 0;
local_38 = 0;
local_48 = 0;
uStack_40 = 0;
/* try { // try from 0016b7bc to 0016b7c3 has its CatchHandler @ 0016b92e */
SparseMatrix<double>::Resize
((SparseMatrix<double> *)&local_88,*(int *)param_1,*(int *)(param_1 + 4),
*(int *)(param_1 + 8));
uVar10 = 0;
local_b8 = (ulong)*(uint *)param_1;
if ((int)*(uint *)param_1 < 1) {
local_b8 = uVar10;
}
local_c0 = param_1;
do {
if (uVar10 == local_b8) {
SparseMatrix<double>::Swap((SparseMatrix<double> *)local_c0,(SparseMatrix *)&local_88);
SparseMatrix<double>::~SparseMatrix((SparseMatrix<double> *)&local_88);
return;
}
lVar7 = *(long *)(local_c0 + 0x40);
lVar6 = (long)*(int *)(*(long *)(local_c0 + 0x10) + uVar10 * 4);
__src_00 = (void *)(lVar6 * 4 + *(long *)(local_c0 + 0x28));
local_c4[0] = 0;
local_c4[1] = 0;
local_c4[2] = 0;
local_c4[3] = 0;
uVar8 = *(int *)(*(long *)(local_c0 + 0x10) + 4 + uVar10 * 4) - lVar6;
uVar3 = 0;
uVar5 = 0;
if (0 < (int)uVar8) {
uVar5 = uVar8 & 0xffffffff;
}
iVar9 = 0;
for (; uVar5 != uVar3; uVar3 = uVar3 + 1) {
lVar4 = (long)*(int *)((long)__src_00 + uVar3 * 4);
if (lVar4 < 4) {
iVar9 = iVar9 + (uint)local_c4[lVar4];
local_c4[lVar4] = 1;
}
}
/* try { // try from 0016b843 to 0016b84f has its CatchHandler @ 0016b930 */
local_b0 = uVar8;
SparseMatrix<double>::SetRowSize
((SparseMatrix<double> *)&local_88,(int)uVar10,(int)uVar8 - iVar9);
uVar3 = local_b0;
__src = (void *)(lVar7 + lVar6 * 8);
lVar7 = (long)*(int *)(local_78 + uVar10 * 4);
__dest_00 = (int *)(lVar7 * 4 + lStack_60);
__dest = (double *)(lVar7 * 8 + local_48);
if (iVar9 == 0) {
memcpy(__dest_00,__src_00,local_b0 * 4);
memcpy(__dest,__src,uVar3 << 3);
}
else {
local_a8[2] = 0;
local_a8[3] = 0;
local_a8[0] = 0;
local_a8[1] = 0;
for (lVar7 = 0; (int)uVar5 != (int)lVar7; lVar7 = lVar7 + 1) {
iVar9 = *(int *)((long)__src_00 + lVar7 * 4);
lVar6 = (long)iVar9;
dVar1 = *(double *)((long)__src + lVar7 * 8);
if (lVar6 < 4) {
pdVar2 = (double *)local_a8[lVar6];
if (pdVar2 == (double *)0x0) {
local_a8[lVar6] = __dest;
goto LAB_0016b8bc;
}
*pdVar2 = dVar1 + *pdVar2;
}
else {
LAB_0016b8bc:
*__dest_00 = iVar9;
__dest_00 = __dest_00 + 1;
*__dest = dVar1;
__dest = __dest + 1;
}
}
}
uVar10 = uVar10 + 1;
} while( true );
}
|
|
61,888 |
void OpenSubdiv::v3_6_0::Far::(anonymous namespace)::_removeValence2Duplicates<double>(OpenSubdiv::v3_6_0::Far::SparseMatrix<double>&)
|
NVIDIA-RTX[P]OSD-Lite/opensubdiv/far/loopPatchBuilder.cpp
|
void _removeValence2Duplicates(SparseMatrix<REAL> & M) {
// This will later be determined by the PatchBuilder member:
int regFaceSize = 4;
SparseMatrix<REAL> T;
T.Resize(M.GetNumRows(), M.GetNumColumns(), M.GetNumElements());
int nRows = M.GetNumRows();
for (int row = 0; row < nRows; ++row) {
int srcRowSize = M.GetRowSize(row);
int const * srcIndices = M.GetRowColumns(row).begin();
REAL const * srcWeights = M.GetRowElements(row).begin();
// Scan the entries to see if there are duplicates -- copy
// the row if not, otherwise, need to compress it:
bool cornerUsed[4] = { false, false, false, false };
int srcDupCount = 0;
for (int i = 0; i < srcRowSize; ++i) {
int srcIndex = srcIndices[i];
if (srcIndex < regFaceSize) {
srcDupCount += (int) cornerUsed[srcIndex];
cornerUsed[srcIndex] = true;
}
}
// Size this row for the destination and copy or compress:
T.SetRowSize(row, srcRowSize - srcDupCount);
int* dstIndices = T.SetRowColumns(row).begin();
REAL* dstWeights = T.SetRowElements(row).begin();
if (srcDupCount) {
REAL * cornerDstPtr[4] = { 0, 0, 0, 0 };
for (int i = 0; i < srcRowSize; ++i) {
int srcIndex = *srcIndices++;
REAL srcWeight = *srcWeights++;
if (srcIndex < regFaceSize) {
if (cornerDstPtr[srcIndex]) {
*cornerDstPtr[srcIndex] += srcWeight;
continue;
} else {
cornerDstPtr[srcIndex] = dstWeights;
}
}
*dstIndices++ = srcIndex;
*dstWeights++ = srcWeight;
}
} else {
std::memcpy(&dstIndices[0], &srcIndices[0], srcRowSize * sizeof(Index));
std::memcpy(&dstWeights[0], &srcWeights[0], srcRowSize * sizeof(REAL));
}
}
M.Swap(T);
}
|
O3
|
cpp
|
void OpenSubdiv::v3_6_0::Far::(anonymous namespace)::_removeValence2Duplicates<double>(OpenSubdiv::v3_6_0::Far::SparseMatrix<double>&):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xa8, %rsp
movq %rdi, %rbx
leaq 0x28(%rsp), %r14
xorpd %xmm0, %xmm0
movupd %xmm0, 0x30(%r14)
movupd %xmm0, 0x20(%r14)
movupd %xmm0, 0x10(%r14)
movupd %xmm0, (%r14)
movq $0x0, 0x40(%r14)
movslq 0x8(%rdi), %r15
movq (%rdi), %rax
movq %rax, -0x10(%r14)
movl $0x0, -0x8(%r14)
movq %r14, %rdi
xorl %esi, %esi
callq 0x39670
movslq 0x18(%rsp), %rsi
incq %rsi
leaq 0x80(%rsp), %rdx
movl $0xffffffff, (%rdx) # imm = 0xFFFFFFFF
movq %r14, %rdi
callq 0x38f80
leaq 0x58(%rsp), %rcx
movq -0x30(%rcx), %rax
movl $0x0, (%rax)
movq 0x8(%rcx), %rax
subq (%rcx), %rax
shrq $0x3, %rax
cmpl %eax, %r15d
jle 0x57597
leaq 0x40(%rsp), %rdi
movq %r15, %rsi
callq 0x39670
leaq 0x58(%rsp), %rdi
movq %r15, %rsi
callq 0x3a2c0
movslq (%rbx), %rcx
testq %rcx, %rcx
jle 0x57730
xorl %r14d, %r14d
movq %rbx, 0x78(%rsp)
movq %rcx, 0x70(%rsp)
movq 0x10(%rbx), %rax
movslq 0x4(%rax,%r14,4), %rcx
movslq (%rax,%r14,4), %r12
leaq (,%r12,4), %r13
addq 0x28(%rbx), %r13
subq %r12, %rcx
shlq $0x3, %r12
addq 0x40(%rbx), %r12
movl $0x0, 0xc(%rsp)
movl %ecx, %ebx
movl $0x0, %ebp
movq %rcx, 0x10(%rsp)
testl %ecx, %ecx
jle 0x5760f
xorl %eax, %eax
xorl %ebp, %ebp
movslq (%r13,%rax,4), %rcx
cmpq $0x3, %rcx
jg 0x57607
movzbl 0xc(%rsp,%rcx), %edx
addl %edx, %ebp
movb $0x1, 0xc(%rsp,%rcx)
incq %rax
cmpq %rax, %rbx
jne 0x575f0
movq 0x28(%rsp), %r15
movl (%r15,%r14,4), %eax
cmpl 0x20(%rsp), %eax
jne 0x57808
movq 0x10(%rsp), %rcx
subl %ebp, %ecx
addl %ecx, %eax
movl %eax, 0x4(%r15,%r14,4)
movl %eax, 0x20(%rsp)
movslq 0x4(%r15,%r14,4), %rsi
movq 0x58(%rsp), %rax
movq 0x60(%rsp), %rcx
subq %rax, %rcx
shrq $0x3, %rcx
cmpl %ecx, %esi
jle 0x57671
leaq 0x40(%rsp), %rdi
callq 0x39670
movslq 0x4(%r15,%r14,4), %rsi
leaq 0x58(%rsp), %rdi
callq 0x3a2c0
movq 0x28(%rsp), %r15
movq 0x58(%rsp), %rax
movslq (%r15,%r14,4), %rcx
leaq (,%rcx,4), %rdi
addq 0x40(%rsp), %rdi
leaq (%rax,%rcx,8), %r15
testl %ebp, %ebp
je 0x576f1
xorpd %xmm0, %xmm0
movapd %xmm0, 0x90(%rsp)
movapd %xmm0, 0x80(%rsp)
cmpl $0x0, 0x10(%rsp)
jle 0x57718
xorl %eax, %eax
movslq (%r13,%rax,4), %rcx
movsd (%r12,%rax,8), %xmm0
cmpq $0x3, %rcx
jg 0x576d9
movq 0x80(%rsp,%rcx,8), %rdx
testq %rdx, %rdx
je 0x576d1
addsd (%rdx), %xmm0
movsd %xmm0, (%rdx)
jmp 0x576e8
movq %r15, 0x80(%rsp,%rcx,8)
movl %ecx, (%rdi)
addq $0x4, %rdi
movsd %xmm0, (%r15)
addq $0x8, %r15
incq %rax
cmpl %eax, %ebx
jne 0x576a9
jmp 0x57718
movq 0x10(%rsp), %rbx
leaq (,%rbx,4), %rdx
movq %r13, %rsi
callq 0x39ab0
shlq $0x3, %rbx
movq %r15, %rdi
movq %r12, %rsi
movq %rbx, %rdx
callq 0x39ab0
movq 0x70(%rsp), %rcx
incq %r14
cmpq %rcx, %r14
movq 0x78(%rsp), %rbx
jne 0x575b0
movl (%rbx), %ecx
movq 0x18(%rsp), %rax
movl %ecx, 0x18(%rsp)
movl 0x20(%rsp), %ecx
movq 0x4(%rbx), %rdx
movq %rax, (%rbx)
movl %ecx, 0x8(%rbx)
movq %rdx, 0x1c(%rsp)
movq 0x20(%rbx), %rax
movups 0x28(%rsp), %xmm0
movups 0x10(%rbx), %xmm1
movups %xmm0, 0x10(%rbx)
movups %xmm1, 0x28(%rsp)
movq 0x28(%rbx), %rdi
movups 0x38(%rsp), %xmm0
movq %rax, 0x38(%rsp)
movups %xmm0, 0x20(%rbx)
movups 0x48(%rsp), %xmm0
movq %rdi, 0x40(%rsp)
movups 0x30(%rbx), %xmm1
movups %xmm0, 0x30(%rbx)
movups %xmm1, 0x48(%rsp)
movq 0x40(%rbx), %rax
movq 0x48(%rbx), %rcx
movq 0x50(%rbx), %rsi
movups 0x58(%rsp), %xmm0
movups %xmm0, 0x40(%rbx)
movq 0x68(%rsp), %rdx
movq %rdx, 0x50(%rbx)
movq %rax, 0x58(%rsp)
movq %rcx, 0x60(%rsp)
movq %rsi, 0x68(%rsp)
testq %rax, %rax
je 0x577cd
subq %rax, %rsi
movq %rax, %rdi
callq 0x3a2b0
movq 0x40(%rsp), %rdi
testq %rdi, %rdi
je 0x577df
movq 0x50(%rsp), %rsi
subq %rdi, %rsi
callq 0x3a2b0
movq 0x28(%rsp), %rdi
testq %rdi, %rdi
je 0x577f6
movq 0x38(%rsp), %rsi
subq %rdi, %rsi
callq 0x3a2b0
addq $0xa8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x601fc(%rip), %rdi # 0xb7a0b
leaq 0x6021b(%rip), %rsi # 0xb7a31
leaq 0x60ade(%rip), %rcx # 0xb82fb
movl $0x98, %edx
callq 0x39540
jmp 0x57829
movq %rax, %rbx
leaq 0x18(%rsp), %rdi
callq 0x38fd0
movq %rbx, %rdi
callq 0x3bd30
|
_ZN10OpenSubdiv6v3_6_03Far12_GLOBAL__N_125_removeValence2DuplicatesIdEEvRNS1_12SparseMatrixIT_EE_0:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 0A8h
mov rbx, rdi
lea r14, [rsp+0D8h+var_B0]
xorpd xmm0, xmm0
movupd xmmword ptr [r14+30h], xmm0
movupd xmmword ptr [r14+20h], xmm0
movupd xmmword ptr [r14+10h], xmm0
movupd xmmword ptr [r14], xmm0
mov qword ptr [r14+40h], 0
movsxd r15, dword ptr [rdi+8]
mov rax, [rdi]
mov [r14-10h], rax
mov dword ptr [r14-8], 0
mov rdi, r14
xor esi, esi
call __ZNSt6vectorIiSaIiEE6resizeEm; std::vector<int>::resize(ulong)
movsxd rsi, dword ptr [rsp+0D8h+var_C0]
inc rsi
lea rdx, [rsp+0D8h+var_58]
mov dword ptr [rdx], 0FFFFFFFFh
mov rdi, r14
call __ZNSt6vectorIiSaIiEE6resizeEmRKi; std::vector<int>::resize(ulong,int const&)
lea rcx, [rsp+0D8h+var_80]
mov rax, [rcx-30h]
mov dword ptr [rax], 0
mov rax, [rcx+8]
sub rax, [rcx]
shr rax, 3
cmp r15d, eax
jle short loc_57597
lea rdi, [rsp+0D8h+var_98]
mov rsi, r15
call __ZNSt6vectorIiSaIiEE6resizeEm; std::vector<int>::resize(ulong)
lea rdi, [rsp+0D8h+var_80]
mov rsi, r15
call __ZNSt6vectorIdSaIdEE6resizeEm; std::vector<double>::resize(ulong)
loc_57597:
movsxd rcx, dword ptr [rbx]
test rcx, rcx
jle loc_57730
xor r14d, r14d
mov [rsp+0D8h+var_60], rbx
mov [rsp+0D8h+var_68], rcx
loc_575B0:
mov rax, [rbx+10h]
movsxd rcx, dword ptr [rax+r14*4+4]
movsxd r12, dword ptr [rax+r14*4]
lea r13, ds:0[r12*4]
add r13, [rbx+28h]
sub rcx, r12
shl r12, 3
add r12, [rbx+40h]
mov [rsp+0D8h+var_CC], 0
mov ebx, ecx
mov ebp, 0
mov [rsp+0D8h+var_C8], rcx
test ecx, ecx
jle short loc_5760F
xor eax, eax
xor ebp, ebp
loc_575F0:
movsxd rcx, dword ptr [r13+rax*4+0]
cmp rcx, 3
jg short loc_57607
movzx edx, byte ptr [rsp+rcx+0D8h+var_CC]
add ebp, edx
mov byte ptr [rsp+rcx+0D8h+var_CC], 1
loc_57607:
inc rax
cmp rbx, rax
jnz short loc_575F0
loc_5760F:
mov r15, [rsp+0D8h+var_B0]
mov eax, [r15+r14*4]
cmp eax, [rsp+0D8h+var_B8]
jnz loc_57808
mov rcx, [rsp+0D8h+var_C8]
sub ecx, ebp
add eax, ecx
mov [r15+r14*4+4], eax
mov [rsp+0D8h+var_B8], eax
movsxd rsi, dword ptr [r15+r14*4+4]
mov rax, qword ptr [rsp+0D8h+var_80]
mov rcx, qword ptr [rsp+0D8h+var_80+8]
sub rcx, rax
shr rcx, 3
cmp esi, ecx
jle short loc_57671
lea rdi, [rsp+0D8h+var_98]
call __ZNSt6vectorIiSaIiEE6resizeEm; std::vector<int>::resize(ulong)
movsxd rsi, dword ptr [r15+r14*4+4]
lea rdi, [rsp+0D8h+var_80]
call __ZNSt6vectorIdSaIdEE6resizeEm; std::vector<double>::resize(ulong)
mov r15, [rsp+0D8h+var_B0]
mov rax, qword ptr [rsp+0D8h+var_80]
loc_57671:
movsxd rcx, dword ptr [r15+r14*4]
lea rdi, ds:0[rcx*4]
add rdi, [rsp+0D8h+var_98]
lea r15, [rax+rcx*8]
test ebp, ebp
jz short loc_576F1
xorpd xmm0, xmm0
movapd [rsp+0D8h+var_48], xmm0
movapd [rsp+0D8h+var_58], xmm0
cmp dword ptr [rsp+0D8h+var_C8], 0
jle short loc_57718
xor eax, eax
loc_576A9:
movsxd rcx, dword ptr [r13+rax*4+0]
movsd xmm0, qword ptr [r12+rax*8]
cmp rcx, 3
jg short loc_576D9
mov rdx, qword ptr [rsp+rcx*8+0D8h+var_58]
test rdx, rdx
jz short loc_576D1
addsd xmm0, qword ptr [rdx]
movsd qword ptr [rdx], xmm0
jmp short loc_576E8
loc_576D1:
mov qword ptr [rsp+rcx*8+0D8h+var_58], r15
loc_576D9:
mov [rdi], ecx
add rdi, 4
movsd qword ptr [r15], xmm0
add r15, 8
loc_576E8:
inc rax
cmp ebx, eax
jnz short loc_576A9
jmp short loc_57718
loc_576F1:
mov rbx, [rsp+0D8h+var_C8]
lea rdx, ds:0[rbx*4]
mov rsi, r13
call _memcpy
shl rbx, 3
mov rdi, r15
mov rsi, r12
mov rdx, rbx
call _memcpy
loc_57718:
mov rcx, [rsp+0D8h+var_68]
inc r14
cmp r14, rcx
mov rbx, [rsp+0D8h+var_60]
jnz loc_575B0
mov ecx, [rbx]
loc_57730:
mov rax, [rsp+0D8h+var_C0]
mov dword ptr [rsp+0D8h+var_C0], ecx
mov ecx, [rsp+0D8h+var_B8]
mov rdx, [rbx+4]
mov [rbx], rax
mov [rbx+8], ecx
mov [rsp+0D8h+var_C0+4], rdx
mov rax, [rbx+20h]
movups xmm0, xmmword ptr [rsp+0D8h+var_B0]
movups xmm1, xmmword ptr [rbx+10h]
movups xmmword ptr [rbx+10h], xmm0
movups xmmword ptr [rsp+0D8h+var_B0], xmm1
mov rdi, [rbx+28h]
movups xmm0, xmmword ptr [rsp+38h]
mov [rsp+0D8h+var_A0], rax
movups xmmword ptr [rbx+20h], xmm0
movups xmm0, [rsp+0D8h+var_90]
mov [rsp+0D8h+var_98], rdi
movups xmm1, xmmword ptr [rbx+30h]
movups xmmword ptr [rbx+30h], xmm0
movups [rsp+0D8h+var_90], xmm1
mov rax, [rbx+40h]
mov rcx, [rbx+48h]
mov rsi, [rbx+50h]
movups xmm0, [rsp+0D8h+var_80]
movups xmmword ptr [rbx+40h], xmm0
mov rdx, [rsp+0D8h+var_70]
mov [rbx+50h], rdx
mov qword ptr [rsp+0D8h+var_80], rax
mov qword ptr [rsp+0D8h+var_80+8], rcx
mov [rsp+0D8h+var_70], rsi
test rax, rax
jz short loc_577CD
sub rsi, rax; unsigned __int64
mov rdi, rax; void *
call __ZdlPvm; operator delete(void *,ulong)
mov rdi, [rsp+0D8h+var_98]; void *
loc_577CD:
test rdi, rdi
jz short loc_577DF
mov rsi, qword ptr [rsp+0D8h+var_90+8]
sub rsi, rdi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_577DF:
mov rdi, [rsp+0D8h+var_B0]; void *
test rdi, rdi
jz short loc_577F6
mov rsi, [rsp+0D8h+var_A0]
sub rsi, rdi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_577F6:
add rsp, 0A8h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_57808:
lea rdi, aRowoffsetsRowi; "_rowOffsets[rowIndex] == _numElements"
lea rsi, aWorkspaceLlm4b_8; "/workspace/llm4binary/github/2025_star3"...
lea rcx, aVoidOpensubdiv_18; "void OpenSubdiv::v3_6_0::Far::SparseMat"...
mov edx, 98h
call ___assert_fail
jmp short $+2
loc_57829:
mov rbx, rax
lea rdi, [rsp+0D8h+var_C0]
call __ZN10OpenSubdiv6v3_6_03Far12SparseMatrixIdED2Ev; OpenSubdiv::v3_6_0::Far::SparseMatrix<double>::~SparseMatrix()
mov rdi, rbx
call __Unwind_Resume
|
void OpenSubdiv::v3_6_0::Far::`anonymous namespace'::_removeValence2Duplicates<double>(int *a1)
{
int *v1; // rbx
long long v2; // r15
long long v3; // r8
long long v4; // r9
long long v5; // rcx
long long v6; // r14
long long v7; // rax
long long v8; // r12
long long v9; // r13
long long v10; // rcx
long long v11; // r12
long long v12; // rbx
int v13; // ebp
long long v14; // rax
long long v15; // rcx
int *v16; // r15
int v17; // eax
int v18; // eax
long long v19; // rsi
long long v20; // rax
long long v21; // rcx
_DWORD *v22; // rdi
double *v23; // r15
long long v24; // rax
long long v25; // rcx
double v26; // xmm0_8
double *v27; // rdx
long long v28; // rbx
long long v29; // rcx
long long v30; // r8
long long v31; // r9
long long v32; // rax
int v33; // ecx
long long v34; // rdx
long long v35; // rax
__int128 v36; // xmm1
void *v37; // rdi
__int128 v38; // xmm0
__int128 v39; // xmm1
void *v40; // rax
long long v41; // rcx
long long v42; // rsi
int v43; // [rsp+Ch] [rbp-CCh]
long long v44; // [rsp+10h] [rbp-C8h]
_BYTE v45[12]; // [rsp+18h] [rbp-C0h]
void *v46[2]; // [rsp+28h] [rbp-B0h] BYREF
__int128 v47; // [rsp+38h] [rbp-A0h] BYREF
__int128 v48; // [rsp+48h] [rbp-90h]
__int128 v49; // [rsp+58h] [rbp-80h] BYREF
long long v50; // [rsp+68h] [rbp-70h]
long long v51; // [rsp+70h] [rbp-68h]
int *v52; // [rsp+78h] [rbp-60h]
_OWORD v53[5]; // [rsp+80h] [rbp-58h] BYREF
v1 = a1;
v49 = 0LL;
v48 = 0LL;
v47 = 0LL;
*(_OWORD *)v46 = 0LL;
v50 = 0LL;
v2 = a1[2];
*(_QWORD *)v45 = *(_QWORD *)a1;
*(_DWORD *)&v45[8] = 0;
std::vector<int>::resize(v46, 0LL);
LODWORD(v53[0]) = -1;
std::vector<int>::resize(v46, *(int *)v45 + 1LL, v53);
*(_DWORD *)v46[0] = 0;
if ( (int)v2 > (int)((*((_QWORD *)&v49 + 1) - (_QWORD)v49) >> 3) )
{
std::vector<int>::resize((char *)&v47 + 8, v2);
std::vector<double>::resize(&v49, v2);
}
v5 = *a1;
if ( v5 > 0 )
{
v6 = 0LL;
v52 = a1;
v51 = v5;
while ( 1 )
{
v7 = *((_QWORD *)v1 + 2);
v8 = *(int *)(v7 + 4 * v6);
v9 = *((_QWORD *)v1 + 5) + 4 * v8;
v10 = *(int *)(v7 + 4 * v6 + 4) - v8;
v11 = *((_QWORD *)v1 + 8) + 8 * v8;
v43 = 0;
v12 = (unsigned int)v10;
v13 = 0;
v44 = v10;
if ( (int)v10 > 0 )
{
v14 = 0LL;
v13 = 0;
do
{
v15 = *(int *)(v9 + 4 * v14);
if ( v15 <= 3 )
{
v13 += *((unsigned __int8 *)&v43 + v15);
*((_BYTE *)&v43 + v15) = 1;
}
++v14;
}
while ( v12 != v14 );
}
v16 = (int *)v46[0];
v17 = *((_DWORD *)v46[0] + v6);
if ( v17 != *(_DWORD *)&v45[8] )
__assert_fail(
"_rowOffsets[rowIndex] == _numElements",
"/workspace/llm4binary/github/2025_star3/NVIDIA-RTX[P]OSD-Lite/opensubdiv/far/../far/../far/../far/sparseMatrix.h",
152LL,
"void OpenSubdiv::v3_6_0::Far::SparseMatrix<double>::SetRowSize(int, int) [REAL = double]");
v18 = v44 - v13 + v17;
*((_DWORD *)v46[0] + v6 + 1) = v18;
*(_DWORD *)&v45[8] = v18;
v19 = v16[v6 + 1];
v20 = v49;
if ( (int)v19 > (int)((*((_QWORD *)&v49 + 1) - (_QWORD)v49) >> 3) )
{
std::vector<int>::resize((char *)&v47 + 8, v19);
std::vector<double>::resize(&v49, v16[v6 + 1]);
v16 = (int *)v46[0];
v20 = v49;
}
v21 = v16[v6];
v22 = (_DWORD *)(*((_QWORD *)&v47 + 1) + 4 * v21);
v23 = (double *)(v20 + 8 * v21);
if ( v13 )
{
memset(v53, 0, 32);
if ( (int)v44 > 0 )
{
v24 = 0LL;
while ( 1 )
{
v25 = *(int *)(v9 + 4 * v24);
v26 = *(double *)(v11 + 8 * v24);
if ( v25 > 3 )
goto LABEL_20;
v27 = (double *)*((_QWORD *)v53 + v25);
if ( !v27 )
break;
*v27 = v26 + *v27;
LABEL_21:
if ( (_DWORD)v12 == (_DWORD)++v24 )
goto LABEL_24;
}
*((_QWORD *)v53 + v25) = v23;
LABEL_20:
*v22++ = v25;
*v23++ = v26;
goto LABEL_21;
}
}
else
{
v28 = v44;
memcpy(v22, v9, 4 * v44, v21, v3, v4);
memcpy(v23, v11, 8 * v28, v29, v30, v31);
}
LABEL_24:
++v6;
v1 = v52;
if ( v6 == v51 )
{
LODWORD(v5) = *v52;
break;
}
}
}
v32 = *(_QWORD *)v45;
*(_DWORD *)v45 = v5;
v33 = *(_DWORD *)&v45[8];
v34 = *(_QWORD *)(v1 + 1);
*(_QWORD *)v1 = v32;
v1[2] = v33;
*(_QWORD *)&v45[4] = v34;
v35 = *((_QWORD *)v1 + 4);
v36 = *((_OWORD *)v1 + 1);
*((_OWORD *)v1 + 1) = *(_OWORD *)v46;
*(_OWORD *)v46 = v36;
v37 = (void *)*((_QWORD *)v1 + 5);
v38 = v47;
*(_QWORD *)&v47 = v35;
*((_OWORD *)v1 + 2) = v38;
*((_QWORD *)&v47 + 1) = v37;
v39 = *((_OWORD *)v1 + 3);
*((_OWORD *)v1 + 3) = v48;
v48 = v39;
v40 = (void *)*((_QWORD *)v1 + 8);
v41 = *((_QWORD *)v1 + 9);
v42 = *((_QWORD *)v1 + 10);
*((_OWORD *)v1 + 4) = v49;
*((_QWORD *)v1 + 10) = v50;
*(_QWORD *)&v49 = v40;
*((_QWORD *)&v49 + 1) = v41;
v50 = v42;
if ( v40 )
{
operator delete(v40, v42 - (_QWORD)v40);
v37 = (void *)*((_QWORD *)&v47 + 1);
}
if ( v37 )
operator delete(v37, *((_QWORD *)&v48 + 1) - (_QWORD)v37);
if ( v46[0] )
operator delete(v46[0], v47 - (unsigned long long)v46[0]);
}
|
_removeValence2Duplicates<double>:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0xa8
MOV RBX,RDI
LEA R14,[RSP + 0x28]
XORPD XMM0,XMM0
MOVUPD xmmword ptr [R14 + 0x30],XMM0
MOVUPD xmmword ptr [R14 + 0x20],XMM0
MOVUPD xmmword ptr [R14 + 0x10],XMM0
MOVUPD xmmword ptr [R14],XMM0
MOV qword ptr [R14 + 0x40],0x0
MOVSXD R15,dword ptr [RDI + 0x8]
MOV RAX,qword ptr [RDI]
MOV qword ptr [R14 + -0x10],RAX
MOV dword ptr [R14 + -0x8],0x0
LAB_00157536:
MOV RDI,R14
XOR ESI,ESI
CALL 0x00139670
MOVSXD RSI,dword ptr [RSP + 0x18]
INC RSI
LEA RDX,[RSP + 0x80]
MOV dword ptr [RDX],0xffffffff
MOV RDI,R14
CALL 0x00138f80
LEA RCX,[RSP + 0x58]
MOV RAX,qword ptr [RCX + -0x30]
MOV dword ptr [RAX],0x0
MOV RAX,qword ptr [RCX + 0x8]
SUB RAX,qword ptr [RCX]
SHR RAX,0x3
CMP R15D,EAX
JLE 0x00157597
LEA RDI,[RSP + 0x40]
MOV RSI,R15
CALL 0x00139670
LEA RDI,[RSP + 0x58]
MOV RSI,R15
CALL 0x0013a2c0
LAB_00157597:
MOVSXD RCX,dword ptr [RBX]
TEST RCX,RCX
JLE 0x00157730
XOR R14D,R14D
MOV qword ptr [RSP + 0x78],RBX
MOV qword ptr [RSP + 0x70],RCX
LAB_001575b0:
MOV RAX,qword ptr [RBX + 0x10]
MOVSXD RCX,dword ptr [RAX + R14*0x4 + 0x4]
MOVSXD R12,dword ptr [RAX + R14*0x4]
LEA R13,[R12*0x4]
ADD R13,qword ptr [RBX + 0x28]
SUB RCX,R12
SHL R12,0x3
ADD R12,qword ptr [RBX + 0x40]
MOV dword ptr [RSP + 0xc],0x0
MOV EBX,ECX
MOV EBP,0x0
MOV qword ptr [RSP + 0x10],RCX
TEST ECX,ECX
JLE 0x0015760f
XOR EAX,EAX
XOR EBP,EBP
LAB_001575f0:
MOVSXD RCX,dword ptr [R13 + RAX*0x4]
CMP RCX,0x3
JG 0x00157607
MOVZX EDX,byte ptr [RSP + RCX*0x1 + 0xc]
ADD EBP,EDX
MOV byte ptr [RSP + RCX*0x1 + 0xc],0x1
LAB_00157607:
INC RAX
CMP RBX,RAX
JNZ 0x001575f0
LAB_0015760f:
MOV R15,qword ptr [RSP + 0x28]
MOV EAX,dword ptr [R15 + R14*0x4]
CMP EAX,dword ptr [RSP + 0x20]
JNZ 0x00157808
MOV RCX,qword ptr [RSP + 0x10]
SUB ECX,EBP
ADD EAX,ECX
MOV dword ptr [R15 + R14*0x4 + 0x4],EAX
MOV dword ptr [RSP + 0x20],EAX
MOVSXD RSI,dword ptr [R15 + R14*0x4 + 0x4]
MOV RAX,qword ptr [RSP + 0x58]
MOV RCX,qword ptr [RSP + 0x60]
SUB RCX,RAX
SHR RCX,0x3
CMP ESI,ECX
JLE 0x00157671
LAB_0015764e:
LEA RDI,[RSP + 0x40]
CALL 0x00139670
MOVSXD RSI,dword ptr [R15 + R14*0x4 + 0x4]
LEA RDI,[RSP + 0x58]
CALL 0x0013a2c0
LAB_00157667:
MOV R15,qword ptr [RSP + 0x28]
MOV RAX,qword ptr [RSP + 0x58]
LAB_00157671:
MOVSXD RCX,dword ptr [R15 + R14*0x4]
LEA RDI,[RCX*0x4]
ADD RDI,qword ptr [RSP + 0x40]
LEA R15,[RAX + RCX*0x8]
TEST EBP,EBP
JZ 0x001576f1
XORPD XMM0,XMM0
MOVAPD xmmword ptr [RSP + 0x90],XMM0
MOVAPD xmmword ptr [RSP + 0x80],XMM0
CMP dword ptr [RSP + 0x10],0x0
JLE 0x00157718
XOR EAX,EAX
LAB_001576a9:
MOVSXD RCX,dword ptr [R13 + RAX*0x4]
MOVSD XMM0,qword ptr [R12 + RAX*0x8]
CMP RCX,0x3
JG 0x001576d9
MOV RDX,qword ptr [RSP + RCX*0x8 + 0x80]
TEST RDX,RDX
JZ 0x001576d1
ADDSD XMM0,qword ptr [RDX]
MOVSD qword ptr [RDX],XMM0
JMP 0x001576e8
LAB_001576d1:
MOV qword ptr [RSP + RCX*0x8 + 0x80],R15
LAB_001576d9:
MOV dword ptr [RDI],ECX
ADD RDI,0x4
MOVSD qword ptr [R15],XMM0
ADD R15,0x8
LAB_001576e8:
INC RAX
CMP EBX,EAX
JNZ 0x001576a9
JMP 0x00157718
LAB_001576f1:
MOV RBX,qword ptr [RSP + 0x10]
LEA RDX,[RBX*0x4]
MOV RSI,R13
CALL 0x00139ab0
SHL RBX,0x3
MOV RDI,R15
MOV RSI,R12
MOV RDX,RBX
CALL 0x00139ab0
LAB_00157718:
MOV RCX,qword ptr [RSP + 0x70]
INC R14
CMP R14,RCX
MOV RBX,qword ptr [RSP + 0x78]
JNZ 0x001575b0
MOV ECX,dword ptr [RBX]
LAB_00157730:
MOV RAX,qword ptr [RSP + 0x18]
MOV dword ptr [RSP + 0x18],ECX
MOV ECX,dword ptr [RSP + 0x20]
MOV RDX,qword ptr [RBX + 0x4]
MOV qword ptr [RBX],RAX
MOV dword ptr [RBX + 0x8],ECX
MOV qword ptr [RSP + 0x1c],RDX
MOV RAX,qword ptr [RBX + 0x20]
MOVUPS XMM0,xmmword ptr [RSP + 0x28]
MOVUPS XMM1,xmmword ptr [RBX + 0x10]
MOVUPS xmmword ptr [RBX + 0x10],XMM0
MOVUPS xmmword ptr [RSP + 0x28],XMM1
MOV RDI,qword ptr [RBX + 0x28]
MOVUPS XMM0,xmmword ptr [RSP + 0x38]
MOV qword ptr [RSP + 0x38],RAX
MOVUPS xmmword ptr [RBX + 0x20],XMM0
MOVUPS XMM0,xmmword ptr [RSP + 0x48]
MOV qword ptr [RSP + 0x40],RDI
MOVUPS XMM1,xmmword ptr [RBX + 0x30]
MOVUPS xmmword ptr [RBX + 0x30],XMM0
MOVUPS xmmword ptr [RSP + 0x48],XMM1
MOV RAX,qword ptr [RBX + 0x40]
MOV RCX,qword ptr [RBX + 0x48]
MOV RSI,qword ptr [RBX + 0x50]
MOVUPS XMM0,xmmword ptr [RSP + 0x58]
MOVUPS xmmword ptr [RBX + 0x40],XMM0
MOV RDX,qword ptr [RSP + 0x68]
MOV qword ptr [RBX + 0x50],RDX
MOV qword ptr [RSP + 0x58],RAX
MOV qword ptr [RSP + 0x60],RCX
MOV qword ptr [RSP + 0x68],RSI
TEST RAX,RAX
JZ 0x001577cd
SUB RSI,RAX
MOV RDI,RAX
CALL 0x0013a2b0
MOV RDI,qword ptr [RSP + 0x40]
LAB_001577cd:
TEST RDI,RDI
JZ 0x001577df
MOV RSI,qword ptr [RSP + 0x50]
SUB RSI,RDI
CALL 0x0013a2b0
LAB_001577df:
MOV RDI,qword ptr [RSP + 0x28]
TEST RDI,RDI
JZ 0x001577f6
MOV RSI,qword ptr [RSP + 0x38]
SUB RSI,RDI
CALL 0x0013a2b0
LAB_001577f6:
ADD RSP,0xa8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_00157808:
LEA RDI,[0x1b7a0b]
LEA RSI,[0x1b7a31]
LEA RCX,[0x1b82fb]
MOV EDX,0x98
CALL 0x00139540
|
/* void OpenSubdiv::v3_6_0::Far::(anonymous
namespace)::_removeValence2Duplicates<double>(OpenSubdiv::v3_6_0::Far::SparseMatrix<double>&) */
void OpenSubdiv::v3_6_0::Far::(anonymous_namespace)::_removeValence2Duplicates<double>
(SparseMatrix *param_1)
{
double dVar1;
double *pdVar2;
int8 uVar3;
void *pvVar4;
int8 uVar5;
int8 uVar6;
int4 *puVar7;
ulong uVar8;
ulong uVar9;
long lVar10;
int iVar11;
int *__dest;
long lVar12;
void *pvVar13;
void *pvVar14;
long lVar15;
double *__dest_00;
byte local_cc [4];
ulong local_c8;
int local_c0;
int4 uStack_bc;
int local_b8;
int4 *local_b0;
int8 uStack_a8;
long local_a0;
void *pvStack_98;
int8 local_90;
long lStack_88;
void *local_80;
long lStack_78;
long local_70;
long local_68;
SparseMatrix *local_60;
int local_58 [10];
local_80 = (void *)0x0;
lStack_78 = 0;
local_90 = 0;
lStack_88 = 0;
local_a0 = 0;
pvStack_98 = (void *)0x0;
local_b0 = (int4 *)0x0;
uStack_a8 = 0;
local_70 = 0;
iVar11 = *(int *)(param_1 + 8);
local_c0 = (int)*(int8 *)param_1;
uStack_bc = (int4)((ulong)*(int8 *)param_1 >> 0x20);
local_b8 = 0;
/* try { // try from 00157536 to 00157596 has its CatchHandler @ 00157827 */
std::vector<int,std::allocator<int>>::resize((vector<int,std::allocator<int>> *)&local_b0,0);
local_58[0] = 0xffffffff;
std::vector<int,std::allocator<int>>::resize
((vector<int,std::allocator<int>> *)&local_b0,(long)local_c0 + 1,local_58);
*local_b0 = 0;
if ((int)((ulong)(lStack_78 - (long)local_80) >> 3) < iVar11) {
std::vector<int,std::allocator<int>>::resize
((vector<int,std::allocator<int>> *)&pvStack_98,(long)iVar11);
std::vector<double,std::allocator<double>>::resize
((vector<double,std::allocator<double>> *)&local_80,(long)iVar11);
}
iVar11 = *(int *)param_1;
if (0 < (long)iVar11) {
lVar15 = 0;
local_60 = param_1;
local_68 = (long)iVar11;
do {
lVar12 = (long)*(int *)(*(long *)(local_60 + 0x10) + lVar15 * 4);
pvVar14 = (void *)(lVar12 * 4 + *(long *)(local_60 + 0x28));
uVar9 = *(int *)(*(long *)(local_60 + 0x10) + 4 + lVar15 * 4) - lVar12;
pvVar13 = (void *)(lVar12 * 8 + *(long *)(local_60 + 0x40));
local_cc[0] = 0;
local_cc[1] = 0;
local_cc[2] = 0;
local_cc[3] = 0;
iVar11 = 0;
local_c8 = uVar9;
if (0 < (int)uVar9) {
uVar8 = 0;
iVar11 = 0;
do {
lVar12 = (long)*(int *)((long)pvVar14 + uVar8 * 4);
if (lVar12 < 4) {
iVar11 = iVar11 + (uint)local_cc[lVar12];
local_cc[lVar12] = 1;
}
uVar8 = uVar8 + 1;
} while ((uVar9 & 0xffffffff) != uVar8);
}
puVar7 = local_b0;
if (local_b0[lVar15] != local_b8) {
/* WARNING: Subroutine does not return */
__assert_fail("_rowOffsets[rowIndex] == _numElements",
"/workspace/llm4binary/github/2025_star3/NVIDIA-RTX[P]OSD-Lite/opensubdiv/far/../far/../far/../far/sparseMatrix.h"
,0x98,
"void OpenSubdiv::v3_6_0::Far::SparseMatrix<double>::SetRowSize(int, int) [REAL = double]"
);
}
local_b8 = local_b0[lVar15] + ((int)local_c8 - iVar11);
local_b0[lVar15 + 1] = local_b8;
if ((int)((ulong)(lStack_78 - (long)local_80) >> 3) < (int)local_b0[lVar15 + 1]) {
/* try { // try from 0015764e to 00157666 has its CatchHandler @ 00157829 */
std::vector<int,std::allocator<int>>::resize
((vector<int,std::allocator<int>> *)&pvStack_98,(long)(int)local_b0[lVar15 + 1]);
std::vector<double,std::allocator<double>>::resize
((vector<double,std::allocator<double>> *)&local_80,(long)(int)puVar7[lVar15 + 1])
;
}
uVar8 = local_c8;
__dest = (int *)((long)(int)local_b0[lVar15] * 4 + (long)pvStack_98);
__dest_00 = (double *)((long)local_80 + (long)(int)local_b0[lVar15] * 8);
if (iVar11 == 0) {
memcpy(__dest,pvVar14,local_c8 * 4);
memcpy(__dest_00,pvVar13,uVar8 << 3);
}
else {
local_58[4] = 0;
local_58[5] = 0;
local_58[6] = 0;
local_58[7] = 0;
local_58[0] = 0;
local_58[1] = 0;
local_58[2] = 0;
local_58[3] = 0;
if (0 < (int)local_c8) {
lVar12 = 0;
do {
iVar11 = *(int *)((long)pvVar14 + lVar12 * 4);
lVar10 = (long)iVar11;
dVar1 = *(double *)((long)pvVar13 + lVar12 * 8);
if (lVar10 < 4) {
pdVar2 = *(double **)(local_58 + lVar10 * 2);
if (pdVar2 == (double *)0x0) {
*(double **)(local_58 + lVar10 * 2) = __dest_00;
goto LAB_001576d9;
}
*pdVar2 = dVar1 + *pdVar2;
}
else {
LAB_001576d9:
*__dest = iVar11;
__dest = __dest + 1;
*__dest_00 = dVar1;
__dest_00 = __dest_00 + 1;
}
lVar12 = lVar12 + 1;
} while ((int)uVar9 != (int)lVar12);
}
}
lVar15 = lVar15 + 1;
} while (lVar15 != local_68);
iVar11 = *(int *)local_60;
param_1 = local_60;
}
*(ulong *)param_1 = CONCAT44(uStack_bc,local_c0);
*(int *)(param_1 + 8) = local_b8;
uStack_bc = (int4)*(int8 *)(param_1 + 4);
local_b8 = (int)((ulong)*(int8 *)(param_1 + 4) >> 0x20);
lVar15 = *(long *)(param_1 + 0x20);
pvVar4 = *(void **)(param_1 + 0x10);
uVar5 = *(int8 *)(param_1 + 0x18);
*(int4 **)(param_1 + 0x10) = local_b0;
*(int8 *)(param_1 + 0x18) = uStack_a8;
pvVar13 = *(void **)(param_1 + 0x28);
*(long *)(param_1 + 0x20) = local_a0;
*(void **)(param_1 + 0x28) = pvStack_98;
uVar6 = *(int8 *)(param_1 + 0x30);
lVar10 = *(long *)(param_1 + 0x38);
*(int8 *)(param_1 + 0x30) = local_90;
*(long *)(param_1 + 0x38) = lStack_88;
pvVar14 = *(void **)(param_1 + 0x40);
uVar3 = *(int8 *)(param_1 + 0x48);
lVar12 = *(long *)(param_1 + 0x50);
*(void **)(param_1 + 0x40) = local_80;
*(long *)(param_1 + 0x48) = lStack_78;
*(long *)(param_1 + 0x50) = local_70;
local_c0 = iVar11;
local_b0 = (int4 *)pvVar4;
uStack_a8 = uVar5;
local_a0 = lVar15;
pvStack_98 = pvVar13;
local_90 = uVar6;
lStack_88 = lVar10;
local_80 = pvVar14;
lStack_78 = uVar3;
local_70 = lVar12;
if (pvVar14 != (void *)0x0) {
operator_delete(pvVar14,lVar12 - (long)pvVar14);
}
if (pvStack_98 != (void *)0x0) {
operator_delete(pvStack_98,lStack_88 - (long)pvStack_98);
}
if (local_b0 != (int4 *)0x0) {
operator_delete(local_b0,local_a0 - (long)local_b0);
}
return;
}
|
|
61,889 |
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>::emplace_back<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>&)
|
monkey531[P]llama/common/./json.hpp
|
reference emplace_back(Args&& ... args)
{
// emplace_back only works for null objects or arrays
if (JSON_HEDLEY_UNLIKELY(!(is_null() || is_array())))
{
JSON_THROW(type_error::create(311, detail::concat("cannot use emplace_back() with ", type_name()), this));
}
// transform null object into an array
if (is_null())
{
m_data.m_type = value_t::array;
m_data.m_value = value_t::array;
assert_invariant();
}
// add element to array (perfect forwarding)
const auto old_capacity = m_data.m_value.array->capacity();
m_data.m_value.array->emplace_back(std::forward<Args>(args)...);
return set_parent(m_data.m_value.array->back(), old_capacity);
}
|
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>& 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_back<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>&):
pushq %rbp
pushq %r14
pushq %rbx
subq $0x30, %rsp
movq %rsi, %rbx
movq %rdi, %r14
movzbl (%rdi), %eax
testl %eax, %eax
je 0xf4580
cmpl $0x2, %eax
je 0xf45a0
movl $0x20, %edi
callq 0x1b450
movq %rax, %rbx
movq %r14, %rdi
callq 0x6c4fa
leaq 0x8(%rsp), %rdx
movq %rax, (%rdx)
leaq 0x1296a(%rip), %rsi # 0x106eb0
leaq 0x10(%rsp), %rdi
callq 0xf45fc
movb $0x1, %bpl
leaq 0x10(%rsp), %rdx
movq %rbx, %rdi
movl $0x137, %esi # imm = 0x137
movq %r14, %rcx
callq 0x6c2a2
xorl %ebp, %ebp
leaq 0x46997(%rip), %rsi # 0x13af08
leaq -0x8bf3c(%rip), %rdx # 0x6863c
movq %rbx, %rdi
callq 0x1bf90
movb $0x2, (%r14)
movl $0x18, %edi
callq 0x1b8d0
xorps %xmm0, %xmm0
movups %xmm0, (%rax)
movq $0x0, 0x10(%rax)
movq %rax, 0x8(%r14)
movq 0x8(%r14), %rdi
movq %rbx, %rsi
callq 0xf4684
movq 0x8(%r14), %rax
movq 0x8(%rax), %rax
addq $-0x10, %rax
addq $0x30, %rsp
popq %rbx
popq %r14
popq %rbp
retq
movq %rax, %r14
leaq 0x20(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xf45e7
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x1b8f0
jmp 0xf45e7
movq %rax, %r14
movb $0x1, %bpl
testb %bpl, %bpl
je 0xf45f4
movq %rbx, %rdi
callq 0x1b680
movq %r14, %rdi
callq 0x1c020
|
_ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE12emplace_backIJRSD_EEESF_DpOT_:
push rbp; char
push r14; int
push rbx; __int64
sub rsp, 30h
mov rbx, rsi
mov r14, rdi
movzx eax, byte ptr [rdi]
test eax, eax
jz short loc_F4580
cmp eax, 2
jz short loc_F45A0
mov edi, 20h ; ' '; thrown_size
call ___cxa_allocate_exception
mov rbx, rax
mov rdi, r14
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE9type_nameEv; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::type_name(void)
lea rdx, [rsp+48h+var_40]
mov [rdx], rax
lea rsi, aCannotUseEmpla; "cannot use emplace_back() with "
lea rdi, [rsp+48h+var_38]
call _ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJRA32_KcPS9_EEET_DpOT0_; nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[32],char const*>(char const(&)[32],char const* &&)
mov bpl, 1
lea rdx, [rsp+48h+var_38]
mov rdi, rbx; this
mov esi, 137h; 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
loc_F4580:
mov byte ptr [r14], 2
mov edi, 18h; unsigned __int64
call __Znwm; operator new(ulong)
xorps xmm0, xmm0
movups xmmword ptr [rax], xmm0
mov qword ptr [rax+10h], 0
mov [r14+8], rax
loc_F45A0:
mov rdi, [r14+8]
mov rsi, rbx
call _ZNSt6vectorIN8nlohmann16json_abi_v3_11_310basic_jsonINS1_11ordered_mapES_NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES_IhSaIhEEvEESaISD_EE12emplace_backIJRSD_EEESH_DpOT_; std::vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>::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>&>(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 rax, [r14+8]
mov rax, [rax+8]
add rax, 0FFFFFFFFFFFFFFF0h
add rsp, 30h
pop rbx
pop r14
pop rbp
retn
mov r14, rax
lea rax, [rsp+arg_18]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_F45E7
mov rsi, [rsp+arg_18]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_F45E7
mov r14, rax
mov bpl, 1
loc_F45E7:
test bpl, bpl
jz short loc_F45F4
mov rdi, rbx; void *
call ___cxa_free_exception
loc_F45F4:
mov rdi, r14
call __Unwind_Resume
|
long long nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::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>&>(
long long a1,
long long a2)
{
nlohmann::json_abi_v3_11_3::detail::exception *exception; // rbx
long long v3; // rax
_QWORD v5[7]; // [rsp+10h] [rbp-38h] BYREF
if ( *(_BYTE *)a1 )
{
if ( *(_BYTE *)a1 != 2 )
{
exception = (nlohmann::json_abi_v3_11_3::detail::exception *)__cxa_allocate_exception(0x20uLL);
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::type_name((unsigned __int8 *)a1);
nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[32],char const*>(
v5,
"cannot use emplace_back() 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,
311,
v5);
__cxa_throw(
exception,
(struct type_info *)&`typeinfo for'nlohmann::json_abi_v3_11_3::detail::type_error,
(void (*)(void *))nlohmann::json_abi_v3_11_3::detail::exception::~exception);
}
}
else
{
*(_BYTE *)a1 = 2;
v3 = operator new(0x18uLL);
*(_OWORD *)v3 = 0LL;
*(_QWORD *)(v3 + 16) = 0LL;
*(_QWORD *)(a1 + 8) = v3;
}
std::vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>::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>&>(
*(_QWORD *)(a1 + 8),
a2);
return *(_QWORD *)(*(_QWORD *)(a1 + 8) + 8LL) - 16LL;
}
|
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>&>:
PUSH RBP
PUSH R14
PUSH RBX
SUB RSP,0x30
MOV RBX,RSI
MOV R14,RDI
MOVZX EAX,byte ptr [RDI]
TEST EAX,EAX
JZ 0x001f4580
CMP EAX,0x2
JZ 0x001f45a0
MOV EDI,0x20
CALL 0x0011b450
MOV RBX,RAX
MOV RDI,R14
CALL 0x0016c4fa
LEA RDX,[RSP + 0x8]
MOV qword ptr [RDX],RAX
LAB_001f453f:
LEA RSI,[0x206eb0]
LEA RDI,[RSP + 0x10]
CALL 0x001f45fc
MOV BPL,0x1
LAB_001f4553:
LEA RDX,[RSP + 0x10]
MOV RDI,RBX
MOV ESI,0x137
MOV RCX,R14
CALL 0x0016c2a2
XOR EBP,EBP
LEA RSI,[0x23af08]
LEA RDX,[0x16863c]
MOV RDI,RBX
CALL 0x0011bf90
LAB_001f4580:
MOV byte ptr [R14],0x2
MOV EDI,0x18
CALL 0x0011b8d0
XORPS XMM0,XMM0
MOVUPS xmmword ptr [RAX],XMM0
MOV qword ptr [RAX + 0x10],0x0
MOV qword ptr [R14 + 0x8],RAX
LAB_001f45a0:
MOV RDI,qword ptr [R14 + 0x8]
MOV RSI,RBX
CALL 0x001f4684
MOV RAX,qword ptr [R14 + 0x8]
MOV RAX,qword ptr [RAX + 0x8]
ADD RAX,-0x10
ADD RSP,0x30
POP RBX
POP R14
POP RBP
RET
|
/* nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector,
std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void>& 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<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,
std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void>&>(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,
std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void>&) */
basic_json * __thiscall
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<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>&>
(basic_json<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,basic_json *param_1)
{
int8 uVar1;
int8 *puVar2;
char *local_40;
detail local_38 [32];
if (*this == (basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
)0x0) {
*this = (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>
)0x2;
puVar2 = (int8 *)operator_new(0x18);
*puVar2 = 0;
puVar2[1] = 0;
puVar2[2] = 0;
*(int8 **)(this + 8) = puVar2;
}
else if (*this != (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>
)0x2) {
uVar1 = __cxa_allocate_exception(0x20);
local_40 = (char *)type_name(this);
/* try { // try from 001f453f to 001f454f has its CatchHandler @ 001f45e1 */
detail::concat<std::__cxx11::string,char_const(&)[32],char_const*>
(local_38,"cannot use emplace_back() with ",&local_40);
/* try { // try from 001f4553 to 001f457f has its CatchHandler @ 001f45c1 */
_ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_
(uVar1,0x137,local_38,this);
/* WARNING: Subroutine does not return */
__cxa_throw(uVar1,&detail::type_error::typeinfo,detail::exception::~exception);
}
std::
vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>
::
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>&>
(*(vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>
**)(this + 8),param_1);
return (basic_json *)(*(long *)(*(long *)(this + 8) + 8) + -0x10);
}
|
|
61,890 |
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>::size() const
|
monkey531[P]llama/common/json.hpp
|
size_type size() const noexcept
{
switch (m_data.m_type)
{
case value_t::null:
{
// null values are empty
return 0;
}
case value_t::array:
{
// delegate call to array_t::size()
return m_data.m_value.array->size();
}
case value_t::object:
{
// delegate call to object_t::size()
return m_data.m_value.object->size();
}
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:
{
// all other types have size 1
return 1;
}
}
}
|
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>::size() const:
movzbl (%rdi), %eax
testl %eax, %eax
je 0x42104
cmpl $0x1, %eax
je 0x420ed
cmpl $0x2, %eax
jne 0x42101
movq 0x8(%rdi), %rcx
movq 0x8(%rcx), %rax
subq (%rcx), %rax
sarq $0x4, %rax
retq
movq 0x8(%rdi), %rcx
movq 0x8(%rcx), %rax
subq (%rcx), %rax
pushq $0x30
popq %rcx
cqto
idivq %rcx
retq
pushq $0x1
popq %rax
retq
nop
|
_ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4sizeEv:
movzx eax, byte ptr [rdi]
test eax, eax
jz short locret_42104
cmp eax, 1
jz short loc_420ED
cmp eax, 2
jnz short loc_42101
mov rcx, [rdi+8]
mov rax, [rcx+8]
sub rax, [rcx]
sar rax, 4
retn
loc_420ED:
mov rcx, [rdi+8]
mov rax, [rcx+8]
sub rax, [rcx]
push 30h ; '0'
pop rcx
cqo
idiv rcx
retn
loc_42101:
push 1
pop rax
locret_42104:
retn
|
long long nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::size(
unsigned __int8 *a1)
{
long long result; // rax
result = *a1;
if ( *a1 )
{
if ( (_DWORD)result == 1 )
{
return (*(_QWORD *)(*((_QWORD *)a1 + 1) + 8LL) - **((_QWORD **)a1 + 1)) / 48LL;
}
else if ( (_DWORD)result == 2 )
{
return (long long)(*(_QWORD *)(*((_QWORD *)a1 + 1) + 8LL) - **((_QWORD **)a1 + 1)) >> 4;
}
else
{
return 1LL;
}
}
return result;
}
|
size:
MOVZX EAX,byte ptr [RDI]
TEST EAX,EAX
JZ 0x00142104
CMP EAX,0x1
JZ 0x001420ed
CMP EAX,0x2
JNZ 0x00142101
MOV RCX,qword ptr [RDI + 0x8]
MOV RAX,qword ptr [RCX + 0x8]
SUB RAX,qword ptr [RCX]
SAR RAX,0x4
RET
LAB_001420ed:
MOV RCX,qword ptr [RDI + 0x8]
MOV RAX,qword ptr [RCX + 0x8]
SUB RAX,qword ptr [RCX]
PUSH 0x30
POP RCX
CQO
IDIV RCX
RET
LAB_00142101:
PUSH 0x1
POP RAX
LAB_00142104:
RET
|
/* nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector,
std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void>::size() const */
ulong __thiscall
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>
::size(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)
{
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
bVar1;
ulong uVar2;
bVar1 = *this;
uVar2 = (ulong)(byte)bVar1;
if (bVar1 != (basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
)0x0) {
if (bVar1 == (basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
)0x1) {
return ((*(long **)(this + 8))[1] - **(long **)(this + 8)) / 0x30;
}
if (bVar1 == (basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
)0x2) {
return (*(long **)(this + 8))[1] - **(long **)(this + 8) >> 4;
}
uVar2 = 1;
}
return uVar2;
}
|
|
61,891 |
nlohmann::json_abi_v3_11_3::detail::dtoa_impl::diyfp::normalize(nlohmann::json_abi_v3_11_3::detail::dtoa_impl::diyfp)
|
llama.cpp/common/json.hpp
|
static diyfp normalize(diyfp x) noexcept
{
JSON_ASSERT(x.f != 0);
while ((x.f >> 63u) == 0)
{
x.f <<= 1u;
x.e--;
}
return x;
}
|
O3
|
cpp
|
nlohmann::json_abi_v3_11_3::detail::dtoa_impl::diyfp::normalize(nlohmann::json_abi_v3_11_3::detail::dtoa_impl::diyfp):
pushq %rax
testq %rdi, %rdi
je 0x7f5d1
js 0x7f5ca
addq %rdi, %rdi
decl %esi
testq %rdi, %rdi
jns 0x7f5c0
movq %rdi, %rax
movl %esi, %edx
popq %rcx
retq
leaq 0x9a2e0(%rip), %rdi # 0x1198b8
leaq 0x92c2e(%rip), %rdx # 0x11220d
leaq 0x9b80e(%rip), %rcx # 0x11adf4
movl $0x42a1, %esi # imm = 0x42A1
xorl %eax, %eax
callq 0x20e60
movq %rax, %rdi
callq 0x2868d
|
_ZN8nlohmann16json_abi_v3_11_36detail9dtoa_impl5diyfp9normalizeES3_:
push rax
test rdi, rdi
jz short loc_7F5D1
js short loc_7F5CA
loc_7F5C0:
add rdi, rdi
dec esi
test rdi, rdi
jns short loc_7F5C0
loc_7F5CA:
mov rax, rdi
mov edx, esi
pop rcx
retn
loc_7F5D1:
lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/llama."...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aXF0; "x.f != 0"
mov esi, 42A1h
xor eax, eax
call _ggml_abort
mov rdi, rax
call __clang_call_terminate
|
long long nlohmann::json_abi_v3_11_3::detail::dtoa_impl::diyfp::normalize(long long a1, int a2)
{
void *v3; // rax
if ( !a1 )
{
ggml_abort(
"/workspace/llm4binary/github2025/llama.cpp/common/json.hpp",
17057LL,
"GGML_ASSERT(%s) failed",
"x.f != 0");
_clang_call_terminate(v3);
}
for ( ; a1 >= 0; --a2 )
a1 *= 2LL;
return a1;
}
|
normalize:
PUSH RAX
TEST RDI,RDI
JZ 0x0017f5d1
JS 0x0017f5ca
LAB_0017f5c0:
ADD RDI,RDI
DEC ESI
TEST RDI,RDI
JNS 0x0017f5c0
LAB_0017f5ca:
MOV RAX,RDI
MOV EDX,ESI
POP RCX
RET
LAB_0017f5d1:
LEA RDI,[0x2198b8]
LEA RDX,[0x21220d]
LEA RCX,[0x21adf4]
MOV ESI,0x42a1
XOR EAX,EAX
CALL 0x00120e60
|
/* nlohmann::json_abi_v3_11_3::detail::dtoa_impl::diyfp::normalize(nlohmann::json_abi_v3_11_3::detail::dtoa_impl::diyfp)
*/
int1 [16] __thiscall
nlohmann::json_abi_v3_11_3::detail::dtoa_impl::diyfp::normalize(diyfp *this,int param_2)
{
int1 auVar1 [16];
if (this != (diyfp *)0x0) {
if (-1 < (long)this) {
do {
this = (diyfp *)((long)this * 2);
param_2 = param_2 + -1;
} while (-1 < (long)this);
}
auVar1._8_4_ = param_2;
auVar1._0_8_ = this;
auVar1._12_4_ = 0;
return auVar1;
}
/* try { // try from 0017f5d1 to 0017f5f1 has its CatchHandler @ 0017f5f2 */
/* WARNING: Subroutine does not return */
ggml_abort("/workspace/llm4binary/github2025/llama.cpp/common/json.hpp",0x42a1,
"GGML_ASSERT(%s) failed","x.f != 0");
}
|
|
61,892 |
LefDefParser::defiSlot::addPolygon(LefDefParser::defiGeometries*)
|
Efficient-TDP/thirdparty/Limbo/limbo/thirdparty/lefdef/5.8/def/def/defiSlot.cpp
|
void defiSlot::addPolygon(defiGeometries* geom) {
struct defiPoints* p;
int x, y;
int i;
if (numPolys_ == polysAllocated_) {
struct defiPoints** poly;
polysAllocated_ = (polysAllocated_ == 0) ?
2 : polysAllocated_ * 2;
poly = (struct defiPoints**)malloc(sizeof(struct defiPoints*) *
polysAllocated_);
for (i = 0; i < numPolys_; i++)
poly[i] = polygons_[i];
if (polygons_)
free((char*)(polygons_));
polygons_ = poly;
}
p = (struct defiPoints*)malloc(sizeof(struct defiPoints));
p->numPoints = geom->numPoints();
p->x = (int*)malloc(sizeof(int)*p->numPoints);
p->y = (int*)malloc(sizeof(int)*p->numPoints);
for (i = 0; i < p->numPoints; i++) {
geom->points(i, &x, &y);
p->x[i] = x;
p->y[i] = y;
}
polygons_[numPolys_] = p;
numPolys_ += 1;
}
|
O3
|
cpp
|
LefDefParser::defiSlot::addPolygon(LefDefParser::defiGeometries*):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rsi, %r12
movq %rdi, %r14
movl 0x40(%rdi), %ebx
cmpl 0x44(%rdi), %ebx
jne 0x2cd3c
leal (%rbx,%rbx), %eax
testq %rbx, %rbx
movl $0x2, %ecx
cmovnel %eax, %ecx
movl %ecx, 0x44(%r14)
movslq %ecx, %rdi
shlq $0x3, %rdi
callq 0x6270
movq %rax, %r15
movq 0x48(%r14), %rdi
testl %ebx, %ebx
jle 0x2cd2b
xorl %eax, %eax
movq (%rdi,%rax,8), %rcx
movq %rcx, (%r15,%rax,8)
incq %rax
cmpq %rax, %rbx
jne 0x2cd15
leaq 0x48(%r14), %rbx
jmp 0x2cd34
leaq 0x48(%r14), %rbx
testq %rdi, %rdi
je 0x2cd39
callq 0x6220
movq %r15, (%rbx)
movq %r14, 0x10(%rsp)
movl $0x18, %edi
callq 0x6270
movq %rax, %rbp
movq %r12, %rdi
callq 0x1911e
movl %eax, (%rbp)
movslq %eax, %r14
leaq (,%r14,4), %r15
movq %r15, %rdi
callq 0x6270
movq %r12, %rbx
movq %rax, %r12
movq %rax, 0x8(%rbp)
movq %r15, %rdi
callq 0x6270
movq %rbp, 0x8(%rsp)
movq %rax, 0x10(%rbp)
testl %r14d, %r14d
jle 0x2cdbe
movq %rax, %r13
xorl %ebp, %ebp
movq %rsp, %r15
movq %rbx, %rdi
movl %ebp, %esi
leaq 0x4(%rsp), %rdx
movq %r15, %rcx
callq 0x19122
movl 0x4(%rsp), %eax
movl %eax, (%r12,%rbp,4)
movl (%rsp), %eax
movl %eax, (%r13,%rbp,4)
incq %rbp
cmpq %r14, %rbp
jl 0x2cd94
movq 0x10(%rsp), %rdx
movq 0x48(%rdx), %rax
movslq 0x40(%rdx), %rcx
movq 0x8(%rsp), %rsi
movq %rsi, (%rax,%rcx,8)
leal 0x1(%rcx), %eax
movl %eax, 0x40(%rdx)
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
|
_ZN12LefDefParser8defiSlot10addPolygonEPNS_14defiGeometriesE:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 18h
mov r12, rsi
mov r14, rdi
mov ebx, [rdi+40h]
cmp ebx, [rdi+44h]
jnz short loc_2CD3C
lea eax, [rbx+rbx]
test rbx, rbx
mov ecx, 2
cmovnz ecx, eax
mov [r14+44h], ecx
movsxd rdi, ecx
shl rdi, 3
call _malloc
mov r15, rax
mov rdi, [r14+48h]
test ebx, ebx
jle short loc_2CD2B
xor eax, eax
loc_2CD15:
mov rcx, [rdi+rax*8]
mov [r15+rax*8], rcx
inc rax
cmp rbx, rax
jnz short loc_2CD15
lea rbx, [r14+48h]
jmp short loc_2CD34
loc_2CD2B:
lea rbx, [r14+48h]
test rdi, rdi
jz short loc_2CD39
loc_2CD34:
call _free
loc_2CD39:
mov [rbx], r15
loc_2CD3C:
mov [rsp+48h+var_38], r14
mov edi, 18h
call _malloc
mov rbp, rax
mov rdi, r12; this
call _ZNK12LefDefParser14defiGeometries9numPointsEv; LefDefParser::defiGeometries::numPoints(void)
mov [rbp+0], eax
movsxd r14, eax
lea r15, ds:0[r14*4]
mov rdi, r15
call _malloc
mov rbx, r12
mov r12, rax
mov [rbp+8], rax
mov rdi, r15
call _malloc
mov [rsp+48h+var_40], rbp
mov [rbp+10h], rax
test r14d, r14d
jle short loc_2CDBE
mov r13, rax
xor ebp, ebp
mov r15, rsp
loc_2CD94:
mov rdi, rbx; this
mov esi, ebp; int
lea rdx, [rsp+48h+var_44]; int *
mov rcx, r15; int *
call _ZNK12LefDefParser14defiGeometries6pointsEiPiS1_; LefDefParser::defiGeometries::points(int,int *,int *)
mov eax, [rsp+48h+var_44]
mov [r12+rbp*4], eax
mov eax, [rsp+48h+var_48]
mov [r13+rbp*4+0], eax
inc rbp
cmp rbp, r14
jl short loc_2CD94
loc_2CDBE:
mov rdx, [rsp+48h+var_38]
mov rax, [rdx+48h]
movsxd rcx, dword ptr [rdx+40h]
mov rsi, [rsp+48h+var_40]
mov [rax+rcx*8], rsi
lea eax, [rcx+1]
mov [rdx+40h], eax
add rsp, 18h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
|
long long LefDefParser::defiSlot::addPolygon(LefDefParser::defiSlot *this, LefDefParser::defiGeometries *a2)
{
long long v3; // rbx
int v4; // ecx
long long v5; // r15
long long v6; // rdi
long long i; // rax
long long *v8; // rbx
long long v9; // rbp
int v10; // eax
long long v11; // r14
long long v12; // r15
long long v13; // r12
long long v14; // rax
long long v15; // r13
long long j; // rbp
LefDefParser::defiSlot *v17; // rdx
long long v18; // rcx
long long result; // rax
int v20; // [rsp+0h] [rbp-48h] BYREF
int v21; // [rsp+4h] [rbp-44h] BYREF
long long v22; // [rsp+8h] [rbp-40h]
LefDefParser::defiSlot *v23; // [rsp+10h] [rbp-38h]
v3 = *((unsigned int *)this + 16);
if ( (_DWORD)v3 == *((_DWORD *)this + 17) )
{
v4 = 2;
if ( *((_DWORD *)this + 16) )
v4 = 2 * v3;
*((_DWORD *)this + 17) = v4;
v5 = malloc(8LL * v4);
v6 = *((_QWORD *)this + 9);
if ( (int)v3 <= 0 )
{
v8 = (long long *)((char *)this + 72);
if ( !v6 )
{
LABEL_10:
*v8 = v5;
goto LABEL_11;
}
}
else
{
for ( i = 0LL; i != v3; ++i )
*(_QWORD *)(v5 + 8 * i) = *(_QWORD *)(v6 + 8 * i);
v8 = (long long *)((char *)this + 72);
}
free(v6);
goto LABEL_10;
}
LABEL_11:
v23 = this;
v9 = malloc(24LL);
v10 = LefDefParser::defiGeometries::numPoints(a2);
*(_DWORD *)v9 = v10;
v11 = v10;
v12 = 4LL * v10;
v13 = malloc(v12);
*(_QWORD *)(v9 + 8) = v13;
v14 = malloc(v12);
v22 = v9;
*(_QWORD *)(v9 + 16) = v14;
if ( (int)v11 > 0 )
{
v15 = v14;
for ( j = 0LL; j < v11; ++j )
{
LefDefParser::defiGeometries::points(a2, j, &v21, &v20);
*(_DWORD *)(v13 + 4 * j) = v21;
*(_DWORD *)(v15 + 4 * j) = v20;
}
}
v17 = v23;
v18 = *((int *)v23 + 16);
*(_QWORD *)(*((_QWORD *)v23 + 9) + 8 * v18) = v22;
result = (unsigned int)(v18 + 1);
*((_DWORD *)v17 + 16) = result;
return result;
}
|
addPolygon:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x18
MOV R12,RSI
MOV R14,RDI
MOV EBX,dword ptr [RDI + 0x40]
CMP EBX,dword ptr [RDI + 0x44]
JNZ 0x0012cd3c
LEA EAX,[RBX + RBX*0x1]
TEST RBX,RBX
MOV ECX,0x2
CMOVNZ ECX,EAX
MOV dword ptr [R14 + 0x44],ECX
MOVSXD RDI,ECX
SHL RDI,0x3
CALL 0x00106270
MOV R15,RAX
MOV RDI,qword ptr [R14 + 0x48]
TEST EBX,EBX
JLE 0x0012cd2b
XOR EAX,EAX
LAB_0012cd15:
MOV RCX,qword ptr [RDI + RAX*0x8]
MOV qword ptr [R15 + RAX*0x8],RCX
INC RAX
CMP RBX,RAX
JNZ 0x0012cd15
LEA RBX,[R14 + 0x48]
JMP 0x0012cd34
LAB_0012cd2b:
LEA RBX,[R14 + 0x48]
TEST RDI,RDI
JZ 0x0012cd39
LAB_0012cd34:
CALL 0x00106220
LAB_0012cd39:
MOV qword ptr [RBX],R15
LAB_0012cd3c:
MOV qword ptr [RSP + 0x10],R14
MOV EDI,0x18
CALL 0x00106270
MOV RBP,RAX
MOV RDI,R12
CALL 0x0011911e
MOV dword ptr [RBP],EAX
MOVSXD R14,EAX
LEA R15,[R14*0x4]
MOV RDI,R15
CALL 0x00106270
MOV RBX,R12
MOV R12,RAX
MOV qword ptr [RBP + 0x8],RAX
MOV RDI,R15
CALL 0x00106270
MOV qword ptr [RSP + 0x8],RBP
MOV qword ptr [RBP + 0x10],RAX
TEST R14D,R14D
JLE 0x0012cdbe
MOV R13,RAX
XOR EBP,EBP
MOV R15,RSP
LAB_0012cd94:
MOV RDI,RBX
MOV ESI,EBP
LEA RDX,[RSP + 0x4]
MOV RCX,R15
CALL 0x00119122
MOV EAX,dword ptr [RSP + 0x4]
MOV dword ptr [R12 + RBP*0x4],EAX
MOV EAX,dword ptr [RSP]
MOV dword ptr [R13 + RBP*0x4],EAX
INC RBP
CMP RBP,R14
JL 0x0012cd94
LAB_0012cdbe:
MOV RDX,qword ptr [RSP + 0x10]
MOV RAX,qword ptr [RDX + 0x48]
MOVSXD RCX,dword ptr [RDX + 0x40]
MOV RSI,qword ptr [RSP + 0x8]
MOV qword ptr [RAX + RCX*0x8],RSI
LEA EAX,[RCX + 0x1]
MOV dword ptr [RDX + 0x40],EAX
ADD RSP,0x18
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
/* LefDefParser::defiSlot::addPolygon(LefDefParser::defiGeometries*) */
void __thiscall LefDefParser::defiSlot::addPolygon(defiSlot *this,defiGeometries *param_1)
{
size_t __size;
uint uVar1;
int iVar2;
void *pvVar3;
ulong uVar4;
int *piVar5;
void *pvVar6;
long lVar7;
int local_48;
int local_44;
int *local_40;
defiSlot *local_38;
uVar1 = *(uint *)(this + 0x40);
if (uVar1 != *(uint *)(this + 0x44)) goto LAB_0012cd3c;
iVar2 = 2;
if ((ulong)uVar1 != 0) {
iVar2 = uVar1 * 2;
}
*(int *)(this + 0x44) = iVar2;
pvVar3 = malloc((long)iVar2 << 3);
pvVar6 = *(void **)(this + 0x48);
if ((int)uVar1 < 1) {
if (pvVar6 != (void *)0x0) goto LAB_0012cd34;
}
else {
uVar4 = 0;
do {
*(int8 *)((long)pvVar3 + uVar4 * 8) = *(int8 *)((long)pvVar6 + uVar4 * 8);
uVar4 = uVar4 + 1;
} while (uVar1 != uVar4);
LAB_0012cd34:
free(pvVar6);
}
*(void **)(this + 0x48) = pvVar3;
LAB_0012cd3c:
local_38 = this;
piVar5 = (int *)malloc(0x18);
iVar2 = defiGeometries::numPoints(param_1);
*piVar5 = iVar2;
__size = (long)iVar2 * 4;
pvVar6 = malloc(__size);
*(void **)(piVar5 + 2) = pvVar6;
pvVar3 = malloc(__size);
*(void **)(piVar5 + 4) = pvVar3;
local_40 = piVar5;
if (0 < iVar2) {
lVar7 = 0;
do {
defiGeometries::points(param_1,(int)lVar7,&local_44,&local_48);
*(int *)((long)pvVar6 + lVar7 * 4) = local_44;
*(int *)((long)pvVar3 + lVar7 * 4) = local_48;
lVar7 = lVar7 + 1;
} while (lVar7 < iVar2);
}
iVar2 = *(int *)(local_38 + 0x40);
*(int **)(*(long *)(local_38 + 0x48) + (long)iVar2 * 8) = local_40;
*(int *)(local_38 + 0x40) = iVar2 + 1;
return;
}
|
|
61,893 |
c4_get_validators
|
corpus-core[P]colibri-stateless/src/chains/eth/verifier/sync_committee_state.c
|
INTERNAL const c4_status_t c4_get_validators(verify_ctx_t* ctx, uint32_t period, c4_sync_state_t* target_state) {
c4_sync_state_t sync_state = get_validators_from_cache(ctx, period);
if (sync_state.validators.data == NULL) {
if (sync_state.last_period == 0) { // there is nothing we can start syncing from
TRY_ASYNC(init_sync_state(ctx));
return c4_get_validators(ctx, period, target_state);
}
else {
bytes_t client_update = {0};
if (req_client_update(&ctx->state, sync_state.last_period, sync_state.current_period - sync_state.last_period, ctx->chain_id, &client_update)) {
if (!c4_handle_client_updates(ctx, client_update, NULL))
return c4_state_get_pending_request(&ctx->state) ? C4_PENDING : c4_state_add_error(&ctx->state, "Failed to handle client updates");
}
else
return C4_PENDING;
}
sync_state = get_validators_from_cache(ctx, period);
if (sync_state.validators.data == NULL) return c4_state_add_error(&ctx->state, "Failed to get validators");
}
*target_state = sync_state;
return C4_SUCCESS;
}
|
O0
|
c
|
c4_get_validators:
pushq %rbp
movq %rsp, %rbp
subq $0x80, %rsp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movq %rdx, -0x20(%rbp)
movq -0x10(%rbp), %rsi
movl -0x14(%rbp), %edx
leaq -0x40(%rbp), %rdi
callq 0x27030
cmpq $0x0, -0x30(%rbp)
jne 0x26ff0
cmpl $0x0, -0x40(%rbp)
jne 0x26f00
jmp 0x26ec9
movq -0x10(%rbp), %rdi
callq 0x27240
movl %eax, -0x44(%rbp)
cmpl $0x0, -0x44(%rbp)
je 0x26ee6
movl -0x44(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0x2701a
jmp 0x26ee8
movq -0x10(%rbp), %rdi
movl -0x14(%rbp), %esi
movq -0x20(%rbp), %rdx
callq 0x26e90
movl %eax, -0x4(%rbp)
jmp 0x2701a
leaq -0x58(%rbp), %rdi
xorl %esi, %esi
movl $0x10, %edx
callq 0x231c0
movq -0x10(%rbp), %rdi
addq $0x70, %rdi
movl -0x40(%rbp), %esi
movl -0x3c(%rbp), %edx
subl -0x40(%rbp), %edx
movq -0x10(%rbp), %rax
movl 0x80(%rax), %ecx
leaq -0x58(%rbp), %r8
callq 0x276b0
testb $0x1, %al
jne 0x26f3a
jmp 0x26f93
movq -0x10(%rbp), %rdi
movl -0x58(%rbp), %esi
movq -0x50(%rbp), %rdx
xorl %eax, %eax
movl %eax, %ecx
callq 0x2fbd0
testb $0x1, %al
jne 0x26f91
movq -0x10(%rbp), %rdi
addq $0x70, %rdi
callq 0xa7960
cmpq $0x0, %rax
je 0x26f6f
movl $0x2, %eax
movl %eax, -0x7c(%rbp)
jmp 0x26f86
movq -0x10(%rbp), %rdi
addq $0x70, %rdi
leaq 0xb56e1(%rip), %rsi # 0xdc65f
callq 0xa79c0
movl %eax, -0x7c(%rbp)
movl -0x7c(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0x2701a
jmp 0x26f9c
movl $0x2, -0x4(%rbp)
jmp 0x2701a
jmp 0x26f9e
movq -0x10(%rbp), %rsi
movl -0x14(%rbp), %edx
leaq -0x78(%rbp), %rdi
callq 0x27030
movq -0x78(%rbp), %rax
movq %rax, -0x40(%rbp)
movq -0x70(%rbp), %rax
movq %rax, -0x38(%rbp)
movq -0x68(%rbp), %rax
movq %rax, -0x30(%rbp)
movq -0x60(%rbp), %rax
movq %rax, -0x28(%rbp)
cmpq $0x0, -0x30(%rbp)
jne 0x26fee
movq -0x10(%rbp), %rdi
addq $0x70, %rdi
leaq 0xb569b(%rip), %rsi # 0xdc67f
callq 0xa79c0
movl %eax, -0x4(%rbp)
jmp 0x2701a
jmp 0x26ff0
movq -0x20(%rbp), %rax
movq -0x40(%rbp), %rcx
movq %rcx, (%rax)
movq -0x38(%rbp), %rcx
movq %rcx, 0x8(%rax)
movq -0x30(%rbp), %rcx
movq %rcx, 0x10(%rax)
movq -0x28(%rbp), %rcx
movq %rcx, 0x18(%rax)
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x80, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
|
c4_get_validators:
push rbp
mov rbp, rsp
sub rsp, 80h
mov [rbp+var_10], rdi
mov [rbp+var_14], esi
mov [rbp+var_20], rdx
mov rsi, [rbp+var_10]
mov edx, [rbp+var_14]
lea rdi, [rbp+var_40]
call get_validators_from_cache
cmp [rbp+var_30], 0
jnz loc_26FF0
cmp dword ptr [rbp+var_40], 0
jnz short loc_26F00
jmp short $+2
loc_26EC9:
mov rdi, [rbp+var_10]
call init_sync_state
mov [rbp+var_44], eax
cmp [rbp+var_44], 0
jz short loc_26EE6
mov eax, [rbp+var_44]
mov [rbp+var_4], eax
jmp loc_2701A
loc_26EE6:
jmp short $+2
loc_26EE8:
mov rdi, [rbp+var_10]
mov esi, [rbp+var_14]
mov rdx, [rbp+var_20]
call c4_get_validators
mov [rbp+var_4], eax
jmp loc_2701A
loc_26F00:
lea rdi, [rbp+var_58]
xor esi, esi
mov edx, 10h
call _memset
mov rdi, [rbp+var_10]
add rdi, 70h ; 'p'
mov esi, dword ptr [rbp+var_40]
mov edx, dword ptr [rbp+var_40+4]
sub edx, dword ptr [rbp+var_40]
mov rax, [rbp+var_10]
mov ecx, [rax+80h]
lea r8, [rbp+var_58]
call req_client_update
test al, 1
jnz short loc_26F3A
jmp short loc_26F93
loc_26F3A:
mov rdi, [rbp+var_10]
mov esi, [rbp+var_58]
mov rdx, [rbp+var_50]
xor eax, eax
mov ecx, eax
call c4_handle_client_updates
test al, 1
jnz short loc_26F91
mov rdi, [rbp+var_10]
add rdi, 70h ; 'p'
call c4_state_get_pending_request
cmp rax, 0
jz short loc_26F6F
mov eax, 2
mov [rbp+var_7C], eax
jmp short loc_26F86
loc_26F6F:
mov rdi, [rbp+var_10]
add rdi, 70h ; 'p'
lea rsi, aFailedToHandle; "Failed to handle client updates"
call c4_state_add_error
mov [rbp+var_7C], eax
loc_26F86:
mov eax, [rbp+var_7C]
mov [rbp+var_4], eax
jmp loc_2701A
loc_26F91:
jmp short loc_26F9C
loc_26F93:
mov [rbp+var_4], 2
jmp short loc_2701A
loc_26F9C:
jmp short $+2
loc_26F9E:
mov rsi, [rbp+var_10]
mov edx, [rbp+var_14]
lea rdi, [rbp+var_78]
call get_validators_from_cache
mov rax, [rbp+var_78]
mov [rbp+var_40], rax
mov rax, [rbp+var_70]
mov [rbp+var_38], rax
mov rax, [rbp+var_68]
mov [rbp+var_30], rax
mov rax, [rbp+var_60]
mov [rbp+var_28], rax
cmp [rbp+var_30], 0
jnz short loc_26FEE
mov rdi, [rbp+var_10]
add rdi, 70h ; 'p'
lea rsi, aFailedToGetVal; "Failed to get validators"
call c4_state_add_error
mov [rbp+var_4], eax
jmp short loc_2701A
loc_26FEE:
jmp short $+2
loc_26FF0:
mov rax, [rbp+var_20]
mov rcx, [rbp+var_40]
mov [rax], rcx
mov rcx, [rbp+var_38]
mov [rax+8], rcx
mov rcx, [rbp+var_30]
mov [rax+10h], rcx
mov rcx, [rbp+var_28]
mov [rax+18h], rcx
mov [rbp+var_4], 0
loc_2701A:
mov eax, [rbp+var_4]
add rsp, 80h
pop rbp
retn
|
long long c4_get_validators(long long a1, unsigned int a2, _QWORD *a3)
{
_QWORD *v3; // rax
_QWORD v6[2]; // [rsp+8h] [rbp-78h] BYREF
long long v7; // [rsp+18h] [rbp-68h]
long long v8; // [rsp+20h] [rbp-60h]
unsigned int v9; // [rsp+28h] [rbp-58h] BYREF
long long v10; // [rsp+30h] [rbp-50h]
unsigned int inited; // [rsp+3Ch] [rbp-44h]
long long v12; // [rsp+40h] [rbp-40h] BYREF
long long v13; // [rsp+48h] [rbp-38h]
long long v14; // [rsp+50h] [rbp-30h]
long long v15; // [rsp+58h] [rbp-28h]
_QWORD *v16; // [rsp+60h] [rbp-20h]
unsigned int v17; // [rsp+6Ch] [rbp-14h]
long long v18; // [rsp+70h] [rbp-10h]
v18 = a1;
v17 = a2;
v16 = a3;
get_validators_from_cache(&v12, a1, a2);
if ( v14 )
goto LABEL_16;
if ( !(_DWORD)v12 )
{
inited = init_sync_state(v18);
if ( inited )
return inited;
else
return (unsigned int)c4_get_validators(v18, v17, v16);
}
memset(&v9, 0LL, 16LL);
if ( (req_client_update(
v18 + 112,
(unsigned int)v12,
(unsigned int)(HIDWORD(v12) - v12),
*(unsigned int *)(v18 + 128),
&v9) & 1) == 0 )
return 2;
if ( (c4_handle_client_updates(v18, v9, v10, 0LL) & 1) != 0 )
{
get_validators_from_cache(v6, v18, v17);
v12 = v6[0];
v13 = v6[1];
v14 = v7;
v15 = v8;
if ( !v7 )
return (unsigned int)c4_state_add_error(v18 + 112, "Failed to get validators");
LABEL_16:
v3 = v16;
*v16 = v12;
v3[1] = v13;
v3[2] = v14;
v3[3] = v15;
return 0;
}
if ( c4_state_get_pending_request(v18 + 112) )
return 2;
else
return (unsigned int)c4_state_add_error(v18 + 112, "Failed to handle client updates");
}
|
c4_get_validators:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x80
MOV qword ptr [RBP + -0x10],RDI
MOV dword ptr [RBP + -0x14],ESI
MOV qword ptr [RBP + -0x20],RDX
MOV RSI,qword ptr [RBP + -0x10]
MOV EDX,dword ptr [RBP + -0x14]
LEA RDI,[RBP + -0x40]
CALL 0x00127030
CMP qword ptr [RBP + -0x30],0x0
JNZ 0x00126ff0
CMP dword ptr [RBP + -0x40],0x0
JNZ 0x00126f00
JMP 0x00126ec9
LAB_00126ec9:
MOV RDI,qword ptr [RBP + -0x10]
CALL 0x00127240
MOV dword ptr [RBP + -0x44],EAX
CMP dword ptr [RBP + -0x44],0x0
JZ 0x00126ee6
MOV EAX,dword ptr [RBP + -0x44]
MOV dword ptr [RBP + -0x4],EAX
JMP 0x0012701a
LAB_00126ee6:
JMP 0x00126ee8
LAB_00126ee8:
MOV RDI,qword ptr [RBP + -0x10]
MOV ESI,dword ptr [RBP + -0x14]
MOV RDX,qword ptr [RBP + -0x20]
CALL 0x00126e90
MOV dword ptr [RBP + -0x4],EAX
JMP 0x0012701a
LAB_00126f00:
LEA RDI,[RBP + -0x58]
XOR ESI,ESI
MOV EDX,0x10
CALL 0x001231c0
MOV RDI,qword ptr [RBP + -0x10]
ADD RDI,0x70
MOV ESI,dword ptr [RBP + -0x40]
MOV EDX,dword ptr [RBP + -0x3c]
SUB EDX,dword ptr [RBP + -0x40]
MOV RAX,qword ptr [RBP + -0x10]
MOV ECX,dword ptr [RAX + 0x80]
LEA R8,[RBP + -0x58]
CALL 0x001276b0
TEST AL,0x1
JNZ 0x00126f3a
JMP 0x00126f93
LAB_00126f3a:
MOV RDI,qword ptr [RBP + -0x10]
MOV ESI,dword ptr [RBP + -0x58]
MOV RDX,qword ptr [RBP + -0x50]
XOR EAX,EAX
MOV ECX,EAX
CALL 0x0012fbd0
TEST AL,0x1
JNZ 0x00126f91
MOV RDI,qword ptr [RBP + -0x10]
ADD RDI,0x70
CALL 0x001a7960
CMP RAX,0x0
JZ 0x00126f6f
MOV EAX,0x2
MOV dword ptr [RBP + -0x7c],EAX
JMP 0x00126f86
LAB_00126f6f:
MOV RDI,qword ptr [RBP + -0x10]
ADD RDI,0x70
LEA RSI,[0x1dc65f]
CALL 0x001a79c0
MOV dword ptr [RBP + -0x7c],EAX
LAB_00126f86:
MOV EAX,dword ptr [RBP + -0x7c]
MOV dword ptr [RBP + -0x4],EAX
JMP 0x0012701a
LAB_00126f91:
JMP 0x00126f9c
LAB_00126f93:
MOV dword ptr [RBP + -0x4],0x2
JMP 0x0012701a
LAB_00126f9c:
JMP 0x00126f9e
LAB_00126f9e:
MOV RSI,qword ptr [RBP + -0x10]
MOV EDX,dword ptr [RBP + -0x14]
LEA RDI,[RBP + -0x78]
CALL 0x00127030
MOV RAX,qword ptr [RBP + -0x78]
MOV qword ptr [RBP + -0x40],RAX
MOV RAX,qword ptr [RBP + -0x70]
MOV qword ptr [RBP + -0x38],RAX
MOV RAX,qword ptr [RBP + -0x68]
MOV qword ptr [RBP + -0x30],RAX
MOV RAX,qword ptr [RBP + -0x60]
MOV qword ptr [RBP + -0x28],RAX
CMP qword ptr [RBP + -0x30],0x0
JNZ 0x00126fee
MOV RDI,qword ptr [RBP + -0x10]
ADD RDI,0x70
LEA RSI,[0x1dc67f]
CALL 0x001a79c0
MOV dword ptr [RBP + -0x4],EAX
JMP 0x0012701a
LAB_00126fee:
JMP 0x00126ff0
LAB_00126ff0:
MOV RAX,qword ptr [RBP + -0x20]
MOV RCX,qword ptr [RBP + -0x40]
MOV qword ptr [RAX],RCX
MOV RCX,qword ptr [RBP + -0x38]
MOV qword ptr [RAX + 0x8],RCX
MOV RCX,qword ptr [RBP + -0x30]
MOV qword ptr [RAX + 0x10],RCX
MOV RCX,qword ptr [RBP + -0x28]
MOV qword ptr [RAX + 0x18],RCX
MOV dword ptr [RBP + -0x4],0x0
LAB_0012701a:
MOV EAX,dword ptr [RBP + -0x4]
ADD RSP,0x80
POP RBP
RET
|
int c4_get_validators(long param_1,int4 param_2,ulong *param_3)
{
int iVar1;
ulong uVar2;
long lVar3;
int local_84;
ulong local_80;
ulong local_78;
ulong local_70;
ulong local_68;
int4 local_60 [2];
int8 local_58;
int local_4c;
int8 local_48;
ulong local_40;
ulong local_38;
ulong local_30;
ulong *local_28;
int4 local_1c;
long local_18;
local_28 = param_3;
local_1c = param_2;
local_18 = param_1;
get_validators_from_cache(&local_48,param_1,param_2);
if (local_38 == 0) {
if ((int)local_48 == 0) {
local_4c = init_sync_state(local_18);
if (local_4c != 0) {
return local_4c;
}
iVar1 = c4_get_validators(local_18,local_1c,local_28);
return iVar1;
}
memset(local_60,0,0x10);
uVar2 = req_client_update(local_18 + 0x70,local_48 & 0xffffffff,local_48._4_4_ - (int)local_48,
*(int4 *)(local_18 + 0x80),local_60);
if ((uVar2 & 1) == 0) {
return 2;
}
uVar2 = c4_handle_client_updates(local_18,local_60[0],local_58,0);
if ((uVar2 & 1) == 0) {
lVar3 = c4_state_get_pending_request(local_18 + 0x70);
if (lVar3 == 0) {
local_84 = c4_state_add_error(local_18 + 0x70,"Failed to handle client updates");
}
else {
local_84 = 2;
}
return local_84;
}
get_validators_from_cache(&local_80,local_18,local_1c);
local_48 = local_80;
local_40 = local_78;
local_38 = local_70;
local_30 = local_68;
if (local_70 == 0) {
iVar1 = c4_state_add_error(local_18 + 0x70,"Failed to get validators");
return iVar1;
}
}
*local_28 = local_48;
local_28[1] = local_40;
local_28[2] = local_38;
local_28[3] = local_30;
return 0;
}
|
|
61,894 |
c4_get_validators
|
corpus-core[P]colibri-stateless/src/chains/eth/verifier/sync_committee_state.c
|
INTERNAL const c4_status_t c4_get_validators(verify_ctx_t* ctx, uint32_t period, c4_sync_state_t* target_state) {
c4_sync_state_t sync_state = get_validators_from_cache(ctx, period);
if (sync_state.validators.data == NULL) {
if (sync_state.last_period == 0) { // there is nothing we can start syncing from
TRY_ASYNC(init_sync_state(ctx));
return c4_get_validators(ctx, period, target_state);
}
else {
bytes_t client_update = {0};
if (req_client_update(&ctx->state, sync_state.last_period, sync_state.current_period - sync_state.last_period, ctx->chain_id, &client_update)) {
if (!c4_handle_client_updates(ctx, client_update, NULL))
return c4_state_get_pending_request(&ctx->state) ? C4_PENDING : c4_state_add_error(&ctx->state, "Failed to handle client updates");
}
else
return C4_PENDING;
}
sync_state = get_validators_from_cache(ctx, period);
if (sync_state.validators.data == NULL) return c4_state_add_error(&ctx->state, "Failed to get validators");
}
*target_state = sync_state;
return C4_SUCCESS;
}
|
O2
|
c
|
c4_get_validators:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x188, %rsp # imm = 0x188
movq %rdx, %rbx
movl %esi, %ebp
movq %rdi, %r14
leaq 0xb0(%rsp), %r15
movq %r15, %rdi
movq %r14, %rsi
movl %ebp, %edx
callq 0x2529e
cmpq $0x0, 0x10(%r15)
je 0x24ed9
movups 0xb0(%rsp), %xmm0
movups 0xc0(%rsp), %xmm1
movups %xmm1, 0x10(%rbx)
movups %xmm0, (%rbx)
xorl %r12d, %r12d
movl %r12d, %eax
addq $0x188, %rsp # imm = 0x188
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl 0xb0(%rsp), %esi
testl %esi, %esi
je 0x24f7d
xorps %xmm0, %xmm0
leaq 0xf0(%rsp), %r8
movaps %xmm0, (%r8)
leaq 0x70(%r14), %r15
movl 0xb4(%rsp), %edx
subl %esi, %edx
movl 0x80(%r14), %ecx
movq %r15, %rdi
callq 0x25407
pushq $0x2
popq %r12
testb %al, %al
je 0x24ec4
movl 0xf0(%rsp), %esi
movq 0xf8(%rsp), %rdx
movq %r14, %rdi
xorl %ecx, %ecx
callq 0x2a11f
testb %al, %al
je 0x250f8
leaq 0xb0(%rsp), %r12
movq %r12, %rdi
movq %r14, %rsi
movl %ebp, %edx
callq 0x2529e
cmpq $0x0, 0x10(%r12)
jne 0x24eaa
leaq 0x4f693(%rip), %rsi # 0x745f7
movq %r15, %rdi
addq $0x188, %rsp # imm = 0x188
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x50675
movl 0x80(%r14), %edi
callq 0x24aa0
movq %rax, %r12
leaq 0x70(%r14), %r15
xorps %xmm0, %xmm0
movaps %xmm0, 0x20(%rsp)
andq $0x0, 0x30(%rsp)
movaps %xmm0, 0x40(%rsp)
movaps %xmm0, 0x50(%rsp)
movaps %xmm0, 0xa0(%rsp)
movaps %xmm0, 0x90(%rsp)
testl %edx, %edx
je 0x2511d
movl %edx, %r13d
movq %r12, %rdi
movl %edx, %esi
callq 0x24e57
testl %eax, %eax
je 0x251e9
andl $0x0, 0x78(%rsp)
leaq 0xf0(%rsp), %rsi
movq %rsi, 0x80(%rsp)
movl $0xffffff9c, 0x88(%rsp) # imm = 0xFFFFFF9C
movl %r13d, %ecx
movq %r12, %rdx
addq $-0x28, %rdx
incq %rcx
xorl %eax, %eax
decq %rcx
je 0x25059
leaq 0x30(%rdx), %r13
cmpq $0x0, 0x28(%rdx)
movq %r13, %rdx
jne 0x25004
leaq 0x4f5f7(%rip), %rsi # 0x74615
leaq 0x78(%rsp), %rdi
pushq $0x20
popq %rdx
movq %r13, %rcx
xorl %eax, %eax
callq 0x4b737
leaq 0xf0(%rsp), %rsi
movups (%r13), %xmm0
movups 0x10(%r13), %xmm1
movaps %xmm0, 0x90(%rsp)
movaps %xmm1, 0xa0(%rsp)
leaq 0x78(%rsp), %rax
movl (%rax), %eax
movq %rsi, 0x60(%rsp)
movq %rax, 0x68(%rsp)
movl $0x1, 0x70(%rsp)
movl 0x80(%r14), %esi
movq 0x70(%rsp), %rax
movq %rax, 0x10(%rsp)
movups 0x60(%rsp), %xmm0
movups %xmm0, (%rsp)
leaq 0x20(%rsp), %rdx
movq %r15, %rdi
callq 0x254bf
testb %al, %al
je 0x251e9
movq 0x30(%rsp), %rax
movq %rax, 0x10(%rsp)
movaps 0x20(%rsp), %xmm0
movups %xmm0, (%rsp)
leaq 0x4f55c(%rip), %rsi # 0x74610
leaq 0x158(%rsp), %r13
movq %r13, %rdi
callq 0x4f541
movq 0x10(%r13), %rax
movq %rax, 0x10(%rsp)
movups (%r13), %xmm0
movups %xmm0, (%rsp)
callq 0x4f7df
shrq $0xd, %rax
movl 0x80(%r14), %ecx
pushq $0x1
popq %rdx
leaq 0x40(%rsp), %r8
movq %r15, %rdi
movl %eax, %esi
jmp 0x251df
movq %r15, %rdi
callq 0x50655
testq %rax, %rax
jne 0x24ec4
leaq 0x4f4c7(%rip), %rsi # 0x745d7
movq %r15, %rdi
callq 0x50675
jmp 0x25296
movaps %xmm0, 0xd0(%rsp)
andq $0x0, 0xe0(%rsp)
movl 0x80(%r14), %esi
movq 0xe0(%rsp), %rax
movq %rax, 0x10(%rsp)
movaps 0xd0(%rsp), %xmm0
movups %xmm0, (%rsp)
leaq 0x20(%rsp), %rdx
movq %r15, %rdi
callq 0x254bf
testb %al, %al
je 0x251e9
movq 0x30(%rsp), %rax
movq %rax, 0x10(%rsp)
movaps 0x20(%rsp), %xmm0
movups %xmm0, (%rsp)
leaq 0x4f493(%rip), %rsi # 0x74610
leaq 0x170(%rsp), %r13
movq %r13, %rdi
callq 0x4f541
movq 0x10(%r13), %rax
movq %rax, 0x10(%rsp)
movups (%r13), %xmm0
movups %xmm0, (%rsp)
callq 0x4f7df
movq %rax, %r13
shrq $0xd, %r13
leal -0x1(%r13), %esi
movl 0x80(%r14), %ecx
pushq $0x1
popq %rdx
leaq 0x40(%rsp), %r8
movq %r15, %rdi
callq 0x25407
addl $-0x15, %r13d
movl 0x80(%r14), %ecx
leaq 0x50(%rsp), %r8
movq %r15, %rdi
movl %r13d, %esi
pushq $0x1
popq %rdx
callq 0x25407
movl %eax, %r13d
jmp 0x251ec
xorl %r13d, %r13d
movq %r12, %rdi
callq 0x4aff8
movl 0x40(%rsp), %esi
testl %esi, %esi
setne %al
andb %r13b, %al
cmpb $0x1, %al
jne 0x2522d
movq 0x48(%rsp), %rdx
leaq 0x90(%rsp), %rcx
movq %r14, %rdi
callq 0x2a11f
testb %al, %al
jne 0x2522d
leaq 0x4f3b3(%rip), %rdi # 0x745d7
callq 0x22030
movq %rax, 0x78(%r14)
movl 0x50(%rsp), %esi
testl %esi, %esi
setne %al
andb %al, %r13b
cmpb $0x1, %r13b
jne 0x25268
movq 0x58(%rsp), %rdx
leaq 0x90(%rsp), %rcx
movq %r14, %rdi
callq 0x2a11f
testb %al, %al
jne 0x25268
leaq 0x4f378(%rip), %rdi # 0x745d7
callq 0x22030
movq %rax, 0x78(%r14)
cmpq $0x0, 0x78(%r14)
je 0x25273
pushq $-0x1
jmp 0x25282
movq %r15, %rdi
callq 0x50655
testq %rax, %rax
je 0x25289
pushq $0x2
popq %r12
jmp 0x24ec4
movq %r14, %rdi
movl %ebp, %esi
movq %rbx, %rdx
callq 0x24e75
movl %eax, %r12d
jmp 0x24ec4
|
c4_get_validators:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 188h
mov rbx, rdx
mov ebp, esi
mov r14, rdi
lea r15, [rsp+1B8h+var_108]
mov rdi, r15
mov rsi, r14
mov edx, ebp
call get_validators_from_cache
cmp qword ptr [r15+10h], 0
jz short loc_24ED9
loc_24EAA:
movups xmm0, [rsp+1B8h+var_108]
movups xmm1, [rsp+1B8h+var_F8]
movups xmmword ptr [rbx+10h], xmm1
movups xmmword ptr [rbx], xmm0
xor r12d, r12d
loc_24EC4:
mov eax, r12d
add rsp, 188h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_24ED9:
mov esi, dword ptr [rsp+1B8h+var_108]
test esi, esi
jz loc_24F7D
xorps xmm0, xmm0
lea r8, [rsp+1B8h+var_C8]
movaps xmmword ptr [r8], xmm0
lea r15, [r14+70h]
mov edx, dword ptr [rsp+1B8h+var_108+4]
sub edx, esi
mov ecx, [r14+80h]
mov rdi, r15
call req_client_update
push 2
pop r12
test al, al
jz short loc_24EC4
mov esi, [rsp+1B8h+var_C8]
mov rdx, [rsp+1B8h+var_C0]
mov rdi, r14
xor ecx, ecx
call c4_handle_client_updates
test al, al
jz loc_250F8
lea r12, [rsp+1B8h+var_108]
mov rdi, r12
mov rsi, r14
mov edx, ebp
call get_validators_from_cache
cmp qword ptr [r12+10h], 0
jnz loc_24EAA
lea rsi, aFailedToGetVal; "Failed to get validators"
mov rdi, r15
add rsp, 188h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
jmp c4_state_add_error
loc_24F7D:
mov edi, [r14+80h]
call c4_get_chain_state
mov r12, rax
lea r15, [r14+70h]
xorps xmm0, xmm0
movaps [rsp+1B8h+var_198], xmm0
and [rsp+1B8h+var_188], 0
movaps [rsp+1B8h+var_178], xmm0
movaps [rsp+1B8h+var_168], xmm0
movaps [rsp+1B8h+var_118], xmm0
movaps [rsp+1B8h+var_128], xmm0
test edx, edx
jz loc_2511D
mov r13d, edx
mov rdi, r12
mov esi, edx
call trusted_blocks_len
test eax, eax
jz loc_251E9
and [rsp+1B8h+var_140], 0
lea rsi, [rsp+1B8h+var_C8]
mov [rsp+1B8h+var_138], rsi
mov [rsp+1B8h+var_130], 0FFFFFF9Ch
mov ecx, r13d
mov rdx, r12
add rdx, 0FFFFFFFFFFFFFFD8h
inc rcx
xor eax, eax
loc_25004:
dec rcx
jz short loc_25059
lea r13, [rdx+30h]
cmp qword ptr [rdx+28h], 0
mov rdx, r13
jnz short loc_25004
lea rsi, a0xX; "\"0x%x\""
lea rdi, [rsp+1B8h+var_140]
push 20h ; ' '
pop rdx
mov rcx, r13
xor eax, eax
call bprintf
lea rsi, [rsp+1B8h+var_C8]
movups xmm0, xmmword ptr [r13+0]
movups xmm1, xmmword ptr [r13+10h]
movaps [rsp+1B8h+var_128], xmm0
movaps [rsp+1B8h+var_118], xmm1
lea rax, [rsp+1B8h+var_140]
mov eax, [rax]
loc_25059:
mov qword ptr [rsp+1B8h+var_158], rsi
mov qword ptr [rsp+1B8h+var_158+8], rax
mov dword ptr [rsp+1B8h+var_148], 1
mov esi, [r14+80h]
mov rax, [rsp+1B8h+var_148]
mov [rsp+1B8h+var_1A8], rax
movups xmm0, [rsp+1B8h+var_158]
movups [rsp+1B8h+var_1B8], xmm0
lea rdx, [rsp+1B8h+var_198]
mov rdi, r15
call req_header
test al, al
jz loc_251E9
mov rax, [rsp+1B8h+var_188]
mov [rsp+1B8h+var_1A8], rax
movaps xmm0, [rsp+1B8h+var_198]
movups [rsp+1B8h+var_1B8], xmm0
lea rsi, aSlot; "slot"
lea r13, [rsp+1B8h+var_60]
mov rdi, r13
call json_get
mov rax, [r13+10h]
mov [rsp+1B8h+var_1A8], rax
movups xmm0, xmmword ptr [r13+0]
movups [rsp+1B8h+var_1B8], xmm0
call json_as_uint64
shr rax, 0Dh
mov ecx, [r14+80h]
push 1
pop rdx
lea r8, [rsp+1B8h+var_178]
mov rdi, r15
mov esi, eax
jmp loc_251DF
loc_250F8:
mov rdi, r15
call c4_state_get_pending_request
test rax, rax
jnz loc_24EC4
lea rsi, aFailedToHandle; "Failed to handle client updates"
mov rdi, r15
call c4_state_add_error
jmp loc_25296
loc_2511D:
movaps [rsp+1B8h+var_E8], xmm0
and [rsp+1B8h+var_D8], 0
mov esi, [r14+80h]
mov rax, [rsp+1B8h+var_D8]
mov [rsp+1B8h+var_1A8], rax
movaps xmm0, [rsp+1B8h+var_E8]
movups [rsp+1B8h+var_1B8], xmm0
lea rdx, [rsp+1B8h+var_198]
mov rdi, r15
call req_header
test al, al
jz loc_251E9
mov rax, [rsp+1B8h+var_188]
mov [rsp+1B8h+var_1A8], rax
movaps xmm0, [rsp+1B8h+var_198]
movups [rsp+1B8h+var_1B8], xmm0
lea rsi, aSlot; "slot"
lea r13, [rsp+1B8h+var_48]
mov rdi, r13
call json_get
mov rax, [r13+10h]
mov [rsp+1B8h+var_1A8], rax
movups xmm0, xmmword ptr [r13+0]
movups [rsp+1B8h+var_1B8], xmm0
call json_as_uint64
mov r13, rax
shr r13, 0Dh
lea esi, [r13-1]
mov ecx, [r14+80h]
push 1
pop rdx
lea r8, [rsp+1B8h+var_178]
mov rdi, r15
call req_client_update
add r13d, 0FFFFFFEBh
mov ecx, [r14+80h]
lea r8, [rsp+1B8h+var_168]
mov rdi, r15
mov esi, r13d
push 1
pop rdx
loc_251DF:
call req_client_update
mov r13d, eax
jmp short loc_251EC
loc_251E9:
xor r13d, r13d
loc_251EC:
mov rdi, r12
call safe_free
mov esi, dword ptr [rsp+1B8h+var_178]
test esi, esi
setnz al
and al, r13b
cmp al, 1
jnz short loc_2522D
mov rdx, qword ptr [rsp+1B8h+var_178+8]
lea rcx, [rsp+1B8h+var_128]
mov rdi, r14
call c4_handle_client_updates
test al, al
jnz short loc_2522D
lea rdi, aFailedToHandle; "Failed to handle client updates"
call _strdup
mov [r14+78h], rax
loc_2522D:
mov esi, dword ptr [rsp+1B8h+var_168]
test esi, esi
setnz al
and r13b, al
cmp r13b, 1
jnz short loc_25268
mov rdx, qword ptr [rsp+1B8h+var_168+8]
lea rcx, [rsp+1B8h+var_128]
mov rdi, r14
call c4_handle_client_updates
test al, al
jnz short loc_25268
lea rdi, aFailedToHandle; "Failed to handle client updates"
call _strdup
mov [r14+78h], rax
loc_25268:
cmp qword ptr [r14+78h], 0
jz short loc_25273
push 0FFFFFFFFFFFFFFFFh
jmp short loc_25282
loc_25273:
mov rdi, r15
call c4_state_get_pending_request
test rax, rax
jz short loc_25289
push 2
loc_25282:
pop r12
jmp loc_24EC4
loc_25289:
mov rdi, r14
mov esi, ebp
mov rdx, rbx
call c4_get_validators
loc_25296:
mov r12d, eax
jmp loc_24EC4
|
long long c4_get_validators(long long a1, unsigned int a2, _OWORD *a3)
{
__int128 v6; // xmm0
unsigned int v7; // r12d
long long chain_state; // rax
unsigned int v10; // edx
int v11; // ecx
int v12; // r8d
int v13; // r9d
long long v14; // r12
unsigned int v15; // r13d
int v16; // r8d
int v17; // r9d
long long v18; // rdx
long long v19; // rcx
long long v20; // rax
__int128 *v21; // r13
bool v22; // zf
__int128 v23; // xmm1
int v24; // edx
int v25; // ecx
int v26; // r8d
int v27; // r9d
int v28; // edx
int v29; // ecx
int v30; // r8d
int v31; // r9d
unsigned long long v32; // rax
long long v33; // rcx
__int128 *v34; // r8
long long v35; // rdi
long long v36; // rsi
int v38; // edx
int v39; // ecx
int v40; // r8d
int v41; // r9d
int v42; // edx
int v43; // ecx
int v44; // r8d
int v45; // r9d
unsigned long long v46; // r13
unsigned __int8 v47; // r13
__int128 v49; // [rsp+20h] [rbp-198h] BYREF
long long v50; // [rsp+30h] [rbp-188h]
__int128 v51; // [rsp+40h] [rbp-178h] BYREF
__int128 v52; // [rsp+50h] [rbp-168h] BYREF
_OWORD *v53; // [rsp+60h] [rbp-158h]
long long v54; // [rsp+68h] [rbp-150h]
long long v55; // [rsp+70h] [rbp-148h]
unsigned int v56; // [rsp+78h] [rbp-140h] BYREF
_OWORD *v57; // [rsp+80h] [rbp-138h]
int v58; // [rsp+88h] [rbp-130h]
__int128 v59; // [rsp+90h] [rbp-128h] BYREF
__int128 v60; // [rsp+A0h] [rbp-118h]
__int128 v61; // [rsp+B0h] [rbp-108h] BYREF
__int128 v62; // [rsp+C0h] [rbp-F8h]
__int128 v63; // [rsp+D0h] [rbp-E8h]
long long v64; // [rsp+E0h] [rbp-D8h]
_OWORD v65[6]; // [rsp+F0h] [rbp-C8h] BYREF
_QWORD v66[3]; // [rsp+158h] [rbp-60h] BYREF
_QWORD v67[9]; // [rsp+170h] [rbp-48h] BYREF
get_validators_from_cache(&v61, a1, a2);
if ( (_QWORD)v62 )
goto LABEL_2;
if ( !(_DWORD)v61 )
{
chain_state = c4_get_chain_state(*(_DWORD *)(a1 + 128));
v14 = chain_state;
v49 = 0LL;
v50 = 0LL;
v51 = 0LL;
v52 = 0LL;
v60 = 0LL;
v59 = 0LL;
if ( v10 )
{
v15 = v10;
if ( (unsigned int)trusted_blocks_len(chain_state, v10) )
{
v56 = 0;
v57 = v65;
v58 = -100;
v18 = v14 - 40;
v19 = v15 + 1LL;
v20 = 0LL;
while ( --v19 )
{
v21 = (__int128 *)(v18 + 48);
v22 = *(_QWORD *)(v18 + 40) == 0LL;
v18 += 48LL;
if ( v22 )
{
bprintf((unsigned int)&v56, (unsigned int)"\"0x%x\"", 32, (_DWORD)v21, v16, v17);
v23 = v21[1];
v59 = *v21;
v60 = v23;
v20 = v56;
break;
}
}
v53 = v65;
v54 = v20;
LODWORD(v55) = 1;
if ( (unsigned __int8)req_header(
(int)a1 + 112,
*(_DWORD *)(a1 + 128),
(unsigned int)&v49,
v19,
v16,
v17,
(char)v65,
v20,
1) )
{
json_get((unsigned int)v66, (unsigned int)"slot", v24, v25, v26, v27, v49, v50);
v32 = json_as_uint64((unsigned int)v66, (unsigned int)"slot", v28, v29, v30, v31, v66[0], v66[1], v66[2]);
v33 = *(unsigned int *)(a1 + 128);
v34 = &v51;
v35 = a1 + 112;
v36 = (unsigned int)(v32 >> 13);
LABEL_21:
v47 = req_client_update(v35, v36, 1LL, v33, v34);
LABEL_23:
safe_free(v14);
if ( (v47 & ((_DWORD)v51 != 0)) == 1
&& !(unsigned __int8)c4_handle_client_updates(a1, (unsigned int)v51, *((_QWORD *)&v51 + 1), &v59) )
{
*(_QWORD *)(a1 + 120) = strdup("Failed to handle client updates");
}
if ( (((_DWORD)v52 != 0) & v47) == 1
&& !(unsigned __int8)c4_handle_client_updates(a1, (unsigned int)v52, *((_QWORD *)&v52 + 1), &v59) )
{
*(_QWORD *)(a1 + 120) = strdup("Failed to handle client updates");
}
if ( *(_QWORD *)(a1 + 120) )
{
return (unsigned int)-1;
}
else
{
if ( !c4_state_get_pending_request(a1 + 112) )
return (unsigned int)c4_get_validators(a1, a2, a3);
return 2;
}
}
}
}
else
{
v63 = 0LL;
v64 = 0LL;
if ( (unsigned __int8)req_header((int)a1 + 112, *(_DWORD *)(a1 + 128), (unsigned int)&v49, v11, v12, v13, 0, 0, 0) )
{
json_get((unsigned int)v67, (unsigned int)"slot", v38, v39, v40, v41, v49, v50);
v46 = (unsigned long long)json_as_uint64(
(unsigned int)v67,
(unsigned int)"slot",
v42,
v43,
v44,
v45,
v67[0],
v67[1],
v67[2]) >> 13;
req_client_update(a1 + 112, (unsigned int)(v46 - 1), 1LL, *(unsigned int *)(a1 + 128), &v51);
v33 = *(unsigned int *)(a1 + 128);
v34 = &v52;
v35 = a1 + 112;
v36 = (unsigned int)(v46 - 21);
goto LABEL_21;
}
}
v47 = 0;
goto LABEL_23;
}
v65[0] = 0LL;
v7 = 2;
if ( !(unsigned __int8)req_client_update(
a1 + 112,
(unsigned int)v61,
(unsigned int)(DWORD1(v61) - v61),
*(unsigned int *)(a1 + 128),
v65) )
return v7;
if ( !(unsigned __int8)c4_handle_client_updates(a1, LODWORD(v65[0]), *((_QWORD *)&v65[0] + 1), 0LL) )
{
if ( c4_state_get_pending_request(a1 + 112) )
return v7;
return (unsigned int)c4_state_add_error(a1 + 112, "Failed to handle client updates");
}
get_validators_from_cache(&v61, a1, a2);
if ( (_QWORD)v62 )
{
LABEL_2:
v6 = v61;
a3[1] = v62;
*a3 = v6;
return 0;
}
return c4_state_add_error(a1 + 112, "Failed to get validators");
}
|
c4_get_validators:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x188
MOV RBX,RDX
MOV EBP,ESI
MOV R14,RDI
LEA R15,[RSP + 0xb0]
MOV RDI,R15
MOV RSI,R14
MOV EDX,EBP
CALL 0x0012529e
CMP qword ptr [R15 + 0x10],0x0
JZ 0x00124ed9
LAB_00124eaa:
MOVUPS XMM0,xmmword ptr [RSP + 0xb0]
MOVUPS XMM1,xmmword ptr [RSP + 0xc0]
MOVUPS xmmword ptr [RBX + 0x10],XMM1
MOVUPS xmmword ptr [RBX],XMM0
XOR R12D,R12D
LAB_00124ec4:
MOV EAX,R12D
ADD RSP,0x188
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_00124ed9:
MOV ESI,dword ptr [RSP + 0xb0]
TEST ESI,ESI
JZ 0x00124f7d
XORPS XMM0,XMM0
LEA R8,[RSP + 0xf0]
MOVAPS xmmword ptr [R8],XMM0
LEA R15,[R14 + 0x70]
MOV EDX,dword ptr [RSP + 0xb4]
SUB EDX,ESI
MOV ECX,dword ptr [R14 + 0x80]
MOV RDI,R15
CALL 0x00125407
PUSH 0x2
POP R12
TEST AL,AL
JZ 0x00124ec4
MOV ESI,dword ptr [RSP + 0xf0]
MOV RDX,qword ptr [RSP + 0xf8]
MOV RDI,R14
XOR ECX,ECX
CALL 0x0012a11f
TEST AL,AL
JZ 0x001250f8
LEA R12,[RSP + 0xb0]
MOV RDI,R12
MOV RSI,R14
MOV EDX,EBP
CALL 0x0012529e
CMP qword ptr [R12 + 0x10],0x0
JNZ 0x00124eaa
LEA RSI,[0x1745f7]
MOV RDI,R15
ADD RSP,0x188
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
JMP 0x00150675
LAB_00124f7d:
MOV EDI,dword ptr [R14 + 0x80]
CALL 0x00124aa0
MOV R12,RAX
LEA R15,[R14 + 0x70]
XORPS XMM0,XMM0
MOVAPS xmmword ptr [RSP + 0x20],XMM0
AND qword ptr [RSP + 0x30],0x0
MOVAPS xmmword ptr [RSP + 0x40],XMM0
MOVAPS xmmword ptr [RSP + 0x50],XMM0
MOVAPS xmmword ptr [RSP + 0xa0],XMM0
MOVAPS xmmword ptr [RSP + 0x90],XMM0
TEST EDX,EDX
JZ 0x0012511d
MOV R13D,EDX
MOV RDI,R12
MOV ESI,EDX
CALL 0x00124e57
TEST EAX,EAX
JZ 0x001251e9
AND dword ptr [RSP + 0x78],0x0
LEA RSI,[RSP + 0xf0]
MOV qword ptr [RSP + 0x80],RSI
MOV dword ptr [RSP + 0x88],0xffffff9c
MOV ECX,R13D
MOV RDX,R12
ADD RDX,-0x28
INC RCX
XOR EAX,EAX
LAB_00125004:
DEC RCX
JZ 0x00125059
LEA R13,[RDX + 0x30]
CMP qword ptr [RDX + 0x28],0x0
MOV RDX,R13
JNZ 0x00125004
LEA RSI,[0x174615]
LEA RDI,[RSP + 0x78]
PUSH 0x20
POP RDX
MOV RCX,R13
XOR EAX,EAX
CALL 0x0014b737
LEA RSI,[RSP + 0xf0]
MOVUPS XMM0,xmmword ptr [R13]
MOVUPS XMM1,xmmword ptr [R13 + 0x10]
MOVAPS xmmword ptr [RSP + 0x90],XMM0
MOVAPS xmmword ptr [RSP + 0xa0],XMM1
LEA RAX,[RSP + 0x78]
MOV EAX,dword ptr [RAX]
LAB_00125059:
MOV qword ptr [RSP + 0x60],RSI
MOV qword ptr [RSP + 0x68],RAX
MOV dword ptr [RSP + 0x70],0x1
MOV ESI,dword ptr [R14 + 0x80]
MOV RAX,qword ptr [RSP + 0x70]
MOV qword ptr [RSP + 0x10],RAX
MOVUPS XMM0,xmmword ptr [RSP + 0x60]
MOVUPS xmmword ptr [RSP],XMM0
LEA RDX,[RSP + 0x20]
MOV RDI,R15
CALL 0x001254bf
TEST AL,AL
JZ 0x001251e9
MOV RAX,qword ptr [RSP + 0x30]
MOV qword ptr [RSP + 0x10],RAX
MOVAPS XMM0,xmmword ptr [RSP + 0x20]
MOVUPS xmmword ptr [RSP],XMM0
LEA RSI,[0x174610]
LEA R13,[RSP + 0x158]
MOV RDI,R13
CALL 0x0014f541
MOV RAX,qword ptr [R13 + 0x10]
MOV qword ptr [RSP + 0x10],RAX
MOVUPS XMM0,xmmword ptr [R13]
MOVUPS xmmword ptr [RSP],XMM0
CALL 0x0014f7df
SHR RAX,0xd
MOV ECX,dword ptr [R14 + 0x80]
PUSH 0x1
POP RDX
LEA R8,[RSP + 0x40]
MOV RDI,R15
MOV ESI,EAX
JMP 0x001251df
LAB_001250f8:
MOV RDI,R15
CALL 0x00150655
TEST RAX,RAX
JNZ 0x00124ec4
LEA RSI,[0x1745d7]
MOV RDI,R15
CALL 0x00150675
JMP 0x00125296
LAB_0012511d:
MOVAPS xmmword ptr [RSP + 0xd0],XMM0
AND qword ptr [RSP + 0xe0],0x0
MOV ESI,dword ptr [R14 + 0x80]
MOV RAX,qword ptr [RSP + 0xe0]
MOV qword ptr [RSP + 0x10],RAX
MOVAPS XMM0,xmmword ptr [RSP + 0xd0]
MOVUPS xmmword ptr [RSP],XMM0
LEA RDX,[RSP + 0x20]
MOV RDI,R15
CALL 0x001254bf
TEST AL,AL
JZ 0x001251e9
MOV RAX,qword ptr [RSP + 0x30]
MOV qword ptr [RSP + 0x10],RAX
MOVAPS XMM0,xmmword ptr [RSP + 0x20]
MOVUPS xmmword ptr [RSP],XMM0
LEA RSI,[0x174610]
LEA R13,[RSP + 0x170]
MOV RDI,R13
CALL 0x0014f541
MOV RAX,qword ptr [R13 + 0x10]
MOV qword ptr [RSP + 0x10],RAX
MOVUPS XMM0,xmmword ptr [R13]
MOVUPS xmmword ptr [RSP],XMM0
CALL 0x0014f7df
MOV R13,RAX
SHR R13,0xd
LEA ESI,[R13 + -0x1]
MOV ECX,dword ptr [R14 + 0x80]
PUSH 0x1
POP RDX
LEA R8,[RSP + 0x40]
MOV RDI,R15
CALL 0x00125407
ADD R13D,-0x15
MOV ECX,dword ptr [R14 + 0x80]
LEA R8,[RSP + 0x50]
MOV RDI,R15
MOV ESI,R13D
PUSH 0x1
POP RDX
LAB_001251df:
CALL 0x00125407
MOV R13D,EAX
JMP 0x001251ec
LAB_001251e9:
XOR R13D,R13D
LAB_001251ec:
MOV RDI,R12
CALL 0x0014aff8
MOV ESI,dword ptr [RSP + 0x40]
TEST ESI,ESI
SETNZ AL
AND AL,R13B
CMP AL,0x1
JNZ 0x0012522d
MOV RDX,qword ptr [RSP + 0x48]
LEA RCX,[RSP + 0x90]
MOV RDI,R14
CALL 0x0012a11f
TEST AL,AL
JNZ 0x0012522d
LEA RDI,[0x1745d7]
CALL 0x00122030
MOV qword ptr [R14 + 0x78],RAX
LAB_0012522d:
MOV ESI,dword ptr [RSP + 0x50]
TEST ESI,ESI
SETNZ AL
AND R13B,AL
CMP R13B,0x1
JNZ 0x00125268
MOV RDX,qword ptr [RSP + 0x58]
LEA RCX,[RSP + 0x90]
MOV RDI,R14
CALL 0x0012a11f
TEST AL,AL
JNZ 0x00125268
LEA RDI,[0x1745d7]
CALL 0x00122030
MOV qword ptr [R14 + 0x78],RAX
LAB_00125268:
CMP qword ptr [R14 + 0x78],0x0
JZ 0x00125273
PUSH -0x1
JMP 0x00125282
LAB_00125273:
MOV RDI,R15
CALL 0x00150655
TEST RAX,RAX
JZ 0x00125289
PUSH 0x2
LAB_00125282:
POP R12
JMP 0x00124ec4
LAB_00125289:
MOV RDI,R14
MOV ESI,EBP
MOV RDX,RBX
CALL 0x00124e75
LAB_00125296:
MOV R12D,EAX
JMP 0x00124ec4
|
ulong c4_get_validators(long param_1,int4 param_2,int8 *param_3,int8 param_4,
int8 param_5,int8 param_6)
{
int4 uVar1;
int8 *puVar2;
char cVar3;
byte bVar4;
int iVar5;
uint uVar6;
ulong uVar7;
long lVar8;
char *pcVar9;
long lVar10;
long lVar11;
int8 *puVar12;
ulong *puVar13;
int1 auVar14 [16];
ulong uStackY_1c0;
int8 local_198;
int8 uStack_190;
int8 local_188;
ulong local_178;
int8 uStack_170;
ulong local_168;
int8 uStack_160;
ulong *local_158;
ulong uStack_150;
int4 local_148;
uint local_140 [2];
ulong *local_138;
int4 local_130;
int8 local_128;
int8 uStack_120;
int8 local_118;
int8 uStack_110;
int local_108;
int iStack_104;
int8 uStack_100;
long local_f8;
int8 uStack_f0;
int8 local_e8;
int8 uStack_e0;
int8 local_d8;
ulong local_c8;
int8 uStack_c0;
int4 local_60 [2];
int4 uStack_58;
int8 local_50;
int4 local_48 [2];
int4 uStack_40;
int8 local_38;
get_validators_from_cache(&local_108,param_1,param_2);
if (local_f8 != 0) {
LAB_00124eaa:
param_3[2] = local_f8;
param_3[3] = uStack_f0;
*param_3 = CONCAT44(iStack_104,local_108);
param_3[1] = uStack_100;
uStackY_1c0 = 0;
goto LAB_00124ec4;
}
if (local_108 == 0) {
auVar14 = c4_get_chain_state(*(int4 *)(param_1 + 0x80));
lVar8 = auVar14._0_8_;
lVar10 = param_1 + 0x70;
local_198 = 0;
uStack_190 = 0;
local_188 = 0;
local_178 = 0;
uStack_170 = 0;
local_168 = 0;
uStack_160 = 0;
local_118 = 0;
uStack_110 = 0;
local_128 = 0;
uStack_120 = 0;
if (auVar14._8_4_ == 0) {
local_e8 = 0;
uStack_e0 = 0;
local_d8 = 0;
cVar3 = req_header(lVar10,*(int4 *)(param_1 + 0x80),&local_198);
if (cVar3 == '\0') goto LAB_001251e9;
json_get(local_48,&DAT_00174610);
uVar7 = json_as_uint64();
iVar5 = (int)(uVar7 >> 0xd);
req_client_update(lVar10,iVar5 + -1,1,*(int4 *)(param_1 + 0x80),&local_178,param_6,
local_48[0],uStack_40,local_38);
uVar1 = *(int4 *)(param_1 + 0x80);
puVar13 = &local_168;
uVar7 = (ulong)(iVar5 - 0x15);
local_60[0] = local_48[0];
uStack_58 = uStack_40;
local_50 = local_38;
LAB_001251df:
bVar4 = req_client_update(lVar10,uVar7,1,uVar1,puVar13,param_6,local_60[0],uStack_58,local_50)
;
}
else {
iVar5 = trusted_blocks_len(lVar8,auVar14._8_8_ & 0xffffffff);
if (iVar5 != 0) {
local_140[0] = 0;
local_138 = &local_c8;
local_130 = 0xffffff9c;
lVar11 = (auVar14._8_8_ & 0xffffffff) + 1;
uStack_150 = 0;
puVar2 = (int8 *)(lVar8 + -0x28);
do {
puVar12 = puVar2;
lVar11 = lVar11 + -1;
if (lVar11 == 0) goto LAB_00125059;
puVar2 = puVar12 + 6;
} while (puVar12[5] != 0);
bprintf(local_140,"\"0x%x\"",0x20,puVar2);
local_128 = *puVar2;
uStack_120 = puVar12[7];
local_118 = puVar12[8];
uStack_110 = puVar12[9];
uStack_150 = (ulong)local_140[0];
LAB_00125059:
local_158 = &local_c8;
local_148 = 1;
cVar3 = req_header(lVar10,*(int4 *)(param_1 + 0x80),&local_198);
if (cVar3 != '\0') {
json_get(local_60,&DAT_00174610);
uVar7 = json_as_uint64();
uVar1 = *(int4 *)(param_1 + 0x80);
puVar13 = &local_178;
uVar7 = uVar7 >> 0xd & 0xffffffff;
goto LAB_001251df;
}
}
LAB_001251e9:
bVar4 = 0;
}
safe_free(lVar8);
if ((((int)local_178 != 0 & bVar4) == 1) &&
(cVar3 = c4_handle_client_updates(param_1,local_178 & 0xffffffff,uStack_170,&local_128),
cVar3 == '\0')) {
pcVar9 = strdup("Failed to handle client updates");
*(char **)(param_1 + 0x78) = pcVar9;
}
if (((bVar4 & (int)local_168 != 0) == 1) &&
(cVar3 = c4_handle_client_updates(param_1,local_168 & 0xffffffff,uStack_160,&local_128),
cVar3 == '\0')) {
pcVar9 = strdup("Failed to handle client updates");
*(char **)(param_1 + 0x78) = pcVar9;
}
if (*(long *)(param_1 + 0x78) != 0) {
uStackY_1c0 = 0xffffffffffffffff;
goto LAB_00124ec4;
}
lVar10 = c4_state_get_pending_request(lVar10);
if (lVar10 != 0) {
uStackY_1c0 = 2;
goto LAB_00124ec4;
}
uVar6 = c4_get_validators(param_1,param_2,param_3);
}
else {
local_c8 = 0;
uStack_c0 = 0;
lVar10 = param_1 + 0x70;
cVar3 = req_client_update(lVar10,local_108,iStack_104 - local_108,
*(int4 *)(param_1 + 0x80));
uStackY_1c0 = 2;
if (cVar3 == '\0') goto LAB_00124ec4;
cVar3 = c4_handle_client_updates(param_1,local_c8 & 0xffffffff,uStack_c0,0);
if (cVar3 != '\0') {
get_validators_from_cache(&local_108,param_1,param_2);
if (local_f8 == 0) {
uVar7 = c4_state_add_error(lVar10,"Failed to get validators");
return uVar7;
}
goto LAB_00124eaa;
}
lVar8 = c4_state_get_pending_request(lVar10);
uStackY_1c0 = 2;
if (lVar8 != 0) goto LAB_00124ec4;
uVar6 = c4_state_add_error(lVar10,"Failed to handle client updates");
}
uStackY_1c0 = (ulong)uVar6;
LAB_00124ec4:
return uStackY_1c0 & 0xffffffff;
}
|
|
61,895 |
c4_get_validators
|
corpus-core[P]colibri-stateless/src/chains/eth/verifier/sync_committee_state.c
|
INTERNAL const c4_status_t c4_get_validators(verify_ctx_t* ctx, uint32_t period, c4_sync_state_t* target_state) {
c4_sync_state_t sync_state = get_validators_from_cache(ctx, period);
if (sync_state.validators.data == NULL) {
if (sync_state.last_period == 0) { // there is nothing we can start syncing from
TRY_ASYNC(init_sync_state(ctx));
return c4_get_validators(ctx, period, target_state);
}
else {
bytes_t client_update = {0};
if (req_client_update(&ctx->state, sync_state.last_period, sync_state.current_period - sync_state.last_period, ctx->chain_id, &client_update)) {
if (!c4_handle_client_updates(ctx, client_update, NULL))
return c4_state_get_pending_request(&ctx->state) ? C4_PENDING : c4_state_add_error(&ctx->state, "Failed to handle client updates");
}
else
return C4_PENDING;
}
sync_state = get_validators_from_cache(ctx, period);
if (sync_state.validators.data == NULL) return c4_state_add_error(&ctx->state, "Failed to get validators");
}
*target_state = sync_state;
return C4_SUCCESS;
}
|
O3
|
c
|
c4_get_validators:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x188, %rsp # imm = 0x188
movq %rdx, %rbx
movl %esi, %ebp
movq %rdi, %r14
leaq 0xb0(%rsp), %r15
movq %r15, %rdi
movq %r14, %rsi
movl %ebp, %edx
callq 0x26040
cmpq $0x0, 0x10(%r15)
je 0x25c50
movups 0xb0(%rsp), %xmm0
movups 0xc0(%rsp), %xmm1
movups %xmm1, 0x10(%rbx)
movups %xmm0, (%rbx)
xorl %r12d, %r12d
movl %r12d, %eax
addq $0x188, %rsp # imm = 0x188
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl 0xb0(%rsp), %esi
testl %esi, %esi
je 0x25cf6
xorps %xmm0, %xmm0
leaq 0xf0(%rsp), %r8
movaps %xmm0, (%r8)
leaq 0x70(%r14), %r15
movl 0xb4(%rsp), %edx
subl %esi, %edx
movl 0x80(%r14), %ecx
movq %r15, %rdi
callq 0x261c6
movl $0x2, %r12d
testb %al, %al
je 0x25c3b
movl 0xf0(%rsp), %esi
movq 0xf8(%rsp), %rdx
movq %r14, %rdi
xorl %ecx, %ecx
callq 0x2b488
testb %al, %al
je 0x25dab
leaq 0xb0(%rsp), %r12
movq %r12, %rdi
movq %r14, %rsi
movl %ebp, %edx
callq 0x26040
cmpq $0x0, 0x10(%r12)
jne 0x25c21
leaq 0x5b91a(%rip), %rsi # 0x815f7
movq %r15, %rdi
addq $0x188, %rsp # imm = 0x188
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x589cd
movl 0x80(%r14), %edi
callq 0x257d8
movq %rax, %r12
leaq 0x70(%r14), %r15
xorps %xmm0, %xmm0
movaps %xmm0, 0x20(%rsp)
movq $0x0, 0x30(%rsp)
movaps %xmm0, 0x40(%rsp)
movaps %xmm0, 0x50(%rsp)
movaps %xmm0, 0xa0(%rsp)
movaps %xmm0, 0x90(%rsp)
testl %edx, %edx
je 0x25dd0
movl %edx, %eax
movq %rax, %rcx
shlq $0x4, %rcx
leaq (%rcx,%rcx,2), %rcx
xorl %edx, %edx
xorl %esi, %esi
cmpq $0x1, (%r12,%rdx)
adcl $0x0, %esi
addq $0x30, %rdx
cmpq %rdx, %rcx
jne 0x25d4d
testl %esi, %esi
je 0x25f84
movl $0x0, 0x78(%rsp)
leaq 0xf0(%rsp), %rdx
movq %rdx, 0x80(%rsp)
movl $0xffffff9c, 0x88(%rsp) # imm = 0xFFFFFF9C
movq %r12, %r13
addq $0x8, %r13
xorl %ecx, %ecx
cmpq $0x0, -0x8(%r13)
je 0x25e99
addq $0x30, %r13
decq %rax
jne 0x25d92
jmp 0x25edd
movq %r15, %rdi
callq 0x589ae
testq %rax, %rax
jne 0x25c3b
leaq 0x5b814(%rip), %rsi # 0x815d7
movq %r15, %rdi
callq 0x589cd
jmp 0x26038
movaps %xmm0, 0xd0(%rsp)
movq $0x0, 0xe0(%rsp)
movl 0x80(%r14), %esi
movq 0xe0(%rsp), %rax
movq %rax, 0x10(%rsp)
movaps 0xd0(%rsp), %xmm0
movups %xmm0, (%rsp)
leaq 0x20(%rsp), %rdx
movq %r15, %rdi
callq 0x26283
testb %al, %al
je 0x25f84
movq 0x30(%rsp), %rax
movq %rax, 0x10(%rsp)
movaps 0x20(%rsp), %xmm0
movups %xmm0, (%rsp)
leaq 0x5b7dd(%rip), %rsi # 0x81610
leaq 0x170(%rsp), %r13
movq %r13, %rdi
callq 0x57731
movq 0x10(%r13), %rax
movq %rax, 0x10(%rsp)
movups (%r13), %xmm0
movups %xmm0, (%rsp)
callq 0x57a05
movq %rax, %r13
shrq $0xd, %r13
leal -0x1(%r13), %esi
movl 0x80(%r14), %ecx
leaq 0x40(%rsp), %r8
movq %r15, %rdi
movl $0x1, %edx
callq 0x261c6
addl $-0x15, %r13d
movl 0x80(%r14), %ecx
leaq 0x50(%rsp), %r8
movq %r15, %rdi
movl %r13d, %esi
jmp 0x25f75
leaq 0x5b775(%rip), %rsi # 0x81615
leaq 0x78(%rsp), %rdi
movl $0x20, %edx
movq %r13, %rcx
xorl %eax, %eax
callq 0x53780
leaq 0xf0(%rsp), %rdx
movups (%r13), %xmm0
movups 0x10(%r13), %xmm1
movaps %xmm0, 0x90(%rsp)
movaps %xmm1, 0xa0(%rsp)
leaq 0x78(%rsp), %rax
movl (%rax), %ecx
movq %rdx, 0x60(%rsp)
movq %rcx, 0x68(%rsp)
movl $0x1, 0x70(%rsp)
movl 0x80(%r14), %esi
movq 0x70(%rsp), %rax
movq %rax, 0x10(%rsp)
movups 0x60(%rsp), %xmm0
movups %xmm0, (%rsp)
leaq 0x20(%rsp), %rdx
movq %r15, %rdi
callq 0x26283
testb %al, %al
je 0x25f84
movq 0x30(%rsp), %rax
movq %rax, 0x10(%rsp)
movaps 0x20(%rsp), %xmm0
movups %xmm0, (%rsp)
leaq 0x5b6dc(%rip), %rsi # 0x81610
movq %r15, %r13
leaq 0x158(%rsp), %r15
movq %r15, %rdi
callq 0x57731
movq 0x10(%r15), %rax
movq %rax, 0x10(%rsp)
movups (%r15), %xmm0
movq %r13, %r15
movups %xmm0, (%rsp)
callq 0x57a05
shrq $0xd, %rax
movl 0x80(%r14), %ecx
leaq 0x40(%rsp), %r8
movq %r13, %rdi
movl %eax, %esi
movl $0x1, %edx
callq 0x261c6
movl %eax, %r13d
jmp 0x25f87
xorl %r13d, %r13d
movq %r12, %rdi
callq 0x52f98
movl 0x40(%rsp), %esi
testl %esi, %esi
setne %al
andb %r13b, %al
cmpb $0x1, %al
jne 0x25fc8
movq 0x48(%rsp), %rdx
leaq 0x90(%rsp), %rcx
movq %r14, %rdi
callq 0x2b488
testb %al, %al
jne 0x25fc8
leaq 0x5b618(%rip), %rdi # 0x815d7
callq 0x22030
movq %rax, 0x78(%r14)
movl 0x50(%rsp), %esi
testl %esi, %esi
setne %al
andb %al, %r13b
cmpb $0x1, %r13b
jne 0x26003
movq 0x58(%rsp), %rdx
leaq 0x90(%rsp), %rcx
movq %r14, %rdi
callq 0x2b488
testb %al, %al
jne 0x26003
leaq 0x5b5dd(%rip), %rdi # 0x815d7
callq 0x22030
movq %rax, 0x78(%r14)
movl $0xffffffff, %r12d # imm = 0xFFFFFFFF
cmpq $0x0, 0x78(%r14)
jne 0x25c3b
movq %r15, %rdi
callq 0x589ae
movl $0x2, %r12d
testq %rax, %rax
jne 0x25c3b
movq %r14, %rdi
movl %ebp, %esi
movq %rbx, %rdx
callq 0x25bec
movl %eax, %r12d
jmp 0x25c3b
|
c4_get_validators:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 188h
mov rbx, rdx
mov ebp, esi
mov r14, rdi
lea r15, [rsp+1B8h+var_108]
mov rdi, r15
mov rsi, r14
mov edx, ebp
call get_validators_from_cache
cmp qword ptr [r15+10h], 0
jz short loc_25C50
loc_25C21:
movups xmm0, [rsp+1B8h+var_108]
movups xmm1, [rsp+1B8h+var_F8]
movups xmmword ptr [rbx+10h], xmm1
movups xmmword ptr [rbx], xmm0
xor r12d, r12d
loc_25C3B:
mov eax, r12d
add rsp, 188h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_25C50:
mov esi, dword ptr [rsp+1B8h+var_108]
test esi, esi
jz loc_25CF6
xorps xmm0, xmm0
lea r8, [rsp+1B8h+var_C8]
movaps xmmword ptr [r8], xmm0
lea r15, [r14+70h]
mov edx, dword ptr [rsp+1B8h+var_108+4]
sub edx, esi
mov ecx, [r14+80h]
mov rdi, r15
call req_client_update
mov r12d, 2
test al, al
jz short loc_25C3B
mov esi, [rsp+1B8h+var_C8]
mov rdx, [rsp+1B8h+var_C0]
mov rdi, r14
xor ecx, ecx
call c4_handle_client_updates
test al, al
jz loc_25DAB
lea r12, [rsp+1B8h+var_108]
mov rdi, r12
mov rsi, r14
mov edx, ebp
call get_validators_from_cache
cmp qword ptr [r12+10h], 0
jnz loc_25C21
lea rsi, aFailedToGetVal; "Failed to get validators"
mov rdi, r15
add rsp, 188h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
jmp c4_state_add_error
loc_25CF6:
mov edi, [r14+80h]
call c4_get_chain_state
mov r12, rax
lea r15, [r14+70h]
xorps xmm0, xmm0
movaps [rsp+1B8h+var_198], xmm0
mov [rsp+1B8h+var_188], 0
movaps [rsp+1B8h+var_178], xmm0
movaps [rsp+1B8h+var_168], xmm0
movaps [rsp+1B8h+var_118], xmm0
movaps [rsp+1B8h+var_128], xmm0
test edx, edx
jz loc_25DD0
mov eax, edx
mov rcx, rax
shl rcx, 4
lea rcx, [rcx+rcx*2]
xor edx, edx
xor esi, esi
loc_25D4D:
cmp qword ptr [r12+rdx], 1
adc esi, 0
add rdx, 30h ; '0'
cmp rcx, rdx
jnz short loc_25D4D
test esi, esi
jz loc_25F84
mov [rsp+1B8h+var_140], 0
lea rdx, [rsp+1B8h+var_C8]
mov [rsp+1B8h+var_138], rdx
mov [rsp+1B8h+var_130], 0FFFFFF9Ch
mov r13, r12
add r13, 8
xor ecx, ecx
loc_25D92:
cmp qword ptr [r13-8], 0
jz loc_25E99
add r13, 30h ; '0'
dec rax
jnz short loc_25D92
jmp loc_25EDD
loc_25DAB:
mov rdi, r15
call c4_state_get_pending_request
test rax, rax
jnz loc_25C3B
lea rsi, aFailedToHandle; "Failed to handle client updates"
mov rdi, r15
call c4_state_add_error
jmp loc_26038
loc_25DD0:
movaps [rsp+1B8h+var_E8], xmm0
mov [rsp+1B8h+var_D8], 0
mov esi, [r14+80h]
mov rax, [rsp+1B8h+var_D8]
mov [rsp+1B8h+var_1A8], rax
movaps xmm0, [rsp+1B8h+var_E8]
movups [rsp+1B8h+var_1B8], xmm0
lea rdx, [rsp+1B8h+var_198]
mov rdi, r15
call req_header
test al, al
jz loc_25F84
mov rax, [rsp+1B8h+var_188]
mov [rsp+1B8h+var_1A8], rax
movaps xmm0, [rsp+1B8h+var_198]
movups [rsp+1B8h+var_1B8], xmm0
lea rsi, aSlot; "slot"
lea r13, [rsp+1B8h+var_48]
mov rdi, r13
call json_get
mov rax, [r13+10h]
mov [rsp+1B8h+var_1A8], rax
movups xmm0, xmmword ptr [r13+0]
movups [rsp+1B8h+var_1B8], xmm0
call json_as_uint64
mov r13, rax
shr r13, 0Dh
lea esi, [r13-1]
mov ecx, [r14+80h]
lea r8, [rsp+1B8h+var_178]
mov rdi, r15
mov edx, 1
call req_client_update
add r13d, 0FFFFFFEBh
mov ecx, [r14+80h]
lea r8, [rsp+1B8h+var_168]
mov rdi, r15
mov esi, r13d
jmp loc_25F75
loc_25E99:
lea rsi, a0xX; "\"0x%x\""
lea rdi, [rsp+1B8h+var_140]
mov edx, 20h ; ' '
mov rcx, r13
xor eax, eax
call bprintf
lea rdx, [rsp+1B8h+var_C8]
movups xmm0, xmmword ptr [r13+0]
movups xmm1, xmmword ptr [r13+10h]
movaps [rsp+1B8h+var_128], xmm0
movaps [rsp+1B8h+var_118], xmm1
lea rax, [rsp+1B8h+var_140]
mov ecx, [rax]
loc_25EDD:
mov qword ptr [rsp+1B8h+var_158], rdx
mov qword ptr [rsp+1B8h+var_158+8], rcx
mov dword ptr [rsp+1B8h+var_148], 1
mov esi, [r14+80h]
mov rax, [rsp+1B8h+var_148]
mov [rsp+1B8h+var_1A8], rax
movups xmm0, [rsp+1B8h+var_158]
movups [rsp+1B8h+var_1B8], xmm0
lea rdx, [rsp+1B8h+var_198]
mov rdi, r15
call req_header
test al, al
jz short loc_25F84
mov rax, [rsp+1B8h+var_188]
mov [rsp+1B8h+var_1A8], rax
movaps xmm0, [rsp+1B8h+var_198]
movups [rsp+1B8h+var_1B8], xmm0
lea rsi, aSlot; "slot"
mov r13, r15
lea r15, [rsp+1B8h+var_60]
mov rdi, r15
call json_get
mov rax, [r15+10h]
mov [rsp+1B8h+var_1A8], rax
movups xmm0, xmmword ptr [r15]
mov r15, r13
movups [rsp+1B8h+var_1B8], xmm0
call json_as_uint64
shr rax, 0Dh
mov ecx, [r14+80h]
lea r8, [rsp+1B8h+var_178]
mov rdi, r13
mov esi, eax
loc_25F75:
mov edx, 1
call req_client_update
mov r13d, eax
jmp short loc_25F87
loc_25F84:
xor r13d, r13d
loc_25F87:
mov rdi, r12
call safe_free
mov esi, dword ptr [rsp+1B8h+var_178]
test esi, esi
setnz al
and al, r13b
cmp al, 1
jnz short loc_25FC8
mov rdx, qword ptr [rsp+1B8h+var_178+8]
lea rcx, [rsp+1B8h+var_128]
mov rdi, r14
call c4_handle_client_updates
test al, al
jnz short loc_25FC8
lea rdi, aFailedToHandle; "Failed to handle client updates"
call _strdup
mov [r14+78h], rax
loc_25FC8:
mov esi, dword ptr [rsp+1B8h+var_168]
test esi, esi
setnz al
and r13b, al
cmp r13b, 1
jnz short loc_26003
mov rdx, qword ptr [rsp+1B8h+var_168+8]
lea rcx, [rsp+1B8h+var_128]
mov rdi, r14
call c4_handle_client_updates
test al, al
jnz short loc_26003
lea rdi, aFailedToHandle; "Failed to handle client updates"
call _strdup
mov [r14+78h], rax
loc_26003:
mov r12d, 0FFFFFFFFh
cmp qword ptr [r14+78h], 0
jnz loc_25C3B
mov rdi, r15
call c4_state_get_pending_request
mov r12d, 2
test rax, rax
jnz loc_25C3B
mov rdi, r14
mov esi, ebp
mov rdx, rbx
call c4_get_validators
loc_26038:
mov r12d, eax
jmp loc_25C3B
|
long long c4_get_validators(long long a1, unsigned int a2, _OWORD *a3)
{
__int128 v6; // xmm0
unsigned int v7; // r12d
unsigned int v9; // edx
int v10; // ecx
int v11; // r8d
int v12; // r9d
long long chain_state; // r12
long long v14; // r15
long long v15; // rax
long long v16; // rcx
long long v17; // rdx
int v18; // esi
_OWORD *v19; // r13
unsigned long long v20; // rcx
int v22; // edx
int v23; // ecx
int v24; // r8d
int v25; // r9d
int v26; // edx
int v27; // ecx
int v28; // r8d
int v29; // r9d
unsigned long long v30; // r13
long long v31; // rcx
__int128 *v32; // r8
long long v33; // rdi
long long v34; // rsi
__int128 v35; // xmm1
int v36; // edx
int v37; // ecx
int v38; // r8d
int v39; // r9d
int v40; // edx
int v41; // ecx
int v42; // r8d
int v43; // r9d
unsigned long long v44; // rax
unsigned __int8 v45; // r13
__int128 v46; // [rsp+20h] [rbp-198h] BYREF
long long v47; // [rsp+30h] [rbp-188h]
__int128 v48; // [rsp+40h] [rbp-178h] BYREF
_OWORD v49[2]; // [rsp+50h] [rbp-168h] BYREF
long long v50; // [rsp+70h] [rbp-148h]
unsigned int v51; // [rsp+78h] [rbp-140h] BYREF
_OWORD *v52; // [rsp+80h] [rbp-138h]
int v53; // [rsp+88h] [rbp-130h]
__int128 v54; // [rsp+90h] [rbp-128h] BYREF
__int128 v55; // [rsp+A0h] [rbp-118h]
__int128 v56; // [rsp+B0h] [rbp-108h] BYREF
__int128 v57; // [rsp+C0h] [rbp-F8h]
__int128 v58; // [rsp+D0h] [rbp-E8h]
long long v59; // [rsp+E0h] [rbp-D8h]
_OWORD v60[6]; // [rsp+F0h] [rbp-C8h] BYREF
_QWORD v61[3]; // [rsp+158h] [rbp-60h] BYREF
_QWORD v62[9]; // [rsp+170h] [rbp-48h] BYREF
get_validators_from_cache(&v56, a1, a2);
if ( (_QWORD)v57 )
goto LABEL_2;
if ( !(_DWORD)v56 )
{
chain_state = c4_get_chain_state(*(_DWORD *)(a1 + 128));
v14 = a1 + 112;
v46 = 0LL;
v47 = 0LL;
v48 = 0LL;
v49[0] = 0LL;
v55 = 0LL;
v54 = 0LL;
if ( v9 )
{
v15 = v9;
v16 = 48LL * v9;
v17 = 0LL;
v18 = 0;
do
{
v18 += *(_QWORD *)(chain_state + v17) == 0LL;
v17 += 48LL;
}
while ( v16 != v17 );
if ( v18 )
{
v51 = 0;
v52 = v60;
v53 = -100;
v19 = (_OWORD *)(chain_state + 8);
v20 = 0LL;
while ( *((_QWORD *)v19 - 1) )
{
v19 += 3;
if ( !--v15 )
goto LABEL_22;
}
bprintf((unsigned int)&v51, (unsigned int)"\"0x%x\"", 32, (_DWORD)v19, v11, v12);
v35 = v19[1];
v54 = *v19;
v55 = v35;
v20 = v51;
LABEL_22:
v49[1] = __PAIR128__(v20, v60);
LODWORD(v50) = 1;
if ( (unsigned __int8)req_header(
(int)a1 + 112,
*(_DWORD *)(a1 + 128),
(unsigned int)&v46,
v20,
v11,
v12,
(char)v60,
v20,
1) )
{
json_get((unsigned int)v61, (unsigned int)"slot", v36, v37, v38, v39, v46, v47);
v14 = a1 + 112;
v44 = json_as_uint64((unsigned int)v61, (unsigned int)"slot", v40, v41, v42, v43, v61[0], v61[1], v61[2]);
v31 = *(unsigned int *)(a1 + 128);
v32 = &v48;
v33 = a1 + 112;
v34 = (unsigned int)(v44 >> 13);
goto LABEL_24;
}
}
}
else
{
v58 = 0LL;
v59 = 0LL;
if ( (unsigned __int8)req_header((int)a1 + 112, *(_DWORD *)(a1 + 128), (unsigned int)&v46, v10, v11, v12, 0, 0, 0) )
{
json_get((unsigned int)v62, (unsigned int)"slot", v22, v23, v24, v25, v46, v47);
v30 = (unsigned long long)json_as_uint64(
(unsigned int)v62,
(unsigned int)"slot",
v26,
v27,
v28,
v29,
v62[0],
v62[1],
v62[2]) >> 13;
req_client_update(a1 + 112, (unsigned int)(v30 - 1), 1LL, *(unsigned int *)(a1 + 128), &v48);
v31 = *(unsigned int *)(a1 + 128);
v32 = v49;
v33 = a1 + 112;
v34 = (unsigned int)(v30 - 21);
LABEL_24:
v45 = req_client_update(v33, v34, 1LL, v31, v32);
goto LABEL_26;
}
}
v45 = 0;
LABEL_26:
safe_free(chain_state);
if ( (v45 & ((_DWORD)v48 != 0)) == 1
&& !(unsigned __int8)c4_handle_client_updates(a1, (unsigned int)v48, *((_QWORD *)&v48 + 1), &v54) )
{
*(_QWORD *)(a1 + 120) = strdup("Failed to handle client updates");
}
if ( ((LODWORD(v49[0]) != 0) & v45) == 1
&& !(unsigned __int8)c4_handle_client_updates(a1, LODWORD(v49[0]), *((_QWORD *)&v49[0] + 1), &v54) )
{
*(_QWORD *)(a1 + 120) = strdup("Failed to handle client updates");
}
v7 = -1;
if ( *(_QWORD *)(a1 + 120) )
return v7;
v7 = 2;
if ( c4_state_get_pending_request(v14) )
return v7;
return (unsigned int)c4_get_validators(a1, a2, a3);
}
v60[0] = 0LL;
v7 = 2;
if ( !(unsigned __int8)req_client_update(
a1 + 112,
(unsigned int)v56,
(unsigned int)(DWORD1(v56) - v56),
*(unsigned int *)(a1 + 128),
v60) )
return v7;
if ( !(unsigned __int8)c4_handle_client_updates(a1, LODWORD(v60[0]), *((_QWORD *)&v60[0] + 1), 0LL) )
{
if ( c4_state_get_pending_request(a1 + 112) )
return v7;
return (unsigned int)c4_state_add_error(a1 + 112, "Failed to handle client updates");
}
get_validators_from_cache(&v56, a1, a2);
if ( (_QWORD)v57 )
{
LABEL_2:
v6 = v56;
a3[1] = v57;
*a3 = v6;
return 0;
}
return c4_state_add_error(a1 + 112, "Failed to get validators");
}
|
c4_get_validators:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x188
MOV RBX,RDX
MOV EBP,ESI
MOV R14,RDI
LEA R15,[RSP + 0xb0]
MOV RDI,R15
MOV RSI,R14
MOV EDX,EBP
CALL 0x00126040
CMP qword ptr [R15 + 0x10],0x0
JZ 0x00125c50
LAB_00125c21:
MOVUPS XMM0,xmmword ptr [RSP + 0xb0]
MOVUPS XMM1,xmmword ptr [RSP + 0xc0]
MOVUPS xmmword ptr [RBX + 0x10],XMM1
MOVUPS xmmword ptr [RBX],XMM0
XOR R12D,R12D
LAB_00125c3b:
MOV EAX,R12D
ADD RSP,0x188
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_00125c50:
MOV ESI,dword ptr [RSP + 0xb0]
TEST ESI,ESI
JZ 0x00125cf6
XORPS XMM0,XMM0
LEA R8,[RSP + 0xf0]
MOVAPS xmmword ptr [R8],XMM0
LEA R15,[R14 + 0x70]
MOV EDX,dword ptr [RSP + 0xb4]
SUB EDX,ESI
MOV ECX,dword ptr [R14 + 0x80]
MOV RDI,R15
CALL 0x001261c6
MOV R12D,0x2
TEST AL,AL
JZ 0x00125c3b
MOV ESI,dword ptr [RSP + 0xf0]
MOV RDX,qword ptr [RSP + 0xf8]
MOV RDI,R14
XOR ECX,ECX
CALL 0x0012b488
TEST AL,AL
JZ 0x00125dab
LEA R12,[RSP + 0xb0]
MOV RDI,R12
MOV RSI,R14
MOV EDX,EBP
CALL 0x00126040
CMP qword ptr [R12 + 0x10],0x0
JNZ 0x00125c21
LEA RSI,[0x1815f7]
MOV RDI,R15
ADD RSP,0x188
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
JMP 0x001589cd
LAB_00125cf6:
MOV EDI,dword ptr [R14 + 0x80]
CALL 0x001257d8
MOV R12,RAX
LEA R15,[R14 + 0x70]
XORPS XMM0,XMM0
MOVAPS xmmword ptr [RSP + 0x20],XMM0
MOV qword ptr [RSP + 0x30],0x0
MOVAPS xmmword ptr [RSP + 0x40],XMM0
MOVAPS xmmword ptr [RSP + 0x50],XMM0
MOVAPS xmmword ptr [RSP + 0xa0],XMM0
MOVAPS xmmword ptr [RSP + 0x90],XMM0
TEST EDX,EDX
JZ 0x00125dd0
MOV EAX,EDX
MOV RCX,RAX
SHL RCX,0x4
LEA RCX,[RCX + RCX*0x2]
XOR EDX,EDX
XOR ESI,ESI
LAB_00125d4d:
CMP qword ptr [R12 + RDX*0x1],0x1
ADC ESI,0x0
ADD RDX,0x30
CMP RCX,RDX
JNZ 0x00125d4d
TEST ESI,ESI
JZ 0x00125f84
MOV dword ptr [RSP + 0x78],0x0
LEA RDX,[RSP + 0xf0]
MOV qword ptr [RSP + 0x80],RDX
MOV dword ptr [RSP + 0x88],0xffffff9c
MOV R13,R12
ADD R13,0x8
XOR ECX,ECX
LAB_00125d92:
CMP qword ptr [R13 + -0x8],0x0
JZ 0x00125e99
ADD R13,0x30
DEC RAX
JNZ 0x00125d92
JMP 0x00125edd
LAB_00125dab:
MOV RDI,R15
CALL 0x001589ae
TEST RAX,RAX
JNZ 0x00125c3b
LEA RSI,[0x1815d7]
MOV RDI,R15
CALL 0x001589cd
JMP 0x00126038
LAB_00125dd0:
MOVAPS xmmword ptr [RSP + 0xd0],XMM0
MOV qword ptr [RSP + 0xe0],0x0
MOV ESI,dword ptr [R14 + 0x80]
MOV RAX,qword ptr [RSP + 0xe0]
MOV qword ptr [RSP + 0x10],RAX
MOVAPS XMM0,xmmword ptr [RSP + 0xd0]
MOVUPS xmmword ptr [RSP],XMM0
LEA RDX,[RSP + 0x20]
MOV RDI,R15
CALL 0x00126283
TEST AL,AL
JZ 0x00125f84
MOV RAX,qword ptr [RSP + 0x30]
MOV qword ptr [RSP + 0x10],RAX
MOVAPS XMM0,xmmword ptr [RSP + 0x20]
MOVUPS xmmword ptr [RSP],XMM0
LEA RSI,[0x181610]
LEA R13,[RSP + 0x170]
MOV RDI,R13
CALL 0x00157731
MOV RAX,qword ptr [R13 + 0x10]
MOV qword ptr [RSP + 0x10],RAX
MOVUPS XMM0,xmmword ptr [R13]
MOVUPS xmmword ptr [RSP],XMM0
CALL 0x00157a05
MOV R13,RAX
SHR R13,0xd
LEA ESI,[R13 + -0x1]
MOV ECX,dword ptr [R14 + 0x80]
LEA R8,[RSP + 0x40]
MOV RDI,R15
MOV EDX,0x1
CALL 0x001261c6
ADD R13D,-0x15
MOV ECX,dword ptr [R14 + 0x80]
LEA R8,[RSP + 0x50]
MOV RDI,R15
MOV ESI,R13D
JMP 0x00125f75
LAB_00125e99:
LEA RSI,[0x181615]
LEA RDI,[RSP + 0x78]
MOV EDX,0x20
MOV RCX,R13
XOR EAX,EAX
CALL 0x00153780
LEA RDX,[RSP + 0xf0]
MOVUPS XMM0,xmmword ptr [R13]
MOVUPS XMM1,xmmword ptr [R13 + 0x10]
MOVAPS xmmword ptr [RSP + 0x90],XMM0
MOVAPS xmmword ptr [RSP + 0xa0],XMM1
LEA RAX,[RSP + 0x78]
MOV ECX,dword ptr [RAX]
LAB_00125edd:
MOV qword ptr [RSP + 0x60],RDX
MOV qword ptr [RSP + 0x68],RCX
MOV dword ptr [RSP + 0x70],0x1
MOV ESI,dword ptr [R14 + 0x80]
MOV RAX,qword ptr [RSP + 0x70]
MOV qword ptr [RSP + 0x10],RAX
MOVUPS XMM0,xmmword ptr [RSP + 0x60]
MOVUPS xmmword ptr [RSP],XMM0
LEA RDX,[RSP + 0x20]
MOV RDI,R15
CALL 0x00126283
TEST AL,AL
JZ 0x00125f84
MOV RAX,qword ptr [RSP + 0x30]
MOV qword ptr [RSP + 0x10],RAX
MOVAPS XMM0,xmmword ptr [RSP + 0x20]
MOVUPS xmmword ptr [RSP],XMM0
LEA RSI,[0x181610]
MOV R13,R15
LEA R15,[RSP + 0x158]
MOV RDI,R15
CALL 0x00157731
MOV RAX,qword ptr [R15 + 0x10]
MOV qword ptr [RSP + 0x10],RAX
MOVUPS XMM0,xmmword ptr [R15]
MOV R15,R13
MOVUPS xmmword ptr [RSP],XMM0
CALL 0x00157a05
SHR RAX,0xd
MOV ECX,dword ptr [R14 + 0x80]
LEA R8,[RSP + 0x40]
MOV RDI,R13
MOV ESI,EAX
LAB_00125f75:
MOV EDX,0x1
CALL 0x001261c6
MOV R13D,EAX
JMP 0x00125f87
LAB_00125f84:
XOR R13D,R13D
LAB_00125f87:
MOV RDI,R12
CALL 0x00152f98
MOV ESI,dword ptr [RSP + 0x40]
TEST ESI,ESI
SETNZ AL
AND AL,R13B
CMP AL,0x1
JNZ 0x00125fc8
MOV RDX,qword ptr [RSP + 0x48]
LEA RCX,[RSP + 0x90]
MOV RDI,R14
CALL 0x0012b488
TEST AL,AL
JNZ 0x00125fc8
LEA RDI,[0x1815d7]
CALL 0x00122030
MOV qword ptr [R14 + 0x78],RAX
LAB_00125fc8:
MOV ESI,dword ptr [RSP + 0x50]
TEST ESI,ESI
SETNZ AL
AND R13B,AL
CMP R13B,0x1
JNZ 0x00126003
MOV RDX,qword ptr [RSP + 0x58]
LEA RCX,[RSP + 0x90]
MOV RDI,R14
CALL 0x0012b488
TEST AL,AL
JNZ 0x00126003
LEA RDI,[0x1815d7]
CALL 0x00122030
MOV qword ptr [R14 + 0x78],RAX
LAB_00126003:
MOV R12D,0xffffffff
CMP qword ptr [R14 + 0x78],0x0
JNZ 0x00125c3b
MOV RDI,R15
CALL 0x001589ae
MOV R12D,0x2
TEST RAX,RAX
JNZ 0x00125c3b
MOV RDI,R14
MOV ESI,EBP
MOV RDX,RBX
CALL 0x00125bec
LAB_00126038:
MOV R12D,EAX
JMP 0x00125c3b
|
ulong c4_get_validators(long param_1,int4 param_2,int8 *param_3,int8 param_4,
int8 param_5,int8 param_6)
{
int4 uVar1;
char cVar2;
byte bVar3;
uint uVar4;
ulong uVar5;
long lVar6;
char *pcVar7;
long lVar8;
long lVar9;
int iVar10;
ulong *puVar11;
int8 *puVar12;
int1 auVar13 [12];
int8 local_198;
int8 uStack_190;
int8 local_188;
ulong local_178;
int8 uStack_170;
ulong local_168;
int8 uStack_160;
ulong *local_158;
ulong uStack_150;
int4 local_148;
uint local_140 [2];
ulong *local_138;
int4 local_130;
int8 local_128;
int8 uStack_120;
int8 local_118;
int8 uStack_110;
int local_108;
int iStack_104;
int8 uStack_100;
long local_f8;
int8 uStack_f0;
int8 local_e8;
int8 uStack_e0;
int8 local_d8;
ulong local_c8;
int8 uStack_c0;
int4 local_60 [2];
int4 uStack_58;
int8 local_50;
int4 local_48 [2];
int4 uStack_40;
int8 local_38;
get_validators_from_cache(&local_108,param_1,param_2);
if (local_f8 != 0) {
LAB_00125c21:
param_3[2] = local_f8;
param_3[3] = uStack_f0;
*param_3 = CONCAT44(iStack_104,local_108);
param_3[1] = uStack_100;
return 0;
}
if (local_108 != 0) {
local_c8 = 0;
uStack_c0 = 0;
lVar8 = param_1 + 0x70;
cVar2 = req_client_update(lVar8,local_108,iStack_104 - local_108,*(int4 *)(param_1 + 0x80)
);
if (cVar2 == '\0') {
return 2;
}
cVar2 = c4_handle_client_updates(param_1,local_c8 & 0xffffffff,uStack_c0,0);
if (cVar2 != '\0') {
get_validators_from_cache(&local_108,param_1,param_2);
if (local_f8 == 0) {
uVar5 = c4_state_add_error(lVar8,"Failed to get validators");
return uVar5;
}
goto LAB_00125c21;
}
lVar6 = c4_state_get_pending_request(lVar8);
if (lVar6 != 0) {
return 2;
}
uVar4 = c4_state_add_error(lVar8,"Failed to handle client updates");
goto LAB_00126038;
}
auVar13 = c4_get_chain_state(*(int4 *)(param_1 + 0x80));
lVar6 = auVar13._0_8_;
lVar8 = param_1 + 0x70;
local_198 = 0;
uStack_190 = 0;
local_188 = 0;
local_178 = 0;
uStack_170 = 0;
local_168 = 0;
uStack_160 = 0;
local_118 = 0;
uStack_110 = 0;
local_128 = 0;
uStack_120 = 0;
if (auVar13._8_4_ == 0) {
local_e8 = 0;
uStack_e0 = 0;
local_d8 = 0;
cVar2 = req_header(lVar8,*(int4 *)(param_1 + 0x80),&local_198);
if (cVar2 == '\0') goto LAB_00125f84;
json_get(local_48,&DAT_00181610);
uVar5 = json_as_uint64();
iVar10 = (int)(uVar5 >> 0xd);
req_client_update(lVar8,iVar10 + -1,1,*(int4 *)(param_1 + 0x80),&local_178,param_6,
local_48[0],uStack_40,local_38);
uVar1 = *(int4 *)(param_1 + 0x80);
puVar11 = &local_168;
uVar5 = (ulong)(iVar10 - 0x15);
local_60[0] = local_48[0];
uStack_58 = uStack_40;
local_50 = local_38;
LAB_00125f75:
bVar3 = req_client_update(lVar8,uVar5,1,uVar1,puVar11,param_6,local_60[0],uStack_58,local_50);
}
else {
uVar5 = (ulong)auVar13._8_4_;
lVar9 = 0;
iVar10 = 0;
do {
iVar10 = iVar10 + (uint)(*(long *)(lVar6 + lVar9) == 0);
lVar9 = lVar9 + 0x30;
} while (uVar5 * 0x30 != lVar9);
if (iVar10 != 0) {
local_140[0] = 0;
local_138 = &local_c8;
local_130 = 0xffffff9c;
puVar12 = (int8 *)(lVar6 + 8);
uStack_150 = 0;
do {
if (puVar12[-1] == 0) {
bprintf(local_140,"\"0x%x\"",0x20,puVar12);
local_128 = *puVar12;
uStack_120 = puVar12[1];
local_118 = puVar12[2];
uStack_110 = puVar12[3];
uStack_150 = (ulong)local_140[0];
break;
}
puVar12 = puVar12 + 6;
uVar5 = uVar5 - 1;
} while (uVar5 != 0);
local_158 = &local_c8;
local_148 = 1;
cVar2 = req_header(lVar8,*(int4 *)(param_1 + 0x80),&local_198);
if (cVar2 != '\0') {
json_get(local_60,&DAT_00181610);
uVar5 = json_as_uint64();
uVar1 = *(int4 *)(param_1 + 0x80);
puVar11 = &local_178;
uVar5 = uVar5 >> 0xd & 0xffffffff;
goto LAB_00125f75;
}
}
LAB_00125f84:
bVar3 = 0;
}
safe_free(lVar6);
if ((((int)local_178 != 0 & bVar3) == 1) &&
(cVar2 = c4_handle_client_updates(param_1,local_178 & 0xffffffff,uStack_170,&local_128),
cVar2 == '\0')) {
pcVar7 = strdup("Failed to handle client updates");
*(char **)(param_1 + 0x78) = pcVar7;
}
if (((bVar3 & (int)local_168 != 0) == 1) &&
(cVar2 = c4_handle_client_updates(param_1,local_168 & 0xffffffff,uStack_160,&local_128),
cVar2 == '\0')) {
pcVar7 = strdup("Failed to handle client updates");
*(char **)(param_1 + 0x78) = pcVar7;
}
if (*(long *)(param_1 + 0x78) != 0) {
return 0xffffffff;
}
lVar8 = c4_state_get_pending_request(lVar8);
if (lVar8 != 0) {
return 2;
}
uVar4 = c4_get_validators(param_1,param_2,param_3);
LAB_00126038:
return (ulong)uVar4;
}
|
|
61,896 |
string_get_tzoffset
|
bluesky950520[P]quickjs/quickjs.c
|
static BOOL string_get_tzoffset(const uint8_t *sp, int *pp, int *tzp, BOOL strict) {
int tz = 0, sgn, hh, mm, p = *pp;
sgn = sp[p++];
if (sgn == '+' || sgn == '-') {
int n = p;
if (!string_get_digits(sp, &p, &hh, 1, 9))
return FALSE;
n = p - n;
if (strict && n != 2 && n != 4)
return FALSE;
while (n > 4) {
n -= 2;
hh /= 100;
}
if (n > 2) {
mm = hh % 100;
hh = hh / 100;
} else {
mm = 0;
if (string_skip_char(sp, &p, ':') /* optional separator */
&& !string_get_digits(sp, &p, &mm, 2, 2))
return FALSE;
}
if (hh > 23 || mm > 59)
return FALSE;
tz = hh * 60 + mm;
if (sgn != '+')
tz = -tz;
} else
if (sgn != 'Z') {
return FALSE;
}
*pp = p;
*tzp = tz;
return TRUE;
}
|
O1
|
c
|
string_get_tzoffset:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
movslq (%rsi), %r11
leal 0x1(%r11), %ebx
movzbl (%rdi,%r11), %r9d
cmpl $0x2b, %r9d
je 0x58139
xorl %eax, %eax
cmpl $0x5a, %r9d
je 0x581f3
cmpl $0x2d, %r9d
jne 0x5820c
movslq %ebx, %r14
leal 0xa(%r11), %r8d
addq %rdi, %r14
xorl %eax, %eax
xorl %r10d, %r10d
movzbl (%r14,%rax), %r15d
leal -0x30(%r15), %ebp
cmpb $0x9, %bpl
ja 0x5816d
leal (%r10,%r10,4), %r10d
leal (%r15,%r10,2), %r10d
addl $-0x30, %r10d
incq %rax
cmpl $0x9, %eax
jne 0x58148
jmp 0x58172
addl %ebx, %eax
movl %eax, %r8d
xorl %eax, %eax
cmpl %ebx, %r8d
cmovlel %ebx, %r8d
jle 0x581f7
movl %r8d, %r14d
subl %ebx, %r14d
testl %ecx, %ecx
je 0x58195
cmpl $0x2, %r14d
je 0x58195
xorl %ebp, %ebp
cmpl $0x4, %r14d
jne 0x581f9
cmpl $0x5, %r14d
jl 0x581ca
movl %r8d, %r14d
subl %r11d, %r14d
incl %r14d
movslq %r10d, %rcx
imulq $0x51eb851f, %rcx, %r10 # imm = 0x51EB851F
movq %r10, %rcx
shrq $0x3f, %rcx
sarq $0x25, %r10
addl %ecx, %r10d
addl $-0x2, %r14d
cmpl $0x6, %r14d
jg 0x581a4
addl $-0x2, %r14d
cmpl $0x3, %r14d
jl 0x58213
movslq %r10d, %rcx
imulq $0x51eb851f, %rcx, %r10 # imm = 0x51EB851F
movq %r10, %rdi
shrq $0x3f, %rdi
sarq $0x25, %r10
addl %edi, %r10d
imull $0x64, %r10d, %edi
subl %edi, %ecx
jmp 0x58282
xorl %ebp, %ebp
jmp 0x58203
xorl %ebp, %ebp
xorl %edi, %edi
movl %r8d, %ebx
testb %dil, %dil
je 0x5820c
movl %ebx, (%rsi)
movl %ebp, (%rdx)
movl $0x1, %eax
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movslq %r8d, %rcx
movb (%rdi,%rcx), %r11b
xorl %ecx, %ecx
cmpb $0x3a, %r11b
sete %cl
addl %ecx, %r8d
xorl %ecx, %ecx
cmpb $0x3a, %r11b
jne 0x58282
movslq %r8d, %rcx
leal 0x2(%rcx), %r11d
addq %rcx, %rdi
xorl %ebx, %ebx
xorl %ecx, %ecx
movzbl (%rdi,%rbx), %r14d
leal -0x30(%r14), %ebp
cmpb $0x9, %bpl
ja 0x5825f
leal (%rcx,%rcx,4), %ecx
leal (%r14,%rcx,2), %ecx
addl $-0x30, %ecx
incq %rbx
cmpl $0x2, %ebx
jne 0x5823c
jmp 0x58265
addl %r8d, %ebx
movl %ebx, %r11d
movl %r11d, %ebx
subl %r8d, %ebx
xorl %ebp, %ebp
movl $0x0, %edi
cmpl $0x2, %ebx
cmovll %ebp, %ecx
cmovgel %r11d, %r8d
jl 0x581fb
xorl %ebp, %ebp
cmpl $0x17, %r10d
jg 0x581f9
cmpl $0x3b, %ecx
jg 0x581f9
imull $0x3c, %r10d, %edi
addl %ecx, %edi
movl %edi, %ebp
negl %ebp
cmpb $0x2b, %r9b
cmovel %edi, %ebp
movb $0x1, %dil
jmp 0x581fb
|
string_get_tzoffset:
push rbp
push r15
push r14
push rbx
movsxd r11, dword ptr [rsi]
lea ebx, [r11+1]
movzx r9d, byte ptr [rdi+r11]
cmp r9d, 2Bh ; '+'
jz short loc_58139
xor eax, eax
cmp r9d, 5Ah ; 'Z'
jz loc_581F3
cmp r9d, 2Dh ; '-'
jnz loc_5820C
loc_58139:
movsxd r14, ebx
lea r8d, [r11+0Ah]
add r14, rdi
xor eax, eax
xor r10d, r10d
loc_58148:
movzx r15d, byte ptr [r14+rax]
lea ebp, [r15-30h]
cmp bpl, 9
ja short loc_5816D
lea r10d, [r10+r10*4]
lea r10d, [r15+r10*2]
add r10d, 0FFFFFFD0h
inc rax
cmp eax, 9
jnz short loc_58148
jmp short loc_58172
loc_5816D:
add eax, ebx
mov r8d, eax
loc_58172:
xor eax, eax
cmp r8d, ebx
cmovle r8d, ebx
jle short loc_581F7
mov r14d, r8d
sub r14d, ebx
test ecx, ecx
jz short loc_58195
cmp r14d, 2
jz short loc_58195
xor ebp, ebp
cmp r14d, 4
jnz short loc_581F9
loc_58195:
cmp r14d, 5
jl short loc_581CA
mov r14d, r8d
sub r14d, r11d
inc r14d
loc_581A4:
movsxd rcx, r10d
imul r10, rcx, 51EB851Fh
mov rcx, r10
shr rcx, 3Fh
sar r10, 25h
add r10d, ecx
add r14d, 0FFFFFFFEh
cmp r14d, 6
jg short loc_581A4
add r14d, 0FFFFFFFEh
loc_581CA:
cmp r14d, 3
jl short loc_58213
movsxd rcx, r10d
imul r10, rcx, 51EB851Fh
mov rdi, r10
shr rdi, 3Fh
sar r10, 25h
add r10d, edi
imul edi, r10d, 64h ; 'd'
sub ecx, edi
jmp loc_58282
loc_581F3:
xor ebp, ebp
jmp short loc_58203
loc_581F7:
xor ebp, ebp
loc_581F9:
xor edi, edi
loc_581FB:
mov ebx, r8d
test dil, dil
jz short loc_5820C
loc_58203:
mov [rsi], ebx
mov [rdx], ebp
mov eax, 1
loc_5820C:
pop rbx
pop r14
pop r15
pop rbp
retn
loc_58213:
movsxd rcx, r8d
mov r11b, [rdi+rcx]
xor ecx, ecx
cmp r11b, 3Ah ; ':'
setz cl
add r8d, ecx
xor ecx, ecx
cmp r11b, 3Ah ; ':'
jnz short loc_58282
movsxd rcx, r8d
lea r11d, [rcx+2]
add rdi, rcx
xor ebx, ebx
xor ecx, ecx
loc_5823C:
movzx r14d, byte ptr [rdi+rbx]
lea ebp, [r14-30h]
cmp bpl, 9
ja short loc_5825F
lea ecx, [rcx+rcx*4]
lea ecx, [r14+rcx*2]
add ecx, 0FFFFFFD0h
inc rbx
cmp ebx, 2
jnz short loc_5823C
jmp short loc_58265
loc_5825F:
add ebx, r8d
mov r11d, ebx
loc_58265:
mov ebx, r11d
sub ebx, r8d
xor ebp, ebp
mov edi, 0
cmp ebx, 2
cmovl ecx, ebp
cmovge r8d, r11d
jl loc_581FB
loc_58282:
xor ebp, ebp
cmp r10d, 17h
jg loc_581F9
cmp ecx, 3Bh ; ';'
jg loc_581F9
imul edi, r10d, 3Ch ; '<'
add edi, ecx
mov ebp, edi
neg ebp
cmp r9b, 2Bh ; '+'
cmovz ebp, edi
mov dil, 1
jmp loc_581FB
|
long long string_get_tzoffset(long long a1, int *a2, int *a3, int a4)
{
long long v4; // r11
int v5; // ebx
int v6; // r9d
long long result; // rax
int v8; // r8d
long long v9; // rax
int v10; // r10d
int v11; // r15d
int v12; // r14d
int v13; // r14d
int v14; // ecx
int v15; // ecx
int v16; // ebp
char v17; // di
char v18; // r11
int v19; // r11d
long long v20; // rdi
long long v21; // rbx
int v22; // r14d
v4 = *a2;
v5 = v4 + 1;
v6 = *(unsigned __int8 *)(a1 + v4);
if ( v6 == 43 )
goto LABEL_4;
result = 0LL;
if ( v6 != 90 )
{
if ( v6 != 45 )
return result;
LABEL_4:
v8 = v4 + 10;
v9 = 0LL;
v10 = 0;
while ( 1 )
{
v11 = *(unsigned __int8 *)(a1 + v5 + v9);
if ( (unsigned __int8)(v11 - 48) > 9u )
break;
v10 = v11 + 10 * v10 - 48;
if ( (_DWORD)++v9 == 9 )
goto LABEL_9;
}
v8 = v5 + v9;
LABEL_9:
result = 0LL;
if ( v8 <= v5 )
{
v8 = v4 + 1;
v16 = 0;
LABEL_21:
v17 = 0;
goto LABEL_22;
}
v12 = v8 - v5;
if ( a4 )
{
if ( v12 != 2 )
{
v16 = 0;
if ( v12 != 4 )
goto LABEL_21;
}
}
if ( v12 >= 5 )
{
v13 = v8 - v4 + 1;
do
{
v10 /= 100;
v13 -= 2;
}
while ( v13 > 6 );
v12 = v13 - 2;
}
if ( v12 < 3 )
{
v18 = *(_BYTE *)(a1 + v8);
v8 += v18 == 58;
v15 = 0;
if ( v18 == 58 )
{
v19 = v8 + 2;
v20 = v8 + a1;
v21 = 0LL;
v15 = 0;
while ( 1 )
{
v22 = *(unsigned __int8 *)(v20 + v21);
if ( (unsigned __int8)(v22 - 48) > 9u )
break;
v15 = v22 + 10 * v15 - 48;
if ( (_DWORD)++v21 == 2 )
goto LABEL_31;
}
v19 = v8 + v21;
LABEL_31:
v16 = 0;
v17 = 0;
if ( v19 - v8 < 2 )
goto LABEL_22;
v8 = v19;
}
}
else
{
v14 = v10;
v10 /= 100;
v15 = v14 - 100 * v10;
}
v16 = 0;
if ( v10 > 23 || v15 > 59 )
goto LABEL_21;
v16 = -(v15 + 60 * v10);
if ( (_BYTE)v6 == 43 )
v16 = v15 + 60 * v10;
v17 = 1;
LABEL_22:
v5 = v8;
if ( !v17 )
return result;
goto LABEL_23;
}
v16 = 0;
LABEL_23:
*a2 = v5;
*a3 = v16;
return 1LL;
}
|
string_get_tzoffset:
PUSH RBP
PUSH R15
PUSH R14
PUSH RBX
MOVSXD R11,dword ptr [RSI]
LEA EBX,[R11 + 0x1]
MOVZX R9D,byte ptr [RDI + R11*0x1]
CMP R9D,0x2b
JZ 0x00158139
XOR EAX,EAX
CMP R9D,0x5a
JZ 0x001581f3
CMP R9D,0x2d
JNZ 0x0015820c
LAB_00158139:
MOVSXD R14,EBX
LEA R8D,[R11 + 0xa]
ADD R14,RDI
XOR EAX,EAX
XOR R10D,R10D
LAB_00158148:
MOVZX R15D,byte ptr [R14 + RAX*0x1]
LEA EBP,[R15 + -0x30]
CMP BPL,0x9
JA 0x0015816d
LEA R10D,[R10 + R10*0x4]
LEA R10D,[R15 + R10*0x2]
ADD R10D,-0x30
INC RAX
CMP EAX,0x9
JNZ 0x00158148
JMP 0x00158172
LAB_0015816d:
ADD EAX,EBX
MOV R8D,EAX
LAB_00158172:
XOR EAX,EAX
CMP R8D,EBX
CMOVLE R8D,EBX
JLE 0x001581f7
MOV R14D,R8D
SUB R14D,EBX
TEST ECX,ECX
JZ 0x00158195
CMP R14D,0x2
JZ 0x00158195
XOR EBP,EBP
CMP R14D,0x4
JNZ 0x001581f9
LAB_00158195:
CMP R14D,0x5
JL 0x001581ca
MOV R14D,R8D
SUB R14D,R11D
INC R14D
LAB_001581a4:
MOVSXD RCX,R10D
IMUL R10,RCX,0x51eb851f
MOV RCX,R10
SHR RCX,0x3f
SAR R10,0x25
ADD R10D,ECX
ADD R14D,-0x2
CMP R14D,0x6
JG 0x001581a4
ADD R14D,-0x2
LAB_001581ca:
CMP R14D,0x3
JL 0x00158213
MOVSXD RCX,R10D
IMUL R10,RCX,0x51eb851f
MOV RDI,R10
SHR RDI,0x3f
SAR R10,0x25
ADD R10D,EDI
IMUL EDI,R10D,0x64
SUB ECX,EDI
JMP 0x00158282
LAB_001581f3:
XOR EBP,EBP
JMP 0x00158203
LAB_001581f7:
XOR EBP,EBP
LAB_001581f9:
XOR EDI,EDI
LAB_001581fb:
MOV EBX,R8D
TEST DIL,DIL
JZ 0x0015820c
LAB_00158203:
MOV dword ptr [RSI],EBX
MOV dword ptr [RDX],EBP
MOV EAX,0x1
LAB_0015820c:
POP RBX
POP R14
POP R15
POP RBP
RET
LAB_00158213:
MOVSXD RCX,R8D
MOV R11B,byte ptr [RDI + RCX*0x1]
XOR ECX,ECX
CMP R11B,0x3a
SETZ CL
ADD R8D,ECX
XOR ECX,ECX
CMP R11B,0x3a
JNZ 0x00158282
MOVSXD RCX,R8D
LEA R11D,[RCX + 0x2]
ADD RDI,RCX
XOR EBX,EBX
XOR ECX,ECX
LAB_0015823c:
MOVZX R14D,byte ptr [RDI + RBX*0x1]
LEA EBP,[R14 + -0x30]
CMP BPL,0x9
JA 0x0015825f
LEA ECX,[RCX + RCX*0x4]
LEA ECX,[R14 + RCX*0x2]
ADD ECX,-0x30
INC RBX
CMP EBX,0x2
JNZ 0x0015823c
JMP 0x00158265
LAB_0015825f:
ADD EBX,R8D
MOV R11D,EBX
LAB_00158265:
MOV EBX,R11D
SUB EBX,R8D
XOR EBP,EBP
MOV EDI,0x0
CMP EBX,0x2
CMOVL ECX,EBP
CMOVGE R8D,R11D
JL 0x001581fb
LAB_00158282:
XOR EBP,EBP
CMP R10D,0x17
JG 0x001581f9
CMP ECX,0x3b
JG 0x001581f9
IMUL EDI,R10D,0x3c
ADD EDI,ECX
MOV EBP,EDI
NEG EBP
CMP R9B,0x2b
CMOVZ EBP,EDI
MOV DIL,0x1
JMP 0x001581fb
|
int8 string_get_tzoffset(long param_1,int *param_2,int *param_3,int param_4)
{
char cVar1;
byte bVar2;
bool bVar3;
long lVar4;
int iVar5;
int iVar6;
int iVar7;
int iVar8;
int iVar9;
iVar9 = *param_2;
iVar5 = iVar9 + 1;
cVar1 = *(char *)(param_1 + iVar9);
if (cVar1 != '+') {
if (cVar1 == 'Z') {
iVar6 = 0;
goto LAB_00158203;
}
if (cVar1 != '-') {
return 0;
}
}
iVar6 = iVar9 + 10;
lVar4 = 0;
iVar7 = 0;
do {
bVar2 = *(byte *)(iVar5 + param_1 + lVar4);
if (9 < (byte)(bVar2 - 0x30)) {
iVar6 = (int)lVar4 + iVar5;
break;
}
iVar7 = (uint)bVar2 + iVar7 * 10 + -0x30;
lVar4 = lVar4 + 1;
} while ((int)lVar4 != 9);
if ((iVar5 < iVar6) &&
(((iVar8 = iVar6 - iVar5, param_4 == 0 || (iVar8 == 2)) || (iVar5 = iVar6, iVar8 == 4)))) {
if (4 < iVar8) {
iVar9 = (iVar6 - iVar9) + 1;
do {
iVar8 = iVar9;
iVar7 = iVar7 / 100;
iVar9 = iVar8 + -2;
} while (6 < iVar9);
iVar8 = iVar8 + -4;
}
if (iVar8 < 3) {
iVar5 = iVar6 + (uint)(*(char *)(param_1 + iVar6) == ':');
iVar8 = 0;
iVar9 = iVar5;
if (*(char *)(param_1 + iVar6) != ':') goto LAB_00158282;
iVar9 = iVar5 + 2;
lVar4 = 0;
iVar8 = 0;
do {
bVar2 = *(byte *)(param_1 + iVar5 + lVar4);
if (9 < (byte)(bVar2 - 0x30)) {
iVar9 = (int)lVar4 + iVar5;
break;
}
iVar8 = (uint)bVar2 + iVar8 * 10 + -0x30;
lVar4 = lVar4 + 1;
} while ((int)lVar4 != 2);
iVar6 = 0;
bVar3 = false;
if (1 < iVar9 - iVar5) goto LAB_00158282;
}
else {
iVar8 = iVar7 % 100;
iVar7 = iVar7 / 100;
iVar9 = iVar6;
LAB_00158282:
iVar5 = iVar9;
if ((0x17 < iVar7) || (0x3b < iVar8)) goto LAB_001581f9;
iVar8 = iVar7 * 0x3c + iVar8;
iVar6 = -iVar8;
if (cVar1 == '+') {
iVar6 = iVar8;
}
bVar3 = true;
}
}
else {
LAB_001581f9:
iVar6 = 0;
bVar3 = false;
}
if (!bVar3) {
return 0;
}
LAB_00158203:
*param_2 = iVar5;
*param_3 = iVar6;
return 1;
}
|
|
61,897 |
string_get_tzoffset
|
bluesky950520[P]quickjs/quickjs.c
|
static BOOL string_get_tzoffset(const uint8_t *sp, int *pp, int *tzp, BOOL strict) {
int tz = 0, sgn, hh, mm, p = *pp;
sgn = sp[p++];
if (sgn == '+' || sgn == '-') {
int n = p;
if (!string_get_digits(sp, &p, &hh, 1, 9))
return FALSE;
n = p - n;
if (strict && n != 2 && n != 4)
return FALSE;
while (n > 4) {
n -= 2;
hh /= 100;
}
if (n > 2) {
mm = hh % 100;
hh = hh / 100;
} else {
mm = 0;
if (string_skip_char(sp, &p, ':') /* optional separator */
&& !string_get_digits(sp, &p, &mm, 2, 2))
return FALSE;
}
if (hh > 23 || mm > 59)
return FALSE;
tz = hh * 60 + mm;
if (sgn != '+')
tz = -tz;
} else
if (sgn != 'Z') {
return FALSE;
}
*pp = p;
*tzp = tz;
return TRUE;
}
|
O2
|
c
|
string_get_tzoffset:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movl %ecx, %ebp
movq %rsi, %r15
movq %rdi, %r12
movslq (%rsi), %rax
leal 0x1(%rax), %r14d
movl %r14d, 0x4(%rsp)
movzbl (%rdi,%rax), %r13d
xorl %ebx, %ebx
cmpl $0x2b, %r13d
je 0x4b524
cmpl $0x5a, %r13d
je 0x4b5e8
cmpl $0x2d, %r13d
jne 0x4b5f0
movq %rdx, 0x10(%rsp)
leaq 0x4(%rsp), %rsi
leaq 0xc(%rsp), %rdx
pushq $0x1
popq %rcx
pushq $0x9
popq %r8
movq %r12, %rdi
callq 0x4b41e
testl %eax, %eax
je 0x4b5f0
movslq 0x4(%rsp), %rcx
movl %ecx, %esi
subl %r14d, %esi
testl %ebp, %ebp
je 0x4b566
cmpl $0x2, %esi
je 0x4b566
cmpl $0x4, %esi
jne 0x4b5f0
movl 0xc(%rsp), %ebp
pushq $0x64
popq %rdi
cmpl $0x5, %esi
jl 0x4b57e
addl $-0x2, %esi
movl %ebp, %eax
cltd
idivl %edi
movl %eax, %ebp
jmp 0x4b56d
cmpl $0x3, %esi
jl 0x4b58c
movl %ebp, %eax
cltd
idivl %edi
movl %eax, %ebp
jmp 0x4b5be
andl $0x0, 0x8(%rsp)
xorl %edx, %edx
cmpb $0x3a, (%r12,%rcx)
jne 0x4b5be
incl %ecx
leaq 0x4(%rsp), %rsi
movl %ecx, (%rsi)
leaq 0x8(%rsp), %rdx
pushq $0x2
popq %rcx
movq %r12, %rdi
movl %ecx, %r8d
callq 0x4b41e
testl %eax, %eax
je 0x4b601
movl 0x8(%rsp), %edx
cmpl $0x18, %ebp
setge %al
cmpl $0x3c, %edx
setge %cl
orb %al, %cl
jne 0x4b5f0
imull $0x3c, %ebp, %eax
addl %edx, %eax
movl %eax, %ebx
negl %ebx
cmpb $0x2b, %r13b
cmovel %eax, %ebx
movl 0x4(%rsp), %r14d
movq 0x10(%rsp), %rdx
movl %r14d, (%r15)
movl %ebx, (%rdx)
pushq $0x1
popq %rbx
movl %ebx, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
xorl %ebx, %ebx
jmp 0x4b5f0
|
string_get_tzoffset:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 18h
mov ebp, ecx
mov r15, rsi
mov r12, rdi
movsxd rax, dword ptr [rsi]
lea r14d, [rax+1]
mov [rsp+48h+var_44], r14d
movzx r13d, byte ptr [rdi+rax]
xor ebx, ebx
cmp r13d, 2Bh ; '+'
jz short loc_4B524
cmp r13d, 5Ah ; 'Z'
jz loc_4B5E8
cmp r13d, 2Dh ; '-'
jnz loc_4B5F0
loc_4B524:
mov [rsp+48h+var_38], rdx
lea rsi, [rsp+48h+var_44]
lea rdx, [rsp+48h+var_3C]
push 1
pop rcx
push 9
pop r8
mov rdi, r12
call string_get_digits
test eax, eax
jz loc_4B5F0
movsxd rcx, [rsp+48h+var_44]
mov esi, ecx
sub esi, r14d
test ebp, ebp
jz short loc_4B566
cmp esi, 2
jz short loc_4B566
cmp esi, 4
jnz loc_4B5F0
loc_4B566:
mov ebp, [rsp+48h+var_3C]
push 64h ; 'd'
pop rdi
loc_4B56D:
cmp esi, 5
jl short loc_4B57E
add esi, 0FFFFFFFEh
mov eax, ebp
cdq
idiv edi
mov ebp, eax
jmp short loc_4B56D
loc_4B57E:
cmp esi, 3
jl short loc_4B58C
mov eax, ebp
cdq
idiv edi
mov ebp, eax
jmp short loc_4B5BE
loc_4B58C:
and [rsp+48h+var_40], 0
xor edx, edx
cmp byte ptr [r12+rcx], 3Ah ; ':'
jnz short loc_4B5BE
inc ecx
lea rsi, [rsp+48h+var_44]
mov [rsi], ecx
lea rdx, [rsp+48h+var_40]
push 2
pop rcx
mov rdi, r12
mov r8d, ecx
call string_get_digits
test eax, eax
jz short loc_4B601
mov edx, [rsp+48h+var_40]
loc_4B5BE:
cmp ebp, 18h
setnl al
cmp edx, 3Ch ; '<'
setnl cl
or cl, al
jnz short loc_4B5F0
imul eax, ebp, 3Ch ; '<'
add eax, edx
mov ebx, eax
neg ebx
cmp r13b, 2Bh ; '+'
cmovz ebx, eax
mov r14d, [rsp+48h+var_44]
mov rdx, [rsp+48h+var_38]
loc_4B5E8:
mov [r15], r14d
mov [rdx], ebx
push 1
pop rbx
loc_4B5F0:
mov eax, ebx
add rsp, 18h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_4B601:
xor ebx, ebx
jmp short loc_4B5F0
|
long long string_get_tzoffset(long long a1, int *a2, unsigned int *a3, int a4)
{
long long v6; // rax
int v7; // r14d
int v8; // r13d
unsigned int v9; // ebx
int v10; // esi
int v11; // ebp
int v12; // edx
int v14; // [rsp+4h] [rbp-44h] BYREF
int v15; // [rsp+8h] [rbp-40h] BYREF
int v16; // [rsp+Ch] [rbp-3Ch] BYREF
unsigned int *v17; // [rsp+10h] [rbp-38h]
v6 = *a2;
v7 = v6 + 1;
v14 = v6 + 1;
v8 = *(unsigned __int8 *)(a1 + v6);
v9 = 0;
switch ( v8 )
{
case '+':
goto LABEL_4;
case 'Z':
LABEL_20:
*a2 = v7;
*a3 = v9;
return 1;
case '-':
LABEL_4:
v17 = a3;
if ( (unsigned int)string_get_digits(a1, &v14, &v16, 1, 9) )
{
v10 = v14 - v7;
if ( !a4 || v10 == 2 || v10 == 4 )
{
v11 = v16;
while ( v10 >= 5 )
{
v10 -= 2;
v11 /= 100;
}
if ( v10 < 3 )
{
v15 = 0;
v12 = 0;
if ( *(_BYTE *)(a1 + v14) == 58 )
{
++v14;
if ( !(unsigned int)string_get_digits(a1, &v14, &v15, 2, 2) )
return 0;
v12 = v15;
}
}
else
{
v12 = v11 % 100;
v11 /= 100;
}
if ( v11 < 24 && v12 < 60 )
{
v9 = -(v12 + 60 * v11);
if ( (_BYTE)v8 == 43 )
v9 = v12 + 60 * v11;
v7 = v14;
a3 = v17;
goto LABEL_20;
}
}
}
break;
}
return v9;
}
|
string_get_tzoffset:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x18
MOV EBP,ECX
MOV R15,RSI
MOV R12,RDI
MOVSXD RAX,dword ptr [RSI]
LEA R14D,[RAX + 0x1]
MOV dword ptr [RSP + 0x4],R14D
MOVZX R13D,byte ptr [RDI + RAX*0x1]
XOR EBX,EBX
CMP R13D,0x2b
JZ 0x0014b524
CMP R13D,0x5a
JZ 0x0014b5e8
CMP R13D,0x2d
JNZ 0x0014b5f0
LAB_0014b524:
MOV qword ptr [RSP + 0x10],RDX
LEA RSI,[RSP + 0x4]
LEA RDX,[RSP + 0xc]
PUSH 0x1
POP RCX
PUSH 0x9
POP R8
MOV RDI,R12
CALL 0x0014b41e
TEST EAX,EAX
JZ 0x0014b5f0
MOVSXD RCX,dword ptr [RSP + 0x4]
MOV ESI,ECX
SUB ESI,R14D
TEST EBP,EBP
JZ 0x0014b566
CMP ESI,0x2
JZ 0x0014b566
CMP ESI,0x4
JNZ 0x0014b5f0
LAB_0014b566:
MOV EBP,dword ptr [RSP + 0xc]
PUSH 0x64
POP RDI
LAB_0014b56d:
CMP ESI,0x5
JL 0x0014b57e
ADD ESI,-0x2
MOV EAX,EBP
CDQ
IDIV EDI
MOV EBP,EAX
JMP 0x0014b56d
LAB_0014b57e:
CMP ESI,0x3
JL 0x0014b58c
MOV EAX,EBP
CDQ
IDIV EDI
MOV EBP,EAX
JMP 0x0014b5be
LAB_0014b58c:
AND dword ptr [RSP + 0x8],0x0
XOR EDX,EDX
CMP byte ptr [R12 + RCX*0x1],0x3a
JNZ 0x0014b5be
INC ECX
LEA RSI,[RSP + 0x4]
MOV dword ptr [RSI],ECX
LEA RDX,[RSP + 0x8]
PUSH 0x2
POP RCX
MOV RDI,R12
MOV R8D,ECX
CALL 0x0014b41e
TEST EAX,EAX
JZ 0x0014b601
MOV EDX,dword ptr [RSP + 0x8]
LAB_0014b5be:
CMP EBP,0x18
SETGE AL
CMP EDX,0x3c
SETGE CL
OR CL,AL
JNZ 0x0014b5f0
IMUL EAX,EBP,0x3c
ADD EAX,EDX
MOV EBX,EAX
NEG EBX
CMP R13B,0x2b
CMOVZ EBX,EAX
MOV R14D,dword ptr [RSP + 0x4]
MOV RDX,qword ptr [RSP + 0x10]
LAB_0014b5e8:
MOV dword ptr [R15],R14D
MOV dword ptr [RDX],EBX
PUSH 0x1
POP RBX
LAB_0014b5f0:
MOV EAX,EBX
ADD RSP,0x18
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_0014b601:
XOR EBX,EBX
JMP 0x0014b5f0
|
int8 string_get_tzoffset(long param_1,int *param_2,int *param_3,int param_4)
{
char cVar1;
int iVar2;
int iVar3;
int iVar4;
int local_44;
int local_40;
int local_3c;
int *local_38;
iVar4 = *param_2 + 1;
cVar1 = *(char *)(param_1 + *param_2);
local_44 = iVar4;
if (cVar1 != '+') {
iVar2 = 0;
if (cVar1 == 'Z') goto LAB_0014b5e8;
if (cVar1 != '-') {
return 0;
}
}
local_38 = param_3;
iVar2 = string_get_digits(param_1,&local_44,&local_3c,1,9);
if (iVar2 == 0) {
return 0;
}
iVar4 = local_44 - iVar4;
iVar2 = local_3c;
if (((param_4 != 0) && (iVar4 != 2)) && (iVar4 != 4)) {
return 0;
}
for (; 4 < iVar4; iVar4 = iVar4 + -2) {
iVar2 = iVar2 / 100;
}
if (iVar4 < 3) {
local_40 = 0;
iVar4 = 0;
if (*(char *)(param_1 + local_44) == ':') {
local_44 = local_44 + 1;
iVar3 = string_get_digits(param_1,&local_44,&local_40,2,2);
iVar4 = local_40;
if (iVar3 == 0) {
return 0;
}
}
}
else {
iVar4 = iVar2 % 100;
iVar2 = iVar2 / 100;
}
if (0x3b < iVar4 || 0x17 < iVar2) {
return 0;
}
iVar4 = iVar2 * 0x3c + iVar4;
param_3 = local_38;
iVar2 = -iVar4;
if (cVar1 == '+') {
iVar2 = iVar4;
}
LAB_0014b5e8:
*param_2 = local_44;
*param_3 = iVar2;
return 1;
}
|
|
61,898 |
bool google::protobuf::safe_parse_positive_int<unsigned int>(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, unsigned int*)
|
aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/stubs/strutil.cc
|
bool safe_parse_positive_int(std::string text, IntType *value_p) {
int base = 10;
IntType value = 0;
const IntType vmax = std::numeric_limits<IntType>::max();
assert(vmax > 0);
assert(vmax >= base);
const IntType vmax_over_base = vmax / base;
const char* start = text.data();
const char* end = start + text.size();
// loop over digits
for (; start < end; ++start) {
unsigned char c = static_cast<unsigned char>(start[0]);
int digit = c - '0';
if (digit >= base || digit < 0) {
*value_p = value;
return false;
}
if (value > vmax_over_base) {
*value_p = vmax;
return false;
}
value *= base;
if (value > vmax - digit) {
*value_p = vmax;
return false;
}
value += digit;
}
*value_p = value;
return true;
}
|
O0
|
cpp
|
bool google::protobuf::safe_parse_positive_int<unsigned int>(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, unsigned int*):
subq $0x68, %rsp
movq %rdi, 0x8(%rsp)
movq %rdi, 0x58(%rsp)
movq %rsi, 0x50(%rsp)
movl $0xa, 0x4c(%rsp)
movq $0x0, 0x40(%rsp)
movq $-0x1, 0x38(%rsp)
movslq 0x4c(%rsp), %rcx
movq $-0x1, %rax
xorl %edx, %edx
divq %rcx
movq %rax, 0x30(%rsp)
callq 0x174a0
movq 0x8(%rsp), %rdi
movq %rax, 0x28(%rsp)
movq 0x28(%rsp), %rax
movq %rax, 0x10(%rsp)
callq 0x147d0
movq %rax, %rcx
movq 0x10(%rsp), %rax
addq %rcx, %rax
movq %rax, 0x20(%rsp)
movq 0x28(%rsp), %rax
cmpq 0x20(%rsp), %rax
jae 0x31ded
movq 0x28(%rsp), %rax
movb (%rax), %al
movb %al, 0x1f(%rsp)
movzbl 0x1f(%rsp), %eax
subl $0x30, %eax
movl %eax, 0x18(%rsp)
movl 0x18(%rsp), %eax
cmpl 0x4c(%rsp), %eax
jge 0x31d59
cmpl $0x0, 0x18(%rsp)
jge 0x31d70
movq 0x40(%rsp), %rcx
movq 0x50(%rsp), %rax
movq %rcx, (%rax)
movb $0x0, 0x67(%rsp)
jmp 0x31dff
movq 0x40(%rsp), %rax
cmpq 0x30(%rsp), %rax
jbe 0x31d8f
movq 0x50(%rsp), %rax
movq $-0x1, (%rax)
movb $0x0, 0x67(%rsp)
jmp 0x31dff
movslq 0x4c(%rsp), %rax
imulq 0x40(%rsp), %rax
movq %rax, 0x40(%rsp)
movq 0x40(%rsp), %rax
movslq 0x18(%rsp), %rdx
movq $-0x1, %rcx
subq %rdx, %rcx
cmpq %rcx, %rax
jbe 0x31dcb
movq 0x50(%rsp), %rax
movq $-0x1, (%rax)
movb $0x0, 0x67(%rsp)
jmp 0x31dff
movslq 0x18(%rsp), %rax
addq 0x40(%rsp), %rax
movq %rax, 0x40(%rsp)
movq 0x28(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x28(%rsp)
jmp 0x31d21
movq 0x40(%rsp), %rcx
movq 0x50(%rsp), %rax
movq %rcx, (%rax)
movb $0x1, 0x67(%rsp)
movb 0x67(%rsp), %al
andb $0x1, %al
addq $0x68, %rsp
retq
nopw (%rax,%rax)
|
_ZN6google8protobuf23safe_parse_positive_intImEEbNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEPT_:
sub rsp, 68h
mov [rsp+68h+var_60], rdi
mov [rsp+68h+var_10], rdi
mov [rsp+68h+var_18], rsi
mov [rsp+68h+var_1C], 0Ah
mov [rsp+68h+var_28], 0
mov [rsp+68h+var_30], 0FFFFFFFFFFFFFFFFh
movsxd rcx, [rsp+68h+var_1C]
mov rax, 0FFFFFFFFFFFFFFFFh
xor edx, edx
div rcx
mov [rsp+68h+var_38], rax
call _ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE4dataEv; std::string::data(void)
mov rdi, [rsp+68h+var_60]
mov [rsp+68h+var_40], rax
mov rax, [rsp+68h+var_40]
mov [rsp+68h+var_58], rax
call _ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE4sizeEv; std::string::size(void)
mov rcx, rax
mov rax, [rsp+68h+var_58]
add rax, rcx
mov [rsp+68h+var_48], rax
loc_31D21:
mov rax, [rsp+68h+var_40]
cmp rax, [rsp+68h+var_48]
jnb loc_31DED
mov rax, [rsp+68h+var_40]
mov al, [rax]
mov [rsp+68h+var_49], al
movzx eax, [rsp+68h+var_49]
sub eax, 30h ; '0'
mov [rsp+68h+var_50], eax
mov eax, [rsp+68h+var_50]
cmp eax, [rsp+68h+var_1C]
jge short loc_31D59
cmp [rsp+68h+var_50], 0
jge short loc_31D70
loc_31D59:
mov rcx, [rsp+68h+var_28]
mov rax, [rsp+68h+var_18]
mov [rax], rcx
mov [rsp+68h+var_1], 0
jmp loc_31DFF
loc_31D70:
mov rax, [rsp+68h+var_28]
cmp rax, [rsp+68h+var_38]
jbe short loc_31D8F
mov rax, [rsp+68h+var_18]
mov qword ptr [rax], 0FFFFFFFFFFFFFFFFh
mov [rsp+68h+var_1], 0
jmp short loc_31DFF
loc_31D8F:
movsxd rax, [rsp+68h+var_1C]
imul rax, [rsp+68h+var_28]
mov [rsp+68h+var_28], rax
mov rax, [rsp+68h+var_28]
movsxd rdx, [rsp+68h+var_50]
mov rcx, 0FFFFFFFFFFFFFFFFh
sub rcx, rdx
cmp rax, rcx
jbe short loc_31DCB
mov rax, [rsp+68h+var_18]
mov qword ptr [rax], 0FFFFFFFFFFFFFFFFh
mov [rsp+68h+var_1], 0
jmp short loc_31DFF
loc_31DCB:
movsxd rax, [rsp+68h+var_50]
add rax, [rsp+68h+var_28]
mov [rsp+68h+var_28], rax
mov rax, [rsp+68h+var_40]
add rax, 1
mov [rsp+68h+var_40], rax
jmp loc_31D21
loc_31DED:
mov rcx, [rsp+68h+var_28]
mov rax, [rsp+68h+var_18]
mov [rax], rcx
mov [rsp+68h+var_1], 1
loc_31DFF:
mov al, [rsp+68h+var_1]
and al, 1
add rsp, 68h
retn
|
char google::protobuf::safe_parse_positive_int<unsigned long>(long long a1, unsigned long long *a2)
{
int v3; // [rsp+18h] [rbp-50h]
unsigned __int8 *v4; // [rsp+20h] [rbp-48h]
unsigned __int8 *v5; // [rsp+28h] [rbp-40h]
unsigned long long v6; // [rsp+40h] [rbp-28h]
unsigned long long v7; // [rsp+40h] [rbp-28h]
v6 = 0LL;
v5 = (unsigned __int8 *)std::string::data(a1);
v4 = &v5[std::string::size(a1)];
while ( v5 < v4 )
{
v3 = *v5 - 48;
if ( (unsigned int)v3 >= 0xA )
{
*a2 = v6;
return 0;
}
if ( v6 > 0x1999999999999999LL )
{
*a2 = -1LL;
return 0;
}
v7 = 10 * v6;
if ( v7 > -1LL - v3 )
{
*a2 = -1LL;
return 0;
}
v6 = v7 + v3;
++v5;
}
*a2 = v6;
return 1;
}
|
safe_parse_positive_int<unsigned_long>:
SUB RSP,0x68
MOV qword ptr [RSP + 0x8],RDI
MOV qword ptr [RSP + 0x58],RDI
MOV qword ptr [RSP + 0x50],RSI
MOV dword ptr [RSP + 0x4c],0xa
MOV qword ptr [RSP + 0x40],0x0
MOV qword ptr [RSP + 0x38],-0x1
MOVSXD RCX,dword ptr [RSP + 0x4c]
MOV RAX,-0x1
XOR EDX,EDX
DIV RCX
MOV qword ptr [RSP + 0x30],RAX
CALL 0x001174a0
MOV RDI,qword ptr [RSP + 0x8]
MOV qword ptr [RSP + 0x28],RAX
MOV RAX,qword ptr [RSP + 0x28]
MOV qword ptr [RSP + 0x10],RAX
CALL 0x001147d0
MOV RCX,RAX
MOV RAX,qword ptr [RSP + 0x10]
ADD RAX,RCX
MOV qword ptr [RSP + 0x20],RAX
LAB_00131d21:
MOV RAX,qword ptr [RSP + 0x28]
CMP RAX,qword ptr [RSP + 0x20]
JNC 0x00131ded
MOV RAX,qword ptr [RSP + 0x28]
MOV AL,byte ptr [RAX]
MOV byte ptr [RSP + 0x1f],AL
MOVZX EAX,byte ptr [RSP + 0x1f]
SUB EAX,0x30
MOV dword ptr [RSP + 0x18],EAX
MOV EAX,dword ptr [RSP + 0x18]
CMP EAX,dword ptr [RSP + 0x4c]
JGE 0x00131d59
CMP dword ptr [RSP + 0x18],0x0
JGE 0x00131d70
LAB_00131d59:
MOV RCX,qword ptr [RSP + 0x40]
MOV RAX,qword ptr [RSP + 0x50]
MOV qword ptr [RAX],RCX
MOV byte ptr [RSP + 0x67],0x0
JMP 0x00131dff
LAB_00131d70:
MOV RAX,qword ptr [RSP + 0x40]
CMP RAX,qword ptr [RSP + 0x30]
JBE 0x00131d8f
MOV RAX,qword ptr [RSP + 0x50]
MOV qword ptr [RAX],-0x1
MOV byte ptr [RSP + 0x67],0x0
JMP 0x00131dff
LAB_00131d8f:
MOVSXD RAX,dword ptr [RSP + 0x4c]
IMUL RAX,qword ptr [RSP + 0x40]
MOV qword ptr [RSP + 0x40],RAX
MOV RAX,qword ptr [RSP + 0x40]
MOVSXD RDX,dword ptr [RSP + 0x18]
MOV RCX,-0x1
SUB RCX,RDX
CMP RAX,RCX
JBE 0x00131dcb
MOV RAX,qword ptr [RSP + 0x50]
MOV qword ptr [RAX],-0x1
MOV byte ptr [RSP + 0x67],0x0
JMP 0x00131dff
LAB_00131dcb:
MOVSXD RAX,dword ptr [RSP + 0x18]
ADD RAX,qword ptr [RSP + 0x40]
MOV qword ptr [RSP + 0x40],RAX
MOV RAX,qword ptr [RSP + 0x28]
ADD RAX,0x1
MOV qword ptr [RSP + 0x28],RAX
JMP 0x00131d21
LAB_00131ded:
MOV RCX,qword ptr [RSP + 0x40]
MOV RAX,qword ptr [RSP + 0x50]
MOV qword ptr [RAX],RCX
MOV byte ptr [RSP + 0x67],0x1
LAB_00131dff:
MOV AL,byte ptr [RSP + 0x67]
AND AL,0x1
ADD RSP,0x68
RET
|
/* bool google::protobuf::safe_parse_positive_int<unsigned long>(std::__cxx11::string, unsigned
long*) */
bool google::protobuf::safe_parse_positive_int<unsigned_long>(string *param_1,ulong *param_2)
{
int iVar1;
long lVar2;
byte *pbVar3;
byte *local_40;
ulong local_28;
local_28 = 0;
local_40 = (byte *)std::__cxx11::string::data(param_1);
lVar2 = std::__cxx11::string::size(param_1);
pbVar3 = local_40 + lVar2;
while( true ) {
if (pbVar3 <= local_40) {
*param_2 = local_28;
return true;
}
iVar1 = *local_40 - 0x30;
if ((9 < iVar1) || (iVar1 < 0)) {
*param_2 = local_28;
return false;
}
if (SUB168((ZEXT816(0) << 0x40 | ZEXT816(0xffffffffffffffff)) / ZEXT816(10),0) < local_28) {
*param_2 = 0xffffffffffffffff;
return false;
}
if (-(long)iVar1 - 1U < local_28 * 10) break;
local_28 = (long)iVar1 + local_28 * 10;
local_40 = local_40 + 1;
}
*param_2 = 0xffffffffffffffff;
return false;
}
|
|
61,899 |
add_pin
|
eloqsql/storage/maria/ma_pagecache.c
|
static void add_pin(PAGECACHE_BLOCK_LINK *block)
{
DBUG_ENTER("add_pin");
DBUG_PRINT("enter", ("block: %p pins: %u", block, block->pins));
PCBLOCK_INFO(block);
block->pins++;
#ifndef DBUG_OFF
{
PAGECACHE_PIN_INFO *info=
(PAGECACHE_PIN_INFO *)my_malloc(PSI_INSTRUMENT_ME, sizeof(PAGECACHE_PIN_INFO), MYF(0));
info->thread= my_thread_var;
info_link(&block->pin_list, info);
}
#endif
DBUG_VOID_RETURN;
}
|
O0
|
c
|
add_pin:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
jmp 0x5c12a
jmp 0x5c12c
jmp 0x5c12e
movq -0x8(%rbp), %rax
movl 0x64(%rax), %ecx
addl $0x1, %ecx
movl %ecx, 0x64(%rax)
jmp 0x5c13d
popq %rbp
retq
nop
|
add_pin:
push rbp
mov rbp, rsp
mov [rbp+var_8], rdi
jmp short $+2
loc_5C12A:
jmp short $+2
loc_5C12C:
jmp short $+2
loc_5C12E:
mov rax, [rbp+var_8]
mov ecx, [rax+64h]
add ecx, 1
mov [rax+64h], ecx
jmp short $+2
loc_5C13D:
pop rbp
retn
|
long long add_pin(long long a1)
{
long long result; // rax
result = a1;
++*(_DWORD *)(a1 + 100);
return result;
}
|
add_pin:
PUSH RBP
MOV RBP,RSP
MOV qword ptr [RBP + -0x8],RDI
JMP 0x0015c12a
LAB_0015c12a:
JMP 0x0015c12c
LAB_0015c12c:
JMP 0x0015c12e
LAB_0015c12e:
MOV RAX,qword ptr [RBP + -0x8]
MOV ECX,dword ptr [RAX + 0x64]
ADD ECX,0x1
MOV dword ptr [RAX + 0x64],ECX
JMP 0x0015c13d
LAB_0015c13d:
POP RBP
RET
|
void add_pin(long param_1)
{
*(int *)(param_1 + 100) = *(int *)(param_1 + 100) + 1;
return;
}
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.