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
|
---|---|---|---|---|---|---|---|---|---|---|---|
6,300 | 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&) | monkey531[P]llama/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 0x63b3d
movq 0x8(%r14), %rax
movq %rsi, %rdi
movq %rax, %rsi
addq $0x30, %rsp
popq %rbx
popq %r14
popq %rbp
jmp 0x234c0
pushq $0x20
popq %rdi
callq 0x23450
movq %rax, %rbx
movq %r14, %rdi
callq 0x42f88
leaq 0x8(%rsp), %rdx
movq %rax, (%rdx)
leaq 0x4f1be(%rip), %rsi # 0xb2d1d
leaq 0x10(%rsp), %rdi
callq 0x6304b
movb $0x1, %bpl
leaq 0x10(%rsp), %rdx
movq %rbx, %rdi
movl $0x12e, %esi # imm = 0x12E
movq %r14, %rcx
callq 0x62f5e
xorl %ebp, %ebp
leaq 0x963be(%rip), %rsi # 0xf9f48
leaq -0x24079(%rip), %rdx # 0x3fb18
movq %rbx, %rdi
callq 0x23ef0
movq %rax, %r14
leaq 0x10(%rsp), %rdi
callq 0x241b8
testb %bpl, %bpl
jne 0x63bb0
jmp 0x63bb8
movq %rax, %r14
movq %rbx, %rdi
callq 0x23680
movq %r14, %rdi
callq 0x23f80
| _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_63B3D
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_63B3D:
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]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
test bpl, bpl
jnz short loc_63BB0
jmp short loc_63BB8
mov r14, rax
loc_63BB0:
mov rdi, rbx; void *
call ___cxa_free_exception
loc_63BB8:
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
const char *v4; // [rsp+8h] [rbp-40h] BYREF
_BYTE v5[56]; // [rsp+10h] [rbp-38h] BYREF
if ( *(_BYTE *)a1 != 3 )
{
exception = (nlohmann::json_abi_v3_11_3::detail::type_error *)__cxa_allocate_exception(0x20uLL);
v4 = nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::type_name((unsigned __int8 *)a1);
nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[29],char const*>(
(long long)v5,
(long long)"type must be string, but is ",
&v4);
ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_(
exception,
302,
(long long)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);
}
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 0x00163b3d
MOV RAX,qword ptr [R14 + 0x8]
MOV RDI,RSI
MOV RSI,RAX
ADD RSP,0x30
POP RBX
POP R14
POP RBP
JMP 0x001234c0
LAB_00163b3d:
PUSH 0x20
POP RDI
CALL 0x00123450
MOV RBX,RAX
MOV RDI,R14
CALL 0x00142f88
LEA RDX,[RSP + 0x8]
MOV qword ptr [RDX],RAX
LAB_00163b58:
LEA RSI,[0x1b2d1d]
LEA RDI,[RSP + 0x10]
CALL 0x0016304b
MOV BPL,0x1
LAB_00163b6c:
LEA RDX,[RSP + 0x10]
MOV RDI,RBX
MOV ESI,0x12e
MOV RCX,R14
CALL 0x00162f5e
XOR EBP,EBP
LEA RSI,[0x1f9f48]
LEA RDX,[0x13fb18]
MOV RDI,RBX
CALL 0x00123ef0
|
/* 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 == '\x03') {
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 00163b58 to 00163b68 has its CatchHandler @ 00163bad */
concat<std::__cxx11::string,char_const(&)[29],char_const*>
(local_38,"type must be string, but is ",&local_40);
/* try { // try from 00163b6c to 00163b98 has its CatchHandler @ 00163b99 */
_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);
}
|
|
6,301 | 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&) | monkey531[P]llama/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*>();
} | O3 | 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 0x872ae
movq 0x8(%r14), %rax
movq %rsi, %rdi
movq %rax, %rsi
addq $0x30, %rsp
popq %rbx
popq %r14
popq %rbp
jmp 0x1a4a0
movl $0x20, %edi
callq 0x1a430
movq %rax, %rbx
movq %r14, %rdi
callq 0x5e894
leaq 0x8(%rsp), %rdx
movq %rax, (%rdx)
leaq 0x67a6b(%rip), %rsi # 0xeed3d
leaq 0x10(%rsp), %rdi
callq 0x8643f
movb $0x1, %bpl
leaq 0x10(%rsp), %rdx
movq %rbx, %rdi
movl $0x12e, %esi # imm = 0x12E
movq %r14, %rcx
callq 0x86270
xorl %ebp, %ebp
leaq 0xa1c5b(%rip), %rsi # 0x128f58
leaq -0x2c83a(%rip), %rdx # 0x5aaca
movq %rbx, %rdi
callq 0x1aef0
movq %rax, %r14
leaq 0x20(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x8732a
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x1a8c0
testb %bpl, %bpl
jne 0x87334
jmp 0x8733c
movq %rax, %r14
movq %rbx, %rdi
callq 0x1a660
movq %r14, %rdi
callq 0x1af80
| _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; __int64
sub rsp, 30h
mov r14, rdi
cmp byte ptr [rdi], 3
jnz short loc_872AE
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_872AE:
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, 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 rax, [rsp+48h+var_28]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_8732A
mov rsi, [rsp+48h+var_28]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_8732A:
test bpl, bpl
jnz short loc_87334
jmp short loc_8733C
mov r14, rax
loc_87334:
mov rdi, rbx; void *
call ___cxa_free_exception
loc_8733C:
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::exception *exception; // rbx
const char *v4; // [rsp+8h] [rbp-40h] BYREF
_QWORD v5[2]; // [rsp+10h] [rbp-38h] BYREF
if ( *(_BYTE *)a1 != 3 )
{
exception = (nlohmann::json_abi_v3_11_3::detail::exception *)__cxa_allocate_exception(0x20uLL);
v4 = nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::type_name((unsigned __int8 *)a1);
nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[29],char const*>(
(long long)v5,
(long long)"type must be string, but is ",
&v4);
ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_(
exception,
302,
v5);
__cxa_throw(
exception,
(struct type_info *)&`typeinfo for'nlohmann::json_abi_v3_11_3::detail::type_error,
(void (*)(void *))nlohmann::json_abi_v3_11_3::detail::exception::~exception);
}
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 0x001872ae
MOV RAX,qword ptr [R14 + 0x8]
MOV RDI,RSI
MOV RSI,RAX
ADD RSP,0x30
POP RBX
POP R14
POP RBP
JMP 0x0011a4a0
LAB_001872ae:
MOV EDI,0x20
CALL 0x0011a430
MOV RBX,RAX
MOV RDI,R14
CALL 0x0015e894
LEA RDX,[RSP + 0x8]
MOV qword ptr [RDX],RAX
LAB_001872cb:
LEA RSI,[0x1eed3d]
LEA RDI,[RSP + 0x10]
CALL 0x0018643f
MOV BPL,0x1
LAB_001872df:
LEA RDX,[RSP + 0x10]
MOV RDI,RBX
MOV ESI,0x12e
MOV RCX,R14
CALL 0x00186270
XOR EBP,EBP
LEA RSI,[0x228f58]
LEA RDX,[0x15aaca]
MOV RDI,RBX
CALL 0x0011aef0
|
/* 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 001872cb to 001872db has its CatchHandler @ 00187331 */
concat<std::__cxx11::string,char_const(&)[29],char_const*>
(local_38,"type must be string, but is ",&local_40);
/* try { // try from 001872df to 0018730b has its CatchHandler @ 0018730c */
_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);
}
|
|
6,302 | pre_initialize_performance_schema() | eloqsql/storage/perfschema/pfs_server.cc | void pre_initialize_performance_schema()
{
pfs_initialized= false;
init_all_builtin_memory_class();
PFS_table_stat::g_reset_template.reset();
global_idle_stat.reset();
global_table_io_stat.reset();
global_table_lock_stat.reset();
if (my_create_thread_local_key(&THR_PFS, destroy_pfs_thread))
return;
if (my_create_thread_local_key(&THR_PFS_VG, NULL)) // global_variables
return;
if (my_create_thread_local_key(&THR_PFS_SV, NULL)) // session_variables
return;
if (my_create_thread_local_key(&THR_PFS_VBT, NULL)) // variables_by_thread
return;
if (my_create_thread_local_key(&THR_PFS_SG, NULL)) // global_status
return;
if (my_create_thread_local_key(&THR_PFS_SS, NULL)) // session_status
return;
if (my_create_thread_local_key(&THR_PFS_SBT, NULL)) // status_by_thread
return;
if (my_create_thread_local_key(&THR_PFS_SBU, NULL)) // status_by_user
return;
if (my_create_thread_local_key(&THR_PFS_SBH, NULL)) // status_by_host
return;
if (my_create_thread_local_key(&THR_PFS_SBA, NULL)) // status_by_account
return;
THR_PFS_initialized= true;
} | O0 | cpp | pre_initialize_performance_schema():
pushq %rbp
movq %rsp, %rbp
leaq 0x3849b9(%rip), %rax # 0x3cb274
movb $0x0, (%rax)
callq 0x30730
leaq 0x3c6796(%rip), %rdi # 0x40d060
callq 0x476e0
leaq 0x3c5d6a(%rip), %rdi # 0x40c640
callq 0x30360
leaq 0x3c5d9e(%rip), %rdi # 0x40c680
callq 0x456f0
leaq 0x3c5e52(%rip), %rdi # 0x40c740
callq 0x45050
leaq 0x3c8f7e(%rip), %rdi # 0x40f878
leaq 0x12f(%rip), %rsi # 0x46a30
callq 0x46a00
cmpl $0x0, %eax
je 0x46910
jmp 0x469f2
leaq 0x3c8f65(%rip), %rdi # 0x40f87c
xorl %eax, %eax
movl %eax, %esi
callq 0x46a00
cmpl $0x0, %eax
je 0x4692a
jmp 0x469f2
leaq 0x3c8f4f(%rip), %rdi # 0x40f880
xorl %eax, %eax
movl %eax, %esi
callq 0x46a00
cmpl $0x0, %eax
je 0x46944
jmp 0x469f2
leaq 0x3c8f39(%rip), %rdi # 0x40f884
xorl %eax, %eax
movl %eax, %esi
callq 0x46a00
cmpl $0x0, %eax
je 0x4695e
jmp 0x469f2
leaq 0x3c8f23(%rip), %rdi # 0x40f888
xorl %eax, %eax
movl %eax, %esi
callq 0x46a00
cmpl $0x0, %eax
je 0x46975
jmp 0x469f2
leaq 0x3c8f10(%rip), %rdi # 0x40f88c
xorl %eax, %eax
movl %eax, %esi
callq 0x46a00
cmpl $0x0, %eax
je 0x4698c
jmp 0x469f2
leaq 0x3c8efd(%rip), %rdi # 0x40f890
xorl %eax, %eax
movl %eax, %esi
callq 0x46a00
cmpl $0x0, %eax
je 0x469a3
jmp 0x469f2
leaq 0x3c8eea(%rip), %rdi # 0x40f894
xorl %eax, %eax
movl %eax, %esi
callq 0x46a00
cmpl $0x0, %eax
je 0x469ba
jmp 0x469f2
leaq 0x3c8ed7(%rip), %rdi # 0x40f898
xorl %eax, %eax
movl %eax, %esi
callq 0x46a00
cmpl $0x0, %eax
je 0x469d1
jmp 0x469f2
leaq 0x3c8ec4(%rip), %rdi # 0x40f89c
xorl %eax, %eax
movl %eax, %esi
callq 0x46a00
cmpl $0x0, %eax
je 0x469e8
jmp 0x469f2
leaq 0x3c8eb1(%rip), %rax # 0x40f8a0
movb $0x1, (%rax)
popq %rbp
retq
nopw %cs:(%rax,%rax)
| _Z33pre_initialize_performance_schemav:
push rbp
mov rbp, rsp
lea rax, pfs_initialized
mov byte ptr [rax], 0
call _Z29init_all_builtin_memory_classv; init_all_builtin_memory_class(void)
lea rdi, _ZN14PFS_table_stat16g_reset_templateE; this
call _ZN14PFS_table_stat5resetEv; PFS_table_stat::reset(void)
lea rdi, global_idle_stat; this
call _ZN15PFS_single_stat5resetEv; PFS_single_stat::reset(void)
lea rdi, global_table_io_stat; this
call _ZN17PFS_table_io_stat5resetEv; PFS_table_io_stat::reset(void)
lea rdi, global_table_lock_stat; this
call _ZN19PFS_table_lock_stat5resetEv; PFS_table_lock_stat::reset(void)
lea rdi, THR_PFS; unsigned int *
lea rsi, _ZL18destroy_pfs_threadPv; void (*)(void *)
call _ZL26my_create_thread_local_keyPjPFvPvE; my_create_thread_local_key(uint *,void (*)(void *))
cmp eax, 0
jz short loc_46910
jmp loc_469F2
loc_46910:
lea rdi, THR_PFS_VG; unsigned int *
xor eax, eax
mov esi, eax; void (*)(void *)
call _ZL26my_create_thread_local_keyPjPFvPvE; my_create_thread_local_key(uint *,void (*)(void *))
cmp eax, 0
jz short loc_4692A
jmp loc_469F2
loc_4692A:
lea rdi, THR_PFS_SV; unsigned int *
xor eax, eax
mov esi, eax; void (*)(void *)
call _ZL26my_create_thread_local_keyPjPFvPvE; my_create_thread_local_key(uint *,void (*)(void *))
cmp eax, 0
jz short loc_46944
jmp loc_469F2
loc_46944:
lea rdi, THR_PFS_VBT; unsigned int *
xor eax, eax
mov esi, eax; void (*)(void *)
call _ZL26my_create_thread_local_keyPjPFvPvE; my_create_thread_local_key(uint *,void (*)(void *))
cmp eax, 0
jz short loc_4695E
jmp loc_469F2
loc_4695E:
lea rdi, THR_PFS_SG; unsigned int *
xor eax, eax
mov esi, eax; void (*)(void *)
call _ZL26my_create_thread_local_keyPjPFvPvE; my_create_thread_local_key(uint *,void (*)(void *))
cmp eax, 0
jz short loc_46975
jmp short loc_469F2
loc_46975:
lea rdi, THR_PFS_SS; unsigned int *
xor eax, eax
mov esi, eax; void (*)(void *)
call _ZL26my_create_thread_local_keyPjPFvPvE; my_create_thread_local_key(uint *,void (*)(void *))
cmp eax, 0
jz short loc_4698C
jmp short loc_469F2
loc_4698C:
lea rdi, THR_PFS_SBT; unsigned int *
xor eax, eax
mov esi, eax; void (*)(void *)
call _ZL26my_create_thread_local_keyPjPFvPvE; my_create_thread_local_key(uint *,void (*)(void *))
cmp eax, 0
jz short loc_469A3
jmp short loc_469F2
loc_469A3:
lea rdi, THR_PFS_SBU; unsigned int *
xor eax, eax
mov esi, eax; void (*)(void *)
call _ZL26my_create_thread_local_keyPjPFvPvE; my_create_thread_local_key(uint *,void (*)(void *))
cmp eax, 0
jz short loc_469BA
jmp short loc_469F2
loc_469BA:
lea rdi, THR_PFS_SBH; unsigned int *
xor eax, eax
mov esi, eax; void (*)(void *)
call _ZL26my_create_thread_local_keyPjPFvPvE; my_create_thread_local_key(uint *,void (*)(void *))
cmp eax, 0
jz short loc_469D1
jmp short loc_469F2
loc_469D1:
lea rdi, THR_PFS_SBA; unsigned int *
xor eax, eax
mov esi, eax; void (*)(void *)
call _ZL26my_create_thread_local_keyPjPFvPvE; my_create_thread_local_key(uint *,void (*)(void *))
cmp eax, 0
jz short loc_469E8
jmp short loc_469F2
loc_469E8:
lea rax, THR_PFS_initialized
mov byte ptr [rax], 1
loc_469F2:
pop rbp
retn
| _BYTE *pre_initialize_performance_schema(void)
{
_BYTE *result; // rax
pfs_initialized = 0;
init_all_builtin_memory_class();
PFS_table_stat::reset((PFS_table_stat *)&PFS_table_stat::g_reset_template);
PFS_single_stat::reset((PFS_single_stat *)&global_idle_stat);
PFS_table_io_stat::reset((PFS_table_io_stat *)&global_table_io_stat);
PFS_table_lock_stat::reset((PFS_table_lock_stat *)&global_table_lock_stat);
result = (_BYTE *)my_create_thread_local_key(&THR_PFS, (void (*)(void *))destroy_pfs_thread);
if ( !(_DWORD)result )
{
result = (_BYTE *)my_create_thread_local_key(&THR_PFS_VG, 0LL);
if ( !(_DWORD)result )
{
result = (_BYTE *)my_create_thread_local_key(&THR_PFS_SV, 0LL);
if ( !(_DWORD)result )
{
result = (_BYTE *)my_create_thread_local_key(&THR_PFS_VBT, 0LL);
if ( !(_DWORD)result )
{
result = (_BYTE *)my_create_thread_local_key(&THR_PFS_SG, 0LL);
if ( !(_DWORD)result )
{
result = (_BYTE *)my_create_thread_local_key(&THR_PFS_SS, 0LL);
if ( !(_DWORD)result )
{
result = (_BYTE *)my_create_thread_local_key(&THR_PFS_SBT, 0LL);
if ( !(_DWORD)result )
{
result = (_BYTE *)my_create_thread_local_key(&THR_PFS_SBU, 0LL);
if ( !(_DWORD)result )
{
result = (_BYTE *)my_create_thread_local_key(&THR_PFS_SBH, 0LL);
if ( !(_DWORD)result )
{
result = (_BYTE *)my_create_thread_local_key(&THR_PFS_SBA, 0LL);
if ( !(_DWORD)result )
{
result = THR_PFS_initialized;
THR_PFS_initialized[0] = 1;
}
}
}
}
}
}
}
}
}
}
return result;
}
| pre_initialize_performance_schema:
PUSH RBP
MOV RBP,RSP
LEA RAX,[0x4cb274]
MOV byte ptr [RAX],0x0
CALL 0x00130730
LEA RDI,[0x50d060]
CALL 0x001476e0
LEA RDI,[0x50c640]
CALL 0x00130360
LEA RDI,[0x50c680]
CALL 0x001456f0
LEA RDI,[0x50c740]
CALL 0x00145050
LEA RDI,[0x50f878]
LEA RSI,[0x146a30]
CALL 0x00146a00
CMP EAX,0x0
JZ 0x00146910
JMP 0x001469f2
LAB_00146910:
LEA RDI,[0x50f87c]
XOR EAX,EAX
MOV ESI,EAX
CALL 0x00146a00
CMP EAX,0x0
JZ 0x0014692a
JMP 0x001469f2
LAB_0014692a:
LEA RDI,[0x50f880]
XOR EAX,EAX
MOV ESI,EAX
CALL 0x00146a00
CMP EAX,0x0
JZ 0x00146944
JMP 0x001469f2
LAB_00146944:
LEA RDI,[0x50f884]
XOR EAX,EAX
MOV ESI,EAX
CALL 0x00146a00
CMP EAX,0x0
JZ 0x0014695e
JMP 0x001469f2
LAB_0014695e:
LEA RDI,[0x50f888]
XOR EAX,EAX
MOV ESI,EAX
CALL 0x00146a00
CMP EAX,0x0
JZ 0x00146975
JMP 0x001469f2
LAB_00146975:
LEA RDI,[0x50f88c]
XOR EAX,EAX
MOV ESI,EAX
CALL 0x00146a00
CMP EAX,0x0
JZ 0x0014698c
JMP 0x001469f2
LAB_0014698c:
LEA RDI,[0x50f890]
XOR EAX,EAX
MOV ESI,EAX
CALL 0x00146a00
CMP EAX,0x0
JZ 0x001469a3
JMP 0x001469f2
LAB_001469a3:
LEA RDI,[0x50f894]
XOR EAX,EAX
MOV ESI,EAX
CALL 0x00146a00
CMP EAX,0x0
JZ 0x001469ba
JMP 0x001469f2
LAB_001469ba:
LEA RDI,[0x50f898]
XOR EAX,EAX
MOV ESI,EAX
CALL 0x00146a00
CMP EAX,0x0
JZ 0x001469d1
JMP 0x001469f2
LAB_001469d1:
LEA RDI,[0x50f89c]
XOR EAX,EAX
MOV ESI,EAX
CALL 0x00146a00
CMP EAX,0x0
JZ 0x001469e8
JMP 0x001469f2
LAB_001469e8:
LEA RAX,[0x50f8a0]
MOV byte ptr [RAX],0x1
LAB_001469f2:
POP RBP
RET
|
/* WARNING: Unknown calling convention -- yet parameter storage is locked */
/* pre_initialize_performance_schema() */
void pre_initialize_performance_schema(void)
{
int iVar1;
pfs_initialized = 0;
init_all_builtin_memory_class();
PFS_table_stat::reset((PFS_table_stat *)PFS_table_stat::g_reset_template);
PFS_single_stat::reset((PFS_single_stat *)global_idle_stat);
PFS_table_io_stat::reset((PFS_table_io_stat *)global_table_io_stat);
PFS_table_lock_stat::reset((PFS_table_lock_stat *)global_table_lock_stat);
iVar1 = my_create_thread_local_key(&THR_PFS,destroy_pfs_thread);
if ((((((iVar1 == 0) &&
(iVar1 = my_create_thread_local_key(&THR_PFS_VG,(_func_void_void_ptr *)0x0), iVar1 == 0))
&& (iVar1 = my_create_thread_local_key(&THR_PFS_SV,(_func_void_void_ptr *)0x0), iVar1 == 0))
&& ((iVar1 = my_create_thread_local_key(&THR_PFS_VBT,(_func_void_void_ptr *)0x0), iVar1 == 0
&& (iVar1 = my_create_thread_local_key(&THR_PFS_SG,(_func_void_void_ptr *)0x0),
iVar1 == 0)))) &&
((iVar1 = my_create_thread_local_key(&THR_PFS_SS,(_func_void_void_ptr *)0x0), iVar1 == 0 &&
((iVar1 = my_create_thread_local_key(&THR_PFS_SBT,(_func_void_void_ptr *)0x0), iVar1 == 0 &&
(iVar1 = my_create_thread_local_key(&THR_PFS_SBU,(_func_void_void_ptr *)0x0), iVar1 == 0))))
)) && ((iVar1 = my_create_thread_local_key(&THR_PFS_SBH,(_func_void_void_ptr *)0x0),
iVar1 == 0 &&
(iVar1 = my_create_thread_local_key(&THR_PFS_SBA,(_func_void_void_ptr *)0x0),
iVar1 == 0)))) {
THR_PFS_initialized = 1;
}
return;
}
|
|
6,303 | LefDefParser::defiNet::viaOrient(int) const | Efficient-TDP/thirdparty/Limbo/limbo/thirdparty/lefdef/5.8/def/def/defiNet.cpp | const int defiNet::viaOrient(int index) const {
char errMsg[128];
if (index < 0 || index > numPts_) {
sprintf (errMsg, "ERROR (DEFPARS-6085): The index number %d specified for the NET POLYGON is invalid.\nValid index is from 0 to %d. Specify a valid index number and then try again.",
index, numPts_);
defiError(0, 6085, errMsg, defData);
return 0;
}
return viaOrients_[index];
} | O0 | cpp | LefDefParser::defiNet::viaOrient(int) const:
subq $0xa8, %rsp
movq %rdi, 0x98(%rsp)
movl %esi, 0x94(%rsp)
movq 0x98(%rsp), %rax
movq %rax, 0x8(%rsp)
cmpl $0x0, 0x94(%rsp)
jl 0x403f1
movq 0x8(%rsp), %rcx
movl 0x94(%rsp), %eax
cmpl 0x210(%rcx), %eax
jle 0x40440
movq 0x8(%rsp), %rax
leaq 0x10(%rsp), %rdi
movl 0x94(%rsp), %edx
movl 0x210(%rax), %ecx
leaq 0x34f4a(%rip), %rsi # 0x75359
movb $0x0, %al
callq 0x7060
movq 0x8(%rsp), %rax
leaq 0x10(%rsp), %rdx
movq 0x240(%rax), %rcx
xorl %edi, %edi
movl $0x17c5, %esi # imm = 0x17C5
callq 0x2a600
movl $0x0, 0xa4(%rsp)
jmp 0x4045e
movq 0x8(%rsp), %rax
movq 0x218(%rax), %rax
movslq 0x94(%rsp), %rcx
movl (%rax,%rcx,4), %eax
movl %eax, 0xa4(%rsp)
movl 0xa4(%rsp), %eax
addq $0xa8, %rsp
retq
nopl (%rax)
| _ZNK12LefDefParser7defiNet9viaOrientEi:
sub rsp, 0A8h
mov [rsp+0A8h+var_10], rdi
mov [rsp+0A8h+var_14], esi
mov rax, [rsp+0A8h+var_10]
mov [rsp+0A8h+var_A0], rax
cmp [rsp+0A8h+var_14], 0
jl short loc_403F1
mov rcx, [rsp+0A8h+var_A0]
mov eax, [rsp+0A8h+var_14]
cmp eax, [rcx+210h]
jle short loc_40440
loc_403F1:
mov rax, [rsp+0A8h+var_A0]
lea rdi, [rsp+0A8h+var_98]
mov edx, [rsp+0A8h+var_14]
mov ecx, [rax+210h]
lea rsi, aErrorDefpars60_6; "ERROR (DEFPARS-6085): The index number "...
mov al, 0
call _sprintf
mov rax, [rsp+0A8h+var_A0]
lea rdx, [rsp+0A8h+var_98]; int
mov rcx, [rax+240h]; char *
xor edi, edi; this
mov esi, 17C5h; int
call _ZN12LefDefParser9defiErrorEiiPKcPNS_8defrDataE; LefDefParser::defiError(int,int,char const*,LefDefParser::defrData *)
mov [rsp+0A8h+var_4], 0
jmp short loc_4045E
loc_40440:
mov rax, [rsp+0A8h+var_A0]
mov rax, [rax+218h]
movsxd rcx, [rsp+0A8h+var_14]
mov eax, [rax+rcx*4]
mov [rsp+0A8h+var_4], eax
loc_4045E:
mov eax, [rsp+0A8h+var_4]
add rsp, 0A8h
retn
| long long LefDefParser::defiNet::viaOrient(LefDefParser::defrData **this, int a2)
{
LefDefParser::defrData *v2; // r8
char v4[132]; // [rsp+10h] [rbp-98h] BYREF
int v5; // [rsp+94h] [rbp-14h]
LefDefParser::defiNet *v6; // [rsp+98h] [rbp-10h]
v6 = (LefDefParser::defiNet *)this;
v5 = a2;
if ( a2 >= 0 && v5 <= *((_DWORD *)this + 132) )
{
return (unsigned int)*((_DWORD *)this[67] + v5);
}
else
{
sprintf(
v4,
"ERROR (DEFPARS-6085): The index number %d specified for the NET POLYGON is invalid.\n"
"Valid index is from 0 to %d. Specify a valid index number and then try again.",
v5,
*((_DWORD *)this + 132));
LefDefParser::defiError(0LL, 6085, v4, this[72], v2);
return 0;
}
}
| viaOrient:
SUB RSP,0xa8
MOV qword ptr [RSP + 0x98],RDI
MOV dword ptr [RSP + 0x94],ESI
MOV RAX,qword ptr [RSP + 0x98]
MOV qword ptr [RSP + 0x8],RAX
CMP dword ptr [RSP + 0x94],0x0
JL 0x001403f1
MOV RCX,qword ptr [RSP + 0x8]
MOV EAX,dword ptr [RSP + 0x94]
CMP EAX,dword ptr [RCX + 0x210]
JLE 0x00140440
LAB_001403f1:
MOV RAX,qword ptr [RSP + 0x8]
LEA RDI,[RSP + 0x10]
MOV EDX,dword ptr [RSP + 0x94]
MOV ECX,dword ptr [RAX + 0x210]
LEA RSI,[0x175359]
MOV AL,0x0
CALL 0x00107060
MOV RAX,qword ptr [RSP + 0x8]
LEA RDX,[RSP + 0x10]
MOV RCX,qword ptr [RAX + 0x240]
XOR EDI,EDI
MOV ESI,0x17c5
CALL 0x0012a600
MOV dword ptr [RSP + 0xa4],0x0
JMP 0x0014045e
LAB_00140440:
MOV RAX,qword ptr [RSP + 0x8]
MOV RAX,qword ptr [RAX + 0x218]
MOVSXD RCX,dword ptr [RSP + 0x94]
MOV EAX,dword ptr [RAX + RCX*0x4]
MOV dword ptr [RSP + 0xa4],EAX
LAB_0014045e:
MOV EAX,dword ptr [RSP + 0xa4]
ADD RSP,0xa8
RET
|
/* LefDefParser::defiNet::viaOrient(int) const */
int4 __thiscall LefDefParser::defiNet::viaOrient(defiNet *this,int param_1)
{
char local_98 [132];
int local_14;
defiNet *local_10;
int4 local_4;
if ((param_1 < 0) || (*(int *)(this + 0x210) < param_1)) {
local_14 = param_1;
local_10 = this;
sprintf(local_98,
"ERROR (DEFPARS-6085): The index number %d specified for the NET POLYGON is invalid.\nValid index is from 0 to %d. Specify a valid index number and then try again."
,(ulong)(uint)param_1,(ulong)*(uint *)(this + 0x210));
defiError(0,0x17c5,local_98,*(defrData **)(this + 0x240));
local_4 = 0;
}
else {
local_4 = *(int4 *)(*(long *)(this + 0x218) + (long)param_1 * 4);
}
return local_4;
}
|
|
6,304 | mi_ft_erase | eloqsql/storage/myisam/ft_update.c | static int _mi_ft_erase(MI_INFO *info, uint keynr, uchar *keybuf,
FT_WORD *wlist, my_off_t filepos)
{
uint key_length, err=0;
DBUG_ENTER("_mi_ft_erase");
for (; wlist->pos; wlist++)
{
key_length=_ft_make_key(info,keynr,keybuf,wlist,filepos);
if (_mi_ck_delete(info,keynr,(uchar*) keybuf,key_length))
err=1;
}
DBUG_RETURN(err);
} | O3 | c | mi_ft_erase:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
cmpq $0x0, (%rcx)
je 0x4942e
movq %rcx, %r15
movq %rdi, -0x48(%rbp)
movl %esi, -0x2c(%rbp)
movq %rdx, -0x38(%rbp)
xorl %r13d, %r13d
movq %r8, -0x40(%rbp)
movq -0x48(%rbp), %r12
movl -0x2c(%rbp), %ebx
movq -0x38(%rbp), %r14
movq %r12, %rdi
movl %ebx, %esi
movq %r14, %rdx
movq %r15, %rcx
movq -0x40(%rbp), %r8
callq 0x49321
movq %r12, %rdi
movl %ebx, %esi
movq %r14, %rdx
movl %eax, %ecx
callq 0x2cd2d
testl %eax, %eax
movl $0x1, %eax
cmovnel %eax, %r13d
cmpq $0x0, 0x18(%r15)
leaq 0x18(%r15), %r15
jne 0x493f3
jmp 0x49431
xorl %r13d, %r13d
movl %r13d, %eax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| _mi_ft_erase:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 28h
cmp qword ptr [rcx], 0
jz short loc_4942E
mov r15, rcx
mov [rbp+var_48], rdi
mov [rbp+var_2C], esi
mov [rbp+var_38], rdx
xor r13d, r13d
mov [rbp+var_40], r8
mov r12, [rbp+var_48]
mov ebx, [rbp+var_2C]
mov r14, [rbp+var_38]
loc_493F3:
mov rdi, r12
mov esi, ebx
mov rdx, r14
mov rcx, r15
mov r8, [rbp+var_40]
call _ft_make_key
mov rdi, r12
mov esi, ebx
mov rdx, r14
mov ecx, eax
call _mi_ck_delete
test eax, eax
mov eax, 1
cmovnz r13d, eax
cmp qword ptr [r15+18h], 0
lea r15, [r15+18h]
jnz short loc_493F3
jmp short loc_49431
loc_4942E:
xor r13d, r13d
loc_49431:
mov eax, r13d
add rsp, 28h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| long long mi_ft_erase(long long a1, unsigned int a2, char *a3, _QWORD *a4, long long a5, __m128i a6)
{
long long v6; // r15
unsigned int v7; // r13d
unsigned int key; // eax
bool v10; // zf
if ( *a4 )
{
v6 = (long long)a4;
v7 = 0;
do
{
key = ft_make_key(a1, a2, a3, v6, a5, a6);
if ( (unsigned int)mi_ck_delete(a1, a2, (long long)a3, key) )
v7 = 1;
v10 = *(_QWORD *)(v6 + 24) == 0LL;
v6 += 24LL;
}
while ( !v10 );
}
else
{
return 0;
}
return v7;
}
| _mi_ft_erase:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x28
CMP qword ptr [RCX],0x0
JZ 0x0014942e
MOV R15,RCX
MOV qword ptr [RBP + -0x48],RDI
MOV dword ptr [RBP + -0x2c],ESI
MOV qword ptr [RBP + -0x38],RDX
XOR R13D,R13D
MOV qword ptr [RBP + -0x40],R8
MOV R12,qword ptr [RBP + -0x48]
MOV EBX,dword ptr [RBP + -0x2c]
MOV R14,qword ptr [RBP + -0x38]
LAB_001493f3:
MOV RDI,R12
MOV ESI,EBX
MOV RDX,R14
MOV RCX,R15
MOV R8,qword ptr [RBP + -0x40]
CALL 0x00149321
MOV RDI,R12
MOV ESI,EBX
MOV RDX,R14
MOV ECX,EAX
CALL 0x0012cd2d
TEST EAX,EAX
MOV EAX,0x1
CMOVNZ R13D,EAX
CMP qword ptr [R15 + 0x18],0x0
LEA R15,[R15 + 0x18]
JNZ 0x001493f3
JMP 0x00149431
LAB_0014942e:
XOR R13D,R13D
LAB_00149431:
MOV EAX,R13D
ADD RSP,0x28
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
int4
_mi_ft_erase(int8 param_1,int4 param_2,int8 param_3,long *param_4,
int8 param_5)
{
long *plVar1;
int4 uVar2;
int iVar3;
int4 uVar4;
if (*param_4 == 0) {
uVar4 = 0;
}
else {
uVar4 = 0;
do {
uVar2 = _ft_make_key(param_1,param_2,param_3,param_4,param_5);
iVar3 = _mi_ck_delete(param_1,param_2,param_3,uVar2);
if (iVar3 != 0) {
uVar4 = 1;
}
plVar1 = param_4 + 3;
param_4 = param_4 + 3;
} while (*plVar1 != 0);
}
return uVar4;
}
|
|
6,305 | testing::internal::PrintTestPartResultToString[abi:cxx11](testing::TestPartResult const&) | giladroyz[P]FindPeaks/build_O0/_deps/googletest-src/googletest/src/gtest.cc | static std::string PrintTestPartResultToString(
const TestPartResult& test_part_result) {
return (Message() << internal::FormatFileLocation(
test_part_result.file_name(),
test_part_result.line_number())
<< " "
<< TestPartResultTypeToString(test_part_result.type())
<< test_part_result.message())
.GetString();
} | O0 | cpp | testing::internal::PrintTestPartResultToString[abi:cxx11](testing::TestPartResult const&):
pushq %rbp
movq %rsp, %rbp
subq $0xa0, %rsp
movq %rdi, -0x70(%rbp)
movq %rdi, %rax
movq %rax, -0x68(%rbp)
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
leaq -0x18(%rbp), %rdi
callq 0x25f20
movq -0x10(%rbp), %rdi
callq 0x46a10
movq %rax, -0x60(%rbp)
movq -0x10(%rbp), %rdi
callq 0x46a60
movq -0x60(%rbp), %rsi
movl %eax, %edx
leaq -0x38(%rbp), %rdi
callq 0x1f110
jmp 0x2b55e
leaq -0x18(%rbp), %rdi
leaq -0x38(%rbp), %rsi
callq 0x16210
movq %rax, -0x78(%rbp)
jmp 0x2b571
movq -0x78(%rbp), %rdi
leaq 0x4fc11(%rip), %rsi # 0x7b18d
callq 0x44d40
movq %rax, -0x80(%rbp)
jmp 0x2b587
movq -0x10(%rbp), %rdi
callq 0x46a80
movl %eax, %edi
callq 0x40cc0
movq %rax, -0x88(%rbp)
jmp 0x2b5a0
movq -0x80(%rbp), %rdi
movq -0x88(%rbp), %rax
movq %rax, -0x50(%rbp)
leaq -0x50(%rbp), %rsi
callq 0x16160
movq %rax, -0x90(%rbp)
jmp 0x2b5c1
movq -0x10(%rbp), %rdi
callq 0x46a90
movq -0x90(%rbp), %rdi
movq %rax, -0x58(%rbp)
leaq -0x58(%rbp), %rsi
callq 0x16160
movq %rax, -0x98(%rbp)
jmp 0x2b5e7
movq -0x98(%rbp), %rsi
movq -0x70(%rbp), %rdi
callq 0x19990
jmp 0x2b5f9
leaq -0x38(%rbp), %rdi
callq 0xad98
leaq -0x18(%rbp), %rdi
callq 0x12420
movq -0x68(%rbp), %rax
addq $0xa0, %rsp
popq %rbp
retq
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
jmp 0x2b63b
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
leaq -0x38(%rbp), %rdi
callq 0xad98
leaq -0x18(%rbp), %rdi
callq 0x12420
movq -0x40(%rbp), %rdi
callq 0xac00
nopl (%rax)
| _ZN7testing8internalL27PrintTestPartResultToStringB5cxx11ERKNS_14TestPartResultE:
push rbp
mov rbp, rsp
sub rsp, 0A0h
mov [rbp+var_70], rdi
mov rax, rdi
mov [rbp+var_68], rax
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
lea rdi, [rbp+var_18]; this
call _ZN7testing7MessageC2Ev; testing::Message::Message(void)
mov rdi, [rbp+var_10]; this
call _ZNK7testing14TestPartResult9file_nameEv; testing::TestPartResult::file_name(void)
mov [rbp+var_60], rax
mov rdi, [rbp+var_10]; this
call _ZNK7testing14TestPartResult11line_numberEv; testing::TestPartResult::line_number(void)
mov rsi, [rbp+var_60]
mov edx, eax
lea rdi, [rbp+var_38]
call _ZN7testing8internal18FormatFileLocationB5cxx11EPKci; testing::internal::FormatFileLocation(char const*,int)
jmp short $+2
loc_2B55E:
lea rdi, [rbp+var_18]
lea rsi, [rbp+var_38]
call _ZN7testing7MessagelsINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEERS0_RKT_; testing::Message::operator<<<std::string>(std::string const&)
mov [rbp+var_78], rax
jmp short $+2
loc_2B571:
mov rdi, [rbp+var_78]
lea rsi, asc_7B18B+2; " "
call _ZN7testing7MessagelsIA2_cEERS0_RKT_; testing::Message::operator<<<char [2]>(char [2] const&)
mov [rbp+var_80], rax
jmp short $+2
loc_2B587:
mov rdi, [rbp+var_10]; this
call _ZNK7testing14TestPartResult4typeEv; testing::TestPartResult::type(void)
mov edi, eax
call _ZN7testingL26TestPartResultTypeToStringENS_14TestPartResult4TypeE; testing::TestPartResultTypeToString(testing::TestPartResult::Type)
mov [rbp+var_88], rax
jmp short $+2
loc_2B5A0:
mov rdi, [rbp+var_80]
mov rax, [rbp+var_88]
mov [rbp+var_50], rax
lea rsi, [rbp+var_50]
call _ZN7testing7MessagelsIKcEERS0_RKPT_; testing::Message::operator<<<char const>(char const * const&)
mov [rbp+var_90], rax
jmp short $+2
loc_2B5C1:
mov rdi, [rbp+var_10]; this
call _ZNK7testing14TestPartResult7messageEv; testing::TestPartResult::message(void)
mov rdi, [rbp+var_90]
mov [rbp+var_58], rax
lea rsi, [rbp+var_58]
call _ZN7testing7MessagelsIKcEERS0_RKPT_; testing::Message::operator<<<char const>(char const * const&)
mov [rbp+var_98], rax
jmp short $+2
loc_2B5E7:
mov rsi, [rbp+var_98]
mov rdi, [rbp+var_70]
call _ZNK7testing7Message9GetStringB5cxx11Ev; testing::Message::GetString(void)
jmp short $+2
loc_2B5F9:
lea rdi, [rbp+var_38]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
lea rdi, [rbp+var_18]; this
call _ZN7testing7MessageD2Ev; testing::Message::~Message()
mov rax, [rbp+var_68]
add rsp, 0A0h
pop rbp
retn
mov rcx, rax
mov eax, edx
mov [rbp+var_40], rcx
mov [rbp+var_44], eax
jmp short loc_2B63B
mov rcx, rax
mov eax, edx
mov [rbp+var_40], rcx
mov [rbp+var_44], eax
lea rdi, [rbp+var_38]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
loc_2B63B:
lea rdi, [rbp+var_18]; this
call _ZN7testing7MessageD2Ev; testing::Message::~Message()
mov rdi, [rbp+var_40]
call __Unwind_Resume
| long long testing::internal::PrintTestPartResultToString[abi:cxx11](long long a1, testing::TestPartResult *a2)
{
int v2; // eax
unsigned int v3; // eax
long long v5; // [rsp+10h] [rbp-90h]
long long v6; // [rsp+20h] [rbp-80h]
long long v7; // [rsp+28h] [rbp-78h]
const char *v8; // [rsp+40h] [rbp-60h]
long long v9; // [rsp+48h] [rbp-58h] BYREF
long long v10; // [rsp+50h] [rbp-50h] BYREF
_BYTE v11[32]; // [rsp+68h] [rbp-38h] BYREF
_BYTE v12[8]; // [rsp+88h] [rbp-18h] BYREF
testing::TestPartResult *v13; // [rsp+90h] [rbp-10h]
long long v14; // [rsp+98h] [rbp-8h]
v14 = a1;
v13 = a2;
testing::Message::Message((testing::Message *)v12);
v8 = (const char *)testing::TestPartResult::file_name(v13);
v2 = testing::TestPartResult::line_number(v13);
testing::internal::FormatFileLocation[abi:cxx11]((long long)v11, v8, v2);
v7 = testing::Message::operator<<<std::string>((long long)v12, (long long)v11);
v6 = testing::Message::operator<<<char [2]>(v7, " ");
v3 = testing::TestPartResult::type(v13);
v10 = testing::TestPartResultTypeToString(v3);
v5 = testing::Message::operator<<<char const>(v6, &v10);
v9 = testing::TestPartResult::message(v13);
testing::Message::operator<<<char const>(v5, &v9);
testing::Message::GetString[abi:cxx11](a1);
std::string::~string(v11);
testing::Message::~Message((testing::Message *)v12);
return a1;
}
| PrintTestPartResultToString[abi:cxx11]:
PUSH RBP
MOV RBP,RSP
SUB RSP,0xa0
MOV qword ptr [RBP + -0x70],RDI
MOV RAX,RDI
MOV qword ptr [RBP + -0x68],RAX
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
LEA RDI,[RBP + -0x18]
CALL 0x00125f20
MOV RDI,qword ptr [RBP + -0x10]
CALL 0x00146a10
MOV qword ptr [RBP + -0x60],RAX
MOV RDI,qword ptr [RBP + -0x10]
CALL 0x00146a60
MOV RSI,qword ptr [RBP + -0x60]
MOV EDX,EAX
LAB_0012b553:
LEA RDI,[RBP + -0x38]
CALL 0x0011f110
JMP 0x0012b55e
LAB_0012b55e:
LEA RDI,[RBP + -0x18]
LEA RSI,[RBP + -0x38]
CALL 0x00116210
MOV qword ptr [RBP + -0x78],RAX
JMP 0x0012b571
LAB_0012b571:
MOV RDI,qword ptr [RBP + -0x78]
LEA RSI,[0x17b18d]
CALL 0x00144d40
MOV qword ptr [RBP + -0x80],RAX
JMP 0x0012b587
LAB_0012b587:
MOV RDI,qword ptr [RBP + -0x10]
CALL 0x00146a80
MOV EDI,EAX
CALL 0x00140cc0
MOV qword ptr [RBP + -0x88],RAX
JMP 0x0012b5a0
LAB_0012b5a0:
MOV RDI,qword ptr [RBP + -0x80]
MOV RAX,qword ptr [RBP + -0x88]
MOV qword ptr [RBP + -0x50],RAX
LEA RSI,[RBP + -0x50]
CALL 0x00116160
MOV qword ptr [RBP + -0x90],RAX
JMP 0x0012b5c1
LAB_0012b5c1:
MOV RDI,qword ptr [RBP + -0x10]
CALL 0x00146a90
MOV RDI,qword ptr [RBP + -0x90]
MOV qword ptr [RBP + -0x58],RAX
LEA RSI,[RBP + -0x58]
CALL 0x00116160
MOV qword ptr [RBP + -0x98],RAX
JMP 0x0012b5e7
LAB_0012b5e7:
MOV RSI,qword ptr [RBP + -0x98]
MOV RDI,qword ptr [RBP + -0x70]
CALL 0x00119990
LAB_0012b5f7:
JMP 0x0012b5f9
LAB_0012b5f9:
LEA RDI,[RBP + -0x38]
CALL 0x0010ad98
LEA RDI,[RBP + -0x18]
CALL 0x00112420
MOV RAX,qword ptr [RBP + -0x68]
ADD RSP,0xa0
POP RBP
RET
|
/* testing::internal::PrintTestPartResultToString[abi:cxx11](testing::TestPartResult const&) */
internal * __thiscall
testing::internal::PrintTestPartResultToString_abi_cxx11_(internal *this,TestPartResult *param_1)
{
int iVar1;
int4 uVar2;
char *pcVar3;
Message *pMVar4;
char *local_60;
char *local_58 [3];
internal local_40 [32];
Message local_20 [8];
TestPartResult *local_18;
internal *local_10;
local_18 = param_1;
local_10 = this;
Message::Message(local_20);
pcVar3 = (char *)TestPartResult::file_name();
iVar1 = TestPartResult::line_number(local_18);
/* try { // try from 0012b553 to 0012b55b has its CatchHandler @ 0012b618 */
FormatFileLocation_abi_cxx11_(local_40,pcVar3,iVar1);
/* try { // try from 0012b55e to 0012b5f6 has its CatchHandler @ 0012b626 */
pMVar4 = Message::operator<<(local_20,(string *)local_40);
pMVar4 = Message::operator<<(pMVar4," ");
uVar2 = TestPartResult::type(local_18);
local_58[0] = (char *)TestPartResultTypeToString(uVar2);
pMVar4 = Message::operator<<(pMVar4,local_58);
local_60 = (char *)TestPartResult::message();
Message::operator<<(pMVar4,&local_60);
Message::GetString_abi_cxx11_();
std::__cxx11::string::~string((string *)local_40);
Message::~Message(local_20);
return this;
}
|
|
6,306 | testing::internal::(anonymous namespace)::UnitTestFilter::UnitTestFilter(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&) | AlayaLite/build_O0/_deps/googletest-src/googletest/src/gtest.cc | explicit UnitTestFilter(const std::string& filter) {
// By design "" filter matches "" string.
std::vector<std::string> all_patterns;
SplitString(filter, ':', &all_patterns);
const auto exact_match_patterns_begin = std::partition(
all_patterns.begin(), all_patterns.end(), &IsGlobPattern);
glob_patterns_.reserve(static_cast<size_t>(
std::distance(all_patterns.begin(), exact_match_patterns_begin)));
std::move(all_patterns.begin(), exact_match_patterns_begin,
std::inserter(glob_patterns_, glob_patterns_.begin()));
std::move(
exact_match_patterns_begin, all_patterns.end(),
std::inserter(exact_match_patterns_, exact_match_patterns_.begin()));
} | O0 | cpp | testing::internal::(anonymous namespace)::UnitTestFilter::UnitTestFilter(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&):
subq $0x158, %rsp # imm = 0x158
movq %rdi, 0x150(%rsp)
movq %rsi, 0x148(%rsp)
movq 0x150(%rsp), %rdi
movq %rdi, 0x70(%rsp)
movq %rdi, %rax
movq %rax, 0x68(%rsp)
callq 0xe3180
movq 0x70(%rsp), %rdi
addq $0x18, %rdi
movq %rdi, 0x78(%rsp)
callq 0xef220
leaq 0x130(%rsp), %rdi
movq %rdi, 0x80(%rsp)
callq 0xe3180
movq 0x80(%rsp), %rdx
movq 0x148(%rsp), %rdi
movl $0x3a, %esi
callq 0xb6390
jmp 0xbeb35
leaq 0x130(%rsp), %rdi
movq %rdi, 0x58(%rsp)
callq 0xe48e0
movq 0x58(%rsp), %rdi
movq %rax, 0x110(%rsp)
callq 0xe4990
movq %rax, 0x108(%rsp)
movq 0x110(%rsp), %rdi
movq 0x108(%rsp), %rsi
leaq 0x1e858(%rip), %rdx # 0xdd3d0
callq 0xef230
movq %rax, 0x60(%rsp)
jmp 0xbeb84
movq 0x68(%rsp), %rax
movq 0x60(%rsp), %rcx
movq %rcx, 0x118(%rsp)
movq %rax, 0x48(%rsp)
leaq 0x130(%rsp), %rdi
callq 0xe48e0
movq %rax, 0x100(%rsp)
movq 0x118(%rsp), %rax
movq %rax, 0xf8(%rsp)
movq 0x100(%rsp), %rdi
movq 0xf8(%rsp), %rsi
callq 0xef3a0
movq %rax, 0x50(%rsp)
jmp 0xbebdc
movq 0x50(%rsp), %rsi
movq 0x48(%rsp), %rdi
callq 0xef290
jmp 0xbebed
leaq 0x130(%rsp), %rdi
callq 0xe48e0
movq 0x68(%rsp), %rdi
movq %rax, 0xf0(%rsp)
movq 0x118(%rsp), %rax
movq %rax, 0xe8(%rsp)
callq 0xe48e0
movq 0x68(%rsp), %rdi
movq %rax, 0xd0(%rsp)
movq 0xd0(%rsp), %rsi
callq 0xef470
movq %rdx, 0x38(%rsp)
movq %rax, 0x40(%rsp)
jmp 0xbec42
movq 0x38(%rsp), %rax
movq 0x40(%rsp), %rcx
movq %rcx, 0xd8(%rsp)
movq %rax, 0xe0(%rsp)
movq 0xf0(%rsp), %rdi
movq 0xe8(%rsp), %rsi
movq 0xd8(%rsp), %rdx
movq 0xe0(%rsp), %rcx
callq 0xef3e0
movq %rdx, 0x28(%rsp)
movq %rax, 0x30(%rsp)
jmp 0xbec8d
movq 0x28(%rsp), %rax
movq 0x30(%rsp), %rcx
movq %rcx, 0xc0(%rsp)
movq %rax, 0xc8(%rsp)
movq 0x118(%rsp), %rax
movq %rax, 0xb8(%rsp)
leaq 0x130(%rsp), %rdi
callq 0xe4990
movq 0x68(%rsp), %rdi
movq %rax, 0xb0(%rsp)
addq $0x18, %rdi
movq %rdi, 0x10(%rsp)
callq 0xef580
movq 0x10(%rsp), %rdi
movq %rax, 0x98(%rsp)
movq 0x98(%rsp), %rsi
callq 0xef540
movq %rdx, 0x18(%rsp)
movq %rax, 0x20(%rsp)
jmp 0xbed05
movq 0x18(%rsp), %rax
movq 0x20(%rsp), %rcx
movq %rcx, 0xa0(%rsp)
movq %rax, 0xa8(%rsp)
movq 0xb8(%rsp), %rdi
movq 0xb0(%rsp), %rsi
movq 0xa0(%rsp), %rdx
movq 0xa8(%rsp), %rcx
callq 0xef4b0
movq %rdx, (%rsp)
movq %rax, 0x8(%rsp)
jmp 0xbed4f
movq (%rsp), %rax
movq 0x8(%rsp), %rcx
movq %rcx, 0x88(%rsp)
movq %rax, 0x90(%rsp)
leaq 0x130(%rsp), %rdi
callq 0xe2f70
addq $0x158, %rsp # imm = 0x158
retq
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x128(%rsp)
movl %eax, 0x124(%rsp)
leaq 0x130(%rsp), %rdi
callq 0xe2f70
movq 0x78(%rsp), %rdi
callq 0xef5b0
movq 0x70(%rsp), %rdi
callq 0xe2f70
movq 0x128(%rsp), %rdi
callq 0x14c80
nop
| _ZN7testing8internal12_GLOBAL__N_114UnitTestFilterC2ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE:
sub rsp, 158h
mov [rsp+158h+var_8], rdi
mov [rsp+158h+var_10], rsi
mov rdi, [rsp+158h+var_8]
mov [rsp+158h+var_E8], rdi
mov rax, rdi
mov [rsp+158h+var_F0], rax
call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EEC2Ev; std::vector<std::string>::vector(void)
mov rdi, [rsp+158h+var_E8]
add rdi, 18h
mov [rsp+158h+var_E0], rdi
call _ZNSt13unordered_setINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4hashIS5_ESt8equal_toIS5_ESaIS5_EEC2Ev; std::unordered_set<std::string>::unordered_set(void)
lea rdi, [rsp+158h+var_28]
mov [rsp+158h+var_D8], rdi
call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EEC2Ev; std::vector<std::string>::vector(void)
mov rdx, [rsp+158h+var_D8]
mov rdi, [rsp+158h+var_10]
mov esi, 3Ah ; ':'
call _ZN7testing8internal11SplitStringERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEcPSt6vectorIS6_SaIS6_EE; testing::internal::SplitString(std::string const&,char,std::vector<std::string> *)
jmp short $+2
loc_BEB35:
lea rdi, [rsp+158h+var_28]
mov [rsp+158h+var_100], rdi
call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE5beginEv; std::vector<std::string>::begin(void)
mov rdi, [rsp+158h+var_100]
mov [rsp+158h+var_48], rax
call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE3endEv; std::vector<std::string>::end(void)
mov [rsp+158h+var_50], rax
mov rdi, [rsp+158h+var_48]
mov rsi, [rsp+158h+var_50]
lea rdx, _ZN7testing8internal12_GLOBAL__N_113IsGlobPatternERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; testing::internal::`anonymous namespace'::IsGlobPattern(std::string const&)
call _ZSt9partitionIN9__gnu_cxx17__normal_iteratorIPNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt6vectorIS7_SaIS7_EEEEPFbRKS7_EET_SH_SH_T0_; std::partition<__gnu_cxx::__normal_iterator<std::string *,std::vector<std::string>>,bool (*)(std::string const&)>(__gnu_cxx::__normal_iterator<std::string *,std::vector<std::string>>,__gnu_cxx::__normal_iterator<std::string *,std::vector<std::string>>,bool (*)(std::string const&))
mov [rsp+158h+var_F8], rax
jmp short $+2
loc_BEB84:
mov rax, [rsp+158h+var_F0]
mov rcx, [rsp+158h+var_F8]
mov [rsp+158h+var_40], rcx
mov [rsp+158h+var_110], rax
lea rdi, [rsp+158h+var_28]
call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE5beginEv; std::vector<std::string>::begin(void)
mov [rsp+158h+var_58], rax
mov rax, [rsp+158h+var_40]
mov [rsp+158h+var_60], rax
mov rdi, [rsp+158h+var_58]
mov rsi, [rsp+158h+var_60]
call _ZSt8distanceIN9__gnu_cxx17__normal_iteratorIPNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt6vectorIS7_SaIS7_EEEEENSt15iterator_traitsIT_E15difference_typeESE_SE_; std::distance<__gnu_cxx::__normal_iterator<std::string *,std::vector<std::string>>>(__gnu_cxx::__normal_iterator<std::string *,std::vector<std::string>>,__gnu_cxx::__normal_iterator<std::string *,std::vector<std::string>>)
mov [rsp+158h+var_108], rax
jmp short $+2
loc_BEBDC:
mov rsi, [rsp+158h+var_108]
mov rdi, [rsp+158h+var_110]
call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE7reserveEm; std::vector<std::string>::reserve(ulong)
jmp short $+2
loc_BEBED:
lea rdi, [rsp+158h+var_28]
call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE5beginEv; std::vector<std::string>::begin(void)
mov rdi, [rsp+158h+var_F0]
mov [rsp+158h+var_68], rax
mov rax, [rsp+158h+var_40]
mov [rsp+158h+var_70], rax
call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE5beginEv; std::vector<std::string>::begin(void)
mov rdi, [rsp+158h+var_F0]
mov [rsp+158h+var_88], rax
mov rsi, [rsp+158h+var_88]
call _ZSt8inserterISt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS6_EEESt15insert_iteratorIT_ERSA_DTclsr6ranges13__cust_accessE7__beginclsr3stdE7declvalISC_EEEE
mov [rsp+158h+var_120], rdx
mov [rsp+158h+var_118], rax
jmp short $+2
loc_BEC42:
mov rax, [rsp+158h+var_120]
mov rcx, [rsp+158h+var_118]
mov [rsp+158h+var_80], rcx
mov [rsp+158h+var_78], rax
mov rdi, [rsp+158h+var_68]
mov rsi, [rsp+158h+var_70]
mov rdx, [rsp+158h+var_80]
mov rcx, [rsp+158h+var_78]
call _ZSt4moveIN9__gnu_cxx17__normal_iteratorIPNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt6vectorIS7_SaIS7_EEEESt15insert_iteratorISB_EET0_T_SG_SF_; std::move<__gnu_cxx::__normal_iterator<std::string *,std::vector<std::string>>,std::insert_iterator<std::vector<std::string>>>(__gnu_cxx::__normal_iterator<std::string *,std::vector<std::string>>,__gnu_cxx::__normal_iterator<std::string *,std::vector<std::string>>,std::insert_iterator<std::vector<std::string>>)
mov [rsp+158h+var_130], rdx
mov [rsp+158h+var_128], rax
jmp short $+2
loc_BEC8D:
mov rax, [rsp+158h+var_130]
mov rcx, [rsp+158h+var_128]
mov [rsp+158h+var_98], rcx
mov [rsp+158h+var_90], rax
mov rax, [rsp+158h+var_40]
mov [rsp+158h+var_A0], rax
lea rdi, [rsp+158h+var_28]
call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE3endEv; std::vector<std::string>::end(void)
mov rdi, [rsp+158h+var_F0]
mov [rsp+158h+var_A8], rax
add rdi, 18h
mov [rsp+158h+var_148], rdi
call _ZNSt13unordered_setINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4hashIS5_ESt8equal_toIS5_ESaIS5_EE5beginEv; std::unordered_set<std::string>::begin(void)
mov rdi, [rsp+158h+var_148]
mov [rsp+158h+var_C0], rax
mov rsi, [rsp+158h+var_C0]
call _ZSt8inserterISt13unordered_setINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4hashIS6_ESt8equal_toIS6_ESaIS6_EEESt15insert_iteratorIT_ERSE_DTclsr6ranges13__cust_accessE7__beginclsr3stdE7declvalISG_EEEE
mov [rsp+158h+var_140], rdx
mov [rsp+158h+var_138], rax
jmp short $+2
loc_BED05:
mov rax, [rsp+158h+var_140]
mov rcx, [rsp+158h+var_138]
mov [rsp+158h+var_B8], rcx
mov [rsp+158h+var_B0], rax
mov rdi, [rsp+158h+var_A0]
mov rsi, [rsp+158h+var_A8]
mov rdx, [rsp+158h+var_B8]
mov rcx, [rsp+158h+var_B0]
call _ZSt4moveIN9__gnu_cxx17__normal_iteratorIPNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt6vectorIS7_SaIS7_EEEESt15insert_iteratorISt13unordered_setIS7_St4hashIS7_ESt8equal_toIS7_ESA_EEET0_T_SM_SL_; std::move<__gnu_cxx::__normal_iterator<std::string *,std::vector<std::string>>,std::insert_iterator<std::unordered_set<std::string>>>(__gnu_cxx::__normal_iterator<std::string *,std::vector<std::string>>,__gnu_cxx::__normal_iterator<std::string *,std::vector<std::string>>,std::insert_iterator<std::unordered_set<std::string>>)
mov [rsp+158h+var_158], rdx
mov [rsp+158h+var_150], rax
jmp short $+2
loc_BED4F:
mov rax, [rsp+158h+var_158]
mov rcx, [rsp+158h+var_150]
mov [rsp+158h+var_D0], rcx
mov [rsp+158h+var_C8], rax
lea rdi, [rsp+158h+var_28]; void *
call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED2Ev; std::vector<std::string>::~vector()
add rsp, 158h
retn
mov rcx, rax
mov eax, edx
mov [rsp+arg_120], rcx
mov [rsp+arg_11C], eax
lea rdi, [rsp+arg_128]; void *
call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED2Ev; std::vector<std::string>::~vector()
mov rdi, [rsp+arg_70]
call _ZNSt13unordered_setINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4hashIS5_ESt8equal_toIS5_ESaIS5_EED2Ev; std::unordered_set<std::string>::~unordered_set()
mov rdi, [rsp+arg_68]; void *
call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED2Ev; std::vector<std::string>::~vector()
mov rdi, [rsp+arg_120]
call __Unwind_Resume
| void testing::internal::`anonymous namespace'::UnitTestFilter::UnitTestFilter(long long a1, long long a2)
{
long long v2; // rax
long long v3; // rdx
long long v4; // rax
long long v5; // rdx
long long v6; // [rsp+50h] [rbp-108h]
long long v7; // [rsp+98h] [rbp-C0h]
long long v8; // [rsp+B0h] [rbp-A8h]
long long v9; // [rsp+D0h] [rbp-88h]
long long v10; // [rsp+F0h] [rbp-68h]
long long v11; // [rsp+100h] [rbp-58h]
long long v12; // [rsp+108h] [rbp-50h]
long long v13; // [rsp+110h] [rbp-48h]
long long v14; // [rsp+118h] [rbp-40h]
_BYTE v15[24]; // [rsp+130h] [rbp-28h] BYREF
long long v16; // [rsp+148h] [rbp-10h]
long long v17; // [rsp+150h] [rbp-8h]
v17 = a1;
v16 = a2;
std::vector<std::string>::vector(a1);
std::unordered_set<std::string>::unordered_set();
std::vector<std::string>::vector(v15);
testing::internal::SplitString(v16, 58, (long long)v15);
v13 = std::vector<std::string>::begin(v15);
v12 = std::vector<std::string>::end(v15);
v14 = std::partition<__gnu_cxx::__normal_iterator<std::string *,std::vector<std::string>>,bool (*)(std::string const&)>(
v13,
v12,
testing::internal::`anonymous namespace'::IsGlobPattern);
v11 = std::vector<std::string>::begin(v15);
v6 = std::distance<__gnu_cxx::__normal_iterator<std::string *,std::vector<std::string>>>(v11, v14);
std::vector<std::string>::reserve(a1, v6);
v10 = std::vector<std::string>::begin(v15);
v9 = std::vector<std::string>::begin(a1);
v2 = std::inserter<std::vector<std::string>>(a1, v9);
std::move<__gnu_cxx::__normal_iterator<std::string *,std::vector<std::string>>,std::insert_iterator<std::vector<std::string>>>(
v10,
v14,
v2,
v3);
v8 = std::vector<std::string>::end(v15);
v7 = std::unordered_set<std::string>::begin();
v4 = std::inserter<std::unordered_set<std::string>>(a1 + 24, v7);
std::move<__gnu_cxx::__normal_iterator<std::string *,std::vector<std::string>>,std::insert_iterator<std::unordered_set<std::string>>>(
v14,
v8,
v4,
v5);
std::vector<std::string>::~vector(v15);
}
| UnitTestFilter:
SUB RSP,0x158
MOV qword ptr [RSP + 0x150],RDI
MOV qword ptr [RSP + 0x148],RSI
MOV RDI,qword ptr [RSP + 0x150]
MOV qword ptr [RSP + 0x70],RDI
MOV RAX,RDI
MOV qword ptr [RSP + 0x68],RAX
CALL 0x001e3180
MOV RDI,qword ptr [RSP + 0x70]
ADD RDI,0x18
MOV qword ptr [RSP + 0x78],RDI
CALL 0x001ef220
LEA RDI,[RSP + 0x130]
MOV qword ptr [RSP + 0x80],RDI
CALL 0x001e3180
MOV RDX,qword ptr [RSP + 0x80]
MOV RDI,qword ptr [RSP + 0x148]
LAB_001beb29:
MOV ESI,0x3a
CALL 0x001b6390
JMP 0x001beb35
LAB_001beb35:
LEA RDI,[RSP + 0x130]
MOV qword ptr [RSP + 0x58],RDI
CALL 0x001e48e0
MOV RDI,qword ptr [RSP + 0x58]
MOV qword ptr [RSP + 0x110],RAX
CALL 0x001e4990
MOV qword ptr [RSP + 0x108],RAX
MOV RDI,qword ptr [RSP + 0x110]
MOV RSI,qword ptr [RSP + 0x108]
LEA RDX,[0x1dd3d0]
CALL 0x001ef230
MOV qword ptr [RSP + 0x60],RAX
JMP 0x001beb84
LAB_001beb84:
MOV RAX,qword ptr [RSP + 0x68]
MOV RCX,qword ptr [RSP + 0x60]
MOV qword ptr [RSP + 0x118],RCX
MOV qword ptr [RSP + 0x48],RAX
LEA RDI,[RSP + 0x130]
CALL 0x001e48e0
MOV qword ptr [RSP + 0x100],RAX
MOV RAX,qword ptr [RSP + 0x118]
MOV qword ptr [RSP + 0xf8],RAX
MOV RDI,qword ptr [RSP + 0x100]
MOV RSI,qword ptr [RSP + 0xf8]
CALL 0x001ef3a0
MOV qword ptr [RSP + 0x50],RAX
JMP 0x001bebdc
LAB_001bebdc:
MOV RSI,qword ptr [RSP + 0x50]
MOV RDI,qword ptr [RSP + 0x48]
CALL 0x001ef290
JMP 0x001bebed
LAB_001bebed:
LEA RDI,[RSP + 0x130]
CALL 0x001e48e0
MOV RDI,qword ptr [RSP + 0x68]
MOV qword ptr [RSP + 0xf0],RAX
MOV RAX,qword ptr [RSP + 0x118]
MOV qword ptr [RSP + 0xe8],RAX
CALL 0x001e48e0
MOV RDI,qword ptr [RSP + 0x68]
MOV qword ptr [RSP + 0xd0],RAX
MOV RSI,qword ptr [RSP + 0xd0]
CALL 0x001ef470
MOV qword ptr [RSP + 0x38],RDX
MOV qword ptr [RSP + 0x40],RAX
JMP 0x001bec42
LAB_001bec42:
MOV RAX,qword ptr [RSP + 0x38]
MOV RCX,qword ptr [RSP + 0x40]
MOV qword ptr [RSP + 0xd8],RCX
MOV qword ptr [RSP + 0xe0],RAX
MOV RDI,qword ptr [RSP + 0xf0]
MOV RSI,qword ptr [RSP + 0xe8]
MOV RDX,qword ptr [RSP + 0xd8]
MOV RCX,qword ptr [RSP + 0xe0]
CALL 0x001ef3e0
MOV qword ptr [RSP + 0x28],RDX
MOV qword ptr [RSP + 0x30],RAX
JMP 0x001bec8d
LAB_001bec8d:
MOV RAX,qword ptr [RSP + 0x28]
MOV RCX,qword ptr [RSP + 0x30]
MOV qword ptr [RSP + 0xc0],RCX
MOV qword ptr [RSP + 0xc8],RAX
MOV RAX,qword ptr [RSP + 0x118]
MOV qword ptr [RSP + 0xb8],RAX
LEA RDI,[RSP + 0x130]
CALL 0x001e4990
MOV RDI,qword ptr [RSP + 0x68]
MOV qword ptr [RSP + 0xb0],RAX
ADD RDI,0x18
MOV qword ptr [RSP + 0x10],RDI
CALL 0x001ef580
MOV RDI,qword ptr [RSP + 0x10]
MOV qword ptr [RSP + 0x98],RAX
MOV RSI,qword ptr [RSP + 0x98]
CALL 0x001ef540
MOV qword ptr [RSP + 0x18],RDX
MOV qword ptr [RSP + 0x20],RAX
JMP 0x001bed05
LAB_001bed05:
MOV RAX,qword ptr [RSP + 0x18]
MOV RCX,qword ptr [RSP + 0x20]
MOV qword ptr [RSP + 0xa0],RCX
MOV qword ptr [RSP + 0xa8],RAX
MOV RDI,qword ptr [RSP + 0xb8]
MOV RSI,qword ptr [RSP + 0xb0]
MOV RDX,qword ptr [RSP + 0xa0]
MOV RCX,qword ptr [RSP + 0xa8]
CALL 0x001ef4b0
LAB_001bed44:
MOV qword ptr [RSP],RDX
MOV qword ptr [RSP + 0x8],RAX
JMP 0x001bed4f
LAB_001bed4f:
MOV RAX,qword ptr [RSP]
MOV RCX,qword ptr [RSP + 0x8]
MOV qword ptr [RSP + 0x88],RCX
MOV qword ptr [RSP + 0x90],RAX
LEA RDI,[RSP + 0x130]
CALL 0x001e2f70
ADD RSP,0x158
RET
|
/* testing::internal::(anonymous namespace)::UnitTestFilter::UnitTestFilter(std::__cxx11::string
const&) */
void __thiscall
testing::internal::(anonymous_namespace)::UnitTestFilter::UnitTestFilter
(UnitTestFilter *this,string *param_1)
{
int8 uVar1;
int8 uVar2;
ulong uVar3;
int8 uVar4;
int1 auVar5 [16];
vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> local_28 [24];
string *local_10;
UnitTestFilter *local_8;
local_10 = param_1;
local_8 = this;
std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::vector
((vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *)this);
std::
unordered_set<std::__cxx11::string,std::hash<std::__cxx11::string>,std::equal_to<std::__cxx11::string>,std::allocator<std::__cxx11::string>>
::unordered_set((unordered_set<std::__cxx11::string,std::hash<std::__cxx11::string>,std::equal_to<std::__cxx11::string>,std::allocator<std::__cxx11::string>>
*)(this + 0x18));
std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::vector(local_28);
/* try { // try from 001beb29 to 001bed43 has its CatchHandler @ 001bed7d */
SplitString(local_10,':',(vector *)local_28);
uVar1 = std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::begin(local_28);
uVar2 = std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::end(local_28);
uVar1 = std::
partition<__gnu_cxx::__normal_iterator<std::__cxx11::string*,std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>>,bool(*)(std::__cxx11::string_const&)>
(uVar1,uVar2,IsGlobPattern);
uVar2 = std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::begin(local_28);
uVar3 = std::
distance<__gnu_cxx::__normal_iterator<std::__cxx11::string*,std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>>>
(uVar2,uVar1);
std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::reserve
((vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *)this,uVar3);
uVar2 = std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::begin(local_28);
uVar4 = std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::begin
((vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *)this);
auVar5 = _ZSt8inserterISt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS6_EEESt15insert_iteratorIT_ERSA_DTclsr6ranges13__cust_accessE7__beginclsr3stdE7declvalISC_EEEE
(this,uVar4);
std::
move<__gnu_cxx::__normal_iterator<std::__cxx11::string*,std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>>,std::insert_iterator<std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>>>
(uVar2,uVar1,auVar5._0_8_,auVar5._8_8_);
uVar2 = std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::end(local_28);
uVar4 = std::
unordered_set<std::__cxx11::string,std::hash<std::__cxx11::string>,std::equal_to<std::__cxx11::string>,std::allocator<std::__cxx11::string>>
::begin((unordered_set<std::__cxx11::string,std::hash<std::__cxx11::string>,std::equal_to<std::__cxx11::string>,std::allocator<std::__cxx11::string>>
*)(this + 0x18));
auVar5 = _ZSt8inserterISt13unordered_setINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4hashIS6_ESt8equal_toIS6_ESaIS6_EEESt15insert_iteratorIT_ERSE_DTclsr6ranges13__cust_accessE7__beginclsr3stdE7declvalISG_EEEE
((unordered_set<std::__cxx11::string,std::hash<std::__cxx11::string>,std::equal_to<std::__cxx11::string>,std::allocator<std::__cxx11::string>>
*)(this + 0x18),uVar4);
std::
move<__gnu_cxx::__normal_iterator<std::__cxx11::string*,std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>>,std::insert_iterator<std::unordered_set<std::__cxx11::string,std::hash<std::__cxx11::string>,std::equal_to<std::__cxx11::string>,std::allocator<std::__cxx11::string>>>>
(uVar1,uVar2,auVar5._0_8_,auVar5._8_8_);
std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::~vector(local_28);
return;
}
|
|
6,307 | minja::UnaryOpExpr::do_evaluate(std::shared_ptr<minja::Context> const&) const | monkey531[P]llama/common/minja.hpp | Value do_evaluate(const std::shared_ptr<Context> & context) const override {
if (!expr) throw std::runtime_error("UnaryOpExpr.expr is null");
auto e = expr->evaluate(context);
switch (op) {
case Op::Plus: return e;
case Op::Minus: return -e;
case Op::LogicalNot: return !e.to_bool();
case Op::Expansion:
case Op::ExpansionDict:
throw std::runtime_error("Expansion operator is only supported in function calls and collections");
}
throw std::runtime_error("Unknown unary operator");
} | O0 | cpp | minja::UnaryOpExpr::do_evaluate(std::shared_ptr<minja::Context> const&) const:
subq $0xc8, %rsp
movq %rdi, 0x30(%rsp)
movq %rdi, %rax
movq %rax, 0x38(%rsp)
movq %rdi, 0xc0(%rsp)
movq %rsi, 0xb8(%rsp)
movq %rdx, 0xb0(%rsp)
movq 0xb8(%rsp), %rdi
movq %rdi, 0x40(%rsp)
addq $0x20, %rdi
callq 0x10e0f0
testb $0x1, %al
jne 0x113fa4
movl $0x10, %edi
callq 0x5a680
movq %rax, %rdi
movq %rdi, %rax
movq %rax, 0x28(%rsp)
leaq 0xfe7c2(%rip), %rsi # 0x212724
callq 0x5a470
jmp 0x113f69
movq 0x28(%rsp), %rdi
movq 0x19003b(%rip), %rsi # 0x2a3fb0
movq 0x18fffc(%rip), %rdx # 0x2a3f78
callq 0x5aae0
movq 0x28(%rsp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xa8(%rsp)
movl %eax, 0xa4(%rsp)
callq 0x5af60
jmp 0x11415e
movq 0x40(%rsp), %rdi
addq $0x20, %rdi
callq 0x114220
movq %rax, %rsi
movq 0xb0(%rsp), %rdx
leaq 0x50(%rsp), %rdi
callq 0x114230
movq 0x40(%rsp), %rax
movl 0x30(%rax), %eax
movq %rax, 0x20(%rsp)
subq $0x4, %rax
ja 0x1140e0
movq 0x20(%rsp), %rax
leaq 0xfcfd6(%rip), %rcx # 0x210fc0
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq 0x30(%rsp), %rdi
leaq 0x50(%rsp), %rsi
callq 0x114460
movl $0x1, 0x4c(%rsp)
jmp 0x11413d
movq 0x30(%rsp), %rdi
leaq 0x50(%rsp), %rsi
callq 0x1144e0
jmp 0x114020
movl $0x1, 0x4c(%rsp)
jmp 0x11413d
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xa8(%rsp)
movl %eax, 0xa4(%rsp)
jmp 0x114154
leaq 0x50(%rsp), %rdi
callq 0x114580
movb %al, 0x1f(%rsp)
jmp 0x114056
movq 0x30(%rsp), %rdi
movb 0x1f(%rsp), %al
notb %al
andb $0x1, %al
movb %al, 0x4b(%rsp)
leaq 0x4b(%rsp), %rsi
callq 0x114670
jmp 0x114073
movl $0x1, 0x4c(%rsp)
jmp 0x11413d
movl $0x10, %edi
callq 0x5a680
movq %rax, %rdi
movq %rdi, %rax
movq %rax, 0x10(%rsp)
leaq 0xfe6a1(%rip), %rsi # 0x21273d
callq 0x5a470
jmp 0x1140a3
movq 0x10(%rsp), %rdi
movq 0x18ff01(%rip), %rsi # 0x2a3fb0
movq 0x18fec2(%rip), %rdx # 0x2a3f78
callq 0x5aae0
jmp 0x11416b
movq 0x10(%rsp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xa8(%rsp)
movl %eax, 0xa4(%rsp)
callq 0x5af60
jmp 0x114154
movl $0x10, %edi
callq 0x5a680
movq %rax, %rdi
movq %rdi, %rax
movq %rax, 0x8(%rsp)
leaq 0xfe688(%rip), %rsi # 0x212784
callq 0x5a470
jmp 0x114103
movq 0x8(%rsp), %rdi
movq 0x18fea1(%rip), %rsi # 0x2a3fb0
movq 0x18fe62(%rip), %rdx # 0x2a3f78
callq 0x5aae0
jmp 0x11416b
movq 0x8(%rsp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xa8(%rsp)
movl %eax, 0xa4(%rsp)
callq 0x5af60
jmp 0x114154
leaq 0x50(%rsp), %rdi
callq 0x1146d0
movq 0x38(%rsp), %rax
addq $0xc8, %rsp
retq
leaq 0x50(%rsp), %rdi
callq 0x1146d0
movq 0xa8(%rsp), %rdi
callq 0x5aba0
nopl (%rax,%rax)
| _ZNK5minja11UnaryOpExpr11do_evaluateERKSt10shared_ptrINS_7ContextEE:
sub rsp, 0C8h
mov [rsp+0C8h+var_98], rdi
mov rax, rdi
mov [rsp+0C8h+var_90], rax
mov [rsp+0C8h+var_8], rdi
mov [rsp+0C8h+var_10], rsi
mov [rsp+0C8h+var_18], rdx
mov rdi, [rsp+0C8h+var_10]
mov [rsp+0C8h+var_88], rdi
add rdi, 20h ; ' '
call _ZNKSt12__shared_ptrIN5minja10ExpressionELN9__gnu_cxx12_Lock_policyE2EEcvbEv; std::__shared_ptr<minja::Expression,(__gnu_cxx::_Lock_policy)2>::operator bool(void)
test al, 1
jnz short loc_113FA4
mov edi, 10h; thrown_size
call ___cxa_allocate_exception
mov rdi, rax; this
mov rax, rdi
mov [rsp+0C8h+var_A0], rax
lea rsi, aUnaryopexprExp; "UnaryOpExpr.expr is null"
call __ZNSt13runtime_errorC1EPKc; std::runtime_error::runtime_error(char const*)
jmp short $+2
loc_113F69:
mov rdi, [rsp+0C8h+var_A0]; void *
mov rsi, cs:_ZTISt13runtime_error_ptr; lptinfo
mov rdx, cs:_ZNSt13runtime_errorD1Ev_ptr; void (*)(void *)
call ___cxa_throw
mov rdi, [rsp+0C8h+var_A0]; void *
mov rcx, rax
mov eax, edx
mov [rsp+0C8h+var_20], rcx
mov [rsp+0C8h+var_24], eax
call ___cxa_free_exception
jmp loc_11415E
loc_113FA4:
mov rdi, [rsp+0C8h+var_88]
add rdi, 20h ; ' '
call _ZNKSt19__shared_ptr_accessIN5minja10ExpressionELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv; std::__shared_ptr_access<minja::Expression,(__gnu_cxx::_Lock_policy)2,false,false>::operator->(void)
mov rsi, rax
mov rdx, [rsp+0C8h+var_18]
lea rdi, [rsp+0C8h+var_78]
call _ZNK5minja10Expression8evaluateERKSt10shared_ptrINS_7ContextEE; minja::Expression::evaluate(std::shared_ptr<minja::Context> const&)
mov rax, [rsp+0C8h+var_88]
mov eax, [rax+30h]
mov [rsp+0C8h+var_A8], rax
sub rax, 4; switch 5 cases
ja def_113FF1; jumptable 0000000000113FF1 default case
mov rax, [rsp+0C8h+var_A8]
lea rcx, jpt_113FF1
movsxd rax, ds:(jpt_113FF1 - 210FC0h)[rcx+rax*4]
add rax, rcx
jmp rax; switch jump
loc_113FF3:
mov rdi, [rsp+0C8h+var_98]; jumptable 0000000000113FF1 case 0
lea rsi, [rsp+0C8h+var_78]
call _ZN5minja5ValueC2EOS0_; minja::Value::Value(minja::Value&&)
mov [rsp+0C8h+var_7C], 1
jmp loc_11413D
loc_11400F:
mov rdi, [rsp+0C8h+var_98]; jumptable 0000000000113FF1 case 1
lea rsi, [rsp+0C8h+var_78]
call _ZNK5minja5ValuengEv; minja::Value::operator-(void)
jmp short $+2
loc_114020:
mov [rsp+0C8h+var_7C], 1
jmp loc_11413D
mov rcx, rax
mov eax, edx
mov [rsp+0C8h+var_20], rcx
mov [rsp+0C8h+var_24], eax
jmp loc_114154
loc_114046:
lea rdi, [rsp+0C8h+var_78]; jumptable 0000000000113FF1 case 2
call _ZNK5minja5Value7to_boolEv; minja::Value::to_bool(void)
mov [rsp+0C8h+var_A9], al
jmp short $+2
loc_114056:
mov rdi, [rsp+0C8h+var_98]; this
mov al, [rsp+0C8h+var_A9]
not al
and al, 1
mov [rsp+0C8h+var_7D], al
lea rsi, [rsp+0C8h+var_7D]; bool *
call _ZN5minja5ValueC2ERKb; minja::Value::Value(bool const&)
jmp short $+2
loc_114073:
mov [rsp+0C8h+var_7C], 1
jmp loc_11413D
loc_114080:
mov edi, 10h; jumptable 0000000000113FF1 cases 3,4
call ___cxa_allocate_exception
mov rdi, rax; this
mov rax, rdi
mov [rsp+0C8h+var_B8], rax
lea rsi, aExpansionOpera; "Expansion operator is only supported in"...
call __ZNSt13runtime_errorC1EPKc; std::runtime_error::runtime_error(char const*)
jmp short $+2
loc_1140A3:
mov rdi, [rsp+0C8h+var_B8]; void *
mov rsi, cs:_ZTISt13runtime_error_ptr; lptinfo
mov rdx, cs:_ZNSt13runtime_errorD1Ev_ptr; void (*)(void *)
call ___cxa_throw
jmp loc_11416B
mov rdi, [rsp+0C8h+var_B8]; void *
mov rcx, rax
mov eax, edx
mov [rsp+0C8h+var_20], rcx
mov [rsp+0C8h+var_24], eax
call ___cxa_free_exception
jmp short loc_114154
def_113FF1:
mov edi, 10h; jumptable 0000000000113FF1 default case
call ___cxa_allocate_exception
mov rdi, rax; this
mov rax, rdi
mov [rsp+0C8h+var_C0], rax
lea rsi, aUnknownUnaryOp; "Unknown unary operator"
call __ZNSt13runtime_errorC1EPKc; std::runtime_error::runtime_error(char const*)
jmp short $+2
loc_114103:
mov rdi, [rsp+0C8h+var_C0]; void *
mov rsi, cs:_ZTISt13runtime_error_ptr; lptinfo
mov rdx, cs:_ZNSt13runtime_errorD1Ev_ptr; void (*)(void *)
call ___cxa_throw
jmp short loc_11416B
mov rdi, [rsp+0C8h+var_C0]; void *
mov rcx, rax
mov eax, edx
mov [rsp+0C8h+var_20], rcx
mov [rsp+0C8h+var_24], eax
call ___cxa_free_exception
jmp short loc_114154
loc_11413D:
lea rdi, [rsp+0C8h+var_78]; this
call _ZN5minja5ValueD2Ev; minja::Value::~Value()
mov rax, [rsp+0C8h+var_90]
add rsp, 0C8h
retn
loc_114154:
lea rdi, [rsp+0C8h+var_78]; this
call _ZN5minja5ValueD2Ev; minja::Value::~Value()
loc_11415E:
mov rdi, [rsp+0C8h+var_20]
call __Unwind_Resume
loc_11416B:
nop dword ptr [rax+rax+00h]
| minja::Value * minja::UnaryOpExpr::do_evaluate(minja::Value *a1, long long a2, long long a3)
{
long long v3; // rax
std::runtime_error *v5; // [rsp+8h] [rbp-C0h]
std::runtime_error *v6; // [rsp+10h] [rbp-B8h]
std::runtime_error *exception; // [rsp+28h] [rbp-A0h]
bool v8; // [rsp+4Bh] [rbp-7Dh] BYREF
int v9; // [rsp+4Ch] [rbp-7Ch]
_BYTE v10[84]; // [rsp+50h] [rbp-78h] BYREF
long long v11; // [rsp+B0h] [rbp-18h]
long long v12; // [rsp+B8h] [rbp-10h]
minja::Value *v13; // [rsp+C0h] [rbp-8h]
v13 = a1;
v12 = a2;
v11 = a3;
if ( !std::__shared_ptr<minja::Expression,(__gnu_cxx::_Lock_policy)2>::operator bool((_QWORD *)(a2 + 32)) )
{
exception = (std::runtime_error *)__cxa_allocate_exception(0x10uLL);
std::runtime_error::runtime_error(exception, "UnaryOpExpr.expr is null");
__cxa_throw(
exception,
(struct type_info *)&`typeinfo for'std::runtime_error,
(void (*)(void *))&std::runtime_error::~runtime_error);
}
v3 = std::__shared_ptr_access<minja::Expression,(__gnu_cxx::_Lock_policy)2,false,false>::operator->(a2 + 32);
minja::Expression::evaluate(v10, v3, v11);
switch ( *(_DWORD *)(a2 + 48) )
{
case 0:
minja::Value::Value(a1, v10);
v9 = 1;
break;
case 1:
minja::Value::operator-(a1, v10);
v9 = 1;
break;
case 2:
v8 = (minja::Value::to_bool((minja::Value *)v10) & 1) == 0;
minja::Value::Value(a1, &v8);
v9 = 1;
break;
case 3:
case 4:
v6 = (std::runtime_error *)__cxa_allocate_exception(0x10uLL);
std::runtime_error::runtime_error(v6, "Expansion operator is only supported in function calls and collections");
__cxa_throw(
v6,
(struct type_info *)&`typeinfo for'std::runtime_error,
(void (*)(void *))&std::runtime_error::~runtime_error);
default:
v5 = (std::runtime_error *)__cxa_allocate_exception(0x10uLL);
std::runtime_error::runtime_error(v5, "Unknown unary operator");
__cxa_throw(
v5,
(struct type_info *)&`typeinfo for'std::runtime_error,
(void (*)(void *))&std::runtime_error::~runtime_error);
}
minja::Value::~Value((minja::Value *)v10);
return a1;
}
| |||
6,308 | minja::UnaryOpExpr::do_evaluate(std::shared_ptr<minja::Context> const&) const | monkey531[P]llama/common/minja.hpp | Value do_evaluate(const std::shared_ptr<Context> & context) const override {
if (!expr) throw std::runtime_error("UnaryOpExpr.expr is null");
auto e = expr->evaluate(context);
switch (op) {
case Op::Plus: return e;
case Op::Minus: return -e;
case Op::LogicalNot: return !e.to_bool();
case Op::Expansion:
case Op::ExpansionDict:
throw std::runtime_error("Expansion operator is only supported in function calls and collections");
}
throw std::runtime_error("Unknown unary operator");
} | O1 | cpp | minja::UnaryOpExpr::do_evaluate(std::shared_ptr<minja::Context> const&) const:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x58, %rsp
movq %rsi, %r14
movq 0x20(%rsi), %rsi
testq %rsi, %rsi
je 0x878d6
movq %rdi, %rbx
leaq 0x8(%rsp), %rdi
callq 0x87a32
movl 0x30(%r14), %eax
cmpq $0x4, %rax
ja 0x87926
leaq 0x6a301(%rip), %rcx # 0xf1a8c
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
xorps %xmm0, %xmm0
movups %xmm0, (%rbx)
xorl %r12d, %r12d
movq %r12, 0x18(%rbx)
leaq 0x48(%rsp), %r15
movups -0x30(%r15), %xmm0
movq %r12, -0x28(%r15)
movups %xmm0, 0x10(%rbx)
movq %r12, -0x30(%r15)
movq %r12, 0x28(%rbx)
movups -0x20(%r15), %xmm0
movq %r12, -0x18(%r15)
movups %xmm0, 0x20(%rbx)
movq %r12, -0x20(%r15)
movq %r12, 0x38(%rbx)
movups -0x10(%r15), %xmm0
movq %r12, -0x8(%r15)
movups %xmm0, 0x30(%rbx)
movq %r12, -0x10(%r15)
leaq 0x40(%rbx), %r14
movups (%r15), %xmm0
movups %xmm0, 0x40(%rbx)
movq %r15, %rdi
xorl %esi, %esi
callq 0x59472
movb $0x0, (%r15)
movq %r12, 0x8(%r15)
jmp 0x87832
leaq 0x8(%rsp), %rdi
callq 0x87c34
xorb $0x1, %al
leaq 0x40(%rbx), %r14
xorps %xmm0, %xmm0
movups %xmm0, 0x40(%rbx)
movups %xmm0, 0x30(%rbx)
movups %xmm0, 0x20(%rbx)
movups %xmm0, 0x10(%rbx)
movups %xmm0, (%rbx)
movzbl %al, %esi
movq %r14, %rdi
callq 0x60db6
movq %r14, %rdi
movl $0x1, %esi
callq 0x59472
jmp 0x8784e
leaq 0x8(%rsp), %rsi
movq %rbx, %rdi
callq 0x87bb0
leaq 0x48(%rsp), %r14
movq %r14, %rdi
xorl %esi, %esi
callq 0x59472
movq %r14, %rdi
callq 0x5ec5e
movq -0x8(%r14), %rdi
testq %rdi, %rdi
je 0x87873
callq 0x6e5ca
movq 0x30(%rsp), %rdi
testq %rdi, %rdi
je 0x87882
callq 0x6e5ca
movq 0x20(%rsp), %rdi
testq %rdi, %rdi
je 0x87891
callq 0x6e5ca
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0x878c7
movq 0xa76e6(%rip), %rax # 0x12ef88
cmpb $0x0, (%rax)
je 0x878b2
movl 0xc(%rdi), %eax
leal -0x1(%rax), %ecx
movl %ecx, 0xc(%rdi)
jmp 0x878bc
movl $0xffffffff, %eax # imm = 0xFFFFFFFF
lock
xaddl %eax, 0xc(%rdi)
cmpl $0x1, %eax
jne 0x878c7
movq (%rdi), %rax
callq *0x18(%rax)
movq %rbx, %rax
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movl $0x10, %edi
callq 0x1b450
movq %rax, %r14
leaq 0x6b473(%rip), %rsi # 0xf2d5d
movq %rax, %rdi
callq 0x1b330
movq 0xa76f7(%rip), %rsi # 0x12eff0
movq 0xa7660(%rip), %rdx # 0x12ef60
movq %r14, %rdi
callq 0x1bf10
movl $0x10, %edi
callq 0x1b450
movq %rax, %r14
leaq 0x6b45a(%rip), %rsi # 0xf2d76
movq %rax, %rdi
callq 0x1b330
jmp 0x87942
movl $0x10, %edi
callq 0x1b450
movq %rax, %r14
leaq 0x6b483(%rip), %rsi # 0xf2dbd
movq %rax, %rdi
callq 0x1b330
movq 0xa76a7(%rip), %rsi # 0x12eff0
movq 0xa7610(%rip), %rdx # 0x12ef60
movq %r14, %rdi
callq 0x1bf10
jmp 0x8795c
jmp 0x87976
movq %rax, %rbx
movq %r14, %rdi
callq 0x1b690
jmp 0x87979
movq %rax, %rbx
movq %r14, %rdi
callq 0x1b690
jmp 0x87983
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x87d28
movq %rbx, %rdi
callq 0x1bf90
nop
| _ZNK5minja11UnaryOpExpr11do_evaluateERKSt10shared_ptrINS_7ContextEE:
push r15
push r14
push r12
push rbx
sub rsp, 58h
mov r14, rsi
mov rsi, [rsi+20h]
test rsi, rsi
jz loc_878D6
mov rbx, rdi
lea rdi, [rsp+78h+var_70]
call _ZNK5minja10Expression8evaluateERKSt10shared_ptrINS_7ContextEE; minja::Expression::evaluate(std::shared_ptr<minja::Context> const&)
mov eax, [r14+30h]
cmp rax, 4; switch 5 cases
ja def_87792; jumptable 0000000000087792 default case
lea rcx, jpt_87792
movsxd rax, ds:(jpt_87792 - 0F1A8Ch)[rcx+rax*4]
add rax, rcx
jmp rax; switch jump
loc_87794:
xorps xmm0, xmm0; jumptable 0000000000087792 case 0
movups xmmword ptr [rbx], xmm0
xor r12d, r12d
mov [rbx+18h], r12
lea r15, [rsp+78h+var_30]
movups xmm0, xmmword ptr [r15-30h]
mov [r15-28h], r12
movups xmmword ptr [rbx+10h], xmm0
mov [r15-30h], r12
mov [rbx+28h], r12
movups xmm0, xmmword ptr [r15-20h]
mov [r15-18h], r12
movups xmmword ptr [rbx+20h], xmm0
mov [r15-20h], r12
mov [rbx+38h], r12
movups xmm0, xmmword ptr [r15-10h]
mov [r15-8], r12
movups xmmword ptr [rbx+30h], xmm0
mov [r15-10h], r12
lea r14, [rbx+40h]
movups xmm0, xmmword ptr [r15]
movups xmmword ptr [rbx+40h], xmm0
mov rdi, r15
xor esi, esi
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool)
mov byte ptr [r15], 0
mov [r15+8], r12
jmp short loc_87832
loc_87801:
lea rdi, [rsp+78h+var_70]; jumptable 0000000000087792 case 2
call _ZNK5minja5Value7to_boolEv; minja::Value::to_bool(void)
xor al, 1
lea r14, [rbx+40h]
xorps xmm0, xmm0
movups xmmword ptr [rbx+40h], xmm0
movups xmmword ptr [rbx+30h], xmm0
movups xmmword ptr [rbx+20h], xmm0
movups xmmword ptr [rbx+10h], xmm0
movups xmmword ptr [rbx], xmm0
movzx esi, al
mov rdi, r14
call _ZN8nlohmann16json_abi_v3_11_36detail20external_constructorILNS1_7value_tE4EE9constructINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES8_IhSaIhEEvEEEEvRT_NSJ_9boolean_tE; nlohmann::json_abi_v3_11_3::detail::external_constructor<(nlohmann::json_abi_v3_11_3::detail::value_t)4>::construct<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> &,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::boolean_t)
loc_87832:
mov rdi, r14
mov esi, 1
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool)
jmp short loc_8784E
loc_87841:
lea rsi, [rsp+78h+var_70]; jumptable 0000000000087792 case 1
mov rdi, rbx
call _ZNK5minja5ValuengEv; minja::Value::operator-(void)
loc_8784E:
lea r14, [rsp+78h+var_30]
mov rdi, r14
xor esi, esi
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool)
mov rdi, r14
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::data::~data()
mov rdi, [r14-8]
test rdi, rdi
jz short loc_87873
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_87873:
mov rdi, [rsp+78h+var_48]
test rdi, rdi
jz short loc_87882
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_87882:
mov rdi, [rsp+78h+var_58]
test rdi, rdi
jz short loc_87891
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_87891:
mov rdi, [rsp+78h+var_68]
test rdi, rdi
jz short loc_878C7
mov rax, cs:__libc_single_threaded_ptr
cmp byte ptr [rax], 0
jz short loc_878B2
mov eax, [rdi+0Ch]
lea ecx, [rax-1]
mov [rdi+0Ch], ecx
jmp short loc_878BC
loc_878B2:
mov eax, 0FFFFFFFFh
lock xadd [rdi+0Ch], eax
loc_878BC:
cmp eax, 1
jnz short loc_878C7
mov rax, [rdi]
call qword ptr [rax+18h]
loc_878C7:
mov rax, rbx
add rsp, 58h
pop rbx
pop r12
pop r14
pop r15
retn
loc_878D6:
mov edi, 10h; thrown_size
call ___cxa_allocate_exception
mov r14, rax
lea rsi, aUnaryopexprExp; "UnaryOpExpr.expr is null"
mov rdi, rax; this
call __ZNSt13runtime_errorC1EPKc; std::runtime_error::runtime_error(char const*)
mov rsi, cs:_ZTISt13runtime_error_ptr; lptinfo
mov rdx, cs:_ZTISt19_Sp_make_shared_tag; void (*)(void *)
mov rdi, r14; void *
call ___cxa_throw
loc_87908:
mov edi, 10h; jumptable 0000000000087792 cases 3,4
call ___cxa_allocate_exception
mov r14, rax
lea rsi, aExpansionOpera; "Expansion operator is only supported in"...
mov rdi, rax; this
call __ZNSt13runtime_errorC1EPKc; std::runtime_error::runtime_error(char const*)
jmp short loc_87942
def_87792:
mov edi, 10h; jumptable 0000000000087792 default case
call ___cxa_allocate_exception
mov r14, rax
lea rsi, aUnknownUnaryOp; "Unknown unary operator"
mov rdi, rax; this
call __ZNSt13runtime_errorC1EPKc; std::runtime_error::runtime_error(char const*)
loc_87942:
mov rsi, cs:_ZTISt13runtime_error_ptr; lptinfo
mov rdx, cs:_ZTISt19_Sp_make_shared_tag; void (*)(void *)
mov rdi, r14; void *
call ___cxa_throw
jmp short loc_8795C
jmp short loc_87976
loc_8795C:
mov rbx, rax
mov rdi, r14; void *
call ___cxa_free_exception
jmp short loc_87979
mov rbx, rax
mov rdi, r14; void *
call ___cxa_free_exception
jmp short loc_87983
loc_87976:
mov rbx, rax
loc_87979:
lea rdi, [rsp+78h+var_70]; this
call _ZN5minja5ValueD2Ev; minja::Value::~Value()
loc_87983:
mov rdi, rbx
call __Unwind_Resume
| do_evaluate:
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
SUB RSP,0x58
MOV R14,RSI
MOV RSI,qword ptr [RSI + 0x20]
TEST RSI,RSI
JZ 0x001878d6
MOV RBX,RDI
LEA RDI,[RSP + 0x8]
CALL 0x00187a32
MOV EAX,dword ptr [R14 + 0x30]
CMP RAX,0x4
JA 0x00187926
LEA RCX,[0x1f1a8c]
MOVSXD RAX,dword ptr [RCX + RAX*0x4]
ADD RAX,RCX
switchD:
JMP RAX
caseD_0:
XORPS XMM0,XMM0
MOVUPS xmmword ptr [RBX],XMM0
XOR R12D,R12D
MOV qword ptr [RBX + 0x18],R12
LEA R15,[RSP + 0x48]
MOVUPS XMM0,xmmword ptr [R15 + -0x30]
MOV qword ptr [R15 + -0x28],R12
MOVUPS xmmword ptr [RBX + 0x10],XMM0
MOV qword ptr [R15 + -0x30],R12
MOV qword ptr [RBX + 0x28],R12
MOVUPS XMM0,xmmword ptr [R15 + -0x20]
MOV qword ptr [R15 + -0x18],R12
MOVUPS xmmword ptr [RBX + 0x20],XMM0
MOV qword ptr [R15 + -0x20],R12
MOV qword ptr [RBX + 0x38],R12
MOVUPS XMM0,xmmword ptr [R15 + -0x10]
MOV qword ptr [R15 + -0x8],R12
MOVUPS xmmword ptr [RBX + 0x30],XMM0
MOV qword ptr [R15 + -0x10],R12
LEA R14,[RBX + 0x40]
MOVUPS XMM0,xmmword ptr [R15]
MOVUPS xmmword ptr [RBX + 0x40],XMM0
MOV RDI,R15
XOR ESI,ESI
CALL 0x00159472
MOV byte ptr [R15],0x0
MOV qword ptr [R15 + 0x8],R12
JMP 0x00187832
caseD_2:
LEA RDI,[RSP + 0x8]
CALL 0x00187c34
XOR AL,0x1
LEA R14,[RBX + 0x40]
XORPS XMM0,XMM0
MOVUPS xmmword ptr [RBX + 0x40],XMM0
MOVUPS xmmword ptr [RBX + 0x30],XMM0
MOVUPS xmmword ptr [RBX + 0x20],XMM0
MOVUPS xmmword ptr [RBX + 0x10],XMM0
MOVUPS xmmword ptr [RBX],XMM0
MOVZX ESI,AL
MOV RDI,R14
CALL 0x00160db6
LAB_00187832:
MOV RDI,R14
MOV ESI,0x1
CALL 0x00159472
JMP 0x0018784e
caseD_1:
LEA RSI,[RSP + 0x8]
MOV RDI,RBX
CALL 0x00187bb0
LAB_0018784e:
LEA R14,[RSP + 0x48]
MOV RDI,R14
XOR ESI,ESI
CALL 0x00159472
MOV RDI,R14
CALL 0x0015ec5e
MOV RDI,qword ptr [R14 + -0x8]
TEST RDI,RDI
JZ 0x00187873
CALL 0x0016e5ca
LAB_00187873:
MOV RDI,qword ptr [RSP + 0x30]
TEST RDI,RDI
JZ 0x00187882
CALL 0x0016e5ca
LAB_00187882:
MOV RDI,qword ptr [RSP + 0x20]
TEST RDI,RDI
JZ 0x00187891
CALL 0x0016e5ca
LAB_00187891:
MOV RDI,qword ptr [RSP + 0x10]
TEST RDI,RDI
JZ 0x001878c7
MOV RAX,qword ptr [0x0022ef88]
CMP byte ptr [RAX],0x0
JZ 0x001878b2
MOV EAX,dword ptr [RDI + 0xc]
LEA ECX,[RAX + -0x1]
MOV dword ptr [RDI + 0xc],ECX
JMP 0x001878bc
LAB_001878b2:
MOV EAX,0xffffffff
XADD.LOCK dword ptr [RDI + 0xc],EAX
LAB_001878bc:
CMP EAX,0x1
JNZ 0x001878c7
MOV RAX,qword ptr [RDI]
CALL qword ptr [RAX + 0x18]
LAB_001878c7:
MOV RAX,RBX
ADD RSP,0x58
POP RBX
POP R12
POP R14
POP R15
RET
LAB_001878d6:
MOV EDI,0x10
CALL 0x0011b450
MOV R14,RAX
LAB_001878e3:
LEA RSI,[0x1f2d5d]
MOV RDI,RAX
CALL 0x0011b330
LAB_001878f2:
MOV RSI,qword ptr [0x0022eff0]
MOV RDX,qword ptr [0x0022ef60]
MOV RDI,R14
CALL 0x0011bf10
caseD_3:
MOV EDI,0x10
CALL 0x0011b450
MOV R14,RAX
LAB_00187915:
LEA RSI,[0x1f2d76]
MOV RDI,RAX
CALL 0x0011b330
LAB_00187924:
JMP 0x00187942
default:
MOV EDI,0x10
CALL 0x0011b450
MOV R14,RAX
LAB_00187933:
LEA RSI,[0x1f2dbd]
MOV RDI,RAX
CALL 0x0011b330
LAB_00187942:
MOV RSI,qword ptr [0x0022eff0]
MOV RDX,qword ptr [0x0022ef60]
MOV RDI,R14
CALL 0x0011bf10
|
/* minja::UnaryOpExpr::do_evaluate(std::shared_ptr<minja::Context> const&) const */
UnaryOpExpr * __thiscall minja::UnaryOpExpr::do_evaluate(UnaryOpExpr *this,shared_ptr *param_1)
{
int *piVar1;
_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *p_Var2;
_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *p_Var3;
_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *p_Var4;
byte bVar5;
int iVar6;
runtime_error *prVar7;
Expression local_70 [8];
long *local_68;
int8 local_60;
_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *p_Stack_58;
int8 local_50;
_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *p_Stack_48;
int8 local_40;
_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *p_Stack_38;
data local_30;
int7 uStack_2f;
int8 uStack_28;
if (*(shared_ptr **)(param_1 + 0x20) == (shared_ptr *)0x0) {
prVar7 = (runtime_error *)__cxa_allocate_exception(0x10);
/* try { // try from 001878e3 to 001878f1 has its CatchHandler @ 00187969 */
std::runtime_error::runtime_error(prVar7,"UnaryOpExpr.expr is null");
/* WARNING: Subroutine does not return */
__cxa_throw(prVar7,PTR_typeinfo_0022eff0,PTR__runtime_error_0022ef60);
}
Expression::evaluate(local_70,*(shared_ptr **)(param_1 + 0x20));
p_Var4 = p_Stack_38;
p_Var3 = p_Stack_48;
p_Var2 = p_Stack_58;
switch(*(int4 *)(param_1 + 0x30)) {
case 0:
*(int8 *)this = 0;
*(int8 *)(this + 8) = 0;
*(int8 *)(this + 0x18) = 0;
p_Stack_58 = (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0;
*(int8 *)(this + 0x10) = local_60;
*(_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> **)(this + 0x18) = p_Var2;
local_60 = 0;
*(int8 *)(this + 0x28) = 0;
p_Stack_48 = (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0;
*(int8 *)(this + 0x20) = local_50;
*(_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> **)(this + 0x28) = p_Var3;
local_50 = 0;
*(int8 *)(this + 0x38) = 0;
p_Stack_38 = (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0;
*(int8 *)(this + 0x30) = local_40;
*(_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> **)(this + 0x38) = p_Var4;
local_40 = 0;
*(ulong *)(this + 0x40) = CONCAT71(uStack_2f,local_30);
*(int8 *)(this + 0x48) = uStack_28;
nlohmann::json_abi_v3_11_3::
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::assert_invariant(SUB81(&local_30,0));
local_30 = (data)0x0;
uStack_28 = 0;
break;
case 1:
/* try { // try from 00187841 to 0018784d has its CatchHandler @ 00187976 */
Value::operator-((Value *)this);
goto LAB_0018784e;
case 2:
/* try { // try from 00187801 to 0018780a has its CatchHandler @ 0018795a */
bVar5 = Value::to_bool((Value *)local_70);
*(int8 *)(this + 0x40) = 0;
*(int8 *)(this + 0x48) = 0;
*(int8 *)(this + 0x30) = 0;
*(int8 *)(this + 0x38) = 0;
*(int8 *)(this + 0x20) = 0;
*(int8 *)(this + 0x28) = 0;
*(int8 *)(this + 0x10) = 0;
*(int8 *)(this + 0x18) = 0;
*(int8 *)this = 0;
*(int8 *)(this + 8) = 0;
nlohmann::json_abi_v3_11_3::detail::
external_constructor<(nlohmann::json_abi_v3_11_3::detail::value_t)4>::
construct<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>
(this + 0x40,bVar5 ^ 1);
break;
case 3:
case 4:
prVar7 = (runtime_error *)__cxa_allocate_exception(0x10);
/* try { // try from 00187915 to 00187923 has its CatchHandler @ 0018795c */
std::runtime_error::runtime_error
(prVar7,"Expansion operator is only supported in function calls and collections");
goto LAB_00187942;
default:
prVar7 = (runtime_error *)__cxa_allocate_exception(0x10);
/* try { // try from 00187933 to 00187941 has its CatchHandler @ 00187958 */
std::runtime_error::runtime_error(prVar7,"Unknown unary operator");
LAB_00187942:
/* try { // try from 00187942 to 00187957 has its CatchHandler @ 00187976 */
/* WARNING: Subroutine does not return */
__cxa_throw(prVar7,PTR_typeinfo_0022eff0,PTR__runtime_error_0022ef60);
}
nlohmann::json_abi_v3_11_3::
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::assert_invariant((bool)((char)this + '@'));
LAB_0018784e:
nlohmann::json_abi_v3_11_3::
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::assert_invariant(SUB81(&local_30,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(&local_30);
if (p_Stack_38 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) {
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(p_Stack_38);
}
if (p_Stack_48 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) {
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(p_Stack_48);
}
if (p_Stack_58 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) {
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(p_Stack_58);
}
if (local_68 != (long *)0x0) {
if (*PTR___libc_single_threaded_0022ef88 == '\0') {
LOCK();
piVar1 = (int *)((long)local_68 + 0xc);
iVar6 = *piVar1;
*piVar1 = *piVar1 + -1;
UNLOCK();
}
else {
iVar6 = *(int *)((long)local_68 + 0xc);
*(int *)((long)local_68 + 0xc) = iVar6 + -1;
}
if (iVar6 == 1) {
(**(code **)(*local_68 + 0x18))();
}
}
return this;
}
|
||
6,309 | bool nlohmann::json_abi_v3_11_2::detail::iter_impl<nlohmann::json_abi_v3_11_2::basic_json<std::map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_2::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>>>::operator==<nlohmann::json_abi_v3_11_2::detail::iter_impl<nlohmann::json_abi_v3_11_2::basic_json<std::map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_2::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>>>, nullptr>(nlohmann::json_abi_v3_11_2::detail::iter_impl<nlohmann::json_abi_v3_11_2::basic_json<std::map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_2::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>>> const&) const | 7CodeWizard[P]stablediffusion/thirdparty/json.hpp | bool operator==(const IterImpl& other) const
{
// if objects are not the same, the comparison is undefined
if (JSON_HEDLEY_UNLIKELY(m_object != other.m_object))
{
JSON_THROW(invalid_iterator::create(212, "cannot compare iterators of different containers", m_object));
}
JSON_ASSERT(m_object != nullptr);
switch (m_object->m_type)
{
case value_t::object:
return (m_it.object_iterator == other.m_it.object_iterator);
case value_t::array:
return (m_it.array_iterator == other.m_it.array_iterator);
case value_t::null:
case value_t::string:
case value_t::boolean:
case value_t::number_integer:
case value_t::number_unsigned:
case value_t::number_float:
case value_t::binary:
case value_t::discarded:
default:
return (m_it.primitive_iterator == other.m_it.primitive_iterator);
}
} | O0 | cpp | bool nlohmann::json_abi_v3_11_2::detail::iter_impl<nlohmann::json_abi_v3_11_2::basic_json<std::map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_2::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>>>::operator==<nlohmann::json_abi_v3_11_2::detail::iter_impl<nlohmann::json_abi_v3_11_2::basic_json<std::map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_2::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>>>, nullptr>(nlohmann::json_abi_v3_11_2::detail::iter_impl<nlohmann::json_abi_v3_11_2::basic_json<std::map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_2::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>>> const&) const:
subq $0x88, %rsp
movq %rdi, 0x78(%rsp)
movq %rsi, 0x70(%rsp)
movq 0x78(%rsp), %rax
movq %rax, 0x20(%rsp)
movq (%rax), %rax
movq 0x70(%rsp), %rcx
cmpq (%rcx), %rax
setne %al
xorb $-0x1, %al
xorb $-0x1, %al
testb $0x1, %al
jne 0xde2f6
jmp 0xde3bb
movb $0x1, 0x3b(%rsp)
movl $0x20, %edi
callq 0xb320
movq %rax, 0x10(%rsp)
leaq 0x4f(%rsp), %rdi
movq %rdi, 0x18(%rsp)
callq 0xbd40
movq 0x18(%rsp), %rdx
leaq 0xa6e14(%rip), %rsi # 0x185139
leaq 0x50(%rsp), %rdi
callq 0x30260
jmp 0xde331
movq 0x10(%rsp), %rdi
movq 0x20(%rsp), %rax
movq (%rax), %rcx
movl $0xd4, %esi
leaq 0x50(%rsp), %rdx
callq 0xde490
jmp 0xde34f
movq 0x10(%rsp), %rdi
movb $0x0, 0x3b(%rsp)
leaq 0xf9130(%rip), %rsi # 0x1d7490
leaq 0x2d9(%rip), %rdx # 0xde640
callq 0xbcb0
jmp 0xde483
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x40(%rsp)
movl %eax, 0x3c(%rsp)
jmp 0xde399
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x40(%rsp)
movl %eax, 0x3c(%rsp)
leaq 0x50(%rsp), %rdi
callq 0xbf00
leaq 0x4f(%rsp), %rdi
callq 0xb820
testb $0x1, 0x3b(%rsp)
jne 0xde3ac
jmp 0xde3b6
movq 0x10(%rsp), %rdi
callq 0xb540
jmp 0xde479
movq 0x20(%rsp), %rax
movq (%rax), %rax
movzbl (%rax), %eax
movq %rax, 0x8(%rsp)
subq $0x9, %rax
ja 0xde434
movq 0x8(%rsp), %rax
leaq 0xa4ab7(%rip), %rcx # 0x182e94
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq 0x20(%rsp), %rdi
addq $0x8, %rdi
movq 0x70(%rsp), %rsi
addq $0x8, %rsi
callq 0xde650
andb $0x1, %al
movb %al, 0x87(%rsp)
jmp 0xde468
movq 0x20(%rsp), %rdi
addq $0x8, %rdi
addq $0x8, %rdi
movq 0x70(%rsp), %rsi
addq $0x8, %rsi
addq $0x8, %rsi
callq 0xde670
andb $0x1, %al
movb %al, 0x87(%rsp)
jmp 0xde468
jmp 0xde434
movq 0x20(%rsp), %rax
movq 0x18(%rax), %rax
movq %rax, 0x30(%rsp)
movq 0x70(%rsp), %rax
movq 0x18(%rax), %rax
movq %rax, 0x28(%rsp)
movq 0x30(%rsp), %rdi
movq 0x28(%rsp), %rsi
callq 0xde6b0
andb $0x1, %al
movb %al, 0x87(%rsp)
movb 0x87(%rsp), %al
andb $0x1, %al
addq $0x88, %rsp
retq
movq 0x40(%rsp), %rdi
callq 0xbd30
nopw %cs:(%rax,%rax)
nopl (%rax)
| _ZNK8nlohmann16json_abi_v3_11_26detail9iter_implINS0_10basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEEEEeqISG_TnNSt9enable_ifIXoosr3std7is_sameIT_SG_EE5valuesr3std7is_sameISJ_NS2_IKSF_EEEE5valueEDnE4typeELDn0EEEbRKSJ_:
sub rsp, 88h
mov qword ptr [rsp+88h+var_10], rdi; int
mov qword ptr [rsp+88h+var_18], rsi; char
mov rax, qword ptr [rsp+88h+var_10]
mov qword ptr [rsp+88h+var_68], rax; int
mov rax, [rax]
mov rcx, qword ptr [rsp+88h+var_18]
cmp rax, [rcx]
setnz al
xor al, 0FFh
xor al, 0FFh
test al, 1
jnz short loc_DE2F6
jmp loc_DE3BB
loc_DE2F6:
mov [rsp+88h+var_4D], 1
mov edi, 20h ; ' '; thrown_size
call ___cxa_allocate_exception
mov [rsp+88h+var_78], rax; int
lea rdi, [rsp+88h+var_39]
mov qword ptr [rsp+88h+var_70], rdi; char
call __ZNSaIcEC1Ev; std::allocator<char>::allocator(void)
mov rdx, qword ptr [rsp+88h+var_70]
lea rsi, aCannotCompareI; "cannot compare iterators of different c"...
lea rdi, [rsp+88h+var_38]
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&)
jmp short $+2
loc_DE331:
mov rdi, [rsp+88h+var_78]; int
mov rax, qword ptr [rsp+88h+var_68]
mov rcx, [rax]
mov esi, 0D4h
lea rdx, [rsp+88h+var_38]
call _ZN8nlohmann16json_abi_v3_11_26detail16invalid_iterator6createIPNS0_10basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_
jmp short $+2
loc_DE34F:
mov rdi, [rsp+88h+var_78]; void *
mov [rsp+88h+var_4D], 0
lea rsi, _ZTIN8nlohmann16json_abi_v3_11_26detail16invalid_iteratorE; lptinfo
lea rdx, _ZN8nlohmann16json_abi_v3_11_26detail16invalid_iteratorD2Ev; void (*)(void *)
call ___cxa_throw
jmp loc_DE483
mov rcx, rax
mov eax, edx
mov [rsp+arg_38], rcx
mov [rsp+arg_34], eax
jmp short loc_DE399
mov rcx, rax
mov eax, edx
mov [rsp+arg_38], rcx
mov [rsp+arg_34], eax
lea rdi, [rsp+arg_48]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
loc_DE399:
lea rdi, [rsp+arg_47]
call __ZNSaIcED1Ev; std::allocator<char>::~allocator()
test [rsp+arg_33], 1
jnz short loc_DE3AC
jmp short loc_DE3B6
loc_DE3AC:
mov rdi, [rsp+arg_8]; void *
call ___cxa_free_exception
loc_DE3B6:
jmp loc_DE479
loc_DE3BB:
mov rax, qword ptr [rsp+88h+var_68]
mov rax, [rax]
movzx eax, byte ptr [rax]
mov [rsp+88h+var_80], rax
sub rax, 9; switch 10 cases
ja short def_DE3E4; jumptable 00000000000DE3E4 default case
mov rax, [rsp+88h+var_80]
lea rcx, jpt_DE3E4
movsxd rax, ds:(jpt_DE3E4 - 182E94h)[rcx+rax*4]
add rax, rcx
jmp rax; switch jump
loc_DE3E6:
mov rdi, qword ptr [rsp+88h+var_68]; jumptable 00000000000DE3E4 case 1
add rdi, 8
mov rsi, qword ptr [rsp+88h+var_18]
add rsi, 8
call _ZSteqRKSt17_Rb_tree_iteratorISt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN8nlohmann16json_abi_v3_11_210basic_jsonISt3mapSt6vectorS6_blmdSaNS9_14adl_serializerESC_IhSaIhEEEEEESK_; std::operator==(std::_Rb_tree_iterator<std::pair<std::string const,nlohmann::json_abi_v3_11_2::basic_json<std::map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_2::adl_serializer,std::vector<uchar>>>> const&,std::_Rb_tree_iterator<std::pair<std::string const,nlohmann::json_abi_v3_11_2::basic_json<std::map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_2::adl_serializer,std::vector<uchar>>>> const&)
and al, 1
mov [rsp+88h+var_1], al
jmp short loc_DE468
loc_DE408:
mov rdi, qword ptr [rsp+88h+var_68]; jumptable 00000000000DE3E4 case 2
add rdi, 8
add rdi, 8
mov rsi, qword ptr [rsp+88h+var_18]
add rsi, 8
add rsi, 8
call _ZN9__gnu_cxxeqIPN8nlohmann16json_abi_v3_11_210basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS2_14adl_serializerES5_IhSaIhEEEES5_ISF_SaISF_EEEEbRKNS_17__normal_iteratorIT_T0_EESO_; __gnu_cxx::operator==<nlohmann::json_abi_v3_11_2::basic_json<std::map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_2::adl_serializer,std::vector<uchar>> *,std::vector<nlohmann::json_abi_v3_11_2::basic_json<std::map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_2::adl_serializer,std::vector<uchar>>>>(__gnu_cxx::__normal_iterator<nlohmann::json_abi_v3_11_2::basic_json<std::map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_2::adl_serializer,std::vector<uchar>> *,std::vector<nlohmann::json_abi_v3_11_2::basic_json<std::map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_2::adl_serializer,std::vector<uchar>>>> const&,__gnu_cxx::__normal_iterator<nlohmann::json_abi_v3_11_2::basic_json<std::map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_2::adl_serializer,std::vector<uchar>> *,std::vector<nlohmann::json_abi_v3_11_2::basic_json<std::map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_2::adl_serializer,std::vector<uchar>>>> const&)
and al, 1
mov [rsp+88h+var_1], al
jmp short loc_DE468
loc_DE432:
jmp short $+2; jumptable 00000000000DE3E4 cases 0,3-9
def_DE3E4:
mov rax, qword ptr [rsp+88h+var_68]; jumptable 00000000000DE3E4 default case
mov rax, [rax+18h]
mov [rsp+88h+var_58], rax
mov rax, qword ptr [rsp+88h+var_18]
mov rax, [rax+18h]
mov [rsp+88h+var_60], rax
mov rdi, [rsp+88h+var_58]
mov rsi, [rsp+88h+var_60]
call _ZN8nlohmann16json_abi_v3_11_26detaileqENS1_20primitive_iterator_tES2_; nlohmann::json_abi_v3_11_2::detail::operator==(nlohmann::json_abi_v3_11_2::detail::primitive_iterator_t,nlohmann::json_abi_v3_11_2::detail::primitive_iterator_t)
and al, 1
mov [rsp+88h+var_1], al
loc_DE468:
mov al, [rsp+88h+var_1]
and al, 1
add rsp, 88h
retn
loc_DE479:
mov rdi, [rsp+arg_38]
call __Unwind_Resume
loc_DE483:
nop word ptr [rax+rax+00000000h]
nop dword ptr [rax]
| _ZNK8nlohmann16json_abi_v3_11_26detail9iter_implINS0_10basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEEEEeqISG_TnNSt9enable_ifIXoosr3std7is_sameIT_SG_EE5valuesr3std7is_sameISJ_NS2_IKSF_EEEE5valueEDnE4typeELDn0EEEbRKSJ_:
SUB RSP,0x88
MOV qword ptr [RSP + 0x78],RDI
MOV qword ptr [RSP + 0x70],RSI
MOV RAX,qword ptr [RSP + 0x78]
MOV qword ptr [RSP + 0x20],RAX
MOV RAX,qword ptr [RAX]
MOV RCX,qword ptr [RSP + 0x70]
CMP RAX,qword ptr [RCX]
SETNZ AL
XOR AL,0xff
XOR AL,0xff
TEST AL,0x1
JNZ 0x001de2f6
JMP 0x001de3bb
LAB_001de2f6:
MOV byte ptr [RSP + 0x3b],0x1
MOV EDI,0x20
CALL 0x0010b320
MOV qword ptr [RSP + 0x10],RAX
LEA RDI,[RSP + 0x4f]
MOV qword ptr [RSP + 0x18],RDI
CALL 0x0010bd40
MOV RDX,qword ptr [RSP + 0x18]
LAB_001de31e:
LEA RSI,[0x285139]
LEA RDI,[RSP + 0x50]
CALL 0x00130260
JMP 0x001de331
LAB_001de331:
MOV RDI,qword ptr [RSP + 0x10]
MOV RAX,qword ptr [RSP + 0x20]
MOV RCX,qword ptr [RAX]
LAB_001de33e:
MOV ESI,0xd4
LEA RDX,[RSP + 0x50]
CALL 0x001de490
JMP 0x001de34f
LAB_001de34f:
MOV RDI,qword ptr [RSP + 0x10]
MOV byte ptr [RSP + 0x3b],0x0
LEA RSI,[0x2d7490]
LEA RDX,[0x1de640]
CALL 0x0010bcb0
LAB_001de3bb:
MOV RAX,qword ptr [RSP + 0x20]
MOV RAX,qword ptr [RAX]
MOVZX EAX,byte ptr [RAX]
MOV qword ptr [RSP + 0x8],RAX
SUB RAX,0x9
JA 0x001de434
MOV RAX,qword ptr [RSP + 0x8]
LEA RCX,[0x282e94]
MOVSXD RAX,dword ptr [RCX + RAX*0x4]
ADD RAX,RCX
switchD:
JMP RAX
caseD_1:
MOV RDI,qword ptr [RSP + 0x20]
ADD RDI,0x8
MOV RSI,qword ptr [RSP + 0x70]
ADD RSI,0x8
CALL 0x001de650
AND AL,0x1
MOV byte ptr [RSP + 0x87],AL
JMP 0x001de468
caseD_2:
MOV RDI,qword ptr [RSP + 0x20]
ADD RDI,0x8
ADD RDI,0x8
MOV RSI,qword ptr [RSP + 0x70]
ADD RSI,0x8
ADD RSI,0x8
CALL 0x001de670
AND AL,0x1
MOV byte ptr [RSP + 0x87],AL
JMP 0x001de468
caseD_0:
JMP 0x001de434
default:
MOV RAX,qword ptr [RSP + 0x20]
MOV RAX,qword ptr [RAX + 0x18]
MOV qword ptr [RSP + 0x30],RAX
MOV RAX,qword ptr [RSP + 0x70]
MOV RAX,qword ptr [RAX + 0x18]
MOV qword ptr [RSP + 0x28],RAX
MOV RDI,qword ptr [RSP + 0x30]
MOV RSI,qword ptr [RSP + 0x28]
CALL 0x001de6b0
AND AL,0x1
MOV byte ptr [RSP + 0x87],AL
LAB_001de468:
MOV AL,byte ptr [RSP + 0x87]
AND AL,0x1
ADD RSP,0x88
RET
|
int8
_ZNK8nlohmann16json_abi_v3_11_26detail9iter_implINS0_10basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEEEEeqISG_TnNSt9enable_ifIXoosr3std7is_sameIT_SG_EE5valuesr3std7is_sameISJ_NS2_IKSF_EEEE5valueEDnE4typeELDn0EEEbRKSJ_
(long *param_1,long *param_2)
{
byte extraout_AL;
byte extraout_AL_00;
int8 uVar1;
int7 extraout_var;
int7 extraout_var_00;
int7 extraout_var_01;
int7 uVar2;
allocator local_39;
string local_38 [32];
long *local_18;
long *local_10;
bool local_1;
local_18 = param_2;
local_10 = param_1;
if (*param_1 != *param_2) {
uVar1 = __cxa_allocate_exception(0x20);
std::allocator<char>::allocator();
/* try { // try from 001de31e to 001de32e has its CatchHandler @ 001de371 */
std::__cxx11::string::string<std::allocator<char>>
(local_38,"cannot compare iterators of different containers",&local_39);
/* try { // try from 001de33e to 001de36b has its CatchHandler @ 001de381 */
_ZN8nlohmann16json_abi_v3_11_26detail16invalid_iterator6createIPNS0_10basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_
(uVar1,0xd4,local_38,*param_1);
/* WARNING: Subroutine does not return */
__cxa_throw(uVar1,&nlohmann::json_abi_v3_11_2::detail::invalid_iterator::typeinfo,
nlohmann::json_abi_v3_11_2::detail::invalid_iterator::~invalid_iterator);
}
switch(*(int1 *)*param_1) {
case 0:
case 3:
case 4:
case 5:
case 6:
case 7:
case 8:
case 9:
default:
nlohmann::json_abi_v3_11_2::detail::operator==(param_1[3],param_2[3]);
local_1 = (bool)(extraout_AL_00 & 1);
uVar2 = extraout_var_01;
break;
case 1:
std::operator==((_Rb_tree_iterator *)(param_1 + 1),(_Rb_tree_iterator *)(param_2 + 1));
local_1 = (bool)(extraout_AL & 1);
uVar2 = extraout_var;
break;
case 2:
local_1 = __gnu_cxx::operator==
((__normal_iterator *)(param_1 + 2),(__normal_iterator *)(param_2 + 2));
uVar2 = extraout_var_00;
}
return CONCAT71(uVar2,local_1);
}
|
||
6,310 | bool nlohmann::json_abi_v3_11_2::detail::iter_impl<nlohmann::json_abi_v3_11_2::basic_json<std::map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_2::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>>>::operator==<nlohmann::json_abi_v3_11_2::detail::iter_impl<nlohmann::json_abi_v3_11_2::basic_json<std::map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_2::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>>>, nullptr>(nlohmann::json_abi_v3_11_2::detail::iter_impl<nlohmann::json_abi_v3_11_2::basic_json<std::map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_2::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>>> const&) const | 7CodeWizard[P]stablediffusion/thirdparty/json.hpp | bool operator==(const IterImpl& other) const
{
// if objects are not the same, the comparison is undefined
if (JSON_HEDLEY_UNLIKELY(m_object != other.m_object))
{
JSON_THROW(invalid_iterator::create(212, "cannot compare iterators of different containers", m_object));
}
JSON_ASSERT(m_object != nullptr);
switch (m_object->m_type)
{
case value_t::object:
return (m_it.object_iterator == other.m_it.object_iterator);
case value_t::array:
return (m_it.array_iterator == other.m_it.array_iterator);
case value_t::null:
case value_t::string:
case value_t::boolean:
case value_t::number_integer:
case value_t::number_unsigned:
case value_t::number_float:
case value_t::binary:
case value_t::discarded:
default:
return (m_it.primitive_iterator == other.m_it.primitive_iterator);
}
} | O1 | cpp | bool nlohmann::json_abi_v3_11_2::detail::iter_impl<nlohmann::json_abi_v3_11_2::basic_json<std::map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_2::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>>>::operator==<nlohmann::json_abi_v3_11_2::detail::iter_impl<nlohmann::json_abi_v3_11_2::basic_json<std::map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_2::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>>>, nullptr>(nlohmann::json_abi_v3_11_2::detail::iter_impl<nlohmann::json_abi_v3_11_2::basic_json<std::map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_2::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>>> const&) const:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x28, %rsp
movq %rdi, %r14
movq (%rdi), %rax
cmpq (%rsi), %rax
jne 0x7564e
movzbl (%rax), %eax
cmpl $0x2, %eax
je 0x7562e
cmpl $0x1, %eax
jne 0x75638
movq 0x8(%r14), %rax
cmpq 0x8(%rsi), %rax
jmp 0x75640
movq 0x10(%r14), %rax
cmpq 0x10(%rsi), %rax
jmp 0x75640
movq 0x18(%r14), %rax
cmpq 0x18(%rsi), %rax
sete %al
addq $0x28, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movl $0x20, %edi
callq 0xa280
movq %rax, %rbx
leaq 0x18(%rsp), %r15
movq %r15, -0x10(%r15)
leaq 0x4d9fe(%rip), %rsi # 0xc3069
leaq 0x4da27(%rip), %rdx # 0xc3099
leaq 0x8(%rsp), %rdi
callq 0x2fa9c
movq (%r14), %rcx
movb $0x1, %bpl
leaq 0x8(%rsp), %rdx
movq %rbx, %rdi
movl $0xd4, %esi
callq 0x756e4
xorl %ebp, %ebp
leaq 0x808e3(%rip), %rsi # 0xf5f80
leaq -0x2664(%rip), %rdx # 0x73040
movq %rbx, %rdi
callq 0xaa80
movq %rax, %r14
movq 0x8(%rsp), %rdi
cmpq %r15, %rdi
je 0x756ce
movq 0x18(%rsp), %rsi
incq %rsi
callq 0xa5e0
jmp 0x756ce
movq %rax, %r14
movb $0x1, %bpl
testb %bpl, %bpl
je 0x756db
movq %rbx, %rdi
callq 0xa420
movq %r14, %rdi
callq 0xaae0
nop
| _ZNK8nlohmann16json_abi_v3_11_26detail9iter_implINS0_10basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEEEEeqISG_TnNSt9enable_ifIXoosr3std7is_sameIT_SG_EE5valuesr3std7is_sameISJ_NS2_IKSF_EEEE5valueEDnE4typeELDn0EEEbRKSJ_:
push rbp; char
push r15; int
push r14; __int64
push rbx; int
sub rsp, 28h
mov r14, rdi
mov rax, [rdi]
cmp rax, [rsi]
jnz short loc_7564E
movzx eax, byte ptr [rax]
cmp eax, 2
jz short loc_7562E
cmp eax, 1
jnz short loc_75638
mov rax, [r14+8]
cmp rax, [rsi+8]
jmp short loc_75640
loc_7562E:
mov rax, [r14+10h]
cmp rax, [rsi+10h]
jmp short loc_75640
loc_75638:
mov rax, [r14+18h]
cmp rax, [rsi+18h]
loc_75640:
setz al
add rsp, 28h
pop rbx
pop r14
pop r15
pop rbp
retn
loc_7564E:
mov edi, 20h ; ' '; thrown_size
call ___cxa_allocate_exception
mov rbx, rax
lea r15, [rsp+48h+var_30]
mov [r15-10h], r15
lea rsi, aCannotCompareI; "cannot compare iterators of different c"...
lea rdx, aCannotCompareI+30h; ""
lea rdi, [rsp+48h+var_40]
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag; std::string::_M_construct<char const*>(char const*,char const*,std::forward_iterator_tag)
mov rcx, [r14]
mov bpl, 1
lea rdx, [rsp+48h+var_40]
mov rdi, rbx; this
mov esi, 0D4h; int
call _ZN8nlohmann16json_abi_v3_11_26detail16invalid_iterator6createIPNS0_10basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_
xor ebp, ebp
lea rsi, _ZTIN8nlohmann16json_abi_v3_11_26detail16invalid_iteratorE; lptinfo
lea rdx, _ZN8nlohmann16json_abi_v3_11_26detail9exceptionD2Ev; void (*)(void *)
mov rdi, rbx; void *
call ___cxa_throw
mov r14, rax
mov rdi, [rsp+48h+var_40]; void *
cmp rdi, r15
jz short loc_756CE
mov rsi, [rsp+48h+var_30]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_756CE
mov r14, rax
mov bpl, 1
loc_756CE:
test bpl, bpl
jz short loc_756DB
mov rdi, rbx; void *
call ___cxa_free_exception
loc_756DB:
mov rdi, r14
call __Unwind_Resume
| ||||
6,311 | string_get_sortable_timestamp[abi:cxx11]() | monkey531[P]llama/common/common.cpp | std::string string_get_sortable_timestamp() {
using clock = std::chrono::system_clock;
const clock::time_point current_time = clock::now();
const time_t as_time_t = clock::to_time_t(current_time);
char timestamp_no_ns[100];
std::strftime(timestamp_no_ns, 100, "%Y_%m_%d-%H_%M_%S", std::localtime(&as_time_t));
const int64_t ns = std::chrono::duration_cast<std::chrono::nanoseconds>(
current_time.time_since_epoch() % 1000000000).count();
char timestamp_ns[11];
snprintf(timestamp_ns, 11, "%09" PRId64, ns);
return std::string(timestamp_no_ns) + "." + std::string(timestamp_ns);
} | O3 | cpp | string_get_sortable_timestamp[abi:cxx11]():
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xf0, %rsp
movq %rdi, %rbx
callq 0x1b090
movq %rax, %r14
movabsq $0x112e0be826d694b3, %rcx # imm = 0x112E0BE826D694B3
imulq %rcx
movq %rdx, %r12
movq %rdx, %rax
shrq $0x3f, %rax
sarq $0x1a, %r12
addq %rax, %r12
leaq 0x78(%rsp), %rdi
movq %r12, (%rdi)
callq 0x1b670
leaq 0x7ec86(%rip), %rdx # 0xf0ab7
leaq 0x80(%rsp), %r15
movl $0x64, %esi
movq %r15, %rdi
movq %rax, %rcx
callq 0x1b6f0
imulq $0x3b9aca00, %r12, %rax # imm = 0x3B9ACA00
subq %rax, %r14
leaq 0x7ec6f(%rip), %rdx # 0xf0ac9
leaq 0x4d(%rsp), %rdi
movl $0xb, %esi
movq %r14, %rcx
xorl %eax, %eax
callq 0x1bdc0
leaq 0x68(%rsp), %r12
movq %r12, -0x10(%r12)
movq %r15, %rdi
callq 0x1b3e0
leaq (%rsp,%rax), %rdx
addq $0x80, %rdx
leaq 0x58(%rsp), %r14
movq %r14, %rdi
movq %r15, %rsi
callq 0x21ce4
leaq 0x7a1ff(%rip), %rsi # 0xec0a1
movq %r14, %rdi
callq 0x1c0d0
leaq 0x18(%rsp), %r15
movq %r15, -0x10(%r15)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x71ed1
movq %rdx, 0x8(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x18(%rsp)
jmp 0x71ed8
movups (%rcx), %xmm0
movups %xmm0, (%r15)
movq 0x8(%rax), %rdx
movq %rdx, 0x10(%rsp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
leaq 0x38(%rsp), %r13
movq %r13, -0x10(%r13)
leaq 0x4d(%rsp), %r14
movq %r14, %rdi
callq 0x1b3e0
leaq (%rsp,%rax), %rdx
addq $0x4d, %rdx
leaq 0x28(%rsp), %rdi
movq %r14, %rsi
callq 0x21ce4
movq 0x8(%rsp), %rcx
movq 0x10(%rsp), %r8
movq 0x30(%rsp), %rdx
leaq (%rdx,%r8), %rax
movl $0xf, %edi
cmpq %r15, %rcx
je 0x71f3d
movq 0x18(%rsp), %rdi
movq 0x28(%rsp), %rsi
cmpq %rdi, %rax
jbe 0x71f5b
movl $0xf, %edi
cmpq %r13, %rsi
je 0x71f56
movq 0x38(%rsp), %rdi
cmpq %rdi, %rax
jbe 0x71f67
leaq 0x8(%rsp), %rdi
callq 0x1b260
jmp 0x71f75
leaq 0x28(%rsp), %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x1b9a0
leaq 0x10(%rbx), %rdx
movq %rdx, (%rbx)
movq (%rax), %rsi
leaq 0x10(%rax), %rcx
cmpq %rcx, %rsi
je 0x71f94
movq %rsi, (%rbx)
movq (%rcx), %rdx
movq %rdx, 0x10(%rbx)
jmp 0x71f9a
movups (%rcx), %xmm0
movups %xmm0, (%rdx)
movq %rax, %rdx
addq $0x8, %rdx
movq 0x8(%rax), %rsi
movq %rsi, 0x8(%rbx)
movq %rcx, (%rax)
movq $0x0, (%rdx)
movb $0x0, (%rcx)
movq 0x28(%rsp), %rdi
cmpq %r13, %rdi
je 0x71fcd
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x1b8b0
movq 0x8(%rsp), %rdi
cmpq %r15, %rdi
je 0x71fe4
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x1b8b0
movq 0x58(%rsp), %rdi
cmpq %r12, %rdi
je 0x71ffb
movq 0x68(%rsp), %rsi
incq %rsi
callq 0x1b8b0
movq %rbx, %rax
addq $0xf0, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
movq %rax, %rbx
movq 0x28(%rsp), %rdi
cmpq %r13, %rdi
je 0x7202e
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x1b8b0
jmp 0x7202e
movq %rax, %rbx
movq 0x8(%rsp), %rdi
cmpq %r15, %rdi
je 0x7204a
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x1b8b0
jmp 0x7204a
movq %rax, %rbx
movq 0x58(%rsp), %rdi
cmpq %r12, %rdi
je 0x72061
movq 0x68(%rsp), %rsi
incq %rsi
callq 0x1b8b0
movq %rbx, %rdi
callq 0x1bf70
| _Z29string_get_sortable_timestampB5cxx11v:
push r15
push r14
push r13
push r12
push rbx
sub rsp, 0F0h
mov rbx, rdi
call __ZNSt6chrono3_V212system_clock3nowEv; std::chrono::_V2::system_clock::now(void)
mov r14, rax
mov rcx, 112E0BE826D694B3h
imul rcx
mov r12, rdx
mov rax, rdx
shr rax, 3Fh
sar r12, 1Ah
add r12, rax
lea rdi, [rsp+118h+var_A0]
mov [rdi], r12
call _localtime
lea rdx, aYMDHMS; "%Y_%m_%d-%H_%M_%S"
lea r15, [rsp+118h+var_98]
mov esi, 64h ; 'd'
mov rdi, r15
mov rcx, rax
call _strftime
imul rax, r12, 3B9ACA00h
sub r14, rax
lea rdx, a09ld; "%09ld"
lea rdi, [rsp+118h+var_CB]
mov esi, 0Bh
mov rcx, r14
xor eax, eax
call _snprintf
lea r12, [rsp+118h+var_B0]
mov [r12-10h], r12
mov rdi, r15
call _strlen
lea rdx, [rsp+rax+118h+var_118]
add rdx, 80h
lea r14, [rsp+118h+var_C0]
mov rdi, r14
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, aN0N1+8; "."
mov rdi, r14
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendEPKc; std::string::append(char const*)
lea r15, [rsp+118h+var_100]
mov [r15-10h], r15
mov rdx, [rax]
mov rcx, rax
add rcx, 10h
cmp rdx, rcx
jz short loc_71ED1
mov [rsp+118h+var_110], rdx
mov rdx, [rcx]
mov [rsp+118h+var_100], rdx
jmp short loc_71ED8
loc_71ED1:
movups xmm0, xmmword ptr [rcx]
movups xmmword ptr [r15], xmm0
loc_71ED8:
mov rdx, [rax+8]
mov [rsp+118h+var_108], rdx
mov [rax], rcx
mov qword ptr [rax+8], 0
mov byte ptr [rax+10h], 0
lea r13, [rsp+118h+var_E0]
mov [r13-10h], r13
lea r14, [rsp+118h+var_CB]
mov rdi, r14
call _strlen
lea rdx, [rsp+rax+118h+var_118]
add rdx, 4Dh ; 'M'
lea rdi, [rsp+118h+var_F0]
mov rsi, r14
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag; std::string::_M_construct<char const*>(char const*,char const*,std::forward_iterator_tag)
mov rcx, [rsp+118h+var_110]
mov r8, [rsp+118h+var_108]
mov rdx, [rsp+118h+var_E8]
lea rax, [rdx+r8]
mov edi, 0Fh
cmp rcx, r15
jz short loc_71F3D
mov rdi, [rsp+118h+var_100]
loc_71F3D:
mov rsi, [rsp+118h+var_F0]
cmp rax, rdi
jbe short loc_71F5B
mov edi, 0Fh
cmp rsi, r13
jz short loc_71F56
mov rdi, [rsp+118h+var_E0]
loc_71F56:
cmp rax, rdi
jbe short loc_71F67
loc_71F5B:
lea rdi, [rsp+118h+var_110]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_appendEPKcm; std::string::_M_append(char const*,ulong)
jmp short loc_71F75
loc_71F67:
lea rdi, [rsp+118h+var_F0]
xor esi, esi
xor edx, edx
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7replaceEmmPKcm; std::string::replace(ulong,ulong,char const*,ulong)
loc_71F75:
lea rdx, [rbx+10h]
mov [rbx], rdx
mov rsi, [rax]
lea rcx, [rax+10h]
cmp rsi, rcx
jz short loc_71F94
mov [rbx], rsi
mov rdx, [rcx]
mov [rbx+10h], rdx
jmp short loc_71F9A
loc_71F94:
movups xmm0, xmmword ptr [rcx]
movups xmmword ptr [rdx], xmm0
loc_71F9A:
mov rdx, rax
add rdx, 8
mov rsi, [rax+8]
mov [rbx+8], rsi
mov [rax], rcx
mov qword ptr [rdx], 0
mov byte ptr [rcx], 0
mov rdi, [rsp+118h+var_F0]; void *
cmp rdi, r13
jz short loc_71FCD
mov rsi, [rsp+118h+var_E0]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_71FCD:
mov rdi, [rsp+118h+var_110]; void *
cmp rdi, r15
jz short loc_71FE4
mov rsi, [rsp+118h+var_100]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_71FE4:
mov rdi, [rsp+118h+var_C0]; void *
cmp rdi, r12
jz short loc_71FFB
mov rsi, [rsp+118h+var_B0]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_71FFB:
mov rax, rbx
add rsp, 0F0h
pop rbx
pop r12
pop r13
pop r14
pop r15
retn
mov rbx, rax
mov rdi, [rsp+arg_20]; void *
cmp rdi, r13
jz short loc_7202E
mov rsi, [rsp+arg_30]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_7202E
mov rbx, rax
loc_7202E:
mov rdi, [rsp+arg_0]; void *
cmp rdi, r15
jz short loc_7204A
mov rsi, [rsp+arg_10]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_7204A
mov rbx, rax
loc_7204A:
mov rdi, [rsp+arg_50]; void *
cmp rdi, r12
jz short loc_72061
mov rsi, [rsp+arg_60]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_72061:
mov rdi, rbx
call __Unwind_Resume
| long long string_get_sortable_timestamp[abi:cxx11](long long a1)
{
long long v2; // r14
long long v3; // rax
long long v4; // rax
long long v5; // rax
__int128 *v6; // rcx
long long v7; // rax
unsigned long long v8; // rax
unsigned long long v9; // rdi
unsigned long long v10; // rdi
_QWORD *v11; // rax
_OWORD *v12; // rcx
void *v14; // [rsp+8h] [rbp-110h] BYREF
long long v15; // [rsp+10h] [rbp-108h]
__int128 v16; // [rsp+18h] [rbp-100h] BYREF
void *v17; // [rsp+28h] [rbp-F0h] BYREF
long long v18; // [rsp+30h] [rbp-E8h]
_QWORD v19[2]; // [rsp+38h] [rbp-E0h] BYREF
_BYTE v20[11]; // [rsp+4Dh] [rbp-CBh] BYREF
void *v21[2]; // [rsp+58h] [rbp-C0h] BYREF
_QWORD v22[3]; // [rsp+68h] [rbp-B0h] BYREF
_BYTE v23[152]; // [rsp+80h] [rbp-98h] BYREF
v2 = std::chrono::_V2::system_clock::now((std::chrono::_V2::system_clock *)a1);
v22[2] = v2 / 1000000000;
v3 = localtime();
strftime(v23, 100LL, "%Y_%m_%d-%H_%M_%S", v3);
snprintf(v20, 11LL, "%09ld", v2 % 1000000000);
v21[0] = v22;
v4 = strlen(v23);
std::string::_M_construct<char const*>((long long)v21, v23, (long long)&v23[v4]);
v5 = std::string::append(v21, ".");
v14 = &v16;
v6 = (__int128 *)(v5 + 16);
if ( *(_QWORD *)v5 == v5 + 16 )
{
v16 = *v6;
}
else
{
v14 = *(void **)v5;
*(_QWORD *)&v16 = *(_QWORD *)v6;
}
v15 = *(_QWORD *)(v5 + 8);
*(_QWORD *)v5 = v6;
*(_QWORD *)(v5 + 8) = 0LL;
*(_BYTE *)(v5 + 16) = 0;
v17 = v19;
v7 = strlen(v20);
std::string::_M_construct<char const*>((long long)&v17, v20, (long long)&v20[v7]);
v8 = v18 + v15;
v9 = 15LL;
if ( v14 != &v16 )
v9 = v16;
if ( v8 <= v9 )
goto LABEL_10;
v10 = 15LL;
if ( v17 != v19 )
v10 = v19[0];
if ( v8 <= v10 )
v11 = (_QWORD *)std::string::replace(&v17, 0LL, 0LL, v14, v15);
else
LABEL_10:
v11 = (_QWORD *)std::string::_M_append(&v14, v17, v18);
*(_QWORD *)a1 = a1 + 16;
v12 = v11 + 2;
if ( (_QWORD *)*v11 == v11 + 2 )
{
*(_OWORD *)(a1 + 16) = *v12;
}
else
{
*(_QWORD *)a1 = *v11;
*(_QWORD *)(a1 + 16) = *(_QWORD *)v12;
}
*(_QWORD *)(a1 + 8) = v11[1];
*v11 = v12;
v11[1] = 0LL;
*(_BYTE *)v12 = 0;
if ( v17 != v19 )
operator delete(v17, v19[0] + 1LL);
if ( v14 != &v16 )
operator delete(v14, v16 + 1);
if ( v21[0] != v22 )
operator delete(v21[0], v22[0] + 1LL);
return a1;
}
| string_get_sortable_timestamp[abi:cxx11]:
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0xf0
MOV RBX,RDI
CALL 0x0011b090
MOV R14,RAX
MOV RCX,0x112e0be826d694b3
IMUL RCX
MOV R12,RDX
MOV RAX,RDX
SHR RAX,0x3f
SAR R12,0x1a
ADD R12,RAX
LEA RDI,[RSP + 0x78]
MOV qword ptr [RDI],R12
CALL 0x0011b670
LEA RDX,[0x1f0ab7]
LEA R15,[RSP + 0x80]
MOV ESI,0x64
MOV RDI,R15
MOV RCX,RAX
CALL 0x0011b6f0
IMUL RAX,R12,0x3b9aca00
SUB R14,RAX
LEA RDX,[0x1f0ac9]
LEA RDI,[RSP + 0x4d]
MOV ESI,0xb
MOV RCX,R14
XOR EAX,EAX
CALL 0x0011bdc0
LEA R12,[RSP + 0x68]
MOV qword ptr [R12 + -0x10],R12
MOV RDI,R15
CALL 0x0011b3e0
LEA RDX,[RSP + RAX*0x1]
ADD RDX,0x80
LEA R14,[RSP + 0x58]
MOV RDI,R14
MOV RSI,R15
CALL 0x00121ce4
LAB_00171e9b:
LEA RSI,[0x1ec0a1]
MOV RDI,R14
CALL 0x0011c0d0
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 0x00171ed1
MOV qword ptr [RSP + 0x8],RDX
MOV RDX,qword ptr [RCX]
MOV qword ptr [RSP + 0x18],RDX
JMP 0x00171ed8
LAB_00171ed1:
MOVUPS XMM0,xmmword ptr [RCX]
MOVUPS xmmword ptr [R15],XMM0
LAB_00171ed8:
MOV RDX,qword ptr [RAX + 0x8]
MOV qword ptr [RSP + 0x10],RDX
MOV qword ptr [RAX],RCX
MOV qword ptr [RAX + 0x8],0x0
MOV byte ptr [RAX + 0x10],0x0
LEA R13,[RSP + 0x38]
MOV qword ptr [R13 + -0x10],R13
LEA R14,[RSP + 0x4d]
MOV RDI,R14
CALL 0x0011b3e0
LEA RDX,[RSP + RAX*0x1]
ADD RDX,0x4d
LAB_00171f0e:
LEA RDI,[RSP + 0x28]
MOV RSI,R14
CALL 0x00121ce4
MOV RCX,qword ptr [RSP + 0x8]
MOV R8,qword ptr [RSP + 0x10]
MOV RDX,qword ptr [RSP + 0x30]
LEA RAX,[RDX + R8*0x1]
MOV EDI,0xf
CMP RCX,R15
JZ 0x00171f3d
MOV RDI,qword ptr [RSP + 0x18]
LAB_00171f3d:
MOV RSI,qword ptr [RSP + 0x28]
CMP RAX,RDI
JBE 0x00171f5b
MOV EDI,0xf
CMP RSI,R13
JZ 0x00171f56
MOV RDI,qword ptr [RSP + 0x38]
LAB_00171f56:
CMP RAX,RDI
JBE 0x00171f67
LAB_00171f5b:
LEA RDI,[RSP + 0x8]
CALL 0x0011b260
JMP 0x00171f75
LAB_00171f67:
LEA RDI,[RSP + 0x28]
XOR ESI,ESI
XOR EDX,EDX
CALL 0x0011b9a0
LAB_00171f75:
LEA RDX,[RBX + 0x10]
MOV qword ptr [RBX],RDX
MOV RSI,qword ptr [RAX]
LEA RCX,[RAX + 0x10]
CMP RSI,RCX
JZ 0x00171f94
MOV qword ptr [RBX],RSI
MOV RDX,qword ptr [RCX]
MOV qword ptr [RBX + 0x10],RDX
JMP 0x00171f9a
LAB_00171f94:
MOVUPS XMM0,xmmword ptr [RCX]
MOVUPS xmmword ptr [RDX],XMM0
LAB_00171f9a:
MOV RDX,RAX
ADD RDX,0x8
MOV RSI,qword ptr [RAX + 0x8]
MOV qword ptr [RBX + 0x8],RSI
MOV qword ptr [RAX],RCX
MOV qword ptr [RDX],0x0
MOV byte ptr [RCX],0x0
MOV RDI,qword ptr [RSP + 0x28]
CMP RDI,R13
JZ 0x00171fcd
MOV RSI,qword ptr [RSP + 0x38]
INC RSI
CALL 0x0011b8b0
LAB_00171fcd:
MOV RDI,qword ptr [RSP + 0x8]
CMP RDI,R15
JZ 0x00171fe4
MOV RSI,qword ptr [RSP + 0x18]
INC RSI
CALL 0x0011b8b0
LAB_00171fe4:
MOV RDI,qword ptr [RSP + 0x58]
CMP RDI,R12
JZ 0x00171ffb
MOV RSI,qword ptr [RSP + 0x68]
INC RSI
CALL 0x0011b8b0
LAB_00171ffb:
MOV RAX,RBX
ADD RSP,0xf0
POP RBX
POP R12
POP R13
POP R14
POP R15
RET
|
/* WARNING: Unknown calling convention -- yet parameter storage is locked */
/* string_get_sortable_timestamp[abi:cxx11]() */
void string_get_sortable_timestamp_abi_cxx11_(void)
{
int8 *puVar1;
int8 uVar2;
long lVar3;
tm *__tp;
size_t sVar4;
long *plVar5;
int8 *puVar6;
ulong *puVar7;
int8 *in_RDI;
ulong uVar8;
ulong *local_110;
long local_108;
ulong local_100;
long lStack_f8;
ulong *local_f0;
long local_e8;
ulong local_e0 [2];
char local_cb [11];
long *local_c0 [2];
long local_b0 [2];
long local_a0;
char local_98 [112];
lVar3 = std::chrono::_V2::system_clock::now();
local_a0 = lVar3 / 1000000000;
__tp = localtime(&local_a0);
strftime(local_98,100,"%Y_%m_%d-%H_%M_%S",__tp);
snprintf(local_cb,0xb,"%09ld",lVar3 % 1000000000);
local_c0[0] = local_b0;
sVar4 = strlen(local_98);
std::__cxx11::string::_M_construct<char_const*>(local_c0,local_98,local_98 + sVar4);
/* try { // try from 00171e9b to 00171ea9 has its CatchHandler @ 00172047 */
plVar5 = (long *)std::__cxx11::string::append((char *)local_c0);
puVar7 = (ulong *)(plVar5 + 2);
if ((ulong *)*plVar5 == puVar7) {
local_100 = *puVar7;
lStack_f8 = plVar5[3];
local_110 = &local_100;
}
else {
local_100 = *puVar7;
local_110 = (ulong *)*plVar5;
}
local_108 = plVar5[1];
*plVar5 = (long)puVar7;
plVar5[1] = 0;
*(int1 *)(plVar5 + 2) = 0;
local_f0 = local_e0;
sVar4 = strlen(local_cb);
/* try { // try from 00171f0e to 00171f1a has its CatchHandler @ 0017202b */
std::__cxx11::string::_M_construct<char_const*>(&local_f0,local_cb,local_cb + sVar4);
uVar8 = 0xf;
if (local_110 != &local_100) {
uVar8 = local_100;
}
if (uVar8 < (ulong)(local_e8 + local_108)) {
uVar8 = 0xf;
if (local_f0 != local_e0) {
uVar8 = local_e0[0];
}
if ((ulong)(local_e8 + local_108) <= uVar8) {
puVar6 = (int8 *)
std::__cxx11::string::replace((ulong)&local_f0,0,(char *)0x0,(ulong)local_110);
goto LAB_00171f75;
}
}
/* try { // try from 00171f5b to 00171f74 has its CatchHandler @ 0017200f */
puVar6 = (int8 *)std::__cxx11::string::_M_append((char *)&local_110,(ulong)local_f0);
LAB_00171f75:
*in_RDI = in_RDI + 2;
puVar1 = puVar6 + 2;
if ((int8 *)*puVar6 == puVar1) {
uVar2 = puVar6[3];
in_RDI[2] = *puVar1;
in_RDI[3] = uVar2;
}
else {
*in_RDI = (int8 *)*puVar6;
in_RDI[2] = *puVar1;
}
in_RDI[1] = puVar6[1];
*puVar6 = puVar1;
puVar6[1] = 0;
*(int1 *)puVar1 = 0;
if (local_f0 != local_e0) {
operator_delete(local_f0,local_e0[0] + 1);
}
if (local_110 != &local_100) {
operator_delete(local_110,local_100 + 1);
}
if (local_c0[0] != local_b0) {
operator_delete(local_c0[0],local_b0[0] + 1);
}
return;
}
|
|
6,312 | lunasvg::SVGString::~SVGString() | dmazzella[P]pylunasvg/lunasvg/source/svgproperty.h | explicit SVGString(PropertyID id)
: SVGProperty(id)
{} | O1 | c | lunasvg::SVGString::~SVGString():
pushq %rbx
movq %rdi, %rbx
movq 0x10(%rdi), %rdi
leaq 0x20(%rbx), %rax
cmpq %rax, %rdi
je 0x208c2
movq (%rax), %rsi
incq %rsi
callq 0xa320
movl $0x30, %esi
movq %rbx, %rdi
popq %rbx
jmp 0xa320
| _ZN7lunasvg9SVGStringD0Ev:
push rbx
mov rbx, rdi
mov rdi, [rdi+10h]; void *
lea rax, [rbx+20h]
cmp rdi, rax
jz short loc_208C2
mov rsi, [rax]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_208C2:
mov esi, 30h ; '0'; unsigned __int64
mov rdi, rbx; void *
pop rbx
jmp __ZdlPvm; operator delete(void *,ulong)
| void lunasvg::SVGString::~SVGString(lunasvg::SVGString *this)
{
char *v2; // rdi
v2 = (char *)*((_QWORD *)this + 2);
if ( v2 != (char *)this + 32 )
operator delete(v2, *((_QWORD *)this + 4) + 1LL);
operator delete(this, 0x30uLL);
}
| ~SVGString:
PUSH RBX
MOV RBX,RDI
MOV RDI,qword ptr [RDI + 0x10]
LEA RAX,[RBX + 0x20]
CMP RDI,RAX
JZ 0x001208c2
MOV RSI,qword ptr [RAX]
INC RSI
CALL 0x0010a320
LAB_001208c2:
MOV ESI,0x30
MOV RDI,RBX
POP RBX
JMP 0x0010a320
|
/* lunasvg::SVGString::~SVGString() */
void __thiscall lunasvg::SVGString::~SVGString(SVGString *this)
{
if (*(SVGString **)(this + 0x10) != this + 0x20) {
operator_delete(*(SVGString **)(this + 0x10),*(long *)(this + 0x20) + 1);
}
operator_delete(this,0x30);
return;
}
|
|
6,313 | maria_rtree_find_next | eloqsql/storage/maria/ma_rt_index.c | int maria_rtree_find_next(MARIA_HA *info, uint keynr, uint32 search_flag)
{
my_off_t root;
uint32 nod_cmp_flag;
MARIA_KEYDEF *keyinfo= info->s->keyinfo + keynr;
DBUG_ASSERT(info->last_key.keyinfo == keyinfo);
/*
At the moment index can only properly handle the
MBR_INTERSECT, so we use it for all sorts of queries.
TODO: better searsh for CONTAINS/WITHIN.
*/
search_flag= nod_cmp_flag= MBR_INTERSECT;
if (info->update & HA_STATE_DELETED)
return maria_rtree_find_first(info, &info->last_key, search_flag);
if (!info->keyread_buff_used)
{
uchar *key= info->int_keypos;
while (key < info->int_maxpos)
{
if (!maria_rtree_key_cmp(keyinfo->seg,
info->first_mbr_key, key,
info->last_rkey_length, search_flag))
{
uchar *after_key= key + keyinfo->keylength;
MARIA_KEY tmp_key;
/*
We don't need to set all MARIA_KEY elements here as
_ma_row_pos_from_key only uses a few of them.
*/
tmp_key.keyinfo= keyinfo;
tmp_key.data= key;
tmp_key.data_length= keyinfo->keylength - info->s->base.rec_reflength;
info->cur_row.lastpos= _ma_row_pos_from_key(&tmp_key);
memcpy(info->last_key.data, key, info->last_key.data_length);
if (after_key < info->int_maxpos)
info->int_keypos= after_key;
else
info->keyread_buff_used= 1;
return 0;
}
key+= keyinfo->keylength;
}
}
if ((root= info->s->state.key_root[keynr]) == HA_OFFSET_ERROR)
{
my_errno= HA_ERR_END_OF_FILE;
return -1;
}
/*
TODO better search for CONTAINS/WITHIN.
nod_cmp_flag= (((search_flag & (MBR_EQUAL | MBR_WITHIN)) ?
MBR_WITHIN : MBR_INTERSECT));
*/
return maria_rtree_find_req(info, keyinfo, search_flag, nod_cmp_flag, root,
0);
} | O0 | c | maria_rtree_find_next:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movl %edx, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq 0x570(%rax), %rax
movl -0x14(%rbp), %ecx
imulq $0x118, %rcx, %rcx # imm = 0x118
addq %rcx, %rax
movq %rax, -0x30(%rbp)
jmp 0x8d443
movl $0x400, -0x24(%rbp) # imm = 0x400
movl $0x400, -0x18(%rbp) # imm = 0x400
movq -0x10(%rbp), %rax
movl 0x624(%rax), %eax
andl $0x8, %eax
cmpl $0x0, %eax
je 0x8d482
movq -0x10(%rbp), %rdi
movq -0x10(%rbp), %rsi
addq $0x200, %rsi # imm = 0x200
movl -0x18(%rbp), %edx
callq 0x8cda0
movl %eax, -0x4(%rbp)
jmp 0x8d60e
movq -0x10(%rbp), %rax
cmpb $0x0, 0x685(%rax)
jne 0x8d5be
movq -0x10(%rbp), %rax
movq 0x3b0(%rax), %rax
movq %rax, -0x38(%rbp)
movq -0x38(%rbp), %rax
movq -0x10(%rbp), %rcx
cmpq 0x3b8(%rcx), %rax
jae 0x8d5bc
movq -0x30(%rbp), %rax
movq 0xc0(%rax), %rdi
movq -0x10(%rbp), %rax
movq 0x398(%rax), %rsi
movq -0x38(%rbp), %rdx
movq -0x10(%rbp), %rax
movl 0x630(%rax), %ecx
movl -0x18(%rbp), %r8d
callq 0x90290
cmpl $0x0, %eax
jne 0x8d59e
movq -0x38(%rbp), %rax
movq -0x30(%rbp), %rcx
movzwl 0xaa(%rcx), %ecx
movslq %ecx, %rcx
addq %rcx, %rax
movq %rax, -0x40(%rbp)
movq -0x30(%rbp), %rax
movq %rax, -0x58(%rbp)
movq -0x38(%rbp), %rax
movq %rax, -0x60(%rbp)
movq -0x30(%rbp), %rax
movzwl 0xaa(%rax), %eax
movq -0x10(%rbp), %rcx
movq (%rcx), %rcx
subl 0x3e0(%rcx), %eax
movl %eax, -0x50(%rbp)
leaq -0x60(%rbp), %rdi
callq 0x6aa00
movq %rax, %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x98(%rax)
movq -0x10(%rbp), %rax
movq 0x200(%rax), %rdi
movq -0x38(%rbp), %rsi
movq -0x10(%rbp), %rax
movl 0x210(%rax), %eax
movl %eax, %edx
callq 0x2a090
movq -0x40(%rbp), %rax
movq -0x10(%rbp), %rcx
cmpq 0x3b8(%rcx), %rax
jae 0x8d58a
movq -0x40(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x3b0(%rax)
jmp 0x8d595
movq -0x10(%rbp), %rax
movb $0x1, 0x685(%rax)
movl $0x0, -0x4(%rbp)
jmp 0x8d60e
movq -0x30(%rbp), %rax
movzwl 0xaa(%rax), %ecx
movq -0x38(%rbp), %rax
movslq %ecx, %rcx
addq %rcx, %rax
movq %rax, -0x38(%rbp)
jmp 0x8d4a2
jmp 0x8d5be
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq 0x118(%rax), %rax
movl -0x14(%rbp), %ecx
movq (%rax,%rcx,8), %rax
movq %rax, -0x20(%rbp)
cmpq $-0x1, %rax
jne 0x8d5f1
callq 0xf5a70
movl $0x89, (%rax)
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x8d60e
movq -0x10(%rbp), %rdi
movq -0x30(%rbp), %rsi
movl -0x18(%rbp), %edx
movl -0x24(%rbp), %ecx
movq -0x20(%rbp), %r8
xorl %r9d, %r9d
callq 0x8ce90
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x60, %rsp
popq %rbp
retq
nopw (%rax,%rax)
| maria_rtree_find_next:
push rbp
mov rbp, rsp
sub rsp, 60h
mov [rbp+var_10], rdi
mov [rbp+var_14], esi
mov [rbp+var_18], edx
mov rax, [rbp+var_10]
mov rax, [rax]
mov rax, [rax+570h]
mov ecx, [rbp+var_14]
imul rcx, 118h
add rax, rcx
mov [rbp+var_30], rax
jmp short $+2
loc_8D443:
mov [rbp+var_24], 400h
mov [rbp+var_18], 400h
mov rax, [rbp+var_10]
mov eax, [rax+624h]
and eax, 8
cmp eax, 0
jz short loc_8D482
mov rdi, [rbp+var_10]
mov rsi, [rbp+var_10]
add rsi, 200h
mov edx, [rbp+var_18]
call maria_rtree_find_first
mov [rbp+var_4], eax
jmp loc_8D60E
loc_8D482:
mov rax, [rbp+var_10]
cmp byte ptr [rax+685h], 0
jnz loc_8D5BE
mov rax, [rbp+var_10]
mov rax, [rax+3B0h]
mov [rbp+var_38], rax
loc_8D4A2:
mov rax, [rbp+var_38]
mov rcx, [rbp+var_10]
cmp rax, [rcx+3B8h]
jnb loc_8D5BC
mov rax, [rbp+var_30]
mov rdi, [rax+0C0h]
mov rax, [rbp+var_10]
mov rsi, [rax+398h]
mov rdx, [rbp+var_38]
mov rax, [rbp+var_10]
mov ecx, [rax+630h]
mov r8d, [rbp+var_18]
call maria_rtree_key_cmp
cmp eax, 0
jnz loc_8D59E
mov rax, [rbp+var_38]
mov rcx, [rbp+var_30]
movzx ecx, word ptr [rcx+0AAh]
movsxd rcx, ecx
add rax, rcx
mov [rbp+var_40], rax
mov rax, [rbp+var_30]
mov [rbp+var_58], rax
mov rax, [rbp+var_38]
mov [rbp+var_60], rax
mov rax, [rbp+var_30]
movzx eax, word ptr [rax+0AAh]
mov rcx, [rbp+var_10]
mov rcx, [rcx]
sub eax, [rcx+3E0h]
mov [rbp+var_50], eax
lea rdi, [rbp+var_60]
call _ma_row_pos_from_key
mov rcx, rax
mov rax, [rbp+var_10]
mov [rax+98h], rcx
mov rax, [rbp+var_10]
mov rdi, [rax+200h]
mov rsi, [rbp+var_38]
mov rax, [rbp+var_10]
mov eax, [rax+210h]
mov edx, eax
call _memcpy
mov rax, [rbp+var_40]
mov rcx, [rbp+var_10]
cmp rax, [rcx+3B8h]
jnb short loc_8D58A
mov rcx, [rbp+var_40]
mov rax, [rbp+var_10]
mov [rax+3B0h], rcx
jmp short loc_8D595
loc_8D58A:
mov rax, [rbp+var_10]
mov byte ptr [rax+685h], 1
loc_8D595:
mov [rbp+var_4], 0
jmp short loc_8D60E
loc_8D59E:
mov rax, [rbp+var_30]
movzx ecx, word ptr [rax+0AAh]
mov rax, [rbp+var_38]
movsxd rcx, ecx
add rax, rcx
mov [rbp+var_38], rax
jmp loc_8D4A2
loc_8D5BC:
jmp short $+2
loc_8D5BE:
mov rax, [rbp+var_10]
mov rax, [rax]
mov rax, [rax+118h]
mov ecx, [rbp+var_14]
mov rax, [rax+rcx*8]
mov [rbp+var_20], rax
cmp rax, 0FFFFFFFFFFFFFFFFh
jnz short loc_8D5F1
call _my_thread_var
mov dword ptr [rax], 89h
mov [rbp+var_4], 0FFFFFFFFh
jmp short loc_8D60E
loc_8D5F1:
mov rdi, [rbp+var_10]
mov rsi, [rbp+var_30]
mov edx, [rbp+var_18]
mov ecx, [rbp+var_24]
mov r8, [rbp+var_20]
xor r9d, r9d
call maria_rtree_find_req
mov [rbp+var_4], eax
loc_8D60E:
mov eax, [rbp+var_4]
add rsp, 60h
pop rbp
retn
| long long maria_rtree_find_next(_DWORD *a1, const char *a2, unsigned int a3)
{
long long v3; // rax
_QWORD v5[2]; // [rsp+0h] [rbp-60h] BYREF
int v6; // [rsp+10h] [rbp-50h]
unsigned long long v7; // [rsp+20h] [rbp-40h]
unsigned long long i; // [rsp+28h] [rbp-38h]
long long v9; // [rsp+30h] [rbp-30h]
unsigned int v10; // [rsp+3Ch] [rbp-24h]
unsigned long long v11; // [rsp+40h] [rbp-20h]
unsigned int v12; // [rsp+48h] [rbp-18h]
unsigned int v13; // [rsp+4Ch] [rbp-14h]
_DWORD *v14; // [rsp+50h] [rbp-10h]
v14 = a1;
v13 = (unsigned int)a2;
v12 = a3;
v9 = 280LL * (unsigned int)a2 + *(_QWORD *)(*(_QWORD *)a1 + 1392LL);
v10 = 1024;
v12 = 1024;
if ( (a1[393] & 8) != 0 )
{
return (unsigned int)maria_rtree_find_first((long long)v14, (const char *)v14 + 512);
}
else
{
if ( !*((_BYTE *)v14 + 1669) )
{
for ( i = *((_QWORD *)v14 + 118); i < *((_QWORD *)v14 + 119); i += *(unsigned __int16 *)(v9 + 170) )
{
a1 = *(_DWORD **)(v9 + 192);
a2 = (const char *)*((_QWORD *)v14 + 115);
if ( !(unsigned int)maria_rtree_key_cmp(a1, a2, i, (unsigned int)v14[396], v12) )
{
v7 = *(unsigned __int16 *)(v9 + 170) + i;
v5[1] = v9;
v5[0] = i;
v6 = *(unsigned __int16 *)(v9 + 170) - *(_DWORD *)(*(_QWORD *)v14 + 992LL);
v3 = ma_row_pos_from_key((long long)v5);
*((_QWORD *)v14 + 19) = v3;
memcpy(*((_QWORD *)v14 + 64), i, (unsigned int)v14[132]);
if ( v7 >= *((_QWORD *)v14 + 119) )
*((_BYTE *)v14 + 1669) = 1;
else
*((_QWORD *)v14 + 118) = v7;
return 0;
}
}
}
v11 = *(_QWORD *)(*(_QWORD *)(*(_QWORD *)v14 + 280LL) + 8LL * v13);
if ( v11 == -1LL )
{
*(_DWORD *)my_thread_var(a1, a2) = 137;
return (unsigned int)-1;
}
else
{
return (unsigned int)maria_rtree_find_req((long long)v14, v9, v12, v10, v11, 0);
}
}
}
| maria_rtree_find_next:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x60
MOV qword ptr [RBP + -0x10],RDI
MOV dword ptr [RBP + -0x14],ESI
MOV dword ptr [RBP + -0x18],EDX
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX]
MOV RAX,qword ptr [RAX + 0x570]
MOV ECX,dword ptr [RBP + -0x14]
IMUL RCX,RCX,0x118
ADD RAX,RCX
MOV qword ptr [RBP + -0x30],RAX
JMP 0x0018d443
LAB_0018d443:
MOV dword ptr [RBP + -0x24],0x400
MOV dword ptr [RBP + -0x18],0x400
MOV RAX,qword ptr [RBP + -0x10]
MOV EAX,dword ptr [RAX + 0x624]
AND EAX,0x8
CMP EAX,0x0
JZ 0x0018d482
MOV RDI,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RBP + -0x10]
ADD RSI,0x200
MOV EDX,dword ptr [RBP + -0x18]
CALL 0x0018cda0
MOV dword ptr [RBP + -0x4],EAX
JMP 0x0018d60e
LAB_0018d482:
MOV RAX,qword ptr [RBP + -0x10]
CMP byte ptr [RAX + 0x685],0x0
JNZ 0x0018d5be
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x3b0]
MOV qword ptr [RBP + -0x38],RAX
LAB_0018d4a2:
MOV RAX,qword ptr [RBP + -0x38]
MOV RCX,qword ptr [RBP + -0x10]
CMP RAX,qword ptr [RCX + 0x3b8]
JNC 0x0018d5bc
MOV RAX,qword ptr [RBP + -0x30]
MOV RDI,qword ptr [RAX + 0xc0]
MOV RAX,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RAX + 0x398]
MOV RDX,qword ptr [RBP + -0x38]
MOV RAX,qword ptr [RBP + -0x10]
MOV ECX,dword ptr [RAX + 0x630]
MOV R8D,dword ptr [RBP + -0x18]
CALL 0x00190290
CMP EAX,0x0
JNZ 0x0018d59e
MOV RAX,qword ptr [RBP + -0x38]
MOV RCX,qword ptr [RBP + -0x30]
MOVZX ECX,word ptr [RCX + 0xaa]
MOVSXD RCX,ECX
ADD RAX,RCX
MOV qword ptr [RBP + -0x40],RAX
MOV RAX,qword ptr [RBP + -0x30]
MOV qword ptr [RBP + -0x58],RAX
MOV RAX,qword ptr [RBP + -0x38]
MOV qword ptr [RBP + -0x60],RAX
MOV RAX,qword ptr [RBP + -0x30]
MOVZX EAX,word ptr [RAX + 0xaa]
MOV RCX,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RCX]
SUB EAX,dword ptr [RCX + 0x3e0]
MOV dword ptr [RBP + -0x50],EAX
LEA RDI,[RBP + -0x60]
CALL 0x0016aa00
MOV RCX,RAX
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RAX + 0x98],RCX
MOV RAX,qword ptr [RBP + -0x10]
MOV RDI,qword ptr [RAX + 0x200]
MOV RSI,qword ptr [RBP + -0x38]
MOV RAX,qword ptr [RBP + -0x10]
MOV EAX,dword ptr [RAX + 0x210]
MOV EDX,EAX
CALL 0x0012a090
MOV RAX,qword ptr [RBP + -0x40]
MOV RCX,qword ptr [RBP + -0x10]
CMP RAX,qword ptr [RCX + 0x3b8]
JNC 0x0018d58a
MOV RCX,qword ptr [RBP + -0x40]
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RAX + 0x3b0],RCX
JMP 0x0018d595
LAB_0018d58a:
MOV RAX,qword ptr [RBP + -0x10]
MOV byte ptr [RAX + 0x685],0x1
LAB_0018d595:
MOV dword ptr [RBP + -0x4],0x0
JMP 0x0018d60e
LAB_0018d59e:
MOV RAX,qword ptr [RBP + -0x30]
MOVZX ECX,word ptr [RAX + 0xaa]
MOV RAX,qword ptr [RBP + -0x38]
MOVSXD RCX,ECX
ADD RAX,RCX
MOV qword ptr [RBP + -0x38],RAX
JMP 0x0018d4a2
LAB_0018d5bc:
JMP 0x0018d5be
LAB_0018d5be:
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX]
MOV RAX,qword ptr [RAX + 0x118]
MOV ECX,dword ptr [RBP + -0x14]
MOV RAX,qword ptr [RAX + RCX*0x8]
MOV qword ptr [RBP + -0x20],RAX
CMP RAX,-0x1
JNZ 0x0018d5f1
CALL 0x001f5a70
MOV dword ptr [RAX],0x89
MOV dword ptr [RBP + -0x4],0xffffffff
JMP 0x0018d60e
LAB_0018d5f1:
MOV RDI,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RBP + -0x30]
MOV EDX,dword ptr [RBP + -0x18]
MOV ECX,dword ptr [RBP + -0x24]
MOV R8,qword ptr [RBP + -0x20]
XOR R9D,R9D
CALL 0x0018ce90
MOV dword ptr [RBP + -0x4],EAX
LAB_0018d60e:
MOV EAX,dword ptr [RBP + -0x4]
ADD RSP,0x60
POP RBP
RET
|
int4 maria_rtree_find_next(long *param_1,uint param_2)
{
int iVar1;
long lVar2;
int4 *puVar3;
void *local_68;
long local_60;
int local_58;
ulong local_48;
void *local_40;
long local_38;
int4 local_2c;
long local_28;
int4 local_20;
uint local_1c;
long *local_18;
int4 local_c;
local_38 = *(long *)(*param_1 + 0x570) + (ulong)param_2 * 0x118;
local_2c = 0x400;
local_20 = 0x400;
local_1c = param_2;
local_18 = param_1;
if ((*(uint *)((long)param_1 + 0x624) & 8) == 0) {
if (*(char *)((long)param_1 + 0x685) == '\0') {
for (local_40 = (void *)param_1[0x76]; local_40 < (void *)local_18[0x77];
local_40 = (void *)((long)local_40 + (long)(int)(uint)*(ushort *)(local_38 + 0xaa))) {
iVar1 = maria_rtree_key_cmp(*(int8 *)(local_38 + 0xc0),local_18[0x73],local_40,
(int)local_18[0xc6],local_20);
if (iVar1 == 0) {
local_48 = (long)local_40 + (long)(int)(uint)*(ushort *)(local_38 + 0xaa);
local_60 = local_38;
local_68 = local_40;
local_58 = (uint)*(ushort *)(local_38 + 0xaa) - *(int *)(*local_18 + 0x3e0);
lVar2 = _ma_row_pos_from_key(&local_68);
local_18[0x13] = lVar2;
memcpy((void *)local_18[0x40],local_40,(ulong)*(uint *)(local_18 + 0x42));
if (local_48 < (ulong)local_18[0x77]) {
local_18[0x76] = local_48;
}
else {
*(int1 *)((long)local_18 + 0x685) = 1;
}
return 0;
}
}
}
local_28 = *(long *)(*(long *)(*local_18 + 0x118) + (ulong)local_1c * 8);
if (local_28 == -1) {
puVar3 = (int4 *)_my_thread_var();
*puVar3 = 0x89;
local_c = 0xffffffff;
}
else {
local_c = maria_rtree_find_req(local_18,local_38,local_20,local_2c,local_28,0);
}
}
else {
local_c = maria_rtree_find_first(param_1,param_1 + 0x40,0x400);
}
return local_c;
}
|
|
6,314 | get_wval_limb | corpus-core[P]colibri-stateless/build_O1/_deps/blst-src/src/ec_mult.h | static limb_t get_wval_limb(const byte *d, size_t off, size_t bits)
{
size_t i, top = (off + bits - 1)/8;
limb_t ret, mask = (limb_t)0 - 1;
d += off/8;
top -= off/8-1;
/* this is not about constant-time-ness, but branch optimization */
for (ret=0, i=0; i<4;) {
ret |= (*d & mask) << (8*i);
mask = (limb_t)0 - ((++i - top) >> (8*sizeof(top)-1));
d += 1 & mask;
}
return ret >> (off%8);
} | O1 | c | get_wval_limb:
pushq %rbp
movq %rsp, %rbp
leaq (%rsi,%rdx), %rax
decq %rax
shrq $0x3, %rax
movq %rsi, %rdx
shrq $0x3, %rdx
addq %rdx, %rdi
subq %rax, %rdx
movq $-0x1, %r8
xorl %ecx, %ecx
xorl %eax, %eax
movzbl (%rdi), %r9d
andl %r9d, %r8d
shlq %cl, %r8
orq %r8, %rax
movq %rdx, %r8
sarq $0x3f, %r8
movq %rdx, %r9
shrq $0x3f, %r9
addq %r9, %rdi
addq $0x8, %rcx
incq %rdx
cmpq $0x20, %rcx
jne 0x29444
andb $0x7, %sil
movl %esi, %ecx
shrq %cl, %rax
popq %rbp
retq
| get_wval_limb:
push rbp
mov rbp, rsp
lea rax, [rsi+rdx]
dec rax
shr rax, 3
mov rdx, rsi
shr rdx, 3
add rdi, rdx
sub rdx, rax
mov r8, 0FFFFFFFFFFFFFFFFh
xor ecx, ecx
xor eax, eax
loc_29444:
movzx r9d, byte ptr [rdi]
and r8d, r9d
shl r8, cl
or rax, r8
mov r8, rdx
sar r8, 3Fh
mov r9, rdx
shr r9, 3Fh
add rdi, r9
add rcx, 8
inc rdx
cmp rcx, 20h ; ' '
jnz short loc_29444
and sil, 7
mov ecx, esi
shr rax, cl
pop rbp
retn
| unsigned long long get_wval_limb(long long a1, unsigned long long a2, long long a3)
{
_BYTE *v3; // rdi
signed long long v4; // rdx
long long v5; // r8
long long v6; // rcx
unsigned long long v7; // rax
v3 = (_BYTE *)((a2 >> 3) + a1);
v4 = (a2 >> 3) - ((a2 + a3 - 1) >> 3);
LOBYTE(v5) = -1;
v6 = 0LL;
v7 = 0LL;
do
{
v7 |= (unsigned long long)(unsigned __int8)(*v3 & v5) << v6;
v5 = v4 >> 63;
v3 += (unsigned long long)v4 >> 63;
v6 += 8LL;
++v4;
}
while ( v6 != 32 );
return v7 >> (a2 & 7);
}
| get_wval_limb:
PUSH RBP
MOV RBP,RSP
LEA RAX,[RSI + RDX*0x1]
DEC RAX
SHR RAX,0x3
MOV RDX,RSI
SHR RDX,0x3
ADD RDI,RDX
SUB RDX,RAX
MOV R8,-0x1
XOR ECX,ECX
XOR EAX,EAX
LAB_00129444:
MOVZX R9D,byte ptr [RDI]
AND R8D,R9D
SHL R8,CL
OR RAX,R8
MOV R8,RDX
SAR R8,0x3f
MOV R9,RDX
SHR R9,0x3f
ADD RDI,R9
ADD RCX,0x8
INC RDX
CMP RCX,0x20
JNZ 0x00129444
AND SIL,0x7
MOV ECX,ESI
SHR RAX,CL
POP RBP
RET
|
ulong get_wval_limb(long param_1,ulong param_2,long param_3)
{
ulong uVar1;
long lVar2;
long lVar3;
byte *pbVar4;
long lVar5;
pbVar4 = (byte *)(param_1 + (param_2 >> 3));
lVar3 = (param_2 >> 3) - ((param_2 + param_3) - 1 >> 3);
lVar5 = -1;
lVar2 = 0;
uVar1 = 0;
do {
uVar1 = uVar1 | (ulong)((uint)lVar5 & (uint)*pbVar4) << ((byte)lVar2 & 0x3f);
lVar5 = lVar3 >> 0x3f;
pbVar4 = pbVar4 + -lVar5;
lVar2 = lVar2 + 8;
lVar3 = lVar3 + 1;
} while (lVar2 != 0x20);
return uVar1 >> ((byte)param_2 & 7);
}
|
|
6,315 | serial_cpp::SerialException::SerialException(char const*) | ami-iit[P]serial_cpp/include/serial_cpp/serial.h | SerialException (const char *description) {
std::stringstream ss;
ss << "SerialException " << description << " failed.";
e_what_ = ss.str();
} | O0 | c | serial_cpp::SerialException::SerialException(char const*):
pushq %rbp
movq %rsp, %rbp
subq $0x1f0, %rsp # imm = 0x1F0
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x1d8(%rbp)
callq 0xce60
movq -0x1d8(%rbp), %rdi
leaq 0xa677(%rip), %rax # 0x16d28
movq %rax, (%rdi)
addq $0x8, %rdi
movq %rdi, -0x1d0(%rbp)
callq 0x34b0
leaq -0x198(%rbp), %rdi
callq 0x3220
jmp 0xc6d2
leaq -0x188(%rbp), %rdi
leaq 0x4191(%rip), %rsi # 0x10871
callq 0x3310
movq %rax, -0x1e0(%rbp)
jmp 0xc6ee
movq -0x1e0(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0x3310
movq %rax, -0x1e8(%rbp)
jmp 0xc707
movq -0x1e8(%rbp), %rdi
leaq 0x416d(%rip), %rsi # 0x10882
callq 0x3310
jmp 0xc71c
leaq -0x1c8(%rbp), %rdi
leaq -0x198(%rbp), %rsi
callq 0x3300
jmp 0xc731
movq -0x1d8(%rbp), %rdi
addq $0x8, %rdi
leaq -0x1c8(%rbp), %rsi
callq 0x3410
leaq -0x1c8(%rbp), %rdi
callq 0x31e0
leaq -0x198(%rbp), %rdi
callq 0x3260
addq $0x1f0, %rsp # imm = 0x1F0
popq %rbp
retq
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x1a0(%rbp)
movl %eax, -0x1a4(%rbp)
jmp 0xc79b
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x1a0(%rbp)
movl %eax, -0x1a4(%rbp)
leaq -0x198(%rbp), %rdi
callq 0x3260
movq -0x1d0(%rbp), %rdi
callq 0x31e0
movq -0x1d8(%rbp), %rdi
callq 0x3630
movq -0x1a0(%rbp), %rdi
callq 0x35d0
nop
| _ZN10serial_cpp15SerialExceptionC2EPKc:
push rbp
mov rbp, rsp
sub rsp, 1F0h
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov rdi, [rbp+var_8]; this
mov [rbp+var_1D8], rdi
call _ZNSt9exceptionC2Ev; std::exception::exception(void)
mov rdi, [rbp+var_1D8]
lea rax, off_16D28
mov [rdi], rax
add rdi, 8
mov [rbp+var_1D0], rdi
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC1Ev; std::string::basic_string(void)
lea rdi, [rbp+var_198]
call __ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEEC1Ev; std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::basic_stringstream(void)
jmp short $+2
loc_C6D2:
lea rdi, [rbp+var_188]
lea rsi, aSerialexceptio; "SerialException "
call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*)
mov [rbp+var_1E0], rax
jmp short $+2
loc_C6EE:
mov rdi, [rbp+var_1E0]
mov rsi, [rbp+var_10]
call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*)
mov [rbp+var_1E8], rax
jmp short $+2
loc_C707:
mov rdi, [rbp+var_1E8]
lea rsi, aFailed; " failed."
call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*)
jmp short $+2
loc_C71C:
lea rdi, [rbp+var_1C8]
lea rsi, [rbp+var_198]
call __ZNKSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEE3strEv; std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::str(void)
jmp short $+2
loc_C731:
mov rdi, [rbp+var_1D8]
add rdi, 8
lea rsi, [rbp+var_1C8]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEOS4_; std::string::operator=(std::string&&)
lea rdi, [rbp+var_1C8]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
lea rdi, [rbp+var_198]
call __ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEED1Ev; std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::~basic_stringstream()
add rsp, 1F0h
pop rbp
retn
mov rcx, rax
mov eax, edx
mov [rbp+var_1A0], rcx
mov [rbp+var_1A4], eax
jmp short loc_C79B
mov rcx, rax
mov eax, edx
mov [rbp+var_1A0], rcx
mov [rbp+var_1A4], eax
lea rdi, [rbp+var_198]
call __ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEED1Ev; std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::~basic_stringstream()
loc_C79B:
mov rdi, [rbp+var_1D0]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
mov rdi, [rbp+var_1D8]; this
call __ZNSt9exceptionD2Ev; std::exception::~exception()
mov rdi, [rbp+var_1A0]
call __Unwind_Resume
| long long serial_cpp::SerialException::SerialException(serial_cpp::SerialException *this, const char *a2)
{
long long v3; // [rsp+8h] [rbp-1E8h]
long long v4; // [rsp+10h] [rbp-1E0h]
_BYTE v5[36]; // [rsp+28h] [rbp-1C8h] BYREF
_BYTE v6[16]; // [rsp+58h] [rbp-198h] BYREF
_BYTE v7[376]; // [rsp+68h] [rbp-188h] BYREF
const char *v8; // [rsp+1E0h] [rbp-10h]
std::exception *v9; // [rsp+1E8h] [rbp-8h]
v9 = this;
v8 = a2;
std::exception::exception(this);
*(_QWORD *)this = off_16D28;
std::string::basic_string((char *)this + 8);
std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::basic_stringstream(v6);
v4 = std::operator<<<std::char_traits<char>>(v7, "SerialException ");
v3 = std::operator<<<std::char_traits<char>>(v4, v8);
std::operator<<<std::char_traits<char>>(v3, " failed.");
std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::str(v5, v6);
std::string::operator=((char *)this + 8, v5);
std::string::~string(v5);
return std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::~basic_stringstream(v6);
}
| SerialException:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x1f0
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV RDI,qword ptr [RBP + -0x8]
MOV qword ptr [RBP + -0x1d8],RDI
CALL 0x0010ce60
MOV RDI,qword ptr [RBP + -0x1d8]
LEA RAX,[0x116d28]
MOV qword ptr [RDI],RAX
ADD RDI,0x8
MOV qword ptr [RBP + -0x1d0],RDI
CALL 0x001034b0
LAB_0010c6c4:
LEA RDI,[RBP + -0x198]
CALL 0x00103220
JMP 0x0010c6d2
LAB_0010c6d2:
LEA RDI,[RBP + -0x188]
LAB_0010c6d9:
LEA RSI,[0x110871]
CALL 0x00103310
MOV qword ptr [RBP + -0x1e0],RAX
JMP 0x0010c6ee
LAB_0010c6ee:
MOV RDI,qword ptr [RBP + -0x1e0]
MOV RSI,qword ptr [RBP + -0x10]
CALL 0x00103310
MOV qword ptr [RBP + -0x1e8],RAX
JMP 0x0010c707
LAB_0010c707:
MOV RDI,qword ptr [RBP + -0x1e8]
LEA RSI,[0x110882]
CALL 0x00103310
JMP 0x0010c71c
LAB_0010c71c:
LEA RDI,[RBP + -0x1c8]
LEA RSI,[RBP + -0x198]
CALL 0x00103300
LAB_0010c72f:
JMP 0x0010c731
LAB_0010c731:
MOV RDI,qword ptr [RBP + -0x1d8]
ADD RDI,0x8
LEA RSI,[RBP + -0x1c8]
CALL 0x00103410
LEA RDI,[RBP + -0x1c8]
CALL 0x001031e0
LEA RDI,[RBP + -0x198]
CALL 0x00103260
ADD RSP,0x1f0
POP RBP
RET
|
/* serial_cpp::SerialException::SerialException(char const*) */
void __thiscall serial_cpp::SerialException::SerialException(SerialException *this,char *param_1)
{
ostream *poVar1;
string local_1d0 [48];
stringstream local_1a0 [16];
ostream local_190 [376];
char *local_18;
SerialException *local_10;
local_18 = param_1;
local_10 = this;
std::exception::exception((exception *)this);
*(int ***)this = &PTR__SerialException_00116d28;
std::__cxx11::string::string((string *)(this + 8));
/* try { // try from 0010c6c4 to 0010c6cf has its CatchHandler @ 0010c769 */
std::__cxx11::stringstream::stringstream(local_1a0);
/* try { // try from 0010c6d9 to 0010c72e has its CatchHandler @ 0010c77d */
poVar1 = std::operator<<(local_190,"SerialException ");
poVar1 = std::operator<<(poVar1,local_18);
std::operator<<(poVar1," failed.");
std::__cxx11::stringstream::str();
std::__cxx11::string::operator=((string *)(this + 8),local_1d0);
std::__cxx11::string::~string(local_1d0);
std::__cxx11::stringstream::~stringstream(local_1a0);
return;
}
|
|
6,316 | serial_cpp::SerialException::SerialException(char const*) | ami-iit[P]serial_cpp/include/serial_cpp/serial.h | SerialException (const char *description) {
std::stringstream ss;
ss << "SerialException " << description << " failed.";
e_what_ = ss.str();
} | O3 | c | serial_cpp::SerialException::SerialException(char const*):
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x1b0, %rsp # imm = 0x1B0
movq %rsi, %r12
movq %rdi, %rbx
leaq 0x7e97(%rip), %rax # 0xfd28
movq %rax, (%rdi)
leaq 0x8(%rdi), %r14
leaq 0x18(%rdi), %r13
movq %r13, 0x8(%rdi)
movq $0x0, 0x10(%rdi)
movb $0x0, 0x18(%rdi)
leaq 0x28(%rsp), %rdi
callq 0x31c0
leaq 0x38(%rsp), %r15
leaq 0x3a45(%rip), %rsi # 0xb907
movl $0x10, %edx
movq %r15, %rdi
callq 0x3330
testq %r12, %r12
je 0x7eec
movq %r12, %rdi
callq 0x3130
movq %r15, %rdi
movq %r12, %rsi
movq %rax, %rdx
callq 0x3330
jmp 0x7f05
movq 0x38(%rsp), %rax
movq -0x18(%rax), %rax
leaq (%r15,%rax), %rdi
movl 0x58(%rsp,%rax), %esi
orl $0x1, %esi
callq 0x34b0
leaq 0x3a0c(%rip), %rsi # 0xb918
movl $0x8, %edx
movq %r15, %rdi
callq 0x3330
leaq 0x40(%rsp), %rsi
leaq 0x8(%rsp), %rdi
callq 0x3460
leaq 0x8(%rsp), %rbx
movq %r14, %rdi
movq %rbx, %rsi
callq 0x3360
movq (%rbx), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0x7f52
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x32c0
movq 0x8047(%rip), %rsi # 0xffa0
leaq 0x28(%rsp), %rdi
callq 0x3200
leaq 0xa8(%rsp), %rdi
callq 0x30d0
addq $0x1b0, %rsp # imm = 0x1B0
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
jmp 0x7f88
movq %rax, %r15
jmp 0x7fa9
movq %rax, %r15
movq 0x800e(%rip), %rsi # 0xffa0
leaq 0x28(%rsp), %rdi
callq 0x3200
leaq 0xa8(%rsp), %rdi
callq 0x30d0
movq (%r14), %rdi
cmpq %r13, %rdi
je 0x7fbd
movq (%r13), %rsi
incq %rsi
callq 0x32c0
movq %rbx, %rdi
callq 0x3530
movq %r15, %rdi
callq 0x34f0
nop
| _ZN10serial_cpp15SerialExceptionC2EPKc:
push r15
push r14
push r13
push r12
push rbx
sub rsp, 1B0h
mov r12, rsi
mov rbx, rdi
lea rax, off_FD28
mov [rdi], rax
lea r14, [rdi+8]
lea r13, [rdi+18h]
mov [rdi+8], r13
mov qword ptr [rdi+10h], 0
mov byte ptr [rdi+18h], 0
lea rdi, [rsp+1D8h+var_1B0]
call __ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEEC1Ev; std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::basic_stringstream(void)
lea r15, [rsp+1D8h+var_1A0]
lea rsi, aSerialexceptio; "SerialException "
mov edx, 10h
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)
test r12, r12
jz short loc_7EEC
mov rdi, r12
call _strlen
mov rdi, r15
mov rsi, r12
mov rdx, rax
call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long)
jmp short loc_7F05
loc_7EEC:
mov rax, [rsp+1D8h+var_1A0]
mov rax, [rax-18h]
lea rdi, [r15+rax]
mov esi, [rsp+rax+1D8h+var_180]
or esi, 1
call __ZNSt9basic_iosIcSt11char_traitsIcEE5clearESt12_Ios_Iostate; std::ios::clear(std::_Ios_Iostate)
loc_7F05:
lea rsi, aFailed; " failed."
mov edx, 8
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)
lea rsi, [rsp+1D8h+var_198]
lea rdi, [rsp+1D8h+var_1D0]
call __ZNKSt7__cxx1115basic_stringbufIcSt11char_traitsIcESaIcEE3strEv; std::stringbuf::str(void)
lea rbx, [rsp+1D8h+var_1D0]
mov rdi, r14
mov rsi, rbx
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEOS4_; std::string::operator=(std::string&&)
mov rdi, [rbx]; void *
lea rax, [rsp+1D8h+var_1C0]
cmp rdi, rax
jz short loc_7F52
mov rsi, [rsp+1D8h+var_1C0]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_7F52:
mov rsi, cs:_ZTTNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEEE_ptr
lea rdi, [rsp+1D8h+var_1B0]
call __ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEED2Ev; std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::~basic_stringstream()
lea rdi, [rsp+1D8h+var_130]; this
call __ZNSt8ios_baseD2Ev; std::ios_base::~ios_base()
add rsp, 1B0h
pop rbx
pop r12
pop r13
pop r14
pop r15
retn
jmp short loc_7F88
mov r15, rax
jmp short loc_7FA9
loc_7F88:
mov r15, rax
mov rsi, cs:_ZTTNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEEE_ptr
lea rdi, [rsp+arg_20]
call __ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEED2Ev; std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::~basic_stringstream()
lea rdi, [rsp+arg_A0]; this
call __ZNSt8ios_baseD2Ev; std::ios_base::~ios_base()
loc_7FA9:
mov rdi, [r14]; void *
cmp rdi, r13
jz short loc_7FBD
mov rsi, [r13+0]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_7FBD:
mov rdi, rbx; this
call __ZNSt9exceptionD2Ev; std::exception::~exception()
mov rdi, r15
call __Unwind_Resume
| void serial_cpp::SerialException::SerialException(serial_cpp::SerialException *this, const char *a2)
{
long long v2; // rax
void *v3[2]; // [rsp+8h] [rbp-1D0h] BYREF
long long v4; // [rsp+18h] [rbp-1C0h] BYREF
_BYTE v5[16]; // [rsp+28h] [rbp-1B0h] BYREF
long long v6; // [rsp+38h] [rbp-1A0h] BYREF
_BYTE v7[104]; // [rsp+40h] [rbp-198h] BYREF
_BYTE v8[304]; // [rsp+A8h] [rbp-130h] BYREF
*(_QWORD *)this = off_FD28;
*((_QWORD *)this + 1) = (char *)this + 24;
*((_QWORD *)this + 2) = 0LL;
*((_BYTE *)this + 24) = 0;
std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::basic_stringstream(v5);
std::__ostream_insert<char,std::char_traits<char>>(&v6, "SerialException ", 16LL);
if ( a2 )
{
v2 = strlen(a2);
std::__ostream_insert<char,std::char_traits<char>>(&v6, a2, v2);
}
else
{
std::ios::clear(&v7[*(_QWORD *)(v6 - 24) - 8], *(_DWORD *)&v7[*(_QWORD *)(v6 - 24) + 24] | 1u);
}
std::__ostream_insert<char,std::char_traits<char>>(&v6, " failed.", 8LL);
std::stringbuf::str(v3, v7);
std::string::operator=((char *)this + 8, v3);
if ( v3[0] != &v4 )
operator delete(v3[0], v4 + 1);
std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::~basic_stringstream(
v5,
&`VTT for'std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>);
std::ios_base::~ios_base((std::ios_base *)v8);
}
| SerialException:
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x1b0
MOV R12,RSI
MOV RBX,RDI
LEA RAX,[0x10fd28]
MOV qword ptr [RDI],RAX
LEA R14,[RDI + 0x8]
LEA R13,[RDI + 0x18]
MOV qword ptr [RDI + 0x8],R13
MOV qword ptr [RDI + 0x10],0x0
MOV byte ptr [RDI + 0x18],0x0
LAB_00107eac:
LEA RDI,[RSP + 0x28]
CALL 0x001031c0
LEA R15,[RSP + 0x38]
LAB_00107ebb:
LEA RSI,[0x10b907]
MOV EDX,0x10
MOV RDI,R15
CALL 0x00103330
TEST R12,R12
JZ 0x00107eec
MOV RDI,R12
CALL 0x00103130
MOV RDI,R15
MOV RSI,R12
MOV RDX,RAX
CALL 0x00103330
JMP 0x00107f05
LAB_00107eec:
MOV RAX,qword ptr [RSP + 0x38]
MOV RAX,qword ptr [RAX + -0x18]
LEA RDI,[R15 + RAX*0x1]
MOV ESI,dword ptr [RSP + RAX*0x1 + 0x58]
OR ESI,0x1
CALL 0x001034b0
LAB_00107f05:
LEA RSI,[0x10b918]
MOV EDX,0x8
MOV RDI,R15
CALL 0x00103330
LEA RSI,[RSP + 0x40]
LAB_00107f1e:
LEA RDI,[RSP + 0x8]
CALL 0x00103460
LAB_00107f28:
LEA RBX,[RSP + 0x8]
MOV RDI,R14
MOV RSI,RBX
CALL 0x00103360
MOV RDI,qword ptr [RBX]
LEA RAX,[RSP + 0x18]
CMP RDI,RAX
JZ 0x00107f52
MOV RSI,qword ptr [RSP + 0x18]
INC RSI
CALL 0x001032c0
LAB_00107f52:
MOV RSI,qword ptr [0x0010ffa0]
LEA RDI,[RSP + 0x28]
CALL 0x00103200
LEA RDI,[RSP + 0xa8]
CALL 0x001030d0
ADD RSP,0x1b0
POP RBX
POP R12
POP R13
POP R14
POP R15
RET
|
/* serial_cpp::SerialException::SerialException(char const*) */
void __thiscall serial_cpp::SerialException::SerialException(SerialException *this,char *param_1)
{
size_t sVar1;
long *local_1d0 [2];
long local_1c0 [2];
stringstream local_1b0 [16];
long local_1a0 [4];
uint auStack_180 [20];
ios_base local_130 [264];
*(int ***)this = &PTR__SerialException_0010fd28;
*(SerialException **)(this + 8) = this + 0x18;
*(int8 *)(this + 0x10) = 0;
this[0x18] = (SerialException)0x0;
/* try { // try from 00107eac to 00107eb5 has its CatchHandler @ 00107f83 */
std::__cxx11::stringstream::stringstream(local_1b0);
/* try { // try from 00107ebb to 00107f18 has its CatchHandler @ 00107f88 */
std::__ostream_insert<char,std::char_traits<char>>((ostream *)local_1a0,"SerialException ",0x10);
if (param_1 == (char *)0x0) {
std::ios::clear((ostream *)local_1a0 + *(long *)(local_1a0[0] + -0x18),
*(uint *)((long)auStack_180 + *(long *)(local_1a0[0] + -0x18)) | 1);
}
else {
sVar1 = strlen(param_1);
std::__ostream_insert<char,std::char_traits<char>>((ostream *)local_1a0,param_1,sVar1);
}
std::__ostream_insert<char,std::char_traits<char>>((ostream *)local_1a0," failed.",8);
/* try { // try from 00107f1e to 00107f27 has its CatchHandler @ 00107f81 */
std::__cxx11::stringbuf::str();
std::__cxx11::string::operator=((string *)(this + 8),(string *)local_1d0);
if (local_1d0[0] != local_1c0) {
operator_delete(local_1d0[0],local_1c0[0] + 1);
}
std::__cxx11::stringstream::~stringstream(local_1b0);
std::ios_base::~ios_base(local_130);
return;
}
|
|
6,317 | ImPlot3D::ImMixU32(unsigned int, unsigned int, unsigned int) | zkingston[P]unknot/build_O0/_deps/implot3d-src/implot3d_internal.h | static inline ImU32 ImMixU32(ImU32 a, ImU32 b, ImU32 s) {
#ifdef IMPLOT3D_MIX64
const ImU32 af = 256 - s;
const ImU32 bf = s;
const ImU64 al = (a & 0x00ff00ff) | (((ImU64)(a & 0xff00ff00)) << 24);
const ImU64 bl = (b & 0x00ff00ff) | (((ImU64)(b & 0xff00ff00)) << 24);
const ImU64 mix = (al * af + bl * bf);
return ((mix >> 32) & 0xff00ff00) | ((mix & 0xff00ff00) >> 8);
#else
const ImU32 af = 256 - s;
const ImU32 bf = s;
const ImU32 al = (a & 0x00ff00ff);
const ImU32 ah = (a & 0xff00ff00) >> 8;
const ImU32 bl = (b & 0x00ff00ff);
const ImU32 bh = (b & 0xff00ff00) >> 8;
const ImU32 ml = (al * af + bl * bf);
const ImU32 mh = (ah * af + bh * bf);
return (mh & 0xff00ff00) | ((ml & 0xff00ff00) >> 8);
#endif
} | O0 | c | ImPlot3D::ImMixU32(unsigned int, unsigned int, unsigned int):
movl %edi, -0x4(%rsp)
movl %esi, -0x8(%rsp)
movl %edx, -0xc(%rsp)
movl $0x100, %eax # imm = 0x100
subl -0xc(%rsp), %eax
movl %eax, -0x10(%rsp)
movl -0xc(%rsp), %eax
movl %eax, -0x14(%rsp)
movl -0x4(%rsp), %eax
andl $0xff00ff, %eax # imm = 0xFF00FF
movl %eax, -0x18(%rsp)
movl -0x4(%rsp), %eax
andl $0xff00ff00, %eax # imm = 0xFF00FF00
shrl $0x8, %eax
movl %eax, -0x1c(%rsp)
movl -0x8(%rsp), %eax
andl $0xff00ff, %eax # imm = 0xFF00FF
movl %eax, -0x20(%rsp)
movl -0x8(%rsp), %eax
andl $0xff00ff00, %eax # imm = 0xFF00FF00
shrl $0x8, %eax
movl %eax, -0x24(%rsp)
movl -0x18(%rsp), %eax
imull -0x10(%rsp), %eax
movl -0x20(%rsp), %ecx
imull -0x14(%rsp), %ecx
addl %ecx, %eax
movl %eax, -0x28(%rsp)
movl -0x1c(%rsp), %eax
imull -0x10(%rsp), %eax
movl -0x24(%rsp), %ecx
imull -0x14(%rsp), %ecx
addl %ecx, %eax
movl %eax, -0x2c(%rsp)
movl -0x2c(%rsp), %eax
andl $0xff00ff00, %eax # imm = 0xFF00FF00
movl -0x28(%rsp), %ecx
andl $0xff00ff00, %ecx # imm = 0xFF00FF00
shrl $0x8, %ecx
orl %ecx, %eax
retq
nopw %cs:(%rax,%rax)
| _ZN8ImPlot3DL8ImMixU32Ejjj:
mov [rsp+var_4], edi
mov [rsp+var_8], esi
mov [rsp+var_C], edx
mov eax, 100h
sub eax, [rsp+var_C]
mov [rsp+var_10], eax
mov eax, [rsp+var_C]
mov [rsp+var_14], eax
mov eax, [rsp+var_4]
and eax, 0FF00FFh
mov [rsp+var_18], eax
mov eax, [rsp+var_4]
and eax, 0FF00FF00h
shr eax, 8
mov [rsp+var_1C], eax
mov eax, [rsp+var_8]
and eax, 0FF00FFh
mov [rsp+var_20], eax
mov eax, [rsp+var_8]
and eax, 0FF00FF00h
shr eax, 8
mov [rsp+var_24], eax
mov eax, [rsp+var_18]
imul eax, [rsp+var_10]
mov ecx, [rsp+var_20]
imul ecx, [rsp+var_14]
add eax, ecx
mov [rsp+var_28], eax
mov eax, [rsp+var_1C]
imul eax, [rsp+var_10]
mov ecx, [rsp+var_24]
imul ecx, [rsp+var_14]
add eax, ecx
mov [rsp+var_2C], eax
mov eax, [rsp+var_2C]
and eax, 0FF00FF00h
mov ecx, [rsp+var_28]
and ecx, 0FF00FF00h
shr ecx, 8
or eax, ecx
retn
| long long ImPlot3D::ImMixU32(ImPlot3D *this, int a2, int a3)
{
return (((a3 * (a2 & 0xFF00FF) + (256 - a3) * ((unsigned int)this & 0xFF00FF)) & 0xFF00FF00) >> 8) | (a3 * ((a2 & 0xFF00FF00) >> 8) + (256 - a3) * (((unsigned int)this & 0xFF00FF00) >> 8)) & 0xFF00FF00;
}
| ImMixU32:
MOV dword ptr [RSP + -0x4],EDI
MOV dword ptr [RSP + -0x8],ESI
MOV dword ptr [RSP + -0xc],EDX
MOV EAX,0x100
SUB EAX,dword ptr [RSP + -0xc]
MOV dword ptr [RSP + -0x10],EAX
MOV EAX,dword ptr [RSP + -0xc]
MOV dword ptr [RSP + -0x14],EAX
MOV EAX,dword ptr [RSP + -0x4]
AND EAX,0xff00ff
MOV dword ptr [RSP + -0x18],EAX
MOV EAX,dword ptr [RSP + -0x4]
AND EAX,0xff00ff00
SHR EAX,0x8
MOV dword ptr [RSP + -0x1c],EAX
MOV EAX,dword ptr [RSP + -0x8]
AND EAX,0xff00ff
MOV dword ptr [RSP + -0x20],EAX
MOV EAX,dword ptr [RSP + -0x8]
AND EAX,0xff00ff00
SHR EAX,0x8
MOV dword ptr [RSP + -0x24],EAX
MOV EAX,dword ptr [RSP + -0x18]
IMUL EAX,dword ptr [RSP + -0x10]
MOV ECX,dword ptr [RSP + -0x20]
IMUL ECX,dword ptr [RSP + -0x14]
ADD EAX,ECX
MOV dword ptr [RSP + -0x28],EAX
MOV EAX,dword ptr [RSP + -0x1c]
IMUL EAX,dword ptr [RSP + -0x10]
MOV ECX,dword ptr [RSP + -0x24]
IMUL ECX,dword ptr [RSP + -0x14]
ADD EAX,ECX
MOV dword ptr [RSP + -0x2c],EAX
MOV EAX,dword ptr [RSP + -0x2c]
AND EAX,0xff00ff00
MOV ECX,dword ptr [RSP + -0x28]
AND ECX,0xff00ff00
SHR ECX,0x8
OR EAX,ECX
RET
|
/* ImPlot3D::ImMixU32(unsigned int, unsigned int, unsigned int) */
uint ImPlot3D::ImMixU32(uint param_1,uint param_2,uint param_3)
{
return ((param_1 & 0xff00ff00) >> 8) * (0x100 - param_3) + ((param_2 & 0xff00ff00) >> 8) * param_3
& 0xff00ff00 |
((param_1 & 0xff00ff) * (0x100 - param_3) + (param_2 & 0xff00ff) * param_3 & 0xff00ff00) >>
8;
}
|
|
6,318 | my_snprintf_utf32 | eloqsql/strings/ctype-ucs2.c | static size_t
my_snprintf_utf32(CHARSET_INFO *cs __attribute__((unused)),
char* to, size_t n, const char* fmt, ...)
{
size_t ret;
va_list args;
va_start(args,fmt);
ret= my_vsnprintf_utf32(to, n, fmt, args);
va_end(args);
return ret;
} | O0 | c | my_snprintf_utf32:
pushq %rbp
movq %rsp, %rbp
subq $0xf0, %rsp
testb %al, %al
je 0xab02b
movaps %xmm0, -0xc0(%rbp)
movaps %xmm1, -0xb0(%rbp)
movaps %xmm2, -0xa0(%rbp)
movaps %xmm3, -0x90(%rbp)
movaps %xmm4, -0x80(%rbp)
movaps %xmm5, -0x70(%rbp)
movaps %xmm6, -0x60(%rbp)
movaps %xmm7, -0x50(%rbp)
movq %r9, -0xc8(%rbp)
movq %r8, -0xd0(%rbp)
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
leaq -0xf0(%rbp), %rax
movq %rax, -0x30(%rbp)
leaq 0x10(%rbp), %rax
movq %rax, -0x38(%rbp)
movl $0x30, -0x3c(%rbp)
movl $0x20, -0x40(%rbp)
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x20(%rbp), %rdx
leaq -0x40(%rbp), %rcx
callq 0xaf120
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
addq $0xf0, %rsp
popq %rbp
retq
| my_snprintf_utf32:
push rbp
mov rbp, rsp
sub rsp, 0F0h
test al, al
jz short loc_AB02B
movaps [rbp+var_C0], xmm0
movaps [rbp+var_B0], xmm1
movaps [rbp+var_A0], xmm2
movaps [rbp+var_90], xmm3
movaps [rbp+var_80], xmm4
movaps [rbp+var_70], xmm5
movaps [rbp+var_60], xmm6
movaps [rbp+var_50], xmm7
loc_AB02B:
mov [rbp+var_C8], r9
mov [rbp+var_D0], r8
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov [rbp+var_18], rdx
mov [rbp+var_20], rcx
lea rax, [rbp+var_F0]
mov [rbp+var_30], rax
lea rax, [rbp+arg_0]
mov [rbp+var_38], rax
mov [rbp+var_3C], 30h ; '0'
mov [rbp+var_40], 20h ; ' '
mov rdi, [rbp+var_10]
mov rsi, [rbp+var_18]
mov rdx, [rbp+var_20]
lea rcx, [rbp+var_40]
call my_vsnprintf_utf32
mov [rbp+var_28], rax
mov rax, [rbp+var_28]
add rsp, 0F0h
pop rbp
retn
| long long my_snprintf_utf32(
long long a1,
long long a2,
long long a3,
long long a4,
long long a5,
long long a6,
__m128 a7,
__m128 a8,
__m128 a9,
__m128 a10,
__m128 a11,
__m128 a12,
__m128 a13,
__m128 a14,
char a15)
{
char v16; // [rsp+0h] [rbp-F0h] BYREF
long long v17; // [rsp+20h] [rbp-D0h]
long long v18; // [rsp+28h] [rbp-C8h]
__m128 v19; // [rsp+30h] [rbp-C0h]
__m128 v20; // [rsp+40h] [rbp-B0h]
__m128 v21; // [rsp+50h] [rbp-A0h]
__m128 v22; // [rsp+60h] [rbp-90h]
__m128 v23; // [rsp+70h] [rbp-80h]
__m128 v24; // [rsp+80h] [rbp-70h]
__m128 v25; // [rsp+90h] [rbp-60h]
__m128 v26; // [rsp+A0h] [rbp-50h]
_DWORD v27[2]; // [rsp+B0h] [rbp-40h] BYREF
char *v28; // [rsp+B8h] [rbp-38h]
char *v29; // [rsp+C0h] [rbp-30h]
long long v30; // [rsp+D0h] [rbp-20h]
long long v31; // [rsp+D8h] [rbp-18h]
long long v32; // [rsp+E0h] [rbp-10h]
long long v33; // [rsp+E8h] [rbp-8h]
v19 = a7;
v20 = a8;
v21 = a9;
v22 = a10;
v23 = a11;
v24 = a12;
v25 = a13;
v26 = a14;
v18 = a6;
v17 = a5;
v33 = a1;
v32 = a2;
v31 = a3;
v30 = a4;
v29 = &v16;
v28 = &a15;
v27[1] = 48;
v27[0] = 32;
return my_vsnprintf_utf32(a2, a3, a4, v27);
}
| my_snprintf_utf32:
PUSH RBP
MOV RBP,RSP
SUB RSP,0xf0
TEST AL,AL
JZ 0x001ab02b
MOVAPS xmmword ptr [RBP + -0xc0],XMM0
MOVAPS xmmword ptr [RBP + -0xb0],XMM1
MOVAPS xmmword ptr [RBP + -0xa0],XMM2
MOVAPS xmmword ptr [RBP + -0x90],XMM3
MOVAPS xmmword ptr [RBP + -0x80],XMM4
MOVAPS xmmword ptr [RBP + -0x70],XMM5
MOVAPS xmmword ptr [RBP + -0x60],XMM6
MOVAPS xmmword ptr [RBP + -0x50],XMM7
LAB_001ab02b:
MOV qword ptr [RBP + -0xc8],R9
MOV qword ptr [RBP + -0xd0],R8
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV qword ptr [RBP + -0x18],RDX
MOV qword ptr [RBP + -0x20],RCX
LEA RAX,[RBP + -0xf0]
MOV qword ptr [RBP + -0x30],RAX
LEA RAX,[RBP + 0x10]
MOV qword ptr [RBP + -0x38],RAX
MOV dword ptr [RBP + -0x3c],0x30
MOV dword ptr [RBP + -0x40],0x20
MOV RDI,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RBP + -0x18]
MOV RDX,qword ptr [RBP + -0x20]
LEA RCX,[RBP + -0x40]
CALL 0x001af120
MOV qword ptr [RBP + -0x28],RAX
MOV RAX,qword ptr [RBP + -0x28]
ADD RSP,0xf0
POP RBP
RET
|
int8
my_snprintf_utf32(int8 param_1,int8 param_2,int8 param_3,int8 param_4,
int8 param_5,int8 param_6,int8 param_7,int8 param_8,
int8 param_9,int8 param_10,int8 param_11,int8 param_12,
int8 param_13,int8 param_14)
{
char in_AL;
int8 uVar1;
int1 local_f8 [32];
int8 local_d8;
int8 local_d0;
int8 local_c8;
int8 local_b8;
int8 local_a8;
int8 local_98;
int8 local_88;
int8 local_78;
int8 local_68;
int8 local_58;
int4 local_48;
int4 local_44;
int1 *local_40;
int1 *local_38;
int8 local_28;
int8 local_20;
int8 local_18;
int8 local_10;
if (in_AL != '\0') {
local_c8 = param_1;
local_b8 = param_2;
local_a8 = param_3;
local_98 = param_4;
local_88 = param_5;
local_78 = param_6;
local_68 = param_7;
local_58 = param_8;
}
local_38 = local_f8;
local_40 = &stack0x00000008;
local_44 = 0x30;
local_48 = 0x20;
local_d8 = param_13;
local_d0 = param_14;
local_28 = param_12;
local_20 = param_11;
local_18 = param_10;
local_10 = param_9;
uVar1 = my_vsnprintf_utf32(param_10,param_11,param_12,&local_48);
return uVar1;
}
|
|
6,319 | nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>::operator++() | monkey531[P]llama/common/./json.hpp | iter_impl& operator++()
{
JSON_ASSERT(m_object != nullptr);
switch (m_object->m_data.m_type)
{
case value_t::object:
{
std::advance(m_it.object_iterator, 1);
break;
}
case value_t::array:
{
std::advance(m_it.array_iterator, 1);
break;
}
case value_t::null:
case value_t::string:
case value_t::boolean:
case value_t::number_integer:
case value_t::number_unsigned:
case value_t::number_float:
case value_t::binary:
case value_t::discarded:
default:
{
++m_it.primitive_iterator;
break;
}
}
return *this;
} | O2 | cpp | nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>::operator++():
movq (%rdi), %rax
testq %rax, %rax
je 0x6d8bb
movzbl (%rax), %eax
cmpl $0x2, %eax
je 0x6d8ac
cmpl $0x1, %eax
jne 0x6d8b3
addq $0x30, 0x8(%rdi)
jmp 0x6d8b7
addq $0x10, 0x10(%rdi)
jmp 0x6d8b7
incq 0x18(%rdi)
movq %rdi, %rax
retq
pushq %rax
leaq 0x84453(%rip), %rdi # 0xf1d16
leaq 0x84498(%rip), %rdx # 0xf1d62
leaq 0x86ac7(%rip), %rcx # 0xf4398
movl $0x33c0, %esi # imm = 0x33C0
xorl %eax, %eax
callq 0x292a0
nop
| _ZN8nlohmann16json_abi_v3_11_36detail9iter_implINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEEppEv:
mov rax, [rdi]
test rax, rax
jz short loc_6D8BB
movzx eax, byte ptr [rax]
cmp eax, 2
jz short loc_6D8AC
cmp eax, 1
jnz short loc_6D8B3
add qword ptr [rdi+8], 30h ; '0'
jmp short loc_6D8B7
loc_6D8AC:
add qword ptr [rdi+10h], 10h
jmp short loc_6D8B7
loc_6D8B3:
inc qword ptr [rdi+18h]
loc_6D8B7:
mov rax, rdi
retn
loc_6D8BB:
push rax
lea rdi, aWorkspaceLlm4b_1; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aAnchorMObjectN+7; "m_object != nullptr"
mov esi, 33C0h
xor eax, eax
call _ggml_abort
nop
| long long 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>>::operator++(
unsigned __int8 **a1)
{
int v1; // eax
if ( *a1 )
{
v1 = **a1;
if ( v1 == 2 )
{
a1[2] += 16;
}
else if ( v1 == 1 )
{
a1[1] += 48;
}
else
{
++a1[3];
}
return (long long)a1;
}
else
{
ggml_abort(
"/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/./json.hpp",
13248LL,
"GGML_ASSERT(%s) failed",
"m_object != nullptr");
return ZN8nlohmann16json_abi_v3_11_36detail8json_refINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEEC2IJRA28_KcETnNSt9enable_ifIXsr3std16is_constructibleISF_DpT_EE5valueEiE4typeELi0EEEDpOSM_(
"/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/./json.hpp",
13248LL);
}
}
| operator++:
MOV RAX,qword ptr [RDI]
TEST RAX,RAX
JZ 0x0016d8bb
MOVZX EAX,byte ptr [RAX]
CMP EAX,0x2
JZ 0x0016d8ac
CMP EAX,0x1
JNZ 0x0016d8b3
ADD qword ptr [RDI + 0x8],0x30
JMP 0x0016d8b7
LAB_0016d8ac:
ADD qword ptr [RDI + 0x10],0x10
JMP 0x0016d8b7
LAB_0016d8b3:
INC qword ptr [RDI + 0x18]
LAB_0016d8b7:
MOV RAX,RDI
RET
LAB_0016d8bb:
PUSH RAX
LEA RDI,[0x1f1d16]
LEA RDX,[0x1f1d62]
LEA RCX,[0x1f4398]
MOV ESI,0x33c0
XOR EAX,EAX
CALL 0x001292a0
|
/* nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,
std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void> >::TEMPNAMEPLACEHOLDERVALUE() */
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>>
* __thiscall
nlohmann::json_abi_v3_11_3::detail::
iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>
::operator++(iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>
*this)
{
char cVar1;
int8 in_R8;
int8 in_R9;
if (*(char **)this != (char *)0x0) {
cVar1 = **(char **)this;
if (cVar1 == '\x02') {
*(long *)(this + 0x10) = *(long *)(this + 0x10) + 0x10;
}
else if (cVar1 == '\x01') {
*(long *)(this + 8) = *(long *)(this + 8) + 0x30;
}
else {
*(long *)(this + 0x18) = *(long *)(this + 0x18) + 1;
}
return this;
}
/* WARNING: Subroutine does not return */
ggml_abort("/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/./json.hpp",0x33c0,
"GGML_ASSERT(%s) failed","m_object != nullptr",in_R8,in_R9,0);
}
|
|
6,320 | nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>::operator++() | monkey531[P]llama/common/./json.hpp | iter_impl& operator++()
{
JSON_ASSERT(m_object != nullptr);
switch (m_object->m_data.m_type)
{
case value_t::object:
{
std::advance(m_it.object_iterator, 1);
break;
}
case value_t::array:
{
std::advance(m_it.array_iterator, 1);
break;
}
case value_t::null:
case value_t::string:
case value_t::boolean:
case value_t::number_integer:
case value_t::number_unsigned:
case value_t::number_float:
case value_t::binary:
case value_t::discarded:
default:
{
++m_it.primitive_iterator;
break;
}
}
return *this;
} | O3 | cpp | nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>::operator++():
movq (%rdi), %rax
testq %rax, %rax
je 0x76c67
movzbl (%rax), %eax
cmpl $0x2, %eax
je 0x76c58
cmpl $0x1, %eax
jne 0x76c5f
addq $0x30, 0x8(%rdi)
jmp 0x76c63
addq $0x10, 0x10(%rdi)
jmp 0x76c63
incq 0x18(%rdi)
movq %rdi, %rax
retq
pushq %rax
leaq 0xcf0bf(%rip), %rdi # 0x145d2e
leaq 0xcf104(%rip), %rdx # 0x145d7a
leaq 0xd16e8(%rip), %rcx # 0x148365
movl $0x33c0, %esi # imm = 0x33C0
xorl %eax, %eax
callq 0x20250
nop
| _ZN8nlohmann16json_abi_v3_11_36detail9iter_implIKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEEppEv:
mov rax, [rdi]
test rax, rax
jz short loc_76C67
movzx eax, byte ptr [rax]
cmp eax, 2
jz short loc_76C58
cmp eax, 1
jnz short loc_76C5F
add qword ptr [rdi+8], 30h ; '0'
jmp short loc_76C63
loc_76C58:
add qword ptr [rdi+10h], 10h
jmp short loc_76C63
loc_76C5F:
inc qword ptr [rdi+18h]
loc_76C63:
mov rax, rdi
retn
loc_76C67:
push rax
lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aAnchorMObjectN+7; "m_object != nullptr"
mov esi, 33C0h
xor eax, eax
call _ggml_abort
nop
| long long 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++(
unsigned __int8 **a1)
{
int v1; // eax
if ( *a1 )
{
v1 = **a1;
if ( v1 == 2 )
{
a1[2] += 16;
}
else if ( v1 == 1 )
{
a1[1] += 48;
}
else
{
++a1[3];
}
return (long long)a1;
}
else
{
ggml_abort(
"/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/./json.hpp",
13248LL,
"GGML_ASSERT(%s) failed",
"m_object != nullptr");
return nlohmann::json_abi_v3_11_3::detail::iteration_proxy_value<nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>>::~iteration_proxy_value("/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/./json.hpp");
}
}
| operator++:
MOV RAX,qword ptr [RDI]
TEST RAX,RAX
JZ 0x00176c67
MOVZX EAX,byte ptr [RAX]
CMP EAX,0x2
JZ 0x00176c58
CMP EAX,0x1
JNZ 0x00176c5f
ADD qword ptr [RDI + 0x8],0x30
JMP 0x00176c63
LAB_00176c58:
ADD qword ptr [RDI + 0x10],0x10
JMP 0x00176c63
LAB_00176c5f:
INC qword ptr [RDI + 0x18]
LAB_00176c63:
MOV RAX,RDI
RET
LAB_00176c67:
PUSH RAX
LEA RDI,[0x245d2e]
LEA RDX,[0x245d7a]
LEA RCX,[0x248365]
MOV ESI,0x33c0
XOR EAX,EAX
CALL 0x00120250
|
/* 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>::TEMPNAMEPLACEHOLDERVALUE() */
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>
* __thiscall
nlohmann::json_abi_v3_11_3::detail::
iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>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>
*this)
{
char cVar1;
int8 in_R8;
int8 in_R9;
if (*(char **)this != (char *)0x0) {
cVar1 = **(char **)this;
if (cVar1 == '\x02') {
*(long *)(this + 0x10) = *(long *)(this + 0x10) + 0x10;
}
else if (cVar1 == '\x01') {
*(long *)(this + 8) = *(long *)(this + 8) + 0x30;
}
else {
*(long *)(this + 0x18) = *(long *)(this + 0x18) + 1;
}
return this;
}
/* WARNING: Subroutine does not return */
ggml_abort("/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/./json.hpp",0x33c0,
"GGML_ASSERT(%s) failed","m_object != nullptr",in_R8,in_R9,0);
}
|
|
6,321 | string_strip(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&) | monkey531[P]llama/common/common.cpp | std::string string_strip(const std::string & str) {
size_t start = 0;
size_t end = str.size();
while (start < end && std::isspace(str[start])) {
start++;
}
while (end > start && std::isspace(str[end - 1])) {
end--;
}
return str.substr(start, end - start);
} | O1 | cpp | string_strip(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
movq 0x8(%rsi), %r13
testq %r13, %r13
je 0x962b2
movq (%r14), %r12
xorl %r15d, %r15d
movsbl (%r12,%r15), %edi
callq 0x1d0d0
testl %eax, %eax
je 0x962b5
incq %r15
cmpq %r15, %r13
jne 0x96297
movq %r13, %r15
jmp 0x962b5
xorl %r15d, %r15d
movq (%r14), %rbp
cmpq %r13, %r15
movq %r13, %r12
cmovbq %r15, %r12
cmpq %r15, %r13
jbe 0x962df
movsbl -0x1(%rbp,%r13), %edi
decq %r13
callq 0x1d0d0
testl %eax, %eax
jne 0x962c2
incq %r13
movq %r13, %r12
subq %r15, %r12
movq %rbx, %rdi
movq %r14, %rsi
movq %r15, %rdx
movq %r12, %rcx
callq 0x1dcb0
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| _Z12string_stripRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE:
push rbp
push r15
push r14
push r13
push r12
push rbx
push rax
mov r14, rsi
mov rbx, rdi
mov r13, [rsi+8]
test r13, r13
jz short loc_962B2
mov r12, [r14]
xor r15d, r15d
loc_96297:
movsx edi, byte ptr [r12+r15]
call _isspace
test eax, eax
jz short loc_962B5
inc r15
cmp r13, r15
jnz short loc_96297
mov r15, r13
jmp short loc_962B5
loc_962B2:
xor r15d, r15d
loc_962B5:
mov rbp, [r14]
cmp r15, r13
mov r12, r13
cmovb r12, r15
loc_962C2:
cmp r13, r15
jbe short loc_962DF
movsx edi, byte ptr [rbp+r13-1]
dec r13
call _isspace
test eax, eax
jnz short loc_962C2
inc r13
mov r12, r13
loc_962DF:
sub r12, r15
mov rdi, rbx
mov rsi, r14
mov rdx, r15
mov rcx, r12
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6substrEmm; std::string::substr(ulong,ulong)
mov rax, rbx
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| long long string_strip(long long a1, long long *a2)
{
unsigned long long v3; // r13
long long v4; // r12
unsigned long long v5; // r15
long long v6; // rbp
unsigned long long v7; // r12
long long v8; // rdi
v3 = a2[1];
if ( v3 )
{
v4 = *a2;
v5 = 0LL;
while ( (unsigned int)isspace((unsigned int)*(char *)(v4 + v5)) )
{
if ( v3 == ++v5 )
{
v5 = v3;
break;
}
}
}
else
{
v5 = 0LL;
}
v6 = *a2;
v7 = v3;
if ( v5 < v3 )
v7 = v5;
while ( v3 > v5 )
{
v8 = (unsigned int)*(char *)(v6 + v3-- - 1);
if ( !(unsigned int)isspace(v8) )
{
v7 = v3 + 1;
break;
}
}
std::string::substr(a1, a2, v5, v7 - v5);
return a1;
}
| string_strip:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
PUSH RAX
MOV R14,RSI
MOV RBX,RDI
MOV R13,qword ptr [RSI + 0x8]
TEST R13,R13
JZ 0x001962b2
MOV R12,qword ptr [R14]
XOR R15D,R15D
LAB_00196297:
MOVSX EDI,byte ptr [R12 + R15*0x1]
CALL 0x0011d0d0
TEST EAX,EAX
JZ 0x001962b5
INC R15
CMP R13,R15
JNZ 0x00196297
MOV R15,R13
JMP 0x001962b5
LAB_001962b2:
XOR R15D,R15D
LAB_001962b5:
MOV RBP,qword ptr [R14]
CMP R15,R13
MOV R12,R13
CMOVC R12,R15
LAB_001962c2:
CMP R13,R15
JBE 0x001962df
MOVSX EDI,byte ptr [RBP + R13*0x1 + -0x1]
DEC R13
CALL 0x0011d0d0
TEST EAX,EAX
JNZ 0x001962c2
INC R13
MOV R12,R13
LAB_001962df:
SUB R12,R15
MOV RDI,RBX
MOV RSI,R14
MOV RDX,R15
MOV RCX,R12
CALL 0x0011dcb0
MOV RAX,RBX
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
/* string_strip(std::__cxx11::string const&) */
string * string_strip(string *param_1)
{
char *pcVar1;
long lVar2;
int iVar3;
long *in_RSI;
ulong uVar4;
ulong uVar5;
ulong uVar6;
uVar4 = in_RSI[1];
if (uVar4 == 0) {
uVar6 = 0;
}
else {
lVar2 = *in_RSI;
uVar5 = 0;
do {
iVar3 = isspace((int)*(char *)(lVar2 + uVar5));
uVar6 = uVar5;
if (iVar3 == 0) break;
uVar5 = uVar5 + 1;
uVar6 = uVar4;
} while (uVar4 != uVar5);
}
lVar2 = *in_RSI;
do {
if (uVar4 <= uVar6) break;
pcVar1 = (char *)(lVar2 + -1 + uVar4);
uVar4 = uVar4 - 1;
iVar3 = isspace((int)*pcVar1);
} while (iVar3 != 0);
std::__cxx11::string::substr((ulong)param_1,(ulong)in_RSI);
return param_1;
}
|
|
6,322 | string_strip(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&) | monkey531[P]llama/common/common.cpp | std::string string_strip(const std::string & str) {
size_t start = 0;
size_t end = str.size();
while (start < end && std::isspace(str[start])) {
start++;
}
while (end > start && std::isspace(str[end - 1])) {
end--;
}
return str.substr(start, end - start);
} | O3 | cpp | string_strip(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
movq (%rsi), %rbp
movq 0x8(%rsi), %r13
xorl %r15d, %r15d
testq %r13, %r13
je 0x960a3
movsbl (%rbp,%r15), %edi
callq 0x1d0d0
testl %eax, %eax
je 0x960a3
incq %r15
cmpq %r15, %r13
jne 0x96089
movq %r13, %r15
cmpq %r13, %r15
movq %r13, %r12
cmovbq %r15, %r12
cmpq %r15, %r13
jbe 0x960ca
movsbl -0x1(%rbp,%r13), %edi
decq %r13
callq 0x1d0d0
testl %eax, %eax
jne 0x960ad
incq %r13
movq %r13, %r12
subq %r15, %r12
movq %rbx, %rdi
movq %r14, %rsi
movq %r15, %rdx
movq %r12, %rcx
callq 0x1dcc0
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| _Z12string_stripRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE:
push rbp
push r15
push r14
push r13
push r12
push rbx
push rax
mov r14, rsi
mov rbx, rdi
mov rbp, [rsi]
mov r13, [rsi+8]
xor r15d, r15d
test r13, r13
jz short loc_960A3
loc_96089:
movsx edi, byte ptr [rbp+r15+0]
call _isspace
test eax, eax
jz short loc_960A3
inc r15
cmp r13, r15
jnz short loc_96089
mov r15, r13
loc_960A3:
cmp r15, r13
mov r12, r13
cmovb r12, r15
loc_960AD:
cmp r13, r15
jbe short loc_960CA
movsx edi, byte ptr [rbp+r13-1]
dec r13
call _isspace
test eax, eax
jnz short loc_960AD
inc r13
mov r12, r13
loc_960CA:
sub r12, r15
mov rdi, rbx
mov rsi, r14
mov rdx, r15
mov rcx, r12
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6substrEmm; std::string::substr(ulong,ulong)
mov rax, rbx
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| long long string_strip(long long a1, long long *a2)
{
long long v3; // rbp
unsigned long long v4; // r13
unsigned long long v5; // r15
unsigned long long v6; // r12
long long v7; // rdi
v3 = *a2;
v4 = a2[1];
v5 = 0LL;
if ( v4 )
{
while ( (unsigned int)isspace((unsigned int)*(char *)(v3 + v5)) )
{
if ( v4 == ++v5 )
{
v5 = v4;
break;
}
}
}
v6 = v4;
if ( v5 < v4 )
v6 = v5;
while ( v4 > v5 )
{
v7 = (unsigned int)*(char *)(v3 + v4-- - 1);
if ( !(unsigned int)isspace(v7) )
{
v6 = v4 + 1;
break;
}
}
std::string::substr(a1, a2, v5, v6 - v5);
return a1;
}
| string_strip:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
PUSH RAX
MOV R14,RSI
MOV RBX,RDI
MOV RBP,qword ptr [RSI]
MOV R13,qword ptr [RSI + 0x8]
XOR R15D,R15D
TEST R13,R13
JZ 0x001960a3
LAB_00196089:
MOVSX EDI,byte ptr [RBP + R15*0x1]
CALL 0x0011d0d0
TEST EAX,EAX
JZ 0x001960a3
INC R15
CMP R13,R15
JNZ 0x00196089
MOV R15,R13
LAB_001960a3:
CMP R15,R13
MOV R12,R13
CMOVC R12,R15
LAB_001960ad:
CMP R13,R15
JBE 0x001960ca
MOVSX EDI,byte ptr [RBP + R13*0x1 + -0x1]
DEC R13
CALL 0x0011d0d0
TEST EAX,EAX
JNZ 0x001960ad
INC R13
MOV R12,R13
LAB_001960ca:
SUB R12,R15
MOV RDI,RBX
MOV RSI,R14
MOV RDX,R15
MOV RCX,R12
CALL 0x0011dcc0
MOV RAX,RBX
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
/* string_strip(std::__cxx11::string const&) */
string * string_strip(string *param_1)
{
char *pcVar1;
long lVar2;
int iVar3;
long *in_RSI;
ulong uVar4;
ulong uVar5;
ulong uVar6;
lVar2 = *in_RSI;
uVar4 = in_RSI[1];
uVar5 = 0;
uVar6 = uVar5;
if (uVar4 != 0) {
do {
iVar3 = isspace((int)*(char *)(lVar2 + uVar5));
uVar6 = uVar5;
if (iVar3 == 0) break;
uVar5 = uVar5 + 1;
uVar6 = uVar4;
} while (uVar4 != uVar5);
}
do {
if (uVar4 <= uVar6) break;
pcVar1 = (char *)(lVar2 + -1 + uVar4);
uVar4 = uVar4 - 1;
iVar3 = isspace((int)*pcVar1);
} while (iVar3 != 0);
std::__cxx11::string::substr((ulong)param_1,(ulong)in_RSI);
return param_1;
}
|
|
6,323 | nglog::InitializeVLOG3(nglog::SiteFlag*, int*, char const*, int) | ng-log[P]ng-log/src/vlog_is_on.cc | bool InitializeVLOG3(SiteFlag* site_flag, int32* level_default,
const char* fname, int32 verbose_level) {
std::lock_guard<std::mutex> l(vmodule_mutex);
bool read_vmodule_flag = inited_vmodule;
if (!read_vmodule_flag) {
VLOG2Initializer();
}
// protect the errno global in case someone writes:
// VLOG(..) << "The last error was " << strerror(errno)
int old_errno = errno;
// site_default normally points to FLAGS_v
int32* site_flag_value = level_default;
// Get basename for file
const char* base = strrchr(fname, '/');
#ifdef _WIN32
if (!base) {
base = strrchr(fname, '\\');
}
#endif
base = base ? (base + 1) : fname;
const char* base_end = strchr(base, '.');
size_t base_length =
base_end ? static_cast<size_t>(base_end - base) : strlen(base);
// Trim out trailing "-inl" if any
if (base_length >= 4 && (memcmp(base + base_length - 4, "-inl", 4) == 0)) {
base_length -= 4;
}
// TODO: Trim out _unittest suffix? Perhaps it is better to have
// the extra control and just leave it there.
// find target in vector of modules, replace site_flag_value with
// a module-specific verbose level, if any.
for (const VModuleInfo* info = vmodule_list; info != nullptr;
info = info->next) {
if (SafeFNMatch_(info->module_pattern.c_str(), info->module_pattern.size(),
base, base_length)) {
site_flag_value = &info->vlog_level;
// value at info->vlog_level is now what controls
// the VLOG at the caller site forever
break;
}
}
// Cache the vlog value pointer if --vmodule flag has been parsed.
ANNOTATE_BENIGN_RACE(site_flag,
"*site_flag may be written by several threads,"
" but the value will be the same");
if (read_vmodule_flag) {
site_flag->level = site_flag_value;
// If VLOG flag has been cached to the default site pointer,
// we want to add to the cached list in order to invalidate in case
// SetVModule is called afterwards with new modules.
// The performance penalty here is neglible, because InitializeVLOG3 is
// called once per site.
if (site_flag_value == level_default && !site_flag->base_name) {
site_flag->base_name = base;
site_flag->base_len = base_length;
site_flag->next = cached_site_list;
cached_site_list = site_flag;
}
}
// restore the errno in case something recoverable went wrong during
// the initialization of the VLOG mechanism (see above note "protect the..")
errno = old_errno;
return *site_flag_value >= verbose_level;
} | O0 | cpp | nglog::InitializeVLOG3(nglog::SiteFlag*, int*, char const*, int):
pushq %rbp
movq %rsp, %rbp
subq $0x90, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movl %ecx, -0x1c(%rbp)
leaq -0x28(%rbp), %rdi
leaq 0x373cb(%rip), %rsi # 0x87da0
callq 0x1d690
movb 0x373b8(%rip), %al # 0x87d98
andb $0x1, %al
movb %al, -0x29(%rbp)
testb $0x1, -0x29(%rbp)
jne 0x50a0e
callq 0x50be0
jmp 0x509f2
jmp 0x50a0e
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
leaq -0x28(%rbp), %rdi
callq 0x1d6c0
jmp 0x50bd1
callq 0x9080
movl (%rax), %eax
movl %eax, -0x40(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x48(%rbp)
movq -0x18(%rbp), %rdi
movl $0x2f, %esi
callq 0x9810
movq %rax, -0x50(%rbp)
cmpq $0x0, -0x50(%rbp)
je 0x50a47
movq -0x50(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x70(%rbp)
jmp 0x50a4f
movq -0x18(%rbp), %rax
movq %rax, -0x70(%rbp)
movq -0x70(%rbp), %rax
movq %rax, -0x50(%rbp)
movq -0x50(%rbp), %rdi
movl $0x2e, %esi
callq 0x9240
movq %rax, -0x58(%rbp)
cmpq $0x0, -0x58(%rbp)
je 0x50a81
movq -0x58(%rbp), %rax
movq -0x50(%rbp), %rcx
subq %rcx, %rax
movq %rax, -0x78(%rbp)
jmp 0x50a8e
movq -0x50(%rbp), %rdi
callq 0x92e0
movq %rax, -0x78(%rbp)
movq -0x78(%rbp), %rax
movq %rax, -0x60(%rbp)
cmpq $0x4, -0x60(%rbp)
jb 0x50ac7
movq -0x50(%rbp), %rax
addq -0x60(%rbp), %rax
addq $-0x4, %rax
movl (%rax), %eax
subl $0x6c6e692d, %eax # imm = 0x6C6E692D
setne %al
movzbl %al, %eax
cmpl $0x0, %eax
jne 0x50ac7
movq -0x60(%rbp), %rax
subq $0x4, %rax
movq %rax, -0x60(%rbp)
movq 0x3729a(%rip), %rax # 0x87d68
movq %rax, -0x68(%rbp)
cmpq $0x0, -0x68(%rbp)
je 0x50b35
movq -0x68(%rbp), %rdi
callq 0x92b0
movq %rax, -0x88(%rbp)
movq -0x68(%rbp), %rdi
callq 0x94f0
movq -0x88(%rbp), %rdi
movq %rax, %rsi
movq -0x50(%rbp), %rdx
movq -0x60(%rbp), %rcx
callq 0x505a0
movb %al, -0x79(%rbp)
jmp 0x50b0e
movb -0x79(%rbp), %al
testb $0x1, %al
jne 0x50b17
jmp 0x50b25
movq -0x68(%rbp), %rax
addq $0x20, %rax
movq %rax, -0x48(%rbp)
jmp 0x50b35
jmp 0x50b27
movq -0x68(%rbp), %rax
movq 0x28(%rax), %rax
movq %rax, -0x68(%rbp)
jmp 0x50ad2
testb $0x1, -0x29(%rbp)
je 0x50b8f
movq -0x48(%rbp), %rcx
movq -0x8(%rbp), %rax
movq %rcx, (%rax)
movq -0x48(%rbp), %rax
cmpq -0x10(%rbp), %rax
jne 0x50b8d
movq -0x8(%rbp), %rax
cmpq $0x0, 0x8(%rax)
jne 0x50b8d
movq -0x50(%rbp), %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x60(%rbp), %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x10(%rax)
movq 0x371f6(%rip), %rcx # 0x87d70
movq -0x8(%rbp), %rax
movq %rcx, 0x18(%rax)
movq -0x8(%rbp), %rax
movq %rax, 0x371e3(%rip) # 0x87d70
jmp 0x50b8f
movl -0x40(%rbp), %eax
movl %eax, -0x90(%rbp)
callq 0x9080
movl -0x90(%rbp), %ecx
movl %ecx, (%rax)
movq -0x48(%rbp), %rax
movl (%rax), %eax
cmpl -0x1c(%rbp), %eax
setge %al
movb %al, -0x89(%rbp)
leaq -0x28(%rbp), %rdi
callq 0x1d6c0
movb -0x89(%rbp), %al
andb $0x1, %al
addq $0x90, %rsp
popq %rbp
retq
movq -0x38(%rbp), %rdi
callq 0x9d40
nopw (%rax,%rax)
| _ZN5nglog15InitializeVLOG3EPNS_8SiteFlagEPiPKci:
push rbp
mov rbp, rsp
sub rsp, 90h
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov [rbp+var_18], rdx
mov [rbp+var_1C], ecx
lea rdi, [rbp+var_28]; this
lea rsi, _ZN5nglogL13vmodule_mutexE; nglog::vmodule_mutex
call _ZNSt10lock_guardISt5mutexEC2ERS0_; std::lock_guard<std::mutex>::lock_guard(std::mutex&)
mov al, cs:_ZN5nglogL14inited_vmoduleE; nglog::inited_vmodule
and al, 1
mov [rbp+var_29], al
test [rbp+var_29], 1
jnz short loc_50A0E
call _ZN5nglogL16VLOG2InitializerEv; nglog::VLOG2Initializer(void)
jmp short $+2
loc_509F2:
jmp short loc_50A0E
mov rcx, rax
mov eax, edx
mov [rbp+var_38], rcx
mov [rbp+var_3C], eax
lea rdi, [rbp+var_28]
call _ZNSt10lock_guardISt5mutexED2Ev; std::lock_guard<std::mutex>::~lock_guard()
jmp loc_50BD1
loc_50A0E:
call ___errno_location
mov eax, [rax]
mov [rbp+var_40], eax
mov rax, [rbp+var_10]
mov [rbp+var_48], rax
mov rdi, [rbp+var_18]
mov esi, 2Fh ; '/'
call _strrchr
mov [rbp+var_50], rax
cmp [rbp+var_50], 0
jz short loc_50A47
mov rax, [rbp+var_50]
add rax, 1
mov [rbp+var_70], rax
jmp short loc_50A4F
loc_50A47:
mov rax, [rbp+var_18]
mov [rbp+var_70], rax
loc_50A4F:
mov rax, [rbp+var_70]
mov [rbp+var_50], rax
mov rdi, [rbp+var_50]
mov esi, 2Eh ; '.'
call _strchr
mov [rbp+var_58], rax
cmp [rbp+var_58], 0
jz short loc_50A81
mov rax, [rbp+var_58]
mov rcx, [rbp+var_50]
sub rax, rcx
mov [rbp+var_78], rax
jmp short loc_50A8E
loc_50A81:
mov rdi, [rbp+var_50]
call _strlen
mov [rbp+var_78], rax
loc_50A8E:
mov rax, [rbp+var_78]
mov [rbp+var_60], rax
cmp [rbp+var_60], 4
jb short loc_50AC7
mov rax, [rbp+var_50]
add rax, [rbp+var_60]
add rax, 0FFFFFFFFFFFFFFFCh
mov eax, [rax]
sub eax, 6C6E692Dh
setnz al
movzx eax, al
cmp eax, 0
jnz short loc_50AC7
mov rax, [rbp+var_60]
sub rax, 4
mov [rbp+var_60], rax
loc_50AC7:
mov rax, cs:_ZN5nglogL12vmodule_listE; nglog::vmodule_list
mov [rbp+var_68], rax
loc_50AD2:
cmp [rbp+var_68], 0
jz short loc_50B35
mov rdi, [rbp+var_68]
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5c_strEv; std::string::c_str(void)
mov [rbp+var_88], rax
mov rdi, [rbp+var_68]
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE4sizeEv; std::string::size(void)
mov rdi, [rbp+var_88]; this
mov rsi, rax; char *
mov rdx, [rbp+var_50]; unsigned __int64
mov rcx, [rbp+var_60]; char *
call _ZN5nglog5tools12SafeFNMatch_EPKcmS2_m; nglog::tools::SafeFNMatch_(char const*,ulong,char const*,ulong)
mov [rbp+var_79], al
jmp short $+2
loc_50B0E:
mov al, [rbp+var_79]
test al, 1
jnz short loc_50B17
jmp short loc_50B25
loc_50B17:
mov rax, [rbp+var_68]
add rax, 20h ; ' '
mov [rbp+var_48], rax
jmp short loc_50B35
loc_50B25:
jmp short $+2
loc_50B27:
mov rax, [rbp+var_68]
mov rax, [rax+28h]
mov [rbp+var_68], rax
jmp short loc_50AD2
loc_50B35:
test [rbp+var_29], 1
jz short loc_50B8F
mov rcx, [rbp+var_48]
mov rax, [rbp+var_8]
mov [rax], rcx
mov rax, [rbp+var_48]
cmp rax, [rbp+var_10]
jnz short loc_50B8D
mov rax, [rbp+var_8]
cmp qword ptr [rax+8], 0
jnz short loc_50B8D
mov rcx, [rbp+var_50]
mov rax, [rbp+var_8]
mov [rax+8], rcx
mov rcx, [rbp+var_60]
mov rax, [rbp+var_8]
mov [rax+10h], rcx
mov rcx, cs:_ZN5nglogL16cached_site_listE; nglog::cached_site_list
mov rax, [rbp+var_8]
mov [rax+18h], rcx
mov rax, [rbp+var_8]
mov cs:_ZN5nglogL16cached_site_listE, rax; nglog::cached_site_list
loc_50B8D:
jmp short $+2
loc_50B8F:
mov eax, [rbp+var_40]
mov [rbp+var_90], eax
call ___errno_location
mov ecx, [rbp+var_90]
mov [rax], ecx
mov rax, [rbp+var_48]
mov eax, [rax]
cmp eax, [rbp+var_1C]
setnl al
mov [rbp+var_89], al
lea rdi, [rbp+var_28]
call _ZNSt10lock_guardISt5mutexED2Ev; std::lock_guard<std::mutex>::~lock_guard()
mov al, [rbp+var_89]
and al, 1
add rsp, 90h
pop rbp
retn
loc_50BD1:
mov rdi, [rbp+var_38]
call __Unwind_Resume
| bool nglog::InitializeVLOG3(_QWORD *a1, _DWORD *a2, long long a3, int a4)
{
nglog::tools *v4; // rdi
const char *v5; // rsi
unsigned long long v6; // r8
bool v8; // [rsp+7h] [rbp-89h]
unsigned long long v9; // [rsp+18h] [rbp-78h]
long long v10; // [rsp+20h] [rbp-70h]
long long i; // [rsp+28h] [rbp-68h]
char *v12; // [rsp+30h] [rbp-60h]
long long v13; // [rsp+38h] [rbp-58h]
unsigned long long v14; // [rsp+40h] [rbp-50h]
_DWORD *v15; // [rsp+48h] [rbp-48h]
int v16; // [rsp+50h] [rbp-40h]
char v17; // [rsp+67h] [rbp-29h]
std::mutex *v18; // [rsp+68h] [rbp-28h] BYREF
int v19; // [rsp+74h] [rbp-1Ch]
long long v20; // [rsp+78h] [rbp-18h]
_DWORD *v21; // [rsp+80h] [rbp-10h]
_QWORD *v22; // [rsp+88h] [rbp-8h]
v22 = a1;
v21 = a2;
v20 = a3;
v19 = a4;
std::lock_guard<std::mutex>::lock_guard(&v18, (std::mutex *)&nglog::vmodule_mutex);
v17 = nglog::inited_vmodule & 1;
if ( (nglog::inited_vmodule & 1) == 0 )
nglog::VLOG2Initializer((nglog *)&v18);
v16 = *(_DWORD *)__errno_location();
v15 = v21;
v14 = strrchr(v20, 47LL);
if ( v14 )
v10 = v14 + 1;
else
v10 = v20;
v13 = strchr(v10, 46LL);
if ( v13 )
v9 = v13 - v10;
else
v9 = strlen(v10);
v12 = (char *)v9;
if ( v9 >= 4 && *(_DWORD *)(v9 + v10 - 4) == 1819175213 )
v12 = (char *)(v9 - 4);
for ( i = nglog::vmodule_list; i; i = *(_QWORD *)(i + 40) )
{
v4 = (nglog::tools *)std::string::c_str(i);
v5 = (const char *)std::string::size(i);
if ( (nglog::tools::SafeFNMatch_(v4, v5, v10, v12, v6) & 1) != 0 )
{
v15 = (_DWORD *)(i + 32);
break;
}
}
if ( (v17 & 1) != 0 )
{
*v22 = v15;
if ( v15 == v21 && !v22[1] )
{
v22[1] = v10;
v22[2] = v12;
v22[3] = nglog::cached_site_list;
nglog::cached_site_list = (long long)v22;
}
}
*(_DWORD *)__errno_location() = v16;
v8 = *v15 >= v19;
std::lock_guard<std::mutex>::~lock_guard(&v18);
return v8;
}
| InitializeVLOG3:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x90
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV qword ptr [RBP + -0x18],RDX
MOV dword ptr [RBP + -0x1c],ECX
LEA RDI,[RBP + -0x28]
LEA RSI,[0x187da0]
CALL 0x0011d690
MOV AL,byte ptr [0x00187d98]
AND AL,0x1
MOV byte ptr [RBP + -0x29],AL
TEST byte ptr [RBP + -0x29],0x1
JNZ 0x00150a0e
LAB_001509eb:
CALL 0x00150be0
JMP 0x001509f2
LAB_001509f2:
JMP 0x00150a0e
LAB_00150a0e:
CALL 0x00109080
MOV EAX,dword ptr [RAX]
MOV dword ptr [RBP + -0x40],EAX
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RBP + -0x48],RAX
MOV RDI,qword ptr [RBP + -0x18]
MOV ESI,0x2f
CALL 0x00109810
MOV qword ptr [RBP + -0x50],RAX
CMP qword ptr [RBP + -0x50],0x0
JZ 0x00150a47
MOV RAX,qword ptr [RBP + -0x50]
ADD RAX,0x1
MOV qword ptr [RBP + -0x70],RAX
JMP 0x00150a4f
LAB_00150a47:
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RBP + -0x70],RAX
LAB_00150a4f:
MOV RAX,qword ptr [RBP + -0x70]
MOV qword ptr [RBP + -0x50],RAX
MOV RDI,qword ptr [RBP + -0x50]
MOV ESI,0x2e
CALL 0x00109240
MOV qword ptr [RBP + -0x58],RAX
CMP qword ptr [RBP + -0x58],0x0
JZ 0x00150a81
MOV RAX,qword ptr [RBP + -0x58]
MOV RCX,qword ptr [RBP + -0x50]
SUB RAX,RCX
MOV qword ptr [RBP + -0x78],RAX
JMP 0x00150a8e
LAB_00150a81:
MOV RDI,qword ptr [RBP + -0x50]
CALL 0x001092e0
MOV qword ptr [RBP + -0x78],RAX
LAB_00150a8e:
MOV RAX,qword ptr [RBP + -0x78]
MOV qword ptr [RBP + -0x60],RAX
CMP qword ptr [RBP + -0x60],0x4
JC 0x00150ac7
MOV RAX,qword ptr [RBP + -0x50]
ADD RAX,qword ptr [RBP + -0x60]
ADD RAX,-0x4
MOV EAX,dword ptr [RAX]
SUB EAX,0x6c6e692d
SETNZ AL
MOVZX EAX,AL
CMP EAX,0x0
JNZ 0x00150ac7
MOV RAX,qword ptr [RBP + -0x60]
SUB RAX,0x4
MOV qword ptr [RBP + -0x60],RAX
LAB_00150ac7:
MOV RAX,qword ptr [0x00187d68]
MOV qword ptr [RBP + -0x68],RAX
LAB_00150ad2:
CMP qword ptr [RBP + -0x68],0x0
JZ 0x00150b35
MOV RDI,qword ptr [RBP + -0x68]
CALL 0x001092b0
MOV qword ptr [RBP + -0x88],RAX
MOV RDI,qword ptr [RBP + -0x68]
CALL 0x001094f0
MOV RDI,qword ptr [RBP + -0x88]
MOV RSI,RAX
MOV RDX,qword ptr [RBP + -0x50]
MOV RCX,qword ptr [RBP + -0x60]
CALL 0x001505a0
LAB_00150b09:
MOV byte ptr [RBP + -0x79],AL
JMP 0x00150b0e
LAB_00150b0e:
MOV AL,byte ptr [RBP + -0x79]
TEST AL,0x1
JNZ 0x00150b17
JMP 0x00150b25
LAB_00150b17:
MOV RAX,qword ptr [RBP + -0x68]
ADD RAX,0x20
MOV qword ptr [RBP + -0x48],RAX
JMP 0x00150b35
LAB_00150b25:
JMP 0x00150b27
LAB_00150b27:
MOV RAX,qword ptr [RBP + -0x68]
MOV RAX,qword ptr [RAX + 0x28]
MOV qword ptr [RBP + -0x68],RAX
JMP 0x00150ad2
LAB_00150b35:
TEST byte ptr [RBP + -0x29],0x1
JZ 0x00150b8f
MOV RCX,qword ptr [RBP + -0x48]
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RAX],RCX
MOV RAX,qword ptr [RBP + -0x48]
CMP RAX,qword ptr [RBP + -0x10]
JNZ 0x00150b8d
MOV RAX,qword ptr [RBP + -0x8]
CMP qword ptr [RAX + 0x8],0x0
JNZ 0x00150b8d
MOV RCX,qword ptr [RBP + -0x50]
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RAX + 0x8],RCX
MOV RCX,qword ptr [RBP + -0x60]
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RAX + 0x10],RCX
MOV RCX,qword ptr [0x00187d70]
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RAX + 0x18],RCX
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [0x00187d70],RAX
LAB_00150b8d:
JMP 0x00150b8f
LAB_00150b8f:
MOV EAX,dword ptr [RBP + -0x40]
MOV dword ptr [RBP + -0x90],EAX
CALL 0x00109080
MOV ECX,dword ptr [RBP + -0x90]
MOV dword ptr [RAX],ECX
MOV RAX,qword ptr [RBP + -0x48]
MOV EAX,dword ptr [RAX]
CMP EAX,dword ptr [RBP + -0x1c]
SETGE AL
MOV byte ptr [RBP + -0x89],AL
LEA RDI,[RBP + -0x28]
CALL 0x0011d6c0
MOV AL,byte ptr [RBP + -0x89]
AND AL,0x1
ADD RSP,0x90
POP RBP
RET
|
/* nglog::InitializeVLOG3(nglog::SiteFlag*, int*, char const*, int) */
bool nglog::InitializeVLOG3(SiteFlag *param_1,int *param_2,char *param_3,int param_4)
{
int iVar1;
bool bVar2;
byte bVar3;
byte bVar4;
int *piVar5;
char *pcVar6;
ulong uVar7;
ulong local_80;
char *local_78;
long local_70;
ulong local_68;
int *local_50;
lock_guard<std::mutex> local_30 [12];
int local_24;
char *local_20;
int *local_18;
SiteFlag *local_10;
local_24 = param_4;
local_20 = param_3;
local_18 = param_2;
local_10 = param_1;
std::lock_guard<std::mutex>::lock_guard(local_30,(mutex *)vmodule_mutex);
bVar3 = inited_vmodule & 1;
if (bVar3 == 0) {
/* try { // try from 001509eb to 00150b08 has its CatchHandler @ 001509f4 */
VLOG2Initializer();
}
piVar5 = __errno_location();
iVar1 = *piVar5;
local_50 = local_18;
local_78 = strrchr(local_20,0x2f);
if (local_78 == (char *)0x0) {
local_78 = local_20;
}
else {
local_78 = local_78 + 1;
}
pcVar6 = strchr(local_78,0x2e);
if (pcVar6 == (char *)0x0) {
local_80 = strlen(local_78);
}
else {
local_80 = (long)pcVar6 - (long)local_78;
}
local_68 = local_80;
if ((3 < local_80) && (*(int *)(local_78 + (local_80 - 4)) == 0x6c6e692d)) {
local_68 = local_80 - 4;
}
local_70 = vmodule_list;
do {
if (local_70 == 0) {
LAB_00150b35:
if (((bVar3 != 0) && (*(int **)local_10 = local_50, local_50 == local_18)) &&
(*(long *)(local_10 + 8) == 0)) {
*(char **)(local_10 + 8) = local_78;
*(ulong *)(local_10 + 0x10) = local_68;
*(SiteFlag **)(local_10 + 0x18) = cached_site_list;
cached_site_list = local_10;
}
piVar5 = __errno_location();
*piVar5 = iVar1;
bVar2 = local_24 <= *local_50;
std::lock_guard<std::mutex>::~lock_guard(local_30);
return bVar2;
}
pcVar6 = (char *)std::__cxx11::string::c_str();
uVar7 = std::__cxx11::string::size();
bVar4 = tools::SafeFNMatch_(pcVar6,uVar7,local_78,local_68);
if ((bVar4 & 1) != 0) {
local_50 = (int *)(local_70 + 0x20);
goto LAB_00150b35;
}
local_70 = *(long *)(local_70 + 0x28);
} while( true );
}
|
|
6,324 | nglog::InitializeVLOG3(nglog::SiteFlag*, int*, char const*, int) | ng-log[P]ng-log/src/vlog_is_on.cc | bool InitializeVLOG3(SiteFlag* site_flag, int32* level_default,
const char* fname, int32 verbose_level) {
std::lock_guard<std::mutex> l(vmodule_mutex);
bool read_vmodule_flag = inited_vmodule;
if (!read_vmodule_flag) {
VLOG2Initializer();
}
// protect the errno global in case someone writes:
// VLOG(..) << "The last error was " << strerror(errno)
int old_errno = errno;
// site_default normally points to FLAGS_v
int32* site_flag_value = level_default;
// Get basename for file
const char* base = strrchr(fname, '/');
#ifdef _WIN32
if (!base) {
base = strrchr(fname, '\\');
}
#endif
base = base ? (base + 1) : fname;
const char* base_end = strchr(base, '.');
size_t base_length =
base_end ? static_cast<size_t>(base_end - base) : strlen(base);
// Trim out trailing "-inl" if any
if (base_length >= 4 && (memcmp(base + base_length - 4, "-inl", 4) == 0)) {
base_length -= 4;
}
// TODO: Trim out _unittest suffix? Perhaps it is better to have
// the extra control and just leave it there.
// find target in vector of modules, replace site_flag_value with
// a module-specific verbose level, if any.
for (const VModuleInfo* info = vmodule_list; info != nullptr;
info = info->next) {
if (SafeFNMatch_(info->module_pattern.c_str(), info->module_pattern.size(),
base, base_length)) {
site_flag_value = &info->vlog_level;
// value at info->vlog_level is now what controls
// the VLOG at the caller site forever
break;
}
}
// Cache the vlog value pointer if --vmodule flag has been parsed.
ANNOTATE_BENIGN_RACE(site_flag,
"*site_flag may be written by several threads,"
" but the value will be the same");
if (read_vmodule_flag) {
site_flag->level = site_flag_value;
// If VLOG flag has been cached to the default site pointer,
// we want to add to the cached list in order to invalidate in case
// SetVModule is called afterwards with new modules.
// The performance penalty here is neglible, because InitializeVLOG3 is
// called once per site.
if (site_flag_value == level_default && !site_flag->base_name) {
site_flag->base_name = base;
site_flag->base_len = base_length;
site_flag->next = cached_site_list;
cached_site_list = site_flag;
}
}
// restore the errno in case something recoverable went wrong during
// the initialization of the VLOG mechanism (see above note "protect the..")
errno = old_errno;
return *site_flag_value >= verbose_level;
} | O2 | cpp | nglog::InitializeVLOG3(nglog::SiteFlag*, int*, char const*, int):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movl %ecx, %ebp
movq %rdx, %r14
movq %rsi, %r13
movq %rdi, %r12
leaq 0x22c51(%rip), %rdi # 0x41bf0
callq 0x1cc5e
movb 0x22c3e(%rip), %al # 0x41be8
movb %al, 0x7(%rsp)
testb %al, %al
jne 0x1f0ce
movq %r14, 0x10(%rsp)
movq %r13, 0x18(%rsp)
movq %r12, 0x20(%rsp)
movl %ebp, 0x8(%rsp)
movb $0x0, 0x22c18(%rip) # 0x41be8
leaq 0x115d1(%rip), %rax # 0x305a8
movq (%rax), %rax
movq (%rax), %r14
leaq 0x28(%rsp), %r13
xorl %ebp, %ebp
xorl %r12d, %r12d
movq %r14, %rdi
pushq $0x3d
popq %rsi
callq 0x81c0
testq %rax, %rax
je 0x1f09a
movq %rax, %r15
leaq 0x38(%rsp), %rax
movq %rax, 0x28(%rsp)
movq %r13, %rdi
movq %r14, %rsi
movq %r15, %rdx
callq 0xb030
movq %r15, %rdi
leaq 0x32a2(%rip), %rsi # 0x222c2
leaq 0xc(%rsp), %rdx
xorl %eax, %eax
callq 0x8570
cmpl $0x1, %eax
jne 0x1f06a
pushq $0x30
popq %rdi
callq 0x9ae0
movq %rax, %rbx
addq $0x10, %rax
movq %rax, (%rbx)
andq $0x0, 0x8(%rbx)
movb $0x0, 0x10(%rbx)
movq %rbx, %rdi
movq %r13, %rsi
callq 0x82f0
movl 0xc(%rsp), %eax
movl %eax, 0x20(%rbx)
testq %rbp, %rbp
je 0x1f06f
movq %rbx, 0x28(%r12)
jmp 0x1f072
movq %r12, %rbx
jmp 0x1f072
movq %rbx, %rbp
movq %r15, %rdi
pushq $0x2c
popq %rsi
callq 0x81c0
movq %rax, %r15
leaq 0x1(%rax), %r14
movq %r13, %rdi
callq 0x8b78
movq %rbx, %r12
testq %r15, %r15
jne 0x1efe7
jmp 0x1f09d
movq %r12, %rbx
testq %rbp, %rbp
je 0x1f0b4
movq 0x22b0f(%rip), %rax # 0x41bb8
movq %rax, 0x28(%rbx)
movq %rbp, 0x22b04(%rip) # 0x41bb8
movb $0x1, 0x22b2d(%rip) # 0x41be8
movl 0x8(%rsp), %ebp
movq 0x20(%rsp), %r12
movq 0x18(%rsp), %r13
movq 0x10(%rsp), %r14
pushq $0x2f
popq %rsi
movq %r14, %rdi
callq 0x8640
leaq 0x1(%rax), %rbx
testq %rax, %rax
cmoveq %r14, %rbx
pushq $0x2e
popq %rsi
movq %rbx, %rdi
callq 0x81c0
testq %rax, %rax
je 0x1f0fc
movq %rax, %r14
subq %rbx, %r14
jmp 0x1f107
movq %rbx, %rdi
callq 0x8230
movq %rax, %r14
cmpq $0x4, %r14
jb 0x1f11e
leaq -0x4(%r14), %rax
cmpl $0x6c6e692d, -0x4(%rbx,%r14) # imm = 0x6C6E692D
cmoveq %rax, %r14
leaq 0x22a93(%rip), %r15 # 0x41bb8
movq (%r15), %r15
testq %r15, %r15
je 0x1f149
movq (%r15), %rdi
movq 0x8(%r15), %rsi
movq %rbx, %rdx
movq %r14, %rcx
callq 0x1ed20
testb %al, %al
jne 0x1f14e
addq $0x28, %r15
jmp 0x1f125
movq %r13, %r15
jmp 0x1f152
addq $0x20, %r15
cmpb $0x0, 0x7(%rsp)
je 0x1f187
movq %r15, (%r12)
cmpq %r13, %r15
jne 0x1f187
cmpq $0x0, 0x8(%r12)
jne 0x1f187
movq %rbx, 0x8(%r12)
movq %r14, 0x10(%r12)
movq 0x22a45(%rip), %rax # 0x41bc0
movq %rax, 0x18(%r12)
movq %r12, 0x22a39(%rip) # 0x41bc0
cmpl %ebp, (%r15)
setge %bl
leaq 0x22a5c(%rip), %rdi # 0x41bf0
callq 0x8450
movl %ebx, %eax
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq 0x28(%rsp), %rdi
callq 0x8b78
jmp 0x1f1bc
movq %rax, %rbx
leaq 0x22a2d(%rip), %rdi # 0x41bf0
callq 0x8450
movq %rbx, %rdi
callq 0x8a40
| _ZN5nglog15InitializeVLOG3EPNS_8SiteFlagEPiPKci:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 48h
mov ebp, ecx
mov r14, rdx
mov r13, rsi
mov r12, rdi
lea rdi, _ZN5nglogL13vmodule_mutexE; this
call _ZNSt5mutex4lockEv; std::mutex::lock(void)
mov al, cs:_ZN5nglogL14inited_vmoduleE; nglog::inited_vmodule
mov [rsp+78h+var_71], al
test al, al
jnz loc_1F0CE
mov [rsp+78h+var_68], r14
mov [rsp+78h+var_60], r13
mov [rsp+78h+var_58], r12
mov [rsp+78h+var_70], ebp
mov cs:_ZN5nglogL14inited_vmoduleE, 0; nglog::inited_vmodule
lea rax, _ZN3fLS13FLAGS_vmoduleB5cxx11E; fLS::FLAGS_vmodule
mov rax, [rax]
mov r14, [rax]
lea r13, [rsp+78h+var_50]
xor ebp, ebp
xor r12d, r12d
loc_1EFE7:
mov rdi, r14
push 3Dh ; '='
pop rsi
call _strchr
test rax, rax
jz loc_1F09A
mov r15, rax
lea rax, [rsp+78h+var_40]
mov [rsp+78h+var_50], rax
mov rdi, r13
mov rsi, r14
mov rdx, r15
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag; std::string::_M_construct<char const*>(char const*,char const*,std::forward_iterator_tag)
mov rdi, r15
lea rsi, aD; "=%d"
lea rdx, [rsp+78h+var_6C]
xor eax, eax
call ___isoc99_sscanf
cmp eax, 1
jnz short loc_1F06A
push 30h ; '0'
pop rdi; unsigned __int64
call _Znwm; operator new(ulong)
mov rbx, rax
add rax, 10h
mov [rbx], rax
and qword ptr [rbx+8], 0
mov byte ptr [rbx+10h], 0
mov rdi, rbx
mov rsi, r13
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_assignERKS4_; std::string::_M_assign(std::string const&)
mov eax, [rsp+78h+var_6C]
mov [rbx+20h], eax
test rbp, rbp
jz short loc_1F06F
mov [r12+28h], rbx
jmp short loc_1F072
loc_1F06A:
mov rbx, r12
jmp short loc_1F072
loc_1F06F:
mov rbp, rbx
loc_1F072:
mov rdi, r15
push 2Ch ; ','
pop rsi
call _strchr
mov r15, rax
lea r14, [rax+1]
mov rdi, r13; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
mov r12, rbx
test r15, r15
jnz loc_1EFE7
jmp short loc_1F09D
loc_1F09A:
mov rbx, r12
loc_1F09D:
test rbp, rbp
jz short loc_1F0B4
mov rax, cs:_ZN5nglogL12vmodule_listE; nglog::vmodule_list
mov [rbx+28h], rax
mov cs:_ZN5nglogL12vmodule_listE, rbp; nglog::vmodule_list
loc_1F0B4:
mov cs:_ZN5nglogL14inited_vmoduleE, 1; nglog::inited_vmodule
mov ebp, [rsp+78h+var_70]
mov r12, [rsp+78h+var_58]
mov r13, [rsp+78h+var_60]
mov r14, [rsp+78h+var_68]
loc_1F0CE:
push 2Fh ; '/'
pop rsi
mov rdi, r14
call _strrchr
lea rbx, [rax+1]
test rax, rax
cmovz rbx, r14
push 2Eh ; '.'
pop rsi
mov rdi, rbx
call _strchr
test rax, rax
jz short loc_1F0FC
mov r14, rax
sub r14, rbx
jmp short loc_1F107
loc_1F0FC:
mov rdi, rbx
call _strlen
mov r14, rax
loc_1F107:
cmp r14, 4
jb short loc_1F11E
lea rax, [r14-4]
cmp dword ptr [rbx+r14-4], 6C6E692Dh
cmovz r14, rax
loc_1F11E:
lea r15, _ZN5nglogL12vmodule_listE; nglog::vmodule_list
loc_1F125:
mov r15, [r15]
test r15, r15
jz short loc_1F149
mov rdi, [r15]; this
mov rsi, [r15+8]; char *
mov rdx, rbx; unsigned __int64
mov rcx, r14; char *
call _ZN5nglog5tools12SafeFNMatch_EPKcmS2_m; nglog::tools::SafeFNMatch_(char const*,ulong,char const*,ulong)
test al, al
jnz short loc_1F14E
add r15, 28h ; '('
jmp short loc_1F125
loc_1F149:
mov r15, r13
jmp short loc_1F152
loc_1F14E:
add r15, 20h ; ' '
loc_1F152:
cmp [rsp+78h+var_71], 0
jz short loc_1F187
mov [r12], r15
cmp r15, r13
jnz short loc_1F187
cmp qword ptr [r12+8], 0
jnz short loc_1F187
mov [r12+8], rbx
mov [r12+10h], r14
mov rax, cs:_ZN5nglogL16cached_site_listE; nglog::cached_site_list
mov [r12+18h], rax
mov cs:_ZN5nglogL16cached_site_listE, r12; nglog::cached_site_list
loc_1F187:
cmp [r15], ebp
setnl bl
lea rdi, _ZN5nglogL13vmodule_mutexE; nglog::vmodule_mutex
call _pthread_mutex_unlock
mov eax, ebx
add rsp, 48h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
mov rbx, rax
lea rdi, [rsp+arg_20]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
jmp short loc_1F1BC
mov rbx, rax
loc_1F1BC:
lea rdi, _ZN5nglogL13vmodule_mutexE; nglog::vmodule_mutex
call _pthread_mutex_unlock
mov rdi, rbx
call __Unwind_Resume
| long long nglog::InitializeVLOG3(_QWORD *a1, _DWORD *a2, long long a3, int a4)
{
_DWORD *v6; // r13
_QWORD *v7; // r12
_BYTE *v8; // r14
long long v9; // rbp
long long v10; // r12
long long v11; // rax
long long v12; // r15
long long v13; // rbx
long long v14; // r15
long long v15; // rax
long long v16; // rbx
long long v17; // rax
unsigned long long v18; // r8
const char *v19; // r14
long long *i; // r15
long long v21; // r15
_DWORD *v22; // r15
char v24; // [rsp+7h] [rbp-71h]
int v25; // [rsp+8h] [rbp-70h]
int v26; // [rsp+Ch] [rbp-6Ch] BYREF
long long v27; // [rsp+10h] [rbp-68h]
_DWORD *v28; // [rsp+18h] [rbp-60h]
_QWORD *v29; // [rsp+20h] [rbp-58h]
_QWORD v30[2]; // [rsp+28h] [rbp-50h] BYREF
char v31; // [rsp+38h] [rbp-40h] BYREF
v6 = a2;
v7 = a1;
std::mutex::lock((std::mutex *)&nglog::vmodule_mutex);
v24 = nglog::inited_vmodule;
if ( !nglog::inited_vmodule )
{
v27 = a3;
v28 = a2;
v29 = a1;
v25 = a4;
nglog::inited_vmodule = 0;
v8 = (_BYTE *)fLS::FLAGS_vmodule_buf[abi:cxx11];
v9 = 0LL;
v10 = 0LL;
while ( 1 )
{
v11 = strchr(v8, 61LL);
if ( !v11 )
break;
v12 = v11;
v30[0] = &v31;
std::string::_M_construct<char const*>((long long)v30, v8, v11);
if ( (unsigned int)__isoc99_sscanf(v12, "=%d", &v26) == 1 )
{
v13 = operator new(48LL);
*(_QWORD *)v13 = v13 + 16;
*(_QWORD *)(v13 + 8) = 0LL;
*(_BYTE *)(v13 + 16) = 0;
std::string::_M_assign(v13, v30);
*(_DWORD *)(v13 + 32) = v26;
if ( v9 )
*(_QWORD *)(v10 + 40) = v13;
else
v9 = v13;
}
else
{
v13 = v10;
}
v14 = strchr(v12, 44LL);
v8 = (_BYTE *)(v14 + 1);
std::string::~string(v30);
v10 = v13;
if ( !v14 )
goto LABEL_12;
}
v13 = v10;
LABEL_12:
if ( v9 )
{
*(_QWORD *)(v13 + 40) = nglog::vmodule_list;
nglog::vmodule_list = v9;
}
nglog::inited_vmodule = 1;
a4 = v25;
v7 = v29;
v6 = v28;
a3 = v27;
}
v15 = strrchr(a3, 47LL);
v16 = v15 + 1;
if ( !v15 )
v16 = a3;
v17 = strchr(v16, 46LL);
if ( v17 )
v19 = (const char *)(v17 - v16);
else
v19 = (const char *)strlen(v16);
if ( (unsigned long long)v19 >= 4 && *(_DWORD *)&v19[v16 - 4] == 1819175213 )
v19 -= 4;
for ( i = &nglog::vmodule_list; ; i = (long long *)(v21 + 40) )
{
v21 = *i;
if ( !v21 )
{
v22 = v6;
goto LABEL_29;
}
if ( nglog::tools::SafeFNMatch_(*(nglog::tools **)v21, *(const char **)(v21 + 8), v16, v19, v18) )
break;
}
v22 = (_DWORD *)(v21 + 32);
LABEL_29:
if ( v24 )
{
*v7 = v22;
if ( v22 == v6 && !v7[1] )
{
v7[1] = v16;
v7[2] = v19;
v7[3] = nglog::cached_site_list;
nglog::cached_site_list = (long long)v7;
}
}
LOBYTE(v16) = *v22 >= a4;
pthread_mutex_unlock(&nglog::vmodule_mutex);
return (unsigned int)v16;
}
| InitializeVLOG3:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x48
MOV EBP,ECX
MOV R14,RDX
MOV R13,RSI
MOV R12,RDI
LEA RDI,[0x141bf0]
CALL 0x0011cc5e
MOV AL,byte ptr [0x00141be8]
MOV byte ptr [RSP + 0x7],AL
TEST AL,AL
JNZ 0x0011f0ce
MOV qword ptr [RSP + 0x10],R14
MOV qword ptr [RSP + 0x18],R13
MOV qword ptr [RSP + 0x20],R12
MOV dword ptr [RSP + 0x8],EBP
MOV byte ptr [0x00141be8],0x0
LEA RAX,[0x1305a8]
MOV RAX,qword ptr [RAX]
MOV R14,qword ptr [RAX]
LEA R13,[RSP + 0x28]
XOR EBP,EBP
XOR R12D,R12D
LAB_0011efe7:
MOV RDI,R14
PUSH 0x3d
POP RSI
CALL 0x001081c0
TEST RAX,RAX
JZ 0x0011f09a
MOV R15,RAX
LEA RAX,[RSP + 0x38]
MOV qword ptr [RSP + 0x28],RAX
LAB_0011f008:
MOV RDI,R13
MOV RSI,R14
MOV RDX,R15
CALL 0x0010b030
MOV RDI,R15
LEA RSI,[0x1222c2]
LEA RDX,[RSP + 0xc]
XOR EAX,EAX
CALL 0x00108570
CMP EAX,0x1
JNZ 0x0011f06a
LAB_0011f031:
PUSH 0x30
POP RDI
CALL 0x00109ae0
MOV RBX,RAX
ADD RAX,0x10
MOV qword ptr [RBX],RAX
AND qword ptr [RBX + 0x8],0x0
MOV byte ptr [RBX + 0x10],0x0
MOV RDI,RBX
MOV RSI,R13
CALL 0x001082f0
LAB_0011f057:
MOV EAX,dword ptr [RSP + 0xc]
MOV dword ptr [RBX + 0x20],EAX
TEST RBP,RBP
JZ 0x0011f06f
MOV qword ptr [R12 + 0x28],RBX
JMP 0x0011f072
LAB_0011f06a:
MOV RBX,R12
JMP 0x0011f072
LAB_0011f06f:
MOV RBP,RBX
LAB_0011f072:
MOV RDI,R15
PUSH 0x2c
POP RSI
CALL 0x001081c0
MOV R15,RAX
LEA R14,[RAX + 0x1]
MOV RDI,R13
CALL 0x00108b78
MOV R12,RBX
TEST R15,R15
JNZ 0x0011efe7
JMP 0x0011f09d
LAB_0011f09a:
MOV RBX,R12
LAB_0011f09d:
TEST RBP,RBP
JZ 0x0011f0b4
MOV RAX,qword ptr [0x00141bb8]
MOV qword ptr [RBX + 0x28],RAX
MOV qword ptr [0x00141bb8],RBP
LAB_0011f0b4:
MOV byte ptr [0x00141be8],0x1
MOV EBP,dword ptr [RSP + 0x8]
MOV R12,qword ptr [RSP + 0x20]
MOV R13,qword ptr [RSP + 0x18]
MOV R14,qword ptr [RSP + 0x10]
LAB_0011f0ce:
PUSH 0x2f
POP RSI
MOV RDI,R14
CALL 0x00108640
LEA RBX,[RAX + 0x1]
TEST RAX,RAX
CMOVZ RBX,R14
PUSH 0x2e
POP RSI
MOV RDI,RBX
CALL 0x001081c0
TEST RAX,RAX
JZ 0x0011f0fc
MOV R14,RAX
SUB R14,RBX
JMP 0x0011f107
LAB_0011f0fc:
MOV RDI,RBX
CALL 0x00108230
MOV R14,RAX
LAB_0011f107:
CMP R14,0x4
JC 0x0011f11e
LEA RAX,[R14 + -0x4]
CMP dword ptr [RBX + R14*0x1 + -0x4],0x6c6e692d
CMOVZ R14,RAX
LAB_0011f11e:
LEA R15,[0x141bb8]
LAB_0011f125:
MOV R15,qword ptr [R15]
TEST R15,R15
JZ 0x0011f149
MOV RDI,qword ptr [R15]
MOV RSI,qword ptr [R15 + 0x8]
MOV RDX,RBX
MOV RCX,R14
CALL 0x0011ed20
TEST AL,AL
JNZ 0x0011f14e
ADD R15,0x28
JMP 0x0011f125
LAB_0011f149:
MOV R15,R13
JMP 0x0011f152
LAB_0011f14e:
ADD R15,0x20
LAB_0011f152:
CMP byte ptr [RSP + 0x7],0x0
JZ 0x0011f187
MOV qword ptr [R12],R15
CMP R15,R13
JNZ 0x0011f187
CMP qword ptr [R12 + 0x8],0x0
JNZ 0x0011f187
MOV qword ptr [R12 + 0x8],RBX
MOV qword ptr [R12 + 0x10],R14
MOV RAX,qword ptr [0x00141bc0]
MOV qword ptr [R12 + 0x18],RAX
MOV qword ptr [0x00141bc0],R12
LAB_0011f187:
CMP dword ptr [R15],EBP
SETGE BL
LEA RDI,[0x141bf0]
CALL 0x00108450
MOV EAX,EBX
ADD RSP,0x48
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
/* nglog::InitializeVLOG3(nglog::SiteFlag*, int*, char const*, int) */
ulong nglog::InitializeVLOG3(SiteFlag *param_1,int *param_2,char *param_3,int param_4)
{
int8 *puVar1;
char cVar2;
char cVar3;
int iVar4;
char *pcVar5;
string *psVar6;
char *pcVar7;
string *psVar8;
string *psVar9;
string *psVar10;
ulong uVar11;
long *plVar12;
int *piVar13;
int4 local_6c;
char *local_68;
int *local_60;
SiteFlag *local_58;
int1 *local_50 [2];
int1 local_40 [16];
std::mutex::lock((mutex *)vmodule_mutex);
cVar2 = inited_vmodule;
if (inited_vmodule == '\0') {
inited_vmodule = 0;
pcVar7 = *(char **)fLS::FLAGS_vmodule_abi_cxx11_;
psVar8 = (string *)0x0;
psVar10 = (string *)0x0;
local_68 = param_3;
local_60 = param_2;
local_58 = param_1;
do {
pcVar5 = strchr(pcVar7,0x3d);
psVar6 = psVar10;
psVar9 = psVar8;
if (pcVar5 == (char *)0x0) break;
local_50[0] = local_40;
/* try { // try from 0011f008 to 0011f015 has its CatchHandler @ 0011f1b9 */
std::__cxx11::string::_M_construct<char_const*>((string *)local_50,pcVar7,pcVar5);
iVar4 = __isoc99_sscanf(pcVar5,&DAT_001222c2,&local_6c);
if (iVar4 == 1) {
/* try { // try from 0011f031 to 0011f056 has its CatchHandler @ 0011f1aa */
psVar6 = (string *)operator_new(0x30);
*(string **)psVar6 = psVar6 + 0x10;
*(int8 *)(psVar6 + 8) = 0;
psVar6[0x10] = (string)0x0;
std::__cxx11::string::_M_assign(psVar6);
*(int4 *)(psVar6 + 0x20) = local_6c;
psVar9 = psVar6;
if (psVar8 != (string *)0x0) {
*(string **)(psVar10 + 0x28) = psVar6;
psVar9 = psVar8;
}
}
pcVar5 = strchr(pcVar5,0x2c);
pcVar7 = pcVar5 + 1;
std::__cxx11::string::~string((string *)local_50);
psVar8 = psVar9;
psVar10 = psVar6;
} while (pcVar5 != (char *)0x0);
if (psVar9 != (string *)0x0) {
*(string **)(psVar6 + 0x28) = vmodule_list;
vmodule_list = psVar9;
}
inited_vmodule = '\x01';
param_1 = local_58;
param_2 = local_60;
param_3 = local_68;
}
pcVar5 = strrchr(param_3,0x2f);
pcVar7 = pcVar5 + 1;
if (pcVar5 == (char *)0x0) {
pcVar7 = param_3;
}
pcVar5 = strchr(pcVar7,0x2e);
if (pcVar5 == (char *)0x0) {
uVar11 = strlen(pcVar7);
}
else {
uVar11 = (long)pcVar5 - (long)pcVar7;
}
if ((3 < uVar11) && (*(int *)(pcVar7 + (uVar11 - 4)) == 0x6c6e692d)) {
uVar11 = uVar11 - 4;
}
plVar12 = (long *)&vmodule_list;
do {
puVar1 = (int8 *)*plVar12;
piVar13 = param_2;
if (puVar1 == (int8 *)0x0) {
LAB_0011f152:
if (((cVar2 != '\0') && (*(int **)param_1 = piVar13, piVar13 == param_2)) &&
(*(long *)(param_1 + 8) == 0)) {
*(char **)(param_1 + 8) = pcVar7;
*(ulong *)(param_1 + 0x10) = uVar11;
*(SiteFlag **)(param_1 + 0x18) = cached_site_list;
cached_site_list = param_1;
}
iVar4 = *piVar13;
pthread_mutex_unlock((pthread_mutex_t *)vmodule_mutex);
return CONCAT71((int7)((ulong)pcVar7 >> 8),param_4 <= iVar4) & 0xffffffff;
}
cVar3 = tools::SafeFNMatch_((char *)*puVar1,puVar1[1],pcVar7,uVar11);
if (cVar3 != '\0') {
piVar13 = (int *)(puVar1 + 4);
goto LAB_0011f152;
}
plVar12 = puVar1 + 5;
} while( true );
}
|
|
6,325 | nglog::InitializeVLOG3(nglog::SiteFlag*, int*, char const*, int) | ng-log[P]ng-log/src/vlog_is_on.cc | bool InitializeVLOG3(SiteFlag* site_flag, int32* level_default,
const char* fname, int32 verbose_level) {
std::lock_guard<std::mutex> l(vmodule_mutex);
bool read_vmodule_flag = inited_vmodule;
if (!read_vmodule_flag) {
VLOG2Initializer();
}
// protect the errno global in case someone writes:
// VLOG(..) << "The last error was " << strerror(errno)
int old_errno = errno;
// site_default normally points to FLAGS_v
int32* site_flag_value = level_default;
// Get basename for file
const char* base = strrchr(fname, '/');
#ifdef _WIN32
if (!base) {
base = strrchr(fname, '\\');
}
#endif
base = base ? (base + 1) : fname;
const char* base_end = strchr(base, '.');
size_t base_length =
base_end ? static_cast<size_t>(base_end - base) : strlen(base);
// Trim out trailing "-inl" if any
if (base_length >= 4 && (memcmp(base + base_length - 4, "-inl", 4) == 0)) {
base_length -= 4;
}
// TODO: Trim out _unittest suffix? Perhaps it is better to have
// the extra control and just leave it there.
// find target in vector of modules, replace site_flag_value with
// a module-specific verbose level, if any.
for (const VModuleInfo* info = vmodule_list; info != nullptr;
info = info->next) {
if (SafeFNMatch_(info->module_pattern.c_str(), info->module_pattern.size(),
base, base_length)) {
site_flag_value = &info->vlog_level;
// value at info->vlog_level is now what controls
// the VLOG at the caller site forever
break;
}
}
// Cache the vlog value pointer if --vmodule flag has been parsed.
ANNOTATE_BENIGN_RACE(site_flag,
"*site_flag may be written by several threads,"
" but the value will be the same");
if (read_vmodule_flag) {
site_flag->level = site_flag_value;
// If VLOG flag has been cached to the default site pointer,
// we want to add to the cached list in order to invalidate in case
// SetVModule is called afterwards with new modules.
// The performance penalty here is neglible, because InitializeVLOG3 is
// called once per site.
if (site_flag_value == level_default && !site_flag->base_name) {
site_flag->base_name = base;
site_flag->base_len = base_length;
site_flag->next = cached_site_list;
cached_site_list = site_flag;
}
}
// restore the errno in case something recoverable went wrong during
// the initialization of the VLOG mechanism (see above note "protect the..")
errno = old_errno;
return *site_flag_value >= verbose_level;
} | O3 | cpp | nglog::InitializeVLOG3(nglog::SiteFlag*, int*, char const*, int):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movl %ecx, %ebp
movq %rdx, %r14
movq %rsi, %r13
movq %rdi, %r15
leaq 0x1f61f(%rip), %rdi # 0x41b80
callq 0x7840
testl %eax, %eax
jne 0x22787
movb 0x1f604(%rip), %al # 0x41b78
movb %al, 0x7(%rsp)
testb %al, %al
jne 0x226a6
movq %r14, 0x10(%rsp)
movq %r13, 0x18(%rsp)
movq %r15, 0x20(%rsp)
movl %ebp, 0x8(%rsp)
movb $0x0, 0x1f5de(%rip) # 0x41b78
leaq 0xdff7(%rip), %rax # 0x30598
movq (%rax), %rax
movq (%rax), %r15
leaq 0x38(%rsp), %r12
leaq 0x28(%rsp), %r13
xorl %ebp, %ebp
xorl %ebx, %ebx
movq %r15, %rdi
movl $0x3d, %esi
callq 0x71a0
testq %rax, %rax
je 0x22675
movq %rax, %r14
movq %r12, 0x28(%rsp)
movq %r13, %rdi
movq %r15, %rsi
movq %rax, %rdx
callq 0xa448
movq %r14, %rdi
leaq 0x2cab(%rip), %rsi # 0x25296
leaq 0xc(%rsp), %rdx
xorl %eax, %eax
callq 0x7500
cmpl $0x1, %eax
jne 0x22641
movl $0x30, %edi
callq 0x8eb0
movq %rax, %r15
addq $0x10, %rax
movq %rax, (%r15)
movq $0x0, 0x8(%r15)
movb $0x0, 0x10(%r15)
movq %r15, %rdi
movq %r13, %rsi
callq 0x7290
movl 0xc(%rsp), %eax
movl %eax, 0x20(%r15)
testq %rbp, %rbp
je 0x2263b
movq %r15, 0x28(%rbx)
jmp 0x2263e
movq %r15, %rbp
movq %r15, %rbx
movq %r14, %rdi
movl $0x2c, %esi
callq 0x71a0
movq %rax, %r14
movq 0x28(%rsp), %rdi
cmpq %r12, %rdi
je 0x22668
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x8efc
leaq 0x1(%r14), %r15
testq %r14, %r14
jne 0x225b5
testq %rbp, %rbp
je 0x2268c
movq 0x1f4c7(%rip), %rax # 0x41b48
movq %rax, 0x28(%rbx)
movq %rbp, 0x1f4bc(%rip) # 0x41b48
movb $0x1, 0x1f4e5(%rip) # 0x41b78
movl 0x8(%rsp), %ebp
movq 0x20(%rsp), %r15
movq 0x18(%rsp), %r13
movq 0x10(%rsp), %r14
movq %r14, %rdi
movl $0x2f, %esi
callq 0x75b0
leaq 0x1(%rax), %rbx
testq %rax, %rax
cmoveq %r14, %rbx
movq %rbx, %rdi
movl $0x2e, %esi
callq 0x71a0
testq %rax, %rax
je 0x226d8
movq %rax, %r12
subq %rbx, %r12
jmp 0x226e3
movq %rbx, %rdi
callq 0x71f0
movq %rax, %r12
cmpq $0x4, %r12
jb 0x226fb
leaq -0x4(%r12), %rax
cmpl $0x6c6e692d, -0x4(%rbx,%r12) # imm = 0x6C6E692D
cmoveq %rax, %r12
movq 0x1f446(%rip), %r14 # 0x41b48
movq %r13, %rax
testq %r14, %r14
je 0x22735
movq (%r14), %rdi
movq 0x8(%r14), %rsi
movq %rbx, %rdx
movq %r12, %rcx
callq 0x222b0
testb %al, %al
jne 0x2272e
movq 0x28(%r14), %r14
testq %r14, %r14
jne 0x2270a
movq %r13, %rax
jmp 0x22735
addq $0x20, %r14
movq %r14, %rax
cmpb $0x0, 0x7(%rsp)
je 0x22765
movq %rax, (%r15)
cmpq %r13, %rax
jne 0x22765
cmpq $0x0, 0x8(%r15)
jne 0x22765
movq %rbx, 0x8(%r15)
movq %r12, 0x10(%r15)
movq 0x1f3f6(%rip), %rcx # 0x41b50
movq %rcx, 0x18(%r15)
movq %r15, 0x1f3eb(%rip) # 0x41b50
cmpl %ebp, (%rax)
setge %bl
leaq 0x1f40f(%rip), %rdi # 0x41b80
callq 0x73e0
movl %ebx, %eax
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl %eax, %edi
callq 0x7350
movq %rax, %rbx
movq 0x28(%rsp), %rdi
cmpq %r12, %rdi
je 0x227ad
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x8efc
jmp 0x227ad
movq %rax, %rbx
leaq 0x1f3cc(%rip), %rdi # 0x41b80
callq 0x73e0
movq %rbx, %rdi
callq 0x79b0
| _ZN5nglog15InitializeVLOG3EPNS_8SiteFlagEPiPKci:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 48h
mov ebp, ecx
mov r14, rdx
mov r13, rsi
mov r15, rdi
lea rdi, _ZN5nglogL13vmodule_mutexE; nglog::vmodule_mutex
call _pthread_mutex_lock
test eax, eax
jnz loc_22787
mov al, cs:_ZN5nglogL14inited_vmoduleE; nglog::inited_vmodule
mov [rsp+78h+var_71], al
test al, al
jnz loc_226A6
mov [rsp+78h+var_68], r14
mov [rsp+78h+var_60], r13
mov [rsp+78h+var_58], r15
mov [rsp+78h+var_70], ebp
mov cs:_ZN5nglogL14inited_vmoduleE, 0; nglog::inited_vmodule
lea rax, _ZN3fLS13FLAGS_vmoduleB5cxx11E; fLS::FLAGS_vmodule
mov rax, [rax]
mov r15, [rax]
lea r12, [rsp+78h+var_40]
lea r13, [rsp+78h+var_50]
xor ebp, ebp
xor ebx, ebx
loc_225B5:
mov rdi, r15
mov esi, 3Dh ; '='
call _strchr
test rax, rax
jz loc_22675
mov r14, rax
mov [rsp+78h+var_50], r12
mov rdi, r13
mov rsi, r15
mov rdx, rax
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag; std::string::_M_construct<char const*>(char const*,char const*,std::forward_iterator_tag)
mov rdi, r14
lea rsi, aD; "=%d"
lea rdx, [rsp+78h+var_6C]
xor eax, eax
call ___isoc99_sscanf
cmp eax, 1
jnz short loc_22641
mov edi, 30h ; '0'; unsigned __int64
call _Znwm; operator new(ulong)
mov r15, rax
add rax, 10h
mov [r15], rax
mov qword ptr [r15+8], 0
mov byte ptr [r15+10h], 0
mov rdi, r15
mov rsi, r13
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_assignERKS4_; std::string::_M_assign(std::string const&)
mov eax, [rsp+78h+var_6C]
mov [r15+20h], eax
test rbp, rbp
jz short loc_2263B
mov [rbx+28h], r15
jmp short loc_2263E
loc_2263B:
mov rbp, r15
loc_2263E:
mov rbx, r15
loc_22641:
mov rdi, r14
mov esi, 2Ch ; ','
call _strchr
mov r14, rax
mov rdi, [rsp+78h+var_50]; void *
cmp rdi, r12
jz short loc_22668
mov rsi, [rsp+78h+var_40]
inc rsi; unsigned __int64
call _ZdlPvm; operator delete(void *,ulong)
loc_22668:
lea r15, [r14+1]
test r14, r14
jnz loc_225B5
loc_22675:
test rbp, rbp
jz short loc_2268C
mov rax, cs:_ZN5nglogL12vmodule_listE; nglog::vmodule_list
mov [rbx+28h], rax
mov cs:_ZN5nglogL12vmodule_listE, rbp; nglog::vmodule_list
loc_2268C:
mov cs:_ZN5nglogL14inited_vmoduleE, 1; nglog::inited_vmodule
mov ebp, [rsp+78h+var_70]
mov r15, [rsp+78h+var_58]
mov r13, [rsp+78h+var_60]
mov r14, [rsp+78h+var_68]
loc_226A6:
mov rdi, r14
mov esi, 2Fh ; '/'
call _strrchr
lea rbx, [rax+1]
test rax, rax
cmovz rbx, r14
mov rdi, rbx
mov esi, 2Eh ; '.'
call _strchr
test rax, rax
jz short loc_226D8
mov r12, rax
sub r12, rbx
jmp short loc_226E3
loc_226D8:
mov rdi, rbx
call _strlen
mov r12, rax
loc_226E3:
cmp r12, 4
jb short loc_226FB
lea rax, [r12-4]
cmp dword ptr [rbx+r12-4], 6C6E692Dh
cmovz r12, rax
loc_226FB:
mov r14, cs:_ZN5nglogL12vmodule_listE; nglog::vmodule_list
mov rax, r13
test r14, r14
jz short loc_22735
loc_2270A:
mov rdi, [r14]; this
mov rsi, [r14+8]; char *
mov rdx, rbx; unsigned __int64
mov rcx, r12; char *
call _ZN5nglog5tools12SafeFNMatch_EPKcmS2_m; nglog::tools::SafeFNMatch_(char const*,ulong,char const*,ulong)
test al, al
jnz short loc_2272E
mov r14, [r14+28h]
test r14, r14
jnz short loc_2270A
mov rax, r13
jmp short loc_22735
loc_2272E:
add r14, 20h ; ' '
mov rax, r14
loc_22735:
cmp [rsp+78h+var_71], 0
jz short loc_22765
mov [r15], rax
cmp rax, r13
jnz short loc_22765
cmp qword ptr [r15+8], 0
jnz short loc_22765
mov [r15+8], rbx
mov [r15+10h], r12
mov rcx, cs:_ZN5nglogL16cached_site_listE; nglog::cached_site_list
mov [r15+18h], rcx
mov cs:_ZN5nglogL16cached_site_listE, r15; nglog::cached_site_list
loc_22765:
cmp [rax], ebp
setnl bl
lea rdi, _ZN5nglogL13vmodule_mutexE; nglog::vmodule_mutex
call _pthread_mutex_unlock
mov eax, ebx
add rsp, 48h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_22787:
mov edi, eax; int
call __ZSt20__throw_system_errori; std::__throw_system_error(int)
mov rbx, rax
mov rdi, [rsp+78h+var_50]; void *
cmp rdi, r12
jz short loc_227AD
mov rsi, [rsp+78h+var_40]
inc rsi; unsigned __int64
call _ZdlPvm; operator delete(void *,ulong)
jmp short loc_227AD
mov rbx, rax
loc_227AD:
lea rdi, _ZN5nglogL13vmodule_mutexE; nglog::vmodule_mutex
call _pthread_mutex_unlock
mov rdi, rbx
call __Unwind_Resume
| long long nglog::InitializeVLOG3(_QWORD *a1, _DWORD *a2, long long a3, int a4)
{
_DWORD *v6; // r13
_QWORD *v7; // r15
int v8; // eax
_BYTE *v9; // r15
long long v10; // rbp
long long v11; // rbx
long long v12; // rax
long long v13; // r14
long long v14; // r15
long long v15; // r14
long long v16; // rax
long long v17; // rbx
long long v18; // rax
unsigned long long v19; // r8
const char *v20; // r12
long long v21; // r14
_DWORD *v22; // rax
char v24; // [rsp+7h] [rbp-71h]
int v25; // [rsp+8h] [rbp-70h]
int v26; // [rsp+Ch] [rbp-6Ch] BYREF
long long v27; // [rsp+10h] [rbp-68h]
_DWORD *v28; // [rsp+18h] [rbp-60h]
_QWORD *v29; // [rsp+20h] [rbp-58h]
void *v30[2]; // [rsp+28h] [rbp-50h] BYREF
_QWORD v31[8]; // [rsp+38h] [rbp-40h] BYREF
v6 = a2;
v7 = a1;
v8 = pthread_mutex_lock(&nglog::vmodule_mutex);
if ( v8 )
std::__throw_system_error(v8);
v24 = nglog::inited_vmodule;
if ( !nglog::inited_vmodule )
{
v27 = a3;
v28 = a2;
v29 = a1;
v25 = a4;
nglog::inited_vmodule = 0;
v9 = (_BYTE *)fLS::FLAGS_vmodule_buf[abi:cxx11];
v10 = 0LL;
v11 = 0LL;
do
{
v12 = strchr(v9, 61LL);
if ( !v12 )
break;
v13 = v12;
v30[0] = v31;
std::string::_M_construct<char const*>((long long)v30, v9, v12);
if ( (unsigned int)__isoc99_sscanf(v13, "=%d", &v26) == 1 )
{
v14 = operator new(48LL);
*(_QWORD *)v14 = v14 + 16;
*(_QWORD *)(v14 + 8) = 0LL;
*(_BYTE *)(v14 + 16) = 0;
std::string::_M_assign(v14, v30);
*(_DWORD *)(v14 + 32) = v26;
if ( v10 )
*(_QWORD *)(v11 + 40) = v14;
else
v10 = v14;
v11 = v14;
}
v15 = strchr(v13, 44LL);
if ( v30[0] != v31 )
operator delete(v30[0]);
v9 = (_BYTE *)(v15 + 1);
}
while ( v15 );
if ( v10 )
{
*(_QWORD *)(v11 + 40) = nglog::vmodule_list;
nglog::vmodule_list = v10;
}
nglog::inited_vmodule = 1;
a4 = v25;
v7 = v29;
v6 = v28;
a3 = v27;
}
v16 = strrchr(a3, 47LL);
v17 = v16 + 1;
if ( !v16 )
v17 = a3;
v18 = strchr(v17, 46LL);
if ( v18 )
v20 = (const char *)(v18 - v17);
else
v20 = (const char *)strlen(v17);
if ( (unsigned long long)v20 >= 4 && *(_DWORD *)&v20[v17 - 4] == 1819175213 )
v20 -= 4;
v21 = nglog::vmodule_list;
v22 = v6;
if ( nglog::vmodule_list )
{
while ( !nglog::tools::SafeFNMatch_(*(nglog::tools **)v21, *(const char **)(v21 + 8), v17, v20, v19) )
{
v21 = *(_QWORD *)(v21 + 40);
if ( !v21 )
{
v22 = v6;
goto LABEL_29;
}
}
v22 = (_DWORD *)(v21 + 32);
}
LABEL_29:
if ( v24 )
{
*v7 = v22;
if ( v22 == v6 && !v7[1] )
{
v7[1] = v17;
v7[2] = v20;
v7[3] = nglog::cached_site_list;
nglog::cached_site_list = (long long)v7;
}
}
LOBYTE(v17) = *v22 >= a4;
pthread_mutex_unlock(&nglog::vmodule_mutex);
return (unsigned int)v17;
}
| InitializeVLOG3:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x48
MOV EBP,ECX
MOV R14,RDX
MOV R13,RSI
MOV R15,RDI
LEA RDI,[0x141b80]
CALL 0x00107840
TEST EAX,EAX
JNZ 0x00122787
MOV AL,byte ptr [0x00141b78]
MOV byte ptr [RSP + 0x7],AL
TEST AL,AL
JNZ 0x001226a6
MOV qword ptr [RSP + 0x10],R14
MOV qword ptr [RSP + 0x18],R13
MOV qword ptr [RSP + 0x20],R15
MOV dword ptr [RSP + 0x8],EBP
MOV byte ptr [0x00141b78],0x0
LEA RAX,[0x130598]
MOV RAX,qword ptr [RAX]
MOV R15,qword ptr [RAX]
LEA R12,[RSP + 0x38]
LEA R13,[RSP + 0x28]
XOR EBP,EBP
XOR EBX,EBX
LAB_001225b5:
MOV RDI,R15
MOV ESI,0x3d
CALL 0x001071a0
TEST RAX,RAX
JZ 0x00122675
MOV R14,RAX
MOV qword ptr [RSP + 0x28],R12
LAB_001225d3:
MOV RDI,R13
MOV RSI,R15
MOV RDX,RAX
CALL 0x0010a448
MOV RDI,R14
LEA RSI,[0x125296]
LEA RDX,[RSP + 0xc]
XOR EAX,EAX
CALL 0x00107500
CMP EAX,0x1
JNZ 0x00122641
LAB_001225fc:
MOV EDI,0x30
CALL 0x00108eb0
MOV R15,RAX
ADD RAX,0x10
MOV qword ptr [R15],RAX
MOV qword ptr [R15 + 0x8],0x0
MOV byte ptr [R15 + 0x10],0x0
MOV RDI,R15
MOV RSI,R13
CALL 0x00107290
LAB_00122628:
MOV EAX,dword ptr [RSP + 0xc]
MOV dword ptr [R15 + 0x20],EAX
TEST RBP,RBP
JZ 0x0012263b
MOV qword ptr [RBX + 0x28],R15
JMP 0x0012263e
LAB_0012263b:
MOV RBP,R15
LAB_0012263e:
MOV RBX,R15
LAB_00122641:
MOV RDI,R14
MOV ESI,0x2c
CALL 0x001071a0
MOV R14,RAX
MOV RDI,qword ptr [RSP + 0x28]
CMP RDI,R12
JZ 0x00122668
MOV RSI,qword ptr [RSP + 0x38]
INC RSI
CALL 0x00108efc
LAB_00122668:
LEA R15,[R14 + 0x1]
TEST R14,R14
JNZ 0x001225b5
LAB_00122675:
TEST RBP,RBP
JZ 0x0012268c
MOV RAX,qword ptr [0x00141b48]
MOV qword ptr [RBX + 0x28],RAX
MOV qword ptr [0x00141b48],RBP
LAB_0012268c:
MOV byte ptr [0x00141b78],0x1
MOV EBP,dword ptr [RSP + 0x8]
MOV R15,qword ptr [RSP + 0x20]
MOV R13,qword ptr [RSP + 0x18]
MOV R14,qword ptr [RSP + 0x10]
LAB_001226a6:
MOV RDI,R14
MOV ESI,0x2f
CALL 0x001075b0
LEA RBX,[RAX + 0x1]
TEST RAX,RAX
CMOVZ RBX,R14
MOV RDI,RBX
MOV ESI,0x2e
CALL 0x001071a0
TEST RAX,RAX
JZ 0x001226d8
MOV R12,RAX
SUB R12,RBX
JMP 0x001226e3
LAB_001226d8:
MOV RDI,RBX
CALL 0x001071f0
MOV R12,RAX
LAB_001226e3:
CMP R12,0x4
JC 0x001226fb
LEA RAX,[R12 + -0x4]
CMP dword ptr [RBX + R12*0x1 + -0x4],0x6c6e692d
CMOVZ R12,RAX
LAB_001226fb:
MOV R14,qword ptr [0x00141b48]
MOV RAX,R13
TEST R14,R14
JZ 0x00122735
LAB_0012270a:
MOV RDI,qword ptr [R14]
MOV RSI,qword ptr [R14 + 0x8]
MOV RDX,RBX
MOV RCX,R12
CALL 0x001222b0
TEST AL,AL
JNZ 0x0012272e
MOV R14,qword ptr [R14 + 0x28]
TEST R14,R14
JNZ 0x0012270a
MOV RAX,R13
JMP 0x00122735
LAB_0012272e:
ADD R14,0x20
MOV RAX,R14
LAB_00122735:
CMP byte ptr [RSP + 0x7],0x0
JZ 0x00122765
MOV qword ptr [R15],RAX
CMP RAX,R13
JNZ 0x00122765
CMP qword ptr [R15 + 0x8],0x0
JNZ 0x00122765
MOV qword ptr [R15 + 0x8],RBX
MOV qword ptr [R15 + 0x10],R12
MOV RCX,qword ptr [0x00141b50]
MOV qword ptr [R15 + 0x18],RCX
MOV qword ptr [0x00141b50],R15
LAB_00122765:
CMP dword ptr [RAX],EBP
SETGE BL
LEA RDI,[0x141b80]
CALL 0x001073e0
MOV EAX,EBX
ADD RSP,0x48
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_00122787:
MOV EDI,EAX
CALL 0x00107350
|
/* nglog::InitializeVLOG3(nglog::SiteFlag*, int*, char const*, int) */
ulong nglog::InitializeVLOG3(SiteFlag *param_1,int *param_2,char *param_3,int param_4)
{
char cVar1;
char cVar2;
int iVar3;
char *pcVar4;
string *psVar5;
string *psVar6;
char *pcVar7;
string *psVar8;
ulong uVar9;
string *psVar10;
int4 local_6c;
char *local_68;
string *local_60;
SiteFlag *local_58;
long *local_50 [2];
long local_40 [2];
iVar3 = pthread_mutex_lock((pthread_mutex_t *)vmodule_mutex);
cVar1 = inited_vmodule;
if (iVar3 != 0) {
/* WARNING: Subroutine does not return */
std::__throw_system_error(iVar3);
}
if (inited_vmodule == '\0') {
inited_vmodule = 0;
pcVar7 = *(char **)fLS::FLAGS_vmodule_abi_cxx11_;
psVar6 = (string *)0x0;
psVar10 = (string *)0x0;
local_68 = param_3;
local_60 = (string *)param_2;
local_58 = param_1;
do {
pcVar4 = strchr(pcVar7,0x3d);
psVar5 = psVar6;
psVar8 = psVar10;
if (pcVar4 == (char *)0x0) break;
local_50[0] = local_40;
/* try { // try from 001225d3 to 001225e0 has its CatchHandler @ 001227aa */
std::__cxx11::string::_M_construct<char_const*>(local_50,pcVar7,pcVar4);
iVar3 = __isoc99_sscanf(pcVar4,&DAT_00125296,&local_6c);
if (iVar3 == 1) {
/* try { // try from 001225fc to 00122627 has its CatchHandler @ 0012278e */
psVar5 = (string *)operator_new(0x30);
*(string **)psVar5 = psVar5 + 0x10;
*(int8 *)(psVar5 + 8) = 0;
psVar5[0x10] = (string)0x0;
std::__cxx11::string::_M_assign(psVar5);
*(int4 *)(psVar5 + 0x20) = local_6c;
psVar8 = psVar5;
if (psVar10 != (string *)0x0) {
*(string **)(psVar6 + 0x28) = psVar5;
psVar8 = psVar10;
}
}
pcVar4 = strchr(pcVar4,0x2c);
if (local_50[0] != local_40) {
operator_delete(local_50[0],local_40[0] + 1);
}
pcVar7 = pcVar4 + 1;
psVar6 = psVar5;
psVar10 = psVar8;
} while (pcVar4 != (char *)0x0);
if (psVar8 != (string *)0x0) {
*(string **)(psVar5 + 0x28) = vmodule_list;
vmodule_list = psVar8;
}
inited_vmodule = '\x01';
param_2 = (int *)local_60;
param_3 = local_68;
param_1 = local_58;
}
pcVar4 = strrchr(param_3,0x2f);
pcVar7 = pcVar4 + 1;
if (pcVar4 == (char *)0x0) {
pcVar7 = param_3;
}
pcVar4 = strchr(pcVar7,0x2e);
if (pcVar4 == (char *)0x0) {
uVar9 = strlen(pcVar7);
}
else {
uVar9 = (long)pcVar4 - (long)pcVar7;
}
psVar6 = vmodule_list;
if ((3 < uVar9) && (*(int *)(pcVar7 + (uVar9 - 4)) == 0x6c6e692d)) {
uVar9 = uVar9 - 4;
}
do {
psVar10 = (string *)param_2;
if (psVar6 == (string *)0x0) {
LAB_00122735:
if (((cVar1 != '\0') && (*(string **)param_1 = psVar10, psVar10 == (string *)param_2)) &&
(*(long *)(param_1 + 8) == 0)) {
*(char **)(param_1 + 8) = pcVar7;
*(ulong *)(param_1 + 0x10) = uVar9;
*(SiteFlag **)(param_1 + 0x18) = cached_site_list;
cached_site_list = param_1;
}
iVar3 = *(int *)psVar10;
pthread_mutex_unlock((pthread_mutex_t *)vmodule_mutex);
return CONCAT71((int7)((ulong)pcVar7 >> 8),param_4 <= iVar3) & 0xffffffff;
}
cVar2 = tools::SafeFNMatch_(*(char **)psVar6,*(ulong *)(psVar6 + 8),pcVar7,uVar9);
if (cVar2 != '\0') {
psVar10 = psVar6 + 0x20;
goto LAB_00122735;
}
psVar6 = *(string **)(psVar6 + 0x28);
} while( true );
}
|
|
6,326 | std::vector<int, std::allocator<int>> string_split<int>(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, char) | monkey531[P]llama/common/common.h | static std::vector<T> string_split(const std::string & str, char delim) {
static_assert(!std::is_same<T, std::string>::value, "Please use the specialized version for std::string");
std::vector<T> values;
std::istringstream str_stream(str);
std::string token;
while (std::getline(str_stream, token, delim)) {
T value;
std::istringstream token_stream(token);
token_stream >> value;
values.push_back(value);
}
return values;
} | O3 | c | std::vector<int, std::allocator<int>> string_split<int>(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, char):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x328, %rsp # imm = 0x328
movq %rdi, %rbx
xorps %xmm0, %xmm0
movups %xmm0, (%rdi)
xorl %r14d, %r14d
movq %r14, 0x10(%rdi)
leaq 0x28(%rsp), %r15
movq %r15, %rdi
movl $0x8, %edx
callq 0x1c0d0
leaq 0x18(%rsp), %rax
movq %rax, -0x10(%rax)
movq %r14, -0x8(%rax)
movb $0x0, (%rax)
leaq 0x8(%rsp), %r12
leaq 0x1a8(%rsp), %r13
leaq 0x4(%rsp), %rbp
movq 0xd962d(%rip), %r14 # 0x12df50
movq %r15, %rdi
movq %r12, %rsi
movl $0x2c, %edx
callq 0x1c2e0
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
testb $0x5, 0x20(%rax,%rcx)
jne 0x5499b
movq %r13, %rdi
movq %r12, %rsi
movl $0x8, %edx
callq 0x1c0d0
movq %r13, %rdi
movq %rbp, %rsi
callq 0x1b650
movq 0x8(%rbx), %rsi
cmpq 0x10(%rbx), %rsi
je 0x54976
movl 0x4(%rsp), %eax
movl %eax, (%rsi)
addq $0x4, %rsi
movq %rsi, 0x8(%rbx)
jmp 0x54981
movq %rbx, %rdi
movq %rbp, %rdx
callq 0x736e0
movq %r13, %rdi
movq %r14, %rsi
callq 0x1be80
leaq 0x220(%rsp), %rdi
callq 0x1b2f0
jmp 0x54923
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0x549b7
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x1ba20
movq 0xd9592(%rip), %rsi # 0x12df50
leaq 0x28(%rsp), %rdi
callq 0x1be80
leaq 0xa0(%rsp), %rdi
callq 0x1b2f0
addq $0x328, %rsp # imm = 0x328
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x549e9
movq %rax, %r14
jmp 0x54a12
movq %rax, %r14
movq 0xd9558(%rip), %rsi # 0x12df50
leaq 0x1a8(%rsp), %rdi
callq 0x1be80
leaq 0x220(%rsp), %rdi
callq 0x1b2f0
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0x54a2e
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x1ba20
movq 0xd951b(%rip), %rsi # 0x12df50
leaq 0x28(%rsp), %rdi
callq 0x1be80
leaq 0xa0(%rsp), %rdi
callq 0x1b2f0
movq (%rbx), %rdi
testq %rdi, %rdi
je 0x54a60
movq 0x10(%rbx), %rsi
subq %rdi, %rsi
callq 0x1ba20
movq %r14, %rdi
callq 0x1c1e0
| _ZL12string_splitIiESt6vectorIT_SaIS1_EERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEc:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 328h
mov rbx, rdi
xorps xmm0, xmm0
movups xmmword ptr [rdi], xmm0
xor r14d, r14d
mov [rdi+10h], r14
lea r15, [rsp+358h+var_330]
mov rdi, r15
mov edx, 8
call __ZNSt7__cxx1119basic_istringstreamIcSt11char_traitsIcESaIcEEC1ERKNS_12basic_stringIcS2_S3_EESt13_Ios_Openmode; std::istringstream::basic_istringstream(std::string const&,std::_Ios_Openmode)
lea rax, [rsp+358h+var_340]
mov [rax-10h], rax
mov [rax-8], r14
mov byte ptr [rax], 0
lea r12, [rsp+358h+var_350]
lea r13, [rsp+358h+var_1B0]
lea rbp, [rsp+358h+var_354]
mov r14, cs:_ZTTNSt7__cxx1119basic_istringstreamIcSt11char_traitsIcESaIcEEE_ptr
loc_54923:
mov rdi, r15
mov rsi, r12
mov edx, 2Ch ; ','
call __ZSt7getlineIcSt11char_traitsIcESaIcEERSt13basic_istreamIT_T0_ES7_RNSt7__cxx1112basic_stringIS4_S5_T1_EES4_; std::getline<char,std::char_traits<char>,std::allocator<char>>(std::istream &,std::string &,char)
mov rcx, [rax]
mov rcx, [rcx-18h]
test byte ptr [rax+rcx+20h], 5
jnz short loc_5499B
mov rdi, r13
mov rsi, r12
mov edx, 8
call __ZNSt7__cxx1119basic_istringstreamIcSt11char_traitsIcESaIcEEC1ERKNS_12basic_stringIcS2_S3_EESt13_Ios_Openmode; std::istringstream::basic_istringstream(std::string const&,std::_Ios_Openmode)
mov rdi, r13
mov rsi, rbp
call __ZNSirsERi; std::istream::operator>>(int &)
mov rsi, [rbx+8]
cmp rsi, [rbx+10h]
jz short loc_54976
mov eax, [rsp+358h+var_354]
mov [rsi], eax
add rsi, 4
mov [rbx+8], rsi
jmp short loc_54981
loc_54976:
mov rdi, rbx
mov rdx, rbp
call _ZNSt6vectorIiSaIiEE17_M_realloc_insertIJRKiEEEvN9__gnu_cxx17__normal_iteratorIPiS1_EEDpOT_; std::vector<int>::_M_realloc_insert<int const&>(__gnu_cxx::__normal_iterator<int *,std::vector<int>>,int const&)
loc_54981:
mov rdi, r13
mov rsi, r14
call __ZNSt7__cxx1119basic_istringstreamIcSt11char_traitsIcESaIcEED2Ev; std::istringstream::~istringstream()
lea rdi, [rsp+358h+var_138]; this
call __ZNSt8ios_baseD2Ev; std::ios_base::~ios_base()
jmp short loc_54923
loc_5499B:
mov rdi, [rsp+358h+var_350]; void *
lea rax, [rsp+358h+var_340]
cmp rdi, rax
jz short loc_549B7
mov rsi, [rsp+358h+var_340]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_549B7:
mov rsi, cs:_ZTTNSt7__cxx1119basic_istringstreamIcSt11char_traitsIcESaIcEEE_ptr
lea rdi, [rsp+358h+var_330]
call __ZNSt7__cxx1119basic_istringstreamIcSt11char_traitsIcESaIcEED2Ev; std::istringstream::~istringstream()
lea rdi, [rsp+358h+var_2B8]; this
call __ZNSt8ios_baseD2Ev; std::ios_base::~ios_base()
add rsp, 328h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
jmp short $+2
loc_549E9:
mov r14, rax
jmp short loc_54A12
mov r14, rax
mov rsi, cs:_ZTTNSt7__cxx1119basic_istringstreamIcSt11char_traitsIcESaIcEEE_ptr
lea rdi, [rsp+arg_1A0]
call __ZNSt7__cxx1119basic_istringstreamIcSt11char_traitsIcESaIcEED2Ev; std::istringstream::~istringstream()
lea rdi, [rsp+arg_218]; this
call __ZNSt8ios_baseD2Ev; std::ios_base::~ios_base()
loc_54A12:
mov rdi, [rsp+arg_0]; void *
lea rax, [rsp+arg_10]
cmp rdi, rax
jz short loc_54A2E
mov rsi, [rsp+arg_10]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_54A2E:
mov rsi, cs:_ZTTNSt7__cxx1119basic_istringstreamIcSt11char_traitsIcESaIcEEE_ptr
lea rdi, [rsp+arg_20]
call __ZNSt7__cxx1119basic_istringstreamIcSt11char_traitsIcESaIcEED2Ev; std::istringstream::~istringstream()
lea rdi, [rsp+arg_98]; this
call __ZNSt8ios_baseD2Ev; std::ios_base::~ios_base()
mov rdi, [rbx]; void *
test rdi, rdi
jz short loc_54A60
mov rsi, [rbx+10h]
sub rsi, rdi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_54A60:
mov rdi, r14
call __Unwind_Resume
| void string_split<int>(long long a1, long long a2)
{
_QWORD *v2; // rax
_DWORD *v3; // rsi
int v4; // [rsp+4h] [rbp-354h] BYREF
void *v5[2]; // [rsp+8h] [rbp-350h] BYREF
_QWORD v6[2]; // [rsp+18h] [rbp-340h] BYREF
_BYTE v7[120]; // [rsp+28h] [rbp-330h] BYREF
_BYTE v8[264]; // [rsp+A0h] [rbp-2B8h] BYREF
_BYTE v9[120]; // [rsp+1A8h] [rbp-1B0h] BYREF
_BYTE v10[312]; // [rsp+220h] [rbp-138h] BYREF
*(_OWORD *)a1 = 0LL;
*(_QWORD *)(a1 + 16) = 0LL;
std::istringstream::basic_istringstream(v7, a2, 8LL);
v5[0] = v6;
v5[1] = 0LL;
LOBYTE(v6[0]) = 0;
while ( 1 )
{
v2 = (_QWORD *)std::getline<char,std::char_traits<char>,std::allocator<char>>(v7, v5, 44LL);
if ( (*((_BYTE *)v2 + *(_QWORD *)(*v2 - 24LL) + 32) & 5) != 0 )
break;
std::istringstream::basic_istringstream(v9, v5, 8LL);
std::istream::operator>>(v9, &v4);
v3 = *(_DWORD **)(a1 + 8);
if ( v3 == *(_DWORD **)(a1 + 16) )
{
std::vector<int>::_M_realloc_insert<int const&>(a1, v3, &v4);
}
else
{
*v3 = v4;
*(_QWORD *)(a1 + 8) = v3 + 1;
}
std::istringstream::~istringstream(v9, &`VTT for'std::istringstream);
std::ios_base::~ios_base((std::ios_base *)v10);
}
if ( v5[0] != v6 )
operator delete(v5[0], v6[0] + 1LL);
std::istringstream::~istringstream(v7, &`VTT for'std::istringstream);
std::ios_base::~ios_base((std::ios_base *)v8);
}
| string_split<int>:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x328
MOV RBX,RDI
XORPS XMM0,XMM0
MOVUPS xmmword ptr [RDI],XMM0
XOR R14D,R14D
MOV qword ptr [RDI + 0x10],R14
LEA R15,[RSP + 0x28]
MOV RDI,R15
MOV EDX,0x8
CALL 0x0011c0d0
LEA RAX,[RSP + 0x18]
MOV qword ptr [RAX + -0x10],RAX
MOV qword ptr [RAX + -0x8],R14
MOV byte ptr [RAX],0x0
LEA R12,[RSP + 0x8]
LEA R13,[RSP + 0x1a8]
LEA RBP,[RSP + 0x4]
MOV R14,qword ptr [0x0022df50]
LAB_00154923:
MOV RDI,R15
MOV RSI,R12
MOV EDX,0x2c
CALL 0x0011c2e0
MOV RCX,qword ptr [RAX]
MOV RCX,qword ptr [RCX + -0x18]
TEST byte ptr [RAX + RCX*0x1 + 0x20],0x5
JNZ 0x0015499b
LAB_00154941:
MOV RDI,R13
MOV RSI,R12
MOV EDX,0x8
CALL 0x0011c0d0
LAB_00154951:
MOV RDI,R13
MOV RSI,RBP
CALL 0x0011b650
MOV RSI,qword ptr [RBX + 0x8]
CMP RSI,qword ptr [RBX + 0x10]
JZ 0x00154976
MOV EAX,dword ptr [RSP + 0x4]
MOV dword ptr [RSI],EAX
ADD RSI,0x4
MOV qword ptr [RBX + 0x8],RSI
JMP 0x00154981
LAB_00154976:
MOV RDI,RBX
MOV RDX,RBP
CALL 0x001736e0
LAB_00154981:
MOV RDI,R13
MOV RSI,R14
CALL 0x0011be80
LEA RDI,[RSP + 0x220]
CALL 0x0011b2f0
JMP 0x00154923
LAB_0015499b:
MOV RDI,qword ptr [RSP + 0x8]
LEA RAX,[RSP + 0x18]
CMP RDI,RAX
JZ 0x001549b7
MOV RSI,qword ptr [RSP + 0x18]
INC RSI
CALL 0x0011ba20
LAB_001549b7:
MOV RSI,qword ptr [0x0022df50]
LEA RDI,[RSP + 0x28]
CALL 0x0011be80
LEA RDI,[RSP + 0xa0]
CALL 0x0011b2f0
ADD RSP,0x328
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
/* std::vector<int, std::allocator<int> > string_split<int>(std::__cxx11::string const&, char) */
void string_split<int>(string *param_1,char param_2)
{
int *piVar1;
istream *piVar2;
int7 in_register_00000031;
int local_354;
int1 *local_350;
int8 local_348;
int1 local_340;
int7 uStack_33f;
istream local_330 [120];
ios_base local_2b8 [264];
istream local_1b0 [120];
ios_base local_138 [264];
*(int8 *)param_1 = 0;
*(int8 *)(param_1 + 8) = 0;
*(int8 *)(param_1 + 0x10) = 0;
std::__cxx11::istringstream::istringstream
((istringstream *)local_330,CONCAT71(in_register_00000031,param_2),8);
local_350 = &local_340;
local_348 = 0;
local_340 = 0;
while( true ) {
/* try { // try from 00154923 to 00154932 has its CatchHandler @ 001549e9 */
piVar2 = std::getline<char,std::char_traits<char>,std::allocator<char>>
(local_330,(string *)&local_350,',');
if (((byte)piVar2[*(long *)(*(long *)piVar2 + -0x18) + 0x20] & 5) != 0) break;
/* try { // try from 00154941 to 00154950 has its CatchHandler @ 001549e7 */
std::__cxx11::istringstream::istringstream((istringstream *)local_1b0,(string *)&local_350,8);
/* try { // try from 00154951 to 00154980 has its CatchHandler @ 001549ee */
std::istream::operator>>(local_1b0,&local_354);
piVar1 = *(int **)(param_1 + 8);
if (piVar1 == *(int **)(param_1 + 0x10)) {
std::vector<int,std::allocator<int>>::_M_realloc_insert<int_const&>
((vector<int,std::allocator<int>> *)param_1,piVar1,&local_354);
}
else {
*piVar1 = local_354;
*(int **)(param_1 + 8) = piVar1 + 1;
}
std::__cxx11::istringstream::~istringstream((istringstream *)local_1b0);
std::ios_base::~ios_base(local_138);
}
if (local_350 != &local_340) {
operator_delete(local_350,CONCAT71(uStack_33f,local_340) + 1);
}
std::__cxx11::istringstream::~istringstream((istringstream *)local_330);
std::ios_base::~ios_base(local_2b8);
return;
}
|
|
6,327 | FindPeaksCppTest_ThresholdFiltering_Test::TestBody() | giladroyz[P]FindPeaks/tests/test_find_peaks_cpp.cpp | TEST_F(FindPeaksCppTest, ThresholdFiltering) {
PeakConditions conditions;
conditions.set_threshold(1.5); // Peak must exceed neighbors by at least 1.5
auto peaks = find_peaks(simple_signal, conditions);
for (const auto& peak : peaks) {
EXPECT_GE(peak.threshold.left_threshold, 1.5);
EXPECT_GE(peak.threshold.right_threshold, 1.5);
}
} | O3 | cpp | FindPeaksCppTest_ThresholdFiltering_Test::TestBody():
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xc8, %rsp
leaq 0x10(%rdi), %rsi
movaps 0x33ec0(%rip), %xmm0 # 0x40010
leaq 0x40(%rsp), %rdx
movups %xmm0, 0x8(%rdx)
movaps 0x33ed0(%rip), %xmm1 # 0x40030
movups %xmm1, 0x20(%rdx)
movq $0x1, 0x30(%rdx)
movups %xmm0, 0x40(%rdx)
movups %xmm0, 0x58(%rdx)
xorl %eax, %eax
movq %rax, 0x68(%rdx)
movabsq $0x3fe0000000000000, %rcx # imm = 0x3FE0000000000000
movq %rcx, 0x70(%rdx)
movq %rax, 0x78(%rdx)
movq $-0x1, 0x80(%rdx)
leaq 0x28(%rsp), %rbx
movq %rbx, %rdi
callq 0x3d274
movq (%rbx), %r15
movq 0x8(%rbx), %r12
cmpq %r12, %r15
je 0xc312
leaq 0x34141(%rip), %r13 # 0x402fc
leaq 0x10(%rsp), %rbp
leaq 0x8(%rsp), %rbx
leaq 0x20(%rsp), %r14
leaq 0x28(%r15), %rcx
movabsq $0x3ff8000000000000, %rax # imm = 0x3FF8000000000000
movq %rax, 0x8(%rsp)
movq %rbp, %rdi
leaq 0x3418e(%rip), %rsi # 0x40375
movq %r13, %rdx
movq %rbx, %r8
callq 0xd6e7
cmpb $0x0, 0x10(%rsp)
jne 0xc251
movq %rbx, %rdi
callq 0x1c968
movq 0x18(%rsp), %rax
leaq 0x37171(%rip), %r8 # 0x4337e
testq %rax, %rax
je 0xc215
movq (%rax), %r8
movq %r14, %rdi
movl $0x1, %esi
leaq 0x33f20(%rip), %rdx # 0x40144
movl $0x71, %ecx
callq 0x18b88
movq %r14, %rdi
movq %rbx, %rsi
callq 0x1651e
movq %r14, %rdi
callq 0x18bf4
movq 0x8(%rsp), %rdi
testq %rdi, %rdi
je 0xc251
movq (%rdi), %rax
callq *0x8(%rax)
movq 0x18(%rsp), %rsi
testq %rsi, %rsi
je 0xc265
leaq 0x18(%rsp), %rdi
callq 0xdb84
leaq 0x30(%r15), %rcx
movabsq $0x3ff8000000000000, %rax # imm = 0x3FF8000000000000
movq %rax, 0x8(%rsp)
movq %rbp, %rdi
leaq 0x34111(%rip), %rsi # 0x40393
movq %r13, %rdx
movq %rbx, %r8
callq 0xd6e7
cmpb $0x0, 0x10(%rsp)
jne 0xc2ec
movq %rbx, %rdi
callq 0x1c968
movq 0x18(%rsp), %rax
leaq 0x370d6(%rip), %r8 # 0x4337e
testq %rax, %rax
je 0xc2b0
movq (%rax), %r8
movq %r14, %rdi
movl $0x1, %esi
leaq 0x33e85(%rip), %rdx # 0x40144
movl $0x72, %ecx
callq 0x18b88
movq %r14, %rdi
movq %rbx, %rsi
callq 0x1651e
movq %r14, %rdi
callq 0x18bf4
movq 0x8(%rsp), %rdi
testq %rdi, %rdi
je 0xc2ec
movq (%rdi), %rax
callq *0x8(%rax)
movq 0x18(%rsp), %rsi
testq %rsi, %rsi
je 0xc300
leaq 0x18(%rsp), %rdi
callq 0xdb84
addq $0x70, %r15
cmpq %r12, %r15
jne 0xc1ca
movq 0x28(%rsp), %r15
testq %r15, %r15
je 0xc327
movq 0x38(%rsp), %rsi
subq %r15, %rsi
movq %r15, %rdi
callq 0x84e0
addq $0xc8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0xc344
jmp 0xc349
jmp 0xc33f
movq %rax, %rbx
jmp 0xc356
movq %rax, %rbx
jmp 0xc366
movq %rax, %rbx
leaq 0x20(%rsp), %rdi
callq 0x18bf4
movq 0x8(%rsp), %rdi
testq %rdi, %rdi
je 0xc366
movq (%rdi), %rax
callq *0x8(%rax)
movq 0x18(%rsp), %rsi
testq %rsi, %rsi
je 0xc381
leaq 0x18(%rsp), %rdi
callq 0xdb84
jmp 0xc381
jmp 0xc37e
movq %rax, %rbx
movq 0x28(%rsp), %rdi
testq %rdi, %rdi
je 0xc398
movq 0x38(%rsp), %rsi
subq %rdi, %rsi
callq 0x84e0
movq %rbx, %rdi
callq 0x8990
| _ZN40FindPeaksCppTest_ThresholdFiltering_Test8TestBodyEv:
push rbp; int
push r15; int
push r14; int
push r13; int
push r12; int
push rbx; int
sub rsp, 0C8h
lea rsi, [rdi+10h]; int
movaps xmm0, cs:xmmword_40010
lea rdx, [rsp+0F8h+var_B8]; int
movups xmmword ptr [rdx+8], xmm0
movaps xmm1, cs:xmmword_40030
movups xmmword ptr [rdx+20h], xmm1
mov qword ptr [rdx+30h], 1
movups xmmword ptr [rdx+40h], xmm0
movups xmmword ptr [rdx+58h], xmm0
xor eax, eax
mov [rdx+68h], rax
mov rcx, 3FE0000000000000h; int
mov [rdx+70h], rcx
mov [rdx+78h], rax
mov qword ptr [rdx+80h], 0FFFFFFFFFFFFFFFFh
lea rbx, [rsp+0F8h+var_D0]
mov rdi, rbx; int
call _ZN9findPeaks10find_peaksERKSt6vectorIdSaIdEENS_14PeakConditionsE; findPeaks::find_peaks(std::vector<double> const&,findPeaks::PeakConditions)
mov r15, [rbx]
mov r12, [rbx+8]
cmp r15, r12
jz loc_C312
lea r13, a15; "1.5"
lea rbp, [rsp+0F8h+var_E8]
lea rbx, [rsp+0F8h+var_F0]
lea r14, [rsp+0F8h+var_D8]
loc_C1CA:
lea rcx, [r15+28h]
mov rax, 3FF8000000000000h
mov [rsp+0F8h+var_F0], rax
mov rdi, rbp; this
lea rsi, aPeakThresholdL; "peak.threshold.left_threshold"
mov rdx, r13
mov r8, rbx
call _ZN7testing8internal11CmpHelperGEIddEENS_15AssertionResultEPKcS4_RKT_RKT0_; testing::internal::CmpHelperGE<double,double>(char const*,char const*,double const&,double const&)
cmp [rsp+0F8h+var_E8], 0
jnz short loc_C251
mov rdi, rbx; this
call _ZN7testing7MessageC2Ev; testing::Message::Message(void)
mov rax, [rsp+0F8h+var_E0]
lea r8, aSFromSSMsTotal+1Ah; ""
test rax, rax
jz short loc_C215
mov r8, [rax]
loc_C215:
mov rdi, r14
mov esi, 1
lea rdx, aWorkspaceLlm4b; "/workspace/llm4binary/github/2025_star3"...
mov ecx, 71h ; 'q'
call _ZN7testing8internal12AssertHelperC2ENS_14TestPartResult4TypeEPKciS5_; testing::internal::AssertHelper::AssertHelper(testing::TestPartResult::Type,char const*,int,char const*)
mov rdi, r14
mov rsi, rbx
call _ZNK7testing8internal12AssertHelperaSERKNS_7MessageE; testing::internal::AssertHelper::operator=(testing::Message const&)
mov rdi, r14; this
call _ZN7testing8internal12AssertHelperD2Ev; testing::internal::AssertHelper::~AssertHelper()
mov rdi, [rsp+0F8h+var_F0]
test rdi, rdi
jz short loc_C251
mov rax, [rdi]
call qword ptr [rax+8]
loc_C251:
mov rsi, [rsp+0F8h+var_E0]
test rsi, rsi
jz short loc_C265
lea rdi, [rsp+0F8h+var_E0]
call _ZNKSt14default_deleteINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEclEPS5_; std::default_delete<std::string>::operator()(std::string*)
loc_C265:
lea rcx, [r15+30h]
mov rax, 3FF8000000000000h
mov [rsp+0F8h+var_F0], rax
mov rdi, rbp; this
lea rsi, aPeakThresholdR; "peak.threshold.right_threshold"
mov rdx, r13
mov r8, rbx
call _ZN7testing8internal11CmpHelperGEIddEENS_15AssertionResultEPKcS4_RKT_RKT0_; testing::internal::CmpHelperGE<double,double>(char const*,char const*,double const&,double const&)
cmp [rsp+0F8h+var_E8], 0
jnz short loc_C2EC
mov rdi, rbx; this
call _ZN7testing7MessageC2Ev; testing::Message::Message(void)
mov rax, [rsp+0F8h+var_E0]
lea r8, aSFromSSMsTotal+1Ah; ""
test rax, rax
jz short loc_C2B0
mov r8, [rax]
loc_C2B0:
mov rdi, r14
mov esi, 1
lea rdx, aWorkspaceLlm4b; "/workspace/llm4binary/github/2025_star3"...
mov ecx, 72h ; 'r'
call _ZN7testing8internal12AssertHelperC2ENS_14TestPartResult4TypeEPKciS5_; testing::internal::AssertHelper::AssertHelper(testing::TestPartResult::Type,char const*,int,char const*)
mov rdi, r14
mov rsi, rbx
call _ZNK7testing8internal12AssertHelperaSERKNS_7MessageE; testing::internal::AssertHelper::operator=(testing::Message const&)
mov rdi, r14; this
call _ZN7testing8internal12AssertHelperD2Ev; testing::internal::AssertHelper::~AssertHelper()
mov rdi, [rsp+0F8h+var_F0]
test rdi, rdi
jz short loc_C2EC
mov rax, [rdi]
call qword ptr [rax+8]
loc_C2EC:
mov rsi, [rsp+0F8h+var_E0]
test rsi, rsi
jz short loc_C300
lea rdi, [rsp+0F8h+var_E0]
call _ZNKSt14default_deleteINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEclEPS5_; std::default_delete<std::string>::operator()(std::string*)
loc_C300:
add r15, 70h ; 'p'
cmp r15, r12
jnz loc_C1CA
mov r15, qword ptr [rsp+0F8h+var_D0]
loc_C312:
test r15, r15
jz short loc_C327
mov rsi, [rsp+0F8h+var_C0]
sub rsi, r15; unsigned __int64
mov rdi, r15; void *
call __ZdlPvm; operator delete(void *,ulong)
loc_C327:
add rsp, 0C8h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
jmp short loc_C344
jmp short loc_C349
jmp short $+2
loc_C33F:
mov rbx, rax
jmp short loc_C356
loc_C344:
mov rbx, rax
jmp short loc_C366
loc_C349:
mov rbx, rax
lea rdi, [rsp+arg_18]; this
call _ZN7testing8internal12AssertHelperD2Ev; testing::internal::AssertHelper::~AssertHelper()
loc_C356:
mov rdi, [rsp+arg_0]
test rdi, rdi
jz short loc_C366
mov rax, [rdi]
call qword ptr [rax+8]
loc_C366:
mov rsi, [rsp+arg_10]
test rsi, rsi
jz short loc_C381
lea rdi, [rsp+arg_10]
call _ZNKSt14default_deleteINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEclEPS5_; std::default_delete<std::string>::operator()(std::string*)
jmp short loc_C381
jmp short $+2
loc_C37E:
mov rbx, rax
loc_C381:
mov rdi, [rsp+arg_20]; void *
test rdi, rdi
jz short loc_C398
mov rsi, [rsp+arg_30]
sub rsi, rdi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_C398:
mov rdi, rbx
call __Unwind_Resume
| TestBody:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0xc8
LEA RSI,[RDI + 0x10]
MOVAPS XMM0,xmmword ptr [0x00140010]
LEA RDX,[RSP + 0x40]
MOVUPS xmmword ptr [RDX + 0x8],XMM0
MOVAPS XMM1,xmmword ptr [0x00140030]
MOVUPS xmmword ptr [RDX + 0x20],XMM1
MOV qword ptr [RDX + 0x30],0x1
MOVUPS xmmword ptr [RDX + 0x40],XMM0
MOVUPS xmmword ptr [RDX + 0x58],XMM0
XOR EAX,EAX
MOV qword ptr [RDX + 0x68],RAX
MOV RCX,0x3fe0000000000000
MOV qword ptr [RDX + 0x70],RCX
MOV qword ptr [RDX + 0x78],RAX
MOV qword ptr [RDX + 0x80],-0x1
LEA RBX,[RSP + 0x28]
MOV RDI,RBX
CALL 0x0013d274
MOV R15,qword ptr [RBX]
MOV R12,qword ptr [RBX + 0x8]
CMP R15,R12
JZ 0x0010c312
LEA R13,[0x1402fc]
LEA RBP,[RSP + 0x10]
LEA RBX,[RSP + 0x8]
LEA R14,[RSP + 0x20]
LAB_0010c1ca:
LEA RCX,[R15 + 0x28]
MOV RAX,0x3ff8000000000000
MOV qword ptr [RSP + 0x8],RAX
LAB_0010c1dd:
MOV RDI,RBP
LEA RSI,[0x140375]
MOV RDX,R13
MOV R8,RBX
CALL 0x0010d6e7
CMP byte ptr [RSP + 0x10],0x0
JNZ 0x0010c251
LAB_0010c1f9:
MOV RDI,RBX
CALL 0x0011c968
MOV RAX,qword ptr [RSP + 0x18]
LEA R8,[0x14337e]
TEST RAX,RAX
JZ 0x0010c215
MOV R8,qword ptr [RAX]
LAB_0010c215:
MOV RDI,R14
MOV ESI,0x1
LEA RDX,[0x140144]
MOV ECX,0x71
CALL 0x00118b88
LAB_0010c22e:
MOV RDI,R14
MOV RSI,RBX
CALL 0x0011651e
LAB_0010c239:
MOV RDI,R14
CALL 0x00118bf4
MOV RDI,qword ptr [RSP + 0x8]
TEST RDI,RDI
JZ 0x0010c251
MOV RAX,qword ptr [RDI]
CALL qword ptr [RAX + 0x8]
LAB_0010c251:
MOV RSI,qword ptr [RSP + 0x18]
TEST RSI,RSI
JZ 0x0010c265
LEA RDI,[RSP + 0x18]
CALL 0x0010db84
LAB_0010c265:
LEA RCX,[R15 + 0x30]
MOV RAX,0x3ff8000000000000
MOV qword ptr [RSP + 0x8],RAX
LAB_0010c278:
MOV RDI,RBP
LEA RSI,[0x140393]
MOV RDX,R13
MOV R8,RBX
CALL 0x0010d6e7
CMP byte ptr [RSP + 0x10],0x0
JNZ 0x0010c2ec
LAB_0010c294:
MOV RDI,RBX
CALL 0x0011c968
MOV RAX,qword ptr [RSP + 0x18]
LEA R8,[0x14337e]
TEST RAX,RAX
JZ 0x0010c2b0
MOV R8,qword ptr [RAX]
LAB_0010c2b0:
MOV RDI,R14
MOV ESI,0x1
LEA RDX,[0x140144]
MOV ECX,0x72
CALL 0x00118b88
LAB_0010c2c9:
MOV RDI,R14
MOV RSI,RBX
CALL 0x0011651e
LAB_0010c2d4:
MOV RDI,R14
CALL 0x00118bf4
MOV RDI,qword ptr [RSP + 0x8]
TEST RDI,RDI
JZ 0x0010c2ec
MOV RAX,qword ptr [RDI]
CALL qword ptr [RAX + 0x8]
LAB_0010c2ec:
MOV RSI,qword ptr [RSP + 0x18]
TEST RSI,RSI
JZ 0x0010c300
LEA RDI,[RSP + 0x18]
CALL 0x0010db84
LAB_0010c300:
ADD R15,0x70
CMP R15,R12
JNZ 0x0010c1ca
MOV R15,qword ptr [RSP + 0x28]
LAB_0010c312:
TEST R15,R15
JZ 0x0010c327
MOV RSI,qword ptr [RSP + 0x38]
SUB RSI,R15
MOV RDI,R15
CALL 0x001084e0
LAB_0010c327:
ADD RSP,0xc8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
/* FindPeaksCppTest_ThresholdFiltering_Test::TestBody() */
void __thiscall
FindPeaksCppTest_ThresholdFiltering_Test::TestBody(FindPeaksCppTest_ThresholdFiltering_Test *this)
{
char *pcVar1;
void *pvVar2;
long *local_f0;
internal local_e8 [8];
string *local_e0;
AssertHelper local_d8 [8];
void *local_d0;
void *local_c8;
long local_c0;
int4 local_b0;
int4 uStack_ac;
int4 uStack_a8;
int4 uStack_a4;
int4 local_98;
int4 uStack_94;
int4 uStack_90;
int4 uStack_8c;
int8 local_88;
int4 local_78;
int4 uStack_74;
int4 uStack_70;
int4 uStack_6c;
int4 local_60;
int4 uStack_5c;
int4 uStack_58;
int4 uStack_54;
int8 local_50;
int8 local_48;
int8 local_40;
int8 local_38;
local_b0 = _DAT_00140010;
uStack_ac = _UNK_00140014;
uStack_a8 = _UNK_00140018;
uStack_a4 = _UNK_0014001c;
local_98 = _DAT_00140030;
uStack_94 = _UNK_00140034;
uStack_90 = _UNK_00140038;
uStack_8c = _UNK_0014003c;
local_88 = 1;
local_78 = _DAT_00140010;
uStack_74 = _UNK_00140014;
uStack_70 = _UNK_00140018;
uStack_6c = _UNK_0014001c;
local_60 = _DAT_00140010;
uStack_5c = _UNK_00140014;
uStack_58 = _UNK_00140018;
uStack_54 = _UNK_0014001c;
local_50 = 0;
local_48 = 0x3fe0000000000000;
local_40 = 0;
local_38 = 0xffffffffffffffff;
findPeaks::find_peaks((findPeaks *)&local_d0,this + 0x10);
if (local_d0 != local_c8) {
pvVar2 = local_d0;
do {
local_f0 = (long *)&DAT_3ff8000000000000;
/* try { // try from 0010c1dd to 0010c1f1 has its CatchHandler @ 0010c37c */
testing::internal::CmpHelperGE<double,double>
(local_e8,"peak.threshold.left_threshold","1.5",(double *)((long)pvVar2 + 0x28),
(double *)&local_f0);
if (local_e8[0] == (internal)0x0) {
/* try { // try from 0010c1f9 to 0010c200 has its CatchHandler @ 0010c339 */
testing::Message::Message((Message *)&local_f0);
pcVar1 = "";
if (local_e0 != (string *)0x0) {
pcVar1 = *(char **)local_e0;
}
/* try { // try from 0010c215 to 0010c22d has its CatchHandler @ 0010c33f */
testing::internal::AssertHelper::AssertHelper
(local_d8,1,
"/workspace/llm4binary/github/2025_star3/giladroyz[P]FindPeaks/tests/test_find_peaks_cpp.cpp"
,0x71,pcVar1);
/* try { // try from 0010c22e to 0010c238 has its CatchHandler @ 0010c33b */
testing::internal::AssertHelper::operator=(local_d8,(Message *)&local_f0);
testing::internal::AssertHelper::~AssertHelper(local_d8);
if (local_f0 != (long *)0x0) {
(**(code **)(*local_f0 + 8))();
}
}
if (local_e0 != (string *)0x0) {
std::default_delete<std::__cxx11::string>::operator()
((default_delete<std::__cxx11::string> *)&local_e0,local_e0);
}
local_f0 = (long *)&DAT_3ff8000000000000;
/* try { // try from 0010c278 to 0010c28c has its CatchHandler @ 0010c37e */
testing::internal::CmpHelperGE<double,double>
(local_e8,"peak.threshold.right_threshold","1.5",(double *)((long)pvVar2 + 0x30),
(double *)&local_f0);
if (local_e8[0] == (internal)0x0) {
/* try { // try from 0010c294 to 0010c29b has its CatchHandler @ 0010c344 */
testing::Message::Message((Message *)&local_f0);
pcVar1 = "";
if (local_e0 != (string *)0x0) {
pcVar1 = *(char **)local_e0;
}
/* try { // try from 0010c2b0 to 0010c2c8 has its CatchHandler @ 0010c33d */
testing::internal::AssertHelper::AssertHelper
(local_d8,1,
"/workspace/llm4binary/github/2025_star3/giladroyz[P]FindPeaks/tests/test_find_peaks_cpp.cpp"
,0x72,pcVar1);
/* try { // try from 0010c2c9 to 0010c2d3 has its CatchHandler @ 0010c349 */
testing::internal::AssertHelper::operator=(local_d8,(Message *)&local_f0);
testing::internal::AssertHelper::~AssertHelper(local_d8);
if (local_f0 != (long *)0x0) {
(**(code **)(*local_f0 + 8))();
}
}
if (local_e0 != (string *)0x0) {
std::default_delete<std::__cxx11::string>::operator()
((default_delete<std::__cxx11::string> *)&local_e0,local_e0);
}
pvVar2 = (void *)((long)pvVar2 + 0x70);
} while (pvVar2 != local_c8);
}
if (local_d0 != (void *)0x0) {
operator_delete(local_d0,local_c0 - (long)local_d0);
}
return;
}
|
||
6,328 | fill_quick_table | eloqsql/storage/myisam/mi_packrec.c | static void fill_quick_table(uint16 *table, uint bits, uint max_bits,
uint value)
{
uint16 *end;
DBUG_ENTER("fill_quick_table");
/*
Bits 1..8 of value represent the decoded byte value.
Bits 9..14 become the length of the Huffman code for this byte value.
Bit 16 flags a valid code (IS_CHAR).
*/
value|= (max_bits - bits) << 8 | IS_CHAR;
for (end= table + ((my_ptrdiff_t) 1 << bits); table < end; table++)
{
*table= (uint16) value;
}
DBUG_VOID_RETURN;
} | O0 | c | fill_quick_table:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movl %edx, -0x10(%rbp)
movl %ecx, -0x14(%rbp)
movl -0x10(%rbp), %eax
subl -0xc(%rbp), %eax
shll $0x8, %eax
orl $0x8000, %eax # imm = 0x8000
orl -0x14(%rbp), %eax
movl %eax, -0x14(%rbp)
movq -0x8(%rbp), %rax
movl -0xc(%rbp), %ecx
movl $0x1, %edx
shlq %cl, %rdx
movq %rdx, %rcx
shlq %rcx
addq %rcx, %rax
movq %rax, -0x20(%rbp)
movq -0x8(%rbp), %rax
cmpq -0x20(%rbp), %rax
jae 0x42716
movl -0x14(%rbp), %eax
movw %ax, %cx
movq -0x8(%rbp), %rax
movw %cx, (%rax)
movq -0x8(%rbp), %rax
addq $0x2, %rax
movq %rax, -0x8(%rbp)
jmp 0x426f1
jmp 0x42718
jmp 0x4271a
popq %rbp
retq
nopl (%rax)
| fill_quick_table:
push rbp
mov rbp, rsp
mov [rbp+var_8], rdi
mov [rbp+var_C], esi
mov [rbp+var_10], edx
mov [rbp+var_14], ecx
mov eax, [rbp+var_10]
sub eax, [rbp+var_C]
shl eax, 8
or eax, 8000h
or eax, [rbp+var_14]
mov [rbp+var_14], eax
mov rax, [rbp+var_8]
mov ecx, [rbp+var_C]
mov edx, 1
shl rdx, cl
mov rcx, rdx
shl rcx, 1
add rax, rcx
mov [rbp+var_20], rax
loc_426F1:
mov rax, [rbp+var_8]
cmp rax, [rbp+var_20]
jnb short loc_42716
mov eax, [rbp+var_14]
mov cx, ax
mov rax, [rbp+var_8]
mov [rax], cx
mov rax, [rbp+var_8]
add rax, 2
mov [rbp+var_8], rax
jmp short loc_426F1
loc_42716:
jmp short $+2
loc_42718:
jmp short $+2
loc_4271A:
pop rbp
retn
| _WORD * fill_quick_table(_WORD *a1, __int16 a2, __int16 a3, __int16 a4)
{
_WORD *result; // rax
_WORD *i; // [rsp+18h] [rbp-8h]
for ( i = a1; ; ++i )
{
result = i;
if ( i >= &a1[1LL << a2] )
break;
*i = a4 | ((a3 - a2) << 8) | 0x8000;
}
return result;
}
| fill_quick_table:
PUSH RBP
MOV RBP,RSP
MOV qword ptr [RBP + -0x8],RDI
MOV dword ptr [RBP + -0xc],ESI
MOV dword ptr [RBP + -0x10],EDX
MOV dword ptr [RBP + -0x14],ECX
MOV EAX,dword ptr [RBP + -0x10]
SUB EAX,dword ptr [RBP + -0xc]
SHL EAX,0x8
OR EAX,0x8000
OR EAX,dword ptr [RBP + -0x14]
MOV dword ptr [RBP + -0x14],EAX
MOV RAX,qword ptr [RBP + -0x8]
MOV ECX,dword ptr [RBP + -0xc]
MOV EDX,0x1
SHL RDX,CL
MOV RCX,RDX
SHL RCX,0x1
ADD RAX,RCX
MOV qword ptr [RBP + -0x20],RAX
LAB_001426f1:
MOV RAX,qword ptr [RBP + -0x8]
CMP RAX,qword ptr [RBP + -0x20]
JNC 0x00142716
MOV EAX,dword ptr [RBP + -0x14]
MOV CX,AX
MOV RAX,qword ptr [RBP + -0x8]
MOV word ptr [RAX],CX
MOV RAX,qword ptr [RBP + -0x8]
ADD RAX,0x2
MOV qword ptr [RBP + -0x8],RAX
JMP 0x001426f1
LAB_00142716:
JMP 0x00142718
LAB_00142718:
JMP 0x0014271a
LAB_0014271a:
POP RBP
RET
|
void fill_quick_table(ushort *param_1,short param_2,short param_3,ushort param_4)
{
ushort *local_10;
for (local_10 = param_1; local_10 < param_1 + (1L << ((byte)param_2 & 0x3f));
local_10 = local_10 + 1) {
*local_10 = (param_3 - param_2) * 0x100 | 0x8000U | param_4;
}
return;
}
|
|
6,329 | try_draft(std::unordered_map<common_ngram, std::unordered_map<int, int, std::hash<int>, std::equal_to<int>, std::allocator<std::pair<int const, int>>>, common_ngram_hash_function, std::equal_to<common_ngram>, std::allocator<std::pair<common_ngram const, std::unordered_map<int, int, std::hash<int>, std::equal_to<int>, std::allocator<std::pair<int const, int>>>>>>&, std::vector<common_ngram, std::allocator<common_ngram>> const&, std::unordered_map<int, int, std::hash<int>, std::equal_to<int>, std::allocator<std::pair<int const, int>>>&, int const*, int const*) | monkey531[P]llama/common/ngram-cache.cpp | static llama_token try_draft(
common_ngram_cache & nc_primary, const std::vector<common_ngram> & ngrams_primary, common_ngram_cache_part & part_static,
const int * min_sample_size, const int * min_percent) {
llama_token drafted_token = LLAMA_TOKEN_NULL;
for (int i = ngrams_primary.size()-1; i >= 0 && drafted_token == LLAMA_TOKEN_NULL; --i) {
const common_ngram ngram_primary = ngrams_primary[i];
common_ngram_cache::iterator part_primary_it = nc_primary.find(ngram_primary);
if (part_primary_it == nc_primary.end()) {
continue;
}
const common_ngram_cache_part part_primary = part_primary_it->second;
int max_count_primary = 0;
int max_count_static = 0;
int sum_count_primary = 0;
llama_token max_token = LLAMA_TOKEN_NULL;
for (std::pair<llama_token, int> token_count_primary : part_primary) {
const llama_token token = token_count_primary.first;
common_ngram_cache_part::iterator token_count_static_it = part_static.find(token);
const int32_t count_primary = token_count_primary.second;
const int32_t count_static = token_count_static_it != part_static.end() ? 100*token_count_static_it->second : 1;
if (count_primary*count_static > max_count_primary*max_count_static) {
max_token = token;
max_count_primary = count_primary;
max_count_static = count_static;
}
sum_count_primary += count_primary;
}
if (sum_count_primary < min_sample_size[i]) {
continue;
}
if (100*max_count_primary < min_percent[i]*sum_count_primary) {
continue;;
}
drafted_token = max_token;
}
return drafted_token;
} | O3 | cpp | try_draft(std::unordered_map<common_ngram, std::unordered_map<int, int, std::hash<int>, std::equal_to<int>, std::allocator<std::pair<int const, int>>>, common_ngram_hash_function, std::equal_to<common_ngram>, std::allocator<std::pair<common_ngram const, std::unordered_map<int, int, std::hash<int>, std::equal_to<int>, std::allocator<std::pair<int const, int>>>>>>&, std::vector<common_ngram, std::allocator<common_ngram>> const&, std::unordered_map<int, int, std::hash<int>, std::equal_to<int>, std::allocator<std::pair<int const, int>>>&, int const*, int const*):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x88, %rsp
movq %r8, 0x8(%rsp)
movq %rcx, 0x20(%rsp)
movq %rdx, 0x30(%rsp)
movq 0x8(%rsi), %rax
subq (%rsi), %rax
shrq $0x4, %rax
decl %eax
js 0xcdddc
movq %rsi, %rbx
movq %rdi, %r15
movl %eax, %ebp
leaq 0x38(%rsp), %r14
movq %rsi, 0x18(%rsp)
movq %rdi, 0x10(%rsp)
movq (%rbx), %rax
movq %rbp, %rcx
shlq $0x4, %rcx
movups (%rax,%rcx), %xmm0
movaps %xmm0, 0x70(%rsp)
movq %r15, %rdi
leaq 0x70(%rsp), %rsi
callq 0xcea2c
movl $0xffffffff, %r12d # imm = 0xFFFFFFFF
testq %rax, %rax
je 0xcddc8
movq %rax, %rsi
addq $0x18, %rsi
xorl %r13d, %r13d
movq %r13, 0x38(%rsp)
movq 0x20(%rax), %rcx
movq %rcx, 0x40(%rsp)
movq %r13, 0x48(%rsp)
movq 0x30(%rax), %rcx
movq %rcx, 0x50(%rsp)
movups 0x38(%rax), %xmm0
leaq 0x58(%rsp), %rax
movups %xmm0, (%rax)
movq %r13, 0x68(%rsp)
movq %r14, (%rsp)
movq %r14, %rdi
movq %rsp, %rdx
callq 0xce8ea
movq 0x48(%rsp), %r12
movl $0xffffffff, %r14d # imm = 0xFFFFFFFF
movl $0x0, %eax
testq %r12, %r12
je 0xcdd91
movq %rbp, 0x28(%rsp)
xorl %r15d, %r15d
xorl %ebx, %ebx
xorl %r13d, %r13d
movl 0x8(%r12), %eax
movl 0xc(%r12), %ebp
movl %eax, (%rsp)
movq 0x30(%rsp), %rdi
movq %rsp, %rsi
callq 0xcf11c
testq %rax, %rax
je 0xcdd55
imull $0x64, 0xc(%rax), %eax
jmp 0xcdd5a
movl $0x1, %eax
movl %eax, %ecx
imull %ebp, %ecx
movl %r15d, %edx
imull %ebx, %edx
cmpl %edx, %ecx
jle 0xcdd72
movl (%rsp), %r14d
movl %eax, %ebx
movl %ebp, %r15d
addl %ebp, %r13d
movq (%r12), %r12
testq %r12, %r12
jne 0xcdd30
imull $0x64, %r15d, %eax
movq 0x18(%rsp), %rbx
movq 0x10(%rsp), %r15
movq 0x28(%rsp), %rbp
movq 0x20(%rsp), %rcx
cmpl (%rcx,%rbp,4), %r13d
movl $0xffffffff, %r12d # imm = 0xFFFFFFFF
jl 0xcddbb
movq 0x8(%rsp), %rcx
imull (%rcx,%rbp,4), %r13d
cmpl %r13d, %eax
movl $0xffffffff, %eax # imm = 0xFFFFFFFF
cmovll %eax, %r14d
movl %r14d, %r12d
leaq 0x38(%rsp), %r14
movq %r14, %rdi
callq 0x2272e
testq %rbp, %rbp
jle 0xcdde2
decq %rbp
cmpl $-0x1, %r12d
je 0xcdc99
jmp 0xcdde2
movl $0xffffffff, %r12d # imm = 0xFFFFFFFF
movl %r12d, %eax
addq $0x88, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq 0x38(%rsp), %rdi
callq 0x2272e
movq %rbx, %rdi
callq 0x1bf90
| _ZL9try_draftRSt13unordered_mapI12common_ngramS_IiiSt4hashIiESt8equal_toIiESaISt4pairIKiiEEE26common_ngram_hash_functionS3_IS0_ESaIS5_IKS0_S9_EEERKSt6vectorIS0_SaIS0_EERS9_PS6_SN_:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 88h
mov [rsp+0B8h+var_B0], r8
mov [rsp+0B8h+var_98], rcx
mov [rsp+0B8h+var_88], rdx
mov rax, [rsi+8]
sub rax, [rsi]
shr rax, 4
dec eax
js loc_CDDDC
mov rbx, rsi
mov r15, rdi
mov ebp, eax
lea r14, [rsp+0B8h+var_80]
mov [rsp+0B8h+var_A0], rsi
mov [rsp+0B8h+var_A8], rdi
loc_CDC99:
mov rax, [rbx]
mov rcx, rbp
shl rcx, 4
movups xmm0, xmmword ptr [rax+rcx]
movaps [rsp+0B8h+var_48], xmm0
mov rdi, r15
lea rsi, [rsp+0B8h+var_48]
call _ZNSt10_HashtableI12common_ngramSt4pairIKS0_St13unordered_mapIiiSt4hashIiESt8equal_toIiESaIS1_IKiiEEEESaISC_ENSt8__detail10_Select1stES6_IS0_E26common_ngram_hash_functionNSE_18_Mod_range_hashingENSE_20_Default_ranged_hashENSE_20_Prime_rehash_policyENSE_17_Hashtable_traitsILb1ELb0ELb1EEEE4findERS2_; std::_Hashtable<common_ngram,std::pair<common_ngram const,std::unordered_map<int,int>>,std::allocator<std::pair<common_ngram const,std::unordered_map<int,int>>>,std::__detail::_Select1st,std::equal_to<common_ngram>,common_ngram_hash_function,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,false,true>>::find(common_ngram const&)
mov r12d, 0FFFFFFFFh
test rax, rax
jz loc_CDDC8
mov rsi, rax
add rsi, 18h
xor r13d, r13d
mov [rsp+0B8h+var_80], r13
mov rcx, [rax+20h]
mov [rsp+0B8h+var_78], rcx
mov [rsp+0B8h+var_70], r13
mov rcx, [rax+30h]
mov [rsp+0B8h+var_68], rcx
movups xmm0, xmmword ptr [rax+38h]
lea rax, [rsp+0B8h+var_60]
movups xmmword ptr [rax], xmm0
mov [rsp+0B8h+var_50], r13
mov [rsp+0B8h+var_B8], r14
mov rdi, r14
mov rdx, rsp
call _ZNSt10_HashtableIiSt4pairIKiiESaIS2_ENSt8__detail10_Select1stESt8equal_toIiESt4hashIiENS4_18_Mod_range_hashingENS4_20_Default_ranged_hashENS4_20_Prime_rehash_policyENS4_17_Hashtable_traitsILb0ELb0ELb1EEEE9_M_assignIRKSF_NS4_10_AllocNodeISaINS4_10_Hash_nodeIS2_Lb0EEEEEEEEvOT_RKT0_; std::_Hashtable<int,std::pair<int const,int>,std::allocator<std::pair<int const,int>>,std::__detail::_Select1st,std::equal_to<int>,std::hash<int>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<false,false,true>>::_M_assign<std::_Hashtable<int,std::pair<int const,int>,std::allocator<std::pair<int const,int>>,std::__detail::_Select1st,std::equal_to<int>,std::hash<int>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<false,false,true>> const&,std::__detail::_AllocNode<std::allocator<std::__detail::_Hash_node<std::pair<int const,int>,false>>>>(std::_Hashtable<int,std::pair<int const,int>,std::allocator<std::pair<int const,int>>,std::__detail::_Select1st,std::equal_to<int>,std::hash<int>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<false,false,true>> const&,std::__detail::_AllocNode<std::allocator<std::__detail::_Hash_node<std::pair<int const,int>,false>>> const&)
mov r12, [rsp+0B8h+var_70]
mov r14d, 0FFFFFFFFh
mov eax, 0
test r12, r12
jz short loc_CDD91
mov [rsp+0B8h+var_90], rbp
xor r15d, r15d
xor ebx, ebx
xor r13d, r13d
loc_CDD30:
mov eax, [r12+8]
mov ebp, [r12+0Ch]
mov dword ptr [rsp+0B8h+var_B8], eax
mov rdi, [rsp+0B8h+var_88]
mov rsi, rsp
call _ZNSt10_HashtableIiSt4pairIKiiESaIS2_ENSt8__detail10_Select1stESt8equal_toIiESt4hashIiENS4_18_Mod_range_hashingENS4_20_Default_ranged_hashENS4_20_Prime_rehash_policyENS4_17_Hashtable_traitsILb0ELb0ELb1EEEE4findERS1_; std::_Hashtable<int,std::pair<int const,int>,std::allocator<std::pair<int const,int>>,std::__detail::_Select1st,std::equal_to<int>,std::hash<int>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<false,false,true>>::find(int const&)
test rax, rax
jz short loc_CDD55
imul eax, [rax+0Ch], 64h ; 'd'
jmp short loc_CDD5A
loc_CDD55:
mov eax, 1
loc_CDD5A:
mov ecx, eax
imul ecx, ebp
mov edx, r15d
imul edx, ebx
cmp ecx, edx
jle short loc_CDD72
mov r14d, dword ptr [rsp+0B8h+var_B8]
mov ebx, eax
mov r15d, ebp
loc_CDD72:
add r13d, ebp
mov r12, [r12]
test r12, r12
jnz short loc_CDD30
imul eax, r15d, 64h ; 'd'
mov rbx, [rsp+0B8h+var_A0]
mov r15, [rsp+0B8h+var_A8]
mov rbp, [rsp+0B8h+var_90]
loc_CDD91:
mov rcx, [rsp+0B8h+var_98]
cmp r13d, [rcx+rbp*4]
mov r12d, 0FFFFFFFFh
jl short loc_CDDBB
mov rcx, [rsp+0B8h+var_B0]
imul r13d, [rcx+rbp*4]
cmp eax, r13d
mov eax, 0FFFFFFFFh
cmovl r14d, eax
mov r12d, r14d
loc_CDDBB:
lea r14, [rsp+0B8h+var_80]
mov rdi, r14
call _ZNSt10_HashtableIiSt4pairIKiiESaIS2_ENSt8__detail10_Select1stESt8equal_toIiESt4hashIiENS4_18_Mod_range_hashingENS4_20_Default_ranged_hashENS4_20_Prime_rehash_policyENS4_17_Hashtable_traitsILb0ELb0ELb1EEEED2Ev; std::_Hashtable<int,std::pair<int const,int>,std::allocator<std::pair<int const,int>>,std::__detail::_Select1st,std::equal_to<int>,std::hash<int>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<false,false,true>>::~_Hashtable()
loc_CDDC8:
test rbp, rbp
jle short loc_CDDE2
dec rbp
cmp r12d, 0FFFFFFFFh
jz loc_CDC99
jmp short loc_CDDE2
loc_CDDDC:
mov r12d, 0FFFFFFFFh
loc_CDDE2:
mov eax, r12d
add rsp, 88h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
mov rbx, rax
lea rdi, [rsp+arg_30]
call _ZNSt10_HashtableIiSt4pairIKiiESaIS2_ENSt8__detail10_Select1stESt8equal_toIiESt4hashIiENS4_18_Mod_range_hashingENS4_20_Default_ranged_hashENS4_20_Prime_rehash_policyENS4_17_Hashtable_traitsILb0ELb0ELb1EEEED2Ev; std::_Hashtable<int,std::pair<int const,int>,std::allocator<std::pair<int const,int>>,std::__detail::_Select1st,std::equal_to<int>,std::hash<int>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<false,false,true>>::~_Hashtable()
mov rdi, rbx
call __Unwind_Resume
| long long try_draft(long long a1, _QWORD *a2, long long a3, long long a4, long long a5)
{
int v5; // eax
_QWORD *v6; // rbx
long long v7; // r15
long long v8; // rbp
long long v9; // rax
unsigned int v10; // r12d
int v11; // r13d
long long *v12; // r12
int v13; // r14d
int v14; // eax
int v15; // r15d
int v16; // ebx
int v17; // ebp
long long v18; // rax
int v19; // eax
_QWORD *v21; // [rsp+0h] [rbp-B8h] BYREF
long long v22; // [rsp+8h] [rbp-B0h]
long long v23; // [rsp+10h] [rbp-A8h]
_QWORD *v24; // [rsp+18h] [rbp-A0h]
long long v25; // [rsp+20h] [rbp-98h]
long long v26; // [rsp+28h] [rbp-90h]
long long v27; // [rsp+30h] [rbp-88h]
_QWORD v28[2]; // [rsp+38h] [rbp-80h] BYREF
long long *v29; // [rsp+48h] [rbp-70h]
long long v30; // [rsp+50h] [rbp-68h]
__int128 v31; // [rsp+58h] [rbp-60h]
long long v32; // [rsp+68h] [rbp-50h]
_OWORD v33[4]; // [rsp+70h] [rbp-48h] BYREF
v22 = a5;
v25 = a4;
v27 = a3;
v5 = ((a2[1] - *a2) >> 4) - 1;
if ( v5 < 0 )
{
return (unsigned int)-1;
}
else
{
v6 = a2;
v7 = a1;
v8 = (unsigned int)v5;
v24 = a2;
v23 = a1;
do
{
v33[0] = *(_OWORD *)(*v6 + 16 * v8);
v9 = std::_Hashtable<common_ngram,std::pair<common_ngram const,std::unordered_map<int,int>>,std::allocator<std::pair<common_ngram const,std::unordered_map<int,int>>>,std::__detail::_Select1st,std::equal_to<common_ngram>,common_ngram_hash_function,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,false,true>>::find(
v7,
v33,
a3,
16 * v8);
v10 = -1;
if ( v9 )
{
v11 = 0;
v28[0] = 0LL;
v28[1] = *(_QWORD *)(v9 + 32);
v29 = 0LL;
v30 = *(_QWORD *)(v9 + 48);
v31 = *(_OWORD *)(v9 + 56);
v32 = 0LL;
v21 = v28;
std::_Hashtable<int,std::pair<int const,int>,std::allocator<std::pair<int const,int>>,std::__detail::_Select1st,std::equal_to<int>,std::hash<int>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<false,false,true>>::_M_assign<std::_Hashtable<int,std::pair<int const,int>,std::allocator<std::pair<int const,int>>,std::__detail::_Select1st,std::equal_to<int>,std::hash<int>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<false,false,true>> const&,std::__detail::_AllocNode<std::allocator<std::__detail::_Hash_node<std::pair<int const,int>,false>>>>(
v28,
v9 + 24,
&v21);
v12 = v29;
v13 = -1;
v14 = 0;
if ( v29 )
{
v26 = v8;
v15 = 0;
v16 = 0;
v11 = 0;
do
{
v17 = *((_DWORD *)v12 + 3);
LODWORD(v21) = *((_DWORD *)v12 + 2);
v18 = std::_Hashtable<int,std::pair<int const,int>,std::allocator<std::pair<int const,int>>,std::__detail::_Select1st,std::equal_to<int>,std::hash<int>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<false,false,true>>::find(
v27,
&v21);
if ( v18 )
v19 = 100 * *(_DWORD *)(v18 + 12);
else
v19 = 1;
if ( v17 * v19 > v16 * v15 )
{
v13 = (int)v21;
v16 = v19;
v15 = v17;
}
v11 += v17;
v12 = (long long *)*v12;
}
while ( v12 );
v14 = 100 * v15;
v6 = v24;
v7 = v23;
v8 = v26;
}
v10 = -1;
if ( v11 >= *(_DWORD *)(v25 + 4 * v8) )
{
if ( v14 < *(_DWORD *)(v22 + 4 * v8) * v11 )
v13 = -1;
v10 = v13;
}
std::_Hashtable<int,std::pair<int const,int>,std::allocator<std::pair<int const,int>>,std::__detail::_Select1st,std::equal_to<int>,std::hash<int>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<false,false,true>>::~_Hashtable((long long)v28);
}
if ( v8 <= 0 )
break;
--v8;
}
while ( v10 == -1 );
}
return v10;
}
| try_draft:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x88
MOV qword ptr [RSP + 0x8],R8
MOV qword ptr [RSP + 0x20],RCX
MOV qword ptr [RSP + 0x30],RDX
MOV RAX,qword ptr [RSI + 0x8]
SUB RAX,qword ptr [RSI]
SHR RAX,0x4
DEC EAX
JS 0x001cdddc
MOV RBX,RSI
MOV R15,RDI
MOV EBP,EAX
LEA R14,[RSP + 0x38]
MOV qword ptr [RSP + 0x18],RSI
MOV qword ptr [RSP + 0x10],RDI
LAB_001cdc99:
MOV RAX,qword ptr [RBX]
MOV RCX,RBP
SHL RCX,0x4
MOVUPS XMM0,xmmword ptr [RAX + RCX*0x1]
MOVAPS xmmword ptr [RSP + 0x70],XMM0
MOV RDI,R15
LEA RSI,[RSP + 0x70]
CALL 0x001cea2c
MOV R12D,0xffffffff
TEST RAX,RAX
JZ 0x001cddc8
MOV RSI,RAX
ADD RSI,0x18
XOR R13D,R13D
MOV qword ptr [RSP + 0x38],R13
MOV RCX,qword ptr [RAX + 0x20]
MOV qword ptr [RSP + 0x40],RCX
MOV qword ptr [RSP + 0x48],R13
MOV RCX,qword ptr [RAX + 0x30]
MOV qword ptr [RSP + 0x50],RCX
MOVUPS XMM0,xmmword ptr [RAX + 0x38]
LEA RAX,[RSP + 0x58]
MOVUPS xmmword ptr [RAX],XMM0
MOV qword ptr [RSP + 0x68],R13
MOV qword ptr [RSP],R14
MOV RDI,R14
MOV RDX,RSP
CALL 0x001ce8ea
MOV R12,qword ptr [RSP + 0x48]
MOV R14D,0xffffffff
MOV EAX,0x0
TEST R12,R12
JZ 0x001cdd91
MOV qword ptr [RSP + 0x28],RBP
XOR R15D,R15D
XOR EBX,EBX
XOR R13D,R13D
LAB_001cdd30:
MOV EAX,dword ptr [R12 + 0x8]
MOV EBP,dword ptr [R12 + 0xc]
MOV dword ptr [RSP],EAX
LAB_001cdd3d:
MOV RDI,qword ptr [RSP + 0x30]
MOV RSI,RSP
CALL 0x001cf11c
LAB_001cdd4a:
TEST RAX,RAX
JZ 0x001cdd55
IMUL EAX,dword ptr [RAX + 0xc],0x64
JMP 0x001cdd5a
LAB_001cdd55:
MOV EAX,0x1
LAB_001cdd5a:
MOV ECX,EAX
IMUL ECX,EBP
MOV EDX,R15D
IMUL EDX,EBX
CMP ECX,EDX
JLE 0x001cdd72
MOV R14D,dword ptr [RSP]
MOV EBX,EAX
MOV R15D,EBP
LAB_001cdd72:
ADD R13D,EBP
MOV R12,qword ptr [R12]
TEST R12,R12
JNZ 0x001cdd30
IMUL EAX,R15D,0x64
MOV RBX,qword ptr [RSP + 0x18]
MOV R15,qword ptr [RSP + 0x10]
MOV RBP,qword ptr [RSP + 0x28]
LAB_001cdd91:
MOV RCX,qword ptr [RSP + 0x20]
CMP R13D,dword ptr [RCX + RBP*0x4]
MOV R12D,0xffffffff
JL 0x001cddbb
MOV RCX,qword ptr [RSP + 0x8]
IMUL R13D,dword ptr [RCX + RBP*0x4]
CMP EAX,R13D
MOV EAX,0xffffffff
CMOVL R14D,EAX
MOV R12D,R14D
LAB_001cddbb:
LEA R14,[RSP + 0x38]
MOV RDI,R14
CALL 0x0012272e
LAB_001cddc8:
TEST RBP,RBP
JLE 0x001cdde2
DEC RBP
CMP R12D,-0x1
JZ 0x001cdc99
JMP 0x001cdde2
LAB_001cdddc:
MOV R12D,0xffffffff
LAB_001cdde2:
MOV EAX,R12D
ADD RSP,0x88
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
/* try_draft(std::unordered_map<common_ngram, std::unordered_map<int, int, std::hash<int>,
std::equal_to<int>, std::allocator<std::pair<int const, int> > >, common_ngram_hash_function,
std::equal_to<common_ngram>, std::allocator<std::pair<common_ngram const, std::unordered_map<int,
int, std::hash<int>, std::equal_to<int>, std::allocator<std::pair<int const, int> > > > > >&,
std::vector<common_ngram, std::allocator<common_ngram> > const&, std::unordered_map<int, int,
std::hash<int>, std::equal_to<int>, std::allocator<std::pair<int const, int> > >&, int const*,
int const*) */
int try_draft(unordered_map *param_1,vector *param_2,unordered_map *param_3,int *param_4,
int *param_5)
{
int8 *puVar1;
int iVar2;
uint uVar3;
int iVar4;
int iVar5;
long lVar6;
int iVar7;
ulong uVar8;
long *plVar9;
int iVar10;
int iVar11;
_Hashtable *local_b8;
int *local_b0;
unordered_map *local_a8;
vector *local_a0;
int *local_98;
ulong local_90;
unordered_map *local_88;
int8 local_80;
int8 local_78;
long *local_70;
int8 local_68;
int8 local_60;
int8 uStack_58;
int8 local_50;
int8 local_48;
int8 uStack_40;
uVar3 = (int)((ulong)(*(long *)(param_2 + 8) - *(long *)param_2) >> 4) - 1;
if ((int)uVar3 < 0) {
iVar7 = -1;
}
else {
uVar8 = (ulong)uVar3;
local_b0 = param_5;
local_a8 = param_1;
local_a0 = param_2;
local_98 = param_4;
local_88 = param_3;
do {
puVar1 = (int8 *)(*(long *)param_2 + uVar8 * 0x10);
local_48 = *puVar1;
uStack_40 = puVar1[1];
lVar6 = std::
_Hashtable<common_ngram,std::pair<common_ngram_const,std::unordered_map<int,int,std::hash<int>,std::equal_to<int>,std::allocator<std::pair<int_const,int>>>>,std::allocator<std::pair<common_ngram_const,std::unordered_map<int,int,std::hash<int>,std::equal_to<int>,std::allocator<std::pair<int_const,int>>>>>,std::__detail::_Select1st,std::equal_to<common_ngram>,common_ngram_hash_function,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,false,true>>
::find((_Hashtable<common_ngram,std::pair<common_ngram_const,std::unordered_map<int,int,std::hash<int>,std::equal_to<int>,std::allocator<std::pair<int_const,int>>>>,std::allocator<std::pair<common_ngram_const,std::unordered_map<int,int,std::hash<int>,std::equal_to<int>,std::allocator<std::pair<int_const,int>>>>>,std::__detail::_Select1st,std::equal_to<common_ngram>,common_ngram_hash_function,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,false,true>>
*)param_1,(common_ngram *)&local_48);
iVar7 = -1;
if (lVar6 != 0) {
iVar10 = 0;
local_80 = 0;
local_78 = *(int8 *)(lVar6 + 0x20);
local_70 = (long *)0x0;
local_68 = *(int8 *)(lVar6 + 0x30);
local_60 = *(int8 *)(lVar6 + 0x38);
uStack_58 = *(int8 *)(lVar6 + 0x40);
local_50 = 0;
local_b8 = (_Hashtable *)&local_80;
std::
_Hashtable<int,std::pair<int_const,int>,std::allocator<std::pair<int_const,int>>,std::__detail::_Select1st,std::equal_to<int>,std::hash<int>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<false,false,true>>
::
_M_assign<std::_Hashtable<int,std::pair<int_const,int>,std::allocator<std::pair<int_const,int>>,std::__detail::_Select1st,std::equal_to<int>,std::hash<int>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<false,false,true>>const&,std::__detail::_AllocNode<std::allocator<std::__detail::_Hash_node<std::pair<int_const,int>,false>>>>
((_Hashtable *)&local_80,(_AllocNode *)(lVar6 + 0x18));
iVar11 = -1;
iVar5 = 0;
if (local_70 != (long *)0x0) {
iVar5 = 0;
iVar7 = 0;
iVar10 = 0;
plVar9 = local_70;
local_90 = uVar8;
do {
iVar2 = *(int *)((long)plVar9 + 0xc);
local_b8 = (_Hashtable *)CONCAT44(local_b8._4_4_,(int)plVar9[1]);
/* try { // try from 001cdd3d to 001cdd49 has its CatchHandler @ 001cddf7 */
lVar6 = std::
_Hashtable<int,std::pair<int_const,int>,std::allocator<std::pair<int_const,int>>,std::__detail::_Select1st,std::equal_to<int>,std::hash<int>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<false,false,true>>
::find((_Hashtable<int,std::pair<int_const,int>,std::allocator<std::pair<int_const,int>>,std::__detail::_Select1st,std::equal_to<int>,std::hash<int>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<false,false,true>>
*)local_88,(int *)&local_b8);
if (lVar6 == 0) {
iVar4 = 1;
}
else {
iVar4 = *(int *)(lVar6 + 0xc) * 100;
}
if (iVar5 * iVar7 < iVar4 * iVar2) {
iVar5 = iVar2;
iVar7 = iVar4;
iVar11 = (int)local_b8;
}
iVar10 = iVar10 + iVar2;
plVar9 = (long *)*plVar9;
} while (plVar9 != (long *)0x0);
iVar5 = iVar5 * 100;
param_2 = local_a0;
uVar8 = local_90;
param_1 = local_a8;
}
iVar7 = -1;
if ((local_98[uVar8] <= iVar10) && (iVar7 = iVar11, iVar5 < iVar10 * local_b0[uVar8])) {
iVar7 = -1;
}
std::
_Hashtable<int,std::pair<int_const,int>,std::allocator<std::pair<int_const,int>>,std::__detail::_Select1st,std::equal_to<int>,std::hash<int>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<false,false,true>>
::~_Hashtable((_Hashtable<int,std::pair<int_const,int>,std::allocator<std::pair<int_const,int>>,std::__detail::_Select1st,std::equal_to<int>,std::hash<int>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<false,false,true>>
*)&local_80);
}
} while ((0 < (long)uVar8) && (uVar8 = uVar8 - 1, iVar7 == -1));
}
return iVar7;
}
|
|
6,330 | ma_retrieve_auto_increment | eloqsql/storage/maria/ma_key.c | ulonglong ma_retrieve_auto_increment(const uchar *key, uint8 key_type)
{
ulonglong value= 0; /* Store unsigned values here */
longlong s_value= 0; /* Store signed values here */
switch (key_type) {
case HA_KEYTYPE_INT8:
s_value= (longlong) *(const signed char*) key;
break;
case HA_KEYTYPE_BINARY:
value=(ulonglong) *key;
break;
case HA_KEYTYPE_SHORT_INT:
s_value= (longlong) sint2korr(key);
break;
case HA_KEYTYPE_USHORT_INT:
value=(ulonglong) uint2korr(key);
break;
case HA_KEYTYPE_LONG_INT:
s_value= (longlong) sint4korr(key);
break;
case HA_KEYTYPE_ULONG_INT:
value=(ulonglong) uint4korr(key);
break;
case HA_KEYTYPE_INT24:
s_value= (longlong) sint3korr(key);
break;
case HA_KEYTYPE_UINT24:
value=(ulonglong) uint3korr(key);
break;
case HA_KEYTYPE_FLOAT: /* This shouldn't be used */
{
float f_1;
float4get(f_1,key);
/* Ignore negative values */
value = (f_1 < (float) 0.0) ? 0 : (ulonglong) f_1;
break;
}
case HA_KEYTYPE_DOUBLE: /* This shouldn't be used */
{
double f_1;
float8get(f_1,key);
/* Ignore negative values */
value = (f_1 < 0.0) ? 0 : (ulonglong) f_1;
break;
}
case HA_KEYTYPE_LONGLONG:
s_value= sint8korr(key);
break;
case HA_KEYTYPE_ULONGLONG:
value= uint8korr(key);
break;
default:
DBUG_ASSERT(0);
value=0; /* Error */
break;
}
/*
The following code works becasue if s_value < 0 then value is 0
and if s_value == 0 then value will contain either s_value or the
correct value.
*/
return (s_value > 0) ? (ulonglong) s_value : value;
} | O0 | c | ma_retrieve_auto_increment:
pushq %rbp
movq %rsp, %rbp
movb %sil, %al
movq %rdi, -0x8(%rbp)
movb %al, -0x9(%rbp)
movq $0x0, -0x18(%rbp)
movq $0x0, -0x20(%rbp)
movzbl -0x9(%rbp), %eax
addl $-0x2, %eax
movl %eax, %ecx
movq %rcx, -0x38(%rbp)
subl $0xc, %eax
ja 0x3a5f7
movq -0x38(%rbp), %rax
leaq 0xeb9d5(%rip), %rcx # 0x125e04
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq -0x8(%rbp), %rax
movsbq (%rax), %rax
movq %rax, -0x20(%rbp)
jmp 0x3a603
movq -0x8(%rbp), %rax
movzbl (%rax), %eax
movq %rax, -0x18(%rbp)
jmp 0x3a603
movq -0x8(%rbp), %rax
movswq (%rax), %rax
movq %rax, -0x20(%rbp)
jmp 0x3a603
movq -0x8(%rbp), %rax
movzwl (%rax), %eax
movq %rax, -0x18(%rbp)
jmp 0x3a603
movq -0x8(%rbp), %rax
movslq (%rax), %rax
movq %rax, -0x20(%rbp)
jmp 0x3a603
movq -0x8(%rbp), %rax
movl (%rax), %eax
movq %rax, -0x18(%rbp)
jmp 0x3a603
movq -0x8(%rbp), %rax
movzbl 0x2(%rax), %eax
andl $0x80, %eax
cmpl $0x0, %eax
je 0x3a4d6
movq -0x8(%rbp), %rax
movzbl 0x2(%rax), %eax
shll $0x10, %eax
orl $0xff000000, %eax # imm = 0xFF000000
movq -0x8(%rbp), %rcx
movzbl 0x1(%rcx), %ecx
shll $0x8, %ecx
orl %ecx, %eax
movq -0x8(%rbp), %rcx
movzbl (%rcx), %ecx
orl %ecx, %eax
movl %eax, -0x3c(%rbp)
jmp 0x3a4fa
movq -0x8(%rbp), %rax
movzbl 0x2(%rax), %eax
shll $0x10, %eax
movq -0x8(%rbp), %rcx
movzbl 0x1(%rcx), %ecx
shll $0x8, %ecx
orl %ecx, %eax
movq -0x8(%rbp), %rcx
movzbl (%rcx), %ecx
orl %ecx, %eax
movl %eax, -0x3c(%rbp)
movl -0x3c(%rbp), %eax
cltq
movq %rax, -0x20(%rbp)
jmp 0x3a603
movq -0x8(%rbp), %rax
movzbl (%rax), %eax
movq -0x8(%rbp), %rcx
movzbl 0x1(%rcx), %ecx
shll $0x8, %ecx
orl %ecx, %eax
movq -0x8(%rbp), %rcx
movzbl 0x2(%rcx), %ecx
shll $0x10, %ecx
orl %ecx, %eax
movl %eax, %eax
movq %rax, -0x18(%rbp)
jmp 0x3a603
movq -0x8(%rbp), %rax
movl (%rax), %eax
movl %eax, -0x24(%rbp)
xorps %xmm0, %xmm0
ucomiss -0x24(%rbp), %xmm0
jbe 0x3a54e
xorl %eax, %eax
movq %rax, -0x48(%rbp)
jmp 0x3a57d
movss -0x24(%rbp), %xmm0
movss 0xe2aa9(%rip), %xmm2 # 0x11d004
movaps %xmm0, %xmm1
subss %xmm2, %xmm1
cvttss2si %xmm1, %rcx
cvttss2si %xmm0, %rax
movq %rax, %rdx
sarq $0x3f, %rdx
andq %rdx, %rcx
orq %rcx, %rax
movq %rax, -0x48(%rbp)
movq -0x48(%rbp), %rax
movq %rax, -0x18(%rbp)
jmp 0x3a603
movq -0x8(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x30(%rbp)
xorps %xmm0, %xmm0
ucomisd -0x30(%rbp), %xmm0
jbe 0x3a5a4
xorl %eax, %eax
movq %rax, -0x50(%rbp)
jmp 0x3a5d3
movsd -0x30(%rbp), %xmm0
movsd 0xeb5b7(%rip), %xmm2 # 0x125b68
movaps %xmm0, %xmm1
subsd %xmm2, %xmm1
cvttsd2si %xmm1, %rcx
cvttsd2si %xmm0, %rax
movq %rax, %rdx
sarq $0x3f, %rdx
andq %rdx, %rcx
orq %rcx, %rax
movq %rax, -0x50(%rbp)
movq -0x50(%rbp), %rax
movq %rax, -0x18(%rbp)
jmp 0x3a603
movq -0x8(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x20(%rbp)
jmp 0x3a603
movq -0x8(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x18(%rbp)
jmp 0x3a603
jmp 0x3a5f9
jmp 0x3a5fb
movq $0x0, -0x18(%rbp)
cmpq $0x0, -0x20(%rbp)
jle 0x3a614
movq -0x20(%rbp), %rax
movq %rax, -0x58(%rbp)
jmp 0x3a61c
movq -0x18(%rbp), %rax
movq %rax, -0x58(%rbp)
movq -0x58(%rbp), %rax
popq %rbp
retq
nopw %cs:(%rax,%rax)
| ma_retrieve_auto_increment:
push rbp
mov rbp, rsp
mov al, sil
mov [rbp+var_8], rdi
mov [rbp+var_9], al
mov [rbp+var_18], 0
mov [rbp+var_20], 0
movzx eax, [rbp+var_9]
add eax, 0FFFFFFFEh; switch 13 cases
mov ecx, eax
mov [rbp+var_38], rcx
sub eax, 0Ch
ja def_3A436; jumptable 000000000003A436 default case, case 7
mov rax, [rbp+var_38]
lea rcx, jpt_3A436
movsxd rax, ds:(jpt_3A436 - 125E04h)[rcx+rax*4]
add rax, rcx
jmp rax; switch jump
loc_3A438:
mov rax, [rbp+var_8]; jumptable 000000000003A436 case 14
movsx rax, byte ptr [rax]
mov [rbp+var_20], rax
jmp loc_3A603
loc_3A449:
mov rax, [rbp+var_8]; jumptable 000000000003A436 case 2
movzx eax, byte ptr [rax]
mov [rbp+var_18], rax
jmp loc_3A603
loc_3A459:
mov rax, [rbp+var_8]; jumptable 000000000003A436 case 3
movsx rax, word ptr [rax]
mov [rbp+var_20], rax
jmp loc_3A603
loc_3A46A:
mov rax, [rbp+var_8]; jumptable 000000000003A436 case 8
movzx eax, word ptr [rax]
mov [rbp+var_18], rax
jmp loc_3A603
loc_3A47A:
mov rax, [rbp+var_8]; jumptable 000000000003A436 case 4
movsxd rax, dword ptr [rax]
mov [rbp+var_20], rax
jmp loc_3A603
loc_3A48A:
mov rax, [rbp+var_8]; jumptable 000000000003A436 case 9
mov eax, [rax]
mov [rbp+var_18], rax
jmp loc_3A603
loc_3A499:
mov rax, [rbp+var_8]; jumptable 000000000003A436 case 12
movzx eax, byte ptr [rax+2]
and eax, 80h
cmp eax, 0
jz short loc_3A4D6
mov rax, [rbp+var_8]
movzx eax, byte ptr [rax+2]
shl eax, 10h
or eax, 0FF000000h
mov rcx, [rbp+var_8]
movzx ecx, byte ptr [rcx+1]
shl ecx, 8
or eax, ecx
mov rcx, [rbp+var_8]
movzx ecx, byte ptr [rcx]
or eax, ecx
mov [rbp+var_3C], eax
jmp short loc_3A4FA
loc_3A4D6:
mov rax, [rbp+var_8]
movzx eax, byte ptr [rax+2]
shl eax, 10h
mov rcx, [rbp+var_8]
movzx ecx, byte ptr [rcx+1]
shl ecx, 8
or eax, ecx
mov rcx, [rbp+var_8]
movzx ecx, byte ptr [rcx]
or eax, ecx
mov [rbp+var_3C], eax
loc_3A4FA:
mov eax, [rbp+var_3C]
cdqe
mov [rbp+var_20], rax
jmp loc_3A603
loc_3A508:
mov rax, [rbp+var_8]; jumptable 000000000003A436 case 13
movzx eax, byte ptr [rax]
mov rcx, [rbp+var_8]
movzx ecx, byte ptr [rcx+1]
shl ecx, 8
or eax, ecx
mov rcx, [rbp+var_8]
movzx ecx, byte ptr [rcx+2]
shl ecx, 10h
or eax, ecx
mov eax, eax
mov [rbp+var_18], rax
jmp loc_3A603
loc_3A534:
mov rax, [rbp+var_8]; jumptable 000000000003A436 case 5
mov eax, [rax]
mov [rbp+var_24], eax
xorps xmm0, xmm0
ucomiss xmm0, [rbp+var_24]
jbe short loc_3A54E
xor eax, eax
mov [rbp+var_48], rax
jmp short loc_3A57D
loc_3A54E:
movss xmm0, [rbp+var_24]
movss xmm2, cs:dword_11D004
movaps xmm1, xmm0
subss xmm1, xmm2
cvttss2si rcx, xmm1
cvttss2si rax, xmm0
mov rdx, rax
sar rdx, 3Fh
and rcx, rdx
or rax, rcx
mov [rbp+var_48], rax
loc_3A57D:
mov rax, [rbp+var_48]
mov [rbp+var_18], rax
jmp short loc_3A603
loc_3A587:
mov rax, [rbp+var_8]; jumptable 000000000003A436 case 6
mov rax, [rax]
mov [rbp+var_30], rax
xorps xmm0, xmm0
ucomisd xmm0, [rbp+var_30]
jbe short loc_3A5A4
xor eax, eax
mov [rbp+var_50], rax
jmp short loc_3A5D3
loc_3A5A4:
movsd xmm0, [rbp+var_30]
movsd xmm2, cs:qword_125B68
movaps xmm1, xmm0
subsd xmm1, xmm2
cvttsd2si rcx, xmm1
cvttsd2si rax, xmm0
mov rdx, rax
sar rdx, 3Fh
and rcx, rdx
or rax, rcx
mov [rbp+var_50], rax
loc_3A5D3:
mov rax, [rbp+var_50]
mov [rbp+var_18], rax
jmp short loc_3A603
loc_3A5DD:
mov rax, [rbp+var_8]; jumptable 000000000003A436 case 10
mov rax, [rax]
mov [rbp+var_20], rax
jmp short loc_3A603
loc_3A5EA:
mov rax, [rbp+var_8]; jumptable 000000000003A436 case 11
mov rax, [rax]
mov [rbp+var_18], rax
jmp short loc_3A603
def_3A436:
jmp short $+2; jumptable 000000000003A436 default case, case 7
loc_3A5F9:
jmp short $+2
loc_3A5FB:
mov [rbp+var_18], 0
loc_3A603:
cmp [rbp+var_20], 0
jle short loc_3A614
mov rax, [rbp+var_20]
mov [rbp+var_58], rax
jmp short loc_3A61C
loc_3A614:
mov rax, [rbp+var_18]
mov [rbp+var_58], rax
loc_3A61C:
mov rax, [rbp+var_58]
pop rbp
retn
| long long ma_retrieve_auto_increment(float *a1, char a2)
{
long long v4; // [rsp+8h] [rbp-50h]
long long v5; // [rsp+10h] [rbp-48h]
signed int v6; // [rsp+1Ch] [rbp-3Ch]
long long v7; // [rsp+38h] [rbp-20h]
long long v8; // [rsp+40h] [rbp-18h]
v8 = 0LL;
v7 = 0LL;
switch ( a2 )
{
case 2:
v8 = *(unsigned __int8 *)a1;
break;
case 3:
v7 = *(__int16 *)a1;
break;
case 4:
v7 = *(int *)a1;
break;
case 5:
if ( *a1 >= 0.0 )
v5 = (unsigned int)(int)*a1;
else
v5 = 0LL;
v8 = v5;
break;
case 6:
if ( *(double *)a1 >= 0.0 )
v4 = (unsigned int)(int)*(double *)a1;
else
v4 = 0LL;
v8 = v4;
break;
case 8:
v8 = *(unsigned __int16 *)a1;
break;
case 9:
v8 = *(unsigned int *)a1;
break;
case 10:
v7 = *(_QWORD *)a1;
break;
case 11:
v8 = *(_QWORD *)a1;
break;
case 12:
if ( (*((_BYTE *)a1 + 2) & 0x80) != 0 )
v6 = *(unsigned __int8 *)a1 | (*((unsigned __int8 *)a1 + 1) << 8) | (*((unsigned __int8 *)a1 + 2) << 16) | 0xFF000000;
else
v6 = *(unsigned __int8 *)a1 | (*((unsigned __int8 *)a1 + 1) << 8) | (*((unsigned __int8 *)a1 + 2) << 16);
v7 = v6;
break;
case 13:
v8 = (*((unsigned __int8 *)a1 + 2) << 16) | (unsigned int)*(unsigned __int16 *)a1;
break;
case 14:
v7 = *(char *)a1;
break;
default:
v8 = 0LL;
break;
}
if ( v7 <= 0 )
return v8;
else
return v7;
}
| ma_retrieve_auto_increment:
PUSH RBP
MOV RBP,RSP
MOV AL,SIL
MOV qword ptr [RBP + -0x8],RDI
MOV byte ptr [RBP + -0x9],AL
MOV qword ptr [RBP + -0x18],0x0
MOV qword ptr [RBP + -0x20],0x0
MOVZX EAX,byte ptr [RBP + -0x9]
ADD EAX,-0x2
MOV ECX,EAX
MOV qword ptr [RBP + -0x38],RCX
SUB EAX,0xc
JA 0x0013a5f7
MOV RAX,qword ptr [RBP + -0x38]
LEA RCX,[0x225e04]
MOVSXD RAX,dword ptr [RCX + RAX*0x4]
ADD RAX,RCX
switchD:
JMP RAX
caseD_e:
MOV RAX,qword ptr [RBP + -0x8]
MOVSX RAX,byte ptr [RAX]
MOV qword ptr [RBP + -0x20],RAX
JMP 0x0013a603
caseD_2:
MOV RAX,qword ptr [RBP + -0x8]
MOVZX EAX,byte ptr [RAX]
MOV qword ptr [RBP + -0x18],RAX
JMP 0x0013a603
caseD_3:
MOV RAX,qword ptr [RBP + -0x8]
MOVSX RAX,word ptr [RAX]
MOV qword ptr [RBP + -0x20],RAX
JMP 0x0013a603
caseD_8:
MOV RAX,qword ptr [RBP + -0x8]
MOVZX EAX,word ptr [RAX]
MOV qword ptr [RBP + -0x18],RAX
JMP 0x0013a603
caseD_4:
MOV RAX,qword ptr [RBP + -0x8]
MOVSXD RAX,dword ptr [RAX]
MOV qword ptr [RBP + -0x20],RAX
JMP 0x0013a603
caseD_9:
MOV RAX,qword ptr [RBP + -0x8]
MOV EAX,dword ptr [RAX]
MOV qword ptr [RBP + -0x18],RAX
JMP 0x0013a603
caseD_c:
MOV RAX,qword ptr [RBP + -0x8]
MOVZX EAX,byte ptr [RAX + 0x2]
AND EAX,0x80
CMP EAX,0x0
JZ 0x0013a4d6
MOV RAX,qword ptr [RBP + -0x8]
MOVZX EAX,byte ptr [RAX + 0x2]
SHL EAX,0x10
OR EAX,0xff000000
MOV RCX,qword ptr [RBP + -0x8]
MOVZX ECX,byte ptr [RCX + 0x1]
SHL ECX,0x8
OR EAX,ECX
MOV RCX,qword ptr [RBP + -0x8]
MOVZX ECX,byte ptr [RCX]
OR EAX,ECX
MOV dword ptr [RBP + -0x3c],EAX
JMP 0x0013a4fa
LAB_0013a4d6:
MOV RAX,qword ptr [RBP + -0x8]
MOVZX EAX,byte ptr [RAX + 0x2]
SHL EAX,0x10
MOV RCX,qword ptr [RBP + -0x8]
MOVZX ECX,byte ptr [RCX + 0x1]
SHL ECX,0x8
OR EAX,ECX
MOV RCX,qword ptr [RBP + -0x8]
MOVZX ECX,byte ptr [RCX]
OR EAX,ECX
MOV dword ptr [RBP + -0x3c],EAX
LAB_0013a4fa:
MOV EAX,dword ptr [RBP + -0x3c]
CDQE
MOV qword ptr [RBP + -0x20],RAX
JMP 0x0013a603
caseD_d:
MOV RAX,qword ptr [RBP + -0x8]
MOVZX EAX,byte ptr [RAX]
MOV RCX,qword ptr [RBP + -0x8]
MOVZX ECX,byte ptr [RCX + 0x1]
SHL ECX,0x8
OR EAX,ECX
MOV RCX,qword ptr [RBP + -0x8]
MOVZX ECX,byte ptr [RCX + 0x2]
SHL ECX,0x10
OR EAX,ECX
MOV EAX,EAX
MOV qword ptr [RBP + -0x18],RAX
JMP 0x0013a603
caseD_5:
MOV RAX,qword ptr [RBP + -0x8]
MOV EAX,dword ptr [RAX]
MOV dword ptr [RBP + -0x24],EAX
XORPS XMM0,XMM0
UCOMISS XMM0,dword ptr [RBP + -0x24]
JBE 0x0013a54e
XOR EAX,EAX
MOV qword ptr [RBP + -0x48],RAX
JMP 0x0013a57d
LAB_0013a54e:
MOVSS XMM0,dword ptr [RBP + -0x24]
MOVSS XMM2,dword ptr [0x0021d004]
MOVAPS XMM1,XMM0
SUBSS XMM1,XMM2
CVTTSS2SI RCX,XMM1
CVTTSS2SI RAX,XMM0
MOV RDX,RAX
SAR RDX,0x3f
AND RCX,RDX
OR RAX,RCX
MOV qword ptr [RBP + -0x48],RAX
LAB_0013a57d:
MOV RAX,qword ptr [RBP + -0x48]
MOV qword ptr [RBP + -0x18],RAX
JMP 0x0013a603
caseD_6:
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x30],RAX
XORPS XMM0,XMM0
UCOMISD XMM0,qword ptr [RBP + -0x30]
JBE 0x0013a5a4
XOR EAX,EAX
MOV qword ptr [RBP + -0x50],RAX
JMP 0x0013a5d3
LAB_0013a5a4:
MOVSD XMM0,qword ptr [RBP + -0x30]
MOVSD XMM2,qword ptr [0x00225b68]
MOVAPS XMM1,XMM0
SUBSD XMM1,XMM2
CVTTSD2SI RCX,XMM1
CVTTSD2SI RAX,XMM0
MOV RDX,RAX
SAR RDX,0x3f
AND RCX,RDX
OR RAX,RCX
MOV qword ptr [RBP + -0x50],RAX
LAB_0013a5d3:
MOV RAX,qword ptr [RBP + -0x50]
MOV qword ptr [RBP + -0x18],RAX
JMP 0x0013a603
caseD_a:
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x20],RAX
JMP 0x0013a603
caseD_b:
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x18],RAX
JMP 0x0013a603
caseD_7:
JMP 0x0013a5f9
LAB_0013a5f9:
JMP 0x0013a5fb
LAB_0013a5fb:
MOV qword ptr [RBP + -0x18],0x0
LAB_0013a603:
CMP qword ptr [RBP + -0x20],0x0
JLE 0x0013a614
MOV RAX,qword ptr [RBP + -0x20]
MOV qword ptr [RBP + -0x58],RAX
JMP 0x0013a61c
LAB_0013a614:
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RBP + -0x58],RAX
LAB_0013a61c:
MOV RAX,qword ptr [RBP + -0x58]
POP RBP
RET
|
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
double ma_retrieve_auto_increment(double *param_1,int1 param_2)
{
float fVar1;
double dVar2;
double local_60;
double local_58;
double local_50;
uint local_44;
double local_28;
double local_20;
local_20 = 0.0;
local_28 = 0.0;
switch(param_2) {
case 2:
local_20 = (double)(ulong)*(byte *)param_1;
break;
case 3:
local_28 = (double)(long)(short)*(ushort *)param_1;
break;
case 4:
local_28 = (double)(long)(int)*(float *)param_1;
break;
case 5:
fVar1 = *(float *)param_1;
if (0.0 <= fVar1) {
local_50 = (double)((long)fVar1 | (long)(fVar1 - _DAT_0021d004) & (long)fVar1 >> 0x3f);
}
else {
local_50 = 0.0;
}
local_20 = local_50;
break;
case 6:
dVar2 = *param_1;
if (0.0 <= dVar2) {
local_58 = (double)((long)dVar2 | (long)(dVar2 - DAT_00225b68) & (long)dVar2 >> 0x3f);
}
else {
local_58 = 0.0;
}
local_20 = local_58;
break;
default:
local_20 = 0.0;
break;
case 8:
local_20 = (double)(ulong)*(ushort *)param_1;
break;
case 9:
local_20 = (double)(ulong)(uint)*(float *)param_1;
break;
case 10:
local_28 = *param_1;
break;
case 0xb:
local_20 = *param_1;
break;
case 0xc:
if (((ulong)*param_1 & 0x800000) == 0) {
local_44 = (uint)*(byte *)((long)param_1 + 2) << 0x10 |
(uint)*(byte *)((long)param_1 + 1) << 8 | (uint)*(byte *)param_1;
}
else {
local_44 = (uint)*(byte *)((long)param_1 + 2) << 0x10 | 0xff000000 |
(uint)*(byte *)((long)param_1 + 1) << 8 | (uint)*(byte *)param_1;
}
local_28 = (double)(long)(int)local_44;
break;
case 0xd:
local_20 = (double)(ulong)*(uint3 *)param_1;
break;
case 0xe:
local_28 = (double)(long)(char)*(byte *)param_1;
}
if ((long)local_28 < 1) {
local_60 = local_20;
}
else {
local_60 = local_28;
}
return local_60;
}
|
|
6,331 | mi_yield_and_check_if_killed | eloqsql/storage/myisam/mi_rkey.c | my_bool mi_yield_and_check_if_killed(MI_INFO *info, int inx)
{
MYISAM_SHARE *share;
if (mi_killed(info))
{
/* purecov: begin tested */
info->lastpos= HA_OFFSET_ERROR;
/* Set error that we where aborted by kill from application */
my_errno= HA_ERR_ABORTED_BY_USER;
return 1;
/* purecov: end */
}
if ((share= info->s)->concurrent_insert)
{
/* Give writers a chance to access index */
mysql_rwlock_unlock(&share->key_root_lock[inx]);
mysql_rwlock_rdlock(&share->key_root_lock[inx]);
}
return 0;
} | O3 | c | mi_yield_and_check_if_killed:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %esi, %r14d
movq %rdi, %rbx
leaq 0x2e7fa7(%rip), %rax # 0x330060
callq *(%rax)
testb %al, %al
je 0x480d9
movq $-0x1, 0x170(%rbx)
callq 0x5cfd2
movl $0xbc, (%rax)
movb $0x1, %al
jmp 0x4812c
movq (%rbx), %r15
cmpb $0x0, 0x384(%r15)
je 0x4812a
movq 0x4c8(%r15), %rbx
movslq %r14d, %rax
imulq $0x98, %rax, %r14
movq 0x90(%rbx,%r14), %rdi
addq %r14, %rbx
testq %rdi, %rdi
jne 0x48137
movq %rbx, %rdi
callq 0x5f996
movq 0x4c8(%r15), %rax
leaq (%rax,%r14), %rdi
cmpq $0x0, 0x90(%rax,%r14)
jne 0x48149
callq 0x5f868
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
leaq 0x2e9d12(%rip), %rax # 0x331e50
movq (%rax), %rax
callq *0x168(%rax)
jmp 0x48107
leaq 0x4ad72(%rip), %rsi # 0x92ec2
movl $0x106, %edx # imm = 0x106
callq 0x2a077
jmp 0x4812a
| mi_yield_and_check_if_killed:
push rbp
mov rbp, rsp
push r15
push r14
push rbx
push rax
mov r14d, esi
mov rbx, rdi
lea rax, mi_killed
call qword ptr [rax]
test al, al
jz short loc_480D9
mov qword ptr [rbx+170h], 0FFFFFFFFFFFFFFFFh
call _my_thread_var
mov dword ptr [rax], 0BCh
mov al, 1
jmp short loc_4812C
loc_480D9:
mov r15, [rbx]
cmp byte ptr [r15+384h], 0
jz short loc_4812A
mov rbx, [r15+4C8h]
movsxd rax, r14d
imul r14, rax, 98h
mov rdi, [rbx+r14+90h]
add rbx, r14
test rdi, rdi
jnz short loc_48137
loc_48107:
mov rdi, rbx
call my_rw_unlock
mov rax, [r15+4C8h]
lea rdi, [rax+r14]
cmp qword ptr [rax+r14+90h], 0
jnz short loc_48149
call my_rw_rdlock
loc_4812A:
xor eax, eax
loc_4812C:
add rsp, 8
pop rbx
pop r14
pop r15
pop rbp
retn
loc_48137:
lea rax, PSI_server
mov rax, [rax]
call qword ptr [rax+168h]
jmp short loc_48107
loc_48149:
lea rsi, aWorkspaceLlm4b_16; "/workspace/llm4binary/github2025/eloqsq"...
mov edx, 106h
call psi_rwlock_rdlock
jmp short loc_4812A
| char mi_yield_and_check_if_killed(_QWORD *a1, long long a2)
{
long long v2; // rdx
long long v4; // r15
long long v5; // rbx
long long v6; // r14
long long v7; // rdi
long long v8; // rbx
long long v9; // rdi
if ( (unsigned __int8)mi_killed() )
{
a1[46] = -1LL;
*(_DWORD *)my_thread_var(a1, a2, v2) = 188;
return 1;
}
else
{
v4 = *a1;
if ( *(_BYTE *)(*a1 + 900LL) )
{
v5 = *(_QWORD *)(v4 + 1224);
v6 = 152LL * (int)a2;
v7 = *(_QWORD *)(v5 + v6 + 144);
v8 = v6 + v5;
if ( v7 )
PSI_server[45]();
my_rw_unlock(v8);
v9 = *(_QWORD *)(v4 + 1224) + v6;
if ( *(_QWORD *)(v9 + 144) )
psi_rwlock_rdlock(v9, (long long)"/workspace/llm4binary/github2025/eloqsql/storage/myisam/mi_rkey.c", 0x106u);
else
my_rw_rdlock(v9);
}
return 0;
}
}
| mi_yield_and_check_if_killed:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH RBX
PUSH RAX
MOV R14D,ESI
MOV RBX,RDI
LEA RAX,[0x430060]
CALL qword ptr [RAX]
TEST AL,AL
JZ 0x001480d9
MOV qword ptr [RBX + 0x170],-0x1
CALL 0x0015cfd2
MOV dword ptr [RAX],0xbc
MOV AL,0x1
JMP 0x0014812c
LAB_001480d9:
MOV R15,qword ptr [RBX]
CMP byte ptr [R15 + 0x384],0x0
JZ 0x0014812a
MOV RBX,qword ptr [R15 + 0x4c8]
MOVSXD RAX,R14D
IMUL R14,RAX,0x98
MOV RDI,qword ptr [RBX + R14*0x1 + 0x90]
ADD RBX,R14
TEST RDI,RDI
JNZ 0x00148137
LAB_00148107:
MOV RDI,RBX
CALL 0x0015f996
MOV RAX,qword ptr [R15 + 0x4c8]
LEA RDI,[RAX + R14*0x1]
CMP qword ptr [RAX + R14*0x1 + 0x90],0x0
JNZ 0x00148149
CALL 0x0015f868
LAB_0014812a:
XOR EAX,EAX
LAB_0014812c:
ADD RSP,0x8
POP RBX
POP R14
POP R15
POP RBP
RET
LAB_00148137:
LEA RAX,[0x431e50]
MOV RAX,qword ptr [RAX]
CALL qword ptr [RAX + 0x168]
JMP 0x00148107
LAB_00148149:
LEA RSI,[0x192ec2]
MOV EDX,0x106
CALL 0x0012a077
JMP 0x0014812a
|
int8 mi_yield_and_check_if_killed(long *param_1,int param_2)
{
long lVar1;
long lVar2;
char cVar3;
int4 *puVar4;
int8 uVar5;
long lVar6;
cVar3 = (*(code *)mi_killed)();
if (cVar3 == '\0') {
lVar1 = *param_1;
if (*(char *)(lVar1 + 900) != '\0') {
lVar2 = *(long *)(lVar1 + 0x4c8);
lVar6 = (long)param_2 * 0x98;
if (*(long *)(lVar2 + 0x90 + lVar6) != 0) {
(**(code **)(PSI_server + 0x168))();
}
my_rw_unlock(lVar2 + lVar6);
if (*(long *)(*(long *)(lVar1 + 0x4c8) + 0x90 + lVar6) == 0) {
my_rw_rdlock();
}
else {
psi_rwlock_rdlock(*(long *)(lVar1 + 0x4c8) + lVar6,
"/workspace/llm4binary/github2025/eloqsql/storage/myisam/mi_rkey.c",0x106)
;
}
}
uVar5 = 0;
}
else {
param_1[0x2e] = -1;
puVar4 = (int4 *)_my_thread_var();
*puVar4 = 0xbc;
uVar5 = 1;
}
return uVar5;
}
|
|
6,332 | ma_zlib_ctx_init | eloqsql/libmariadb/plugins/compress/c_zlib.c | static ma_compress_ctx *ma_zlib_ctx_init(int compression_level)
{
ma_compress_ctx *ctx;
if (!(ctx = (ma_compress_ctx *)calloc(1, sizeof(ma_compress_ctx))))
return NULL;
ctx->compression_level= (compression_level == COMPRESSION_LEVEL_DEFAULT) ?
Z_DEFAULT_COMPRESSION : compression_level;
return ctx;
} | O0 | c | ma_zlib_ctx_init:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movl %edi, -0xc(%rbp)
movl $0x1, %edi
movl $0x20, %esi
callq 0x3a8c0
movq %rax, -0x18(%rbp)
cmpq $0x0, %rax
jne 0xc94be
movq $0x0, -0x8(%rbp)
jmp 0xc94e9
cmpl $0x7fffffff, -0xc(%rbp) # imm = 0x7FFFFFFF
jne 0xc94d1
movl $0xffffffff, %eax # imm = 0xFFFFFFFF
movl %eax, -0x1c(%rbp)
jmp 0xc94d7
movl -0xc(%rbp), %eax
movl %eax, -0x1c(%rbp)
movl -0x1c(%rbp), %ecx
movq -0x18(%rbp), %rax
movl %ecx, 0x10(%rax)
movq -0x18(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
| ma_zlib_ctx_init:
push rbp
mov rbp, rsp
sub rsp, 20h
mov [rbp+var_C], edi
mov edi, 1
mov esi, 20h ; ' '
call _calloc
mov [rbp+var_18], rax
cmp rax, 0
jnz short loc_C94BE
mov [rbp+var_8], 0
jmp short loc_C94E9
loc_C94BE:
cmp [rbp+var_C], 7FFFFFFFh
jnz short loc_C94D1
mov eax, 0FFFFFFFFh
mov [rbp+var_1C], eax
jmp short loc_C94D7
loc_C94D1:
mov eax, [rbp+var_C]
mov [rbp+var_1C], eax
loc_C94D7:
mov ecx, [rbp+var_1C]
mov rax, [rbp+var_18]
mov [rax+10h], ecx
mov rax, [rbp+var_18]
mov [rbp+var_8], rax
loc_C94E9:
mov rax, [rbp+var_8]
add rsp, 20h
pop rbp
retn
| long long ma_zlib_ctx_init(int a1)
{
int v2; // [rsp+4h] [rbp-1Ch]
long long v3; // [rsp+8h] [rbp-18h]
v3 = calloc(1LL, 32LL);
if ( !v3 )
return 0LL;
if ( a1 == 0x7FFFFFFF )
v2 = -1;
else
v2 = a1;
*(_DWORD *)(v3 + 16) = v2;
return v3;
}
| ma_zlib_ctx_init:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x20
MOV dword ptr [RBP + -0xc],EDI
MOV EDI,0x1
MOV ESI,0x20
CALL 0x0013a8c0
MOV qword ptr [RBP + -0x18],RAX
CMP RAX,0x0
JNZ 0x001c94be
MOV qword ptr [RBP + -0x8],0x0
JMP 0x001c94e9
LAB_001c94be:
CMP dword ptr [RBP + -0xc],0x7fffffff
JNZ 0x001c94d1
MOV EAX,0xffffffff
MOV dword ptr [RBP + -0x1c],EAX
JMP 0x001c94d7
LAB_001c94d1:
MOV EAX,dword ptr [RBP + -0xc]
MOV dword ptr [RBP + -0x1c],EAX
LAB_001c94d7:
MOV ECX,dword ptr [RBP + -0x1c]
MOV RAX,qword ptr [RBP + -0x18]
MOV dword ptr [RAX + 0x10],ECX
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RBP + -0x8],RAX
LAB_001c94e9:
MOV RAX,qword ptr [RBP + -0x8]
ADD RSP,0x20
POP RBP
RET
|
void * ma_zlib_ctx_init(int param_1)
{
int local_24;
void *local_10;
local_10 = calloc(1,0x20);
if (local_10 == (void *)0x0) {
local_10 = (void *)0x0;
}
else {
local_24 = param_1;
if (param_1 == 0x7fffffff) {
local_24 = -1;
}
*(int *)((long)local_10 + 0x10) = local_24;
}
return local_10;
}
|
|
6,333 | safe_lexcstrdup_root | eloqsql/mysys/my_alloc.c | LEX_CSTRING safe_lexcstrdup_root(MEM_ROOT *root, const LEX_CSTRING str)
{
LEX_CSTRING res;
if (str.length)
res.str= strmake_root(root, str.str, str.length);
else
res.str= (const char *)"";
res.length= str.length;
return res;
} | O0 | c | safe_lexcstrdup_root:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rsi, -0x20(%rbp)
movq %rdx, -0x18(%rbp)
movq %rdi, -0x28(%rbp)
cmpq $0x0, -0x18(%rbp)
je 0x35da2
movq -0x28(%rbp), %rdi
movq -0x20(%rbp), %rsi
movq -0x18(%rbp), %rdx
callq 0x35cc0
movq %rax, -0x10(%rbp)
jmp 0x35dad
leaq 0x4a196(%rip), %rax # 0x7ff3f
movq %rax, -0x10(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x10(%rbp), %rax
movq -0x8(%rbp), %rdx
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
nopl (%rax)
| safe_lexcstrdup_root:
push rbp
mov rbp, rsp
sub rsp, 30h
mov [rbp+var_20], rsi
mov [rbp+var_18], rdx
mov [rbp+var_28], rdi
cmp [rbp+var_18], 0
jz short loc_35DA2
mov rdi, [rbp+var_28]
mov rsi, [rbp+var_20]
mov rdx, [rbp+var_18]
call strmake_root
mov [rbp+var_10], rax
jmp short loc_35DAD
loc_35DA2:
lea rax, asc_7FF3B+4; ""
mov [rbp+var_10], rax
loc_35DAD:
mov rax, [rbp+var_18]
mov [rbp+var_8], rax
mov rax, [rbp+var_10]
mov rdx, [rbp+var_8]
add rsp, 30h
pop rbp
retn
| char * safe_lexcstrdup_root(_QWORD **a1, long long a2, long long a3)
{
if ( a3 )
return strmake_root(a1, a2, a3);
else
return "";
}
| safe_lexcstrdup_root:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x30
MOV qword ptr [RBP + -0x20],RSI
MOV qword ptr [RBP + -0x18],RDX
MOV qword ptr [RBP + -0x28],RDI
CMP qword ptr [RBP + -0x18],0x0
JZ 0x00135da2
MOV RDI,qword ptr [RBP + -0x28]
MOV RSI,qword ptr [RBP + -0x20]
MOV RDX,qword ptr [RBP + -0x18]
CALL 0x00135cc0
MOV qword ptr [RBP + -0x10],RAX
JMP 0x00135dad
LAB_00135da2:
LEA RAX,[0x17ff3f]
MOV qword ptr [RBP + -0x10],RAX
LAB_00135dad:
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RBP + -0x8],RAX
MOV RAX,qword ptr [RBP + -0x10]
MOV RDX,qword ptr [RBP + -0x8]
ADD RSP,0x30
POP RBP
RET
|
int1 [16] safe_lexcstrdup_root(int8 param_1,int8 param_2,long param_3)
{
int1 auVar1 [16];
int *local_18;
if (param_3 == 0) {
local_18 = &DAT_0017ff3f;
}
else {
local_18 = (int *)strmake_root(param_1,param_2,param_3);
}
auVar1._8_8_ = param_3;
auVar1._0_8_ = local_18;
return auVar1;
}
|
|
6,334 | ma_init_block_record | eloqsql/storage/maria/ma_blockrec.c | my_bool _ma_init_block_record(MARIA_HA *info)
{
MARIA_ROW *row= &info->cur_row, *new_row= &info->new_row;
MARIA_SHARE *share= info->s;
myf flag= MY_WME | (share->temporary ? MY_THREAD_SPECIFIC : 0);
uint default_extents;
DBUG_ENTER("_ma_init_block_record");
if (!my_multi_malloc(PSI_INSTRUMENT_ME, flag,
&row->empty_bits, share->base.pack_bytes,
&row->field_lengths,
share->base.max_field_lengths + 2,
&row->blob_lengths, sizeof(ulong) * share->base.blobs,
&row->null_field_lengths, (sizeof(uint) *
(share->base.fields -
share->base.blobs +
EXTRA_LENGTH_FIELDS)),
&row->tail_positions, (sizeof(MARIA_RECORD_POS) *
(share->base.blobs + 2)),
&new_row->empty_bits, share->base.pack_bytes,
&new_row->field_lengths,
share->base.max_field_lengths + 2,
&new_row->blob_lengths,
sizeof(ulong) * share->base.blobs,
&new_row->null_field_lengths, (sizeof(uint) *
(share->base.fields -
share->base.blobs +
EXTRA_LENGTH_FIELDS)),
&info->log_row_parts,
sizeof(*info->log_row_parts) *
(TRANSLOG_INTERNAL_PARTS + 3 +
share->base.fields + 3),
&info->update_field_data,
(share->base.fields * 4 +
share->base.max_field_lengths + 1 + 4),
NullS, 0))
DBUG_RETURN(1);
/* Skip over bytes used to store length of field length for logging */
row->field_lengths+= 2;
new_row->field_lengths+= 2;
/* Reserve some initial space to avoid mallocs during execution */
default_extents= (ELEMENTS_RESERVED_FOR_MAIN_PART + 1 +
(AVERAGE_BLOB_SIZE /
FULL_PAGE_SIZE(share) /
BLOB_SEGMENT_MIN_SIZE));
if (my_init_dynamic_array(PSI_INSTRUMENT_ME, &info->bitmap_blocks,
sizeof(MARIA_BITMAP_BLOCK),
default_extents, 64, flag))
goto err;
info->cur_row.extents_buffer_length= default_extents * ROW_EXTENT_SIZE;
if (!(info->cur_row.extents= my_malloc(PSI_INSTRUMENT_ME,
info->cur_row.extents_buffer_length,
flag)))
goto err;
info->row_base_length= share->base_length;
info->row_flag= share->base.default_row_flag;
/*
We need to reserve 'EXTRA_LENGTH_FIELDS' number of parts in
null_field_lengths to allow splitting of rows in 'find_where_to_split_row'
*/
row->null_field_lengths+= EXTRA_LENGTH_FIELDS;
new_row->null_field_lengths+= EXTRA_LENGTH_FIELDS;
DBUG_RETURN(0);
err:
_ma_end_block_record(info);
DBUG_RETURN(1);
} | O3 | c | ma_init_block_record:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x58, %rsp
movq %rdi, %rbx
movq (%rdi), %rsi
xorl %r14d, %r14d
cmpb $0x0, 0x7d9(%rsi)
setne %r14b
shll $0x10, %r14d
orq $0x10, %r14
leaq 0xc8(%rdi), %rdx
movl 0x3f4(%rsi), %ecx
leaq 0xd0(%rdi), %r8
movl 0x3c8(%rsi), %r11d
movl 0x3d4(%rsi), %eax
leal 0x2(%rax), %r9d
addq $0xe0, %rdi
movq %rdi, -0x78(%rbp)
movq %rsi, -0x30(%rbp)
movl 0x3f0(%rsi), %r15d
leal 0x8(%r11), %r10d
leal (%rax,%r11,4), %eax
addl $0x5, %eax
movq %rax, -0x58(%rbp)
subl %r15d, %r11d
leal 0x2(%r15), %r12d
shlq $0x3, %r15
addl $0x3, %r11d
shlq $0x2, %r11
shlq $0x3, %r12
shlq $0x4, %r10
leaq 0xd8(%rbx), %rax
movq %rax, -0x70(%rbp)
leaq 0xa8(%rbx), %rax
movq %rax, -0x68(%rbp)
leaq 0x188(%rbx), %rax
movq %rax, -0x60(%rbp)
leaq 0x190(%rbx), %rax
movq %rax, -0x50(%rbp)
leaq 0x1a0(%rbx), %rax
movq %rax, -0x48(%rbp)
leaq 0x198(%rbx), %rax
movq %rax, -0x40(%rbp)
leaq 0x318(%rbx), %rax
movq %rax, -0x38(%rbp)
leaq 0x3c8(%rbx), %r13
xorl %edi, %edi
movq %r14, %rsi
xorl %eax, %eax
pushq $0x0
pushq $0x0
pushq -0x58(%rbp)
pushq %r13
pushq %r10
pushq -0x38(%rbp)
pushq %r11
pushq -0x40(%rbp)
pushq %r15
pushq -0x48(%rbp)
pushq %r9
pushq -0x50(%rbp)
pushq %rcx
pushq -0x60(%rbp)
pushq %r12
pushq -0x68(%rbp)
pushq %r11
pushq -0x70(%rbp)
pushq %r15
pushq -0x78(%rbp)
callq 0x9c3dc
addq $0xa0, %rsp
movb $0x1, %r15b
testq %rax, %rax
je 0x5baf2
addq $0x2, 0xd0(%rbx)
addq $0x2, 0x190(%rbx)
movq -0x30(%rbp), %r13
movl 0x7bc(%r13), %ecx
subl 0xc18(%r13), %ecx
addl $-0xc, %ecx
movl $0x100000, %eax # imm = 0x100000
xorl %edx, %edx
divl %ecx
movl %eax, %r12d
shrl $0x7, %r12d
addl $0x5, %r12d
leaq 0x2c0(%rbx), %rsi
subq $0x8, %rsp
xorl %edi, %edi
movl $0x18, %edx
xorl %ecx, %ecx
movl %r12d, %r8d
movl $0x40, %r9d
pushq %r14
callq 0x91678
addq $0x10, %rsp
testb %al, %al
je 0x5ba9c
movq %rbx, %rdi
callq 0x5bb04
jmp 0x5baf2
leal (,%r12,8), %esi
subl %r12d, %esi
movq %rsi, 0x118(%rbx)
xorl %edi, %edi
movq %r14, %rdx
callq 0x9f901
movq %rax, 0x90(%rbx)
testq %rax, %rax
je 0x5ba92
movl 0x7c4(%r13), %eax
movq %rax, 0x610(%rbx)
movl 0x418(%r13), %eax
movl %eax, 0x618(%rbx)
addq $0xc, 0xd8(%rbx)
addq $0xc, 0x198(%rbx)
xorl %r15d, %r15d
movl %r15d, %eax
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| _ma_init_block_record:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 58h
mov rbx, rdi
mov rsi, [rdi]
xor r14d, r14d
cmp byte ptr [rsi+7D9h], 0
setnz r14b
shl r14d, 10h
or r14, 10h
lea rdx, [rdi+0C8h]
mov ecx, [rsi+3F4h]
lea r8, [rdi+0D0h]
mov r11d, [rsi+3C8h]
mov eax, [rsi+3D4h]
lea r9d, [rax+2]
add rdi, 0E0h
mov [rbp+var_78], rdi
mov [rbp+var_30], rsi
mov r15d, [rsi+3F0h]
lea r10d, [r11+8]
lea eax, [rax+r11*4]
add eax, 5
mov [rbp+var_58], rax
sub r11d, r15d
lea r12d, [r15+2]
shl r15, 3
add r11d, 3
shl r11, 2
shl r12, 3
shl r10, 4
lea rax, [rbx+0D8h]
mov [rbp+var_70], rax
lea rax, [rbx+0A8h]
mov [rbp+var_68], rax
lea rax, [rbx+188h]
mov [rbp+var_60], rax
lea rax, [rbx+190h]
mov [rbp+var_50], rax
lea rax, [rbx+1A0h]
mov [rbp+var_48], rax
lea rax, [rbx+198h]
mov [rbp+var_40], rax
lea rax, [rbx+318h]
mov [rbp+var_38], rax
lea r13, [rbx+3C8h]
xor edi, edi
mov rsi, r14
xor eax, eax
push 0
push 0
push [rbp+var_58]
push r13
push r10
push [rbp+var_38]
push r11
push [rbp+var_40]
push r15
push [rbp+var_48]
push r9
push [rbp+var_50]
push rcx
push [rbp+var_60]
push r12
push [rbp+var_68]
push r11
push [rbp+var_70]
push r15
push [rbp+var_78]
call my_multi_malloc
add rsp, 0A0h
mov r15b, 1
test rax, rax
jz loc_5BAF2
add qword ptr [rbx+0D0h], 2
add qword ptr [rbx+190h], 2
mov r13, [rbp+var_30]
mov ecx, [r13+7BCh]
sub ecx, [r13+0C18h]
add ecx, 0FFFFFFF4h
mov eax, offset xmmword_100000
xor edx, edx
div ecx
mov r12d, eax
shr r12d, 7
add r12d, 5
lea rsi, [rbx+2C0h]
sub rsp, 8
xor edi, edi
mov edx, 18h
xor ecx, ecx
mov r8d, r12d
mov r9d, 40h ; '@'
push r14
call init_dynamic_array2
add rsp, 10h
test al, al
jz short loc_5BA9C
loc_5BA92:
mov rdi, rbx
call _ma_end_block_record
jmp short loc_5BAF2
loc_5BA9C:
lea esi, ds:0[r12*8]
sub esi, r12d
mov [rbx+118h], rsi
xor edi, edi
mov rdx, r14
call my_malloc
mov [rbx+90h], rax
test rax, rax
jz short loc_5BA92
mov eax, [r13+7C4h]
mov [rbx+610h], rax
mov eax, [r13+418h]
mov [rbx+618h], eax
add qword ptr [rbx+0D8h], 0Ch
add qword ptr [rbx+198h], 0Ch
xor r15d, r15d
loc_5BAF2:
mov eax, r15d
add rsp, 58h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| long long ma_init_block_record(long long a1)
{
long long v1; // r14
int v2; // r11d
int v3; // eax
long long v4; // r15
long long v5; // r10
int v6; // r11d
long long v7; // r12
long long v8; // rax
long long v9; // r15
unsigned int v10; // r12d
long long v11; // rsi
long long v12; // rax
long long v14; // [rsp+28h] [rbp-58h]
_DWORD *v15; // [rsp+50h] [rbp-30h]
v1 = ((unsigned __int8)(*(_BYTE *)(*(_QWORD *)a1 + 2009LL) != 0) << 16) | 0x10LL;
v2 = *(_DWORD *)(*(_QWORD *)a1 + 968LL);
v3 = *(_DWORD *)(*(_QWORD *)a1 + 980LL);
v15 = *(_DWORD **)a1;
v4 = *(unsigned int *)(*(_QWORD *)a1 + 1008LL);
v5 = (unsigned int)(v2 + 8);
v14 = (unsigned int)(v3 + 4 * v2 + 5);
v6 = v2 - v4;
v7 = (unsigned int)(v4 + 2);
v9 = 8 * v4;
v8 = my_multi_malloc(
0,
v1,
(int)a1 + 200,
*(_DWORD *)(*(_QWORD *)a1 + 1012LL),
(int)a1 + 208,
v3 + 2,
a1 + 224,
v9,
a1 + 216,
4LL * (unsigned int)(v6 + 3),
a1 + 168,
8 * v7,
a1 + 392,
*(unsigned int *)(*(_QWORD *)a1 + 1012LL),
a1 + 400,
(unsigned int)(v3 + 2),
a1 + 416,
v9,
a1 + 408,
4LL * (unsigned int)(v6 + 3),
a1 + 792,
16 * v5,
a1 + 968,
v14,
0LL,
0LL);
LOBYTE(v9) = 1;
if ( v8 )
{
*(_QWORD *)(a1 + 208) += 2LL;
*(_QWORD *)(a1 + 400) += 2LL;
v10 = (((unsigned int)&xmmword_100000 / (v15[495] - v15[774] - 12)) >> 7) + 5;
if ( (unsigned __int8)init_dynamic_array2(0, (int)a1 + 704, 24, 0, v10, 64, v1)
|| (v11 = 7 * v10, *(_QWORD *)(a1 + 280) = v11,
v12 = my_malloc(0LL, v11, v1),
(*(_QWORD *)(a1 + 144) = v12) == 0LL) )
{
ma_end_block_record(a1);
}
else
{
*(_QWORD *)(a1 + 1552) = (unsigned int)v15[497];
*(_DWORD *)(a1 + 1560) = v15[262];
*(_QWORD *)(a1 + 216) += 12LL;
*(_QWORD *)(a1 + 408) += 12LL;
LODWORD(v9) = 0;
}
}
return (unsigned int)v9;
}
| _ma_init_block_record:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x58
MOV RBX,RDI
MOV RSI,qword ptr [RDI]
XOR R14D,R14D
CMP byte ptr [RSI + 0x7d9],0x0
SETNZ R14B
SHL R14D,0x10
OR R14,0x10
LEA RDX,[RDI + 0xc8]
MOV ECX,dword ptr [RSI + 0x3f4]
LEA R8,[RDI + 0xd0]
MOV R11D,dword ptr [RSI + 0x3c8]
MOV EAX,dword ptr [RSI + 0x3d4]
LEA R9D,[RAX + 0x2]
ADD RDI,0xe0
MOV qword ptr [RBP + -0x78],RDI
MOV qword ptr [RBP + -0x30],RSI
MOV R15D,dword ptr [RSI + 0x3f0]
LEA R10D,[R11 + 0x8]
LEA EAX,[RAX + R11*0x4]
ADD EAX,0x5
MOV qword ptr [RBP + -0x58],RAX
SUB R11D,R15D
LEA R12D,[R15 + 0x2]
SHL R15,0x3
ADD R11D,0x3
SHL R11,0x2
SHL R12,0x3
SHL R10,0x4
LEA RAX,[RBX + 0xd8]
MOV qword ptr [RBP + -0x70],RAX
LEA RAX,[RBX + 0xa8]
MOV qword ptr [RBP + -0x68],RAX
LEA RAX,[RBX + 0x188]
MOV qword ptr [RBP + -0x60],RAX
LEA RAX,[RBX + 0x190]
MOV qword ptr [RBP + -0x50],RAX
LEA RAX,[RBX + 0x1a0]
MOV qword ptr [RBP + -0x48],RAX
LEA RAX,[RBX + 0x198]
MOV qword ptr [RBP + -0x40],RAX
LEA RAX,[RBX + 0x318]
MOV qword ptr [RBP + -0x38],RAX
LEA R13,[RBX + 0x3c8]
XOR EDI,EDI
MOV RSI,R14
XOR EAX,EAX
PUSH 0x0
PUSH 0x0
PUSH qword ptr [RBP + -0x58]
PUSH R13
PUSH R10
PUSH qword ptr [RBP + -0x38]
PUSH R11
PUSH qword ptr [RBP + -0x40]
PUSH R15
PUSH qword ptr [RBP + -0x48]
PUSH R9
PUSH qword ptr [RBP + -0x50]
PUSH RCX
PUSH qword ptr [RBP + -0x60]
PUSH R12
PUSH qword ptr [RBP + -0x68]
PUSH R11
PUSH qword ptr [RBP + -0x70]
PUSH R15
PUSH qword ptr [RBP + -0x78]
CALL 0x0019c3dc
ADD RSP,0xa0
MOV R15B,0x1
TEST RAX,RAX
JZ 0x0015baf2
ADD qword ptr [RBX + 0xd0],0x2
ADD qword ptr [RBX + 0x190],0x2
MOV R13,qword ptr [RBP + -0x30]
MOV ECX,dword ptr [R13 + 0x7bc]
SUB ECX,dword ptr [R13 + 0xc18]
ADD ECX,-0xc
MOV EAX,0x100000
XOR EDX,EDX
DIV ECX
MOV R12D,EAX
SHR R12D,0x7
ADD R12D,0x5
LEA RSI,[RBX + 0x2c0]
SUB RSP,0x8
XOR EDI,EDI
MOV EDX,0x18
XOR ECX,ECX
MOV R8D,R12D
MOV R9D,0x40
PUSH R14
CALL 0x00191678
ADD RSP,0x10
TEST AL,AL
JZ 0x0015ba9c
LAB_0015ba92:
MOV RDI,RBX
CALL 0x0015bb04
JMP 0x0015baf2
LAB_0015ba9c:
LEA ESI,[R12*0x8]
SUB ESI,R12D
MOV qword ptr [RBX + 0x118],RSI
XOR EDI,EDI
MOV RDX,R14
CALL 0x0019f901
MOV qword ptr [RBX + 0x90],RAX
TEST RAX,RAX
JZ 0x0015ba92
MOV EAX,dword ptr [R13 + 0x7c4]
MOV qword ptr [RBX + 0x610],RAX
MOV EAX,dword ptr [R13 + 0x418]
MOV dword ptr [RBX + 0x618],EAX
ADD qword ptr [RBX + 0xd8],0xc
ADD qword ptr [RBX + 0x198],0xc
XOR R15D,R15D
LAB_0015baf2:
MOV EAX,R15D
ADD RSP,0x58
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
ulong _ma_init_block_record(long *param_1)
{
int iVar1;
uint uVar2;
long lVar3;
char cVar4;
ulong uVar5;
long lVar6;
int iVar7;
ulong uVar8;
long lVar9;
ulong uVar10;
lVar3 = *param_1;
uVar8 = (ulong)(*(char *)(lVar3 + 0x7d9) != '\0') << 0x10 | 0x10;
iVar1 = *(int *)(lVar3 + 0x3c8);
iVar7 = *(int *)(lVar3 + 0x3d4) + 2;
uVar2 = *(uint *)(lVar3 + 0x3f0);
lVar9 = (ulong)uVar2 << 3;
lVar6 = (ulong)((iVar1 - uVar2) + 3) << 2;
lVar6 = my_multi_malloc(0,uVar8,param_1 + 0x19,*(int4 *)(lVar3 + 0x3f4),param_1 + 0x1a,iVar7
,param_1 + 0x1c,lVar9,param_1 + 0x1b,lVar6,param_1 + 0x15,
(ulong)(uVar2 + 2) << 3,param_1 + 0x31,*(int4 *)(lVar3 + 0x3f4),
param_1 + 0x32,iVar7,param_1 + 0x34,lVar9,param_1 + 0x33,lVar6,
param_1 + 99,(ulong)(iVar1 + 8) << 4,param_1 + 0x79,
*(int *)(lVar3 + 0x3d4) + iVar1 * 4 + 5,0,0);
uVar10 = CONCAT71((int7)((ulong)lVar9 >> 8),1);
if (lVar6 != 0) {
param_1[0x1a] = param_1[0x1a] + 2;
param_1[0x32] = param_1[0x32] + 2;
iVar7 = (int)(0x100000 / (ulong)((*(int *)(lVar3 + 0x7bc) - *(int *)(lVar3 + 0xc18)) - 0xc) >> 7
) + 5;
cVar4 = init_dynamic_array2(0,param_1 + 0x58,0x18,0,iVar7,0x40,uVar8);
if (cVar4 == '\0') {
uVar5 = (ulong)(uint)(iVar7 * 7);
param_1[0x23] = uVar5;
lVar6 = my_malloc(0,uVar5,uVar8);
param_1[0x12] = lVar6;
if (lVar6 != 0) {
param_1[0xc2] = (ulong)*(uint *)(lVar3 + 0x7c4);
*(int4 *)(param_1 + 0xc3) = *(int4 *)(lVar3 + 0x418);
param_1[0x1b] = param_1[0x1b] + 0xc;
param_1[0x33] = param_1[0x33] + 0xc;
uVar10 = 0;
goto LAB_0015baf2;
}
}
_ma_end_block_record(param_1);
}
LAB_0015baf2:
return uVar10 & 0xffffffff;
}
|
|
6,335 | ma_init_alloc_root | eloqsql/libmariadb/libmariadb/ma_alloc.c | void ma_init_alloc_root(MA_MEM_ROOT *mem_root, size_t block_size, size_t pre_alloc_size)
{
mem_root->free= mem_root->used= mem_root->pre_alloc= 0;
mem_root->min_malloc=32;
mem_root->block_size= (block_size-MALLOC_OVERHEAD-sizeof(MA_USED_MEM)+8);
mem_root->error_handler=0;
mem_root->block_num= 4;
mem_root->first_block_usage= 0;
#if !(defined(HAVE_purify) && defined(EXTRA_DEBUG))
if (pre_alloc_size)
{
if ((mem_root->free = mem_root->pre_alloc=
(MA_USED_MEM*) malloc(pre_alloc_size+ ALIGN_SIZE(sizeof(MA_USED_MEM)))))
{
mem_root->free->size=pre_alloc_size+ALIGN_SIZE(sizeof(MA_USED_MEM));
mem_root->free->left=pre_alloc_size;
mem_root->free->next=0;
}
}
#endif
} | O0 | c | ma_init_alloc_root:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x8(%rbp), %rax
movq $0x0, 0x10(%rax)
movq -0x8(%rbp), %rax
movq $0x0, 0x8(%rax)
movq -0x8(%rbp), %rax
movq $0x0, (%rax)
movq -0x8(%rbp), %rax
movq $0x20, 0x18(%rax)
movq -0x10(%rbp), %rcx
subq $0x8, %rcx
subq $0x18, %rcx
addq $0x8, %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x20(%rax)
movq -0x8(%rbp), %rax
movq $0x0, 0x30(%rax)
movq -0x8(%rbp), %rax
movl $0x4, 0x28(%rax)
movq -0x8(%rbp), %rax
movl $0x0, 0x2c(%rax)
cmpq $0x0, -0x18(%rbp)
je 0x2c8a8
movq -0x18(%rbp), %rdi
addq $0x18, %rdi
callq 0x135b0
movq -0x8(%rbp), %rcx
movq %rax, 0x10(%rcx)
movq -0x8(%rbp), %rcx
movq %rax, (%rcx)
cmpq $0x0, %rax
je 0x2c8a6
movq -0x18(%rbp), %rcx
addq $0x18, %rcx
movq -0x8(%rbp), %rax
movq (%rax), %rax
movq %rcx, 0x10(%rax)
movq -0x18(%rbp), %rcx
movq -0x8(%rbp), %rax
movq (%rax), %rax
movq %rcx, 0x8(%rax)
movq -0x8(%rbp), %rax
movq (%rax), %rax
movq $0x0, (%rax)
jmp 0x2c8a8
addq $0x20, %rsp
popq %rbp
retq
nop
| ma_init_alloc_root:
push rbp
mov rbp, rsp
sub rsp, 20h
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov [rbp+var_18], rdx
mov rax, [rbp+var_8]
mov qword ptr [rax+10h], 0
mov rax, [rbp+var_8]
mov qword ptr [rax+8], 0
mov rax, [rbp+var_8]
mov qword ptr [rax], 0
mov rax, [rbp+var_8]
mov qword ptr [rax+18h], 20h ; ' '
mov rcx, [rbp+var_10]
sub rcx, 8
sub rcx, 18h
add rcx, 8
mov rax, [rbp+var_8]
mov [rax+20h], rcx
mov rax, [rbp+var_8]
mov qword ptr [rax+30h], 0
mov rax, [rbp+var_8]
mov dword ptr [rax+28h], 4
mov rax, [rbp+var_8]
mov dword ptr [rax+2Ch], 0
cmp [rbp+var_18], 0
jz short loc_2C8A8
mov rdi, [rbp+var_18]
add rdi, 18h
call _malloc
mov rcx, [rbp+var_8]
mov [rcx+10h], rax
mov rcx, [rbp+var_8]
mov [rcx], rax
cmp rax, 0
jz short loc_2C8A6
mov rcx, [rbp+var_18]
add rcx, 18h
mov rax, [rbp+var_8]
mov rax, [rax]
mov [rax+10h], rcx
mov rcx, [rbp+var_18]
mov rax, [rbp+var_8]
mov rax, [rax]
mov [rax+8], rcx
mov rax, [rbp+var_8]
mov rax, [rax]
mov qword ptr [rax], 0
loc_2C8A6:
jmp short $+2
loc_2C8A8:
add rsp, 20h
pop rbp
retn
| long long ma_init_alloc_root(long long *a1, long long a2, long long a3)
{
long long result; // rax
a1[2] = 0LL;
a1[1] = 0LL;
*a1 = 0LL;
a1[3] = 32LL;
a1[4] = a2 - 32 + 8;
a1[6] = 0LL;
*((_DWORD *)a1 + 10) = 4;
result = (long long)a1;
*((_DWORD *)a1 + 11) = 0;
if ( a3 )
{
result = malloc(a3 + 24);
a1[2] = result;
*a1 = result;
if ( result )
{
*(_QWORD *)(*a1 + 16) = a3 + 24;
*(_QWORD *)(*a1 + 8) = a3;
result = *a1;
*(_QWORD *)*a1 = 0LL;
}
}
return result;
}
| ma_init_alloc_root:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x20
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV qword ptr [RBP + -0x18],RDX
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RAX + 0x10],0x0
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RAX + 0x8],0x0
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RAX],0x0
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RAX + 0x18],0x20
MOV RCX,qword ptr [RBP + -0x10]
SUB RCX,0x8
SUB RCX,0x18
ADD RCX,0x8
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RAX + 0x20],RCX
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RAX + 0x30],0x0
MOV RAX,qword ptr [RBP + -0x8]
MOV dword ptr [RAX + 0x28],0x4
MOV RAX,qword ptr [RBP + -0x8]
MOV dword ptr [RAX + 0x2c],0x0
CMP qword ptr [RBP + -0x18],0x0
JZ 0x0012c8a8
MOV RDI,qword ptr [RBP + -0x18]
ADD RDI,0x18
CALL 0x001135b0
MOV RCX,qword ptr [RBP + -0x8]
MOV qword ptr [RCX + 0x10],RAX
MOV RCX,qword ptr [RBP + -0x8]
MOV qword ptr [RCX],RAX
CMP RAX,0x0
JZ 0x0012c8a6
MOV RCX,qword ptr [RBP + -0x18]
ADD RCX,0x18
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RAX + 0x10],RCX
MOV RCX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RAX + 0x8],RCX
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RAX],0x0
LAB_0012c8a6:
JMP 0x0012c8a8
LAB_0012c8a8:
ADD RSP,0x20
POP RBP
RET
|
void ma_init_alloc_root(long *param_1,long param_2,long param_3)
{
void *pvVar1;
param_1[2] = 0;
param_1[1] = 0;
*param_1 = 0;
param_1[3] = 0x20;
param_1[4] = param_2 + -0x18;
param_1[6] = 0;
*(int4 *)(param_1 + 5) = 4;
*(int4 *)((long)param_1 + 0x2c) = 0;
if (param_3 != 0) {
pvVar1 = malloc(param_3 + 0x18);
param_1[2] = (long)pvVar1;
*param_1 = (long)pvVar1;
if (pvVar1 != (void *)0x0) {
*(long *)(*param_1 + 0x10) = param_3 + 0x18;
*(long *)(*param_1 + 8) = param_3;
*(int8 *)*param_1 = 0;
}
}
return;
}
|
|
6,336 | mi_get_pack_key | eloqsql/storage/myisam/mi_search.c | uint _mi_get_pack_key(register MI_KEYDEF *keyinfo, uint nod_flag,
register uchar **page_pos, register uchar *key)
{
reg1 HA_KEYSEG *keyseg;
uchar *start_key,*page=*page_pos;
uint length;
start_key=key;
for (keyseg=keyinfo->seg ; keyseg->type ;keyseg++)
{
if (keyseg->flag & HA_PACK_KEY)
{
/* key with length, packed to previous key */
uchar *start=key;
uint packed= *page & 128,tot_length,rest_length;
if (keyseg->length >= 127)
{
length=mi_uint2korr(page) & 32767;
page+=2;
}
else
length= *page++ & 127;
if (packed)
{
if (length > (uint) keyseg->length)
{
mi_print_error(keyinfo->share, HA_ERR_CRASHED);
my_errno=HA_ERR_CRASHED;
return 0; /* Error */
}
if (length == 0) /* Same key */
{
if (keyseg->flag & HA_NULL_PART)
*key++=1; /* Can't be NULL */
get_key_length(length,key);
key+= length; /* Same diff_key as prev */
if (length > keyseg->length)
{
DBUG_PRINT("error",
("Found too long null packed key: %u of %u at %p",
length, keyseg->length, *page_pos));
DBUG_DUMP("key", *page_pos, 16);
mi_print_error(keyinfo->share, HA_ERR_CRASHED);
my_errno=HA_ERR_CRASHED;
return 0;
}
continue;
}
if (keyseg->flag & HA_NULL_PART)
{
key++; /* Skip null marker*/
start++;
}
get_key_length(rest_length,page);
tot_length=rest_length+length;
/* If the stored length has changed, we must move the key */
if (tot_length >= 255 && *start != 255)
{
/* length prefix changed from a length of one to a length of 3 */
bmove_upp(key+length+3, key+length+1, length);
*key=255;
mi_int2store(key+1,tot_length);
key+=3+length;
}
else if (tot_length < 255 && *start == 255)
{
bmove(key+1,key+3,length);
*key=tot_length;
key+=1+length;
}
else
{
store_key_length_inc(key,tot_length);
key+=length;
}
memcpy(key,page,rest_length);
page+=rest_length;
key+=rest_length;
continue;
}
else
{
if (keyseg->flag & HA_NULL_PART)
{
if (!length--) /* Null part */
{
*key++=0;
continue;
}
*key++=1; /* Not null */
}
}
if (length > (uint) keyseg->length)
{
DBUG_PRINT("error",("Found too long packed key: %u of %u at %p",
length, keyseg->length, *page_pos));
DBUG_DUMP("key", *page_pos, 16);
mi_print_error(keyinfo->share, HA_ERR_CRASHED);
my_errno=HA_ERR_CRASHED;
return 0; /* Error */
}
store_key_length_inc(key,length);
}
else
{
if (keyseg->flag & HA_NULL_PART)
{
if (!(*key++ = *page++))
continue;
}
if (keyseg->flag &
(HA_VAR_LENGTH_PART | HA_BLOB_PART | HA_SPACE_PACK))
{
uchar *tmp=page;
get_key_length(length,tmp);
length+=(uint) (tmp-page);
}
else
length=keyseg->length;
}
memcpy((uchar*) key,(uchar*) page,(size_t) length);
key+=length;
page+=length;
}
length=keyseg->length+nod_flag;
bmove((uchar*) key,(uchar*) page,length);
*page_pos= page+length;
return ((uint) (key-start_key)+keyseg->length);
} | O3 | c | mi_get_pack_key:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %rcx, %rbx
movl %esi, -0x44(%rbp)
movq %rdx, -0x50(%rbp)
movq (%rdx), %r15
movq 0x28(%rdi), %r12
cmpb $0x0, 0x18(%r12)
movq %rcx, -0x58(%rbp)
je 0x88522
movq %rdi, -0x30(%rbp)
movzwl 0x12(%r12), %ecx
movzwl %cx, %edx
testb $0x2, %dl
jne 0x88308
testb $0x10, %dl
je 0x882e5
movb (%r15), %al
incq %r15
movb %al, (%rbx)
incq %rbx
testb %al, %al
je 0x883de
movzwl 0x12(%r12), %ecx
testb $0x29, %cl
je 0x8839d
movzbl (%r15), %ecx
cmpl $0xff, %ecx
je 0x883b4
movl $0x1, %eax
jmp 0x883c5
movzbl (%r15), %edi
movzwl 0x14(%r12), %esi
cmpl $0x7f, %esi
jb 0x8832d
movzbl 0x1(%r15), %r8d
movl %edi, %eax
andl $0x7f, %eax
shll $0x8, %eax
orl %r8d, %eax
addq $0x2, %r15
jmp 0x88335
incq %r15
movl %edi, %eax
andl $0x7f, %eax
testb %dil, %dil
js 0x8836e
testb $0x10, %cl
je 0x88355
testl %eax, %eax
je 0x8841a
decl %eax
movb $0x1, (%rbx)
incq %rbx
movzwl 0x14(%r12), %esi
movzwl %si, %ecx
cmpl %ecx, %eax
ja 0x88552
cmpl $0xfe, %eax
ja 0x883a5
movb %al, (%rbx)
incq %rbx
jmp 0x883c7
cmpl %esi, %eax
ja 0x88552
testl %eax, %eax
je 0x883f7
btl $0x4, %edx
adcq $0x0, %rbx
movzbl (%r15), %r14d
cmpl $0xff, %r14d
je 0x88422
movl $0x1, %esi
jmp 0x88434
movzwl 0x14(%r12), %eax
jmp 0x883c7
movb $-0x1, (%rbx)
movb %al, 0x2(%rbx)
movb %ah, 0x1(%rbx)
addq $0x3, %rbx
jmp 0x883c7
movzwl 0x1(%r15), %eax
rolw $0x8, %ax
movzwl %ax, %ecx
movl $0x3, %eax
addl %ecx, %eax
movl %eax, %r13d
movq %rbx, %rdi
movq %r15, %rsi
movq %r13, %rdx
callq 0x2a0a0
addq %r13, %rbx
addq %r13, %r15
leaq 0x20(%r12), %r14
cmpb $0x0, 0x38(%r12)
movq %r14, %r12
jne 0x882b9
jmp 0x88525
testb $0x10, %cl
je 0x88402
movb $0x1, (%rbx)
incq %rbx
movzbl (%rbx), %eax
cmpl $0xff, %eax
je 0x88491
movl $0x1, %ecx
jmp 0x884a1
movb $0x0, (%rbx)
incq %rbx
jmp 0x883de
movzwl 0x1(%r15), %ecx
rolw $0x8, %cx
movzwl %cx, %r14d
movl $0x3, %esi
leal (%r14,%rax), %ecx
movb (%rbx), %dl
cmpl $0xff, %ecx
jb 0x8847f
cmpb $-0x1, %dl
je 0x884bc
movl %eax, %edx
leaq (%rbx,%rdx), %r13
addq $0x3, %r13
movq %rsi, -0x40(%rbp)
leaq (%rbx,%rdx), %rsi
incq %rsi
movq %r13, %rdi
movl %ecx, -0x38(%rbp)
callq 0xb18c8
movq -0x40(%rbp), %rsi
movb $-0x1, (%rbx)
movl -0x38(%rbp), %eax
movb %al, 0x2(%rbx)
movb %ah, 0x1(%rbx)
movq %r13, %rbx
jmp 0x88503
movl %ecx, %r13d
movl $0x1, %ecx
cmpb $-0x1, %dl
je 0x884db
movq %rbx, %rdx
jmp 0x884ce
movzwl 0x1(%rbx), %eax
rolw $0x8, %ax
movzwl %ax, %eax
movl $0x3, %ecx
movzwl 0x14(%r12), %edx
cmpl %edx, %eax
ja 0x88552
addq %rcx, %rbx
movl %eax, %eax
addq %rax, %rbx
jmp 0x883de
leaq 0x1(%rbx), %rdx
movb %cl, 0x2(%rbx)
shrl $0x8, %ecx
movl %ecx, %r13d
movl $0x3, %ecx
movb %r13b, (%rdx)
movl %eax, %eax
addq %rcx, %rax
addq %rax, %rbx
jmp 0x88503
leaq 0x1(%rbx), %rdi
movq %rsi, -0x40(%rbp)
leaq 0x3(%rbx), %rsi
movl %eax, %edx
movq %rdx, -0x38(%rbp)
callq 0x2a130
movq -0x40(%rbp), %rsi
movb %r13b, (%rbx)
movq -0x38(%rbp), %rax
addq %rax, %rbx
incq %rbx
addq %rsi, %r15
movl %r14d, %r13d
movq %rbx, %rdi
movq %r15, %rsi
movq %r13, %rdx
callq 0x2a0a0
addq %r13, %r15
addq %r13, %rbx
jmp 0x883de
movq %r12, %r14
movzwl 0x14(%r14), %r13d
addl -0x44(%rbp), %r13d
movq %rbx, %rdi
movq %r15, %rsi
movq %r13, %rdx
callq 0x2a130
addq %r13, %r15
movq -0x50(%rbp), %rax
movq %r15, (%rax)
subl -0x58(%rbp), %ebx
movzwl 0x14(%r14), %eax
addl %ebx, %eax
jmp 0x88577
movq -0x30(%rbp), %rax
movq (%rax), %rax
movq 0x268(%rax), %rsi
movl $0x7e, %edi
callq 0x7dc92
callq 0xa813e
movl $0x7e, (%rax)
xorl %eax, %eax
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| _mi_get_pack_key:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 38h
mov rbx, rcx
mov [rbp+var_44], esi
mov [rbp+var_50], rdx
mov r15, [rdx]
mov r12, [rdi+28h]
cmp byte ptr [r12+18h], 0
mov [rbp+var_58], rcx
jz loc_88522
mov [rbp+var_30], rdi
loc_882B9:
movzx ecx, word ptr [r12+12h]
movzx edx, cx
test dl, 2
jnz short loc_88308
test dl, 10h
jz short loc_882E5
mov al, [r15]
inc r15
mov [rbx], al
inc rbx
test al, al
jz loc_883DE
movzx ecx, word ptr [r12+12h]
loc_882E5:
test cl, 29h
jz loc_8839D
movzx ecx, byte ptr [r15]
cmp ecx, 0FFh
jz loc_883B4
mov eax, 1
jmp loc_883C5
loc_88308:
movzx edi, byte ptr [r15]
movzx esi, word ptr [r12+14h]
cmp esi, 7Fh
jb short loc_8832D
movzx r8d, byte ptr [r15+1]
mov eax, edi
and eax, 7Fh
shl eax, 8
or eax, r8d
add r15, 2
jmp short loc_88335
loc_8832D:
inc r15
mov eax, edi
and eax, 7Fh
loc_88335:
test dil, dil
js short loc_8836E
test cl, 10h
jz short loc_88355
test eax, eax
jz loc_8841A
dec eax
mov byte ptr [rbx], 1
inc rbx
movzx esi, word ptr [r12+14h]
loc_88355:
movzx ecx, si
cmp eax, ecx
ja loc_88552
cmp eax, 0FEh
ja short loc_883A5
mov [rbx], al
inc rbx
jmp short loc_883C7
loc_8836E:
cmp eax, esi
ja loc_88552
test eax, eax
jz short loc_883F7
bt edx, 4
adc rbx, 0
movzx r14d, byte ptr [r15]
cmp r14d, 0FFh
jz loc_88422
mov esi, 1
jmp loc_88434
loc_8839D:
movzx eax, word ptr [r12+14h]
jmp short loc_883C7
loc_883A5:
mov byte ptr [rbx], 0FFh
mov [rbx+2], al
mov [rbx+1], ah
add rbx, 3
jmp short loc_883C7
loc_883B4:
movzx eax, word ptr [r15+1]
rol ax, 8
movzx ecx, ax
mov eax, 3
loc_883C5:
add eax, ecx
loc_883C7:
mov r13d, eax
mov rdi, rbx
mov rsi, r15
mov rdx, r13
call _memcpy
add rbx, r13
add r15, r13
loc_883DE:
lea r14, [r12+20h]
cmp byte ptr [r12+38h], 0
mov r12, r14
jnz loc_882B9
jmp loc_88525
loc_883F7:
test cl, 10h
jz short loc_88402
mov byte ptr [rbx], 1
inc rbx
loc_88402:
movzx eax, byte ptr [rbx]
cmp eax, 0FFh
jz loc_88491
mov ecx, 1
jmp loc_884A1
loc_8841A:
mov byte ptr [rbx], 0
inc rbx
jmp short loc_883DE
loc_88422:
movzx ecx, word ptr [r15+1]
rol cx, 8
movzx r14d, cx
mov esi, 3
loc_88434:
lea ecx, [r14+rax]
mov dl, [rbx]
cmp ecx, 0FFh
jb short loc_8847F
cmp dl, 0FFh
jz short loc_884BC
mov edx, eax
lea r13, [rbx+rdx]
add r13, 3
mov [rbp+var_40], rsi
lea rsi, [rbx+rdx]
inc rsi
mov rdi, r13
mov dword ptr [rbp+var_38], ecx
call bmove_upp
mov rsi, [rbp+var_40]
mov byte ptr [rbx], 0FFh
mov eax, dword ptr [rbp+var_38]
mov [rbx+2], al
mov [rbx+1], ah
mov rbx, r13
jmp loc_88503
loc_8847F:
mov r13d, ecx
mov ecx, 1
cmp dl, 0FFh
jz short loc_884DB
mov rdx, rbx
jmp short loc_884CE
loc_88491:
movzx eax, word ptr [rbx+1]
rol ax, 8
movzx eax, ax
mov ecx, 3
loc_884A1:
movzx edx, word ptr [r12+14h]
cmp eax, edx
ja loc_88552
add rbx, rcx
mov eax, eax
add rbx, rax
jmp loc_883DE
loc_884BC:
lea rdx, [rbx+1]
mov [rbx+2], cl
shr ecx, 8
mov r13d, ecx
mov ecx, 3
loc_884CE:
mov [rdx], r13b
mov eax, eax
add rax, rcx
add rbx, rax
jmp short loc_88503
loc_884DB:
lea rdi, [rbx+1]
mov [rbp+var_40], rsi
lea rsi, [rbx+3]
mov edx, eax
mov [rbp+var_38], rdx
call _memmove
mov rsi, [rbp+var_40]
mov [rbx], r13b
mov rax, [rbp+var_38]
add rbx, rax
inc rbx
loc_88503:
add r15, rsi
mov r13d, r14d
mov rdi, rbx
mov rsi, r15
mov rdx, r13
call _memcpy
add r15, r13
add rbx, r13
jmp loc_883DE
loc_88522:
mov r14, r12
loc_88525:
movzx r13d, word ptr [r14+14h]
add r13d, [rbp+var_44]
mov rdi, rbx
mov rsi, r15
mov rdx, r13
call _memmove
add r15, r13
mov rax, [rbp+var_50]
mov [rax], r15
sub ebx, dword ptr [rbp+var_58]
movzx eax, word ptr [r14+14h]
add eax, ebx
jmp short loc_88577
loc_88552:
mov rax, [rbp+var_30]
mov rax, [rax]
mov rsi, [rax+268h]
mov edi, 7Eh ; '~'
call mi_report_error
call _my_thread_var
mov dword ptr [rax], 7Eh ; '~'
xor eax, eax
loc_88577:
add rsp, 38h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| long long mi_get_pack_key(_QWORD *a1, int a2, unsigned __int8 **a3, unsigned __int8 *a4)
{
unsigned __int8 *v4; // rbx
unsigned __int8 *v5; // r15
long long v6; // r12
__int16 v7; // cx
unsigned __int8 v8; // al
int v9; // ecx
int v10; // eax
char v11; // di
unsigned int v12; // esi
unsigned int v13; // eax
unsigned __int8 *v14; // rbx
unsigned int v15; // r14d
long long v16; // rsi
long long v17; // r13
long long v18; // r14
bool v19; // zf
unsigned int v20; // eax
long long v21; // rcx
unsigned __int8 v22; // dl
long long v23; // r13
long long v24; // rbx
unsigned __int8 v25; // r13
long long v26; // rcx
unsigned __int8 *v27; // rdx
unsigned __int8 *v28; // r15
long long v29; // r13
int v31; // [rsp+8h] [rbp-58h]
__int16 v34; // [rsp+28h] [rbp-38h]
long long v35; // [rsp+28h] [rbp-38h]
v4 = a4;
v5 = *a3;
v6 = a1[5];
v31 = (int)a4;
if ( *(_BYTE *)(v6 + 24) )
{
while ( 1 )
{
v7 = *(_WORD *)(v6 + 18);
if ( (v7 & 2) != 0 )
{
v11 = *v5;
v12 = *(unsigned __int16 *)(v6 + 20);
if ( v12 < 0x7F )
{
++v5;
v13 = v11 & 0x7F;
}
else
{
v13 = v5[1] | ((v11 & 0x7F) << 8);
v5 += 2;
}
if ( v11 >= 0 )
{
if ( (v7 & 0x10) != 0 )
{
if ( !v13 )
{
*v4++ = 0;
goto LABEL_28;
}
--v13;
*v4++ = 1;
LOWORD(v12) = *(_WORD *)(v6 + 20);
}
if ( v13 > (unsigned __int16)v12 )
goto LABEL_50;
if ( v13 > 0xFE )
{
*v4 = -1;
v4[2] = v13;
v4[1] = BYTE1(v13);
v4 += 3;
}
else
{
*v4++ = v13;
}
goto LABEL_27;
}
if ( v13 > v12 )
goto LABEL_50;
if ( v13 )
{
v14 = &v4[(v7 & 0x10) != 0];
v15 = *v5;
if ( v15 == 255 )
{
v15 = (unsigned __int16)__ROL2__(*(_WORD *)(v5 + 1), 8);
v16 = 3LL;
}
else
{
v16 = 1LL;
}
v22 = *v14;
if ( v15 + v13 < 0xFF )
{
v25 = v15 + v13;
v26 = 1LL;
if ( v22 == 0xFF )
{
v35 = v13;
memmove(v14 + 1, v14 + 3, v13);
*v14 = v25;
v24 = (long long)&v14[v35 + 1];
goto LABEL_47;
}
v27 = v14;
}
else
{
if ( v22 != 0xFF )
{
v23 = (long long)&v14[v13 + 3];
v34 = v15 + v13;
bmove_upp(v23, &v14[v13 + 1], v13);
*v14 = -1;
v14[2] = v34;
v14[1] = HIBYTE(v34);
v24 = v23;
LABEL_47:
v28 = &v5[v16];
memcpy(v24, v28, v15);
v5 = &v28[v15];
v4 = (unsigned __int8 *)(v15 + v24);
goto LABEL_28;
}
v27 = v14 + 1;
v14[2] = v15 + v13;
v25 = (unsigned __int16)(v15 + v13) >> 8;
v26 = 3LL;
}
*v27 = v25;
v24 = (long long)&v14[v26 + v13];
goto LABEL_47;
}
if ( (v7 & 0x10) != 0 )
*v4++ = 1;
v20 = *v4;
if ( v20 == 255 )
{
v20 = (unsigned __int16)__ROL2__(*(_WORD *)(v4 + 1), 8);
v21 = 3LL;
}
else
{
v21 = 1LL;
}
if ( v20 > *(unsigned __int16 *)(v6 + 20) )
{
LABEL_50:
mi_report_error(126, *(_QWORD *)(*a1 + 616LL));
*(_DWORD *)my_thread_var(126LL) = 126;
return 0LL;
}
v4 += v20 + v21;
}
else
{
if ( (v7 & 0x10) == 0 )
goto LABEL_6;
v8 = *v5++;
*v4++ = v8;
if ( v8 )
{
v7 = *(_WORD *)(v6 + 18);
LABEL_6:
if ( (v7 & 0x29) != 0 )
{
v9 = *v5;
if ( v9 == 255 )
{
v9 = (unsigned __int16)__ROL2__(*(_WORD *)(v5 + 1), 8);
v10 = 3;
}
else
{
v10 = 1;
}
v13 = v9 + v10;
}
else
{
v13 = *(unsigned __int16 *)(v6 + 20);
}
LABEL_27:
v17 = v13;
memcpy(v4, v5, v13);
v4 += v17;
v5 += v17;
}
}
LABEL_28:
v18 = v6 + 32;
v19 = *(_BYTE *)(v6 + 56) == 0;
v6 += 32LL;
if ( v19 )
goto LABEL_49;
}
}
v18 = a1[5];
LABEL_49:
v29 = a2 + (unsigned int)*(unsigned __int16 *)(v18 + 20);
memmove(v4, v5, v29);
*a3 = &v5[v29];
return (_DWORD)v4 - v31 + (unsigned int)*(unsigned __int16 *)(v18 + 20);
}
| _mi_get_pack_key:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x38
MOV RBX,RCX
MOV dword ptr [RBP + -0x44],ESI
MOV qword ptr [RBP + -0x50],RDX
MOV R15,qword ptr [RDX]
MOV R12,qword ptr [RDI + 0x28]
CMP byte ptr [R12 + 0x18],0x0
MOV qword ptr [RBP + -0x58],RCX
JZ 0x00188522
MOV qword ptr [RBP + -0x30],RDI
LAB_001882b9:
MOVZX ECX,word ptr [R12 + 0x12]
MOVZX EDX,CX
TEST DL,0x2
JNZ 0x00188308
TEST DL,0x10
JZ 0x001882e5
MOV AL,byte ptr [R15]
INC R15
MOV byte ptr [RBX],AL
INC RBX
TEST AL,AL
JZ 0x001883de
MOVZX ECX,word ptr [R12 + 0x12]
LAB_001882e5:
TEST CL,0x29
JZ 0x0018839d
MOVZX ECX,byte ptr [R15]
CMP ECX,0xff
JZ 0x001883b4
MOV EAX,0x1
JMP 0x001883c5
LAB_00188308:
MOVZX EDI,byte ptr [R15]
MOVZX ESI,word ptr [R12 + 0x14]
CMP ESI,0x7f
JC 0x0018832d
MOVZX R8D,byte ptr [R15 + 0x1]
MOV EAX,EDI
AND EAX,0x7f
SHL EAX,0x8
OR EAX,R8D
ADD R15,0x2
JMP 0x00188335
LAB_0018832d:
INC R15
MOV EAX,EDI
AND EAX,0x7f
LAB_00188335:
TEST DIL,DIL
JS 0x0018836e
TEST CL,0x10
JZ 0x00188355
TEST EAX,EAX
JZ 0x0018841a
DEC EAX
MOV byte ptr [RBX],0x1
INC RBX
MOVZX ESI,word ptr [R12 + 0x14]
LAB_00188355:
MOVZX ECX,SI
CMP EAX,ECX
JA 0x00188552
CMP EAX,0xfe
JA 0x001883a5
MOV byte ptr [RBX],AL
INC RBX
JMP 0x001883c7
LAB_0018836e:
CMP EAX,ESI
JA 0x00188552
TEST EAX,EAX
JZ 0x001883f7
BT EDX,0x4
ADC RBX,0x0
MOVZX R14D,byte ptr [R15]
CMP R14D,0xff
JZ 0x00188422
MOV ESI,0x1
JMP 0x00188434
LAB_0018839d:
MOVZX EAX,word ptr [R12 + 0x14]
JMP 0x001883c7
LAB_001883a5:
MOV byte ptr [RBX],0xff
MOV byte ptr [RBX + 0x2],AL
MOV byte ptr [RBX + 0x1],AH
ADD RBX,0x3
JMP 0x001883c7
LAB_001883b4:
MOVZX EAX,word ptr [R15 + 0x1]
ROL AX,0x8
MOVZX ECX,AX
MOV EAX,0x3
LAB_001883c5:
ADD EAX,ECX
LAB_001883c7:
MOV R13D,EAX
MOV RDI,RBX
MOV RSI,R15
MOV RDX,R13
CALL 0x0012a0a0
ADD RBX,R13
ADD R15,R13
LAB_001883de:
LEA R14,[R12 + 0x20]
CMP byte ptr [R12 + 0x38],0x0
MOV R12,R14
JNZ 0x001882b9
JMP 0x00188525
LAB_001883f7:
TEST CL,0x10
JZ 0x00188402
MOV byte ptr [RBX],0x1
INC RBX
LAB_00188402:
MOVZX EAX,byte ptr [RBX]
CMP EAX,0xff
JZ 0x00188491
MOV ECX,0x1
JMP 0x001884a1
LAB_0018841a:
MOV byte ptr [RBX],0x0
INC RBX
JMP 0x001883de
LAB_00188422:
MOVZX ECX,word ptr [R15 + 0x1]
ROL CX,0x8
MOVZX R14D,CX
MOV ESI,0x3
LAB_00188434:
LEA ECX,[R14 + RAX*0x1]
MOV DL,byte ptr [RBX]
CMP ECX,0xff
JC 0x0018847f
CMP DL,0xff
JZ 0x001884bc
MOV EDX,EAX
LEA R13,[RBX + RDX*0x1]
ADD R13,0x3
MOV qword ptr [RBP + -0x40],RSI
LEA RSI,[RBX + RDX*0x1]
INC RSI
MOV RDI,R13
MOV dword ptr [RBP + -0x38],ECX
CALL 0x001b18c8
MOV RSI,qword ptr [RBP + -0x40]
MOV byte ptr [RBX],0xff
MOV EAX,dword ptr [RBP + -0x38]
MOV byte ptr [RBX + 0x2],AL
MOV byte ptr [RBX + 0x1],AH
MOV RBX,R13
JMP 0x00188503
LAB_0018847f:
MOV R13D,ECX
MOV ECX,0x1
CMP DL,0xff
JZ 0x001884db
MOV RDX,RBX
JMP 0x001884ce
LAB_00188491:
MOVZX EAX,word ptr [RBX + 0x1]
ROL AX,0x8
MOVZX EAX,AX
MOV ECX,0x3
LAB_001884a1:
MOVZX EDX,word ptr [R12 + 0x14]
CMP EAX,EDX
JA 0x00188552
ADD RBX,RCX
MOV EAX,EAX
ADD RBX,RAX
JMP 0x001883de
LAB_001884bc:
LEA RDX,[RBX + 0x1]
MOV byte ptr [RBX + 0x2],CL
SHR ECX,0x8
MOV R13D,ECX
MOV ECX,0x3
LAB_001884ce:
MOV byte ptr [RDX],R13B
MOV EAX,EAX
ADD RAX,RCX
ADD RBX,RAX
JMP 0x00188503
LAB_001884db:
LEA RDI,[RBX + 0x1]
MOV qword ptr [RBP + -0x40],RSI
LEA RSI,[RBX + 0x3]
MOV EDX,EAX
MOV qword ptr [RBP + -0x38],RDX
CALL 0x0012a130
MOV RSI,qword ptr [RBP + -0x40]
MOV byte ptr [RBX],R13B
MOV RAX,qword ptr [RBP + -0x38]
ADD RBX,RAX
INC RBX
LAB_00188503:
ADD R15,RSI
MOV R13D,R14D
MOV RDI,RBX
MOV RSI,R15
MOV RDX,R13
CALL 0x0012a0a0
ADD R15,R13
ADD RBX,R13
JMP 0x001883de
LAB_00188522:
MOV R14,R12
LAB_00188525:
MOVZX R13D,word ptr [R14 + 0x14]
ADD R13D,dword ptr [RBP + -0x44]
MOV RDI,RBX
MOV RSI,R15
MOV RDX,R13
CALL 0x0012a130
ADD R15,R13
MOV RAX,qword ptr [RBP + -0x50]
MOV qword ptr [RAX],R15
SUB EBX,dword ptr [RBP + -0x58]
MOVZX EAX,word ptr [R14 + 0x14]
ADD EAX,EBX
JMP 0x00188577
LAB_00188552:
MOV RAX,qword ptr [RBP + -0x30]
MOV RAX,qword ptr [RAX]
MOV RSI,qword ptr [RAX + 0x268]
MOV EDI,0x7e
CALL 0x0017dc92
CALL 0x001a813e
MOV dword ptr [RAX],0x7e
XOR EAX,EAX
LAB_00188577:
ADD RSP,0x38
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
int _mi_get_pack_key(long *param_1,int param_2,int8 *param_3,byte *param_4)
{
uint uVar1;
char cVar2;
ushort uVar3;
ushort uVar4;
long lVar5;
int iVar6;
uint uVar7;
int4 *puVar8;
long lVar9;
byte *pbVar10;
long lVar11;
byte bVar12;
byte bVar13;
ulong uVar14;
byte *pbVar15;
uint uVar16;
byte *__src;
int local_60;
__src = (byte *)*param_3;
cVar2 = *(char *)(param_1[5] + 0x18);
lVar5 = param_1[5];
pbVar10 = param_4;
do {
if (cVar2 == '\0') {
uVar14 = (ulong)((uint)*(ushort *)(lVar5 + 0x14) + param_2);
memmove(pbVar10,__src,uVar14);
*param_3 = __src + uVar14;
local_60 = (int)param_4;
return (uint)*(ushort *)(lVar5 + 0x14) + ((int)pbVar10 - local_60);
}
uVar3 = *(ushort *)(lVar5 + 0x12);
if ((uVar3 & 2) == 0) {
if ((uVar3 & 0x10) != 0) {
bVar13 = *__src;
__src = __src + 1;
*pbVar10 = bVar13;
pbVar10 = pbVar10 + 1;
if (bVar13 == 0) goto LAB_001883de;
uVar3 = *(ushort *)(lVar5 + 0x12);
}
if ((uVar3 & 0x29) == 0) {
uVar7 = (uint)*(ushort *)(lVar5 + 0x14);
}
else {
uVar7 = (uint)*__src;
if (*__src == 0xff) {
uVar7 = (uint)(ushort)(*(ushort *)(__src + 1) << 8 | *(ushort *)(__src + 1) >> 8);
iVar6 = 3;
}
else {
iVar6 = 1;
}
uVar7 = iVar6 + uVar7;
}
LAB_001883c7:
uVar14 = (ulong)uVar7;
memcpy(pbVar10,__src,uVar14);
pbVar10 = pbVar10 + uVar14;
__src = __src + uVar14;
}
else {
bVar13 = *__src;
uVar4 = *(ushort *)(lVar5 + 0x14);
if (uVar4 < 0x7f) {
__src = __src + 1;
uVar7 = bVar13 & 0x7f;
}
else {
uVar7 = (bVar13 & 0x7f) << 8 | (uint)__src[1];
__src = __src + 2;
}
if (-1 < (char)bVar13) {
if ((uVar3 & 0x10) != 0) {
if (uVar7 == 0) {
*pbVar10 = 0;
pbVar10 = pbVar10 + 1;
goto LAB_001883de;
}
uVar7 = uVar7 - 1;
*pbVar10 = 1;
pbVar10 = pbVar10 + 1;
uVar4 = *(ushort *)(lVar5 + 0x14);
}
if (uVar4 < uVar7) {
LAB_00188552:
mi_report_error(0x7e,*(int8 *)(*param_1 + 0x268));
puVar8 = (int4 *)_my_thread_var();
*puVar8 = 0x7e;
return 0;
}
if (uVar7 < 0xff) {
*pbVar10 = (byte)uVar7;
pbVar10 = pbVar10 + 1;
}
else {
*pbVar10 = 0xff;
pbVar10[2] = (byte)uVar7;
pbVar10[1] = (byte)(uVar7 >> 8);
pbVar10 = pbVar10 + 3;
}
goto LAB_001883c7;
}
if (uVar4 <= uVar7 && uVar7 != uVar4) goto LAB_00188552;
if (uVar7 == 0) {
if ((uVar3 & 0x10) != 0) {
*pbVar10 = 1;
pbVar10 = pbVar10 + 1;
}
uVar7 = (uint)*pbVar10;
if (*pbVar10 == 0xff) {
uVar7 = (uint)(ushort)(*(ushort *)(pbVar10 + 1) << 8 | *(ushort *)(pbVar10 + 1) >> 8);
lVar11 = 3;
}
else {
lVar11 = 1;
}
if (*(ushort *)(lVar5 + 0x14) < uVar7) goto LAB_00188552;
pbVar10 = pbVar10 + (ulong)uVar7 + lVar11;
goto LAB_001883de;
}
pbVar10 = pbVar10 + ((uVar3 >> 4 & 1) != 0);
uVar16 = (uint)*__src;
if (uVar16 == 0xff) {
uVar16 = (uint)(ushort)(*(ushort *)(__src + 1) << 8 | *(ushort *)(__src + 1) >> 8);
lVar11 = 3;
}
else {
lVar11 = 1;
}
uVar1 = uVar16 + uVar7;
bVar13 = (byte)uVar1;
if (uVar1 < 0xff) {
lVar9 = 1;
pbVar15 = pbVar10;
if (*pbVar10 != 0xff) goto LAB_001884ce;
memmove(pbVar10 + 1,pbVar10 + 3,(ulong)uVar7);
*pbVar10 = bVar13;
pbVar15 = pbVar10 + (ulong)uVar7 + 1;
}
else {
bVar12 = (byte)(uVar1 >> 8);
if (*pbVar10 == 0xff) {
pbVar10[2] = bVar13;
lVar9 = 3;
pbVar15 = pbVar10 + 1;
bVar13 = bVar12;
LAB_001884ce:
*pbVar15 = bVar13;
pbVar15 = pbVar10 + (ulong)uVar7 + lVar9;
}
else {
pbVar15 = pbVar10 + (ulong)uVar7 + 3;
bmove_upp(pbVar15,pbVar10 + (ulong)uVar7 + 1);
*pbVar10 = 0xff;
pbVar10[2] = bVar13;
pbVar10[1] = bVar12;
}
}
uVar14 = (ulong)uVar16;
memcpy(pbVar15,__src + lVar11,uVar14);
__src = __src + lVar11 + uVar14;
pbVar10 = pbVar15 + uVar14;
}
LAB_001883de:
cVar2 = *(char *)(lVar5 + 0x38);
lVar5 = lVar5 + 0x20;
} while( true );
}
|
|
6,337 | nlohmann::json_abi_v3_11_3::operator==(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const&, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const&) | monkey531[P]llama/common/./json.hpp | constexpr value_t type() const noexcept
{
return m_data.m_type;
} | O3 | cpp | nlohmann::json_abi_v3_11_3::operator==(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const&, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const&):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x108, %rsp # imm = 0x108
movzbl (%rdi), %r12d
cmpq $0x9, %r12
ja 0x764dd
movq %rdi, %r14
leaq 0x376f0(%rip), %rax # 0xad80c
movslq (%rax,%r12,4), %rcx
addq %rax, %rcx
jmpq *%rcx
movl %r12d, %eax
shll $0x6, %eax
movl %r12d, %ecx
shrl $0x2, %ecx
orl %eax, %ecx
jmp 0x76417
movq %r14, %rdi
callq 0x76606
leaq 0x8(%rsp), %rdi
movq %rax, %rsi
callq 0x62f0c
jmp 0x763d7
movl $0x9e3779b9, %r15d # imm = 0x9E3779B9
movq %r14, %rdi
callq 0x76552
movl %r12d, %ecx
shll $0x6, %ecx
movl %r12d, %ebx
shrl $0x2, %ebx
orl %ecx, %ebx
addq 0x8(%rax), %rbx
addq %r15, %rbx
subq (%rax), %rbx
xorq %r12, %rbx
movq %r14, %rdi
callq 0x76552
movzbl 0x20(%rax), %eax
movq %rbx, %rcx
shlq $0x6, %rcx
orq %rax, %rcx
movq %rbx, %r12
shrq $0x2, %r12
addq %r15, %r12
addq %rcx, %r12
xorq %rbx, %r12
movq %r14, %rdi
callq 0x76552
movq 0x18(%rax), %rcx
addq %r15, %rcx
leaq -0x1(%r15), %rdx
cmpb $0x0, 0x20(%rax)
cmovneq %rcx, %rdx
movq %r12, %rax
shlq $0x6, %rax
addq %rdx, %rax
movq %r12, %rbx
shrq $0x2, %rbx
addq %rax, %rbx
xorq %r12, %rbx
movq %r14, %rdi
callq 0x76552
movq (%rax), %rcx
movq 0x8(%rax), %rax
cmpq %rax, %rcx
je 0x76462
movzbl (%rcx), %edx
movq %rbx, %rsi
shlq $0x6, %rsi
movq %rbx, %rdi
shrq $0x2, %rdi
addq %r15, %rsi
addq %rdi, %rsi
addq %rdx, %rsi
xorq %rsi, %rbx
incq %rcx
jmp 0x761e2
movl $0x9e3779b9, %r15d # imm = 0x9E3779B9
movq %r14, %rdi
callq 0x49422
movq %rax, %rbx
movl %r12d, %eax
shll $0x6, %eax
movl %r12d, %ecx
shrl $0x2, %ecx
orl %eax, %ecx
addq %r15, %rbx
addq %rcx, %rbx
xorq %r12, %rbx
leaq 0x78(%rsp), %r13
movq %r14, (%r13)
xorps %xmm0, %xmm0
movups %xmm0, 0x8(%r13)
movabsq $-0x8000000000000000, %rbp # imm = 0x8000000000000000
movq %rbp, 0x18(%r13)
movq %r13, %rdi
callq 0x4e262
leaq 0x8(%rsp), %r12
movq %r12, %rdi
movq %r13, %rsi
xorl %edx, %edx
callq 0x79f14
leaq 0xe8(%rsp), %r13
movq %r14, (%r13)
xorps %xmm0, %xmm0
movups %xmm0, 0x8(%r13)
movq %rbp, 0x18(%r13)
movq %r13, %rdi
callq 0x4e598
leaq 0x78(%rsp), %rdi
movq %r13, %rsi
xorl %edx, %edx
callq 0x79f14
movq %r12, %rdi
leaq 0x78(%rsp), %rsi
callq 0x4e2c6
testb %al, %al
jne 0x76477
movq %r12, %rdi
callq 0x6ee18
movq %r13, %rdi
movq %rax, %rsi
callq 0x62f0c
movq %rax, %r14
movq %r12, %rdi
callq 0x4df62
movq %rax, %rdi
callq 0x760f3
movq %rax, %rbp
movq %r12, %rdi
callq 0x4df16
movq %rbx, %rax
shlq $0x6, %rax
movq %rbx, %rcx
shrq $0x2, %rcx
addq %r15, %rax
addq %rcx, %rax
addq %r14, %rax
xorq %rbx, %rax
movq %rax, %rcx
shlq $0x6, %rcx
movq %rax, %rbx
shrq $0x2, %rbx
addq %r15, %rcx
addq %rbp, %rbx
addq %rcx, %rbx
xorq %rax, %rbx
incq 0x28(%rsp)
jmp 0x7629d
movl $0x9e3779b9, %r13d # imm = 0x9E3779B9
movq %r14, %rdi
callq 0x49422
movq %rax, %r15
movl %r12d, %eax
shll $0x6, %eax
movl %r12d, %ecx
shrl $0x2, %ecx
orl %eax, %ecx
addq %r13, %r15
addq %rcx, %r15
xorq %r12, %r15
leaq 0x8(%rsp), %rbx
movq %r14, (%rbx)
xorps %xmm0, %xmm0
movups %xmm0, 0x8(%rbx)
movabsq $-0x8000000000000000, %rbp # imm = 0x8000000000000000
movq %rbp, 0x18(%rbx)
movq %rbx, %rdi
callq 0x4e262
leaq 0x78(%rsp), %r12
movq %r14, (%r12)
xorps %xmm0, %xmm0
movups %xmm0, 0x8(%r12)
movq %rbp, 0x18(%r12)
movq %r12, %rdi
callq 0x4e598
movq %rbx, %rdi
movq %r12, %rsi
callq 0x4e2c6
testb %al, %al
je 0x7648d
movq %r15, %rbx
jmp 0x76462
leaq 0x8(%rsp), %rbx
movq $0x0, (%rbx)
movq %r14, %rdi
movq %rbx, %rsi
callq 0x76746
jmp 0x76406
leaq 0x8(%rsp), %rbx
movb $0x0, (%rbx)
movq %r14, %rdi
movq %rbx, %rsi
callq 0x3f86d
movzbl (%rbx), %eax
movl %r12d, %ecx
shll $0x6, %ecx
movl %r12d, %edx
shrl $0x2, %edx
orl %ecx, %edx
movl $0x9e3779b9, %ebx # imm = 0x9E3779B9
addq %rax, %rbx
jmp 0x7645c
leaq 0x8(%rsp), %rbx
movq $0x0, (%rbx)
movq %r14, %rdi
movq %rbx, %rsi
callq 0x3dd77
movl %r12d, %eax
shll $0x6, %eax
movl %r12d, %ecx
shrl $0x2, %ecx
orl %eax, %ecx
addq (%rbx), %rcx
movl $0x9e3779b9, %ebx # imm = 0x9E3779B9
addq %rcx, %rbx
jmp 0x7645f
leaq 0x8(%rsp), %rbx
movq $0x0, (%rbx)
movq %r14, %rdi
movq %rbx, %rsi
callq 0x3f485
movsd (%rbx), %xmm0
leaq 0x8(%rsp), %rdi
callq 0x76520
movl %r12d, %ecx
shll $0x6, %ecx
movl %r12d, %edx
shrl $0x2, %edx
orl %ecx, %edx
addq %rax, %rdx
movl $0x9e3779b9, %ebx # imm = 0x9E3779B9
addq %rdx, %rbx
xorq %r12, %rbx
movq %rbx, %rax
addq $0x108, %rsp # imm = 0x108
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x78(%rsp), %rdi
callq 0x6ee84
leaq 0x8(%rsp), %rdi
callq 0x6ee84
jmp 0x76462
leaq 0x8(%rsp), %r14
leaq 0x78(%rsp), %r12
movq %r15, %rbx
movq %r14, %rdi
callq 0x4df62
movq %rax, %rdi
callq 0x760f3
shlq $0x6, %rbx
movq %r15, %rcx
shrq $0x2, %rcx
addq %r13, %rbx
addq %rcx, %rbx
addq %rax, %rbx
xorq %r15, %rbx
movq %r14, %rdi
callq 0x4df16
movq %r14, %rdi
movq %r12, %rsi
callq 0x4e2c6
movq %rbx, %r15
testb %al, %al
je 0x7649a
jmp 0x76462
leaq 0x3ef7d(%rip), %rdi # 0xb5461
leaq 0x407bb(%rip), %rsi # 0xb6ca6
leaq 0x46b1a(%rip), %rcx # 0xbd00c
movl $0x17d9, %edx # imm = 0x17D9
callq 0x18470
jmp 0x76500
jmp 0x76500
movq %rax, %rbx
leaq 0x78(%rsp), %rdi
callq 0x6ee84
leaq 0x8(%rsp), %rdi
callq 0x6ee84
movq %rbx, %rdi
callq 0x18b90
nop
| _ZN8nlohmann16json_abi_v3_11_36detail4hashINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEEEmRKT_:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 108h
movzx r12d, byte ptr [rdi]
cmp r12, 9; switch 10 cases
ja def_76123; jumptable 0000000000076123 default case
mov r14, rdi
lea rax, jpt_76123
movsxd rcx, ds:(jpt_76123 - 0AD80Ch)[rax+r12*4]
add rcx, rax
jmp rcx; switch jump
loc_76125:
mov eax, r12d; jumptable 0000000000076123 cases 0,9
shl eax, 6
mov ecx, r12d
shr ecx, 2
or ecx, eax
jmp loc_76417
loc_76138:
mov rdi, r14; jumptable 0000000000076123 case 3
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE12get_ref_implIRKS9_KSD_EET_RT0_; 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>::get_ref_impl<std::string const&,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const>(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 &)
lea rdi, [rsp+138h+var_130]
mov rsi, rax
call _ZNKSt4hashINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEclERKS5_; std::hash<std::string>::operator()(std::string const&)
jmp loc_763D7
loc_76152:
mov r15d, 9E3779B9h; jumptable 0000000000076123 case 8
mov rdi, r14
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE10get_binaryEv; 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>::get_binary(void)
mov ecx, r12d
shl ecx, 6
mov ebx, r12d
shr ebx, 2
or ebx, ecx
add rbx, [rax+8]
add rbx, r15
sub rbx, [rax]
xor rbx, r12
mov rdi, r14
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE10get_binaryEv; 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>::get_binary(void)
movzx eax, byte ptr [rax+20h]
mov rcx, rbx
shl rcx, 6
or rcx, rax
mov r12, rbx
shr r12, 2
add r12, r15
add r12, rcx
xor r12, rbx
mov rdi, r14
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE10get_binaryEv; 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>::get_binary(void)
mov rcx, [rax+18h]
add rcx, r15
lea rdx, [r15-1]
cmp byte ptr [rax+20h], 0
cmovnz rdx, rcx
mov rax, r12
shl rax, 6
add rax, rdx
mov rbx, r12
shr rbx, 2
add rbx, rax
xor rbx, r12
mov rdi, r14
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE10get_binaryEv; 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>::get_binary(void)
mov rcx, [rax]
mov rax, [rax+8]
loc_761E2:
cmp rcx, rax
jz loc_76462
movzx edx, byte ptr [rcx]
mov rsi, rbx
shl rsi, 6
mov rdi, rbx
shr rdi, 2
add rsi, r15
add rsi, rdi
add rsi, rdx
xor rbx, rsi
inc rcx
jmp short loc_761E2
loc_7620D:
mov r15d, 9E3779B9h; jumptable 0000000000076123 case 1
mov rdi, r14
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4sizeEv; 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 rbx, rax
mov eax, r12d
shl eax, 6
mov ecx, r12d
shr ecx, 2
or ecx, eax
add rbx, r15
add rbx, rcx
xor rbx, r12
lea r13, [rsp+138h+var_C0]
mov [r13+0], r14
xorps xmm0, xmm0
movups xmmword ptr [r13+8], xmm0
mov rbp, 8000000000000000h
mov [r13+18h], rbp
mov rdi, r13
call _ZN8nlohmann16json_abi_v3_11_36detail9iter_implIKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEE9set_beginEv; nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const>::set_begin(void)
lea r12, [rsp+138h+var_130]
mov rdi, r12
mov rsi, r13
xor edx, edx
call _ZN8nlohmann16json_abi_v3_11_36detail21iteration_proxy_valueINS1_9iter_implIKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEEEEEC2ESI_m; nlohmann::json_abi_v3_11_3::detail::iteration_proxy_value<nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const>>::iteration_proxy_value(nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const>,ulong)
lea r13, [rsp+138h+var_50]
mov [r13+0], r14
xorps xmm0, xmm0
movups xmmword ptr [r13+8], xmm0
mov [r13+18h], rbp
mov rdi, r13
call _ZN8nlohmann16json_abi_v3_11_36detail9iter_implIKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEE7set_endEv; nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const>::set_end(void)
lea rdi, [rsp+138h+var_C0]
mov rsi, r13
xor edx, edx
call _ZN8nlohmann16json_abi_v3_11_36detail21iteration_proxy_valueINS1_9iter_implIKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEEEEEC2ESI_m; nlohmann::json_abi_v3_11_3::detail::iteration_proxy_value<nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const>>::iteration_proxy_value(nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const>,ulong)
loc_7629D:
mov rdi, r12
lea rsi, [rsp+138h+var_C0]
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_76477
mov rdi, r12
call _ZNK8nlohmann16json_abi_v3_11_36detail21iteration_proxy_valueINS1_9iter_implIKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEEEEE3keyEv; nlohmann::json_abi_v3_11_3::detail::iteration_proxy_value<nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const>>::key(void)
mov rdi, r13
mov rsi, rax
call _ZNKSt4hashINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEclERKS5_; std::hash<std::string>::operator()(std::string const&)
mov r14, rax
mov rdi, r12
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 rdi, rax
call _ZN8nlohmann16json_abi_v3_11_36detail4hashINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEEEmRKT_; nlohmann::json_abi_v3_11_3::detail::hash<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> const&)
mov rbp, rax
mov rdi, r12
call _ZN8nlohmann16json_abi_v3_11_36detail9iter_implIKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEEppEv; 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 rax, rbx
shl rax, 6
mov rcx, rbx
shr rcx, 2
add rax, r15
add rax, rcx
add rax, r14
xor rax, rbx
mov rcx, rax
shl rcx, 6
mov rbx, rax
shr rbx, 2
add rcx, r15
add rbx, rbp
add rbx, rcx
xor rbx, rax
inc [rsp+138h+var_110]
jmp loc_7629D
loc_76321:
mov r13d, 9E3779B9h; jumptable 0000000000076123 case 2
mov rdi, r14
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4sizeEv; 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 r15, rax
mov eax, r12d
shl eax, 6
mov ecx, r12d
shr ecx, 2
or ecx, eax
add r15, r13
add r15, rcx
xor r15, r12
lea rbx, [rsp+138h+var_130]
mov [rbx], r14
xorps xmm0, xmm0
movups xmmword ptr [rbx+8], xmm0
mov rbp, 8000000000000000h
mov [rbx+18h], rbp
mov rdi, rbx
call _ZN8nlohmann16json_abi_v3_11_36detail9iter_implIKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEE9set_beginEv; nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const>::set_begin(void)
lea r12, [rsp+138h+var_C0]
mov [r12], r14
xorps xmm0, xmm0
movups xmmword ptr [r12+8], xmm0
mov [r12+18h], rbp
mov rdi, r12
call _ZN8nlohmann16json_abi_v3_11_36detail9iter_implIKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEE7set_endEv; nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const>::set_end(void)
mov rdi, rbx
mov rsi, r12
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_7648D
mov rbx, r15
jmp loc_76462
loc_763A8:
lea rbx, [rsp+138h+var_130]; jumptable 0000000000076123 case 6
mov qword ptr [rbx], 0
mov rdi, r14
mov rsi, rbx
call _ZN8nlohmann16json_abi_v3_11_36detail20get_arithmetic_valueINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEmTnNSt9enable_ifIXaasr3std13is_arithmeticIT0_EE5valuentsr3std7is_sameISH_NT_9boolean_tEEE5valueEiE4typeELi0EEEvRKSI_RSH_
jmp short loc_76406
loc_763C1:
lea rbx, [rsp+138h+var_130]; jumptable 0000000000076123 case 4
mov byte ptr [rbx], 0
mov rdi, r14
mov rsi, rbx
call _ZN8nlohmann16json_abi_v3_11_36detail9from_jsonINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEEEvRKT_RNSG_9boolean_tE; 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,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> 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>::boolean_t &)
movzx eax, byte ptr [rbx]
loc_763D7:
mov ecx, r12d
shl ecx, 6
mov edx, r12d
shr edx, 2
or edx, ecx
mov ebx, 9E3779B9h
add rbx, rax
jmp short loc_7645C
loc_763EF:
lea rbx, [rsp+138h+var_130]; jumptable 0000000000076123 case 5
mov qword ptr [rbx], 0
mov rdi, r14
mov rsi, rbx
call _ZN8nlohmann16json_abi_v3_11_36detail20get_arithmetic_valueINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEElTnNSt9enable_ifIXaasr3std13is_arithmeticIT0_EE5valuentsr3std7is_sameISH_NT_9boolean_tEEE5valueEiE4typeELi0EEEvRKSI_RSH_
loc_76406:
mov eax, r12d
shl eax, 6
mov ecx, r12d
shr ecx, 2
or ecx, eax
add rcx, [rbx]
loc_76417:
mov ebx, 9E3779B9h
add rbx, rcx
jmp short loc_7645F
loc_76421:
lea rbx, [rsp+138h+var_130]; jumptable 0000000000076123 case 7
mov qword ptr [rbx], 0
mov rdi, r14
mov rsi, rbx
call _ZN8nlohmann16json_abi_v3_11_36detail20get_arithmetic_valueINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEdTnNSt9enable_ifIXaasr3std13is_arithmeticIT0_EE5valuentsr3std7is_sameISH_NT_9boolean_tEEE5valueEiE4typeELi0EEEvRKSI_RSH_
movsd xmm0, qword ptr [rbx]
lea rdi, [rsp+138h+var_130]
call _ZNKSt4hashIdEclEd; std::hash<double>::operator()(double)
mov ecx, r12d
shl ecx, 6
mov edx, r12d
shr edx, 2
or edx, ecx
add rdx, rax
mov ebx, 9E3779B9h
loc_7645C:
add rbx, rdx
loc_7645F:
xor rbx, r12
loc_76462:
mov rax, rbx
add rsp, 108h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_76477:
lea rdi, [rsp+138h+var_C0]
call _ZN8nlohmann16json_abi_v3_11_36detail21iteration_proxy_valueINS1_9iter_implIKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEEEEED2Ev; nlohmann::json_abi_v3_11_3::detail::iteration_proxy_value<nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const>>::~iteration_proxy_value()
lea rdi, [rsp+138h+var_130]
call _ZN8nlohmann16json_abi_v3_11_36detail21iteration_proxy_valueINS1_9iter_implIKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEEEEED2Ev; nlohmann::json_abi_v3_11_3::detail::iteration_proxy_value<nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const>>::~iteration_proxy_value()
jmp short loc_76462
loc_7648D:
lea r14, [rsp+138h+var_130]
lea r12, [rsp+138h+var_C0]
mov rbx, r15
loc_7649A:
mov rdi, r14
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 rdi, rax
call _ZN8nlohmann16json_abi_v3_11_36detail4hashINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEEEmRKT_; nlohmann::json_abi_v3_11_3::detail::hash<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> const&)
shl rbx, 6
mov rcx, r15
shr rcx, 2
add rbx, r13
add rbx, rcx
add rbx, rax
xor rbx, r15
mov rdi, r14
call _ZN8nlohmann16json_abi_v3_11_36detail9iter_implIKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEEppEv; 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 rdi, r14
mov rsi, r12
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_
mov r15, rbx
test al, al
jz short loc_7649A
jmp short loc_76462
def_76123:
lea rdi, aFalse; jumptable 0000000000076123 default case
lea rsi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"...
lea rcx, aStdSizeTNlohma; "std::size_t nlohmann::detail::hash(cons"...
mov edx, 17D9h
call ___assert_fail
jmp short loc_76500
jmp short $+2
loc_76500:
mov rbx, rax
lea rdi, [rsp+138h+var_C0]
call _ZN8nlohmann16json_abi_v3_11_36detail21iteration_proxy_valueINS1_9iter_implIKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEEEEED2Ev; nlohmann::json_abi_v3_11_3::detail::iteration_proxy_value<nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const>>::~iteration_proxy_value()
lea rdi, [rsp+138h+var_130]
call _ZN8nlohmann16json_abi_v3_11_36detail21iteration_proxy_valueINS1_9iter_implIKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEEEEED2Ev; nlohmann::json_abi_v3_11_3::detail::iteration_proxy_value<nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const>>::~iteration_proxy_value()
mov rdi, rbx
call __Unwind_Resume
| unsigned long long nlohmann::json_abi_v3_11_3::detail::hash<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>(
unsigned __int8 *a1)
{
long long v1; // r12
unsigned __int8 *v2; // rcx
long long v3; // rax
long long v4; // rax
_QWORD *binary; // rax
unsigned long long v6; // rbx
unsigned long long v7; // r12
long long v8; // rax
long long v9; // rdx
unsigned long long v10; // rbx
unsigned __int8 **v11; // rax
unsigned __int8 *v12; // rcx
unsigned __int8 *v13; // rax
long long v14; // rax
long long v15; // r14
long long v16; // rax
long long v17; // rbp
unsigned long long v18; // r15
long long v19; // rdx
long long v20; // rbx
long long v21; // rbx
long long v23; // rax
unsigned __int8 *v24; // [rsp+8h] [rbp-130h] BYREF
__int128 v25; // [rsp+10h] [rbp-128h]
unsigned long long v26; // [rsp+20h] [rbp-118h]
long long v27; // [rsp+28h] [rbp-110h]
unsigned __int8 *v28; // [rsp+78h] [rbp-C0h] BYREF
__int128 v29; // [rsp+80h] [rbp-B8h]
unsigned long long v30; // [rsp+90h] [rbp-A8h]
unsigned __int8 *v31; // [rsp+E8h] [rbp-50h] BYREF
__int128 v32; // [rsp+F0h] [rbp-48h]
unsigned long long v33; // [rsp+100h] [rbp-38h]
v1 = *a1;
switch ( *a1 )
{
case 0u:
case 9u:
v2 = (unsigned __int8 *)(((_DWORD)v1 << 6) | ((unsigned int)v1 >> 2));
goto LABEL_19;
case 1u:
v10 = v1 ^ ((((_DWORD)v1 << 6) | ((unsigned int)v1 >> 2))
+ 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(a1)
+ 2654435769LL);
v28 = a1;
v29 = 0LL;
v30 = 0x8000000000000000LL;
nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> const>::set_begin(&v28);
nlohmann::json_abi_v3_11_3::detail::iteration_proxy_value<nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> const>>::iteration_proxy_value(
&v24,
&v28,
0LL);
v31 = a1;
v32 = 0LL;
v33 = 0x8000000000000000LL;
nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> const>::set_end(&v31);
nlohmann::json_abi_v3_11_3::detail::iteration_proxy_value<nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> const>>::iteration_proxy_value(
&v28,
&v31,
0LL);
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_(
&v24,
&v28) )
{
v14 = nlohmann::json_abi_v3_11_3::detail::iteration_proxy_value<nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> const>>::key(&v24);
v15 = std::hash<std::string>::operator()((long long)&v31, v14);
v16 = 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*(&v24);
v17 = nlohmann::json_abi_v3_11_3::detail::hash<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>>(v16);
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++(&v24);
v10 ^= (v15 + (v10 >> 2) + (v10 << 6) + 2654435769u) ^ (((v10 ^ (v15 + (v10 >> 2) + (v10 << 6) + 2654435769u)) << 6)
+ 2654435769u
+ v17
+ ((v10 ^ (v15 + (v10 >> 2) + (v10 << 6) + 2654435769u)) >> 2));
++v27;
}
nlohmann::json_abi_v3_11_3::detail::iteration_proxy_value<nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> const>>::~iteration_proxy_value(&v28);
nlohmann::json_abi_v3_11_3::detail::iteration_proxy_value<nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> const>>::~iteration_proxy_value(&v24);
return v10;
case 2u:
v18 = v1 ^ ((((_DWORD)v1 << 6) | ((unsigned int)v1 >> 2))
+ 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(a1)
+ 2654435769LL);
v24 = a1;
v25 = 0LL;
v26 = 0x8000000000000000LL;
nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> const>::set_begin(&v24);
v28 = a1;
v29 = 0LL;
v30 = 0x8000000000000000LL;
nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> const>::set_end(&v28);
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_(
&v24,
&v28) )
return v18;
v10 = v18;
do
{
v23 = 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*(&v24);
v10 = v18 ^ (nlohmann::json_abi_v3_11_3::detail::hash<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>>(v23)
+ (v18 >> 2)
+ (v10 << 6)
+ 2654435769u);
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++(&v24);
v18 = v10;
}
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_(
&v24,
&v28) );
return v10;
case 3u:
v3 = 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>::get_ref_impl<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> const>(a1);
v4 = std::hash<std::string>::operator()((long long)&v24, v3);
goto LABEL_16;
case 4u:
LOBYTE(v24) = 0;
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>>(
a1,
(unsigned __int8 *)&v24);
v4 = (unsigned __int8)v24;
LABEL_16:
v19 = ((_DWORD)v1 << 6) | ((unsigned int)v1 >> 2);
v20 = v4 + 2654435769LL;
goto LABEL_21;
case 5u:
v24 = 0LL;
ZN8nlohmann16json_abi_v3_11_36detail20get_arithmetic_valueINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEElTnNSt9enable_ifIXaasr3std13is_arithmeticIT0_EE5valuentsr3std7is_sameISH_NT_9boolean_tEEE5valueEiE4typeELi0EEEvRKSI_RSH_(
a1,
&v24);
goto LABEL_18;
case 6u:
v24 = 0LL;
ZN8nlohmann16json_abi_v3_11_36detail20get_arithmetic_valueINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEmTnNSt9enable_ifIXaasr3std13is_arithmeticIT0_EE5valuentsr3std7is_sameISH_NT_9boolean_tEEE5valueEiE4typeELi0EEEvRKSI_RSH_(
a1,
&v24);
LABEL_18:
v2 = &v24[((_DWORD)v1 << 6) | ((unsigned int)v1 >> 2)];
LABEL_19:
v21 = (long long)(v2 + 2654435769LL);
goto LABEL_22;
case 7u:
v24 = 0LL;
ZN8nlohmann16json_abi_v3_11_36detail20get_arithmetic_valueINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEdTnNSt9enable_ifIXaasr3std13is_arithmeticIT0_EE5valuentsr3std7is_sameISH_NT_9boolean_tEEE5valueEiE4typeELi0EEEvRKSI_RSH_(
a1,
(double *)&v24);
v19 = std::hash<double>::operator()(&v24, *(double *)&v24) + (((_DWORD)v1 << 6) | ((unsigned int)v1 >> 2));
v20 = 2654435769LL;
LABEL_21:
v21 = v19 + v20;
LABEL_22:
v10 = v1 ^ v21;
break;
case 8u:
binary = (_QWORD *)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>::get_binary(a1);
v6 = v1 ^ (binary[1] + (((_DWORD)v1 << 6) | ((unsigned int)v1 >> 2)) + 2654435769LL - *binary);
v7 = v6 ^ ((*(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>::get_binary(a1)
+ 32) | (v6 << 6))
+ (v6 >> 2)
+ 2654435769u);
v8 = 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>::get_binary(a1);
v9 = 2654435768LL;
if ( *(_BYTE *)(v8 + 32) )
v9 = *(_QWORD *)(v8 + 24) + 2654435769LL;
v10 = v7 ^ (v9 + (v7 << 6) + (v7 >> 2));
v11 = (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>::get_binary(a1);
v12 = *v11;
v13 = v11[1];
while ( v12 != v13 )
v10 ^= *v12++ + (v10 >> 2) + (v10 << 6) + 2654435769u;
break;
default:
__assert_fail(
"false",
"/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/./json.hpp",
6105LL,
"std::size_t nlohmann::detail::hash(const BasicJsonType &) [BasicJsonType = nlohmann::basic_json<nlohmann::ordered_map>]");
}
return v10;
}
| hash<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 R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x108
MOVZX R12D,byte ptr [RDI]
CMP R12,0x9
JA 0x001764dd
MOV R14,RDI
LEA RAX,[0x1ad80c]
MOVSXD RCX,dword ptr [RAX + R12*0x4]
ADD RCX,RAX
switchD:
JMP RCX
caseD_0:
MOV EAX,R12D
SHL EAX,0x6
MOV ECX,R12D
SHR ECX,0x2
OR ECX,EAX
JMP 0x00176417
caseD_3:
MOV RDI,R14
CALL 0x00176606
LEA RDI,[RSP + 0x8]
MOV RSI,RAX
CALL 0x00162f0c
JMP 0x001763d7
caseD_8:
MOV R15D,0x9e3779b9
MOV RDI,R14
CALL 0x00176552
MOV ECX,R12D
SHL ECX,0x6
MOV EBX,R12D
SHR EBX,0x2
OR EBX,ECX
ADD RBX,qword ptr [RAX + 0x8]
ADD RBX,R15
SUB RBX,qword ptr [RAX]
XOR RBX,R12
MOV RDI,R14
CALL 0x00176552
MOVZX EAX,byte ptr [RAX + 0x20]
MOV RCX,RBX
SHL RCX,0x6
OR RCX,RAX
MOV R12,RBX
SHR R12,0x2
ADD R12,R15
ADD R12,RCX
XOR R12,RBX
MOV RDI,R14
CALL 0x00176552
MOV RCX,qword ptr [RAX + 0x18]
ADD RCX,R15
LEA RDX,[R15 + -0x1]
CMP byte ptr [RAX + 0x20],0x0
CMOVNZ RDX,RCX
MOV RAX,R12
SHL RAX,0x6
ADD RAX,RDX
MOV RBX,R12
SHR RBX,0x2
ADD RBX,RAX
XOR RBX,R12
MOV RDI,R14
CALL 0x00176552
MOV RCX,qword ptr [RAX]
MOV RAX,qword ptr [RAX + 0x8]
LAB_001761e2:
CMP RCX,RAX
JZ 0x00176462
MOVZX EDX,byte ptr [RCX]
MOV RSI,RBX
SHL RSI,0x6
MOV RDI,RBX
SHR RDI,0x2
ADD RSI,R15
ADD RSI,RDI
ADD RSI,RDX
XOR RBX,RSI
INC RCX
JMP 0x001761e2
caseD_1:
MOV R15D,0x9e3779b9
MOV RDI,R14
CALL 0x00149422
MOV RBX,RAX
MOV EAX,R12D
SHL EAX,0x6
MOV ECX,R12D
SHR ECX,0x2
OR ECX,EAX
ADD RBX,R15
ADD RBX,RCX
XOR RBX,R12
LEA R13,[RSP + 0x78]
MOV qword ptr [R13],R14
XORPS XMM0,XMM0
MOVUPS xmmword ptr [R13 + 0x8],XMM0
MOV RBP,-0x8000000000000000
MOV qword ptr [R13 + 0x18],RBP
MOV RDI,R13
CALL 0x0014e262
LEA R12,[RSP + 0x8]
MOV RDI,R12
MOV RSI,R13
XOR EDX,EDX
CALL 0x00179f14
LEA R13,[RSP + 0xe8]
MOV qword ptr [R13],R14
XORPS XMM0,XMM0
MOVUPS xmmword ptr [R13 + 0x8],XMM0
MOV qword ptr [R13 + 0x18],RBP
MOV RDI,R13
CALL 0x0014e598
LEA RDI,[RSP + 0x78]
MOV RSI,R13
XOR EDX,EDX
CALL 0x00179f14
LAB_0017629d:
MOV RDI,R12
LEA RSI,[RSP + 0x78]
CALL 0x0014e2c6
TEST AL,AL
JNZ 0x00176477
LAB_001762b2:
MOV RDI,R12
CALL 0x0016ee18
MOV RDI,R13
MOV RSI,RAX
CALL 0x00162f0c
MOV R14,RAX
LAB_001762c8:
MOV RDI,R12
CALL 0x0014df62
MOV RDI,RAX
CALL 0x001760f3
LAB_001762d8:
MOV RBP,RAX
MOV RDI,R12
CALL 0x0014df16
LAB_001762e3:
MOV RAX,RBX
SHL RAX,0x6
MOV RCX,RBX
SHR RCX,0x2
ADD RAX,R15
ADD RAX,RCX
ADD RAX,R14
XOR RAX,RBX
MOV RCX,RAX
SHL RCX,0x6
MOV RBX,RAX
SHR RBX,0x2
ADD RCX,R15
ADD RBX,RBP
ADD RBX,RCX
XOR RBX,RAX
INC qword ptr [RSP + 0x28]
JMP 0x0017629d
caseD_2:
MOV R13D,0x9e3779b9
MOV RDI,R14
CALL 0x00149422
MOV R15,RAX
MOV EAX,R12D
SHL EAX,0x6
MOV ECX,R12D
SHR ECX,0x2
OR ECX,EAX
ADD R15,R13
ADD R15,RCX
XOR R15,R12
LEA RBX,[RSP + 0x8]
MOV qword ptr [RBX],R14
XORPS XMM0,XMM0
MOVUPS xmmword ptr [RBX + 0x8],XMM0
MOV RBP,-0x8000000000000000
MOV qword ptr [RBX + 0x18],RBP
MOV RDI,RBX
CALL 0x0014e262
LEA R12,[RSP + 0x78]
MOV qword ptr [R12],R14
XORPS XMM0,XMM0
MOVUPS xmmword ptr [R12 + 0x8],XMM0
MOV qword ptr [R12 + 0x18],RBP
MOV RDI,R12
CALL 0x0014e598
MOV RDI,RBX
MOV RSI,R12
CALL 0x0014e2c6
TEST AL,AL
JZ 0x0017648d
MOV RBX,R15
JMP 0x00176462
caseD_6:
LEA RBX,[RSP + 0x8]
MOV qword ptr [RBX],0x0
MOV RDI,R14
MOV RSI,RBX
CALL 0x00176746
JMP 0x00176406
caseD_4:
LEA RBX,[RSP + 0x8]
MOV byte ptr [RBX],0x0
MOV RDI,R14
MOV RSI,RBX
CALL 0x0013f86d
MOVZX EAX,byte ptr [RBX]
LAB_001763d7:
MOV ECX,R12D
SHL ECX,0x6
MOV EDX,R12D
SHR EDX,0x2
OR EDX,ECX
MOV EBX,0x9e3779b9
ADD RBX,RAX
JMP 0x0017645c
caseD_5:
LEA RBX,[RSP + 0x8]
MOV qword ptr [RBX],0x0
MOV RDI,R14
MOV RSI,RBX
CALL 0x0013dd77
LAB_00176406:
MOV EAX,R12D
SHL EAX,0x6
MOV ECX,R12D
SHR ECX,0x2
OR ECX,EAX
ADD RCX,qword ptr [RBX]
LAB_00176417:
MOV EBX,0x9e3779b9
ADD RBX,RCX
JMP 0x0017645f
caseD_7:
LEA RBX,[RSP + 0x8]
MOV qword ptr [RBX],0x0
MOV RDI,R14
MOV RSI,RBX
CALL 0x0013f485
MOVSD XMM0,qword ptr [RBX]
LEA RDI,[RSP + 0x8]
CALL 0x00176520
MOV ECX,R12D
SHL ECX,0x6
MOV EDX,R12D
SHR EDX,0x2
OR EDX,ECX
ADD RDX,RAX
MOV EBX,0x9e3779b9
LAB_0017645c:
ADD RBX,RDX
LAB_0017645f:
XOR RBX,R12
LAB_00176462:
MOV RAX,RBX
ADD RSP,0x108
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_00176477:
LEA RDI,[RSP + 0x78]
CALL 0x0016ee84
LEA RDI,[RSP + 0x8]
CALL 0x0016ee84
JMP 0x00176462
LAB_0017648d:
LEA R14,[RSP + 0x8]
LEA R12,[RSP + 0x78]
MOV RBX,R15
LAB_0017649a:
MOV RDI,R14
CALL 0x0014df62
MOV RDI,RAX
CALL 0x001760f3
SHL RBX,0x6
MOV RCX,R15
SHR RCX,0x2
ADD RBX,R13
ADD RBX,RCX
ADD RBX,RAX
XOR RBX,R15
MOV RDI,R14
CALL 0x0014df16
MOV RDI,R14
MOV RSI,R12
CALL 0x0014e2c6
MOV R15,RBX
TEST AL,AL
JZ 0x0017649a
JMP 0x00176462
default:
LEA RDI,[0x1b5461]
LEA RSI,[0x1b6ca6]
LEA RCX,[0x1bd00c]
MOV EDX,0x17d9
CALL 0x00118470
|
/* unsigned long
nlohmann::json_abi_v3_11_3::detail::hash<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&) */
ulong nlohmann::json_abi_v3_11_3::detail::
hash<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)
{
basic_json bVar1;
char cVar2;
string *psVar3;
ulong uVar4;
long *plVar5;
long lVar6;
long lVar7;
int8 *puVar8;
byte *pbVar9;
ulong uVar10;
basic_json *pbVar11;
ulong uVar12;
basic_json *local_130;
int8 local_128;
int8 uStack_120;
int8 local_118;
long local_110;
basic_json *local_c0;
int8 local_b8;
int8 uStack_b0;
int8 local_a8;
basic_json *local_50;
int8 local_48;
int8 uStack_40;
int8 local_38;
bVar1 = *param_1;
uVar12 = (ulong)(byte)bVar1;
local_c0 = param_1;
switch(uVar12) {
case 0:
case 9:
pbVar11 = (basic_json *)(ulong)((uint)((byte)bVar1 >> 2) | (uint)(byte)bVar1 << 6);
goto LAB_00176417;
case 1:
lVar6 = basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,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>
*)param_1);
uVar12 = lVar6 + 0x9e3779b9 + (ulong)((uint)((byte)bVar1 >> 2) | (uint)(byte)bVar1 << 6) ^
uVar12;
local_b8 = 0;
uStack_b0 = 0;
local_a8 = 0x8000000000000000;
iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const>
::set_begin((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_c0);
iteration_proxy_value<nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const>>
::iteration_proxy_value
((iteration_proxy_value<nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const>>
*)&local_130,
(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_c0,0);
local_48 = 0;
uStack_40 = 0;
local_38 = 0x8000000000000000;
local_50 = param_1;
iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const>
::set_end((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_50);
iteration_proxy_value<nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const>>
::iteration_proxy_value
((iteration_proxy_value<nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const>>
*)&local_c0,
(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_50,0);
/* try { // try from 0017629d to 001762a9 has its CatchHandler @ 00176500 */
while (cVar2 = _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_
((iteration_proxy_value<nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const>>
*)&local_130,&local_c0), cVar2 == '\0') {
/* try { // try from 001762b2 to 001762b9 has its CatchHandler @ 001764fc */
psVar3 = (string *)
iteration_proxy_value<nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const>>
::key((iteration_proxy_value<nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const>>
*)&local_130);
lVar6 = std::hash<std::__cxx11::string>::operator()
((hash<std::__cxx11::string> *)&local_50,psVar3);
/* try { // try from 001762c8 to 001762d7 has its CatchHandler @ 001764fe */
pbVar11 = (basic_json *)
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_130);
uVar10 = hash<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>>
(pbVar11);
/* try { // try from 001762d8 to 001762e2 has its CatchHandler @ 00176500 */
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_130);
uVar12 = uVar12 * 0x40 + 0x9e3779b9 + (uVar12 >> 2) + lVar6 ^ uVar12;
uVar12 = (uVar12 >> 2) + uVar10 + uVar12 * 0x40 + 0x9e3779b9 ^ uVar12;
local_110 = local_110 + 1;
}
iteration_proxy_value<nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const>>
::~iteration_proxy_value
((iteration_proxy_value<nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const>>
*)&local_c0);
iteration_proxy_value<nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const>>
::~iteration_proxy_value
((iteration_proxy_value<nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const>>
*)&local_130);
break;
case 2:
lVar6 = basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,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>
*)param_1);
uVar12 = lVar6 + 0x9e3779b9 + (ulong)((uint)((byte)bVar1 >> 2) | (uint)(byte)bVar1 << 6) ^
uVar12;
local_128 = 0;
uStack_120 = 0;
local_118 = 0x8000000000000000;
local_130 = param_1;
iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const>
::set_begin((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_130);
local_b8 = 0;
uStack_b0 = 0;
local_a8 = 0x8000000000000000;
iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const>
::set_end((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_c0);
cVar2 = _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_130,
(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_c0);
if (cVar2 == '\0') {
do {
pbVar11 = (basic_json *)
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_130);
uVar10 = hash<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>>
(pbVar11);
uVar12 = uVar12 * 0x40 + 0x9e3779b9 + (uVar12 >> 2) + uVar10 ^ uVar12;
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_130);
cVar2 = _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_130,&local_c0);
} while (cVar2 == '\0');
}
break;
case 3:
psVar3 = basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::
get_ref_impl<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>const>
(param_1);
uVar4 = std::hash<std::__cxx11::string>::operator()
((hash<std::__cxx11::string> *)&local_130,psVar3);
goto LAB_001763d7;
case 4:
local_130 = (basic_json *)((ulong)local_130 & 0xffffffffffffff00);
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>>
(param_1,(boolean_t *)&local_130);
uVar4 = (ulong)local_130 & 0xff;
LAB_001763d7:
uVar10 = (ulong)((uint)((byte)bVar1 >> 2) | (uint)(byte)bVar1 << 6);
lVar6 = uVar4 + 0x9e3779b9;
LAB_0017645c:
pbVar11 = (basic_json *)(lVar6 + uVar10);
LAB_0017645f:
uVar12 = (ulong)pbVar11 ^ uVar12;
break;
case 5:
local_130 = (basic_json *)0x0;
_ZN8nlohmann16json_abi_v3_11_36detail20get_arithmetic_valueINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEElTnNSt9enable_ifIXaasr3std13is_arithmeticIT0_EE5valuentsr3std7is_sameISH_NT_9boolean_tEEE5valueEiE4typeELi0EEEvRKSI_RSH_
(param_1,&local_130);
goto LAB_00176406;
case 6:
local_130 = (basic_json *)0x0;
_ZN8nlohmann16json_abi_v3_11_36detail20get_arithmetic_valueINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEmTnNSt9enable_ifIXaasr3std13is_arithmeticIT0_EE5valuentsr3std7is_sameISH_NT_9boolean_tEEE5valueEiE4typeELi0EEEvRKSI_RSH_
(param_1,&local_130);
LAB_00176406:
pbVar11 = local_130 + ((uint)((byte)bVar1 >> 2) | (uint)(byte)bVar1 << 6);
LAB_00176417:
pbVar11 = pbVar11 + 0x9e3779b9;
goto LAB_0017645f;
case 7:
local_130 = (basic_json *)0x0;
_ZN8nlohmann16json_abi_v3_11_36detail20get_arithmetic_valueINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEdTnNSt9enable_ifIXaasr3std13is_arithmeticIT0_EE5valuentsr3std7is_sameISH_NT_9boolean_tEEE5valueEiE4typeELi0EEEvRKSI_RSH_
(param_1,&local_130);
lVar6 = std::hash<double>::operator()((hash<double> *)&local_130,(double)local_130);
uVar10 = (ulong)((uint)((byte)bVar1 >> 2) | (uint)(byte)bVar1 << 6) + lVar6;
lVar6 = 0x9e3779b9;
goto LAB_0017645c;
case 8:
plVar5 = (long *)basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::get_binary((basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,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);
uVar12 = ((ulong)((uint)((byte)bVar1 >> 2) | (uint)(byte)bVar1 << 6) + plVar5[1] + 0x9e3779b9) -
*plVar5 ^ uVar12;
lVar6 = basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::get_binary((basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,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);
uVar12 = (uVar12 >> 2) + 0x9e3779b9 + (uVar12 << 6 | (ulong)*(byte *)(lVar6 + 0x20)) ^ uVar12;
lVar7 = basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::get_binary((basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,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);
lVar6 = 0x9e3779b8;
if (*(char *)(lVar7 + 0x20) != '\0') {
lVar6 = *(long *)(lVar7 + 0x18) + 0x9e3779b9;
}
uVar12 = (uVar12 >> 2) + uVar12 * 0x40 + lVar6 ^ uVar12;
puVar8 = (int8 *)
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::get_binary((basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,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);
for (pbVar9 = (byte *)*puVar8; pbVar9 != (byte *)puVar8[1]; pbVar9 = pbVar9 + 1) {
uVar12 = uVar12 ^ uVar12 * 0x40 + 0x9e3779b9 + (uVar12 >> 2) + (ulong)*pbVar9;
}
break;
default:
/* WARNING: Subroutine does not return */
__assert_fail("false",
"/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/./json.hpp",
0x17d9,
"std::size_t nlohmann::detail::hash(const BasicJsonType &) [BasicJsonType = nlohmann::basic_json<nlohmann::ordered_map>]"
);
}
return uVar12;
}
|
|
6,338 | apply_shift | eloqsql/strings/ctype-uca.c | static my_bool
apply_shift(MY_CHARSET_LOADER *loader,
MY_COLL_RULES *rules, MY_COLL_RULE *r, int level,
uint16 *to, size_t nweights)
{
/* Apply level difference. */
if (nweights)
{
to[nweights - 1]+= r->diff[level];
if (r->before_level == 1) /* Apply "&[before primary]" */
{
if (nweights >= 2)
{
to[nweights - 2]--; /* Reset before */
if (rules->shift_after_method == my_shift_method_expand)
{
/*
Special case. Don't let characters shifted after X
and before next(X) intermix to each other.
For example:
"[shift-after-method expand] &0 < a &[before primary]1 < A".
I.e. we reorder 'a' after '0', and then 'A' before '1'.
'a' must be sorted before 'A'.
Note, there are no real collations in CLDR which shift
after and before two neighbourgh characters. We need this
just in case. Reserving 4096 (0x1000) weights for such
cases is perfectly enough.
*/
to[nweights - 1]+= 0x1000; /* W3-TODO: const may vary on levels 2,3*/
}
}
else
{
my_snprintf(loader->error, sizeof(loader->error),
"Can't reset before "
"a primary ignorable character U+%04lX", r->base[0]);
return TRUE;
}
}
}
else
{
/* Shift to an ignorable character, e.g.: & \u0000 < \u0001 */
DBUG_ASSERT(to[0] == 0);
to[0]= r->diff[level];
}
return FALSE;
} | O0 | c | apply_shift:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movl %ecx, -0x24(%rbp)
movq %r8, -0x30(%rbp)
movq %r9, -0x38(%rbp)
cmpq $0x0, -0x38(%rbp)
je 0x5edfa
movq -0x20(%rbp), %rax
movslq -0x24(%rbp), %rcx
movl 0x80(%rax,%rcx,4), %esi
movq -0x30(%rbp), %rax
movq -0x38(%rbp), %rcx
subq $0x1, %rcx
movzwl (%rax,%rcx,2), %edx
addl %esi, %edx
movw %dx, (%rax,%rcx,2)
movq -0x20(%rbp), %rax
cmpq $0x1, 0x90(%rax)
jne 0x5edf8
cmpq $0x2, -0x38(%rbp)
jb 0x5edd2
movq -0x30(%rbp), %rax
movq -0x38(%rbp), %rcx
subq $0x2, %rcx
movw (%rax,%rcx,2), %dx
addw $-0x1, %dx
movw %dx, (%rax,%rcx,2)
movq -0x18(%rbp), %rax
cmpl $0x1, 0x30(%rax)
jne 0x5edd0
movq -0x30(%rbp), %rax
movq -0x38(%rbp), %rcx
subq $0x1, %rcx
movzwl (%rax,%rcx,2), %edx
addl $0x1000, %edx # imm = 0x1000
movw %dx, (%rax,%rcx,2)
jmp 0x5edf6
movq -0x10(%rbp), %rdi
movq -0x20(%rbp), %rax
movq (%rax), %rcx
movl $0x80, %esi
leaq 0x2b7af(%rip), %rdx # 0x8a598
movb $0x0, %al
callq 0x84980
movb $0x1, -0x1(%rbp)
jmp 0x5ee1b
jmp 0x5edf8
jmp 0x5ee17
jmp 0x5edfc
jmp 0x5edfe
movq -0x20(%rbp), %rax
movslq -0x24(%rbp), %rcx
movl 0x80(%rax,%rcx,4), %eax
movw %ax, %cx
movq -0x30(%rbp), %rax
movw %cx, (%rax)
movb $0x0, -0x1(%rbp)
movb -0x1(%rbp), %al
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
| apply_shift:
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_24], ecx
mov [rbp+var_30], r8
mov [rbp+var_38], r9
cmp [rbp+var_38], 0
jz loc_5EDFA
mov rax, [rbp+var_20]
movsxd rcx, [rbp+var_24]
mov esi, [rax+rcx*4+80h]
mov rax, [rbp+var_30]
mov rcx, [rbp+var_38]
sub rcx, 1
movzx edx, word ptr [rax+rcx*2]
add edx, esi
mov [rax+rcx*2], dx
mov rax, [rbp+var_20]
cmp qword ptr [rax+90h], 1
jnz short loc_5EDF8
cmp [rbp+var_38], 2
jb short loc_5EDD2
mov rax, [rbp+var_30]
mov rcx, [rbp+var_38]
sub rcx, 2
mov dx, [rax+rcx*2]
add dx, 0FFFFh
mov [rax+rcx*2], dx
mov rax, [rbp+var_18]
cmp dword ptr [rax+30h], 1
jnz short loc_5EDD0
mov rax, [rbp+var_30]
mov rcx, [rbp+var_38]
sub rcx, 1
movzx edx, word ptr [rax+rcx*2]
add edx, 1000h
mov [rax+rcx*2], dx
loc_5EDD0:
jmp short loc_5EDF6
loc_5EDD2:
mov rdi, [rbp+var_10]
mov rax, [rbp+var_20]
mov rcx, [rax]
mov esi, 80h
lea rdx, aCanTResetBefor; "Can't reset before a primary ignorable "...
mov al, 0
call my_snprintf
mov [rbp+var_1], 1
jmp short loc_5EE1B
loc_5EDF6:
jmp short $+2
loc_5EDF8:
jmp short loc_5EE17
loc_5EDFA:
jmp short $+2
loc_5EDFC:
jmp short $+2
loc_5EDFE:
mov rax, [rbp+var_20]
movsxd rcx, [rbp+var_24]
mov eax, [rax+rcx*4+80h]
mov cx, ax
mov rax, [rbp+var_30]
mov [rax], cx
loc_5EE17:
mov [rbp+var_1], 0
loc_5EE1B:
mov al, [rbp+var_1]
add rsp, 40h
pop rbp
retn
| char apply_shift(int a1, long long a2, _QWORD *a3, int a4, _WORD *a5, unsigned long long a6)
{
if ( !a6 )
{
*a5 = *((_DWORD *)a3 + a4 + 32);
return 0;
}
a5[a6 - 1] += *((_DWORD *)a3 + a4 + 32);
if ( a3[18] != 1LL )
return 0;
if ( a6 >= 2 )
{
--a5[a6 - 2];
if ( *(_DWORD *)(a2 + 48) == 1 )
a5[a6 - 1] += 4096;
return 0;
}
my_snprintf(a1, 128, (unsigned int)"Can't reset before a primary ignorable character U+%04lX", *a3, (_DWORD)a5, a6);
return 1;
}
| apply_shift:
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 dword ptr [RBP + -0x24],ECX
MOV qword ptr [RBP + -0x30],R8
MOV qword ptr [RBP + -0x38],R9
CMP qword ptr [RBP + -0x38],0x0
JZ 0x0015edfa
MOV RAX,qword ptr [RBP + -0x20]
MOVSXD RCX,dword ptr [RBP + -0x24]
MOV ESI,dword ptr [RAX + RCX*0x4 + 0x80]
MOV RAX,qword ptr [RBP + -0x30]
MOV RCX,qword ptr [RBP + -0x38]
SUB RCX,0x1
MOVZX EDX,word ptr [RAX + RCX*0x2]
ADD EDX,ESI
MOV word ptr [RAX + RCX*0x2],DX
MOV RAX,qword ptr [RBP + -0x20]
CMP qword ptr [RAX + 0x90],0x1
JNZ 0x0015edf8
CMP qword ptr [RBP + -0x38],0x2
JC 0x0015edd2
MOV RAX,qword ptr [RBP + -0x30]
MOV RCX,qword ptr [RBP + -0x38]
SUB RCX,0x2
MOV DX,word ptr [RAX + RCX*0x2]
ADD DX,-0x1
MOV word ptr [RAX + RCX*0x2],DX
MOV RAX,qword ptr [RBP + -0x18]
CMP dword ptr [RAX + 0x30],0x1
JNZ 0x0015edd0
MOV RAX,qword ptr [RBP + -0x30]
MOV RCX,qword ptr [RBP + -0x38]
SUB RCX,0x1
MOVZX EDX,word ptr [RAX + RCX*0x2]
ADD EDX,0x1000
MOV word ptr [RAX + RCX*0x2],DX
LAB_0015edd0:
JMP 0x0015edf6
LAB_0015edd2:
MOV RDI,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RBP + -0x20]
MOV RCX,qword ptr [RAX]
MOV ESI,0x80
LEA RDX,[0x18a598]
MOV AL,0x0
CALL 0x00184980
MOV byte ptr [RBP + -0x1],0x1
JMP 0x0015ee1b
LAB_0015edf6:
JMP 0x0015edf8
LAB_0015edf8:
JMP 0x0015ee17
LAB_0015edfa:
JMP 0x0015edfc
LAB_0015edfc:
JMP 0x0015edfe
LAB_0015edfe:
MOV RAX,qword ptr [RBP + -0x20]
MOVSXD RCX,dword ptr [RBP + -0x24]
MOV EAX,dword ptr [RAX + RCX*0x4 + 0x80]
MOV CX,AX
MOV RAX,qword ptr [RBP + -0x30]
MOV word ptr [RAX],CX
LAB_0015ee17:
MOV byte ptr [RBP + -0x1],0x0
LAB_0015ee1b:
MOV AL,byte ptr [RBP + -0x1]
ADD RSP,0x40
POP RBP
RET
|
int1
apply_shift(int8 param_1,long param_2,int8 *param_3,int param_4,int2 *param_5,
ulong param_6)
{
if (param_6 == 0) {
*param_5 = (short)*(int4 *)((long)param_3 + (long)param_4 * 4 + 0x80);
}
else {
param_5[param_6 - 1] =
param_5[param_6 - 1] + (short)*(int4 *)((long)param_3 + (long)param_4 * 4 + 0x80);
if (param_3[0x12] == 1) {
if (param_6 < 2) {
my_snprintf(param_1,0x80,"Can\'t reset before a primary ignorable character U+%04lX",
*param_3);
return 1;
}
param_5[param_6 - 2] = param_5[param_6 - 2] + -1;
if (*(int *)(param_2 + 0x30) == 1) {
param_5[param_6 - 1] = param_5[param_6 - 1] + 0x1000;
}
}
}
return 0;
}
|
|
6,339 | minja::Parser::unexpected(minja::TemplateToken const&) const | monkey531[P]llama/common/minja.hpp | std::runtime_error unexpected(const TemplateToken & token) const {
return std::runtime_error("Unexpected " + TemplateToken::typeToString(token.type)
+ error_location_suffix(*template_str, token.location.pos));
} | O3 | cpp | minja::Parser::unexpected(minja::TemplateToken const&) const:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x88, %rsp
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %rbx
movl 0x8(%rdx), %esi
leaq 0x68(%rsp), %r12
movq %r12, %rdi
callq 0x98cec
leaq 0x574af(%rip), %rcx # 0xefc29
movl $0xb, %r8d
movq %r12, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x1a980
leaq 0x38(%rsp), %r12
movq %r12, -0x10(%r12)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x987b4
movq %rdx, 0x28(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x38(%rsp)
jmp 0x987bc
movups (%rcx), %xmm0
movups %xmm0, (%r12)
movq 0x8(%rax), %rdx
movq %rdx, 0x30(%rsp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movq (%r15), %rsi
movq 0x20(%r14), %rdx
leaq 0x48(%rsp), %rdi
callq 0x76c40
movq 0x28(%rsp), %rcx
movq 0x30(%rsp), %r8
movq 0x50(%rsp), %rdx
leaq (%rdx,%r8), %rax
movl $0xf, %edi
cmpq %r12, %rcx
je 0x98807
movq 0x38(%rsp), %rdi
movq 0x48(%rsp), %rsi
cmpq %rdi, %rax
jbe 0x9882a
leaq 0x58(%rsp), %r9
movl $0xf, %edi
cmpq %r9, %rsi
je 0x98825
movq 0x58(%rsp), %rdi
cmpq %rdi, %rax
jbe 0x98836
leaq 0x28(%rsp), %rdi
callq 0x1a250
jmp 0x98844
leaq 0x48(%rsp), %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x1a980
leaq 0x18(%rsp), %rdx
movq %rdx, -0x10(%rdx)
movq (%rax), %rsi
leaq 0x10(%rax), %rcx
cmpq %rcx, %rsi
je 0x98868
movq %rsi, 0x8(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x18(%rsp)
jmp 0x9886e
movups (%rcx), %xmm0
movups %xmm0, (%rdx)
movq %rax, %rdx
addq $0x8, %rdx
movq 0x8(%rax), %rsi
movq %rsi, 0x10(%rsp)
movq %rcx, (%rax)
movq $0x0, (%rdx)
movb $0x0, (%rcx)
leaq 0x8(%rsp), %rsi
movq %rbx, %rdi
callq 0x1adb0
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x988b3
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x1a890
leaq 0x58(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x988ce
movq 0x58(%rsp), %rsi
incq %rsi
callq 0x1a890
movq 0x28(%rsp), %rdi
cmpq %r12, %rdi
je 0x988e5
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x1a890
leaq 0x78(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x98900
movq 0x78(%rsp), %rsi
incq %rsi
callq 0x1a890
movq %rbx, %rax
addq $0x88, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq %rax, %rbx
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x98935
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x1a890
jmp 0x98935
movq %rax, %rbx
leaq 0x58(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x98955
movq 0x58(%rsp), %rsi
incq %rsi
callq 0x1a890
jmp 0x98955
movq %rax, %rbx
movq 0x28(%rsp), %rdi
cmpq %r12, %rdi
je 0x98971
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x1a890
jmp 0x98971
movq %rax, %rbx
leaq 0x78(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x9898c
movq 0x78(%rsp), %rsi
incq %rsi
callq 0x1a890
movq %rbx, %rdi
callq 0x1af20
| _ZNK5minja6Parser10unexpectedERKNS_13TemplateTokenE:
push r15; int
push r14; int
push r12; int
push rbx; int
sub rsp, 88h
mov r14, rdx
mov r15, rsi
mov rbx, rdi
mov esi, [rdx+8]
lea r12, [rsp+0A8h+var_40]
mov rdi, r12
call _ZN5minja13TemplateToken12typeToStringB5cxx11ENS0_4TypeE; minja::TemplateToken::typeToString(minja::TemplateToken::Type)
lea rcx, aUnexpected_0; "Unexpected "
mov r8d, 0Bh
mov rdi, r12
xor esi, esi
xor edx, edx
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7replaceEmmPKcm; std::string::replace(ulong,ulong,char const*,ulong)
lea r12, [rsp+0A8h+var_70]
mov [r12-10h], r12
mov rdx, [rax]
mov rcx, rax
add rcx, 10h; int
cmp rdx, rcx
jz short loc_987B4
mov [rsp+0A8h+var_80], rdx
mov rdx, [rcx]
mov [rsp+0A8h+var_70], rdx
jmp short loc_987BC
loc_987B4:
movups xmm0, xmmword ptr [rcx]
movups xmmword ptr [r12], xmm0
loc_987BC:
mov rdx, [rax+8]
mov qword ptr [rsp+0A8h+var_78], rdx; int
mov [rax], rcx
mov qword ptr [rax+8], 0
mov byte ptr [rax+10h], 0
mov rsi, [r15]; int
mov rdx, [r14+20h]; int
lea rdi, [rsp+0A8h+var_60]; int
call _ZN5minjaL21error_location_suffixERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEm; minja::error_location_suffix(std::string const&,ulong)
mov rcx, [rsp+0A8h+var_80]
mov r8, qword ptr [rsp+0A8h+var_78]
mov rdx, [rsp+0A8h+var_58]
lea rax, [rdx+r8]
mov edi, 0Fh
cmp rcx, r12
jz short loc_98807
mov rdi, [rsp+0A8h+var_70]
loc_98807:
mov rsi, qword ptr [rsp+0A8h+var_60]
cmp rax, rdi
jbe short loc_9882A
lea r9, [rsp+0A8h+var_50]
mov edi, 0Fh
cmp rsi, r9
jz short loc_98825
mov rdi, [rsp+0A8h+var_50]
loc_98825:
cmp rax, rdi
jbe short loc_98836
loc_9882A:
lea rdi, [rsp+0A8h+var_80]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_appendEPKcm; std::string::_M_append(char const*,ulong)
jmp short loc_98844
loc_98836:
lea rdi, [rsp+0A8h+var_60]
xor esi, esi
xor edx, edx
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7replaceEmmPKcm; std::string::replace(ulong,ulong,char const*,ulong)
loc_98844:
lea rdx, [rsp+0A8h+var_90]
mov [rdx-10h], rdx
mov rsi, [rax]
lea rcx, [rax+10h]
cmp rsi, rcx
jz short loc_98868
mov [rsp+0A8h+var_A0], rsi
mov rdx, [rcx]
mov [rsp+0A8h+var_90], rdx
jmp short loc_9886E
loc_98868:
movups xmm0, xmmword ptr [rcx]
movups xmmword ptr [rdx], xmm0
loc_9886E:
mov rdx, rax
add rdx, 8
mov rsi, [rax+8]
mov [rsp+0A8h+var_98], rsi
mov [rax], rcx
mov qword ptr [rdx], 0
mov byte ptr [rcx], 0
lea rsi, [rsp+0A8h+var_A0]
mov rdi, rbx
call __ZNSt13runtime_errorC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; std::runtime_error::runtime_error(std::string const&)
lea rax, [rsp+0A8h+var_90]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_988B3
mov rsi, [rsp+0A8h+var_90]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_988B3:
lea rax, [rsp+0A8h+var_50]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_988CE
mov rsi, [rsp+0A8h+var_50]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_988CE:
mov rdi, [rsp+0A8h+var_80]; void *
cmp rdi, r12
jz short loc_988E5
mov rsi, [rsp+0A8h+var_70]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_988E5:
lea rax, [rsp+0A8h+var_30]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_98900
mov rsi, [rsp+0A8h+var_30]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_98900:
mov rax, rbx
add rsp, 88h
pop rbx
pop r12
pop r14
pop r15
retn
mov rbx, rax
lea rax, [rsp+arg_10]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_98935
mov rsi, [rsp+arg_10]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_98935
mov rbx, rax
loc_98935:
lea rax, [rsp+arg_50]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_98955
mov rsi, [rsp+arg_50]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_98955
mov rbx, rax
loc_98955:
mov rdi, [rsp+arg_20]; void *
cmp rdi, r12
jz short loc_98971
mov rsi, [rsp+arg_30]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_98971
mov rbx, rax
loc_98971:
lea rax, [rsp+arg_70]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_9898C
mov rsi, [rsp+arg_70]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_9898C:
mov rdi, rbx
call __Unwind_Resume
| minja::Parser * minja::Parser::unexpected(minja::Parser *this, const minja::TemplateToken *a2, long long a3)
{
long long v5; // rax
__int128 *v6; // rcx
unsigned long long v7; // rax
unsigned long long v8; // rdi
unsigned long long v9; // rdi
void **v10; // rax
__int128 *v11; // rcx
void *v13[2]; // [rsp+8h] [rbp-A0h] BYREF
__int128 v14; // [rsp+18h] [rbp-90h] BYREF
void *v15; // [rsp+28h] [rbp-80h] BYREF
int v16[2]; // [rsp+30h] [rbp-78h]
__int128 v17; // [rsp+38h] [rbp-70h] BYREF
int v18[2]; // [rsp+48h] [rbp-60h] BYREF
long long v19; // [rsp+50h] [rbp-58h]
_QWORD v20[2]; // [rsp+58h] [rbp-50h] BYREF
void *v21[2]; // [rsp+68h] [rbp-40h] BYREF
long long v22; // [rsp+78h] [rbp-30h] BYREF
minja::TemplateToken::typeToString[abi:cxx11](v21, *(unsigned int *)(a3 + 8));
v5 = std::string::replace(v21, 0LL, 0LL, "Unexpected ", 11LL);
v15 = &v17;
v6 = (__int128 *)(v5 + 16);
if ( *(_QWORD *)v5 == v5 + 16 )
{
v17 = *v6;
}
else
{
v15 = *(void **)v5;
*(_QWORD *)&v17 = *(_QWORD *)v6;
}
*(_QWORD *)v16 = *(_QWORD *)(v5 + 8);
*(_QWORD *)v5 = v6;
*(_QWORD *)(v5 + 8) = 0LL;
*(_BYTE *)(v5 + 16) = 0;
minja::error_location_suffix((long long)v18, *(_QWORD *)a2, *(_QWORD *)(a3 + 32));
v7 = v19 + *(_QWORD *)v16;
v8 = 15LL;
if ( v15 != &v17 )
v8 = v17;
if ( v7 <= v8 )
goto LABEL_10;
v9 = 15LL;
if ( *(_QWORD **)v18 != v20 )
v9 = v20[0];
if ( v7 <= v9 )
v10 = (void **)std::string::replace(v18, 0LL, 0LL, v15, *(_QWORD *)v16);
else
LABEL_10:
v10 = (void **)std::string::_M_append(&v15, *(_QWORD *)v18, v19);
v13[0] = &v14;
v11 = (__int128 *)(v10 + 2);
if ( *v10 == v10 + 2 )
{
v14 = *v11;
}
else
{
v13[0] = *v10;
*(_QWORD *)&v14 = *(_QWORD *)v11;
}
v13[1] = v10[1];
*v10 = v11;
v10[1] = 0LL;
*(_BYTE *)v11 = 0;
std::runtime_error::runtime_error(this, v13);
if ( v13[0] != &v14 )
operator delete(v13[0], v14 + 1);
if ( *(_QWORD **)v18 != v20 )
operator delete(*(void **)v18, v20[0] + 1LL);
if ( v15 != &v17 )
operator delete(v15, v17 + 1);
if ( v21[0] != &v22 )
operator delete(v21[0], v22 + 1);
return this;
}
| unexpected:
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
SUB RSP,0x88
MOV R14,RDX
MOV R15,RSI
MOV RBX,RDI
MOV ESI,dword ptr [RDX + 0x8]
LEA R12,[RSP + 0x68]
MOV RDI,R12
CALL 0x00198cec
LAB_00198773:
LEA RCX,[0x1efc29]
MOV R8D,0xb
MOV RDI,R12
XOR ESI,ESI
XOR EDX,EDX
CALL 0x0011a980
LEA R12,[RSP + 0x38]
MOV qword ptr [R12 + -0x10],R12
MOV RDX,qword ptr [RAX]
MOV RCX,RAX
ADD RCX,0x10
CMP RDX,RCX
JZ 0x001987b4
MOV qword ptr [RSP + 0x28],RDX
MOV RDX,qword ptr [RCX]
MOV qword ptr [RSP + 0x38],RDX
JMP 0x001987bc
LAB_001987b4:
MOVUPS XMM0,xmmword ptr [RCX]
MOVUPS xmmword ptr [R12],XMM0
LAB_001987bc:
MOV RDX,qword ptr [RAX + 0x8]
MOV qword ptr [RSP + 0x30],RDX
MOV qword ptr [RAX],RCX
MOV qword ptr [RAX + 0x8],0x0
MOV byte ptr [RAX + 0x10],0x0
MOV RSI,qword ptr [R15]
MOV RDX,qword ptr [R14 + 0x20]
LAB_001987db:
LEA RDI,[RSP + 0x48]
CALL 0x00176c40
MOV RCX,qword ptr [RSP + 0x28]
MOV R8,qword ptr [RSP + 0x30]
MOV RDX,qword ptr [RSP + 0x50]
LEA RAX,[RDX + R8*0x1]
MOV EDI,0xf
CMP RCX,R12
JZ 0x00198807
MOV RDI,qword ptr [RSP + 0x38]
LAB_00198807:
MOV RSI,qword ptr [RSP + 0x48]
CMP RAX,RDI
JBE 0x0019882a
LEA R9,[RSP + 0x58]
MOV EDI,0xf
CMP RSI,R9
JZ 0x00198825
MOV RDI,qword ptr [RSP + 0x58]
LAB_00198825:
CMP RAX,RDI
JBE 0x00198836
LAB_0019882a:
LEA RDI,[RSP + 0x28]
CALL 0x0011a250
JMP 0x00198844
LAB_00198836:
LEA RDI,[RSP + 0x48]
XOR ESI,ESI
XOR EDX,EDX
CALL 0x0011a980
LAB_00198844:
LEA RDX,[RSP + 0x18]
MOV qword ptr [RDX + -0x10],RDX
MOV RSI,qword ptr [RAX]
LEA RCX,[RAX + 0x10]
CMP RSI,RCX
JZ 0x00198868
MOV qword ptr [RSP + 0x8],RSI
MOV RDX,qword ptr [RCX]
MOV qword ptr [RSP + 0x18],RDX
JMP 0x0019886e
LAB_00198868:
MOVUPS XMM0,xmmword ptr [RCX]
MOVUPS xmmword ptr [RDX],XMM0
LAB_0019886e:
MOV RDX,RAX
ADD RDX,0x8
MOV RSI,qword ptr [RAX + 0x8]
MOV qword ptr [RSP + 0x10],RSI
MOV qword ptr [RAX],RCX
MOV qword ptr [RDX],0x0
MOV byte ptr [RCX],0x0
LAB_0019888b:
LEA RSI,[RSP + 0x8]
MOV RDI,RBX
CALL 0x0011adb0
LAB_00198898:
LEA RAX,[RSP + 0x18]
MOV RDI,qword ptr [RAX + -0x10]
CMP RDI,RAX
JZ 0x001988b3
MOV RSI,qword ptr [RSP + 0x18]
INC RSI
CALL 0x0011a890
LAB_001988b3:
LEA RAX,[RSP + 0x58]
MOV RDI,qword ptr [RAX + -0x10]
CMP RDI,RAX
JZ 0x001988ce
MOV RSI,qword ptr [RSP + 0x58]
INC RSI
CALL 0x0011a890
LAB_001988ce:
MOV RDI,qword ptr [RSP + 0x28]
CMP RDI,R12
JZ 0x001988e5
MOV RSI,qword ptr [RSP + 0x38]
INC RSI
CALL 0x0011a890
LAB_001988e5:
LEA RAX,[RSP + 0x78]
MOV RDI,qword ptr [RAX + -0x10]
CMP RDI,RAX
JZ 0x00198900
MOV RSI,qword ptr [RSP + 0x78]
INC RSI
CALL 0x0011a890
LAB_00198900:
MOV RAX,RBX
ADD RSP,0x88
POP RBX
POP R12
POP R14
POP R15
RET
|
/* minja::Parser::unexpected(minja::TemplateToken const&) const */
TemplateToken * minja::Parser::unexpected(TemplateToken *param_1)
{
long *plVar1;
int8 *puVar2;
ulong *puVar3;
long in_RDX;
int8 *in_RSI;
ulong uVar4;
long *local_a0;
int8 local_98;
long local_90;
int8 uStack_88;
ulong *local_80;
long local_78;
ulong local_70;
long lStack_68;
ulong *local_60;
long local_58;
ulong local_50 [2];
long *local_40 [2];
long local_30 [2];
TemplateToken::typeToString_abi_cxx11_((TemplateToken *)local_40);
/* try { // try from 00198773 to 0019878b has its CatchHandler @ 0019896e */
plVar1 = (long *)std::__cxx11::string::replace((ulong)local_40,0,(char *)0x0,0x1efc29);
puVar3 = (ulong *)(plVar1 + 2);
if ((ulong *)*plVar1 == puVar3) {
local_70 = *puVar3;
lStack_68 = plVar1[3];
local_80 = &local_70;
}
else {
local_70 = *puVar3;
local_80 = (ulong *)*plVar1;
}
local_78 = plVar1[1];
*plVar1 = (long)puVar3;
plVar1[1] = 0;
*(int1 *)(plVar1 + 2) = 0;
/* try { // try from 001987db to 001987e4 has its CatchHandler @ 00198952 */
error_location_suffix((minja *)&local_60,(string *)*in_RSI,*(ulong *)(in_RDX + 0x20));
uVar4 = 0xf;
if (local_80 != &local_70) {
uVar4 = local_70;
}
if (uVar4 < (ulong)(local_58 + local_78)) {
uVar4 = 0xf;
if (local_60 != local_50) {
uVar4 = local_50[0];
}
if ((ulong)(local_58 + local_78) <= uVar4) {
puVar2 = (int8 *)
std::__cxx11::string::replace((ulong)&local_60,0,(char *)0x0,(ulong)local_80);
goto LAB_00198844;
}
}
/* try { // try from 0019882a to 00198843 has its CatchHandler @ 00198932 */
puVar2 = (int8 *)std::__cxx11::string::_M_append((char *)&local_80,(ulong)local_60);
LAB_00198844:
local_a0 = &local_90;
plVar1 = puVar2 + 2;
if ((long *)*puVar2 == plVar1) {
local_90 = *plVar1;
uStack_88 = puVar2[3];
}
else {
local_90 = *plVar1;
local_a0 = (long *)*puVar2;
}
local_98 = puVar2[1];
*puVar2 = plVar1;
puVar2[1] = 0;
*(int1 *)plVar1 = 0;
/* try { // try from 0019888b to 00198897 has its CatchHandler @ 00198912 */
std::runtime_error::runtime_error((runtime_error *)param_1,(string *)&local_a0);
if (local_a0 != &local_90) {
operator_delete(local_a0,local_90 + 1);
}
if (local_60 != local_50) {
operator_delete(local_60,local_50[0] + 1);
}
if (local_80 != &local_70) {
operator_delete(local_80,local_70 + 1);
}
if (local_40[0] != local_30) {
operator_delete(local_40[0],local_30[0] + 1);
}
return param_1;
}
|
|
6,340 | ma_mark_file_changed | eloqsql/storage/maria/ma_locking.c | int _ma_mark_file_changed(register MARIA_SHARE *share)
{
if (!share->base.born_transactional)
{
if (!_MA_ALREADY_MARKED_FILE_CHANGED)
return _ma_mark_file_changed_now(share);
}
else
{
/*
For transactional tables, the table is marked changed when the first page
is written. Here we just mark the state to be updated so that caller
can do 'analyze table' and find that is has changed before any pages
are written.
*/
if (! test_all_bits(share->state.changed,
(STATE_CHANGED | STATE_NOT_ANALYZED |
STATE_NOT_OPTIMIZED_KEYS)))
{
mysql_mutex_lock(&share->intern_lock);
share->state.changed|=(STATE_CHANGED | STATE_NOT_ANALYZED |
STATE_NOT_OPTIMIZED_KEYS);
mysql_mutex_unlock(&share->intern_lock);
}
}
return 0;
} | O0 | c | ma_mark_file_changed:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rax
cmpb $0x0, 0x44c(%rax)
jne 0x4adeb
movq -0x10(%rbp), %rax
movl 0x170(%rax), %eax
andl $0x1, %eax
cmpl $0x0, %eax
je 0x4addb
movq -0x10(%rbp), %rax
movsbl 0x7df(%rax), %eax
cmpl $0x0, %eax
jne 0x4ade9
movq -0x10(%rbp), %rdi
callq 0x4ae50
movl %eax, -0x4(%rbp)
jmp 0x4ae45
jmp 0x4ae3e
movq -0x10(%rbp), %rax
movl 0x170(%rax), %eax
andl $0x19, %eax
cmpl $0x19, %eax
je 0x4ae3c
movq -0x10(%rbp), %rdi
addq $0x8f0, %rdi # imm = 0x8F0
leaq 0x110db8(%rip), %rsi # 0x15bbc7
movl $0x19c, %edx # imm = 0x19C
callq 0x4aac0
movq -0x10(%rbp), %rax
movl 0x170(%rax), %ecx
orl $0x19, %ecx
movl %ecx, 0x170(%rax)
movq -0x10(%rbp), %rdi
addq $0x8f0, %rdi # imm = 0x8F0
callq 0x4ac60
jmp 0x4ae3e
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x10, %rsp
popq %rbp
retq
nop
| _ma_mark_file_changed:
push rbp
mov rbp, rsp
sub rsp, 10h
mov [rbp+var_10], rdi
mov rax, [rbp+var_10]
cmp byte ptr [rax+44Ch], 0
jnz short loc_4ADEB
mov rax, [rbp+var_10]
mov eax, [rax+170h]
and eax, 1
cmp eax, 0
jz short loc_4ADDB
mov rax, [rbp+var_10]
movsx eax, byte ptr [rax+7DFh]
cmp eax, 0
jnz short loc_4ADE9
loc_4ADDB:
mov rdi, [rbp+var_10]
call _ma_mark_file_changed_now
mov [rbp+var_4], eax
jmp short loc_4AE45
loc_4ADE9:
jmp short loc_4AE3E
loc_4ADEB:
mov rax, [rbp+var_10]
mov eax, [rax+170h]
and eax, 19h
cmp eax, 19h
jz short loc_4AE3C
mov rdi, [rbp+var_10]
add rdi, 8F0h
lea rsi, aWorkspaceLlm4b_6; "/workspace/llm4binary/github2025/eloqsq"...
mov edx, 19Ch
call inline_mysql_mutex_lock_5
mov rax, [rbp+var_10]
mov ecx, [rax+170h]
or ecx, 19h
mov [rax+170h], ecx
mov rdi, [rbp+var_10]
add rdi, 8F0h
call inline_mysql_mutex_unlock_5
loc_4AE3C:
jmp short $+2
loc_4AE3E:
mov [rbp+var_4], 0
loc_4AE45:
mov eax, [rbp+var_4]
add rsp, 10h
pop rbp
retn
| long long ma_mark_file_changed(long long a1)
{
if ( *(_BYTE *)(a1 + 1100) )
{
if ( (*(_DWORD *)(a1 + 368) & 0x19) != 0x19 )
{
inline_mysql_mutex_lock_5(
a1 + 2288,
(long long)"/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_locking.c",
0x19Cu);
*(_DWORD *)(a1 + 368) |= 0x19u;
inline_mysql_mutex_unlock_5(a1 + 2288);
}
return 0;
}
if ( (*(_DWORD *)(a1 + 368) & 1) != 0 && *(_BYTE *)(a1 + 2015) )
return 0;
return (unsigned int)ma_mark_file_changed_now(a1);
}
| _ma_mark_file_changed:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x10
MOV qword ptr [RBP + -0x10],RDI
MOV RAX,qword ptr [RBP + -0x10]
CMP byte ptr [RAX + 0x44c],0x0
JNZ 0x0014adeb
MOV RAX,qword ptr [RBP + -0x10]
MOV EAX,dword ptr [RAX + 0x170]
AND EAX,0x1
CMP EAX,0x0
JZ 0x0014addb
MOV RAX,qword ptr [RBP + -0x10]
MOVSX EAX,byte ptr [RAX + 0x7df]
CMP EAX,0x0
JNZ 0x0014ade9
LAB_0014addb:
MOV RDI,qword ptr [RBP + -0x10]
CALL 0x0014ae50
MOV dword ptr [RBP + -0x4],EAX
JMP 0x0014ae45
LAB_0014ade9:
JMP 0x0014ae3e
LAB_0014adeb:
MOV RAX,qword ptr [RBP + -0x10]
MOV EAX,dword ptr [RAX + 0x170]
AND EAX,0x19
CMP EAX,0x19
JZ 0x0014ae3c
MOV RDI,qword ptr [RBP + -0x10]
ADD RDI,0x8f0
LEA RSI,[0x25bbc7]
MOV EDX,0x19c
CALL 0x0014aac0
MOV RAX,qword ptr [RBP + -0x10]
MOV ECX,dword ptr [RAX + 0x170]
OR ECX,0x19
MOV dword ptr [RAX + 0x170],ECX
MOV RDI,qword ptr [RBP + -0x10]
ADD RDI,0x8f0
CALL 0x0014ac60
LAB_0014ae3c:
JMP 0x0014ae3e
LAB_0014ae3e:
MOV dword ptr [RBP + -0x4],0x0
LAB_0014ae45:
MOV EAX,dword ptr [RBP + -0x4]
ADD RSP,0x10
POP RBP
RET
|
int4 _ma_mark_file_changed(long param_1)
{
int4 uVar1;
if (*(char *)(param_1 + 0x44c) == '\0') {
if (((*(uint *)(param_1 + 0x170) & 1) == 0) || (*(char *)(param_1 + 0x7df) == '\0')) {
uVar1 = _ma_mark_file_changed_now(param_1);
return uVar1;
}
}
else if ((*(uint *)(param_1 + 0x170) & 0x19) != 0x19) {
inline_mysql_mutex_lock
(param_1 + 0x8f0,"/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_locking.c"
,0x19c);
*(uint *)(param_1 + 0x170) = *(uint *)(param_1 + 0x170) | 0x19;
inline_mysql_mutex_unlock(param_1 + 0x8f0);
}
return 0;
}
|
|
6,341 | ma_mark_file_changed | eloqsql/storage/maria/ma_locking.c | int _ma_mark_file_changed(register MARIA_SHARE *share)
{
if (!share->base.born_transactional)
{
if (!_MA_ALREADY_MARKED_FILE_CHANGED)
return _ma_mark_file_changed_now(share);
}
else
{
/*
For transactional tables, the table is marked changed when the first page
is written. Here we just mark the state to be updated so that caller
can do 'analyze table' and find that is has changed before any pages
are written.
*/
if (! test_all_bits(share->state.changed,
(STATE_CHANGED | STATE_NOT_ANALYZED |
STATE_NOT_OPTIMIZED_KEYS)))
{
mysql_mutex_lock(&share->intern_lock);
share->state.changed|=(STATE_CHANGED | STATE_NOT_ANALYZED |
STATE_NOT_OPTIMIZED_KEYS);
mysql_mutex_unlock(&share->intern_lock);
}
}
return 0;
} | O3 | c | ma_mark_file_changed:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
cmpb $0x0, 0x44c(%rdi)
movl 0x170(%rdi), %eax
je 0x45783
notl %eax
testb $0x19, %al
je 0x45790
leaq 0x8f0(%rbx), %r14
cmpq $0x0, 0x930(%rbx)
jne 0x457a3
movq %r14, %rdi
callq 0x2a220
orb $0x19, 0x170(%rbx)
movq 0x930(%rbx), %rdi
testq %rdi, %rdi
jne 0x457b9
movq %r14, %rdi
callq 0x2a1e0
jmp 0x45790
testb $0x1, %al
je 0x45797
cmpb $0x0, 0x7df(%rbx)
je 0x45797
xorl %eax, %eax
popq %rbx
popq %r14
popq %rbp
retq
movq %rbx, %rdi
popq %rbx
popq %r14
popq %rbp
jmp 0x457cb
leaq 0x9c502(%rip), %rsi # 0xe1cac
movq %r14, %rdi
movl $0x19c, %edx # imm = 0x19C
callq 0x30603
jmp 0x45766
leaq 0x349a98(%rip), %rax # 0x38f258
movq (%rax), %rax
callq *0x160(%rax)
jmp 0x45779
| _ma_mark_file_changed:
push rbp
mov rbp, rsp
push r14
push rbx
mov rbx, rdi
cmp byte ptr [rdi+44Ch], 0
mov eax, [rdi+170h]
jz short loc_45783
not eax
test al, 19h
jz short loc_45790
lea r14, [rbx+8F0h]
cmp qword ptr [rbx+930h], 0
jnz short loc_457A3
mov rdi, r14
call _pthread_mutex_lock
loc_45766:
or byte ptr [rbx+170h], 19h
mov rdi, [rbx+930h]
test rdi, rdi
jnz short loc_457B9
loc_45779:
mov rdi, r14
call _pthread_mutex_unlock
jmp short loc_45790
loc_45783:
test al, 1
jz short loc_45797
cmp byte ptr [rbx+7DFh], 0
jz short loc_45797
loc_45790:
xor eax, eax
pop rbx
pop r14
pop rbp
retn
loc_45797:
mov rdi, rbx
pop rbx
pop r14
pop rbp
jmp _ma_mark_file_changed_now
loc_457A3:
lea rsi, aWorkspaceLlm4b_30; "/workspace/llm4binary/github2025/eloqsq"...
mov rdi, r14
mov edx, 19Ch
call psi_mutex_lock
jmp short loc_45766
loc_457B9:
lea rax, PSI_server
mov rax, [rax]
call qword ptr [rax+160h]
jmp short loc_45779
| long long ma_mark_file_changed(long long a1)
{
int v1; // eax
v1 = *(_DWORD *)(a1 + 368);
if ( *(_BYTE *)(a1 + 1100) )
{
if ( (~(_BYTE)v1 & 0x19) != 0 )
{
if ( *(_QWORD *)(a1 + 2352) )
psi_mutex_lock(
a1 + 2288,
(long long)"/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_locking.c",
0x19Cu);
else
pthread_mutex_lock(a1 + 2288);
*(_BYTE *)(a1 + 368) |= 0x19u;
if ( *(_QWORD *)(a1 + 2352) )
PSI_server[44]();
pthread_mutex_unlock(a1 + 2288);
}
return 0LL;
}
if ( (v1 & 1) != 0 && *(_BYTE *)(a1 + 2015) )
return 0LL;
return ma_mark_file_changed_now(a1);
}
| _ma_mark_file_changed:
PUSH RBP
MOV RBP,RSP
PUSH R14
PUSH RBX
MOV RBX,RDI
CMP byte ptr [RDI + 0x44c],0x0
MOV EAX,dword ptr [RDI + 0x170]
JZ 0x00145783
NOT EAX
TEST AL,0x19
JZ 0x00145790
LEA R14,[RBX + 0x8f0]
CMP qword ptr [RBX + 0x930],0x0
JNZ 0x001457a3
MOV RDI,R14
CALL 0x0012a220
LAB_00145766:
OR byte ptr [RBX + 0x170],0x19
MOV RDI,qword ptr [RBX + 0x930]
TEST RDI,RDI
JNZ 0x001457b9
LAB_00145779:
MOV RDI,R14
CALL 0x0012a1e0
JMP 0x00145790
LAB_00145783:
TEST AL,0x1
JZ 0x00145797
CMP byte ptr [RBX + 0x7df],0x0
JZ 0x00145797
LAB_00145790:
XOR EAX,EAX
POP RBX
POP R14
POP RBP
RET
LAB_00145797:
MOV RDI,RBX
POP RBX
POP R14
POP RBP
JMP 0x001457cb
LAB_001457a3:
LEA RSI,[0x1e1cac]
MOV RDI,R14
MOV EDX,0x19c
CALL 0x00130603
JMP 0x00145766
LAB_001457b9:
LEA RAX,[0x48f258]
MOV RAX,qword ptr [RAX]
CALL qword ptr [RAX + 0x160]
JMP 0x00145779
|
int8 _ma_mark_file_changed(long param_1)
{
pthread_mutex_t *__mutex;
int8 uVar1;
if (*(char *)(param_1 + 0x44c) == '\0') {
if (((*(uint *)(param_1 + 0x170) & 1) == 0) || (*(char *)(param_1 + 0x7df) == '\0')) {
uVar1 = _ma_mark_file_changed_now(param_1);
return uVar1;
}
}
else if ((~*(uint *)(param_1 + 0x170) & 0x19) != 0) {
__mutex = (pthread_mutex_t *)(param_1 + 0x8f0);
if (*(long *)(param_1 + 0x930) == 0) {
pthread_mutex_lock(__mutex);
}
else {
psi_mutex_lock(__mutex,"/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_locking.c",
0x19c);
}
*(byte *)(param_1 + 0x170) = *(byte *)(param_1 + 0x170) | 0x19;
if (*(long *)(param_1 + 0x930) != 0) {
(**(code **)(PSI_server + 0x160))();
}
pthread_mutex_unlock(__mutex);
}
return 0;
}
|
|
6,342 | ma_memmap_file | eloqsql/storage/maria/ma_packrec.c | my_bool _ma_memmap_file(MARIA_HA *info)
{
MARIA_SHARE *share= info->s;
DBUG_ENTER("maria_memmap_file");
if (!info->s->file_map)
{
if (mysql_file_seek(info->dfile.file, 0L, MY_SEEK_END, MYF(0)) <
share->state.state.data_file_length+MEMMAP_EXTRA_MARGIN)
{
DBUG_PRINT("warning",("File isn't extended for memmap"));
DBUG_RETURN(0);
}
if (_ma_dynmap_file(info, share->state.state.data_file_length))
DBUG_RETURN(0);
}
info->opt_flag|= MEMMAP_USED;
info->read_record= share->read_record= _ma_read_mempack_record;
share->scan= _ma_read_rnd_mempack_record;
DBUG_RETURN(1);
} | O3 | c | ma_memmap_file:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x50, %rsp
movq %rdi, %rbx
movq (%rdi), %r12
cmpq $0x0, 0x5f0(%r12)
je 0x3a48f
orb $0x20, 0x61c(%rbx)
leaq 0x9f(%rip), %rax # 0x3a50c
movq %rax, 0x648(%r12)
movq %rax, 0x3d8(%rbx)
leaq 0x136(%rip), %rax # 0x3a5b9
movq %rax, 0x658(%r12)
movb $0x1, %al
jmp 0x3a4e8
movl 0x480(%rbx), %r14d
leaq 0x34bb73(%rip), %rax # 0x386010
movq (%rax), %rax
leaq -0x70(%rbp), %rdi
movl %r14d, %esi
movl $0x8, %edx
callq *0x158(%rax)
testq %rax, %rax
jne 0x3a4f5
movl %r14d, %edi
xorl %esi, %esi
movl $0x2, %edx
xorl %ecx, %ecx
callq 0xa0b78
movq 0x40(%r12), %rsi
leaq 0x7(%rsi), %rcx
cmpq %rcx, %rax
jb 0x3a4e6
movq %rbx, %rdi
callq 0x3c0b0
testb %al, %al
je 0x3a45f
xorl %eax, %eax
addq $0x50, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
leaq -0x28(%rbp), %r15
movq %rax, %rdi
movl %r14d, %esi
movq %r15, %rdx
callq 0x29b88
movq (%r15), %rax
jmp 0x3a4c8
| _ma_memmap_file:
push rbp
mov rbp, rsp
push r15
push r14
push r12
push rbx
sub rsp, 50h
mov rbx, rdi
mov r12, [rdi]
cmp qword ptr [r12+5F0h], 0
jz short loc_3A48F
loc_3A45F:
or byte ptr [rbx+61Ch], 20h
lea rax, _ma_read_mempack_record
mov [r12+648h], rax
mov [rbx+3D8h], rax
lea rax, _ma_read_rnd_mempack_record
mov [r12+658h], rax
mov al, 1
jmp short loc_3A4E8
loc_3A48F:
mov r14d, [rbx+480h]
lea rax, PSI_server
mov rax, [rax]
lea rdi, [rbp+var_70]
mov esi, r14d
mov edx, 8
call qword ptr [rax+158h]
test rax, rax
jnz short loc_3A4F5
mov edi, r14d
xor esi, esi
mov edx, 2
xor ecx, ecx
call my_seek
loc_3A4C8:
mov rsi, [r12+40h]
lea rcx, [rsi+7]
cmp rax, rcx
jb short loc_3A4E6
mov rdi, rbx
call _ma_dynmap_file
test al, al
jz loc_3A45F
loc_3A4E6:
xor eax, eax
loc_3A4E8:
add rsp, 50h
pop rbx
pop r12
pop r14
pop r15
pop rbp
retn
loc_3A4F5:
lea r15, [rbp+var_28]
mov rdi, rax
mov esi, r14d
mov rdx, r15
call _ma_memmap_file_cold_1
mov rax, [r15]
jmp short loc_3A4C8
| char ma_memmap_file(long long a1)
{
_QWORD *v1; // r12
unsigned int v3; // r14d
long long v4; // rax
unsigned long long v5; // rax
long long v6; // rsi
_BYTE v7[72]; // [rsp+0h] [rbp-70h] BYREF
unsigned long long v8[5]; // [rsp+48h] [rbp-28h] BYREF
v1 = *(_QWORD **)a1;
if ( !*(_QWORD *)(*(_QWORD *)a1 + 1520LL) )
{
v3 = *(_DWORD *)(a1 + 1152);
v4 = ((long long ( *)(_BYTE *, _QWORD, long long))PSI_server[43])(v7, v3, 8LL);
if ( v4 )
{
ma_memmap_file_cold_1(v4, v3, v8);
v5 = v8[0];
}
else
{
v5 = my_seek(v3, 0LL, 2LL, 0LL);
}
v6 = v1[8];
if ( v5 < v6 + 7 || (unsigned __int8)ma_dynmap_file(a1, v6) )
return 0;
}
*(_BYTE *)(a1 + 1564) |= 0x20u;
v1[201] = ma_read_mempack_record;
*(_QWORD *)(a1 + 984) = ma_read_mempack_record;
v1[203] = ma_read_rnd_mempack_record;
return 1;
}
| _ma_memmap_file:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
SUB RSP,0x50
MOV RBX,RDI
MOV R12,qword ptr [RDI]
CMP qword ptr [R12 + 0x5f0],0x0
JZ 0x0013a48f
LAB_0013a45f:
OR byte ptr [RBX + 0x61c],0x20
LEA RAX,[0x13a50c]
MOV qword ptr [R12 + 0x648],RAX
MOV qword ptr [RBX + 0x3d8],RAX
LEA RAX,[0x13a5b9]
MOV qword ptr [R12 + 0x658],RAX
MOV AL,0x1
JMP 0x0013a4e8
LAB_0013a48f:
MOV R14D,dword ptr [RBX + 0x480]
LEA RAX,[0x486010]
MOV RAX,qword ptr [RAX]
LEA RDI,[RBP + -0x70]
MOV ESI,R14D
MOV EDX,0x8
CALL qword ptr [RAX + 0x158]
TEST RAX,RAX
JNZ 0x0013a4f5
MOV EDI,R14D
XOR ESI,ESI
MOV EDX,0x2
XOR ECX,ECX
CALL 0x001a0b78
LAB_0013a4c8:
MOV RSI,qword ptr [R12 + 0x40]
LEA RCX,[RSI + 0x7]
CMP RAX,RCX
JC 0x0013a4e6
MOV RDI,RBX
CALL 0x0013c0b0
TEST AL,AL
JZ 0x0013a45f
LAB_0013a4e6:
XOR EAX,EAX
LAB_0013a4e8:
ADD RSP,0x50
POP RBX
POP R12
POP R14
POP R15
POP RBP
RET
LAB_0013a4f5:
LEA R15,[RBP + -0x28]
MOV RDI,RAX
MOV ESI,R14D
MOV RDX,R15
CALL 0x00129b88
MOV RAX,qword ptr [R15]
JMP 0x0013a4c8
|
int8 _ma_memmap_file(long *param_1)
{
int4 uVar1;
long lVar2;
char cVar3;
int8 uVar4;
long lVar5;
int1 local_78 [72];
ulong local_30;
lVar2 = *param_1;
if (*(long *)(lVar2 + 0x5f0) == 0) {
uVar1 = (int4)param_1[0x90];
lVar5 = (**(code **)(PSI_server + 0x158))(local_78,uVar1,8);
if (lVar5 == 0) {
local_30 = my_seek(uVar1,0,2,0);
}
else {
_ma_memmap_file_cold_1(lVar5,uVar1,&local_30);
}
if (*(long *)(lVar2 + 0x40) + 7U <= local_30) {
cVar3 = _ma_dynmap_file(param_1);
if (cVar3 == '\0') goto LAB_0013a45f;
}
uVar4 = 0;
}
else {
LAB_0013a45f:
*(byte *)((long)param_1 + 0x61c) = *(byte *)((long)param_1 + 0x61c) | 0x20;
*(code **)(lVar2 + 0x648) = _ma_read_mempack_record;
param_1[0x7b] = (long)_ma_read_mempack_record;
*(code **)(lVar2 + 0x658) = _ma_read_rnd_mempack_record;
uVar4 = 0x13a501;
}
return uVar4;
}
|
|
6,343 | OpenSubdiv::v3_6_0::Far::PatchBuilder::GetRegularPatchPoints(int, int, int, int*, int) const | NVIDIA-RTX[P]OSD-Lite/opensubdiv/far/patchBuilder.cpp | int
PatchBuilder::GetRegularPatchPoints(int levelIndex, Index faceIndex,
int regBoundaryMask, Index patchPoints[],
int fvarChannel) const {
if (_schemeIsLinear) {
return getRegularFacePoints(
levelIndex, faceIndex, patchPoints, fvarChannel);
} else if (_schemeRegFaceSize == 4) {
return getQuadRegularPatchPoints(
levelIndex, faceIndex, regBoundaryMask, patchPoints, fvarChannel);
} else {
return getTriRegularPatchPoints(
levelIndex, faceIndex, regBoundaryMask, patchPoints, fvarChannel);
}
return 0;
} | O1 | cpp | OpenSubdiv::v3_6_0::Far::PatchBuilder::GetRegularPatchPoints(int, int, int, int*, int) const:
cmpb $0x1, 0x24(%rdi)
jne 0x66fed
movq %r8, %rcx
movl %r9d, %r8d
jmp 0x39eb0
pushq %rax
cmpl $0x4, 0x20(%rdi)
jne 0x67000
callq 0x39a70
movl $0x10, %eax
jmp 0x6700a
callq 0x3a3e0
movl $0xc, %eax
popq %rcx
retq
| _ZNK10OpenSubdiv6v3_6_03Far12PatchBuilder21GetRegularPatchPointsEiiiPii:
cmp byte ptr [rdi+24h], 1
jnz short loc_66FED
mov rcx, r8; int
mov r8d, r9d; int *
jmp __ZNK10OpenSubdiv6v3_6_03Far12PatchBuilder20getRegularFacePointsEiiPii; OpenSubdiv::v3_6_0::Far::PatchBuilder::getRegularFacePoints(int,int,int *,int)
loc_66FED:
push rax
cmp dword ptr [rdi+20h], 4
jnz short loc_67000
call __ZNK10OpenSubdiv6v3_6_03Far12PatchBuilder25getQuadRegularPatchPointsEiiiPii; OpenSubdiv::v3_6_0::Far::PatchBuilder::getQuadRegularPatchPoints(int,int,int,int *,int)
mov eax, 10h
jmp short loc_6700A
loc_67000:
call __ZNK10OpenSubdiv6v3_6_03Far12PatchBuilder24getTriRegularPatchPointsEiiiPii; OpenSubdiv::v3_6_0::Far::PatchBuilder::getTriRegularPatchPoints(int,int,int,int *,int)
mov eax, 0Ch
loc_6700A:
pop rcx
retn
| long long OpenSubdiv::v3_6_0::Far::PatchBuilder::GetRegularPatchPoints(
OpenSubdiv::v3_6_0::Far::PatchBuilder *this,
int a2,
int a3,
int a4,
int *a5,
int a6)
{
if ( *((_BYTE *)this + 36) == 1 )
return OpenSubdiv::v3_6_0::Far::PatchBuilder::getRegularFacePoints(this, a2, a3, a5, a6);
if ( *((_DWORD *)this + 8) == 4 )
{
OpenSubdiv::v3_6_0::Far::PatchBuilder::getQuadRegularPatchPoints(this, a2, a3, a4, a5, a6);
return 16LL;
}
else
{
OpenSubdiv::v3_6_0::Far::PatchBuilder::getTriRegularPatchPoints(this, a2, a3, a4, a5, a6);
return 12LL;
}
}
| GetRegularPatchPoints:
CMP byte ptr [RDI + 0x24],0x1
JNZ 0x00166fed
MOV RCX,R8
MOV R8D,R9D
JMP 0x00139eb0
LAB_00166fed:
PUSH RAX
CMP dword ptr [RDI + 0x20],0x4
JNZ 0x00167000
CALL 0x00139a70
MOV EAX,0x10
JMP 0x0016700a
LAB_00167000:
CALL 0x0013a3e0
MOV EAX,0xc
LAB_0016700a:
POP RCX
RET
|
/* OpenSubdiv::v3_6_0::Far::PatchBuilder::GetRegularPatchPoints(int, int, int, int*, int) const */
int8 __thiscall
OpenSubdiv::v3_6_0::Far::PatchBuilder::GetRegularPatchPoints
(PatchBuilder *this,int param_1,int param_2,int param_3,int *param_4,int param_5)
{
int8 uVar1;
if (this[0x24] == (PatchBuilder)0x1) {
uVar1 = getRegularFacePoints(this,param_1,param_2,param_4,param_5);
return uVar1;
}
if (*(int *)(this + 0x20) == 4) {
getQuadRegularPatchPoints(this,param_1,param_2,param_3,param_4,param_5);
uVar1 = 0x10;
}
else {
getTriRegularPatchPoints(this,param_1,param_2,param_3,param_4,param_5);
uVar1 = 0xc;
}
return uVar1;
}
|
|
6,344 | OpenSubdiv::v3_6_0::Far::PatchBuilder::GetRegularPatchPoints(int, int, int, int*, int) const | NVIDIA-RTX[P]OSD-Lite/opensubdiv/far/patchBuilder.cpp | int
PatchBuilder::GetRegularPatchPoints(int levelIndex, Index faceIndex,
int regBoundaryMask, Index patchPoints[],
int fvarChannel) const {
if (_schemeIsLinear) {
return getRegularFacePoints(
levelIndex, faceIndex, patchPoints, fvarChannel);
} else if (_schemeRegFaceSize == 4) {
return getQuadRegularPatchPoints(
levelIndex, faceIndex, regBoundaryMask, patchPoints, fvarChannel);
} else {
return getTriRegularPatchPoints(
levelIndex, faceIndex, regBoundaryMask, patchPoints, fvarChannel);
}
return 0;
} | O2 | cpp | OpenSubdiv::v3_6_0::Far::PatchBuilder::GetRegularPatchPoints(int, int, int, int*, int) const:
cmpb $0x1, 0x24(%rdi)
jne 0x79a8b
movq %r8, %rcx
movl %r9d, %r8d
jmp 0x52210
pushq %rax
cmpl $0x4, 0x20(%rdi)
jne 0x79a9b
callq 0x51b40
pushq $0x10
jmp 0x79aa2
callq 0x52a10
pushq $0xc
popq %rax
popq %rcx
retq
nop
| _ZNK10OpenSubdiv6v3_6_03Far12PatchBuilder21GetRegularPatchPointsEiiiPii:
cmp byte ptr [rdi+24h], 1
jnz short loc_79A8B
mov rcx, r8; int
mov r8d, r9d; int *
jmp __ZNK10OpenSubdiv6v3_6_03Far12PatchBuilder20getRegularFacePointsEiiPii; OpenSubdiv::v3_6_0::Far::PatchBuilder::getRegularFacePoints(int,int,int *,int)
loc_79A8B:
push rax
cmp dword ptr [rdi+20h], 4
jnz short loc_79A9B
call __ZNK10OpenSubdiv6v3_6_03Far12PatchBuilder25getQuadRegularPatchPointsEiiiPii; OpenSubdiv::v3_6_0::Far::PatchBuilder::getQuadRegularPatchPoints(int,int,int,int *,int)
push 10h
jmp short loc_79AA2
loc_79A9B:
call __ZNK10OpenSubdiv6v3_6_03Far12PatchBuilder24getTriRegularPatchPointsEiiiPii; OpenSubdiv::v3_6_0::Far::PatchBuilder::getTriRegularPatchPoints(int,int,int,int *,int)
push 0Ch
loc_79AA2:
pop rax
pop rcx
retn
| long long OpenSubdiv::v3_6_0::Far::PatchBuilder::GetRegularPatchPoints(
OpenSubdiv::v3_6_0::Far::PatchBuilder *this,
int a2,
OpenSubdiv::v3_6_0::Vtr::internal::Level *a3,
int a4,
int *a5,
int a6)
{
if ( *((_BYTE *)this + 36) == 1 )
return OpenSubdiv::v3_6_0::Far::PatchBuilder::getRegularFacePoints(this, a2, (int)a3, a5, a6);
if ( *((_DWORD *)this + 8) == 4 )
{
OpenSubdiv::v3_6_0::Far::PatchBuilder::getQuadRegularPatchPoints(this, a2, a3, a4, a5, a6);
return 16LL;
}
else
{
OpenSubdiv::v3_6_0::Far::PatchBuilder::getTriRegularPatchPoints(this, a2, (int)a3, a4, a5, a6);
return 12LL;
}
}
| GetRegularPatchPoints:
CMP byte ptr [RDI + 0x24],0x1
JNZ 0x00179a8b
MOV RCX,R8
MOV R8D,R9D
JMP 0x00152210
LAB_00179a8b:
PUSH RAX
CMP dword ptr [RDI + 0x20],0x4
JNZ 0x00179a9b
CALL 0x00151b40
PUSH 0x10
JMP 0x00179aa2
LAB_00179a9b:
CALL 0x00152a10
PUSH 0xc
LAB_00179aa2:
POP RAX
POP RCX
RET
|
/* OpenSubdiv::v3_6_0::Far::PatchBuilder::GetRegularPatchPoints(int, int, int, int*, int) const */
int8 __thiscall
OpenSubdiv::v3_6_0::Far::PatchBuilder::GetRegularPatchPoints
(PatchBuilder *this,int param_1,int param_2,int param_3,int *param_4,int param_5)
{
int8 uVar1;
int8 uStack_10;
if (this[0x24] == (PatchBuilder)0x1) {
uVar1 = getRegularFacePoints(this,param_1,param_2,param_4,param_5);
return uVar1;
}
if (*(int *)(this + 0x20) == 4) {
getQuadRegularPatchPoints(this,param_1,param_2,param_3,param_4,param_5);
uStack_10 = 0x10;
}
else {
getTriRegularPatchPoints(this,param_1,param_2,param_3,param_4,param_5);
uStack_10 = 0xc;
}
return uStack_10;
}
|
|
6,345 | 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>::basic_json(std::initializer_list<nlohmann::json_abi_v3_11_3::detail::json_ref<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>>, bool, nlohmann::json_abi_v3_11_3::detail::value_t) | llama.cpp/common/json.hpp | basic_json(initializer_list_t init,
bool type_deduction = true,
value_t manual_type = value_t::array)
{
// check if each element is an array with two elements whose first
// element is a string
bool is_an_object = std::all_of(init.begin(), init.end(),
[](const detail::json_ref<basic_json>& element_ref)
{
// The cast is to ensure op[size_type] is called, bearing in mind size_type may not be int;
// (many string types can be constructed from 0 via its null-pointer guise, so we get a
// broken call to op[key_type], the wrong semantics and a 4804 warning on Windows)
return element_ref->is_array() && element_ref->size() == 2 && (*element_ref)[static_cast<size_type>(0)].is_string();
});
// adjust type if type deduction is not wanted
if (!type_deduction)
{
// if array is wanted, do not create an object though possible
if (manual_type == value_t::array)
{
is_an_object = false;
}
// if object is wanted but impossible, throw an exception
if (JSON_HEDLEY_UNLIKELY(manual_type == value_t::object && !is_an_object))
{
JSON_THROW(type_error::create(301, "cannot create object from initializer list", nullptr));
}
}
if (is_an_object)
{
// the initializer list is a list of pairs -> create object
m_data.m_type = value_t::object;
m_data.m_value = value_t::object;
for (auto& element_ref : init)
{
auto element = element_ref.moved_or_copied();
m_data.m_value.object->emplace(
std::move(*((*element.m_data.m_value.array)[0].m_data.m_value.string)),
std::move((*element.m_data.m_value.array)[1]));
}
}
else
{
// the initializer list describes an array -> create array
m_data.m_type = value_t::array;
m_data.m_value.array = create<array_t>(init.begin(), init.end());
}
set_parents();
assert_invariant();
} | 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>::basic_json(std::initializer_list<nlohmann::json_abi_v3_11_3::detail::json_ref<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>>, bool, nlohmann::json_abi_v3_11_3::detail::value_t):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movl %r8d, %ebp
movl %ecx, %r13d
movq %rdx, %r15
movq %rsi, %r14
movq %rdi, %rbx
leaq (%rdx,%rdx,2), %rax
leaq (%rsi,%rax,8), %r12
xorps %xmm0, %xmm0
movups %xmm0, (%rdi)
movq %rsi, %rdi
movq %r12, %rsi
callq 0xd0c3e
cmpq %r12, %rax
sete %cl
testb %r13b, %r13b
jne 0xb1347
cmpq %r12, %rax
sete %al
cmpb $0x2, %bpl
setne %cl
cmpb $0x1, %bpl
setne %dl
orb %al, %dl
je 0xb13f2
andb %al, %cl
testb %cl, %cl
je 0xb13bc
movb $0x1, (%rbx)
movl $0x20, %edi
callq 0x20210
xorps %xmm0, %xmm0
movups %xmm0, (%rax)
movq $0x0, 0x10(%rax)
movq %rax, 0x8(%rbx)
testq %r15, %r15
je 0xb13d6
shlq $0x3, %r15
leaq (%r15,%r15,2), %r12
movq %rsp, %r15
movq %r15, %rdi
movq %r14, %rsi
callq 0xd0b98
movq 0x8(%rbx), %rdi
movq 0x8(%rsp), %rax
movq (%rax), %rdx
movq 0x8(%rdx), %rsi
addq $0x10, %rdx
callq 0x8b004
movq %r15, %rdi
xorl %esi, %esi
callq 0x852f2
movq %r15, %rdi
callq 0x89a0c
addq $0x18, %r14
addq $-0x18, %r12
jne 0xb137a
jmp 0xb13d6
movb $0x2, (%rbx)
movq %rsp, %rdi
movq %r14, (%rdi)
leaq 0x20(%rsp), %rsi
movq %r12, (%rsi)
callq 0xd0bea
movq %rax, 0x8(%rbx)
movq %rbx, %rdi
movl $0x1, %esi
callq 0x852f2
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl $0x20, %edi
callq 0x20650
movq %rax, %r14
leaq 0x10(%rsp), %r12
movq %r12, -0x10(%r12)
leaq 0x69a99(%rip), %rsi # 0x11aea9
leaq 0x69abc(%rip), %rdx # 0x11aed3
movq %rsp, %rdi
callq 0x288ec
movb $0x1, %bpl
movq %rsp, %rdx
movq %r14, %rdi
movl $0x12d, %esi # imm = 0x12D
xorl %ecx, %ecx
callq 0x7ee7e
xorl %ebp, %ebp
leaq 0xaec03(%rip), %rsi # 0x160040
leaq -0x3aaec(%rip), %rdx # 0x76958
movq %r14, %rdi
callq 0x20a50
jmp 0xb1452
jmp 0xb1452
jmp 0xb1452
movq %rax, %r15
jmp 0xb149c
movq %rax, %r15
movq %rsp, %r14
movq %r14, %rdi
xorl %esi, %esi
callq 0x852f2
movq %r14, %rdi
callq 0x89a0c
jmp 0xb149c
movq %rax, %r15
movq (%rsp), %rdi
cmpq %r12, %rdi
je 0xb148a
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x20180
testb %bpl, %bpl
jne 0xb1494
jmp 0xb149c
movq %rax, %r15
movq %r14, %rdi
callq 0x20ef0
movq %rbx, %rdi
callq 0x89a0c
movq %r15, %rdi
callq 0x20af0
| _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEC2ESt16initializer_listINS0_6detail8json_refISD_EEEbNSF_7value_tE:
push rbp; __int64
push r15; int
push r14; void *
push r13; int
push r12; __int64
push rbx; int
sub rsp, 28h
mov ebp, r8d
mov r13d, ecx
mov r15, rdx
mov r14, rsi
mov rbx, rdi
lea rax, [rdx+rdx*2]
lea r12, [rsi+rax*8]
xorps xmm0, xmm0
movups xmmword ptr [rdi], xmm0
mov rdi, rsi
mov rsi, r12
call _ZSt9__find_ifIPKN8nlohmann16json_abi_v3_11_36detail8json_refINS1_10basic_jsonINS1_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES6_IhSaIhEEvEEEEN9__gnu_cxx5__ops12_Iter_negateIZNSG_C1ESt16initializer_listISH_EbNS2_7value_tEEUlRSI_E_EEET_ST_ST_T0_St26random_access_iterator_tag; std::__find_if<nlohmann::json_abi_v3_11_3::detail::json_ref<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>> const*,__gnu_cxx::__ops::_Iter_negate<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::(std::initializer_list<nlohmann::json_abi_v3_11_3::detail::json_ref<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,nlohmann::json_abi_v3_11_3::detail::value_t)::{lambda(nlohmann::json_abi_v3_11_3::detail::json_ref<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&)#1}>>(nlohmann::json_abi_v3_11_3::detail::json_ref<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>> const*,nlohmann::json_abi_v3_11_3::detail::json_ref<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>> const*,__gnu_cxx::__ops::_Iter_negate<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::(std::initializer_list<nlohmann::json_abi_v3_11_3::detail::json_ref<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,nlohmann::json_abi_v3_11_3::detail::value_t)::{lambda(nlohmann::json_abi_v3_11_3::detail::json_ref<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&)#1}>,std::random_access_iterator_tag)
cmp rax, r12
setz cl
test r13b, r13b
jnz short loc_B1347
cmp rax, r12
setz al
cmp bpl, 2
setnz cl
cmp bpl, 1
setnz dl
or dl, al
jz loc_B13F2
and cl, al
loc_B1347:
test cl, cl
jz short loc_B13BC
mov byte ptr [rbx], 1
mov edi, 20h ; ' '; unsigned __int64
call __Znwm; operator new(ulong)
xorps xmm0, xmm0
movups xmmword ptr [rax], xmm0
mov qword ptr [rax+10h], 0
mov [rbx+8], rax
test r15, r15
jz short loc_B13D6
shl r15, 3
lea r12, [r15+r15*2]
mov r15, rsp
loc_B137A:
mov rdi, r15
mov rsi, r14
call _ZNK8nlohmann16json_abi_v3_11_36detail8json_refINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEE15moved_or_copiedEv; nlohmann::json_abi_v3_11_3::detail::json_ref<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>>::moved_or_copied(void)
mov rdi, [rbx+8]
mov rax, [rsp+58h+var_50]
mov rdx, [rax]
mov rsi, [rdx+8]
add rdx, 10h
call _ZN8nlohmann16json_abi_v3_11_311ordered_mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS0_10basic_jsonIS1_St6vectorS7_blmdSaNS0_14adl_serializerES9_IhSaIhEEvEESt4lessIvESaISt4pairIKS7_SD_EEE7emplaceERSH_OSD_; nlohmann::json_abi_v3_11_3::ordered_map<std::string,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>,std::less<void>,std::allocator<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>>>::emplace(std::string const&,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>&&)
mov rdi, r15
xor esi, esi
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool)
mov rdi, 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()
add r14, 18h
add r12, 0FFFFFFFFFFFFFFE8h
jnz short loc_B137A
jmp short loc_B13D6
loc_B13BC:
mov byte ptr [rbx], 2
mov rdi, rsp
mov [rdi], r14
lea rsi, [rsp+58h+var_38]
mov [rsi], r12
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE6createIS3_ISD_SaISD_EEJPKNS0_6detail8json_refISD_EESL_EEEPT_DpOT0_; 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>::create<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>>,nlohmann::json_abi_v3_11_3::detail::json_ref<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>> const*,nlohmann::json_abi_v3_11_3::detail::json_ref<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>> const*>(nlohmann::json_abi_v3_11_3::detail::json_ref<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>> const*,nlohmann::json_abi_v3_11_3::detail::json_ref<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>> const* &&)
mov [rbx+8], rax
loc_B13D6:
mov rdi, rbx
mov esi, 1
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool)
add rsp, 28h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_B13F2:
mov edi, 20h ; ' '; thrown_size
call ___cxa_allocate_exception
mov r14, rax
lea r12, [rsp+58h+var_48]
mov [r12-10h], r12
lea rsi, aCannotCreateOb; "cannot create object from initializer l"...
lea rdx, aCannotCreateOb+2Ah; ""
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)
mov bpl, 1
mov rdx, rsp
mov rdi, r14; this
mov esi, 12Dh; int
xor ecx, ecx
call _ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIDnTnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES5_
xor ebp, ebp
lea rsi, _ZTIN8nlohmann16json_abi_v3_11_36detail10type_errorE; lptinfo
lea rdx, _ZN8nlohmann16json_abi_v3_11_36detail9exceptionD2Ev; void (*)(void *)
mov rdi, r14; void *
call ___cxa_throw
jmp short loc_B1452
jmp short loc_B1452
jmp short $+2
loc_B1452:
mov r15, rax
jmp short loc_B149C
mov r15, rax
mov r14, rsp
mov rdi, r14
xor esi, esi
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool)
mov rdi, r14
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_B149C
mov r15, rax
mov rdi, [rsp+58h+var_58]; void *
cmp rdi, r12
jz short loc_B148A
mov rsi, [rsp+58h+var_48]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_B148A:
test bpl, bpl
jnz short loc_B1494
jmp short loc_B149C
mov r15, rax
loc_B1494:
mov rdi, r14; void *
call ___cxa_free_exception
loc_B149C:
mov rdi, rbx
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::data::~data()
mov rdi, r15
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>::basic_json(
long long a1,
char *a2,
long long a3,
char a4,
char a5)
{
char *v8; // r14
char *v9; // r12
long long v10; // rax
bool v11; // cl
bool v12; // al
long long result; // rax
long long v14; // r12
nlohmann::json_abi_v3_11_3::detail::exception *exception; // r14
void *v16; // [rsp+0h] [rbp-58h] BYREF
long long v17; // [rsp+8h] [rbp-50h]
_QWORD v18[9]; // [rsp+10h] [rbp-48h] BYREF
v8 = a2;
v9 = &a2[24 * a3];
*(_OWORD *)a1 = 0LL;
v10 = std::__find_if<nlohmann::json_abi_v3_11_3::detail::json_ref<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*,__gnu_cxx::__ops::_Iter_negate<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::(std::initializer_list<nlohmann::json_abi_v3_11_3::detail::json_ref<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>>>,bool,nlohmann::json_abi_v3_11_3::detail::value_t)::{lambda(nlohmann::json_abi_v3_11_3::detail::json_ref<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&)#1}>>(
a2,
v9);
v11 = v10 == (_QWORD)v9;
if ( !a4 )
{
v12 = v10 == (_QWORD)v9;
if ( !v12 && a5 == 1 )
{
exception = (nlohmann::json_abi_v3_11_3::detail::exception *)__cxa_allocate_exception(0x20uLL);
v16 = v18;
std::string::_M_construct<char const*>((long long)&v16, "cannot create object from initializer list", (long long)"");
ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIDnTnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES5_(
exception,
301,
&v16);
__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);
}
v11 = v12 && a5 != 2;
}
if ( v11 )
{
*(_BYTE *)a1 = 1;
result = operator new(0x20uLL);
*(_OWORD *)result = 0LL;
*(_QWORD *)(result + 16) = 0LL;
*(_QWORD *)(a1 + 8) = result;
if ( a3 )
{
v14 = 24 * a3;
do
{
nlohmann::json_abi_v3_11_3::detail::json_ref<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>>::moved_or_copied(
&v16,
v8);
nlohmann::json_abi_v3_11_3::ordered_map<std::string,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,std::less<void>,std::allocator<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>>>::emplace(
*(_QWORD **)(a1 + 8),
*(long long **)(*(_QWORD *)v17 + 8LL),
*(_QWORD *)v17 + 16LL);
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::assert_invariant((char *)&v16);
result = 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(&v16);
v8 += 24;
v14 -= 24LL;
}
while ( v14 );
}
}
else
{
*(_BYTE *)a1 = 2;
v16 = a2;
v18[2] = v9;
result = 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>::create<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>>,nlohmann::json_abi_v3_11_3::detail::json_ref<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*,nlohmann::json_abi_v3_11_3::detail::json_ref<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*>(&v16);
*(_QWORD *)(a1 + 8) = result;
}
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::assert_invariant((char *)a1);
return result;
}
| basic_json:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x28
MOV EBP,R8D
MOV R13D,ECX
MOV R15,RDX
MOV R14,RSI
MOV RBX,RDI
LEA RAX,[RDX + RDX*0x2]
LEA R12,[RSI + RAX*0x8]
XORPS XMM0,XMM0
MOVUPS xmmword ptr [RDI],XMM0
LAB_001b1313:
MOV RDI,RSI
MOV RSI,R12
CALL 0x001d0c3e
CMP RAX,R12
SETZ CL
TEST R13B,R13B
JNZ 0x001b1347
CMP RAX,R12
SETZ AL
CMP BPL,0x2
SETNZ CL
CMP BPL,0x1
SETNZ DL
OR DL,AL
JZ 0x001b13f2
AND CL,AL
LAB_001b1347:
TEST CL,CL
JZ 0x001b13bc
MOV byte ptr [RBX],0x1
LAB_001b134e:
MOV EDI,0x20
CALL 0x00120210
XORPS XMM0,XMM0
MOVUPS xmmword ptr [RAX],XMM0
MOV qword ptr [RAX + 0x10],0x0
MOV qword ptr [RBX + 0x8],RAX
TEST R15,R15
JZ 0x001b13d6
SHL R15,0x3
LEA R12,[R15 + R15*0x2]
MOV R15,RSP
LAB_001b137a:
MOV RDI,R15
MOV RSI,R14
CALL 0x001d0b98
MOV RDI,qword ptr [RBX + 0x8]
MOV RAX,qword ptr [RSP + 0x8]
MOV RDX,qword ptr [RAX]
MOV RSI,qword ptr [RDX + 0x8]
ADD RDX,0x10
LAB_001b1399:
CALL 0x0018b004
MOV RDI,R15
XOR ESI,ESI
CALL 0x001852f2
MOV RDI,R15
CALL 0x00189a0c
ADD R14,0x18
ADD R12,-0x18
JNZ 0x001b137a
JMP 0x001b13d6
LAB_001b13bc:
MOV byte ptr [RBX],0x2
MOV RDI,RSP
MOV qword ptr [RDI],R14
LEA RSI,[RSP + 0x20]
MOV qword ptr [RSI],R12
LAB_001b13cd:
CALL 0x001d0bea
LAB_001b13d2:
MOV qword ptr [RBX + 0x8],RAX
LAB_001b13d6:
MOV RDI,RBX
MOV ESI,0x1
CALL 0x001852f2
ADD RSP,0x28
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_001b13f2:
MOV EDI,0x20
CALL 0x00120650
MOV R14,RAX
LEA R12,[RSP + 0x10]
MOV qword ptr [R12 + -0x10],R12
LAB_001b1409:
LEA RSI,[0x21aea9]
LEA RDX,[0x21aed3]
MOV RDI,RSP
CALL 0x001288ec
MOV BPL,0x1
LAB_001b1422:
MOV RDX,RSP
MOV RDI,R14
MOV ESI,0x12d
XOR ECX,ECX
CALL 0x0017ee7e
XOR EBP,EBP
LEA RSI,[0x260040]
LEA RDX,[0x176958]
MOV RDI,R14
CALL 0x00120a50
|
/* 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(std::initializer_list<nlohmann::json_abi_v3_11_3::detail::json_ref<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,
std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void> > >, bool, nlohmann::json_abi_v3_11_3::detail::value_t) */
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(int8 *param_1,json_ref *param_2,long param_3,char param_4,char param_5)
{
json_ref *pjVar1;
json_ref *pjVar2;
int8 *puVar3;
vector *pvVar4;
int8 uVar5;
bool bVar6;
json_ref *local_58;
long *local_50;
json_ref local_48 [16];
json_ref *local_38;
pjVar1 = param_2 + param_3 * 0x18;
*param_1 = 0;
param_1[1] = 0;
/* try { // try from 001b1313 to 001b131d has its CatchHandler @ 001b1450 */
pjVar2 = std::
__find_if<nlohmann::json_abi_v3_11_3::detail::json_ref<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*,__gnu_cxx::__ops::_Iter_negate<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>::_Iter_negate(std::initializer_list<nlohmann::json_abi_v3_11_3::detail::json_ref<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>,bool,nlohmann::json_abi_v3_11_3::detail::value_t)::_lambda(nlohmann::json_abi_v3_11_3::detail::json_ref<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&)_1_>>
(param_2,pjVar1);
bVar6 = pjVar2 == pjVar1;
if (param_4 == '\0') {
if (param_5 == '\x01' && pjVar2 != pjVar1) {
uVar5 = __cxa_allocate_exception(0x20);
local_58 = local_48;
/* try { // try from 001b1409 to 001b141e has its CatchHandler @ 001b1491 */
std::__cxx11::string::_M_construct<char_const*>
(&local_58,"cannot create object from initializer list","");
/* try { // try from 001b1422 to 001b144b has its CatchHandler @ 001b1471 */
_ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIDnTnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES5_
(uVar5,0x12d,&local_58,0);
/* WARNING: Subroutine does not return */
__cxa_throw(uVar5,&detail::type_error::typeinfo,detail::exception::~exception);
}
bVar6 = param_5 != '\x02' && pjVar2 == pjVar1;
}
if (bVar6) {
*(int1 *)param_1 = 1;
/* try { // try from 001b134e to 001b1357 has its CatchHandler @ 001b144e */
puVar3 = (int8 *)operator_new(0x20);
*puVar3 = 0;
puVar3[1] = 0;
puVar3[2] = 0;
param_1[1] = puVar3;
if (param_3 != 0) {
param_3 = param_3 * 0x18;
do {
/* try { // try from 001b137a to 001b1384 has its CatchHandler @ 001b1452 */
detail::
json_ref<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>>
::moved_or_copied();
/* try { // try from 001b1399 to 001b139d has its CatchHandler @ 001b1457 */
ordered_map<std::__cxx11::string,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,std::less<void>,std::allocator<std::pair<std::__cxx11::string_const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>>
::emplace((ordered_map<std::__cxx11::string,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,std::less<void>,std::allocator<std::pair<std::__cxx11::string_const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>>
*)param_1[1],*(string **)(*local_50 + 8),(basic_json *)(*local_50 + 0x10));
assert_invariant(SUB81(&local_58,0));
data::~data((data *)&local_58);
param_3 = param_3 + -0x18;
} while (param_3 != 0);
}
}
else {
*(int1 *)param_1 = 2;
local_58 = param_2;
local_38 = pjVar1;
/* try { // try from 001b13cd to 001b13d1 has its CatchHandler @ 001b144c */
pvVar4 = create<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>>>,nlohmann::json_abi_v3_11_3::detail::json_ref<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::detail::json_ref<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_58,&local_38);
param_1[1] = pvVar4;
}
assert_invariant(SUB81(param_1,0));
return;
}
|
|
6,346 | js_array_finalizer | bluesky950520[P]quickjs/quickjs.c | static void js_array_finalizer(JSRuntime *rt, JSValue val)
{
JSObject *p = JS_VALUE_GET_OBJ(val);
int i;
for(i = 0; i < p->u.array.count; i++) {
JS_FreeValueRT(rt, p->u.array.u.values[i]);
}
js_free_rt(rt, p->u.array.u.values);
} | O1 | c | js_array_finalizer:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
cmpl $0x0, 0x40(%rsi)
je 0x39b36
movl $0x8, %r15d
xorl %r12d, %r12d
movq 0x38(%r14), %rax
movq -0x8(%rax,%r15), %rsi
movq (%rax,%r15), %rdx
movq %rbx, %rdi
callq 0x1ccb2
incq %r12
movl 0x40(%r14), %eax
addq $0x10, %r15
cmpq %rax, %r12
jb 0x39b11
movq 0x38(%r14), %r14
testq %r14, %r14
je 0x39b70
decq 0x28(%rbx)
movq %r14, %rdi
callq *0x20(%rbx)
movq 0x10(%rbx), %rcx
movq 0x30(%rbx), %rdx
subq %rax, %rdx
addq $-0x8, %rdx
movq %rdx, 0x30(%rbx)
movq 0x40(%rbx), %rdi
movq %r14, %rsi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmpq *%rcx
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
| js_array_finalizer:
push r15
push r14
push r12
push rbx
push rax
mov r14, rsi
mov rbx, rdi
cmp dword ptr [rsi+40h], 0
jz short loc_39B36
mov r15d, 8
xor r12d, r12d
loc_39B11:
mov rax, [r14+38h]
mov rsi, [rax+r15-8]
mov rdx, [rax+r15]
mov rdi, rbx
call JS_FreeValueRT
inc r12
mov eax, [r14+40h]
add r15, 10h
cmp r12, rax
jb short loc_39B11
loc_39B36:
mov r14, [r14+38h]
test r14, r14
jz short loc_39B70
dec qword ptr [rbx+28h]
mov rdi, r14
call qword ptr [rbx+20h]
mov rcx, [rbx+10h]
mov rdx, [rbx+30h]
sub rdx, rax
add rdx, 0FFFFFFFFFFFFFFF8h
mov [rbx+30h], rdx
mov rdi, [rbx+40h]
mov rsi, r14
add rsp, 8
pop rbx
pop r12
pop r14
pop r15
jmp rcx
loc_39B70:
add rsp, 8
pop rbx
pop r12
pop r14
pop r15
retn
| unsigned long long js_array_finalizer(long long a1, long long a2)
{
long long v2; // r15
unsigned long long v3; // r12
unsigned long long result; // rax
long long v5; // r14
long long v6; // rax
long long ( *v7)(_QWORD, long long); // rcx
if ( *(_DWORD *)(a2 + 64) )
{
v2 = 8LL;
v3 = 0LL;
do
{
JS_FreeValueRT(a1, *(_DWORD **)(*(_QWORD *)(a2 + 56) + v2 - 8), *(_QWORD *)(*(_QWORD *)(a2 + 56) + v2));
++v3;
result = *(unsigned int *)(a2 + 64);
v2 += 16LL;
}
while ( v3 < result );
}
v5 = *(_QWORD *)(a2 + 56);
if ( v5 )
{
--*(_QWORD *)(a1 + 40);
v6 = (*(long long ( **)(long long))(a1 + 32))(v5);
v7 = *(long long ( **)(_QWORD, long long))(a1 + 16);
*(_QWORD *)(a1 + 48) = *(_QWORD *)(a1 + 48) - v6 - 8;
return v7(*(_QWORD *)(a1 + 64), v5);
}
return result;
}
| js_array_finalizer:
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
PUSH RAX
MOV R14,RSI
MOV RBX,RDI
CMP dword ptr [RSI + 0x40],0x0
JZ 0x00139b36
MOV R15D,0x8
XOR R12D,R12D
LAB_00139b11:
MOV RAX,qword ptr [R14 + 0x38]
MOV RSI,qword ptr [RAX + R15*0x1 + -0x8]
MOV RDX,qword ptr [RAX + R15*0x1]
MOV RDI,RBX
CALL 0x0011ccb2
INC R12
MOV EAX,dword ptr [R14 + 0x40]
ADD R15,0x10
CMP R12,RAX
JC 0x00139b11
LAB_00139b36:
MOV R14,qword ptr [R14 + 0x38]
TEST R14,R14
JZ 0x00139b70
DEC qword ptr [RBX + 0x28]
MOV RDI,R14
CALL qword ptr [RBX + 0x20]
MOV RCX,qword ptr [RBX + 0x10]
MOV RDX,qword ptr [RBX + 0x30]
SUB RDX,RAX
ADD RDX,-0x8
MOV qword ptr [RBX + 0x30],RDX
MOV RDI,qword ptr [RBX + 0x40]
MOV RSI,R14
ADD RSP,0x8
POP RBX
POP R12
POP R14
POP R15
JMP RCX
LAB_00139b70:
ADD RSP,0x8
POP RBX
POP R12
POP R14
POP R15
RET
|
void js_array_finalizer(long param_1,long param_2)
{
long lVar1;
ulong uVar2;
long lVar3;
if (*(int *)(param_2 + 0x40) != 0) {
lVar3 = 8;
uVar2 = 0;
do {
JS_FreeValueRT(param_1,*(int8 *)(*(long *)(param_2 + 0x38) + -8 + lVar3),
*(int8 *)(*(long *)(param_2 + 0x38) + lVar3));
uVar2 = uVar2 + 1;
lVar3 = lVar3 + 0x10;
} while (uVar2 < *(uint *)(param_2 + 0x40));
}
lVar3 = *(long *)(param_2 + 0x38);
if (lVar3 != 0) {
*(long *)(param_1 + 0x28) = *(long *)(param_1 + 0x28) + -1;
lVar1 = (**(code **)(param_1 + 0x20))(lVar3);
lVar1 = (*(long *)(param_1 + 0x30) - lVar1) + -8;
*(long *)(param_1 + 0x30) = lVar1;
/* WARNING: Could not recover jumptable at 0x00139b6e. Too many branches */
/* WARNING: Treating indirect jump as call */
(**(code **)(param_1 + 0x10))
(*(int8 *)(param_1 + 0x40),lVar3,lVar1,*(code **)(param_1 + 0x10));
return;
}
return;
}
|
|
6,347 | ma_ft_make_key | eloqsql/storage/maria/ma_ft_update.c | MARIA_KEY *_ma_ft_make_key(MARIA_HA *info, MARIA_KEY *key, uint keynr,
uchar *keybuf,
FT_WORD *wptr, my_off_t filepos)
{
uchar buf[HA_FT_MAXBYTELEN+16];
float weight=(float) ((filepos==HA_OFFSET_ERROR) ? 0 : wptr->weight);
DBUG_ENTER("_ma_ft_make_key");
mi_float4store(buf,weight);
int2store(buf+HA_FT_WLEN,wptr->len);
memcpy(buf+HA_FT_WLEN+2,wptr->pos,wptr->len);
/* Can't be spatial so it's ok to call _ma_make_key directly here */
DBUG_RETURN(_ma_make_key(info, key, keynr, keybuf, buf, filepos, 0));
} | O3 | c | ma_ft_make_key:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x128, %rsp # imm = 0x128
movq %r9, %rbx
movq %rcx, %r14
movl %edx, %r15d
movq %rsi, %r12
movq %rdi, %r13
movq %fs:0x28, %rax
movq %rax, -0x30(%rbp)
cmpq $-0x1, %r9
je 0x6a953
cvtsd2ss 0x10(%r8), %xmm0
movd %xmm0, %eax
jmp 0x6a955
xorl %eax, %eax
bswapl %eax
leaq -0x13a(%rbp), %rdi
movl %eax, -0x6(%rdi)
movl 0x8(%r8), %edx
movw %dx, -0x2(%rdi)
movq (%r8), %rsi
movl $0x108, %ecx # imm = 0x108
callq 0x29420
movq $0x0, (%rsp)
leaq -0x140(%rbp), %r8
movq %r13, %rdi
movq %r12, %rsi
movl %r15d, %edx
movq %r14, %rcx
movq %rbx, %r9
callq 0x36bab
movq %fs:0x28, %rcx
cmpq -0x30(%rbp), %rcx
jne 0x6a9ba
addq $0x128, %rsp # imm = 0x128
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0x29270
| _ma_ft_make_key:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 128h
mov rbx, r9
mov r14, rcx
mov r15d, edx
mov r12, rsi
mov r13, rdi
mov rax, fs:28h
mov [rbp+var_30], rax
cmp r9, 0FFFFFFFFFFFFFFFFh
jz short loc_6A953
cvtsd2ss xmm0, qword ptr [r8+10h]
movd eax, xmm0
jmp short loc_6A955
loc_6A953:
xor eax, eax
loc_6A955:
bswap eax
lea rdi, [rbp+var_13A]
mov [rdi-6], eax
mov edx, [r8+8]
mov [rdi-2], dx
mov rsi, [r8]
mov ecx, 108h
call ___memcpy_chk
mov [rsp+150h+var_150], 0
lea r8, [rbp+var_140]
mov rdi, r13
mov rsi, r12
mov edx, r15d
mov rcx, r14
mov r9, rbx
call _ma_make_key
mov rcx, fs:28h
cmp rcx, [rbp+var_30]
jnz short loc_6A9BA
add rsp, 128h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_6A9BA:
call ___stack_chk_fail
| long long ma_ft_make_key(
_DWORD *a1,
long long a2,
unsigned int a3,
char *a4,
long long a5,
long long a6,
__m128i a7)
{
unsigned int v10; // eax
long long v11; // rdx
unsigned __int32 v13; // [rsp+10h] [rbp-140h] BYREF
__int16 v14; // [rsp+14h] [rbp-13Ch]
_BYTE v15[266]; // [rsp+16h] [rbp-13Ah] BYREF
unsigned long long v16; // [rsp+120h] [rbp-30h]
v16 = __readfsqword(0x28u);
if ( a6 == -1 )
{
v10 = 0;
}
else
{
*(float *)a7.m128i_i32 = *(double *)(a5 + 16);
v10 = _mm_cvtsi128_si32(a7);
}
v13 = _byteswap_ulong(v10);
v11 = *(unsigned int *)(a5 + 8);
v14 = *(_DWORD *)(a5 + 8);
__memcpy_chk(v15, *(_QWORD *)a5, v11, 264LL);
return ma_make_key(a1, a2, a3, a4, (long long)&v13, a6, 0LL);
}
| _ma_ft_make_key:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x128
MOV RBX,R9
MOV R14,RCX
MOV R15D,EDX
MOV R12,RSI
MOV R13,RDI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x30],RAX
CMP R9,-0x1
JZ 0x0016a953
CVTSD2SS XMM0,qword ptr [R8 + 0x10]
MOVD EAX,XMM0
JMP 0x0016a955
LAB_0016a953:
XOR EAX,EAX
LAB_0016a955:
BSWAP EAX
LEA RDI,[RBP + -0x13a]
MOV dword ptr [RDI + -0x6],EAX
MOV EDX,dword ptr [R8 + 0x8]
MOV word ptr [RDI + -0x2],DX
MOV RSI,qword ptr [R8]
MOV ECX,0x108
CALL 0x00129420
MOV qword ptr [RSP],0x0
LEA R8,[RBP + -0x140]
MOV RDI,R13
MOV RSI,R12
MOV EDX,R15D
MOV RCX,R14
MOV R9,RBX
CALL 0x00136bab
MOV RCX,qword ptr FS:[0x28]
CMP RCX,qword ptr [RBP + -0x30]
JNZ 0x0016a9ba
ADD RSP,0x128
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_0016a9ba:
CALL 0x00129270
|
void _ma_ft_make_key(int8 param_1,int8 param_2,int4 param_3,int8 param_4,
int8 *param_5,long param_6)
{
long in_FS_OFFSET;
float fVar1;
uint local_148;
int2 local_144;
int1 local_142 [266];
long local_38;
local_38 = *(long *)(in_FS_OFFSET + 0x28);
if (param_6 == -1) {
fVar1 = 0.0;
}
else {
fVar1 = (float)(double)param_5[2];
}
local_148 = (uint)fVar1 >> 0x18 | ((uint)fVar1 & 0xff0000) >> 8 | ((uint)fVar1 & 0xff00) << 8 |
(int)fVar1 << 0x18;
local_144 = (int2)*(int4 *)(param_5 + 1);
__memcpy_chk(local_142,*param_5,*(int4 *)(param_5 + 1),0x108);
_ma_make_key(param_1,param_2,param_3,param_4,&local_148,param_6,0);
if (*(long *)(in_FS_OFFSET + 0x28) == local_38) {
return;
}
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
|
|
6,348 | ma_update_dynamic_record | eloqsql/storage/maria/ma_dynrec.c | my_bool _ma_update_dynamic_record(MARIA_HA *info, MARIA_RECORD_POS pos,
const uchar *oldrec __attribute__ ((unused)),
const uchar *record)
{
uint length= _ma_rec_pack(info, info->rec_buff + MARIA_REC_BUFF_OFFSET,
record);
if (!length)
return 1;
return (update_dynamic_record(info, pos,
info->rec_buff + MARIA_REC_BUFF_OFFSET,
length));
} | O0 | c | ma_update_dynamic_record:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
movq -0x10(%rbp), %rdi
movq -0x10(%rbp), %rax
movq 0x3a0(%rax), %rsi
addq $0x18, %rsi
movq -0x28(%rbp), %rdx
callq 0x4ece0
movl %eax, -0x2c(%rbp)
cmpl $0x0, -0x2c(%rbp)
jne 0x4f483
movb $0x1, -0x1(%rbp)
jmp 0x4f4a7
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x10(%rbp), %rax
movq 0x3a0(%rax), %rdx
addq $0x18, %rdx
movl -0x2c(%rbp), %eax
movl %eax, %ecx
callq 0x4f4b0
movb %al, -0x1(%rbp)
movb -0x1(%rbp), %al
addq $0x30, %rsp
popq %rbp
retq
| _ma_update_dynamic_record:
push rbp
mov rbp, rsp
sub rsp, 30h
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov [rbp+var_20], rdx
mov [rbp+var_28], rcx
mov rdi, [rbp+var_10]
mov rax, [rbp+var_10]
mov rsi, [rax+3A0h]
add rsi, 18h
mov rdx, [rbp+var_28]
call _ma_rec_pack
mov [rbp+var_2C], eax
cmp [rbp+var_2C], 0
jnz short loc_4F483
mov [rbp+var_1], 1
jmp short loc_4F4A7
loc_4F483:
mov rdi, [rbp+var_10]
mov rsi, [rbp+var_18]
mov rax, [rbp+var_10]
mov rdx, [rax+3A0h]
add rdx, 18h
mov eax, [rbp+var_2C]
mov ecx, eax
call update_dynamic_record
mov [rbp+var_1], al
loc_4F4A7:
mov al, [rbp+var_1]
add rsp, 30h
pop rbp
retn
| char ma_update_dynamic_record(long long a1, long long a2, long long a3, _BYTE *a4)
{
unsigned int v5; // [rsp+4h] [rbp-2Ch]
v5 = ma_rec_pack((_DWORD *)a1, (_BYTE *)(*(_QWORD *)(a1 + 928) + 24LL), a4);
if ( v5 )
return update_dynamic_record(a1, a2, *(_QWORD *)(a1 + 928) + 24LL, v5);
else
return 1;
}
| _ma_update_dynamic_record:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x30
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x18],RSI
MOV qword ptr [RBP + -0x20],RDX
MOV qword ptr [RBP + -0x28],RCX
MOV RDI,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RAX + 0x3a0]
ADD RSI,0x18
MOV RDX,qword ptr [RBP + -0x28]
CALL 0x0014ece0
MOV dword ptr [RBP + -0x2c],EAX
CMP dword ptr [RBP + -0x2c],0x0
JNZ 0x0014f483
MOV byte ptr [RBP + -0x1],0x1
JMP 0x0014f4a7
LAB_0014f483:
MOV RDI,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RBP + -0x10]
MOV RDX,qword ptr [RAX + 0x3a0]
ADD RDX,0x18
MOV EAX,dword ptr [RBP + -0x2c]
MOV ECX,EAX
CALL 0x0014f4b0
MOV byte ptr [RBP + -0x1],AL
LAB_0014f4a7:
MOV AL,byte ptr [RBP + -0x1]
ADD RSP,0x30
POP RBP
RET
|
int1
_ma_update_dynamic_record(long param_1,int8 param_2,int8 param_3,int8 param_4)
{
int iVar1;
int1 local_9;
iVar1 = _ma_rec_pack(param_1,*(long *)(param_1 + 0x3a0) + 0x18,param_4);
if (iVar1 == 0) {
local_9 = 1;
}
else {
local_9 = update_dynamic_record(param_1,param_2,*(long *)(param_1 + 0x3a0) + 0x18,iVar1);
}
return local_9;
}
|
|
6,349 | mysql_stmt_execute_start | eloqsql/libmariadb/libmariadb/mariadb_async.c | int STDCALL
mysql_stmt_execute_start(int *ret, MYSQL_STMT *stmt)
{
MK_ASYNC_START_BODY(
mysql_stmt_execute,
stmt->mysql,
{
WIN_SET_NONBLOCKING(stmt->mysql)
parms.stmt= stmt;
},
1,
r_int,
/*
If eg. mysql_change_user(), stmt->mysql will be NULL.
In this case, we cannot block.
*/
if (!stmt->mysql)
{
*ret= mysql_stmt_execute(stmt);
return 0;
})
} | O3 | c | mysql_stmt_execute_start:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
movq 0x38(%rsi), %rax
testq %rax, %rax
je 0x31027
movq 0x480(%rax), %rax
movq 0x28(%rax), %r15
leaq -0x20(%rbp), %rdx
movq %r14, (%rdx)
movb $0x1, 0x14(%r15)
leaq 0x38(%r15), %rdi
leaq 0xa2(%rip), %rsi # 0x310af
callq 0x329b0
movw $0x0, 0x14(%r15)
testl %eax, %eax
jle 0x31031
movb $0x1, 0x15(%r15)
movl (%r15), %eax
jmp 0x310a4
movq %r14, %rdi
callq 0x26ca5
jmp 0x310a0
js 0x31039
movl 0x8(%r15), %eax
jmp 0x310a0
movq 0x38(%r14), %rax
movl $0x7d8, 0x90(%rax) # imm = 0x7D8
movl $0x297, %edi # imm = 0x297
addq 0x38(%r14), %rdi
leaq 0x1fe89(%rip), %rax # 0x50ee0
movq (%rax), %rsi
movl $0x5, %edx
callq 0x13220
movq 0x38(%r14), %rax
xorl %r15d, %r15d
movb %r15b, 0x29c(%rax)
movl $0x97, %edi
addq 0x38(%r14), %rdi
leaq 0x1fe6e(%rip), %rax # 0x50ef0
movq 0x40(%rax), %rsi
movl $0x1ff, %edx # imm = 0x1FF
callq 0x13220
movq 0x38(%r14), %rax
movb %r15b, 0x296(%rax)
movl $0x1, %eax
movl %eax, (%rbx)
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
| mysql_stmt_execute_start:
push rbp
mov rbp, rsp
push r15
push r14
push rbx
push rax
mov r14, rsi
mov rbx, rdi
mov rax, [rsi+38h]
test rax, rax
jz short loc_31027
mov rax, [rax+480h]
mov r15, [rax+28h]
lea rdx, [rbp+var_20]
mov [rdx], r14
mov byte ptr [r15+14h], 1
lea rdi, [r15+38h]
lea rsi, mysql_stmt_execute_start_internal
call my_context_spawn
mov word ptr [r15+14h], 0
test eax, eax
jle short loc_31031
mov byte ptr [r15+15h], 1
mov eax, [r15]
jmp short loc_310A4
loc_31027:
mov rdi, r14
call mysql_stmt_execute
jmp short loc_310A0
loc_31031:
js short loc_31039
mov eax, [r15+8]
jmp short loc_310A0
loc_31039:
mov rax, [r14+38h]
mov dword ptr [rax+90h], 7D8h
mov edi, 297h
add rdi, [r14+38h]
lea rax, SQLSTATE_UNKNOWN
mov rsi, [rax]
mov edx, 5
call _strncpy
mov rax, [r14+38h]
xor r15d, r15d
mov [rax+29Ch], r15b
mov edi, 97h
add rdi, [r14+38h]
lea rax, client_errors
mov rsi, [rax+40h]
mov edx, 1FFh
call _strncpy
mov rax, [r14+38h]
mov [rax+296h], r15b
mov eax, 1
loc_310A0:
mov [rbx], eax
xor eax, eax
loc_310A4:
add rsp, 8
pop rbx
pop r14
pop r15
pop rbp
retn
| long long mysql_stmt_execute_start(int *a1, long long a2)
{
long long v2; // rax
long long v3; // rax
unsigned int *v4; // r15
int v5; // eax
int v7; // eax
long long v8[4]; // [rsp+0h] [rbp-20h] BYREF
v8[0] = v2;
v3 = *(_QWORD *)(a2 + 56);
if ( v3 )
{
v4 = *(unsigned int **)(*(_QWORD *)(v3 + 1152) + 40LL);
v8[0] = a2;
*((_BYTE *)v4 + 20) = 1;
v5 = my_context_spawn(v4 + 14, mysql_stmt_execute_start_internal, v8);
*((_WORD *)v4 + 10) = 0;
if ( v5 > 0 )
{
*((_BYTE *)v4 + 21) = 1;
return *v4;
}
if ( v5 < 0 )
{
*(_DWORD *)(*(_QWORD *)(a2 + 56) + 144LL) = 2008;
strncpy(*(_QWORD *)(a2 + 56) + 663LL, SQLSTATE_UNKNOWN, 5LL);
*(_BYTE *)(*(_QWORD *)(a2 + 56) + 668LL) = 0;
strncpy(*(_QWORD *)(a2 + 56) + 151LL, client_errors[8], 511LL);
*(_BYTE *)(*(_QWORD *)(a2 + 56) + 662LL) = 0;
v7 = 1;
}
else
{
v7 = v4[2];
}
}
else
{
v7 = mysql_stmt_execute(a2);
}
*a1 = v7;
return 0LL;
}
| mysql_stmt_execute_start:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH RBX
PUSH RAX
MOV R14,RSI
MOV RBX,RDI
MOV RAX,qword ptr [RSI + 0x38]
TEST RAX,RAX
JZ 0x00131027
MOV RAX,qword ptr [RAX + 0x480]
MOV R15,qword ptr [RAX + 0x28]
LEA RDX,[RBP + -0x20]
MOV qword ptr [RDX],R14
MOV byte ptr [R15 + 0x14],0x1
LEA RDI,[R15 + 0x38]
LEA RSI,[0x1310af]
CALL 0x001329b0
MOV word ptr [R15 + 0x14],0x0
TEST EAX,EAX
JLE 0x00131031
MOV byte ptr [R15 + 0x15],0x1
MOV EAX,dword ptr [R15]
JMP 0x001310a4
LAB_00131027:
MOV RDI,R14
CALL 0x00126ca5
JMP 0x001310a0
LAB_00131031:
JS 0x00131039
MOV EAX,dword ptr [R15 + 0x8]
JMP 0x001310a0
LAB_00131039:
MOV RAX,qword ptr [R14 + 0x38]
MOV dword ptr [RAX + 0x90],0x7d8
MOV EDI,0x297
ADD RDI,qword ptr [R14 + 0x38]
LEA RAX,[0x150ee0]
MOV RSI,qword ptr [RAX]
MOV EDX,0x5
CALL 0x00113220
MOV RAX,qword ptr [R14 + 0x38]
XOR R15D,R15D
MOV byte ptr [RAX + 0x29c],R15B
MOV EDI,0x97
ADD RDI,qword ptr [R14 + 0x38]
LEA RAX,[0x150ef0]
MOV RSI,qword ptr [RAX + 0x40]
MOV EDX,0x1ff
CALL 0x00113220
MOV RAX,qword ptr [R14 + 0x38]
MOV byte ptr [RAX + 0x296],R15B
MOV EAX,0x1
LAB_001310a0:
MOV dword ptr [RBX],EAX
XOR EAX,EAX
LAB_001310a4:
ADD RSP,0x8
POP RBX
POP R14
POP R15
POP RBP
RET
|
int4 mysql_stmt_execute_start(int4 *param_1,long param_2)
{
int4 *puVar1;
int iVar2;
int4 uVar3;
if (*(long *)(param_2 + 0x38) == 0) {
uVar3 = mysql_stmt_execute(param_2);
}
else {
puVar1 = *(int4 **)(*(long *)(*(long *)(param_2 + 0x38) + 0x480) + 0x28);
*(int1 *)(puVar1 + 5) = 1;
iVar2 = my_context_spawn(puVar1 + 0xe,mysql_stmt_execute_start_internal);
*(int2 *)(puVar1 + 5) = 0;
if (0 < iVar2) {
*(int1 *)((long)puVar1 + 0x15) = 1;
return *puVar1;
}
if (iVar2 < 0) {
*(int4 *)(*(long *)(param_2 + 0x38) + 0x90) = 0x7d8;
strncpy((char *)(*(long *)(param_2 + 0x38) + 0x297),SQLSTATE_UNKNOWN,5);
*(int1 *)(*(long *)(param_2 + 0x38) + 0x29c) = 0;
strncpy((char *)(*(long *)(param_2 + 0x38) + 0x97),PTR_s_Client_run_out_of_memory_00150f30,
0x1ff);
*(int1 *)(*(long *)(param_2 + 0x38) + 0x296) = 0;
uVar3 = 1;
}
else {
uVar3 = puVar1[2];
}
}
*param_1 = uVar3;
return 0;
}
|
|
6,350 | ImPlot::SubplotSetCell(int) | zkingston[P]unknot/build_O1/_deps/implot-src/implot.cpp | void SubplotSetCell(int idx) {
ImPlotContext& gp = *GImPlot;
ImPlotSubplot& subplot = *gp.CurrentSubplot;
if (idx >= subplot.Rows * subplot.Cols)
return;
int row = 0, col = 0;
if (ImHasFlag(subplot.Flags, ImPlotSubplotFlags_ColMajor)) {
row = idx % subplot.Rows;
col = idx / subplot.Rows;
}
else {
row = idx / subplot.Cols;
col = idx % subplot.Cols;
}
return SubplotSetCell(row, col);
} | O1 | cpp | ImPlot::SubplotSetCell(int):
movq 0x279027(%rip), %rax # 0x336ca0
movq 0x58(%rax), %rax
movl 0x90(%rax), %ecx
movl 0x94(%rax), %esi
movl %esi, %edx
imull %ecx, %edx
cmpl %edi, %edx
jle 0xbdca6
testb $0x4, 0x5(%rax)
jne 0xbdca7
movl %edi, %eax
cltd
idivl %esi
movl %edx, %esi
movl %eax, %edi
jmp 0xbd95b
retq
movl %edi, %eax
cltd
idivl %ecx
movl %edx, %edi
movl %eax, %esi
jmp 0xbd95b
| _ZN6ImPlot14SubplotSetCellEi:
mov rax, cs:GImPlot
mov rax, [rax+58h]
mov ecx, [rax+90h]
mov esi, [rax+94h]
mov edx, esi
imul edx, ecx
cmp edx, edi
jle short locret_BDCA6
test byte ptr [rax+5], 4
jnz short loc_BDCA7
mov eax, edi
cdq; int
idiv esi
mov esi, edx; int
mov edi, eax; this
jmp _ZN6ImPlot14SubplotSetCellEii; ImPlot::SubplotSetCell(int,int)
locret_BDCA6:
retn
loc_BDCA7:
mov eax, edi
cdq; int
idiv ecx
mov edi, edx; this
mov esi, eax; int
jmp _ZN6ImPlot14SubplotSetCellEii; ImPlot::SubplotSetCell(int,int)
| void ImPlot::SubplotSetCell(ImPlot *this)
{
long long v1; // rax
int v2; // ecx
v1 = *((_QWORD *)GImPlot + 11);
v2 = *(_DWORD *)(v1 + 144);
if ( v2 * *(_DWORD *)(v1 + 148) > (int)this )
{
if ( (*(_BYTE *)(v1 + 5) & 4) != 0 )
ImPlot::SubplotSetCell((ImPlot *)(unsigned int)((int)this % v2), (const char *)(unsigned int)((int)this / v2));
else
ImPlot::SubplotSetCell(
(ImPlot *)(unsigned int)((int)this / *(_DWORD *)(v1 + 148)),
(const char *)(unsigned int)((int)this % *(_DWORD *)(v1 + 148)));
}
}
| SubplotSetCell:
MOV RAX,qword ptr [0x00436ca0]
MOV RAX,qword ptr [RAX + 0x58]
MOV ECX,dword ptr [RAX + 0x90]
MOV ESI,dword ptr [RAX + 0x94]
MOV EDX,ESI
IMUL EDX,ECX
CMP EDX,EDI
JLE 0x001bdca6
TEST byte ptr [RAX + 0x5],0x4
JNZ 0x001bdca7
MOV EAX,EDI
CDQ
IDIV ESI
MOV ESI,EDX
MOV EDI,EAX
JMP 0x001bd95b
LAB_001bdca6:
RET
LAB_001bdca7:
MOV EAX,EDI
CDQ
IDIV ECX
MOV EDI,EDX
MOV ESI,EAX
JMP 0x001bd95b
|
/* ImPlot::SubplotSetCell(int) */
void ImPlot::SubplotSetCell(int param_1)
{
int iVar1;
int iVar2;
long lVar3;
lVar3 = *(long *)(GImPlot + 0x58);
iVar1 = *(int *)(lVar3 + 0x90);
iVar2 = *(int *)(lVar3 + 0x94);
if (iVar2 * iVar1 <= param_1) {
return;
}
if ((*(byte *)(lVar3 + 5) & 4) == 0) {
SubplotSetCell(param_1 / iVar2,param_1 % iVar2);
return;
}
SubplotSetCell(param_1 % iVar1,param_1 / iVar1);
return;
}
|
|
6,351 | JS_GetGlobalVarRef | bluesky950520[P]quickjs/quickjs.c | static int JS_GetGlobalVarRef(JSContext *ctx, JSAtom prop, JSValue *sp)
{
JSObject *p;
JSShapeProperty *prs;
JSProperty *pr;
/* no exotic behavior is possible in global_var_obj */
p = JS_VALUE_GET_OBJ(ctx->global_var_obj);
prs = find_own_property(&pr, p, prop);
if (prs) {
/* XXX: should handle JS_PROP_AUTOINIT properties? */
/* XXX: conformance: do these tests in
OP_put_var_ref/OP_get_var_ref ? */
if (unlikely(JS_IsUninitialized(pr->u.value))) {
JS_ThrowReferenceErrorUninitialized(ctx, prs->atom);
return -1;
}
if (unlikely(!(prs->flags & JS_PROP_WRITABLE))) {
return JS_ThrowTypeErrorReadOnly(ctx, JS_PROP_THROW, prop);
}
sp[0] = js_dup(ctx->global_var_obj);
} else {
int ret;
ret = JS_HasProperty(ctx, ctx->global_obj, prop);
if (ret < 0)
return -1;
if (ret) {
sp[0] = js_dup(ctx->global_obj);
} else {
sp[0] = JS_UNDEFINED;
}
}
sp[1] = JS_AtomToValue(ctx, prop);
return 0;
} | O0 | c | JS_GetGlobalVarRef:
subq $0xe8, %rsp
movq %rdi, 0x98(%rsp)
movl %esi, 0x94(%rsp)
movq %rdx, 0x88(%rsp)
movq 0x98(%rsp), %rax
movq 0x1b0(%rax), %rax
movq %rax, 0x80(%rsp)
movq 0x80(%rsp), %rcx
movl 0x94(%rsp), %eax
leaq 0x70(%rsp), %rdx
movq %rdx, 0xd8(%rsp)
movq %rcx, 0xd0(%rsp)
movl %eax, 0xcc(%rsp)
movq 0xd0(%rsp), %rax
movq 0x18(%rax), %rax
movq %rax, 0xc0(%rsp)
movl 0xcc(%rsp), %eax
movq 0xc0(%rsp), %rcx
movl 0x20(%rcx), %ecx
andq %rcx, %rax
movq %rax, 0xa8(%rsp)
movq 0xc0(%rsp), %rdi
callq 0x5c5f0
xorl %ecx, %ecx
subq 0xa8(%rsp), %rcx
subq $0x1, %rcx
movl (%rax,%rcx,4), %eax
movq %rax, 0xa8(%rsp)
movq 0xc0(%rsp), %rdi
callq 0x2afc0
movq %rax, 0xb0(%rsp)
cmpq $0x0, 0xa8(%rsp)
je 0x662c3
movq 0xb0(%rsp), %rax
movq 0xa8(%rsp), %rcx
subq $0x1, %rcx
shlq $0x3, %rcx
addq %rcx, %rax
movq %rax, 0xb8(%rsp)
movq 0xb8(%rsp), %rax
movl 0x4(%rax), %eax
cmpl 0xcc(%rsp), %eax
sete %al
testb $0x1, %al
jne 0x66269
jmp 0x662a5
movq 0xd0(%rsp), %rax
movq 0x20(%rax), %rcx
movq 0xa8(%rsp), %rax
subq $0x1, %rax
shlq $0x4, %rax
addq %rax, %rcx
movq 0xd8(%rsp), %rax
movq %rcx, (%rax)
movq 0xb8(%rsp), %rax
movq %rax, 0xe0(%rsp)
jmp 0x662de
movq 0xb8(%rsp), %rax
movl (%rax), %eax
andl $0x3ffffff, %eax # imm = 0x3FFFFFF
movl %eax, %eax
movq %rax, 0xa8(%rsp)
jmp 0x6621c
movq 0xd8(%rsp), %rax
movq $0x0, (%rax)
movq $0x0, 0xe0(%rsp)
movq 0xe0(%rsp), %rax
movq %rax, 0x78(%rsp)
cmpq $0x0, 0x78(%rsp)
je 0x663e9
movq 0x70(%rsp), %rax
movq (%rax), %rdi
movq 0x8(%rax), %rsi
callq 0x2bd40
cmpl $0x0, %eax
setne %al
xorb $-0x1, %al
xorb $-0x1, %al
andb $0x1, %al
movzbl %al, %eax
cltq
cmpq $0x0, %rax
je 0x6634e
movq 0x98(%rsp), %rdi
movq 0x78(%rsp), %rax
movl 0x4(%rax), %esi
callq 0x5f210
movq %rax, 0x60(%rsp)
movq %rdx, 0x68(%rsp)
movl $0xffffffff, 0xa4(%rsp) # imm = 0xFFFFFFFF
jmp 0x664fc
movq 0x78(%rsp), %rax
movl (%rax), %eax
shrl $0x1a, %eax
andl $0x2, %eax
cmpl $0x0, %eax
setne %al
xorb $-0x1, %al
xorb $-0x1, %al
xorb $-0x1, %al
andb $0x1, %al
movzbl %al, %eax
cltq
cmpq $0x0, %rax
je 0x66399
movq 0x98(%rsp), %rdi
movl 0x94(%rsp), %edx
movl $0x4000, %esi # imm = 0x4000
callq 0x5fd10
movl %eax, 0xa4(%rsp)
jmp 0x664fc
movq 0x88(%rsp), %rax
movq %rax, 0x10(%rsp)
movq 0x98(%rsp), %rax
movq 0x1b0(%rax), %rdi
movq 0x1b8(%rax), %rsi
callq 0x20410
movq %rax, %rcx
movq 0x10(%rsp), %rax
movq %rcx, 0x50(%rsp)
movq %rdx, 0x58(%rsp)
movq 0x50(%rsp), %rcx
movq %rcx, (%rax)
movq 0x58(%rsp), %rcx
movq %rcx, 0x8(%rax)
jmp 0x664ae
movq 0x98(%rsp), %rdi
movq 0x98(%rsp), %rax
movl 0x94(%rsp), %ecx
movq 0x1a0(%rax), %rsi
movq 0x1a8(%rax), %rdx
callq 0x2fc10
movl %eax, 0x4c(%rsp)
cmpl $0x0, 0x4c(%rsp)
jge 0x6642e
movl $0xffffffff, 0xa4(%rsp) # imm = 0xFFFFFFFF
jmp 0x664fc
cmpl $0x0, 0x4c(%rsp)
je 0x66482
movq 0x88(%rsp), %rax
movq %rax, 0x8(%rsp)
movq 0x98(%rsp), %rax
movq 0x1a0(%rax), %rdi
movq 0x1a8(%rax), %rsi
callq 0x20410
movq %rax, %rcx
movq 0x8(%rsp), %rax
movq %rcx, 0x38(%rsp)
movq %rdx, 0x40(%rsp)
movq 0x38(%rsp), %rcx
movq %rcx, (%rax)
movq 0x40(%rsp), %rcx
movq %rcx, 0x8(%rax)
jmp 0x664ac
movq 0x88(%rsp), %rax
movl $0x0, 0x28(%rsp)
movq $0x3, 0x30(%rsp)
movq 0x28(%rsp), %rcx
movq %rcx, (%rax)
movq 0x30(%rsp), %rcx
movq %rcx, 0x8(%rax)
jmp 0x664ae
movq 0x88(%rsp), %rax
movq %rax, (%rsp)
movq 0x98(%rsp), %rdi
movl 0x94(%rsp), %esi
callq 0x27b70
movq %rax, %rcx
movq (%rsp), %rax
movq %rcx, 0x18(%rsp)
movq %rdx, 0x20(%rsp)
movq 0x18(%rsp), %rcx
movq %rcx, 0x10(%rax)
movq 0x20(%rsp), %rcx
movq %rcx, 0x18(%rax)
movl $0x0, 0xa4(%rsp)
movl 0xa4(%rsp), %eax
addq $0xe8, %rsp
retq
nopl (%rax,%rax)
| JS_GetGlobalVarRef:
sub rsp, 0E8h
mov [rsp+0E8h+var_50], rdi
mov [rsp+0E8h+var_54], esi
mov [rsp+0E8h+var_60], rdx
mov rax, [rsp+0E8h+var_50]
mov rax, [rax+1B0h]
mov [rsp+0E8h+var_68], rax
mov rcx, [rsp+0E8h+var_68]
mov eax, [rsp+0E8h+var_54]
lea rdx, [rsp+0E8h+var_78]
mov [rsp+0E8h+var_10], rdx
mov [rsp+0E8h+var_18], rcx
mov [rsp+0E8h+var_1C], eax
mov rax, [rsp+0E8h+var_18]
mov rax, [rax+18h]
mov [rsp+0E8h+var_28], rax
mov eax, [rsp+0E8h+var_1C]
mov rcx, [rsp+0E8h+var_28]
mov ecx, [rcx+20h]
and rax, rcx
mov [rsp+0E8h+var_40], rax
mov rdi, [rsp+0E8h+var_28]
call prop_hash_end
xor ecx, ecx
sub rcx, [rsp+0E8h+var_40]
sub rcx, 1
mov eax, [rax+rcx*4]
mov [rsp+0E8h+var_40], rax
mov rdi, [rsp+0E8h+var_28]
call get_shape_prop
mov [rsp+0E8h+var_38], rax
loc_6621C:
cmp [rsp+0E8h+var_40], 0
jz loc_662C3
mov rax, [rsp+0E8h+var_38]
mov rcx, [rsp+0E8h+var_40]
sub rcx, 1
shl rcx, 3
add rax, rcx
mov [rsp+0E8h+var_30], rax
mov rax, [rsp+0E8h+var_30]
mov eax, [rax+4]
cmp eax, [rsp+0E8h+var_1C]
setz al
test al, 1
jnz short loc_66269
jmp short loc_662A5
loc_66269:
mov rax, [rsp+0E8h+var_18]
mov rcx, [rax+20h]
mov rax, [rsp+0E8h+var_40]
sub rax, 1
shl rax, 4
add rcx, rax
mov rax, [rsp+0E8h+var_10]
mov [rax], rcx
mov rax, [rsp+0E8h+var_30]
mov [rsp+0E8h+var_8], rax
jmp short loc_662DE
loc_662A5:
mov rax, [rsp+0E8h+var_30]
mov eax, [rax]
and eax, 3FFFFFFh
mov eax, eax
mov [rsp+0E8h+var_40], rax
jmp loc_6621C
loc_662C3:
mov rax, [rsp+0E8h+var_10]
mov qword ptr [rax], 0
mov [rsp+0E8h+var_8], 0
loc_662DE:
mov rax, [rsp+0E8h+var_8]
mov [rsp+0E8h+var_70], rax
cmp [rsp+0E8h+var_70], 0
jz loc_663E9
mov rax, [rsp+0E8h+var_78]
mov rdi, [rax]
mov rsi, [rax+8]
call JS_IsUninitialized
cmp eax, 0
setnz al
xor al, 0FFh
xor al, 0FFh
and al, 1
movzx eax, al
cdqe
cmp rax, 0
jz short loc_6634E
mov rdi, [rsp+0E8h+var_50]
mov rax, [rsp+0E8h+var_70]
mov esi, [rax+4]
call JS_ThrowReferenceErrorUninitialized
mov [rsp+0E8h+var_88], rax
mov [rsp+0E8h+var_80], rdx
mov [rsp+0E8h+var_44], 0FFFFFFFFh
jmp loc_664FC
loc_6634E:
mov rax, [rsp+0E8h+var_70]
mov eax, [rax]
shr eax, 1Ah
and eax, 2
cmp eax, 0
setnz al
xor al, 0FFh
xor al, 0FFh
xor al, 0FFh
and al, 1
movzx eax, al
cdqe
cmp rax, 0
jz short loc_66399
mov rdi, [rsp+0E8h+var_50]
mov edx, [rsp+0E8h+var_54]
mov esi, 4000h
call JS_ThrowTypeErrorReadOnly
mov [rsp+0E8h+var_44], eax
jmp loc_664FC
loc_66399:
mov rax, [rsp+0E8h+var_60]
mov [rsp+0E8h+var_D8], rax
mov rax, [rsp+0E8h+var_50]
mov rdi, [rax+1B0h]
mov rsi, [rax+1B8h]
call js_dup
mov rcx, rax
mov rax, [rsp+0E8h+var_D8]
mov [rsp+0E8h+var_98], rcx
mov [rsp+0E8h+var_90], rdx
mov rcx, [rsp+0E8h+var_98]
mov [rax], rcx
mov rcx, [rsp+0E8h+var_90]
mov [rax+8], rcx
jmp loc_664AE
loc_663E9:
mov rdi, [rsp+0E8h+var_50]
mov rax, [rsp+0E8h+var_50]
mov ecx, [rsp+0E8h+var_54]
mov rsi, [rax+1A0h]
mov rdx, [rax+1A8h]
call JS_HasProperty
mov [rsp+0E8h+var_9C], eax
cmp [rsp+0E8h+var_9C], 0
jge short loc_6642E
mov [rsp+0E8h+var_44], 0FFFFFFFFh
jmp loc_664FC
loc_6642E:
cmp [rsp+0E8h+var_9C], 0
jz short loc_66482
mov rax, [rsp+0E8h+var_60]
mov [rsp+0E8h+var_E0], rax
mov rax, [rsp+0E8h+var_50]
mov rdi, [rax+1A0h]
mov rsi, [rax+1A8h]
call js_dup
mov rcx, rax
mov rax, [rsp+0E8h+var_E0]
mov [rsp+0E8h+var_B0], rcx
mov [rsp+0E8h+var_A8], rdx
mov rcx, [rsp+0E8h+var_B0]
mov [rax], rcx
mov rcx, [rsp+0E8h+var_A8]
mov [rax+8], rcx
jmp short loc_664AC
loc_66482:
mov rax, [rsp+0E8h+var_60]
mov dword ptr [rsp+0E8h+var_C0], 0
mov [rsp+0E8h+var_B8], 3
mov rcx, [rsp+0E8h+var_C0]
mov [rax], rcx
mov rcx, [rsp+0E8h+var_B8]
mov [rax+8], rcx
loc_664AC:
jmp short $+2
loc_664AE:
mov rax, [rsp+0E8h+var_60]
mov [rsp+0E8h+var_E8], rax
mov rdi, [rsp+0E8h+var_50]
mov esi, [rsp+0E8h+var_54]
call JS_AtomToValue
mov rcx, rax
mov rax, [rsp+0E8h+var_E8]
mov [rsp+0E8h+var_D0], rcx
mov [rsp+0E8h+var_C8], rdx
mov rcx, [rsp+0E8h+var_D0]
mov [rax+10h], rcx
mov rcx, [rsp+0E8h+var_C8]
mov [rax+18h], rcx
mov [rsp+0E8h+var_44], 0
loc_664FC:
mov eax, [rsp+0E8h+var_44]
add rsp, 0E8h
retn
| long long JS_GetGlobalVarRef(
long long a1,
unsigned int a2,
_QWORD *a3,
__m128 a4,
__m128 a5,
__m128 a6,
__m128 a7,
double a8,
double a9,
__m128 a10,
__m128 a11)
{
long long v11; // rax
long long v12; // rdx
long long v13; // rcx
long long v14; // r8
long long v15; // r9
__m128 v16; // xmm4
__m128 v17; // xmm5
long long v18; // rdx
long long v19; // rdx
_QWORD *v20; // rax
long long v21; // rdx
_QWORD *v23; // [rsp+0h] [rbp-E8h]
_QWORD *v24; // [rsp+8h] [rbp-E0h]
_QWORD *v25; // [rsp+10h] [rbp-D8h]
long long v26; // [rsp+28h] [rbp-C0h]
int HasProperty; // [rsp+4Ch] [rbp-9Ch]
long long *v28; // [rsp+70h] [rbp-78h] BYREF
_DWORD *v29; // [rsp+78h] [rbp-70h]
long long v30; // [rsp+80h] [rbp-68h]
_QWORD *v31; // [rsp+88h] [rbp-60h]
unsigned int v32; // [rsp+94h] [rbp-54h]
long long v33; // [rsp+98h] [rbp-50h]
long long v35; // [rsp+A8h] [rbp-40h]
long long shape_prop; // [rsp+B0h] [rbp-38h]
_DWORD *v37; // [rsp+B8h] [rbp-30h]
long long v38; // [rsp+C0h] [rbp-28h]
unsigned int v39; // [rsp+CCh] [rbp-1Ch]
long long v40; // [rsp+D0h] [rbp-18h]
long long **v41; // [rsp+D8h] [rbp-10h]
_DWORD *v42; // [rsp+E0h] [rbp-8h]
v33 = a1;
v32 = a2;
v31 = a3;
v30 = *(_QWORD *)(a1 + 432);
v41 = &v28;
v40 = v30;
v39 = a2;
v38 = *(_QWORD *)(v30 + 24);
v35 = *(_DWORD *)(v38 + 32) & a2;
v11 = prop_hash_end(v38);
v35 = *(unsigned int *)(v11 + 4 * (-v35 - 1));
shape_prop = get_shape_prop(v38);
while ( v35 )
{
v37 = (_DWORD *)(8 * (v35 - 1) + shape_prop);
if ( v37[1] == v39 )
{
*v41 = (long long *)(16 * (v35 - 1) + *(_QWORD *)(v40 + 32));
v42 = v37;
goto LABEL_7;
}
v35 = *v37 & 0x3FFFFFF;
}
*v41 = 0LL;
v42 = 0LL;
LABEL_7:
v29 = v42;
if ( !v42 )
{
HasProperty = JS_HasProperty(v33, *(_QWORD *)(v33 + 416), *(_QWORD *)(v33 + 424), v32);
if ( HasProperty < 0 )
return (unsigned int)-1;
if ( HasProperty )
{
v24 = v31;
*v24 = js_dup(*(_DWORD **)(v33 + 416), *(_QWORD *)(v33 + 424));
v24[1] = v19;
}
else
{
v20 = v31;
LODWORD(v26) = 0;
*v31 = v26;
v20[1] = 3LL;
}
goto LABEL_18;
}
if ( !JS_IsUninitialized(*v28, v28[1]) )
{
if ( ((*v29 >> 26) & 2) == 0 )
return (unsigned int)JS_ThrowTypeErrorReadOnly(
v33,
0x4000,
v32,
a4,
a5,
a6,
a7,
*(double *)v16.m128_u64,
*(double *)v17.m128_u64,
a10,
a11);
v25 = v31;
*v25 = js_dup(*(_DWORD **)(v33 + 432), *(_QWORD *)(v33 + 440));
v25[1] = v18;
LABEL_18:
v23 = v31;
v23[2] = JS_AtomToValue(v33, v32);
v23[3] = v21;
return 0;
}
JS_ThrowReferenceErrorUninitialized(v33, v29[1], a4, a5, a6, a7, v16, v17, a10, a11, v12, v13, v14, v15);
return (unsigned int)-1;
}
| JS_GetGlobalVarRef:
SUB RSP,0xe8
MOV qword ptr [RSP + 0x98],RDI
MOV dword ptr [RSP + 0x94],ESI
MOV qword ptr [RSP + 0x88],RDX
MOV RAX,qword ptr [RSP + 0x98]
MOV RAX,qword ptr [RAX + 0x1b0]
MOV qword ptr [RSP + 0x80],RAX
MOV RCX,qword ptr [RSP + 0x80]
MOV EAX,dword ptr [RSP + 0x94]
LEA RDX,[RSP + 0x70]
MOV qword ptr [RSP + 0xd8],RDX
MOV qword ptr [RSP + 0xd0],RCX
MOV dword ptr [RSP + 0xcc],EAX
MOV RAX,qword ptr [RSP + 0xd0]
MOV RAX,qword ptr [RAX + 0x18]
MOV qword ptr [RSP + 0xc0],RAX
MOV EAX,dword ptr [RSP + 0xcc]
MOV RCX,qword ptr [RSP + 0xc0]
MOV ECX,dword ptr [RCX + 0x20]
AND RAX,RCX
MOV qword ptr [RSP + 0xa8],RAX
MOV RDI,qword ptr [RSP + 0xc0]
CALL 0x0015c5f0
XOR ECX,ECX
SUB RCX,qword ptr [RSP + 0xa8]
SUB RCX,0x1
MOV EAX,dword ptr [RAX + RCX*0x4]
MOV qword ptr [RSP + 0xa8],RAX
MOV RDI,qword ptr [RSP + 0xc0]
CALL 0x0012afc0
MOV qword ptr [RSP + 0xb0],RAX
LAB_0016621c:
CMP qword ptr [RSP + 0xa8],0x0
JZ 0x001662c3
MOV RAX,qword ptr [RSP + 0xb0]
MOV RCX,qword ptr [RSP + 0xa8]
SUB RCX,0x1
SHL RCX,0x3
ADD RAX,RCX
MOV qword ptr [RSP + 0xb8],RAX
MOV RAX,qword ptr [RSP + 0xb8]
MOV EAX,dword ptr [RAX + 0x4]
CMP EAX,dword ptr [RSP + 0xcc]
SETZ AL
TEST AL,0x1
JNZ 0x00166269
JMP 0x001662a5
LAB_00166269:
MOV RAX,qword ptr [RSP + 0xd0]
MOV RCX,qword ptr [RAX + 0x20]
MOV RAX,qword ptr [RSP + 0xa8]
SUB RAX,0x1
SHL RAX,0x4
ADD RCX,RAX
MOV RAX,qword ptr [RSP + 0xd8]
MOV qword ptr [RAX],RCX
MOV RAX,qword ptr [RSP + 0xb8]
MOV qword ptr [RSP + 0xe0],RAX
JMP 0x001662de
LAB_001662a5:
MOV RAX,qword ptr [RSP + 0xb8]
MOV EAX,dword ptr [RAX]
AND EAX,0x3ffffff
MOV EAX,EAX
MOV qword ptr [RSP + 0xa8],RAX
JMP 0x0016621c
LAB_001662c3:
MOV RAX,qword ptr [RSP + 0xd8]
MOV qword ptr [RAX],0x0
MOV qword ptr [RSP + 0xe0],0x0
LAB_001662de:
MOV RAX,qword ptr [RSP + 0xe0]
MOV qword ptr [RSP + 0x78],RAX
CMP qword ptr [RSP + 0x78],0x0
JZ 0x001663e9
MOV RAX,qword ptr [RSP + 0x70]
MOV RDI,qword ptr [RAX]
MOV RSI,qword ptr [RAX + 0x8]
CALL 0x0012bd40
CMP EAX,0x0
SETNZ AL
XOR AL,0xff
XOR AL,0xff
AND AL,0x1
MOVZX EAX,AL
CDQE
CMP RAX,0x0
JZ 0x0016634e
MOV RDI,qword ptr [RSP + 0x98]
MOV RAX,qword ptr [RSP + 0x78]
MOV ESI,dword ptr [RAX + 0x4]
CALL 0x0015f210
MOV qword ptr [RSP + 0x60],RAX
MOV qword ptr [RSP + 0x68],RDX
MOV dword ptr [RSP + 0xa4],0xffffffff
JMP 0x001664fc
LAB_0016634e:
MOV RAX,qword ptr [RSP + 0x78]
MOV EAX,dword ptr [RAX]
SHR EAX,0x1a
AND EAX,0x2
CMP EAX,0x0
SETNZ AL
XOR AL,0xff
XOR AL,0xff
XOR AL,0xff
AND AL,0x1
MOVZX EAX,AL
CDQE
CMP RAX,0x0
JZ 0x00166399
MOV RDI,qword ptr [RSP + 0x98]
MOV EDX,dword ptr [RSP + 0x94]
MOV ESI,0x4000
CALL 0x0015fd10
MOV dword ptr [RSP + 0xa4],EAX
JMP 0x001664fc
LAB_00166399:
MOV RAX,qword ptr [RSP + 0x88]
MOV qword ptr [RSP + 0x10],RAX
MOV RAX,qword ptr [RSP + 0x98]
MOV RDI,qword ptr [RAX + 0x1b0]
MOV RSI,qword ptr [RAX + 0x1b8]
CALL 0x00120410
MOV RCX,RAX
MOV RAX,qword ptr [RSP + 0x10]
MOV qword ptr [RSP + 0x50],RCX
MOV qword ptr [RSP + 0x58],RDX
MOV RCX,qword ptr [RSP + 0x50]
MOV qword ptr [RAX],RCX
MOV RCX,qword ptr [RSP + 0x58]
MOV qword ptr [RAX + 0x8],RCX
JMP 0x001664ae
LAB_001663e9:
MOV RDI,qword ptr [RSP + 0x98]
MOV RAX,qword ptr [RSP + 0x98]
MOV ECX,dword ptr [RSP + 0x94]
MOV RSI,qword ptr [RAX + 0x1a0]
MOV RDX,qword ptr [RAX + 0x1a8]
CALL 0x0012fc10
MOV dword ptr [RSP + 0x4c],EAX
CMP dword ptr [RSP + 0x4c],0x0
JGE 0x0016642e
MOV dword ptr [RSP + 0xa4],0xffffffff
JMP 0x001664fc
LAB_0016642e:
CMP dword ptr [RSP + 0x4c],0x0
JZ 0x00166482
MOV RAX,qword ptr [RSP + 0x88]
MOV qword ptr [RSP + 0x8],RAX
MOV RAX,qword ptr [RSP + 0x98]
MOV RDI,qword ptr [RAX + 0x1a0]
MOV RSI,qword ptr [RAX + 0x1a8]
CALL 0x00120410
MOV RCX,RAX
MOV RAX,qword ptr [RSP + 0x8]
MOV qword ptr [RSP + 0x38],RCX
MOV qword ptr [RSP + 0x40],RDX
MOV RCX,qword ptr [RSP + 0x38]
MOV qword ptr [RAX],RCX
MOV RCX,qword ptr [RSP + 0x40]
MOV qword ptr [RAX + 0x8],RCX
JMP 0x001664ac
LAB_00166482:
MOV RAX,qword ptr [RSP + 0x88]
MOV dword ptr [RSP + 0x28],0x0
MOV qword ptr [RSP + 0x30],0x3
MOV RCX,qword ptr [RSP + 0x28]
MOV qword ptr [RAX],RCX
MOV RCX,qword ptr [RSP + 0x30]
MOV qword ptr [RAX + 0x8],RCX
LAB_001664ac:
JMP 0x001664ae
LAB_001664ae:
MOV RAX,qword ptr [RSP + 0x88]
MOV qword ptr [RSP],RAX
MOV RDI,qword ptr [RSP + 0x98]
MOV ESI,dword ptr [RSP + 0x94]
CALL 0x00127b70
MOV RCX,RAX
MOV RAX,qword ptr [RSP]
MOV qword ptr [RSP + 0x18],RCX
MOV qword ptr [RSP + 0x20],RDX
MOV RCX,qword ptr [RSP + 0x18]
MOV qword ptr [RAX + 0x10],RCX
MOV RCX,qword ptr [RSP + 0x20]
MOV qword ptr [RAX + 0x18],RCX
MOV dword ptr [RSP + 0xa4],0x0
LAB_001664fc:
MOV EAX,dword ptr [RSP + 0xa4]
ADD RSP,0xe8
RET
|
int4 JS_GetGlobalVarRef(long param_1,uint param_2,int1 (*param_3) [16])
{
int1 (*pauVar1) [16];
int iVar2;
int4 uVar3;
long lVar4;
int1 auVar5 [16];
uint uStack_bc;
int8 *local_78;
uint *local_70;
long local_68;
int1 (*local_60) [16];
uint local_54;
long local_50;
ulong local_40;
long local_38;
uint *local_30;
long local_28;
uint local_1c;
long local_18;
int8 **local_10;
uint *local_8;
local_68 = *(long *)(param_1 + 0x1b0);
local_10 = &local_78;
local_28 = *(long *)(local_68 + 0x18);
local_40 = (ulong)(param_2 & *(uint *)(local_28 + 0x20));
local_60 = param_3;
local_54 = param_2;
local_50 = param_1;
local_1c = param_2;
local_18 = local_68;
lVar4 = prop_hash_end(local_28);
local_40 = (ulong)*(uint *)(lVar4 + (-1 - local_40) * 4);
local_38 = get_shape_prop(local_28);
do {
if (local_40 == 0) {
*local_10 = (int8 *)0x0;
local_8 = (uint *)0x0;
LAB_001662de:
local_70 = local_8;
if (local_8 == (uint *)0x0) {
iVar2 = JS_HasProperty(local_50,*(int8 *)(local_50 + 0x1a0),
*(int8 *)(local_50 + 0x1a8),local_54);
pauVar1 = local_60;
if (iVar2 < 0) {
return 0xffffffff;
}
if (iVar2 == 0) {
*(ulong *)*local_60 = (ulong)uStack_bc << 0x20;
*(int8 *)(*local_60 + 8) = 3;
}
else {
auVar5 = js_dup(*(int8 *)(local_50 + 0x1a0),*(int8 *)(local_50 + 0x1a8));
*pauVar1 = auVar5;
}
}
else {
iVar2 = JS_IsUninitialized(*local_78,local_78[1]);
pauVar1 = local_60;
if (iVar2 != 0) {
JS_ThrowReferenceErrorUninitialized(local_50,local_70[1]);
return 0xffffffff;
}
if ((*local_70 >> 0x1a & 2) == 0) {
uVar3 = JS_ThrowTypeErrorReadOnly(local_50,0x4000,local_54);
return uVar3;
}
auVar5 = js_dup(*(int8 *)(local_50 + 0x1b0),*(int8 *)(local_50 + 0x1b8));
*pauVar1 = auVar5;
}
pauVar1 = local_60;
auVar5 = JS_AtomToValue(local_50,local_54);
pauVar1[1] = auVar5;
return 0;
}
local_30 = (uint *)(local_38 + (local_40 - 1) * 8);
if (local_30[1] == local_1c) {
*local_10 = (int8 *)(*(long *)(local_18 + 0x20) + (local_40 - 1) * 0x10);
local_8 = local_30;
goto LAB_001662de;
}
local_40 = (ulong)(*local_30 & 0x3ffffff);
} while( true );
}
|
|
6,352 | minja::TextTemplateToken::~TextTemplateToken() | monkey531[P]llama/common/minja.hpp | TextTemplateToken(const Location & location, SpaceHandling pre, SpaceHandling post, const std::string& t) : TemplateToken(Type::Text, location, pre, post), text(t) {} | O1 | cpp | minja::TextTemplateToken::~TextTemplateToken():
pushq %rbx
movq %rdi, %rbx
leaq 0x95c69(%rip), %rax # 0x12eee0
addq $0x10, %rax
movq %rax, (%rdi)
movq 0x30(%rdi), %rdi
leaq 0x40(%rbx), %rax
cmpq %rax, %rdi
je 0x99296
movq (%rax), %rsi
incq %rsi
callq 0x1b8b0
leaq 0x9503b(%rip), %rax # 0x12e2d8
addq $0x10, %rax
movq %rax, (%rbx)
movq 0x18(%rbx), %rdi
testq %rdi, %rdi
je 0x992b3
popq %rbx
jmp 0x6cd56
popq %rbx
retq
nop
| _ZN5minja17TextTemplateTokenD2Ev:
push rbx
mov rbx, rdi
lea rax, _ZTVN5minja17TextTemplateTokenE; `vtable for'minja::TextTemplateToken
add rax, 10h
mov [rdi], rax
mov rdi, [rdi+30h]; void *
lea rax, [rbx+40h]
cmp rdi, rax
jz short loc_99296
mov rsi, [rax]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_99296:
lea rax, _ZTVN5minja13TemplateTokenE; `vtable for'minja::TemplateToken
add rax, 10h
mov [rbx], rax
mov rdi, [rbx+18h]
test rdi, rdi
jz short loc_992B3
pop rbx
jmp _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_992B3:
pop rbx
retn
| void minja::TextTemplateToken::~TextTemplateToken(minja::TextTemplateToken *this)
{
char *v2; // rdi
volatile signed __int32 *v3; // rdi
*(_QWORD *)this = &`vtable for'minja::TextTemplateToken + 2;
v2 = (char *)*((_QWORD *)this + 6);
if ( v2 != (char *)this + 64 )
operator delete(v2, *((_QWORD *)this + 8) + 1LL);
*(_QWORD *)this = &`vtable for'minja::TemplateToken + 2;
v3 = (volatile signed __int32 *)*((_QWORD *)this + 3);
if ( v3 )
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v3);
}
| ~TextTemplateToken:
PUSH RBX
MOV RBX,RDI
LEA RAX,[0x22eee0]
ADD RAX,0x10
MOV qword ptr [RDI],RAX
MOV RDI,qword ptr [RDI + 0x30]
LEA RAX,[RBX + 0x40]
CMP RDI,RAX
JZ 0x00199296
MOV RSI,qword ptr [RAX]
INC RSI
CALL 0x0011b8b0
LAB_00199296:
LEA RAX,[0x22e2d8]
ADD RAX,0x10
MOV qword ptr [RBX],RAX
MOV RDI,qword ptr [RBX + 0x18]
TEST RDI,RDI
JZ 0x001992b3
POP RBX
JMP 0x0016cd56
LAB_001992b3:
POP RBX
RET
|
/* minja::TextTemplateToken::~TextTemplateToken() */
void __thiscall minja::TextTemplateToken::~TextTemplateToken(TextTemplateToken *this)
{
*(int ***)this = &PTR__TextTemplateToken_0022eef0;
if (*(TextTemplateToken **)(this + 0x30) != this + 0x40) {
operator_delete(*(TextTemplateToken **)(this + 0x30),*(long *)(this + 0x40) + 1);
}
*(int ***)this = &PTR__TemplateToken_0022e2e8;
if (*(_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> **)(this + 0x18) !=
(_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) {
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release
(*(_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> **)(this + 0x18));
return;
}
return;
}
|
|
6,353 | sp_get_linestring_mbr | eloqsql/storage/myisam/sp_key.c | static int sp_get_linestring_mbr(uchar *(*wkb), uchar *end, uint n_dims,
uchar byte_order, double *mbr)
{
uint n_points;
n_points = uint4korr(*wkb);
(*wkb) += 4;
for (; n_points > 0; --n_points)
{
/* Add next point to mbr */
if (sp_add_point_to_mbr(wkb, end, n_dims, byte_order, mbr))
return -1;
}
return 0;
} | O3 | c | sp_get_linestring_mbr:
pushq %rbp
movq %rsp, %rbp
movq (%rdi), %rax
movl (%rax), %ecx
addq $0x4, %rax
movq %rax, (%rdi)
testl %ecx, %ecx
je 0x8e7f2
addq $-0x8, %rsi
movb $0x1, %r8b
xorl %r9d, %r9d
movq (%rdi), %rax
cmpq %rsi, %rax
ja 0x8e7eb
movsd (%rax), %xmm0
addq $0x8, %rax
movq %rax, (%rdi)
movsd (%rdx,%r9), %xmm1
ucomisd %xmm0, %xmm1
jbe 0x8e7be
movsd %xmm0, (%rdx,%r9)
ucomisd 0x8(%rdx,%r9), %xmm0
jbe 0x8e7d1
orq $0x8, %r9
movsd %xmm0, (%rdx,%r9)
movl $0x10, %r9d
xorl %eax, %eax
testb $0x1, %r8b
movl $0x0, %r8d
jne 0x8e799
decl %ecx
jne 0x8e793
jmp 0x8e7f4
movl $0xffffffff, %eax # imm = 0xFFFFFFFF
jmp 0x8e7f4
xorl %eax, %eax
popq %rbp
retq
| sp_get_linestring_mbr_0:
push rbp
mov rbp, rsp
mov rax, [rdi]
mov ecx, [rax]
add rax, 4
mov [rdi], rax
test ecx, ecx
jz short loc_8E7F2
add rsi, 0FFFFFFFFFFFFFFF8h
loc_8E793:
mov r8b, 1
xor r9d, r9d
loc_8E799:
mov rax, [rdi]
cmp rax, rsi
ja short loc_8E7EB
movsd xmm0, qword ptr [rax]
add rax, 8
mov [rdi], rax
movsd xmm1, qword ptr [rdx+r9]
ucomisd xmm1, xmm0
jbe short loc_8E7BE
movsd qword ptr [rdx+r9], xmm0
loc_8E7BE:
ucomisd xmm0, qword ptr [rdx+r9+8]
jbe short loc_8E7D1
or r9, 8
movsd qword ptr [rdx+r9], xmm0
loc_8E7D1:
mov r9d, 10h
xor eax, eax
test r8b, 1
mov r8d, 0
jnz short loc_8E799
dec ecx
jnz short loc_8E793
jmp short loc_8E7F4
loc_8E7EB:
mov eax, 0FFFFFFFFh
jmp short loc_8E7F4
loc_8E7F2:
xor eax, eax
loc_8E7F4:
pop rbp
retn
| long long sp_get_linestring_mbr_0(double **a1, long long a2, long long a3)
{
int v3; // ecx
unsigned long long v4; // rsi
char v5; // r8
long long v6; // r9
double *v7; // rax
double v8; // xmm0_8
long long result; // rax
bool v10; // zf
v3 = *(_DWORD *)*a1;
*a1 = (double *)((char *)*a1 + 4);
if ( !v3 )
return 0LL;
v4 = a2 - 8;
while ( 2 )
{
v5 = 1;
v6 = 0LL;
do
{
v7 = *a1;
if ( (unsigned long long)*a1 > v4 )
return 0xFFFFFFFFLL;
v8 = *v7;
*a1 = v7 + 1;
if ( *(double *)(a3 + v6) > v8 )
*(double *)(a3 + v6) = v8;
if ( v8 > *(double *)(a3 + v6 + 8) )
*(double *)(a3 + (v6 | 8)) = v8;
v6 = 16LL;
result = 0LL;
v10 = (v5 & 1) == 0;
v5 = 0;
}
while ( !v10 );
if ( --v3 )
continue;
break;
}
return result;
}
| sp_get_linestring_mbr:
PUSH RBP
MOV RBP,RSP
MOV RAX,qword ptr [RDI]
MOV ECX,dword ptr [RAX]
ADD RAX,0x4
MOV qword ptr [RDI],RAX
TEST ECX,ECX
JZ 0x0018e7f2
ADD RSI,-0x8
LAB_0018e793:
MOV R8B,0x1
XOR R9D,R9D
LAB_0018e799:
MOV RAX,qword ptr [RDI]
CMP RAX,RSI
JA 0x0018e7eb
MOVSD XMM0,qword ptr [RAX]
ADD RAX,0x8
MOV qword ptr [RDI],RAX
MOVSD XMM1,qword ptr [RDX + R9*0x1]
UCOMISD XMM1,XMM0
JBE 0x0018e7be
MOVSD qword ptr [RDX + R9*0x1],XMM0
LAB_0018e7be:
UCOMISD XMM0,qword ptr [RDX + R9*0x1 + 0x8]
JBE 0x0018e7d1
OR R9,0x8
MOVSD qword ptr [RDX + R9*0x1],XMM0
LAB_0018e7d1:
MOV R9D,0x10
XOR EAX,EAX
TEST R8B,0x1
MOV R8D,0x0
JNZ 0x0018e799
DEC ECX
JNZ 0x0018e793
JMP 0x0018e7f4
LAB_0018e7eb:
MOV EAX,0xffffffff
JMP 0x0018e7f4
LAB_0018e7f2:
XOR EAX,EAX
LAB_0018e7f4:
POP RBP
RET
|
int8 sp_get_linestring_mbr(int8 *param_1,long param_2,long param_3)
{
double dVar1;
double *pdVar2;
bool bVar3;
int iVar4;
bool bVar5;
ulong uVar6;
iVar4 = *(int *)*param_1;
*param_1 = (int *)*param_1 + 1;
if (iVar4 != 0) {
do {
uVar6 = 0;
bVar3 = true;
do {
bVar5 = bVar3;
pdVar2 = (double *)*param_1;
if ((double *)(param_2 + -8) < pdVar2) {
return 0xffffffff;
}
dVar1 = *pdVar2;
*param_1 = pdVar2 + 1;
if (dVar1 < *(double *)(param_3 + uVar6)) {
*(double *)(param_3 + uVar6) = dVar1;
}
pdVar2 = (double *)(param_3 + 8 + uVar6);
if (*pdVar2 <= dVar1 && dVar1 != *pdVar2) {
*(double *)(param_3 + (uVar6 | 8)) = dVar1;
}
uVar6 = 0x10;
bVar3 = false;
} while (bVar5);
iVar4 = iVar4 + -1;
} while (iVar4 != 0);
}
return 0;
}
|
|
6,354 | llama_priority_queue<llm_bigram_bpe, std::vector<llm_bigram_bpe, std::allocator<llm_bigram_bpe>>, llm_bigram_bpe::comparator>::pop_move() | monkey531[P]llama/src/llama-vocab.cpp | T pop_move() {
T item = std::move(this->c.front());
std::pop_heap(this->c.begin(), this->c.end(), this->comp);
this->c.pop_back();
return item;
} | O1 | cpp | llama_priority_queue<llm_bigram_bpe, std::vector<llm_bigram_bpe, std::allocator<llm_bigram_bpe>>, llm_bigram_bpe::comparator>::pop_move():
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rsi, %r14
movq %rdi, %rbx
movq (%rsi), %rax
movq (%rax), %rcx
movq %rcx, (%rdi)
leaq 0x18(%rdi), %r15
movq %r15, 0x8(%rdi)
movq 0x8(%rax), %rdx
leaq 0x18(%rax), %rcx
cmpq %rcx, %rdx
je 0xefd92
movq %rdx, 0x8(%rbx)
movq (%rcx), %rdx
movq %rdx, 0x18(%rbx)
jmp 0xefd99
movups (%rcx), %xmm0
movups %xmm0, (%r15)
movq 0x10(%rax), %rdx
movq %rdx, 0x10(%rbx)
movq %rcx, 0x8(%rax)
movq $0x0, 0x10(%rax)
movb $0x0, 0x18(%rax)
movups 0x28(%rax), %xmm0
movups %xmm0, 0x28(%rbx)
movq (%r14), %rdi
movq 0x8(%r14), %rdx
movq %rdx, %rax
subq %rdi, %rax
cmpq $0x39, %rax
jl 0xefddd
addq $-0x38, %rdx
leaq 0xf(%rsp), %rcx
movq %rdx, %rsi
callq 0x66d50
movq 0x8(%r14), %rax
leaq -0x38(%rax), %rcx
movq %rcx, 0x8(%r14)
movq -0x30(%rax), %rdi
addq $-0x20, %rax
cmpq %rax, %rdi
je 0xefe01
movq (%rax), %rsi
incq %rsi
callq 0x69220
movq %rbx, %rax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
movq %rax, %r14
movq 0x8(%rbx), %rdi
cmpq %r15, %rdi
je 0xefe25
movq (%r15), %rsi
incq %rsi
callq 0x69220
movq %r14, %rdi
callq 0x6c640
| _ZN20llama_priority_queueI14llm_bigram_bpeSt6vectorIS0_SaIS0_EENS0_10comparatorEE8pop_moveEv:
push r15
push r14
push rbx; __int64
sub rsp, 10h
mov r14, rsi
mov rbx, rdi
mov rax, [rsi]
mov rcx, [rax]
mov [rdi], rcx
lea r15, [rdi+18h]
mov [rdi+8], r15
mov rdx, [rax+8]
lea rcx, [rax+18h]
cmp rdx, rcx
jz short loc_EFD92
mov [rbx+8], rdx
mov rdx, [rcx]
mov [rbx+18h], rdx
jmp short loc_EFD99
loc_EFD92:
movups xmm0, xmmword ptr [rcx]
movups xmmword ptr [r15], xmm0
loc_EFD99:
mov rdx, [rax+10h]
mov [rbx+10h], rdx
mov [rax+8], rcx
mov qword ptr [rax+10h], 0
mov byte ptr [rax+18h], 0
movups xmm0, xmmword ptr [rax+28h]
movups xmmword ptr [rbx+28h], xmm0
mov rdi, [r14]; int
mov rdx, [r14+8]
mov rax, rdx
sub rax, rdi
cmp rax, 39h ; '9'
jl short loc_EFDDD
add rdx, 0FFFFFFFFFFFFFFC8h
lea rcx, [rsp+28h+var_19]
mov rsi, rdx
call __ZSt10__pop_heapIN9__gnu_cxx17__normal_iteratorIP14llm_bigram_bpeSt6vectorIS2_SaIS2_EEEENS0_5__ops15_Iter_comp_iterINS2_10comparatorEEEEvT_SC_SC_RT0_; std::__pop_heap<__gnu_cxx::__normal_iterator<llm_bigram_bpe *,std::vector<llm_bigram_bpe>>,__gnu_cxx::__ops::_Iter_comp_iter<llm_bigram_bpe::comparator>>(__gnu_cxx::__normal_iterator<llm_bigram_bpe *,std::vector<llm_bigram_bpe>>,__gnu_cxx::__normal_iterator<llm_bigram_bpe *,std::vector<llm_bigram_bpe>>,__gnu_cxx::__normal_iterator<llm_bigram_bpe *,std::vector<llm_bigram_bpe>>,__gnu_cxx::__ops::_Iter_comp_iter<llm_bigram_bpe::comparator> &)
loc_EFDDD:
mov rax, [r14+8]
lea rcx, [rax-38h]
mov [r14+8], rcx
mov rdi, [rax-30h]; void *
add rax, 0FFFFFFFFFFFFFFE0h
cmp rdi, rax
jz short loc_EFE01
mov rsi, [rax]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_EFE01:
mov rax, rbx
add rsp, 10h
pop rbx
pop r14
pop r15
retn
mov r14, rax
mov rdi, [rbx+8]; void *
cmp rdi, r15
jz short loc_EFE25
mov rsi, [r15]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_EFE25:
mov rdi, r14
call __Unwind_Resume
| long long llama_priority_queue<llm_bigram_bpe,std::vector<llm_bigram_bpe>,llm_bigram_bpe::comparator>::pop_move(
long long a1,
long long a2)
{
_QWORD *v3; // rax
_QWORD *v4; // rdx
_OWORD *v5; // rcx
long long v6; // rax
_QWORD *v7; // rdi
_QWORD *v8; // rax
void *v10; // [rsp+0h] [rbp-28h]
int v11; // [rsp+8h] [rbp-20h]
long long v12; // [rsp+10h] [rbp-18h]
v3 = *(_QWORD **)a2;
*(_QWORD *)a1 = **(_QWORD **)a2;
*(_QWORD *)(a1 + 8) = a1 + 24;
v4 = (_QWORD *)v3[1];
v5 = v3 + 3;
if ( v4 == v3 + 3 )
{
*(_OWORD *)(a1 + 24) = *v5;
}
else
{
*(_QWORD *)(a1 + 8) = v4;
*(_QWORD *)(a1 + 24) = *(_QWORD *)v5;
}
*(_QWORD *)(a1 + 16) = v3[2];
v3[1] = v5;
v3[2] = 0LL;
*((_BYTE *)v3 + 24) = 0;
*(_OWORD *)(a1 + 40) = *(_OWORD *)(v3 + 5);
if ( (long long)(*(_QWORD *)(a2 + 8) - *(_QWORD *)a2) >= 57 )
std::__pop_heap<__gnu_cxx::__normal_iterator<llm_bigram_bpe *,std::vector<llm_bigram_bpe>>,__gnu_cxx::__ops::_Iter_comp_iter<llm_bigram_bpe::comparator>>(
*(_QWORD *)a2,
v10,
v11,
v12);
v6 = *(_QWORD *)(a2 + 8);
*(_QWORD *)(a2 + 8) = v6 - 56;
v7 = *(_QWORD **)(v6 - 48);
v8 = (_QWORD *)(v6 - 32);
if ( v7 != v8 )
operator delete(v7, *v8 + 1LL);
return a1;
}
| pop_move:
PUSH R15
PUSH R14
PUSH RBX
SUB RSP,0x10
MOV R14,RSI
MOV RBX,RDI
MOV RAX,qword ptr [RSI]
MOV RCX,qword ptr [RAX]
MOV qword ptr [RDI],RCX
LEA R15,[RDI + 0x18]
MOV qword ptr [RDI + 0x8],R15
MOV RDX,qword ptr [RAX + 0x8]
LEA RCX,[RAX + 0x18]
CMP RDX,RCX
JZ 0x001efd92
MOV qword ptr [RBX + 0x8],RDX
MOV RDX,qword ptr [RCX]
MOV qword ptr [RBX + 0x18],RDX
JMP 0x001efd99
LAB_001efd92:
MOVUPS XMM0,xmmword ptr [RCX]
MOVUPS xmmword ptr [R15],XMM0
LAB_001efd99:
MOV RDX,qword ptr [RAX + 0x10]
MOV qword ptr [RBX + 0x10],RDX
MOV qword ptr [RAX + 0x8],RCX
MOV qword ptr [RAX + 0x10],0x0
MOV byte ptr [RAX + 0x18],0x0
MOVUPS XMM0,xmmword ptr [RAX + 0x28]
MOVUPS xmmword ptr [RBX + 0x28],XMM0
MOV RDI,qword ptr [R14]
MOV RDX,qword ptr [R14 + 0x8]
MOV RAX,RDX
SUB RAX,RDI
CMP RAX,0x39
JL 0x001efddd
ADD RDX,-0x38
LAB_001efdd0:
LEA RCX,[RSP + 0xf]
MOV RSI,RDX
CALL 0x00166d50
LAB_001efddd:
MOV RAX,qword ptr [R14 + 0x8]
LEA RCX,[RAX + -0x38]
MOV qword ptr [R14 + 0x8],RCX
MOV RDI,qword ptr [RAX + -0x30]
ADD RAX,-0x20
CMP RDI,RAX
JZ 0x001efe01
MOV RSI,qword ptr [RAX]
INC RSI
CALL 0x00169220
LAB_001efe01:
MOV RAX,RBX
ADD RSP,0x10
POP RBX
POP R14
POP R15
RET
|
/* llama_priority_queue<llm_bigram_bpe, std::vector<llm_bigram_bpe, std::allocator<llm_bigram_bpe>
>, llm_bigram_bpe::comparator>::pop_move() */
void llama_priority_queue<llm_bigram_bpe,std::vector<llm_bigram_bpe,std::allocator<llm_bigram_bpe>>,llm_bigram_bpe::comparator>
::pop_move(void)
{
int8 *puVar1;
int8 *puVar2;
int4 uVar3;
int4 uVar4;
int4 uVar5;
int8 uVar6;
long lVar7;
long *in_RSI;
int8 *in_RDI;
int1 local_19;
puVar2 = (int8 *)*in_RSI;
*in_RDI = *puVar2;
in_RDI[1] = in_RDI + 3;
puVar1 = puVar2 + 3;
if ((int8 *)puVar2[1] == puVar1) {
uVar6 = puVar2[4];
in_RDI[3] = *puVar1;
in_RDI[4] = uVar6;
}
else {
in_RDI[1] = (int8 *)puVar2[1];
in_RDI[3] = *puVar1;
}
in_RDI[2] = puVar2[2];
puVar2[1] = puVar1;
puVar2[2] = 0;
*(int1 *)(puVar2 + 3) = 0;
uVar3 = *(int4 *)((long)puVar2 + 0x2c);
uVar4 = *(int4 *)(puVar2 + 6);
uVar5 = *(int4 *)((long)puVar2 + 0x34);
*(int4 *)(in_RDI + 5) = *(int4 *)(puVar2 + 5);
*(int4 *)((long)in_RDI + 0x2c) = uVar3;
*(int4 *)(in_RDI + 6) = uVar4;
*(int4 *)((long)in_RDI + 0x34) = uVar5;
if (0x38 < in_RSI[1] - *in_RSI) {
lVar7 = in_RSI[1] + -0x38;
/* try { // try from 001efdd0 to 001efddc has its CatchHandler @ 001efe0e */
std::
__pop_heap<__gnu_cxx::__normal_iterator<llm_bigram_bpe*,std::vector<llm_bigram_bpe,std::allocator<llm_bigram_bpe>>>,__gnu_cxx::__ops::_Iter_comp_iter<llm_bigram_bpe::comparator>>
(*in_RSI,lVar7,lVar7,&local_19);
}
lVar7 = in_RSI[1];
in_RSI[1] = lVar7 + -0x38;
if (*(long **)(lVar7 + -0x30) != (long *)(lVar7 + -0x20)) {
operator_delete(*(long **)(lVar7 + -0x30),*(long *)(lVar7 + -0x20) + 1);
}
return;
}
|
|
6,355 | mi_find_half_pos | eloqsql/storage/myisam/mi_write.c | uchar *_mi_find_half_pos(uint nod_flag, MI_KEYDEF *keyinfo, uchar *page,
uchar *key, uint *return_key_length,
uchar **after_key)
{
uint keys,length,key_ref_length;
uchar *end,*lastpos;
DBUG_ENTER("_mi_find_half_pos");
key_ref_length=2+nod_flag;
length=mi_getint(page)-key_ref_length;
page+=key_ref_length;
if (!(keyinfo->flag &
(HA_PACK_KEY | HA_SPACE_PACK_USED | HA_VAR_LENGTH_KEY |
HA_BINARY_PACK_KEY)))
{
key_ref_length=keyinfo->keylength+nod_flag;
keys=length/(key_ref_length*2);
*return_key_length=keyinfo->keylength;
end=page+keys*key_ref_length;
*after_key=end+key_ref_length;
memcpy(key,end,key_ref_length);
DBUG_RETURN(end);
}
end=page+length/2-key_ref_length; /* This is aprox. half */
*key='\0';
do
{
lastpos=page;
if (!(length=(*keyinfo->get_key)(keyinfo,nod_flag,&page,key)))
DBUG_RETURN(0);
} while (page < end);
*return_key_length=length;
*after_key=page;
DBUG_PRINT("exit",("returns: %p page: %p half: %p",
lastpos, page, end));
DBUG_RETURN(lastpos);
} | O0 | c | mi_find_half_pos:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movl %edi, -0xc(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
movq %r8, -0x30(%rbp)
movq %r9, -0x38(%rbp)
movl -0xc(%rbp), %eax
addl $0x2, %eax
movl %eax, -0x44(%rbp)
movq -0x20(%rbp), %rax
movzbl 0x1(%rax), %eax
movzwl %ax, %eax
movq -0x20(%rbp), %rcx
movzbl (%rcx), %ecx
movzwl %cx, %ecx
shll $0x8, %ecx
orl %ecx, %eax
movzwl %ax, %eax
andl $0x7fff, %eax # imm = 0x7FFF
subl -0x44(%rbp), %eax
movl %eax, -0x40(%rbp)
movl -0x44(%rbp), %ecx
movq -0x20(%rbp), %rax
movl %ecx, %ecx
addq %rcx, %rax
movq %rax, -0x20(%rbp)
movq -0x18(%rbp), %rax
movzwl 0xa(%rax), %eax
andl $0x2e, %eax
cmpl $0x0, %eax
jne 0xc7d9f
movq -0x18(%rbp), %rax
movzwl 0x12(%rax), %eax
addl -0xc(%rbp), %eax
movl %eax, -0x44(%rbp)
movl -0x40(%rbp), %eax
movl -0x44(%rbp), %ecx
shll %ecx
xorl %edx, %edx
divl %ecx
movl %eax, -0x3c(%rbp)
movq -0x18(%rbp), %rax
movzwl 0x12(%rax), %ecx
movq -0x30(%rbp), %rax
movl %ecx, (%rax)
movq -0x20(%rbp), %rax
movl -0x3c(%rbp), %ecx
imull -0x44(%rbp), %ecx
movl %ecx, %ecx
addq %rcx, %rax
movq %rax, -0x50(%rbp)
movq -0x50(%rbp), %rcx
movl -0x44(%rbp), %eax
addq %rax, %rcx
movq -0x38(%rbp), %rax
movq %rcx, (%rax)
movq -0x28(%rbp), %rdi
movq -0x50(%rbp), %rsi
movl -0x44(%rbp), %eax
movl %eax, %edx
callq 0x2a090
movq -0x50(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0xc7e26
movq -0x20(%rbp), %rax
movl -0x40(%rbp), %ecx
shrl %ecx
movl %ecx, %ecx
addq %rcx, %rax
movl -0x44(%rbp), %ecx
movl %ecx, %edx
xorl %ecx, %ecx
subq %rdx, %rcx
addq %rcx, %rax
movq %rax, -0x50(%rbp)
movq -0x28(%rbp), %rax
movb $0x0, (%rax)
movq -0x20(%rbp), %rax
movq %rax, -0x58(%rbp)
movq -0x18(%rbp), %rax
movq 0x48(%rax), %rax
movq -0x18(%rbp), %rdi
movl -0xc(%rbp), %esi
movq -0x28(%rbp), %rcx
leaq -0x20(%rbp), %rdx
callq *%rax
movl %eax, -0x40(%rbp)
cmpl $0x0, %eax
jne 0xc7dfa
jmp 0xc7df0
movq $0x0, -0x8(%rbp)
jmp 0xc7e26
jmp 0xc7dfc
movq -0x20(%rbp), %rax
cmpq -0x50(%rbp), %rax
jb 0xc7dc5
movl -0x40(%rbp), %ecx
movq -0x30(%rbp), %rax
movl %ecx, (%rax)
movq -0x20(%rbp), %rcx
movq -0x38(%rbp), %rax
movq %rcx, (%rax)
jmp 0xc7e1c
jmp 0xc7e1e
movq -0x58(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x60, %rsp
popq %rbp
retq
| _mi_find_half_pos:
push rbp
mov rbp, rsp
sub rsp, 60h
mov [rbp+var_C], edi
mov [rbp+var_18], rsi
mov [rbp+var_20], rdx
mov [rbp+var_28], rcx
mov [rbp+var_30], r8
mov [rbp+var_38], r9
mov eax, [rbp+var_C]
add eax, 2
mov [rbp+var_44], eax
mov rax, [rbp+var_20]
movzx eax, byte ptr [rax+1]
movzx eax, ax
mov rcx, [rbp+var_20]
movzx ecx, byte ptr [rcx]
movzx ecx, cx
shl ecx, 8
or eax, ecx
movzx eax, ax
and eax, 7FFFh
sub eax, [rbp+var_44]
mov [rbp+var_40], eax
mov ecx, [rbp+var_44]
mov rax, [rbp+var_20]
mov ecx, ecx
add rax, rcx
mov [rbp+var_20], rax
mov rax, [rbp+var_18]
movzx eax, word ptr [rax+0Ah]
and eax, 2Eh
cmp eax, 0
jnz short loc_C7D9F
mov rax, [rbp+var_18]
movzx eax, word ptr [rax+12h]
add eax, [rbp+var_C]
mov [rbp+var_44], eax
mov eax, [rbp+var_40]
mov ecx, [rbp+var_44]
shl ecx, 1
xor edx, edx
div ecx
mov [rbp+var_3C], eax
mov rax, [rbp+var_18]
movzx ecx, word ptr [rax+12h]
mov rax, [rbp+var_30]
mov [rax], ecx
mov rax, [rbp+var_20]
mov ecx, [rbp+var_3C]
imul ecx, [rbp+var_44]
mov ecx, ecx
add rax, rcx
mov [rbp+var_50], rax
mov rcx, [rbp+var_50]
mov eax, [rbp+var_44]
add rcx, rax
mov rax, [rbp+var_38]
mov [rax], rcx
mov rdi, [rbp+var_28]
mov rsi, [rbp+var_50]
mov eax, [rbp+var_44]
mov edx, eax
call _memcpy
mov rax, [rbp+var_50]
mov [rbp+var_8], rax
jmp loc_C7E26
loc_C7D9F:
mov rax, [rbp+var_20]
mov ecx, [rbp+var_40]
shr ecx, 1
mov ecx, ecx
add rax, rcx
mov ecx, [rbp+var_44]
mov edx, ecx
xor ecx, ecx
sub rcx, rdx
add rax, rcx
mov [rbp+var_50], rax
mov rax, [rbp+var_28]
mov byte ptr [rax], 0
loc_C7DC5:
mov rax, [rbp+var_20]
mov [rbp+var_58], rax
mov rax, [rbp+var_18]
mov rax, [rax+48h]
mov rdi, [rbp+var_18]
mov esi, [rbp+var_C]
mov rcx, [rbp+var_28]
lea rdx, [rbp+var_20]
call rax
mov [rbp+var_40], eax
cmp eax, 0
jnz short loc_C7DFA
jmp short $+2
loc_C7DF0:
mov [rbp+var_8], 0
jmp short loc_C7E26
loc_C7DFA:
jmp short $+2
loc_C7DFC:
mov rax, [rbp+var_20]
cmp rax, [rbp+var_50]
jb short loc_C7DC5
mov ecx, [rbp+var_40]
mov rax, [rbp+var_30]
mov [rax], ecx
mov rcx, [rbp+var_20]
mov rax, [rbp+var_38]
mov [rax], rcx
jmp short $+2
loc_C7E1C:
jmp short $+2
loc_C7E1E:
mov rax, [rbp+var_58]
mov [rbp+var_8], rax
loc_C7E26:
mov rax, [rbp+var_8]
add rsp, 60h
pop rbp
retn
| unsigned __int16 * mi_find_half_pos(
unsigned int a1,
long long a2,
unsigned __int16 *a3,
_BYTE *a4,
_DWORD *a5,
unsigned __int16 **a6)
{
unsigned __int16 *v7; // [rsp+8h] [rbp-58h]
char *v8; // [rsp+10h] [rbp-50h]
unsigned __int16 *v9; // [rsp+10h] [rbp-50h]
unsigned int v10; // [rsp+1Ch] [rbp-44h]
unsigned int v11; // [rsp+20h] [rbp-40h]
int v12; // [rsp+20h] [rbp-40h]
unsigned __int16 *v16; // [rsp+40h] [rbp-20h] BYREF
long long v17; // [rsp+48h] [rbp-18h]
unsigned int v18; // [rsp+54h] [rbp-Ch]
v18 = a1;
v17 = a2;
v16 = a3;
v11 = (_byteswap_ushort(*a3) & 0x7FFF) - (a1 + 2);
v16 = (unsigned __int16 *)((char *)a3 + a1 + 2);
if ( (*(_WORD *)(a2 + 10) & 0x2E) != 0 )
{
v9 = (unsigned __int16 *)((char *)v16 + (v11 >> 1) - a1 - 2);
*a4 = 0;
do
{
v7 = v16;
v12 = (*(long long ( **)(long long, _QWORD, unsigned __int16 **, _BYTE *))(v17 + 72))(v17, v18, &v16, a4);
if ( !v12 )
return 0LL;
}
while ( v16 < v9 );
*a5 = v12;
*a6 = v16;
return v7;
}
else
{
v10 = v18 + *(unsigned __int16 *)(v17 + 18);
*a5 = *(unsigned __int16 *)(v17 + 18);
v8 = (char *)v16 + v10 * (v11 / (2 * v10));
*a6 = (unsigned __int16 *)&v8[v10];
memcpy(a4, v8, v10);
return (unsigned __int16 *)v8;
}
}
| _mi_find_half_pos:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x60
MOV dword ptr [RBP + -0xc],EDI
MOV qword ptr [RBP + -0x18],RSI
MOV qword ptr [RBP + -0x20],RDX
MOV qword ptr [RBP + -0x28],RCX
MOV qword ptr [RBP + -0x30],R8
MOV qword ptr [RBP + -0x38],R9
MOV EAX,dword ptr [RBP + -0xc]
ADD EAX,0x2
MOV dword ptr [RBP + -0x44],EAX
MOV RAX,qword ptr [RBP + -0x20]
MOVZX EAX,byte ptr [RAX + 0x1]
MOVZX EAX,AX
MOV RCX,qword ptr [RBP + -0x20]
MOVZX ECX,byte ptr [RCX]
MOVZX ECX,CX
SHL ECX,0x8
OR EAX,ECX
MOVZX EAX,AX
AND EAX,0x7fff
SUB EAX,dword ptr [RBP + -0x44]
MOV dword ptr [RBP + -0x40],EAX
MOV ECX,dword ptr [RBP + -0x44]
MOV RAX,qword ptr [RBP + -0x20]
MOV ECX,ECX
ADD RAX,RCX
MOV qword ptr [RBP + -0x20],RAX
MOV RAX,qword ptr [RBP + -0x18]
MOVZX EAX,word ptr [RAX + 0xa]
AND EAX,0x2e
CMP EAX,0x0
JNZ 0x001c7d9f
MOV RAX,qword ptr [RBP + -0x18]
MOVZX EAX,word ptr [RAX + 0x12]
ADD EAX,dword ptr [RBP + -0xc]
MOV dword ptr [RBP + -0x44],EAX
MOV EAX,dword ptr [RBP + -0x40]
MOV ECX,dword ptr [RBP + -0x44]
SHL ECX,0x1
XOR EDX,EDX
DIV ECX
MOV dword ptr [RBP + -0x3c],EAX
MOV RAX,qword ptr [RBP + -0x18]
MOVZX ECX,word ptr [RAX + 0x12]
MOV RAX,qword ptr [RBP + -0x30]
MOV dword ptr [RAX],ECX
MOV RAX,qword ptr [RBP + -0x20]
MOV ECX,dword ptr [RBP + -0x3c]
IMUL ECX,dword ptr [RBP + -0x44]
MOV ECX,ECX
ADD RAX,RCX
MOV qword ptr [RBP + -0x50],RAX
MOV RCX,qword ptr [RBP + -0x50]
MOV EAX,dword ptr [RBP + -0x44]
ADD RCX,RAX
MOV RAX,qword ptr [RBP + -0x38]
MOV qword ptr [RAX],RCX
MOV RDI,qword ptr [RBP + -0x28]
MOV RSI,qword ptr [RBP + -0x50]
MOV EAX,dword ptr [RBP + -0x44]
MOV EDX,EAX
CALL 0x0012a090
MOV RAX,qword ptr [RBP + -0x50]
MOV qword ptr [RBP + -0x8],RAX
JMP 0x001c7e26
LAB_001c7d9f:
MOV RAX,qword ptr [RBP + -0x20]
MOV ECX,dword ptr [RBP + -0x40]
SHR ECX,0x1
MOV ECX,ECX
ADD RAX,RCX
MOV ECX,dword ptr [RBP + -0x44]
MOV EDX,ECX
XOR ECX,ECX
SUB RCX,RDX
ADD RAX,RCX
MOV qword ptr [RBP + -0x50],RAX
MOV RAX,qword ptr [RBP + -0x28]
MOV byte ptr [RAX],0x0
LAB_001c7dc5:
MOV RAX,qword ptr [RBP + -0x20]
MOV qword ptr [RBP + -0x58],RAX
MOV RAX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RAX + 0x48]
MOV RDI,qword ptr [RBP + -0x18]
MOV ESI,dword ptr [RBP + -0xc]
MOV RCX,qword ptr [RBP + -0x28]
LEA RDX,[RBP + -0x20]
CALL RAX
MOV dword ptr [RBP + -0x40],EAX
CMP EAX,0x0
JNZ 0x001c7dfa
JMP 0x001c7df0
LAB_001c7df0:
MOV qword ptr [RBP + -0x8],0x0
JMP 0x001c7e26
LAB_001c7dfa:
JMP 0x001c7dfc
LAB_001c7dfc:
MOV RAX,qword ptr [RBP + -0x20]
CMP RAX,qword ptr [RBP + -0x50]
JC 0x001c7dc5
MOV ECX,dword ptr [RBP + -0x40]
MOV RAX,qword ptr [RBP + -0x30]
MOV dword ptr [RAX],ECX
MOV RCX,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RBP + -0x38]
MOV qword ptr [RAX],RCX
JMP 0x001c7e1c
LAB_001c7e1c:
JMP 0x001c7e1e
LAB_001c7e1e:
MOV RAX,qword ptr [RBP + -0x58]
MOV qword ptr [RBP + -0x8],RAX
LAB_001c7e26:
MOV RAX,qword ptr [RBP + -0x8]
ADD RSP,0x60
POP RBP
RET
|
byte * _mi_find_half_pos(int param_1,long param_2,byte *param_3,int1 *param_4,uint *param_5,
int8 *param_6)
{
byte *pbVar1;
uint uVar2;
uint uVar3;
byte *pbVar4;
byte *local_28;
long local_20;
int local_14;
byte *local_10;
uVar2 = param_1 + 2;
uVar3 = ((uint)param_3[1] | (*param_3 & 0x7f) << 8) - uVar2;
local_28 = param_3 + uVar2;
local_20 = param_2;
local_14 = param_1;
if ((*(ushort *)(param_2 + 10) & 0x2e) == 0) {
uVar2 = (uint)*(ushort *)(param_2 + 0x12) + param_1;
*param_5 = (uint)*(ushort *)(param_2 + 0x12);
pbVar4 = local_28 + (uVar3 / (uVar2 * 2)) * uVar2;
*param_6 = pbVar4 + uVar2;
memcpy(param_4,pbVar4,(ulong)uVar2);
local_10 = pbVar4;
}
else {
pbVar4 = local_28 + ((ulong)(uVar3 >> 1) - (ulong)uVar2);
*param_4 = 0;
do {
pbVar1 = local_28;
uVar2 = (**(code **)(local_20 + 0x48))(local_20,local_14,&local_28,param_4);
if (uVar2 == 0) {
return (byte *)0x0;
}
} while (local_28 < pbVar4);
*param_5 = uVar2;
*param_6 = local_28;
local_10 = pbVar1;
}
return local_10;
}
|
|
6,356 | mi_find_half_pos | eloqsql/storage/myisam/mi_write.c | uchar *_mi_find_half_pos(uint nod_flag, MI_KEYDEF *keyinfo, uchar *page,
uchar *key, uint *return_key_length,
uchar **after_key)
{
uint keys,length,key_ref_length;
uchar *end,*lastpos;
DBUG_ENTER("_mi_find_half_pos");
key_ref_length=2+nod_flag;
length=mi_getint(page)-key_ref_length;
page+=key_ref_length;
if (!(keyinfo->flag &
(HA_PACK_KEY | HA_SPACE_PACK_USED | HA_VAR_LENGTH_KEY |
HA_BINARY_PACK_KEY)))
{
key_ref_length=keyinfo->keylength+nod_flag;
keys=length/(key_ref_length*2);
*return_key_length=keyinfo->keylength;
end=page+keys*key_ref_length;
*after_key=end+key_ref_length;
memcpy(key,end,key_ref_length);
DBUG_RETURN(end);
}
end=page+length/2-key_ref_length; /* This is aprox. half */
*key='\0';
do
{
lastpos=page;
if (!(length=(*keyinfo->get_key)(keyinfo,nod_flag,&page,key)))
DBUG_RETURN(0);
} while (page < end);
*return_key_length=length;
*after_key=page;
DBUG_PRINT("exit",("returns: %p page: %p half: %p",
lastpos, page, end));
DBUG_RETURN(lastpos);
} | O3 | c | mi_find_half_pos:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rdx, %r12
movq %rsi, %r11
movl %edi, %r10d
leal 0x2(%r10), %esi
movzbl 0x1(%rdx), %edx
movzbl (%r12), %eax
andl $0x7f, %eax
shll $0x8, %eax
orl %edx, %eax
subl %esi, %eax
addq %rsi, %r12
movq %r12, -0x30(%rbp)
testb $0x2e, 0xa(%r11)
je 0x89436
movq %r8, -0x38(%rbp)
movq %r9, -0x40(%rbp)
shrl %eax
addq %r12, %rax
subq %rsi, %rax
movq %rax, -0x48(%rbp)
movb $0x0, (%rcx)
movq %r12, %r14
movq %r11, %rdi
movq %r10, %rbx
movl %r10d, %esi
leaq -0x30(%rbp), %rdx
movq %rcx, %r15
movq %r11, %r13
callq *0x48(%r11)
testl %eax, %eax
je 0x8946a
movq -0x30(%rbp), %r12
cmpq -0x48(%rbp), %r12
movq %r15, %rcx
movq %rbx, %r10
movq %r13, %r11
jb 0x893f6
movq -0x38(%rbp), %rcx
movl %eax, (%rcx)
movq -0x40(%rbp), %rax
movq %r12, (%rax)
jmp 0x8946d
movzwl 0x12(%r11), %edi
addl %edi, %r10d
leal (%r10,%r10), %esi
xorl %edx, %edx
divl %esi
movl %edi, (%r8)
imull %r10d, %eax
addq %rax, %r12
leaq (%r12,%r10), %rax
movq %rax, (%r9)
movq %rcx, %rdi
movq %r12, %rsi
movq %r10, %rdx
callq 0x29080
movq %r12, %r14
jmp 0x8946d
xorl %r14d, %r14d
movq %r14, %rax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| _mi_find_half_pos:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 28h
mov r12, rdx
mov r11, rsi
mov r10d, edi
lea esi, [r10+2]
movzx edx, byte ptr [rdx+1]
movzx eax, byte ptr [r12]
and eax, 7Fh
shl eax, 8
or eax, edx
sub eax, esi
add r12, rsi
mov [rbp+var_30], r12
test byte ptr [r11+0Ah], 2Eh
jz short loc_89436
mov [rbp+var_38], r8
mov [rbp+var_40], r9
shr eax, 1
add rax, r12
sub rax, rsi
mov [rbp+var_48], rax
mov byte ptr [rcx], 0
loc_893F6:
mov r14, r12
mov rdi, r11
mov rbx, r10
mov esi, r10d
lea rdx, [rbp+var_30]
mov r15, rcx
mov r13, r11
call qword ptr [r11+48h]
test eax, eax
jz short loc_8946A
mov r12, [rbp+var_30]
cmp r12, [rbp+var_48]
mov rcx, r15
mov r10, rbx
mov r11, r13
jb short loc_893F6
mov rcx, [rbp+var_38]
mov [rcx], eax
mov rax, [rbp+var_40]
mov [rax], r12
jmp short loc_8946D
loc_89436:
movzx edi, word ptr [r11+12h]
add r10d, edi
lea esi, [r10+r10]
xor edx, edx
div esi
mov [r8], edi
imul eax, r10d
add r12, rax
lea rax, [r12+r10]
mov [r9], rax
mov rdi, rcx
mov rsi, r12
mov rdx, r10
call _memcpy
mov r14, r12
jmp short loc_8946D
loc_8946A:
xor r14d, r14d
loc_8946D:
mov rax, r14
add rsp, 28h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| _BYTE * mi_find_half_pos(unsigned int a1, long long a2, _BYTE *a3, _BYTE *a4, _DWORD *a5, _QWORD *a6)
{
long long v7; // r10
long long v8; // rsi
unsigned int v9; // eax
_BYTE *v10; // r12
_BYTE *v11; // r14
long long v12; // rbx
_BYTE *v13; // r15
long long v14; // r13
int v15; // eax
int v16; // edi
long long v17; // r10
_BYTE *v18; // r12
_BYTE *v20; // [rsp+8h] [rbp-48h]
_BYTE *v23; // [rsp+20h] [rbp-30h] BYREF
v7 = a1;
v8 = a1 + 2;
v9 = ((unsigned __int8)a3[1] | ((*a3 & 0x7F) << 8)) - v8;
v10 = &a3[v8];
v23 = &a3[v8];
if ( (*(_BYTE *)(a2 + 10) & 0x2E) != 0 )
{
v20 = &a3[v9 >> 1];
*a4 = 0;
while ( 1 )
{
v11 = v10;
v12 = v7;
v13 = a4;
v14 = a2;
v15 = (*(long long ( **)(long long, _QWORD, _BYTE **))(a2 + 72))(a2, (unsigned int)v7, &v23);
if ( !v15 )
break;
v10 = v23;
a4 = v13;
v7 = v12;
a2 = v14;
if ( v23 >= v20 )
{
*a5 = v15;
*a6 = v10;
return v11;
}
}
return 0LL;
}
else
{
v16 = *(unsigned __int16 *)(a2 + 18);
v17 = (unsigned int)(v16 + v7);
*a5 = v16;
v18 = &v10[(unsigned int)v17 * (v9 / (2 * (int)v17))];
*a6 = &v18[v17];
memcpy(a4, v18, v17);
return v18;
}
}
| _mi_find_half_pos:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x28
MOV R12,RDX
MOV R11,RSI
MOV R10D,EDI
LEA ESI,[R10 + 0x2]
MOVZX EDX,byte ptr [RDX + 0x1]
MOVZX EAX,byte ptr [R12]
AND EAX,0x7f
SHL EAX,0x8
OR EAX,EDX
SUB EAX,ESI
ADD R12,RSI
MOV qword ptr [RBP + -0x30],R12
TEST byte ptr [R11 + 0xa],0x2e
JZ 0x00189436
MOV qword ptr [RBP + -0x38],R8
MOV qword ptr [RBP + -0x40],R9
SHR EAX,0x1
ADD RAX,R12
SUB RAX,RSI
MOV qword ptr [RBP + -0x48],RAX
MOV byte ptr [RCX],0x0
LAB_001893f6:
MOV R14,R12
MOV RDI,R11
MOV RBX,R10
MOV ESI,R10D
LEA RDX,[RBP + -0x30]
MOV R15,RCX
MOV R13,R11
CALL qword ptr [R11 + 0x48]
TEST EAX,EAX
JZ 0x0018946a
MOV R12,qword ptr [RBP + -0x30]
CMP R12,qword ptr [RBP + -0x48]
MOV RCX,R15
MOV R10,RBX
MOV R11,R13
JC 0x001893f6
MOV RCX,qword ptr [RBP + -0x38]
MOV dword ptr [RCX],EAX
MOV RAX,qword ptr [RBP + -0x40]
MOV qword ptr [RAX],R12
JMP 0x0018946d
LAB_00189436:
MOVZX EDI,word ptr [R11 + 0x12]
ADD R10D,EDI
LEA ESI,[R10 + R10*0x1]
XOR EDX,EDX
DIV ESI
MOV dword ptr [R8],EDI
IMUL EAX,R10D
ADD R12,RAX
LEA RAX,[R12 + R10*0x1]
MOV qword ptr [R9],RAX
MOV RDI,RCX
MOV RSI,R12
MOV RDX,R10
CALL 0x00129080
MOV R14,R12
JMP 0x0018946d
LAB_0018946a:
XOR R14D,R14D
LAB_0018946d:
MOV RAX,R14
ADD RSP,0x28
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
byte * _mi_find_half_pos(int param_1,long param_2,byte *param_3,int1 *param_4,uint *param_5,
long *param_6)
{
uint uVar1;
byte *pbVar2;
uint uVar3;
byte *__src;
byte *local_38;
uVar3 = param_1 + 2;
uVar1 = ((*param_3 & 0x7f) << 8 | (uint)param_3[1]) - uVar3;
local_38 = param_3 + uVar3;
if ((*(byte *)(param_2 + 10) & 0x2e) == 0) {
uVar3 = param_1 + (uint)*(ushort *)(param_2 + 0x12);
*param_5 = (uint)*(ushort *)(param_2 + 0x12);
__src = local_38 + (uVar1 / (uVar3 * 2)) * uVar3;
*param_6 = (long)(__src + uVar3);
memcpy(param_4,__src,(ulong)uVar3);
}
else {
pbVar2 = local_38 + ((ulong)(uVar1 >> 1) - (ulong)uVar3);
*param_4 = 0;
do {
__src = local_38;
uVar1 = (**(code **)(param_2 + 0x48))(param_2,param_1,&local_38,param_4);
if (uVar1 == 0) {
return (byte *)0x0;
}
} while (local_38 < pbVar2);
*param_5 = uVar1;
*param_6 = (long)local_38;
}
return __src;
}
|
|
6,357 | testing::internal::XmlUnitTestResultPrinter::XmlUnitTestResultPrinter(char const*) | AlayaLite/build_O0/_deps/googletest-src/googletest/src/gtest.cc | XmlUnitTestResultPrinter::XmlUnitTestResultPrinter(const char* output_file)
: output_file_(output_file) {
if (output_file_.empty()) {
GTEST_LOG_(FATAL) << "XML output file may not be null";
}
} | O0 | cpp | testing::internal::XmlUnitTestResultPrinter::XmlUnitTestResultPrinter(char const*):
subq $0x58, %rsp
movq %rdi, 0x50(%rsp)
movq %rsi, 0x48(%rsp)
movq 0x50(%rsp), %rdi
movq %rdi, 0x10(%rsp)
callq 0xe93a0
movq 0x10(%rsp), %rax
leaq 0xabdaf(%rip), %rcx # 0x176c58
addq $0x10, %rcx
movq %rcx, (%rax)
addq $0x8, %rax
movq %rax, 0x18(%rsp)
movq 0x48(%rsp), %rax
movq %rax, 0x20(%rsp)
leaq 0x47(%rsp), %rdi
movq %rdi, 0x28(%rsp)
callq 0x14c90
movq 0x18(%rsp), %rdi
movq 0x20(%rsp), %rsi
movq 0x28(%rsp), %rdx
callq 0x1a6a0
jmp 0xcaee8
leaq 0x47(%rsp), %rdi
callq 0x14750
movq 0x10(%rsp), %rdi
addq $0x8, %rdi
callq 0x39260
testb $0x1, %al
jne 0xcaf09
jmp 0xcaf9a
leaq 0x47f96(%rip), %rdx # 0x112ea6
leaq 0x30(%rsp), %rdi
movl $0x3, %esi
movl $0xfb0, %ecx # imm = 0xFB0
callq 0xb9070
jmp 0xcaf26
leaq 0x30(%rsp), %rdi
callq 0x1ea10
movq %rax, 0x8(%rsp)
jmp 0xcaf37
movq 0x8(%rsp), %rdi
leaq 0x48c1d(%rip), %rsi # 0x113b60
callq 0x146a0
jmp 0xcaf4a
leaq 0x30(%rsp), %rdi
callq 0xb91e0
jmp 0xcaf9a
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x38(%rsp)
movl %eax, 0x34(%rsp)
leaq 0x47(%rsp), %rdi
callq 0x14750
jmp 0xcafa9
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x38(%rsp)
movl %eax, 0x34(%rsp)
jmp 0xcaf9f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x38(%rsp)
movl %eax, 0x34(%rsp)
leaq 0x30(%rsp), %rdi
callq 0xb91e0
jmp 0xcaf9f
addq $0x58, %rsp
retq
movq 0x18(%rsp), %rdi
callq 0x1aac0
movq 0x10(%rsp), %rdi
callq 0xf5d70
movq 0x38(%rsp), %rdi
callq 0x14c80
nopl (%rax)
| _ZN7testing8internal24XmlUnitTestResultPrinterC2EPKc:
sub rsp, 58h
mov [rsp+58h+var_8], rdi
mov qword ptr [rsp+58h+var_11+1], rsi; char
mov rdi, [rsp+58h+var_8]; this
mov qword ptr [rsp+58h+var_48], rdi; int
call _ZN7testing22EmptyTestEventListenerC2Ev; testing::EmptyTestEventListener::EmptyTestEventListener(void)
mov rax, qword ptr [rsp+58h+var_48]
lea rcx, _ZTVN7testing8internal24XmlUnitTestResultPrinterE; `vtable for'testing::internal::XmlUnitTestResultPrinter
add rcx, 10h
mov [rax], rcx
add rax, 8
mov qword ptr [rsp+58h+var_40], rax; int
mov rax, qword ptr [rsp+58h+var_11+1]
mov qword ptr [rsp+58h+var_38], rax; int
lea rdi, [rsp+58h+var_11]
mov qword ptr [rsp+58h+var_30], rdi; int
call __ZNSaIcEC1Ev; std::allocator<char>::allocator(void)
mov rdi, qword ptr [rsp+58h+var_40]
mov rsi, qword ptr [rsp+58h+var_38]
mov rdx, qword ptr [rsp+58h+var_30]
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&)
jmp short $+2
loc_CAEE8:
lea rdi, [rsp+58h+var_11]
call __ZNSaIcED1Ev; std::allocator<char>::~allocator()
mov rdi, qword ptr [rsp+58h+var_48]
add rdi, 8
call _ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5emptyEv; std::string::empty(void)
test al, 1
jnz short loc_CAF09
jmp loc_CAF9A
loc_CAF09:
lea rdx, aWorkspaceLlm4b_9; "/workspace/llm4binary/github2025/AlayaL"...
lea rdi, [rsp+58h+var_28]; int
mov esi, 3
mov ecx, 0FB0h
call _ZN7testing8internal8GTestLogC2ENS0_16GTestLogSeverityEPKci; testing::internal::GTestLog::GTestLog(testing::internal::GTestLogSeverity,char const*,int)
jmp short $+2
loc_CAF26:
lea rdi, [rsp+58h+var_28]; this
call _ZN7testing8internal8GTestLog9GetStreamEv; testing::internal::GTestLog::GetStream(void)
mov [rsp+58h+var_50], rax
jmp short $+2
loc_CAF37:
mov rdi, [rsp+58h+var_50]
lea rsi, aXmlOutputFileM; "XML output file may not be null"
call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*)
jmp short $+2
loc_CAF4A:
lea rdi, [rsp+58h+var_28]; this
call _ZN7testing8internal8GTestLogD2Ev; testing::internal::GTestLog::~GTestLog()
jmp short loc_CAF9A
mov rcx, rax
mov eax, edx
mov [rsp+arg_30], rcx
mov [rsp+arg_2C], eax
lea rdi, [rsp+arg_3F]
call __ZNSaIcED1Ev; std::allocator<char>::~allocator()
jmp short loc_CAFA9
mov rcx, rax
mov eax, edx
mov [rsp+arg_30], rcx
mov [rsp+arg_2C], eax
jmp short loc_CAF9F
mov rcx, rax
mov eax, edx
mov [rsp+arg_30], rcx
mov [rsp+arg_2C], eax
lea rdi, [rsp+arg_28]; this
call _ZN7testing8internal8GTestLogD2Ev; testing::internal::GTestLog::~GTestLog()
jmp short loc_CAF9F
loc_CAF9A:
add rsp, 58h
retn
loc_CAF9F:
mov rdi, [rsp+arg_10]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
loc_CAFA9:
mov rdi, [rsp+arg_8]; this
call _ZN7testing22EmptyTestEventListenerD2Ev; testing::EmptyTestEventListener::~EmptyTestEventListener()
mov rdi, [rsp+arg_30]
call __Unwind_Resume
| void testing::internal::XmlUnitTestResultPrinter::XmlUnitTestResultPrinter(
testing::internal::XmlUnitTestResultPrinter *this,
const char *a2)
{
void *Stream; // [rsp+8h] [rbp-50h]
const char *v3; // [rsp+20h] [rbp-38h]
int v4[5]; // [rsp+30h] [rbp-28h] BYREF
_BYTE v5[9]; // [rsp+47h] [rbp-11h] BYREF
testing::EmptyTestEventListener *v6; // [rsp+50h] [rbp-8h]
v6 = this;
*(_QWORD *)&v5[1] = a2;
testing::EmptyTestEventListener::EmptyTestEventListener(this);
*(_QWORD *)this = &`vtable for'testing::internal::XmlUnitTestResultPrinter + 2;
v3 = *(const char **)&v5[1];
std::allocator<char>::allocator();
std::string::basic_string<std::allocator<char>>((long long)this + 8, (long long)v3, (long long)v5);
std::allocator<char>::~allocator(v5, v3);
if ( std::string::empty((long long)this + 8) )
{
testing::internal::GTestLog::GTestLog(
(testing::internal::GTestLog *)v4,
3,
(long long)"/workspace/llm4binary/github2025/AlayaLite/build_O0/_deps/googletest-src/googletest/src/gtest.cc",
4016);
Stream = testing::internal::GTestLog::GetStream((testing::internal::GTestLog *)v4);
std::operator<<<std::char_traits<char>>(Stream, "XML output file may not be null");
testing::internal::GTestLog::~GTestLog((testing::internal::GTestLog *)v4);
}
}
| XmlUnitTestResultPrinter:
SUB RSP,0x58
MOV qword ptr [RSP + 0x50],RDI
MOV qword ptr [RSP + 0x48],RSI
MOV RDI,qword ptr [RSP + 0x50]
MOV qword ptr [RSP + 0x10],RDI
CALL 0x001e93a0
MOV RAX,qword ptr [RSP + 0x10]
LEA RCX,[0x276c58]
ADD RCX,0x10
MOV qword ptr [RAX],RCX
ADD RAX,0x8
MOV qword ptr [RSP + 0x18],RAX
MOV RAX,qword ptr [RSP + 0x48]
MOV qword ptr [RSP + 0x20],RAX
LEA RDI,[RSP + 0x47]
MOV qword ptr [RSP + 0x28],RDI
CALL 0x00114c90
MOV RDI,qword ptr [RSP + 0x18]
MOV RSI,qword ptr [RSP + 0x20]
MOV RDX,qword ptr [RSP + 0x28]
LAB_001caee1:
CALL 0x0011a6a0
JMP 0x001caee8
LAB_001caee8:
LEA RDI,[RSP + 0x47]
CALL 0x00114750
MOV RDI,qword ptr [RSP + 0x10]
ADD RDI,0x8
CALL 0x00139260
TEST AL,0x1
JNZ 0x001caf09
JMP 0x001caf9a
LAB_001caf09:
LEA RDX,[0x212ea6]
LEA RDI,[RSP + 0x30]
MOV ESI,0x3
MOV ECX,0xfb0
CALL 0x001b9070
JMP 0x001caf26
LAB_001caf26:
LEA RDI,[RSP + 0x30]
CALL 0x0011ea10
MOV qword ptr [RSP + 0x8],RAX
JMP 0x001caf37
LAB_001caf37:
MOV RDI,qword ptr [RSP + 0x8]
LEA RSI,[0x213b60]
CALL 0x001146a0
LAB_001caf48:
JMP 0x001caf4a
LAB_001caf4a:
LEA RDI,[RSP + 0x30]
CALL 0x001b91e0
JMP 0x001caf9a
LAB_001caf9a:
ADD RSP,0x58
RET
|
/* testing::internal::XmlUnitTestResultPrinter::XmlUnitTestResultPrinter(char const*) */
void __thiscall
testing::internal::XmlUnitTestResultPrinter::XmlUnitTestResultPrinter
(XmlUnitTestResultPrinter *this,char *param_1)
{
char *pcVar1;
ulong uVar2;
ostream *poVar3;
GTestLog local_28 [23];
allocator local_11;
char *local_10;
XmlUnitTestResultPrinter *local_8;
local_10 = param_1;
local_8 = this;
EmptyTestEventListener::EmptyTestEventListener((EmptyTestEventListener *)this);
pcVar1 = local_10;
*(int ***)this = &PTR__XmlUnitTestResultPrinter_00276c68;
std::allocator<char>::allocator();
/* try { // try from 001caee1 to 001caee5 has its CatchHandler @ 001caf56 */
std::__cxx11::string::string<std::allocator<char>>((string *)(this + 8),pcVar1,&local_11);
std::allocator<char>::~allocator((allocator<char> *)&local_11);
uVar2 = std::__cxx11::string::empty((string *)(this + 8));
if ((uVar2 & 1) != 0) {
/* try { // try from 001caf09 to 001caf23 has its CatchHandler @ 001caf70 */
GTestLog::GTestLog(local_28,3,
"/workspace/llm4binary/github2025/AlayaLite/build_O0/_deps/googletest-src/googletest/src/gtest.cc"
,0xfb0);
/* try { // try from 001caf26 to 001caf47 has its CatchHandler @ 001caf80 */
poVar3 = (ostream *)GTestLog::GetStream();
std::operator<<(poVar3,"XML output file may not be null");
GTestLog::~GTestLog(local_28);
}
return;
}
|
|
6,358 | spdlog::sinks::ansicolor_sink<spdlog::details::console_nullmutex>::log(spdlog::details::log_msg const&) | AlayaLite/build_O0/_deps/spdlog-src/include/spdlog/sinks/ansicolor_sink-inl.h | SPDLOG_INLINE void ansicolor_sink<ConsoleMutex>::log(const details::log_msg &msg) {
// Wrap the originally formatted message in color codes.
// If color is not supported in the terminal, log as is instead.
std::lock_guard<mutex_t> lock(mutex_);
msg.color_range_start = 0;
msg.color_range_end = 0;
memory_buf_t formatted;
formatter_->format(msg, formatted);
if (should_do_colors_ && msg.color_range_end > msg.color_range_start) {
// before color range
print_range_(formatted, 0, msg.color_range_start);
// in color range
print_ccode_(colors_.at(static_cast<size_t>(msg.level)));
print_range_(formatted, msg.color_range_start, msg.color_range_end);
print_ccode_(reset);
// after color range
print_range_(formatted, msg.color_range_end, formatted.size());
} else // no color
{
print_range_(formatted, 0, formatted.size());
}
fflush(target_file_);
} | O0 | c | spdlog::sinks::ansicolor_sink<spdlog::details::console_nullmutex>::log(spdlog::details::log_msg const&):
subq $0x198, %rsp # imm = 0x198
movq %rdi, 0x190(%rsp)
movq %rsi, 0x188(%rsp)
movq 0x190(%rsp), %rax
movq %rax, 0x28(%rsp)
movq 0x1c8(%rax), %rsi
leaq 0x180(%rsp), %rdi
callq 0x40ad0
movq 0x188(%rsp), %rax
movq $0x0, 0x28(%rax)
movq 0x188(%rsp), %rax
movq $0x0, 0x30(%rax)
leaq 0x5f(%rsp), %rdi
movq %rdi, 0x30(%rsp)
callq 0x14c90
movq 0x30(%rsp), %rsi
leaq 0x60(%rsp), %rdi
callq 0x23590
jmp 0x75a58
leaq 0x5f(%rsp), %rdi
callq 0x14750
movq 0x28(%rsp), %rdi
addq $0x1d8, %rdi # imm = 0x1D8
callq 0x397a0
movq %rax, %rdi
movq 0x188(%rsp), %rsi
movq (%rdi), %rax
movq 0x10(%rax), %rax
leaq 0x60(%rsp), %rdx
callq *%rax
jmp 0x75a8e
movq 0x28(%rsp), %rax
testb $0x1, 0x1d0(%rax)
je 0x75bcb
movq 0x188(%rsp), %rax
movq 0x30(%rax), %rax
movq 0x188(%rsp), %rcx
cmpq 0x28(%rcx), %rax
jbe 0x75bcb
movq 0x28(%rsp), %rdi
movq 0x188(%rsp), %rax
movq 0x28(%rax), %rcx
xorl %eax, %eax
movl %eax, %edx
leaq 0x60(%rsp), %rsi
callq 0x75c40
jmp 0x75adf
movq 0x28(%rsp), %rdi
addq $0x1e0, %rdi # imm = 0x1E0
movq 0x188(%rsp), %rax
movslq 0x10(%rax), %rsi
callq 0x74160
movq %rax, 0x20(%rsp)
jmp 0x75b03
movq 0x20(%rsp), %rsi
leaq 0x38(%rsp), %rdi
movq %rdi, 0x18(%rsp)
callq 0x23ac0
movq 0x28(%rsp), %rdi
movq 0x18(%rsp), %rsi
callq 0x75ca0
jmp 0x75b28
movq 0x28(%rsp), %rdi
movq 0x188(%rsp), %rax
movq 0x28(%rax), %rdx
movq 0x30(%rax), %rcx
leaq 0x60(%rsp), %rsi
callq 0x75c40
jmp 0x75b49
movq 0x28(%rsp), %rdi
movq %rdi, %rsi
addq $0x10, %rsi
callq 0x75ca0
jmp 0x75b5c
movq 0x188(%rsp), %rax
movq 0x30(%rax), %rax
movq %rax, 0x10(%rsp)
leaq 0x60(%rsp), %rdi
movq %rdi, 0x8(%rsp)
callq 0x23b20
movq 0x28(%rsp), %rdi
movq 0x8(%rsp), %rsi
movq 0x10(%rsp), %rdx
movq %rax, %rcx
callq 0x75c40
jmp 0x75b95
jmp 0x75bf2
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x50(%rsp)
movl %eax, 0x4c(%rsp)
leaq 0x5f(%rsp), %rdi
callq 0x14750
jmp 0x75c24
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x50(%rsp)
movl %eax, 0x4c(%rsp)
leaq 0x60(%rsp), %rdi
callq 0x23b60
jmp 0x75c24
leaq 0x60(%rsp), %rdi
movq %rdi, (%rsp)
callq 0x23b20
movq 0x28(%rsp), %rdi
movq (%rsp), %rsi
movq %rax, %rcx
xorl %eax, %eax
movl %eax, %edx
callq 0x75c40
jmp 0x75bf0
jmp 0x75bf2
movq 0x28(%rsp), %rax
movq 0x1c0(%rax), %rdi
callq 0x14810
jmp 0x75c05
leaq 0x60(%rsp), %rdi
callq 0x23b60
leaq 0x180(%rsp), %rdi
callq 0x40b00
addq $0x198, %rsp # imm = 0x198
retq
leaq 0x180(%rsp), %rdi
callq 0x40b00
movq 0x50(%rsp), %rdi
callq 0x14c80
nopl (%rax,%rax)
| _ZN6spdlog5sinks14ansicolor_sinkINS_7details17console_nullmutexEE3logERKNS2_7log_msgE:
sub rsp, 198h
mov [rsp+198h+var_8], rdi
mov [rsp+198h+var_10], rsi
mov rax, [rsp+198h+var_8]
mov [rsp+198h+var_170], rax
mov rsi, [rax+1C8h]
lea rdi, [rsp+198h+var_18]
call _ZNSt10lock_guardIN6spdlog7details10null_mutexEEC2ERS2_; std::lock_guard<spdlog::details::null_mutex>::lock_guard(spdlog::details::null_mutex&)
mov rax, [rsp+198h+var_10]
mov qword ptr [rax+28h], 0
mov rax, [rsp+198h+var_10]
mov qword ptr [rax+30h], 0
lea rdi, [rsp+198h+var_139]
mov [rsp+198h+var_168], rdi
call __ZNSaIcEC1Ev; std::allocator<char>::allocator(void)
mov rsi, [rsp+198h+var_168]
lea rdi, [rsp+198h+var_138]
call _ZN3fmt3v1019basic_memory_bufferIcLm250ESaIcEEC2ERKS2_; fmt::v10::basic_memory_buffer<char,250ul,std::allocator<char>>::basic_memory_buffer(std::allocator<char> const&)
jmp short $+2
loc_75A58:
lea rdi, [rsp+198h+var_139]
call __ZNSaIcED1Ev; std::allocator<char>::~allocator()
mov rdi, [rsp+198h+var_170]
add rdi, 1D8h
call _ZNKSt10unique_ptrIN6spdlog9formatterESt14default_deleteIS1_EEptEv; std::unique_ptr<spdlog::formatter>::operator->(void)
mov rdi, rax
mov rsi, [rsp+198h+var_10]
mov rax, [rdi]
mov rax, [rax+10h]
lea rdx, [rsp+198h+var_138]
call rax
jmp short $+2
loc_75A8E:
mov rax, [rsp+198h+var_170]
test byte ptr [rax+1D0h], 1
jz loc_75BCB
mov rax, [rsp+198h+var_10]
mov rax, [rax+30h]
mov rcx, [rsp+198h+var_10]
cmp rax, [rcx+28h]
jbe loc_75BCB
mov rdi, [rsp+198h+var_170]
mov rax, [rsp+198h+var_10]
mov rcx, [rax+28h]
xor eax, eax
mov edx, eax
lea rsi, [rsp+198h+var_138]
call _ZN6spdlog5sinks14ansicolor_sinkINS_7details17console_nullmutexEE12print_range_ERKN3fmt3v1019basic_memory_bufferIcLm250ESaIcEEEmm; spdlog::sinks::ansicolor_sink<spdlog::details::console_nullmutex>::print_range_(fmt::v10::basic_memory_buffer<char,250ul,std::allocator<char>> const&,ulong,ulong)
jmp short $+2
loc_75ADF:
mov rdi, [rsp+198h+var_170]
add rdi, 1E0h
mov rax, [rsp+198h+var_10]
movsxd rsi, dword ptr [rax+10h]
call _ZNSt5arrayINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEELm7EE2atEm; std::array<std::string,7ul>::at(ulong)
mov [rsp+198h+var_178], rax
jmp short $+2
loc_75B03:
mov rsi, [rsp+198h+var_178]
lea rdi, [rsp+198h+var_160]
mov [rsp+198h+var_180], rdi
call _ZN3fmt3v1017basic_string_viewIcEC2ISt11char_traitsIcESaIcEEERKNSt7__cxx1112basic_stringIcT_T0_EE; fmt::v10::basic_string_view<char>::basic_string_view<std::char_traits<char>,std::allocator<char>>(std::string const&)
mov rdi, [rsp+198h+var_170]
mov rsi, [rsp+198h+var_180]
call _ZN6spdlog5sinks14ansicolor_sinkINS_7details17console_nullmutexEE12print_ccode_ERKN3fmt3v1017basic_string_viewIcEE; spdlog::sinks::ansicolor_sink<spdlog::details::console_nullmutex>::print_ccode_(fmt::v10::basic_string_view<char> const&)
jmp short $+2
loc_75B28:
mov rdi, [rsp+198h+var_170]
mov rax, [rsp+198h+var_10]
mov rdx, [rax+28h]
mov rcx, [rax+30h]
lea rsi, [rsp+198h+var_138]
call _ZN6spdlog5sinks14ansicolor_sinkINS_7details17console_nullmutexEE12print_range_ERKN3fmt3v1019basic_memory_bufferIcLm250ESaIcEEEmm; spdlog::sinks::ansicolor_sink<spdlog::details::console_nullmutex>::print_range_(fmt::v10::basic_memory_buffer<char,250ul,std::allocator<char>> const&,ulong,ulong)
jmp short $+2
loc_75B49:
mov rdi, [rsp+198h+var_170]
mov rsi, rdi
add rsi, 10h
call _ZN6spdlog5sinks14ansicolor_sinkINS_7details17console_nullmutexEE12print_ccode_ERKN3fmt3v1017basic_string_viewIcEE; spdlog::sinks::ansicolor_sink<spdlog::details::console_nullmutex>::print_ccode_(fmt::v10::basic_string_view<char> const&)
jmp short $+2
loc_75B5C:
mov rax, [rsp+198h+var_10]
mov rax, [rax+30h]
mov [rsp+198h+var_188], rax
lea rdi, [rsp+198h+var_138]
mov [rsp+198h+var_190], rdi
call _ZNK3fmt3v106detail6bufferIcE4sizeEv; fmt::v10::detail::buffer<char>::size(void)
mov rdi, [rsp+198h+var_170]
mov rsi, [rsp+198h+var_190]
mov rdx, [rsp+198h+var_188]
mov rcx, rax
call _ZN6spdlog5sinks14ansicolor_sinkINS_7details17console_nullmutexEE12print_range_ERKN3fmt3v1019basic_memory_bufferIcLm250ESaIcEEEmm; spdlog::sinks::ansicolor_sink<spdlog::details::console_nullmutex>::print_range_(fmt::v10::basic_memory_buffer<char,250ul,std::allocator<char>> const&,ulong,ulong)
jmp short $+2
loc_75B95:
jmp short loc_75BF2
mov rcx, rax
mov eax, edx
mov [rsp+arg_48], rcx
mov [rsp+arg_44], eax
lea rdi, [rsp+arg_57]
call __ZNSaIcED1Ev; std::allocator<char>::~allocator()
jmp short loc_75C24
mov rcx, rax
mov eax, edx
mov [rsp+arg_48], rcx
mov [rsp+arg_44], eax
lea rdi, [rsp+arg_58]
call _ZN3fmt3v1019basic_memory_bufferIcLm250ESaIcEED2Ev; fmt::v10::basic_memory_buffer<char,250ul,std::allocator<char>>::~basic_memory_buffer()
jmp short loc_75C24
loc_75BCB:
lea rdi, [rsp+198h+var_138]
mov [rsp+198h+var_198], rdi
call _ZNK3fmt3v106detail6bufferIcE4sizeEv; fmt::v10::detail::buffer<char>::size(void)
mov rdi, [rsp+198h+var_170]
mov rsi, [rsp+198h+var_198]
mov rcx, rax
xor eax, eax
mov edx, eax
call _ZN6spdlog5sinks14ansicolor_sinkINS_7details17console_nullmutexEE12print_range_ERKN3fmt3v1019basic_memory_bufferIcLm250ESaIcEEEmm; spdlog::sinks::ansicolor_sink<spdlog::details::console_nullmutex>::print_range_(fmt::v10::basic_memory_buffer<char,250ul,std::allocator<char>> const&,ulong,ulong)
jmp short $+2
loc_75BF0:
jmp short $+2
loc_75BF2:
mov rax, [rsp+198h+var_170]
mov rdi, [rax+1C0h]
call _fflush
jmp short $+2
loc_75C05:
lea rdi, [rsp+198h+var_138]
call _ZN3fmt3v1019basic_memory_bufferIcLm250ESaIcEED2Ev; fmt::v10::basic_memory_buffer<char,250ul,std::allocator<char>>::~basic_memory_buffer()
lea rdi, [rsp+198h+var_18]
call _ZNSt10lock_guardIN6spdlog7details10null_mutexEED2Ev; std::lock_guard<spdlog::details::null_mutex>::~lock_guard()
add rsp, 198h
retn
loc_75C24:
lea rdi, [rsp+arg_178]
call _ZNSt10lock_guardIN6spdlog7details10null_mutexEED2Ev; std::lock_guard<spdlog::details::null_mutex>::~lock_guard()
mov rdi, [rsp+arg_48]
call __Unwind_Resume
| spdlog::details::null_mutex ** spdlog::sinks::ansicolor_sink<spdlog::details::console_nullmutex>::log(
long long a1,
long long a2)
{
long long v2; // rax
long long v3; // rax
long long v4; // rax
long long v6; // [rsp+10h] [rbp-188h]
long long v7; // [rsp+20h] [rbp-178h]
long long v8[4]; // [rsp+38h] [rbp-160h] BYREF
char v9; // [rsp+5Fh] [rbp-139h] BYREF
_QWORD v10[36]; // [rsp+60h] [rbp-138h] BYREF
spdlog::details::null_mutex *v11; // [rsp+180h] [rbp-18h] BYREF
long long v12; // [rsp+188h] [rbp-10h]
long long v13; // [rsp+190h] [rbp-8h]
v13 = a1;
v12 = a2;
std::lock_guard<spdlog::details::null_mutex>::lock_guard(&v11, *(spdlog::details::null_mutex **)(a1 + 456));
*(_QWORD *)(v12 + 40) = 0LL;
*(_QWORD *)(v12 + 48) = 0LL;
std::allocator<char>::allocator();
fmt::v10::basic_memory_buffer<char,250ul,std::allocator<char>>::basic_memory_buffer(v10, (long long)&v9);
std::allocator<char>::~allocator(&v9, &v9);
v2 = std::unique_ptr<spdlog::formatter>::operator->(a1 + 472);
(*(void ( **)(long long, long long, _QWORD *))(*(_QWORD *)v2 + 16LL))(v2, v12, v10);
if ( (*(_BYTE *)(a1 + 464) & 1) != 0 && *(_QWORD *)(v12 + 48) > *(_QWORD *)(v12 + 40) )
{
spdlog::sinks::ansicolor_sink<spdlog::details::console_nullmutex>::print_range_(a1, v10, 0LL, *(_QWORD *)(v12 + 40));
v7 = std::array<std::string,7ul>::at(a1 + 480, *(int *)(v12 + 16));
fmt::v10::basic_string_view<char>::basic_string_view<std::char_traits<char>,std::allocator<char>>(v8, v7);
spdlog::sinks::ansicolor_sink<spdlog::details::console_nullmutex>::print_ccode_(a1, v8);
spdlog::sinks::ansicolor_sink<spdlog::details::console_nullmutex>::print_range_(
a1,
v10,
*(_QWORD *)(v12 + 40),
*(_QWORD *)(v12 + 48));
spdlog::sinks::ansicolor_sink<spdlog::details::console_nullmutex>::print_ccode_(a1, a1 + 16);
v6 = *(_QWORD *)(v12 + 48);
v3 = fmt::v10::detail::buffer<char>::size((long long)v10);
spdlog::sinks::ansicolor_sink<spdlog::details::console_nullmutex>::print_range_(a1, v10, v6, v3);
}
else
{
v4 = fmt::v10::detail::buffer<char>::size((long long)v10);
spdlog::sinks::ansicolor_sink<spdlog::details::console_nullmutex>::print_range_(a1, v10, 0LL, v4);
}
fflush(*(_QWORD *)(a1 + 448));
fmt::v10::basic_memory_buffer<char,250ul,std::allocator<char>>::~basic_memory_buffer((long long)v10, (long long)v10);
return std::lock_guard<spdlog::details::null_mutex>::~lock_guard(&v11);
}
| log:
SUB RSP,0x198
MOV qword ptr [RSP + 0x190],RDI
MOV qword ptr [RSP + 0x188],RSI
MOV RAX,qword ptr [RSP + 0x190]
MOV qword ptr [RSP + 0x28],RAX
MOV RSI,qword ptr [RAX + 0x1c8]
LEA RDI,[RSP + 0x180]
CALL 0x00140ad0
MOV RAX,qword ptr [RSP + 0x188]
MOV qword ptr [RAX + 0x28],0x0
MOV RAX,qword ptr [RSP + 0x188]
MOV qword ptr [RAX + 0x30],0x0
LEA RDI,[RSP + 0x5f]
MOV qword ptr [RSP + 0x30],RDI
CALL 0x00114c90
MOV RSI,qword ptr [RSP + 0x30]
LAB_00175a4c:
LEA RDI,[RSP + 0x60]
CALL 0x00123590
JMP 0x00175a58
LAB_00175a58:
LEA RDI,[RSP + 0x5f]
CALL 0x00114750
MOV RDI,qword ptr [RSP + 0x28]
ADD RDI,0x1d8
CALL 0x001397a0
MOV RDI,RAX
MOV RSI,qword ptr [RSP + 0x188]
MOV RAX,qword ptr [RDI]
MOV RAX,qword ptr [RAX + 0x10]
LAB_00175a85:
LEA RDX,[RSP + 0x60]
CALL RAX
JMP 0x00175a8e
LAB_00175a8e:
MOV RAX,qword ptr [RSP + 0x28]
TEST byte ptr [RAX + 0x1d0],0x1
JZ 0x00175bcb
MOV RAX,qword ptr [RSP + 0x188]
MOV RAX,qword ptr [RAX + 0x30]
MOV RCX,qword ptr [RSP + 0x188]
CMP RAX,qword ptr [RCX + 0x28]
JBE 0x00175bcb
MOV RDI,qword ptr [RSP + 0x28]
MOV RAX,qword ptr [RSP + 0x188]
MOV RCX,qword ptr [RAX + 0x28]
XOR EAX,EAX
MOV EDX,EAX
LEA RSI,[RSP + 0x60]
CALL 0x00175c40
JMP 0x00175adf
LAB_00175adf:
MOV RDI,qword ptr [RSP + 0x28]
ADD RDI,0x1e0
MOV RAX,qword ptr [RSP + 0x188]
MOVSXD RSI,dword ptr [RAX + 0x10]
CALL 0x00174160
MOV qword ptr [RSP + 0x20],RAX
JMP 0x00175b03
LAB_00175b03:
MOV RSI,qword ptr [RSP + 0x20]
LEA RDI,[RSP + 0x38]
MOV qword ptr [RSP + 0x18],RDI
CALL 0x00123ac0
MOV RDI,qword ptr [RSP + 0x28]
MOV RSI,qword ptr [RSP + 0x18]
CALL 0x00175ca0
JMP 0x00175b28
LAB_00175b28:
MOV RDI,qword ptr [RSP + 0x28]
MOV RAX,qword ptr [RSP + 0x188]
MOV RDX,qword ptr [RAX + 0x28]
MOV RCX,qword ptr [RAX + 0x30]
LEA RSI,[RSP + 0x60]
CALL 0x00175c40
JMP 0x00175b49
LAB_00175b49:
MOV RDI,qword ptr [RSP + 0x28]
MOV RSI,RDI
ADD RSI,0x10
CALL 0x00175ca0
JMP 0x00175b5c
LAB_00175b5c:
MOV RAX,qword ptr [RSP + 0x188]
MOV RAX,qword ptr [RAX + 0x30]
MOV qword ptr [RSP + 0x10],RAX
LEA RDI,[RSP + 0x60]
MOV qword ptr [RSP + 0x8],RDI
CALL 0x00123b20
MOV RDI,qword ptr [RSP + 0x28]
MOV RSI,qword ptr [RSP + 0x8]
MOV RDX,qword ptr [RSP + 0x10]
MOV RCX,RAX
CALL 0x00175c40
JMP 0x00175b95
LAB_00175b95:
JMP 0x00175bf2
LAB_00175bcb:
LEA RDI,[RSP + 0x60]
MOV qword ptr [RSP],RDI
CALL 0x00123b20
MOV RDI,qword ptr [RSP + 0x28]
MOV RSI,qword ptr [RSP]
MOV RCX,RAX
XOR EAX,EAX
MOV EDX,EAX
CALL 0x00175c40
JMP 0x00175bf0
LAB_00175bf0:
JMP 0x00175bf2
LAB_00175bf2:
MOV RAX,qword ptr [RSP + 0x28]
MOV RDI,qword ptr [RAX + 0x1c0]
CALL 0x00114810
LAB_00175c03:
JMP 0x00175c05
LAB_00175c05:
LEA RDI,[RSP + 0x60]
CALL 0x00123b60
LEA RDI,[RSP + 0x180]
CALL 0x00140b00
ADD RSP,0x198
RET
|
/* spdlog::sinks::ansicolor_sink<spdlog::details::console_nullmutex>::log(spdlog::details::log_msg
const&) */
void __thiscall
spdlog::sinks::ansicolor_sink<spdlog::details::console_nullmutex>::log
(ansicolor_sink<spdlog::details::console_nullmutex> *this,log_msg *param_1)
{
long *plVar1;
string *psVar2;
ulong uVar3;
ulong uVar4;
basic_string_view<char> local_160 [39];
allocator<char> local_139;
allocator local_138 [288];
lock_guard<spdlog::details::null_mutex> local_18 [8];
log_msg *local_10;
ansicolor_sink<spdlog::details::console_nullmutex> *local_8;
local_10 = param_1;
local_8 = this;
std::lock_guard<spdlog::details::null_mutex>::lock_guard(local_18,*(null_mutex **)(this + 0x1c8));
*(int8 *)(local_10 + 0x28) = 0;
*(int8 *)(local_10 + 0x30) = 0;
std::allocator<char>::allocator();
/* try { // try from 00175a4c to 00175a55 has its CatchHandler @ 00175b97 */
fmt::v10::basic_memory_buffer<char,250ul,std::allocator<char>>::basic_memory_buffer(local_138);
std::allocator<char>::~allocator(&local_139);
plVar1 = (long *)std::unique_ptr<spdlog::formatter,std::default_delete<spdlog::formatter>>::
operator->((unique_ptr<spdlog::formatter,std::default_delete<spdlog::formatter>>
*)(this + 0x1d8));
/* try { // try from 00175a85 to 00175c02 has its CatchHandler @ 00175bb1 */
(**(code **)(*plVar1 + 0x10))(plVar1,local_10,local_138);
if ((((byte)this[0x1d0] & 1) == 0) || (*(ulong *)(local_10 + 0x30) <= *(ulong *)(local_10 + 0x28))
) {
uVar4 = fmt::v10::detail::buffer<char>::size((buffer<char> *)local_138);
print_range_(this,(basic_memory_buffer *)local_138,0,uVar4);
}
else {
print_range_(this,(basic_memory_buffer *)local_138,0,*(ulong *)(local_10 + 0x28));
psVar2 = (string *)
std::array<std::__cxx11::string,7ul>::at
((array<std::__cxx11::string,7ul> *)(this + 0x1e0),
(long)*(int *)(local_10 + 0x10));
fmt::v10::basic_string_view<char>::
basic_string_view<std::char_traits<char>,std::allocator<char>>(local_160,psVar2);
print_ccode_(this,local_160);
print_range_(this,(basic_memory_buffer *)local_138,*(ulong *)(local_10 + 0x28),
*(ulong *)(local_10 + 0x30));
print_ccode_(this,this + 0x10);
uVar4 = *(ulong *)(local_10 + 0x30);
uVar3 = fmt::v10::detail::buffer<char>::size((buffer<char> *)local_138);
print_range_(this,(basic_memory_buffer *)local_138,uVar4,uVar3);
}
fflush(*(FILE **)(this + 0x1c0));
fmt::v10::basic_memory_buffer<char,250ul,std::allocator<char>>::~basic_memory_buffer
((basic_memory_buffer<char,250ul,std::allocator<char>> *)local_138);
std::lock_guard<spdlog::details::null_mutex>::~lock_guard(local_18);
return;
}
|
|
6,359 | mult | eloqsql/strings/dtoa.c | static Bigint *mult(Bigint *a, Bigint *b, Stack_alloc *alloc)
{
Bigint *c;
int k, wa, wb, wc;
ULong *x, *xa, *xae, *xb, *xbe, *xc, *xc0;
ULong y;
ULLong carry, z;
if (a->wds < b->wds)
{
c= a;
a= b;
b= c;
}
k= a->k;
wa= a->wds;
wb= b->wds;
wc= wa + wb;
if (wc > a->maxwds)
k++;
c= Balloc(k, alloc);
for (x= c->p.x, xa= x + wc; x < xa; x++)
*x= 0;
xa= a->p.x;
xae= xa + wa;
xb= b->p.x;
xbe= xb + wb;
xc0= c->p.x;
for (; xb < xbe; xc0++)
{
if ((y= *xb++))
{
x= xa;
xc= xc0;
carry= 0;
do
{
z= *x++ * (ULLong)y + *xc + carry;
carry= z >> 32;
*xc++= (ULong) (z & FFFFFFFF);
}
while (x < xae);
*xc= (ULong) carry;
}
}
for (xc0= c->p.x, xc= xc0 + wc; wc > 0 && !*--xc; --wc) ;
c->wds= wc;
return c;
} | O0 | c | mult:
pushq %rbp
movq %rsp, %rbp
subq $0x90, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x8(%rbp), %rax
movl 0x14(%rax), %eax
movq -0x10(%rbp), %rcx
cmpl 0x14(%rcx), %eax
jge 0x711af
movq -0x8(%rbp), %rax
movq %rax, -0x20(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x20(%rbp), %rax
movq %rax, -0x10(%rbp)
movq -0x8(%rbp), %rax
movl 0x8(%rax), %eax
movl %eax, -0x24(%rbp)
movq -0x8(%rbp), %rax
movl 0x14(%rax), %eax
movl %eax, -0x28(%rbp)
movq -0x10(%rbp), %rax
movl 0x14(%rax), %eax
movl %eax, -0x2c(%rbp)
movl -0x28(%rbp), %eax
addl -0x2c(%rbp), %eax
movl %eax, -0x30(%rbp)
movl -0x30(%rbp), %eax
movq -0x8(%rbp), %rcx
cmpl 0xc(%rcx), %eax
jle 0x711eb
movl -0x24(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x24(%rbp)
movl -0x24(%rbp), %edi
movq -0x18(%rbp), %rsi
callq 0x70d10
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x38(%rbp)
movq -0x38(%rbp), %rax
movslq -0x30(%rbp), %rcx
shlq $0x2, %rcx
addq %rcx, %rax
movq %rax, -0x40(%rbp)
movq -0x38(%rbp), %rax
cmpq -0x40(%rbp), %rax
jae 0x7123b
movq -0x38(%rbp), %rax
movl $0x0, (%rax)
movq -0x38(%rbp), %rax
addq $0x4, %rax
movq %rax, -0x38(%rbp)
jmp 0x71219
movq -0x8(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x40(%rbp)
movq -0x40(%rbp), %rax
movslq -0x28(%rbp), %rcx
shlq $0x2, %rcx
addq %rcx, %rax
movq %rax, -0x48(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x50(%rbp)
movq -0x50(%rbp), %rax
movslq -0x2c(%rbp), %rcx
shlq $0x2, %rcx
addq %rcx, %rax
movq %rax, -0x58(%rbp)
movq -0x20(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x68(%rbp)
movq -0x50(%rbp), %rax
cmpq -0x58(%rbp), %rax
jae 0x71344
movq -0x50(%rbp), %rax
movq %rax, %rcx
addq $0x4, %rcx
movq %rcx, -0x50(%rbp)
movl (%rax), %eax
movl %eax, -0x6c(%rbp)
cmpl $0x0, %eax
je 0x71331
movq -0x40(%rbp), %rax
movq %rax, -0x38(%rbp)
movq -0x68(%rbp), %rax
movq %rax, -0x60(%rbp)
movq $0x0, -0x78(%rbp)
movq -0x38(%rbp), %rax
movq %rax, %rcx
addq $0x4, %rcx
movq %rcx, -0x38(%rbp)
movl (%rax), %eax
movl -0x6c(%rbp), %ecx
imulq %rcx, %rax
movq -0x60(%rbp), %rcx
movl (%rcx), %ecx
addq %rcx, %rax
addq -0x78(%rbp), %rax
movq %rax, -0x80(%rbp)
movq -0x80(%rbp), %rax
shrq $0x20, %rax
movq %rax, -0x78(%rbp)
movabsq $0xffffffff, %rax # imm = 0xFFFFFFFF
andq -0x80(%rbp), %rax
movl %eax, %ecx
movq -0x60(%rbp), %rax
movq %rax, %rdx
addq $0x4, %rdx
movq %rdx, -0x60(%rbp)
movl %ecx, (%rax)
movq -0x38(%rbp), %rax
cmpq -0x48(%rbp), %rax
jb 0x712c5
movq -0x78(%rbp), %rax
movl %eax, %ecx
movq -0x60(%rbp), %rax
movl %ecx, (%rax)
jmp 0x71333
movq -0x68(%rbp), %rax
addq $0x4, %rax
movq %rax, -0x68(%rbp)
jmp 0x71282
movq -0x20(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x68(%rbp)
movq -0x68(%rbp), %rax
movslq -0x30(%rbp), %rcx
shlq $0x2, %rcx
addq %rcx, %rax
movq %rax, -0x60(%rbp)
xorl %eax, %eax
cmpl $0x0, -0x30(%rbp)
movb %al, -0x81(%rbp)
jle 0x7138e
movq -0x60(%rbp), %rax
movq %rax, %rcx
addq $-0x4, %rcx
movq %rcx, -0x60(%rbp)
cmpl $0x0, -0x4(%rax)
setne %al
xorb $-0x1, %al
movb %al, -0x81(%rbp)
movb -0x81(%rbp), %al
testb $0x1, %al
jne 0x7139a
jmp 0x713a7
jmp 0x7139c
movl -0x30(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0x30(%rbp)
jmp 0x71362
movl -0x30(%rbp), %ecx
movq -0x20(%rbp), %rax
movl %ecx, 0x14(%rax)
movq -0x20(%rbp), %rax
addq $0x90, %rsp
popq %rbp
retq
nop
| mult:
push rbp
mov rbp, rsp
sub rsp, 90h
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov [rbp+var_18], rdx
mov rax, [rbp+var_8]
mov eax, [rax+14h]
mov rcx, [rbp+var_10]
cmp eax, [rcx+14h]
jge short loc_711AF
mov rax, [rbp+var_8]
mov [rbp+var_20], rax
mov rax, [rbp+var_10]
mov [rbp+var_8], rax
mov rax, [rbp+var_20]
mov [rbp+var_10], rax
loc_711AF:
mov rax, [rbp+var_8]
mov eax, [rax+8]
mov [rbp+var_24], eax
mov rax, [rbp+var_8]
mov eax, [rax+14h]
mov [rbp+var_28], eax
mov rax, [rbp+var_10]
mov eax, [rax+14h]
mov [rbp+var_2C], eax
mov eax, [rbp+var_28]
add eax, [rbp+var_2C]
mov [rbp+var_30], eax
mov eax, [rbp+var_30]
mov rcx, [rbp+var_8]
cmp eax, [rcx+0Ch]
jle short loc_711EB
mov eax, [rbp+var_24]
add eax, 1
mov [rbp+var_24], eax
loc_711EB:
mov edi, [rbp+var_24]
mov rsi, [rbp+var_18]
call Balloc
mov [rbp+var_20], rax
mov rax, [rbp+var_20]
mov rax, [rax]
mov [rbp+var_38], rax
mov rax, [rbp+var_38]
movsxd rcx, [rbp+var_30]
shl rcx, 2
add rax, rcx
mov [rbp+var_40], rax
loc_71219:
mov rax, [rbp+var_38]
cmp rax, [rbp+var_40]
jnb short loc_7123B
mov rax, [rbp+var_38]
mov dword ptr [rax], 0
mov rax, [rbp+var_38]
add rax, 4
mov [rbp+var_38], rax
jmp short loc_71219
loc_7123B:
mov rax, [rbp+var_8]
mov rax, [rax]
mov [rbp+var_40], rax
mov rax, [rbp+var_40]
movsxd rcx, [rbp+var_28]
shl rcx, 2
add rax, rcx
mov [rbp+var_48], rax
mov rax, [rbp+var_10]
mov rax, [rax]
mov [rbp+var_50], rax
mov rax, [rbp+var_50]
movsxd rcx, [rbp+var_2C]
shl rcx, 2
add rax, rcx
mov [rbp+var_58], rax
mov rax, [rbp+var_20]
mov rax, [rax]
mov [rbp+var_68], rax
loc_71282:
mov rax, [rbp+var_50]
cmp rax, [rbp+var_58]
jnb loc_71344
mov rax, [rbp+var_50]
mov rcx, rax
add rcx, 4
mov [rbp+var_50], rcx
mov eax, [rax]
mov [rbp+var_6C], eax
cmp eax, 0
jz loc_71331
mov rax, [rbp+var_40]
mov [rbp+var_38], rax
mov rax, [rbp+var_68]
mov [rbp+var_60], rax
mov [rbp+var_78], 0
loc_712C5:
mov rax, [rbp+var_38]
mov rcx, rax
add rcx, 4
mov [rbp+var_38], rcx
mov eax, [rax]
mov ecx, [rbp+var_6C]
imul rax, rcx
mov rcx, [rbp+var_60]
mov ecx, [rcx]
add rax, rcx
add rax, [rbp+var_78]
mov [rbp+var_80], rax
mov rax, [rbp+var_80]
shr rax, 20h
mov [rbp+var_78], rax
mov rax, 0FFFFFFFFh
and rax, [rbp+var_80]
mov ecx, eax
mov rax, [rbp+var_60]
mov rdx, rax
add rdx, 4
mov [rbp+var_60], rdx
mov [rax], ecx
mov rax, [rbp+var_38]
cmp rax, [rbp+var_48]
jb short loc_712C5
mov rax, [rbp+var_78]
mov ecx, eax
mov rax, [rbp+var_60]
mov [rax], ecx
loc_71331:
jmp short $+2
loc_71333:
mov rax, [rbp+var_68]
add rax, 4
mov [rbp+var_68], rax
jmp loc_71282
loc_71344:
mov rax, [rbp+var_20]
mov rax, [rax]
mov [rbp+var_68], rax
mov rax, [rbp+var_68]
movsxd rcx, [rbp+var_30]
shl rcx, 2
add rax, rcx
mov [rbp+var_60], rax
loc_71362:
xor eax, eax
cmp [rbp+var_30], 0
mov [rbp+var_81], al
jle short loc_7138E
mov rax, [rbp+var_60]
mov rcx, rax
add rcx, 0FFFFFFFFFFFFFFFCh
mov [rbp+var_60], rcx
cmp dword ptr [rax-4], 0
setnz al
xor al, 0FFh
mov [rbp+var_81], al
loc_7138E:
mov al, [rbp+var_81]
test al, 1
jnz short loc_7139A
jmp short loc_713A7
loc_7139A:
jmp short $+2
loc_7139C:
mov eax, [rbp+var_30]
add eax, 0FFFFFFFFh
mov [rbp+var_30], eax
jmp short loc_71362
loc_713A7:
mov ecx, [rbp+var_30]
mov rax, [rbp+var_20]
mov [rax+14h], ecx
mov rax, [rbp+var_20]
add rsp, 90h
pop rbp
retn
| long long mult(unsigned int **a1, unsigned int **a2, long long a3)
{
unsigned int *v3; // rax
unsigned int *v4; // rax
_DWORD *v5; // rax
long long v6; // rax
char v8; // [rsp+Fh] [rbp-81h]
unsigned long long v9; // [rsp+10h] [rbp-80h]
unsigned long long v10; // [rsp+18h] [rbp-78h]
unsigned int v11; // [rsp+24h] [rbp-6Ch]
_DWORD *v12; // [rsp+28h] [rbp-68h]
_DWORD *v13; // [rsp+30h] [rbp-60h]
long long v14; // [rsp+30h] [rbp-60h]
unsigned long long v15; // [rsp+38h] [rbp-58h]
unsigned int *v16; // [rsp+40h] [rbp-50h]
unsigned long long v17; // [rsp+48h] [rbp-48h]
unsigned long long v18; // [rsp+50h] [rbp-40h]
unsigned int *v19; // [rsp+50h] [rbp-40h]
_DWORD *v20; // [rsp+58h] [rbp-38h]
unsigned int *v21; // [rsp+58h] [rbp-38h]
int v22; // [rsp+60h] [rbp-30h]
int v23; // [rsp+64h] [rbp-2Ch]
int v24; // [rsp+68h] [rbp-28h]
int v25; // [rsp+6Ch] [rbp-24h]
long long v26; // [rsp+70h] [rbp-20h]
unsigned int **v27; // [rsp+80h] [rbp-10h]
unsigned int **v28; // [rsp+88h] [rbp-8h]
v28 = a1;
v27 = a2;
if ( *((_DWORD *)a1 + 5) < *((_DWORD *)a2 + 5) )
{
v28 = a2;
v27 = a1;
}
v25 = *((_DWORD *)v28 + 2);
v24 = *((_DWORD *)v28 + 5);
v23 = *((_DWORD *)v27 + 5);
v22 = v23 + v24;
if ( v23 + v24 > *((_DWORD *)v28 + 3) )
++v25;
v26 = Balloc(v25, a3);
v20 = *(_DWORD **)v26;
v18 = 4LL * v22 + *(_QWORD *)v26;
while ( (unsigned long long)v20 < v18 )
*v20++ = 0;
v19 = *v28;
v17 = (unsigned long long)&(*v28)[v24];
v16 = *v27;
v15 = (unsigned long long)&(*v27)[v23];
v12 = *(_DWORD **)v26;
while ( (unsigned long long)v16 < v15 )
{
v3 = v16++;
v11 = *v3;
if ( *v3 )
{
v21 = v19;
v13 = v12;
v10 = 0LL;
do
{
v4 = v21++;
v9 = v10 + (unsigned int)*v13 + v11 * (unsigned long long)*v4;
v10 = HIDWORD(v9);
v5 = v13++;
*v5 = v9;
}
while ( (unsigned long long)v21 < v17 );
*v13 = HIDWORD(v9);
}
++v12;
}
v14 = 4LL * v22 + *(_QWORD *)v26;
while ( 1 )
{
v8 = 0;
if ( v22 > 0 )
{
v6 = v14;
v14 -= 4LL;
v8 = ~(*(_DWORD *)(v6 - 4) != 0);
}
if ( (v8 & 1) == 0 )
break;
--v22;
}
*(_DWORD *)(v26 + 20) = v22;
return v26;
}
| mult:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x90
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV qword ptr [RBP + -0x18],RDX
MOV RAX,qword ptr [RBP + -0x8]
MOV EAX,dword ptr [RAX + 0x14]
MOV RCX,qword ptr [RBP + -0x10]
CMP EAX,dword ptr [RCX + 0x14]
JGE 0x001711af
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RBP + -0x20],RAX
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RBP + -0x8],RAX
MOV RAX,qword ptr [RBP + -0x20]
MOV qword ptr [RBP + -0x10],RAX
LAB_001711af:
MOV RAX,qword ptr [RBP + -0x8]
MOV EAX,dword ptr [RAX + 0x8]
MOV dword ptr [RBP + -0x24],EAX
MOV RAX,qword ptr [RBP + -0x8]
MOV EAX,dword ptr [RAX + 0x14]
MOV dword ptr [RBP + -0x28],EAX
MOV RAX,qword ptr [RBP + -0x10]
MOV EAX,dword ptr [RAX + 0x14]
MOV dword ptr [RBP + -0x2c],EAX
MOV EAX,dword ptr [RBP + -0x28]
ADD EAX,dword ptr [RBP + -0x2c]
MOV dword ptr [RBP + -0x30],EAX
MOV EAX,dword ptr [RBP + -0x30]
MOV RCX,qword ptr [RBP + -0x8]
CMP EAX,dword ptr [RCX + 0xc]
JLE 0x001711eb
MOV EAX,dword ptr [RBP + -0x24]
ADD EAX,0x1
MOV dword ptr [RBP + -0x24],EAX
LAB_001711eb:
MOV EDI,dword ptr [RBP + -0x24]
MOV RSI,qword ptr [RBP + -0x18]
CALL 0x00170d10
MOV qword ptr [RBP + -0x20],RAX
MOV RAX,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x38],RAX
MOV RAX,qword ptr [RBP + -0x38]
MOVSXD RCX,dword ptr [RBP + -0x30]
SHL RCX,0x2
ADD RAX,RCX
MOV qword ptr [RBP + -0x40],RAX
LAB_00171219:
MOV RAX,qword ptr [RBP + -0x38]
CMP RAX,qword ptr [RBP + -0x40]
JNC 0x0017123b
MOV RAX,qword ptr [RBP + -0x38]
MOV dword ptr [RAX],0x0
MOV RAX,qword ptr [RBP + -0x38]
ADD RAX,0x4
MOV qword ptr [RBP + -0x38],RAX
JMP 0x00171219
LAB_0017123b:
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x40],RAX
MOV RAX,qword ptr [RBP + -0x40]
MOVSXD RCX,dword ptr [RBP + -0x28]
SHL RCX,0x2
ADD RAX,RCX
MOV qword ptr [RBP + -0x48],RAX
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x50],RAX
MOV RAX,qword ptr [RBP + -0x50]
MOVSXD RCX,dword ptr [RBP + -0x2c]
SHL RCX,0x2
ADD RAX,RCX
MOV qword ptr [RBP + -0x58],RAX
MOV RAX,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x68],RAX
LAB_00171282:
MOV RAX,qword ptr [RBP + -0x50]
CMP RAX,qword ptr [RBP + -0x58]
JNC 0x00171344
MOV RAX,qword ptr [RBP + -0x50]
MOV RCX,RAX
ADD RCX,0x4
MOV qword ptr [RBP + -0x50],RCX
MOV EAX,dword ptr [RAX]
MOV dword ptr [RBP + -0x6c],EAX
CMP EAX,0x0
JZ 0x00171331
MOV RAX,qword ptr [RBP + -0x40]
MOV qword ptr [RBP + -0x38],RAX
MOV RAX,qword ptr [RBP + -0x68]
MOV qword ptr [RBP + -0x60],RAX
MOV qword ptr [RBP + -0x78],0x0
LAB_001712c5:
MOV RAX,qword ptr [RBP + -0x38]
MOV RCX,RAX
ADD RCX,0x4
MOV qword ptr [RBP + -0x38],RCX
MOV EAX,dword ptr [RAX]
MOV ECX,dword ptr [RBP + -0x6c]
IMUL RAX,RCX
MOV RCX,qword ptr [RBP + -0x60]
MOV ECX,dword ptr [RCX]
ADD RAX,RCX
ADD RAX,qword ptr [RBP + -0x78]
MOV qword ptr [RBP + -0x80],RAX
MOV RAX,qword ptr [RBP + -0x80]
SHR RAX,0x20
MOV qword ptr [RBP + -0x78],RAX
MOV RAX,0xffffffff
AND RAX,qword ptr [RBP + -0x80]
MOV ECX,EAX
MOV RAX,qword ptr [RBP + -0x60]
MOV RDX,RAX
ADD RDX,0x4
MOV qword ptr [RBP + -0x60],RDX
MOV dword ptr [RAX],ECX
MOV RAX,qword ptr [RBP + -0x38]
CMP RAX,qword ptr [RBP + -0x48]
JC 0x001712c5
MOV RAX,qword ptr [RBP + -0x78]
MOV ECX,EAX
MOV RAX,qword ptr [RBP + -0x60]
MOV dword ptr [RAX],ECX
LAB_00171331:
JMP 0x00171333
LAB_00171333:
MOV RAX,qword ptr [RBP + -0x68]
ADD RAX,0x4
MOV qword ptr [RBP + -0x68],RAX
JMP 0x00171282
LAB_00171344:
MOV RAX,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x68],RAX
MOV RAX,qword ptr [RBP + -0x68]
MOVSXD RCX,dword ptr [RBP + -0x30]
SHL RCX,0x2
ADD RAX,RCX
MOV qword ptr [RBP + -0x60],RAX
LAB_00171362:
XOR EAX,EAX
CMP dword ptr [RBP + -0x30],0x0
MOV byte ptr [RBP + -0x81],AL
JLE 0x0017138e
MOV RAX,qword ptr [RBP + -0x60]
MOV RCX,RAX
ADD RCX,-0x4
MOV qword ptr [RBP + -0x60],RCX
CMP dword ptr [RAX + -0x4],0x0
SETNZ AL
XOR AL,0xff
MOV byte ptr [RBP + -0x81],AL
LAB_0017138e:
MOV AL,byte ptr [RBP + -0x81]
TEST AL,0x1
JNZ 0x0017139a
JMP 0x001713a7
LAB_0017139a:
JMP 0x0017139c
LAB_0017139c:
MOV EAX,dword ptr [RBP + -0x30]
ADD EAX,-0x1
MOV dword ptr [RBP + -0x30],EAX
JMP 0x00171362
LAB_001713a7:
MOV ECX,dword ptr [RBP + -0x30]
MOV RAX,qword ptr [RBP + -0x20]
MOV dword ptr [RAX + 0x14],ECX
MOV RAX,qword ptr [RBP + -0x20]
ADD RSP,0x90
POP RBP
RET
|
long * mult(int8 *param_1,int8 *param_2,int8 param_3)
{
int iVar1;
int iVar2;
uint uVar3;
uint *puVar4;
uint *puVar5;
long *plVar6;
int4 *puVar7;
ulong uVar8;
uint *puVar9;
uint *puVar10;
bool bVar11;
ulong local_80;
uint *local_70;
uint *local_68;
uint *local_58;
uint *local_40;
int local_38;
int local_2c;
int8 *local_18;
int8 *local_10;
local_18 = param_2;
local_10 = param_1;
if (*(int *)((long)param_1 + 0x14) < *(int *)((long)param_2 + 0x14)) {
local_18 = param_1;
local_10 = param_2;
}
local_2c = *(int *)(local_10 + 1);
iVar1 = *(int *)((long)local_10 + 0x14);
iVar2 = *(int *)((long)local_18 + 0x14);
local_38 = iVar1 + iVar2;
if (*(int *)((long)local_10 + 0xc) < local_38) {
local_2c = local_2c + 1;
}
plVar6 = (long *)Balloc(local_2c,param_3);
local_40 = (uint *)*plVar6;
puVar7 = local_40 + local_38;
for (; local_40 < puVar7; local_40 = local_40 + 1) {
*local_40 = 0;
}
puVar4 = (uint *)*local_10;
puVar5 = (uint *)*local_18;
local_70 = (uint *)*plVar6;
local_58 = puVar5;
while (local_58 < puVar5 + iVar2) {
uVar3 = *local_58;
if (uVar3 != 0) {
local_68 = local_70;
local_80 = 0;
local_40 = puVar4;
do {
puVar9 = local_40 + 1;
uVar8 = (ulong)*local_40 * (ulong)uVar3 + (ulong)*local_68 + local_80;
local_80 = uVar8 >> 0x20;
puVar10 = local_68 + 1;
*local_68 = (uint)uVar8;
local_68 = puVar10;
local_40 = puVar9;
} while (puVar9 < puVar4 + iVar1);
*puVar10 = (uint)(uVar8 >> 0x20);
}
local_70 = local_70 + 1;
local_58 = local_58 + 1;
}
local_68 = (uint *)(*plVar6 + (long)local_38 * 4);
while( true ) {
bVar11 = false;
if (0 < local_38) {
bVar11 = *(int *)((long)local_68 + -4) == 0;
local_68 = (uint *)((long)local_68 + -4);
}
if (!bVar11) break;
local_38 = local_38 + -1;
}
*(int *)((long)plVar6 + 0x14) = local_38;
return plVar6;
}
|
|
6,360 | nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>::operator=(nlohmann::json_abi_v3_11_3::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 | basic_json& operator=(basic_json other) noexcept (
std::is_nothrow_move_constructible<value_t>::value&&
std::is_nothrow_move_assignable<value_t>::value&&
std::is_nothrow_move_constructible<json_value>::value&&
std::is_nothrow_move_assignable<json_value>::value&&
std::is_nothrow_move_assignable<json_base_class_t>::value
)
{
// check that passed value is valid
other.assert_invariant();
using std::swap;
swap(m_data.m_type, other.m_data.m_type);
swap(m_data.m_value, other.m_data.m_value);
json_base_class_t::operator=(std::move(other));
set_parents();
assert_invariant();
return *this;
} | 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>::operator=(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>):
subq $0x28, %rsp
movq %rsi, (%rsp)
movq %rdi, %rax
movq (%rsp), %rdi
movq %rdi, 0x8(%rsp)
movq %rax, 0x20(%rsp)
movq %rdi, 0x18(%rsp)
movq 0x20(%rsp), %rax
movq %rax, 0x10(%rsp)
movl $0x1, %esi
callq 0x9f9a0
movq 0x8(%rsp), %rsi
movq 0x10(%rsp), %rdi
callq 0xc3610
movq 0x8(%rsp), %rsi
movq 0x10(%rsp), %rdi
addq $0x8, %rdi
addq $0x8, %rsi
callq 0xc3640
movq 0x10(%rsp), %rdi
callq 0x9faf0
movq 0x10(%rsp), %rdi
movl $0x1, %esi
callq 0x9f9a0
movq 0x10(%rsp), %rax
addq $0x28, %rsp
retq
nopl (%rax,%rax)
| _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEaSESD_:
sub rsp, 28h
mov [rsp+28h+var_28], rsi
mov rax, rdi
mov rdi, [rsp+28h+var_28]
mov [rsp+28h+var_20], rdi
mov [rsp+28h+var_8], rax
mov [rsp+28h+var_10], rdi
mov rax, [rsp+28h+var_8]
mov [rsp+28h+var_18], rax
mov esi, 1
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool)
mov rsi, [rsp+28h+var_20]
mov rdi, [rsp+28h+var_18]
call _ZSt4swapIN8nlohmann16json_abi_v3_11_36detail7value_tEENSt9enable_ifIXsr6__and_ISt6__not_ISt15__is_tuple_likeIT_EESt21is_move_constructibleIS7_ESt18is_move_assignableIS7_EEE5valueEvE4typeERS7_SG_
mov rsi, [rsp+28h+var_20]
mov rdi, [rsp+28h+var_18]
add rdi, 8
add rsi, 8
call _ZSt4swapIN8nlohmann16json_abi_v3_11_310basic_jsonINS1_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES4_IhSaIhEEvE10json_valueEENSt9enable_ifIXsr6__and_ISt6__not_ISt15__is_tuple_likeIT_EESt21is_move_constructibleISJ_ESt18is_move_assignableISJ_EEE5valueEvE4typeERSJ_SS_
mov rdi, [rsp+28h+var_18]
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE11set_parentsEv; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::set_parents(void)
mov rdi, [rsp+28h+var_18]
mov esi, 1
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool)
mov rax, [rsp+28h+var_18]
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>::operator=(
long long a1,
long long a2)
{
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::assert_invariant(a2);
std::swap<nlohmann::json_abi_v3_11_3::detail::value_t>(a1, a2);
std::swap<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::json_value>(
a1 + 8,
a2 + 8);
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::set_parents();
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::assert_invariant(a1);
return a1;
}
| operator=:
SUB RSP,0x28
MOV qword ptr [RSP],RSI
MOV RAX,RDI
MOV RDI,qword ptr [RSP]
MOV qword ptr [RSP + 0x8],RDI
MOV qword ptr [RSP + 0x20],RAX
MOV qword ptr [RSP + 0x18],RDI
MOV RAX,qword ptr [RSP + 0x20]
MOV qword ptr [RSP + 0x10],RAX
MOV ESI,0x1
CALL 0x0019f9a0
MOV RSI,qword ptr [RSP + 0x8]
MOV RDI,qword ptr [RSP + 0x10]
CALL 0x001c3610
MOV RSI,qword ptr [RSP + 0x8]
MOV RDI,qword ptr [RSP + 0x10]
ADD RDI,0x8
ADD RSI,0x8
CALL 0x001c3640
MOV RDI,qword ptr [RSP + 0x10]
CALL 0x0019faf0
MOV RDI,qword ptr [RSP + 0x10]
MOV ESI,0x1
CALL 0x0019f9a0
MOV RAX,qword ptr [RSP + 0x10]
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>::TEMPNAMEPLACEHOLDERVALUE(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,
std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void>) */
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
* __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>
::operator=(basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,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,value_t *param_2)
{
assert_invariant(SUB81(param_2,0));
std::swap<nlohmann::json_abi_v3_11_3::detail::value_t>(this,param_2);
std::
swap<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>::json_value>
((json_value *)(this + 8),(json_value *)(param_2 + 8));
set_parents();
assert_invariant(SUB81(this,0));
return this;
}
|
|
6,361 | common_log::add(ggml_log_level, char const*, __va_list_tag*) | monkey531[P]llama/common/log.cpp | void add(enum ggml_log_level level, const char * fmt, va_list args) {
std::lock_guard<std::mutex> lock(mtx);
if (!running) {
// discard messages while the worker thread is paused
return;
}
auto & entry = entries[tail];
{
// cannot use args twice, so make a copy in case we need to expand the buffer
va_list args_copy;
va_copy(args_copy, args);
#if 1
const size_t n = vsnprintf(entry.msg.data(), entry.msg.size(), fmt, args);
if (n >= entry.msg.size()) {
entry.msg.resize(n + 1);
vsnprintf(entry.msg.data(), entry.msg.size(), fmt, args_copy);
}
#else
// hack for bolding arguments
std::stringstream ss;
for (int i = 0; fmt[i] != 0; i++) {
if (fmt[i] == '%') {
ss << LOG_COL_BOLD;
while (fmt[i] != ' ' && fmt[i] != ')' && fmt[i] != ']' && fmt[i] != 0) ss << fmt[i++];
ss << LOG_COL_DEFAULT;
if (fmt[i] == 0) break;
}
ss << fmt[i];
}
const size_t n = vsnprintf(entry.msg.data(), entry.msg.size(), ss.str().c_str(), args);
if (n >= entry.msg.size()) {
entry.msg.resize(n + 1);
vsnprintf(entry.msg.data(), entry.msg.size(), ss.str().c_str(), args_copy);
}
#endif
va_end(args_copy);
}
entry.level = level;
entry.prefix = prefix;
entry.timestamp = 0;
if (timestamps) {
entry.timestamp = t_us() - t_start;
}
entry.is_end = false;
tail = (tail + 1) % entries.size();
if (tail == head) {
// expand the buffer
std::vector<common_log_entry> new_entries(2*entries.size());
size_t new_tail = 0;
do {
new_entries[new_tail] = std::move(entries[head]);
head = (head + 1) % entries.size();
new_tail = (new_tail + 1);
} while (head != tail);
head = 0;
tail = new_tail;
for (size_t i = tail; i < new_entries.size(); i++) {
new_entries[i].msg.resize(256);
}
entries = std::move(new_entries);
}
cv.notify_one();
} | O2 | cpp | common_log::add(ggml_log_level, char const*, __va_list_tag*):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rcx, %r15
movq %rdx, %r14
movl %esi, %ebp
movq %rdi, %rbx
callq 0x977da
cmpb $0x1, 0x6a(%rbx)
jne 0x9724d
movl %ebp, 0xc(%rsp)
movq 0x78(%rbx), %r13
imulq $0x30, 0x98(%rbx), %rbp
movq %r13, %r12
addq %rbp, %r12
movq 0x10(%r15), %rax
movq %rax, 0x20(%rsp)
movups (%r15), %xmm0
movaps %xmm0, 0x10(%rsp)
movq 0x10(%r13,%rbp), %rdi
movq 0x18(%r13,%rbp), %rsi
subq %rdi, %rsi
movq %r14, %rdx
movq %r15, %rcx
callq 0x241d0
movslq %eax, %rsi
movq 0x18(%r13,%rbp), %rax
subq 0x10(%r13,%rbp), %rax
cmpq %rsi, %rax
ja 0x97103
leaq 0x10(,%rbp), %rdi
addq %r13, %rdi
incq %rsi
callq 0x5cd3c
movq 0x10(%r12), %rdi
movq 0x18(%r12), %rsi
subq %rdi, %rsi
leaq 0x10(%rsp), %rcx
movq %r14, %rdx
callq 0x241d0
movl 0xc(%rsp), %eax
movl %eax, (%r12)
movb 0x68(%rbx), %al
movb %al, 0x4(%r12)
andq $0x0, 0x8(%r12)
cmpb $0x1, 0x69(%rbx)
jne 0x9712d
callq 0x96f12
subq 0x70(%rbx), %rax
movq %rax, 0x8(%r12)
movb $0x0, 0x28(%r12)
movq 0x80(%rbx), %rax
movq 0x98(%rbx), %rcx
incq %rcx
subq 0x78(%rbx), %rax
pushq $0x30
popq %r15
cqto
idivq %r15
movq %rax, %rsi
movq %rcx, %rax
xorl %edx, %edx
divq %rsi
movq %rdx, 0x98(%rbx)
cmpq 0x90(%rbx), %rdx
jne 0x97244
addq %rsi, %rsi
leaq 0x10(%rsp), %rdi
leaq 0xb(%rsp), %rdx
callq 0x97cca
leaq 0x78(%rbx), %r14
movq 0x78(%rbx), %rdi
movq 0x90(%rbx), %rdx
pushq $0x10
popq %r12
xorl %r13d, %r13d
imulq $0x30, %rdx, %rsi
addq %rdi, %rsi
movq 0x10(%rsp), %rax
leaq (%rax,%r12), %rdi
addq $-0x10, %rdi
callq 0x97d1c
movq 0x90(%rbx), %rcx
incq %rcx
movq 0x78(%rbx), %rdi
movq 0x80(%rbx), %rax
subq %rdi, %rax
cqto
idivq %r15
movq %rax, %rsi
movq %rcx, %rax
xorl %edx, %edx
divq %rsi
movq %rdx, 0x90(%rbx)
incq %r13
addq $0x30, %r12
cmpq 0x98(%rbx), %rdx
jne 0x97198
andq $0x0, 0x90(%rbx)
movq %r13, 0x98(%rbx)
movq 0x10(%rsp), %rdi
movq 0x18(%rsp), %rax
subq %rdi, %rax
cqto
idivq %r15
cmpq %rax, %r13
jae 0x9722c
addq %r12, %rdi
movl $0x100, %esi # imm = 0x100
callq 0x5cd3c
incq %r13
addq $0x30, %r12
jmp 0x971ff
leaq 0x10(%rsp), %r15
movq %r14, %rdi
movq %r15, %rsi
callq 0x97dfa
movq %r15, %rdi
callq 0x974e6
leaq 0x30(%rbx), %rdi
callq 0x23480
movq %rbx, %rdi
callq 0x236f0
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x97266
movq %rax, %r14
jmp 0x97278
movq %rax, %r14
leaq 0x10(%rsp), %rdi
callq 0x974e6
movq %rbx, %rdi
callq 0x236f0
movq %r14, %rdi
callq 0x23f90
| _ZN10common_log3addE14ggml_log_levelPKcP13__va_list_tag:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 28h
mov r15, rcx
mov r14, rdx
mov ebp, esi
mov rbx, rdi
call _ZNSt5mutex4lockEv; std::mutex::lock(void)
cmp byte ptr [rbx+6Ah], 1
jnz loc_9724D
mov [rsp+58h+var_4C], ebp
mov r13, [rbx+78h]
imul rbp, [rbx+98h], 30h ; '0'
mov r12, r13
add r12, rbp
mov rax, [r15+10h]
mov [rsp+58h+var_38], rax
movups xmm0, xmmword ptr [r15]
movaps [rsp+58h+var_48], xmm0
mov rdi, [r13+rbp+10h]
mov rsi, [r13+rbp+18h]
sub rsi, rdi
mov rdx, r14
mov rcx, r15
call vsnprintf
movsxd rsi, eax
mov rax, [r13+rbp+18h]
sub rax, [r13+rbp+10h]
cmp rax, rsi
ja short loc_97103
lea rdi, ds:10h[rbp]
add rdi, r13
inc rsi
call _ZNSt6vectorIcSaIcEE6resizeEm; std::vector<char>::resize(ulong)
mov rdi, [r12+10h]
mov rsi, [r12+18h]
sub rsi, rdi
lea rcx, [rsp+58h+var_48]
mov rdx, r14
call vsnprintf
loc_97103:
mov eax, [rsp+58h+var_4C]
mov [r12], eax
mov al, [rbx+68h]
mov [r12+4], al
and qword ptr [r12+8], 0
cmp byte ptr [rbx+69h], 1
jnz short loc_9712D
call _ZL4t_usv; t_us(void)
sub rax, [rbx+70h]
mov [r12+8], rax
loc_9712D:
mov byte ptr [r12+28h], 0
mov rax, [rbx+80h]
mov rcx, [rbx+98h]
inc rcx
sub rax, [rbx+78h]
push 30h ; '0'
pop r15
cqo
idiv r15
mov rsi, rax
mov rax, rcx
xor edx, edx
div rsi
mov [rbx+98h], rdx
cmp rdx, [rbx+90h]
jnz loc_97244
add rsi, rsi
lea rdi, [rsp+58h+var_48]
lea rdx, [rsp+58h+var_4D]
call _ZNSt6vectorI16common_log_entrySaIS0_EEC2EmRKS1_; std::vector<common_log_entry>::vector(ulong,std::allocator<common_log_entry> const&)
lea r14, [rbx+78h]
mov rdi, [rbx+78h]
mov rdx, [rbx+90h]
push 10h
pop r12
xor r13d, r13d
loc_97198:
imul rsi, rdx, 30h ; '0'
add rsi, rdi
mov rax, qword ptr [rsp+58h+var_48]
lea rdi, [rax+r12]
add rdi, 0FFFFFFFFFFFFFFF0h
call _ZN16common_log_entryaSEOS_; common_log_entry::operator=(common_log_entry&&)
mov rcx, [rbx+90h]
inc rcx
mov rdi, [rbx+78h]
mov rax, [rbx+80h]
sub rax, rdi
cqo
idiv r15
mov rsi, rax
mov rax, rcx
xor edx, edx
div rsi
mov [rbx+90h], rdx
inc r13
add r12, 30h ; '0'
cmp rdx, [rbx+98h]
jnz short loc_97198
and qword ptr [rbx+90h], 0
mov [rbx+98h], r13
loc_971FF:
mov rdi, qword ptr [rsp+58h+var_48]
mov rax, qword ptr [rsp+58h+var_48+8]
sub rax, rdi
cqo
idiv r15
cmp r13, rax
jnb short loc_9722C
add rdi, r12
mov esi, 100h
call _ZNSt6vectorIcSaIcEE6resizeEm; std::vector<char>::resize(ulong)
inc r13
add r12, 30h ; '0'
jmp short loc_971FF
loc_9722C:
lea r15, [rsp+58h+var_48]
mov rdi, r14
mov rsi, r15
call _ZNSt6vectorI16common_log_entrySaIS0_EE14_M_move_assignEOS2_St17integral_constantIbLb1EE; std::vector<common_log_entry>::_M_move_assign(std::vector<common_log_entry>&&,std::integral_constant<bool,true>)
mov rdi, r15
call _ZNSt6vectorI16common_log_entrySaIS0_EED2Ev; std::vector<common_log_entry>::~vector()
loc_97244:
lea rdi, [rbx+30h]; this
call __ZNSt18condition_variable10notify_oneEv; std::condition_variable::notify_one(void)
loc_9724D:
mov rdi, rbx
call _pthread_mutex_unlock
add rsp, 28h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
jmp short $+2
loc_97266:
mov r14, rax
jmp short loc_97278
mov r14, rax
lea rdi, [rsp+arg_8]
call _ZNSt6vectorI16common_log_entrySaIS0_EED2Ev; std::vector<common_log_entry>::~vector()
loc_97278:
mov rdi, rbx
call _pthread_mutex_unlock
mov rdi, r14
call __Unwind_Resume
| long long common_log::add(long long a1, int a2, long long a3, __int128 *a4)
{
long long v7; // r13
long long v8; // rbp
long long v9; // r12
std::chrono::_V2::system_clock *v10; // rdi
unsigned long long v11; // rsi
unsigned long long v12; // rsi
unsigned long long v13; // rdx
long long v14; // rdi
unsigned long long v15; // rdx
long long v16; // r12
unsigned long long v17; // r13
char v19; // [rsp+Bh] [rbp-4Dh] BYREF
int v20; // [rsp+Ch] [rbp-4Ch]
__int128 v21; // [rsp+10h] [rbp-48h] BYREF
long long v22; // [rsp+20h] [rbp-38h]
std::mutex::lock((std::mutex *)a1);
if ( *(_BYTE *)(a1 + 106) == 1 )
{
v20 = a2;
v7 = *(_QWORD *)(a1 + 120);
v8 = 48LL * *(_QWORD *)(a1 + 152);
v9 = v8 + v7;
v22 = *((_QWORD *)a4 + 2);
v21 = *a4;
v10 = *(std::chrono::_V2::system_clock **)(v7 + v8 + 16);
v11 = (int)vsnprintf(v10, *(_QWORD *)(v7 + v8 + 24) - (_QWORD)v10, a3, a4);
if ( *(_QWORD *)(v7 + v8 + 24) - *(_QWORD *)(v7 + v8 + 16) <= v11 )
{
std::vector<char>::resize((_QWORD *)(v7 + v8 + 16), v11 + 1);
v10 = *(std::chrono::_V2::system_clock **)(v9 + 16);
vsnprintf(v10, *(_QWORD *)(v9 + 24) - (_QWORD)v10, a3, &v21);
}
*(_DWORD *)v9 = v20;
*(_BYTE *)(v9 + 4) = *(_BYTE *)(a1 + 104);
*(_QWORD *)(v9 + 8) = 0LL;
if ( *(_BYTE *)(a1 + 105) == 1 )
*(_QWORD *)(v9 + 8) = t_us(v10) - *(_QWORD *)(a1 + 112);
*(_BYTE *)(v9 + 40) = 0;
v12 = (*(_QWORD *)(a1 + 128) - *(_QWORD *)(a1 + 120)) / 48LL;
v13 = (*(_QWORD *)(a1 + 152) + 1LL) % v12;
*(_QWORD *)(a1 + 152) = v13;
if ( v13 == *(_QWORD *)(a1 + 144) )
{
std::vector<common_log_entry>::vector(&v21, 2 * v12, &v19);
v14 = *(_QWORD *)(a1 + 120);
v15 = *(_QWORD *)(a1 + 144);
v16 = 16LL;
v17 = 0LL;
do
{
common_log_entry::operator=(v21 + v16 - 16, v14 + 48 * v15);
v14 = *(_QWORD *)(a1 + 120);
v15 = (*(_QWORD *)(a1 + 144) + 1LL) % (unsigned long long)((*(_QWORD *)(a1 + 128) - v14) / 48);
*(_QWORD *)(a1 + 144) = v15;
++v17;
v16 += 48LL;
}
while ( v15 != *(_QWORD *)(a1 + 152) );
*(_QWORD *)(a1 + 144) = 0LL;
*(_QWORD *)(a1 + 152) = v17;
while ( v17 < (*((_QWORD *)&v21 + 1) - (_QWORD)v21) / 48LL )
{
std::vector<char>::resize((_QWORD *)(v16 + v21), 0x100uLL);
++v17;
v16 += 48LL;
}
std::vector<common_log_entry>::_M_move_assign(a1 + 120, &v21, (*((_QWORD *)&v21 + 1) - (_QWORD)v21) % 48LL);
std::vector<common_log_entry>::~vector(&v21);
}
std::condition_variable::notify_one((std::condition_variable *)(a1 + 48));
}
return pthread_mutex_unlock(a1);
}
| add:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x28
MOV R15,RCX
MOV R14,RDX
MOV EBP,ESI
MOV RBX,RDI
CALL 0x001977da
CMP byte ptr [RBX + 0x6a],0x1
JNZ 0x0019724d
MOV dword ptr [RSP + 0xc],EBP
MOV R13,qword ptr [RBX + 0x78]
IMUL RBP,qword ptr [RBX + 0x98],0x30
MOV R12,R13
ADD R12,RBP
MOV RAX,qword ptr [R15 + 0x10]
MOV qword ptr [RSP + 0x20],RAX
MOVUPS XMM0,xmmword ptr [R15]
MOVAPS xmmword ptr [RSP + 0x10],XMM0
MOV RDI,qword ptr [R13 + RBP*0x1 + 0x10]
MOV RSI,qword ptr [R13 + RBP*0x1 + 0x18]
SUB RSI,RDI
MOV RDX,R14
MOV RCX,R15
CALL 0x001241d0
MOVSXD RSI,EAX
MOV RAX,qword ptr [R13 + RBP*0x1 + 0x18]
SUB RAX,qword ptr [R13 + RBP*0x1 + 0x10]
CMP RAX,RSI
JA 0x00197103
LEA RDI,[0x10 + RBP*0x1]
ADD RDI,R13
INC RSI
LAB_001970e4:
CALL 0x0015cd3c
MOV RDI,qword ptr [R12 + 0x10]
MOV RSI,qword ptr [R12 + 0x18]
SUB RSI,RDI
LEA RCX,[RSP + 0x10]
MOV RDX,R14
CALL 0x001241d0
LAB_00197103:
MOV EAX,dword ptr [RSP + 0xc]
MOV dword ptr [R12],EAX
MOV AL,byte ptr [RBX + 0x68]
MOV byte ptr [R12 + 0x4],AL
AND qword ptr [R12 + 0x8],0x0
CMP byte ptr [RBX + 0x69],0x1
JNZ 0x0019712d
CALL 0x00196f12
SUB RAX,qword ptr [RBX + 0x70]
MOV qword ptr [R12 + 0x8],RAX
LAB_0019712d:
MOV byte ptr [R12 + 0x28],0x0
MOV RAX,qword ptr [RBX + 0x80]
MOV RCX,qword ptr [RBX + 0x98]
INC RCX
SUB RAX,qword ptr [RBX + 0x78]
PUSH 0x30
POP R15
CQO
IDIV R15
MOV RSI,RAX
MOV RAX,RCX
XOR EDX,EDX
DIV RSI
MOV qword ptr [RBX + 0x98],RDX
CMP RDX,qword ptr [RBX + 0x90]
JNZ 0x00197244
ADD RSI,RSI
LAB_00197173:
LEA RDI,[RSP + 0x10]
LEA RDX,[RSP + 0xb]
CALL 0x00197cca
LEA R14,[RBX + 0x78]
MOV RDI,qword ptr [RBX + 0x78]
MOV RDX,qword ptr [RBX + 0x90]
PUSH 0x10
POP R12
XOR R13D,R13D
LAB_00197198:
IMUL RSI,RDX,0x30
ADD RSI,RDI
MOV RAX,qword ptr [RSP + 0x10]
LEA RDI,[RAX + R12*0x1]
ADD RDI,-0x10
CALL 0x00197d1c
MOV RCX,qword ptr [RBX + 0x90]
INC RCX
MOV RDI,qword ptr [RBX + 0x78]
MOV RAX,qword ptr [RBX + 0x80]
SUB RAX,RDI
CQO
IDIV R15
MOV RSI,RAX
MOV RAX,RCX
XOR EDX,EDX
DIV RSI
MOV qword ptr [RBX + 0x90],RDX
INC R13
ADD R12,0x30
CMP RDX,qword ptr [RBX + 0x98]
JNZ 0x00197198
AND qword ptr [RBX + 0x90],0x0
MOV qword ptr [RBX + 0x98],R13
LAB_001971ff:
MOV RDI,qword ptr [RSP + 0x10]
MOV RAX,qword ptr [RSP + 0x18]
SUB RAX,RDI
CQO
IDIV R15
CMP R13,RAX
JNC 0x0019722c
ADD RDI,R12
LAB_00197219:
MOV ESI,0x100
CALL 0x0015cd3c
LAB_00197223:
INC R13
ADD R12,0x30
JMP 0x001971ff
LAB_0019722c:
LEA R15,[RSP + 0x10]
MOV RDI,R14
MOV RSI,R15
CALL 0x00197dfa
MOV RDI,R15
CALL 0x001974e6
LAB_00197244:
LEA RDI,[RBX + 0x30]
CALL 0x00123480
LAB_0019724d:
MOV RDI,RBX
CALL 0x001236f0
ADD RSP,0x28
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
/* common_log::add(ggml_log_level, char const*, __va_list_tag*) */
void __thiscall common_log::add(common_log *this,int4 param_2,char *param_3,long *param_4)
{
char *__s;
int iVar1;
long lVar2;
ulong uVar3;
ulong uVar4;
long lVar5;
int4 *puVar6;
allocator local_4d;
int4 local_4c;
long local_48;
long lStack_40;
long local_38;
std::mutex::lock((mutex *)this);
if (this[0x6a] == (common_log)0x1) {
lVar2 = *(long *)(this + 0x78);
lVar5 = *(long *)(this + 0x98) * 0x30;
puVar6 = (int4 *)(lVar2 + lVar5);
local_38 = param_4[2];
local_48 = *param_4;
lStack_40 = param_4[1];
__s = *(char **)(lVar2 + 0x10 + lVar5);
local_4c = param_2;
iVar1 = vsnprintf(__s,*(long *)(lVar2 + 0x18 + lVar5) - (long)__s,param_3,param_4);
if ((ulong)(*(long *)(lVar2 + 0x18 + lVar5) - *(long *)(lVar2 + 0x10 + lVar5)) <=
(ulong)(long)iVar1) {
/* try { // try from 001970e4 to 001970e8 has its CatchHandler @ 00197266 */
std::vector<char,std::allocator<char>>::resize
((vector<char,std::allocator<char>> *)(lVar5 + 0x10 + lVar2),(long)iVar1 + 1);
vsnprintf(*(char **)(puVar6 + 4),*(long *)(puVar6 + 6) - (long)*(char **)(puVar6 + 4),param_3,
&local_48);
}
*puVar6 = local_4c;
*(common_log *)(puVar6 + 1) = this[0x68];
*(int8 *)(puVar6 + 2) = 0;
if (this[0x69] == (common_log)0x1) {
lVar2 = t_us();
*(long *)(puVar6 + 2) = lVar2 - *(long *)(this + 0x70);
}
*(int1 *)(puVar6 + 10) = 0;
uVar3 = (*(long *)(this + 0x80) - *(long *)(this + 0x78)) / 0x30;
uVar4 = (*(long *)(this + 0x98) + 1U) % uVar3;
*(ulong *)(this + 0x98) = uVar4;
if (uVar4 == *(ulong *)(this + 0x90)) {
/* try { // try from 00197173 to 00197181 has its CatchHandler @ 00197264 */
std::vector<common_log_entry,std::allocator<common_log_entry>>::vector
((vector<common_log_entry,std::allocator<common_log_entry>> *)&local_48,uVar3 * 2,
&local_4d);
lVar2 = *(long *)(this + 0x78);
uVar3 = *(ulong *)(this + 0x90);
lVar5 = 0x10;
uVar4 = 0;
do {
common_log_entry::operator=
((common_log_entry *)(local_48 + lVar5 + -0x10),
(common_log_entry *)(uVar3 * 0x30 + lVar2));
lVar2 = *(long *)(this + 0x78);
uVar3 = (*(long *)(this + 0x90) + 1U) % (ulong)((*(long *)(this + 0x80) - lVar2) / 0x30);
*(ulong *)(this + 0x90) = uVar3;
uVar4 = uVar4 + 1;
lVar5 = lVar5 + 0x30;
} while (uVar3 != *(ulong *)(this + 0x98));
*(int8 *)(this + 0x90) = 0;
*(ulong *)(this + 0x98) = uVar4;
while( true ) {
if ((ulong)((lStack_40 - local_48) / 0x30) <= uVar4) break;
/* try { // try from 00197219 to 00197222 has its CatchHandler @ 0019726b */
std::vector<char,std::allocator<char>>::resize
((vector<char,std::allocator<char>> *)(local_48 + lVar5),0x100);
uVar4 = uVar4 + 1;
lVar5 = lVar5 + 0x30;
}
std::vector<common_log_entry,std::allocator<common_log_entry>>::_M_move_assign
(this + 0x78,(vector<common_log_entry,std::allocator<common_log_entry>> *)&local_48,
(lStack_40 - local_48) % 0x30);
std::vector<common_log_entry,std::allocator<common_log_entry>>::~vector
((vector<common_log_entry,std::allocator<common_log_entry>> *)&local_48);
}
std::condition_variable::notify_one();
}
pthread_mutex_unlock((pthread_mutex_t *)this);
return;
}
|
|
6,362 | simple_key_cache_read | eloqsql/mysys/mf_keycache.c | uchar *simple_key_cache_read(SIMPLE_KEY_CACHE_CB *keycache,
File file, my_off_t filepos, int level,
uchar *buff, uint length,
uint block_length __attribute__((unused)),
int return_buffer __attribute__((unused)))
{
my_bool locked_and_incremented= FALSE;
int error=0;
uchar *start= buff;
DBUG_ENTER("simple_key_cache_read");
DBUG_PRINT("enter", ("fd: %u pos: %lu length: %u",
(uint) file, (ulong) filepos, length));
if (keycache->key_cache_inited)
{
/* Key cache is used */
reg1 BLOCK_LINK *block;
uint read_length;
uint offset;
int page_st;
if (MYSQL_KEYCACHE_READ_START_ENABLED())
{
MYSQL_KEYCACHE_READ_START(my_filename(file), length,
(ulong) (keycache->blocks_used *
keycache->key_cache_block_size),
(ulong) (keycache->blocks_unused *
keycache->key_cache_block_size));
}
/*
When the key cache is once initialized, we use the cache_lock to
reliably distinguish the cases of normal operation, resizing, and
disabled cache. We always increment and decrement
'cnt_for_resize_op' so that a resizer can wait for pending I/O.
*/
keycache_pthread_mutex_lock(&keycache->cache_lock);
/*
Cache resizing has two phases: Flushing and re-initializing. In
the flush phase read requests are allowed to bypass the cache for
blocks not in the cache. find_key_block() returns NULL in this
case.
After the flush phase new I/O requests must wait until the
re-initialization is done. The re-initialization can be done only
if no I/O request is in progress. The reason is that
key_cache_block_size can change. With enabled cache, I/O is done
in chunks of key_cache_block_size. Every chunk tries to use a
cache block first. If the block size changes in the middle, a
block could be missed and old data could be read.
*/
while (keycache->in_resize && !keycache->resize_in_flush)
wait_on_queue(&keycache->resize_queue, &keycache->cache_lock);
/* Register the I/O for the next resize. */
inc_counter_for_resize_op(keycache);
locked_and_incremented= TRUE;
/* Requested data may not always be aligned to cache blocks. */
offset= (uint) (filepos % keycache->key_cache_block_size);
/* Read data in key_cache_block_size increments */
do
{
/* Cache could be disabled in a later iteration. */
if (!keycache->can_be_used)
{
KEYCACHE_DBUG_PRINT("key_cache_read", ("keycache cannot be used"));
goto no_key_cache;
}
/* Start reading at the beginning of the cache block. */
filepos-= offset;
/* Do not read beyond the end of the cache block. */
read_length= length;
set_if_smaller(read_length, keycache->key_cache_block_size-offset);
KEYCACHE_DBUG_ASSERT(read_length > 0);
/* Request the cache block that matches file/pos. */
keycache->global_cache_r_requests++;
MYSQL_KEYCACHE_READ_BLOCK(keycache->key_cache_block_size);
block=find_key_block(keycache, file, filepos, level, 0, &page_st);
if (!block)
{
/*
This happens only for requests submitted during key cache
resize. The block is not in the cache and shall not go in.
Read directly from file.
*/
keycache->global_cache_read++;
keycache_pthread_mutex_unlock(&keycache->cache_lock);
error= (my_pread(file, (uchar*) buff, read_length,
filepos + offset, MYF(MY_NABP)) != 0);
keycache_pthread_mutex_lock(&keycache->cache_lock);
goto next_block;
}
if (!(block->status & BLOCK_ERROR))
{
if (page_st == PAGE_TO_BE_READ)
{
MYSQL_KEYCACHE_READ_MISS();
read_block_primary(keycache, block,
keycache->key_cache_block_size, read_length+offset);
}
else if (page_st == PAGE_WAIT_TO_BE_READ)
{
MYSQL_KEYCACHE_READ_MISS();
/* The requested page is to be read into the block buffer */
read_block_secondary(keycache, block);
/*
A secondary request must now have the block assigned to the
requested file block.
*/
DBUG_ASSERT(block->hash_link->file == file);
DBUG_ASSERT(block->hash_link->diskpos == filepos);
}
else if (block->length < read_length + offset)
{
/*
Impossible if nothing goes wrong:
this could only happen if we are using a file with
small key blocks and are trying to read outside the file
*/
my_errno= -1;
block->status|= BLOCK_ERROR;
}
else
{
MYSQL_KEYCACHE_READ_HIT();
}
}
/* block status may have added BLOCK_ERROR in the above 'if'. */
if (!(block->status & BLOCK_ERROR))
{
{
DBUG_ASSERT(block->status & (BLOCK_READ | BLOCK_IN_USE));
#if !defined(SERIALIZED_READ_FROM_CACHE)
keycache_pthread_mutex_unlock(&keycache->cache_lock);
#endif
/* Copy data from the cache buffer */
memcpy(buff, block->buffer+offset, (size_t) read_length);
#if !defined(SERIALIZED_READ_FROM_CACHE)
keycache_pthread_mutex_lock(&keycache->cache_lock);
DBUG_ASSERT(block->status & (BLOCK_READ | BLOCK_IN_USE));
#endif
}
}
remove_reader(block);
/* Error injection for coverage testing. */
DBUG_EXECUTE_IF("key_cache_read_block_error",
block->status|= BLOCK_ERROR;);
/* Do not link erroneous blocks into the LRU ring, but free them. */
if (!(block->status & BLOCK_ERROR))
{
/*
Link the block into the LRU ring if it's the last submitted
request for the block. This enables eviction for the block.
*/
unreg_request(keycache, block, 1);
}
else
{
free_block(keycache, block);
error= 1;
break;
}
next_block:
buff+= read_length;
filepos+= read_length+offset;
offset= 0;
} while ((length-= read_length));
if (MYSQL_KEYCACHE_READ_DONE_ENABLED())
{
MYSQL_KEYCACHE_READ_DONE((ulong) (keycache->blocks_used *
keycache->key_cache_block_size),
(ulong) (keycache->blocks_unused *
keycache->key_cache_block_size));
}
goto end;
}
KEYCACHE_DBUG_PRINT("key_cache_read", ("keycache not initialized"));
no_key_cache:
/* Key cache is not used */
keycache->global_cache_r_requests++;
keycache->global_cache_read++;
if (locked_and_incremented)
keycache_pthread_mutex_unlock(&keycache->cache_lock);
if (my_pread(file, (uchar*) buff, length, filepos, MYF(MY_NABP)))
error= 1;
if (locked_and_incremented)
keycache_pthread_mutex_lock(&keycache->cache_lock);
end:
if (locked_and_incremented)
{
dec_counter_for_resize_op(keycache);
keycache_pthread_mutex_unlock(&keycache->cache_lock);
}
DBUG_PRINT("exit", ("error: %d", error ));
DBUG_RETURN(error ? (uchar*) 0 : start);
} | O3 | c | simple_key_cache_read:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %r8, %r14
movl %ecx, -0x6c(%rbp)
movq %rdx, %rcx
movq %rdi, %r13
cmpb $0x0, (%rdi)
je 0x531cc
movq %rcx, %r12
movl %r9d, -0x38(%rbp)
leaq 0xc0(%r13), %r15
cmpq $0x0, 0x100(%r13)
movl %esi, -0x34(%rbp)
jne 0x532e3
movq %r15, %rdi
callq 0x285a0
movq %r14, -0x58(%rbp)
cmpb $0x0, 0x1(%r13)
je 0x52f80
leaq 0x108(%r13), %rbx
cmpb $0x0, 0x2(%r13)
jne 0x52f80
movq %rbx, %rdi
movq %r15, %rsi
callq 0x5335c
cmpb $0x0, 0x1(%r13)
jne 0x52f67
movq %r15, -0x30(%rbp)
incq 0x70(%r13)
movl 0x18(%r13), %ecx
movq $0x0, -0x40(%rbp)
movq %r12, %r15
movq %r12, %rax
xorl %edx, %edx
divq %rcx
movq %rdx, %r12
movq -0x58(%rbp), %rax
movq %rax, -0x50(%rbp)
movl -0x38(%rbp), %eax
movq %r13, -0x48(%rbp)
cmpb $0x0, 0x3(%r13)
je 0x53206
movl %r12d, %ecx
movq %r15, %r14
movq %rcx, -0x60(%rbp)
subq %rcx, %r14
movl 0x18(%r13), %ebx
subl %r12d, %ebx
cmpl %ebx, %eax
movl %eax, -0x38(%rbp)
cmovbl %eax, %ebx
incq 0x150(%r13)
movq %r13, %rdi
movl -0x34(%rbp), %esi
movq %r14, %rdx
movl -0x6c(%rbp), %ecx
xorl %r8d, %r8d
leaq -0x70(%rbp), %r9
callq 0x533ed
movq %r13, %rcx
movq %rax, %r13
movl %ebx, %eax
movq %rax, -0x68(%rbp)
testq %r13, %r13
je 0x53040
testb $0x1, 0x50(%r13)
jne 0x530d7
movl -0x70(%rbp), %eax
cmpl $0x2, %eax
je 0x530ab
cmpl $0x1, %eax
jne 0x530bd
movq -0x48(%rbp), %rdi
movl 0x18(%rdi), %edx
leal (%rbx,%r12), %ecx
movq %r13, %rsi
callq 0x53bee
jmp 0x530d7
movq %r15, -0x60(%rbp)
incq 0x158(%rcx)
movq 0x100(%rcx), %rdi
testq %rdi, %rdi
movq %rcx, %r13
jne 0x53172
movq -0x30(%rbp), %r15
movq %r15, %rdi
callq 0x28280
movl $0x4, %r8d
movl -0x34(%rbp), %edi
movq -0x50(%rbp), %rsi
movq -0x68(%rbp), %rdx
movq -0x60(%rbp), %rcx
callq 0x5d8e0
xorl %ecx, %ecx
testq %rax, %rax
setne %cl
movq %rcx, -0x40(%rbp)
cmpq $0x0, 0x100(%r13)
jne 0x53187
movq %r15, %rdi
callq 0x285a0
jmp 0x5314e
movq %r13, %rdi
addq $0x28, %rdi
movq -0x30(%rbp), %rsi
callq 0x5335c
jmp 0x530d7
leal (%rbx,%r12), %eax
cmpl %eax, 0x4c(%r13)
jae 0x530d7
callq 0x5ed5e
movl $0xffffffff, (%rax) # imm = 0xFFFFFFFF
orb $0x1, 0x50(%r13)
testb $0x1, 0x50(%r13)
jne 0x53127
movq -0x48(%rbp), %r15
movq 0x100(%r15), %rdi
testq %rdi, %rdi
jne 0x5319d
movq -0x30(%rbp), %rdi
callq 0x28280
movq -0x60(%rbp), %rsi
addq 0x40(%r13), %rsi
movq -0x50(%rbp), %rdi
movq -0x68(%rbp), %rdx
callq 0x282c0
cmpq $0x0, 0x100(%r15)
jne 0x531b2
movq -0x30(%rbp), %rdi
callq 0x285a0
movq %r13, %rdi
callq 0x53cbc
testb $0x1, 0x50(%r13)
jne 0x53280
movq -0x48(%rbp), %rdi
movq %r13, %rsi
movq %rdi, %r13
movl $0x1, %edx
callq 0x53d04
movq -0x68(%rbp), %rax
addq %rax, -0x50(%rbp)
addl %ebx, %r12d
addq %r12, %r14
xorl %r12d, %r12d
movq %r14, %r15
movl -0x38(%rbp), %eax
subl %ebx, %eax
jne 0x52fb1
jmp 0x53298
leaq 0x2e374f(%rip), %rax # 0x3368c8
movq (%rax), %rax
callq *0x160(%rax)
jmp 0x5305e
movq %r15, %rdi
leaq 0x43b28(%rip), %rsi # 0x96cb9
movl $0xb29, %edx # imm = 0xB29
callq 0x29f5c
jmp 0x5314e
leaq 0x2e3724(%rip), %rax # 0x3368c8
movq (%rax), %rax
callq *0x160(%rax)
jmp 0x530f2
movq -0x30(%rbp), %rdi
leaq 0x43afc(%rip), %rsi # 0x96cb9
movl $0xb5e, %edx # imm = 0xB5E
callq 0x29f5c
jmp 0x53127
movdqu 0x150(%r13), %xmm0
pcmpeqd %xmm1, %xmm1
psubq %xmm1, %xmm0
movdqu %xmm0, 0x150(%r13)
movl %r9d, %edx
movl $0x4, %r8d
movl %esi, %edi
movq %r14, %rsi
callq 0x5d8e0
xorl %ebx, %ebx
testq %rax, %rax
setne %bl
jmp 0x532cc
movq %r15, %r14
movl %eax, %ebx
movdqu 0x150(%r13), %xmm0
pcmpeqd %xmm1, %xmm1
psubq %xmm1, %xmm0
movdqu %xmm0, 0x150(%r13)
movq 0x100(%r13), %rdi
testq %rdi, %rdi
jne 0x5330e
movq -0x30(%rbp), %r15
movq %r15, %rdi
callq 0x28280
movl %ebx, %edx
movl $0x4, %r8d
movl -0x34(%rbp), %edi
movq -0x50(%rbp), %rsi
movq %r14, %rcx
callq 0x5d8e0
testq %rax, %rax
movl $0x1, %ebx
cmovel -0x40(%rbp), %ebx
cmpq $0x0, 0x100(%r13)
movq -0x58(%rbp), %r14
jne 0x53323
movq %r15, %rdi
callq 0x285a0
jmp 0x532a6
movq -0x48(%rbp), %rdi
movq %r13, %rsi
movq %rdi, %r13
callq 0x53e0c
movl $0x1, %eax
movq %rax, -0x40(%rbp)
movq -0x40(%rbp), %rax
movl %eax, %ebx
movq -0x58(%rbp), %r14
movq -0x30(%rbp), %r15
decq 0x70(%r13)
jne 0x532b8
leaq 0x110(%r13), %rdi
callq 0x54611
movq 0x100(%r13), %rdi
testq %rdi, %rdi
jne 0x532fc
movq %r15, %rdi
callq 0x28280
xorl %eax, %eax
testl %ebx, %ebx
cmoveq %r14, %rax
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x439cf(%rip), %rsi # 0x96cb9
movq %r15, %rdi
movl $0xaf2, %edx # imm = 0xAF2
callq 0x29f5c
jmp 0x52f55
leaq 0x2e35c5(%rip), %rax # 0x3368c8
movq (%rax), %rax
callq *0x160(%rax)
jmp 0x532c4
leaq 0x2e35b3(%rip), %rax # 0x3368c8
movq (%rax), %rax
callq *0x160(%rax)
jmp 0x53235
leaq 0x4398f(%rip), %rsi # 0x96cb9
movq %r15, %rdi
movl $0xb96, %edx # imm = 0xB96
callq 0x29f5c
jmp 0x532a6
| simple_key_cache_read:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 48h
mov r14, r8
mov [rbp+var_6C], ecx
mov rcx, rdx
mov r13, rdi
cmp byte ptr [rdi], 0
jz loc_531CC
mov r12, rcx
mov [rbp+var_38], r9d
lea r15, [r13+0C0h]
cmp qword ptr [r13+100h], 0
mov [rbp+var_34], esi
jnz loc_532E3
mov rdi, r15
call _pthread_mutex_lock
loc_52F55:
mov [rbp+var_58], r14
cmp byte ptr [r13+1], 0
jz short loc_52F80
lea rbx, [r13+108h]
loc_52F67:
cmp byte ptr [r13+2], 0
jnz short loc_52F80
mov rdi, rbx
mov rsi, r15
call wait_on_queue
cmp byte ptr [r13+1], 0
jnz short loc_52F67
loc_52F80:
mov [rbp+var_30], r15
inc qword ptr [r13+70h]
mov ecx, [r13+18h]
mov [rbp+var_40], 0
mov r15, r12
mov rax, r12
xor edx, edx
div rcx
mov r12, rdx
mov rax, [rbp+var_58]
mov [rbp+var_50], rax
mov eax, [rbp+var_38]
mov [rbp+var_48], r13
loc_52FB1:
cmp byte ptr [r13+3], 0
jz loc_53206
mov ecx, r12d
mov r14, r15
mov [rbp+var_60], rcx
sub r14, rcx
mov ebx, [r13+18h]
sub ebx, r12d
cmp eax, ebx
mov [rbp+var_38], eax
cmovb ebx, eax
inc qword ptr [r13+150h]
mov rdi, r13
mov esi, [rbp+var_34]
mov rdx, r14
mov ecx, [rbp+var_6C]
xor r8d, r8d
lea r9, [rbp+var_70]
call find_key_block
mov rcx, r13
mov r13, rax
mov eax, ebx
mov [rbp+var_68], rax
test r13, r13
jz short loc_53040
test byte ptr [r13+50h], 1
jnz loc_530D7
mov eax, [rbp+var_70]
cmp eax, 2
jz loc_530AB
cmp eax, 1
jnz loc_530BD
mov rdi, [rbp+var_48]
mov edx, [rdi+18h]
lea ecx, [rbx+r12]
mov rsi, r13
call read_block_primary
jmp loc_530D7
loc_53040:
mov [rbp+var_60], r15
inc qword ptr [rcx+158h]
mov rdi, [rcx+100h]
test rdi, rdi
mov r13, rcx
jnz loc_53172
loc_5305E:
mov r15, [rbp+var_30]
mov rdi, r15
call _pthread_mutex_unlock
mov r8d, 4
mov edi, [rbp+var_34]
mov rsi, [rbp+var_50]
mov rdx, [rbp+var_68]
mov rcx, [rbp+var_60]
call my_pread
xor ecx, ecx
test rax, rax
setnz cl
mov [rbp+var_40], rcx
cmp qword ptr [r13+100h], 0
jnz loc_53187
mov rdi, r15
call _pthread_mutex_lock
jmp loc_5314E
loc_530AB:
mov rdi, r13
add rdi, 28h ; '('
mov rsi, [rbp+var_30]
call wait_on_queue
jmp short loc_530D7
loc_530BD:
lea eax, [rbx+r12]
cmp [r13+4Ch], eax
jnb short loc_530D7
call _my_thread_var
mov dword ptr [rax], 0FFFFFFFFh
or byte ptr [r13+50h], 1
loc_530D7:
test byte ptr [r13+50h], 1
jnz short loc_53127
mov r15, [rbp+var_48]
mov rdi, [r15+100h]
test rdi, rdi
jnz loc_5319D
loc_530F2:
mov rdi, [rbp+var_30]
call _pthread_mutex_unlock
mov rsi, [rbp+var_60]
add rsi, [r13+40h]
mov rdi, [rbp+var_50]
mov rdx, [rbp+var_68]
call _memcpy
cmp qword ptr [r15+100h], 0
jnz loc_531B2
mov rdi, [rbp+var_30]
call _pthread_mutex_lock
loc_53127:
mov rdi, r13
call remove_reader
test byte ptr [r13+50h], 1
jnz loc_53280
mov rdi, [rbp+var_48]
mov rsi, r13
mov r13, rdi
mov edx, 1
call unreg_request
loc_5314E:
mov rax, [rbp+var_68]
add [rbp+var_50], rax
add r12d, ebx
add r14, r12
xor r12d, r12d
mov r15, r14
mov eax, [rbp+var_38]
sub eax, ebx
jnz loc_52FB1
jmp loc_53298
loc_53172:
lea rax, PSI_server
mov rax, [rax]
call qword ptr [rax+160h]
jmp loc_5305E
loc_53187:
mov rdi, r15
lea rsi, aWorkspaceLlm4b_21; "/workspace/llm4binary/github2025/eloqsq"...
mov edx, 0B29h
call psi_mutex_lock
jmp short loc_5314E
loc_5319D:
lea rax, PSI_server
mov rax, [rax]
call qword ptr [rax+160h]
jmp loc_530F2
loc_531B2:
mov rdi, [rbp+var_30]
lea rsi, aWorkspaceLlm4b_21; "/workspace/llm4binary/github2025/eloqsq"...
mov edx, 0B5Eh
call psi_mutex_lock
jmp loc_53127
loc_531CC:
movdqu xmm0, xmmword ptr [r13+150h]
pcmpeqd xmm1, xmm1
psubq xmm0, xmm1
movdqu xmmword ptr [r13+150h], xmm0
mov edx, r9d
mov r8d, 4
mov edi, esi
mov rsi, r14
call my_pread
xor ebx, ebx
test rax, rax
setnz bl
jmp loc_532CC
loc_53206:
mov r14, r15
mov ebx, eax
movdqu xmm0, xmmword ptr [r13+150h]
pcmpeqd xmm1, xmm1
psubq xmm0, xmm1
movdqu xmmword ptr [r13+150h], xmm0
mov rdi, [r13+100h]
test rdi, rdi
jnz loc_5330E
loc_53235:
mov r15, [rbp+var_30]
mov rdi, r15
call _pthread_mutex_unlock
mov edx, ebx
mov r8d, 4
mov edi, [rbp+var_34]
mov rsi, [rbp+var_50]
mov rcx, r14
call my_pread
test rax, rax
mov ebx, 1
cmovz ebx, dword ptr [rbp+var_40]
cmp qword ptr [r13+100h], 0
mov r14, [rbp+var_58]
jnz loc_53323
mov rdi, r15
call _pthread_mutex_lock
jmp short loc_532A6
loc_53280:
mov rdi, [rbp+var_48]
mov rsi, r13
mov r13, rdi
call free_block
mov eax, 1
mov [rbp+var_40], rax
loc_53298:
mov rax, [rbp+var_40]
mov ebx, eax
mov r14, [rbp+var_58]
mov r15, [rbp+var_30]
loc_532A6:
dec qword ptr [r13+70h]
jnz short loc_532B8
lea rdi, [r13+110h]
call release_whole_queue
loc_532B8:
mov rdi, [r13+100h]
test rdi, rdi
jnz short loc_532FC
loc_532C4:
mov rdi, r15
call _pthread_mutex_unlock
loc_532CC:
xor eax, eax
test ebx, ebx
cmovz rax, r14
add rsp, 48h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_532E3:
lea rsi, aWorkspaceLlm4b_21; "/workspace/llm4binary/github2025/eloqsq"...
mov rdi, r15
mov edx, 0AF2h
call psi_mutex_lock
jmp loc_52F55
loc_532FC:
lea rax, PSI_server
mov rax, [rax]
call qword ptr [rax+160h]
jmp short loc_532C4
loc_5330E:
lea rax, PSI_server
mov rax, [rax]
call qword ptr [rax+160h]
jmp loc_53235
loc_53323:
lea rsi, aWorkspaceLlm4b_21; "/workspace/llm4binary/github2025/eloqsq"...
mov rdi, r15
mov edx, 0B96h
call psi_mutex_lock
jmp loc_532A6
| long long simple_key_cache_read(
const __m128i *a1,
unsigned int a2,
unsigned long long a3,
unsigned int a4,
long long a5,
unsigned int a6)
{
long long v6; // r14
const __m128i *v7; // r13
bool v9; // zf
unsigned long long v10; // rcx
long long v11; // r15
unsigned long long v12; // r12
unsigned int v13; // eax
long long v14; // r14
unsigned int v15; // ebx
const __m128i *v16; // rdi
const char *v17; // rsi
long long key_block; // rax
long long v19; // rdx
const __m128i *v20; // rcx
long long v21; // r13
long long v22; // r15
const __m128i *v23; // r15
long long v24; // rdi
long long v25; // rsi
long long v26; // r14
BOOL v27; // ebx
long long v28; // r14
unsigned int v29; // ebx
long long v30; // r15
long long v31; // rax
long long v32; // rsi
long long result; // rax
int v34; // [rsp+0h] [rbp-70h] BYREF
unsigned int v35; // [rsp+4h] [rbp-6Ch]
long long v36; // [rsp+8h] [rbp-68h]
long long v37; // [rsp+10h] [rbp-60h]
long long v38; // [rsp+18h] [rbp-58h]
long long v39; // [rsp+20h] [rbp-50h]
const __m128i *v40; // [rsp+28h] [rbp-48h]
_BOOL8 v41; // [rsp+30h] [rbp-40h]
unsigned int v42; // [rsp+38h] [rbp-38h]
unsigned int v43; // [rsp+3Ch] [rbp-34h]
const __m128i *v44; // [rsp+40h] [rbp-30h]
v6 = a5;
v35 = a4;
v7 = a1;
if ( a1->m128i_i8[0] )
{
v42 = a6;
v9 = a1[16].m128i_i64[0] == 0;
v43 = a2;
if ( v9 )
pthread_mutex_lock(&a1[12]);
else
psi_mutex_lock(
(long long)a1[12].m128i_i64,
(long long)"/workspace/llm4binary/github2025/eloqsql/mysys/mf_keycache.c",
0xAF2u);
v38 = v6;
while ( a1->m128i_i8[1] )
{
if ( a1->m128i_i8[2] )
break;
wait_on_queue(&a1[16].m128i_u64[1], &a1[12]);
}
v44 = a1 + 12;
++a1[7].m128i_i64[0];
v10 = a1[1].m128i_u32[2];
v41 = 0LL;
v11 = a3;
v12 = a3 % v10;
v39 = v38;
v13 = v42;
v40 = a1;
while ( v7->m128i_i8[3] )
{
v37 = (unsigned int)v12;
v14 = v11 - (unsigned int)v12;
v15 = v7[1].m128i_i32[2] - v12;
v42 = v13;
if ( v13 < v15 )
v15 = v13;
++v7[21].m128i_i64[0];
v16 = v7;
v17 = (const char *)v43;
key_block = find_key_block(v7, v43, v11 - (unsigned int)v12, v35, 0LL, &v34);
v20 = v7;
v21 = key_block;
v36 = v15;
if ( key_block )
{
if ( (*(_BYTE *)(key_block + 80) & 1) == 0 )
{
if ( v34 == 2 )
{
v17 = (const char *)v44;
wait_on_queue(key_block + 40, v44);
}
else if ( v34 == 1 )
{
v17 = (const char *)key_block;
read_block_primary(v40, key_block, v40[1].m128i_u32[2], v15 + (unsigned int)v12);
}
else if ( *(_DWORD *)(key_block + 76) < v15 + (unsigned int)v12 )
{
*(_DWORD *)my_thread_var(v16, v17, v19, v20) = -1;
*(_BYTE *)(v21 + 80) |= 1u;
}
}
if ( (*(_BYTE *)(v21 + 80) & 1) == 0 )
{
v23 = v40;
v24 = v40[16].m128i_i64[0];
if ( v24 )
(*((void ( **)(long long, const char *, long long, const __m128i *))PSI_server + 44))(
v24,
v17,
v19,
v20);
pthread_mutex_unlock(v44);
v17 = (const char *)(*(_QWORD *)(v21 + 64) + v37);
memcpy(v39, v17, v36);
if ( v23[16].m128i_i64[0] )
{
v17 = "/workspace/llm4binary/github2025/eloqsql/mysys/mf_keycache.c";
psi_mutex_lock(
(long long)v44,
(long long)"/workspace/llm4binary/github2025/eloqsql/mysys/mf_keycache.c",
0xB5Eu);
}
else
{
pthread_mutex_lock(v44);
}
}
remove_reader(v21, v17, v19, v20);
if ( (*(_BYTE *)(v21 + 80) & 1) != 0 )
{
v32 = v21;
v7 = v40;
free_block(v40, v32);
v41 = 1LL;
LABEL_42:
v27 = v41;
v6 = v38;
v30 = (long long)v44;
goto LABEL_43;
}
v25 = v21;
v7 = v40;
unreg_request(v40, v25, 1LL);
}
else
{
v37 = v11;
++v20[21].m128i_i64[1];
v7 = v20;
if ( v20[16].m128i_i64[0] )
(*((void (**)(void))PSI_server + 44))();
v22 = (long long)v44;
pthread_mutex_unlock(v44);
v41 = my_pread(v43, v39, v36, v37, 4LL) != 0;
if ( v7[16].m128i_i64[0] )
psi_mutex_lock(v22, (long long)"/workspace/llm4binary/github2025/eloqsql/mysys/mf_keycache.c", 0xB29u);
else
pthread_mutex_lock(v22);
}
v39 += v36;
v26 = v15 + (unsigned int)v12 + v14;
LODWORD(v12) = 0;
v11 = v26;
v13 = v42 - v15;
if ( v42 == v15 )
goto LABEL_42;
}
v28 = v11;
v29 = v13;
v7[21] = _mm_sub_epi64(_mm_loadu_si128(v7 + 21), (__m128i)-1LL);
if ( v7[16].m128i_i64[0] )
(*((void (**)(void))PSI_server + 44))();
v30 = (long long)v44;
pthread_mutex_unlock(v44);
v31 = my_pread(v43, v39, v29, v28, 4LL);
v27 = 1;
if ( !v31 )
v27 = v41;
v6 = v38;
if ( v7[16].m128i_i64[0] )
psi_mutex_lock(v30, (long long)"/workspace/llm4binary/github2025/eloqsql/mysys/mf_keycache.c", 0xB96u);
else
pthread_mutex_lock(v30);
LABEL_43:
v9 = v7[7].m128i_i64[0]-- == 1;
if ( v9 )
release_whole_queue(&v7[17]);
if ( v7[16].m128i_i64[0] )
(*((void (**)(void))PSI_server + 44))();
pthread_mutex_unlock(v30);
}
else
{
a1[21] = _mm_sub_epi64(_mm_loadu_si128(a1 + 21), (__m128i)-1LL);
v27 = my_pread(a2, a5, a6, a3, 4LL) != 0;
}
result = 0LL;
if ( !v27 )
return v6;
return result;
}
| simple_key_cache_read:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x48
MOV R14,R8
MOV dword ptr [RBP + -0x6c],ECX
MOV RCX,RDX
MOV R13,RDI
CMP byte ptr [RDI],0x0
JZ 0x001531cc
MOV R12,RCX
MOV dword ptr [RBP + -0x38],R9D
LEA R15,[R13 + 0xc0]
CMP qword ptr [R13 + 0x100],0x0
MOV dword ptr [RBP + -0x34],ESI
JNZ 0x001532e3
MOV RDI,R15
CALL 0x001285a0
LAB_00152f55:
MOV qword ptr [RBP + -0x58],R14
CMP byte ptr [R13 + 0x1],0x0
JZ 0x00152f80
LEA RBX,[R13 + 0x108]
LAB_00152f67:
CMP byte ptr [R13 + 0x2],0x0
JNZ 0x00152f80
MOV RDI,RBX
MOV RSI,R15
CALL 0x0015335c
CMP byte ptr [R13 + 0x1],0x0
JNZ 0x00152f67
LAB_00152f80:
MOV qword ptr [RBP + -0x30],R15
INC qword ptr [R13 + 0x70]
MOV ECX,dword ptr [R13 + 0x18]
MOV qword ptr [RBP + -0x40],0x0
MOV R15,R12
MOV RAX,R12
XOR EDX,EDX
DIV RCX
MOV R12,RDX
MOV RAX,qword ptr [RBP + -0x58]
MOV qword ptr [RBP + -0x50],RAX
MOV EAX,dword ptr [RBP + -0x38]
MOV qword ptr [RBP + -0x48],R13
LAB_00152fb1:
CMP byte ptr [R13 + 0x3],0x0
JZ 0x00153206
MOV ECX,R12D
MOV R14,R15
MOV qword ptr [RBP + -0x60],RCX
SUB R14,RCX
MOV EBX,dword ptr [R13 + 0x18]
SUB EBX,R12D
CMP EAX,EBX
MOV dword ptr [RBP + -0x38],EAX
CMOVC EBX,EAX
INC qword ptr [R13 + 0x150]
MOV RDI,R13
MOV ESI,dword ptr [RBP + -0x34]
MOV RDX,R14
MOV ECX,dword ptr [RBP + -0x6c]
XOR R8D,R8D
LEA R9,[RBP + -0x70]
CALL 0x001533ed
MOV RCX,R13
MOV R13,RAX
MOV EAX,EBX
MOV qword ptr [RBP + -0x68],RAX
TEST R13,R13
JZ 0x00153040
TEST byte ptr [R13 + 0x50],0x1
JNZ 0x001530d7
MOV EAX,dword ptr [RBP + -0x70]
CMP EAX,0x2
JZ 0x001530ab
CMP EAX,0x1
JNZ 0x001530bd
MOV RDI,qword ptr [RBP + -0x48]
MOV EDX,dword ptr [RDI + 0x18]
LEA ECX,[RBX + R12*0x1]
MOV RSI,R13
CALL 0x00153bee
JMP 0x001530d7
LAB_00153040:
MOV qword ptr [RBP + -0x60],R15
INC qword ptr [RCX + 0x158]
MOV RDI,qword ptr [RCX + 0x100]
TEST RDI,RDI
MOV R13,RCX
JNZ 0x00153172
LAB_0015305e:
MOV R15,qword ptr [RBP + -0x30]
MOV RDI,R15
CALL 0x00128280
MOV R8D,0x4
MOV EDI,dword ptr [RBP + -0x34]
MOV RSI,qword ptr [RBP + -0x50]
MOV RDX,qword ptr [RBP + -0x68]
MOV RCX,qword ptr [RBP + -0x60]
CALL 0x0015d8e0
XOR ECX,ECX
TEST RAX,RAX
SETNZ CL
MOV qword ptr [RBP + -0x40],RCX
CMP qword ptr [R13 + 0x100],0x0
JNZ 0x00153187
MOV RDI,R15
CALL 0x001285a0
JMP 0x0015314e
LAB_001530ab:
MOV RDI,R13
ADD RDI,0x28
MOV RSI,qword ptr [RBP + -0x30]
CALL 0x0015335c
JMP 0x001530d7
LAB_001530bd:
LEA EAX,[RBX + R12*0x1]
CMP dword ptr [R13 + 0x4c],EAX
JNC 0x001530d7
CALL 0x0015ed5e
MOV dword ptr [RAX],0xffffffff
OR byte ptr [R13 + 0x50],0x1
LAB_001530d7:
TEST byte ptr [R13 + 0x50],0x1
JNZ 0x00153127
MOV R15,qword ptr [RBP + -0x48]
MOV RDI,qword ptr [R15 + 0x100]
TEST RDI,RDI
JNZ 0x0015319d
LAB_001530f2:
MOV RDI,qword ptr [RBP + -0x30]
CALL 0x00128280
MOV RSI,qword ptr [RBP + -0x60]
ADD RSI,qword ptr [R13 + 0x40]
MOV RDI,qword ptr [RBP + -0x50]
MOV RDX,qword ptr [RBP + -0x68]
CALL 0x001282c0
CMP qword ptr [R15 + 0x100],0x0
JNZ 0x001531b2
MOV RDI,qword ptr [RBP + -0x30]
CALL 0x001285a0
LAB_00153127:
MOV RDI,R13
CALL 0x00153cbc
TEST byte ptr [R13 + 0x50],0x1
JNZ 0x00153280
MOV RDI,qword ptr [RBP + -0x48]
MOV RSI,R13
MOV R13,RDI
MOV EDX,0x1
CALL 0x00153d04
LAB_0015314e:
MOV RAX,qword ptr [RBP + -0x68]
ADD qword ptr [RBP + -0x50],RAX
ADD R12D,EBX
ADD R14,R12
XOR R12D,R12D
MOV R15,R14
MOV EAX,dword ptr [RBP + -0x38]
SUB EAX,EBX
JNZ 0x00152fb1
JMP 0x00153298
LAB_00153172:
LEA RAX,[0x4368c8]
MOV RAX,qword ptr [RAX]
CALL qword ptr [RAX + 0x160]
JMP 0x0015305e
LAB_00153187:
MOV RDI,R15
LEA RSI,[0x196cb9]
MOV EDX,0xb29
CALL 0x00129f5c
JMP 0x0015314e
LAB_0015319d:
LEA RAX,[0x4368c8]
MOV RAX,qword ptr [RAX]
CALL qword ptr [RAX + 0x160]
JMP 0x001530f2
LAB_001531b2:
MOV RDI,qword ptr [RBP + -0x30]
LEA RSI,[0x196cb9]
MOV EDX,0xb5e
CALL 0x00129f5c
JMP 0x00153127
LAB_001531cc:
MOVDQU XMM0,xmmword ptr [R13 + 0x150]
PCMPEQD XMM1,XMM1
PSUBQ XMM0,XMM1
MOVDQU xmmword ptr [R13 + 0x150],XMM0
MOV EDX,R9D
MOV R8D,0x4
MOV EDI,ESI
MOV RSI,R14
CALL 0x0015d8e0
XOR EBX,EBX
TEST RAX,RAX
SETNZ BL
JMP 0x001532cc
LAB_00153206:
MOV R14,R15
MOV EBX,EAX
MOVDQU XMM0,xmmword ptr [R13 + 0x150]
PCMPEQD XMM1,XMM1
PSUBQ XMM0,XMM1
MOVDQU xmmword ptr [R13 + 0x150],XMM0
MOV RDI,qword ptr [R13 + 0x100]
TEST RDI,RDI
JNZ 0x0015330e
LAB_00153235:
MOV R15,qword ptr [RBP + -0x30]
MOV RDI,R15
CALL 0x00128280
MOV EDX,EBX
MOV R8D,0x4
MOV EDI,dword ptr [RBP + -0x34]
MOV RSI,qword ptr [RBP + -0x50]
MOV RCX,R14
CALL 0x0015d8e0
TEST RAX,RAX
MOV EBX,0x1
CMOVZ EBX,dword ptr [RBP + -0x40]
CMP qword ptr [R13 + 0x100],0x0
MOV R14,qword ptr [RBP + -0x58]
JNZ 0x00153323
MOV RDI,R15
CALL 0x001285a0
JMP 0x001532a6
LAB_00153280:
MOV RDI,qword ptr [RBP + -0x48]
MOV RSI,R13
MOV R13,RDI
CALL 0x00153e0c
MOV EAX,0x1
MOV qword ptr [RBP + -0x40],RAX
LAB_00153298:
MOV RAX,qword ptr [RBP + -0x40]
MOV EBX,EAX
MOV R14,qword ptr [RBP + -0x58]
MOV R15,qword ptr [RBP + -0x30]
LAB_001532a6:
DEC qword ptr [R13 + 0x70]
JNZ 0x001532b8
LEA RDI,[R13 + 0x110]
CALL 0x00154611
LAB_001532b8:
MOV RDI,qword ptr [R13 + 0x100]
TEST RDI,RDI
JNZ 0x001532fc
LAB_001532c4:
MOV RDI,R15
CALL 0x00128280
LAB_001532cc:
XOR EAX,EAX
TEST EBX,EBX
CMOVZ RAX,R14
ADD RSP,0x48
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_001532e3:
LEA RSI,[0x196cb9]
MOV RDI,R15
MOV EDX,0xaf2
CALL 0x00129f5c
JMP 0x00152f55
LAB_001532fc:
LEA RAX,[0x4368c8]
MOV RAX,qword ptr [RAX]
CALL qword ptr [RAX + 0x160]
JMP 0x001532c4
LAB_0015330e:
LEA RAX,[0x4368c8]
MOV RAX,qword ptr [RAX]
CALL qword ptr [RAX + 0x160]
JMP 0x00153235
LAB_00153323:
LEA RSI,[0x196cb9]
MOV RDI,R15
MOV EDX,0xb96
CALL 0x00129f5c
JMP 0x001532a6
|
void * simple_key_cache_read
(char *param_1,int4 param_2,ulong param_3,int4 param_4,void *param_5,
uint param_6)
{
long *plVar1;
uint uVar2;
char *pcVar3;
uint uVar4;
long lVar5;
int4 *puVar6;
void *pvVar7;
ulong uVar8;
ulong uVar9;
int iVar10;
pthread_mutex_t *ppVar11;
int local_78;
int4 local_74;
ulong local_70;
ulong local_68;
void *local_60;
void *local_58;
char *local_50;
ulong local_48;
uint local_40;
int4 local_3c;
pthread_mutex_t *local_38;
local_74 = param_4;
if (*param_1 == '\0') {
*(long *)(param_1 + 0x150) = *(long *)(param_1 + 0x150) + 1;
*(long *)(param_1 + 0x158) = *(long *)(param_1 + 0x158) + 1;
lVar5 = my_pread(param_2,param_5,param_6,param_3,4);
uVar4 = (uint)(lVar5 != 0);
}
else {
ppVar11 = (pthread_mutex_t *)(param_1 + 0xc0);
local_40 = param_6;
local_3c = param_2;
if (*(long *)(param_1 + 0x100) == 0) {
pthread_mutex_lock(ppVar11);
}
else {
psi_mutex_lock(ppVar11,"/workspace/llm4binary/github2025/eloqsql/mysys/mf_keycache.c",0xaf2);
}
local_60 = param_5;
if (param_1[1] != '\0') {
do {
if (param_1[2] != '\0') break;
wait_on_queue(param_1 + 0x108,ppVar11);
} while (param_1[1] != '\0');
}
*(long *)(param_1 + 0x70) = *(long *)(param_1 + 0x70) + 1;
local_48 = 0;
uVar8 = param_3 % (ulong)*(uint *)(param_1 + 0x18);
local_58 = local_60;
uVar4 = local_40;
local_50 = param_1;
local_38 = ppVar11;
do {
if (param_1[3] == '\0') {
*(long *)(param_1 + 0x150) = *(long *)(param_1 + 0x150) + 1;
*(long *)(param_1 + 0x158) = *(long *)(param_1 + 0x158) + 1;
if (*(long *)(param_1 + 0x100) != 0) {
(**(code **)(PSI_server + 0x160))();
}
ppVar11 = local_38;
pthread_mutex_unlock(local_38);
lVar5 = my_pread(local_3c,local_58,uVar4,param_3,4);
param_5 = local_60;
uVar4 = 1;
if (lVar5 == 0) {
uVar4 = (uint)local_48;
}
if (*(long *)(param_1 + 0x100) == 0) {
pthread_mutex_lock(ppVar11);
}
else {
psi_mutex_lock(ppVar11,"/workspace/llm4binary/github2025/eloqsql/mysys/mf_keycache.c",
0xb96);
}
goto LAB_001532a6;
}
iVar10 = (int)uVar8;
uVar2 = *(int *)(param_1 + 0x18) - iVar10;
if (uVar4 < (uint)(*(int *)(param_1 + 0x18) - iVar10)) {
uVar2 = uVar4;
}
uVar9 = (ulong)uVar2;
*(long *)(param_1 + 0x150) = *(long *)(param_1 + 0x150) + 1;
local_68 = uVar8;
local_40 = uVar4;
lVar5 = find_key_block(param_1,local_3c,param_3 - uVar8,local_74,0,&local_78);
local_70 = uVar9;
if (lVar5 == 0) {
*(long *)(param_1 + 0x158) = *(long *)(param_1 + 0x158) + 1;
local_68 = param_3;
if (*(long *)(param_1 + 0x100) != 0) {
(**(code **)(PSI_server + 0x160))();
}
ppVar11 = local_38;
pthread_mutex_unlock(local_38);
lVar5 = my_pread(local_3c,local_58,local_70,local_68);
local_48 = (ulong)(lVar5 != 0);
if (*(long *)(param_1 + 0x100) == 0) {
pthread_mutex_lock(ppVar11);
}
else {
psi_mutex_lock(ppVar11,"/workspace/llm4binary/github2025/eloqsql/mysys/mf_keycache.c",
0xb29);
}
}
else {
if ((*(byte *)(lVar5 + 0x50) & 1) == 0) {
if (local_78 == 2) {
wait_on_queue(lVar5 + 0x28,local_38);
}
else if (local_78 == 1) {
read_block_primary(local_50,lVar5,*(int4 *)(local_50 + 0x18),uVar2 + iVar10);
}
else if (*(uint *)(lVar5 + 0x4c) < uVar2 + iVar10) {
puVar6 = (int4 *)_my_thread_var();
*puVar6 = 0xffffffff;
*(byte *)(lVar5 + 0x50) = *(byte *)(lVar5 + 0x50) | 1;
}
}
pcVar3 = local_50;
if ((*(byte *)(lVar5 + 0x50) & 1) == 0) {
if (*(long *)(local_50 + 0x100) != 0) {
(**(code **)(PSI_server + 0x160))();
}
pthread_mutex_unlock(local_38);
memcpy(local_58,(void *)(local_68 + *(long *)(lVar5 + 0x40)),local_70);
if (*(long *)(pcVar3 + 0x100) == 0) {
pthread_mutex_lock(local_38);
}
else {
psi_mutex_lock(local_38,"/workspace/llm4binary/github2025/eloqsql/mysys/mf_keycache.c",
0xb5e);
}
}
remove_reader(lVar5);
param_1 = local_50;
if ((*(byte *)(lVar5 + 0x50) & 1) != 0) {
free_block(local_50,lVar5);
local_48 = 1;
break;
}
unreg_request(local_50,lVar5,1);
}
local_58 = (void *)((long)local_58 + local_70);
param_3 = (param_3 - uVar8) + (ulong)(iVar10 + uVar2);
uVar8 = 0;
uVar4 = local_40 - uVar2;
} while (uVar4 != 0);
uVar4 = (uint)local_48;
param_5 = local_60;
ppVar11 = local_38;
LAB_001532a6:
plVar1 = (long *)(param_1 + 0x70);
*plVar1 = *plVar1 + -1;
if (*plVar1 == 0) {
release_whole_queue(param_1 + 0x110);
}
if (*(long *)(param_1 + 0x100) != 0) {
(**(code **)(PSI_server + 0x160))();
}
pthread_mutex_unlock(ppVar11);
}
pvVar7 = (void *)0x0;
if (uVar4 == 0) {
pvVar7 = param_5;
}
return pvVar7;
}
|
|
6,363 | OpenSubdiv::v3_6_0::Vtr::internal::Refinement::populateVertexTagsFromParentFaces() | NVIDIA-RTX[P]OSD-Lite/opensubdiv/vtr/../vtr/refinement.h | int getNumChildVerticesFromFaces() const { return _childVertFromFaceCount; } | O1 | c | OpenSubdiv::v3_6_0::Vtr::internal::Refinement::populateVertexTagsFromParentFaces():
movslq 0x34(%rdi), %rdx
testq %rdx, %rdx
je 0x49e1f
movslq 0x4c(%rdi), %rax
leaq (%rax,%rdx), %rcx
movq 0x8(%rdi), %rsi
cmpl $0x0, 0xc(%rsi)
jle 0x49dd7
testl %edx, %edx
jle 0x49e1f
movslq %ecx, %rcx
movq 0x10(%rdi), %rdx
movq 0x1b0(%rdx), %rdx
movw $0x80, (%rdx,%rax,2)
incq %rax
cmpq %rcx, %rax
jl 0x49dbc
jmp 0x49e1f
testl %edx, %edx
jle 0x49e1f
movq 0x10(%rdi), %rdx
movq 0x1b0(%rdx), %rdx
movw $0x80, (%rdx,%rax,2)
movq 0x8(%rdi), %rdx
movq 0x138(%rdi), %rsi
movslq (%rsi,%rax,4), %rsi
movq 0x18(%rdx), %rdx
movl (%rdx,%rsi,8), %edx
cmpl 0x20(%rdi), %edx
je 0x49e17
movq 0x10(%rdi), %rdx
movq 0x1b0(%rdx), %rdx
orw $0x2, (%rdx,%rax,2)
incq %rax
cmpq %rcx, %rax
jl 0x49ddb
retq
| _ZN10OpenSubdiv6v3_6_03Vtr8internal10Refinement33populateVertexTagsFromParentFacesEv:
movsxd rdx, dword ptr [rdi+34h]
test rdx, rdx
jz short locret_49E1F
movsxd rax, dword ptr [rdi+4Ch]
lea rcx, [rax+rdx]
mov rsi, [rdi+8]
cmp dword ptr [rsi+0Ch], 0
jle short loc_49DD7
test edx, edx
jle short locret_49E1F
movsxd rcx, ecx
loc_49DBC:
mov rdx, [rdi+10h]
mov rdx, [rdx+1B0h]
mov word ptr [rdx+rax*2], 80h
inc rax
cmp rax, rcx
jl short loc_49DBC
jmp short locret_49E1F
loc_49DD7:
test edx, edx
jle short locret_49E1F
loc_49DDB:
mov rdx, [rdi+10h]
mov rdx, [rdx+1B0h]
mov word ptr [rdx+rax*2], 80h
mov rdx, [rdi+8]
mov rsi, [rdi+138h]
movsxd rsi, dword ptr [rsi+rax*4]
mov rdx, [rdx+18h]
mov edx, [rdx+rsi*8]
cmp edx, [rdi+20h]
jz short loc_49E17
mov rdx, [rdi+10h]
mov rdx, [rdx+1B0h]
or word ptr [rdx+rax*2], 2
loc_49E17:
inc rax
cmp rax, rcx
jl short loc_49DDB
locret_49E1F:
retn
| void OpenSubdiv::v3_6_0::Vtr::internal::Refinement::populateVertexTagsFromParentFaces(
OpenSubdiv::v3_6_0::Vtr::internal::Refinement *this)
{
long long v1; // rdx
long long v2; // rax
long long v3; // rcx
v1 = *((int *)this + 13);
if ( *((_DWORD *)this + 13) )
{
v2 = *((int *)this + 19);
v3 = v2 + v1;
if ( *(int *)(*((_QWORD *)this + 1) + 12LL) <= 0 )
{
if ( (int)v1 > 0 )
{
do
{
*(_WORD *)(*(_QWORD *)(*((_QWORD *)this + 2) + 432LL) + 2 * v2) = 128;
if ( *(_DWORD *)(*(_QWORD *)(*((_QWORD *)this + 1) + 24LL) + 8LL * *(int *)(*((_QWORD *)this + 39) + 4 * v2)) != *((_DWORD *)this + 8) )
*(_WORD *)(*(_QWORD *)(*((_QWORD *)this + 2) + 432LL) + 2 * v2) |= 2u;
++v2;
}
while ( v2 < v3 );
}
}
else if ( (int)v1 > 0 )
{
do
*(_WORD *)(*(_QWORD *)(*((_QWORD *)this + 2) + 432LL) + 2 * v2++) = 128;
while ( v2 < (int)v3 );
}
}
}
| populateVertexTagsFromParentFaces:
MOVSXD RDX,dword ptr [RDI + 0x34]
TEST RDX,RDX
JZ 0x00149e1f
MOVSXD RAX,dword ptr [RDI + 0x4c]
LEA RCX,[RAX + RDX*0x1]
MOV RSI,qword ptr [RDI + 0x8]
CMP dword ptr [RSI + 0xc],0x0
JLE 0x00149dd7
TEST EDX,EDX
JLE 0x00149e1f
MOVSXD RCX,ECX
LAB_00149dbc:
MOV RDX,qword ptr [RDI + 0x10]
MOV RDX,qword ptr [RDX + 0x1b0]
MOV word ptr [RDX + RAX*0x2],0x80
INC RAX
CMP RAX,RCX
JL 0x00149dbc
JMP 0x00149e1f
LAB_00149dd7:
TEST EDX,EDX
JLE 0x00149e1f
LAB_00149ddb:
MOV RDX,qword ptr [RDI + 0x10]
MOV RDX,qword ptr [RDX + 0x1b0]
MOV word ptr [RDX + RAX*0x2],0x80
MOV RDX,qword ptr [RDI + 0x8]
MOV RSI,qword ptr [RDI + 0x138]
MOVSXD RSI,dword ptr [RSI + RAX*0x4]
MOV RDX,qword ptr [RDX + 0x18]
MOV EDX,dword ptr [RDX + RSI*0x8]
CMP EDX,dword ptr [RDI + 0x20]
JZ 0x00149e17
MOV RDX,qword ptr [RDI + 0x10]
MOV RDX,qword ptr [RDX + 0x1b0]
OR word ptr [RDX + RAX*0x2],0x2
LAB_00149e17:
INC RAX
CMP RAX,RCX
JL 0x00149ddb
LAB_00149e1f:
RET
|
/* OpenSubdiv::v3_6_0::Vtr::internal::Refinement::populateVertexTagsFromParentFaces() */
void __thiscall
OpenSubdiv::v3_6_0::Vtr::internal::Refinement::populateVertexTagsFromParentFaces(Refinement *this)
{
long lVar1;
ushort *puVar2;
int iVar3;
long lVar4;
iVar3 = *(int *)(this + 0x34);
if ((long)iVar3 != 0) {
lVar4 = (long)*(int *)(this + 0x4c);
lVar1 = lVar4 + iVar3;
if (*(int *)(*(long *)(this + 8) + 0xc) < 1) {
if (0 < iVar3) {
do {
*(int2 *)(*(long *)(*(long *)(this + 0x10) + 0x1b0) + lVar4 * 2) = 0x80;
if (*(int *)(*(long *)(*(long *)(this + 8) + 0x18) +
(long)*(int *)(*(long *)(this + 0x138) + lVar4 * 4) * 8) !=
*(int *)(this + 0x20)) {
puVar2 = (ushort *)(*(long *)(*(long *)(this + 0x10) + 0x1b0) + lVar4 * 2);
*puVar2 = *puVar2 | 2;
}
lVar4 = lVar4 + 1;
} while (lVar4 < lVar1);
}
}
else if (0 < iVar3) {
do {
*(int2 *)(*(long *)(*(long *)(this + 0x10) + 0x1b0) + lVar4 * 2) = 0x80;
lVar4 = lVar4 + 1;
} while (lVar4 < (int)lVar1);
}
}
return;
}
|
|
6,364 | OpenSubdiv::v3_6_0::Vtr::internal::Refinement::populateVertexTagsFromParentFaces() | NVIDIA-RTX[P]OSD-Lite/opensubdiv/vtr/../vtr/refinement.h | int getNumChildVerticesFromFaces() const { return _childVertFromFaceCount; } | O3 | c | OpenSubdiv::v3_6_0::Vtr::internal::Refinement::populateVertexTagsFromParentFaces():
movslq 0x34(%rdi), %rdx
testq %rdx, %rdx
je 0x4c07d
movslq 0x4c(%rdi), %rax
leaq (%rax,%rdx), %rcx
movq 0x8(%rdi), %rsi
cmpl $0x0, 0xc(%rsi)
jle 0x4c035
testl %edx, %edx
jle 0x4c07d
movslq %ecx, %rcx
movq 0x10(%rdi), %rdx
movq 0x1b0(%rdx), %rdx
movw $0x80, (%rdx,%rax,2)
incq %rax
cmpq %rcx, %rax
jl 0x4c01a
jmp 0x4c07d
testl %edx, %edx
jle 0x4c07d
movq 0x10(%rdi), %rdx
movq 0x1b0(%rdx), %rdx
movw $0x80, (%rdx,%rax,2)
movq 0x8(%rdi), %rdx
movq 0x138(%rdi), %rsi
movslq (%rsi,%rax,4), %rsi
movq 0x18(%rdx), %rdx
movl (%rdx,%rsi,8), %edx
cmpl 0x20(%rdi), %edx
je 0x4c075
movq 0x10(%rdi), %rdx
movq 0x1b0(%rdx), %rdx
orw $0x2, (%rdx,%rax,2)
incq %rax
cmpq %rcx, %rax
jl 0x4c039
retq
| _ZN10OpenSubdiv6v3_6_03Vtr8internal10Refinement33populateVertexTagsFromParentFacesEv:
movsxd rdx, dword ptr [rdi+34h]
test rdx, rdx
jz short locret_4C07D
movsxd rax, dword ptr [rdi+4Ch]
lea rcx, [rax+rdx]
mov rsi, [rdi+8]
cmp dword ptr [rsi+0Ch], 0
jle short loc_4C035
test edx, edx
jle short locret_4C07D
movsxd rcx, ecx
loc_4C01A:
mov rdx, [rdi+10h]
mov rdx, [rdx+1B0h]
mov word ptr [rdx+rax*2], 80h
inc rax
cmp rax, rcx
jl short loc_4C01A
jmp short locret_4C07D
loc_4C035:
test edx, edx
jle short locret_4C07D
loc_4C039:
mov rdx, [rdi+10h]
mov rdx, [rdx+1B0h]
mov word ptr [rdx+rax*2], 80h
mov rdx, [rdi+8]
mov rsi, [rdi+138h]
movsxd rsi, dword ptr [rsi+rax*4]
mov rdx, [rdx+18h]
mov edx, [rdx+rsi*8]
cmp edx, [rdi+20h]
jz short loc_4C075
mov rdx, [rdi+10h]
mov rdx, [rdx+1B0h]
or word ptr [rdx+rax*2], 2
loc_4C075:
inc rax
cmp rax, rcx
jl short loc_4C039
locret_4C07D:
retn
| void OpenSubdiv::v3_6_0::Vtr::internal::Refinement::populateVertexTagsFromParentFaces(
OpenSubdiv::v3_6_0::Vtr::internal::Refinement *this)
{
long long v1; // rdx
long long v2; // rax
long long v3; // rcx
v1 = *((int *)this + 13);
if ( *((_DWORD *)this + 13) )
{
v2 = *((int *)this + 19);
v3 = v2 + v1;
if ( *(int *)(*((_QWORD *)this + 1) + 12LL) <= 0 )
{
if ( (int)v1 > 0 )
{
do
{
*(_WORD *)(*(_QWORD *)(*((_QWORD *)this + 2) + 432LL) + 2 * v2) = 128;
if ( *(_DWORD *)(*(_QWORD *)(*((_QWORD *)this + 1) + 24LL) + 8LL * *(int *)(*((_QWORD *)this + 39) + 4 * v2)) != *((_DWORD *)this + 8) )
*(_WORD *)(*(_QWORD *)(*((_QWORD *)this + 2) + 432LL) + 2 * v2) |= 2u;
++v2;
}
while ( v2 < v3 );
}
}
else if ( (int)v1 > 0 )
{
do
*(_WORD *)(*(_QWORD *)(*((_QWORD *)this + 2) + 432LL) + 2 * v2++) = 128;
while ( v2 < (int)v3 );
}
}
}
| populateVertexTagsFromParentFaces:
MOVSXD RDX,dword ptr [RDI + 0x34]
TEST RDX,RDX
JZ 0x0014c07d
MOVSXD RAX,dword ptr [RDI + 0x4c]
LEA RCX,[RAX + RDX*0x1]
MOV RSI,qword ptr [RDI + 0x8]
CMP dword ptr [RSI + 0xc],0x0
JLE 0x0014c035
TEST EDX,EDX
JLE 0x0014c07d
MOVSXD RCX,ECX
LAB_0014c01a:
MOV RDX,qword ptr [RDI + 0x10]
MOV RDX,qword ptr [RDX + 0x1b0]
MOV word ptr [RDX + RAX*0x2],0x80
INC RAX
CMP RAX,RCX
JL 0x0014c01a
JMP 0x0014c07d
LAB_0014c035:
TEST EDX,EDX
JLE 0x0014c07d
LAB_0014c039:
MOV RDX,qword ptr [RDI + 0x10]
MOV RDX,qword ptr [RDX + 0x1b0]
MOV word ptr [RDX + RAX*0x2],0x80
MOV RDX,qword ptr [RDI + 0x8]
MOV RSI,qword ptr [RDI + 0x138]
MOVSXD RSI,dword ptr [RSI + RAX*0x4]
MOV RDX,qword ptr [RDX + 0x18]
MOV EDX,dword ptr [RDX + RSI*0x8]
CMP EDX,dword ptr [RDI + 0x20]
JZ 0x0014c075
MOV RDX,qword ptr [RDI + 0x10]
MOV RDX,qword ptr [RDX + 0x1b0]
OR word ptr [RDX + RAX*0x2],0x2
LAB_0014c075:
INC RAX
CMP RAX,RCX
JL 0x0014c039
LAB_0014c07d:
RET
|
/* OpenSubdiv::v3_6_0::Vtr::internal::Refinement::populateVertexTagsFromParentFaces() */
void __thiscall
OpenSubdiv::v3_6_0::Vtr::internal::Refinement::populateVertexTagsFromParentFaces(Refinement *this)
{
long lVar1;
ushort *puVar2;
int iVar3;
long lVar4;
iVar3 = *(int *)(this + 0x34);
if ((long)iVar3 != 0) {
lVar4 = (long)*(int *)(this + 0x4c);
lVar1 = lVar4 + iVar3;
if (*(int *)(*(long *)(this + 8) + 0xc) < 1) {
if (0 < iVar3) {
do {
*(int2 *)(*(long *)(*(long *)(this + 0x10) + 0x1b0) + lVar4 * 2) = 0x80;
if (*(int *)(*(long *)(*(long *)(this + 8) + 0x18) +
(long)*(int *)(*(long *)(this + 0x138) + lVar4 * 4) * 8) !=
*(int *)(this + 0x20)) {
puVar2 = (ushort *)(*(long *)(*(long *)(this + 0x10) + 0x1b0) + lVar4 * 2);
*puVar2 = *puVar2 | 2;
}
lVar4 = lVar4 + 1;
} while (lVar4 < lVar1);
}
}
else if (0 < iVar3) {
do {
*(int2 *)(*(long *)(*(long *)(this + 0x10) + 0x1b0) + lVar4 * 2) = 0x80;
lVar4 = lVar4 + 1;
} while (lVar4 < (int)lVar1);
}
}
return;
}
|
|
6,365 | LefDefParser::lefiTiming::addToPin(char const*) | Efficient-TDP/thirdparty/Limbo/limbo/thirdparty/lefdef/5.8/lef/lef/lefiMacro.cpp | void
lefiTiming::addToPin(const char *name)
{
if (numTo_ == toAllocated_) {
int lim;
int i;
char **n;
if (toAllocated_ == 0)
lim = toAllocated_ = 2;
else
lim = toAllocated_ *= 2;
n = (char**) lefMalloc(sizeof(char*) * lim);
lim = numTo_;
for (i = 0; i < lim; i++)
n[i] = to_[i];
lefFree((char*) (to_));
to_ = n;
}
to_[(numTo_)++] = (char*) name;
} | O0 | cpp | LefDefParser::lefiTiming::addToPin(char const*):
subq $0x28, %rsp
movq %rdi, 0x20(%rsp)
movq %rsi, 0x18(%rsp)
movq 0x20(%rsp), %rcx
movq %rcx, (%rsp)
movl 0x14(%rcx), %eax
cmpl 0x20(%rcx), %eax
jne 0x48e2b
movq (%rsp), %rax
cmpl $0x0, 0x20(%rax)
jne 0x48da2
movq (%rsp), %rax
movl $0x2, 0x20(%rax)
movl $0x2, 0x14(%rsp)
jmp 0x48db2
movq (%rsp), %rcx
movl 0x20(%rcx), %eax
shll %eax
movl %eax, 0x20(%rcx)
movl %eax, 0x14(%rsp)
movslq 0x14(%rsp), %rdi
shlq $0x3, %rdi
callq 0x359d0
movq %rax, %rcx
movq (%rsp), %rax
movq %rcx, 0x8(%rsp)
movl 0x14(%rax), %eax
movl %eax, 0x14(%rsp)
movl $0x0, 0x10(%rsp)
movl 0x10(%rsp), %eax
cmpl 0x14(%rsp), %eax
jge 0x48e11
movq (%rsp), %rax
movq 0x18(%rax), %rax
movslq 0x10(%rsp), %rcx
movq (%rax,%rcx,8), %rdx
movq 0x8(%rsp), %rax
movslq 0x10(%rsp), %rcx
movq %rdx, (%rax,%rcx,8)
movl 0x10(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x10(%rsp)
jmp 0x48ddb
movq (%rsp), %rax
movq 0x18(%rax), %rdi
callq 0x38c90
movq (%rsp), %rax
movq 0x8(%rsp), %rcx
movq %rcx, 0x18(%rax)
movq (%rsp), %rsi
movq 0x18(%rsp), %rdx
movq 0x18(%rsi), %rax
movl 0x14(%rsi), %ecx
movl %ecx, %edi
addl $0x1, %edi
movl %edi, 0x14(%rsi)
movslq %ecx, %rcx
movq %rdx, (%rax,%rcx,8)
addq $0x28, %rsp
retq
nop
| _ZN12LefDefParser10lefiTiming8addToPinEPKc:
sub rsp, 28h
mov [rsp+28h+var_8], rdi
mov [rsp+28h+var_10], rsi
mov rcx, [rsp+28h+var_8]
mov [rsp+28h+var_28], rcx
mov eax, [rcx+14h]
cmp eax, [rcx+20h]
jnz loc_48E2B
mov rax, [rsp+28h+var_28]
cmp dword ptr [rax+20h], 0
jnz short loc_48DA2
mov rax, [rsp+28h+var_28]
mov dword ptr [rax+20h], 2
mov [rsp+28h+var_14], 2
jmp short loc_48DB2
loc_48DA2:
mov rcx, [rsp+28h+var_28]
mov eax, [rcx+20h]
shl eax, 1
mov [rcx+20h], eax
mov [rsp+28h+var_14], eax
loc_48DB2:
movsxd rdi, [rsp+28h+var_14]
shl rdi, 3; this
call _ZN12LefDefParser9lefMallocEm; LefDefParser::lefMalloc(ulong)
mov rcx, rax
mov rax, [rsp+28h+var_28]
mov [rsp+28h+var_20], rcx
mov eax, [rax+14h]
mov [rsp+28h+var_14], eax
mov [rsp+28h+var_18], 0
loc_48DDB:
mov eax, [rsp+28h+var_18]
cmp eax, [rsp+28h+var_14]
jge short loc_48E11
mov rax, [rsp+28h+var_28]
mov rax, [rax+18h]
movsxd rcx, [rsp+28h+var_18]
mov rdx, [rax+rcx*8]
mov rax, [rsp+28h+var_20]
movsxd rcx, [rsp+28h+var_18]
mov [rax+rcx*8], rdx
mov eax, [rsp+28h+var_18]
add eax, 1
mov [rsp+28h+var_18], eax
jmp short loc_48DDB
loc_48E11:
mov rax, [rsp+28h+var_28]
mov rdi, [rax+18h]; this
call _ZN12LefDefParser7lefFreeEPv; LefDefParser::lefFree(void *)
mov rax, [rsp+28h+var_28]
mov rcx, [rsp+28h+var_20]
mov [rax+18h], rcx
loc_48E2B:
mov rsi, [rsp+28h+var_28]
mov rdx, [rsp+28h+var_10]
mov rax, [rsi+18h]
mov ecx, [rsi+14h]
mov edi, ecx
add edi, 1
mov [rsi+14h], edi
movsxd rcx, ecx
mov [rax+rcx*8], rdx
add rsp, 28h
retn
| long long LefDefParser::lefiTiming::addToPin(LefDefParser::lefiTiming *this, char *a2)
{
int v2; // eax
long long result; // rax
int v4; // ecx
long long v5; // [rsp+8h] [rbp-20h]
int i; // [rsp+10h] [rbp-18h]
int v7; // [rsp+14h] [rbp-14h]
int v8; // [rsp+14h] [rbp-14h]
if ( *((_DWORD *)this + 5) == *((_DWORD *)this + 8) )
{
if ( *((_DWORD *)this + 8) )
{
v2 = 2 * *((_DWORD *)this + 8);
*((_DWORD *)this + 8) = v2;
v7 = v2;
}
else
{
*((_DWORD *)this + 8) = 2;
v7 = 2;
}
v5 = LefDefParser::lefMalloc((LefDefParser *)(8LL * v7));
v8 = *((_DWORD *)this + 5);
for ( i = 0; i < v8; ++i )
*(_QWORD *)(v5 + 8LL * i) = *(_QWORD *)(*((_QWORD *)this + 3) + 8LL * i);
LefDefParser::lefFree(*((LefDefParser **)this + 3), a2);
*((_QWORD *)this + 3) = v5;
}
result = *((_QWORD *)this + 3);
v4 = *((_DWORD *)this + 5);
*((_DWORD *)this + 5) = v4 + 1;
*(_QWORD *)(result + 8LL * v4) = a2;
return result;
}
| addToPin:
SUB RSP,0x28
MOV qword ptr [RSP + 0x20],RDI
MOV qword ptr [RSP + 0x18],RSI
MOV RCX,qword ptr [RSP + 0x20]
MOV qword ptr [RSP],RCX
MOV EAX,dword ptr [RCX + 0x14]
CMP EAX,dword ptr [RCX + 0x20]
JNZ 0x00148e2b
MOV RAX,qword ptr [RSP]
CMP dword ptr [RAX + 0x20],0x0
JNZ 0x00148da2
MOV RAX,qword ptr [RSP]
MOV dword ptr [RAX + 0x20],0x2
MOV dword ptr [RSP + 0x14],0x2
JMP 0x00148db2
LAB_00148da2:
MOV RCX,qword ptr [RSP]
MOV EAX,dword ptr [RCX + 0x20]
SHL EAX,0x1
MOV dword ptr [RCX + 0x20],EAX
MOV dword ptr [RSP + 0x14],EAX
LAB_00148db2:
MOVSXD RDI,dword ptr [RSP + 0x14]
SHL RDI,0x3
CALL 0x001359d0
MOV RCX,RAX
MOV RAX,qword ptr [RSP]
MOV qword ptr [RSP + 0x8],RCX
MOV EAX,dword ptr [RAX + 0x14]
MOV dword ptr [RSP + 0x14],EAX
MOV dword ptr [RSP + 0x10],0x0
LAB_00148ddb:
MOV EAX,dword ptr [RSP + 0x10]
CMP EAX,dword ptr [RSP + 0x14]
JGE 0x00148e11
MOV RAX,qword ptr [RSP]
MOV RAX,qword ptr [RAX + 0x18]
MOVSXD RCX,dword ptr [RSP + 0x10]
MOV RDX,qword ptr [RAX + RCX*0x8]
MOV RAX,qword ptr [RSP + 0x8]
MOVSXD RCX,dword ptr [RSP + 0x10]
MOV qword ptr [RAX + RCX*0x8],RDX
MOV EAX,dword ptr [RSP + 0x10]
ADD EAX,0x1
MOV dword ptr [RSP + 0x10],EAX
JMP 0x00148ddb
LAB_00148e11:
MOV RAX,qword ptr [RSP]
MOV RDI,qword ptr [RAX + 0x18]
CALL 0x00138c90
MOV RAX,qword ptr [RSP]
MOV RCX,qword ptr [RSP + 0x8]
MOV qword ptr [RAX + 0x18],RCX
LAB_00148e2b:
MOV RSI,qword ptr [RSP]
MOV RDX,qword ptr [RSP + 0x18]
MOV RAX,qword ptr [RSI + 0x18]
MOV ECX,dword ptr [RSI + 0x14]
MOV EDI,ECX
ADD EDI,0x1
MOV dword ptr [RSI + 0x14],EDI
MOVSXD RCX,ECX
MOV qword ptr [RAX + RCX*0x8],RDX
ADD RSP,0x28
RET
|
/* LefDefParser::lefiTiming::addToPin(char const*) */
void __thiscall LefDefParser::lefiTiming::addToPin(lefiTiming *this,char *param_1)
{
int iVar1;
long lVar2;
int local_18;
int local_14;
if (*(int *)(this + 0x14) == *(int *)(this + 0x20)) {
if (*(int *)(this + 0x20) == 0) {
*(int4 *)(this + 0x20) = 2;
local_14 = 2;
}
else {
local_14 = *(int *)(this + 0x20) << 1;
*(int *)(this + 0x20) = local_14;
}
lVar2 = lefMalloc((long)local_14 << 3);
iVar1 = *(int *)(this + 0x14);
for (local_18 = 0; local_18 < iVar1; local_18 = local_18 + 1) {
*(int8 *)(lVar2 + (long)local_18 * 8) =
*(int8 *)(*(long *)(this + 0x18) + (long)local_18 * 8);
}
lefFree(*(void **)(this + 0x18));
*(long *)(this + 0x18) = lVar2;
}
iVar1 = *(int *)(this + 0x14);
*(int *)(this + 0x14) = iVar1 + 1;
*(char **)(*(long *)(this + 0x18) + (long)iVar1 * 8) = param_1;
return;
}
|
|
6,366 | ssz_add_bytes | corpus-core[P]colibri-stateless/src/util/ssz_builder.c | void ssz_add_bytes(ssz_builder_t* buffer, const char* name, bytes_t data) {
const ssz_def_t* def = find_def(buffer->def, name);
if (!def) {
printf("ssz_add_bytes: name %s not found in %s\n", name, buffer->def->name);
return;
}
buffer_t* bytes = &(buffer->fixed);
size_t fixed_length = 0;
// check offset
size_t offset = 0;
for (int i = 0; i < buffer->def->def.container.len; i++) {
if (buffer->def->def.container.elements + i == def) {
if (offset != buffer->fixed.data.len) {
printf("ssz_add_bytes: %d ( +%d ) %s\n", buffer->fixed.data.len, data.len, name);
printf("ssz_add_bytes: offset mismatch %zu != %d\n", offset, buffer->fixed.data.len);
}
break;
}
offset += ssz_fixed_length(buffer->def->def.container.elements + i);
}
if (ssz_is_dynamic(def)) {
offset = 0;
for (int i = 0; i < buffer->def->def.container.len; i++)
offset += ssz_fixed_length(buffer->def->def.container.elements + i);
ssz_add_uint32(buffer, offset + buffer->dynamic.data.len);
bytes = &(buffer->dynamic);
}
else
fixed_length = ssz_fixed_length(def);
if (fixed_length && data.len < fixed_length)
buffer_append(bytes, bytes(NULL, fixed_length - data.len));
buffer_append(bytes, data);
} | O0 | c | ssz_add_bytes:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movl %edx, -0x10(%rbp)
movq %rcx, -0x8(%rbp)
movq %rdi, -0x18(%rbp)
movq %rsi, -0x20(%rbp)
movq -0x18(%rbp), %rax
movq (%rax), %rdi
movq -0x20(%rbp), %rsi
callq 0xa2480
movq %rax, -0x28(%rbp)
cmpq $0x0, -0x28(%rbp)
jne 0xa25e3
movq -0x20(%rbp), %rsi
movq -0x18(%rbp), %rax
movq (%rax), %rax
movq (%rax), %rdx
leaq 0x43229(%rip), %rdi # 0xe5800
movb $0x0, %al
callq 0x23050
jmp 0xa2781
movq -0x18(%rbp), %rax
addq $0x8, %rax
movq %rax, -0x30(%rbp)
movq $0x0, -0x38(%rbp)
movq $0x0, -0x40(%rbp)
movl $0x0, -0x44(%rbp)
movl -0x44(%rbp), %eax
movq -0x18(%rbp), %rcx
movq (%rcx), %rcx
cmpl 0x18(%rcx), %eax
jae 0xa26ad
movq -0x18(%rbp), %rax
movq (%rax), %rax
movq 0x10(%rax), %rax
movslq -0x44(%rbp), %rcx
shlq $0x5, %rcx
addq %rcx, %rax
cmpq -0x28(%rbp), %rax
jne 0xa267c
movq -0x40(%rbp), %rax
movq -0x18(%rbp), %rcx
movl 0x8(%rcx), %ecx
cmpq %rcx, %rax
je 0xa267a
movq -0x18(%rbp), %rax
movl 0x8(%rax), %esi
movl -0x10(%rbp), %edx
movq -0x20(%rbp), %rcx
leaq 0x431ce(%rip), %rdi # 0xe5828
movb $0x0, %al
callq 0x23050
movq -0x40(%rbp), %rsi
movq -0x18(%rbp), %rax
movl 0x8(%rax), %edx
leaq 0x431d3(%rip), %rdi # 0xe5846
movb $0x0, %al
callq 0x23050
jmp 0xa26ad
movq -0x18(%rbp), %rax
movq (%rax), %rax
movq 0x10(%rax), %rdi
movslq -0x44(%rbp), %rax
shlq $0x5, %rax
addq %rax, %rdi
callq 0x9e070
addq -0x40(%rbp), %rax
movq %rax, -0x40(%rbp)
movl -0x44(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x44(%rbp)
jmp 0xa2606
movq -0x28(%rbp), %rdi
callq 0x9dfd0
testb $0x1, %al
jne 0xa26bc
jmp 0xa272f
movq $0x0, -0x40(%rbp)
movl $0x0, -0x48(%rbp)
movl -0x48(%rbp), %eax
movq -0x18(%rbp), %rcx
movq (%rcx), %rcx
cmpl 0x18(%rcx), %eax
jae 0xa2708
movq -0x18(%rbp), %rax
movq (%rax), %rax
movq 0x10(%rax), %rdi
movslq -0x48(%rbp), %rax
shlq $0x5, %rax
addq %rax, %rdi
callq 0x9e070
addq -0x40(%rbp), %rax
movq %rax, -0x40(%rbp)
movl -0x48(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x48(%rbp)
jmp 0xa26cb
movq -0x18(%rbp), %rdi
movq -0x40(%rbp), %rax
movq -0x18(%rbp), %rcx
movl 0x20(%rcx), %ecx
addq %rcx, %rax
movl %eax, %esi
callq 0xa2250
movq -0x18(%rbp), %rax
addq $0x20, %rax
movq %rax, -0x30(%rbp)
jmp 0xa273c
movq -0x28(%rbp), %rdi
callq 0x9e070
movq %rax, -0x38(%rbp)
cmpq $0x0, -0x38(%rbp)
je 0xa2771
movl -0x10(%rbp), %eax
cmpq -0x38(%rbp), %rax
jae 0xa2771
movq -0x30(%rbp), %rdi
movq -0x38(%rbp), %rax
movl -0x10(%rbp), %ecx
subq %rcx, %rax
movl %eax, -0x58(%rbp)
movq $0x0, -0x50(%rbp)
movl -0x58(%rbp), %esi
movq -0x50(%rbp), %rdx
callq 0x9ca30
movq -0x30(%rbp), %rdi
movl -0x10(%rbp), %esi
movq -0x8(%rbp), %rdx
callq 0x9ca30
addq $0x60, %rsp
popq %rbp
retq
nopw (%rax,%rax)
| ssz_add_bytes:
push rbp
mov rbp, rsp
sub rsp, 60h
mov [rbp+var_10], edx
mov [rbp+var_8], rcx
mov [rbp+var_18], rdi
mov [rbp+var_20], rsi
mov rax, [rbp+var_18]
mov rdi, [rax]
mov rsi, [rbp+var_20]
call find_def
mov [rbp+var_28], rax
cmp [rbp+var_28], 0
jnz short loc_A25E3
mov rsi, [rbp+var_20]
mov rax, [rbp+var_18]
mov rax, [rax]
mov rdx, [rax]
lea rdi, aSszAddBytesNam; "ssz_add_bytes: name %s not found in %s"...
mov al, 0
call _printf
jmp loc_A2781
loc_A25E3:
mov rax, [rbp+var_18]
add rax, 8
mov [rbp+var_30], rax
mov [rbp+var_38], 0
mov [rbp+var_40], 0
mov [rbp+var_44], 0
loc_A2606:
mov eax, [rbp+var_44]
mov rcx, [rbp+var_18]
mov rcx, [rcx]
cmp eax, [rcx+18h]
jnb loc_A26AD
mov rax, [rbp+var_18]
mov rax, [rax]
mov rax, [rax+10h]
movsxd rcx, [rbp+var_44]
shl rcx, 5
add rax, rcx
cmp rax, [rbp+var_28]
jnz short loc_A267C
mov rax, [rbp+var_40]
mov rcx, [rbp+var_18]
mov ecx, [rcx+8]
cmp rax, rcx
jz short loc_A267A
mov rax, [rbp+var_18]
mov esi, [rax+8]
mov edx, [rbp+var_10]
mov rcx, [rbp+var_20]
lea rdi, aSszAddBytesDDS; "ssz_add_bytes: %d ( +%d ) %s\n"
mov al, 0
call _printf
mov rsi, [rbp+var_40]
mov rax, [rbp+var_18]
mov edx, [rax+8]
lea rdi, aSszAddBytesOff; "ssz_add_bytes: offset mismatch %zu !"...
mov al, 0
call _printf
loc_A267A:
jmp short loc_A26AD
loc_A267C:
mov rax, [rbp+var_18]
mov rax, [rax]
mov rdi, [rax+10h]
movsxd rax, [rbp+var_44]
shl rax, 5
add rdi, rax
call ssz_fixed_length
add rax, [rbp+var_40]
mov [rbp+var_40], rax
mov eax, [rbp+var_44]
add eax, 1
mov [rbp+var_44], eax
jmp loc_A2606
loc_A26AD:
mov rdi, [rbp+var_28]
call ssz_is_dynamic
test al, 1
jnz short loc_A26BC
jmp short loc_A272F
loc_A26BC:
mov [rbp+var_40], 0
mov [rbp+var_48], 0
loc_A26CB:
mov eax, [rbp+var_48]
mov rcx, [rbp+var_18]
mov rcx, [rcx]
cmp eax, [rcx+18h]
jnb short loc_A2708
mov rax, [rbp+var_18]
mov rax, [rax]
mov rdi, [rax+10h]
movsxd rax, [rbp+var_48]
shl rax, 5
add rdi, rax
call ssz_fixed_length
add rax, [rbp+var_40]
mov [rbp+var_40], rax
mov eax, [rbp+var_48]
add eax, 1
mov [rbp+var_48], eax
jmp short loc_A26CB
loc_A2708:
mov rdi, [rbp+var_18]
mov rax, [rbp+var_40]
mov rcx, [rbp+var_18]
mov ecx, [rcx+20h]
add rax, rcx
mov esi, eax
call ssz_add_uint32
mov rax, [rbp+var_18]
add rax, 20h ; ' '
mov [rbp+var_30], rax
jmp short loc_A273C
loc_A272F:
mov rdi, [rbp+var_28]
call ssz_fixed_length
mov [rbp+var_38], rax
loc_A273C:
cmp [rbp+var_38], 0
jz short loc_A2771
mov eax, [rbp+var_10]
cmp rax, [rbp+var_38]
jnb short loc_A2771
mov rdi, [rbp+var_30]
mov rax, [rbp+var_38]
mov ecx, [rbp+var_10]
sub rax, rcx
mov [rbp+var_58], eax
mov [rbp+var_50], 0
mov esi, [rbp+var_58]
mov rdx, [rbp+var_50]
call buffer_append
loc_A2771:
mov rdi, [rbp+var_30]
mov esi, [rbp+var_10]
mov rdx, [rbp+var_8]
call buffer_append
loc_A2781:
add rsp, 60h
pop rbp
retn
| long long ssz_add_bytes(const char ***a1, const char *a2, unsigned int a3, long long a4)
{
unsigned int j; // [rsp+18h] [rbp-48h]
unsigned int i; // [rsp+1Ch] [rbp-44h]
long long v7; // [rsp+20h] [rbp-40h]
long long v8; // [rsp+20h] [rbp-40h]
unsigned long long v9; // [rsp+28h] [rbp-38h]
unsigned int *v10; // [rsp+30h] [rbp-30h]
char *def; // [rsp+38h] [rbp-28h]
def = (char *)find_def((long long)*a1, (long long)a2);
if ( !def )
return printf("ssz_add_bytes: name %s not found in %s\n", a2, **a1);
v10 = (unsigned int *)(a1 + 1);
v9 = 0LL;
v7 = 0LL;
for ( i = 0; i < *((_DWORD *)*a1 + 6); ++i )
{
if ( &(*a1)[2][32 * i] == def )
{
if ( v7 != *((_DWORD *)a1 + 2) )
{
printf("ssz_add_bytes: %d ( +%d ) %s\n", *((_DWORD *)a1 + 2), a3, a2);
printf("ssz_add_bytes: offset mismatch %zu != %d\n", v7, *((_DWORD *)a1 + 2));
}
break;
}
v7 += ssz_fixed_length(&(*a1)[2][32 * i]);
}
if ( (ssz_is_dynamic((long long)def) & 1) != 0 )
{
v8 = 0LL;
for ( j = 0; j < *((_DWORD *)*a1 + 6); ++j )
v8 += ssz_fixed_length(&(*a1)[2][32 * j]);
ssz_add_uint32((long long)a1, *((_DWORD *)a1 + 8) + v8);
v10 = (unsigned int *)(a1 + 4);
}
else
{
v9 = ssz_fixed_length(def);
}
if ( v9 )
{
if ( a3 < v9 )
buffer_append(v10, v9 - a3, 0LL);
}
return buffer_append(v10, a3, a4);
}
| ssz_add_bytes:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x60
MOV dword ptr [RBP + -0x10],EDX
MOV qword ptr [RBP + -0x8],RCX
MOV qword ptr [RBP + -0x18],RDI
MOV qword ptr [RBP + -0x20],RSI
MOV RAX,qword ptr [RBP + -0x18]
MOV RDI,qword ptr [RAX]
MOV RSI,qword ptr [RBP + -0x20]
CALL 0x001a2480
MOV qword ptr [RBP + -0x28],RAX
CMP qword ptr [RBP + -0x28],0x0
JNZ 0x001a25e3
MOV RSI,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RAX]
MOV RDX,qword ptr [RAX]
LEA RDI,[0x1e5800]
MOV AL,0x0
CALL 0x00123050
JMP 0x001a2781
LAB_001a25e3:
MOV RAX,qword ptr [RBP + -0x18]
ADD RAX,0x8
MOV qword ptr [RBP + -0x30],RAX
MOV qword ptr [RBP + -0x38],0x0
MOV qword ptr [RBP + -0x40],0x0
MOV dword ptr [RBP + -0x44],0x0
LAB_001a2606:
MOV EAX,dword ptr [RBP + -0x44]
MOV RCX,qword ptr [RBP + -0x18]
MOV RCX,qword ptr [RCX]
CMP EAX,dword ptr [RCX + 0x18]
JNC 0x001a26ad
MOV RAX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RAX]
MOV RAX,qword ptr [RAX + 0x10]
MOVSXD RCX,dword ptr [RBP + -0x44]
SHL RCX,0x5
ADD RAX,RCX
CMP RAX,qword ptr [RBP + -0x28]
JNZ 0x001a267c
MOV RAX,qword ptr [RBP + -0x40]
MOV RCX,qword ptr [RBP + -0x18]
MOV ECX,dword ptr [RCX + 0x8]
CMP RAX,RCX
JZ 0x001a267a
MOV RAX,qword ptr [RBP + -0x18]
MOV ESI,dword ptr [RAX + 0x8]
MOV EDX,dword ptr [RBP + -0x10]
MOV RCX,qword ptr [RBP + -0x20]
LEA RDI,[0x1e5828]
MOV AL,0x0
CALL 0x00123050
MOV RSI,qword ptr [RBP + -0x40]
MOV RAX,qword ptr [RBP + -0x18]
MOV EDX,dword ptr [RAX + 0x8]
LEA RDI,[0x1e5846]
MOV AL,0x0
CALL 0x00123050
LAB_001a267a:
JMP 0x001a26ad
LAB_001a267c:
MOV RAX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RAX]
MOV RDI,qword ptr [RAX + 0x10]
MOVSXD RAX,dword ptr [RBP + -0x44]
SHL RAX,0x5
ADD RDI,RAX
CALL 0x0019e070
ADD RAX,qword ptr [RBP + -0x40]
MOV qword ptr [RBP + -0x40],RAX
MOV EAX,dword ptr [RBP + -0x44]
ADD EAX,0x1
MOV dword ptr [RBP + -0x44],EAX
JMP 0x001a2606
LAB_001a26ad:
MOV RDI,qword ptr [RBP + -0x28]
CALL 0x0019dfd0
TEST AL,0x1
JNZ 0x001a26bc
JMP 0x001a272f
LAB_001a26bc:
MOV qword ptr [RBP + -0x40],0x0
MOV dword ptr [RBP + -0x48],0x0
LAB_001a26cb:
MOV EAX,dword ptr [RBP + -0x48]
MOV RCX,qword ptr [RBP + -0x18]
MOV RCX,qword ptr [RCX]
CMP EAX,dword ptr [RCX + 0x18]
JNC 0x001a2708
MOV RAX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RAX]
MOV RDI,qword ptr [RAX + 0x10]
MOVSXD RAX,dword ptr [RBP + -0x48]
SHL RAX,0x5
ADD RDI,RAX
CALL 0x0019e070
ADD RAX,qword ptr [RBP + -0x40]
MOV qword ptr [RBP + -0x40],RAX
MOV EAX,dword ptr [RBP + -0x48]
ADD EAX,0x1
MOV dword ptr [RBP + -0x48],EAX
JMP 0x001a26cb
LAB_001a2708:
MOV RDI,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RBP + -0x40]
MOV RCX,qword ptr [RBP + -0x18]
MOV ECX,dword ptr [RCX + 0x20]
ADD RAX,RCX
MOV ESI,EAX
CALL 0x001a2250
MOV RAX,qword ptr [RBP + -0x18]
ADD RAX,0x20
MOV qword ptr [RBP + -0x30],RAX
JMP 0x001a273c
LAB_001a272f:
MOV RDI,qword ptr [RBP + -0x28]
CALL 0x0019e070
MOV qword ptr [RBP + -0x38],RAX
LAB_001a273c:
CMP qword ptr [RBP + -0x38],0x0
JZ 0x001a2771
MOV EAX,dword ptr [RBP + -0x10]
CMP RAX,qword ptr [RBP + -0x38]
JNC 0x001a2771
MOV RDI,qword ptr [RBP + -0x30]
MOV RAX,qword ptr [RBP + -0x38]
MOV ECX,dword ptr [RBP + -0x10]
SUB RAX,RCX
MOV dword ptr [RBP + -0x58],EAX
MOV qword ptr [RBP + -0x50],0x0
MOV ESI,dword ptr [RBP + -0x58]
MOV RDX,qword ptr [RBP + -0x50]
CALL 0x0019ca30
LAB_001a2771:
MOV RDI,qword ptr [RBP + -0x30]
MOV ESI,dword ptr [RBP + -0x10]
MOV RDX,qword ptr [RBP + -0x8]
CALL 0x0019ca30
LAB_001a2781:
ADD RSP,0x60
POP RBP
RET
|
void ssz_add_bytes(long *param_1,int8 param_2,uint param_3,int8 param_4)
{
int iVar1;
int iVar2;
long lVar3;
long lVar4;
ulong uVar5;
uint local_50;
uint local_4c;
ulong local_48;
ulong local_40;
long *local_38;
lVar3 = find_def(*param_1,param_2);
if (lVar3 == 0) {
printf("ssz_add_bytes: name %s not found in %s\n",param_2,*(int8 *)*param_1);
}
else {
local_38 = param_1 + 1;
local_40 = 0;
local_48 = 0;
for (local_4c = 0; local_4c < *(uint *)(*param_1 + 0x18); local_4c = local_4c + 1) {
if (*(long *)(*param_1 + 0x10) + (long)(int)local_4c * 0x20 == lVar3) {
if (local_48 != *(uint *)(param_1 + 1)) {
printf("ssz_add_bytes: %d ( +%d ) %s\n",(ulong)*(uint *)(param_1 + 1),(ulong)param_3,
param_2);
printf("ssz_add_bytes: offset mismatch %zu != %d\n",local_48,
(ulong)*(uint *)(param_1 + 1));
}
break;
}
lVar4 = ssz_fixed_length(*(long *)(*param_1 + 0x10) + (long)(int)local_4c * 0x20);
local_48 = lVar4 + local_48;
}
uVar5 = ssz_is_dynamic(lVar3);
if ((uVar5 & 1) == 0) {
local_40 = ssz_fixed_length(lVar3);
}
else {
iVar2 = 0;
for (local_50 = 0; local_50 < *(uint *)(*param_1 + 0x18); local_50 = local_50 + 1) {
iVar1 = ssz_fixed_length(*(long *)(*param_1 + 0x10) + (long)(int)local_50 * 0x20);
iVar2 = iVar1 + iVar2;
}
ssz_add_uint32(param_1,iVar2 + (int)param_1[4]);
local_38 = param_1 + 4;
}
if ((local_40 != 0) && (param_3 < local_40)) {
buffer_append(local_38,(int)local_40 - param_3,0);
}
buffer_append(local_38,param_3,param_4);
}
return;
}
|
|
6,367 | spdlog::pattern_formatter::handle_padspec_(__gnu_cxx::__normal_iterator<char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>&, __gnu_cxx::__normal_iterator<char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>) | AlayaLite/build_O0/_deps/spdlog-src/include/spdlog/pattern_formatter-inl.h | SPDLOG_INLINE details::padding_info pattern_formatter::handle_padspec_(
std::string::const_iterator &it, std::string::const_iterator end) {
using details::padding_info;
using details::scoped_padder;
const size_t max_width = 64;
if (it == end) {
return padding_info{};
}
padding_info::pad_side side;
switch (*it) {
case '-':
side = padding_info::pad_side::right;
++it;
break;
case '=':
side = padding_info::pad_side::center;
++it;
break;
default:
side = details::padding_info::pad_side::left;
break;
}
if (it == end || !std::isdigit(static_cast<unsigned char>(*it))) {
return padding_info{}; // no padding if no digit found here
}
auto width = static_cast<size_t>(*it) - '0';
for (++it; it != end && std::isdigit(static_cast<unsigned char>(*it)); ++it) {
auto digit = static_cast<size_t>(*it) - '0';
width = width * 10 + digit;
}
// search for the optional truncate marker '!'
bool truncate;
if (it != end && *it == '!') {
truncate = true;
++it;
} else {
truncate = false;
}
return details::padding_info{std::min<size_t>(width, max_width), side, truncate};
} | O0 | c | spdlog::pattern_formatter::handle_padspec_(__gnu_cxx::__normal_iterator<char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>&, __gnu_cxx::__normal_iterator<char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>):
subq $0x58, %rsp
movq %rsi, 0x40(%rsp)
movq %rdi, 0x38(%rsp)
movq $0x40, 0x30(%rsp)
movq 0x38(%rsp), %rdi
leaq 0x40(%rsp), %rsi
callq 0x3b550
testb $0x1, %al
jne 0x3737c
jmp 0x3739c
leaq 0x48(%rsp), %rdi
xorl %esi, %esi
movl $0x10, %edx
callq 0x14390
leaq 0x48(%rsp), %rdi
callq 0x3aec0
jmp 0x3753c
movq 0x38(%rsp), %rdi
callq 0x3b590
movsbl (%rax), %eax
movl %eax, 0x10(%rsp)
subl $0x2d, %eax
je 0x373bf
jmp 0x373b4
movl 0x10(%rsp), %eax
subl $0x3d, %eax
je 0x373d3
jmp 0x373e7
movl $0x1, 0x2c(%rsp)
movq 0x38(%rsp), %rdi
callq 0x3b5a0
jmp 0x373ef
movl $0x2, 0x2c(%rsp)
movq 0x38(%rsp), %rdi
callq 0x3b5a0
jmp 0x373ef
movl $0x0, 0x2c(%rsp)
movq 0x38(%rsp), %rdi
leaq 0x40(%rsp), %rsi
callq 0x3b550
testb $0x1, %al
jne 0x37419
movq 0x38(%rsp), %rdi
callq 0x3b590
movzbl (%rax), %edi
callq 0x145f0
cmpl $0x0, %eax
jne 0x37439
leaq 0x48(%rsp), %rdi
xorl %esi, %esi
movl $0x10, %edx
callq 0x14390
leaq 0x48(%rsp), %rdi
callq 0x3aec0
jmp 0x3753c
movq 0x38(%rsp), %rdi
callq 0x3b590
movsbq (%rax), %rax
subq $0x30, %rax
movq %rax, 0x20(%rsp)
movq 0x38(%rsp), %rdi
callq 0x3b5a0
movq 0x38(%rsp), %rdi
leaq 0x40(%rsp), %rsi
callq 0x3b550
movb %al, %cl
xorb $-0x1, %cl
xorl %eax, %eax
testb $0x1, %cl
movb %al, 0xf(%rsp)
jne 0x3747b
jmp 0x37497
movq 0x38(%rsp), %rdi
callq 0x3b590
movzbl (%rax), %edi
callq 0x145f0
cmpl $0x0, %eax
setne %al
movb %al, 0xf(%rsp)
movb 0xf(%rsp), %al
testb $0x1, %al
jne 0x374a1
jmp 0x374d4
movq 0x38(%rsp), %rdi
callq 0x3b590
movsbq (%rax), %rax
subq $0x30, %rax
movq %rax, 0x18(%rsp)
imulq $0xa, 0x20(%rsp), %rax
addq 0x18(%rsp), %rax
movq %rax, 0x20(%rsp)
movq 0x38(%rsp), %rdi
callq 0x3b5a0
jmp 0x3745a
movq 0x38(%rsp), %rdi
leaq 0x40(%rsp), %rsi
callq 0x3b550
xorb $-0x1, %al
testb $0x1, %al
jne 0x374eb
jmp 0x3750e
movq 0x38(%rsp), %rdi
callq 0x3b590
movsbl (%rax), %eax
cmpl $0x21, %eax
jne 0x3750e
movb $0x1, 0x17(%rsp)
movq 0x38(%rsp), %rdi
callq 0x3b5a0
jmp 0x37513
movb $0x0, 0x17(%rsp)
leaq 0x20(%rsp), %rdi
leaq 0x30(%rsp), %rsi
callq 0x1c750
movq (%rax), %rsi
movl 0x2c(%rsp), %edx
movb 0x17(%rsp), %al
leaq 0x48(%rsp), %rdi
andb $0x1, %al
movzbl %al, %ecx
callq 0x3b5c0
movq 0x48(%rsp), %rax
movq 0x50(%rsp), %rdx
addq $0x58, %rsp
retq
nopl (%rax,%rax)
| _ZN6spdlog17pattern_formatter15handle_padspec_ERN9__gnu_cxx17__normal_iteratorIPKcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEESB_:
sub rsp, 58h
mov [rsp+58h+var_18], rsi
mov [rsp+58h+var_20], rdi
mov [rsp+58h+var_28], 40h ; '@'
mov rdi, [rsp+58h+var_20]
lea rsi, [rsp+58h+var_18]
call _ZN9__gnu_cxxeqIPKcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEEbRKNS_17__normal_iteratorIT_T0_EESE_QrqXeqcldtfp_4baseEcldtfp0_4baseERSt14convertible_toIbEE
test al, 1
jnz short loc_3737C
jmp short loc_3739C
loc_3737C:
lea rdi, [rsp+58h+var_10]
xor esi, esi
mov edx, 10h
call _memset
lea rdi, [rsp+58h+var_10]; this
call _ZN6spdlog7details12padding_infoC2Ev; spdlog::details::padding_info::padding_info(void)
jmp loc_3753C
loc_3739C:
mov rdi, [rsp+58h+var_20]
call _ZNK9__gnu_cxx17__normal_iteratorIPKcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEdeEv; __gnu_cxx::__normal_iterator<char const*,std::string>::operator*(void)
movsx eax, byte ptr [rax]
mov [rsp+58h+var_48], eax
sub eax, 2Dh ; '-'
jz short loc_373BF
jmp short $+2
loc_373B4:
mov eax, [rsp+58h+var_48]
sub eax, 3Dh ; '='
jz short loc_373D3
jmp short loc_373E7
loc_373BF:
mov [rsp+58h+var_2C], 1
mov rdi, [rsp+58h+var_20]
call _ZN9__gnu_cxx17__normal_iteratorIPKcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEppEv; __gnu_cxx::__normal_iterator<char const*,std::string>::operator++(void)
jmp short loc_373EF
loc_373D3:
mov [rsp+58h+var_2C], 2
mov rdi, [rsp+58h+var_20]
call _ZN9__gnu_cxx17__normal_iteratorIPKcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEppEv; __gnu_cxx::__normal_iterator<char const*,std::string>::operator++(void)
jmp short loc_373EF
loc_373E7:
mov [rsp+58h+var_2C], 0
loc_373EF:
mov rdi, [rsp+58h+var_20]
lea rsi, [rsp+58h+var_18]
call _ZN9__gnu_cxxeqIPKcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEEbRKNS_17__normal_iteratorIT_T0_EESE_QrqXeqcldtfp_4baseEcldtfp0_4baseERSt14convertible_toIbEE
test al, 1
jnz short loc_37419
mov rdi, [rsp+58h+var_20]
call _ZNK9__gnu_cxx17__normal_iteratorIPKcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEdeEv; __gnu_cxx::__normal_iterator<char const*,std::string>::operator*(void)
movzx edi, byte ptr [rax]
call _isdigit
cmp eax, 0
jnz short loc_37439
loc_37419:
lea rdi, [rsp+58h+var_10]
xor esi, esi
mov edx, 10h
call _memset
lea rdi, [rsp+58h+var_10]; this
call _ZN6spdlog7details12padding_infoC2Ev; spdlog::details::padding_info::padding_info(void)
jmp loc_3753C
loc_37439:
mov rdi, [rsp+58h+var_20]
call _ZNK9__gnu_cxx17__normal_iteratorIPKcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEdeEv; __gnu_cxx::__normal_iterator<char const*,std::string>::operator*(void)
movsx rax, byte ptr [rax]
sub rax, 30h ; '0'
mov [rsp+58h+var_38], rax
mov rdi, [rsp+58h+var_20]
call _ZN9__gnu_cxx17__normal_iteratorIPKcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEppEv; __gnu_cxx::__normal_iterator<char const*,std::string>::operator++(void)
loc_3745A:
mov rdi, [rsp+58h+var_20]
lea rsi, [rsp+58h+var_18]
call _ZN9__gnu_cxxeqIPKcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEEbRKNS_17__normal_iteratorIT_T0_EESE_QrqXeqcldtfp_4baseEcldtfp0_4baseERSt14convertible_toIbEE
mov cl, al
xor cl, 0FFh
xor eax, eax
test cl, 1
mov [rsp+58h+var_49], al
jnz short loc_3747B
jmp short loc_37497
loc_3747B:
mov rdi, [rsp+58h+var_20]
call _ZNK9__gnu_cxx17__normal_iteratorIPKcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEdeEv; __gnu_cxx::__normal_iterator<char const*,std::string>::operator*(void)
movzx edi, byte ptr [rax]
call _isdigit
cmp eax, 0
setnz al
mov [rsp+58h+var_49], al
loc_37497:
mov al, [rsp+58h+var_49]
test al, 1
jnz short loc_374A1
jmp short loc_374D4
loc_374A1:
mov rdi, [rsp+58h+var_20]
call _ZNK9__gnu_cxx17__normal_iteratorIPKcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEdeEv; __gnu_cxx::__normal_iterator<char const*,std::string>::operator*(void)
movsx rax, byte ptr [rax]
sub rax, 30h ; '0'
mov [rsp+58h+var_40], rax
imul rax, [rsp+58h+var_38], 0Ah
add rax, [rsp+58h+var_40]
mov [rsp+58h+var_38], rax
mov rdi, [rsp+58h+var_20]
call _ZN9__gnu_cxx17__normal_iteratorIPKcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEppEv; __gnu_cxx::__normal_iterator<char const*,std::string>::operator++(void)
jmp short loc_3745A
loc_374D4:
mov rdi, [rsp+58h+var_20]
lea rsi, [rsp+58h+var_18]
call _ZN9__gnu_cxxeqIPKcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEEbRKNS_17__normal_iteratorIT_T0_EESE_QrqXeqcldtfp_4baseEcldtfp0_4baseERSt14convertible_toIbEE
xor al, 0FFh
test al, 1
jnz short loc_374EB
jmp short loc_3750E
loc_374EB:
mov rdi, [rsp+58h+var_20]
call _ZNK9__gnu_cxx17__normal_iteratorIPKcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEdeEv; __gnu_cxx::__normal_iterator<char const*,std::string>::operator*(void)
movsx eax, byte ptr [rax]
cmp eax, 21h ; '!'
jnz short loc_3750E
mov [rsp+58h+var_41], 1
mov rdi, [rsp+58h+var_20]
call _ZN9__gnu_cxx17__normal_iteratorIPKcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEppEv; __gnu_cxx::__normal_iterator<char const*,std::string>::operator++(void)
jmp short loc_37513
loc_3750E:
mov [rsp+58h+var_41], 0
loc_37513:
lea rdi, [rsp+58h+var_38]
lea rsi, [rsp+58h+var_28]
call _ZSt3minImERKT_S2_S2_; std::min<ulong>(ulong const&,ulong const&)
mov rsi, [rax]
mov edx, [rsp+58h+var_2C]
mov al, [rsp+58h+var_41]
lea rdi, [rsp+58h+var_10]
and al, 1
movzx ecx, al
call _ZN6spdlog7details12padding_infoC2EmNS1_8pad_sideEb; spdlog::details::padding_info::padding_info(ulong,spdlog::details::padding_info::pad_side,bool)
loc_3753C:
mov rax, [rsp+58h+var_10]
mov rdx, [rsp+58h+var_8]
add rsp, 58h
retn
| long long spdlog::pattern_formatter::handle_padspec_(long long a1, long long a2)
{
unsigned __int8 *v2; // rax
unsigned __int8 *v3; // rax
_QWORD *v4; // rax
bool v6; // [rsp+Fh] [rbp-49h]
int v7; // [rsp+10h] [rbp-48h]
char v8; // [rsp+17h] [rbp-41h]
long long v9; // [rsp+20h] [rbp-38h] BYREF
unsigned int v10; // [rsp+2Ch] [rbp-2Ch]
long long v11; // [rsp+30h] [rbp-28h] BYREF
long long v12; // [rsp+38h] [rbp-20h]
long long v13; // [rsp+40h] [rbp-18h] BYREF
long long v14; // [rsp+48h] [rbp-10h] BYREF
v13 = a2;
v12 = a1;
v11 = 64LL;
if ( (__gnu_cxx::operator==<char const*,std::string>(a1, &v13) & 1) != 0 )
goto LABEL_2;
v7 = *(char *)__gnu_cxx::__normal_iterator<char const*,std::string>::operator*(v12);
if ( v7 == 45 )
{
v10 = 1;
__gnu_cxx::__normal_iterator<char const*,std::string>::operator++(v12);
}
else if ( v7 == 61 )
{
v10 = 2;
__gnu_cxx::__normal_iterator<char const*,std::string>::operator++(v12);
}
else
{
v10 = 0;
}
if ( (__gnu_cxx::operator==<char const*,std::string>(v12, &v13) & 1) != 0
|| (v2 = (unsigned __int8 *)__gnu_cxx::__normal_iterator<char const*,std::string>::operator*(v12),
!(unsigned int)isdigit(*v2)) )
{
LABEL_2:
memset(&v14, 0LL, 16LL);
spdlog::details::padding_info::padding_info((spdlog::details::padding_info *)&v14);
}
else
{
v9 = *(char *)__gnu_cxx::__normal_iterator<char const*,std::string>::operator*(v12) - 48LL;
__gnu_cxx::__normal_iterator<char const*,std::string>::operator++(v12);
while ( 1 )
{
v6 = 0;
if ( (__gnu_cxx::operator==<char const*,std::string>(v12, &v13) & 1) == 0 )
{
v3 = (unsigned __int8 *)__gnu_cxx::__normal_iterator<char const*,std::string>::operator*(v12);
v6 = (unsigned int)isdigit(*v3) != 0;
}
if ( !v6 )
break;
v9 = *(char *)__gnu_cxx::__normal_iterator<char const*,std::string>::operator*(v12) - 48LL + 10 * v9;
__gnu_cxx::__normal_iterator<char const*,std::string>::operator++(v12);
}
if ( (__gnu_cxx::operator==<char const*,std::string>(v12, &v13) & 1) != 0
|| *(_BYTE *)__gnu_cxx::__normal_iterator<char const*,std::string>::operator*(v12) != 33 )
{
v8 = 0;
}
else
{
v8 = 1;
__gnu_cxx::__normal_iterator<char const*,std::string>::operator++(v12);
}
v4 = std::min<unsigned long>(&v9, &v11);
spdlog::details::padding_info::padding_info(&v14, *v4, v10, v8 & 1);
}
return v14;
}
| handle_padspec_:
SUB RSP,0x58
MOV qword ptr [RSP + 0x40],RSI
MOV qword ptr [RSP + 0x38],RDI
MOV qword ptr [RSP + 0x30],0x40
MOV RDI,qword ptr [RSP + 0x38]
LEA RSI,[RSP + 0x40]
CALL 0x0013b550
TEST AL,0x1
JNZ 0x0013737c
JMP 0x0013739c
LAB_0013737c:
LEA RDI,[RSP + 0x48]
XOR ESI,ESI
MOV EDX,0x10
CALL 0x00114390
LEA RDI,[RSP + 0x48]
CALL 0x0013aec0
JMP 0x0013753c
LAB_0013739c:
MOV RDI,qword ptr [RSP + 0x38]
CALL 0x0013b590
MOVSX EAX,byte ptr [RAX]
MOV dword ptr [RSP + 0x10],EAX
SUB EAX,0x2d
JZ 0x001373bf
JMP 0x001373b4
LAB_001373b4:
MOV EAX,dword ptr [RSP + 0x10]
SUB EAX,0x3d
JZ 0x001373d3
JMP 0x001373e7
LAB_001373bf:
MOV dword ptr [RSP + 0x2c],0x1
MOV RDI,qword ptr [RSP + 0x38]
CALL 0x0013b5a0
JMP 0x001373ef
LAB_001373d3:
MOV dword ptr [RSP + 0x2c],0x2
MOV RDI,qword ptr [RSP + 0x38]
CALL 0x0013b5a0
JMP 0x001373ef
LAB_001373e7:
MOV dword ptr [RSP + 0x2c],0x0
LAB_001373ef:
MOV RDI,qword ptr [RSP + 0x38]
LEA RSI,[RSP + 0x40]
CALL 0x0013b550
TEST AL,0x1
JNZ 0x00137419
MOV RDI,qword ptr [RSP + 0x38]
CALL 0x0013b590
MOVZX EDI,byte ptr [RAX]
CALL 0x001145f0
CMP EAX,0x0
JNZ 0x00137439
LAB_00137419:
LEA RDI,[RSP + 0x48]
XOR ESI,ESI
MOV EDX,0x10
CALL 0x00114390
LEA RDI,[RSP + 0x48]
CALL 0x0013aec0
JMP 0x0013753c
LAB_00137439:
MOV RDI,qword ptr [RSP + 0x38]
CALL 0x0013b590
MOVSX RAX,byte ptr [RAX]
SUB RAX,0x30
MOV qword ptr [RSP + 0x20],RAX
MOV RDI,qword ptr [RSP + 0x38]
CALL 0x0013b5a0
LAB_0013745a:
MOV RDI,qword ptr [RSP + 0x38]
LEA RSI,[RSP + 0x40]
CALL 0x0013b550
MOV CL,AL
XOR CL,0xff
XOR EAX,EAX
TEST CL,0x1
MOV byte ptr [RSP + 0xf],AL
JNZ 0x0013747b
JMP 0x00137497
LAB_0013747b:
MOV RDI,qword ptr [RSP + 0x38]
CALL 0x0013b590
MOVZX EDI,byte ptr [RAX]
CALL 0x001145f0
CMP EAX,0x0
SETNZ AL
MOV byte ptr [RSP + 0xf],AL
LAB_00137497:
MOV AL,byte ptr [RSP + 0xf]
TEST AL,0x1
JNZ 0x001374a1
JMP 0x001374d4
LAB_001374a1:
MOV RDI,qword ptr [RSP + 0x38]
CALL 0x0013b590
MOVSX RAX,byte ptr [RAX]
SUB RAX,0x30
MOV qword ptr [RSP + 0x18],RAX
IMUL RAX,qword ptr [RSP + 0x20],0xa
ADD RAX,qword ptr [RSP + 0x18]
MOV qword ptr [RSP + 0x20],RAX
MOV RDI,qword ptr [RSP + 0x38]
CALL 0x0013b5a0
JMP 0x0013745a
LAB_001374d4:
MOV RDI,qword ptr [RSP + 0x38]
LEA RSI,[RSP + 0x40]
CALL 0x0013b550
XOR AL,0xff
TEST AL,0x1
JNZ 0x001374eb
JMP 0x0013750e
LAB_001374eb:
MOV RDI,qword ptr [RSP + 0x38]
CALL 0x0013b590
MOVSX EAX,byte ptr [RAX]
CMP EAX,0x21
JNZ 0x0013750e
MOV byte ptr [RSP + 0x17],0x1
MOV RDI,qword ptr [RSP + 0x38]
CALL 0x0013b5a0
JMP 0x00137513
LAB_0013750e:
MOV byte ptr [RSP + 0x17],0x0
LAB_00137513:
LEA RDI,[RSP + 0x20]
LEA RSI,[RSP + 0x30]
CALL 0x0011c750
MOV RSI,qword ptr [RAX]
MOV EDX,dword ptr [RSP + 0x2c]
MOV AL,byte ptr [RSP + 0x17]
LEA RDI,[RSP + 0x48]
AND AL,0x1
MOVZX ECX,AL
CALL 0x0013b5c0
LAB_0013753c:
MOV RAX,qword ptr [RSP + 0x48]
MOV RDX,qword ptr [RSP + 0x50]
ADD RSP,0x58
RET
|
/* spdlog::pattern_formatter::handle_padspec_(__gnu_cxx::__normal_iterator<char const*,
std::__cxx11::string >&, __gnu_cxx::__normal_iterator<char const*, std::__cxx11::string >) */
int1 [16]
spdlog::pattern_formatter::handle_padspec_
(__normal_iterator<char_const*,std::__cxx11::string> *param_1,int8 param_2)
{
byte bVar1;
int iVar2;
ulong uVar3;
char *pcVar4;
byte *pbVar5;
ulong *puVar6;
bool bVar7;
int1 auVar8 [16];
int1 local_41;
ulong local_38;
int4 local_2c;
ulong local_28;
__normal_iterator<char_const*,std::__cxx11::string> *local_20;
int8 local_18;
padding_info local_10 [16];
int1 auVar9 [16];
int1 auVar10 [15];
int1 auVar11 [15];
int8 uVar12;
int8 uVar13;
local_28 = 0x40;
local_20 = param_1;
local_18 = param_2;
uVar3 = _ZN9__gnu_cxxeqIPKcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEEbRKNS_17__normal_iteratorIT_T0_EESE_QrqXeqcldtfp_4baseEcldtfp0_4baseERSt14convertible_toIbEE
(param_1);
if ((uVar3 & 1) == 0) {
pcVar4 = (char *)__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>::operator*
(local_20);
if (*pcVar4 == '-') {
local_2c = 1;
__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>::operator++(local_20);
}
else if (*pcVar4 == '=') {
local_2c = 2;
__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>::operator++(local_20);
}
else {
local_2c = 0;
}
uVar3 = _ZN9__gnu_cxxeqIPKcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEEbRKNS_17__normal_iteratorIT_T0_EESE_QrqXeqcldtfp_4baseEcldtfp0_4baseERSt14convertible_toIbEE
(local_20);
if ((uVar3 & 1) == 0) {
pbVar5 = (byte *)__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>::operator*
(local_20);
iVar2 = isdigit((uint)*pbVar5);
if (iVar2 != 0) {
pcVar4 = (char *)__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>::operator*
(local_20);
local_38 = (long)*pcVar4 - 0x30;
__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>::operator++(local_20);
while( true ) {
bVar1 = _ZN9__gnu_cxxeqIPKcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEEbRKNS_17__normal_iteratorIT_T0_EESE_QrqXeqcldtfp_4baseEcldtfp0_4baseERSt14convertible_toIbEE
(local_20,&local_18);
bVar7 = false;
if (((bVar1 ^ 0xff) & 1) != 0) {
pbVar5 = (byte *)__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>::
operator*(local_20);
iVar2 = isdigit((uint)*pbVar5);
bVar7 = iVar2 != 0;
}
if (!bVar7) break;
pcVar4 = (char *)__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>::operator*
(local_20);
local_38 = local_38 * 10 + (long)*pcVar4 + -0x30;
__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>::operator++(local_20);
}
bVar1 = _ZN9__gnu_cxxeqIPKcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEEbRKNS_17__normal_iteratorIT_T0_EESE_QrqXeqcldtfp_4baseEcldtfp0_4baseERSt14convertible_toIbEE
(local_20,&local_18);
if ((((bVar1 ^ 0xff) & 1) == 0) ||
(pcVar4 = (char *)__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>::
operator*(local_20), *pcVar4 != '!')) {
local_41 = 0;
}
else {
local_41 = 1;
__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>::operator++(local_20);
}
puVar6 = std::min<unsigned_long>(&local_38,&local_28);
details::padding_info::padding_info(local_10,*puVar6,local_2c,local_41);
auVar9[0] = local_10[0];
auVar11[1] = local_10[1];
auVar11[2] = local_10[2];
auVar11[3] = local_10[3];
auVar11[4] = local_10[4];
auVar11[5] = local_10[5];
auVar11[6] = local_10[6];
auVar11[7] = local_10[7];
register0x00000010 = local_10[8];
register0x00000011 = local_10[9];
register0x00000012 = local_10[10];
register0x00000013 = local_10[0xb];
register0x00000014 = local_10[0xc];
register0x00000015 = local_10[0xd];
register0x00000016 = local_10[0xe];
register0x00000017 = local_10[0xf];
return auVar9;
}
}
memset(local_10,0,0x10);
details::padding_info::padding_info(local_10);
}
else {
memset(local_10,0,0x10);
details::padding_info::padding_info(local_10);
}
auVar8[0] = local_10[0];
auVar10[1] = local_10[1];
auVar10[2] = local_10[2];
auVar10[3] = local_10[3];
auVar10[4] = local_10[4];
auVar10[5] = local_10[5];
auVar10[6] = local_10[6];
auVar10[7] = local_10[7];
register0x00000010 = local_10[8];
register0x00000011 = local_10[9];
register0x00000012 = local_10[10];
register0x00000013 = local_10[0xb];
register0x00000014 = local_10[0xc];
register0x00000015 = local_10[0xd];
register0x00000016 = local_10[0xe];
register0x00000017 = local_10[0xf];
return auVar8;
}
|
|
6,368 | alaya::SQ4Quantizer<float>::encode(float const*, unsigned char*) const | AlayaLite/include/space/quant/sq4.hpp | void encode(const DataType *raw_data,
uint8_t *const encoded_data) const { // NOLINT
for (uint32_t i = 0; i < dim_; i += 2) {
uint8_t first = quantize(raw_data[i], min_vector_[i], max_vector_[i]); // NOLINT
uint8_t second = 0;
if (i + 1 < dim_) {
second = quantize(raw_data[i + 1], min_vector_[i + 1], max_vector_[i + 1]);
}
encoded_data[i / 2] = (first << 4) | second;
}
} | O0 | cpp | alaya::SQ4Quantizer<float>::encode(float const*, unsigned char*) const:
subq $0x38, %rsp
movq %rdi, 0x30(%rsp)
movq %rsi, 0x28(%rsp)
movq %rdx, 0x20(%rsp)
movq 0x30(%rsp), %rax
movq %rax, 0x10(%rsp)
movl $0x0, 0x1c(%rsp)
movq 0x10(%rsp), %rcx
movl 0x1c(%rsp), %eax
cmpl (%rcx), %eax
jae 0x1e801
movq 0x10(%rsp), %rdi
movq 0x28(%rsp), %rax
movl 0x1c(%rsp), %ecx
movss (%rax,%rcx,4), %xmm0
movss %xmm0, 0x8(%rsp)
addq $0x8, %rdi
movl 0x1c(%rsp), %eax
movl %eax, %esi
callq 0x22100
movq 0x10(%rsp), %rdi
movss (%rax), %xmm0
movss %xmm0, 0xc(%rsp)
addq $0x20, %rdi
movl 0x1c(%rsp), %eax
movl %eax, %esi
callq 0x22100
movss 0x8(%rsp), %xmm0
movss 0xc(%rsp), %xmm1
movq 0x10(%rsp), %rdi
movss (%rax), %xmm2
callq 0x1e580
movq 0x10(%rsp), %rcx
movb %al, 0x1b(%rsp)
movb $0x0, 0x1a(%rsp)
movl 0x1c(%rsp), %eax
addl $0x1, %eax
cmpl (%rcx), %eax
jae 0x1e7d0
movq 0x10(%rsp), %rdi
movq 0x28(%rsp), %rax
movl 0x1c(%rsp), %ecx
addl $0x1, %ecx
movl %ecx, %ecx
movss (%rax,%rcx,4), %xmm0
movss %xmm0, (%rsp)
addq $0x8, %rdi
movl 0x1c(%rsp), %eax
addl $0x1, %eax
movl %eax, %eax
movl %eax, %esi
callq 0x22100
movq 0x10(%rsp), %rdi
movss (%rax), %xmm0
movss %xmm0, 0x4(%rsp)
addq $0x20, %rdi
movl 0x1c(%rsp), %eax
addl $0x1, %eax
movl %eax, %eax
movl %eax, %esi
callq 0x22100
movq 0x10(%rsp), %rdi
movss (%rsp), %xmm0
movss 0x4(%rsp), %xmm1
movss (%rax), %xmm2
callq 0x1e580
movb %al, 0x1a(%rsp)
movzbl 0x1b(%rsp), %eax
shll $0x4, %eax
movzbl 0x1a(%rsp), %ecx
orl %ecx, %eax
movb %al, %dl
movq 0x20(%rsp), %rax
movl 0x1c(%rsp), %ecx
shrl %ecx
movl %ecx, %ecx
movb %dl, (%rax,%rcx)
movl 0x1c(%rsp), %eax
addl $0x2, %eax
movl %eax, 0x1c(%rsp)
jmp 0x1e6d5
addq $0x38, %rsp
retq
nopw %cs:(%rax,%rax)
| _ZNK5alaya12SQ4QuantizerIfE6encodeEPKfPh:
sub rsp, 38h
mov [rsp+38h+var_8], rdi
mov [rsp+38h+var_10], rsi
mov [rsp+38h+var_18], rdx
mov rax, [rsp+38h+var_8]
mov [rsp+38h+var_28], rax
mov [rsp+38h+var_1C], 0
loc_1E6D5:
mov rcx, [rsp+38h+var_28]
mov eax, [rsp+38h+var_1C]
cmp eax, [rcx]
jnb loc_1E801
mov rdi, [rsp+38h+var_28]
mov rax, [rsp+38h+var_10]
mov ecx, [rsp+38h+var_1C]
movss xmm0, dword ptr [rax+rcx*4]
movss [rsp+38h+var_30], xmm0
add rdi, 8
mov eax, [rsp+38h+var_1C]
mov esi, eax
call _ZNKSt6vectorIfSaIfEEixEm; std::vector<float>::operator[](ulong)
mov rdi, [rsp+38h+var_28]
movss xmm0, dword ptr [rax]
movss [rsp+38h+var_2C], xmm0
add rdi, 20h ; ' '
mov eax, [rsp+38h+var_1C]
mov esi, eax
call _ZNKSt6vectorIfSaIfEEixEm; std::vector<float>::operator[](ulong)
movss xmm0, [rsp+38h+var_30]
movss xmm1, [rsp+38h+var_2C]
mov rdi, [rsp+38h+var_28]
movss xmm2, dword ptr [rax]
call _ZNK5alaya12SQ4QuantizerIfE8quantizeEfff; alaya::SQ4Quantizer<float>::quantize(float,float,float)
mov rcx, [rsp+38h+var_28]
mov [rsp+38h+var_1D], al
mov [rsp+38h+var_1E], 0
mov eax, [rsp+38h+var_1C]
add eax, 1
cmp eax, [rcx]
jnb short loc_1E7D0
mov rdi, [rsp+38h+var_28]
mov rax, [rsp+38h+var_10]
mov ecx, [rsp+38h+var_1C]
add ecx, 1
mov ecx, ecx
movss xmm0, dword ptr [rax+rcx*4]
movss [rsp+38h+var_38], xmm0
add rdi, 8
mov eax, [rsp+38h+var_1C]
add eax, 1
mov eax, eax
mov esi, eax
call _ZNKSt6vectorIfSaIfEEixEm; std::vector<float>::operator[](ulong)
mov rdi, [rsp+38h+var_28]
movss xmm0, dword ptr [rax]
movss [rsp+38h+var_34], xmm0
add rdi, 20h ; ' '
mov eax, [rsp+38h+var_1C]
add eax, 1
mov eax, eax
mov esi, eax
call _ZNKSt6vectorIfSaIfEEixEm; std::vector<float>::operator[](ulong)
mov rdi, [rsp+38h+var_28]
movss xmm0, [rsp+38h+var_38]
movss xmm1, [rsp+38h+var_34]
movss xmm2, dword ptr [rax]
call _ZNK5alaya12SQ4QuantizerIfE8quantizeEfff; alaya::SQ4Quantizer<float>::quantize(float,float,float)
mov [rsp+38h+var_1E], al
loc_1E7D0:
movzx eax, [rsp+38h+var_1D]
shl eax, 4
movzx ecx, [rsp+38h+var_1E]
or eax, ecx
mov dl, al
mov rax, [rsp+38h+var_18]
mov ecx, [rsp+38h+var_1C]
shr ecx, 1
mov ecx, ecx
mov [rax+rcx], dl
mov eax, [rsp+38h+var_1C]
add eax, 2
mov [rsp+38h+var_1C], eax
jmp loc_1E6D5
loc_1E801:
add rsp, 38h
retn
| long long alaya::SQ4Quantizer<float>::encode(unsigned int *a1, long long a2, long long a3)
{
long long result; // rax
float *v4; // rax
float *v5; // rax
float v6; // [rsp+0h] [rbp-38h]
float v7; // [rsp+4h] [rbp-34h]
float v8; // [rsp+8h] [rbp-30h]
float v9; // [rsp+Ch] [rbp-2Ch]
char v10; // [rsp+1Ah] [rbp-1Eh]
char v11; // [rsp+1Bh] [rbp-1Dh]
unsigned int i; // [rsp+1Ch] [rbp-1Ch]
for ( i = 0; ; i += 2 )
{
result = i;
if ( i >= *a1 )
break;
v8 = *(float *)(a2 + 4LL * i);
v9 = *(float *)std::vector<float>::operator[](a1 + 2, i);
v4 = (float *)std::vector<float>::operator[](a1 + 8, i);
v11 = alaya::SQ4Quantizer<float>::quantize(v8, v9, *v4);
v10 = 0;
if ( i + 1 < *a1 )
{
v6 = *(float *)(a2 + 4LL * (i + 1));
v7 = *(float *)std::vector<float>::operator[](a1 + 2, i + 1);
v5 = (float *)std::vector<float>::operator[](a1 + 8, i + 1);
v10 = alaya::SQ4Quantizer<float>::quantize(v6, v7, *v5);
}
*(_BYTE *)(a3 + (i >> 1)) = v10 | (16 * v11);
}
return result;
}
| encode:
SUB RSP,0x38
MOV qword ptr [RSP + 0x30],RDI
MOV qword ptr [RSP + 0x28],RSI
MOV qword ptr [RSP + 0x20],RDX
MOV RAX,qword ptr [RSP + 0x30]
MOV qword ptr [RSP + 0x10],RAX
MOV dword ptr [RSP + 0x1c],0x0
LAB_0011e6d5:
MOV RCX,qword ptr [RSP + 0x10]
MOV EAX,dword ptr [RSP + 0x1c]
CMP EAX,dword ptr [RCX]
JNC 0x0011e801
MOV RDI,qword ptr [RSP + 0x10]
MOV RAX,qword ptr [RSP + 0x28]
MOV ECX,dword ptr [RSP + 0x1c]
MOVSS XMM0,dword ptr [RAX + RCX*0x4]
MOVSS dword ptr [RSP + 0x8],XMM0
ADD RDI,0x8
MOV EAX,dword ptr [RSP + 0x1c]
MOV ESI,EAX
CALL 0x00122100
MOV RDI,qword ptr [RSP + 0x10]
MOVSS XMM0,dword ptr [RAX]
MOVSS dword ptr [RSP + 0xc],XMM0
ADD RDI,0x20
MOV EAX,dword ptr [RSP + 0x1c]
MOV ESI,EAX
CALL 0x00122100
MOVSS XMM0,dword ptr [RSP + 0x8]
MOVSS XMM1,dword ptr [RSP + 0xc]
MOV RDI,qword ptr [RSP + 0x10]
MOVSS XMM2,dword ptr [RAX]
CALL 0x0011e580
MOV RCX,qword ptr [RSP + 0x10]
MOV byte ptr [RSP + 0x1b],AL
MOV byte ptr [RSP + 0x1a],0x0
MOV EAX,dword ptr [RSP + 0x1c]
ADD EAX,0x1
CMP EAX,dword ptr [RCX]
JNC 0x0011e7d0
MOV RDI,qword ptr [RSP + 0x10]
MOV RAX,qword ptr [RSP + 0x28]
MOV ECX,dword ptr [RSP + 0x1c]
ADD ECX,0x1
MOV ECX,ECX
MOVSS XMM0,dword ptr [RAX + RCX*0x4]
MOVSS dword ptr [RSP],XMM0
ADD RDI,0x8
MOV EAX,dword ptr [RSP + 0x1c]
ADD EAX,0x1
MOV EAX,EAX
MOV ESI,EAX
CALL 0x00122100
MOV RDI,qword ptr [RSP + 0x10]
MOVSS XMM0,dword ptr [RAX]
MOVSS dword ptr [RSP + 0x4],XMM0
ADD RDI,0x20
MOV EAX,dword ptr [RSP + 0x1c]
ADD EAX,0x1
MOV EAX,EAX
MOV ESI,EAX
CALL 0x00122100
MOV RDI,qword ptr [RSP + 0x10]
MOVSS XMM0,dword ptr [RSP]
MOVSS XMM1,dword ptr [RSP + 0x4]
MOVSS XMM2,dword ptr [RAX]
CALL 0x0011e580
MOV byte ptr [RSP + 0x1a],AL
LAB_0011e7d0:
MOVZX EAX,byte ptr [RSP + 0x1b]
SHL EAX,0x4
MOVZX ECX,byte ptr [RSP + 0x1a]
OR EAX,ECX
MOV DL,AL
MOV RAX,qword ptr [RSP + 0x20]
MOV ECX,dword ptr [RSP + 0x1c]
SHR ECX,0x1
MOV ECX,ECX
MOV byte ptr [RAX + RCX*0x1],DL
MOV EAX,dword ptr [RSP + 0x1c]
ADD EAX,0x2
MOV dword ptr [RSP + 0x1c],EAX
JMP 0x0011e6d5
LAB_0011e801:
ADD RSP,0x38
RET
|
/* alaya::SQ4Quantizer<float>::encode(float const*, unsigned char*) const */
void __thiscall
alaya::SQ4Quantizer<float>::encode(SQ4Quantizer<float> *this,float *param_1,uchar *param_2)
{
float fVar1;
float fVar2;
char cVar3;
float *pfVar4;
byte local_1e;
uint local_1c;
for (local_1c = 0; local_1c < *(uint *)this; local_1c = local_1c + 2) {
fVar1 = param_1[local_1c];
pfVar4 = (float *)std::vector<float,std::allocator<float>>::operator[]
((vector<float,std::allocator<float>> *)(this + 8),(ulong)local_1c);
fVar2 = *pfVar4;
pfVar4 = (float *)std::vector<float,std::allocator<float>>::operator[]
((vector<float,std::allocator<float>> *)(this + 0x20),
(ulong)local_1c);
cVar3 = quantize(fVar1,fVar2,*pfVar4);
local_1e = 0;
if (local_1c + 1 < *(uint *)this) {
fVar1 = param_1[local_1c + 1];
pfVar4 = (float *)std::vector<float,std::allocator<float>>::operator[]
((vector<float,std::allocator<float>> *)(this + 8),
(ulong)(local_1c + 1));
fVar2 = *pfVar4;
pfVar4 = (float *)std::vector<float,std::allocator<float>>::operator[]
((vector<float,std::allocator<float>> *)(this + 0x20),
(ulong)(local_1c + 1));
local_1e = quantize(fVar1,fVar2,*pfVar4);
}
param_2[local_1c >> 1] = cVar3 << 4 | local_1e;
}
return;
}
|
|
6,369 | cxxopts::exceptions::requested_option_not_present::requested_option_not_present(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&) | shubhamoy[P]dir2txt/include/cxxopts.hpp | explicit requested_option_not_present(const std::string& option)
: parsing("Option " + LQUOTE + option + RQUOTE + " not present")
{
} | O2 | cpp | cxxopts::exceptions::requested_option_not_present::requested_option_not_present(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&):
pushq %r15
pushq %r14
pushq %rbx
subq $0x80, %rsp
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x104ef(%rip), %rsi # 0x30156
leaq 0x30b32(%rip), %rdx # 0x507a0
leaq 0x60(%rsp), %r15
movq %r15, %rdi
callq 0x1a9a9
movq %rsp, %rdi
movq %r15, %rsi
movq %r14, %rdx
callq 0x1a98a
leaq 0x30b30(%rip), %rdx # 0x507c0
leaq 0x20(%rsp), %rdi
movq %rsp, %rsi
callq 0x1a98a
leaq 0x105ef(%rip), %rdx # 0x30293
leaq 0x40(%rsp), %rdi
leaq 0x20(%rsp), %rsi
callq 0x8d45
leaq 0x40(%rsp), %rsi
movq %rbx, %rdi
callq 0x1d4a8
leaq 0x40(%rsp), %rdi
callq 0x8e46
leaq 0x20(%rsp), %rdi
callq 0x8e46
movq %rsp, %rdi
callq 0x8e46
leaq 0x60(%rsp), %rdi
callq 0x8e46
leaq 0x2f89b(%rip), %rax # 0x4f588
movq %rax, (%rbx)
addq $0x80, %rsp
popq %rbx
popq %r14
popq %r15
retq
movq %rax, %rbx
leaq 0x40(%rsp), %rdi
callq 0x8e46
jmp 0x1fd0f
movq %rax, %rbx
leaq 0x20(%rsp), %rdi
callq 0x8e46
jmp 0x1fd1e
movq %rax, %rbx
movq %rsp, %rdi
callq 0x8e46
jmp 0x1fd2b
movq %rax, %rbx
leaq 0x60(%rsp), %rdi
callq 0x8e46
movq %rbx, %rdi
callq 0x85e0
nop
| _ZN7cxxopts10exceptions28requested_option_not_presentC2ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE:
push r15
push r14
push rbx
sub rsp, 80h
mov r14, rsi
mov rbx, rdi
lea rsi, aOption_0; "Option "
lea rdx, _ZN7cxxopts12_GLOBAL__N_16LQUOTEB5cxx11E; cxxopts::`anonymous namespace'::LQUOTE
lea r15, [rsp+98h+var_38]
mov rdi, r15
call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_RKS8_; std::operator+<char>(char const*,std::string const&)
mov rdi, rsp
mov rsi, r15
mov rdx, r14
call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_RKS8_; std::operator+<char>(std::string&&,std::string const&)
lea rdx, _ZN7cxxopts12_GLOBAL__N_16RQUOTEB5cxx11E; cxxopts::`anonymous namespace'::RQUOTE
lea rdi, [rsp+98h+var_78]
mov rsi, rsp
call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_RKS8_; std::operator+<char>(std::string&&,std::string const&)
lea rdx, aNotPresent; " not present"
lea rdi, [rsp+98h+var_58]
lea rsi, [rsp+98h+var_78]
call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_PKS5_; std::operator+<char>(std::string&&,char const*)
lea rsi, [rsp+98h+var_58]
mov rdi, rbx
call _ZN7cxxopts10exceptions7parsingC2ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; cxxopts::exceptions::parsing::parsing(std::string const&)
lea rdi, [rsp+98h+var_58]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
lea rdi, [rsp+98h+var_78]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
mov rdi, rsp; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
lea rdi, [rsp+98h+var_38]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
lea rax, off_4F588
mov [rbx], rax
add rsp, 80h
pop rbx
pop r14
pop r15
retn
mov rbx, rax
lea rdi, [rsp+arg_38]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
jmp short loc_1FD0F
mov rbx, rax
loc_1FD0F:
lea rdi, [rsp+arg_18]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
jmp short loc_1FD1E
mov rbx, rax
loc_1FD1E:
mov rdi, rsp; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
jmp short loc_1FD2B
mov rbx, rax
loc_1FD2B:
lea rdi, [rsp+arg_58]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
mov rdi, rbx
call __Unwind_Resume
| void ( ** cxxopts::exceptions::requested_option_not_present::requested_option_not_present(
_QWORD *a1,
long long a2))(cxxopts::exceptions::exception *__hidden this)
{
void ( **result)(cxxopts::exceptions::exception *__hidden); // rax
_BYTE v3[32]; // [rsp+0h] [rbp-98h] BYREF
_BYTE v4[32]; // [rsp+20h] [rbp-78h] BYREF
_QWORD v5[4]; // [rsp+40h] [rbp-58h] BYREF
_BYTE v6[56]; // [rsp+60h] [rbp-38h] BYREF
std::operator+<char>((long long)v6, (long long)"Option ", (long long)&cxxopts::`anonymous namespace'::LQUOTE[abi:cxx11]);
std::operator+<char>((long long)v3, (long long)v6, a2);
std::operator+<char>((long long)v4, (long long)v3, (long long)&cxxopts::`anonymous namespace'::RQUOTE[abi:cxx11]);
std::operator+<char>((long long)v5, (long long)v4, (long long)" not present");
cxxopts::exceptions::parsing::parsing(a1, v5);
std::string::~string(v5);
std::string::~string(v4);
std::string::~string(v3);
std::string::~string(v6);
result = off_4F588;
*a1 = off_4F588;
return result;
}
| requested_option_not_present:
PUSH R15
PUSH R14
PUSH RBX
SUB RSP,0x80
MOV R14,RSI
MOV RBX,RDI
LEA RSI,[0x130156]
LEA RDX,[0x1507a0]
LEA R15,[RSP + 0x60]
MOV RDI,R15
CALL 0x0011a9a9
LAB_0011fc7b:
MOV RDI,RSP
MOV RSI,R15
MOV RDX,R14
CALL 0x0011a98a
LAB_0011fc89:
LEA RDX,[0x1507c0]
LEA RDI,[RSP + 0x20]
MOV RSI,RSP
CALL 0x0011a98a
LAB_0011fc9d:
LEA RDX,[0x130293]
LEA RDI,[RSP + 0x40]
LEA RSI,[RSP + 0x20]
CALL 0x00108d45
LAB_0011fcb3:
LEA RSI,[RSP + 0x40]
MOV RDI,RBX
CALL 0x0011d4a8
LAB_0011fcc0:
LEA RDI,[RSP + 0x40]
CALL 0x00108e46
LEA RDI,[RSP + 0x20]
CALL 0x00108e46
MOV RDI,RSP
CALL 0x00108e46
LEA RDI,[RSP + 0x60]
CALL 0x00108e46
LEA RAX,[0x14f588]
MOV qword ptr [RBX],RAX
ADD RSP,0x80
POP RBX
POP R14
POP R15
RET
|
/* cxxopts::exceptions::requested_option_not_present::requested_option_not_present(std::__cxx11::string
const&) */
void __thiscall
cxxopts::exceptions::requested_option_not_present::requested_option_not_present
(requested_option_not_present *this,string *param_1)
{
string asStack_98 [32];
string local_78 [32];
string local_58 [32];
string local_38 [32];
std::operator+((char *)local_38,(string *)"Option ");
/* try { // try from 0011fc7b to 0011fc88 has its CatchHandler @ 0011fd28 */
std::operator+(asStack_98,local_38);
/* try { // try from 0011fc89 to 0011fc9c has its CatchHandler @ 0011fd1b */
std::operator+(local_78,asStack_98);
/* try { // try from 0011fc9d to 0011fcb2 has its CatchHandler @ 0011fd0c */
std::operator+(local_58,(char *)local_78);
/* try { // try from 0011fcb3 to 0011fcbf has its CatchHandler @ 0011fcfd */
parsing::parsing((parsing *)this,local_58);
std::__cxx11::string::~string(local_58);
std::__cxx11::string::~string(local_78);
std::__cxx11::string::~string(asStack_98);
std::__cxx11::string::~string(local_38);
*(int ***)this = &PTR__exception_0014f588;
return;
}
|
|
6,370 | nlohmann::json_abi_v3_11_3::ordered_map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>, std::less<void>, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>>>::find(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&) | monkey531[P]llama/common/json.hpp | iterator find(const key_type& key)
{
for (auto it = this->begin(); it != this->end(); ++it)
{
if (m_compare(it->first, key))
{
return it;
}
}
return Container::end();
} | O2 | cpp | nlohmann::json_abi_v3_11_3::ordered_map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>, std::less<void>, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>>>::find(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&):
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r15
movq (%rdi), %r14
movq 0x8(%r15), %rax
cmpq %rax, %r14
je 0x7ea71
movq %r14, %rdi
movq %rbx, %rsi
callq 0x3a920
testb %al, %al
jne 0x7ea6e
addq $0x30, %r14
jmp 0x7ea50
movq %r14, %rax
popq %rbx
popq %r14
popq %r15
retq
nop
| _ZN8nlohmann16json_abi_v3_11_311ordered_mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS0_10basic_jsonIS1_St6vectorS7_blmdSaNS0_14adl_serializerES9_IhSaIhEEvEESt4lessIvESaISt4pairIKS7_SD_EEE4findERSH_:
push r15
push r14
push rbx
mov rbx, rsi
mov r15, rdi
mov r14, [rdi]
loc_7EA50:
mov rax, [r15+8]
cmp r14, rax
jz short loc_7EA71
mov rdi, r14
mov rsi, rbx
call _ZSteqIcEN9__gnu_cxx11__enable_ifIXsr9__is_charIT_EE7__valueEbE6__typeERKNSt7__cxx1112basic_stringIS2_St11char_traitsIS2_ESaIS2_EEESC_
test al, al
jnz short loc_7EA6E
add r14, 30h ; '0'
jmp short loc_7EA50
loc_7EA6E:
mov rax, r14
loc_7EA71:
pop rbx
pop r14
pop r15
retn
| _QWORD * nlohmann::json_abi_v3_11_3::ordered_map<std::string,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,std::less<void>,std::allocator<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>>>::find(
long long a1,
_QWORD *a2)
{
_QWORD *i; // r14
_QWORD *result; // rax
for ( i = *(_QWORD **)a1; ; i += 6 )
{
result = *(_QWORD **)(a1 + 8);
if ( i == result )
break;
if ( std::operator==<char>(i, a2) )
return i;
}
return result;
}
| find:
PUSH R15
PUSH R14
PUSH RBX
MOV RBX,RSI
MOV R15,RDI
MOV R14,qword ptr [RDI]
LAB_0017ea50:
MOV RAX,qword ptr [R15 + 0x8]
CMP R14,RAX
JZ 0x0017ea71
MOV RDI,R14
MOV RSI,RBX
CALL 0x0013a920
TEST AL,AL
JNZ 0x0017ea6e
ADD R14,0x30
JMP 0x0017ea50
LAB_0017ea6e:
MOV RAX,R14
LAB_0017ea71:
POP RBX
POP R14
POP R15
RET
|
/* nlohmann::json_abi_v3_11_3::ordered_map<std::__cxx11::string,
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector,
std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void>, std::less<void>, std::allocator<std::pair<std::__cxx11::string const,
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector,
std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void> > > >::find(std::__cxx11::string const&) */
string * __thiscall
nlohmann::json_abi_v3_11_3::
ordered_map<std::__cxx11::string,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,std::less<void>,std::allocator<std::pair<std::__cxx11::string_const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>>
::find(ordered_map<std::__cxx11::string,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,std::less<void>,std::allocator<std::pair<std::__cxx11::string_const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>>
*this,string *param_1)
{
char cVar1;
string *psVar2;
string *psVar3;
psVar3 = *(string **)this;
while ((psVar2 = *(string **)(this + 8), psVar3 != *(string **)(this + 8) &&
(cVar1 = std::operator==(psVar3,param_1), psVar2 = psVar3, cVar1 == '\0'))) {
psVar3 = psVar3 + 0x30;
}
return psVar2;
}
|
|
6,371 | get_charset_name | eloqsql/mysys/charset.c | const char *get_charset_name(uint charset_number)
{
my_pthread_once(&charsets_initialized, init_available_charsets);
if (charset_number < array_elements(all_charsets))
{
CHARSET_INFO *cs= all_charsets[charset_number];
if (cs && (cs->number == charset_number) && cs->coll_name.str)
return cs->coll_name.str;
}
return "?"; /* this mimics find_type() */
} | O0 | c | get_charset_name:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movl %edi, -0xc(%rbp)
leaq 0xba68e2(%rip), %rdi # 0xc82734
leaq -0x479(%rip), %rsi # 0xdb9e0
callq 0x2a240
cmpl $0x800, -0xc(%rbp) # imm = 0x800
jae 0xdbea8
movl -0xc(%rbp), %eax
movl %eax, %ecx
leaq 0xb9e84d(%rip), %rax # 0xc7a6c0
movq (%rax,%rcx,8), %rax
movq %rax, -0x18(%rbp)
cmpq $0x0, -0x18(%rbp)
je 0xdbea6
movq -0x18(%rbp), %rax
movl (%rax), %eax
cmpl -0xc(%rbp), %eax
jne 0xdbea6
movq -0x18(%rbp), %rax
cmpq $0x0, 0x20(%rax)
je 0xdbea6
movq -0x18(%rbp), %rax
movq 0x20(%rax), %rax
movq %rax, -0x8(%rbp)
jmp 0xdbeb3
jmp 0xdbea8
leaq 0x78029(%rip), %rax # 0x153ed8
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
| get_charset_name:
push rbp
mov rbp, rsp
sub rsp, 20h
mov [rbp+var_C], edi
lea rdi, charsets_initialized
lea rsi, init_available_charsets
call _pthread_once
cmp [rbp+var_C], 800h
jnb short loc_DBEA8
mov eax, [rbp+var_C]
mov ecx, eax
lea rax, all_charsets
mov rax, [rax+rcx*8]
mov [rbp+var_18], rax
cmp [rbp+var_18], 0
jz short loc_DBEA6
mov rax, [rbp+var_18]
mov eax, [rax]
cmp eax, [rbp+var_C]
jnz short loc_DBEA6
mov rax, [rbp+var_18]
cmp qword ptr [rax+20h], 0
jz short loc_DBEA6
mov rax, [rbp+var_18]
mov rax, [rax+20h]
mov [rbp+var_8], rax
jmp short loc_DBEB3
loc_DBEA6:
jmp short $+2
loc_DBEA8:
lea rax, asc_153ED8; "?"
mov [rbp+var_8], rax
loc_DBEB3:
mov rax, [rbp+var_8]
add rsp, 20h
pop rbp
retn
| const char * get_charset_name(unsigned int a1)
{
long long v2; // [rsp+8h] [rbp-18h]
pthread_once(&charsets_initialized, init_available_charsets);
if ( a1 < 0x800 && (v2 = all_charsets[a1]) != 0 && *(_DWORD *)v2 == a1 && *(_QWORD *)(v2 + 32) )
return *(const char **)(v2 + 32);
else
return "?";
}
| get_charset_name:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x20
MOV dword ptr [RBP + -0xc],EDI
LEA RDI,[0xd82734]
LEA RSI,[0x1db9e0]
CALL 0x0012a240
CMP dword ptr [RBP + -0xc],0x800
JNC 0x001dbea8
MOV EAX,dword ptr [RBP + -0xc]
MOV ECX,EAX
LEA RAX,[0xd7a6c0]
MOV RAX,qword ptr [RAX + RCX*0x8]
MOV qword ptr [RBP + -0x18],RAX
CMP qword ptr [RBP + -0x18],0x0
JZ 0x001dbea6
MOV RAX,qword ptr [RBP + -0x18]
MOV EAX,dword ptr [RAX]
CMP EAX,dword ptr [RBP + -0xc]
JNZ 0x001dbea6
MOV RAX,qword ptr [RBP + -0x18]
CMP qword ptr [RAX + 0x20],0x0
JZ 0x001dbea6
MOV RAX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RAX + 0x20]
MOV qword ptr [RBP + -0x8],RAX
JMP 0x001dbeb3
LAB_001dbea6:
JMP 0x001dbea8
LAB_001dbea8:
LEA RAX,[0x253ed8]
MOV qword ptr [RBP + -0x8],RAX
LAB_001dbeb3:
MOV RAX,qword ptr [RBP + -0x8]
ADD RSP,0x20
POP RBP
RET
|
int * get_charset_name(uint param_1)
{
uint *puVar1;
int *local_10;
pthread_once(&charsets_initialized,init_available_charsets);
if ((((param_1 < 0x800) && (puVar1 = (uint *)(&all_charsets)[param_1], puVar1 != (uint *)0x0)) &&
(*puVar1 == param_1)) && (*(long *)(puVar1 + 8) != 0)) {
local_10 = *(int **)(puVar1 + 8);
}
else {
local_10 = &DAT_00253ed8;
}
return local_10;
}
|
|
6,372 | init_dumping | eloqsql/client/mysqldump.c | static int init_dumping(char *database, int init_func(char*))
{
if (mysql_select_db(mysql, database))
{
DB_error(mysql, "when selecting the database");
return 1; /* If --force */
}
if (!path && !opt_xml)
{
if (opt_databases || opt_alldbs)
{
/*
length of table name * 2 (if name contains quotes), 2 quotes and 0
*/
char quoted_database_buf[NAME_LEN*2+3];
char *qdatabase= quote_name(database,quoted_database_buf,opt_quoted);
print_comment(md_result_file, 0,
"\n--\n-- Current Database: %s\n--\n",
fix_for_comment(qdatabase));
/* Call the view or table specific function */
init_func(qdatabase);
fprintf(md_result_file,"\nUSE %s;\n", qdatabase);
check_io(md_result_file);
}
}
return 0;
} | O3 | c | init_dumping:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x218, %rsp # imm = 0x218
movq %rsi, %rbx
movq %rdi, %r14
movq %fs:0x28, %rax
movq %rax, -0x20(%rbp)
movq 0x386501(%rip), %rdi # 0x3c4498
movq %r14, %rsi
callq 0x48617
testl %eax, %eax
je 0x3dfe0
movq 0x3864ee(%rip), %rdi # 0x3c4498
leaq 0x634e4(%rip), %rsi # 0xa1495
callq 0x3ca81
movl $0x1, %r15d
movq %fs:0x28, %rax
cmpq -0x20(%rbp), %rax
jne 0x3e0d8
movl %r15d, %eax
addq $0x218, %rsp # imm = 0x218
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
xorl %r15d, %r15d
cmpq $0x0, 0x3865f5(%rip) # 0x3c45e0
jne 0x3dfbc
testb $0x1, 0x3865c4(%rip) # 0x3c45b8
jne 0x3dfbc
movb 0x386634(%rip), %al # 0x3c4630
orb 0x386630(%rip), %al # 0x3c4632
je 0x3dfbc
movsbl 0x386809(%rip), %edx # 0x3c4814
leaq -0x230(%rbp), %rsi
movq %r14, %rdi
callq 0x3e4bf
movq %rax, %r14
movq 0x38645c(%rip), %rdi # 0x3c4480
movb (%rax), %cl
movb %cl, 0x387634(%rip) # 0x3c5660
testb %cl, %cl
je 0x3e08b
movq %r14, %rax
incq %rax
movl $0x1, %r9d
leaq 0x38761e(%rip), %r8 # 0x3c5661
xorl %esi, %esi
leaq 0x387614(%rip), %rdx # 0x3c5660
cmpq $0x3f5, %rsi # imm = 0x3F5
jge 0x3e084
cmpb $0xa, %cl
jne 0x3e068
addq $0x4, %rsi
movl $0x202d2d, (%r8) # imm = 0x202D2D
movq %rsi, %r9
movq %r9, %rsi
movb (%rax), %cl
incq %r9
leaq (%rsi,%rdx), %r8
incq %r8
movb %cl, -0x1(%r8)
incq %rax
testb %cl, %cl
jne 0x3e04c
jmp 0x3e08b
movl $0x2e2e2e, (%r8) # imm = 0x2E2E2E
leaq 0x6341f(%rip), %rdx # 0xa14b1
leaq 0x3875c7(%rip), %rcx # 0x3c5660
xorl %r15d, %r15d
xorl %esi, %esi
xorl %eax, %eax
callq 0x3cac7
movq %r14, %rdi
callq *%rbx
movq 0x3863cf(%rip), %rdi # 0x3c4480
leaq 0x63419(%rip), %rdx # 0xa14d1
movl $0x1, %esi
movq %r14, %rcx
xorl %eax, %eax
callq 0x37260
movq 0x3863b2(%rip), %rdi # 0x3c4480
callq 0x38cfc
jmp 0x3dfbc
callq 0x372b0
| init_dumping:
push rbp
mov rbp, rsp
push r15
push r14
push rbx
sub rsp, 218h
mov rbx, rsi
mov r14, rdi
mov rax, fs:28h
mov [rbp+var_20], rax
mov rdi, cs:mysql
mov rsi, r14
call mysql_select_db
test eax, eax
jz short loc_3DFE0
mov rdi, cs:mysql
lea rsi, aWhenSelectingT; "when selecting the database"
call DB_error
mov r15d, 1
loc_3DFBC:
mov rax, fs:28h
cmp rax, [rbp+var_20]
jnz loc_3E0D8
mov eax, r15d
add rsp, 218h
pop rbx
pop r14
pop r15
pop rbp
retn
loc_3DFE0:
xor r15d, r15d
cmp cs:path, 0
jnz short loc_3DFBC
test cs:opt_xml, 1
jnz short loc_3DFBC
mov al, cs:opt_alldbs
or al, cs:opt_databases
jz short loc_3DFBC
movsx edx, cs:opt_quoted
lea rsi, [rbp+var_230]
mov rdi, r14
call quote_name
mov r14, rax
mov rdi, cs:md_result_file
mov cl, [rax]
mov cs:fix_for_comment_buf, cl
test cl, cl
jz short loc_3E08B
mov rax, r14
inc rax
mov r9d, 1
lea r8, unk_3C5661
xor esi, esi
lea rdx, fix_for_comment_buf
loc_3E04C:
cmp rsi, 3F5h
jge short loc_3E084
cmp cl, 0Ah
jnz short loc_3E068
add rsi, 4
mov dword ptr [r8], offset unk_202D2D
mov r9, rsi
loc_3E068:
mov rsi, r9
mov cl, [rax]
inc r9
lea r8, [rsi+rdx]
inc r8
mov [r8-1], cl
inc rax
test cl, cl
jnz short loc_3E04C
jmp short loc_3E08B
loc_3E084:
mov dword ptr [r8], offset unk_2E2E2E
loc_3E08B:
lea rdx, aCurrentDatabas; "\n--\n-- Current Database: %s\n--\n"
lea rcx, fix_for_comment_buf
xor r15d, r15d
xor esi, esi
xor eax, eax
call print_comment
mov rdi, r14
call rbx
mov rdi, cs:md_result_file
lea rdx, aUseS; "\nUSE %s;\n"
mov esi, 1
mov rcx, r14
xor eax, eax
call ___fprintf_chk
mov rdi, cs:md_result_file
call check_io
jmp loc_3DFBC
loc_3E0D8:
call ___stack_chk_fail
| long long init_dumping(
long long a1,
void ( *a2)(const char *),
__m128 a3,
__m128 a4,
__m128 a5,
__m128 a6,
double a7,
double a8,
__m128 a9,
__m128 a10)
{
long long v11; // rdx
long long v12; // rcx
long long v13; // r8
long long v14; // r9
double v15; // xmm4_8
double v16; // xmm5_8
unsigned int v17; // r15d
_BYTE *v19; // rax
const char *v20; // r14
long long v21; // rdi
char v22; // cl
char *v23; // rax
long long v24; // r9
char *v25; // r8
long long v26; // rsi
long long v27; // rdx
long long v28; // rcx
long long v29; // r8
long long v30; // r9
char v31[528]; // [rsp+0h] [rbp-230h] BYREF
unsigned long long v32; // [rsp+210h] [rbp-20h]
v32 = __readfsqword(0x28u);
if ( (unsigned int)mysql_select_db(mysql, a1) )
{
DB_error(
mysql,
(long long)"when selecting the database",
a3,
a4,
a5,
a6,
v15,
v16,
a9,
a10,
v11,
v12,
v13,
v14,
v31[0]);
return 1;
}
else
{
v17 = 0;
if ( !path && (opt_xml & 1) == 0 && (unsigned __int8)opt_databases | (unsigned __int8)opt_alldbs )
{
v19 = (_BYTE *)quote_name(a1, v31, (unsigned int)opt_quoted);
v20 = v19;
v21 = md_result_file;
v22 = *v19;
fix_for_comment_buf[0] = v22;
if ( v22 )
{
v23 = v19 + 1;
v24 = 1LL;
v25 = (char *)&unk_3C5661;
v26 = 0LL;
while ( v26 < 1013 )
{
if ( v22 == 10 )
{
*(_DWORD *)v25 = (_DWORD)&unk_202D2D;
v24 = v26 + 4;
}
v26 = v24;
v22 = *v23;
++v24;
v25 = &fix_for_comment_buf[v26 + 1];
fix_for_comment_buf[v26] = *v23++;
if ( !v22 )
goto LABEL_15;
}
*(_DWORD *)v25 = (_DWORD)&unk_2E2E2E;
}
LABEL_15:
v17 = 0;
print_comment(v21, 0, (long long)"\n--\n-- Current Database: %s\n--\n", fix_for_comment_buf);
a2(v20);
__fprintf_chk(md_result_file, 1LL, "\nUSE %s;\n", v20);
check_io(md_result_file, 1LL, v27, v28, v29, v30, v31[0]);
}
}
return v17;
}
| init_dumping:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH RBX
SUB RSP,0x218
MOV RBX,RSI
MOV R14,RDI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x20],RAX
MOV RDI,qword ptr [0x004c4498]
MOV RSI,R14
CALL 0x00148617
TEST EAX,EAX
JZ 0x0013dfe0
MOV RDI,qword ptr [0x004c4498]
LEA RSI,[0x1a1495]
CALL 0x0013ca81
MOV R15D,0x1
LAB_0013dfbc:
MOV RAX,qword ptr FS:[0x28]
CMP RAX,qword ptr [RBP + -0x20]
JNZ 0x0013e0d8
MOV EAX,R15D
ADD RSP,0x218
POP RBX
POP R14
POP R15
POP RBP
RET
LAB_0013dfe0:
XOR R15D,R15D
CMP qword ptr [0x004c45e0],0x0
JNZ 0x0013dfbc
TEST byte ptr [0x004c45b8],0x1
JNZ 0x0013dfbc
MOV AL,byte ptr [0x004c4630]
OR AL,byte ptr [0x004c4632]
JZ 0x0013dfbc
MOVSX EDX,byte ptr [0x004c4814]
LEA RSI,[RBP + -0x230]
MOV RDI,R14
CALL 0x0013e4bf
MOV R14,RAX
MOV RDI,qword ptr [0x004c4480]
MOV CL,byte ptr [RAX]
MOV byte ptr [0x004c5660],CL
TEST CL,CL
JZ 0x0013e08b
MOV RAX,R14
INC RAX
MOV R9D,0x1
LEA R8,[0x4c5661]
XOR ESI,ESI
LEA RDX,[0x4c5660]
LAB_0013e04c:
CMP RSI,0x3f5
JGE 0x0013e084
CMP CL,0xa
JNZ 0x0013e068
ADD RSI,0x4
MOV dword ptr [R8],0x202d2d
MOV R9,RSI
LAB_0013e068:
MOV RSI,R9
MOV CL,byte ptr [RAX]
INC R9
LEA R8,[RSI + RDX*0x1]
INC R8
MOV byte ptr [R8 + -0x1],CL
INC RAX
TEST CL,CL
JNZ 0x0013e04c
JMP 0x0013e08b
LAB_0013e084:
MOV dword ptr [R8],0x2e2e2e
LAB_0013e08b:
LEA RDX,[0x1a14b1]
LEA RCX,[0x4c5660]
XOR R15D,R15D
XOR ESI,ESI
XOR EAX,EAX
CALL 0x0013cac7
MOV RDI,R14
CALL RBX
MOV RDI,qword ptr [0x004c4480]
LEA RDX,[0x1a14d1]
MOV ESI,0x1
MOV RCX,R14
XOR EAX,EAX
CALL 0x00137260
MOV RDI,qword ptr [0x004c4480]
CALL 0x00138cfc
JMP 0x0013dfbc
LAB_0013e0d8:
CALL 0x001372b0
|
int8 init_dumping(int8 param_1,code *param_2)
{
int8 uVar1;
int iVar2;
char *pcVar3;
char *pcVar4;
char cVar5;
long lVar6;
int4 *puVar7;
long lVar8;
int8 uVar9;
long in_FS_OFFSET;
int1 local_238 [528];
long local_28;
local_28 = *(long *)(in_FS_OFFSET + 0x28);
iVar2 = mysql_select_db(mysql,param_1);
if (iVar2 == 0) {
uVar9 = 0;
if (((path == 0) && ((opt_xml & 1) == 0)) && (opt_alldbs != '\0' || opt_databases != '\0')) {
pcVar3 = (char *)quote_name(param_1,local_238,(int)opt_quoted);
uVar1 = md_result_file;
cVar5 = *pcVar3;
fix_for_comment_buf[0] = cVar5;
if (cVar5 != '\0') {
lVar8 = 1;
puVar7 = (int4 *)(fix_for_comment_buf + 1);
lVar6 = 0;
pcVar4 = pcVar3;
do {
pcVar4 = pcVar4 + 1;
if (0x3f4 < lVar6) {
*puVar7 = 0x2e2e2e;
break;
}
if (cVar5 == '\n') {
*puVar7 = 0x202d2d;
lVar8 = lVar6 + 4;
}
lVar6 = lVar8;
cVar5 = *pcVar4;
lVar8 = lVar6 + 1;
puVar7 = (int4 *)(fix_for_comment_buf + lVar6 + 1);
fix_for_comment_buf[lVar6] = cVar5;
} while (cVar5 != '\0');
}
uVar9 = 0;
print_comment(uVar1,0,"\n--\n-- Current Database: %s\n--\n",fix_for_comment_buf);
(*param_2)(pcVar3);
__fprintf_chk(md_result_file,1,"\nUSE %s;\n",pcVar3);
check_io(md_result_file);
}
}
else {
DB_error(mysql,"when selecting the database");
uVar9 = 1;
}
if (*(long *)(in_FS_OFFSET + 0x28) != local_28) {
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
return uVar9;
}
|
|
6,373 | SchemaConverter::_visit_pattern(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&) | monkey531[P]llama/common/json-schema-to-grammar.cpp | std::string _visit_pattern(const std::string & pattern, const std::string & name) {
if (!(pattern.front() == '^' && pattern.back() == '$')) {
_errors.push_back("Pattern must start with '^' and end with '$'");
return "";
}
std::string sub_pattern = pattern.substr(1, pattern.length() - 2);
std::unordered_map<std::string, std::string> sub_rule_ids;
size_t i = 0;
size_t length = sub_pattern.length();
using literal_or_rule = std::pair<std::string, bool>;
auto to_rule = [&](const literal_or_rule & ls) {
auto is_literal = ls.second;
auto s = ls.first;
return is_literal ? "\"" + s + "\"" : s;
};
std::function<literal_or_rule()> transform = [&]() -> literal_or_rule {
size_t start = i;
std::vector<literal_or_rule> seq;
auto get_dot = [&]() {
std::string rule;
if (_dotall) {
rule = "[\\U00000000-\\U0010FFFF]";
} else {
rule = "[^\\x0A\\x0D]";
}
return _add_rule("dot", rule);
};
// Joins the sequence, merging consecutive literals together.
auto join_seq = [&]() {
std::vector<literal_or_rule> ret;
std::string literal;
auto flush_literal = [&]() {
if (literal.empty()) {
return false;
}
ret.emplace_back(literal, true);
literal.clear();
return true;
};
for (const auto & item : seq) {
auto is_literal = item.second;
if (is_literal) {
literal += item.first;
} else {
flush_literal();
ret.push_back(item);
}
}
flush_literal();
std::vector<std::string> results;
for (const auto & item : ret) {
results.push_back(to_rule(item));
}
return std::make_pair(string_join(results, " "), false);
};
while (i < length) {
char c = sub_pattern[i];
if (c == '.') {
seq.emplace_back(get_dot(), false);
i++;
} else if (c == '(') {
i++;
if (i < length) {
if (sub_pattern[i] == '?') {
_warnings.push_back("Unsupported pattern syntax");
}
}
seq.emplace_back("(" + to_rule(transform()) + ")", false);
} else if (c == ')') {
i++;
if (start > 0 && sub_pattern[start - 1] != '(') {
_errors.push_back("Unbalanced parentheses");
}
return join_seq();
} else if (c == '[') {
std::string square_brackets = std::string(1, c);
i++;
while (i < length && sub_pattern[i] != ']') {
if (sub_pattern[i] == '\\') {
square_brackets += sub_pattern.substr(i, 2);
i += 2;
} else {
square_brackets += sub_pattern[i];
i++;
}
}
if (i >= length) {
_errors.push_back("Unbalanced square brackets");
}
square_brackets += ']';
i++;
seq.emplace_back(square_brackets, false);
} else if (c == '|') {
seq.emplace_back("|", false);
i++;
} else if (c == '*' || c == '+' || c == '?') {
seq.back() = std::make_pair(to_rule(seq.back()) + c, false);
i++;
} else if (c == '{') {
std::string curly_brackets = std::string(1, c);
i++;
while (i < length && sub_pattern[i] != '}') {
curly_brackets += sub_pattern[i];
i++;
}
if (i >= length) {
_errors.push_back("Unbalanced curly brackets");
}
curly_brackets += '}';
i++;
auto nums = string_split(curly_brackets.substr(1, curly_brackets.length() - 2), ",");
int min_times = 0;
int max_times = std::numeric_limits<int>::max();
try {
if (nums.size() == 1) {
min_times = max_times = std::stoi(nums[0]);
} else if (nums.size() != 2) {
_errors.push_back("Wrong number of values in curly brackets");
} else {
if (!nums[0].empty()) {
min_times = std::stoi(nums[0]);
}
if (!nums[1].empty()) {
max_times = std::stoi(nums[1]);
}
}
} catch (const std::invalid_argument & e) {
_errors.push_back("Invalid number in curly brackets");
return std::make_pair("", false);
}
auto &last = seq.back();
auto &sub = last.first;
auto sub_is_literal = last.second;
if (!sub_is_literal) {
std::string & sub_id = sub_rule_ids[sub];
if (sub_id.empty()) {
sub_id = _add_rule(name + "-" + std::to_string(sub_rule_ids.size()), sub);
}
sub = sub_id;
}
seq.back().first = build_repetition(
sub_is_literal ? "\"" + sub + "\"" : sub,
min_times,
max_times,
""
);
seq.back().second = false;
} else {
std::string literal;
auto is_non_literal = [&](char c) {
return NON_LITERAL_SET.find(c) != NON_LITERAL_SET.end();
};
while (i < length) {
if (sub_pattern[i] == '\\' && i < length - 1) {
char next = sub_pattern[i + 1];
if (ESCAPED_IN_REGEXPS_BUT_NOT_IN_LITERALS.find(next) != ESCAPED_IN_REGEXPS_BUT_NOT_IN_LITERALS.end()) {
i++;
literal += sub_pattern[i];
i++;
} else {
literal += sub_pattern.substr(i, 2);
i += 2;
}
} else if (sub_pattern[i] == '"') {
literal += "\\\"";
i++;
} else if (!is_non_literal(sub_pattern[i]) &&
(i == length - 1 || literal.empty() || sub_pattern[i + 1] == '.' || !is_non_literal(sub_pattern[i + 1]))) {
literal += sub_pattern[i];
i++;
} else {
break;
}
}
if (!literal.empty()) {
seq.emplace_back(literal, true);
}
}
}
return join_seq();
};
return _add_rule(name, "\"\\\"\" (" + to_rule(transform()) + ") \"\\\"\" space");
} | O1 | cpp | SchemaConverter::_visit_pattern(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&):
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x120, %rsp # imm = 0x120
movq %rdx, %rax
movq %rsi, %r14
movq %rdi, %rbx
movq (%rdx), %rdx
cmpb $0x5e, (%rdx)
jne 0xa3c8d
movq %rcx, %r15
movq 0x8(%rax), %rcx
cmpb $0x24, -0x1(%rdx,%rcx)
jne 0xa3c8d
addq $-0x2, %rcx
leaq 0x100(%rsp), %r12
movl $0x1, %edx
movq %r12, %rdi
movq %rax, %rsi
callq 0x186f0
leaq 0xd8(%rsp), %rax
movq %rax, -0x30(%rax)
movq $0x1, -0x28(%rax)
xorps %xmm0, %xmm0
movups %xmm0, -0x20(%rax)
movl $0x3f800000, -0x10(%rax) # imm = 0x3F800000
movups %xmm0, -0x8(%rax)
movq $0x0, 0x58(%rsp)
movq 0x8(%r12), %rax
movq %rax, 0x50(%rsp)
movaps %xmm0, 0x70(%rsp)
movaps %xmm0, 0x60(%rsp)
movl $0x40, %edi
callq 0x18690
leaq 0x58(%rsp), %rcx
movq %rcx, (%rax)
movq %r14, 0x8(%rax)
leaq 0xf(%rsp), %rcx
movq %rcx, 0x10(%rax)
leaq 0x50(%rsp), %rcx
movq %rcx, 0x18(%rax)
movq %r12, 0x20(%rax)
leaq 0x60(%rsp), %rcx
movq %rcx, 0x28(%rax)
leaq 0xa8(%rsp), %rdx
movq %rdx, 0x30(%rax)
movq %r15, 0x38(%rax)
movq %rax, (%rcx)
leaq 0x3653(%rip), %rdx # 0xa725a
movq %rdx, 0x18(%rcx)
leaq 0x365a(%rip), %rdx # 0xa726c
movq %rdx, 0x10(%rcx)
leaq 0x80(%rsp), %rdi
movq %rax, %rsi
callq 0xa7294
leaq 0xe0(%rsp), %rdi
leaq 0xf(%rsp), %rsi
leaq 0x80(%rsp), %rdx
callq 0xa7118
leaq 0x121a6(%rip), %rcx # 0xb5ded
leaq 0xe0(%rsp), %rdi
movl $0x6, %r8d
xorl %esi, %esi
xorl %edx, %edx
callq 0x18750
leaq 0x20(%rsp), %r12
movq %r12, -0x10(%r12)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0xa3d49
movq %rdx, 0x10(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x20(%rsp)
jmp 0xa3d51
leaq 0xb8(%rsp), %r15
movq %r15, -0x10(%r15)
leaq 0x80(%rsp), %rsi
movq $0x2c, (%rsi)
leaq 0xa8(%rsp), %rdi
xorl %edx, %edx
callq 0x18bf0
leaq 0xa8(%rsp), %rsi
movq %rax, (%rsi)
movq 0x80(%rsp), %rcx
movq %rcx, 0x10(%rsi)
movups 0x12107(%rip), %xmm0 # 0xb5ddc
movups %xmm0, 0x1c(%rax)
movups 0x120f0(%rip), %xmm0 # 0xb5dd0
movups %xmm0, 0x10(%rax)
movups 0x120d5(%rip), %xmm0 # 0xb5dc0
movups %xmm0, (%rax)
movq %rcx, 0x8(%rsi)
movb $0x0, (%rax,%rcx)
addq $0xc8, %r14
movq %r14, %rdi
callq 0x1dc76
movq 0xa8(%rsp), %rdi
cmpq %r15, %rdi
je 0xa3d22
movq 0xb8(%rsp), %rsi
incq %rsi
callq 0x186a0
leaq 0x10(%rbx), %rax
movq %rax, (%rbx)
movq $0x0, 0x8(%rbx)
movb $0x0, 0x10(%rbx)
movq %rbx, %rax
addq $0x120, %rsp # imm = 0x120
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
movups (%rcx), %xmm0
movups %xmm0, (%r12)
movq 0x8(%rax), %rdx
leaq 0x10(%rsp), %rdi
movq %rdx, 0x8(%rdi)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
leaq 0x12080(%rip), %rsi # 0xb5df4
callq 0x18ce0
leaq 0x40(%rsp), %r13
movq %r13, -0x10(%r13)
movq (%rax), %rcx
movq %rax, %rdx
addq $0x10, %rdx
cmpq %rdx, %rcx
je 0xa3da0
movq %rcx, 0x30(%rsp)
movq (%rdx), %rcx
movq %rcx, 0x40(%rsp)
jmp 0xa3da8
movups (%rdx), %xmm0
movups %xmm0, (%r13)
movq 0x8(%rax), %rsi
leaq 0x30(%rsp), %rcx
movq %rsi, 0x8(%rcx)
movq %rdx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movq %rbx, %rdi
movq %r14, %rsi
movq %r15, %rdx
callq 0x9ec8c
movq 0x30(%rsp), %rdi
cmpq %r13, %rdi
je 0xa3de9
movq 0x40(%rsp), %rsi
incq %rsi
callq 0x186a0
movq 0x10(%rsp), %rdi
cmpq %r12, %rdi
je 0xa3e00
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x186a0
leaq 0xf0(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xa3e21
movq 0xf0(%rsp), %rsi
incq %rsi
callq 0x186a0
leaq 0x90(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xa3e42
movq 0x90(%rsp), %rsi
incq %rsi
callq 0x186a0
movq 0x70(%rsp), %rax
testq %rax, %rax
je 0xa3e5b
leaq 0x60(%rsp), %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
leaq 0xa8(%rsp), %rdi
callq 0xa6c3e
leaq 0x110(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xa3d35
movq 0x110(%rsp), %rsi
incq %rsi
callq 0x186a0
jmp 0xa3d35
jmp 0xa3f64
movq %rax, %rbx
movq 0x30(%rsp), %rdi
cmpq %r13, %rdi
je 0xa3eb6
movq 0x40(%rsp), %rsi
incq %rsi
callq 0x186a0
jmp 0xa3eb6
movq %rax, %rbx
movq 0x10(%rsp), %rdi
cmpq %r12, %rdi
je 0xa3ed2
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x186a0
jmp 0xa3ed2
movq %rax, %rbx
leaq 0xf0(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xa3ef8
movq 0xf0(%rsp), %rsi
incq %rsi
callq 0x186a0
jmp 0xa3ef8
movq %rax, %rbx
leaq 0x90(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xa3f1e
movq 0x90(%rsp), %rsi
incq %rsi
callq 0x186a0
jmp 0xa3f1e
movq %rax, %rbx
movq 0x70(%rsp), %rax
testq %rax, %rax
je 0xa3f3c
leaq 0x60(%rsp), %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
jmp 0xa3f3c
movq %rax, %rbx
leaq 0xa8(%rsp), %rdi
callq 0xa6c3e
leaq 0x110(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xa3f91
movq 0x110(%rsp), %rsi
jmp 0xa3f84
movq %rax, %rdi
callq 0x1d7ab
movq %rax, %rbx
movq 0xa8(%rsp), %rdi
cmpq %r15, %rdi
je 0xa3f91
movq 0xb8(%rsp), %rsi
incq %rsi
callq 0x186a0
jmp 0xa3f91
movq %rax, %rbx
movq %rbx, %rdi
callq 0x18bc0
| _ZN15SchemaConverter14_visit_patternERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES7_:
push r15
push r14
push r13
push r12
push rbx
sub rsp, 120h
mov rax, rdx
mov r14, rsi
mov rbx, rdi
mov rdx, [rdx]
cmp byte ptr [rdx], 5Eh ; '^'
jnz loc_A3C8D
mov r15, rcx
mov rcx, [rax+8]
cmp byte ptr [rdx+rcx-1], 24h ; '$'
jnz loc_A3C8D
add rcx, 0FFFFFFFFFFFFFFFEh
lea r12, [rsp+148h+var_48]
mov edx, 1
mov rdi, r12
mov rsi, rax
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6substrEmm; std::string::substr(ulong,ulong)
lea rax, [rsp+148h+var_70]
mov [rax-30h], rax
mov qword ptr [rax-28h], 1
xorps xmm0, xmm0
movups xmmword ptr [rax-20h], xmm0
mov dword ptr [rax-10h], 3F800000h
movups xmmword ptr [rax-8], xmm0
mov qword ptr [rsp+148h+var_F0], 0; int
mov rax, [r12+8]
mov qword ptr [rsp+148h+var_F8], rax; int
movaps xmmword ptr [rsp+148h+var_D8], xmm0; __int64
movaps xmmword ptr [rsp+148h+var_E8], xmm0; void *
mov edi, 40h ; '@'; unsigned __int64
call __Znwm; operator new(ulong)
lea rcx, [rsp+148h+var_F0]
mov [rax], rcx
mov [rax+8], r14
lea rcx, [rsp+148h+var_139]
mov [rax+10h], rcx
lea rcx, [rsp+148h+var_F8]
mov [rax+18h], rcx
mov [rax+20h], r12
lea rcx, [rsp+148h+var_E8]
mov [rax+28h], rcx
lea rdx, [rsp+148h+var_A0]
mov [rax+30h], rdx
mov [rax+38h], r15
mov [rcx], rax
lea rdx, _ZNSt17_Function_handlerIFSt4pairINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEbEvEZN15SchemaConverter14_visit_patternERKS6_SB_EUlvE_E9_M_invokeERKSt9_Any_data; std::_Function_handler<std::pair<std::string,bool> ()(void),SchemaConverter::_visit_pattern(std::string const&,std::string const&)::{lambda(void)#1}>::_M_invoke(std::_Any_data const&)
mov [rcx+18h], rdx
lea rdx, _ZNSt17_Function_handlerIFSt4pairINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEbEvEZN15SchemaConverter14_visit_patternERKS6_SB_EUlvE_E10_M_managerERSt9_Any_dataRKSE_St18_Manager_operation; std::_Function_handler<std::pair<std::string,bool> ()(void),SchemaConverter::_visit_pattern(std::string const&,std::string const&)::{lambda(void)#1}>::_M_manager(std::_Any_data &,std::_Any_data const&,std::_Manager_operation)
mov [rcx+10h], rdx
lea rdi, [rsp+148h+var_C8]; __int64
mov rsi, rax
call _ZZN15SchemaConverter14_visit_patternERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES7_ENKUlvE_clB5cxx11Ev; SchemaConverter::_visit_pattern(std::string const&,std::string const&)::{lambda(void)#1}::operator()(void)
lea rdi, [rsp+148h+var_68]
lea rsi, [rsp+148h+var_139]
lea rdx, [rsp+148h+var_C8]
call _ZZN15SchemaConverter14_visit_patternERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES7_ENKUlRKSt4pairIS5_bEE_clB5cxx11ESB_; SchemaConverter::_visit_pattern(std::string const&,std::string const&)::{lambda(std::pair<std::string,bool> const&)#1}::operator()(std::pair<std::string,bool> const&)
lea rcx, asc_B5DED; "\"\\\"\" ("
lea rdi, [rsp+148h+var_68]
mov r8d, 6
xor esi, esi
xor edx, edx
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7replaceEmmPKcm; std::string::replace(ulong,ulong,char const*,ulong)
lea r12, [rsp+148h+var_128]
mov [r12-10h], r12
mov rdx, [rax]
mov rcx, rax
add rcx, 10h
cmp rdx, rcx
jz loc_A3D49
mov [rsp+148h+var_138], rdx
mov rdx, [rcx]
mov [rsp+148h+var_128], rdx
jmp loc_A3D51
loc_A3C8D:
lea r15, [rsp+148h+var_90]
mov [r15-10h], r15
lea rsi, [rsp+148h+var_C8]
mov qword ptr [rsi], 2Ch ; ','
lea rdi, [rsp+148h+var_A0]
xor edx, edx
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_createERmm; std::string::_M_create(ulong &,ulong)
lea rsi, [rsp+148h+var_A0]
mov [rsi], rax
mov rcx, [rsp+148h+var_C8]
mov [rsi+10h], rcx
movups xmm0, cs:xmmword_B5DD0+0Ch
movups xmmword ptr [rax+1Ch], xmm0
movups xmm0, cs:xmmword_B5DD0
movups xmmword ptr [rax+10h], xmm0
movups xmm0, cs:xmmword_B5DC0
movups xmmword ptr [rax], xmm0
mov [rsi+8], rcx
mov byte ptr [rax+rcx], 0
add r14, 0C8h
mov rdi, r14
call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE12emplace_backIJS5_EEERS5_DpOT_; std::vector<std::string>::emplace_back<std::string>(std::string &&)
mov rdi, [rsp+148h+var_A0]; void *
cmp rdi, r15
jz short loc_A3D22
mov rsi, [rsp+148h+var_90]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_A3D22:
lea rax, [rbx+10h]
mov [rbx], rax
mov qword ptr [rbx+8], 0
mov byte ptr [rbx+10h], 0
loc_A3D35:
mov rax, rbx
add rsp, 120h
pop rbx
pop r12
pop r13
pop r14
pop r15
retn
loc_A3D49:
movups xmm0, xmmword ptr [rcx]
movups xmmword ptr [r12], xmm0
loc_A3D51:
mov rdx, [rax+8]
lea rdi, [rsp+148h+var_138]
mov [rdi+8], rdx
mov [rax], rcx
mov qword ptr [rax+8], 0
mov byte ptr [rax+10h], 0
lea rsi, aSpace; ") \"\\\"\" space"
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendEPKc; std::string::append(char const*)
lea r13, [rsp+148h+var_108]
mov [r13-10h], r13
mov rcx, [rax]
mov rdx, rax
add rdx, 10h
cmp rcx, rdx
jz short loc_A3DA0
mov [rsp+148h+var_118], rcx
mov rcx, [rdx]
mov [rsp+148h+var_108], rcx
jmp short loc_A3DA8
loc_A3DA0:
movups xmm0, xmmword ptr [rdx]
movups xmmword ptr [r13+0], xmm0
loc_A3DA8:
mov rsi, [rax+8]
lea rcx, [rsp+148h+var_118]; int
mov [rcx+8], rsi
mov [rax], rdx
mov qword ptr [rax+8], 0
mov byte ptr [rax+10h], 0
mov rdi, rbx; int
mov rsi, r14; int
mov rdx, r15; int
call _ZN15SchemaConverter9_add_ruleERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES7_; SchemaConverter::_add_rule(std::string const&,std::string const&)
mov rdi, [rsp+148h+var_118]; void *
cmp rdi, r13
jz short loc_A3DE9
mov rsi, [rsp+148h+var_108]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_A3DE9:
mov rdi, [rsp+148h+var_138]; void *
cmp rdi, r12
jz short loc_A3E00
mov rsi, [rsp+148h+var_128]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_A3E00:
lea rax, [rsp+148h+var_58]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_A3E21
mov rsi, [rsp+148h+var_58]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_A3E21:
lea rax, [rsp+148h+var_B8]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_A3E42
mov rsi, [rsp+148h+var_B8]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_A3E42:
mov rax, [rsp+148h+var_D8]
test rax, rax
jz short loc_A3E5B
lea rdi, [rsp+148h+var_E8]
mov rsi, rdi
mov edx, 3
call rax
loc_A3E5B:
lea rdi, [rsp+148h+var_A0]
call _ZNSt10_HashtableINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_S5_ESaIS8_ENSt8__detail10_Select1stESt8equal_toIS5_ESt4hashIS5_ENSA_18_Mod_range_hashingENSA_20_Default_ranged_hashENSA_20_Prime_rehash_policyENSA_17_Hashtable_traitsILb1ELb0ELb1EEEED2Ev; std::_Hashtable<std::string,std::pair<std::string const,std::string>,std::allocator<std::pair<std::string const,std::string>>,std::__detail::_Select1st,std::equal_to<std::string>,std::hash<std::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,false,true>>::~_Hashtable()
lea rax, [rsp+148h+var_38]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz loc_A3D35
mov rsi, [rsp+148h+var_38]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp loc_A3D35
jmp loc_A3F64
mov rbx, rax
mov rdi, [rsp+148h+var_118]; void *
cmp rdi, r13
jz short loc_A3EB6
mov rsi, [rsp+148h+var_108]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_A3EB6
mov rbx, rax
loc_A3EB6:
mov rdi, [rsp+148h+var_138]; void *
cmp rdi, r12
jz short loc_A3ED2
mov rsi, [rsp+148h+var_128]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_A3ED2
mov rbx, rax
loc_A3ED2:
lea rax, [rsp+148h+var_58]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_A3EF8
mov rsi, [rsp+148h+var_58]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_A3EF8
mov rbx, rax
loc_A3EF8:
lea rax, [rsp+148h+var_B8]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_A3F1E
mov rsi, [rsp+148h+var_B8]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_A3F1E
mov rbx, rax
loc_A3F1E:
mov rax, [rsp+148h+var_D8]
test rax, rax
jz short loc_A3F3C
lea rdi, [rsp+148h+var_E8]
mov rsi, rdi
mov edx, 3
call rax
jmp short loc_A3F3C
mov rbx, rax
loc_A3F3C:
lea rdi, [rsp+148h+var_A0]
call _ZNSt10_HashtableINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_S5_ESaIS8_ENSt8__detail10_Select1stESt8equal_toIS5_ESt4hashIS5_ENSA_18_Mod_range_hashingENSA_20_Default_ranged_hashENSA_20_Prime_rehash_policyENSA_17_Hashtable_traitsILb1ELb0ELb1EEEED2Ev; std::_Hashtable<std::string,std::pair<std::string const,std::string>,std::allocator<std::pair<std::string const,std::string>>,std::__detail::_Select1st,std::equal_to<std::string>,std::hash<std::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,false,true>>::~_Hashtable()
lea rax, [rsp+148h+var_38]
mov rdi, [rax-10h]
cmp rdi, rax
jz short loc_A3F91
mov rsi, [rsp+148h+var_38]
jmp short loc_A3F84
loc_A3F64:
mov rdi, rax
call __clang_call_terminate
mov rbx, rax
mov rdi, [rsp+148h+var_A0]; void *
cmp rdi, r15
jz short loc_A3F91
mov rsi, [rsp+148h+var_90]
loc_A3F84:
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_A3F91
mov rbx, rax
loc_A3F91:
mov rdi, rbx
call __Unwind_Resume
| long long SchemaConverter::_visit_pattern(long long a1, long long a2, long long a3, long long a4)
{
_BYTE *v5; // rdx
long long v7; // rcx
int **v8; // rax
int v9; // ecx
int v10; // r8d
int v11; // r9d
long long v12; // rax
__int128 *v13; // rcx
void *v14; // rax
long long v15; // rcx
long long v17; // rax
__int128 *v18; // rdx
char v19; // [rsp+Fh] [rbp-139h] BYREF
void *v20[2]; // [rsp+10h] [rbp-138h] BYREF
__int128 v21; // [rsp+20h] [rbp-128h] BYREF
void *v22[2]; // [rsp+30h] [rbp-118h] BYREF
__int128 v23; // [rsp+40h] [rbp-108h] BYREF
int v24[2]; // [rsp+50h] [rbp-F8h] BYREF
int v25[2]; // [rsp+58h] [rbp-F0h] BYREF
void *v26[2]; // [rsp+60h] [rbp-E8h] BYREF
long long v27[2]; // [rsp+70h] [rbp-D8h]
long long v28[2]; // [rsp+80h] [rbp-C8h] BYREF
long long v29; // [rsp+90h] [rbp-B8h] BYREF
void *v30; // [rsp+A8h] [rbp-A0h] BYREF
long long v31; // [rsp+B0h] [rbp-98h]
__int128 v32; // [rsp+B8h] [rbp-90h] BYREF
int v33; // [rsp+C8h] [rbp-80h]
__int128 v34; // [rsp+D0h] [rbp-78h] BYREF
void *v35[2]; // [rsp+E0h] [rbp-68h] BYREF
long long v36; // [rsp+F0h] [rbp-58h] BYREF
void *v37[2]; // [rsp+100h] [rbp-48h] BYREF
long long v38; // [rsp+110h] [rbp-38h] BYREF
v5 = *(_BYTE **)a3;
if ( *v5 == 94 && (v7 = *(_QWORD *)(a3 + 8), v5[v7 - 1] == 36) )
{
std::string::substr(v37, a3, 1LL, v7 - 2);
v30 = (char *)&v34 + 8;
v31 = 1LL;
v32 = 0LL;
v33 = 1065353216;
v34 = 0LL;
*(_QWORD *)v25 = 0LL;
*(void **)v24 = v37[1];
*(_OWORD *)v26 = 0LL;
v8 = (int **)operator new(0x40uLL);
*v8 = v25;
v8[1] = (int *)a2;
v8[2] = (int *)&v19;
v8[3] = v24;
v8[4] = (int *)v37;
v8[5] = (int *)v26;
v8[6] = (int *)&v30;
v8[7] = (int *)a4;
v26[0] = v8;
v27[1] = (long long)std::_Function_handler<std::pair<std::string,bool> ()(void),SchemaConverter::_visit_pattern(std::string const&,std::string const&)::{lambda(void)#1}>::_M_invoke;
v27[0] = (long long)std::_Function_handler<std::pair<std::string,bool> ()(void),SchemaConverter::_visit_pattern(std::string const&,std::string const&)::{lambda(void)#1}>::_M_manager;
SchemaConverter::_visit_pattern(std::string const&,std::string const&)::{lambda(void)#1}::operator()[abi:cxx11]((long long)v28);
SchemaConverter::_visit_pattern(std::string const&,std::string const&)::{lambda(std::pair<std::string,bool> const&)#1}::operator()[abi:cxx11](
(unsigned int)v35,
(unsigned int)&v19,
(unsigned int)v28,
v9,
v10,
v11);
v12 = std::string::replace(v35, 0LL, 0LL, "\"\\\"\" (", 6LL);
v20[0] = &v21;
v13 = (__int128 *)(v12 + 16);
if ( *(_QWORD *)v12 == v12 + 16 )
{
v21 = *v13;
}
else
{
v20[0] = *(void **)v12;
*(_QWORD *)&v21 = *(_QWORD *)v13;
}
v20[1] = *(void **)(v12 + 8);
*(_QWORD *)v12 = v13;
*(_QWORD *)(v12 + 8) = 0LL;
*(_BYTE *)(v12 + 16) = 0;
v17 = std::string::append(v20, ") \"\\\"\" space");
v22[0] = &v23;
v18 = (__int128 *)(v17 + 16);
if ( *(_QWORD *)v17 == v17 + 16 )
{
v23 = *v18;
}
else
{
v22[0] = *(void **)v17;
*(_QWORD *)&v23 = *(_QWORD *)v18;
}
v22[1] = *(void **)(v17 + 8);
*(_QWORD *)v17 = v18;
*(_QWORD *)(v17 + 8) = 0LL;
*(_BYTE *)(v17 + 16) = 0;
SchemaConverter::_add_rule(a1, a2, a4, v22);
if ( v22[0] != &v23 )
operator delete(v22[0], v23 + 1);
if ( v20[0] != &v21 )
operator delete(v20[0], v21 + 1);
if ( v35[0] != &v36 )
operator delete(v35[0], v36 + 1);
if ( (long long *)v28[0] != &v29 )
operator delete((void *)v28[0], v29 + 1);
if ( v27[0] )
((void ( *)(void **, void **, long long))v27[0])(v26, v26, 3LL);
std::_Hashtable<std::string,std::pair<std::string const,std::string>,std::allocator<std::pair<std::string const,std::string>>,std::__detail::_Select1st,std::equal_to<std::string>,std::hash<std::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,false,true>>::~_Hashtable(&v30);
if ( v37[0] != &v38 )
operator delete(v37[0], v38 + 1);
}
else
{
v30 = &v32;
v28[0] = 44LL;
v14 = (void *)std::string::_M_create(&v30, v28, 0LL);
v30 = v14;
v15 = v28[0];
*(_QWORD *)&v32 = v28[0];
qmemcpy(v14, "Pattern must start with '^' and end with '$'", 44);
v31 = v15;
*((_BYTE *)v14 + v15) = 0;
std::vector<std::string>::emplace_back<std::string>(a2 + 200, (long long)&v30);
if ( v30 != &v32 )
operator delete(v30, v32 + 1);
*(_QWORD *)a1 = a1 + 16;
*(_QWORD *)(a1 + 8) = 0LL;
*(_BYTE *)(a1 + 16) = 0;
}
return a1;
}
| _visit_pattern:
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x120
MOV RAX,RDX
MOV R14,RSI
MOV RBX,RDI
MOV RDX,qword ptr [RDX]
CMP byte ptr [RDX],0x5e
JNZ 0x001a3c8d
MOV R15,RCX
MOV RCX,qword ptr [RAX + 0x8]
CMP byte ptr [RDX + RCX*0x1 + -0x1],0x24
JNZ 0x001a3c8d
ADD RCX,-0x2
LEA R12,[RSP + 0x100]
MOV EDX,0x1
MOV RDI,R12
MOV RSI,RAX
CALL 0x001186f0
LEA RAX,[RSP + 0xd8]
MOV qword ptr [RAX + -0x30],RAX
MOV qword ptr [RAX + -0x28],0x1
XORPS XMM0,XMM0
MOVUPS xmmword ptr [RAX + -0x20],XMM0
MOV dword ptr [RAX + -0x10],0x3f800000
MOVUPS xmmword ptr [RAX + -0x8],XMM0
MOV qword ptr [RSP + 0x58],0x0
MOV RAX,qword ptr [R12 + 0x8]
MOV qword ptr [RSP + 0x50],RAX
MOVAPS xmmword ptr [RSP + 0x70],XMM0
MOVAPS xmmword ptr [RSP + 0x60],XMM0
LAB_001a3bb8:
MOV EDI,0x40
CALL 0x00118690
LEA RCX,[RSP + 0x58]
MOV qword ptr [RAX],RCX
MOV qword ptr [RAX + 0x8],R14
LEA RCX,[RSP + 0xf]
MOV qword ptr [RAX + 0x10],RCX
LEA RCX,[RSP + 0x50]
MOV qword ptr [RAX + 0x18],RCX
MOV qword ptr [RAX + 0x20],R12
LEA RCX,[RSP + 0x60]
MOV qword ptr [RAX + 0x28],RCX
LEA RDX,[RSP + 0xa8]
MOV qword ptr [RAX + 0x30],RDX
MOV qword ptr [RAX + 0x38],R15
MOV qword ptr [RCX],RAX
LEA RDX,[0x1a725a]
MOV qword ptr [RCX + 0x18],RDX
LEA RDX,[0x1a726c]
MOV qword ptr [RCX + 0x10],RDX
LAB_001a3c16:
LEA RDI,[RSP + 0x80]
MOV RSI,RAX
CALL 0x001a7294
LAB_001a3c26:
LEA RDI,[RSP + 0xe0]
LEA RSI,[RSP + 0xf]
LEA RDX,[RSP + 0x80]
CALL 0x001a7118
LAB_001a3c40:
LEA RCX,[0x1b5ded]
LEA RDI,[RSP + 0xe0]
MOV R8D,0x6
XOR ESI,ESI
XOR EDX,EDX
CALL 0x00118750
LEA R12,[RSP + 0x20]
MOV qword ptr [R12 + -0x10],R12
MOV RDX,qword ptr [RAX]
MOV RCX,RAX
ADD RCX,0x10
CMP RDX,RCX
JZ 0x001a3d49
MOV qword ptr [RSP + 0x10],RDX
MOV RDX,qword ptr [RCX]
MOV qword ptr [RSP + 0x20],RDX
JMP 0x001a3d51
LAB_001a3c8d:
LEA R15,[RSP + 0xb8]
MOV qword ptr [R15 + -0x10],R15
LEA RSI,[RSP + 0x80]
MOV qword ptr [RSI],0x2c
LAB_001a3ca8:
LEA RDI,[RSP + 0xa8]
XOR EDX,EDX
CALL 0x00118bf0
LEA RSI,[RSP + 0xa8]
MOV qword ptr [RSI],RAX
MOV RCX,qword ptr [RSP + 0x80]
MOV qword ptr [RSI + 0x10],RCX
MOVUPS XMM0,xmmword ptr [0x001b5ddc]
MOVUPS xmmword ptr [RAX + 0x1c],XMM0
MOVUPS XMM0,xmmword ptr [0x001b5dd0]
MOVUPS xmmword ptr [RAX + 0x10],XMM0
MOVUPS XMM0,xmmword ptr [0x001b5dc0]
MOVUPS xmmword ptr [RAX],XMM0
MOV qword ptr [RSI + 0x8],RCX
MOV byte ptr [RAX + RCX*0x1],0x0
ADD R14,0xc8
LAB_001a3cfd:
MOV RDI,R14
CALL 0x0011dc76
MOV RDI,qword ptr [RSP + 0xa8]
CMP RDI,R15
JZ 0x001a3d22
MOV RSI,qword ptr [RSP + 0xb8]
INC RSI
CALL 0x001186a0
LAB_001a3d22:
LEA RAX,[RBX + 0x10]
MOV qword ptr [RBX],RAX
MOV qword ptr [RBX + 0x8],0x0
MOV byte ptr [RBX + 0x10],0x0
LAB_001a3d35:
MOV RAX,RBX
ADD RSP,0x120
POP RBX
POP R12
POP R13
POP R14
POP R15
RET
LAB_001a3d49:
MOVUPS XMM0,xmmword ptr [RCX]
MOVUPS xmmword ptr [R12],XMM0
LAB_001a3d51:
MOV RDX,qword ptr [RAX + 0x8]
LEA RDI,[RSP + 0x10]
MOV qword ptr [RDI + 0x8],RDX
MOV qword ptr [RAX],RCX
MOV qword ptr [RAX + 0x8],0x0
MOV byte ptr [RAX + 0x10],0x0
LAB_001a3d6d:
LEA RSI,[0x1b5df4]
CALL 0x00118ce0
LEA R13,[RSP + 0x40]
MOV qword ptr [R13 + -0x10],R13
MOV RCX,qword ptr [RAX]
MOV RDX,RAX
ADD RDX,0x10
CMP RCX,RDX
JZ 0x001a3da0
MOV qword ptr [RSP + 0x30],RCX
MOV RCX,qword ptr [RDX]
MOV qword ptr [RSP + 0x40],RCX
JMP 0x001a3da8
LAB_001a3da0:
MOVUPS XMM0,xmmword ptr [RDX]
MOVUPS xmmword ptr [R13],XMM0
LAB_001a3da8:
MOV RSI,qword ptr [RAX + 0x8]
LEA RCX,[RSP + 0x30]
MOV qword ptr [RCX + 0x8],RSI
MOV qword ptr [RAX],RDX
MOV qword ptr [RAX + 0x8],0x0
MOV byte ptr [RAX + 0x10],0x0
LAB_001a3dc4:
MOV RDI,RBX
MOV RSI,R14
MOV RDX,R15
CALL 0x0019ec8c
MOV RDI,qword ptr [RSP + 0x30]
CMP RDI,R13
JZ 0x001a3de9
MOV RSI,qword ptr [RSP + 0x40]
INC RSI
CALL 0x001186a0
LAB_001a3de9:
MOV RDI,qword ptr [RSP + 0x10]
CMP RDI,R12
JZ 0x001a3e00
MOV RSI,qword ptr [RSP + 0x20]
INC RSI
CALL 0x001186a0
LAB_001a3e00:
LEA RAX,[RSP + 0xf0]
MOV RDI,qword ptr [RAX + -0x10]
CMP RDI,RAX
JZ 0x001a3e21
MOV RSI,qword ptr [RSP + 0xf0]
INC RSI
CALL 0x001186a0
LAB_001a3e21:
LEA RAX,[RSP + 0x90]
MOV RDI,qword ptr [RAX + -0x10]
CMP RDI,RAX
JZ 0x001a3e42
MOV RSI,qword ptr [RSP + 0x90]
INC RSI
CALL 0x001186a0
LAB_001a3e42:
MOV RAX,qword ptr [RSP + 0x70]
TEST RAX,RAX
JZ 0x001a3e5b
LAB_001a3e4c:
LEA RDI,[RSP + 0x60]
MOV RSI,RDI
MOV EDX,0x3
CALL RAX
LAB_001a3e5b:
LEA RDI,[RSP + 0xa8]
CALL 0x001a6c3e
LEA RAX,[RSP + 0x110]
MOV RDI,qword ptr [RAX + -0x10]
CMP RDI,RAX
JZ 0x001a3d35
MOV RSI,qword ptr [RSP + 0x110]
INC RSI
CALL 0x001186a0
JMP 0x001a3d35
|
/* SchemaConverter::_visit_pattern(std::__cxx11::string const&, std::__cxx11::string const&) */
string * SchemaConverter::_visit_pattern(string *param_1,string *param_2)
{
int8 uVar1;
long *plVar2;
long in_RCX;
long *plVar3;
int8 *in_RDX;
int1 local_139;
long *local_138;
long local_130;
long local_128;
long lStack_120;
long *local_118;
long local_110;
long local_108;
long lStack_100;
int8 local_f8;
int8 local_f0;
long *local_e8;
int8 uStack_e0;
code *local_d8;
code *pcStack_d0;
long *local_c8 [2];
long local_b8 [3];
int8 **local_a0;
long *local_98;
long *local_90;
int8 uStack_88;
int4 local_80;
int8 local_78;
long lStack_70;
long *local_68 [2];
long local_58 [2];
long *local_48;
int8 local_40;
long local_38 [2];
if ((*(char *)*in_RDX == '^') && (((char *)*in_RDX)[in_RDX[1] + -1] == '$')) {
std::__cxx11::string::substr((ulong)&local_48,(ulong)in_RDX);
local_a0 = (int8 **)&lStack_70;
local_98 = (long *)0x1;
local_90 = (long *)0x0;
uStack_88 = 0;
local_80 = 0x3f800000;
local_78 = 0;
lStack_70 = 0;
local_f0 = 0;
local_f8 = local_40;
local_d8 = (code *)0x0;
pcStack_d0 = (code *)0x0;
local_e8 = (long *)0x0;
uStack_e0 = 0;
/* try { // try from 001a3bb8 to 001a3bc1 has its CatchHandler @ 001a3f39 */
local_e8 = (long *)operator_new(0x40);
*local_e8 = (long)&local_f0;
local_e8[1] = (long)param_2;
local_e8[2] = (long)&local_139;
local_e8[3] = (long)&local_f8;
local_e8[4] = (long)&local_48;
local_e8[5] = (long)&local_e8;
local_e8[6] = (long)&local_a0;
local_e8[7] = in_RCX;
pcStack_d0 = std::
_Function_handler<std::pair<std::__cxx11::string,bool>(),SchemaConverter::_visit_pattern(std::__cxx11::string_const&,std::__cxx11::string_const&)::{lambda()#1}>
::_M_invoke;
local_d8 = std::
_Function_handler<std::pair<std::__cxx11::string,bool>(),SchemaConverter::_visit_pattern(std::__cxx11::string_const&,std::__cxx11::string_const&)::{lambda()#1}>
::_M_manager;
/* try { // try from 001a3c16 to 001a3c25 has its CatchHandler @ 001a3f1b */
_visit_pattern(std::__cxx11::string_const&,std::__cxx11::string_const&)::{lambda()#1}::
operator()[abi_cxx11_();
/* try { // try from 001a3c26 to 001a3c3f has its CatchHandler @ 001a3ef5 */
_visit_pattern(std::__cxx11::string_const&,std::__cxx11::string_const&)::
{lambda(std::pair<std::__cxx11::string,bool>const&)#1}::operator()::string_bool>_const___const
(local_68,&local_139,local_c8);
/* try { // try from 001a3c40 to 001a3c5d has its CatchHandler @ 001a3ecf */
plVar2 = (long *)std::__cxx11::string::replace((ulong)local_68,0,(char *)0x0,0x1b5ded);
plVar3 = plVar2 + 2;
if ((long *)*plVar2 == plVar3) {
local_128 = *plVar3;
lStack_120 = plVar2[3];
local_138 = &local_128;
}
else {
local_128 = *plVar3;
local_138 = (long *)*plVar2;
}
local_130 = plVar2[1];
*plVar2 = (long)plVar3;
plVar2[1] = 0;
*(int1 *)(plVar2 + 2) = 0;
/* try { // try from 001a3d6d to 001a3d78 has its CatchHandler @ 001a3eb3 */
plVar2 = (long *)std::__cxx11::string::append((char *)&local_138);
plVar3 = plVar2 + 2;
if ((long *)*plVar2 == plVar3) {
local_108 = *plVar3;
lStack_100 = plVar2[3];
local_118 = &local_108;
}
else {
local_108 = *plVar3;
local_118 = (long *)*plVar2;
}
local_110 = plVar2[1];
*plVar2 = (long)plVar3;
plVar2[1] = 0;
*(int1 *)(plVar2 + 2) = 0;
/* try { // try from 001a3dc4 to 001a3dd1 has its CatchHandler @ 001a3e97 */
_add_rule(param_1,param_2);
if (local_118 != &local_108) {
operator_delete(local_118,local_108 + 1);
}
if (local_138 != &local_128) {
operator_delete(local_138,local_128 + 1);
}
if (local_68[0] != local_58) {
operator_delete(local_68[0],local_58[0] + 1);
}
if (local_c8[0] != local_b8) {
operator_delete(local_c8[0],local_b8[0] + 1);
}
if (local_d8 != (code *)0x0) {
/* try { // try from 001a3e4c to 001a3e5a has its CatchHandler @ 001a3e92 */
(*local_d8)(&local_e8,&local_e8,3);
}
std::
_Hashtable<std::__cxx11::string,std::pair<std::__cxx11::string_const,std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string_const,std::__cxx11::string>>,std::__detail::_Select1st,std::equal_to<std::__cxx11::string>,std::hash<std::__cxx11::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,false,true>>
::~_Hashtable((_Hashtable<std::__cxx11::string,std::pair<std::__cxx11::string_const,std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string_const,std::__cxx11::string>>,std::__detail::_Select1st,std::equal_to<std::__cxx11::string>,std::hash<std::__cxx11::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,false,true>>
*)&local_a0);
if (local_48 != local_38) {
operator_delete(local_48,local_38[0] + 1);
}
}
else {
local_c8[0] = (long *)0x2c;
/* try { // try from 001a3ca8 to 001a3cb6 has its CatchHandler @ 001a3f8e */
local_a0 = &local_90;
local_a0 = (int8 **)std::__cxx11::string::_M_create((ulong *)&local_a0,(ulong)local_c8);
uVar1 = s_Pattern_must_start_with_____and_e_001b5dc0._36_8_;
local_90 = local_c8[0];
*(ulong *)((long)local_a0 + 0x1c) =
CONCAT44(s_Pattern_must_start_with_____and_e_001b5dc0._32_4_,
s_Pattern_must_start_with_____and_e_001b5dc0._28_4_);
*(int8 *)((long)local_a0 + 0x24) = uVar1;
plVar2 = (long *)CONCAT44(s_Pattern_must_start_with_____and_e_001b5dc0._28_4_,
s_Pattern_must_start_with_____and_e_001b5dc0._24_4_);
local_a0[2] = (int8 *)s_Pattern_must_start_with_____and_e_001b5dc0._16_8_;
local_a0[3] = plVar2;
uVar1 = s_Pattern_must_start_with_____and_e_001b5dc0._8_8_;
*local_a0 = (int8 *)s_Pattern_must_start_with_____and_e_001b5dc0._0_8_;
local_a0[1] = (int8 *)uVar1;
local_98 = local_c8[0];
*(char *)((long)local_a0 + (long)local_c8[0]) = '\0';
/* try { // try from 001a3cfd to 001a3d04 has its CatchHandler @ 001a3f6c */
std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::
emplace_back<std::__cxx11::string>
((vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *)(param_2 + 200),
(string *)&local_a0);
if (local_a0 != &local_90) {
operator_delete(local_a0,(long)local_90 + 1);
}
*(string **)param_1 = param_1 + 0x10;
*(int8 *)(param_1 + 8) = 0;
param_1[0x10] = (string)0x0;
}
return param_1;
}
|
|
6,374 | my_strnncoll_simple | eloqsql/strings/ctype-simple.c | int my_strnncoll_simple(CHARSET_INFO * cs, const uchar *s, size_t slen,
const uchar *t, size_t tlen,
my_bool t_is_prefix)
{
size_t len = ( slen > tlen ) ? tlen : slen;
const uchar *map= cs->sort_order;
if (t_is_prefix && slen > tlen)
slen=tlen;
while (len--)
{
if (map[*s++] != map[*t++])
return ((int) map[s[-1]] - (int) map[t[-1]]);
}
/*
We can't use (slen - tlen) here as the result may be outside of the
precision of a signed int
*/
return slen > tlen ? 1 : slen < tlen ? -1 : 0 ;
} | O0 | c | my_strnncoll_simple:
pushq %rbp
movq %rsp, %rbp
movb %r9b, %al
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
movq %r8, -0x30(%rbp)
movb %al, -0x31(%rbp)
movq -0x20(%rbp), %rax
cmpq -0x30(%rbp), %rax
jbe 0x458a2
movq -0x30(%rbp), %rax
movq %rax, -0x50(%rbp)
jmp 0x458aa
movq -0x20(%rbp), %rax
movq %rax, -0x50(%rbp)
movq -0x50(%rbp), %rax
movq %rax, -0x40(%rbp)
movq -0x10(%rbp), %rax
movq 0x58(%rax), %rax
movq %rax, -0x48(%rbp)
movsbl -0x31(%rbp), %eax
cmpl $0x0, %eax
je 0x458d9
movq -0x20(%rbp), %rax
cmpq -0x30(%rbp), %rax
jbe 0x458d9
movq -0x30(%rbp), %rax
movq %rax, -0x20(%rbp)
jmp 0x458db
movq -0x40(%rbp), %rax
movq %rax, %rcx
addq $-0x1, %rcx
movq %rcx, -0x40(%rbp)
cmpq $0x0, %rax
je 0x45951
movq -0x48(%rbp), %rax
movq -0x18(%rbp), %rcx
movq %rcx, %rdx
addq $0x1, %rdx
movq %rdx, -0x18(%rbp)
movzbl (%rcx), %ecx
movzbl (%rax,%rcx), %eax
movq -0x48(%rbp), %rcx
movq -0x28(%rbp), %rdx
movq %rdx, %rsi
addq $0x1, %rsi
movq %rsi, -0x28(%rbp)
movzbl (%rdx), %edx
movzbl (%rcx,%rdx), %ecx
cmpl %ecx, %eax
je 0x4594f
movq -0x48(%rbp), %rax
movq -0x18(%rbp), %rcx
movzbl -0x1(%rcx), %ecx
movzbl (%rax,%rcx), %eax
movq -0x48(%rbp), %rcx
movq -0x28(%rbp), %rdx
movzbl -0x1(%rdx), %edx
movzbl (%rcx,%rdx), %ecx
subl %ecx, %eax
movl %eax, -0x4(%rbp)
jmp 0x45983
jmp 0x458db
movq -0x20(%rbp), %rax
cmpq -0x30(%rbp), %rax
jbe 0x45965
movl $0x1, %eax
movl %eax, -0x54(%rbp)
jmp 0x4597d
movq -0x20(%rbp), %rdx
movq -0x30(%rbp), %rsi
xorl %eax, %eax
movl $0xffffffff, %ecx # imm = 0xFFFFFFFF
cmpq %rsi, %rdx
cmovbl %ecx, %eax
movl %eax, -0x54(%rbp)
movl -0x54(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
popq %rbp
retq
nopl (%rax,%rax)
| my_strnncoll_simple:
push rbp
mov rbp, rsp
mov al, r9b
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov [rbp+var_20], rdx
mov [rbp+var_28], rcx
mov [rbp+var_30], r8
mov [rbp+var_31], al
mov rax, [rbp+var_20]
cmp rax, [rbp+var_30]
jbe short loc_458A2
mov rax, [rbp+var_30]
mov [rbp+var_50], rax
jmp short loc_458AA
loc_458A2:
mov rax, [rbp+var_20]
mov [rbp+var_50], rax
loc_458AA:
mov rax, [rbp+var_50]
mov [rbp+var_40], rax
mov rax, [rbp+var_10]
mov rax, [rax+58h]
mov [rbp+var_48], rax
movsx eax, [rbp+var_31]
cmp eax, 0
jz short loc_458D9
mov rax, [rbp+var_20]
cmp rax, [rbp+var_30]
jbe short loc_458D9
mov rax, [rbp+var_30]
mov [rbp+var_20], rax
loc_458D9:
jmp short $+2
loc_458DB:
mov rax, [rbp+var_40]
mov rcx, rax
add rcx, 0FFFFFFFFFFFFFFFFh
mov [rbp+var_40], rcx
cmp rax, 0
jz short loc_45951
mov rax, [rbp+var_48]
mov rcx, [rbp+var_18]
mov rdx, rcx
add rdx, 1
mov [rbp+var_18], rdx
movzx ecx, byte ptr [rcx]
movzx eax, byte ptr [rax+rcx]
mov rcx, [rbp+var_48]
mov rdx, [rbp+var_28]
mov rsi, rdx
add rsi, 1
mov [rbp+var_28], rsi
movzx edx, byte ptr [rdx]
movzx ecx, byte ptr [rcx+rdx]
cmp eax, ecx
jz short loc_4594F
mov rax, [rbp+var_48]
mov rcx, [rbp+var_18]
movzx ecx, byte ptr [rcx-1]
movzx eax, byte ptr [rax+rcx]
mov rcx, [rbp+var_48]
mov rdx, [rbp+var_28]
movzx edx, byte ptr [rdx-1]
movzx ecx, byte ptr [rcx+rdx]
sub eax, ecx
mov [rbp+var_4], eax
jmp short loc_45983
loc_4594F:
jmp short loc_458DB
loc_45951:
mov rax, [rbp+var_20]
cmp rax, [rbp+var_30]
jbe short loc_45965
mov eax, 1
mov [rbp+var_54], eax
jmp short loc_4597D
loc_45965:
mov rdx, [rbp+var_20]
mov rsi, [rbp+var_30]
xor eax, eax
mov ecx, 0FFFFFFFFh
cmp rdx, rsi
cmovb eax, ecx
mov [rbp+var_54], eax
loc_4597D:
mov eax, [rbp+var_54]
mov [rbp+var_4], eax
loc_45983:
mov eax, [rbp+var_4]
pop rbp
retn
| long long my_strnncoll_simple(
long long a1,
unsigned __int8 *a2,
unsigned long long a3,
unsigned __int8 *a4,
unsigned long long a5,
char a6)
{
unsigned __int8 *v7; // rcx
unsigned __int8 *v8; // rdx
unsigned int v9; // eax
unsigned long long v12; // [rsp+4h] [rbp-50h]
long long v13; // [rsp+Ch] [rbp-48h]
unsigned long long v14; // [rsp+14h] [rbp-40h]
unsigned long long v16; // [rsp+34h] [rbp-20h]
v16 = a3;
if ( a3 <= a5 )
v12 = a3;
else
v12 = a5;
v14 = v12;
v13 = *(_QWORD *)(a1 + 88);
if ( a6 && a3 > a5 )
v16 = a5;
while ( v14-- )
{
v7 = a2++;
v8 = a4++;
if ( *(unsigned __int8 *)(v13 + *v7) != *(unsigned __int8 *)(v13 + *v8) )
return (unsigned int)(*(unsigned __int8 *)(v13 + *(a2 - 1)) - *(unsigned __int8 *)(v13 + *(a4 - 1)));
}
if ( v16 <= a5 )
{
v9 = 0;
if ( v16 < a5 )
v9 = -1;
return v9;
}
else
{
return 1;
}
}
| my_strnncoll_simple:
PUSH RBP
MOV RBP,RSP
MOV AL,R9B
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 byte ptr [RBP + -0x31],AL
MOV RAX,qword ptr [RBP + -0x20]
CMP RAX,qword ptr [RBP + -0x30]
JBE 0x001458a2
MOV RAX,qword ptr [RBP + -0x30]
MOV qword ptr [RBP + -0x50],RAX
JMP 0x001458aa
LAB_001458a2:
MOV RAX,qword ptr [RBP + -0x20]
MOV qword ptr [RBP + -0x50],RAX
LAB_001458aa:
MOV RAX,qword ptr [RBP + -0x50]
MOV qword ptr [RBP + -0x40],RAX
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x58]
MOV qword ptr [RBP + -0x48],RAX
MOVSX EAX,byte ptr [RBP + -0x31]
CMP EAX,0x0
JZ 0x001458d9
MOV RAX,qword ptr [RBP + -0x20]
CMP RAX,qword ptr [RBP + -0x30]
JBE 0x001458d9
MOV RAX,qword ptr [RBP + -0x30]
MOV qword ptr [RBP + -0x20],RAX
LAB_001458d9:
JMP 0x001458db
LAB_001458db:
MOV RAX,qword ptr [RBP + -0x40]
MOV RCX,RAX
ADD RCX,-0x1
MOV qword ptr [RBP + -0x40],RCX
CMP RAX,0x0
JZ 0x00145951
MOV RAX,qword ptr [RBP + -0x48]
MOV RCX,qword ptr [RBP + -0x18]
MOV RDX,RCX
ADD RDX,0x1
MOV qword ptr [RBP + -0x18],RDX
MOVZX ECX,byte ptr [RCX]
MOVZX EAX,byte ptr [RAX + RCX*0x1]
MOV RCX,qword ptr [RBP + -0x48]
MOV RDX,qword ptr [RBP + -0x28]
MOV RSI,RDX
ADD RSI,0x1
MOV qword ptr [RBP + -0x28],RSI
MOVZX EDX,byte ptr [RDX]
MOVZX ECX,byte ptr [RCX + RDX*0x1]
CMP EAX,ECX
JZ 0x0014594f
MOV RAX,qword ptr [RBP + -0x48]
MOV RCX,qword ptr [RBP + -0x18]
MOVZX ECX,byte ptr [RCX + -0x1]
MOVZX EAX,byte ptr [RAX + RCX*0x1]
MOV RCX,qword ptr [RBP + -0x48]
MOV RDX,qword ptr [RBP + -0x28]
MOVZX EDX,byte ptr [RDX + -0x1]
MOVZX ECX,byte ptr [RCX + RDX*0x1]
SUB EAX,ECX
MOV dword ptr [RBP + -0x4],EAX
JMP 0x00145983
LAB_0014594f:
JMP 0x001458db
LAB_00145951:
MOV RAX,qword ptr [RBP + -0x20]
CMP RAX,qword ptr [RBP + -0x30]
JBE 0x00145965
MOV EAX,0x1
MOV dword ptr [RBP + -0x54],EAX
JMP 0x0014597d
LAB_00145965:
MOV RDX,qword ptr [RBP + -0x20]
MOV RSI,qword ptr [RBP + -0x30]
XOR EAX,EAX
MOV ECX,0xffffffff
CMP RDX,RSI
CMOVC EAX,ECX
MOV dword ptr [RBP + -0x54],EAX
LAB_0014597d:
MOV EAX,dword ptr [RBP + -0x54]
MOV dword ptr [RBP + -0x4],EAX
LAB_00145983:
MOV EAX,dword ptr [RBP + -0x4]
POP RBP
RET
|
int my_strnncoll_simple(long param_1,byte *param_2,ulong param_3,byte *param_4,ulong param_5,
char param_6)
{
long lVar1;
byte *pbVar2;
byte *pbVar3;
int local_5c;
ulong local_58;
ulong local_48;
byte *local_30;
ulong local_28;
byte *local_20;
local_58 = param_3;
if (param_5 < param_3) {
local_58 = param_5;
}
local_48 = local_58;
lVar1 = *(long *)(param_1 + 0x58);
pbVar2 = param_4;
pbVar3 = param_2;
local_28 = param_3;
if ((param_6 != '\0') && (pbVar2 = param_4, pbVar3 = param_2, param_5 < param_3)) {
pbVar2 = param_4;
pbVar3 = param_2;
local_28 = param_5;
}
do {
local_20 = pbVar3;
local_30 = pbVar2;
if (local_48 == 0) {
if (param_5 < local_28) {
local_5c = 1;
}
else {
local_5c = 0;
if (local_28 < param_5) {
local_5c = -1;
}
}
return local_5c;
}
local_48 = local_48 - 1;
pbVar2 = local_30 + 1;
pbVar3 = local_20 + 1;
} while (*(char *)(lVar1 + (ulong)*local_20) == *(char *)(lVar1 + (ulong)*local_30));
return (uint)*(byte *)(lVar1 + (ulong)*local_20) - (uint)*(byte *)(lVar1 + (ulong)*local_30);
}
|
|
6,375 | my_strnncoll_simple | eloqsql/strings/ctype-simple.c | int my_strnncoll_simple(CHARSET_INFO * cs, const uchar *s, size_t slen,
const uchar *t, size_t tlen,
my_bool t_is_prefix)
{
size_t len = ( slen > tlen ) ? tlen : slen;
const uchar *map= cs->sort_order;
if (t_is_prefix && slen > tlen)
slen=tlen;
while (len--)
{
if (map[*s++] != map[*t++])
return ((int) map[s[-1]] - (int) map[t[-1]]);
}
/*
We can't use (slen - tlen) here as the result may be outside of the
precision of a signed int
*/
return slen > tlen ? 1 : slen < tlen ? -1 : 0 ;
} | O3 | c | my_strnncoll_simple:
pushq %rbp
movq %rsp, %rbp
cmpq %r8, %rdx
movq %r8, %r10
cmovbq %rdx, %r10
movq 0x58(%rdi), %rdi
testb %r9b, %r9b
cmovneq %r10, %rdx
xorl %r9d, %r9d
cmpq %r9, %r10
je 0x39806
movzbl (%rsi,%r9), %eax
movzbl (%rdi,%rax), %eax
movzbl (%rcx,%r9), %r11d
movzbl (%rdi,%r11), %r11d
incq %r9
cmpb %r11b, %al
je 0x397e1
subl %r11d, %eax
jmp 0x39818
xorl %ecx, %ecx
cmpq %r8, %rdx
sbbl %ecx, %ecx
cmpq %r8, %rdx
movl $0x1, %eax
cmovbel %ecx, %eax
popq %rbp
retq
| my_strnncoll_simple:
push rbp
mov rbp, rsp
cmp rdx, r8
mov r10, r8
cmovb r10, rdx
mov rdi, [rdi+58h]
test r9b, r9b
cmovnz rdx, r10
xor r9d, r9d
loc_397E1:
cmp r10, r9
jz short loc_39806
movzx eax, byte ptr [rsi+r9]
movzx eax, byte ptr [rdi+rax]
movzx r11d, byte ptr [rcx+r9]
movzx r11d, byte ptr [rdi+r11]
inc r9
cmp al, r11b
jz short loc_397E1
sub eax, r11d
jmp short loc_39818
loc_39806:
xor ecx, ecx
cmp rdx, r8
sbb ecx, ecx
cmp rdx, r8
mov eax, 1
cmovbe eax, ecx
loc_39818:
pop rbp
retn
| long long my_strnncoll_simple(
long long a1,
long long a2,
unsigned long long a3,
long long a4,
unsigned long long a5,
char a6)
{
unsigned long long v6; // r10
long long v7; // rdi
long long v8; // r9
int v9; // eax
int v10; // r11d
long long result; // rax
v6 = a5;
if ( a3 < a5 )
v6 = a3;
v7 = *(_QWORD *)(a1 + 88);
if ( a6 )
a3 = v6;
v8 = 0LL;
while ( v6 != v8 )
{
v9 = *(unsigned __int8 *)(v7 + *(unsigned __int8 *)(a2 + v8));
v10 = *(unsigned __int8 *)(v7 + *(unsigned __int8 *)(a4 + v8++));
if ( (_BYTE)v9 != (_BYTE)v10 )
return (unsigned int)(v9 - v10);
}
result = 1LL;
if ( a3 <= a5 )
return (unsigned int)-(a3 < a5);
return result;
}
| my_strnncoll_simple:
PUSH RBP
MOV RBP,RSP
CMP RDX,R8
MOV R10,R8
CMOVC R10,RDX
MOV RDI,qword ptr [RDI + 0x58]
TEST R9B,R9B
CMOVNZ RDX,R10
XOR R9D,R9D
LAB_001397e1:
CMP R10,R9
JZ 0x00139806
MOVZX EAX,byte ptr [RSI + R9*0x1]
MOVZX EAX,byte ptr [RDI + RAX*0x1]
MOVZX R11D,byte ptr [RCX + R9*0x1]
MOVZX R11D,byte ptr [RDI + R11*0x1]
INC R9
CMP AL,R11B
JZ 0x001397e1
SUB EAX,R11D
JMP 0x00139818
LAB_00139806:
XOR ECX,ECX
CMP RDX,R8
SBB ECX,ECX
CMP RDX,R8
MOV EAX,0x1
CMOVBE EAX,ECX
LAB_00139818:
POP RBP
RET
|
int my_strnncoll_simple(long param_1,long param_2,ulong param_3,long param_4,ulong param_5,
char param_6)
{
byte bVar1;
byte bVar2;
ulong uVar3;
ulong uVar4;
uVar4 = param_5;
if (param_3 < param_5) {
uVar4 = param_3;
}
if (param_6 != '\0') {
param_3 = uVar4;
}
uVar3 = 0;
do {
if (uVar4 == uVar3) {
if (param_5 < param_3) {
return 1;
}
return -(uint)(param_3 < param_5);
}
bVar1 = *(byte *)(*(long *)(param_1 + 0x58) + (ulong)*(byte *)(param_2 + uVar3));
bVar2 = *(byte *)(*(long *)(param_1 + 0x58) + (ulong)*(byte *)(param_4 + uVar3));
uVar3 = uVar3 + 1;
} while (bVar1 == bVar2);
return (uint)bVar1 - (uint)bVar2;
}
|
|
6,376 | common_arg::get_value_from_env(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&) | monkey531[P]llama/common/arg.cpp | bool common_arg::get_value_from_env(std::string & output) {
if (env == nullptr) return false;
char * value = std::getenv(env);
if (value) {
output = value;
return true;
}
return false;
} | O0 | cpp | common_arg::get_value_from_env(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&):
subq $0x28, %rsp
movq %rdi, 0x18(%rsp)
movq %rsi, 0x10(%rsp)
movq 0x18(%rsp), %rax
movq %rax, (%rsp)
cmpq $0x0, 0x88(%rax)
jne 0x6bef8
movb $0x0, 0x27(%rsp)
jmp 0x6bf30
movq (%rsp), %rax
movq 0x88(%rax), %rdi
callq 0x5ada0
movq %rax, 0x8(%rsp)
cmpq $0x0, 0x8(%rsp)
je 0x6bf2b
movq 0x8(%rsp), %rsi
movq 0x10(%rsp), %rdi
callq 0x5a6f0
movb $0x1, 0x27(%rsp)
jmp 0x6bf30
movb $0x0, 0x27(%rsp)
movb 0x27(%rsp), %al
andb $0x1, %al
addq $0x28, %rsp
retq
nopl (%rax,%rax)
| _ZN10common_arg18get_value_from_envERNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE:
sub rsp, 28h
mov [rsp+28h+var_10], rdi
mov [rsp+28h+var_18], rsi
mov rax, [rsp+28h+var_10]
mov [rsp+28h+var_28], rax
cmp qword ptr [rax+88h], 0
jnz short loc_6BEF8
mov [rsp+28h+var_1], 0
jmp short loc_6BF30
loc_6BEF8:
mov rax, [rsp+28h+var_28]
mov rdi, [rax+88h]
call _getenv
mov [rsp+28h+var_20], rax
cmp [rsp+28h+var_20], 0
jz short loc_6BF2B
mov rsi, [rsp+28h+var_20]
mov rdi, [rsp+28h+var_18]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEPKc; std::string::operator=(char const*)
mov [rsp+28h+var_1], 1
jmp short loc_6BF30
loc_6BF2B:
mov [rsp+28h+var_1], 0
loc_6BF30:
mov al, [rsp+28h+var_1]
and al, 1
add rsp, 28h
retn
| char common_arg::get_value_from_env(long long a1, long long a2)
{
long long v3; // [rsp+8h] [rbp-20h]
if ( !*(_QWORD *)(a1 + 136) )
return 0;
v3 = getenv(*(_QWORD *)(a1 + 136));
if ( !v3 )
return 0;
std::string::operator=(a2, v3);
return 1;
}
| get_value_from_env:
SUB RSP,0x28
MOV qword ptr [RSP + 0x18],RDI
MOV qword ptr [RSP + 0x10],RSI
MOV RAX,qword ptr [RSP + 0x18]
MOV qword ptr [RSP],RAX
CMP qword ptr [RAX + 0x88],0x0
JNZ 0x0016bef8
MOV byte ptr [RSP + 0x27],0x0
JMP 0x0016bf30
LAB_0016bef8:
MOV RAX,qword ptr [RSP]
MOV RDI,qword ptr [RAX + 0x88]
CALL 0x0015ada0
MOV qword ptr [RSP + 0x8],RAX
CMP qword ptr [RSP + 0x8],0x0
JZ 0x0016bf2b
MOV RSI,qword ptr [RSP + 0x8]
MOV RDI,qword ptr [RSP + 0x10]
CALL 0x0015a6f0
MOV byte ptr [RSP + 0x27],0x1
JMP 0x0016bf30
LAB_0016bf2b:
MOV byte ptr [RSP + 0x27],0x0
LAB_0016bf30:
MOV AL,byte ptr [RSP + 0x27]
AND AL,0x1
ADD RSP,0x28
RET
|
/* common_arg::get_value_from_env(std::__cxx11::string&) */
int1 __thiscall common_arg::get_value_from_env(common_arg *this,string *param_1)
{
char *pcVar1;
int1 local_1;
if (*(long *)(this + 0x88) == 0) {
local_1 = 0;
}
else {
pcVar1 = getenv(*(char **)(this + 0x88));
if (pcVar1 == (char *)0x0) {
local_1 = 0;
}
else {
std::__cxx11::string::operator=(param_1,pcVar1);
local_1 = 1;
}
}
return local_1;
}
|
|
6,377 | minja::Parser::parseString[abi:cxx11]() | llama.cpp/common/minja/minja.hpp | std::unique_ptr<std::string> parseString() {
auto doParse = [&](char quote) -> std::unique_ptr<std::string> {
if (it == end || *it != quote) return nullptr;
std::string result;
bool escape = false;
for (++it; it != end; ++it) {
if (escape) {
escape = false;
switch (*it) {
case 'n': result += '\n'; break;
case 'r': result += '\r'; break;
case 't': result += '\t'; break;
case 'b': result += '\b'; break;
case 'f': result += '\f'; break;
case '\\': result += '\\'; break;
default:
if (*it == quote) {
result += quote;
} else {
result += *it;
}
break;
}
} else if (*it == '\\') {
escape = true;
} else if (*it == quote) {
++it;
return std::make_unique<std::string>(std::move(result));
} else {
result += *it;
}
}
return nullptr;
};
consumeSpaces();
if (it == end) return nullptr;
if (*it == '"') return doParse('"');
if (*it == '\'') return doParse('\'');
return nullptr;
} | O3 | cpp | minja::Parser::parseString[abi:cxx11]():
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq %rsi, (%rsp)
movq 0x18(%rsi), %r12
movq 0x20(%rsi), %r15
cmpq %r12, %r15
je 0xe8c66
movq %rsi, %r14
movsbl (%r15), %edi
callq 0x20d60
testl %eax, %eax
je 0xe8c66
incq %r15
movq %r15, 0x20(%r14)
cmpq %r12, %r15
jne 0xe8c4d
cmpq %r12, %r15
je 0xe8c86
movzbl (%r15), %eax
cmpl $0x27, %eax
je 0xe8c8f
cmpl $0x22, %eax
jne 0xe8c86
movq %rsp, %rsi
movq %rbx, %rdi
movl $0x22, %edx
jmp 0xe8c9a
movq $0x0, (%rbx)
jmp 0xe8c9f
movq %rsp, %rsi
movq %rbx, %rdi
movl $0x27, %edx
callq 0xe90a0
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
| _ZN5minja6Parser11parseStringB5cxx11Ev:
push r15
push r14
push r12; __int64
push rbx; int
push rax
mov rbx, rdi
mov [rsp+28h+var_28], rsi; void *
mov r12, [rsi+18h]
mov r15, [rsi+20h]
cmp r15, r12
jz short loc_E8C66
mov r14, rsi
loc_E8C4D:
movsx edi, byte ptr [r15]
call _isspace
test eax, eax
jz short loc_E8C66
inc r15
mov [r14+20h], r15
cmp r15, r12
jnz short loc_E8C4D
loc_E8C66:
cmp r15, r12
jz short loc_E8C86
movzx eax, byte ptr [r15]
cmp eax, 27h ; '''
jz short loc_E8C8F
cmp eax, 22h ; '"'
jnz short loc_E8C86
mov rsi, rsp
mov rdi, rbx
mov edx, 22h ; '"'
jmp short loc_E8C9A
loc_E8C86:
mov qword ptr [rbx], 0
jmp short loc_E8C9F
loc_E8C8F:
mov rsi, rsp; int
mov rdi, rbx; int
mov edx, 27h ; '''; int
loc_E8C9A:
call _ZZN5minja6Parser11parseStringB5cxx11EvENKUlcE_clB5cxx11Ec; minja::Parser::parseString(void)::{lambda(char)#1}::operator()(char)
loc_E8C9F:
mov rax, rbx
add rsp, 8
pop rbx
pop r12
pop r14
pop r15
retn
| _QWORD * minja::Parser::parseString[abi:cxx11](_QWORD *a1, void *a2, long long a3, int a4, int a5, int a6)
{
char *v6; // r12
unsigned __int8 *i; // r15
int v8; // eax
int v9; // edx
void *v11; // [rsp+0h] [rbp-28h] BYREF
int v12; // [rsp+8h] [rbp-20h]
long long v13; // [rsp+10h] [rbp-18h]
v11 = a2;
v6 = (char *)*((_QWORD *)a2 + 3);
for ( i = (unsigned __int8 *)*((_QWORD *)a2 + 4); i != (unsigned __int8 *)v6; *((_QWORD *)a2 + 4) = ++i )
{
if ( !(unsigned int)isspace((unsigned int)(char)*i) )
break;
}
if ( i != (unsigned __int8 *)v6 )
{
v8 = *i;
if ( v8 == 39 )
{
v9 = 39;
goto LABEL_10;
}
if ( v8 == 34 )
{
v9 = 34;
LABEL_10:
minja::Parser::parseString[abi:cxx11](void)::{lambda(char)#1}::operator()[abi:cxx11](
(int)a1,
(int)&v11,
v9,
a4,
a5,
a6,
v11,
v12,
v13);
return a1;
}
}
*a1 = 0LL;
return a1;
}
| parseString[abi:cxx11]:
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
PUSH RAX
MOV RBX,RDI
MOV qword ptr [RSP],RSI
MOV R12,qword ptr [RSI + 0x18]
MOV R15,qword ptr [RSI + 0x20]
CMP R15,R12
JZ 0x001e8c66
MOV R14,RSI
LAB_001e8c4d:
MOVSX EDI,byte ptr [R15]
CALL 0x00120d60
TEST EAX,EAX
JZ 0x001e8c66
INC R15
MOV qword ptr [R14 + 0x20],R15
CMP R15,R12
JNZ 0x001e8c4d
LAB_001e8c66:
CMP R15,R12
JZ 0x001e8c86
MOVZX EAX,byte ptr [R15]
CMP EAX,0x27
JZ 0x001e8c8f
CMP EAX,0x22
JNZ 0x001e8c86
MOV RSI,RSP
MOV RDI,RBX
MOV EDX,0x22
JMP 0x001e8c9a
LAB_001e8c86:
MOV qword ptr [RBX],0x0
JMP 0x001e8c9f
LAB_001e8c8f:
MOV RSI,RSP
MOV RDI,RBX
MOV EDX,0x27
LAB_001e8c9a:
CALL 0x001e90a0
LAB_001e8c9f:
MOV RAX,RBX
ADD RSP,0x8
POP RBX
POP R12
POP R14
POP R15
RET
|
/* minja::Parser::parseString[abi:cxx11]() */
void minja::Parser::parseString_abi_cxx11_(void)
{
char *pcVar1;
int iVar2;
long in_RSI;
int8 *in_RDI;
char *pcVar3;
pcVar1 = *(char **)(in_RSI + 0x18);
pcVar3 = *(char **)(in_RSI + 0x20);
while ((pcVar3 != pcVar1 && (iVar2 = isspace((int)*pcVar3), iVar2 != 0))) {
pcVar3 = pcVar3 + 1;
*(char **)(in_RSI + 0x20) = pcVar3;
}
if ((pcVar3 == pcVar1) || ((*pcVar3 != '\'' && (*pcVar3 != '\"')))) {
*in_RDI = 0;
}
else {
parseString[abi:cxx11]()::{lambda(char)#1}::operator()[abi_cxx11_((char)in_RDI);
}
return;
}
|
|
6,378 | psi_rwlock_rdlock | eloqsql/mysys/my_thr_init.c | ATTRIBUTE_COLD
int psi_rwlock_rdlock(mysql_rwlock_t *that, const char *file, uint line)
{
PSI_rwlock_locker_state state;
PSI_rwlock_locker *locker= PSI_RWLOCK_CALL(start_rwlock_rdwait)
(&state, that->m_psi, PSI_RWLOCK_READLOCK, file, line);
int result= rw_rdlock(&that->m_rwlock);
if (locker)
PSI_RWLOCK_CALL(end_rwlock_rdwait)(locker, result);
return result;
} | O0 | c | psi_rwlock_rdlock:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
leaq 0x3144ae(%rip), %rax # 0x38d408
movq (%rax), %rax
movq 0x1a0(%rax), %rax
movq -0x8(%rbp), %rcx
movq 0x90(%rcx), %rsi
movq -0x10(%rbp), %rcx
movl -0x14(%rbp), %r8d
leaq -0x48(%rbp), %rdi
xorl %edx, %edx
callq *%rax
movq %rax, -0x50(%rbp)
movq -0x8(%rbp), %rdi
callq 0x79550
movl %eax, -0x54(%rbp)
cmpq $0x0, -0x50(%rbp)
je 0x78fb0
leaq 0x31446b(%rip), %rax # 0x38d408
movq (%rax), %rax
movq 0x1a8(%rax), %rax
movq -0x50(%rbp), %rdi
movl -0x54(%rbp), %esi
callq *%rax
movl -0x54(%rbp), %eax
addq $0x60, %rsp
popq %rbp
retq
nopl (%rax)
| psi_rwlock_rdlock:
push rbp
mov rbp, rsp
sub rsp, 60h
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov [rbp+var_14], edx
lea rax, PSI_server
mov rax, [rax]
mov rax, [rax+1A0h]
mov rcx, [rbp+var_8]
mov rsi, [rcx+90h]
mov rcx, [rbp+var_10]
mov r8d, [rbp+var_14]
lea rdi, [rbp+var_48]
xor edx, edx
call rax
mov [rbp+var_50], rax
mov rdi, [rbp+var_8]
call my_rw_rdlock
mov [rbp+var_54], eax
cmp [rbp+var_50], 0
jz short loc_78FB0
lea rax, PSI_server
mov rax, [rax]
mov rax, [rax+1A8h]
mov rdi, [rbp+var_50]
mov esi, [rbp+var_54]
call rax
loc_78FB0:
mov eax, [rbp+var_54]
add rsp, 60h
pop rbp
retn
| long long psi_rwlock_rdlock(long long a1, long long a2, unsigned int a3)
{
unsigned int v4; // [rsp+Ch] [rbp-54h]
long long v5; // [rsp+10h] [rbp-50h]
_BYTE v6[52]; // [rsp+18h] [rbp-48h] BYREF
unsigned int v7; // [rsp+4Ch] [rbp-14h]
long long v8; // [rsp+50h] [rbp-10h]
long long v9; // [rsp+58h] [rbp-8h]
v9 = a1;
v8 = a2;
v7 = a3;
v5 = (*((long long ( **)(_BYTE *, _QWORD, _QWORD, long long, _QWORD))PSI_server + 52))(
v6,
*(_QWORD *)(a1 + 144),
0LL,
a2,
a3);
v4 = my_rw_rdlock(v9);
if ( v5 )
(*((void ( **)(long long, _QWORD))PSI_server + 53))(v5, v4);
return v4;
}
| psi_rwlock_rdlock:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x60
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV dword ptr [RBP + -0x14],EDX
LEA RAX,[0x48d408]
MOV RAX,qword ptr [RAX]
MOV RAX,qword ptr [RAX + 0x1a0]
MOV RCX,qword ptr [RBP + -0x8]
MOV RSI,qword ptr [RCX + 0x90]
MOV RCX,qword ptr [RBP + -0x10]
MOV R8D,dword ptr [RBP + -0x14]
LEA RDI,[RBP + -0x48]
XOR EDX,EDX
CALL RAX
MOV qword ptr [RBP + -0x50],RAX
MOV RDI,qword ptr [RBP + -0x8]
CALL 0x00179550
MOV dword ptr [RBP + -0x54],EAX
CMP qword ptr [RBP + -0x50],0x0
JZ 0x00178fb0
LEA RAX,[0x48d408]
MOV RAX,qword ptr [RAX]
MOV RAX,qword ptr [RAX + 0x1a8]
MOV RDI,qword ptr [RBP + -0x50]
MOV ESI,dword ptr [RBP + -0x54]
CALL RAX
LAB_00178fb0:
MOV EAX,dword ptr [RBP + -0x54]
ADD RSP,0x60
POP RBP
RET
|
int4 psi_rwlock_rdlock(long param_1,int8 param_2,int4 param_3)
{
int4 uVar1;
long lVar2;
int1 local_50 [52];
int4 local_1c;
int8 local_18;
long local_10;
local_1c = param_3;
local_18 = param_2;
local_10 = param_1;
lVar2 = (**(code **)(PSI_server + 0x1a0))
(local_50,*(int8 *)(param_1 + 0x90),0,param_2,param_3);
uVar1 = my_rw_rdlock(local_10);
if (lVar2 != 0) {
(**(code **)(PSI_server + 0x1a8))(lVar2,uVar1);
}
return uVar1;
}
|
|
6,379 | js_string_normalize | bluesky950520[P]quickjs/quickjs.c | static JSValue js_string_normalize(JSContext *ctx, JSValue this_val,
int argc, JSValue *argv)
{
const char *form, *p;
size_t form_len;
int is_compat, buf_len, out_len;
UnicodeNormalizationEnum n_type;
JSValue val;
uint32_t *buf, *out_buf;
val = JS_ToStringCheckObject(ctx, this_val);
if (JS_IsException(val))
return val;
buf_len = JS_ToUTF32String(ctx, &buf, val);
JS_FreeValue(ctx, val);
if (buf_len < 0)
return JS_EXCEPTION;
if (argc == 0 || JS_IsUndefined(argv[0])) {
n_type = UNICODE_NFC;
} else {
form = JS_ToCStringLen(ctx, &form_len, argv[0]);
if (!form)
goto fail1;
p = form;
if (p[0] != 'N' || p[1] != 'F')
goto bad_form;
p += 2;
is_compat = FALSE;
if (*p == 'K') {
is_compat = TRUE;
p++;
}
if (*p == 'C' || *p == 'D') {
n_type = UNICODE_NFC + is_compat * 2 + (*p - 'C');
if ((p + 1 - form) != form_len)
goto bad_form;
} else {
bad_form:
JS_FreeCString(ctx, form);
JS_ThrowRangeError(ctx, "bad normalization form");
fail1:
js_free(ctx, buf);
return JS_EXCEPTION;
}
JS_FreeCString(ctx, form);
}
out_len = unicode_normalize(&out_buf, buf, buf_len, n_type,
ctx->rt, (DynBufReallocFunc *)js_realloc_rt);
js_free(ctx, buf);
if (out_len < 0)
return JS_EXCEPTION;
val = JS_NewUTF32String(ctx, out_buf, out_len);
js_free(ctx, out_buf);
return val;
} | O0 | c | js_string_normalize:
subq $0xb8, %rsp
movq %rsi, 0x98(%rsp)
movq %rdx, 0xa0(%rsp)
movq %rdi, 0x90(%rsp)
movl %ecx, 0x8c(%rsp)
movq %r8, 0x80(%rsp)
movq 0x90(%rsp), %rdi
movq 0x98(%rsp), %rsi
movq 0xa0(%rsp), %rdx
callq 0x6f510
movq %rax, 0x28(%rsp)
movq %rdx, 0x30(%rsp)
movq 0x28(%rsp), %rax
movq %rax, 0x48(%rsp)
movq 0x30(%rsp), %rax
movq %rax, 0x50(%rsp)
movq 0x48(%rsp), %rdi
movq 0x50(%rsp), %rsi
callq 0x22a00
cmpl $0x0, %eax
je 0xd5bcc
movq 0x48(%rsp), %rax
movq %rax, 0xa8(%rsp)
movq 0x50(%rsp), %rax
movq %rax, 0xb0(%rsp)
jmp 0xd5e70
movq 0x90(%rsp), %rdi
movq 0x48(%rsp), %rdx
movq 0x50(%rsp), %rcx
leaq 0x40(%rsp), %rsi
callq 0xd6990
movl %eax, 0x60(%rsp)
movq 0x90(%rsp), %rdi
movq 0x48(%rsp), %rsi
movq 0x50(%rsp), %rdx
callq 0x229d0
cmpl $0x0, 0x60(%rsp)
jge 0xd5c26
movl $0x0, 0xa8(%rsp)
movq $0x6, 0xb0(%rsp)
jmp 0xd5e70
cmpl $0x0, 0x8c(%rsp)
je 0xd5c49
movq 0x80(%rsp), %rax
movq (%rax), %rdi
movq 0x8(%rax), %rsi
callq 0x2cfa0
cmpl $0x0, %eax
je 0xd5c56
movl $0x0, 0x58(%rsp)
jmp 0xd5db0
movq 0x90(%rsp), %rdi
movq 0x80(%rsp), %rax
movq (%rax), %rdx
movq 0x8(%rax), %rcx
leaq 0x68(%rsp), %rsi
callq 0x61c10
movq %rax, 0x78(%rsp)
cmpq $0x0, 0x78(%rsp)
jne 0xd5c89
jmp 0xd5d70
movq 0x78(%rsp), %rax
movq %rax, 0x70(%rsp)
movq 0x70(%rsp), %rax
movzbl (%rax), %eax
cmpl $0x4e, %eax
jne 0xd5cae
movq 0x70(%rsp), %rax
movzbl 0x1(%rax), %eax
cmpl $0x46, %eax
je 0xd5cb3
jmp 0xd5d3e
movq 0x70(%rsp), %rax
addq $0x2, %rax
movq %rax, 0x70(%rsp)
movl $0x0, 0x64(%rsp)
movq 0x70(%rsp), %rax
movzbl (%rax), %eax
cmpl $0x4b, %eax
jne 0xd5cec
movl $0x1, 0x64(%rsp)
movq 0x70(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x70(%rsp)
movq 0x70(%rsp), %rax
movzbl (%rax), %eax
cmpl $0x43, %eax
je 0xd5d06
movq 0x70(%rsp), %rax
movzbl (%rax), %eax
cmpl $0x44, %eax
jne 0xd5d3c
movl 0x64(%rsp), %eax
shll %eax
addl $0x0, %eax
movq 0x70(%rsp), %rcx
movzbl (%rcx), %ecx
subl $0x43, %ecx
addl %ecx, %eax
movl %eax, 0x58(%rsp)
movq 0x70(%rsp), %rax
addq $0x1, %rax
movq 0x78(%rsp), %rcx
subq %rcx, %rax
cmpq 0x68(%rsp), %rax
je 0xd5d3a
jmp 0xd5d3e
jmp 0xd5d9e
jmp 0xd5d3e
movq 0x90(%rsp), %rdi
movq 0x78(%rsp), %rsi
callq 0x28b90
movq 0x90(%rsp), %rdi
leaq 0x39dcf(%rip), %rsi # 0x10fb2e
movb $0x0, %al
callq 0x283b0
movq %rax, 0x18(%rsp)
movq %rdx, 0x20(%rsp)
movq 0x90(%rsp), %rdi
movq 0x40(%rsp), %rsi
callq 0x20af0
movl $0x0, 0xa8(%rsp)
movq $0x6, 0xb0(%rsp)
jmp 0xd5e70
movq 0x90(%rsp), %rdi
movq 0x78(%rsp), %rsi
callq 0x28b90
movq 0x40(%rsp), %rsi
movl 0x60(%rsp), %edx
movl 0x58(%rsp), %ecx
movq 0x90(%rsp), %rax
movq 0x18(%rax), %r8
leaq 0x38(%rsp), %rdi
leaq -0xb56b5(%rip), %r9 # 0x20720
callq 0x103cc0
movl %eax, 0x5c(%rsp)
movq 0x90(%rsp), %rdi
movq 0x40(%rsp), %rsi
callq 0x20af0
cmpl $0x0, 0x5c(%rsp)
jge 0xd5e10
movl $0x0, 0xa8(%rsp)
movq $0x6, 0xb0(%rsp)
jmp 0xd5e70
movq 0x90(%rsp), %rdi
movq 0x38(%rsp), %rsi
movl 0x5c(%rsp), %edx
callq 0xd6a40
movq %rax, 0x8(%rsp)
movq %rdx, 0x10(%rsp)
movq 0x8(%rsp), %rax
movq %rax, 0x48(%rsp)
movq 0x10(%rsp), %rax
movq %rax, 0x50(%rsp)
movq 0x90(%rsp), %rdi
movq 0x38(%rsp), %rsi
callq 0x20af0
movq 0x48(%rsp), %rax
movq %rax, 0xa8(%rsp)
movq 0x50(%rsp), %rax
movq %rax, 0xb0(%rsp)
movq 0xa8(%rsp), %rax
movq 0xb0(%rsp), %rdx
addq $0xb8, %rsp
retq
nopl (%rax,%rax)
| js_string_normalize:
sub rsp, 0B8h
mov [rsp+0B8h+var_20], rsi
mov [rsp+0B8h+var_18], rdx
mov [rsp+0B8h+var_28], rdi
mov [rsp+0B8h+var_2C], ecx
mov [rsp+0B8h+var_38], r8
mov rdi, [rsp+0B8h+var_28]
mov rsi, [rsp+0B8h+var_20]
mov rdx, [rsp+0B8h+var_18]
call JS_ToStringCheckObject
mov [rsp+0B8h+var_90], rax
mov [rsp+0B8h+var_88], rdx
mov rax, [rsp+0B8h+var_90]
mov [rsp+0B8h+var_70], rax
mov rax, [rsp+0B8h+var_88]
mov [rsp+0B8h+var_68], rax
mov rdi, [rsp+0B8h+var_70]
mov rsi, [rsp+0B8h+var_68]
call JS_IsException_1
cmp eax, 0
jz short loc_D5BCC
mov rax, [rsp+0B8h+var_70]
mov [rsp+0B8h+var_10], rax
mov rax, [rsp+0B8h+var_68]
mov [rsp+0B8h+var_8], rax
jmp loc_D5E70
loc_D5BCC:
mov rdi, [rsp+0B8h+var_28]
mov rdx, [rsp+0B8h+var_70]
mov rcx, [rsp+0B8h+var_68]
lea rsi, [rsp+0B8h+var_78]
call JS_ToUTF32String
mov [rsp+0B8h+var_58], eax
mov rdi, [rsp+0B8h+var_28]
mov rsi, [rsp+0B8h+var_70]
mov rdx, [rsp+0B8h+var_68]
call JS_FreeValue
cmp [rsp+0B8h+var_58], 0
jge short loc_D5C26
mov dword ptr [rsp+0B8h+var_10], 0
mov [rsp+0B8h+var_8], 6
jmp loc_D5E70
loc_D5C26:
cmp [rsp+0B8h+var_2C], 0
jz short loc_D5C49
mov rax, [rsp+0B8h+var_38]
mov rdi, [rax]
mov rsi, [rax+8]
call JS_IsUndefined_0
cmp eax, 0
jz short loc_D5C56
loc_D5C49:
mov [rsp+0B8h+var_60], 0
jmp loc_D5DB0
loc_D5C56:
mov rdi, [rsp+0B8h+var_28]
mov rax, [rsp+0B8h+var_38]
mov rdx, [rax]
mov rcx, [rax+8]
lea rsi, [rsp+0B8h+var_50]
call JS_ToCStringLen_0
mov [rsp+0B8h+var_40], rax
cmp [rsp+0B8h+var_40], 0
jnz short loc_D5C89
jmp loc_D5D70
loc_D5C89:
mov rax, [rsp+0B8h+var_40]
mov [rsp+0B8h+var_48], rax
mov rax, [rsp+0B8h+var_48]
movzx eax, byte ptr [rax]
cmp eax, 4Eh ; 'N'
jnz short loc_D5CAE
mov rax, [rsp+0B8h+var_48]
movzx eax, byte ptr [rax+1]
cmp eax, 46h ; 'F'
jz short loc_D5CB3
loc_D5CAE:
jmp loc_D5D3E
loc_D5CB3:
mov rax, [rsp+0B8h+var_48]
add rax, 2
mov [rsp+0B8h+var_48], rax
mov [rsp+0B8h+var_54], 0
mov rax, [rsp+0B8h+var_48]
movzx eax, byte ptr [rax]
cmp eax, 4Bh ; 'K'
jnz short loc_D5CEC
mov [rsp+0B8h+var_54], 1
mov rax, [rsp+0B8h+var_48]
add rax, 1
mov [rsp+0B8h+var_48], rax
loc_D5CEC:
mov rax, [rsp+0B8h+var_48]
movzx eax, byte ptr [rax]
cmp eax, 43h ; 'C'
jz short loc_D5D06
mov rax, [rsp+0B8h+var_48]
movzx eax, byte ptr [rax]
cmp eax, 44h ; 'D'
jnz short loc_D5D3C
loc_D5D06:
mov eax, [rsp+0B8h+var_54]
shl eax, 1
add eax, 0
mov rcx, [rsp+0B8h+var_48]
movzx ecx, byte ptr [rcx]
sub ecx, 43h ; 'C'
add eax, ecx
mov [rsp+0B8h+var_60], eax
mov rax, [rsp+0B8h+var_48]
add rax, 1
mov rcx, [rsp+0B8h+var_40]
sub rax, rcx
cmp rax, [rsp+0B8h+var_50]
jz short loc_D5D3A
jmp short loc_D5D3E
loc_D5D3A:
jmp short loc_D5D9E
loc_D5D3C:
jmp short $+2
loc_D5D3E:
mov rdi, [rsp+0B8h+var_28]
mov rsi, [rsp+0B8h+var_40]
call JS_FreeCString
mov rdi, [rsp+0B8h+var_28]
lea rsi, aBadNormalizati; "bad normalization form"
mov al, 0
call JS_ThrowRangeError
mov [rsp+0B8h+var_A0], rax
mov [rsp+0B8h+var_98], rdx
loc_D5D70:
mov rdi, [rsp+0B8h+var_28]
mov rsi, [rsp+0B8h+var_78]
call js_free
mov dword ptr [rsp+0B8h+var_10], 0
mov [rsp+0B8h+var_8], 6
jmp loc_D5E70
loc_D5D9E:
mov rdi, [rsp+0B8h+var_28]
mov rsi, [rsp+0B8h+var_40]
call JS_FreeCString
loc_D5DB0:
mov rsi, [rsp+0B8h+var_78]
mov edx, [rsp+0B8h+var_58]
mov ecx, [rsp+0B8h+var_60]
mov rax, [rsp+0B8h+var_28]
mov r8, [rax+18h]
lea rdi, [rsp+0B8h+var_80]
lea r9, js_realloc_rt
call unicode_normalize
mov [rsp+0B8h+var_5C], eax
mov rdi, [rsp+0B8h+var_28]
mov rsi, [rsp+0B8h+var_78]
call js_free
cmp [rsp+0B8h+var_5C], 0
jge short loc_D5E10
mov dword ptr [rsp+0B8h+var_10], 0
mov [rsp+0B8h+var_8], 6
jmp short loc_D5E70
loc_D5E10:
mov rdi, [rsp+0B8h+var_28]
mov rsi, [rsp+0B8h+var_80]
mov edx, [rsp+0B8h+var_5C]
call JS_NewUTF32String
mov [rsp+0B8h+var_B0], rax
mov [rsp+0B8h+var_A8], rdx
mov rax, [rsp+0B8h+var_B0]
mov [rsp+0B8h+var_70], rax
mov rax, [rsp+0B8h+var_A8]
mov [rsp+0B8h+var_68], rax
mov rdi, [rsp+0B8h+var_28]
mov rsi, [rsp+0B8h+var_80]
call js_free
mov rax, [rsp+0B8h+var_70]
mov [rsp+0B8h+var_10], rax
mov rax, [rsp+0B8h+var_68]
mov [rsp+0B8h+var_8], rax
loc_D5E70:
mov rax, [rsp+0B8h+var_10]
mov rdx, [rsp+0B8h+var_8]
add rsp, 0B8h
retn
| long long js_string_normalize(
long long a1,
long long a2,
long long a3,
long long a4,
long long a5,
long long a6,
__m128 a7,
__m128 a8,
__m128 a9,
__m128 a10,
__m128 a11,
__m128 a12,
__m128 a13,
__m128 a14)
{
long long v14; // rdx
long long v15; // rdx
long long v16; // rcx
long long v17; // r8
long long v18; // r9
__m128 v19; // xmm4
__m128 v20; // xmm5
long long v21; // rdx
char v23; // [rsp+0h] [rbp-B8h]
long long v24; // [rsp+38h] [rbp-80h] BYREF
long long v25; // [rsp+40h] [rbp-78h] BYREF
long long v26; // [rsp+48h] [rbp-70h]
long long v27; // [rsp+50h] [rbp-68h]
unsigned int v28; // [rsp+58h] [rbp-60h]
int v29; // [rsp+5Ch] [rbp-5Ch]
int v30; // [rsp+60h] [rbp-58h]
int v31; // [rsp+64h] [rbp-54h]
long long v32; // [rsp+68h] [rbp-50h] BYREF
unsigned __int8 *v33; // [rsp+70h] [rbp-48h]
unsigned __int8 *v34; // [rsp+78h] [rbp-40h]
long long *v35; // [rsp+80h] [rbp-38h]
int v36; // [rsp+8Ch] [rbp-2Ch]
long long v37; // [rsp+90h] [rbp-28h]
long long v38; // [rsp+98h] [rbp-20h]
long long v39; // [rsp+A0h] [rbp-18h]
long long v40; // [rsp+A8h] [rbp-10h]
long long v41; // [rsp+B0h] [rbp-8h]
v38 = a2;
v39 = a3;
v37 = a1;
v36 = a4;
v35 = (long long *)a5;
v26 = JS_ToStringCheckObject(a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14);
v27 = v14;
if ( JS_IsException_1(v26, v14) )
{
v40 = v26;
v41 = v27;
return v40;
}
v30 = JS_ToUTF32String(v37, &v25, v26, v27);
JS_FreeValue(v37, v26, v27);
if ( v30 < 0 )
{
LODWORD(v40) = 0;
v41 = 6LL;
return v40;
}
if ( !v36 || JS_IsUndefined_0(*v35, v35[1]) )
{
v28 = 0;
goto LABEL_20;
}
v34 = (unsigned __int8 *)JS_ToCStringLen_0(v37, &v32, *v35, v35[1]);
if ( !v34 )
{
LABEL_19:
js_free(v37, v25);
LODWORD(v40) = 0;
v41 = 6LL;
return v40;
}
v33 = v34;
if ( *v34 != 78 || v33[1] != 70 )
goto LABEL_18;
v33 += 2;
v31 = 0;
if ( *v33 == 75 )
{
v31 = 1;
++v33;
}
if ( *v33 != 67 && *v33 != 68 || (v28 = *v33 - 67 + 2 * v31, v33 + 1 - v34 != v32) )
{
LABEL_18:
JS_FreeCString(v37, (long long)v34);
JS_ThrowRangeError(
v37,
(long long)"bad normalization form",
v15,
v16,
v17,
v18,
a7,
a8,
a9,
a10,
v19,
v20,
a13,
a14,
v23);
goto LABEL_19;
}
JS_FreeCString(v37, (long long)v34);
LABEL_20:
v29 = unicode_normalize(&v24, v25, (unsigned int)v30, v28, *(_QWORD *)(v37 + 24), js_realloc_rt);
js_free(v37, v25);
if ( v29 >= 0 )
{
v26 = JS_NewUTF32String(v37, v24, (unsigned int)v29);
v27 = v21;
js_free(v37, v24);
v40 = v26;
v41 = v27;
}
else
{
LODWORD(v40) = 0;
v41 = 6LL;
}
return v40;
}
| js_string_normalize:
SUB RSP,0xb8
MOV qword ptr [RSP + 0x98],RSI
MOV qword ptr [RSP + 0xa0],RDX
MOV qword ptr [RSP + 0x90],RDI
MOV dword ptr [RSP + 0x8c],ECX
MOV qword ptr [RSP + 0x80],R8
MOV RDI,qword ptr [RSP + 0x90]
MOV RSI,qword ptr [RSP + 0x98]
MOV RDX,qword ptr [RSP + 0xa0]
CALL 0x0016f510
MOV qword ptr [RSP + 0x28],RAX
MOV qword ptr [RSP + 0x30],RDX
MOV RAX,qword ptr [RSP + 0x28]
MOV qword ptr [RSP + 0x48],RAX
MOV RAX,qword ptr [RSP + 0x30]
MOV qword ptr [RSP + 0x50],RAX
MOV RDI,qword ptr [RSP + 0x48]
MOV RSI,qword ptr [RSP + 0x50]
CALL 0x00122a00
CMP EAX,0x0
JZ 0x001d5bcc
MOV RAX,qword ptr [RSP + 0x48]
MOV qword ptr [RSP + 0xa8],RAX
MOV RAX,qword ptr [RSP + 0x50]
MOV qword ptr [RSP + 0xb0],RAX
JMP 0x001d5e70
LAB_001d5bcc:
MOV RDI,qword ptr [RSP + 0x90]
MOV RDX,qword ptr [RSP + 0x48]
MOV RCX,qword ptr [RSP + 0x50]
LEA RSI,[RSP + 0x40]
CALL 0x001d6990
MOV dword ptr [RSP + 0x60],EAX
MOV RDI,qword ptr [RSP + 0x90]
MOV RSI,qword ptr [RSP + 0x48]
MOV RDX,qword ptr [RSP + 0x50]
CALL 0x001229d0
CMP dword ptr [RSP + 0x60],0x0
JGE 0x001d5c26
MOV dword ptr [RSP + 0xa8],0x0
MOV qword ptr [RSP + 0xb0],0x6
JMP 0x001d5e70
LAB_001d5c26:
CMP dword ptr [RSP + 0x8c],0x0
JZ 0x001d5c49
MOV RAX,qword ptr [RSP + 0x80]
MOV RDI,qword ptr [RAX]
MOV RSI,qword ptr [RAX + 0x8]
CALL 0x0012cfa0
CMP EAX,0x0
JZ 0x001d5c56
LAB_001d5c49:
MOV dword ptr [RSP + 0x58],0x0
JMP 0x001d5db0
LAB_001d5c56:
MOV RDI,qword ptr [RSP + 0x90]
MOV RAX,qword ptr [RSP + 0x80]
MOV RDX,qword ptr [RAX]
MOV RCX,qword ptr [RAX + 0x8]
LEA RSI,[RSP + 0x68]
CALL 0x00161c10
MOV qword ptr [RSP + 0x78],RAX
CMP qword ptr [RSP + 0x78],0x0
JNZ 0x001d5c89
JMP 0x001d5d70
LAB_001d5c89:
MOV RAX,qword ptr [RSP + 0x78]
MOV qword ptr [RSP + 0x70],RAX
MOV RAX,qword ptr [RSP + 0x70]
MOVZX EAX,byte ptr [RAX]
CMP EAX,0x4e
JNZ 0x001d5cae
MOV RAX,qword ptr [RSP + 0x70]
MOVZX EAX,byte ptr [RAX + 0x1]
CMP EAX,0x46
JZ 0x001d5cb3
LAB_001d5cae:
JMP 0x001d5d3e
LAB_001d5cb3:
MOV RAX,qword ptr [RSP + 0x70]
ADD RAX,0x2
MOV qword ptr [RSP + 0x70],RAX
MOV dword ptr [RSP + 0x64],0x0
MOV RAX,qword ptr [RSP + 0x70]
MOVZX EAX,byte ptr [RAX]
CMP EAX,0x4b
JNZ 0x001d5cec
MOV dword ptr [RSP + 0x64],0x1
MOV RAX,qword ptr [RSP + 0x70]
ADD RAX,0x1
MOV qword ptr [RSP + 0x70],RAX
LAB_001d5cec:
MOV RAX,qword ptr [RSP + 0x70]
MOVZX EAX,byte ptr [RAX]
CMP EAX,0x43
JZ 0x001d5d06
MOV RAX,qword ptr [RSP + 0x70]
MOVZX EAX,byte ptr [RAX]
CMP EAX,0x44
JNZ 0x001d5d3c
LAB_001d5d06:
MOV EAX,dword ptr [RSP + 0x64]
SHL EAX,0x1
ADD EAX,0x0
MOV RCX,qword ptr [RSP + 0x70]
MOVZX ECX,byte ptr [RCX]
SUB ECX,0x43
ADD EAX,ECX
MOV dword ptr [RSP + 0x58],EAX
MOV RAX,qword ptr [RSP + 0x70]
ADD RAX,0x1
MOV RCX,qword ptr [RSP + 0x78]
SUB RAX,RCX
CMP RAX,qword ptr [RSP + 0x68]
JZ 0x001d5d3a
JMP 0x001d5d3e
LAB_001d5d3a:
JMP 0x001d5d9e
LAB_001d5d3c:
JMP 0x001d5d3e
LAB_001d5d3e:
MOV RDI,qword ptr [RSP + 0x90]
MOV RSI,qword ptr [RSP + 0x78]
CALL 0x00128b90
MOV RDI,qword ptr [RSP + 0x90]
LEA RSI,[0x20fb2e]
MOV AL,0x0
CALL 0x001283b0
MOV qword ptr [RSP + 0x18],RAX
MOV qword ptr [RSP + 0x20],RDX
LAB_001d5d70:
MOV RDI,qword ptr [RSP + 0x90]
MOV RSI,qword ptr [RSP + 0x40]
CALL 0x00120af0
MOV dword ptr [RSP + 0xa8],0x0
MOV qword ptr [RSP + 0xb0],0x6
JMP 0x001d5e70
LAB_001d5d9e:
MOV RDI,qword ptr [RSP + 0x90]
MOV RSI,qword ptr [RSP + 0x78]
CALL 0x00128b90
LAB_001d5db0:
MOV RSI,qword ptr [RSP + 0x40]
MOV EDX,dword ptr [RSP + 0x60]
MOV ECX,dword ptr [RSP + 0x58]
MOV RAX,qword ptr [RSP + 0x90]
MOV R8,qword ptr [RAX + 0x18]
LEA RDI,[RSP + 0x38]
LEA R9,[0x120720]
CALL 0x00203cc0
MOV dword ptr [RSP + 0x5c],EAX
MOV RDI,qword ptr [RSP + 0x90]
MOV RSI,qword ptr [RSP + 0x40]
CALL 0x00120af0
CMP dword ptr [RSP + 0x5c],0x0
JGE 0x001d5e10
MOV dword ptr [RSP + 0xa8],0x0
MOV qword ptr [RSP + 0xb0],0x6
JMP 0x001d5e70
LAB_001d5e10:
MOV RDI,qword ptr [RSP + 0x90]
MOV RSI,qword ptr [RSP + 0x38]
MOV EDX,dword ptr [RSP + 0x5c]
CALL 0x001d6a40
MOV qword ptr [RSP + 0x8],RAX
MOV qword ptr [RSP + 0x10],RDX
MOV RAX,qword ptr [RSP + 0x8]
MOV qword ptr [RSP + 0x48],RAX
MOV RAX,qword ptr [RSP + 0x10]
MOV qword ptr [RSP + 0x50],RAX
MOV RDI,qword ptr [RSP + 0x90]
MOV RSI,qword ptr [RSP + 0x38]
CALL 0x00120af0
MOV RAX,qword ptr [RSP + 0x48]
MOV qword ptr [RSP + 0xa8],RAX
MOV RAX,qword ptr [RSP + 0x50]
MOV qword ptr [RSP + 0xb0],RAX
LAB_001d5e70:
MOV RAX,qword ptr [RSP + 0xa8]
MOV RDX,qword ptr [RSP + 0xb0]
ADD RSP,0xb8
RET
|
int1 [16]
js_string_normalize(long param_1,int8 param_2,int8 param_3,int param_4,
int8 *param_5)
{
byte bVar1;
int iVar2;
int1 auVar3 [16];
int8 local_80;
int8 local_78;
int1 local_70 [16];
int local_60;
int local_5c;
int local_58;
uint local_54;
byte *local_50;
byte *local_48;
byte *local_40;
int8 *local_38;
int local_2c;
long local_28;
int8 local_20;
int8 local_18;
int4 local_10;
int4 uStack_c;
int8 local_8;
local_38 = param_5;
local_2c = param_4;
local_28 = param_1;
local_20 = param_2;
local_18 = param_3;
local_70 = JS_ToStringCheckObject(param_1,param_2,param_3);
iVar2 = JS_IsException(local_70._0_8_,local_70._8_8_);
if (iVar2 != 0) {
local_10 = local_70._0_4_;
uStack_c = local_70._4_4_;
local_8 = local_70._8_8_;
goto LAB_001d5e70;
}
local_58 = JS_ToUTF32String(local_28,&local_78,local_70._0_8_,local_70._8_8_);
JS_FreeValue(local_28,local_70._0_8_,local_70._8_8_);
if (local_58 < 0) {
local_10 = 0;
local_8 = 6;
goto LAB_001d5e70;
}
if (local_2c == 0) {
LAB_001d5c49:
local_60 = 0;
}
else {
iVar2 = JS_IsUndefined(*local_38,local_38[1]);
if (iVar2 != 0) goto LAB_001d5c49;
local_40 = (byte *)JS_ToCStringLen(local_28,&local_50,*local_38,local_38[1]);
if (local_40 == (byte *)0x0) {
LAB_001d5d70:
js_free(local_28,local_78);
local_10 = 0;
local_8 = 6;
goto LAB_001d5e70;
}
local_48 = local_40;
if ((*local_40 != 0x4e) || (local_40[1] != 0x46)) {
LAB_001d5d3e:
JS_FreeCString(local_28,local_40);
JS_ThrowRangeError(local_28,"bad normalization form");
goto LAB_001d5d70;
}
local_48 = local_40 + 2;
bVar1 = *local_48;
if (bVar1 == 0x4b) {
local_48 = local_40 + 3;
}
local_54 = (uint)(bVar1 == 0x4b);
if (((*local_48 != 0x43) && (*local_48 != 0x44)) ||
(local_60 = local_54 * 2 + (*local_48 - 0x43), local_48 + (1 - (long)local_40) != local_50))
goto LAB_001d5d3e;
JS_FreeCString(local_28,local_40);
}
local_5c = unicode_normalize(&local_80,local_78,local_58,local_60,*(int8 *)(local_28 + 0x18)
,js_realloc_rt);
js_free(local_28,local_78);
if (local_5c < 0) {
local_10 = 0;
local_8 = 6;
}
else {
auVar3 = JS_NewUTF32String(local_28,local_80,local_5c);
local_70 = auVar3;
js_free(local_28,local_80);
local_10 = local_70._0_4_;
uStack_c = local_70._4_4_;
local_8 = local_70._8_8_;
}
LAB_001d5e70:
auVar3._4_4_ = uStack_c;
auVar3._0_4_ = local_10;
auVar3._8_8_ = local_8;
return auVar3;
}
|
|
6,380 | js_string_normalize | bluesky950520[P]quickjs/quickjs.c | static JSValue js_string_normalize(JSContext *ctx, JSValue this_val,
int argc, JSValue *argv)
{
const char *form, *p;
size_t form_len;
int is_compat, buf_len, out_len;
UnicodeNormalizationEnum n_type;
JSValue val;
uint32_t *buf, *out_buf;
val = JS_ToStringCheckObject(ctx, this_val);
if (JS_IsException(val))
return val;
buf_len = JS_ToUTF32String(ctx, &buf, val);
JS_FreeValue(ctx, val);
if (buf_len < 0)
return JS_EXCEPTION;
if (argc == 0 || JS_IsUndefined(argv[0])) {
n_type = UNICODE_NFC;
} else {
form = JS_ToCStringLen(ctx, &form_len, argv[0]);
if (!form)
goto fail1;
p = form;
if (p[0] != 'N' || p[1] != 'F')
goto bad_form;
p += 2;
is_compat = FALSE;
if (*p == 'K') {
is_compat = TRUE;
p++;
}
if (*p == 'C' || *p == 'D') {
n_type = UNICODE_NFC + is_compat * 2 + (*p - 'C');
if ((p + 1 - form) != form_len)
goto bad_form;
} else {
bad_form:
JS_FreeCString(ctx, form);
JS_ThrowRangeError(ctx, "bad normalization form");
fail1:
js_free(ctx, buf);
return JS_EXCEPTION;
}
JS_FreeCString(ctx, form);
}
out_len = unicode_normalize(&out_buf, buf, buf_len, n_type,
ctx->rt, (DynBufReallocFunc *)js_realloc_rt);
js_free(ctx, buf);
if (out_len < 0)
return JS_EXCEPTION;
val = JS_NewUTF32String(ctx, out_buf, out_len);
js_free(ctx, out_buf);
return val;
} | O1 | c | js_string_normalize:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %r8, %r12
movl %ecx, %r13d
movq %rdi, %rbx
callq 0x419eb
movq %rax, %r15
movq %rdx, %r14
cmpl $0x6, %r14d
jne 0x7c42a
movabsq $-0x100000000, %rax # imm = 0xFFFFFFFF00000000
movq %r15, %r12
andq %rax, %r12
jmp 0x7c651
movq %r12, 0x38(%rsp)
movq %rbx, %rdi
movq %r15, %rsi
movq %r14, %rdx
xorl %ecx, %ecx
callq 0x26ec9
movq %rdx, %r12
movq %rax, (%rsp)
movl $0xffffffff, %ebp # imm = 0xFFFFFFFF
cmpl $0x6, %r12d
jne 0x7c669
movq 0x18(%rbx), %rdi
movq %r15, %rsi
movq %r14, %rdx
callq 0x1ccb2
movl $0x6, %r14d
xorl %r15d, %r15d
testl %ebp, %ebp
js 0x7c619
testl %r13d, %r13d
je 0x7c48c
movq 0x38(%rsp), %rax
movq 0x8(%rax), %rcx
cmpl $0x3, %ecx
jne 0x7c544
movq 0x28(%rsp), %r12
movq 0x18(%rbx), %r8
leaq -0x605ee(%rip), %r9 # 0x1beae
leaq 0x20(%rsp), %rdi
movq %r12, %rsi
movl %ebp, %edx
movl %r15d, %ecx
callq 0x97da7
movl %eax, %ebp
movq %rbx, %rdi
movq %r12, %rsi
callq 0x1bf85
testl %ebp, %ebp
js 0x7c616
movq 0x20(%rsp), %r15
movq %rbx, (%rsp)
movl %ebp, 0x14(%rsp)
movl $0x0, 0x10(%rsp)
movq $0x0, 0x18(%rsp)
movq %rbx, %rdi
movl %ebp, %esi
xorl %edx, %edx
callq 0x1ff5f
movq %rax, 0x8(%rsp)
testq %rax, %rax
je 0x7c697
testl %ebp, %ebp
je 0x7c524
movl %ebp, %r12d
xorl %r13d, %r13d
movq %rsp, %r14
movl (%r15,%r13,4), %esi
movq %r14, %rdi
callq 0x327dc
testl %eax, %eax
jne 0x7c61e
incq %r13
cmpq %r13, %r12
jne 0x7c508
movq %rsp, %rdi
callq 0x32830
movq %rax, %r15
movq %rdx, %r14
movabsq $-0x100000000, %r12 # imm = 0xFFFFFFFF00000000
andq %rax, %r12
jmp 0x7c641
movq (%rax), %rdx
leaq 0x40(%rsp), %rsi
movq %rbx, %rdi
xorl %r8d, %r8d
callq 0x1ffe3
testq %rax, %rax
je 0x7c609
cmpb $0x4e, (%rax)
jne 0x7c5d3
cmpb $0x46, 0x1(%rax)
jne 0x7c5d3
leaq 0x2(%rax), %rdx
leaq 0x3(%rax), %rsi
xorl %ecx, %ecx
cmpb $0x4b, 0x2(%rax)
cmoveq %rsi, %rdx
sete %cl
movzbl 0x2(%rax,%rcx), %esi
leal -0x43(%rsi), %edi
cmpb $0x1, %dil
ja 0x7c5d3
subq %rax, %rdx
incq %rdx
cmpq 0x40(%rsp), %rdx
jne 0x7c5d3
addl %ecx, %ecx
leal (%rsi,%rcx), %r15d
addl $-0x43, %r15d
movq 0x18(%rbx), %rdi
movl -0x18(%rax), %ecx
leal -0x1(%rcx), %edx
movl %edx, -0x18(%rax)
cmpl $0x1, %ecx
jg 0x7c48c
addq $-0x18, %rax
movq %rax, %rsi
movq $-0x7, %rdx
callq 0x20652
jmp 0x7c48c
movq 0x18(%rbx), %rdi
movl -0x18(%rax), %ecx
leal -0x1(%rcx), %edx
movl %edx, -0x18(%rax)
cmpl $0x1, %ecx
jg 0x7c5f8
addq $-0x18, %rax
movq %rax, %rsi
movq $-0x7, %rdx
callq 0x20652
leaq 0x2451c(%rip), %rsi # 0xa0b1b
movq %rbx, %rdi
xorl %eax, %eax
callq 0x1fec9
movq 0x28(%rsp), %rsi
movq %rbx, %rdi
callq 0x1bf85
xorl %r15d, %r15d
xorl %r12d, %r12d
jmp 0x7c651
movq (%rsp), %rdi
movq 0x8(%rsp), %rsi
callq 0x1bf85
movq $0x0, 0x8(%rsp)
movl $0x6, %r14d
xorl %r15d, %r15d
xorl %r12d, %r12d
orq %r12, %r15
movq 0x20(%rsp), %rsi
movq %rbx, %rdi
callq 0x1bf85
movl %r15d, %eax
orq %r12, %rax
movq %r14, %rdx
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq (%rsp), %rsi
movq %rsi, 0x30(%rsp)
leaq 0x28(%rsp), %rdx
movq %rbx, %rdi
callq 0x12742
movl %eax, %ebp
movq 0x18(%rbx), %rdi
movq 0x30(%rsp), %rsi
movq %r12, %rdx
callq 0x1ccb2
jmp 0x7c455
movl $0x0, 0x14(%rsp)
movl $0xffffffff, 0x1c(%rsp) # imm = 0xFFFFFFFF
jmp 0x7c635
| js_string_normalize:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 48h
mov r12, r8
mov r13d, ecx
mov rbx, rdi
call JS_ToStringCheckObject
mov r15, rax
mov r14, rdx
cmp r14d, 6
jnz short loc_7C42A
mov rax, 0FFFFFFFF00000000h
mov r12, r15
and r12, rax
jmp loc_7C651
loc_7C42A:
mov [rsp+78h+var_40], r12
mov rdi, rbx
mov rsi, r15
mov rdx, r14
xor ecx, ecx
call JS_ToStringInternal
mov r12, rdx
mov [rsp+78h+var_78], rax
mov ebp, 0FFFFFFFFh
cmp r12d, 6
jnz loc_7C669
loc_7C455:
mov rdi, [rbx+18h]
mov rsi, r15
mov rdx, r14
call JS_FreeValueRT
mov r14d, 6
xor r15d, r15d
test ebp, ebp
js loc_7C619
test r13d, r13d
jz short loc_7C48C
mov rax, [rsp+78h+var_40]
mov rcx, [rax+8]
cmp ecx, 3
jnz loc_7C544
loc_7C48C:
mov r12, [rsp+78h+var_50]
mov r8, [rbx+18h]
lea r9, js_realloc_rt
lea rdi, [rsp+78h+var_58]
mov rsi, r12
mov edx, ebp
mov ecx, r15d
call unicode_normalize
mov ebp, eax
mov rdi, rbx
mov rsi, r12
call js_free
test ebp, ebp
js loc_7C616
mov r15, [rsp+78h+var_58]
mov [rsp+78h+var_78], rbx
mov [rsp+78h+var_64], ebp
mov [rsp+78h+var_68], 0
mov [rsp+78h+var_60], 0
mov rdi, rbx
mov esi, ebp
xor edx, edx
call js_alloc_string
mov [rsp+78h+var_70], rax
test rax, rax
jz loc_7C697
test ebp, ebp
jz short loc_7C524
mov r12d, ebp
xor r13d, r13d
mov r14, rsp
loc_7C508:
mov esi, [r15+r13*4]
mov rdi, r14
call string_buffer_putc
test eax, eax
jnz loc_7C61E
inc r13
cmp r12, r13
jnz short loc_7C508
loc_7C524:
mov rdi, rsp
call string_buffer_end
mov r15, rax
mov r14, rdx
mov r12, 0FFFFFFFF00000000h
and r12, rax
jmp loc_7C641
loc_7C544:
mov rdx, [rax]
lea rsi, [rsp+78h+var_38]
mov rdi, rbx
xor r8d, r8d
call JS_ToCStringLen2
test rax, rax
jz loc_7C609
cmp byte ptr [rax], 4Eh ; 'N'
jnz short loc_7C5D3
cmp byte ptr [rax+1], 46h ; 'F'
jnz short loc_7C5D3
lea rdx, [rax+2]
lea rsi, [rax+3]
xor ecx, ecx
cmp byte ptr [rax+2], 4Bh ; 'K'
cmovz rdx, rsi
setz cl
movzx esi, byte ptr [rax+rcx+2]
lea edi, [rsi-43h]
cmp dil, 1
ja short loc_7C5D3
sub rdx, rax
inc rdx
cmp rdx, [rsp+78h+var_38]
jnz short loc_7C5D3
add ecx, ecx
lea r15d, [rsi+rcx]
add r15d, 0FFFFFFBDh
mov rdi, [rbx+18h]
mov ecx, [rax-18h]
lea edx, [rcx-1]
mov [rax-18h], edx
cmp ecx, 1
jg loc_7C48C
add rax, 0FFFFFFFFFFFFFFE8h
mov rsi, rax
mov rdx, 0FFFFFFFFFFFFFFF9h
call js_free_value_rt
jmp loc_7C48C
loc_7C5D3:
mov rdi, [rbx+18h]
mov ecx, [rax-18h]
lea edx, [rcx-1]
mov [rax-18h], edx
cmp ecx, 1
jg short loc_7C5F8
add rax, 0FFFFFFFFFFFFFFE8h
mov rsi, rax
mov rdx, 0FFFFFFFFFFFFFFF9h
call js_free_value_rt
loc_7C5F8:
lea rsi, aBadNormalizati; "bad normalization form"
mov rdi, rbx
xor eax, eax
call JS_ThrowRangeError
loc_7C609:
mov rsi, [rsp+78h+var_50]
mov rdi, rbx
call js_free
loc_7C616:
xor r15d, r15d
loc_7C619:
xor r12d, r12d
jmp short loc_7C651
loc_7C61E:
mov rdi, [rsp+78h+var_78]
mov rsi, [rsp+78h+var_70]
call js_free
mov [rsp+78h+var_70], 0
loc_7C635:
mov r14d, 6
xor r15d, r15d
xor r12d, r12d
loc_7C641:
or r15, r12
mov rsi, [rsp+78h+var_58]
mov rdi, rbx
call js_free
loc_7C651:
mov eax, r15d
or rax, r12
mov rdx, r14
add rsp, 48h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_7C669:
mov rsi, [rsp+78h+var_78]
mov [rsp+78h+var_48], rsi
lea rdx, [rsp+78h+var_50]
mov rdi, rbx
call to_utf32_buf
mov ebp, eax
mov rdi, [rbx+18h]
mov rsi, [rsp+78h+var_48]
mov rdx, r12
call JS_FreeValueRT
jmp loc_7C455
loc_7C697:
mov [rsp+78h+var_64], 0
mov dword ptr [rsp+78h+var_60+4], 0FFFFFFFFh
jmp short loc_7C635
| unsigned long long js_string_normalize(
_DWORD *a1,
long long a2,
long long a3,
long long a4,
long long a5,
long long a6,
__m128 a7,
__m128 a8,
__m128 a9,
__m128 a10,
__m128 a11,
__m128 a12,
__m128 a13,
__m128 a14)
{
int v15; // r13d
unsigned long long v17; // rax
long long v18; // rdx
long long v19; // r8
long long v20; // r9
__m128 v21; // xmm4
__m128 v22; // xmm5
unsigned long long v23; // r15
long long v24; // r14
unsigned long long v25; // r12
_DWORD *v26; // rax
long long v27; // rdx
long long v28; // r12
int v29; // ebp
long long v30; // rcx
long long v31; // r12
int v32; // ebp
long long v33; // r15
long long v34; // r13
_BYTE *v35; // rax
long long v36; // r8
long long v37; // r9
__m128 v38; // xmm4
__m128 v39; // xmm5
_BYTE *v40; // rdx
long long v41; // rcx
int v42; // esi
long long v43; // rdi
long long v44; // rcx
long long v45; // rdi
long long v46; // rcx
long long v47; // rdx
_DWORD *v49; // [rsp+0h] [rbp-78h] BYREF
long long v50; // [rsp+8h] [rbp-70h]
int v51; // [rsp+10h] [rbp-68h]
int v52; // [rsp+14h] [rbp-64h]
long long v53; // [rsp+18h] [rbp-60h]
long long v54; // [rsp+20h] [rbp-58h] BYREF
long long v55; // [rsp+28h] [rbp-50h] BYREF
_DWORD *v56; // [rsp+30h] [rbp-48h]
long long *v57; // [rsp+38h] [rbp-40h]
long long v58[7]; // [rsp+40h] [rbp-38h] BYREF
v15 = a4;
v17 = JS_ToStringCheckObject((long long)a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14);
v23 = v17;
v24 = v18;
if ( (_DWORD)v18 != 6 )
{
v57 = (long long *)a5;
v26 = (_DWORD *)JS_ToStringInternal((long long)a1, v17, v18, 0, v19, v20, a7, a8, a9, a10, v21, v22, a13, a14);
v28 = v27;
v49 = v26;
v29 = -1;
if ( (_DWORD)v27 != 6 )
{
v56 = v49;
v29 = to_utf32_buf((long long)a1, (long long)v49, &v55);
JS_FreeValueRT(*((_QWORD *)a1 + 3), v56, v28);
}
JS_FreeValueRT(*((_QWORD *)a1 + 3), (_DWORD *)v23, v24);
LODWORD(v23) = 0;
if ( v29 < 0 )
goto LABEL_29;
if ( !v15 )
goto LABEL_8;
v30 = v57[1];
if ( (_DWORD)v30 == 3 )
goto LABEL_8;
v35 = (_BYTE *)JS_ToCStringLen2((long long)a1, v58, *v57, v30, 0);
if ( v35 )
{
if ( *v35 == 78 && v35[1] == 70 )
{
v40 = v35 + 2;
v41 = 0LL;
if ( v35[2] == 75 )
v40 = v35 + 3;
LOBYTE(v41) = v35[2] == 75;
v42 = (unsigned __int8)v35[v41 + 2];
if ( (unsigned __int8)(v42 - 67) <= 1u && v40 - v35 + 1 == v58[0] )
{
LODWORD(v23) = v42 + 2 * v41 - 67;
v43 = *((_QWORD *)a1 + 3);
v44 = *((unsigned int *)v35 - 6);
*((_DWORD *)v35 - 6) = v44 - 1;
if ( (int)v44 <= 1 )
js_free_value_rt(v43, (_QWORD *)v35 - 3, -7LL, v44, v36, v37);
LABEL_8:
v31 = v55;
v32 = unicode_normalize(&v54, v55, (unsigned int)v29, (unsigned int)v23, *((_QWORD *)a1 + 3), js_realloc_rt);
js_free((long long)a1, v31);
if ( v32 >= 0 )
{
v33 = v54;
v49 = a1;
v52 = v32;
v51 = 0;
v53 = 0LL;
v50 = js_alloc_string((long long)a1, (unsigned int)v32, 0);
if ( v50 )
{
if ( !v32 )
{
LABEL_14:
v23 = (unsigned long long)string_buffer_end((long long)&v49);
v25 = v23 & 0xFFFFFFFF00000000LL;
LABEL_32:
LODWORD(v23) = v25 | v23;
js_free((long long)a1, v54);
return v25 | (unsigned int)v23;
}
v34 = 0LL;
while ( !(unsigned int)string_buffer_putc((long long)&v49, *(_DWORD *)(v33 + 4 * v34)) )
{
if ( v32 == ++v34 )
goto LABEL_14;
}
js_free((long long)v49, v50);
v50 = 0LL;
}
else
{
v52 = 0;
HIDWORD(v53) = -1;
}
LODWORD(v23) = 0;
v25 = 0LL;
goto LABEL_32;
}
goto LABEL_28;
}
}
v45 = *((_QWORD *)a1 + 3);
v46 = *((unsigned int *)v35 - 6);
v47 = (unsigned int)(v46 - 1);
*((_DWORD *)v35 - 6) = v47;
if ( (int)v46 <= 1 )
js_free_value_rt(v45, (_QWORD *)v35 - 3, -7LL, v46, v36, v37);
JS_ThrowRangeError(
(long long)a1,
(long long)"bad normalization form",
v47,
v46,
v36,
v37,
a7,
a8,
a9,
a10,
v38,
v39,
a13,
a14,
(char)v49);
}
js_free((long long)a1, v55);
LABEL_28:
LODWORD(v23) = 0;
LABEL_29:
v25 = 0LL;
return v25 | (unsigned int)v23;
}
v25 = v17 & 0xFFFFFFFF00000000LL;
return v25 | (unsigned int)v23;
}
| js_string_normalize:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x48
MOV R12,R8
MOV R13D,ECX
MOV RBX,RDI
CALL 0x001419eb
MOV R15,RAX
MOV R14,RDX
CMP R14D,0x6
JNZ 0x0017c42a
MOV RAX,-0x100000000
MOV R12,R15
AND R12,RAX
JMP 0x0017c651
LAB_0017c42a:
MOV qword ptr [RSP + 0x38],R12
MOV RDI,RBX
MOV RSI,R15
MOV RDX,R14
XOR ECX,ECX
CALL 0x00126ec9
MOV R12,RDX
MOV qword ptr [RSP],RAX
MOV EBP,0xffffffff
CMP R12D,0x6
JNZ 0x0017c669
LAB_0017c455:
MOV RDI,qword ptr [RBX + 0x18]
MOV RSI,R15
MOV RDX,R14
CALL 0x0011ccb2
MOV R14D,0x6
XOR R15D,R15D
TEST EBP,EBP
JS 0x0017c619
TEST R13D,R13D
JZ 0x0017c48c
MOV RAX,qword ptr [RSP + 0x38]
MOV RCX,qword ptr [RAX + 0x8]
CMP ECX,0x3
JNZ 0x0017c544
LAB_0017c48c:
MOV R12,qword ptr [RSP + 0x28]
MOV R8,qword ptr [RBX + 0x18]
LEA R9,[0x11beae]
LEA RDI,[RSP + 0x20]
MOV RSI,R12
MOV EDX,EBP
MOV ECX,R15D
CALL 0x00197da7
MOV EBP,EAX
MOV RDI,RBX
MOV RSI,R12
CALL 0x0011bf85
TEST EBP,EBP
JS 0x0017c616
MOV R15,qword ptr [RSP + 0x20]
MOV qword ptr [RSP],RBX
MOV dword ptr [RSP + 0x14],EBP
MOV dword ptr [RSP + 0x10],0x0
MOV qword ptr [RSP + 0x18],0x0
MOV RDI,RBX
MOV ESI,EBP
XOR EDX,EDX
CALL 0x0011ff5f
MOV qword ptr [RSP + 0x8],RAX
TEST RAX,RAX
JZ 0x0017c697
TEST EBP,EBP
JZ 0x0017c524
MOV R12D,EBP
XOR R13D,R13D
MOV R14,RSP
LAB_0017c508:
MOV ESI,dword ptr [R15 + R13*0x4]
MOV RDI,R14
CALL 0x001327dc
TEST EAX,EAX
JNZ 0x0017c61e
INC R13
CMP R12,R13
JNZ 0x0017c508
LAB_0017c524:
MOV RDI,RSP
CALL 0x00132830
MOV R15,RAX
MOV R14,RDX
MOV R12,-0x100000000
AND R12,RAX
JMP 0x0017c641
LAB_0017c544:
MOV RDX,qword ptr [RAX]
LEA RSI,[RSP + 0x40]
MOV RDI,RBX
XOR R8D,R8D
CALL 0x0011ffe3
TEST RAX,RAX
JZ 0x0017c609
CMP byte ptr [RAX],0x4e
JNZ 0x0017c5d3
CMP byte ptr [RAX + 0x1],0x46
JNZ 0x0017c5d3
LEA RDX,[RAX + 0x2]
LEA RSI,[RAX + 0x3]
XOR ECX,ECX
CMP byte ptr [RAX + 0x2],0x4b
CMOVZ RDX,RSI
SETZ CL
MOVZX ESI,byte ptr [RAX + RCX*0x1 + 0x2]
LEA EDI,[RSI + -0x43]
CMP DIL,0x1
JA 0x0017c5d3
SUB RDX,RAX
INC RDX
CMP RDX,qword ptr [RSP + 0x40]
JNZ 0x0017c5d3
ADD ECX,ECX
LEA R15D,[RSI + RCX*0x1]
ADD R15D,-0x43
MOV RDI,qword ptr [RBX + 0x18]
MOV ECX,dword ptr [RAX + -0x18]
LEA EDX,[RCX + -0x1]
MOV dword ptr [RAX + -0x18],EDX
CMP ECX,0x1
JG 0x0017c48c
ADD RAX,-0x18
MOV RSI,RAX
MOV RDX,-0x7
CALL 0x00120652
JMP 0x0017c48c
LAB_0017c5d3:
MOV RDI,qword ptr [RBX + 0x18]
MOV ECX,dword ptr [RAX + -0x18]
LEA EDX,[RCX + -0x1]
MOV dword ptr [RAX + -0x18],EDX
CMP ECX,0x1
JG 0x0017c5f8
ADD RAX,-0x18
MOV RSI,RAX
MOV RDX,-0x7
CALL 0x00120652
LAB_0017c5f8:
LEA RSI,[0x1a0b1b]
MOV RDI,RBX
XOR EAX,EAX
CALL 0x0011fec9
LAB_0017c609:
MOV RSI,qword ptr [RSP + 0x28]
MOV RDI,RBX
CALL 0x0011bf85
LAB_0017c616:
XOR R15D,R15D
LAB_0017c619:
XOR R12D,R12D
JMP 0x0017c651
LAB_0017c61e:
MOV RDI,qword ptr [RSP]
MOV RSI,qword ptr [RSP + 0x8]
CALL 0x0011bf85
MOV qword ptr [RSP + 0x8],0x0
LAB_0017c635:
MOV R14D,0x6
XOR R15D,R15D
XOR R12D,R12D
LAB_0017c641:
OR R15,R12
MOV RSI,qword ptr [RSP + 0x20]
MOV RDI,RBX
CALL 0x0011bf85
LAB_0017c651:
MOV EAX,R15D
OR RAX,R12
MOV RDX,R14
ADD RSP,0x48
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_0017c669:
MOV RSI,qword ptr [RSP]
MOV qword ptr [RSP + 0x30],RSI
LEA RDX,[RSP + 0x28]
MOV RDI,RBX
CALL 0x00112742
MOV EBP,EAX
MOV RDI,qword ptr [RBX + 0x18]
MOV RSI,qword ptr [RSP + 0x30]
MOV RDX,R12
CALL 0x0011ccb2
JMP 0x0017c455
LAB_0017c697:
MOV dword ptr [RSP + 0x14],0x0
MOV dword ptr [RSP + 0x1c],0xffffffff
JMP 0x0017c635
|
int1 [16]
js_string_normalize(long param_1,int8 param_2,int8 param_3,int param_4,
int8 *param_5)
{
int iVar1;
int8 uVar2;
long lVar3;
uint uVar4;
int iVar5;
char *pcVar6;
char *pcVar7;
ulong uVar8;
int iVar9;
bool bVar10;
int1 auVar11 [16];
int1 auVar12 [16];
long local_78;
long local_70;
int4 local_68;
uint local_64;
int8 local_60;
long local_58;
int8 local_50;
long local_48;
int8 *local_40;
char *local_38;
auVar11 = JS_ToStringCheckObject();
uVar8 = auVar11._0_8_;
if (auVar11._8_4_ == 6) {
uVar8 = uVar8 & 0xffffffff00000000;
goto LAB_0017c651;
}
local_40 = param_5;
auVar12 = JS_ToStringInternal(param_1,uVar8,auVar11._8_8_,0);
local_78 = auVar12._0_8_;
iVar5 = -1;
if (auVar12._8_4_ != 6) {
local_48 = local_78;
iVar5 = to_utf32_buf(param_1,local_78,&local_50);
JS_FreeValueRT(*(int8 *)(param_1 + 0x18),local_48,auVar12._8_8_);
}
JS_FreeValueRT(*(int8 *)(param_1 + 0x18),uVar8,auVar11._8_8_);
iVar9 = 0;
if (-1 < iVar5) {
if ((param_4 == 0) || ((int)local_40[1] == 3)) {
LAB_0017c48c:
uVar4 = unicode_normalize(&local_58,local_50,iVar5,iVar9,*(int8 *)(param_1 + 0x18),
js_realloc_rt);
js_free(param_1,local_50);
lVar3 = local_58;
if (-1 < (int)uVar4) {
local_68 = 0;
local_60 = 0;
local_78 = param_1;
local_64 = uVar4;
local_70 = js_alloc_string(param_1,uVar4,0);
if (local_70 == 0) {
local_64 = 0;
local_60 = CONCAT44(0xffffffff,(int4)local_60);
LAB_0017c635:
auVar11 = ZEXT816(6) << 0x40;
uVar8 = 0;
}
else {
if (uVar4 != 0) {
uVar8 = 0;
do {
iVar5 = string_buffer_putc(&local_78,*(int4 *)(lVar3 + uVar8 * 4));
if (iVar5 != 0) {
js_free(local_78,local_70);
local_70 = 0;
goto LAB_0017c635;
}
uVar8 = uVar8 + 1;
} while (uVar4 != uVar8);
}
auVar11 = string_buffer_end(&local_78);
uVar8 = auVar11._0_8_ & 0xffffffff00000000;
}
js_free(param_1,local_58);
goto LAB_0017c651;
}
}
else {
pcVar6 = (char *)JS_ToCStringLen2(param_1,&local_38,*local_40,local_40[1],0);
if (pcVar6 != (char *)0x0) {
if ((*pcVar6 == 'N') && (pcVar6[1] == 'F')) {
bVar10 = pcVar6[2] == 'K';
pcVar7 = pcVar6 + 2;
if (bVar10) {
pcVar7 = pcVar6 + 3;
}
if (((byte)(pcVar6[(ulong)bVar10 + 2] + 0xbdU) < 2) &&
(pcVar7 + (1 - (long)pcVar6) == local_38)) {
iVar9 = (uint)(byte)pcVar6[(ulong)bVar10 + 2] + (uint)bVar10 * 2 + -0x43;
uVar2 = *(int8 *)(param_1 + 0x18);
iVar1 = *(int *)(pcVar6 + -0x18);
*(int *)(pcVar6 + -0x18) = iVar1 + -1;
if (iVar1 < 2) {
js_free_value_rt(uVar2,pcVar6 + -0x18,0xfffffffffffffff9);
}
goto LAB_0017c48c;
}
}
uVar2 = *(int8 *)(param_1 + 0x18);
iVar5 = *(int *)(pcVar6 + -0x18);
*(int *)(pcVar6 + -0x18) = iVar5 + -1;
if (iVar5 < 2) {
js_free_value_rt(uVar2,pcVar6 + -0x18,0xfffffffffffffff9);
}
JS_ThrowRangeError(param_1,"bad normalization form");
}
js_free(param_1,local_50);
}
}
auVar11 = ZEXT816(6) << 0x40;
uVar8 = 0;
LAB_0017c651:
auVar12._0_8_ = auVar11._0_8_ & 0xffffffff | uVar8;
auVar12._8_8_ = auVar11._8_8_;
return auVar12;
}
|
|
6,381 | js_parse_block | bluesky950520[P]quickjs/quickjs.c | static __exception int js_parse_block(JSParseState *s)
{
if (js_parse_expect(s, '{'))
return -1;
if (s->token.val != '}') {
push_scope(s);
for(;;) {
if (js_parse_statement_or_decl(s, DECL_MASK_ALL))
return -1;
if (s->token.val == '}')
break;
}
pop_scope(s);
}
if (next_token(s))
return -1;
return 0;
} | O1 | c | js_parse_block:
pushq %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl $0x7b, %esi
callq 0x637c4
movl $0xffffffff, %ebp # imm = 0xFFFFFFFF
testl %eax, %eax
jne 0x6cfe6
cmpl $0x7d, 0x20(%rbx)
je 0x6cfd8
movq %rbx, %rdi
callq 0x58479
movq %rbx, %rdi
movl $0x7, %esi
callq 0x5fb25
testl %eax, %eax
jne 0x6cfe6
cmpl $0x7d, 0x20(%rbx)
jne 0x6cfb9
movq %rbx, %rdi
callq 0x6a5c1
movq %rbx, %rdi
callq 0x5d1cf
xorl %ebp, %ebp
negl %eax
sbbl %ebp, %ebp
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
| js_parse_block:
push rbp
push rbx
push rax
mov rbx, rdi
mov esi, 7Bh ; '{'
call js_parse_expect
mov ebp, 0FFFFFFFFh
test eax, eax
jnz short loc_6CFE6
cmp dword ptr [rbx+20h], 7Dh ; '}'
jz short loc_6CFD8
mov rdi, rbx
call push_scope
loc_6CFB9:
mov rdi, rbx
mov esi, 7
call js_parse_statement_or_decl
test eax, eax
jnz short loc_6CFE6
cmp dword ptr [rbx+20h], 7Dh ; '}'
jnz short loc_6CFB9
mov rdi, rbx
call pop_scope
loc_6CFD8:
mov rdi, rbx
call next_token
xor ebp, ebp
neg eax
sbb ebp, ebp
loc_6CFE6:
mov eax, ebp
add rsp, 8
pop rbx
pop rbp
retn
| long long js_parse_block(
long long a1,
__m128 a2,
__m128 a3,
__m128 a4,
__m128 a5,
__m128 a6,
__m128 a7,
__m128 a8,
__m128 a9,
long long a10,
long long a11,
long long a12,
long long a13,
long long a14)
{
long long v14; // rsi
long long v15; // rdx
long long v16; // rcx
long long v17; // r8
long long v18; // r9
__m128 v19; // xmm4
__m128 v20; // xmm5
unsigned int v21; // ebp
long long v22; // rdx
long long v23; // rcx
long long v24; // r8
long long v25; // r9
__m128 v26; // xmm4
__m128 v27; // xmm5
int v28; // eax
v14 = 123LL;
v21 = -1;
if ( !(unsigned int)js_parse_expect((long long *)a1, 123LL, a11, a12, a13, a14, a2, a3, a4, a5, a6, a7, a8, a9) )
{
if ( *(_DWORD *)(a1 + 32) == 125 )
{
return (unsigned int)-((unsigned int)next_token(a1, a2, a3, a4, a5, v19, v20, a8, a9, v14, v15, v16, v17, v18) != 0);
}
else
{
push_scope((long long *)a1);
while ( 1 )
{
v14 = 7LL;
LOBYTE(v28) = js_parse_statement_or_decl(
(_QWORD *)a1,
7LL,
v22,
v23,
v24,
v25,
a2,
a3,
a4,
a5,
v26,
v27,
a8,
a9);
if ( v28 )
break;
if ( *(_DWORD *)(a1 + 32) == 125 )
{
pop_scope(a1);
return (unsigned int)-((unsigned int)next_token(a1, a2, a3, a4, a5, v19, v20, a8, a9, v14, v15, v16, v17, v18) != 0);
}
}
}
}
return v21;
}
| js_parse_block:
PUSH RBP
PUSH RBX
PUSH RAX
MOV RBX,RDI
MOV ESI,0x7b
CALL 0x001637c4
MOV EBP,0xffffffff
TEST EAX,EAX
JNZ 0x0016cfe6
CMP dword ptr [RBX + 0x20],0x7d
JZ 0x0016cfd8
MOV RDI,RBX
CALL 0x00158479
LAB_0016cfb9:
MOV RDI,RBX
MOV ESI,0x7
CALL 0x0015fb25
TEST EAX,EAX
JNZ 0x0016cfe6
CMP dword ptr [RBX + 0x20],0x7d
JNZ 0x0016cfb9
MOV RDI,RBX
CALL 0x0016a5c1
LAB_0016cfd8:
MOV RDI,RBX
CALL 0x0015d1cf
XOR EBP,EBP
NEG EAX
SBB EBP,EBP
LAB_0016cfe6:
MOV EAX,EBP
ADD RSP,0x8
POP RBX
POP RBP
RET
|
int js_parse_block(long param_1)
{
int iVar1;
int iVar2;
iVar1 = js_parse_expect(param_1,0x7b);
iVar2 = -1;
if (iVar1 == 0) {
if (*(int *)(param_1 + 0x20) != 0x7d) {
push_scope(param_1);
do {
iVar2 = js_parse_statement_or_decl(param_1,7);
if (iVar2 != 0) {
return -1;
}
} while (*(int *)(param_1 + 0x20) != 0x7d);
pop_scope(param_1);
}
iVar2 = next_token(param_1);
iVar2 = -(uint)(iVar2 != 0);
}
return iVar2;
}
|
|
6,382 | translog_only_in_buffers | eloqsql/storage/maria/ma_loghandler.c | static TRANSLOG_ADDRESS translog_only_in_buffers()
{
register TRANSLOG_ADDRESS addr;
DBUG_ENTER("translog_only_in_buffers");
mysql_mutex_lock(&log_descriptor.sent_to_disk_lock);
addr= log_descriptor.in_buffers_only;
mysql_mutex_unlock(&log_descriptor.sent_to_disk_lock);
DBUG_RETURN(addr);
} | O0 | c | translog_only_in_buffers:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
leaq 0x442101(%rip), %rdi # 0x479dc0
addq $0x800cc0, %rdi # imm = 0x800CC0
leaq 0x11acfc(%rip), %rsi # 0x1529c9
movl $0x932, %edx # imm = 0x932
callq 0x2ea70
movq 0xc42d9a(%rip), %rax # 0xc7aa78
movq %rax, -0x8(%rbp)
leaq 0x4420d7(%rip), %rdi # 0x479dc0
addq $0x800cc0, %rdi # imm = 0x800CC0
callq 0x2eae0
movq -0x8(%rbp), %rax
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rax
addq $0x10, %rsp
popq %rbp
retq
nopw (%rax,%rax)
| translog_only_in_buffers:
push rbp
mov rbp, rsp
sub rsp, 10h
lea rdi, log_descriptor
add rdi, 800CC0h
lea rsi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/eloqsq"...
mov edx, 932h
call inline_mysql_mutex_lock
mov rax, cs:qword_C7AA78
mov [rbp+var_8], rax
lea rdi, log_descriptor
add rdi, 800CC0h
call inline_mysql_mutex_unlock
mov rax, [rbp+var_8]
mov [rbp+var_10], rax
mov rax, [rbp+var_10]
add rsp, 10h
pop rbp
retn
| long long translog_only_in_buffers()
{
long long v1; // [rsp+8h] [rbp-8h]
inline_mysql_mutex_lock(
(long long)&log_descriptor[1048984],
(long long)"/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_loghandler.c",
0x932u);
v1 = qword_C7AA78;
inline_mysql_mutex_unlock((long long)&log_descriptor[1048984]);
return v1;
}
| translog_only_in_buffers:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x10
LEA RDI,[0x579dc0]
ADD RDI,0x800cc0
LEA RSI,[0x2529c9]
MOV EDX,0x932
CALL 0x0012ea70
MOV RAX,qword ptr [0x00d7aa78]
MOV qword ptr [RBP + -0x8],RAX
LEA RDI,[0x579dc0]
ADD RDI,0x800cc0
CALL 0x0012eae0
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RBP + -0x10],RAX
MOV RAX,qword ptr [RBP + -0x10]
ADD RSP,0x10
POP RBP
RET
|
int8 translog_only_in_buffers(void)
{
int8 uVar1;
inline_mysql_mutex_lock
(&DAT_00d7aa80,"/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_loghandler.c",
0x932);
uVar1 = DAT_00d7aa78;
inline_mysql_mutex_unlock(&DAT_00d7aa80);
return uVar1;
}
|
|
6,383 | plutovg_canvas_stroke_preserve | dmazzella[P]pylunasvg/lunasvg/plutovg/source/plutovg-canvas.c | void plutovg_canvas_stroke_preserve(plutovg_canvas_t* canvas)
{
plutovg_rasterize(&canvas->fill_spans, canvas->path, &canvas->state->matrix, &canvas->clip_rect, &canvas->state->stroke, PLUTOVG_FILL_RULE_NON_ZERO);
if(canvas->state->clipping) {
plutovg_span_buffer_intersect(&canvas->clip_spans, &canvas->fill_spans, &canvas->state->clip_spans);
plutovg_blend(canvas, &canvas->clip_spans);
} else {
plutovg_blend(canvas, &canvas->fill_spans);
}
} | O0 | c | plutovg_canvas_stroke_preserve:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rdi
addq $0x58, %rdi
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rsi
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdx
addq $0x20, %rdx
movq -0x8(%rbp), %rcx
addq $0x28, %rcx
movq -0x8(%rbp), %rax
movq 0x18(%rax), %r8
addq $0x38, %r8
xorl %r9d, %r9d
callq 0x64400
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rax
testb $0x1, 0x90(%rax)
je 0x55fb9
movq -0x8(%rbp), %rdi
addq $0x38, %rdi
movq -0x8(%rbp), %rsi
addq $0x58, %rsi
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdx
addq $0x60, %rdx
callq 0x64060
movq -0x8(%rbp), %rdi
movq -0x8(%rbp), %rsi
addq $0x38, %rsi
callq 0x87350
jmp 0x55fca
movq -0x8(%rbp), %rdi
movq -0x8(%rbp), %rsi
addq $0x58, %rsi
callq 0x87350
addq $0x10, %rsp
popq %rbp
retq
| plutovg_canvas_stroke_preserve:
push rbp
mov rbp, rsp
sub rsp, 10h
mov [rbp+var_8], rdi
mov rdi, [rbp+var_8]
add rdi, 58h ; 'X'
mov rax, [rbp+var_8]
mov rsi, [rax+10h]
mov rax, [rbp+var_8]
mov rdx, [rax+18h]
add rdx, 20h ; ' '
mov rcx, [rbp+var_8]
add rcx, 28h ; '('
mov rax, [rbp+var_8]
mov r8, [rax+18h]
add r8, 38h ; '8'
xor r9d, r9d
call plutovg_rasterize
mov rax, [rbp+var_8]
mov rax, [rax+18h]
test byte ptr [rax+90h], 1
jz short loc_55FB9
mov rdi, [rbp+var_8]
add rdi, 38h ; '8'
mov rsi, [rbp+var_8]
add rsi, 58h ; 'X'
mov rax, [rbp+var_8]
mov rdx, [rax+18h]
add rdx, 60h ; '`'
call plutovg_span_buffer_intersect
mov rdi, [rbp+var_8]
mov rsi, [rbp+var_8]
add rsi, 38h ; '8'
call plutovg_blend
jmp short loc_55FCA
loc_55FB9:
mov rdi, [rbp+var_8]
mov rsi, [rbp+var_8]
add rsi, 58h ; 'X'
call plutovg_blend
loc_55FCA:
add rsp, 10h
pop rbp
retn
| long long plutovg_canvas_stroke_preserve(long long a1)
{
plutovg_rasterize(
a1 + 88,
*(_QWORD *)(a1 + 16),
*(_QWORD *)(a1 + 24) + 32LL,
a1 + 40,
*(_QWORD *)(a1 + 24) + 56LL,
0LL);
if ( (*(_BYTE *)(*(_QWORD *)(a1 + 24) + 144LL) & 1) == 0 )
return plutovg_blend(a1, a1 + 88);
plutovg_span_buffer_intersect(a1 + 56, a1 + 88, *(_QWORD *)(a1 + 24) + 96LL);
return plutovg_blend(a1, a1 + 56);
}
| plutovg_canvas_stroke_preserve:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x10
MOV qword ptr [RBP + -0x8],RDI
MOV RDI,qword ptr [RBP + -0x8]
ADD RDI,0x58
MOV RAX,qword ptr [RBP + -0x8]
MOV RSI,qword ptr [RAX + 0x10]
MOV RAX,qword ptr [RBP + -0x8]
MOV RDX,qword ptr [RAX + 0x18]
ADD RDX,0x20
MOV RCX,qword ptr [RBP + -0x8]
ADD RCX,0x28
MOV RAX,qword ptr [RBP + -0x8]
MOV R8,qword ptr [RAX + 0x18]
ADD R8,0x38
XOR R9D,R9D
CALL 0x00164400
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX + 0x18]
TEST byte ptr [RAX + 0x90],0x1
JZ 0x00155fb9
MOV RDI,qword ptr [RBP + -0x8]
ADD RDI,0x38
MOV RSI,qword ptr [RBP + -0x8]
ADD RSI,0x58
MOV RAX,qword ptr [RBP + -0x8]
MOV RDX,qword ptr [RAX + 0x18]
ADD RDX,0x60
CALL 0x00164060
MOV RDI,qword ptr [RBP + -0x8]
MOV RSI,qword ptr [RBP + -0x8]
ADD RSI,0x38
CALL 0x00187350
JMP 0x00155fca
LAB_00155fb9:
MOV RDI,qword ptr [RBP + -0x8]
MOV RSI,qword ptr [RBP + -0x8]
ADD RSI,0x58
CALL 0x00187350
LAB_00155fca:
ADD RSP,0x10
POP RBP
RET
|
void plutovg_canvas_stroke_preserve(long param_1)
{
plutovg_rasterize(param_1 + 0x58,*(int8 *)(param_1 + 0x10),*(long *)(param_1 + 0x18) + 0x20,
param_1 + 0x28,*(long *)(param_1 + 0x18) + 0x38,0);
if ((*(byte *)(*(long *)(param_1 + 0x18) + 0x90) & 1) == 0) {
plutovg_blend(param_1,param_1 + 0x58);
}
else {
plutovg_span_buffer_intersect(param_1 + 0x38,param_1 + 0x58,*(long *)(param_1 + 0x18) + 0x60);
plutovg_blend(param_1,param_1 + 0x38);
}
return;
}
|
|
6,384 | plutovg_canvas_stroke_preserve | dmazzella[P]pylunasvg/lunasvg/plutovg/source/plutovg-canvas.c | void plutovg_canvas_stroke_preserve(plutovg_canvas_t* canvas)
{
plutovg_rasterize(&canvas->fill_spans, canvas->path, &canvas->state->matrix, &canvas->clip_rect, &canvas->state->stroke, PLUTOVG_FILL_RULE_NON_ZERO);
if(canvas->state->clipping) {
plutovg_span_buffer_intersect(&canvas->clip_spans, &canvas->fill_spans, &canvas->state->clip_spans);
plutovg_blend(canvas, &canvas->clip_spans);
} else {
plutovg_blend(canvas, &canvas->fill_spans);
}
} | O1 | c | plutovg_canvas_stroke_preserve:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
leaq 0x58(%rdi), %r14
movq 0x10(%rdi), %rsi
movq 0x18(%rdi), %r8
leaq 0x20(%r8), %rdx
leaq 0x28(%rdi), %rcx
addq $0x38, %r8
movq %r14, %rdi
xorl %r9d, %r9d
callq 0x2d06d
movq 0x18(%rbx), %rdx
cmpb $0x1, 0x90(%rdx)
jne 0x23f23
leaq 0x38(%rbx), %r15
addq $0x60, %rdx
movq %r15, %rdi
movq %r14, %rsi
callq 0x2ce88
movq %r15, %r14
movq %rbx, %rdi
movq %r14, %rsi
popq %rbx
popq %r14
popq %r15
jmp 0x3f344
| plutovg_canvas_stroke_preserve:
push r15
push r14
push rbx
mov rbx, rdi
lea r14, [rdi+58h]
mov rsi, [rdi+10h]
mov r8, [rdi+18h]
lea rdx, [r8+20h]
lea rcx, [rdi+28h]
add r8, 38h ; '8'
mov rdi, r14
xor r9d, r9d
call plutovg_rasterize
mov rdx, [rbx+18h]
cmp byte ptr [rdx+90h], 1
jnz short loc_23F23
lea r15, [rbx+38h]
add rdx, 60h ; '`'
mov rdi, r15
mov rsi, r14
call plutovg_span_buffer_intersect
mov r14, r15
loc_23F23:
mov rdi, rbx
mov rsi, r14
pop rbx
pop r14
pop r15
jmp plutovg_blend
| long long plutovg_canvas_stroke_preserve(long long a1)
{
long long v1; // r14
long long v2; // rdx
v1 = a1 + 88;
plutovg_rasterize(
a1 + 88,
*(_QWORD *)(a1 + 16),
*(_QWORD *)(a1 + 24) + 32LL,
a1 + 40,
*(_QWORD *)(a1 + 24) + 56LL,
0LL);
v2 = *(_QWORD *)(a1 + 24);
if ( *(_BYTE *)(v2 + 144) == 1 )
{
plutovg_span_buffer_intersect(a1 + 56, v1, v2 + 96);
v1 = a1 + 56;
}
return plutovg_blend(a1, v1);
}
| plutovg_canvas_stroke_preserve:
PUSH R15
PUSH R14
PUSH RBX
MOV RBX,RDI
LEA R14,[RDI + 0x58]
MOV RSI,qword ptr [RDI + 0x10]
MOV R8,qword ptr [RDI + 0x18]
LEA RDX,[R8 + 0x20]
LEA RCX,[RDI + 0x28]
ADD R8,0x38
MOV RDI,R14
XOR R9D,R9D
CALL 0x0012d06d
MOV RDX,qword ptr [RBX + 0x18]
CMP byte ptr [RDX + 0x90],0x1
JNZ 0x00123f23
LEA R15,[RBX + 0x38]
ADD RDX,0x60
MOV RDI,R15
MOV RSI,R14
CALL 0x0012ce88
MOV R14,R15
LAB_00123f23:
MOV RDI,RBX
MOV RSI,R14
POP RBX
POP R14
POP R15
JMP 0x0013f344
|
void plutovg_canvas_stroke_preserve(long param_1)
{
long lVar1;
long lVar2;
lVar1 = param_1 + 0x58;
plutovg_rasterize(lVar1,*(int8 *)(param_1 + 0x10),*(long *)(param_1 + 0x18) + 0x20,
param_1 + 0x28,*(long *)(param_1 + 0x18) + 0x38,0);
lVar2 = lVar1;
if (*(char *)(*(long *)(param_1 + 0x18) + 0x90) == '\x01') {
lVar2 = param_1 + 0x38;
plutovg_span_buffer_intersect(lVar2,lVar1,*(long *)(param_1 + 0x18) + 0x60);
}
plutovg_blend(param_1,lVar2);
return;
}
|
|
6,385 | Catch::isDebuggerActive() | AlayaLite/build_O3/_deps/libcoro-src/test/catch_amalgamated.cpp | bool isDebuggerActive(){
// Libstdc++ has a bug, where std::ifstream sets errno to 0
// This way our users can properly assert over errno values
ErrnoGuard guard;
std::ifstream in("/proc/self/status");
for( std::string line; std::getline(in, line); ) {
static const int PREFIX_LEN = 11;
if( line.compare(0, PREFIX_LEN, "TracerPid:\t") == 0 ) {
// We're traced if the PID is not 0 and no other PID starts
// with 0 digit, so it's enough to check for just a single
// character.
return line.length() > PREFIX_LEN && line[PREFIX_LEN] != '0';
}
}
return false;
} | O3 | cpp | Catch::isDebuggerActive():
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x238, %rsp # imm = 0x238
leaq 0xc(%rsp), %rdi
callq 0x5c514
leaq 0x81dc5(%rip), %rsi # 0xddb88
leaq 0x30(%rsp), %rbx
movq %rbx, %rdi
movl $0x8, %edx
callq 0x17090
leaq 0x20(%rsp), %r12
movq %r12, -0x10(%r12)
movq $0x0, -0x8(%r12)
movb $0x0, (%r12)
leaq 0x10(%rsp), %r14
leaq 0x81da1(%rip), %r15 # 0xddb9a
movq 0x30(%rsp), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x17d20
movsbl %al, %edx
movq %rbx, %rdi
movq %r14, %rsi
callq 0x17030
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
testb $0x5, 0x20(%rax,%rcx)
jne 0x5be57
movl $0xb, %edx
movq %r14, %rdi
xorl %esi, %esi
movq %r15, %rcx
callq 0x77f86
testl %eax, %eax
jne 0x5bdf9
movq 0x10(%rsp), %rdi
cmpq $0xc, 0x18(%rsp)
jb 0x5be5c
cmpb $0x30, 0xb(%rdi)
setne %bl
jmp 0x5be5e
movq 0x10(%rsp), %rdi
xorl %ebx, %ebx
cmpq %r12, %rdi
je 0x5be70
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x17150
leaq 0x30(%rsp), %rdi
callq 0x17060
leaq 0xc(%rsp), %rdi
callq 0x5c524
movl %ebx, %eax
addq $0x238, %rsp # imm = 0x238
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq %rax, %rbx
jmp 0x5bebe
movq %rax, %rbx
movq 0x10(%rsp), %rdi
cmpq %r12, %rdi
je 0x5beb4
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x17150
leaq 0x30(%rsp), %rdi
callq 0x17060
leaq 0xc(%rsp), %rdi
callq 0x5c524
movq %rbx, %rdi
callq 0x17740
| _ZN5Catch16isDebuggerActiveEv:
push r15
push r14
push r12
push rbx
sub rsp, 238h
lea rdi, [rsp+258h+var_24C]; this
call _ZN5Catch10ErrnoGuardC2Ev; Catch::ErrnoGuard::ErrnoGuard(void)
lea rsi, aProcSelfStatus; "/proc/self/status"
lea rbx, [rsp+258h+var_228]
mov rdi, rbx
mov edx, 8
call __ZNSt14basic_ifstreamIcSt11char_traitsIcEEC1EPKcSt13_Ios_Openmode; std::ifstream::basic_ifstream(char const*,std::_Ios_Openmode)
lea r12, [rsp+258h+var_238]
mov [r12-10h], r12
mov qword ptr [r12-8], 0
mov byte ptr [r12], 0
lea r14, [rsp+258h+var_248]
lea r15, aTracerpid; "TracerPid:\t"
loc_5BDF9:
mov rax, [rsp+258h+var_228]
mov rdi, [rax-18h]
add rdi, rbx
mov esi, 0Ah
call __ZNKSt9basic_iosIcSt11char_traitsIcEE5widenEc; std::ios::widen(char)
movsx edx, al
mov rdi, rbx
mov rsi, r14
call __ZSt7getlineIcSt11char_traitsIcESaIcEERSt13basic_istreamIT_T0_ES7_RNSt7__cxx1112basic_stringIS4_S5_T1_EES4_; std::getline<char,std::char_traits<char>,std::allocator<char>>(std::istream &,std::string &,char)
mov rcx, [rax]
mov rcx, [rcx-18h]
test byte ptr [rax+rcx+20h], 5
jnz short loc_5BE57
mov edx, 0Bh
mov rdi, r14
xor esi, esi
mov rcx, r15
call _ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7compareEmmPKc; std::string::compare(ulong,ulong,char const*)
test eax, eax
jnz short loc_5BDF9
mov rdi, [rsp+258h+var_248]
cmp [rsp+258h+var_240], 0Ch
jb short loc_5BE5C
cmp byte ptr [rdi+0Bh], 30h ; '0'
setnz bl
jmp short loc_5BE5E
loc_5BE57:
mov rdi, [rsp+258h+var_248]; void *
loc_5BE5C:
xor ebx, ebx
loc_5BE5E:
cmp rdi, r12
jz short loc_5BE70
mov rsi, [rsp+258h+var_238]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_5BE70:
lea rdi, [rsp+258h+var_228]
call __ZNSt14basic_ifstreamIcSt11char_traitsIcEED1Ev; std::ifstream::~ifstream()
lea rdi, [rsp+258h+var_24C]; this
call _ZN5Catch10ErrnoGuardD2Ev; Catch::ErrnoGuard::~ErrnoGuard()
mov eax, ebx
add rsp, 238h
pop rbx
pop r12
pop r14
pop r15
retn
mov rbx, rax
jmp short loc_5BEBE
mov rbx, rax
mov rdi, [rsp+arg_8]; void *
cmp rdi, r12
jz short loc_5BEB4
mov rsi, [rsp+arg_18]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_5BEB4:
lea rdi, [rsp+arg_28]
call __ZNSt14basic_ifstreamIcSt11char_traitsIcEED1Ev; std::ifstream::~ifstream()
loc_5BEBE:
lea rdi, [rsp+arg_4]; this
call _ZN5Catch10ErrnoGuardD2Ev; Catch::ErrnoGuard::~ErrnoGuard()
mov rdi, rbx
call __Unwind_Resume
| long long Catch::isDebuggerActive(Catch *this)
{
_QWORD *v1; // rbx
char v2; // al
_QWORD *v3; // rax
_QWORD *v4; // rdi
_BYTE v6[4]; // [rsp+Ch] [rbp-24Ch] BYREF
void *v7; // [rsp+10h] [rbp-248h] BYREF
unsigned long long v8; // [rsp+18h] [rbp-240h]
_QWORD v9[2]; // [rsp+20h] [rbp-238h] BYREF
_QWORD v10[69]; // [rsp+30h] [rbp-228h] BYREF
Catch::ErrnoGuard::ErrnoGuard((Catch::ErrnoGuard *)v6);
v1 = v10;
std::ifstream::basic_ifstream(v10, "/proc/self/status", 8LL);
v7 = v9;
v8 = 0LL;
LOBYTE(v9[0]) = 0;
do
{
v2 = std::ios::widen((char *)v10 + *(_QWORD *)(v10[0] - 24LL), 10LL);
v3 = (_QWORD *)std::getline<char,std::char_traits<char>,std::allocator<char>>(v10, &v7, (unsigned int)v2);
if ( (*((_BYTE *)v3 + *(_QWORD *)(*v3 - 24LL) + 32) & 5) != 0 )
{
v4 = v7;
goto LABEL_7;
}
}
while ( (unsigned int)std::string::compare(&v7, 0LL, 11LL, "TracerPid:\t") );
v4 = v7;
if ( v8 >= 0xC )
{
LOBYTE(v1) = *((_BYTE *)v7 + 11) != 48;
goto LABEL_8;
}
LABEL_7:
LODWORD(v1) = 0;
LABEL_8:
if ( v4 != v9 )
operator delete(v4, v9[0] + 1LL);
std::ifstream::~ifstream(v10);
Catch::ErrnoGuard::~ErrnoGuard((Catch::ErrnoGuard *)v6);
return (unsigned int)v1;
}
| isDebuggerActive:
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
SUB RSP,0x238
LEA RDI,[RSP + 0xc]
CALL 0x0015c514
LAB_0015bdbc:
LEA RSI,[0x1ddb88]
LEA RBX,[RSP + 0x30]
MOV RDI,RBX
MOV EDX,0x8
CALL 0x00117090
LEA R12,[RSP + 0x20]
MOV qword ptr [R12 + -0x10],R12
MOV qword ptr [R12 + -0x8],0x0
MOV byte ptr [R12],0x0
LEA R14,[RSP + 0x10]
LEA R15,[0x1ddb9a]
LAB_0015bdf9:
MOV RAX,qword ptr [RSP + 0x30]
MOV RDI,qword ptr [RAX + -0x18]
ADD RDI,RBX
LAB_0015be05:
MOV ESI,0xa
CALL 0x00117d20
MOVSX EDX,AL
MOV RDI,RBX
MOV RSI,R14
CALL 0x00117030
MOV RCX,qword ptr [RAX]
MOV RCX,qword ptr [RCX + -0x18]
TEST byte ptr [RAX + RCX*0x1 + 0x20],0x5
JNZ 0x0015be57
MOV EDX,0xb
MOV RDI,R14
XOR ESI,ESI
MOV RCX,R15
CALL 0x00177f86
LAB_0015be3d:
TEST EAX,EAX
JNZ 0x0015bdf9
MOV RDI,qword ptr [RSP + 0x10]
CMP qword ptr [RSP + 0x18],0xc
JC 0x0015be5c
CMP byte ptr [RDI + 0xb],0x30
SETNZ BL
JMP 0x0015be5e
LAB_0015be57:
MOV RDI,qword ptr [RSP + 0x10]
LAB_0015be5c:
XOR EBX,EBX
LAB_0015be5e:
CMP RDI,R12
JZ 0x0015be70
MOV RSI,qword ptr [RSP + 0x20]
INC RSI
CALL 0x00117150
LAB_0015be70:
LEA RDI,[RSP + 0x30]
CALL 0x00117060
LEA RDI,[RSP + 0xc]
CALL 0x0015c524
MOV EAX,EBX
ADD RSP,0x238
POP RBX
POP R12
POP R14
POP R15
RET
|
/* Catch::isDebuggerActive() */
ulong Catch::isDebuggerActive(void)
{
char cVar1;
int iVar2;
istream *piVar3;
ulong uVar4;
ErrnoGuard local_24c [4];
int1 *local_248;
ulong local_240;
int1 local_238;
int7 uStack_237;
long local_228 [65];
ErrnoGuard::ErrnoGuard(local_24c);
/* try { // try from 0015bdbc to 0015bdd4 has its CatchHandler @ 0015be95 */
std::ifstream::ifstream((ifstream *)local_228,"/proc/self/status",8);
local_240 = 0;
local_238 = 0;
local_248 = &local_238;
do {
/* try { // try from 0015be05 to 0015be3c has its CatchHandler @ 0015be9a */
cVar1 = std::ios::widen((char)*(int8 *)(local_228[0] + -0x18) + (char)(istream *)local_228
);
piVar3 = std::getline<char,std::char_traits<char>,std::allocator<char>>
((istream *)local_228,(string *)&local_248,cVar1);
if (((byte)piVar3[*(long *)(*(long *)piVar3 + -0x18) + 0x20] & 5) != 0) goto LAB_0015be5c;
iVar2 = std::__cxx11::string::compare((string *)&local_248,0,0xb,"TracerPid:\t");
} while (iVar2 != 0);
if (local_240 < 0xc) {
LAB_0015be5c:
uVar4 = 0;
}
else {
uVar4 = CONCAT71((int7)((ulong)local_228 >> 8),local_248[0xb] != '0');
}
if (local_248 != &local_238) {
operator_delete(local_248,CONCAT71(uStack_237,local_238) + 1);
}
std::ifstream::~ifstream((ifstream *)local_228);
ErrnoGuard::~ErrnoGuard(local_24c);
return uVar4 & 0xffffffff;
}
|
|
6,386 | mysql_stmt_prepare | eloqsql/libmariadb/libmariadb/mariadb_stmt.c | int STDCALL mysql_stmt_prepare(MYSQL_STMT *stmt, const char *query, unsigned long length)
{
MYSQL *mysql= stmt->mysql;
int rc= 1;
my_bool is_multi= 0;
if (!stmt->mysql)
{
SET_CLIENT_STMT_ERROR(stmt, CR_SERVER_LOST, SQLSTATE_UNKNOWN, 0);
return(1);
}
if (length == (unsigned long) -1)
length= (unsigned long)strlen(query);
/* clear flags */
CLEAR_CLIENT_STMT_ERROR(stmt);
CLEAR_CLIENT_ERROR(stmt->mysql);
stmt->upsert_status.affected_rows= mysql->affected_rows= (unsigned long long) ~0;
/* check if we have to clear results */
if (stmt->state > MYSQL_STMT_INITTED)
{
char stmt_id[STMT_ID_LENGTH];
is_multi= (mysql->net.extension->multi_status > COM_MULTI_OFF);
/* We need to semi-close the prepared statement:
reset stmt and free all buffers and close the statement
on server side. Statement handle will get a new stmt_id */
if (!is_multi)
ma_multi_command(mysql, COM_MULTI_ENABLED);
if (mysql_stmt_internal_reset(stmt, 1))
goto fail;
ma_free_root(&stmt->mem_root, MYF(MY_KEEP_PREALLOC));
ma_free_root(&((MADB_STMT_EXTENSION *)stmt->extension)->fields_ma_alloc_root, MYF(0));
stmt->param_count= 0;
stmt->field_count= 0;
stmt->fields= NULL;
stmt->params= NULL;
int4store(stmt_id, stmt->stmt_id);
if (mysql->methods->db_command(mysql, COM_STMT_CLOSE, stmt_id,
sizeof(stmt_id), 1, stmt))
goto fail;
}
if (mysql->methods->db_command(mysql, COM_STMT_PREPARE, query, length, 1, stmt))
goto fail;
if (!is_multi && mysql->net.extension->multi_status == COM_MULTI_ENABLED)
if (ma_multi_command(mysql, COM_MULTI_END))
goto fail;
if (mysql->net.extension->multi_status > COM_MULTI_OFF ||
mysql->options.extension->skip_read_response)
return 0;
if (mysql->methods->db_read_prepare_response &&
mysql->methods->db_read_prepare_response(stmt))
goto fail;
return(0);
fail:
stmt->state= MYSQL_STMT_INITTED;
UPDATE_STMT_ERROR(stmt);
return(rc);
} | O3 | c | mysql_stmt_prepare:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rbx
movq %fs:0x28, %rax
movq %rax, -0x30(%rbp)
movq 0x38(%rdi), %r14
testq %r14, %r14
je 0x20ecc
movq %rdx, %r12
movq %rsi, %r15
cmpq $-0x1, %rdx
jne 0x20dc5
movq %r15, %rdi
callq 0x131c0
movq %rax, %r12
xorl %eax, %eax
movl %eax, 0x108(%rbx)
movl $0x30303030, %ecx # imm = 0x30303030
movl %ecx, 0x30d(%rbx)
movw $0x30, %dx
movw %dx, 0x311(%rbx)
movb %al, 0x10c(%rbx)
movl %eax, 0x90(%r14)
movq 0x38(%rbx), %rsi
movw %dx, 0x29b(%rsi)
movl %ecx, 0x297(%rsi)
movq 0x38(%rbx), %rcx
movb %al, 0x97(%rcx)
movq 0x38(%rbx), %rax
movq 0x2a0(%rax), %rax
testq %rax, %rax
je 0x20e22
movl $0x0, 0x4(%rax)
movq $-0x1, %rax
movq %rax, 0x338(%r14)
movq %rax, 0xf8(%rbx)
cmpl $0x0, 0x50(%rbx)
je 0x20f11
movq 0x2a0(%r14), %rax
cmpl $0x0, (%rax)
sete %r13b
jne 0x20e5e
movq %r14, %rdi
movl $0x2, %esi
callq 0x15e2d
movq %rbx, %rdi
movl $0x1, %esi
callq 0x1fad4
testb %al, %al
jne 0x20f3d
movq %rbx, %rdi
movl $0x1, %esi
callq 0x1dc3f
movq 0x340(%rbx), %rdi
xorl %esi, %esi
callq 0x1dc3f
movq $0x0, 0x70(%rbx)
xorps %xmm0, %xmm0
movups %xmm0, 0x58(%rbx)
movl 0x40(%rbx), %eax
leaq -0x34(%rbp), %rdx
movl %eax, (%rdx)
movq 0x4d0(%r14), %rax
movl $0x4, %ecx
movq %r14, %rdi
movl $0x19, %esi
movl $0x1, %r8d
movq %rbx, %r9
callq *0x10(%rax)
testl %eax, %eax
jne 0x20f3d
jmp 0x20f14
movl $0x7dd, 0x108(%rbx) # imm = 0x7DD
leaq 0x30d(%rbx), %rdi
leaq 0x27b4c(%rip), %rax # 0x48a30
movq (%rax), %rsi
movl $0x5, %edx
callq 0x13220
movb $0x0, 0x312(%rbx)
leaq 0x10c(%rbx), %rdi
leaq 0x27b3a(%rip), %rax # 0x48a40
movq 0x68(%rax), %rsi
movl $0x200, %edx # imm = 0x200
jmp 0x20f8b
movb $0x1, %r13b
movq 0x4d0(%r14), %rax
movq %r14, %rdi
movl $0x16, %esi
movq %r15, %rdx
movq %r12, %rcx
movl $0x1, %r8d
movq %rbx, %r9
callq *0x10(%rax)
testl %eax, %eax
je 0x20fbe
leaq 0x30d(%rbx), %rdi
leaq 0x10c(%rbx), %r14
movl $0x0, 0x50(%rbx)
movq 0x38(%rbx), %rsi
movl 0x90(%rsi), %eax
movl %eax, 0x108(%rbx)
addq $0x297, %rsi # imm = 0x297
movl $0x5, %edx
callq 0x13220
movb $0x0, 0x312(%rbx)
movl $0x97, %esi
addq 0x38(%rbx), %rsi
movl $0x200, %edx # imm = 0x200
movq %r14, %rdi
callq 0x13220
movb $0x0, 0x30b(%rbx)
movl $0x1, %r15d
movq %fs:0x28, %rax
cmpq -0x30(%rbp), %rax
jne 0x21025
movl %r15d, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
testb %r13b, %r13b
je 0x20fe4
movq 0x2a0(%r14), %rax
cmpl $0x2, (%rax)
jne 0x20fe4
movq %r14, %rdi
movl $0x4, %esi
callq 0x15e2d
testl %eax, %eax
jne 0x20f3d
movq 0x2a0(%r14), %rax
xorl %r15d, %r15d
cmpl $0x0, (%rax)
jne 0x20f9d
movq 0x480(%r14), %rax
cmpb $0x0, 0x148(%rax)
jne 0x20f9d
movq 0x4d0(%r14), %rax
movq 0x40(%rax), %rax
testq %rax, %rax
je 0x20f9d
movq %rbx, %rdi
callq *%rax
testb %al, %al
jne 0x20f3d
jmp 0x20f9d
callq 0x13500
| mysql_stmt_prepare:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 18h
mov rbx, rdi
mov rax, fs:28h
mov [rbp+var_30], rax
mov r14, [rdi+38h]
test r14, r14
jz loc_20ECC
mov r12, rdx
mov r15, rsi
cmp rdx, 0FFFFFFFFFFFFFFFFh
jnz short loc_20DC5
mov rdi, r15
call _strlen
mov r12, rax
loc_20DC5:
xor eax, eax
mov [rbx+108h], eax
mov ecx, 30303030h
mov [rbx+30Dh], ecx
mov dx, 30h ; '0'
mov [rbx+311h], dx
mov [rbx+10Ch], al
mov [r14+90h], eax
mov rsi, [rbx+38h]
mov [rsi+29Bh], dx
mov [rsi+297h], ecx
mov rcx, [rbx+38h]
mov [rcx+97h], al
mov rax, [rbx+38h]
mov rax, [rax+2A0h]
test rax, rax
jz short loc_20E22
mov dword ptr [rax+4], 0
loc_20E22:
mov rax, 0FFFFFFFFFFFFFFFFh
mov [r14+338h], rax
mov [rbx+0F8h], rax
cmp dword ptr [rbx+50h], 0
jz loc_20F11
mov rax, [r14+2A0h]
cmp dword ptr [rax], 0
setz r13b
jnz short loc_20E5E
mov rdi, r14
mov esi, 2
call ma_multi_command
loc_20E5E:
mov rdi, rbx
mov esi, 1
call mysql_stmt_internal_reset
test al, al
jnz loc_20F3D
mov rdi, rbx
mov esi, 1
call ma_free_root
mov rdi, [rbx+340h]
xor esi, esi
call ma_free_root
mov qword ptr [rbx+70h], 0
xorps xmm0, xmm0
movups xmmword ptr [rbx+58h], xmm0
mov eax, [rbx+40h]
lea rdx, [rbp+var_34]
mov [rdx], eax
mov rax, [r14+4D0h]
mov ecx, 4
mov rdi, r14
mov esi, 19h
mov r8d, 1
mov r9, rbx
call qword ptr [rax+10h]
test eax, eax
jnz short loc_20F3D
jmp short loc_20F14
loc_20ECC:
mov dword ptr [rbx+108h], 7DDh
lea rdi, [rbx+30Dh]
lea rax, SQLSTATE_UNKNOWN
mov rsi, [rax]
mov edx, 5
call _strncpy
mov byte ptr [rbx+312h], 0
lea rdi, [rbx+10Ch]
lea rax, client_errors
mov rsi, [rax+68h]
mov edx, 200h
jmp short loc_20F8B
loc_20F11:
mov r13b, 1
loc_20F14:
mov rax, [r14+4D0h]
mov rdi, r14
mov esi, 16h
mov rdx, r15
mov rcx, r12
mov r8d, 1
mov r9, rbx
call qword ptr [rax+10h]
test eax, eax
jz loc_20FBE
loc_20F3D:
lea rdi, [rbx+30Dh]
lea r14, [rbx+10Ch]
mov dword ptr [rbx+50h], 0
mov rsi, [rbx+38h]
mov eax, [rsi+90h]
mov [rbx+108h], eax
add rsi, 297h
mov edx, 5
call _strncpy
mov byte ptr [rbx+312h], 0
mov esi, 97h
add rsi, [rbx+38h]
mov edx, 200h
mov rdi, r14
loc_20F8B:
call _strncpy
mov byte ptr [rbx+30Bh], 0
mov r15d, 1
loc_20F9D:
mov rax, fs:28h
cmp rax, [rbp+var_30]
jnz short loc_21025
mov eax, r15d
add rsp, 18h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_20FBE:
test r13b, r13b
jz short loc_20FE4
mov rax, [r14+2A0h]
cmp dword ptr [rax], 2
jnz short loc_20FE4
mov rdi, r14
mov esi, 4
call ma_multi_command
test eax, eax
jnz loc_20F3D
loc_20FE4:
mov rax, [r14+2A0h]
xor r15d, r15d
cmp dword ptr [rax], 0
jnz short loc_20F9D
mov rax, [r14+480h]
cmp byte ptr [rax+148h], 0
jnz short loc_20F9D
mov rax, [r14+4D0h]
mov rax, [rax+40h]
test rax, rax
jz short loc_20F9D
mov rdi, rbx
call rax
test al, al
jnz loc_20F3D
jmp loc_20F9D
loc_21025:
call ___stack_chk_fail
| long long mysql_stmt_prepare(long long a1, long long a2, long long a3)
{
long long v4; // r14
long long v5; // r12
long long v6; // rax
_DWORD *v7; // rax
bool v8; // r13
long long v9; // rdi
char *v10; // rsi
long long v11; // rsi
unsigned int v12; // r15d
unsigned __int8 ( *v14)(long long); // rax
int v15; // [rsp+Ch] [rbp-34h] BYREF
unsigned long long v16; // [rsp+10h] [rbp-30h]
v16 = __readfsqword(0x28u);
v4 = *(_QWORD *)(a1 + 56);
if ( !v4 )
{
*(_DWORD *)(a1 + 264) = 2013;
strncpy(a1 + 781, SQLSTATE_UNKNOWN, 5LL);
*(_BYTE *)(a1 + 786) = 0;
v9 = a1 + 268;
v10 = client_errors[13];
LABEL_16:
strncpy(v9, v10, 512LL);
*(_BYTE *)(a1 + 779) = 0;
return 1;
}
v5 = a3;
if ( a3 == -1 )
v5 = strlen(a2);
*(_DWORD *)(a1 + 264) = 0;
strcpy((char *)(a1 + 781), "00000");
*(_BYTE *)(a1 + 268) = 0;
*(_DWORD *)(v4 + 144) = 0;
strcpy((char *)(*(_QWORD *)(a1 + 56) + 663LL), "00000");
*(_BYTE *)(*(_QWORD *)(a1 + 56) + 151LL) = 0;
v6 = *(_QWORD *)(*(_QWORD *)(a1 + 56) + 672LL);
if ( v6 )
*(_DWORD *)(v6 + 4) = 0;
*(_QWORD *)(v4 + 824) = -1LL;
*(_QWORD *)(a1 + 248) = -1LL;
if ( *(_DWORD *)(a1 + 80) )
{
v7 = *(_DWORD **)(v4 + 672);
v8 = *v7 == 0;
if ( !*v7 )
ma_multi_command(v4, 2);
if ( (unsigned __int8)mysql_stmt_internal_reset(a1, 1) )
goto LABEL_15;
ma_free_root(a1, 1);
ma_free_root(*(_QWORD *)(a1 + 832), 0);
*(_QWORD *)(a1 + 112) = 0LL;
*(_OWORD *)(a1 + 88) = 0LL;
v15 = *(_DWORD *)(a1 + 64);
if ( (*(unsigned int ( **)(long long, long long, int *, long long, long long, long long))(*(_QWORD *)(v4 + 1232)
+ 16LL))(
v4,
25LL,
&v15,
4LL,
1LL,
a1) )
{
goto LABEL_15;
}
}
else
{
v8 = 1;
}
if ( (*(unsigned int ( **)(long long, long long, long long, long long, long long, long long))(*(_QWORD *)(v4 + 1232)
+ 16LL))(
v4,
22LL,
a2,
v5,
1LL,
a1)
|| v8 && **(_DWORD **)(v4 + 672) == 2 && (unsigned int)ma_multi_command(v4, 4)
|| (v12 = 0, !**(_DWORD **)(v4 + 672))
&& !*(_BYTE *)(*(_QWORD *)(v4 + 1152) + 328LL)
&& (v14 = *(unsigned __int8 ( **)(long long))(*(_QWORD *)(v4 + 1232) + 64LL)) != 0LL
&& v14(a1) )
{
LABEL_15:
*(_DWORD *)(a1 + 80) = 0;
v11 = *(_QWORD *)(a1 + 56);
*(_DWORD *)(a1 + 264) = *(_DWORD *)(v11 + 144);
strncpy(a1 + 781, v11 + 663, 5LL);
*(_BYTE *)(a1 + 786) = 0;
v10 = (char *)(*(_QWORD *)(a1 + 56) + 151LL);
v9 = a1 + 268;
goto LABEL_16;
}
return v12;
}
| mysql_stmt_prepare:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x18
MOV RBX,RDI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x30],RAX
MOV R14,qword ptr [RDI + 0x38]
TEST R14,R14
JZ 0x00120ecc
MOV R12,RDX
MOV R15,RSI
CMP RDX,-0x1
JNZ 0x00120dc5
MOV RDI,R15
CALL 0x001131c0
MOV R12,RAX
LAB_00120dc5:
XOR EAX,EAX
MOV dword ptr [RBX + 0x108],EAX
MOV ECX,0x30303030
MOV dword ptr [RBX + 0x30d],ECX
MOV DX,0x30
MOV word ptr [RBX + 0x311],DX
MOV byte ptr [RBX + 0x10c],AL
MOV dword ptr [R14 + 0x90],EAX
MOV RSI,qword ptr [RBX + 0x38]
MOV word ptr [RSI + 0x29b],DX
MOV dword ptr [RSI + 0x297],ECX
MOV RCX,qword ptr [RBX + 0x38]
MOV byte ptr [RCX + 0x97],AL
MOV RAX,qword ptr [RBX + 0x38]
MOV RAX,qword ptr [RAX + 0x2a0]
TEST RAX,RAX
JZ 0x00120e22
MOV dword ptr [RAX + 0x4],0x0
LAB_00120e22:
MOV RAX,-0x1
MOV qword ptr [R14 + 0x338],RAX
MOV qword ptr [RBX + 0xf8],RAX
CMP dword ptr [RBX + 0x50],0x0
JZ 0x00120f11
MOV RAX,qword ptr [R14 + 0x2a0]
CMP dword ptr [RAX],0x0
SETZ R13B
JNZ 0x00120e5e
MOV RDI,R14
MOV ESI,0x2
CALL 0x00115e2d
LAB_00120e5e:
MOV RDI,RBX
MOV ESI,0x1
CALL 0x0011fad4
TEST AL,AL
JNZ 0x00120f3d
MOV RDI,RBX
MOV ESI,0x1
CALL 0x0011dc3f
MOV RDI,qword ptr [RBX + 0x340]
XOR ESI,ESI
CALL 0x0011dc3f
MOV qword ptr [RBX + 0x70],0x0
XORPS XMM0,XMM0
MOVUPS xmmword ptr [RBX + 0x58],XMM0
MOV EAX,dword ptr [RBX + 0x40]
LEA RDX,[RBP + -0x34]
MOV dword ptr [RDX],EAX
MOV RAX,qword ptr [R14 + 0x4d0]
MOV ECX,0x4
MOV RDI,R14
MOV ESI,0x19
MOV R8D,0x1
MOV R9,RBX
CALL qword ptr [RAX + 0x10]
TEST EAX,EAX
JNZ 0x00120f3d
JMP 0x00120f14
LAB_00120ecc:
MOV dword ptr [RBX + 0x108],0x7dd
LEA RDI,[RBX + 0x30d]
LEA RAX,[0x148a30]
MOV RSI,qword ptr [RAX]
MOV EDX,0x5
CALL 0x00113220
MOV byte ptr [RBX + 0x312],0x0
LEA RDI,[RBX + 0x10c]
LEA RAX,[0x148a40]
MOV RSI,qword ptr [RAX + 0x68]
MOV EDX,0x200
JMP 0x00120f8b
LAB_00120f11:
MOV R13B,0x1
LAB_00120f14:
MOV RAX,qword ptr [R14 + 0x4d0]
MOV RDI,R14
MOV ESI,0x16
MOV RDX,R15
MOV RCX,R12
MOV R8D,0x1
MOV R9,RBX
CALL qword ptr [RAX + 0x10]
TEST EAX,EAX
JZ 0x00120fbe
LAB_00120f3d:
LEA RDI,[RBX + 0x30d]
LEA R14,[RBX + 0x10c]
MOV dword ptr [RBX + 0x50],0x0
MOV RSI,qword ptr [RBX + 0x38]
MOV EAX,dword ptr [RSI + 0x90]
MOV dword ptr [RBX + 0x108],EAX
ADD RSI,0x297
MOV EDX,0x5
CALL 0x00113220
MOV byte ptr [RBX + 0x312],0x0
MOV ESI,0x97
ADD RSI,qword ptr [RBX + 0x38]
MOV EDX,0x200
MOV RDI,R14
LAB_00120f8b:
CALL 0x00113220
MOV byte ptr [RBX + 0x30b],0x0
MOV R15D,0x1
LAB_00120f9d:
MOV RAX,qword ptr FS:[0x28]
CMP RAX,qword ptr [RBP + -0x30]
JNZ 0x00121025
MOV EAX,R15D
ADD RSP,0x18
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_00120fbe:
TEST R13B,R13B
JZ 0x00120fe4
MOV RAX,qword ptr [R14 + 0x2a0]
CMP dword ptr [RAX],0x2
JNZ 0x00120fe4
MOV RDI,R14
MOV ESI,0x4
CALL 0x00115e2d
TEST EAX,EAX
JNZ 0x00120f3d
LAB_00120fe4:
MOV RAX,qword ptr [R14 + 0x2a0]
XOR R15D,R15D
CMP dword ptr [RAX],0x0
JNZ 0x00120f9d
MOV RAX,qword ptr [R14 + 0x480]
CMP byte ptr [RAX + 0x148],0x0
JNZ 0x00120f9d
MOV RAX,qword ptr [R14 + 0x4d0]
MOV RAX,qword ptr [RAX + 0x40]
TEST RAX,RAX
JZ 0x00120f9d
MOV RDI,RBX
CALL RAX
TEST AL,AL
JNZ 0x00120f3d
JMP 0x00120f9d
LAB_00121025:
CALL 0x00113500
|
int8 mysql_stmt_prepare(long param_1,char *param_2,size_t param_3)
{
long lVar1;
long lVar2;
code *pcVar3;
char cVar4;
int iVar5;
char *__src;
int8 uVar6;
long in_FS_OFFSET;
bool bVar7;
int4 local_3c;
long local_38;
local_38 = *(long *)(in_FS_OFFSET + 0x28);
lVar1 = *(long *)(param_1 + 0x38);
if (lVar1 == 0) {
*(int4 *)(param_1 + 0x108) = 0x7dd;
strncpy((char *)(param_1 + 0x30d),SQLSTATE_UNKNOWN,5);
*(int1 *)(param_1 + 0x312) = 0;
__src = PTR_s_Lost_connection_to_server_during_00148aa8;
}
else {
if (param_3 == 0xffffffffffffffff) {
param_3 = strlen(param_2);
}
*(int4 *)(param_1 + 0x108) = 0;
*(int4 *)(param_1 + 0x30d) = 0x30303030;
*(int2 *)(param_1 + 0x311) = 0x30;
*(int1 *)(param_1 + 0x10c) = 0;
*(int4 *)(lVar1 + 0x90) = 0;
lVar2 = *(long *)(param_1 + 0x38);
*(int2 *)(lVar2 + 0x29b) = 0x30;
*(int4 *)(lVar2 + 0x297) = 0x30303030;
*(int1 *)(*(long *)(param_1 + 0x38) + 0x97) = 0;
lVar2 = *(long *)(*(long *)(param_1 + 0x38) + 0x2a0);
if (lVar2 != 0) {
*(int4 *)(lVar2 + 4) = 0;
}
*(int8 *)(lVar1 + 0x338) = 0xffffffffffffffff;
*(int8 *)(param_1 + 0xf8) = 0xffffffffffffffff;
if (*(int *)(param_1 + 0x50) == 0) {
bVar7 = true;
LAB_00120f14:
iVar5 = (**(code **)(*(long *)(lVar1 + 0x4d0) + 0x10))(lVar1,0x16,param_2,param_3,1,param_1);
if ((iVar5 == 0) &&
(((!bVar7 || (**(int **)(lVar1 + 0x2a0) != 2)) ||
(iVar5 = ma_multi_command(lVar1,4), iVar5 == 0)))) {
uVar6 = 0;
if ((((**(int **)(lVar1 + 0x2a0) != 0) ||
(*(char *)(*(long *)(lVar1 + 0x480) + 0x148) != '\0')) ||
(pcVar3 = *(code **)(*(long *)(lVar1 + 0x4d0) + 0x40), pcVar3 == (code *)0x0)) ||
(cVar4 = (*pcVar3)(param_1), uVar6 = 0, cVar4 == '\0')) goto LAB_00120f9d;
}
}
else {
bVar7 = **(int **)(lVar1 + 0x2a0) == 0;
if (bVar7) {
ma_multi_command(lVar1,2);
}
cVar4 = mysql_stmt_internal_reset(param_1,1);
if (cVar4 == '\0') {
ma_free_root(param_1,1);
ma_free_root(*(int8 *)(param_1 + 0x340),0);
*(int8 *)(param_1 + 0x70) = 0;
*(int8 *)(param_1 + 0x58) = 0;
*(int8 *)(param_1 + 0x60) = 0;
local_3c = *(int4 *)(param_1 + 0x40);
iVar5 = (**(code **)(*(long *)(lVar1 + 0x4d0) + 0x10))(lVar1,0x19,&local_3c,4,1,param_1);
if (iVar5 == 0) goto LAB_00120f14;
}
}
*(int4 *)(param_1 + 0x50) = 0;
*(int4 *)(param_1 + 0x108) = *(int4 *)(*(long *)(param_1 + 0x38) + 0x90);
strncpy((char *)(param_1 + 0x30d),(char *)(*(long *)(param_1 + 0x38) + 0x297),5);
*(int1 *)(param_1 + 0x312) = 0;
__src = (char *)(*(long *)(param_1 + 0x38) + 0x97);
}
strncpy((char *)(param_1 + 0x10c),__src,0x200);
*(int1 *)(param_1 + 0x30b) = 0;
uVar6 = 1;
LAB_00120f9d:
if (*(long *)(in_FS_OFFSET + 0x28) != local_38) {
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
return uVar6;
}
|
|
6,387 | nlohmann::json_abi_v3_11_3::detail::other_error nlohmann::json_abi_v3_11_3::detail::other_error::create<std::nullptr_t, 0>(int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::nullptr_t) | monkey531[P]llama/common/json.hpp | static other_error create(int id_, const std::string& what_arg, BasicJsonContext context)
{
const std::string w = concat(exception::name("other_error", id_), exception::diagnostics(context), what_arg);
return {id_, w.c_str()};
} | O0 | cpp | nlohmann::json_abi_v3_11_3::detail::other_error nlohmann::json_abi_v3_11_3::detail::other_error::create<std::nullptr_t, 0>(int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::nullptr_t):
subq $0xd8, %rsp
movq %rdi, 0x8(%rsp)
movq %rdi, %rax
movq %rax, 0x10(%rsp)
movq %rdi, 0xd0(%rsp)
movl %esi, 0xcc(%rsp)
movq %rdx, 0xc0(%rsp)
movq %rcx, 0xb8(%rsp)
leaq 0x57(%rsp), %rdi
movq %rdi, 0x18(%rsp)
callq 0x56f00
movq 0x18(%rsp), %rdx
leaq 0xecce8(%rip), %rsi # 0x1e8f86
leaq 0x58(%rsp), %rdi
callq 0x66600
jmp 0xfc2aa
movl 0xcc(%rsp), %edx
leaq 0x78(%rsp), %rdi
leaq 0x58(%rsp), %rsi
callq 0xdd5b0
jmp 0xfc2c2
xorl %eax, %eax
movl %eax, %esi
leaq 0x20(%rsp), %rdi
callq 0xf8900
jmp 0xfc2d2
movq 0xc0(%rsp), %rcx
leaq 0x98(%rsp), %rdi
leaq 0x78(%rsp), %rsi
leaq 0x20(%rsp), %rdx
callq 0xdd4f0
jmp 0xfc2f3
leaq 0x20(%rsp), %rdi
callq 0x572d0
leaq 0x78(%rsp), %rdi
callq 0x572d0
leaq 0x58(%rsp), %rdi
callq 0x572d0
leaq 0x57(%rsp), %rdi
callq 0x572b0
movl 0xcc(%rsp), %eax
movl %eax, 0x4(%rsp)
leaq 0x98(%rsp), %rdi
callq 0x56190
movq 0x8(%rsp), %rdi
movl 0x4(%rsp), %esi
movq %rax, %rdx
callq 0xfda60
jmp 0xfc346
leaq 0x98(%rsp), %rdi
callq 0x572d0
movq 0x10(%rsp), %rax
addq $0xd8, %rsp
retq
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x48(%rsp)
movl %eax, 0x44(%rsp)
jmp 0xfc3bc
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x48(%rsp)
movl %eax, 0x44(%rsp)
jmp 0xfc3b2
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x48(%rsp)
movl %eax, 0x44(%rsp)
jmp 0xfc3a8
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x48(%rsp)
movl %eax, 0x44(%rsp)
leaq 0x20(%rsp), %rdi
callq 0x572d0
leaq 0x78(%rsp), %rdi
callq 0x572d0
leaq 0x58(%rsp), %rdi
callq 0x572d0
leaq 0x57(%rsp), %rdi
callq 0x572b0
jmp 0xfc3e3
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x48(%rsp)
movl %eax, 0x44(%rsp)
leaq 0x98(%rsp), %rdi
callq 0x572d0
movq 0x48(%rsp), %rdi
callq 0x56a10
nopl (%rax)
| _ZN8nlohmann16json_abi_v3_11_36detail11other_error6createIDnTnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES5_:
sub rsp, 0D8h
mov [rsp+0D8h+var_D0], rdi; int
mov rax, rdi
mov qword ptr [rsp+0D8h+var_C8], rax; int
mov [rsp+0D8h+var_8], rdi
mov [rsp+0D8h+var_C], esi
mov qword ptr [rsp+0D8h+var_18], rdx
mov [rsp+0D8h+var_20], rcx
lea rdi, [rsp+0D8h+var_81]
mov qword ptr [rsp+0D8h+var_C0], rdi; int
call __ZNSaIcEC1Ev; std::allocator<char>::allocator(void)
mov rdx, qword ptr [rsp+0D8h+var_C0]
lea rsi, aOtherError; "other_error"
lea rdi, [rsp+0D8h+var_81+1]
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&)
jmp short $+2
loc_FC2AA:
mov edx, [rsp+0D8h+var_C]
lea rdi, [rsp+0D8h+var_60]; int
lea rsi, [rsp+0D8h+var_81+1]
call _ZN8nlohmann16json_abi_v3_11_36detail9exception4nameERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEi; nlohmann::json_abi_v3_11_3::detail::exception::name(std::string const&,int)
jmp short $+2
loc_FC2C2:
xor eax, eax
mov esi, eax
lea rdi, [rsp+0D8h+var_B8]
call _ZN8nlohmann16json_abi_v3_11_36detail9exception11diagnosticsB5cxx11EDn; nlohmann::json_abi_v3_11_3::detail::exception::diagnostics(decltype(nullptr))
jmp short $+2
loc_FC2D2:
mov rcx, qword ptr [rsp+0D8h+var_18]; int
lea rdi, [rsp+0D8h+var_40]; int
lea rsi, [rsp+0D8h+var_60]; int
lea rdx, [rsp+0D8h+var_B8]; int
call _ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJS8_S8_RKS8_EEET_DpOT0_; nlohmann::json_abi_v3_11_3::detail::concat<std::string,std::string,std::string,std::string const&>(std::string,std::string,std::string const&)
jmp short $+2
loc_FC2F3:
lea rdi, [rsp+0D8h+var_B8]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
lea rdi, [rsp+0D8h+var_60]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
lea rdi, [rsp+0D8h+var_81+1]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
lea rdi, [rsp+0D8h+var_81]
call __ZNSaIcED1Ev; std::allocator<char>::~allocator()
mov eax, [rsp+0D8h+var_C]
mov [rsp+0D8h+var_D4], eax
lea rdi, [rsp+0D8h+var_40]
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5c_strEv; std::string::c_str(void)
mov rdi, [rsp+0D8h+var_D0]; this
mov esi, [rsp+0D8h+var_D4]; int
mov rdx, rax; char *
call _ZN8nlohmann16json_abi_v3_11_36detail11other_errorC2EiPKc; nlohmann::json_abi_v3_11_3::detail::other_error::other_error(int,char const*)
jmp short $+2
loc_FC346:
lea rdi, [rsp+0D8h+var_40]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
mov rax, qword ptr [rsp+0D8h+var_C8]
add rsp, 0D8h
retn
mov rcx, rax
mov eax, edx
mov [rsp+arg_40], rcx
mov [rsp+arg_3C], eax
jmp short loc_FC3BC
mov rcx, rax
mov eax, edx
mov [rsp+arg_40], rcx
mov [rsp+arg_3C], eax
jmp short loc_FC3B2
mov rcx, rax
mov eax, edx
mov [rsp+arg_40], rcx
mov [rsp+arg_3C], eax
jmp short loc_FC3A8
mov rcx, rax
mov eax, edx
mov [rsp+arg_40], rcx
mov [rsp+arg_3C], eax
lea rdi, [rsp+arg_18]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
loc_FC3A8:
lea rdi, [rsp+arg_70]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
loc_FC3B2:
lea rdi, [rsp+arg_50]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
loc_FC3BC:
lea rdi, [rsp+arg_4F]
call __ZNSaIcED1Ev; std::allocator<char>::~allocator()
jmp short loc_FC3E3
mov rcx, rax
mov eax, edx
mov [rsp+arg_40], rcx
mov [rsp+arg_3C], eax
lea rdi, [rsp+arg_90]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
loc_FC3E3:
mov rdi, [rsp+arg_40]
call __Unwind_Resume
| nlohmann::json_abi_v3_11_3::detail::other_error * ZN8nlohmann16json_abi_v3_11_36detail11other_error6createIDnTnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES5_(
nlohmann::json_abi_v3_11_3::detail::other_error *a1,
int a2,
long long a3,
long long a4)
{
const char *v4; // rax
int v6; // [rsp+4h] [rbp-D4h]
int v7[13]; // [rsp+20h] [rbp-B8h] BYREF
int v8[8]; // [rsp+57h] [rbp-81h] BYREF
int v9[8]; // [rsp+78h] [rbp-60h] BYREF
int v10[8]; // [rsp+98h] [rbp-40h] BYREF
long long v11; // [rsp+B8h] [rbp-20h]
int v12[2]; // [rsp+C0h] [rbp-18h]
int v13; // [rsp+CCh] [rbp-Ch]
nlohmann::json_abi_v3_11_3::detail::other_error *v14; // [rsp+D0h] [rbp-8h]
v14 = a1;
v13 = a2;
*(_QWORD *)v12 = a3;
v11 = a4;
std::allocator<char>::allocator();
std::string::basic_string<std::allocator<char>>((long long)v8 + 1, (long long)"other_error", (long long)v8);
nlohmann::json_abi_v3_11_3::detail::exception::name(v9, (long long)v8 + 1, v13);
nlohmann::json_abi_v3_11_3::detail::exception::diagnostics[abi:cxx11]((long long)v7, 0LL);
nlohmann::json_abi_v3_11_3::detail::concat<std::string,std::string,std::string,std::string const&>(
(long long)v10,
(long long)v9,
(long long)v7,
*(long long *)v12);
std::string::~string(v7);
std::string::~string(v9);
std::string::~string((char *)v8 + 1);
std::allocator<char>::~allocator(v8);
v6 = v13;
v4 = (const char *)std::string::c_str(v10);
nlohmann::json_abi_v3_11_3::detail::other_error::other_error(a1, v6, v4);
std::string::~string(v10);
return a1;
}
| _ZN8nlohmann16json_abi_v3_11_36detail11other_error6createIDnTnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES5_:
SUB RSP,0xd8
MOV qword ptr [RSP + 0x8],RDI
MOV RAX,RDI
MOV qword ptr [RSP + 0x10],RAX
MOV qword ptr [RSP + 0xd0],RDI
MOV dword ptr [RSP + 0xcc],ESI
MOV qword ptr [RSP + 0xc0],RDX
MOV qword ptr [RSP + 0xb8],RCX
LEA RDI,[RSP + 0x57]
MOV qword ptr [RSP + 0x18],RDI
CALL 0x00156f00
MOV RDX,qword ptr [RSP + 0x18]
LAB_001fc297:
LEA RSI,[0x2e8f86]
LEA RDI,[RSP + 0x58]
CALL 0x00166600
JMP 0x001fc2aa
LAB_001fc2aa:
MOV EDX,dword ptr [RSP + 0xcc]
LAB_001fc2b1:
LEA RDI,[RSP + 0x78]
LEA RSI,[RSP + 0x58]
CALL 0x001dd5b0
JMP 0x001fc2c2
LAB_001fc2c2:
XOR EAX,EAX
MOV ESI,EAX
LEA RDI,[RSP + 0x20]
CALL 0x001f8900
JMP 0x001fc2d2
LAB_001fc2d2:
MOV RCX,qword ptr [RSP + 0xc0]
LAB_001fc2da:
LEA RDI,[RSP + 0x98]
LEA RSI,[RSP + 0x78]
LEA RDX,[RSP + 0x20]
CALL 0x001dd4f0
JMP 0x001fc2f3
LAB_001fc2f3:
LEA RDI,[RSP + 0x20]
CALL 0x001572d0
LEA RDI,[RSP + 0x78]
CALL 0x001572d0
LEA RDI,[RSP + 0x58]
CALL 0x001572d0
LEA RDI,[RSP + 0x57]
CALL 0x001572b0
MOV EAX,dword ptr [RSP + 0xcc]
MOV dword ptr [RSP + 0x4],EAX
LEA RDI,[RSP + 0x98]
CALL 0x00156190
MOV RDI,qword ptr [RSP + 0x8]
MOV ESI,dword ptr [RSP + 0x4]
MOV RDX,RAX
LAB_001fc33f:
CALL 0x001fda60
LAB_001fc344:
JMP 0x001fc346
LAB_001fc346:
LEA RDI,[RSP + 0x98]
CALL 0x001572d0
MOV RAX,qword ptr [RSP + 0x10]
ADD RSP,0xd8
RET
|
other_error *
_ZN8nlohmann16json_abi_v3_11_36detail11other_error6createIDnTnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES5_
(other_error *param_1,int param_2,string *param_3,int8 param_4)
{
int iVar1;
char *pcVar2;
exception local_b8 [55];
allocator local_81;
string local_80 [32];
exception local_60 [32];
detail local_40 [32];
int8 local_20;
string *local_18;
int local_c;
other_error *local_8;
local_20 = param_4;
local_18 = param_3;
local_c = param_2;
local_8 = param_1;
std::allocator<char>::allocator();
/* try { // try from 001fc297 to 001fc2a7 has its CatchHandler @ 001fc360 */
std::__cxx11::string::string<std::allocator<char>>(local_80,"other_error",&local_81);
/* try { // try from 001fc2b1 to 001fc2bf has its CatchHandler @ 001fc370 */
nlohmann::json_abi_v3_11_3::detail::exception::name(local_60,local_80,local_c);
/* try { // try from 001fc2c2 to 001fc2cf has its CatchHandler @ 001fc380 */
nlohmann::json_abi_v3_11_3::detail::exception::diagnostics_abi_cxx11_
(local_b8,(_func_decltype_nullptr *)0x0);
/* try { // try from 001fc2da to 001fc2f0 has its CatchHandler @ 001fc390 */
nlohmann::json_abi_v3_11_3::detail::
concat<std::__cxx11::string,std::__cxx11::string,std::__cxx11::string,std::__cxx11::string_const&>
(local_40,(string *)local_60,(string *)local_b8,local_18);
std::__cxx11::string::~string((string *)local_b8);
std::__cxx11::string::~string((string *)local_60);
std::__cxx11::string::~string(local_80);
std::allocator<char>::~allocator((allocator<char> *)&local_81);
iVar1 = local_c;
pcVar2 = (char *)std::__cxx11::string::c_str();
/* try { // try from 001fc33f to 001fc343 has its CatchHandler @ 001fc3c8 */
nlohmann::json_abi_v3_11_3::detail::other_error::other_error(param_1,iVar1,pcVar2);
std::__cxx11::string::~string((string *)local_40);
return param_1;
}
|
|
6,388 | my_coll_parser_scan_reset_before | eloqsql/strings/ctype-uca.c | static int
my_coll_parser_scan_reset_before(MY_COLL_RULE_PARSER *p)
{
MY_COLL_LEXEM *lexem= my_coll_parser_curr(p);
if (!lex_cmp(lexem, C_STRING_WITH_LEN("[before primary]")) ||
!lex_cmp(lexem, C_STRING_WITH_LEN("[before 1]")))
{
p->rule.before_level= 1;
}
else if (!lex_cmp(lexem, C_STRING_WITH_LEN("[before secondary]")) ||
!lex_cmp(lexem, C_STRING_WITH_LEN("[before 2]")))
{
p->rule.before_level= 2;
}
else if (!lex_cmp(lexem, C_STRING_WITH_LEN("[before tertiary]")) ||
!lex_cmp(lexem, C_STRING_WITH_LEN("[before 3]")))
{
p->rule.before_level= 3;
}
else if (!lex_cmp(lexem, C_STRING_WITH_LEN("[before quaternary]")) ||
!lex_cmp(lexem, C_STRING_WITH_LEN("[before 4]")))
{
p->rule.before_level= 4;
}
else
{
p->rule.before_level= 0;
return 0; /* Don't scan thr next character */
}
return my_coll_parser_scan(p);
} | O0 | c | my_coll_parser_scan_reset_before:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rdi
callq 0x9da90
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rdi
leaq 0x2fc7d(%rip), %rsi # 0xce261
movl $0x10, %edx
callq 0x9e210
cmpl $0x0, %eax
je 0x9e60d
movq -0x18(%rbp), %rdi
leaq 0x2fc74(%rip), %rsi # 0xce272
movl $0xa, %edx
callq 0x9e210
cmpl $0x0, %eax
jne 0x9e621
movq -0x10(%rbp), %rax
movq $0x1, 0xe0(%rax)
jmp 0x9e711
movq -0x18(%rbp), %rdi
leaq 0x2fc51(%rip), %rsi # 0xce27d
movl $0x12, %edx
callq 0x9e210
cmpl $0x0, %eax
je 0x9e655
movq -0x18(%rbp), %rdi
leaq 0x2fc4a(%rip), %rsi # 0xce290
movl $0xa, %edx
callq 0x9e210
cmpl $0x0, %eax
jne 0x9e669
movq -0x10(%rbp), %rax
movq $0x2, 0xe0(%rax)
jmp 0x9e70f
movq -0x18(%rbp), %rdi
leaq 0x2fc27(%rip), %rsi # 0xce29b
movl $0x11, %edx
callq 0x9e210
cmpl $0x0, %eax
je 0x9e69d
movq -0x18(%rbp), %rdi
leaq 0x2fc1f(%rip), %rsi # 0xce2ad
movl $0xa, %edx
callq 0x9e210
cmpl $0x0, %eax
jne 0x9e6ae
movq -0x10(%rbp), %rax
movq $0x3, 0xe0(%rax)
jmp 0x9e70d
movq -0x18(%rbp), %rdi
leaq 0x2fbff(%rip), %rsi # 0xce2b8
movl $0x13, %edx
callq 0x9e210
cmpl $0x0, %eax
je 0x9e6e2
movq -0x18(%rbp), %rdi
leaq 0x2fbf9(%rip), %rsi # 0xce2cc
movl $0xa, %edx
callq 0x9e210
cmpl $0x0, %eax
jne 0x9e6f3
movq -0x10(%rbp), %rax
movq $0x4, 0xe0(%rax)
jmp 0x9e70b
movq -0x10(%rbp), %rax
movq $0x0, 0xe0(%rax)
movl $0x0, -0x4(%rbp)
jmp 0x9e71d
jmp 0x9e70d
jmp 0x9e70f
jmp 0x9e711
movq -0x10(%rbp), %rdi
callq 0x9e270
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
| my_coll_parser_scan_reset_before:
push rbp
mov rbp, rsp
sub rsp, 20h
mov [rbp+var_10], rdi
mov rdi, [rbp+var_10]
call my_coll_parser_curr
mov [rbp+var_18], rax
mov rdi, [rbp+var_18]
lea rsi, aBeforePrimary; "[before primary]"
mov edx, 10h
call lex_cmp
cmp eax, 0
jz short loc_9E60D
mov rdi, [rbp+var_18]
lea rsi, aBefore1; "[before 1]"
mov edx, 0Ah
call lex_cmp
cmp eax, 0
jnz short loc_9E621
loc_9E60D:
mov rax, [rbp+var_10]
mov qword ptr [rax+0E0h], 1
jmp loc_9E711
loc_9E621:
mov rdi, [rbp+var_18]
lea rsi, aBeforeSecondar; "[before secondary]"
mov edx, 12h
call lex_cmp
cmp eax, 0
jz short loc_9E655
mov rdi, [rbp+var_18]
lea rsi, aBefore2; "[before 2]"
mov edx, 0Ah
call lex_cmp
cmp eax, 0
jnz short loc_9E669
loc_9E655:
mov rax, [rbp+var_10]
mov qword ptr [rax+0E0h], 2
jmp loc_9E70F
loc_9E669:
mov rdi, [rbp+var_18]
lea rsi, aBeforeTertiary; "[before tertiary]"
mov edx, 11h
call lex_cmp
cmp eax, 0
jz short loc_9E69D
mov rdi, [rbp+var_18]
lea rsi, aBefore3; "[before 3]"
mov edx, 0Ah
call lex_cmp
cmp eax, 0
jnz short loc_9E6AE
loc_9E69D:
mov rax, [rbp+var_10]
mov qword ptr [rax+0E0h], 3
jmp short loc_9E70D
loc_9E6AE:
mov rdi, [rbp+var_18]
lea rsi, aBeforeQuaterna; "[before quaternary]"
mov edx, 13h
call lex_cmp
cmp eax, 0
jz short loc_9E6E2
mov rdi, [rbp+var_18]
lea rsi, aBefore4; "[before 4]"
mov edx, 0Ah
call lex_cmp
cmp eax, 0
jnz short loc_9E6F3
loc_9E6E2:
mov rax, [rbp+var_10]
mov qword ptr [rax+0E0h], 4
jmp short loc_9E70B
loc_9E6F3:
mov rax, [rbp+var_10]
mov qword ptr [rax+0E0h], 0
mov [rbp+var_4], 0
jmp short loc_9E71D
loc_9E70B:
jmp short $+2
loc_9E70D:
jmp short $+2
loc_9E70F:
jmp short $+2
loc_9E711:
mov rdi, [rbp+var_10]
call my_coll_parser_scan
mov [rbp+var_4], eax
loc_9E71D:
mov eax, [rbp+var_4]
add rsp, 20h
pop rbp
retn
| long long my_coll_parser_scan_reset_before(long long a1)
{
long long v2; // [rsp+8h] [rbp-18h]
v2 = my_coll_parser_curr(a1);
if ( !(unsigned int)lex_cmp(v2, (long long)"[before primary]", 0x10uLL)
|| !(unsigned int)lex_cmp(v2, (long long)"[before 1]", 0xAuLL) )
{
*(_QWORD *)(a1 + 224) = 1LL;
return (unsigned int)my_coll_parser_scan(a1);
}
if ( !(unsigned int)lex_cmp(v2, (long long)"[before secondary]", 0x12uLL)
|| !(unsigned int)lex_cmp(v2, (long long)"[before 2]", 0xAuLL) )
{
*(_QWORD *)(a1 + 224) = 2LL;
return (unsigned int)my_coll_parser_scan(a1);
}
if ( !(unsigned int)lex_cmp(v2, (long long)"[before tertiary]", 0x11uLL)
|| !(unsigned int)lex_cmp(v2, (long long)"[before 3]", 0xAuLL) )
{
*(_QWORD *)(a1 + 224) = 3LL;
return (unsigned int)my_coll_parser_scan(a1);
}
if ( !(unsigned int)lex_cmp(v2, (long long)"[before quaternary]", 0x13uLL)
|| !(unsigned int)lex_cmp(v2, (long long)"[before 4]", 0xAuLL) )
{
*(_QWORD *)(a1 + 224) = 4LL;
return (unsigned int)my_coll_parser_scan(a1);
}
*(_QWORD *)(a1 + 224) = 0LL;
return 0;
}
| my_coll_parser_scan_reset_before:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x20
MOV qword ptr [RBP + -0x10],RDI
MOV RDI,qword ptr [RBP + -0x10]
CALL 0x0019da90
MOV qword ptr [RBP + -0x18],RAX
MOV RDI,qword ptr [RBP + -0x18]
LEA RSI,[0x1ce261]
MOV EDX,0x10
CALL 0x0019e210
CMP EAX,0x0
JZ 0x0019e60d
MOV RDI,qword ptr [RBP + -0x18]
LEA RSI,[0x1ce272]
MOV EDX,0xa
CALL 0x0019e210
CMP EAX,0x0
JNZ 0x0019e621
LAB_0019e60d:
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RAX + 0xe0],0x1
JMP 0x0019e711
LAB_0019e621:
MOV RDI,qword ptr [RBP + -0x18]
LEA RSI,[0x1ce27d]
MOV EDX,0x12
CALL 0x0019e210
CMP EAX,0x0
JZ 0x0019e655
MOV RDI,qword ptr [RBP + -0x18]
LEA RSI,[0x1ce290]
MOV EDX,0xa
CALL 0x0019e210
CMP EAX,0x0
JNZ 0x0019e669
LAB_0019e655:
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RAX + 0xe0],0x2
JMP 0x0019e70f
LAB_0019e669:
MOV RDI,qword ptr [RBP + -0x18]
LEA RSI,[0x1ce29b]
MOV EDX,0x11
CALL 0x0019e210
CMP EAX,0x0
JZ 0x0019e69d
MOV RDI,qword ptr [RBP + -0x18]
LEA RSI,[0x1ce2ad]
MOV EDX,0xa
CALL 0x0019e210
CMP EAX,0x0
JNZ 0x0019e6ae
LAB_0019e69d:
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RAX + 0xe0],0x3
JMP 0x0019e70d
LAB_0019e6ae:
MOV RDI,qword ptr [RBP + -0x18]
LEA RSI,[0x1ce2b8]
MOV EDX,0x13
CALL 0x0019e210
CMP EAX,0x0
JZ 0x0019e6e2
MOV RDI,qword ptr [RBP + -0x18]
LEA RSI,[0x1ce2cc]
MOV EDX,0xa
CALL 0x0019e210
CMP EAX,0x0
JNZ 0x0019e6f3
LAB_0019e6e2:
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RAX + 0xe0],0x4
JMP 0x0019e70b
LAB_0019e6f3:
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RAX + 0xe0],0x0
MOV dword ptr [RBP + -0x4],0x0
JMP 0x0019e71d
LAB_0019e70b:
JMP 0x0019e70d
LAB_0019e70d:
JMP 0x0019e70f
LAB_0019e70f:
JMP 0x0019e711
LAB_0019e711:
MOV RDI,qword ptr [RBP + -0x10]
CALL 0x0019e270
MOV dword ptr [RBP + -0x4],EAX
LAB_0019e71d:
MOV EAX,dword ptr [RBP + -0x4]
ADD RSP,0x20
POP RBP
RET
|
int4 my_coll_parser_scan_reset_before(long param_1)
{
int iVar1;
int4 uVar2;
int8 uVar3;
uVar3 = my_coll_parser_curr(param_1);
iVar1 = lex_cmp(uVar3,"[before primary]",0x10);
if ((iVar1 == 0) || (iVar1 = lex_cmp(uVar3,"[before 1]",10), iVar1 == 0)) {
*(int8 *)(param_1 + 0xe0) = 1;
}
else {
iVar1 = lex_cmp(uVar3,"[before secondary]",0x12);
if ((iVar1 == 0) || (iVar1 = lex_cmp(uVar3,"[before 2]",10), iVar1 == 0)) {
*(int8 *)(param_1 + 0xe0) = 2;
}
else {
iVar1 = lex_cmp(uVar3,"[before tertiary]",0x11);
if ((iVar1 == 0) || (iVar1 = lex_cmp(uVar3,"[before 3]",10), iVar1 == 0)) {
*(int8 *)(param_1 + 0xe0) = 3;
}
else {
iVar1 = lex_cmp(uVar3,"[before quaternary]",0x13);
if ((iVar1 != 0) && (iVar1 = lex_cmp(uVar3,"[before 4]",10), iVar1 != 0)) {
*(int8 *)(param_1 + 0xe0) = 0;
return 0;
}
*(int8 *)(param_1 + 0xe0) = 4;
}
}
}
uVar2 = my_coll_parser_scan(param_1);
return uVar2;
}
|
|
6,389 | flux::parser::SubscriptExpr::clone() const | kvthweatt[P]FluxLang/src/parser/ast.cpp | std::unique_ptr<Expr> SubscriptExpr::clone() const {
return std::make_unique<SubscriptExpr>(array->clone(), index->clone(), range);
} | O3 | cpp | flux::parser::SubscriptExpr::clone() const:
pushq %r14
pushq %rbx
subq $0x18, %rsp
movq %rsi, %r14
movq %rdi, %rbx
movq 0x28(%rsi), %rsi
movq (%rsi), %rax
leaq 0x10(%rsp), %rdi
callq *0x18(%rax)
movq 0x30(%r14), %rsi
movq (%rsi), %rax
leaq 0x8(%rsp), %rdi
callq *0x18(%rax)
movl $0x38, %edi
callq 0x6270
movq 0x10(%rsp), %rcx
movq 0x8(%rsp), %rdx
movups 0x8(%r14), %xmm0
movups 0x18(%r14), %xmm1
movups %xmm1, 0x18(%rax)
movups %xmm0, 0x8(%rax)
leaq 0x2aa56(%rip), %rsi # 0x38250
movq %rsi, (%rax)
movq %rcx, 0x28(%rax)
movq %rdx, 0x30(%rax)
movq %rax, (%rbx)
movq %rbx, %rax
addq $0x18, %rsp
popq %rbx
popq %r14
retq
movq %rax, %rbx
movq 0x8(%rsp), %rdi
testq %rdi, %rdi
je 0xd82b
movq (%rdi), %rax
callq *0x8(%rax)
jmp 0xd82b
movq %rax, %rbx
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0xd83b
movq (%rdi), %rax
callq *0x8(%rax)
movq %rbx, %rdi
callq 0x6440
nop
| _ZNK4flux6parser13SubscriptExpr5cloneEv:
push r14
push rbx
sub rsp, 18h
mov r14, rsi
mov rbx, rdi
mov rsi, [rsi+28h]
mov rax, [rsi]
lea rdi, [rsp+28h+var_18]
call qword ptr [rax+18h]
mov rsi, [r14+30h]
mov rax, [rsi]
lea rdi, [rsp+28h+var_20]
call qword ptr [rax+18h]
mov edi, 38h ; '8'; unsigned __int64
call __Znwm; operator new(ulong)
mov rcx, [rsp+28h+var_18]
mov rdx, [rsp+28h+var_20]
movups xmm0, xmmword ptr [r14+8]
movups xmm1, xmmword ptr [r14+18h]
movups xmmword ptr [rax+18h], xmm1
movups xmmword ptr [rax+8], xmm0
lea rsi, off_38250
mov [rax], rsi
mov [rax+28h], rcx
mov [rax+30h], rdx
mov [rbx], rax
mov rax, rbx
add rsp, 18h
pop rbx
pop r14
retn
mov rbx, rax
mov rdi, [rsp+arg_0]
test rdi, rdi
jz short loc_D82B
mov rax, [rdi]
call qword ptr [rax+8]
jmp short loc_D82B
mov rbx, rax
loc_D82B:
mov rdi, [rsp+arg_8]
test rdi, rdi
jz short loc_D83B
mov rax, [rdi]
call qword ptr [rax+8]
loc_D83B:
mov rdi, rbx
call __Unwind_Resume
| flux::parser::SubscriptExpr * flux::parser::SubscriptExpr::clone(
flux::parser::SubscriptExpr *this,
long long a2)
{
long long v2; // rax
long long v3; // rcx
long long v4; // rdx
__int128 v5; // xmm0
long long v7; // [rsp+8h] [rbp-20h] BYREF
_QWORD v8[3]; // [rsp+10h] [rbp-18h] BYREF
(*(void ( **)(_QWORD *))(**(_QWORD **)(a2 + 40) + 24LL))(v8);
(*(void ( **)(long long *))(**(_QWORD **)(a2 + 48) + 24LL))(&v7);
v2 = operator new(0x38uLL);
v3 = v8[0];
v4 = v7;
v5 = *(_OWORD *)(a2 + 8);
*(_OWORD *)(v2 + 24) = *(_OWORD *)(a2 + 24);
*(_OWORD *)(v2 + 8) = v5;
*(_QWORD *)v2 = off_38250;
*(_QWORD *)(v2 + 40) = v3;
*(_QWORD *)(v2 + 48) = v4;
*(_QWORD *)this = v2;
return this;
}
| clone:
PUSH R14
PUSH RBX
SUB RSP,0x18
MOV R14,RSI
MOV RBX,RDI
MOV RSI,qword ptr [RSI + 0x28]
MOV RAX,qword ptr [RSI]
LEA RDI,[RSP + 0x10]
CALL qword ptr [RAX + 0x18]
MOV RSI,qword ptr [R14 + 0x30]
MOV RAX,qword ptr [RSI]
LAB_0010d7c5:
LEA RDI,[RSP + 0x8]
CALL qword ptr [RAX + 0x18]
LAB_0010d7cd:
MOV EDI,0x38
CALL 0x00106270
LAB_0010d7d7:
MOV RCX,qword ptr [RSP + 0x10]
MOV RDX,qword ptr [RSP + 0x8]
MOVUPS XMM0,xmmword ptr [R14 + 0x8]
MOVUPS XMM1,xmmword ptr [R14 + 0x18]
MOVUPS xmmword ptr [RAX + 0x18],XMM1
MOVUPS xmmword ptr [RAX + 0x8],XMM0
LEA RSI,[0x138250]
MOV qword ptr [RAX],RSI
MOV qword ptr [RAX + 0x28],RCX
MOV qword ptr [RAX + 0x30],RDX
MOV qword ptr [RBX],RAX
MOV RAX,RBX
ADD RSP,0x18
POP RBX
POP R14
RET
|
/* flux::parser::SubscriptExpr::clone() const */
void flux::parser::SubscriptExpr::clone(void)
{
int8 uVar1;
int8 uVar2;
int8 uVar3;
int8 *puVar4;
long in_RSI;
int8 *in_RDI;
int8 local_20;
int8 local_18;
(**(code **)(**(long **)(in_RSI + 0x28) + 0x18))(&local_18);
/* try { // try from 0010d7c5 to 0010d7cc has its CatchHandler @ 0010d828 */
(**(code **)(**(long **)(in_RSI + 0x30) + 0x18))(&local_20);
/* try { // try from 0010d7cd to 0010d7d6 has its CatchHandler @ 0010d813 */
puVar4 = (int8 *)operator_new(0x38);
uVar1 = *(int8 *)(in_RSI + 8);
uVar2 = *(int8 *)(in_RSI + 0x10);
uVar3 = *(int8 *)(in_RSI + 0x20);
puVar4[3] = *(int8 *)(in_RSI + 0x18);
puVar4[4] = uVar3;
puVar4[1] = uVar1;
puVar4[2] = uVar2;
*puVar4 = &PTR__SubscriptExpr_00138250;
puVar4[5] = local_18;
puVar4[6] = local_20;
*in_RDI = puVar4;
return;
}
|
|
6,390 | js_error_set_stackTraceLimit | bluesky950520[P]quickjs/quickjs.c | static JSValue js_error_set_stackTraceLimit(JSContext *ctx, JSValue this_val, JSValue value)
{
if (JS_IsUndefined(this_val) || JS_IsNull(this_val))
return JS_ThrowTypeErrorNotAnObject(ctx);
int limit;
if (JS_ToInt32(ctx, &limit, value) < 0)
return JS_EXCEPTION;
ctx->error_stack_trace_limit = limit;
return JS_UNDEFINED;
} | O0 | c | js_error_set_stackTraceLimit:
subq $0x48, %rsp
movq %rsi, 0x28(%rsp)
movq %rdx, 0x30(%rsp)
movq %rcx, 0x18(%rsp)
movq %r8, 0x20(%rsp)
movq %rdi, 0x10(%rsp)
movq 0x28(%rsp), %rdi
movq 0x30(%rsp), %rsi
callq 0x34550
cmpl $0x0, %eax
jne 0xc9215
movq 0x28(%rsp), %rdi
movq 0x30(%rsp), %rsi
callq 0x34530
cmpl $0x0, %eax
je 0xc922b
movq 0x10(%rsp), %rdi
callq 0x35890
movq %rax, 0x38(%rsp)
movq %rdx, 0x40(%rsp)
jmp 0xc927c
movq 0x10(%rsp), %rdi
movq 0x18(%rsp), %rdx
movq 0x20(%rsp), %rcx
leaq 0xc(%rsp), %rsi
callq 0x3f210
cmpl $0x0, %eax
jge 0xc925c
movl $0x0, 0x38(%rsp)
movq $0x6, 0x40(%rsp)
jmp 0xc927c
movl 0xc(%rsp), %ecx
movq 0x10(%rsp), %rax
movl %ecx, 0x138(%rax)
movl $0x0, 0x38(%rsp)
movq $0x3, 0x40(%rsp)
movq 0x38(%rsp), %rax
movq 0x40(%rsp), %rdx
addq $0x48, %rsp
retq
nopl (%rax,%rax)
| js_error_set_stackTraceLimit:
sub rsp, 48h
mov [rsp+48h+var_20], rsi
mov [rsp+48h+var_18], rdx
mov [rsp+48h+var_30], rcx
mov [rsp+48h+var_28], r8
mov [rsp+48h+var_38], rdi
mov rdi, [rsp+48h+var_20]
mov rsi, [rsp+48h+var_18]
call JS_IsUndefined_1
cmp eax, 0
jnz short loc_C9215
mov rdi, [rsp+48h+var_20]
mov rsi, [rsp+48h+var_18]
call JS_IsNull_1
cmp eax, 0
jz short loc_C922B
loc_C9215:
mov rdi, [rsp+48h+var_38]
call JS_ThrowTypeErrorNotAnObject
mov [rsp+48h+var_10], rax
mov [rsp+48h+var_8], rdx
jmp short loc_C927C
loc_C922B:
mov rdi, [rsp+48h+var_38]
mov rdx, [rsp+48h+var_30]
mov rcx, [rsp+48h+var_28]
lea rsi, [rsp+48h+var_3C]
call JS_ToInt32
cmp eax, 0
jge short loc_C925C
mov dword ptr [rsp+48h+var_10], 0
mov [rsp+48h+var_8], 6
jmp short loc_C927C
loc_C925C:
mov ecx, [rsp+48h+var_3C]
mov rax, [rsp+48h+var_38]
mov [rax+138h], ecx
mov dword ptr [rsp+48h+var_10], 0
mov [rsp+48h+var_8], 3
loc_C927C:
mov rax, [rsp+48h+var_10]
mov rdx, [rsp+48h+var_8]
add rsp, 48h
retn
| long long js_error_set_stackTraceLimit(
long long a1,
long long a2,
long long a3,
_DWORD *a4,
long long a5,
__m128 a6,
__m128 a7,
__m128 a8,
__m128 a9,
double a10,
double a11,
__m128 a12,
__m128 a13)
{
long long v14; // rsi
long long v15; // rdx
long long v16; // rcx
long long v17; // r8
long long v18; // r9
__m128 v19; // xmm4
__m128 v20; // xmm5
long long v21; // rdx
int v23; // [rsp+Ch] [rbp-3Ch] BYREF
long long v24; // [rsp+10h] [rbp-38h]
_DWORD *v25; // [rsp+18h] [rbp-30h]
long long v26; // [rsp+20h] [rbp-28h]
long long v27; // [rsp+28h] [rbp-20h]
long long v28; // [rsp+30h] [rbp-18h]
long long v29; // [rsp+38h] [rbp-10h]
long long v30; // [rsp+40h] [rbp-8h]
v27 = a2;
v28 = a3;
v25 = a4;
v26 = a5;
v24 = a1;
v14 = a3;
if ( JS_IsUndefined_1(a2, a3) || (v14 = v28, JS_IsNull_1(v27, v28)) )
{
v29 = JS_ThrowTypeErrorNotAnObject(v24, a6, a7, a8, a9, v19, v20, a12, a13, v14, v15, v16, v17, v18);
v30 = v21;
}
else if ( (int)JS_ToInt32(v24, (long long)&v23, v25, v26) >= 0 )
{
*(_DWORD *)(v24 + 312) = v23;
LODWORD(v29) = 0;
v30 = 3LL;
}
else
{
LODWORD(v29) = 0;
v30 = 6LL;
}
return v29;
}
| js_error_set_stackTraceLimit:
SUB RSP,0x48
MOV qword ptr [RSP + 0x28],RSI
MOV qword ptr [RSP + 0x30],RDX
MOV qword ptr [RSP + 0x18],RCX
MOV qword ptr [RSP + 0x20],R8
MOV qword ptr [RSP + 0x10],RDI
MOV RDI,qword ptr [RSP + 0x28]
MOV RSI,qword ptr [RSP + 0x30]
CALL 0x00134550
CMP EAX,0x0
JNZ 0x001c9215
MOV RDI,qword ptr [RSP + 0x28]
MOV RSI,qword ptr [RSP + 0x30]
CALL 0x00134530
CMP EAX,0x0
JZ 0x001c922b
LAB_001c9215:
MOV RDI,qword ptr [RSP + 0x10]
CALL 0x00135890
MOV qword ptr [RSP + 0x38],RAX
MOV qword ptr [RSP + 0x40],RDX
JMP 0x001c927c
LAB_001c922b:
MOV RDI,qword ptr [RSP + 0x10]
MOV RDX,qword ptr [RSP + 0x18]
MOV RCX,qword ptr [RSP + 0x20]
LEA RSI,[RSP + 0xc]
CALL 0x0013f210
CMP EAX,0x0
JGE 0x001c925c
MOV dword ptr [RSP + 0x38],0x0
MOV qword ptr [RSP + 0x40],0x6
JMP 0x001c927c
LAB_001c925c:
MOV ECX,dword ptr [RSP + 0xc]
MOV RAX,qword ptr [RSP + 0x10]
MOV dword ptr [RAX + 0x138],ECX
MOV dword ptr [RSP + 0x38],0x0
MOV qword ptr [RSP + 0x40],0x3
LAB_001c927c:
MOV RAX,qword ptr [RSP + 0x38]
MOV RDX,qword ptr [RSP + 0x40]
ADD RSP,0x48
RET
|
int1 [16]
js_error_set_stackTraceLimit
(long param_1,int8 param_2,int8 param_3,int8 param_4,int8 param_5)
{
int iVar1;
int1 auVar2 [16];
int4 local_3c;
long local_38;
int8 local_30;
int8 local_28;
int8 local_20;
int8 local_18;
int4 local_10;
int4 uStack_c;
int8 local_8;
local_38 = param_1;
local_30 = param_4;
local_28 = param_5;
local_20 = param_2;
local_18 = param_3;
iVar1 = JS_IsUndefined(param_2,param_3);
if (iVar1 == 0) {
iVar1 = JS_IsNull(local_20,local_18);
if (iVar1 == 0) {
iVar1 = JS_ToInt32(local_38,&local_3c,local_30,local_28);
if (iVar1 < 0) {
local_10 = 0;
local_8 = 6;
}
else {
*(int4 *)(local_38 + 0x138) = local_3c;
local_10 = 0;
local_8 = 3;
}
goto LAB_001c927c;
}
}
auVar2 = JS_ThrowTypeErrorNotAnObject(local_38);
local_8 = auVar2._8_8_;
local_10 = auVar2._0_4_;
uStack_c = auVar2._4_4_;
LAB_001c927c:
auVar2._4_4_ = uStack_c;
auVar2._0_4_ = local_10;
auVar2._8_8_ = local_8;
return auVar2;
}
|
|
6,391 | translog_write_data_on_page | eloqsql/storage/maria/ma_loghandler.c | static my_bool translog_write_data_on_page(TRANSLOG_ADDRESS *horizon,
struct st_buffer_cursor *cursor,
translog_size_t length,
uchar *buffer)
{
DBUG_ENTER("translog_write_data_on_page");
DBUG_PRINT("enter", ("Chunk length: %lu Page size %u",
(ulong) length, (uint) cursor->current_page_fill));
DBUG_ASSERT(length > 0);
DBUG_ASSERT(length + cursor->current_page_fill <= TRANSLOG_PAGE_SIZE);
DBUG_ASSERT(length + cursor->ptr <= cursor->buffer->buffer +
TRANSLOG_WRITE_BUFFER);
memcpy(cursor->ptr, buffer, length);
cursor->ptr+= length;
(*horizon)+= length; /* adds offset */
cursor->current_page_fill+= length;
if (!cursor->chaser)
cursor->buffer->size+= length;
DBUG_PRINT("info", ("Write data buffer #%u: %p "
"chaser: %d Size: %lu (%lu)",
(uint) cursor->buffer->buffer_no, cursor->buffer,
cursor->chaser, (ulong) cursor->buffer->size,
(ulong) (cursor->ptr - cursor->buffer->buffer)));
translog_check_cursor(cursor);
DBUG_RETURN(0);
} | O0 | c | translog_write_data_on_page:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movq %rcx, -0x20(%rbp)
jmp 0x3a0f9
jmp 0x3a0fb
jmp 0x3a0fd
jmp 0x3a0ff
jmp 0x3a101
jmp 0x3a103
jmp 0x3a105
movq -0x10(%rbp), %rax
movq 0x20(%rax), %rdi
movq -0x20(%rbp), %rsi
movl -0x14(%rbp), %eax
movl %eax, %edx
callq 0x2a090
movl -0x14(%rbp), %edx
movq -0x10(%rbp), %rax
movq 0x20(%rax), %rcx
movl %edx, %edx
addq %rdx, %rcx
movq %rcx, 0x20(%rax)
movl -0x14(%rbp), %eax
movl %eax, %ecx
movq -0x8(%rbp), %rax
addq (%rax), %rcx
movq %rcx, (%rax)
movl -0x14(%rbp), %edx
movq -0x10(%rbp), %rax
movzwl 0x30(%rax), %ecx
addl %edx, %ecx
movw %cx, 0x30(%rax)
movq -0x10(%rbp), %rax
cmpb $0x0, 0x37(%rax)
jne 0x3a170
movl -0x14(%rbp), %ecx
movq -0x10(%rbp), %rax
movq 0x28(%rax), %rax
addl 0x100030(%rax), %ecx
movl %ecx, 0x100030(%rax)
jmp 0x3a172
jmp 0x3a174
movq -0x10(%rbp), %rdi
callq 0x30a40
jmp 0x3a17f
xorl %eax, %eax
addq $0x20, %rsp
popq %rbp
retq
nopw (%rax,%rax)
| translog_write_data_on_page:
push rbp
mov rbp, rsp
sub rsp, 20h
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov [rbp+var_14], edx
mov [rbp+var_20], rcx
jmp short $+2
loc_3A0F9:
jmp short $+2
loc_3A0FB:
jmp short $+2
loc_3A0FD:
jmp short $+2
loc_3A0FF:
jmp short $+2
loc_3A101:
jmp short $+2
loc_3A103:
jmp short $+2
loc_3A105:
mov rax, [rbp+var_10]
mov rdi, [rax+20h]
mov rsi, [rbp+var_20]
mov eax, [rbp+var_14]
mov edx, eax
call _memcpy
mov edx, [rbp+var_14]
mov rax, [rbp+var_10]
mov rcx, [rax+20h]
mov edx, edx
add rcx, rdx
mov [rax+20h], rcx
mov eax, [rbp+var_14]
mov ecx, eax
mov rax, [rbp+var_8]
add rcx, [rax]
mov [rax], rcx
mov edx, [rbp+var_14]
mov rax, [rbp+var_10]
movzx ecx, word ptr [rax+30h]
add ecx, edx
mov [rax+30h], cx
mov rax, [rbp+var_10]
cmp byte ptr [rax+37h], 0
jnz short loc_3A170
mov ecx, [rbp+var_14]
mov rax, [rbp+var_10]
mov rax, [rax+28h]
add ecx, dword ptr ds:loc_100030[rax]
mov dword ptr ds:loc_100030[rax], ecx
loc_3A170:
jmp short $+2
loc_3A172:
jmp short $+2
loc_3A174:
mov rdi, [rbp+var_10]
call translog_check_cursor
jmp short $+2
loc_3A17F:
xor eax, eax
add rsp, 20h
pop rbp
retn
| long long translog_write_data_on_page(_QWORD *a1, long long a2, unsigned int a3, long long a4)
{
memcpy(*(_QWORD *)(a2 + 32), a4, a3);
*(_QWORD *)(a2 + 32) += a3;
*a1 += a3;
*(_WORD *)(a2 + 48) += a3;
if ( !*(_BYTE *)(a2 + 55) )
*(_DWORD *)((char *)&loc_100030 + *(_QWORD *)(a2 + 40)) += a3;
translog_check_cursor();
return 0LL;
}
| translog_write_data_on_page:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x20
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV dword ptr [RBP + -0x14],EDX
MOV qword ptr [RBP + -0x20],RCX
JMP 0x0013a0f9
LAB_0013a0f9:
JMP 0x0013a0fb
LAB_0013a0fb:
JMP 0x0013a0fd
LAB_0013a0fd:
JMP 0x0013a0ff
LAB_0013a0ff:
JMP 0x0013a101
LAB_0013a101:
JMP 0x0013a103
LAB_0013a103:
JMP 0x0013a105
LAB_0013a105:
MOV RAX,qword ptr [RBP + -0x10]
MOV RDI,qword ptr [RAX + 0x20]
MOV RSI,qword ptr [RBP + -0x20]
MOV EAX,dword ptr [RBP + -0x14]
MOV EDX,EAX
CALL 0x0012a090
MOV EDX,dword ptr [RBP + -0x14]
MOV RAX,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RAX + 0x20]
MOV EDX,EDX
ADD RCX,RDX
MOV qword ptr [RAX + 0x20],RCX
MOV EAX,dword ptr [RBP + -0x14]
MOV ECX,EAX
MOV RAX,qword ptr [RBP + -0x8]
ADD RCX,qword ptr [RAX]
MOV qword ptr [RAX],RCX
MOV EDX,dword ptr [RBP + -0x14]
MOV RAX,qword ptr [RBP + -0x10]
MOVZX ECX,word ptr [RAX + 0x30]
ADD ECX,EDX
MOV word ptr [RAX + 0x30],CX
MOV RAX,qword ptr [RBP + -0x10]
CMP byte ptr [RAX + 0x37],0x0
JNZ 0x0013a170
MOV ECX,dword ptr [RBP + -0x14]
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x28]
ADD ECX,dword ptr [RAX + 0x100030]
MOV dword ptr [RAX + 0x100030],ECX
LAB_0013a170:
JMP 0x0013a172
LAB_0013a172:
JMP 0x0013a174
LAB_0013a174:
MOV RDI,qword ptr [RBP + -0x10]
CALL 0x00130a40
JMP 0x0013a17f
LAB_0013a17f:
XOR EAX,EAX
ADD RSP,0x20
POP RBP
RET
|
int8 translog_write_data_on_page(long *param_1,long param_2,uint param_3,void *param_4)
{
memcpy(*(void **)(param_2 + 0x20),param_4,(ulong)param_3);
*(ulong *)(param_2 + 0x20) = *(long *)(param_2 + 0x20) + (ulong)param_3;
*param_1 = (ulong)param_3 + *param_1;
*(short *)(param_2 + 0x30) = *(short *)(param_2 + 0x30) + (short)param_3;
if (*(char *)(param_2 + 0x37) == '\0') {
*(uint *)(Elf64_Ehdr_00100000.e_ident_pad + *(long *)(param_2 + 0x28) + 0x27) =
param_3 + *(int *)(Elf64_Ehdr_00100000.e_ident_pad + *(long *)(param_2 + 0x28) + 0x27);
}
translog_check_cursor(param_2);
return 0;
}
|
|
6,392 | bf_get_int32 | bluesky950520[P]quickjs/libbf.c | int bf_get_int32(int *pres, const bf_t *a, int flags)
{
uint32_t v;
int ret;
if (a->expn >= BF_EXP_INF) {
ret = BF_ST_INVALID_OP;
if (flags & BF_GET_INT_MOD) {
v = 0;
} else if (a->expn == BF_EXP_INF) {
v = (uint32_t)INT32_MAX + a->sign;
} else {
v = INT32_MAX;
}
} else if (a->expn <= 0) {
v = 0;
ret = 0;
} else if (a->expn <= 31) {
v = a->tab[a->len - 1] >> (LIMB_BITS - a->expn);
if (a->sign)
v = -v;
ret = 0;
} else if (!(flags & BF_GET_INT_MOD)) {
ret = BF_ST_INVALID_OP;
if (a->sign) {
v = (uint32_t)INT32_MAX + 1;
if (a->expn == 32 &&
(a->tab[a->len - 1] >> (LIMB_BITS - 32)) == v) {
ret = 0;
}
} else {
v = INT32_MAX;
}
} else {
v = get_bits(a->tab, a->len, a->len * LIMB_BITS - a->expn);
if (a->sign)
v = -v;
ret = 0;
}
*pres = v;
return ret;
} | O1 | c | bf_get_int32:
movabsq $0x7ffffffffffffffd, %r9 # imm = 0x7FFFFFFFFFFFFFFD
movq 0x10(%rsi), %rcx
cmpq %r9, %rcx
jle 0x887fc
movl $0x1, %eax
xorl %r8d, %r8d
testb $0x1, %dl
jne 0x888de
incq %r9
movl $0x7fffffff, %r8d # imm = 0x7FFFFFFF
cmpq %r9, %rcx
jne 0x888de
addl 0x8(%rsi), %r8d
jmp 0x888de
xorl %eax, %eax
testq %rcx, %rcx
jle 0x8882e
cmpq $0x1f, %rcx
jg 0x88836
movq 0x18(%rsi), %rdx
movq 0x20(%rsi), %r8
movq -0x8(%r8,%rdx,8), %rdx
negb %cl
shrq %cl, %rdx
movl %edx, %r8d
negl %r8d
cmpl $0x0, 0x8(%rsi)
cmovel %edx, %r8d
jmp 0x888de
xorl %r8d, %r8d
jmp 0x888de
testb $0x1, %dl
jne 0x88874
movl $0x1, %eax
cmpl $0x0, 0x8(%rsi)
je 0x888b4
movl $0x80000000, %r8d # imm = 0x80000000
cmpq $0x20, %rcx
jne 0x888de
movq 0x18(%rsi), %rax
movq 0x20(%rsi), %rcx
movl -0x4(%rcx,%rax,8), %ecx
shlq $0x20, %rcx
addq $0x3, %r9
xorl %eax, %eax
cmpq %r9, %rcx
setne %al
jmp 0x888de
movq 0x18(%rsi), %r10
movq 0x20(%rsi), %r8
movq %r10, %rax
shlq $0x6, %rax
subq %rcx, %rax
movq %rax, %rcx
sarq $0x6, %rcx
movl %eax, %edx
andl $0x3f, %edx
cmpq %r10, %rcx
jae 0x8889d
movq (%r8,%rcx,8), %r9
jmp 0x888a0
xorl %r9d, %r9d
testl %edx, %edx
je 0x888ce
leaq 0x1(%rcx), %r11
cmpq %r10, %r11
jae 0x888bc
movq 0x8(%r8,%rcx,8), %r8
jmp 0x888bf
movl $0x7fffffff, %r8d # imm = 0x7FFFFFFF
jmp 0x888de
xorl %r8d, %r8d
movl %eax, %ecx
shrq %cl, %r9
negb %dl
movl %edx, %ecx
shlq %cl, %r8
orq %r8, %r9
movl %r9d, %r8d
negl %r8d
cmpl $0x0, 0x8(%rsi)
cmovel %r9d, %r8d
xorl %eax, %eax
movl %r8d, (%rdi)
retq
| bf_get_int32:
mov r9, 7FFFFFFFFFFFFFFDh
mov rcx, [rsi+10h]
cmp rcx, r9
jle short loc_887FC
mov eax, 1
xor r8d, r8d
test dl, 1
jnz loc_888DE
inc r9
mov r8d, 7FFFFFFFh
cmp rcx, r9
jnz loc_888DE
add r8d, [rsi+8]
jmp loc_888DE
loc_887FC:
xor eax, eax
test rcx, rcx
jle short loc_8882E
cmp rcx, 1Fh
jg short loc_88836
mov rdx, [rsi+18h]
mov r8, [rsi+20h]
mov rdx, [r8+rdx*8-8]
neg cl
shr rdx, cl
mov r8d, edx
neg r8d
cmp dword ptr [rsi+8], 0
cmovz r8d, edx
jmp loc_888DE
loc_8882E:
xor r8d, r8d
jmp loc_888DE
loc_88836:
test dl, 1
jnz short loc_88874
mov eax, 1
cmp dword ptr [rsi+8], 0
jz short loc_888B4
mov r8d, 80000000h
cmp rcx, 20h ; ' '
jnz loc_888DE
mov rax, [rsi+18h]
mov rcx, [rsi+20h]
mov ecx, [rcx+rax*8-4]
shl rcx, 20h
add r9, 3
xor eax, eax
cmp rcx, r9
setnz al
jmp short loc_888DE
loc_88874:
mov r10, [rsi+18h]
mov r8, [rsi+20h]
mov rax, r10
shl rax, 6
sub rax, rcx
mov rcx, rax
sar rcx, 6
mov edx, eax
and edx, 3Fh
cmp rcx, r10
jnb short loc_8889D
mov r9, [r8+rcx*8]
jmp short loc_888A0
loc_8889D:
xor r9d, r9d
loc_888A0:
test edx, edx
jz short loc_888CE
lea r11, [rcx+1]
cmp r11, r10
jnb short loc_888BC
mov r8, [r8+rcx*8+8]
jmp short loc_888BF
loc_888B4:
mov r8d, 7FFFFFFFh
jmp short loc_888DE
loc_888BC:
xor r8d, r8d
loc_888BF:
mov ecx, eax
shr r9, cl
neg dl
mov ecx, edx
shl r8, cl
or r9, r8
loc_888CE:
mov r8d, r9d
neg r8d
cmp dword ptr [rsi+8], 0
cmovz r8d, r9d
xor eax, eax
loc_888DE:
mov [rdi], r8d
retn
| _BOOL8 bf_get_int32(int *a1, long long a2, char a3)
{
long long v3; // rcx
_BOOL8 result; // rax
int v5; // r8d
long long v6; // rdx
unsigned long long v7; // r10
long long v8; // r8
char v9; // al
unsigned long long v10; // rcx
unsigned long long v11; // r9
long long v12; // r8
v3 = *(_QWORD *)(a2 + 16);
if ( v3 <= 0x7FFFFFFFFFFFFFFDLL )
{
result = 0LL;
if ( v3 <= 0 )
{
v5 = 0;
}
else if ( v3 > 31 )
{
if ( (a3 & 1) != 0 )
{
v7 = *(_QWORD *)(a2 + 24);
v8 = *(_QWORD *)(a2 + 32);
v9 = ((_BYTE)v7 << 6) - v3;
v10 = (long long)((v7 << 6) - v3) >> 6;
if ( v10 >= v7 )
v11 = 0LL;
else
v11 = *(_QWORD *)(v8 + 8 * v10);
if ( (v9 & 0x3F) != 0 )
{
if ( v10 + 1 >= v7 )
v12 = 0LL;
else
v12 = *(_QWORD *)(v8 + 8 * v10 + 8);
v11 = (v12 << -(v9 & 0x3F)) | (v11 >> v9);
}
v5 = -(int)v11;
if ( !*(_DWORD *)(a2 + 8) )
v5 = v11;
result = 0LL;
}
else
{
result = 1LL;
if ( *(_DWORD *)(a2 + 8) )
{
v5 = 0x80000000;
if ( v3 == 32 )
result = (unsigned long long)*(unsigned int *)(*(_QWORD *)(a2 + 32) + 8LL * *(_QWORD *)(a2 + 24) - 4) << 32 != 0x8000000000000000LL;
}
else
{
v5 = 0x7FFFFFFF;
}
}
}
else
{
v6 = *(_QWORD *)(*(_QWORD *)(a2 + 32) + 8LL * *(_QWORD *)(a2 + 24) - 8) >> -(char)v3;
v5 = -(int)v6;
if ( !*(_DWORD *)(a2 + 8) )
v5 = v6;
}
}
else
{
result = 1LL;
v5 = 0;
if ( (a3 & 1) == 0 )
{
v5 = 0x7FFFFFFF;
if ( v3 == 0x7FFFFFFFFFFFFFFELL )
v5 = *(_DWORD *)(a2 + 8) + 0x7FFFFFFF;
}
}
*a1 = v5;
return result;
}
| bf_get_int32:
MOV R9,0x7ffffffffffffffd
MOV RCX,qword ptr [RSI + 0x10]
CMP RCX,R9
JLE 0x001887fc
MOV EAX,0x1
XOR R8D,R8D
TEST DL,0x1
JNZ 0x001888de
INC R9
MOV R8D,0x7fffffff
CMP RCX,R9
JNZ 0x001888de
ADD R8D,dword ptr [RSI + 0x8]
JMP 0x001888de
LAB_001887fc:
XOR EAX,EAX
TEST RCX,RCX
JLE 0x0018882e
CMP RCX,0x1f
JG 0x00188836
MOV RDX,qword ptr [RSI + 0x18]
MOV R8,qword ptr [RSI + 0x20]
MOV RDX,qword ptr [R8 + RDX*0x8 + -0x8]
NEG CL
SHR RDX,CL
MOV R8D,EDX
NEG R8D
CMP dword ptr [RSI + 0x8],0x0
CMOVZ R8D,EDX
JMP 0x001888de
LAB_0018882e:
XOR R8D,R8D
JMP 0x001888de
LAB_00188836:
TEST DL,0x1
JNZ 0x00188874
MOV EAX,0x1
CMP dword ptr [RSI + 0x8],0x0
JZ 0x001888b4
MOV R8D,0x80000000
CMP RCX,0x20
JNZ 0x001888de
MOV RAX,qword ptr [RSI + 0x18]
MOV RCX,qword ptr [RSI + 0x20]
MOV ECX,dword ptr [RCX + RAX*0x8 + -0x4]
SHL RCX,0x20
ADD R9,0x3
XOR EAX,EAX
CMP RCX,R9
SETNZ AL
JMP 0x001888de
LAB_00188874:
MOV R10,qword ptr [RSI + 0x18]
MOV R8,qword ptr [RSI + 0x20]
MOV RAX,R10
SHL RAX,0x6
SUB RAX,RCX
MOV RCX,RAX
SAR RCX,0x6
MOV EDX,EAX
AND EDX,0x3f
CMP RCX,R10
JNC 0x0018889d
MOV R9,qword ptr [R8 + RCX*0x8]
JMP 0x001888a0
LAB_0018889d:
XOR R9D,R9D
LAB_001888a0:
TEST EDX,EDX
JZ 0x001888ce
LEA R11,[RCX + 0x1]
CMP R11,R10
JNC 0x001888bc
MOV R8,qword ptr [R8 + RCX*0x8 + 0x8]
JMP 0x001888bf
LAB_001888b4:
MOV R8D,0x7fffffff
JMP 0x001888de
LAB_001888bc:
XOR R8D,R8D
LAB_001888bf:
MOV ECX,EAX
SHR R9,CL
NEG DL
MOV ECX,EDX
SHL R8,CL
OR R9,R8
LAB_001888ce:
MOV R8D,R9D
NEG R8D
CMP dword ptr [RSI + 0x8],0x0
CMOVZ R8D,R9D
XOR EAX,EAX
LAB_001888de:
MOV dword ptr [RDI],R8D
RET
|
bool bf_get_int32(int *param_1,long param_2,ulong param_3)
{
ulong uVar1;
ulong uVar2;
ulong uVar3;
int iVar4;
int iVar5;
long lVar6;
ulong uVar7;
bool bVar8;
lVar6 = *(long *)(param_2 + 0x10);
if (lVar6 < 0x7ffffffffffffffe) {
bVar8 = false;
if (lVar6 < 1) {
iVar5 = 0;
}
else if (lVar6 < 0x20) {
iVar4 = (int)(*(ulong *)(*(long *)(param_2 + 0x20) + -8 + *(long *)(param_2 + 0x18) * 8) >>
(-(char)lVar6 & 0x3fU));
iVar5 = -iVar4;
if (*(int *)(param_2 + 8) == 0) {
iVar5 = iVar4;
}
}
else if ((param_3 & 1) == 0) {
bVar8 = true;
if (*(int *)(param_2 + 8) == 0) {
iVar5 = 0x7fffffff;
}
else {
iVar5 = -0x80000000;
if (lVar6 == 0x20) {
bVar8 = *(int *)(*(long *)(param_2 + 0x20) + -4 + *(long *)(param_2 + 0x18) * 8) !=
-0x80000000;
}
}
}
else {
uVar1 = *(ulong *)(param_2 + 0x18);
uVar2 = uVar1 * 0x40 - lVar6;
uVar3 = (long)uVar2 >> 6;
if (uVar3 < uVar1) {
uVar7 = *(ulong *)(*(long *)(param_2 + 0x20) + uVar3 * 8);
}
else {
uVar7 = 0;
}
if ((uVar2 & 0x3f) != 0) {
if (uVar3 + 1 < uVar1) {
lVar6 = *(long *)(*(long *)(param_2 + 0x20) + 8 + uVar3 * 8);
}
else {
lVar6 = 0;
}
uVar7 = uVar7 >> ((byte)uVar2 & 0x3f) | lVar6 << (-((byte)uVar2 & 0x3f) & 0x3f);
}
iVar5 = -(int)uVar7;
if (*(int *)(param_2 + 8) == 0) {
iVar5 = (int)uVar7;
}
bVar8 = false;
}
}
else {
bVar8 = true;
iVar5 = 0;
if (((param_3 & 1) == 0) && (iVar5 = 0x7fffffff, lVar6 == 0x7ffffffffffffffe)) {
iVar5 = *(int *)(param_2 + 8) + 0x7fffffff;
}
}
*param_1 = iVar5;
return bVar8;
}
|
|
6,393 | my_bitmap_free | eloqsql/mysys/my_bitmap.c | void my_bitmap_free(MY_BITMAP *map)
{
DBUG_ENTER("my_bitmap_free");
if (map->bitmap)
{
if (map->mutex)
mysql_mutex_destroy(map->mutex);
my_free(map->bitmap);
map->bitmap=0;
}
DBUG_VOID_RETURN;
} | O3 | c | my_bitmap_free:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
movq (%rdi), %rdi
testq %rdi, %rdi
je 0x9e1f1
movq 0x10(%rbx), %r14
testq %r14, %r14
je 0x9e1e5
movq 0x40(%r14), %rdi
testq %rdi, %rdi
je 0x9e1da
leaq 0x2e9ef4(%rip), %rax # 0x3880c0
movq (%rax), %rax
callq *0x48(%rax)
movq $0x0, 0x40(%r14)
movq %r14, %rdi
callq 0x290c0
movq (%rbx), %rdi
callq 0xa0f0a
movq $0x0, (%rbx)
popq %rbx
popq %r14
popq %rbp
retq
| my_bitmap_free:
push rbp
mov rbp, rsp
push r14
push rbx
mov rbx, rdi
mov rdi, [rdi]
test rdi, rdi
jz short loc_9E1F1
mov r14, [rbx+10h]
test r14, r14
jz short loc_9E1E5
mov rdi, [r14+40h]
test rdi, rdi
jz short loc_9E1DA
lea rax, PSI_server
mov rax, [rax]
call qword ptr [rax+48h]
mov qword ptr [r14+40h], 0
loc_9E1DA:
mov rdi, r14
call _pthread_mutex_destroy
mov rdi, [rbx]
loc_9E1E5:
call my_free
mov qword ptr [rbx], 0
loc_9E1F1:
pop rbx
pop r14
pop rbp
retn
| long long my_bitmap_free(long long *a1)
{
long long v2; // rdi
long long v3; // r14
long long result; // rax
v2 = *a1;
if ( v2 )
{
v3 = a1[2];
if ( v3 )
{
if ( *(_QWORD *)(v3 + 64) )
{
PSI_server[9]();
*(_QWORD *)(v3 + 64) = 0LL;
}
pthread_mutex_destroy(v3);
v2 = *a1;
}
result = my_free(v2);
*a1 = 0LL;
}
return result;
}
| my_bitmap_free:
PUSH RBP
MOV RBP,RSP
PUSH R14
PUSH RBX
MOV RBX,RDI
MOV RDI,qword ptr [RDI]
TEST RDI,RDI
JZ 0x0019e1f1
MOV R14,qword ptr [RBX + 0x10]
TEST R14,R14
JZ 0x0019e1e5
MOV RDI,qword ptr [R14 + 0x40]
TEST RDI,RDI
JZ 0x0019e1da
LEA RAX,[0x4880c0]
MOV RAX,qword ptr [RAX]
CALL qword ptr [RAX + 0x48]
MOV qword ptr [R14 + 0x40],0x0
LAB_0019e1da:
MOV RDI,R14
CALL 0x001290c0
MOV RDI,qword ptr [RBX]
LAB_0019e1e5:
CALL 0x001a0f0a
MOV qword ptr [RBX],0x0
LAB_0019e1f1:
POP RBX
POP R14
POP RBP
RET
|
void my_bitmap_free(long *param_1)
{
pthread_mutex_t *__mutex;
long lVar1;
lVar1 = *param_1;
if (lVar1 != 0) {
__mutex = (pthread_mutex_t *)param_1[2];
if (__mutex != (pthread_mutex_t *)0x0) {
if (*(long *)((long)__mutex + 0x40) != 0) {
(**(code **)(PSI_server + 0x48))();
*(int8 *)((long)__mutex + 0x40) = 0;
}
pthread_mutex_destroy(__mutex);
lVar1 = *param_1;
}
my_free(lVar1);
*param_1 = 0;
}
return;
}
|
|
6,394 | my_getcputime | eloqsql/mysys/my_getsystime.c | ulonglong my_getcputime()
{
#ifdef CLOCK_THREAD_CPUTIME_ID
struct timespec tp;
if (clock_gettime(CLOCK_THREAD_CPUTIME_ID, &tp))
return 0;
return (ulonglong)tp.tv_sec*10000000+(ulonglong)tp.tv_nsec/100;
#elif defined(__NR_clock_gettime)
struct timespec tp;
if (syscall(__NR_clock_gettime, CLOCK_THREAD_CPUTIME_ID, &tp))
return 0;
return (ulonglong)tp.tv_sec*10000000+(ulonglong)tp.tv_nsec/100;
#endif /* CLOCK_THREAD_CPUTIME_ID */
return 0;
} | O3 | c | my_getcputime:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
leaq -0x10(%rbp), %rsi
movl $0x3, %edi
callq 0x262e0
testl %eax, %eax
je 0x4580c
xorl %eax, %eax
jmp 0x45833
imulq $0x989680, -0x10(%rbp), %rcx # imm = 0x989680
movq -0x8(%rbp), %rax
shrq $0x2, %rax
movabsq $0x28f5c28f5c28f5c3, %rdx # imm = 0x28F5C28F5C28F5C3
mulq %rdx
movq %rdx, %rax
shrq $0x2, %rax
addq %rcx, %rax
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax)
| my_getcputime:
push rbp
mov rbp, rsp
sub rsp, 10h
lea rsi, [rbp+var_10]
mov edi, 3
call _clock_gettime
test eax, eax
jz short loc_4580C
xor eax, eax
jmp short loc_45833
loc_4580C:
imul rcx, [rbp+var_10], 989680h
mov rax, [rbp+var_8]
shr rax, 2
mov rdx, 28F5C28F5C28F5C3h
mul rdx
mov rax, rdx
shr rax, 2
add rax, rcx
loc_45833:
add rsp, 10h
pop rbp
retn
| unsigned long long my_getcputime()
{
long long v1; // [rsp+0h] [rbp-10h] BYREF
unsigned long long v2; // [rsp+8h] [rbp-8h]
if ( (unsigned int)clock_gettime(3LL, &v1) )
return 0LL;
else
return 10000000 * v1 + v2 / 0x64;
}
| my_getcputime:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x10
LEA RSI,[RBP + -0x10]
MOV EDI,0x3
CALL 0x001262e0
TEST EAX,EAX
JZ 0x0014580c
XOR EAX,EAX
JMP 0x00145833
LAB_0014580c:
IMUL RCX,qword ptr [RBP + -0x10],0x989680
MOV RAX,qword ptr [RBP + -0x8]
SHR RAX,0x2
MOV RDX,0x28f5c28f5c28f5c3
MUL RDX
MOV RAX,RDX
SHR RAX,0x2
ADD RAX,RCX
LAB_00145833:
ADD RSP,0x10
POP RBP
RET
|
long my_getcputime(void)
{
int iVar1;
long lVar2;
timespec local_18;
iVar1 = clock_gettime(3,&local_18);
if (iVar1 == 0) {
lVar2 = (ulong)local_18.tv_nsec / 100 + local_18.tv_sec * 10000000;
}
else {
lVar2 = 0;
}
return lVar2;
}
|
|
6,395 | Trie::SearchAnyRecursive(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, int, Trie::TrieNode*, int const*, int) | MikePodsytnik[P]TCRtrie/src/Trie.cpp | bool Trie::SearchAnyRecursive(const std::string &query, int maxEdits,
TrieNode* node, const int* prevRow, int queryLength) {
int currentRow[maxQueryLength_ + 1];
memcpy(currentRow, prevRow, sizeof(int) * (queryLength + 1));
if (!node->patternsIndices.empty() && currentRow[queryLength] <= maxEdits) {
for (int patternIndex : node->patternsIndices) {
return true;
}
}
int minVal = *std::min_element(currentRow, currentRow + queryLength + 1);
if (minVal > maxEdits) return false;
for (int i = 0; i < node->children.size(); ++i) {
TrieNode* child = node->children[i];
if (child == nullptr) continue;
char letter = 'A' + i;
int nextRow[maxQueryLength_ + 1];
nextRow[0] = currentRow[0] + 1;
for (int j = 1; j <= queryLength; ++j) {
int cost = (query[j - 1] == letter) ? 0 : 1;
nextRow[j] = std::min({
currentRow[j] + 1,
nextRow[j - 1] + 1,
currentRow[j - 1] + cost
});
}
if (SearchAnyRecursive(query, maxEdits, child, nextRow, queryLength)) {
return true;
}
}
return false;
} | O0 | cpp | Trie::SearchAnyRecursive(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, int, Trie::TrieNode*, int const*, int):
pushq %rbp
movq %rsp, %rbp
subq $0xe0, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movl %edx, -0x1c(%rbp)
movq %rcx, -0x28(%rbp)
movq %r8, -0x30(%rbp)
movl %r9d, -0x34(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0xc8(%rbp)
movl 0xc(%rax), %eax
incl %eax
movq %rsp, %rcx
movq %rcx, -0x40(%rbp)
leaq 0xf(,%rax,4), %rcx
andq $-0x10, %rcx
movq %rsp, %rdi
subq %rcx, %rdi
movq %rdi, -0xc0(%rbp)
movq %rdi, %rsp
movq %rax, -0x48(%rbp)
movq -0x30(%rbp), %rsi
movl -0x34(%rbp), %eax
addl $0x1, %eax
movslq %eax, %rdx
shlq $0x2, %rdx
callq 0x94e0
movq -0x28(%rbp), %rdi
addq $0xf0, %rdi
callq 0x5a390
testb $0x1, %al
jne 0x54301
movq -0xc0(%rbp), %rax
movslq -0x34(%rbp), %rcx
movl (%rax,%rcx,4), %eax
cmpl -0x1c(%rbp), %eax
jg 0x54301
movq -0x28(%rbp), %rax
addq $0xf0, %rax
movq %rax, -0x50(%rbp)
movq -0x50(%rbp), %rdi
callq 0x5a3d0
movq %rax, -0x58(%rbp)
movq -0x50(%rbp), %rdi
callq 0x5a400
movq %rax, -0x60(%rbp)
leaq -0x58(%rbp), %rdi
leaq -0x60(%rbp), %rsi
callq 0x5a430
testb $0x1, %al
jne 0x542e1
jmp 0x542ff
leaq -0x58(%rbp), %rdi
callq 0x5a470
movl (%rax), %eax
movl %eax, -0x64(%rbp)
movb $0x1, -0x1(%rbp)
movl $0x1, -0x68(%rbp)
jmp 0x54539
jmp 0x54301
movq -0xc0(%rbp), %rdi
movslq -0x34(%rbp), %rax
shlq $0x2, %rax
movq %rdi, %rsi
addq %rax, %rsi
addq $0x4, %rsi
callq 0x5a580
movl (%rax), %eax
movl %eax, -0x6c(%rbp)
movl -0x6c(%rbp), %eax
cmpl -0x1c(%rbp), %eax
jle 0x5433c
movb $0x0, -0x1(%rbp)
movl $0x1, -0x68(%rbp)
jmp 0x54539
movl $0x0, -0x70(%rbp)
movslq -0x70(%rbp), %rax
movq %rax, -0xd0(%rbp)
movq -0x28(%rbp), %rdi
callq 0x5a5c0
movq %rax, %rcx
movq -0xd0(%rbp), %rax
cmpq %rcx, %rax
jae 0x5452e
movq -0x28(%rbp), %rdi
movslq -0x70(%rbp), %rsi
callq 0x5a5d0
movq (%rax), %rax
movq %rax, -0x78(%rbp)
cmpq $0x0, -0x78(%rbp)
jne 0x5438a
jmp 0x54520
movq -0xc0(%rbp), %rcx
movq -0xc8(%rbp), %rax
movb -0x70(%rbp), %dl
addb $0x41, %dl
movb %dl, -0x79(%rbp)
movl 0xc(%rax), %eax
incl %eax
movl %eax, %edx
movq %rsp, %rax
movq %rax, -0x88(%rbp)
leaq 0xf(,%rdx,4), %rsi
andq $-0x10, %rsi
movq %rsp, %rax
subq %rsi, %rax
movq %rax, -0xd8(%rbp)
movq %rax, %rsp
movq %rdx, -0x90(%rbp)
movl (%rcx), %ecx
addl $0x1, %ecx
movl %ecx, (%rax)
movl $0x1, -0x94(%rbp)
movl -0x94(%rbp), %eax
cmpl -0x34(%rbp), %eax
jg 0x544cf
movq -0x18(%rbp), %rdi
movl -0x94(%rbp), %eax
subl $0x1, %eax
movslq %eax, %rsi
callq 0x96c0
movq -0xd8(%rbp), %rcx
movq %rax, %rdx
movq -0xc0(%rbp), %rax
movsbl (%rdx), %edi
movsbl -0x79(%rbp), %r8d
movl $0x1, %edx
xorl %esi, %esi
cmpl %r8d, %edi
cmovel %esi, %edx
movl %edx, -0x98(%rbp)
movslq -0x94(%rbp), %rdx
movl (%rax,%rdx,4), %edx
addl $0x1, %edx
movl %edx, -0xb4(%rbp)
movl -0x94(%rbp), %edx
subl $0x1, %edx
movslq %edx, %rdx
movl (%rcx,%rdx,4), %ecx
addl $0x1, %ecx
movl %ecx, -0xb0(%rbp)
movl -0x94(%rbp), %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
movl (%rax,%rcx,4), %eax
addl -0x98(%rbp), %eax
movl %eax, -0xac(%rbp)
leaq -0xb4(%rbp), %rax
movq %rax, -0xa8(%rbp)
movq $0x3, -0xa0(%rbp)
movq -0xa8(%rbp), %rdi
movq -0xa0(%rbp), %rsi
callq 0x5a600
movl %eax, %edx
movq -0xd8(%rbp), %rax
movslq -0x94(%rbp), %rcx
movl %edx, (%rax,%rcx,4)
movl -0x94(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x94(%rbp)
jmp 0x543e6
movq -0xd8(%rbp), %r8
movq -0xc8(%rbp), %rdi
movq -0x18(%rbp), %rsi
movl -0x1c(%rbp), %edx
movq -0x78(%rbp), %rcx
movl -0x34(%rbp), %r9d
callq 0x54210
testb $0x1, %al
jne 0x544f7
jmp 0x54504
movb $0x1, -0x1(%rbp)
movl $0x1, -0x68(%rbp)
jmp 0x5450b
movl $0x0, -0x68(%rbp)
movq -0x88(%rbp), %rax
movq %rax, %rsp
movl -0x68(%rbp), %eax
testl %eax, %eax
jne 0x54539
jmp 0x5451e
jmp 0x54520
movl -0x70(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x70(%rbp)
jmp 0x54343
movb $0x0, -0x1(%rbp)
movl $0x1, -0x68(%rbp)
movq -0x40(%rbp), %rax
movq %rax, %rsp
movb -0x1(%rbp), %al
andb $0x1, %al
movq %rbp, %rsp
popq %rbp
retq
nopw (%rax,%rax)
| _ZN4Trie18SearchAnyRecursiveERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEiPNS_8TrieNodeEPKii:
push rbp
mov rbp, rsp
sub rsp, 0E0h
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov [rbp+var_1C], edx
mov [rbp+var_28], rcx
mov [rbp+var_30], r8
mov [rbp+var_34], r9d
mov rax, [rbp+var_10]
mov [rbp+var_C8], rax
mov eax, [rax+0Ch]
inc eax
mov rcx, rsp
mov [rbp+var_40], rcx
lea rcx, ds:0Fh[rax*4]
and rcx, 0FFFFFFFFFFFFFFF0h
mov rdi, rsp
sub rdi, rcx
mov [rbp+var_C0], rdi
mov rsp, rdi
mov [rbp+var_48], rax
mov rsi, [rbp+var_30]
mov eax, [rbp+var_34]
add eax, 1
movsxd rdx, eax
shl rdx, 2
call _memcpy
mov rdi, [rbp+var_28]
add rdi, 0F0h
call _ZNKSt6vectorIiSaIiEE5emptyEv; std::vector<int>::empty(void)
test al, 1
jnz short loc_54301
mov rax, [rbp+var_C0]
movsxd rcx, [rbp+var_34]
mov eax, [rax+rcx*4]
cmp eax, [rbp+var_1C]
jg short loc_54301
mov rax, [rbp+var_28]
add rax, 0F0h
mov [rbp+var_50], rax
mov rdi, [rbp+var_50]
call _ZNSt6vectorIiSaIiEE5beginEv; std::vector<int>::begin(void)
mov [rbp+var_58], rax
mov rdi, [rbp+var_50]
call _ZNSt6vectorIiSaIiEE3endEv; std::vector<int>::end(void)
mov [rbp+var_60], rax
lea rdi, [rbp+var_58]
lea rsi, [rbp+var_60]
call _ZN9__gnu_cxxneIPiSt6vectorIiSaIiEEEEbRKNS_17__normal_iteratorIT_T0_EESA_; __gnu_cxx::operator!=<int *,std::vector<int>>(__gnu_cxx::__normal_iterator<int *,std::vector<int>> const&,__gnu_cxx::__normal_iterator<int *,std::vector<int>> const&)
test al, 1
jnz short loc_542E1
jmp short loc_542FF
loc_542E1:
lea rdi, [rbp+var_58]
call _ZNK9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEdeEv; __gnu_cxx::__normal_iterator<int *,std::vector<int>>::operator*(void)
mov eax, [rax]
mov [rbp+var_64], eax
mov [rbp+var_1], 1
mov [rbp+var_68], 1
jmp loc_54539
loc_542FF:
jmp short $+2
loc_54301:
mov rdi, [rbp+var_C0]
movsxd rax, [rbp+var_34]
shl rax, 2
mov rsi, rdi
add rsi, rax
add rsi, 4
call _ZSt11min_elementIPiET_S1_S1_; std::min_element<int *>(int *,int *)
mov eax, [rax]
mov [rbp+var_6C], eax
mov eax, [rbp+var_6C]
cmp eax, [rbp+var_1C]
jle short loc_5433C
mov [rbp+var_1], 0
mov [rbp+var_68], 1
jmp loc_54539
loc_5433C:
mov [rbp+var_70], 0
loc_54343:
movsxd rax, [rbp+var_70]
mov [rbp+var_D0], rax
mov rdi, [rbp+var_28]
call _ZNKSt5arrayIPN4Trie8TrieNodeELm30EE4sizeEv; std::array<Trie::TrieNode *,30ul>::size(void)
mov rcx, rax
mov rax, [rbp+var_D0]
cmp rax, rcx
jnb loc_5452E
mov rdi, [rbp+var_28]
movsxd rsi, [rbp+var_70]
call _ZNSt5arrayIPN4Trie8TrieNodeELm30EEixEm; std::array<Trie::TrieNode *,30ul>::operator[](ulong)
mov rax, [rax]
mov [rbp+var_78], rax
cmp [rbp+var_78], 0
jnz short loc_5438A
jmp loc_54520
loc_5438A:
mov rcx, [rbp+var_C0]
mov rax, [rbp+var_C8]
mov dl, byte ptr [rbp+var_70]
add dl, 41h ; 'A'
mov [rbp+var_79], dl
mov eax, [rax+0Ch]
inc eax
mov edx, eax
mov rax, rsp
mov [rbp+var_88], rax
lea rsi, ds:0Fh[rdx*4]
and rsi, 0FFFFFFFFFFFFFFF0h
mov rax, rsp
sub rax, rsi
mov [rbp+var_D8], rax
mov rsp, rax
mov [rbp+var_90], rdx
mov ecx, [rcx]
add ecx, 1
mov [rax], ecx
mov [rbp+var_94], 1
loc_543E6:
mov eax, [rbp+var_94]
cmp eax, [rbp+var_34]
jg loc_544CF
mov rdi, [rbp+var_18]
mov eax, [rbp+var_94]
sub eax, 1
movsxd rsi, eax
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm; std::string::operator[](ulong)
mov rcx, [rbp+var_D8]
mov rdx, rax
mov rax, [rbp+var_C0]
movsx edi, byte ptr [rdx]
movsx r8d, [rbp+var_79]
mov edx, 1
xor esi, esi
cmp edi, r8d
cmovz edx, esi
mov [rbp+var_98], edx
movsxd rdx, [rbp+var_94]
mov edx, [rax+rdx*4]
add edx, 1
mov [rbp+var_B4], edx
mov edx, [rbp+var_94]
sub edx, 1
movsxd rdx, edx
mov ecx, [rcx+rdx*4]
add ecx, 1
mov [rbp+var_B0], ecx
mov ecx, [rbp+var_94]
sub ecx, 1
movsxd rcx, ecx
mov eax, [rax+rcx*4]
add eax, [rbp+var_98]
mov [rbp+var_AC], eax
lea rax, [rbp+var_B4]
mov [rbp+var_A8], rax
mov [rbp+var_A0], 3
mov rdi, [rbp+var_A8]
mov rsi, [rbp+var_A0]
call _ZSt3minIiET_St16initializer_listIS0_E; std::min<int>(std::initializer_list<int>)
mov edx, eax
mov rax, [rbp+var_D8]
movsxd rcx, [rbp+var_94]
mov [rax+rcx*4], edx
mov eax, [rbp+var_94]
add eax, 1
mov [rbp+var_94], eax
jmp loc_543E6
loc_544CF:
mov r8, [rbp+var_D8]
mov rdi, [rbp+var_C8]
mov rsi, [rbp+var_18]
mov edx, [rbp+var_1C]
mov rcx, [rbp+var_78]
mov r9d, [rbp+var_34]
call _ZN4Trie18SearchAnyRecursiveERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEiPNS_8TrieNodeEPKii; Trie::SearchAnyRecursive(std::string const&,int,Trie::TrieNode *,int const*,int)
test al, 1
jnz short loc_544F7
jmp short loc_54504
loc_544F7:
mov [rbp+var_1], 1
mov [rbp+var_68], 1
jmp short loc_5450B
loc_54504:
mov [rbp+var_68], 0
loc_5450B:
mov rax, [rbp+var_88]
mov rsp, rax
mov eax, [rbp+var_68]
test eax, eax
jnz short loc_54539
jmp short $+2
loc_5451E:
jmp short $+2
loc_54520:
mov eax, [rbp+var_70]
add eax, 1
mov [rbp+var_70], eax
jmp loc_54343
loc_5452E:
mov [rbp+var_1], 0
mov [rbp+var_68], 1
loc_54539:
mov rax, [rbp+var_40]
mov rsp, rax
mov al, [rbp+var_1]
and al, 1
mov rsp, rbp
pop rbp
retn
| // bad sp value at call has been detected, the output may be wrong!
char Trie::SearchAnyRecursive(long long a1, long long a2, int a3, long long a4, long long a5, int a6)
{
long long v6; // rax
unsigned long long v7; // rax
long long v8; // rdx
char *v9; // rax
BOOL v10; // edx
int v11; // eax
long long v13; // [rsp+0h] [rbp-E0h] BYREF
_DWORD *v14; // [rsp+8h] [rbp-D8h]
unsigned long long v15; // [rsp+10h] [rbp-D0h]
long long v16; // [rsp+18h] [rbp-C8h]
_DWORD *v17; // [rsp+20h] [rbp-C0h]
_DWORD v18[3]; // [rsp+2Ch] [rbp-B4h] BYREF
_DWORD *v19; // [rsp+38h] [rbp-A8h]
long long v20; // [rsp+40h] [rbp-A0h]
BOOL v21; // [rsp+48h] [rbp-98h]
int j; // [rsp+4Ch] [rbp-94h]
long long v23; // [rsp+50h] [rbp-90h]
long long *v24; // [rsp+58h] [rbp-88h]
char v25; // [rsp+67h] [rbp-79h]
long long v26; // [rsp+68h] [rbp-78h]
int i; // [rsp+70h] [rbp-70h]
int v28; // [rsp+74h] [rbp-6Ch]
int v29; // [rsp+78h] [rbp-68h]
int v30; // [rsp+7Ch] [rbp-64h]
long long v31; // [rsp+80h] [rbp-60h] BYREF
long long v32; // [rsp+88h] [rbp-58h] BYREF
long long v33; // [rsp+90h] [rbp-50h]
long long v34; // [rsp+98h] [rbp-48h]
long long *v35; // [rsp+A0h] [rbp-40h]
int v36; // [rsp+ACh] [rbp-34h]
long long v37; // [rsp+B0h] [rbp-30h]
long long v38; // [rsp+B8h] [rbp-28h]
signed int v39; // [rsp+C4h] [rbp-1Ch]
long long v40; // [rsp+C8h] [rbp-18h]
long long v41; // [rsp+D0h] [rbp-10h]
char v42; // [rsp+DFh] [rbp-1h]
long long savedregs; // [rsp+E0h] [rbp+0h] BYREF
v41 = a1;
v40 = a2;
v39 = a3;
v38 = a4;
v37 = a5;
v36 = a6;
v16 = a1;
v6 = (unsigned int)(*(_DWORD *)(a1 + 12) + 1);
v35 = &v13;
v17 = (_DWORD *)((char *)&v13 - ((4 * v6 + 15) & 0xFFFFFFFFFFFFFFF0LL));
v34 = v6;
memcpy(v17, a5, 4LL * (a6 + 1));
if ( (std::vector<int>::empty(v38 + 240) & 1) != 0
|| v17[v36] > v39
|| (v33 = v38 + 240,
v32 = std::vector<int>::begin(v38 + 240),
v31 = std::vector<int>::end(v33),
(__gnu_cxx::operator!=<int *,std::vector<int>>(&v32, &v31) & 1) == 0) )
{
v28 = *(_DWORD *)std::min_element<int *>(v17, &v17[v36 + 1]);
if ( v28 <= v39 )
{
for ( i = 0; ; ++i )
{
v15 = i;
v7 = std::array<Trie::TrieNode *,30ul>::size(v38);
if ( v15 >= v7 )
break;
v26 = *(_QWORD *)std::array<Trie::TrieNode *,30ul>::operator[](v38, i);
if ( v26 )
{
v25 = i + 65;
v8 = (unsigned int)(*(_DWORD *)(v16 + 12) + 1);
v24 = &savedregs;
v14 = (_DWORD *)((char *)&savedregs - ((4 * v8 + 15) & 0xFFFFFFFFFFFFFFF0LL));
v23 = v8;
*v14 = *v17 + 1;
for ( j = 1; j <= v36; ++j )
{
v9 = (char *)std::string::operator[](v40, j - 1);
v10 = *v9 != v25;
v21 = v10;
v18[0] = v17[j] + 1;
v18[1] = v14[j - 1] + 1;
v18[2] = v10 + v17[j - 1];
v19 = v18;
v20 = 3LL;
v11 = std::min<int>(v18, 3LL);
v14[j] = v11;
}
if ( (Trie::SearchAnyRecursive(v16, v40, (unsigned int)v39, v26, v14, (unsigned int)v36) & 1) != 0 )
{
v42 = 1;
v29 = 1;
}
else
{
v29 = 0;
}
if ( v29 )
return v42 & 1;
}
}
v42 = 0;
v29 = 1;
}
else
{
v42 = 0;
v29 = 1;
}
}
else
{
v30 = *(_DWORD *)__gnu_cxx::__normal_iterator<int *,std::vector<int>>::operator*(&v32);
v42 = 1;
v29 = 1;
}
return v42 & 1;
}
| SearchAnyRecursive:
PUSH RBP
MOV RBP,RSP
SUB RSP,0xe0
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x18],RSI
MOV dword ptr [RBP + -0x1c],EDX
MOV qword ptr [RBP + -0x28],RCX
MOV qword ptr [RBP + -0x30],R8
MOV dword ptr [RBP + -0x34],R9D
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RBP + -0xc8],RAX
MOV EAX,dword ptr [RAX + 0xc]
INC EAX
MOV RCX,RSP
MOV qword ptr [RBP + -0x40],RCX
LEA RCX,[0xf + RAX*0x4]
AND RCX,-0x10
MOV RDI,RSP
SUB RDI,RCX
MOV qword ptr [RBP + -0xc0],RDI
MOV RSP,RDI
MOV qword ptr [RBP + -0x48],RAX
MOV RSI,qword ptr [RBP + -0x30]
MOV EAX,dword ptr [RBP + -0x34]
ADD EAX,0x1
MOVSXD RDX,EAX
SHL RDX,0x2
CALL 0x001094e0
MOV RDI,qword ptr [RBP + -0x28]
ADD RDI,0xf0
CALL 0x0015a390
TEST AL,0x1
JNZ 0x00154301
MOV RAX,qword ptr [RBP + -0xc0]
MOVSXD RCX,dword ptr [RBP + -0x34]
MOV EAX,dword ptr [RAX + RCX*0x4]
CMP EAX,dword ptr [RBP + -0x1c]
JG 0x00154301
MOV RAX,qword ptr [RBP + -0x28]
ADD RAX,0xf0
MOV qword ptr [RBP + -0x50],RAX
MOV RDI,qword ptr [RBP + -0x50]
CALL 0x0015a3d0
MOV qword ptr [RBP + -0x58],RAX
MOV RDI,qword ptr [RBP + -0x50]
CALL 0x0015a400
MOV qword ptr [RBP + -0x60],RAX
LEA RDI,[RBP + -0x58]
LEA RSI,[RBP + -0x60]
CALL 0x0015a430
TEST AL,0x1
JNZ 0x001542e1
JMP 0x001542ff
LAB_001542e1:
LEA RDI,[RBP + -0x58]
CALL 0x0015a470
MOV EAX,dword ptr [RAX]
MOV dword ptr [RBP + -0x64],EAX
MOV byte ptr [RBP + -0x1],0x1
MOV dword ptr [RBP + -0x68],0x1
JMP 0x00154539
LAB_001542ff:
JMP 0x00154301
LAB_00154301:
MOV RDI,qword ptr [RBP + -0xc0]
MOVSXD RAX,dword ptr [RBP + -0x34]
SHL RAX,0x2
MOV RSI,RDI
ADD RSI,RAX
ADD RSI,0x4
CALL 0x0015a580
MOV EAX,dword ptr [RAX]
MOV dword ptr [RBP + -0x6c],EAX
MOV EAX,dword ptr [RBP + -0x6c]
CMP EAX,dword ptr [RBP + -0x1c]
JLE 0x0015433c
MOV byte ptr [RBP + -0x1],0x0
MOV dword ptr [RBP + -0x68],0x1
JMP 0x00154539
LAB_0015433c:
MOV dword ptr [RBP + -0x70],0x0
LAB_00154343:
MOVSXD RAX,dword ptr [RBP + -0x70]
MOV qword ptr [RBP + -0xd0],RAX
MOV RDI,qword ptr [RBP + -0x28]
CALL 0x0015a5c0
MOV RCX,RAX
MOV RAX,qword ptr [RBP + -0xd0]
CMP RAX,RCX
JNC 0x0015452e
MOV RDI,qword ptr [RBP + -0x28]
MOVSXD RSI,dword ptr [RBP + -0x70]
CALL 0x0015a5d0
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x78],RAX
CMP qword ptr [RBP + -0x78],0x0
JNZ 0x0015438a
JMP 0x00154520
LAB_0015438a:
MOV RCX,qword ptr [RBP + -0xc0]
MOV RAX,qword ptr [RBP + -0xc8]
MOV DL,byte ptr [RBP + -0x70]
ADD DL,0x41
MOV byte ptr [RBP + -0x79],DL
MOV EAX,dword ptr [RAX + 0xc]
INC EAX
MOV EDX,EAX
MOV RAX,RSP
MOV qword ptr [RBP + -0x88],RAX
LEA RSI,[0xf + RDX*0x4]
AND RSI,-0x10
MOV RAX,RSP
SUB RAX,RSI
MOV qword ptr [RBP + -0xd8],RAX
MOV RSP,RAX
MOV qword ptr [RBP + -0x90],RDX
MOV ECX,dword ptr [RCX]
ADD ECX,0x1
MOV dword ptr [RAX],ECX
MOV dword ptr [RBP + -0x94],0x1
LAB_001543e6:
MOV EAX,dword ptr [RBP + -0x94]
CMP EAX,dword ptr [RBP + -0x34]
JG 0x001544cf
MOV RDI,qword ptr [RBP + -0x18]
MOV EAX,dword ptr [RBP + -0x94]
SUB EAX,0x1
MOVSXD RSI,EAX
CALL 0x001096c0
MOV RCX,qword ptr [RBP + -0xd8]
MOV RDX,RAX
MOV RAX,qword ptr [RBP + -0xc0]
MOVSX EDI,byte ptr [RDX]
MOVSX R8D,byte ptr [RBP + -0x79]
MOV EDX,0x1
XOR ESI,ESI
CMP EDI,R8D
CMOVZ EDX,ESI
MOV dword ptr [RBP + -0x98],EDX
MOVSXD RDX,dword ptr [RBP + -0x94]
MOV EDX,dword ptr [RAX + RDX*0x4]
ADD EDX,0x1
MOV dword ptr [RBP + -0xb4],EDX
MOV EDX,dword ptr [RBP + -0x94]
SUB EDX,0x1
MOVSXD RDX,EDX
MOV ECX,dword ptr [RCX + RDX*0x4]
ADD ECX,0x1
MOV dword ptr [RBP + -0xb0],ECX
MOV ECX,dword ptr [RBP + -0x94]
SUB ECX,0x1
MOVSXD RCX,ECX
MOV EAX,dword ptr [RAX + RCX*0x4]
ADD EAX,dword ptr [RBP + -0x98]
MOV dword ptr [RBP + -0xac],EAX
LEA RAX,[RBP + -0xb4]
MOV qword ptr [RBP + -0xa8],RAX
MOV qword ptr [RBP + -0xa0],0x3
MOV RDI,qword ptr [RBP + -0xa8]
MOV RSI,qword ptr [RBP + -0xa0]
CALL 0x0015a600
MOV EDX,EAX
MOV RAX,qword ptr [RBP + -0xd8]
MOVSXD RCX,dword ptr [RBP + -0x94]
MOV dword ptr [RAX + RCX*0x4],EDX
MOV EAX,dword ptr [RBP + -0x94]
ADD EAX,0x1
MOV dword ptr [RBP + -0x94],EAX
JMP 0x001543e6
LAB_001544cf:
MOV R8,qword ptr [RBP + -0xd8]
MOV RDI,qword ptr [RBP + -0xc8]
MOV RSI,qword ptr [RBP + -0x18]
MOV EDX,dword ptr [RBP + -0x1c]
MOV RCX,qword ptr [RBP + -0x78]
MOV R9D,dword ptr [RBP + -0x34]
CALL 0x00154210
TEST AL,0x1
JNZ 0x001544f7
JMP 0x00154504
LAB_001544f7:
MOV byte ptr [RBP + -0x1],0x1
MOV dword ptr [RBP + -0x68],0x1
JMP 0x0015450b
LAB_00154504:
MOV dword ptr [RBP + -0x68],0x0
LAB_0015450b:
MOV RAX,qword ptr [RBP + -0x88]
MOV RSP,RAX
MOV EAX,dword ptr [RBP + -0x68]
TEST EAX,EAX
JNZ 0x00154539
JMP 0x0015451e
LAB_0015451e:
JMP 0x00154520
LAB_00154520:
MOV EAX,dword ptr [RBP + -0x70]
ADD EAX,0x1
MOV dword ptr [RBP + -0x70],EAX
JMP 0x00154343
LAB_0015452e:
MOV byte ptr [RBP + -0x1],0x0
MOV dword ptr [RBP + -0x68],0x1
LAB_00154539:
MOV RAX,qword ptr [RBP + -0x40]
MOV RSP,RAX
MOV AL,byte ptr [RBP + -0x1]
AND AL,0x1
MOV RSP,RBP
POP RBP
RET
|
/* Trie::SearchAnyRecursive(std::__cxx11::string const&, int, Trie::TrieNode*, int const*, int) */
ulong __thiscall
Trie::SearchAnyRecursive
(Trie *this,string *param_1,int param_2,TrieNode *param_3,int *param_4,int param_5)
{
long lVar1;
Trie *this_00;
TrieNode *pTVar2;
int iVar3;
string *psVar4;
bool bVar5;
int iVar6;
ulong uVar7;
int *piVar8;
long *plVar9;
char *pcVar10;
int *piVar11;
int *piVar12;
vector<int,std::allocator<int>> *pvVar13;
int8 uStack_f0;
int aiStack_e8 [2];
int *local_e0;
ulong local_d8;
Trie *local_d0;
int *local_c8;
int local_bc;
int local_b8;
int local_b4;
int *local_b0;
int8 local_a8;
uint local_a0;
int local_9c;
ulong local_98;
int1 *local_90;
char local_81;
TrieNode *local_80;
int local_78;
int local_74;
uint local_70;
int8 local_68;
int8 local_60;
vector<int,std::allocator<int>> *local_58;
ulong local_50;
int1 *local_48;
int local_3c;
int *local_38;
TrieNode *local_30;
int local_24;
string *local_20;
Trie *local_18;
int1 local_9;
local_48 = (int1 *)aiStack_e8;
local_50 = (ulong)(*(int *)(this + 0xc) + 1);
lVar1 = -(local_50 * 4 + 0xf & 0xfffffffffffffff0);
piVar11 = (int *)((long)aiStack_e8 + lVar1);
local_d0 = this;
local_c8 = piVar11;
local_3c = param_5;
local_38 = param_4;
local_30 = param_3;
local_24 = param_2;
local_20 = param_1;
local_18 = this;
*(int8 *)((long)&uStack_f0 + lVar1) = 0x15427f;
memcpy(piVar11,param_4,(long)(param_5 + 1) << 2);
pvVar13 = (vector<int,std::allocator<int>> *)(local_30 + 0xf0);
*(int8 *)((long)&uStack_f0 + lVar1) = 0x15428f;
uVar7 = std::vector<int,std::allocator<int>>::empty(pvVar13);
if (((uVar7 & 1) == 0) && (local_c8[local_3c] <= local_24)) {
pvVar13 = (vector<int,std::allocator<int>> *)(local_30 + 0xf0);
local_58 = pvVar13;
*(int8 *)((long)&uStack_f0 + lVar1) = 0x1542bd;
local_60 = std::vector<int,std::allocator<int>>::begin(pvVar13);
pvVar13 = local_58;
*(int8 *)((long)&uStack_f0 + lVar1) = 0x1542ca;
local_68 = std::vector<int,std::allocator<int>>::end(pvVar13);
*(int8 *)((long)&uStack_f0 + lVar1) = 0x1542db;
bVar5 = __gnu_cxx::operator!=((__normal_iterator *)&local_60,(__normal_iterator *)&local_68);
if (bVar5) {
*(int8 *)((long)&uStack_f0 + lVar1) = 0x1542ea;
__gnu_cxx::__normal_iterator<int*,std::vector<int,std::allocator<int>>>::operator*
((__normal_iterator<int*,std::vector<int,std::allocator<int>>> *)&local_60);
local_9 = 1;
goto LAB_00154539;
}
}
piVar8 = local_c8;
piVar12 = local_c8 + (long)local_3c + 1;
*(int8 *)((long)&uStack_f0 + lVar1) = 0x15431f;
piVar8 = std::min_element<int*>(piVar8,piVar12);
local_74 = *piVar8;
if (local_24 < local_74) {
local_9 = 0;
}
else {
local_78 = 0;
while( true ) {
local_d8 = (ulong)local_78;
piVar11[-2] = 0x154357;
piVar11[-1] = 0;
uVar7 = std::array<Trie::TrieNode*,30ul>::size();
pTVar2 = local_30;
if (uVar7 <= local_d8) break;
uVar7 = (ulong)local_78;
piVar11[-2] = 0x154377;
piVar11[-1] = 0;
plVar9 = (long *)std::array<Trie::TrieNode*,30ul>::operator[]
((array<Trie::TrieNode*,30ul> *)pTVar2,uVar7);
local_80 = (TrieNode *)*plVar9;
if (local_80 != (TrieNode *)0x0) {
local_81 = (char)local_78 + 'A';
local_98 = (ulong)(*(int *)(local_d0 + 0xc) + 1);
piVar8 = (int *)((long)piVar11 - (local_98 * 4 + 0xf & 0xfffffffffffffff0));
local_e0 = piVar8;
local_90 = (int1 *)piVar11;
*piVar8 = *local_c8 + 1;
for (local_9c = 1; psVar4 = local_20, iVar3 = local_24, iVar6 = local_3c, pTVar2 = local_80,
this_00 = local_d0, piVar11 = local_e0, local_9c <= local_3c; local_9c = local_9c + 1) {
piVar8[-2] = 0x15440a;
piVar8[-1] = 0;
pcVar10 = (char *)std::__cxx11::string::operator[]((ulong)psVar4);
local_a0 = (uint)(*pcVar10 != local_81);
local_bc = local_c8[local_9c] + 1;
local_b8 = local_e0[local_9c + -1] + 1;
local_b4 = local_c8[local_9c + -1] + local_a0;
local_a8 = 3;
local_b0 = &local_bc;
piVar8[-2] = 0x1544a8;
piVar8[-1] = 0;
iVar6 = std::min<int>(&local_bc,3);
local_e0[local_9c] = iVar6;
}
piVar8[-2] = 0x1544f1;
piVar8[-1] = 0;
uVar7 = SearchAnyRecursive(this_00,psVar4,iVar3,pTVar2,piVar11,iVar6);
bVar5 = (uVar7 & 1) != 0;
if (bVar5) {
local_9 = 1;
}
local_70 = (uint)bVar5;
piVar11 = (int *)local_90;
if (local_70 != 0) goto LAB_00154539;
}
local_78 = local_78 + 1;
}
local_9 = 0;
}
LAB_00154539:
return CONCAT71((int7)((ulong)local_48 >> 8),local_9) & 0xffffffffffffff01;
}
|
|
6,396 | Trie::SearchAnyRecursive(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, int, Trie::TrieNode*, int const*, int) | MikePodsytnik[P]TCRtrie/src/Trie.cpp | bool Trie::SearchAnyRecursive(const std::string &query, int maxEdits,
TrieNode* node, const int* prevRow, int queryLength) {
int currentRow[maxQueryLength_ + 1];
memcpy(currentRow, prevRow, sizeof(int) * (queryLength + 1));
if (!node->patternsIndices.empty() && currentRow[queryLength] <= maxEdits) {
for (int patternIndex : node->patternsIndices) {
return true;
}
}
int minVal = *std::min_element(currentRow, currentRow + queryLength + 1);
if (minVal > maxEdits) return false;
for (int i = 0; i < node->children.size(); ++i) {
TrieNode* child = node->children[i];
if (child == nullptr) continue;
char letter = 'A' + i;
int nextRow[maxQueryLength_ + 1];
nextRow[0] = currentRow[0] + 1;
for (int j = 1; j <= queryLength; ++j) {
int cost = (query[j - 1] == letter) ? 0 : 1;
nextRow[j] = std::min({
currentRow[j] + 1,
nextRow[j - 1] + 1,
currentRow[j - 1] + cost
});
}
if (SearchAnyRecursive(query, maxEdits, child, nextRow, queryLength)) {
return true;
}
}
return false;
} | O2 | cpp | Trie::SearchAnyRecursive(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, int, Trie::TrieNode*, int const*, int):
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x58, %rsp
movq %rcx, %r14
movl %edx, -0x2c(%rbp)
movq %rsi, -0x38(%rbp)
movq %rdi, %r12
movl 0xc(%rdi), %eax
incl %eax
movq %rsp, %r15
leaq 0xf(,%rax,4), %rax
andq $-0x10, %rax
subq %rax, %r15
movq %r15, %rsp
movl %r9d, -0x30(%rbp)
movslq %r9d, %rbx
leaq 0x4(,%rbx,4), %rdx
movq %r15, %rdi
movq %r8, %rsi
callq 0x73b0
movq 0xf0(%r14), %rax
movq %r14, -0x58(%rbp)
cmpq 0xf8(%r14), %rax
je 0x22aef
movb $0x1, %dl
movl -0x2c(%rbp), %eax
cmpl %eax, (%r15,%rbx,4)
jle 0x22bff
leaq (%r15,%rbx,4), %rsi
addq $0x4, %rsi
movq %r15, %rdi
callq 0x23dcb
xorl %edx, %edx
movl -0x2c(%rbp), %ecx
cmpl %ecx, (%rax)
jg 0x22bff
movl -0x30(%rbp), %eax
testl %eax, %eax
movl $0x0, %r14d
cmovgl %eax, %r14d
xorl %esi, %esi
movq %r12, -0x50(%rbp)
cmpq $0x1e, %rsi
setne %cl
je 0x22bfd
movq -0x58(%rbp), %rax
movq (%rax,%rsi,8), %rax
testq %rax, %rax
je 0x22bf5
movq %rax, -0x68(%rbp)
movq %rcx, -0x78(%rbp)
movq %rsp, -0x60(%rbp)
movl 0xc(%r12), %eax
incl %eax
movq %rsp, %rcx
leaq 0xf(,%rax,4), %rdx
andq $-0x10, %rdx
movq %rcx, %rbx
subq %rdx, %rbx
movq %rbx, %rsp
negq %rdx
movl (%r15), %eax
incl %eax
movl %eax, (%rcx,%rdx)
movq %rsi, -0x70(%rbp)
leaq 0x41(%rsi), %r13
xorl %r12d, %r12d
cmpq %r12, %r14
je 0x22bc7
movq -0x38(%rbp), %rcx
movq (%rcx), %rcx
movsbq (%rcx,%r12), %rcx
movl %ecx, %ecx
xorl %edx, %edx
cmpq %rcx, %r13
setne %dl
movl 0x4(%r15,%r12,4), %ecx
incl %ecx
movl %ecx, -0x44(%rbp)
incl %eax
movl %eax, -0x40(%rbp)
addl (%r15,%r12,4), %edx
movl %edx, -0x3c(%rbp)
leaq -0x44(%rbp), %rdi
pushq $0x3
popq %rsi
callq 0x23b4a
movl %eax, 0x4(%rbx,%r12,4)
incq %r12
jmp 0x22b80
movq -0x50(%rbp), %r12
movq %r12, %rdi
movq -0x38(%rbp), %rsi
movl -0x2c(%rbp), %edx
movq -0x68(%rbp), %rcx
movq %rbx, %r8
movl -0x30(%rbp), %r9d
callq 0x22a7a
movq -0x60(%rbp), %rsp
testb %al, %al
movq -0x78(%rbp), %rdx
movq -0x70(%rbp), %rsi
jne 0x22bff
incq %rsi
jmp 0x22b21
xorl %edx, %edx
movl %edx, %eax
leaq -0x28(%rbp), %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| _ZN4Trie18SearchAnyRecursiveERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEiPNS_8TrieNodeEPKii:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 58h
mov r14, rcx
mov [rbp+var_2C], edx
mov [rbp+var_38], rsi
mov r12, rdi
mov eax, [rdi+0Ch]
inc eax
mov r15, rsp
lea rax, ds:0Fh[rax*4]
and rax, 0FFFFFFFFFFFFFFF0h
sub r15, rax
mov rsp, r15
mov [rbp+var_30], r9d
movsxd rbx, r9d
lea rdx, ds:4[rbx*4]
mov rdi, r15
mov rsi, r8
call _memcpy
mov rax, [r14+0F0h]
mov [rbp+var_58], r14
cmp rax, [r14+0F8h]
jz short loc_22AEF
mov dl, 1
mov eax, [rbp+var_2C]
cmp [r15+rbx*4], eax
jle loc_22BFF
loc_22AEF:
lea rsi, [r15+rbx*4]
add rsi, 4
mov rdi, r15
call _ZSt13__min_elementIPiN9__gnu_cxx5__ops15_Iter_less_iterEET_S4_S4_T0_; std::__min_element<int *,__gnu_cxx::__ops::_Iter_less_iter>(int *,int *,__gnu_cxx::__ops::_Iter_less_iter)
xor edx, edx
mov ecx, [rbp+var_2C]
cmp [rax], ecx
jg loc_22BFF
mov eax, [rbp+var_30]
test eax, eax
mov r14d, 0
cmovg r14d, eax
xor esi, esi
mov [rbp+var_50], r12
loc_22B21:
cmp rsi, 1Eh
setnz cl
jz loc_22BFD
mov rax, [rbp+var_58]
mov rax, [rax+rsi*8]
test rax, rax
jz loc_22BF5
mov [rbp+var_68], rax
mov [rbp+var_78], rcx
mov [rbp+var_60], rsp
mov eax, [r12+0Ch]
inc eax
mov rcx, rsp
lea rdx, ds:0Fh[rax*4]
and rdx, 0FFFFFFFFFFFFFFF0h
mov rbx, rcx
sub rbx, rdx
mov rsp, rbx
neg rdx
mov eax, [r15]
inc eax
mov [rcx+rdx], eax
mov [rbp+var_70], rsi
lea r13, [rsi+41h]
xor r12d, r12d
loc_22B80:
cmp r14, r12
jz short loc_22BC7
mov rcx, [rbp+var_38]
mov rcx, [rcx]
movsx rcx, byte ptr [rcx+r12]
mov ecx, ecx
xor edx, edx
cmp r13, rcx
setnz dl
mov ecx, [r15+r12*4+4]
inc ecx
mov [rbp+var_44], ecx
inc eax
mov [rbp+var_40], eax
add edx, [r15+r12*4]
mov [rbp+var_3C], edx
lea rdi, [rbp+var_44]
push 3
pop rsi
call _ZSt3minIiET_St16initializer_listIS0_E; std::min<int>(std::initializer_list<int>)
mov [rbx+r12*4+4], eax
inc r12
jmp short loc_22B80
loc_22BC7:
mov r12, [rbp+var_50]
mov rdi, r12
mov rsi, [rbp+var_38]
mov edx, [rbp+var_2C]
mov rcx, [rbp+var_68]
mov r8, rbx
mov r9d, [rbp+var_30]
call _ZN4Trie18SearchAnyRecursiveERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEiPNS_8TrieNodeEPKii; Trie::SearchAnyRecursive(std::string const&,int,Trie::TrieNode *,int const*,int)
mov rsp, [rbp+var_60]
test al, al
mov rdx, [rbp+var_78]
mov rsi, [rbp+var_70]
jnz short loc_22BFF
loc_22BF5:
inc rsi
jmp loc_22B21
loc_22BFD:
xor edx, edx
loc_22BFF:
mov eax, edx
lea rsp, [rbp-28h]
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| // bad sp value at call has been detected, the output may be wrong!
long long Trie::SearchAnyRecursive(long long a1, _QWORD *a2, unsigned int a3, long long a4, long long a5, int a6)
{
long long v7; // r12
_DWORD *v8; // r15
long long v9; // rbx
unsigned int v10; // edx
long long v11; // rax
_DWORD *v12; // rax
long long v13; // rcx
long long v14; // r14
long long v15; // rsi
int *v16; // rbx
int v17; // eax
long long i; // r12
BOOL v19; // edx
char v20; // al
long long v22; // [rsp+0h] [rbp-80h] BYREF
long long v23; // [rsp+8h] [rbp-78h]
long long v24; // [rsp+10h] [rbp-70h]
long long v25; // [rsp+18h] [rbp-68h]
_BYTE *v26; // [rsp+20h] [rbp-60h]
long long v27; // [rsp+28h] [rbp-58h]
long long v28; // [rsp+30h] [rbp-50h]
_DWORD v29[3]; // [rsp+3Ch] [rbp-44h] BYREF
_QWORD *v30; // [rsp+48h] [rbp-38h]
int v31; // [rsp+50h] [rbp-30h]
unsigned int v32; // [rsp+54h] [rbp-2Ch]
_BYTE v33[40]; // [rsp+58h] [rbp-28h] BYREF
v32 = a3;
v30 = a2;
v7 = a1;
v8 = (_DWORD *)((char *)&v22 - ((4LL * (unsigned int)(*(_DWORD *)(a1 + 12) + 1) + 15) & 0xFFFFFFFFFFFFFFF0LL));
v31 = a6;
v9 = a6;
memcpy(v8, a5, 4LL * a6 + 4);
v11 = *(_QWORD *)(a4 + 240);
v27 = a4;
if ( v11 == *(_QWORD *)(a4 + 248) || (LOBYTE(v10) = 1, v8[v9] > (signed int)v32) )
{
v12 = (_DWORD *)std::__min_element<int *,__gnu_cxx::__ops::_Iter_less_iter>(v8, &v8[v9 + 1]);
v10 = 0;
v13 = v32;
if ( *v12 <= (signed int)v32 )
{
v14 = 0LL;
if ( v31 > 0 )
v14 = (unsigned int)v31;
v15 = 0LL;
v28 = a1;
while ( v15 != 30 )
{
if ( *(_QWORD *)(v27 + 8 * v15) )
{
v25 = *(_QWORD *)(v27 + 8 * v15);
LOBYTE(v13) = v15 != 30;
v23 = v13;
v26 = v33;
v16 = (int *)&v33[-((4LL * (unsigned int)(*(_DWORD *)(v7 + 12) + 1) + 15) & 0xFFFFFFFFFFFFFFF0LL)];
v17 = *v8 + 1;
*v16 = v17;
v24 = v15;
for ( i = 0LL; v14 != i; ++i )
{
v19 = v15 + 65 != *(char *)(*v30 + i);
v29[0] = v8[i + 1] + 1;
v29[1] = v17 + 1;
v29[2] = v8[i] + v19;
v17 = std::min<int>(v29, 3LL);
v16[i + 1] = v17;
}
v7 = v28;
v20 = Trie::SearchAnyRecursive(v28, v30, v32, v25);
v10 = v23;
v15 = v24;
if ( v20 )
return v10;
}
++v15;
}
return 0;
}
}
return v10;
}
| SearchAnyRecursive:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x58
MOV R14,RCX
MOV dword ptr [RBP + -0x2c],EDX
MOV qword ptr [RBP + -0x38],RSI
MOV R12,RDI
MOV EAX,dword ptr [RDI + 0xc]
INC EAX
MOV R15,RSP
LEA RAX,[0xf + RAX*0x4]
AND RAX,-0x10
SUB R15,RAX
MOV RSP,R15
MOV dword ptr [RBP + -0x30],R9D
MOVSXD RBX,R9D
LEA RDX,[0x4 + RBX*0x4]
MOV RDI,R15
MOV RSI,R8
CALL 0x001073b0
MOV RAX,qword ptr [R14 + 0xf0]
MOV qword ptr [RBP + -0x58],R14
CMP RAX,qword ptr [R14 + 0xf8]
JZ 0x00122aef
MOV DL,0x1
MOV EAX,dword ptr [RBP + -0x2c]
CMP dword ptr [R15 + RBX*0x4],EAX
JLE 0x00122bff
LAB_00122aef:
LEA RSI,[R15 + RBX*0x4]
ADD RSI,0x4
MOV RDI,R15
CALL 0x00123dcb
XOR EDX,EDX
MOV ECX,dword ptr [RBP + -0x2c]
CMP dword ptr [RAX],ECX
JG 0x00122bff
MOV EAX,dword ptr [RBP + -0x30]
TEST EAX,EAX
MOV R14D,0x0
CMOVG R14D,EAX
XOR ESI,ESI
MOV qword ptr [RBP + -0x50],R12
LAB_00122b21:
CMP RSI,0x1e
SETNZ CL
JZ 0x00122bfd
MOV RAX,qword ptr [RBP + -0x58]
MOV RAX,qword ptr [RAX + RSI*0x8]
TEST RAX,RAX
JZ 0x00122bf5
MOV qword ptr [RBP + -0x68],RAX
MOV qword ptr [RBP + -0x78],RCX
MOV qword ptr [RBP + -0x60],RSP
MOV EAX,dword ptr [R12 + 0xc]
INC EAX
MOV RCX,RSP
LEA RDX,[0xf + RAX*0x4]
AND RDX,-0x10
MOV RBX,RCX
SUB RBX,RDX
MOV RSP,RBX
NEG RDX
MOV EAX,dword ptr [R15]
INC EAX
MOV dword ptr [RCX + RDX*0x1],EAX
MOV qword ptr [RBP + -0x70],RSI
LEA R13,[RSI + 0x41]
XOR R12D,R12D
LAB_00122b80:
CMP R14,R12
JZ 0x00122bc7
MOV RCX,qword ptr [RBP + -0x38]
MOV RCX,qword ptr [RCX]
MOVSX RCX,byte ptr [RCX + R12*0x1]
MOV ECX,ECX
XOR EDX,EDX
CMP R13,RCX
SETNZ DL
MOV ECX,dword ptr [R15 + R12*0x4 + 0x4]
INC ECX
MOV dword ptr [RBP + -0x44],ECX
INC EAX
MOV dword ptr [RBP + -0x40],EAX
ADD EDX,dword ptr [R15 + R12*0x4]
MOV dword ptr [RBP + -0x3c],EDX
LEA RDI,[RBP + -0x44]
PUSH 0x3
POP RSI
CALL 0x00123b4a
MOV dword ptr [RBX + R12*0x4 + 0x4],EAX
INC R12
JMP 0x00122b80
LAB_00122bc7:
MOV R12,qword ptr [RBP + -0x50]
MOV RDI,R12
MOV RSI,qword ptr [RBP + -0x38]
MOV EDX,dword ptr [RBP + -0x2c]
MOV RCX,qword ptr [RBP + -0x68]
MOV R8,RBX
MOV R9D,dword ptr [RBP + -0x30]
CALL 0x00122a7a
MOV RSP,qword ptr [RBP + -0x60]
TEST AL,AL
MOV RDX,qword ptr [RBP + -0x78]
MOV RSI,qword ptr [RBP + -0x70]
JNZ 0x00122bff
LAB_00122bf5:
INC RSI
JMP 0x00122b21
LAB_00122bfd:
XOR EDX,EDX
LAB_00122bff:
MOV EAX,EDX
LEA RSP,[RBP + -0x28]
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
/* Trie::SearchAnyRecursive(std::__cxx11::string const&, int, Trie::TrieNode*, int const*, int) */
ulong __thiscall
Trie::SearchAnyRecursive
(Trie *this,string *param_1,int param_2,TrieNode *param_3,int *param_4,int param_5)
{
int8 uVar1;
long lVar2;
string *psVar3;
uint uVar4;
uint uVar5;
char cVar6;
int iVar7;
int *piVar8;
TrieNode *pTVar9;
int8 extraout_RDX;
ulong uVar10;
long lVar11;
ulong uVar12;
int *__dest;
int8 uStack_90;
int aiStack_88 [2];
TrieNode *local_80;
long local_78;
TrieNode *local_70;
int1 *local_68;
TrieNode *local_60;
Trie *local_58;
int local_4c;
int local_48;
int local_44;
string *local_40;
uint local_38;
uint local_34;
lVar2 = -((ulong)(*(int *)(this + 0xc) + 1) * 4 + 0xf & 0xfffffffffffffff0);
__dest = (int *)((long)aiStack_88 + lVar2);
local_40 = param_1;
local_38 = param_5;
local_34 = param_2;
*(int8 *)((long)&uStack_90 + lVar2) = 0x122acc;
memcpy(__dest,param_4,(long)param_5 * 4 + 4);
local_60 = param_3;
if ((*(long *)(param_3 + 0xf0) == *(long *)(param_3 + 0xf8)) ||
(local_80 = (TrieNode *)CONCAT71((int7)((ulong)extraout_RDX >> 8),1),
(int)local_34 < __dest[param_5])) {
*(int8 *)((long)&uStack_90 + lVar2) = 0x122aff;
piVar8 = std::__min_element<int*,__gnu_cxx::__ops::_Iter_less_iter>(__dest);
local_80 = (TrieNode *)0x0;
pTVar9 = (TrieNode *)(ulong)local_34;
if (*piVar8 <= (int)local_34) {
uVar12 = 0;
if (0 < (int)local_38) {
uVar12 = (ulong)local_38;
}
local_58 = this;
lVar11 = 0;
local_68 = (int1 *)__dest;
while (pTVar9 = (TrieNode *)CONCAT71((int7)((ulong)pTVar9 >> 8),lVar11 != 0x1e),
lVar11 != 0x1e) {
local_78 = lVar11;
if (*(TrieNode **)(local_60 + lVar11 * 8) != (TrieNode *)0x0) {
local_70 = *(TrieNode **)(local_60 + lVar11 * 8);
local_80 = pTVar9;
uVar10 = (ulong)(*(int *)(this + 0xc) + 1) * 4 + 0xf & 0xfffffffffffffff0;
piVar8 = (int *)((long)local_68 - uVar10);
iVar7 = *__dest + 1;
*(int *)((long)local_68 - uVar10) = iVar7;
for (uVar10 = 0; uVar5 = local_34, uVar4 = local_38, psVar3 = local_40, this = local_58,
pTVar9 = local_70, uVar12 != uVar10; uVar10 = uVar10 + 1) {
local_4c = *(int *)((long)aiStack_88 + uVar10 * 4 + lVar2 + 4) + 1;
local_48 = iVar7 + 1;
local_44 = (uint)(lVar11 + 0x41U !=
(ulong)(uint)(int)*(char *)(*(long *)local_40 + uVar10)) +
__dest[uVar10];
piVar8[-2] = 3;
piVar8[-1] = 0;
uVar1 = *(int8 *)(piVar8 + -2);
piVar8[-2] = 0x122bbd;
piVar8[-1] = 0;
iVar7 = std::min<int>(&local_4c,uVar1);
piVar8[uVar10 + 1] = iVar7;
}
piVar8[-2] = 0x122be5;
piVar8[-1] = 0;
cVar6 = SearchAnyRecursive(this,psVar3,uVar5,pTVar9,piVar8,uVar4);
if (cVar6 != '\0') goto LAB_00122bff;
}
lVar11 = local_78 + 1;
}
local_80 = (TrieNode *)0x0;
}
}
LAB_00122bff:
return (ulong)local_80 & 0xffffffff;
}
|
|
6,397 | Trie::SearchAnyRecursive(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, int, Trie::TrieNode*, int const*, int) | MikePodsytnik[P]TCRtrie/src/Trie.cpp | bool Trie::SearchAnyRecursive(const std::string &query, int maxEdits,
TrieNode* node, const int* prevRow, int queryLength) {
int currentRow[maxQueryLength_ + 1];
memcpy(currentRow, prevRow, sizeof(int) * (queryLength + 1));
if (!node->patternsIndices.empty() && currentRow[queryLength] <= maxEdits) {
for (int patternIndex : node->patternsIndices) {
return true;
}
}
int minVal = *std::min_element(currentRow, currentRow + queryLength + 1);
if (minVal > maxEdits) return false;
for (int i = 0; i < node->children.size(); ++i) {
TrieNode* child = node->children[i];
if (child == nullptr) continue;
char letter = 'A' + i;
int nextRow[maxQueryLength_ + 1];
nextRow[0] = currentRow[0] + 1;
for (int j = 1; j <= queryLength; ++j) {
int cost = (query[j - 1] == letter) ? 0 : 1;
nextRow[j] = std::min({
currentRow[j] + 1,
nextRow[j - 1] + 1,
currentRow[j - 1] + cost
});
}
if (SearchAnyRecursive(query, maxEdits, child, nextRow, queryLength)) {
return true;
}
}
return false;
} | O3 | cpp | Trie::SearchAnyRecursive(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, int, Trie::TrieNode*, int const*, int):
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movl %r9d, %ebx
movq %rcx, %r12
movl %edx, %r13d
movq %rsi, -0x38(%rbp)
movq %rdi, -0x40(%rbp)
movl 0xc(%rdi), %eax
incl %eax
movq %rsp, %r15
leaq 0xf(,%rax,4), %rax
andq $-0x10, %rax
subq %rax, %r15
movq %r15, %rsp
leal 0x1(%rbx), %r14d
movslq %r14d, %rdx
shlq $0x2, %rdx
movq %r15, %rdi
movq %r8, %rsi
callq 0x7360
movq 0xf0(%r12), %rax
movslq %ebx, %rcx
movq %r12, -0x48(%rbp)
cmpq 0xf8(%r12), %rax
je 0x302e5
movb $0x1, %al
cmpl %r13d, (%r15,%rcx,4)
jle 0x303ec
movq %r15, %rax
testl %ebx, %ebx
je 0x3031f
leaq (%r15,%rcx,4), %rdx
addq $0x4, %rdx
movq %r15, %rax
cmpq %rdx, %r15
je 0x3031f
leaq 0x4(%r15), %rdx
movl (%r15), %esi
shlq $0x2, %rcx
movq %r15, %rax
movl (%rdx), %edi
cmpl %esi, %edi
cmovll %edi, %esi
cmovlq %rdx, %rax
addq $0x4, %rdx
addq $-0x4, %rcx
jne 0x3030a
cmpl %r13d, (%rax)
jg 0x303ea
movl %r13d, -0x2c(%rbp)
movl %r14d, %r12d
decq %r12
xorl %r14d, %r14d
movq -0x48(%rbp), %rax
movq (%rax,%r14,8), %rcx
testq %rcx, %rcx
je 0x303dd
movq %rsp, %r13
movq -0x40(%rbp), %rax
movl 0xc(%rax), %eax
incl %eax
movq %rsp, %rsi
leaq 0xf(,%rax,4), %rdi
andq $-0x10, %rdi
movq %rsi, %r8
subq %rdi, %r8
movq %r8, %rsp
negq %rdi
movl (%r15), %eax
leal 0x1(%rax), %edx
movl %edx, (%rsi,%rdi)
testl %ebx, %ebx
jle 0x303c3
movq -0x38(%rbp), %rsi
movq (%rsi), %rsi
leaq 0x41(%r14), %rdi
xorl %r9d, %r9d
movsbq (%rsi,%r9), %r10
movl %r10d, %r10d
xorl %r11d, %r11d
cmpq %r10, %rdi
setne %r11b
addl %eax, %r11d
movl 0x4(%r15,%r9,4), %eax
leal 0x1(%rax), %r10d
incl %edx
cmpl %r10d, %edx
cmovgel %r10d, %edx
cmpl %edx, %r11d
cmovll %r11d, %edx
movl %edx, 0x4(%r8,%r9,4)
incq %r9
cmpq %r9, %r12
jne 0x30388
movq -0x40(%rbp), %rdi
movq -0x38(%rbp), %rsi
movl -0x2c(%rbp), %edx
movl %ebx, %r9d
callq 0x3026e
movq %r13, %rsp
testb %al, %al
jne 0x303fb
incq %r14
cmpq $0x1e, %r14
jne 0x30335
xorl %eax, %eax
leaq -0x28(%rbp), %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movb $0x1, %al
jmp 0x303ec
nop
| _ZN4Trie18SearchAnyRecursiveERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEiPNS_8TrieNodeEPKii:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 28h
mov ebx, r9d
mov r12, rcx
mov r13d, edx
mov [rbp+var_38], rsi
mov [rbp+var_40], rdi
mov eax, [rdi+0Ch]
inc eax
mov r15, rsp
lea rax, ds:0Fh[rax*4]
and rax, 0FFFFFFFFFFFFFFF0h
sub r15, rax
mov rsp, r15
lea r14d, [rbx+1]
movsxd rdx, r14d
shl rdx, 2
mov rdi, r15
mov rsi, r8
call _memcpy
mov rax, [r12+0F0h]
movsxd rcx, ebx
mov [rbp+var_48], r12
cmp rax, [r12+0F8h]
jz short loc_302E5
mov al, 1
cmp [r15+rcx*4], r13d
jle loc_303EC
loc_302E5:
mov rax, r15
test ebx, ebx
jz short loc_3031F
lea rdx, [r15+rcx*4]
add rdx, 4
mov rax, r15
cmp r15, rdx
jz short loc_3031F
lea rdx, [r15+4]
mov esi, [r15]
shl rcx, 2
mov rax, r15
loc_3030A:
mov edi, [rdx]
cmp edi, esi
cmovl esi, edi
cmovl rax, rdx
add rdx, 4
add rcx, 0FFFFFFFFFFFFFFFCh
jnz short loc_3030A
loc_3031F:
cmp [rax], r13d
jg loc_303EA
mov [rbp+var_2C], r13d
mov r12d, r14d
dec r12
xor r14d, r14d
loc_30335:
mov rax, [rbp+var_48]
mov rcx, [rax+r14*8]
test rcx, rcx
jz loc_303DD
mov r13, rsp
mov rax, [rbp+var_40]
mov eax, [rax+0Ch]
inc eax
mov rsi, rsp
lea rdi, ds:0Fh[rax*4]
and rdi, 0FFFFFFFFFFFFFFF0h
mov r8, rsi
sub r8, rdi
mov rsp, r8
neg rdi
mov eax, [r15]
lea edx, [rax+1]
mov [rsi+rdi], edx
test ebx, ebx
jle short loc_303C3
mov rsi, [rbp+var_38]
mov rsi, [rsi]
lea rdi, [r14+41h]
xor r9d, r9d
loc_30388:
movsx r10, byte ptr [rsi+r9]
mov r10d, r10d
xor r11d, r11d
cmp rdi, r10
setnz r11b
add r11d, eax
mov eax, [r15+r9*4+4]
lea r10d, [rax+1]
inc edx
cmp edx, r10d
cmovge edx, r10d
cmp r11d, edx
cmovl edx, r11d
mov [r8+r9*4+4], edx
inc r9
cmp r12, r9
jnz short loc_30388
loc_303C3:
mov rdi, [rbp+var_40]
mov rsi, [rbp+var_38]
mov edx, [rbp+var_2C]
mov r9d, ebx
call _ZN4Trie18SearchAnyRecursiveERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEiPNS_8TrieNodeEPKii; Trie::SearchAnyRecursive(std::string const&,int,Trie::TrieNode *,int const*,int)
mov rsp, r13
test al, al
jnz short loc_303FB
loc_303DD:
inc r14
cmp r14, 1Eh
jnz loc_30335
loc_303EA:
xor eax, eax
loc_303EC:
lea rsp, [rbp-28h]
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_303FB:
mov al, 1
jmp short loc_303EC
| char Trie::SearchAnyRecursive(long long a1, long long *a2, int a3, long long a4, long long a5, int a6)
{
_DWORD *v9; // r15
unsigned int v10; // r14d
long long v11; // rax
char result; // al
_DWORD *v13; // rax
_DWORD *v14; // rdx
int v15; // esi
long long v16; // rcx
long long v17; // r12
long long v18; // r14
long long v19; // rcx
int *v20; // r8
int v21; // eax
int v22; // edx
long long v23; // rsi
long long v24; // r9
int v25; // r11d
long long v26; // [rsp+0h] [rbp-50h] BYREF
long long v27; // [rsp+8h] [rbp-48h]
long long v28; // [rsp+10h] [rbp-40h]
long long *v29; // [rsp+18h] [rbp-38h]
unsigned int v30; // [rsp+24h] [rbp-2Ch]
long long v31; // [rsp+28h] [rbp-28h] BYREF
v29 = a2;
v28 = a1;
v9 = (_DWORD *)((char *)&v26 - ((4LL * (unsigned int)(*(_DWORD *)(a1 + 12) + 1) + 15) & 0xFFFFFFFFFFFFFFF0LL));
v10 = a6 + 1;
memcpy(v9, a5, 4LL * (a6 + 1));
v11 = *(_QWORD *)(a4 + 240);
v27 = a4;
if ( v11 == *(_QWORD *)(a4 + 248) || (result = 1, v9[a6] > a3) )
{
v13 = v9;
if ( a6 )
{
v13 = v9;
if ( v9 != &v9[a6 + 1] )
{
v14 = v9 + 1;
v15 = *v9;
v16 = 4LL * a6;
v13 = v9;
do
{
if ( *v14 < v15 )
{
v15 = *v14;
v13 = v14;
}
++v14;
v16 -= 4LL;
}
while ( v16 );
}
}
if ( *v13 > a3 )
{
return 0;
}
else
{
v30 = a3;
v17 = v10 - 1LL;
v18 = 0LL;
while ( 1 )
{
v19 = *(_QWORD *)(v27 + 8 * v18);
if ( v19 )
{
v20 = (int *)((char *)&v31 - ((4LL * (unsigned int)(*(_DWORD *)(v28 + 12) + 1) + 15) & 0xFFFFFFFFFFFFFFF0LL));
v21 = *v9;
v22 = *v9 + 1;
*v20 = v22;
if ( a6 > 0 )
{
v23 = *v29;
v24 = 0LL;
do
{
v25 = v21 + (v18 + 65 != *(char *)(v23 + v24));
v21 = v9[v24 + 1];
if ( ++v22 >= v21 + 1 )
v22 = v21 + 1;
if ( v25 < v22 )
v22 = v25;
v20[++v24] = v22;
}
while ( v17 != v24 );
}
if ( (unsigned __int8)Trie::SearchAnyRecursive(v28, v29, v30, v19) )
break;
}
if ( ++v18 == 30 )
return 0;
}
return 1;
}
}
return result;
}
| SearchAnyRecursive:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x28
MOV EBX,R9D
MOV R12,RCX
MOV R13D,EDX
MOV qword ptr [RBP + -0x38],RSI
MOV qword ptr [RBP + -0x40],RDI
MOV EAX,dword ptr [RDI + 0xc]
INC EAX
MOV R15,RSP
LEA RAX,[0xf + RAX*0x4]
AND RAX,-0x10
SUB R15,RAX
MOV RSP,R15
LEA R14D,[RBX + 0x1]
MOVSXD RDX,R14D
SHL RDX,0x2
MOV RDI,R15
MOV RSI,R8
CALL 0x00107360
MOV RAX,qword ptr [R12 + 0xf0]
MOVSXD RCX,EBX
MOV qword ptr [RBP + -0x48],R12
CMP RAX,qword ptr [R12 + 0xf8]
JZ 0x001302e5
MOV AL,0x1
CMP dword ptr [R15 + RCX*0x4],R13D
JLE 0x001303ec
LAB_001302e5:
MOV RAX,R15
TEST EBX,EBX
JZ 0x0013031f
LEA RDX,[R15 + RCX*0x4]
ADD RDX,0x4
MOV RAX,R15
CMP R15,RDX
JZ 0x0013031f
LEA RDX,[R15 + 0x4]
MOV ESI,dword ptr [R15]
SHL RCX,0x2
MOV RAX,R15
LAB_0013030a:
MOV EDI,dword ptr [RDX]
CMP EDI,ESI
CMOVL ESI,EDI
CMOVL RAX,RDX
ADD RDX,0x4
ADD RCX,-0x4
JNZ 0x0013030a
LAB_0013031f:
CMP dword ptr [RAX],R13D
JG 0x001303ea
MOV dword ptr [RBP + -0x2c],R13D
MOV R12D,R14D
DEC R12
XOR R14D,R14D
LAB_00130335:
MOV RAX,qword ptr [RBP + -0x48]
MOV RCX,qword ptr [RAX + R14*0x8]
TEST RCX,RCX
JZ 0x001303dd
MOV R13,RSP
MOV RAX,qword ptr [RBP + -0x40]
MOV EAX,dword ptr [RAX + 0xc]
INC EAX
MOV RSI,RSP
LEA RDI,[0xf + RAX*0x4]
AND RDI,-0x10
MOV R8,RSI
SUB R8,RDI
MOV RSP,R8
NEG RDI
MOV EAX,dword ptr [R15]
LEA EDX,[RAX + 0x1]
MOV dword ptr [RSI + RDI*0x1],EDX
TEST EBX,EBX
JLE 0x001303c3
MOV RSI,qword ptr [RBP + -0x38]
MOV RSI,qword ptr [RSI]
LEA RDI,[R14 + 0x41]
XOR R9D,R9D
LAB_00130388:
MOVSX R10,byte ptr [RSI + R9*0x1]
MOV R10D,R10D
XOR R11D,R11D
CMP RDI,R10
SETNZ R11B
ADD R11D,EAX
MOV EAX,dword ptr [R15 + R9*0x4 + 0x4]
LEA R10D,[RAX + 0x1]
INC EDX
CMP EDX,R10D
CMOVGE EDX,R10D
CMP R11D,EDX
CMOVL EDX,R11D
MOV dword ptr [R8 + R9*0x4 + 0x4],EDX
INC R9
CMP R12,R9
JNZ 0x00130388
LAB_001303c3:
MOV RDI,qword ptr [RBP + -0x40]
MOV RSI,qword ptr [RBP + -0x38]
MOV EDX,dword ptr [RBP + -0x2c]
MOV R9D,EBX
CALL 0x0013026e
MOV RSP,R13
TEST AL,AL
JNZ 0x001303fb
LAB_001303dd:
INC R14
CMP R14,0x1e
JNZ 0x00130335
LAB_001303ea:
XOR EAX,EAX
LAB_001303ec:
LEA RSP,[RBP + -0x28]
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_001303fb:
MOV AL,0x1
JMP 0x001303ec
|
/* Trie::SearchAnyRecursive(std::__cxx11::string const&, int, Trie::TrieNode*, int const*, int) */
int8 __thiscall
Trie::SearchAnyRecursive
(Trie *this,string *param_1,int param_2,TrieNode *param_3,int *param_4,int param_5)
{
TrieNode *pTVar1;
long lVar2;
long lVar3;
Trie *this_00;
string *psVar4;
char cVar5;
int iVar6;
int8 uVar7;
long lVar8;
int iVar9;
int *piVar10;
int iVar11;
ulong uVar12;
int *piVar13;
long lVar14;
int iVar15;
int *__dest;
int aiStack_60 [4];
TrieNode *local_50;
Trie *local_48;
string *local_40;
int local_34;
lVar3 = -((ulong)(*(int *)(this + 0xc) + 1) * 4 + 0xf & 0xfffffffffffffff0);
__dest = (int *)((long)aiStack_60 + lVar3 + 8);
local_48 = this;
local_40 = param_1;
*(int8 *)((long)aiStack_60 + lVar3) = 0x1302c0;
memcpy(__dest,param_4,(long)(int)(param_5 + 1U) << 2);
lVar8 = (long)param_5;
local_50 = param_3;
if ((*(long *)(param_3 + 0xf0) == *(long *)(param_3 + 0xf8)) ||
(uVar7 = 1, param_2 < __dest[lVar8])) {
piVar13 = __dest;
if ((param_5 != 0) && (__dest != __dest + lVar8 + 1)) {
iVar11 = *__dest;
lVar8 = lVar8 << 2;
piVar10 = __dest;
do {
piVar10 = piVar10 + 1;
if (*piVar10 < iVar11) {
piVar13 = piVar10;
iVar11 = *piVar10;
}
lVar8 = lVar8 + -4;
} while (lVar8 != 0);
}
if (*piVar13 <= param_2) {
local_34 = param_2;
lVar8 = 0;
do {
pTVar1 = *(TrieNode **)(local_50 + lVar8 * 8);
if (pTVar1 != (TrieNode *)0x0) {
uVar12 = (ulong)(*(int *)(local_48 + 0xc) + 1) * 4 + 0xf & 0xfffffffffffffff0;
piVar13 = (int *)((long)__dest - uVar12);
iVar6 = *__dest;
iVar11 = iVar6 + 1;
*(int *)((long)__dest - uVar12) = iVar11;
if (0 < param_5) {
lVar2 = *(long *)local_40;
lVar14 = 0;
do {
iVar15 = (uint)(lVar8 + 0x41U != (ulong)(uint)(int)*(char *)(lVar2 + lVar14)) + iVar6;
iVar6 = *(int *)((long)aiStack_60 + lVar14 * 4 + lVar3 + 0xc);
iVar9 = iVar11 + 1;
if (iVar6 + 1 <= iVar11 + 1) {
iVar9 = iVar6 + 1;
}
iVar11 = iVar9;
if (iVar15 < iVar9) {
iVar11 = iVar15;
}
piVar13[lVar14 + 1] = iVar11;
lVar14 = lVar14 + 1;
} while ((ulong)(param_5 + 1U) - 1 != lVar14);
}
iVar11 = local_34;
psVar4 = local_40;
this_00 = local_48;
piVar13[-2] = 0x1303d6;
piVar13[-1] = 0;
cVar5 = SearchAnyRecursive(this_00,psVar4,iVar11,pTVar1,piVar13,param_5);
if (cVar5 != '\0') {
return 1;
}
}
lVar8 = lVar8 + 1;
} while (lVar8 != 0x1e);
}
uVar7 = 0;
}
return uVar7;
}
|
|
6,398 | ma_service_thread_control_end | eloqsql/storage/maria/ma_servicethread.c | void ma_service_thread_control_end(MA_SERVICE_THREAD_CONTROL *control)
{
DBUG_ENTER("ma_service_thread_control_end");
DBUG_PRINT("init", ("control %p", control));
DBUG_ASSERT(control->inited);
mysql_mutex_lock(control->LOCK_control);
if (!control->killed)
{
DBUG_PRINT("info",("killing Maria background thread"));
control->killed= TRUE; /* kill it */
mysql_cond_broadcast(control->COND_control);
mysql_mutex_unlock(control->LOCK_control);
DBUG_PRINT("info", ("waiting for Maria background thread to die"));
pthread_join(control->thread, NULL);
}
else
mysql_mutex_unlock(control->LOCK_control);
mysql_mutex_destroy(control->LOCK_control);
mysql_cond_destroy(control->COND_control);
control->inited= FALSE;
DBUG_VOID_RETURN;
} | O0 | c | ma_service_thread_control_end:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
jmp 0x5d86e
jmp 0x5d870
jmp 0x5d872
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rdi
leaq 0xf3da6(%rip), %rsi # 0x151627
movl $0x3e, %edx
callq 0x5d910
movq -0x8(%rbp), %rax
cmpb $0x0, 0x8(%rax)
jne 0x5d8cf
jmp 0x5d897
jmp 0x5d899
movq -0x8(%rbp), %rax
movb $0x1, 0x8(%rax)
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
callq 0x5d980
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rdi
callq 0x5d9e0
jmp 0x5d8bd
movq -0x8(%rbp), %rax
movq (%rax), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x2a2a0
jmp 0x5d8dc
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rdi
callq 0x5d9e0
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rdi
callq 0x5da40
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
callq 0x5da90
movq -0x8(%rbp), %rax
movb $0x0, 0x9(%rax)
jmp 0x5d900
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
| ma_service_thread_control_end:
push rbp
mov rbp, rsp
sub rsp, 10h
mov [rbp+var_8], rdi
jmp short $+2
loc_5D86E:
jmp short $+2
loc_5D870:
jmp short $+2
loc_5D872:
mov rax, [rbp+var_8]
mov rdi, [rax+10h]
lea rsi, aWorkspaceLlm4b_12; "/workspace/llm4binary/github2025/eloqsq"...
mov edx, 3Eh ; '>'
call inline_mysql_mutex_lock_9
mov rax, [rbp+var_8]
cmp byte ptr [rax+8], 0
jnz short loc_5D8CF
jmp short $+2
loc_5D897:
jmp short $+2
loc_5D899:
mov rax, [rbp+var_8]
mov byte ptr [rax+8], 1
mov rax, [rbp+var_8]
mov rdi, [rax+18h]
call inline_mysql_cond_broadcast_1
mov rax, [rbp+var_8]
mov rdi, [rax+10h]
call inline_mysql_mutex_unlock_9
jmp short $+2
loc_5D8BD:
mov rax, [rbp+var_8]
mov rdi, [rax]
xor eax, eax
mov esi, eax
call _pthread_join
jmp short loc_5D8DC
loc_5D8CF:
mov rax, [rbp+var_8]
mov rdi, [rax+10h]
call inline_mysql_mutex_unlock_9
loc_5D8DC:
mov rax, [rbp+var_8]
mov rdi, [rax+10h]
call inline_mysql_mutex_destroy_4
mov rax, [rbp+var_8]
mov rdi, [rax+18h]
call inline_mysql_cond_destroy_2
mov rax, [rbp+var_8]
mov byte ptr [rax+9], 0
jmp short $+2
loc_5D900:
add rsp, 10h
pop rbp
retn
| long long ma_service_thread_control_end(long long a1)
{
long long result; // rax
inline_mysql_mutex_lock_9(
*(_QWORD *)(a1 + 16),
"/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_servicethread.c",
62LL);
if ( *(_BYTE *)(a1 + 8) )
{
inline_mysql_mutex_unlock_9(*(_QWORD *)(a1 + 16));
}
else
{
*(_BYTE *)(a1 + 8) = 1;
inline_mysql_cond_broadcast_1(*(_QWORD *)(a1 + 24));
inline_mysql_mutex_unlock_9(*(_QWORD *)(a1 + 16));
pthread_join(*(_QWORD *)a1, 0LL);
}
inline_mysql_mutex_destroy_4(*(_QWORD *)(a1 + 16));
inline_mysql_cond_destroy_2(*(_QWORD *)(a1 + 24));
result = a1;
*(_BYTE *)(a1 + 9) = 0;
return result;
}
| ma_service_thread_control_end:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x10
MOV qword ptr [RBP + -0x8],RDI
JMP 0x0015d86e
LAB_0015d86e:
JMP 0x0015d870
LAB_0015d870:
JMP 0x0015d872
LAB_0015d872:
MOV RAX,qword ptr [RBP + -0x8]
MOV RDI,qword ptr [RAX + 0x10]
LEA RSI,[0x251627]
MOV EDX,0x3e
CALL 0x0015d910
MOV RAX,qword ptr [RBP + -0x8]
CMP byte ptr [RAX + 0x8],0x0
JNZ 0x0015d8cf
JMP 0x0015d897
LAB_0015d897:
JMP 0x0015d899
LAB_0015d899:
MOV RAX,qword ptr [RBP + -0x8]
MOV byte ptr [RAX + 0x8],0x1
MOV RAX,qword ptr [RBP + -0x8]
MOV RDI,qword ptr [RAX + 0x18]
CALL 0x0015d980
MOV RAX,qword ptr [RBP + -0x8]
MOV RDI,qword ptr [RAX + 0x10]
CALL 0x0015d9e0
JMP 0x0015d8bd
LAB_0015d8bd:
MOV RAX,qword ptr [RBP + -0x8]
MOV RDI,qword ptr [RAX]
XOR EAX,EAX
MOV ESI,EAX
CALL 0x0012a2a0
JMP 0x0015d8dc
LAB_0015d8cf:
MOV RAX,qword ptr [RBP + -0x8]
MOV RDI,qword ptr [RAX + 0x10]
CALL 0x0015d9e0
LAB_0015d8dc:
MOV RAX,qword ptr [RBP + -0x8]
MOV RDI,qword ptr [RAX + 0x10]
CALL 0x0015da40
MOV RAX,qword ptr [RBP + -0x8]
MOV RDI,qword ptr [RAX + 0x18]
CALL 0x0015da90
MOV RAX,qword ptr [RBP + -0x8]
MOV byte ptr [RAX + 0x9],0x0
JMP 0x0015d900
LAB_0015d900:
ADD RSP,0x10
POP RBP
RET
|
void ma_service_thread_control_end(pthread_t *param_1)
{
inline_mysql_mutex_lock
(param_1[2],"/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_servicethread.c",
0x3e);
if ((char)param_1[1] == '\0') {
*(int1 *)(param_1 + 1) = 1;
inline_mysql_cond_broadcast(param_1[3]);
inline_mysql_mutex_unlock(param_1[2]);
pthread_join(*param_1,(void **)0x0);
}
else {
inline_mysql_mutex_unlock(param_1[2]);
}
inline_mysql_mutex_destroy(param_1[2]);
inline_mysql_cond_destroy(param_1[3]);
*(int1 *)((long)param_1 + 9) = 0;
return;
}
|
|
6,399 | ma_service_thread_control_end | eloqsql/storage/maria/ma_servicethread.c | void ma_service_thread_control_end(MA_SERVICE_THREAD_CONTROL *control)
{
DBUG_ENTER("ma_service_thread_control_end");
DBUG_PRINT("init", ("control %p", control));
DBUG_ASSERT(control->inited);
mysql_mutex_lock(control->LOCK_control);
if (!control->killed)
{
DBUG_PRINT("info",("killing Maria background thread"));
control->killed= TRUE; /* kill it */
mysql_cond_broadcast(control->COND_control);
mysql_mutex_unlock(control->LOCK_control);
DBUG_PRINT("info", ("waiting for Maria background thread to die"));
pthread_join(control->thread, NULL);
}
else
mysql_mutex_unlock(control->LOCK_control);
mysql_mutex_destroy(control->LOCK_control);
mysql_cond_destroy(control->COND_control);
control->inited= FALSE;
DBUG_VOID_RETURN;
} | O3 | c | ma_service_thread_control_end:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
movq 0x10(%rdi), %rdi
cmpq $0x0, 0x40(%rdi)
jne 0x50518
callq 0x29220
cmpb $0x0, 0x8(%rbx)
je 0x50490
movq 0x10(%rbx), %r14
movq 0x40(%r14), %rdi
testq %rdi, %rdi
jne 0x50545
movq %r14, %rdi
callq 0x291e0
jmp 0x504d0
movb $0x1, 0x8(%rbx)
movq 0x18(%rbx), %r14
movq 0x30(%r14), %rdi
testq %rdi, %rdi
jne 0x5055a
movq %r14, %rdi
callq 0x296f0
movq 0x10(%rbx), %r14
movq 0x40(%r14), %rdi
testq %rdi, %rdi
jne 0x5056f
movq %r14, %rdi
callq 0x291e0
movq (%rbx), %rdi
xorl %esi, %esi
callq 0x292a0
movq 0x10(%rbx), %r14
movq 0x40(%r14), %rdi
testq %rdi, %rdi
je 0x504f2
leaq 0x335b2c(%rip), %rax # 0x386010
movq (%rax), %rax
callq *0x48(%rax)
movq $0x0, 0x40(%r14)
movq %r14, %rdi
callq 0x290c0
movq 0x18(%rbx), %r14
movq 0x30(%r14), %rdi
testq %rdi, %rdi
jne 0x5052e
movq %r14, %rdi
callq 0x29280
movb $0x0, 0x9(%rbx)
popq %rbx
popq %r14
popq %rbp
retq
leaq 0x8a108(%rip), %rsi # 0xda627
movl $0x3e, %edx
callq 0x2eb8f
jmp 0x5046f
leaq 0x335adb(%rip), %rax # 0x386010
movq (%rax), %rax
callq *0x68(%rax)
movq $0x0, 0x30(%r14)
jmp 0x50507
leaq 0x335ac4(%rip), %rax # 0x386010
movq (%rax), %rax
callq *0x160(%rax)
jmp 0x50486
leaq 0x335aaf(%rip), %rax # 0x386010
movq (%rax), %rax
callq *0x178(%rax)
jmp 0x504a5
leaq 0x335a9a(%rip), %rax # 0x386010
movq (%rax), %rax
callq *0x160(%rax)
jmp 0x504be
| ma_service_thread_control_end:
push rbp
mov rbp, rsp
push r14
push rbx
mov rbx, rdi
mov rdi, [rdi+10h]
cmp qword ptr [rdi+40h], 0
jnz loc_50518
call _pthread_mutex_lock
loc_5046F:
cmp byte ptr [rbx+8], 0
jz short loc_50490
mov r14, [rbx+10h]
mov rdi, [r14+40h]
test rdi, rdi
jnz loc_50545
loc_50486:
mov rdi, r14
call _pthread_mutex_unlock
jmp short loc_504D0
loc_50490:
mov byte ptr [rbx+8], 1
mov r14, [rbx+18h]
mov rdi, [r14+30h]
test rdi, rdi
jnz loc_5055A
loc_504A5:
mov rdi, r14
call _pthread_cond_broadcast
mov r14, [rbx+10h]
mov rdi, [r14+40h]
test rdi, rdi
jnz loc_5056F
loc_504BE:
mov rdi, r14
call _pthread_mutex_unlock
mov rdi, [rbx]
xor esi, esi
call _pthread_join
loc_504D0:
mov r14, [rbx+10h]
mov rdi, [r14+40h]
test rdi, rdi
jz short loc_504F2
lea rax, PSI_server
mov rax, [rax]
call qword ptr [rax+48h]
mov qword ptr [r14+40h], 0
loc_504F2:
mov rdi, r14
call _pthread_mutex_destroy
mov r14, [rbx+18h]
mov rdi, [r14+30h]
test rdi, rdi
jnz short loc_5052E
loc_50507:
mov rdi, r14
call _pthread_cond_destroy
mov byte ptr [rbx+9], 0
pop rbx
pop r14
pop rbp
retn
loc_50518:
lea rsi, aWorkspaceLlm4b_29; "/workspace/llm4binary/github2025/eloqsq"...
mov edx, 3Eh ; '>'
call psi_mutex_lock
jmp loc_5046F
loc_5052E:
lea rax, PSI_server
mov rax, [rax]
call qword ptr [rax+68h]
mov qword ptr [r14+30h], 0
jmp short loc_50507
loc_50545:
lea rax, PSI_server
mov rax, [rax]
call qword ptr [rax+160h]
jmp loc_50486
loc_5055A:
lea rax, PSI_server
mov rax, [rax]
call qword ptr [rax+178h]
jmp loc_504A5
loc_5056F:
lea rax, PSI_server
mov rax, [rax]
call qword ptr [rax+160h]
jmp loc_504BE
| long long ma_service_thread_control_end(long long a1)
{
long long v2; // rdi
long long v3; // r14
long long v4; // r14
long long v5; // r14
long long v6; // r14
long long v7; // r14
long long result; // rax
v2 = *(_QWORD *)(a1 + 16);
if ( *(_QWORD *)(v2 + 64) )
psi_mutex_lock(v2, (long long)"/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_servicethread.c", 0x3Eu);
else
pthread_mutex_lock(v2);
if ( *(_BYTE *)(a1 + 8) )
{
v3 = *(_QWORD *)(a1 + 16);
if ( *(_QWORD *)(v3 + 64) )
PSI_server[44]();
pthread_mutex_unlock(v3);
}
else
{
*(_BYTE *)(a1 + 8) = 1;
v4 = *(_QWORD *)(a1 + 24);
if ( *(_QWORD *)(v4 + 48) )
PSI_server[47]();
pthread_cond_broadcast(v4);
v5 = *(_QWORD *)(a1 + 16);
if ( *(_QWORD *)(v5 + 64) )
PSI_server[44]();
pthread_mutex_unlock(v5);
pthread_join(*(_QWORD *)a1, 0LL);
}
v6 = *(_QWORD *)(a1 + 16);
if ( *(_QWORD *)(v6 + 64) )
{
PSI_server[9]();
*(_QWORD *)(v6 + 64) = 0LL;
}
pthread_mutex_destroy(v6);
v7 = *(_QWORD *)(a1 + 24);
if ( *(_QWORD *)(v7 + 48) )
{
PSI_server[13]();
*(_QWORD *)(v7 + 48) = 0LL;
}
result = pthread_cond_destroy(v7);
*(_BYTE *)(a1 + 9) = 0;
return result;
}
| ma_service_thread_control_end:
PUSH RBP
MOV RBP,RSP
PUSH R14
PUSH RBX
MOV RBX,RDI
MOV RDI,qword ptr [RDI + 0x10]
CMP qword ptr [RDI + 0x40],0x0
JNZ 0x00150518
CALL 0x00129220
LAB_0015046f:
CMP byte ptr [RBX + 0x8],0x0
JZ 0x00150490
MOV R14,qword ptr [RBX + 0x10]
MOV RDI,qword ptr [R14 + 0x40]
TEST RDI,RDI
JNZ 0x00150545
LAB_00150486:
MOV RDI,R14
CALL 0x001291e0
JMP 0x001504d0
LAB_00150490:
MOV byte ptr [RBX + 0x8],0x1
MOV R14,qword ptr [RBX + 0x18]
MOV RDI,qword ptr [R14 + 0x30]
TEST RDI,RDI
JNZ 0x0015055a
LAB_001504a5:
MOV RDI,R14
CALL 0x001296f0
MOV R14,qword ptr [RBX + 0x10]
MOV RDI,qword ptr [R14 + 0x40]
TEST RDI,RDI
JNZ 0x0015056f
LAB_001504be:
MOV RDI,R14
CALL 0x001291e0
MOV RDI,qword ptr [RBX]
XOR ESI,ESI
CALL 0x001292a0
LAB_001504d0:
MOV R14,qword ptr [RBX + 0x10]
MOV RDI,qword ptr [R14 + 0x40]
TEST RDI,RDI
JZ 0x001504f2
LEA RAX,[0x486010]
MOV RAX,qword ptr [RAX]
CALL qword ptr [RAX + 0x48]
MOV qword ptr [R14 + 0x40],0x0
LAB_001504f2:
MOV RDI,R14
CALL 0x001290c0
MOV R14,qword ptr [RBX + 0x18]
MOV RDI,qword ptr [R14 + 0x30]
TEST RDI,RDI
JNZ 0x0015052e
LAB_00150507:
MOV RDI,R14
CALL 0x00129280
MOV byte ptr [RBX + 0x9],0x0
POP RBX
POP R14
POP RBP
RET
LAB_00150518:
LEA RSI,[0x1da627]
MOV EDX,0x3e
CALL 0x0012eb8f
JMP 0x0015046f
LAB_0015052e:
LEA RAX,[0x486010]
MOV RAX,qword ptr [RAX]
CALL qword ptr [RAX + 0x68]
MOV qword ptr [R14 + 0x30],0x0
JMP 0x00150507
LAB_00150545:
LEA RAX,[0x486010]
MOV RAX,qword ptr [RAX]
CALL qword ptr [RAX + 0x160]
JMP 0x00150486
LAB_0015055a:
LEA RAX,[0x486010]
MOV RAX,qword ptr [RAX]
CALL qword ptr [RAX + 0x178]
JMP 0x001504a5
LAB_0015056f:
LEA RAX,[0x486010]
MOV RAX,qword ptr [RAX]
CALL qword ptr [RAX + 0x160]
JMP 0x001504be
|
void ma_service_thread_control_end(pthread_t *param_1)
{
pthread_mutex_t *ppVar1;
pthread_cond_t *ppVar2;
ppVar1 = (pthread_mutex_t *)param_1[2];
if (*(long *)((long)ppVar1 + 0x40) == 0) {
pthread_mutex_lock(ppVar1);
}
else {
psi_mutex_lock(ppVar1,
"/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_servicethread.c",0x3e)
;
}
if ((char)param_1[1] == '\0') {
*(int1 *)(param_1 + 1) = 1;
ppVar2 = (pthread_cond_t *)param_1[3];
if (ppVar2[1].__align != 0) {
(**(code **)(PSI_server + 0x178))();
}
pthread_cond_broadcast(ppVar2);
ppVar1 = (pthread_mutex_t *)param_1[2];
if (*(long *)((long)ppVar1 + 0x40) != 0) {
(**(code **)(PSI_server + 0x160))();
}
pthread_mutex_unlock(ppVar1);
pthread_join(*param_1,(void **)0x0);
}
else {
ppVar1 = (pthread_mutex_t *)param_1[2];
if (*(long *)((long)ppVar1 + 0x40) != 0) {
(**(code **)(PSI_server + 0x160))();
}
pthread_mutex_unlock(ppVar1);
}
ppVar1 = (pthread_mutex_t *)param_1[2];
if (*(long *)((long)ppVar1 + 0x40) != 0) {
(**(code **)(PSI_server + 0x48))();
*(int8 *)((long)ppVar1 + 0x40) = 0;
}
pthread_mutex_destroy(ppVar1);
ppVar2 = (pthread_cond_t *)param_1[3];
if (ppVar2[1].__align != 0) {
(**(code **)(PSI_server + 0x68))();
ppVar2[1].__align = 0;
}
pthread_cond_destroy(ppVar2);
*(int1 *)((long)param_1 + 9) = 0;
return;
}
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.