index
int64 0
66.5k
| func_name
stringlengths 2
5.36k
| func_dep
stringlengths 16
2.19k
| func
stringlengths 8
55.3k
| test
stringlengths 0
7.07k
| opt
stringclasses 4
values | language
stringclasses 2
values | asm
stringlengths 0
45.4k
| ida_asm
stringlengths 0
44.7k
| ida_pseudo
stringlengths 0
44.3k
| ghidra_asm
stringlengths 0
49.1k
| ghidra_pseudo
stringlengths 0
64.7k
|
|---|---|---|---|---|---|---|---|---|---|---|---|
64,200
|
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>::json_value::json_value(nlohmann::json_abi_v3_11_3::detail::value_t)
|
monkey531[P]llama/common/json.hpp
|
json_value(value_t t)
{
switch (t)
{
case value_t::object:
{
object = create<object_t>();
break;
}
case value_t::array:
{
array = create<array_t>();
break;
}
case value_t::string:
{
string = create<string_t>("");
break;
}
case value_t::binary:
{
binary = create<binary_t>();
break;
}
case value_t::boolean:
{
boolean = static_cast<boolean_t>(false);
break;
}
case value_t::number_integer:
{
number_integer = static_cast<number_integer_t>(0);
break;
}
case value_t::number_unsigned:
{
number_unsigned = static_cast<number_unsigned_t>(0);
break;
}
case value_t::number_float:
{
number_float = static_cast<number_float_t>(0.0);
break;
}
case value_t::null:
{
object = nullptr; // silence warning, see #821
break;
}
case value_t::discarded:
default:
{
object = nullptr; // silence warning, see #821
if (JSON_HEDLEY_UNLIKELY(t == value_t::null))
{
JSON_THROW(other_error::create(500, "961c151d2e87f2686a955a9be24d316f1362bf21 3.11.3", nullptr)); // LCOV_EXCL_LINE
}
break;
}
}
}
|
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>::json_value::json_value(nlohmann::json_abi_v3_11_3::detail::value_t):
subq $0x68, %rsp
movb %sil, %al
movq %rdi, 0x60(%rsp)
movb %al, 0x5f(%rsp)
movq 0x60(%rsp), %rax
movq %rax, 0x10(%rsp)
movzbl 0x5f(%rsp), %eax
movq %rax, 0x18(%rsp)
subq $0x9, %rax
ja 0x9d721
movq 0x18(%rsp), %rax
leaq 0x166b9e(%rip), %rcx # 0x204208
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
callq 0x9d810
movq %rax, %rcx
movq 0x10(%rsp), %rax
movq %rcx, (%rax)
jmp 0x9d7fb
callq 0x9d910
movq %rax, %rcx
movq 0x10(%rsp), %rax
movq %rcx, (%rax)
jmp 0x9d7fb
leaq 0x1669dd(%rip), %rdi # 0x204081
callq 0x9da10
movq %rax, %rcx
movq 0x10(%rsp), %rax
movq %rcx, (%rax)
jmp 0x9d7fb
callq 0x9db20
movq %rax, %rcx
movq 0x10(%rsp), %rax
movq %rcx, (%rax)
jmp 0x9d7fb
movq 0x10(%rsp), %rax
movb $0x0, (%rax)
jmp 0x9d7fb
movq 0x10(%rsp), %rax
movq $0x0, (%rax)
jmp 0x9d7fb
movq 0x10(%rsp), %rax
movq $0x0, (%rax)
jmp 0x9d7fb
movq 0x10(%rsp), %rax
xorps %xmm0, %xmm0
movsd %xmm0, (%rax)
jmp 0x9d7fb
movq 0x10(%rsp), %rax
movq $0x0, (%rax)
jmp 0x9d7fb
jmp 0x9d721
movq 0x10(%rsp), %rax
movq $0x0, (%rax)
cmpb $0x0, 0x5f(%rsp)
sete %al
xorb $-0x1, %al
xorb $-0x1, %al
testb $0x1, %al
jne 0x9d742
jmp 0x9d7f9
movb $0x1, 0x23(%rsp)
movl $0x20, %edi
callq 0x59660
movq %rax, (%rsp)
leaq 0x37(%rsp), %rdi
movq %rdi, 0x8(%rsp)
callq 0x5a080
movq 0x8(%rsp), %rdx
leaq 0x16c9d0(%rip), %rsi # 0x20a140
leaq 0x38(%rsp), %rdi
callq 0x5ea00
jmp 0x9d77c
movq (%rsp), %rdi
xorl %eax, %eax
movl %eax, %ecx
movl $0x1f4, %esi # imm = 0x1F4
leaq 0x38(%rsp), %rdx
callq 0x9dc20
jmp 0x9d795
movq (%rsp), %rdi
movb $0x0, 0x23(%rsp)
leaq 0x2004fb(%rip), %rsi # 0x29dca0
leaq 0x614(%rip), %rdx # 0x9ddc0
callq 0x59ac0
jmp 0x9d80a
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x28(%rsp)
movl %eax, 0x24(%rsp)
jmp 0x9d7db
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x28(%rsp)
movl %eax, 0x24(%rsp)
leaq 0x38(%rsp), %rdi
callq 0x5a4d8
leaq 0x37(%rsp), %rdi
callq 0x5a4b0
testb $0x1, 0x23(%rsp)
jne 0x9d7ee
jmp 0x9d7f7
movq (%rsp), %rdi
callq 0x59f20
jmp 0x9d800
jmp 0x9d7fb
addq $0x68, %rsp
retq
movq 0x28(%rsp), %rdi
callq 0x59b80
nopw (%rax,%rax)
|
_ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE10json_valueC2ENS0_6detail7value_tE:
sub rsp, 68h
mov al, sil
mov qword ptr [rsp+68h+var_8], rdi; int
mov [rsp+68h+var_9], al
mov rax, qword ptr [rsp+68h+var_8]
mov qword ptr [rsp+68h+var_58], rax; int
movzx eax, [rsp+68h+var_9]
mov qword ptr [rsp+68h+var_50], rax; char
sub rax, 9; switch 10 cases
ja def_9D671; jumptable 000000000009D671 default case
mov rax, qword ptr [rsp+68h+var_50]
lea rcx, jpt_9D671
movsxd rax, ds:(jpt_9D671 - 204208h)[rcx+rax*4]
add rax, rcx
jmp rax; switch jump
loc_9D673:
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE6createINS2_IS9_SD_St4lessIvESaISt4pairIKS9_SD_EEEEJEEEPT_DpOT0_; jumptable 000000000009D671 case 1
mov rcx, rax
mov rax, qword ptr [rsp+68h+var_58]
mov [rax], rcx
jmp loc_9D7FB
loc_9D688:
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE6createIS3_ISD_SaISD_EEJEEEPT_DpOT0_; jumptable 000000000009D671 case 2
mov rcx, rax
mov rax, qword ptr [rsp+68h+var_58]
mov [rax], rcx
jmp loc_9D7FB
loc_9D69D:
lea rdi, aExampleSpecifi+1Fh; jumptable 000000000009D671 case 3
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE6createIS9_JRA1_KcEEEPT_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::string,char const(&)[1]>(char const(&)[1] &&)
mov rcx, rax
mov rax, qword ptr [rsp+68h+var_58]
mov [rax], rcx
jmp loc_9D7FB
loc_9D6B9:
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE6createINS0_27byte_container_with_subtypeISC_EEJEEEPT_DpOT0_; jumptable 000000000009D671 case 8
mov rcx, rax
mov rax, qword ptr [rsp+68h+var_58]
mov [rax], rcx
jmp loc_9D7FB
loc_9D6CE:
mov rax, qword ptr [rsp+68h+var_58]; jumptable 000000000009D671 case 4
mov byte ptr [rax], 0
jmp loc_9D7FB
loc_9D6DB:
mov rax, qword ptr [rsp+68h+var_58]; jumptable 000000000009D671 case 5
mov qword ptr [rax], 0
jmp loc_9D7FB
loc_9D6EC:
mov rax, qword ptr [rsp+68h+var_58]; jumptable 000000000009D671 case 6
mov qword ptr [rax], 0
jmp loc_9D7FB
loc_9D6FD:
mov rax, qword ptr [rsp+68h+var_58]; jumptable 000000000009D671 case 7
xorps xmm0, xmm0
movsd qword ptr [rax], xmm0
jmp loc_9D7FB
loc_9D70E:
mov rax, qword ptr [rsp+68h+var_58]; jumptable 000000000009D671 case 0
mov qword ptr [rax], 0
jmp loc_9D7FB
loc_9D71F:
jmp short $+2; jumptable 000000000009D671 case 9
def_9D671:
mov rax, qword ptr [rsp+68h+var_58]; jumptable 000000000009D671 default case
mov qword ptr [rax], 0
cmp [rsp+68h+var_9], 0
setz al
xor al, 0FFh
xor al, 0FFh
test al, 1
jnz short loc_9D742
jmp loc_9D7F9
loc_9D742:
mov [rsp+68h+var_45], 1
mov edi, 20h ; ' '; thrown_size
call ___cxa_allocate_exception
mov [rsp+68h+var_68], rax; int
lea rdi, [rsp+68h+var_31]
mov qword ptr [rsp+68h+var_60], rdi; int
call __ZNSaIcEC1Ev; std::allocator<char>::allocator(void)
mov rdx, qword ptr [rsp+68h+var_60]
lea rsi, a961c151d2e87f2; "961c151d2e87f2686a955a9be24d316f1362bf2"...
lea rdi, [rsp+68h+var_31+1]
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&)
jmp short $+2
loc_9D77C:
mov rdi, [rsp+68h+var_68]; int
xor eax, eax
mov ecx, eax
mov esi, 1F4h
lea rdx, [rsp+68h+var_31+1]
call _ZN8nlohmann16json_abi_v3_11_36detail11other_error6createIDnTnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES5_
jmp short $+2
loc_9D795:
mov rdi, [rsp+68h+var_68]; void *
mov [rsp+68h+var_45], 0
lea rsi, _ZTIN8nlohmann16json_abi_v3_11_36detail11other_errorE; lptinfo
lea rdx, _ZN8nlohmann16json_abi_v3_11_36detail11other_errorD2Ev; void (*)(void *)
call ___cxa_throw
jmp short loc_9D80A
mov rcx, rax
mov eax, edx
mov [rsp+arg_20], rcx
mov [rsp+arg_1C], eax
jmp short loc_9D7DB
mov rcx, rax
mov eax, edx
mov [rsp+arg_20], rcx
mov [rsp+arg_1C], eax
lea rdi, [rsp+arg_30]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
loc_9D7DB:
lea rdi, [rsp+arg_2F]
call __ZNSaIcED1Ev; std::allocator<char>::~allocator()
test [rsp+arg_1B], 1
jnz short loc_9D7EE
jmp short loc_9D7F7
loc_9D7EE:
mov rdi, [rsp+0]; void *
call ___cxa_free_exception
loc_9D7F7:
jmp short loc_9D800
loc_9D7F9:
jmp short $+2
loc_9D7FB:
add rsp, 68h
retn
loc_9D800:
mov rdi, [rsp+arg_20]
call __Unwind_Resume
loc_9D80A:
nop word ptr [rax+rax+00h]
|
json_value:
SUB RSP,0x68
MOV AL,SIL
MOV qword ptr [RSP + 0x60],RDI
MOV byte ptr [RSP + 0x5f],AL
MOV RAX,qword ptr [RSP + 0x60]
MOV qword ptr [RSP + 0x10],RAX
MOVZX EAX,byte ptr [RSP + 0x5f]
MOV qword ptr [RSP + 0x18],RAX
SUB RAX,0x9
JA 0x0019d721
MOV RAX,qword ptr [RSP + 0x18]
LEA RCX,[0x304208]
MOVSXD RAX,dword ptr [RCX + RAX*0x4]
ADD RAX,RCX
switchD:
JMP RAX
caseD_1:
CALL 0x0019d810
MOV RCX,RAX
MOV RAX,qword ptr [RSP + 0x10]
MOV qword ptr [RAX],RCX
JMP 0x0019d7fb
caseD_2:
CALL 0x0019d910
MOV RCX,RAX
MOV RAX,qword ptr [RSP + 0x10]
MOV qword ptr [RAX],RCX
JMP 0x0019d7fb
caseD_3:
LEA RDI,[0x304081]
CALL 0x0019da10
MOV RCX,RAX
MOV RAX,qword ptr [RSP + 0x10]
MOV qword ptr [RAX],RCX
JMP 0x0019d7fb
caseD_8:
CALL 0x0019db20
MOV RCX,RAX
MOV RAX,qword ptr [RSP + 0x10]
MOV qword ptr [RAX],RCX
JMP 0x0019d7fb
caseD_4:
MOV RAX,qword ptr [RSP + 0x10]
MOV byte ptr [RAX],0x0
JMP 0x0019d7fb
caseD_5:
MOV RAX,qword ptr [RSP + 0x10]
MOV qword ptr [RAX],0x0
JMP 0x0019d7fb
caseD_6:
MOV RAX,qword ptr [RSP + 0x10]
MOV qword ptr [RAX],0x0
JMP 0x0019d7fb
caseD_7:
MOV RAX,qword ptr [RSP + 0x10]
XORPS XMM0,XMM0
MOVSD qword ptr [RAX],XMM0
JMP 0x0019d7fb
caseD_0:
MOV RAX,qword ptr [RSP + 0x10]
MOV qword ptr [RAX],0x0
JMP 0x0019d7fb
caseD_9:
JMP 0x0019d721
default:
MOV RAX,qword ptr [RSP + 0x10]
MOV qword ptr [RAX],0x0
CMP byte ptr [RSP + 0x5f],0x0
SETZ AL
XOR AL,0xff
XOR AL,0xff
TEST AL,0x1
JNZ 0x0019d742
JMP 0x0019d7f9
LAB_0019d742:
MOV byte ptr [RSP + 0x23],0x1
MOV EDI,0x20
CALL 0x00159660
MOV qword ptr [RSP],RAX
LEA RDI,[RSP + 0x37]
MOV qword ptr [RSP + 0x8],RDI
CALL 0x0015a080
MOV RDX,qword ptr [RSP + 0x8]
LAB_0019d769:
LEA RSI,[0x30a140]
LEA RDI,[RSP + 0x38]
CALL 0x0015ea00
JMP 0x0019d77c
LAB_0019d77c:
MOV RDI,qword ptr [RSP]
XOR EAX,EAX
MOV ECX,EAX
MOV ESI,0x1f4
LEA RDX,[RSP + 0x38]
CALL 0x0019dc20
JMP 0x0019d795
LAB_0019d795:
MOV RDI,qword ptr [RSP]
MOV byte ptr [RSP + 0x23],0x0
LEA RSI,[0x39dca0]
LEA RDX,[0x19ddc0]
CALL 0x00159ac0
LAB_0019d7f9:
JMP 0x0019d7fb
LAB_0019d7fb:
ADD RSP,0x68
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>::json_value::json_value(nlohmann::json_abi_v3_11_3::detail::value_t) */
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>
::json_value::json_value(json_value *this,char param_2)
{
ordered_map *poVar1;
vector *pvVar2;
string *psVar3;
byte_container_with_subtype *pbVar4;
int8 uVar5;
allocator local_31;
string local_30 [39];
char local_9;
json_value *local_8;
local_9 = param_2;
local_8 = this;
switch(param_2) {
case '\0':
*(int8 *)this = 0;
break;
case '\x01':
poVar1 = create<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>>>>>
();
*(ordered_map **)this = poVar1;
break;
case '\x02':
pvVar2 = 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>>>>
();
*(vector **)this = pvVar2;
break;
case '\x03':
psVar3 = create<std::__cxx11::string,char_const(&)[1]>("");
*(string **)this = psVar3;
break;
case '\x04':
*this = (json_value)0x0;
break;
case '\x05':
*(int8 *)this = 0;
break;
case '\x06':
*(int8 *)this = 0;
break;
case '\a':
*(int8 *)this = 0;
break;
case '\b':
pbVar4 = create<nlohmann::json_abi_v3_11_3::byte_container_with_subtype<std::vector<unsigned_char,std::allocator<unsigned_char>>>>
();
*(byte_container_with_subtype **)this = pbVar4;
break;
case '\t':
default:
*(int8 *)this = 0;
if (param_2 == '\0') {
uVar5 = __cxa_allocate_exception(0x20);
std::allocator<char>::allocator();
/* try { // try from 0019d769 to 0019d779 has its CatchHandler @ 0019d7b3 */
std::__cxx11::string::string<std::allocator<char>>
(local_30,"961c151d2e87f2686a955a9be24d316f1362bf21 3.11.3",&local_31);
/* try { // try from 0019d77c to 0019d7b0 has its CatchHandler @ 0019d7c3 */
_ZN8nlohmann16json_abi_v3_11_36detail11other_error6createIDnTnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES5_
(uVar5,500,local_30,0);
/* WARNING: Subroutine does not return */
__cxa_throw(uVar5,&detail::other_error::typeinfo,detail::other_error::~other_error);
}
}
return;
}
|
||
64,201
|
get_charset_by_csname
|
eloqsql/mysys/charset.c
|
CHARSET_INFO *
get_charset_by_csname(const char *cs_name, uint cs_flags, myf flags)
{
MY_CHARSET_LOADER loader;
my_charset_loader_init_mysys(&loader);
return my_charset_get_by_name(&loader, cs_name, cs_flags, flags);
}
|
O3
|
c
|
get_charset_by_csname:
pushq %rbp
movq %rsp, %rbp
subq $0xc0, %rsp
movq %rdx, %rcx
movl %esi, %edx
movq %rdi, %rsi
movq %fs:0x28, %rax
movq %rax, -0x8(%rbp)
leaq -0xb8(%rbp), %rdi
movb $0x0, (%rdi)
leaq -0x1249(%rip), %rax # 0x276ea
movq %rax, 0x80(%rdi)
leaq -0x1248(%rip), %rax # 0x276f9
movq %rax, 0x88(%rdi)
leaq -0x123b(%rip), %rax # 0x27714
movq %rax, 0x90(%rdi)
leaq 0x5045(%rip), %rax # 0x2d9a2
movq %rax, 0x98(%rdi)
leaq 0x2d0c35(%rip), %rax # 0x2f95a0
movq (%rax), %rax
movq %rax, 0xa0(%rdi)
leaq -0x124a(%rip), %rax # 0x27732
movq %rax, 0xa8(%rdi)
callq 0x2882c
movq %fs:0x28, %rcx
cmpq -0x8(%rbp), %rcx
jne 0x289a0
addq $0xc0, %rsp
popq %rbp
retq
callq 0x24390
|
get_charset_by_csname:
push rbp
mov rbp, rsp
sub rsp, 0C0h
mov rcx, rdx
mov edx, esi
mov rsi, rdi
mov rax, fs:28h
mov [rbp+var_8], rax
lea rdi, [rbp+var_B8]
mov byte ptr [rdi], 0
lea rax, my_once_alloc_c
mov [rdi+80h], rax
lea rax, my_malloc_c
mov [rdi+88h], rax
lea rax, my_realloc_c
mov [rdi+90h], rax
lea rax, my_free
mov [rdi+98h], rax
lea rax, my_charset_error_reporter
mov rax, [rax]
mov [rdi+0A0h], rax
lea rax, add_collation
mov [rdi+0A8h], rax
call my_charset_get_by_name
mov rcx, fs:28h
cmp rcx, [rbp+var_8]
jnz short loc_289A0
add rsp, 0C0h
pop rbp
retn
loc_289A0:
call ___stack_chk_fail
|
long long get_charset_by_csname(long long a1, unsigned int a2, long long a3)
{
_BYTE v4[128]; // [rsp+8h] [rbp-B8h] BYREF
long long ( *v5)(long long); // [rsp+88h] [rbp-38h]
long long ( *v6)(long long); // [rsp+90h] [rbp-30h]
long long ( *v7)(long long, long long); // [rsp+98h] [rbp-28h]
long long ( *v8)(_QWORD); // [rsp+A0h] [rbp-20h]
long long ( *v9)(); // [rsp+A8h] [rbp-18h]
long long ( *v10)(unsigned int *); // [rsp+B0h] [rbp-10h]
unsigned long long v11; // [rsp+B8h] [rbp-8h]
v11 = __readfsqword(0x28u);
v4[0] = 0;
v5 = my_once_alloc_c;
v6 = my_malloc_c;
v7 = my_realloc_c;
v8 = my_free;
v9 = my_charset_error_reporter;
v10 = add_collation;
return my_charset_get_by_name((long long)v4, a1, a2, a3);
}
|
get_charset_by_csname:
PUSH RBP
MOV RBP,RSP
SUB RSP,0xc0
MOV RCX,RDX
MOV EDX,ESI
MOV RSI,RDI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x8],RAX
LEA RDI,[RBP + -0xb8]
MOV byte ptr [RDI],0x0
LEA RAX,[0x1276ea]
MOV qword ptr [RDI + 0x80],RAX
LEA RAX,[0x1276f9]
MOV qword ptr [RDI + 0x88],RAX
LEA RAX,[0x127714]
MOV qword ptr [RDI + 0x90],RAX
LEA RAX,[0x12d9a2]
MOV qword ptr [RDI + 0x98],RAX
LEA RAX,[0x3f95a0]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RDI + 0xa0],RAX
LEA RAX,[0x127732]
MOV qword ptr [RDI + 0xa8],RAX
CALL 0x0012882c
MOV RCX,qword ptr FS:[0x28]
CMP RCX,qword ptr [RBP + -0x8]
JNZ 0x001289a0
ADD RSP,0xc0
POP RBP
RET
LAB_001289a0:
CALL 0x00124390
|
void get_charset_by_csname(int8 param_1,int4 param_2,int8 param_3)
{
long in_FS_OFFSET;
int1 local_c0 [128];
code *local_40;
code *local_38;
code *local_30;
code *local_28;
int *local_20;
code *local_18;
long local_10;
local_10 = *(long *)(in_FS_OFFSET + 0x28);
local_c0[0] = 0;
local_40 = my_once_alloc_c;
local_38 = my_malloc_c;
local_30 = my_realloc_c;
local_28 = my_free;
local_20 = my_charset_error_reporter;
local_18 = add_collation;
my_charset_get_by_name(local_c0,param_1,param_2,param_3);
if (*(long *)(in_FS_OFFSET + 0x28) == local_10) {
return;
}
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
|
|
64,202
|
stbi__addsizes_valid(int, int)
|
7CodeWizard[P]stablediffusion/thirdparty/stb_image.h
|
static int stbi__addsizes_valid(int a, int b)
{
if (b < 0) return 0;
// now 0 <= b <= INT_MAX, hence also
// 0 <= INT_MAX - b <= INTMAX.
// And "a + b <= INT_MAX" (which might overflow) is the
// same as a <= INT_MAX - b (no overflow)
return a <= INT_MAX - b;
}
|
O0
|
c
|
stbi__addsizes_valid(int, int):
movl %edi, -0x8(%rsp)
movl %esi, -0xc(%rsp)
cmpl $0x0, -0xc(%rsp)
jge 0x1c7e9
movl $0x0, -0x4(%rsp)
jmp 0x1c804
movl -0x8(%rsp), %eax
movl $0x7fffffff, %ecx # imm = 0x7FFFFFFF
subl -0xc(%rsp), %ecx
cmpl %ecx, %eax
setle %al
andb $0x1, %al
movzbl %al, %eax
movl %eax, -0x4(%rsp)
movl -0x4(%rsp), %eax
retq
nopl (%rax)
|
_ZL20stbi__addsizes_validii:
mov [rsp+var_8], edi
mov [rsp+var_C], esi
cmp [rsp+var_C], 0
jge short loc_1C7E9
mov [rsp+var_4], 0
jmp short loc_1C804
loc_1C7E9:
mov eax, [rsp+var_8]
mov ecx, 7FFFFFFFh
sub ecx, [rsp+var_C]
cmp eax, ecx
setle al
and al, 1
movzx eax, al
mov [rsp+var_4], eax
loc_1C804:
mov eax, [rsp+var_4]
retn
|
_BOOL8 stbi__addsizes_valid(int a1, int a2)
{
return a2 >= 0 && a1 <= 0x7FFFFFFF - a2;
}
|
stbi__addsizes_valid:
MOV dword ptr [RSP + -0x8],EDI
MOV dword ptr [RSP + -0xc],ESI
CMP dword ptr [RSP + -0xc],0x0
JGE 0x0011c7e9
MOV dword ptr [RSP + -0x4],0x0
JMP 0x0011c804
LAB_0011c7e9:
MOV EAX,dword ptr [RSP + -0x8]
MOV ECX,0x7fffffff
SUB ECX,dword ptr [RSP + -0xc]
CMP EAX,ECX
SETLE AL
AND AL,0x1
MOVZX EAX,AL
MOV dword ptr [RSP + -0x4],EAX
LAB_0011c804:
MOV EAX,dword ptr [RSP + -0x4]
RET
|
/* stbi__addsizes_valid(int, int) */
bool stbi__addsizes_valid(int param_1,int param_2)
{
return -1 < param_2 && param_1 <= 0x7fffffff - param_2;
}
|
|
64,203
|
bitmap_test_and_clear
|
eloqsql/mysys/my_bitmap.c
|
my_bool bitmap_test_and_clear(MY_BITMAP *map, uint bitmap_bit)
{
my_bool res;
DBUG_ASSERT(map->bitmap);
DBUG_ASSERT(bitmap_bit < map->n_bits);
bitmap_lock(map);
res= bitmap_fast_test_and_clear(map, bitmap_bit);
bitmap_unlock(map);
return res;
}
|
O0
|
c
|
bitmap_test_and_clear:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
jmp 0xef661
jmp 0xef663
jmp 0xef665
movq -0x8(%rbp), %rdi
callq 0xef580
movq -0x8(%rbp), %rdi
movl -0xc(%rbp), %esi
callq 0xef5f0
movb %al, -0xd(%rbp)
movq -0x8(%rbp), %rdi
callq 0xef5c0
movb -0xd(%rbp), %al
addq $0x10, %rsp
popq %rbp
retq
nop
|
bitmap_test_and_clear:
push rbp
mov rbp, rsp
sub rsp, 10h
mov [rbp+var_8], rdi
mov [rbp+var_C], esi
jmp short $+2
loc_EF661:
jmp short $+2
loc_EF663:
jmp short $+2
loc_EF665:
mov rdi, [rbp+var_8]
call bitmap_lock
mov rdi, [rbp+var_8]
mov esi, [rbp+var_C]
call bitmap_fast_test_and_clear
mov [rbp+var_D], al
mov rdi, [rbp+var_8]
call bitmap_unlock
mov al, [rbp+var_D]
add rsp, 10h
pop rbp
retn
|
char bitmap_test_and_clear(_QWORD *a1, unsigned int a2)
{
char v3; // [rsp+3h] [rbp-Dh]
bitmap_lock((long long)a1);
v3 = bitmap_fast_test_and_clear(a1, a2);
bitmap_unlock((long long)a1);
return v3;
}
|
bitmap_test_and_clear:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x10
MOV qword ptr [RBP + -0x8],RDI
MOV dword ptr [RBP + -0xc],ESI
JMP 0x001ef661
LAB_001ef661:
JMP 0x001ef663
LAB_001ef663:
JMP 0x001ef665
LAB_001ef665:
MOV RDI,qword ptr [RBP + -0x8]
CALL 0x001ef580
MOV RDI,qword ptr [RBP + -0x8]
MOV ESI,dword ptr [RBP + -0xc]
CALL 0x001ef5f0
MOV byte ptr [RBP + -0xd],AL
MOV RDI,qword ptr [RBP + -0x8]
CALL 0x001ef5c0
MOV AL,byte ptr [RBP + -0xd]
ADD RSP,0x10
POP RBP
RET
|
int1 bitmap_test_and_clear(int8 param_1,int4 param_2)
{
int1 uVar1;
bitmap_lock(param_1);
uVar1 = bitmap_fast_test_and_clear(param_1,param_2);
bitmap_unlock(param_1);
return uVar1;
}
|
|
64,204
|
bool __gnu_cxx::__ops::_Iter_pred<pio_assembler::add_program(yy::location const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)::'lambda'(program const&)>::operator()<__gnu_cxx::__normal_iterator<program*, std::vector<program, std::allocator<program>>>>(__gnu_cxx::__normal_iterator<program*, std::vector<program, std::allocator<program>>>)
|
msxemulator/build_O3/_deps/pico_sdk-src/tools/pioasm/pio_assembler.h
|
bool add_program(const yy::location &l, const std::string &name) {
if (std::find_if(programs.begin(), programs.end(), [&](const program &p) { return p.name == name; }) ==
programs.end()) {
programs.emplace_back(this, l, name);
programs[programs.size()-1].pio_version = get_default_pio_version();
return true;
} else {
return false;
}
}
|
O3
|
c
|
bool __gnu_cxx::__ops::_Iter_pred<pio_assembler::add_program(yy::location const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)::'lambda'(program const&)>::operator()<__gnu_cxx::__normal_iterator<program*, std::vector<program, std::allocator<program>>>>(__gnu_cxx::__normal_iterator<program*, std::vector<program, std::allocator<program>>>):
movq (%rdi), %rax
movq 0x30(%rsi), %rdx
cmpq 0x8(%rax), %rdx
jne 0x1caba
testq %rdx, %rdx
je 0x1cabd
pushq %rax
movq (%rax), %rax
movq 0x28(%rsi), %rdi
movq %rax, %rsi
callq 0x6310
testl %eax, %eax
sete %al
addq $0x8, %rsp
retq
xorl %eax, %eax
retq
movb $0x1, %al
retq
|
_ZN9__gnu_cxx5__ops10_Iter_predIZN13pio_assembler11add_programERKN2yy8locationERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEUlRK7programE_EclINS_17__normal_iteratorIPSF_St6vectorISF_SaISF_EEEEEEbT_:
mov rax, [rdi]
mov rdx, [rsi+30h]
cmp rdx, [rax+8]
jnz short loc_1CABA
test rdx, rdx
jz short loc_1CABD
push rax
mov rax, [rax]
mov rdi, [rsi+28h]
mov rsi, rax
call _bcmp
test eax, eax
setz al
add rsp, 8
retn
loc_1CABA:
xor eax, eax
retn
loc_1CABD:
mov al, 1
retn
|
bool __gnu_cxx::__ops::_Iter_pred<pio_assembler::add_program(yy::location const&,std::string const&)::{lambda(program const&)#1}>::operator()<__gnu_cxx::__normal_iterator<program*,std::vector<program>>>(
_QWORD **a1,
long long a2)
{
long long v2; // rdx
v2 = *(_QWORD *)(a2 + 48);
if ( v2 != (*a1)[1] )
return 0;
if ( v2 )
return (unsigned int)bcmp(*(_QWORD *)(a2 + 40), **a1, v2) == 0;
return 1;
}
|
operator():
MOV RAX,qword ptr [RDI]
MOV RDX,qword ptr [RSI + 0x30]
CMP RDX,qword ptr [RAX + 0x8]
JNZ 0x0011caba
TEST RDX,RDX
JZ 0x0011cabd
PUSH RAX
MOV RAX,qword ptr [RAX]
MOV RDI,qword ptr [RSI + 0x28]
MOV RSI,RAX
CALL 0x00106310
TEST EAX,EAX
SETZ AL
ADD RSP,0x8
RET
LAB_0011caba:
XOR EAX,EAX
RET
LAB_0011cabd:
MOV AL,0x1
RET
|
/* bool __gnu_cxx::__ops::_Iter_pred<pio_assembler::add_program(yy::location const&,
std::__cxx11::string const&)::{lambda(program
const&)#1}>::TEMPNAMEPLACEHOLDERVALUE(__gnu_cxx::__normal_iterator<program*, std::vector<program,
std::allocator<program> > >) */
bool __thiscall
__gnu_cxx::__ops::
_Iter_pred<pio_assembler::add_program(yy::location_const&,std::__cxx11::string_const&)::{lambda(program_const&)#1}>
::operator()(_Iter_pred<pio_assembler::add_program(yy::location_const&,std::__cxx11::string_const&)::_lambda(program_const&)_1_>
*this,long param_2)
{
size_t __n;
int iVar1;
__n = *(size_t *)(param_2 + 0x30);
if (__n != (*(int8 **)this)[1]) {
return false;
}
if (__n != 0) {
iVar1 = bcmp(*(void **)(param_2 + 0x28),(void *)**(int8 **)this,__n);
return iVar1 == 0;
}
return true;
}
|
|
64,205
|
isUnescaped
|
bluesky950520[P]quickjs/quickjs.c
|
static int isUnescaped(int c) {
static char const unescaped_chars[] =
"ABCDEFGHIJKLMNOPQRSTUVWXYZ"
"abcdefghijklmnopqrstuvwxyz"
"0123456789"
"@*_+-./";
return c < 0x100 &&
memchr(unescaped_chars, c, sizeof(unescaped_chars) - 1);
}
|
O0
|
c
|
isUnescaped:
pushq %rax
movl %edi, 0x4(%rsp)
xorl %eax, %eax
cmpl $0x100, 0x4(%rsp) # imm = 0x100
movb %al, 0x3(%rsp)
jge 0xd75f5
movl 0x4(%rsp), %esi
leaq 0x3c3f0(%rip), %rdi # 0x1139d0
movl $0x45, %edx
callq 0xe480
cmpq $0x0, %rax
setne %al
movb %al, 0x3(%rsp)
movb 0x3(%rsp), %al
andb $0x1, %al
movzbl %al, %eax
popq %rcx
retq
|
isUnescaped:
push rax
mov [rsp+8+var_4], edi
xor eax, eax
cmp [rsp+8+var_4], 100h
mov [rsp+8+var_5], al
jge short loc_D75F5
mov esi, [rsp+8+var_4]
lea rdi, isUnescaped_unescaped_chars; "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklm"...
mov edx, 45h ; 'E'
call _memchr
cmp rax, 0
setnz al
mov [rsp+8+var_5], al
loc_D75F5:
mov al, [rsp+8+var_5]
and al, 1
movzx eax, al
pop rcx
retn
|
_BOOL8 isUnescaped(int a1)
{
bool v2; // [rsp+1h] [rbp-5h]
v2 = 0;
if ( a1 < 256 )
return memchr("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789@*_+-./", (unsigned int)a1, 69LL) != 0;
return v2;
}
|
isUnescaped:
PUSH RAX
MOV dword ptr [RSP + 0x4],EDI
XOR EAX,EAX
CMP dword ptr [RSP + 0x4],0x100
MOV byte ptr [RSP + 0x3],AL
JGE 0x001d75f5
MOV ESI,dword ptr [RSP + 0x4]
LEA RDI,[0x2139d0]
MOV EDX,0x45
CALL 0x0010e480
CMP RAX,0x0
SETNZ AL
MOV byte ptr [RSP + 0x3],AL
LAB_001d75f5:
MOV AL,byte ptr [RSP + 0x3]
AND AL,0x1
MOVZX EAX,AL
POP RCX
RET
|
bool isUnescaped(int param_1)
{
void *pvVar1;
bool bVar2;
bVar2 = false;
if (param_1 < 0x100) {
pvVar1 = memchr("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789@*_+-./",param_1,
0x45);
bVar2 = pvVar1 != (void *)0x0;
}
return bVar2;
}
|
|
64,206
|
make_lock_and_pin
|
eloqsql/storage/maria/ma_pagecache.c
|
static my_bool make_lock_and_pin(PAGECACHE *pagecache,
PAGECACHE_BLOCK_LINK *block,
enum pagecache_page_lock lock,
enum pagecache_page_pin pin,
my_bool any)
{
DBUG_ENTER("make_lock_and_pin");
DBUG_PRINT("enter", ("block: %p (%u) lock: %s pin: %s any %d",
block, PCBLOCK_NUMBER(pagecache, block),
page_cache_page_lock_str[lock],
page_cache_page_pin_str[pin], (int)any));
PCBLOCK_INFO(block);
DBUG_ASSERT(block);
DBUG_ASSERT(!any ||
((lock == PAGECACHE_LOCK_LEFT_UNLOCKED) &&
(pin == PAGECACHE_UNPIN)));
DBUG_ASSERT(block->hash_link->block == block);
switch (lock) {
case PAGECACHE_LOCK_WRITE: /* free -> write */
/* Writelock and pin the buffer */
if (get_wrlock(pagecache, block))
{
/* Couldn't lock because block changed status => need retry */
goto retry;
}
/* The cache is locked so nothing afraid of */
add_pin(block);
info_add_lock(block, 1);
break;
case PAGECACHE_LOCK_WRITE_TO_READ: /* write -> read */
case PAGECACHE_LOCK_WRITE_UNLOCK: /* write -> free */
/* Removes write lock and puts read lock */
release_wrlock(block, lock == PAGECACHE_LOCK_WRITE_TO_READ);
/* fall through */
case PAGECACHE_LOCK_READ_UNLOCK: /* read -> free */
if (lock == PAGECACHE_LOCK_READ_UNLOCK)
release_rdlock(block);
/* fall through */
case PAGECACHE_LOCK_LEFT_READLOCKED: /* read -> read */
if (pin == PAGECACHE_UNPIN)
{
remove_pin(block, FALSE);
}
if (lock == PAGECACHE_LOCK_WRITE_TO_READ)
{
info_change_lock(block, 0);
}
else if (lock == PAGECACHE_LOCK_WRITE_UNLOCK ||
lock == PAGECACHE_LOCK_READ_UNLOCK)
{
info_remove_lock(block);
}
break;
case PAGECACHE_LOCK_READ: /* free -> read */
if (get_rdlock(pagecache, block))
{
/* Couldn't lock because block changed status => need retry */
goto retry;
}
if (pin == PAGECACHE_PIN)
{
/* The cache is locked so nothing afraid off */
add_pin(block);
}
info_add_lock(block, 0);
break;
case PAGECACHE_LOCK_LEFT_UNLOCKED: /* free -> free */
if (pin == PAGECACHE_UNPIN)
{
remove_pin(block, any);
}
/* fall through */
case PAGECACHE_LOCK_LEFT_WRITELOCKED: /* write -> write */
break; /* do nothing */
default:
DBUG_ASSERT(0); /* Never should happened */
}
PCBLOCK_INFO(block);
DBUG_RETURN(0);
retry:
DBUG_PRINT("INFO", ("Retry block %p", block));
PCBLOCK_INFO(block);
DBUG_ASSERT(block->hash_link->requests > 0);
block->hash_link->requests--;
DBUG_RETURN(1);
}
|
O3
|
c
|
make_lock_and_pin:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
xorl %eax, %eax
cmpl $0x7, %edx
ja 0x31c38
movl %ecx, %r14d
movq %rsi, %rbx
movq %rdi, %r15
movl %edx, %ecx
leaq 0xaf05e(%rip), %rdx # 0xe0b60
movslq (%rdx,%rcx,4), %rcx
addq %rdx, %rcx
jmpq *%rcx
movl %r14d, -0x30(%rbp)
movq 0x20(%rbx), %rax
movl 0x28(%rax), %r12d
movq 0x60(%rax), %r13
callq 0x29580
movq %rax, %r14
cmpl $0x0, 0x68(%rbx)
je 0x31c25
movq 0x38(%rbx), %rdi
movq %r14, %rsi
callq 0x29990
testl %eax, %eax
jne 0x31c2a
movq %r15, %rdi
movq %rbx, %rsi
movl %r12d, %edx
movq %r13, %rcx
xorl %r8d, %r8d
callq 0x34b10
testb %al, %al
je 0x31b23
jmp 0x31bea
incl 0x70(%rbx)
movl 0x68(%rbx), %eax
cmpl $0x1, %eax
jne 0x31b90
movl 0x70(%rbx), %eax
movl %eax, 0x6c(%rbx)
xorl %eax, %eax
movl %eax, 0x70(%rbx)
movl %eax, 0x68(%rbx)
cmpq $0x0, 0x58(%rbx)
je 0x31c1a
leaq 0x58(%rbx), %rdi
callq 0xa630b
jmp 0x31c1a
decl %eax
movl %eax, 0x68(%rbx)
jmp 0x31c1a
movq 0x20(%rbx), %rax
movl 0x28(%rax), %r14d
movq 0x60(%rax), %r13
callq 0x29580
movq %rax, -0x30(%rbp)
movl 0x68(%rbx), %r12d
testl %r12d, %r12d
je 0x31bc9
movq 0x38(%rbx), %rdi
movq -0x30(%rbp), %rsi
callq 0x29990
testl %eax, %eax
je 0x31bcf
cmpl $0x0, 0x6c(%rbx)
je 0x31c00
movq %r15, %rdi
movq %rbx, %rsi
movl %r14d, %edx
movq %r13, %rcx
movl $0x1, %r8d
callq 0x34b10
testb %al, %al
je 0x31baf
movq 0x20(%rbx), %rax
decl 0x68(%rax)
movb $0x1, %al
jmp 0x31c38
cmpl $0x0, 0x68(%rbx)
je 0x31c11
decl 0x70(%rbx)
jmp 0x31c1a
incl %r12d
movl %r12d, 0x68(%rbx)
movq -0x30(%rbp), %rax
movq %rax, 0x38(%rbx)
jmp 0x31c33
decl 0x6c(%rbx)
je 0x31b77
cmpl $0x3, %r14d
jne 0x31c36
decl 0x64(%rbx)
jmp 0x31c36
incl 0x6c(%rbx)
jmp 0x31c2d
incl 0x70(%rbx)
cmpl $0x2, -0x30(%rbp)
jne 0x31c36
incl 0x64(%rbx)
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
|
make_lock_and_pin:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
push rax
xor eax, eax
cmp edx, 7; switch 8 cases
ja def_31B09; jumptable 0000000000031B09 default case, case 2
mov r14d, ecx
mov rbx, rsi
mov r15, rdi
mov ecx, edx
lea rdx, jpt_31B09
movsxd rcx, ds:(jpt_31B09 - 0E0B60h)[rdx+rcx*4]
add rcx, rdx
jmp rcx; switch jump
loc_31B0B:
mov dword ptr [rbp+var_30], r14d; jumptable 0000000000031B09 case 3
mov rax, [rbx+20h]
mov r12d, [rax+28h]
mov r13, [rax+60h]
call _pthread_self
mov r14, rax
loc_31B23:
cmp dword ptr [rbx+68h], 0
jz loc_31C25
mov rdi, [rbx+38h]
mov rsi, r14
call _pthread_equal
test eax, eax
jnz loc_31C2A
mov rdi, r15
mov rsi, rbx
mov edx, r12d
mov rcx, r13
xor r8d, r8d
call pagecache_wait_lock
test al, al
jz short loc_31B23
jmp loc_31BEA
loc_31B5E:
inc dword ptr [rbx+70h]; jumptable 0000000000031B09 case 7
loc_31B61:
mov eax, [rbx+68h]; jumptable 0000000000031B09 case 6
cmp eax, 1
jnz short loc_31B90
mov eax, [rbx+70h]
mov [rbx+6Ch], eax
xor eax, eax
mov [rbx+70h], eax
mov [rbx+68h], eax
loc_31B77:
cmp qword ptr [rbx+58h], 0
jz loc_31C1A; jumptable 0000000000031B09 cases 0,1
lea rdi, [rbx+58h]
call wqueue_release_one_locktype_from_queue
jmp loc_31C1A; jumptable 0000000000031B09 cases 0,1
loc_31B90:
dec eax
mov [rbx+68h], eax
jmp loc_31C1A; jumptable 0000000000031B09 cases 0,1
loc_31B9A:
mov rax, [rbx+20h]; jumptable 0000000000031B09 case 4
mov r14d, [rax+28h]
mov r13, [rax+60h]
call _pthread_self
mov [rbp+var_30], rax
loc_31BAF:
mov r12d, [rbx+68h]
test r12d, r12d
jz short loc_31BC9
mov rdi, [rbx+38h]
mov rsi, [rbp+var_30]
call _pthread_equal
test eax, eax
jz short loc_31BCF
loc_31BC9:
cmp dword ptr [rbx+6Ch], 0
jz short loc_31C00
loc_31BCF:
mov rdi, r15
mov rsi, rbx
mov edx, r14d
mov rcx, r13
mov r8d, 1
call pagecache_wait_lock
test al, al
jz short loc_31BAF
loc_31BEA:
mov rax, [rbx+20h]
dec dword ptr [rax+68h]
mov al, 1
jmp short def_31B09; jumptable 0000000000031B09 default case, case 2
loc_31BF5:
cmp dword ptr [rbx+68h], 0; jumptable 0000000000031B09 case 5
jz short loc_31C11
dec dword ptr [rbx+70h]
jmp short loc_31C1A; jumptable 0000000000031B09 cases 0,1
loc_31C00:
inc r12d
mov [rbx+68h], r12d
mov rax, [rbp+var_30]
mov [rbx+38h], rax
jmp short loc_31C33
loc_31C11:
dec dword ptr [rbx+6Ch]
jz loc_31B77
loc_31C1A:
cmp r14d, 3; jumptable 0000000000031B09 cases 0,1
jnz short loc_31C36
dec dword ptr [rbx+64h]
jmp short loc_31C36
loc_31C25:
inc dword ptr [rbx+6Ch]
jmp short loc_31C2D
loc_31C2A:
inc dword ptr [rbx+70h]
loc_31C2D:
cmp dword ptr [rbp+var_30], 2
jnz short loc_31C36
loc_31C33:
inc dword ptr [rbx+64h]
loc_31C36:
xor eax, eax
def_31B09:
add rsp, 8; jumptable 0000000000031B09 default case, case 2
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
|
char make_lock_and_pin(long long a1, long long a2, int a3, int a4)
{
char result; // al
long long v6; // rax
unsigned int v7; // r12d
long long v8; // r13
long long v9; // r14
int v10; // eax
long long v11; // rax
unsigned int v12; // r14d
long long v13; // r13
int v14; // r12d
long long v17; // [rsp+0h] [rbp-30h]
result = 0;
switch ( a3 )
{
case 0:
case 1:
goto LABEL_23;
case 3:
v6 = *(_QWORD *)(a2 + 32);
v7 = *(_DWORD *)(v6 + 40);
v8 = *(_QWORD *)(v6 + 96);
v9 = pthread_self(a1);
while ( 2 )
{
if ( *(_DWORD *)(a2 + 104) )
{
if ( !(unsigned int)pthread_equal(*(_QWORD *)(a2 + 56), v9) )
{
if ( (unsigned __int8)pagecache_wait_lock(a1, a2, v7, v8, 0LL) )
goto LABEL_18;
continue;
}
++*(_DWORD *)(a2 + 112);
}
else
{
++*(_DWORD *)(a2 + 108);
}
break;
}
if ( a4 == 2 )
goto LABEL_28;
return 0;
case 4:
v11 = *(_QWORD *)(a2 + 32);
v12 = *(_DWORD *)(v11 + 40);
v13 = *(_QWORD *)(v11 + 96);
v17 = pthread_self(a1);
break;
case 5:
if ( *(_DWORD *)(a2 + 104) )
{
--*(_DWORD *)(a2 + 112);
goto LABEL_23;
}
if ( (*(_DWORD *)(a2 + 108))-- != 1 )
goto LABEL_23;
goto LABEL_10;
case 6:
goto LABEL_8;
case 7:
++*(_DWORD *)(a2 + 112);
LABEL_8:
v10 = *(_DWORD *)(a2 + 104);
if ( v10 == 1 )
{
*(_DWORD *)(a2 + 108) = *(_DWORD *)(a2 + 112);
*(_DWORD *)(a2 + 112) = 0;
*(_DWORD *)(a2 + 104) = 0;
LABEL_10:
if ( *(_QWORD *)(a2 + 88) )
wqueue_release_one_locktype_from_queue(a2 + 88);
}
else
{
*(_DWORD *)(a2 + 104) = v10 - 1;
}
LABEL_23:
if ( a4 == 3 )
--*(_DWORD *)(a2 + 100);
return 0;
default:
return result;
}
while ( 1 )
{
v14 = *(_DWORD *)(a2 + 104);
if ( (!v14 || (unsigned int)pthread_equal(*(_QWORD *)(a2 + 56), v17)) && !*(_DWORD *)(a2 + 108) )
break;
if ( (unsigned __int8)pagecache_wait_lock(a1, a2, v12, v13, 1LL) )
{
LABEL_18:
--*(_DWORD *)(*(_QWORD *)(a2 + 32) + 104LL);
return 1;
}
}
*(_DWORD *)(a2 + 104) = v14 + 1;
*(_QWORD *)(a2 + 56) = v17;
LABEL_28:
++*(_DWORD *)(a2 + 100);
return 0;
}
|
make_lock_and_pin:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
PUSH RAX
XOR EAX,EAX
CMP EDX,0x7
JA 0x00131c38
MOV R14D,ECX
MOV RBX,RSI
MOV R15,RDI
MOV ECX,EDX
LEA RDX,[0x1e0b60]
MOVSXD RCX,dword ptr [RDX + RCX*0x4]
ADD RCX,RDX
switchD:
JMP RCX
caseD_3:
MOV dword ptr [RBP + -0x30],R14D
MOV RAX,qword ptr [RBX + 0x20]
MOV R12D,dword ptr [RAX + 0x28]
MOV R13,qword ptr [RAX + 0x60]
CALL 0x00129580
MOV R14,RAX
LAB_00131b23:
CMP dword ptr [RBX + 0x68],0x0
JZ 0x00131c25
MOV RDI,qword ptr [RBX + 0x38]
MOV RSI,R14
CALL 0x00129990
TEST EAX,EAX
JNZ 0x00131c2a
MOV RDI,R15
MOV RSI,RBX
MOV EDX,R12D
MOV RCX,R13
XOR R8D,R8D
CALL 0x00134b10
TEST AL,AL
JZ 0x00131b23
JMP 0x00131bea
caseD_7:
INC dword ptr [RBX + 0x70]
caseD_6:
MOV EAX,dword ptr [RBX + 0x68]
CMP EAX,0x1
JNZ 0x00131b90
MOV EAX,dword ptr [RBX + 0x70]
MOV dword ptr [RBX + 0x6c],EAX
XOR EAX,EAX
MOV dword ptr [RBX + 0x70],EAX
MOV dword ptr [RBX + 0x68],EAX
LAB_00131b77:
CMP qword ptr [RBX + 0x58],0x0
JZ 0x00131c1a
LEA RDI,[RBX + 0x58]
CALL 0x001a630b
JMP 0x00131c1a
LAB_00131b90:
DEC EAX
MOV dword ptr [RBX + 0x68],EAX
JMP 0x00131c1a
caseD_4:
MOV RAX,qword ptr [RBX + 0x20]
MOV R14D,dword ptr [RAX + 0x28]
MOV R13,qword ptr [RAX + 0x60]
CALL 0x00129580
MOV qword ptr [RBP + -0x30],RAX
LAB_00131baf:
MOV R12D,dword ptr [RBX + 0x68]
TEST R12D,R12D
JZ 0x00131bc9
MOV RDI,qword ptr [RBX + 0x38]
MOV RSI,qword ptr [RBP + -0x30]
CALL 0x00129990
TEST EAX,EAX
JZ 0x00131bcf
LAB_00131bc9:
CMP dword ptr [RBX + 0x6c],0x0
JZ 0x00131c00
LAB_00131bcf:
MOV RDI,R15
MOV RSI,RBX
MOV EDX,R14D
MOV RCX,R13
MOV R8D,0x1
CALL 0x00134b10
TEST AL,AL
JZ 0x00131baf
LAB_00131bea:
MOV RAX,qword ptr [RBX + 0x20]
DEC dword ptr [RAX + 0x68]
MOV AL,0x1
JMP 0x00131c38
caseD_5:
CMP dword ptr [RBX + 0x68],0x0
JZ 0x00131c11
DEC dword ptr [RBX + 0x70]
JMP 0x00131c1a
LAB_00131c00:
INC R12D
MOV dword ptr [RBX + 0x68],R12D
MOV RAX,qword ptr [RBP + -0x30]
MOV qword ptr [RBX + 0x38],RAX
JMP 0x00131c33
LAB_00131c11:
DEC dword ptr [RBX + 0x6c]
JZ 0x00131b77
caseD_0:
CMP R14D,0x3
JNZ 0x00131c36
DEC dword ptr [RBX + 0x64]
JMP 0x00131c36
LAB_00131c25:
INC dword ptr [RBX + 0x6c]
JMP 0x00131c2d
LAB_00131c2a:
INC dword ptr [RBX + 0x70]
LAB_00131c2d:
CMP dword ptr [RBP + -0x30],0x2
JNZ 0x00131c36
LAB_00131c33:
INC dword ptr [RBX + 0x64]
LAB_00131c36:
XOR EAX,EAX
caseD_2:
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
int8 make_lock_and_pin(int8 param_1,long param_2,int4 param_3,int param_4)
{
int *piVar1;
int4 uVar2;
long lVar3;
char cVar4;
int iVar5;
int iVar6;
pthread_t pVar7;
int8 uVar8;
uVar8 = 0;
switch(param_3) {
case 0:
case 1:
goto switchD_00131b09_caseD_0;
default:
goto switchD_00131b09_caseD_2;
case 3:
uVar2 = *(int4 *)(*(long *)(param_2 + 0x20) + 0x28);
uVar8 = *(int8 *)(*(long *)(param_2 + 0x20) + 0x60);
pVar7 = pthread_self();
do {
if (*(int *)(param_2 + 0x68) == 0) {
*(int *)(param_2 + 0x6c) = *(int *)(param_2 + 0x6c) + 1;
LAB_00131c2d:
if (param_4 != 2) {
return 0;
}
LAB_00131c33:
*(int *)(param_2 + 100) = *(int *)(param_2 + 100) + 1;
return 0;
}
iVar5 = pthread_equal(*(pthread_t *)(param_2 + 0x38),pVar7);
if (iVar5 != 0) {
*(int *)(param_2 + 0x70) = *(int *)(param_2 + 0x70) + 1;
goto LAB_00131c2d;
}
cVar4 = pagecache_wait_lock(param_1,param_2,uVar2,uVar8,0);
} while (cVar4 == '\0');
break;
case 4:
uVar2 = *(int4 *)(*(long *)(param_2 + 0x20) + 0x28);
uVar8 = *(int8 *)(*(long *)(param_2 + 0x20) + 0x60);
pVar7 = pthread_self();
do {
iVar5 = *(int *)(param_2 + 0x68);
if (((iVar5 == 0) || (iVar6 = pthread_equal(*(pthread_t *)(param_2 + 0x38),pVar7), iVar6 != 0)
) && (*(int *)(param_2 + 0x6c) == 0)) {
*(int *)(param_2 + 0x68) = iVar5 + 1;
*(pthread_t *)(param_2 + 0x38) = pVar7;
goto LAB_00131c33;
}
cVar4 = pagecache_wait_lock(param_1,param_2,uVar2,uVar8,1);
} while (cVar4 == '\0');
break;
case 5:
if (*(int *)(param_2 + 0x68) != 0) {
*(int *)(param_2 + 0x70) = *(int *)(param_2 + 0x70) + -1;
goto switchD_00131b09_caseD_0;
}
piVar1 = (int *)(param_2 + 0x6c);
*piVar1 = *piVar1 + -1;
if (*piVar1 != 0) goto switchD_00131b09_caseD_0;
goto LAB_00131b77;
case 7:
*(int *)(param_2 + 0x70) = *(int *)(param_2 + 0x70) + 1;
case 6:
if (*(int *)(param_2 + 0x68) == 1) {
*(int4 *)(param_2 + 0x6c) = *(int4 *)(param_2 + 0x70);
*(int4 *)(param_2 + 0x70) = 0;
*(int4 *)(param_2 + 0x68) = 0;
LAB_00131b77:
if (*(long *)(param_2 + 0x58) != 0) {
wqueue_release_one_locktype_from_queue(param_2 + 0x58);
}
}
else {
*(int *)(param_2 + 0x68) = *(int *)(param_2 + 0x68) + -1;
}
switchD_00131b09_caseD_0:
if (param_4 == 3) {
*(int *)(param_2 + 100) = *(int *)(param_2 + 100) + -1;
}
return 0;
}
lVar3 = *(long *)(param_2 + 0x20);
piVar1 = (int *)(lVar3 + 0x68);
*piVar1 = *piVar1 + -1;
uVar8 = CONCAT71((int7)((ulong)lVar3 >> 8),1);
switchD_00131b09_caseD_2:
return uVar8;
}
|
|
64,207
|
LefDefParser::lefwMacroPinFallvoltagethreshold(double)
|
Efficient-TDP/thirdparty/Limbo/limbo/thirdparty/lefdef/5.8/lef/lef/lefwWriter.cpp
|
int
lefwMacroPinFallvoltagethreshold(double voltage)
{
lefwObsoleteNum = LEFW_MACRO_FALLVOLTAGETHRESHOLD;
if (!lefwFile)
return LEFW_UNINITIALIZED;
if (!lefwDidInit)
return LEFW_BAD_ORDER;
if (!lefwIsMacroPin)
return LEFW_BAD_ORDER;
if (versionNum >= 5.4)
return LEFW_OBSOLETE;
if (lefwWriteEncrypt)
encPrint(lefwFile, (char*) " FALLVOLTAGETHRESHOLD %.11g ;\n", voltage);
else
fprintf(lefwFile, " FALLVOLTAGETHRESHOLD %.11g ;\n", voltage);
lefwLines++;
lefwState = LEFW_MACRO;
return LEFW_OK;
}
|
O0
|
cpp
|
LefDefParser::lefwMacroPinFallvoltagethreshold(double):
subq $0x18, %rsp
movsd %xmm0, 0x8(%rsp)
movl $0x27, 0x11054(%rip) # 0x32d48
leaq 0x11105(%rip), %rax # 0x32e00
cmpq $0x0, (%rax)
jne 0x21d0e
movl $0x1, 0x14(%rsp)
jmp 0x21dd1
leaq 0x1133f(%rip), %rax # 0x33054
cmpl $0x0, (%rax)
jne 0x21d27
movl $0x2, 0x14(%rsp)
jmp 0x21dd1
leaq 0x11372(%rip), %rax # 0x330a0
cmpl $0x0, (%rax)
jne 0x21d40
movl $0x2, 0x14(%rsp)
jmp 0x21dd1
movsd 0x10ff8(%rip), %xmm0 # 0x32d40
movsd 0x74b0(%rip), %xmm1 # 0x29200
ucomisd %xmm1, %xmm0
jb 0x21d60
movl $0x7, 0x14(%rsp)
jmp 0x21dd1
cmpl $0x0, 0x11385(%rip) # 0x330ec
je 0x21d89
leaq 0x11090(%rip), %rax # 0x32e00
movq (%rax), %rdi
movsd 0x8(%rsp), %xmm0
leaq 0x9b4d(%rip), %rsi # 0x2b8cd
movb $0x1, %al
callq 0x289b0
jmp 0x21da7
leaq 0x11070(%rip), %rax # 0x32e00
movq (%rax), %rdi
movsd 0x8(%rsp), %xmm0
leaq 0x9b2d(%rip), %rsi # 0x2b8cd
movb $0x1, %al
callq 0x1100
leaq 0x1129e(%rip), %rax # 0x3304c
movl (%rax), %ecx
addl $0x1, %ecx
leaq 0x11292(%rip), %rax # 0x3304c
movl %ecx, (%rax)
leaq 0x1128d(%rip), %rax # 0x33050
movl $0x21, (%rax)
movl $0x0, 0x14(%rsp)
movl 0x14(%rsp), %eax
addq $0x18, %rsp
retq
nopw (%rax,%rax)
|
_ZN12LefDefParser32lefwMacroPinFallvoltagethresholdEd:
sub rsp, 18h
movsd [rsp+18h+var_10], xmm0
mov cs:_ZN12LefDefParserL15lefwObsoleteNumE, 27h ; '''; LefDefParser::lefwObsoleteNum
lea rax, _ZN12LefDefParser8lefwFileE; LefDefParser::lefwFile
cmp qword ptr [rax], 0
jnz short loc_21D0E
mov [rsp+18h+var_4], 1
jmp loc_21DD1
loc_21D0E:
lea rax, _ZN12LefDefParser11lefwDidInitE; LefDefParser::lefwDidInit
cmp dword ptr [rax], 0
jnz short loc_21D27
mov [rsp+18h+var_4], 2
jmp loc_21DD1
loc_21D27:
lea rax, _ZN12LefDefParser14lefwIsMacroPinE; LefDefParser::lefwIsMacroPin
cmp dword ptr [rax], 0
jnz short loc_21D40
mov [rsp+18h+var_4], 2
jmp loc_21DD1
loc_21D40:
movsd xmm0, cs:_ZN12LefDefParserL10versionNumE; LefDefParser::versionNum
movsd xmm1, cs:dbl_29200
ucomisd xmm0, xmm1
jb short loc_21D60
mov [rsp+18h+var_4], 7
jmp short loc_21DD1
loc_21D60:
cmp cs:_ZN12LefDefParserL16lefwWriteEncryptE, 0; LefDefParser::lefwWriteEncrypt
jz short loc_21D89
lea rax, _ZN12LefDefParser8lefwFileE; LefDefParser::lefwFile
mov rdi, [rax]
movsd xmm0, [rsp+18h+var_10]
lea rsi, aFallvoltagethr; " FALLVOLTAGETHRESHOLD %.11g ;\n"
mov al, 1
call _ZN12LefDefParser8encPrintEP8_IO_FILEPcz; LefDefParser::encPrint(_IO_FILE *,char *,...)
jmp short loc_21DA7
loc_21D89:
lea rax, _ZN12LefDefParser8lefwFileE; LefDefParser::lefwFile
mov rdi, [rax]
movsd xmm0, [rsp+18h+var_10]
lea rsi, aFallvoltagethr; " FALLVOLTAGETHRESHOLD %.11g ;\n"
mov al, 1
call _fprintf
loc_21DA7:
lea rax, _ZN12LefDefParser9lefwLinesE; LefDefParser::lefwLines
mov ecx, [rax]
add ecx, 1
lea rax, _ZN12LefDefParser9lefwLinesE; LefDefParser::lefwLines
mov [rax], ecx
lea rax, _ZN12LefDefParser9lefwStateE; LefDefParser::lefwState
mov dword ptr [rax], 21h ; '!'
mov [rsp+18h+var_4], 0
loc_21DD1:
mov eax, [rsp+18h+var_4]
add rsp, 18h
retn
|
long long LefDefParser::lefwMacroPinFallvoltagethreshold(
LefDefParser *this,
double a2,
long long a3,
int a4,
int a5,
int a6,
int a7)
{
LefDefParser::lefwObsoleteNum = 39;
if ( *(_QWORD *)&LefDefParser::lefwFile )
{
if ( LefDefParser::lefwDidInit )
{
if ( LefDefParser::lefwIsMacroPin )
{
if ( *(double *)&LefDefParser::versionNum < 5.4 )
{
if ( LefDefParser::lefwWriteEncrypt )
LefDefParser::encPrint(
LefDefParser::lefwFile,
(unsigned int)" FALLVOLTAGETHRESHOLD %.11g ;\n",
a4,
a5,
a6,
a7);
else
fprintf(*(_QWORD *)&LefDefParser::lefwFile, " FALLVOLTAGETHRESHOLD %.11g ;\n", a2);
++LefDefParser::lefwLines;
LefDefParser::lefwState = 33;
return 0;
}
else
{
return 7;
}
}
else
{
return 2;
}
}
else
{
return 2;
}
}
else
{
return 1;
}
}
|
lefwMacroPinFallvoltagethreshold:
SUB RSP,0x18
MOVSD qword ptr [RSP + 0x8],XMM0
MOV dword ptr [0x00132d48],0x27
LEA RAX,[0x132e00]
CMP qword ptr [RAX],0x0
JNZ 0x00121d0e
MOV dword ptr [RSP + 0x14],0x1
JMP 0x00121dd1
LAB_00121d0e:
LEA RAX,[0x133054]
CMP dword ptr [RAX],0x0
JNZ 0x00121d27
MOV dword ptr [RSP + 0x14],0x2
JMP 0x00121dd1
LAB_00121d27:
LEA RAX,[0x1330a0]
CMP dword ptr [RAX],0x0
JNZ 0x00121d40
MOV dword ptr [RSP + 0x14],0x2
JMP 0x00121dd1
LAB_00121d40:
MOVSD XMM0,qword ptr [0x00132d40]
MOVSD XMM1,qword ptr [0x00129200]
UCOMISD XMM0,XMM1
JC 0x00121d60
MOV dword ptr [RSP + 0x14],0x7
JMP 0x00121dd1
LAB_00121d60:
CMP dword ptr [0x001330ec],0x0
JZ 0x00121d89
LEA RAX,[0x132e00]
MOV RDI,qword ptr [RAX]
MOVSD XMM0,qword ptr [RSP + 0x8]
LEA RSI,[0x12b8cd]
MOV AL,0x1
CALL 0x001289b0
JMP 0x00121da7
LAB_00121d89:
LEA RAX,[0x132e00]
MOV RDI,qword ptr [RAX]
MOVSD XMM0,qword ptr [RSP + 0x8]
LEA RSI,[0x12b8cd]
MOV AL,0x1
CALL 0x00101100
LAB_00121da7:
LEA RAX,[0x13304c]
MOV ECX,dword ptr [RAX]
ADD ECX,0x1
LEA RAX,[0x13304c]
MOV dword ptr [RAX],ECX
LEA RAX,[0x133050]
MOV dword ptr [RAX],0x21
MOV dword ptr [RSP + 0x14],0x0
LAB_00121dd1:
MOV EAX,dword ptr [RSP + 0x14]
ADD RSP,0x18
RET
|
/* LefDefParser::lefwMacroPinFallvoltagethreshold(double) */
int4 LefDefParser::lefwMacroPinFallvoltagethreshold(double param_1)
{
int4 local_4;
lefwObsoleteNum = 0x27;
if (lefwFile == (_IO_FILE *)0x0) {
local_4 = 1;
}
else if (lefwDidInit == 0) {
local_4 = 2;
}
else if (lefwIsMacroPin == 0) {
local_4 = 2;
}
else if (versionNum < DAT_00129200) {
if (lefwWriteEncrypt == 0) {
fprintf(lefwFile," FALLVOLTAGETHRESHOLD %.11g ;\n",param_1);
}
else {
encPrint(lefwFile," FALLVOLTAGETHRESHOLD %.11g ;\n",param_1);
}
lefwLines = lefwLines + 1;
lefwState = 0x21;
local_4 = 0;
}
else {
local_4 = 7;
}
return local_4;
}
|
|
64,208
|
my_get_err_msg
|
eloqsql/mysys/my_error.c
|
const char *my_get_err_msg(uint nr)
{
const char *format;
struct my_err_head *meh_p;
/* Search for the range this error is in. */
for (meh_p= my_errmsgs_list; meh_p; meh_p= meh_p->meh_next)
if (nr <= meh_p->meh_last)
break;
/*
If we found the range this error number is in, get the format string.
If the string is empty, or a NULL pointer, or if we're out of return,
we return NULL.
*/
if (!(format= (meh_p && (nr >= meh_p->meh_first)) ?
meh_p->get_errmsgs(nr)[nr - meh_p->meh_first] : NULL) ||
!*format)
return NULL;
return format;
}
|
O0
|
c
|
my_get_err_msg:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movl %edi, -0xc(%rbp)
movq 0x1a0406(%rip), %rax # 0x1cea48
movq %rax, -0x20(%rbp)
cmpq $0x0, -0x20(%rbp)
je 0x2e66a
movl -0xc(%rbp), %eax
movq -0x20(%rbp), %rcx
cmpl 0x14(%rcx), %eax
ja 0x2e65b
jmp 0x2e66a
jmp 0x2e65d
movq -0x20(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x20(%rbp)
jmp 0x2e646
cmpq $0x0, -0x20(%rbp)
je 0x2e6a0
movl -0xc(%rbp), %eax
movq -0x20(%rbp), %rcx
cmpl 0x10(%rcx), %eax
jb 0x2e6a0
movq -0x20(%rbp), %rax
movq 0x8(%rax), %rax
movl -0xc(%rbp), %edi
callq *%rax
movl -0xc(%rbp), %ecx
movq -0x20(%rbp), %rdx
subl 0x10(%rdx), %ecx
movl %ecx, %ecx
movq (%rax,%rcx,8), %rax
movq %rax, -0x28(%rbp)
jmp 0x2e6a8
xorl %eax, %eax
movq %rax, -0x28(%rbp)
jmp 0x2e6a8
movq -0x28(%rbp), %rax
movq %rax, -0x18(%rbp)
cmpq $0x0, %rax
je 0x2e6bf
movq -0x18(%rbp), %rax
cmpb $0x0, (%rax)
jne 0x2e6c9
movq $0x0, -0x8(%rbp)
jmp 0x2e6d1
movq -0x18(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax,%rax)
|
my_get_err_msg:
push rbp
mov rbp, rsp
sub rsp, 30h
mov [rbp+var_C], edi
mov rax, cs:my_errmsgs_list
mov [rbp+var_20], rax
loc_2E646:
cmp [rbp+var_20], 0
jz short loc_2E66A
mov eax, [rbp+var_C]
mov rcx, [rbp+var_20]
cmp eax, [rcx+14h]
ja short loc_2E65B
jmp short loc_2E66A
loc_2E65B:
jmp short $+2
loc_2E65D:
mov rax, [rbp+var_20]
mov rax, [rax]
mov [rbp+var_20], rax
jmp short loc_2E646
loc_2E66A:
cmp [rbp+var_20], 0
jz short loc_2E6A0
mov eax, [rbp+var_C]
mov rcx, [rbp+var_20]
cmp eax, [rcx+10h]
jb short loc_2E6A0
mov rax, [rbp+var_20]
mov rax, [rax+8]
mov edi, [rbp+var_C]
call rax
mov ecx, [rbp+var_C]
mov rdx, [rbp+var_20]
sub ecx, [rdx+10h]
mov ecx, ecx
mov rax, [rax+rcx*8]
mov [rbp+var_28], rax
jmp short loc_2E6A8
loc_2E6A0:
xor eax, eax
mov [rbp+var_28], rax
jmp short $+2
loc_2E6A8:
mov rax, [rbp+var_28]
mov [rbp+var_18], rax
cmp rax, 0
jz short loc_2E6BF
mov rax, [rbp+var_18]
cmp byte ptr [rax], 0
jnz short loc_2E6C9
loc_2E6BF:
mov [rbp+var_8], 0
jmp short loc_2E6D1
loc_2E6C9:
mov rax, [rbp+var_18]
mov [rbp+var_8], rax
loc_2E6D1:
mov rax, [rbp+var_8]
add rsp, 30h
pop rbp
retn
|
_BYTE * my_get_err_msg(unsigned int a1)
{
_BYTE *v2; // [rsp+8h] [rbp-28h]
long long *i; // [rsp+10h] [rbp-20h]
for ( i = my_errmsgs_list; i && a1 > *((_DWORD *)i + 5); i = (long long *)*i )
;
if ( i && a1 >= *((_DWORD *)i + 4) )
v2 = *(_BYTE **)(((long long ( *)(_QWORD))i[1])(a1) + 8LL * (a1 - *((_DWORD *)i + 4)));
else
v2 = 0LL;
if ( v2 && *v2 )
return v2;
else
return 0LL;
}
|
my_get_err_msg:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x30
MOV dword ptr [RBP + -0xc],EDI
MOV RAX,qword ptr [0x002cea48]
MOV qword ptr [RBP + -0x20],RAX
LAB_0012e646:
CMP qword ptr [RBP + -0x20],0x0
JZ 0x0012e66a
MOV EAX,dword ptr [RBP + -0xc]
MOV RCX,qword ptr [RBP + -0x20]
CMP EAX,dword ptr [RCX + 0x14]
JA 0x0012e65b
JMP 0x0012e66a
LAB_0012e65b:
JMP 0x0012e65d
LAB_0012e65d:
MOV RAX,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x20],RAX
JMP 0x0012e646
LAB_0012e66a:
CMP qword ptr [RBP + -0x20],0x0
JZ 0x0012e6a0
MOV EAX,dword ptr [RBP + -0xc]
MOV RCX,qword ptr [RBP + -0x20]
CMP EAX,dword ptr [RCX + 0x10]
JC 0x0012e6a0
MOV RAX,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RAX + 0x8]
MOV EDI,dword ptr [RBP + -0xc]
CALL RAX
MOV ECX,dword ptr [RBP + -0xc]
MOV RDX,qword ptr [RBP + -0x20]
SUB ECX,dword ptr [RDX + 0x10]
MOV ECX,ECX
MOV RAX,qword ptr [RAX + RCX*0x8]
MOV qword ptr [RBP + -0x28],RAX
JMP 0x0012e6a8
LAB_0012e6a0:
XOR EAX,EAX
MOV qword ptr [RBP + -0x28],RAX
JMP 0x0012e6a8
LAB_0012e6a8:
MOV RAX,qword ptr [RBP + -0x28]
MOV qword ptr [RBP + -0x18],RAX
CMP RAX,0x0
JZ 0x0012e6bf
MOV RAX,qword ptr [RBP + -0x18]
CMP byte ptr [RAX],0x0
JNZ 0x0012e6c9
LAB_0012e6bf:
MOV qword ptr [RBP + -0x8],0x0
JMP 0x0012e6d1
LAB_0012e6c9:
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RBP + -0x8],RAX
LAB_0012e6d1:
MOV RAX,qword ptr [RBP + -0x8]
ADD RSP,0x30
POP RBP
RET
|
char * my_get_err_msg(uint param_1)
{
long lVar1;
char *local_30;
int8 *local_28;
char *local_10;
for (local_28 = (int8 *)my_errmsgs_list;
(local_28 != (int8 *)0x0 && (*(uint *)((long)local_28 + 0x14) < param_1));
local_28 = (int8 *)*local_28) {
}
if ((local_28 == (int8 *)0x0) || (param_1 < *(uint *)(local_28 + 2))) {
local_30 = (char *)0x0;
}
else {
lVar1 = (*(code *)local_28[1])(param_1);
local_30 = *(char **)(lVar1 + (ulong)(param_1 - *(int *)(local_28 + 2)) * 8);
}
if ((local_30 == (char *)0x0) || (*local_30 == '\0')) {
local_10 = (char *)0x0;
}
else {
local_10 = local_30;
}
return local_10;
}
|
|
64,209
|
my_get_err_msg
|
eloqsql/mysys/my_error.c
|
const char *my_get_err_msg(uint nr)
{
const char *format;
struct my_err_head *meh_p;
/* Search for the range this error is in. */
for (meh_p= my_errmsgs_list; meh_p; meh_p= meh_p->meh_next)
if (nr <= meh_p->meh_last)
break;
/*
If we found the range this error number is in, get the format string.
If the string is empty, or a NULL pointer, or if we're out of return,
we return NULL.
*/
if (!(format= (meh_p && (nr >= meh_p->meh_first)) ?
meh_p->get_errmsgs(nr)[nr - meh_p->meh_first] : NULL) ||
!*format)
return NULL;
return format;
}
|
O3
|
c
|
my_get_err_msg:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movl %edi, %ebx
leaq 0x2c4d60(%rip), %r14 # 0x2ef978
xorl %eax, %eax
movq (%r14), %r14
testq %r14, %r14
je 0x2ac4e
cmpl %ebx, 0x14(%r14)
jb 0x2ac1a
cmpl %ebx, 0x10(%r14)
ja 0x2ac4c
movl %ebx, %edi
callq *0x8(%r14)
subl 0x10(%r14), %ebx
movq (%rax,%rbx,8), %rcx
testq %rcx, %rcx
je 0x2ac4c
xorl %eax, %eax
cmpb $0x0, (%rcx)
cmovneq %rcx, %rax
jmp 0x2ac4e
xorl %eax, %eax
popq %rbx
popq %r14
popq %rbp
retq
|
my_get_err_msg:
push rbp
mov rbp, rsp
push r14
push rbx
mov ebx, edi
lea r14, my_errmsgs_list
xor eax, eax
loc_2AC1A:
mov r14, [r14]
test r14, r14
jz short loc_2AC4E
cmp [r14+14h], ebx
jb short loc_2AC1A
cmp [r14+10h], ebx
ja short loc_2AC4C
mov edi, ebx
call qword ptr [r14+8]
sub ebx, [r14+10h]
mov rcx, [rax+rbx*8]
test rcx, rcx
jz short loc_2AC4C
xor eax, eax
cmp byte ptr [rcx], 0
cmovnz rax, rcx
jmp short loc_2AC4E
loc_2AC4C:
xor eax, eax
loc_2AC4E:
pop rbx
pop r14
pop rbp
retn
|
_BYTE * my_get_err_msg(unsigned int a1)
{
long long **v1; // r14
_BYTE *result; // rax
_BYTE *v3; // rcx
v1 = &my_errmsgs_list;
result = 0LL;
while ( 1 )
{
v1 = (long long **)*v1;
if ( !v1 )
break;
if ( *((_DWORD *)v1 + 5) >= a1 )
{
if ( *((_DWORD *)v1 + 4) > a1 )
return 0LL;
v3 = *(_BYTE **)(((long long ( *)(_QWORD))v1[1])(a1) + 8LL * (a1 - *((_DWORD *)v1 + 4)));
if ( !v3 )
return 0LL;
result = 0LL;
if ( *v3 )
return v3;
return result;
}
}
return result;
}
|
my_get_err_msg:
PUSH RBP
MOV RBP,RSP
PUSH R14
PUSH RBX
MOV EBX,EDI
LEA R14,[0x3ef978]
XOR EAX,EAX
LAB_0012ac1a:
MOV R14,qword ptr [R14]
TEST R14,R14
JZ 0x0012ac4e
CMP dword ptr [R14 + 0x14],EBX
JC 0x0012ac1a
CMP dword ptr [R14 + 0x10],EBX
JA 0x0012ac4c
MOV EDI,EBX
CALL qword ptr [R14 + 0x8]
SUB EBX,dword ptr [R14 + 0x10]
MOV RCX,qword ptr [RAX + RBX*0x8]
TEST RCX,RCX
JZ 0x0012ac4c
XOR EAX,EAX
CMP byte ptr [RCX],0x0
CMOVNZ RAX,RCX
JMP 0x0012ac4e
LAB_0012ac4c:
XOR EAX,EAX
LAB_0012ac4e:
POP RBX
POP R14
POP RBP
RET
|
char * my_get_err_msg(uint param_1)
{
char *pcVar1;
long lVar2;
int **ppuVar3;
ppuVar3 = &my_errmsgs_list;
do {
ppuVar3 = (int **)*ppuVar3;
if (ppuVar3 == (int **)0x0) {
return (char *)0x0;
}
} while (*(uint *)((long)ppuVar3 + 0x14) < param_1);
if (*(uint *)(ppuVar3 + 2) <= param_1) {
lVar2 = (*(code *)ppuVar3[1])(param_1);
pcVar1 = *(char **)(lVar2 + (ulong)(param_1 - *(int *)(ppuVar3 + 2)) * 8);
if (pcVar1 != (char *)0x0) {
if (*pcVar1 == '\0') {
return (char *)0x0;
}
return pcVar1;
}
}
return (char *)0x0;
}
|
|
64,210
|
ma_print_error
|
eloqsql/storage/maria/ma_info.c
|
void _ma_print_error(MARIA_HA *info, int error, my_bool write_to_log)
{
DBUG_ENTER("_ma_print_error");
DBUG_PRINT("error", ("error: %d log: %d", error, write_to_log));
if (!info->error_count++ || !maria_in_ha_maria || write_to_log)
{
MARIA_SHARE *share= info->s;
_ma_report_error(error,
(share->index_file_name.length ?
&share->index_file_name :
&share->unique_file_name),
MYF(write_to_log ? ME_ERROR_LOG : 0));
}
DBUG_VOID_RETURN;
}
|
O0
|
c
|
ma_print_error:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movb %dl, %al
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movb %al, -0xd(%rbp)
jmp 0x42166
movq -0x8(%rbp), %rcx
movl 0x628(%rcx), %eax
movl %eax, %edx
addl $0x1, %edx
movl %edx, 0x628(%rcx)
cmpl $0x0, %eax
je 0x42195
leaq 0x43c305(%rip), %rax # 0x47e48c
cmpb $0x0, (%rax)
je 0x42195
movsbl -0xd(%rbp), %eax
cmpl $0x0, %eax
je 0x421f2
movq -0x8(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x18(%rbp)
movl -0xc(%rbp), %eax
movl %eax, -0x1c(%rbp)
movq -0x18(%rbp), %rax
cmpq $0x0, 0x5d8(%rax)
je 0x421c4
movq -0x18(%rbp), %rax
addq $0x5d0, %rax # imm = 0x5D0
movq %rax, -0x28(%rbp)
jmp 0x421d2
movq -0x18(%rbp), %rax
addq $0x5b0, %rax # imm = 0x5B0
movq %rax, -0x28(%rbp)
movl -0x1c(%rbp), %edi
movq -0x28(%rbp), %rsi
movsbl -0xd(%rbp), %edx
xorl %eax, %eax
movl $0x40, %ecx
cmpl $0x0, %edx
cmovnel %ecx, %eax
movslq %eax, %rdx
callq 0x420b0
jmp 0x421f4
jmp 0x421f6
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax)
|
_ma_print_error:
push rbp
mov rbp, rsp
sub rsp, 30h
mov al, dl
mov [rbp+var_8], rdi
mov [rbp+var_C], esi
mov [rbp+var_D], al
jmp short $+2
loc_42166:
mov rcx, [rbp+var_8]
mov eax, [rcx+628h]
mov edx, eax
add edx, 1
mov [rcx+628h], edx
cmp eax, 0
jz short loc_42195
lea rax, maria_in_ha_maria
cmp byte ptr [rax], 0
jz short loc_42195
movsx eax, [rbp+var_D]
cmp eax, 0
jz short loc_421F2
loc_42195:
mov rax, [rbp+var_8]
mov rax, [rax]
mov [rbp+var_18], rax
mov eax, [rbp+var_C]
mov [rbp+var_1C], eax
mov rax, [rbp+var_18]
cmp qword ptr [rax+5D8h], 0
jz short loc_421C4
mov rax, [rbp+var_18]
add rax, 5D0h
mov [rbp+var_28], rax
jmp short loc_421D2
loc_421C4:
mov rax, [rbp+var_18]
add rax, 5B0h
mov [rbp+var_28], rax
loc_421D2:
mov edi, [rbp+var_1C]
mov rsi, [rbp+var_28]
movsx edx, [rbp+var_D]
xor eax, eax
mov ecx, 40h ; '@'
cmp edx, 0
cmovnz eax, ecx
movsxd rdx, eax
call _ma_report_error
loc_421F2:
jmp short $+2
loc_421F4:
jmp short $+2
loc_421F6:
add rsp, 30h
pop rbp
retn
|
long long ma_print_error(_DWORD *a1, int a2, char a3, long long a4, long long a5, int a6)
{
int v6; // eax
long long result; // rax
int v8; // eax
long long *v9; // [rsp+8h] [rbp-28h]
long long v10; // [rsp+18h] [rbp-18h]
v6 = a1[394];
a1[394] = v6 + 1;
if ( !v6 || !maria_in_ha_maria || (result = (unsigned int)a3, a3) )
{
v10 = *(_QWORD *)a1;
if ( *(_QWORD *)(*(_QWORD *)a1 + 1496LL) )
v9 = (long long *)(v10 + 1488);
else
v9 = (long long *)(v10 + 1456);
v8 = 0;
if ( a3 )
v8 = 64;
return ma_report_error(a2, v9, v8, 64LL, a5, a6);
}
return result;
}
|
_ma_print_error:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x30
MOV AL,DL
MOV qword ptr [RBP + -0x8],RDI
MOV dword ptr [RBP + -0xc],ESI
MOV byte ptr [RBP + -0xd],AL
JMP 0x00142166
LAB_00142166:
MOV RCX,qword ptr [RBP + -0x8]
MOV EAX,dword ptr [RCX + 0x628]
MOV EDX,EAX
ADD EDX,0x1
MOV dword ptr [RCX + 0x628],EDX
CMP EAX,0x0
JZ 0x00142195
LEA RAX,[0x57e48c]
CMP byte ptr [RAX],0x0
JZ 0x00142195
MOVSX EAX,byte ptr [RBP + -0xd]
CMP EAX,0x0
JZ 0x001421f2
LAB_00142195:
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x18],RAX
MOV EAX,dword ptr [RBP + -0xc]
MOV dword ptr [RBP + -0x1c],EAX
MOV RAX,qword ptr [RBP + -0x18]
CMP qword ptr [RAX + 0x5d8],0x0
JZ 0x001421c4
MOV RAX,qword ptr [RBP + -0x18]
ADD RAX,0x5d0
MOV qword ptr [RBP + -0x28],RAX
JMP 0x001421d2
LAB_001421c4:
MOV RAX,qword ptr [RBP + -0x18]
ADD RAX,0x5b0
MOV qword ptr [RBP + -0x28],RAX
LAB_001421d2:
MOV EDI,dword ptr [RBP + -0x1c]
MOV RSI,qword ptr [RBP + -0x28]
MOVSX EDX,byte ptr [RBP + -0xd]
XOR EAX,EAX
MOV ECX,0x40
CMP EDX,0x0
CMOVNZ EAX,ECX
MOVSXD RDX,EAX
CALL 0x001420b0
LAB_001421f2:
JMP 0x001421f4
LAB_001421f4:
JMP 0x001421f6
LAB_001421f6:
ADD RSP,0x30
POP RBP
RET
|
void _ma_print_error(long *param_1,int4 param_2,char param_3)
{
long lVar1;
int4 uVar2;
long local_30;
lVar1 = param_1[0xc5];
*(int *)(param_1 + 0xc5) = (int)lVar1 + 1;
if ((((int)lVar1 == 0) || (maria_in_ha_maria == '\0')) || (param_3 != '\0')) {
local_30 = *param_1;
if (*(long *)(local_30 + 0x5d8) == 0) {
local_30 = local_30 + 0x5b0;
}
else {
local_30 = local_30 + 0x5d0;
}
uVar2 = 0;
if (param_3 != '\0') {
uVar2 = 0x40;
}
_ma_report_error(param_2,local_30,uVar2);
}
return;
}
|
|
64,211
|
free_tree
|
eloqsql/mysys/tree.c
|
static int free_tree(TREE *tree, my_bool abort, myf free_flags)
{
int error, first_error= 0;
DBUG_ENTER("free_tree");
DBUG_PRINT("enter",("tree: %p", tree));
if (tree->root) /* If initialized */
{
if (tree->with_delete)
{
if ((error= delete_tree_element(tree, tree->root, abort)))
{
first_error= first_error ? first_error : error;
abort= 1;
}
}
else
{
if (tree->free)
{
if (tree->memory_limit)
(*tree->free)(NULL, free_init, tree->custom_arg);
if ((error= delete_tree_element(tree, tree->root, abort)))
first_error= first_error ? first_error : error;
if (tree->memory_limit)
(*tree->free)(NULL, free_end, tree->custom_arg);
}
free_root(&tree->mem_root, free_flags);
}
}
tree->root= &null_element;
tree->elements_in_tree=0;
tree->allocated=0;
DBUG_RETURN(first_error);
}
|
O3
|
c
|
free_tree:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %esi, %r15d
movq %rdi, %rbx
movq (%rdi), %rsi
testq %rsi, %rsi
je 0xabb45
cmpb $0x0, 0x278(%rbx)
je 0xabb4a
movsbl %r15b, %edx
movq %rbx, %rdi
callq 0xac79e
movl %eax, %r15d
jmp 0xabbb4
xorl %r15d, %r15d
jmp 0xabbb4
movq %rdx, %r14
movq 0x280(%rbx), %rax
testq %rax, %rax
je 0xabba2
cmpq $0x0, 0x218(%rbx)
je 0xabb73
movq 0x230(%rbx), %rdx
xorl %edi, %edi
xorl %esi, %esi
callq *%rax
movq (%rbx), %rsi
movsbl %r15b, %edx
movq %rbx, %rdi
callq 0xac79e
movl %eax, %r15d
cmpq $0x0, 0x218(%rbx)
je 0xabba5
movq 0x230(%rbx), %rdx
xorl %edi, %edi
movl $0x2, %esi
callq *0x280(%rbx)
jmp 0xabba5
xorl %r15d, %r15d
leaq 0x238(%rbx), %rdi
movq %r14, %rsi
callq 0xa1def
leaq 0x2e4ac5(%rip), %rax # 0x390680
movq %rax, (%rbx)
movl $0x0, 0x20c(%rbx)
movq $0x0, 0x220(%rbx)
movl %r15d, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
|
free_tree:
push rbp
mov rbp, rsp
push r15
push r14
push rbx
push rax
mov r15d, esi
mov rbx, rdi
mov rsi, [rdi]
test rsi, rsi
jz short loc_ABB45
cmp byte ptr [rbx+278h], 0
jz short loc_ABB4A
movsx edx, r15b
mov rdi, rbx
call delete_tree_element
mov r15d, eax
jmp short loc_ABBB4
loc_ABB45:
xor r15d, r15d
jmp short loc_ABBB4
loc_ABB4A:
mov r14, rdx
mov rax, [rbx+280h]
test rax, rax
jz short loc_ABBA2
cmp qword ptr [rbx+218h], 0
jz short loc_ABB73
mov rdx, [rbx+230h]
xor edi, edi
xor esi, esi
call rax
mov rsi, [rbx]
loc_ABB73:
movsx edx, r15b
mov rdi, rbx
call delete_tree_element
mov r15d, eax
cmp qword ptr [rbx+218h], 0
jz short loc_ABBA5
mov rdx, [rbx+230h]
xor edi, edi
mov esi, 2
call qword ptr [rbx+280h]
jmp short loc_ABBA5
loc_ABBA2:
xor r15d, r15d
loc_ABBA5:
lea rdi, [rbx+238h]
mov rsi, r14
call free_root
loc_ABBB4:
lea rax, null_element
mov [rbx], rax
mov dword ptr [rbx+20Ch], 0
mov qword ptr [rbx+220h], 0
mov eax, r15d
add rsp, 8
pop rbx
pop r14
pop r15
pop rbp
retn
|
long long free_tree(long long *a1, char a2, char a3)
{
long long v4; // rsi
unsigned int v5; // r15d
void ( *v7)(_QWORD, _QWORD, long long); // rax
v4 = *a1;
if ( *a1 )
{
if ( *((_BYTE *)a1 + 632) )
{
v5 = delete_tree_element(a1, v4, (unsigned int)a2);
}
else
{
v7 = (void ( *)(_QWORD, _QWORD, long long))a1[80];
if ( v7 )
{
if ( a1[67] )
{
v7(0LL, 0LL, a1[70]);
v4 = *a1;
}
v5 = delete_tree_element(a1, v4, (unsigned int)a2);
if ( a1[67] )
((void ( *)(_QWORD, long long, long long))a1[80])(0LL, 2LL, a1[70]);
}
else
{
v5 = 0;
}
free_root(a1 + 71, a3);
}
}
else
{
v5 = 0;
}
*a1 = (long long)&null_element;
*((_DWORD *)a1 + 131) = 0;
a1[68] = 0LL;
return v5;
}
|
free_tree:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH RBX
PUSH RAX
MOV R15D,ESI
MOV RBX,RDI
MOV RSI,qword ptr [RDI]
TEST RSI,RSI
JZ 0x001abb45
CMP byte ptr [RBX + 0x278],0x0
JZ 0x001abb4a
MOVSX EDX,R15B
MOV RDI,RBX
CALL 0x001ac79e
MOV R15D,EAX
JMP 0x001abbb4
LAB_001abb45:
XOR R15D,R15D
JMP 0x001abbb4
LAB_001abb4a:
MOV R14,RDX
MOV RAX,qword ptr [RBX + 0x280]
TEST RAX,RAX
JZ 0x001abba2
CMP qword ptr [RBX + 0x218],0x0
JZ 0x001abb73
MOV RDX,qword ptr [RBX + 0x230]
XOR EDI,EDI
XOR ESI,ESI
CALL RAX
MOV RSI,qword ptr [RBX]
LAB_001abb73:
MOVSX EDX,R15B
MOV RDI,RBX
CALL 0x001ac79e
MOV R15D,EAX
CMP qword ptr [RBX + 0x218],0x0
JZ 0x001abba5
MOV RDX,qword ptr [RBX + 0x230]
XOR EDI,EDI
MOV ESI,0x2
CALL qword ptr [RBX + 0x280]
JMP 0x001abba5
LAB_001abba2:
XOR R15D,R15D
LAB_001abba5:
LEA RDI,[RBX + 0x238]
MOV RSI,R14
CALL 0x001a1def
LAB_001abbb4:
LEA RAX,[0x490680]
MOV qword ptr [RBX],RAX
MOV dword ptr [RBX + 0x20c],0x0
MOV qword ptr [RBX + 0x220],0x0
MOV EAX,R15D
ADD RSP,0x8
POP RBX
POP R14
POP R15
POP RBP
RET
|
int4 free_tree(long *param_1,char param_2,int8 param_3)
{
int4 uVar1;
long lVar2;
lVar2 = *param_1;
if (lVar2 == 0) {
uVar1 = 0;
}
else if ((char)param_1[0x4f] == '\0') {
if ((code *)param_1[0x50] == (code *)0x0) {
uVar1 = 0;
}
else {
if (param_1[0x43] != 0) {
(*(code *)param_1[0x50])(0,0,param_1[0x46]);
lVar2 = *param_1;
}
uVar1 = delete_tree_element(param_1,lVar2,(int)param_2);
if (param_1[0x43] != 0) {
(*(code *)param_1[0x50])(0,2,param_1[0x46]);
}
}
free_root(param_1 + 0x47,param_3);
}
else {
uVar1 = delete_tree_element(param_1,lVar2,(int)param_2);
}
*param_1 = (long)null_element;
*(int4 *)((long)param_1 + 0x20c) = 0;
param_1[0x44] = 0;
return uVar1;
}
|
|
64,212
|
getopt_ll_limit_value
|
eloqsql/mysys/my_getopt.c
|
longlong getopt_ll_limit_value(longlong num, const struct my_option *optp,
my_bool *fix)
{
longlong old= num;
my_bool adjusted= FALSE;
char buf1[255], buf2[255];
ulonglong block_size= (optp->block_size ? (ulonglong) optp->block_size : 1L);
DBUG_ENTER("getopt_ll_limit_value");
if (num > 0 && ((ulonglong) num > (ulonglong) optp->max_value) &&
optp->max_value) /* if max value is not set -> no upper limit */
{
num= (ulonglong) optp->max_value;
adjusted= TRUE;
}
switch ((optp->var_type & GET_TYPE_MASK)) {
case GET_INT:
if (num > (longlong) INT_MAX)
{
num= ((longlong) INT_MAX);
adjusted= TRUE;
}
break;
case GET_LONG:
#if SIZEOF_LONG < SIZEOF_LONG_LONG
if (num > (longlong) LONG_MAX)
{
num= ((longlong) LONG_MAX);
adjusted= TRUE;
}
#endif
break;
default:
DBUG_ASSERT((optp->var_type & GET_TYPE_MASK) == GET_LL);
break;
}
num= (num / block_size);
num= (longlong) (num * block_size);
if (num < optp->min_value)
{
num= optp->min_value;
if (old < optp->min_value)
adjusted= TRUE;
}
if (fix)
*fix= old != num;
else if (adjusted)
my_getopt_error_reporter(WARNING_LEVEL,
"option '%s': signed value %s adjusted to %s",
optp->name, llstr(old, buf1), llstr(num, buf2));
DBUG_RETURN(num);
}
|
O3
|
c
|
getopt_ll_limit_value:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x210, %rsp # imm = 0x210
movq %rdx, %rcx
movq %fs:0x28, %rax
movq %rax, -0x28(%rbp)
movq 0x60(%rsi), %r10
cmpq $0x1, %r10
adcq $0x0, %r10
testq %rdi, %rdi
jle 0xa3c8c
movq 0x50(%rsi), %rax
cmpq %rdi, %rax
setae %dl
testq %rax, %rax
sete %r9b
orb %dl, %r9b
cmovneq %rdi, %rax
jmp 0xa3c92
movb $0x1, %r9b
movq %rdi, %rax
movl 0x30(%rsi), %edx
andl $0x3f, %edx
cmpl $0x3, %edx
setne %dl
movl $0x80000000, %r8d # imm = 0x80000000
cmpq %r8, %rax
setl %r11b
orb %dl, %r11b
movl $0x7fffffff, %r8d # imm = 0x7FFFFFFF
cmovneq %rax, %r8
movq %r8, %rax
xorl %edx, %edx
divq %r10
subq %rdx, %r8
movq 0x48(%rsi), %rax
cmpq %rax, %r8
movq %rax, %rbx
cmovgq %r8, %rbx
testq %rcx, %rcx
je 0xa3cde
cmpq %rdi, %rbx
setne (%rcx)
jmp 0xa3d39
cmpq %rax, %r8
setge %cl
cmpq %rdi, %rax
setle %al
orb %cl, %al
andb %r11b, %al
testb %r9b, %al
jne 0xa3d39
leaq 0x2eaca5(%rip), %rax # 0x38e9a0
movq (%rax), %r12
movq (%rsi), %r14
leaq -0x130(%rbp), %rsi
callq 0xdc4e4
movq %rax, %r15
leaq -0x230(%rbp), %rsi
movq %rbx, %rdi
callq 0xdc4e4
leaq 0x404dd(%rip), %rsi # 0xe4203
movl $0x1, %edi
movq %r14, %rdx
movq %r15, %rcx
movq %rax, %r8
xorl %eax, %eax
callq *%r12
movq %fs:0x28, %rax
cmpq -0x28(%rbp), %rax
jne 0xa3d5b
movq %rbx, %rax
addq $0x210, %rsp # imm = 0x210
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
callq 0x2a270
|
getopt_ll_limit_value:
push rbp
mov rbp, rsp
push r15
push r14
push r12
push rbx
sub rsp, 210h
mov rcx, rdx
mov rax, fs:28h
mov [rbp+var_28], rax
mov r10, [rsi+60h]
cmp r10, 1
adc r10, 0
test rdi, rdi
jle short loc_A3C8C
mov rax, [rsi+50h]
cmp rax, rdi
setnb dl
test rax, rax
setz r9b
or r9b, dl
cmovnz rax, rdi
jmp short loc_A3C92
loc_A3C8C:
mov r9b, 1
mov rax, rdi
loc_A3C92:
mov edx, [rsi+30h]
and edx, 3Fh
cmp edx, 3
setnz dl
mov r8d, 80000000h
cmp rax, r8
setl r11b
or r11b, dl
mov r8d, 7FFFFFFFh
cmovnz r8, rax
mov rax, r8
xor edx, edx
div r10
sub r8, rdx
mov rax, [rsi+48h]
cmp r8, rax
mov rbx, rax
cmovg rbx, r8
test rcx, rcx
jz short loc_A3CDE
cmp rbx, rdi
setnz byte ptr [rcx]
jmp short loc_A3D39
loc_A3CDE:
cmp r8, rax
setnl cl
cmp rax, rdi
setle al
or al, cl
and al, r11b
test al, r9b
jnz short loc_A3D39
lea rax, my_getopt_error_reporter
mov r12, [rax]
mov r14, [rsi]
lea rsi, [rbp+var_130]
call llstr
mov r15, rax
lea rsi, [rbp+var_230]
mov rdi, rbx
call llstr
lea rsi, aOptionSSignedV; "option '%s': signed value %s adjusted t"...
mov edi, 1
mov rdx, r14
mov rcx, r15
mov r8, rax
xor eax, eax
call r12
loc_A3D39:
mov rax, fs:28h
cmp rax, [rbp+var_28]
jnz short loc_A3D5B
mov rax, rbx
add rsp, 210h
pop rbx
pop r12
pop r14
pop r15
pop rbp
retn
loc_A3D5B:
call ___stack_chk_fail
|
long long getopt_ll_limit_value(long long a1, long long a2, bool *a3)
{
long long v3; // rax
bool v4; // r9
bool v5; // r11
unsigned long long v6; // r8
signed long long v7; // r8
long long v8; // rax
long long v9; // rbx
long long (*v10)(int, const char *, ...); // r12
const char *v11; // r14
const char *v12; // r15
const char *v13; // rax
char v15[256]; // [rsp+0h] [rbp-230h] BYREF
char v16[264]; // [rsp+100h] [rbp-130h] BYREF
unsigned long long v17; // [rsp+208h] [rbp-28h]
v17 = __readfsqword(0x28u);
if ( a1 <= 0 )
{
v4 = 1;
v3 = a1;
}
else
{
v3 = *(_QWORD *)(a2 + 80);
v4 = v3 >= (unsigned long long)a1 || v3 == 0;
if ( v4 )
v3 = a1;
}
v5 = (*(_DWORD *)(a2 + 48) & 0x3F) != 3 || v3 < 0x80000000LL;
v6 = 0x7FFFFFFFLL;
if ( v5 )
v6 = v3;
v7 = v6 - v6 % ((unsigned long long)(*(_QWORD *)(a2 + 96) == 0LL) + *(_QWORD *)(a2 + 96));
v8 = *(_QWORD *)(a2 + 72);
v9 = v8;
if ( v7 > v8 )
v9 = v7;
if ( a3 )
{
*a3 = v9 != a1;
}
else if ( !v4 || !v5 || v7 < v8 && v8 > a1 )
{
v10 = my_getopt_error_reporter;
v11 = *(const char **)a2;
v12 = (const char *)llstr(a1, v16);
v13 = (const char *)llstr(v9, v15);
v10(1, "option '%s': signed value %s adjusted to %s", v11, v12, v13);
}
return v9;
}
|
getopt_ll_limit_value:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
SUB RSP,0x210
MOV RCX,RDX
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x28],RAX
MOV R10,qword ptr [RSI + 0x60]
CMP R10,0x1
ADC R10,0x0
TEST RDI,RDI
JLE 0x001a3c8c
MOV RAX,qword ptr [RSI + 0x50]
CMP RAX,RDI
SETNC DL
TEST RAX,RAX
SETZ R9B
OR R9B,DL
CMOVNZ RAX,RDI
JMP 0x001a3c92
LAB_001a3c8c:
MOV R9B,0x1
MOV RAX,RDI
LAB_001a3c92:
MOV EDX,dword ptr [RSI + 0x30]
AND EDX,0x3f
CMP EDX,0x3
SETNZ DL
MOV R8D,0x80000000
CMP RAX,R8
SETL R11B
OR R11B,DL
MOV R8D,0x7fffffff
CMOVNZ R8,RAX
MOV RAX,R8
XOR EDX,EDX
DIV R10
SUB R8,RDX
MOV RAX,qword ptr [RSI + 0x48]
CMP R8,RAX
MOV RBX,RAX
CMOVG RBX,R8
TEST RCX,RCX
JZ 0x001a3cde
CMP RBX,RDI
SETNZ byte ptr [RCX]
JMP 0x001a3d39
LAB_001a3cde:
CMP R8,RAX
SETGE CL
CMP RAX,RDI
SETLE AL
OR AL,CL
AND AL,R11B
TEST AL,R9B
JNZ 0x001a3d39
LEA RAX,[0x48e9a0]
MOV R12,qword ptr [RAX]
MOV R14,qword ptr [RSI]
LEA RSI,[RBP + -0x130]
CALL 0x001dc4e4
MOV R15,RAX
LEA RSI,[RBP + -0x230]
MOV RDI,RBX
CALL 0x001dc4e4
LEA RSI,[0x1e4203]
MOV EDI,0x1
MOV RDX,R14
MOV RCX,R15
MOV R8,RAX
XOR EAX,EAX
CALL R12
LAB_001a3d39:
MOV RAX,qword ptr FS:[0x28]
CMP RAX,qword ptr [RBP + -0x28]
JNZ 0x001a3d5b
MOV RAX,RBX
ADD RSP,0x210
POP RBX
POP R12
POP R14
POP R15
POP RBP
RET
LAB_001a3d5b:
CALL 0x0012a270
|
ulong getopt_ll_limit_value(ulong param_1,int8 *param_2,long param_3)
{
ulong uVar1;
int8 uVar2;
int *puVar3;
ulong uVar4;
int8 uVar5;
int8 uVar6;
ulong uVar7;
ulong uVar8;
bool bVar9;
long in_FS_OFFSET;
bool bVar10;
int1 local_238 [256];
int1 local_138 [264];
long local_30;
puVar3 = my_getopt_error_reporter;
local_30 = *(long *)(in_FS_OFFSET + 0x28);
if ((long)param_1 < 1) {
bVar9 = true;
uVar4 = param_1;
}
else {
uVar4 = param_2[10];
bVar9 = uVar4 == 0 || param_1 <= uVar4;
if (uVar4 == 0 || param_1 <= uVar4) {
uVar4 = param_1;
}
}
bVar10 = (*(uint *)(param_2 + 6) & 0x3f) != 3;
uVar8 = 0x7fffffff;
if ((long)uVar4 < 0x80000000 || bVar10) {
uVar8 = uVar4;
}
uVar8 = uVar8 - uVar8 % (param_2[0xc] + (ulong)(param_2[0xc] == 0));
uVar1 = param_2[9];
uVar7 = uVar1;
if ((long)uVar1 < (long)uVar8) {
uVar7 = uVar8;
}
if (param_3 == 0) {
if (!(bool)((((long)uVar1 <= (long)param_1 || (long)uVar1 <= (long)uVar8) &&
((long)uVar4 < 0x80000000 || bVar10)) & bVar9)) {
uVar2 = *param_2;
uVar5 = llstr(param_1,local_138);
uVar6 = llstr(uVar7,local_238);
(*(code *)puVar3)(1,"option \'%s\': signed value %s adjusted to %s",uVar2,uVar5,uVar6);
}
}
else {
*(bool *)param_3 = uVar7 != param_1;
}
if (*(long *)(in_FS_OFFSET + 0x28) != local_30) {
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
return uVar7;
}
|
|
64,213
|
nlohmann::json_abi_v3_11_3::ordered_map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>, std::less<void>, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>>>::emplace(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>&&)
|
monkey531[P]llama/common/json.hpp
|
std::pair<iterator, bool> emplace(const key_type& key, T&& t)
{
for (auto it = this->begin(); it != this->end(); ++it)
{
if (m_compare(it->first, key))
{
return {it, false};
}
}
Container::emplace_back(key, std::forward<T>(t));
return {std::prev(this->end()), true};
}
|
O1
|
cpp
|
nlohmann::json_abi_v3_11_3::ordered_map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>, std::less<void>, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>>>::emplace(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>&&):
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdx, %r15
movq %rsi, %r12
movq %rdi, %r14
movq (%rdi), %rbx
cmpq 0x8(%rdi), %rbx
sete %bpl
je 0x90d7c
movq %rbx, %rdi
movq %r12, %rsi
callq 0x8f09f
testb %al, %al
jne 0x90d77
addq $0x60, %rbx
cmpq 0x8(%r14), %rbx
jmp 0x90d58
testb %bpl, %bpl
je 0x90d96
movq %r14, %rdi
movq %r12, %rsi
movq %r15, %rdx
callq 0x90da4
movq 0x8(%r14), %rbx
addq $-0x60, %rbx
movb $0x1, %dl
jmp 0x90d98
xorl %edx, %edx
movq %rbx, %rax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
|
_ZN8nlohmann16json_abi_v3_11_311ordered_mapINS0_10basic_jsonIS1_St6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEEN5minja5ValueESt4lessISD_ESaISt4pairIKSD_SF_EEE7emplaceERSJ_OSF_:
push rbp
push r15
push r14
push r12
push rbx
mov r15, rdx
mov r12, rsi
mov r14, rdi
mov rbx, [rdi]
cmp rbx, [rdi+8]
loc_90D58:
setz bpl
jz short loc_90D7C
mov rdi, rbx
mov rsi, r12
call _ZN8nlohmann16json_abi_v3_11_3eqERKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEESF_; nlohmann::json_abi_v3_11_3::operator==(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const&,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const&)
test al, al
jnz short loc_90D77
add rbx, 60h ; '`'
cmp rbx, [r14+8]
jmp short loc_90D58
loc_90D77:
test bpl, bpl
jz short loc_90D96
loc_90D7C:
mov rdi, r14
mov rsi, r12
mov rdx, r15
call _ZNSt6vectorISt4pairIKN8nlohmann16json_abi_v3_11_310basic_jsonINS2_11ordered_mapES_NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS2_14adl_serializerES_IhSaIhEEvEEN5minja5ValueEESaISI_EE12emplace_backIJRSF_SH_EEERSI_DpOT_; std::vector<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const,minja::Value>>::emplace_back<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const&,minja::Value>(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const&,minja::Value &&)
mov rbx, [r14+8]
add rbx, 0FFFFFFFFFFFFFFA0h
mov dl, 1
jmp short loc_90D98
loc_90D96:
xor edx, edx
loc_90D98:
mov rax, rbx
pop rbx
pop r12
pop r14
pop r15
pop rbp
retn
|
long long nlohmann::json_abi_v3_11_3::ordered_map<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,minja::Value,std::less<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>,std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> const,minja::Value>>>::emplace(
long long a1,
unsigned __int8 *a2,
long long a3,
__m128d a4)
{
unsigned __int8 *v5; // rbx
bool i; // zf
bool v7; // bp
v5 = *(unsigned __int8 **)a1;
for ( i = *(_QWORD *)a1 == *(_QWORD *)(a1 + 8); ; i = v5 == *(unsigned __int8 **)(a1 + 8) )
{
v7 = i;
if ( i )
break;
if ( (unsigned __int8)nlohmann::json_abi_v3_11_3::operator==(v5, a2, a4) )
{
if ( !v7 )
return (long long)v5;
break;
}
v5 += 96;
}
std::vector<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> const,minja::Value>>::emplace_back<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> const&,minja::Value>(
a1,
a2,
a3);
return *(_QWORD *)(a1 + 8) - 96LL;
}
|
emplace:
PUSH RBP
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
MOV R15,RDX
MOV R12,RSI
MOV R14,RDI
MOV RBX,qword ptr [RDI]
CMP RBX,qword ptr [RDI + 0x8]
LAB_00190d58:
SETZ BPL
JZ 0x00190d7c
MOV RDI,RBX
MOV RSI,R12
CALL 0x0018f09f
TEST AL,AL
JNZ 0x00190d77
ADD RBX,0x60
CMP RBX,qword ptr [R14 + 0x8]
JMP 0x00190d58
LAB_00190d77:
TEST BPL,BPL
JZ 0x00190d96
LAB_00190d7c:
MOV RDI,R14
MOV RSI,R12
MOV RDX,R15
CALL 0x00190da4
MOV RBX,qword ptr [R14 + 0x8]
ADD RBX,-0x60
MOV DL,0x1
JMP 0x00190d98
LAB_00190d96:
XOR EDX,EDX
LAB_00190d98:
MOV RAX,RBX
POP RBX
POP R12
POP R14
POP R15
POP RBP
RET
|
/* nlohmann::json_abi_v3_11_3::ordered_map<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,
std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void>, minja::Value,
std::less<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,
std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void> >,
std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,
std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void> const, minja::Value> >
>::emplace(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,
std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void> const&, minja::Value&&) */
int1 [16] __thiscall
nlohmann::json_abi_v3_11_3::
ordered_map<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,minja::Value,std::less<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>,std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const,minja::Value>>>
::emplace(ordered_map<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,minja::Value,std::less<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>,std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const,minja::Value>>>
*this,basic_json *param_1,Value *param_2)
{
char cVar1;
int8 extraout_RDX;
int8 uVar2;
basic_json *pbVar3;
bool bVar4;
int1 auVar5 [16];
pbVar3 = *(basic_json **)this;
bVar4 = pbVar3 == *(basic_json **)(this + 8);
do {
if (bVar4) {
LAB_00190d7c:
std::
vector<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const,minja::Value>,std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const,minja::Value>>>
::
emplace_back<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const&,minja::Value>
((vector<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const,minja::Value>,std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const,minja::Value>>>
*)this,param_1,param_2);
pbVar3 = (basic_json *)(*(long *)(this + 8) + -0x60);
uVar2 = CONCAT71((int7)((ulong)extraout_RDX >> 8),1);
LAB_00190d98:
auVar5._8_8_ = uVar2;
auVar5._0_8_ = pbVar3;
return auVar5;
}
cVar1 = operator==(pbVar3,param_1);
if (cVar1 != '\0') {
if (!bVar4) {
uVar2 = 0;
goto LAB_00190d98;
}
goto LAB_00190d7c;
}
pbVar3 = pbVar3 + 0x60;
bVar4 = pbVar3 == *(basic_json **)(this + 8);
} while( true );
}
|
|
64,214
|
nlohmann::json_abi_v3_11_3::ordered_map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>, std::less<void>, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>>>::emplace(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>&&)
|
monkey531[P]llama/common/json.hpp
|
std::pair<iterator, bool> emplace(const key_type& key, T&& t)
{
for (auto it = this->begin(); it != this->end(); ++it)
{
if (m_compare(it->first, key))
{
return {it, false};
}
}
Container::emplace_back(key, std::forward<T>(t));
return {std::prev(this->end()), true};
}
|
O3
|
cpp
|
nlohmann::json_abi_v3_11_3::ordered_map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>, std::less<void>, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>>>::emplace(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>&&):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, (%rsp)
movq %rsi, %r12
movq %rdi, %r14
movq (%rdi), %rbx
movq 0x8(%rdi), %r15
cmpq %r15, %rbx
je 0x5fda6
movq (%r12), %r13
movq 0x8(%r12), %rbp
cmpq %rbp, 0x8(%rbx)
jne 0x5fd9d
testq %rbp, %rbp
je 0x5fdc1
movq (%rbx), %rdi
movq %r13, %rsi
movq %rbp, %rdx
callq 0x1a920
testl %eax, %eax
je 0x5fdc1
addq $0x30, %rbx
cmpq %r15, %rbx
jne 0x5fd80
movq %r14, %rdi
movq %r12, %rsi
movq (%rsp), %rdx
callq 0x5fdd6
movq 0x8(%r14), %rbx
addq $-0x30, %rbx
movb $0x1, %dl
jmp 0x5fdc3
xorl %edx, %edx
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
|
_ZN8nlohmann16json_abi_v3_11_311ordered_mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS0_10basic_jsonIS1_St6vectorS7_blmdSaNS0_14adl_serializerES9_IhSaIhEEvEESt4lessIvESaISt4pairIKS7_SD_EEE7emplaceERSH_OSD_:
push rbp
push r15
push r14
push r13
push r12
push rbx
push rax
mov [rsp+38h+var_38], rdx
mov r12, rsi
mov r14, rdi
mov rbx, [rdi]
mov r15, [rdi+8]
cmp rbx, r15
jz short loc_5FDA6
mov r13, [r12]
mov rbp, [r12+8]
loc_5FD80:
cmp [rbx+8], rbp
jnz short loc_5FD9D
test rbp, rbp
jz short loc_5FDC1
mov rdi, [rbx]
mov rsi, r13
mov rdx, rbp
call _bcmp
test eax, eax
jz short loc_5FDC1
loc_5FD9D:
add rbx, 30h ; '0'
cmp rbx, r15
jnz short loc_5FD80
loc_5FDA6:
mov rdi, r14
mov rsi, r12
mov rdx, [rsp+38h+var_38]
call _ZNSt6vectorISt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN8nlohmann16json_abi_v3_11_310basic_jsonINS9_11ordered_mapES_S6_blmdSaNS9_14adl_serializerES_IhSaIhEEvEEESaISG_EE12emplace_backIJRS7_SF_EEERSG_DpOT_; std::vector<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>>::emplace_back<std::string const&,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>(std::string const&,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> &&)
mov rbx, [r14+8]
add rbx, 0FFFFFFFFFFFFFFD0h
mov dl, 1
jmp short loc_5FDC3
loc_5FDC1:
xor edx, edx
loc_5FDC3:
mov rax, rbx
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
|
long long nlohmann::json_abi_v3_11_3::ordered_map<std::string,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,std::less<void>,std::allocator<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>>>::emplace(
_QWORD *a1,
long long *a2,
long long a3)
{
_QWORD *v3; // rbx
_QWORD *v4; // r15
long long v5; // r13
long long v6; // rbp
v3 = (_QWORD *)*a1;
v4 = (_QWORD *)a1[1];
if ( (_QWORD *)*a1 == v4 )
{
LABEL_7:
std::vector<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>>::emplace_back<std::string const&,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>(
a1,
a2,
a3);
return a1[1] - 48LL;
}
else
{
v5 = *a2;
v6 = a2[1];
while ( v3[1] != v6 || v6 && (unsigned int)bcmp(*v3, v5) )
{
v3 += 6;
if ( v3 == v4 )
goto LABEL_7;
}
}
return (long long)v3;
}
|
emplace:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
PUSH RAX
MOV qword ptr [RSP],RDX
MOV R12,RSI
MOV R14,RDI
MOV RBX,qword ptr [RDI]
MOV R15,qword ptr [RDI + 0x8]
CMP RBX,R15
JZ 0x0015fda6
MOV R13,qword ptr [R12]
MOV RBP,qword ptr [R12 + 0x8]
LAB_0015fd80:
CMP qword ptr [RBX + 0x8],RBP
JNZ 0x0015fd9d
TEST RBP,RBP
JZ 0x0015fdc1
MOV RDI,qword ptr [RBX]
MOV RSI,R13
MOV RDX,RBP
CALL 0x0011a920
TEST EAX,EAX
JZ 0x0015fdc1
LAB_0015fd9d:
ADD RBX,0x30
CMP RBX,R15
JNZ 0x0015fd80
LAB_0015fda6:
MOV RDI,R14
MOV RSI,R12
MOV RDX,qword ptr [RSP]
CALL 0x0015fdd6
MOV RBX,qword ptr [R14 + 0x8]
ADD RBX,-0x30
MOV DL,0x1
JMP 0x0015fdc3
LAB_0015fdc1:
XOR EDX,EDX
LAB_0015fdc3:
MOV RAX,RBX
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
/* nlohmann::json_abi_v3_11_3::ordered_map<std::__cxx11::string,
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector,
std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void>, std::less<void>, std::allocator<std::pair<std::__cxx11::string const,
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector,
std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void> > > >::emplace(std::__cxx11::string const&,
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector,
std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void>&&) */
int1 [16] __thiscall
nlohmann::json_abi_v3_11_3::
ordered_map<std::__cxx11::string,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,std::less<void>,std::allocator<std::pair<std::__cxx11::string_const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>>
::emplace(ordered_map<std::__cxx11::string,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,std::less<void>,std::allocator<std::pair<std::__cxx11::string_const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>>
*this,string *param_1,basic_json *param_2)
{
int8 *puVar1;
void *__s2;
size_t __n;
int iVar2;
int8 extraout_RDX;
int8 uVar3;
int8 *puVar4;
int1 auVar5 [16];
puVar4 = *(int8 **)this;
puVar1 = *(int8 **)(this + 8);
if (puVar4 != puVar1) {
__s2 = *(void **)param_1;
__n = *(size_t *)(param_1 + 8);
do {
if (puVar4[1] == __n) {
if (__n != 0) {
iVar2 = bcmp((void *)*puVar4,__s2,__n);
if (iVar2 != 0) goto LAB_0015fd9d;
}
uVar3 = 0;
goto LAB_0015fdc3;
}
LAB_0015fd9d:
puVar4 = puVar4 + 6;
} while (puVar4 != puVar1);
}
std::
vector<std::pair<std::__cxx11::string_const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>,std::allocator<std::pair<std::__cxx11::string_const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>>
::
emplace_back<std::__cxx11::string_const&,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>
((vector<std::pair<std::__cxx11::string_const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>,std::allocator<std::pair<std::__cxx11::string_const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>>
*)this,param_1,param_2);
puVar4 = (int8 *)(*(long *)(this + 8) + -0x30);
uVar3 = CONCAT71((int7)((ulong)extraout_RDX >> 8),1);
LAB_0015fdc3:
auVar5._8_8_ = uVar3;
auVar5._0_8_ = puVar4;
return auVar5;
}
|
|
64,215
|
translog_buffer_destroy
|
eloqsql/storage/maria/ma_loghandler.c
|
static void translog_buffer_destroy(struct st_translog_buffer *buffer)
{
DBUG_ENTER("translog_buffer_destroy");
DBUG_PRINT("enter",
("Buffer #%u: %p file: %d offset: " LSN_FMT " size: %lu",
(uint) buffer->buffer_no, buffer,
(buffer->file ? buffer->file->handler.file : -1),
LSN_IN_PARTS(buffer->offset),
(ulong) buffer->size));
if (buffer->file != NULL)
{
/*
We ignore errors here, because we can't do something about it
(it is shutting down)
We also have to take the locks even if there can't be any other
threads running, because translog_buffer_flush()
requires that we have the buffer locked.
*/
translog_buffer_lock(buffer);
translog_buffer_flush(buffer);
translog_buffer_unlock(buffer);
}
DBUG_PRINT("info", ("Destroy mutex: %p", &buffer->mutex));
mysql_mutex_destroy(&buffer->mutex);
mysql_cond_destroy(&buffer->waiting_filling_buffer);
DBUG_VOID_RETURN;
}
|
O0
|
c
|
translog_buffer_destroy:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
jmp 0x3006e
movq -0x8(%rbp), %rax
cmpq $0x0, 0x100038(%rax)
je 0x30097
movq -0x8(%rbp), %rdi
callq 0x2c440
movq -0x8(%rbp), %rdi
callq 0x32670
movq -0x8(%rbp), %rdi
callq 0x2c480
jmp 0x30099
jmp 0x3009b
movq -0x8(%rbp), %rdi
addq $0x100090, %rdi # imm = 0x100090
callq 0x30190
movq -0x8(%rbp), %rdi
addq $0x100040, %rdi # imm = 0x100040
callq 0x301e0
jmp 0x300bd
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
|
translog_buffer_destroy:
push rbp
mov rbp, rsp
sub rsp, 10h
mov [rbp+var_8], rdi
jmp short $+2
loc_3006E:
mov rax, [rbp+var_8]
cmp qword ptr ds:loc_100038[rax], 0
jz short loc_30097
mov rdi, [rbp+var_8]
call translog_buffer_lock
mov rdi, [rbp+var_8]
call translog_buffer_flush
mov rdi, [rbp+var_8]
call translog_buffer_unlock
loc_30097:
jmp short $+2
loc_30099:
jmp short $+2
loc_3009B:
mov rdi, [rbp+var_8]
add rdi, 100090h
call inline_mysql_mutex_destroy
mov rdi, [rbp+var_8]
add rdi, 100040h
call inline_mysql_cond_destroy
jmp short $+2
loc_300BD:
add rsp, 10h
pop rbp
retn
|
long long translog_buffer_destroy(long long a1)
{
if ( *(_QWORD *)((char *)&loc_100038 + a1) )
{
translog_buffer_lock(a1);
translog_buffer_flush(a1);
translog_buffer_unlock(a1);
}
inline_mysql_mutex_destroy(a1 + 1048720);
return inline_mysql_cond_destroy(a1 + 1048640);
}
|
translog_buffer_destroy:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x10
MOV qword ptr [RBP + -0x8],RDI
JMP 0x0013006e
LAB_0013006e:
MOV RAX,qword ptr [RBP + -0x8]
CMP qword ptr [RAX + 0x100038],0x0
JZ 0x00130097
MOV RDI,qword ptr [RBP + -0x8]
CALL 0x0012c440
MOV RDI,qword ptr [RBP + -0x8]
CALL 0x00132670
MOV RDI,qword ptr [RBP + -0x8]
CALL 0x0012c480
LAB_00130097:
JMP 0x00130099
LAB_00130099:
JMP 0x0013009b
LAB_0013009b:
MOV RDI,qword ptr [RBP + -0x8]
ADD RDI,0x100090
CALL 0x00130190
MOV RDI,qword ptr [RBP + -0x8]
ADD RDI,0x100040
CALL 0x001301e0
JMP 0x001300bd
LAB_001300bd:
ADD RSP,0x10
POP RBP
RET
|
void translog_buffer_destroy(long param_1)
{
if (*(long *)(Elf64_Ehdr_00100000.e_ident_pad + param_1 + 0x2f) != 0) {
translog_buffer_lock(param_1);
translog_buffer_flush(param_1);
translog_buffer_unlock(param_1);
}
inline_mysql_mutex_destroy(param_1 + 0x100090);
inline_mysql_cond_destroy((long)&Elf64_Phdr_ARRAY_00100040[0].p_type + param_1);
return;
}
|
|
64,216
|
bf_set_nan
|
bluesky950520[P]quickjs/libbf.c
|
void bf_set_nan(bf_t *r)
{
bf_resize(r, 0); /* cannot fail */
r->expn = BF_EXP_NAN;
r->sign = 0;
}
|
O1
|
c
|
bf_set_nan:
pushq %rbx
movq %rdi, %rbx
cmpq $0x0, 0x18(%rdi)
je 0x84bc6
movq (%rbx), %rax
movq 0x20(%rbx), %rsi
movq (%rax), %rdi
xorl %edx, %edx
callq *0x8(%rax)
movq %rax, 0x20(%rbx)
movq $0x0, 0x18(%rbx)
movabsq $0x7fffffffffffffff, %rax # imm = 0x7FFFFFFFFFFFFFFF
movq %rax, 0x10(%rbx)
movl $0x0, 0x8(%rbx)
popq %rbx
retq
|
bf_set_nan:
push rbx
mov rbx, rdi
cmp qword ptr [rdi+18h], 0
jz short loc_84BC6
mov rax, [rbx]
mov rsi, [rbx+20h]
mov rdi, [rax]
xor edx, edx
call qword ptr [rax+8]
mov [rbx+20h], rax
mov qword ptr [rbx+18h], 0
loc_84BC6:
mov rax, 7FFFFFFFFFFFFFFFh
mov [rbx+10h], rax
mov dword ptr [rbx+8], 0
pop rbx
retn
|
long long bf_set_nan(_QWORD *a1)
{
long long result; // rax
if ( a1[3] )
{
a1[4] = (*(long long ( **)(_QWORD, _QWORD, _QWORD))(*a1 + 8LL))(*(_QWORD *)*a1, a1[4], 0LL);
a1[3] = 0LL;
}
result = 0x7FFFFFFFFFFFFFFFLL;
a1[2] = 0x7FFFFFFFFFFFFFFFLL;
*((_DWORD *)a1 + 2) = 0;
return result;
}
|
bf_set_nan:
PUSH RBX
MOV RBX,RDI
CMP qword ptr [RDI + 0x18],0x0
JZ 0x00184bc6
MOV RAX,qword ptr [RBX]
MOV RSI,qword ptr [RBX + 0x20]
MOV RDI,qword ptr [RAX]
XOR EDX,EDX
CALL qword ptr [RAX + 0x8]
MOV qword ptr [RBX + 0x20],RAX
MOV qword ptr [RBX + 0x18],0x0
LAB_00184bc6:
MOV RAX,0x7fffffffffffffff
MOV qword ptr [RBX + 0x10],RAX
MOV dword ptr [RBX + 0x8],0x0
POP RBX
RET
|
void bf_set_nan(long *param_1)
{
long lVar1;
if (param_1[3] != 0) {
lVar1 = (*(code *)((int8 *)*param_1)[1])(*(int8 *)*param_1,param_1[4],0);
param_1[4] = lVar1;
param_1[3] = 0;
}
param_1[2] = 0x7fffffffffffffff;
*(int4 *)(param_1 + 1) = 0;
return;
}
|
|
64,217
|
LefDefParser::lefiViaRule::propValue(int) const
|
Efficient-TDP/thirdparty/Limbo/limbo/thirdparty/lefdef/5.8/lef/lef/lefiViaRule.cpp
|
const char *
lefiViaRule::propValue(int i) const
{
char msg[160];
if (i < 0 || i >= numProps_) {
sprintf(msg, "ERROR (LEFPARS-1431): The index number %d given for the VIARULE PROPERTY is invalid.\nValid index is from 0 to %d", i, numProps_);
lefiError(0, 1431, msg);
return 0;
}
return values_[i];
}
|
O3
|
cpp
|
LefDefParser::lefiViaRule::propValue(int) const:
pushq %r14
pushq %rbx
subq $0xa8, %rsp
movl %esi, %edx
testl %esi, %esi
setns %al
movl 0x1d8(%rdi), %ecx
cmpl %esi, %ecx
setg %sil
testb %sil, %al
je 0x21d5f
movq 0x1e8(%rdi), %rax
movl %edx, %ecx
movq (%rax,%rcx,8), %rbx
jmp 0x21d84
leaq 0x2e06e(%rip), %rsi # 0x4fdd4
xorl %ebx, %ebx
movq %rsp, %r14
movq %r14, %rdi
xorl %eax, %eax
callq 0x2050
xorl %edi, %edi
movl $0x597, %esi # imm = 0x597
movq %r14, %rdx
callq 0x27ae8
movq %rbx, %rax
addq $0xa8, %rsp
popq %rbx
popq %r14
retq
|
_ZNK12LefDefParser11lefiViaRule9propValueEi:
push r14
push rbx
sub rsp, 0A8h
mov edx, esi
test esi, esi
setns al
mov ecx, [rdi+1D8h]
cmp ecx, esi
setnle sil
test al, sil
jz short loc_21D5F
mov rax, [rdi+1E8h]
mov ecx, edx
mov rbx, [rax+rcx*8]
jmp short loc_21D84
loc_21D5F:
lea rsi, aErrorLefpars14_11; "ERROR (LEFPARS-1431): The index number "...
xor ebx, ebx
mov r14, rsp
mov rdi, r14
xor eax, eax
call _sprintf
xor edi, edi; this
mov esi, 597h; int
mov rdx, r14; int
call _ZN12LefDefParser9lefiErrorEiiPKc; LefDefParser::lefiError(int,int,char const*)
loc_21D84:
mov rax, rbx
add rsp, 0A8h
pop rbx
pop r14
retn
|
long long LefDefParser::lefiViaRule::propValue(LefDefParser::lefiViaRule *this, signed int a2)
{
int v2; // ecx
long long v3; // rbx
const char *v4; // rcx
_BYTE v6[184]; // [rsp+0h] [rbp-B8h] BYREF
v2 = *((_DWORD *)this + 118);
if ( v2 > a2 && a2 >= 0 )
return *(_QWORD *)(*((_QWORD *)this + 61) + 8LL * (unsigned int)a2);
v3 = 0LL;
sprintf(
v6,
"ERROR (LEFPARS-1431): The index number %d given for the VIARULE PROPERTY is invalid.\nValid index is from 0 to %d",
a2,
v2);
LefDefParser::lefiError(0LL, 1431, (int)v6, v4);
return v3;
}
|
propValue:
PUSH R14
PUSH RBX
SUB RSP,0xa8
MOV EDX,ESI
TEST ESI,ESI
SETNS AL
MOV ECX,dword ptr [RDI + 0x1d8]
CMP ECX,ESI
SETG SIL
TEST AL,SIL
JZ 0x00121d5f
MOV RAX,qword ptr [RDI + 0x1e8]
MOV ECX,EDX
MOV RBX,qword ptr [RAX + RCX*0x8]
JMP 0x00121d84
LAB_00121d5f:
LEA RSI,[0x14fdd4]
XOR EBX,EBX
MOV R14,RSP
MOV RDI,R14
XOR EAX,EAX
CALL 0x00102050
XOR EDI,EDI
MOV ESI,0x597
MOV RDX,R14
CALL 0x00127ae8
LAB_00121d84:
MOV RAX,RBX
ADD RSP,0xa8
POP RBX
POP R14
RET
|
/* LefDefParser::lefiViaRule::propValue(int) const */
int8 __thiscall LefDefParser::lefiViaRule::propValue(lefiViaRule *this,int param_1)
{
int8 uVar1;
char acStack_b8 [168];
if (param_1 < 0 || *(int *)(this + 0x1d8) <= param_1) {
uVar1 = 0;
sprintf(acStack_b8,
"ERROR (LEFPARS-1431): The index number %d given for the VIARULE PROPERTY is invalid.\nValid index is from 0 to %d"
);
lefiError(0,0x597,acStack_b8);
}
else {
uVar1 = *(int8 *)(*(long *)(this + 0x1e8) + (ulong)(uint)param_1 * 8);
}
return uVar1;
}
|
|
64,218
|
ggml_backend_sched_new
|
monkey531[P]llama/ggml/src/ggml-backend.cpp
|
ggml_backend_sched_t ggml_backend_sched_new(
ggml_backend_t * backends,
ggml_backend_buffer_type_t * bufts,
int n_backends,
size_t graph_size,
bool parallel) {
GGML_ASSERT(n_backends > 0);
GGML_ASSERT(n_backends <= GGML_SCHED_MAX_BACKENDS);
GGML_ASSERT(ggml_backend_dev_type(ggml_backend_get_device(backends[n_backends - 1])) == GGML_BACKEND_DEVICE_TYPE_CPU);
struct ggml_backend_sched * sched = (ggml_backend_sched *) calloc(1, sizeof(struct ggml_backend_sched));
const char * GGML_SCHED_DEBUG = getenv("GGML_SCHED_DEBUG");
sched->debug = GGML_SCHED_DEBUG ? atoi(GGML_SCHED_DEBUG) : 0;
sched->n_backends = n_backends;
sched->n_copies = parallel ? GGML_SCHED_MAX_COPIES : 1;
// initialize hash table
// FIXME: needs to be size*2 to account for leafs (do it in graph_split instead)
sched->hash_set = ggml_hash_set_new(graph_size);
sched->hv_tensor_backend_ids = (int *) malloc(sched->hash_set.size * sizeof(sched->hv_tensor_backend_ids[0]));
sched->hv_tensor_copies = (ggml_tensor **) malloc(sched->hash_set.size * sched->n_backends * sched->n_copies * sizeof(struct ggml_tensor *));
const size_t ggml_sched_max_splits = graph_size; // at most there is one split for each node in the graph
const size_t nodes_size = graph_size + ggml_sched_max_splits*GGML_SCHED_MAX_SPLIT_INPUTS*2;
sched->node_backend_ids = (int *) calloc(nodes_size, sizeof(sched->node_backend_ids[0]));
sched->leaf_backend_ids = (int *) calloc(nodes_size, sizeof(sched->leaf_backend_ids[0]));
sched->prev_node_backend_ids = (int *) calloc(nodes_size, sizeof(sched->prev_node_backend_ids[0]));
sched->prev_leaf_backend_ids = (int *) calloc(nodes_size, sizeof(sched->prev_leaf_backend_ids[0]));
sched->context_buffer_size = ggml_sched_max_splits*GGML_SCHED_MAX_SPLIT_INPUTS*2*sizeof(struct ggml_tensor) + ggml_graph_overhead_custom(graph_size, false);
sched->context_buffer = (char *) malloc(sched->context_buffer_size);
const int initial_splits_capacity = 16;
sched->splits = (ggml_backend_sched_split *) calloc(initial_splits_capacity, sizeof(sched->splits[0]));
sched->splits_capacity = initial_splits_capacity;
for (int b = 0; b < n_backends; b++) {
sched->backends[b] = backends[b];
sched->bufts[b] = bufts ? bufts[b] : ggml_backend_get_default_buffer_type(backends[b]);
GGML_ASSERT(ggml_backend_supports_buft(backends[b], sched->bufts[b]));
if (sched->n_copies > 1) {
for (int c = 0; c < sched->n_copies; c++) {
sched->events[b][c] = ggml_backend_event_new(backends[b]->device);
}
}
}
sched->galloc = ggml_gallocr_new_n(sched->bufts, n_backends);
ggml_backend_sched_reset(sched);
return sched;
}
|
O0
|
cpp
|
ggml_backend_sched_new:
subq $0x88, %rsp
movb %r8b, %al
movq %rdi, 0x80(%rsp)
movq %rsi, 0x78(%rsp)
movl %edx, 0x74(%rsp)
movq %rcx, 0x68(%rsp)
andb $0x1, %al
movb %al, 0x67(%rsp)
cmpl $0x0, 0x74(%rsp)
jg 0x5ee5e
leaq 0x586b5(%rip), %rdi # 0xb74f9
movl $0x5ae, %esi # imm = 0x5AE
leaq 0x557b1(%rip), %rdx # 0xb4601
leaq 0x589d0(%rip), %rcx # 0xb7827
movb $0x0, %al
callq 0x46770
cmpl $0x10, 0x74(%rsp)
jle 0x5ee86
leaq 0x5868d(%rip), %rdi # 0xb74f9
movl $0x5af, %esi # imm = 0x5AF
leaq 0x55789(%rip), %rdx # 0xb4601
leaq 0x589b7(%rip), %rcx # 0xb7836
movb $0x0, %al
callq 0x46770
movq 0x80(%rsp), %rax
movl 0x74(%rsp), %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
movq (%rax,%rcx,8), %rdi
callq 0x40150
movq %rax, %rdi
callq 0x409d0
cmpl $0x0, %eax
je 0x5eecf
leaq 0x58644(%rip), %rdi # 0xb74f9
movl $0x5b0, %esi # imm = 0x5B0
leaq 0x55740(%rip), %rdx # 0xb4601
leaq 0x58994(%rip), %rcx # 0xb785c
movb $0x0, %al
callq 0x46770
movl $0x1, %edi
movl $0x448, %esi # imm = 0x448
callq 0x42810
movq %rax, 0x58(%rsp)
leaq 0x589db(%rip), %rdi # 0xb78c5
callq 0x44a30
movq %rax, 0x50(%rsp)
cmpq $0x0, 0x50(%rsp)
je 0x5ef0c
movq 0x50(%rsp), %rdi
callq 0x45f60
movl %eax, 0x18(%rsp)
jmp 0x5ef14
xorl %eax, %eax
movl %eax, 0x18(%rsp)
jmp 0x5ef14
movl 0x18(%rsp), %ecx
movq 0x58(%rsp), %rax
movl %ecx, 0x440(%rax)
movl 0x74(%rsp), %ecx
movq 0x58(%rsp), %rax
movl %ecx, 0x4(%rax)
movb 0x67(%rsp), %dl
movl $0x1, %ecx
movl $0x4, %eax
testb $0x1, %dl
cmovnel %eax, %ecx
movq 0x58(%rsp), %rax
movl %ecx, 0x1b8(%rax)
movq 0x68(%rsp), %rsi
leaq 0x38(%rsp), %rdi
callq 0x40560
movq 0x58(%rsp), %rax
movq 0x38(%rsp), %rcx
movq %rcx, 0x110(%rax)
movq 0x40(%rsp), %rcx
movq %rcx, 0x118(%rax)
movq 0x48(%rsp), %rcx
movq %rcx, 0x120(%rax)
movq 0x58(%rsp), %rax
movq 0x110(%rax), %rdi
shlq $0x2, %rdi
callq 0x45080
movq %rax, %rcx
movq 0x58(%rsp), %rax
movq %rcx, 0x128(%rax)
movq 0x58(%rsp), %rax
movq 0x110(%rax), %rdi
movq 0x58(%rsp), %rax
movslq 0x4(%rax), %rax
imulq %rax, %rdi
movq 0x58(%rsp), %rax
movslq 0x1b8(%rax), %rax
imulq %rax, %rdi
shlq $0x3, %rdi
callq 0x45080
movq %rax, %rcx
movq 0x58(%rsp), %rax
movq %rcx, 0x130(%rax)
movq 0x68(%rsp), %rax
movq %rax, 0x30(%rsp)
movq 0x68(%rsp), %rax
imulq $0xa, 0x30(%rsp), %rcx
shlq %rcx
addq %rcx, %rax
movq %rax, 0x28(%rsp)
movq 0x28(%rsp), %rdi
movl $0x4, %esi
callq 0x42810
movq %rax, %rcx
movq 0x58(%rsp), %rax
movq %rcx, 0x138(%rax)
movq 0x28(%rsp), %rdi
movl $0x4, %esi
callq 0x42810
movq %rax, %rcx
movq 0x58(%rsp), %rax
movq %rcx, 0x140(%rax)
movq 0x28(%rsp), %rdi
movl $0x4, %esi
callq 0x42810
movq %rax, %rcx
movq 0x58(%rsp), %rax
movq %rcx, 0x148(%rax)
movq 0x28(%rsp), %rdi
movl $0x4, %esi
callq 0x42810
movq %rax, %rcx
movq 0x58(%rsp), %rax
movq %rcx, 0x150(%rax)
imulq $0xa, 0x30(%rsp), %rax
shlq %rax
imulq $0x150, %rax, %rax # imm = 0x150
movq %rax, 0x10(%rsp)
movq 0x68(%rsp), %rdi
xorl %esi, %esi
callq 0x453f0
movq 0x10(%rsp), %rcx
addq %rax, %rcx
movq 0x58(%rsp), %rax
movq %rcx, 0x438(%rax)
movq 0x58(%rsp), %rax
movq 0x438(%rax), %rdi
callq 0x45080
movq %rax, %rcx
movq 0x58(%rsp), %rax
movq %rcx, 0x430(%rax)
movl $0x10, 0x24(%rsp)
movl $0x10, %edi
movl $0xb8, %esi
callq 0x42810
movq %rax, %rcx
movq 0x58(%rsp), %rax
movq %rcx, 0x1a8(%rax)
movq 0x58(%rsp), %rax
movl $0x10, 0x1b4(%rax)
movl $0x0, 0x20(%rsp)
movl 0x20(%rsp), %eax
cmpl 0x74(%rsp), %eax
jge 0x5f264
movq 0x80(%rsp), %rax
movslq 0x20(%rsp), %rcx
movq (%rax,%rcx,8), %rdx
movq 0x58(%rsp), %rax
movslq 0x20(%rsp), %rcx
movq %rdx, 0x8(%rax,%rcx,8)
cmpq $0x0, 0x78(%rsp)
je 0x5f160
movq 0x78(%rsp), %rax
movslq 0x20(%rsp), %rcx
movq (%rax,%rcx,8), %rax
movq %rax, 0x8(%rsp)
jmp 0x5f17b
movq 0x80(%rsp), %rax
movslq 0x20(%rsp), %rcx
movq (%rax,%rcx,8), %rdi
callq 0x46fd0
movq %rax, 0x8(%rsp)
movq 0x8(%rsp), %rdx
movq 0x58(%rsp), %rax
movslq 0x20(%rsp), %rcx
movq %rdx, 0x88(%rax,%rcx,8)
movq 0x80(%rsp), %rax
movslq 0x20(%rsp), %rcx
movq (%rax,%rcx,8), %rdi
movq 0x58(%rsp), %rax
movslq 0x20(%rsp), %rcx
movq 0x88(%rax,%rcx,8), %rsi
callq 0x45d70
testb $0x1, %al
jne 0x5f1df
leaq 0x58334(%rip), %rdi # 0xb74f9
movl $0x5d0, %esi # imm = 0x5D0
leaq 0x55430(%rip), %rdx # 0xb4601
leaq 0x586fe(%rip), %rcx # 0xb78d6
movb $0x0, %al
callq 0x46770
movq 0x58(%rsp), %rax
cmpl $0x1, 0x1b8(%rax)
jle 0x5f252
movl $0x0, 0x1c(%rsp)
movl 0x1c(%rsp), %eax
movq 0x58(%rsp), %rcx
cmpl 0x1b8(%rcx), %eax
jge 0x5f250
movq 0x80(%rsp), %rax
movslq 0x20(%rsp), %rcx
movq (%rax,%rcx,8), %rax
movq 0x70(%rax), %rdi
callq 0x412c0
movq %rax, %rdx
movq 0x58(%rsp), %rax
addq $0x1c0, %rax # imm = 0x1C0
movslq 0x20(%rsp), %rcx
shlq $0x5, %rcx
addq %rcx, %rax
movslq 0x1c(%rsp), %rcx
movq %rdx, (%rax,%rcx,8)
movl 0x1c(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x1c(%rsp)
jmp 0x5f1f5
jmp 0x5f252
jmp 0x5f254
movl 0x20(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x20(%rsp)
jmp 0x5f115
movq 0x58(%rsp), %rdi
addq $0x88, %rdi
movl 0x74(%rsp), %esi
callq 0x478d0
movq %rax, %rcx
movq 0x58(%rsp), %rax
movq %rcx, 0x108(%rax)
movq 0x58(%rsp), %rdi
callq 0x42700
movq 0x58(%rsp), %rax
addq $0x88, %rsp
retq
nop
|
ggml_backend_sched_new:
sub rsp, 88h
mov al, r8b
mov [rsp+88h+var_8], rdi
mov [rsp+88h+var_10], rsi
mov [rsp+88h+var_14], edx
mov [rsp+88h+var_20], rcx
and al, 1
mov [rsp+88h+var_21], al
cmp [rsp+88h+var_14], 0
jg short loc_5EE5E
lea rdi, aWorkspaceLlm4b_2; "/workspace/llm4binary/github/2025_star3"...
mov esi, 5AEh
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aNBackends0; "n_backends > 0"
mov al, 0
call _ggml_abort
loc_5EE5E:
cmp [rsp+88h+var_14], 10h
jle short loc_5EE86
lea rdi, aWorkspaceLlm4b_2; "/workspace/llm4binary/github/2025_star3"...
mov esi, 5AFh
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aNBackendsGgmlS; "n_backends <= GGML_SCHED_MAX_BACKENDS"
mov al, 0
call _ggml_abort
loc_5EE86:
mov rax, [rsp+88h+var_8]
mov ecx, [rsp+88h+var_14]
sub ecx, 1
movsxd rcx, ecx
mov rdi, [rax+rcx*8]
call _ggml_backend_get_device
mov rdi, rax
call _ggml_backend_dev_type
cmp eax, 0
jz short loc_5EECF
lea rdi, aWorkspaceLlm4b_2; "/workspace/llm4binary/github/2025_star3"...
mov esi, 5B0h
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aGgmlBackendDev_12; "ggml_backend_dev_type(ggml_backend_get_"...
mov al, 0
call _ggml_abort
loc_5EECF:
mov edi, 1
mov esi, 448h
call _calloc
mov [rsp+88h+var_30], rax
lea rdi, aGgmlSchedDebug; "GGML_SCHED_DEBUG"
call _getenv
mov [rsp+88h+var_38], rax
cmp [rsp+88h+var_38], 0
jz short loc_5EF0C
mov rdi, [rsp+88h+var_38]
call _atoi
mov [rsp+88h+var_70], eax
jmp short loc_5EF14
loc_5EF0C:
xor eax, eax
mov [rsp+88h+var_70], eax
jmp short $+2
loc_5EF14:
mov ecx, [rsp+88h+var_70]
mov rax, [rsp+88h+var_30]
mov [rax+440h], ecx
mov ecx, [rsp+88h+var_14]
mov rax, [rsp+88h+var_30]
mov [rax+4], ecx
mov dl, [rsp+88h+var_21]
mov ecx, 1
mov eax, 4
test dl, 1
cmovnz ecx, eax
mov rax, [rsp+88h+var_30]
mov [rax+1B8h], ecx
mov rsi, [rsp+88h+var_20]
lea rdi, [rsp+88h+var_50]
call _ggml_hash_set_new
mov rax, [rsp+88h+var_30]
mov rcx, [rsp+88h+var_50]
mov [rax+110h], rcx
mov rcx, [rsp+88h+var_48]
mov [rax+118h], rcx
mov rcx, [rsp+88h+var_40]
mov [rax+120h], rcx
mov rax, [rsp+88h+var_30]
mov rdi, [rax+110h]
shl rdi, 2
call _malloc
mov rcx, rax
mov rax, [rsp+88h+var_30]
mov [rax+128h], rcx
mov rax, [rsp+88h+var_30]
mov rdi, [rax+110h]
mov rax, [rsp+88h+var_30]
movsxd rax, dword ptr [rax+4]
imul rdi, rax
mov rax, [rsp+88h+var_30]
movsxd rax, dword ptr [rax+1B8h]
imul rdi, rax
shl rdi, 3
call _malloc
mov rcx, rax
mov rax, [rsp+88h+var_30]
mov [rax+130h], rcx
mov rax, [rsp+88h+var_20]
mov [rsp+88h+var_58], rax
mov rax, [rsp+88h+var_20]
imul rcx, [rsp+88h+var_58], 0Ah
shl rcx, 1
add rax, rcx
mov [rsp+88h+var_60], rax
mov rdi, [rsp+88h+var_60]
mov esi, 4
call _calloc
mov rcx, rax
mov rax, [rsp+88h+var_30]
mov [rax+138h], rcx
mov rdi, [rsp+88h+var_60]
mov esi, 4
call _calloc
mov rcx, rax
mov rax, [rsp+88h+var_30]
mov [rax+140h], rcx
mov rdi, [rsp+88h+var_60]
mov esi, 4
call _calloc
mov rcx, rax
mov rax, [rsp+88h+var_30]
mov [rax+148h], rcx
mov rdi, [rsp+88h+var_60]
mov esi, 4
call _calloc
mov rcx, rax
mov rax, [rsp+88h+var_30]
mov [rax+150h], rcx
imul rax, [rsp+88h+var_58], 0Ah
shl rax, 1
imul rax, 150h
mov [rsp+88h+var_78], rax
mov rdi, [rsp+88h+var_20]
xor esi, esi
call _ggml_graph_overhead_custom
mov rcx, [rsp+88h+var_78]
add rcx, rax
mov rax, [rsp+88h+var_30]
mov [rax+438h], rcx
mov rax, [rsp+88h+var_30]
mov rdi, [rax+438h]
call _malloc
mov rcx, rax
mov rax, [rsp+88h+var_30]
mov [rax+430h], rcx
mov [rsp+88h+var_64], 10h
mov edi, 10h
mov esi, 0B8h
call _calloc
mov rcx, rax
mov rax, [rsp+88h+var_30]
mov [rax+1A8h], rcx
mov rax, [rsp+88h+var_30]
mov dword ptr [rax+1B4h], 10h
mov [rsp+88h+var_68], 0
loc_5F115:
mov eax, [rsp+88h+var_68]
cmp eax, [rsp+88h+var_14]
jge loc_5F264
mov rax, [rsp+88h+var_8]
movsxd rcx, [rsp+88h+var_68]
mov rdx, [rax+rcx*8]
mov rax, [rsp+88h+var_30]
movsxd rcx, [rsp+88h+var_68]
mov [rax+rcx*8+8], rdx
cmp [rsp+88h+var_10], 0
jz short loc_5F160
mov rax, [rsp+88h+var_10]
movsxd rcx, [rsp+88h+var_68]
mov rax, [rax+rcx*8]
mov [rsp+88h+var_80], rax
jmp short loc_5F17B
loc_5F160:
mov rax, [rsp+88h+var_8]
movsxd rcx, [rsp+88h+var_68]
mov rdi, [rax+rcx*8]
call _ggml_backend_get_default_buffer_type
mov [rsp+88h+var_80], rax
loc_5F17B:
mov rdx, [rsp+88h+var_80]
mov rax, [rsp+88h+var_30]
movsxd rcx, [rsp+88h+var_68]
mov [rax+rcx*8+88h], rdx
mov rax, [rsp+88h+var_8]
movsxd rcx, [rsp+88h+var_68]
mov rdi, [rax+rcx*8]
mov rax, [rsp+88h+var_30]
movsxd rcx, [rsp+88h+var_68]
mov rsi, [rax+rcx*8+88h]
call _ggml_backend_supports_buft
test al, 1
jnz short loc_5F1DF
lea rdi, aWorkspaceLlm4b_2; "/workspace/llm4binary/github/2025_star3"...
mov esi, 5D0h
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aGgmlBackendSup_1; "ggml_backend_supports_buft(backends[b],"...
mov al, 0
call _ggml_abort
loc_5F1DF:
mov rax, [rsp+88h+var_30]
cmp dword ptr [rax+1B8h], 1
jle short loc_5F252
mov [rsp+88h+var_6C], 0
loc_5F1F5:
mov eax, [rsp+88h+var_6C]
mov rcx, [rsp+88h+var_30]
cmp eax, [rcx+1B8h]
jge short loc_5F250
mov rax, [rsp+88h+var_8]
movsxd rcx, [rsp+88h+var_68]
mov rax, [rax+rcx*8]
mov rdi, [rax+70h]
call _ggml_backend_event_new
mov rdx, rax
mov rax, [rsp+88h+var_30]
add rax, 1C0h
movsxd rcx, [rsp+88h+var_68]
shl rcx, 5
add rax, rcx
movsxd rcx, [rsp+88h+var_6C]
mov [rax+rcx*8], rdx
mov eax, [rsp+88h+var_6C]
add eax, 1
mov [rsp+88h+var_6C], eax
jmp short loc_5F1F5
loc_5F250:
jmp short $+2
loc_5F252:
jmp short $+2
loc_5F254:
mov eax, [rsp+88h+var_68]
add eax, 1
mov [rsp+88h+var_68], eax
jmp loc_5F115
loc_5F264:
mov rdi, [rsp+88h+var_30]
add rdi, 88h
mov esi, [rsp+88h+var_14]
call _ggml_gallocr_new_n
mov rcx, rax
mov rax, [rsp+88h+var_30]
mov [rax+108h], rcx
mov rdi, [rsp+88h+var_30]
call _ggml_backend_sched_reset
mov rax, [rsp+88h+var_30]
add rsp, 88h
retn
|
long long ggml_backend_sched_new(long long a1, long long a2, int a3, long long a4, char a5)
{
long long device; // rax
int v6; // ecx
long long v7; // rax
long long v8; // rax
long long v9; // rax
long long v10; // rax
unsigned long long v11; // rax
long long v12; // rax
long long v13; // rax
long long v14; // rax
long long default_buffer_type; // [rsp+8h] [rbp-80h]
int v17; // [rsp+18h] [rbp-70h]
int j; // [rsp+1Ch] [rbp-6Ch]
int i; // [rsp+20h] [rbp-68h]
long long v20; // [rsp+28h] [rbp-60h]
long long v21; // [rsp+30h] [rbp-58h]
long long v22[3]; // [rsp+38h] [rbp-50h] BYREF
long long v23; // [rsp+50h] [rbp-38h]
long long v24; // [rsp+58h] [rbp-30h]
char v25; // [rsp+67h] [rbp-21h]
long long v26; // [rsp+68h] [rbp-20h]
int v27; // [rsp+74h] [rbp-14h]
long long v28; // [rsp+78h] [rbp-10h]
long long v29; // [rsp+80h] [rbp-8h]
v29 = a1;
v28 = a2;
v27 = a3;
v26 = a4;
v25 = a5 & 1;
if ( a3 <= 0 )
ggml_abort(
"/workspace/llm4binary/github/2025_star3/monkey531[P]llama/ggml/src/ggml-backend.cpp",
1454,
(long long)"GGML_ASSERT(%s) failed",
"n_backends > 0");
if ( v27 > 16 )
ggml_abort(
"/workspace/llm4binary/github/2025_star3/monkey531[P]llama/ggml/src/ggml-backend.cpp",
1455,
(long long)"GGML_ASSERT(%s) failed",
"n_backends <= GGML_SCHED_MAX_BACKENDS");
device = ggml_backend_get_device(*(_QWORD *)(v29 + 8LL * (v27 - 1)));
if ( (unsigned int)ggml_backend_dev_type(device) )
ggml_abort(
"/workspace/llm4binary/github/2025_star3/monkey531[P]llama/ggml/src/ggml-backend.cpp",
1456,
(long long)"GGML_ASSERT(%s) failed",
"ggml_backend_dev_type(ggml_backend_get_device(backends[n_backends - 1])) == GGML_BACKEND_DEVICE_TYPE_CPU");
v24 = calloc(1LL, 1096LL);
v23 = getenv("GGML_SCHED_DEBUG");
if ( v23 )
v17 = atoi(v23);
else
v17 = 0;
*(_DWORD *)(v24 + 1088) = v17;
*(_DWORD *)(v24 + 4) = v27;
v6 = 1;
if ( (v25 & 1) != 0 )
v6 = 4;
*(_DWORD *)(v24 + 440) = v6;
ggml_hash_set_new(v22, v26);
v7 = v24;
*(_QWORD *)(v24 + 272) = v22[0];
*(_QWORD *)(v7 + 280) = v22[1];
*(_QWORD *)(v7 + 288) = v22[2];
*(_QWORD *)(v24 + 296) = malloc(4LL * *(_QWORD *)(v24 + 272));
*(_QWORD *)(v24 + 304) = malloc(8 * *(int *)(v24 + 440) * *(int *)(v24 + 4) * *(_QWORD *)(v24 + 272));
v21 = v26;
v20 = 21 * v26;
*(_QWORD *)(v24 + 312) = calloc(21 * v26, 4LL);
v8 = calloc(v20, 4LL);
*(_QWORD *)(v24 + 320) = v8;
v9 = calloc(v20, 4LL);
*(_QWORD *)(v24 + 328) = v9;
v10 = calloc(v20, 4LL);
*(_QWORD *)(v24 + 336) = v10;
v11 = ggml_graph_overhead_custom(v26, 0);
*(_QWORD *)(v24 + 1080) = v11 + 6720 * v21;
v12 = malloc(*(_QWORD *)(v24 + 1080));
*(_QWORD *)(v24 + 1072) = v12;
*(_QWORD *)(v24 + 424) = calloc(16LL, 184LL);
*(_DWORD *)(v24 + 436) = 16;
for ( i = 0; i < v27; ++i )
{
*(_QWORD *)(v24 + 8LL * i + 8) = *(_QWORD *)(v29 + 8LL * i);
if ( v28 )
default_buffer_type = *(_QWORD *)(v28 + 8LL * i);
else
default_buffer_type = ggml_backend_get_default_buffer_type(*(_QWORD *)(v29 + 8LL * i));
*(_QWORD *)(v24 + 8LL * i + 136) = default_buffer_type;
if ( (ggml_backend_supports_buft(*(_QWORD *)(v29 + 8LL * i), *(_QWORD *)(v24 + 8LL * i + 136)) & 1) == 0 )
ggml_abort(
"/workspace/llm4binary/github/2025_star3/monkey531[P]llama/ggml/src/ggml-backend.cpp",
1488,
(long long)"GGML_ASSERT(%s) failed",
"ggml_backend_supports_buft(backends[b], sched->bufts[b])");
if ( *(int *)(v24 + 440) > 1 )
{
for ( j = 0; j < *(_DWORD *)(v24 + 440); ++j )
{
v13 = ggml_backend_event_new(*(_QWORD *)(*(_QWORD *)(v29 + 8LL * i) + 112LL));
*(_QWORD *)(32LL * i + v24 + 448 + 8LL * j) = v13;
}
}
}
v14 = ggml_gallocr_new_n(v24 + 136, v27);
*(_QWORD *)(v24 + 264) = v14;
ggml_backend_sched_reset(v24);
return v24;
}
|
ggml_backend_sched_new:
SUB RSP,0x88
MOV AL,R8B
MOV qword ptr [RSP + 0x80],RDI
MOV qword ptr [RSP + 0x78],RSI
MOV dword ptr [RSP + 0x74],EDX
MOV qword ptr [RSP + 0x68],RCX
AND AL,0x1
MOV byte ptr [RSP + 0x67],AL
CMP dword ptr [RSP + 0x74],0x0
JG 0x0015ee5e
LEA RDI,[0x1b74f9]
MOV ESI,0x5ae
LEA RDX,[0x1b4601]
LEA RCX,[0x1b7827]
MOV AL,0x0
CALL 0x00146770
LAB_0015ee5e:
CMP dword ptr [RSP + 0x74],0x10
JLE 0x0015ee86
LEA RDI,[0x1b74f9]
MOV ESI,0x5af
LEA RDX,[0x1b4601]
LEA RCX,[0x1b7836]
MOV AL,0x0
CALL 0x00146770
LAB_0015ee86:
MOV RAX,qword ptr [RSP + 0x80]
MOV ECX,dword ptr [RSP + 0x74]
SUB ECX,0x1
MOVSXD RCX,ECX
MOV RDI,qword ptr [RAX + RCX*0x8]
CALL 0x00140150
MOV RDI,RAX
CALL 0x001409d0
CMP EAX,0x0
JZ 0x0015eecf
LEA RDI,[0x1b74f9]
MOV ESI,0x5b0
LEA RDX,[0x1b4601]
LEA RCX,[0x1b785c]
MOV AL,0x0
CALL 0x00146770
LAB_0015eecf:
MOV EDI,0x1
MOV ESI,0x448
CALL 0x00142810
MOV qword ptr [RSP + 0x58],RAX
LEA RDI,[0x1b78c5]
CALL 0x00144a30
MOV qword ptr [RSP + 0x50],RAX
CMP qword ptr [RSP + 0x50],0x0
JZ 0x0015ef0c
MOV RDI,qword ptr [RSP + 0x50]
CALL 0x00145f60
MOV dword ptr [RSP + 0x18],EAX
JMP 0x0015ef14
LAB_0015ef0c:
XOR EAX,EAX
MOV dword ptr [RSP + 0x18],EAX
JMP 0x0015ef14
LAB_0015ef14:
MOV ECX,dword ptr [RSP + 0x18]
MOV RAX,qword ptr [RSP + 0x58]
MOV dword ptr [RAX + 0x440],ECX
MOV ECX,dword ptr [RSP + 0x74]
MOV RAX,qword ptr [RSP + 0x58]
MOV dword ptr [RAX + 0x4],ECX
MOV DL,byte ptr [RSP + 0x67]
MOV ECX,0x1
MOV EAX,0x4
TEST DL,0x1
CMOVNZ ECX,EAX
MOV RAX,qword ptr [RSP + 0x58]
MOV dword ptr [RAX + 0x1b8],ECX
MOV RSI,qword ptr [RSP + 0x68]
LEA RDI,[RSP + 0x38]
CALL 0x00140560
MOV RAX,qword ptr [RSP + 0x58]
MOV RCX,qword ptr [RSP + 0x38]
MOV qword ptr [RAX + 0x110],RCX
MOV RCX,qword ptr [RSP + 0x40]
MOV qword ptr [RAX + 0x118],RCX
MOV RCX,qword ptr [RSP + 0x48]
MOV qword ptr [RAX + 0x120],RCX
MOV RAX,qword ptr [RSP + 0x58]
MOV RDI,qword ptr [RAX + 0x110]
SHL RDI,0x2
CALL 0x00145080
MOV RCX,RAX
MOV RAX,qword ptr [RSP + 0x58]
MOV qword ptr [RAX + 0x128],RCX
MOV RAX,qword ptr [RSP + 0x58]
MOV RDI,qword ptr [RAX + 0x110]
MOV RAX,qword ptr [RSP + 0x58]
MOVSXD RAX,dword ptr [RAX + 0x4]
IMUL RDI,RAX
MOV RAX,qword ptr [RSP + 0x58]
MOVSXD RAX,dword ptr [RAX + 0x1b8]
IMUL RDI,RAX
SHL RDI,0x3
CALL 0x00145080
MOV RCX,RAX
MOV RAX,qword ptr [RSP + 0x58]
MOV qword ptr [RAX + 0x130],RCX
MOV RAX,qword ptr [RSP + 0x68]
MOV qword ptr [RSP + 0x30],RAX
MOV RAX,qword ptr [RSP + 0x68]
IMUL RCX,qword ptr [RSP + 0x30],0xa
SHL RCX,0x1
ADD RAX,RCX
MOV qword ptr [RSP + 0x28],RAX
MOV RDI,qword ptr [RSP + 0x28]
MOV ESI,0x4
CALL 0x00142810
MOV RCX,RAX
MOV RAX,qword ptr [RSP + 0x58]
MOV qword ptr [RAX + 0x138],RCX
MOV RDI,qword ptr [RSP + 0x28]
MOV ESI,0x4
CALL 0x00142810
MOV RCX,RAX
MOV RAX,qword ptr [RSP + 0x58]
MOV qword ptr [RAX + 0x140],RCX
MOV RDI,qword ptr [RSP + 0x28]
MOV ESI,0x4
CALL 0x00142810
MOV RCX,RAX
MOV RAX,qword ptr [RSP + 0x58]
MOV qword ptr [RAX + 0x148],RCX
MOV RDI,qword ptr [RSP + 0x28]
MOV ESI,0x4
CALL 0x00142810
MOV RCX,RAX
MOV RAX,qword ptr [RSP + 0x58]
MOV qword ptr [RAX + 0x150],RCX
IMUL RAX,qword ptr [RSP + 0x30],0xa
SHL RAX,0x1
IMUL RAX,RAX,0x150
MOV qword ptr [RSP + 0x10],RAX
MOV RDI,qword ptr [RSP + 0x68]
XOR ESI,ESI
CALL 0x001453f0
MOV RCX,qword ptr [RSP + 0x10]
ADD RCX,RAX
MOV RAX,qword ptr [RSP + 0x58]
MOV qword ptr [RAX + 0x438],RCX
MOV RAX,qword ptr [RSP + 0x58]
MOV RDI,qword ptr [RAX + 0x438]
CALL 0x00145080
MOV RCX,RAX
MOV RAX,qword ptr [RSP + 0x58]
MOV qword ptr [RAX + 0x430],RCX
MOV dword ptr [RSP + 0x24],0x10
MOV EDI,0x10
MOV ESI,0xb8
CALL 0x00142810
MOV RCX,RAX
MOV RAX,qword ptr [RSP + 0x58]
MOV qword ptr [RAX + 0x1a8],RCX
MOV RAX,qword ptr [RSP + 0x58]
MOV dword ptr [RAX + 0x1b4],0x10
MOV dword ptr [RSP + 0x20],0x0
LAB_0015f115:
MOV EAX,dword ptr [RSP + 0x20]
CMP EAX,dword ptr [RSP + 0x74]
JGE 0x0015f264
MOV RAX,qword ptr [RSP + 0x80]
MOVSXD RCX,dword ptr [RSP + 0x20]
MOV RDX,qword ptr [RAX + RCX*0x8]
MOV RAX,qword ptr [RSP + 0x58]
MOVSXD RCX,dword ptr [RSP + 0x20]
MOV qword ptr [RAX + RCX*0x8 + 0x8],RDX
CMP qword ptr [RSP + 0x78],0x0
JZ 0x0015f160
MOV RAX,qword ptr [RSP + 0x78]
MOVSXD RCX,dword ptr [RSP + 0x20]
MOV RAX,qword ptr [RAX + RCX*0x8]
MOV qword ptr [RSP + 0x8],RAX
JMP 0x0015f17b
LAB_0015f160:
MOV RAX,qword ptr [RSP + 0x80]
MOVSXD RCX,dword ptr [RSP + 0x20]
MOV RDI,qword ptr [RAX + RCX*0x8]
CALL 0x00146fd0
MOV qword ptr [RSP + 0x8],RAX
LAB_0015f17b:
MOV RDX,qword ptr [RSP + 0x8]
MOV RAX,qword ptr [RSP + 0x58]
MOVSXD RCX,dword ptr [RSP + 0x20]
MOV qword ptr [RAX + RCX*0x8 + 0x88],RDX
MOV RAX,qword ptr [RSP + 0x80]
MOVSXD RCX,dword ptr [RSP + 0x20]
MOV RDI,qword ptr [RAX + RCX*0x8]
MOV RAX,qword ptr [RSP + 0x58]
MOVSXD RCX,dword ptr [RSP + 0x20]
MOV RSI,qword ptr [RAX + RCX*0x8 + 0x88]
CALL 0x00145d70
TEST AL,0x1
JNZ 0x0015f1df
LEA RDI,[0x1b74f9]
MOV ESI,0x5d0
LEA RDX,[0x1b4601]
LEA RCX,[0x1b78d6]
MOV AL,0x0
CALL 0x00146770
LAB_0015f1df:
MOV RAX,qword ptr [RSP + 0x58]
CMP dword ptr [RAX + 0x1b8],0x1
JLE 0x0015f252
MOV dword ptr [RSP + 0x1c],0x0
LAB_0015f1f5:
MOV EAX,dword ptr [RSP + 0x1c]
MOV RCX,qword ptr [RSP + 0x58]
CMP EAX,dword ptr [RCX + 0x1b8]
JGE 0x0015f250
MOV RAX,qword ptr [RSP + 0x80]
MOVSXD RCX,dword ptr [RSP + 0x20]
MOV RAX,qword ptr [RAX + RCX*0x8]
MOV RDI,qword ptr [RAX + 0x70]
CALL 0x001412c0
MOV RDX,RAX
MOV RAX,qword ptr [RSP + 0x58]
ADD RAX,0x1c0
MOVSXD RCX,dword ptr [RSP + 0x20]
SHL RCX,0x5
ADD RAX,RCX
MOVSXD RCX,dword ptr [RSP + 0x1c]
MOV qword ptr [RAX + RCX*0x8],RDX
MOV EAX,dword ptr [RSP + 0x1c]
ADD EAX,0x1
MOV dword ptr [RSP + 0x1c],EAX
JMP 0x0015f1f5
LAB_0015f250:
JMP 0x0015f252
LAB_0015f252:
JMP 0x0015f254
LAB_0015f254:
MOV EAX,dword ptr [RSP + 0x20]
ADD EAX,0x1
MOV dword ptr [RSP + 0x20],EAX
JMP 0x0015f115
LAB_0015f264:
MOV RDI,qword ptr [RSP + 0x58]
ADD RDI,0x88
MOV ESI,dword ptr [RSP + 0x74]
CALL 0x001478d0
MOV RCX,RAX
MOV RAX,qword ptr [RSP + 0x58]
MOV qword ptr [RAX + 0x108],RCX
MOV RDI,qword ptr [RSP + 0x58]
CALL 0x00142700
MOV RAX,qword ptr [RSP + 0x58]
ADD RSP,0x88
RET
|
void * ggml_backend_sched_new(long param_1,long param_2,int param_3,long param_4,byte param_5)
{
size_t __nmemb;
long lVar1;
int iVar2;
int8 uVar3;
void *pvVar4;
long lVar5;
ulong uVar6;
int4 uVar7;
int8 local_80;
int local_70;
int local_6c;
int local_68;
int8 local_50;
int8 local_48;
int8 local_40;
char *local_38;
void *local_30;
byte local_21;
long local_20;
int local_14;
long local_10;
long local_8;
local_21 = param_5 & 1;
local_20 = param_4;
local_14 = param_3;
local_10 = param_2;
local_8 = param_1;
if (param_3 < 1) {
ggml_abort("/workspace/llm4binary/github/2025_star3/monkey531[P]llama/ggml/src/ggml-backend.cpp"
,0x5ae,"GGML_ASSERT(%s) failed","n_backends > 0");
}
if (0x10 < local_14) {
ggml_abort("/workspace/llm4binary/github/2025_star3/monkey531[P]llama/ggml/src/ggml-backend.cpp"
,0x5af,"GGML_ASSERT(%s) failed","n_backends <= GGML_SCHED_MAX_BACKENDS");
}
uVar3 = ggml_backend_get_device(*(int8 *)(local_8 + (long)(local_14 + -1) * 8));
iVar2 = ggml_backend_dev_type(uVar3);
if (iVar2 != 0) {
ggml_abort("/workspace/llm4binary/github/2025_star3/monkey531[P]llama/ggml/src/ggml-backend.cpp"
,0x5b0,"GGML_ASSERT(%s) failed",
"ggml_backend_dev_type(ggml_backend_get_device(backends[n_backends - 1])) == GGML_BACKEND_DEVICE_TYPE_CPU"
);
}
local_30 = calloc(1,0x448);
local_38 = getenv("GGML_SCHED_DEBUG");
if (local_38 == (char *)0x0) {
local_70 = 0;
}
else {
local_70 = atoi(local_38);
}
*(int *)((long)local_30 + 0x440) = local_70;
*(int *)((long)local_30 + 4) = local_14;
uVar7 = 1;
if ((local_21 & 1) != 0) {
uVar7 = 4;
}
*(int4 *)((long)local_30 + 0x1b8) = uVar7;
ggml_hash_set_new(&local_50,local_20);
*(int8 *)((long)local_30 + 0x110) = local_50;
*(int8 *)((long)local_30 + 0x118) = local_48;
*(int8 *)((long)local_30 + 0x120) = local_40;
pvVar4 = malloc(*(long *)((long)local_30 + 0x110) << 2);
*(void **)((long)local_30 + 0x128) = pvVar4;
pvVar4 = malloc(*(long *)((long)local_30 + 0x110) * (long)*(int *)((long)local_30 + 4) *
(long)*(int *)((long)local_30 + 0x1b8) * 8);
lVar1 = local_20;
*(void **)((long)local_30 + 0x130) = pvVar4;
__nmemb = local_20 * 0x15;
pvVar4 = calloc(__nmemb,4);
*(void **)((long)local_30 + 0x138) = pvVar4;
pvVar4 = calloc(__nmemb,4);
*(void **)((long)local_30 + 0x140) = pvVar4;
pvVar4 = calloc(__nmemb,4);
*(void **)((long)local_30 + 0x148) = pvVar4;
pvVar4 = calloc(__nmemb,4);
*(void **)((long)local_30 + 0x150) = pvVar4;
lVar5 = ggml_graph_overhead_custom(local_20,0);
*(long *)((long)local_30 + 0x438) = lVar1 * 0x1a40 + lVar5;
pvVar4 = malloc(*(size_t *)((long)local_30 + 0x438));
*(void **)((long)local_30 + 0x430) = pvVar4;
pvVar4 = calloc(0x10,0xb8);
*(void **)((long)local_30 + 0x1a8) = pvVar4;
*(int4 *)((long)local_30 + 0x1b4) = 0x10;
for (local_68 = 0; local_68 < local_14; local_68 = local_68 + 1) {
*(int8 *)((long)local_30 + (long)local_68 * 8 + 8) =
*(int8 *)(local_8 + (long)local_68 * 8);
if (local_10 == 0) {
local_80 = ggml_backend_get_default_buffer_type(*(int8 *)(local_8 + (long)local_68 * 8))
;
}
else {
local_80 = *(int8 *)(local_10 + (long)local_68 * 8);
}
*(int8 *)((long)local_30 + (long)local_68 * 8 + 0x88) = local_80;
uVar6 = ggml_backend_supports_buft
(*(int8 *)(local_8 + (long)local_68 * 8),
*(int8 *)((long)local_30 + (long)local_68 * 8 + 0x88));
if ((uVar6 & 1) == 0) {
ggml_abort("/workspace/llm4binary/github/2025_star3/monkey531[P]llama/ggml/src/ggml-backend.cpp"
,0x5d0,"GGML_ASSERT(%s) failed",
"ggml_backend_supports_buft(backends[b], sched->bufts[b])");
}
if (1 < *(int *)((long)local_30 + 0x1b8)) {
for (local_6c = 0; local_6c < *(int *)((long)local_30 + 0x1b8); local_6c = local_6c + 1) {
uVar3 = ggml_backend_event_new
(*(int8 *)(*(long *)(local_8 + (long)local_68 * 8) + 0x70));
*(int8 *)((long)local_30 + (long)local_6c * 8 + (long)local_68 * 0x20 + 0x1c0) = uVar3
;
}
}
}
uVar3 = ggml_gallocr_new_n((long)local_30 + 0x88,local_14);
*(int8 *)((long)local_30 + 0x108) = uVar3;
ggml_backend_sched_reset(local_30);
return local_30;
}
|
|
64,219
|
js_std_loadFile
|
bluesky950520[P]quickjs/quickjs-libc.c
|
static JSValue js_std_loadFile(JSContext *ctx, JSValue this_val,
int argc, JSValue *argv)
{
uint8_t *buf;
const char *filename;
JSValue ret, options_obj;
size_t buf_len;
BOOL binary = FALSE;
if (argc >= 2) {
options_obj = argv[1];
if (get_bool_option(ctx, &binary, options_obj,
"binary"))
return JS_EXCEPTION;
}
filename = JS_ToCString(ctx, argv[0]);
if (!filename)
return JS_EXCEPTION;
buf = js_load_file(ctx, &buf_len, filename);
JS_FreeCString(ctx, filename);
if (!buf)
return JS_NULL;
if (binary) {
ret = JS_NewUint8Array(ctx, buf, buf_len, free_buf, NULL, FALSE);
} else {
ret = JS_NewStringLen(ctx, (char *)buf, buf_len);
js_free(ctx, buf);
}
return ret;
}
|
O0
|
c
|
js_std_loadFile:
subq $0x98, %rsp
movq %rsi, 0x78(%rsp)
movq %rdx, 0x80(%rsp)
movq %rdi, 0x70(%rsp)
movl %ecx, 0x6c(%rsp)
movq %r8, 0x60(%rsp)
movl $0x0, 0x24(%rsp)
cmpl $0x2, 0x6c(%rsp)
jl 0x15d9b
movq 0x60(%rsp), %rax
movq 0x10(%rax), %rcx
movq %rcx, 0x30(%rsp)
movq 0x18(%rax), %rax
movq %rax, 0x38(%rsp)
movq 0x70(%rsp), %rdi
movq 0x30(%rsp), %rdx
movq 0x38(%rsp), %rcx
leaq 0x24(%rsp), %rsi
leaq 0xf4053(%rip), %r8 # 0x109dc6
callq 0x165d0
cmpl $0x0, %eax
je 0x15d99
movl $0x0, 0x88(%rsp)
movq $0x6, 0x90(%rsp)
jmp 0x15ec9
jmp 0x15d9b
movq 0x70(%rsp), %rdi
movq 0x60(%rsp), %rax
movq (%rax), %rsi
movq 0x8(%rax), %rdx
callq 0x147e0
movq %rax, 0x50(%rsp)
cmpq $0x0, 0x50(%rsp)
jne 0x15dda
movl $0x0, 0x88(%rsp)
movq $0x6, 0x90(%rsp)
jmp 0x15ec9
movq 0x70(%rsp), %rdi
movq 0x50(%rsp), %rdx
leaq 0x28(%rsp), %rsi
callq 0xfed0
movq %rax, 0x58(%rsp)
movq 0x70(%rsp), %rdi
movq 0x50(%rsp), %rsi
callq 0x29e50
cmpq $0x0, 0x58(%rsp)
jne 0x15e26
movl $0x0, 0x88(%rsp)
movq $0x2, 0x90(%rsp)
jmp 0x15ec9
cmpl $0x0, 0x24(%rsp)
je 0x15e70
movq 0x70(%rsp), %rdi
movq 0x58(%rsp), %rsi
movq 0x28(%rsp), %rdx
leaq 0x9fd(%rip), %rcx # 0x16840
xorl %eax, %eax
movl %eax, %r8d
xorl %r9d, %r9d
callq 0x58c30
movq %rax, 0x10(%rsp)
movq %rdx, 0x18(%rsp)
movq 0x10(%rsp), %rax
movq %rax, 0x40(%rsp)
movq 0x18(%rsp), %rax
movq %rax, 0x48(%rsp)
jmp 0x15eaf
movq 0x70(%rsp), %rdi
movq 0x58(%rsp), %rsi
movq 0x28(%rsp), %rdx
callq 0x28270
movq %rax, (%rsp)
movq %rdx, 0x8(%rsp)
movq (%rsp), %rax
movq %rax, 0x40(%rsp)
movq 0x8(%rsp), %rax
movq %rax, 0x48(%rsp)
movq 0x70(%rsp), %rdi
movq 0x58(%rsp), %rsi
callq 0x21db0
movq 0x40(%rsp), %rax
movq %rax, 0x88(%rsp)
movq 0x48(%rsp), %rax
movq %rax, 0x90(%rsp)
movq 0x88(%rsp), %rax
movq 0x90(%rsp), %rdx
addq $0x98, %rsp
retq
nopw %cs:(%rax,%rax)
|
js_std_loadFile:
sub rsp, 98h
mov [rsp+98h+var_20], rsi
mov [rsp+98h+var_18], rdx
mov [rsp+98h+var_28], rdi
mov [rsp+98h+var_2C], ecx
mov [rsp+98h+var_38], r8
mov [rsp+98h+var_74], 0
cmp [rsp+98h+var_2C], 2
jl short loc_15D9B
mov rax, [rsp+98h+var_38]
mov rcx, [rax+10h]
mov [rsp+98h+var_68], rcx
mov rax, [rax+18h]
mov [rsp+98h+var_60], rax
mov rdi, [rsp+98h+var_28]
mov rdx, [rsp+98h+var_68]
mov rcx, [rsp+98h+var_60]
lea rsi, [rsp+98h+var_74]
lea r8, aBinary; "binary"
call get_bool_option
cmp eax, 0
jz short loc_15D99
mov dword ptr [rsp+98h+var_10], 0
mov [rsp+98h+var_8], 6
jmp loc_15EC9
loc_15D99:
jmp short $+2
loc_15D9B:
mov rdi, [rsp+98h+var_28]
mov rax, [rsp+98h+var_38]
mov rsi, [rax]
mov rdx, [rax+8]
call JS_ToCString
mov [rsp+98h+var_48], rax
cmp [rsp+98h+var_48], 0
jnz short loc_15DDA
mov dword ptr [rsp+98h+var_10], 0
mov [rsp+98h+var_8], 6
jmp loc_15EC9
loc_15DDA:
mov rdi, [rsp+98h+var_28]
mov rdx, [rsp+98h+var_48]
lea rsi, [rsp+98h+var_70]
call js_load_file
mov [rsp+98h+var_40], rax
mov rdi, [rsp+98h+var_28]
mov rsi, [rsp+98h+var_48]
call JS_FreeCString
cmp [rsp+98h+var_40], 0
jnz short loc_15E26
mov dword ptr [rsp+98h+var_10], 0
mov [rsp+98h+var_8], 2
jmp loc_15EC9
loc_15E26:
cmp [rsp+98h+var_74], 0
jz short loc_15E70
mov rdi, [rsp+98h+var_28]
mov rsi, [rsp+98h+var_40]
mov rdx, [rsp+98h+var_70]
lea rcx, free_buf
xor eax, eax
mov r8d, eax
xor r9d, r9d
call JS_NewUint8Array
mov [rsp+98h+var_88], rax
mov [rsp+98h+var_80], rdx
mov rax, [rsp+98h+var_88]
mov [rsp+98h+var_58], rax
mov rax, [rsp+98h+var_80]
mov [rsp+98h+var_50], rax
jmp short loc_15EAF
loc_15E70:
mov rdi, [rsp+98h+var_28]
mov rsi, [rsp+98h+var_40]
mov rdx, [rsp+98h+var_70]
call JS_NewStringLen
mov [rsp+98h+var_98], rax
mov [rsp+98h+var_90], rdx
mov rax, [rsp+98h+var_98]
mov [rsp+98h+var_58], rax
mov rax, [rsp+98h+var_90]
mov [rsp+98h+var_50], rax
mov rdi, [rsp+98h+var_28]
mov rsi, [rsp+98h+var_40]
call js_free
loc_15EAF:
mov rax, [rsp+98h+var_58]
mov [rsp+98h+var_10], rax
mov rax, [rsp+98h+var_50]
mov [rsp+98h+var_8], rax
loc_15EC9:
mov rax, [rsp+98h+var_10]
mov rdx, [rsp+98h+var_8]
add rsp, 98h
retn
|
long long js_std_loadFile(long long a1, long long a2, long long a3, int a4, long long *a5)
{
long long v5; // rdx
long long v6; // rdx
int v8; // [rsp+24h] [rbp-74h] BYREF
long long v9; // [rsp+28h] [rbp-70h] BYREF
long long v10; // [rsp+30h] [rbp-68h]
long long v11; // [rsp+38h] [rbp-60h]
long long v12; // [rsp+40h] [rbp-58h]
long long v13; // [rsp+48h] [rbp-50h]
long long v14; // [rsp+50h] [rbp-48h]
long long v15; // [rsp+58h] [rbp-40h]
long long *v16; // [rsp+60h] [rbp-38h]
int v17; // [rsp+6Ch] [rbp-2Ch]
long long v18; // [rsp+70h] [rbp-28h]
long long v19; // [rsp+78h] [rbp-20h]
long long v20; // [rsp+80h] [rbp-18h]
long long v21; // [rsp+88h] [rbp-10h]
long long v22; // [rsp+90h] [rbp-8h]
v19 = a2;
v20 = a3;
v18 = a1;
v17 = a4;
v16 = a5;
v8 = 0;
if ( a4 >= 2 && (v10 = v16[2], v11 = v16[3], (unsigned int)get_bool_option(v18, &v8, v10, v11, "binary")) )
{
LODWORD(v21) = 0;
v22 = 6LL;
}
else
{
v14 = JS_ToCString(v18, *v16, v16[1]);
if ( v14 )
{
v15 = js_load_file(v18, &v9, v14);
JS_FreeCString(v18, v14);
if ( v15 )
{
if ( v8 )
{
v12 = JS_NewUint8Array(v18, v15, v9, free_buf, 0LL, 0LL);
v13 = v5;
}
else
{
v12 = JS_NewStringLen(v18, v15, v9);
v13 = v6;
js_free(v18, v15);
}
v21 = v12;
v22 = v13;
}
else
{
LODWORD(v21) = 0;
v22 = 2LL;
}
}
else
{
LODWORD(v21) = 0;
v22 = 6LL;
}
}
return v21;
}
|
js_std_loadFile:
SUB RSP,0x98
MOV qword ptr [RSP + 0x78],RSI
MOV qword ptr [RSP + 0x80],RDX
MOV qword ptr [RSP + 0x70],RDI
MOV dword ptr [RSP + 0x6c],ECX
MOV qword ptr [RSP + 0x60],R8
MOV dword ptr [RSP + 0x24],0x0
CMP dword ptr [RSP + 0x6c],0x2
JL 0x00115d9b
MOV RAX,qword ptr [RSP + 0x60]
MOV RCX,qword ptr [RAX + 0x10]
MOV qword ptr [RSP + 0x30],RCX
MOV RAX,qword ptr [RAX + 0x18]
MOV qword ptr [RSP + 0x38],RAX
MOV RDI,qword ptr [RSP + 0x70]
MOV RDX,qword ptr [RSP + 0x30]
MOV RCX,qword ptr [RSP + 0x38]
LEA RSI,[RSP + 0x24]
LEA R8,[0x209dc6]
CALL 0x001165d0
CMP EAX,0x0
JZ 0x00115d99
MOV dword ptr [RSP + 0x88],0x0
MOV qword ptr [RSP + 0x90],0x6
JMP 0x00115ec9
LAB_00115d99:
JMP 0x00115d9b
LAB_00115d9b:
MOV RDI,qword ptr [RSP + 0x70]
MOV RAX,qword ptr [RSP + 0x60]
MOV RSI,qword ptr [RAX]
MOV RDX,qword ptr [RAX + 0x8]
CALL 0x001147e0
MOV qword ptr [RSP + 0x50],RAX
CMP qword ptr [RSP + 0x50],0x0
JNZ 0x00115dda
MOV dword ptr [RSP + 0x88],0x0
MOV qword ptr [RSP + 0x90],0x6
JMP 0x00115ec9
LAB_00115dda:
MOV RDI,qword ptr [RSP + 0x70]
MOV RDX,qword ptr [RSP + 0x50]
LEA RSI,[RSP + 0x28]
CALL 0x0010fed0
MOV qword ptr [RSP + 0x58],RAX
MOV RDI,qword ptr [RSP + 0x70]
MOV RSI,qword ptr [RSP + 0x50]
CALL 0x00129e50
CMP qword ptr [RSP + 0x58],0x0
JNZ 0x00115e26
MOV dword ptr [RSP + 0x88],0x0
MOV qword ptr [RSP + 0x90],0x2
JMP 0x00115ec9
LAB_00115e26:
CMP dword ptr [RSP + 0x24],0x0
JZ 0x00115e70
MOV RDI,qword ptr [RSP + 0x70]
MOV RSI,qword ptr [RSP + 0x58]
MOV RDX,qword ptr [RSP + 0x28]
LEA RCX,[0x116840]
XOR EAX,EAX
MOV R8D,EAX
XOR R9D,R9D
CALL 0x00158c30
MOV qword ptr [RSP + 0x10],RAX
MOV qword ptr [RSP + 0x18],RDX
MOV RAX,qword ptr [RSP + 0x10]
MOV qword ptr [RSP + 0x40],RAX
MOV RAX,qword ptr [RSP + 0x18]
MOV qword ptr [RSP + 0x48],RAX
JMP 0x00115eaf
LAB_00115e70:
MOV RDI,qword ptr [RSP + 0x70]
MOV RSI,qword ptr [RSP + 0x58]
MOV RDX,qword ptr [RSP + 0x28]
CALL 0x00128270
MOV qword ptr [RSP],RAX
MOV qword ptr [RSP + 0x8],RDX
MOV RAX,qword ptr [RSP]
MOV qword ptr [RSP + 0x40],RAX
MOV RAX,qword ptr [RSP + 0x8]
MOV qword ptr [RSP + 0x48],RAX
MOV RDI,qword ptr [RSP + 0x70]
MOV RSI,qword ptr [RSP + 0x58]
CALL 0x00121db0
LAB_00115eaf:
MOV RAX,qword ptr [RSP + 0x40]
MOV qword ptr [RSP + 0x88],RAX
MOV RAX,qword ptr [RSP + 0x48]
MOV qword ptr [RSP + 0x90],RAX
LAB_00115ec9:
MOV RAX,qword ptr [RSP + 0x88]
MOV RDX,qword ptr [RSP + 0x90]
ADD RSP,0x98
RET
|
int1 [16]
js_std_loadFile(int8 param_1,int8 param_2,int8 param_3,int param_4,
int8 *param_5)
{
int1 auVar1 [16];
int iVar2;
int local_74;
int8 local_70;
int8 local_68;
int8 local_60;
int1 local_58 [16];
long local_48;
long local_40;
int8 *local_38;
int local_2c;
int8 local_28;
int8 local_20;
int8 local_18;
int4 local_10;
int4 uStack_c;
int8 local_8;
local_74 = 0;
local_38 = param_5;
local_2c = param_4;
local_28 = param_1;
local_20 = param_2;
local_18 = param_3;
if (1 < param_4) {
local_68 = param_5[2];
local_60 = param_5[3];
iVar2 = get_bool_option(param_1,&local_74,local_68,local_60,"binary");
if (iVar2 != 0) {
local_10 = 0;
local_8 = 6;
goto LAB_00115ec9;
}
}
local_48 = JS_ToCString(local_28,*local_38,local_38[1]);
if (local_48 == 0) {
local_10 = 0;
local_8 = 6;
}
else {
local_40 = js_load_file(local_28,&local_70,local_48);
JS_FreeCString(local_28,local_48);
if (local_40 == 0) {
local_10 = 0;
local_8 = 2;
}
else {
if (local_74 == 0) {
local_58 = JS_NewStringLen(local_28,local_40,local_70);
js_free(local_28,local_40);
}
else {
local_58 = JS_NewUint8Array(local_28,local_40,local_70,free_buf,0,0);
}
local_10 = local_58._0_4_;
uStack_c = local_58._4_4_;
local_8 = local_58._8_8_;
}
}
LAB_00115ec9:
auVar1._4_4_ = uStack_c;
auVar1._0_4_ = local_10;
auVar1._8_8_ = local_8;
return auVar1;
}
|
|
64,220
|
js_std_loadFile
|
bluesky950520[P]quickjs/quickjs-libc.c
|
static JSValue js_std_loadFile(JSContext *ctx, JSValue this_val,
int argc, JSValue *argv)
{
uint8_t *buf;
const char *filename;
JSValue ret, options_obj;
size_t buf_len;
BOOL binary = FALSE;
if (argc >= 2) {
options_obj = argv[1];
if (get_bool_option(ctx, &binary, options_obj,
"binary"))
return JS_EXCEPTION;
}
filename = JS_ToCString(ctx, argv[0]);
if (!filename)
return JS_EXCEPTION;
buf = js_load_file(ctx, &buf_len, filename);
JS_FreeCString(ctx, filename);
if (!buf)
return JS_NULL;
if (binary) {
ret = JS_NewUint8Array(ctx, buf, buf_len, free_buf, NULL, FALSE);
} else {
ret = JS_NewStringLen(ctx, (char *)buf, buf_len);
js_free(ctx, buf);
}
return ret;
}
|
O2
|
c
|
js_std_loadFile:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %r8, %r15
andl $0x0, 0xc(%rsp)
movq %rdi, %r14
pushq $0x6
popq %rbx
cmpl $0x2, %ecx
jl 0x125b5
movq 0x10(%r15), %rdx
movq 0x18(%r15), %rcx
leaq 0x706b6(%rip), %r8 # 0x82c5a
leaq 0xc(%rsp), %rsi
movq %r14, %rdi
callq 0x12a3d
testl %eax, %eax
jne 0x1261e
movq (%r15), %rsi
movq 0x8(%r15), %rdx
movq %r14, %rdi
callq 0x11a6c
testq %rax, %rax
je 0x1261e
movq %rax, %r12
leaq 0x10(%rsp), %rsi
movq %r14, %rdi
movq %rax, %rdx
callq 0xf70c
movq %rax, %r15
movq %r14, %rdi
movq %r12, %rsi
callq 0x1b057
testq %r15, %r15
je 0x1261b
cmpl $0x0, 0xc(%rsp)
movq 0x10(%rsp), %rdx
je 0x12624
leaq 0x513(%rip), %rcx # 0x12b15
movq %r14, %rdi
movq %r15, %rsi
xorl %r8d, %r8d
xorl %r9d, %r9d
callq 0x32922
movq %rax, %r12
movq %rdx, %rbx
jmp 0x12640
pushq $0x2
popq %rbx
xorl %eax, %eax
xorl %ecx, %ecx
jmp 0x12650
movq %r14, %rdi
movq %r15, %rsi
callq 0x1a2ea
movq %rax, %r12
movq %rdx, %rbx
movq %r14, %rdi
movq %r15, %rsi
callq 0x1726e
movabsq $-0x100000000, %rcx # imm = 0xFFFFFFFF00000000
andq %r12, %rcx
movl %r12d, %eax
orq %rcx, %rax
movq %rbx, %rdx
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
|
js_std_loadFile:
push r15
push r14
push r12
push rbx
sub rsp, 18h
mov r15, r8
and [rsp+38h+var_2C], 0
mov r14, rdi
push 6
pop rbx
cmp ecx, 2
jl short loc_125B5
mov rdx, [r15+10h]
mov rcx, [r15+18h]
lea r8, aBinary; "binary"
lea rsi, [rsp+38h+var_2C]
mov rdi, r14
call get_bool_option
test eax, eax
jnz short loc_1261E
loc_125B5:
mov rsi, [r15]
mov rdx, [r15+8]
mov rdi, r14
call JS_ToCString
test rax, rax
jz short loc_1261E
mov r12, rax
lea rsi, [rsp+38h+var_28]
mov rdi, r14
mov rdx, rax
call js_load_file
mov r15, rax
mov rdi, r14
mov rsi, r12
call JS_FreeCString
test r15, r15
jz short loc_1261B
cmp [rsp+38h+var_2C], 0
mov rdx, [rsp+38h+var_28]
jz short loc_12624
lea rcx, free_buf
mov rdi, r14
mov rsi, r15
xor r8d, r8d
xor r9d, r9d
call JS_NewUint8Array
mov r12, rax
mov rbx, rdx
jmp short loc_12640
loc_1261B:
push 2
pop rbx
loc_1261E:
xor eax, eax
xor ecx, ecx
jmp short loc_12650
loc_12624:
mov rdi, r14
mov rsi, r15
call JS_NewStringLen
mov r12, rax
mov rbx, rdx
mov rdi, r14
mov rsi, r15
call js_free
loc_12640:
mov rcx, 0FFFFFFFF00000000h
and rcx, r12
mov eax, r12d
loc_12650:
or rax, rcx
mov rdx, rbx
add rsp, 18h
pop rbx
pop r12
pop r14
pop r15
retn
|
unsigned long long js_std_loadFile(long long a1, long long a2, long long a3, int a4, long long *a5)
{
long long v6; // rax
long long v7; // r12
long long file; // r15
long long v9; // r12
long long v10; // rax
unsigned long long v11; // rcx
int v13; // [rsp+Ch] [rbp-2Ch] BYREF
long long v14[5]; // [rsp+10h] [rbp-28h] BYREF
v13 = 0;
if ( (a4 < 2 || !(unsigned int)get_bool_option(a1, &v13, a5[2], a5[3], "binary"))
&& (v6 = JS_ToCString(a1, *a5, a5[1])) != 0
&& (v7 = v6, file = js_load_file(a1, v14, v6), JS_FreeCString(a1, v7), file) )
{
if ( v13 )
{
v9 = JS_NewUint8Array(a1, file, v14[0], free_buf, 0LL, 0LL);
}
else
{
v9 = JS_NewStringLen(a1, file, v14[0]);
js_free(a1, file);
}
v11 = v9 & 0xFFFFFFFF00000000LL;
v10 = (unsigned int)v9;
}
else
{
v10 = 0LL;
v11 = 0LL;
}
return v11 | v10;
}
|
js_std_loadFile:
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
SUB RSP,0x18
MOV R15,R8
AND dword ptr [RSP + 0xc],0x0
MOV R14,RDI
PUSH 0x6
POP RBX
CMP ECX,0x2
JL 0x001125b5
MOV RDX,qword ptr [R15 + 0x10]
MOV RCX,qword ptr [R15 + 0x18]
LEA R8,[0x182c5a]
LEA RSI,[RSP + 0xc]
MOV RDI,R14
CALL 0x00112a3d
TEST EAX,EAX
JNZ 0x0011261e
LAB_001125b5:
MOV RSI,qword ptr [R15]
MOV RDX,qword ptr [R15 + 0x8]
MOV RDI,R14
CALL 0x00111a6c
TEST RAX,RAX
JZ 0x0011261e
MOV R12,RAX
LEA RSI,[RSP + 0x10]
MOV RDI,R14
MOV RDX,RAX
CALL 0x0010f70c
MOV R15,RAX
MOV RDI,R14
MOV RSI,R12
CALL 0x0011b057
TEST R15,R15
JZ 0x0011261b
CMP dword ptr [RSP + 0xc],0x0
MOV RDX,qword ptr [RSP + 0x10]
JZ 0x00112624
LEA RCX,[0x112b15]
MOV RDI,R14
MOV RSI,R15
XOR R8D,R8D
XOR R9D,R9D
CALL 0x00132922
MOV R12,RAX
MOV RBX,RDX
JMP 0x00112640
LAB_0011261b:
PUSH 0x2
POP RBX
LAB_0011261e:
XOR EAX,EAX
XOR ECX,ECX
JMP 0x00112650
LAB_00112624:
MOV RDI,R14
MOV RSI,R15
CALL 0x0011a2ea
MOV R12,RAX
MOV RBX,RDX
MOV RDI,R14
MOV RSI,R15
CALL 0x0011726e
LAB_00112640:
MOV RCX,-0x100000000
AND RCX,R12
MOV EAX,R12D
LAB_00112650:
OR RAX,RCX
MOV RDX,RBX
ADD RSP,0x18
POP RBX
POP R12
POP R14
POP R15
RET
|
int1 [16]
js_std_loadFile(int8 param_1,int8 param_2,int8 param_3,int param_4,
int8 *param_5)
{
int iVar1;
long lVar2;
long lVar3;
ulong uVar4;
ulong uVar5;
int8 uVar6;
int1 auVar7 [16];
int local_2c;
int8 local_28;
local_2c = 0;
uVar6 = 6;
if (param_4 < 2) {
LAB_001125b5:
lVar2 = JS_ToCString(param_1,*param_5,param_5[1]);
if (lVar2 != 0) {
lVar3 = js_load_file(param_1,&local_28,lVar2);
JS_FreeCString(param_1,lVar2);
if (lVar3 != 0) {
if (local_2c == 0) {
auVar7 = JS_NewStringLen(param_1,lVar3,local_28);
js_free(param_1,lVar3);
}
else {
auVar7 = JS_NewUint8Array(param_1,lVar3,local_28,free_buf,0,0);
}
uVar6 = auVar7._8_8_;
uVar5 = auVar7._0_8_ & 0xffffffff00000000;
uVar4 = auVar7._0_8_ & 0xffffffff;
goto LAB_00112650;
}
uVar6 = 2;
}
}
else {
iVar1 = get_bool_option(param_1,&local_2c,param_5[2],param_5[3],"binary");
if (iVar1 == 0) goto LAB_001125b5;
}
uVar4 = 0;
uVar5 = 0;
LAB_00112650:
auVar7._0_8_ = uVar4 | uVar5;
auVar7._8_8_ = uVar6;
return auVar7;
}
|
|
64,221
|
char const* fmt::v11::detail::parse_precision<char>(char const*, char const*, fmt::v11::format_specs&, fmt::v11::detail::arg_ref<char>&, fmt::v11::parse_context<char>&)
|
zkingston[P]unknot/build_O0/_deps/fmt-src/include/fmt/base.h
|
FMT_CONSTEXPR auto parse_precision(const Char* begin, const Char* end,
format_specs& specs,
arg_ref<Char>& precision_ref,
parse_context<Char>& ctx) -> const Char* {
++begin;
if (begin == end) {
report_error("invalid precision");
return begin;
}
auto result =
parse_dynamic_spec(begin, end, specs.precision, precision_ref, ctx);
specs.set_dynamic_precision(result.kind);
return result.end;
}
|
O0
|
c
|
char const* fmt::v11::detail::parse_precision<char>(char const*, char const*, fmt::v11::format_specs&, fmt::v11::detail::arg_ref<char>&, fmt::v11::parse_context<char>&):
subq $0x38, %rsp
movq %rdi, 0x30(%rsp)
movq %rsi, 0x28(%rsp)
movq %rdx, 0x20(%rsp)
movq %rcx, 0x18(%rsp)
movq %r8, 0x10(%rsp)
movq 0x30(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x30(%rsp)
movq 0x30(%rsp), %rax
cmpq 0x28(%rsp), %rax
jne 0xbefb3
leaq 0x51207f(%rip), %rdi # 0x5d102d
callq 0xa5500
movq 0x30(%rsp), %rdi
movq 0x28(%rsp), %rsi
movq 0x20(%rsp), %rdx
addq $0xc, %rdx
movq 0x18(%rsp), %rcx
movq 0x10(%rsp), %r8
callq 0xbf1d0
movq %rax, (%rsp)
movl %edx, 0x8(%rsp)
movq 0x20(%rsp), %rdi
movl 0x8(%rsp), %esi
callq 0xbf6f0
movq (%rsp), %rax
addq $0x38, %rsp
retq
nopw %cs:(%rax,%rax)
nop
|
_ZN3fmt3v116detail15parse_precisionIcEEPKT_S5_S5_RNS0_12format_specsERNS1_7arg_refIS3_EERNS0_13parse_contextIS3_EE:
sub rsp, 38h
mov [rsp+38h+var_8], rdi
mov [rsp+38h+var_10], rsi
mov [rsp+38h+var_18], rdx
mov [rsp+38h+var_20], rcx
mov [rsp+38h+var_28], r8
mov rax, [rsp+38h+var_8]
add rax, 1
mov [rsp+38h+var_8], rax
mov rax, [rsp+38h+var_8]
cmp rax, [rsp+38h+var_10]
jnz short loc_BEFB3
lea rdi, aInvalidPrecisi; "invalid precision"
call _ZN3fmt3v1112report_errorEPKc; fmt::v11::report_error(char const*)
loc_BEFB3:
mov rdi, [rsp+38h+var_8]
mov rsi, [rsp+38h+var_10]
mov rdx, [rsp+38h+var_18]
add rdx, 0Ch
mov rcx, [rsp+38h+var_20]
mov r8, [rsp+38h+var_28]
call _ZN3fmt3v116detail18parse_dynamic_specIcEENS1_25parse_dynamic_spec_resultIT_EEPKS4_S7_RiRNS1_7arg_refIS4_EERNS0_13parse_contextIS4_EE; fmt::v11::detail::parse_dynamic_spec<char>(char const*,char const*,int &,fmt::v11::detail::arg_ref<char> &,fmt::v11::parse_context<char> &)
mov [rsp+38h+var_38], rax
mov [rsp+38h+var_30], edx
mov rdi, [rsp+38h+var_18]
mov esi, [rsp+38h+var_30]
call _ZN3fmt3v1111basic_specs21set_dynamic_precisionENS0_11arg_id_kindE; fmt::v11::basic_specs::set_dynamic_precision(fmt::v11::arg_id_kind)
mov rax, [rsp+38h+var_38]
add rsp, 38h
retn
|
long long fmt::v11::detail::parse_precision<char>(
long long a1,
const char *a2,
long long a3,
long long a4,
long long a5)
{
unsigned int v5; // edx
long long v7; // [rsp+0h] [rbp-38h]
if ( (const char *)(a1 + 1) == a2 )
fmt::v11::report_error((fmt::v11 *)"invalid precision", a2);
v7 = fmt::v11::detail::parse_dynamic_spec<char>(a1 + 1, a2, a3 + 12, a4, a5);
fmt::v11::basic_specs::set_dynamic_precision(a3, v5);
return v7;
}
|
parse_precision<char>:
SUB RSP,0x38
MOV qword ptr [RSP + 0x30],RDI
MOV qword ptr [RSP + 0x28],RSI
MOV qword ptr [RSP + 0x20],RDX
MOV qword ptr [RSP + 0x18],RCX
MOV qword ptr [RSP + 0x10],R8
MOV RAX,qword ptr [RSP + 0x30]
ADD RAX,0x1
MOV qword ptr [RSP + 0x30],RAX
MOV RAX,qword ptr [RSP + 0x30]
CMP RAX,qword ptr [RSP + 0x28]
JNZ 0x001befb3
LEA RDI,[0x6d102d]
CALL 0x001a5500
LAB_001befb3:
MOV RDI,qword ptr [RSP + 0x30]
MOV RSI,qword ptr [RSP + 0x28]
MOV RDX,qword ptr [RSP + 0x20]
ADD RDX,0xc
MOV RCX,qword ptr [RSP + 0x18]
MOV R8,qword ptr [RSP + 0x10]
CALL 0x001bf1d0
MOV qword ptr [RSP],RAX
MOV dword ptr [RSP + 0x8],EDX
MOV RDI,qword ptr [RSP + 0x20]
MOV ESI,dword ptr [RSP + 0x8]
CALL 0x001bf6f0
MOV RAX,qword ptr [RSP]
ADD RSP,0x38
RET
|
/* char const* fmt::v11::detail::parse_precision<char>(char const*, char const*,
fmt::v11::format_specs&, fmt::v11::detail::arg_ref<char>&, fmt::v11::parse_context<char>&) */
char * fmt::v11::detail::parse_precision<char>
(char *param_1,char *param_2,format_specs *param_3,arg_ref *param_4,
parse_context *param_5)
{
int1 auVar1 [12];
if (param_1 + 1 == param_2) {
/* WARNING: Subroutine does not return */
report_error("invalid precision");
}
auVar1 = parse_dynamic_spec<char>(param_1 + 1,param_2,(int *)(param_3 + 0xc),param_4,param_5);
basic_specs::set_dynamic_precision((basic_specs *)param_3,auVar1._8_4_);
return auVar1._0_8_;
}
|
|
64,222
|
js__strstart
|
bluesky950520[P]quickjs/cutils.c
|
int js__strstart(const char *str, const char *val, const char **ptr)
{
const char *p, *q;
p = str;
q = val;
while (*q != '\0') {
if (*p != *q)
return 0;
p++;
q++;
}
if (ptr)
*ptr = p;
return 1;
}
|
O0
|
c
|
js__strstart:
movq %rdi, -0x10(%rsp)
movq %rsi, -0x18(%rsp)
movq %rdx, -0x20(%rsp)
movq -0x10(%rsp), %rax
movq %rax, -0x28(%rsp)
movq -0x18(%rsp), %rax
movq %rax, -0x30(%rsp)
movq -0x30(%rsp), %rax
movzbl (%rax), %eax
cmpl $0x0, %eax
je 0x2458c
movq -0x28(%rsp), %rax
movzbl (%rax), %eax
movq -0x30(%rsp), %rcx
movzbl (%rcx), %ecx
cmpl %ecx, %eax
je 0x2456e
movl $0x0, -0x4(%rsp)
jmp 0x245a9
movq -0x28(%rsp), %rax
addq $0x1, %rax
movq %rax, -0x28(%rsp)
movq -0x30(%rsp), %rax
addq $0x1, %rax
movq %rax, -0x30(%rsp)
jmp 0x24543
cmpq $0x0, -0x20(%rsp)
je 0x245a1
movq -0x28(%rsp), %rcx
movq -0x20(%rsp), %rax
movq %rcx, (%rax)
movl $0x1, -0x4(%rsp)
movl -0x4(%rsp), %eax
retq
nop
|
js__strstart:
mov [rsp+var_10], rdi
mov [rsp+var_18], rsi
mov [rsp+var_20], rdx
mov rax, [rsp+var_10]
mov [rsp+var_28], rax
mov rax, [rsp+var_18]
mov [rsp+var_30], rax
loc_24543:
mov rax, [rsp+var_30]
movzx eax, byte ptr [rax]
cmp eax, 0
jz short loc_2458C
mov rax, [rsp+var_28]
movzx eax, byte ptr [rax]
mov rcx, [rsp+var_30]
movzx ecx, byte ptr [rcx]
cmp eax, ecx
jz short loc_2456E
mov [rsp+var_4], 0
jmp short loc_245A9
loc_2456E:
mov rax, [rsp+var_28]
add rax, 1
mov [rsp+var_28], rax
mov rax, [rsp+var_30]
add rax, 1
mov [rsp+var_30], rax
jmp short loc_24543
loc_2458C:
cmp [rsp+var_20], 0
jz short loc_245A1
mov rcx, [rsp+var_28]
mov rax, [rsp+var_20]
mov [rax], rcx
loc_245A1:
mov [rsp+var_4], 1
loc_245A9:
mov eax, [rsp+var_4]
retn
|
long long js__strstart(unsigned __int8 *a1, _BYTE *a2, _QWORD *a3)
{
while ( *a2 )
{
if ( *a1 != (unsigned __int8)*a2 )
return 0;
++a1;
++a2;
}
if ( a3 )
*a3 = a1;
return 1;
}
|
js__strstart:
MOV qword ptr [RSP + -0x10],RDI
MOV qword ptr [RSP + -0x18],RSI
MOV qword ptr [RSP + -0x20],RDX
MOV RAX,qword ptr [RSP + -0x10]
MOV qword ptr [RSP + -0x28],RAX
MOV RAX,qword ptr [RSP + -0x18]
MOV qword ptr [RSP + -0x30],RAX
LAB_00124543:
MOV RAX,qword ptr [RSP + -0x30]
MOVZX EAX,byte ptr [RAX]
CMP EAX,0x0
JZ 0x0012458c
MOV RAX,qword ptr [RSP + -0x28]
MOVZX EAX,byte ptr [RAX]
MOV RCX,qword ptr [RSP + -0x30]
MOVZX ECX,byte ptr [RCX]
CMP EAX,ECX
JZ 0x0012456e
MOV dword ptr [RSP + -0x4],0x0
JMP 0x001245a9
LAB_0012456e:
MOV RAX,qword ptr [RSP + -0x28]
ADD RAX,0x1
MOV qword ptr [RSP + -0x28],RAX
MOV RAX,qword ptr [RSP + -0x30]
ADD RAX,0x1
MOV qword ptr [RSP + -0x30],RAX
JMP 0x00124543
LAB_0012458c:
CMP qword ptr [RSP + -0x20],0x0
JZ 0x001245a1
MOV RCX,qword ptr [RSP + -0x28]
MOV RAX,qword ptr [RSP + -0x20]
MOV qword ptr [RAX],RCX
LAB_001245a1:
MOV dword ptr [RSP + -0x4],0x1
LAB_001245a9:
MOV EAX,dword ptr [RSP + -0x4]
RET
|
int4 js__strstart(char *param_1,char *param_2,int8 *param_3)
{
char *local_30;
char *local_28;
local_30 = param_2;
local_28 = param_1;
while( true ) {
if (*local_30 == '\0') {
if (param_3 != (int8 *)0x0) {
*param_3 = local_28;
}
return 1;
}
if (*local_28 != *local_30) break;
local_28 = local_28 + 1;
local_30 = local_30 + 1;
}
return 0;
}
|
|
64,223
|
set_lsn
|
eloqsql/storage/maria/ma_loghandler.c
|
static inline void set_lsn(LSN *lsn, LSN value)
{
DBUG_ENTER("set_lsn");
translog_lock_assert_owner();
*lsn= value;
/* we generate LSN so something is not flushed in log */
log_descriptor.is_everything_flushed= 0;
DBUG_PRINT("info", ("new LSN appeared: " LSN_FMT, LSN_IN_PARTS(value)));
DBUG_VOID_RETURN;
}
|
O0
|
c
|
set_lsn:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rcx
movq -0x8(%rbp), %rax
movq %rcx, (%rax)
movb $0x0, 0xc408d2(%rip) # 0xc79b40
jmp 0x39270
jmp 0x39272
jmp 0x39274
popq %rbp
retq
nopw %cs:(%rax,%rax)
|
set_lsn:
push rbp
mov rbp, rsp
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov rcx, [rbp+var_10]
mov rax, [rbp+var_8]
mov [rax], rcx
mov cs:byte_C79B40, 0
jmp short $+2
loc_39270:
jmp short $+2
loc_39272:
jmp short $+2
loc_39274:
pop rbp
retn
|
_QWORD * set_lsn(_QWORD *a1, long long a2)
{
_QWORD *result; // rax
result = a1;
*a1 = a2;
byte_C79B40 = 0;
return result;
}
|
set_lsn:
PUSH RBP
MOV RBP,RSP
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV RCX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RAX],RCX
MOV byte ptr [0x00d79b40],0x0
JMP 0x00139270
LAB_00139270:
JMP 0x00139272
LAB_00139272:
JMP 0x00139274
LAB_00139274:
POP RBP
RET
|
void set_lsn(int8 *param_1,int8 param_2)
{
*param_1 = param_2;
DAT_00d79b40 = 0;
return;
}
|
|
64,224
|
my_thread_end
|
eloqsql/mysys/my_thr_init.c
|
void my_thread_end(void)
{
struct st_my_thread_var *tmp;
tmp= my_thread_var;
#ifdef EXTRA_DEBUG_THREADS
fprintf(stderr,"my_thread_end(): tmp: %p pthread_self: %p thread_id: %ld\n",
tmp, pthread_self(), tmp ? (long) tmp->id : 0L);
#endif
/*
Remove the instrumentation for this thread.
This must be done before trashing st_my_thread_var,
because the LF_HASH depends on it.
*/
PSI_CALL_delete_current_thread();
/*
We need to disable DBUG early for this thread to ensure that the
the mutex calls doesn't enable it again
To this we have to both do DBUG_POP() and also reset THR_KEY_mysys
as the key is used by DBUG.
*/
DBUG_POP();
set_mysys_var(NULL);
if (tmp && tmp->init)
{
#if !defined(DBUG_OFF)
/* tmp->dbug is allocated inside DBUG library */
if (tmp->dbug)
{
free(tmp->dbug);
tmp->dbug=0;
}
#endif
my_thread_destory_thr_mutex(tmp);
/*
Decrement counter for number of running threads. We are using this
in my_thread_global_end() to wait until all threads have called
my_thread_end and thus freed all memory they have allocated in
my_thread_init() and DBUG_xxxx
*/
mysql_mutex_lock(&THR_LOCK_threads);
DBUG_ASSERT(THR_thread_count != 0);
if (--THR_thread_count == 0)
mysql_cond_signal(&THR_COND_threads);
mysql_mutex_unlock(&THR_LOCK_threads);
/* Trash variable so that we can detect false accesses to my_thread_var */
tmp->init= 2;
free(tmp);
}
}
|
O3
|
c
|
my_thread_end:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
leaq 0x33fc33(%rip), %r15 # 0x3668bc
movl (%r15), %edi
callq 0x244b0
movq %rax, %rbx
leaq 0x2c8865(%rip), %r14 # 0x2ef500
movq (%r14), %rax
callq *0x138(%rax)
movl (%r15), %edi
xorl %esi, %esi
callq 0x240b0
testq %rbx, %rbx
je 0x26d2c
cmpb $0x0, 0xe8(%rbx)
je 0x26d2c
movq %rbx, %rdi
callq 0x2689d
leaq 0x33fb25(%rip), %r15 # 0x3667f0
cmpq $0x0, 0x40(%r15)
jne 0x26d37
leaq 0x33fb17(%rip), %rdi # 0x3667f0
callq 0x24440
leaq 0x33f90b(%rip), %rax # 0x3665f0
decl (%rax)
jne 0x26d05
leaq 0x33fb90(%rip), %rax # 0x366880
movq 0x30(%rax), %rdi
testq %rdi, %rdi
jne 0x26d49
leaq 0x33fb80(%rip), %rdi # 0x366880
callq 0x24040
movq 0x40(%r15), %rdi
testq %rdi, %rdi
jne 0x26d3e
leaq 0x33fadb(%rip), %rdi # 0x3667f0
callq 0x24200
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x24390
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
callq 0x24a38
jmp 0x26cde
movq (%r14), %rax
callq *0x160(%rax)
jmp 0x26d0e
movq (%r14), %rax
callq *0x170(%rax)
jmp 0x26cf9
|
my_thread_end:
push rbp
mov rbp, rsp
push r15
push r14
push rbx
push rax
lea r15, THR_KEY_mysys
mov edi, [r15]
call _pthread_getspecific
mov rbx, rax
lea r14, PSI_server
mov rax, [r14]
call qword ptr [rax+138h]
mov edi, [r15]
xor esi, esi
call _pthread_setspecific
test rbx, rbx
jz short loc_26D2C
cmp byte ptr [rbx+0E8h], 0
jz short loc_26D2C
mov rdi, rbx
call my_thread_destory_thr_mutex
lea r15, THR_LOCK_threads
cmp qword ptr [r15+40h], 0
jnz short loc_26D37
lea rdi, THR_LOCK_threads
call _pthread_mutex_lock
loc_26CDE:
lea rax, THR_thread_count
dec dword ptr [rax]
jnz short loc_26D05
lea rax, THR_COND_threads
mov rdi, [rax+30h]
test rdi, rdi
jnz short loc_26D49
loc_26CF9:
lea rdi, THR_COND_threads
call _pthread_cond_signal
loc_26D05:
mov rdi, [r15+40h]
test rdi, rdi
jnz short loc_26D3E
loc_26D0E:
lea rdi, THR_LOCK_threads
call _pthread_mutex_unlock
mov rdi, rbx
add rsp, 8
pop rbx
pop r14
pop r15
pop rbp
jmp _free
loc_26D2C:
add rsp, 8
pop rbx
pop r14
pop r15
pop rbp
retn
loc_26D37:
call my_thread_end_cold_1
jmp short loc_26CDE
loc_26D3E:
mov rax, [r14]
call qword ptr [rax+160h]
jmp short loc_26D0E
loc_26D49:
mov rax, [r14]
call qword ptr [rax+170h]
jmp short loc_26CF9
|
long long my_thread_end()
{
long long v0; // rdi
long long v1; // rbx
long long result; // rax
long long v3; // rdi
long long v4; // rdi
v0 = THR_KEY_mysys;
v1 = pthread_getspecific(THR_KEY_mysys);
((void ( *)(long long))PSI_server[39])(v0);
result = pthread_setspecific(THR_KEY_mysys, 0LL);
if ( v1 && *(_BYTE *)(v1 + 232) )
{
my_thread_destory_thr_mutex(v1);
if ( THR_LOCK_threads[8] )
my_thread_end_cold_1(v1);
else
pthread_mutex_lock(THR_LOCK_threads);
if ( !--THR_thread_count )
{
v3 = THR_COND_threads[6];
if ( v3 )
((void ( *)(long long))PSI_server[46])(v3);
pthread_cond_signal(THR_COND_threads);
}
v4 = THR_LOCK_threads[8];
if ( v4 )
((void ( *)(long long))PSI_server[44])(v4);
pthread_mutex_unlock(THR_LOCK_threads);
return free(v1, 0LL);
}
return result;
}
|
my_thread_end:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH RBX
PUSH RAX
LEA R15,[0x4668bc]
MOV EDI,dword ptr [R15]
CALL 0x001244b0
MOV RBX,RAX
LEA R14,[0x3ef500]
MOV RAX,qword ptr [R14]
CALL qword ptr [RAX + 0x138]
MOV EDI,dword ptr [R15]
XOR ESI,ESI
CALL 0x001240b0
TEST RBX,RBX
JZ 0x00126d2c
CMP byte ptr [RBX + 0xe8],0x0
JZ 0x00126d2c
MOV RDI,RBX
CALL 0x0012689d
LEA R15,[0x4667f0]
CMP qword ptr [R15 + 0x40],0x0
JNZ 0x00126d37
LEA RDI,[0x4667f0]
CALL 0x00124440
LAB_00126cde:
LEA RAX,[0x4665f0]
DEC dword ptr [RAX]
JNZ 0x00126d05
LEA RAX,[0x466880]
MOV RDI,qword ptr [RAX + 0x30]
TEST RDI,RDI
JNZ 0x00126d49
LAB_00126cf9:
LEA RDI,[0x466880]
CALL 0x00124040
LAB_00126d05:
MOV RDI,qword ptr [R15 + 0x40]
TEST RDI,RDI
JNZ 0x00126d3e
LAB_00126d0e:
LEA RDI,[0x4667f0]
CALL 0x00124200
MOV RDI,RBX
ADD RSP,0x8
POP RBX
POP R14
POP R15
POP RBP
JMP 0x00124390
LAB_00126d2c:
ADD RSP,0x8
POP RBX
POP R14
POP R15
POP RBP
RET
LAB_00126d37:
CALL 0x00124a38
JMP 0x00126cde
LAB_00126d3e:
MOV RAX,qword ptr [R14]
CALL qword ptr [RAX + 0x160]
JMP 0x00126d0e
LAB_00126d49:
MOV RAX,qword ptr [R14]
CALL qword ptr [RAX + 0x170]
JMP 0x00126cf9
|
void my_thread_end(void)
{
void *__ptr;
__ptr = pthread_getspecific(THR_KEY_mysys);
(**(code **)(PSI_server + 0x138))();
pthread_setspecific(THR_KEY_mysys,(void *)0x0);
if ((__ptr != (void *)0x0) && (*(char *)((long)__ptr + 0xe8) != '\0')) {
my_thread_destory_thr_mutex(__ptr);
if (THR_LOCK_threads._64_8_ == 0) {
pthread_mutex_lock((pthread_mutex_t *)THR_LOCK_threads);
}
else {
my_thread_end_cold_1();
}
THR_thread_count = THR_thread_count + -1;
if (THR_thread_count == 0) {
if (THR_COND_threads._48_8_ != 0) {
(**(code **)(PSI_server + 0x170))();
}
pthread_cond_signal((pthread_cond_t *)THR_COND_threads);
}
if (THR_LOCK_threads._64_8_ != 0) {
(**(code **)(PSI_server + 0x160))();
}
pthread_mutex_unlock((pthread_mutex_t *)THR_LOCK_threads);
free(__ptr);
return;
}
return;
}
|
|
64,225
|
bf_remquo
|
bluesky950520[P]quickjs/libbf.c
|
int bf_remquo(slimb_t *pq, bf_t *r, const bf_t *a, const bf_t *b, limb_t prec,
bf_flags_t flags, int rnd_mode)
{
bf_t q_s, *q = &q_s;
int ret;
bf_init(r->ctx, q);
ret = bf_divrem(q, r, a, b, prec, flags, rnd_mode);
bf_get_limb(pq, q, BF_GET_INT_MOD);
bf_delete(q);
return ret;
}
|
O1
|
c
|
bf_remquo:
pushq %r15
pushq %r14
pushq %rbx
subq $0x30, %rsp
movq %rdi, %r14
movl 0x50(%rsp), %eax
movq (%rsi), %rdi
leaq 0x8(%rsp), %r15
movq %rdi, (%r15)
movl $0x0, 0x8(%r15)
movabsq $-0x8000000000000000, %rdi # imm = 0x8000000000000000
movq %rdi, 0x10(%r15)
xorps %xmm0, %xmm0
movups %xmm0, 0x18(%r15)
movl %eax, (%rsp)
movq %r15, %rdi
callq 0x86acf
movl %eax, %ebx
movq %r14, %rdi
movq %r15, %rsi
movl $0x1, %edx
callq 0x888e2
movq (%r15), %rax
testq %rax, %rax
je 0x870ea
movq 0x28(%rsp), %rsi
testq %rsi, %rsi
je 0x870ea
movq (%rax), %rdi
xorl %edx, %edx
callq *0x8(%rax)
movl %ebx, %eax
addq $0x30, %rsp
popq %rbx
popq %r14
popq %r15
retq
|
bf_remquo:
push r15
push r14
push rbx
sub rsp, 30h
mov r14, rdi
mov eax, [rsp+48h+arg_0]
mov rdi, [rsi]
lea r15, [rsp+48h+var_40]
mov [r15], rdi
mov dword ptr [r15+8], 0
mov rdi, 8000000000000000h
mov [r15+10h], rdi
xorps xmm0, xmm0
movups xmmword ptr [r15+18h], xmm0
mov [rsp+48h+var_48], eax
mov rdi, r15
call bf_divrem
mov ebx, eax
mov rdi, r14
mov rsi, r15
mov edx, 1
call bf_get_int64
mov rax, [r15]
test rax, rax
jz short loc_870EA
mov rsi, [rsp+48h+var_20]
test rsi, rsi
jz short loc_870EA
mov rdi, [rax]
xor edx, edx
call qword ptr [rax+8]
loc_870EA:
mov eax, ebx
add rsp, 30h
pop rbx
pop r14
pop r15
retn
|
long long bf_remquo(long long a1, __int128 *a2, long long a3, long long a4, long long a5, unsigned int a6, int a7)
{
unsigned int v7; // ebx
_QWORD *v9; // [rsp+8h] [rbp-40h] BYREF
int v10; // [rsp+10h] [rbp-38h]
unsigned long long v11; // [rsp+18h] [rbp-30h]
__int128 v12; // [rsp+20h] [rbp-28h]
v9 = *(_QWORD **)a2;
v10 = 0;
v11 = 0x8000000000000000LL;
v12 = 0LL;
v7 = bf_divrem(&v9, a2, a3, a4, a5, a6, a7);
bf_get_int64(a1, &v9, 1LL);
if ( v9 && *((_QWORD *)&v12 + 1) )
((void ( *)(_QWORD, _QWORD, _QWORD))v9[1])(*v9, *((_QWORD *)&v12 + 1), 0LL);
return v7;
}
|
bf_remquo:
PUSH R15
PUSH R14
PUSH RBX
SUB RSP,0x30
MOV R14,RDI
MOV EAX,dword ptr [RSP + 0x50]
MOV RDI,qword ptr [RSI]
LEA R15,[RSP + 0x8]
MOV qword ptr [R15],RDI
MOV dword ptr [R15 + 0x8],0x0
MOV RDI,-0x8000000000000000
MOV qword ptr [R15 + 0x10],RDI
XORPS XMM0,XMM0
MOVUPS xmmword ptr [R15 + 0x18],XMM0
MOV dword ptr [RSP],EAX
MOV RDI,R15
CALL 0x00186acf
MOV EBX,EAX
MOV RDI,R14
MOV RSI,R15
MOV EDX,0x1
CALL 0x001888e2
MOV RAX,qword ptr [R15]
TEST RAX,RAX
JZ 0x001870ea
MOV RSI,qword ptr [RSP + 0x28]
TEST RSI,RSI
JZ 0x001870ea
MOV RDI,qword ptr [RAX]
XOR EDX,EDX
CALL qword ptr [RAX + 0x8]
LAB_001870ea:
MOV EAX,EBX
ADD RSP,0x30
POP RBX
POP R14
POP R15
RET
|
int4 bf_remquo(int8 param_1,int8 *param_2)
{
int4 uVar1;
int8 *local_40;
int4 local_38;
int8 local_30;
int8 local_28;
long lStack_20;
local_40 = (int8 *)*param_2;
local_38 = 0;
local_30 = 0x8000000000000000;
local_28 = 0;
lStack_20 = 0;
uVar1 = bf_divrem(&local_40);
bf_get_int64(param_1,&local_40,1);
if ((local_40 != (int8 *)0x0) && (lStack_20 != 0)) {
(*(code *)local_40[1])(*local_40,lStack_20,0);
}
return uVar1;
}
|
|
64,226
|
mysql_list_processes_start_internal
|
eloqsql/libmariadb/libmariadb/mariadb_async.c
|
static void
mysql_list_processes_start_internal(void *d)
{
MK_ASYNC_INTERNAL_BODY(
mysql_list_processes,
(parms->mysql),
parms->mysql,
MYSQL_RES *,
r_ptr)
}
|
O3
|
c
|
mysql_list_processes_start_internal:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq (%rdi), %rdi
movq 0x480(%rdi), %rax
movq 0x28(%rax), %rbx
callq 0x20b8d
movq %rax, 0x8(%rbx)
movl $0x0, (%rbx)
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
|
mysql_list_processes_start_internal:
push rbp
mov rbp, rsp
push rbx
push rax
mov rdi, [rdi]
mov rax, [rdi+480h]
mov rbx, [rax+28h]
call mysql_list_processes
mov [rbx+8], rax
mov dword ptr [rbx], 0
add rsp, 8
pop rbx
pop rbp
retn
|
long long mysql_list_processes_start_internal(long long *a1)
{
long long v1; // rdi
long long v2; // rbx
long long result; // rax
v1 = *a1;
v2 = *(_QWORD *)(*(_QWORD *)(v1 + 1152) + 40LL);
result = mysql_list_processes(v1);
*(_QWORD *)(v2 + 8) = result;
*(_DWORD *)v2 = 0;
return result;
}
|
mysql_list_processes_start_internal:
PUSH RBP
MOV RBP,RSP
PUSH RBX
PUSH RAX
MOV RDI,qword ptr [RDI]
MOV RAX,qword ptr [RDI + 0x480]
MOV RBX,qword ptr [RAX + 0x28]
CALL 0x00120b8d
MOV qword ptr [RBX + 0x8],RAX
MOV dword ptr [RBX],0x0
ADD RSP,0x8
POP RBX
POP RBP
RET
|
void mysql_list_processes_start_internal(long *param_1)
{
int4 *puVar1;
int8 uVar2;
puVar1 = *(int4 **)(*(long *)(*param_1 + 0x480) + 0x28);
uVar2 = mysql_list_processes();
*(int8 *)(puVar1 + 2) = uVar2;
*puVar1 = 0;
return;
}
|
|
64,227
|
testing::internal::FilePath::FindLastPathSeparator() const
|
AlayaLite/build_O0/_deps/googletest-src/googletest/src/gtest-filepath.cc
|
const char* FilePath::FindLastPathSeparator() const {
const char* const last_sep = strrchr(c_str(), kPathSeparator);
#if GTEST_HAS_ALT_PATH_SEP_
const char* const last_alt_sep = strrchr(c_str(), kAlternatePathSeparator);
// Comparing two pointers of which only one is NULL is undefined.
if (last_alt_sep != nullptr &&
(last_sep == nullptr || last_alt_sep > last_sep)) {
return last_alt_sep;
}
#endif
return last_sep;
}
|
O0
|
cpp
|
testing::internal::FilePath::FindLastPathSeparator() const:
subq $0x18, %rsp
movq %rdi, 0x10(%rsp)
movq 0x10(%rsp), %rdi
callq 0xebb90
movq %rax, %rdi
movl $0x2f, %esi
callq 0x167b0
movq %rax, 0x8(%rsp)
movq 0x8(%rsp), %rax
addq $0x18, %rsp
retq
nop
|
_ZNK7testing8internal8FilePath21FindLastPathSeparatorEv:
sub rsp, 18h
mov [rsp+18h+var_8], rdi
mov rdi, [rsp+18h+var_8]; this
call _ZNK7testing8internal8FilePath5c_strEv; testing::internal::FilePath::c_str(void)
mov rdi, rax
mov esi, 2Fh ; '/'
call _strrchr
mov [rsp+18h+var_10], rax
mov rax, [rsp+18h+var_10]
add rsp, 18h
retn
|
long long testing::internal::FilePath::FindLastPathSeparator(testing::internal::FilePath *this)
{
long long v1; // rax
v1 = testing::internal::FilePath::c_str(this);
return strrchr(v1, 47LL);
}
|
FindLastPathSeparator:
SUB RSP,0x18
MOV qword ptr [RSP + 0x10],RDI
MOV RDI,qword ptr [RSP + 0x10]
CALL 0x001ebb90
MOV RDI,RAX
MOV ESI,0x2f
CALL 0x001167b0
MOV qword ptr [RSP + 0x8],RAX
MOV RAX,qword ptr [RSP + 0x8]
ADD RSP,0x18
RET
|
/* testing::internal::FilePath::FindLastPathSeparator() const */
char * __thiscall testing::internal::FilePath::FindLastPathSeparator(FilePath *this)
{
char *pcVar1;
pcVar1 = (char *)c_str(this);
pcVar1 = strrchr(pcVar1,0x2f);
return pcVar1;
}
|
|
64,228
|
test_mdev24827
|
eloqsql/tests/mysql_client_test.c
|
static void test_mdev24827()
{
int rc;
MYSQL_STMT *stmt;
unsigned long cursor = CURSOR_TYPE_READ_ONLY;
const char* query=
"SELECT t2.c1 AS c1 FROM t1 LEFT JOIN t2 ON t1.c1 = t2.c1 "
"WHERE EXISTS (SELECT 1 FROM t1 WHERE c2 = -1) ORDER BY c1";
myheader("test_mdev24827");
rc= mysql_query(mysql, "DROP TABLE IF EXISTS t1");
myquery(rc);
rc= mysql_query(mysql, "DROP TABLE IF EXISTS t2");
myquery(rc);
rc= mysql_query(mysql, "CREATE TABLE t1 (c1 INT PRIMARY KEY, c2 INT)");
myquery(rc);
rc= mysql_query(mysql, "CREATE TABLE t2 (c1 INT PRIMARY KEY, c2 INT, "
"KEY idx_c2(c2))");
myquery(rc);
rc= mysql_query(mysql, "INSERT INTO t1 (c1, c2) "
"SELECT seq, seq FROM seq_1_to_10000");
myquery(rc);
rc= mysql_query(mysql, "INSERT INTO t2 (c1, c2) "
"SELECT seq, seq FROM seq_1_to_20000");
myquery(rc);
stmt= mysql_stmt_init(mysql);
check_stmt(stmt);
rc= mysql_stmt_prepare(stmt, query, strlen(query));
check_execute(stmt, rc);
rc= mysql_stmt_attr_set(stmt, STMT_ATTR_CURSOR_TYPE, &cursor);
check_execute(stmt, rc);
rc= mysql_stmt_execute(stmt);
check_execute(stmt, rc);
mysql_stmt_close(stmt);
rc= mysql_query(mysql, "DROP TABLE t1");
myquery(rc);
rc= mysql_query(mysql, "DROP TABLE t2");
myquery(rc);
}
|
O3
|
c
|
test_mdev24827:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
subq $0x18, %rsp
movq $0x1, -0x10(%rbp)
cmpb $0x1, 0x3db565(%rip) # 0x41a4c1
jg 0x3efd7
movq 0x36105b(%rip), %rbx # 0x39ffc0
movq (%rbx), %rdi
leaq 0xa0555(%rip), %rdx # 0xdf4c4
movl $0x1, %esi
xorl %eax, %eax
callq 0x39240
movq (%rbx), %rdi
movl 0x3db788(%rip), %ecx # 0x41a70c
leal 0x1(%rcx), %eax
movl %eax, 0x3db77f(%rip) # 0x41a70c
movl 0x3db774(%rip), %r8d # 0x41a708
movl 0x3db551(%rip), %r9d # 0x41a4ec
leaq 0xa07db(%rip), %rax # 0xdf77d
movq %rax, (%rsp)
leaq 0xa181f(%rip), %rdx # 0xe07cc
movl $0x1, %esi
xorl %eax, %eax
callq 0x39240
movq (%rbx), %rdi
leaq 0xa0539(%rip), %rdx # 0xdf4fc
movl $0x1, %esi
xorl %eax, %eax
callq 0x39240
movq (%rbx), %rdi
callq 0x394b0
movq 0x3db4ea(%rip), %rdi # 0x41a4c8
leaq 0xa17f9(%rip), %rsi # 0xe07de
callq 0x3b116
testl %eax, %eax
jne 0x3f11b
movq 0x3db4cf(%rip), %rdi # 0x41a4c8
leaq 0xa188e(%rip), %rsi # 0xe088e
callq 0x3b116
testl %eax, %eax
jne 0x3f13a
movq 0x3db4b4(%rip), %rdi # 0x41a4c8
leaq 0xa188b(%rip), %rsi # 0xe08a6
callq 0x3b116
testl %eax, %eax
jne 0x3f159
movq 0x3db499(%rip), %rdi # 0x41a4c8
leaq 0xa189d(%rip), %rsi # 0xe08d3
callq 0x3b116
testl %eax, %eax
jne 0x3f178
movq 0x3db47e(%rip), %rdi # 0x41a4c8
leaq 0xa18bf(%rip), %rsi # 0xe0910
callq 0x3b116
testl %eax, %eax
jne 0x3f197
movq 0x3db463(%rip), %rdi # 0x41a4c8
leaq 0xa18e0(%rip), %rsi # 0xe094c
callq 0x3b116
testl %eax, %eax
jne 0x3f1b6
movq 0x3db448(%rip), %rdi # 0x41a4c8
callq 0x9191c
testq %rax, %rax
je 0x3f1d5
movq %rax, %rbx
leaq 0xa1783(%rip), %rsi # 0xe081b
movl $0x72, %edx
movq %rax, %rdi
callq 0x3b4a1
testl %eax, %eax
jne 0x3f1f4
leaq -0x10(%rbp), %rdx
movq %rbx, %rdi
movl $0x1, %esi
callq 0x908de
testb %al, %al
jne 0x3f214
movq %rbx, %rdi
callq 0x3b510
movq %rbx, %rdi
testl %eax, %eax
jne 0x3f234
callq 0x3b639
movq 0x3db3e3(%rip), %rdi # 0x41a4c8
leaq 0xa1721(%rip), %rsi # 0xe080d
callq 0x3b116
testl %eax, %eax
jne 0x3f251
movq 0x3db3c8(%rip), %rdi # 0x41a4c8
leaq 0xa1881(%rip), %rsi # 0xe0988
callq 0x3b116
testl %eax, %eax
jne 0x3f270
addq $0x18, %rsp
popq %rbx
popq %rbp
retq
xorl %edi, %edi
callq 0x3ba57
leaq 0x9fc83(%rip), %rdi # 0xdedac
leaq 0xb5f8f(%rip), %rdx # 0xf50bf
movl $0x5191, %esi # imm = 0x5191
callq 0x3bb30
xorl %edi, %edi
callq 0x3ba57
leaq 0x9fc64(%rip), %rdi # 0xdedac
leaq 0xb5f70(%rip), %rdx # 0xf50bf
movl $0x5194, %esi # imm = 0x5194
callq 0x3bb30
xorl %edi, %edi
callq 0x3ba57
leaq 0x9fc45(%rip), %rdi # 0xdedac
leaq 0xb5f51(%rip), %rdx # 0xf50bf
movl $0x5197, %esi # imm = 0x5197
callq 0x3bb30
xorl %edi, %edi
callq 0x3ba57
leaq 0x9fc26(%rip), %rdi # 0xdedac
leaq 0xb5f32(%rip), %rdx # 0xf50bf
movl $0x519b, %esi # imm = 0x519B
callq 0x3bb30
xorl %edi, %edi
callq 0x3ba57
leaq 0x9fc07(%rip), %rdi # 0xdedac
leaq 0xb5f13(%rip), %rdx # 0xf50bf
movl $0x519f, %esi # imm = 0x519F
callq 0x3bb30
xorl %edi, %edi
callq 0x3ba57
leaq 0x9fbe8(%rip), %rdi # 0xdedac
leaq 0xb5ef4(%rip), %rdx # 0xf50bf
movl $0x51a3, %esi # imm = 0x51A3
callq 0x3bb30
xorl %edi, %edi
callq 0x3ba57
leaq 0x9fbc9(%rip), %rdi # 0xdedac
leaq 0x9f920(%rip), %rdx # 0xdeb0a
movl $0x51a6, %esi # imm = 0x51A6
callq 0x3bb30
movq %rbx, %rdi
callq 0x3bbbe
leaq 0x9fba9(%rip), %rdi # 0xdedac
leaq 0xab75d(%rip), %rdx # 0xea967
movl $0x51a9, %esi # imm = 0x51A9
callq 0x3bb30
movq %rbx, %rdi
callq 0x3bbbe
leaq 0x9fb89(%rip), %rdi # 0xdedac
leaq 0xab73d(%rip), %rdx # 0xea967
movl $0x51ac, %esi # imm = 0x51AC
callq 0x3bb30
callq 0x3bbbe
leaq 0x9fb6c(%rip), %rdi # 0xdedac
leaq 0xab720(%rip), %rdx # 0xea967
movl $0x51af, %esi # imm = 0x51AF
callq 0x3bb30
xorl %edi, %edi
callq 0x3ba57
leaq 0x9fb4d(%rip), %rdi # 0xdedac
leaq 0xb5e59(%rip), %rdx # 0xf50bf
movl $0x51b3, %esi # imm = 0x51B3
callq 0x3bb30
xorl %edi, %edi
callq 0x3ba57
leaq 0x9fb2e(%rip), %rdi # 0xdedac
leaq 0xb5e3a(%rip), %rdx # 0xf50bf
movl $0x51b6, %esi # imm = 0x51B6
callq 0x3bb30
|
test_mdev24827:
push rbp
mov rbp, rsp
push rbx
sub rsp, 18h
mov [rbp+var_10], 1
cmp cs:opt_silent, 1
jg short loc_3EFD7
mov rbx, cs:stdout_ptr
mov rdi, [rbx]
lea rdx, asc_DF4C4; "\n\n###################################"...
mov esi, 1
xor eax, eax
call ___fprintf_chk
mov rdi, [rbx]
mov ecx, cs:test_count
lea eax, [rcx+1]
mov cs:test_count, eax
mov r8d, cs:iter_count
mov r9d, cs:opt_count
lea rax, aTestMdev24827; "test_mdev24827"
mov [rsp+20h+var_20], rax
lea rdx, aUOfUUS; "%u of (%u/%u): %s"
mov esi, 1
xor eax, eax
call ___fprintf_chk
mov rdi, [rbx]
lea rdx, asc_DF4FC; " \n###################################"...
mov esi, 1
xor eax, eax
call ___fprintf_chk
mov rdi, [rbx]
call _fflush
loc_3EFD7:
mov rdi, cs:mysql
lea rsi, aDropTableIfExi; "DROP TABLE IF EXISTS t1"
call wrap_mysql_query
test eax, eax
jnz loc_3F11B
mov rdi, cs:mysql
lea rsi, aDropTableIfExi_0; "DROP TABLE IF EXISTS t2"
call wrap_mysql_query
test eax, eax
jnz loc_3F13A
mov rdi, cs:mysql
lea rsi, aCreateTableT1C_1; "CREATE TABLE t1 (c1 INT PRIMARY KEY, c2"...
call wrap_mysql_query
test eax, eax
jnz loc_3F159
mov rdi, cs:mysql
lea rsi, aCreateTableT2C; "CREATE TABLE t2 (c1 INT PRIMARY KEY, c2"...
call wrap_mysql_query
test eax, eax
jnz loc_3F178
mov rdi, cs:mysql
lea rsi, aInsertIntoT1C1; "INSERT INTO t1 (c1, c2) SELECT seq, seq"...
call wrap_mysql_query
test eax, eax
jnz loc_3F197
mov rdi, cs:mysql
lea rsi, aInsertIntoT2C1; "INSERT INTO t2 (c1, c2) SELECT seq, seq"...
call wrap_mysql_query
test eax, eax
jnz loc_3F1B6
mov rdi, cs:mysql
call mysql_stmt_init
test rax, rax
jz loc_3F1D5
mov rbx, rax
lea rsi, aSelectT2C1AsC1; "SELECT t2.c1 AS c1 FROM t1 LEFT JOIN t2"...
mov edx, 72h ; 'r'
mov rdi, rax
call wrap_mysql_stmt_prepare
test eax, eax
jnz loc_3F1F4
lea rdx, [rbp+var_10]
mov rdi, rbx
mov esi, 1
call mysql_stmt_attr_set
test al, al
jnz loc_3F214
mov rdi, rbx
call wrap_mysql_stmt_execute
mov rdi, rbx
test eax, eax
jnz loc_3F234
call wrap_mysql_stmt_close
mov rdi, cs:mysql
lea rsi, aDropTableT1; "DROP TABLE t1"
call wrap_mysql_query
test eax, eax
jnz loc_3F251
mov rdi, cs:mysql
lea rsi, aDropTableT2; "DROP TABLE t2"
call wrap_mysql_query
test eax, eax
jnz loc_3F270
add rsp, 18h
pop rbx
pop rbp
retn
loc_3F11B:
xor edi, edi
call print_error
lea rdi, aWorkspaceLlm4b_3; "/workspace/llm4binary/github2025/eloqsq"...
lea rdx, aTmIYear0+9; "r == 0"
mov esi, 5191h
call die
loc_3F13A:
xor edi, edi
call print_error
lea rdi, aWorkspaceLlm4b_3; "/workspace/llm4binary/github2025/eloqsq"...
lea rdx, aTmIYear0+9; "r == 0"
mov esi, 5194h
call die
loc_3F159:
xor edi, edi
call print_error
lea rdi, aWorkspaceLlm4b_3; "/workspace/llm4binary/github2025/eloqsq"...
lea rdx, aTmIYear0+9; "r == 0"
mov esi, 5197h
call die
loc_3F178:
xor edi, edi
call print_error
lea rdi, aWorkspaceLlm4b_3; "/workspace/llm4binary/github2025/eloqsq"...
lea rdx, aTmIYear0+9; "r == 0"
mov esi, 519Bh
call die
loc_3F197:
xor edi, edi
call print_error
lea rdi, aWorkspaceLlm4b_3; "/workspace/llm4binary/github2025/eloqsq"...
lea rdx, aTmIYear0+9; "r == 0"
mov esi, 519Fh
call die
loc_3F1B6:
xor edi, edi
call print_error
lea rdi, aWorkspaceLlm4b_3; "/workspace/llm4binary/github2025/eloqsq"...
lea rdx, aTmIYear0+9; "r == 0"
mov esi, 51A3h
call die
loc_3F1D5:
xor edi, edi
call print_error
lea rdi, aWorkspaceLlm4b_3; "/workspace/llm4binary/github2025/eloqsq"...
lea rdx, aStmt0; "stmt != 0"
mov esi, 51A6h
call die
loc_3F1F4:
mov rdi, rbx
call print_st_error
lea rdi, aWorkspaceLlm4b_3; "/workspace/llm4binary/github2025/eloqsq"...
lea rdx, aRcMysqlDataTru+1Eh; "rc == 0"
mov esi, 51A9h
call die
loc_3F214:
mov rdi, rbx
call print_st_error
lea rdi, aWorkspaceLlm4b_3; "/workspace/llm4binary/github2025/eloqsq"...
lea rdx, aRcMysqlDataTru+1Eh; "rc == 0"
mov esi, 51ACh
call die
loc_3F234:
call print_st_error
lea rdi, aWorkspaceLlm4b_3; "/workspace/llm4binary/github2025/eloqsq"...
lea rdx, aRcMysqlDataTru+1Eh; "rc == 0"
mov esi, 51AFh
call die
loc_3F251:
xor edi, edi
call print_error
lea rdi, aWorkspaceLlm4b_3; "/workspace/llm4binary/github2025/eloqsq"...
lea rdx, aTmIYear0+9; "r == 0"
mov esi, 51B3h
call die
loc_3F270:
xor edi, edi
call print_error
lea rdi, aWorkspaceLlm4b_3; "/workspace/llm4binary/github2025/eloqsq"...
lea rdx, aTmIYear0+9; "r == 0"
mov esi, 51B6h
call die
|
long long test_mdev24827()
{
int v0; // ecx
long long v1; // rax
long long v2; // rbx
long long result; // rax
long long v4; // [rsp+10h] [rbp-10h] BYREF
v4 = 1LL;
if ( opt_silent <= 1 )
{
__fprintf_chk(stdout, 1LL, "\n\n#####################################\n");
v0 = test_count++;
__fprintf_chk(stdout, 1LL, "%u of (%u/%u): %s", v0, iter_count, opt_count, "test_mdev24827");
__fprintf_chk(stdout, 1LL, " \n#####################################\n");
fflush(stdout);
}
if ( (unsigned int)wrap_mysql_query(mysql, (long long)"DROP TABLE IF EXISTS t1") )
{
print_error(0LL);
die("/workspace/llm4binary/github2025/eloqsql/tests/mysql_client_test.c", 20881, "r == 0");
}
if ( (unsigned int)wrap_mysql_query(mysql, (long long)"DROP TABLE IF EXISTS t2") )
{
print_error(0LL);
die("/workspace/llm4binary/github2025/eloqsql/tests/mysql_client_test.c", 20884, "r == 0");
}
if ( (unsigned int)wrap_mysql_query(mysql, (long long)"CREATE TABLE t1 (c1 INT PRIMARY KEY, c2 INT)") )
{
print_error(0LL);
die("/workspace/llm4binary/github2025/eloqsql/tests/mysql_client_test.c", 20887, "r == 0");
}
if ( (unsigned int)wrap_mysql_query(mysql, (long long)"CREATE TABLE t2 (c1 INT PRIMARY KEY, c2 INT, KEY idx_c2(c2))") )
{
print_error(0LL);
die("/workspace/llm4binary/github2025/eloqsql/tests/mysql_client_test.c", 20891, "r == 0");
}
if ( (unsigned int)wrap_mysql_query(mysql, (long long)"INSERT INTO t1 (c1, c2) SELECT seq, seq FROM seq_1_to_10000") )
{
print_error(0LL);
die("/workspace/llm4binary/github2025/eloqsql/tests/mysql_client_test.c", 20895, "r == 0");
}
if ( (unsigned int)wrap_mysql_query(mysql, (long long)"INSERT INTO t2 (c1, c2) SELECT seq, seq FROM seq_1_to_20000") )
{
print_error(0LL);
die("/workspace/llm4binary/github2025/eloqsql/tests/mysql_client_test.c", 20899, "r == 0");
}
v1 = mysql_stmt_init(mysql);
if ( !v1 )
{
print_error(0LL);
die("/workspace/llm4binary/github2025/eloqsql/tests/mysql_client_test.c", 20902, "stmt != 0");
}
v2 = v1;
if ( (unsigned int)wrap_mysql_stmt_prepare(
v1,
(long long)"SELECT t2.c1 AS c1 FROM t1 LEFT JOIN t2 ON t1.c1 = t2.c1 WHERE EXISTS (SELECT 1 FROM t1 "
"WHERE c2 = -1) ORDER BY c1",
114LL) )
{
print_st_error(v2);
die("/workspace/llm4binary/github2025/eloqsql/tests/mysql_client_test.c", 20905, "rc == 0");
}
if ( (unsigned __int8)mysql_stmt_attr_set(v2, 1LL, &v4) )
{
print_st_error(v2);
die("/workspace/llm4binary/github2025/eloqsql/tests/mysql_client_test.c", 20908, "rc == 0");
}
if ( (unsigned int)wrap_mysql_stmt_execute(v2) )
{
print_st_error(v2);
die("/workspace/llm4binary/github2025/eloqsql/tests/mysql_client_test.c", 20911, "rc == 0");
}
wrap_mysql_stmt_close(v2);
if ( (unsigned int)wrap_mysql_query(mysql, (long long)"DROP TABLE t1") )
{
print_error(0LL);
die("/workspace/llm4binary/github2025/eloqsql/tests/mysql_client_test.c", 20915, "r == 0");
}
result = wrap_mysql_query(mysql, (long long)"DROP TABLE t2");
if ( (_DWORD)result )
{
print_error(0LL);
die("/workspace/llm4binary/github2025/eloqsql/tests/mysql_client_test.c", 20918, "r == 0");
}
return result;
}
|
test_mdev24827:
PUSH RBP
MOV RBP,RSP
PUSH RBX
SUB RSP,0x18
MOV qword ptr [RBP + -0x10],0x1
CMP byte ptr [0x0051a4c1],0x1
JG 0x0013efd7
MOV RBX,qword ptr [0x0049ffc0]
MOV RDI,qword ptr [RBX]
LEA RDX,[0x1df4c4]
MOV ESI,0x1
XOR EAX,EAX
CALL 0x00139240
MOV RDI,qword ptr [RBX]
MOV ECX,dword ptr [0x0051a70c]
LEA EAX,[RCX + 0x1]
MOV dword ptr [0x0051a70c],EAX
MOV R8D,dword ptr [0x0051a708]
MOV R9D,dword ptr [0x0051a4ec]
LEA RAX,[0x1df77d]
MOV qword ptr [RSP],RAX
LEA RDX,[0x1e07cc]
MOV ESI,0x1
XOR EAX,EAX
CALL 0x00139240
MOV RDI,qword ptr [RBX]
LEA RDX,[0x1df4fc]
MOV ESI,0x1
XOR EAX,EAX
CALL 0x00139240
MOV RDI,qword ptr [RBX]
CALL 0x001394b0
LAB_0013efd7:
MOV RDI,qword ptr [0x0051a4c8]
LEA RSI,[0x1e07de]
CALL 0x0013b116
TEST EAX,EAX
JNZ 0x0013f11b
MOV RDI,qword ptr [0x0051a4c8]
LEA RSI,[0x1e088e]
CALL 0x0013b116
TEST EAX,EAX
JNZ 0x0013f13a
MOV RDI,qword ptr [0x0051a4c8]
LEA RSI,[0x1e08a6]
CALL 0x0013b116
TEST EAX,EAX
JNZ 0x0013f159
MOV RDI,qword ptr [0x0051a4c8]
LEA RSI,[0x1e08d3]
CALL 0x0013b116
TEST EAX,EAX
JNZ 0x0013f178
MOV RDI,qword ptr [0x0051a4c8]
LEA RSI,[0x1e0910]
CALL 0x0013b116
TEST EAX,EAX
JNZ 0x0013f197
MOV RDI,qword ptr [0x0051a4c8]
LEA RSI,[0x1e094c]
CALL 0x0013b116
TEST EAX,EAX
JNZ 0x0013f1b6
MOV RDI,qword ptr [0x0051a4c8]
CALL 0x0019191c
TEST RAX,RAX
JZ 0x0013f1d5
MOV RBX,RAX
LEA RSI,[0x1e081b]
MOV EDX,0x72
MOV RDI,RAX
CALL 0x0013b4a1
TEST EAX,EAX
JNZ 0x0013f1f4
LEA RDX,[RBP + -0x10]
MOV RDI,RBX
MOV ESI,0x1
CALL 0x001908de
TEST AL,AL
JNZ 0x0013f214
MOV RDI,RBX
CALL 0x0013b510
MOV RDI,RBX
TEST EAX,EAX
JNZ 0x0013f234
CALL 0x0013b639
MOV RDI,qword ptr [0x0051a4c8]
LEA RSI,[0x1e080d]
CALL 0x0013b116
TEST EAX,EAX
JNZ 0x0013f251
MOV RDI,qword ptr [0x0051a4c8]
LEA RSI,[0x1e0988]
CALL 0x0013b116
TEST EAX,EAX
JNZ 0x0013f270
ADD RSP,0x18
POP RBX
POP RBP
RET
LAB_0013f11b:
XOR EDI,EDI
CALL 0x0013ba57
LEA RDI,[0x1dedac]
LEA RDX,[0x1f50bf]
MOV ESI,0x5191
CALL 0x0013bb30
LAB_0013f13a:
XOR EDI,EDI
CALL 0x0013ba57
LEA RDI,[0x1dedac]
LEA RDX,[0x1f50bf]
MOV ESI,0x5194
CALL 0x0013bb30
LAB_0013f159:
XOR EDI,EDI
CALL 0x0013ba57
LEA RDI,[0x1dedac]
LEA RDX,[0x1f50bf]
MOV ESI,0x5197
CALL 0x0013bb30
LAB_0013f178:
XOR EDI,EDI
CALL 0x0013ba57
LEA RDI,[0x1dedac]
LEA RDX,[0x1f50bf]
MOV ESI,0x519b
CALL 0x0013bb30
LAB_0013f197:
XOR EDI,EDI
CALL 0x0013ba57
LEA RDI,[0x1dedac]
LEA RDX,[0x1f50bf]
MOV ESI,0x519f
CALL 0x0013bb30
LAB_0013f1b6:
XOR EDI,EDI
CALL 0x0013ba57
LEA RDI,[0x1dedac]
LEA RDX,[0x1f50bf]
MOV ESI,0x51a3
CALL 0x0013bb30
LAB_0013f1d5:
XOR EDI,EDI
CALL 0x0013ba57
LEA RDI,[0x1dedac]
LEA RDX,[0x1deb0a]
MOV ESI,0x51a6
CALL 0x0013bb30
LAB_0013f1f4:
MOV RDI,RBX
CALL 0x0013bbbe
LEA RDI,[0x1dedac]
LEA RDX,[0x1ea967]
MOV ESI,0x51a9
CALL 0x0013bb30
LAB_0013f214:
MOV RDI,RBX
CALL 0x0013bbbe
LEA RDI,[0x1dedac]
LEA RDX,[0x1ea967]
MOV ESI,0x51ac
CALL 0x0013bb30
LAB_0013f234:
CALL 0x0013bbbe
LEA RDI,[0x1dedac]
LEA RDX,[0x1ea967]
MOV ESI,0x51af
CALL 0x0013bb30
LAB_0013f251:
XOR EDI,EDI
CALL 0x0013ba57
LEA RDI,[0x1dedac]
LEA RDX,[0x1f50bf]
MOV ESI,0x51b3
CALL 0x0013bb30
LAB_0013f270:
XOR EDI,EDI
CALL 0x0013ba57
LEA RDI,[0x1dedac]
LEA RDX,[0x1f50bf]
MOV ESI,0x51b6
CALL 0x0013bb30
|
void test_mdev24827(void)
{
int *puVar1;
char cVar2;
int iVar3;
long lVar4;
int8 local_18;
puVar1 = PTR_stdout_0049ffc0;
local_18 = 1;
if (opt_silent < '\x02') {
__fprintf_chk(*(int8 *)PTR_stdout_0049ffc0,1,"\n\n#####################################\n"
);
iVar3 = test_count;
test_count = test_count + 1;
__fprintf_chk(*(int8 *)puVar1,1,"%u of (%u/%u): %s",iVar3,iter_count,opt_count,
"test_mdev24827");
__fprintf_chk(*(int8 *)puVar1,1," \n#####################################\n");
fflush(*(FILE **)puVar1);
}
iVar3 = wrap_mysql_query(mysql,"DROP TABLE IF EXISTS t1");
if (iVar3 != 0) {
print_error(0);
/* WARNING: Subroutine does not return */
die("/workspace/llm4binary/github2025/eloqsql/tests/mysql_client_test.c",0x5191,"r == 0");
}
iVar3 = wrap_mysql_query(mysql,"DROP TABLE IF EXISTS t2");
if (iVar3 != 0) {
print_error(0);
/* WARNING: Subroutine does not return */
die("/workspace/llm4binary/github2025/eloqsql/tests/mysql_client_test.c",0x5194,"r == 0");
}
iVar3 = wrap_mysql_query(mysql,"CREATE TABLE t1 (c1 INT PRIMARY KEY, c2 INT)");
if (iVar3 != 0) {
print_error(0);
/* WARNING: Subroutine does not return */
die("/workspace/llm4binary/github2025/eloqsql/tests/mysql_client_test.c",0x5197,"r == 0");
}
iVar3 = wrap_mysql_query(mysql,"CREATE TABLE t2 (c1 INT PRIMARY KEY, c2 INT, KEY idx_c2(c2))");
if (iVar3 != 0) {
print_error(0);
/* WARNING: Subroutine does not return */
die("/workspace/llm4binary/github2025/eloqsql/tests/mysql_client_test.c",0x519b,"r == 0");
}
iVar3 = wrap_mysql_query(mysql,"INSERT INTO t1 (c1, c2) SELECT seq, seq FROM seq_1_to_10000");
if (iVar3 != 0) {
print_error(0);
/* WARNING: Subroutine does not return */
die("/workspace/llm4binary/github2025/eloqsql/tests/mysql_client_test.c",0x519f,"r == 0");
}
iVar3 = wrap_mysql_query(mysql,"INSERT INTO t2 (c1, c2) SELECT seq, seq FROM seq_1_to_20000");
if (iVar3 != 0) {
print_error(0);
/* WARNING: Subroutine does not return */
die("/workspace/llm4binary/github2025/eloqsql/tests/mysql_client_test.c",0x51a3,"r == 0");
}
lVar4 = mysql_stmt_init(mysql);
if (lVar4 != 0) {
iVar3 = wrap_mysql_stmt_prepare
(lVar4,
"SELECT t2.c1 AS c1 FROM t1 LEFT JOIN t2 ON t1.c1 = t2.c1 WHERE EXISTS (SELECT 1 FROM t1 WHERE c2 = -1) ORDER BY c1"
,0x72);
if (iVar3 != 0) {
print_st_error(lVar4);
/* WARNING: Subroutine does not return */
die("/workspace/llm4binary/github2025/eloqsql/tests/mysql_client_test.c",0x51a9,"rc == 0");
}
cVar2 = mysql_stmt_attr_set(lVar4,1,&local_18);
if (cVar2 != '\0') {
print_st_error(lVar4);
/* WARNING: Subroutine does not return */
die("/workspace/llm4binary/github2025/eloqsql/tests/mysql_client_test.c",0x51ac,"rc == 0");
}
iVar3 = wrap_mysql_stmt_execute(lVar4);
if (iVar3 != 0) {
print_st_error(lVar4);
/* WARNING: Subroutine does not return */
die("/workspace/llm4binary/github2025/eloqsql/tests/mysql_client_test.c",0x51af,"rc == 0");
}
wrap_mysql_stmt_close();
iVar3 = wrap_mysql_query(mysql,"DROP TABLE t1");
if (iVar3 == 0) {
iVar3 = wrap_mysql_query(mysql,"DROP TABLE t2");
if (iVar3 == 0) {
return;
}
print_error(0);
/* WARNING: Subroutine does not return */
die("/workspace/llm4binary/github2025/eloqsql/tests/mysql_client_test.c",0x51b6,"r == 0");
}
print_error(0);
/* WARNING: Subroutine does not return */
die("/workspace/llm4binary/github2025/eloqsql/tests/mysql_client_test.c",0x51b3,"r == 0");
}
print_error(0);
/* WARNING: Subroutine does not return */
die("/workspace/llm4binary/github2025/eloqsql/tests/mysql_client_test.c",0x51a6,"stmt != 0");
}
|
|
64,229
|
mark_all_entries
|
eloqsql/storage/myisam/rt_split.c
|
static void mark_all_entries(SplitStruct *node, int n_entries, int n_group)
{
SplitStruct *cur = node;
SplitStruct *end = node + n_entries;
for (; cur<end; ++cur)
{
if (cur->n_node)
{
continue;
}
cur->n_node = n_group;
}
}
|
O0
|
c
|
mark_all_entries:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movl %edx, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x18(%rbp)
movq -0x8(%rbp), %rax
movslq -0xc(%rbp), %rcx
shlq $0x5, %rcx
addq %rcx, %rax
movq %rax, -0x20(%rbp)
movq -0x18(%rbp), %rax
cmpq -0x20(%rbp), %rax
jae 0xd75e7
movq -0x18(%rbp), %rax
cmpl $0x0, 0x8(%rax)
je 0xd75cf
jmp 0xd75d9
movl -0x10(%rbp), %ecx
movq -0x18(%rbp), %rax
movl %ecx, 0x8(%rax)
movq -0x18(%rbp), %rax
addq $0x20, %rax
movq %rax, -0x18(%rbp)
jmp 0xd75b9
popq %rbp
retq
nopl (%rax)
|
mark_all_entries_0:
push rbp
mov rbp, rsp
mov [rbp+var_8], rdi
mov [rbp+var_C], esi
mov [rbp+var_10], edx
mov rax, [rbp+var_8]
mov [rbp+var_18], rax
mov rax, [rbp+var_8]
movsxd rcx, [rbp+var_C]
shl rcx, 5
add rax, rcx
mov [rbp+var_20], rax
loc_D75B9:
mov rax, [rbp+var_18]
cmp rax, [rbp+var_20]
jnb short loc_D75E7
mov rax, [rbp+var_18]
cmp dword ptr [rax+8], 0
jz short loc_D75CF
jmp short loc_D75D9
loc_D75CF:
mov ecx, [rbp+var_10]
mov rax, [rbp+var_18]
mov [rax+8], ecx
loc_D75D9:
mov rax, [rbp+var_18]
add rax, 20h ; ' '
mov [rbp+var_18], rax
jmp short loc_D75B9
loc_D75E7:
pop rbp
retn
|
unsigned long long mark_all_entries_0(unsigned long long a1, int a2, int a3)
{
unsigned long long result; // rax
unsigned long long i; // [rsp+8h] [rbp-18h]
for ( i = a1; ; i += 32LL )
{
result = i;
if ( i >= 32LL * a2 + a1 )
break;
if ( !*(_DWORD *)(i + 8) )
*(_DWORD *)(i + 8) = a3;
}
return result;
}
|
mark_all_entries:
PUSH RBP
MOV RBP,RSP
MOV qword ptr [RBP + -0x8],RDI
MOV dword ptr [RBP + -0xc],ESI
MOV dword ptr [RBP + -0x10],EDX
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RBP + -0x18],RAX
MOV RAX,qword ptr [RBP + -0x8]
MOVSXD RCX,dword ptr [RBP + -0xc]
SHL RCX,0x5
ADD RAX,RCX
MOV qword ptr [RBP + -0x20],RAX
LAB_001d75b9:
MOV RAX,qword ptr [RBP + -0x18]
CMP RAX,qword ptr [RBP + -0x20]
JNC 0x001d75e7
MOV RAX,qword ptr [RBP + -0x18]
CMP dword ptr [RAX + 0x8],0x0
JZ 0x001d75cf
JMP 0x001d75d9
LAB_001d75cf:
MOV ECX,dword ptr [RBP + -0x10]
MOV RAX,qword ptr [RBP + -0x18]
MOV dword ptr [RAX + 0x8],ECX
LAB_001d75d9:
MOV RAX,qword ptr [RBP + -0x18]
ADD RAX,0x20
MOV qword ptr [RBP + -0x18],RAX
JMP 0x001d75b9
LAB_001d75e7:
POP RBP
RET
|
void mark_all_entries(ulong param_1,int param_2,int4 param_3)
{
int8 local_20;
for (local_20 = param_1; local_20 < param_1 + (long)param_2 * 0x20; local_20 = local_20 + 0x20) {
if (*(int *)(local_20 + 8) == 0) {
*(int4 *)(local_20 + 8) = param_3;
}
}
return;
}
|
|
64,230
|
js_std_init_handlers
|
bluesky950520[P]quickjs/quickjs-libc.c
|
void js_std_init_handlers(JSRuntime *rt)
{
JSThreadState *ts;
ts = js_mallocz_rt(rt, sizeof(*ts));
if (!ts) {
fprintf(stderr, "Could not allocate memory for the worker");
exit(1);
}
init_list_head(&ts->os_rw_handlers);
init_list_head(&ts->os_signal_handlers);
init_list_head(&ts->os_timers);
init_list_head(&ts->port_list);
ts->next_timer_id = 1;
ts->exc = JS_UNDEFINED;
js_set_thread_state(rt, ts);
JS_AddRuntimeFinalizer(rt, js_std_finalize, ts);
#ifdef USE_WORKER
/* set the SharedArrayBuffer memory handlers */
{
JSSharedArrayBufferFunctions sf;
memset(&sf, 0, sizeof(sf));
sf.sab_alloc = js_sab_alloc;
sf.sab_free = js_sab_free;
sf.sab_dup = js_sab_dup;
JS_SetSharedArrayBufferFunctions(rt, &sf);
}
#endif
}
|
O0
|
c
|
js_std_init_handlers:
subq $0x48, %rsp
movq %rdi, 0x40(%rsp)
movq 0x40(%rsp), %rdi
movl $0x80, %esi
callq 0x208a0
movq %rax, 0x38(%rsp)
cmpq $0x0, 0x38(%rsp)
jne 0xff57
movq 0x1240b4(%rip), %rax # 0x133ff0
movq (%rax), %rdi
leaq 0xf83d3(%rip), %rsi # 0x108319
movb $0x0, %al
callq 0xe540
movl $0x1, %edi
callq 0xe880
movq 0x38(%rsp), %rdi
callq 0x10030
movq 0x38(%rsp), %rdi
addq $0x10, %rdi
callq 0x10030
movq 0x38(%rsp), %rdi
addq $0x20, %rdi
callq 0x10030
movq 0x38(%rsp), %rdi
addq $0x30, %rdi
callq 0x10030
movq 0x38(%rsp), %rax
movq $0x1, 0x48(%rax)
movq 0x38(%rsp), %rax
movl $0x0, 0x28(%rsp)
movq $0x3, 0x30(%rsp)
movq 0x28(%rsp), %rcx
movq %rcx, 0x50(%rax)
movq 0x30(%rsp), %rcx
movq %rcx, 0x58(%rax)
movq 0x40(%rsp), %rdi
movq 0x38(%rsp), %rsi
callq 0x10060
movq 0x40(%rsp), %rdi
movq 0x38(%rsp), %rdx
leaq 0xb0(%rip), %rsi # 0x10090
callq 0x22470
leaq 0x8(%rsp), %rdi
xorl %esi, %esi
movl $0x20, %edx
callq 0xe340
leaq 0xd3(%rip), %rax # 0x100d0
movq %rax, 0x8(%rsp)
leaq 0x127(%rip), %rax # 0x10130
movq %rax, 0x10(%rsp)
leaq 0x16b(%rip), %rax # 0x10180
movq %rax, 0x18(%rsp)
movq 0x40(%rsp), %rdi
leaq 0x8(%rsp), %rsi
callq 0x22630
addq $0x48, %rsp
retq
nop
|
js_std_init_handlers:
sub rsp, 48h
mov [rsp+48h+var_8], rdi
mov rdi, [rsp+48h+var_8]
mov esi, 80h
call js_mallocz_rt
mov [rsp+48h+var_10], rax
cmp [rsp+48h+var_10], 0
jnz short loc_FF57
mov rax, cs:stderr_ptr
mov rdi, [rax]
lea rsi, aCouldNotAlloca; "Could not allocate memory for the worke"...
mov al, 0
call _fprintf
mov edi, 1
call _exit
loc_FF57:
mov rdi, [rsp+48h+var_10]
call init_list_head
mov rdi, [rsp+48h+var_10]
add rdi, 10h
call init_list_head
mov rdi, [rsp+48h+var_10]
add rdi, 20h ; ' '
call init_list_head
mov rdi, [rsp+48h+var_10]
add rdi, 30h ; '0'
call init_list_head
mov rax, [rsp+48h+var_10]
mov qword ptr [rax+48h], 1
mov rax, [rsp+48h+var_10]
mov dword ptr [rsp+48h+var_20], 0
mov [rsp+48h+var_18], 3
mov rcx, [rsp+48h+var_20]
mov [rax+50h], rcx
mov rcx, [rsp+48h+var_18]
mov [rax+58h], rcx
mov rdi, [rsp+48h+var_8]
mov rsi, [rsp+48h+var_10]
call js_set_thread_state
mov rdi, [rsp+48h+var_8]
mov rdx, [rsp+48h+var_10]
lea rsi, js_std_finalize
call JS_AddRuntimeFinalizer
lea rdi, [rsp+48h+var_40]
xor esi, esi
mov edx, 20h ; ' '
call _memset
lea rax, js_sab_alloc
mov [rsp+48h+var_40], rax
lea rax, js_sab_free
mov [rsp+48h+var_38], rax
lea rax, js_sab_dup
mov [rsp+48h+var_30], rax
mov rdi, [rsp+48h+var_8]
lea rsi, [rsp+48h+var_40]
call JS_SetSharedArrayBufferFunctions
add rsp, 48h
retn
|
long long js_std_init_handlers(long long a1)
{
long long v1; // rax
_QWORD v3[4]; // [rsp+8h] [rbp-40h] BYREF
long long v4; // [rsp+28h] [rbp-20h]
long long v5; // [rsp+30h] [rbp-18h]
long long v6; // [rsp+38h] [rbp-10h]
long long v7; // [rsp+40h] [rbp-8h]
v7 = a1;
v6 = js_mallocz_rt(a1, 128LL);
if ( !v6 )
{
fprintf(stderr, "Could not allocate memory for the worker");
exit(1LL);
}
init_list_head(v6);
init_list_head(v6 + 16);
init_list_head(v6 + 32);
init_list_head(v6 + 48);
*(_QWORD *)(v6 + 72) = 1LL;
v1 = v6;
LODWORD(v4) = 0;
v5 = 3LL;
*(_QWORD *)(v6 + 80) = v4;
*(_QWORD *)(v1 + 88) = v5;
js_set_thread_state(v7, v6);
JS_AddRuntimeFinalizer(v7, js_std_finalize, v6);
memset(v3, 0LL, sizeof(v3));
v3[0] = js_sab_alloc;
v3[1] = js_sab_free;
v3[2] = js_sab_dup;
return JS_SetSharedArrayBufferFunctions(v7, v3);
}
|
js_std_init_handlers:
SUB RSP,0x48
MOV qword ptr [RSP + 0x40],RDI
MOV RDI,qword ptr [RSP + 0x40]
MOV ESI,0x80
CALL 0x001208a0
MOV qword ptr [RSP + 0x38],RAX
CMP qword ptr [RSP + 0x38],0x0
JNZ 0x0010ff57
MOV RAX,qword ptr [0x00233ff0]
MOV RDI,qword ptr [RAX]
LEA RSI,[0x208319]
MOV AL,0x0
CALL 0x0010e540
MOV EDI,0x1
CALL 0x0010e880
LAB_0010ff57:
MOV RDI,qword ptr [RSP + 0x38]
CALL 0x00110030
MOV RDI,qword ptr [RSP + 0x38]
ADD RDI,0x10
CALL 0x00110030
MOV RDI,qword ptr [RSP + 0x38]
ADD RDI,0x20
CALL 0x00110030
MOV RDI,qword ptr [RSP + 0x38]
ADD RDI,0x30
CALL 0x00110030
MOV RAX,qword ptr [RSP + 0x38]
MOV qword ptr [RAX + 0x48],0x1
MOV RAX,qword ptr [RSP + 0x38]
MOV dword ptr [RSP + 0x28],0x0
MOV qword ptr [RSP + 0x30],0x3
MOV RCX,qword ptr [RSP + 0x28]
MOV qword ptr [RAX + 0x50],RCX
MOV RCX,qword ptr [RSP + 0x30]
MOV qword ptr [RAX + 0x58],RCX
MOV RDI,qword ptr [RSP + 0x40]
MOV RSI,qword ptr [RSP + 0x38]
CALL 0x00110060
MOV RDI,qword ptr [RSP + 0x40]
MOV RDX,qword ptr [RSP + 0x38]
LEA RSI,[0x110090]
CALL 0x00122470
LEA RDI,[RSP + 0x8]
XOR ESI,ESI
MOV EDX,0x20
CALL 0x0010e340
LEA RAX,[0x1100d0]
MOV qword ptr [RSP + 0x8],RAX
LEA RAX,[0x110130]
MOV qword ptr [RSP + 0x10],RAX
LEA RAX,[0x110180]
MOV qword ptr [RSP + 0x18],RAX
MOV RDI,qword ptr [RSP + 0x40]
LEA RSI,[RSP + 0x8]
CALL 0x00122630
ADD RSP,0x48
RET
|
void js_std_init_handlers(int8 param_1)
{
code *local_40;
code *local_38;
code *local_30;
int4 local_20;
uint uStack_1c;
int8 local_18;
long local_10;
int8 local_8;
local_8 = param_1;
local_10 = js_mallocz_rt(param_1,0x80);
if (local_10 == 0) {
fprintf(*(FILE **)PTR_stderr_00233ff0,"Could not allocate memory for the worker");
/* WARNING: Subroutine does not return */
exit(1);
}
init_list_head(local_10);
init_list_head(local_10 + 0x10);
init_list_head(local_10 + 0x20);
init_list_head(local_10 + 0x30);
*(int8 *)(local_10 + 0x48) = 1;
local_20 = 0;
local_18 = 3;
*(ulong *)(local_10 + 0x50) = (ulong)uStack_1c << 0x20;
*(int8 *)(local_10 + 0x58) = 3;
js_set_thread_state(local_8,local_10);
JS_AddRuntimeFinalizer(local_8,js_std_finalize,local_10);
memset(&local_40,0,0x20);
local_40 = js_sab_alloc;
local_38 = js_sab_free;
local_30 = js_sab_dup;
JS_SetSharedArrayBufferFunctions(local_8,&local_40);
return;
}
|
|
64,231
|
js_std_init_handlers
|
bluesky950520[P]quickjs/quickjs-libc.c
|
void js_std_init_handlers(JSRuntime *rt)
{
JSThreadState *ts;
ts = js_mallocz_rt(rt, sizeof(*ts));
if (!ts) {
fprintf(stderr, "Could not allocate memory for the worker");
exit(1);
}
init_list_head(&ts->os_rw_handlers);
init_list_head(&ts->os_signal_handlers);
init_list_head(&ts->os_timers);
init_list_head(&ts->port_list);
ts->next_timer_id = 1;
ts->exc = JS_UNDEFINED;
js_set_thread_state(rt, ts);
JS_AddRuntimeFinalizer(rt, js_std_finalize, ts);
#ifdef USE_WORKER
/* set the SharedArrayBuffer memory handlers */
{
JSSharedArrayBufferFunctions sf;
memset(&sf, 0, sizeof(sf));
sf.sab_alloc = js_sab_alloc;
sf.sab_free = js_sab_free;
sf.sab_dup = js_sab_dup;
JS_SetSharedArrayBufferFunctions(rt, &sf);
}
#endif
}
|
O1
|
c
|
js_std_init_handlers:
pushq %r14
pushq %rbx
subq $0x28, %rsp
movq %rdi, %rbx
movl $0x80, %esi
callq 0xed32
testq %rax, %rax
je 0x145f8
movq %rax, %r14
movq %rax, (%rax)
movq %rax, 0x8(%rax)
addq $0x10, %rax
movq %rax, 0x10(%r14)
movq %rax, 0x18(%r14)
leaq 0x20(%r14), %rax
movq %rax, 0x20(%r14)
movq %rax, 0x28(%r14)
movq %r14, %rax
addq $0x30, %rax
movq %rax, 0x30(%r14)
movq %rax, 0x38(%r14)
movq $0x1, 0x48(%r14)
movl $0x0, 0x50(%r14)
movq $0x3, 0x58(%r14)
movl $0x1, %edi
movq %rbx, %rsi
movq %r14, %rdx
xorl %eax, %eax
callq 0x399df
leaq 0x4d(%rip), %rsi # 0x145fd
movq %rbx, %rdi
movq %r14, %rdx
callq 0xef52
xorps %xmm0, %xmm0
movq %rsp, %rsi
movaps %xmm0, (%rsi)
movaps %xmm0, 0x10(%rsi)
leaq 0x5b(%rip), %rax # 0x1462a
movq %rax, (%rsi)
leaq 0x70(%rip), %rax # 0x14649
movq %rax, 0x8(%rsi)
leaq 0x78(%rip), %rax # 0x1465c
movq %rax, 0x10(%rsi)
movq %rbx, %rdi
callq 0x1cba8
addq $0x28, %rsp
popq %rbx
popq %r14
retq
callq 0xe9b0
|
js_std_init_handlers:
push r14
push rbx
sub rsp, 28h
mov rbx, rdi
mov esi, 80h
call js_mallocz_rt
test rax, rax
jz loc_145F8
mov r14, rax
mov [rax], rax
mov [rax+8], rax
add rax, 10h
mov [r14+10h], rax
mov [r14+18h], rax
lea rax, [r14+20h]
mov [r14+20h], rax
mov [r14+28h], rax
mov rax, r14
add rax, 30h ; '0'
mov [r14+30h], rax
mov [r14+38h], rax
mov qword ptr [r14+48h], 1
mov dword ptr [r14+50h], 0
mov qword ptr [r14+58h], 3
mov edi, 1
mov rsi, rbx
mov rdx, r14
xor eax, eax
call js_std_cmd
lea rsi, js_std_finalize
mov rdi, rbx
mov rdx, r14
call JS_AddRuntimeFinalizer
xorps xmm0, xmm0
mov rsi, rsp
movaps xmmword ptr [rsi], xmm0
movaps xmmword ptr [rsi+10h], xmm0
lea rax, js_sab_alloc
mov [rsi], rax
lea rax, js_sab_free
mov [rsi+8], rax
lea rax, js_sab_dup
mov [rsi+10h], rax
mov rdi, rbx
call JS_SetSharedArrayBufferFunctions
add rsp, 28h
pop rbx
pop r14
retn
loc_145F8:
call js_std_init_handlers_cold_1
|
long long js_std_init_handlers(long long a1)
{
_QWORD *v1; // rax
int v2; // ecx
int v3; // r8d
int v4; // r9d
long long v5; // r14
_QWORD *v6; // rax
v1 = (_QWORD *)js_mallocz_rt(a1, 0x80uLL);
if ( !v1 )
js_std_init_handlers_cold_1();
v5 = (long long)v1;
*v1 = v1;
v1[1] = v1;
v6 = v1 + 2;
*(_QWORD *)(v5 + 16) = v6;
*(_QWORD *)(v5 + 24) = v6;
*(_QWORD *)(v5 + 32) = v5 + 32;
*(_QWORD *)(v5 + 40) = v5 + 32;
*(_QWORD *)(v5 + 48) = v5 + 48;
*(_QWORD *)(v5 + 56) = v5 + 48;
*(_QWORD *)(v5 + 72) = 1LL;
*(_DWORD *)(v5 + 80) = 0;
*(_QWORD *)(v5 + 88) = 3LL;
js_std_cmd(1, a1, v5, v2, v3, v4);
JS_AddRuntimeFinalizer(a1, (long long)js_std_finalize, v5);
return ((long long ( *)(long long))JS_SetSharedArrayBufferFunctions)(a1);
}
|
js_std_init_handlers:
PUSH R14
PUSH RBX
SUB RSP,0x28
MOV RBX,RDI
MOV ESI,0x80
CALL 0x0010ed32
TEST RAX,RAX
JZ 0x001145f8
MOV R14,RAX
MOV qword ptr [RAX],RAX
MOV qword ptr [RAX + 0x8],RAX
ADD RAX,0x10
MOV qword ptr [R14 + 0x10],RAX
MOV qword ptr [R14 + 0x18],RAX
LEA RAX,[R14 + 0x20]
MOV qword ptr [R14 + 0x20],RAX
MOV qword ptr [R14 + 0x28],RAX
MOV RAX,R14
ADD RAX,0x30
MOV qword ptr [R14 + 0x30],RAX
MOV qword ptr [R14 + 0x38],RAX
MOV qword ptr [R14 + 0x48],0x1
MOV dword ptr [R14 + 0x50],0x0
MOV qword ptr [R14 + 0x58],0x3
MOV EDI,0x1
MOV RSI,RBX
MOV RDX,R14
XOR EAX,EAX
CALL 0x001399df
LEA RSI,[0x1145fd]
MOV RDI,RBX
MOV RDX,R14
CALL 0x0010ef52
XORPS XMM0,XMM0
MOV RSI,RSP
MOVAPS xmmword ptr [RSI],XMM0
MOVAPS xmmword ptr [RSI + 0x10],XMM0
LEA RAX,[0x11462a]
MOV qword ptr [RSI],RAX
LEA RAX,[0x114649]
MOV qword ptr [RSI + 0x8],RAX
LEA RAX,[0x11465c]
MOV qword ptr [RSI + 0x10],RAX
MOV RDI,RBX
CALL 0x0011cba8
ADD RSP,0x28
POP RBX
POP R14
RET
LAB_001145f8:
CALL 0x0010e9b0
|
void js_std_init_handlers(int8 param_1)
{
long lVar1;
int8 uVar2;
int8 uVar3;
uVar2 = 0x80;
uVar3 = param_1;
lVar1 = js_mallocz_rt(param_1,0x80);
if (lVar1 != 0) {
*(long *)lVar1 = lVar1;
*(long *)(lVar1 + 8) = lVar1;
*(long *)(lVar1 + 0x10) = lVar1 + 0x10;
*(long *)(lVar1 + 0x18) = lVar1 + 0x10;
*(long *)(lVar1 + 0x20) = lVar1 + 0x20;
*(long *)(lVar1 + 0x28) = lVar1 + 0x20;
*(long *)(lVar1 + 0x30) = lVar1 + 0x30;
*(long *)(lVar1 + 0x38) = lVar1 + 0x30;
*(int8 *)(lVar1 + 0x48) = 1;
*(int4 *)(lVar1 + 0x50) = 0;
*(int8 *)(lVar1 + 0x58) = 3;
js_std_cmd(1,param_1,lVar1);
JS_AddRuntimeFinalizer(param_1,js_std_finalize,lVar1);
JS_SetSharedArrayBufferFunctions(param_1);
return;
}
js_std_init_handlers_cold_1();
js_std_cmd(1,uVar3,0);
js_free_rt(uVar3,uVar2);
return;
}
|
|
64,232
|
js_std_init_handlers
|
bluesky950520[P]quickjs/quickjs-libc.c
|
void js_std_init_handlers(JSRuntime *rt)
{
JSThreadState *ts;
ts = js_mallocz_rt(rt, sizeof(*ts));
if (!ts) {
fprintf(stderr, "Could not allocate memory for the worker");
exit(1);
}
init_list_head(&ts->os_rw_handlers);
init_list_head(&ts->os_signal_handlers);
init_list_head(&ts->os_timers);
init_list_head(&ts->port_list);
ts->next_timer_id = 1;
ts->exc = JS_UNDEFINED;
js_set_thread_state(rt, ts);
JS_AddRuntimeFinalizer(rt, js_std_finalize, ts);
#ifdef USE_WORKER
/* set the SharedArrayBuffer memory handlers */
{
JSSharedArrayBufferFunctions sf;
memset(&sf, 0, sizeof(sf));
sf.sab_alloc = js_sab_alloc;
sf.sab_free = js_sab_free;
sf.sab_dup = js_sab_dup;
JS_SetSharedArrayBufferFunctions(rt, &sf);
}
#endif
}
|
O3
|
c
|
js_std_init_handlers:
pushq %r14
pushq %rbx
subq $0x28, %rsp
movq %rdi, %rbx
movl $0x80, %esi
callq 0xed51
testq %rax, %rax
je 0x15045
movq %rax, %r14
movq %rax, (%rax)
movq %rax, 0x8(%rax)
addq $0x10, %rax
movq %rax, 0x10(%r14)
movq %rax, 0x18(%r14)
leaq 0x20(%r14), %rax
movq %rax, 0x20(%r14)
movq %rax, 0x28(%r14)
movq %r14, %rax
addq $0x30, %rax
movq %rax, 0x30(%r14)
movq %rax, 0x38(%r14)
movq $0x1, 0x48(%r14)
movl $0x0, 0x50(%r14)
movq $0x3, 0x58(%r14)
movl $0x1, %edi
movq %rbx, %rsi
movq %r14, %rdx
xorl %eax, %eax
callq 0x3af34
leaq 0x4d(%rip), %rsi # 0x1504a
movq %rbx, %rdi
movq %r14, %rdx
callq 0xefc0
leaq 0x8(%rsp), %rsi
movq $0x0, 0x18(%rsi)
leaq 0x5b(%rip), %rax # 0x15077
movq %rax, (%rsi)
leaq 0x70(%rip), %rax # 0x15096
movq %rax, 0x8(%rsi)
leaq 0x78(%rip), %rax # 0x150a9
movq %rax, 0x10(%rsi)
movq %rbx, %rdi
callq 0x1d47d
addq $0x28, %rsp
popq %rbx
popq %r14
retq
callq 0xe9b0
|
js_std_init_handlers:
push r14
push rbx
sub rsp, 28h
mov rbx, rdi
mov esi, 80h
call js_mallocz_rt
test rax, rax
jz loc_15045
mov r14, rax
mov [rax], rax
mov [rax+8], rax
add rax, 10h
mov [r14+10h], rax
mov [r14+18h], rax
lea rax, [r14+20h]
mov [r14+20h], rax
mov [r14+28h], rax
mov rax, r14
add rax, 30h ; '0'
mov [r14+30h], rax
mov [r14+38h], rax
mov qword ptr [r14+48h], 1
mov dword ptr [r14+50h], 0
mov qword ptr [r14+58h], 3
mov edi, 1
mov rsi, rbx
mov rdx, r14
xor eax, eax
call js_std_cmd
lea rsi, js_std_finalize
mov rdi, rbx
mov rdx, r14
call JS_AddRuntimeFinalizer
lea rsi, [rsp+38h+var_30]
mov qword ptr [rsi+18h], 0
lea rax, js_sab_alloc
mov [rsi], rax
lea rax, js_sab_free
mov [rsi+8], rax
lea rax, js_sab_dup
mov [rsi+10h], rax
mov rdi, rbx
call JS_SetSharedArrayBufferFunctions
add rsp, 28h
pop rbx
pop r14
retn
loc_15045:
call js_std_init_handlers_cold_1
|
long long js_std_init_handlers(long long a1)
{
_QWORD *v1; // rax
int v2; // ecx
int v3; // r8d
int v4; // r9d
long long v5; // r14
_QWORD *v6; // rax
v1 = (_QWORD *)js_mallocz_rt(a1, 0x80uLL);
if ( !v1 )
js_std_init_handlers_cold_1();
v5 = (long long)v1;
*v1 = v1;
v1[1] = v1;
v6 = v1 + 2;
*(_QWORD *)(v5 + 16) = v6;
*(_QWORD *)(v5 + 24) = v6;
*(_QWORD *)(v5 + 32) = v5 + 32;
*(_QWORD *)(v5 + 40) = v5 + 32;
*(_QWORD *)(v5 + 48) = v5 + 48;
*(_QWORD *)(v5 + 56) = v5 + 48;
*(_QWORD *)(v5 + 72) = 1LL;
*(_DWORD *)(v5 + 80) = 0;
*(_QWORD *)(v5 + 88) = 3LL;
js_std_cmd(1, a1, v5, v2, v3, v4);
JS_AddRuntimeFinalizer(a1, (long long)js_std_finalize, v5);
return JS_SetSharedArrayBufferFunctions(a1);
}
|
js_std_init_handlers:
PUSH R14
PUSH RBX
SUB RSP,0x28
MOV RBX,RDI
MOV ESI,0x80
CALL 0x0010ed51
TEST RAX,RAX
JZ 0x00115045
MOV R14,RAX
MOV qword ptr [RAX],RAX
MOV qword ptr [RAX + 0x8],RAX
ADD RAX,0x10
MOV qword ptr [R14 + 0x10],RAX
MOV qword ptr [R14 + 0x18],RAX
LEA RAX,[R14 + 0x20]
MOV qword ptr [R14 + 0x20],RAX
MOV qword ptr [R14 + 0x28],RAX
MOV RAX,R14
ADD RAX,0x30
MOV qword ptr [R14 + 0x30],RAX
MOV qword ptr [R14 + 0x38],RAX
MOV qword ptr [R14 + 0x48],0x1
MOV dword ptr [R14 + 0x50],0x0
MOV qword ptr [R14 + 0x58],0x3
MOV EDI,0x1
MOV RSI,RBX
MOV RDX,R14
XOR EAX,EAX
CALL 0x0013af34
LEA RSI,[0x11504a]
MOV RDI,RBX
MOV RDX,R14
CALL 0x0010efc0
LEA RSI,[RSP + 0x8]
MOV qword ptr [RSI + 0x18],0x0
LEA RAX,[0x115077]
MOV qword ptr [RSI],RAX
LEA RAX,[0x115096]
MOV qword ptr [RSI + 0x8],RAX
LEA RAX,[0x1150a9]
MOV qword ptr [RSI + 0x10],RAX
MOV RDI,RBX
CALL 0x0011d47d
ADD RSP,0x28
POP RBX
POP R14
RET
LAB_00115045:
CALL 0x0010e9b0
|
void js_std_init_handlers(int8 param_1)
{
long lVar1;
int8 uVar2;
int8 uVar3;
uVar2 = 0x80;
uVar3 = param_1;
lVar1 = js_mallocz_rt(param_1,0x80);
if (lVar1 != 0) {
*(long *)lVar1 = lVar1;
*(long *)(lVar1 + 8) = lVar1;
*(long *)(lVar1 + 0x10) = lVar1 + 0x10;
*(long *)(lVar1 + 0x18) = lVar1 + 0x10;
*(long *)(lVar1 + 0x20) = lVar1 + 0x20;
*(long *)(lVar1 + 0x28) = lVar1 + 0x20;
*(long *)(lVar1 + 0x30) = lVar1 + 0x30;
*(long *)(lVar1 + 0x38) = lVar1 + 0x30;
*(int8 *)(lVar1 + 0x48) = 1;
*(int4 *)(lVar1 + 0x50) = 0;
*(int8 *)(lVar1 + 0x58) = 3;
js_std_cmd(1,param_1,lVar1);
JS_AddRuntimeFinalizer(param_1,js_std_finalize,lVar1);
JS_SetSharedArrayBufferFunctions(param_1);
return;
}
js_std_init_handlers_cold_1();
js_std_cmd(1,uVar3,0);
js_free_rt(uVar3,uVar2);
return;
}
|
|
64,233
|
void nglog::internal::MakeCheckOpValueString<signed char>(std::ostream*, signed char const&)
|
ng-log[P]ng-log/src/logging.cc
|
void MakeCheckOpValueString(std::ostream* os, const signed char& v) {
if (v >= 32 && v <= 126) {
(*os) << "'" << v << "'";
} else {
(*os) << "signed char value " << static_cast<short>(v);
}
}
|
O3
|
cpp
|
void nglog::internal::MakeCheckOpValueString<signed char>(std::ostream*, signed char const&):
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rsi, %r14
movq %rdi, %rbx
movb (%rsi), %al
addb $-0x7f, %al
cmpb $-0x5f, %al
jae 0xfd0d
leaq 0x14cab(%rip), %rsi # 0x24996
movl $0x12, %edx
movq %rbx, %rdi
callq 0x75c0
movsbl (%r14), %esi
movq %rbx, %rdi
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
jmp 0x7470
leaq 0x14aca(%rip), %r15 # 0x247de
movl $0x1, %edx
movq %rbx, %rdi
movq %r15, %rsi
callq 0x75c0
movb (%r14), %al
leaq 0xf(%rsp), %rsi
movb %al, (%rsi)
movl $0x1, %edx
movq %rbx, %rdi
callq 0x75c0
movl $0x1, %edx
movq %rax, %rdi
movq %r15, %rsi
callq 0x75c0
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
|
_ZN5nglog8internal22MakeCheckOpValueStringIaEEvPSoRKT_:
push r15
push r14
push rbx
sub rsp, 10h
mov r14, rsi
mov rbx, rdi
mov al, [rsi]
add al, 81h
cmp al, 0A1h
jnb short loc_FD0D
lea rsi, aUnsignedCharVa+2; "signed char value "
mov edx, 12h
mov rdi, rbx
call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long)
movsx esi, byte ptr [r14]
mov rdi, rbx
add rsp, 10h
pop rbx
pop r14
pop r15
jmp __ZNSolsEs; std::ostream::operator<<(short)
loc_FD0D:
lea r15, aDataNumCharsTo+59h; "'"
mov edx, 1
mov rdi, rbx
mov rsi, r15
call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long)
mov al, [r14]
lea rsi, [rsp+28h+var_19]
mov [rsi], al
mov edx, 1
mov rdi, rbx
call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long)
mov edx, 1
mov rdi, rax
mov rsi, r15
call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long)
add rsp, 10h
pop rbx
pop r14
pop r15
retn
|
long long nglog::internal::MakeCheckOpValueString<signed char>(long long a1, char *a2)
{
long long v3; // rax
_BYTE v4[25]; // [rsp+Fh] [rbp-19h] BYREF
if ( (unsigned __int8)(*a2 - 127) >= 0xA1u )
{
std::__ostream_insert<char,std::char_traits<char>>(a1, "'", 1LL);
v4[0] = *a2;
v3 = std::__ostream_insert<char,std::char_traits<char>>(a1, v4, 1LL);
return std::__ostream_insert<char,std::char_traits<char>>(v3, "'", 1LL);
}
else
{
std::__ostream_insert<char,std::char_traits<char>>(a1, "signed char value ", 18LL);
return std::ostream::operator<<(a1, (unsigned int)*a2);
}
}
|
MakeCheckOpValueString<signed_char>:
PUSH R15
PUSH R14
PUSH RBX
SUB RSP,0x10
MOV R14,RSI
MOV RBX,RDI
MOV AL,byte ptr [RSI]
ADD AL,0x81
CMP AL,0xa1
JNC 0x0010fd0d
LEA RSI,[0x124996]
MOV EDX,0x12
MOV RDI,RBX
CALL 0x001075c0
MOVSX ESI,byte ptr [R14]
MOV RDI,RBX
ADD RSP,0x10
POP RBX
POP R14
POP R15
JMP 0x00107470
LAB_0010fd0d:
LEA R15,[0x1247de]
MOV EDX,0x1
MOV RDI,RBX
MOV RSI,R15
CALL 0x001075c0
MOV AL,byte ptr [R14]
LEA RSI,[RSP + 0xf]
MOV byte ptr [RSI],AL
MOV EDX,0x1
MOV RDI,RBX
CALL 0x001075c0
MOV EDX,0x1
MOV RDI,RAX
MOV RSI,R15
CALL 0x001075c0
ADD RSP,0x10
POP RBX
POP R14
POP R15
RET
|
/* void nglog::internal::MakeCheckOpValueString<signed char>(std::ostream*, signed char const&) */
void nglog::internal::MakeCheckOpValueString<signed_char>(ostream *param_1,signed *param_2)
{
ostream *poVar1;
signed local_19;
if ((byte)((char)*param_2 + 0x81U) < 0xa1) {
std::__ostream_insert<char,std::char_traits<char>>(param_1,"signed char value ",0x12);
std::ostream::operator<<(param_1,(short)(char)*param_2);
return;
}
std::__ostream_insert<char,std::char_traits<char>>(param_1,"\'",1);
local_19 = *param_2;
poVar1 = std::__ostream_insert<char,std::char_traits<char>>(param_1,(char *)&local_19,1);
std::__ostream_insert<char,std::char_traits<char>>(poVar1,"\'",1);
return;
}
|
|
64,234
|
crossline_updown_move
|
xtate/src/crossline/crossline.c
|
static int crossline_updown_move(const char *prompt, int *pCurPos, int *pCurNum,
int off, int bForce) {
int rows, cols, len = (int)strlen(prompt), cur_pos = *pCurPos;
crossline_screen_get(&rows, &cols);
if (!bForce && (*pCurPos == *pCurNum)) {
return 0;
} // at end of last line
if (off < 0) {
if ((*pCurPos + len) / cols == 0) {
return 0;
} // at first line
*pCurPos -= cols;
if (*pCurPos < 0) {
*pCurPos = 0;
}
crossline_cursor_move(-1,
(*pCurPos + len) % cols - (cur_pos + len) % cols);
} else {
if ((*pCurPos + len) / cols == (*pCurNum + len) / cols) {
return 0;
} // at last line
*pCurPos += cols;
if (*pCurPos > *pCurNum) {
*pCurPos = *pCurNum - 1;
} // one char left to avoid history shortcut
crossline_cursor_move(1,
(*pCurPos + len) % cols - (cur_pos + len) % cols);
}
return 1;
}
|
O3
|
c
|
crossline_updown_move:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movl %r8d, %ebx
movl %ecx, 0xc(%rsp)
movq %rdx, %rbp
movq %rsi, %r15
callq 0x15470
movq %rax, %r14
movl (%r15), %eax
movl %eax, 0x8(%rsp)
leaq 0x10(%rsp), %r12
movq $0x0, (%r12)
xorl %r13d, %r13d
movl $0x5413, %esi # imm = 0x5413
movl $0x1, %edi
movq %r12, %rdx
xorl %eax, %eax
callq 0x15140
movzwl 0x2(%r12), %ecx
cmpw $0x2, %cx
movl $0xa0, %eax
cmovael %ecx, %eax
testl %ebx, %ebx
jne 0x19b01
movl (%r15), %ecx
cmpl (%rbp), %ecx
je 0x19b7d
movzwl %ax, %r8d
movl (%r15), %ecx
leal (%rcx,%r14), %eax
cltd
idivl %r8d
movl %eax, %esi
cmpl $0x0, 0xc(%rsp)
js 0x19b3d
movl (%rbp), %eax
addl %r14d, %eax
cltd
idivl %r8d
cmpl %eax, %esi
je 0x19b7a
addl %r8d, %ecx
movl %ecx, (%r15)
movl (%rbp), %eax
movl $0x1, %edi
cmpl %eax, %ecx
jle 0x19b55
decl %eax
jmp 0x19b50
testl %esi, %esi
je 0x19b7a
subl %r8d, %ecx
xorl %eax, %eax
testl %ecx, %ecx
cmovgl %ecx, %eax
movl $0xffffffff, %edi # imm = 0xFFFFFFFF
movl %eax, %ecx
movl %eax, (%r15)
addl %r14d, %ecx
movl %ecx, %eax
cltd
idivl %r8d
movl %edx, %esi
movl 0x8(%rsp), %eax
addl %r14d, %eax
cltd
idivl %r8d
subl %edx, %esi
callq 0x17889
movl $0x1, %r13d
jmp 0x19b7d
xorl %r13d, %r13d
movl %r13d, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
|
crossline_updown_move:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 18h
mov ebx, r8d
mov [rsp+48h+var_3C], ecx
mov rbp, rdx
mov r15, rsi
call _strlen
mov r14, rax
mov eax, [r15]
mov [rsp+48h+var_40], eax
lea r12, [rsp+48h+var_38]
mov qword ptr [r12], 0
xor r13d, r13d
mov esi, 5413h
mov edi, 1
mov rdx, r12
xor eax, eax
call _ioctl
movzx ecx, word ptr [r12+2]
cmp cx, 2
mov eax, 0A0h
cmovnb eax, ecx
test ebx, ebx
jnz short loc_19B01
mov ecx, [r15]
cmp ecx, [rbp+0]
jz short loc_19B7D
loc_19B01:
movzx r8d, ax
mov ecx, [r15]
lea eax, [rcx+r14]
cdq
idiv r8d
mov esi, eax
cmp [rsp+48h+var_3C], 0
js short loc_19B3D
mov eax, [rbp+0]
add eax, r14d
cdq
idiv r8d
cmp esi, eax
jz short loc_19B7A
add ecx, r8d
mov [r15], ecx
mov eax, [rbp+0]
mov edi, 1
cmp ecx, eax
jle short loc_19B55
dec eax
jmp short loc_19B50
loc_19B3D:
test esi, esi
jz short loc_19B7A
sub ecx, r8d
xor eax, eax
test ecx, ecx
cmovg eax, ecx
mov edi, 0FFFFFFFFh
loc_19B50:
mov ecx, eax
mov [r15], eax
loc_19B55:
add ecx, r14d
mov eax, ecx
cdq
idiv r8d
mov esi, edx
mov eax, [rsp+48h+var_40]
add eax, r14d
cdq
idiv r8d
sub esi, edx
call crossline_cursor_move
mov r13d, 1
jmp short loc_19B7D
loc_19B7A:
xor r13d, r13d
loc_19B7D:
mov eax, r13d
add rsp, 18h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
|
long long crossline_updown_move(long long a1, int *a2, int *a3, int a4, int a5)
{
int v8; // r14d
unsigned int v9; // r13d
unsigned __int16 v10; // ax
int v11; // r8d
int v12; // ecx
int v13; // esi
int v14; // ecx
int v15; // edi
int v16; // eax
int v17; // ecx
int v19; // [rsp+8h] [rbp-40h]
long long v21; // [rsp+10h] [rbp-38h] BYREF
v8 = strlen(a1);
v19 = *a2;
v21 = 0LL;
v9 = 0;
ioctl(1LL, 21523LL, &v21);
v10 = 160;
if ( WORD1(v21) >= 2u )
v10 = WORD1(v21);
if ( a5 || *a2 != *a3 )
{
v11 = v10;
v12 = *a2;
v13 = (*a2 + v8) / v10;
if ( a4 < 0 )
{
if ( v13 )
{
v17 = v12 - v10;
v16 = 0;
if ( v17 > 0 )
v16 = v17;
v15 = -1;
goto LABEL_13;
}
}
else if ( v13 != (v8 + *a3) / v10 )
{
v14 = v10 + v12;
*a2 = v14;
v15 = 1;
if ( v14 <= *a3 )
{
LABEL_14:
crossline_cursor_move(v15, (v8 + v14) % v11 - (v8 + v19) % v11);
return 1;
}
v16 = *a3 - 1;
LABEL_13:
v14 = v16;
*a2 = v16;
goto LABEL_14;
}
return 0;
}
return v9;
}
|
crossline_updown_move:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x18
MOV EBX,R8D
MOV dword ptr [RSP + 0xc],ECX
MOV RBP,RDX
MOV R15,RSI
CALL 0x00115470
MOV R14,RAX
MOV EAX,dword ptr [R15]
MOV dword ptr [RSP + 0x8],EAX
LEA R12,[RSP + 0x10]
MOV qword ptr [R12],0x0
XOR R13D,R13D
MOV ESI,0x5413
MOV EDI,0x1
MOV RDX,R12
XOR EAX,EAX
CALL 0x00115140
MOVZX ECX,word ptr [R12 + 0x2]
CMP CX,0x2
MOV EAX,0xa0
CMOVNC EAX,ECX
TEST EBX,EBX
JNZ 0x00119b01
MOV ECX,dword ptr [R15]
CMP ECX,dword ptr [RBP]
JZ 0x00119b7d
LAB_00119b01:
MOVZX R8D,AX
MOV ECX,dword ptr [R15]
LEA EAX,[RCX + R14*0x1]
CDQ
IDIV R8D
MOV ESI,EAX
CMP dword ptr [RSP + 0xc],0x0
JS 0x00119b3d
MOV EAX,dword ptr [RBP]
ADD EAX,R14D
CDQ
IDIV R8D
CMP ESI,EAX
JZ 0x00119b7a
ADD ECX,R8D
MOV dword ptr [R15],ECX
MOV EAX,dword ptr [RBP]
MOV EDI,0x1
CMP ECX,EAX
JLE 0x00119b55
DEC EAX
JMP 0x00119b50
LAB_00119b3d:
TEST ESI,ESI
JZ 0x00119b7a
SUB ECX,R8D
XOR EAX,EAX
TEST ECX,ECX
CMOVG EAX,ECX
MOV EDI,0xffffffff
LAB_00119b50:
MOV ECX,EAX
MOV dword ptr [R15],EAX
LAB_00119b55:
ADD ECX,R14D
MOV EAX,ECX
CDQ
IDIV R8D
MOV ESI,EDX
MOV EAX,dword ptr [RSP + 0x8]
ADD EAX,R14D
CDQ
IDIV R8D
SUB ESI,EDX
CALL 0x00117889
MOV R13D,0x1
JMP 0x00119b7d
LAB_00119b7a:
XOR R13D,R13D
LAB_00119b7d:
MOV EAX,R13D
ADD RSP,0x18
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
int8 crossline_updown_move(char *param_1,int *param_2,int *param_3,int param_4,int param_5)
{
int iVar1;
int iVar2;
ushort uVar3;
int iVar4;
size_t sVar5;
int iVar6;
int8 uVar7;
uint uVar8;
int8 local_38;
sVar5 = strlen(param_1);
iVar1 = *param_2;
local_38 = 0;
ioctl(1,0x5413,&local_38);
uVar3 = 0xa0;
if (1 < local_38._2_2_) {
uVar3 = local_38._2_2_;
}
if ((param_5 == 0) && (*param_2 == *param_3)) {
return 0;
}
iVar6 = *param_2;
iVar2 = (int)sVar5;
iVar4 = (iVar6 + iVar2) / (int)(uint)uVar3;
uVar8 = (uint)uVar3;
if (param_4 < 0) {
if (iVar4 == 0) {
return 0;
}
iVar4 = iVar6 - (uint)uVar3;
iVar6 = 0;
if (0 < iVar4) {
iVar6 = iVar4;
}
uVar7 = 0xffffffff;
}
else {
if (iVar4 == (*param_3 + iVar2) / (int)uVar8) {
return 0;
}
iVar6 = iVar6 + uVar8;
*param_2 = iVar6;
uVar7 = 1;
if (iVar6 <= *param_3) goto LAB_00119b55;
iVar6 = *param_3 + -1;
}
*param_2 = iVar6;
LAB_00119b55:
crossline_cursor_move(uVar7,(iVar6 + iVar2) % (int)uVar8 - (iVar1 + iVar2) % (int)uVar8);
return 1;
}
|
|
64,235
|
my_caseup_utf8mb3
|
eloqsql/strings/ctype-utf8.c
|
static size_t my_caseup_utf8mb3(CHARSET_INFO *cs,
const char *src, size_t srclen,
char *dst, size_t dstlen)
{
my_wc_t wc;
int srcres, dstres;
const char *srcend= src + srclen;
char *dstend= dst + dstlen, *dst0= dst;
MY_UNICASE_INFO *uni_plane= cs->caseinfo;
DBUG_ASSERT(src != dst || cs->caseup_multiply == 1);
while ((src < srcend) &&
(srcres= my_utf8mb3_uni(cs, &wc, (uchar *) src, (uchar*) srcend)) > 0)
{
my_toupper_utf8mb3(uni_plane, &wc);
if ((dstres= my_uni_utf8mb3(cs, wc, (uchar*) dst, (uchar*) dstend)) <= 0)
break;
src+= srcres;
dst+= dstres;
}
return (size_t) (dst - dst0);
}
|
O3
|
c
|
my_caseup_utf8mb3:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rcx, %r13
movq %rcx, -0x30(%rbp)
testq %rdx, %rdx
jle 0xd28b7
movq %r8, %r14
movq %rdx, %r15
movq %rsi, %r12
addq %rsi, %r15
movq -0x30(%rbp), %r13
addq %r13, %r14
movq 0x78(%rdi), %rax
movq %rax, -0x40(%rbp)
leaq -0x38(%rbp), %rsi
movq %r12, %rdx
movq %r15, %rcx
callq 0xd24f7
testl %eax, %eax
jle 0xd28b7
movl %eax, %ebx
movq -0x40(%rbp), %rax
movq 0x8(%rax), %rcx
movq -0x38(%rbp), %rax
movzbl %ah, %edx
movq (%rcx,%rdx,8), %rcx
testq %rcx, %rcx
je 0xd2896
movzbl %al, %eax
leaq (%rax,%rax,2), %rax
movl (%rcx,%rax,4), %eax
movq %rax, -0x38(%rbp)
movq %rax, %rsi
movq %r13, %rdx
movq %r14, %rcx
callq 0xd25bc
testl %eax, %eax
jle 0xd28b7
movl %ebx, %ecx
addq %rcx, %r12
movl %eax, %eax
addq %rax, %r13
cmpq %r15, %r12
jb 0xd285b
subq -0x30(%rbp), %r13
movq %r13, %rax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
|
my_caseup_utf8mb3:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 18h
mov r13, rcx
mov [rbp+var_30], rcx
test rdx, rdx
jle short loc_D28B7
mov r14, r8
mov r15, rdx
mov r12, rsi
add r15, rsi
mov r13, [rbp+var_30]
add r14, r13
mov rax, [rdi+78h]
mov [rbp+var_40], rax
loc_D285B:
lea rsi, [rbp+var_38]
mov rdx, r12
mov rcx, r15
call my_utf8mb3_uni
test eax, eax
jle short loc_D28B7
mov ebx, eax
mov rax, [rbp+var_40]
mov rcx, [rax+8]
mov rax, [rbp+var_38]
movzx edx, ah
mov rcx, [rcx+rdx*8]
test rcx, rcx
jz short loc_D2896
movzx eax, al
lea rax, [rax+rax*2]
mov eax, [rcx+rax*4]
mov [rbp+var_38], rax
loc_D2896:
mov rsi, rax
mov rdx, r13
mov rcx, r14
call my_uni_utf8mb3
test eax, eax
jle short loc_D28B7
mov ecx, ebx
add r12, rcx
mov eax, eax
add r13, rax
cmp r12, r15
jb short loc_D285B
loc_D28B7:
sub r13, [rbp+var_30]
mov rax, r13
add rsp, 18h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
|
_BYTE * my_caseup_utf8mb3(long long a1, unsigned __int8 *a2, long long a3, _BYTE *a4, long long a5)
{
_BYTE *v5; // r13
unsigned __int8 *v6; // r12
unsigned long long v7; // r15
unsigned long long v8; // r14
int v9; // eax
unsigned int v10; // ebx
unsigned long long v11; // rax
long long v12; // rcx
int v13; // eax
long long v15; // [rsp+0h] [rbp-40h]
unsigned long long v16; // [rsp+8h] [rbp-38h] BYREF
_BYTE *v17; // [rsp+10h] [rbp-30h]
v5 = a4;
v17 = a4;
if ( a3 > 0 )
{
v6 = a2;
v7 = (unsigned long long)&a2[a3];
v5 = v17;
v8 = (unsigned long long)&v17[a5];
v15 = *(_QWORD *)(a1 + 120);
do
{
v9 = my_utf8mb3_uni(a1, &v16, v6, v7);
if ( v9 <= 0 )
break;
v10 = v9;
v11 = v16;
v12 = *(_QWORD *)(*(_QWORD *)(v15 + 8) + 8LL * BYTE1(v16));
if ( v12 )
{
v11 = *(unsigned int *)(v12 + 12LL * (unsigned __int8)v16);
v16 = v11;
}
v13 = my_uni_utf8mb3(a1, v11, v5, v8);
if ( v13 <= 0 )
break;
v6 += v10;
v5 += (unsigned int)v13;
}
while ( (unsigned long long)v6 < v7 );
}
return (_BYTE *)(v5 - v17);
}
|
my_caseup_utf8mb3:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x18
MOV R13,RCX
MOV qword ptr [RBP + -0x30],RCX
TEST RDX,RDX
JLE 0x001d28b7
MOV R14,R8
MOV R15,RDX
MOV R12,RSI
ADD R15,RSI
MOV R13,qword ptr [RBP + -0x30]
ADD R14,R13
MOV RAX,qword ptr [RDI + 0x78]
MOV qword ptr [RBP + -0x40],RAX
LAB_001d285b:
LEA RSI,[RBP + -0x38]
MOV RDX,R12
MOV RCX,R15
CALL 0x001d24f7
TEST EAX,EAX
JLE 0x001d28b7
MOV EBX,EAX
MOV RAX,qword ptr [RBP + -0x40]
MOV RCX,qword ptr [RAX + 0x8]
MOV RAX,qword ptr [RBP + -0x38]
MOVZX EDX,AH
MOV RCX,qword ptr [RCX + RDX*0x8]
TEST RCX,RCX
JZ 0x001d2896
MOVZX EAX,AL
LEA RAX,[RAX + RAX*0x2]
MOV EAX,dword ptr [RCX + RAX*0x4]
MOV qword ptr [RBP + -0x38],RAX
LAB_001d2896:
MOV RSI,RAX
MOV RDX,R13
MOV RCX,R14
CALL 0x001d25bc
TEST EAX,EAX
JLE 0x001d28b7
MOV ECX,EBX
ADD R12,RCX
MOV EAX,EAX
ADD R13,RAX
CMP R12,R15
JC 0x001d285b
LAB_001d28b7:
SUB R13,qword ptr [RBP + -0x30]
MOV RAX,R13
ADD RSP,0x18
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
long my_caseup_utf8mb3(long param_1,ulong param_2,long param_3,long param_4)
{
long lVar1;
long lVar2;
uint uVar3;
uint uVar4;
long lVar5;
ulong uVar6;
int8 local_40;
lVar5 = param_4;
if (0 < param_3) {
uVar6 = param_3 + param_2;
lVar1 = *(long *)(param_1 + 0x78);
do {
uVar3 = my_utf8mb3_uni();
if ((int)uVar3 < 1) break;
lVar2 = *(long *)(*(long *)(lVar1 + 8) + (local_40 >> 8 & 0xff) * 8);
if (lVar2 != 0) {
local_40 = (ulong)*(uint *)(lVar2 + (local_40 & 0xff) * 0xc);
}
uVar4 = my_uni_utf8mb3();
if ((int)uVar4 < 1) break;
param_2 = param_2 + uVar3;
lVar5 = lVar5 + (ulong)uVar4;
} while (param_2 < uVar6);
}
return lVar5 - param_4;
}
|
|
64,236
|
my_hash_delete
|
eloqsql/mysys/hash.c
|
my_bool my_hash_delete(HASH *hash, uchar *record)
{
uint pos2,idx,empty_index;
my_hash_value_type pos_hashnr, lastpos_hashnr;
size_t blength;
HASH_LINK *data,*lastpos,*gpos,*pos,*pos3,*empty;
DBUG_ENTER("my_hash_delete");
if (!hash->records)
DBUG_RETURN(1);
blength=hash->blength;
data=dynamic_element(&hash->array,0,HASH_LINK*);
/* Search after record with key */
pos= data + my_hash_mask(rec_hashnr(hash, record), blength, hash->records);
gpos = 0;
while (pos->data != record)
{
gpos=pos;
if (pos->next == NO_RECORD)
DBUG_RETURN(1); /* Key not found */
pos=data+pos->next;
}
if ( --(hash->records) < hash->blength >> 1) hash->blength>>=1;
lastpos=data+hash->records;
/* Remove link to record */
empty=pos; empty_index=(uint) (empty-data);
if (gpos)
gpos->next=pos->next; /* unlink current ptr */
else if (pos->next != NO_RECORD)
{
empty=data+(empty_index=pos->next);
pos[0]= empty[0];
}
if (empty == lastpos) /* last key at wrong pos or no next link */
goto exit;
/* Move the last key (lastpos) */
lastpos_hashnr= lastpos->hash_nr;
/* pos is where lastpos should be */
pos= data + my_hash_mask(lastpos_hashnr, hash->blength, hash->records);
if (pos == empty) /* Move to empty position. */
{
empty[0]=lastpos[0];
goto exit;
}
pos_hashnr= pos->hash_nr;
/* pos3 is where the pos should be */
pos3= data + my_hash_mask(pos_hashnr, hash->blength, hash->records);
if (pos != pos3)
{ /* pos is on wrong posit */
empty[0]=pos[0]; /* Save it here */
pos[0]=lastpos[0]; /* This should be here */
movelink(data,(uint) (pos-data),(uint) (pos3-data),empty_index);
goto exit;
}
pos2= my_hash_mask(lastpos_hashnr, blength, hash->records + 1);
if (pos2 == my_hash_mask(pos_hashnr, blength, hash->records + 1))
{ /* Identical key-positions */
if (pos2 != hash->records)
{
empty[0]=lastpos[0];
movelink(data,(uint) (lastpos-data),(uint) (pos-data),empty_index);
goto exit;
}
idx= (uint) (pos-data); /* Link pos->next after lastpos */
}
else idx= NO_RECORD; /* Different positions merge */
empty[0]=lastpos[0];
movelink(data,idx,empty_index,pos->next);
pos->next=empty_index;
exit:
(void) pop_dynamic(&hash->array);
if (hash->free)
(*hash->free)((uchar*) record);
DBUG_RETURN(0);
}
|
O0
|
c
|
my_hash_delete:
pushq %rbp
movq %rsp, %rbp
subq $0x90, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rax
cmpq $0x0, 0x18(%rax)
jne 0xdea79
jmp 0xdea70
movb $0x1, -0x1(%rbp)
jmp 0xdedf2
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x38(%rbp)
movq -0x10(%rbp), %rax
movq 0x28(%rax), %rax
movq %rax, -0x40(%rbp)
movq -0x40(%rbp), %rax
movq %rax, -0x70(%rbp)
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0xdee00
movl %eax, %edi
movq -0x38(%rbp), %rsi
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rdx
callq 0xde280
movl %eax, %ecx
movq -0x70(%rbp), %rax
movl %ecx, %ecx
shlq $0x4, %rcx
addq %rcx, %rax
movq %rax, -0x58(%rbp)
movq $0x0, -0x50(%rbp)
movq -0x58(%rbp), %rax
movq 0x8(%rax), %rax
cmpq -0x18(%rbp), %rax
je 0xdeb15
movq -0x58(%rbp), %rax
movq %rax, -0x50(%rbp)
movq -0x58(%rbp), %rax
cmpl $-0x1, (%rax)
jne 0xdeafe
jmp 0xdeaf5
movb $0x1, -0x1(%rbp)
jmp 0xdedf2
movq -0x40(%rbp), %rax
movq -0x58(%rbp), %rcx
movl (%rcx), %ecx
shlq $0x4, %rcx
addq %rcx, %rax
movq %rax, -0x58(%rbp)
jmp 0xdead4
movq -0x10(%rbp), %rcx
movq 0x18(%rcx), %rax
addq $-0x1, %rax
movq %rax, 0x18(%rcx)
movq -0x10(%rbp), %rcx
movq 0x10(%rcx), %rcx
shrq %rcx
cmpq %rcx, %rax
jae 0xdeb44
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rcx
shrq %rcx
movq %rcx, 0x10(%rax)
movq -0x40(%rbp), %rax
movq -0x10(%rbp), %rcx
movq 0x18(%rcx), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movq %rax, -0x48(%rbp)
movq -0x58(%rbp), %rax
movq %rax, -0x68(%rbp)
movq -0x68(%rbp), %rax
movq -0x40(%rbp), %rcx
subq %rcx, %rax
sarq $0x4, %rax
movl %eax, -0x24(%rbp)
cmpq $0x0, -0x50(%rbp)
je 0xdeb8a
movq -0x58(%rbp), %rax
movl (%rax), %ecx
movq -0x50(%rbp), %rax
movl %ecx, (%rax)
jmp 0xdebc5
movq -0x58(%rbp), %rax
cmpl $-0x1, (%rax)
je 0xdebc3
movq -0x40(%rbp), %rax
movq -0x58(%rbp), %rcx
movl (%rcx), %ecx
movl %ecx, -0x24(%rbp)
movl %ecx, %ecx
shlq $0x4, %rcx
addq %rcx, %rax
movq %rax, -0x68(%rbp)
movq -0x58(%rbp), %rax
movq -0x68(%rbp), %rcx
movq (%rcx), %rdx
movq %rdx, (%rax)
movq 0x8(%rcx), %rcx
movq %rcx, 0x8(%rax)
jmp 0xdebc5
movq -0x68(%rbp), %rax
cmpq -0x48(%rbp), %rax
jne 0xdebd4
jmp 0xdedc6
movq -0x48(%rbp), %rax
movl 0x4(%rax), %eax
movl %eax, -0x2c(%rbp)
movq -0x40(%rbp), %rax
movq %rax, -0x78(%rbp)
movl -0x2c(%rbp), %edi
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rsi
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rdx
callq 0xde280
movl %eax, %ecx
movq -0x78(%rbp), %rax
movl %ecx, %ecx
shlq $0x4, %rcx
addq %rcx, %rax
movq %rax, -0x58(%rbp)
movq -0x58(%rbp), %rax
cmpq -0x68(%rbp), %rax
jne 0xdec36
movq -0x68(%rbp), %rax
movq -0x48(%rbp), %rcx
movq (%rcx), %rdx
movq %rdx, (%rax)
movq 0x8(%rcx), %rcx
movq %rcx, 0x8(%rax)
jmp 0xdedc6
movq -0x58(%rbp), %rax
movl 0x4(%rax), %eax
movl %eax, -0x28(%rbp)
movq -0x40(%rbp), %rax
movq %rax, -0x80(%rbp)
movl -0x28(%rbp), %edi
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rsi
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rdx
callq 0xde280
movl %eax, %ecx
movq -0x80(%rbp), %rax
movl %ecx, %ecx
shlq $0x4, %rcx
addq %rcx, %rax
movq %rax, -0x60(%rbp)
movq -0x58(%rbp), %rax
cmpq -0x60(%rbp), %rax
je 0xdecdc
movq -0x68(%rbp), %rax
movq -0x58(%rbp), %rcx
movq (%rcx), %rdx
movq %rdx, (%rax)
movq 0x8(%rcx), %rcx
movq %rcx, 0x8(%rax)
movq -0x58(%rbp), %rax
movq -0x48(%rbp), %rcx
movq (%rcx), %rdx
movq %rdx, (%rax)
movq 0x8(%rcx), %rcx
movq %rcx, 0x8(%rax)
movq -0x40(%rbp), %rdi
movq -0x58(%rbp), %rax
movq -0x40(%rbp), %rcx
subq %rcx, %rax
sarq $0x4, %rax
movl %eax, %esi
movq -0x60(%rbp), %rax
movq -0x40(%rbp), %rcx
subq %rcx, %rax
sarq $0x4, %rax
movl %eax, %edx
movl -0x24(%rbp), %ecx
callq 0xdea10
jmp 0xdedc6
movl -0x2c(%rbp), %edi
movq -0x38(%rbp), %rsi
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rdx
addq $0x1, %rdx
callq 0xde280
movl %eax, -0x1c(%rbp)
movl -0x1c(%rbp), %eax
movl %eax, -0x84(%rbp)
movl -0x28(%rbp), %edi
movq -0x38(%rbp), %rsi
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rdx
addq $0x1, %rdx
callq 0xde280
movl %eax, %ecx
movl -0x84(%rbp), %eax
cmpl %ecx, %eax
jne 0xded8b
movl -0x1c(%rbp), %eax
movq -0x10(%rbp), %rcx
cmpq 0x18(%rcx), %rax
je 0xded77
movq -0x68(%rbp), %rax
movq -0x48(%rbp), %rcx
movq (%rcx), %rdx
movq %rdx, (%rax)
movq 0x8(%rcx), %rcx
movq %rcx, 0x8(%rax)
movq -0x40(%rbp), %rdi
movq -0x48(%rbp), %rax
movq -0x40(%rbp), %rcx
subq %rcx, %rax
sarq $0x4, %rax
movl %eax, %esi
movq -0x58(%rbp), %rax
movq -0x40(%rbp), %rcx
subq %rcx, %rax
sarq $0x4, %rax
movl %eax, %edx
movl -0x24(%rbp), %ecx
callq 0xdea10
jmp 0xdedc6
movq -0x58(%rbp), %rax
movq -0x40(%rbp), %rcx
subq %rcx, %rax
sarq $0x4, %rax
movl %eax, -0x20(%rbp)
jmp 0xded92
movl $0xffffffff, -0x20(%rbp) # imm = 0xFFFFFFFF
movq -0x68(%rbp), %rax
movq -0x48(%rbp), %rcx
movq (%rcx), %rdx
movq %rdx, (%rax)
movq 0x8(%rcx), %rcx
movq %rcx, 0x8(%rax)
movq -0x40(%rbp), %rdi
movl -0x20(%rbp), %esi
movl -0x24(%rbp), %edx
movq -0x58(%rbp), %rax
movl (%rax), %ecx
callq 0xdea10
movl -0x24(%rbp), %ecx
movq -0x58(%rbp), %rax
movl %ecx, (%rax)
movq -0x10(%rbp), %rdi
addq $0x28, %rdi
callq 0xdab10
movq -0x10(%rbp), %rax
cmpq $0x0, 0x60(%rax)
je 0xdedec
movq -0x10(%rbp), %rax
movq 0x60(%rax), %rax
movq -0x18(%rbp), %rdi
callq *%rax
jmp 0xdedee
movb $0x0, -0x1(%rbp)
movb -0x1(%rbp), %al
addq $0x90, %rsp
popq %rbp
retq
nop
|
my_hash_delete:
push rbp
mov rbp, rsp
sub rsp, 90h
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov rax, [rbp+var_10]
cmp qword ptr [rax+18h], 0
jnz short loc_DEA79
jmp short $+2
loc_DEA70:
mov [rbp+var_1], 1
jmp loc_DEDF2
loc_DEA79:
mov rax, [rbp+var_10]
mov rax, [rax+10h]
mov [rbp+var_38], rax
mov rax, [rbp+var_10]
mov rax, [rax+28h]
mov [rbp+var_40], rax
mov rax, [rbp+var_40]
mov [rbp+var_70], rax
mov rdi, [rbp+var_10]
mov rsi, [rbp+var_18]
call rec_hashnr
mov edi, eax
mov rsi, [rbp+var_38]
mov rax, [rbp+var_10]
mov rdx, [rax+18h]
call my_hash_mask
mov ecx, eax
mov rax, [rbp+var_70]
mov ecx, ecx
shl rcx, 4
add rax, rcx
mov [rbp+var_58], rax
mov [rbp+var_50], 0
loc_DEAD4:
mov rax, [rbp+var_58]
mov rax, [rax+8]
cmp rax, [rbp+var_18]
jz short loc_DEB15
mov rax, [rbp+var_58]
mov [rbp+var_50], rax
mov rax, [rbp+var_58]
cmp dword ptr [rax], 0FFFFFFFFh
jnz short loc_DEAFE
jmp short $+2
loc_DEAF5:
mov [rbp+var_1], 1
jmp loc_DEDF2
loc_DEAFE:
mov rax, [rbp+var_40]
mov rcx, [rbp+var_58]
mov ecx, [rcx]
shl rcx, 4
add rax, rcx
mov [rbp+var_58], rax
jmp short loc_DEAD4
loc_DEB15:
mov rcx, [rbp+var_10]
mov rax, [rcx+18h]
add rax, 0FFFFFFFFFFFFFFFFh
mov [rcx+18h], rax
mov rcx, [rbp+var_10]
mov rcx, [rcx+10h]
shr rcx, 1
cmp rax, rcx
jnb short loc_DEB44
mov rax, [rbp+var_10]
mov rcx, [rax+10h]
shr rcx, 1
mov [rax+10h], rcx
loc_DEB44:
mov rax, [rbp+var_40]
mov rcx, [rbp+var_10]
mov rcx, [rcx+18h]
shl rcx, 4
add rax, rcx
mov [rbp+var_48], rax
mov rax, [rbp+var_58]
mov [rbp+var_68], rax
mov rax, [rbp+var_68]
mov rcx, [rbp+var_40]
sub rax, rcx
sar rax, 4
mov [rbp+var_24], eax
cmp [rbp+var_50], 0
jz short loc_DEB8A
mov rax, [rbp+var_58]
mov ecx, [rax]
mov rax, [rbp+var_50]
mov [rax], ecx
jmp short loc_DEBC5
loc_DEB8A:
mov rax, [rbp+var_58]
cmp dword ptr [rax], 0FFFFFFFFh
jz short loc_DEBC3
mov rax, [rbp+var_40]
mov rcx, [rbp+var_58]
mov ecx, [rcx]
mov [rbp+var_24], ecx
mov ecx, ecx
shl rcx, 4
add rax, rcx
mov [rbp+var_68], rax
mov rax, [rbp+var_58]
mov rcx, [rbp+var_68]
mov rdx, [rcx]
mov [rax], rdx
mov rcx, [rcx+8]
mov [rax+8], rcx
loc_DEBC3:
jmp short $+2
loc_DEBC5:
mov rax, [rbp+var_68]
cmp rax, [rbp+var_48]
jnz short loc_DEBD4
jmp loc_DEDC6
loc_DEBD4:
mov rax, [rbp+var_48]
mov eax, [rax+4]
mov [rbp+var_2C], eax
mov rax, [rbp+var_40]
mov [rbp+var_78], rax
mov edi, [rbp+var_2C]
mov rax, [rbp+var_10]
mov rsi, [rax+10h]
mov rax, [rbp+var_10]
mov rdx, [rax+18h]
call my_hash_mask
mov ecx, eax
mov rax, [rbp+var_78]
mov ecx, ecx
shl rcx, 4
add rax, rcx
mov [rbp+var_58], rax
mov rax, [rbp+var_58]
cmp rax, [rbp+var_68]
jnz short loc_DEC36
mov rax, [rbp+var_68]
mov rcx, [rbp+var_48]
mov rdx, [rcx]
mov [rax], rdx
mov rcx, [rcx+8]
mov [rax+8], rcx
jmp loc_DEDC6
loc_DEC36:
mov rax, [rbp+var_58]
mov eax, [rax+4]
mov [rbp+var_28], eax
mov rax, [rbp+var_40]
mov [rbp+var_80], rax
mov edi, [rbp+var_28]
mov rax, [rbp+var_10]
mov rsi, [rax+10h]
mov rax, [rbp+var_10]
mov rdx, [rax+18h]
call my_hash_mask
mov ecx, eax
mov rax, [rbp+var_80]
mov ecx, ecx
shl rcx, 4
add rax, rcx
mov [rbp+var_60], rax
mov rax, [rbp+var_58]
cmp rax, [rbp+var_60]
jz short loc_DECDC
mov rax, [rbp+var_68]
mov rcx, [rbp+var_58]
mov rdx, [rcx]
mov [rax], rdx
mov rcx, [rcx+8]
mov [rax+8], rcx
mov rax, [rbp+var_58]
mov rcx, [rbp+var_48]
mov rdx, [rcx]
mov [rax], rdx
mov rcx, [rcx+8]
mov [rax+8], rcx
mov rdi, [rbp+var_40]
mov rax, [rbp+var_58]
mov rcx, [rbp+var_40]
sub rax, rcx
sar rax, 4
mov esi, eax
mov rax, [rbp+var_60]
mov rcx, [rbp+var_40]
sub rax, rcx
sar rax, 4
mov edx, eax
mov ecx, [rbp+var_24]
call movelink
jmp loc_DEDC6
loc_DECDC:
mov edi, [rbp+var_2C]
mov rsi, [rbp+var_38]
mov rax, [rbp+var_10]
mov rdx, [rax+18h]
add rdx, 1
call my_hash_mask
mov [rbp+var_1C], eax
mov eax, [rbp+var_1C]
mov [rbp+var_84], eax
mov edi, [rbp+var_28]
mov rsi, [rbp+var_38]
mov rax, [rbp+var_10]
mov rdx, [rax+18h]
add rdx, 1
call my_hash_mask
mov ecx, eax
mov eax, [rbp+var_84]
cmp eax, ecx
jnz short loc_DED8B
mov eax, [rbp+var_1C]
mov rcx, [rbp+var_10]
cmp rax, [rcx+18h]
jz short loc_DED77
mov rax, [rbp+var_68]
mov rcx, [rbp+var_48]
mov rdx, [rcx]
mov [rax], rdx
mov rcx, [rcx+8]
mov [rax+8], rcx
mov rdi, [rbp+var_40]
mov rax, [rbp+var_48]
mov rcx, [rbp+var_40]
sub rax, rcx
sar rax, 4
mov esi, eax
mov rax, [rbp+var_58]
mov rcx, [rbp+var_40]
sub rax, rcx
sar rax, 4
mov edx, eax
mov ecx, [rbp+var_24]
call movelink
jmp short loc_DEDC6
loc_DED77:
mov rax, [rbp+var_58]
mov rcx, [rbp+var_40]
sub rax, rcx
sar rax, 4
mov [rbp+var_20], eax
jmp short loc_DED92
loc_DED8B:
mov [rbp+var_20], 0FFFFFFFFh
loc_DED92:
mov rax, [rbp+var_68]
mov rcx, [rbp+var_48]
mov rdx, [rcx]
mov [rax], rdx
mov rcx, [rcx+8]
mov [rax+8], rcx
mov rdi, [rbp+var_40]
mov esi, [rbp+var_20]
mov edx, [rbp+var_24]
mov rax, [rbp+var_58]
mov ecx, [rax]
call movelink
mov ecx, [rbp+var_24]
mov rax, [rbp+var_58]
mov [rax], ecx
loc_DEDC6:
mov rdi, [rbp+var_10]
add rdi, 28h ; '('
call pop_dynamic
mov rax, [rbp+var_10]
cmp qword ptr [rax+60h], 0
jz short loc_DEDEC
mov rax, [rbp+var_10]
mov rax, [rax+60h]
mov rdi, [rbp+var_18]
call rax
loc_DEDEC:
jmp short $+2
loc_DEDEE:
mov [rbp+var_1], 0
loc_DEDF2:
mov al, [rbp+var_1]
add rsp, 90h
pop rbp
retn
|
char my_hash_delete(long long a1, long long a2)
{
unsigned int v2; // eax
unsigned long long v3; // rax
_QWORD *v5; // [rsp+28h] [rbp-68h]
long long v6; // [rsp+30h] [rbp-60h]
unsigned int *v7; // [rsp+38h] [rbp-58h]
long long v8; // [rsp+38h] [rbp-58h]
_DWORD *v9; // [rsp+40h] [rbp-50h]
long long v10; // [rsp+48h] [rbp-48h]
long long v11; // [rsp+50h] [rbp-40h]
unsigned long long v12; // [rsp+58h] [rbp-38h]
unsigned int v13; // [rsp+64h] [rbp-2Ch]
unsigned int v14; // [rsp+68h] [rbp-28h]
unsigned int v15; // [rsp+6Ch] [rbp-24h]
int v16; // [rsp+70h] [rbp-20h]
int v17; // [rsp+74h] [rbp-1Ch]
if ( !*(_QWORD *)(a1 + 24) )
return 1;
v12 = *(_QWORD *)(a1 + 16);
v11 = *(_QWORD *)(a1 + 40);
v2 = rec_hashnr(a1, a2);
v7 = (unsigned int *)(16LL * (unsigned int)my_hash_mask(v2, v12, *(_QWORD *)(a1 + 24)) + v11);
v9 = 0LL;
while ( *((_QWORD *)v7 + 1) != a2 )
{
v9 = v7;
if ( *v7 == -1 )
return 1;
v7 = (unsigned int *)(16LL * *v7 + v11);
}
v3 = *(_QWORD *)(a1 + 24) - 1LL;
*(_QWORD *)(a1 + 24) = v3;
if ( v3 < *(_QWORD *)(a1 + 16) >> 1 )
*(_QWORD *)(a1 + 16) >>= 1;
v10 = 16LL * *(_QWORD *)(a1 + 24) + v11;
v5 = v7;
v15 = ((long long)v7 - v11) >> 4;
if ( v9 )
{
*v9 = *v7;
}
else if ( *v7 != -1 )
{
v15 = *v7;
v5 = (_QWORD *)(16LL * *v7 + v11);
*(_QWORD *)v7 = *v5;
*((_QWORD *)v7 + 1) = v5[1];
}
if ( v5 != (_QWORD *)v10 )
{
v13 = *(_DWORD *)(v10 + 4);
v8 = 16LL * (unsigned int)my_hash_mask(v13, *(_QWORD *)(a1 + 16), *(_QWORD *)(a1 + 24)) + v11;
if ( (_QWORD *)v8 == v5 )
{
*v5 = *(_QWORD *)v10;
v5[1] = *(_QWORD *)(v10 + 8);
}
else
{
v14 = *(_DWORD *)(v8 + 4);
v6 = 16LL * (unsigned int)my_hash_mask(v14, *(_QWORD *)(a1 + 16), *(_QWORD *)(a1 + 24)) + v11;
if ( v8 == v6 )
{
v17 = my_hash_mask(v13, v12, *(_QWORD *)(a1 + 24) + 1LL);
if ( v17 == (unsigned int)my_hash_mask(v14, v12, *(_QWORD *)(a1 + 24) + 1LL) )
{
if ( v17 != *(_QWORD *)(a1 + 24) )
{
*v5 = *(_QWORD *)v10;
v5[1] = *(_QWORD *)(v10 + 8);
movelink(v11, (v10 - v11) >> 4, (v8 - v11) >> 4, v15);
goto LABEL_25;
}
v16 = (v8 - v11) >> 4;
}
else
{
v16 = -1;
}
*v5 = *(_QWORD *)v10;
v5[1] = *(_QWORD *)(v10 + 8);
movelink(v11, v16, v15, *(_DWORD *)v8);
*(_DWORD *)v8 = v15;
goto LABEL_25;
}
*v5 = *(_QWORD *)v8;
v5[1] = *(_QWORD *)(v8 + 8);
*(_QWORD *)v8 = *(_QWORD *)v10;
*(_QWORD *)(v8 + 8) = *(_QWORD *)(v10 + 8);
movelink(v11, (v8 - v11) >> 4, (v6 - v11) >> 4, v15);
}
}
LABEL_25:
pop_dynamic((long long *)(a1 + 40));
if ( *(_QWORD *)(a1 + 96) )
(*(void ( **)(long long))(a1 + 96))(a2);
return 0;
}
|
my_hash_delete:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x90
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x18],RSI
MOV RAX,qword ptr [RBP + -0x10]
CMP qword ptr [RAX + 0x18],0x0
JNZ 0x001dea79
JMP 0x001dea70
LAB_001dea70:
MOV byte ptr [RBP + -0x1],0x1
JMP 0x001dedf2
LAB_001dea79:
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x10]
MOV qword ptr [RBP + -0x38],RAX
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x28]
MOV qword ptr [RBP + -0x40],RAX
MOV RAX,qword ptr [RBP + -0x40]
MOV qword ptr [RBP + -0x70],RAX
MOV RDI,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RBP + -0x18]
CALL 0x001dee00
MOV EDI,EAX
MOV RSI,qword ptr [RBP + -0x38]
MOV RAX,qword ptr [RBP + -0x10]
MOV RDX,qword ptr [RAX + 0x18]
CALL 0x001de280
MOV ECX,EAX
MOV RAX,qword ptr [RBP + -0x70]
MOV ECX,ECX
SHL RCX,0x4
ADD RAX,RCX
MOV qword ptr [RBP + -0x58],RAX
MOV qword ptr [RBP + -0x50],0x0
LAB_001dead4:
MOV RAX,qword ptr [RBP + -0x58]
MOV RAX,qword ptr [RAX + 0x8]
CMP RAX,qword ptr [RBP + -0x18]
JZ 0x001deb15
MOV RAX,qword ptr [RBP + -0x58]
MOV qword ptr [RBP + -0x50],RAX
MOV RAX,qword ptr [RBP + -0x58]
CMP dword ptr [RAX],-0x1
JNZ 0x001deafe
JMP 0x001deaf5
LAB_001deaf5:
MOV byte ptr [RBP + -0x1],0x1
JMP 0x001dedf2
LAB_001deafe:
MOV RAX,qword ptr [RBP + -0x40]
MOV RCX,qword ptr [RBP + -0x58]
MOV ECX,dword ptr [RCX]
SHL RCX,0x4
ADD RAX,RCX
MOV qword ptr [RBP + -0x58],RAX
JMP 0x001dead4
LAB_001deb15:
MOV RCX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RCX + 0x18]
ADD RAX,-0x1
MOV qword ptr [RCX + 0x18],RAX
MOV RCX,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RCX + 0x10]
SHR RCX,0x1
CMP RAX,RCX
JNC 0x001deb44
MOV RAX,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RAX + 0x10]
SHR RCX,0x1
MOV qword ptr [RAX + 0x10],RCX
LAB_001deb44:
MOV RAX,qword ptr [RBP + -0x40]
MOV RCX,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RCX + 0x18]
SHL RCX,0x4
ADD RAX,RCX
MOV qword ptr [RBP + -0x48],RAX
MOV RAX,qword ptr [RBP + -0x58]
MOV qword ptr [RBP + -0x68],RAX
MOV RAX,qword ptr [RBP + -0x68]
MOV RCX,qword ptr [RBP + -0x40]
SUB RAX,RCX
SAR RAX,0x4
MOV dword ptr [RBP + -0x24],EAX
CMP qword ptr [RBP + -0x50],0x0
JZ 0x001deb8a
MOV RAX,qword ptr [RBP + -0x58]
MOV ECX,dword ptr [RAX]
MOV RAX,qword ptr [RBP + -0x50]
MOV dword ptr [RAX],ECX
JMP 0x001debc5
LAB_001deb8a:
MOV RAX,qword ptr [RBP + -0x58]
CMP dword ptr [RAX],-0x1
JZ 0x001debc3
MOV RAX,qword ptr [RBP + -0x40]
MOV RCX,qword ptr [RBP + -0x58]
MOV ECX,dword ptr [RCX]
MOV dword ptr [RBP + -0x24],ECX
MOV ECX,ECX
SHL RCX,0x4
ADD RAX,RCX
MOV qword ptr [RBP + -0x68],RAX
MOV RAX,qword ptr [RBP + -0x58]
MOV RCX,qword ptr [RBP + -0x68]
MOV RDX,qword ptr [RCX]
MOV qword ptr [RAX],RDX
MOV RCX,qword ptr [RCX + 0x8]
MOV qword ptr [RAX + 0x8],RCX
LAB_001debc3:
JMP 0x001debc5
LAB_001debc5:
MOV RAX,qword ptr [RBP + -0x68]
CMP RAX,qword ptr [RBP + -0x48]
JNZ 0x001debd4
JMP 0x001dedc6
LAB_001debd4:
MOV RAX,qword ptr [RBP + -0x48]
MOV EAX,dword ptr [RAX + 0x4]
MOV dword ptr [RBP + -0x2c],EAX
MOV RAX,qword ptr [RBP + -0x40]
MOV qword ptr [RBP + -0x78],RAX
MOV EDI,dword ptr [RBP + -0x2c]
MOV RAX,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RAX + 0x10]
MOV RAX,qword ptr [RBP + -0x10]
MOV RDX,qword ptr [RAX + 0x18]
CALL 0x001de280
MOV ECX,EAX
MOV RAX,qword ptr [RBP + -0x78]
MOV ECX,ECX
SHL RCX,0x4
ADD RAX,RCX
MOV qword ptr [RBP + -0x58],RAX
MOV RAX,qword ptr [RBP + -0x58]
CMP RAX,qword ptr [RBP + -0x68]
JNZ 0x001dec36
MOV RAX,qword ptr [RBP + -0x68]
MOV RCX,qword ptr [RBP + -0x48]
MOV RDX,qword ptr [RCX]
MOV qword ptr [RAX],RDX
MOV RCX,qword ptr [RCX + 0x8]
MOV qword ptr [RAX + 0x8],RCX
JMP 0x001dedc6
LAB_001dec36:
MOV RAX,qword ptr [RBP + -0x58]
MOV EAX,dword ptr [RAX + 0x4]
MOV dword ptr [RBP + -0x28],EAX
MOV RAX,qword ptr [RBP + -0x40]
MOV qword ptr [RBP + -0x80],RAX
MOV EDI,dword ptr [RBP + -0x28]
MOV RAX,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RAX + 0x10]
MOV RAX,qword ptr [RBP + -0x10]
MOV RDX,qword ptr [RAX + 0x18]
CALL 0x001de280
MOV ECX,EAX
MOV RAX,qword ptr [RBP + -0x80]
MOV ECX,ECX
SHL RCX,0x4
ADD RAX,RCX
MOV qword ptr [RBP + -0x60],RAX
MOV RAX,qword ptr [RBP + -0x58]
CMP RAX,qword ptr [RBP + -0x60]
JZ 0x001decdc
MOV RAX,qword ptr [RBP + -0x68]
MOV RCX,qword ptr [RBP + -0x58]
MOV RDX,qword ptr [RCX]
MOV qword ptr [RAX],RDX
MOV RCX,qword ptr [RCX + 0x8]
MOV qword ptr [RAX + 0x8],RCX
MOV RAX,qword ptr [RBP + -0x58]
MOV RCX,qword ptr [RBP + -0x48]
MOV RDX,qword ptr [RCX]
MOV qword ptr [RAX],RDX
MOV RCX,qword ptr [RCX + 0x8]
MOV qword ptr [RAX + 0x8],RCX
MOV RDI,qword ptr [RBP + -0x40]
MOV RAX,qword ptr [RBP + -0x58]
MOV RCX,qword ptr [RBP + -0x40]
SUB RAX,RCX
SAR RAX,0x4
MOV ESI,EAX
MOV RAX,qword ptr [RBP + -0x60]
MOV RCX,qword ptr [RBP + -0x40]
SUB RAX,RCX
SAR RAX,0x4
MOV EDX,EAX
MOV ECX,dword ptr [RBP + -0x24]
CALL 0x001dea10
JMP 0x001dedc6
LAB_001decdc:
MOV EDI,dword ptr [RBP + -0x2c]
MOV RSI,qword ptr [RBP + -0x38]
MOV RAX,qword ptr [RBP + -0x10]
MOV RDX,qword ptr [RAX + 0x18]
ADD RDX,0x1
CALL 0x001de280
MOV dword ptr [RBP + -0x1c],EAX
MOV EAX,dword ptr [RBP + -0x1c]
MOV dword ptr [RBP + -0x84],EAX
MOV EDI,dword ptr [RBP + -0x28]
MOV RSI,qword ptr [RBP + -0x38]
MOV RAX,qword ptr [RBP + -0x10]
MOV RDX,qword ptr [RAX + 0x18]
ADD RDX,0x1
CALL 0x001de280
MOV ECX,EAX
MOV EAX,dword ptr [RBP + -0x84]
CMP EAX,ECX
JNZ 0x001ded8b
MOV EAX,dword ptr [RBP + -0x1c]
MOV RCX,qword ptr [RBP + -0x10]
CMP RAX,qword ptr [RCX + 0x18]
JZ 0x001ded77
MOV RAX,qword ptr [RBP + -0x68]
MOV RCX,qword ptr [RBP + -0x48]
MOV RDX,qword ptr [RCX]
MOV qword ptr [RAX],RDX
MOV RCX,qword ptr [RCX + 0x8]
MOV qword ptr [RAX + 0x8],RCX
MOV RDI,qword ptr [RBP + -0x40]
MOV RAX,qword ptr [RBP + -0x48]
MOV RCX,qword ptr [RBP + -0x40]
SUB RAX,RCX
SAR RAX,0x4
MOV ESI,EAX
MOV RAX,qword ptr [RBP + -0x58]
MOV RCX,qword ptr [RBP + -0x40]
SUB RAX,RCX
SAR RAX,0x4
MOV EDX,EAX
MOV ECX,dword ptr [RBP + -0x24]
CALL 0x001dea10
JMP 0x001dedc6
LAB_001ded77:
MOV RAX,qword ptr [RBP + -0x58]
MOV RCX,qword ptr [RBP + -0x40]
SUB RAX,RCX
SAR RAX,0x4
MOV dword ptr [RBP + -0x20],EAX
JMP 0x001ded92
LAB_001ded8b:
MOV dword ptr [RBP + -0x20],0xffffffff
LAB_001ded92:
MOV RAX,qword ptr [RBP + -0x68]
MOV RCX,qword ptr [RBP + -0x48]
MOV RDX,qword ptr [RCX]
MOV qword ptr [RAX],RDX
MOV RCX,qword ptr [RCX + 0x8]
MOV qword ptr [RAX + 0x8],RCX
MOV RDI,qword ptr [RBP + -0x40]
MOV ESI,dword ptr [RBP + -0x20]
MOV EDX,dword ptr [RBP + -0x24]
MOV RAX,qword ptr [RBP + -0x58]
MOV ECX,dword ptr [RAX]
CALL 0x001dea10
MOV ECX,dword ptr [RBP + -0x24]
MOV RAX,qword ptr [RBP + -0x58]
MOV dword ptr [RAX],ECX
LAB_001dedc6:
MOV RDI,qword ptr [RBP + -0x10]
ADD RDI,0x28
CALL 0x001dab10
MOV RAX,qword ptr [RBP + -0x10]
CMP qword ptr [RAX + 0x60],0x0
JZ 0x001dedec
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x60]
MOV RDI,qword ptr [RBP + -0x18]
CALL RAX
LAB_001dedec:
JMP 0x001dedee
LAB_001dedee:
MOV byte ptr [RBP + -0x1],0x0
LAB_001dedf2:
MOV AL,byte ptr [RBP + -0x1]
ADD RSP,0x90
POP RBP
RET
|
int1 my_hash_delete(long param_1,long param_2)
{
int8 uVar1;
long lVar2;
int4 uVar3;
uint uVar4;
uint uVar5;
uint uVar6;
ulong uVar7;
uint *puVar8;
uint *puVar9;
uint *puVar10;
uint *local_70;
uint *local_60;
uint *local_58;
uint local_2c;
int4 local_28;
if (*(long *)(param_1 + 0x18) == 0) {
return 1;
}
uVar1 = *(int8 *)(param_1 + 0x10);
lVar2 = *(long *)(param_1 + 0x28);
uVar3 = rec_hashnr(param_1,param_2);
uVar4 = my_hash_mask(uVar3,uVar1,*(int8 *)(param_1 + 0x18));
local_58 = (uint *)0x0;
while (local_60 = (uint *)(lVar2 + (ulong)uVar4 * 0x10), *(long *)(local_60 + 2) != param_2) {
local_58 = local_60;
if (*local_60 == 0xffffffff) {
return 1;
}
uVar4 = *local_60;
}
uVar7 = *(long *)(param_1 + 0x18) - 1;
*(ulong *)(param_1 + 0x18) = uVar7;
if (uVar7 < *(ulong *)(param_1 + 0x10) >> 1) {
*(ulong *)(param_1 + 0x10) = *(ulong *)(param_1 + 0x10) >> 1;
}
puVar8 = (uint *)(lVar2 + *(long *)(param_1 + 0x18) * 0x10);
local_70 = local_60;
local_2c = (uint)((long)local_60 - lVar2 >> 4);
if (local_58 == (uint *)0x0) {
if (*local_60 != 0xffffffff) {
local_2c = *local_60;
local_70 = (uint *)(lVar2 + (ulong)local_2c * 0x10);
*(int8 *)local_60 = *(int8 *)local_70;
*(int8 *)(local_60 + 2) = *(int8 *)(local_70 + 2);
}
}
else {
*local_58 = *local_60;
}
if (local_70 != puVar8) {
uVar4 = puVar8[1];
uVar5 = my_hash_mask(uVar4,*(int8 *)(param_1 + 0x10),*(int8 *)(param_1 + 0x18));
puVar9 = (uint *)(lVar2 + (ulong)uVar5 * 0x10);
if (puVar9 == local_70) {
*(int8 *)local_70 = *(int8 *)puVar8;
*(int8 *)(local_70 + 2) = *(int8 *)(puVar8 + 2);
}
else {
uVar5 = puVar9[1];
uVar6 = my_hash_mask(uVar5,*(int8 *)(param_1 + 0x10),*(int8 *)(param_1 + 0x18));
puVar10 = (uint *)(lVar2 + (ulong)uVar6 * 0x10);
if (puVar9 == puVar10) {
uVar4 = my_hash_mask(uVar4,uVar1,*(long *)(param_1 + 0x18) + 1);
uVar5 = my_hash_mask(uVar5,uVar1,*(long *)(param_1 + 0x18) + 1);
if (uVar4 == uVar5) {
if ((ulong)uVar4 != *(ulong *)(param_1 + 0x18)) {
*(int8 *)local_70 = *(int8 *)puVar8;
*(int8 *)(local_70 + 2) = *(int8 *)(puVar8 + 2);
movelink(lVar2,(long)puVar8 - lVar2 >> 4 & 0xffffffff,
(long)puVar9 - lVar2 >> 4 & 0xffffffff,local_2c);
goto LAB_001dedc6;
}
local_28 = (int4)((long)puVar9 - lVar2 >> 4);
}
else {
local_28 = 0xffffffff;
}
*(int8 *)local_70 = *(int8 *)puVar8;
*(int8 *)(local_70 + 2) = *(int8 *)(puVar8 + 2);
movelink(lVar2,local_28,local_2c,*puVar9);
*puVar9 = local_2c;
}
else {
*(int8 *)local_70 = *(int8 *)puVar9;
*(int8 *)(local_70 + 2) = *(int8 *)(puVar9 + 2);
*(int8 *)puVar9 = *(int8 *)puVar8;
*(int8 *)(puVar9 + 2) = *(int8 *)(puVar8 + 2);
movelink(lVar2,(long)puVar9 - lVar2 >> 4 & 0xffffffff,
(long)puVar10 - lVar2 >> 4 & 0xffffffff,local_2c);
}
}
}
LAB_001dedc6:
pop_dynamic(param_1 + 0x28);
if (*(long *)(param_1 + 0x60) != 0) {
(**(code **)(param_1 + 0x60))(param_2);
}
return 0;
}
|
|
64,237
|
ma_write_blob_record
|
eloqsql/storage/maria/ma_dynrec.c
|
my_bool _ma_write_blob_record(MARIA_HA *info, const uchar *record)
{
uchar *rec_buff;
int error;
ulong reclength,reclength2,extra;
my_bool buff_alloced;
extra= (ALIGN_SIZE(MARIA_MAX_DYN_BLOCK_HEADER)+MARIA_SPLIT_LENGTH+
MARIA_DYN_DELETE_BLOCK_HEADER+1);
reclength= (info->s->base.pack_reclength +
_ma_calc_total_blob_length(info,record)+ extra);
alloc_on_stack(*info->stack_end_ptr, rec_buff, buff_alloced, reclength);
if (!rec_buff)
{
my_errno= HA_ERR_OUT_OF_MEM; /* purecov: inspected */
return(1);
}
reclength2= _ma_rec_pack(info,
rec_buff+ALIGN_SIZE(MARIA_MAX_DYN_BLOCK_HEADER),
record);
if (!reclength2)
{
error= 1;
goto err;
}
DBUG_PRINT("info",("reclength: %lu reclength2: %lu",
reclength, reclength2));
DBUG_ASSERT(reclength2 <= reclength);
error= write_dynamic_record(info,
rec_buff+ALIGN_SIZE(MARIA_MAX_DYN_BLOCK_HEADER),
reclength2);
err:
stack_alloc_free(rec_buff, buff_alloced);
return(error != 0);
}
|
O3
|
c
|
ma_write_blob_record:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rsi, %r14
movq %rdi, %rbx
movq %fs:0x28, %rax
movq %rax, -0x30(%rbp)
movq (%rdi), %rax
movq 0x3a0(%rax), %r15
callq 0x67e66
leaq (%r15,%rax), %rsi
addq $0x5d, %rsi
leaq -0x38(%rbp), %rcx
movq %rsi, (%rcx)
movq 0x78(%rbx), %rax
movq (%rax), %rax
subq %rcx, %rax
subq %rsi, %rax
jbe 0x67de5
cmpq $0x10000, %rax # imm = 0x10000
ja 0x67dcf
cmpq $0x1000, %rsi # imm = 0x1000
jb 0x67de5
cmpq $0x8001, %rax # imm = 0x8001
jb 0x67de5
movq %rsp, %r15
addq $0xf, %rsi
andq $-0x10, %rsi
subq %rsi, %r15
movq %r15, %rsp
movb $0x1, %r13b
jmp 0x67dfc
xorl %r13d, %r13d
movl $0x10010, %edx # imm = 0x10010
xorl %edi, %edi
callq 0xbf321
testq %rax, %rax
je 0x67e34
movq %rax, %r15
leaq 0x18(%r15), %r12
movq %rbx, %rdi
movq %r12, %rsi
movq %r14, %rdx
callq 0x674d9
testl %eax, %eax
je 0x67e23
movl %eax, %edx
movq %rbx, %rdi
movq %r12, %rsi
callq 0x67841
movl %eax, %ebx
jmp 0x67e25
movb $0x1, %bl
testb %r13b, %r13b
jne 0x67e41
movq %r15, %rdi
callq 0xbf54e
jmp 0x67e41
callq 0xc14ee
movl $0x80, (%rax)
movb $0x1, %bl
movq %fs:0x28, %rax
cmpq -0x30(%rbp), %rax
jne 0x67e61
movl %ebx, %eax
leaq -0x28(%rbp), %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0x2a280
|
_ma_write_blob_record:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 18h
mov r14, rsi
mov rbx, rdi
mov rax, fs:28h
mov [rbp+var_30], rax
mov rax, [rdi]
mov r15, [rax+3A0h]
call _ma_calc_total_blob_length
lea rsi, [r15+rax]
add rsi, 5Dh ; ']'
lea rcx, [rbp+var_38]
mov [rcx], rsi
mov rax, [rbx+78h]
mov rax, [rax]
sub rax, rcx
sub rax, rsi
jbe short loc_67DE5
cmp rax, 10000h
ja short loc_67DCF
cmp rsi, 1000h
jb short loc_67DE5
cmp rax, 8001h
jb short loc_67DE5
loc_67DCF:
mov r15, rsp
add rsi, 0Fh
and rsi, 0FFFFFFFFFFFFFFF0h
sub r15, rsi
mov rsp, r15
mov r13b, 1
jmp short loc_67DFC
loc_67DE5:
xor r13d, r13d
mov edx, 10010h
xor edi, edi
call my_malloc
test rax, rax
jz short loc_67E34
mov r15, rax
loc_67DFC:
lea r12, [r15+18h]
mov rdi, rbx
mov rsi, r12
mov rdx, r14
call _ma_rec_pack
test eax, eax
jz short loc_67E23
mov edx, eax
mov rdi, rbx
mov rsi, r12
call write_dynamic_record
mov ebx, eax
jmp short loc_67E25
loc_67E23:
mov bl, 1
loc_67E25:
test r13b, r13b
jnz short loc_67E41
mov rdi, r15
call my_free
jmp short loc_67E41
loc_67E34:
call _my_thread_var
mov dword ptr [rax], 80h
mov bl, 1
loc_67E41:
mov rax, fs:28h
cmp rax, [rbp+var_30]
jnz short loc_67E61
mov eax, ebx
lea rsp, [rbp-28h]
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_67E61:
call ___stack_chk_fail
|
long long ma_write_blob_record(unsigned __int8 *a1, unsigned __int8 *a2)
{
unsigned int v3; // ebx
long long v4; // r15
unsigned long long v5; // rsi
unsigned long long v6; // rax
bool v7; // cc
unsigned long long v8; // rax
char *v9; // r15
char v10; // r13
long long v11; // rax
unsigned int v12; // eax
_QWORD v15[7]; // [rsp+8h] [rbp-38h] BYREF
v3 = (unsigned int)a1;
v15[1] = __readfsqword(0x28u);
v4 = *(_QWORD *)(*(_QWORD *)a1 + 928LL);
v5 = v4 + ma_calc_total_blob_length() + 93;
v15[0] = v5;
v6 = **((_QWORD **)a1 + 15) - (_QWORD)v15;
v7 = v6 <= v5;
v8 = v6 - v5;
if ( v7 || v8 <= 0x10000 && (v5 < 0x1000 || v8 < 0x8001) )
{
v10 = 0;
v11 = my_malloc(0LL, v5, 65552LL);
if ( !v11 )
{
*(_DWORD *)my_thread_var(0LL) = 128;
LOBYTE(v3) = 1;
return v3;
}
v9 = (char *)v11;
}
else
{
v9 = (char *)&v15[-1] - ((v5 + 15) & 0xFFFFFFFFFFFFFFF0LL);
v10 = 1;
}
v12 = ma_rec_pack(a1, v9 + 24, a2);
if ( v12 )
v3 = write_dynamic_record(a1, (long long)(v9 + 24), v12);
else
LOBYTE(v3) = 1;
if ( !v10 )
my_free(v9);
return v3;
}
|
_ma_write_blob_record:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x18
MOV R14,RSI
MOV RBX,RDI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x30],RAX
MOV RAX,qword ptr [RDI]
MOV R15,qword ptr [RAX + 0x3a0]
CALL 0x00167e66
LEA RSI,[R15 + RAX*0x1]
ADD RSI,0x5d
LEA RCX,[RBP + -0x38]
MOV qword ptr [RCX],RSI
MOV RAX,qword ptr [RBX + 0x78]
MOV RAX,qword ptr [RAX]
SUB RAX,RCX
SUB RAX,RSI
JBE 0x00167de5
CMP RAX,0x10000
JA 0x00167dcf
CMP RSI,0x1000
JC 0x00167de5
CMP RAX,0x8001
JC 0x00167de5
LAB_00167dcf:
MOV R15,RSP
ADD RSI,0xf
AND RSI,-0x10
SUB R15,RSI
MOV RSP,R15
MOV R13B,0x1
JMP 0x00167dfc
LAB_00167de5:
XOR R13D,R13D
MOV EDX,0x10010
XOR EDI,EDI
CALL 0x001bf321
TEST RAX,RAX
JZ 0x00167e34
MOV R15,RAX
LAB_00167dfc:
LEA R12,[R15 + 0x18]
MOV RDI,RBX
MOV RSI,R12
MOV RDX,R14
CALL 0x001674d9
TEST EAX,EAX
JZ 0x00167e23
MOV EDX,EAX
MOV RDI,RBX
MOV RSI,R12
CALL 0x00167841
MOV EBX,EAX
JMP 0x00167e25
LAB_00167e23:
MOV BL,0x1
LAB_00167e25:
TEST R13B,R13B
JNZ 0x00167e41
MOV RDI,R15
CALL 0x001bf54e
JMP 0x00167e41
LAB_00167e34:
CALL 0x001c14ee
MOV dword ptr [RAX],0x80
MOV BL,0x1
LAB_00167e41:
MOV RAX,qword ptr FS:[0x28]
CMP RAX,qword ptr [RBP + -0x30]
JNZ 0x00167e61
MOV EAX,EBX
LEA RSP,[RBP + -0x28]
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_00167e61:
CALL 0x0012a280
|
ulong _ma_write_blob_record(long *param_1,int8 param_2)
{
long lVar1;
bool bVar2;
int1 *puVar3;
int iVar4;
uint uVar5;
long lVar6;
ulong uVar7;
int1 *puVar8;
int4 *puVar9;
int7 uVar10;
int1 *puVar11;
long in_FS_OFFSET;
int1 auStack_48 [8];
ulong local_40;
long local_38;
puVar11 = auStack_48;
local_38 = *(long *)(in_FS_OFFSET + 0x28);
lVar1 = *(long *)(*param_1 + 0x3a0);
lVar6 = _ma_calc_total_blob_length();
lVar1 = lVar1 + lVar6;
local_40 = lVar1 + 0x5d;
uVar7 = (*(long *)param_1[0xf] - (long)&local_40) - local_40;
uVar10 = (int7)((ulong)param_1 >> 8);
if ((local_40 < (ulong)(*(long *)param_1[0xf] - (long)&local_40)) &&
((0x10000 < uVar7 || ((0xfff < local_40 && (0x8000 < uVar7)))))) {
puVar8 = auStack_48 + -(lVar1 + 0x6cU & 0xfffffffffffffff0);
bVar2 = true;
puVar3 = puVar8;
}
else {
bVar2 = false;
puVar8 = (int1 *)my_malloc(0,local_40,0x10010);
puVar3 = auStack_48;
if (puVar8 == (int1 *)0x0) {
puVar9 = (int4 *)_my_thread_var();
*puVar9 = 0x80;
uVar7 = CONCAT71(uVar10,1);
goto LAB_00167e41;
}
}
puVar11 = puVar3;
*(int8 *)(puVar11 + -8) = 0x167e0e;
iVar4 = _ma_rec_pack(param_1,puVar8 + 0x18,param_2);
if (iVar4 == 0) {
uVar7 = CONCAT71(uVar10,1);
}
else {
*(int8 *)(puVar11 + -8) = 0x167e1f;
uVar5 = write_dynamic_record(param_1,puVar8 + 0x18,iVar4);
uVar7 = (ulong)uVar5;
}
if (!bVar2) {
*(int8 *)(puVar11 + -8) = 0x167e32;
my_free(puVar8);
}
LAB_00167e41:
if (*(long *)(in_FS_OFFSET + 0x28) != local_38) {
/* WARNING: Subroutine does not return */
*(code **)(puVar11 + -8) = _ma_calc_total_blob_length;
__stack_chk_fail();
}
return uVar7 & 0xffffffff;
}
|
|
64,238
|
glfwGetCursorPos
|
untodesu[P]riteg/build_O0/_deps/glfw-src/src/input.c
|
GLFWAPI void glfwGetCursorPos(GLFWwindow* handle, double* xpos, double* ypos)
{
_GLFWwindow* window = (_GLFWwindow*) handle;
assert(window != NULL);
if (xpos)
*xpos = 0;
if (ypos)
*ypos = 0;
_GLFW_REQUIRE_INIT();
if (window->cursorMode == GLFW_CURSOR_DISABLED)
{
if (xpos)
*xpos = window->virtualCursorPosX;
if (ypos)
*ypos = window->virtualCursorPosY;
}
else
_glfwPlatformGetCursorPos(window, xpos, ypos);
}
|
O0
|
c
|
glfwGetCursorPos:
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 %rax, -0x20(%rbp)
cmpq $0x0, -0x20(%rbp)
je 0x23955
jmp 0x23974
leaq 0x78ca2(%rip), %rdi # 0x9c5fe
leaq 0x9427d(%rip), %rsi # 0xb7be0
movl $0x2a4, %edx # imm = 0x2A4
leaq 0x943fd(%rip), %rcx # 0xb7d6c
callq 0xc5a0
cmpq $0x0, -0x10(%rbp)
je 0x23986
movq -0x10(%rbp), %rax
xorps %xmm0, %xmm0
movsd %xmm0, (%rax)
cmpq $0x0, -0x18(%rbp)
je 0x23998
movq -0x18(%rbp), %rax
xorps %xmm0, %xmm0
movsd %xmm0, (%rax)
leaq 0xbd2c9(%rip), %rax # 0xe0c68
cmpl $0x0, (%rax)
jne 0x239b6
movl $0x10001, %edi # imm = 0x10001
xorl %eax, %eax
movl %eax, %esi
movb $0x0, %al
callq 0x221a0
jmp 0x23a0c
movq -0x20(%rbp), %rax
cmpl $0x34003, 0x74(%rax) # imm = 0x34003
jne 0x239fb
cmpq $0x0, -0x10(%rbp)
je 0x239de
movq -0x20(%rbp), %rax
movsd 0x1e0(%rax), %xmm0
movq -0x10(%rbp), %rax
movsd %xmm0, (%rax)
cmpq $0x0, -0x18(%rbp)
je 0x239f9
movq -0x20(%rbp), %rax
movsd 0x1e8(%rax), %xmm0
movq -0x18(%rbp), %rax
movsd %xmm0, (%rax)
jmp 0x23a0c
movq -0x20(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
callq 0x34910
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
|
glfwGetCursorPos:
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 [rbp+var_20], rax
cmp [rbp+var_20], 0
jz short loc_23955
jmp short loc_23974
loc_23955:
lea rdi, aWindowNull; "window != NULL"
lea rsi, aWorkspaceLlm4b_12; "/workspace/llm4binary/github/2025_star3"...
mov edx, 2A4h
lea rcx, aVoidGlfwgetcur; "void glfwGetCursorPos(GLFWwindow *, dou"...
call ___assert_fail
loc_23974:
cmp [rbp+var_10], 0
jz short loc_23986
mov rax, [rbp+var_10]
xorps xmm0, xmm0
movsd qword ptr [rax], xmm0
loc_23986:
cmp [rbp+var_18], 0
jz short loc_23998
mov rax, [rbp+var_18]
xorps xmm0, xmm0
movsd qword ptr [rax], xmm0
loc_23998:
lea rax, _glfw
cmp dword ptr [rax], 0
jnz short loc_239B6
mov edi, 10001h
xor eax, eax
mov esi, eax
mov al, 0
call _glfwInputError
jmp short loc_23A0C
loc_239B6:
mov rax, [rbp+var_20]
cmp dword ptr [rax+74h], offset loc_34003
jnz short loc_239FB
cmp [rbp+var_10], 0
jz short loc_239DE
mov rax, [rbp+var_20]
movsd xmm0, qword ptr [rax+1E0h]
mov rax, [rbp+var_10]
movsd qword ptr [rax], xmm0
loc_239DE:
cmp [rbp+var_18], 0
jz short loc_239F9
mov rax, [rbp+var_20]
movsd xmm0, qword ptr [rax+1E8h]
mov rax, [rbp+var_18]
movsd qword ptr [rax], xmm0
loc_239F9:
jmp short loc_23A0C
loc_239FB:
mov rdi, [rbp+var_20]
mov rsi, [rbp+var_10]
mov rdx, [rbp+var_18]
call _glfwPlatformGetCursorPos
loc_23A0C:
add rsp, 20h
pop rbp
retn
|
long long glfwGetCursorPos(long long a1, _QWORD *a2, _QWORD *a3)
{
long long result; // rax
if ( !a1 )
__assert_fail(
"window != NULL",
"/workspace/llm4binary/github/2025_star3/untodesu[P]riteg/build_O0/_deps/glfw-src/src/input.c",
676LL,
"void glfwGetCursorPos(GLFWwindow *, double *, double *)");
if ( a2 )
*a2 = 0LL;
if ( a3 )
*a3 = 0LL;
if ( !glfw[0] )
return glfwInputError(0x10001u, 0LL);
result = a1;
if ( *(_DWORD *)(a1 + 116) != (_DWORD)&loc_34003 )
return glfwPlatformGetCursorPos(a1, a2, a3);
if ( a2 )
{
result = (long long)a2;
*a2 = *(_QWORD *)(a1 + 480);
}
if ( a3 )
{
result = (long long)a3;
*a3 = *(_QWORD *)(a1 + 488);
}
return result;
}
|
glfwGetCursorPos:
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 [RBP + -0x20],RAX
CMP qword ptr [RBP + -0x20],0x0
JZ 0x00123955
JMP 0x00123974
LAB_00123955:
LEA RDI,[0x19c5fe]
LEA RSI,[0x1b7be0]
MOV EDX,0x2a4
LEA RCX,[0x1b7d6c]
CALL 0x0010c5a0
LAB_00123974:
CMP qword ptr [RBP + -0x10],0x0
JZ 0x00123986
MOV RAX,qword ptr [RBP + -0x10]
XORPS XMM0,XMM0
MOVSD qword ptr [RAX],XMM0
LAB_00123986:
CMP qword ptr [RBP + -0x18],0x0
JZ 0x00123998
MOV RAX,qword ptr [RBP + -0x18]
XORPS XMM0,XMM0
MOVSD qword ptr [RAX],XMM0
LAB_00123998:
LEA RAX,[0x1e0c68]
CMP dword ptr [RAX],0x0
JNZ 0x001239b6
MOV EDI,0x10001
XOR EAX,EAX
MOV ESI,EAX
MOV AL,0x0
CALL 0x001221a0
JMP 0x00123a0c
LAB_001239b6:
MOV RAX,qword ptr [RBP + -0x20]
CMP dword ptr [RAX + 0x74],0x34003
JNZ 0x001239fb
CMP qword ptr [RBP + -0x10],0x0
JZ 0x001239de
MOV RAX,qword ptr [RBP + -0x20]
MOVSD XMM0,qword ptr [RAX + 0x1e0]
MOV RAX,qword ptr [RBP + -0x10]
MOVSD qword ptr [RAX],XMM0
LAB_001239de:
CMP qword ptr [RBP + -0x18],0x0
JZ 0x001239f9
MOV RAX,qword ptr [RBP + -0x20]
MOVSD XMM0,qword ptr [RAX + 0x1e8]
MOV RAX,qword ptr [RBP + -0x18]
MOVSD qword ptr [RAX],XMM0
LAB_001239f9:
JMP 0x00123a0c
LAB_001239fb:
MOV RDI,qword ptr [RBP + -0x20]
MOV RSI,qword ptr [RBP + -0x10]
MOV RDX,qword ptr [RBP + -0x18]
CALL 0x00134910
LAB_00123a0c:
ADD RSP,0x20
POP RBP
RET
|
void glfwGetCursorPos(long param_1,int8 *param_2,int8 *param_3)
{
if (param_1 == 0) {
/* WARNING: Subroutine does not return */
__assert_fail("window != NULL",
"/workspace/llm4binary/github/2025_star3/untodesu[P]riteg/build_O0/_deps/glfw-src/src/input.c"
,0x2a4,"void glfwGetCursorPos(GLFWwindow *, double *, double *)");
}
if (param_2 != (int8 *)0x0) {
*param_2 = 0;
}
if (param_3 != (int8 *)0x0) {
*param_3 = 0;
}
if (_glfw == 0) {
_glfwInputError(0x10001,0);
}
else if (*(int *)(param_1 + 0x74) == 0x34003) {
if (param_2 != (int8 *)0x0) {
*param_2 = *(int8 *)(param_1 + 0x1e0);
}
if (param_3 != (int8 *)0x0) {
*param_3 = *(int8 *)(param_1 + 0x1e8);
}
}
else {
_glfwPlatformGetCursorPos(param_1,param_2,param_3);
}
return;
}
|
|
64,239
|
xml_parse_tag_end
|
eloqsql/storage/maria/libmarias3/src/xml.c
|
static struct xml_string* xml_parse_tag_end(struct xml_parser* parser) {
size_t start;
size_t length = 0;
struct xml_string* name;
xml_parser_info(parser, "tag_end");
start = parser->position;
/* Parse until `>' or a whitespace is reached
*/
while (start + length < parser->length) {
uint8_t current = xml_parser_peek(parser, CURRENT_CHARACTER);
if (('>' == current) || isspace(current)) {
break;
} else {
xml_parser_consume(parser, 1);
length++;
}
}
/* Consume `>'
*/
if ('>' != xml_parser_peek(parser, CURRENT_CHARACTER)) {
xml_parser_error(parser, CURRENT_CHARACTER, "xml_parse_tag_end::expected tag end");
return 0;
}
xml_parser_consume(parser, 1);
/* Return parsed tag name
*/
name = ms3_cmalloc(sizeof(struct xml_string));
name->buffer = &parser->buffer[start];
name->length = length;
return name;
}
|
O0
|
c
|
xml_parse_tag_end:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq $0x0, -0x20(%rbp)
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
addq -0x20(%rbp), %rax
movq -0x10(%rbp), %rcx
cmpq 0x10(%rcx), %rax
jae 0x18dfa
movq -0x10(%rbp), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x18630
movb %al, -0x29(%rbp)
movzbl -0x29(%rbp), %ecx
movl $0x3e, %eax
cmpl %ecx, %eax
je 0x18ddc
callq 0xa650
movq (%rax), %rax
movzbl -0x29(%rbp), %ecx
movslq %ecx, %rcx
movzwl (%rax,%rcx,2), %eax
andl $0x2000, %eax # imm = 0x2000
cmpl $0x0, %eax
je 0x18dde
jmp 0x18dfa
movq -0x10(%rbp), %rdi
movl $0x1, %esi
callq 0x18d20
movq -0x20(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x20(%rbp)
jmp 0x18d90
movq -0x10(%rbp), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x18630
movzbl %al, %ecx
movl $0x3e, %eax
cmpl %ecx, %eax
je 0x18e2f
movq -0x10(%rbp), %rdi
xorl %esi, %esi
leaq 0x3ab9(%rip), %rdx # 0x1c8d9
callq 0x178a0
movq $0x0, -0x8(%rbp)
jmp 0x18e75
movq -0x10(%rbp), %rdi
movl $0x1, %esi
callq 0x18d20
movl $0x10, %edi
movq 0xa157(%rip), %rax # 0x22fa0
callq *(%rax)
movq %rax, -0x28(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rcx
addq -0x18(%rbp), %rcx
movq -0x28(%rbp), %rax
movq %rcx, (%rax)
movq -0x20(%rbp), %rcx
movq -0x28(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x28(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x30, %rsp
popq %rbp
retq
nop
|
xml_parse_tag_end:
push rbp
mov rbp, rsp
sub rsp, 30h
mov [rbp+var_10], rdi
mov [rbp+var_20], 0
mov rax, [rbp+var_10]
mov rax, [rax+8]
mov [rbp+var_18], rax
loc_18D90:
mov rax, [rbp+var_18]
add rax, [rbp+var_20]
mov rcx, [rbp+var_10]
cmp rax, [rcx+10h]
jnb short loc_18DFA
mov rdi, [rbp+var_10]
xor eax, eax
mov esi, eax
call xml_parser_peek
mov [rbp+var_29], al
movzx ecx, [rbp+var_29]
mov eax, 3Eh ; '>'
cmp eax, ecx
jz short loc_18DDC
call ___ctype_b_loc
mov rax, [rax]
movzx ecx, [rbp+var_29]
movsxd rcx, ecx
movzx eax, word ptr [rax+rcx*2]
and eax, 2000h
cmp eax, 0
jz short loc_18DDE
loc_18DDC:
jmp short loc_18DFA
loc_18DDE:
mov rdi, [rbp+var_10]
mov esi, 1
call xml_parser_consume
mov rax, [rbp+var_20]
add rax, 1
mov [rbp+var_20], rax
jmp short loc_18D90
loc_18DFA:
mov rdi, [rbp+var_10]
xor eax, eax
mov esi, eax
call xml_parser_peek
movzx ecx, al
mov eax, 3Eh ; '>'
cmp eax, ecx
jz short loc_18E2F
mov rdi, [rbp+var_10]
xor esi, esi
lea rdx, aXmlParseTagEnd; "xml_parse_tag_end::expected tag end"
call xml_parser_error
mov [rbp+var_8], 0
jmp short loc_18E75
loc_18E2F:
mov rdi, [rbp+var_10]
mov esi, 1
call xml_parser_consume
mov edi, 10h
mov rax, cs:ms3_cmalloc_ptr
call qword ptr [rax]
mov [rbp+var_28], rax
mov rax, [rbp+var_10]
mov rcx, [rax]
add rcx, [rbp+var_18]
mov rax, [rbp+var_28]
mov [rax], rcx
mov rcx, [rbp+var_20]
mov rax, [rbp+var_28]
mov [rax+8], rcx
mov rax, [rbp+var_28]
mov [rbp+var_8], rax
loc_18E75:
mov rax, [rbp+var_8]
add rsp, 30h
pop rbp
retn
|
_QWORD * xml_parse_tag_end(_QWORD *a1)
{
unsigned __int8 v2; // [rsp+7h] [rbp-29h]
_QWORD *v3; // [rsp+8h] [rbp-28h]
long long v4; // [rsp+10h] [rbp-20h]
long long v5; // [rsp+18h] [rbp-18h]
v4 = 0LL;
v5 = a1[1];
while ( (unsigned long long)(v4 + v5) < a1[2] )
{
v2 = xml_parser_peek(a1, 0LL);
if ( v2 == 62 || (*(_WORD *)(*(_QWORD *)__ctype_b_loc() + 2LL * v2) & 0x2000) != 0 )
break;
xml_parser_consume((unsigned long long)a1, 1LL);
++v4;
}
if ( xml_parser_peek(a1, 0LL) == 62 )
{
xml_parser_consume((unsigned long long)a1, 1LL);
v3 = (_QWORD *)ms3_cmalloc(16LL);
*v3 = v5 + *a1;
v3[1] = v4;
return v3;
}
else
{
xml_parser_error(a1, 0, "xml_parse_tag_end::expected tag end");
return 0LL;
}
}
|
xml_parse_tag_end:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x30
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x20],0x0
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x8]
MOV qword ptr [RBP + -0x18],RAX
LAB_00118d90:
MOV RAX,qword ptr [RBP + -0x18]
ADD RAX,qword ptr [RBP + -0x20]
MOV RCX,qword ptr [RBP + -0x10]
CMP RAX,qword ptr [RCX + 0x10]
JNC 0x00118dfa
MOV RDI,qword ptr [RBP + -0x10]
XOR EAX,EAX
MOV ESI,EAX
CALL 0x00118630
MOV byte ptr [RBP + -0x29],AL
MOVZX ECX,byte ptr [RBP + -0x29]
MOV EAX,0x3e
CMP EAX,ECX
JZ 0x00118ddc
CALL 0x0010a650
MOV RAX,qword ptr [RAX]
MOVZX ECX,byte ptr [RBP + -0x29]
MOVSXD RCX,ECX
MOVZX EAX,word ptr [RAX + RCX*0x2]
AND EAX,0x2000
CMP EAX,0x0
JZ 0x00118dde
LAB_00118ddc:
JMP 0x00118dfa
LAB_00118dde:
MOV RDI,qword ptr [RBP + -0x10]
MOV ESI,0x1
CALL 0x00118d20
MOV RAX,qword ptr [RBP + -0x20]
ADD RAX,0x1
MOV qword ptr [RBP + -0x20],RAX
JMP 0x00118d90
LAB_00118dfa:
MOV RDI,qword ptr [RBP + -0x10]
XOR EAX,EAX
MOV ESI,EAX
CALL 0x00118630
MOVZX ECX,AL
MOV EAX,0x3e
CMP EAX,ECX
JZ 0x00118e2f
MOV RDI,qword ptr [RBP + -0x10]
XOR ESI,ESI
LEA RDX,[0x11c8d9]
CALL 0x001178a0
MOV qword ptr [RBP + -0x8],0x0
JMP 0x00118e75
LAB_00118e2f:
MOV RDI,qword ptr [RBP + -0x10]
MOV ESI,0x1
CALL 0x00118d20
MOV EDI,0x10
MOV RAX,qword ptr [0x00122fa0]
CALL qword ptr [RAX]
MOV qword ptr [RBP + -0x28],RAX
MOV RAX,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RAX]
ADD RCX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RBP + -0x28]
MOV qword ptr [RAX],RCX
MOV RCX,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RBP + -0x28]
MOV qword ptr [RAX + 0x8],RCX
MOV RAX,qword ptr [RBP + -0x28]
MOV qword ptr [RBP + -0x8],RAX
LAB_00118e75:
MOV RAX,qword ptr [RBP + -0x8]
ADD RSP,0x30
POP RBP
RET
|
long * xml_parse_tag_end(long *param_1)
{
long lVar1;
byte bVar2;
char cVar3;
ushort **ppuVar4;
long local_28;
long *local_10;
local_28 = 0;
lVar1 = param_1[1];
while ((((ulong)(lVar1 + local_28) < (ulong)param_1[2] &&
(bVar2 = xml_parser_peek(param_1,0), bVar2 != 0x3e)) &&
(ppuVar4 = __ctype_b_loc(), ((*ppuVar4)[(int)(uint)bVar2] & 0x2000) == 0))) {
xml_parser_consume(param_1,1);
local_28 = local_28 + 1;
}
cVar3 = xml_parser_peek(param_1,0);
if (cVar3 == '>') {
xml_parser_consume(param_1,1);
local_10 = (long *)(**(code **)PTR_ms3_cmalloc_00122fa0)(0x10);
*local_10 = *param_1 + lVar1;
local_10[1] = local_28;
}
else {
xml_parser_error(param_1,0,"xml_parse_tag_end::expected tag end");
local_10 = (long *)0x0;
}
return local_10;
}
|
|
64,240
|
LefDefParser::lefInfo(int, char const*)
|
Efficient-TDP/thirdparty/Limbo/limbo/thirdparty/lefdef/5.8/lef/lef/lef_keywords.cpp
|
void
lefInfo(int msgNum,
const char *s)
{
int disableStatus = lefSettings->suppresMsg(msgNum);
if (disableStatus == 1) {
char msgStr[60];
sprintf(msgStr, "Message (LEFPARS-%d) has been suppressed from output.", msgNum);
lefWarning(2502, msgStr);
return;
} else if (disableStatus == 2) {
return;
}
if ((lefSettings->TotalMsgLimit > 0) && (lefData->lefInfoMsgPrinted >= lefSettings->TotalMsgLimit))
return;
if (lefSettings->MsgLimit[msgNum] > 0) {
if (lefData->msgLimit[0][msgNum] >= lefSettings->MsgLimit[msgNum]) { // over the limit
char msgStr[100];
if (lefData->msgLimit[1][msgNum]) // already printed out warning
return;
lefData->msgLimit[1][msgNum] = 1;
sprintf(msgStr,
"Message (LEFPARS-%d) has exceeded the message display limit of %d",
msgNum, lefSettings->MsgLimit[msgNum]);
lefWarning(2503, msgStr);
return;
}
lefData->msgLimit[0][msgNum] = lefData->msgLimit[0][msgNum] + 1;
}
lefData->lefInfoMsgPrinted++;
if (lefSettings->WarningLogFunction) {
char *str = (char*) lefMalloc(strlen(lefData->current_token) + strlen(s) + strlen(lefData->lefrFileName)
+ 350);
sprintf(str, "INFO (LEFPARS-%d): %s See file %s at line %d.\n",
msgNum, s, lefData->lefrFileName, lefData->lef_nlines);
(*lefSettings->WarningLogFunction)(str);
free(str);
} else if (lefData->lefrLog) {
fprintf(lefData->lefrLog, "INFO (LEFPARS-%d): %s See file %s at line %d\n",
msgNum, s, lefData->lefrFileName, lefData->lef_nlines);
} else {
if (!lefData->hasOpenedLogFile) {
if ((lefData->lefrLog = fopen("lefRWarning.log", "w")) == 0) {
printf("WARNING (LEFPARS-3500): Unable to open the file lefRWarning.log in %s.\n",
getcwd(NULL, 64));
printf("Info messages will not be printed.\n");
} else {
lefData->hasOpenedLogFile = 1;
fprintf(lefData->lefrLog, "Info from file: %s\n\n", lefData->lefrFileName);
fprintf(lefData->lefrLog, "INFO (LEFPARS-%d): %s See file %s at line %d\n",
msgNum, s, lefData->lefrFileName, lefData->lef_nlines);
}
} else {
if ((lefData->lefrLog = fopen("lefRWarning.log", "a")) == 0) {
printf("WARNING (LEFPARS-3500): Unable to open the file lefRWarning.log in %s.\n",
getcwd(NULL, 64));
printf("Info messages will not be printed.\n");
} else {
fprintf(lefData->lefrLog, "\nInfo from file: %s\n\n", lefData->lefrFileName);
fprintf(lefData->lefrLog, "INFO (LEFPARS-%d): %s See file %s at line %d\n",
msgNum, s, lefData->lefrFileName, lefData->lef_nlines);
}
}
}
}
|
O0
|
cpp
|
LefDefParser::lefInfo(int, char const*):
subq $0xe8, %rsp
movl %edi, 0xe4(%rsp)
movq %rsi, 0xd8(%rsp)
leaq 0x72ebb(%rip), %rax # 0xc5728
movq (%rax), %rdi
movl 0xe4(%rsp), %esi
callq 0x68640
movl %eax, 0xd4(%rsp)
cmpl $0x1, 0xd4(%rsp)
jne 0x528c1
leaq 0x90(%rsp), %rdi
movl 0xe4(%rsp), %edx
leaq 0x45abe(%rip), %rsi # 0x98361
movb $0x0, %al
callq 0x2050
leaq 0x90(%rsp), %rsi
movl $0x9c6, %edi # imm = 0x9C6
callq 0x52fc0
jmp 0x52d48
cmpl $0x2, 0xd4(%rsp)
jne 0x528d0
jmp 0x52d48
jmp 0x528d2
leaq 0x72e4f(%rip), %rax # 0xc5728
movq (%rax), %rax
cmpl $0x0, 0xf0(%rax)
jle 0x5290c
leaq 0x72e64(%rip), %rax # 0xc5750
movq (%rax), %rax
movl 0x1bc(%rax), %eax
leaq 0x72e2c(%rip), %rcx # 0xc5728
movq (%rcx), %rcx
cmpl 0xf0(%rcx), %eax
jl 0x5290c
jmp 0x52d48
leaq 0x72e15(%rip), %rax # 0xc5728
movq (%rax), %rax
movslq 0xe4(%rsp), %rcx
cmpl $0x0, 0x130(%rax,%rcx,4)
jle 0x52a1e
leaq 0x72e1d(%rip), %rax # 0xc5750
movq (%rax), %rax
movslq 0xe4(%rsp), %rcx
movl 0x5dd8(%rax,%rcx,4), %eax
leaq 0x72ddc(%rip), %rcx # 0xc5728
movq (%rcx), %rcx
movslq 0xe4(%rsp), %rdx
cmpl 0x130(%rcx,%rdx,4), %eax
jl 0x529e9
leaq 0x72de5(%rip), %rax # 0xc5750
movq (%rax), %rax
movslq 0xe4(%rsp), %rcx
cmpl $0x0, 0xa74c(%rax,%rcx,4)
je 0x52985
jmp 0x52d48
leaq 0x72dc4(%rip), %rax # 0xc5750
movq (%rax), %rax
movslq 0xe4(%rsp), %rcx
movl $0x1, 0xa74c(%rax,%rcx,4)
leaq 0x20(%rsp), %rdi
movl 0xe4(%rsp), %edx
leaq 0x72d73(%rip), %rax # 0xc5728
movq (%rax), %rax
movslq 0xe4(%rsp), %rcx
movl 0x130(%rax,%rcx,4), %ecx
leaq 0x459c9(%rip), %rsi # 0x98397
movb $0x0, %al
callq 0x2050
leaq 0x20(%rsp), %rsi
movl $0x9c7, %edi # imm = 0x9C7
callq 0x52fc0
jmp 0x52d48
leaq 0x72d60(%rip), %rax # 0xc5750
movq (%rax), %rax
movslq 0xe4(%rsp), %rcx
movl 0x5dd8(%rax,%rcx,4), %edx
addl $0x1, %edx
leaq 0x72d44(%rip), %rax # 0xc5750
movq (%rax), %rax
movslq 0xe4(%rsp), %rcx
movl %edx, 0x5dd8(%rax,%rcx,4)
leaq 0x72d2b(%rip), %rax # 0xc5750
movq (%rax), %rax
movl 0x1bc(%rax), %ecx
addl $0x1, %ecx
movl %ecx, 0x1bc(%rax)
leaq 0x72cea(%rip), %rax # 0xc5728
movq (%rax), %rax
cmpq $0x0, 0x128(%rax)
je 0x52b1b
leaq 0x72cfa(%rip), %rax # 0xc5750
movq (%rax), %rax
movq 0x1800(%rax), %rdi
callq 0x20e0
movq %rax, 0x8(%rsp)
movq 0xd8(%rsp), %rdi
callq 0x20e0
movq %rax, %rcx
movq 0x8(%rsp), %rax
addq %rcx, %rax
movq %rax, 0x10(%rsp)
leaq 0x72cc2(%rip), %rax # 0xc5750
movq (%rax), %rax
movq 0x38(%rax), %rdi
callq 0x20e0
movq 0x10(%rsp), %rdi
addq %rax, %rdi
addq $0x15e, %rdi # imm = 0x15E
callq 0x4f550
movq %rax, 0x18(%rsp)
movq 0x18(%rsp), %rdi
movl 0xe4(%rsp), %edx
movq 0xd8(%rsp), %rcx
leaq 0x72c82(%rip), %rax # 0xc5750
movq (%rax), %rax
movq 0x38(%rax), %r8
leaq 0x72c74(%rip), %rax # 0xc5750
movq (%rax), %rax
movl 0x1e4(%rax), %r9d
leaq 0x458ec(%rip), %rsi # 0x983d9
movb $0x0, %al
callq 0x2050
leaq 0x72c2d(%rip), %rax # 0xc5728
movq (%rax), %rax
movq 0x128(%rax), %rax
movq 0x18(%rsp), %rdi
callq *%rax
movq 0x18(%rsp), %rdi
callq 0x22f0
jmp 0x52d48
leaq 0x72c2e(%rip), %rax # 0xc5750
movq (%rax), %rax
cmpq $0x0, 0x8(%rax)
je 0x52b7b
leaq 0x72c1d(%rip), %rax # 0xc5750
movq (%rax), %rax
movq 0x8(%rax), %rdi
movl 0xe4(%rsp), %edx
movq 0xd8(%rsp), %rcx
leaq 0x72c00(%rip), %rax # 0xc5750
movq (%rax), %rax
movq 0x38(%rax), %r8
leaq 0x72bf2(%rip), %rax # 0xc5750
movq (%rax), %rax
movl 0x1e4(%rax), %r9d
leaq 0x45899(%rip), %rsi # 0x98408
movb $0x0, %al
callq 0x2370
jmp 0x52d46
leaq 0x72bce(%rip), %rax # 0xc5750
movq (%rax), %rax
cmpl $0x0, 0x134(%rax)
jne 0x52c78
leaq 0x4589d(%rip), %rdi # 0x98436
leaq 0x3ec46(%rip), %rsi # 0x917e6
callq 0x22e0
leaq 0x72ba4(%rip), %rcx # 0xc5750
movq (%rcx), %rcx
movq %rax, 0x8(%rcx)
cmpq $0x0, %rax
jne 0x52beb
xorl %eax, %eax
movl %eax, %edi
movl $0x40, %esi
callq 0x2130
movq %rax, %rsi
leaq 0x45875(%rip), %rdi # 0x98446
movb $0x0, %al
callq 0x2030
leaq 0x458af(%rip), %rdi # 0x9848e
movb $0x0, %al
callq 0x2030
jmp 0x52c73
leaq 0x72b5e(%rip), %rax # 0xc5750
movq (%rax), %rax
movl $0x1, 0x134(%rax)
leaq 0x72b4a(%rip), %rax # 0xc5750
movq (%rax), %rax
movq 0x8(%rax), %rdi
leaq 0x72b3c(%rip), %rax # 0xc5750
movq (%rax), %rax
movq 0x38(%rax), %rdx
leaq 0x45891(%rip), %rsi # 0x984b3
movb $0x0, %al
callq 0x2370
leaq 0x72b20(%rip), %rax # 0xc5750
movq (%rax), %rax
movq 0x8(%rax), %rdi
movl 0xe4(%rsp), %edx
movq 0xd8(%rsp), %rcx
leaq 0x72b03(%rip), %rax # 0xc5750
movq (%rax), %rax
movq 0x38(%rax), %r8
leaq 0x72af5(%rip), %rax # 0xc5750
movq (%rax), %rax
movl 0x1e4(%rax), %r9d
leaq 0x4579c(%rip), %rsi # 0x98408
movb $0x0, %al
callq 0x2370
jmp 0x52d44
leaq 0x457b7(%rip), %rdi # 0x98436
leaq 0x44381(%rip), %rsi # 0x97007
callq 0x22e0
leaq 0x72abe(%rip), %rcx # 0xc5750
movq (%rcx), %rcx
movq %rax, 0x8(%rcx)
cmpq $0x0, %rax
jne 0x52cce
xorl %eax, %eax
movl %eax, %edi
movl $0x40, %esi
callq 0x2130
movq %rax, %rsi
leaq 0x4578f(%rip), %rdi # 0x98446
movb $0x0, %al
callq 0x2030
leaq 0x457c9(%rip), %rdi # 0x9848e
movb $0x0, %al
callq 0x2030
jmp 0x52d42
leaq 0x72a7b(%rip), %rax # 0xc5750
movq (%rax), %rax
movq 0x8(%rax), %rdi
leaq 0x72a6d(%rip), %rax # 0xc5750
movq (%rax), %rax
movq 0x38(%rax), %rdx
leaq 0x457c1(%rip), %rsi # 0x984b2
movb $0x0, %al
callq 0x2370
leaq 0x72a51(%rip), %rax # 0xc5750
movq (%rax), %rax
movq 0x8(%rax), %rdi
movl 0xe4(%rsp), %edx
movq 0xd8(%rsp), %rcx
leaq 0x72a34(%rip), %rax # 0xc5750
movq (%rax), %rax
movq 0x38(%rax), %r8
leaq 0x72a26(%rip), %rax # 0xc5750
movq (%rax), %rax
movl 0x1e4(%rax), %r9d
leaq 0x456cd(%rip), %rsi # 0x98408
movb $0x0, %al
callq 0x2370
jmp 0x52d44
jmp 0x52d46
jmp 0x52d48
addq $0xe8, %rsp
retq
|
_ZN12LefDefParser7lefInfoEiPKc:
sub rsp, 0E8h
mov [rsp+0E8h+var_4], edi
mov [rsp+0E8h+var_10], rsi
lea rax, _ZN12LefDefParser11lefSettingsE; LefDefParser::lefSettings
mov rdi, [rax]; this
mov esi, [rsp+0E8h+var_4]; unsigned __int64
call _ZN12LefDefParser12lefrSettings10suppresMsgEi; LefDefParser::lefrSettings::suppresMsg(int)
mov [rsp+0E8h+var_14], eax
cmp [rsp+0E8h+var_14], 1
jnz short loc_528C1
lea rdi, [rsp+0E8h+var_58]
mov edx, [rsp+0E8h+var_4]
lea rsi, aMessageLefpars; "Message (LEFPARS-%d) has been suppresse"...
mov al, 0
call _sprintf
lea rsi, [rsp+0E8h+var_58]; int
mov edi, (offset stru_9B8.st_value+6); this
call _ZN12LefDefParser10lefWarningEiPKc; LefDefParser::lefWarning(int,char const*)
jmp loc_52D48
loc_528C1:
cmp [rsp+0E8h+var_14], 2
jnz short loc_528D0
jmp loc_52D48
loc_528D0:
jmp short $+2
loc_528D2:
lea rax, _ZN12LefDefParser11lefSettingsE; LefDefParser::lefSettings
mov rax, [rax]
cmp dword ptr [rax+0F0h], 0
jle short loc_5290C
lea rax, _ZN12LefDefParser7lefDataE; LefDefParser::lefData
mov rax, [rax]
mov eax, [rax+1BCh]
lea rcx, _ZN12LefDefParser11lefSettingsE; LefDefParser::lefSettings
mov rcx, [rcx]
cmp eax, [rcx+0F0h]
jl short loc_5290C
jmp loc_52D48
loc_5290C:
lea rax, _ZN12LefDefParser11lefSettingsE; LefDefParser::lefSettings
mov rax, [rax]
movsxd rcx, [rsp+0E8h+var_4]
cmp dword ptr [rax+rcx*4+130h], 0
jle loc_52A1E
lea rax, _ZN12LefDefParser7lefDataE; LefDefParser::lefData
mov rax, [rax]
movsxd rcx, [rsp+0E8h+var_4]
mov eax, [rax+rcx*4+5DD8h]
lea rcx, _ZN12LefDefParser11lefSettingsE; LefDefParser::lefSettings
mov rcx, [rcx]
movsxd rdx, [rsp+0E8h+var_4]
cmp eax, [rcx+rdx*4+130h]
jl loc_529E9
lea rax, _ZN12LefDefParser7lefDataE; LefDefParser::lefData
mov rax, [rax]
movsxd rcx, [rsp+0E8h+var_4]
cmp dword ptr [rax+rcx*4+0A74Ch], 0
jz short loc_52985
jmp loc_52D48
loc_52985:
lea rax, _ZN12LefDefParser7lefDataE; LefDefParser::lefData
mov rax, [rax]
movsxd rcx, [rsp+0E8h+var_4]
mov dword ptr [rax+rcx*4+0A74Ch], 1
lea rdi, [rsp+0E8h+var_C8]
mov edx, [rsp+0E8h+var_4]
lea rax, _ZN12LefDefParser11lefSettingsE; LefDefParser::lefSettings
mov rax, [rax]
movsxd rcx, [rsp+0E8h+var_4]
mov ecx, [rax+rcx*4+130h]
lea rsi, aMessageLefpars_0; "Message (LEFPARS-%d) has exceeded the m"...
mov al, 0
call _sprintf
lea rsi, [rsp+0E8h+var_C8]; int
mov edi, (offset stru_9B8.st_value+7); this
call _ZN12LefDefParser10lefWarningEiPKc; LefDefParser::lefWarning(int,char const*)
jmp loc_52D48
loc_529E9:
lea rax, _ZN12LefDefParser7lefDataE; LefDefParser::lefData
mov rax, [rax]
movsxd rcx, [rsp+0E8h+var_4]
mov edx, [rax+rcx*4+5DD8h]
add edx, 1
lea rax, _ZN12LefDefParser7lefDataE; LefDefParser::lefData
mov rax, [rax]
movsxd rcx, [rsp+0E8h+var_4]
mov [rax+rcx*4+5DD8h], edx
loc_52A1E:
lea rax, _ZN12LefDefParser7lefDataE; LefDefParser::lefData
mov rax, [rax]
mov ecx, [rax+1BCh]
add ecx, 1
mov [rax+1BCh], ecx
lea rax, _ZN12LefDefParser11lefSettingsE; LefDefParser::lefSettings
mov rax, [rax]
cmp qword ptr [rax+128h], 0
jz loc_52B1B
lea rax, _ZN12LefDefParser7lefDataE; LefDefParser::lefData
mov rax, [rax]
mov rdi, [rax+1800h]
call _strlen
mov [rsp+0E8h+var_E0], rax
mov rdi, [rsp+0E8h+var_10]
call _strlen
mov rcx, rax
mov rax, [rsp+0E8h+var_E0]
add rax, rcx
mov [rsp+0E8h+var_D8], rax
lea rax, _ZN12LefDefParser7lefDataE; LefDefParser::lefData
mov rax, [rax]
mov rdi, [rax+38h]
call _strlen
mov rdi, [rsp+0E8h+var_D8]
add rdi, rax
add rdi, 15Eh; this
call _ZN12LefDefParser9lefMallocEm; LefDefParser::lefMalloc(ulong)
mov [rsp+0E8h+var_D0], rax
mov rdi, [rsp+0E8h+var_D0]
mov edx, [rsp+0E8h+var_4]
mov rcx, [rsp+0E8h+var_10]
lea rax, _ZN12LefDefParser7lefDataE; LefDefParser::lefData
mov rax, [rax]
mov r8, [rax+38h]
lea rax, _ZN12LefDefParser7lefDataE; LefDefParser::lefData
mov rax, [rax]
mov r9d, [rax+1E4h]
lea rsi, aInfoLefparsDSS; "INFO (LEFPARS-%d): %s See file %s at li"...
mov al, 0
call _sprintf
lea rax, _ZN12LefDefParser11lefSettingsE; LefDefParser::lefSettings
mov rax, [rax]
mov rax, [rax+128h]
mov rdi, [rsp+0E8h+var_D0]
call rax
mov rdi, [rsp+0E8h+var_D0]
call _free
jmp loc_52D48
loc_52B1B:
lea rax, _ZN12LefDefParser7lefDataE; LefDefParser::lefData
mov rax, [rax]
cmp qword ptr [rax+8], 0
jz short loc_52B7B
lea rax, _ZN12LefDefParser7lefDataE; LefDefParser::lefData
mov rax, [rax]
mov rdi, [rax+8]
mov edx, [rsp+0E8h+var_4]
mov rcx, [rsp+0E8h+var_10]
lea rax, _ZN12LefDefParser7lefDataE; LefDefParser::lefData
mov rax, [rax]
mov r8, [rax+38h]
lea rax, _ZN12LefDefParser7lefDataE; LefDefParser::lefData
mov rax, [rax]
mov r9d, [rax+1E4h]
lea rsi, aInfoLefparsDSS_0; "INFO (LEFPARS-%d): %s See file %s at li"...
mov al, 0
call _fprintf
jmp loc_52D46
loc_52B7B:
lea rax, _ZN12LefDefParser7lefDataE; LefDefParser::lefData
mov rax, [rax]
cmp dword ptr [rax+134h], 0
jnz loc_52C78
lea rdi, aLefrwarningLog; "lefRWarning.log"
lea rsi, aW; "w"
call _fopen
lea rcx, _ZN12LefDefParser7lefDataE; LefDefParser::lefData
mov rcx, [rcx]
mov [rcx+8], rax
cmp rax, 0
jnz short loc_52BEB
xor eax, eax
mov edi, eax
mov esi, 40h ; '@'
call _getcwd
mov rsi, rax
lea rdi, aWarningLefpars_0; "WARNING (LEFPARS-3500): Unable to open "...
mov al, 0
call _printf
lea rdi, aInfoMessagesWi; "Info messages will not be printed.\n"
mov al, 0
call _printf
jmp loc_52C73
loc_52BEB:
lea rax, _ZN12LefDefParser7lefDataE; LefDefParser::lefData
mov rax, [rax]
mov dword ptr [rax+134h], 1
lea rax, _ZN12LefDefParser7lefDataE; LefDefParser::lefData
mov rax, [rax]
mov rdi, [rax+8]
lea rax, _ZN12LefDefParser7lefDataE; LefDefParser::lefData
mov rax, [rax]
mov rdx, [rax+38h]
lea rsi, aInfoFromFileS+1; "Info from file: %s\n\n"
mov al, 0
call _fprintf
lea rax, _ZN12LefDefParser7lefDataE; LefDefParser::lefData
mov rax, [rax]
mov rdi, [rax+8]
mov edx, [rsp+0E8h+var_4]
mov rcx, [rsp+0E8h+var_10]
lea rax, _ZN12LefDefParser7lefDataE; LefDefParser::lefData
mov rax, [rax]
mov r8, [rax+38h]
lea rax, _ZN12LefDefParser7lefDataE; LefDefParser::lefData
mov rax, [rax]
mov r9d, [rax+1E4h]
lea rsi, aInfoLefparsDSS_0; "INFO (LEFPARS-%d): %s See file %s at li"...
mov al, 0
call _fprintf
loc_52C73:
jmp loc_52D44
loc_52C78:
lea rdi, aLefrwarningLog; "lefRWarning.log"
lea rsi, aMaxstackvia+0Ah; "a"
call _fopen
lea rcx, _ZN12LefDefParser7lefDataE; LefDefParser::lefData
mov rcx, [rcx]
mov [rcx+8], rax
cmp rax, 0
jnz short loc_52CCE
xor eax, eax
mov edi, eax
mov esi, 40h ; '@'
call _getcwd
mov rsi, rax
lea rdi, aWarningLefpars_0; "WARNING (LEFPARS-3500): Unable to open "...
mov al, 0
call _printf
lea rdi, aInfoMessagesWi; "Info messages will not be printed.\n"
mov al, 0
call _printf
jmp short loc_52D42
loc_52CCE:
lea rax, _ZN12LefDefParser7lefDataE; LefDefParser::lefData
mov rax, [rax]
mov rdi, [rax+8]
lea rax, _ZN12LefDefParser7lefDataE; LefDefParser::lefData
mov rax, [rax]
mov rdx, [rax+38h]
lea rsi, aInfoFromFileS; "\nInfo from file: %s\n\n"
mov al, 0
call _fprintf
lea rax, _ZN12LefDefParser7lefDataE; LefDefParser::lefData
mov rax, [rax]
mov rdi, [rax+8]
mov edx, [rsp+0E8h+var_4]
mov rcx, [rsp+0E8h+var_10]
lea rax, _ZN12LefDefParser7lefDataE; LefDefParser::lefData
mov rax, [rax]
mov r8, [rax+38h]
lea rax, _ZN12LefDefParser7lefDataE; LefDefParser::lefData
mov rax, [rax]
mov r9d, [rax+1E4h]
lea rsi, aInfoLefparsDSS_0; "INFO (LEFPARS-%d): %s See file %s at li"...
mov al, 0
call _fprintf
loc_52D42:
jmp short $+2
loc_52D44:
jmp short $+2
loc_52D46:
jmp short $+2
loc_52D48:
add rsp, 0E8h
retn
|
long long LefDefParser::lefInfo(LefDefParser *this, const char *a2, const char *a3)
{
long long result; // rax
const char *v4; // rdx
const char *v5; // rdx
long long v6; // rax
long long v7; // rax
const char *v8; // rax
long long v9; // rax
long long v10; // [rsp+8h] [rbp-E0h]
long long v11; // [rsp+10h] [rbp-D8h]
long long v12; // [rsp+18h] [rbp-D0h]
int v13[28]; // [rsp+20h] [rbp-C8h] BYREF
int v14[17]; // [rsp+90h] [rbp-58h] BYREF
int v15; // [rsp+D4h] [rbp-14h]
const char *v16; // [rsp+D8h] [rbp-10h]
int v17; // [rsp+E4h] [rbp-4h]
v17 = (int)this;
v16 = a2;
result = LefDefParser::lefrSettings::suppresMsg(LefDefParser::lefSettings, (int)this);
v15 = result;
if ( (_DWORD)result == 1 )
{
sprintf(v14, "Message (LEFPARS-%d) has been suppressed from output.", v17);
return LefDefParser::lefWarning((LefDefParser *)((char *)&stru_9B8.st_value + 6), (int)v14, v4);
}
if ( v15 != 2 )
{
if ( *((int *)LefDefParser::lefSettings + 60) <= 0
|| (result = *(unsigned int *)(LefDefParser::lefData + 444LL),
(int)result < *((_DWORD *)LefDefParser::lefSettings + 60)) )
{
if ( *((int *)LefDefParser::lefSettings + v17 + 76) > 0 )
{
if ( *(_DWORD *)(LefDefParser::lefData + 4LL * v17 + 24024) >= *((_DWORD *)LefDefParser::lefSettings + v17 + 76) )
{
result = LefDefParser::lefData;
if ( !*(_DWORD *)(LefDefParser::lefData + 4LL * v17 + 42828) )
{
*(_DWORD *)(LefDefParser::lefData + 4LL * v17 + 42828) = 1;
sprintf(
v13,
"Message (LEFPARS-%d) has exceeded the message display limit of %d",
v17,
*((_DWORD *)LefDefParser::lefSettings + v17 + 76));
return LefDefParser::lefWarning((LefDefParser *)((char *)&stru_9B8.st_value + 7), (int)v13, v5);
}
return result;
}
++*(_DWORD *)(LefDefParser::lefData + 4LL * v17 + 24024);
}
++*(_DWORD *)(LefDefParser::lefData + 444LL);
if ( *((_QWORD *)LefDefParser::lefSettings + 37) )
{
v10 = strlen(*(_QWORD *)(LefDefParser::lefData + 6144LL));
v11 = strlen(v16) + v10;
v6 = strlen(*(_QWORD *)(LefDefParser::lefData + 56LL));
v12 = LefDefParser::lefMalloc((LefDefParser *)(v6 + v11 + 350));
sprintf(
v12,
"INFO (LEFPARS-%d): %s See file %s at line %d.\n",
v17,
v16,
*(const char **)(LefDefParser::lefData + 56LL),
*(_DWORD *)(LefDefParser::lefData + 484LL));
(*((void ( **)(long long))LefDefParser::lefSettings + 37))(v12);
return free(v12);
}
if ( *(_QWORD *)(LefDefParser::lefData + 8LL) )
return fprintf(
*(_QWORD *)(LefDefParser::lefData + 8LL),
"INFO (LEFPARS-%d): %s See file %s at line %d\n",
v17,
v16,
*(const char **)(LefDefParser::lefData + 56LL),
*(_DWORD *)(LefDefParser::lefData + 484LL));
if ( *(_DWORD *)(LefDefParser::lefData + 308LL) )
{
v9 = fopen("lefRWarning.log", "a");
*(_QWORD *)(LefDefParser::lefData + 8LL) = v9;
if ( v9 )
{
fprintf(
*(_QWORD *)(LefDefParser::lefData + 8LL),
"\nInfo from file: %s\n\n",
*(const char **)(LefDefParser::lefData + 56LL));
return fprintf(
*(_QWORD *)(LefDefParser::lefData + 8LL),
"INFO (LEFPARS-%d): %s See file %s at line %d\n",
v17,
v16,
*(const char **)(LefDefParser::lefData + 56LL),
*(_DWORD *)(LefDefParser::lefData + 484LL));
}
}
else
{
v7 = fopen("lefRWarning.log", "w");
*(_QWORD *)(LefDefParser::lefData + 8LL) = v7;
if ( v7 )
{
*(_DWORD *)(LefDefParser::lefData + 308LL) = 1;
fprintf(
*(_QWORD *)(LefDefParser::lefData + 8LL),
"Info from file: %s\n\n",
*(const char **)(LefDefParser::lefData + 56LL));
return fprintf(
*(_QWORD *)(LefDefParser::lefData + 8LL),
"INFO (LEFPARS-%d): %s See file %s at line %d\n",
v17,
v16,
*(const char **)(LefDefParser::lefData + 56LL),
*(_DWORD *)(LefDefParser::lefData + 484LL));
}
}
v8 = (const char *)getcwd(0LL, 64LL);
printf("WARNING (LEFPARS-3500): Unable to open the file lefRWarning.log in %s.\n", v8);
return printf("Info messages will not be printed.\n");
}
}
return result;
}
|
lefInfo:
SUB RSP,0xe8
MOV dword ptr [RSP + 0xe4],EDI
MOV qword ptr [RSP + 0xd8],RSI
LEA RAX,[0x1c5728]
MOV RDI,qword ptr [RAX]
MOV ESI,dword ptr [RSP + 0xe4]
CALL 0x00168640
MOV dword ptr [RSP + 0xd4],EAX
CMP dword ptr [RSP + 0xd4],0x1
JNZ 0x001528c1
LEA RDI,[RSP + 0x90]
MOV EDX,dword ptr [RSP + 0xe4]
LEA RSI,[0x198361]
MOV AL,0x0
CALL 0x00102050
LEA RSI,[RSP + 0x90]
MOV EDI,0x9c6
CALL 0x00152fc0
JMP 0x00152d48
LAB_001528c1:
CMP dword ptr [RSP + 0xd4],0x2
JNZ 0x001528d0
JMP 0x00152d48
LAB_001528d0:
JMP 0x001528d2
LAB_001528d2:
LEA RAX,[0x1c5728]
MOV RAX,qword ptr [RAX]
CMP dword ptr [RAX + 0xf0],0x0
JLE 0x0015290c
LEA RAX,[0x1c5750]
MOV RAX,qword ptr [RAX]
MOV EAX,dword ptr [RAX + 0x1bc]
LEA RCX,[0x1c5728]
MOV RCX,qword ptr [RCX]
CMP EAX,dword ptr [RCX + 0xf0]
JL 0x0015290c
JMP 0x00152d48
LAB_0015290c:
LEA RAX,[0x1c5728]
MOV RAX,qword ptr [RAX]
MOVSXD RCX,dword ptr [RSP + 0xe4]
CMP dword ptr [RAX + RCX*0x4 + 0x130],0x0
JLE 0x00152a1e
LEA RAX,[0x1c5750]
MOV RAX,qword ptr [RAX]
MOVSXD RCX,dword ptr [RSP + 0xe4]
MOV EAX,dword ptr [RAX + RCX*0x4 + 0x5dd8]
LEA RCX,[0x1c5728]
MOV RCX,qword ptr [RCX]
MOVSXD RDX,dword ptr [RSP + 0xe4]
CMP EAX,dword ptr [RCX + RDX*0x4 + 0x130]
JL 0x001529e9
LEA RAX,[0x1c5750]
MOV RAX,qword ptr [RAX]
MOVSXD RCX,dword ptr [RSP + 0xe4]
CMP dword ptr [RAX + RCX*0x4 + 0xa74c],0x0
JZ 0x00152985
JMP 0x00152d48
LAB_00152985:
LEA RAX,[0x1c5750]
MOV RAX,qword ptr [RAX]
MOVSXD RCX,dword ptr [RSP + 0xe4]
MOV dword ptr [RAX + RCX*0x4 + 0xa74c],0x1
LEA RDI,[RSP + 0x20]
MOV EDX,dword ptr [RSP + 0xe4]
LEA RAX,[0x1c5728]
MOV RAX,qword ptr [RAX]
MOVSXD RCX,dword ptr [RSP + 0xe4]
MOV ECX,dword ptr [RAX + RCX*0x4 + 0x130]
LEA RSI,[0x198397]
MOV AL,0x0
CALL 0x00102050
LEA RSI,[RSP + 0x20]
MOV EDI,0x9c7
CALL 0x00152fc0
JMP 0x00152d48
LAB_001529e9:
LEA RAX,[0x1c5750]
MOV RAX,qword ptr [RAX]
MOVSXD RCX,dword ptr [RSP + 0xe4]
MOV EDX,dword ptr [RAX + RCX*0x4 + 0x5dd8]
ADD EDX,0x1
LEA RAX,[0x1c5750]
MOV RAX,qword ptr [RAX]
MOVSXD RCX,dword ptr [RSP + 0xe4]
MOV dword ptr [RAX + RCX*0x4 + 0x5dd8],EDX
LAB_00152a1e:
LEA RAX,[0x1c5750]
MOV RAX,qword ptr [RAX]
MOV ECX,dword ptr [RAX + 0x1bc]
ADD ECX,0x1
MOV dword ptr [RAX + 0x1bc],ECX
LEA RAX,[0x1c5728]
MOV RAX,qword ptr [RAX]
CMP qword ptr [RAX + 0x128],0x0
JZ 0x00152b1b
LEA RAX,[0x1c5750]
MOV RAX,qword ptr [RAX]
MOV RDI,qword ptr [RAX + 0x1800]
CALL 0x001020e0
MOV qword ptr [RSP + 0x8],RAX
MOV RDI,qword ptr [RSP + 0xd8]
CALL 0x001020e0
MOV RCX,RAX
MOV RAX,qword ptr [RSP + 0x8]
ADD RAX,RCX
MOV qword ptr [RSP + 0x10],RAX
LEA RAX,[0x1c5750]
MOV RAX,qword ptr [RAX]
MOV RDI,qword ptr [RAX + 0x38]
CALL 0x001020e0
MOV RDI,qword ptr [RSP + 0x10]
ADD RDI,RAX
ADD RDI,0x15e
CALL 0x0014f550
MOV qword ptr [RSP + 0x18],RAX
MOV RDI,qword ptr [RSP + 0x18]
MOV EDX,dword ptr [RSP + 0xe4]
MOV RCX,qword ptr [RSP + 0xd8]
LEA RAX,[0x1c5750]
MOV RAX,qword ptr [RAX]
MOV R8,qword ptr [RAX + 0x38]
LEA RAX,[0x1c5750]
MOV RAX,qword ptr [RAX]
MOV R9D,dword ptr [RAX + 0x1e4]
LEA RSI,[0x1983d9]
MOV AL,0x0
CALL 0x00102050
LEA RAX,[0x1c5728]
MOV RAX,qword ptr [RAX]
MOV RAX,qword ptr [RAX + 0x128]
MOV RDI,qword ptr [RSP + 0x18]
CALL RAX
MOV RDI,qword ptr [RSP + 0x18]
CALL 0x001022f0
JMP 0x00152d48
LAB_00152b1b:
LEA RAX,[0x1c5750]
MOV RAX,qword ptr [RAX]
CMP qword ptr [RAX + 0x8],0x0
JZ 0x00152b7b
LEA RAX,[0x1c5750]
MOV RAX,qword ptr [RAX]
MOV RDI,qword ptr [RAX + 0x8]
MOV EDX,dword ptr [RSP + 0xe4]
MOV RCX,qword ptr [RSP + 0xd8]
LEA RAX,[0x1c5750]
MOV RAX,qword ptr [RAX]
MOV R8,qword ptr [RAX + 0x38]
LEA RAX,[0x1c5750]
MOV RAX,qword ptr [RAX]
MOV R9D,dword ptr [RAX + 0x1e4]
LEA RSI,[0x198408]
MOV AL,0x0
CALL 0x00102370
JMP 0x00152d46
LAB_00152b7b:
LEA RAX,[0x1c5750]
MOV RAX,qword ptr [RAX]
CMP dword ptr [RAX + 0x134],0x0
JNZ 0x00152c78
LEA RDI,[0x198436]
LEA RSI,[0x1917e6]
CALL 0x001022e0
LEA RCX,[0x1c5750]
MOV RCX,qword ptr [RCX]
MOV qword ptr [RCX + 0x8],RAX
CMP RAX,0x0
JNZ 0x00152beb
XOR EAX,EAX
MOV EDI,EAX
MOV ESI,0x40
CALL 0x00102130
MOV RSI,RAX
LEA RDI,[0x198446]
MOV AL,0x0
CALL 0x00102030
LEA RDI,[0x19848e]
MOV AL,0x0
CALL 0x00102030
JMP 0x00152c73
LAB_00152beb:
LEA RAX,[0x1c5750]
MOV RAX,qword ptr [RAX]
MOV dword ptr [RAX + 0x134],0x1
LEA RAX,[0x1c5750]
MOV RAX,qword ptr [RAX]
MOV RDI,qword ptr [RAX + 0x8]
LEA RAX,[0x1c5750]
MOV RAX,qword ptr [RAX]
MOV RDX,qword ptr [RAX + 0x38]
LEA RSI,[0x1984b3]
MOV AL,0x0
CALL 0x00102370
LEA RAX,[0x1c5750]
MOV RAX,qword ptr [RAX]
MOV RDI,qword ptr [RAX + 0x8]
MOV EDX,dword ptr [RSP + 0xe4]
MOV RCX,qword ptr [RSP + 0xd8]
LEA RAX,[0x1c5750]
MOV RAX,qword ptr [RAX]
MOV R8,qword ptr [RAX + 0x38]
LEA RAX,[0x1c5750]
MOV RAX,qword ptr [RAX]
MOV R9D,dword ptr [RAX + 0x1e4]
LEA RSI,[0x198408]
MOV AL,0x0
CALL 0x00102370
LAB_00152c73:
JMP 0x00152d44
LAB_00152c78:
LEA RDI,[0x198436]
LEA RSI,[0x197007]
CALL 0x001022e0
LEA RCX,[0x1c5750]
MOV RCX,qword ptr [RCX]
MOV qword ptr [RCX + 0x8],RAX
CMP RAX,0x0
JNZ 0x00152cce
XOR EAX,EAX
MOV EDI,EAX
MOV ESI,0x40
CALL 0x00102130
MOV RSI,RAX
LEA RDI,[0x198446]
MOV AL,0x0
CALL 0x00102030
LEA RDI,[0x19848e]
MOV AL,0x0
CALL 0x00102030
JMP 0x00152d42
LAB_00152cce:
LEA RAX,[0x1c5750]
MOV RAX,qword ptr [RAX]
MOV RDI,qword ptr [RAX + 0x8]
LEA RAX,[0x1c5750]
MOV RAX,qword ptr [RAX]
MOV RDX,qword ptr [RAX + 0x38]
LEA RSI,[0x1984b2]
MOV AL,0x0
CALL 0x00102370
LEA RAX,[0x1c5750]
MOV RAX,qword ptr [RAX]
MOV RDI,qword ptr [RAX + 0x8]
MOV EDX,dword ptr [RSP + 0xe4]
MOV RCX,qword ptr [RSP + 0xd8]
LEA RAX,[0x1c5750]
MOV RAX,qword ptr [RAX]
MOV R8,qword ptr [RAX + 0x38]
LEA RAX,[0x1c5750]
MOV RAX,qword ptr [RAX]
MOV R9D,dword ptr [RAX + 0x1e4]
LEA RSI,[0x198408]
MOV AL,0x0
CALL 0x00102370
LAB_00152d42:
JMP 0x00152d44
LAB_00152d44:
JMP 0x00152d46
LAB_00152d46:
JMP 0x00152d48
LAB_00152d48:
ADD RSP,0xe8
RET
|
/* LefDefParser::lefInfo(int, char const*) */
void LefDefParser::lefInfo(int param_1,char *param_2)
{
size_t sVar1;
size_t sVar2;
size_t sVar3;
char *pcVar4;
FILE *pFVar5;
char local_c8 [112];
char local_58 [68];
int local_14;
char *local_10;
uint local_4;
local_10 = param_2;
local_4 = param_1;
local_14 = lefrSettings::suppresMsg(lefSettings,param_1);
if (local_14 == 1) {
sprintf(local_58,"Message (LEFPARS-%d) has been suppressed from output.",(ulong)local_4);
lefWarning(0x9c6,local_58);
}
else if ((local_14 != 2) &&
((*(int *)(lefSettings + 0xf0) < 1 ||
(*(int *)(lefData + 0x1bc) < *(int *)(lefSettings + 0xf0))))) {
if (0 < *(int *)(lefSettings + (long)(int)local_4 * 4 + 0x130)) {
if (*(int *)(lefSettings + (long)(int)local_4 * 4 + 0x130) <=
*(int *)(lefData + 0x5dd8 + (long)(int)local_4 * 4)) {
if (*(int *)(lefData + 0xa74c + (long)(int)local_4 * 4) != 0) {
return;
}
*(int4 *)(lefData + 0xa74c + (long)(int)local_4 * 4) = 1;
sprintf(local_c8,"Message (LEFPARS-%d) has exceeded the message display limit of %d",
(ulong)local_4,(ulong)*(uint *)(lefSettings + (long)(int)local_4 * 4 + 0x130));
lefWarning(0x9c7,local_c8);
return;
}
*(int *)(lefData + 0x5dd8 + (long)(int)local_4 * 4) =
*(int *)(lefData + 0x5dd8 + (long)(int)local_4 * 4) + 1;
}
*(int *)(lefData + 0x1bc) = *(int *)(lefData + 0x1bc) + 1;
if (*(long *)(lefSettings + 0x128) == 0) {
if (*(long *)(lefData + 8) == 0) {
if (*(int *)(lefData + 0x134) == 0) {
pFVar5 = fopen("lefRWarning.log","w");
*(FILE **)(lefData + 8) = pFVar5;
if (pFVar5 == (FILE *)0x0) {
pcVar4 = getcwd((char *)0x0,0x40);
printf("WARNING (LEFPARS-3500): Unable to open the file lefRWarning.log in %s.\n",pcVar4
);
printf("Info messages will not be printed.\n");
}
else {
*(int4 *)(lefData + 0x134) = 1;
fprintf(*(FILE **)(lefData + 8),"Info from file: %s\n\n",*(int8 *)(lefData + 0x38)
);
fprintf(*(FILE **)(lefData + 8),"INFO (LEFPARS-%d): %s See file %s at line %d\n",
(ulong)local_4,local_10,*(int8 *)(lefData + 0x38),
(ulong)*(uint *)(lefData + 0x1e4));
}
}
else {
pFVar5 = fopen("lefRWarning.log","a");
*(FILE **)(lefData + 8) = pFVar5;
if (pFVar5 == (FILE *)0x0) {
pcVar4 = getcwd((char *)0x0,0x40);
printf("WARNING (LEFPARS-3500): Unable to open the file lefRWarning.log in %s.\n",pcVar4
);
printf("Info messages will not be printed.\n");
}
else {
fprintf(*(FILE **)(lefData + 8),"\nInfo from file: %s\n\n",
*(int8 *)(lefData + 0x38));
fprintf(*(FILE **)(lefData + 8),"INFO (LEFPARS-%d): %s See file %s at line %d\n",
(ulong)local_4,local_10,*(int8 *)(lefData + 0x38),
(ulong)*(uint *)(lefData + 0x1e4));
}
}
}
else {
fprintf(*(FILE **)(lefData + 8),"INFO (LEFPARS-%d): %s See file %s at line %d\n",
(ulong)local_4,local_10,*(int8 *)(lefData + 0x38),
(ulong)*(uint *)(lefData + 0x1e4));
}
}
else {
sVar1 = strlen(*(char **)(lefData + 0x1800));
sVar2 = strlen(local_10);
sVar3 = strlen(*(char **)(lefData + 0x38));
pcVar4 = (char *)lefMalloc(sVar1 + sVar2 + sVar3 + 0x15e);
sprintf(pcVar4,"INFO (LEFPARS-%d): %s See file %s at line %d.\n",(ulong)local_4,local_10,
*(int8 *)(lefData + 0x38),(ulong)*(uint *)(lefData + 0x1e4));
(**(code **)(lefSettings + 0x128))(pcVar4);
free(pcVar4);
}
}
return;
}
|
|
64,241
|
mi_status
|
eloqsql/storage/myisam/mi_info.c
|
int mi_status(MI_INFO *info, register MI_ISAMINFO *x, uint flag)
{
MY_STAT state;
MYISAM_SHARE *share=info->s;
DBUG_ENTER("mi_status");
x->recpos = info->lastpos;
if (flag == HA_STATUS_POS)
DBUG_RETURN(0); /* Compatible with ISAM */
if (!(flag & HA_STATUS_NO_LOCK))
{
mysql_mutex_lock(&share->intern_lock);
(void) _mi_readinfo(info,F_RDLCK,0);
fast_mi_writeinfo(info);
mysql_mutex_unlock(&share->intern_lock);
}
if (flag & HA_STATUS_VARIABLE)
{
x->records = info->state->records;
x->deleted = info->state->del;
x->delete_length = info->state->empty;
x->data_file_length =info->state->data_file_length;
x->index_file_length=info->state->key_file_length;
x->keys = share->state.header.keys;
x->check_time = share->state.check_time;
x->mean_reclength= x->records ?
(ulong) ((x->data_file_length - x->delete_length) / x->records) :
(ulong) share->min_pack_length;
}
if (flag & HA_STATUS_ERRKEY)
{
x->errkey = info->errkey;
x->dupp_key_pos= info->dupp_key_pos;
}
if (flag & HA_STATUS_CONST)
{
x->reclength = share->base.reclength;
x->max_data_file_length=share->base.max_data_file_length;
x->max_index_file_length=info->s->base.max_key_file_length;
x->filenr = info->dfile;
x->options = share->options;
x->create_time=share->state.create_time;
x->reflength= mi_get_pointer_length(share->base.max_data_file_length,
myisam_data_pointer_size);
x->record_offset= ((share->options &
(HA_OPTION_PACK_RECORD | HA_OPTION_COMPRESS_RECORD)) ?
0L : share->base.pack_reclength);
x->sortkey= -1; /* No clustering */
x->rec_per_key = share->state.rec_per_key_part;
x->key_map = share->state.key_map;
x->data_file_name = share->data_file_name;
x->index_file_name = share->index_file_name;
}
if ((flag & HA_STATUS_TIME) && !mysql_file_fstat(info->dfile, &state, MYF(0)))
{
MSAN_STAT_WORKAROUND(&state);
x->update_time=state.st_mtime;
}
else
x->update_time=0;
if (flag & HA_STATUS_AUTO)
{
x->auto_increment= share->state.auto_increment+1;
if (!x->auto_increment) /* This shouldn't happen */
x->auto_increment= ~(ulonglong) 0;
}
DBUG_RETURN(0);
}
|
O0
|
c
|
mi_status:
pushq %rbp
movq %rsp, %rbp
subq $0xd0, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movl %edx, -0x1c(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq %rax, -0xb8(%rbp)
movq -0x10(%rbp), %rax
movq 0x170(%rax), %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x10(%rax)
cmpl $0x1, -0x1c(%rbp)
jne 0xad5eb
jmp 0xad5df
movl $0x0, -0x4(%rbp)
jmp 0xad982
movl -0x1c(%rbp), %eax
andl $0x2, %eax
cmpl $0x0, %eax
jne 0xad650
movq -0xb8(%rbp), %rdi
addq $0x480, %rdi # imm = 0x480
leaq 0xa5338(%rip), %rsi # 0x152943
movl $0x2e, %edx
callq 0xad990
movq -0x10(%rbp), %rdi
xorl %edx, %edx
movl %edx, %esi
callq 0xb06c0
movq -0x10(%rbp), %rax
movq (%rax), %rax
cmpl $0x0, 0x368(%rax)
jne 0xad63d
movq -0x10(%rbp), %rdi
xorl %esi, %esi
callq 0xb0820
movq -0xb8(%rbp), %rdi
addq $0x480, %rdi # imm = 0x480
callq 0xada00
movl -0x1c(%rbp), %eax
andl $0x10, %eax
cmpl $0x0, %eax
je 0xad73f
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movq (%rax), %rcx
movq -0x18(%rbp), %rax
movq %rcx, (%rax)
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movq 0x8(%rax), %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movq 0x10(%rax), %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x48(%rax)
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movq 0x28(%rax), %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x28(%rax)
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movq 0x20(%rax), %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x38(%rax)
movq -0xb8(%rbp), %rax
movzbl 0x12(%rax), %ecx
movq -0x18(%rbp), %rax
movl %ecx, 0x80(%rax)
movq -0xb8(%rbp), %rax
movq 0xe0(%rax), %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0xa0(%rax)
movq -0x18(%rbp), %rax
cmpq $0x0, (%rax)
je 0xad71b
movq -0x18(%rbp), %rax
movq 0x28(%rax), %rax
movq -0x18(%rbp), %rcx
subq 0x48(%rcx), %rax
movq -0x18(%rbp), %rcx
xorl %edx, %edx
divq (%rcx)
movq %rax, -0xc0(%rbp)
jmp 0xad730
movq -0xb8(%rbp), %rax
movq 0x320(%rax), %rax
movq %rax, -0xc0(%rbp)
movq -0xc0(%rbp), %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x58(%rax)
movl -0x1c(%rbp), %eax
andl $0x20, %eax
cmpl $0x0, %eax
je 0xad771
movq -0x10(%rbp), %rax
movl 0x1f0(%rax), %ecx
movq -0x18(%rbp), %rax
movl %ecx, 0x88(%rax)
movq -0x10(%rbp), %rax
movq 0x1a0(%rax), %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x20(%rax)
movl -0x1c(%rbp), %eax
andl $0x8, %eax
cmpl $0x0, %eax
je 0xad8e7
movq -0xb8(%rbp), %rax
movq 0x140(%rax), %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x50(%rax)
movq -0xb8(%rbp), %rax
movq 0x110(%rax), %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x30(%rax)
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq 0x118(%rax), %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x40(%rax)
movq -0x10(%rbp), %rax
movl 0x1c0(%rax), %ecx
movq -0x18(%rbp), %rax
movl %ecx, 0x90(%rax)
movq -0xb8(%rbp), %rax
movq 0x318(%rax), %rax
movl %eax, %ecx
movq -0x18(%rbp), %rax
movl %ecx, 0x84(%rax)
movq -0xb8(%rbp), %rax
movq 0xd0(%rax), %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x98(%rax)
movq -0xb8(%rbp), %rax
movq 0x110(%rax), %rdi
leaq 0x210992(%rip), %rax # 0x2be1b0
movq (%rax), %rax
movl %eax, %esi
callq 0xd8b80
movl %eax, %ecx
movq -0x18(%rbp), %rax
movl %ecx, 0xb0(%rax)
movq -0xb8(%rbp), %rax
movq 0x318(%rax), %rax
andq $0x5, %rax
cmpq $0x0, %rax
je 0xad857
xorl %eax, %eax
movq %rax, -0xc8(%rbp)
jmp 0xad86c
movq -0xb8(%rbp), %rax
movq 0x148(%rax), %rax
movq %rax, -0xc8(%rbp)
movq -0xc8(%rbp), %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0xb8(%rax)
movq -0x18(%rbp), %rax
movl $0xffffffff, 0x8c(%rax) # imm = 0xFFFFFFFF
movq -0xb8(%rbp), %rax
movq 0x88(%rax), %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0xc0(%rax)
movq -0xb8(%rbp), %rax
movq 0xc0(%rax), %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x68(%rax)
movq -0xb8(%rbp), %rax
movq 0x260(%rax), %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x70(%rax)
movq -0xb8(%rbp), %rax
movq 0x268(%rax), %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x78(%rax)
movl -0x1c(%rbp), %eax
andl $0x4, %eax
cmpl $0x0, %eax
je 0xad92f
movq -0x10(%rbp), %rax
movl 0x1c0(%rax), %edx
leaq 0xa5040(%rip), %rdi # 0x152943
movl $0x59, %esi
leaq -0xb0(%rbp), %rcx
xorl %eax, %eax
movl %eax, %r8d
callq 0xada60
cmpl $0x0, %eax
jne 0xad92f
movq -0x58(%rbp), %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0xa8(%rax)
jmp 0xad93e
movq -0x18(%rbp), %rax
movq $0x0, 0xa8(%rax)
movl -0x1c(%rbp), %eax
andl $0x40, %eax
cmpl $0x0, %eax
je 0xad979
movq -0xb8(%rbp), %rax
movq 0x60(%rax), %rcx
addq $0x1, %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x60(%rax)
movq -0x18(%rbp), %rax
cmpq $0x0, 0x60(%rax)
jne 0xad977
movq -0x18(%rbp), %rax
movq $-0x1, 0x60(%rax)
jmp 0xad979
jmp 0xad97b
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0xd0, %rsp
popq %rbp
retq
nop
|
mi_status:
push rbp
mov rbp, rsp
sub rsp, 0D0h
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov [rbp+var_1C], edx
mov rax, [rbp+var_10]
mov rax, [rax]
mov [rbp+var_B8], rax
mov rax, [rbp+var_10]
mov rcx, [rax+170h]
mov rax, [rbp+var_18]
mov [rax+10h], rcx
cmp [rbp+var_1C], 1
jnz short loc_AD5EB
jmp short $+2
loc_AD5DF:
mov [rbp+var_4], 0
jmp loc_AD982
loc_AD5EB:
mov eax, [rbp+var_1C]
and eax, 2
cmp eax, 0
jnz short loc_AD650
mov rdi, [rbp+var_B8]
add rdi, 480h
lea rsi, aWorkspaceLlm4b_26; "/workspace/llm4binary/github2025/eloqsq"...
mov edx, 2Eh ; '.'
call inline_mysql_mutex_lock_16
mov rdi, [rbp+var_10]
xor edx, edx
mov esi, edx
call _mi_readinfo
mov rax, [rbp+var_10]
mov rax, [rax]
cmp dword ptr [rax+368h], 0
jnz short loc_AD63D
mov rdi, [rbp+var_10]
xor esi, esi
call _mi_writeinfo
loc_AD63D:
mov rdi, [rbp+var_B8]
add rdi, 480h
call inline_mysql_mutex_unlock_17
loc_AD650:
mov eax, [rbp+var_1C]
and eax, 10h
cmp eax, 0
jz loc_AD73F
mov rax, [rbp+var_10]
mov rax, [rax+8]
mov rcx, [rax]
mov rax, [rbp+var_18]
mov [rax], rcx
mov rax, [rbp+var_10]
mov rax, [rax+8]
mov rcx, [rax+8]
mov rax, [rbp+var_18]
mov [rax+8], rcx
mov rax, [rbp+var_10]
mov rax, [rax+8]
mov rcx, [rax+10h]
mov rax, [rbp+var_18]
mov [rax+48h], rcx
mov rax, [rbp+var_10]
mov rax, [rax+8]
mov rcx, [rax+28h]
mov rax, [rbp+var_18]
mov [rax+28h], rcx
mov rax, [rbp+var_10]
mov rax, [rax+8]
mov rcx, [rax+20h]
mov rax, [rbp+var_18]
mov [rax+38h], rcx
mov rax, [rbp+var_B8]
movzx ecx, byte ptr [rax+12h]
mov rax, [rbp+var_18]
mov [rax+80h], ecx
mov rax, [rbp+var_B8]
mov rcx, [rax+0E0h]
mov rax, [rbp+var_18]
mov [rax+0A0h], rcx
mov rax, [rbp+var_18]
cmp qword ptr [rax], 0
jz short loc_AD71B
mov rax, [rbp+var_18]
mov rax, [rax+28h]
mov rcx, [rbp+var_18]
sub rax, [rcx+48h]
mov rcx, [rbp+var_18]
xor edx, edx
div qword ptr [rcx]
mov [rbp+var_C0], rax
jmp short loc_AD730
loc_AD71B:
mov rax, [rbp+var_B8]
mov rax, [rax+320h]
mov [rbp+var_C0], rax
loc_AD730:
mov rcx, [rbp+var_C0]
mov rax, [rbp+var_18]
mov [rax+58h], rcx
loc_AD73F:
mov eax, [rbp+var_1C]
and eax, 20h
cmp eax, 0
jz short loc_AD771
mov rax, [rbp+var_10]
mov ecx, [rax+1F0h]
mov rax, [rbp+var_18]
mov [rax+88h], ecx
mov rax, [rbp+var_10]
mov rcx, [rax+1A0h]
mov rax, [rbp+var_18]
mov [rax+20h], rcx
loc_AD771:
mov eax, [rbp+var_1C]
and eax, 8
cmp eax, 0
jz loc_AD8E7
mov rax, [rbp+var_B8]
mov rcx, [rax+140h]
mov rax, [rbp+var_18]
mov [rax+50h], rcx
mov rax, [rbp+var_B8]
mov rcx, [rax+110h]
mov rax, [rbp+var_18]
mov [rax+30h], rcx
mov rax, [rbp+var_10]
mov rax, [rax]
mov rcx, [rax+118h]
mov rax, [rbp+var_18]
mov [rax+40h], rcx
mov rax, [rbp+var_10]
mov ecx, [rax+1C0h]
mov rax, [rbp+var_18]
mov [rax+90h], ecx
mov rax, [rbp+var_B8]
mov rax, [rax+318h]
mov ecx, eax
mov rax, [rbp+var_18]
mov [rax+84h], ecx
mov rax, [rbp+var_B8]
mov rcx, [rax+0D0h]
mov rax, [rbp+var_18]
mov [rax+98h], rcx
mov rax, [rbp+var_B8]
mov rdi, [rax+110h]
lea rax, myisam_data_pointer_size
mov rax, [rax]
mov esi, eax
call mi_get_pointer_length
mov ecx, eax
mov rax, [rbp+var_18]
mov [rax+0B0h], ecx
mov rax, [rbp+var_B8]
mov rax, [rax+318h]
and rax, 5
cmp rax, 0
jz short loc_AD857
xor eax, eax
mov [rbp+var_C8], rax
jmp short loc_AD86C
loc_AD857:
mov rax, [rbp+var_B8]
mov rax, [rax+148h]
mov [rbp+var_C8], rax
loc_AD86C:
mov rcx, [rbp+var_C8]
mov rax, [rbp+var_18]
mov [rax+0B8h], rcx
mov rax, [rbp+var_18]
mov dword ptr [rax+8Ch], 0FFFFFFFFh
mov rax, [rbp+var_B8]
mov rcx, [rax+88h]
mov rax, [rbp+var_18]
mov [rax+0C0h], rcx
mov rax, [rbp+var_B8]
mov rcx, [rax+0C0h]
mov rax, [rbp+var_18]
mov [rax+68h], rcx
mov rax, [rbp+var_B8]
mov rcx, [rax+260h]
mov rax, [rbp+var_18]
mov [rax+70h], rcx
mov rax, [rbp+var_B8]
mov rcx, [rax+268h]
mov rax, [rbp+var_18]
mov [rax+78h], rcx
loc_AD8E7:
mov eax, [rbp+var_1C]
and eax, 4
cmp eax, 0
jz short loc_AD92F
mov rax, [rbp+var_10]
mov edx, [rax+1C0h]
lea rdi, aWorkspaceLlm4b_26; "/workspace/llm4binary/github2025/eloqsq"...
mov esi, 59h ; 'Y'
lea rcx, [rbp+var_B0]
xor eax, eax
mov r8d, eax
call inline_mysql_file_fstat
cmp eax, 0
jnz short loc_AD92F
mov rcx, [rbp+var_58]
mov rax, [rbp+var_18]
mov [rax+0A8h], rcx
jmp short loc_AD93E
loc_AD92F:
mov rax, [rbp+var_18]
mov qword ptr [rax+0A8h], 0
loc_AD93E:
mov eax, [rbp+var_1C]
and eax, 40h
cmp eax, 0
jz short loc_AD979
mov rax, [rbp+var_B8]
mov rcx, [rax+60h]
add rcx, 1
mov rax, [rbp+var_18]
mov [rax+60h], rcx
mov rax, [rbp+var_18]
cmp qword ptr [rax+60h], 0
jnz short loc_AD977
mov rax, [rbp+var_18]
mov qword ptr [rax+60h], 0FFFFFFFFFFFFFFFFh
loc_AD977:
jmp short $+2
loc_AD979:
jmp short $+2
loc_AD97B:
mov [rbp+var_4], 0
loc_AD982:
mov eax, [rbp+var_4]
add rsp, 0D0h
pop rbp
retn
|
long long mi_status(_QWORD *a1, long long a2, int a3)
{
long long v4; // [rsp+8h] [rbp-C8h]
long long v5; // [rsp+10h] [rbp-C0h]
long long v6; // [rsp+18h] [rbp-B8h]
_BYTE v7[88]; // [rsp+20h] [rbp-B0h] BYREF
long long v8; // [rsp+78h] [rbp-58h]
int v9; // [rsp+B4h] [rbp-1Ch]
long long v10; // [rsp+B8h] [rbp-18h]
_DWORD *v11; // [rsp+C0h] [rbp-10h]
v11 = a1;
v10 = a2;
v9 = a3;
v6 = *a1;
*(_QWORD *)(a2 + 16) = a1[46];
if ( v9 == 1 )
{
return 0;
}
else
{
if ( (v9 & 2) == 0 )
{
inline_mysql_mutex_lock_16(v6 + 1152, "/workspace/llm4binary/github2025/eloqsql/storage/myisam/mi_info.c", 46LL);
mi_readinfo(v11, 0LL, 0LL);
if ( !*(_DWORD *)(*(_QWORD *)v11 + 872LL) )
mi_writeinfo(v11, 0LL);
inline_mysql_mutex_unlock_17(v6 + 1152);
}
if ( (v9 & 0x10) != 0 )
{
*(_QWORD *)v10 = **((_QWORD **)v11 + 1);
*(_QWORD *)(v10 + 8) = *(_QWORD *)(*((_QWORD *)v11 + 1) + 8LL);
*(_QWORD *)(v10 + 72) = *(_QWORD *)(*((_QWORD *)v11 + 1) + 16LL);
*(_QWORD *)(v10 + 40) = *(_QWORD *)(*((_QWORD *)v11 + 1) + 40LL);
*(_QWORD *)(v10 + 56) = *(_QWORD *)(*((_QWORD *)v11 + 1) + 32LL);
*(_DWORD *)(v10 + 128) = *(unsigned __int8 *)(v6 + 18);
*(_QWORD *)(v10 + 160) = *(_QWORD *)(v6 + 224);
if ( *(_QWORD *)v10 )
v5 = (*(_QWORD *)(v10 + 40) - *(_QWORD *)(v10 + 72)) / *(_QWORD *)v10;
else
v5 = *(_QWORD *)(v6 + 800);
*(_QWORD *)(v10 + 88) = v5;
}
if ( (v9 & 0x20) != 0 )
{
*(_DWORD *)(v10 + 136) = v11[124];
*(_QWORD *)(v10 + 32) = *((_QWORD *)v11 + 52);
}
if ( (v9 & 8) != 0 )
{
*(_QWORD *)(v10 + 80) = *(_QWORD *)(v6 + 320);
*(_QWORD *)(v10 + 48) = *(_QWORD *)(v6 + 272);
*(_QWORD *)(v10 + 64) = *(_QWORD *)(*(_QWORD *)v11 + 280LL);
*(_DWORD *)(v10 + 144) = v11[112];
*(_DWORD *)(v10 + 132) = *(_QWORD *)(v6 + 792);
*(_QWORD *)(v10 + 152) = *(_QWORD *)(v6 + 208);
*(_DWORD *)(v10 + 176) = mi_get_pointer_length(*(_QWORD *)(v6 + 272), (unsigned int)myisam_data_pointer_size);
if ( (*(_QWORD *)(v6 + 792) & 5LL) != 0 )
v4 = 0LL;
else
v4 = *(_QWORD *)(v6 + 328);
*(_QWORD *)(v10 + 184) = v4;
*(_DWORD *)(v10 + 140) = -1;
*(_QWORD *)(v10 + 192) = *(_QWORD *)(v6 + 136);
*(_QWORD *)(v10 + 104) = *(_QWORD *)(v6 + 192);
*(_QWORD *)(v10 + 112) = *(_QWORD *)(v6 + 608);
*(_QWORD *)(v10 + 120) = *(_QWORD *)(v6 + 616);
}
if ( (v9 & 4) == 0
|| (unsigned int)inline_mysql_file_fstat(
"/workspace/llm4binary/github2025/eloqsql/storage/myisam/mi_info.c",
89LL,
(unsigned int)v11[112],
v7,
0LL) )
{
*(_QWORD *)(v10 + 168) = 0LL;
}
else
{
*(_QWORD *)(v10 + 168) = v8;
}
if ( (v9 & 0x40) != 0 )
{
*(_QWORD *)(v10 + 96) = *(_QWORD *)(v6 + 96) + 1LL;
if ( !*(_QWORD *)(v10 + 96) )
*(_QWORD *)(v10 + 96) = -1LL;
}
return 0;
}
}
|
mi_status:
PUSH RBP
MOV RBP,RSP
SUB RSP,0xd0
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x18],RSI
MOV dword ptr [RBP + -0x1c],EDX
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0xb8],RAX
MOV RAX,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RAX + 0x170]
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RAX + 0x10],RCX
CMP dword ptr [RBP + -0x1c],0x1
JNZ 0x001ad5eb
JMP 0x001ad5df
LAB_001ad5df:
MOV dword ptr [RBP + -0x4],0x0
JMP 0x001ad982
LAB_001ad5eb:
MOV EAX,dword ptr [RBP + -0x1c]
AND EAX,0x2
CMP EAX,0x0
JNZ 0x001ad650
MOV RDI,qword ptr [RBP + -0xb8]
ADD RDI,0x480
LEA RSI,[0x252943]
MOV EDX,0x2e
CALL 0x001ad990
MOV RDI,qword ptr [RBP + -0x10]
XOR EDX,EDX
MOV ESI,EDX
CALL 0x001b06c0
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX]
CMP dword ptr [RAX + 0x368],0x0
JNZ 0x001ad63d
MOV RDI,qword ptr [RBP + -0x10]
XOR ESI,ESI
CALL 0x001b0820
LAB_001ad63d:
MOV RDI,qword ptr [RBP + -0xb8]
ADD RDI,0x480
CALL 0x001ada00
LAB_001ad650:
MOV EAX,dword ptr [RBP + -0x1c]
AND EAX,0x10
CMP EAX,0x0
JZ 0x001ad73f
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x8]
MOV RCX,qword ptr [RAX]
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RAX],RCX
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x8]
MOV RCX,qword ptr [RAX + 0x8]
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RAX + 0x8],RCX
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x8]
MOV RCX,qword ptr [RAX + 0x10]
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RAX + 0x48],RCX
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x8]
MOV RCX,qword ptr [RAX + 0x28]
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RAX + 0x28],RCX
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x8]
MOV RCX,qword ptr [RAX + 0x20]
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RAX + 0x38],RCX
MOV RAX,qword ptr [RBP + -0xb8]
MOVZX ECX,byte ptr [RAX + 0x12]
MOV RAX,qword ptr [RBP + -0x18]
MOV dword ptr [RAX + 0x80],ECX
MOV RAX,qword ptr [RBP + -0xb8]
MOV RCX,qword ptr [RAX + 0xe0]
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RAX + 0xa0],RCX
MOV RAX,qword ptr [RBP + -0x18]
CMP qword ptr [RAX],0x0
JZ 0x001ad71b
MOV RAX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RAX + 0x28]
MOV RCX,qword ptr [RBP + -0x18]
SUB RAX,qword ptr [RCX + 0x48]
MOV RCX,qword ptr [RBP + -0x18]
XOR EDX,EDX
DIV qword ptr [RCX]
MOV qword ptr [RBP + -0xc0],RAX
JMP 0x001ad730
LAB_001ad71b:
MOV RAX,qword ptr [RBP + -0xb8]
MOV RAX,qword ptr [RAX + 0x320]
MOV qword ptr [RBP + -0xc0],RAX
LAB_001ad730:
MOV RCX,qword ptr [RBP + -0xc0]
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RAX + 0x58],RCX
LAB_001ad73f:
MOV EAX,dword ptr [RBP + -0x1c]
AND EAX,0x20
CMP EAX,0x0
JZ 0x001ad771
MOV RAX,qword ptr [RBP + -0x10]
MOV ECX,dword ptr [RAX + 0x1f0]
MOV RAX,qword ptr [RBP + -0x18]
MOV dword ptr [RAX + 0x88],ECX
MOV RAX,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RAX + 0x1a0]
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RAX + 0x20],RCX
LAB_001ad771:
MOV EAX,dword ptr [RBP + -0x1c]
AND EAX,0x8
CMP EAX,0x0
JZ 0x001ad8e7
MOV RAX,qword ptr [RBP + -0xb8]
MOV RCX,qword ptr [RAX + 0x140]
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RAX + 0x50],RCX
MOV RAX,qword ptr [RBP + -0xb8]
MOV RCX,qword ptr [RAX + 0x110]
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RAX + 0x30],RCX
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX]
MOV RCX,qword ptr [RAX + 0x118]
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RAX + 0x40],RCX
MOV RAX,qword ptr [RBP + -0x10]
MOV ECX,dword ptr [RAX + 0x1c0]
MOV RAX,qword ptr [RBP + -0x18]
MOV dword ptr [RAX + 0x90],ECX
MOV RAX,qword ptr [RBP + -0xb8]
MOV RAX,qword ptr [RAX + 0x318]
MOV ECX,EAX
MOV RAX,qword ptr [RBP + -0x18]
MOV dword ptr [RAX + 0x84],ECX
MOV RAX,qword ptr [RBP + -0xb8]
MOV RCX,qword ptr [RAX + 0xd0]
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RAX + 0x98],RCX
MOV RAX,qword ptr [RBP + -0xb8]
MOV RDI,qword ptr [RAX + 0x110]
LEA RAX,[0x3be1b0]
MOV RAX,qword ptr [RAX]
MOV ESI,EAX
CALL 0x001d8b80
MOV ECX,EAX
MOV RAX,qword ptr [RBP + -0x18]
MOV dword ptr [RAX + 0xb0],ECX
MOV RAX,qword ptr [RBP + -0xb8]
MOV RAX,qword ptr [RAX + 0x318]
AND RAX,0x5
CMP RAX,0x0
JZ 0x001ad857
XOR EAX,EAX
MOV qword ptr [RBP + -0xc8],RAX
JMP 0x001ad86c
LAB_001ad857:
MOV RAX,qword ptr [RBP + -0xb8]
MOV RAX,qword ptr [RAX + 0x148]
MOV qword ptr [RBP + -0xc8],RAX
LAB_001ad86c:
MOV RCX,qword ptr [RBP + -0xc8]
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RAX + 0xb8],RCX
MOV RAX,qword ptr [RBP + -0x18]
MOV dword ptr [RAX + 0x8c],0xffffffff
MOV RAX,qword ptr [RBP + -0xb8]
MOV RCX,qword ptr [RAX + 0x88]
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RAX + 0xc0],RCX
MOV RAX,qword ptr [RBP + -0xb8]
MOV RCX,qword ptr [RAX + 0xc0]
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RAX + 0x68],RCX
MOV RAX,qword ptr [RBP + -0xb8]
MOV RCX,qword ptr [RAX + 0x260]
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RAX + 0x70],RCX
MOV RAX,qword ptr [RBP + -0xb8]
MOV RCX,qword ptr [RAX + 0x268]
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RAX + 0x78],RCX
LAB_001ad8e7:
MOV EAX,dword ptr [RBP + -0x1c]
AND EAX,0x4
CMP EAX,0x0
JZ 0x001ad92f
MOV RAX,qword ptr [RBP + -0x10]
MOV EDX,dword ptr [RAX + 0x1c0]
LEA RDI,[0x252943]
MOV ESI,0x59
LEA RCX,[RBP + -0xb0]
XOR EAX,EAX
MOV R8D,EAX
CALL 0x001ada60
CMP EAX,0x0
JNZ 0x001ad92f
MOV RCX,qword ptr [RBP + -0x58]
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RAX + 0xa8],RCX
JMP 0x001ad93e
LAB_001ad92f:
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RAX + 0xa8],0x0
LAB_001ad93e:
MOV EAX,dword ptr [RBP + -0x1c]
AND EAX,0x40
CMP EAX,0x0
JZ 0x001ad979
MOV RAX,qword ptr [RBP + -0xb8]
MOV RCX,qword ptr [RAX + 0x60]
ADD RCX,0x1
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RAX + 0x60],RCX
MOV RAX,qword ptr [RBP + -0x18]
CMP qword ptr [RAX + 0x60],0x0
JNZ 0x001ad977
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RAX + 0x60],-0x1
LAB_001ad977:
JMP 0x001ad979
LAB_001ad979:
JMP 0x001ad97b
LAB_001ad97b:
MOV dword ptr [RBP + -0x4],0x0
LAB_001ad982:
MOV EAX,dword ptr [RBP + -0x4]
ADD RSP,0xd0
POP RBP
RET
|
int4 mi_status(long *param_1,ulong *param_2,ulong param_3)
{
long lVar1;
int4 uVar2;
int iVar3;
ulong extraout_RDX;
ulong local_d0;
ulong local_c8;
int1 local_b8 [88];
ulong local_60;
uint local_24;
ulong *local_20;
long *local_18;
local_24 = (uint)param_3;
lVar1 = *param_1;
param_2[2] = param_1[0x2e];
if (local_24 != 1) {
local_20 = param_2;
local_18 = param_1;
if ((param_3 & 2) == 0) {
inline_mysql_mutex_lock
(lVar1 + 0x480,"/workspace/llm4binary/github2025/eloqsql/storage/myisam/mi_info.c",
0x2e);
_mi_readinfo(local_18,0);
if (*(int *)(*local_18 + 0x368) == 0) {
_mi_writeinfo(local_18,0);
}
inline_mysql_mutex_unlock(lVar1 + 0x480);
param_3 = extraout_RDX;
}
if ((local_24 & 0x10) != 0) {
*local_20 = *(ulong *)local_18[1];
local_20[1] = *(ulong *)(local_18[1] + 8);
local_20[9] = *(ulong *)(local_18[1] + 0x10);
local_20[5] = *(ulong *)(local_18[1] + 0x28);
local_20[7] = *(ulong *)(local_18[1] + 0x20);
*(uint *)(local_20 + 0x10) = (uint)*(byte *)(lVar1 + 0x12);
local_20[0x14] = *(ulong *)(lVar1 + 0xe0);
if (*local_20 == 0) {
local_c8 = *(ulong *)(lVar1 + 800);
}
else {
local_c8 = (local_20[5] - local_20[9]) / *local_20;
param_3 = (local_20[5] - local_20[9]) % *local_20;
}
local_20[0xb] = local_c8;
}
if ((local_24 & 0x20) != 0) {
*(int *)(local_20 + 0x11) = (int)local_18[0x3e];
local_20[4] = local_18[0x34];
}
if ((local_24 & 8) != 0) {
local_20[10] = *(ulong *)(lVar1 + 0x140);
local_20[6] = *(ulong *)(lVar1 + 0x110);
local_20[8] = *(ulong *)(*local_18 + 0x118);
*(int *)(local_20 + 0x12) = (int)local_18[0x38];
*(int *)((long)local_20 + 0x84) = (int)*(int8 *)(lVar1 + 0x318);
local_20[0x13] = *(ulong *)(lVar1 + 0xd0);
uVar2 = mi_get_pointer_length
(*(int8 *)(lVar1 + 0x110),myisam_data_pointer_size & 0xffffffff,
param_3);
*(int4 *)(local_20 + 0x16) = uVar2;
if ((*(ulong *)(lVar1 + 0x318) & 5) == 0) {
local_d0 = *(ulong *)(lVar1 + 0x148);
}
else {
local_d0 = 0;
}
local_20[0x17] = local_d0;
*(int4 *)((long)local_20 + 0x8c) = 0xffffffff;
local_20[0x18] = *(ulong *)(lVar1 + 0x88);
local_20[0xd] = *(ulong *)(lVar1 + 0xc0);
local_20[0xe] = *(ulong *)(lVar1 + 0x260);
local_20[0xf] = *(ulong *)(lVar1 + 0x268);
}
if (((local_24 & 4) == 0) ||
(iVar3 = inline_mysql_file_fstat
("/workspace/llm4binary/github2025/eloqsql/storage/myisam/mi_info.c",0x59,
(int)local_18[0x38],local_b8,0), iVar3 != 0)) {
local_20[0x15] = 0;
}
else {
local_20[0x15] = local_60;
}
if (((local_24 & 0x40) != 0) &&
(local_20[0xc] = *(long *)(lVar1 + 0x60) + 1, local_20[0xc] == 0)) {
local_20[0xc] = 0xffffffffffffffff;
}
}
return 0;
}
|
|
64,242
|
google::protobuf::io::ArrayOutputStream::Next(void**, int*)
|
aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/io/zero_copy_stream_impl_lite.cc
|
bool ArrayOutputStream::Next(void** data, int* size) {
if (position_ < size_) {
last_returned_size_ = std::min(block_size_, size_ - position_);
*data = data_ + position_;
*size = last_returned_size_;
position_ += last_returned_size_;
return true;
} else {
// We're at the end of the array.
last_returned_size_ = 0; // Don't let caller back up.
return false;
}
}
|
O3
|
cpp
|
google::protobuf::io::ArrayOutputStream::Next(void**, int*):
movslq 0x18(%rdi), %rax
movl 0x10(%rdi), %ecx
cmpl %ecx, %eax
jge 0x7a945
movl %ecx, %r8d
subl %eax, %r8d
movl 0x14(%rdi), %r9d
cmpl %r9d, %r8d
cmovgel %r9d, %r8d
movl %r8d, 0x1c(%rdi)
movq 0x8(%rdi), %r9
addq %rax, %r9
movq %r9, (%rsi)
movl %r8d, (%rdx)
movl 0x1c(%rdi), %edx
addl %edx, 0x18(%rdi)
jmp 0x7a94c
movl $0x0, 0x1c(%rdi)
cmpl %ecx, %eax
setl %al
retq
|
_ZN6google8protobuf2io17ArrayOutputStream4NextEPPvPi:
movsxd rax, dword ptr [rdi+18h]
mov ecx, [rdi+10h]
cmp eax, ecx
jge short loc_7A945
mov r8d, ecx
sub r8d, eax
mov r9d, [rdi+14h]
cmp r8d, r9d
cmovge r8d, r9d
mov [rdi+1Ch], r8d
mov r9, [rdi+8]
add r9, rax
mov [rsi], r9
mov [rdx], r8d
mov edx, [rdi+1Ch]
add [rdi+18h], edx
jmp short loc_7A94C
loc_7A945:
mov dword ptr [rdi+1Ch], 0
loc_7A94C:
cmp eax, ecx
setl al
retn
|
bool google::protobuf::io::ArrayOutputStream::Next(
google::protobuf::io::ArrayOutputStream *this,
void **a2,
int *a3)
{
long long v3; // rax
int v4; // ecx
int v5; // r8d
v3 = *((int *)this + 6);
v4 = *((_DWORD *)this + 4);
if ( (int)v3 >= v4 )
{
*((_DWORD *)this + 7) = 0;
}
else
{
v5 = v4 - v3;
if ( v4 - (int)v3 >= *((_DWORD *)this + 5) )
v5 = *((_DWORD *)this + 5);
*((_DWORD *)this + 7) = v5;
*a2 = (void *)(v3 + *((_QWORD *)this + 1));
*a3 = v5;
*((_DWORD *)this + 6) += *((_DWORD *)this + 7);
}
return (int)v3 < v4;
}
|
Next:
MOVSXD RAX,dword ptr [RDI + 0x18]
MOV ECX,dword ptr [RDI + 0x10]
CMP EAX,ECX
JGE 0x0017a945
MOV R8D,ECX
SUB R8D,EAX
MOV R9D,dword ptr [RDI + 0x14]
CMP R8D,R9D
CMOVGE R8D,R9D
MOV dword ptr [RDI + 0x1c],R8D
MOV R9,qword ptr [RDI + 0x8]
ADD R9,RAX
MOV qword ptr [RSI],R9
MOV dword ptr [RDX],R8D
MOV EDX,dword ptr [RDI + 0x1c]
ADD dword ptr [RDI + 0x18],EDX
JMP 0x0017a94c
LAB_0017a945:
MOV dword ptr [RDI + 0x1c],0x0
LAB_0017a94c:
CMP EAX,ECX
SETL AL
RET
|
/* google::protobuf::io::ArrayOutputStream::Next(void**, int*) */
int8 __thiscall
google::protobuf::io::ArrayOutputStream::Next(ArrayOutputStream *this,void **param_1,int *param_2)
{
int iVar1;
int iVar2;
int iVar3;
iVar1 = *(int *)(this + 0x18);
iVar2 = *(int *)(this + 0x10);
if (iVar1 < iVar2) {
iVar3 = iVar2 - iVar1;
if (*(int *)(this + 0x14) <= iVar2 - iVar1) {
iVar3 = *(int *)(this + 0x14);
}
*(int *)(this + 0x1c) = iVar3;
*param_1 = (void *)(*(long *)(this + 8) + (long)iVar1);
*param_2 = iVar3;
*(int *)(this + 0x18) = *(int *)(this + 0x18) + *(int *)(this + 0x1c);
}
else {
*(int4 *)(this + 0x1c) = 0;
}
return CONCAT71((int7)(int3)((uint)iVar1 >> 8),iVar1 < iVar2);
}
|
|
64,243
|
mi_search
|
eloqsql/storage/myisam/mi_search.c
|
int _mi_search(register MI_INFO *info, register MI_KEYDEF *keyinfo,
uchar *key, uint key_len, uint nextflag, register my_off_t pos)
{
my_bool last_key;
int error,flag;
uint nod_flag;
uchar *keypos,*maxpos;
uchar lastkey[HA_MAX_KEY_BUFF],*buff;
DBUG_ENTER("_mi_search");
DBUG_PRINT("enter",("pos: %lu nextflag: %u lastpos: %lu",
(ulong) pos, nextflag, (ulong) info->lastpos));
DBUG_EXECUTE("key",_mi_print_key(DBUG_FILE,keyinfo->seg,key,key_len););
if (pos == HA_OFFSET_ERROR)
{
my_errno=HA_ERR_KEY_NOT_FOUND; /* Didn't find key */
info->lastpos= HA_OFFSET_ERROR;
if (!(nextflag & (SEARCH_SMALLER | SEARCH_BIGGER | SEARCH_LAST)))
DBUG_RETURN(-1); /* Not found ; return error */
DBUG_RETURN(1); /* Search at upper levels */
}
if (!(buff=_mi_fetch_keypage(info,keyinfo,pos,DFLT_INIT_HITS,info->buff,
MY_TEST(!(nextflag & SEARCH_SAVE_BUFF)))))
goto err;
DBUG_DUMP("page", buff, mi_getint(buff));
flag=(*keyinfo->bin_search)(info,keyinfo,buff,key,key_len,nextflag,
&keypos,lastkey, &last_key);
if (flag == MI_FOUND_WRONG_KEY)
{
my_errno= HA_ERR_CRASHED;
goto err;
}
nod_flag=mi_test_if_nod(buff);
maxpos=buff+mi_getint(buff)-1;
if (flag)
{
if ((error=_mi_search(info,keyinfo,key,key_len,nextflag,
_mi_kpos(nod_flag,keypos))) <= 0)
DBUG_RETURN(error);
if (flag >0)
{
if (nextflag & (SEARCH_SMALLER | SEARCH_LAST) &&
keypos == buff+2+nod_flag)
DBUG_RETURN(1); /* Bigger than key */
}
else if (nextflag & SEARCH_BIGGER && keypos >= maxpos)
DBUG_RETURN(1); /* Smaller than key */
}
else
{
if ((nextflag & SEARCH_FIND) && nod_flag &&
((keyinfo->flag & (HA_NOSAME | HA_NULL_PART)) != HA_NOSAME ||
key_len != USE_WHOLE_KEY))
{
if ((error=_mi_search(info,keyinfo,key,key_len,SEARCH_FIND,
_mi_kpos(nod_flag,keypos))) >= 0 ||
my_errno != HA_ERR_KEY_NOT_FOUND)
DBUG_RETURN(error);
info->last_keypage= HA_OFFSET_ERROR; /* Buffer not in mem */
}
}
if (pos != info->last_keypage)
{
uchar *old_buff=buff;
if (!(buff=_mi_fetch_keypage(info,keyinfo,pos,DFLT_INIT_HITS,info->buff,
MY_TEST(!(nextflag & SEARCH_SAVE_BUFF)))))
goto err;
keypos=buff+(keypos-old_buff);
maxpos=buff+(maxpos-old_buff);
}
if ((nextflag & (SEARCH_SMALLER | SEARCH_LAST)) && flag != 0)
{
uint not_used[2];
if (_mi_get_prev_key(info,keyinfo, buff, info->lastkey, keypos,
&info->lastkey_length))
goto err;
if (!(nextflag & SEARCH_SMALLER) &&
ha_key_cmp(keyinfo->seg, info->lastkey, key, key_len, SEARCH_FIND,
not_used))
{
my_errno=HA_ERR_KEY_NOT_FOUND; /* Didn't find key */
goto err;
}
}
else
{
info->lastkey_length=(*keyinfo->get_key)(keyinfo,nod_flag,&keypos,lastkey);
if (!info->lastkey_length)
goto err;
memcpy(info->lastkey,lastkey,info->lastkey_length);
}
info->lastpos=_mi_dpos(info,0,info->lastkey+info->lastkey_length);
/* Save position for a possible read next / previous */
info->int_keypos=info->buff+ (keypos-buff);
info->int_maxpos=info->buff+ (maxpos-buff);
info->int_nod_flag=nod_flag;
info->int_keytree_version=keyinfo->version;
info->last_search_keypage=info->last_keypage;
info->page_changed=0;
info->buff_used= (info->buff != buff); /* If we have to reread buff */
DBUG_PRINT("exit",("found key at %lu",(ulong) info->lastpos));
DBUG_RETURN(0);
err:
DBUG_PRINT("exit",("Error: %d",my_errno));
info->lastpos= HA_OFFSET_ERROR;
info->page_changed=1;
DBUG_RETURN (-1);
}
|
O3
|
c
|
mi_search:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x518, %rsp # imm = 0x518
movl %r8d, %r13d
movq %rdi, %rbx
movq %fs:0x28, %rax
movq %rax, -0x30(%rbp)
cmpq $-0x1, %r9
je 0x83d83
movq %r9, %r12
movq %rsi, %r14
movq %rdx, -0x530(%rbp)
movl %ecx, -0x4f8(%rbp)
movq 0x100(%rbx), %r8
xorl %r15d, %r15d
testb $0x20, %r13b
sete %r15b
movq %rbx, %rdi
movq %r9, %rdx
movl $0x3, %ecx
movl %r15d, %r9d
callq 0x838a4
testq %rax, %rax
je 0x83d69
movl %r13d, %r9d
movq %rax, %r13
subq $0x8, %rsp
leaq -0x515(%rbp), %rax
leaq -0x4f0(%rbp), %r10
leaq -0x510(%rbp), %r11
movq %rbx, %rdi
movq %r14, %rsi
movq %r13, %rdx
movq -0x530(%rbp), %rcx
movl -0x4f8(%rbp), %r8d
movl %r9d, -0x4f4(%rbp)
pushq %rax
pushq %r10
pushq %r11
callq *0x40(%r14)
addq $0x20, %rsp
cmpl $0x7fffffff, %eax # imm = 0x7FFFFFFF
jne 0x83dd6
callq 0xa16ee
movl $0x7e, (%rax)
movq $-0x1, 0x170(%rbx)
movb $0x1, 0x33c(%rbx)
movl $0xffffffff, %r14d # imm = 0xFFFFFFFF
jmp 0x83dae
callq 0xa16ee
movl $0x78, (%rax)
movq $-0x1, 0x170(%rbx)
andl $0x118, %r13d # imm = 0x118
xorl %r14d, %r14d
cmpl $0x1, %r13d
sbbl %r14d, %r14d
orl $0x1, %r14d
movq %fs:0x28, %rax
cmpq -0x30(%rbp), %rax
jne 0x84219
movl %r14d, %eax
addq $0x518, %rsp # imm = 0x518
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl %eax, %esi
movzbl (%r13), %eax
xorl %r8d, %r8d
testb %al, %al
movq %r13, %rdx
jns 0x83df1
movq (%rbx), %rcx
movl 0x17c(%rcx), %r8d
movzbl 0x1(%rdx), %ecx
andl $0x7f, %eax
shll $0x8, %eax
orq %rcx, %rax
addq %rdx, %rax
decq %rax
movq %rax, -0x528(%rbp)
testl %esi, %esi
movq %r14, -0x508(%rbp)
movl %r8d, -0x4fc(%rbp)
je 0x83eb7
movl %esi, %r13d
movq %rdx, -0x520(%rbp)
movq -0x510(%rbp), %rsi
movl %r8d, %edi
callq 0x8421e
movq %rbx, %rdi
movq %r14, %rsi
movq -0x530(%rbp), %rdx
movl -0x4f8(%rbp), %ecx
movl -0x4f4(%rbp), %r8d
movq %rax, %r9
callq 0x83c9f
testl %eax, %eax
jle 0x83f74
movq -0x510(%rbp), %rax
movl %r13d, %esi
testl %r13d, %r13d
jle 0x83f7c
movl -0x4f4(%rbp), %r9d
testl $0x110, %r9d # imm = 0x110
movq -0x520(%rbp), %rdx
movl -0x4fc(%rbp), %r8d
je 0x83faa
movl %r8d, %ecx
addq %rdx, %rcx
addq $0x2, %rcx
movl $0x1, %r14d
cmpq %rcx, %rax
je 0x83dae
jmp 0x83faa
testl %r8d, %r8d
setne %al
movl -0x4f4(%rbp), %r9d
andb %r9b, %al
cmpb $0x1, %al
jne 0x83faa
cmpl $0x970, -0x4f8(%rbp) # imm = 0x970
jne 0x83ef3
movq -0x508(%rbp), %rax
movzwl 0xa(%rax), %eax
andl $0x11, %eax
cmpw $0x1, %ax
je 0x83faa
movl %esi, -0x514(%rbp)
movq %rdx, -0x520(%rbp)
movq -0x510(%rbp), %rsi
movl %r8d, %edi
movl %r8d, %r13d
callq 0x8421e
movq %rbx, %rdi
movq -0x508(%rbp), %rsi
movq -0x530(%rbp), %rdx
movl -0x4f8(%rbp), %ecx
movl $0x1, %r8d
movq %rax, %r9
callq 0x83c9f
movl %eax, %r14d
testl %eax, %eax
jns 0x83dae
callq 0xa16ee
cmpl $0x78, (%rax)
movq -0x520(%rbp), %rdx
movl -0x4f4(%rbp), %r9d
movl -0x514(%rbp), %esi
jne 0x83dae
movl %r13d, %r8d
movq $-0x1, 0x190(%rbx)
jmp 0x83faa
movl %eax, %r14d
jmp 0x83dae
movl -0x4f4(%rbp), %r9d
testb $0x8, %r9b
movq -0x520(%rbp), %rdx
movl -0x4fc(%rbp), %r8d
je 0x83faa
movl $0x1, %r14d
cmpq -0x528(%rbp), %rax
jae 0x83dae
cmpq %r12, 0x190(%rbx)
jne 0x83fbc
movq -0x508(%rbp), %r14
jmp 0x84031
movl %esi, -0x514(%rbp)
movq 0x100(%rbx), %r8
movq %rbx, %rdi
movq -0x508(%rbp), %r14
movq %r14, %rsi
movq %rdx, %r13
movq %r12, %rdx
movl $0x3, %ecx
movl %r15d, %r9d
callq 0x838a4
testq %rax, %rax
je 0x83d69
movq -0x510(%rbp), %rcx
subq %r13, %rcx
addq %rax, %rcx
movq %rcx, -0x510(%rbp)
movq -0x528(%rbp), %rcx
subq %r13, %rcx
addq %rax, %rcx
movq %rcx, -0x528(%rbp)
movq %rax, %rdx
movl -0x4fc(%rbp), %r8d
movl -0x4f4(%rbp), %r9d
movl -0x514(%rbp), %esi
testl $0x110, %r9d # imm = 0x110
movq %rdx, -0x520(%rbp)
je 0x840d9
testl %esi, %esi
je 0x840d9
xorl %r14d, %r14d
cmpb $0x0, (%rdx)
jns 0x8405f
movq (%rbx), %rax
movl 0x17c(%rax), %r14d
movq 0x108(%rbx), %r15
movq -0x510(%rbp), %r12
movq -0x508(%rbp), %rax
testb $0x28, 0xa(%rax)
je 0x84116
leal 0x2(%r14), %eax
addq %rdx, %rax
leaq -0x538(%rbp), %rcx
movq %rcx, %r13
movq %rax, (%rcx)
movb $0x0, (%r15)
cmpq %r12, -0x538(%rbp)
jae 0x84134
movq -0x508(%rbp), %rdi
movl %r14d, %esi
movq %r13, %rdx
movq %r15, %rcx
callq *0x48(%rdi)
movl %eax, 0x1d8(%rbx)
testl %eax, %eax
jne 0x84096
movq (%rbx), %rax
movq 0x268(%rax), %rsi
movl $0x7e, %edi
callq 0x7ab1a
jmp 0x83d5e
leaq -0x510(%rbp), %rdx
leaq -0x4f0(%rbp), %rcx
movq %r14, %rdi
movl %r8d, %esi
callq *0x48(%r14)
movl %eax, 0x1d8(%rbx)
testl %eax, %eax
je 0x83d69
movq 0x108(%rbx), %rdi
movl %eax, %edx
leaq -0x4f0(%rbp), %rsi
callq 0x29080
jmp 0x84182
movzwl 0x12(%rax), %edx
movl %edx, 0x1d8(%rbx)
subq %rdx, %r12
movl %r14d, %eax
subq %rax, %r12
movq %r15, %rdi
movq %r12, %rsi
callq 0x29120
testb $0x10, -0x4f4(%rbp)
jne 0x84182
movq -0x508(%rbp), %rax
movq 0x28(%rax), %rdi
movq 0x108(%rbx), %rsi
leaq -0x540(%rbp), %r9
movq -0x530(%rbp), %rdx
movl -0x4f8(%rbp), %ecx
movl $0x1, %r8d
callq 0x9e3ee
testl %eax, %eax
je 0x84182
callq 0xa16ee
movl $0x78, (%rax)
jmp 0x83d69
movl 0x1d8(%rbx), %edx
addq 0x108(%rbx), %rdx
xorl %r14d, %r14d
movq %rbx, %rdi
xorl %esi, %esi
callq 0x842fd
movq %rax, 0x170(%rbx)
movq -0x510(%rbp), %rax
movq -0x520(%rbp), %r13
subq %r13, %rax
movq 0x100(%rbx), %rcx
movq 0x190(%rbx), %rdx
addq %rcx, %rax
movq %rax, 0x128(%rbx)
movq -0x528(%rbp), %rax
subq %r13, %rax
addq %rcx, %rax
movq %rax, 0x130(%rbx)
movl -0x4fc(%rbp), %eax
movl %eax, 0x138(%rbx)
movq -0x508(%rbp), %rax
movl 0x1c(%rax), %eax
movl %eax, 0x13c(%rbx)
movq %rdx, 0x198(%rbx)
movb $0x0, 0x33c(%rbx)
cmpq %r13, %rcx
setne 0x33d(%rbx)
jmp 0x83dae
callq 0x29270
|
_mi_search:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 518h
mov r13d, r8d
mov rbx, rdi
mov rax, fs:28h
mov [rbp+var_30], rax
cmp r9, 0FFFFFFFFFFFFFFFFh
jz loc_83D83
mov r12, r9
mov r14, rsi
mov [rbp+var_530], rdx
mov [rbp+var_4F8], ecx
mov r8, [rbx+100h]
xor r15d, r15d
test r13b, 20h
setz r15b
mov rdi, rbx
mov rdx, r9
mov ecx, 3
mov r9d, r15d
call _mi_fetch_keypage
test rax, rax
jz short loc_83D69
mov r9d, r13d
mov r13, rax
sub rsp, 8
lea rax, [rbp+var_515]
lea r10, [rbp+var_4F0]
lea r11, [rbp+var_510]
mov rdi, rbx
mov rsi, r14
mov rdx, r13
mov rcx, [rbp+var_530]
mov r8d, [rbp+var_4F8]
mov [rbp+var_4F4], r9d
push rax
push r10
push r11
call qword ptr [r14+40h]
add rsp, 20h
cmp eax, 7FFFFFFFh
jnz short loc_83DD6
loc_83D5E:
call _my_thread_var
mov dword ptr [rax], 7Eh ; '~'
loc_83D69:
mov qword ptr [rbx+170h], 0FFFFFFFFFFFFFFFFh
mov byte ptr [rbx+33Ch], 1
mov r14d, 0FFFFFFFFh
jmp short loc_83DAE
loc_83D83:
call _my_thread_var
mov dword ptr [rax], 78h ; 'x'
mov qword ptr [rbx+170h], 0FFFFFFFFFFFFFFFFh
and r13d, 118h
xor r14d, r14d
cmp r13d, 1
sbb r14d, r14d
or r14d, 1
loc_83DAE:
mov rax, fs:28h
cmp rax, [rbp+var_30]
jnz loc_84219
mov eax, r14d
add rsp, 518h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_83DD6:
mov esi, eax
movzx eax, byte ptr [r13+0]
xor r8d, r8d
test al, al
mov rdx, r13
jns short loc_83DF1
mov rcx, [rbx]
mov r8d, [rcx+17Ch]
loc_83DF1:
movzx ecx, byte ptr [rdx+1]
and eax, 7Fh
shl eax, 8
or rax, rcx
add rax, rdx
dec rax
mov [rbp+var_528], rax
test esi, esi
mov [rbp+var_508], r14
mov [rbp+var_4FC], r8d
jz loc_83EB7
mov r13d, esi
mov [rbp+var_520], rdx
mov rsi, [rbp+var_510]
mov edi, r8d
call _mi_kpos
mov rdi, rbx
mov rsi, r14
mov rdx, [rbp+var_530]
mov ecx, [rbp+var_4F8]
mov r8d, [rbp+var_4F4]
mov r9, rax
call _mi_search
test eax, eax
jle loc_83F74
mov rax, [rbp+var_510]
mov esi, r13d
test r13d, r13d
jle loc_83F7C
mov r9d, [rbp+var_4F4]
test r9d, 110h
mov rdx, [rbp+var_520]
mov r8d, [rbp+var_4FC]
jz loc_83FAA
mov ecx, r8d
add rcx, rdx
add rcx, 2
mov r14d, 1
cmp rax, rcx
jz loc_83DAE
jmp loc_83FAA
loc_83EB7:
test r8d, r8d
setnz al
mov r9d, [rbp+var_4F4]
and al, r9b
cmp al, 1
jnz loc_83FAA
cmp [rbp+var_4F8], 970h
jnz short loc_83EF3
mov rax, [rbp+var_508]
movzx eax, word ptr [rax+0Ah]
and eax, 11h
cmp ax, 1
jz loc_83FAA
loc_83EF3:
mov [rbp+var_514], esi
mov [rbp+var_520], rdx
mov rsi, [rbp+var_510]
mov edi, r8d
mov r13d, r8d
call _mi_kpos
mov rdi, rbx
mov rsi, [rbp+var_508]
mov rdx, [rbp+var_530]
mov ecx, [rbp+var_4F8]
mov r8d, 1
mov r9, rax
call _mi_search
mov r14d, eax
test eax, eax
jns loc_83DAE
call _my_thread_var
cmp dword ptr [rax], 78h ; 'x'
mov rdx, [rbp+var_520]
mov r9d, [rbp+var_4F4]
mov esi, [rbp+var_514]
jnz loc_83DAE
mov r8d, r13d
mov qword ptr [rbx+190h], 0FFFFFFFFFFFFFFFFh
jmp short loc_83FAA
loc_83F74:
mov r14d, eax
jmp loc_83DAE
loc_83F7C:
mov r9d, [rbp+var_4F4]
test r9b, 8
mov rdx, [rbp+var_520]
mov r8d, [rbp+var_4FC]
jz short loc_83FAA
mov r14d, 1
cmp rax, [rbp+var_528]
jnb loc_83DAE
loc_83FAA:
cmp [rbx+190h], r12
jnz short loc_83FBC
mov r14, [rbp+var_508]
jmp short loc_84031
loc_83FBC:
mov [rbp+var_514], esi
mov r8, [rbx+100h]
mov rdi, rbx
mov r14, [rbp+var_508]
mov rsi, r14
mov r13, rdx
mov rdx, r12
mov ecx, 3
mov r9d, r15d
call _mi_fetch_keypage
test rax, rax
jz loc_83D69
mov rcx, [rbp+var_510]
sub rcx, r13
add rcx, rax
mov [rbp+var_510], rcx
mov rcx, [rbp+var_528]
sub rcx, r13
add rcx, rax
mov [rbp+var_528], rcx
mov rdx, rax
mov r8d, [rbp+var_4FC]
mov r9d, [rbp+var_4F4]
mov esi, [rbp+var_514]
loc_84031:
test r9d, 110h
mov [rbp+var_520], rdx
jz loc_840D9
test esi, esi
jz loc_840D9
xor r14d, r14d
cmp byte ptr [rdx], 0
jns short loc_8405F
mov rax, [rbx]
mov r14d, [rax+17Ch]
loc_8405F:
mov r15, [rbx+108h]
mov r12, [rbp+var_510]
mov rax, [rbp+var_508]
test byte ptr [rax+0Ah], 28h
jz loc_84116
lea eax, [r14+2]
add rax, rdx
lea rcx, [rbp+var_538]
mov r13, rcx
mov [rcx], rax
mov byte ptr [r15], 0
loc_84096:
cmp [rbp+var_538], r12
jnb loc_84134
mov rdi, [rbp+var_508]
mov esi, r14d
mov rdx, r13
mov rcx, r15
call qword ptr [rdi+48h]
mov [rbx+1D8h], eax
test eax, eax
jnz short loc_84096
mov rax, [rbx]
mov rsi, [rax+268h]
mov edi, 7Eh ; '~'
call mi_report_error
jmp loc_83D5E
loc_840D9:
lea rdx, [rbp+var_510]
lea rcx, [rbp+var_4F0]
mov rdi, r14
mov esi, r8d
call qword ptr [r14+48h]
mov [rbx+1D8h], eax
test eax, eax
jz loc_83D69
mov rdi, [rbx+108h]
mov edx, eax
lea rsi, [rbp+var_4F0]
call _memcpy
jmp short loc_84182
loc_84116:
movzx edx, word ptr [rax+12h]
mov [rbx+1D8h], edx
sub r12, rdx
mov eax, r14d
sub r12, rax
mov rdi, r15
mov rsi, r12
call _memmove
loc_84134:
test byte ptr [rbp+var_4F4], 10h
jnz short loc_84182
mov rax, [rbp+var_508]
mov rdi, [rax+28h]
mov rsi, [rbx+108h]
lea r9, [rbp+var_540]
mov rdx, [rbp+var_530]
mov ecx, [rbp+var_4F8]
mov r8d, 1
call ha_key_cmp
test eax, eax
jz short loc_84182
call _my_thread_var
mov dword ptr [rax], 78h ; 'x'
jmp loc_83D69
loc_84182:
mov edx, [rbx+1D8h]
add rdx, [rbx+108h]
xor r14d, r14d
mov rdi, rbx
xor esi, esi
call _mi_dpos
mov [rbx+170h], rax
mov rax, [rbp+var_510]
mov r13, [rbp+var_520]
sub rax, r13
mov rcx, [rbx+100h]
mov rdx, [rbx+190h]
add rax, rcx
mov [rbx+128h], rax
mov rax, [rbp+var_528]
sub rax, r13
add rax, rcx
mov [rbx+130h], rax
mov eax, [rbp+var_4FC]
mov [rbx+138h], eax
mov rax, [rbp+var_508]
mov eax, [rax+1Ch]
mov [rbx+13Ch], eax
mov [rbx+198h], rdx
mov byte ptr [rbx+33Ch], 0
cmp rcx, r13
setnz byte ptr [rbx+33Dh]
jmp loc_83DAE
loc_84219:
call ___stack_chk_fail
|
long long mi_search(long long a1, long long a2, long long a3, unsigned int a4, unsigned int a5, long long a6)
{
long long v7; // rbx
long long v9; // r14
char *keypage; // rax
long long v11; // r9
char *v12; // r13
int v13; // eax
unsigned int v14; // r14d
int v16; // esi
long long v17; // r8
char *v18; // rdx
int v19; // eax
__int16 v20; // r9
unsigned int v21; // r13d
const char *v22; // rsi
_DWORD *v23; // rax
long long v24; // r14
char *v25; // r13
char *v26; // rax
unsigned int v27; // r14d
_BYTE *v28; // r15
char *v29; // r12
int v30; // eax
unsigned int v31; // eax
long long v32; // rdx
long long v33; // rdi
const char *v34; // rsi
char *v35; // r13
char *v36; // rcx
long long v37; // rdx
char v38[8]; // [rsp+0h] [rbp-540h] BYREF
char *v39; // [rsp+8h] [rbp-538h] BYREF
long long v40; // [rsp+10h] [rbp-530h]
unsigned long long v41; // [rsp+18h] [rbp-528h]
char *v42; // [rsp+20h] [rbp-520h]
char v43; // [rsp+2Bh] [rbp-515h] BYREF
int v44; // [rsp+2Ch] [rbp-514h]
char *v45; // [rsp+30h] [rbp-510h] BYREF
long long v46; // [rsp+38h] [rbp-508h]
unsigned int v47; // [rsp+44h] [rbp-4FCh]
unsigned int v48; // [rsp+48h] [rbp-4F8h]
unsigned int v49; // [rsp+4Ch] [rbp-4F4h]
_BYTE v50[1216]; // [rsp+50h] [rbp-4F0h] BYREF
unsigned long long v51; // [rsp+510h] [rbp-30h]
v7 = a1;
v51 = __readfsqword(0x28u);
if ( a6 == -1 )
{
*(_DWORD *)my_thread_var(a1, (const char *)a2) = 120;
*(_QWORD *)(a1 + 368) = -1LL;
return (a5 & 0x118) == 0 ? -1 : 1;
}
v9 = a2;
v40 = a3;
v48 = a4;
keypage = mi_fetch_keypage((_QWORD *)a1, a2, a6);
if ( !keypage )
goto LABEL_5;
v11 = a5;
v12 = keypage;
v49 = v11;
v13 = (*(long long ( **)(long long, long long, char *, long long, _QWORD, long long, char **, _BYTE *, char *))(a2 + 64))(
a1,
a2,
keypage,
v40,
v48,
v11,
&v45,
v50,
&v43);
if ( v13 == 0x7FFFFFFF )
{
LABEL_4:
*(_DWORD *)my_thread_var(a1, (const char *)a2) = 126;
LABEL_5:
*(_QWORD *)(v7 + 368) = -1LL;
*(_BYTE *)(v7 + 828) = 1;
return (unsigned int)-1;
}
v16 = v13;
v17 = 0LL;
v18 = v12;
if ( *v12 < 0 )
v17 = *(unsigned int *)(*(_QWORD *)a1 + 380LL);
v41 = (unsigned long long)&v12[((unsigned __int8)v12[1] | (unsigned long long)((unsigned __int8)(*v12 & 0x7F) << 8)) - 1];
v46 = v9;
v47 = v17;
if ( !v13 )
{
v20 = v49;
if ( ((unsigned __int8)v49 & ((_DWORD)v17 != 0)) == 1 && (v48 != 2416 || (*(_WORD *)(v46 + 10) & 0x11) != 1) )
{
v44 = 0;
v42 = v12;
v21 = v17;
mi_kpos((unsigned int)v17, v45);
v22 = (const char *)v46;
v14 = mi_search(a1, v46, v40, v48, 1LL);
if ( (v14 & 0x80000000) != 0 )
{
v23 = (_DWORD *)my_thread_var(a1, v22);
v18 = v42;
v20 = v49;
v16 = v44;
if ( *v23 == 120 )
{
v17 = v21;
*(_QWORD *)(a1 + 400) = -1LL;
goto LABEL_25;
}
}
return v14;
}
LABEL_25:
if ( *(_QWORD *)(a1 + 400) == a6 )
{
v24 = v46;
}
else
{
v44 = v16;
v24 = v46;
v25 = v18;
v26 = mi_fetch_keypage((_QWORD *)a1, v46, a6);
if ( !v26 )
goto LABEL_5;
v45 = &v26[v45 - v25];
v41 = (unsigned long long)&v26[v41 - (_QWORD)v25];
v18 = v26;
v17 = v47;
v20 = v49;
v16 = v44;
}
v42 = v18;
if ( (v20 & 0x110) != 0 && v16 )
{
v27 = 0;
if ( *v18 < 0 )
v27 = *(_DWORD *)(*(_QWORD *)a1 + 380LL);
v28 = *(_BYTE **)(a1 + 264);
v29 = v45;
if ( (*(_BYTE *)(v46 + 10) & 0x28) != 0 )
{
v39 = &v18[v27 + 2];
*v28 = 0;
while ( v39 < v29 )
{
v30 = (*(long long ( **)(long long, _QWORD, char **, _BYTE *, long long))(v46 + 72))(
v46,
v27,
&v39,
v28,
v17);
*(_DWORD *)(a1 + 472) = v30;
if ( !v30 )
{
a2 = *(_QWORD *)(*(_QWORD *)a1 + 616LL);
a1 = 126LL;
mi_report_error(126, a2);
goto LABEL_4;
}
}
}
else
{
v32 = *(unsigned __int16 *)(v46 + 18);
*(_DWORD *)(a1 + 472) = v32;
memmove(v28, &v29[-v32 - v27], v32);
}
if ( (v49 & 0x10) == 0 )
{
v33 = *(_QWORD *)(v46 + 40);
v34 = *(const char **)(v7 + 264);
if ( (unsigned int)ha_key_cmp(v33, v34, v40, v48, 1LL, v38) )
{
*(_DWORD *)my_thread_var(v33, v34) = 120;
goto LABEL_5;
}
}
}
else
{
v31 = (*(long long ( **)(long long, _QWORD, char **, _BYTE *))(v24 + 72))(v24, (unsigned int)v17, &v45, v50);
*(_DWORD *)(a1 + 472) = v31;
if ( !v31 )
goto LABEL_5;
memcpy(*(_QWORD *)(a1 + 264), v50, v31);
}
v14 = 0;
*(_QWORD *)(v7 + 368) = mi_dpos(v7, 0LL, *(_QWORD *)(v7 + 264) + *(unsigned int *)(v7 + 472));
v35 = v42;
v36 = *(char **)(v7 + 256);
v37 = *(_QWORD *)(v7 + 400);
*(_QWORD *)(v7 + 296) = &v36[v45 - v42];
*(_QWORD *)(v7 + 304) = &v36[v41 - (_QWORD)v35];
*(_DWORD *)(v7 + 312) = v47;
*(_DWORD *)(v7 + 316) = *(_DWORD *)(v46 + 28);
*(_QWORD *)(v7 + 408) = v37;
*(_BYTE *)(v7 + 828) = 0;
*(_BYTE *)(v7 + 829) = v36 != v35;
return v14;
}
v42 = v12;
mi_kpos((unsigned int)v17, v45);
v19 = mi_search(a1, v9, v40, v48, v49);
if ( v19 <= 0 )
return (unsigned int)v19;
if ( v16 <= 0 )
{
v20 = v49;
v18 = v42;
v17 = v47;
if ( (v49 & 8) != 0 )
{
v14 = 1;
if ( (unsigned long long)v45 >= v41 )
return v14;
}
goto LABEL_25;
}
v20 = v49;
v18 = v42;
v17 = v47;
if ( (v49 & 0x110) == 0 )
goto LABEL_25;
v14 = 1;
if ( v45 != &v42[v47 + 2] )
goto LABEL_25;
return v14;
}
|
_mi_search:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x518
MOV R13D,R8D
MOV RBX,RDI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x30],RAX
CMP R9,-0x1
JZ 0x00183d83
MOV R12,R9
MOV R14,RSI
MOV qword ptr [RBP + -0x530],RDX
MOV dword ptr [RBP + -0x4f8],ECX
MOV R8,qword ptr [RBX + 0x100]
XOR R15D,R15D
TEST R13B,0x20
SETZ R15B
MOV RDI,RBX
MOV RDX,R9
MOV ECX,0x3
MOV R9D,R15D
CALL 0x001838a4
TEST RAX,RAX
JZ 0x00183d69
MOV R9D,R13D
MOV R13,RAX
SUB RSP,0x8
LEA RAX,[RBP + -0x515]
LEA R10,[RBP + -0x4f0]
LEA R11,[RBP + -0x510]
MOV RDI,RBX
MOV RSI,R14
MOV RDX,R13
MOV RCX,qword ptr [RBP + -0x530]
MOV R8D,dword ptr [RBP + -0x4f8]
MOV dword ptr [RBP + -0x4f4],R9D
PUSH RAX
PUSH R10
PUSH R11
CALL qword ptr [R14 + 0x40]
ADD RSP,0x20
CMP EAX,0x7fffffff
JNZ 0x00183dd6
LAB_00183d5e:
CALL 0x001a16ee
MOV dword ptr [RAX],0x7e
LAB_00183d69:
MOV qword ptr [RBX + 0x170],-0x1
MOV byte ptr [RBX + 0x33c],0x1
MOV R14D,0xffffffff
JMP 0x00183dae
LAB_00183d83:
CALL 0x001a16ee
MOV dword ptr [RAX],0x78
MOV qword ptr [RBX + 0x170],-0x1
AND R13D,0x118
XOR R14D,R14D
CMP R13D,0x1
SBB R14D,R14D
OR R14D,0x1
LAB_00183dae:
MOV RAX,qword ptr FS:[0x28]
CMP RAX,qword ptr [RBP + -0x30]
JNZ 0x00184219
MOV EAX,R14D
ADD RSP,0x518
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_00183dd6:
MOV ESI,EAX
MOVZX EAX,byte ptr [R13]
XOR R8D,R8D
TEST AL,AL
MOV RDX,R13
JNS 0x00183df1
MOV RCX,qword ptr [RBX]
MOV R8D,dword ptr [RCX + 0x17c]
LAB_00183df1:
MOVZX ECX,byte ptr [RDX + 0x1]
AND EAX,0x7f
SHL EAX,0x8
OR RAX,RCX
ADD RAX,RDX
DEC RAX
MOV qword ptr [RBP + -0x528],RAX
TEST ESI,ESI
MOV qword ptr [RBP + -0x508],R14
MOV dword ptr [RBP + -0x4fc],R8D
JZ 0x00183eb7
MOV R13D,ESI
MOV qword ptr [RBP + -0x520],RDX
MOV RSI,qword ptr [RBP + -0x510]
MOV EDI,R8D
CALL 0x0018421e
MOV RDI,RBX
MOV RSI,R14
MOV RDX,qword ptr [RBP + -0x530]
MOV ECX,dword ptr [RBP + -0x4f8]
MOV R8D,dword ptr [RBP + -0x4f4]
MOV R9,RAX
CALL 0x00183c9f
TEST EAX,EAX
JLE 0x00183f74
MOV RAX,qword ptr [RBP + -0x510]
MOV ESI,R13D
TEST R13D,R13D
JLE 0x00183f7c
MOV R9D,dword ptr [RBP + -0x4f4]
TEST R9D,0x110
MOV RDX,qword ptr [RBP + -0x520]
MOV R8D,dword ptr [RBP + -0x4fc]
JZ 0x00183faa
MOV ECX,R8D
ADD RCX,RDX
ADD RCX,0x2
MOV R14D,0x1
CMP RAX,RCX
JZ 0x00183dae
JMP 0x00183faa
LAB_00183eb7:
TEST R8D,R8D
SETNZ AL
MOV R9D,dword ptr [RBP + -0x4f4]
AND AL,R9B
CMP AL,0x1
JNZ 0x00183faa
CMP dword ptr [RBP + -0x4f8],0x970
JNZ 0x00183ef3
MOV RAX,qword ptr [RBP + -0x508]
MOVZX EAX,word ptr [RAX + 0xa]
AND EAX,0x11
CMP AX,0x1
JZ 0x00183faa
LAB_00183ef3:
MOV dword ptr [RBP + -0x514],ESI
MOV qword ptr [RBP + -0x520],RDX
MOV RSI,qword ptr [RBP + -0x510]
MOV EDI,R8D
MOV R13D,R8D
CALL 0x0018421e
MOV RDI,RBX
MOV RSI,qword ptr [RBP + -0x508]
MOV RDX,qword ptr [RBP + -0x530]
MOV ECX,dword ptr [RBP + -0x4f8]
MOV R8D,0x1
MOV R9,RAX
CALL 0x00183c9f
MOV R14D,EAX
TEST EAX,EAX
JNS 0x00183dae
CALL 0x001a16ee
CMP dword ptr [RAX],0x78
MOV RDX,qword ptr [RBP + -0x520]
MOV R9D,dword ptr [RBP + -0x4f4]
MOV ESI,dword ptr [RBP + -0x514]
JNZ 0x00183dae
MOV R8D,R13D
MOV qword ptr [RBX + 0x190],-0x1
JMP 0x00183faa
LAB_00183f74:
MOV R14D,EAX
JMP 0x00183dae
LAB_00183f7c:
MOV R9D,dword ptr [RBP + -0x4f4]
TEST R9B,0x8
MOV RDX,qword ptr [RBP + -0x520]
MOV R8D,dword ptr [RBP + -0x4fc]
JZ 0x00183faa
MOV R14D,0x1
CMP RAX,qword ptr [RBP + -0x528]
JNC 0x00183dae
LAB_00183faa:
CMP qword ptr [RBX + 0x190],R12
JNZ 0x00183fbc
MOV R14,qword ptr [RBP + -0x508]
JMP 0x00184031
LAB_00183fbc:
MOV dword ptr [RBP + -0x514],ESI
MOV R8,qword ptr [RBX + 0x100]
MOV RDI,RBX
MOV R14,qword ptr [RBP + -0x508]
MOV RSI,R14
MOV R13,RDX
MOV RDX,R12
MOV ECX,0x3
MOV R9D,R15D
CALL 0x001838a4
TEST RAX,RAX
JZ 0x00183d69
MOV RCX,qword ptr [RBP + -0x510]
SUB RCX,R13
ADD RCX,RAX
MOV qword ptr [RBP + -0x510],RCX
MOV RCX,qword ptr [RBP + -0x528]
SUB RCX,R13
ADD RCX,RAX
MOV qword ptr [RBP + -0x528],RCX
MOV RDX,RAX
MOV R8D,dword ptr [RBP + -0x4fc]
MOV R9D,dword ptr [RBP + -0x4f4]
MOV ESI,dword ptr [RBP + -0x514]
LAB_00184031:
TEST R9D,0x110
MOV qword ptr [RBP + -0x520],RDX
JZ 0x001840d9
TEST ESI,ESI
JZ 0x001840d9
XOR R14D,R14D
CMP byte ptr [RDX],0x0
JNS 0x0018405f
MOV RAX,qword ptr [RBX]
MOV R14D,dword ptr [RAX + 0x17c]
LAB_0018405f:
MOV R15,qword ptr [RBX + 0x108]
MOV R12,qword ptr [RBP + -0x510]
MOV RAX,qword ptr [RBP + -0x508]
TEST byte ptr [RAX + 0xa],0x28
JZ 0x00184116
LEA EAX,[R14 + 0x2]
ADD RAX,RDX
LEA RCX,[RBP + -0x538]
MOV R13,RCX
MOV qword ptr [RCX],RAX
MOV byte ptr [R15],0x0
LAB_00184096:
CMP qword ptr [RBP + -0x538],R12
JNC 0x00184134
MOV RDI,qword ptr [RBP + -0x508]
MOV ESI,R14D
MOV RDX,R13
MOV RCX,R15
CALL qword ptr [RDI + 0x48]
MOV dword ptr [RBX + 0x1d8],EAX
TEST EAX,EAX
JNZ 0x00184096
MOV RAX,qword ptr [RBX]
MOV RSI,qword ptr [RAX + 0x268]
MOV EDI,0x7e
CALL 0x0017ab1a
JMP 0x00183d5e
LAB_001840d9:
LEA RDX,[RBP + -0x510]
LEA RCX,[RBP + -0x4f0]
MOV RDI,R14
MOV ESI,R8D
CALL qword ptr [R14 + 0x48]
MOV dword ptr [RBX + 0x1d8],EAX
TEST EAX,EAX
JZ 0x00183d69
MOV RDI,qword ptr [RBX + 0x108]
MOV EDX,EAX
LEA RSI,[RBP + -0x4f0]
CALL 0x00129080
JMP 0x00184182
LAB_00184116:
MOVZX EDX,word ptr [RAX + 0x12]
MOV dword ptr [RBX + 0x1d8],EDX
SUB R12,RDX
MOV EAX,R14D
SUB R12,RAX
MOV RDI,R15
MOV RSI,R12
CALL 0x00129120
LAB_00184134:
TEST byte ptr [RBP + -0x4f4],0x10
JNZ 0x00184182
MOV RAX,qword ptr [RBP + -0x508]
MOV RDI,qword ptr [RAX + 0x28]
MOV RSI,qword ptr [RBX + 0x108]
LEA R9,[RBP + -0x540]
MOV RDX,qword ptr [RBP + -0x530]
MOV ECX,dword ptr [RBP + -0x4f8]
MOV R8D,0x1
CALL 0x0019e3ee
TEST EAX,EAX
JZ 0x00184182
CALL 0x001a16ee
MOV dword ptr [RAX],0x78
JMP 0x00183d69
LAB_00184182:
MOV EDX,dword ptr [RBX + 0x1d8]
ADD RDX,qword ptr [RBX + 0x108]
XOR R14D,R14D
MOV RDI,RBX
XOR ESI,ESI
CALL 0x001842fd
MOV qword ptr [RBX + 0x170],RAX
MOV RAX,qword ptr [RBP + -0x510]
MOV R13,qword ptr [RBP + -0x520]
SUB RAX,R13
MOV RCX,qword ptr [RBX + 0x100]
MOV RDX,qword ptr [RBX + 0x190]
ADD RAX,RCX
MOV qword ptr [RBX + 0x128],RAX
MOV RAX,qword ptr [RBP + -0x528]
SUB RAX,R13
ADD RAX,RCX
MOV qword ptr [RBX + 0x130],RAX
MOV EAX,dword ptr [RBP + -0x4fc]
MOV dword ptr [RBX + 0x138],EAX
MOV RAX,qword ptr [RBP + -0x508]
MOV EAX,dword ptr [RAX + 0x1c]
MOV dword ptr [RBX + 0x13c],EAX
MOV qword ptr [RBX + 0x198],RDX
MOV byte ptr [RBX + 0x33c],0x0
CMP RCX,R13
SETNZ byte ptr [RBX + 0x33d]
JMP 0x00183dae
LAB_00184219:
CALL 0x00129270
|
uint _mi_search(long *param_1,long param_2,int8 param_3,int param_4,uint param_5,long param_6)
{
ushort uVar1;
int1 *__dest;
int iVar2;
uint uVar3;
byte *pbVar4;
int4 *puVar5;
int8 uVar6;
int *piVar7;
byte *pbVar8;
long lVar9;
ulong uVar10;
long in_FS_OFFSET;
bool bVar11;
int1 local_548 [8];
byte *local_540;
int8 local_538;
byte *local_530;
byte *local_528;
int1 local_51d;
int local_51c;
byte *local_518;
long local_510;
uint local_504;
int local_500;
uint local_4fc;
int1 local_4f8 [1216];
long local_38;
local_38 = *(long *)(in_FS_OFFSET + 0x28);
if (param_6 == -1) {
puVar5 = (int4 *)_my_thread_var();
*puVar5 = 0x78;
param_1[0x2e] = -1;
uVar3 = -(uint)((param_5 & 0x118) == 0) | 1;
goto LAB_00183dae;
}
bVar11 = (param_5 & 0x20) == 0;
local_538 = param_3;
local_500 = param_4;
pbVar4 = (byte *)_mi_fetch_keypage(param_1,param_2,param_6,3,param_1[0x20],bVar11);
if (pbVar4 != (byte *)0x0) {
local_4fc = param_5;
iVar2 = (**(code **)(param_2 + 0x40))
(param_1,param_2,pbVar4,local_538,local_500,param_5,&local_518,local_4f8,
&local_51d);
if (iVar2 == 0x7fffffff) {
LAB_00183d5e:
puVar5 = (int4 *)_my_thread_var();
*puVar5 = 0x7e;
}
else {
uVar10 = 0;
if ((char)*pbVar4 < '\0') {
uVar10 = (ulong)*(uint *)(*param_1 + 0x17c);
}
local_530 = pbVar4 + (((ulong)((*pbVar4 & 0x7f) << 8) | (ulong)pbVar4[1]) - 1);
local_504 = (uint)uVar10;
local_510 = param_2;
if (iVar2 == 0) {
if (((local_504 != 0 & (byte)local_4fc) == 1) &&
((local_500 != 0x970 || ((*(ushort *)(param_2 + 10) & 0x11) != 1)))) {
local_528 = pbVar4;
local_51c = iVar2;
uVar6 = _mi_kpos(uVar10,local_518);
uVar3 = _mi_search(param_1,local_510,local_538,local_500,1,uVar6);
if ((-1 < (int)uVar3) || (piVar7 = (int *)_my_thread_var(), *piVar7 != 0x78))
goto LAB_00183dae;
param_1[0x32] = -1;
pbVar4 = local_528;
iVar2 = local_51c;
}
}
else {
local_528 = pbVar4;
uVar6 = _mi_kpos(uVar10,local_518);
uVar3 = _mi_search(param_1,param_2,local_538,local_500,local_4fc,uVar6);
if ((int)uVar3 < 1) goto LAB_00183dae;
pbVar4 = local_528;
if (iVar2 < 1) {
uVar10 = (ulong)local_504;
if (((local_4fc & 8) != 0) && (uVar3 = 1, local_530 <= local_518)) goto LAB_00183dae;
}
else {
uVar10 = (ulong)local_504;
if (((local_4fc & 0x110) != 0) && (uVar3 = 1, local_518 == local_528 + uVar10 + 2))
goto LAB_00183dae;
}
}
lVar9 = local_510;
if (param_1[0x32] != param_6) {
local_51c = iVar2;
pbVar8 = (byte *)_mi_fetch_keypage(param_1,local_510,param_6,3,param_1[0x20],bVar11);
if (pbVar8 == (byte *)0x0) goto LAB_00183d69;
local_518 = pbVar8 + ((long)local_518 - (long)pbVar4);
local_530 = pbVar8 + ((long)local_530 - (long)pbVar4);
uVar10 = (ulong)local_504;
pbVar4 = pbVar8;
iVar2 = local_51c;
}
pbVar8 = local_518;
local_528 = pbVar4;
if (((local_4fc & 0x110) == 0) || (iVar2 == 0)) {
uVar3 = (**(code **)(lVar9 + 0x48))(lVar9,uVar10,&local_518,local_4f8);
*(uint *)(param_1 + 0x3b) = uVar3;
if (uVar3 != 0) {
memcpy((void *)param_1[0x21],local_4f8,(ulong)uVar3);
LAB_00184182:
uVar3 = 0;
lVar9 = _mi_dpos(param_1,0,(ulong)*(uint *)(param_1 + 0x3b) + param_1[0x21]);
param_1[0x2e] = lVar9;
pbVar4 = (byte *)param_1[0x20];
param_1[0x25] = (long)(pbVar4 + ((long)local_518 - (long)local_528));
param_1[0x26] = (long)(pbVar4 + ((long)local_530 - (long)local_528));
*(uint *)(param_1 + 0x27) = local_504;
*(int4 *)((long)param_1 + 0x13c) = *(int4 *)(local_510 + 0x1c);
param_1[0x33] = param_1[0x32];
*(int1 *)((long)param_1 + 0x33c) = 0;
*(bool *)((long)param_1 + 0x33d) = pbVar4 != local_528;
goto LAB_00183dae;
}
}
else {
uVar10 = 0;
if ((char)*pbVar4 < '\0') {
uVar10 = (ulong)*(uint *)(*param_1 + 0x17c);
}
__dest = (int1 *)param_1[0x21];
if ((*(byte *)(local_510 + 10) & 0x28) != 0) {
local_540 = pbVar4 + ((int)uVar10 + 2);
*__dest = 0;
do {
if (pbVar8 <= local_540) goto LAB_00184134;
iVar2 = (**(code **)(local_510 + 0x48))(local_510,uVar10,&local_540,__dest);
*(int *)(param_1 + 0x3b) = iVar2;
} while (iVar2 != 0);
mi_report_error(0x7e,*(int8 *)(*param_1 + 0x268));
goto LAB_00183d5e;
}
uVar1 = *(ushort *)(local_510 + 0x12);
*(uint *)(param_1 + 0x3b) = (uint)uVar1;
memmove(__dest,local_518 + (-uVar10 - (ulong)uVar1),(ulong)uVar1);
LAB_00184134:
if (((local_4fc & 0x10) != 0) ||
(iVar2 = ha_key_cmp(*(int8 *)(local_510 + 0x28),param_1[0x21],local_538,local_500,1
,local_548), iVar2 == 0)) goto LAB_00184182;
puVar5 = (int4 *)_my_thread_var();
*puVar5 = 0x78;
}
}
}
LAB_00183d69:
param_1[0x2e] = -1;
*(int1 *)((long)param_1 + 0x33c) = 1;
uVar3 = 0xffffffff;
LAB_00183dae:
if (*(long *)(in_FS_OFFSET + 0x28) != local_38) {
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
return uVar3;
}
|
|
64,244
|
my_fill_utf8mb3
|
eloqsql/strings/ctype-utf8.c
|
static void
my_fill_utf8mb3(CHARSET_INFO *cs, char *str, size_t length, int fill)
{
if (fill < 0x80)
my_fill_8bit(cs, str, length, fill);
else
my_fill_utf8mb3_mb(cs, str, length, fill);
}
|
O3
|
c
|
my_fill_utf8mb3:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdx, %r15
movq %rsi, %rbx
movq %fs:0x28, %rax
movq %rax, -0x30(%rbp)
cmpl $0x7f, %ecx
jg 0x57dbd
movq %fs:0x28, %rax
cmpq -0x30(%rbp), %rax
jne 0x57e41
movq %rbx, %rsi
movq %r15, %rdx
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x41e83
leaq (%rbx,%r15), %r14
movq 0xb8(%rdi), %rax
movl %ecx, %esi
leaq -0x30(%rbp), %rcx
leaq -0x3a(%rbp), %rdx
callq *0xd8(%rax)
movsbq %al, %r12
cmpq %r15, %r12
jle 0x57de6
movq %rbx, %r13
jmp 0x57e0b
movsbq %al, %r15
movq %rbx, %r13
movq %rbx, %rdi
leaq -0x3a(%rbp), %rsi
movq %r15, %rdx
callq 0x24290
addq %r12, %rbx
addq %r12, %r13
leaq (%rbx,%r12), %rax
cmpq %r14, %rax
jbe 0x57ded
cmpq %r14, %rbx
jae 0x57e23
subq %r13, %r14
movq %rbx, %rdi
movl $0x20, %esi
movq %r14, %rdx
callq 0x241e0
movq %fs:0x28, %rax
cmpq -0x30(%rbp), %rax
jne 0x57e41
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0x243e0
|
my_fill_utf8mb3:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 18h
mov r15, rdx
mov rbx, rsi
mov rax, fs:28h
mov [rbp+var_30], rax
cmp ecx, 7Fh
jg short loc_57DBD
mov rax, fs:28h
cmp rax, [rbp+var_30]
jnz loc_57E41
mov rsi, rbx
mov rdx, r15
add rsp, 18h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
jmp my_fill_8bit
loc_57DBD:
lea r14, [rbx+r15]
mov rax, [rdi+0B8h]
mov esi, ecx
lea rcx, [rbp+var_30]
lea rdx, [rbp+var_3A]
call qword ptr [rax+0D8h]
movsx r12, al
cmp r12, r15
jle short loc_57DE6
mov r13, rbx
jmp short loc_57E0B
loc_57DE6:
movsx r15, al
mov r13, rbx
loc_57DED:
mov rdi, rbx
lea rsi, [rbp+var_3A]
mov rdx, r15
call _memcpy
add rbx, r12
add r13, r12
lea rax, [rbx+r12]
cmp rax, r14
jbe short loc_57DED
loc_57E0B:
cmp rbx, r14
jnb short loc_57E23
sub r14, r13
mov rdi, rbx
mov esi, 20h ; ' '
mov rdx, r14
call _memset
loc_57E23:
mov rax, fs:28h
cmp rax, [rbp+var_30]
jnz short loc_57E41
add rsp, 18h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_57E41:
call ___stack_chk_fail
|
long long my_fill_utf8mb3(long long a1, long long a2, long long a3, signed int a4)
{
unsigned long long v5; // rbx
unsigned long long v7; // r14
long long v8; // r12
long long v9; // r13
_BYTE v10[10]; // [rsp+6h] [rbp-3Ah] BYREF
unsigned long long v11[6]; // [rsp+10h] [rbp-30h] BYREF
v5 = a2;
v11[0] = __readfsqword(0x28u);
if ( a4 <= 127 )
return my_fill_8bit(a1, a2, a3, a4);
v7 = a2 + a3;
v8 = (*(char ( **)(long long, _QWORD, _BYTE *, unsigned long long *))(*(_QWORD *)(a1 + 184) + 216LL))(
a1,
(unsigned int)a4,
v10,
v11);
if ( v8 <= a3 )
{
v9 = a2;
do
{
memcpy(v5, v10);
v5 += v8;
v9 += v8;
}
while ( v5 + v8 <= v7 );
}
else
{
v9 = a2;
}
if ( v5 < v7 )
memset(v5, 32LL, v7 - v9);
return __readfsqword(0x28u);
}
|
my_fill_utf8mb3:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x18
MOV R15,RDX
MOV RBX,RSI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x30],RAX
CMP ECX,0x7f
JG 0x00157dbd
MOV RAX,qword ptr FS:[0x28]
CMP RAX,qword ptr [RBP + -0x30]
JNZ 0x00157e41
MOV RSI,RBX
MOV RDX,R15
ADD RSP,0x18
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
JMP 0x00141e83
LAB_00157dbd:
LEA R14,[RBX + R15*0x1]
MOV RAX,qword ptr [RDI + 0xb8]
MOV ESI,ECX
LEA RCX,[RBP + -0x30]
LEA RDX,[RBP + -0x3a]
CALL qword ptr [RAX + 0xd8]
MOVSX R12,AL
CMP R12,R15
JLE 0x00157de6
MOV R13,RBX
JMP 0x00157e0b
LAB_00157de6:
MOVSX R15,AL
MOV R13,RBX
LAB_00157ded:
MOV RDI,RBX
LEA RSI,[RBP + -0x3a]
MOV RDX,R15
CALL 0x00124290
ADD RBX,R12
ADD R13,R12
LEA RAX,[RBX + R12*0x1]
CMP RAX,R14
JBE 0x00157ded
LAB_00157e0b:
CMP RBX,R14
JNC 0x00157e23
SUB R14,R13
MOV RDI,RBX
MOV ESI,0x20
MOV RDX,R14
CALL 0x001241e0
LAB_00157e23:
MOV RAX,qword ptr FS:[0x28]
CMP RAX,qword ptr [RBP + -0x30]
JNZ 0x00157e41
ADD RSP,0x18
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_00157e41:
CALL 0x001243e0
|
void my_fill_utf8mb3(long param_1,void *param_2,long param_3,int param_4)
{
void *pvVar1;
char cVar2;
long lVar3;
void *pvVar4;
long in_FS_OFFSET;
int1 local_42 [10];
long local_38;
local_38 = *(long *)(in_FS_OFFSET + 0x28);
if (param_4 < 0x80) {
if (*(long *)(in_FS_OFFSET + 0x28) == local_38) {
my_fill_8bit(param_1,param_2,param_3);
return;
}
}
else {
pvVar1 = (void *)((long)param_2 + param_3);
cVar2 = (**(code **)(*(long *)(param_1 + 0xb8) + 0xd8))(param_1,param_4,local_42,&local_38);
lVar3 = (long)cVar2;
pvVar4 = param_2;
if (lVar3 <= param_3) {
do {
memcpy(param_2,local_42,(long)cVar2);
param_2 = (void *)((long)param_2 + lVar3);
pvVar4 = (void *)((long)pvVar4 + lVar3);
} while ((void *)((long)param_2 + lVar3) <= pvVar1);
}
if (param_2 < pvVar1) {
memset(param_2,0x20,(long)pvVar1 - (long)pvVar4);
}
if (*(long *)(in_FS_OFFSET + 0x28) == local_38) {
return;
}
}
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
|
|
64,245
|
quantize_q5_0
|
Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-quants.c
|
size_t quantize_q5_0(const float * restrict src, void * restrict dst, int64_t nrow, int64_t n_per_row, const float * quant_weights) {
if (!quant_weights) {
quantize_row_q5_0_ref(src, dst, (int64_t)nrow*n_per_row);
return nrow * ggml_row_size(GGML_TYPE_Q5_0, n_per_row);
}
size_t row_size = ggml_row_size(GGML_TYPE_Q5_0, n_per_row);
char * qrow = (char *)dst;
for (int64_t row = 0; row < nrow; ++row) {
quantize_row_q5_0_impl(src, (block_q5_0*)qrow, n_per_row, quant_weights);
src += n_per_row;
qrow += row_size;
}
return nrow * row_size;
}
|
O0
|
c
|
quantize_q5_0:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
movq %r8, -0x30(%rbp)
cmpq $0x0, -0x30(%rbp)
jne 0x771d0
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x20(%rbp), %rdx
imulq -0x28(%rbp), %rdx
callq 0x49050
movq -0x20(%rbp), %rax
movq %rax, -0x50(%rbp)
movq -0x28(%rbp), %rsi
movl $0x6, %edi
callq 0x47a50
movq %rax, %rcx
movq -0x50(%rbp), %rax
imulq %rcx, %rax
movq %rax, -0x8(%rbp)
jmp 0x77248
movq -0x28(%rbp), %rsi
movl $0x6, %edi
callq 0x47a50
movq %rax, -0x38(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0x40(%rbp)
movq $0x0, -0x48(%rbp)
movq -0x48(%rbp), %rax
cmpq -0x20(%rbp), %rax
jge 0x7723b
movq -0x10(%rbp), %rdi
movq -0x40(%rbp), %rsi
movq -0x28(%rbp), %rdx
movq -0x30(%rbp), %rcx
callq 0x77260
movq -0x28(%rbp), %rax
shlq $0x2, %rax
addq -0x10(%rbp), %rax
movq %rax, -0x10(%rbp)
movq -0x38(%rbp), %rax
addq -0x40(%rbp), %rax
movq %rax, -0x40(%rbp)
movq -0x48(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x48(%rbp)
jmp 0x771f2
movq -0x20(%rbp), %rax
imulq -0x38(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x50, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
|
quantize_q5_0:
push rbp
mov rbp, rsp
sub rsp, 50h
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov [rbp+var_20], rdx
mov [rbp+var_28], rcx
mov [rbp+var_30], r8
cmp [rbp+var_30], 0
jnz short loc_771D0
mov rdi, [rbp+var_10]
mov rsi, [rbp+var_18]
mov rdx, [rbp+var_20]
imul rdx, [rbp+var_28]
call _quantize_row_q5_0_ref
mov rax, [rbp+var_20]
mov [rbp+var_50], rax
mov rsi, [rbp+var_28]
mov edi, 6
call _ggml_row_size
mov rcx, rax
mov rax, [rbp+var_50]
imul rax, rcx
mov [rbp+var_8], rax
jmp short loc_77248
loc_771D0:
mov rsi, [rbp+var_28]
mov edi, 6
call _ggml_row_size
mov [rbp+var_38], rax
mov rax, [rbp+var_18]
mov [rbp+var_40], rax
mov [rbp+var_48], 0
loc_771F2:
mov rax, [rbp+var_48]
cmp rax, [rbp+var_20]
jge short loc_7723B
mov rdi, [rbp+var_10]
mov rsi, [rbp+var_40]
mov rdx, [rbp+var_28]
mov rcx, [rbp+var_30]
call quantize_row_q5_0_impl
mov rax, [rbp+var_28]
shl rax, 2
add rax, [rbp+var_10]
mov [rbp+var_10], rax
mov rax, [rbp+var_38]
add rax, [rbp+var_40]
mov [rbp+var_40], rax
mov rax, [rbp+var_48]
add rax, 1
mov [rbp+var_48], rax
jmp short loc_771F2
loc_7723B:
mov rax, [rbp+var_20]
imul rax, [rbp+var_38]
mov [rbp+var_8], rax
loc_77248:
mov rax, [rbp+var_8]
add rsp, 50h
pop rbp
retn
|
unsigned long long quantize_q5_0(long long a1, long long a2, long long a3, long long a4, long long a5, double a6)
{
long long i; // [rsp+8h] [rbp-48h]
long long v8; // [rsp+10h] [rbp-40h]
unsigned long long v9; // [rsp+18h] [rbp-38h]
long long v13; // [rsp+40h] [rbp-10h]
v13 = a1;
if ( a5 )
{
v9 = ggml_row_size(6u, a4, a6);
v8 = a2;
for ( i = 0LL; i < a3; ++i )
{
quantize_row_q5_0_impl(v13, v8, a4, a5);
v13 += 4 * a4;
v8 += v9;
}
return v9 * a3;
}
else
{
quantize_row_q5_0_ref(a1, a2, a4 * a3);
return ggml_row_size(6u, a4, a6) * a3;
}
}
|
quantize_q5_0:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x50
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x18],RSI
MOV qword ptr [RBP + -0x20],RDX
MOV qword ptr [RBP + -0x28],RCX
MOV qword ptr [RBP + -0x30],R8
CMP qword ptr [RBP + -0x30],0x0
JNZ 0x001771d0
MOV RDI,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RBP + -0x18]
MOV RDX,qword ptr [RBP + -0x20]
IMUL RDX,qword ptr [RBP + -0x28]
CALL 0x00149050
MOV RAX,qword ptr [RBP + -0x20]
MOV qword ptr [RBP + -0x50],RAX
MOV RSI,qword ptr [RBP + -0x28]
MOV EDI,0x6
CALL 0x00147a50
MOV RCX,RAX
MOV RAX,qword ptr [RBP + -0x50]
IMUL RAX,RCX
MOV qword ptr [RBP + -0x8],RAX
JMP 0x00177248
LAB_001771d0:
MOV RSI,qword ptr [RBP + -0x28]
MOV EDI,0x6
CALL 0x00147a50
MOV qword ptr [RBP + -0x38],RAX
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RBP + -0x40],RAX
MOV qword ptr [RBP + -0x48],0x0
LAB_001771f2:
MOV RAX,qword ptr [RBP + -0x48]
CMP RAX,qword ptr [RBP + -0x20]
JGE 0x0017723b
MOV RDI,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RBP + -0x40]
MOV RDX,qword ptr [RBP + -0x28]
MOV RCX,qword ptr [RBP + -0x30]
CALL 0x00177260
MOV RAX,qword ptr [RBP + -0x28]
SHL RAX,0x2
ADD RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RBP + -0x10],RAX
MOV RAX,qword ptr [RBP + -0x38]
ADD RAX,qword ptr [RBP + -0x40]
MOV qword ptr [RBP + -0x40],RAX
MOV RAX,qword ptr [RBP + -0x48]
ADD RAX,0x1
MOV qword ptr [RBP + -0x48],RAX
JMP 0x001771f2
LAB_0017723b:
MOV RAX,qword ptr [RBP + -0x20]
IMUL RAX,qword ptr [RBP + -0x38]
MOV qword ptr [RBP + -0x8],RAX
LAB_00177248:
MOV RAX,qword ptr [RBP + -0x8]
ADD RSP,0x50
POP RBP
RET
|
long quantize_q5_0(long param_1,long param_2,long param_3,long param_4,long param_5)
{
int8 local_50;
int8 local_48;
int8 local_18;
int8 local_10;
if (param_5 == 0) {
quantize_row_q5_0_ref(param_1,param_2,param_3 * param_4);
local_10 = ggml_row_size(6,param_4);
}
else {
local_10 = ggml_row_size(6,param_4);
local_48 = param_2;
local_18 = param_1;
for (local_50 = 0; local_50 < param_3; local_50 = local_50 + 1) {
quantize_row_q5_0_impl(local_18,local_48,param_4,param_5);
local_18 = param_4 * 4 + local_18;
local_48 = local_10 + local_48;
}
}
local_10 = param_3 * local_10;
return local_10;
}
|
|
64,246
|
quantize_q5_0
|
Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-quants.c
|
size_t quantize_q5_0(const float * restrict src, void * restrict dst, int64_t nrow, int64_t n_per_row, const float * quant_weights) {
if (!quant_weights) {
quantize_row_q5_0_ref(src, dst, (int64_t)nrow*n_per_row);
return nrow * ggml_row_size(GGML_TYPE_Q5_0, n_per_row);
}
size_t row_size = ggml_row_size(GGML_TYPE_Q5_0, n_per_row);
char * qrow = (char *)dst;
for (int64_t row = 0; row < nrow; ++row) {
quantize_row_q5_0_impl(src, (block_q5_0*)qrow, n_per_row, quant_weights);
src += n_per_row;
qrow += row_size;
}
return nrow * row_size;
}
|
O1
|
c
|
quantize_q5_0:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x108, %rsp # imm = 0x108
movq %rcx, %r14
movq %rdx, %rbx
movq %rsi, %rbp
movq %rdi, %r15
movq %r8, 0x20(%rsp)
testq %r8, %r8
je 0x33566
movl $0x6, %edi
movq %r14, %rsi
callq 0x188c0
testq %rbx, %rbx
jle 0x33585
cvtsi2ss %r14, %xmm0
movss %xmm0, 0x10(%rsp)
leaq 0x1f(%r14), %rcx
testq %r14, %r14
cmovnsq %r14, %rcx
sarq $0x5, %rcx
movq %rcx, 0x50(%rsp)
leaq (,%r14,4), %rcx
movq %rcx, 0x28(%rsp)
leaq 0x6(%rbp), %rcx
movq %rcx, 0x18(%rsp)
xorl %ecx, %ecx
movq %rbx, 0x40(%rsp)
movq %r14, 0x38(%rsp)
movq %rax, 0x30(%rsp)
movq %rcx, 0x48(%rsp)
xorps %xmm1, %xmm1
testq %r14, %r14
jle 0x33387
xorl %eax, %eax
movss (%r15,%rax,4), %xmm0
mulss %xmm0, %xmm0
addss %xmm0, %xmm1
incq %rax
cmpq %rax, %r14
jne 0x33371
movq %r15, 0x8(%rsp)
cmpq $0x20, %r14
jl 0x33532
divss 0x10(%rsp), %xmm1
movq 0x18(%rsp), %r13
movq 0x20(%rsp), %rbx
movq 0x8(%rsp), %r12
xorl %r15d, %r15d
movss %xmm1, 0x4(%rsp)
movq %rbp, 0x58(%rsp)
movq %r15, %rbp
shlq $0x7, %rbp
addq 0x8(%rsp), %rbp
xorl %r14d, %r14d
movss (%rbx,%r14,4), %xmm2
movss (%r12,%r14,4), %xmm0
mulss %xmm0, %xmm0
addss %xmm1, %xmm0
ucomiss 0x1d9e1(%rip), %xmm0 # 0x50dc4
jb 0x333eb
sqrtss %xmm0, %xmm0
jmp 0x33402
movss %xmm2, 0x14(%rsp)
callq 0x18f90
movss 0x14(%rsp), %xmm2
movss 0x4(%rsp), %xmm1
mulss %xmm0, %xmm2
movss %xmm2, 0x80(%rsp,%r14,4)
incq %r14
cmpq $0x20, %r14
jne 0x333c8
movl $0x20, %edi
movl $0x10, %esi
movq %rbp, %rdx
leaq 0x60(%rsp), %rcx
leaq 0x80(%rsp), %r8
callq 0x323b0
movd %xmm0, %eax
andps 0x18bdd(%rip), %xmm0 # 0x4c020
mulss 0x18bfd(%rip), %xmm0 # 0x4c048
mulss 0x18bf9(%rip), %xmm0 # 0x4c04c
leal (%rax,%rax), %ecx
movl %eax, %edx
andl $0x7f800000, %edx # imm = 0x7F800000
addl $0x7800000, %edx # imm = 0x7800000
cmpl $0x71000000, %ecx # imm = 0x71000000
movl $0x40000000, %esi # imm = 0x40000000
cmovbl %esi, %edx
movd %edx, %xmm1
addss %xmm0, %xmm1
movd %xmm1, %esi
movl %esi, %edx
shrl $0xd, %edx
andl $0x7c00, %edx # imm = 0x7C00
andl $0xfff, %esi # imm = 0xFFF
addl %edx, %esi
shrl $0x10, %eax
andl $0x8000, %eax # imm = 0x8000
cmpl $0xff000001, %ecx # imm = 0xFF000001
movl $0x7e00, %ecx # imm = 0x7E00
cmovael %ecx, %esi
orl %eax, %esi
leaq (%r15,%r15,4), %rax
leaq (%r15,%rax,4), %rax
addq %r15, %rax
movq 0x58(%rsp), %rbp
leaq (%rax,%rbp), %rdx
movw %si, (%rbp,%rax)
xorl %eax, %eax
xorl %esi, %esi
movzbl 0x60(%rsp,%rax), %edi
movzbl 0x70(%rsp,%rax), %r8d
movl %edi, %ecx
andb $0xf, %cl
movl %r8d, %r9d
shlb $0x4, %r9b
orb %cl, %r9b
shrl $0x4, %edi
andl $0x1, %edi
movl %eax, %ecx
shll %cl, %edi
movb %r9b, (%r13,%rax)
shrl $0x4, %r8d
andl $0x1, %r8d
leal 0x10(%rax), %ecx
shll %cl, %r8d
addl %edi, %r8d
orl %r8d, %esi
incq %rax
cmpq $0x10, %rax
jne 0x334c6
movl %esi, 0x2(%rdx)
incq %r15
movl $0x80, %eax
addq %rax, %r12
addq %rax, %rbx
addq $0x16, %r13
cmpq 0x50(%rsp), %r15
movss 0x4(%rsp), %xmm1
jne 0x333b9
movq 0x8(%rsp), %r15
addq 0x28(%rsp), %r15
movq 0x30(%rsp), %rax
addq %rax, %rbp
movq 0x48(%rsp), %rcx
incq %rcx
addq %rax, 0x18(%rsp)
movq 0x40(%rsp), %rbx
cmpq %rbx, %rcx
movq 0x38(%rsp), %r14
jne 0x33362
jmp 0x33585
movq %r14, %rdx
imulq %rbx, %rdx
movq %r15, %rdi
movq %rbp, %rsi
callq 0x18ec0
movl $0x6, %edi
movq %r14, %rsi
callq 0x188c0
imulq %rbx, %rax
addq $0x108, %rsp # imm = 0x108
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
|
quantize_q5_0:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 108h
mov r14, rcx
mov rbx, rdx
mov rbp, rsi
mov r15, rdi
mov [rsp+138h+var_118], r8
test r8, r8
jz loc_33566
mov edi, 6
mov rsi, r14
call _ggml_row_size
test rbx, rbx
jle loc_33585
cvtsi2ss xmm0, r14
movss [rsp+138h+var_128], xmm0
lea rcx, [r14+1Fh]
test r14, r14
cmovns rcx, r14
sar rcx, 5
mov [rsp+138h+var_E8], rcx
lea rcx, ds:0[r14*4]
mov [rsp+138h+var_110], rcx
lea rcx, [rbp+6]
mov [rsp+138h+var_120], rcx
xor ecx, ecx
mov [rsp+138h+var_F8], rbx
mov [rsp+138h+var_100], r14
mov [rsp+138h+var_108], rax
loc_33362:
mov [rsp+138h+var_F0], rcx
xorps xmm1, xmm1
test r14, r14
jle short loc_33387
xor eax, eax
loc_33371:
movss xmm0, dword ptr [r15+rax*4]
mulss xmm0, xmm0
addss xmm1, xmm0
inc rax
cmp r14, rax
jnz short loc_33371
loc_33387:
mov [rsp+138h+var_130], r15
cmp r14, 20h ; ' '
jl loc_33532
divss xmm1, [rsp+138h+var_128]
mov r13, [rsp+138h+var_120]
mov rbx, [rsp+138h+var_118]
mov r12, [rsp+138h+var_130]
xor r15d, r15d
movss [rsp+138h+var_134], xmm1
mov [rsp+138h+var_E0], rbp
loc_333B9:
mov rbp, r15
shl rbp, 7
add rbp, [rsp+138h+var_130]
xor r14d, r14d
loc_333C8:
movss xmm2, dword ptr [rbx+r14*4]
movss xmm0, dword ptr [r12+r14*4]
mulss xmm0, xmm0
addss xmm0, xmm1
ucomiss xmm0, cs:dword_50DC4
jb short loc_333EB
sqrtss xmm0, xmm0
jmp short loc_33402
loc_333EB:
movss [rsp+138h+var_124], xmm2
call _sqrtf
movss xmm2, [rsp+138h+var_124]
movss xmm1, [rsp+138h+var_134]
loc_33402:
mulss xmm2, xmm0
movss [rsp+r14*4+138h+var_B8], xmm2
inc r14
cmp r14, 20h ; ' '
jnz short loc_333C8
mov edi, 20h ; ' '
mov esi, 10h
mov rdx, rbp
lea rcx, [rsp+138h+var_D8]
lea r8, [rsp+138h+var_B8]
call make_qx_quants
movd eax, xmm0
andps xmm0, cs:xmmword_4C020
mulss xmm0, cs:dword_4C048
mulss xmm0, cs:dword_4C04C
lea ecx, [rax+rax]
mov edx, eax
and edx, 7F800000h
add edx, 7800000h
cmp ecx, 71000000h
mov esi, 40000000h
cmovb edx, esi
movd xmm1, edx
addss xmm1, xmm0
movd esi, xmm1
mov edx, esi
shr edx, 0Dh
and edx, 7C00h
and esi, 0FFFh
add esi, edx
shr eax, 10h
and eax, 8000h
cmp ecx, 0FF000001h
mov ecx, 7E00h
cmovnb esi, ecx
or esi, eax
lea rax, [r15+r15*4]
lea rax, [r15+rax*4]
add rax, r15
mov rbp, [rsp+138h+var_E0]
lea rdx, [rax+rbp]
mov [rbp+rax+0], si
xor eax, eax
xor esi, esi
loc_334C6:
movzx edi, [rsp+rax+138h+var_D8]
movzx r8d, [rsp+rax+138h+var_C8]
mov ecx, edi
and cl, 0Fh
mov r9d, r8d
shl r9b, 4
or r9b, cl
shr edi, 4
and edi, 1
mov ecx, eax
shl edi, cl
mov [r13+rax+0], r9b
shr r8d, 4
and r8d, 1
lea ecx, [rax+10h]
shl r8d, cl
add r8d, edi
or esi, r8d
inc rax
cmp rax, 10h
jnz short loc_334C6
mov [rdx+2], esi
inc r15
mov eax, 80h
add r12, rax
add rbx, rax
add r13, 16h
cmp r15, [rsp+138h+var_E8]
movss xmm1, [rsp+138h+var_134]
jnz loc_333B9
loc_33532:
mov r15, [rsp+138h+var_130]
add r15, [rsp+138h+var_110]
mov rax, [rsp+138h+var_108]
add rbp, rax
mov rcx, [rsp+138h+var_F0]
inc rcx
add [rsp+138h+var_120], rax
mov rbx, [rsp+138h+var_F8]
cmp rcx, rbx
mov r14, [rsp+138h+var_100]
jnz loc_33362
jmp short loc_33585
loc_33566:
mov rdx, r14
imul rdx, rbx
mov rdi, r15
mov rsi, rbp
call _quantize_row_q5_0_ref
mov edi, 6
mov rsi, r14
call _ggml_row_size
loc_33585:
imul rax, rbx
add rsp, 108h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
|
unsigned long long quantize_q5_0(long long a1, long long a2, long long a3, long long a4, long long a5, double a6)
{
long long v6; // r14
long long v7; // rbx
long long v8; // rbp
long long v9; // r15
long long v10; // rdi
unsigned long long v11; // rax
long long v12; // rcx
float v13; // xmm1_4
long long i; // rax
float v15; // xmm1_4
long long v16; // r13
long long v17; // rbx
long long v18; // r12
long long v19; // r15
long long j; // r14
float v21; // xmm2_4
__m128i v22; // xmm0
unsigned int v23; // eax
float v24; // xmm0_4
unsigned int v25; // ecx
unsigned int v26; // edx
__m128i v27; // xmm1
unsigned int v28; // esi
int v29; // esi
int v30; // eax
long long v31; // rdx
long long v32; // rax
int v33; // esi
unsigned int v34; // r8d
float v36; // [rsp+4h] [rbp-134h]
long long v37; // [rsp+8h] [rbp-130h]
float v38; // [rsp+10h] [rbp-128h]
float v39; // [rsp+14h] [rbp-124h]
long long v40; // [rsp+18h] [rbp-120h]
long long v42; // [rsp+28h] [rbp-110h]
unsigned long long v43; // [rsp+30h] [rbp-108h]
long long v44; // [rsp+38h] [rbp-100h]
long long v45; // [rsp+40h] [rbp-F8h]
long long v46; // [rsp+48h] [rbp-F0h]
long long v47; // [rsp+50h] [rbp-E8h]
long long v48; // [rsp+58h] [rbp-E0h]
_BYTE v49[32]; // [rsp+60h] [rbp-D8h] BYREF
float v50[46]; // [rsp+80h] [rbp-B8h] BYREF
v6 = a4;
v7 = a3;
v8 = a2;
v9 = a1;
if ( a5 )
{
v10 = 6LL;
v11 = ggml_row_size(6u, a4, a6);
if ( v7 > 0 )
{
v38 = (float)(int)v6;
v47 = v6 / 32;
v42 = 4 * v6;
v40 = a2 + 6;
v12 = 0LL;
v45 = v7;
v44 = v6;
v43 = v11;
do
{
v46 = v12;
v13 = 0.0;
if ( v6 > 0 )
{
for ( i = 0LL; i != v6; ++i )
v13 = v13 + (float)(*(float *)(v9 + 4 * i) * *(float *)(v9 + 4 * i));
}
v37 = v9;
if ( v6 >= 32 )
{
v15 = v13 / v38;
v16 = v40;
v17 = a5;
v18 = v9;
v19 = 0LL;
v36 = v15;
v48 = v8;
do
{
for ( j = 0LL; j != 32; ++j )
{
v21 = *(float *)(v17 + 4 * j);
v22 = (__m128i)*(unsigned int *)(v18 + 4 * j);
*(float *)v22.m128i_i32 = (float)(*(float *)v22.m128i_i32 * *(float *)v22.m128i_i32) + v15;
if ( *(float *)v22.m128i_i32 < 0.0 )
{
v39 = *(float *)(v17 + 4 * j);
sqrtf(v10);
v21 = v39;
v15 = v36;
}
else
{
*(float *)v22.m128i_i32 = fsqrt(*(float *)v22.m128i_i32);
}
v50[j] = v21 * *(float *)v22.m128i_i32;
}
make_qx_quants(32, 16, v37 + (v19 << 7), (long long)v49, (long long)v50);
v23 = _mm_cvtsi128_si32(v22);
v24 = (float)(fabs(*(float *)v22.m128i_i32) * 5.1922969e33) * 7.7037198e-34;
v25 = 2 * v23;
v26 = (v23 & 0x7F800000) + 125829120;
if ( 2 * v23 < 0x71000000 )
v26 = 0x40000000;
v27 = _mm_cvtsi32_si128(v26);
*(float *)v27.m128i_i32 = *(float *)v27.m128i_i32 + v24;
v28 = _mm_cvtsi128_si32(v27);
v29 = ((v28 >> 13) & 0x7C00) + (v28 & 0xFFF);
v30 = HIWORD(v23) & 0x8000;
if ( v25 >= 0xFF000001 )
LOWORD(v29) = 32256;
v8 = v48;
v31 = 22 * v19 + v48;
*(_WORD *)v31 = v30 | v29;
v32 = 0LL;
v33 = 0;
do
{
v34 = (unsigned __int8)v49[v32 + 16];
v10 = (((unsigned __int8)v49[v32] >> 4) & 1u) << v32;
*(_BYTE *)(v16 + v32) = v49[v32] & 0xF | (16 * v49[v32 + 16]);
v33 |= v10 + (((v34 >> 4) & 1) << (v32++ + 16));
}
while ( v32 != 16 );
*(_DWORD *)(v31 + 2) = v33;
++v19;
v18 += 128LL;
v17 += 128LL;
v16 += 22LL;
v15 = v36;
}
while ( v19 != v47 );
}
v9 = v42 + v37;
v11 = v43;
v8 += v43;
v12 = v46 + 1;
v40 += v43;
v7 = v45;
v6 = v44;
}
while ( v46 + 1 != v45 );
}
}
else
{
quantize_row_q5_0_ref(a1, a2, a3 * a4);
v11 = ggml_row_size(6u, v6, a6);
}
return v7 * v11;
}
|
quantize_q5_0:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x108
MOV R14,RCX
MOV RBX,RDX
MOV RBP,RSI
MOV R15,RDI
MOV qword ptr [RSP + 0x20],R8
TEST R8,R8
JZ 0x00133566
MOV EDI,0x6
MOV RSI,R14
CALL 0x001188c0
TEST RBX,RBX
JLE 0x00133585
CVTSI2SS XMM0,R14
MOVSS dword ptr [RSP + 0x10],XMM0
LEA RCX,[R14 + 0x1f]
TEST R14,R14
CMOVNS RCX,R14
SAR RCX,0x5
MOV qword ptr [RSP + 0x50],RCX
LEA RCX,[R14*0x4]
MOV qword ptr [RSP + 0x28],RCX
LEA RCX,[RBP + 0x6]
MOV qword ptr [RSP + 0x18],RCX
XOR ECX,ECX
MOV qword ptr [RSP + 0x40],RBX
MOV qword ptr [RSP + 0x38],R14
MOV qword ptr [RSP + 0x30],RAX
LAB_00133362:
MOV qword ptr [RSP + 0x48],RCX
XORPS XMM1,XMM1
TEST R14,R14
JLE 0x00133387
XOR EAX,EAX
LAB_00133371:
MOVSS XMM0,dword ptr [R15 + RAX*0x4]
MULSS XMM0,XMM0
ADDSS XMM1,XMM0
INC RAX
CMP R14,RAX
JNZ 0x00133371
LAB_00133387:
MOV qword ptr [RSP + 0x8],R15
CMP R14,0x20
JL 0x00133532
DIVSS XMM1,dword ptr [RSP + 0x10]
MOV R13,qword ptr [RSP + 0x18]
MOV RBX,qword ptr [RSP + 0x20]
MOV R12,qword ptr [RSP + 0x8]
XOR R15D,R15D
MOVSS dword ptr [RSP + 0x4],XMM1
MOV qword ptr [RSP + 0x58],RBP
LAB_001333b9:
MOV RBP,R15
SHL RBP,0x7
ADD RBP,qword ptr [RSP + 0x8]
XOR R14D,R14D
LAB_001333c8:
MOVSS XMM2,dword ptr [RBX + R14*0x4]
MOVSS XMM0,dword ptr [R12 + R14*0x4]
MULSS XMM0,XMM0
ADDSS XMM0,XMM1
UCOMISS XMM0,dword ptr [0x00150dc4]
JC 0x001333eb
SQRTSS XMM0,XMM0
JMP 0x00133402
LAB_001333eb:
MOVSS dword ptr [RSP + 0x14],XMM2
CALL 0x00118f90
MOVSS XMM2,dword ptr [RSP + 0x14]
MOVSS XMM1,dword ptr [RSP + 0x4]
LAB_00133402:
MULSS XMM2,XMM0
MOVSS dword ptr [RSP + R14*0x4 + 0x80],XMM2
INC R14
CMP R14,0x20
JNZ 0x001333c8
MOV EDI,0x20
MOV ESI,0x10
MOV RDX,RBP
LEA RCX,[RSP + 0x60]
LEA R8,[RSP + 0x80]
CALL 0x001323b0
MOVD EAX,XMM0
ANDPS XMM0,xmmword ptr [0x0014c020]
MULSS XMM0,dword ptr [0x0014c048]
MULSS XMM0,dword ptr [0x0014c04c]
LEA ECX,[RAX + RAX*0x1]
MOV EDX,EAX
AND EDX,0x7f800000
ADD EDX,0x7800000
CMP ECX,0x71000000
MOV ESI,0x40000000
CMOVC EDX,ESI
MOVD XMM1,EDX
ADDSS XMM1,XMM0
MOVD ESI,XMM1
MOV EDX,ESI
SHR EDX,0xd
AND EDX,0x7c00
AND ESI,0xfff
ADD ESI,EDX
SHR EAX,0x10
AND EAX,0x8000
CMP ECX,0xff000001
MOV ECX,0x7e00
CMOVNC ESI,ECX
OR ESI,EAX
LEA RAX,[R15 + R15*0x4]
LEA RAX,[R15 + RAX*0x4]
ADD RAX,R15
MOV RBP,qword ptr [RSP + 0x58]
LEA RDX,[RAX + RBP*0x1]
MOV word ptr [RBP + RAX*0x1],SI
XOR EAX,EAX
XOR ESI,ESI
LAB_001334c6:
MOVZX EDI,byte ptr [RSP + RAX*0x1 + 0x60]
MOVZX R8D,byte ptr [RSP + RAX*0x1 + 0x70]
MOV ECX,EDI
AND CL,0xf
MOV R9D,R8D
SHL R9B,0x4
OR R9B,CL
SHR EDI,0x4
AND EDI,0x1
MOV ECX,EAX
SHL EDI,CL
MOV byte ptr [R13 + RAX*0x1],R9B
SHR R8D,0x4
AND R8D,0x1
LEA ECX,[RAX + 0x10]
SHL R8D,CL
ADD R8D,EDI
OR ESI,R8D
INC RAX
CMP RAX,0x10
JNZ 0x001334c6
MOV dword ptr [RDX + 0x2],ESI
INC R15
MOV EAX,0x80
ADD R12,RAX
ADD RBX,RAX
ADD R13,0x16
CMP R15,qword ptr [RSP + 0x50]
MOVSS XMM1,dword ptr [RSP + 0x4]
JNZ 0x001333b9
LAB_00133532:
MOV R15,qword ptr [RSP + 0x8]
ADD R15,qword ptr [RSP + 0x28]
MOV RAX,qword ptr [RSP + 0x30]
ADD RBP,RAX
MOV RCX,qword ptr [RSP + 0x48]
INC RCX
ADD qword ptr [RSP + 0x18],RAX
MOV RBX,qword ptr [RSP + 0x40]
CMP RCX,RBX
MOV R14,qword ptr [RSP + 0x38]
JNZ 0x00133362
JMP 0x00133585
LAB_00133566:
MOV RDX,R14
IMUL RDX,RBX
MOV RDI,R15
MOV RSI,RBP
CALL 0x00118ec0
MOV EDI,0x6
MOV RSI,R14
CALL 0x001188c0
LAB_00133585:
IMUL RAX,RBX
ADD RSP,0x108
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
long quantize_q5_0(long param_1,long param_2,long param_3,long param_4,long param_5)
{
byte bVar1;
byte bVar2;
long lVar3;
long lVar4;
long lVar5;
long lVar6;
float fVar7;
ushort uVar8;
long lVar9;
long lVar10;
long lVar11;
long lVar12;
float fVar13;
uint uVar14;
float fVar15;
long local_120;
byte local_d8 [16];
byte abStack_c8 [16];
float local_b8 [34];
if (param_5 == 0) {
quantize_row_q5_0_ref(param_1,param_2,param_4 * param_3);
lVar3 = ggml_row_size(6,param_4);
}
else {
lVar3 = ggml_row_size(6,param_4);
if (0 < param_3) {
lVar5 = param_4 + 0x1f;
if (-1 < param_4) {
lVar5 = param_4;
}
local_120 = param_2 + 6;
lVar6 = 0;
do {
fVar15 = 0.0;
if (0 < param_4) {
lVar4 = 0;
do {
fVar7 = *(float *)(param_1 + lVar4 * 4);
fVar15 = fVar15 + fVar7 * fVar7;
lVar4 = lVar4 + 1;
} while (param_4 != lVar4);
}
if (0x1f < param_4) {
lVar12 = 0;
lVar4 = param_5;
lVar9 = param_1;
lVar10 = local_120;
do {
lVar11 = 0;
do {
fVar7 = *(float *)(lVar4 + lVar11 * 4);
fVar13 = *(float *)(lVar9 + lVar11 * 4);
fVar13 = fVar13 * fVar13 + fVar15 / (float)param_4;
if (fVar13 < DAT_00150dc4) {
fVar13 = sqrtf(fVar13);
}
else {
fVar13 = SQRT(fVar13);
}
local_b8[lVar11] = fVar7 * fVar13;
lVar11 = lVar11 + 1;
} while (lVar11 != 0x20);
uVar14 = make_qx_quants(0x20,0x10,lVar12 * 0x80 + param_1,local_d8,local_b8);
fVar7 = (float)((uVar14 & 0x7f800000) + 0x7800000);
if (uVar14 * 2 < 0x71000000) {
fVar7 = 2.0;
}
fVar7 = fVar7 + (float)(uVar14 & _DAT_0014c020) * DAT_0014c048 * DAT_0014c04c;
uVar8 = (SUB42(fVar7,0) & 0xfff) + ((ushort)((uint)fVar7 >> 0xd) & 0x7c00);
if (0xff000000 < uVar14 * 2) {
uVar8 = 0x7e00;
}
*(ushort *)(param_2 + lVar12 * 0x16) = uVar8 | (ushort)(uVar14 >> 0x10) & 0x8000;
lVar11 = 0;
uVar14 = 0;
do {
bVar1 = local_d8[lVar11];
bVar2 = abStack_c8[lVar11];
*(byte *)(lVar10 + lVar11) = bVar2 << 4 | bVar1 & 0xf;
uVar14 = uVar14 | ((bVar2 >> 4 & 1) << ((byte)lVar11 + 0x10 & 0x1f)) +
((bVar1 >> 4 & 1) << ((byte)lVar11 & 0x1f));
lVar11 = lVar11 + 1;
} while (lVar11 != 0x10);
*(uint *)(lVar12 * 0x16 + param_2 + 2) = uVar14;
lVar12 = lVar12 + 1;
lVar9 = lVar9 + 0x80;
lVar4 = lVar4 + 0x80;
lVar10 = lVar10 + 0x16;
} while (lVar12 != lVar5 >> 5);
}
param_1 = param_1 + param_4 * 4;
param_2 = param_2 + lVar3;
lVar6 = lVar6 + 1;
local_120 = local_120 + lVar3;
} while (lVar6 != param_3);
}
}
return lVar3 * param_3;
}
|
|
64,247
|
quantize_q5_0
|
Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-quants.c
|
size_t quantize_q5_0(const float * restrict src, void * restrict dst, int64_t nrow, int64_t n_per_row, const float * quant_weights) {
if (!quant_weights) {
quantize_row_q5_0_ref(src, dst, (int64_t)nrow*n_per_row);
return nrow * ggml_row_size(GGML_TYPE_Q5_0, n_per_row);
}
size_t row_size = ggml_row_size(GGML_TYPE_Q5_0, n_per_row);
char * qrow = (char *)dst;
for (int64_t row = 0; row < nrow; ++row) {
quantize_row_q5_0_impl(src, (block_q5_0*)qrow, n_per_row, quant_weights);
src += n_per_row;
qrow += row_size;
}
return nrow * row_size;
}
|
O2
|
c
|
quantize_q5_0:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x118, %rsp # imm = 0x118
movq %rcx, %r14
movq %rdx, %rbx
movq %rsi, %r13
movq %rdi, %r12
movq %r8, 0x40(%rsp)
testq %r8, %r8
je 0x36d0e
pushq $0x6
popq %rdi
movq %r14, %rsi
callq 0x1f3a0
xorl %edi, %edi
testq %r14, %r14
movl $0x0, %r8d
cmovgq %r14, %r8
movq %rax, %rsi
cvtsi2ss %r14, %xmm0
movss %xmm0, 0x10(%rsp)
pushq $0x20
popq %rcx
movq %r14, %rax
cqto
idivq %rcx
testq %rax, %rax
cmovleq %rdi, %rax
movq %rax, 0x68(%rsp)
testq %rbx, %rbx
movl $0x0, %eax
cmovgq %rbx, %rax
movq %rax, 0x48(%rsp)
shlq $0x2, %r14
leaq 0x6(%r13), %rbp
movq %rbx, 0x38(%rsp)
movq %r14, 0x30(%rsp)
movq %rsi, 0x28(%rsp)
movq %r8, 0x20(%rsp)
cmpq 0x48(%rsp), %rdi
je 0x36d2e
xorps %xmm1, %xmm1
xorl %eax, %eax
cmpq %rax, %r8
je 0x36ba1
movss (%r12,%rax,4), %xmm0
mulss %xmm0, %xmm0
addss %xmm0, %xmm1
incq %rax
jmp 0x36b89
movq %rdi, 0x58(%rsp)
divss 0x10(%rsp), %xmm1
movq %rbp, 0x50(%rsp)
movq 0x40(%rsp), %rbx
movq %r12, 0x18(%rsp)
xorl %r15d, %r15d
movss %xmm1, 0xc(%rsp)
movq %r13, 0x60(%rsp)
cmpq 0x68(%rsp), %r15
je 0x36cda
movq %r15, %r14
shlq $0x7, %r14
addq 0x18(%rsp), %r14
xorl %r13d, %r13d
cmpq $0x20, %r13
je 0x36c36
movss (%rbx,%r13,4), %xmm2
movss (%r12,%r13,4), %xmm0
mulss %xmm0, %xmm0
addss %xmm1, %xmm0
ucomiss 0x1c424(%rip), %xmm0 # 0x53028
jb 0x36c0c
sqrtss %xmm0, %xmm0
jmp 0x36c23
movss %xmm2, 0x14(%rsp)
callq 0x1fd30
movss 0x14(%rsp), %xmm2
movss 0xc(%rsp), %xmm1
mulss %xmm0, %xmm2
movss %xmm2, 0x90(%rsp,%r13,4)
incq %r13
jmp 0x36be3
pushq $0x20
popq %rdi
pushq $0x10
popq %rsi
movq %r14, %rdx
leaq 0x70(%rsp), %rcx
leaq 0x90(%rsp), %r8
callq 0x35dd9
callq 0x31de9
imulq $0x16, %r15, %rcx
movq 0x60(%rsp), %r13
leaq (%rcx,%r13), %rdx
movw %ax, (%r13,%rcx)
xorl %eax, %eax
xorl %esi, %esi
cmpq $0x10, %rax
je 0x36cba
movzbl 0x70(%rsp,%rax), %edi
movl %edi, %r8d
shrl $0x4, %edi
andl $0x1, %edi
movl %eax, %ecx
shll %cl, %edi
movzbl 0x80(%rsp,%rax), %r9d
andb $0xf, %r8b
movl %r9d, %r10d
shlb $0x4, %r10b
orb %r8b, %r10b
shrl $0x4, %r9d
andl $0x1, %r9d
leal 0x10(%rax), %ecx
shll %cl, %r9d
movb %r10b, (%rbp,%rax)
addl %edi, %r9d
orl %r9d, %esi
incq %rax
jmp 0x36c6d
movl %esi, 0x2(%rdx)
incq %r15
movl $0x80, %eax
addq %rax, %r12
addq %rax, %rbx
addq $0x16, %rbp
movss 0xc(%rsp), %xmm1
jmp 0x36bc9
movq 0x30(%rsp), %r14
movq 0x18(%rsp), %r12
addq %r14, %r12
movq 0x28(%rsp), %rsi
addq %rsi, %r13
movq 0x58(%rsp), %rdi
incq %rdi
movq 0x50(%rsp), %rbp
addq %rsi, %rbp
movq 0x38(%rsp), %rbx
movq 0x20(%rsp), %r8
jmp 0x36b79
movq %r14, %rdx
imulq %rbx, %rdx
movq %r12, %rdi
movq %r13, %rsi
callq 0x1fc40
pushq $0x6
popq %rdi
movq %r14, %rsi
callq 0x1f3a0
movq %rax, %rsi
imulq %rbx, %rsi
movq %rsi, %rax
addq $0x118, %rsp # imm = 0x118
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
|
quantize_q5_0:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 118h
mov r14, rcx
mov rbx, rdx
mov r13, rsi
mov r12, rdi
mov [rsp+148h+var_108], r8
test r8, r8
jz loc_36D0E
push 6
pop rdi
mov rsi, r14
call _ggml_row_size
xor edi, edi
test r14, r14
mov r8d, 0
cmovg r8, r14
mov rsi, rax
cvtsi2ss xmm0, r14
movss [rsp+148h+var_138], xmm0
push 20h ; ' '
pop rcx
mov rax, r14
cqo
idiv rcx
test rax, rax
cmovle rax, rdi
mov [rsp+148h+var_E0], rax
test rbx, rbx
mov eax, 0
cmovg rax, rbx
mov [rsp+148h+var_100], rax
shl r14, 2
lea rbp, [r13+6]
mov [rsp+148h+var_110], rbx
mov [rsp+148h+var_118], r14
mov [rsp+148h+var_120], rsi
mov [rsp+148h+var_128], r8
loc_36B79:
cmp rdi, [rsp+148h+var_100]
jz loc_36D2E
xorps xmm1, xmm1
xor eax, eax
loc_36B89:
cmp r8, rax
jz short loc_36BA1
movss xmm0, dword ptr [r12+rax*4]
mulss xmm0, xmm0
addss xmm1, xmm0
inc rax
jmp short loc_36B89
loc_36BA1:
mov [rsp+148h+var_F0], rdi
divss xmm1, [rsp+148h+var_138]
mov [rsp+148h+var_F8], rbp
mov rbx, [rsp+148h+var_108]
mov [rsp+148h+var_130], r12
xor r15d, r15d
movss [rsp+148h+var_13C], xmm1
mov [rsp+148h+var_E8], r13
loc_36BC9:
cmp r15, [rsp+148h+var_E0]
jz loc_36CDA
mov r14, r15
shl r14, 7
add r14, [rsp+148h+var_130]
xor r13d, r13d
loc_36BE3:
cmp r13, 20h ; ' '
jz short loc_36C36
movss xmm2, dword ptr [rbx+r13*4]
movss xmm0, dword ptr [r12+r13*4]
mulss xmm0, xmm0
addss xmm0, xmm1
ucomiss xmm0, cs:dword_53028
jb short loc_36C0C
sqrtss xmm0, xmm0
jmp short loc_36C23
loc_36C0C:
movss [rsp+148h+var_134], xmm2
call _sqrtf
movss xmm2, [rsp+148h+var_134]
movss xmm1, [rsp+148h+var_13C]
loc_36C23:
mulss xmm2, xmm0
movss [rsp+r13*4+148h+var_B8], xmm2
inc r13
jmp short loc_36BE3
loc_36C36:
push 20h ; ' '
pop rdi
push 10h
pop rsi
mov rdx, r14
lea rcx, [rsp+148h+var_D8]
lea r8, [rsp+148h+var_B8]
call make_qx_quants
call ggml_compute_fp32_to_fp16_0
imul rcx, r15, 16h
mov r13, [rsp+148h+var_E8]
lea rdx, [rcx+r13]
mov [r13+rcx+0], ax
xor eax, eax
xor esi, esi
loc_36C6D:
cmp rax, 10h
jz short loc_36CBA
movzx edi, [rsp+rax+148h+var_D8]
mov r8d, edi
shr edi, 4
and edi, 1
mov ecx, eax
shl edi, cl
movzx r9d, [rsp+rax+148h+var_C8]
and r8b, 0Fh
mov r10d, r9d
shl r10b, 4
or r10b, r8b
shr r9d, 4
and r9d, 1
lea ecx, [rax+10h]
shl r9d, cl
mov [rbp+rax+0], r10b
add r9d, edi
or esi, r9d
inc rax
jmp short loc_36C6D
loc_36CBA:
mov [rdx+2], esi
inc r15
mov eax, 80h
add r12, rax
add rbx, rax
add rbp, 16h
movss xmm1, [rsp+148h+var_13C]
jmp loc_36BC9
loc_36CDA:
mov r14, [rsp+148h+var_118]
mov r12, [rsp+148h+var_130]
add r12, r14
mov rsi, [rsp+148h+var_120]
add r13, rsi
mov rdi, [rsp+148h+var_F0]
inc rdi
mov rbp, [rsp+148h+var_F8]
add rbp, rsi
mov rbx, [rsp+148h+var_110]
mov r8, [rsp+148h+var_128]
jmp loc_36B79
loc_36D0E:
mov rdx, r14
imul rdx, rbx
mov rdi, r12
mov rsi, r13
call _quantize_row_q5_0_ref
push 6
pop rdi
mov rsi, r14
call _ggml_row_size
mov rsi, rax
loc_36D2E:
imul rsi, rbx
mov rax, rsi
add rsp, 118h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
|
unsigned long long quantize_q5_0(long long a1, long long a2, long long a3, long long a4, long long a5, double a6)
{
long long v7; // rbx
long long v8; // r13
long long v9; // r12
unsigned long long v10; // rax
long long v11; // rdi
long long v12; // r8
unsigned long long v13; // rsi
long long v14; // rax
long long v15; // rax
long long v16; // rbp
float v17; // xmm1_4
long long i; // rax
float v19; // xmm1_4
long long v20; // rbx
long long v21; // r15
long long j; // r13
float v23; // xmm2_4
double v24; // xmm0_8
__m128 qx_quants; // xmm0
__int16 v26; // ax
long long v27; // rdx
long long v28; // rax
int v29; // esi
unsigned int v30; // r8d
int v31; // r9d
float v33; // [rsp+Ch] [rbp-13Ch]
float v34; // [rsp+14h] [rbp-134h]
long long v35; // [rsp+18h] [rbp-130h]
long long v36; // [rsp+20h] [rbp-128h]
unsigned long long v37; // [rsp+28h] [rbp-120h]
long long v38; // [rsp+38h] [rbp-110h]
long long v40; // [rsp+48h] [rbp-100h]
long long v41; // [rsp+50h] [rbp-F8h]
long long v42; // [rsp+60h] [rbp-E8h]
long long v43; // [rsp+68h] [rbp-E0h]
_BYTE v44[32]; // [rsp+70h] [rbp-D8h] BYREF
float v45[46]; // [rsp+90h] [rbp-B8h] BYREF
v7 = a3;
v8 = a2;
v9 = a1;
if ( a5 )
{
v10 = ggml_row_size(6u, a4, a6);
v11 = 0LL;
v12 = 0LL;
if ( a4 > 0 )
v12 = a4;
v13 = v10;
v14 = a4 / 32;
if ( a4 / 32 <= 0 )
v14 = 0LL;
v43 = v14;
v15 = 0LL;
if ( v7 > 0 )
v15 = v7;
v40 = v15;
v16 = v8 + 6;
v38 = v7;
v37 = v13;
v36 = v12;
while ( v11 != v40 )
{
v17 = 0.0;
for ( i = 0LL; v12 != i; ++i )
v17 = v17 + (float)(*(float *)(v9 + 4 * i) * *(float *)(v9 + 4 * i));
v19 = v17 / (float)(int)a4;
v41 = v16;
v20 = a5;
v35 = v9;
v21 = 0LL;
v33 = v19;
v42 = v8;
while ( v21 != v43 )
{
for ( j = 0LL; j != 32; ++j )
{
v23 = *(float *)(v20 + 4 * j);
*(_QWORD *)&v24 = *(unsigned int *)(v9 + 4 * j);
*(float *)&v24 = (float)(*(float *)&v24 * *(float *)&v24) + v19;
if ( *(float *)&v24 < 0.0 )
{
v34 = *(float *)(v20 + 4 * j);
sqrtf(v24);
v23 = v34;
v19 = v33;
}
else
{
*(float *)&v24 = fsqrt(*(float *)&v24);
}
v45[j] = v23 * *(float *)&v24;
}
qx_quants = make_qx_quants(32, 16, v35 + (v21 << 7), (long long)v44, (long long)v45);
v26 = ggml_compute_fp32_to_fp16_0((__m128i)qx_quants);
v8 = v42;
v27 = 22 * v21 + v42;
*(_WORD *)v27 = v26;
v28 = 0LL;
v29 = 0;
while ( v28 != 16 )
{
v30 = (unsigned __int8)v44[v28];
v31 = ((unsigned __int8)v44[v28 + 16] >> 4) & 1;
*(_BYTE *)(v16 + v28) = v30 & 0xF | (16 * v44[v28 + 16]);
v29 |= (((v30 >> 4) & 1) << v28) + (v31 << (v28 + 16));
++v28;
}
*(_DWORD *)(v27 + 2) = v29;
++v21;
v9 += 128LL;
v20 += 128LL;
v16 += 22LL;
v19 = v33;
}
v9 = 4 * a4 + v35;
v13 = v37;
v8 += v37;
++v11;
v16 = v37 + v41;
v7 = v38;
v12 = v36;
}
}
else
{
quantize_row_q5_0_ref(a1, a2, a3 * a4);
v13 = ggml_row_size(6u, a4, a6);
}
return v7 * v13;
}
|
quantize_q5_0:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x118
MOV R14,RCX
MOV RBX,RDX
MOV R13,RSI
MOV R12,RDI
MOV qword ptr [RSP + 0x40],R8
TEST R8,R8
JZ 0x00136d0e
PUSH 0x6
POP RDI
MOV RSI,R14
CALL 0x0011f3a0
XOR EDI,EDI
TEST R14,R14
MOV R8D,0x0
CMOVG R8,R14
MOV RSI,RAX
CVTSI2SS XMM0,R14
MOVSS dword ptr [RSP + 0x10],XMM0
PUSH 0x20
POP RCX
MOV RAX,R14
CQO
IDIV RCX
TEST RAX,RAX
CMOVLE RAX,RDI
MOV qword ptr [RSP + 0x68],RAX
TEST RBX,RBX
MOV EAX,0x0
CMOVG RAX,RBX
MOV qword ptr [RSP + 0x48],RAX
SHL R14,0x2
LEA RBP,[R13 + 0x6]
MOV qword ptr [RSP + 0x38],RBX
MOV qword ptr [RSP + 0x30],R14
MOV qword ptr [RSP + 0x28],RSI
MOV qword ptr [RSP + 0x20],R8
LAB_00136b79:
CMP RDI,qword ptr [RSP + 0x48]
JZ 0x00136d2e
XORPS XMM1,XMM1
XOR EAX,EAX
LAB_00136b89:
CMP R8,RAX
JZ 0x00136ba1
MOVSS XMM0,dword ptr [R12 + RAX*0x4]
MULSS XMM0,XMM0
ADDSS XMM1,XMM0
INC RAX
JMP 0x00136b89
LAB_00136ba1:
MOV qword ptr [RSP + 0x58],RDI
DIVSS XMM1,dword ptr [RSP + 0x10]
MOV qword ptr [RSP + 0x50],RBP
MOV RBX,qword ptr [RSP + 0x40]
MOV qword ptr [RSP + 0x18],R12
XOR R15D,R15D
MOVSS dword ptr [RSP + 0xc],XMM1
MOV qword ptr [RSP + 0x60],R13
LAB_00136bc9:
CMP R15,qword ptr [RSP + 0x68]
JZ 0x00136cda
MOV R14,R15
SHL R14,0x7
ADD R14,qword ptr [RSP + 0x18]
XOR R13D,R13D
LAB_00136be3:
CMP R13,0x20
JZ 0x00136c36
MOVSS XMM2,dword ptr [RBX + R13*0x4]
MOVSS XMM0,dword ptr [R12 + R13*0x4]
MULSS XMM0,XMM0
ADDSS XMM0,XMM1
UCOMISS XMM0,dword ptr [0x00153028]
JC 0x00136c0c
SQRTSS XMM0,XMM0
JMP 0x00136c23
LAB_00136c0c:
MOVSS dword ptr [RSP + 0x14],XMM2
CALL 0x0011fd30
MOVSS XMM2,dword ptr [RSP + 0x14]
MOVSS XMM1,dword ptr [RSP + 0xc]
LAB_00136c23:
MULSS XMM2,XMM0
MOVSS dword ptr [RSP + R13*0x4 + 0x90],XMM2
INC R13
JMP 0x00136be3
LAB_00136c36:
PUSH 0x20
POP RDI
PUSH 0x10
POP RSI
MOV RDX,R14
LEA RCX,[RSP + 0x70]
LEA R8,[RSP + 0x90]
CALL 0x00135dd9
CALL 0x00131de9
IMUL RCX,R15,0x16
MOV R13,qword ptr [RSP + 0x60]
LEA RDX,[RCX + R13*0x1]
MOV word ptr [R13 + RCX*0x1],AX
XOR EAX,EAX
XOR ESI,ESI
LAB_00136c6d:
CMP RAX,0x10
JZ 0x00136cba
MOVZX EDI,byte ptr [RSP + RAX*0x1 + 0x70]
MOV R8D,EDI
SHR EDI,0x4
AND EDI,0x1
MOV ECX,EAX
SHL EDI,CL
MOVZX R9D,byte ptr [RSP + RAX*0x1 + 0x80]
AND R8B,0xf
MOV R10D,R9D
SHL R10B,0x4
OR R10B,R8B
SHR R9D,0x4
AND R9D,0x1
LEA ECX,[RAX + 0x10]
SHL R9D,CL
MOV byte ptr [RBP + RAX*0x1],R10B
ADD R9D,EDI
OR ESI,R9D
INC RAX
JMP 0x00136c6d
LAB_00136cba:
MOV dword ptr [RDX + 0x2],ESI
INC R15
MOV EAX,0x80
ADD R12,RAX
ADD RBX,RAX
ADD RBP,0x16
MOVSS XMM1,dword ptr [RSP + 0xc]
JMP 0x00136bc9
LAB_00136cda:
MOV R14,qword ptr [RSP + 0x30]
MOV R12,qword ptr [RSP + 0x18]
ADD R12,R14
MOV RSI,qword ptr [RSP + 0x28]
ADD R13,RSI
MOV RDI,qword ptr [RSP + 0x58]
INC RDI
MOV RBP,qword ptr [RSP + 0x50]
ADD RBP,RSI
MOV RBX,qword ptr [RSP + 0x38]
MOV R8,qword ptr [RSP + 0x20]
JMP 0x00136b79
LAB_00136d0e:
MOV RDX,R14
IMUL RDX,RBX
MOV RDI,R12
MOV RSI,R13
CALL 0x0011fc40
PUSH 0x6
POP RDI
MOV RSI,R14
CALL 0x0011f3a0
MOV RSI,RAX
LAB_00136d2e:
IMUL RSI,RBX
MOV RAX,RSI
ADD RSP,0x118
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
long quantize_q5_0(long param_1,long param_2,long param_3,long param_4,long param_5)
{
float fVar1;
byte bVar2;
byte bVar3;
int2 uVar4;
long lVar5;
long lVar6;
long lVar7;
long lVar8;
long lVar9;
long lVar10;
uint uVar11;
long lVar12;
long lVar13;
long lVar14;
long lVar15;
long lVar16;
float fVar17;
float fVar18;
byte local_d8 [32];
float local_b8 [34];
if (param_5 == 0) {
quantize_row_q5_0_ref(param_1,param_2,param_4 * param_3);
lVar5 = ggml_row_size(6,param_4);
}
else {
lVar5 = ggml_row_size(6,param_4);
lVar12 = 0;
lVar13 = 0;
if (0 < param_4) {
lVar13 = param_4;
}
lVar6 = param_4 / 0x20;
if (param_4 / 0x20 < 1) {
lVar6 = lVar12;
}
lVar7 = 0;
if (0 < param_3) {
lVar7 = param_3;
}
lVar10 = param_2 + 6;
for (; lVar12 != lVar7; lVar12 = lVar12 + 1) {
fVar18 = 0.0;
for (lVar8 = 0; lVar13 != lVar8; lVar8 = lVar8 + 1) {
fVar1 = *(float *)(param_1 + lVar8 * 4);
fVar18 = fVar18 + fVar1 * fVar1;
}
lVar8 = param_5;
lVar9 = lVar10;
lVar14 = param_1;
for (lVar16 = 0; lVar16 != lVar6; lVar16 = lVar16 + 1) {
for (lVar15 = 0; lVar15 != 0x20; lVar15 = lVar15 + 1) {
fVar1 = *(float *)(lVar8 + lVar15 * 4);
fVar17 = *(float *)(lVar14 + lVar15 * 4);
fVar17 = fVar17 * fVar17 + fVar18 / (float)param_4;
if (fVar17 < DAT_00153028) {
fVar17 = sqrtf(fVar17);
}
else {
fVar17 = SQRT(fVar17);
}
local_b8[lVar15] = fVar1 * fVar17;
}
make_qx_quants(0x20,0x10,lVar16 * 0x80 + param_1,local_d8,local_b8);
uVar4 = ggml_compute_fp32_to_fp16();
*(int2 *)(param_2 + lVar16 * 0x16) = uVar4;
uVar11 = 0;
for (lVar15 = 0; lVar15 != 0x10; lVar15 = lVar15 + 1) {
bVar2 = local_d8[lVar15];
bVar3 = local_d8[lVar15 + 0x10];
*(byte *)(lVar9 + lVar15) = bVar3 << 4 | bVar2 & 0xf;
uVar11 = uVar11 | ((bVar3 >> 4 & 1) << ((byte)lVar15 + 0x10 & 0x1f)) +
((bVar2 >> 4 & 1) << ((byte)lVar15 & 0x1f));
}
*(uint *)(lVar16 * 0x16 + param_2 + 2) = uVar11;
lVar14 = lVar14 + 0x80;
lVar8 = lVar8 + 0x80;
lVar9 = lVar9 + 0x16;
}
param_1 = param_1 + param_4 * 4;
param_2 = param_2 + lVar5;
lVar10 = lVar10 + lVar5;
}
}
return lVar5 * param_3;
}
|
|
64,248
|
quantize_q5_0
|
Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-quants.c
|
size_t quantize_q5_0(const float * restrict src, void * restrict dst, int64_t nrow, int64_t n_per_row, const float * quant_weights) {
if (!quant_weights) {
quantize_row_q5_0_ref(src, dst, (int64_t)nrow*n_per_row);
return nrow * ggml_row_size(GGML_TYPE_Q5_0, n_per_row);
}
size_t row_size = ggml_row_size(GGML_TYPE_Q5_0, n_per_row);
char * qrow = (char *)dst;
for (int64_t row = 0; row < nrow; ++row) {
quantize_row_q5_0_impl(src, (block_q5_0*)qrow, n_per_row, quant_weights);
src += n_per_row;
qrow += row_size;
}
return nrow * row_size;
}
|
O3
|
c
|
quantize_q5_0:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x108, %rsp # imm = 0x108
movq %rcx, %r14
movq %rdx, %rbx
movq %rsi, %rbp
movq %r8, 0x28(%rsp)
testq %r8, %r8
je 0x325a9
movq %rdi, 0x8(%rsp)
movl $0x6, %edi
movq %r14, %rsi
callq 0x178b0
testq %rbx, %rbx
jle 0x325c5
cvtsi2ss %r14, %xmm0
movss %xmm0, 0x10(%rsp)
movq %r14, %rcx
shrq $0x5, %rcx
movq %rcx, 0x50(%rsp)
leaq (,%r14,4), %rcx
movq %rcx, 0x30(%rsp)
leaq 0x6(%rbp), %rcx
movq %rcx, 0x18(%rsp)
xorl %ecx, %ecx
movq %rbx, 0x40(%rsp)
movq %r14, 0x20(%rsp)
movq %rax, 0x38(%rsp)
movq %rcx, 0x48(%rsp)
testq %r14, %r14
movq 0x8(%rsp), %rdx
jle 0x32575
xorps %xmm1, %xmm1
xorl %eax, %eax
movq 0x20(%rsp), %rcx
movss (%rdx,%rax,4), %xmm0
mulss %xmm0, %xmm0
addss %xmm0, %xmm1
incq %rax
cmpq %rax, %rcx
jne 0x322ad
cmpq $0x20, %rcx
jl 0x32575
divss 0x10(%rsp), %xmm1
movq 0x18(%rsp), %r13
movq 0x28(%rsp), %rbx
movq %rdx, %r12
xorl %r15d, %r15d
movss %xmm1, 0x4(%rsp)
movq %rbp, 0x58(%rsp)
movq %r15, %rbp
shlq $0x7, %rbp
addq %rdx, %rbp
xorl %r14d, %r14d
movss (%rbx,%r14,4), %xmm2
movss (%r12,%r14,4), %xmm0
mulss %xmm0, %xmm0
addss %xmm1, %xmm0
ucomiss 0x1efaf(%rip), %xmm0 # 0x512c4
jb 0x3231d
sqrtss %xmm0, %xmm0
jmp 0x32334
movss %xmm2, 0x14(%rsp)
callq 0x17f80
movss 0x14(%rsp), %xmm2
movss 0x4(%rsp), %xmm1
mulss %xmm0, %xmm2
movss %xmm2, 0x80(%rsp,%r14,4)
incq %r14
cmpq $0x20, %r14
jne 0x322fa
movl $0x20, %edi
movl $0x10, %esi
movq %rbp, %rdx
leaq 0x60(%rsp), %rcx
leaq 0x80(%rsp), %r8
callq 0x31310
movd %xmm0, %eax
andps 0x19cab(%rip), %xmm0 # 0x4c020
mulss 0x19d6b(%rip), %xmm0 # 0x4c0e8
mulss 0x19d67(%rip), %xmm0 # 0x4c0ec
leal (%rax,%rax), %ecx
movl %eax, %edx
andl $0x7f800000, %edx # imm = 0x7F800000
addl $0x7800000, %edx # imm = 0x7800000
cmpl $0x71000000, %ecx # imm = 0x71000000
movl $0x40000000, %esi # imm = 0x40000000
cmovbl %esi, %edx
movd %edx, %xmm1
addss %xmm0, %xmm1
movd %xmm1, %edx
movl %edx, %esi
shrl $0xd, %esi
andl $0x7c00, %esi # imm = 0x7C00
andl $0xfff, %edx # imm = 0xFFF
addl %esi, %edx
shrl $0x10, %eax
andl $0x8000, %eax # imm = 0x8000
cmpl $0xff000001, %ecx # imm = 0xFF000001
movl $0x7e00, %ecx # imm = 0x7E00
cmovael %ecx, %edx
orl %eax, %edx
leaq (%r15,%r15,4), %rax
leaq (%r15,%rax,4), %rcx
addq %r15, %rcx
movq 0x58(%rsp), %rbp
leaq (%rcx,%rbp), %rax
movw %dx, (%rbp,%rcx)
xorps %xmm0, %xmm0
xorl %ecx, %ecx
movdqa 0x19c2f(%rip), %xmm1 # 0x4c030
movdqa 0x1ec26(%rip), %xmm8 # 0x51030
movdqa 0x1ec2d(%rip), %xmm9 # 0x51040
movdqa 0x1ea24(%rip), %xmm10 # 0x50e40
movdqa 0x1ea2b(%rip), %xmm11 # 0x50e50
movdqa 0x1eb02(%rip), %xmm12 # 0x50f30
pxor %xmm13, %xmm13
movdqa 0x1eb04(%rip), %xmm14 # 0x50f40
movdqa 0x19bfb(%rip), %xmm15 # 0x4c040
movd 0x60(%rsp,%rcx), %xmm5
movq %rcx, %xmm2
pshufd $0x44, %xmm2, %xmm2 # xmm2 = xmm2[0,1,0,1]
movdqa %xmm2, %xmm4
por %xmm8, %xmm4
por %xmm9, %xmm2
movq %xmm2, %rdx
movd 0x60(%rsp,%rdx), %xmm3
movdqa %xmm5, %xmm6
pand %xmm10, %xmm6
movdqa %xmm3, %xmm7
psllw $0x4, %xmm7
pand %xmm11, %xmm7
por %xmm6, %xmm7
movd %xmm7, (%r13,%rcx)
psrlw $0x4, %xmm5
pand %xmm12, %xmm5
punpcklbw %xmm13, %xmm5 # xmm5 = xmm5[0],xmm13[0],xmm5[1],xmm13[1],xmm5[2],xmm13[2],xmm5[3],xmm13[3],xmm5[4],xmm13[4],xmm5[5],xmm13[5],xmm5[6],xmm13[6],xmm5[7],xmm13[7]
punpcklwd %xmm13, %xmm5 # xmm5 = xmm5[0],xmm13[0],xmm5[1],xmm13[1],xmm5[2],xmm13[2],xmm5[3],xmm13[3]
movdqa %xmm1, %xmm6
pslld $0x17, %xmm6
paddd %xmm14, %xmm6
cvttps2dq %xmm6, %xmm6
pshufd $0xf5, %xmm5, %xmm7 # xmm7 = xmm5[1,1,3,3]
pmuludq %xmm6, %xmm5
pshufd $0xe8, %xmm5, %xmm5 # xmm5 = xmm5[0,2,2,3]
pshufd $0xf5, %xmm6, %xmm6 # xmm6 = xmm6[1,1,3,3]
pmuludq %xmm7, %xmm6
pshufd $0xe8, %xmm6, %xmm6 # xmm6 = xmm6[0,2,2,3]
punpckldq %xmm6, %xmm5 # xmm5 = xmm5[0],xmm6[0],xmm5[1],xmm6[1]
psrlw $0x4, %xmm3
pand %xmm12, %xmm3
punpcklbw %xmm13, %xmm3 # xmm3 = xmm3[0],xmm13[0],xmm3[1],xmm13[1],xmm3[2],xmm13[2],xmm3[3],xmm13[3],xmm3[4],xmm13[4],xmm3[5],xmm13[5],xmm3[6],xmm13[6],xmm3[7],xmm13[7]
punpcklwd %xmm13, %xmm3 # xmm3 = xmm3[0],xmm13[0],xmm3[1],xmm13[1],xmm3[2],xmm13[2],xmm3[3],xmm13[3]
shufps $0x88, %xmm4, %xmm2 # xmm2 = xmm2[0,2],xmm4[0,2]
pslld $0x17, %xmm2
paddd %xmm14, %xmm2
cvttps2dq %xmm2, %xmm2
pshufd $0xf5, %xmm3, %xmm4 # xmm4 = xmm3[1,1,3,3]
pmuludq %xmm2, %xmm3
pshufd $0xe8, %xmm3, %xmm3 # xmm3 = xmm3[0,2,2,3]
pshufd $0xf5, %xmm2, %xmm2 # xmm2 = xmm2[1,1,3,3]
pmuludq %xmm4, %xmm2
pshufd $0xe8, %xmm2, %xmm2 # xmm2 = xmm2[0,2,2,3]
punpckldq %xmm2, %xmm3 # xmm3 = xmm3[0],xmm2[0],xmm3[1],xmm2[1]
paddd %xmm5, %xmm3
orps %xmm3, %xmm0
addq $0x4, %rcx
paddd %xmm15, %xmm1
cmpq $0x10, %rcx
jne 0x32445
pshufd $0xee, %xmm0, %xmm1 # xmm1 = xmm0[2,3,2,3]
por %xmm0, %xmm1
pshufd $0x55, %xmm1, %xmm0 # xmm0 = xmm1[1,1,1,1]
por %xmm1, %xmm0
movd %xmm0, 0x2(%rax)
incq %r15
movl $0x80, %eax
addq %rax, %r12
addq %rax, %rbx
addq $0x16, %r13
cmpq 0x50(%rsp), %r15
movq 0x8(%rsp), %rdx
movss 0x4(%rsp), %xmm1
jne 0x322ed
addq 0x30(%rsp), %rdx
movq %rdx, 0x8(%rsp)
movq 0x38(%rsp), %rax
addq %rax, %rbp
movq 0x48(%rsp), %rcx
incq %rcx
addq %rax, 0x18(%rsp)
movq 0x40(%rsp), %rbx
cmpq %rbx, %rcx
movq 0x20(%rsp), %r14
jne 0x32290
jmp 0x325c5
movq %r14, %rdx
imulq %rbx, %rdx
movq %rbp, %rsi
callq 0x17eb0
movl $0x6, %edi
movq %r14, %rsi
callq 0x178b0
imulq %rbx, %rax
addq $0x108, %rsp # imm = 0x108
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
|
quantize_q5_0:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 108h
mov r14, rcx
mov rbx, rdx
mov rbp, rsi
mov [rsp+138h+var_110], r8
test r8, r8
jz loc_325A9
mov [rsp+138h+var_130], rdi
mov edi, 6
mov rsi, r14
call _ggml_row_size
test rbx, rbx
jle loc_325C5
cvtsi2ss xmm0, r14
movss [rsp+138h+var_128], xmm0
mov rcx, r14
shr rcx, 5
mov [rsp+138h+var_E8], rcx
lea rcx, ds:0[r14*4]
mov [rsp+138h+var_108], rcx
lea rcx, [rbp+6]
mov [rsp+138h+var_120], rcx
xor ecx, ecx
mov [rsp+138h+var_F8], rbx
mov [rsp+138h+var_118], r14
mov [rsp+138h+var_100], rax
loc_32290:
mov [rsp+138h+var_F0], rcx
test r14, r14
mov rdx, [rsp+138h+var_130]
jle loc_32575
xorps xmm1, xmm1
xor eax, eax
mov rcx, [rsp+138h+var_118]
loc_322AD:
movss xmm0, dword ptr [rdx+rax*4]
mulss xmm0, xmm0
addss xmm1, xmm0
inc rax
cmp rcx, rax
jnz short loc_322AD
cmp rcx, 20h ; ' '
jl loc_32575
divss xmm1, [rsp+138h+var_128]
mov r13, [rsp+138h+var_120]
mov rbx, [rsp+138h+var_110]
mov r12, rdx
xor r15d, r15d
movss [rsp+138h+var_134], xmm1
mov [rsp+138h+var_E0], rbp
loc_322ED:
mov rbp, r15
shl rbp, 7
add rbp, rdx
xor r14d, r14d
loc_322FA:
movss xmm2, dword ptr [rbx+r14*4]
movss xmm0, dword ptr [r12+r14*4]
mulss xmm0, xmm0
addss xmm0, xmm1
ucomiss xmm0, cs:dword_512C4
jb short loc_3231D
sqrtss xmm0, xmm0
jmp short loc_32334
loc_3231D:
movss [rsp+138h+var_124], xmm2
call _sqrtf
movss xmm2, [rsp+138h+var_124]
movss xmm1, [rsp+138h+var_134]
loc_32334:
mulss xmm2, xmm0
movss [rsp+r14*4+138h+var_B8], xmm2
inc r14
cmp r14, 20h ; ' '
jnz short loc_322FA
mov edi, 20h ; ' '
mov esi, 10h
mov rdx, rbp
lea rcx, [rsp+138h+var_D8]
lea r8, [rsp+138h+var_B8]
call make_qx_quants
movd eax, xmm0
andps xmm0, cs:xmmword_4C020
mulss xmm0, cs:dword_4C0E8
mulss xmm0, cs:dword_4C0EC
lea ecx, [rax+rax]
mov edx, eax
and edx, 7F800000h
add edx, 7800000h
cmp ecx, 71000000h
mov esi, 40000000h
cmovb edx, esi
movd xmm1, edx
addss xmm1, xmm0
movd edx, xmm1
mov esi, edx
shr esi, 0Dh
and esi, 7C00h
and edx, 0FFFh
add edx, esi
shr eax, 10h
and eax, 8000h
cmp ecx, 0FF000001h
mov ecx, 7E00h
cmovnb edx, ecx
or edx, eax
lea rax, [r15+r15*4]
lea rcx, [r15+rax*4]
add rcx, r15
mov rbp, [rsp+138h+var_E0]
lea rax, [rcx+rbp]
mov [rbp+rcx+0], dx
xorps xmm0, xmm0
xor ecx, ecx
movdqa xmm1, cs:xmmword_4C030
movdqa xmm8, cs:xmmword_51030
movdqa xmm9, cs:xmmword_51040
movdqa xmm10, cs:xmmword_50E40
movdqa xmm11, cs:xmmword_50E50
movdqa xmm12, cs:xmmword_50F30
pxor xmm13, xmm13
movdqa xmm14, cs:xmmword_50F40
movdqa xmm15, cs:xmmword_4C040
loc_32445:
movd xmm5, [rsp+rcx+138h+var_D8]
movq xmm2, rcx
pshufd xmm2, xmm2, 44h ; 'D'
movdqa xmm4, xmm2
por xmm4, xmm8
por xmm2, xmm9
movq rdx, xmm2
movd xmm3, [rsp+rdx+138h+var_D8]
movdqa xmm6, xmm5
pand xmm6, xmm10
movdqa xmm7, xmm3
psllw xmm7, 4
pand xmm7, xmm11
por xmm7, xmm6
movd dword ptr [r13+rcx+0], xmm7
psrlw xmm5, 4
pand xmm5, xmm12
punpcklbw xmm5, xmm13
punpcklwd xmm5, xmm13
movdqa xmm6, xmm1
pslld xmm6, 17h
paddd xmm6, xmm14
cvttps2dq xmm6, xmm6
pshufd xmm7, xmm5, 0F5h
pmuludq xmm5, xmm6
pshufd xmm5, xmm5, 0E8h
pshufd xmm6, xmm6, 0F5h
pmuludq xmm6, xmm7
pshufd xmm6, xmm6, 0E8h
punpckldq xmm5, xmm6
psrlw xmm3, 4
pand xmm3, xmm12
punpcklbw xmm3, xmm13
punpcklwd xmm3, xmm13
shufps xmm2, xmm4, 88h
pslld xmm2, 17h
paddd xmm2, xmm14
cvttps2dq xmm2, xmm2
pshufd xmm4, xmm3, 0F5h
pmuludq xmm3, xmm2
pshufd xmm3, xmm3, 0E8h
pshufd xmm2, xmm2, 0F5h
pmuludq xmm2, xmm4
pshufd xmm2, xmm2, 0E8h
punpckldq xmm3, xmm2
paddd xmm3, xmm5
orps xmm0, xmm3
add rcx, 4
paddd xmm1, xmm15
cmp rcx, 10h
jnz loc_32445
pshufd xmm1, xmm0, 0EEh
por xmm1, xmm0
pshufd xmm0, xmm1, 55h ; 'U'
por xmm0, xmm1
movd dword ptr [rax+2], xmm0
inc r15
mov eax, 80h
add r12, rax
add rbx, rax
add r13, 16h
cmp r15, [rsp+138h+var_E8]
mov rdx, [rsp+138h+var_130]
movss xmm1, [rsp+138h+var_134]
jnz loc_322ED
loc_32575:
add rdx, [rsp+138h+var_108]
mov [rsp+138h+var_130], rdx
mov rax, [rsp+138h+var_100]
add rbp, rax
mov rcx, [rsp+138h+var_F0]
inc rcx
add [rsp+138h+var_120], rax
mov rbx, [rsp+138h+var_F8]
cmp rcx, rbx
mov r14, [rsp+138h+var_118]
jnz loc_32290
jmp short loc_325C5
loc_325A9:
mov rdx, r14
imul rdx, rbx
mov rsi, rbp
call _quantize_row_q5_0_ref
mov edi, 6
mov rsi, r14
call _ggml_row_size
loc_325C5:
imul rax, rbx
add rsp, 108h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
|
unsigned long long quantize_q5_0(long long a1, long long a2, long long a3, long long a4, long long a5, double a6)
{
long long v6; // r14
long long v7; // rbx
long long v8; // rbp
unsigned long long v9; // rax
long long v10; // rcx
long long v11; // rdx
float v12; // xmm1_4
long long v13; // rax
float v14; // xmm1_4
long long v15; // r13
long long v16; // rbx
long long v17; // r12
long long v18; // r15
long long v19; // rbp
long long i; // r14
float v21; // xmm2_4
__m128 v22; // xmm0
unsigned int v23; // eax
float v24; // xmm0_4
unsigned int v25; // ecx
unsigned int v26; // edx
__m128i v27; // xmm1
unsigned int v28; // edx
int v29; // edx
int v30; // eax
__int16 v31; // dx
long long v32; // rax
__m128 v33; // xmm0
long long v34; // rcx
__m128i si128; // xmm1
__m128i v36; // xmm8
__m128i v37; // xmm9
__m128i v38; // xmm10
__m128i v39; // xmm11
__m128i v40; // xmm12
__m128i v41; // xmm14
__m128i v42; // xmm15
__m128i v43; // xmm5
__m128i v44; // xmm2
__m128 v45; // xmm4
__m128 v46; // xmm2
__m128i v47; // xmm3
__m128i v48; // xmm5
__m128i v49; // xmm6
__m128i v50; // xmm3
__m128i v51; // xmm2
__m128i v52; // xmm1
float v54; // [rsp+4h] [rbp-134h]
long long v55; // [rsp+8h] [rbp-130h]
float v56; // [rsp+10h] [rbp-128h]
long long v57; // [rsp+18h] [rbp-120h]
long long v58; // [rsp+20h] [rbp-118h]
long long v60; // [rsp+30h] [rbp-108h]
unsigned long long v61; // [rsp+38h] [rbp-100h]
long long v62; // [rsp+40h] [rbp-F8h]
long long v63; // [rsp+48h] [rbp-F0h]
unsigned long long v64; // [rsp+50h] [rbp-E8h]
long long v65; // [rsp+58h] [rbp-E0h]
_DWORD v66[8]; // [rsp+60h] [rbp-D8h] BYREF
float v67[46]; // [rsp+80h] [rbp-B8h] BYREF
v6 = a4;
v7 = a3;
v8 = a2;
if ( a5 )
{
v55 = a1;
v9 = ggml_row_size(6u, a4, a6);
if ( v7 > 0 )
{
v56 = (float)(int)v6;
v64 = (unsigned long long)v6 >> 5;
v60 = 4 * v6;
v57 = a2 + 6;
v10 = 0LL;
v62 = v7;
v58 = v6;
v61 = v9;
do
{
v63 = v10;
v11 = v55;
if ( v6 > 0 )
{
v12 = 0.0;
v13 = 0LL;
do
{
v12 = v12 + (float)(*(float *)(v55 + 4 * v13) * *(float *)(v55 + 4 * v13));
++v13;
}
while ( v58 != v13 );
if ( v58 >= 32 )
{
v14 = v12 / v56;
v15 = v57;
v16 = a5;
v17 = v55;
v18 = 0LL;
v54 = v14;
v65 = v8;
do
{
v19 = v11 + (v18 << 7);
for ( i = 0LL; i != 32; ++i )
{
v21 = *(float *)(v16 + 4 * i);
v22 = (__m128)*(unsigned int *)(v17 + 4 * i);
v22.m128_f32[0] = (float)(v22.m128_f32[0] * v22.m128_f32[0]) + v14;
if ( v22.m128_f32[0] < 0.0 )
{
*(double *)v22.m128_u64 = sqrtf(*(double *)v22.m128_u64);
v14 = v54;
}
else
{
v22.m128_f32[0] = fsqrt(v22.m128_f32[0]);
}
v67[i] = v21 * v22.m128_f32[0];
}
make_qx_quants(32, 16, v19, (long long)v66, (long long)v67, v22);
v23 = _mm_cvtsi128_si32((__m128i)v22);
v24 = (float)(fabs(v22.m128_f32[0]) * 5.1922969e33) * 7.7037198e-34;
v25 = 2 * v23;
v26 = (v23 & 0x7F800000) + 125829120;
if ( 2 * v23 < 0x71000000 )
v26 = 0x40000000;
v27 = _mm_cvtsi32_si128(v26);
*(float *)v27.m128i_i32 = *(float *)v27.m128i_i32 + v24;
v28 = _mm_cvtsi128_si32(v27);
v29 = ((v28 >> 13) & 0x7C00) + (v28 & 0xFFF);
v30 = HIWORD(v23) & 0x8000;
if ( v25 >= 0xFF000001 )
LOWORD(v29) = 32256;
v31 = v30 | v29;
v8 = v65;
v32 = 22 * v18 + v65;
*(_WORD *)v32 = v31;
v33 = 0LL;
v34 = 0LL;
si128 = _mm_load_si128((const __m128i *)&xmmword_4C030);
v36 = _mm_load_si128((const __m128i *)&xmmword_51030);
v37 = _mm_load_si128((const __m128i *)&xmmword_51040);
v38 = _mm_load_si128((const __m128i *)&xmmword_50E40);
v39 = _mm_load_si128((const __m128i *)&xmmword_50E50);
v40 = _mm_load_si128((const __m128i *)&xmmword_50F30);
v41 = _mm_load_si128((const __m128i *)&xmmword_50F40);
v42 = _mm_load_si128((const __m128i *)&xmmword_4C040);
do
{
v43 = _mm_cvtsi32_si128(v66[v34]);
v44 = _mm_shuffle_epi32((__m128i)(unsigned long long)(v34 * 4), 68);
v45 = (__m128)_mm_or_si128(v44, v36);
v46 = (__m128)_mm_or_si128(v44, v37);
v47 = _mm_cvtsi32_si128(*(_DWORD *)((char *)v66 + v46.m128_u64[0]));
*(_DWORD *)(v15 + v34 * 4) = _mm_cvtsi128_si32(
_mm_or_si128(
_mm_and_si128(_mm_slli_epi16(v47, 4u), v39),
_mm_and_si128(v43, v38)));
v48 = _mm_unpacklo_epi16(
_mm_unpacklo_epi8(_mm_and_si128(_mm_srli_epi16(v43, 4u), v40), (__m128i)0LL),
(__m128i)0LL);
v49 = _mm_cvttps_epi32((__m128)_mm_add_epi32(_mm_slli_epi32(si128, 0x17u), v41));
v50 = _mm_unpacklo_epi16(
_mm_unpacklo_epi8(_mm_and_si128(_mm_srli_epi16(v47, 4u), v40), (__m128i)0LL),
(__m128i)0LL);
v51 = _mm_cvttps_epi32((__m128)_mm_add_epi32(
_mm_slli_epi32((__m128i)_mm_shuffle_ps(v46, v45, 136), 0x17u),
v41));
v33 = _mm_or_ps(
v33,
(__m128)_mm_add_epi32(
_mm_unpacklo_epi32(
_mm_shuffle_epi32(_mm_mul_epu32(v50, v51), 232),
_mm_shuffle_epi32(
_mm_mul_epu32(_mm_shuffle_epi32(v51, 245), _mm_shuffle_epi32(v50, 245)),
232)),
_mm_unpacklo_epi32(
_mm_shuffle_epi32(_mm_mul_epu32(v48, v49), 232),
_mm_shuffle_epi32(
_mm_mul_epu32(_mm_shuffle_epi32(v49, 245), _mm_shuffle_epi32(v48, 245)),
232))));
++v34;
si128 = _mm_add_epi32(si128, v42);
}
while ( v34 != 4 );
v52 = _mm_or_si128(_mm_shuffle_epi32((__m128i)v33, 238), (__m128i)v33);
*(_DWORD *)(v32 + 2) = _mm_cvtsi128_si32(_mm_or_si128(_mm_shuffle_epi32(v52, 85), v52));
++v18;
v17 += 128LL;
v16 += 128LL;
v15 += 22LL;
v11 = v55;
v14 = v54;
}
while ( v18 != v64 );
}
}
v55 = v60 + v11;
v9 = v61;
v8 += v61;
v10 = v63 + 1;
v57 += v61;
v7 = v62;
v6 = v58;
}
while ( v63 + 1 != v62 );
}
}
else
{
quantize_row_q5_0_ref(a1, a2, a3 * a4);
v9 = ggml_row_size(6u, v6, a6);
}
return v7 * v9;
}
|
quantize_q5_0:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x108
MOV R14,RCX
MOV RBX,RDX
MOV RBP,RSI
MOV qword ptr [RSP + 0x28],R8
TEST R8,R8
JZ 0x001325a9
MOV qword ptr [RSP + 0x8],RDI
MOV EDI,0x6
MOV RSI,R14
CALL 0x001178b0
TEST RBX,RBX
JLE 0x001325c5
CVTSI2SS XMM0,R14
MOVSS dword ptr [RSP + 0x10],XMM0
MOV RCX,R14
SHR RCX,0x5
MOV qword ptr [RSP + 0x50],RCX
LEA RCX,[R14*0x4]
MOV qword ptr [RSP + 0x30],RCX
LEA RCX,[RBP + 0x6]
MOV qword ptr [RSP + 0x18],RCX
XOR ECX,ECX
MOV qword ptr [RSP + 0x40],RBX
MOV qword ptr [RSP + 0x20],R14
MOV qword ptr [RSP + 0x38],RAX
LAB_00132290:
MOV qword ptr [RSP + 0x48],RCX
TEST R14,R14
MOV RDX,qword ptr [RSP + 0x8]
JLE 0x00132575
XORPS XMM1,XMM1
XOR EAX,EAX
MOV RCX,qword ptr [RSP + 0x20]
LAB_001322ad:
MOVSS XMM0,dword ptr [RDX + RAX*0x4]
MULSS XMM0,XMM0
ADDSS XMM1,XMM0
INC RAX
CMP RCX,RAX
JNZ 0x001322ad
CMP RCX,0x20
JL 0x00132575
DIVSS XMM1,dword ptr [RSP + 0x10]
MOV R13,qword ptr [RSP + 0x18]
MOV RBX,qword ptr [RSP + 0x28]
MOV R12,RDX
XOR R15D,R15D
MOVSS dword ptr [RSP + 0x4],XMM1
MOV qword ptr [RSP + 0x58],RBP
LAB_001322ed:
MOV RBP,R15
SHL RBP,0x7
ADD RBP,RDX
XOR R14D,R14D
LAB_001322fa:
MOVSS XMM2,dword ptr [RBX + R14*0x4]
MOVSS XMM0,dword ptr [R12 + R14*0x4]
MULSS XMM0,XMM0
ADDSS XMM0,XMM1
UCOMISS XMM0,dword ptr [0x001512c4]
JC 0x0013231d
SQRTSS XMM0,XMM0
JMP 0x00132334
LAB_0013231d:
MOVSS dword ptr [RSP + 0x14],XMM2
CALL 0x00117f80
MOVSS XMM2,dword ptr [RSP + 0x14]
MOVSS XMM1,dword ptr [RSP + 0x4]
LAB_00132334:
MULSS XMM2,XMM0
MOVSS dword ptr [RSP + R14*0x4 + 0x80],XMM2
INC R14
CMP R14,0x20
JNZ 0x001322fa
MOV EDI,0x20
MOV ESI,0x10
MOV RDX,RBP
LEA RCX,[RSP + 0x60]
LEA R8,[RSP + 0x80]
CALL 0x00131310
MOVD EAX,XMM0
ANDPS XMM0,xmmword ptr [0x0014c020]
MULSS XMM0,dword ptr [0x0014c0e8]
MULSS XMM0,dword ptr [0x0014c0ec]
LEA ECX,[RAX + RAX*0x1]
MOV EDX,EAX
AND EDX,0x7f800000
ADD EDX,0x7800000
CMP ECX,0x71000000
MOV ESI,0x40000000
CMOVC EDX,ESI
MOVD XMM1,EDX
ADDSS XMM1,XMM0
MOVD EDX,XMM1
MOV ESI,EDX
SHR ESI,0xd
AND ESI,0x7c00
AND EDX,0xfff
ADD EDX,ESI
SHR EAX,0x10
AND EAX,0x8000
CMP ECX,0xff000001
MOV ECX,0x7e00
CMOVNC EDX,ECX
OR EDX,EAX
LEA RAX,[R15 + R15*0x4]
LEA RCX,[R15 + RAX*0x4]
ADD RCX,R15
MOV RBP,qword ptr [RSP + 0x58]
LEA RAX,[RCX + RBP*0x1]
MOV word ptr [RBP + RCX*0x1],DX
XORPS XMM0,XMM0
XOR ECX,ECX
MOVDQA XMM1,xmmword ptr [0x0014c030]
MOVDQA XMM8,xmmword ptr [0x00151030]
MOVDQA XMM9,xmmword ptr [0x00151040]
MOVDQA XMM10,xmmword ptr [0x00150e40]
MOVDQA XMM11,xmmword ptr [0x00150e50]
MOVDQA XMM12,xmmword ptr [0x00150f30]
PXOR XMM13,XMM13
MOVDQA XMM14,xmmword ptr [0x00150f40]
MOVDQA XMM15,xmmword ptr [0x0014c040]
LAB_00132445:
MOVD XMM5,dword ptr [RSP + RCX*0x1 + 0x60]
MOVQ XMM2,RCX
PSHUFD XMM2,XMM2,0x44
MOVDQA XMM4,XMM2
POR XMM4,XMM8
POR XMM2,XMM9
MOVQ RDX,XMM2
MOVD XMM3,dword ptr [RSP + RDX*0x1 + 0x60]
MOVDQA XMM6,XMM5
PAND XMM6,XMM10
MOVDQA XMM7,XMM3
PSLLW XMM7,0x4
PAND XMM7,XMM11
POR XMM7,XMM6
MOVD dword ptr [R13 + RCX*0x1],XMM7
PSRLW XMM5,0x4
PAND XMM5,XMM12
PUNPCKLBW XMM5,XMM13
PUNPCKLWD XMM5,XMM13
MOVDQA XMM6,XMM1
PSLLD XMM6,0x17
PADDD XMM6,XMM14
CVTTPS2DQ XMM6,XMM6
PSHUFD XMM7,XMM5,0xf5
PMULUDQ XMM5,XMM6
PSHUFD XMM5,XMM5,0xe8
PSHUFD XMM6,XMM6,0xf5
PMULUDQ XMM6,XMM7
PSHUFD XMM6,XMM6,0xe8
PUNPCKLDQ XMM5,XMM6
PSRLW XMM3,0x4
PAND XMM3,XMM12
PUNPCKLBW XMM3,XMM13
PUNPCKLWD XMM3,XMM13
SHUFPS XMM2,XMM4,0x88
PSLLD XMM2,0x17
PADDD XMM2,XMM14
CVTTPS2DQ XMM2,XMM2
PSHUFD XMM4,XMM3,0xf5
PMULUDQ XMM3,XMM2
PSHUFD XMM3,XMM3,0xe8
PSHUFD XMM2,XMM2,0xf5
PMULUDQ XMM2,XMM4
PSHUFD XMM2,XMM2,0xe8
PUNPCKLDQ XMM3,XMM2
PADDD XMM3,XMM5
ORPS XMM0,XMM3
ADD RCX,0x4
PADDD XMM1,XMM15
CMP RCX,0x10
JNZ 0x00132445
PSHUFD XMM1,XMM0,0xee
POR XMM1,XMM0
PSHUFD XMM0,XMM1,0x55
POR XMM0,XMM1
MOVD dword ptr [RAX + 0x2],XMM0
INC R15
MOV EAX,0x80
ADD R12,RAX
ADD RBX,RAX
ADD R13,0x16
CMP R15,qword ptr [RSP + 0x50]
MOV RDX,qword ptr [RSP + 0x8]
MOVSS XMM1,dword ptr [RSP + 0x4]
JNZ 0x001322ed
LAB_00132575:
ADD RDX,qword ptr [RSP + 0x30]
MOV qword ptr [RSP + 0x8],RDX
MOV RAX,qword ptr [RSP + 0x38]
ADD RBP,RAX
MOV RCX,qword ptr [RSP + 0x48]
INC RCX
ADD qword ptr [RSP + 0x18],RAX
MOV RBX,qword ptr [RSP + 0x40]
CMP RCX,RBX
MOV R14,qword ptr [RSP + 0x20]
JNZ 0x00132290
JMP 0x001325c5
LAB_001325a9:
MOV RDX,R14
IMUL RDX,RBX
MOV RSI,RBP
CALL 0x00117eb0
MOV EDI,0x6
MOV RSI,R14
CALL 0x001178b0
LAB_001325c5:
IMUL RAX,RBX
ADD RSP,0x108
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
long quantize_q5_0(long param_1,long param_2,long param_3,ulong param_4,long param_5)
{
uint uVar1;
uint uVar2;
int1 auVar3 [14];
int1 auVar4 [14];
int1 auVar5 [14];
int1 auVar6 [15];
unkuint9 Var7;
int1 auVar8 [11];
int1 auVar9 [13];
int1 auVar10 [14];
int1 auVar11 [11];
int1 auVar12 [14];
int1 auVar13 [15];
int1 auVar14 [15];
int1 auVar15 [15];
int1 auVar16 [15];
uint6 uVar17;
uint6 uVar18;
int iVar19;
int iVar20;
int iVar21;
int iVar22;
uint uVar23;
int1 auVar24 [16];
int iVar25;
int iVar26;
int iVar27;
int iVar28;
int1 auVar29 [16];
int1 auVar30 [16];
long lVar31;
ulong uVar32;
long lVar33;
ushort uVar34;
float fVar35;
long lVar36;
long lVar37;
long lVar38;
long lVar39;
float fVar40;
uint uVar41;
uint uVar42;
uint uVar43;
uint uVar44;
uint uVar45;
float fVar46;
int iVar47;
int iVar48;
int iVar49;
int iVar50;
int1 auVar51 [16];
int1 auVar52 [16];
int1 auVar53 [15];
int1 auVar54 [15];
int1 auVar55 [16];
int1 auVar56 [16];
long local_130;
long local_120;
uint local_d8 [8];
float local_b8 [34];
if (param_5 == 0) {
quantize_row_q5_0_ref(param_1,param_2,param_4 * param_3);
lVar31 = ggml_row_size(6,param_4);
}
else {
lVar31 = ggml_row_size(6,param_4);
if (0 < param_3) {
local_120 = param_2 + 6;
lVar33 = 0;
local_130 = param_1;
do {
if (0 < (long)param_4) {
fVar46 = 0.0;
uVar32 = 0;
do {
fVar35 = *(float *)(local_130 + uVar32 * 4);
fVar46 = fVar46 + fVar35 * fVar35;
uVar32 = uVar32 + 1;
} while (param_4 != uVar32);
if (0x1f < (long)param_4) {
uVar32 = 0;
lVar36 = param_5;
lVar37 = local_130;
lVar38 = local_120;
do {
lVar39 = 0;
do {
fVar35 = *(float *)(lVar36 + lVar39 * 4);
fVar40 = *(float *)(lVar37 + lVar39 * 4);
fVar40 = fVar40 * fVar40 + fVar46 / (float)(long)param_4;
if (fVar40 < DAT_001512c4) {
fVar40 = sqrtf(fVar40);
}
else {
fVar40 = SQRT(fVar40);
}
local_b8[lVar39] = fVar35 * fVar40;
lVar39 = lVar39 + 1;
} while (lVar39 != 0x20);
uVar41 = make_qx_quants(0x20,0x10,uVar32 * 0x80 + local_130,local_d8,local_b8);
fVar35 = (float)((uVar41 & 0x7f800000) + 0x7800000);
if (uVar41 * 2 < 0x71000000) {
fVar35 = 2.0;
}
fVar35 = fVar35 + (float)(uVar41 & _DAT_0014c020) * DAT_0014c0e8 * DAT_0014c0ec;
uVar34 = (SUB42(fVar35,0) & 0xfff) + ((ushort)((uint)fVar35 >> 0xd) & 0x7c00);
if (0xff000000 < uVar41 * 2) {
uVar34 = 0x7e00;
}
*(ushort *)(param_2 + uVar32 * 0x16) = uVar34 | (ushort)(uVar41 >> 0x10) & 0x8000;
auVar30 = _DAT_00151040;
auVar29 = _DAT_00151030;
iVar28 = _UNK_00150f4c;
iVar27 = _UNK_00150f48;
iVar26 = _UNK_00150f44;
iVar25 = _DAT_00150f40;
auVar24 = _DAT_00150f30;
uVar23 = _DAT_00150e50;
uVar41 = _DAT_00150e40;
iVar22 = _UNK_0014c04c;
iVar21 = _UNK_0014c048;
iVar20 = _UNK_0014c044;
iVar19 = _DAT_0014c040;
uVar42 = 0;
uVar43 = 0;
uVar44 = 0;
uVar45 = 0;
lVar39 = 0;
iVar47 = _DAT_0014c030;
iVar48 = _UNK_0014c034;
iVar49 = _UNK_0014c038;
iVar50 = _UNK_0014c03c;
do {
uVar1 = *(uint *)((long)local_d8 + lVar39);
auVar51._8_4_ = (int)lVar39;
auVar51._0_8_ = lVar39;
auVar51._12_4_ = (int)((ulong)lVar39 >> 0x20);
auVar52 = auVar51 | auVar30;
uVar2 = *(uint *)((long)local_d8 + auVar52._0_8_);
auVar56 = psllw(ZEXT416(uVar2),4);
*(uint *)(lVar38 + lVar39) = auVar56._0_4_ & uVar23 | uVar1 & uVar41;
auVar54 = ZEXT415(CONCAT22((ushort)(uVar1 >> 0x14),(ushort)uVar1 >> 4)) &
auVar24._0_15_;
Var7 = CONCAT81(SUB158(ZEXT115(0) << 0x40,7),auVar54[3]);
auVar13._9_6_ = 0;
auVar13._0_9_ = Var7;
auVar8._1_10_ = SUB1510(auVar13 << 0x30,5);
auVar8[0] = auVar54[2];
auVar14._11_4_ = 0;
auVar14._0_11_ = auVar8;
auVar9._1_12_ = SUB1512(auVar14 << 0x20,3);
auVar9[0] = auVar54[1];
uVar34 = CONCAT11(0,auVar54[0]);
auVar53._2_13_ = auVar9;
auVar53._0_2_ = uVar34;
auVar4._10_2_ = 0;
auVar4._0_10_ = auVar53._0_10_;
auVar4._12_2_ = (short)Var7;
uVar17 = CONCAT42(auVar4._10_4_,auVar8._0_2_);
auVar10._6_8_ = 0;
auVar10._0_6_ = uVar17;
auVar55._4_4_ = (int)(float)(iVar48 * 0x800000 + iVar26);
auVar55._12_4_ = (int)(float)(iVar50 * 0x800000 + iVar28);
auVar55._0_4_ = auVar55._4_4_;
auVar55._8_4_ = auVar55._12_4_;
auVar53 = ZEXT415(CONCAT22((ushort)(uVar2 >> 0x14),(ushort)uVar2 >> 4)) &
auVar24._0_15_;
Var7 = CONCAT81(SUB158(ZEXT115(0) << 0x40,7),auVar53[3]);
auVar15._9_6_ = 0;
auVar15._0_9_ = Var7;
auVar11._1_10_ = SUB1510(auVar15 << 0x30,5);
auVar11[0] = auVar53[2];
auVar16._11_4_ = 0;
auVar16._0_11_ = auVar11;
auVar54[2] = auVar53[1];
auVar54._0_2_ = auVar53._0_2_;
auVar54._3_12_ = SUB1512(auVar16 << 0x20,3);
auVar6._2_13_ = auVar54._2_13_;
auVar6._0_2_ = auVar53._0_2_ & 0xff;
auVar3._10_2_ = 0;
auVar3._0_10_ = auVar6._0_10_;
auVar3._12_2_ = (short)Var7;
uVar18 = CONCAT42(auVar3._10_4_,auVar11._0_2_);
auVar12._6_8_ = 0;
auVar12._0_6_ = uVar18;
auVar5._4_2_ = auVar54._2_2_;
auVar5._0_4_ = auVar6._0_4_;
auVar5._6_8_ = SUB148(auVar12 << 0x40,6);
auVar56._4_4_ = (int)(float)(auVar52._8_4_ * 0x800000 + iVar26);
auVar56._12_4_ = (int)(float)(SUB164(auVar51 | auVar29,8) * 0x800000 + iVar28);
auVar56._0_4_ = auVar56._4_4_;
auVar56._8_4_ = auVar56._12_4_;
uVar42 = uVar42 | (auVar6._0_4_ & 0xffff) *
(int)(float)(auVar52._0_4_ * 0x800000 + iVar25) +
(uint)uVar34 * (int)(float)(iVar47 * 0x800000 + iVar25);
uVar43 = uVar43 | auVar56._4_4_ * auVar5._4_4_ +
auVar55._4_4_ *
(int)CONCAT82(SUB148(auVar10 << 0x40,6),auVar9._0_2_);
uVar44 = uVar44 | (int)(((ulong)uVar18 & 0xffffffff) *
(ulong)(uint)(int)(float)(SUB164(auVar51 | auVar29,0) *
0x800000 + iVar27)) +
(int)(((ulong)uVar17 & 0xffffffff) *
(ulong)(uint)(int)(float)(iVar49 * 0x800000 + iVar27));
uVar45 = uVar45 | (int)((auVar56._8_8_ & 0xffffffff) *
(ulong)(auVar3._10_4_ >> 0x10)) +
(int)((auVar55._8_8_ & 0xffffffff) *
(ulong)(auVar4._10_4_ >> 0x10));
lVar39 = lVar39 + 4;
iVar47 = iVar47 + iVar19;
iVar48 = iVar48 + iVar20;
iVar49 = iVar49 + iVar21;
iVar50 = iVar50 + iVar22;
} while (lVar39 != 0x10);
*(uint *)(uVar32 * 0x16 + param_2 + 2) = uVar45 | uVar43 | uVar44 | uVar42;
uVar32 = uVar32 + 1;
lVar37 = lVar37 + 0x80;
lVar36 = lVar36 + 0x80;
lVar38 = lVar38 + 0x16;
} while (uVar32 != param_4 >> 5);
}
}
local_130 = local_130 + param_4 * 4;
param_2 = param_2 + lVar31;
lVar33 = lVar33 + 1;
local_120 = local_120 + lVar31;
} while (lVar33 != param_3);
}
}
return lVar31 * param_3;
}
|
|
64,249
|
my_xml_enter
|
eloqsql/strings/xml.c
|
static int my_xml_enter(MY_XML_PARSER *st, const char *str, size_t len)
{
if (my_xml_attr_ensure_space(st, len + 1 /* the separator char */))
return MY_XML_ERROR;
if (st->attr.end > st->attr.start)
{
st->attr.end[0]= '/';
st->attr.end++;
}
memcpy(st->attr.end, str, len);
st->attr.end+= len;
st->attr.end[0]= '\0';
if (st->flags & MY_XML_FLAG_RELATIVE_NAMES)
return st->enter ? st->enter(st, str, len) : MY_XML_OK;
else
return st->enter ?
st->enter(st, st->attr.start, st->attr.end - st->attr.start) : MY_XML_OK;
}
|
O3
|
c
|
my_xml_enter:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %rbx
movq 0x120(%rdi), %rdi
movq 0x110(%rbx), %rcx
movq 0x118(%rbx), %rax
movq %rdi, %r12
subq %rax, %r12
addq %r12, %rdx
addq $0x2, %rdx
cmpq %rcx, %rdx
jbe 0xd7d79
leaq 0x2(%r14), %rax
movq $-0x3, %rdx
subq %r14, %rdx
shrq %rdx
cmpq %rcx, %rdx
leaq (%rax,%rcx,2), %rax
movq $-0x1, %rdx
cmovaq %rax, %rdx
movq %rdx, 0x110(%rbx)
movq 0x108(%rbx), %rsi
xorl %edi, %edi
testq %rsi, %rsi
je 0xd7d27
xorl %ecx, %ecx
callq 0x9fed4
movq %rax, 0x108(%rbx)
jmp 0xd7d5c
movq %rdx, %rsi
xorl %edx, %edx
callq 0x9fdb1
movq %rax, 0x108(%rbx)
testq %rax, %rax
je 0xd7df7
leaq 0x88(%rbx), %rsi
leaq 0x1(%r12), %rdx
movq %rax, %rdi
callq 0x29080
movq 0x108(%rbx), %rax
movq %rax, 0x118(%rbx)
addq %rax, %r12
movq %r12, 0x120(%rbx)
movq %r12, %rdi
testq %rax, %rax
je 0xd7e09
cmpq %rax, %rdi
jbe 0xd7d92
movb $0x2f, (%rdi)
movq 0x120(%rbx), %rdi
incq %rdi
movq %rdi, 0x120(%rbx)
movq %r15, %rsi
movq %r14, %rdx
callq 0x29080
movq 0x120(%rbx), %rax
leaq (%rax,%r14), %rcx
movq %rcx, 0x120(%rbx)
movb $0x0, (%rax,%r14)
testb $0x1, (%rbx)
movq 0x148(%rbx), %rax
jne 0xd7ddb
testq %rax, %rax
je 0xd7df3
movq 0x118(%rbx), %rsi
movq 0x120(%rbx), %rdx
subq %rsi, %rdx
movq %rbx, %rdi
jmp 0xd7de9
testq %rax, %rax
je 0xd7df3
movq %rbx, %rdi
movq %r15, %rsi
movq %r14, %rdx
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmpq *%rax
xorl %eax, %eax
jmp 0xd7e0e
movq $0x0, 0x118(%rbx)
movq %r12, 0x120(%rbx)
movl $0x1, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
|
my_xml_enter:
push rbp
mov rbp, rsp
push r15
push r14
push r12
push rbx
mov r14, rdx
mov r15, rsi
mov rbx, rdi
mov rdi, [rdi+120h]
mov rcx, [rbx+110h]
mov rax, [rbx+118h]
mov r12, rdi
sub r12, rax
add rdx, r12
add rdx, 2
cmp rdx, rcx
jbe loc_D7D79
lea rax, [r14+2]
mov rdx, 0FFFFFFFFFFFFFFFDh
sub rdx, r14
shr rdx, 1
cmp rdx, rcx
lea rax, [rax+rcx*2]
mov rdx, 0FFFFFFFFFFFFFFFFh
cmova rdx, rax
mov [rbx+110h], rdx
mov rsi, [rbx+108h]
xor edi, edi
test rsi, rsi
jz short loc_D7D27
xor ecx, ecx
call my_realloc
mov [rbx+108h], rax
jmp short loc_D7D5C
loc_D7D27:
mov rsi, rdx
xor edx, edx
call my_malloc
mov [rbx+108h], rax
test rax, rax
jz loc_D7DF7
lea rsi, [rbx+88h]
lea rdx, [r12+1]
mov rdi, rax
call _memcpy
mov rax, [rbx+108h]
loc_D7D5C:
mov [rbx+118h], rax
add r12, rax
mov [rbx+120h], r12
mov rdi, r12
test rax, rax
jz loc_D7E09
loc_D7D79:
cmp rdi, rax
jbe short loc_D7D92
mov byte ptr [rdi], 2Fh ; '/'
mov rdi, [rbx+120h]
inc rdi
mov [rbx+120h], rdi
loc_D7D92:
mov rsi, r15
mov rdx, r14
call _memcpy
mov rax, [rbx+120h]
lea rcx, [rax+r14]
mov [rbx+120h], rcx
mov byte ptr [rax+r14], 0
test byte ptr [rbx], 1
mov rax, [rbx+148h]
jnz short loc_D7DDB
test rax, rax
jz short loc_D7DF3
mov rsi, [rbx+118h]
mov rdx, [rbx+120h]
sub rdx, rsi
mov rdi, rbx
jmp short loc_D7DE9
loc_D7DDB:
test rax, rax
jz short loc_D7DF3
mov rdi, rbx
mov rsi, r15
mov rdx, r14
loc_D7DE9:
pop rbx
pop r12
pop r14
pop r15
pop rbp
jmp rax
loc_D7DF3:
xor eax, eax
jmp short loc_D7E0E
loc_D7DF7:
mov qword ptr [rbx+118h], 0
mov [rbx+120h], r12
loc_D7E09:
mov eax, 1
loc_D7E0E:
pop rbx
pop r12
pop r14
pop r15
pop rbp
retn
|
long long my_xml_enter(long long a1, long long a2, long long a3)
{
_BYTE *v6; // rdi
unsigned long long v7; // rcx
unsigned long long v8; // rax
_BYTE *v9; // r12
bool v10; // cc
long long v11; // rdx
long long v12; // rsi
long long v13; // rax
_BYTE *v14; // r12
_BYTE *v15; // rcx
long long ( *v16)(long long, long long, long long); // rax
long long v17; // rsi
long long v18; // rdx
long long v19; // rdi
v6 = *(_BYTE **)(a1 + 288);
v7 = *(_QWORD *)(a1 + 272);
v8 = *(_QWORD *)(a1 + 280);
v9 = &v6[-v8];
if ( (unsigned long long)&v6[a3 - v8 + 2] > v7 )
{
v10 = (unsigned long long)(-3 - a3) >> 1 <= v7;
v11 = -1LL;
if ( !v10 )
v11 = a3 + 2 + 2 * v7;
*(_QWORD *)(a1 + 272) = v11;
v12 = *(_QWORD *)(a1 + 264);
if ( v12 )
{
v8 = my_realloc(0, v12, (const char *)v11, 0);
*(_QWORD *)(a1 + 264) = v8;
}
else
{
v13 = my_malloc(0, (const char *)v11, 0);
*(_QWORD *)(a1 + 264) = v13;
if ( !v13 )
{
*(_QWORD *)(a1 + 280) = 0LL;
*(_QWORD *)(a1 + 288) = v9;
return 1LL;
}
memcpy(v13, a1 + 136, v9 + 1);
v8 = *(_QWORD *)(a1 + 264);
}
*(_QWORD *)(a1 + 280) = v8;
v14 = &v9[v8];
*(_QWORD *)(a1 + 288) = v14;
v6 = v14;
if ( v8 )
goto LABEL_9;
return 1LL;
}
LABEL_9:
if ( (unsigned long long)v6 > v8 )
{
*v6 = 47;
v6 = (_BYTE *)(*(_QWORD *)(a1 + 288) + 1LL);
*(_QWORD *)(a1 + 288) = v6;
}
memcpy(v6, a2, a3);
v15 = (_BYTE *)(*(_QWORD *)(a1 + 288) + a3);
*(_QWORD *)(a1 + 288) = v15;
*v15 = 0;
v16 = *(long long ( **)(long long, long long, long long))(a1 + 328);
if ( (*(_BYTE *)a1 & 1) != 0 )
{
if ( v16 )
{
v19 = a1;
v17 = a2;
v18 = a3;
return v16(v19, v17, v18);
}
}
else if ( v16 )
{
v17 = *(_QWORD *)(a1 + 280);
v18 = *(_QWORD *)(a1 + 288) - v17;
v19 = a1;
return v16(v19, v17, v18);
}
return 0LL;
}
|
my_xml_enter:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
MOV R14,RDX
MOV R15,RSI
MOV RBX,RDI
MOV RDI,qword ptr [RDI + 0x120]
MOV RCX,qword ptr [RBX + 0x110]
MOV RAX,qword ptr [RBX + 0x118]
MOV R12,RDI
SUB R12,RAX
ADD RDX,R12
ADD RDX,0x2
CMP RDX,RCX
JBE 0x001d7d79
LEA RAX,[R14 + 0x2]
MOV RDX,-0x3
SUB RDX,R14
SHR RDX,0x1
CMP RDX,RCX
LEA RAX,[RAX + RCX*0x2]
MOV RDX,-0x1
CMOVA RDX,RAX
MOV qword ptr [RBX + 0x110],RDX
MOV RSI,qword ptr [RBX + 0x108]
XOR EDI,EDI
TEST RSI,RSI
JZ 0x001d7d27
XOR ECX,ECX
CALL 0x0019fed4
MOV qword ptr [RBX + 0x108],RAX
JMP 0x001d7d5c
LAB_001d7d27:
MOV RSI,RDX
XOR EDX,EDX
CALL 0x0019fdb1
MOV qword ptr [RBX + 0x108],RAX
TEST RAX,RAX
JZ 0x001d7df7
LEA RSI,[RBX + 0x88]
LEA RDX,[R12 + 0x1]
MOV RDI,RAX
CALL 0x00129080
MOV RAX,qword ptr [RBX + 0x108]
LAB_001d7d5c:
MOV qword ptr [RBX + 0x118],RAX
ADD R12,RAX
MOV qword ptr [RBX + 0x120],R12
MOV RDI,R12
TEST RAX,RAX
JZ 0x001d7e09
LAB_001d7d79:
CMP RDI,RAX
JBE 0x001d7d92
MOV byte ptr [RDI],0x2f
MOV RDI,qword ptr [RBX + 0x120]
INC RDI
MOV qword ptr [RBX + 0x120],RDI
LAB_001d7d92:
MOV RSI,R15
MOV RDX,R14
CALL 0x00129080
MOV RAX,qword ptr [RBX + 0x120]
LEA RCX,[RAX + R14*0x1]
MOV qword ptr [RBX + 0x120],RCX
MOV byte ptr [RAX + R14*0x1],0x0
TEST byte ptr [RBX],0x1
MOV RAX,qword ptr [RBX + 0x148]
JNZ 0x001d7ddb
TEST RAX,RAX
JZ 0x001d7df3
MOV RSI,qword ptr [RBX + 0x118]
MOV RDX,qword ptr [RBX + 0x120]
SUB RDX,RSI
MOV RDI,RBX
JMP 0x001d7de9
LAB_001d7ddb:
TEST RAX,RAX
JZ 0x001d7df3
MOV RDI,RBX
MOV RSI,R15
MOV RDX,R14
LAB_001d7de9:
POP RBX
POP R12
POP R14
POP R15
POP RBP
JMP RAX
LAB_001d7df3:
XOR EAX,EAX
JMP 0x001d7e0e
LAB_001d7df7:
MOV qword ptr [RBX + 0x118],0x0
MOV qword ptr [RBX + 0x120],R12
LAB_001d7e09:
MOV EAX,0x1
LAB_001d7e0e:
POP RBX
POP R12
POP R14
POP R15
POP RBP
RET
|
int8 my_xml_enter(byte *param_1,void *param_2,size_t param_3)
{
ulong uVar1;
code *UNRECOVERED_JUMPTABLE;
int1 *puVar2;
void *__dest;
int8 uVar3;
long lVar4;
long lVar5;
int1 *__dest_00;
__dest_00 = *(int1 **)(param_1 + 0x120);
uVar1 = *(ulong *)(param_1 + 0x110);
puVar2 = *(int1 **)(param_1 + 0x118);
lVar5 = (long)__dest_00 - (long)puVar2;
if (uVar1 < param_3 + lVar5 + 2) {
lVar4 = -1;
if (uVar1 < -param_3 - 3 >> 1) {
lVar4 = param_3 + 2 + uVar1 * 2;
}
*(long *)(param_1 + 0x110) = lVar4;
if (*(long *)(param_1 + 0x108) == 0) {
__dest = (void *)my_malloc(0,lVar4,0);
*(void **)(param_1 + 0x108) = __dest;
if (__dest != (void *)0x0) {
memcpy(__dest,param_1 + 0x88,lVar5 + 1);
puVar2 = *(int1 **)(param_1 + 0x108);
goto LAB_001d7d5c;
}
param_1[0x118] = 0;
param_1[0x119] = 0;
param_1[0x11a] = 0;
param_1[0x11b] = 0;
param_1[0x11c] = 0;
param_1[0x11d] = 0;
param_1[0x11e] = 0;
param_1[0x11f] = 0;
*(long *)(param_1 + 0x120) = lVar5;
}
else {
puVar2 = (int1 *)my_realloc();
*(int1 **)(param_1 + 0x108) = puVar2;
LAB_001d7d5c:
*(int1 **)(param_1 + 0x118) = puVar2;
__dest_00 = puVar2 + lVar5;
*(int1 **)(param_1 + 0x120) = __dest_00;
if (puVar2 != (int1 *)0x0) goto LAB_001d7d79;
}
uVar3 = 1;
}
else {
LAB_001d7d79:
if (puVar2 < __dest_00) {
*__dest_00 = 0x2f;
__dest_00 = (int1 *)(*(long *)(param_1 + 0x120) + 1);
*(int1 **)(param_1 + 0x120) = __dest_00;
}
memcpy(__dest_00,param_2,param_3);
lVar5 = *(long *)(param_1 + 0x120);
*(size_t *)(param_1 + 0x120) = lVar5 + param_3;
*(int1 *)(lVar5 + param_3) = 0;
UNRECOVERED_JUMPTABLE = *(code **)(param_1 + 0x148);
if ((*param_1 & 1) == 0) {
if (UNRECOVERED_JUMPTABLE != (code *)0x0) {
param_2 = *(void **)(param_1 + 0x118);
param_3 = *(long *)(param_1 + 0x120) - (long)param_2;
LAB_001d7de9:
/* WARNING: Could not recover jumptable at 0x001d7df1. Too many branches */
/* WARNING: Treating indirect jump as call */
uVar3 = (*UNRECOVERED_JUMPTABLE)(param_1,param_2,param_3);
return uVar3;
}
}
else if (UNRECOVERED_JUMPTABLE != (code *)0x0) goto LAB_001d7de9;
uVar3 = 0;
}
return uVar3;
}
|
|
64,250
|
reciprocal_fp
|
corpus-core[P]colibri-stateless/build_O3/_deps/blst-src/src/recip.c
|
static void reciprocal_fp(vec384 out, const vec384 inp)
{
static const vec384 Px8 = { /* left-aligned value of the modulus */
TO_LIMB_T(0xcff7fffffffd5558), TO_LIMB_T(0xf55ffff58a9ffffd),
TO_LIMB_T(0x39869507b587b120), TO_LIMB_T(0x23ba5c279c2895fb),
TO_LIMB_T(0x58dd3db21a5d66bb), TO_LIMB_T(0xd0088f51cbff34d2)
};
#ifdef __BLST_NO_ASM__
# define RRx4 BLS12_381_RR
#else
static const vec384 RRx4 = { /* (4<<768)%P */
TO_LIMB_T(0x5f7e7cd070d107c2), TO_LIMB_T(0xec839a9ac49c13c8),
TO_LIMB_T(0x6933786f44f4ef0b), TO_LIMB_T(0xd6bf8b9c676be983),
TO_LIMB_T(0xd3adaaaa4dcefb06), TO_LIMB_T(0x12601bc1d82bc175)
};
#endif
union { vec768 x; vec384 r[2]; } temp;
ct_inverse_mod_383(temp.x, inp, BLS12_381_P, Px8);
redc_mont_384(temp.r[0], temp.x, BLS12_381_P, p0);
mul_mont_384(temp.r[0], temp.r[0], RRx4, BLS12_381_P, p0);
#ifndef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
/* sign goes straight to flt_reciprocal */
mul_mont_384(temp.r[1], temp.r[0], inp, BLS12_381_P, p0);
if (vec_is_equal(temp.r[1], BLS12_381_Rx.p, sizeof(vec384)) |
vec_is_zero(temp.r[1], sizeof(vec384)))
vec_copy(out, temp.r[0], sizeof(vec384));
else
flt_reciprocal_fp(out, inp);
#else
vec_copy(out, temp.r[0], sizeof(vec384));
#endif
#undef RRx4
}
|
O3
|
c
|
reciprocal_fp:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x68, %rsp
movq %rsi, %r14
movq %rdi, -0x30(%rbp)
leaq 0x1df39(%rip), %r15 # 0x3fb10
leaq 0x1faf2(%rip), %rcx # 0x416d0
leaq -0x90(%rbp), %r12
movq %r12, %rdi
movq %r15, %rdx
callq 0x2dd20
movabsq $-0x760c000300030003, %r13 # imm = 0x89F3FFFCFFFCFFFD
movq %r12, %rdi
movq %r12, %rsi
movq %r15, %rdx
movq %r13, %rcx
callq 0x33da0
leaq 0x1faee(%rip), %rdx # 0x41700
movq %r12, %rdi
movq %r12, %rsi
movq %r15, %rcx
movq %r13, %r8
callq 0x344a0
leaq -0x60(%rbp), %rbx
movq %rbx, %rdi
movq %r12, %rsi
movq %r14, %rdx
movq %r15, %rcx
movq %r13, %r8
callq 0x344a0
leaq 0x1df06(%rip), %rsi # 0x3fb48
movl $0x30, %edx
movq %rbx, %rdi
callq 0x2ff80
movq %rax, %r15
movl $0x30, %esi
movq %rbx, %rdi
callq 0x2ff40
orq %r15, %rax
je 0x21c84
movups -0x90(%rbp), %xmm0
movups -0x80(%rbp), %xmm1
movups -0x70(%rbp), %xmm2
movq -0x30(%rbp), %rax
movups %xmm2, 0x20(%rax)
movups %xmm1, 0x10(%rax)
movups %xmm0, (%rax)
jmp 0x21c9c
leaq 0x1e1c5(%rip), %rdx # 0x3fe50
movl $0x17d, %ecx # imm = 0x17D
movq -0x30(%rbp), %rdi
movq %r14, %rsi
callq 0x25e87
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
|
reciprocal_fp:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 68h
mov r14, rsi
mov [rbp+var_30], rdi
lea r15, BLS12_381_P
lea rcx, reciprocal_fp_Px8
lea r12, [rbp+var_90]
mov rdi, r12
mov rdx, r15
call ct_inverse_mod_383
mov r13, 89F3FFFCFFFCFFFDh
mov rdi, r12
mov rsi, r12
mov rdx, r15
mov rcx, r13
call redc_mont_384
lea rdx, reciprocal_fp_RRx4
mov rdi, r12
mov rsi, r12
mov rcx, r15
mov r8, r13
call mul_mont_384
lea rbx, [rbp+var_60]
mov rdi, rbx
mov rsi, r12
mov rdx, r14
mov rcx, r15
mov r8, r13
call mul_mont_384
lea rsi, BLS12_381_Rx
mov edx, 30h ; '0'
mov rdi, rbx
call vec_is_equal_16x
mov r15, rax
mov esi, 30h ; '0'
mov rdi, rbx
call vec_is_zero_16x
or rax, r15
jz short loc_21C84
movups xmm0, [rbp+var_90]
movups xmm1, [rbp+var_80]
movups xmm2, [rbp+var_70]
mov rax, [rbp+var_30]
movups xmmword ptr [rax+20h], xmm2
movups xmmword ptr [rax+10h], xmm1
movups xmmword ptr [rax], xmm0
jmp short loc_21C9C
loc_21C84:
lea rdx, _flt_reciprocal_fp_BLS12_381_P_minus_2
mov ecx, 17Dh
mov rdi, [rbp+var_30]
mov rsi, r14
call exp_mont_384
loc_21C9C:
add rsp, 68h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
|
_OWORD * reciprocal_fp(_OWORD *a1, long long a2)
{
long long is_equal_16x; // r15
__int128 v3; // xmm0
__int128 v4; // xmm1
_OWORD *result; // rax
_OWORD v6[3]; // [rsp+0h] [rbp-90h] BYREF
_BYTE v7[48]; // [rsp+30h] [rbp-60h] BYREF
_OWORD *v8; // [rsp+60h] [rbp-30h]
v8 = a1;
ct_inverse_mod_383(v6, a2, &BLS12_381_P, &reciprocal_fp_Px8);
redc_mont_384(v6, v6, &BLS12_381_P, 0x89F3FFFCFFFCFFFDLL);
mul_mont_384(v6, v6, &reciprocal_fp_RRx4, &BLS12_381_P, 0x89F3FFFCFFFCFFFDLL);
mul_mont_384(v7, v6, a2, &BLS12_381_P, 0x89F3FFFCFFFCFFFDLL);
is_equal_16x = vec_is_equal_16x(v7, &BLS12_381_Rx, 48LL);
if ( !(is_equal_16x | vec_is_zero_16x(v7, 48LL)) )
return (_OWORD *)exp_mont_384(v8, a2, &flt_reciprocal_fp_BLS12_381_P_minus_2, 381LL);
v3 = v6[0];
v4 = v6[1];
result = v8;
v8[2] = v6[2];
result[1] = v4;
*result = v3;
return result;
}
|
reciprocal_fp:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x68
MOV R14,RSI
MOV qword ptr [RBP + -0x30],RDI
LEA R15,[0x13fb10]
LEA RCX,[0x1416d0]
LEA R12,[RBP + -0x90]
MOV RDI,R12
MOV RDX,R15
CALL 0x0012dd20
MOV R13,-0x760c000300030003
MOV RDI,R12
MOV RSI,R12
MOV RDX,R15
MOV RCX,R13
CALL 0x00133da0
LEA RDX,[0x141700]
MOV RDI,R12
MOV RSI,R12
MOV RCX,R15
MOV R8,R13
CALL 0x001344a0
LEA RBX,[RBP + -0x60]
MOV RDI,RBX
MOV RSI,R12
MOV RDX,R14
MOV RCX,R15
MOV R8,R13
CALL 0x001344a0
LEA RSI,[0x13fb48]
MOV EDX,0x30
MOV RDI,RBX
CALL 0x0012ff80
MOV R15,RAX
MOV ESI,0x30
MOV RDI,RBX
CALL 0x0012ff40
OR RAX,R15
JZ 0x00121c84
MOVUPS XMM0,xmmword ptr [RBP + -0x90]
MOVUPS XMM1,xmmword ptr [RBP + -0x80]
MOVUPS XMM2,xmmword ptr [RBP + -0x70]
MOV RAX,qword ptr [RBP + -0x30]
MOVUPS xmmword ptr [RAX + 0x20],XMM2
MOVUPS xmmword ptr [RAX + 0x10],XMM1
MOVUPS xmmword ptr [RAX],XMM0
JMP 0x00121c9c
LAB_00121c84:
LEA RDX,[0x13fe50]
MOV ECX,0x17d
MOV RDI,qword ptr [RBP + -0x30]
MOV RSI,R14
CALL 0x00125e87
LAB_00121c9c:
ADD RSP,0x68
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
void reciprocal_fp(int8 *param_1,int8 param_2)
{
long lVar1;
long lVar2;
int8 local_98;
int8 uStack_90;
int8 local_88;
int8 uStack_80;
int8 local_78;
int8 uStack_70;
int1 local_68 [48];
int8 *local_38;
local_38 = param_1;
ct_inverse_mod_383(&local_98,param_2,BLS12_381_P,reciprocal_fp_Px8);
redc_mont_384(&local_98,&local_98,BLS12_381_P,0x89f3fffcfffcfffd);
mul_mont_384(&local_98,&local_98,reciprocal_fp_RRx4,BLS12_381_P,0x89f3fffcfffcfffd);
mul_mont_384(local_68,&local_98,param_2,BLS12_381_P,0x89f3fffcfffcfffd);
lVar1 = vec_is_equal_16x(local_68,&BLS12_381_Rx,0x30);
lVar2 = vec_is_zero_16x(local_68,0x30);
if (lVar2 == 0 && lVar1 == 0) {
exp_mont_384(local_38,param_2,flt_reciprocal_fp_BLS12_381_P_minus_2,0x17d);
}
else {
local_38[4] = local_78;
local_38[5] = uStack_70;
local_38[2] = local_88;
local_38[3] = uStack_80;
*local_38 = local_98;
local_38[1] = uStack_90;
}
return;
}
|
|
64,251
|
js_array_iterator_next
|
bluesky950520[P]quickjs/quickjs.c
|
static JSValue js_array_iterator_next(JSContext *ctx, JSValue this_val,
int argc, JSValue *argv,
BOOL *pdone, int magic)
{
JSArrayIteratorData *it;
uint32_t len, idx;
JSValue val, obj;
JSObject *p;
it = JS_GetOpaque2(ctx, this_val, JS_CLASS_ARRAY_ITERATOR);
if (!it)
goto fail1;
if (JS_IsUndefined(it->obj))
goto done;
p = JS_VALUE_GET_OBJ(it->obj);
if (p->class_id >= JS_CLASS_UINT8C_ARRAY &&
p->class_id <= JS_CLASS_FLOAT64_ARRAY) {
if (typed_array_is_oob(p)) {
JS_ThrowTypeErrorArrayBufferOOB(ctx);
goto fail1;
}
len = p->u.array.count;
} else {
if (js_get_length32(ctx, &len, it->obj)) {
fail1:
*pdone = FALSE;
return JS_EXCEPTION;
}
}
idx = it->idx;
if (idx >= len) {
JS_FreeValue(ctx, it->obj);
it->obj = JS_UNDEFINED;
done:
*pdone = TRUE;
return JS_UNDEFINED;
}
it->idx = idx + 1;
*pdone = FALSE;
if (it->kind == JS_ITERATOR_KIND_KEY) {
return js_uint32(idx);
} else {
val = JS_GetPropertyUint32(ctx, it->obj, idx);
if (JS_IsException(val))
return JS_EXCEPTION;
if (it->kind == JS_ITERATOR_KIND_VALUE) {
return val;
} else {
JSValue args[2];
JSValue num;
num = js_uint32(idx);
args[0] = num;
args[1] = val;
obj = js_create_array(ctx, 2, args);
JS_FreeValue(ctx, val);
JS_FreeValue(ctx, num);
return obj;
}
}
}
|
O0
|
c
|
js_array_iterator_next:
subq $0xf8, %rsp
movl 0x100(%rsp), %eax
movq %rsi, 0xd8(%rsp)
movq %rdx, 0xe0(%rsp)
movq %rdi, 0xd0(%rsp)
movl %ecx, 0xcc(%rsp)
movq %r8, 0xc0(%rsp)
movq %r9, 0xb8(%rsp)
movq 0xd0(%rsp), %rdi
movq 0xd8(%rsp), %rsi
movq 0xe0(%rsp), %rdx
movl $0x2c, %ecx
callq 0x383b0
movq %rax, 0xb0(%rsp)
cmpq $0x0, 0xb0(%rsp)
jne 0x703b7
jmp 0x70474
movq 0xb0(%rsp), %rax
movq (%rax), %rdi
movq 0x8(%rax), %rsi
callq 0x2e260
cmpl $0x0, %eax
je 0x703d5
jmp 0x70508
movq 0xb0(%rsp), %rax
movq (%rax), %rax
movq %rax, 0x80(%rsp)
movq 0x80(%rsp), %rax
movzwl 0x6(%rax), %eax
cmpl $0x15, %eax
jl 0x70449
movq 0x80(%rsp), %rax
movzwl 0x6(%rax), %eax
cmpl $0x20, %eax
jg 0x70449
movq 0x80(%rsp), %rdi
callq 0x589d0
cmpl $0x0, %eax
je 0x70435
movq 0xd0(%rsp), %rdi
callq 0x58ae0
movq %rax, 0x70(%rsp)
movq %rdx, 0x78(%rsp)
jmp 0x70474
movq 0x80(%rsp), %rax
movl 0x40(%rax), %eax
movl %eax, 0xac(%rsp)
jmp 0x704a0
movq 0xd0(%rsp), %rdi
movq 0xb0(%rsp), %rax
movq (%rax), %rdx
movq 0x8(%rax), %rcx
leaq 0xac(%rsp), %rsi
callq 0x6db70
cmpl $0x0, %eax
je 0x7049e
jmp 0x70474
movq 0xb8(%rsp), %rax
movl $0x0, (%rax)
movl $0x0, 0xe8(%rsp)
movq $0x6, 0xf0(%rsp)
jmp 0x70719
jmp 0x704a0
movq 0xb0(%rsp), %rax
movl 0x14(%rax), %eax
movl %eax, 0xa8(%rsp)
movl 0xa8(%rsp), %eax
cmpl 0xac(%rsp), %eax
jb 0x70532
movq 0xd0(%rsp), %rdi
movq 0xb0(%rsp), %rax
movq (%rax), %rsi
movq 0x8(%rax), %rdx
callq 0x23c90
movq 0xb0(%rsp), %rax
movl $0x0, 0x60(%rsp)
movq $0x3, 0x68(%rsp)
movq 0x60(%rsp), %rcx
movq %rcx, (%rax)
movq 0x68(%rsp), %rcx
movq %rcx, 0x8(%rax)
movq 0xb8(%rsp), %rax
movl $0x1, (%rax)
movl $0x0, 0xe8(%rsp)
movq $0x3, 0xf0(%rsp)
jmp 0x70719
movl 0xa8(%rsp), %ecx
addl $0x1, %ecx
movq 0xb0(%rsp), %rax
movl %ecx, 0x14(%rax)
movq 0xb8(%rsp), %rax
movl $0x0, (%rax)
movq 0xb0(%rsp), %rax
cmpl $0x0, 0x10(%rax)
jne 0x70584
movl 0xa8(%rsp), %edi
callq 0x33b60
movq %rax, 0xe8(%rsp)
movq %rdx, 0xf0(%rsp)
jmp 0x70719
movq 0xd0(%rsp), %rdi
movq 0xb0(%rsp), %rax
movl 0xa8(%rsp), %ecx
movq (%rax), %rsi
movq 0x8(%rax), %rdx
callq 0x31460
movq %rax, 0x50(%rsp)
movq %rdx, 0x58(%rsp)
movq 0x50(%rsp), %rax
movq %rax, 0x98(%rsp)
movq 0x58(%rsp), %rax
movq %rax, 0xa0(%rsp)
movq 0x98(%rsp), %rdi
movq 0xa0(%rsp), %rsi
callq 0x23cc0
cmpl $0x0, %eax
je 0x70601
movl $0x0, 0xe8(%rsp)
movq $0x6, 0xf0(%rsp)
jmp 0x70719
movq 0xb0(%rsp), %rax
cmpl $0x1, 0x10(%rax)
jne 0x70634
movq 0x98(%rsp), %rax
movq %rax, 0xe8(%rsp)
movq 0xa0(%rsp), %rax
movq %rax, 0xf0(%rsp)
jmp 0x70719
movl 0xa8(%rsp), %edi
callq 0x33b60
movq %rax, 0x10(%rsp)
movq %rdx, 0x18(%rsp)
movq 0x10(%rsp), %rax
movq %rax, 0x20(%rsp)
movq 0x18(%rsp), %rax
movq %rax, 0x28(%rsp)
movq 0x20(%rsp), %rax
movq %rax, 0x30(%rsp)
movq 0x28(%rsp), %rax
movq %rax, 0x38(%rsp)
movq 0x98(%rsp), %rax
movq %rax, 0x40(%rsp)
movq 0xa0(%rsp), %rax
movq %rax, 0x48(%rsp)
movq 0xd0(%rsp), %rdi
leaq 0x30(%rsp), %rdx
movl $0x2, %esi
callq 0x70850
movq %rax, (%rsp)
movq %rdx, 0x8(%rsp)
movq (%rsp), %rax
movq %rax, 0x88(%rsp)
movq 0x8(%rsp), %rax
movq %rax, 0x90(%rsp)
movq 0xd0(%rsp), %rdi
movq 0x98(%rsp), %rsi
movq 0xa0(%rsp), %rdx
callq 0x23c90
movq 0xd0(%rsp), %rdi
movq 0x20(%rsp), %rsi
movq 0x28(%rsp), %rdx
callq 0x23c90
movq 0x88(%rsp), %rax
movq %rax, 0xe8(%rsp)
movq 0x90(%rsp), %rax
movq %rax, 0xf0(%rsp)
movq 0xe8(%rsp), %rax
movq 0xf0(%rsp), %rdx
addq $0xf8, %rsp
retq
nopw %cs:(%rax,%rax)
|
js_array_iterator_next:
sub rsp, 0F8h
mov eax, [rsp+0F8h+arg_0]
mov [rsp+0F8h+var_20], rsi
mov [rsp+0F8h+var_18], rdx
mov [rsp+0F8h+var_28], rdi
mov [rsp+0F8h+var_2C], ecx
mov [rsp+0F8h+var_38], r8
mov [rsp+0F8h+var_40], r9
mov rdi, [rsp+0F8h+var_28]
mov rsi, [rsp+0F8h+var_20]
mov rdx, [rsp+0F8h+var_18]
mov ecx, 2Ch ; ','
call JS_GetOpaque2
mov [rsp+0F8h+var_48], rax
cmp [rsp+0F8h+var_48], 0
jnz short loc_703B7
jmp loc_70474
loc_703B7:
mov rax, [rsp+0F8h+var_48]
mov rdi, [rax]
mov rsi, [rax+8]
call JS_IsUndefined_0
cmp eax, 0
jz short loc_703D5
jmp loc_70508
loc_703D5:
mov rax, [rsp+0F8h+var_48]
mov rax, [rax]
mov [rsp+0F8h+var_78], rax
mov rax, [rsp+0F8h+var_78]
movzx eax, word ptr [rax+6]
cmp eax, 15h
jl short loc_70449
mov rax, [rsp+0F8h+var_78]
movzx eax, word ptr [rax+6]
cmp eax, 20h ; ' '
jg short loc_70449
mov rdi, [rsp+0F8h+var_78]
call typed_array_is_oob
cmp eax, 0
jz short loc_70435
mov rdi, [rsp+0F8h+var_28]
call JS_ThrowTypeErrorArrayBufferOOB
mov [rsp+0F8h+var_88], rax
mov [rsp+0F8h+var_80], rdx
jmp short loc_70474
loc_70435:
mov rax, [rsp+0F8h+var_78]
mov eax, [rax+40h]
mov [rsp+0F8h+var_4C], eax
jmp short loc_704A0
loc_70449:
mov rdi, [rsp+0F8h+var_28]
mov rax, [rsp+0F8h+var_48]
mov rdx, [rax]
mov rcx, [rax+8]
lea rsi, [rsp+0F8h+var_4C]
call js_get_length32
cmp eax, 0
jz short loc_7049E
jmp short $+2
loc_70474:
mov rax, [rsp+0F8h+var_40]
mov dword ptr [rax], 0
mov dword ptr [rsp+0F8h+var_10], 0
mov [rsp+0F8h+var_8], 6
jmp loc_70719
loc_7049E:
jmp short $+2
loc_704A0:
mov rax, [rsp+0F8h+var_48]
mov eax, [rax+14h]
mov [rsp+0F8h+var_50], eax
mov eax, [rsp+0F8h+var_50]
cmp eax, [rsp+0F8h+var_4C]
jb short loc_70532
mov rdi, [rsp+0F8h+var_28]
mov rax, [rsp+0F8h+var_48]
mov rsi, [rax]
mov rdx, [rax+8]
call JS_FreeValue
mov rax, [rsp+0F8h+var_48]
mov dword ptr [rsp+0F8h+var_98], 0
mov [rsp+0F8h+var_90], 3
mov rcx, [rsp+0F8h+var_98]
mov [rax], rcx
mov rcx, [rsp+0F8h+var_90]
mov [rax+8], rcx
loc_70508:
mov rax, [rsp+0F8h+var_40]
mov dword ptr [rax], 1
mov dword ptr [rsp+0F8h+var_10], 0
mov [rsp+0F8h+var_8], 3
jmp loc_70719
loc_70532:
mov ecx, [rsp+0F8h+var_50]
add ecx, 1
mov rax, [rsp+0F8h+var_48]
mov [rax+14h], ecx
mov rax, [rsp+0F8h+var_40]
mov dword ptr [rax], 0
mov rax, [rsp+0F8h+var_48]
cmp dword ptr [rax+10h], 0
jnz short loc_70584
mov edi, [rsp+0F8h+var_50]
call js_uint32
mov [rsp+0F8h+var_10], rax
mov [rsp+0F8h+var_8], rdx
jmp loc_70719
loc_70584:
mov rdi, [rsp+0F8h+var_28]
mov rax, [rsp+0F8h+var_48]
mov ecx, [rsp+0F8h+var_50]
mov rsi, [rax]
mov rdx, [rax+8]
call JS_GetPropertyUint32
mov [rsp+0F8h+var_A8], rax
mov [rsp+0F8h+var_A0], rdx
mov rax, [rsp+0F8h+var_A8]
mov [rsp+0F8h+var_60], rax
mov rax, [rsp+0F8h+var_A0]
mov [rsp+0F8h+var_58], rax
mov rdi, [rsp+0F8h+var_60]
mov rsi, [rsp+0F8h+var_58]
call JS_IsException_1
cmp eax, 0
jz short loc_70601
mov dword ptr [rsp+0F8h+var_10], 0
mov [rsp+0F8h+var_8], 6
jmp loc_70719
loc_70601:
mov rax, [rsp+0F8h+var_48]
cmp dword ptr [rax+10h], 1
jnz short loc_70634
mov rax, [rsp+0F8h+var_60]
mov [rsp+0F8h+var_10], rax
mov rax, [rsp+0F8h+var_58]
mov [rsp+0F8h+var_8], rax
jmp loc_70719
loc_70634:
mov edi, [rsp+0F8h+var_50]
call js_uint32
mov [rsp+0F8h+var_E8], rax
mov [rsp+0F8h+var_E0], rdx
mov rax, [rsp+0F8h+var_E8]
mov [rsp+0F8h+var_D8], rax
mov rax, [rsp+0F8h+var_E0]
mov [rsp+0F8h+var_D0], rax
mov rax, [rsp+0F8h+var_D8]
mov [rsp+0F8h+var_C8], rax
mov rax, [rsp+0F8h+var_D0]
mov [rsp+0F8h+var_C0], rax
mov rax, [rsp+0F8h+var_60]
mov [rsp+0F8h+var_B8], rax
mov rax, [rsp+0F8h+var_58]
mov [rsp+0F8h+var_B0], rax
mov rdi, [rsp+0F8h+var_28]
lea rdx, [rsp+0F8h+var_C8]
mov esi, 2
call js_create_array
mov [rsp+0F8h+var_F8], rax
mov [rsp+0F8h+var_F0], rdx
mov rax, [rsp+0F8h+var_F8]
mov [rsp+0F8h+var_70], rax
mov rax, [rsp+0F8h+var_F0]
mov [rsp+0F8h+var_68], rax
mov rdi, [rsp+0F8h+var_28]
mov rsi, [rsp+0F8h+var_60]
mov rdx, [rsp+0F8h+var_58]
call JS_FreeValue
mov rdi, [rsp+0F8h+var_28]
mov rsi, [rsp+0F8h+var_D8]
mov rdx, [rsp+0F8h+var_D0]
call JS_FreeValue
mov rax, [rsp+0F8h+var_70]
mov [rsp+0F8h+var_10], rax
mov rax, [rsp+0F8h+var_68]
mov [rsp+0F8h+var_8], rax
loc_70719:
mov rax, [rsp+0F8h+var_10]
mov rdx, [rsp+0F8h+var_8]
add rsp, 0F8h
retn
|
long long js_array_iterator_next(
long long a1,
long long a2,
long long a3,
int a4,
long long a5,
_DWORD *a6,
__m128 a7,
__m128 a8,
__m128 a9,
__m128 a10,
double a11,
double a12,
__m128 a13,
__m128 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
long long v21; // rdx
long long v22; // rax
long long v23; // rdx
long long v24; // rdx
long long v25; // rdx
long long v26; // rdx
long long v28; // [rsp+10h] [rbp-E8h]
long long v29; // [rsp+28h] [rbp-D0h]
_QWORD v30[4]; // [rsp+30h] [rbp-C8h] BYREF
long long PropertyUint32; // [rsp+50h] [rbp-A8h]
long long v32; // [rsp+58h] [rbp-A0h]
long long v33; // [rsp+60h] [rbp-98h]
long long v34; // [rsp+68h] [rbp-90h]
long long v35; // [rsp+70h] [rbp-88h]
long long v36; // [rsp+78h] [rbp-80h]
long long v37; // [rsp+80h] [rbp-78h]
long long array; // [rsp+88h] [rbp-70h]
long long v39; // [rsp+90h] [rbp-68h]
long long v40; // [rsp+98h] [rbp-60h]
long long v41; // [rsp+A0h] [rbp-58h]
unsigned int v42; // [rsp+A8h] [rbp-50h]
unsigned int v43; // [rsp+ACh] [rbp-4Ch] BYREF
long long Opaque2; // [rsp+B0h] [rbp-48h]
_DWORD *v45; // [rsp+B8h] [rbp-40h]
long long v46; // [rsp+C0h] [rbp-38h]
int v47; // [rsp+CCh] [rbp-2Ch]
long long v48; // [rsp+D0h] [rbp-28h]
long long v49; // [rsp+D8h] [rbp-20h]
long long v50; // [rsp+E0h] [rbp-18h]
long long v51; // [rsp+E8h] [rbp-10h]
long long v52; // [rsp+F0h] [rbp-8h]
v49 = a2;
v50 = a3;
v48 = a1;
v47 = a4;
v46 = a5;
v45 = a6;
Opaque2 = JS_GetOpaque2(a1, a2, a3, 0x2Cu);
if ( !Opaque2 )
goto LABEL_9;
v14 = *(_QWORD *)(Opaque2 + 8);
if ( JS_IsUndefined_0(*(_QWORD *)Opaque2, v14) )
{
LABEL_12:
*v45 = 1;
LODWORD(v51) = 0;
v52 = 3LL;
return v51;
}
v37 = *(_QWORD *)Opaque2;
if ( *(unsigned __int16 *)(v37 + 6) < 0x15u || *(unsigned __int16 *)(v37 + 6) > 0x20u )
{
if ( (unsigned int)js_get_length32(v48, &v43, *(_QWORD *)Opaque2, *(_QWORD *)(Opaque2 + 8)) )
goto LABEL_9;
}
else
{
if ( typed_array_is_oob(v37) )
{
v35 = JS_ThrowTypeErrorArrayBufferOOB(v48, a7, a8, a9, a10, v19, v20, a13, a14, v14, v15, v16, v17, v18);
v36 = v21;
LABEL_9:
*v45 = 0;
LODWORD(v51) = 0;
v52 = 6LL;
return v51;
}
v43 = *(_DWORD *)(v37 + 64);
}
v42 = *(_DWORD *)(Opaque2 + 20);
if ( v42 >= v43 )
{
JS_FreeValue(v48, *(_QWORD *)Opaque2, *(_QWORD *)(Opaque2 + 8));
v22 = Opaque2;
LODWORD(v33) = 0;
v34 = 3LL;
*(_QWORD *)Opaque2 = v33;
*(_QWORD *)(v22 + 8) = v34;
goto LABEL_12;
}
*(_DWORD *)(Opaque2 + 20) = v42 + 1;
*v45 = 0;
if ( *(_DWORD *)(Opaque2 + 16) )
{
PropertyUint32 = JS_GetPropertyUint32(v48, *(_QWORD *)Opaque2, *(_QWORD *)(Opaque2 + 8), v42);
v32 = v24;
v40 = PropertyUint32;
v41 = v24;
if ( JS_IsException_1(PropertyUint32, v24) )
{
LODWORD(v51) = 0;
v52 = 6LL;
}
else if ( *(_DWORD *)(Opaque2 + 16) == 1 )
{
v51 = v40;
v52 = v41;
}
else
{
v28 = js_uint32(v42);
v29 = v25;
v30[0] = v28;
v30[1] = v25;
v30[2] = v40;
v30[3] = v41;
array = js_create_array(v48, 2LL, v30);
v39 = v26;
JS_FreeValue(v48, v40, v41);
JS_FreeValue(v48, v28, v29);
v51 = array;
v52 = v39;
}
}
else
{
v51 = js_uint32(v42);
v52 = v23;
}
return v51;
}
|
js_array_iterator_next:
SUB RSP,0xf8
MOV EAX,dword ptr [RSP + 0x100]
MOV qword ptr [RSP + 0xd8],RSI
MOV qword ptr [RSP + 0xe0],RDX
MOV qword ptr [RSP + 0xd0],RDI
MOV dword ptr [RSP + 0xcc],ECX
MOV qword ptr [RSP + 0xc0],R8
MOV qword ptr [RSP + 0xb8],R9
MOV RDI,qword ptr [RSP + 0xd0]
MOV RSI,qword ptr [RSP + 0xd8]
MOV RDX,qword ptr [RSP + 0xe0]
MOV ECX,0x2c
CALL 0x001383b0
MOV qword ptr [RSP + 0xb0],RAX
CMP qword ptr [RSP + 0xb0],0x0
JNZ 0x001703b7
JMP 0x00170474
LAB_001703b7:
MOV RAX,qword ptr [RSP + 0xb0]
MOV RDI,qword ptr [RAX]
MOV RSI,qword ptr [RAX + 0x8]
CALL 0x0012e260
CMP EAX,0x0
JZ 0x001703d5
JMP 0x00170508
LAB_001703d5:
MOV RAX,qword ptr [RSP + 0xb0]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RSP + 0x80],RAX
MOV RAX,qword ptr [RSP + 0x80]
MOVZX EAX,word ptr [RAX + 0x6]
CMP EAX,0x15
JL 0x00170449
MOV RAX,qword ptr [RSP + 0x80]
MOVZX EAX,word ptr [RAX + 0x6]
CMP EAX,0x20
JG 0x00170449
MOV RDI,qword ptr [RSP + 0x80]
CALL 0x001589d0
CMP EAX,0x0
JZ 0x00170435
MOV RDI,qword ptr [RSP + 0xd0]
CALL 0x00158ae0
MOV qword ptr [RSP + 0x70],RAX
MOV qword ptr [RSP + 0x78],RDX
JMP 0x00170474
LAB_00170435:
MOV RAX,qword ptr [RSP + 0x80]
MOV EAX,dword ptr [RAX + 0x40]
MOV dword ptr [RSP + 0xac],EAX
JMP 0x001704a0
LAB_00170449:
MOV RDI,qword ptr [RSP + 0xd0]
MOV RAX,qword ptr [RSP + 0xb0]
MOV RDX,qword ptr [RAX]
MOV RCX,qword ptr [RAX + 0x8]
LEA RSI,[RSP + 0xac]
CALL 0x0016db70
CMP EAX,0x0
JZ 0x0017049e
JMP 0x00170474
LAB_00170474:
MOV RAX,qword ptr [RSP + 0xb8]
MOV dword ptr [RAX],0x0
MOV dword ptr [RSP + 0xe8],0x0
MOV qword ptr [RSP + 0xf0],0x6
JMP 0x00170719
LAB_0017049e:
JMP 0x001704a0
LAB_001704a0:
MOV RAX,qword ptr [RSP + 0xb0]
MOV EAX,dword ptr [RAX + 0x14]
MOV dword ptr [RSP + 0xa8],EAX
MOV EAX,dword ptr [RSP + 0xa8]
CMP EAX,dword ptr [RSP + 0xac]
JC 0x00170532
MOV RDI,qword ptr [RSP + 0xd0]
MOV RAX,qword ptr [RSP + 0xb0]
MOV RSI,qword ptr [RAX]
MOV RDX,qword ptr [RAX + 0x8]
CALL 0x00123c90
MOV RAX,qword ptr [RSP + 0xb0]
MOV dword ptr [RSP + 0x60],0x0
MOV qword ptr [RSP + 0x68],0x3
MOV RCX,qword ptr [RSP + 0x60]
MOV qword ptr [RAX],RCX
MOV RCX,qword ptr [RSP + 0x68]
MOV qword ptr [RAX + 0x8],RCX
LAB_00170508:
MOV RAX,qword ptr [RSP + 0xb8]
MOV dword ptr [RAX],0x1
MOV dword ptr [RSP + 0xe8],0x0
MOV qword ptr [RSP + 0xf0],0x3
JMP 0x00170719
LAB_00170532:
MOV ECX,dword ptr [RSP + 0xa8]
ADD ECX,0x1
MOV RAX,qword ptr [RSP + 0xb0]
MOV dword ptr [RAX + 0x14],ECX
MOV RAX,qword ptr [RSP + 0xb8]
MOV dword ptr [RAX],0x0
MOV RAX,qword ptr [RSP + 0xb0]
CMP dword ptr [RAX + 0x10],0x0
JNZ 0x00170584
MOV EDI,dword ptr [RSP + 0xa8]
CALL 0x00133b60
MOV qword ptr [RSP + 0xe8],RAX
MOV qword ptr [RSP + 0xf0],RDX
JMP 0x00170719
LAB_00170584:
MOV RDI,qword ptr [RSP + 0xd0]
MOV RAX,qword ptr [RSP + 0xb0]
MOV ECX,dword ptr [RSP + 0xa8]
MOV RSI,qword ptr [RAX]
MOV RDX,qword ptr [RAX + 0x8]
CALL 0x00131460
MOV qword ptr [RSP + 0x50],RAX
MOV qword ptr [RSP + 0x58],RDX
MOV RAX,qword ptr [RSP + 0x50]
MOV qword ptr [RSP + 0x98],RAX
MOV RAX,qword ptr [RSP + 0x58]
MOV qword ptr [RSP + 0xa0],RAX
MOV RDI,qword ptr [RSP + 0x98]
MOV RSI,qword ptr [RSP + 0xa0]
CALL 0x00123cc0
CMP EAX,0x0
JZ 0x00170601
MOV dword ptr [RSP + 0xe8],0x0
MOV qword ptr [RSP + 0xf0],0x6
JMP 0x00170719
LAB_00170601:
MOV RAX,qword ptr [RSP + 0xb0]
CMP dword ptr [RAX + 0x10],0x1
JNZ 0x00170634
MOV RAX,qword ptr [RSP + 0x98]
MOV qword ptr [RSP + 0xe8],RAX
MOV RAX,qword ptr [RSP + 0xa0]
MOV qword ptr [RSP + 0xf0],RAX
JMP 0x00170719
LAB_00170634:
MOV EDI,dword ptr [RSP + 0xa8]
CALL 0x00133b60
MOV qword ptr [RSP + 0x10],RAX
MOV qword ptr [RSP + 0x18],RDX
MOV RAX,qword ptr [RSP + 0x10]
MOV qword ptr [RSP + 0x20],RAX
MOV RAX,qword ptr [RSP + 0x18]
MOV qword ptr [RSP + 0x28],RAX
MOV RAX,qword ptr [RSP + 0x20]
MOV qword ptr [RSP + 0x30],RAX
MOV RAX,qword ptr [RSP + 0x28]
MOV qword ptr [RSP + 0x38],RAX
MOV RAX,qword ptr [RSP + 0x98]
MOV qword ptr [RSP + 0x40],RAX
MOV RAX,qword ptr [RSP + 0xa0]
MOV qword ptr [RSP + 0x48],RAX
MOV RDI,qword ptr [RSP + 0xd0]
LEA RDX,[RSP + 0x30]
MOV ESI,0x2
CALL 0x00170850
MOV qword ptr [RSP],RAX
MOV qword ptr [RSP + 0x8],RDX
MOV RAX,qword ptr [RSP]
MOV qword ptr [RSP + 0x88],RAX
MOV RAX,qword ptr [RSP + 0x8]
MOV qword ptr [RSP + 0x90],RAX
MOV RDI,qword ptr [RSP + 0xd0]
MOV RSI,qword ptr [RSP + 0x98]
MOV RDX,qword ptr [RSP + 0xa0]
CALL 0x00123c90
MOV RDI,qword ptr [RSP + 0xd0]
MOV RSI,qword ptr [RSP + 0x20]
MOV RDX,qword ptr [RSP + 0x28]
CALL 0x00123c90
MOV RAX,qword ptr [RSP + 0x88]
MOV qword ptr [RSP + 0xe8],RAX
MOV RAX,qword ptr [RSP + 0x90]
MOV qword ptr [RSP + 0xf0],RAX
LAB_00170719:
MOV RAX,qword ptr [RSP + 0xe8]
MOV RDX,qword ptr [RSP + 0xf0]
ADD RSP,0xf8
RET
|
int1 [16]
js_array_iterator_next
(int8 param_1,int8 param_2,int8 param_3,int4 param_4,
int8 param_5,int4 *param_6)
{
int iVar1;
int8 uVar2;
int8 uVar3;
int1 auVar4 [16];
int1 local_c8 [16];
int1 local_b8 [16];
int1 local_a8 [16];
uint uStack_94;
long local_78;
int1 local_70 [16];
int1 local_60 [16];
uint local_50;
uint local_4c;
long *local_48;
int4 *local_40;
int8 local_38;
int4 local_2c;
int8 local_28;
int8 local_20;
int8 local_18;
int4 local_10;
int4 uStack_c;
int8 local_8;
local_40 = param_6;
local_38 = param_5;
local_2c = param_4;
local_28 = param_1;
local_20 = param_2;
local_18 = param_3;
local_48 = (long *)JS_GetOpaque2(param_1,param_2,param_3,0x2c);
if (local_48 == (long *)0x0) goto LAB_00170474;
iVar1 = JS_IsUndefined(*local_48,local_48[1]);
if (iVar1 == 0) {
local_78 = *local_48;
if ((*(ushort *)(local_78 + 6) < 0x15) || (0x20 < *(ushort *)(local_78 + 6))) {
iVar1 = js_get_length32(local_28,&local_4c,*local_48,local_48[1]);
if (iVar1 == 0) goto LAB_001704a0;
}
else {
iVar1 = typed_array_is_oob(local_78);
if (iVar1 == 0) {
local_4c = *(uint *)(local_78 + 0x40);
LAB_001704a0:
local_50 = *(uint *)((long)local_48 + 0x14);
if (local_50 < local_4c) {
*(uint *)((long)local_48 + 0x14) = local_50 + 1;
*local_40 = 0;
if ((int)local_48[2] == 0) {
auVar4 = js_uint32(local_50);
local_8 = auVar4._8_8_;
local_10 = auVar4._0_4_;
uStack_c = auVar4._4_4_;
}
else {
local_a8 = JS_GetPropertyUint32(local_28,*local_48,local_48[1],local_50);
local_60 = local_a8;
iVar1 = JS_IsException(local_a8._0_8_,local_a8._8_8_);
if (iVar1 == 0) {
if ((int)local_48[2] == 1) {
local_10 = local_60._0_4_;
uStack_c = local_60._4_4_;
local_8 = local_60._8_8_;
}
else {
local_c8 = js_uint32(local_50);
uVar3 = local_c8._8_8_;
uVar2 = local_c8._0_8_;
local_b8 = local_60;
local_70 = js_create_array(local_28,2,local_c8);
JS_FreeValue(local_28,local_60._0_8_,local_60._8_8_);
JS_FreeValue(local_28,uVar2,uVar3);
local_10 = local_70._0_4_;
uStack_c = local_70._4_4_;
local_8 = local_70._8_8_;
}
}
else {
local_10 = 0;
local_8 = 6;
}
}
goto LAB_00170719;
}
JS_FreeValue(local_28,*local_48,local_48[1]);
*local_48 = (ulong)uStack_94 << 0x20;
local_48[1] = 3;
goto LAB_00170508;
}
JS_ThrowTypeErrorArrayBufferOOB(local_28);
}
LAB_00170474:
*local_40 = 0;
local_10 = 0;
local_8 = 6;
}
else {
LAB_00170508:
*local_40 = 1;
local_10 = 0;
local_8 = 3;
}
LAB_00170719:
auVar4._4_4_ = uStack_c;
auVar4._0_4_ = local_10;
auVar4._8_8_ = local_8;
return auVar4;
}
|
|
64,252
|
js_array_iterator_next
|
bluesky950520[P]quickjs/quickjs.c
|
static JSValue js_array_iterator_next(JSContext *ctx, JSValue this_val,
int argc, JSValue *argv,
BOOL *pdone, int magic)
{
JSArrayIteratorData *it;
uint32_t len, idx;
JSValue val, obj;
JSObject *p;
it = JS_GetOpaque2(ctx, this_val, JS_CLASS_ARRAY_ITERATOR);
if (!it)
goto fail1;
if (JS_IsUndefined(it->obj))
goto done;
p = JS_VALUE_GET_OBJ(it->obj);
if (p->class_id >= JS_CLASS_UINT8C_ARRAY &&
p->class_id <= JS_CLASS_FLOAT64_ARRAY) {
if (typed_array_is_oob(p)) {
JS_ThrowTypeErrorArrayBufferOOB(ctx);
goto fail1;
}
len = p->u.array.count;
} else {
if (js_get_length32(ctx, &len, it->obj)) {
fail1:
*pdone = FALSE;
return JS_EXCEPTION;
}
}
idx = it->idx;
if (idx >= len) {
JS_FreeValue(ctx, it->obj);
it->obj = JS_UNDEFINED;
done:
*pdone = TRUE;
return JS_UNDEFINED;
}
it->idx = idx + 1;
*pdone = FALSE;
if (it->kind == JS_ITERATOR_KIND_KEY) {
return js_uint32(idx);
} else {
val = JS_GetPropertyUint32(ctx, it->obj, idx);
if (JS_IsException(val))
return JS_EXCEPTION;
if (it->kind == JS_ITERATOR_KIND_VALUE) {
return val;
} else {
JSValue args[2];
JSValue num;
num = js_uint32(idx);
args[0] = num;
args[1] = val;
obj = js_create_array(ctx, 2, args);
JS_FreeValue(ctx, val);
JS_FreeValue(ctx, num);
return obj;
}
}
}
|
O1
|
c
|
js_array_iterator_next:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %r9, %r14
movq %rdi, %rbx
movl $0x2c, %ecx
callq 0x275b5
testq %rax, %rax
je 0x424a6
movq %rax, %r15
movq 0x8(%rax), %rcx
cmpl $0x3, %ecx
jne 0x42461
movl $0x1, (%r14)
movl $0x3, %r14d
jmp 0x424b3
movq (%r15), %r12
movzwl 0x6(%r12), %eax
addl $-0x15, %eax
cmpw $0xb, %ax
ja 0x42492
movq %r12, %rdi
callq 0x396c4
testl %eax, %eax
je 0x424d0
leaq 0x5ff9c(%rip), %rsi # 0xa2422
movq %rbx, %rdi
xorl %eax, %eax
callq 0x22567
jmp 0x424a6
movq (%r15), %rdx
leaq 0xc(%rsp), %rsi
movq %rbx, %rdi
callq 0x4160f
testl %eax, %eax
je 0x424d9
movl $0x0, (%r14)
movl $0x6, %r14d
xorl %r12d, %r12d
xorl %ecx, %ecx
movl %r12d, %eax
orq %rcx, %rax
movq %r14, %rdx
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl 0x40(%r12), %eax
movl %eax, 0xc(%rsp)
movl 0x14(%r15), %r13d
cmpl 0xc(%rsp), %r13d
jae 0x42531
leal 0x1(%r13), %eax
movl %eax, 0x14(%r15)
movl $0x0, (%r14)
cmpl $0x0, 0x10(%r15)
je 0x42555
movq (%r15), %rsi
movq 0x8(%r15), %rdx
movq %rbx, %rdi
movq %r13, %rcx
callq 0x241b4
movq %rdx, %r14
cmpl $0x6, %r14d
je 0x424ad
movq %rax, %r12
movabsq $-0x100000000, %rbp # imm = 0xFFFFFFFF00000000
cmpl $0x1, 0x10(%r15)
jne 0x42584
movq %r12, %rcx
andq %rbp, %rcx
jmp 0x424b8
movq (%r15), %rsi
movq 0x8(%r15), %rdx
movq 0x18(%rbx), %rdi
callq 0x1d8c6
movl $0x0, (%r15)
movq $0x3, 0x8(%r15)
jmp 0x42452
xorl %eax, %eax
testl %r13d, %r13d
cvtsi2sd %r13, %xmm0
movq %xmm0, %r12
cmovnsq %r13, %r12
movl $0x7, %r14d
cmovnsq %rax, %r14
movabsq $0x7fffffff00000000, %rcx # imm = 0x7FFFFFFF00000000
andq %r12, %rcx
jmp 0x424b8
xorl %eax, %eax
cvtsi2sd %r13, %xmm0
testl %r13d, %r13d
movq %xmm0, %r15
cmovnsq %r13, %r15
movl $0x7, %r13d
cmovnsq %rax, %r13
leaq 0x20(%rsp), %rdx
movq %r15, (%rdx)
movq %r13, 0x8(%rdx)
movq %r12, 0x10(%rdx)
movq %r14, 0x18(%rdx)
movq %rbx, %rdi
movl $0x2, %esi
callq 0x10b02
movq %rax, 0x10(%rsp)
movq %rdx, 0x18(%rsp)
movq 0x18(%rbx), %rdi
movq %r12, %rsi
movq %r14, %rdx
callq 0x1d8c6
movq 0x18(%rbx), %rdi
movq %r15, %rsi
movq %r13, %rdx
callq 0x1d8c6
movq 0x10(%rsp), %r12
andq %r12, %rbp
movq %rbp, %rcx
movq 0x18(%rsp), %r14
jmp 0x424b8
|
js_array_iterator_next:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 48h
mov r14, r9
mov rbx, rdi
mov ecx, 2Ch ; ','
call JS_GetOpaque2
test rax, rax
jz short loc_424A6
mov r15, rax
mov rcx, [rax+8]
cmp ecx, 3
jnz short loc_42461
loc_42452:
mov dword ptr [r14], 1
mov r14d, 3
jmp short loc_424B3
loc_42461:
mov r12, [r15]
movzx eax, word ptr [r12+6]
add eax, 0FFFFFFEBh
cmp ax, 0Bh
ja short loc_42492
mov rdi, r12
call typed_array_is_oob
test eax, eax
jz short loc_424D0
lea rsi, aArraybufferIsD_0; "ArrayBuffer is detached or resized"
mov rdi, rbx
xor eax, eax
call JS_ThrowTypeError
jmp short loc_424A6
loc_42492:
mov rdx, [r15]
lea rsi, [rsp+78h+var_6C]
mov rdi, rbx
call js_get_length32
test eax, eax
jz short loc_424D9
loc_424A6:
mov dword ptr [r14], 0
loc_424AD:
mov r14d, 6
loc_424B3:
xor r12d, r12d
xor ecx, ecx
loc_424B8:
mov eax, r12d
or rax, rcx
mov rdx, r14
add rsp, 48h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_424D0:
mov eax, [r12+40h]
mov [rsp+78h+var_6C], eax
loc_424D9:
mov r13d, [r15+14h]
cmp r13d, [rsp+78h+var_6C]
jnb short loc_42531
lea eax, [r13+1]
mov [r15+14h], eax
mov dword ptr [r14], 0
cmp dword ptr [r15+10h], 0
jz short loc_42555
mov rsi, [r15]
mov rdx, [r15+8]
mov rdi, rbx
mov rcx, r13
call JS_GetPropertyInt64
mov r14, rdx
cmp r14d, 6
jz short loc_424AD
mov r12, rax
mov rbp, 0FFFFFFFF00000000h
cmp dword ptr [r15+10h], 1
jnz short loc_42584
mov rcx, r12
and rcx, rbp
jmp short loc_424B8
loc_42531:
mov rsi, [r15]
mov rdx, [r15+8]
mov rdi, [rbx+18h]
call JS_FreeValueRT
mov dword ptr [r15], 0
mov qword ptr [r15+8], 3
jmp loc_42452
loc_42555:
xor eax, eax
test r13d, r13d
cvtsi2sd xmm0, r13
movq r12, xmm0
cmovns r12, r13
mov r14d, 7
cmovns r14, rax
mov rcx, 7FFFFFFF00000000h
and rcx, r12
jmp loc_424B8
loc_42584:
xor eax, eax
cvtsi2sd xmm0, r13
test r13d, r13d
movq r15, xmm0
cmovns r15, r13
mov r13d, 7
cmovns r13, rax
lea rdx, [rsp+78h+var_58]
mov [rdx], r15
mov [rdx+8], r13
mov [rdx+10h], r12
mov [rdx+18h], r14
mov rdi, rbx
mov esi, 2
call js_create_array
mov [rsp+78h+var_68], rax
mov [rsp+78h+var_60], rdx
mov rdi, [rbx+18h]
mov rsi, r12
mov rdx, r14
call JS_FreeValueRT
mov rdi, [rbx+18h]
mov rsi, r15
mov rdx, r13
call JS_FreeValueRT
mov r12, [rsp+78h+var_68]
and rbp, r12
mov rcx, rbp
mov r14, [rsp+78h+var_60]
jmp loc_424B8
|
unsigned long long js_array_iterator_next(
long long a1,
long long a2,
int a3,
__m128 a4,
__m128 a5,
__m128 a6,
__m128 a7,
double a8,
double a9,
__m128 a10,
__m128 a11,
long long a12,
long long a13,
_DWORD *a14)
{
long long *Opaque2; // rax
long long *v16; // r15
long long v17; // rcx
long long v18; // r12
long long v19; // rdx
long long v20; // rcx
long long v21; // r8
long long v22; // r9
__m128 v23; // xmm4
__m128 v24; // xmm5
double v25; // r12
unsigned long long v26; // rcx
unsigned long long v28; // r13
unsigned long long PropertyInt64; // rax
long long v30; // rdx
long long v31; // r14
bool v32; // sf
double v33; // r15
long long v34; // r13
long long v35; // rdx
char v36; // [rsp+0h] [rbp-78h]
unsigned int v37; // [rsp+Ch] [rbp-6Ch] BYREF
unsigned long long array; // [rsp+10h] [rbp-68h]
long long v39; // [rsp+18h] [rbp-60h]
double v40[11]; // [rsp+20h] [rbp-58h] BYREF
Opaque2 = (long long *)JS_GetOpaque2(a1, a2, a3, 0x2Cu);
if ( !Opaque2 )
goto LABEL_8;
v16 = Opaque2;
v17 = Opaque2[1];
if ( (_DWORD)v17 == 3 )
{
LABEL_3:
*a14 = 1;
LABEL_9:
LODWORD(v25) = 0;
v26 = 0LL;
return v26 | LODWORD(v25);
}
v18 = *Opaque2;
if ( (unsigned __int16)(*(_WORD *)(*Opaque2 + 6) - 21) > 0xBu )
{
if ( (unsigned int)js_get_length32(a1, (int *)&v37, *Opaque2, v17) )
goto LABEL_8;
}
else
{
if ( typed_array_is_oob(*Opaque2) )
{
JS_ThrowTypeError(
a1,
(long long)"ArrayBuffer is detached or resized",
v19,
v20,
v21,
v22,
a4,
a5,
a6,
a7,
v23,
v24,
a10,
a11,
v36);
LABEL_8:
*a14 = 0;
goto LABEL_9;
}
v37 = *(_DWORD *)(v18 + 64);
}
v28 = *((unsigned int *)v16 + 5);
if ( (unsigned int)v28 >= v37 )
{
JS_FreeValueRT(*(_QWORD *)(a1 + 24), (_DWORD *)*v16, v16[1]);
*(_DWORD *)v16 = 0;
v16[1] = 3LL;
goto LABEL_3;
}
*((_DWORD *)v16 + 5) = v28 + 1;
*a14 = 0;
if ( *((_DWORD *)v16 + 4) )
{
PropertyInt64 = JS_GetPropertyInt64(a1, *v16, v16[1], v28);
v31 = v30;
if ( (_DWORD)v30 == 6 )
goto LABEL_9;
v25 = *(double *)&PropertyInt64;
if ( *((_DWORD *)v16 + 4) == 1 )
{
v26 = PropertyInt64 & 0xFFFFFFFF00000000LL;
}
else
{
v32 = (v28 & 0x80000000) != 0LL;
v33 = (double)(int)v28;
if ( (v28 & 0x80000000) == 0LL )
v33 = *(double *)&v28;
v34 = 7LL;
if ( !v32 )
v34 = 0LL;
v40[0] = v33;
*(_QWORD *)&v40[1] = v34;
*(_QWORD *)&v40[2] = PropertyInt64;
*(_QWORD *)&v40[3] = v30;
array = js_create_array(a1, 2, (long long)v40);
v39 = v35;
JS_FreeValueRT(*(_QWORD *)(a1 + 24), *(_DWORD **)&v25, v31);
JS_FreeValueRT(*(_QWORD *)(a1 + 24), *(_DWORD **)&v33, v34);
LODWORD(v25) = array;
v26 = array & 0xFFFFFFFF00000000LL;
}
}
else
{
v25 = (double)(int)v28;
if ( (v28 & 0x80000000) == 0LL )
v25 = *(double *)&v28;
v26 = *(_QWORD *)&v25 & 0x7FFFFFFF00000000LL;
}
return v26 | LODWORD(v25);
}
|
js_array_iterator_next:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x48
MOV R14,R9
MOV RBX,RDI
MOV ECX,0x2c
CALL 0x001275b5
TEST RAX,RAX
JZ 0x001424a6
MOV R15,RAX
MOV RCX,qword ptr [RAX + 0x8]
CMP ECX,0x3
JNZ 0x00142461
LAB_00142452:
MOV dword ptr [R14],0x1
MOV R14D,0x3
JMP 0x001424b3
LAB_00142461:
MOV R12,qword ptr [R15]
MOVZX EAX,word ptr [R12 + 0x6]
ADD EAX,-0x15
CMP AX,0xb
JA 0x00142492
MOV RDI,R12
CALL 0x001396c4
TEST EAX,EAX
JZ 0x001424d0
LEA RSI,[0x1a2422]
MOV RDI,RBX
XOR EAX,EAX
CALL 0x00122567
JMP 0x001424a6
LAB_00142492:
MOV RDX,qword ptr [R15]
LEA RSI,[RSP + 0xc]
MOV RDI,RBX
CALL 0x0014160f
TEST EAX,EAX
JZ 0x001424d9
LAB_001424a6:
MOV dword ptr [R14],0x0
LAB_001424ad:
MOV R14D,0x6
LAB_001424b3:
XOR R12D,R12D
XOR ECX,ECX
LAB_001424b8:
MOV EAX,R12D
OR RAX,RCX
MOV RDX,R14
ADD RSP,0x48
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_001424d0:
MOV EAX,dword ptr [R12 + 0x40]
MOV dword ptr [RSP + 0xc],EAX
LAB_001424d9:
MOV R13D,dword ptr [R15 + 0x14]
CMP R13D,dword ptr [RSP + 0xc]
JNC 0x00142531
LEA EAX,[R13 + 0x1]
MOV dword ptr [R15 + 0x14],EAX
MOV dword ptr [R14],0x0
CMP dword ptr [R15 + 0x10],0x0
JZ 0x00142555
MOV RSI,qword ptr [R15]
MOV RDX,qword ptr [R15 + 0x8]
MOV RDI,RBX
MOV RCX,R13
CALL 0x001241b4
MOV R14,RDX
CMP R14D,0x6
JZ 0x001424ad
MOV R12,RAX
MOV RBP,-0x100000000
CMP dword ptr [R15 + 0x10],0x1
JNZ 0x00142584
MOV RCX,R12
AND RCX,RBP
JMP 0x001424b8
LAB_00142531:
MOV RSI,qword ptr [R15]
MOV RDX,qword ptr [R15 + 0x8]
MOV RDI,qword ptr [RBX + 0x18]
CALL 0x0011d8c6
MOV dword ptr [R15],0x0
MOV qword ptr [R15 + 0x8],0x3
JMP 0x00142452
LAB_00142555:
XOR EAX,EAX
TEST R13D,R13D
CVTSI2SD XMM0,R13
MOVQ R12,XMM0
CMOVNS R12,R13
MOV R14D,0x7
CMOVNS R14,RAX
MOV RCX,0x7fffffff00000000
AND RCX,R12
JMP 0x001424b8
LAB_00142584:
XOR EAX,EAX
CVTSI2SD XMM0,R13
TEST R13D,R13D
MOVQ R15,XMM0
CMOVNS R15,R13
MOV R13D,0x7
CMOVNS R13,RAX
LEA RDX,[RSP + 0x20]
MOV qword ptr [RDX],R15
MOV qword ptr [RDX + 0x8],R13
MOV qword ptr [RDX + 0x10],R12
MOV qword ptr [RDX + 0x18],R14
MOV RDI,RBX
MOV ESI,0x2
CALL 0x00110b02
MOV qword ptr [RSP + 0x10],RAX
MOV qword ptr [RSP + 0x18],RDX
MOV RDI,qword ptr [RBX + 0x18]
MOV RSI,R12
MOV RDX,R14
CALL 0x0011d8c6
MOV RDI,qword ptr [RBX + 0x18]
MOV RSI,R15
MOV RDX,R13
CALL 0x0011d8c6
MOV R12,qword ptr [RSP + 0x10]
AND RBP,R12
MOV RCX,RBP
MOV R14,qword ptr [RSP + 0x18]
JMP 0x001424b8
|
int1 [16] js_array_iterator_next(long param_1)
{
uint uVar1;
long lVar2;
int1 auVar3 [16];
int iVar4;
long *plVar5;
int4 *in_R9;
double dVar6;
double dVar7;
int8 uVar8;
ulong uVar9;
int8 uVar10;
int1 auVar11 [16];
uint local_6c;
int1 local_68 [16];
double local_58;
int8 local_50;
int1 local_48 [16];
plVar5 = (long *)JS_GetOpaque2();
if (plVar5 == (long *)0x0) goto LAB_001424a6;
if ((int)plVar5[1] == 3) {
LAB_00142452:
*in_R9 = 1;
uVar9 = 3;
}
else {
lVar2 = *plVar5;
if ((ushort)(*(short *)(lVar2 + 6) - 0x15U) < 0xc) {
iVar4 = typed_array_is_oob(lVar2);
if (iVar4 != 0) {
JS_ThrowTypeError(param_1,"ArrayBuffer is detached or resized");
goto LAB_001424a6;
}
local_6c = *(uint *)(lVar2 + 0x40);
LAB_001424d9:
uVar1 = *(uint *)((long)plVar5 + 0x14);
dVar7 = (double)(ulong)uVar1;
if (local_6c <= uVar1) {
JS_FreeValueRT(*(int8 *)(param_1 + 0x18),*plVar5,plVar5[1]);
*(int4 *)plVar5 = 0;
plVar5[1] = 3;
goto LAB_00142452;
}
*(uint *)((long)plVar5 + 0x14) = uVar1 + 1;
*in_R9 = 0;
if ((int)plVar5[2] == 0) {
dVar6 = (double)(long)dVar7;
if (-1 < (int)uVar1) {
dVar6 = dVar7;
}
uVar10 = 7;
if (-1 < (int)uVar1) {
uVar10 = 0;
}
local_68._8_8_ = uVar10;
local_68._0_8_ = dVar6;
uVar9 = (ulong)dVar6 & 0x7fffffff00000000;
goto LAB_001424b8;
}
local_68 = JS_GetPropertyInt64(param_1,*plVar5,plVar5[1],dVar7);
uVar10 = local_68._8_8_;
uVar9 = local_68._0_8_;
if (local_68._8_4_ != 6) {
if ((int)plVar5[2] == 1) {
uVar9 = uVar9 & 0xffffffff00000000;
}
else {
dVar6 = (double)(long)dVar7;
if (-1 < (int)uVar1) {
dVar6 = dVar7;
}
uVar8 = 7;
if (-1 < (int)uVar1) {
uVar8 = 0;
}
local_58 = dVar6;
local_50 = uVar8;
local_48 = local_68;
local_68 = js_create_array(param_1,2);
JS_FreeValueRT(*(int8 *)(param_1 + 0x18),uVar9,uVar10);
JS_FreeValueRT(*(int8 *)(param_1 + 0x18),dVar6,uVar8);
uVar9 = local_68._0_8_ & 0xffffffff00000000;
}
goto LAB_001424b8;
}
}
else {
iVar4 = js_get_length32(param_1,&local_6c,*plVar5);
if (iVar4 == 0) goto LAB_001424d9;
LAB_001424a6:
*in_R9 = 0;
}
uVar9 = 6;
}
auVar3._8_8_ = 0;
auVar3._0_8_ = uVar9;
local_68 = auVar3 << 0x40;
uVar9 = 0;
LAB_001424b8:
auVar11._0_8_ = local_68._0_8_ & 0xffffffff | uVar9;
auVar11._8_8_ = local_68._8_8_;
return auVar11;
}
|
|
64,253
|
js_array_iterator_next
|
bluesky950520[P]quickjs/quickjs.c
|
static JSValue js_array_iterator_next(JSContext *ctx, JSValue this_val,
int argc, JSValue *argv,
BOOL *pdone, int magic)
{
JSArrayIteratorData *it;
uint32_t len, idx;
JSValue val, obj;
JSObject *p;
it = JS_GetOpaque2(ctx, this_val, JS_CLASS_ARRAY_ITERATOR);
if (!it)
goto fail1;
if (JS_IsUndefined(it->obj))
goto done;
p = JS_VALUE_GET_OBJ(it->obj);
if (p->class_id >= JS_CLASS_UINT8C_ARRAY &&
p->class_id <= JS_CLASS_FLOAT64_ARRAY) {
if (typed_array_is_oob(p)) {
JS_ThrowTypeErrorArrayBufferOOB(ctx);
goto fail1;
}
len = p->u.array.count;
} else {
if (js_get_length32(ctx, &len, it->obj)) {
fail1:
*pdone = FALSE;
return JS_EXCEPTION;
}
}
idx = it->idx;
if (idx >= len) {
JS_FreeValue(ctx, it->obj);
it->obj = JS_UNDEFINED;
done:
*pdone = TRUE;
return JS_UNDEFINED;
}
it->idx = idx + 1;
*pdone = FALSE;
if (it->kind == JS_ITERATOR_KIND_KEY) {
return js_uint32(idx);
} else {
val = JS_GetPropertyUint32(ctx, it->obj, idx);
if (JS_IsException(val))
return JS_EXCEPTION;
if (it->kind == JS_ITERATOR_KIND_VALUE) {
return val;
} else {
JSValue args[2];
JSValue num;
num = js_uint32(idx);
args[0] = num;
args[1] = val;
obj = js_create_array(ctx, 2, args);
JS_FreeValue(ctx, val);
JS_FreeValue(ctx, num);
return obj;
}
}
}
|
O2
|
c
|
js_array_iterator_next:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %r9, %r15
movq %rdi, %rbx
pushq $0x2c
popq %rcx
callq 0x21207
testq %rax, %rax
je 0x3a12a
movq %rax, %r14
movq 0x8(%rax), %rcx
cmpl $0x3, %ecx
jne 0x3a0eb
movl $0x1, (%r15)
pushq $0x3
jmp 0x3a130
movq (%r14), %r12
movzwl 0x6(%r12), %eax
addl $-0x15, %eax
cmpw $0xb, %ax
ja 0x3a113
movq %r12, %rdi
callq 0x32836
testl %eax, %eax
je 0x3a14f
movq %rbx, %rdi
callq 0x3289b
jmp 0x3a12a
leaq 0x1c(%rsp), %rbp
movq %rbx, %rdi
movq %rbp, %rsi
movq %r12, %rdx
callq 0x394f2
testl %eax, %eax
je 0x3a156
andl $0x0, (%r15)
pushq $0x6
popq %r15
xorl %r12d, %r12d
xorl %ecx, %ecx
movl %r12d, %eax
orq %rcx, %rax
movq %r15, %rdx
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
addq $0x40, %r12
movq %r12, %rbp
movl 0x14(%r14), %r13d
cmpl (%rbp), %r13d
jae 0x3a1aa
leal 0x1(%r13), %eax
movl %eax, 0x14(%r14)
andl $0x0, (%r15)
cmpl $0x0, 0x10(%r14)
je 0x3a1ca
movq (%r14), %rsi
movq 0x8(%r14), %rdx
movq %rbx, %rdi
movq %r13, %rcx
callq 0x1e178
movq %rdx, %r15
cmpl $0x6, %r15d
je 0x3a12e
movq %rax, %r12
movabsq $-0x100000000, %rbp # imm = 0xFFFFFFFF00000000
cmpl $0x1, 0x10(%r14)
jne 0x3a1f7
movq %r12, %rcx
andq %rbp, %rcx
jmp 0x3a137
movq (%r14), %rsi
movq 0x8(%r14), %rdx
movq %rbx, %rdi
callq 0x1801e
andl $0x0, (%r14)
movq $0x3, 0x8(%r14)
jmp 0x3a0e0
xorl %eax, %eax
testl %r13d, %r13d
cvtsi2sd %r13, %xmm0
movq %xmm0, %r12
cmovnsq %r13, %r12
pushq $0x7
popq %r15
cmovnsq %rax, %r15
movabsq $0x7fffffff00000000, %rcx # imm = 0x7FFFFFFF00000000
andq %r12, %rcx
jmp 0x3a137
xorl %eax, %eax
cvtsi2sd %r13, %xmm0
testl %r13d, %r13d
movq %xmm0, %r14
cmovnsq %r13, %r14
pushq $0x7
popq %r13
cmovnsq %rax, %r13
leaq 0x20(%rsp), %rdx
movq %r14, (%rdx)
movq %r13, 0x8(%rdx)
movq %r12, 0x10(%rdx)
movq %r15, 0x18(%rdx)
pushq $0x2
popq %rsi
movq %rbx, %rdi
callq 0x3a2bd
movq %rax, 0x8(%rsp)
movq %rdx, 0x10(%rsp)
movq %rbx, %rdi
movq %r12, %rsi
movq %r15, %rdx
callq 0x1801e
movq %rbx, %rdi
movq %r14, %rsi
movq %r13, %rdx
callq 0x1801e
movq 0x8(%rsp), %r12
andq %r12, %rbp
movq %rbp, %rcx
movq 0x10(%rsp), %r15
jmp 0x3a137
|
js_array_iterator_next:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 48h
mov r15, r9
mov rbx, rdi
push 2Ch ; ','
pop rcx
call JS_GetOpaque2
test rax, rax
jz short loc_3A12A
mov r14, rax
mov rcx, [rax+8]
cmp ecx, 3
jnz short loc_3A0EB
loc_3A0E0:
mov dword ptr [r15], 1
push 3
jmp short loc_3A130
loc_3A0EB:
mov r12, [r14]
movzx eax, word ptr [r12+6]
add eax, 0FFFFFFEBh
cmp ax, 0Bh
ja short loc_3A113
mov rdi, r12
call typed_array_is_oob
test eax, eax
jz short loc_3A14F
mov rdi, rbx
call JS_ThrowTypeErrorArrayBufferOOB
jmp short loc_3A12A
loc_3A113:
lea rbp, [rsp+78h+var_5C]
mov rdi, rbx
mov rsi, rbp
mov rdx, r12
call js_get_length32
test eax, eax
jz short loc_3A156
loc_3A12A:
and dword ptr [r15], 0
loc_3A12E:
push 6
loc_3A130:
pop r15
xor r12d, r12d
xor ecx, ecx
loc_3A137:
mov eax, r12d
or rax, rcx
mov rdx, r15
add rsp, 48h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_3A14F:
add r12, 40h ; '@'
mov rbp, r12
loc_3A156:
mov r13d, [r14+14h]
cmp r13d, [rbp+0]
jnb short loc_3A1AA
lea eax, [r13+1]
mov [r14+14h], eax
and dword ptr [r15], 0
cmp dword ptr [r14+10h], 0
jz short loc_3A1CA
mov rsi, [r14]
mov rdx, [r14+8]
mov rdi, rbx
mov rcx, r13
call JS_GetPropertyInt64
mov r15, rdx
cmp r15d, 6
jz short loc_3A12E
mov r12, rax
mov rbp, 0FFFFFFFF00000000h
cmp dword ptr [r14+10h], 1
jnz short loc_3A1F7
mov rcx, r12
and rcx, rbp
jmp short loc_3A137
loc_3A1AA:
mov rsi, [r14]
mov rdx, [r14+8]
mov rdi, rbx
call JS_FreeValue
and dword ptr [r14], 0
mov qword ptr [r14+8], 3
jmp loc_3A0E0
loc_3A1CA:
xor eax, eax
test r13d, r13d
cvtsi2sd xmm0, r13
movq r12, xmm0
cmovns r12, r13
push 7
pop r15
cmovns r15, rax
mov rcx, 7FFFFFFF00000000h
and rcx, r12
jmp loc_3A137
loc_3A1F7:
xor eax, eax
cvtsi2sd xmm0, r13
test r13d, r13d
movq r14, xmm0
cmovns r14, r13
push 7
pop r13
cmovns r13, rax
lea rdx, [rsp+78h+var_58]
mov [rdx], r14
mov [rdx+8], r13
mov [rdx+10h], r12
mov [rdx+18h], r15
push 2
pop rsi
mov rdi, rbx
call js_create_array
mov [rsp+78h+var_70], rax
mov [rsp+78h+var_68], rdx
mov rdi, rbx
mov rsi, r12
mov rdx, r15
call JS_FreeValue
mov rdi, rbx
mov rsi, r14
mov rdx, r13
call JS_FreeValue
mov r12, [rsp+78h+var_70]
and rbp, r12
mov rcx, rbp
mov r15, [rsp+78h+var_68]
jmp loc_3A137
|
unsigned long long js_array_iterator_next(
long long a1,
long long a2,
int a3,
__m128 a4,
__m128 a5,
__m128 a6,
__m128 a7,
double a8,
double a9,
__m128 a10,
__m128 a11,
long long a12,
long long a13,
_DWORD *a14)
{
long long *Opaque2; // rax
long long *v16; // r14
long long v17; // rcx
long long v18; // r12
long long v19; // rdx
long long v20; // rcx
long long v21; // r8
long long v22; // r9
__m128 v23; // xmm4
__m128 v24; // xmm5
int *v25; // rbp
double v26; // r12
unsigned long long v27; // rcx
unsigned long long v29; // r13
unsigned long long PropertyInt64; // rax
long long v31; // rdx
long long v32; // r15
bool v33; // sf
double v34; // r14
long long v35; // r13
char v36; // [rsp+0h] [rbp-78h]
long long array; // [rsp+8h] [rbp-70h]
int v38; // [rsp+1Ch] [rbp-5Ch] BYREF
double v39[11]; // [rsp+20h] [rbp-58h] BYREF
Opaque2 = (long long *)JS_GetOpaque2(a1, a2, a3, 0x2Cu);
if ( !Opaque2 )
goto LABEL_8;
v16 = Opaque2;
v17 = Opaque2[1];
if ( (_DWORD)v17 == 3 )
{
LABEL_3:
*a14 = 1;
LABEL_9:
LODWORD(v26) = 0;
v27 = 0LL;
return v27 | LODWORD(v26);
}
v18 = *Opaque2;
if ( (unsigned __int16)(*(_WORD *)(*Opaque2 + 6) - 21) > 0xBu )
{
v25 = &v38;
if ( (unsigned int)js_get_length32(a1, &v38, *Opaque2, v17) )
goto LABEL_8;
}
else
{
if ( typed_array_is_oob(*Opaque2) )
{
JS_ThrowTypeErrorArrayBufferOOB(a1, a4, a5, a6, a7, v23, v24, a10, a11, a2, v19, v20, v21, v22, v36);
LABEL_8:
*a14 = 0;
goto LABEL_9;
}
v25 = (int *)(v18 + 64);
}
v29 = *((unsigned int *)v16 + 5);
if ( (unsigned int)v29 >= *v25 )
{
JS_FreeValue(a1, *v16, v16[1]);
*(_DWORD *)v16 = 0;
v16[1] = 3LL;
goto LABEL_3;
}
*((_DWORD *)v16 + 5) = v29 + 1;
*a14 = 0;
if ( *((_DWORD *)v16 + 4) )
{
PropertyInt64 = JS_GetPropertyInt64(a1, *v16, v16[1], v29);
v32 = v31;
if ( (_DWORD)v31 == 6 )
goto LABEL_9;
v26 = *(double *)&PropertyInt64;
if ( *((_DWORD *)v16 + 4) == 1 )
{
v27 = PropertyInt64 & 0xFFFFFFFF00000000LL;
}
else
{
v33 = (v29 & 0x80000000) != 0LL;
v34 = (double)(int)v29;
if ( (v29 & 0x80000000) == 0LL )
v34 = *(double *)&v29;
v35 = 7LL;
if ( !v33 )
v35 = 0LL;
v39[0] = v34;
*(_QWORD *)&v39[1] = v35;
*(_QWORD *)&v39[2] = PropertyInt64;
*(_QWORD *)&v39[3] = v31;
array = js_create_array(a1, 2LL, v39);
JS_FreeValue(a1, *(long long *)&v26, v32);
JS_FreeValue(a1, *(long long *)&v34, v35);
LODWORD(v26) = array;
v27 = array & 0xFFFFFFFF00000000LL;
}
}
else
{
v26 = (double)(int)v29;
if ( (v29 & 0x80000000) == 0LL )
v26 = *(double *)&v29;
v27 = *(_QWORD *)&v26 & 0x7FFFFFFF00000000LL;
}
return v27 | LODWORD(v26);
}
|
js_array_iterator_next:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x48
MOV R15,R9
MOV RBX,RDI
PUSH 0x2c
POP RCX
CALL 0x00121207
TEST RAX,RAX
JZ 0x0013a12a
MOV R14,RAX
MOV RCX,qword ptr [RAX + 0x8]
CMP ECX,0x3
JNZ 0x0013a0eb
LAB_0013a0e0:
MOV dword ptr [R15],0x1
PUSH 0x3
JMP 0x0013a130
LAB_0013a0eb:
MOV R12,qword ptr [R14]
MOVZX EAX,word ptr [R12 + 0x6]
ADD EAX,-0x15
CMP AX,0xb
JA 0x0013a113
MOV RDI,R12
CALL 0x00132836
TEST EAX,EAX
JZ 0x0013a14f
MOV RDI,RBX
CALL 0x0013289b
JMP 0x0013a12a
LAB_0013a113:
LEA RBP,[RSP + 0x1c]
MOV RDI,RBX
MOV RSI,RBP
MOV RDX,R12
CALL 0x001394f2
TEST EAX,EAX
JZ 0x0013a156
LAB_0013a12a:
AND dword ptr [R15],0x0
LAB_0013a12e:
PUSH 0x6
LAB_0013a130:
POP R15
XOR R12D,R12D
XOR ECX,ECX
LAB_0013a137:
MOV EAX,R12D
OR RAX,RCX
MOV RDX,R15
ADD RSP,0x48
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_0013a14f:
ADD R12,0x40
MOV RBP,R12
LAB_0013a156:
MOV R13D,dword ptr [R14 + 0x14]
CMP R13D,dword ptr [RBP]
JNC 0x0013a1aa
LEA EAX,[R13 + 0x1]
MOV dword ptr [R14 + 0x14],EAX
AND dword ptr [R15],0x0
CMP dword ptr [R14 + 0x10],0x0
JZ 0x0013a1ca
MOV RSI,qword ptr [R14]
MOV RDX,qword ptr [R14 + 0x8]
MOV RDI,RBX
MOV RCX,R13
CALL 0x0011e178
MOV R15,RDX
CMP R15D,0x6
JZ 0x0013a12e
MOV R12,RAX
MOV RBP,-0x100000000
CMP dword ptr [R14 + 0x10],0x1
JNZ 0x0013a1f7
MOV RCX,R12
AND RCX,RBP
JMP 0x0013a137
LAB_0013a1aa:
MOV RSI,qword ptr [R14]
MOV RDX,qword ptr [R14 + 0x8]
MOV RDI,RBX
CALL 0x0011801e
AND dword ptr [R14],0x0
MOV qword ptr [R14 + 0x8],0x3
JMP 0x0013a0e0
LAB_0013a1ca:
XOR EAX,EAX
TEST R13D,R13D
CVTSI2SD XMM0,R13
MOVQ R12,XMM0
CMOVNS R12,R13
PUSH 0x7
POP R15
CMOVNS R15,RAX
MOV RCX,0x7fffffff00000000
AND RCX,R12
JMP 0x0013a137
LAB_0013a1f7:
XOR EAX,EAX
CVTSI2SD XMM0,R13
TEST R13D,R13D
MOVQ R14,XMM0
CMOVNS R14,R13
PUSH 0x7
POP R13
CMOVNS R13,RAX
LEA RDX,[RSP + 0x20]
MOV qword ptr [RDX],R14
MOV qword ptr [RDX + 0x8],R13
MOV qword ptr [RDX + 0x10],R12
MOV qword ptr [RDX + 0x18],R15
PUSH 0x2
POP RSI
MOV RDI,RBX
CALL 0x0013a2bd
MOV qword ptr [RSP + 0x8],RAX
MOV qword ptr [RSP + 0x10],RDX
MOV RDI,RBX
MOV RSI,R12
MOV RDX,R15
CALL 0x0011801e
MOV RDI,RBX
MOV RSI,R14
MOV RDX,R13
CALL 0x0011801e
MOV R12,qword ptr [RSP + 0x8]
AND RBP,R12
MOV RCX,RBP
MOV R15,qword ptr [RSP + 0x10]
JMP 0x0013a137
|
int1 [16] js_array_iterator_next(int8 param_1)
{
uint uVar1;
long lVar2;
int1 auVar3 [16];
int iVar4;
long *plVar5;
ulong uVar6;
int4 *in_R9;
uint *puVar7;
double dVar8;
double dVar9;
int8 uVar10;
int8 uVar11;
int1 auVar12 [16];
int1 auVar13 [16];
ulong uStack_80;
uint local_5c;
double local_58;
int8 local_50;
int1 local_48 [16];
plVar5 = (long *)JS_GetOpaque2();
if (plVar5 == (long *)0x0) goto LAB_0013a12a;
if ((int)plVar5[1] == 3) {
LAB_0013a0e0:
*in_R9 = 1;
uStack_80 = 3;
}
else {
lVar2 = *plVar5;
if ((ushort)(*(short *)(lVar2 + 6) - 0x15U) < 0xc) {
iVar4 = typed_array_is_oob(lVar2);
if (iVar4 != 0) {
JS_ThrowTypeErrorArrayBufferOOB(param_1);
goto LAB_0013a12a;
}
puVar7 = (uint *)(lVar2 + 0x40);
LAB_0013a156:
uVar1 = *(uint *)((long)plVar5 + 0x14);
dVar9 = (double)(ulong)uVar1;
if (*puVar7 <= uVar1) {
JS_FreeValue(param_1,*plVar5,plVar5[1]);
*(int4 *)plVar5 = 0;
plVar5[1] = 3;
goto LAB_0013a0e0;
}
*(uint *)((long)plVar5 + 0x14) = uVar1 + 1;
*in_R9 = 0;
if ((int)plVar5[2] == 0) {
dVar8 = (double)(long)dVar9;
if (-1 < (int)uVar1) {
dVar8 = dVar9;
}
uVar11 = 7;
if (-1 < (int)uVar1) {
uVar11 = 0;
}
auVar13._8_8_ = uVar11;
auVar13._0_8_ = dVar8;
uVar6 = (ulong)dVar8 & 0x7fffffff00000000;
goto LAB_0013a137;
}
auVar13 = JS_GetPropertyInt64(param_1,*plVar5,plVar5[1],dVar9);
uVar11 = auVar13._8_8_;
uVar6 = auVar13._0_8_;
if (auVar13._8_4_ != 6) {
if ((int)plVar5[2] == 1) {
uVar6 = uVar6 & 0xffffffff00000000;
}
else {
dVar8 = (double)(long)dVar9;
if (-1 < (int)uVar1) {
dVar8 = dVar9;
}
uVar10 = 7;
if (-1 < (int)uVar1) {
uVar10 = 0;
}
local_58 = dVar8;
local_50 = uVar10;
local_48 = auVar13;
auVar13 = js_create_array(param_1,2);
JS_FreeValue(param_1,uVar6,uVar11);
JS_FreeValue(param_1,dVar8,uVar10);
uVar6 = auVar13._0_8_ & 0xffffffff00000000;
}
goto LAB_0013a137;
}
}
else {
puVar7 = &local_5c;
iVar4 = js_get_length32(param_1,puVar7,lVar2);
if (iVar4 == 0) goto LAB_0013a156;
LAB_0013a12a:
*in_R9 = 0;
}
uStack_80 = 6;
}
auVar3._8_8_ = 0;
auVar3._0_8_ = uStack_80;
auVar13 = auVar3 << 0x40;
uVar6 = 0;
LAB_0013a137:
auVar12._0_8_ = auVar13._0_8_ & 0xffffffff | uVar6;
auVar12._8_8_ = auVar13._8_8_;
return auVar12;
}
|
|
64,254
|
displayText(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
|
Andrewchistyakov[P]flashcards_lyc/src/tui.cpp
|
void displayText(std::string to_display) {
auto screen = ScreenInteractive::Fullscreen();
auto renderer = Renderer([&] {
return vbox({
text(to_display) | center | flex,
}) | border;
});
auto breaker = CatchEvent(renderer, [&](Event event) {
if (event == Event::Return) {
screen.ExitLoopClosure()();
return true;
}
return false;
});
screen.Loop(breaker);
}
|
O1
|
cpp
|
displayText(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>):
pushq %r14
pushq %rbx
subq $0x178, %rsp # imm = 0x178
movq %rdi, %r14
leaq 0x88(%rsp), %rbx
movq %rbx, %rdi
callq 0x2dd66
xorps %xmm0, %xmm0
leaq 0x60(%rsp), %rsi
movaps %xmm0, (%rsi)
movaps %xmm0, 0x10(%rsi)
movq %r14, (%rsi)
leaq 0x143b(%rip), %rax # 0x13f80
movq %rax, 0x18(%rsi)
leaq 0x1706(%rip), %rax # 0x14256
movq %rax, 0x10(%rsi)
leaq 0x30(%rsp), %rdi
callq 0x2d01c
movq 0x70(%rsp), %rax
testq %rax, %rax
je 0x12b77
leaq 0x60(%rsp), %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
movq 0x30(%rsp), %rcx
movq 0x38(%rsp), %rax
movq %rcx, 0x10(%rsp)
movq %rax, 0x18(%rsp)
testq %rax, %rax
je 0x12ba5
movq 0x47419(%rip), %rcx # 0x59fb0
cmpb $0x0, (%rcx)
je 0x12ba1
incl 0x8(%rax)
jmp 0x12ba5
lock
incl 0x8(%rax)
xorps %xmm0, %xmm0
leaq 0x40(%rsp), %rdx
movaps %xmm0, (%rdx)
movaps %xmm0, 0x10(%rdx)
movq %rbx, (%rdx)
leaq 0x16be(%rip), %rax # 0x1427c
movq %rax, 0x18(%rdx)
leaq 0x17e7(%rip), %rax # 0x143b0
movq %rax, 0x10(%rdx)
leaq 0x20(%rsp), %rdi
leaq 0x10(%rsp), %rsi
callq 0x269f0
movq 0x50(%rsp), %rax
testq %rax, %rax
je 0x12bf5
leaq 0x40(%rsp), %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
movq 0x18(%rsp), %rdi
testq %rdi, %rdi
je 0x12c04
callq 0x14c7c
movq 0x20(%rsp), %rcx
movq 0x28(%rsp), %rax
movq %rcx, (%rsp)
movq %rax, 0x8(%rsp)
testq %rax, %rax
je 0x12c31
movq 0x4738d(%rip), %rcx # 0x59fb0
cmpb $0x0, (%rcx)
je 0x12c2d
incl 0x8(%rax)
jmp 0x12c31
lock
incl 0x8(%rax)
leaq 0x88(%rsp), %rdi
movq %rsp, %rsi
callq 0x2dee4
movq 0x8(%rsp), %rdi
testq %rdi, %rdi
je 0x12c50
callq 0x14c7c
movq 0x28(%rsp), %rdi
testq %rdi, %rdi
je 0x12c5f
callq 0x14c7c
movq 0x38(%rsp), %rdi
testq %rdi, %rdi
je 0x12c6e
callq 0x14c7c
leaq 0x88(%rsp), %rdi
callq 0x14b84
addq $0x178, %rsp # imm = 0x178
popq %rbx
popq %r14
retq
jmp 0x12d18
jmp 0x12d18
movq %rax, %rbx
movq 0x8(%rsp), %rdi
testq %rdi, %rdi
je 0x12ca2
callq 0x14c7c
movq 0x28(%rsp), %rdi
jmp 0x12cca
movq %rax, %rbx
movq 0x50(%rsp), %rax
testq %rax, %rax
je 0x12cc5
leaq 0x40(%rsp), %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
movq 0x18(%rsp), %rdi
testq %rdi, %rdi
je 0x12cd4
callq 0x14c7c
movq 0x38(%rsp), %rdi
testq %rdi, %rdi
je 0x12d03
callq 0x14c7c
jmp 0x12d03
jmp 0x12d18
movq %rax, %rbx
movq 0x70(%rsp), %rax
testq %rax, %rax
je 0x12d03
leaq 0x60(%rsp), %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
leaq 0x88(%rsp), %rdi
callq 0x14b84
movq %rbx, %rdi
callq 0xb780
movq %rax, %rdi
callq 0x106a9
|
_Z11displayTextNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE:
push r14
push rbx
sub rsp, 178h
mov r14, rdi
lea rbx, [rsp+188h+var_100]
mov rdi, rbx; this
call _ZN5ftxui17ScreenInteractive10FullscreenEv; ftxui::ScreenInteractive::Fullscreen(void)
xorps xmm0, xmm0
lea rsi, [rsp+188h+var_128]
movaps xmmword ptr [rsi], xmm0
movaps xmmword ptr [rsi+10h], xmm0
mov [rsi], r14
lea rax, _ZNSt17_Function_handlerIFSt10shared_ptrIN5ftxui4NodeEEvEZ11displayTextNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEE3$_0E9_M_invokeERKSt9_Any_data; std::_Function_handler<std::shared_ptr<ftxui::Node> ()(void),displayText(std::string)::$_0>::_M_invoke(std::_Any_data const&)
mov [rsi+18h], rax
lea rax, _ZNSt17_Function_handlerIFSt10shared_ptrIN5ftxui4NodeEEvEZ11displayTextNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEE3$_0E10_M_managerERSt9_Any_dataRKSD_St18_Manager_operation; std::_Function_handler<std::shared_ptr<ftxui::Node> ()(void),displayText(std::string)::$_0>::_M_manager(std::_Any_data &,std::_Any_data const&,std::_Manager_operation)
mov [rsi+10h], rax
lea rdi, [rsp+188h+var_158]
call _ZN5ftxui8RendererESt8functionIFSt10shared_ptrINS_4NodeEEvEE; ftxui::Renderer(std::function<std::shared_ptr<ftxui::Node> ()(void)>)
mov rax, [rsp+188h+var_118]
test rax, rax
jz short loc_12B77
lea rdi, [rsp+188h+var_128]
mov rsi, rdi
mov edx, 3
call rax
loc_12B77:
mov rcx, [rsp+188h+var_158]
mov rax, [rsp+188h+var_150]
mov [rsp+188h+var_178], rcx
mov [rsp+188h+var_170], rax
test rax, rax
jz short loc_12BA5
mov rcx, cs:__libc_single_threaded_ptr
cmp byte ptr [rcx], 0
jz short loc_12BA1
inc dword ptr [rax+8]
jmp short loc_12BA5
loc_12BA1:
lock inc dword ptr [rax+8]
loc_12BA5:
xorps xmm0, xmm0
lea rdx, [rsp+188h+var_148]
movaps xmmword ptr [rdx], xmm0
movaps xmmword ptr [rdx+10h], xmm0
mov [rdx], rbx
lea rax, _ZNSt17_Function_handlerIFbN5ftxui5EventEEZ11displayTextNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEE3$_1E9_M_invokeERKSt9_Any_dataOS1_; std::_Function_handler<bool ()(ftxui::Event),displayText(std::string)::$_1>::_M_invoke(std::_Any_data const&,ftxui::Event&&)
mov [rdx+18h], rax
lea rax, _ZNSt17_Function_handlerIFbN5ftxui5EventEEZ11displayTextNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEE3$_1E10_M_managerERSt9_Any_dataRKSB_St18_Manager_operation; std::_Function_handler<bool ()(ftxui::Event),displayText(std::string)::$_1>::_M_manager(std::_Any_data &,std::_Any_data const&,std::_Manager_operation)
mov [rdx+10h], rax
lea rdi, [rsp+188h+var_168]
lea rsi, [rsp+188h+var_178]
call _ZN5ftxui10CatchEventESt10shared_ptrINS_13ComponentBaseEESt8functionIFbNS_5EventEEE; ftxui::CatchEvent(std::shared_ptr<ftxui::ComponentBase>,std::function<bool ()(ftxui::Event)>)
mov rax, [rsp+188h+var_138]
test rax, rax
jz short loc_12BF5
lea rdi, [rsp+188h+var_148]
mov rsi, rdi
mov edx, 3
call rax
loc_12BF5:
mov rdi, [rsp+188h+var_170]
test rdi, rdi
jz short loc_12C04
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_12C04:
mov rcx, [rsp+188h+var_168]
mov rax, [rsp+188h+var_160]
mov [rsp+188h+var_188], rcx
mov [rsp+188h+var_180], rax
test rax, rax
jz short loc_12C31
mov rcx, cs:__libc_single_threaded_ptr
cmp byte ptr [rcx], 0
jz short loc_12C2D
inc dword ptr [rax+8]
jmp short loc_12C31
loc_12C2D:
lock inc dword ptr [rax+8]
loc_12C31:
lea rdi, [rsp+188h+var_100]
mov rsi, rsp
call _ZN5ftxui17ScreenInteractive4LoopESt10shared_ptrINS_13ComponentBaseEE; ftxui::ScreenInteractive::Loop(std::shared_ptr<ftxui::ComponentBase>)
mov rdi, [rsp+188h+var_180]
test rdi, rdi
jz short loc_12C50
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_12C50:
mov rdi, [rsp+188h+var_160]
test rdi, rdi
jz short loc_12C5F
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_12C5F:
mov rdi, [rsp+188h+var_150]
test rdi, rdi
jz short loc_12C6E
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_12C6E:
lea rdi, [rsp+188h+var_100]; this
call _ZN5ftxui17ScreenInteractiveD2Ev; ftxui::ScreenInteractive::~ScreenInteractive()
add rsp, 178h
pop rbx
pop r14
retn
jmp loc_12D18
jmp loc_12D18
mov rbx, rax
mov rdi, [rsp+188h+var_180]
test rdi, rdi
jz short loc_12CA2
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_12CA2:
mov rdi, [rsp+188h+var_160]
jmp short loc_12CCA
mov rbx, rax
mov rax, [rsp+188h+var_138]
test rax, rax
jz short loc_12CC5
lea rdi, [rsp+188h+var_148]
mov rsi, rdi
mov edx, 3
call rax
loc_12CC5:
mov rdi, [rsp+188h+var_170]
loc_12CCA:
test rdi, rdi
jz short loc_12CD4
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_12CD4:
mov rdi, [rsp+188h+var_150]
test rdi, rdi
jz short loc_12D03
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
jmp short loc_12D03
jmp short loc_12D18
mov rbx, rax
mov rax, [rsp+188h+var_118]
test rax, rax
jz short loc_12D03
lea rdi, [rsp+188h+var_128]
mov rsi, rdi
mov edx, 3
call rax
loc_12D03:
lea rdi, [rsp+188h+var_100]; this
call _ZN5ftxui17ScreenInteractiveD2Ev; ftxui::ScreenInteractive::~ScreenInteractive()
mov rdi, rbx
call __Unwind_Resume
loc_12D18:
mov rdi, rax
call __clang_call_terminate
|
void displayText(long long a1)
{
int v1; // r8d
int v2; // r9d
void *v3; // rcx
int v4; // edx
int v5; // r8d
int v6; // r9d
void *v7; // rcx
long long v8; // [rsp+0h] [rbp-188h] BYREF
long long v9; // [rsp+8h] [rbp-180h]
long long v10; // [rsp+10h] [rbp-178h] BYREF
long long v11; // [rsp+18h] [rbp-170h]
long long v12; // [rsp+20h] [rbp-168h] BYREF
long long v13; // [rsp+28h] [rbp-160h]
long long v14; // [rsp+30h] [rbp-158h] BYREF
long long v15; // [rsp+38h] [rbp-150h]
_QWORD v16[2]; // [rsp+40h] [rbp-148h] BYREF
long long ( *v17)(); // [rsp+50h] [rbp-138h]
long long ( *v18)(); // [rsp+58h] [rbp-130h]
_QWORD v19[2]; // [rsp+60h] [rbp-128h] BYREF
long long ( *v20)(); // [rsp+70h] [rbp-118h]
long long ( *v21)(); // [rsp+78h] [rbp-110h]
_BYTE v22[256]; // [rsp+88h] [rbp-100h] BYREF
ftxui::ScreenInteractive::Fullscreen((ftxui::ScreenInteractive *)v22);
v19[1] = 0LL;
v19[0] = a1;
v21 = std::_Function_handler<std::shared_ptr<ftxui::Node> ()(void),displayText(std::string)::$_0>::_M_invoke;
v20 = std::_Function_handler<std::shared_ptr<ftxui::Node> ()(void),displayText(std::string)::$_0>::_M_manager;
ftxui::Renderer(&v14);
if ( v20 )
((void ( *)(_QWORD *, _QWORD *, long long))v20)(v19, v19, 3LL);
LODWORD(v3) = v14;
v10 = v14;
v11 = v15;
if ( v15 )
{
v3 = &_libc_single_threaded;
if ( _libc_single_threaded )
++*(_DWORD *)(v15 + 8);
else
_InterlockedIncrement((volatile signed __int32 *)(v15 + 8));
}
v16[1] = 0LL;
v16[0] = v22;
v18 = std::_Function_handler<bool ()(ftxui::Event),displayText(std::string)::$_1>::_M_invoke;
v17 = std::_Function_handler<bool ()(ftxui::Event),displayText(std::string)::$_1>::_M_manager;
ftxui::CatchEvent((unsigned int)&v12, (unsigned int)&v10, (unsigned int)v16, (_DWORD)v3, v1, v2);
if ( v17 )
((void ( *)(_QWORD *, _QWORD *, long long))v17)(v16, v16, 3LL);
if ( v11 )
((void (*)(void))std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release)();
LODWORD(v7) = v12;
v8 = v12;
v9 = v13;
if ( v13 )
{
v7 = &_libc_single_threaded;
if ( _libc_single_threaded )
++*(_DWORD *)(v13 + 8);
else
_InterlockedIncrement((volatile signed __int32 *)(v13 + 8));
}
ftxui::ScreenInteractive::Loop((unsigned int)v22, (unsigned int)&v8, v4, (_DWORD)v7, v5, v6);
if ( v9 )
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v9);
if ( v13 )
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v13);
if ( v15 )
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v15);
ftxui::ScreenInteractive::~ScreenInteractive((ftxui::ScreenInteractive *)v22);
}
|
displayText:
PUSH R14
PUSH RBX
SUB RSP,0x178
MOV R14,RDI
LEA RBX,[RSP + 0x88]
MOV RDI,RBX
CALL 0x0012dd66
XORPS XMM0,XMM0
LEA RSI,[RSP + 0x60]
MOVAPS xmmword ptr [RSI],XMM0
MOVAPS xmmword ptr [RSI + 0x10],XMM0
MOV qword ptr [RSI],R14
LEA RAX,[0x113f80]
MOV qword ptr [RSI + 0x18],RAX
LEA RAX,[0x114256]
MOV qword ptr [RSI + 0x10],RAX
LAB_00112b54:
LEA RDI,[RSP + 0x30]
CALL 0x0012d01c
MOV RAX,qword ptr [RSP + 0x70]
TEST RAX,RAX
JZ 0x00112b77
LAB_00112b68:
LEA RDI,[RSP + 0x60]
MOV RSI,RDI
MOV EDX,0x3
CALL RAX
LAB_00112b77:
MOV RCX,qword ptr [RSP + 0x30]
MOV RAX,qword ptr [RSP + 0x38]
MOV qword ptr [RSP + 0x10],RCX
MOV qword ptr [RSP + 0x18],RAX
TEST RAX,RAX
JZ 0x00112ba5
MOV RCX,qword ptr [0x00159fb0]
CMP byte ptr [RCX],0x0
JZ 0x00112ba1
INC dword ptr [RAX + 0x8]
JMP 0x00112ba5
LAB_00112ba1:
INC.LOCK dword ptr [RAX + 0x8]
LAB_00112ba5:
XORPS XMM0,XMM0
LEA RDX,[RSP + 0x40]
MOVAPS xmmword ptr [RDX],XMM0
MOVAPS xmmword ptr [RDX + 0x10],XMM0
MOV qword ptr [RDX],RBX
LEA RAX,[0x11427c]
MOV qword ptr [RDX + 0x18],RAX
LEA RAX,[0x1143b0]
MOV qword ptr [RDX + 0x10],RAX
LAB_00112bcd:
LEA RDI,[RSP + 0x20]
LEA RSI,[RSP + 0x10]
CALL 0x001269f0
MOV RAX,qword ptr [RSP + 0x50]
TEST RAX,RAX
JZ 0x00112bf5
LAB_00112be6:
LEA RDI,[RSP + 0x40]
MOV RSI,RDI
MOV EDX,0x3
CALL RAX
LAB_00112bf5:
MOV RDI,qword ptr [RSP + 0x18]
TEST RDI,RDI
JZ 0x00112c04
CALL 0x00114c7c
LAB_00112c04:
MOV RCX,qword ptr [RSP + 0x20]
MOV RAX,qword ptr [RSP + 0x28]
MOV qword ptr [RSP],RCX
MOV qword ptr [RSP + 0x8],RAX
TEST RAX,RAX
JZ 0x00112c31
MOV RCX,qword ptr [0x00159fb0]
CMP byte ptr [RCX],0x0
JZ 0x00112c2d
INC dword ptr [RAX + 0x8]
JMP 0x00112c31
LAB_00112c2d:
INC.LOCK dword ptr [RAX + 0x8]
LAB_00112c31:
LEA RDI,[RSP + 0x88]
MOV RSI,RSP
CALL 0x0012dee4
MOV RDI,qword ptr [RSP + 0x8]
TEST RDI,RDI
JZ 0x00112c50
CALL 0x00114c7c
LAB_00112c50:
MOV RDI,qword ptr [RSP + 0x28]
TEST RDI,RDI
JZ 0x00112c5f
CALL 0x00114c7c
LAB_00112c5f:
MOV RDI,qword ptr [RSP + 0x38]
TEST RDI,RDI
JZ 0x00112c6e
CALL 0x00114c7c
LAB_00112c6e:
LEA RDI,[RSP + 0x88]
CALL 0x00114b84
ADD RSP,0x178
POP RBX
POP R14
RET
|
/* displayText(std::__cxx11::string) */
void displayText(int8 param_1)
{
int8 local_188;
_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *local_180;
int8 local_178;
_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *local_170;
int8 local_168;
_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *local_160;
int8 local_158;
_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *local_150;
ScreenInteractive *local_148;
int8 uStack_140;
code *local_138;
code *pcStack_130;
int8 local_128;
int8 uStack_120;
code *local_118;
code *pcStack_110;
ScreenInteractive local_100 [240];
ftxui::ScreenInteractive::Fullscreen(local_100);
uStack_120 = 0;
pcStack_110 = std::
_Function_handler<std::shared_ptr<ftxui::Node>(),displayText(std::__cxx11::string)::$_0>
::_M_invoke;
local_118 = std::
_Function_handler<std::shared_ptr<ftxui::Node>(),displayText(std::__cxx11::string)::$_0>
::_M_manager;
/* try { // try from 00112b54 to 00112b5d has its CatchHandler @ 00112ce7 */
local_128 = param_1;
ftxui::Renderer((ftxui *)&local_158);
if (local_118 != (code *)0x0) {
/* try { // try from 00112b68 to 00112b76 has its CatchHandler @ 00112c8b */
(*local_118)(&local_128,&local_128,3);
}
local_178 = local_158;
local_170 = local_150;
if (local_150 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) {
if (*PTR___libc_single_threaded_00159fb0 == '\0') {
LOCK();
*(int *)(local_150 + 8) = *(int *)(local_150 + 8) + 1;
UNLOCK();
}
else {
*(int *)(local_150 + 8) = *(int *)(local_150 + 8) + 1;
}
}
uStack_140 = 0;
pcStack_130 = std::_Function_handler<bool(ftxui::Event),displayText(std::__cxx11::string)::$_1>::
_M_invoke;
local_138 = std::_Function_handler<bool(ftxui::Event),displayText(std::__cxx11::string)::$_1>::
_M_manager;
/* try { // try from 00112bcd to 00112bdb has its CatchHandler @ 00112ca9 */
local_148 = local_100;
ftxui::CatchEvent((ftxui *)&local_168,&local_178);
if (local_138 != (code *)0x0) {
/* try { // try from 00112be6 to 00112bf4 has its CatchHandler @ 00112c86 */
(*local_138)(&local_148,&local_148,3);
}
if (local_170 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) {
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(local_170);
}
local_188 = local_168;
local_180 = local_160;
if (local_160 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) {
if (*PTR___libc_single_threaded_00159fb0 == '\0') {
LOCK();
*(int *)(local_160 + 8) = *(int *)(local_160 + 8) + 1;
UNLOCK();
}
else {
*(int *)(local_160 + 8) = *(int *)(local_160 + 8) + 1;
}
}
/* try { // try from 00112c31 to 00112c40 has its CatchHandler @ 00112c90 */
ftxui::ScreenInteractive::Loop(local_100,&local_188);
if (local_180 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) {
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(local_180);
}
if (local_160 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) {
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(local_160);
}
if (local_150 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) {
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(local_150);
}
ftxui::ScreenInteractive::~ScreenInteractive(local_100);
return;
}
|
|
64,255
|
displayText(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
|
Andrewchistyakov[P]flashcards_lyc/src/tui.cpp
|
void displayText(std::string to_display) {
auto screen = ScreenInteractive::Fullscreen();
auto renderer = Renderer([&] {
return vbox({
text(to_display) | center | flex,
}) | border;
});
auto breaker = CatchEvent(renderer, [&](Event event) {
if (event == Event::Return) {
screen.ExitLoopClosure()();
return true;
}
return false;
});
screen.Loop(breaker);
}
|
O3
|
cpp
|
displayText(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>):
pushq %r14
pushq %rbx
subq $0x178, %rsp # imm = 0x178
movq %rdi, %r14
leaq 0x88(%rsp), %rbx
movq %rbx, %rdi
callq 0x2d482
leaq 0x68(%rsp), %rsi
movq $0x0, 0x8(%rsi)
movq %r14, (%rsi)
leaq 0x13c9(%rip), %rax # 0x13e74
movq %rax, 0x18(%rsi)
leaq 0x168e(%rip), %rax # 0x14144
movq %rax, 0x10(%rsi)
leaq 0x38(%rsp), %rdi
callq 0x2c80c
movq 0x78(%rsp), %rax
testq %rax, %rax
je 0x12add
leaq 0x68(%rsp), %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
movq 0x38(%rsp), %rcx
movq 0x40(%rsp), %rax
movq %rcx, 0x18(%rsp)
movq %rax, 0x20(%rsp)
testq %rax, %rax
je 0x12b0b
movq 0x464b3(%rip), %rcx # 0x58fb0
cmpb $0x0, (%rcx)
je 0x12b07
incl 0x8(%rax)
jmp 0x12b0b
lock
incl 0x8(%rax)
leaq 0x48(%rsp), %rdx
movq $0x0, 0x8(%rdx)
movq %rbx, (%rdx)
leaq 0x1648(%rip), %rax # 0x1416a
movq %rax, 0x18(%rdx)
leaq 0x1771(%rip), %rax # 0x1429e
movq %rax, 0x10(%rdx)
leaq 0x28(%rsp), %rdi
leaq 0x18(%rsp), %rsi
callq 0x26584
movq 0x58(%rsp), %rax
testq %rax, %rax
je 0x12b59
leaq 0x48(%rsp), %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
movq 0x20(%rsp), %rdi
testq %rdi, %rdi
je 0x12b68
callq 0x14af8
movq 0x28(%rsp), %rcx
movq 0x30(%rsp), %rax
movq %rcx, 0x8(%rsp)
movq %rax, 0x10(%rsp)
testq %rax, %rax
je 0x12b96
movq 0x46428(%rip), %rcx # 0x58fb0
cmpb $0x0, (%rcx)
je 0x12b92
incl 0x8(%rax)
jmp 0x12b96
lock
incl 0x8(%rax)
leaq 0x88(%rsp), %rdi
leaq 0x8(%rsp), %rsi
callq 0x2d60e
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0x12bb7
callq 0x14af8
movq 0x30(%rsp), %rdi
testq %rdi, %rdi
je 0x12bc6
callq 0x14af8
movq 0x40(%rsp), %rdi
testq %rdi, %rdi
je 0x12bd5
callq 0x14af8
leaq 0x88(%rsp), %rdi
callq 0x14a00
addq $0x178, %rsp # imm = 0x178
popq %rbx
popq %r14
retq
jmp 0x12c7f
jmp 0x12c7f
movq %rax, %rbx
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0x12c09
callq 0x14af8
movq 0x30(%rsp), %rdi
jmp 0x12c31
movq %rax, %rbx
movq 0x58(%rsp), %rax
testq %rax, %rax
je 0x12c2c
leaq 0x48(%rsp), %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
movq 0x20(%rsp), %rdi
testq %rdi, %rdi
je 0x12c3b
callq 0x14af8
movq 0x40(%rsp), %rdi
testq %rdi, %rdi
je 0x12c6a
callq 0x14af8
jmp 0x12c6a
jmp 0x12c7f
movq %rax, %rbx
movq 0x78(%rsp), %rax
testq %rax, %rax
je 0x12c6a
leaq 0x68(%rsp), %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
leaq 0x88(%rsp), %rdi
callq 0x14a00
movq %rbx, %rdi
callq 0xb780
movq %rax, %rdi
callq 0x1049a
|
_Z11displayTextNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE:
push r14
push rbx
sub rsp, 178h
mov r14, rdi
lea rbx, [rsp+188h+var_100]
mov rdi, rbx; this
call _ZN5ftxui17ScreenInteractive10FullscreenEv; ftxui::ScreenInteractive::Fullscreen(void)
lea rsi, [rsp+188h+var_120]
mov qword ptr [rsi+8], 0
mov [rsi], r14
lea rax, _ZNSt17_Function_handlerIFSt10shared_ptrIN5ftxui4NodeEEvEZ11displayTextNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEE3$_0E9_M_invokeERKSt9_Any_data; std::_Function_handler<std::shared_ptr<ftxui::Node> ()(void),displayText(std::string)::$_0>::_M_invoke(std::_Any_data const&)
mov [rsi+18h], rax
lea rax, _ZNSt17_Function_handlerIFSt10shared_ptrIN5ftxui4NodeEEvEZ11displayTextNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEE3$_0E10_M_managerERSt9_Any_dataRKSD_St18_Manager_operation; std::_Function_handler<std::shared_ptr<ftxui::Node> ()(void),displayText(std::string)::$_0>::_M_manager(std::_Any_data &,std::_Any_data const&,std::_Manager_operation)
mov [rsi+10h], rax
lea rdi, [rsp+188h+var_150]
call _ZN5ftxui8RendererESt8functionIFSt10shared_ptrINS_4NodeEEvEE; ftxui::Renderer(std::function<std::shared_ptr<ftxui::Node> ()(void)>)
mov rax, [rsp+188h+var_110]
test rax, rax
jz short loc_12ADD
lea rdi, [rsp+188h+var_120]
mov rsi, rdi
mov edx, 3
call rax
loc_12ADD:
mov rcx, [rsp+188h+var_150]
mov rax, [rsp+188h+var_148]
mov [rsp+188h+var_170], rcx
mov [rsp+188h+var_168], rax
test rax, rax
jz short loc_12B0B
mov rcx, cs:__libc_single_threaded_ptr
cmp byte ptr [rcx], 0
jz short loc_12B07
inc dword ptr [rax+8]
jmp short loc_12B0B
loc_12B07:
lock inc dword ptr [rax+8]
loc_12B0B:
lea rdx, [rsp+188h+var_140]
mov qword ptr [rdx+8], 0
mov [rdx], rbx
lea rax, _ZNSt17_Function_handlerIFbN5ftxui5EventEEZ11displayTextNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEE3$_1E9_M_invokeERKSt9_Any_dataOS1_; std::_Function_handler<bool ()(ftxui::Event),displayText(std::string)::$_1>::_M_invoke(std::_Any_data const&,ftxui::Event&&)
mov [rdx+18h], rax
lea rax, _ZNSt17_Function_handlerIFbN5ftxui5EventEEZ11displayTextNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEE3$_1E10_M_managerERSt9_Any_dataRKSB_St18_Manager_operation; std::_Function_handler<bool ()(ftxui::Event),displayText(std::string)::$_1>::_M_manager(std::_Any_data &,std::_Any_data const&,std::_Manager_operation)
mov [rdx+10h], rax
lea rdi, [rsp+188h+var_160]
lea rsi, [rsp+188h+var_170]
call _ZN5ftxui10CatchEventESt10shared_ptrINS_13ComponentBaseEESt8functionIFbNS_5EventEEE; ftxui::CatchEvent(std::shared_ptr<ftxui::ComponentBase>,std::function<bool ()(ftxui::Event)>)
mov rax, [rsp+188h+var_130]
test rax, rax
jz short loc_12B59
lea rdi, [rsp+188h+var_140]
mov rsi, rdi
mov edx, 3
call rax
loc_12B59:
mov rdi, [rsp+188h+var_168]
test rdi, rdi
jz short loc_12B68
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_12B68:
mov rcx, [rsp+188h+var_160]
mov rax, [rsp+188h+var_158]
mov [rsp+188h+var_180], rcx
mov [rsp+188h+var_178], rax
test rax, rax
jz short loc_12B96
mov rcx, cs:__libc_single_threaded_ptr
cmp byte ptr [rcx], 0
jz short loc_12B92
inc dword ptr [rax+8]
jmp short loc_12B96
loc_12B92:
lock inc dword ptr [rax+8]
loc_12B96:
lea rdi, [rsp+188h+var_100]
lea rsi, [rsp+188h+var_180]
call _ZN5ftxui17ScreenInteractive4LoopESt10shared_ptrINS_13ComponentBaseEE; ftxui::ScreenInteractive::Loop(std::shared_ptr<ftxui::ComponentBase>)
mov rdi, [rsp+188h+var_178]
test rdi, rdi
jz short loc_12BB7
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_12BB7:
mov rdi, [rsp+188h+var_158]
test rdi, rdi
jz short loc_12BC6
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_12BC6:
mov rdi, [rsp+188h+var_148]
test rdi, rdi
jz short loc_12BD5
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_12BD5:
lea rdi, [rsp+188h+var_100]; this
call _ZN5ftxui17ScreenInteractiveD2Ev; ftxui::ScreenInteractive::~ScreenInteractive()
add rsp, 178h
pop rbx
pop r14
retn
jmp loc_12C7F
jmp loc_12C7F
mov rbx, rax
mov rdi, [rsp+188h+var_178]
test rdi, rdi
jz short loc_12C09
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_12C09:
mov rdi, [rsp+188h+var_158]
jmp short loc_12C31
mov rbx, rax
mov rax, [rsp+188h+var_130]
test rax, rax
jz short loc_12C2C
lea rdi, [rsp+188h+var_140]
mov rsi, rdi
mov edx, 3
call rax
loc_12C2C:
mov rdi, [rsp+188h+var_168]
loc_12C31:
test rdi, rdi
jz short loc_12C3B
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_12C3B:
mov rdi, [rsp+188h+var_148]
test rdi, rdi
jz short loc_12C6A
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
jmp short loc_12C6A
jmp short loc_12C7F
mov rbx, rax
mov rax, [rsp+188h+var_110]
test rax, rax
jz short loc_12C6A
lea rdi, [rsp+188h+var_120]
mov rsi, rdi
mov edx, 3
call rax
loc_12C6A:
lea rdi, [rsp+188h+var_100]; this
call _ZN5ftxui17ScreenInteractiveD2Ev; ftxui::ScreenInteractive::~ScreenInteractive()
mov rdi, rbx
call __Unwind_Resume
loc_12C7F:
mov rdi, rax
call __clang_call_terminate
|
void displayText(long long a1)
{
int v1; // r8d
int v2; // r9d
void *v3; // rcx
int v4; // edx
int v5; // r8d
int v6; // r9d
void *v7; // rcx
long long v8; // [rsp+8h] [rbp-180h] BYREF
long long v9; // [rsp+10h] [rbp-178h]
long long v10; // [rsp+18h] [rbp-170h] BYREF
long long v11; // [rsp+20h] [rbp-168h]
long long v12; // [rsp+28h] [rbp-160h] BYREF
long long v13; // [rsp+30h] [rbp-158h]
long long v14; // [rsp+38h] [rbp-150h] BYREF
long long v15; // [rsp+40h] [rbp-148h]
_QWORD v16[2]; // [rsp+48h] [rbp-140h] BYREF
long long ( *v17)(); // [rsp+58h] [rbp-130h]
long long ( *v18)(); // [rsp+60h] [rbp-128h]
_QWORD v19[2]; // [rsp+68h] [rbp-120h] BYREF
long long ( *v20)(); // [rsp+78h] [rbp-110h]
long long ( *v21)(); // [rsp+80h] [rbp-108h]
_BYTE v22[256]; // [rsp+88h] [rbp-100h] BYREF
ftxui::ScreenInteractive::Fullscreen((ftxui::ScreenInteractive *)v22);
v19[1] = 0LL;
v19[0] = a1;
v21 = std::_Function_handler<std::shared_ptr<ftxui::Node> ()(void),displayText(std::string)::$_0>::_M_invoke;
v20 = std::_Function_handler<std::shared_ptr<ftxui::Node> ()(void),displayText(std::string)::$_0>::_M_manager;
ftxui::Renderer(&v14);
if ( v20 )
((void ( *)(_QWORD *, _QWORD *, long long))v20)(v19, v19, 3LL);
LODWORD(v3) = v14;
v10 = v14;
v11 = v15;
if ( v15 )
{
v3 = &_libc_single_threaded;
if ( _libc_single_threaded )
++*(_DWORD *)(v15 + 8);
else
_InterlockedIncrement((volatile signed __int32 *)(v15 + 8));
}
v16[1] = 0LL;
v16[0] = v22;
v18 = std::_Function_handler<bool ()(ftxui::Event),displayText(std::string)::$_1>::_M_invoke;
v17 = std::_Function_handler<bool ()(ftxui::Event),displayText(std::string)::$_1>::_M_manager;
ftxui::CatchEvent((unsigned int)&v12, (unsigned int)&v10, (unsigned int)v16, (_DWORD)v3, v1, v2);
if ( v17 )
((void ( *)(_QWORD *, _QWORD *, long long))v17)(v16, v16, 3LL);
if ( v11 )
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release();
LODWORD(v7) = v12;
v8 = v12;
v9 = v13;
if ( v13 )
{
v7 = &_libc_single_threaded;
if ( _libc_single_threaded )
++*(_DWORD *)(v13 + 8);
else
_InterlockedIncrement((volatile signed __int32 *)(v13 + 8));
}
ftxui::ScreenInteractive::Loop((unsigned int)v22, (unsigned int)&v8, v4, (_DWORD)v7, v5, v6);
if ( v9 )
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release();
if ( v13 )
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release();
if ( v15 )
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release();
ftxui::ScreenInteractive::~ScreenInteractive((ftxui::ScreenInteractive *)v22);
}
|
displayText:
PUSH R14
PUSH RBX
SUB RSP,0x178
MOV R14,RDI
LEA RBX,[RSP + 0x88]
MOV RDI,RBX
CALL 0x0012d482
LEA RSI,[RSP + 0x68]
MOV qword ptr [RSI + 0x8],0x0
MOV qword ptr [RSI],R14
LEA RAX,[0x113e74]
MOV qword ptr [RSI + 0x18],RAX
LEA RAX,[0x114144]
MOV qword ptr [RSI + 0x10],RAX
LAB_00112aba:
LEA RDI,[RSP + 0x38]
CALL 0x0012c80c
MOV RAX,qword ptr [RSP + 0x78]
TEST RAX,RAX
JZ 0x00112add
LAB_00112ace:
LEA RDI,[RSP + 0x68]
MOV RSI,RDI
MOV EDX,0x3
CALL RAX
LAB_00112add:
MOV RCX,qword ptr [RSP + 0x38]
MOV RAX,qword ptr [RSP + 0x40]
MOV qword ptr [RSP + 0x18],RCX
MOV qword ptr [RSP + 0x20],RAX
TEST RAX,RAX
JZ 0x00112b0b
MOV RCX,qword ptr [0x00158fb0]
CMP byte ptr [RCX],0x0
JZ 0x00112b07
INC dword ptr [RAX + 0x8]
JMP 0x00112b0b
LAB_00112b07:
INC.LOCK dword ptr [RAX + 0x8]
LAB_00112b0b:
LEA RDX,[RSP + 0x48]
MOV qword ptr [RDX + 0x8],0x0
MOV qword ptr [RDX],RBX
LEA RAX,[0x11416a]
MOV qword ptr [RDX + 0x18],RAX
LEA RAX,[0x11429e]
MOV qword ptr [RDX + 0x10],RAX
LAB_00112b31:
LEA RDI,[RSP + 0x28]
LEA RSI,[RSP + 0x18]
CALL 0x00126584
MOV RAX,qword ptr [RSP + 0x58]
TEST RAX,RAX
JZ 0x00112b59
LAB_00112b4a:
LEA RDI,[RSP + 0x48]
MOV RSI,RDI
MOV EDX,0x3
CALL RAX
LAB_00112b59:
MOV RDI,qword ptr [RSP + 0x20]
TEST RDI,RDI
JZ 0x00112b68
CALL 0x00114af8
LAB_00112b68:
MOV RCX,qword ptr [RSP + 0x28]
MOV RAX,qword ptr [RSP + 0x30]
MOV qword ptr [RSP + 0x8],RCX
MOV qword ptr [RSP + 0x10],RAX
TEST RAX,RAX
JZ 0x00112b96
MOV RCX,qword ptr [0x00158fb0]
CMP byte ptr [RCX],0x0
JZ 0x00112b92
INC dword ptr [RAX + 0x8]
JMP 0x00112b96
LAB_00112b92:
INC.LOCK dword ptr [RAX + 0x8]
LAB_00112b96:
LEA RDI,[RSP + 0x88]
LEA RSI,[RSP + 0x8]
CALL 0x0012d60e
MOV RDI,qword ptr [RSP + 0x10]
TEST RDI,RDI
JZ 0x00112bb7
CALL 0x00114af8
LAB_00112bb7:
MOV RDI,qword ptr [RSP + 0x30]
TEST RDI,RDI
JZ 0x00112bc6
CALL 0x00114af8
LAB_00112bc6:
MOV RDI,qword ptr [RSP + 0x40]
TEST RDI,RDI
JZ 0x00112bd5
CALL 0x00114af8
LAB_00112bd5:
LEA RDI,[RSP + 0x88]
CALL 0x00114a00
ADD RSP,0x178
POP RBX
POP R14
RET
|
/* displayText(std::__cxx11::string) */
void displayText(int8 param_1)
{
int8 local_180;
_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *local_178;
int8 local_170;
_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *local_168;
int8 local_160;
_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *local_158;
int8 local_150;
_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *local_148;
ScreenInteractive *local_140;
int8 local_138;
code *local_130;
code *local_128;
int8 local_120;
int8 local_118;
code *local_110;
code *local_108;
ScreenInteractive local_100 [240];
ftxui::ScreenInteractive::Fullscreen(local_100);
local_118 = 0;
local_108 = std::
_Function_handler<std::shared_ptr<ftxui::Node>(),displayText(std::__cxx11::string)::$_0>
::_M_invoke;
local_110 = std::
_Function_handler<std::shared_ptr<ftxui::Node>(),displayText(std::__cxx11::string)::$_0>
::_M_manager;
/* try { // try from 00112aba to 00112ac3 has its CatchHandler @ 00112c4e */
local_120 = param_1;
ftxui::Renderer((ftxui *)&local_150);
if (local_110 != (code *)0x0) {
/* try { // try from 00112ace to 00112adc has its CatchHandler @ 00112bf2 */
(*local_110)(&local_120,&local_120,3);
}
local_170 = local_150;
local_168 = local_148;
if (local_148 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) {
if (*PTR___libc_single_threaded_00158fb0 == '\0') {
LOCK();
*(int *)(local_148 + 8) = *(int *)(local_148 + 8) + 1;
UNLOCK();
}
else {
*(int *)(local_148 + 8) = *(int *)(local_148 + 8) + 1;
}
}
local_138 = 0;
local_128 = std::_Function_handler<bool(ftxui::Event),displayText(std::__cxx11::string)::$_1>::
_M_invoke;
local_130 = std::_Function_handler<bool(ftxui::Event),displayText(std::__cxx11::string)::$_1>::
_M_manager;
/* try { // try from 00112b31 to 00112b3f has its CatchHandler @ 00112c10 */
local_140 = local_100;
ftxui::CatchEvent((ftxui *)&local_160,&local_170);
if (local_130 != (code *)0x0) {
/* try { // try from 00112b4a to 00112b58 has its CatchHandler @ 00112bed */
(*local_130)(&local_140,&local_140,3);
}
if (local_168 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) {
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(local_168);
}
local_180 = local_160;
local_178 = local_158;
if (local_158 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) {
if (*PTR___libc_single_threaded_00158fb0 == '\0') {
LOCK();
*(int *)(local_158 + 8) = *(int *)(local_158 + 8) + 1;
UNLOCK();
}
else {
*(int *)(local_158 + 8) = *(int *)(local_158 + 8) + 1;
}
}
/* try { // try from 00112b96 to 00112ba7 has its CatchHandler @ 00112bf7 */
ftxui::ScreenInteractive::Loop(local_100,&local_180);
if (local_178 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) {
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(local_178);
}
if (local_158 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) {
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(local_158);
}
if (local_148 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) {
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(local_148);
}
ftxui::ScreenInteractive::~ScreenInteractive(local_100);
return;
}
|
|
64,256
|
testing::AssertionResult testing::(anonymous namespace)::IsSubstringImpl<std::__cxx11::basic_string<wchar_t, std::char_traits<wchar_t>, std::allocator<wchar_t>>>(bool, char const*, char const*, std::__cxx11::basic_string<wchar_t, std::char_traits<wchar_t>, std::allocator<wchar_t>> const&, std::__cxx11::basic_string<wchar_t, std::char_traits<wchar_t>, std::allocator<wchar_t>> const&)
|
seiftnesse[P]memoryallocator/build_O1/_deps/googletest-src/googletest/src/gtest.cc
|
AssertionResult IsSubstringImpl(bool expected_to_be_substring,
const char* needle_expr,
const char* haystack_expr,
const StringType& needle,
const StringType& haystack) {
if (IsSubstringPred(needle, haystack) == expected_to_be_substring)
return AssertionSuccess();
const bool is_wide_string = sizeof(needle[0]) > 1;
const char* const begin_string_quote = is_wide_string ? "L\"" : "\"";
return AssertionFailure()
<< "Value of: " << needle_expr << "\n"
<< " Actual: " << begin_string_quote << needle << "\"\n"
<< "Expected: " << (expected_to_be_substring ? "" : "not ")
<< "a substring of " << haystack_expr << "\n"
<< "Which is: " << begin_string_quote << haystack << "\"";
}
|
O1
|
cpp
|
testing::AssertionResult testing::(anonymous namespace)::IsSubstringImpl<std::__cxx11::basic_string<wchar_t, std::char_traits<wchar_t>, std::allocator<wchar_t>>>(bool, char const*, char const*, std::__cxx11::basic_string<wchar_t, std::char_traits<wchar_t>, std::allocator<wchar_t>> const&, std::__cxx11::basic_string<wchar_t, std::char_traits<wchar_t>, std::allocator<wchar_t>> const&):
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x30, %rsp
movq %r9, %r15
movq %r8, %r12
movl %esi, %ebp
movq %rdi, %rbx
movq %rdx, 0x20(%rsp)
movq %rcx, 0x18(%rsp)
movq (%r8), %rsi
movq 0x8(%r8), %rcx
movq %r9, %rdi
xorl %edx, %edx
callq 0x9990
cmpq $-0x1, %rax
setne %al
xorb %bpl, %al
je 0x23101
leaq 0x219c3(%rip), %rax # 0x4499c
movq %rax, (%rsp)
leaq 0x10(%rsp), %r14
movb $0x0, -0x8(%r14)
movq $0x0, (%r14)
leaq 0x1fe73(%rip), %rsi # 0x42e68
leaq 0x8(%rsp), %rdi
callq 0x3a40c
leaq 0x20(%rsp), %rsi
movq %rax, %rdi
callq 0x101a2
leaq 0x205dc(%rip), %rsi # 0x435ef
movq %rax, %rdi
callq 0x3659c
leaq 0x1fe52(%rip), %rsi # 0x42e74
movq %rax, %rdi
callq 0x3a40c
movq %rsp, %rsi
movq %rax, %rdi
callq 0x101a2
movq %rax, %rdi
movq %r12, %rsi
callq 0x3e288
leaq 0x209aa(%rip), %rsi # 0x439f1
movq %rax, %rdi
callq 0x10232
leaq 0x1fe2a(%rip), %rsi # 0x42e80
movq %rax, %rdi
callq 0x3a40c
leaq 0x2058b(%rip), %rcx # 0x435f0
leaq 0x2191b(%rip), %rdx # 0x44987
testb %bpl, %bpl
cmovneq %rcx, %rdx
leaq 0x28(%rsp), %rsi
movq %rdx, (%rsi)
movq %rax, %rdi
callq 0x101a2
leaq 0x21902(%rip), %rsi # 0x4498c
movq %rax, %rdi
callq 0x3e19e
leaq 0x18(%rsp), %rsi
movq %rax, %rdi
callq 0x101a2
leaq 0x20549(%rip), %rsi # 0x435ef
movq %rax, %rdi
callq 0x3659c
leaq 0x1fd8c(%rip), %rsi # 0x42e41
movq %rax, %rdi
callq 0x3a40c
movq %rsp, %rsi
movq %rax, %rdi
callq 0x101a2
movq %rax, %rdi
movq %r15, %rsi
callq 0x3e288
leaq 0x20904(%rip), %rsi # 0x439de
movq %rax, %rdi
callq 0x3659c
movq %rbx, %rdi
movq %rax, %rsi
callq 0x11fe4
movq 0x10(%rsp), %rsi
testq %rsi, %rsi
je 0x2310c
movq %r14, %rdi
callq 0xf756
jmp 0x2310c
movb $0x1, (%rbx)
movq $0x0, 0x8(%rbx)
movq %rbx, %rax
addq $0x30, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
jmp 0x2311e
movq %rax, %rbx
movq 0x10(%rsp), %rsi
testq %rsi, %rsi
je 0x23133
movq %r14, %rdi
callq 0xf756
movq %rbx, %rdi
callq 0x99a0
|
_ZN7testing12_GLOBAL__N_115IsSubstringImplINSt7__cxx1112basic_stringIwSt11char_traitsIwESaIwEEEEENS_15AssertionResultEbPKcSA_RKT_SD_:
push rbp
push r15
push r14
push r12
push rbx
sub rsp, 30h
mov r15, r9
mov r12, r8
mov ebp, esi
mov rbx, rdi
mov [rsp+58h+var_38], rdx
mov [rsp+58h+var_40], rcx
mov rsi, [r8]
mov rcx, [r8+8]
mov rdi, r9
xor edx, edx
call __ZNKSt7__cxx1112basic_stringIwSt11char_traitsIwESaIwEE4findEPKwmm; std::wstring::find(wchar_t const*,ulong,ulong)
cmp rax, 0FFFFFFFFFFFFFFFFh
setnz al
xor al, bpl
jz loc_23101
lea rax, asc_4499C; "L\""
mov [rsp+58h+var_58], rax; __int64
lea r14, [rsp+58h+var_48]
mov byte ptr [r14-8], 0
mov qword ptr [r14], 0
lea rsi, aValueOf; "Value of: "
lea rdi, [rsp+58h+var_50]; this
call _ZN7testing15AssertionResultlsIA11_cEERS0_RKT_; testing::AssertionResult::operator<<<char [11]>(char [11] const&)
lea rsi, [rsp+58h+var_38]
mov rdi, rax; this
call _ZN7testing15AssertionResultlsIPKcEERS0_RKT_; testing::AssertionResult::operator<<<char const*>(char const* const&)
lea rsi, aSFromSSMsTotal+19h; "\n"
mov rdi, rax; this
call _ZN7testing15AssertionResultlsIA2_cEERS0_RKT_; testing::AssertionResult::operator<<<char [2]>(char [2] const&)
lea rsi, aActual_0+1; " Actual: "
mov rdi, rax; this
call _ZN7testing15AssertionResultlsIA11_cEERS0_RKT_; testing::AssertionResult::operator<<<char [11]>(char [11] const&)
mov rsi, rsp
mov rdi, rax; this
call _ZN7testing15AssertionResultlsIPKcEERS0_RKT_; testing::AssertionResult::operator<<<char const*>(char const* const&)
mov rdi, rax; this
mov rsi, r12
call _ZN7testing15AssertionResultlsINSt7__cxx1112basic_stringIwSt11char_traitsIwESaIwEEEEERS0_RKT_; testing::AssertionResult::operator<<<std::wstring>(std::wstring const&)
lea rsi, aType_0+0Dh; "\"\n"
mov rdi, rax; this
call _ZN7testing15AssertionResultlsIA3_cEERS0_RKT_; testing::AssertionResult::operator<<<char [3]>(char [3] const&)
lea rsi, aExpected_1+1; "Expected: "
mov rdi, rax; this
call _ZN7testing15AssertionResultlsIA11_cEERS0_RKT_; testing::AssertionResult::operator<<<char [11]>(char [11] const&)
lea rcx, aSFromSSMsTotal+1Ah; ""
lea rdx, aNot; "not "
test bpl, bpl
cmovnz rdx, rcx
lea rsi, [rsp+58h+var_30]
mov [rsi], rdx
mov rdi, rax; this
call _ZN7testing15AssertionResultlsIPKcEERS0_RKT_; testing::AssertionResult::operator<<<char const*>(char const* const&)
lea rsi, aASubstringOf; "a substring of "
mov rdi, rax; this
call _ZN7testing15AssertionResultlsIA16_cEERS0_RKT_; testing::AssertionResult::operator<<<char [16]>(char [16] const&)
lea rsi, [rsp+58h+var_40]
mov rdi, rax; this
call _ZN7testing15AssertionResultlsIPKcEERS0_RKT_; testing::AssertionResult::operator<<<char const*>(char const* const&)
lea rsi, aSFromSSMsTotal+19h; "\n"
mov rdi, rax; this
call _ZN7testing15AssertionResultlsIA2_cEERS0_RKT_; testing::AssertionResult::operator<<<char [2]>(char [2] const&)
lea rsi, aWhichIs+5; "Which is: "
mov rdi, rax; this
call _ZN7testing15AssertionResultlsIA11_cEERS0_RKT_; testing::AssertionResult::operator<<<char [11]>(char [11] const&)
mov rsi, rsp
mov rdi, rax; this
call _ZN7testing15AssertionResultlsIPKcEERS0_RKT_; testing::AssertionResult::operator<<<char const*>(char const* const&)
mov rdi, rax; this
mov rsi, r15
call _ZN7testing15AssertionResultlsINSt7__cxx1112basic_stringIwSt11char_traitsIwESaIwEEEEERS0_RKT_; testing::AssertionResult::operator<<<std::wstring>(std::wstring const&)
lea rsi, aFailure_0+0Fh; "\""
mov rdi, rax; this
call _ZN7testing15AssertionResultlsIA2_cEERS0_RKT_; testing::AssertionResult::operator<<<char [2]>(char [2] const&)
mov rdi, rbx
mov rsi, rax
call _ZN7testing15AssertionResultC2ERKS0_; testing::AssertionResult::AssertionResult(testing::AssertionResult const&)
mov rsi, [rsp+58h+var_48]
test rsi, rsi
jz short loc_2310C
mov rdi, r14
call _ZNKSt14default_deleteINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEclEPS5_; std::default_delete<std::string>::operator()(std::string*)
jmp short loc_2310C
loc_23101:
mov byte ptr [rbx], 1
mov qword ptr [rbx+8], 0
loc_2310C:
mov rax, rbx
add rsp, 30h
pop rbx
pop r12
pop r14
pop r15
pop rbp
retn
jmp short $+2
loc_2311E:
mov rbx, rax
mov rsi, [rsp+arg_8]
test rsi, rsi
jz short loc_23133
mov rdi, r14
call _ZNKSt14default_deleteINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEclEPS5_; std::default_delete<std::string>::operator()(std::string*)
loc_23133:
mov rdi, rbx
call __Unwind_Resume
|
testing::AssertionResult * testing::`anonymous namespace'::IsSubstringImpl<std::wstring>(
testing::AssertionResult *a1,
char a2,
const char *a3,
const char *a4,
_QWORD *a5,
long long a6)
{
testing::AssertionResult *v6; // rax
testing::AssertionResult *v7; // rax
testing::AssertionResult *v8; // rax
testing::AssertionResult *v9; // rax
testing::AssertionResult *v10; // rax
testing::AssertionResult *v11; // rax
testing::AssertionResult *v12; // rax
testing::AssertionResult *v13; // rax
const char *v14; // rdx
testing::AssertionResult *v15; // rax
testing::AssertionResult *v16; // rax
testing::AssertionResult *v17; // rax
testing::AssertionResult *v18; // rax
testing::AssertionResult *v19; // rax
testing::AssertionResult *v20; // rax
testing::AssertionResult *v21; // rax
const testing::AssertionResult *v22; // rax
long long v24; // [rsp+0h] [rbp-58h] BYREF
_BYTE v25[8]; // [rsp+8h] [rbp-50h] BYREF
long long v26; // [rsp+10h] [rbp-48h] BYREF
const char *v27; // [rsp+18h] [rbp-40h] BYREF
const char *v28; // [rsp+20h] [rbp-38h] BYREF
const char *v29; // [rsp+28h] [rbp-30h] BYREF
v28 = a3;
v27 = a4;
if ( a2 != (std::wstring::find(a6, *a5, 0LL, a5[1]) != -1) )
{
v25[0] = 0;
v26 = 0LL;
v6 = (testing::AssertionResult *)testing::AssertionResult::operator<<<char [11]>(
(testing::AssertionResult *)v25,
(long long)"L\"");
v7 = testing::AssertionResult::operator<<<char const*>(v6, &v28);
v8 = (testing::AssertionResult *)testing::AssertionResult::operator<<<char [2]>(v7, v24);
v9 = (testing::AssertionResult *)testing::AssertionResult::operator<<<char [11]>(v8, v24);
v10 = testing::AssertionResult::operator<<<char const*>(v9, (const char **)&v24);
v11 = (testing::AssertionResult *)testing::AssertionResult::operator<<<std::wstring>(v10, v24);
v12 = testing::AssertionResult::operator<<<char [3]>(v11, (long long)"\"\n");
v13 = (testing::AssertionResult *)testing::AssertionResult::operator<<<char [11]>(v12, v24);
v14 = "not ";
if ( a2 )
v14 = "";
v29 = v14;
v15 = testing::AssertionResult::operator<<<char const*>(v13, &v29);
v16 = (testing::AssertionResult *)testing::AssertionResult::operator<<<char [16]>(v15, v24);
v17 = testing::AssertionResult::operator<<<char const*>(v16, &v27);
v18 = (testing::AssertionResult *)testing::AssertionResult::operator<<<char [2]>(v17, v24);
v19 = (testing::AssertionResult *)testing::AssertionResult::operator<<<char [11]>(v18, v24);
v20 = testing::AssertionResult::operator<<<char const*>(v19, (const char **)&v24);
v21 = (testing::AssertionResult *)testing::AssertionResult::operator<<<std::wstring>(v20, v24);
v22 = (const testing::AssertionResult *)testing::AssertionResult::operator<<<char [2]>(v21, v24);
testing::AssertionResult::AssertionResult(a1, v22);
if ( v26 )
std::default_delete<std::string>::operator()((long long)&v26, v26);
}
else
{
*(_BYTE *)a1 = 1;
*((_QWORD *)a1 + 1) = 0LL;
}
return a1;
}
|
IsSubstringImpl<std::__cxx11::wstring>:
PUSH RBP
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
SUB RSP,0x30
MOV R15,R9
MOV R12,R8
MOV EBP,ESI
MOV RBX,RDI
MOV qword ptr [RSP + 0x20],RDX
MOV qword ptr [RSP + 0x18],RCX
MOV RSI,qword ptr [R8]
MOV RCX,qword ptr [R8 + 0x8]
MOV RDI,R9
XOR EDX,EDX
CALL 0x00109990
CMP RAX,-0x1
SETNZ AL
XOR AL,BPL
JZ 0x00123101
LEA RAX,[0x14499c]
MOV qword ptr [RSP],RAX
LEA R14,[RSP + 0x10]
MOV byte ptr [R14 + -0x8],0x0
MOV qword ptr [R14],0x0
LAB_00122fee:
LEA RSI,[0x142e68]
LEA RDI,[RSP + 0x8]
CALL 0x0013a40c
LEA RSI,[RSP + 0x20]
MOV RDI,RAX
CALL 0x001101a2
LEA RSI,[0x1435ef]
MOV RDI,RAX
CALL 0x0013659c
LEA RSI,[0x142e74]
MOV RDI,RAX
CALL 0x0013a40c
MOV RSI,RSP
MOV RDI,RAX
CALL 0x001101a2
MOV RDI,RAX
MOV RSI,R12
CALL 0x0013e288
LEA RSI,[0x1439f1]
MOV RDI,RAX
CALL 0x00110232
LEA RSI,[0x142e80]
MOV RDI,RAX
CALL 0x0013a40c
LEA RCX,[0x1435f0]
LEA RDX,[0x144987]
TEST BPL,BPL
CMOVNZ RDX,RCX
LEA RSI,[RSP + 0x28]
MOV qword ptr [RSI],RDX
LAB_0012307b:
MOV RDI,RAX
CALL 0x001101a2
LEA RSI,[0x14498c]
MOV RDI,RAX
CALL 0x0013e19e
LEA RSI,[RSP + 0x18]
MOV RDI,RAX
CALL 0x001101a2
LEA RSI,[0x1435ef]
MOV RDI,RAX
CALL 0x0013659c
LEA RSI,[0x142e41]
MOV RDI,RAX
CALL 0x0013a40c
MOV RSI,RSP
MOV RDI,RAX
CALL 0x001101a2
MOV RDI,RAX
MOV RSI,R15
CALL 0x0013e288
LEA RSI,[0x1439de]
MOV RDI,RAX
CALL 0x0013659c
MOV RDI,RBX
MOV RSI,RAX
CALL 0x00111fe4
LAB_001230ed:
MOV RSI,qword ptr [RSP + 0x10]
TEST RSI,RSI
JZ 0x0012310c
MOV RDI,R14
CALL 0x0010f756
JMP 0x0012310c
LAB_00123101:
MOV byte ptr [RBX],0x1
MOV qword ptr [RBX + 0x8],0x0
LAB_0012310c:
MOV RAX,RBX
ADD RSP,0x30
POP RBX
POP R12
POP R14
POP R15
POP RBP
RET
|
/* testing::AssertionResult testing::(anonymous namespace)::IsSubstringImpl<std::__cxx11::wstring
>(bool, char const*, char const*, std::__cxx11::wstring const&, std::__cxx11::wstring const&) */
_anonymous_namespace_ * __thiscall
testing::(anonymous_namespace)::IsSubstringImpl<std::__cxx11::wstring>
(_anonymous_namespace_ *this,bool param_1,char *param_2,char *param_3,wstring *param_4,
wstring *param_5)
{
long lVar1;
AssertionResult *pAVar2;
char *local_58;
AssertionResult local_50 [8];
string *local_48;
char *local_40;
char *local_38;
char *local_30;
local_40 = param_3;
local_38 = param_2;
lVar1 = std::__cxx11::wstring::find((wchar_t *)param_5,*(ulong *)param_4,0);
if ((lVar1 != -1) == param_1) {
*this = (_anonymous_namespace_)0x1;
*(int8 *)(this + 8) = 0;
}
else {
local_58 = "L\"";
local_50[0] = (AssertionResult)0x0;
local_48 = (string *)0x0;
/* try { // try from 00122fee to 0012305d has its CatchHandler @ 0012311c */
pAVar2 = AssertionResult::operator<<(local_50,"Value of: ");
pAVar2 = AssertionResult::operator<<(pAVar2,&local_38);
pAVar2 = AssertionResult::operator<<(pAVar2,"\n");
pAVar2 = AssertionResult::operator<<(pAVar2," Actual: ");
pAVar2 = AssertionResult::operator<<(pAVar2,&local_58);
pAVar2 = AssertionResult::operator<<(pAVar2,param_4);
pAVar2 = AssertionResult::operator<<(pAVar2,"\"\n");
pAVar2 = AssertionResult::operator<<(pAVar2,"Expected: ");
local_30 = "not ";
if (param_1) {
local_30 = "";
}
/* try { // try from 0012307b to 001230ec has its CatchHandler @ 0012311e */
pAVar2 = AssertionResult::operator<<(pAVar2,&local_30);
pAVar2 = AssertionResult::operator<<(pAVar2,"a substring of ");
pAVar2 = AssertionResult::operator<<(pAVar2,&local_40);
pAVar2 = AssertionResult::operator<<(pAVar2,"\n");
pAVar2 = AssertionResult::operator<<(pAVar2,"Which is: ");
pAVar2 = AssertionResult::operator<<(pAVar2,&local_58);
pAVar2 = AssertionResult::operator<<(pAVar2,param_5);
pAVar2 = AssertionResult::operator<<(pAVar2,"\"");
AssertionResult::AssertionResult((AssertionResult *)this,pAVar2);
if (local_48 != (string *)0x0) {
std::default_delete<std::__cxx11::string>::operator()
((default_delete<std::__cxx11::string> *)&local_48,local_48);
}
}
return this;
}
|
|
64,257
|
nglog::LogMessage::LogStream::~LogStream()
|
ng-log[P]ng-log/src/ng-log/logging.h
|
class NGLOG_EXPORT LogStream : public std::ostream {
NGLOG_MSVC_POP_WARNING()
public:
// In some cases, like when compiling glog as a static library with GCC and
// linking against a Clang-built executable, this constructor will be
// removed by the linker. We use this attribute to prevent the linker from
// discarding it.
NGLOG_USED
LogStream(char* buf, int len, int64 ctr)
: std::ostream(nullptr), streambuf_(buf, len), ctr_(ctr), self_(this) {
rdbuf(&streambuf_);
}
LogStream(LogStream&& other) noexcept
: std::ostream(nullptr),
streambuf_(std::move(other.streambuf_)),
ctr_(std::exchange(other.ctr_, 0)),
self_(this) {
rdbuf(&streambuf_);
}
LogStream& operator=(LogStream&& other) noexcept {
streambuf_ = std::move(other.streambuf_);
ctr_ = std::exchange(other.ctr_, 0);
rdbuf(&streambuf_);
return *this;
}
int64 ctr() const { return ctr_; }
void set_ctr(int64 ctr) { ctr_ = ctr; }
LogStream* self() const { return self_; }
// Legacy std::streambuf methods.
size_t pcount() const { return streambuf_.pcount(); }
char* pbase() const { return streambuf_.pbase(); }
char* str() const { return pbase(); }
LogStream(const LogStream&) = delete;
LogStream& operator=(const LogStream&) = delete;
private:
base_logging::LogStreamBuf streambuf_;
int64 ctr_; // Counter hack (for the LOG_EVERY_X() macro)
LogStream* self_; // Consistency check hack
}
|
O0
|
c
|
nglog::LogMessage::LogStream::~LogStream():
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x20(%rbp)
movq (%rax), %rcx
movq %rcx, (%rdi)
movq 0x18(%rax), %rcx
movq (%rdi), %rax
movq -0x18(%rax), %rax
movq %rcx, (%rdi,%rax)
addq $0x8, %rdi
callq 0x223f0
movq -0x20(%rbp), %rsi
movq -0x18(%rbp), %rdi
addq $0x8, %rsi
callq 0xa7d0
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
nop
|
_ZN5nglog10LogMessage9LogStreamD2Ev:
push rbp
mov rbp, rsp
sub rsp, 20h
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov rdi, [rbp+var_8]
mov [rbp+var_18], rdi
mov rax, [rbp+var_10]
mov [rbp+var_20], rax
mov rcx, [rax]
mov [rdi], rcx
mov rcx, [rax+18h]
mov rax, [rdi]
mov rax, [rax-18h]
mov [rdi+rax], rcx
add rdi, 8; this
call _ZN5nglog12base_logging12LogStreamBufD2Ev; nglog::base_logging::LogStreamBuf::~LogStreamBuf()
mov rsi, [rbp+var_20]
mov rdi, [rbp+var_18]; this
add rsi, 8
call __ZNSoD2Ev; std::ostream::~ostream()
add rsp, 20h
pop rbp
retn
|
void nglog::LogMessage::LogStream::~LogStream(nglog::LogMessage::LogStream *this, _QWORD *a2)
{
*(_QWORD *)this = *a2;
*(_QWORD *)((char *)this + *(_QWORD *)(*(_QWORD *)this - 24LL)) = a2[3];
nglog::base_logging::LogStreamBuf::~LogStreamBuf((nglog::LogMessage::LogStream *)((char *)this + 8));
std::ostream::~ostream(this);
}
|
~LogStream:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x20
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV RDI,qword ptr [RBP + -0x8]
MOV qword ptr [RBP + -0x18],RDI
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RBP + -0x20],RAX
MOV RCX,qword ptr [RAX]
MOV qword ptr [RDI],RCX
MOV RCX,qword ptr [RAX + 0x18]
MOV RAX,qword ptr [RDI]
MOV RAX,qword ptr [RAX + -0x18]
MOV qword ptr [RDI + RAX*0x1],RCX
ADD RDI,0x8
CALL 0x001223f0
MOV RSI,qword ptr [RBP + -0x20]
MOV RDI,qword ptr [RBP + -0x18]
ADD RSI,0x8
CALL 0x0010a7d0
ADD RSP,0x20
POP RBP
RET
|
/* nglog::LogMessage::LogStream::~LogStream() */
void __thiscall nglog::LogMessage::LogStream::~LogStream(LogStream *this)
{
int8 *in_RSI;
*(int8 *)this = *in_RSI;
*(int8 *)(this + *(long *)(*(long *)this + -0x18)) = in_RSI[3];
base_logging::LogStreamBuf::~LogStreamBuf((LogStreamBuf *)(this + 8));
std::ostream::~ostream((ostream *)this);
return;
}
|
|
64,258
|
nglog::LogMessage::LogStream::~LogStream()
|
ng-log[P]ng-log/src/ng-log/logging.h
|
class NGLOG_EXPORT LogStream : public std::ostream {
NGLOG_MSVC_POP_WARNING()
public:
// In some cases, like when compiling glog as a static library with GCC and
// linking against a Clang-built executable, this constructor will be
// removed by the linker. We use this attribute to prevent the linker from
// discarding it.
NGLOG_USED
LogStream(char* buf, int len, int64 ctr)
: std::ostream(nullptr), streambuf_(buf, len), ctr_(ctr), self_(this) {
rdbuf(&streambuf_);
}
LogStream(LogStream&& other) noexcept
: std::ostream(nullptr),
streambuf_(std::move(other.streambuf_)),
ctr_(std::exchange(other.ctr_, 0)),
self_(this) {
rdbuf(&streambuf_);
}
LogStream& operator=(LogStream&& other) noexcept {
streambuf_ = std::move(other.streambuf_);
ctr_ = std::exchange(other.ctr_, 0);
rdbuf(&streambuf_);
return *this;
}
int64 ctr() const { return ctr_; }
void set_ctr(int64 ctr) { ctr_ = ctr; }
LogStream* self() const { return self_; }
// Legacy std::streambuf methods.
size_t pcount() const { return streambuf_.pcount(); }
char* pbase() const { return streambuf_.pbase(); }
char* str() const { return pbase(); }
LogStream(const LogStream&) = delete;
LogStream& operator=(const LogStream&) = delete;
private:
base_logging::LogStreamBuf streambuf_;
int64 ctr_; // Counter hack (for the LOG_EVERY_X() macro)
LogStream* self_; // Consistency check hack
}
|
O1
|
c
|
nglog::LogMessage::LogStream::~LogStream():
pushq %rbx
leaq 0x23e56(%rip), %rax # 0x45878
leaq 0x18(%rax), %rcx
movq %rcx, (%rdi)
leaq 0x60(%rdi), %rbx
addq $0x40, %rax
movq %rax, 0x60(%rdi)
movq 0x244dc(%rip), %rax # 0x45f18
addq $0x10, %rax
movq %rax, 0x8(%rdi)
addq $0x40, %rdi
callq 0x8910
movq %rbx, %rdi
popq %rbx
jmp 0x81d0
|
_ZN5nglog10NullStreamD1Ev:
push rbx
lea rax, _ZTCN5nglog10NullStreamE0_NS_10LogMessage9LogStreamE; `construction vtable for'nglog::LogMessage::LogStream-in-nglog::NullStream
lea rcx, [rax+18h]
mov [rdi], rcx
lea rbx, [rdi+60h]
add rax, 40h ; '@'
mov [rdi+60h], rax
mov rax, cs:_ZTVSt15basic_streambufIcSt11char_traitsIcEE_ptr
add rax, 10h
mov [rdi+8], rax
add rdi, 40h ; '@'; this
call __ZNSt6localeD1Ev; std::locale::~locale()
mov rdi, rbx; this
pop rbx
jmp __ZNSt8ios_baseD2Ev; std::ios_base::~ios_base()
|
void nglog::NullStream::~NullStream(nglog::NullStream *this)
{
*(_QWORD *)this = (char *)&`construction vtable for'nglog::LogMessage::LogStream-in-nglog::NullStream + 24;
*((_QWORD *)this + 12) = (char *)&`construction vtable for'nglog::LogMessage::LogStream-in-nglog::NullStream + 64;
*((_QWORD *)this + 1) = (char *)&`vtable for'std::streambuf + 16;
std::locale::~locale((nglog::NullStream *)((char *)this + 64));
std::ios_base::~ios_base((nglog::NullStream *)((char *)this + 96));
}
|
~NullStream:
PUSH RBX
LEA RAX,[0x145878]
LEA RCX,[RAX + 0x18]
MOV qword ptr [RDI],RCX
LEA RBX,[RDI + 0x60]
ADD RAX,0x40
MOV qword ptr [RDI + 0x60],RAX
MOV RAX,qword ptr [0x00145f18]
ADD RAX,0x10
MOV qword ptr [RDI + 0x8],RAX
ADD RDI,0x40
CALL 0x00108910
MOV RDI,RBX
POP RBX
JMP 0x001081d0
|
/* nglog::NullStream::~NullStream() */
void __thiscall nglog::NullStream::~NullStream(NullStream *this)
{
*(int8 *)this = 0x145890;
*(int8 *)(this + 0x60) = 0x1458b8;
*(int **)(this + 8) = PTR_vtable_00145f18 + 0x10;
std::locale::~locale((locale *)(this + 0x40));
std::ios_base::~ios_base((ios_base *)(this + 0x60));
return;
}
|
|
64,259
|
nglog::LogMessage::LogStream::~LogStream()
|
ng-log[P]ng-log/src/ng-log/logging.h
|
class NGLOG_EXPORT LogStream : public std::ostream {
NGLOG_MSVC_POP_WARNING()
public:
// In some cases, like when compiling glog as a static library with GCC and
// linking against a Clang-built executable, this constructor will be
// removed by the linker. We use this attribute to prevent the linker from
// discarding it.
NGLOG_USED
LogStream(char* buf, int len, int64 ctr)
: std::ostream(nullptr), streambuf_(buf, len), ctr_(ctr), self_(this) {
rdbuf(&streambuf_);
}
LogStream(LogStream&& other) noexcept
: std::ostream(nullptr),
streambuf_(std::move(other.streambuf_)),
ctr_(std::exchange(other.ctr_, 0)),
self_(this) {
rdbuf(&streambuf_);
}
LogStream& operator=(LogStream&& other) noexcept {
streambuf_ = std::move(other.streambuf_);
ctr_ = std::exchange(other.ctr_, 0);
rdbuf(&streambuf_);
return *this;
}
int64 ctr() const { return ctr_; }
void set_ctr(int64 ctr) { ctr_ = ctr; }
LogStream* self() const { return self_; }
// Legacy std::streambuf methods.
size_t pcount() const { return streambuf_.pcount(); }
char* pbase() const { return streambuf_.pbase(); }
char* str() const { return pbase(); }
LogStream(const LogStream&) = delete;
LogStream& operator=(const LogStream&) = delete;
private:
base_logging::LogStreamBuf streambuf_;
int64 ctr_; // Counter hack (for the LOG_EVERY_X() macro)
LogStream* self_; // Consistency check hack
}
|
O2
|
c
|
nglog::LogMessage::LogStream::~LogStream():
movq (%rsi), %rax
movq %rax, (%rdi)
movq 0x18(%rsi), %rcx
movq -0x18(%rax), %rax
movq %rcx, (%rdi,%rax)
addq $0x8, %rdi
jmp 0x8d50
nopl (%rax)
|
_ZN5nglog10LogMessage9LogStreamD2Ev:
mov rax, [rsi]
mov [rdi], rax
mov rcx, [rsi+18h]
mov rax, [rax-18h]
mov [rdi+rax], rcx
add rdi, 8
jmp __ZNSt15basic_streambufIcSt11char_traitsIcEED2Ev; std::streambuf::~streambuf()
|
void nglog::LogMessage::LogStream::~LogStream(nglog::LogMessage::LogStream *this, long long *a2)
{
long long v2; // rax
v2 = *a2;
*(_QWORD *)this = *a2;
*(_QWORD *)((char *)this + *(_QWORD *)(v2 - 24)) = a2[3];
std::streambuf::~streambuf((char *)this + 8);
}
|
~LogStream:
MOV RAX,qword ptr [RSI]
MOV qword ptr [RDI],RAX
MOV RCX,qword ptr [RSI + 0x18]
MOV RAX,qword ptr [RAX + -0x18]
MOV qword ptr [RDI + RAX*0x1],RCX
ADD RDI,0x8
JMP 0x00108d50
|
/* nglog::LogMessage::LogStream::~LogStream() */
void __thiscall nglog::LogMessage::LogStream::~LogStream(LogStream *this)
{
long lVar1;
long *in_RSI;
lVar1 = *in_RSI;
*(long *)this = lVar1;
*(long *)(this + *(long *)(lVar1 + -0x18)) = in_RSI[3];
std::streambuf::~streambuf((streambuf *)(this + 8));
return;
}
|
|
64,260
|
google::protobuf::internal::ImplicitWeakMessage::_InternalSerialize(unsigned char*, google::protobuf::io::EpsCopyOutputStream*) const
|
aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/implicit_weak_message.h
|
uint8_t* _InternalSerialize(uint8_t* target,
io::EpsCopyOutputStream* stream) const final {
if (data_ == nullptr) {
return target;
}
return stream->WriteRaw(data_->data(), static_cast<int>(data_->size()),
target);
}
|
O3
|
c
|
google::protobuf::internal::ImplicitWeakMessage::_InternalSerialize(unsigned char*, google::protobuf::io::EpsCopyOutputStream*) const:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq 0x10(%rdi), %rax
testq %rax, %rax
je 0xab2b1
movq (%rax), %rsi
movq 0x8(%rax), %rax
movq (%rdx), %rcx
subq %rbx, %rcx
movslq %eax, %r14
cmpq %r14, %rcx
jl 0xab2bc
movq %rbx, %rdi
movq %r14, %rdx
callq 0xf2f0
addq %r14, %rbx
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
movq %rdx, %rdi
movl %eax, %edx
movq %rbx, %rcx
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x15e1c
|
_ZNK6google8protobuf8internal19ImplicitWeakMessage18_InternalSerializeEPhPNS0_2io19EpsCopyOutputStreamE:
push r14
push rbx
push rax
mov rbx, rsi
mov rax, [rdi+10h]
test rax, rax
jz short loc_AB2B1
mov rsi, [rax]; void *
mov rax, [rax+8]
mov rcx, [rdx]
sub rcx, rbx
movsxd r14, eax
cmp rcx, r14
jl short loc_AB2BC
mov rdi, rbx
mov rdx, r14
call _memcpy
add rbx, r14
loc_AB2B1:
mov rax, rbx
add rsp, 8
pop rbx
pop r14
retn
loc_AB2BC:
mov rdi, rdx; this
mov edx, eax; int
mov rcx, rbx; unsigned __int8 *
add rsp, 8
pop rbx
pop r14
jmp _ZN6google8protobuf2io19EpsCopyOutputStream16WriteRawFallbackEPKviPh; google::protobuf::io::EpsCopyOutputStream::WriteRawFallback(void const*,int,uchar *)
|
unsigned __int8 * google::protobuf::internal::ImplicitWeakMessage::_InternalSerialize(
google::protobuf::internal::ImplicitWeakMessage *this,
unsigned __int8 *a2,
google::protobuf::io::EpsCopyOutputStream *a3)
{
long long v4; // rax
char *v5; // rsi
long long v6; // rax
long long v7; // r14
v4 = *((_QWORD *)this + 2);
if ( !v4 )
return a2;
v5 = *(char **)v4;
v6 = *(_QWORD *)(v4 + 8);
v7 = (int)v6;
if ( *(_QWORD *)a3 - (_QWORD)a2 >= (int)v6 )
{
memcpy(a2);
a2 += v7;
return a2;
}
return google::protobuf::io::EpsCopyOutputStream::WriteRawFallback(a3, v5, v6, a2);
}
|
_InternalSerialize:
PUSH R14
PUSH RBX
PUSH RAX
MOV RBX,RSI
MOV RAX,qword ptr [RDI + 0x10]
TEST RAX,RAX
JZ 0x001ab2b1
MOV RSI,qword ptr [RAX]
MOV RAX,qword ptr [RAX + 0x8]
MOV RCX,qword ptr [RDX]
SUB RCX,RBX
MOVSXD R14,EAX
CMP RCX,R14
JL 0x001ab2bc
MOV RDI,RBX
MOV RDX,R14
CALL 0x0010f2f0
ADD RBX,R14
LAB_001ab2b1:
MOV RAX,RBX
ADD RSP,0x8
POP RBX
POP R14
RET
LAB_001ab2bc:
MOV RDI,RDX
MOV EDX,EAX
MOV RCX,RBX
ADD RSP,0x8
POP RBX
POP R14
JMP 0x00115e1c
|
/* google::protobuf::internal::ImplicitWeakMessage::_InternalSerialize(unsigned char*,
google::protobuf::io::EpsCopyOutputStream*) const */
uchar * __thiscall
google::protobuf::internal::ImplicitWeakMessage::_InternalSerialize
(ImplicitWeakMessage *this,uchar *param_1,EpsCopyOutputStream *param_2)
{
int8 *puVar1;
uchar *puVar2;
size_t __n;
puVar1 = *(int8 **)(this + 0x10);
if (puVar1 != (int8 *)0x0) {
__n = (size_t)(int)puVar1[1];
if (*(long *)param_2 - (long)param_1 < (long)__n) {
puVar2 = (uchar *)io::EpsCopyOutputStream::WriteRawFallback
(param_2,(void *)*puVar1,(int)puVar1[1],param_1);
return puVar2;
}
memcpy(param_1,(void *)*puVar1,__n);
param_1 = param_1 + __n;
}
return param_1;
}
|
|
64,261
|
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>::insert(nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const>, 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
|
iterator insert(const_iterator pos, const basic_json& val)
{
// insert only works for arrays
if (JSON_HEDLEY_LIKELY(is_array()))
{
// check if iterator pos fits to this JSON value
if (JSON_HEDLEY_UNLIKELY(pos.m_object != this))
{
JSON_THROW(invalid_iterator::create(202, "iterator does not fit current value", this));
}
// insert to array and return iterator
return insert_iterator(pos, val);
}
JSON_THROW(type_error::create(309, detail::concat("cannot use insert() with ", type_name()), 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>::insert(nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const>, 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&):
subq $0xe8, %rsp
movq %rdx, 0x20(%rsp)
movq %rdi, 0x28(%rsp)
movq %rdi, %rax
movq %rax, 0x30(%rsp)
movq %rdi, 0xe0(%rsp)
movq %rsi, 0xd8(%rsp)
movq %rdx, 0xd0(%rsp)
movq %rcx, 0xc8(%rsp)
movq 0xd8(%rsp), %rdi
movq %rdi, 0x38(%rsp)
callq 0xa2c40
xorb $-0x1, %al
xorb $-0x1, %al
testb $0x1, %al
jne 0x125d08
jmp 0x125e43
movq 0x20(%rsp), %rax
movq 0x38(%rsp), %rcx
cmpq %rcx, (%rax)
setne %al
xorb $-0x1, %al
xorb $-0x1, %al
testb $0x1, %al
jne 0x125d25
jmp 0x125e0b
movb $0x1, 0x93(%rsp)
movl $0x20, %edi
callq 0x50540
movq %rax, 0x10(%rsp)
leaq 0xa7(%rsp), %rdi
movq %rdi, 0x18(%rsp)
callq 0x50d60
movq 0x18(%rsp), %rdx
leaq 0xa9564(%rip), %rsi # 0x1cf2be
leaq 0xa8(%rsp), %rdi
callq 0x61bd0
jmp 0x125d69
movq 0x38(%rsp), %rcx
movq 0x10(%rsp), %rdi
movl $0xca, %esi
leaq 0xa8(%rsp), %rdx
callq 0xbb830
jmp 0x125d87
movq 0x10(%rsp), %rdi
movb $0x0, 0x93(%rsp)
leaq 0x12c485(%rip), %rsi # 0x252220
leaq -0x6a3c2(%rip), %rdx # 0xbb9e0
callq 0x508f0
jmp 0x125f0e
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x98(%rsp)
movl %eax, 0x94(%rsp)
jmp 0x125de3
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x98(%rsp)
movl %eax, 0x94(%rsp)
leaq 0xa8(%rsp), %rdi
callq 0x510c0
leaq 0xa7(%rsp), %rdi
callq 0x510a0
testb $0x1, 0x93(%rsp)
jne 0x125dfc
jmp 0x125e06
movq 0x10(%rsp), %rdi
callq 0x50c40
jmp 0x125f01
movq 0x20(%rsp), %rsi
leaq 0x70(%rsp), %rdi
callq 0x125f10
movq 0x28(%rsp), %rdi
movq 0x38(%rsp), %rsi
movq 0xc8(%rsp), %rcx
leaq 0x70(%rsp), %rdx
callq 0x125f50
movq 0x30(%rsp), %rax
addq $0xe8, %rsp
retq
movb $0x1, 0x47(%rsp)
movl $0x20, %edi
callq 0x50540
movq 0x38(%rsp), %rdi
movq %rax, 0x8(%rsp)
callq 0xa04c0
movq %rax, 0x48(%rsp)
leaq 0xaf2d1(%rip), %rsi # 0x1d513e
leaq 0x50(%rsp), %rdi
leaq 0x48(%rsp), %rdx
callq 0x126090
jmp 0x125e7e
movq 0x38(%rsp), %rcx
movq 0x8(%rsp), %rdi
movl $0x135, %esi # imm = 0x135
leaq 0x50(%rsp), %rdx
callq 0xbbd90
jmp 0x125e99
movq 0x8(%rsp), %rdi
movb $0x0, 0x47(%rsp)
leaq 0x12c24e(%rip), %rsi # 0x2520f8
leaq -0x85941(%rip), %rdx # 0xa0570
callq 0x508f0
jmp 0x125f0e
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x98(%rsp)
movl %eax, 0x94(%rsp)
jmp 0x125eec
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x98(%rsp)
movl %eax, 0x94(%rsp)
leaq 0x50(%rsp), %rdi
callq 0x510c0
testb $0x1, 0x47(%rsp)
jne 0x125ef5
jmp 0x125eff
movq 0x8(%rsp), %rdi
callq 0x50c40
jmp 0x125f01
movq 0x98(%rsp), %rdi
callq 0x50940
nop
|
_ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE6insertENS0_6detail9iter_implIKSD_EERSG_:
sub rsp, 0E8h
mov qword ptr [rsp+0E8h+var_C8], rdx; int
mov qword ptr [rsp+0E8h+var_C0], rdi; int
mov rax, rdi
mov qword ptr [rsp+0E8h+var_B8], rax; int
mov [rsp+0E8h+var_8], rdi
mov qword ptr [rsp+0E8h+var_10], rsi
mov [rsp+0E8h+var_18], rdx
mov [rsp+0E8h+var_20], rcx
mov rdi, qword ptr [rsp+0E8h+var_10]
mov qword ptr [rsp+0E8h+var_B0], rdi; int
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE8is_arrayEv; 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>::is_array(void)
xor al, 0FFh
xor al, 0FFh
test al, 1
jnz short loc_125D08
jmp loc_125E43
loc_125D08:
mov rax, qword ptr [rsp+0E8h+var_C8]
mov rcx, qword ptr [rsp+0E8h+var_B0]
cmp [rax], rcx
setnz al
xor al, 0FFh
xor al, 0FFh
test al, 1
jnz short loc_125D25
jmp loc_125E0B
loc_125D25:
mov [rsp+0E8h+var_55], 1
mov edi, 20h ; ' '; thrown_size
call ___cxa_allocate_exception
mov [rsp+0E8h+var_D8], rax; int
lea rdi, [rsp+0E8h+var_41]
mov qword ptr [rsp+0E8h+var_D0], rdi; char
call __ZNSaIcEC1Ev; std::allocator<char>::allocator(void)
mov rdx, qword ptr [rsp+0E8h+var_D0]
lea rsi, aIteratorDoesNo; "iterator does not fit current value"
lea rdi, [rsp+0E8h+var_40]
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&)
jmp short $+2
loc_125D69:
mov rcx, qword ptr [rsp+0E8h+var_B0]
mov rdi, [rsp+0E8h+var_D8]; int
mov esi, 0CAh
lea rdx, [rsp+0E8h+var_40]
call _ZN8nlohmann16json_abi_v3_11_36detail16invalid_iterator6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_
jmp short $+2
loc_125D87:
mov rdi, [rsp+0E8h+var_D8]; void *
mov [rsp+0E8h+var_55], 0
lea rsi, _ZTIN8nlohmann16json_abi_v3_11_36detail16invalid_iteratorE; lptinfo
lea rdx, _ZN8nlohmann16json_abi_v3_11_36detail16invalid_iteratorD2Ev; void (*)(void *)
call ___cxa_throw
jmp loc_125F0E
mov rcx, rax
mov eax, edx
mov [rsp+arg_90], rcx
mov [rsp+arg_8C], eax
jmp short loc_125DE3
mov rcx, rax
mov eax, edx
mov [rsp+arg_90], rcx
mov [rsp+arg_8C], eax
lea rdi, [rsp+arg_A0]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
loc_125DE3:
lea rdi, [rsp+arg_9F]
call __ZNSaIcED1Ev; std::allocator<char>::~allocator()
test [rsp+arg_8B], 1
jnz short loc_125DFC
jmp short loc_125E06
loc_125DFC:
mov rdi, [rsp+arg_8]; void *
call ___cxa_free_exception
loc_125E06:
jmp loc_125F01
loc_125E0B:
mov rsi, qword ptr [rsp+0E8h+var_C8]
lea rdi, [rsp+0E8h+var_78]
call _ZN8nlohmann16json_abi_v3_11_36detail9iter_implIKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEEC2ERKSH_; 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>::iter_impl(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> const&)
mov rdi, qword ptr [rsp+0E8h+var_C0]
mov rsi, qword ptr [rsp+0E8h+var_B0]
mov rcx, [rsp+0E8h+var_20]
lea rdx, [rsp+0E8h+var_78]
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE15insert_iteratorIJRKSD_EEENS0_6detail9iter_implISD_EENSI_ISF_EEDpOT_; 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>::insert_iterator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const&>(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>,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 rax, qword ptr [rsp+0E8h+var_B8]
add rsp, 0E8h
retn
loc_125E43:
mov [rsp+0E8h+var_A1], 1
mov edi, 20h ; ' '; thrown_size
call ___cxa_allocate_exception
mov rdi, qword ptr [rsp+0E8h+var_B0]
mov [rsp+0E8h+var_E0], rax; int
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE9type_nameEv; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::type_name(void)
mov qword ptr [rsp+0E8h+var_A0], rax; int
lea rsi, aCannotUseInser; "cannot use insert() with "
lea rdi, [rsp+0E8h+var_98]; int
lea rdx, [rsp+0E8h+var_A0]; int
call _ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJRA26_KcPS9_EEET_DpOT0_; nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[26],char const*>(char const(&)[26],char const* &&)
jmp short $+2
loc_125E7E:
mov rcx, qword ptr [rsp+0E8h+var_B0]
mov rdi, [rsp+0E8h+var_E0]; int
mov esi, 135h
lea rdx, [rsp+0E8h+var_98]
call _ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_
jmp short $+2
loc_125E99:
mov rdi, [rsp+0E8h+var_E0]; void *
mov [rsp+0E8h+var_A1], 0
lea rsi, _ZTIN8nlohmann16json_abi_v3_11_36detail10type_errorE; lptinfo
lea rdx, _ZN8nlohmann16json_abi_v3_11_36detail10type_errorD2Ev; void (*)(void *)
call ___cxa_throw
|
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>::insert(
long long a1,
_BYTE *a2,
_QWORD *a3,
long long a4)
{
int v5; // ecx
int v6; // r8d
int v7; // r9d
int v8; // [rsp+0h] [rbp-E8h]
void *exception; // [rsp+8h] [rbp-E0h]
nlohmann::json_abi_v3_11_3::detail::type_error *v10; // [rsp+8h] [rbp-E0h]
int v11; // [rsp+10h] [rbp-D8h]
nlohmann::json_abi_v3_11_3::detail::invalid_iterator *v12; // [rsp+10h] [rbp-D8h]
long long v13; // [rsp+18h] [rbp-D0h]
int v15[2]; // [rsp+48h] [rbp-A0h] BYREF
int v16[8]; // [rsp+50h] [rbp-98h] BYREF
char v17[55]; // [rsp+70h] [rbp-78h] BYREF
char v18; // [rsp+A7h] [rbp-41h] BYREF
_BYTE v19[32]; // [rsp+A8h] [rbp-40h] BYREF
long long v20; // [rsp+C8h] [rbp-20h]
_QWORD *v21; // [rsp+D0h] [rbp-18h]
int v22[2]; // [rsp+D8h] [rbp-10h]
long long v23; // [rsp+E0h] [rbp-8h]
v23 = a1;
*(_QWORD *)v22 = a2;
v21 = a3;
v20 = a4;
if ( !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>::is_array(a2) )
{
exception = __cxa_allocate_exception(0x20uLL);
*(_QWORD *)v15 = 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(a2);
nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[26],char const*>(
(int)v16,
(int)"cannot use insert() with ",
(int)v15,
v5,
v6,
v7,
v8,
exception,
v11,
v13);
ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_(
v10,
309,
(long long)v16,
(long long)a2);
__cxa_throw(
v10,
(struct type_info *)&`typeinfo for'nlohmann::json_abi_v3_11_3::detail::type_error,
(void (*)(void *))nlohmann::json_abi_v3_11_3::detail::type_error::~type_error);
}
if ( (_BYTE *)*a3 != a2 )
{
v12 = (nlohmann::json_abi_v3_11_3::detail::invalid_iterator *)__cxa_allocate_exception(0x20uLL);
std::allocator<char>::allocator();
std::string::basic_string<std::allocator<char>>(
(long long)v19,
(long long)"iterator does not fit current value",
(long long)&v18);
ZN8nlohmann16json_abi_v3_11_36detail16invalid_iterator6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_(
v12,
202,
(long long)v19,
(long long)a2);
v17[35] = 0;
__cxa_throw(
v12,
(struct type_info *)&`typeinfo for'nlohmann::json_abi_v3_11_3::detail::invalid_iterator,
(void (*)(void *))nlohmann::json_abi_v3_11_3::detail::invalid_iterator::~invalid_iterator);
}
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>::iter_impl(v17);
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>::insert_iterator<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,
a2,
v17,
v20);
return a1;
}
| |||
64,262
|
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>::insert(nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const>, 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
|
iterator insert(const_iterator pos, const basic_json& val)
{
// insert only works for arrays
if (JSON_HEDLEY_LIKELY(is_array()))
{
// check if iterator pos fits to this JSON value
if (JSON_HEDLEY_UNLIKELY(pos.m_object != this))
{
JSON_THROW(invalid_iterator::create(202, "iterator does not fit current value", this));
}
// insert to array and return iterator
return insert_iterator(pos, val);
}
JSON_THROW(type_error::create(309, detail::concat("cannot use insert() with ", type_name()), this));
}
|
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>::insert(nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const>, 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 %rbx
subq $0x48, %rsp
movq %rsi, %r14
cmpb $0x2, (%rsi)
jne 0x6f4be
movq (%rdx), %rsi
cmpq %r14, %rsi
jne 0x6f51a
movq %rdi, %rbx
leaq 0x28(%rsp), %rax
movq %rsi, (%rax)
movups 0x8(%rdx), %xmm0
movups %xmm0, 0x8(%rax)
movq 0x18(%rdx), %rdx
movq %rdx, 0x18(%rax)
movq %r14, %rsi
movq %rax, %rdx
callq 0x6f5bc
movq %rbx, %rax
addq $0x48, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movl $0x20, %edi
callq 0x18360
movq %rax, %rbx
movq %r14, %rdi
callq 0x3e096
leaq 0x20(%rsp), %rdx
movq %rax, (%rdx)
leaq 0x4d2a7(%rip), %rsi # 0xbc789
movq %rsp, %rdi
callq 0x6f62e
movb $0x1, %bpl
movq %rsp, %rdx
movq %rbx, %rdi
movl $0x135, %esi # imm = 0x135
movq %r14, %rcx
callq 0x49cf4
xorl %ebp, %ebp
leaq 0x7edaf(%rip), %rsi # 0xee2b8
leaq -0x23160(%rip), %rdx # 0x4c3b0
movq %rbx, %rdi
callq 0x18b30
jmp 0x6f574
movl $0x20, %edi
callq 0x18360
movq %rax, %rbx
leaq 0x10(%rsp), %r15
movq %r15, -0x10(%r15)
leaq 0x4a07d(%rip), %rsi # 0xb95b4
leaq 0x4a099(%rip), %rdx # 0xb95d7
movq %rsp, %rdi
callq 0x590a2
movb $0x1, %bpl
movq %rsp, %rdx
movq %rbx, %rdi
movl $0xca, %esi
movq %r14, %rcx
callq 0x49aa2
xorl %ebp, %ebp
leaq 0x7ee7b(%rip), %rsi # 0xee3e0
leaq -0x231bc(%rip), %rdx # 0x4c3b0
movq %rbx, %rdi
callq 0x18b30
movq %rax, %r14
movq (%rsp), %rdi
cmpq %r15, %rdi
jne 0x6f595
jmp 0x6f5a2
jmp 0x6f5a9
movq %rax, %r14
leaq 0x10(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x6f5a2
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x186a0
testb %bpl, %bpl
jne 0x6f5ac
jmp 0x6f5b4
movq %rax, %r14
movq %rbx, %rdi
callq 0x18500
movq %r14, %rdi
callq 0x18b90
|
_ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE6insertENS0_6detail9iter_implIKSD_EERSG_:
push rbp; char
push r15; int
push r14; int
push rbx; int
sub rsp, 48h
mov r14, rsi
cmp byte ptr [rsi], 2
jnz short loc_6F4BE
mov rsi, [rdx]
cmp rsi, r14
jnz loc_6F51A
mov rbx, rdi
lea rax, [rsp+68h+var_40]
mov [rax], rsi
movups xmm0, xmmword ptr [rdx+8]
movups xmmword ptr [rax+8], xmm0
mov rdx, [rdx+18h]
mov [rax+18h], rdx
mov rsi, r14
mov rdx, rax
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE15insert_iteratorIJRKSD_EEENS0_6detail9iter_implISD_EENSI_ISF_EEDpOT_; 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>::insert_iterator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const&>(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>,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 rax, rbx
add rsp, 48h
pop rbx
pop r14
pop r15
pop rbp
retn
loc_6F4BE:
mov edi, 20h ; ' '; thrown_size
call ___cxa_allocate_exception
mov rbx, rax
mov rdi, r14
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE9type_nameEv; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::type_name(void)
lea rdx, [rsp+68h+var_48]
mov [rdx], rax
lea rsi, aCannotUseInser; "cannot use insert() with "
mov rdi, rsp
call _ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJRA26_KcPS9_EEET_DpOT0_; nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[26],char const*>(char const(&)[26],char const* &&)
mov bpl, 1
mov rdx, rsp
mov rdi, rbx; this
mov esi, 135h; int
mov rcx, r14
call _ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_
xor ebp, ebp
lea rsi, _ZTIN8nlohmann16json_abi_v3_11_36detail10type_errorE; lptinfo
lea rdx, _ZN8nlohmann16json_abi_v3_11_36detail9exceptionD2Ev; void (*)(void *)
mov rdi, rbx; void *
call ___cxa_throw
jmp short loc_6F574
loc_6F51A:
mov edi, 20h ; ' '; thrown_size
call ___cxa_allocate_exception
mov rbx, rax
lea r15, [rsp+68h+var_58]
mov [r15-10h], r15
lea rsi, aIteratorDoesNo; "iterator does not fit current value"
lea rdx, aIteratorDoesNo+23h; ""
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, rbx; this
mov esi, 0CAh; int
mov rcx, r14
call _ZN8nlohmann16json_abi_v3_11_36detail16invalid_iterator6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_
xor ebp, ebp
lea rsi, _ZTIN8nlohmann16json_abi_v3_11_36detail16invalid_iteratorE; lptinfo
lea rdx, _ZN8nlohmann16json_abi_v3_11_36detail9exceptionD2Ev; void (*)(void *)
mov rdi, rbx; void *
call ___cxa_throw
loc_6F574:
mov r14, rax
mov rdi, [rsp+68h+var_68]
cmp rdi, r15
jnz short loc_6F595
jmp short loc_6F5A2
jmp short loc_6F5A9
mov r14, rax
lea rax, [rsp+68h+var_58]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_6F5A2
loc_6F595:
mov rsi, [rsp+68h+var_58]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_6F5A2:
test bpl, bpl
jnz short loc_6F5AC
jmp short loc_6F5B4
loc_6F5A9:
mov r14, rax
loc_6F5AC:
mov rdi, rbx; void *
call ___cxa_free_exception
loc_6F5B4:
mov rdi, r14
call __Unwind_Resume
|
long long nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::insert(
long long a1,
unsigned __int8 *a2,
long long a3)
{
nlohmann::json_abi_v3_11_3::detail::exception *exception; // rbx
nlohmann::json_abi_v3_11_3::detail::exception *v5; // rbx
_QWORD v6[2]; // [rsp+0h] [rbp-68h] BYREF
_QWORD v7[3]; // [rsp+10h] [rbp-58h] BYREF
unsigned __int8 *v8; // [rsp+28h] [rbp-40h] BYREF
__int128 v9; // [rsp+30h] [rbp-38h]
long long v10; // [rsp+40h] [rbp-28h]
if ( *a2 != 2 )
{
exception = (nlohmann::json_abi_v3_11_3::detail::exception *)__cxa_allocate_exception(0x20uLL);
v7[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>::type_name(a2);
nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[26],char const*>(
v6,
"cannot use insert() with ");
ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_(
exception,
309,
v6);
__cxa_throw(
exception,
(struct type_info *)&`typeinfo for'nlohmann::json_abi_v3_11_3::detail::type_error,
(void (*)(void *))nlohmann::json_abi_v3_11_3::detail::exception::~exception);
}
if ( *(unsigned __int8 **)a3 != a2 )
{
v5 = (nlohmann::json_abi_v3_11_3::detail::exception *)__cxa_allocate_exception(0x20uLL);
v6[0] = v7;
std::string::_M_construct<char const*>((long long)v6, "iterator does not fit current value", (long long)"");
ZN8nlohmann16json_abi_v3_11_36detail16invalid_iterator6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_(
v5,
202,
v6);
__cxa_throw(
v5,
(struct type_info *)&`typeinfo for'nlohmann::json_abi_v3_11_3::detail::invalid_iterator,
(void (*)(void *))nlohmann::json_abi_v3_11_3::detail::exception::~exception);
}
v8 = *(unsigned __int8 **)a3;
v9 = *(_OWORD *)(a3 + 8);
v10 = *(_QWORD *)(a3 + 24);
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>::insert_iterator<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,
a2,
&v8);
return a1;
}
|
insert:
PUSH RBP
PUSH R15
PUSH R14
PUSH RBX
SUB RSP,0x48
MOV R14,RSI
CMP byte ptr [RSI],0x2
JNZ 0x0016f4be
MOV RSI,qword ptr [RDX]
CMP RSI,R14
JNZ 0x0016f51a
MOV RBX,RDI
LEA RAX,[RSP + 0x28]
MOV qword ptr [RAX],RSI
MOVUPS XMM0,xmmword ptr [RDX + 0x8]
MOVUPS xmmword ptr [RAX + 0x8],XMM0
MOV RDX,qword ptr [RDX + 0x18]
MOV qword ptr [RAX + 0x18],RDX
MOV RSI,R14
MOV RDX,RAX
CALL 0x0016f5bc
MOV RAX,RBX
ADD RSP,0x48
POP RBX
POP R14
POP R15
POP RBP
RET
LAB_0016f4be:
MOV EDI,0x20
CALL 0x00118360
MOV RBX,RAX
MOV RDI,R14
CALL 0x0013e096
LEA RDX,[RSP + 0x20]
MOV qword ptr [RDX],RAX
LAB_0016f4db:
LEA RSI,[0x1bc789]
MOV RDI,RSP
CALL 0x0016f62e
MOV BPL,0x1
LAB_0016f4ed:
MOV RDX,RSP
MOV RDI,RBX
MOV ESI,0x135
MOV RCX,R14
CALL 0x00149cf4
XOR EBP,EBP
LEA RSI,[0x1ee2b8]
LEA RDX,[0x14c3b0]
MOV RDI,RBX
CALL 0x00118b30
LAB_0016f51a:
MOV EDI,0x20
CALL 0x00118360
MOV RBX,RAX
LEA R15,[RSP + 0x10]
MOV qword ptr [R15 + -0x10],R15
LAB_0016f530:
LEA RSI,[0x1b95b4]
LEA RDX,[0x1b95d7]
MOV RDI,RSP
CALL 0x001590a2
MOV BPL,0x1
LAB_0016f549:
MOV RDX,RSP
MOV RDI,RBX
MOV ESI,0xca
MOV RCX,R14
CALL 0x00149aa2
XOR EBP,EBP
LEA RSI,[0x1ee3e0]
LEA RDX,[0x14c3b0]
MOV RDI,RBX
CALL 0x00118b30
|
/* nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector,
std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >,
void>::insert(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>,
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector,
std::__cxx11::string, 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&) */
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,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>
::insert(basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
*this,basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
*param_2,long *param_3)
{
int8 uVar1;
int1 *local_68 [2];
int1 local_58 [16];
char *local_48;
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
*local_40;
int4 local_38;
int4 uStack_34;
int4 uStack_30;
int4 uStack_2c;
long local_28;
if (*param_2 !=
(basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
)0x2) {
uVar1 = __cxa_allocate_exception(0x20);
local_48 = (char *)type_name(param_2);
/* try { // try from 0016f4db to 0016f4e9 has its CatchHandler @ 0016f5a9 */
detail::concat<std::__cxx11::string,char_const(&)[26],char_const*>
((detail *)local_68,"cannot use insert() with ",&local_48);
/* try { // try from 0016f4ed to 0016f517 has its CatchHandler @ 0016f584 */
_ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_
(uVar1,0x135,local_68,param_2);
/* WARNING: Subroutine does not return */
__cxa_throw(uVar1,&detail::type_error::typeinfo,detail::exception::~exception);
}
local_40 = (basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,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_3;
if (local_40 == param_2) {
local_38 = (int4)param_3[1];
uStack_34 = *(int4 *)((long)param_3 + 0xc);
uStack_30 = (int4)param_3[2];
uStack_2c = *(int4 *)((long)param_3 + 0x14);
local_28 = param_3[3];
insert_iterator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const&>
(this,param_2,&local_40);
return this;
}
uVar1 = __cxa_allocate_exception(0x20);
local_68[0] = local_58;
/* try { // try from 0016f530 to 0016f545 has its CatchHandler @ 0016f582 */
std::__cxx11::string::_M_construct<char_const*>(local_68,"iterator does not fit current value","")
;
/* try { // try from 0016f549 to 0016f573 has its CatchHandler @ 0016f574 */
_ZN8nlohmann16json_abi_v3_11_36detail16invalid_iterator6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_
(uVar1,0xca,local_68,param_2);
/* WARNING: Subroutine does not return */
__cxa_throw(uVar1,&detail::invalid_iterator::typeinfo,detail::exception::~exception);
}
|
|
64,263
|
SDL_LoadBMPImplementation(SDL::Result&, char const*)
|
SDL3Lite/source/SDL3/SDL_Bmp.cpp
|
SDL_Surface* SDL_LoadBMPImplementation(SDL::Result& result, const char* file)
{
SDL_Surface* surface = NULL;
SDL::BmpLoader bmpLoader(result);
if (bmpLoader.Reset(file))
{
surface = new SDL::Surface(bmpLoader.GetSize(), SDL_PIXELFORMAT_RGB24);
int width = surface->w;
int heigth = surface->h;
int bpp = surface->pitch;
size_t bytes = width * heigth * bpp;
uint8_t* dst = (uint8_t*)surface->pixels;
uint8_t* src = bmpLoader.GetPixels();
for (size_t i = 0; i < bytes; i += bpp)
{
dst[i + 0] = src[i + 0];
dst[i + 1] = src[i + 1];
dst[i + 2] = src[i + 2];
}
}
return surface;
}
|
O0
|
cpp
|
SDL_LoadBMPImplementation(SDL::Result&, char const*):
pushq %rbp
movq %rsp, %rbp
subq $0xd0, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq $0x0, -0x18(%rbp)
movq -0x8(%rbp), %rsi
leaq -0x38(%rbp), %rdi
callq 0x28cc0
movq -0x10(%rbp), %rax
movq %rax, -0xa8(%rbp)
leaq -0x59(%rbp), %rdi
movq %rdi, -0xa0(%rbp)
callq 0x1a460
movq -0xa8(%rbp), %rsi
movq -0xa0(%rbp), %rdx
leaq -0x58(%rbp), %rdi
callq 0x1caf0
jmp 0x2522c
leaq -0x38(%rbp), %rdi
leaq -0x58(%rbp), %rsi
callq 0x28d60
movb %al, -0xa9(%rbp)
jmp 0x25241
leaq -0x58(%rbp), %rdi
callq 0x1a150
leaq -0x59(%rbp), %rdi
callq 0x1a2c0
movb -0xa9(%rbp), %al
testb $0x1, %al
jne 0x25262
jmp 0x25408
movl $0x50, %edi
callq 0x1a280
movq %rax, -0xb8(%rbp)
jmp 0x25275
leaq -0x38(%rbp), %rdi
callq 0x28eb0
movq %rax, -0xc0(%rbp)
jmp 0x25287
movq -0xc0(%rbp), %rsi
movq -0xb8(%rbp), %rdi
movl $0x17101803, %edx # imm = 0x17101803
callq 0x2cc30
jmp 0x252a1
movq -0xb8(%rbp), %rax
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
movl 0x8(%rax), %eax
movl %eax, -0x70(%rbp)
movq -0x18(%rbp), %rax
movl 0xc(%rax), %eax
movl %eax, -0x74(%rbp)
movq -0x18(%rbp), %rax
movl 0x10(%rax), %eax
movl %eax, -0x78(%rbp)
movl -0x70(%rbp), %eax
movl -0x74(%rbp), %ecx
imull %ecx, %eax
movl -0x78(%rbp), %ecx
imull %ecx, %eax
cltq
movq %rax, -0x80(%rbp)
movq -0x18(%rbp), %rax
movq 0x18(%rax), %rax
movq %rax, -0x88(%rbp)
leaq -0x38(%rbp), %rdi
callq 0x28ef0
movq %rax, -0xc8(%rbp)
jmp 0x25300
movq -0xc8(%rbp), %rax
movq %rax, -0x90(%rbp)
movq $0x0, -0x98(%rbp)
movq -0x98(%rbp), %rax
cmpq -0x80(%rbp), %rax
jae 0x25406
movq -0x90(%rbp), %rax
movq -0x98(%rbp), %rcx
movb (%rax,%rcx), %dl
movq -0x88(%rbp), %rax
movq -0x98(%rbp), %rcx
movb %dl, (%rax,%rcx)
movq -0x90(%rbp), %rax
movq -0x98(%rbp), %rcx
movb 0x1(%rax,%rcx), %dl
movq -0x88(%rbp), %rax
movq -0x98(%rbp), %rcx
movb %dl, 0x1(%rax,%rcx)
movq -0x90(%rbp), %rax
movq -0x98(%rbp), %rcx
movb 0x2(%rax,%rcx), %dl
movq -0x88(%rbp), %rax
movq -0x98(%rbp), %rcx
movb %dl, 0x2(%rax,%rcx)
movslq -0x78(%rbp), %rax
addq -0x98(%rbp), %rax
movq %rax, -0x98(%rbp)
jmp 0x25319
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x68(%rbp)
movl %eax, -0x6c(%rbp)
jmp 0x253ce
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x68(%rbp)
movl %eax, -0x6c(%rbp)
leaq -0x58(%rbp), %rdi
callq 0x1a150
leaq -0x59(%rbp), %rdi
callq 0x1a2c0
jmp 0x2542c
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x68(%rbp)
movl %eax, -0x6c(%rbp)
jmp 0x2542c
movq -0xb8(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x68(%rbp)
movl %eax, -0x6c(%rbp)
movl $0x50, %esi
callq 0x1a290
jmp 0x2542c
jmp 0x25408
movq -0x18(%rbp), %rax
movq %rax, -0xd0(%rbp)
leaq -0x38(%rbp), %rdi
callq 0x28d00
movq -0xd0(%rbp), %rax
addq $0xd0, %rsp
popq %rbp
retq
leaq -0x38(%rbp), %rdi
callq 0x28d00
movq -0x68(%rbp), %rdi
callq 0x1a450
nop
|
_Z25SDL_LoadBMPImplementationRN3SDL6ResultEPKc:
push rbp
mov rbp, rsp
sub rsp, 0D0h
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov [rbp+var_18], 0
mov rsi, [rbp+var_8]; SDL::Result *
lea rdi, [rbp+var_38]; this
call _ZN3SDL9BmpLoaderC2ERNS_6ResultE; SDL::BmpLoader::BmpLoader(SDL::Result &)
mov rax, [rbp+var_10]
mov [rbp+var_A8], rax
lea rdi, [rbp+var_59]
mov [rbp+var_A0], rdi
call __ZNSaIcEC1Ev; std::allocator<char>::allocator(void)
mov rsi, [rbp+var_A8]
mov rdx, [rbp+var_A0]
lea rdi, [rbp+var_58]
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&)
jmp short $+2
loc_2522C:
lea rdi, [rbp+var_38]
lea rsi, [rbp+var_58]
call _ZN3SDL9BmpLoader5ResetERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; SDL::BmpLoader::Reset(std::string const&)
mov [rbp+var_A9], al
jmp short $+2
loc_25241:
lea rdi, [rbp+var_58]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
lea rdi, [rbp+var_59]
call __ZNSaIcED1Ev; std::allocator<char>::~allocator()
mov al, [rbp+var_A9]
test al, 1
jnz short loc_25262
jmp loc_25408
loc_25262:
mov edi, 50h ; 'P'; unsigned __int64
call __Znwm; operator new(ulong)
mov [rbp+var_B8], rax
jmp short $+2
loc_25275:
lea rdi, [rbp+var_38]; this
call _ZN3SDL9BmpLoader7GetSizeEv; SDL::BmpLoader::GetSize(void)
mov [rbp+var_C0], rax
jmp short $+2
loc_25287:
mov rsi, [rbp+var_C0]
mov rdi, [rbp+var_B8]
mov edx, 17101803h
call _ZN3SDL7SurfaceC2ERKNS_5Vec2iE15SDL_PixelFormat; SDL::Surface::Surface(SDL::Vec2i const&,SDL_PixelFormat)
jmp short $+2
loc_252A1:
mov rax, [rbp+var_B8]
mov [rbp+var_18], rax
mov rax, [rbp+var_18]
mov eax, [rax+8]
mov [rbp+var_70], eax
mov rax, [rbp+var_18]
mov eax, [rax+0Ch]
mov [rbp+var_74], eax
mov rax, [rbp+var_18]
mov eax, [rax+10h]
mov [rbp+var_78], eax
mov eax, [rbp+var_70]
mov ecx, [rbp+var_74]
imul eax, ecx
mov ecx, [rbp+var_78]
imul eax, ecx
cdqe
mov [rbp+var_80], rax
mov rax, [rbp+var_18]
mov rax, [rax+18h]
mov [rbp+var_88], rax
lea rdi, [rbp+var_38]; this
call _ZN3SDL9BmpLoader9GetPixelsEv; SDL::BmpLoader::GetPixels(void)
mov [rbp+var_C8], rax
jmp short $+2
loc_25300:
mov rax, [rbp+var_C8]
mov [rbp+var_90], rax
mov [rbp+var_98], 0
loc_25319:
mov rax, [rbp+var_98]
cmp rax, [rbp+var_80]
jnb loc_25406
mov rax, [rbp+var_90]
mov rcx, [rbp+var_98]
mov dl, [rax+rcx]
mov rax, [rbp+var_88]
mov rcx, [rbp+var_98]
mov [rax+rcx], dl
mov rax, [rbp+var_90]
mov rcx, [rbp+var_98]
mov dl, [rax+rcx+1]
mov rax, [rbp+var_88]
mov rcx, [rbp+var_98]
mov [rax+rcx+1], dl
mov rax, [rbp+var_90]
mov rcx, [rbp+var_98]
mov dl, [rax+rcx+2]
mov rax, [rbp+var_88]
mov rcx, [rbp+var_98]
mov [rax+rcx+2], dl
movsxd rax, [rbp+var_78]
add rax, [rbp+var_98]
mov [rbp+var_98], rax
jmp loc_25319
mov rcx, rax
mov eax, edx
mov [rbp+var_68], rcx
mov [rbp+var_6C], eax
jmp short loc_253CE
mov rcx, rax
mov eax, edx
mov [rbp+var_68], rcx
mov [rbp+var_6C], eax
lea rdi, [rbp+var_58]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
loc_253CE:
lea rdi, [rbp+var_59]
call __ZNSaIcED1Ev; std::allocator<char>::~allocator()
jmp short loc_2542C
mov rcx, rax
mov eax, edx
mov [rbp+var_68], rcx
mov [rbp+var_6C], eax
jmp short loc_2542C
mov rdi, [rbp+var_B8]; void *
mov rcx, rax
mov eax, edx
mov [rbp+var_68], rcx
mov [rbp+var_6C], eax
mov esi, 50h ; 'P'; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_2542C
loc_25406:
jmp short $+2
loc_25408:
mov rax, [rbp+var_18]
mov [rbp+var_D0], rax
lea rdi, [rbp+var_38]; this
call _ZN3SDL9BmpLoaderD2Ev; SDL::BmpLoader::~BmpLoader()
mov rax, [rbp+var_D0]
add rsp, 0D0h
pop rbp
retn
loc_2542C:
lea rdi, [rbp+var_38]; this
call _ZN3SDL9BmpLoaderD2Ev; SDL::BmpLoader::~BmpLoader()
mov rdi, [rbp+var_68]
call __Unwind_Resume
|
_DWORD * SDL_LoadBMPImplementation(SDL::Result *a1, const char *a2)
{
_DWORD *v3; // [rsp+0h] [rbp-D0h]
long long Size; // [rsp+10h] [rbp-C0h]
_DWORD *v5; // [rsp+18h] [rbp-B8h]
char v6; // [rsp+27h] [rbp-A9h]
long long v7; // [rsp+28h] [rbp-A8h]
unsigned long long i; // [rsp+38h] [rbp-98h]
long long Pixels; // [rsp+40h] [rbp-90h]
long long v10; // [rsp+48h] [rbp-88h]
unsigned long long v11; // [rsp+50h] [rbp-80h]
int v12; // [rsp+58h] [rbp-78h]
char v13; // [rsp+77h] [rbp-59h] BYREF
_BYTE v14[32]; // [rsp+78h] [rbp-58h] BYREF
_BYTE v15[32]; // [rsp+98h] [rbp-38h] BYREF
_DWORD *v16; // [rsp+B8h] [rbp-18h]
const char *v17; // [rsp+C0h] [rbp-10h]
SDL::Result *v18; // [rsp+C8h] [rbp-8h]
v18 = a1;
v17 = a2;
v16 = 0LL;
SDL::BmpLoader::BmpLoader((SDL::BmpLoader *)v15, a1);
v7 = (long long)v17;
std::allocator<char>::allocator();
std::string::basic_string<std::allocator<char>>((long long)v14, v7, (long long)&v13);
v6 = SDL::BmpLoader::Reset(v15, v14);
std::string::~string(v14);
std::allocator<char>::~allocator(&v13);
if ( (v6 & 1) != 0 )
{
v5 = (_DWORD *)operator new(0x50uLL);
Size = SDL::BmpLoader::GetSize((SDL::BmpLoader *)v15);
SDL::Surface::Surface(v5, Size, 386930691LL);
v16 = v5;
v12 = v5[4];
v11 = v12 * v5[3] * v5[2];
v10 = *((_QWORD *)v5 + 3);
Pixels = SDL::BmpLoader::GetPixels((SDL::BmpLoader *)v15);
for ( i = 0LL; i < v11; i += v12 )
{
*(_BYTE *)(v10 + i) = *(_BYTE *)(Pixels + i);
*(_BYTE *)(v10 + i + 1) = *(_BYTE *)(Pixels + i + 1);
*(_BYTE *)(v10 + i + 2) = *(_BYTE *)(Pixels + i + 2);
}
}
v3 = v16;
SDL::BmpLoader::~BmpLoader((SDL::BmpLoader *)v15);
return v3;
}
|
SDL_LoadBMPImplementation:
PUSH RBP
MOV RBP,RSP
SUB RSP,0xd0
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV qword ptr [RBP + -0x18],0x0
MOV RSI,qword ptr [RBP + -0x8]
LEA RDI,[RBP + -0x38]
CALL 0x00128cc0
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RBP + -0xa8],RAX
LEA RDI,[RBP + -0x59]
MOV qword ptr [RBP + -0xa0],RDI
CALL 0x0011a460
MOV RSI,qword ptr [RBP + -0xa8]
MOV RDX,qword ptr [RBP + -0xa0]
LAB_00125221:
LEA RDI,[RBP + -0x58]
CALL 0x0011caf0
JMP 0x0012522c
LAB_0012522c:
LEA RDI,[RBP + -0x38]
LEA RSI,[RBP + -0x58]
CALL 0x00128d60
MOV byte ptr [RBP + -0xa9],AL
JMP 0x00125241
LAB_00125241:
LEA RDI,[RBP + -0x58]
CALL 0x0011a150
LEA RDI,[RBP + -0x59]
CALL 0x0011a2c0
MOV AL,byte ptr [RBP + -0xa9]
TEST AL,0x1
JNZ 0x00125262
JMP 0x00125408
LAB_00125262:
MOV EDI,0x50
CALL 0x0011a280
MOV qword ptr [RBP + -0xb8],RAX
JMP 0x00125275
LAB_00125275:
LEA RDI,[RBP + -0x38]
CALL 0x00128eb0
MOV qword ptr [RBP + -0xc0],RAX
JMP 0x00125287
LAB_00125287:
MOV RSI,qword ptr [RBP + -0xc0]
MOV RDI,qword ptr [RBP + -0xb8]
MOV EDX,0x17101803
CALL 0x0012cc30
JMP 0x001252a1
LAB_001252a1:
MOV RAX,qword ptr [RBP + -0xb8]
MOV qword ptr [RBP + -0x18],RAX
MOV RAX,qword ptr [RBP + -0x18]
MOV EAX,dword ptr [RAX + 0x8]
MOV dword ptr [RBP + -0x70],EAX
MOV RAX,qword ptr [RBP + -0x18]
MOV EAX,dword ptr [RAX + 0xc]
MOV dword ptr [RBP + -0x74],EAX
MOV RAX,qword ptr [RBP + -0x18]
MOV EAX,dword ptr [RAX + 0x10]
MOV dword ptr [RBP + -0x78],EAX
MOV EAX,dword ptr [RBP + -0x70]
MOV ECX,dword ptr [RBP + -0x74]
IMUL EAX,ECX
MOV ECX,dword ptr [RBP + -0x78]
IMUL EAX,ECX
CDQE
MOV qword ptr [RBP + -0x80],RAX
MOV RAX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RAX + 0x18]
MOV qword ptr [RBP + -0x88],RAX
LAB_001252ee:
LEA RDI,[RBP + -0x38]
CALL 0x00128ef0
LAB_001252f7:
MOV qword ptr [RBP + -0xc8],RAX
JMP 0x00125300
LAB_00125300:
MOV RAX,qword ptr [RBP + -0xc8]
MOV qword ptr [RBP + -0x90],RAX
MOV qword ptr [RBP + -0x98],0x0
LAB_00125319:
MOV RAX,qword ptr [RBP + -0x98]
CMP RAX,qword ptr [RBP + -0x80]
JNC 0x00125406
MOV RAX,qword ptr [RBP + -0x90]
MOV RCX,qword ptr [RBP + -0x98]
MOV DL,byte ptr [RAX + RCX*0x1]
MOV RAX,qword ptr [RBP + -0x88]
MOV RCX,qword ptr [RBP + -0x98]
MOV byte ptr [RAX + RCX*0x1],DL
MOV RAX,qword ptr [RBP + -0x90]
MOV RCX,qword ptr [RBP + -0x98]
MOV DL,byte ptr [RAX + RCX*0x1 + 0x1]
MOV RAX,qword ptr [RBP + -0x88]
MOV RCX,qword ptr [RBP + -0x98]
MOV byte ptr [RAX + RCX*0x1 + 0x1],DL
MOV RAX,qword ptr [RBP + -0x90]
MOV RCX,qword ptr [RBP + -0x98]
MOV DL,byte ptr [RAX + RCX*0x1 + 0x2]
MOV RAX,qword ptr [RBP + -0x88]
MOV RCX,qword ptr [RBP + -0x98]
MOV byte ptr [RAX + RCX*0x1 + 0x2],DL
MOVSXD RAX,dword ptr [RBP + -0x78]
ADD RAX,qword ptr [RBP + -0x98]
MOV qword ptr [RBP + -0x98],RAX
JMP 0x00125319
LAB_00125406:
JMP 0x00125408
LAB_00125408:
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RBP + -0xd0],RAX
LEA RDI,[RBP + -0x38]
CALL 0x00128d00
MOV RAX,qword ptr [RBP + -0xd0]
ADD RSP,0xd0
POP RBP
RET
|
/* SDL_LoadBMPImplementation(SDL::Result&, char const*) */
Surface * SDL_LoadBMPImplementation(Result *param_1,char *param_2)
{
int iVar1;
int iVar2;
int iVar3;
long lVar4;
char *pcVar5;
byte bVar6;
Surface *pSVar7;
int8 uVar8;
long lVar9;
ulong local_a0;
allocator local_61;
string local_60 [32];
BmpLoader local_40 [32];
Surface *local_20;
char *local_18;
Result *local_10;
local_20 = (Surface *)0x0;
local_18 = param_2;
local_10 = param_1;
SDL::BmpLoader::BmpLoader(local_40,param_1);
pcVar5 = local_18;
std::allocator<char>::allocator();
/* try { // try from 00125221 to 00125229 has its CatchHandler @ 001253ab */
std::__cxx11::string::string<std::allocator<char>>(local_60,pcVar5,&local_61);
/* try { // try from 0012522c to 00125238 has its CatchHandler @ 001253b9 */
bVar6 = SDL::BmpLoader::Reset(local_40,local_60);
std::__cxx11::string::~string(local_60);
std::allocator<char>::~allocator((allocator<char> *)&local_61);
if ((bVar6 & 1) != 0) {
/* try { // try from 00125262 to 0012526b has its CatchHandler @ 001253d9 */
pSVar7 = (Surface *)operator_new(0x50);
/* try { // try from 00125275 to 0012529e has its CatchHandler @ 001253e7 */
uVar8 = SDL::BmpLoader::GetSize(local_40);
SDL::Surface::Surface(pSVar7,uVar8,0x17101803);
iVar1 = *(int *)(pSVar7 + 8);
iVar2 = *(int *)(pSVar7 + 0xc);
iVar3 = *(int *)(pSVar7 + 0x10);
lVar4 = *(long *)(pSVar7 + 0x18);
/* try { // try from 001252ee to 001252f6 has its CatchHandler @ 001253d9 */
local_20 = pSVar7;
lVar9 = SDL::BmpLoader::GetPixels(local_40);
for (local_a0 = 0; local_a0 < (ulong)(long)(iVar1 * iVar2 * iVar3);
local_a0 = (long)iVar3 + local_a0) {
*(int1 *)(lVar4 + local_a0) = *(int1 *)(lVar9 + local_a0);
*(int1 *)(lVar4 + 1 + local_a0) = *(int1 *)(lVar9 + 1 + local_a0);
*(int1 *)(lVar4 + 2 + local_a0) = *(int1 *)(lVar9 + 2 + local_a0);
}
}
pSVar7 = local_20;
SDL::BmpLoader::~BmpLoader(local_40);
return pSVar7;
}
|
|
64,264
|
Master::setupShips()
|
666mxvbee[P]BattleShip/lib/Master/Master.cpp
|
void Master::setupShips() {
RandomShips randomShips(settings);
randomShips.placeShips("master");
std::ofstream masterFile("../game_data/master_ships.txt", std::ios::trunc);
if (!masterFile.is_open()) {
throw std::runtime_error("Master::setupShips(): Unable to open master_ships.txt for writing.");
}
const auto& ships = settings.getMasterShips();
for (const auto& ship : ships) {
masterFile << "ship_type=" << ship.len
<< ",orientation=" << ship.orientation
<< ",x=" << ship.x
<< ",y=" << ship.y << "\n";
}
masterFile.close();
std::cout << "Master: Ships written to master_ships.txt" << std::endl;
}
|
O0
|
cpp
|
Master::setupShips():
pushq %rbp
movq %rsp, %rbp
subq $0x1680, %rsp # imm = 0x1680
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x1618(%rbp)
movq (%rax), %rsi
leaq -0x13a8(%rbp), %rdi
callq 0x39780
leaq -0x13c9(%rbp), %rdi
movq %rdi, -0x1610(%rbp)
callq 0x7650
movq -0x1610(%rbp), %rdx
leaq 0x789e(%rip), %rsi # 0x40278
leaq -0x13c8(%rbp), %rdi
callq 0xb110
jmp 0x389e8
leaq -0x13a8(%rbp), %rdi
leaq -0x13c8(%rbp), %rsi
callq 0x39860
jmp 0x389fd
leaq -0x13c8(%rbp), %rdi
callq 0x7e50
leaq -0x13c9(%rbp), %rdi
callq 0x73d0
leaq 0x8a0a(%rip), %rsi # 0x41426
leaq -0x15e0(%rbp), %rdi
movq %rdi, -0x1628(%rbp)
movl $0x20, %edx
callq 0x73e0
movq -0x1628(%rbp), %rdi
callq 0x7300
movb %al, -0x1619(%rbp)
jmp 0x38a48
movb -0x1619(%rbp), %al
testb $0x1, %al
jne 0x38b19
jmp 0x38a58
movl $0x10, %edi
callq 0x71c0
movq %rax, %rdi
movq %rdi, %rax
movq %rax, -0x1630(%rbp)
leaq 0x89ce(%rip), %rsi # 0x41444
callq 0x7150
jmp 0x38a7d
movq -0x1630(%rbp), %rdi
movq 0x2555d(%rip), %rsi # 0x5dfe8
movq 0x254e6(%rip), %rdx # 0x5df78
callq 0x7600
jmp 0x38d26
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x13d8(%rbp)
movl %eax, -0x13dc(%rbp)
jmp 0x38ace
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x13d8(%rbp)
movl %eax, -0x13dc(%rbp)
leaq -0x13c8(%rbp), %rdi
callq 0x7e50
leaq -0x13c9(%rbp), %rdi
callq 0x73d0
jmp 0x38d1a
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x13d8(%rbp)
movl %eax, -0x13dc(%rbp)
jmp 0x38d0e
movq -0x1630(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x13d8(%rbp)
movl %eax, -0x13dc(%rbp)
callq 0x72d0
jmp 0x38d0e
movq -0x1618(%rbp), %rax
movq (%rax), %rdi
callq 0xaa40
movq %rax, -0x1638(%rbp)
jmp 0x38b31
movq -0x1638(%rbp), %rax
movq %rax, -0x15e8(%rbp)
movq -0x15e8(%rbp), %rax
movq %rax, -0x15f0(%rbp)
movq -0x15f0(%rbp), %rdi
callq 0xb750
movq %rax, -0x15f8(%rbp)
movq -0x15f0(%rbp), %rdi
callq 0xb780
movq %rax, -0x1600(%rbp)
leaq -0x15f8(%rbp), %rdi
leaq -0x1600(%rbp), %rsi
callq 0xb7b0
xorb $-0x1, %al
testb $0x1, %al
jne 0x38b91
jmp 0x38cba
leaq -0x15f8(%rbp), %rdi
callq 0xb7f0
movq %rax, -0x1608(%rbp)
leaq 0x88dc(%rip), %rsi # 0x41487
leaq -0x15e0(%rbp), %rdi
callq 0x7380
movq %rax, -0x1640(%rbp)
jmp 0x38bc0
movq -0x1640(%rbp), %rdi
movq -0x1608(%rbp), %rax
movl (%rax), %esi
callq 0x7620
movq %rax, -0x1648(%rbp)
jmp 0x38bde
movq -0x1648(%rbp), %rdi
leaq 0x88a6(%rip), %rsi # 0x41492
callq 0x7380
movq %rax, -0x1650(%rbp)
jmp 0x38bfa
movq -0x1650(%rbp), %rdi
movq -0x1608(%rbp), %rax
movsbl 0x4(%rax), %esi
callq 0x7440
movq %rax, -0x1658(%rbp)
jmp 0x38c1a
movq -0x1658(%rbp), %rdi
leaq 0x8878(%rip), %rsi # 0x414a0
callq 0x7380
movq %rax, -0x1660(%rbp)
jmp 0x38c36
movq -0x1660(%rbp), %rdi
movq -0x1608(%rbp), %rax
movq 0x8(%rax), %rsi
callq 0x70a0
movq %rax, -0x1668(%rbp)
jmp 0x38c56
movq -0x1668(%rbp), %rdi
leaq 0x8840(%rip), %rsi # 0x414a4
callq 0x7380
movq %rax, -0x1670(%rbp)
jmp 0x38c72
movq -0x1670(%rbp), %rdi
movq -0x1608(%rbp), %rax
movq 0x10(%rax), %rsi
callq 0x70a0
movq %rax, -0x1678(%rbp)
jmp 0x38c92
movq -0x1678(%rbp), %rdi
leaq 0x8cdd(%rip), %rsi # 0x4197d
callq 0x7380
jmp 0x38ca7
jmp 0x38ca9
leaq -0x15f8(%rbp), %rdi
callq 0xb810
jmp 0x38b73
leaq -0x15e0(%rbp), %rdi
callq 0x74d0
jmp 0x38cc8
movq 0x252c1(%rip), %rdi # 0x5df90
leaq 0x87d2(%rip), %rsi # 0x414a8
callq 0x7380
movq %rax, -0x1680(%rbp)
jmp 0x38ce4
movq -0x1680(%rbp), %rdi
movq 0x2526e(%rip), %rsi # 0x5df60
callq 0x73c0
jmp 0x38cf9
leaq -0x15e0(%rbp), %rdi
callq 0x7530
addq $0x1680, %rsp # imm = 0x1680
popq %rbp
retq
leaq -0x15e0(%rbp), %rdi
callq 0x7530
movq -0x13d8(%rbp), %rdi
callq 0x7640
nopw %cs:(%rax,%rax)
|
_ZN6Master10setupShipsEv:
push rbp
mov rbp, rsp
sub rsp, 1680h
mov [rbp+var_8], rdi
mov rax, [rbp+var_8]
mov [rbp+var_1618], rax
mov rsi, [rax]; Settings *
lea rdi, [rbp+var_13A8]; this
call _ZN11RandomShipsC2ER8Settings; RandomShips::RandomShips(Settings &)
lea rdi, [rbp+var_13C9]
mov [rbp+var_1610], rdi
call __ZNSaIcEC1Ev; std::allocator<char>::allocator(void)
mov rdx, [rbp+var_1610]
lea rsi, aMaster; "master"
lea rdi, [rbp+var_13C8]
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&)
jmp short $+2
loc_389E8:
lea rdi, [rbp+var_13A8]
lea rsi, [rbp+var_13C8]
call _ZN11RandomShips10placeShipsERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; RandomShips::placeShips(std::string const&)
jmp short $+2
loc_389FD:
lea rdi, [rbp+var_13C8]
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
lea rdi, [rbp+var_13C9]
call __ZNSaIcED1Ev; std::allocator<char>::~allocator()
lea rsi, aGameDataMaster; "../game_data/master_ships.txt"
lea rdi, [rbp+var_15E0]
mov [rbp+var_1628], rdi
mov edx, 20h ; ' '
call __ZNSt14basic_ofstreamIcSt11char_traitsIcEEC1EPKcSt13_Ios_Openmode; std::ofstream::basic_ofstream(char const*,std::_Ios_Openmode)
mov rdi, [rbp+var_1628]
call __ZNSt14basic_ofstreamIcSt11char_traitsIcEE7is_openEv; std::ofstream::is_open(void)
mov [rbp+var_1619], al
jmp short $+2
loc_38A48:
mov al, [rbp+var_1619]
test al, 1
jnz loc_38B19
jmp short $+2
loc_38A58:
mov edi, 10h; thrown_size
call ___cxa_allocate_exception
mov rdi, rax; this
mov rax, rdi
mov [rbp+var_1630], rax
lea rsi, aMasterSetupshi; "Master::setupShips(): Unable to open ma"...
call __ZNSt13runtime_errorC1EPKc; std::runtime_error::runtime_error(char const*)
jmp short $+2
loc_38A7D:
mov rdi, [rbp+var_1630]; void *
mov rsi, cs:_ZTISt13runtime_error_ptr; lptinfo
mov rdx, cs:_ZNSt13runtime_errorD1Ev_ptr; void (*)(void *)
call ___cxa_throw
jmp loc_38D26
mov rcx, rax
mov eax, edx
mov [rbp+var_13D8], rcx
mov [rbp+var_13DC], eax
jmp short loc_38ACE
mov rcx, rax
mov eax, edx
mov [rbp+var_13D8], rcx
mov [rbp+var_13DC], eax
lea rdi, [rbp+var_13C8]
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
loc_38ACE:
lea rdi, [rbp+var_13C9]
call __ZNSaIcED1Ev; std::allocator<char>::~allocator()
jmp loc_38D1A
mov rcx, rax
mov eax, edx
mov [rbp+var_13D8], rcx
mov [rbp+var_13DC], eax
jmp loc_38D0E
mov rdi, [rbp+var_1630]; void *
mov rcx, rax
mov eax, edx
mov [rbp+var_13D8], rcx
mov [rbp+var_13DC], eax
call ___cxa_free_exception
jmp loc_38D0E
loc_38B19:
mov rax, [rbp+var_1618]
mov rdi, [rax]; this
call _ZNK8Settings14getMasterShipsEv; Settings::getMasterShips(void)
mov [rbp+var_1638], rax
jmp short $+2
loc_38B31:
mov rax, [rbp+var_1638]
mov [rbp+var_15E8], rax
mov rax, [rbp+var_15E8]
mov [rbp+var_15F0], rax
mov rdi, [rbp+var_15F0]
call _ZNKSt6vectorI4ShipSaIS0_EE5beginEv; std::vector<Ship>::begin(void)
mov [rbp+var_15F8], rax
mov rdi, [rbp+var_15F0]
call _ZNKSt6vectorI4ShipSaIS0_EE3endEv; std::vector<Ship>::end(void)
mov [rbp+var_1600], rax
loc_38B73:
lea rdi, [rbp+var_15F8]
lea rsi, [rbp+var_1600]
call _ZN9__gnu_cxxeqIPK4ShipSt6vectorIS1_SaIS1_EEEEbRKNS_17__normal_iteratorIT_T0_EESC_QrqXeqcldtfp_4baseEcldtfp0_4baseERSt14convertible_toIbEE
xor al, 0FFh
test al, 1
jnz short loc_38B91
jmp loc_38CBA
loc_38B91:
lea rdi, [rbp+var_15F8]
call _ZNK9__gnu_cxx17__normal_iteratorIPK4ShipSt6vectorIS1_SaIS1_EEEdeEv; __gnu_cxx::__normal_iterator<Ship const*,std::vector<Ship>>::operator*(void)
mov [rbp+var_1608], rax
lea rsi, aShipType; "ship_type="
lea rdi, [rbp+var_15E0]
call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*)
mov [rbp+var_1640], rax
jmp short $+2
loc_38BC0:
mov rdi, [rbp+var_1640]
mov rax, [rbp+var_1608]
mov esi, [rax]
call __ZNSolsEi; std::ostream::operator<<(int)
mov [rbp+var_1648], rax
jmp short $+2
loc_38BDE:
mov rdi, [rbp+var_1648]
lea rsi, aOrientation; ",orientation="
call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*)
mov [rbp+var_1650], rax
jmp short $+2
loc_38BFA:
mov rdi, [rbp+var_1650]
mov rax, [rbp+var_1608]
movsx esi, byte ptr [rax+4]
call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c; std::operator<<<std::char_traits<char>>(std::ostream &,char)
mov [rbp+var_1658], rax
jmp short $+2
loc_38C1A:
mov rdi, [rbp+var_1658]
lea rsi, asc_414A0; ",x="
call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*)
mov [rbp+var_1660], rax
jmp short $+2
loc_38C36:
mov rdi, [rbp+var_1660]
mov rax, [rbp+var_1608]
mov rsi, [rax+8]
call __ZNSolsEm; std::ostream::operator<<(ulong)
mov [rbp+var_1668], rax
jmp short $+2
loc_38C56:
mov rdi, [rbp+var_1668]
lea rsi, aY; ",y="
call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*)
mov [rbp+var_1670], rax
jmp short $+2
loc_38C72:
mov rdi, [rbp+var_1670]
mov rax, [rbp+var_1608]
mov rsi, [rax+10h]
call __ZNSolsEm; std::ostream::operator<<(ulong)
mov [rbp+var_1678], rax
jmp short $+2
loc_38C92:
mov rdi, [rbp+var_1678]
lea rsi, aMasterSlaveShi+28h; "\n"
call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*)
jmp short $+2
loc_38CA7:
jmp short $+2
loc_38CA9:
lea rdi, [rbp+var_15F8]
call _ZN9__gnu_cxx17__normal_iteratorIPK4ShipSt6vectorIS1_SaIS1_EEEppEv; __gnu_cxx::__normal_iterator<Ship const*,std::vector<Ship>>::operator++(void)
jmp loc_38B73
loc_38CBA:
lea rdi, [rbp+var_15E0]
call __ZNSt14basic_ofstreamIcSt11char_traitsIcEE5closeEv; std::ofstream::close(void)
jmp short $+2
loc_38CC8:
mov rdi, cs:_ZSt4cout_ptr
lea rsi, aMasterShipsWri; "Master: Ships written to master_ships.t"...
call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*)
mov [rbp+var_1680], rax
jmp short $+2
loc_38CE4:
mov rdi, [rbp+var_1680]
mov rsi, cs:_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6__ptr
call __ZNSolsEPFRSoS_E; std::ostream::operator<<(std::ostream & (*)(std::ostream &))
jmp short $+2
loc_38CF9:
lea rdi, [rbp+var_15E0]
call __ZNSt14basic_ofstreamIcSt11char_traitsIcEED1Ev; std::ofstream::~ofstream()
add rsp, 1680h
pop rbp
retn
loc_38D0E:
lea rdi, [rbp+var_15E0]
call __ZNSt14basic_ofstreamIcSt11char_traitsIcEED1Ev; std::ofstream::~ofstream()
loc_38D1A:
mov rdi, [rbp+var_13D8]
call __Unwind_Resume
loc_38D26:
nop word ptr [rax+rax+00000000h]
|
long long Master::setupShips(Settings **this)
{
long long v2; // [rsp+0h] [rbp-1680h]
long long v3; // [rsp+8h] [rbp-1678h]
long long v4; // [rsp+10h] [rbp-1670h]
long long v5; // [rsp+18h] [rbp-1668h]
long long v6; // [rsp+20h] [rbp-1660h]
long long v7; // [rsp+28h] [rbp-1658h]
long long v8; // [rsp+30h] [rbp-1650h]
long long v9; // [rsp+38h] [rbp-1648h]
long long v10; // [rsp+40h] [rbp-1640h]
std::runtime_error *exception; // [rsp+50h] [rbp-1630h]
unsigned int *v12; // [rsp+78h] [rbp-1608h]
long long v13; // [rsp+80h] [rbp-1600h] BYREF
_QWORD v14[2]; // [rsp+88h] [rbp-15F8h] BYREF
long long MasterShips; // [rsp+98h] [rbp-15E8h]
_BYTE v16[516]; // [rsp+A0h] [rbp-15E0h] BYREF
char v17; // [rsp+2B7h] [rbp-13C9h] BYREF
_QWORD v18[4]; // [rsp+2B8h] [rbp-13C8h] BYREF
_BYTE v19[5024]; // [rsp+2D8h] [rbp-13A8h] BYREF
Settings **v20; // [rsp+1678h] [rbp-8h]
v20 = this;
RandomShips::RandomShips((RandomShips *)v19, *this);
std::allocator<char>::allocator();
std::string::basic_string<std::allocator<char>>(v18, (long long)"master", (long long)&v17);
RandomShips::placeShips(v19, v18);
std::string::~string((long long)v18);
std::allocator<char>::~allocator(&v17);
std::ofstream::basic_ofstream(v16, "../game_data/master_ships.txt", 32LL);
if ( (std::ofstream::is_open(v16) & 1) == 0 )
{
exception = (std::runtime_error *)__cxa_allocate_exception(0x10uLL);
std::runtime_error::runtime_error(exception, "Master::setupShips(): Unable to open master_ships.txt for writing.");
__cxa_throw(
exception,
(struct type_info *)&`typeinfo for'std::runtime_error,
(void (*)(void *))&std::runtime_error::~runtime_error);
}
MasterShips = Settings::getMasterShips(*this);
v14[1] = MasterShips;
v14[0] = std::vector<Ship>::begin(MasterShips);
v13 = std::vector<Ship>::end(MasterShips);
while ( !__gnu_cxx::operator==<Ship const*,std::vector<Ship>>((long long)v14, (long long)&v13) )
{
v12 = (unsigned int *)__gnu_cxx::__normal_iterator<Ship const*,std::vector<Ship>>::operator*((long long)v14);
v10 = std::operator<<<std::char_traits<char>>(v16, "ship_type=");
v9 = std::ostream::operator<<(v10, *v12);
v8 = std::operator<<<std::char_traits<char>>(v9, ",orientation=");
v7 = std::operator<<<std::char_traits<char>>(v8, (unsigned int)*((char *)v12 + 4));
v6 = std::operator<<<std::char_traits<char>>(v7, ",x=");
v5 = std::ostream::operator<<(v6, *((_QWORD *)v12 + 1));
v4 = std::operator<<<std::char_traits<char>>(v5, ",y=");
v3 = std::ostream::operator<<(v4, *((_QWORD *)v12 + 2));
std::operator<<<std::char_traits<char>>(v3, "\n");
__gnu_cxx::__normal_iterator<Ship const*,std::vector<Ship>>::operator++(v14);
}
std::ofstream::close(v16);
v2 = std::operator<<<std::char_traits<char>>(&std::cout, "Master: Ships written to master_ships.txt");
std::ostream::operator<<(v2, &std::endl<char,std::char_traits<char>>);
return std::ofstream::~ofstream(v16);
}
|
setupShips:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x1680
MOV qword ptr [RBP + -0x8],RDI
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RBP + -0x1618],RAX
MOV RSI,qword ptr [RAX]
LEA RDI,[RBP + -0x13a8]
CALL 0x00139780
LEA RDI,[RBP + -0x13c9]
MOV qword ptr [RBP + -0x1610],RDI
CALL 0x00107650
MOV RDX,qword ptr [RBP + -0x1610]
LAB_001389d3:
LEA RSI,[0x140278]
LEA RDI,[RBP + -0x13c8]
CALL 0x0010b110
JMP 0x001389e8
LAB_001389e8:
LEA RDI,[RBP + -0x13a8]
LEA RSI,[RBP + -0x13c8]
CALL 0x00139860
LAB_001389fb:
JMP 0x001389fd
LAB_001389fd:
LEA RDI,[RBP + -0x13c8]
CALL 0x00107e50
LEA RDI,[RBP + -0x13c9]
CALL 0x001073d0
LEA RSI,[0x141426]
LEA RDI,[RBP + -0x15e0]
MOV qword ptr [RBP + -0x1628],RDI
MOV EDX,0x20
CALL 0x001073e0
MOV RDI,qword ptr [RBP + -0x1628]
LAB_00138a3b:
CALL 0x00107300
LAB_00138a40:
MOV byte ptr [RBP + -0x1619],AL
JMP 0x00138a48
LAB_00138a48:
MOV AL,byte ptr [RBP + -0x1619]
TEST AL,0x1
JNZ 0x00138b19
JMP 0x00138a58
LAB_00138a58:
MOV EDI,0x10
CALL 0x001071c0
MOV RDI,RAX
MOV RAX,RDI
MOV qword ptr [RBP + -0x1630],RAX
LAB_00138a6f:
LEA RSI,[0x141444]
CALL 0x00107150
JMP 0x00138a7d
LAB_00138a7d:
MOV RDI,qword ptr [RBP + -0x1630]
MOV RSI,qword ptr [0x0015dfe8]
MOV RDX,qword ptr [0x0015df78]
CALL 0x00107600
LAB_00138b19:
MOV RAX,qword ptr [RBP + -0x1618]
MOV RDI,qword ptr [RAX]
LAB_00138b23:
CALL 0x0010aa40
MOV qword ptr [RBP + -0x1638],RAX
JMP 0x00138b31
LAB_00138b31:
MOV RAX,qword ptr [RBP + -0x1638]
MOV qword ptr [RBP + -0x15e8],RAX
MOV RAX,qword ptr [RBP + -0x15e8]
MOV qword ptr [RBP + -0x15f0],RAX
MOV RDI,qword ptr [RBP + -0x15f0]
CALL 0x0010b750
MOV qword ptr [RBP + -0x15f8],RAX
MOV RDI,qword ptr [RBP + -0x15f0]
CALL 0x0010b780
MOV qword ptr [RBP + -0x1600],RAX
LAB_00138b73:
LEA RDI,[RBP + -0x15f8]
LEA RSI,[RBP + -0x1600]
CALL 0x0010b7b0
XOR AL,0xff
TEST AL,0x1
JNZ 0x00138b91
JMP 0x00138cba
LAB_00138b91:
LEA RDI,[RBP + -0x15f8]
CALL 0x0010b7f0
MOV qword ptr [RBP + -0x1608],RAX
LEA RSI,[0x141487]
LEA RDI,[RBP + -0x15e0]
CALL 0x00107380
MOV qword ptr [RBP + -0x1640],RAX
JMP 0x00138bc0
LAB_00138bc0:
MOV RDI,qword ptr [RBP + -0x1640]
MOV RAX,qword ptr [RBP + -0x1608]
MOV ESI,dword ptr [RAX]
CALL 0x00107620
MOV qword ptr [RBP + -0x1648],RAX
JMP 0x00138bde
LAB_00138bde:
MOV RDI,qword ptr [RBP + -0x1648]
LEA RSI,[0x141492]
CALL 0x00107380
MOV qword ptr [RBP + -0x1650],RAX
JMP 0x00138bfa
LAB_00138bfa:
MOV RDI,qword ptr [RBP + -0x1650]
MOV RAX,qword ptr [RBP + -0x1608]
MOVSX ESI,byte ptr [RAX + 0x4]
CALL 0x00107440
MOV qword ptr [RBP + -0x1658],RAX
JMP 0x00138c1a
LAB_00138c1a:
MOV RDI,qword ptr [RBP + -0x1658]
LEA RSI,[0x1414a0]
CALL 0x00107380
MOV qword ptr [RBP + -0x1660],RAX
JMP 0x00138c36
LAB_00138c36:
MOV RDI,qword ptr [RBP + -0x1660]
MOV RAX,qword ptr [RBP + -0x1608]
MOV RSI,qword ptr [RAX + 0x8]
CALL 0x001070a0
MOV qword ptr [RBP + -0x1668],RAX
JMP 0x00138c56
LAB_00138c56:
MOV RDI,qword ptr [RBP + -0x1668]
LEA RSI,[0x1414a4]
CALL 0x00107380
MOV qword ptr [RBP + -0x1670],RAX
JMP 0x00138c72
LAB_00138c72:
MOV RDI,qword ptr [RBP + -0x1670]
MOV RAX,qword ptr [RBP + -0x1608]
MOV RSI,qword ptr [RAX + 0x10]
CALL 0x001070a0
MOV qword ptr [RBP + -0x1678],RAX
JMP 0x00138c92
LAB_00138c92:
MOV RDI,qword ptr [RBP + -0x1678]
LEA RSI,[0x14197d]
CALL 0x00107380
JMP 0x00138ca7
LAB_00138ca7:
JMP 0x00138ca9
LAB_00138ca9:
LEA RDI,[RBP + -0x15f8]
CALL 0x0010b810
JMP 0x00138b73
LAB_00138cba:
LEA RDI,[RBP + -0x15e0]
CALL 0x001074d0
JMP 0x00138cc8
LAB_00138cc8:
MOV RDI,qword ptr [0x0015df90]
LEA RSI,[0x1414a8]
CALL 0x00107380
MOV qword ptr [RBP + -0x1680],RAX
JMP 0x00138ce4
LAB_00138ce4:
MOV RDI,qword ptr [RBP + -0x1680]
MOV RSI,qword ptr [0x0015df60]
CALL 0x001073c0
LAB_00138cf7:
JMP 0x00138cf9
LAB_00138cf9:
LEA RDI,[RBP + -0x15e0]
CALL 0x00107530
ADD RSP,0x1680
POP RBP
RET
|
/* Master::setupShips() */
void __thiscall Master::setupShips(Master *this)
{
byte bVar1;
runtime_error *this_00;
int *piVar2;
ostream *poVar3;
int8 local_1608;
int8 local_1600;
vector<Ship,std::allocator<Ship>> *local_15f8;
vector<Ship,std::allocator<Ship>> *local_15f0;
ofstream local_15e8 [535];
allocator local_13d1;
string local_13d0 [32];
RandomShips local_13b0 [5024];
Master *local_10;
local_10 = this;
RandomShips::RandomShips(local_13b0,*(Settings **)this);
std::allocator<char>::allocator();
/* try { // try from 001389d3 to 001389e5 has its CatchHandler @ 00138a9c */
std::__cxx11::string::string<std::allocator<char>>(local_13d0,"master",&local_13d1);
/* try { // try from 001389e8 to 001389fa has its CatchHandler @ 00138ab0 */
RandomShips::placeShips(local_13b0,local_13d0);
std::__cxx11::string::~string(local_13d0);
std::allocator<char>::~allocator((allocator<char> *)&local_13d1);
std::ofstream::ofstream(local_15e8,"../game_data/master_ships.txt",0x20);
/* try { // try from 00138a3b to 00138a3f has its CatchHandler @ 00138adf */
bVar1 = std::ofstream::is_open();
if ((bVar1 & 1) == 0) {
this_00 = (runtime_error *)__cxa_allocate_exception(0x10);
/* try { // try from 00138a6f to 00138a7a has its CatchHandler @ 00138af6 */
std::runtime_error::runtime_error
(this_00,"Master::setupShips(): Unable to open master_ships.txt for writing.");
/* try { // try from 00138a7d to 00138a96 has its CatchHandler @ 00138adf */
/* WARNING: Subroutine does not return */
__cxa_throw(this_00,PTR_typeinfo_0015dfe8,PTR__runtime_error_0015df78);
}
/* try { // try from 00138b23 to 00138cf6 has its CatchHandler @ 00138adf */
local_15f8 = (vector<Ship,std::allocator<Ship>> *)Settings::getMasterShips(*(Settings **)this);
local_15f0 = local_15f8;
local_1600 = std::vector<Ship,std::allocator<Ship>>::begin(local_15f8);
local_1608 = std::vector<Ship,std::allocator<Ship>>::end(local_15f8);
while( true ) {
bVar1 = _ZN9__gnu_cxxeqIPK4ShipSt6vectorIS1_SaIS1_EEEEbRKNS_17__normal_iteratorIT_T0_EESC_QrqXeqcldtfp_4baseEcldtfp0_4baseERSt14convertible_toIbEE
(&local_1600,&local_1608);
if (((bVar1 ^ 0xff) & 1) == 0) break;
piVar2 = (int *)__gnu_cxx::__normal_iterator<Ship_const*,std::vector<Ship,std::allocator<Ship>>>
::operator*((__normal_iterator<Ship_const*,std::vector<Ship,std::allocator<Ship>>>
*)&local_1600);
poVar3 = std::operator<<((ostream *)local_15e8,"ship_type=");
poVar3 = (ostream *)std::ostream::operator<<(poVar3,*piVar2);
poVar3 = std::operator<<(poVar3,",orientation=");
poVar3 = std::operator<<(poVar3,(char)piVar2[1]);
poVar3 = std::operator<<(poVar3,",x=");
poVar3 = (ostream *)std::ostream::operator<<(poVar3,*(ulong *)(piVar2 + 2));
poVar3 = std::operator<<(poVar3,",y=");
poVar3 = (ostream *)std::ostream::operator<<(poVar3,*(ulong *)(piVar2 + 4));
std::operator<<(poVar3,"\n");
__gnu_cxx::__normal_iterator<Ship_const*,std::vector<Ship,std::allocator<Ship>>>::operator++
((__normal_iterator<Ship_const*,std::vector<Ship,std::allocator<Ship>>> *)&local_1600)
;
}
std::ofstream::close();
poVar3 = std::operator<<((ostream *)PTR_cout_0015df90,"Master: Ships written to master_ships.txt")
;
std::ostream::operator<<
(poVar3,(_func_ostream_ptr_ostream_ptr *)PTR_endl<char,std_char_traits<char>>_0015df60);
std::ofstream::~ofstream(local_15e8);
return;
}
|
|
64,265
|
Master::setupShips()
|
666mxvbee[P]BattleShip/lib/Master/Master.cpp
|
void Master::setupShips() {
RandomShips randomShips(settings);
randomShips.placeShips("master");
std::ofstream masterFile("../game_data/master_ships.txt", std::ios::trunc);
if (!masterFile.is_open()) {
throw std::runtime_error("Master::setupShips(): Unable to open master_ships.txt for writing.");
}
const auto& ships = settings.getMasterShips();
for (const auto& ship : ships) {
masterFile << "ship_type=" << ship.len
<< ",orientation=" << ship.orientation
<< ",x=" << ship.x
<< ",y=" << ship.y << "\n";
}
masterFile.close();
std::cout << "Master: Ships written to master_ships.txt" << std::endl;
}
|
O2
|
cpp
|
Master::setupShips():
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x15a8, %rsp # imm = 0x15A8
movq %rdi, %rbx
movq (%rdi), %rsi
leaq 0x208(%rsp), %rdi
callq 0x13f6c
leaq 0x3947(%rip), %rsi # 0x171f8
leaq 0x8(%rsp), %rdi
leaq 0x7(%rsp), %rdx
callq 0x6a32
leaq 0x208(%rsp), %rdi
leaq 0x8(%rsp), %rsi
callq 0x13fde
leaq 0x8(%rsp), %rdi
callq 0x5ac8
leaq 0x4ac1(%rip), %rsi # 0x183a4
leaq 0x8(%rsp), %rdi
pushq $0x20
popq %rdx
callq 0x53c0
leaq 0x78(%rsp), %rdi
callq 0x5080
testb %al, %al
je 0x139e4
movq (%rbx), %rdi
callq 0x6780
movq (%rax), %rbx
movq 0x8(%rax), %r14
leaq 0x4af8(%rip), %r15 # 0x18410
leaq 0x4aff(%rip), %r12 # 0x1841e
leaq 0x4afc(%rip), %r13 # 0x18422
leaq 0x4fce(%rip), %rbp # 0x188fb
cmpq %r14, %rbx
je 0x139a3
leaq 0x8(%rsp), %rdi
leaq 0x4ac7(%rip), %rsi # 0x18405
callq 0x5360
movl (%rbx), %esi
movq %rax, %rdi
callq 0x5590
movq %rax, %rdi
movq %r15, %rsi
callq 0x5360
movsbl 0x4(%rbx), %esi
movq %rax, %rdi
callq 0x5420
movq %rax, %rdi
movq %r12, %rsi
callq 0x5360
movq 0x8(%rbx), %rsi
movq %rax, %rdi
callq 0x5270
movq %rax, %rdi
movq %r13, %rsi
callq 0x5360
movq 0x10(%rbx), %rsi
movq %rax, %rdi
callq 0x5270
movq %rax, %rdi
movq %rbp, %rsi
callq 0x5360
addq $0x40, %rbx
jmp 0x1392d
leaq 0x8(%rsp), %rdi
callq 0x5490
movq 0x115e4(%rip), %rdi # 0x24f98
leaq 0x4a6b(%rip), %rsi # 0x18426
callq 0x5360
movq %rax, %rdi
callq 0x5190
leaq 0x8(%rsp), %rdi
callq 0x54e0
addq $0x15a8, %rsp # imm = 0x15A8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
pushq $0x10
popq %rdi
callq 0x51a0
movq %rax, %r14
leaq 0x49cc(%rip), %rsi # 0x183c2
movq %rax, %rdi
callq 0x5130
movq 0x115eb(%rip), %rsi # 0x24ff0
movq 0x11574(%rip), %rdx # 0x24f80
movq %r14, %rdi
callq 0x5580
jmp 0x13a39
movq %rax, %rbx
movq %r14, %rdi
callq 0x52b0
jmp 0x13a3c
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x5ac8
jmp 0x13a46
movq %rax, %rbx
jmp 0x13a46
jmp 0x13a39
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x54e0
movq %rbx, %rdi
callq 0x55b0
|
_ZN6Master10setupShipsEv:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 15A8h
mov rbx, rdi
mov rsi, [rdi]; Settings *
lea rdi, [rsp+15D8h+var_13D0]; this
call _ZN11RandomShipsC2ER8Settings; RandomShips::RandomShips(Settings &)
lea rsi, aMaster; "master"
lea rdi, [rsp+15D8h+var_15D0]
lea rdx, [rsp+15D8h+var_15D1]
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&)
lea rdi, [rsp+15D8h+var_13D0]
lea rsi, [rsp+15D8h+var_15D0]
call _ZN11RandomShips10placeShipsERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; RandomShips::placeShips(std::string const&)
lea rdi, [rsp+15D8h+var_15D0]
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
lea rsi, aGameDataMaster; "../game_data/master_ships.txt"
lea rdi, [rsp+15D8h+var_15D0]
push 20h ; ' '
pop rdx
call __ZNSt14basic_ofstreamIcSt11char_traitsIcEEC1EPKcSt13_Ios_Openmode; std::ofstream::basic_ofstream(char const*,std::_Ios_Openmode)
lea rdi, [rsp+15D8h+var_1560]
call __ZNKSt12__basic_fileIcE7is_openEv; std::__basic_file<char>::is_open(void)
test al, al
jz loc_139E4
mov rdi, [rbx]; this
call _ZNK8Settings14getMasterShipsEv; Settings::getMasterShips(void)
mov rbx, [rax]
mov r14, [rax+8]
lea r15, aOrientation; ",orientation="
lea r12, asc_1841E; ",x="
lea r13, aY; ",y="
lea rbp, aMasterSlaveShi+28h; "\n"
loc_1392D:
cmp rbx, r14
jz short loc_139A3
lea rdi, [rsp+15D8h+var_15D0]
lea rsi, aShipType; "ship_type="
call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*)
mov esi, [rbx]
mov rdi, rax
call __ZNSolsEi; std::ostream::operator<<(int)
mov rdi, rax
mov rsi, r15
call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*)
movsx esi, byte ptr [rbx+4]
mov rdi, rax
call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c; std::operator<<<std::char_traits<char>>(std::ostream &,char)
mov rdi, rax
mov rsi, r12
call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*)
mov rsi, [rbx+8]
mov rdi, rax
call __ZNSo9_M_insertImEERSoT_; std::ostream::_M_insert<ulong>(ulong)
mov rdi, rax
mov rsi, r13
call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*)
mov rsi, [rbx+10h]
mov rdi, rax
call __ZNSo9_M_insertImEERSoT_; std::ostream::_M_insert<ulong>(ulong)
mov rdi, rax
mov rsi, rbp
call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*)
add rbx, 40h ; '@'
jmp short loc_1392D
loc_139A3:
lea rdi, [rsp+15D8h+var_15D0]
call __ZNSt14basic_ofstreamIcSt11char_traitsIcEE5closeEv; std::ofstream::close(void)
mov rdi, cs:_ZSt4cout_ptr
lea rsi, aMasterShipsWri; "Master: Ships written to master_ships.t"...
call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*)
mov rdi, rax
call __ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_; std::endl<char,std::char_traits<char>>(std::ostream &)
lea rdi, [rsp+15D8h+var_15D0]
call __ZNSt14basic_ofstreamIcSt11char_traitsIcEED1Ev; std::ofstream::~ofstream()
add rsp, 15A8h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_139E4:
push 10h
pop rdi; thrown_size
call ___cxa_allocate_exception
mov r14, rax
lea rsi, aMasterSetupshi; "Master::setupShips(): Unable to open ma"...
mov rdi, rax; this
call __ZNSt13runtime_errorC1EPKc; std::runtime_error::runtime_error(char const*)
mov rsi, cs:_ZTISt13runtime_error_ptr; lptinfo
mov rdx, cs:_ZNSt13runtime_errorD1Ev_ptr; void (*)(void *)
mov rdi, r14; void *
call ___cxa_throw
jmp short loc_13A39
mov rbx, rax
mov rdi, r14; void *
call ___cxa_free_exception
jmp short loc_13A3C
mov rbx, rax
lea rdi, [rsp+15D8h+var_15D0]
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
jmp short loc_13A46
mov rbx, rax
jmp short loc_13A46
jmp short $+2
loc_13A39:
mov rbx, rax
loc_13A3C:
lea rdi, [rsp+15D8h+var_15D0]
call __ZNSt14basic_ofstreamIcSt11char_traitsIcEED1Ev; std::ofstream::~ofstream()
loc_13A46:
mov rdi, rbx
call __Unwind_Resume
|
long long Master::setupShips(Settings **this)
{
long long MasterShips; // rax
unsigned int *v2; // rbx
unsigned int *v3; // r14
long long v4; // rax
long long v5; // rax
long long v6; // rax
long long v7; // rax
long long v8; // rax
long long v9; // rax
long long v10; // rax
long long v11; // rax
long long v12; // rax
std::runtime_error *exception; // r14
_QWORD v15[14]; // [rsp+8h] [rbp-15D0h] BYREF
_BYTE v16[400]; // [rsp+78h] [rbp-1560h] BYREF
_BYTE v17[5072]; // [rsp+208h] [rbp-13D0h] BYREF
RandomShips::RandomShips((RandomShips *)v17, *this);
std::string::basic_string<std::allocator<char>>(v15, "master");
RandomShips::placeShips(v17, v15);
std::string::~string();
std::ofstream::basic_ofstream(v15, "../game_data/master_ships.txt", 32LL);
if ( !(unsigned __int8)std::__basic_file<char>::is_open(v16) )
{
exception = (std::runtime_error *)__cxa_allocate_exception(0x10uLL);
std::runtime_error::runtime_error(exception, "Master::setupShips(): Unable to open master_ships.txt for writing.");
__cxa_throw(
exception,
(struct type_info *)&`typeinfo for'std::runtime_error,
(void (*)(void *))&std::runtime_error::~runtime_error);
}
MasterShips = Settings::getMasterShips(*this);
v2 = *(unsigned int **)MasterShips;
v3 = *(unsigned int **)(MasterShips + 8);
while ( v2 != v3 )
{
v4 = std::operator<<<std::char_traits<char>>(v15, "ship_type=");
v5 = std::ostream::operator<<(v4, *v2);
v6 = std::operator<<<std::char_traits<char>>(v5, ",orientation=");
v7 = std::operator<<<std::char_traits<char>>(v6, (unsigned int)*((char *)v2 + 4));
v8 = std::operator<<<std::char_traits<char>>(v7, ",x=");
v9 = std::ostream::_M_insert<unsigned long>(v8, *((_QWORD *)v2 + 1));
v10 = std::operator<<<std::char_traits<char>>(v9, ",y=");
v11 = std::ostream::_M_insert<unsigned long>(v10, *((_QWORD *)v2 + 2));
std::operator<<<std::char_traits<char>>(v11, "\n");
v2 += 16;
}
std::ofstream::close(v15);
v12 = std::operator<<<std::char_traits<char>>(&std::cout, "Master: Ships written to master_ships.txt");
std::endl<char,std::char_traits<char>>(v12);
return std::ofstream::~ofstream(v15);
}
|
setupShips:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x15a8
MOV RBX,RDI
MOV RSI,qword ptr [RDI]
LEA RDI,[RSP + 0x208]
CALL 0x00113f6c
LAB_001138aa:
LEA RSI,[0x1171f8]
LEA RDI,[RSP + 0x8]
LEA RDX,[RSP + 0x7]
CALL 0x00106a32
LAB_001138c0:
LEA RDI,[RSP + 0x208]
LEA RSI,[RSP + 0x8]
CALL 0x00113fde
LAB_001138d2:
LEA RDI,[RSP + 0x8]
CALL 0x00105ac8
LEA RSI,[0x1183a4]
LEA RDI,[RSP + 0x8]
PUSH 0x20
POP RDX
CALL 0x001053c0
LEA RDI,[RSP + 0x78]
CALL 0x00105080
TEST AL,AL
JZ 0x001139e4
MOV RDI,qword ptr [RBX]
LAB_00113905:
CALL 0x00106780
MOV RBX,qword ptr [RAX]
MOV R14,qword ptr [RAX + 0x8]
LEA R15,[0x118410]
LEA R12,[0x11841e]
LEA R13,[0x118422]
LEA RBP,[0x1188fb]
LAB_0011392d:
CMP RBX,R14
JZ 0x001139a3
LAB_00113932:
LEA RDI,[RSP + 0x8]
LEA RSI,[0x118405]
CALL 0x00105360
MOV ESI,dword ptr [RBX]
MOV RDI,RAX
CALL 0x00105590
MOV RDI,RAX
MOV RSI,R15
CALL 0x00105360
MOVSX ESI,byte ptr [RBX + 0x4]
MOV RDI,RAX
CALL 0x00105420
MOV RDI,RAX
MOV RSI,R12
CALL 0x00105360
MOV RSI,qword ptr [RBX + 0x8]
MOV RDI,RAX
CALL 0x00105270
MOV RDI,RAX
MOV RSI,R13
CALL 0x00105360
MOV RSI,qword ptr [RBX + 0x10]
MOV RDI,RAX
CALL 0x00105270
MOV RDI,RAX
MOV RSI,RBP
CALL 0x00105360
ADD RBX,0x40
JMP 0x0011392d
LAB_001139a3:
LEA RDI,[RSP + 0x8]
CALL 0x00105490
MOV RDI,qword ptr [0x00124f98]
LEA RSI,[0x118426]
CALL 0x00105360
MOV RDI,RAX
CALL 0x00105190
LAB_001139c8:
LEA RDI,[RSP + 0x8]
CALL 0x001054e0
ADD RSP,0x15a8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_001139e4:
PUSH 0x10
POP RDI
CALL 0x001051a0
MOV R14,RAX
LAB_001139ef:
LEA RSI,[0x1183c2]
MOV RDI,RAX
CALL 0x00105130
LAB_001139fe:
MOV RSI,qword ptr [0x00124ff0]
MOV RDX,qword ptr [0x00124f80]
MOV RDI,R14
CALL 0x00105580
|
/* Master::setupShips() */
void __thiscall Master::setupShips(Master *this)
{
int *piVar1;
char cVar2;
int8 *puVar3;
ostream *poVar4;
runtime_error *this_00;
int *piVar5;
allocator local_15d1;
string local_15d0 [512];
RandomShips local_13d0 [5024];
RandomShips::RandomShips(local_13d0,*(Settings **)this);
/* try { // try from 001138aa to 001138bf has its CatchHandler @ 00113a32 */
std::__cxx11::string::string<std::allocator<char>>(local_15d0,"master",&local_15d1);
/* try { // try from 001138c0 to 001138d1 has its CatchHandler @ 00113a23 */
RandomShips::placeShips(local_13d0,local_15d0);
std::__cxx11::string::~string(local_15d0);
std::ofstream::ofstream((ofstream *)local_15d0,"../game_data/master_ships.txt",0x20);
cVar2 = std::__basic_file<char>::is_open();
if (cVar2 != '\0') {
/* try { // try from 00113905 to 00113909 has its CatchHandler @ 00113a37 */
puVar3 = (int8 *)Settings::getMasterShips(*(Settings **)this);
piVar1 = (int *)puVar3[1];
for (piVar5 = (int *)*puVar3; piVar5 != piVar1; piVar5 = piVar5 + 0x10) {
/* try { // try from 00113932 to 0011399c has its CatchHandler @ 00113a39 */
poVar4 = std::operator<<((ostream *)local_15d0,"ship_type=");
poVar4 = (ostream *)std::ostream::operator<<(poVar4,*piVar5);
poVar4 = std::operator<<(poVar4,",orientation=");
poVar4 = std::operator<<(poVar4,(char)piVar5[1]);
poVar4 = std::operator<<(poVar4,",x=");
poVar4 = std::ostream::_M_insert<unsigned_long>((ulong)poVar4);
poVar4 = std::operator<<(poVar4,",y=");
poVar4 = std::ostream::_M_insert<unsigned_long>((ulong)poVar4);
std::operator<<(poVar4,"\n");
}
/* try { // try from 001139a3 to 001139c7 has its CatchHandler @ 00113a37 */
std::ofstream::close();
poVar4 = std::operator<<((ostream *)PTR_cout_00124f98,
"Master: Ships written to master_ships.txt");
std::endl<char,std::char_traits<char>>(poVar4);
std::ofstream::~ofstream((ofstream *)local_15d0);
return;
}
this_00 = (runtime_error *)__cxa_allocate_exception(0x10);
/* try { // try from 001139ef to 001139fd has its CatchHandler @ 00113a16 */
std::runtime_error::runtime_error
(this_00,"Master::setupShips(): Unable to open master_ships.txt for writing.");
/* try { // try from 001139fe to 00113a13 has its CatchHandler @ 00113a14 */
/* WARNING: Subroutine does not return */
__cxa_throw(this_00,PTR_typeinfo_00124ff0,PTR__runtime_error_00124f80);
}
|
|
64,266
|
Master::setupShips()
|
666mxvbee[P]BattleShip/lib/Master/Master.cpp
|
void Master::setupShips() {
RandomShips randomShips(settings);
randomShips.placeShips("master");
std::ofstream masterFile("../game_data/master_ships.txt", std::ios::trunc);
if (!masterFile.is_open()) {
throw std::runtime_error("Master::setupShips(): Unable to open master_ships.txt for writing.");
}
const auto& ships = settings.getMasterShips();
for (const auto& ship : ships) {
masterFile << "ship_type=" << ship.len
<< ",orientation=" << ship.orientation
<< ",x=" << ship.x
<< ",y=" << ship.y << "\n";
}
masterFile.close();
std::cout << "Master: Ships written to master_ships.txt" << std::endl;
}
|
O3
|
cpp
|
Master::setupShips():
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x15a8, %rsp # imm = 0x15A8
movq %rdi, %rbx
movq (%rdi), %rsi
leaq 0x208(%rsp), %rdi
callq 0x161c0
leaq 0x18(%rsp), %r14
movq %r14, -0x10(%r14)
leaq 0x48ec(%rip), %rsi # 0x1a1f8
leaq 0x48eb(%rip), %rdx # 0x1a1fe
leaq 0x8(%rsp), %rdi
callq 0x5fea
leaq 0x208(%rsp), %rdi
leaq 0x8(%rsp), %rsi
callq 0x16268
movq 0x8(%rsp), %rdi
cmpq %r14, %rdi
je 0x15946
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x53a0
leaq 0x5a07(%rip), %rsi # 0x1b354
leaq 0x8(%rsp), %rdi
movl $0x20, %edx
callq 0x53e0
leaq 0x78(%rsp), %rdi
callq 0x5080
testb %al, %al
je 0x15ae0
movq (%rbx), %rdi
callq 0x6f64
movq (%rax), %r12
movq 0x8(%rax), %r13
cmpq %r13, %r12
je 0x15a4c
leaq 0x8(%rsp), %r14
leaq 0x5a40(%rip), %rbp # 0x1b3d2
leaq 0x5f7f(%rip), %rbx # 0x1b918
movl $0xa, %edx
movq %r14, %rdi
leaq 0x5a0d(%rip), %rsi # 0x1b3b5
callq 0x5420
movl (%r12), %esi
movq %r14, %rdi
callq 0x55e0
movq %rax, %r15
movl $0xd, %edx
movq %rax, %rdi
leaq 0x59f5(%rip), %rsi # 0x1b3c0
callq 0x5420
movb 0x4(%r12), %al
movb %al, 0x7(%rsp)
movl $0x1, %edx
movq %r15, %rdi
leaq 0x7(%rsp), %rsi
callq 0x5420
movq %rax, %r15
movl $0x3, %edx
movq %rax, %rdi
leaq 0x59d1(%rip), %rsi # 0x1b3ce
callq 0x5420
movq 0x8(%r12), %rsi
movq %r15, %rdi
callq 0x5270
movq %rax, %r15
movl $0x3, %edx
movq %rax, %rdi
movq %rbp, %rsi
callq 0x5420
movq 0x10(%r12), %rsi
movq %r15, %rdi
callq 0x5270
movl $0x1, %edx
movq %rax, %rdi
movq %rbx, %rsi
callq 0x5420
addq $0x40, %r12
cmpq %r13, %r12
jne 0x15999
leaq 0x8(%rsp), %rdi
callq 0x54d0
movq 0xf543(%rip), %rbx # 0x24fa0
leaq 0x5972(%rip), %rsi # 0x1b3d6
movl $0x29, %edx
movq %rbx, %rdi
callq 0x5420
movq (%rbx), %rax
addq -0x18(%rax), %rbx
movq %rbx, %rdi
movl $0xa, %esi
callq 0x5370
movsbl %al, %esi
movq 0xf511(%rip), %rdi # 0x24fa0
callq 0x5040
movq %rax, %rdi
callq 0x5280
movq 0xf4d5(%rip), %rax # 0x24f78
movq (%rax), %rcx
movq 0x18(%rax), %rax
leaq 0x10(%rsp), %rdi
movq %rcx, -0x8(%rdi)
movq -0x18(%rcx), %rcx
movq %rax, 0x8(%rsp,%rcx)
callq 0x5330
leaq 0x100(%rsp), %rdi
callq 0x50f0
addq $0x15a8, %rsp # imm = 0x15A8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl $0x10, %edi
callq 0x51a0
movq %rax, %r14
leaq 0x587e(%rip), %rsi # 0x1b372
movq %rax, %rdi
callq 0x5140
movq 0xf4e5(%rip), %rsi # 0x24fe8
movq 0xf47e(%rip), %rdx # 0x24f88
movq %r14, %rdi
callq 0x55d0
jmp 0x15b44
movq %rax, %rbx
movq %r14, %rdi
callq 0x52c0
jmp 0x15b47
movq %rax, %rbx
movq 0x8(%rsp), %rdi
cmpq %r14, %rdi
je 0x15b51
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x53a0
jmp 0x15b51
movq %rax, %rbx
jmp 0x15b51
jmp 0x15b44
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x5530
movq %rbx, %rdi
callq 0x5600
nop
|
_ZN6Master10setupShipsEv:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 15A8h
mov rbx, rdi
mov rsi, [rdi]; Settings *
lea rdi, [rsp+15D8h+var_13D0]; this
call _ZN11RandomShipsC2ER8Settings; RandomShips::RandomShips(Settings &)
lea r14, [rsp+15D8h+var_15C0]
mov [r14-10h], r14
lea rsi, aMaster; "master"
lea rdx, aMaster+6; ""
lea rdi, [rsp+15D8h+var_15D0]
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 rdi, [rsp+15D8h+var_13D0]
lea rsi, [rsp+15D8h+var_15D0]
call _ZN11RandomShips10placeShipsERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; RandomShips::placeShips(std::string const&)
mov rdi, [rsp+15D8h+var_15D0]; void *
cmp rdi, r14
jz short loc_15946
mov rsi, [rsp+15D8h+var_15C0]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_15946:
lea rsi, aGameDataMaster; "../game_data/master_ships.txt"
lea rdi, [rsp+15D8h+var_15D0]
mov edx, 20h ; ' '
call __ZNSt14basic_ofstreamIcSt11char_traitsIcEEC1EPKcSt13_Ios_Openmode; std::ofstream::basic_ofstream(char const*,std::_Ios_Openmode)
lea rdi, [rsp+15D8h+var_1560]
call __ZNKSt12__basic_fileIcE7is_openEv; std::__basic_file<char>::is_open(void)
test al, al
jz loc_15AE0
mov rdi, [rbx]; this
call _ZNK8Settings14getMasterShipsEv; Settings::getMasterShips(void)
mov r12, [rax]
mov r13, [rax+8]
cmp r12, r13
jz loc_15A4C
lea r14, [rsp+15D8h+var_15D0]
lea rbp, aY; ",y="
lea rbx, aMasterSlaveShi+28h; "\n"
loc_15999:
mov edx, 0Ah
mov rdi, r14
lea rsi, aShipType; "ship_type="
call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long)
mov esi, [r12]
mov rdi, r14
call __ZNSolsEi; std::ostream::operator<<(int)
mov r15, rax
mov edx, 0Dh
mov rdi, rax
lea rsi, aOrientation; ",orientation="
call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long)
mov al, [r12+4]
mov [rsp+15D8h+var_15D1], al
mov edx, 1
mov rdi, r15
lea rsi, [rsp+15D8h+var_15D1]
call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long)
mov r15, rax
mov edx, 3
mov rdi, rax
lea rsi, asc_1B3CE; ",x="
call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long)
mov rsi, [r12+8]
mov rdi, r15
call __ZNSo9_M_insertImEERSoT_; std::ostream::_M_insert<ulong>(ulong)
mov r15, rax
mov edx, 3
mov rdi, rax
mov rsi, rbp
call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long)
mov rsi, [r12+10h]
mov rdi, r15
call __ZNSo9_M_insertImEERSoT_; std::ostream::_M_insert<ulong>(ulong)
mov edx, 1
mov rdi, rax
mov rsi, rbx
call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long)
add r12, 40h ; '@'
cmp r12, r13
jnz loc_15999
loc_15A4C:
lea rdi, [rsp+15D8h+var_15D0]
call __ZNSt14basic_ofstreamIcSt11char_traitsIcEE5closeEv; std::ofstream::close(void)
mov rbx, cs:_ZSt4cout_ptr
lea rsi, aMasterShipsWri; "Master: Ships written to master_ships.t"...
mov edx, 29h ; ')'
mov rdi, rbx
call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long)
mov rax, [rbx]
add rbx, [rax-18h]
mov rdi, rbx
mov esi, 0Ah
call __ZNKSt9basic_iosIcSt11char_traitsIcEE5widenEc; std::ios::widen(char)
movsx esi, al; char
mov rdi, cs:_ZSt4cout_ptr; this
call __ZNSo3putEc; std::ostream::put(char)
mov rdi, rax; this
call __ZNSo5flushEv; std::ostream::flush(void)
mov rax, cs:_ZTTSt14basic_ofstreamIcSt11char_traitsIcEE_ptr
mov rcx, [rax]
mov rax, [rax+18h]
lea rdi, [rsp+15D8h+var_15C8]
mov [rdi-8], rcx
mov rcx, [rcx-18h]
mov [rsp+rcx+15D8h+var_15D0], rax
call __ZNSt13basic_filebufIcSt11char_traitsIcEED2Ev; std::filebuf::~filebuf()
lea rdi, [rsp+15D8h+var_14D8]; this
call __ZNSt8ios_baseD2Ev; std::ios_base::~ios_base()
add rsp, 15A8h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_15AE0:
mov edi, 10h; thrown_size
call ___cxa_allocate_exception
mov r14, rax
lea rsi, aMasterSetupshi; "Master::setupShips(): Unable to open ma"...
mov rdi, rax; this
call __ZNSt13runtime_errorC1EPKc; std::runtime_error::runtime_error(char const*)
mov rsi, cs:_ZTISt13runtime_error_ptr; lptinfo
mov rdx, cs:_ZNSt13runtime_errorD1Ev_ptr; void (*)(void *)
mov rdi, r14; void *
call ___cxa_throw
jmp short loc_15B44
mov rbx, rax
mov rdi, r14; void *
call ___cxa_free_exception
jmp short loc_15B47
mov rbx, rax
mov rdi, [rsp+15D8h+var_15D0]; void *
cmp rdi, r14
jz short loc_15B51
mov rsi, [rsp+15D8h+var_15C0]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_15B51
mov rbx, rax
jmp short loc_15B51
jmp short $+2
loc_15B44:
mov rbx, rax
loc_15B47:
lea rdi, [rsp+15D8h+var_15D0]
call __ZNSt14basic_ofstreamIcSt11char_traitsIcEED1Ev; std::ofstream::~ofstream()
loc_15B51:
mov rdi, rbx
call __Unwind_Resume
|
void Master::setupShips(Settings **this)
{
long long MasterShips; // rax
unsigned int *v2; // r12
unsigned int *v3; // r13
long long v4; // r15
long long v5; // r15
long long v6; // r15
long long v7; // rax
char v8; // al
std::ostream *v9; // rax
void *v10; // rax
std::runtime_error *exception; // r14
char v12; // [rsp+7h] [rbp-15D1h] BYREF
void *v13; // [rsp+8h] [rbp-15D0h] BYREF
_BYTE v14[8]; // [rsp+10h] [rbp-15C8h] BYREF
_QWORD v15[12]; // [rsp+18h] [rbp-15C0h] BYREF
_BYTE v16[136]; // [rsp+78h] [rbp-1560h] BYREF
_BYTE v17[264]; // [rsp+100h] [rbp-14D8h] BYREF
_BYTE v18[5072]; // [rsp+208h] [rbp-13D0h] BYREF
RandomShips::RandomShips((RandomShips *)v18, *this);
v13 = v15;
std::string::_M_construct<char const*>((long long)&v13, "master", (long long)"");
RandomShips::placeShips(v18, &v13);
if ( v13 != v15 )
operator delete(v13, v15[0] + 1LL);
std::ofstream::basic_ofstream(&v13, "../game_data/master_ships.txt", 32LL);
if ( !(unsigned __int8)std::__basic_file<char>::is_open(v16) )
{
exception = (std::runtime_error *)__cxa_allocate_exception(0x10uLL);
std::runtime_error::runtime_error(exception, "Master::setupShips(): Unable to open master_ships.txt for writing.");
__cxa_throw(
exception,
(struct type_info *)&`typeinfo for'std::runtime_error,
(void (*)(void *))&std::runtime_error::~runtime_error);
}
MasterShips = Settings::getMasterShips(*this);
v2 = *(unsigned int **)MasterShips;
v3 = *(unsigned int **)(MasterShips + 8);
if ( *(unsigned int **)MasterShips != v3 )
{
do
{
std::__ostream_insert<char,std::char_traits<char>>(&v13, "ship_type=", 10LL);
v4 = std::ostream::operator<<(&v13, *v2);
std::__ostream_insert<char,std::char_traits<char>>(v4, ",orientation=", 13LL);
v12 = *((_BYTE *)v2 + 4);
v5 = std::__ostream_insert<char,std::char_traits<char>>(v4, &v12, 1LL);
std::__ostream_insert<char,std::char_traits<char>>(v5, ",x=", 3LL);
v6 = std::ostream::_M_insert<unsigned long>(v5, *((_QWORD *)v2 + 1));
std::__ostream_insert<char,std::char_traits<char>>(v6, ",y=", 3LL);
v7 = std::ostream::_M_insert<unsigned long>(v6, *((_QWORD *)v2 + 2));
std::__ostream_insert<char,std::char_traits<char>>(v7, "\n", 1LL);
v2 += 16;
}
while ( v2 != v3 );
}
std::ofstream::close(&v13);
std::__ostream_insert<char,std::char_traits<char>>(&std::cout, "Master: Ships written to master_ships.txt", 41LL);
v8 = std::ios::widen((char *)&std::cout + *(_QWORD *)(std::cout - 24LL), 10LL);
v9 = (std::ostream *)std::ostream::put((std::ostream *)&std::cout, v8);
std::ostream::flush(v9);
v10 = (void *)`VTT for'std::ofstream[3];
v13 = (void *)`VTT for'std::ofstream[0];
*(_QWORD *)&v14[*(_QWORD *)(`VTT for'std::ofstream[0] - 24LL) - 8] = v10;
std::filebuf::~filebuf(v14);
std::ios_base::~ios_base((std::ios_base *)v17);
}
|
setupShips:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x15a8
MOV RBX,RDI
MOV RSI,qword ptr [RDI]
LEA RDI,[RSP + 0x208]
CALL 0x001161c0
LEA R14,[RSP + 0x18]
MOV qword ptr [R14 + -0x10],R14
LAB_00115905:
LEA RSI,[0x11a1f8]
LEA RDX,[0x11a1fe]
LEA RDI,[RSP + 0x8]
CALL 0x00105fea
LAB_0011591d:
LEA RDI,[RSP + 0x208]
LEA RSI,[RSP + 0x8]
CALL 0x00116268
LAB_0011592f:
MOV RDI,qword ptr [RSP + 0x8]
CMP RDI,R14
JZ 0x00115946
MOV RSI,qword ptr [RSP + 0x18]
INC RSI
CALL 0x001053a0
LAB_00115946:
LEA RSI,[0x11b354]
LEA RDI,[RSP + 0x8]
MOV EDX,0x20
CALL 0x001053e0
LEA RDI,[RSP + 0x78]
CALL 0x00105080
TEST AL,AL
JZ 0x00115ae0
MOV RDI,qword ptr [RBX]
LAB_00115971:
CALL 0x00106f64
MOV R12,qword ptr [RAX]
MOV R13,qword ptr [RAX + 0x8]
CMP R12,R13
JZ 0x00115a4c
LEA R14,[RSP + 0x8]
LEA RBP,[0x11b3d2]
LEA RBX,[0x11b918]
LAB_00115999:
MOV EDX,0xa
MOV RDI,R14
LEA RSI,[0x11b3b5]
CALL 0x00105420
MOV ESI,dword ptr [R12]
MOV RDI,R14
CALL 0x001055e0
MOV R15,RAX
MOV EDX,0xd
MOV RDI,RAX
LEA RSI,[0x11b3c0]
CALL 0x00105420
MOV AL,byte ptr [R12 + 0x4]
MOV byte ptr [RSP + 0x7],AL
MOV EDX,0x1
MOV RDI,R15
LEA RSI,[RSP + 0x7]
CALL 0x00105420
MOV R15,RAX
MOV EDX,0x3
MOV RDI,RAX
LEA RSI,[0x11b3ce]
CALL 0x00105420
MOV RSI,qword ptr [R12 + 0x8]
MOV RDI,R15
CALL 0x00105270
MOV R15,RAX
MOV EDX,0x3
MOV RDI,RAX
MOV RSI,RBP
CALL 0x00105420
MOV RSI,qword ptr [R12 + 0x10]
MOV RDI,R15
CALL 0x00105270
MOV EDX,0x1
MOV RDI,RAX
MOV RSI,RBX
CALL 0x00105420
ADD R12,0x40
CMP R12,R13
JNZ 0x00115999
LAB_00115a4c:
LEA RDI,[RSP + 0x8]
CALL 0x001054d0
MOV RBX,qword ptr [0x00124fa0]
LEA RSI,[0x11b3d6]
MOV EDX,0x29
MOV RDI,RBX
CALL 0x00105420
MOV RAX,qword ptr [RBX]
ADD RBX,qword ptr [RAX + -0x18]
MOV RDI,RBX
MOV ESI,0xa
CALL 0x00105370
MOVSX ESI,AL
MOV RDI,qword ptr [0x00124fa0]
CALL 0x00105040
MOV RDI,RAX
CALL 0x00105280
LAB_00115a9c:
MOV RAX,qword ptr [0x00124f78]
MOV RCX,qword ptr [RAX]
MOV RAX,qword ptr [RAX + 0x18]
LEA RDI,[RSP + 0x10]
MOV qword ptr [RDI + -0x8],RCX
MOV RCX,qword ptr [RCX + -0x18]
MOV qword ptr [RSP + RCX*0x1 + 0x8],RAX
CALL 0x00105330
LEA RDI,[RSP + 0x100]
CALL 0x001050f0
ADD RSP,0x15a8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_00115ae0:
MOV EDI,0x10
CALL 0x001051a0
MOV R14,RAX
LAB_00115aed:
LEA RSI,[0x11b372]
MOV RDI,RAX
CALL 0x00105140
LAB_00115afc:
MOV RSI,qword ptr [0x00124fe8]
MOV RDX,qword ptr [0x00124f88]
MOV RDI,R14
CALL 0x001055d0
|
/* Master::setupShips() */
void __thiscall Master::setupShips(Master *this)
{
int *piVar1;
int *puVar2;
char cVar3;
int8 *puVar4;
ostream *poVar5;
runtime_error *this_00;
int *piVar6;
char local_15d1;
long *local_15d0;
filebuf local_15c8 [8];
long local_15c0 [29];
ios_base local_14d8 [264];
RandomShips local_13d0 [5024];
RandomShips::RandomShips(local_13d0,*(Settings **)this);
/* try { // try from 00115905 to 0011591c has its CatchHandler @ 00115b3d */
local_15d0 = local_15c0;
std::__cxx11::string::_M_construct<char_const*>(&local_15d0,"master","");
/* try { // try from 0011591d to 0011592e has its CatchHandler @ 00115b21 */
RandomShips::placeShips(local_13d0,(string *)&local_15d0);
if (local_15d0 != local_15c0) {
operator_delete(local_15d0,local_15c0[0] + 1);
}
std::ofstream::ofstream((ofstream *)&local_15d0,"../game_data/master_ships.txt",0x20);
cVar3 = std::__basic_file<char>::is_open();
if (cVar3 != '\0') {
/* try { // try from 00115971 to 00115975 has its CatchHandler @ 00115b42 */
puVar4 = (int8 *)Settings::getMasterShips(*(Settings **)this);
piVar6 = (int *)*puVar4;
piVar1 = (int *)puVar4[1];
if (piVar6 != piVar1) {
do {
/* try { // try from 00115999 to 00115a3e has its CatchHandler @ 00115b44 */
std::__ostream_insert<char,std::char_traits<char>>((ostream *)&local_15d0,"ship_type=",10);
poVar5 = (ostream *)std::ostream::operator<<((ostream *)&local_15d0,*piVar6);
std::__ostream_insert<char,std::char_traits<char>>(poVar5,",orientation=",0xd);
local_15d1 = (char)piVar6[1];
poVar5 = std::__ostream_insert<char,std::char_traits<char>>(poVar5,&local_15d1,1);
std::__ostream_insert<char,std::char_traits<char>>(poVar5,",x=",3);
poVar5 = std::ostream::_M_insert<unsigned_long>((ulong)poVar5);
std::__ostream_insert<char,std::char_traits<char>>(poVar5,",y=",3);
poVar5 = std::ostream::_M_insert<unsigned_long>((ulong)poVar5);
std::__ostream_insert<char,std::char_traits<char>>(poVar5,"\n",1);
piVar6 = piVar6 + 0x10;
} while (piVar6 != piVar1);
}
/* try { // try from 00115a4c to 00115a9b has its CatchHandler @ 00115b42 */
std::ofstream::close();
puVar2 = PTR_cout_00124fa0;
std::__ostream_insert<char,std::char_traits<char>>
((ostream *)PTR_cout_00124fa0,"Master: Ships written to master_ships.txt",0x29);
std::ios::widen((char)puVar2 + (char)*(int8 *)(*(long *)puVar2 + -0x18));
std::ostream::put((char)PTR_cout_00124fa0);
std::ostream::flush();
local_15d0 = *(long **)PTR_VTT_00124f78;
*(int8 *)(local_15c8 + local_15d0[-3] + -8) = *(int8 *)(PTR_VTT_00124f78 + 0x18);
std::filebuf::~filebuf(local_15c8);
std::ios_base::~ios_base(local_14d8);
return;
}
this_00 = (runtime_error *)__cxa_allocate_exception(0x10);
/* try { // try from 00115aed to 00115afb has its CatchHandler @ 00115b14 */
std::runtime_error::runtime_error
(this_00,"Master::setupShips(): Unable to open master_ships.txt for writing.");
/* try { // try from 00115afc to 00115b11 has its CatchHandler @ 00115b12 */
/* WARNING: Subroutine does not return */
__cxa_throw(this_00,PTR_typeinfo_00124fe8,PTR__runtime_error_00124f88);
}
|
|
64,267
|
my_numcells_eucjp
|
eloqsql/strings/ctype-ujis.c
|
static
size_t my_numcells_eucjp(CHARSET_INFO *cs __attribute__((unused)),
const char *str, const char *str_end)
{
size_t clen;
const uchar *b= (const uchar *) str;
const uchar *e= (const uchar *) str_end;
for (clen= 0; b < e; )
{
if (*b == 0x8E)
{
clen++;
b+= 2;
}
else if (*b == 0x8F)
{
clen+= 2;
b+= 3;
}
else if (*b & 0x80)
{
clen+= 2;
b+= 2;
}
else
{
clen++;
b++;
}
}
return clen;
}
|
O3
|
c
|
my_numcells_eucjp:
cmpq %rdx, %rsi
jae 0xc9a1e
pushq %rbp
movq %rsp, %rbp
xorl %eax, %eax
movzbl (%rsi), %edi
cmpl $0x8e, %edi
je 0xc99f7
cmpl $0x8f, %edi
jne 0xc9a03
movl $0x3, %edi
movl $0x2, %ecx
jmp 0xc9a11
movl $0x2, %edi
movl $0x1, %ecx
jmp 0xc9a11
xorl %ecx, %ecx
testb %dil, %dil
sets %cl
incq %rcx
movq %rcx, %rdi
addq %rcx, %rax
addq %rdi, %rsi
cmpq %rdx, %rsi
jb 0xc99d8
popq %rbp
retq
xorl %eax, %eax
retq
|
my_numcells_eucjp:
cmp rsi, rdx
jnb short loc_C9A1E
push rbp
mov rbp, rsp
xor eax, eax
loc_C99D8:
movzx edi, byte ptr [rsi]
cmp edi, 8Eh
jz short loc_C99F7
cmp edi, 8Fh
jnz short loc_C9A03
mov edi, 3
mov ecx, 2
jmp short loc_C9A11
loc_C99F7:
mov edi, 2
mov ecx, 1
jmp short loc_C9A11
loc_C9A03:
xor ecx, ecx
test dil, dil
sets cl
inc rcx
mov rdi, rcx
loc_C9A11:
add rax, rcx
add rsi, rdi
cmp rsi, rdx
jb short loc_C99D8
pop rbp
retn
loc_C9A1E:
xor eax, eax
retn
|
long long my_numcells_eucjp(long long a1, unsigned __int8 *a2, unsigned long long a3)
{
long long result; // rax
int v4; // edi
long long v5; // rdi
long long v6; // rcx
if ( (unsigned long long)a2 >= a3 )
return 0LL;
result = 0LL;
do
{
v4 = *a2;
if ( v4 == 142 )
{
v5 = 2LL;
v6 = 1LL;
}
else if ( v4 == 143 )
{
v5 = 3LL;
v6 = 2LL;
}
else
{
v6 = ((v4 & 0x80u) != 0) + 1LL;
v5 = v6;
}
result += v6;
a2 += v5;
}
while ( (unsigned long long)a2 < a3 );
return result;
}
|
my_numcells_eucjp:
CMP RSI,RDX
JNC 0x001c9a1e
PUSH RBP
MOV RBP,RSP
XOR EAX,EAX
LAB_001c99d8:
MOVZX EDI,byte ptr [RSI]
CMP EDI,0x8e
JZ 0x001c99f7
CMP EDI,0x8f
JNZ 0x001c9a03
MOV EDI,0x3
MOV ECX,0x2
JMP 0x001c9a11
LAB_001c99f7:
MOV EDI,0x2
MOV ECX,0x1
JMP 0x001c9a11
LAB_001c9a03:
XOR ECX,ECX
TEST DIL,DIL
SETS CL
INC RCX
MOV RDI,RCX
LAB_001c9a11:
ADD RAX,RCX
ADD RSI,RDI
CMP RSI,RDX
JC 0x001c99d8
POP RBP
RET
LAB_001c9a1e:
XOR EAX,EAX
RET
|
long my_numcells_eucjp(int8 param_1,char *param_2,char *param_3)
{
char cVar1;
long lVar2;
long lVar3;
long lVar4;
if (param_2 < param_3) {
lVar2 = 0;
do {
cVar1 = *param_2;
if (cVar1 == -0x72) {
lVar4 = 2;
lVar3 = 1;
}
else if (cVar1 == -0x71) {
lVar3 = 2;
lVar4 = 3;
}
else {
lVar3 = (ulong)(cVar1 < '\0') + 1;
lVar4 = lVar3;
}
lVar2 = lVar2 + lVar3;
param_2 = param_2 + lVar4;
} while (param_2 < param_3);
return lVar2;
}
return 0;
}
|
|
64,268
|
my_b_cache_write
|
eloqsql/mysys/mf_iocache.c
|
int _my_b_cache_write(IO_CACHE *info, const uchar *Buffer, size_t Count)
{
if (Buffer != info->write_buffer)
{
Count= IO_ROUND_DN(Count);
if (!Count)
return 0;
}
if (info->seek_not_done)
{
/*
Whenever a function which operates on IO_CACHE flushes/writes
some part of the IO_CACHE to disk it will set the property
"seek_not_done" to indicate this to other functions operating
on the IO_CACHE.
*/
if (mysql_file_seek(info->file, info->pos_in_file, MY_SEEK_SET,
MYF(info->myflags & MY_WME)) == MY_FILEPOS_ERROR)
{
info->error= -1;
return 1;
}
info->seek_not_done=0;
}
if (mysql_file_write(info->file, Buffer, Count, info->myflags | MY_NABP))
return info->error= -1;
info->pos_in_file+= Count;
return 0;
}
|
O0
|
c
|
my_b_cache_write:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq -0x18(%rbp), %rax
movq -0x10(%rbp), %rcx
cmpq 0x30(%rcx), %rax
je 0xe28a9
movabsq $0xfffff000, %rax # imm = 0xFFFFF000
andq -0x20(%rbp), %rax
movq %rax, -0x20(%rbp)
cmpq $0x0, -0x20(%rbp)
jne 0xe28a7
movl $0x0, -0x4(%rbp)
jmp 0xe2979
jmp 0xe28a9
movq -0x10(%rbp), %rax
cmpl $0x0, 0xe0(%rax)
je 0xe2915
movq -0x10(%rbp), %rax
movl 0xd4(%rax), %edx
movq -0x10(%rbp), %rax
movq (%rax), %rcx
movq -0x10(%rbp), %rax
movq 0xf8(%rax), %r9
andq $0x10, %r9
leaq 0x716ee(%rip), %rdi # 0x153fcb
movl $0x5ef, %esi # imm = 0x5EF
xorl %r8d, %r8d
callq 0xdff80
cmpq $-0x1, %rax
jne 0xe2907
movq -0x10(%rbp), %rax
movl $0xffffffff, 0xe4(%rax) # imm = 0xFFFFFFFF
movl $0x1, -0x4(%rbp)
jmp 0xe2979
movq -0x10(%rbp), %rax
movl $0x0, 0xe0(%rax)
movq -0x10(%rbp), %rax
movl 0xd4(%rax), %edx
movq -0x18(%rbp), %rcx
movq -0x20(%rbp), %r8
movq -0x10(%rbp), %rax
movq 0xf8(%rax), %r9
orq $0x4, %r9
leaq 0x7168e(%rip), %rdi # 0x153fcb
movl $0x5f6, %esi # imm = 0x5F6
callq 0xe1930
cmpq $0x0, %rax
je 0xe2964
movq -0x10(%rbp), %rax
movl $0xffffffff, 0xe4(%rax) # imm = 0xFFFFFFFF
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0xe2979
movq -0x20(%rbp), %rcx
movq -0x10(%rbp), %rax
addq (%rax), %rcx
movq %rcx, (%rax)
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
|
_my_b_cache_write:
push rbp
mov rbp, rsp
sub rsp, 20h
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov [rbp+var_20], rdx
mov rax, [rbp+var_18]
mov rcx, [rbp+var_10]
cmp rax, [rcx+30h]
jz short loc_E28A9
mov rax, 0FFFFF000h
and rax, [rbp+var_20]
mov [rbp+var_20], rax
cmp [rbp+var_20], 0
jnz short loc_E28A7
mov [rbp+var_4], 0
jmp loc_E2979
loc_E28A7:
jmp short $+2
loc_E28A9:
mov rax, [rbp+var_10]
cmp dword ptr [rax+0E0h], 0
jz short loc_E2915
mov rax, [rbp+var_10]
mov edx, [rax+0D4h]
mov rax, [rbp+var_10]
mov rcx, [rax]
mov rax, [rbp+var_10]
mov r9, [rax+0F8h]
and r9, 10h
lea rdi, aWorkspaceLlm4b_35; "/workspace/llm4binary/github2025/eloqsq"...
mov esi, 5EFh
xor r8d, r8d
call inline_mysql_file_seek_6
cmp rax, 0FFFFFFFFFFFFFFFFh
jnz short loc_E2907
mov rax, [rbp+var_10]
mov dword ptr [rax+0E4h], 0FFFFFFFFh
mov [rbp+var_4], 1
jmp short loc_E2979
loc_E2907:
mov rax, [rbp+var_10]
mov dword ptr [rax+0E0h], 0
loc_E2915:
mov rax, [rbp+var_10]
mov edx, [rax+0D4h]
mov rcx, [rbp+var_18]
mov r8, [rbp+var_20]
mov rax, [rbp+var_10]
mov r9, [rax+0F8h]
or r9, 4
lea rdi, aWorkspaceLlm4b_35; "/workspace/llm4binary/github2025/eloqsq"...
mov esi, 5F6h
call inline_mysql_file_write_3
cmp rax, 0
jz short loc_E2964
mov rax, [rbp+var_10]
mov dword ptr [rax+0E4h], 0FFFFFFFFh
mov [rbp+var_4], 0FFFFFFFFh
jmp short loc_E2979
loc_E2964:
mov rcx, [rbp+var_20]
mov rax, [rbp+var_10]
add rcx, [rax]
mov [rax], rcx
mov [rbp+var_4], 0
loc_E2979:
mov eax, [rbp+var_4]
add rsp, 20h
pop rbp
retn
|
long long my_b_cache_write(long long a1, long long a2, long long a3)
{
long long v4; // [rsp+0h] [rbp-20h]
v4 = a3;
if ( a2 == *(_QWORD *)(a1 + 48) || (v4 = (unsigned int)a3 & 0xFFFFF000, (a3 & 0xFFFFF000) != 0) )
{
if ( *(_DWORD *)(a1 + 224) )
{
if ( inline_mysql_file_seek_6(
(long long)"/workspace/llm4binary/github2025/eloqsql/mysys/mf_iocache.c",
0x5EFu,
*(_DWORD *)(a1 + 212),
*(_QWORD *)a1,
0,
*(_QWORD *)(a1 + 248) & 0x10LL) == -1 )
{
*(_DWORD *)(a1 + 228) = -1;
return 1;
}
*(_DWORD *)(a1 + 224) = 0;
}
if ( inline_mysql_file_write_3(
(long long)"/workspace/llm4binary/github2025/eloqsql/mysys/mf_iocache.c",
0x5F6u,
*(_DWORD *)(a1 + 212),
a2,
v4,
*(_QWORD *)(a1 + 248) | 4LL) )
{
*(_DWORD *)(a1 + 228) = -1;
return (unsigned int)-1;
}
else
{
*(_QWORD *)a1 += v4;
return 0;
}
}
else
{
return 0;
}
}
|
_my_b_cache_write:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x20
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x18],RSI
MOV qword ptr [RBP + -0x20],RDX
MOV RAX,qword ptr [RBP + -0x18]
MOV RCX,qword ptr [RBP + -0x10]
CMP RAX,qword ptr [RCX + 0x30]
JZ 0x001e28a9
MOV RAX,0xfffff000
AND RAX,qword ptr [RBP + -0x20]
MOV qword ptr [RBP + -0x20],RAX
CMP qword ptr [RBP + -0x20],0x0
JNZ 0x001e28a7
MOV dword ptr [RBP + -0x4],0x0
JMP 0x001e2979
LAB_001e28a7:
JMP 0x001e28a9
LAB_001e28a9:
MOV RAX,qword ptr [RBP + -0x10]
CMP dword ptr [RAX + 0xe0],0x0
JZ 0x001e2915
MOV RAX,qword ptr [RBP + -0x10]
MOV EDX,dword ptr [RAX + 0xd4]
MOV RAX,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RAX]
MOV RAX,qword ptr [RBP + -0x10]
MOV R9,qword ptr [RAX + 0xf8]
AND R9,0x10
LEA RDI,[0x253fcb]
MOV ESI,0x5ef
XOR R8D,R8D
CALL 0x001dff80
CMP RAX,-0x1
JNZ 0x001e2907
MOV RAX,qword ptr [RBP + -0x10]
MOV dword ptr [RAX + 0xe4],0xffffffff
MOV dword ptr [RBP + -0x4],0x1
JMP 0x001e2979
LAB_001e2907:
MOV RAX,qword ptr [RBP + -0x10]
MOV dword ptr [RAX + 0xe0],0x0
LAB_001e2915:
MOV RAX,qword ptr [RBP + -0x10]
MOV EDX,dword ptr [RAX + 0xd4]
MOV RCX,qword ptr [RBP + -0x18]
MOV R8,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RBP + -0x10]
MOV R9,qword ptr [RAX + 0xf8]
OR R9,0x4
LEA RDI,[0x253fcb]
MOV ESI,0x5f6
CALL 0x001e1930
CMP RAX,0x0
JZ 0x001e2964
MOV RAX,qword ptr [RBP + -0x10]
MOV dword ptr [RAX + 0xe4],0xffffffff
MOV dword ptr [RBP + -0x4],0xffffffff
JMP 0x001e2979
LAB_001e2964:
MOV RCX,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RBP + -0x10]
ADD RCX,qword ptr [RAX]
MOV qword ptr [RAX],RCX
MOV dword ptr [RBP + -0x4],0x0
LAB_001e2979:
MOV EAX,dword ptr [RBP + -0x4]
ADD RSP,0x20
POP RBP
RET
|
int4 _my_b_cache_write(long *param_1,long param_2,ulong param_3)
{
long lVar1;
ulong local_28;
int4 local_c;
local_28 = param_3;
if ((param_2 == param_1[6]) || (local_28 = param_3 & 0xfffff000, local_28 != 0)) {
if ((int)param_1[0x1c] != 0) {
lVar1 = inline_mysql_file_seek
("/workspace/llm4binary/github2025/eloqsql/mysys/mf_iocache.c",0x5ef,
*(int4 *)((long)param_1 + 0xd4),*param_1,0,param_1[0x1f] & 0x10);
if (lVar1 == -1) {
*(int4 *)((long)param_1 + 0xe4) = 0xffffffff;
return 1;
}
*(int4 *)(param_1 + 0x1c) = 0;
}
lVar1 = inline_mysql_file_write
("/workspace/llm4binary/github2025/eloqsql/mysys/mf_iocache.c",0x5f6,
*(int4 *)((long)param_1 + 0xd4),param_2,local_28,param_1[0x1f] | 4);
if (lVar1 == 0) {
*param_1 = local_28 + *param_1;
local_c = 0;
}
else {
*(int4 *)((long)param_1 + 0xe4) = 0xffffffff;
local_c = 0xffffffff;
}
}
else {
local_c = 0;
}
return local_c;
}
|
|
64,269
|
my_b_cache_write
|
eloqsql/mysys/mf_iocache.c
|
int _my_b_cache_write(IO_CACHE *info, const uchar *Buffer, size_t Count)
{
if (Buffer != info->write_buffer)
{
Count= IO_ROUND_DN(Count);
if (!Count)
return 0;
}
if (info->seek_not_done)
{
/*
Whenever a function which operates on IO_CACHE flushes/writes
some part of the IO_CACHE to disk it will set the property
"seek_not_done" to indicate this to other functions operating
on the IO_CACHE.
*/
if (mysql_file_seek(info->file, info->pos_in_file, MY_SEEK_SET,
MYF(info->myflags & MY_WME)) == MY_FILEPOS_ERROR)
{
info->error= -1;
return 1;
}
info->seek_not_done=0;
}
if (mysql_file_write(info->file, Buffer, Count, info->myflags | MY_NABP))
return info->error= -1;
info->pos_in_file+= Count;
return 0;
}
|
O3
|
c
|
my_b_cache_write:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x58, %rsp
movq %rsi, %r15
movq %rdi, %rbx
cmpq %rsi, 0x30(%rdi)
je 0x96ca0
movl $0xfffff000, %eax # imm = 0xFFFFF000
andq %rax, %rdx
je 0x96d73
movq %rdx, -0x30(%rbp)
cmpl $0x0, 0xe0(%rbx)
je 0x96d0f
movl 0xd4(%rbx), %r13d
movq (%rbx), %rax
movq %rax, -0x38(%rbp)
movq 0xf8(%rbx), %r12
andl $0x10, %r12d
leaq 0x2ef343(%rip), %rax # 0x386010
movq (%rax), %rax
leaq -0x80(%rbp), %rdi
movl %r13d, %esi
movl $0x8, %edx
callq *0x158(%rax)
testq %rax, %rax
jne 0x96df4
movl %r13d, %edi
movq -0x38(%rbp), %rsi
xorl %edx, %edx
movq %r12, %rcx
callq 0xa0b40
movq %rax, %r12
cmpq $-0x1, %r12
je 0x96d77
movl $0x0, 0xe0(%rbx)
movl 0xd4(%rbx), %r13d
movq 0xf8(%rbx), %r12
orq $0x4, %r12
leaq 0x2ef2e8(%rip), %rax # 0x386010
movq (%rax), %rax
leaq -0x80(%rbp), %rdi
movl %r13d, %esi
movl $0x7, %edx
callq *0x158(%rax)
testq %rax, %rax
jne 0x96d95
movl %r13d, %edi
movq %r15, %rsi
movq -0x30(%rbp), %r13
movq %r13, %rdx
movq %r12, %rcx
callq 0x2efe4
movq %rax, %r15
testq %r15, %r15
je 0x96d70
movl $0xffffffff, 0xe4(%rbx) # imm = 0xFFFFFFFF
movl $0xffffffff, %eax # imm = 0xFFFFFFFF
jmp 0x96d86
addq %r13, (%rbx)
xorl %eax, %eax
jmp 0x96d86
movl $0xffffffff, 0xe4(%rbx) # imm = 0xFFFFFFFF
movl $0x1, %eax
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r14
leaq 0x2ef271(%rip), %rax # 0x386010
movq (%rax), %rax
leaq 0x453b3(%rip), %rdx # 0xdc15c
movq %r14, %rdi
movq -0x30(%rbp), %rsi
movl $0x5f6, %ecx # imm = 0x5F6
callq *0x210(%rax)
movl %r13d, %edi
movq -0x30(%rbp), %r13
movq %r15, %rsi
movq %r13, %rdx
movq %r12, %rcx
callq 0x2efe4
movq %rax, %r15
xorl %esi, %esi
testq %rax, %rax
cmoveq %r13, %rsi
leaq 0x2ef22d(%rip), %rax # 0x386010
movq (%rax), %rax
movq %r14, %rdi
callq *0x218(%rax)
jmp 0x96d5a
movq %rax, %r14
leaq 0x2ef212(%rip), %rax # 0x386010
movq (%rax), %rax
leaq 0x45354(%rip), %rdx # 0xdc15c
movq %r14, %rdi
xorl %esi, %esi
movl $0x5ef, %ecx # imm = 0x5EF
callq *0x210(%rax)
movl %r13d, %edi
movq -0x38(%rbp), %rsi
xorl %edx, %edx
movq %r12, %rcx
callq 0xa0b40
movq %rax, %r12
leaq 0x2ef1dd(%rip), %rax # 0x386010
movq (%rax), %rax
movq %r14, %rdi
xorl %esi, %esi
callq *0x218(%rax)
jmp 0x96cff
|
_my_b_cache_write:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 58h
mov r15, rsi
mov rbx, rdi
cmp [rdi+30h], rsi
jz short loc_96CA0
mov eax, 0FFFFF000h
and rdx, rax
jz loc_96D73
loc_96CA0:
mov [rbp+var_30], rdx
cmp dword ptr [rbx+0E0h], 0
jz short loc_96D0F
mov r13d, [rbx+0D4h]
mov rax, [rbx]
mov [rbp+var_38], rax
mov r12, [rbx+0F8h]
and r12d, 10h
lea rax, PSI_server
mov rax, [rax]
lea rdi, [rbp+var_80]
mov esi, r13d
mov edx, 8
call qword ptr [rax+158h]
test rax, rax
jnz loc_96DF4
mov edi, r13d
mov rsi, [rbp+var_38]
xor edx, edx
mov rcx, r12
call my_seek
mov r12, rax
loc_96CFF:
cmp r12, 0FFFFFFFFFFFFFFFFh
jz short loc_96D77
mov dword ptr [rbx+0E0h], 0
loc_96D0F:
mov r13d, [rbx+0D4h]
mov r12, [rbx+0F8h]
or r12, 4
lea rax, PSI_server
mov rax, [rax]
lea rdi, [rbp+var_80]
mov esi, r13d
mov edx, 7
call qword ptr [rax+158h]
test rax, rax
jnz short loc_96D95
mov edi, r13d
mov rsi, r15
mov r13, [rbp+var_30]
mov rdx, r13
mov rcx, r12
call my_write
mov r15, rax
loc_96D5A:
test r15, r15
jz short loc_96D70
mov dword ptr [rbx+0E4h], 0FFFFFFFFh
mov eax, 0FFFFFFFFh
jmp short loc_96D86
loc_96D70:
add [rbx], r13
loc_96D73:
xor eax, eax
jmp short loc_96D86
loc_96D77:
mov dword ptr [rbx+0E4h], 0FFFFFFFFh
mov eax, 1
loc_96D86:
add rsp, 58h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_96D95:
mov r14, rax
lea rax, PSI_server
mov rax, [rax]
lea rdx, aWorkspaceLlm4b_21; "/workspace/llm4binary/github2025/eloqsq"...
mov rdi, r14
mov rsi, [rbp+var_30]
mov ecx, 5F6h
call qword ptr [rax+210h]
mov edi, r13d
mov r13, [rbp+var_30]
mov rsi, r15
mov rdx, r13
mov rcx, r12
call my_write
mov r15, rax
xor esi, esi
test rax, rax
cmovz rsi, r13
lea rax, PSI_server
mov rax, [rax]
mov rdi, r14
call qword ptr [rax+218h]
jmp loc_96D5A
loc_96DF4:
mov r14, rax
lea rax, PSI_server
mov rax, [rax]
lea rdx, aWorkspaceLlm4b_21; "/workspace/llm4binary/github2025/eloqsq"...
mov rdi, r14
xor esi, esi
mov ecx, 5EFh
call qword ptr [rax+210h]
mov edi, r13d
mov rsi, [rbp+var_38]
xor edx, edx
mov rcx, r12
call my_seek
mov r12, rax
lea rax, PSI_server
mov rax, [rax]
mov rdi, r14
xor esi, esi
call qword ptr [rax+218h]
jmp loc_96CFF
|
long long my_b_cache_write(long long *a1, long long a2, long long a3)
{
unsigned int v4; // r13d
long long v5; // r12
long long v6; // rax
long long v7; // r12
unsigned int v8; // r13d
long long v9; // r12
long long v10; // rax
unsigned int v11; // edi
long long v12; // r13
long long v13; // r15
long long v15; // r14
unsigned int v16; // edi
long long v17; // rsi
long long v18; // r14
_BYTE v19[72]; // [rsp+0h] [rbp-80h] BYREF
long long v20; // [rsp+48h] [rbp-38h]
long long v21; // [rsp+50h] [rbp-30h]
if ( a1[6] != a2 )
{
a3 = (unsigned int)a3 & 0xFFFFF000;
if ( !a3 )
return 0LL;
}
v21 = a3;
if ( !*((_DWORD *)a1 + 56) )
{
LABEL_8:
v8 = *((_DWORD *)a1 + 53);
v9 = a1[31] | 4;
v10 = ((long long ( *)(_BYTE *, _QWORD, long long))PSI_server[43])(v19, v8, 7LL);
if ( v10 )
{
v15 = v10;
((void ( *)(long long, long long, const char *, long long))PSI_server[66])(
v10,
v21,
"/workspace/llm4binary/github2025/eloqsql/mysys/mf_iocache.c",
1526LL);
v16 = v8;
v12 = v21;
v13 = my_write(v16, a2, v21, v9);
v17 = 0LL;
if ( !v13 )
v17 = v12;
((void ( *)(long long, long long))PSI_server[67])(v15, v17);
}
else
{
v11 = v8;
v12 = v21;
v13 = my_write(v11, a2, v21, v9);
}
if ( v13 )
{
*((_DWORD *)a1 + 57) = -1;
return 0xFFFFFFFFLL;
}
*a1 += v12;
return 0LL;
}
v4 = *((_DWORD *)a1 + 53);
v20 = *a1;
v5 = a1[31] & 0x10;
v6 = ((long long ( *)(_BYTE *, _QWORD, long long))PSI_server[43])(v19, v4, 8LL);
if ( v6 )
{
v18 = v6;
((void ( *)(long long, _QWORD, const char *, long long))PSI_server[66])(
v6,
0LL,
"/workspace/llm4binary/github2025/eloqsql/mysys/mf_iocache.c",
1519LL);
v7 = my_seek(v4, v20, 0LL, v5);
((void ( *)(long long, _QWORD))PSI_server[67])(v18, 0LL);
}
else
{
v7 = my_seek(v4, v20, 0LL, v5);
}
if ( v7 != -1 )
{
*((_DWORD *)a1 + 56) = 0;
goto LABEL_8;
}
*((_DWORD *)a1 + 57) = -1;
return 1LL;
}
|
_my_b_cache_write:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x58
MOV R15,RSI
MOV RBX,RDI
CMP qword ptr [RDI + 0x30],RSI
JZ 0x00196ca0
MOV EAX,0xfffff000
AND RDX,RAX
JZ 0x00196d73
LAB_00196ca0:
MOV qword ptr [RBP + -0x30],RDX
CMP dword ptr [RBX + 0xe0],0x0
JZ 0x00196d0f
MOV R13D,dword ptr [RBX + 0xd4]
MOV RAX,qword ptr [RBX]
MOV qword ptr [RBP + -0x38],RAX
MOV R12,qword ptr [RBX + 0xf8]
AND R12D,0x10
LEA RAX,[0x486010]
MOV RAX,qword ptr [RAX]
LEA RDI,[RBP + -0x80]
MOV ESI,R13D
MOV EDX,0x8
CALL qword ptr [RAX + 0x158]
TEST RAX,RAX
JNZ 0x00196df4
MOV EDI,R13D
MOV RSI,qword ptr [RBP + -0x38]
XOR EDX,EDX
MOV RCX,R12
CALL 0x001a0b40
MOV R12,RAX
LAB_00196cff:
CMP R12,-0x1
JZ 0x00196d77
MOV dword ptr [RBX + 0xe0],0x0
LAB_00196d0f:
MOV R13D,dword ptr [RBX + 0xd4]
MOV R12,qword ptr [RBX + 0xf8]
OR R12,0x4
LEA RAX,[0x486010]
MOV RAX,qword ptr [RAX]
LEA RDI,[RBP + -0x80]
MOV ESI,R13D
MOV EDX,0x7
CALL qword ptr [RAX + 0x158]
TEST RAX,RAX
JNZ 0x00196d95
MOV EDI,R13D
MOV RSI,R15
MOV R13,qword ptr [RBP + -0x30]
MOV RDX,R13
MOV RCX,R12
CALL 0x0012efe4
MOV R15,RAX
LAB_00196d5a:
TEST R15,R15
JZ 0x00196d70
MOV dword ptr [RBX + 0xe4],0xffffffff
MOV EAX,0xffffffff
JMP 0x00196d86
LAB_00196d70:
ADD qword ptr [RBX],R13
LAB_00196d73:
XOR EAX,EAX
JMP 0x00196d86
LAB_00196d77:
MOV dword ptr [RBX + 0xe4],0xffffffff
MOV EAX,0x1
LAB_00196d86:
ADD RSP,0x58
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_00196d95:
MOV R14,RAX
LEA RAX,[0x486010]
MOV RAX,qword ptr [RAX]
LEA RDX,[0x1dc15c]
MOV RDI,R14
MOV RSI,qword ptr [RBP + -0x30]
MOV ECX,0x5f6
CALL qword ptr [RAX + 0x210]
MOV EDI,R13D
MOV R13,qword ptr [RBP + -0x30]
MOV RSI,R15
MOV RDX,R13
MOV RCX,R12
CALL 0x0012efe4
MOV R15,RAX
XOR ESI,ESI
TEST RAX,RAX
CMOVZ RSI,R13
LEA RAX,[0x486010]
MOV RAX,qword ptr [RAX]
MOV RDI,R14
CALL qword ptr [RAX + 0x218]
JMP 0x00196d5a
LAB_00196df4:
MOV R14,RAX
LEA RAX,[0x486010]
MOV RAX,qword ptr [RAX]
LEA RDX,[0x1dc15c]
MOV RDI,R14
XOR ESI,ESI
MOV ECX,0x5ef
CALL qword ptr [RAX + 0x210]
MOV EDI,R13D
MOV RSI,qword ptr [RBP + -0x38]
XOR EDX,EDX
MOV RCX,R12
CALL 0x001a0b40
MOV R12,RAX
LEA RAX,[0x486010]
MOV RAX,qword ptr [RAX]
MOV RDI,R14
XOR ESI,ESI
CALL qword ptr [RAX + 0x218]
JMP 0x00196cff
|
int8 _my_b_cache_write(long *param_1,long param_2,ulong param_3)
{
int4 uVar1;
long lVar2;
long lVar3;
ulong uVar4;
uint uVar5;
ulong uVar6;
int1 local_88 [72];
long local_40;
ulong local_38;
if ((param_1[6] == param_2) || (param_3 = param_3 & 0xfffff000, param_3 != 0)) {
local_38 = param_3;
if ((int)param_1[0x1c] != 0) {
uVar1 = *(int4 *)((long)param_1 + 0xd4);
local_40 = *param_1;
uVar5 = (uint)param_1[0x1f] & 0x10;
lVar2 = (**(code **)(PSI_server + 0x158))(local_88,uVar1,8);
if (lVar2 == 0) {
lVar3 = my_seek(uVar1,local_40,0,uVar5);
}
else {
(**(code **)(PSI_server + 0x210))
(lVar2,0,"/workspace/llm4binary/github2025/eloqsql/mysys/mf_iocache.c",0x5ef);
lVar3 = my_seek(uVar1,local_40,0,uVar5);
(**(code **)(PSI_server + 0x218))(lVar2,0);
}
if (lVar3 == -1) {
*(int4 *)((long)param_1 + 0xe4) = 0xffffffff;
return 1;
}
*(int4 *)(param_1 + 0x1c) = 0;
}
uVar1 = *(int4 *)((long)param_1 + 0xd4);
uVar4 = param_1[0x1f];
lVar2 = (**(code **)(PSI_server + 0x158))(local_88,uVar1,7);
uVar6 = local_38;
if (lVar2 == 0) {
lVar3 = my_write(uVar1,param_2,local_38,uVar4 | 4);
}
else {
(**(code **)(PSI_server + 0x210))
(lVar2,local_38,"/workspace/llm4binary/github2025/eloqsql/mysys/mf_iocache.c",0x5f6)
;
uVar6 = local_38;
lVar3 = my_write(uVar1,param_2,local_38,uVar4 | 4);
uVar4 = 0;
if (lVar3 == 0) {
uVar4 = uVar6;
}
(**(code **)(PSI_server + 0x218))(lVar2,uVar4);
}
if (lVar3 != 0) {
*(int4 *)((long)param_1 + 0xe4) = 0xffffffff;
return 0xffffffff;
}
*param_1 = *param_1 + uVar6;
}
return 0;
}
|
|
64,270
|
ma_alloc_buffer
|
eloqsql/storage/maria/ma_open.c
|
my_bool _ma_alloc_buffer(uchar **old_addr, size_t *old_size,
size_t new_size, myf flag)
{
if (*old_size < new_size)
{
uchar *addr;
if (!(addr= (uchar*) my_realloc(PSI_INSTRUMENT_ME, *old_addr, new_size,
MYF(MY_ALLOW_ZERO_PTR | flag))))
return 1;
*old_addr= addr;
*old_size= new_size;
}
return 0;
}
|
O0
|
c
|
ma_alloc_buffer:
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 -0x18(%rbp), %rax
movq (%rax), %rax
cmpq -0x20(%rbp), %rax
jae 0x8fdf5
movq -0x10(%rbp), %rax
movq (%rax), %rsi
movq -0x20(%rbp), %rdx
movq -0x28(%rbp), %rcx
orq $0x40, %rcx
xorl %edi, %edi
callq 0xf39d0
movq %rax, -0x30(%rbp)
cmpq $0x0, %rax
jne 0x8fddf
movb $0x1, -0x1(%rbp)
jmp 0x8fdf9
movq -0x30(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, (%rax)
movq -0x20(%rbp), %rcx
movq -0x18(%rbp), %rax
movq %rcx, (%rax)
movb $0x0, -0x1(%rbp)
movb -0x1(%rbp), %al
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
|
_ma_alloc_buffer:
push rbp
mov rbp, rsp
sub rsp, 30h
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov [rbp+var_20], rdx
mov [rbp+var_28], rcx
mov rax, [rbp+var_18]
mov rax, [rax]
cmp rax, [rbp+var_20]
jnb short loc_8FDF5
mov rax, [rbp+var_10]
mov rsi, [rax]
mov rdx, [rbp+var_20]
mov rcx, [rbp+var_28]
or rcx, 40h
xor edi, edi
call my_realloc
mov [rbp+var_30], rax
cmp rax, 0
jnz short loc_8FDDF
mov [rbp+var_1], 1
jmp short loc_8FDF9
loc_8FDDF:
mov rcx, [rbp+var_30]
mov rax, [rbp+var_10]
mov [rax], rcx
mov rcx, [rbp+var_20]
mov rax, [rbp+var_18]
mov [rax], rcx
loc_8FDF5:
mov [rbp+var_1], 0
loc_8FDF9:
mov al, [rbp+var_1]
add rsp, 30h
pop rbp
retn
|
char ma_alloc_buffer(long long *a1, unsigned long long *a2, unsigned long long a3, long long a4)
{
long long v5; // [rsp+0h] [rbp-30h]
if ( *a2 >= a3 )
return 0;
v5 = my_realloc(0LL, *a1, a3, a4 | 0x40);
if ( v5 )
{
*a1 = v5;
*a2 = a3;
return 0;
}
return 1;
}
|
_ma_alloc_buffer:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x30
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x18],RSI
MOV qword ptr [RBP + -0x20],RDX
MOV qword ptr [RBP + -0x28],RCX
MOV RAX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RAX]
CMP RAX,qword ptr [RBP + -0x20]
JNC 0x0018fdf5
MOV RAX,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RAX]
MOV RDX,qword ptr [RBP + -0x20]
MOV RCX,qword ptr [RBP + -0x28]
OR RCX,0x40
XOR EDI,EDI
CALL 0x001f39d0
MOV qword ptr [RBP + -0x30],RAX
CMP RAX,0x0
JNZ 0x0018fddf
MOV byte ptr [RBP + -0x1],0x1
JMP 0x0018fdf9
LAB_0018fddf:
MOV RCX,qword ptr [RBP + -0x30]
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RAX],RCX
MOV RCX,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RAX],RCX
LAB_0018fdf5:
MOV byte ptr [RBP + -0x1],0x0
LAB_0018fdf9:
MOV AL,byte ptr [RBP + -0x1]
ADD RSP,0x30
POP RBP
RET
|
int1 _ma_alloc_buffer(long *param_1,ulong *param_2,ulong param_3,ulong param_4)
{
long lVar1;
if (*param_2 < param_3) {
lVar1 = my_realloc(0,*param_1,param_3,param_4 | 0x40);
if (lVar1 == 0) {
return 1;
}
*param_1 = lVar1;
*param_2 = param_3;
}
return 0;
}
|
|
64,271
|
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 0x9389d(%rip), %rax # 0x12df00
addq $0x10, %rax
movq %rax, (%rdi)
movq 0x30(%rdi), %rdi
leaq 0x40(%rbx), %rax
cmpq %rax, %rdi
je 0x9a682
movq (%rax), %rsi
incq %rsi
callq 0x1b8f0
leaq 0x92c6f(%rip), %rax # 0x12d2f8
addq $0x10, %rax
movq %rax, (%rbx)
movq 0x18(%rbx), %rdi
testq %rdi, %rdi
je 0x9a69e
callq 0x6e1aa
movl $0x50, %esi
movq %rbx, %rdi
popq %rbx
jmp 0x1b8f0
|
_ZN5minja17TextTemplateTokenD0Ev:
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_9A682
mov rsi, [rax]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_9A682:
lea rax, _ZTVN5minja13TemplateTokenE; `vtable for'minja::TemplateToken
add rax, 10h
mov [rbx], rax
mov rdi, [rbx+18h]
test rdi, rdi
jz short loc_9A69E
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_9A69E:
mov esi, 50h ; 'P'; unsigned __int64
mov rdi, rbx; void *
pop rbx
jmp __ZdlPvm; operator delete(void *,ulong)
|
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);
operator delete(this, 0x50uLL);
}
|
~TextTemplateToken:
PUSH RBX
MOV RBX,RDI
LEA RAX,[0x22df00]
ADD RAX,0x10
MOV qword ptr [RDI],RAX
MOV RDI,qword ptr [RDI + 0x30]
LEA RAX,[RBX + 0x40]
CMP RDI,RAX
JZ 0x0019a682
MOV RSI,qword ptr [RAX]
INC RSI
CALL 0x0011b8f0
LAB_0019a682:
LEA RAX,[0x22d2f8]
ADD RAX,0x10
MOV qword ptr [RBX],RAX
MOV RDI,qword ptr [RBX + 0x18]
TEST RDI,RDI
JZ 0x0019a69e
CALL 0x0016e1aa
LAB_0019a69e:
MOV ESI,0x50
MOV RDI,RBX
POP RBX
JMP 0x0011b8f0
|
/* minja::TextTemplateToken::~TextTemplateToken() */
void __thiscall minja::TextTemplateToken::~TextTemplateToken(TextTemplateToken *this)
{
*(int ***)this = &PTR__TextTemplateToken_0022df10;
if (*(TextTemplateToken **)(this + 0x30) != this + 0x40) {
operator_delete(*(TextTemplateToken **)(this + 0x30),*(long *)(this + 0x40) + 1);
}
*(int ***)this = &PTR__TemplateToken_0022d308;
if (*(_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> **)(this + 0x18) !=
(_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) {
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release
(*(_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> **)(this + 0x18));
}
operator_delete(this,0x50);
return;
}
|
|
64,272
|
translog_get_sent_to_disk
|
eloqsql/storage/maria/ma_loghandler.c
|
static LSN translog_get_sent_to_disk()
{
register LSN lsn;
DBUG_ENTER("translog_get_sent_to_disk");
mysql_mutex_lock(&log_descriptor.sent_to_disk_lock);
lsn= log_descriptor.sent_to_disk;
DBUG_PRINT("info", ("sent to disk up to " LSN_FMT, LSN_IN_PARTS(lsn)));
mysql_mutex_unlock(&log_descriptor.sent_to_disk_lock);
DBUG_RETURN(lsn);
}
|
O3
|
c
|
translog_get_sent_to_disk:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
cmpq $0x0, 0xbaf746(%rip) # 0xbff4c0
jne 0x4fdb1
leaq 0xbaf6fd(%rip), %rdi # 0xbff480
callq 0x29220
movq 0xbaf6d1(%rip), %rbx # 0xbff460
movq 0xbaf72a(%rip), %rdi # 0xbff4c0
testq %rdi, %rdi
jne 0x4fdb8
leaq 0xbaf6de(%rip), %rdi # 0xbff480
callq 0x291e0
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
callq 0x2ceeb
jmp 0x4fd88
leaq 0x336251(%rip), %rax # 0x386010
movq (%rax), %rax
callq *0x160(%rax)
jmp 0x4fd9b
|
translog_get_sent_to_disk:
push rbp
mov rbp, rsp
push rbx
push rax
cmp cs:qword_BFF4C0, 0
jnz short loc_4FDB1
lea rdi, unk_BFF480
call _pthread_mutex_lock
loc_4FD88:
mov rbx, cs:qword_BFF460
mov rdi, cs:qword_BFF4C0
test rdi, rdi
jnz short loc_4FDB8
loc_4FD9B:
lea rdi, unk_BFF480
call _pthread_mutex_unlock
mov rax, rbx
add rsp, 8
pop rbx
pop rbp
retn
loc_4FDB1:
call translog_get_sent_to_disk_cold_1
jmp short loc_4FD88
loc_4FDB8:
lea rax, PSI_server
mov rax, [rax]
call qword ptr [rax+160h]
jmp short loc_4FD9B
|
long long translog_get_sent_to_disk(long long a1)
{
long long v1; // rbx
if ( qword_BFF4C0 )
translog_get_sent_to_disk_cold_1(a1);
else
pthread_mutex_lock(&unk_BFF480);
v1 = qword_BFF460;
if ( qword_BFF4C0 )
((void ( *)(long long))PSI_server[44])(qword_BFF4C0);
pthread_mutex_unlock(&unk_BFF480);
return v1;
}
|
translog_get_sent_to_disk:
PUSH RBP
MOV RBP,RSP
PUSH RBX
PUSH RAX
CMP qword ptr [0x00cff4c0],0x0
JNZ 0x0014fdb1
LEA RDI,[0xcff480]
CALL 0x00129220
LAB_0014fd88:
MOV RBX,qword ptr [0x00cff460]
MOV RDI,qword ptr [0x00cff4c0]
TEST RDI,RDI
JNZ 0x0014fdb8
LAB_0014fd9b:
LEA RDI,[0xcff480]
CALL 0x001291e0
MOV RAX,RBX
ADD RSP,0x8
POP RBX
POP RBP
RET
LAB_0014fdb1:
CALL 0x0012ceeb
JMP 0x0014fd88
LAB_0014fdb8:
LEA RAX,[0x486010]
MOV RAX,qword ptr [RAX]
CALL qword ptr [RAX + 0x160]
JMP 0x0014fd9b
|
int8 translog_get_sent_to_disk(void)
{
int8 uVar1;
if (DAT_00cff4c0 == 0) {
pthread_mutex_lock((pthread_mutex_t *)&DAT_00cff480);
}
else {
translog_get_sent_to_disk_cold_1();
}
uVar1 = DAT_00cff460;
if (DAT_00cff4c0 != 0) {
(**(code **)(PSI_server + 0x160))();
}
pthread_mutex_unlock((pthread_mutex_t *)&DAT_00cff480);
return uVar1;
}
|
|
64,273
|
init_stage_class(unsigned int)
|
eloqsql/storage/perfschema/pfs_instr_class.cc
|
int init_stage_class(uint stage_class_sizing)
{
int result= 0;
stage_class_dirty_count= stage_class_allocated_count= 0;
stage_class_max= stage_class_sizing;
stage_class_lost= 0;
if (stage_class_max > 0)
{
stage_class_array= PFS_MALLOC_ARRAY(& builtin_memory_stage_class,
stage_class_max,
sizeof(PFS_stage_class), PFS_stage_class,
MYF(MY_ZEROFILL));
if (unlikely(stage_class_array == NULL))
return 1;
}
else
stage_class_array= NULL;
return result;
}
|
O0
|
cpp
|
init_stage_class(unsigned int):
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movl %edi, -0x8(%rbp)
movl $0x0, -0xc(%rbp)
movl $0x0, 0x3cac70(%rip) # 0x40ce5c
movl $0x0, 0x3cac6a(%rip) # 0x40ce60
movl -0x8(%rbp), %eax
movq %rax, 0x3ca3d0(%rip) # 0x40c5d0
movq $0x0, 0x3ca3cd(%rip) # 0x40c5d8
cmpq $0x0, 0x3ca3bd(%rip) # 0x40c5d0
jbe 0x42259
movq 0x3ca3b4(%rip), %rsi # 0x40c5d0
leaq 0x3c7a5d(%rip), %rdi # 0x409c80
movl $0x100, %edx # imm = 0x100
movl $0x20, %ecx
callq 0x29b30
movq %rax, 0x3cac2f(%rip) # 0x40ce68
cmpq $0x0, 0x3cac27(%rip) # 0x40ce68
sete %al
andb $0x1, %al
movzbl %al, %eax
cmpl $0x0, %eax
je 0x42257
movl $0x1, -0x4(%rbp)
jmp 0x4226a
jmp 0x42264
movq $0x0, 0x3cac04(%rip) # 0x40ce68
movl -0xc(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
|
_Z16init_stage_classj:
push rbp
mov rbp, rsp
sub rsp, 10h
mov [rbp+var_8], edi
mov [rbp+var_C], 0
mov cs:_ZL27stage_class_allocated_count, 0; stage_class_allocated_count
mov cs:_ZL23stage_class_dirty_count, 0; stage_class_dirty_count
mov eax, [rbp+var_8]
mov cs:stage_class_max, rax
mov cs:stage_class_lost, 0
cmp cs:stage_class_max, 0
jbe short loc_42259
mov rsi, cs:stage_class_max; unsigned __int64
lea rdi, builtin_memory_stage_class; PFS_builtin_memory_class *
mov edx, 100h; unsigned __int64
mov ecx, 20h ; ' '; unsigned __int64
call _Z16pfs_malloc_arrayP24PFS_builtin_memory_classmmm; pfs_malloc_array(PFS_builtin_memory_class *,ulong,ulong,ulong)
mov cs:_ZL17stage_class_array, rax; stage_class_array
cmp cs:_ZL17stage_class_array, 0; stage_class_array
setz al
and al, 1
movzx eax, al
cmp eax, 0
jz short loc_42257
mov [rbp+var_4], 1
jmp short loc_4226A
loc_42257:
jmp short loc_42264
loc_42259:
mov cs:_ZL17stage_class_array, 0; stage_class_array
loc_42264:
mov eax, [rbp+var_C]
mov [rbp+var_4], eax
loc_4226A:
mov eax, [rbp+var_4]
add rsp, 10h
pop rbp
retn
|
_BOOL8 init_stage_class(unsigned int a1)
{
stage_class_allocated_count = 0;
stage_class_dirty_count = 0;
stage_class_max = a1;
stage_class_lost = 0LL;
if ( !a1 )
{
stage_class_array = 0LL;
return 0;
}
stage_class_array = pfs_malloc_array(
(PFS_builtin_memory_class *)&builtin_memory_stage_class,
stage_class_max,
0x100uLL);
return !stage_class_array;
}
|
init_stage_class:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x10
MOV dword ptr [RBP + -0x8],EDI
MOV dword ptr [RBP + -0xc],0x0
MOV dword ptr [0x0050ce5c],0x0
MOV dword ptr [0x0050ce60],0x0
MOV EAX,dword ptr [RBP + -0x8]
MOV qword ptr [0x0050c5d0],RAX
MOV qword ptr [0x0050c5d8],0x0
CMP qword ptr [0x0050c5d0],0x0
JBE 0x00142259
MOV RSI,qword ptr [0x0050c5d0]
LEA RDI,[0x509c80]
MOV EDX,0x100
MOV ECX,0x20
CALL 0x00129b30
MOV qword ptr [0x0050ce68],RAX
CMP qword ptr [0x0050ce68],0x0
SETZ AL
AND AL,0x1
MOVZX EAX,AL
CMP EAX,0x0
JZ 0x00142257
MOV dword ptr [RBP + -0x4],0x1
JMP 0x0014226a
LAB_00142257:
JMP 0x00142264
LAB_00142259:
MOV qword ptr [0x0050ce68],0x0
LAB_00142264:
MOV EAX,dword ptr [RBP + -0xc]
MOV dword ptr [RBP + -0x4],EAX
LAB_0014226a:
MOV EAX,dword ptr [RBP + -0x4]
ADD RSP,0x10
POP RBP
RET
|
/* init_stage_class(unsigned int) */
int4 init_stage_class(uint param_1)
{
stage_class_allocated_count = 0;
stage_class_dirty_count = 0;
stage_class_max = (ulong)param_1;
stage_class_lost = 0;
if (stage_class_max == 0) {
stage_class_array = 0;
}
else {
stage_class_array =
pfs_malloc_array((PFS_builtin_memory_class *)builtin_memory_stage_class,stage_class_max,
0x100,0x20);
if (stage_class_array == 0) {
return 1;
}
}
return 0;
}
|
|
64,274
|
ggml_soft_max_ext_back
|
ngxson[P]ggml-easy/ggml/src/ggml.c
|
struct ggml_tensor * ggml_soft_max_ext_back(
struct ggml_context * ctx,
struct ggml_tensor * a,
struct ggml_tensor * b,
float scale,
float max_bias) {
return ggml_soft_max_ext_back_impl(ctx, a, b, scale, max_bias, false);
}
|
O3
|
c
|
ggml_soft_max_ext_back:
pushq %r14
pushq %rbx
pushq %rax
movss %xmm1, 0x4(%rsp)
movss %xmm0, (%rsp)
movq %rdx, %rbx
movq %rsi, %r14
movl (%rsi), %esi
leaq 0x10(%r14), %rcx
movl $0x4, %edx
xorl %r8d, %r8d
xorl %r9d, %r9d
callq 0x19c13
movl $0x2c, 0x50(%rax)
movq %r14, 0x98(%rax)
movq %rbx, 0xa0(%rax)
movss (%rsp), %xmm0
movss %xmm0, 0x54(%rax)
movss 0x4(%rsp), %xmm0
movss %xmm0, 0x58(%rax)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
|
ggml_soft_max_ext_back:
push r14
push rbx
push rax
movss [rsp+18h+var_14], xmm1
movss [rsp+18h+var_18], xmm0
mov rbx, rdx
mov r14, rsi
mov esi, [rsi]
lea rcx, [r14+10h]
mov edx, 4
xor r8d, r8d
xor r9d, r9d
call ggml_new_tensor_impl
mov dword ptr [rax+50h], 2Ch ; ','
mov [rax+98h], r14
mov [rax+0A0h], rbx
movss xmm0, [rsp+18h+var_18]
movss dword ptr [rax+54h], xmm0
movss xmm0, [rsp+18h+var_14]
movss dword ptr [rax+58h], xmm0
add rsp, 8
pop rbx
pop r14
retn
|
long long ggml_soft_max_ext_back(long long a1, long long a2, long long a3, float a4, float a5)
{
long long result; // rax
result = ggml_new_tensor_impl(a1, *(_DWORD *)a2, 4u, (_QWORD *)(a2 + 16), 0LL, 0LL);
*(_DWORD *)(result + 80) = 44;
*(_QWORD *)(result + 152) = a2;
*(_QWORD *)(result + 160) = a3;
*(float *)(result + 84) = a4;
*(float *)(result + 88) = a5;
return result;
}
|
ggml_soft_max_ext_back:
PUSH R14
PUSH RBX
PUSH RAX
MOVSS dword ptr [RSP + 0x4],XMM1
MOVSS dword ptr [RSP],XMM0
MOV RBX,RDX
MOV R14,RSI
MOV ESI,dword ptr [RSI]
LEA RCX,[R14 + 0x10]
MOV EDX,0x4
XOR R8D,R8D
XOR R9D,R9D
CALL 0x00119c13
MOV dword ptr [RAX + 0x50],0x2c
MOV qword ptr [RAX + 0x98],R14
MOV qword ptr [RAX + 0xa0],RBX
MOVSS XMM0,dword ptr [RSP]
MOVSS dword ptr [RAX + 0x54],XMM0
MOVSS XMM0,dword ptr [RSP + 0x4]
MOVSS dword ptr [RAX + 0x58],XMM0
ADD RSP,0x8
POP RBX
POP R14
RET
|
void ggml_soft_max_ext_back
(int4 param_1,int4 param_2,int8 param_3,int4 *param_4,
int8 param_5)
{
long lVar1;
lVar1 = ggml_new_tensor_impl(param_3,*param_4,4,param_4 + 4,0,0);
*(int4 *)(lVar1 + 0x50) = 0x2c;
*(int4 **)(lVar1 + 0x98) = param_4;
*(int8 *)(lVar1 + 0xa0) = param_5;
*(int4 *)(lVar1 + 0x54) = param_1;
*(int4 *)(lVar1 + 0x58) = param_2;
return;
}
|
|
64,275
|
ma_get_indicator
|
eloqsql/libmariadb/libmariadb/mariadb_stmt.c
|
static signed char ma_get_indicator(MYSQL_STMT *stmt, unsigned int param_nr, unsigned long row_nr)
{
if (!MARIADB_STMT_BULK_SUPPORTED(stmt) ||
!stmt->array_size ||
!stmt->params[param_nr].u.indicator)
return 0;
if (stmt->param_callback)
return *stmt->params[param_nr].u.indicator;
if (stmt->row_size)
return *((char *)stmt->params[param_nr].u.indicator + (row_nr * stmt->row_size));
return stmt->params[param_nr].u.indicator[row_nr];
}
|
O0
|
c
|
ma_get_indicator:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movq %rdx, -0x20(%rbp)
movq -0x10(%rbp), %rax
cmpq $0x0, 0x38(%rax)
je 0x2b246
movq -0x10(%rbp), %rax
movq 0x38(%rax), %rax
movq 0x370(%rax), %rax
andq $0x1, %rax
cmpq $0x0, %rax
jne 0x2b246
movq -0x10(%rbp), %rax
movq 0x38(%rax), %rax
movq 0x4f0(%rax), %rax
movq 0x70(%rax), %rax
andq $0x4, %rax
cmpq $0x0, %rax
je 0x2b246
movq -0x10(%rbp), %rax
cmpl $0x0, 0x368(%rax)
je 0x2b246
movq -0x10(%rbp), %rax
movq 0x70(%rax), %rax
movl -0x14(%rbp), %ecx
imulq $0x70, %rcx, %rcx
addq %rcx, %rax
cmpq $0x0, 0x20(%rax)
jne 0x2b24f
movb $0x0, -0x1(%rbp)
jmp 0x2b2d6
movq -0x10(%rbp), %rax
cmpq $0x0, 0x390(%rax)
je 0x2b27a
movq -0x10(%rbp), %rax
movq 0x70(%rax), %rax
movl -0x14(%rbp), %ecx
imulq $0x70, %rcx, %rcx
addq %rcx, %rax
movq 0x20(%rax), %rax
movb (%rax), %al
movb %al, -0x1(%rbp)
jmp 0x2b2d6
movq -0x10(%rbp), %rax
cmpq $0x0, 0x370(%rax)
je 0x2b2b6
movq -0x10(%rbp), %rax
movq 0x70(%rax), %rax
movl -0x14(%rbp), %ecx
imulq $0x70, %rcx, %rcx
addq %rcx, %rax
movq 0x20(%rax), %rax
movq -0x20(%rbp), %rcx
movq -0x10(%rbp), %rdx
imulq 0x370(%rdx), %rcx
movb (%rax,%rcx), %al
movb %al, -0x1(%rbp)
jmp 0x2b2d6
movq -0x10(%rbp), %rax
movq 0x70(%rax), %rax
movl -0x14(%rbp), %ecx
imulq $0x70, %rcx, %rcx
addq %rcx, %rax
movq 0x20(%rax), %rax
movq -0x20(%rbp), %rcx
movb (%rax,%rcx), %al
movb %al, -0x1(%rbp)
movb -0x1(%rbp), %al
popq %rbp
retq
nopl (%rax,%rax)
|
ma_get_indicator:
push rbp
mov rbp, rsp
mov [rbp+var_10], rdi
mov [rbp+var_14], esi
mov [rbp+var_20], rdx
mov rax, [rbp+var_10]
cmp qword ptr [rax+38h], 0
jz short loc_2B246
mov rax, [rbp+var_10]
mov rax, [rax+38h]
mov rax, [rax+370h]
and rax, 1
cmp rax, 0
jnz short loc_2B246
mov rax, [rbp+var_10]
mov rax, [rax+38h]
mov rax, [rax+4F0h]
mov rax, [rax+70h]
and rax, 4
cmp rax, 0
jz short loc_2B246
mov rax, [rbp+var_10]
cmp dword ptr [rax+368h], 0
jz short loc_2B246
mov rax, [rbp+var_10]
mov rax, [rax+70h]
mov ecx, [rbp+var_14]
imul rcx, 70h ; 'p'
add rax, rcx
cmp qword ptr [rax+20h], 0
jnz short loc_2B24F
loc_2B246:
mov [rbp+var_1], 0
jmp loc_2B2D6
loc_2B24F:
mov rax, [rbp+var_10]
cmp qword ptr [rax+390h], 0
jz short loc_2B27A
mov rax, [rbp+var_10]
mov rax, [rax+70h]
mov ecx, [rbp+var_14]
imul rcx, 70h ; 'p'
add rax, rcx
mov rax, [rax+20h]
mov al, [rax]
mov [rbp+var_1], al
jmp short loc_2B2D6
loc_2B27A:
mov rax, [rbp+var_10]
cmp qword ptr [rax+370h], 0
jz short loc_2B2B6
mov rax, [rbp+var_10]
mov rax, [rax+70h]
mov ecx, [rbp+var_14]
imul rcx, 70h ; 'p'
add rax, rcx
mov rax, [rax+20h]
mov rcx, [rbp+var_20]
mov rdx, [rbp+var_10]
imul rcx, [rdx+370h]
mov al, [rax+rcx]
mov [rbp+var_1], al
jmp short loc_2B2D6
loc_2B2B6:
mov rax, [rbp+var_10]
mov rax, [rax+70h]
mov ecx, [rbp+var_14]
imul rcx, 70h ; 'p'
add rax, rcx
mov rax, [rax+20h]
mov rcx, [rbp+var_20]
mov al, [rax+rcx]
mov [rbp+var_1], al
loc_2B2D6:
mov al, [rbp+var_1]
pop rbp
retn
|
char ma_get_indicator(long long a1, unsigned int a2, long long a3)
{
if ( !*(_QWORD *)(a1 + 56)
|| (*(_QWORD *)(*(_QWORD *)(a1 + 56) + 880LL) & 1LL) != 0
|| (*(_QWORD *)(*(_QWORD *)(*(_QWORD *)(a1 + 56) + 1264LL) + 112LL) & 4LL) == 0
|| !*(_DWORD *)(a1 + 872)
|| !*(_QWORD *)(112LL * a2 + *(_QWORD *)(a1 + 112) + 32) )
{
return 0;
}
if ( *(_QWORD *)(a1 + 912) )
return **(_BYTE **)(112LL * a2 + *(_QWORD *)(a1 + 112) + 32);
if ( *(_QWORD *)(a1 + 880) )
return *(_BYTE *)(*(_QWORD *)(112LL * a2 + *(_QWORD *)(a1 + 112) + 32) + *(_QWORD *)(a1 + 880) * a3);
else
return *(_BYTE *)(*(_QWORD *)(112LL * a2 + *(_QWORD *)(a1 + 112) + 32) + a3);
}
|
ma_get_indicator:
PUSH RBP
MOV RBP,RSP
MOV qword ptr [RBP + -0x10],RDI
MOV dword ptr [RBP + -0x14],ESI
MOV qword ptr [RBP + -0x20],RDX
MOV RAX,qword ptr [RBP + -0x10]
CMP qword ptr [RAX + 0x38],0x0
JZ 0x0012b246
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x38]
MOV RAX,qword ptr [RAX + 0x370]
AND RAX,0x1
CMP RAX,0x0
JNZ 0x0012b246
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x38]
MOV RAX,qword ptr [RAX + 0x4f0]
MOV RAX,qword ptr [RAX + 0x70]
AND RAX,0x4
CMP RAX,0x0
JZ 0x0012b246
MOV RAX,qword ptr [RBP + -0x10]
CMP dword ptr [RAX + 0x368],0x0
JZ 0x0012b246
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x70]
MOV ECX,dword ptr [RBP + -0x14]
IMUL RCX,RCX,0x70
ADD RAX,RCX
CMP qword ptr [RAX + 0x20],0x0
JNZ 0x0012b24f
LAB_0012b246:
MOV byte ptr [RBP + -0x1],0x0
JMP 0x0012b2d6
LAB_0012b24f:
MOV RAX,qword ptr [RBP + -0x10]
CMP qword ptr [RAX + 0x390],0x0
JZ 0x0012b27a
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x70]
MOV ECX,dword ptr [RBP + -0x14]
IMUL RCX,RCX,0x70
ADD RAX,RCX
MOV RAX,qword ptr [RAX + 0x20]
MOV AL,byte ptr [RAX]
MOV byte ptr [RBP + -0x1],AL
JMP 0x0012b2d6
LAB_0012b27a:
MOV RAX,qword ptr [RBP + -0x10]
CMP qword ptr [RAX + 0x370],0x0
JZ 0x0012b2b6
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x70]
MOV ECX,dword ptr [RBP + -0x14]
IMUL RCX,RCX,0x70
ADD RAX,RCX
MOV RAX,qword ptr [RAX + 0x20]
MOV RCX,qword ptr [RBP + -0x20]
MOV RDX,qword ptr [RBP + -0x10]
IMUL RCX,qword ptr [RDX + 0x370]
MOV AL,byte ptr [RAX + RCX*0x1]
MOV byte ptr [RBP + -0x1],AL
JMP 0x0012b2d6
LAB_0012b2b6:
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x70]
MOV ECX,dword ptr [RBP + -0x14]
IMUL RCX,RCX,0x70
ADD RAX,RCX
MOV RAX,qword ptr [RAX + 0x20]
MOV RCX,qword ptr [RBP + -0x20]
MOV AL,byte ptr [RAX + RCX*0x1]
MOV byte ptr [RBP + -0x1],AL
LAB_0012b2d6:
MOV AL,byte ptr [RBP + -0x1]
POP RBP
RET
|
int1 ma_get_indicator(long param_1,uint param_2,long param_3)
{
int1 local_9;
if ((((*(long *)(param_1 + 0x38) == 0) ||
((*(ulong *)(*(long *)(param_1 + 0x38) + 0x370) & 1) != 0)) ||
((*(ulong *)(*(long *)(*(long *)(param_1 + 0x38) + 0x4f0) + 0x70) & 4) == 0)) ||
((*(int *)(param_1 + 0x368) == 0 ||
(*(long *)(*(long *)(param_1 + 0x70) + (ulong)param_2 * 0x70 + 0x20) == 0)))) {
local_9 = 0;
}
else if (*(long *)(param_1 + 0x390) == 0) {
if (*(long *)(param_1 + 0x370) == 0) {
local_9 = *(int1 *)
(*(long *)(*(long *)(param_1 + 0x70) + (ulong)param_2 * 0x70 + 0x20) + param_3);
}
else {
local_9 = *(int1 *)
(*(long *)(*(long *)(param_1 + 0x70) + (ulong)param_2 * 0x70 + 0x20) +
param_3 * *(long *)(param_1 + 0x370));
}
}
else {
local_9 = **(int1 **)(*(long *)(param_1 + 0x70) + (ulong)param_2 * 0x70 + 0x20);
}
return local_9;
}
|
|
64,276
|
LEX::part_values_history(THD*)
|
eloqsql/sql/sql_lex.cc
|
bool LEX::part_values_history(THD *thd)
{
partition_element *elem= part_info->curr_part_elem;
if (!is_partition_management())
{
if (unlikely(part_info->part_type != VERSIONING_PARTITION))
{
my_error(ER_PARTITION_WRONG_TYPE, MYF(0), "SYSTEM_TIME");
return true;
}
}
else
{
part_info->vers_init_info(thd);
elem->id= UINT_MAX32;
}
DBUG_ASSERT(part_info->vers_info);
if (unlikely(part_info->vers_info->now_part))
{
DBUG_ASSERT(create_last_non_select_table);
DBUG_ASSERT(create_last_non_select_table->table_name.str);
my_error(ER_VERS_WRONG_PARTS, MYF(0),
create_last_non_select_table->table_name.str);
return true;
}
elem->type= partition_element::HISTORY;
return false;
}
|
O0
|
cpp
|
LEX::part_values_history(THD*):
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rdi
movq %rdi, -0x28(%rbp)
movq 0xeb8(%rdi), %rax
movq 0x1a8(%rax), %rax
movq %rax, -0x20(%rbp)
callq 0x591dd0
testb $0x1, %al
jne 0x5a0034
movq -0x28(%rbp), %rax
movq 0xeb8(%rax), %rax
cmpl $0x4, 0x1f8(%rax)
setne %al
andb $0x1, %al
movzbl %al, %eax
cmpl $0x0, %eax
je 0x5a0032
movl $0x1011, %edi # imm = 0x1011
xorl %eax, %eax
movl %eax, %esi
leaq 0x8258a7(%rip), %rdx # 0xdc58c9
movb $0x0, %al
callq 0xc12b50
movb $0x1, -0x1(%rbp)
jmp 0x5a00b2
jmp 0x5a0056
movq -0x28(%rbp), %rax
movq 0xeb8(%rax), %rdi
movq -0x18(%rbp), %rsi
callq 0x701450
movq -0x20(%rbp), %rax
movl $0xffffffff, 0xa4(%rax) # imm = 0xFFFFFFFF
jmp 0x5a0058
jmp 0x5a005a
movq -0x28(%rbp), %rax
movq 0xeb8(%rax), %rax
movq 0x180(%rax), %rax
cmpq $0x0, 0x58(%rax)
je 0x5a00a0
jmp 0x5a0075
jmp 0x5a0077
jmp 0x5a0079
jmp 0x5a007b
movq -0x28(%rbp), %rax
movq 0x1958(%rax), %rax
movq 0x28(%rax), %rdx
movl $0x1020, %edi # imm = 0x1020
xorl %eax, %eax
movl %eax, %esi
movb $0x0, %al
callq 0xc12b50
movb $0x1, -0x1(%rbp)
jmp 0x5a00b2
movq -0x20(%rbp), %rax
movl $0x2, 0xac(%rax)
movb $0x0, -0x1(%rbp)
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax)
|
_ZN3LEX19part_values_historyEP3THD:
push rbp
mov rbp, rsp
sub rsp, 30h
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov rdi, [rbp+var_10]; this
mov [rbp+var_28], rdi
mov rax, [rdi+0EB8h]
mov rax, [rax+1A8h]
mov [rbp+var_20], rax
call _ZNK3LEX23is_partition_managementEv; LEX::is_partition_management(void)
test al, 1
jnz short loc_5A0034
mov rax, [rbp+var_28]
mov rax, [rax+0EB8h]
cmp dword ptr [rax+1F8h], 4
setnz al
and al, 1
movzx eax, al
cmp eax, 0
jz short loc_5A0032
mov edi, 1011h
xor eax, eax
mov esi, eax
lea rdx, aPeriodForSyste_0+0Bh; "SYSTEM_TIME"
mov al, 0
call my_error
mov [rbp+var_1], 1
jmp loc_5A00B2
loc_5A0032:
jmp short loc_5A0056
loc_5A0034:
mov rax, [rbp+var_28]
mov rdi, [rax+0EB8h]; this
mov rsi, [rbp+var_18]; THD *
call _ZN14partition_info14vers_init_infoEP3THD; partition_info::vers_init_info(THD *)
mov rax, [rbp+var_20]
mov dword ptr [rax+0A4h], 0FFFFFFFFh
loc_5A0056:
jmp short $+2
loc_5A0058:
jmp short $+2
loc_5A005A:
mov rax, [rbp+var_28]
mov rax, [rax+0EB8h]
mov rax, [rax+180h]
cmp qword ptr [rax+58h], 0
jz short loc_5A00A0
jmp short $+2
loc_5A0075:
jmp short $+2
loc_5A0077:
jmp short $+2
loc_5A0079:
jmp short $+2
loc_5A007B:
mov rax, [rbp+var_28]
mov rax, [rax+1958h]
mov rdx, [rax+28h]
mov edi, 1020h
xor eax, eax
mov esi, eax
mov al, 0
call my_error
mov [rbp+var_1], 1
jmp short loc_5A00B2
loc_5A00A0:
mov rax, [rbp+var_20]
mov dword ptr [rax+0ACh], 2
mov [rbp+var_1], 0
loc_5A00B2:
mov al, [rbp+var_1]
and al, 1
add rsp, 30h
pop rbp
retn
|
char LEX::part_values_history(LEX *this, THD *a2)
{
int v2; // ecx
int v3; // r8d
int v4; // r9d
long long v6; // [rsp+10h] [rbp-20h]
v6 = *(_QWORD *)(*((_QWORD *)this + 471) + 424LL);
if ( LEX::is_partition_management(this) )
{
partition_info::vers_init_info(*((partition_info **)this + 471), a2);
*(_DWORD *)(v6 + 164) = -1;
}
else if ( *(_DWORD *)(*((_QWORD *)this + 471) + 504LL) != 4 )
{
my_error(4113, 0, (unsigned int)"SYSTEM_TIME", v2, v3, v4);
return 1;
}
if ( *(_QWORD *)(*(_QWORD *)(*((_QWORD *)this + 471) + 384LL) + 88LL) )
{
my_error(4128, 0, *(_QWORD *)(*((_QWORD *)this + 811) + 40LL), v2, v3, v4);
return 1;
}
else
{
*(_DWORD *)(v6 + 172) = 2;
return 0;
}
}
|
inline_mysql_rwlock_init:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x10
MOV dword ptr [RBP + -0x4],EDI
MOV qword ptr [RBP + -0x10],RSI
MOV EDI,dword ptr [RBP + -0x4]
MOV RSI,qword ptr [RBP + -0x10]
CALL 0x00da80b0
MOV RCX,RAX
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RAX + 0x90],RCX
MOV RDI,qword ptr [RBP + -0x10]
CALL 0x00d23b90
ADD RSP,0x10
POP RBP
RET
|
/* inline_mysql_rwlock_init(unsigned int, st_mysql_rwlock*) */
void inline_mysql_rwlock_init(uint param_1,st_mysql_rwlock *param_2)
{
int8 uVar1;
uVar1 = pfs_init_rwlock_v1(param_1,param_2);
*(int8 *)(param_2 + 0x90) = uVar1;
my_rw_init(param_2);
return;
}
|
|
64,277
|
get_charset
|
eloqsql/mysys/charset.c
|
CHARSET_INFO *get_charset(uint cs_number, myf flags)
{
CHARSET_INFO *cs= NULL;
if (cs_number == default_charset_info->number)
return default_charset_info;
my_pthread_once(&charsets_initialized, init_available_charsets);
if (cs_number < array_elements(all_charsets))
{
MY_CHARSET_LOADER loader;
my_charset_loader_init_mysys(&loader);
cs= get_internal_charset(&loader, cs_number, flags);
}
if (!cs && (flags & MY_WME))
{
char index_file[FN_REFLEN + sizeof(MY_CHARSET_INDEX)], cs_string[23];
strmov(get_charsets_dir(index_file),MY_CHARSET_INDEX);
cs_string[0]='#';
int10_to_str(cs_number, cs_string+1, 10);
my_error(EE_UNKNOWN_CHARSET, MYF(ME_BELL), cs_string, index_file);
}
return cs;
}
|
O0
|
c
|
get_charset:
pushq %rbp
movq %rsp, %rbp
subq $0x320, %rsp # imm = 0x320
movq %fs:0x28, %rax
movq %rax, -0x8(%rbp)
movl %edi, -0x2fc(%rbp)
movq %rsi, -0x308(%rbp)
movq $0x0, -0x310(%rbp)
movl -0x2fc(%rbp), %eax
leaq 0x1a3123(%rip), %rcx # 0x1cc830
movq (%rcx), %rcx
cmpl (%rcx), %eax
jne 0x2972a
leaq 0x1a3115(%rip), %rax # 0x1cc830
movq (%rax), %rax
movq %rax, -0x2f8(%rbp)
jmp 0x297fc
leaq 0x362d63(%rip), %rdi # 0x38c494
leaq -0x548(%rip), %rsi # 0x291f0
callq 0x24260
cmpl $0x800, -0x2fc(%rbp) # imm = 0x800
jae 0x29775
leaq -0xb8(%rbp), %rdi
callq 0x28810
movl -0x2fc(%rbp), %esi
movq -0x308(%rbp), %rdx
leaq -0xb8(%rbp), %rdi
callq 0x29840
movq %rax, -0x310(%rbp)
cmpq $0x0, -0x310(%rbp)
jne 0x297ee
movq -0x308(%rbp), %rax
andq $0x10, %rax
cmpq $0x0, %rax
je 0x297ee
leaq -0x2d0(%rbp), %rdi
callq 0x28eb0
movq %rax, %rdi
leaq 0x4edf6(%rip), %rsi # 0x7859c
callq 0x242b0
movb $0x23, -0x2f0(%rbp)
movl -0x2fc(%rbp), %eax
movl %eax, %edi
leaq -0x2f0(%rbp), %rsi
addq $0x1, %rsi
movl $0xa, %edx
callq 0x72dd0
leaq -0x2f0(%rbp), %rdx
leaq -0x2d0(%rbp), %rcx
movl $0x16, %edi
movl $0x4, %esi
movb $0x0, %al
callq 0x2ddd0
movq -0x310(%rbp), %rax
movq %rax, -0x2f8(%rbp)
movq -0x2f8(%rbp), %rax
movq %rax, -0x318(%rbp)
movq %fs:0x28, %rax
movq -0x8(%rbp), %rcx
cmpq %rcx, %rax
jne 0x2982c
movq -0x318(%rbp), %rax
addq $0x320, %rsp # imm = 0x320
popq %rbp
retq
callq 0x24300
nopw %cs:(%rax,%rax)
|
get_charset:
push rbp
mov rbp, rsp
sub rsp, 320h
mov rax, fs:28h
mov [rbp+var_8], rax
mov [rbp+var_2FC], edi
mov [rbp+var_308], rsi
mov [rbp+var_310], 0
mov eax, [rbp+var_2FC]
lea rcx, default_charset_info
mov rcx, [rcx]
cmp eax, [rcx]
jnz short loc_2972A
lea rax, default_charset_info
mov rax, [rax]
mov [rbp+var_2F8], rax
jmp loc_297FC
loc_2972A:
lea rdi, charsets_initialized
lea rsi, init_available_charsets
call _pthread_once
cmp [rbp+var_2FC], 800h
jnb short loc_29775
lea rdi, [rbp+var_B8]
call my_charset_loader_init_mysys
mov esi, [rbp+var_2FC]
mov rdx, [rbp+var_308]
lea rdi, [rbp+var_B8]
call get_internal_charset
mov [rbp+var_310], rax
loc_29775:
cmp [rbp+var_310], 0
jnz short loc_297EE
mov rax, [rbp+var_308]
and rax, 10h
cmp rax, 0
jz short loc_297EE
lea rdi, [rbp+var_2D0]
call get_charsets_dir
mov rdi, rax
lea rsi, aIndexXml; "Index.xml"
call _stpcpy
mov [rbp+var_2F0], 23h ; '#'
mov eax, [rbp+var_2FC]
mov edi, eax
lea rsi, [rbp+var_2F0]
add rsi, 1
mov edx, 0Ah
call int10_to_str
lea rdx, [rbp+var_2F0]
lea rcx, [rbp+var_2D0]
mov edi, 16h
mov esi, 4
mov al, 0
call my_error
loc_297EE:
mov rax, [rbp+var_310]
mov [rbp+var_2F8], rax
loc_297FC:
mov rax, [rbp+var_2F8]
mov [rbp+var_318], rax
mov rax, fs:28h
mov rcx, [rbp+var_8]
cmp rax, rcx
jnz short loc_2982C
mov rax, [rbp+var_318]
add rsp, 320h
pop rbp
retn
loc_2982C:
call ___stack_chk_fail
|
void * get_charset(unsigned int a1, long long a2)
{
long long charsets_dir; // rax
int v3; // r8d
int v4; // r9d
long long internal_charset; // [rsp+10h] [rbp-310h]
char v8; // [rsp+30h] [rbp-2F0h] BYREF
_BYTE v9[7]; // [rsp+31h] [rbp-2EFh] BYREF
_BYTE v10[536]; // [rsp+50h] [rbp-2D0h] BYREF
_BYTE v11[176]; // [rsp+268h] [rbp-B8h] BYREF
unsigned long long v12; // [rsp+318h] [rbp-8h]
v12 = __readfsqword(0x28u);
internal_charset = 0LL;
if ( a1 == *(_DWORD *)default_charset_info )
return default_charset_info;
pthread_once(&charsets_initialized, init_available_charsets);
if ( a1 < 0x800 )
{
my_charset_loader_init_mysys((long long)v11);
internal_charset = get_internal_charset(v11, a1, a2);
}
if ( !internal_charset && (a2 & 0x10) != 0 )
{
charsets_dir = get_charsets_dir((long long)v10);
stpcpy(charsets_dir, "Index.xml");
v8 = 35;
int10_to_str(a1, v9, 10LL);
my_error(22, 4, (unsigned int)&v8, (unsigned int)v10, v3, v4);
}
return (void *)internal_charset;
}
|
get_charset:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x320
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x8],RAX
MOV dword ptr [RBP + -0x2fc],EDI
MOV qword ptr [RBP + -0x308],RSI
MOV qword ptr [RBP + -0x310],0x0
MOV EAX,dword ptr [RBP + -0x2fc]
LEA RCX,[0x2cc830]
MOV RCX,qword ptr [RCX]
CMP EAX,dword ptr [RCX]
JNZ 0x0012972a
LEA RAX,[0x2cc830]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x2f8],RAX
JMP 0x001297fc
LAB_0012972a:
LEA RDI,[0x48c494]
LEA RSI,[0x1291f0]
CALL 0x00124260
CMP dword ptr [RBP + -0x2fc],0x800
JNC 0x00129775
LEA RDI,[RBP + -0xb8]
CALL 0x00128810
MOV ESI,dword ptr [RBP + -0x2fc]
MOV RDX,qword ptr [RBP + -0x308]
LEA RDI,[RBP + -0xb8]
CALL 0x00129840
MOV qword ptr [RBP + -0x310],RAX
LAB_00129775:
CMP qword ptr [RBP + -0x310],0x0
JNZ 0x001297ee
MOV RAX,qword ptr [RBP + -0x308]
AND RAX,0x10
CMP RAX,0x0
JZ 0x001297ee
LEA RDI,[RBP + -0x2d0]
CALL 0x00128eb0
MOV RDI,RAX
LEA RSI,[0x17859c]
CALL 0x001242b0
MOV byte ptr [RBP + -0x2f0],0x23
MOV EAX,dword ptr [RBP + -0x2fc]
MOV EDI,EAX
LEA RSI,[RBP + -0x2f0]
ADD RSI,0x1
MOV EDX,0xa
CALL 0x00172dd0
LEA RDX,[RBP + -0x2f0]
LEA RCX,[RBP + -0x2d0]
MOV EDI,0x16
MOV ESI,0x4
MOV AL,0x0
CALL 0x0012ddd0
LAB_001297ee:
MOV RAX,qword ptr [RBP + -0x310]
MOV qword ptr [RBP + -0x2f8],RAX
LAB_001297fc:
MOV RAX,qword ptr [RBP + -0x2f8]
MOV qword ptr [RBP + -0x318],RAX
MOV RAX,qword ptr FS:[0x28]
MOV RCX,qword ptr [RBP + -0x8]
CMP RAX,RCX
JNZ 0x0012982c
MOV RAX,qword ptr [RBP + -0x318]
ADD RSP,0x320
POP RBP
RET
LAB_0012982c:
CALL 0x00124300
|
int * get_charset(uint param_1,ulong param_2)
{
char *__dest;
long in_FS_OFFSET;
int *local_318;
int *local_300;
int1 local_2f8;
int1 auStack_2f7 [31];
int1 local_2d8 [536];
int1 local_c0 [176];
long local_10;
local_10 = *(long *)(in_FS_OFFSET + 0x28);
local_318 = (int *)0x0;
if (param_1 == *(uint *)default_charset_info) {
local_300 = default_charset_info;
}
else {
pthread_once(&charsets_initialized,init_available_charsets);
if (param_1 < 0x800) {
my_charset_loader_init_mysys(local_c0);
local_318 = (int *)get_internal_charset(local_c0,param_1,param_2);
}
if ((local_318 == (int *)0x0) && ((param_2 & 0x10) != 0)) {
__dest = (char *)get_charsets_dir(local_2d8);
stpcpy(__dest,"Index.xml");
local_2f8 = 0x23;
int10_to_str(param_1,auStack_2f7,10);
my_error(0x16,4,&local_2f8,local_2d8);
}
local_300 = local_318;
}
if (*(long *)(in_FS_OFFSET + 0x28) == local_10) {
return local_300;
}
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
|
|
64,278
|
ftxui::(anonymous namespace)::Flex::ComputeRequirement()
|
Andrewchistyakov[P]flashcards_lyc/build_O0/_deps/ftxui-src/src/ftxui/dom/flex.cpp
|
void ComputeRequirement() override {
requirement_.min_x = 0;
requirement_.min_y = 0;
if (!children_.empty()) {
children_[0]->ComputeRequirement();
requirement_ = children_[0]->requirement();
}
f_(requirement_);
}
|
O0
|
cpp
|
ftxui::(anonymous namespace)::Flex::ComputeRequirement():
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x40(%rbp)
movl $0x0, 0x20(%rdi)
movl $0x0, 0x24(%rdi)
addq $0x8, %rdi
callq 0x42b50
testb $0x1, %al
jne 0x4249c
movq -0x40(%rbp), %rdi
addq $0x8, %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x3e6a0
movq %rax, %rdi
callq 0x3e6c0
movq %rax, %rdi
movq (%rdi), %rax
callq *0x10(%rax)
movq -0x40(%rbp), %rdi
addq $0x8, %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x3e6a0
movq %rax, %rdi
callq 0x3e6c0
movq %rax, %rsi
leaq -0x34(%rbp), %rdi
callq 0x3e6e0
movq -0x40(%rbp), %rdi
addq $0x20, %rdi
leaq -0x34(%rbp), %rsi
movl $0x2c, %edx
callq 0xd4a0
movq -0x40(%rbp), %rdi
movq 0x60(%rdi), %rax
addq $0x20, %rdi
callq *%rax
addq $0x40, %rsp
popq %rbp
retq
|
_ZN5ftxui12_GLOBAL__N_14Flex18ComputeRequirementEv:
push rbp
mov rbp, rsp
sub rsp, 40h
mov [rbp+var_8], rdi
mov rdi, [rbp+var_8]
mov [rbp+var_40], rdi
mov dword ptr [rdi+20h], 0
mov dword ptr [rdi+24h], 0
add rdi, 8
call _ZNKSt6vectorISt10shared_ptrIN5ftxui4NodeEESaIS3_EE5emptyEv; std::vector<std::shared_ptr<ftxui::Node>>::empty(void)
test al, 1
jnz short loc_4249C
mov rdi, [rbp+var_40]
add rdi, 8
xor eax, eax
mov esi, eax
call _ZNSt6vectorISt10shared_ptrIN5ftxui4NodeEESaIS3_EEixEm; std::vector<std::shared_ptr<ftxui::Node>>::operator[](ulong)
mov rdi, rax
call _ZNKSt19__shared_ptr_accessIN5ftxui4NodeELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv; std::__shared_ptr_access<ftxui::Node,(__gnu_cxx::_Lock_policy)2,false,false>::operator->(void)
mov rdi, rax
mov rax, [rdi]
call qword ptr [rax+10h]
mov rdi, [rbp+var_40]
add rdi, 8
xor eax, eax
mov esi, eax
call _ZNSt6vectorISt10shared_ptrIN5ftxui4NodeEESaIS3_EEixEm; std::vector<std::shared_ptr<ftxui::Node>>::operator[](ulong)
mov rdi, rax
call _ZNKSt19__shared_ptr_accessIN5ftxui4NodeELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv; std::__shared_ptr_access<ftxui::Node,(__gnu_cxx::_Lock_policy)2,false,false>::operator->(void)
mov rsi, rax
lea rdi, [rbp+var_34]; this
call _ZN5ftxui4Node11requirementEv; ftxui::Node::requirement(void)
mov rdi, [rbp+var_40]
add rdi, 20h ; ' '
lea rsi, [rbp+var_34]
mov edx, 2Ch ; ','
call _memcpy
loc_4249C:
mov rdi, [rbp+var_40]
mov rax, [rdi+60h]
add rdi, 20h ; ' '
call rax
add rsp, 40h
pop rbp
retn
|
long long ftxui::`anonymous namespace'::Flex::ComputeRequirement(ftxui::_anonymous_namespace_::Flex *this)
{
long long v1; // rax
long long v2; // rax
long long v3; // rax
long long v4; // rax
_BYTE v6[44]; // [rsp+Ch] [rbp-34h] BYREF
ftxui::_anonymous_namespace_::Flex *v7; // [rsp+38h] [rbp-8h]
v7 = this;
*((_DWORD *)this + 8) = 0;
*((_DWORD *)this + 9) = 0;
if ( (std::vector<std::shared_ptr<ftxui::Node>>::empty((char *)this + 8) & 1) == 0 )
{
v1 = std::vector<std::shared_ptr<ftxui::Node>>::operator[]((_QWORD *)this + 1, 0LL);
v2 = std::__shared_ptr_access<ftxui::Node,(__gnu_cxx::_Lock_policy)2,false,false>::operator->(v1);
(*(void ( **)(long long))(*(_QWORD *)v2 + 16LL))(v2);
v3 = std::vector<std::shared_ptr<ftxui::Node>>::operator[]((_QWORD *)this + 1, 0LL);
v4 = std::__shared_ptr_access<ftxui::Node,(__gnu_cxx::_Lock_policy)2,false,false>::operator->(v3);
ftxui::Node::requirement((ftxui::Node *)v6, v4);
memcpy((char *)this + 32, v6, 44LL);
}
return (*((long long ( **)(char *))this + 12))((char *)this + 32);
}
|
ComputeRequirement:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x40
MOV qword ptr [RBP + -0x8],RDI
MOV RDI,qword ptr [RBP + -0x8]
MOV qword ptr [RBP + -0x40],RDI
MOV dword ptr [RDI + 0x20],0x0
MOV dword ptr [RDI + 0x24],0x0
ADD RDI,0x8
CALL 0x00142b50
TEST AL,0x1
JNZ 0x0014249c
MOV RDI,qword ptr [RBP + -0x40]
ADD RDI,0x8
XOR EAX,EAX
MOV ESI,EAX
CALL 0x0013e6a0
MOV RDI,RAX
CALL 0x0013e6c0
MOV RDI,RAX
MOV RAX,qword ptr [RDI]
CALL qword ptr [RAX + 0x10]
MOV RDI,qword ptr [RBP + -0x40]
ADD RDI,0x8
XOR EAX,EAX
MOV ESI,EAX
CALL 0x0013e6a0
MOV RDI,RAX
CALL 0x0013e6c0
MOV RSI,RAX
LEA RDI,[RBP + -0x34]
CALL 0x0013e6e0
MOV RDI,qword ptr [RBP + -0x40]
ADD RDI,0x20
LEA RSI,[RBP + -0x34]
MOV EDX,0x2c
CALL 0x0010d4a0
LAB_0014249c:
MOV RDI,qword ptr [RBP + -0x40]
MOV RAX,qword ptr [RDI + 0x60]
ADD RDI,0x20
CALL RAX
ADD RSP,0x40
POP RBP
RET
|
/* ftxui::(anonymous namespace)::Flex::ComputeRequirement() */
void __thiscall ftxui::(anonymous_namespace)::Flex::ComputeRequirement(Flex *this)
{
ulong uVar1;
__shared_ptr_access<ftxui::Node,(__gnu_cxx::_Lock_policy)2,false,false> *p_Var2;
long *plVar3;
int1 local_3c [44];
Flex *local_10;
*(int4 *)(this + 0x20) = 0;
*(int4 *)(this + 0x24) = 0;
local_10 = this;
uVar1 = std::vector<std::shared_ptr<ftxui::Node>,std::allocator<std::shared_ptr<ftxui::Node>>>::
empty((vector<std::shared_ptr<ftxui::Node>,std::allocator<std::shared_ptr<ftxui::Node>>> *
)(this + 8));
if ((uVar1 & 1) == 0) {
p_Var2 = (__shared_ptr_access<ftxui::Node,(__gnu_cxx::_Lock_policy)2,false,false> *)
std::vector<std::shared_ptr<ftxui::Node>,std::allocator<std::shared_ptr<ftxui::Node>>>
::operator[]((vector<std::shared_ptr<ftxui::Node>,std::allocator<std::shared_ptr<ftxui::Node>>>
*)(this + 8),0);
plVar3 = (long *)std::__shared_ptr_access<ftxui::Node,(__gnu_cxx::_Lock_policy)2,false,false>::
operator->(p_Var2);
(**(code **)(*plVar3 + 0x10))();
p_Var2 = (__shared_ptr_access<ftxui::Node,(__gnu_cxx::_Lock_policy)2,false,false> *)
std::vector<std::shared_ptr<ftxui::Node>,std::allocator<std::shared_ptr<ftxui::Node>>>
::operator[]((vector<std::shared_ptr<ftxui::Node>,std::allocator<std::shared_ptr<ftxui::Node>>>
*)(this + 8),0);
std::__shared_ptr_access<ftxui::Node,(__gnu_cxx::_Lock_policy)2,false,false>::operator->(p_Var2)
;
Node::requirement();
memcpy(this + 0x20,local_3c,0x2c);
}
(**(code **)(this + 0x60))(this + 0x20);
return;
}
|
|
64,279
|
google::protobuf::DescriptorDatabase::FindAllPackageNames(std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>*)
|
aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/descriptor_database.cc
|
bool DescriptorDatabase::FindAllPackageNames(std::vector<std::string>* output) {
return ForAllFileProtos(
this,
[](const FileDescriptorProto& file_proto, std::set<std::string>* set) {
set->insert(file_proto.package());
},
output);
}
|
O3
|
cpp
|
google::protobuf::DescriptorDatabase::FindAllPackageNames(std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>*):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x168, %rsp # imm = 0x168
movq %rsi, %rbx
movq %rdi, %r14
xorps %xmm0, %xmm0
leaq 0x10(%rsp), %rsi
movaps %xmm0, (%rsi)
movq $0x0, 0x10(%rsi)
movq (%rdi), %rax
callq *0x30(%rax)
testb %al, %al
je 0xfbb70
movq %rbx, 0x8(%rsp)
leaq 0x30(%rsp), %r12
movl $0x0, (%r12)
xorl %eax, %eax
movq %rax, 0x8(%r12)
movq %r12, 0x10(%r12)
movq %r12, 0x18(%r12)
movq %rax, 0x20(%r12)
leaq 0x90(%rsp), %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0xe9d3e
movq 0x10(%rsp), %r15
movq 0x18(%rsp), %rbx
cmpq %rbx, %r15
je 0xfbb55
leaq 0x90(%rsp), %r13
leaq 0x28(%rsp), %rbp
movq %r13, %rdi
callq 0xea1e4
movq (%r14), %rax
movq %r14, %rdi
movq %r15, %rsi
movq %r13, %rdx
callq *0x10(%rax)
testb %al, %al
je 0xfbb74
movq 0x148(%rsp), %rsi
andq $-0x4, %rsi
movq %rbp, %rdi
callq 0x2de20
addq $0x20, %r15
cmpq %rbx, %r15
jne 0xfbb1d
movq 0x8(%rsp), %rdi
movq 0x8(%rdi), %rsi
movq 0x40(%rsp), %rdx
movb $0x1, %bpl
movq %r12, %rcx
callq 0x2e390
jmp 0xfbbc4
xorl %ebp, %ebp
jmp 0xfbbdb
leaq 0x733b6(%rip), %rdx # 0x16ef31
leaq 0x58(%rsp), %rdi
movl $0x2, %esi
movl $0x52, %ecx
callq 0x857c2
leaq 0x7346a(%rip), %rsi # 0x16f000
leaq 0x58(%rsp), %rdi
callq 0x852c0
movq %rax, %rdi
movq %r15, %rsi
callq 0x852d2
leaq 0x7(%rsp), %rdi
movq %rax, %rsi
callq 0x8539a
leaq 0x58(%rsp), %rdi
callq 0x857e0
xorl %ebp, %ebp
leaq 0x90(%rsp), %rdi
callq 0xea17a
leaq 0x28(%rsp), %rdi
callq 0x2dd90
leaq 0x10(%rsp), %rdi
callq 0x4f6b4
movl %ebp, %eax
addq $0x168, %rsp # imm = 0x168
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0xfbbfd
jmp 0xfbc18
movq %rax, %rbx
leaq 0x58(%rsp), %rdi
callq 0x857e0
jmp 0xfbc1b
jmp 0xfbc18
movq %rax, %rbx
jmp 0xfbc28
movq %rax, %rbx
jmp 0xfbc32
movq %rax, %rbx
leaq 0x90(%rsp), %rdi
callq 0xea17a
leaq 0x28(%rsp), %rdi
callq 0x2dd90
leaq 0x10(%rsp), %rdi
callq 0x4f6b4
movq %rbx, %rdi
callq 0x2e220
|
_ZN6google8protobuf18DescriptorDatabase19FindAllPackageNamesEPSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS8_EE:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 168h
mov rbx, rsi
mov r14, rdi
xorps xmm0, xmm0
lea rsi, [rsp+198h+var_188]
movaps xmmword ptr [rsi], xmm0
mov qword ptr [rsi+10h], 0
mov rax, [rdi]
call qword ptr [rax+30h]
test al, al
jz loc_FBB70
mov [rsp+198h+var_190], rbx
lea r12, [rsp+198h+var_168]
mov dword ptr [r12], 0
xor eax, eax
mov [r12+8], rax
mov [r12+10h], r12
mov [r12+18h], r12
mov [r12+20h], rax
lea rdi, [rsp+198h+var_108]
xor esi, esi
xor edx, edx
call _ZN6google8protobuf19FileDescriptorProtoC2EPNS0_5ArenaEb; google::protobuf::FileDescriptorProto::FileDescriptorProto(google::protobuf::Arena *,bool)
mov r15, [rsp+198h+var_188]
mov rbx, [rsp+198h+var_180]
cmp r15, rbx
jz short loc_FBB55
lea r13, [rsp+198h+var_108]
lea rbp, [rsp+198h+var_170]
loc_FBB1D:
mov rdi, r13; this
call _ZN6google8protobuf19FileDescriptorProto5ClearEv; google::protobuf::FileDescriptorProto::Clear(void)
mov rax, [r14]
mov rdi, r14
mov rsi, r15
mov rdx, r13
call qword ptr [rax+10h]
test al, al
jz short loc_FBB74
mov rsi, [rsp+198h+var_50]
and rsi, 0FFFFFFFFFFFFFFFCh
mov rdi, rbp
call __ZNSt8_Rb_treeINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES5_St9_IdentityIS5_ESt4lessIS5_ESaIS5_EE16_M_insert_uniqueIRKS5_EESt4pairISt17_Rb_tree_iteratorIS5_EbEOT_; std::_Rb_tree<std::string,std::string,std::_Identity<std::string>,std::less<std::string>,std::allocator<std::string>>::_M_insert_unique<std::string const&>(std::string const&)
add r15, 20h ; ' '
cmp r15, rbx
jnz short loc_FBB1D
loc_FBB55:
mov rdi, [rsp+198h+var_190]
mov rsi, [rdi+8]
mov rdx, [rsp+198h+var_158]
mov bpl, 1
mov rcx, r12
call __ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE15_M_range_insertISt23_Rb_tree_const_iteratorIS5_EEEvN9__gnu_cxx17__normal_iteratorIPS5_S7_EET_SF_St20forward_iterator_tag; std::vector<std::string>::_M_range_insert<std::_Rb_tree_const_iterator<std::string>>(__gnu_cxx::__normal_iterator<std::string*,std::vector<std::string>>,std::_Rb_tree_const_iterator<std::string>,std::_Rb_tree_const_iterator<std::string>,std::forward_iterator_tag)
jmp short loc_FBBC4
loc_FBB70:
xor ebp, ebp
jmp short loc_FBBDB
loc_FBB74:
lea rdx, aWorkspaceLlm4b_36; "/workspace/llm4binary/github2025/aimrt_"...
lea rdi, [rsp+198h+var_140]
mov esi, 2
mov ecx, 52h ; 'R'
call _ZN6google8protobuf8internal10LogMessageC2ENS0_8LogLevelEPKci; google::protobuf::internal::LogMessage::LogMessage(google::protobuf::LogLevel,char const*,int)
lea rsi, aFileNotFoundIn; "File not found in database (unexpected)"...
lea rdi, [rsp+198h+var_140]
call _ZN6google8protobuf8internal10LogMessagelsEPKc; google::protobuf::internal::LogMessage::operator<<(char const*)
mov rdi, rax
mov rsi, r15
call _ZN6google8protobuf8internal10LogMessagelsERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; google::protobuf::internal::LogMessage::operator<<(std::string const&)
lea rdi, [rsp+198h+var_191]
mov rsi, rax
call _ZN6google8protobuf8internal11LogFinisheraSERNS1_10LogMessageE; google::protobuf::internal::LogFinisher::operator=(google::protobuf::internal::LogMessage &)
lea rdi, [rsp+198h+var_140]; this
call _ZN6google8protobuf8internal10LogMessageD2Ev; google::protobuf::internal::LogMessage::~LogMessage()
xor ebp, ebp
loc_FBBC4:
lea rdi, [rsp+198h+var_108]; this
call _ZN6google8protobuf19FileDescriptorProtoD2Ev; google::protobuf::FileDescriptorProto::~FileDescriptorProto()
lea rdi, [rsp+198h+var_170]
call __ZNSt8_Rb_treeINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES5_St9_IdentityIS5_ESt4lessIS5_ESaIS5_EED2Ev; std::_Rb_tree<std::string,std::string,std::_Identity<std::string>,std::less<std::string>,std::allocator<std::string>>::~_Rb_tree()
loc_FBBDB:
lea rdi, [rsp+198h+var_188]
call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED2Ev; std::vector<std::string>::~vector()
mov eax, ebp
add rsp, 168h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
jmp short loc_FBBFD
jmp short loc_FBC18
loc_FBBFD:
mov rbx, rax
lea rdi, [rsp+arg_50]; this
call _ZN6google8protobuf8internal10LogMessageD2Ev; google::protobuf::internal::LogMessage::~LogMessage()
jmp short loc_FBC1B
jmp short loc_FBC18
mov rbx, rax
jmp short loc_FBC28
mov rbx, rax
jmp short loc_FBC32
loc_FBC18:
mov rbx, rax
loc_FBC1B:
lea rdi, [rsp+arg_88]; this
call _ZN6google8protobuf19FileDescriptorProtoD2Ev; google::protobuf::FileDescriptorProto::~FileDescriptorProto()
loc_FBC28:
lea rdi, [rsp+arg_20]
call __ZNSt8_Rb_treeINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES5_St9_IdentityIS5_ESt4lessIS5_ESaIS5_EED2Ev; std::_Rb_tree<std::string,std::string,std::_Identity<std::string>,std::less<std::string>,std::allocator<std::string>>::~_Rb_tree()
loc_FBC32:
lea rdi, [rsp+arg_8]
call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED2Ev; std::vector<std::string>::~vector()
mov rdi, rbx
call __Unwind_Resume
|
long long google::protobuf::DescriptorDatabase::FindAllPackageNames(long long a1, long long a2)
{
_BYTE *v2; // rbp
_QWORD *v3; // rbx
_QWORD *v4; // r15
long long v5; // rax
google::protobuf::internal::LogMessage *v6; // rax
char v8; // [rsp+7h] [rbp-191h] BYREF
long long v9; // [rsp+8h] [rbp-190h]
__int128 v10; // [rsp+10h] [rbp-188h] BYREF
long long v11; // [rsp+20h] [rbp-178h]
_BYTE v12[8]; // [rsp+28h] [rbp-170h] BYREF
int v13; // [rsp+30h] [rbp-168h] BYREF
long long v14; // [rsp+38h] [rbp-160h]
int *v15; // [rsp+40h] [rbp-158h]
int *v16; // [rsp+48h] [rbp-150h]
long long v17; // [rsp+50h] [rbp-148h]
_BYTE v18[56]; // [rsp+58h] [rbp-140h] BYREF
_BYTE v19[184]; // [rsp+90h] [rbp-108h] BYREF
long long v20; // [rsp+148h] [rbp-50h]
v10 = 0LL;
v11 = 0LL;
if ( (*(unsigned __int8 ( **)(long long, __int128 *))(*(_QWORD *)a1 + 48LL))(a1, &v10) )
{
v9 = a2;
v13 = 0;
v14 = 0LL;
v15 = &v13;
v16 = &v13;
v17 = 0LL;
google::protobuf::FileDescriptorProto::FileDescriptorProto((google::protobuf::FileDescriptorProto *)v19, 0LL, 0);
v3 = (_QWORD *)*((_QWORD *)&v10 + 1);
v4 = (_QWORD *)v10;
if ( (_QWORD)v10 == *((_QWORD *)&v10 + 1) )
{
LABEL_6:
LOBYTE(v2) = 1;
std::vector<std::string>::_M_range_insert<std::_Rb_tree_const_iterator<std::string>>(
v9,
*(_QWORD *)(v9 + 8),
v15,
&v13);
}
else
{
v2 = v12;
while ( 1 )
{
google::protobuf::FileDescriptorProto::Clear((google::protobuf::FileDescriptorProto *)v19);
if ( !(*(unsigned __int8 ( **)(long long, _QWORD *, _BYTE *))(*(_QWORD *)a1 + 16LL))(a1, v4, v19) )
break;
std::_Rb_tree<std::string,std::string,std::_Identity<std::string>,std::less<std::string>,std::allocator<std::string>>::_M_insert_unique<std::string const&>(
v12,
v20 & 0xFFFFFFFFFFFFFFFCLL);
v4 += 4;
if ( v4 == v3 )
goto LABEL_6;
}
google::protobuf::internal::LogMessage::LogMessage(
(long long)v18,
2,
(long long)"/workspace/llm4binary/github2025/aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/descriptor_database.cc",
82);
v5 = google::protobuf::internal::LogMessage::operator<<(
(long long)v18,
(long long)"File not found in database (unexpected): ");
v6 = (google::protobuf::internal::LogMessage *)google::protobuf::internal::LogMessage::operator<<(v5, v4);
google::protobuf::internal::LogFinisher::operator=((long long)&v8, v6);
google::protobuf::internal::LogMessage::~LogMessage((google::protobuf::internal::LogMessage *)v18);
LODWORD(v2) = 0;
}
google::protobuf::FileDescriptorProto::~FileDescriptorProto((google::protobuf::FileDescriptorProto *)v19);
std::_Rb_tree<std::string,std::string,std::_Identity<std::string>,std::less<std::string>,std::allocator<std::string>>::~_Rb_tree(v12);
}
else
{
LODWORD(v2) = 0;
}
std::vector<std::string>::~vector((long long)&v10);
return (unsigned int)v2;
}
|
FindAllPackageNames:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x168
MOV RBX,RSI
MOV R14,RDI
XORPS XMM0,XMM0
LEA RSI,[RSP + 0x10]
MOVAPS xmmword ptr [RSI],XMM0
MOV qword ptr [RSI + 0x10],0x0
MOV RAX,qword ptr [RDI]
LAB_001fbabd:
CALL qword ptr [RAX + 0x30]
TEST AL,AL
JZ 0x001fbb70
MOV qword ptr [RSP + 0x8],RBX
LEA R12,[RSP + 0x30]
MOV dword ptr [R12],0x0
XOR EAX,EAX
MOV qword ptr [R12 + 0x8],RAX
MOV qword ptr [R12 + 0x10],R12
MOV qword ptr [R12 + 0x18],R12
MOV qword ptr [R12 + 0x20],RAX
LAB_001fbaf0:
LEA RDI,[RSP + 0x90]
XOR ESI,ESI
XOR EDX,EDX
CALL 0x001e9d3e
MOV R15,qword ptr [RSP + 0x10]
MOV RBX,qword ptr [RSP + 0x18]
CMP R15,RBX
JZ 0x001fbb55
LEA R13,[RSP + 0x90]
LEA RBP,[RSP + 0x28]
LAB_001fbb1d:
MOV RDI,R13
CALL 0x001ea1e4
MOV RAX,qword ptr [R14]
MOV RDI,R14
MOV RSI,R15
MOV RDX,R13
CALL qword ptr [RAX + 0x10]
TEST AL,AL
JZ 0x001fbb74
MOV RSI,qword ptr [RSP + 0x148]
AND RSI,-0x4
MOV RDI,RBP
CALL 0x0012de20
ADD R15,0x20
CMP R15,RBX
JNZ 0x001fbb1d
LAB_001fbb55:
MOV RDI,qword ptr [RSP + 0x8]
MOV RSI,qword ptr [RDI + 0x8]
MOV RDX,qword ptr [RSP + 0x40]
MOV BPL,0x1
LAB_001fbb66:
MOV RCX,R12
CALL 0x0012e390
JMP 0x001fbbc4
LAB_001fbb70:
XOR EBP,EBP
JMP 0x001fbbdb
LAB_001fbb74:
LEA RDX,[0x26ef31]
LEA RDI,[RSP + 0x58]
MOV ESI,0x2
MOV ECX,0x52
CALL 0x001857c2
LAB_001fbb8f:
LEA RSI,[0x26f000]
LEA RDI,[RSP + 0x58]
CALL 0x001852c0
MOV RDI,RAX
MOV RSI,R15
CALL 0x001852d2
LAB_001fbbab:
LEA RDI,[RSP + 0x7]
MOV RSI,RAX
CALL 0x0018539a
LAB_001fbbb8:
LEA RDI,[RSP + 0x58]
CALL 0x001857e0
XOR EBP,EBP
LAB_001fbbc4:
LEA RDI,[RSP + 0x90]
CALL 0x001ea17a
LEA RDI,[RSP + 0x28]
CALL 0x0012dd90
LAB_001fbbdb:
LEA RDI,[RSP + 0x10]
CALL 0x0014f6b4
MOV EAX,EBP
ADD RSP,0x168
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
/* google::protobuf::DescriptorDatabase::FindAllPackageNames(std::vector<std::__cxx11::string,
std::allocator<std::__cxx11::string > >*) */
ulong __thiscall
google::protobuf::DescriptorDatabase::FindAllPackageNames(DescriptorDatabase *this,vector *param_1)
{
string *psVar1;
char cVar2;
LogMessage *pLVar3;
_Rb_tree<std::__cxx11::string,std::__cxx11::string,std::_Identity<std::__cxx11::string>,std::less<std::__cxx11::string>,std::allocator<std::__cxx11::string>>
*unaff_RBP;
ulong uVar4;
string *psVar5;
LogFinisher local_191;
vector *local_190;
string *local_188;
string *psStack_180;
int8 local_178;
_Rb_tree<std::__cxx11::string,std::__cxx11::string,std::_Identity<std::__cxx11::string>,std::less<std::__cxx11::string>,std::allocator<std::__cxx11::string>>
local_170 [8];
int4 local_168 [2];
int8 local_160;
int4 *local_158;
int4 *local_150;
int8 local_148;
LogMessage local_140 [56];
FileDescriptorProto local_108 [184];
ulong local_50;
local_188 = (string *)0x0;
psStack_180 = (string *)0x0;
local_178 = 0;
/* try { // try from 001fbabd to 001fbabf has its CatchHandler @ 001fbc13 */
cVar2 = (**(code **)(*(long *)this + 0x30))();
if (cVar2 == '\0') {
uVar4 = 0;
}
else {
local_168[0] = 0;
local_160 = 0;
local_148 = 0;
/* try { // try from 001fbaf0 to 001fbb00 has its CatchHandler @ 001fbc0e */
local_190 = param_1;
local_158 = local_168;
local_150 = local_168;
FileDescriptorProto::FileDescriptorProto(local_108,(Arena *)0x0,false);
psVar1 = psStack_180;
if (local_188 != psStack_180) {
unaff_RBP = local_170;
psVar5 = local_188;
do {
/* try { // try from 001fbb1d to 001fbb4b has its CatchHandler @ 001fbc18 */
FileDescriptorProto::Clear(local_108);
cVar2 = (**(code **)(*(long *)this + 0x10))(this,psVar5,local_108);
if (cVar2 == '\0') {
/* try { // try from 001fbb74 to 001fbb8e has its CatchHandler @ 001fbbfb */
internal::LogMessage::LogMessage
(local_140,2,
"/workspace/llm4binary/github2025/aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/descriptor_database.cc"
,0x52);
/* try { // try from 001fbb8f to 001fbbaa has its CatchHandler @ 001fbbfd */
pLVar3 = (LogMessage *)
internal::LogMessage::operator<<
(local_140,"File not found in database (unexpected): ");
pLVar3 = (LogMessage *)internal::LogMessage::operator<<(pLVar3,psVar5);
/* try { // try from 001fbbab to 001fbbb7 has its CatchHandler @ 001fbbf9 */
internal::LogFinisher::operator=(&local_191,pLVar3);
internal::LogMessage::~LogMessage(local_140);
uVar4 = 0;
goto LAB_001fbbc4;
}
std::
_Rb_tree<std::__cxx11::string,std::__cxx11::string,std::_Identity<std::__cxx11::string>,std::less<std::__cxx11::string>,std::allocator<std::__cxx11::string>>
::_M_insert_unique<std::__cxx11::string_const&>
(unaff_RBP,(string *)(local_50 & 0xfffffffffffffffc));
psVar5 = psVar5 + 0x20;
} while (psVar5 != psVar1);
}
uVar4 = CONCAT71((int7)((ulong)unaff_RBP >> 8),1);
/* try { // try from 001fbb66 to 001fbb6d has its CatchHandler @ 001fbc0c */
std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::
_M_range_insert<std::_Rb_tree_const_iterator<std::__cxx11::string>>
(local_190,*(int8 *)(local_190 + 8),local_158,local_168);
LAB_001fbbc4:
FileDescriptorProto::~FileDescriptorProto(local_108);
std::
_Rb_tree<std::__cxx11::string,std::__cxx11::string,std::_Identity<std::__cxx11::string>,std::less<std::__cxx11::string>,std::allocator<std::__cxx11::string>>
::~_Rb_tree(local_170);
}
std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::~vector
((vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *)&local_188);
return uVar4 & 0xffffffff;
}
|
|
64,280
|
my_strnncoll_latin1_de
|
eloqsql/strings/ctype-latin1.c
|
static int my_strnncoll_latin1_de(CHARSET_INFO *cs __attribute__((unused)),
const uchar *a, size_t a_length,
const uchar *b, size_t b_length,
my_bool b_is_prefix)
{
const uchar *a_end= a + a_length;
const uchar *b_end= b + b_length;
uchar a_char, a_extend= 0, b_char, b_extend= 0;
while ((a < a_end || a_extend) && (b < b_end || b_extend))
{
if (a_extend)
{
a_char=a_extend; a_extend=0;
}
else
{
a_extend=combo2map[*a];
a_char=combo1map[*a++];
}
if (b_extend)
{
b_char=b_extend; b_extend=0;
}
else
{
b_extend=combo2map[*b];
b_char=combo1map[*b++];
}
if (a_char != b_char)
return (int) a_char - (int) b_char;
}
/*
A simple test of string lengths won't work -- we test to see
which string ran out first
*/
return ((a < a_end || a_extend) ? (b_is_prefix ? 0 : 1) :
(b < b_end || b_extend) ? -1 : 0);
}
|
O0
|
c
|
my_strnncoll_latin1_de:
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 -0x18(%rbp), %rax
addq -0x20(%rbp), %rax
movq %rax, -0x40(%rbp)
movq -0x28(%rbp), %rax
addq -0x30(%rbp), %rax
movq %rax, -0x48(%rbp)
movb $0x0, -0x4a(%rbp)
movb $0x0, -0x4c(%rbp)
movq -0x18(%rbp), %rax
cmpq -0x40(%rbp), %rax
jb 0x45f86
movzbl -0x4a(%rbp), %ecx
xorl %eax, %eax
cmpl $0x0, %ecx
movb %al, -0x4d(%rbp)
je 0x45fa8
movq -0x28(%rbp), %rcx
movb $0x1, %al
cmpq -0x48(%rbp), %rcx
movb %al, -0x4e(%rbp)
jb 0x45fa2
movzbl -0x4c(%rbp), %eax
cmpl $0x0, %eax
setne %al
movb %al, -0x4e(%rbp)
movb -0x4e(%rbp), %al
movb %al, -0x4d(%rbp)
movb -0x4d(%rbp), %al
testb $0x1, %al
jne 0x45fb4
jmp 0x46066
cmpb $0x0, -0x4a(%rbp)
je 0x45fc6
movb -0x4a(%rbp), %al
movb %al, -0x49(%rbp)
movb $0x0, -0x4a(%rbp)
jmp 0x45ffd
movq -0x18(%rbp), %rax
movzbl (%rax), %eax
movl %eax, %ecx
leaq 0x100b3a(%rip), %rax # 0x146b10
movb (%rax,%rcx), %al
movb %al, -0x4a(%rbp)
movq -0x18(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x18(%rbp)
movzbl (%rax), %eax
movl %eax, %ecx
leaq 0x100a19(%rip), %rax # 0x146a10
movb (%rax,%rcx), %al
movb %al, -0x49(%rbp)
cmpb $0x0, -0x4c(%rbp)
je 0x4600f
movb -0x4c(%rbp), %al
movb %al, -0x4b(%rbp)
movb $0x0, -0x4c(%rbp)
jmp 0x46046
movq -0x28(%rbp), %rax
movzbl (%rax), %eax
movl %eax, %ecx
leaq 0x100af1(%rip), %rax # 0x146b10
movb (%rax,%rcx), %al
movb %al, -0x4c(%rbp)
movq -0x28(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x28(%rbp)
movzbl (%rax), %eax
movl %eax, %ecx
leaq 0x1009d0(%rip), %rax # 0x146a10
movb (%rax,%rcx), %al
movb %al, -0x4b(%rbp)
movzbl -0x49(%rbp), %eax
movzbl -0x4b(%rbp), %ecx
cmpl %ecx, %eax
je 0x46061
movzbl -0x49(%rbp), %eax
movzbl -0x4b(%rbp), %ecx
subl %ecx, %eax
movl %eax, -0x4(%rbp)
jmp 0x460c4
jmp 0x45f6e
movq -0x18(%rbp), %rax
cmpq -0x40(%rbp), %rax
jb 0x46079
movzbl -0x4a(%rbp), %eax
cmpl $0x0, %eax
je 0x4608f
movsbl -0x31(%rbp), %edx
movl $0x1, %eax
xorl %ecx, %ecx
cmpl $0x0, %edx
cmovnel %ecx, %eax
movl %eax, -0x54(%rbp)
jmp 0x460be
movq -0x28(%rbp), %rcx
movb $0x1, %al
cmpq -0x48(%rbp), %rcx
movb %al, -0x55(%rbp)
jb 0x460ab
movzbl -0x4c(%rbp), %eax
cmpl $0x0, %eax
setne %al
movb %al, -0x55(%rbp)
movb -0x55(%rbp), %dl
xorl %eax, %eax
movl $0xffffffff, %ecx # imm = 0xFFFFFFFF
testb $0x1, %dl
cmovnel %ecx, %eax
movl %eax, -0x54(%rbp)
movl -0x54(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
popq %rbp
retq
nopl (%rax)
|
my_strnncoll_latin1_de:
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_18]
add rax, [rbp+var_20]
mov [rbp+var_40], rax
mov rax, [rbp+var_28]
add rax, [rbp+var_30]
mov [rbp+var_48], rax
mov [rbp+var_4A], 0
mov [rbp+var_4C], 0
loc_45F6E:
mov rax, [rbp+var_18]
cmp rax, [rbp+var_40]
jb short loc_45F86
movzx ecx, [rbp+var_4A]
xor eax, eax
cmp ecx, 0
mov [rbp+var_4D], al
jz short loc_45FA8
loc_45F86:
mov rcx, [rbp+var_28]
mov al, 1
cmp rcx, [rbp+var_48]
mov [rbp+var_4E], al
jb short loc_45FA2
movzx eax, [rbp+var_4C]
cmp eax, 0
setnz al
mov [rbp+var_4E], al
loc_45FA2:
mov al, [rbp+var_4E]
mov [rbp+var_4D], al
loc_45FA8:
mov al, [rbp+var_4D]
test al, 1
jnz short loc_45FB4
jmp loc_46066
loc_45FB4:
cmp [rbp+var_4A], 0
jz short loc_45FC6
mov al, [rbp+var_4A]
mov [rbp+var_49], al
mov [rbp+var_4A], 0
jmp short loc_45FFD
loc_45FC6:
mov rax, [rbp+var_18]
movzx eax, byte ptr [rax]
mov ecx, eax
lea rax, combo2map
mov al, [rax+rcx]
mov [rbp+var_4A], al
mov rax, [rbp+var_18]
mov rcx, rax
add rcx, 1
mov [rbp+var_18], rcx
movzx eax, byte ptr [rax]
mov ecx, eax
lea rax, combo1map
mov al, [rax+rcx]
mov [rbp+var_49], al
loc_45FFD:
cmp [rbp+var_4C], 0
jz short loc_4600F
mov al, [rbp+var_4C]
mov [rbp+var_4B], al
mov [rbp+var_4C], 0
jmp short loc_46046
loc_4600F:
mov rax, [rbp+var_28]
movzx eax, byte ptr [rax]
mov ecx, eax
lea rax, combo2map
mov al, [rax+rcx]
mov [rbp+var_4C], al
mov rax, [rbp+var_28]
mov rcx, rax
add rcx, 1
mov [rbp+var_28], rcx
movzx eax, byte ptr [rax]
mov ecx, eax
lea rax, combo1map
mov al, [rax+rcx]
mov [rbp+var_4B], al
loc_46046:
movzx eax, [rbp+var_49]
movzx ecx, [rbp+var_4B]
cmp eax, ecx
jz short loc_46061
movzx eax, [rbp+var_49]
movzx ecx, [rbp+var_4B]
sub eax, ecx
mov [rbp+var_4], eax
jmp short loc_460C4
loc_46061:
jmp loc_45F6E
loc_46066:
mov rax, [rbp+var_18]
cmp rax, [rbp+var_40]
jb short loc_46079
movzx eax, [rbp+var_4A]
cmp eax, 0
jz short loc_4608F
loc_46079:
movsx edx, [rbp+var_31]
mov eax, 1
xor ecx, ecx
cmp edx, 0
cmovnz eax, ecx
mov [rbp+var_54], eax
jmp short loc_460BE
loc_4608F:
mov rcx, [rbp+var_28]
mov al, 1
cmp rcx, [rbp+var_48]
mov [rbp+var_55], al
jb short loc_460AB
movzx eax, [rbp+var_4C]
cmp eax, 0
setnz al
mov [rbp+var_55], al
loc_460AB:
mov dl, [rbp+var_55]
xor eax, eax
mov ecx, 0FFFFFFFFh
test dl, 1
cmovnz eax, ecx
mov [rbp+var_54], eax
loc_460BE:
mov eax, [rbp+var_54]
mov [rbp+var_4], eax
loc_460C4:
mov eax, [rbp+var_4]
pop rbp
retn
|
long long my_strnncoll_latin1_de(
long long a1,
unsigned __int8 *a2,
long long a3,
unsigned __int8 *a4,
long long a5,
char a6)
{
unsigned __int8 *v6; // rax
unsigned __int8 *v7; // rax
unsigned int v8; // eax
bool v10; // [rsp+1h] [rbp-55h]
bool v12; // [rsp+8h] [rbp-4Eh]
bool v13; // [rsp+9h] [rbp-4Dh]
unsigned __int8 v14; // [rsp+Ah] [rbp-4Ch]
unsigned __int8 v15; // [rsp+Bh] [rbp-4Bh]
unsigned __int8 v16; // [rsp+Ch] [rbp-4Ah]
unsigned __int8 v17; // [rsp+Dh] [rbp-49h]
unsigned long long v18; // [rsp+Eh] [rbp-48h]
unsigned long long v19; // [rsp+16h] [rbp-40h]
unsigned __int8 *v20; // [rsp+2Eh] [rbp-28h]
unsigned __int8 *v21; // [rsp+3Eh] [rbp-18h]
v21 = a2;
v20 = a4;
v19 = (unsigned long long)&a2[a3];
v18 = (unsigned long long)&a4[a5];
v16 = 0;
v14 = 0;
while ( 1 )
{
if ( (unsigned long long)v21 < v19 || (v13 = 0, v16) )
{
v12 = 1;
if ( (unsigned long long)v20 >= v18 )
v12 = v14 != 0;
v13 = v12;
}
if ( !v13 )
break;
if ( v16 )
{
v17 = v16;
v16 = 0;
}
else
{
v16 = combo2map[*v21];
v6 = v21++;
v17 = combo1map[*v6];
}
if ( v14 )
{
v15 = v14;
v14 = 0;
}
else
{
v14 = combo2map[*v20];
v7 = v20++;
v15 = combo1map[*v7];
}
if ( v17 != v15 )
return (unsigned int)(v17 - v15);
}
if ( (unsigned long long)v21 < v19 || v16 )
{
return a6 == 0;
}
else
{
v10 = 1;
if ( (unsigned long long)v20 >= v18 )
v10 = v14 != 0;
v8 = 0;
if ( v10 )
v8 = -1;
return v8;
}
}
|
my_strnncoll_latin1_de:
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 + -0x18]
ADD RAX,qword ptr [RBP + -0x20]
MOV qword ptr [RBP + -0x40],RAX
MOV RAX,qword ptr [RBP + -0x28]
ADD RAX,qword ptr [RBP + -0x30]
MOV qword ptr [RBP + -0x48],RAX
MOV byte ptr [RBP + -0x4a],0x0
MOV byte ptr [RBP + -0x4c],0x0
LAB_00145f6e:
MOV RAX,qword ptr [RBP + -0x18]
CMP RAX,qword ptr [RBP + -0x40]
JC 0x00145f86
MOVZX ECX,byte ptr [RBP + -0x4a]
XOR EAX,EAX
CMP ECX,0x0
MOV byte ptr [RBP + -0x4d],AL
JZ 0x00145fa8
LAB_00145f86:
MOV RCX,qword ptr [RBP + -0x28]
MOV AL,0x1
CMP RCX,qword ptr [RBP + -0x48]
MOV byte ptr [RBP + -0x4e],AL
JC 0x00145fa2
MOVZX EAX,byte ptr [RBP + -0x4c]
CMP EAX,0x0
SETNZ AL
MOV byte ptr [RBP + -0x4e],AL
LAB_00145fa2:
MOV AL,byte ptr [RBP + -0x4e]
MOV byte ptr [RBP + -0x4d],AL
LAB_00145fa8:
MOV AL,byte ptr [RBP + -0x4d]
TEST AL,0x1
JNZ 0x00145fb4
JMP 0x00146066
LAB_00145fb4:
CMP byte ptr [RBP + -0x4a],0x0
JZ 0x00145fc6
MOV AL,byte ptr [RBP + -0x4a]
MOV byte ptr [RBP + -0x49],AL
MOV byte ptr [RBP + -0x4a],0x0
JMP 0x00145ffd
LAB_00145fc6:
MOV RAX,qword ptr [RBP + -0x18]
MOVZX EAX,byte ptr [RAX]
MOV ECX,EAX
LEA RAX,[0x246b10]
MOV AL,byte ptr [RAX + RCX*0x1]
MOV byte ptr [RBP + -0x4a],AL
MOV RAX,qword ptr [RBP + -0x18]
MOV RCX,RAX
ADD RCX,0x1
MOV qword ptr [RBP + -0x18],RCX
MOVZX EAX,byte ptr [RAX]
MOV ECX,EAX
LEA RAX,[0x246a10]
MOV AL,byte ptr [RAX + RCX*0x1]
MOV byte ptr [RBP + -0x49],AL
LAB_00145ffd:
CMP byte ptr [RBP + -0x4c],0x0
JZ 0x0014600f
MOV AL,byte ptr [RBP + -0x4c]
MOV byte ptr [RBP + -0x4b],AL
MOV byte ptr [RBP + -0x4c],0x0
JMP 0x00146046
LAB_0014600f:
MOV RAX,qword ptr [RBP + -0x28]
MOVZX EAX,byte ptr [RAX]
MOV ECX,EAX
LEA RAX,[0x246b10]
MOV AL,byte ptr [RAX + RCX*0x1]
MOV byte ptr [RBP + -0x4c],AL
MOV RAX,qword ptr [RBP + -0x28]
MOV RCX,RAX
ADD RCX,0x1
MOV qword ptr [RBP + -0x28],RCX
MOVZX EAX,byte ptr [RAX]
MOV ECX,EAX
LEA RAX,[0x246a10]
MOV AL,byte ptr [RAX + RCX*0x1]
MOV byte ptr [RBP + -0x4b],AL
LAB_00146046:
MOVZX EAX,byte ptr [RBP + -0x49]
MOVZX ECX,byte ptr [RBP + -0x4b]
CMP EAX,ECX
JZ 0x00146061
MOVZX EAX,byte ptr [RBP + -0x49]
MOVZX ECX,byte ptr [RBP + -0x4b]
SUB EAX,ECX
MOV dword ptr [RBP + -0x4],EAX
JMP 0x001460c4
LAB_00146061:
JMP 0x00145f6e
LAB_00146066:
MOV RAX,qword ptr [RBP + -0x18]
CMP RAX,qword ptr [RBP + -0x40]
JC 0x00146079
MOVZX EAX,byte ptr [RBP + -0x4a]
CMP EAX,0x0
JZ 0x0014608f
LAB_00146079:
MOVSX EDX,byte ptr [RBP + -0x31]
MOV EAX,0x1
XOR ECX,ECX
CMP EDX,0x0
CMOVNZ EAX,ECX
MOV dword ptr [RBP + -0x54],EAX
JMP 0x001460be
LAB_0014608f:
MOV RCX,qword ptr [RBP + -0x28]
MOV AL,0x1
CMP RCX,qword ptr [RBP + -0x48]
MOV byte ptr [RBP + -0x55],AL
JC 0x001460ab
MOVZX EAX,byte ptr [RBP + -0x4c]
CMP EAX,0x0
SETNZ AL
MOV byte ptr [RBP + -0x55],AL
LAB_001460ab:
MOV DL,byte ptr [RBP + -0x55]
XOR EAX,EAX
MOV ECX,0xffffffff
TEST DL,0x1
CMOVNZ EAX,ECX
MOV dword ptr [RBP + -0x54],EAX
LAB_001460be:
MOV EAX,dword ptr [RBP + -0x54]
MOV dword ptr [RBP + -0x4],EAX
LAB_001460c4:
MOV EAX,dword ptr [RBP + -0x4]
POP RBP
RET
|
uint my_strnncoll_latin1_de
(int8 param_1,byte *param_2,long param_3,byte *param_4,long param_5,
char param_6)
{
uint local_5c;
bool local_56;
byte local_54;
byte local_53;
byte local_52;
byte local_51;
byte *local_30;
byte *local_20;
local_52 = 0;
local_54 = 0;
local_30 = param_4;
local_20 = param_2;
do {
if ((local_20 < param_2 + param_3) || (local_56 = false, local_52 != 0)) {
local_56 = local_30 < param_4 + param_5 || local_54 != 0;
}
if (!local_56) {
if ((local_20 < param_2 + param_3) || (local_52 != 0)) {
local_5c = (uint)(param_6 == '\0');
}
else {
local_5c = 0;
if (local_30 < param_4 + param_5 || local_54 != 0) {
local_5c = 0xffffffff;
}
}
return local_5c;
}
if (local_52 == 0) {
local_52 = combo2map[*local_20];
local_51 = combo1map[*local_20];
local_20 = local_20 + 1;
}
else {
local_51 = local_52;
local_52 = 0;
}
if (local_54 == 0) {
local_54 = combo2map[*local_30];
local_53 = combo1map[*local_30];
local_30 = local_30 + 1;
}
else {
local_53 = local_54;
local_54 = 0;
}
} while (local_51 == local_53);
return (uint)local_51 - (uint)local_53;
}
|
|
64,281
|
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>::get_binary() const
|
monkey531[P]llama/common/json.hpp
|
const binary_t& get_binary() const
{
if (!is_binary())
{
JSON_THROW(type_error::create(302, detail::concat("type must be binary, but is ", type_name()), this));
}
return *get_ptr<const binary_t*>();
}
|
O1
|
cpp
|
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>::get_binary() const:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x30, %rsp
movq %rdi, %r14
cmpb $0x8, (%rdi)
jne 0xb3377
movq 0x8(%r14), %rax
addq $0x30, %rsp
popq %rbx
popq %r14
popq %rbp
retq
movl $0x20, %edi
callq 0x1b460
movq %rax, %rbx
movq %r14, %rdi
callq 0x5f2f6
leaq 0x8(%rsp), %rdx
movq %rax, (%rdx)
leaq 0x40e21(%rip), %rsi # 0xf41bc
leaq 0x10(%rsp), %rdi
callq 0x87881
movb $0x1, %bpl
leaq 0x10(%rsp), %rdx
movq %rbx, %rdi
movl $0x12e, %esi # imm = 0x12E
movq %r14, %rcx
callq 0x876b2
xorl %ebp, %ebp
leaq 0x79b52(%rip), %rsi # 0x12cf18
leaq -0x57f95(%rip), %rdx # 0x5b438
movq %rbx, %rdi
callq 0x1bf30
movq %rax, %r14
leaq 0x20(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xb33fb
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x1b8f0
jmp 0xb33fb
movq %rax, %r14
movb $0x1, %bpl
testb %bpl, %bpl
je 0xb3408
movq %rbx, %rdi
callq 0x1b690
movq %r14, %rdi
callq 0x1bfd0
|
_ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE10get_binaryEv:
push rbp; char
push r14; int
push rbx; __int64
sub rsp, 30h
mov r14, rdi
cmp byte ptr [rdi], 8
jnz short loc_B3377
mov rax, [r14+8]
add rsp, 30h
pop rbx
pop r14
pop rbp
retn
loc_B3377:
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, aTypeMustBeBina; "type must be binary, 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_B33FB
mov rsi, [rsp+48h+var_28]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_B33FB
mov r14, rax
mov bpl, 1
loc_B33FB:
test bpl, bpl
jz short loc_B3408
mov rdi, rbx; void *
call ___cxa_free_exception
loc_B3408:
mov rdi, r14
call __Unwind_Resume
|
long long nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::get_binary(
long long a1)
{
nlohmann::json_abi_v3_11_3::detail::exception *exception; // rbx
const char *v3; // [rsp+8h] [rbp-40h] BYREF
_QWORD v4[2]; // [rsp+10h] [rbp-38h] BYREF
if ( *(_BYTE *)a1 != 8 )
{
exception = (nlohmann::json_abi_v3_11_3::detail::exception *)__cxa_allocate_exception(0x20uLL);
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>::type_name((unsigned __int8 *)a1);
nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[29],char const*>(
(long long)v4,
(long long)"type must be binary, but is ",
&v3);
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,
v4);
__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 *(_QWORD *)(a1 + 8);
}
|
get_binary:
PUSH RBP
PUSH R14
PUSH RBX
SUB RSP,0x30
MOV R14,RDI
CMP byte ptr [RDI],0x8
JNZ 0x001b3377
MOV RAX,qword ptr [R14 + 0x8]
ADD RSP,0x30
POP RBX
POP R14
POP RBP
RET
LAB_001b3377:
MOV EDI,0x20
CALL 0x0011b460
MOV RBX,RAX
MOV RDI,R14
CALL 0x0015f2f6
LEA RDX,[RSP + 0x8]
MOV qword ptr [RDX],RAX
LAB_001b3394:
LEA RSI,[0x1f41bc]
LEA RDI,[RSP + 0x10]
CALL 0x00187881
MOV BPL,0x1
LAB_001b33a8:
LEA RDX,[RSP + 0x10]
MOV RDI,RBX
MOV ESI,0x12e
MOV RCX,R14
CALL 0x001876b2
XOR EBP,EBP
LEA RSI,[0x22cf18]
LEA RDX,[0x15b438]
MOV RDI,RBX
CALL 0x0011bf30
|
/* nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector,
std::__cxx11::string, 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() const */
int8 __thiscall
nlohmann::json_abi_v3_11_3::
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::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>
*this)
{
int8 uVar1;
char *local_40;
detail local_38 [32];
if (*this == (basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
)0x8) {
return *(int8 *)(this + 8);
}
uVar1 = __cxa_allocate_exception(0x20);
local_40 = (char *)type_name(this);
/* try { // try from 001b3394 to 001b33a4 has its CatchHandler @ 001b33f5 */
detail::concat<std::__cxx11::string,char_const(&)[29],char_const*>
(local_38,"type must be binary, but is ",&local_40);
/* try { // try from 001b33a8 to 001b33d4 has its CatchHandler @ 001b33d5 */
_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,this);
/* WARNING: Subroutine does not return */
__cxa_throw(uVar1,&detail::type_error::typeinfo,detail::exception::~exception);
}
|
|
64,282
|
ma_log_rt_split
|
eloqsql/storage/maria/ma_rt_split.c
|
static my_bool _ma_log_rt_split(MARIA_PAGE *page,
const uchar *key_with_nod_flag,
uint full_length,
const uchar *log_internal_copy,
uint log_internal_copy_length,
const uchar *log_key_copy,
uint length_diff)
{
MARIA_HA *info= page->info;
MARIA_SHARE *share= info->s;
LSN lsn;
uchar log_data[FILEID_STORE_SIZE + PAGE_STORE_SIZE + 1 + 2 + 1 + 2 + 2 + 7],
*log_pos;
LEX_CUSTRING log_array[TRANSLOG_INTERNAL_PARTS + 6];
uint translog_parts, extra_length= 0;
my_off_t page_pos;
DBUG_ENTER("_ma_log_rt_split");
DBUG_PRINT("enter", ("page: %p", page));
DBUG_ASSERT(share->now_transactional);
page_pos= page->pos / share->block_size;
page_store(log_data + FILEID_STORE_SIZE, page_pos);
log_pos= log_data+ FILEID_STORE_SIZE + PAGE_STORE_SIZE;
log_pos[0]= KEY_OP_DEL_SUFFIX;
log_pos++;
DBUG_ASSERT((int)length_diff > 0);
int2store(log_pos, length_diff);
log_pos+= 2;
log_pos[0]= KEY_OP_MULTI_COPY;
log_pos++;
int2store(log_pos, full_length);
log_pos+= 2;
int2store(log_pos, log_internal_copy_length);
log_pos+= 2;
log_array[TRANSLOG_INTERNAL_PARTS + 0].str= log_data;
log_array[TRANSLOG_INTERNAL_PARTS + 0].length= sizeof(log_data) - 7;
log_array[TRANSLOG_INTERNAL_PARTS + 1].str= log_internal_copy;
log_array[TRANSLOG_INTERNAL_PARTS + 1].length= log_internal_copy_length;
translog_parts= 2;
if (log_key_copy != NULL) /* need to store key into record */
{
log_array[TRANSLOG_INTERNAL_PARTS + 2].str= log_key_copy;
log_array[TRANSLOG_INTERNAL_PARTS + 2].length= 1 + 2 + 1 + 2;
log_array[TRANSLOG_INTERNAL_PARTS + 3].str= key_with_nod_flag;
log_array[TRANSLOG_INTERNAL_PARTS + 3].length= full_length;
extra_length= 1 + 2 + 1 + 2 + full_length;
translog_parts+= 2;
}
_ma_log_key_changes(page,
log_array + TRANSLOG_INTERNAL_PARTS + translog_parts,
log_pos, &extra_length, &translog_parts);
/* Remember new page length for future log entires for same page */
page->org_size= page->size;
if (translog_write_record(&lsn, LOGREC_REDO_INDEX,
info->trn, info,
(translog_size_t) ((log_pos - log_data) +
log_internal_copy_length +
extra_length),
TRANSLOG_INTERNAL_PARTS + translog_parts,
log_array, log_data, NULL))
DBUG_RETURN(1);
DBUG_RETURN(0);
}
|
O0
|
c
|
ma_log_rt_split:
pushq %rbp
movq %rsp, %rbp
subq $0x150, %rsp # imm = 0x150
movl 0x10(%rbp), %eax
movq %fs:0x28, %rax
movq %rax, -0x8(%rbp)
movq %rdi, -0x30(%rbp)
movq %rsi, -0x38(%rbp)
movl %edx, -0x3c(%rbp)
movq %rcx, -0x48(%rbp)
movl %r8d, -0x4c(%rbp)
movq %r9, -0x58(%rbp)
movq -0x30(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x60(%rbp)
movq -0x60(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x68(%rbp)
movl $0x0, -0x108(%rbp)
jmp 0x9cc84
jmp 0x9cc86
jmp 0x9cc88
movq -0x30(%rbp), %rax
movq 0x18(%rax), %rax
movq -0x68(%rbp), %rcx
movl 0x7bc(%rcx), %ecx
xorl %edx, %edx
divq %rcx
movq %rax, -0x110(%rbp)
leaq -0x20(%rbp), %rax
addq $0x2, %rax
movq %rax, -0x118(%rbp)
movq -0x110(%rbp), %rax
movl %eax, %ecx
movq -0x118(%rbp), %rax
movl %ecx, (%rax)
movq -0x110(%rbp), %rax
shrq $0x20, %rax
movb %al, %cl
movq -0x118(%rbp), %rax
movb %cl, 0x4(%rax)
leaq -0x20(%rbp), %rax
addq $0x2, %rax
addq $0x5, %rax
movq %rax, -0x78(%rbp)
movq -0x78(%rbp), %rax
movb $0x7, (%rax)
movq -0x78(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x78(%rbp)
jmp 0x9cd03
jmp 0x9cd05
movq -0x78(%rbp), %rax
movq %rax, -0x120(%rbp)
movl 0x10(%rbp), %eax
movw %ax, %cx
movq -0x120(%rbp), %rax
movw %cx, (%rax)
movq -0x78(%rbp), %rax
addq $0x2, %rax
movq %rax, -0x78(%rbp)
movq -0x78(%rbp), %rax
movb $0x9, (%rax)
movq -0x78(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x78(%rbp)
movq -0x78(%rbp), %rax
movq %rax, -0x128(%rbp)
movl -0x3c(%rbp), %eax
movw %ax, %cx
movq -0x128(%rbp), %rax
movw %cx, (%rax)
movq -0x78(%rbp), %rax
addq $0x2, %rax
movq %rax, -0x78(%rbp)
movq -0x78(%rbp), %rax
movq %rax, -0x130(%rbp)
movl -0x4c(%rbp), %eax
movw %ax, %cx
movq -0x130(%rbp), %rax
movw %cx, (%rax)
movq -0x78(%rbp), %rax
addq $0x2, %rax
movq %rax, -0x78(%rbp)
leaq -0x20(%rbp), %rax
movq %rax, -0xe0(%rbp)
movq $0xf, -0xd8(%rbp)
movq -0x48(%rbp), %rax
movq %rax, -0xd0(%rbp)
movl -0x4c(%rbp), %eax
movq %rax, -0xc8(%rbp)
movl $0x2, -0x104(%rbp)
cmpq $0x0, -0x58(%rbp)
je 0x9ce0f
movq -0x58(%rbp), %rax
movq %rax, -0xc0(%rbp)
movq $0x6, -0xb8(%rbp)
movq -0x38(%rbp), %rax
movq %rax, -0xb0(%rbp)
movl -0x3c(%rbp), %eax
movq %rax, -0xa8(%rbp)
movl -0x3c(%rbp), %eax
addl $0x6, %eax
movl %eax, -0x108(%rbp)
movl -0x104(%rbp), %eax
addl $0x2, %eax
movl %eax, -0x104(%rbp)
movq -0x30(%rbp), %rax
movl 0x20(%rax), %ecx
movq -0x30(%rbp), %rax
movl %ecx, 0x24(%rax)
movq -0x60(%rbp), %rax
movq 0x8(%rax), %rdx
movq -0x60(%rbp), %rcx
movq -0x78(%rbp), %rax
leaq -0x20(%rbp), %rsi
subq %rsi, %rax
movl -0x4c(%rbp), %esi
addq %rsi, %rax
movl -0x108(%rbp), %esi
addq %rsi, %rax
movl %eax, %r8d
movl -0x104(%rbp), %r9d
addl $0x2, %r9d
leaq -0x100(%rbp), %r10
leaq -0x20(%rbp), %rax
leaq -0x70(%rbp), %rdi
movl $0xc, %esi
xorl %r11d, %r11d
movq %r10, (%rsp)
movq %rax, 0x8(%rsp)
movq $0x0, 0x10(%rsp)
callq 0x55370
cmpb $0x0, %al
je 0x9ce8b
jmp 0x9ce85
movb $0x1, -0x21(%rbp)
jmp 0x9ce91
jmp 0x9ce8d
movb $0x0, -0x21(%rbp)
movb -0x21(%rbp), %al
movb %al, -0x131(%rbp)
movq %fs:0x28, %rax
movq -0x8(%rbp), %rcx
cmpq %rcx, %rax
jne 0x9cebb
movb -0x131(%rbp), %al
addq $0x150, %rsp # imm = 0x150
popq %rbp
retq
callq 0x2a270
|
_ma_log_rt_split:
push rbp
mov rbp, rsp
sub rsp, 150h
mov eax, [rbp+arg_0]
mov rax, fs:28h
mov [rbp+var_8], rax
mov [rbp+var_30], rdi
mov [rbp+var_38], rsi
mov [rbp+var_3C], edx
mov [rbp+var_48], rcx
mov [rbp+var_4C], r8d
mov [rbp+var_58], r9
mov rax, [rbp+var_30]
mov rax, [rax]
mov [rbp+var_60], rax
mov rax, [rbp+var_60]
mov rax, [rax]
mov [rbp+var_68], rax
mov [rbp+var_108], 0
jmp short $+2
loc_9CC84:
jmp short $+2
loc_9CC86:
jmp short $+2
loc_9CC88:
mov rax, [rbp+var_30]
mov rax, [rax+18h]
mov rcx, [rbp+var_68]
mov ecx, [rcx+7BCh]
xor edx, edx
div rcx
mov [rbp+var_110], rax
lea rax, [rbp+var_20]
add rax, 2
mov [rbp+var_118], rax
mov rax, [rbp+var_110]
mov ecx, eax
mov rax, [rbp+var_118]
mov [rax], ecx
mov rax, [rbp+var_110]
shr rax, 20h
mov cl, al
mov rax, [rbp+var_118]
mov [rax+4], cl
lea rax, [rbp+var_20]
add rax, 2
add rax, 5
mov [rbp+var_78], rax
mov rax, [rbp+var_78]
mov byte ptr [rax], 7
mov rax, [rbp+var_78]
add rax, 1
mov [rbp+var_78], rax
jmp short $+2
loc_9CD03:
jmp short $+2
loc_9CD05:
mov rax, [rbp+var_78]
mov [rbp+var_120], rax
mov eax, [rbp+arg_0]
mov cx, ax
mov rax, [rbp+var_120]
mov [rax], cx
mov rax, [rbp+var_78]
add rax, 2
mov [rbp+var_78], rax
mov rax, [rbp+var_78]
mov byte ptr [rax], 9
mov rax, [rbp+var_78]
add rax, 1
mov [rbp+var_78], rax
mov rax, [rbp+var_78]
mov [rbp+var_128], rax
mov eax, [rbp+var_3C]
mov cx, ax
mov rax, [rbp+var_128]
mov [rax], cx
mov rax, [rbp+var_78]
add rax, 2
mov [rbp+var_78], rax
mov rax, [rbp+var_78]
mov [rbp+var_130], rax
mov eax, [rbp+var_4C]
mov cx, ax
mov rax, [rbp+var_130]
mov [rax], cx
mov rax, [rbp+var_78]
add rax, 2
mov [rbp+var_78], rax
lea rax, [rbp+var_20]
mov [rbp+var_E0], rax
mov [rbp+var_D8], 0Fh
mov rax, [rbp+var_48]
mov [rbp+var_D0], rax
mov eax, [rbp+var_4C]
mov [rbp+var_C8], rax
mov [rbp+var_104], 2
cmp [rbp+var_58], 0
jz short loc_9CE0F
mov rax, [rbp+var_58]
mov [rbp+var_C0], rax
mov [rbp+var_B8], 6
mov rax, [rbp+var_38]
mov [rbp+var_B0], rax
mov eax, [rbp+var_3C]
mov [rbp+var_A8], rax
mov eax, [rbp+var_3C]
add eax, 6
mov [rbp+var_108], eax
mov eax, [rbp+var_104]
add eax, 2
mov [rbp+var_104], eax
loc_9CE0F:
mov rax, [rbp+var_30]
mov ecx, [rax+20h]
mov rax, [rbp+var_30]
mov [rax+24h], ecx
mov rax, [rbp+var_60]
mov rdx, [rax+8]
mov rcx, [rbp+var_60]
mov rax, [rbp+var_78]
lea rsi, [rbp+var_20]
sub rax, rsi
mov esi, [rbp+var_4C]
add rax, rsi
mov esi, [rbp+var_108]
add rax, rsi
mov r8d, eax
mov r9d, [rbp+var_104]
add r9d, 2
lea r10, [rbp+var_100]
lea rax, [rbp+var_20]
lea rdi, [rbp+var_70]
mov esi, 0Ch
xor r11d, r11d
mov [rsp+150h+var_150], r10
mov [rsp+150h+var_148], rax
mov [rsp+150h+var_140], 0
call translog_write_record
cmp al, 0
jz short loc_9CE8B
jmp short $+2
loc_9CE85:
mov [rbp+var_21], 1
jmp short loc_9CE91
loc_9CE8B:
jmp short $+2
loc_9CE8D:
mov [rbp+var_21], 0
loc_9CE91:
mov al, [rbp+var_21]
mov [rbp+var_131], al
mov rax, fs:28h
mov rcx, [rbp+var_8]
cmp rax, rcx
jnz short loc_9CEBB
mov al, [rbp+var_131]
add rsp, 150h
pop rbp
retn
loc_9CEBB:
call ___stack_chk_fail
|
bool ma_log_rt_split(
long long a1,
long long a2,
unsigned int a3,
long long a4,
unsigned int a5,
long long a6,
__int16 a7)
{
unsigned long long v8; // [rsp+40h] [rbp-110h]
unsigned int v9; // [rsp+48h] [rbp-108h]
int v10; // [rsp+4Ch] [rbp-104h]
_QWORD v11[17]; // [rsp+50h] [rbp-100h] BYREF
_BYTE *v12; // [rsp+D8h] [rbp-78h]
_BYTE v13[8]; // [rsp+E0h] [rbp-70h] BYREF
long long v14; // [rsp+E8h] [rbp-68h]
long long *v15; // [rsp+F0h] [rbp-60h]
long long v16; // [rsp+F8h] [rbp-58h]
unsigned int v17; // [rsp+104h] [rbp-4Ch]
long long v18; // [rsp+108h] [rbp-48h]
unsigned int v19; // [rsp+114h] [rbp-3Ch]
long long v20; // [rsp+118h] [rbp-38h]
long long v21; // [rsp+120h] [rbp-30h]
__int16 v22; // [rsp+130h] [rbp-20h] BYREF
int v23; // [rsp+132h] [rbp-1Eh]
char v24; // [rsp+136h] [rbp-1Ah]
char v25; // [rsp+137h] [rbp-19h]
__int16 v26; // [rsp+138h] [rbp-18h]
char v27; // [rsp+13Ah] [rbp-16h]
__int16 v28; // [rsp+13Bh] [rbp-15h]
__int16 v29; // [rsp+13Dh] [rbp-13h]
_BYTE v30[17]; // [rsp+13Fh] [rbp-11h] BYREF
long long savedregs; // [rsp+150h] [rbp+0h] BYREF
*(_QWORD *)&v30[9] = __readfsqword(0x28u);
v21 = a1;
v20 = a2;
v19 = a3;
v18 = a4;
v17 = a5;
v16 = a6;
v15 = *(long long **)a1;
v14 = *v15;
v9 = 0;
v8 = *(_QWORD *)(a1 + 24) / (unsigned long long)*(unsigned int *)(v14 + 1980);
v23 = v8;
v24 = BYTE4(v8);
v25 = 7;
v26 = a7;
v27 = 9;
v28 = a3;
v29 = a5;
v12 = v30;
v11[4] = &v22;
v11[5] = 15LL;
v11[6] = a4;
v11[7] = a5;
v10 = 2;
if ( a6 )
{
v11[8] = v16;
v11[9] = 6LL;
v11[10] = v20;
v11[11] = v19;
v9 = v19 + 6;
v10 = 4;
}
*(_DWORD *)(v21 + 36) = *(_DWORD *)(v21 + 32);
return translog_write_record(
(long long)v13,
0xCu,
v15[1],
v15,
v9 + v17 + (_DWORD)v12 - ((unsigned int)&savedregs - 32),
v10 + 2,
v11,
&v22,
0LL) != 0;
}
|
_ma_log_rt_split:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x150
MOV EAX,dword ptr [RBP + 0x10]
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x8],RAX
MOV qword ptr [RBP + -0x30],RDI
MOV qword ptr [RBP + -0x38],RSI
MOV dword ptr [RBP + -0x3c],EDX
MOV qword ptr [RBP + -0x48],RCX
MOV dword ptr [RBP + -0x4c],R8D
MOV qword ptr [RBP + -0x58],R9
MOV RAX,qword ptr [RBP + -0x30]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x60],RAX
MOV RAX,qword ptr [RBP + -0x60]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x68],RAX
MOV dword ptr [RBP + -0x108],0x0
JMP 0x0019cc84
LAB_0019cc84:
JMP 0x0019cc86
LAB_0019cc86:
JMP 0x0019cc88
LAB_0019cc88:
MOV RAX,qword ptr [RBP + -0x30]
MOV RAX,qword ptr [RAX + 0x18]
MOV RCX,qword ptr [RBP + -0x68]
MOV ECX,dword ptr [RCX + 0x7bc]
XOR EDX,EDX
DIV RCX
MOV qword ptr [RBP + -0x110],RAX
LEA RAX,[RBP + -0x20]
ADD RAX,0x2
MOV qword ptr [RBP + -0x118],RAX
MOV RAX,qword ptr [RBP + -0x110]
MOV ECX,EAX
MOV RAX,qword ptr [RBP + -0x118]
MOV dword ptr [RAX],ECX
MOV RAX,qword ptr [RBP + -0x110]
SHR RAX,0x20
MOV CL,AL
MOV RAX,qword ptr [RBP + -0x118]
MOV byte ptr [RAX + 0x4],CL
LEA RAX,[RBP + -0x20]
ADD RAX,0x2
ADD RAX,0x5
MOV qword ptr [RBP + -0x78],RAX
MOV RAX,qword ptr [RBP + -0x78]
MOV byte ptr [RAX],0x7
MOV RAX,qword ptr [RBP + -0x78]
ADD RAX,0x1
MOV qword ptr [RBP + -0x78],RAX
JMP 0x0019cd03
LAB_0019cd03:
JMP 0x0019cd05
LAB_0019cd05:
MOV RAX,qword ptr [RBP + -0x78]
MOV qword ptr [RBP + -0x120],RAX
MOV EAX,dword ptr [RBP + 0x10]
MOV CX,AX
MOV RAX,qword ptr [RBP + -0x120]
MOV word ptr [RAX],CX
MOV RAX,qword ptr [RBP + -0x78]
ADD RAX,0x2
MOV qword ptr [RBP + -0x78],RAX
MOV RAX,qword ptr [RBP + -0x78]
MOV byte ptr [RAX],0x9
MOV RAX,qword ptr [RBP + -0x78]
ADD RAX,0x1
MOV qword ptr [RBP + -0x78],RAX
MOV RAX,qword ptr [RBP + -0x78]
MOV qword ptr [RBP + -0x128],RAX
MOV EAX,dword ptr [RBP + -0x3c]
MOV CX,AX
MOV RAX,qword ptr [RBP + -0x128]
MOV word ptr [RAX],CX
MOV RAX,qword ptr [RBP + -0x78]
ADD RAX,0x2
MOV qword ptr [RBP + -0x78],RAX
MOV RAX,qword ptr [RBP + -0x78]
MOV qword ptr [RBP + -0x130],RAX
MOV EAX,dword ptr [RBP + -0x4c]
MOV CX,AX
MOV RAX,qword ptr [RBP + -0x130]
MOV word ptr [RAX],CX
MOV RAX,qword ptr [RBP + -0x78]
ADD RAX,0x2
MOV qword ptr [RBP + -0x78],RAX
LEA RAX,[RBP + -0x20]
MOV qword ptr [RBP + -0xe0],RAX
MOV qword ptr [RBP + -0xd8],0xf
MOV RAX,qword ptr [RBP + -0x48]
MOV qword ptr [RBP + -0xd0],RAX
MOV EAX,dword ptr [RBP + -0x4c]
MOV qword ptr [RBP + -0xc8],RAX
MOV dword ptr [RBP + -0x104],0x2
CMP qword ptr [RBP + -0x58],0x0
JZ 0x0019ce0f
MOV RAX,qword ptr [RBP + -0x58]
MOV qword ptr [RBP + -0xc0],RAX
MOV qword ptr [RBP + -0xb8],0x6
MOV RAX,qword ptr [RBP + -0x38]
MOV qword ptr [RBP + -0xb0],RAX
MOV EAX,dword ptr [RBP + -0x3c]
MOV qword ptr [RBP + -0xa8],RAX
MOV EAX,dword ptr [RBP + -0x3c]
ADD EAX,0x6
MOV dword ptr [RBP + -0x108],EAX
MOV EAX,dword ptr [RBP + -0x104]
ADD EAX,0x2
MOV dword ptr [RBP + -0x104],EAX
LAB_0019ce0f:
MOV RAX,qword ptr [RBP + -0x30]
MOV ECX,dword ptr [RAX + 0x20]
MOV RAX,qword ptr [RBP + -0x30]
MOV dword ptr [RAX + 0x24],ECX
MOV RAX,qword ptr [RBP + -0x60]
MOV RDX,qword ptr [RAX + 0x8]
MOV RCX,qword ptr [RBP + -0x60]
MOV RAX,qword ptr [RBP + -0x78]
LEA RSI,[RBP + -0x20]
SUB RAX,RSI
MOV ESI,dword ptr [RBP + -0x4c]
ADD RAX,RSI
MOV ESI,dword ptr [RBP + -0x108]
ADD RAX,RSI
MOV R8D,EAX
MOV R9D,dword ptr [RBP + -0x104]
ADD R9D,0x2
LEA R10,[RBP + -0x100]
LEA RAX,[RBP + -0x20]
LEA RDI,[RBP + -0x70]
MOV ESI,0xc
XOR R11D,R11D
MOV qword ptr [RSP],R10
MOV qword ptr [RSP + 0x8],RAX
MOV qword ptr [RSP + 0x10],0x0
CALL 0x00155370
CMP AL,0x0
JZ 0x0019ce8b
JMP 0x0019ce85
LAB_0019ce85:
MOV byte ptr [RBP + -0x21],0x1
JMP 0x0019ce91
LAB_0019ce8b:
JMP 0x0019ce8d
LAB_0019ce8d:
MOV byte ptr [RBP + -0x21],0x0
LAB_0019ce91:
MOV AL,byte ptr [RBP + -0x21]
MOV byte ptr [RBP + -0x131],AL
MOV RAX,qword ptr FS:[0x28]
MOV RCX,qword ptr [RBP + -0x8]
CMP RAX,RCX
JNZ 0x0019cebb
MOV AL,byte ptr [RBP + -0x131]
ADD RSP,0x150
POP RBP
RET
LAB_0019cebb:
CALL 0x0012a270
|
int8
_ma_log_rt_split(long *param_1,int8 param_2,uint param_3,int8 param_4,uint param_5,
long param_6,int2 param_7)
{
char cVar1;
ulong uVar2;
long in_FS_OFFSET;
int local_110;
int local_10c;
int1 local_108 [32];
int1 *local_e8;
int8 local_e0;
int8 local_d8;
ulong local_d0;
long local_c8;
int8 local_c0;
int8 local_b8;
ulong local_b0;
int1 *local_80;
int1 local_78 [8];
long local_70;
long *local_68;
long local_60;
uint local_54;
int8 local_50;
uint local_44;
int8 local_40;
long *local_38;
int1 local_29;
int1 local_28 [2];
int4 local_26;
int1 local_22;
int1 local_21;
int2 local_20;
int1 local_1e;
int2 local_1d;
int2 local_1b;
int1 auStack_19 [9];
long local_10;
local_10 = *(long *)(in_FS_OFFSET + 0x28);
local_68 = (long *)*param_1;
local_70 = *local_68;
local_110 = 0;
uVar2 = (ulong)param_1[3] / (ulong)*(uint *)(local_70 + 0x7bc);
local_26 = (int4)uVar2;
local_22 = (int1)(uVar2 >> 0x20);
local_21 = 7;
local_20 = param_7;
local_1e = 9;
local_1d = (int2)param_3;
local_1b = (int2)param_5;
local_80 = auStack_19;
local_e8 = local_28;
local_e0 = 0xf;
local_d0 = (ulong)param_5;
local_10c = 2;
if (param_6 != 0) {
local_c0 = 6;
local_b0 = (ulong)param_3;
local_110 = param_3 + 6;
local_10c = 4;
local_c8 = param_6;
local_b8 = param_2;
}
*(int *)((long)param_1 + 0x24) = (int)param_1[4];
local_d8 = param_4;
local_60 = param_6;
local_54 = param_5;
local_50 = param_4;
local_44 = param_3;
local_40 = param_2;
local_38 = param_1;
cVar1 = translog_write_record
(local_78,0xc,local_68[1],local_68,
((int)local_80 - (int)local_28) + param_5 + local_110,local_10c + 2,local_108,
local_28,0);
local_29 = cVar1 != '\0';
if (*(long *)(in_FS_OFFSET + 0x28) == local_10) {
return CONCAT71((int7)((ulong)*(long *)(in_FS_OFFSET + 0x28) >> 8),local_29);
}
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
|
|
64,283
|
ma_set_dynamic
|
eloqsql/libmariadb/libmariadb/ma_array.c
|
my_bool ma_set_dynamic(DYNAMIC_ARRAY *array, void * element, uint idx)
{
if (idx >= array->elements)
{
if (idx >= array->max_element)
{
uint size;
char *new_ptr;
size=(idx+array->alloc_increment)/array->alloc_increment;
size*= array->alloc_increment;
if (!(new_ptr=(char*) realloc(array->buffer,size*
array->size_of_element)))
return TRUE;
array->buffer=new_ptr;
array->max_element=size;
}
memset((array->buffer+array->elements*array->size_of_element), 0,
(idx - array->elements)*array->size_of_element);
array->elements=idx+1;
}
memcpy(array->buffer+(idx * array->size_of_element),element,
(size_t) array->size_of_element);
return FALSE;
}
|
O0
|
c
|
ma_set_dynamic:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movl %edx, -0x1c(%rbp)
movl -0x1c(%rbp), %eax
movq -0x10(%rbp), %rcx
cmpl 0x8(%rcx), %eax
jb 0x748eb
movl -0x1c(%rbp), %eax
movq -0x10(%rbp), %rcx
cmpl 0xc(%rcx), %eax
jb 0x748a6
movl -0x1c(%rbp), %eax
movq -0x10(%rbp), %rcx
addl 0x10(%rcx), %eax
movq -0x10(%rbp), %rcx
xorl %edx, %edx
divl 0x10(%rcx)
movl %eax, -0x20(%rbp)
movq -0x10(%rbp), %rax
movl 0x10(%rax), %eax
imull -0x20(%rbp), %eax
movl %eax, -0x20(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rdi
movl -0x20(%rbp), %eax
movq -0x10(%rbp), %rcx
imull 0x14(%rcx), %eax
movl %eax, %eax
movl %eax, %esi
callq 0x380c0
movq %rax, -0x28(%rbp)
cmpq $0x0, %rax
jne 0x74891
movb $0x1, -0x1(%rbp)
jmp 0x74918
movq -0x28(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, (%rax)
movl -0x20(%rbp), %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0xc(%rax)
movq -0x10(%rbp), %rax
movq (%rax), %rdi
movq -0x10(%rbp), %rax
movl 0x8(%rax), %eax
movq -0x10(%rbp), %rcx
imull 0x14(%rcx), %eax
movl %eax, %eax
addq %rax, %rdi
movl -0x1c(%rbp), %eax
movq -0x10(%rbp), %rcx
subl 0x8(%rcx), %eax
movq -0x10(%rbp), %rcx
imull 0x14(%rcx), %eax
movl %eax, %eax
movl %eax, %edx
xorl %esi, %esi
callq 0x38300
movl -0x1c(%rbp), %ecx
addl $0x1, %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x8(%rax)
movq -0x10(%rbp), %rax
movq (%rax), %rdi
movl -0x1c(%rbp), %eax
movq -0x10(%rbp), %rcx
imull 0x14(%rcx), %eax
movl %eax, %eax
addq %rax, %rdi
movq -0x18(%rbp), %rsi
movq -0x10(%rbp), %rax
movl 0x14(%rax), %eax
movl %eax, %edx
callq 0x380b0
movb $0x0, -0x1(%rbp)
movb -0x1(%rbp), %al
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
|
ma_set_dynamic:
push rbp
mov rbp, rsp
sub rsp, 30h
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov [rbp+var_1C], edx
mov eax, [rbp+var_1C]
mov rcx, [rbp+var_10]
cmp eax, [rcx+8]
jb loc_748EB
mov eax, [rbp+var_1C]
mov rcx, [rbp+var_10]
cmp eax, [rcx+0Ch]
jb short loc_748A6
mov eax, [rbp+var_1C]
mov rcx, [rbp+var_10]
add eax, [rcx+10h]
mov rcx, [rbp+var_10]
xor edx, edx
div dword ptr [rcx+10h]
mov [rbp+var_20], eax
mov rax, [rbp+var_10]
mov eax, [rax+10h]
imul eax, [rbp+var_20]
mov [rbp+var_20], eax
mov rax, [rbp+var_10]
mov rdi, [rax]
mov eax, [rbp+var_20]
mov rcx, [rbp+var_10]
imul eax, [rcx+14h]
mov eax, eax
mov esi, eax
call _realloc
mov [rbp+var_28], rax
cmp rax, 0
jnz short loc_74891
mov [rbp+var_1], 1
jmp loc_74918
loc_74891:
mov rcx, [rbp+var_28]
mov rax, [rbp+var_10]
mov [rax], rcx
mov ecx, [rbp+var_20]
mov rax, [rbp+var_10]
mov [rax+0Ch], ecx
loc_748A6:
mov rax, [rbp+var_10]
mov rdi, [rax]
mov rax, [rbp+var_10]
mov eax, [rax+8]
mov rcx, [rbp+var_10]
imul eax, [rcx+14h]
mov eax, eax
add rdi, rax
mov eax, [rbp+var_1C]
mov rcx, [rbp+var_10]
sub eax, [rcx+8]
mov rcx, [rbp+var_10]
imul eax, [rcx+14h]
mov eax, eax
mov edx, eax
xor esi, esi
call _memset
mov ecx, [rbp+var_1C]
add ecx, 1
mov rax, [rbp+var_10]
mov [rax+8], ecx
loc_748EB:
mov rax, [rbp+var_10]
mov rdi, [rax]
mov eax, [rbp+var_1C]
mov rcx, [rbp+var_10]
imul eax, [rcx+14h]
mov eax, eax
add rdi, rax
mov rsi, [rbp+var_18]
mov rax, [rbp+var_10]
mov eax, [rax+14h]
mov edx, eax
call _memcpy
mov [rbp+var_1], 0
loc_74918:
mov al, [rbp+var_1]
add rsp, 30h
pop rbp
retn
|
char ma_set_dynamic(long long a1, long long a2, unsigned int a3)
{
long long v4; // [rsp+8h] [rbp-28h]
unsigned int v5; // [rsp+10h] [rbp-20h]
if ( a3 < *(_DWORD *)(a1 + 8) )
goto LABEL_7;
if ( a3 < *(_DWORD *)(a1 + 12) )
{
LABEL_6:
memset(
(unsigned int)(*(_DWORD *)(a1 + 20) * *(_DWORD *)(a1 + 8)) + *(_QWORD *)a1,
0LL,
*(_DWORD *)(a1 + 20) * (a3 - *(_DWORD *)(a1 + 8)));
*(_DWORD *)(a1 + 8) = a3 + 1;
LABEL_7:
memcpy(*(_DWORD *)(a1 + 20) * a3 + *(_QWORD *)a1, a2, *(unsigned int *)(a1 + 20));
return 0;
}
v5 = (*(_DWORD *)(a1 + 16) + a3) / *(_DWORD *)(a1 + 16) * *(_DWORD *)(a1 + 16);
v4 = realloc(*(_QWORD *)a1, *(_DWORD *)(a1 + 20) * v5);
if ( v4 )
{
*(_QWORD *)a1 = v4;
*(_DWORD *)(a1 + 12) = v5;
goto LABEL_6;
}
return 1;
}
|
ma_set_dynamic:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x30
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x18],RSI
MOV dword ptr [RBP + -0x1c],EDX
MOV EAX,dword ptr [RBP + -0x1c]
MOV RCX,qword ptr [RBP + -0x10]
CMP EAX,dword ptr [RCX + 0x8]
JC 0x001748eb
MOV EAX,dword ptr [RBP + -0x1c]
MOV RCX,qword ptr [RBP + -0x10]
CMP EAX,dword ptr [RCX + 0xc]
JC 0x001748a6
MOV EAX,dword ptr [RBP + -0x1c]
MOV RCX,qword ptr [RBP + -0x10]
ADD EAX,dword ptr [RCX + 0x10]
MOV RCX,qword ptr [RBP + -0x10]
XOR EDX,EDX
DIV dword ptr [RCX + 0x10]
MOV dword ptr [RBP + -0x20],EAX
MOV RAX,qword ptr [RBP + -0x10]
MOV EAX,dword ptr [RAX + 0x10]
IMUL EAX,dword ptr [RBP + -0x20]
MOV dword ptr [RBP + -0x20],EAX
MOV RAX,qword ptr [RBP + -0x10]
MOV RDI,qword ptr [RAX]
MOV EAX,dword ptr [RBP + -0x20]
MOV RCX,qword ptr [RBP + -0x10]
IMUL EAX,dword ptr [RCX + 0x14]
MOV EAX,EAX
MOV ESI,EAX
CALL 0x001380c0
MOV qword ptr [RBP + -0x28],RAX
CMP RAX,0x0
JNZ 0x00174891
MOV byte ptr [RBP + -0x1],0x1
JMP 0x00174918
LAB_00174891:
MOV RCX,qword ptr [RBP + -0x28]
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RAX],RCX
MOV ECX,dword ptr [RBP + -0x20]
MOV RAX,qword ptr [RBP + -0x10]
MOV dword ptr [RAX + 0xc],ECX
LAB_001748a6:
MOV RAX,qword ptr [RBP + -0x10]
MOV RDI,qword ptr [RAX]
MOV RAX,qword ptr [RBP + -0x10]
MOV EAX,dword ptr [RAX + 0x8]
MOV RCX,qword ptr [RBP + -0x10]
IMUL EAX,dword ptr [RCX + 0x14]
MOV EAX,EAX
ADD RDI,RAX
MOV EAX,dword ptr [RBP + -0x1c]
MOV RCX,qword ptr [RBP + -0x10]
SUB EAX,dword ptr [RCX + 0x8]
MOV RCX,qword ptr [RBP + -0x10]
IMUL EAX,dword ptr [RCX + 0x14]
MOV EAX,EAX
MOV EDX,EAX
XOR ESI,ESI
CALL 0x00138300
MOV ECX,dword ptr [RBP + -0x1c]
ADD ECX,0x1
MOV RAX,qword ptr [RBP + -0x10]
MOV dword ptr [RAX + 0x8],ECX
LAB_001748eb:
MOV RAX,qword ptr [RBP + -0x10]
MOV RDI,qword ptr [RAX]
MOV EAX,dword ptr [RBP + -0x1c]
MOV RCX,qword ptr [RBP + -0x10]
IMUL EAX,dword ptr [RCX + 0x14]
MOV EAX,EAX
ADD RDI,RAX
MOV RSI,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RBP + -0x10]
MOV EAX,dword ptr [RAX + 0x14]
MOV EDX,EAX
CALL 0x001380b0
MOV byte ptr [RBP + -0x1],0x0
LAB_00174918:
MOV AL,byte ptr [RBP + -0x1]
ADD RSP,0x30
POP RBP
RET
|
int1 ma_set_dynamic(long *param_1,void *param_2,uint param_3)
{
int iVar1;
void *pvVar2;
if (*(uint *)(param_1 + 1) <= param_3) {
if (*(uint *)((long)param_1 + 0xc) <= param_3) {
iVar1 = (int)param_1[2] * ((param_3 + (int)param_1[2]) / *(uint *)(param_1 + 2));
pvVar2 = realloc((void *)*param_1,(ulong)(uint)(iVar1 * *(int *)((long)param_1 + 0x14)));
if (pvVar2 == (void *)0x0) {
return 1;
}
*param_1 = (long)pvVar2;
*(int *)((long)param_1 + 0xc) = iVar1;
}
memset((void *)(*param_1 + (ulong)(uint)((int)param_1[1] * *(int *)((long)param_1 + 0x14))),0,
(ulong)((param_3 - (int)param_1[1]) * *(int *)((long)param_1 + 0x14)));
*(uint *)(param_1 + 1) = param_3 + 1;
}
memcpy((void *)(*param_1 + (ulong)(param_3 * *(int *)((long)param_1 + 0x14))),param_2,
(ulong)*(uint *)((long)param_1 + 0x14));
return 0;
}
|
|
64,284
|
mysql_fetch_row_start_internal
|
eloqsql/libmariadb/libmariadb/mariadb_async.c
|
static void
mysql_fetch_row_start_internal(void *d)
{
MK_ASYNC_INTERNAL_BODY(
mysql_fetch_row,
(parms->result),
parms->result->handle,
MYSQL_ROW,
r_ptr)
}
|
O3
|
c
|
mysql_fetch_row_start_internal:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq (%rdi), %rdi
movq 0x78(%rdi), %rax
movq 0x480(%rax), %rax
movq 0x28(%rax), %rbx
callq 0x4a40c
movq %rax, 0x8(%rbx)
movl $0x0, (%rbx)
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
|
mysql_fetch_row_start_internal:
push rbp
mov rbp, rsp
push rbx
push rax
mov rdi, [rdi]
mov rax, [rdi+78h]
mov rax, [rax+480h]
mov rbx, [rax+28h]
call mysql_fetch_row
mov [rbx+8], rax
mov dword ptr [rbx], 0
add rsp, 8
pop rbx
pop rbp
retn
|
long long mysql_fetch_row_start_internal(long long *a1)
{
long long v1; // rdi
long long v2; // rbx
long long result; // rax
v1 = *a1;
v2 = *(_QWORD *)(*(_QWORD *)(*(_QWORD *)(v1 + 120) + 1152LL) + 40LL);
result = mysql_fetch_row(v1);
*(_QWORD *)(v2 + 8) = result;
*(_DWORD *)v2 = 0;
return result;
}
|
mysql_fetch_row_start_internal:
PUSH RBP
MOV RBP,RSP
PUSH RBX
PUSH RAX
MOV RDI,qword ptr [RDI]
MOV RAX,qword ptr [RDI + 0x78]
MOV RAX,qword ptr [RAX + 0x480]
MOV RBX,qword ptr [RAX + 0x28]
CALL 0x0014a40c
MOV qword ptr [RBX + 0x8],RAX
MOV dword ptr [RBX],0x0
ADD RSP,0x8
POP RBX
POP RBP
RET
|
void mysql_fetch_row_start_internal(long *param_1)
{
int4 *puVar1;
int8 uVar2;
puVar1 = *(int4 **)(*(long *)(*(long *)(*param_1 + 0x78) + 0x480) + 0x28);
uVar2 = mysql_fetch_row();
*(int8 *)(puVar1 + 2) = uVar2;
*puVar1 = 0;
return;
}
|
|
64,285
|
mysql_data_seek
|
eloqsql/libmariadb/libmariadb/mariadb_lib.c
|
void STDCALL
mysql_data_seek(MYSQL_RES *result, unsigned long long row)
{
MYSQL_ROWS *tmp=0;
if (result->data)
for (tmp=result->data->data; row-- && tmp ; tmp = tmp->next) ;
result->current_row=0;
result->data_cursor = tmp;
}
|
O0
|
c
|
mysql_data_seek:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq $0x0, -0x18(%rbp)
movq -0x8(%rbp), %rax
cmpq $0x0, 0x18(%rax)
je 0x2006d
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rax
movq (%rax), %rax
movq %rax, -0x18(%rbp)
movq -0x10(%rbp), %rcx
movq %rcx, %rax
addq $-0x1, %rax
movq %rax, -0x10(%rbp)
xorl %eax, %eax
cmpq $0x0, %rcx
movb %al, -0x19(%rbp)
je 0x20053
cmpq $0x0, -0x18(%rbp)
setne %al
movb %al, -0x19(%rbp)
movb -0x19(%rbp), %al
testb $0x1, %al
jne 0x2005c
jmp 0x2006b
jmp 0x2005e
movq -0x18(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x18(%rbp)
jmp 0x2002e
jmp 0x2006d
movq -0x8(%rbp), %rax
movq $0x0, 0x68(%rax)
movq -0x18(%rbp), %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x20(%rax)
popq %rbp
retq
nopw (%rax,%rax)
|
mysql_data_seek:
push rbp
mov rbp, rsp
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov [rbp+var_18], 0
mov rax, [rbp+var_8]
cmp qword ptr [rax+18h], 0
jz short loc_2006D
mov rax, [rbp+var_8]
mov rax, [rax+18h]
mov rax, [rax]
mov [rbp+var_18], rax
loc_2002E:
mov rcx, [rbp+var_10]
mov rax, rcx
add rax, 0FFFFFFFFFFFFFFFFh
mov [rbp+var_10], rax
xor eax, eax
cmp rcx, 0
mov [rbp+var_19], al
jz short loc_20053
cmp [rbp+var_18], 0
setnz al
mov [rbp+var_19], al
loc_20053:
mov al, [rbp+var_19]
test al, 1
jnz short loc_2005C
jmp short loc_2006B
loc_2005C:
jmp short $+2
loc_2005E:
mov rax, [rbp+var_18]
mov rax, [rax]
mov [rbp+var_18], rax
jmp short loc_2002E
loc_2006B:
jmp short $+2
loc_2006D:
mov rax, [rbp+var_8]
mov qword ptr [rax+68h], 0
mov rcx, [rbp+var_18]
mov rax, [rbp+var_8]
mov [rax+20h], rcx
pop rbp
retn
|
long long mysql_data_seek(long long a1, long long a2)
{
long long v2; // rcx
long long result; // rax
bool v4; // [rsp+1h] [rbp-19h]
_QWORD *i; // [rsp+2h] [rbp-18h]
i = 0LL;
if ( *(_QWORD *)(a1 + 24) )
{
for ( i = **(_QWORD ***)(a1 + 24); ; i = (_QWORD *)*i )
{
v2 = a2--;
v4 = 0;
if ( v2 )
v4 = i != 0LL;
if ( !v4 )
break;
}
}
*(_QWORD *)(a1 + 104) = 0LL;
result = a1;
*(_QWORD *)(a1 + 32) = i;
return result;
}
|
mysql_data_seek:
PUSH RBP
MOV RBP,RSP
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV qword ptr [RBP + -0x18],0x0
MOV RAX,qword ptr [RBP + -0x8]
CMP qword ptr [RAX + 0x18],0x0
JZ 0x0012006d
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX + 0x18]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x18],RAX
LAB_0012002e:
MOV RCX,qword ptr [RBP + -0x10]
MOV RAX,RCX
ADD RAX,-0x1
MOV qword ptr [RBP + -0x10],RAX
XOR EAX,EAX
CMP RCX,0x0
MOV byte ptr [RBP + -0x19],AL
JZ 0x00120053
CMP qword ptr [RBP + -0x18],0x0
SETNZ AL
MOV byte ptr [RBP + -0x19],AL
LAB_00120053:
MOV AL,byte ptr [RBP + -0x19]
TEST AL,0x1
JNZ 0x0012005c
JMP 0x0012006b
LAB_0012005c:
JMP 0x0012005e
LAB_0012005e:
MOV RAX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x18],RAX
JMP 0x0012002e
LAB_0012006b:
JMP 0x0012006d
LAB_0012006d:
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RAX + 0x68],0x0
MOV RCX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RAX + 0x20],RCX
POP RBP
RET
|
void mysql_data_seek(long param_1,long param_2)
{
int8 *local_20;
long local_18;
local_20 = (int8 *)0x0;
if (*(long *)(param_1 + 0x18) != 0) {
local_18 = param_2;
for (local_20 = (int8 *)**(int8 **)(param_1 + 0x18);
local_18 != 0 && local_20 != (int8 *)0x0; local_20 = (int8 *)*local_20) {
local_18 = local_18 + -1;
}
}
*(int8 *)(param_1 + 0x68) = 0;
*(int8 **)(param_1 + 0x20) = local_20;
return;
}
|
|
64,286
|
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[](std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
|
monkey531[P]llama/common/json.hpp
|
reference operator[](typename object_t::key_type key)
{
// implicitly convert null value to an empty object
if (is_null())
{
m_data.m_type = value_t::object;
m_data.m_value.object = create<object_t>();
assert_invariant();
}
// operator[] only works for objects
if (JSON_HEDLEY_LIKELY(is_object()))
{
auto result = m_data.m_value.object->emplace(std::move(key), nullptr);
return set_parent(result.first->second);
}
JSON_THROW(type_error::create(305, detail::concat("cannot use operator[] with a string argument with ", type_name()), this));
}
|
O2
|
cpp
|
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>::operator[](std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>):
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x28, %rsp
movq %rsi, %rbx
movq %rdi, %r14
movb (%rdi), %al
testb %al, %al
jne 0x70f0f
movb $0x1, (%r14)
callq 0x58d2c
movq %rax, 0x8(%r14)
pushq $0x1
popq %rsi
movq %r14, %rdi
callq 0x4da6e
movb (%r14), %al
cmpb $0x1, %al
jne 0x70f4f
movq 0x8(%r14), %r14
movq %rsp, %r15
movq %r15, %rdi
xorl %esi, %esi
callq 0x476ac
movq %r14, %rdi
movq %rbx, %rsi
movq %r15, %rdx
callq 0x575d2
movq %rax, %rbx
movq %rsp, %rdi
callq 0x46ce8
addq $0x20, %rbx
movq %rbx, %rax
addq $0x28, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
pushq $0x20
popq %rdi
callq 0x223e0
movq %rax, %rbx
movq %r14, %rdi
callq 0x4df64
leaq 0x20(%rsp), %rdx
movq %rax, (%rdx)
leaq 0x2f312(%rip), %rsi # 0xa0283
movq %rsp, %rdi
callq 0x70fd9
movb $0x1, %bpl
movq %rsp, %rdx
movq %rbx, %rdi
movl $0x131, %esi # imm = 0x131
movq %r14, %rcx
callq 0x56eb0
xorl %ebp, %ebp
leaq 0x70330(%rip), %rsi # 0xe12c8
leaq -0x1811b(%rip), %rdx # 0x58e84
movq %rbx, %rdi
callq 0x22d40
movq %rax, %r14
movq %rsp, %rdi
callq 0x46ce8
jmp 0x70fd1
movq %rax, %r14
movq %rsp, %rdi
callq 0x22f98
testb %bpl, %bpl
jne 0x70fc9
jmp 0x70fd1
movq %rax, %r14
movq %rbx, %rdi
callq 0x225c0
movq %r14, %rdi
callq 0x22da0
|
_ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEixES9_:
push rbp; char
push r15; int
push r14; int
push rbx; int
sub rsp, 28h
mov rbx, rsi
mov r14, rdi
mov al, [rdi]
test al, al
jnz short loc_70F0F
mov byte ptr [r14], 1
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE6createINS2_IS9_SD_St4lessIvESaISt4pairIKS9_SD_EEEEJEEEPT_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<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>>>>>()
mov [r14+8], rax
push 1
pop rsi
mov rdi, r14
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 al, [r14]
loc_70F0F:
cmp al, 1
jnz short loc_70F4F
mov r14, [r14+8]
mov r15, rsp
mov rdi, r15
xor esi, esi
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEC2EDn; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::basic_json(decltype(nullptr))
mov rdi, r14
mov rsi, rbx
mov rdx, r15
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 rbx, rax
mov rdi, rsp
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvED2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::~basic_json()
add rbx, 20h ; ' '
mov rax, rbx
add rsp, 28h
pop rbx
pop r14
pop r15
pop rbp
retn
loc_70F4F:
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_28]
mov [rdx], rax
lea rsi, aCannotUseOpera_0; "cannot use operator[] with a string arg"...
mov rdi, rsp
call _ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJRA51_KcPS9_EEET_DpOT0_; nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[51],char const*>(char const(&)[51],char const* &&)
mov bpl, 1
mov rdx, rsp
mov rdi, rbx; this
mov esi, 131h; int
mov rcx, r14
call _ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_
xor ebp, ebp
lea rsi, _ZTIN8nlohmann16json_abi_v3_11_36detail10type_errorE; lptinfo
lea rdx, _ZN8nlohmann16json_abi_v3_11_36detail9exceptionD2Ev; void (*)(void *)
mov rdi, rbx; void *
call ___cxa_throw
mov r14, rax
mov rdi, rsp
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvED2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::~basic_json()
jmp short loc_70FD1
mov r14, rax
mov rdi, rsp; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
test bpl, bpl
jnz short loc_70FC9
jmp short loc_70FD1
mov r14, rax
loc_70FC9:
mov rdi, rbx; void *
call ___cxa_free_exception
loc_70FD1:
mov rdi, r14
call __Unwind_Resume
|
long long nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::operator[](
long long a1,
_QWORD *a2)
{
char v2; // al
_QWORD **v3; // r14
long long v4; // rbx
nlohmann::json_abi_v3_11_3::detail::type_error *exception; // rbx
_QWORD v7[9]; // [rsp+0h] [rbp-48h] BYREF
v2 = *(_BYTE *)a1;
if ( !*(_BYTE *)a1 )
{
*(_BYTE *)a1 = 1;
*(_QWORD *)(a1 + 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>::create<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>>>>>();
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);
v2 = *(_BYTE *)a1;
}
if ( v2 != 1 )
{
exception = (nlohmann::json_abi_v3_11_3::detail::type_error *)__cxa_allocate_exception(0x20uLL);
v7[4] = 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(&)[51],char const*>(
v7,
"cannot use operator[] with a string argument with ");
ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_(
exception,
305,
(long long)v7);
__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);
}
v3 = *(_QWORD ***)(a1 + 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>::basic_json((long long)v7);
v4 = 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(
v3,
a2,
(long long)v7);
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)v7);
return v4 + 32;
}
|
operator[]:
PUSH RBP
PUSH R15
PUSH R14
PUSH RBX
SUB RSP,0x28
MOV RBX,RSI
MOV R14,RDI
MOV AL,byte ptr [RDI]
TEST AL,AL
JNZ 0x00170f0f
MOV byte ptr [R14],0x1
CALL 0x00158d2c
MOV qword ptr [R14 + 0x8],RAX
PUSH 0x1
POP RSI
MOV RDI,R14
CALL 0x0014da6e
MOV AL,byte ptr [R14]
LAB_00170f0f:
CMP AL,0x1
JNZ 0x00170f4f
MOV R14,qword ptr [R14 + 0x8]
MOV R15,RSP
MOV RDI,R15
XOR ESI,ESI
CALL 0x001476ac
LAB_00170f24:
MOV RDI,R14
MOV RSI,RBX
MOV RDX,R15
CALL 0x001575d2
LAB_00170f32:
MOV RBX,RAX
MOV RDI,RSP
CALL 0x00146ce8
ADD RBX,0x20
MOV RAX,RBX
ADD RSP,0x28
POP RBX
POP R14
POP R15
POP RBP
RET
LAB_00170f4f:
PUSH 0x20
POP RDI
CALL 0x001223e0
MOV RBX,RAX
MOV RDI,R14
CALL 0x0014df64
LEA RDX,[RSP + 0x20]
MOV qword ptr [RDX],RAX
LAB_00170f6a:
LEA RSI,[0x1a0283]
MOV RDI,RSP
CALL 0x00170fd9
MOV BPL,0x1
LAB_00170f7c:
MOV RDX,RSP
MOV RDI,RBX
MOV ESI,0x131
MOV RCX,R14
CALL 0x00156eb0
XOR EBP,EBP
LEA RSI,[0x1e12c8]
LEA RDX,[0x158e84]
MOV RDI,RBX
CALL 0x00122d40
|
/* nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector,
std::__cxx11::string, 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[](std::__cxx11::string) */
long __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,string *param_2)
{
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_00;
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
bVar1;
ordered_map *poVar2;
long lVar3;
int8 uVar4;
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
abStack_48 [32];
char *local_28;
bVar1 = *this;
if (bVar1 == (basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
)0x0) {
*this = (basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
)0x1;
poVar2 = create<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>>>>>
();
*(ordered_map **)(this + 8) = poVar2;
assert_invariant(SUB81(this,0));
bVar1 = *this;
}
if (bVar1 == (basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
)0x1) {
this_00 = *(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 + 8);
basic_json((_func_decltype_nullptr *)abStack_48);
/* try { // try from 00170f24 to 00170f31 has its CatchHandler @ 00170fa7 */
lVar3 = 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(this_00,param_2,abStack_48);
~basic_json(abStack_48);
return lVar3 + 0x20;
}
uVar4 = __cxa_allocate_exception(0x20);
local_28 = (char *)type_name(this);
/* try { // try from 00170f6a to 00170f78 has its CatchHandler @ 00170fc6 */
detail::concat<std::__cxx11::string,char_const(&)[51],char_const*>
((detail *)abStack_48,"cannot use operator[] with a string argument with ",&local_28);
/* try { // try from 00170f7c to 00170fa6 has its CatchHandler @ 00170fb4 */
_ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_
(uVar4,0x131,abStack_48,this);
/* WARNING: Subroutine does not return */
__cxa_throw(uVar4,&detail::type_error::typeinfo,detail::exception::~exception);
}
|
|
64,287
|
delete_tails
|
eloqsql/storage/maria/ma_blockrec.c
|
static my_bool delete_tails(MARIA_HA *info, MARIA_RECORD_POS *tails)
{
my_bool res= 0;
DBUG_ENTER("delete_tails");
for (; *tails; tails++)
{
if (delete_head_or_tail(info,
ma_recordpos_to_page(*tails),
ma_recordpos_to_dir_entry(*tails), 0, 1))
res= 1;
}
DBUG_RETURN(res);
}
|
O3
|
c
|
delete_tails:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq (%rsi), %rax
testq %rax, %rax
je 0x5e698
movq %rsi, %rbx
movq %rdi, %r14
addq $0x8, %rbx
xorl %r15d, %r15d
movl $0x1, %r12d
movq %rax, %rsi
shrq $0x8, %rsi
movzbl %al, %edx
movq %r14, %rdi
xorl %ecx, %ecx
movl $0x1, %r8d
callq 0x5db55
testb %al, %al
movzbl %r15b, %r15d
cmovnel %r12d, %r15d
movq (%rbx), %rax
addq $0x8, %rbx
testq %rax, %rax
jne 0x5e666
jmp 0x5e69b
xorl %r15d, %r15d
movl %r15d, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
|
delete_tails:
push rbp
mov rbp, rsp
push r15
push r14
push r12
push rbx
mov rax, [rsi]
test rax, rax
jz short loc_5E698
mov rbx, rsi
mov r14, rdi
add rbx, 8
xor r15d, r15d
mov r12d, 1
loc_5E666:
mov rsi, rax
shr rsi, 8
movzx edx, al
mov rdi, r14
xor ecx, ecx
mov r8d, 1
call delete_head_or_tail
test al, al
movzx r15d, r15b
cmovnz r15d, r12d
mov rax, [rbx]
add rbx, 8
test rax, rax
jnz short loc_5E666
jmp short loc_5E69B
loc_5E698:
xor r15d, r15d
loc_5E69B:
mov eax, r15d
pop rbx
pop r12
pop r14
pop r15
pop rbp
retn
|
long long delete_tails(_DWORD *a1, unsigned long long *a2)
{
unsigned long long v2; // rax
unsigned long long *v3; // rbx
unsigned int v4; // r15d
v2 = *a2;
if ( *a2 )
{
v3 = a2 + 1;
LOBYTE(v4) = 0;
do
{
v4 = (unsigned __int8)v4;
if ( (unsigned __int8)delete_head_or_tail(a1, v2 >> 8, (unsigned __int8)v2, 0, 1) )
v4 = 1;
v2 = *v3++;
}
while ( v2 );
}
else
{
return 0;
}
return v4;
}
|
delete_tails:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
MOV RAX,qword ptr [RSI]
TEST RAX,RAX
JZ 0x0015e698
MOV RBX,RSI
MOV R14,RDI
ADD RBX,0x8
XOR R15D,R15D
MOV R12D,0x1
LAB_0015e666:
MOV RSI,RAX
SHR RSI,0x8
MOVZX EDX,AL
MOV RDI,R14
XOR ECX,ECX
MOV R8D,0x1
CALL 0x0015db55
TEST AL,AL
MOVZX R15D,R15B
CMOVNZ R15D,R12D
MOV RAX,qword ptr [RBX]
ADD RBX,0x8
TEST RAX,RAX
JNZ 0x0015e666
JMP 0x0015e69b
LAB_0015e698:
XOR R15D,R15D
LAB_0015e69b:
MOV EAX,R15D
POP RBX
POP R12
POP R14
POP R15
POP RBP
RET
|
int4 delete_tails(int8 param_1,ulong *param_2)
{
char cVar1;
ulong uVar2;
int4 uVar3;
uVar2 = *param_2;
if (uVar2 == 0) {
uVar3 = 0;
}
else {
param_2 = param_2 + 1;
uVar3 = 0;
do {
cVar1 = delete_head_or_tail(param_1,uVar2 >> 8,uVar2 & 0xff,0,1);
if (cVar1 != '\0') {
uVar3 = 1;
}
uVar2 = *param_2;
param_2 = param_2 + 1;
} while (uVar2 != 0);
}
return uVar3;
}
|
|
64,288
|
my_once_alloc
|
eloqsql/mysys/my_once.c
|
void* my_once_alloc(size_t Size, myf MyFlags)
{
size_t get_size, max_left;
uchar* point;
reg1 USED_MEM *next;
reg2 USED_MEM **prev;
Size= ALIGN_SIZE(Size);
prev= &my_once_root_block;
max_left=0;
for (next=my_once_root_block ; next && next->left < Size ; next= next->next)
{
if (next->left > max_left)
max_left=next->left;
prev= &next->next;
}
if (! next)
{ /* Time to alloc new block */
get_size= Size+ALIGN_SIZE(sizeof(USED_MEM));
if (max_left*4 < my_once_extra && get_size < my_once_extra)
get_size=my_once_extra; /* Normal alloc */
if ((next = (USED_MEM*) malloc(get_size)) == 0)
{
my_errno=errno;
if (MyFlags & (MY_FAE+MY_WME))
my_error(EE_OUTOFMEMORY, MYF(ME_BELL+ME_FATAL), get_size);
return((uchar*) 0);
}
DBUG_PRINT("test",("my_once_malloc %lu byte malloced", (ulong) get_size));
next->next= 0;
next->size= get_size;
next->left= get_size-ALIGN_SIZE(sizeof(USED_MEM));
*prev=next;
}
point= (uchar*) ((char*) next+ (next->size-next->left));
next->left-= Size;
if (MyFlags & MY_ZEROFILL)
bzero(point, Size);
return((void*) point);
}
|
O3
|
c
|
my_once_alloc:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
addq $0x7, %r14
andq $-0x8, %r14
leaq 0xb6b025(%rip), %r13 # 0xc118a0
movq (%r13), %rcx
xorl %eax, %eax
testq %rcx, %rcx
je 0xa68a6
movq %rcx, %r13
movq 0x8(%rcx), %rcx
cmpq %r14, %rcx
jae 0xa68ef
cmpq %rax, %rcx
cmovaq %rcx, %rax
movq (%r13), %rcx
testq %rcx, %rcx
jne 0xa6886
shlq $0x2, %rax
leaq 0x18(%r14), %rcx
leaq 0x2e847f(%rip), %rdx # 0x38ed30
movl (%rdx), %edx
cmpq %rdx, %rcx
movq %rdx, %r15
cmovaq %rcx, %r15
cmpq %rdx, %rax
cmovaeq %rcx, %r15
movq %r15, %rdi
callq 0x2a780
testq %rax, %rax
je 0xa6920
movq $0x0, (%rax)
movq %r15, 0x10(%rax)
addq $-0x18, %r15
movq %r15, 0x8(%rax)
movq %rax, (%r13)
movq 0x8(%rax), %rcx
movq %rax, %r13
movq 0x10(%r13), %r12
subq %rcx, %r12
addq %r13, %r12
subq %r14, %rcx
movq %rcx, 0x8(%r13)
testb $0x20, %bl
je 0xa694c
movq %r12, %rdi
xorl %esi, %esi
movq %r14, %rdx
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x2a2c0
callq 0x2a820
movl (%rax), %r14d
callq 0xa8156
movl %r14d, (%rax)
xorl %r12d, %r12d
testb $0x18, %bl
je 0xa694c
movl $0x1004, %esi # imm = 0x1004
movl $0x5, %edi
movq %r15, %rdx
xorl %eax, %eax
callq 0xa1c9b
movq %r12, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
|
my_once_alloc:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
push rax
mov rbx, rsi
mov r14, rdi
add r14, 7
and r14, 0FFFFFFFFFFFFFFF8h
lea r13, my_once_root_block
mov rcx, [r13+0]
xor eax, eax
test rcx, rcx
jz short loc_A68A6
loc_A6886:
mov r13, rcx
mov rcx, [rcx+8]
cmp rcx, r14
jnb short loc_A68EF
cmp rcx, rax
cmova rax, rcx
mov rcx, [r13+0]
test rcx, rcx
jnz short loc_A6886
shl rax, 2
loc_A68A6:
lea rcx, [r14+18h]
lea rdx, my_once_extra
mov edx, [rdx]
cmp rcx, rdx
mov r15, rdx
cmova r15, rcx
cmp rax, rdx
cmovnb r15, rcx
mov rdi, r15
call _malloc
test rax, rax
jz short loc_A6920
mov qword ptr [rax], 0
mov [rax+10h], r15
add r15, 0FFFFFFFFFFFFFFE8h
mov [rax+8], r15
mov [r13+0], rax
mov rcx, [rax+8]
mov r13, rax
loc_A68EF:
mov r12, [r13+10h]
sub r12, rcx
add r12, r13
sub rcx, r14
mov [r13+8], rcx
test bl, 20h
jz short loc_A694C
mov rdi, r12
xor esi, esi
mov rdx, r14
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
jmp _memset
loc_A6920:
call ___errno_location
mov r14d, [rax]
call _my_thread_var
mov [rax], r14d
xor r12d, r12d
test bl, 18h
jz short loc_A694C
mov esi, 1004h
mov edi, 5
mov rdx, r15
xor eax, eax
call my_error
loc_A694C:
mov rax, r12
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
|
long long my_once_alloc(long long a1, char a2)
{
unsigned long long v2; // r14
_QWORD *v3; // r13
_QWORD *v4; // rcx
unsigned long long v5; // rax
unsigned long long v6; // rcx
unsigned long long v7; // r15
_QWORD *v8; // rax
char *v9; // r12
int v11; // r14d
v2 = (a1 + 7) & 0xFFFFFFFFFFFFFFF8LL;
v3 = &my_once_root_block;
v4 = (_QWORD *)my_once_root_block;
v5 = 0LL;
if ( my_once_root_block )
{
while ( 1 )
{
v3 = v4;
v6 = v4[1];
if ( v6 >= v2 )
break;
if ( v6 > v5 )
v5 = v6;
v4 = (_QWORD *)*v3;
if ( !*v3 )
{
v5 *= 4LL;
goto LABEL_7;
}
}
}
else
{
LABEL_7:
v7 = my_once_extra;
if ( v2 + 24 > my_once_extra )
v7 = v2 + 24;
if ( v5 >= my_once_extra )
v7 = v2 + 24;
v8 = (_QWORD *)malloc(v7);
if ( !v8 )
{
v11 = *(_DWORD *)__errno_location(v7);
*(_DWORD *)my_thread_var(v7) = v11;
v9 = 0LL;
if ( (a2 & 0x18) != 0 )
my_error(5u, 4100LL, v7);
return (long long)v9;
}
*v8 = 0LL;
v8[2] = v7;
v8[1] = v7 - 24;
*v3 = v8;
v6 = v8[1];
v3 = v8;
}
v9 = (char *)v3 + v3[2] - v6;
v3[1] = v6 - v2;
if ( (a2 & 0x20) != 0 )
return memset(v9, 0LL, v2);
return (long long)v9;
}
|
my_once_alloc:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
PUSH RAX
MOV RBX,RSI
MOV R14,RDI
ADD R14,0x7
AND R14,-0x8
LEA R13,[0xd118a0]
MOV RCX,qword ptr [R13]
XOR EAX,EAX
TEST RCX,RCX
JZ 0x001a68a6
LAB_001a6886:
MOV R13,RCX
MOV RCX,qword ptr [RCX + 0x8]
CMP RCX,R14
JNC 0x001a68ef
CMP RCX,RAX
CMOVA RAX,RCX
MOV RCX,qword ptr [R13]
TEST RCX,RCX
JNZ 0x001a6886
SHL RAX,0x2
LAB_001a68a6:
LEA RCX,[R14 + 0x18]
LEA RDX,[0x48ed30]
MOV EDX,dword ptr [RDX]
CMP RCX,RDX
MOV R15,RDX
CMOVA R15,RCX
CMP RAX,RDX
CMOVNC R15,RCX
MOV RDI,R15
CALL 0x0012a780
TEST RAX,RAX
JZ 0x001a6920
MOV qword ptr [RAX],0x0
MOV qword ptr [RAX + 0x10],R15
ADD R15,-0x18
MOV qword ptr [RAX + 0x8],R15
MOV qword ptr [R13],RAX
MOV RCX,qword ptr [RAX + 0x8]
MOV R13,RAX
LAB_001a68ef:
MOV R12,qword ptr [R13 + 0x10]
SUB R12,RCX
ADD R12,R13
SUB RCX,R14
MOV qword ptr [R13 + 0x8],RCX
TEST BL,0x20
JZ 0x001a694c
MOV RDI,R12
XOR ESI,ESI
MOV RDX,R14
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
JMP 0x0012a2c0
LAB_001a6920:
CALL 0x0012a820
MOV R14D,dword ptr [RAX]
CALL 0x001a8156
MOV dword ptr [RAX],R14D
XOR R12D,R12D
TEST BL,0x18
JZ 0x001a694c
MOV ESI,0x1004
MOV EDI,0x5
MOV RDX,R15
XOR EAX,EAX
CALL 0x001a1c9b
LAB_001a694c:
MOV RAX,R12
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
void * my_once_alloc(long param_1,ulong param_2)
{
int iVar1;
int8 *puVar2;
ulong uVar3;
int8 *puVar4;
int *piVar5;
ulong uVar6;
ulong uVar7;
void *pvVar8;
int8 *puVar9;
ulong __n;
ulong __size;
__n = param_1 + 7U & 0xfffffffffffffff8;
uVar3 = 0;
puVar2 = my_once_root_block;
puVar9 = &my_once_root_block;
if (my_once_root_block != (int8 *)0x0) {
do {
puVar4 = puVar2;
uVar6 = puVar4[1];
if (__n <= uVar6) goto LAB_001a68ef;
if (uVar3 < uVar6) {
uVar3 = uVar6;
}
puVar2 = (int8 *)*puVar4;
} while ((int8 *)*puVar4 != (int8 *)0x0);
uVar3 = uVar3 << 2;
puVar9 = puVar4;
}
uVar6 = __n + 0x18;
uVar7 = (ulong)my_once_extra;
__size = uVar7;
if (uVar7 < uVar6) {
__size = uVar6;
}
if (uVar7 <= uVar3) {
__size = uVar6;
}
puVar4 = (int8 *)malloc(__size);
if (puVar4 == (int8 *)0x0) {
piVar5 = __errno_location();
iVar1 = *piVar5;
piVar5 = (int *)_my_thread_var();
*piVar5 = iVar1;
pvVar8 = (void *)0x0;
if ((param_2 & 0x18) != 0) {
my_error(5,0x1004,__size);
}
}
else {
*puVar4 = 0;
puVar4[2] = __size;
puVar4[1] = __size - 0x18;
*puVar9 = puVar4;
uVar6 = puVar4[1];
LAB_001a68ef:
pvVar8 = (void *)((puVar4[2] - uVar6) + (long)puVar4);
puVar4[1] = uVar6 - __n;
if ((param_2 & 0x20) != 0) {
pvVar8 = memset(pvVar8,0,__n);
return pvVar8;
}
}
return pvVar8;
}
|
|
64,289
|
LefDefParser::defiNonDefault::layerWidthVal(int) const
|
Efficient-TDP/thirdparty/Limbo/limbo/thirdparty/lefdef/5.8/def/def/defiNonDefault.cpp
|
int defiNonDefault::layerWidthVal(int index) const {
char msg[160];
if (index < 0 || index >= numLayers_) {
sprintf (msg, "ERROR (DEFPARS-6090): The index number %d specified for the NONDEFAULT LAYER is invalid.\nValid index is from 0 to %d. Specify a valid index number and then try again.",
index, numLayers_);
defiError(0, 6090, msg, defData);
return 0;
}
return (int)width_[index];
}
|
O0
|
cpp
|
LefDefParser::defiNonDefault::layerWidthVal(int) const:
subq $0xc8, %rsp
movq %rdi, 0xb8(%rsp)
movl %esi, 0xb4(%rsp)
movq 0xb8(%rsp), %rax
movq %rax, 0x8(%rsp)
cmpl $0x0, 0xb4(%rsp)
jl 0x44d8e
movq 0x8(%rsp), %rcx
movl 0xb4(%rsp), %eax
cmpl 0xc(%rcx), %eax
jl 0x44dda
movq 0x8(%rsp), %rax
leaq 0x10(%rsp), %rdi
movl 0xb4(%rsp), %edx
movl 0xc(%rax), %ecx
leaq 0x2d7c1(%rip), %rsi # 0x7256a
movb $0x0, %al
callq 0x7060
movq 0x8(%rsp), %rax
leaq 0x10(%rsp), %rdx
movq 0xb8(%rax), %rcx
xorl %edi, %edi
movl $0x17ca, %esi # imm = 0x17CA
callq 0x277e0
movl $0x0, 0xc4(%rsp)
jmp 0x44df7
movq 0x8(%rsp), %rax
movq 0x20(%rax), %rax
movslq 0xb4(%rsp), %rcx
cvttsd2si (%rax,%rcx,8), %eax
movl %eax, 0xc4(%rsp)
movl 0xc4(%rsp), %eax
addq $0xc8, %rsp
retq
nopw %cs:(%rax,%rax)
|
_ZNK12LefDefParser14defiNonDefault13layerWidthValEi:
sub rsp, 0C8h
mov [rsp+0C8h+var_10], rdi
mov [rsp+0C8h+var_14], esi
mov rax, [rsp+0C8h+var_10]
mov [rsp+0C8h+var_C0], rax
cmp [rsp+0C8h+var_14], 0
jl short loc_44D8E
mov rcx, [rsp+0C8h+var_C0]
mov eax, [rsp+0C8h+var_14]
cmp eax, [rcx+0Ch]
jl short loc_44DDA
loc_44D8E:
mov rax, [rsp+0C8h+var_C0]
lea rdi, [rsp+0C8h+var_B8]
mov edx, [rsp+0C8h+var_14]
mov ecx, [rax+0Ch]
lea rsi, aErrorDefpars60_8; "ERROR (DEFPARS-6090): The index number "...
mov al, 0
call _sprintf
mov rax, [rsp+0C8h+var_C0]
lea rdx, [rsp+0C8h+var_B8]; int
mov rcx, [rax+0B8h]; char *
xor edi, edi; this
mov esi, 17CAh; int
call _ZN12LefDefParser9defiErrorEiiPKcPNS_8defrDataE; LefDefParser::defiError(int,int,char const*,LefDefParser::defrData *)
mov [rsp+0C8h+var_4], 0
jmp short loc_44DF7
loc_44DDA:
mov rax, [rsp+0C8h+var_C0]
mov rax, [rax+20h]
movsxd rcx, [rsp+0C8h+var_14]
cvttsd2si eax, qword ptr [rax+rcx*8]
mov [rsp+0C8h+var_4], eax
loc_44DF7:
mov eax, [rsp+0C8h+var_4]
add rsp, 0C8h
retn
|
long long LefDefParser::defiNonDefault::layerWidthVal(LefDefParser::defrData **this, int a2)
{
LefDefParser::defrData *v2; // r8
char v4[164]; // [rsp+10h] [rbp-B8h] BYREF
int v5; // [rsp+B4h] [rbp-14h]
LefDefParser::defiNonDefault *v6; // [rsp+B8h] [rbp-10h]
v6 = (LefDefParser::defiNonDefault *)this;
v5 = a2;
if ( a2 >= 0 && v5 < *((_DWORD *)this + 3) )
{
return (unsigned int)(int)*((double *)this[4] + v5);
}
else
{
sprintf(
v4,
"ERROR (DEFPARS-6090): The index number %d specified for the NONDEFAULT LAYER is invalid.\n"
"Valid index is from 0 to %d. Specify a valid index number and then try again.",
v5,
*((_DWORD *)this + 3));
LefDefParser::defiError(0LL, 6090, v4, this[23], v2);
return 0;
}
}
|
layerWidthVal:
SUB RSP,0xc8
MOV qword ptr [RSP + 0xb8],RDI
MOV dword ptr [RSP + 0xb4],ESI
MOV RAX,qword ptr [RSP + 0xb8]
MOV qword ptr [RSP + 0x8],RAX
CMP dword ptr [RSP + 0xb4],0x0
JL 0x00144d8e
MOV RCX,qword ptr [RSP + 0x8]
MOV EAX,dword ptr [RSP + 0xb4]
CMP EAX,dword ptr [RCX + 0xc]
JL 0x00144dda
LAB_00144d8e:
MOV RAX,qword ptr [RSP + 0x8]
LEA RDI,[RSP + 0x10]
MOV EDX,dword ptr [RSP + 0xb4]
MOV ECX,dword ptr [RAX + 0xc]
LEA RSI,[0x17256a]
MOV AL,0x0
CALL 0x00107060
MOV RAX,qword ptr [RSP + 0x8]
LEA RDX,[RSP + 0x10]
MOV RCX,qword ptr [RAX + 0xb8]
XOR EDI,EDI
MOV ESI,0x17ca
CALL 0x001277e0
MOV dword ptr [RSP + 0xc4],0x0
JMP 0x00144df7
LAB_00144dda:
MOV RAX,qword ptr [RSP + 0x8]
MOV RAX,qword ptr [RAX + 0x20]
MOVSXD RCX,dword ptr [RSP + 0xb4]
CVTTSD2SI EAX,qword ptr [RAX + RCX*0x8]
MOV dword ptr [RSP + 0xc4],EAX
LAB_00144df7:
MOV EAX,dword ptr [RSP + 0xc4]
ADD RSP,0xc8
RET
|
/* LefDefParser::defiNonDefault::layerWidthVal(int) const */
int __thiscall LefDefParser::defiNonDefault::layerWidthVal(defiNonDefault *this,int param_1)
{
char local_b8 [164];
int local_14;
defiNonDefault *local_10;
int local_4;
if ((param_1 < 0) || (*(int *)(this + 0xc) <= param_1)) {
local_14 = param_1;
local_10 = this;
sprintf(local_b8,
"ERROR (DEFPARS-6090): The index number %d specified for the NONDEFAULT LAYER is invalid.\nValid index is from 0 to %d. Specify a valid index number and then try again."
,(ulong)(uint)param_1,(ulong)*(uint *)(this + 0xc));
defiError(0,0x17ca,local_b8,*(defrData **)(this + 0xb8));
local_4 = 0;
}
else {
local_4 = (int)*(double *)(*(long *)(this + 0x20) + (long)param_1 * 8);
}
return local_4;
}
|
|
64,290
|
my_sync_dir_by_file
|
eloqsql/mysys/my_sync.c
|
int my_sync_dir_by_file(const char *file_name __attribute__((unused)),
myf my_flags __attribute__((unused)))
{
#ifdef NEED_EXPLICIT_SYNC_DIR
char dir_name[FN_REFLEN];
size_t dir_name_length;
dirname_part(dir_name, file_name, &dir_name_length);
return my_sync_dir(dir_name, my_flags & ~MY_NOSYMLINKS);
#else
return 0;
#endif
}
|
O0
|
c
|
my_sync_dir_by_file:
pushq %rbp
movq %rsp, %rbp
subq $0x240, %rsp # imm = 0x240
movq %fs:0x28, %rax
movq %rax, -0x8(%rbp)
movq %rdi, -0x218(%rbp)
movq %rsi, -0x220(%rbp)
movq -0x218(%rbp), %rsi
leaq -0x210(%rbp), %rdi
movq %rdi, -0x238(%rbp)
leaq -0x228(%rbp), %rdx
callq 0x275a0
movq -0x238(%rbp), %rdi
movq -0x220(%rbp), %rax
andl $0xfffffdff, %eax # imm = 0xFFFFFDFF
movl %eax, %esi
callq 0x2b6c0
movl %eax, -0x22c(%rbp)
movq %fs:0x28, %rax
movq -0x8(%rbp), %rcx
cmpq %rcx, %rax
jne 0x2b7f8
movl -0x22c(%rbp), %eax
addq $0x240, %rsp # imm = 0x240
popq %rbp
retq
callq 0x24370
nopl (%rax)
|
my_sync_dir_by_file:
push rbp
mov rbp, rsp
sub rsp, 240h
mov rax, fs:28h
mov [rbp+var_8], rax
mov [rbp+var_218], rdi
mov [rbp+var_220], rsi
mov rsi, [rbp+var_218]
lea rdi, [rbp+var_210]
mov [rbp+var_238], rdi
lea rdx, [rbp+var_228]
call dirname_part
mov rdi, [rbp+var_238]
mov rax, [rbp+var_220]
and eax, 0FFFFFDFFh
mov esi, eax
call my_sync_dir
mov [rbp+var_22C], eax
mov rax, fs:28h
mov rcx, [rbp+var_8]
cmp rax, rcx
jnz short loc_2B7F8
mov eax, [rbp+var_22C]
add rsp, 240h
pop rbp
retn
loc_2B7F8:
call ___stack_chk_fail
|
long long my_sync_dir_by_file(_BYTE *a1, long long a2)
{
long long v3; // [rsp+18h] [rbp-228h] BYREF
long long v4; // [rsp+20h] [rbp-220h]
_BYTE *v5; // [rsp+28h] [rbp-218h]
_BYTE v6[520]; // [rsp+30h] [rbp-210h] BYREF
unsigned long long v7; // [rsp+238h] [rbp-8h]
v7 = __readfsqword(0x28u);
v5 = a1;
v4 = a2;
dirname_part((long long)v6, a1, &v3);
return (unsigned int)my_sync_dir(v6, (unsigned int)v4 & 0xFFFFFDFF);
}
|
my_sync_dir_by_file:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x240
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x8],RAX
MOV qword ptr [RBP + -0x218],RDI
MOV qword ptr [RBP + -0x220],RSI
MOV RSI,qword ptr [RBP + -0x218]
LEA RDI,[RBP + -0x210]
MOV qword ptr [RBP + -0x238],RDI
LEA RDX,[RBP + -0x228]
CALL 0x001275a0
MOV RDI,qword ptr [RBP + -0x238]
MOV RAX,qword ptr [RBP + -0x220]
AND EAX,0xfffffdff
MOV ESI,EAX
CALL 0x0012b6c0
MOV dword ptr [RBP + -0x22c],EAX
MOV RAX,qword ptr FS:[0x28]
MOV RCX,qword ptr [RBP + -0x8]
CMP RAX,RCX
JNZ 0x0012b7f8
MOV EAX,dword ptr [RBP + -0x22c]
ADD RSP,0x240
POP RBP
RET
LAB_0012b7f8:
CALL 0x00124370
|
int4 my_sync_dir_by_file(int8 param_1,int8 param_2)
{
int4 uVar1;
long in_FS_OFFSET;
int1 local_230 [8];
int8 local_228;
int8 local_220;
int1 local_218 [520];
long local_10;
local_10 = *(long *)(in_FS_OFFSET + 0x28);
local_228 = param_2;
local_220 = param_1;
dirname_part(local_218,param_1,local_230);
uVar1 = my_sync_dir(local_218,(uint)local_228 & 0xfffffdff);
if (*(long *)(in_FS_OFFSET + 0x28) == local_10) {
return uVar1;
}
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
|
|
64,291
|
nglog::operator<<(std::ostream&, nglog::Counter_t const&)
|
ng-log[P]ng-log/src/logging.cc
|
ostream& operator<<(ostream& os, const Counter_t&) {
#ifdef DISABLE_RTTI
LogMessage::LogStream* log = static_cast<LogMessage::LogStream*>(&os);
#else
auto* log = dynamic_cast<LogMessage::LogStream*>(&os);
#endif
CHECK(log && log == log->self())
<< "You must not use COUNTER with non-glog ostream";
os << log->ctr();
return os;
}
|
O1
|
cpp
|
nglog::operator<<(std::ostream&, nglog::Counter_t const&):
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x60, %rsp
movq %rdi, %rbx
movq 0x2944c(%rip), %rsi # 0x30fc8
leaq 0x288fd(%rip), %rdx # 0x30480
xorl %ecx, %ecx
callq 0x75f0
movq %rax, %r14
testq %rax, %rax
je 0x7bbb
cmpq 0x50(%r14), %r14
setne %bpl
testb %bpl, %bpl
jne 0x7bc0
movq 0x48(%r14), %rsi
movq %rbx, %rdi
callq 0x74e0
movq %rbx, %rax
addq $0x60, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movb $0x1, %bpl
jmp 0x7b9a
leaq 0x1bd2b(%rip), %rsi # 0x238f2
movq %rsp, %r12
movq %r12, %rdi
movl $0x7c3, %edx # imm = 0x7C3
callq 0xf05c
movl $0x7538, %r15d # imm = 0x7538
addq 0x8(%r12), %r15
leaq 0x1bdc4(%rip), %rsi # 0x239ad
pushq $0x28
popq %rdx
movq %r15, %rdi
callq 0x7600
leaq 0x1bddb(%rip), %rsi # 0x239d6
pushq $0x2e
popq %rdx
movq %r15, %rdi
callq 0x7600
testb %bpl, %bpl
je 0x7b9f
movq %rsp, %rdi
callq 0xf0a0
movq %rsp, %rdi
callq 0xf0a0
movq %rax, %rdi
callq 0x9923
|
_ZN5ngloglsERSoRKNS_9Counter_tE:
push rbp
push r15
push r14
push r12
push rbx
sub rsp, 60h
mov rbx, rdi
mov rsi, cs:lpstype; lpstype
lea rdx, _ZTIN5nglog10LogMessage9LogStreamE; lpdtype
xor ecx, ecx; s2d
call ___dynamic_cast
mov r14, rax
test rax, rax
jz short loc_7BBB
cmp r14, [r14+50h]
setnz bpl
loc_7B9A:
test bpl, bpl
jnz short loc_7BC0
loc_7B9F:
mov rsi, [r14+48h]
mov rdi, rbx
call __ZNSo9_M_insertIlEERSoT_; std::ostream::_M_insert<long>(long)
mov rax, rbx
add rsp, 60h
pop rbx
pop r12
pop r14
pop r15
pop rbp
retn
loc_7BBB:
mov bpl, 1
jmp short loc_7B9A
loc_7BC0:
lea rsi, aWorkspaceLlm4b; "/workspace/llm4binary/github/2025_star3"...
mov r12, rsp
mov rdi, r12; this
mov edx, 7C3h; int
call _ZN5nglog15LogMessageFatalC2EPKci; nglog::LogMessageFatal::LogMessageFatal(char const*,int)
mov r15d, 7538h
add r15, [r12+8]
lea rsi, aCheckFailedLog; "Check failed: log && log == log->self()"...
push 28h ; '('
pop rdx
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, aYouMustNotUseC; "You must not use COUNTER with non-glog "...
push 2Eh ; '.'
pop rdx
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 bpl, bpl
jz short loc_7B9F
mov rdi, rsp; this
call _ZN5nglog15LogMessageFatalD2Ev; nglog::LogMessageFatal::~LogMessageFatal()
mov rdi, rsp; this
call _ZN5nglog15LogMessageFatalD2Ev; nglog::LogMessageFatal::~LogMessageFatal()
mov rdi, rax
call __clang_call_terminate
|
const void * nglog::operator<<(const void *a1)
{
void **v1; // rax
bool v2; // bp
long long v4; // r15
long long v5; // [rsp+0h] [rbp-88h] BYREF
long long v6; // [rsp+8h] [rbp-80h]
v1 = (void **)__dynamic_cast(
a1,
(const struct __class_type_info *)&`typeinfo for'std::ostream,
(const struct __class_type_info *)&`typeinfo for'nglog::LogMessage::LogStream,
0LL);
if ( v1 )
v2 = v1 != v1[10];
else
v2 = 1;
if ( v2 )
{
nglog::LogMessageFatal::LogMessageFatal(
(nglog::LogMessageFatal *)&v5,
"/workspace/llm4binary/github/2025_star3/ng-log[P]ng-log/src/logging.cc",
1987);
v4 = v6 + 30008;
std::__ostream_insert<char,std::char_traits<char>>(v6 + 30008, "Check failed: log && log == log->self() ", 40LL);
std::__ostream_insert<char,std::char_traits<char>>(v4, "You must not use COUNTER with non-glog ostream", 46LL);
nglog::LogMessageFatal::~LogMessageFatal((nglog::LogMessageFatal *)&v5);
}
std::ostream::_M_insert<long>(a1, v1[9]);
return a1;
}
|
operator<<:
PUSH RBP
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
SUB RSP,0x60
MOV RBX,RDI
MOV RSI,qword ptr [0x00130fc8]
LEA RDX,[0x130480]
XOR ECX,ECX
CALL 0x001075f0
MOV R14,RAX
TEST RAX,RAX
JZ 0x00107bbb
CMP R14,qword ptr [R14 + 0x50]
SETNZ BPL
LAB_00107b9a:
TEST BPL,BPL
JNZ 0x00107bc0
LAB_00107b9f:
MOV RSI,qword ptr [R14 + 0x48]
MOV RDI,RBX
CALL 0x001074e0
MOV RAX,RBX
ADD RSP,0x60
POP RBX
POP R12
POP R14
POP R15
POP RBP
RET
LAB_00107bbb:
MOV BPL,0x1
JMP 0x00107b9a
LAB_00107bc0:
LEA RSI,[0x1238f2]
MOV R12,RSP
MOV RDI,R12
MOV EDX,0x7c3
CALL 0x0010f05c
MOV R15D,0x7538
ADD R15,qword ptr [R12 + 0x8]
LAB_00107be2:
LEA RSI,[0x1239ad]
PUSH 0x28
POP RDX
MOV RDI,R15
CALL 0x00107600
LEA RSI,[0x1239d6]
PUSH 0x2e
POP RDX
MOV RDI,R15
CALL 0x00107600
LAB_00107c06:
TEST BPL,BPL
JZ 0x00107b9f
MOV RDI,RSP
CALL 0x0010f0a0
LAB_00107c13:
MOV RDI,RSP
CALL 0x0010f0a0
LAB_00107c1b:
MOV RDI,RAX
CALL 0x00109923
|
/* nglog::TEMPNAMEPLACEHOLDERVALUE(std::ostream&, nglog::Counter_t const&) */
ostream * nglog::operator<<(ostream *param_1,Counter_t *param_2)
{
long lVar1;
int8 uVar2;
bool bVar3;
LogMessageFatal aLStack_88 [8];
long local_80;
lVar1 = __dynamic_cast(param_1,PTR_typeinfo_00130fc8,&LogMessage::LogStream::typeinfo,0);
if (lVar1 == 0) {
bVar3 = true;
}
else {
bVar3 = lVar1 != *(long *)(lVar1 + 0x50);
}
if (bVar3) {
LogMessageFatal::LogMessageFatal
(aLStack_88,"/workspace/llm4binary/github/2025_star3/ng-log[P]ng-log/src/logging.cc",
0x7c3);
/* try { // try from 00107be2 to 00107c05 has its CatchHandler @ 00107c13 */
std::__ostream_insert<char,std::char_traits<char>>
((ostream *)(local_80 + 0x7538),"Check failed: log && log == log->self() ",0x28);
std::__ostream_insert<char,std::char_traits<char>>
((ostream *)(local_80 + 0x7538),"You must not use COUNTER with non-glog ostream",0x2e)
;
if (bVar3) {
LogMessageFatal::~LogMessageFatal(aLStack_88);
/* catch(type#1 @ 00000000) { ... } // from try @ 00107be2 with catch @ 00107c13
try { // try from 00107c13 to 00107c1a has its CatchHandler @ 00107c1b */
uVar2 = LogMessageFatal::~LogMessageFatal(aLStack_88);
/* catch(type#1 @ 00000000) { ... } // from try @ 00107c13 with catch @ 00107c1b
*/
/* WARNING: Subroutine does not return */
__clang_call_terminate(uVar2);
}
}
std::ostream::_M_insert<long>((long)param_1);
return param_1;
}
|
|
64,292
|
nglog::operator<<(std::ostream&, nglog::Counter_t const&)
|
ng-log[P]ng-log/src/logging.cc
|
ostream& operator<<(ostream& os, const Counter_t&) {
#ifdef DISABLE_RTTI
LogMessage::LogStream* log = static_cast<LogMessage::LogStream*>(&os);
#else
auto* log = dynamic_cast<LogMessage::LogStream*>(&os);
#endif
CHECK(log && log == log->self())
<< "You must not use COUNTER with non-glog ostream";
os << log->ctr();
return os;
}
|
O3
|
cpp
|
nglog::operator<<(std::ostream&, nglog::Counter_t const&):
pushq %r14
pushq %rbx
subq $0x68, %rsp
movq %rdi, %rbx
movq 0x24e06(%rip), %rsi # 0x30fc8
leaq 0x242f7(%rip), %rdx # 0x304c0
xorl %ecx, %ecx
callq 0x75f0
testq %rax, %rax
je 0xc1f2
cmpq 0x50(%rax), %rax
jne 0xc1f2
movq 0x48(%rax), %rsi
movq %rbx, %rdi
callq 0x74e0
movq %rbx, %rax
addq $0x68, %rsp
popq %rbx
popq %r14
retq
leaq 0x176e1(%rip), %rsi # 0x238da
leaq 0x8(%rsp), %r14
movq %r14, %rdi
movl $0x7c3, %edx # imm = 0x7C3
callq 0xee3a
movl $0x7538, %ebx # imm = 0x7538
addq 0x8(%r14), %rbx
leaq 0x1777a(%rip), %rsi # 0x23995
movl $0x28, %edx
movq %rbx, %rdi
callq 0x7600
leaq 0x1778f(%rip), %rsi # 0x239be
movl $0x2e, %edx
movq %rbx, %rdi
callq 0x7600
leaq 0x8(%rsp), %rdi
callq 0xee7e
leaq 0x8(%rsp), %rdi
callq 0xee7e
movq %rax, %rdi
callq 0x9777
|
_ZN5ngloglsERSoRKNS_9Counter_tE:
push r14
push rbx
sub rsp, 68h
mov rbx, rdi
mov rsi, cs:lpstype; lpstype
lea rdx, _ZTIN5nglog10LogMessage9LogStreamE; lpdtype
xor ecx, ecx; s2d
call ___dynamic_cast
test rax, rax
jz short loc_C1F2
cmp rax, [rax+50h]
jnz short loc_C1F2
mov rsi, [rax+48h]
mov rdi, rbx
call __ZNSo9_M_insertIlEERSoT_; std::ostream::_M_insert<long>(long)
mov rax, rbx
add rsp, 68h
pop rbx
pop r14
retn
loc_C1F2:
lea rsi, aWorkspaceLlm4b_1; "/workspace/llm4binary/github/2025_star3"...
lea r14, [rsp+78h+var_70]
mov rdi, r14; this
mov edx, 7C3h; int
call _ZN5nglog15LogMessageFatalC2EPKci; nglog::LogMessageFatal::LogMessageFatal(char const*,int)
mov ebx, 7538h
add rbx, [r14+8]
lea rsi, aCheckFailedLog; "Check failed: log && log == log->self()"...
mov edx, 28h ; '('
mov rdi, rbx
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, aYouMustNotUseC; "You must not use COUNTER with non-glog "...
mov edx, 2Eh ; '.'
mov rdi, rbx
call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long)
lea rdi, [rsp+78h+var_70]; this
call _ZN5nglog15LogMessageFatalD2Ev; nglog::LogMessageFatal::~LogMessageFatal()
lea rdi, [rsp+78h+var_70]; this
call _ZN5nglog15LogMessageFatalD2Ev; nglog::LogMessageFatal::~LogMessageFatal()
mov rdi, rax
call __clang_call_terminate
|
const void * nglog::operator<<(const void *a1)
{
void **v1; // rax
long long v3; // rbx
_BYTE v4[8]; // [rsp+8h] [rbp-70h] BYREF
long long v5; // [rsp+10h] [rbp-68h]
v1 = (void **)__dynamic_cast(
a1,
(const struct __class_type_info *)&`typeinfo for'std::ostream,
(const struct __class_type_info *)&`typeinfo for'nglog::LogMessage::LogStream,
0LL);
if ( !v1 || v1 != v1[10] )
{
nglog::LogMessageFatal::LogMessageFatal(
(nglog::LogMessageFatal *)v4,
"/workspace/llm4binary/github/2025_star3/ng-log[P]ng-log/src/logging.cc",
1987);
v3 = v5 + 30008;
std::__ostream_insert<char,std::char_traits<char>>(v5 + 30008, "Check failed: log && log == log->self() ", 40LL);
std::__ostream_insert<char,std::char_traits<char>>(v3, "You must not use COUNTER with non-glog ostream", 46LL);
nglog::LogMessageFatal::~LogMessageFatal((nglog::LogMessageFatal *)v4);
}
std::ostream::_M_insert<long>(a1, v1[9]);
return a1;
}
|
operator<<:
PUSH R14
PUSH RBX
SUB RSP,0x68
MOV RBX,RDI
MOV RSI,qword ptr [0x00130fc8]
LEA RDX,[0x1304c0]
XOR ECX,ECX
CALL 0x001075f0
TEST RAX,RAX
JZ 0x0010c1f2
CMP RAX,qword ptr [RAX + 0x50]
JNZ 0x0010c1f2
MOV RSI,qword ptr [RAX + 0x48]
MOV RDI,RBX
CALL 0x001074e0
MOV RAX,RBX
ADD RSP,0x68
POP RBX
POP R14
RET
LAB_0010c1f2:
LEA RSI,[0x1238da]
LEA R14,[RSP + 0x8]
MOV RDI,R14
MOV EDX,0x7c3
CALL 0x0010ee3a
MOV EBX,0x7538
ADD RBX,qword ptr [R14 + 0x8]
LAB_0010c214:
LEA RSI,[0x123995]
MOV EDX,0x28
MOV RDI,RBX
CALL 0x00107600
LEA RSI,[0x1239be]
MOV EDX,0x2e
MOV RDI,RBX
CALL 0x00107600
LAB_0010c23c:
LEA RDI,[RSP + 0x8]
CALL 0x0010ee7e
LAB_0010c246:
LEA RDI,[RSP + 0x8]
CALL 0x0010ee7e
LAB_0010c250:
MOV RDI,RAX
CALL 0x00109777
|
/* nglog::TEMPNAMEPLACEHOLDERVALUE(std::ostream&, nglog::Counter_t const&) */
ostream * nglog::operator<<(ostream *param_1,Counter_t *param_2)
{
long lVar1;
int8 uVar2;
LogMessageFatal local_70 [8];
long local_68;
lVar1 = __dynamic_cast(param_1,PTR_typeinfo_00130fc8,&LogMessage::LogStream::typeinfo,0);
if ((lVar1 != 0) && (lVar1 == *(long *)(lVar1 + 0x50))) {
std::ostream::_M_insert<long>((long)param_1);
return param_1;
}
LogMessageFatal::LogMessageFatal
(local_70,"/workspace/llm4binary/github/2025_star3/ng-log[P]ng-log/src/logging.cc",0x7c3
);
/* try { // try from 0010c214 to 0010c23b has its CatchHandler @ 0010c246 */
std::__ostream_insert<char,std::char_traits<char>>
((ostream *)(local_68 + 0x7538),"Check failed: log && log == log->self() ",0x28);
std::__ostream_insert<char,std::char_traits<char>>
((ostream *)(local_68 + 0x7538),"You must not use COUNTER with non-glog ostream",0x2e);
LogMessageFatal::~LogMessageFatal(local_70);
/* catch(type#1 @ 00000000) { ... } // from try @ 0010c214 with catch @ 0010c246
try { // try from 0010c246 to 0010c24f has its CatchHandler @ 0010c250 */
uVar2 = LogMessageFatal::~LogMessageFatal(local_70);
/* catch(type#1 @ 00000000) { ... } // from try @ 0010c246 with catch @ 0010c250
*/
/* WARNING: Subroutine does not return */
__clang_call_terminate(uVar2);
}
|
|
64,293
|
verify_merkle_proof
|
corpus-core[P]colibri-stateless/src/chains/eth/verifier/verify_receipt_proof.c
|
static bool verify_merkle_proof(verify_ctx_t* ctx, ssz_ob_t proof, bytes_t block_hash, bytes_t block_number, bytes_t raw, uint32_t tx_index, bytes32_t receipt_root, bytes32_t body_root) {
uint8_t leafes[4 * 32] = {0}; // 3 leafes, 32 bytes each
bytes32_t root_hash = {0}; // calculated body root hash
gindex_t gindexes[] = {GINDEX_BLOCKUMBER, GINDEX_BLOCHASH, GINDEX_RECEIPT_ROOT, GINDEX_TXINDEX_G + tx_index}; // calculate the gindexes for the proof
// copy leaf data
memcpy(leafes, block_number.data, block_number.len);
memcpy(leafes + 32, block_hash.data, block_hash.len);
memcpy(leafes + 64, receipt_root, 32);
ssz_hash_tree_root(ssz_ob(ssz_transactions_bytes, raw), leafes + 96);
if (!ssz_verify_multi_merkle_proof(proof.bytes, bytes(leafes, sizeof(leafes)), gindexes, root_hash)) RETURN_VERIFY_ERROR(ctx, "invalid tx proof, missing nodes!");
if (memcmp(root_hash, body_root, 32) != 0) RETURN_VERIFY_ERROR(ctx, "invalid tx proof, body root mismatch!");
return true;
}
|
O0
|
c
|
verify_merkle_proof:
pushq %rbp
movq %rsp, %rbp
subq $0x150, %rsp # imm = 0x150
movq 0x40(%rbp), %rax
movq 0x38(%rbp), %rax
leaq 0x28(%rbp), %rax
movq %rax, -0x138(%rbp)
leaq 0x10(%rbp), %rax
movq %rax, -0x130(%rbp)
movl %esi, -0x18(%rbp)
movq %rdx, -0x10(%rbp)
movl %ecx, -0x28(%rbp)
movq %r8, -0x20(%rbp)
movq %rdi, -0x30(%rbp)
movl %r9d, -0x34(%rbp)
leaq -0xc0(%rbp), %rdi
xorl %esi, %esi
movl $0x80, %edx
callq 0x23140
leaq -0xe0(%rbp), %rdi
xorl %esi, %esi
movl $0x20, %edx
callq 0x23140
movq $0x326, -0x100(%rbp) # imm = 0x326
movq $0x32c, -0xf8(%rbp) # imm = 0x32C
movq $0x323, -0xf0(%rbp) # imm = 0x323
movl -0x34(%rbp), %eax
addq $0x65a00000, %rax # imm = 0x65A00000
movq %rax, -0xe8(%rbp)
leaq -0xc0(%rbp), %rdi
movq -0x20(%rbp), %rsi
movl -0x28(%rbp), %eax
movl %eax, %edx
callq 0x231c0
leaq -0xc0(%rbp), %rdi
addq $0x20, %rdi
movq -0x10(%rbp), %rsi
movl -0x18(%rbp), %eax
movl %eax, %edx
callq 0x231c0
movq -0x138(%rbp), %rax
movq 0x38(%rbp), %rcx
movq (%rcx), %rdx
movq %rdx, -0x80(%rbp)
movq 0x8(%rcx), %rdx
movq %rdx, -0x78(%rbp)
movq 0x10(%rcx), %rdx
movq %rdx, -0x70(%rbp)
movq 0x18(%rcx), %rcx
movq %rcx, -0x68(%rbp)
movq (%rax), %rcx
movq %rcx, -0x118(%rbp)
movq 0x8(%rax), %rax
movq %rax, -0x110(%rbp)
leaq 0xf9d26(%rip), %rax # 0x122ad0
movq %rax, -0x108(%rbp)
leaq -0xc0(%rbp), %rdi
addq $0x60, %rdi
leaq -0x118(%rbp), %rax
movq (%rax), %rcx
movq %rcx, (%rsp)
movq 0x8(%rax), %rcx
movq %rcx, 0x8(%rsp)
movq 0x10(%rax), %rax
movq %rax, 0x10(%rsp)
callq 0xa0a50
movq -0x130(%rbp), %rax
movl $0x80, -0x128(%rbp)
leaq -0xc0(%rbp), %rcx
movq %rcx, -0x120(%rbp)
leaq -0x100(%rbp), %r8
leaq -0xe0(%rbp), %r9
movl (%rax), %edi
movq 0x8(%rax), %rsi
movl -0x128(%rbp), %edx
movq -0x120(%rbp), %rcx
callq 0xa10c0
testb $0x1, %al
jne 0x28e4e
jmp 0x28e2c
movq -0x30(%rbp), %rdi
addq $0x70, %rdi
leaq 0xb2089(%rip), %rsi # 0xdaec4
callq 0xa6370
movq -0x30(%rbp), %rax
movb $0x0, 0x68(%rax)
movb $0x0, -0x1(%rbp)
jmp 0x28e90
leaq -0xe0(%rbp), %rdi
movq 0x40(%rbp), %rsi
movl $0x20, %edx
callq 0x23100
cmpl $0x0, %eax
je 0x28e8c
jmp 0x28e6a
movq -0x30(%rbp), %rdi
addq $0x70, %rdi
leaq 0xb206c(%rip), %rsi # 0xdaee5
callq 0xa6370
movq -0x30(%rbp), %rax
movb $0x0, 0x68(%rax)
movb $0x0, -0x1(%rbp)
jmp 0x28e90
movb $0x1, -0x1(%rbp)
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0x150, %rsp # imm = 0x150
popq %rbp
retq
nop
|
verify_merkle_proof_0:
push rbp
mov rbp, rsp
sub rsp, 150h
mov rax, [rbp+arg_30]
mov rax, [rbp+arg_28]
lea rax, [rbp+arg_18]
mov [rbp+var_138], rax
lea rax, [rbp+arg_0]
mov [rbp+var_130], rax
mov [rbp+var_18], esi
mov [rbp+var_10], rdx
mov [rbp+var_28], ecx
mov [rbp+var_20], r8
mov [rbp+var_30], rdi
mov [rbp+var_34], r9d
lea rdi, [rbp+var_C0]
xor esi, esi
mov edx, 80h
call _memset
lea rdi, [rbp+var_E0]
xor esi, esi
mov edx, 20h ; ' '
call _memset
mov [rbp+var_100], 326h
mov [rbp+var_F8], 32Ch
mov [rbp+var_F0], 323h
mov eax, [rbp+var_34]
add rax, 65A00000h
mov [rbp+var_E8], rax
lea rdi, [rbp+var_C0]
mov rsi, [rbp+var_20]
mov eax, [rbp+var_28]
mov edx, eax
call _memcpy
lea rdi, [rbp+var_C0]
add rdi, 20h ; ' '
mov rsi, [rbp+var_10]
mov eax, [rbp+var_18]
mov edx, eax
call _memcpy
mov rax, [rbp+var_138]
mov rcx, [rbp+arg_28]
mov rdx, [rcx]
mov [rbp+var_80], rdx
mov rdx, [rcx+8]
mov [rbp+var_78], rdx
mov rdx, [rcx+10h]
mov [rbp+var_70], rdx
mov rcx, [rcx+18h]
mov [rbp+var_68], rcx
mov rcx, [rax]
mov [rbp+var_118], rcx
mov rax, [rax+8]
mov [rbp+var_110], rax
lea rax, ssz_transactions_bytes
mov [rbp+var_108], rax
lea rdi, [rbp+var_C0]
add rdi, 60h ; '`'
lea rax, [rbp+var_118]
mov rcx, [rax]
mov [rsp+150h+var_150], rcx
mov rcx, [rax+8]
mov [rsp+150h+var_148], rcx
mov rax, [rax+10h]
mov [rsp+150h+var_140], rax
call ssz_hash_tree_root
mov rax, [rbp+var_130]
mov [rbp+var_128], 80h
lea rcx, [rbp+var_C0]
mov [rbp+var_120], rcx
lea r8, [rbp+var_100]
lea r9, [rbp+var_E0]
mov edi, [rax]
mov rsi, [rax+8]
mov edx, [rbp+var_128]
mov rcx, [rbp+var_120]
call ssz_verify_multi_merkle_proof
test al, 1
jnz short loc_28E4E
jmp short $+2
loc_28E2C:
mov rdi, [rbp+var_30]
add rdi, 70h ; 'p'
lea rsi, aInvalidTxProof_0; "invalid tx proof, missing nodes!"
call c4_state_add_error
mov rax, [rbp+var_30]
mov byte ptr [rax+68h], 0
mov [rbp+var_1], 0
jmp short loc_28E90
loc_28E4E:
lea rdi, [rbp+var_E0]
mov rsi, [rbp+arg_30]
mov edx, 20h ; ' '
call _memcmp
cmp eax, 0
jz short loc_28E8C
jmp short $+2
loc_28E6A:
mov rdi, [rbp+var_30]
add rdi, 70h ; 'p'
lea rsi, aInvalidTxProof_1; "invalid tx proof, body root mismatch!"
call c4_state_add_error
mov rax, [rbp+var_30]
mov byte ptr [rax+68h], 0
mov [rbp+var_1], 0
jmp short loc_28E90
loc_28E8C:
mov [rbp+var_1], 1
loc_28E90:
mov al, [rbp+var_1]
and al, 1
add rsp, 150h
pop rbp
retn
|
char verify_merkle_proof_0(
long long a1,
unsigned int a2,
long long a3,
unsigned int a4,
long long a5,
unsigned int a6,
unsigned int a7,
long long a8,
int a9,
long long a10,
long long a11,
_QWORD *a12,
long long a13)
{
int v13; // esi
int v14; // r8d
int v15; // r9d
_QWORD v17[4]; // [rsp+50h] [rbp-100h] BYREF
_BYTE v18[32]; // [rsp+70h] [rbp-E0h] BYREF
_BYTE v19[32]; // [rsp+90h] [rbp-C0h] BYREF
_QWORD v20[6]; // [rsp+B0h] [rbp-A0h] BYREF
long long v21; // [rsp+E0h] [rbp-70h]
long long v22; // [rsp+E8h] [rbp-68h]
long long v23; // [rsp+F0h] [rbp-60h] BYREF
unsigned int v24; // [rsp+11Ch] [rbp-34h]
long long v25; // [rsp+120h] [rbp-30h]
unsigned int v26; // [rsp+128h] [rbp-28h]
long long v27; // [rsp+130h] [rbp-20h]
unsigned int v28; // [rsp+138h] [rbp-18h]
long long v29; // [rsp+140h] [rbp-10h]
v28 = a2;
v29 = a3;
v26 = a4;
v27 = a5;
v25 = a1;
v24 = a6;
memset(v19, 0LL, 128LL);
memset(v18, 0LL, sizeof(v18));
v17[0] = 806LL;
v17[1] = 812LL;
v17[2] = 803LL;
v17[3] = v24 + 1704984576LL;
memcpy(v19, v27, v26);
v13 = v29;
memcpy(v20, v29, v28);
v20[4] = *a12;
v20[5] = a12[1];
v21 = a12[2];
v22 = a12[3];
ssz_hash_tree_root((unsigned int)&v23, v13, v21, a11, v14, v15, a10, a11, &ssz_transactions_bytes);
if ( (ssz_verify_multi_merkle_proof(a7, a8, 128LL, v19, v17, v18) & 1) != 0 )
{
if ( !(unsigned int)memcmp(v18, a13, 32LL) )
{
return 1;
}
else
{
c4_state_add_error(v25 + 112, "invalid tx proof, body root mismatch!");
*(_BYTE *)(v25 + 104) = 0;
return 0;
}
}
else
{
c4_state_add_error(v25 + 112, "invalid tx proof, missing nodes!");
*(_BYTE *)(v25 + 104) = 0;
return 0;
}
}
|
verify_merkle_proof:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x150
MOV RAX,qword ptr [RBP + 0x40]
MOV RAX,qword ptr [RBP + 0x38]
LEA RAX,[RBP + 0x28]
MOV qword ptr [RBP + -0x138],RAX
LEA RAX,[RBP + 0x10]
MOV qword ptr [RBP + -0x130],RAX
MOV dword ptr [RBP + -0x18],ESI
MOV qword ptr [RBP + -0x10],RDX
MOV dword ptr [RBP + -0x28],ECX
MOV qword ptr [RBP + -0x20],R8
MOV qword ptr [RBP + -0x30],RDI
MOV dword ptr [RBP + -0x34],R9D
LEA RDI,[RBP + -0xc0]
XOR ESI,ESI
MOV EDX,0x80
CALL 0x00123140
LEA RDI,[RBP + -0xe0]
XOR ESI,ESI
MOV EDX,0x20
CALL 0x00123140
MOV qword ptr [RBP + -0x100],0x326
MOV qword ptr [RBP + -0xf8],0x32c
MOV qword ptr [RBP + -0xf0],0x323
MOV EAX,dword ptr [RBP + -0x34]
ADD RAX,0x65a00000
MOV qword ptr [RBP + -0xe8],RAX
LEA RDI,[RBP + -0xc0]
MOV RSI,qword ptr [RBP + -0x20]
MOV EAX,dword ptr [RBP + -0x28]
MOV EDX,EAX
CALL 0x001231c0
LEA RDI,[RBP + -0xc0]
ADD RDI,0x20
MOV RSI,qword ptr [RBP + -0x10]
MOV EAX,dword ptr [RBP + -0x18]
MOV EDX,EAX
CALL 0x001231c0
MOV RAX,qword ptr [RBP + -0x138]
MOV RCX,qword ptr [RBP + 0x38]
MOV RDX,qword ptr [RCX]
MOV qword ptr [RBP + -0x80],RDX
MOV RDX,qword ptr [RCX + 0x8]
MOV qword ptr [RBP + -0x78],RDX
MOV RDX,qword ptr [RCX + 0x10]
MOV qword ptr [RBP + -0x70],RDX
MOV RCX,qword ptr [RCX + 0x18]
MOV qword ptr [RBP + -0x68],RCX
MOV RCX,qword ptr [RAX]
MOV qword ptr [RBP + -0x118],RCX
MOV RAX,qword ptr [RAX + 0x8]
MOV qword ptr [RBP + -0x110],RAX
LEA RAX,[0x222ad0]
MOV qword ptr [RBP + -0x108],RAX
LEA RDI,[RBP + -0xc0]
ADD RDI,0x60
LEA RAX,[RBP + -0x118]
MOV RCX,qword ptr [RAX]
MOV qword ptr [RSP],RCX
MOV RCX,qword ptr [RAX + 0x8]
MOV qword ptr [RSP + 0x8],RCX
MOV RAX,qword ptr [RAX + 0x10]
MOV qword ptr [RSP + 0x10],RAX
CALL 0x001a0a50
MOV RAX,qword ptr [RBP + -0x130]
MOV dword ptr [RBP + -0x128],0x80
LEA RCX,[RBP + -0xc0]
MOV qword ptr [RBP + -0x120],RCX
LEA R8,[RBP + -0x100]
LEA R9,[RBP + -0xe0]
MOV EDI,dword ptr [RAX]
MOV RSI,qword ptr [RAX + 0x8]
MOV EDX,dword ptr [RBP + -0x128]
MOV RCX,qword ptr [RBP + -0x120]
CALL 0x001a10c0
TEST AL,0x1
JNZ 0x00128e4e
JMP 0x00128e2c
LAB_00128e2c:
MOV RDI,qword ptr [RBP + -0x30]
ADD RDI,0x70
LEA RSI,[0x1daec4]
CALL 0x001a6370
MOV RAX,qword ptr [RBP + -0x30]
MOV byte ptr [RAX + 0x68],0x0
MOV byte ptr [RBP + -0x1],0x0
JMP 0x00128e90
LAB_00128e4e:
LEA RDI,[RBP + -0xe0]
MOV RSI,qword ptr [RBP + 0x40]
MOV EDX,0x20
CALL 0x00123100
CMP EAX,0x0
JZ 0x00128e8c
JMP 0x00128e6a
LAB_00128e6a:
MOV RDI,qword ptr [RBP + -0x30]
ADD RDI,0x70
LEA RSI,[0x1daee5]
CALL 0x001a6370
MOV RAX,qword ptr [RBP + -0x30]
MOV byte ptr [RAX + 0x68],0x0
MOV byte ptr [RBP + -0x1],0x0
JMP 0x00128e90
LAB_00128e8c:
MOV byte ptr [RBP + -0x1],0x1
LAB_00128e90:
MOV AL,byte ptr [RBP + -0x1]
AND AL,0x1
ADD RSP,0x150
POP RBP
RET
|
int1
verify_merkle_proof(long param_1,uint param_2,void *param_3,uint param_4,void *param_5,uint param_6,
int4 param_7,int8 param_8,int8 param_9,int8 param_10,
int8 param_11,int8 *param_12,void *param_13)
{
int iVar1;
ulong uVar2;
int1 *puVar3;
int8 local_108;
int8 local_100;
int8 local_f8;
long local_f0;
int1 local_e8 [32];
int1 local_c8 [32];
int1 auStack_a8 [32];
int8 local_88;
int8 local_80;
int8 local_78;
int8 local_70;
int1 auStack_68 [44];
uint local_3c;
long local_38;
uint local_30;
void *local_28;
uint local_20;
void *local_18;
int1 local_9;
local_3c = param_6;
local_38 = param_1;
local_30 = param_4;
local_28 = param_5;
local_20 = param_2;
local_18 = param_3;
memset(local_c8,0,0x80);
memset(local_e8,0,0x20);
local_108 = 0x326;
local_100 = 0x32c;
local_f8 = 0x323;
local_f0 = (ulong)local_3c + 0x65a00000;
memcpy(local_c8,local_28,(ulong)local_30);
memcpy(auStack_a8,local_18,(ulong)local_20);
local_88 = *param_12;
local_80 = param_12[1];
local_78 = param_12[2];
local_70 = param_12[3];
puVar3 = ssz_transactions_bytes;
ssz_hash_tree_root(auStack_68);
uVar2 = ssz_verify_multi_merkle_proof
(param_7,param_8,0x80,local_c8,&local_108,local_e8,param_10,param_11,puVar3);
if ((uVar2 & 1) == 0) {
c4_state_add_error(local_38 + 0x70,"invalid tx proof, missing nodes!");
*(int1 *)(local_38 + 0x68) = 0;
local_9 = 0;
}
else {
iVar1 = memcmp(local_e8,param_13,0x20);
if (iVar1 == 0) {
local_9 = 1;
}
else {
c4_state_add_error(local_38 + 0x70,"invalid tx proof, body root mismatch!");
*(int1 *)(local_38 + 0x68) = 0;
local_9 = 0;
}
}
return local_9;
}
|
|
64,294
|
verify_merkle_proof
|
corpus-core[P]colibri-stateless/src/chains/eth/verifier/verify_receipt_proof.c
|
static bool verify_merkle_proof(verify_ctx_t* ctx, ssz_ob_t proof, bytes_t block_hash, bytes_t block_number, bytes_t raw, uint32_t tx_index, bytes32_t receipt_root, bytes32_t body_root) {
uint8_t leafes[4 * 32] = {0}; // 3 leafes, 32 bytes each
bytes32_t root_hash = {0}; // calculated body root hash
gindex_t gindexes[] = {GINDEX_BLOCKUMBER, GINDEX_BLOCHASH, GINDEX_RECEIPT_ROOT, GINDEX_TXINDEX_G + tx_index}; // calculate the gindexes for the proof
// copy leaf data
memcpy(leafes, block_number.data, block_number.len);
memcpy(leafes + 32, block_hash.data, block_hash.len);
memcpy(leafes + 64, receipt_root, 32);
ssz_hash_tree_root(ssz_ob(ssz_transactions_bytes, raw), leafes + 96);
if (!ssz_verify_multi_merkle_proof(proof.bytes, bytes(leafes, sizeof(leafes)), gindexes, root_hash)) RETURN_VERIFY_ERROR(ctx, "invalid tx proof, missing nodes!");
if (memcmp(root_hash, body_root, 32) != 0) RETURN_VERIFY_ERROR(ctx, "invalid tx proof, body root mismatch!");
return true;
}
|
O3
|
c
|
verify_merkle_proof:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x118, %rsp # imm = 0x118
movq %r8, %rbx
movl %ecx, %r14d
movq %rdx, 0x28(%rsp)
movl %esi, 0x1c(%rsp)
movq %rdi, 0x20(%rsp)
movl 0x168(%rsp), %eax
movq 0x150(%rsp), %rsi
xorps %xmm0, %xmm0
leaq 0xf0(%rsp), %r15
movaps %xmm0, 0x10(%r15)
movaps %xmm0, (%r15)
movaps %xmm0, -0x10(%r15)
movaps %xmm0, -0x20(%r15)
movaps %xmm0, -0x30(%r15)
movaps %xmm0, -0x40(%r15)
movaps %xmm0, -0x50(%r15)
movaps %xmm0, -0x60(%r15)
leaq 0x50(%rsp), %r12
movaps %xmm0, 0x10(%r12)
movaps %xmm0, (%r12)
leaq 0x70(%rsp), %r13
movq $0x326, (%r13) # imm = 0x326
movq $0x32c, 0x8(%r13) # imm = 0x32C
movq $0x323, 0x10(%r13) # imm = 0x323
addq $0x65a00000, %rax # imm = 0x65A00000
movq %rax, 0x18(%r13)
movl %r9d, %edx
leaq 0x90(%rsp), %rbp
movq %rbp, %rdi
callq 0x211a0
movl %r14d, %edx
leaq 0xb0(%rsp), %rdi
movq %rbx, %rsi
callq 0x211a0
movq 0x170(%rsp), %rax
movups (%rax), %xmm0
movdqu 0x10(%rax), %xmm1
movaps %xmm0, 0x40(%rbp)
movdqa %xmm1, 0x50(%rbp)
movups 0x158(%rsp), %xmm0
movaps %xmm0, 0x30(%rsp)
leaq 0x83d7b(%rip), %rax # 0xa9c30
movq %rax, 0x40(%rsp)
movq %rax, 0x10(%rsp)
movdqa 0x30(%rsp), %xmm0
movdqu %xmm0, (%rsp)
movq %r15, %rdi
callq 0x53496
movl 0x1c(%rsp), %edi
movq 0x28(%rsp), %rsi
movl $0x80, %edx
movq %rbp, %rcx
movq %r13, %r8
movq %r12, %r9
callq 0x53995
testb %al, %al
je 0x25f27
movq 0x178(%rsp), %rax
movdqu (%rax), %xmm0
movdqu 0x10(%rax), %xmm1
pcmpeqb 0x60(%rsp), %xmm1
pcmpeqb 0x50(%rsp), %xmm0
pand %xmm1, %xmm0
pmovmskb %xmm0, %eax
cmpl $0xffff, %eax # imm = 0xFFFF
je 0x25f54
leaq 0x5a09c(%rip), %rsi # 0x7ffc1
jmp 0x25f2e
leaq 0x5a072(%rip), %rsi # 0x7ffa0
movq 0x20(%rsp), %rbx
leaq 0x70(%rbx), %rdi
callq 0x56981
movb $0x0, 0x68(%rbx)
xorl %eax, %eax
addq $0x118, %rsp # imm = 0x118
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movb $0x1, %al
jmp 0x25f42
|
verify_merkle_proof_0:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 118h
mov rbx, r8
mov r14d, ecx
mov [rsp+148h+var_120], rdx
mov [rsp+148h+var_12C], esi
mov [rsp+148h+var_128], rdi
mov eax, [rsp+148h+arg_18]
mov rsi, [rsp+148h+arg_0]
xorps xmm0, xmm0
lea r15, [rsp+148h+var_58]
movaps xmmword ptr [r15+10h], xmm0
movaps xmmword ptr [r15], xmm0
movaps xmmword ptr [r15-10h], xmm0
movaps xmmword ptr [r15-20h], xmm0
movaps xmmword ptr [r15-30h], xmm0
movaps xmmword ptr [r15-40h], xmm0
movaps xmmword ptr [r15-50h], xmm0
movaps xmmword ptr [r15-60h], xmm0
lea r12, [rsp+148h+var_F8]
movaps xmmword ptr [r12+10h], xmm0
movaps xmmword ptr [r12], xmm0
lea r13, [rsp+148h+var_D8]
mov qword ptr [r13+0], 326h
mov qword ptr [r13+8], 32Ch
mov qword ptr [r13+10h], 323h
add rax, 65A00000h
mov [r13+18h], rax
mov edx, r9d
lea rbp, [rsp+148h+var_B8]
mov rdi, rbp
call _memcpy
mov edx, r14d
lea rdi, [rsp+148h+var_98]
mov rsi, rbx
call _memcpy
mov rax, [rsp+148h+arg_20]
movups xmm0, xmmword ptr [rax]
movdqu xmm1, xmmword ptr [rax+10h]
movaps xmmword ptr [rbp+40h], xmm0
movdqa xmmword ptr [rbp+50h], xmm1
movups xmm0, [rsp+148h+arg_8]
movaps [rsp+148h+var_118], xmm0
lea rax, ssz_transactions_bytes
mov [rsp+148h+var_108], rax
mov [rsp+148h+var_138], rax
movdqa xmm0, [rsp+148h+var_118]
movdqu [rsp+148h+var_148], xmm0
mov rdi, r15
call ssz_hash_tree_root
mov edi, [rsp+148h+var_12C]
mov rsi, [rsp+148h+var_120]
mov edx, 80h
mov rcx, rbp
mov r8, r13
mov r9, r12
call ssz_verify_multi_merkle_proof
test al, al
jz short loc_25F27
mov rax, [rsp+148h+arg_28]
movdqu xmm0, xmmword ptr [rax]
movdqu xmm1, xmmword ptr [rax+10h]
pcmpeqb xmm1, [rsp+148h+var_E8]
pcmpeqb xmm0, [rsp+148h+var_F8]
pand xmm0, xmm1
pmovmskb eax, xmm0
cmp eax, 0FFFFh
jz short loc_25F54
lea rsi, aInvalidTxProof_0; "invalid tx proof, body root mismatch!"
jmp short loc_25F2E
loc_25F27:
lea rsi, aInvalidTxProof_1; "invalid tx proof, missing nodes!"
loc_25F2E:
mov rbx, [rsp+148h+var_128]
lea rdi, [rbx+70h]
call c4_state_add_error
mov byte ptr [rbx+68h], 0
xor eax, eax
loc_25F42:
add rsp, 118h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_25F54:
mov al, 1
jmp short loc_25F42
|
char verify_merkle_proof_0(
long long a1,
unsigned int a2,
long long a3,
long long a4,
long long a5,
long long a6,
long long a7,
__m128i a8,
unsigned int a9,
const __m128i *a10,
const __m128i *a11)
{
__m128i v12; // xmm1
__m128i v13; // xmm0
long long v14; // rdx
long long v15; // rcx
long long v16; // r8
long long v17; // r9
const char *v18; // rsi
__m128i v21; // [rsp+30h] [rbp-118h] BYREF
char **v22; // [rsp+40h] [rbp-108h]
__m128i v23; // [rsp+50h] [rbp-F8h] BYREF
__m128i v24; // [rsp+60h] [rbp-E8h]
_QWORD v25[4]; // [rsp+70h] [rbp-D8h] BYREF
_BYTE v26[32]; // [rsp+90h] [rbp-B8h] BYREF
_BYTE v27[32]; // [rsp+B0h] [rbp-98h] BYREF
__m128i v28; // [rsp+D0h] [rbp-78h]
__m128i v29; // [rsp+E0h] [rbp-68h]
_BYTE v30[88]; // [rsp+F0h] [rbp-58h] BYREF
memset(v30, 0, 32);
v29 = 0LL;
v28 = 0LL;
memset(v27, 0, sizeof(v27));
memset(v26, 0, sizeof(v26));
v24 = 0LL;
v23 = 0LL;
v25[0] = 806LL;
v25[1] = 812LL;
v25[2] = 803LL;
v25[3] = a9 + 1704984576LL;
memcpy(v26);
memcpy(v27);
v12 = _mm_loadu_si128(a10 + 1);
v28 = *a10;
v29 = v12;
v21 = a8;
v22 = &ssz_transactions_bytes;
v13 = _mm_load_si128(&v21);
ssz_hash_tree_root(v30, a5, v14, v15, v16, v17, v13.m128i_i64[0], v13.m128i_i64[1], &ssz_transactions_bytes);
if ( !(unsigned __int8)ssz_verify_multi_merkle_proof(a2, a3, 128LL, v26, v25, &v23) )
{
v18 = "invalid tx proof, missing nodes!";
goto LABEL_5;
}
if ( _mm_movemask_epi8(_mm_and_si128(_mm_cmpeq_epi8(_mm_loadu_si128(a11), v23), _mm_cmpeq_epi8(_mm_loadu_si128(a11 + 1), v24))) != 0xFFFF )
{
v18 = "invalid tx proof, body root mismatch!";
LABEL_5:
c4_state_add_error(a1 + 112, v18);
*(_BYTE *)(a1 + 104) = 0;
return 0;
}
return 1;
}
|
verify_merkle_proof:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x118
MOV RBX,R8
MOV R14D,ECX
MOV qword ptr [RSP + 0x28],RDX
MOV dword ptr [RSP + 0x1c],ESI
MOV qword ptr [RSP + 0x20],RDI
MOV EAX,dword ptr [RSP + 0x168]
MOV RSI,qword ptr [RSP + 0x150]
XORPS XMM0,XMM0
LEA R15,[RSP + 0xf0]
MOVAPS xmmword ptr [R15 + 0x10],XMM0
MOVAPS xmmword ptr [R15],XMM0
MOVAPS xmmword ptr [R15 + -0x10],XMM0
MOVAPS xmmword ptr [R15 + -0x20],XMM0
MOVAPS xmmword ptr [R15 + -0x30],XMM0
MOVAPS xmmword ptr [R15 + -0x40],XMM0
MOVAPS xmmword ptr [R15 + -0x50],XMM0
MOVAPS xmmword ptr [R15 + -0x60],XMM0
LEA R12,[RSP + 0x50]
MOVAPS xmmword ptr [R12 + 0x10],XMM0
MOVAPS xmmword ptr [R12],XMM0
LEA R13,[RSP + 0x70]
MOV qword ptr [R13],0x326
MOV qword ptr [R13 + 0x8],0x32c
MOV qword ptr [R13 + 0x10],0x323
ADD RAX,0x65a00000
MOV qword ptr [R13 + 0x18],RAX
MOV EDX,R9D
LEA RBP,[RSP + 0x90]
MOV RDI,RBP
CALL 0x001211a0
MOV EDX,R14D
LEA RDI,[RSP + 0xb0]
MOV RSI,RBX
CALL 0x001211a0
MOV RAX,qword ptr [RSP + 0x170]
MOVUPS XMM0,xmmword ptr [RAX]
MOVDQU XMM1,xmmword ptr [RAX + 0x10]
MOVAPS xmmword ptr [RBP + 0x40],XMM0
MOVDQA xmmword ptr [RBP + 0x50],XMM1
MOVUPS XMM0,xmmword ptr [RSP + 0x158]
MOVAPS xmmword ptr [RSP + 0x30],XMM0
LEA RAX,[0x1a9c30]
MOV qword ptr [RSP + 0x40],RAX
MOV qword ptr [RSP + 0x10],RAX
MOVDQA XMM0,xmmword ptr [RSP + 0x30]
MOVDQU xmmword ptr [RSP],XMM0
MOV RDI,R15
CALL 0x00153496
MOV EDI,dword ptr [RSP + 0x1c]
MOV RSI,qword ptr [RSP + 0x28]
MOV EDX,0x80
MOV RCX,RBP
MOV R8,R13
MOV R9,R12
CALL 0x00153995
TEST AL,AL
JZ 0x00125f27
MOV RAX,qword ptr [RSP + 0x178]
MOVDQU XMM0,xmmword ptr [RAX]
MOVDQU XMM1,xmmword ptr [RAX + 0x10]
PCMPEQB XMM1,xmmword ptr [RSP + 0x60]
PCMPEQB XMM0,xmmword ptr [RSP + 0x50]
PAND XMM0,XMM1
PMOVMSKB EAX,XMM0
CMP EAX,0xffff
JZ 0x00125f54
LEA RSI,[0x17ffc1]
JMP 0x00125f2e
LAB_00125f27:
LEA RSI,[0x17ffa0]
LAB_00125f2e:
MOV RBX,qword ptr [RSP + 0x20]
LEA RDI,[RBX + 0x70]
CALL 0x00156981
MOV byte ptr [RBX + 0x68],0x0
XOR EAX,EAX
LAB_00125f42:
ADD RSP,0x118
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_00125f54:
MOV AL,0x1
JMP 0x00125f42
|
int8
verify_merkle_proof(long param_1,int4 param_2,int8 param_3,uint param_4,void *param_5,
ulong param_6,void *param_7,int8 param_8,int8 param_9,uint param_10,
int8 *param_11,char *param_12)
{
char cVar1;
char *pcVar2;
int1 auVar3 [16];
int1 auVar4 [16];
int1 *puVar5;
int8 local_f8;
int8 uStack_f0;
int8 local_e8;
int8 uStack_e0;
int8 local_d8;
int8 local_d0;
int8 local_c8;
long local_c0;
int8 local_b8;
int8 uStack_b0;
int8 local_a8;
int8 uStack_a0;
int8 local_98;
int8 uStack_90;
int8 local_88;
int8 uStack_80;
int8 local_78;
int8 uStack_70;
int8 local_68;
int8 uStack_60;
int8 local_58;
int8 uStack_50;
int8 local_48;
int8 uStack_40;
local_48 = 0;
uStack_40 = 0;
local_58 = 0;
uStack_50 = 0;
local_68 = 0;
uStack_60 = 0;
local_78 = 0;
uStack_70 = 0;
local_88 = 0;
uStack_80 = 0;
local_98 = 0;
uStack_90 = 0;
local_a8 = 0;
uStack_a0 = 0;
local_b8 = 0;
uStack_b0 = 0;
local_e8 = 0;
uStack_e0 = 0;
local_f8 = 0;
uStack_f0 = 0;
local_d8 = 0x326;
local_d0 = 0x32c;
local_c8 = 0x323;
local_c0 = (ulong)param_10 + 0x65a00000;
memcpy(&local_b8,param_7,param_6 & 0xffffffff);
memcpy(&local_98,param_5,(ulong)param_4);
local_78 = *param_11;
uStack_70 = param_11[1];
local_68 = param_11[2];
uStack_60 = param_11[3];
puVar5 = ssz_transactions_bytes;
ssz_hash_tree_root(&local_58);
cVar1 = ssz_verify_multi_merkle_proof
(param_2,param_3,0x80,&local_b8,&local_d8,&local_f8,param_8,param_9,puVar5);
if (cVar1 == '\0') {
pcVar2 = "invalid tx proof, missing nodes!";
}
else {
auVar4[0] = -(param_12[0x10] == (char)local_e8);
auVar4[1] = -(param_12[0x11] == local_e8._1_1_);
auVar4[2] = -(param_12[0x12] == local_e8._2_1_);
auVar4[3] = -(param_12[0x13] == local_e8._3_1_);
auVar4[4] = -(param_12[0x14] == local_e8._4_1_);
auVar4[5] = -(param_12[0x15] == local_e8._5_1_);
auVar4[6] = -(param_12[0x16] == local_e8._6_1_);
auVar4[7] = -(param_12[0x17] == local_e8._7_1_);
auVar4[8] = -(param_12[0x18] == (char)uStack_e0);
auVar4[9] = -(param_12[0x19] == uStack_e0._1_1_);
auVar4[10] = -(param_12[0x1a] == uStack_e0._2_1_);
auVar4[0xb] = -(param_12[0x1b] == uStack_e0._3_1_);
auVar4[0xc] = -(param_12[0x1c] == uStack_e0._4_1_);
auVar4[0xd] = -(param_12[0x1d] == uStack_e0._5_1_);
auVar4[0xe] = -(param_12[0x1e] == uStack_e0._6_1_);
auVar4[0xf] = -(param_12[0x1f] == uStack_e0._7_1_);
auVar3[0] = -(*param_12 == (char)local_f8);
auVar3[1] = -(param_12[1] == local_f8._1_1_);
auVar3[2] = -(param_12[2] == local_f8._2_1_);
auVar3[3] = -(param_12[3] == local_f8._3_1_);
auVar3[4] = -(param_12[4] == local_f8._4_1_);
auVar3[5] = -(param_12[5] == local_f8._5_1_);
auVar3[6] = -(param_12[6] == local_f8._6_1_);
auVar3[7] = -(param_12[7] == local_f8._7_1_);
auVar3[8] = -(param_12[8] == (char)uStack_f0);
auVar3[9] = -(param_12[9] == uStack_f0._1_1_);
auVar3[10] = -(param_12[10] == uStack_f0._2_1_);
auVar3[0xb] = -(param_12[0xb] == uStack_f0._3_1_);
auVar3[0xc] = -(param_12[0xc] == uStack_f0._4_1_);
auVar3[0xd] = -(param_12[0xd] == uStack_f0._5_1_);
auVar3[0xe] = -(param_12[0xe] == uStack_f0._6_1_);
auVar3[0xf] = -(param_12[0xf] == uStack_f0._7_1_);
auVar3 = auVar3 & auVar4;
if ((ushort)((ushort)(SUB161(auVar3 >> 7,0) & 1) | (ushort)(SUB161(auVar3 >> 0xf,0) & 1) << 1 |
(ushort)(SUB161(auVar3 >> 0x17,0) & 1) << 2 |
(ushort)(SUB161(auVar3 >> 0x1f,0) & 1) << 3 |
(ushort)(SUB161(auVar3 >> 0x27,0) & 1) << 4 |
(ushort)(SUB161(auVar3 >> 0x2f,0) & 1) << 5 |
(ushort)(SUB161(auVar3 >> 0x37,0) & 1) << 6 |
(ushort)(SUB161(auVar3 >> 0x3f,0) & 1) << 7 |
(ushort)(SUB161(auVar3 >> 0x47,0) & 1) << 8 |
(ushort)(SUB161(auVar3 >> 0x4f,0) & 1) << 9 |
(ushort)(SUB161(auVar3 >> 0x57,0) & 1) << 10 |
(ushort)(SUB161(auVar3 >> 0x5f,0) & 1) << 0xb |
(ushort)(SUB161(auVar3 >> 0x67,0) & 1) << 0xc |
(ushort)(SUB161(auVar3 >> 0x6f,0) & 1) << 0xd |
(ushort)(SUB161(auVar3 >> 0x77,0) & 1) << 0xe |
(ushort)(byte)(auVar3[0xf] >> 7) << 0xf) == 0xffff) {
return 0xff01;
}
pcVar2 = "invalid tx proof, body root mismatch!";
}
c4_state_add_error(param_1 + 0x70,pcVar2);
*(int1 *)(param_1 + 0x68) = 0;
return 0;
}
|
|
64,295
|
stbi_is_16_bit
|
monkey531[P]llama/examples/llava/../../common/stb_image.h
|
STBIDEF int stbi_is_16_bit(char const *filename)
{
FILE *f = stbi__fopen(filename, "rb");
int result;
if (!f) return stbi__err("can't fopen", "Unable to open file");
result = stbi_is_16_bit_from_file(f);
fclose(f);
return result;
}
|
O0
|
c
|
stbi_is_16_bit:
subq $0x28, %rsp
movq %rdi, 0x18(%rsp)
movq 0x18(%rsp), %rdi
leaq 0x1daf40(%rip), %rsi # 0x252625
callq 0x75990
movq %rax, 0x10(%rsp)
cmpq $0x0, 0x10(%rsp)
jne 0x77709
leaq 0x1d7b82(%rip), %rdi # 0x24f280
callq 0x759c0
movl %eax, 0x24(%rsp)
jmp 0x77729
movq 0x10(%rsp), %rdi
callq 0x77740
movl %eax, 0xc(%rsp)
movq 0x10(%rsp), %rdi
callq 0x619d0
movl 0xc(%rsp), %eax
movl %eax, 0x24(%rsp)
movl 0x24(%rsp), %eax
addq $0x28, %rsp
retq
nopw %cs:(%rax,%rax)
|
stbi_is_16_bit:
sub rsp, 28h
mov [rsp+28h+var_10], rdi
mov rdi, [rsp+28h+var_10]; char *
lea rsi, aCrb+2; char *
call _ZL11stbi__fopenPKcS0_; stbi__fopen(char const*,char const*)
mov [rsp+28h+var_18], rax
cmp [rsp+28h+var_18], 0
jnz short loc_77709
lea rdi, aCanTFopen; "can't fopen"
call _ZL9stbi__errPKc; stbi__err(char const*)
mov [rsp+28h+var_4], eax
jmp short loc_77729
loc_77709:
mov rdi, [rsp+28h+var_18]
call stbi_is_16_bit_from_file
mov [rsp+28h+var_1C], eax
mov rdi, [rsp+28h+var_18]
call _fclose
mov eax, [rsp+28h+var_1C]
mov [rsp+28h+var_4], eax
loc_77729:
mov eax, [rsp+28h+var_4]
add rsp, 28h
retn
|
long long stbi_is_16_bit(const char *a1)
{
unsigned int is_16_bit_from_file; // [rsp+Ch] [rbp-1Ch]
long long v3; // [rsp+10h] [rbp-18h]
v3 = stbi__fopen(a1, "rb");
if ( v3 )
{
is_16_bit_from_file = stbi_is_16_bit_from_file(v3);
fclose(v3);
return is_16_bit_from_file;
}
else
{
return (unsigned int)stbi__err("can't fopen");
}
}
|
stbi_is_16_bit:
SUB RSP,0x28
MOV qword ptr [RSP + 0x18],RDI
MOV RDI,qword ptr [RSP + 0x18]
LEA RSI,[0x352625]
CALL 0x00175990
MOV qword ptr [RSP + 0x10],RAX
CMP qword ptr [RSP + 0x10],0x0
JNZ 0x00177709
LEA RDI,[0x34f280]
CALL 0x001759c0
MOV dword ptr [RSP + 0x24],EAX
JMP 0x00177729
LAB_00177709:
MOV RDI,qword ptr [RSP + 0x10]
CALL 0x00177740
MOV dword ptr [RSP + 0xc],EAX
MOV RDI,qword ptr [RSP + 0x10]
CALL 0x001619d0
MOV EAX,dword ptr [RSP + 0xc]
MOV dword ptr [RSP + 0x24],EAX
LAB_00177729:
MOV EAX,dword ptr [RSP + 0x24]
ADD RSP,0x28
RET
|
int4 stbi_is_16_bit(char *param_1)
{
FILE *__stream;
int4 local_4;
__stream = (FILE *)stbi__fopen(param_1,"rb");
if (__stream == (FILE *)0x0) {
local_4 = stbi__err("can\'t fopen");
}
else {
local_4 = stbi_is_16_bit_from_file(__stream);
fclose(__stream);
}
return local_4;
}
|
|
64,296
|
update_light_client_update
|
corpus-core[P]colibri-stateless/src/chains/eth/verifier/sync_committee.c
|
static bool update_light_client_update(verify_ctx_t* ctx, ssz_ob_t* update, bytes32_t trusted_blockhash) {
bytes32_t sync_root = {0};
bytes32_t merkle_root = {0};
bytes32_t blockhash = {0};
ssz_ob_t attested = ssz_get(update, "attestedHeader");
ssz_ob_t header = ssz_get(&attested, "beacon");
ssz_ob_t sync_aggregate = ssz_get(update, "syncAggregate");
ssz_ob_t signature = ssz_get(&sync_aggregate, "syncCommitteeSignature");
ssz_ob_t sync_bits = ssz_get(&sync_aggregate, "syncCommitteeBits");
ssz_ob_t merkle_proof = ssz_get(update, "nextSyncCommitteeBranch");
ssz_ob_t sync_committee = ssz_get(update, "nextSyncCommittee");
ssz_ob_t state_root = ssz_get(&header, "stateRoot");
uint64_t slot = ssz_get_uint64(&header, "slot");
if (ssz_is_error(header) || ssz_is_error(state_root) || ssz_is_error(signature) || ssz_is_error(sync_bits) || ssz_is_error(merkle_proof) || ssz_is_error(sync_committee))
RETURN_VERIFY_ERROR(ctx, "invalid light client update!");
// calculate the blockhash
ssz_hash_tree_root(header, blockhash);
// verify the signature of the old sync committee for the next sync committee
if (trusted_blockhash) {
if (!bytes_all_zero(bytes(trusted_blockhash, 32)) && memcmp(trusted_blockhash, blockhash, 32)) RETURN_VERIFY_ERROR(ctx, "invalid blockhash!");
}
else {
if (c4_verify_blockroot_signature(ctx, &header, &sync_bits, &signature, slot) != C4_SUCCESS) return false;
}
// create merkle root from proof
ssz_hash_tree_root(sync_committee, sync_root);
ssz_verify_single_merkle_proof(merkle_proof.bytes, sync_root, NEXT_SYNC_COMMITTEE_GINDEX, merkle_root);
// verify the merkle root
if (memcmp(merkle_root, state_root.bytes.data, 32)) RETURN_VERIFY_ERROR(ctx, "invalid merkle root in light client update!");
return c4_set_sync_period(slot, blockhash, ssz_get(&sync_committee, "pubkeys").bytes, ctx->chain_id);
}
|
O1
|
c
|
update_light_client_update:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x170, %rsp # imm = 0x170
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %rbx
pxor %xmm0, %xmm0
movdqa %xmm0, 0x100(%rsp)
movdqa %xmm0, 0xf0(%rsp)
movdqa %xmm0, 0xe0(%rsp)
movdqa %xmm0, 0xd0(%rsp)
movdqa %xmm0, 0x70(%rsp)
movdqa %xmm0, 0x60(%rsp)
leaq 0x2bcb8(%rip), %rdx # 0x3e0c5
leaq 0x140(%rsp), %r13
movq %r13, %rdi
callq 0x14ddd
leaq 0x2bcb0(%rip), %rdx # 0x3e0d4
leaq 0x48(%rsp), %r12
movq %r12, %rdi
movq %r13, %rsi
callq 0x14ddd
leaq 0x2b3eb(%rip), %rdx # 0x3d826
leaq 0x128(%rsp), %r13
movq %r13, %rdi
movq %r15, %rsi
callq 0x14ddd
leaq 0x2b317(%rip), %rdx # 0x3d76c
leaq 0xb8(%rsp), %rdi
movq %r13, %rsi
callq 0x14ddd
leaq 0x2b2d5(%rip), %rdx # 0x3d741
leaq 0xa0(%rsp), %rdi
movq %r13, %rsi
callq 0x14ddd
leaq 0x2bc60(%rip), %rdx # 0x3e0e3
leaq 0x30(%rsp), %rdi
movq %r15, %rsi
callq 0x14ddd
leaq 0x2bc1c(%rip), %rdx # 0x3e0b3
leaq 0x18(%rsp), %rdi
movq %r15, %rsi
callq 0x14ddd
leaq 0x2b397(%rip), %rdx # 0x3d842
leaq 0x88(%rsp), %rdi
movq %r12, %rsi
callq 0x14ddd
leaq 0x2b35f(%rip), %rdx # 0x3d821
leaq 0x158(%rsp), %r15
movq %r15, %rdi
movq %r12, %rsi
callq 0x14ddd
movl (%r15), %edi
movq 0x8(%r15), %rsi
callq 0x135ae
cmpq $0x0, 0x10(%r12)
je 0x125e4
cmpq $0x0, 0x50(%rsp)
je 0x125e4
cmpq $0x0, 0x98(%rsp)
je 0x125e4
cmpq $0x0, 0x90(%rsp)
je 0x125e4
cmpq $0x0, 0xc8(%rsp)
je 0x125e4
cmpq $0x0, 0xc0(%rsp)
je 0x125e4
cmpq $0x0, 0xb0(%rsp)
je 0x125e4
cmpq $0x0, 0xa8(%rsp)
je 0x125e4
cmpq $0x0, 0x40(%rsp)
je 0x125e4
cmpq $0x0, 0x38(%rsp)
je 0x125e4
cmpq $0x0, 0x28(%rsp)
je 0x125e4
cmpq $0x0, 0x20(%rsp)
je 0x125e4
movq %rax, %r15
movq 0x58(%rsp), %rax
movq %rax, 0x10(%rsp)
movdqu 0x48(%rsp), %xmm0
movdqu %xmm0, (%rsp)
leaq 0x60(%rsp), %rdi
callq 0x151e5
testq %r14, %r14
je 0x1260b
movl $0x20, %edi
movq %r14, %rsi
xorl %edx, %edx
callq 0x12ad9
testb %al, %al
jne 0x1262f
movdqu (%r14), %xmm0
movdqu 0x10(%r14), %xmm1
pcmpeqb 0x70(%rsp), %xmm1
pcmpeqb 0x60(%rsp), %xmm0
pand %xmm1, %xmm0
pmovmskb %xmm0, %eax
cmpl $0xffff, %eax # imm = 0xFFFF
je 0x1262f
leaq 0x70(%rbx), %rdi
leaq 0x2c888(%rip), %rsi # 0x3ee6a
jmp 0x125ef
leaq 0x70(%rbx), %rdi
leaq 0x2c85e(%rip), %rsi # 0x3ee4d
callq 0x18879
movb $0x0, 0x68(%rbx)
xorl %eax, %eax
addq $0x170, %rsp # imm = 0x170
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
leaq 0x48(%rsp), %rsi
leaq 0xa0(%rsp), %rdx
leaq 0xb8(%rsp), %rcx
movq %rbx, %rdi
movq %r15, %r8
callq 0xcea2
testl %eax, %eax
jne 0x125f8
movq 0x28(%rsp), %rax
movq %rax, 0x10(%rsp)
movups 0x18(%rsp), %xmm0
movups %xmm0, (%rsp)
leaq 0xf0(%rsp), %r14
movq %r14, %rdi
callq 0x151e5
movl 0x30(%rsp), %edi
movq 0x38(%rsp), %rsi
leaq 0xd0(%rsp), %r12
movl $0x37, %ecx
movq %r14, %rdx
movq %r12, %r8
callq 0x159be
movq 0x90(%rsp), %rax
movdqu (%rax), %xmm0
movdqu 0x10(%rax), %xmm1
pcmpeqb 0x10(%r12), %xmm1
pcmpeqb (%r12), %xmm0
pand %xmm1, %xmm0
pmovmskb %xmm0, %eax
cmpl $0xffff, %eax # imm = 0xFFFF
je 0x126b0
leaq 0x70(%rbx), %rdi
leaq 0x2c7d2(%rip), %rsi # 0x3ee7d
jmp 0x125ef
leaq 0x2ba24(%rip), %rdx # 0x3e0db
leaq 0x110(%rsp), %r14
leaq 0x18(%rsp), %rsi
movq %r14, %rdi
callq 0x14ddd
movl (%r14), %edx
movq 0x8(%r14), %rcx
movl 0x80(%rbx), %r8d
leaq 0x60(%rsp), %rsi
movq %r15, %rdi
callq 0x117a6
jmp 0x125fa
|
update_light_client_update:
push r15
push r14
push r13
push r12
push rbx
sub rsp, 170h
mov r14, rdx
mov r15, rsi
mov rbx, rdi
pxor xmm0, xmm0
movdqa [rsp+198h+var_98], xmm0
movdqa [rsp+198h+var_A8], xmm0
movdqa [rsp+198h+var_B8], xmm0
movdqa [rsp+198h+var_C8], xmm0
movdqa [rsp+198h+var_128], xmm0
movdqa [rsp+198h+var_138], xmm0
lea rdx, aAttestedheader; "attestedHeader"
lea r13, [rsp+198h+var_58]
mov rdi, r13
call ssz_get
lea rdx, aBeacon; "beacon"
lea r12, [rsp+198h+var_150]
mov rdi, r12
mov rsi, r13
call ssz_get
lea rdx, aSyncaggregate; "syncAggregate"
lea r13, [rsp+198h+var_70]
mov rdi, r13
mov rsi, r15
call ssz_get
lea rdx, aSynccommittees; "syncCommitteeSignature"
lea rdi, [rsp+198h+var_E0]
mov rsi, r13
call ssz_get
lea rdx, aSynccommitteeb; "syncCommitteeBits"
lea rdi, [rsp+198h+var_F8]
mov rsi, r13
call ssz_get
lea rdx, aNextsynccommit_0; "nextSyncCommitteeBranch"
lea rdi, [rsp+198h+var_168]
mov rsi, r15
call ssz_get
lea rdx, aNextsynccommit; "nextSyncCommittee"
lea rdi, [rsp+198h+var_180]
mov rsi, r15
call ssz_get
lea rdx, aStateroot; "stateRoot"
lea rdi, [rsp+198h+var_110]
mov rsi, r12
call ssz_get
lea rdx, aSlot; "slot"
lea r15, [rsp+198h+var_40]
mov rdi, r15
mov rsi, r12
call ssz_get
mov edi, [r15]
mov rsi, [r15+8]
call bytes_as_le
cmp qword ptr [r12+10h], 0
jz loc_125E4
cmp qword ptr [rsp+198h+var_150+8], 0
jz loc_125E4
cmp [rsp+198h+var_100], 0
jz loc_125E4
cmp [rsp+198h+var_108], 0
jz loc_125E4
cmp [rsp+198h+var_D0], 0
jz loc_125E4
cmp [rsp+198h+var_D8], 0
jz loc_125E4
cmp [rsp+198h+var_E8], 0
jz loc_125E4
cmp [rsp+198h+var_F0], 0
jz loc_125E4
cmp [rsp+198h+var_158], 0
jz loc_125E4
cmp [rsp+198h+var_160], 0
jz short loc_125E4
cmp [rsp+198h+var_170], 0
jz short loc_125E4
cmp qword ptr [rsp+198h+var_180+8], 0
jz short loc_125E4
mov r15, rax
mov rax, [rsp+198h+var_140]
mov [rsp+198h+var_188], rax
movdqu xmm0, [rsp+198h+var_150]
movdqu [rsp+198h+var_198], xmm0
lea rdi, [rsp+198h+var_138]
call ssz_hash_tree_root
test r14, r14
jz short loc_1260B
mov edi, 20h ; ' '
mov rsi, r14
xor edx, edx
call bytes_all_equal
test al, al
jnz short loc_1262F
movdqu xmm0, xmmword ptr [r14]
movdqu xmm1, xmmword ptr [r14+10h]
pcmpeqb xmm1, [rsp+198h+var_128]
pcmpeqb xmm0, [rsp+198h+var_138]
pand xmm0, xmm1
pmovmskb eax, xmm0
cmp eax, 0FFFFh
jz short loc_1262F
lea rdi, [rbx+70h]
lea rsi, aInvalidBlockha_0; "invalid blockhash!"
jmp short loc_125EF
loc_125E4:
lea rdi, [rbx+70h]
lea rsi, aInvalidLightCl; "invalid light client update!"
loc_125EF:
call c4_state_add_error
mov byte ptr [rbx+68h], 0
loc_125F8:
xor eax, eax
loc_125FA:
add rsp, 170h
pop rbx
pop r12
pop r13
pop r14
pop r15
retn
loc_1260B:
lea rsi, [rsp+198h+var_150]
lea rdx, [rsp+198h+var_F8]
lea rcx, [rsp+198h+var_E0]
mov rdi, rbx
mov r8, r15
call c4_verify_blockroot_signature
test eax, eax
jnz short loc_125F8
loc_1262F:
mov rax, [rsp+198h+var_170]
mov [rsp+198h+var_188], rax
movups xmm0, [rsp+198h+var_180]
movups [rsp+198h+var_198], xmm0
lea r14, [rsp+198h+var_A8]
mov rdi, r14
call ssz_hash_tree_root
mov edi, [rsp+198h+var_168]
mov rsi, [rsp+198h+var_160]
lea r12, [rsp+198h+var_C8]
mov ecx, 37h ; '7'
mov rdx, r14
mov r8, r12
call ssz_verify_single_merkle_proof
mov rax, [rsp+198h+var_108]
movdqu xmm0, xmmword ptr [rax]
movdqu xmm1, xmmword ptr [rax+10h]
pcmpeqb xmm1, xmmword ptr [r12+10h]
pcmpeqb xmm0, xmmword ptr [r12]
pand xmm0, xmm1
pmovmskb eax, xmm0
cmp eax, 0FFFFh
jz short loc_126B0
lea rdi, [rbx+70h]
lea rsi, aInvalidMerkleR; "invalid merkle root in light client upd"...
jmp loc_125EF
loc_126B0:
lea rdx, aPubkeys; "pubkeys"
lea r14, [rsp+198h+var_88]
lea rsi, [rsp+198h+var_180]
mov rdi, r14
call ssz_get
mov edx, [r14]
mov rcx, [r14+8]
mov r8d, [rbx+80h]
lea rsi, [rsp+198h+var_138]
mov rdi, r15
call c4_set_sync_period
jmp loc_125FA
|
char update_light_client_update(long long a1, long long a2, const __m128i *a3)
{
long long v5; // rsi
long long v6; // rax
long long v7; // rdx
long long v8; // rcx
long long v9; // r8
long long v10; // r9
unsigned long long v11; // r15
__m128i v12; // xmm0
__m128i *v13; // rsi
long long v14; // rdx
long long v15; // rcx
long long v16; // r8
long long v17; // r9
long long v18; // rdi
const char *v19; // rsi
long long v21; // [rsp+18h] [rbp-180h] BYREF
long long v22; // [rsp+20h] [rbp-178h]
long long v23; // [rsp+28h] [rbp-170h]
unsigned int v24; // [rsp+30h] [rbp-168h] BYREF
long long v25; // [rsp+38h] [rbp-160h]
long long v26; // [rsp+40h] [rbp-158h]
__m128i v27; // [rsp+48h] [rbp-150h] BYREF
long long v28; // [rsp+58h] [rbp-140h]
__m128i v29; // [rsp+60h] [rbp-138h] BYREF
__m128i v30; // [rsp+70h] [rbp-128h]
_BYTE v31[8]; // [rsp+88h] [rbp-110h] BYREF
const __m128i *v32; // [rsp+90h] [rbp-108h]
long long v33; // [rsp+98h] [rbp-100h]
_BYTE v34[8]; // [rsp+A0h] [rbp-F8h] BYREF
long long v35; // [rsp+A8h] [rbp-F0h]
long long v36; // [rsp+B0h] [rbp-E8h]
_BYTE v37[8]; // [rsp+B8h] [rbp-E0h] BYREF
long long v38; // [rsp+C0h] [rbp-D8h]
long long v39; // [rsp+C8h] [rbp-D0h]
__m128i v40; // [rsp+D0h] [rbp-C8h] BYREF
__m128i v41; // [rsp+E0h] [rbp-B8h]
_OWORD v42[2]; // [rsp+F0h] [rbp-A8h] BYREF
unsigned int v43; // [rsp+110h] [rbp-88h] BYREF
long long v44; // [rsp+118h] [rbp-80h]
_BYTE v45[24]; // [rsp+128h] [rbp-70h] BYREF
_BYTE v46[24]; // [rsp+140h] [rbp-58h] BYREF
unsigned int v47; // [rsp+158h] [rbp-40h] BYREF
long long v48; // [rsp+160h] [rbp-38h]
memset(v42, 0, sizeof(v42));
v41 = 0LL;
v40 = 0LL;
v30 = 0LL;
v29 = 0LL;
ssz_get(v46, a2, "attestedHeader");
ssz_get(&v27, v46, "beacon");
ssz_get(v45, a2, "syncAggregate");
ssz_get(v37, v45, "syncCommitteeSignature");
ssz_get(v34, v45, "syncCommitteeBits");
ssz_get(&v24, a2, "nextSyncCommitteeBranch");
ssz_get(&v21, a2, "nextSyncCommittee");
ssz_get(v31, &v27, "stateRoot");
ssz_get(&v47, &v27, "slot");
v5 = v48;
v6 = bytes_as_le(v47, v48);
if ( !v28 || !v27.m128i_i64[1] || !v33 || !v32 || !v39 || !v38 || !v36 || !v35 || !v26 || !v25 || !v23 || !v22 )
{
v18 = a1 + 112;
v19 = "invalid light client update!";
goto LABEL_18;
}
v11 = v6;
v12 = _mm_loadu_si128(&v27);
ssz_hash_tree_root(&v29, v5, v7, v8, v9, v10, v12.m128i_i64[0], v12.m128i_i64[1], v28);
if ( a3 )
{
v13 = (__m128i *)a3;
if ( !(unsigned __int8)bytes_all_equal(32LL, a3, 0LL)
&& _mm_movemask_epi8(_mm_and_si128(_mm_cmpeq_epi8(_mm_loadu_si128(a3), v29), _mm_cmpeq_epi8(_mm_loadu_si128(a3 + 1), v30))) != 0xFFFF )
{
v18 = a1 + 112;
v19 = "invalid blockhash!";
LABEL_18:
c4_state_add_error(v18, v19);
*(_BYTE *)(a1 + 104) = 0;
return 0;
}
}
else
{
v13 = &v27;
if ( (unsigned int)c4_verify_blockroot_signature(a1, &v27, (long long)v34, (long long)v37, v11) )
return 0;
}
ssz_hash_tree_root(v42, v13, v14, v15, v16, v17, v21, v22, v23);
ssz_verify_single_merkle_proof(v24, v25, v42, 55LL, &v40);
if ( _mm_movemask_epi8(_mm_and_si128(_mm_cmpeq_epi8(_mm_loadu_si128(v32), v40), _mm_cmpeq_epi8(_mm_loadu_si128(v32 + 1), v41))) != 0xFFFF )
{
v18 = a1 + 112;
v19 = "invalid merkle root in light client update!";
goto LABEL_18;
}
ssz_get(&v43, &v21, "pubkeys");
return c4_set_sync_period(v11, &v29, v43, v44, *(_DWORD *)(a1 + 128));
}
|
update_light_client_update:
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x170
MOV R14,RDX
MOV R15,RSI
MOV RBX,RDI
PXOR XMM0,XMM0
MOVDQA xmmword ptr [RSP + 0x100],XMM0
MOVDQA xmmword ptr [RSP + 0xf0],XMM0
MOVDQA xmmword ptr [RSP + 0xe0],XMM0
MOVDQA xmmword ptr [RSP + 0xd0],XMM0
MOVDQA xmmword ptr [RSP + 0x70],XMM0
MOVDQA xmmword ptr [RSP + 0x60],XMM0
LEA RDX,[0x13e0c5]
LEA R13,[RSP + 0x140]
MOV RDI,R13
CALL 0x00114ddd
LEA RDX,[0x13e0d4]
LEA R12,[RSP + 0x48]
MOV RDI,R12
MOV RSI,R13
CALL 0x00114ddd
LEA RDX,[0x13d826]
LEA R13,[RSP + 0x128]
MOV RDI,R13
MOV RSI,R15
CALL 0x00114ddd
LEA RDX,[0x13d76c]
LEA RDI,[RSP + 0xb8]
MOV RSI,R13
CALL 0x00114ddd
LEA RDX,[0x13d741]
LEA RDI,[RSP + 0xa0]
MOV RSI,R13
CALL 0x00114ddd
LEA RDX,[0x13e0e3]
LEA RDI,[RSP + 0x30]
MOV RSI,R15
CALL 0x00114ddd
LEA RDX,[0x13e0b3]
LEA RDI,[RSP + 0x18]
MOV RSI,R15
CALL 0x00114ddd
LEA RDX,[0x13d842]
LEA RDI,[RSP + 0x88]
MOV RSI,R12
CALL 0x00114ddd
LEA RDX,[0x13d821]
LEA R15,[RSP + 0x158]
MOV RDI,R15
MOV RSI,R12
CALL 0x00114ddd
MOV EDI,dword ptr [R15]
MOV RSI,qword ptr [R15 + 0x8]
CALL 0x001135ae
CMP qword ptr [R12 + 0x10],0x0
JZ 0x001125e4
CMP qword ptr [RSP + 0x50],0x0
JZ 0x001125e4
CMP qword ptr [RSP + 0x98],0x0
JZ 0x001125e4
CMP qword ptr [RSP + 0x90],0x0
JZ 0x001125e4
CMP qword ptr [RSP + 0xc8],0x0
JZ 0x001125e4
CMP qword ptr [RSP + 0xc0],0x0
JZ 0x001125e4
CMP qword ptr [RSP + 0xb0],0x0
JZ 0x001125e4
CMP qword ptr [RSP + 0xa8],0x0
JZ 0x001125e4
CMP qword ptr [RSP + 0x40],0x0
JZ 0x001125e4
CMP qword ptr [RSP + 0x38],0x0
JZ 0x001125e4
CMP qword ptr [RSP + 0x28],0x0
JZ 0x001125e4
CMP qword ptr [RSP + 0x20],0x0
JZ 0x001125e4
MOV R15,RAX
MOV RAX,qword ptr [RSP + 0x58]
MOV qword ptr [RSP + 0x10],RAX
MOVDQU XMM0,xmmword ptr [RSP + 0x48]
MOVDQU xmmword ptr [RSP],XMM0
LEA RDI,[RSP + 0x60]
CALL 0x001151e5
TEST R14,R14
JZ 0x0011260b
MOV EDI,0x20
MOV RSI,R14
XOR EDX,EDX
CALL 0x00112ad9
TEST AL,AL
JNZ 0x0011262f
MOVDQU XMM0,xmmword ptr [R14]
MOVDQU XMM1,xmmword ptr [R14 + 0x10]
PCMPEQB XMM1,xmmword ptr [RSP + 0x70]
PCMPEQB XMM0,xmmword ptr [RSP + 0x60]
PAND XMM0,XMM1
PMOVMSKB EAX,XMM0
CMP EAX,0xffff
JZ 0x0011262f
LEA RDI,[RBX + 0x70]
LEA RSI,[0x13ee6a]
JMP 0x001125ef
LAB_001125e4:
LEA RDI,[RBX + 0x70]
LEA RSI,[0x13ee4d]
LAB_001125ef:
CALL 0x00118879
MOV byte ptr [RBX + 0x68],0x0
LAB_001125f8:
XOR EAX,EAX
LAB_001125fa:
ADD RSP,0x170
POP RBX
POP R12
POP R13
POP R14
POP R15
RET
LAB_0011260b:
LEA RSI,[RSP + 0x48]
LEA RDX,[RSP + 0xa0]
LEA RCX,[RSP + 0xb8]
MOV RDI,RBX
MOV R8,R15
CALL 0x0010cea2
TEST EAX,EAX
JNZ 0x001125f8
LAB_0011262f:
MOV RAX,qword ptr [RSP + 0x28]
MOV qword ptr [RSP + 0x10],RAX
MOVUPS XMM0,xmmword ptr [RSP + 0x18]
MOVUPS xmmword ptr [RSP],XMM0
LEA R14,[RSP + 0xf0]
MOV RDI,R14
CALL 0x001151e5
MOV EDI,dword ptr [RSP + 0x30]
MOV RSI,qword ptr [RSP + 0x38]
LEA R12,[RSP + 0xd0]
MOV ECX,0x37
MOV RDX,R14
MOV R8,R12
CALL 0x001159be
MOV RAX,qword ptr [RSP + 0x90]
MOVDQU XMM0,xmmword ptr [RAX]
MOVDQU XMM1,xmmword ptr [RAX + 0x10]
PCMPEQB XMM1,xmmword ptr [R12 + 0x10]
PCMPEQB XMM0,xmmword ptr [R12]
PAND XMM0,XMM1
PMOVMSKB EAX,XMM0
CMP EAX,0xffff
JZ 0x001126b0
LEA RDI,[RBX + 0x70]
LEA RSI,[0x13ee7d]
JMP 0x001125ef
LAB_001126b0:
LEA RDX,[0x13e0db]
LEA R14,[RSP + 0x110]
LEA RSI,[RSP + 0x18]
MOV RDI,R14
CALL 0x00114ddd
MOV EDX,dword ptr [R14]
MOV RCX,qword ptr [R14 + 0x8]
MOV R8D,dword ptr [RBX + 0x80]
LEA RSI,[RSP + 0x60]
MOV RDI,R15
CALL 0x001117a6
JMP 0x001125fa
|
int8
update_light_client_update
(long param_1,int8 param_2,char *param_3,int8 param_4,int8 param_5,
int8 param_6)
{
char cVar1;
int iVar2;
int8 uVar3;
char *pcVar4;
int1 auVar5 [16];
int1 auVar6 [16];
int1 auVar7 [16];
int1 auVar8 [16];
int8 local_180;
long lStack_178;
long local_170;
int4 local_168 [2];
long local_160;
long local_158;
int8 local_150;
long lStack_148;
long local_140;
int1 local_138 [16];
int1 local_128 [16];
int1 local_110 [8];
char *local_108;
long local_100;
int1 local_f8 [8];
long local_f0;
long local_e8;
int1 local_e0 [8];
long local_d8;
long local_d0;
int1 local_c8 [16];
int1 local_b8 [16];
int1 local_a8 [16];
int1 local_98 [16];
int4 local_88 [2];
int8 local_80;
int1 local_70 [24];
int1 local_58 [24];
int4 local_40 [2];
int8 local_38;
local_98 = (int1 [16])0x0;
local_a8 = (int1 [16])0x0;
local_b8 = (int1 [16])0x0;
local_c8 = (int1 [16])0x0;
local_128 = (int1 [16])0x0;
local_138 = (int1 [16])0x0;
ssz_get(local_58,param_2,"attestedHeader");
ssz_get(&local_150,local_58,"beacon");
ssz_get(local_70,param_2,"syncAggregate");
ssz_get(local_e0,local_70,"syncCommitteeSignature");
ssz_get(local_f8,local_70,"syncCommitteeBits");
ssz_get(local_168,param_2,"nextSyncCommitteeBranch");
ssz_get(&local_180,param_2,"nextSyncCommittee");
ssz_get(local_110,&local_150,"stateRoot");
ssz_get(local_40,&local_150,&DAT_0013d821);
uVar3 = bytes_as_le(local_40[0],local_38);
if (((((local_140 == 0) || (lStack_148 == 0)) || (local_100 == 0)) ||
((((local_108 == (char *)0x0 || (local_d0 == 0)) ||
((local_d8 == 0 || ((local_e8 == 0 || (local_f0 == 0)))))) || (local_158 == 0)))) ||
(((local_160 == 0 || (local_170 == 0)) || (lStack_178 == 0)))) {
pcVar4 = "invalid light client update!";
}
else {
ssz_hash_tree_root(local_138);
if (param_3 == (char *)0x0) {
iVar2 = c4_verify_blockroot_signature
(param_1,&local_150,local_f8,local_e0,uVar3,param_6,local_150,lStack_148,
local_140);
if (iVar2 != 0) {
return 0;
}
}
else {
cVar1 = bytes_all_equal(0x20,param_3,0);
if (cVar1 == '\0') {
auVar7[0] = -(param_3[0x10] == local_128[0]);
auVar7[1] = -(param_3[0x11] == local_128[1]);
auVar7[2] = -(param_3[0x12] == local_128[2]);
auVar7[3] = -(param_3[0x13] == local_128[3]);
auVar7[4] = -(param_3[0x14] == local_128[4]);
auVar7[5] = -(param_3[0x15] == local_128[5]);
auVar7[6] = -(param_3[0x16] == local_128[6]);
auVar7[7] = -(param_3[0x17] == local_128[7]);
auVar7[8] = -(param_3[0x18] == local_128[8]);
auVar7[9] = -(param_3[0x19] == local_128[9]);
auVar7[10] = -(param_3[0x1a] == local_128[10]);
auVar7[0xb] = -(param_3[0x1b] == local_128[0xb]);
auVar7[0xc] = -(param_3[0x1c] == local_128[0xc]);
auVar7[0xd] = -(param_3[0x1d] == local_128[0xd]);
auVar7[0xe] = -(param_3[0x1e] == local_128[0xe]);
auVar7[0xf] = -(param_3[0x1f] == local_128[0xf]);
auVar5[0] = -(*param_3 == local_138[0]);
auVar5[1] = -(param_3[1] == local_138[1]);
auVar5[2] = -(param_3[2] == local_138[2]);
auVar5[3] = -(param_3[3] == local_138[3]);
auVar5[4] = -(param_3[4] == local_138[4]);
auVar5[5] = -(param_3[5] == local_138[5]);
auVar5[6] = -(param_3[6] == local_138[6]);
auVar5[7] = -(param_3[7] == local_138[7]);
auVar5[8] = -(param_3[8] == local_138[8]);
auVar5[9] = -(param_3[9] == local_138[9]);
auVar5[10] = -(param_3[10] == local_138[10]);
auVar5[0xb] = -(param_3[0xb] == local_138[0xb]);
auVar5[0xc] = -(param_3[0xc] == local_138[0xc]);
auVar5[0xd] = -(param_3[0xd] == local_138[0xd]);
auVar5[0xe] = -(param_3[0xe] == local_138[0xe]);
auVar5[0xf] = -(param_3[0xf] == local_138[0xf]);
auVar5 = auVar5 & auVar7;
if ((ushort)((ushort)(SUB161(auVar5 >> 7,0) & 1) |
(ushort)(SUB161(auVar5 >> 0xf,0) & 1) << 1 |
(ushort)(SUB161(auVar5 >> 0x17,0) & 1) << 2 |
(ushort)(SUB161(auVar5 >> 0x1f,0) & 1) << 3 |
(ushort)(SUB161(auVar5 >> 0x27,0) & 1) << 4 |
(ushort)(SUB161(auVar5 >> 0x2f,0) & 1) << 5 |
(ushort)(SUB161(auVar5 >> 0x37,0) & 1) << 6 |
(ushort)(SUB161(auVar5 >> 0x3f,0) & 1) << 7 |
(ushort)(SUB161(auVar5 >> 0x47,0) & 1) << 8 |
(ushort)(SUB161(auVar5 >> 0x4f,0) & 1) << 9 |
(ushort)(SUB161(auVar5 >> 0x57,0) & 1) << 10 |
(ushort)(SUB161(auVar5 >> 0x5f,0) & 1) << 0xb |
(ushort)(SUB161(auVar5 >> 0x67,0) & 1) << 0xc |
(ushort)(SUB161(auVar5 >> 0x6f,0) & 1) << 0xd |
(ushort)(SUB161(auVar5 >> 0x77,0) & 1) << 0xe |
(ushort)(byte)(auVar5[0xf] >> 7) << 0xf) != 0xffff) {
pcVar4 = "invalid blockhash!";
goto LAB_001125ef;
}
}
}
ssz_hash_tree_root(local_a8);
ssz_verify_single_merkle_proof
(local_168[0],local_160,local_a8,0x37,local_c8,param_6,local_180,lStack_178,local_170)
;
auVar8[0] = -(local_108[0x10] == local_b8[0]);
auVar8[1] = -(local_108[0x11] == local_b8[1]);
auVar8[2] = -(local_108[0x12] == local_b8[2]);
auVar8[3] = -(local_108[0x13] == local_b8[3]);
auVar8[4] = -(local_108[0x14] == local_b8[4]);
auVar8[5] = -(local_108[0x15] == local_b8[5]);
auVar8[6] = -(local_108[0x16] == local_b8[6]);
auVar8[7] = -(local_108[0x17] == local_b8[7]);
auVar8[8] = -(local_108[0x18] == local_b8[8]);
auVar8[9] = -(local_108[0x19] == local_b8[9]);
auVar8[10] = -(local_108[0x1a] == local_b8[10]);
auVar8[0xb] = -(local_108[0x1b] == local_b8[0xb]);
auVar8[0xc] = -(local_108[0x1c] == local_b8[0xc]);
auVar8[0xd] = -(local_108[0x1d] == local_b8[0xd]);
auVar8[0xe] = -(local_108[0x1e] == local_b8[0xe]);
auVar8[0xf] = -(local_108[0x1f] == local_b8[0xf]);
auVar6[0] = -(*local_108 == local_c8[0]);
auVar6[1] = -(local_108[1] == local_c8[1]);
auVar6[2] = -(local_108[2] == local_c8[2]);
auVar6[3] = -(local_108[3] == local_c8[3]);
auVar6[4] = -(local_108[4] == local_c8[4]);
auVar6[5] = -(local_108[5] == local_c8[5]);
auVar6[6] = -(local_108[6] == local_c8[6]);
auVar6[7] = -(local_108[7] == local_c8[7]);
auVar6[8] = -(local_108[8] == local_c8[8]);
auVar6[9] = -(local_108[9] == local_c8[9]);
auVar6[10] = -(local_108[10] == local_c8[10]);
auVar6[0xb] = -(local_108[0xb] == local_c8[0xb]);
auVar6[0xc] = -(local_108[0xc] == local_c8[0xc]);
auVar6[0xd] = -(local_108[0xd] == local_c8[0xd]);
auVar6[0xe] = -(local_108[0xe] == local_c8[0xe]);
auVar6[0xf] = -(local_108[0xf] == local_c8[0xf]);
auVar6 = auVar6 & auVar8;
if ((ushort)((ushort)(SUB161(auVar6 >> 7,0) & 1) | (ushort)(SUB161(auVar6 >> 0xf,0) & 1) << 1 |
(ushort)(SUB161(auVar6 >> 0x17,0) & 1) << 2 |
(ushort)(SUB161(auVar6 >> 0x1f,0) & 1) << 3 |
(ushort)(SUB161(auVar6 >> 0x27,0) & 1) << 4 |
(ushort)(SUB161(auVar6 >> 0x2f,0) & 1) << 5 |
(ushort)(SUB161(auVar6 >> 0x37,0) & 1) << 6 |
(ushort)(SUB161(auVar6 >> 0x3f,0) & 1) << 7 |
(ushort)(SUB161(auVar6 >> 0x47,0) & 1) << 8 |
(ushort)(SUB161(auVar6 >> 0x4f,0) & 1) << 9 |
(ushort)(SUB161(auVar6 >> 0x57,0) & 1) << 10 |
(ushort)(SUB161(auVar6 >> 0x5f,0) & 1) << 0xb |
(ushort)(SUB161(auVar6 >> 0x67,0) & 1) << 0xc |
(ushort)(SUB161(auVar6 >> 0x6f,0) & 1) << 0xd |
(ushort)(SUB161(auVar6 >> 0x77,0) & 1) << 0xe |
(ushort)(byte)(auVar6[0xf] >> 7) << 0xf) == 0xffff) {
ssz_get(local_88,&local_180,"pubkeys");
uVar3 = c4_set_sync_period(uVar3,local_138,local_88[0],local_80,
*(int4 *)(param_1 + 0x80));
return uVar3;
}
pcVar4 = "invalid merkle root in light client update!";
}
LAB_001125ef:
c4_state_add_error(param_1 + 0x70,pcVar4);
*(int1 *)(param_1 + 0x68) = 0;
return 0;
}
|
|
64,297
|
update_light_client_update
|
corpus-core[P]colibri-stateless/src/chains/eth/verifier/sync_committee.c
|
static bool update_light_client_update(verify_ctx_t* ctx, ssz_ob_t* update, bytes32_t trusted_blockhash) {
bytes32_t sync_root = {0};
bytes32_t merkle_root = {0};
bytes32_t blockhash = {0};
ssz_ob_t attested = ssz_get(update, "attestedHeader");
ssz_ob_t header = ssz_get(&attested, "beacon");
ssz_ob_t sync_aggregate = ssz_get(update, "syncAggregate");
ssz_ob_t signature = ssz_get(&sync_aggregate, "syncCommitteeSignature");
ssz_ob_t sync_bits = ssz_get(&sync_aggregate, "syncCommitteeBits");
ssz_ob_t merkle_proof = ssz_get(update, "nextSyncCommitteeBranch");
ssz_ob_t sync_committee = ssz_get(update, "nextSyncCommittee");
ssz_ob_t state_root = ssz_get(&header, "stateRoot");
uint64_t slot = ssz_get_uint64(&header, "slot");
if (ssz_is_error(header) || ssz_is_error(state_root) || ssz_is_error(signature) || ssz_is_error(sync_bits) || ssz_is_error(merkle_proof) || ssz_is_error(sync_committee))
RETURN_VERIFY_ERROR(ctx, "invalid light client update!");
// calculate the blockhash
ssz_hash_tree_root(header, blockhash);
// verify the signature of the old sync committee for the next sync committee
if (trusted_blockhash) {
if (!bytes_all_zero(bytes(trusted_blockhash, 32)) && memcmp(trusted_blockhash, blockhash, 32)) RETURN_VERIFY_ERROR(ctx, "invalid blockhash!");
}
else {
if (c4_verify_blockroot_signature(ctx, &header, &sync_bits, &signature, slot) != C4_SUCCESS) return false;
}
// create merkle root from proof
ssz_hash_tree_root(sync_committee, sync_root);
ssz_verify_single_merkle_proof(merkle_proof.bytes, sync_root, NEXT_SYNC_COMMITTEE_GINDEX, merkle_root);
// verify the merkle root
if (memcmp(merkle_root, state_root.bytes.data, 32)) RETURN_VERIFY_ERROR(ctx, "invalid merkle root in light client update!");
return c4_set_sync_period(slot, blockhash, ssz_get(&sync_committee, "pubkeys").bytes, ctx->chain_id);
}
|
O2
|
c
|
update_light_client_update:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x170, %rsp # imm = 0x170
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %rbx
xorps %xmm0, %xmm0
movaps %xmm0, 0x100(%rsp)
movaps %xmm0, 0xf0(%rsp)
movaps %xmm0, 0xe0(%rsp)
movaps %xmm0, 0xd0(%rsp)
movaps %xmm0, 0xc0(%rsp)
movaps %xmm0, 0xb0(%rsp)
leaq 0x27c40(%rip), %rdx # 0x390c5
leaq 0x140(%rsp), %r13
movq %r13, %rdi
callq 0x13a7d
leaq 0x27c38(%rip), %rdx # 0x390d4
leaq 0x50(%rsp), %r12
movq %r12, %rdi
movq %r13, %rsi
callq 0x13a7d
leaq 0x27373(%rip), %rdx # 0x38826
leaq 0x128(%rsp), %r13
movq %r13, %rdi
movq %r15, %rsi
callq 0x13a7d
leaq 0x2729f(%rip), %rdx # 0x3876c
leaq 0x98(%rsp), %rdi
movq %r13, %rsi
callq 0x13a7d
leaq 0x2725d(%rip), %rdx # 0x38741
leaq 0x80(%rsp), %rdi
movq %r13, %rsi
callq 0x13a7d
leaq 0x27be8(%rip), %rdx # 0x390e3
leaq 0x38(%rsp), %rdi
movq %r15, %rsi
callq 0x13a7d
leaq 0x27ba4(%rip), %rdx # 0x390b3
leaq 0x20(%rsp), %rdi
movq %r15, %rsi
callq 0x13a7d
leaq 0x2731f(%rip), %rdx # 0x38842
leaq 0x68(%rsp), %rdi
movq %r12, %rsi
callq 0x13a7d
leaq 0x272ea(%rip), %rdx # 0x38821
leaq 0x158(%rsp), %r15
movq %r15, %rdi
movq %r12, %rsi
callq 0x13a7d
movl (%r15), %edi
movq 0x8(%r15), %rsi
callq 0x12519
cmpq $0x0, 0x10(%r12)
je 0x1163b
cmpq $0x0, 0x58(%rsp)
je 0x1163b
cmpq $0x0, 0x78(%rsp)
je 0x1163b
cmpq $0x0, 0x70(%rsp)
je 0x1163b
cmpq $0x0, 0xa8(%rsp)
je 0x1163b
cmpq $0x0, 0xa0(%rsp)
je 0x1163b
cmpq $0x0, 0x90(%rsp)
je 0x1163b
cmpq $0x0, 0x88(%rsp)
je 0x1163b
cmpq $0x0, 0x48(%rsp)
je 0x1163b
cmpq $0x0, 0x40(%rsp)
je 0x1163b
cmpq $0x0, 0x30(%rsp)
je 0x1163b
cmpq $0x0, 0x28(%rsp)
je 0x1163b
movq %rax, %r15
movq 0x60(%rsp), %rax
movq %rax, 0x10(%rsp)
movups 0x50(%rsp), %xmm0
movups %xmm0, (%rsp)
leaq 0xb0(%rsp), %rdi
callq 0x13d55
testq %r14, %r14
je 0x11662
pushq $0x20
popq %rdi
movq %r14, %rsi
xorl %edx, %edx
callq 0x11b72
testb %al, %al
jne 0x11686
leaq 0xb0(%rsp), %rsi
pushq $0x20
popq %rdx
movq %r14, %rdi
callq 0x5220
testl %eax, %eax
je 0x11686
leaq 0x70(%rbx), %rdi
leaq 0x2882d(%rip), %rsi # 0x39e66
jmp 0x11646
leaq 0x70(%rbx), %rdi
leaq 0x28803(%rip), %rsi # 0x39e49
callq 0x16fd9
movb $0x0, 0x68(%rbx)
xorl %eax, %eax
addq $0x170, %rsp # imm = 0x170
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
leaq 0x50(%rsp), %rsi
leaq 0x80(%rsp), %rdx
leaq 0x98(%rsp), %rcx
movq %rbx, %rdi
movq %r15, %r8
callq 0xc650
testl %eax, %eax
jne 0x1164f
movq 0x30(%rsp), %rax
movq %rax, 0x10(%rsp)
movups 0x20(%rsp), %xmm0
movups %xmm0, (%rsp)
leaq 0xf0(%rsp), %r14
movq %r14, %rdi
callq 0x13d55
movl 0x38(%rsp), %edi
movq 0x40(%rsp), %rsi
pushq $0x37
popq %rcx
leaq 0xd0(%rsp), %r12
movq %r14, %rdx
movq %r12, %r8
callq 0x144de
movq 0x70(%rsp), %rsi
pushq $0x20
popq %rdx
movq %r12, %rdi
callq 0x5220
testl %eax, %eax
je 0x116ec
leaq 0x70(%rbx), %rdi
leaq 0x28792(%rip), %rsi # 0x39e79
jmp 0x11646
leaq 0x279e8(%rip), %rdx # 0x390db
leaq 0x110(%rsp), %r14
leaq 0x20(%rsp), %rsi
movq %r14, %rdi
callq 0x13a7d
movl (%r14), %edx
movq 0x8(%r14), %rcx
movl 0x80(%rbx), %r8d
leaq 0xb0(%rsp), %rsi
movq %r15, %rdi
callq 0x108c4
jmp 0x11651
|
update_light_client_update:
push r15
push r14
push r13
push r12
push rbx
sub rsp, 170h
mov r14, rdx
mov r15, rsi
mov rbx, rdi
xorps xmm0, xmm0
movaps [rsp+198h+var_98], xmm0
movaps [rsp+198h+var_A8], xmm0
movaps [rsp+198h+var_B8], xmm0
movaps [rsp+198h+var_C8], xmm0
movaps [rsp+198h+var_D8], xmm0
movaps [rsp+198h+var_E8], xmm0
lea rdx, aAttestedheader; "attestedHeader"
lea r13, [rsp+198h+var_58]
mov rdi, r13
call ssz_get
lea rdx, aBeacon; "beacon"
lea r12, [rsp+198h+var_148]
mov rdi, r12
mov rsi, r13
call ssz_get
lea rdx, aSyncaggregate; "syncAggregate"
lea r13, [rsp+198h+var_70]
mov rdi, r13
mov rsi, r15
call ssz_get
lea rdx, aSynccommittees; "syncCommitteeSignature"
lea rdi, [rsp+198h+var_100]
mov rsi, r13
call ssz_get
lea rdx, aSynccommitteeb; "syncCommitteeBits"
lea rdi, [rsp+198h+var_118]
mov rsi, r13
call ssz_get
lea rdx, aNextsynccommit_0; "nextSyncCommitteeBranch"
lea rdi, [rsp+198h+var_160]
mov rsi, r15
call ssz_get
lea rdx, aNextsynccommit; "nextSyncCommittee"
lea rdi, [rsp+198h+var_178]
mov rsi, r15
call ssz_get
lea rdx, aStateroot; "stateRoot"
lea rdi, [rsp+198h+var_130]
mov rsi, r12
call ssz_get
lea rdx, aSlot; "slot"
lea r15, [rsp+198h+var_40]
mov rdi, r15
mov rsi, r12
call ssz_get
mov edi, [r15]
mov rsi, [r15+8]
call bytes_as_le
cmp qword ptr [r12+10h], 0
jz loc_1163B
cmp qword ptr [rsp+198h+var_148+8], 0
jz loc_1163B
cmp [rsp+198h+var_120], 0
jz loc_1163B
cmp [rsp+198h+var_128], 0
jz loc_1163B
cmp [rsp+198h+var_F0], 0
jz loc_1163B
cmp [rsp+198h+var_F8], 0
jz loc_1163B
cmp [rsp+198h+var_108], 0
jz loc_1163B
cmp [rsp+198h+var_110], 0
jz short loc_1163B
cmp [rsp+198h+var_150], 0
jz short loc_1163B
cmp [rsp+198h+var_158], 0
jz short loc_1163B
cmp [rsp+198h+var_168], 0
jz short loc_1163B
cmp qword ptr [rsp+198h+var_178+8], 0
jz short loc_1163B
mov r15, rax
mov rax, [rsp+198h+var_138]
mov [rsp+198h+var_188], rax
movups xmm0, [rsp+198h+var_148]
movups [rsp+198h+var_198], xmm0
lea rdi, [rsp+198h+var_E8]
call ssz_hash_tree_root
test r14, r14
jz short loc_11662
push 20h ; ' '
pop rdi
mov rsi, r14
xor edx, edx
call bytes_all_equal
test al, al
jnz short loc_11686
lea rsi, [rsp+198h+var_E8]
push 20h ; ' '
pop rdx
mov rdi, r14
call _bcmp
test eax, eax
jz short loc_11686
lea rdi, [rbx+70h]
lea rsi, aInvalidBlockha_0; "invalid blockhash!"
jmp short loc_11646
loc_1163B:
lea rdi, [rbx+70h]
lea rsi, aInvalidLightCl; "invalid light client update!"
loc_11646:
call c4_state_add_error
mov byte ptr [rbx+68h], 0
loc_1164F:
xor eax, eax
loc_11651:
add rsp, 170h
pop rbx
pop r12
pop r13
pop r14
pop r15
retn
loc_11662:
lea rsi, [rsp+198h+var_148]
lea rdx, [rsp+198h+var_118]
lea rcx, [rsp+198h+var_100]
mov rdi, rbx
mov r8, r15
call c4_verify_blockroot_signature
test eax, eax
jnz short loc_1164F
loc_11686:
mov rax, [rsp+198h+var_168]
mov [rsp+198h+var_188], rax
movups xmm0, [rsp+198h+var_178]
movups [rsp+198h+var_198], xmm0
lea r14, [rsp+198h+var_A8]
mov rdi, r14
call ssz_hash_tree_root
mov edi, [rsp+198h+var_160]
mov rsi, [rsp+198h+var_158]
push 37h ; '7'
pop rcx
lea r12, [rsp+198h+var_C8]
mov rdx, r14
mov r8, r12
call ssz_verify_single_merkle_proof
mov rsi, [rsp+198h+var_128]
push 20h ; ' '
pop rdx
mov rdi, r12
call _bcmp
test eax, eax
jz short loc_116EC
lea rdi, [rbx+70h]
lea rsi, aInvalidMerkleR; "invalid merkle root in light client upd"...
jmp loc_11646
loc_116EC:
lea rdx, aPubkeys; "pubkeys"
lea r14, [rsp+198h+var_88]
lea rsi, [rsp+198h+var_178]
mov rdi, r14
call ssz_get
mov edx, [r14]
mov rcx, [r14+8]
mov r8d, [rbx+80h]
lea rsi, [rsp+198h+var_E8]
mov rdi, r15
call c4_set_sync_period
jmp loc_11651
|
char update_light_client_update(long long a1, long long a2, long long *a3)
{
long long v5; // rsi
long long v6; // rax
long long v7; // rdx
long long v8; // rcx
long long v9; // r8
long long v10; // r9
unsigned long long v11; // r15
long long *v12; // rsi
long long v13; // rdx
long long v14; // rcx
long long v15; // r8
long long v16; // r9
long long v17; // rdi
const char *v18; // rsi
long long v20; // [rsp+20h] [rbp-178h] BYREF
long long v21; // [rsp+28h] [rbp-170h]
long long v22; // [rsp+30h] [rbp-168h]
unsigned int v23; // [rsp+38h] [rbp-160h] BYREF
long long v24; // [rsp+40h] [rbp-158h]
long long v25; // [rsp+48h] [rbp-150h]
long long v26; // [rsp+50h] [rbp-148h] BYREF
long long v27; // [rsp+58h] [rbp-140h]
long long v28; // [rsp+60h] [rbp-138h]
_BYTE v29[8]; // [rsp+68h] [rbp-130h] BYREF
long long v30; // [rsp+70h] [rbp-128h]
long long v31; // [rsp+78h] [rbp-120h]
_BYTE v32[8]; // [rsp+80h] [rbp-118h] BYREF
long long v33; // [rsp+88h] [rbp-110h]
long long v34; // [rsp+90h] [rbp-108h]
_BYTE v35[8]; // [rsp+98h] [rbp-100h] BYREF
long long v36; // [rsp+A0h] [rbp-F8h]
long long v37; // [rsp+A8h] [rbp-F0h]
_OWORD v38[2]; // [rsp+B0h] [rbp-E8h] BYREF
_OWORD v39[2]; // [rsp+D0h] [rbp-C8h] BYREF
_OWORD v40[2]; // [rsp+F0h] [rbp-A8h] BYREF
unsigned int v41; // [rsp+110h] [rbp-88h] BYREF
long long v42; // [rsp+118h] [rbp-80h]
_BYTE v43[24]; // [rsp+128h] [rbp-70h] BYREF
_BYTE v44[24]; // [rsp+140h] [rbp-58h] BYREF
unsigned int v45; // [rsp+158h] [rbp-40h] BYREF
long long v46; // [rsp+160h] [rbp-38h]
memset(v40, 0, sizeof(v40));
memset(v39, 0, sizeof(v39));
memset(v38, 0, sizeof(v38));
ssz_get(v44, a2, "attestedHeader");
ssz_get(&v26, v44, "beacon");
ssz_get(v43, a2, "syncAggregate");
ssz_get(v35, v43, "syncCommitteeSignature");
ssz_get(v32, v43, "syncCommitteeBits");
ssz_get(&v23, a2, "nextSyncCommitteeBranch");
ssz_get(&v20, a2, "nextSyncCommittee");
ssz_get(v29, &v26, "stateRoot");
ssz_get(&v45, &v26, "slot");
v5 = v46;
v6 = bytes_as_le(v45, v46);
if ( !v28 || !v27 || !v31 || !v30 || !v37 || !v36 || !v34 || !v33 || !v25 || !v24 || !v22 || !v21 )
{
v17 = a1 + 112;
v18 = "invalid light client update!";
goto LABEL_18;
}
v11 = v6;
ssz_hash_tree_root(v38, v5, v7, v8, v9, v10, v26, v27, v28);
if ( a3 )
{
v12 = a3;
if ( !(unsigned __int8)bytes_all_equal(32LL, a3, 0LL) )
{
v12 = (long long *)v38;
if ( (unsigned int)bcmp(a3, v38, 32LL) )
{
v17 = a1 + 112;
v18 = "invalid blockhash!";
LABEL_18:
c4_state_add_error(v17, v18);
*(_BYTE *)(a1 + 104) = 0;
return 0;
}
}
}
else
{
v12 = &v26;
if ( (unsigned int)c4_verify_blockroot_signature(a1, &v26, (long long)v32, (long long)v35, v11) )
return 0;
}
ssz_hash_tree_root(v40, v12, v13, v14, v15, v16, v20, v21, v22);
ssz_verify_single_merkle_proof(v23, v24, v40, 55LL, v39);
if ( (unsigned int)bcmp(v39, v30, 32LL) )
{
v17 = a1 + 112;
v18 = "invalid merkle root in light client update!";
goto LABEL_18;
}
ssz_get(&v41, &v20, "pubkeys");
return c4_set_sync_period(v11, v38, v41, v42, *(_DWORD *)(a1 + 128));
}
|
update_light_client_update:
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x170
MOV R14,RDX
MOV R15,RSI
MOV RBX,RDI
XORPS XMM0,XMM0
MOVAPS xmmword ptr [RSP + 0x100],XMM0
MOVAPS xmmword ptr [RSP + 0xf0],XMM0
MOVAPS xmmword ptr [RSP + 0xe0],XMM0
MOVAPS xmmword ptr [RSP + 0xd0],XMM0
MOVAPS xmmword ptr [RSP + 0xc0],XMM0
MOVAPS xmmword ptr [RSP + 0xb0],XMM0
LEA RDX,[0x1390c5]
LEA R13,[RSP + 0x140]
MOV RDI,R13
CALL 0x00113a7d
LEA RDX,[0x1390d4]
LEA R12,[RSP + 0x50]
MOV RDI,R12
MOV RSI,R13
CALL 0x00113a7d
LEA RDX,[0x138826]
LEA R13,[RSP + 0x128]
MOV RDI,R13
MOV RSI,R15
CALL 0x00113a7d
LEA RDX,[0x13876c]
LEA RDI,[RSP + 0x98]
MOV RSI,R13
CALL 0x00113a7d
LEA RDX,[0x138741]
LEA RDI,[RSP + 0x80]
MOV RSI,R13
CALL 0x00113a7d
LEA RDX,[0x1390e3]
LEA RDI,[RSP + 0x38]
MOV RSI,R15
CALL 0x00113a7d
LEA RDX,[0x1390b3]
LEA RDI,[RSP + 0x20]
MOV RSI,R15
CALL 0x00113a7d
LEA RDX,[0x138842]
LEA RDI,[RSP + 0x68]
MOV RSI,R12
CALL 0x00113a7d
LEA RDX,[0x138821]
LEA R15,[RSP + 0x158]
MOV RDI,R15
MOV RSI,R12
CALL 0x00113a7d
MOV EDI,dword ptr [R15]
MOV RSI,qword ptr [R15 + 0x8]
CALL 0x00112519
CMP qword ptr [R12 + 0x10],0x0
JZ 0x0011163b
CMP qword ptr [RSP + 0x58],0x0
JZ 0x0011163b
CMP qword ptr [RSP + 0x78],0x0
JZ 0x0011163b
CMP qword ptr [RSP + 0x70],0x0
JZ 0x0011163b
CMP qword ptr [RSP + 0xa8],0x0
JZ 0x0011163b
CMP qword ptr [RSP + 0xa0],0x0
JZ 0x0011163b
CMP qword ptr [RSP + 0x90],0x0
JZ 0x0011163b
CMP qword ptr [RSP + 0x88],0x0
JZ 0x0011163b
CMP qword ptr [RSP + 0x48],0x0
JZ 0x0011163b
CMP qword ptr [RSP + 0x40],0x0
JZ 0x0011163b
CMP qword ptr [RSP + 0x30],0x0
JZ 0x0011163b
CMP qword ptr [RSP + 0x28],0x0
JZ 0x0011163b
MOV R15,RAX
MOV RAX,qword ptr [RSP + 0x60]
MOV qword ptr [RSP + 0x10],RAX
MOVUPS XMM0,xmmword ptr [RSP + 0x50]
MOVUPS xmmword ptr [RSP],XMM0
LEA RDI,[RSP + 0xb0]
CALL 0x00113d55
TEST R14,R14
JZ 0x00111662
PUSH 0x20
POP RDI
MOV RSI,R14
XOR EDX,EDX
CALL 0x00111b72
TEST AL,AL
JNZ 0x00111686
LEA RSI,[RSP + 0xb0]
PUSH 0x20
POP RDX
MOV RDI,R14
CALL 0x00105220
TEST EAX,EAX
JZ 0x00111686
LEA RDI,[RBX + 0x70]
LEA RSI,[0x139e66]
JMP 0x00111646
LAB_0011163b:
LEA RDI,[RBX + 0x70]
LEA RSI,[0x139e49]
LAB_00111646:
CALL 0x00116fd9
MOV byte ptr [RBX + 0x68],0x0
LAB_0011164f:
XOR EAX,EAX
LAB_00111651:
ADD RSP,0x170
POP RBX
POP R12
POP R13
POP R14
POP R15
RET
LAB_00111662:
LEA RSI,[RSP + 0x50]
LEA RDX,[RSP + 0x80]
LEA RCX,[RSP + 0x98]
MOV RDI,RBX
MOV R8,R15
CALL 0x0010c650
TEST EAX,EAX
JNZ 0x0011164f
LAB_00111686:
MOV RAX,qword ptr [RSP + 0x30]
MOV qword ptr [RSP + 0x10],RAX
MOVUPS XMM0,xmmword ptr [RSP + 0x20]
MOVUPS xmmword ptr [RSP],XMM0
LEA R14,[RSP + 0xf0]
MOV RDI,R14
CALL 0x00113d55
MOV EDI,dword ptr [RSP + 0x38]
MOV RSI,qword ptr [RSP + 0x40]
PUSH 0x37
POP RCX
LEA R12,[RSP + 0xd0]
MOV RDX,R14
MOV R8,R12
CALL 0x001144de
MOV RSI,qword ptr [RSP + 0x70]
PUSH 0x20
POP RDX
MOV RDI,R12
CALL 0x00105220
TEST EAX,EAX
JZ 0x001116ec
LEA RDI,[RBX + 0x70]
LEA RSI,[0x139e79]
JMP 0x00111646
LAB_001116ec:
LEA RDX,[0x1390db]
LEA R14,[RSP + 0x110]
LEA RSI,[RSP + 0x20]
MOV RDI,R14
CALL 0x00113a7d
MOV EDX,dword ptr [R14]
MOV RCX,qword ptr [R14 + 0x8]
MOV R8D,dword ptr [RBX + 0x80]
LEA RSI,[RSP + 0xb0]
MOV RDI,R15
CALL 0x001108c4
JMP 0x00111651
|
int8
update_light_client_update
(long param_1,int8 param_2,void *param_3,int8 param_4,int8 param_5,
int8 param_6)
{
char cVar1;
int iVar2;
int8 uVar3;
char *pcVar4;
int4 local_178 [2];
int4 uStack_170;
int4 uStack_16c;
long local_168;
int4 local_160 [2];
long local_158;
long local_150;
int4 local_148 [2];
int4 uStack_140;
int4 uStack_13c;
long local_138;
int1 local_130 [8];
void *local_128;
long local_120;
int1 local_118 [8];
long local_110;
long local_108;
int1 local_100 [8];
long local_f8;
long local_f0;
int8 local_e8;
int8 uStack_e0;
int8 local_d8;
int8 uStack_d0;
int8 local_c8;
int8 uStack_c0;
int8 local_b8;
int8 uStack_b0;
int8 local_a8;
int8 uStack_a0;
int8 local_98;
int8 uStack_90;
int4 local_88 [2];
int8 local_80;
int1 local_70 [24];
int1 local_58 [24];
int4 local_40 [2];
int8 local_38;
local_98 = 0;
uStack_90 = 0;
local_a8 = 0;
uStack_a0 = 0;
local_b8 = 0;
uStack_b0 = 0;
local_c8 = 0;
uStack_c0 = 0;
local_d8 = 0;
uStack_d0 = 0;
local_e8 = 0;
uStack_e0 = 0;
ssz_get(local_58,param_2,"attestedHeader");
ssz_get(local_148,local_58,"beacon");
ssz_get(local_70,param_2,"syncAggregate");
ssz_get(local_100,local_70,"syncCommitteeSignature");
ssz_get(local_118,local_70,"syncCommitteeBits");
ssz_get(local_160,param_2,"nextSyncCommitteeBranch");
ssz_get(local_178,param_2,"nextSyncCommittee");
ssz_get(local_130,local_148,"stateRoot");
ssz_get(local_40,local_148,&DAT_00138821);
uVar3 = bytes_as_le(local_40[0],local_38);
if ((((((local_138 == 0) || (CONCAT44(uStack_13c,uStack_140) == 0)) || (local_120 == 0)) ||
(((local_128 == (void *)0x0 || (local_f0 == 0)) ||
((local_f8 == 0 || ((local_108 == 0 || (local_110 == 0)))))))) || (local_150 == 0)) ||
(((local_158 == 0 || (local_168 == 0)) || (CONCAT44(uStack_16c,uStack_170) == 0)))) {
pcVar4 = "invalid light client update!";
}
else {
ssz_hash_tree_root(&local_e8);
if (param_3 == (void *)0x0) {
iVar2 = c4_verify_blockroot_signature
(param_1,local_148,local_118,local_100,uVar3,param_6,local_148[0],uStack_140
,local_138);
if (iVar2 != 0) {
return 0;
}
}
else {
cVar1 = bytes_all_equal(0x20,param_3,0);
if ((cVar1 == '\0') && (iVar2 = bcmp(param_3,&local_e8,0x20), iVar2 != 0)) {
pcVar4 = "invalid blockhash!";
goto LAB_00111646;
}
}
ssz_hash_tree_root(&local_a8);
ssz_verify_single_merkle_proof
(local_160[0],local_158,&local_a8,0x37,&local_c8,param_6,local_178[0],uStack_170,
local_168);
iVar2 = bcmp(&local_c8,local_128,0x20);
if (iVar2 == 0) {
ssz_get(local_88,local_178,"pubkeys");
uVar3 = c4_set_sync_period(uVar3,&local_e8,local_88[0],local_80,
*(int4 *)(param_1 + 0x80));
return uVar3;
}
pcVar4 = "invalid merkle root in light client update!";
}
LAB_00111646:
c4_state_add_error(param_1 + 0x70,pcVar4);
*(int1 *)(param_1 + 0x68) = 0;
return 0;
}
|
|
64,298
|
minja::Parser::Parser(std::shared_ptr<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>> const&, minja::Options const&)
|
monkey531[P]llama/common/minja.hpp
|
Parser(const std::shared_ptr<std::string>& template_str, const Options & options) : template_str(template_str), options(options) {
if (!template_str) throw std::runtime_error("Template string is null");
start = it = this->template_str->begin();
end = this->template_str->end();
}
|
O0
|
cpp
|
minja::Parser::Parser(std::shared_ptr<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>> const&, minja::Options const&):
subq $0x58, %rsp
movq %rdi, 0x50(%rsp)
movq %rsi, 0x48(%rsp)
movq %rdx, 0x40(%rsp)
movq 0x50(%rsp), %rdi
movq %rdi, 0x8(%rsp)
movq 0x48(%rsp), %rsi
callq 0x84de0
movq 0x8(%rsp), %rdi
addq $0x10, %rdi
callq 0x84e10
movq 0x8(%rsp), %rdi
addq $0x18, %rdi
callq 0x84e10
movq 0x8(%rsp), %rdi
addq $0x20, %rdi
callq 0x84e10
movq 0x8(%rsp), %rax
movq 0x40(%rsp), %rcx
movw (%rcx), %dx
movw %dx, 0x28(%rax)
movb 0x2(%rcx), %cl
movb %cl, 0x2a(%rax)
movq 0x48(%rsp), %rdi
callq 0x84e30
testb $0x1, %al
jne 0x7ef50
movl $0x10, %edi
callq 0x52570
movq %rax, %rdi
movq %rdi, %rax
movq %rax, (%rsp)
leaq 0x144403(%rip), %rsi # 0x1c3304
callq 0x52370
jmp 0x7ef08
movq (%rsp), %rdi
movq 0x1c509d(%rip), %rsi # 0x243fb0
movq 0x1c505e(%rip), %rdx # 0x243f78
callq 0x52960
jmp 0x7efd4
movq (%rsp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x38(%rsp)
movl %eax, 0x34(%rsp)
callq 0x52cb0
jmp 0x7efc0
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x38(%rsp)
movl %eax, 0x34(%rsp)
jmp 0x7efc0
movq 0x8(%rsp), %rdi
callq 0x84e50
movq %rax, %rdi
callq 0x52730
movq %rax, 0x20(%rsp)
leaq 0x28(%rsp), %rdi
leaq 0x20(%rsp), %rsi
callq 0x60720
movq 0x8(%rsp), %rdi
movq 0x28(%rsp), %rax
movq %rax, 0x20(%rdi)
movq 0x20(%rdi), %rax
movq %rax, 0x10(%rdi)
callq 0x84e50
movq %rax, %rdi
callq 0x52810
movq %rax, 0x10(%rsp)
leaq 0x18(%rsp), %rdi
leaq 0x10(%rsp), %rsi
callq 0x60720
movq 0x8(%rsp), %rax
movq 0x18(%rsp), %rcx
movq %rcx, 0x18(%rax)
addq $0x58, %rsp
retq
movq 0x8(%rsp), %rdi
callq 0x7efe0
movq 0x38(%rsp), %rdi
callq 0x529b0
nopw %cs:(%rax,%rax)
nop
|
_ZN5minja6ParserC2ERKSt10shared_ptrINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEERKNS_7OptionsE:
sub rsp, 58h
mov [rsp+58h+var_8], rdi
mov [rsp+58h+var_10], rsi
mov [rsp+58h+var_18], rdx
mov rdi, [rsp+58h+var_8]
mov [rsp+58h+var_50], rdi
mov rsi, [rsp+58h+var_10]
call _ZNSt10shared_ptrINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEC2ERKS6_; std::shared_ptr<std::string>::shared_ptr(std::shared_ptr<std::string> const&)
mov rdi, [rsp+58h+var_50]
add rdi, 10h
call _ZN9__gnu_cxx17__normal_iteratorIPKcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEC2Ev; __gnu_cxx::__normal_iterator<char const*,std::string>::__normal_iterator(void)
mov rdi, [rsp+58h+var_50]
add rdi, 18h
call _ZN9__gnu_cxx17__normal_iteratorIPKcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEC2Ev; __gnu_cxx::__normal_iterator<char const*,std::string>::__normal_iterator(void)
mov rdi, [rsp+58h+var_50]
add rdi, 20h ; ' '
call _ZN9__gnu_cxx17__normal_iteratorIPKcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEC2Ev; __gnu_cxx::__normal_iterator<char const*,std::string>::__normal_iterator(void)
mov rax, [rsp+58h+var_50]
mov rcx, [rsp+58h+var_18]
mov dx, [rcx]
mov [rax+28h], dx
mov cl, [rcx+2]
mov [rax+2Ah], cl
mov rdi, [rsp+58h+var_10]
call _ZNKSt12__shared_ptrINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEELN9__gnu_cxx12_Lock_policyE2EEcvbEv; std::__shared_ptr<std::string,(__gnu_cxx::_Lock_policy)2>::operator bool(void)
test al, 1
jnz short loc_7EF50
mov edi, 10h; thrown_size
call ___cxa_allocate_exception
mov rdi, rax; this
mov rax, rdi
mov [rsp+58h+var_58], rax
lea rsi, aTemplateString; "Template string is null"
call __ZNSt13runtime_errorC1EPKc; std::runtime_error::runtime_error(char const*)
jmp short $+2
loc_7EF08:
mov rdi, [rsp+58h+var_58]; void *
mov rsi, cs:lptinfo; lptinfo
mov rdx, cs:_ZNSt13runtime_errorD1Ev_ptr; void (*)(void *)
call ___cxa_throw
jmp loc_7EFD4
mov rdi, [rsp+0]; void *
mov rcx, rax
mov eax, edx
mov [rsp+arg_30], rcx
mov [rsp+arg_2C], eax
call ___cxa_free_exception
jmp loc_7EFC0
mov rcx, rax
mov eax, edx
mov [rsp+arg_30], rcx
mov [rsp+arg_2C], eax
jmp short loc_7EFC0
loc_7EF50:
mov rdi, [rsp+58h+var_50]
call _ZNKSt19__shared_ptr_accessINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv; std::__shared_ptr_access<std::string,(__gnu_cxx::_Lock_policy)2,false,false>::operator->(void)
mov rdi, rax
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5beginEv; std::string::begin(void)
mov [rsp+58h+var_38], rax
lea rdi, [rsp+58h+var_30]
lea rsi, [rsp+58h+var_38]
call _ZN9__gnu_cxx17__normal_iteratorIPKcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEC2IPcEERKNS0_IT_NS_11__enable_ifIXsr3std10__are_sameISC_SB_EE7__valueES8_E6__typeEEE
mov rdi, [rsp+58h+var_50]
mov rax, [rsp+58h+var_30]
mov [rdi+20h], rax
mov rax, [rdi+20h]
mov [rdi+10h], rax
call _ZNKSt19__shared_ptr_accessINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv; std::__shared_ptr_access<std::string,(__gnu_cxx::_Lock_policy)2,false,false>::operator->(void)
mov rdi, rax
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE3endEv; std::string::end(void)
mov [rsp+58h+var_48], rax
lea rdi, [rsp+58h+var_40]
lea rsi, [rsp+58h+var_48]
call _ZN9__gnu_cxx17__normal_iteratorIPKcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEC2IPcEERKNS0_IT_NS_11__enable_ifIXsr3std10__are_sameISC_SB_EE7__valueES8_E6__typeEEE
mov rax, [rsp+58h+var_50]
mov rcx, [rsp+58h+var_40]
mov [rax+18h], rcx
add rsp, 58h
retn
loc_7EFC0:
mov rdi, [rsp+arg_0]
call _ZNSt10shared_ptrINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEED2Ev; std::shared_ptr<std::string>::~shared_ptr()
mov rdi, [rsp+arg_30]
call __Unwind_Resume
loc_7EFD4:
nop word ptr [rax+rax+00000000h]
xchg ax, ax
|
long long minja::Parser::Parser(long long a1, long long a2, _WORD *a3)
{
_WORD *v3; // rcx
long long v4; // rax
long long v5; // rax
long long result; // rax
std::runtime_error *exception; // [rsp+0h] [rbp-58h]
long long v8; // [rsp+10h] [rbp-48h] BYREF
long long v9; // [rsp+18h] [rbp-40h] BYREF
long long v10; // [rsp+20h] [rbp-38h] BYREF
_QWORD v11[3]; // [rsp+28h] [rbp-30h] BYREF
_WORD *v12; // [rsp+40h] [rbp-18h]
long long v13; // [rsp+48h] [rbp-10h]
long long v14; // [rsp+50h] [rbp-8h]
v14 = a1;
v13 = a2;
v12 = a3;
std::shared_ptr<std::string>::shared_ptr(a1, a2);
__gnu_cxx::__normal_iterator<char const*,std::string>::__normal_iterator(a1 + 16);
__gnu_cxx::__normal_iterator<char const*,std::string>::__normal_iterator(a1 + 24);
__gnu_cxx::__normal_iterator<char const*,std::string>::__normal_iterator(a1 + 32);
v3 = v12;
*(_WORD *)(a1 + 40) = *v12;
*(_BYTE *)(a1 + 42) = *((_BYTE *)v3 + 2);
if ( (std::__shared_ptr<std::string,(__gnu_cxx::_Lock_policy)2>::operator bool(v13) & 1) == 0 )
{
exception = (std::runtime_error *)__cxa_allocate_exception(0x10uLL);
std::runtime_error::runtime_error(exception, "Template string is null");
__cxa_throw(
exception,
(struct type_info *)&`typeinfo for'std::runtime_error,
(void (*)(void *))&std::runtime_error::~runtime_error);
}
v4 = std::__shared_ptr_access<std::string,(__gnu_cxx::_Lock_policy)2,false,false>::operator->(a1);
v10 = std::string::begin(v4);
__gnu_cxx::__normal_iterator<char const*,std::string>::__normal_iterator<char *>(v11, (long long)&v10);
*(_QWORD *)(a1 + 32) = v11[0];
*(_QWORD *)(a1 + 16) = *(_QWORD *)(a1 + 32);
v5 = std::__shared_ptr_access<std::string,(__gnu_cxx::_Lock_policy)2,false,false>::operator->(a1);
v8 = std::string::end(v5);
__gnu_cxx::__normal_iterator<char const*,std::string>::__normal_iterator<char *>(&v9, (long long)&v8);
result = a1;
*(_QWORD *)(a1 + 24) = v9;
return result;
}
|
Parser:
SUB RSP,0x58
MOV qword ptr [RSP + 0x50],RDI
MOV qword ptr [RSP + 0x48],RSI
MOV qword ptr [RSP + 0x40],RDX
MOV RDI,qword ptr [RSP + 0x50]
MOV qword ptr [RSP + 0x8],RDI
MOV RSI,qword ptr [RSP + 0x48]
CALL 0x00184de0
MOV RDI,qword ptr [RSP + 0x8]
ADD RDI,0x10
CALL 0x00184e10
MOV RDI,qword ptr [RSP + 0x8]
ADD RDI,0x18
CALL 0x00184e10
MOV RDI,qword ptr [RSP + 0x8]
ADD RDI,0x20
CALL 0x00184e10
MOV RAX,qword ptr [RSP + 0x8]
MOV RCX,qword ptr [RSP + 0x40]
MOV DX,word ptr [RCX]
MOV word ptr [RAX + 0x28],DX
MOV CL,byte ptr [RCX + 0x2]
MOV byte ptr [RAX + 0x2a],CL
MOV RDI,qword ptr [RSP + 0x48]
CALL 0x00184e30
TEST AL,0x1
JNZ 0x0017ef50
MOV EDI,0x10
CALL 0x00152570
MOV RDI,RAX
MOV RAX,RDI
MOV qword ptr [RSP],RAX
LAB_0017eefa:
LEA RSI,[0x2c3304]
CALL 0x00152370
JMP 0x0017ef08
LAB_0017ef08:
MOV RDI,qword ptr [RSP]
MOV RSI,qword ptr [0x00343fb0]
MOV RDX,qword ptr [0x00343f78]
CALL 0x00152960
LAB_0017ef50:
MOV RDI,qword ptr [RSP + 0x8]
CALL 0x00184e50
MOV RDI,RAX
CALL 0x00152730
MOV qword ptr [RSP + 0x20],RAX
LEA RDI,[RSP + 0x28]
LEA RSI,[RSP + 0x20]
CALL 0x00160720
MOV RDI,qword ptr [RSP + 0x8]
MOV RAX,qword ptr [RSP + 0x28]
MOV qword ptr [RDI + 0x20],RAX
MOV RAX,qword ptr [RDI + 0x20]
MOV qword ptr [RDI + 0x10],RAX
CALL 0x00184e50
MOV RDI,RAX
CALL 0x00152810
MOV qword ptr [RSP + 0x10],RAX
LEA RDI,[RSP + 0x18]
LEA RSI,[RSP + 0x10]
CALL 0x00160720
MOV RAX,qword ptr [RSP + 0x8]
MOV RCX,qword ptr [RSP + 0x18]
MOV qword ptr [RAX + 0x18],RCX
ADD RSP,0x58
RET
|
/* minja::Parser::Parser(std::shared_ptr<std::__cxx11::string > const&, minja::Options const&) */
void __thiscall minja::Parser::Parser(Parser *this,shared_ptr *param_1,Options *param_2)
{
bool bVar1;
runtime_error *this_00;
int8 local_48;
int8 local_40;
int8 local_38;
int8 local_30 [3];
Options *local_18;
shared_ptr *local_10;
Parser *local_8;
local_18 = param_2;
local_10 = param_1;
local_8 = this;
std::shared_ptr<std::__cxx11::string>::shared_ptr
((shared_ptr<std::__cxx11::string> *)this,param_1);
__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>::__normal_iterator
((__normal_iterator<char_const*,std::__cxx11::string> *)(this + 0x10));
__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>::__normal_iterator
((__normal_iterator<char_const*,std::__cxx11::string> *)(this + 0x18));
__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>::__normal_iterator
((__normal_iterator<char_const*,std::__cxx11::string> *)(this + 0x20));
*(int2 *)(this + 0x28) = *(int2 *)local_18;
*(Options *)(this + 0x2a) = local_18[2];
bVar1 = std::__shared_ptr::operator_cast_to_bool((__shared_ptr *)local_10);
if (!bVar1) {
this_00 = (runtime_error *)__cxa_allocate_exception(0x10);
/* try { // try from 0017eefa to 0017ef05 has its CatchHandler @ 0017ef24 */
std::runtime_error::runtime_error(this_00,"Template string is null");
/* try { // try from 0017ef08 to 0017ef1e has its CatchHandler @ 0017ef40 */
/* WARNING: Subroutine does not return */
__cxa_throw(this_00,PTR_typeinfo_00343fb0,PTR__runtime_error_00343f78);
}
std::__shared_ptr_access<std::__cxx11::string,(__gnu_cxx::_Lock_policy)2,false,false>::operator->
((__shared_ptr_access<std::__cxx11::string,(__gnu_cxx::_Lock_policy)2,false,false> *)
this);
local_38 = std::__cxx11::string::begin();
__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>::__normal_iterator<char*>
((__normal_iterator<char_const*,std::__cxx11::string> *)local_30,
(__normal_iterator *)&local_38);
*(int8 *)(this + 0x20) = local_30[0];
*(int8 *)(this + 0x10) = *(int8 *)(this + 0x20);
std::__shared_ptr_access<std::__cxx11::string,(__gnu_cxx::_Lock_policy)2,false,false>::operator->
((__shared_ptr_access<std::__cxx11::string,(__gnu_cxx::_Lock_policy)2,false,false> *)
this);
local_48 = std::__cxx11::string::end();
__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>::__normal_iterator<char*>
((__normal_iterator<char_const*,std::__cxx11::string> *)&local_40,
(__normal_iterator *)&local_48);
*(int8 *)(this + 0x18) = local_40;
return;
}
|
|
64,299
|
translog_scanner_get_page
|
eloqsql/storage/maria/ma_loghandler.c
|
static my_bool
translog_scanner_get_page(TRANSLOG_SCANNER_DATA *scanner)
{
TRANSLOG_VALIDATOR_DATA data;
DBUG_ENTER("translog_scanner_get_page");
data.addr= &scanner->page_addr;
data.was_recovered= 0;
DBUG_RETURN((scanner->page=
translog_get_page(&data, scanner->buffer,
(scanner->use_direct_link ?
&scanner->direct_link :
NULL))) ==
NULL);
}
|
O0
|
c
|
translog_scanner_get_page:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x2000, %rax # imm = 0x2000
movq %rax, -0x18(%rbp)
movb $0x0, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x20(%rbp)
movq -0x8(%rbp), %rax
movsbl 0x202d(%rax), %eax
cmpl $0x0, %eax
je 0x32d16
movq -0x8(%rbp), %rax
addq $0x2020, %rax # imm = 0x2020
movq %rax, -0x28(%rbp)
jmp 0x32d1e
xorl %eax, %eax
movq %rax, -0x28(%rbp)
jmp 0x32d1e
movq -0x20(%rbp), %rsi
movq -0x28(%rbp), %rdx
leaq -0x18(%rbp), %rdi
callq 0x30180
movq -0x8(%rbp), %rcx
movq %rax, 0x2018(%rcx)
cmpq $0x0, %rax
sete %al
andb $0x1, %al
movzbl %al, %eax
movb %al, -0x29(%rbp)
movb -0x29(%rbp), %al
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
|
translog_scanner_get_page:
push rbp
mov rbp, rsp
sub rsp, 30h
mov [rbp+var_8], rdi
mov rax, [rbp+var_8]
add rax, 2000h
mov [rbp+var_18], rax
mov [rbp+var_10], 0
mov rax, [rbp+var_8]
mov [rbp+var_20], rax
mov rax, [rbp+var_8]
movsx eax, byte ptr [rax+202Dh]
cmp eax, 0
jz short loc_32D16
mov rax, [rbp+var_8]
add rax, 2020h
mov [rbp+var_28], rax
jmp short loc_32D1E
loc_32D16:
xor eax, eax
mov [rbp+var_28], rax
jmp short $+2
loc_32D1E:
mov rsi, [rbp+var_20]
mov rdx, [rbp+var_28]
lea rdi, [rbp+var_18]
call translog_get_page
mov rcx, [rbp+var_8]
mov [rcx+2018h], rax
cmp rax, 0
setz al
and al, 1
movzx eax, al
mov [rbp+var_29], al
mov al, [rbp+var_29]
add rsp, 30h
pop rbp
retn
|
_BOOL8 translog_scanner_get_page(long long a1)
{
long long page; // rax
long long *v3; // [rsp+18h] [rbp-18h] BYREF
char v4; // [rsp+20h] [rbp-10h]
long long v5; // [rsp+28h] [rbp-8h]
v5 = a1;
v3 = (long long *)(a1 + 0x2000);
v4 = 0;
if ( *(_BYTE *)(a1 + 8237) )
page = translog_get_page(&v3, a1, (_QWORD *)(v5 + 8224));
else
page = translog_get_page(&v3, a1, 0LL);
*(_QWORD *)(v5 + 8216) = page;
return page == 0;
}
|
translog_scanner_get_page:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x30
MOV qword ptr [RBP + -0x8],RDI
MOV RAX,qword ptr [RBP + -0x8]
ADD RAX,0x2000
MOV qword ptr [RBP + -0x18],RAX
MOV byte ptr [RBP + -0x10],0x0
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RBP + -0x20],RAX
MOV RAX,qword ptr [RBP + -0x8]
MOVSX EAX,byte ptr [RAX + 0x202d]
CMP EAX,0x0
JZ 0x00132d16
MOV RAX,qword ptr [RBP + -0x8]
ADD RAX,0x2020
MOV qword ptr [RBP + -0x28],RAX
JMP 0x00132d1e
LAB_00132d16:
XOR EAX,EAX
MOV qword ptr [RBP + -0x28],RAX
JMP 0x00132d1e
LAB_00132d1e:
MOV RSI,qword ptr [RBP + -0x20]
MOV RDX,qword ptr [RBP + -0x28]
LEA RDI,[RBP + -0x18]
CALL 0x00130180
MOV RCX,qword ptr [RBP + -0x8]
MOV qword ptr [RCX + 0x2018],RAX
CMP RAX,0x0
SETZ AL
AND AL,0x1
MOVZX EAX,AL
MOV byte ptr [RBP + -0x29],AL
MOV AL,byte ptr [RBP + -0x29]
ADD RSP,0x30
POP RBP
RET
|
bool translog_scanner_get_page(long param_1)
{
long lVar1;
long local_30;
long local_20;
int1 local_18;
long local_10;
local_20 = param_1 + 0x2000;
local_18 = 0;
if (*(char *)(param_1 + 0x202d) == '\0') {
local_30 = 0;
}
else {
local_30 = param_1 + 0x2020;
}
local_10 = param_1;
lVar1 = translog_get_page(&local_20,param_1,local_30);
*(long *)(local_10 + 0x2018) = lVar1;
return lVar1 == 0;
}
|
Subsets and Splits
C++ Functions Using STL
Identifies C++ functions that depend on standard library components, revealing patterns in how developers utilize STL libraries and potentially highlighting common coding practices or dependencies in the dataset.
C++ STL Function Queries
Filters C++ code examples that use standard library containers and algorithms, helping identify common programming patterns and library usage in code generation tasks.